diff --git a/.changeset/silent-views-roll.md b/.changeset/silent-views-roll.md new file mode 100644 index 0000000000..b9316eb9b3 --- /dev/null +++ b/.changeset/silent-views-roll.md @@ -0,0 +1,8 @@ +--- +'@solid-design-system/components': patch +'@solid-design-system/docs': patch +--- + +- Fixed the mobile view responsiveness of `sd-combobox` when using multiple tags. +- Fixed the mobile clipping for the `sd-combobox` stories in the Documentation. +- Fixed the mobile background when focused for the components `sd-combobox`, `sd-input`, `sd-select`, `sd-datepicker` and `sd-textarea`. \ No newline at end of file diff --git a/packages/components/src/components/combobox/combobox.ts b/packages/components/src/components/combobox/combobox.ts index 7aec2df86e..daf3e90c78 100644 --- a/packages/components/src/components/combobox/combobox.ts +++ b/packages/components/src/components/combobox/combobox.ts @@ -267,6 +267,7 @@ export default class SdCombobox extends SolidElement implements SolidFormControl @property() getTag: (option: SdOption, index: number) => TemplateResult | string | HTMLElement = option => { return html` ` : ''} - ${this.multiple && this.useTags && this.tags.length > 0 - ? html`
- ${this.tags} -
` - : null} - +
+ ${this.multiple && this.useTags && this.tags && this.tags.length > 0 + ? html`
+ ${this.tags} +
` + : null} + +
${this.selectedOptions.map(option => option?.getTextLabel()).join(', ')}
diff --git a/packages/components/src/components/datepicker/datepicker.ts b/packages/components/src/components/datepicker/datepicker.ts index d5feb17400..b895bb03e9 100644 --- a/packages/components/src/components/datepicker/datepicker.ts +++ b/packages/components/src/components/datepicker/datepicker.ts @@ -2106,7 +2106,9 @@ export default class SdDatepicker extends SolidElement implements SolidFormContr part="base" class=${cx( 'px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast w-full', - !this.disabled && !this.readonly && !this.visuallyDisabled ? 'hover:bg-neutral-200' : '', + !this.disabled && !this.readonly && !this.visuallyDisabled + ? 'hover:[@media(hover:hover)]:bg-neutral-200' + : '', this.readonly ? 'bg-neutral-100' : 'bg-white', inputState === 'disabled' || inputState === 'visuallyDisabled' ? 'text-neutral-500' : 'text-black' )} diff --git a/packages/components/src/components/input/input.ts b/packages/components/src/components/input/input.ts index 689584a779..bb0679a7fc 100644 --- a/packages/components/src/components/input/input.ts +++ b/packages/components/src/components/input/input.ts @@ -635,7 +635,9 @@ export default class SdInput extends SolidElement implements SolidFormControl { 'px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast', this.floatingLabel && 'has-floating-label', // States - !this.disabled && !this.readonly && !this.visuallyDisabled ? 'hover:bg-neutral-200' : '', + !this.disabled && !this.readonly && !this.visuallyDisabled + ? 'hover:[@media(hover:hover)]:bg-neutral-200' + : '', this.readonly ? 'bg-neutral-100' : 'bg-white', ['disabled', 'visuallyDisabled'].includes(inputState) ? 'text-neutral-500' : 'form-control-color-text', ['invalid', 'activeInvalid'].includes(inputState) && 'form-control--invalid-color-background', diff --git a/packages/components/src/components/select/select.ts b/packages/components/src/components/select/select.ts index 15e7ea425f..e8147831ad 100644 --- a/packages/components/src/components/select/select.ts +++ b/packages/components/src/components/select/select.ts @@ -1050,7 +1050,9 @@ export default class SdSelect extends SolidElement implements SolidFormControl {
${generateTemplate({ args })}
`; + return html`
${generateTemplate({ args })}
`; } }; @@ -100,30 +100,34 @@ export const Default = { export const Size = { render: () => html` -
- - Option 1 - Option 2 - Option 3 - Option 4 - Option 5 - - - - Option 1 - Option 2 - Option 3 - Option 4 - Option 5 - - - - Option 1 - Option 2 - Option 3 - Option 4 - Option 5 - +
+
+ + Option 1 + Option 2 + Option 3 + Option 4 + Option 5 + +
+
+ + Option 1 + Option 2 + Option 3 + Option 4 + Option 5 + +
+
+ + Option 1 + Option 2 + Option 3 + Option 4 + Option 5 + +
` }; @@ -135,16 +139,21 @@ export const Size = { */ export const Placement = { render: () => html` -
- +
+ Option 1 Option 2 Option 3 Option 4 Option 5 - - + Option 1 Option 2 Option 3 @@ -162,23 +171,26 @@ export const Placement = { */ export const Label = { render: () => html` -
- - Option 1 - Option 2 - Option 3 - Option 4 - Option 5 - - - -
Label slot
- Option 1 - Option 2 - Option 3 - Option 4 - Option 5 -
+
+
+ + Option 1 + Option 2 + Option 3 + Option 4 + Option 5 + +
+
+ +
Label slot
+ Option 1 + Option 2 + Option 3 + Option 4 + Option 5 +
+
` }; @@ -190,7 +202,7 @@ export const Label = { */ export const FloatingLabel = { render: () => html` -
+
Option 1 Option 2 @@ -207,7 +219,7 @@ export const FloatingLabel = { */ export const Placeholder = { render: () => html` -
+
Option 1 Option 2 @@ -224,7 +236,7 @@ export const Placeholder = { */ export const Disabled = { render: () => html` -
+
Option 1 Option 2 @@ -245,7 +257,7 @@ export const Disabled = { */ export const VisuallyDisabled = { render: () => html` -
+
html` -
- +
+ Option 1 Option 2 Option 3 @@ -282,7 +301,13 @@ export const HelpText = { Option 5 - +
Help text slot
Option 1 Option 2 @@ -303,7 +328,7 @@ export const Focus = { elm?.focus(); }, render: () => html` -
+
Option 1 Option 2 @@ -318,7 +343,7 @@ export const Focus = { */ export const SuggestionContainerHeight = { render: () => html` -
+