-
+
+
+
+
+
class="s-text-field__eye"
data-testid="eye"
type="button"
- @click="toggleForceReveal()"
+ @click.stop="toggleForceReveal()"
>
@@ -309,6 +354,7 @@ $theme-content-tertiary: theme.token-as-var('sys.color.content-tertiary');
}
&:not(&_empty),
+ &_filled-state,
&:focus-within {
label {
transform: translateY(#{$label-top-secondary});
@@ -322,7 +368,7 @@ $theme-content-tertiary: theme.token-as-var('sys.color.content-tertiary');
@apply relative flex;
@apply transition-all;
- height: $height;
+ min-height: $height;
&:hover:not(:focus-within) {
background: $theme-bg-hover;
@@ -342,10 +388,14 @@ $theme-content-tertiary: theme.token-as-var('sys.color.content-tertiary');
// primary state by default
transform: translateY(#{$label-top-primary});
}
+ }
+
+ &__input-line {
+ @apply flex flex-wrap flex-grow min-w-0;
+ padding: $input-padding;
input {
- @apply h-full flex-1 w-full min-w-0;
- padding: $input-padding;
+ @apply flex-1 w-full min-w-1/4;
background: transparent;
&:focus {
@@ -355,7 +405,7 @@ $theme-content-tertiary: theme.token-as-var('sys.color.content-tertiary');
}
&__append {
- @apply h-full flex items-center space-x-4 pr-4;
+ @apply flex items-center space-x-4 pr-4;
}
&__counter {
diff --git a/packages/ui/stories/SSelect.stories.ts b/packages/ui/stories/SSelect.stories.ts
index 777cd384..3ab3e502 100644
--- a/packages/ui/stories/SSelect.stories.ts
+++ b/packages/ui/stories/SSelect.stories.ts
@@ -51,6 +51,10 @@ const OPTIONS: SelectOption[] = [
label: 'England',
value: 'en',
},
+ {
+ label: 'United Arab Emirates',
+ value: 'ae',
+ },
{
label: 'Iceland',
value: 'is',
@@ -73,6 +77,10 @@ const OPTION_GROUPS: SelectOptionGroup[] = [
label: 'England',
value: 'en',
},
+ {
+ label: 'United Arab Emirates',
+ value: 'ae',
+ },
],
},
{
@@ -202,25 +210,108 @@ export const Dropdown = defineStory((args) => ({
Dropdown.argTypes = commonArgTypes
Dropdown.args = commonArgs
+const modelSingle = ref()
+const modelSingleRemote = ref()
+const modelMultiple = ref()
+const modelMultipleRemote = ref()
+const modelDropdown = ref()
+const modelDropdownDropdown = ref()
+
export const WithSearch = defineStory((args) => ({
components: { SSelect, SDropdown },
setup() {
+ const asyncOptions = shallowRef([...OPTIONS])
+ const isLoadingAsyncOptions = ref(false)
+
+ async function handleSearch(value: string) {
+ isLoadingAsyncOptions.value = true
+ asyncOptions.value = await new Promise((resolve) => {
+ setTimeout(() => resolve(OPTIONS.filter((x) => new RegExp(value, 'i').test(x.label))), 1000)
+ })
+ isLoadingAsyncOptions.value = false
+ }
+
return {
OPTION_GROUPS,
- model: ref(['en', 'jp']),
+ asyncOptions,
+ isLoadingAsyncOptions,
+ modelSingle,
+ modelSingleRemote,
+ modelMultiple,
+ modelMultipleRemote,
+ modelDropdown,
+ modelDropdownDropdown,
+ handleSearch,
args,
}
},
template: `
+
+
+
+
+
`,