@bitrise/bitkit-v2 0.3.423 → 0.3.424
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/theme/slot-recipes/Combobox.recipe.js +4 -0
- package/dist/theme/slot-recipes/Combobox.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/Multiselect.recipe.js +7 -2
- package/dist/theme/slot-recipes/Multiselect.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/NativeSelect.recipe.js +1 -0
- package/dist/theme/slot-recipes/NativeSelect.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/Select.recipe.js +7 -2
- package/dist/theme/slot-recipes/Select.recipe.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Combobox.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/Combobox.recipe.ts"],"sourcesContent":["import { comboboxAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nimport { base, variants } from '../common/ComboboxAndSelect.common';\nimport * as inputStyle from '../common/InputAndTextarea.common';\n\nconst comboboxSlotRecipe = defineSlotRecipe({\n className: 'combobox',\n slots: comboboxAnatomy.keys(),\n base: {\n control: {\n display: 'flex',\n alignItems: 'center',\n position: 'relative',\n },\n input: {\n ...inputStyle.base,\n ...inputStyle.singleLineInputOverrides,\n height: 'var(--input-height)',\n textOverflow: 'ellipsis',\n },\n ...base,\n indicatorGroup: {\n display: 'flex',\n alignItems: 'center',\n gap: '8',\n position: 'absolute',\n right: '16',\n top: '50%',\n transform: 'translateY(-50%)',\n },\n },\n variants: {\n size: {\n md: {\n input: {\n ...inputStyle.variants.size.md,\n ...inputStyle.singleLineInputOverrides,\n paddingInlineEnd: '96',\n },\n ...variants.size.md,\n },\n lg: {\n input: {\n ...inputStyle.variants.size.lg,\n ...inputStyle.singleLineInputOverrides,\n paddingInlineEnd: '96',\n },\n ...variants.size.lg,\n },\n },\n hasStatusIcon: {\n true: {\n input: {\n paddingInlineEnd: '128',\n },\n },\n false: {},\n },\n },\n defaultVariants: {\n size: 'lg',\n },\n});\n\nexport default comboboxSlotRecipe;\n"],"mappings":";;;;;AAMA,IAAM,qBAAqB,iBAAiB;CAC1C,WAAW;CACX,OAAO,gBAAgB,KAAK;CAC5B,MAAM;EACJ,SAAS;GACP,SAAS;GACT,YAAY;GACZ,UAAU;EACZ;EACA,OAAO;GACL,GAAG;GACH,GAAG;GACH,QAAQ;GACR,cAAc;EAChB;EACA,GAAG;EACH,gBAAgB;GACd,SAAS;GACT,YAAY;GACZ,KAAK;GACL,UAAU;GACV,OAAO;GACP,KAAK;GACL,WAAW;EACb;CACF;CACA,UAAU;EACR,MAAM;GACJ,IAAI;IACF,OAAO;KACL,GAAA,SAAuB,KAAK;KAC5B,GAAG;KACH,kBAAkB;IACpB;IACA,GAAG,WAAS,KAAK;GACnB;GACA,IAAI;IACF,OAAO;KACL,GAAA,SAAuB,KAAK;KAC5B,GAAG;KACH,kBAAkB;IACpB;IACA,GAAG,WAAS,KAAK;GACnB;EACF;EACA,eAAe;GACb,MAAM,EACJ,OAAO,EACL,kBAAkB,MACpB,EACF;GACA,OAAO,CAAC;EACV;CACF;CACA,iBAAiB,EACf,MAAM,KACR;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"Combobox.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/Combobox.recipe.ts"],"sourcesContent":["import { comboboxAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nimport { base, variants } from '../common/ComboboxAndSelect.common';\nimport * as inputStyle from '../common/InputAndTextarea.common';\n\nconst comboboxSlotRecipe = defineSlotRecipe({\n className: 'combobox',\n slots: comboboxAnatomy.keys(),\n base: {\n control: {\n display: 'flex',\n alignItems: 'center',\n position: 'relative',\n },\n input: {\n ...inputStyle.base,\n ...inputStyle.singleLineInputOverrides,\n height: 'var(--input-height)',\n textOverflow: 'ellipsis',\n },\n ...base,\n indicatorGroup: {\n display: 'flex',\n alignItems: 'center',\n gap: '8',\n position: 'absolute',\n right: '16',\n top: '50%',\n transform: 'translateY(-50%)',\n },\n trigger: {\n cursor: 'pointer',\n _readOnly: {\n cursor: 'default',\n },\n },\n },\n variants: {\n size: {\n md: {\n input: {\n ...inputStyle.variants.size.md,\n ...inputStyle.singleLineInputOverrides,\n paddingInlineEnd: '96',\n },\n ...variants.size.md,\n },\n lg: {\n input: {\n ...inputStyle.variants.size.lg,\n ...inputStyle.singleLineInputOverrides,\n paddingInlineEnd: '96',\n },\n ...variants.size.lg,\n },\n },\n hasStatusIcon: {\n true: {\n input: {\n paddingInlineEnd: '128',\n },\n },\n false: {},\n },\n },\n defaultVariants: {\n size: 'lg',\n },\n});\n\nexport default comboboxSlotRecipe;\n"],"mappings":";;;;;AAMA,IAAM,qBAAqB,iBAAiB;CAC1C,WAAW;CACX,OAAO,gBAAgB,KAAK;CAC5B,MAAM;EACJ,SAAS;GACP,SAAS;GACT,YAAY;GACZ,UAAU;EACZ;EACA,OAAO;GACL,GAAG;GACH,GAAG;GACH,QAAQ;GACR,cAAc;EAChB;EACA,GAAG;EACH,gBAAgB;GACd,SAAS;GACT,YAAY;GACZ,KAAK;GACL,UAAU;GACV,OAAO;GACP,KAAK;GACL,WAAW;EACb;EACA,SAAS;GACP,QAAQ;GACR,WAAW,EACT,QAAQ,UACV;EACF;CACF;CACA,UAAU;EACR,MAAM;GACJ,IAAI;IACF,OAAO;KACL,GAAA,SAAuB,KAAK;KAC5B,GAAG;KACH,kBAAkB;IACpB;IACA,GAAG,WAAS,KAAK;GACnB;GACA,IAAI;IACF,OAAO;KACL,GAAA,SAAuB,KAAK;KAC5B,GAAG;KACH,kBAAkB;IACpB;IACA,GAAG,WAAS,KAAK;GACnB;EACF;EACA,eAAe;GACb,MAAM,EACJ,OAAO,EACL,kBAAkB,MACpB,EACF;GACA,OAAO,CAAC;EACV;CACF;CACA,iBAAiB,EACf,MAAM,KACR;AACF,CAAC"}
|
|
@@ -27,15 +27,20 @@ var multiselectSlotRecipe = defineSlotRecipe({
|
|
|
27
27
|
borderRadius: "4",
|
|
28
28
|
color: "input/text/inputValue",
|
|
29
29
|
width: "100%",
|
|
30
|
+
cursor: "pointer",
|
|
30
31
|
textAlign: "start",
|
|
31
32
|
userSelect: "none",
|
|
32
33
|
focusVisibleRing: "inside",
|
|
33
34
|
_disabled: {
|
|
34
35
|
background: "background/disabled",
|
|
35
|
-
color: "text/disabled"
|
|
36
|
+
color: "text/disabled",
|
|
37
|
+
cursor: "not-allowed"
|
|
36
38
|
},
|
|
37
39
|
_invalid: { borderColor: "border/error" },
|
|
38
|
-
_readOnly: {
|
|
40
|
+
_readOnly: {
|
|
41
|
+
background: "background/disabled",
|
|
42
|
+
cursor: "default"
|
|
43
|
+
}
|
|
39
44
|
},
|
|
40
45
|
overlay: {
|
|
41
46
|
position: "relative",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Multiselect.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/Multiselect.recipe.ts"],"sourcesContent":["import { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nimport { rem } from '../themeUtils';\n\nexport const multiselectSlotRecipe = defineSlotRecipe({\n className: 'multiselect',\n slots: ['control', 'trigger', 'overlay', 'tagsBlock', 'placeholderText', 'indicatorGroup', 'indicator'],\n base: {\n control: {\n position: 'relative',\n width: '100%',\n },\n trigger: {\n position: 'absolute',\n inset: 0,\n display: 'block',\n background: 'background/primary',\n borderWidth: '1',\n borderColor: 'border/strong',\n borderRadius: '4',\n color: 'input/text/inputValue',\n width: '100%',\n textAlign: 'start',\n userSelect: 'none',\n focusVisibleRing: 'inside',\n _disabled: {\n background: 'background/disabled',\n color: 'text/disabled',\n },\n _invalid: {\n borderColor: 'border/error',\n },\n _readOnly: {\n background: 'background/disabled',\n },\n },\n overlay: {\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n paddingInlineStart: '12',\n paddingInlineEnd: '48',\n },\n tagsBlock: {\n display: 'flex',\n flex: '1 0 0',\n flexWrap: 'wrap',\n alignItems: 'center',\n alignContent: 'center',\n gap: '8',\n minWidth: 0,\n },\n placeholderText: {\n flex: '1 0 0',\n minWidth: 0,\n height: '24',\n display: 'inline-flex',\n alignItems: 'center',\n color: 'input/text/inputValue',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n '&[data-placeholder]': {\n color: 'text/secondary',\n },\n },\n indicatorGroup: {\n display: 'flex',\n alignItems: 'center',\n gap: '8',\n position: 'absolute',\n insetInlineEnd: 0,\n top: 0,\n height: '48',\n paddingInlineEnd: '16',\n paddingInlineStart: '8',\n pointerEvents: 'none',\n '& > button': {\n pointerEvents: 'auto',\n },\n },\n indicator: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n color: 'icon/secondary',\n _disabled: {\n color: 'icon/disabled',\n },\n _readOnly: {\n color: 'icon/on-disabled',\n },\n },\n },\n\n variants: {\n constrained: {\n true: {\n overlay: {\n overflow: 'hidden',\n },\n tagsBlock: {\n flexWrap: 'nowrap',\n },\n },\n false: {},\n },\n size: {\n lg: {\n overlay: {\n minHeight: '48',\n paddingBlock: rem(11),\n },\n trigger: {\n textStyle: 'body/lg/regular',\n },\n placeholderText: {\n textStyle: 'body/lg/regular',\n lineHeight: rem(24),\n },\n },\n md: {\n indicatorGroup: {\n height: '40',\n },\n overlay: {\n minHeight: '40',\n paddingBlock: rem(7),\n '&:has([data-slot=\"tag\"])': {\n paddingInlineStart: rem(7),\n },\n },\n trigger: {\n textStyle: 'body/md/regular',\n },\n placeholderText: {\n textStyle: 'body/md/regular',\n lineHeight: rem(20),\n },\n },\n },\n },\n compoundVariants: [\n {\n constrained: true,\n size: 'lg',\n css: {\n overlay: {\n height: '48',\n minHeight: '48',\n paddingBlock: '12',\n },\n },\n },\n {\n constrained: true,\n size: 'md',\n css: {\n overlay: {\n height: '40',\n minHeight: '40',\n paddingBlock: '8',\n },\n },\n },\n ],\n defaultVariants: {\n constrained: false,\n size: 'lg',\n },\n});\n\nexport default multiselectSlotRecipe;\n"],"mappings":";;;AAIA,IAAa,wBAAwB,iBAAiB;CACpD,WAAW;CACX,OAAO;EAAC;EAAW;EAAW;EAAW;EAAa;EAAmB;EAAkB;CAAW;CACtG,MAAM;EACJ,SAAS;GACP,UAAU;GACV,OAAO;EACT;EACA,SAAS;GACP,UAAU;GACV,OAAO;GACP,SAAS;GACT,YAAY;GACZ,aAAa;GACb,aAAa;GACb,cAAc;GACd,OAAO;GACP,OAAO;GACP,WAAW;GACX,YAAY;GACZ,kBAAkB;GAClB,WAAW;IACT,YAAY;IACZ,OAAO;
|
|
1
|
+
{"version":3,"file":"Multiselect.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/Multiselect.recipe.ts"],"sourcesContent":["import { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nimport { rem } from '../themeUtils';\n\nexport const multiselectSlotRecipe = defineSlotRecipe({\n className: 'multiselect',\n slots: ['control', 'trigger', 'overlay', 'tagsBlock', 'placeholderText', 'indicatorGroup', 'indicator'],\n base: {\n control: {\n position: 'relative',\n width: '100%',\n },\n trigger: {\n position: 'absolute',\n inset: 0,\n display: 'block',\n background: 'background/primary',\n borderWidth: '1',\n borderColor: 'border/strong',\n borderRadius: '4',\n color: 'input/text/inputValue',\n width: '100%',\n cursor: 'pointer',\n textAlign: 'start',\n userSelect: 'none',\n focusVisibleRing: 'inside',\n _disabled: {\n background: 'background/disabled',\n color: 'text/disabled',\n cursor: 'not-allowed',\n },\n _invalid: {\n borderColor: 'border/error',\n },\n _readOnly: {\n background: 'background/disabled',\n cursor: 'default',\n },\n },\n overlay: {\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n paddingInlineStart: '12',\n paddingInlineEnd: '48',\n },\n tagsBlock: {\n display: 'flex',\n flex: '1 0 0',\n flexWrap: 'wrap',\n alignItems: 'center',\n alignContent: 'center',\n gap: '8',\n minWidth: 0,\n },\n placeholderText: {\n flex: '1 0 0',\n minWidth: 0,\n height: '24',\n display: 'inline-flex',\n alignItems: 'center',\n color: 'input/text/inputValue',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n '&[data-placeholder]': {\n color: 'text/secondary',\n },\n },\n indicatorGroup: {\n display: 'flex',\n alignItems: 'center',\n gap: '8',\n position: 'absolute',\n insetInlineEnd: 0,\n top: 0,\n height: '48',\n paddingInlineEnd: '16',\n paddingInlineStart: '8',\n pointerEvents: 'none',\n '& > button': {\n pointerEvents: 'auto',\n },\n },\n indicator: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n color: 'icon/secondary',\n _disabled: {\n color: 'icon/disabled',\n },\n _readOnly: {\n color: 'icon/on-disabled',\n },\n },\n },\n\n variants: {\n constrained: {\n true: {\n overlay: {\n overflow: 'hidden',\n },\n tagsBlock: {\n flexWrap: 'nowrap',\n },\n },\n false: {},\n },\n size: {\n lg: {\n overlay: {\n minHeight: '48',\n paddingBlock: rem(11),\n },\n trigger: {\n textStyle: 'body/lg/regular',\n },\n placeholderText: {\n textStyle: 'body/lg/regular',\n lineHeight: rem(24),\n },\n },\n md: {\n indicatorGroup: {\n height: '40',\n },\n overlay: {\n minHeight: '40',\n paddingBlock: rem(7),\n '&:has([data-slot=\"tag\"])': {\n paddingInlineStart: rem(7),\n },\n },\n trigger: {\n textStyle: 'body/md/regular',\n },\n placeholderText: {\n textStyle: 'body/md/regular',\n lineHeight: rem(20),\n },\n },\n },\n },\n compoundVariants: [\n {\n constrained: true,\n size: 'lg',\n css: {\n overlay: {\n height: '48',\n minHeight: '48',\n paddingBlock: '12',\n },\n },\n },\n {\n constrained: true,\n size: 'md',\n css: {\n overlay: {\n height: '40',\n minHeight: '40',\n paddingBlock: '8',\n },\n },\n },\n ],\n defaultVariants: {\n constrained: false,\n size: 'lg',\n },\n});\n\nexport default multiselectSlotRecipe;\n"],"mappings":";;;AAIA,IAAa,w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AS,EACP,WAAW,kBACb;IACA,iBAAiB;KACf,WAAW;KACX,YAAY,IAAI,EAAE;IACpB;GACF;GACA,IAAI;IACF,gBAAgB,EACd,QAAQ,KACV;IACA,SAAS;KACP,WAAW;KACX,cAAc,IAAI,CAAC;KACnB,8BAA4B,EAC1B,oBAAoB,IAAI,CAAC,EAC3B;IACF;IACA,SAAS,EACP,WAAW,kBACb;IACA,iBAAiB;KACf,WAAW;KACX,YAAY,IAAI,EAAE;IACpB;GACF;EACF;CACF;CACA,kBAAkB,CAChB;EACE,aAAa;EACb,MAAM;EACN,KAAK,EACH,SAAS;GACP,QAAQ;GACR,WAAW;GACX,cAAc;EAChB,EACF;CACF,GACA;EACE,aAAa;EACb,MAAM;EACN,KAAK,EACH,SAAS;GACP,QAAQ;GACR,WAAW;GACX,cAAc;EAChB,EACF;CACF,CACF;CACA,iBAAiB;EACf,aAAa;EACb,MAAM;CACR;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeSelect.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/NativeSelect.recipe.ts"],"sourcesContent":["import { nativeSelectAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nimport { rem } from '../themeUtils';\n\nconst nativeSelectSlotRecipe = defineSlotRecipe({\n className: 'native-select',\n slots: [...nativeSelectAnatomy.keys(), 'statusIcon'],\n base: {\n root: {\n position: 'relative',\n },\n field: {\n width: '100%',\n minWidth: 0,\n appearance: 'none',\n borderRadius: '4',\n borderWidth: '1',\n borderColor: 'border/strong',\n background: 'background/primary',\n transition: '200ms',\n color: 'input/text/inputValue',\n _hover: {\n borderColor: 'border/hover',\n _invalid: {\n borderColor: 'border/error',\n },\n },\n _invalid: {\n borderColor: 'border/error',\n },\n _placeholderShown: {\n color: 'input/text/placeholder',\n },\n _disabled: {\n _hover: {\n borderColor: 'border/disabled',\n },\n color: 'text/disabled',\n background: 'background/disabled',\n cursor: 'not-allowed',\n },\n _readOnly: {\n _hover: {\n borderColor: 'border/strong',\n },\n background: 'background/disabled',\n cursor: 'default',\n },\n },\n statusIcon: {\n position: 'absolute',\n top: '50%',\n right: '48',\n transform: 'translateY(-50%)',\n pointerEvents: 'none',\n },\n indicator: {\n position: 'absolute',\n top: '50%',\n right: rem(15),\n transform: 'translateY(-50%)',\n },\n },\n variants: {\n size: {\n md: {\n field: { paddingInline: rem(11), paddingBlock: rem(9), textStyle: 'body/md/regular' },\n },\n lg: {\n field: { paddingInline: rem(15), paddingBlock: rem(11), textStyle: 'body/lg/regular' },\n },\n },\n },\n defaultVariants: {\n size: 'lg',\n },\n});\n\nexport default nativeSelectSlotRecipe;\n"],"mappings":";;;;AAKA,IAAM,yBAAyB,iBAAiB;CAC9C,WAAW;CACX,OAAO,CAAC,GAAG,oBAAoB,KAAK,GAAG,YAAY;CACnD,MAAM;EACJ,MAAM,EACJ,UAAU,WACZ;EACA,OAAO;GACL,OAAO;GACP,UAAU;GACV,YAAY;GACZ,cAAc;GACd,aAAa;GACb,aAAa;GACb,YAAY;GACZ,YAAY;GACZ,OAAO;GACP,QAAQ;IACN,aAAa;IACb,UAAU,EACR,aAAa,eACf;GACF;GACA,UAAU,EACR,aAAa,eACf;GACA,mBAAmB,EACjB,OAAO,yBACT;GACA,WAAW;IACT,QAAQ,EACN,aAAa,kBACf;IACA,OAAO;IACP,YAAY;IACZ,QAAQ;GACV;GACA,WAAW;IACT,QAAQ,EACN,aAAa,gBACf;IACA,YAAY;IACZ,QAAQ;GACV;EACF;EACA,YAAY;GACV,UAAU;GACV,KAAK;GACL,OAAO;GACP,WAAW;GACX,eAAe;EACjB;EACA,WAAW;GACT,UAAU;GACV,KAAK;GACL,OAAO,IAAI,EAAE;GACb,WAAW;EACb;CACF;CACA,UAAU,EACR,MAAM;EACJ,IAAI,EACF,OAAO;GAAE,eAAe,IAAI,EAAE;GAAG,cAAc,IAAI,CAAC;GAAG,WAAW;EAAkB,EACtF;EACA,IAAI,EACF,OAAO;GAAE,eAAe,IAAI,EAAE;GAAG,cAAc,IAAI,EAAE;GAAG,WAAW;EAAkB,EACvF;CACF,EACF;CACA,iBAAiB,EACf,MAAM,KACR;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"NativeSelect.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/NativeSelect.recipe.ts"],"sourcesContent":["import { nativeSelectAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nimport { rem } from '../themeUtils';\n\nconst nativeSelectSlotRecipe = defineSlotRecipe({\n className: 'native-select',\n slots: [...nativeSelectAnatomy.keys(), 'statusIcon'],\n base: {\n root: {\n position: 'relative',\n },\n field: {\n width: '100%',\n minWidth: 0,\n appearance: 'none',\n cursor: 'pointer',\n borderRadius: '4',\n borderWidth: '1',\n borderColor: 'border/strong',\n background: 'background/primary',\n transition: '200ms',\n color: 'input/text/inputValue',\n _hover: {\n borderColor: 'border/hover',\n _invalid: {\n borderColor: 'border/error',\n },\n },\n _invalid: {\n borderColor: 'border/error',\n },\n _placeholderShown: {\n color: 'input/text/placeholder',\n },\n _disabled: {\n _hover: {\n borderColor: 'border/disabled',\n },\n color: 'text/disabled',\n background: 'background/disabled',\n cursor: 'not-allowed',\n },\n _readOnly: {\n _hover: {\n borderColor: 'border/strong',\n },\n background: 'background/disabled',\n cursor: 'default',\n },\n },\n statusIcon: {\n position: 'absolute',\n top: '50%',\n right: '48',\n transform: 'translateY(-50%)',\n pointerEvents: 'none',\n },\n indicator: {\n position: 'absolute',\n top: '50%',\n right: rem(15),\n transform: 'translateY(-50%)',\n },\n },\n variants: {\n size: {\n md: {\n field: { paddingInline: rem(11), paddingBlock: rem(9), textStyle: 'body/md/regular' },\n },\n lg: {\n field: { paddingInline: rem(15), paddingBlock: rem(11), textStyle: 'body/lg/regular' },\n },\n },\n },\n defaultVariants: {\n size: 'lg',\n },\n});\n\nexport default nativeSelectSlotRecipe;\n"],"mappings":";;;;AAKA,IAAM,yBAAyB,iBAAiB;CAC9C,WAAW;CACX,OAAO,CAAC,GAAG,oBAAoB,KAAK,GAAG,YAAY;CACnD,MAAM;EACJ,MAAM,EACJ,UAAU,WACZ;EACA,OAAO;GACL,OAAO;GACP,UAAU;GACV,YAAY;GACZ,QAAQ;GACR,cAAc;GACd,aAAa;GACb,aAAa;GACb,YAAY;GACZ,YAAY;GACZ,OAAO;GACP,QAAQ;IACN,aAAa;IACb,UAAU,EACR,aAAa,eACf;GACF;GACA,UAAU,EACR,aAAa,eACf;GACA,mBAAmB,EACjB,OAAO,yBACT;GACA,WAAW;IACT,QAAQ,EACN,aAAa,kBACf;IACA,OAAO;IACP,YAAY;IACZ,QAAQ;GACV;GACA,WAAW;IACT,QAAQ,EACN,aAAa,gBACf;IACA,YAAY;IACZ,QAAQ;GACV;EACF;EACA,YAAY;GACV,UAAU;GACV,KAAK;GACL,OAAO;GACP,WAAW;GACX,eAAe;EACjB;EACA,WAAW;GACT,UAAU;GACV,KAAK;GACL,OAAO,IAAI,EAAE;GACb,WAAW;EACb;CACF;CACA,UAAU,EACR,MAAM;EACJ,IAAI,EACF,OAAO;GAAE,eAAe,IAAI,EAAE;GAAG,cAAc,IAAI,CAAC;GAAG,WAAW;EAAkB,EACtF;EACA,IAAI,EACF,OAAO;GAAE,eAAe,IAAI,EAAE;GAAG,cAAc,IAAI,EAAE;GAAG,WAAW;EAAkB,EACvF;CACF,EACF;CACA,iBAAiB,EACf,MAAM,KACR;AACF,CAAC"}
|
|
@@ -40,6 +40,7 @@ var selectSlotRecipe = defineSlotRecipe({
|
|
|
40
40
|
paddingInlineEnd: "48",
|
|
41
41
|
paddingBlock: rem(11),
|
|
42
42
|
borderRadius: "4",
|
|
43
|
+
cursor: "pointer",
|
|
43
44
|
userSelect: "none",
|
|
44
45
|
textAlign: "start",
|
|
45
46
|
focusVisibleRing: "inside",
|
|
@@ -48,10 +49,14 @@ var selectSlotRecipe = defineSlotRecipe({
|
|
|
48
49
|
_placeholderShown: { color: "text/secondary" },
|
|
49
50
|
_disabled: {
|
|
50
51
|
color: "text/disabled",
|
|
51
|
-
background: "background/disabled"
|
|
52
|
+
background: "background/disabled",
|
|
53
|
+
cursor: "not-allowed"
|
|
52
54
|
},
|
|
53
55
|
_invalid: { borderColor: "border/error" },
|
|
54
|
-
_readOnly: {
|
|
56
|
+
_readOnly: {
|
|
57
|
+
background: "background/disabled",
|
|
58
|
+
cursor: "default"
|
|
59
|
+
}
|
|
55
60
|
},
|
|
56
61
|
indicatorGroup: {
|
|
57
62
|
display: "flex",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/Select.recipe.ts"],"sourcesContent":["import { selectAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nimport { base, variants } from '../common/ComboboxAndSelect.common';\nimport { rem } from '../themeUtils';\n\nexport const selectSlotRecipe = defineSlotRecipe({\n className: 'select',\n slots: [\n ...selectAnatomy.keys(),\n 'searchInputGroup',\n 'searchInput',\n 'searchClear',\n 'actionContainer',\n 'action',\n 'checkbox',\n 'checkmark',\n 'itemList',\n 'itemContent',\n 'itemBadge',\n 'itemIcon',\n 'valueIcon',\n 'avatar',\n 'itemLabel',\n 'itemHelperText',\n 'itemLoading',\n 'itemLoadingLabel',\n 'emptyState',\n ],\n base: {\n trigger: {\n display: 'flex',\n alignItems: 'center',\n borderWidth: '1',\n borderColor: 'border/strong',\n background: 'bg.muted',\n color: 'input/text/inputValue',\n gap: '8',\n justifyContent: 'space-between',\n // 15px + the 1px border = the spec's 16px, measured from the trigger's outer edge.\n // The indicator group below is offset the same way on the end side.\n paddingInlineStart: rem(15),\n paddingInlineEnd: '48',\n paddingBlock: rem(11),\n borderRadius: '4',\n userSelect: 'none',\n textAlign: 'start',\n focusVisibleRing: 'inside',\n width: '100%',\n _open: {\n borderColor: 'border/focus',\n },\n _placeholderShown: {\n color: 'text/secondary',\n },\n _disabled: {\n color: 'text/disabled',\n background: 'background/disabled',\n },\n _invalid: {\n borderColor: 'border/error',\n },\n _readOnly: {\n background: 'background/disabled',\n },\n },\n indicatorGroup: {\n display: 'flex',\n alignItems: 'center',\n gap: '8',\n position: 'absolute',\n insetEnd: 0,\n top: 0,\n bottom: 0,\n paddingInlineStart: '16',\n paddingInlineEnd: rem(15),\n pointerEvents: 'none',\n },\n indicator: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n color: 'icon/secondary',\n _disabled: {\n color: 'icon/disabled',\n },\n _readOnly: {\n color: 'icon/on-disabled',\n },\n },\n ...base,\n content: {\n ...base.content,\n overflow: 'hidden',\n display: 'flex',\n flexDirection: 'column',\n // Zag's popper sets `--reference-width` (the trigger width) on the positioner, so the\n // menu is never narrower than the Select input — but can grow wider for long items.\n minWidth: 'var(--reference-width)',\n maxWidth: rem(800),\n focusVisibleRing: 'none',\n },\n item: {\n ...base.item,\n _active: {\n background: 'background/active',\n },\n _selected: {\n background: 'background/selected',\n _highlighted: {\n background: 'background/selected-hover',\n },\n },\n _disabled: {\n cursor: 'not-allowed',\n color: 'text/disabled',\n _highlighted: {\n background: 'transparent',\n },\n },\n },\n control: {\n position: 'relative',\n width: '100%',\n },\n valueText: {\n display: 'flex',\n alignItems: 'center',\n gap: '8',\n flex: '1 1 0',\n minWidth: 0,\n overflow: 'hidden',\n },\n itemList: {\n flex: '1 1 auto',\n minHeight: 0,\n overflowY: 'auto',\n paddingBlock: '8',\n },\n itemContent: {\n display: 'flex',\n flexDirection: 'column',\n flex: '1 0 0',\n minWidth: 0,\n },\n itemBadge: {\n display: 'inline-flex',\n flexShrink: 0,\n },\n itemLoading: {\n flexShrink: 0,\n },\n itemLoadingLabel: {\n color: 'text/secondary',\n flex: '1 0 0',\n minWidth: 0,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n },\n emptyState: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'flex-start',\n paddingInline: '16',\n },\n itemIcon: {\n color: 'icon/secondary',\n '[data-state=\"checked\"] &': {\n color: 'icon/interactive',\n },\n },\n // The selected value's icon in the trigger. Mirrors the `indicator` (chevron) state colors —\n // the trigger exposes `data-disabled` / `data-readonly`, so the icon reacts via ancestors.\n valueIcon: {\n color: 'icon/secondary',\n '[data-disabled] &': { color: 'icon/disabled' },\n '[data-readonly] &': { color: 'icon/on-disabled' },\n },\n avatar: {\n flexShrink: 0,\n '[data-disabled] &': { opacity: 0.5 },\n },\n itemLabel: {\n color: 'text/body',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n maxWidth: '100%',\n minWidth: 0,\n '[data-disabled] &': {\n color: 'text/disabled',\n },\n },\n itemHelperText: {\n color: 'text/helper',\n textStyle: 'body/sm/regular',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n maxWidth: '100%',\n minWidth: 0,\n '[data-disabled] &': {\n color: 'text/disabled',\n },\n },\n checkbox: {\n position: 'relative',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n flexShrink: 0,\n borderWidth: '1',\n borderColor: 'border/regular',\n borderRadius: '4',\n background: 'background/primary',\n boxShadow: 'inset/field',\n color: 'icon/on-color',\n '[data-state=checked] &': {\n background: 'input/checkbox/selection',\n borderColor: 'input/checkbox/selection',\n boxShadow: 'none',\n },\n '[data-disabled] &': {\n background: 'background/disabled',\n borderColor: 'border/disabled',\n },\n },\n checkmark: {\n opacity: 0,\n color: 'icon/on-color',\n '[data-state=checked] &': {\n opacity: 1,\n },\n },\n searchInputGroup: {\n borderBottom: '1px solid',\n borderColor: 'border/minimal',\n background: 'background/primary',\n display: 'flex',\n alignItems: 'center',\n gap: '12',\n paddingInlineStart: '16',\n paddingInlineEnd: '12',\n overflow: 'hidden',\n flexShrink: 0,\n _hover: {\n background: 'background/secondary',\n },\n _focusWithin: {\n background: 'background/primary',\n },\n },\n searchInput: {\n flex: '1 0 0',\n minWidth: 0,\n border: 'none',\n outline: 'none',\n background: 'transparent',\n color: 'input/text/inputValue',\n paddingInline: 0,\n paddingBlock: 0,\n _placeholder: {\n color: 'input/text/placeholder',\n },\n },\n searchClear: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: '4',\n color: 'icon/primary',\n cursor: 'pointer',\n flexShrink: 0,\n _hover: {\n background: 'background/hover',\n },\n },\n actionContainer: {\n borderTop: '1px solid',\n borderColor: 'border/minimal',\n paddingBlock: '8',\n flexShrink: 0,\n },\n action: {\n display: 'flex',\n alignItems: 'center',\n gap: '12',\n paddingInlineEnd: '24',\n paddingInlineStart: '16',\n color: 'text/primary',\n width: '100%',\n cursor: 'pointer',\n textAlign: 'start',\n _icon: {\n color: 'icon/secondary',\n },\n _hover: {\n background: 'button/secondary/bg-hover',\n _active: {\n background: 'button/secondary/bg-active',\n },\n },\n _active: {\n background: 'button/secondary/bg-active',\n },\n _focusVisible: {\n outlineOffset: '-3px',\n },\n },\n },\n\n variants: {\n hasStatusIcon: {\n true: {\n trigger: {\n paddingInlineEnd: '96',\n },\n },\n false: {},\n },\n size: {\n lg: {\n ...variants.size.lg,\n trigger: {\n '&:has([data-slot=\"avatar\"])': { paddingBlock: rem(7), paddingInlineStart: rem(11) },\n },\n checkbox: {\n width: '24',\n height: '24',\n },\n item: {\n ...variants.size.lg.item,\n '&:has([data-slot=\"avatar\"])': {\n paddingInlineStart: '12',\n paddingInlineEnd: '24',\n paddingBlock: '8',\n gap: '8',\n },\n '&:has([data-slot=\"checkbox\"])': {\n minHeight: '48',\n paddingInlineEnd: '24',\n paddingBlock: '12',\n gap: '12',\n },\n },\n itemList: {\n // 5.5 × 48px item + 16px paddingBlock\n maxHeight: rem(280),\n },\n itemLabel: {\n textStyle: 'body/lg/regular',\n lineHeight: 'normal',\n },\n itemLoadingLabel: {\n textStyle: 'body/lg/regular',\n },\n emptyState: {\n paddingBlock: '12',\n },\n action: {\n minHeight: '48',\n paddingBlock: '12',\n textStyle: 'body/lg/regular',\n lineHeight: 'normal',\n },\n searchInputGroup: {\n height: rem(56),\n paddingBlock: '16',\n },\n searchInput: {\n textStyle: 'body/lg/regular',\n },\n searchClear: {\n padding: '8',\n },\n },\n md: {\n ...variants.size.md,\n checkbox: {\n width: '20',\n height: '20',\n },\n item: {\n ...variants.size.md.item,\n '&:has([data-slot=\"avatar\"])': {\n paddingInlineStart: '12',\n paddingInlineEnd: '24',\n paddingBlock: '4',\n gap: '8',\n },\n '&:has([data-slot=\"checkbox\"])': {\n minHeight: '40',\n paddingInlineEnd: '24',\n paddingBlock: '8',\n gap: '12',\n },\n },\n itemList: {\n // 5.5 × 40px item (checkbox/avatar row) + 16px paddingBlock\n maxHeight: rem(236),\n },\n itemLabel: {\n textStyle: 'body/md/regular',\n lineHeight: 'normal',\n },\n itemLoadingLabel: {\n textStyle: 'body/md/regular',\n },\n emptyState: {\n paddingBlock: '8',\n },\n action: {\n minHeight: '40',\n paddingBlock: '8',\n textStyle: 'body/md/regular',\n lineHeight: 'normal',\n },\n trigger: {\n textStyle: 'body/md/regular',\n paddingBlock: rem(9),\n '&:has([data-slot=\"avatar\"])': { paddingBlock: rem(7), paddingInlineStart: rem(11) },\n },\n searchInputGroup: {\n height: '48',\n paddingBlock: '12',\n },\n searchInput: {\n textStyle: 'body/md/regular',\n },\n searchClear: {\n padding: '4',\n },\n },\n },\n },\n defaultVariants: {\n size: 'lg',\n },\n});\n"],"mappings":";;;;;AAMA,IAAa,mBAAmB,iBAAiB;CAC/C,WAAW;CACX,OAAO;EACL,GAAG,cAAc,KAAK;EACtB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,MAAM;EACJ,SAAS;GACP,SAAS;GACT,YAAY;GACZ,aAAa;GACb,aAAa;GACb,YAAY;GACZ,OAAO;GACP,KAAK;GACL,gBAAgB;GAGhB,oBAAoB,I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G,SAAS,KAAK,GAAG;KACpB,iCAA+B;MAC7B,oBAAoB;MACpB,kBAAkB;MAClB,cAAc;MACd,KAAK;KACP;KACA,mCAAiC;MAC/B,WAAW;MACX,kBAAkB;MAClB,cAAc;MACd,KAAK;KACP;IACF;IACA,UAAU,EAER,WAAW,IAAI,GAAG,EACpB;IACA,WAAW;KACT,WAAW;KACX,YAAY;IACd;IACA,kBAAkB,EAChB,WAAW,kBACb;IACA,YAAY,EACV,cAAc,IAChB;IACA,QAAQ;KACN,WAAW;KACX,cAAc;KACd,WAAW;KACX,YAAY;IACd;IACA,SAAS;KACP,WAAW;KACX,cAAc,IAAI,CAAC;KACnB,iCAA+B;MAAE,cAAc,IAAI,CAAC;MAAG,oBAAoB,IAAI,EAAE;KAAE;IACrF;IACA,kBAAkB;KAChB,QAAQ;KACR,cAAc;IAChB;IACA,aAAa,EACX,WAAW,kBACb;IACA,aAAa,EACX,SAAS,IACX;GACF;EACF;CACF;CACA,iBAAiB,EACf,MAAM,KACR;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"Select.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/Select.recipe.ts"],"sourcesContent":["import { selectAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nimport { base, variants } from '../common/ComboboxAndSelect.common';\nimport { rem } from '../themeUtils';\n\nexport const selectSlotRecipe = defineSlotRecipe({\n className: 'select',\n slots: [\n ...selectAnatomy.keys(),\n 'searchInputGroup',\n 'searchInput',\n 'searchClear',\n 'actionContainer',\n 'action',\n 'checkbox',\n 'checkmark',\n 'itemList',\n 'itemContent',\n 'itemBadge',\n 'itemIcon',\n 'valueIcon',\n 'avatar',\n 'itemLabel',\n 'itemHelperText',\n 'itemLoading',\n 'itemLoadingLabel',\n 'emptyState',\n ],\n base: {\n trigger: {\n display: 'flex',\n alignItems: 'center',\n borderWidth: '1',\n borderColor: 'border/strong',\n background: 'bg.muted',\n color: 'input/text/inputValue',\n gap: '8',\n justifyContent: 'space-between',\n // 15px + the 1px border = the spec's 16px, measured from the trigger's outer edge.\n // The indicator group below is offset the same way on the end side.\n paddingInlineStart: rem(15),\n paddingInlineEnd: '48',\n paddingBlock: rem(11),\n borderRadius: '4',\n cursor: 'pointer',\n userSelect: 'none',\n textAlign: 'start',\n focusVisibleRing: 'inside',\n width: '100%',\n _open: {\n borderColor: 'border/focus',\n },\n _placeholderShown: {\n color: 'text/secondary',\n },\n _disabled: {\n color: 'text/disabled',\n background: 'background/disabled',\n cursor: 'not-allowed',\n },\n _invalid: {\n borderColor: 'border/error',\n },\n _readOnly: {\n background: 'background/disabled',\n cursor: 'default',\n },\n },\n indicatorGroup: {\n display: 'flex',\n alignItems: 'center',\n gap: '8',\n position: 'absolute',\n insetEnd: 0,\n top: 0,\n bottom: 0,\n paddingInlineStart: '16',\n paddingInlineEnd: rem(15),\n pointerEvents: 'none',\n },\n indicator: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n color: 'icon/secondary',\n _disabled: {\n color: 'icon/disabled',\n },\n _readOnly: {\n color: 'icon/on-disabled',\n },\n },\n ...base,\n content: {\n ...base.content,\n overflow: 'hidden',\n display: 'flex',\n flexDirection: 'column',\n // Zag's popper sets `--reference-width` (the trigger width) on the positioner, so the\n // menu is never narrower than the Select input — but can grow wider for long items.\n minWidth: 'var(--reference-width)',\n maxWidth: rem(800),\n focusVisibleRing: 'none',\n },\n item: {\n ...base.item,\n _active: {\n background: 'background/active',\n },\n _selected: {\n background: 'background/selected',\n _highlighted: {\n background: 'background/selected-hover',\n },\n },\n _disabled: {\n cursor: 'not-allowed',\n color: 'text/disabled',\n _highlighted: {\n background: 'transparent',\n },\n },\n },\n control: {\n position: 'relative',\n width: '100%',\n },\n valueText: {\n display: 'flex',\n alignItems: 'center',\n gap: '8',\n flex: '1 1 0',\n minWidth: 0,\n overflow: 'hidden',\n },\n itemList: {\n flex: '1 1 auto',\n minHeight: 0,\n overflowY: 'auto',\n paddingBlock: '8',\n },\n itemContent: {\n display: 'flex',\n flexDirection: 'column',\n flex: '1 0 0',\n minWidth: 0,\n },\n itemBadge: {\n display: 'inline-flex',\n flexShrink: 0,\n },\n itemLoading: {\n flexShrink: 0,\n },\n itemLoadingLabel: {\n color: 'text/secondary',\n flex: '1 0 0',\n minWidth: 0,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n },\n emptyState: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'flex-start',\n paddingInline: '16',\n },\n itemIcon: {\n color: 'icon/secondary',\n '[data-state=\"checked\"] &': {\n color: 'icon/interactive',\n },\n },\n // The selected value's icon in the trigger. Mirrors the `indicator` (chevron) state colors —\n // the trigger exposes `data-disabled` / `data-readonly`, so the icon reacts via ancestors.\n valueIcon: {\n color: 'icon/secondary',\n '[data-disabled] &': { color: 'icon/disabled' },\n '[data-readonly] &': { color: 'icon/on-disabled' },\n },\n avatar: {\n flexShrink: 0,\n '[data-disabled] &': { opacity: 0.5 },\n },\n itemLabel: {\n color: 'text/body',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n maxWidth: '100%',\n minWidth: 0,\n '[data-disabled] &': {\n color: 'text/disabled',\n },\n },\n itemHelperText: {\n color: 'text/helper',\n textStyle: 'body/sm/regular',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n maxWidth: '100%',\n minWidth: 0,\n '[data-disabled] &': {\n color: 'text/disabled',\n },\n },\n checkbox: {\n position: 'relative',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n flexShrink: 0,\n borderWidth: '1',\n borderColor: 'border/regular',\n borderRadius: '4',\n background: 'background/primary',\n boxShadow: 'inset/field',\n color: 'icon/on-color',\n '[data-state=checked] &': {\n background: 'input/checkbox/selection',\n borderColor: 'input/checkbox/selection',\n boxShadow: 'none',\n },\n '[data-disabled] &': {\n background: 'background/disabled',\n borderColor: 'border/disabled',\n },\n },\n checkmark: {\n opacity: 0,\n color: 'icon/on-color',\n '[data-state=checked] &': {\n opacity: 1,\n },\n },\n searchInputGroup: {\n borderBottom: '1px solid',\n borderColor: 'border/minimal',\n background: 'background/primary',\n display: 'flex',\n alignItems: 'center',\n gap: '12',\n paddingInlineStart: '16',\n paddingInlineEnd: '12',\n overflow: 'hidden',\n flexShrink: 0,\n _hover: {\n background: 'background/secondary',\n },\n _focusWithin: {\n background: 'background/primary',\n },\n },\n searchInput: {\n flex: '1 0 0',\n minWidth: 0,\n border: 'none',\n outline: 'none',\n background: 'transparent',\n color: 'input/text/inputValue',\n paddingInline: 0,\n paddingBlock: 0,\n _placeholder: {\n color: 'input/text/placeholder',\n },\n },\n searchClear: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: '4',\n color: 'icon/primary',\n cursor: 'pointer',\n flexShrink: 0,\n _hover: {\n background: 'background/hover',\n },\n },\n actionContainer: {\n borderTop: '1px solid',\n borderColor: 'border/minimal',\n paddingBlock: '8',\n flexShrink: 0,\n },\n action: {\n display: 'flex',\n alignItems: 'center',\n gap: '12',\n paddingInlineEnd: '24',\n paddingInlineStart: '16',\n color: 'text/primary',\n width: '100%',\n cursor: 'pointer',\n textAlign: 'start',\n _icon: {\n color: 'icon/secondary',\n },\n _hover: {\n background: 'button/secondary/bg-hover',\n _active: {\n background: 'button/secondary/bg-active',\n },\n },\n _active: {\n background: 'button/secondary/bg-active',\n },\n _focusVisible: {\n outlineOffset: '-3px',\n },\n },\n },\n\n variants: {\n hasStatusIcon: {\n true: {\n trigger: {\n paddingInlineEnd: '96',\n },\n },\n false: {},\n },\n size: {\n lg: {\n ...variants.size.lg,\n trigger: {\n '&:has([data-slot=\"avatar\"])': { paddingBlock: rem(7), paddingInlineStart: rem(11) },\n },\n checkbox: {\n width: '24',\n height: '24',\n },\n item: {\n ...variants.size.lg.item,\n '&:has([data-slot=\"avatar\"])': {\n paddingInlineStart: '12',\n paddingInlineEnd: '24',\n paddingBlock: '8',\n gap: '8',\n },\n '&:has([data-slot=\"checkbox\"])': {\n minHeight: '48',\n paddingInlineEnd: '24',\n paddingBlock: '12',\n gap: '12',\n },\n },\n itemList: {\n // 5.5 × 48px item + 16px paddingBlock\n maxHeight: rem(280),\n },\n itemLabel: {\n textStyle: 'body/lg/regular',\n lineHeight: 'normal',\n },\n itemLoadingLabel: {\n textStyle: 'body/lg/regular',\n },\n emptyState: {\n paddingBlock: '12',\n },\n action: {\n minHeight: '48',\n paddingBlock: '12',\n textStyle: 'body/lg/regular',\n lineHeight: 'normal',\n },\n searchInputGroup: {\n height: rem(56),\n paddingBlock: '16',\n },\n searchInput: {\n textStyle: 'body/lg/regular',\n },\n searchClear: {\n padding: '8',\n },\n },\n md: {\n ...variants.size.md,\n checkbox: {\n width: '20',\n height: '20',\n },\n item: {\n ...variants.size.md.item,\n '&:has([data-slot=\"avatar\"])': {\n paddingInlineStart: '12',\n paddingInlineEnd: '24',\n paddingBlock: '4',\n gap: '8',\n },\n '&:has([data-slot=\"checkbox\"])': {\n minHeight: '40',\n paddingInlineEnd: '24',\n paddingBlock: '8',\n gap: '12',\n },\n },\n itemList: {\n // 5.5 × 40px item (checkbox/avatar row) + 16px paddingBlock\n maxHeight: rem(236),\n },\n itemLabel: {\n textStyle: 'body/md/regular',\n lineHeight: 'normal',\n },\n itemLoadingLabel: {\n textStyle: 'body/md/regular',\n },\n emptyState: {\n paddingBlock: '8',\n },\n action: {\n minHeight: '40',\n paddingBlock: '8',\n textStyle: 'body/md/regular',\n lineHeight: 'normal',\n },\n trigger: {\n textStyle: 'body/md/regular',\n paddingBlock: rem(9),\n '&:has([data-slot=\"avatar\"])': { paddingBlock: rem(7), paddingInlineStart: rem(11) },\n },\n searchInputGroup: {\n height: '48',\n paddingBlock: '12',\n },\n searchInput: {\n textStyle: 'body/md/regular',\n },\n searchClear: {\n padding: '4',\n },\n },\n },\n },\n defaultVariants: {\n size: 'lg',\n },\n});\n"],"mappings":";;;;;AAM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