diff --git a/packages/calcite-components/src/components/combobox-item-group/combobox-item-group.scss b/packages/calcite-components/src/components/combobox-item-group/combobox-item-group.scss index e6caa423287..03270197cb7 100644 --- a/packages/calcite-components/src/components/combobox-item-group/combobox-item-group.scss +++ b/packages/calcite-components/src/components/combobox-item-group/combobox-item-group.scss @@ -1,22 +1,16 @@ .scale--s { @apply text-n2h; - --calcite-combobox-item-spacing-unit-l: theme("spacing.2"); - --calcite-combobox-item-spacing-unit-s: theme("spacing.1"); - --calcite-combobox-item-spacing-indent: theme("spacing.2"); + --calcite-combobox-item-spacing-unit: theme("spacing.2"); } .scale--m { @apply text-n1h; - --calcite-combobox-item-spacing-unit-l: theme("spacing.3"); - --calcite-combobox-item-spacing-unit-s: theme("spacing.2"); - --calcite-combobox-item-spacing-indent: theme("spacing.3"); + --calcite-combobox-item-spacing-unit: theme("spacing.3"); } .scale--l { @apply text-0h; - --calcite-combobox-item-spacing-unit-l: theme("spacing.4"); - --calcite-combobox-item-spacing-unit-s: theme("spacing.3"); - --calcite-combobox-item-spacing-indent: theme("spacing.4"); + --calcite-combobox-item-spacing-unit: theme("spacing.4"); } :host, @@ -35,7 +29,7 @@ .title { --calcite-combobox-item-indent-value: calc( - var(--calcite-combobox-item-spacing-indent) * var(--calcite-combobox-item-spacing-indent-multiplier) + var(--calcite-combobox-item-spacing-unit) * var(--calcite-combobox-item-spacing-indent-multiplier) ); border: 0 solid; @apply border-b-color-3 @@ -45,13 +39,12 @@ flex-1 border-b font-bold; - padding-block: var(--calcite-combobox-item-spacing-unit-l); - padding-inline: var(--calcite-combobox-item-spacing-unit-s); + padding: var(--calcite-combobox-item-spacing-unit); margin-inline-start: var(--calcite-combobox-item-indent-value); } ::slotted(calcite-combobox-item-group:not([after-empty-group])) { - padding-block-start: var(--calcite-combobox-item-spacing-unit-l); + padding-block-start: var(--calcite-combobox-item-spacing-unit); } @include base-component(); diff --git a/packages/calcite-components/src/components/combobox-item/combobox-item.scss b/packages/calcite-components/src/components/combobox-item/combobox-item.scss index 795d802aa06..b61ec05edda 100644 --- a/packages/calcite-components/src/components/combobox-item/combobox-item.scss +++ b/packages/calcite-components/src/components/combobox-item/combobox-item.scss @@ -2,34 +2,31 @@ .scale--s { @apply text-n2h; - --calcite-combobox-item-spacing-unit-l: theme("spacing.2"); --calcite-combobox-item-spacing-unit-s: theme("spacing.1"); - --calcite-combobox-item-spacing-indent: theme("spacing.2"); + --calcite-combobox-item-spacing-unit-l: theme("spacing.2"); --calcite-combobox-item-selector-icon-size: theme("spacing.4"); --calcite-internal-combobox-item-description-font-size: var(--calcite-font-size-xs); } .scale--m { @apply text-n1h; - --calcite-combobox-item-spacing-unit-l: theme("spacing.3"); --calcite-combobox-item-spacing-unit-s: theme("spacing[1.5]"); - --calcite-combobox-item-spacing-indent: theme("spacing.3"); + --calcite-combobox-item-spacing-unit-l: theme("spacing.3"); --calcite-combobox-item-selector-icon-size: theme("spacing.4"); --calcite-internal-combobox-item-description-font-size: var(--calcite-font-size-sm); } .scale--l { @apply text-0h; - --calcite-combobox-item-spacing-unit-l: theme("spacing.4"); --calcite-combobox-item-spacing-unit-s: theme("spacing[2.5]"); - --calcite-combobox-item-spacing-indent: theme("spacing.4"); + --calcite-combobox-item-spacing-unit-l: theme("spacing.4"); --calcite-combobox-item-selector-icon-size: theme("spacing.6"); --calcite-internal-combobox-item-description-font-size: var(--calcite-font-size); } .container { --calcite-combobox-item-indent-value: calc( - var(--calcite-combobox-item-spacing-indent) * var(--calcite-combobox-item-spacing-indent-multiplier) + var(--calcite-combobox-item-spacing-unit-l) * var(--calcite-combobox-item-spacing-indent-multiplier) ); } @@ -66,7 +63,7 @@ ul:focus { justify-content: space-around; gap: var(--calcite-combobox-item-spacing-unit-l); padding-block: var(--calcite-combobox-item-spacing-unit-s); - padding-inline: var(--calcite-combobox-item-spacing-unit-l); + padding-inline-end: var(--calcite-combobox-item-spacing-unit-l); padding-inline-start: var(--calcite-combobox-item-indent-value); } diff --git a/packages/calcite-components/src/components/combobox-item/combobox-item.tsx b/packages/calcite-components/src/components/combobox-item/combobox-item.tsx index 95dd60e20b2..4c1777ca9f2 100644 --- a/packages/calcite-components/src/components/combobox-item/combobox-item.tsx +++ b/packages/calcite-components/src/components/combobox-item/combobox-item.tsx @@ -284,7 +284,8 @@ export class ComboboxItem extends LitElement implements InteractiveComponent { [CSS.active]: this.active, [CSS.single]: isSingleSelect, }; - const depth = getDepth(this.el) + 1; + const depth = getDepth(this.el); + /* TODO: [MIGRATION] This used before. In Stencil, props overwrite user-provided props. If you don't wish to overwrite user-values, replace "=" here with "??=" */ this.el.ariaHidden = "true"; /* TODO: [MIGRATION] This used before. In Stencil, props overwrite user-provided props. If you don't wish to overwrite user-values, replace "=" here with "??=" */ diff --git a/packages/calcite-components/src/components/combobox/combobox.stories.ts b/packages/calcite-components/src/components/combobox/combobox.stories.ts index 6f907c99c30..cc9c1b4f839 100644 --- a/packages/calcite-components/src/components/combobox/combobox.stories.ts +++ b/packages/calcite-components/src/components/combobox/combobox.stories.ts @@ -45,7 +45,7 @@ function allScaleComboboxBuilder(

${selectionMode} selection mode + ${scale} scale

html` `; export const nestedItems = (): string => html` -
- @@ -375,9 +364,13 @@ export const nestedItems = (): string => html` -
`; +nestedItems.args = { + selectionMode: "multiple", +}; +nestedItems.decorators = [allScaleComboboxBuilder]; + const style = html`