diff --git a/scripts/extract-selectors.ts b/scripts/extract-selectors.ts index c1e2b1d..4ef4962 100644 --- a/scripts/extract-selectors.ts +++ b/scripts/extract-selectors.ts @@ -68,7 +68,11 @@ export function extractSelectors(props: ExtractSelectorsProps) { if (value.startsWith("bx--") && !value.startsWith(".")) { classes.push("." + value); } else { - classes.push(value); + if (value.startsWith(".")) { + classes.push(value); + } else { + classes.push("." + value); + } } } }); diff --git a/src/component-index.ts b/src/component-index.ts index e58d851..5b0db65 100644 --- a/src/component-index.ts +++ b/src/component-index.ts @@ -240,7 +240,7 @@ export const components: Record = "path": "carbon-components-svelte/src/ComposedModal/ComposedModal.svelte", "classes": [ ".bx--modal", - "is-visible", + ".is-visible", ".bx--modal--danger", ".bx--modal-container", ".bx--modal-container--xs", @@ -586,7 +586,7 @@ export const components: Record = "classes": [ ".bx--header__action", ".bx--header__action--active", - "action-text", + ".action-text", ".bx--header-panel", ".bx--header-panel--expanded" ] @@ -652,11 +652,11 @@ export const components: Record = "HeaderSearch": { "path": "carbon-components-svelte/src/UIShell/HeaderSearch.svelte", "classes": [ - "active", + ".active", ".bx--header__action", - "disabled", - "hidden", - "selected" + ".disabled", + ".hidden", + ".selected" ] }, "HeaderUtilities": { @@ -792,7 +792,7 @@ export const components: Record = "classes": [ ".bx--modal", ".bx--modal-tall", - "is-visible", + ".is-visible", ".bx--modal--danger", ".bx--modal-container", ".bx--modal-container--xs", @@ -914,9 +914,9 @@ export const components: Record = ".bx--number__invalid--warning", ".bx--number__controls", ".bx--number__control-btn", - "down-icon", + ".down-icon", ".bx--number__rule-divider", - "up-icon", + ".up-icon", ".bx--form__helper-text", ".bx--form__helper-text--disabled", ".bx--form-requirement" @@ -1865,9 +1865,9 @@ export const components: Record = ".bx--tree", ".bx--tree--default", ".bx--tree--compact", - "li.bx--tree-node:not(.bx--tree-node--disabled)", + ".li.bx--tree-node:not(.bx--tree-node--disabled)", ".bx--tree-node--disabled", - "li.bx--tree-node" + ".li.bx--tree-node" ] }, "truncate": {