@raystack/apsara 0.46.0-rc.2 → 0.46.0-rc.3

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.
Files changed (120) hide show
  1. package/dist/box/box.cjs +3 -0
  2. package/dist/box/box.cjs.map +1 -1
  3. package/dist/box/box.d.ts +3 -0
  4. package/dist/box/box.d.ts.map +1 -1
  5. package/dist/box/box.js +3 -0
  6. package/dist/box/box.js.map +1 -1
  7. package/dist/node_modules/.pnpm/@radix-ui_react-select@2.2.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-select/dist/index.cjs +2 -0
  8. package/dist/node_modules/.pnpm/@radix-ui_react-select@2.2.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-select/dist/index.cjs.map +1 -1
  9. package/dist/node_modules/.pnpm/@radix-ui_react-select@2.2.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-select/dist/index.js +2 -1
  10. package/dist/node_modules/.pnpm/@radix-ui_react-select@2.2.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-select/dist/index.js.map +1 -1
  11. package/dist/style.css +1 -1
  12. package/dist/v1/components/avatar/avatar.cjs +84 -49
  13. package/dist/v1/components/avatar/avatar.cjs.map +1 -1
  14. package/dist/v1/components/avatar/avatar.d.ts +4 -4
  15. package/dist/v1/components/avatar/avatar.d.ts.map +1 -1
  16. package/dist/v1/components/avatar/avatar.js +84 -49
  17. package/dist/v1/components/avatar/avatar.js.map +1 -1
  18. package/dist/v1/components/calendar/calendar.cjs +11 -11
  19. package/dist/v1/components/calendar/calendar.cjs.map +1 -1
  20. package/dist/v1/components/calendar/calendar.d.ts.map +1 -1
  21. package/dist/v1/components/calendar/calendar.js +9 -9
  22. package/dist/v1/components/calendar/calendar.js.map +1 -1
  23. package/dist/v1/components/calendar/date-picker.cjs +1 -1
  24. package/dist/v1/components/calendar/date-picker.cjs.map +1 -1
  25. package/dist/v1/components/calendar/date-picker.js +1 -1
  26. package/dist/v1/components/calendar/date-picker.js.map +1 -1
  27. package/dist/v1/components/calendar/range-picker.cjs +2 -2
  28. package/dist/v1/components/calendar/range-picker.cjs.map +1 -1
  29. package/dist/v1/components/calendar/range-picker.js +2 -2
  30. package/dist/v1/components/calendar/range-picker.js.map +1 -1
  31. package/dist/v1/components/filter-chip/filter-chip.cjs +3 -1
  32. package/dist/v1/components/filter-chip/filter-chip.cjs.map +1 -1
  33. package/dist/v1/components/filter-chip/filter-chip.js +3 -1
  34. package/dist/v1/components/filter-chip/filter-chip.js.map +1 -1
  35. package/dist/v1/components/grid/grid-item.cjs +25 -0
  36. package/dist/v1/components/grid/grid-item.cjs.map +1 -0
  37. package/dist/v1/components/grid/grid-item.d.ts +15 -0
  38. package/dist/v1/components/grid/grid-item.d.ts.map +1 -0
  39. package/dist/v1/components/grid/grid-item.js +23 -0
  40. package/dist/v1/components/grid/grid-item.js.map +1 -0
  41. package/dist/v1/components/grid/grid.cjs +48 -0
  42. package/dist/v1/components/grid/grid.cjs.map +1 -0
  43. package/dist/v1/components/grid/grid.d.ts +45 -0
  44. package/dist/v1/components/grid/grid.d.ts.map +1 -0
  45. package/dist/v1/components/grid/grid.js +46 -0
  46. package/dist/v1/components/grid/grid.js.map +1 -0
  47. package/dist/v1/components/grid/index.cjs +11 -0
  48. package/dist/v1/components/grid/index.cjs.map +1 -0
  49. package/dist/v1/components/grid/index.d.ts +31 -0
  50. package/dist/v1/components/grid/index.d.ts.map +1 -0
  51. package/dist/v1/components/grid/index.js +9 -0
  52. package/dist/v1/components/grid/index.js.map +1 -0
  53. package/dist/v1/components/grid/types.d.ts +3 -0
  54. package/dist/v1/components/grid/types.d.ts.map +1 -0
  55. package/dist/v1/components/select/select-content.cjs +10 -3
  56. package/dist/v1/components/select/select-content.cjs.map +1 -1
  57. package/dist/v1/components/select/select-content.d.ts +4 -1
  58. package/dist/v1/components/select/select-content.d.ts.map +1 -1
  59. package/dist/v1/components/select/select-content.js +10 -3
  60. package/dist/v1/components/select/select-content.js.map +1 -1
  61. package/dist/v1/components/select/select-item.cjs +15 -3
  62. package/dist/v1/components/select/select-item.cjs.map +1 -1
  63. package/dist/v1/components/select/select-item.d.ts +1 -1
  64. package/dist/v1/components/select/select-item.d.ts.map +1 -1
  65. package/dist/v1/components/select/select-item.js +16 -4
  66. package/dist/v1/components/select/select-item.js.map +1 -1
  67. package/dist/v1/components/select/select-misc.cjs +35 -0
  68. package/dist/v1/components/select/select-misc.cjs.map +1 -0
  69. package/dist/v1/components/select/select-misc.d.ts +5 -0
  70. package/dist/v1/components/select/select-misc.d.ts.map +1 -0
  71. package/dist/v1/components/select/select-misc.js +31 -0
  72. package/dist/v1/components/select/select-misc.js.map +1 -0
  73. package/dist/v1/components/select/select-root.cjs +28 -5
  74. package/dist/v1/components/select/select-root.cjs.map +1 -1
  75. package/dist/v1/components/select/select-root.d.ts +40 -3
  76. package/dist/v1/components/select/select-root.d.ts.map +1 -1
  77. package/dist/v1/components/select/select-root.js +28 -5
  78. package/dist/v1/components/select/select-root.js.map +1 -1
  79. package/dist/v1/components/select/select-trigger.cjs.map +1 -1
  80. package/dist/v1/components/select/select-trigger.d.ts +3 -4
  81. package/dist/v1/components/select/select-trigger.d.ts.map +1 -1
  82. package/dist/v1/components/select/select-trigger.js.map +1 -1
  83. package/dist/v1/components/select/select.cjs +4 -2
  84. package/dist/v1/components/select/select.cjs.map +1 -1
  85. package/dist/v1/components/select/select.d.ts +5 -6
  86. package/dist/v1/components/select/select.d.ts.map +1 -1
  87. package/dist/v1/components/select/select.js +5 -3
  88. package/dist/v1/components/select/select.js.map +1 -1
  89. package/dist/v1/components/select/select.module.css.cjs +1 -1
  90. package/dist/v1/components/select/select.module.css.js +1 -1
  91. package/dist/v1/components/sidebar/sidebar.cjs +20 -6
  92. package/dist/v1/components/sidebar/sidebar.cjs.map +1 -1
  93. package/dist/v1/components/sidebar/sidebar.d.ts +2 -1
  94. package/dist/v1/components/sidebar/sidebar.d.ts.map +1 -1
  95. package/dist/v1/components/sidebar/sidebar.js +21 -7
  96. package/dist/v1/components/sidebar/sidebar.js.map +1 -1
  97. package/dist/v1/components/skeleton/index.d.ts +2 -0
  98. package/dist/v1/components/skeleton/index.d.ts.map +1 -0
  99. package/dist/v1/components/skeleton/skeleton.cjs +36 -0
  100. package/dist/v1/components/skeleton/skeleton.cjs.map +1 -0
  101. package/dist/v1/components/skeleton/skeleton.d.ts +24 -0
  102. package/dist/v1/components/skeleton/skeleton.d.ts.map +1 -0
  103. package/dist/v1/components/skeleton/skeleton.js +34 -0
  104. package/dist/v1/components/skeleton/skeleton.js.map +1 -0
  105. package/dist/v1/components/skeleton/skeleton.module.css.cjs +8 -0
  106. package/dist/v1/components/skeleton/skeleton.module.css.cjs.map +1 -0
  107. package/dist/v1/components/skeleton/skeleton.module.css.js +4 -0
  108. package/dist/v1/components/skeleton/skeleton.module.css.js.map +1 -0
  109. package/dist/v1/index.cjs +4 -0
  110. package/dist/v1/index.cjs.map +1 -1
  111. package/dist/v1/index.d.ts +2 -0
  112. package/dist/v1/index.d.ts.map +1 -1
  113. package/dist/v1/index.js +2 -0
  114. package/dist/v1/index.js.map +1 -1
  115. package/dist/v1/node_modules/.pnpm/@radix-ui_react-select@2.2.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-select/dist/index.cjs +2 -0
  116. package/dist/v1/node_modules/.pnpm/@radix-ui_react-select@2.2.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-select/dist/index.cjs.map +1 -1
  117. package/dist/v1/node_modules/.pnpm/@radix-ui_react-select@2.2.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-select/dist/index.js +2 -1
  118. package/dist/v1/node_modules/.pnpm/@radix-ui_react-select@2.2.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-select/dist/index.js.map +1 -1
  119. package/dist/v1/style.css +1 -1
  120. package/package.json +1 -1
@@ -1,13 +1,15 @@
1
1
  import { j as jsxRuntimeExports } from '../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js';
2
2
  import { forwardRef, useEffect } from 'react';
3
- import { Item, ItemText } from '../../node_modules/.pnpm/@radix-ui_react-select@2.2.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-select/dist/index.js';
3
+ import { ItemText, Item } from '../../node_modules/.pnpm/@radix-ui_react-select@2.2.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-select/dist/index.js';
4
+ import { ComboboxItem } from '../../node_modules/.pnpm/@ariakit_react-core@0.4.16_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@ariakit/react-core/esm/__chunks/JMHAJKUZ.js';
4
5
  import { cx } from '../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js';
5
6
  import styles from './select.module.css.js';
6
7
  import { Text } from '../text/text.js';
7
8
  import { useSelectContext } from './select-root.js';
9
+ import { getMatch } from '../dropdown-menu/utils.js';
8
10
 
9
- const SelectItem = forwardRef(({ className, textProps = {}, children, value, leadingIcon, ...props }, ref) => {
10
- const { registerIcon, unregisterIcon } = useSelectContext();
11
+ const SelectItem = forwardRef(({ className, textProps = {}, children, value, leadingIcon, disabled, ...props }, ref) => {
12
+ const { registerIcon, unregisterIcon, autocomplete, searchValue, value: selectValue, shouldFilter, } = useSelectContext();
11
13
  useEffect(() => {
12
14
  if (!leadingIcon)
13
15
  return;
@@ -16,7 +18,17 @@ const SelectItem = forwardRef(({ className, textProps = {}, children, value, lea
16
18
  unregisterIcon(value);
17
19
  };
18
20
  }, [value, leadingIcon]);
19
- return (jsxRuntimeExports.jsxs(Item, { ref: ref, value: value, className: cx(styles.menuitem, className), ...props, children: [leadingIcon && jsxRuntimeExports.jsx("div", { className: styles.itemIcon, children: leadingIcon }), jsxRuntimeExports.jsx(ItemText, { children: jsxRuntimeExports.jsx(Text, { ...textProps, children: children }) })] }));
21
+ const isSelected = value === selectValue.value;
22
+ const isMatched = getMatch(value, children, searchValue);
23
+ const isHidden = shouldFilter && isSelected && !isMatched;
24
+ if (shouldFilter && !isMatched && !isSelected) {
25
+ // Not selected and doesn't match search, so don't render at all
26
+ return null;
27
+ }
28
+ const element = (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [leadingIcon && jsxRuntimeExports.jsx("div", { className: styles.itemIcon, children: leadingIcon }), jsxRuntimeExports.jsx(ItemText, { children: jsxRuntimeExports.jsx(Text, { ...textProps, children: children }) })] }));
29
+ return (jsxRuntimeExports.jsx(Item, { ref: ref, value: value, className: cx(styles.menuitem, className, isHidden && styles.hidden), "data-hidden": isHidden, disabled: disabled || isHidden, asChild: autocomplete, ...props, children: autocomplete ? (jsxRuntimeExports.jsx(ComboboxItem, { onBlurCapture: event => {
30
+ event.preventDefault();
31
+ }, children: element })) : (element) }));
20
32
  });
21
33
  SelectItem.displayName = Item.displayName;
22
34
 
@@ -1 +1 @@
1
- {"version":3,"file":"select-item.js","sources":["../../../../v1/components/select/select-item.tsx"],"sourcesContent":["import {\n ComponentPropsWithoutRef,\n ElementRef,\n forwardRef,\n useEffect,\n} from \"react\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { cx } from \"class-variance-authority\";\nimport styles from \"./select.module.css\";\nimport { Text, TextProps } from \"../text\";\nimport { useSelectContext } from \"./select-root\";\n\nexport const SelectItem = forwardRef<\n ElementRef<typeof SelectPrimitive.Item>,\n ComponentPropsWithoutRef<typeof SelectPrimitive.Item> & {\n textProps?: TextProps;\n leadingIcon?: React.ReactNode;\n }\n>(\n (\n { className, textProps = {}, children, value, leadingIcon, ...props },\n ref,\n ) => {\n const { registerIcon, unregisterIcon } = useSelectContext();\n\n useEffect(() => {\n if (!leadingIcon) return;\n\n registerIcon(value, leadingIcon);\n return () => {\n unregisterIcon(value);\n };\n }, [value, leadingIcon]);\n\n return (\n <SelectPrimitive.Item\n ref={ref}\n value={value}\n className={cx(styles.menuitem, className)}\n {...props}>\n {leadingIcon && <div className={styles.itemIcon}>{leadingIcon}</div>}\n <SelectPrimitive.ItemText>\n <Text {...textProps}>{children}</Text>\n </SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n },\n);\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n"],"names":["_jsxs","SelectPrimitive.Item","_jsx","SelectPrimitive.ItemText"],"mappings":";;;;;;;;AAYa,MAAA,UAAU,GAAG,UAAU,CAOlC,CACE,EAAE,SAAS,EAAE,SAAS,GAAG,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,EACrE,GAAG,KACD;IACF,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,gBAAgB,EAAE,CAAC;IAE5D,SAAS,CAAC,MAAK;AACb,QAAA,IAAI,CAAC,WAAW;YAAE,OAAO;AAEzB,QAAA,YAAY,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;AACjC,QAAA,OAAO,MAAK;YACV,cAAc,CAAC,KAAK,CAAC,CAAC;AACxB,SAAC,CAAC;AACJ,KAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC;IAEzB,QACEA,sBAAC,CAAAC,IAAoB,IACnB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAA,GACrC,KAAK,EAAA,QAAA,EAAA,CACR,WAAW,IAAIC,qBAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAG,QAAA,EAAA,WAAW,EAAO,CAAA,EACpEA,qBAAC,CAAAC,QAAwB,EAAA,EAAA,QAAA,EACvBD,qBAAC,CAAA,IAAI,EAAK,EAAA,GAAA,SAAS,EAAG,QAAA,EAAA,QAAQ,EAAQ,CAAA,EAAA,CACb,CACN,EAAA,CAAA,EACvB;AACJ,CAAC,EACD;AACF,UAAU,CAAC,WAAW,GAAGD,IAAoB,CAAC,WAAW;;;;"}
1
+ {"version":3,"file":"select-item.js","sources":["../../../../v1/components/select/select-item.tsx"],"sourcesContent":["import { ElementRef, forwardRef, useEffect } from \"react\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { ComboboxItem } from \"@ariakit/react\";\nimport { cx } from \"class-variance-authority\";\nimport styles from \"./select.module.css\";\nimport { Text, TextProps } from \"../text\";\nimport { useSelectContext } from \"./select-root\";\nimport { getMatch } from \"../dropdown-menu/utils\";\n\nexport const SelectItem = forwardRef<\n ElementRef<typeof SelectPrimitive.Item>,\n Omit<SelectPrimitive.SelectItemProps, \"asChild\"> & {\n textProps?: TextProps;\n leadingIcon?: React.ReactNode;\n }\n>(\n (\n {\n className,\n textProps = {},\n children,\n value,\n leadingIcon,\n disabled,\n ...props\n },\n ref,\n ) => {\n const {\n registerIcon,\n unregisterIcon,\n autocomplete,\n searchValue,\n value: selectValue,\n shouldFilter,\n } = useSelectContext();\n\n useEffect(() => {\n if (!leadingIcon) return;\n\n registerIcon(value, leadingIcon);\n return () => {\n unregisterIcon(value);\n };\n }, [value, leadingIcon]);\n\n const isSelected = value === selectValue.value;\n const isMatched = getMatch(value, children, searchValue);\n const isHidden = shouldFilter && isSelected && !isMatched;\n\n if (shouldFilter && !isMatched && !isSelected) {\n // Not selected and doesn't match search, so don't render at all\n return null;\n }\n\n const element = (\n <>\n {leadingIcon && <div className={styles.itemIcon}>{leadingIcon}</div>}\n <SelectPrimitive.ItemText>\n <Text {...textProps}>{children}</Text>\n </SelectPrimitive.ItemText>\n </>\n );\n\n return (\n <SelectPrimitive.Item\n ref={ref}\n value={value}\n className={cx(styles.menuitem, className, isHidden && styles.hidden)}\n data-hidden={isHidden}\n disabled={disabled || isHidden}\n asChild={autocomplete}\n {...props}>\n {autocomplete ? (\n <ComboboxItem\n onBlurCapture={event => {\n event.preventDefault();\n }}>\n {element}\n </ComboboxItem>\n ) : (\n element\n )}\n </SelectPrimitive.Item>\n );\n },\n);\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n"],"names":["_jsxs","_Fragment","_jsx","SelectPrimitive.ItemText","SelectPrimitive.Item"],"mappings":";;;;;;;;;;AASO,MAAM,UAAU,GAAG,UAAU,CAOlC,CACE,EACE,SAAS,EACT,SAAS,GAAG,EAAE,EACd,QAAQ,EACR,KAAK,EACL,WAAW,EACX,QAAQ,EACR,GAAG,KAAK,EACT,EACD,GAAG,KACD;AACF,IAAA,MAAM,EACJ,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,WAAW,EACX,KAAK,EAAE,WAAW,EAClB,YAAY,GACb,GAAG,gBAAgB,EAAE,CAAC;IAEvB,SAAS,CAAC,MAAK;AACb,QAAA,IAAI,CAAC,WAAW;YAAE,OAAO;AAEzB,QAAA,YAAY,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;AACjC,QAAA,OAAO,MAAK;YACV,cAAc,CAAC,KAAK,CAAC,CAAC;AACxB,SAAC,CAAC;AACJ,KAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC;AAEzB,IAAA,MAAM,UAAU,GAAG,KAAK,KAAK,WAAW,CAAC,KAAK,CAAC;IAC/C,MAAM,SAAS,GAAG,QAAQ,CAAC,KAAK,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;IACzD,MAAM,QAAQ,GAAG,YAAY,IAAI,UAAU,IAAI,CAAC,SAAS,CAAC;IAE1D,IAAI,YAAY,IAAI,CAAC,SAAS,IAAI,CAAC,UAAU,EAAE;;AAE7C,QAAA,OAAO,IAAI,CAAC;KACb;AAED,IAAA,MAAM,OAAO,IACXA,sBAAA,CAAAC,0BAAA,EAAA,EAAA,QAAA,EAAA,CACG,WAAW,IAAIC,qBAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,QAAQ,YAAG,WAAW,EAAA,CAAO,EACpEA,qBAAA,CAACC,QAAwB,EAAA,EAAA,QAAA,EACvBD,sBAAC,IAAI,EAAA,EAAA,GAAK,SAAS,EAAA,QAAA,EAAG,QAAQ,EAAA,CAAQ,EACb,CAAA,CAAA,EAAA,CAC1B,CACJ,CAAC;IAEF,QACEA,qBAAC,CAAAE,IAAoB,EACnB,EAAA,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,IAAI,MAAM,CAAC,MAAM,CAAC,EAAA,aAAA,EACvD,QAAQ,EACrB,QAAQ,EAAE,QAAQ,IAAI,QAAQ,EAC9B,OAAO,EAAE,YAAY,EAAA,GACjB,KAAK,EAAA,QAAA,EACR,YAAY,IACXF,qBAAA,CAAC,YAAY,EAAA,EACX,aAAa,EAAE,KAAK,IAAG;gBACrB,KAAK,CAAC,cAAc,EAAE,CAAC;AACzB,aAAC,EACA,QAAA,EAAA,OAAO,EACK,CAAA,KAEf,OAAO,CACR,EACoB,CAAA,EACvB;AACJ,CAAC,EACD;AACF,UAAU,CAAC,WAAW,GAAGE,IAAoB,CAAC,WAAW;;;;"}
@@ -0,0 +1,35 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.cjs');
4
+ var React = require('react');
5
+ var index = require('../../node_modules/.pnpm/@radix-ui_react-select@2.2.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-select/dist/index.cjs');
6
+ var index$1 = require('../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.cjs');
7
+ var selectRoot = require('./select-root.cjs');
8
+ var select_module = require('./select.module.css.cjs');
9
+
10
+ const SelectGroup = React.forwardRef(({ className, children, ...props }, ref) => {
11
+ const { shouldFilter } = selectRoot.useSelectContext();
12
+ if (shouldFilter)
13
+ return jsxRuntime.jsxRuntimeExports.jsx(React.Fragment, { children: children });
14
+ return (jsxRuntime.jsxRuntimeExports.jsx(index.Group, { ref: ref, className: index$1.cx(select_module.default.menugroup, className), ...props, children: children }));
15
+ });
16
+ SelectGroup.displayName = index.Group.displayName;
17
+ const SelectLabel = React.forwardRef(({ className, ...props }, ref) => {
18
+ const { shouldFilter } = selectRoot.useSelectContext();
19
+ if (shouldFilter)
20
+ return null;
21
+ return (jsxRuntime.jsxRuntimeExports.jsx(index.Label, { ref: ref, className: index$1.cx(select_module.default.label, className), ...props }));
22
+ });
23
+ SelectLabel.displayName = index.Label.displayName;
24
+ const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => {
25
+ const { shouldFilter } = selectRoot.useSelectContext();
26
+ if (shouldFilter)
27
+ return null;
28
+ return (jsxRuntime.jsxRuntimeExports.jsx(index.Separator, { ref: ref, className: index$1.cx(select_module.default.separator, className), ...props }));
29
+ });
30
+ SelectSeparator.displayName = index.Separator.displayName;
31
+
32
+ exports.SelectGroup = SelectGroup;
33
+ exports.SelectLabel = SelectLabel;
34
+ exports.SelectSeparator = SelectSeparator;
35
+ //# sourceMappingURL=select-misc.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-misc.cjs","sources":["../../../../v1/components/select/select-misc.tsx"],"sourcesContent":["import { ElementRef, forwardRef, Fragment } from \"react\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { cx } from \"class-variance-authority\";\nimport { useSelectContext } from \"./select-root\";\nimport styles from \"./select.module.css\";\n\nexport const SelectGroup = forwardRef<\n ElementRef<typeof SelectPrimitive.Group>,\n SelectPrimitive.SelectGroupProps\n>(({ className, children, ...props }, ref) => {\n const { shouldFilter } = useSelectContext();\n\n if (shouldFilter) return <Fragment>{children}</Fragment>;\n\n return (\n <SelectPrimitive.Group\n ref={ref}\n className={cx(styles.menugroup, className)}\n {...props}>\n {children}\n </SelectPrimitive.Group>\n );\n});\nSelectGroup.displayName = SelectPrimitive.Group.displayName;\n\nexport const SelectLabel = forwardRef<\n ElementRef<typeof SelectPrimitive.Label>,\n SelectPrimitive.SelectLabelProps\n>(({ className, ...props }, ref) => {\n const { shouldFilter } = useSelectContext();\n\n if (shouldFilter) return null;\n\n return (\n <SelectPrimitive.Label\n ref={ref}\n className={cx(styles.label, className)}\n {...props}\n />\n );\n});\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\nexport const SelectSeparator = forwardRef<\n ElementRef<typeof SelectPrimitive.Separator>,\n SelectPrimitive.SelectSeparatorProps\n>(({ className, ...props }, ref) => {\n const { shouldFilter } = useSelectContext();\n\n if (shouldFilter) return null;\n return (\n <SelectPrimitive.Separator\n ref={ref}\n className={cx(styles.separator, className)}\n {...props}\n />\n );\n});\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n"],"names":["forwardRef","useSelectContext","_jsx","Fragment","SelectPrimitive.Group","cx","styles","SelectPrimitive.Label","SelectPrimitive.Separator"],"mappings":";;;;;;;;;AAMa,MAAA,WAAW,GAAGA,gBAAU,CAGnC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;AAC3C,IAAA,MAAM,EAAE,YAAY,EAAE,GAAGC,2BAAgB,EAAE,CAAC;AAE5C,IAAA,IAAI,YAAY;AAAE,QAAA,OAAOC,gCAAC,CAAAC,cAAQ,EAAE,EAAA,QAAA,EAAA,QAAQ,GAAY,CAAC;IAEzD,QACED,gCAAC,CAAAE,WAAqB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ponent<SelectPrimitive.SelectGroupProps & import("react").RefAttributes<HTMLDivElement>>;
3
+ export declare const SelectLabel: import("react").ForwardRefExoticComponent<SelectPrimitive.SelectLabelProps & import("react").RefAttributes<HTMLDivElement>>;
4
+ export declare const SelectSeparator: import("react").ForwardRefExoticComponent<SelectPrimitive.SelectSeparatorProps & import("react").RefAttributes<HTMLDivElement>>;
5
+ //# sourceMappingURL=select-misc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-misc.d.ts","sourceRoot":"","sources":["../../../../v1/components/select/select-misc.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAK1D,eAAO,MAAM,WAAW,6HAgBtB,CAAC;AAGH,eAAO,MAAM,WAAW,6HAetB,CAAC;AAGH,eAAO,MAAM,eAAe,iIAc1B,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { j as jsxRuntimeExports } from '../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js';
2
+ import { forwardRef, Fragment } from 'react';
3
+ import { Group, Label, Separator } from '../../node_modules/.pnpm/@radix-ui_react-select@2.2.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-select/dist/index.js';
4
+ import { cx } from '../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js';
5
+ import { useSelectContext } from './select-root.js';
6
+ import styles from './select.module.css.js';
7
+
8
+ const SelectGroup = forwardRef(({ className, children, ...props }, ref) => {
9
+ const { shouldFilter } = useSelectContext();
10
+ if (shouldFilter)
11
+ return jsxRuntimeExports.jsx(Fragment, { children: children });
12
+ return (jsxRuntimeExports.jsx(Group, { ref: ref, className: cx(styles.menugroup, className), ...props, children: children }));
13
+ });
14
+ SelectGroup.displayName = Group.displayName;
15
+ const SelectLabel = forwardRef(({ className, ...props }, ref) => {
16
+ const { shouldFilter } = useSelectContext();
17
+ if (shouldFilter)
18
+ return null;
19
+ return (jsxRuntimeExports.jsx(Label, { ref: ref, className: cx(styles.label, className), ...props }));
20
+ });
21
+ SelectLabel.displayName = Label.displayName;
22
+ const SelectSeparator = forwardRef(({ className, ...props }, ref) => {
23
+ const { shouldFilter } = useSelectContext();
24
+ if (shouldFilter)
25
+ return null;
26
+ return (jsxRuntimeExports.jsx(Separator, { ref: ref, className: cx(styles.separator, className), ...props }));
27
+ });
28
+ SelectSeparator.displayName = Separator.displayName;
29
+
30
+ export { SelectGroup, SelectLabel, SelectSeparator };
31
+ //# sourceMappingURL=select-misc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-misc.js","sources":["../../../../v1/components/select/select-misc.tsx"],"sourcesContent":["import { ElementRef, forwardRef, Fragment } from \"react\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { cx } from \"class-variance-authority\";\nimport { useSelectContext } from \"./select-root\";\nimport styles from \"./select.module.css\";\n\nexport const SelectGroup = forwardRef<\n ElementRef<typeof SelectPrimitive.Group>,\n SelectPrimitive.SelectGroupProps\n>(({ className, children, ...props }, ref) => {\n const { shouldFilter } = useSelectContext();\n\n if (shouldFilter) return <Fragment>{children}</Fragment>;\n\n return (\n <SelectPrimitive.Group\n ref={ref}\n className={cx(styles.menugroup, className)}\n {...props}>\n {children}\n </SelectPrimitive.Group>\n );\n});\nSelectGroup.displayName = SelectPrimitive.Group.displayName;\n\nexport const SelectLabel = forwardRef<\n ElementRef<typeof SelectPrimitive.Label>,\n SelectPrimitive.SelectLabelProps\n>(({ className, ...props }, ref) => {\n const { shouldFilter } = useSelectContext();\n\n if (shouldFilter) return null;\n\n return (\n <SelectPrimitive.Label\n ref={ref}\n className={cx(styles.label, className)}\n {...props}\n />\n );\n});\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\nexport const SelectSeparator = forwardRef<\n ElementRef<typeof SelectPrimitive.Separator>,\n SelectPrimitive.SelectSeparatorProps\n>(({ className, ...props }, ref) => {\n const { shouldFilter } = useSelectContext();\n\n if (shouldFilter) return null;\n return (\n <SelectPrimitive.Separator\n ref={ref}\n className={cx(styles.separator, className)}\n {...props}\n />\n );\n});\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n"],"names":["_jsx","SelectPrimitive.Group","SelectPrimitive.Label","SelectPrimitive.Separator"],"mappings":";;;;;;;AAMa,MAAA,WAAW,GAAG,UAAU,CAGnC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;AAC3C,IAAA,MAAM,EAAE,YAAY,EAAE,GAAG,gBAAgB,EAAE,CAAC;AAE5C,IAAA,IAAI,YAAY;AAAE,QAAA,OAAOA,qBAAC,CAAA,QAAQ,EAAE,EAAA,QAAA,EAAA,QAAQ,GAAY,CAAC;IAEzD,QACEA,qBAAC,CAAAC,KAAqB,EACpB,EAAA,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,EACtC,GAAA,KAAK,EACR,QAAA,EAAA,QAAQ,EACa,CAAA,EACxB;AACJ,CAAC,EAAE;AACH,WAAW,CAAC,WAAW,GAAGA,KAAqB,CAAC,WAAW,CAAC;AAE/C,MAAA,WAAW,GAAG,UAAU,CAGnC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;AACjC,IAAA,MAAM,EAAE,YAAY,EAAE,GAAG,gBAAgB,EAAE,CAAC;AAE5C,IAAA,IAAI,YAAY;AAAE,QAAA,OAAO,IAAI,CAAC;IAE9B,QACED,qBAAC,CAAAE,KAAqB,IACpB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,CAAC,EAClC,GAAA,KAAK,EACT,CAAA,EACF;AACJ,CAAC,EAAE;AACH,WAAW,CAAC,WAAW,GAAGA,KAAqB,CAAC,WAAW,CAAC;AAE/C,MAAA,eAAe,GAAG,UAAU,CAGvC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;AACjC,IAAA,MAAM,EAAE,YAAY,EAAE,GAAG,gBAAgB,EAAE,CAAC;AAE5C,IAAA,IAAI,YAAY;AAAE,QAAA,OAAO,IAAI,CAAC;IAC9B,QACEF,qBAAC,CAAAG,SAAyB,IACxB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,EACtC,GAAA,KAAK,EACT,CAAA,EACF;AACJ,CAAC,EAAE;AACH,eAAe,CAAC,WAAW,GAAGA,SAAyB,CAAC,WAAW;;;;"}
@@ -2,6 +2,7 @@
2
2
 
3
3
  var jsxRuntime = require('../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.cjs');
4
4
  var React = require('react');
5
+ var comboboxProvider = require('../../node_modules/.pnpm/@ariakit_react-core@0.4.16_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@ariakit/react-core/esm/combobox/combobox-provider.cjs');
5
6
  var index = require('../../node_modules/.pnpm/@radix-ui_react-select@2.2.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-select/dist/index.cjs');
6
7
 
7
8
  /*
@@ -14,17 +15,35 @@ const useSelectContext = () => {
14
15
  if (!context) {
15
16
  throw new Error("useSelectContext must be used within a SelectProvider");
16
17
  }
17
- return context;
18
+ const shouldFilter = !!(context?.autocomplete &&
19
+ context?.autocompleteMode === "auto" &&
20
+ context?.searchValue?.length);
21
+ return {
22
+ ...context,
23
+ shouldFilter,
24
+ };
18
25
  };
19
- const SelectRoot = ({ children, value, onValueChange, defaultValue, ...props }) => {
26
+ const SelectRoot = ({ children, value, onValueChange, defaultValue, autocomplete, autocompleteMode = "auto", searchValue: providedSearchValue, onSearch, defaultSearchValue = "", open: controlledOpen, defaultOpen = false, onOpenChange, htmlAutoComplete, ...props }) => {
20
27
  const [internalValue, setInternalValue] = React.useState(defaultValue);
28
+ const [internalSearchValue, setInternalSearchValue] = React.useState(defaultSearchValue);
29
+ const [internalOpen, setInternalOpen] = React.useState(defaultOpen);
21
30
  const icons = React.useRef({});
22
31
  const computedValue = value ?? internalValue;
23
32
  const icon = computedValue && icons.current?.[computedValue];
24
- const setValue = (_value) => {
33
+ const searchValue = providedSearchValue ?? internalSearchValue;
34
+ const open = controlledOpen ?? internalOpen;
35
+ const setValue = React.useCallback((_value) => {
25
36
  onValueChange?.(_value);
26
37
  setInternalValue(_value);
27
- };
38
+ }, [onValueChange]);
39
+ const setSearchValue = React.useCallback((value) => {
40
+ setInternalSearchValue(value);
41
+ onSearch?.(value);
42
+ }, [onSearch]);
43
+ const handleOpenChange = React.useCallback((value) => {
44
+ setInternalOpen(value);
45
+ onOpenChange?.(value);
46
+ }, [onOpenChange]);
28
47
  const registerIcon = React.useCallback((value, icon) => {
29
48
  icons.current = { ...icons.current, [value]: icon };
30
49
  }, []);
@@ -32,11 +51,15 @@ const SelectRoot = ({ children, value, onValueChange, defaultValue, ...props })
32
51
  const { [value]: _, ...rest } = icons.current;
33
52
  icons.current = rest;
34
53
  }, []);
54
+ const element = (jsxRuntime.jsxRuntimeExports.jsx(comboboxProvider.ComboboxProvider, { resetValueOnHide: true, focusLoop: false, includesBaseElement: false, value: searchValue, setValue: setSearchValue, open: open, setOpen: handleOpenChange, children: children }));
35
55
  return (jsxRuntime.jsxRuntimeExports.jsx(SelectContext.Provider, { value: {
36
56
  registerIcon,
37
57
  unregisterIcon,
38
58
  value: { value: computedValue, icon },
39
- }, children: jsxRuntime.jsxRuntimeExports.jsx(index.Root, { value: computedValue, onValueChange: setValue, ...props, children: children }) }));
59
+ autocomplete,
60
+ autocompleteMode,
61
+ searchValue,
62
+ }, children: jsxRuntime.jsxRuntimeExports.jsx(index.Root, { autoComplete: htmlAutoComplete, value: computedValue, onValueChange: setValue, open: open, onOpenChange: handleOpenChange, ...props, children: autocomplete ? element : children }) }));
40
63
  };
41
64
 
42
65
  exports.SelectRoot = SelectRoot;
@@ -1 +1 @@
1
- {"version":3,"file":"select-root.cjs","sources":["../../../../v1/components/select/select-root.tsx"],"sourcesContent":["import {\n createContext,\n ReactNode,\n useCallback,\n useContext,\n useRef,\n useState,\n} from \"react\";\n\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\n\ntype IconType = Record<string, ReactNode>;\ntype ValueType = {\n value?: string;\n icon?: ReactNode;\n};\ntype SelectContextValue = {\n value: ValueType;\n registerIcon: (value: string, icon: ReactNode) => void;\n unregisterIcon: (value: string) => void;\n};\n\n/*\nRoot context to manage the Select control\n@remarks Only for internal usage.\n*/\nconst SelectContext = createContext<SelectContextValue | undefined>(undefined);\n\nexport const useSelectContext = () => {\n const context = useContext(SelectContext);\n if (!context) {\n throw new Error(\"useSelectContext must be used within a SelectProvider\");\n }\n return context;\n};\n\nexport const SelectRoot = ({\n children,\n value,\n onValueChange,\n defaultValue,\n ...props\n}: SelectPrimitive.SelectProps) => {\n const [internalValue, setInternalValue] = useState<string | undefined>(\n defaultValue,\n );\n const icons = useRef<IconType>({});\n\n const computedValue = value ?? internalValue;\n const icon = computedValue && icons.current?.[computedValue];\n\n const setValue = (_value: string) => {\n onValueChange?.(_value);\n setInternalValue(_value);\n };\n\n const registerIcon = useCallback<SelectContextValue[\"registerIcon\"]>(\n (value, icon) => {\n icons.current = { ...icons.current, [value]: icon };\n },\n [],\n );\n const unregisterIcon = useCallback<SelectContextValue[\"unregisterIcon\"]>(\n value => {\n const { [value]: _, ...rest } = icons.current;\n icons.current = rest;\n },\n [],\n );\n\n return (\n <SelectContext.Provider\n value={{\n registerIcon,\n unregisterIcon,\n value: { value: computedValue, icon },\n }}>\n <SelectPrimitive.Root\n value={computedValue}\n onValueChange={setValue}\n {...props}>\n {children}\n </SelectPrimitive.Root>\n </SelectContext.Provider>\n );\n};\n"],"names":["createContext","useContext","useState","useRef","useCallback","_jsx","SelectPrimitive.Root"],"mappings":";;;;;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AG,IAAI,CAAC;KACtB,EACD,EAAE,CACH,CAAC;AAEF,IAAA,QACEC,gCAAC,CAAA,aAAa,CAAC,QAAQ,EAAA,EACrB,KAAK,EAAE;YACL,YAAY;YACZ,cAAc;AACd,YAAA,KAAK,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE;AACtC,SAAA,EAAA,QAAA,EACDA,iCAACC,UAAoB,EACnB,EAAA,KAAK,EAAE,aAAa,EACpB,aAAa,EAAE,QAAQ,KACnB,KAAK,EAAA,QAAA,EACR,QAAQ,EACY,CAAA,EAAA,CACA,EACzB;AACJ;;;;;"}
1
+ {"version":3,"file":"select-root.cjs","sources":["../../../../v1/components/select/select-root.tsx"],"sourcesContent":["import {\n createContext,\n ReactNode,\n useCallback,\n useContext,\n useRef,\n useState,\n} from \"react\";\nimport { ComboboxProvider } from \"@ariakit/react\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\n\ntype IconType = Record<string, ReactNode>;\ntype ValueType = {\n value?: string;\n icon?: ReactNode;\n};\n\ninterface CommonProps {\n autocomplete?: boolean;\n autocompleteMode?: \"auto\" | \"manual\";\n searchValue?: string;\n onSearch?: (value: string) => void;\n defaultSearchValue?: string;\n}\n\ninterface SelectContextValue extends CommonProps {\n value: ValueType;\n registerIcon: (value: string, icon: ReactNode) => void;\n unregisterIcon: (value: string) => void;\n}\n\ninterface UseSelectContext extends SelectContextValue {\n shouldFilter?: boolean;\n}\n\n/*\nRoot context to manage the Select control\n@remarks Only for internal usage.\n*/\nconst SelectContext = createContext<SelectContextValue | undefined>(undefined);\n\nexport const useSelectContext = (): UseSelectContext => {\n const context = useContext(SelectContext);\n if (!context) {\n throw new Error(\"useSelectContext must be used within a SelectProvider\");\n }\n const shouldFilter = !!(\n context?.autocomplete &&\n context?.autocompleteMode === \"auto\" &&\n context?.searchValue?.length\n );\n return {\n ...context,\n shouldFilter,\n };\n};\n\nexport interface NormalSelectRootProps extends SelectPrimitive.SelectProps {\n autocomplete?: false;\n autocompleteMode?: never;\n searchValue?: never;\n onSearch?: never;\n defaultSearchValue?: never;\n}\n\nexport interface AutocompleteSelectRootProps\n extends SelectPrimitive.SelectProps,\n CommonProps {\n autocomplete: true;\n}\n\nexport type SelectRootProps = Omit<\n NormalSelectRootProps | AutocompleteSelectRootProps,\n \"autoComplete\"\n> & {\n htmlAutoComplete?: string;\n};\n\nexport interface NormalSelectRootProps extends SelectPrimitive.SelectProps {\n autocomplete?: false;\n autocompleteMode?: never;\n searchValue?: never;\n onSearch?: never;\n defaultSearchValue?: never;\n}\n\nexport interface AutocompleteSelectRootProps\n extends SelectPrimitive.SelectProps,\n CommonProps {\n autocomplete: true;\n}\n\nexport type BaseSelectRootProps =\n | NormalSelectRootProps\n | AutocompleteSelectRootProps;\n\nexport type SelectRootProps = Omit<BaseSelectRootProps, \"autoComplete\"> & {\n htmlAutoComplete?: string;\n};\n\nexport const SelectRoot = ({\n children,\n value,\n onValueChange,\n defaultValue,\n autocomplete,\n autocompleteMode = \"auto\",\n searchValue: providedSearchValue,\n onSearch,\n defaultSearchValue = \"\",\n open: controlledOpen,\n defaultOpen = false,\n onOpenChange,\n htmlAutoComplete,\n ...props\n}: SelectRootProps) => {\n const [internalValue, setInternalValue] = useState<string | undefined>(\n defaultValue,\n );\n const [internalSearchValue, setInternalSearchValue] =\n useState(defaultSearchValue);\n const [internalOpen, setInternalOpen] = useState(defaultOpen);\n const icons = useRef<IconType>({});\n\n const computedValue = value ?? internalValue;\n const icon = computedValue && icons.current?.[computedValue];\n const searchValue = providedSearchValue ?? internalSearchValue;\n const open = controlledOpen ?? internalOpen;\n\n const setValue = useCallback(\n (_value: string) => {\n onValueChange?.(_value);\n setInternalValue(_value);\n },\n [onValueChange],\n );\n\n const setSearchValue = useCallback(\n (value: string) => {\n setInternalSearchValue(value);\n onSearch?.(value);\n },\n [onSearch],\n );\n\n const handleOpenChange = useCallback(\n (value: boolean) => {\n setInternalOpen(value);\n onOpenChange?.(value);\n },\n [onOpenChange],\n );\n\n const registerIcon = useCallback<SelectContextValue[\"registerIcon\"]>(\n (value, icon) => {\n icons.current = { ...icons.current, [value]: icon };\n },\n [],\n );\n const unregisterIcon = useCallback<SelectContextValue[\"unregisterIcon\"]>(\n value => {\n const { [value]: _, ...rest } = icons.current;\n icons.current = rest;\n },\n [],\n );\n\n const element = (\n <ComboboxProvider\n resetValueOnHide\n focusLoop={false}\n includesBaseElement={false}\n value={searchValue}\n setValue={setSearchValue}\n open={open}\n setOpen={handleOpenChange}>\n {children}\n </ComboboxProvider>\n );\n\n return (\n <SelectContext.Provider\n value={{\n registerIcon,\n unregisterIcon,\n value: { value: computedValue, icon },\n autocomplete,\n autocompleteMode,\n searchValue,\n }}>\n <SelectPrimitive.Root\n autoComplete={htmlAutoComplete}\n value={computedValue}\n onValueChange={setValue}\n open={open}\n onOpenChange={handleOpenChange}\n {...props}>\n {autocomplete ? element : children}\n </SelectPrimitive.Root>\n </SelectContext.Provider>\n );\n};\n"],"names":["createContext","useContext","useState","useRef","useCallback","_jsx","ComboboxProvider","SelectPrimitive.Root"],"mappings":";;;;;;;AAmCA;;;AAGE;AACF,MAAM,aAAa,GAAGA,mBAAa,CAAiC,SAAS,CAAC,CAAC;AAExE,MAAM,gBAAgB,GAAG,MAAuB;AACrD,IAAA,MAAM,OAAO,GAAGC,gBAAU,CAAC,aAAa,CAAC,CAAC;IAC1C,IAAI,CAAC,OAAO,EAAE;AACZ,QAAA,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;KAC1E;AACD,IAAA,MAAM,YAAY,GAAG,CAAC,EACpB,OAAO,EAAE,YAAY;QACrB,OAAO,EAAE,gBAAgB,KAAK,MAAM;AACpC,QAAA,OAAO,EAAE,WAAW,EAAE,MAAM,CAC7B,CAAC;IACF,OAAO;AACL,QAAA,GAAG,OAAO;QACV,YAAY;KACb,CAAC;AACJ,EAAE;MA6CW,UAAU,GAAG,CAAC,EACzB,QAAQ,EACR,KAAK,EACL,aAAa,EACb,YAAY,E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AAA,EACR,YAAY,GAAG,OAAO,GAAG,QAAQ,EACb,CAAA,EAAA,CACA,EACzB;AACJ;;;;;"}
@@ -4,12 +4,49 @@ type ValueType = {
4
4
  value?: string;
5
5
  icon?: ReactNode;
6
6
  };
7
- type SelectContextValue = {
7
+ interface CommonProps {
8
+ autocomplete?: boolean;
9
+ autocompleteMode?: "auto" | "manual";
10
+ searchValue?: string;
11
+ onSearch?: (value: string) => void;
12
+ defaultSearchValue?: string;
13
+ }
14
+ interface SelectContextValue extends CommonProps {
8
15
  value: ValueType;
9
16
  registerIcon: (value: string, icon: ReactNode) => void;
10
17
  unregisterIcon: (value: string) => void;
18
+ }
19
+ interface UseSelectContext extends SelectContextValue {
20
+ shouldFilter?: boolean;
21
+ }
22
+ export declare const useSelectContext: () => UseSelectContext;
23
+ export interface NormalSelectRootProps extends SelectPrimitive.SelectProps {
24
+ autocomplete?: false;
25
+ autocompleteMode?: never;
26
+ searchValue?: never;
27
+ onSearch?: never;
28
+ defaultSearchValue?: never;
29
+ }
30
+ export interface AutocompleteSelectRootProps extends SelectPrimitive.SelectProps, CommonProps {
31
+ autocomplete: true;
32
+ }
33
+ export type SelectRootProps = Omit<NormalSelectRootProps | AutocompleteSelectRootProps, "autoComplete"> & {
34
+ htmlAutoComplete?: string;
11
35
  };
12
- export declare const useSelectContext: () => SelectContextValue;
13
- export declare const SelectRoot: ({ children, value, onValueChange, defaultValue, ...props }: SelectPrimitive.SelectProps) => import("react/jsx-runtime").JSX.Element;
36
+ export interface NormalSelectRootProps extends SelectPrimitive.SelectProps {
37
+ autocomplete?: false;
38
+ autocompleteMode?: never;
39
+ searchValue?: never;
40
+ onSearch?: never;
41
+ defaultSearchValue?: never;
42
+ }
43
+ export interface AutocompleteSelectRootProps extends SelectPrimitive.SelectProps, CommonProps {
44
+ autocomplete: true;
45
+ }
46
+ export type BaseSelectRootProps = NormalSelectRootProps | AutocompleteSelectRootProps;
47
+ export type SelectRootProps = Omit<BaseSelectRootProps, "autoComplete"> & {
48
+ htmlAutoComplete?: string;
49
+ };
50
+ export declare const SelectRoot: ({ children, value, onValueChange, defaultValue, autocomplete, autocompleteMode, searchValue: providedSearchValue, onSearch, defaultSearchValue, open: controlledOpen, defaultOpen, onOpenChange, htmlAutoComplete, ...props }: SelectRootProps) => import("react/jsx-runtime").JSX.Element;
14
51
  export {};
15
52
  //# sourceMappingURL=select-root.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"select-root.d.ts","sourceRoot":"","sources":["../../../../v1/components/select/select-root.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EAKV,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAG1D,KAAK,SAAS,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AACF,KAAK,kBAAkB,GAAG;IACxB,KAAK,EAAE,SAAS,CAAC;IACjB,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACvD,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC,CAAC;AAQF,eAAO,MAAM,gBAAgB,0BAM5B,CAAC;AAEF,eAAO,MAAM,UAAU,+DAMpB,gBAAgB,WAAW,4CA2C7B,CAAC"}
1
+ {"version":3,"file":"select-root.d.ts","sourceRoot":"","sources":["../../../../v1/components/select/select-root.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EAKV,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAG1D,KAAK,SAAS,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF,UAAU,WAAW;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,GAAG,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M,WAAW,2BACf,SAAQ,eAAe,CAAC,WAAW,EACjC,WAAW;IACb,YAAY,EAAE,IAAI,CAAC;CACpB;AAED,MAAM,MAAM,mBAAmB,GAC3B,qBAAqB,GACrB,2BAA2B,CAAC;AAEhC,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,mBAAmB,EAAE,cAAc,CAAC,GAAG;IACxE,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,UAAU,kOAepB,eAAe,4CAsFjB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { j as jsxRuntimeExports } from '../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js';
2
2
  import { createContext, useContext, useState, useRef, useCallback } from 'react';
3
+ import { ComboboxProvider } from '../../node_modules/.pnpm/@ariakit_react-core@0.4.16_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@ariakit/react-core/esm/combobox/combobox-provider.js';
3
4
  import { Root as Root2 } from '../../node_modules/.pnpm/@radix-ui_react-select@2.2.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-select/dist/index.js';
4
5
 
5
6
  /*
@@ -12,17 +13,35 @@ const useSelectContext = () => {
12
13
  if (!context) {
13
14
  throw new Error("useSelectContext must be used within a SelectProvider");
14
15
  }
15
- return context;
16
+ const shouldFilter = !!(context?.autocomplete &&
17
+ context?.autocompleteMode === "auto" &&
18
+ context?.searchValue?.length);
19
+ return {
20
+ ...context,
21
+ shouldFilter,
22
+ };
16
23
  };
17
- const SelectRoot = ({ children, value, onValueChange, defaultValue, ...props }) => {
24
+ const SelectRoot = ({ children, value, onValueChange, defaultValue, autocomplete, autocompleteMode = "auto", searchValue: providedSearchValue, onSearch, defaultSearchValue = "", open: controlledOpen, defaultOpen = false, onOpenChange, htmlAutoComplete, ...props }) => {
18
25
  const [internalValue, setInternalValue] = useState(defaultValue);
26
+ const [internalSearchValue, setInternalSearchValue] = useState(defaultSearchValue);
27
+ const [internalOpen, setInternalOpen] = useState(defaultOpen);
19
28
  const icons = useRef({});
20
29
  const computedValue = value ?? internalValue;
21
30
  const icon = computedValue && icons.current?.[computedValue];
22
- const setValue = (_value) => {
31
+ const searchValue = providedSearchValue ?? internalSearchValue;
32
+ const open = controlledOpen ?? internalOpen;
33
+ const setValue = useCallback((_value) => {
23
34
  onValueChange?.(_value);
24
35
  setInternalValue(_value);
25
- };
36
+ }, [onValueChange]);
37
+ const setSearchValue = useCallback((value) => {
38
+ setInternalSearchValue(value);
39
+ onSearch?.(value);
40
+ }, [onSearch]);
41
+ const handleOpenChange = useCallback((value) => {
42
+ setInternalOpen(value);
43
+ onOpenChange?.(value);
44
+ }, [onOpenChange]);
26
45
  const registerIcon = useCallback((value, icon) => {
27
46
  icons.current = { ...icons.current, [value]: icon };
28
47
  }, []);
@@ -30,11 +49,15 @@ const SelectRoot = ({ children, value, onValueChange, defaultValue, ...props })
30
49
  const { [value]: _, ...rest } = icons.current;
31
50
  icons.current = rest;
32
51
  }, []);
52
+ const element = (jsxRuntimeExports.jsx(ComboboxProvider, { resetValueOnHide: true, focusLoop: false, includesBaseElement: false, value: searchValue, setValue: setSearchValue, open: open, setOpen: handleOpenChange, children: children }));
33
53
  return (jsxRuntimeExports.jsx(SelectContext.Provider, { value: {
34
54
  registerIcon,
35
55
  unregisterIcon,
36
56
  value: { value: computedValue, icon },
37
- }, children: jsxRuntimeExports.jsx(Root2, { value: computedValue, onValueChange: setValue, ...props, children: children }) }));
57
+ autocomplete,
58
+ autocompleteMode,
59
+ searchValue,
60
+ }, children: jsxRuntimeExports.jsx(Root2, { autoComplete: htmlAutoComplete, value: computedValue, onValueChange: setValue, open: open, onOpenChange: handleOpenChange, ...props, children: autocomplete ? element : children }) }));
38
61
  };
39
62
 
40
63
  export { SelectRoot, useSelectContext };
@@ -1 +1 @@
1
- {"version":3,"file":"select-root.js","sources":["../../../../v1/components/select/select-root.tsx"],"sourcesContent":["import {\n createContext,\n ReactNode,\n useCallback,\n useContext,\n useRef,\n useState,\n} from \"react\";\n\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\n\ntype IconType = Record<string, ReactNode>;\ntype ValueType = {\n value?: string;\n icon?: ReactNode;\n};\ntype SelectContextValue = {\n value: ValueType;\n registerIcon: (value: string, icon: ReactNode) => void;\n unregisterIcon: (value: string) => void;\n};\n\n/*\nRoot context to manage the Select control\n@remarks Only for internal usage.\n*/\nconst SelectContext = createContext<SelectContextValue | undefined>(undefined);\n\nexport const useSelectContext = () => {\n const context = useContext(SelectContext);\n if (!context) {\n throw new Error(\"useSelectContext must be used within a SelectProvider\");\n }\n return context;\n};\n\nexport const SelectRoot = ({\n children,\n value,\n onValueChange,\n defaultValue,\n ...props\n}: SelectPrimitive.SelectProps) => {\n const [internalValue, setInternalValue] = useState<string | undefined>(\n defaultValue,\n );\n const icons = useRef<IconType>({});\n\n const computedValue = value ?? internalValue;\n const icon = computedValue && icons.current?.[computedValue];\n\n const setValue = (_value: string) => {\n onValueChange?.(_value);\n setInternalValue(_value);\n };\n\n const registerIcon = useCallback<SelectContextValue[\"registerIcon\"]>(\n (value, icon) => {\n icons.current = { ...icons.current, [value]: icon };\n },\n [],\n );\n const unregisterIcon = useCallback<SelectContextValue[\"unregisterIcon\"]>(\n value => {\n const { [value]: _, ...rest } = icons.current;\n icons.current = rest;\n },\n [],\n );\n\n return (\n <SelectContext.Provider\n value={{\n registerIcon,\n unregisterIcon,\n value: { value: computedValue, icon },\n }}>\n <SelectPrimitive.Root\n value={computedValue}\n onValueChange={setValue}\n {...props}>\n {children}\n </SelectPrimitive.Root>\n </SelectContext.Provider>\n );\n};\n"],"names":["_jsx","SelectPrimitive.Root"],"mappings":";;;;AAsBA;;;AAGE;AACF,MAAM,aAAa,GAAG,aAAa,CAAiC,SAAS,CAAC,CAAC;AAExE,MAAM,gBAAgB,GAAG,MAAK;AACnC,IAAA,MAAM,OAAO,GAAG,UAAU,CAAC,aAAa,CAA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E,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE;AACtC,SAAA,EAAA,QAAA,EACDA,sBAACC,KAAoB,EACnB,EAAA,KAAK,EAAE,aAAa,EACpB,aAAa,EAAE,QAAQ,KACnB,KAAK,EAAA,QAAA,EACR,QAAQ,EACY,CAAA,EAAA,CACA,EACzB;AACJ;;;;"}
1
+ {"version":3,"file":"select-root.js","sources":["../../../../v1/components/select/select-root.tsx"],"sourcesContent":["import {\n createContext,\n ReactNode,\n useCallback,\n useContext,\n useRef,\n useState,\n} from \"react\";\nimport { ComboboxProvider } from \"@ariakit/react\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\n\ntype IconType = Record<string, ReactNode>;\ntype ValueType = {\n value?: string;\n icon?: ReactNode;\n};\n\ninterface CommonProps {\n autocomplete?: boolean;\n autocompleteMode?: \"auto\" | \"manual\";\n searchValue?: string;\n onSearch?: (value: string) => void;\n defaultSearchValue?: string;\n}\n\ninterface SelectContextValue extends CommonProps {\n value: ValueType;\n registerIcon: (value: string, icon: ReactNode) => void;\n unregisterIcon: (value: string) => void;\n}\n\ninterface UseSelectContext extends SelectContextValue {\n shouldFilter?: boolean;\n}\n\n/*\nRoot context to manage the Select control\n@remarks Only for internal usage.\n*/\nconst SelectContext = createContext<SelectContextValue | undefined>(undefined);\n\nexport const useSelectContext = (): UseSelectContext => {\n const context = useContext(SelectContext);\n if (!context) {\n throw new Error(\"useSelectContext must be used within a SelectProvider\");\n }\n const shouldFilter = !!(\n context?.autocomplete &&\n context?.autocompleteMode === \"auto\" &&\n context?.searchValue?.length\n );\n return {\n ...context,\n shouldFilter,\n };\n};\n\nexport interface NormalSelectRootProps extends SelectPrimitive.SelectProps {\n autocomplete?: false;\n autocompleteMode?: never;\n searchValue?: never;\n onSearch?: never;\n defaultSearchValue?: never;\n}\n\nexport interface AutocompleteSelectRootProps\n extends SelectPrimitive.SelectProps,\n CommonProps {\n autocomplete: true;\n}\n\nexport type SelectRootProps = Omit<\n NormalSelectRootProps | AutocompleteSelectRootProps,\n \"autoComplete\"\n> & {\n htmlAutoComplete?: string;\n};\n\nexport interface NormalSelectRootProps extends SelectPrimitive.SelectProps {\n autocomplete?: false;\n autocompleteMode?: never;\n searchValue?: never;\n onSearch?: never;\n defaultSearchValue?: never;\n}\n\nexport interface AutocompleteSelectRootProps\n extends SelectPrimitive.SelectProps,\n CommonProps {\n autocomplete: true;\n}\n\nexport type BaseSelectRootProps =\n | NormalSelectRootProps\n | AutocompleteSelectRootProps;\n\nexport type SelectRootProps = Omit<BaseSelectRootProps, \"autoComplete\"> & {\n htmlAutoComplete?: string;\n};\n\nexport const SelectRoot = ({\n children,\n value,\n onValueChange,\n defaultValue,\n autocomplete,\n autocompleteMode = \"auto\",\n searchValue: providedSearchValue,\n onSearch,\n defaultSearchValue = \"\",\n open: controlledOpen,\n defaultOpen = false,\n onOpenChange,\n htmlAutoComplete,\n ...props\n}: SelectRootProps) => {\n const [internalValue, setInternalValue] = useState<string | undefined>(\n defaultValue,\n );\n const [internalSearchValue, setInternalSearchValue] =\n useState(defaultSearchValue);\n const [internalOpen, setInternalOpen] = useState(defaultOpen);\n const icons = useRef<IconType>({});\n\n const computedValue = value ?? internalValue;\n const icon = computedValue && icons.current?.[computedValue];\n const searchValue = providedSearchValue ?? internalSearchValue;\n const open = controlledOpen ?? internalOpen;\n\n const setValue = useCallback(\n (_value: string) => {\n onValueChange?.(_value);\n setInternalValue(_value);\n },\n [onValueChange],\n );\n\n const setSearchValue = useCallback(\n (value: string) => {\n setInternalSearchValue(value);\n onSearch?.(value);\n },\n [onSearch],\n );\n\n const handleOpenChange = useCallback(\n (value: boolean) => {\n setInternalOpen(value);\n onOpenChange?.(value);\n },\n [onOpenChange],\n );\n\n const registerIcon = useCallback<SelectContextValue[\"registerIcon\"]>(\n (value, icon) => {\n icons.current = { ...icons.current, [value]: icon };\n },\n [],\n );\n const unregisterIcon = useCallback<SelectContextValue[\"unregisterIcon\"]>(\n value => {\n const { [value]: _, ...rest } = icons.current;\n icons.current = rest;\n },\n [],\n );\n\n const element = (\n <ComboboxProvider\n resetValueOnHide\n focusLoop={false}\n includesBaseElement={false}\n value={searchValue}\n setValue={setSearchValue}\n open={open}\n setOpen={handleOpenChange}>\n {children}\n </ComboboxProvider>\n );\n\n return (\n <SelectContext.Provider\n value={{\n registerIcon,\n unregisterIcon,\n value: { value: computedValue, icon },\n autocomplete,\n autocompleteMode,\n searchValue,\n }}>\n <SelectPrimitive.Root\n autoComplete={htmlAutoComplete}\n value={computedValue}\n onValueChange={setValue}\n open={open}\n onOpenChange={handleOpenChange}\n {...props}>\n {autocomplete ? element : children}\n </SelectPrimitive.Root>\n </SelectContext.Provider>\n );\n};\n"],"names":["_jsx","SelectPrimitive.Root"],"mappings":";;;;;AAmCA;;;AAGE;AACF,MAAM,aAAa,GAAG,aAAa,CAAiC,SAAS,CAAC,CAAC;AAExE,MAAM,gBAAgB,GAAG,MAAuB;AACrD,IAAA,MAAM,OAAO,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;IAC1C,IAAI,CAAC,OAAO,EAAE;AACZ,QAAA,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;KAC1E;AACD,IAAA,MAAM,YAAY,GAAG,CAAC,EACpB,OAAO,EAAE,YAAY;QACrB,OAAO,EAAE,gBAAgB,KAAK,MAAM;AACpC,QAAA,OAAO,EAAE,WAAW,EAAE,MAAM,CAC7B,CAAC;IACF,OAAO;AACL,QAAA,GAAG,OAAO;QACV,YAAY;KACb,CAAC;AACJ,EAAE;MA6CW,UAAU,GAAG,CAAC,EACzB,QAAQ,EACR,KAAK,EACL,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,gBAAgB,GAAG,MAAM,EACzB,WAAW,EAAE,mBAAmB,EAChC,QAAQ,EACR,kBAAkB,GAAG,EAAE,EACvB,IAAI,EAAE,cAAc,EACpB,WAAW,GAAG,KAAK,EACnB,YAAY,EACZ,gBAAgB,EAChB,GAAG,KAAK,EACQ,KAAI;IACpB,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AG,KAAK,CAAC,OAAO,EAAE,CAAC,KAAK,GAAG,IAAI,EAAE,CAAC;KACrD,EACD,EAAE,CACH,CAAC;AACF,IAAA,MAAM,cAAc,GAAG,WAAW,CAChC,KAAK,IAAG;AACN,QAAA,MAAM,EAAE,CAAC,KAAK,GAAG,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC;AAC9C,QAAA,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC;KACtB,EACD,EAAE,CACH,CAAC;AAEF,IAAA,MAAM,OAAO,IACXA,qBAAA,CAAC,gBAAgB,EACf,EAAA,gBAAgB,EAChB,IAAA,EAAA,SAAS,EAAE,KAAK,EAChB,mBAAmB,EAAE,KAAK,EAC1B,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,cAAc,EACxB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,EAAA,QAAA,EACxB,QAAQ,EAAA,CACQ,CACpB,CAAC;AAEF,IAAA,QACEA,qBAAC,CAAA,aAAa,CAAC,QAAQ,EAAA,EACrB,KAAK,EAAE;YACL,YAAY;YACZ,cAAc;AACd,YAAA,KAAK,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE;YACrC,YAAY;YACZ,gBAAgB;YAChB,WAAW;AACZ,SAAA,EAAA,QAAA,EACDA,sBAACC,KAAoB,EAAA,EACnB,YAAY,EAAE,gBAAgB,EAC9B,KAAK,EAAE,aAAa,EACpB,aAAa,EAAE,QAAQ,EACvB,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,gBAAgB,KAC1B,KAAK,EAAA,QAAA,EACR,YAAY,GAAG,OAAO,GAAG,QAAQ,EACb,CAAA,EAAA,CACA,EACzB;AACJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"select-trigger.cjs","sources":["../../../../v1/components/select/select-trigger.tsx"],"sourcesContent":["import {\n ComponentPropsWithoutRef,\n ElementRef,\n forwardRef,\n PropsWithChildren,\n} from \"react\";\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { cva, VariantProps } from \"class-variance-authority\";\nimport styles from \"./select.module.css\";\n\nexport interface AriaProps {\n \"aria-label\"?: string;\n \"aria-describedby\"?: string;\n \"aria-required\"?: boolean;\n \"aria-invalid\"?: boolean;\n}\n\nexport interface TriggerStyleProps {\n style?: React.CSSProperties;\n className?: string;\n stopPropagation?: boolean;\n}\n\nexport interface IconProps extends React.SVGAttributes<SVGElement> {\n children?: never;\n color?: string;\n}\n\nconst trigger = cva(styles.trigger, {\n variants: {\n size: {\n small: styles[\"trigger-small\"],\n medium: styles[\"trigger-medium\"],\n },\n variant: {\n outline: styles[\"trigger-outline\"],\n text: styles[\"trigger-text\"],\n },\n },\n defaultVariants: {\n size: \"medium\",\n variant: \"outline\",\n },\n});\n\nexport const SelectTrigger = forwardRef<\n ElementRef<typeof SelectPrimitive.Trigger>,\n ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> &\n PropsWithChildren<VariantProps<typeof trigger>> & {\n iconProps?: IconProps;\n } & AriaProps &\n TriggerStyleProps\n>(\n (\n {\n size,\n variant,\n className,\n children,\n iconProps = {},\n \"aria-label\": ariaLabel,\n style,\n stopPropagation = false,\n ...props\n },\n ref,\n ) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={trigger({ size, variant, className })}\n aria-label={ariaLabel || \"Select option\"}\n style={{\n ...style,\n display: \"flex\",\n justifyContent: \"space-between\",\n }}\n onPointerDown={e => {\n if (stopPropagation) {\n e.stopPropagation();\n }\n }}\n {...props}>\n <div className={styles.triggerContent}>{children}</div>\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon\n className={styles.triggerIcon}\n aria-hidden=\"true\"\n {...iconProps}\n />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n ),\n);\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n"],"names":["cva","styles","forwardRef","_jsxs","SelectPrim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AAM,CAAC,cAAc,EAAA,QAAA,EAAG,QAAQ,EAAO,CAAA,EACvDI,gCAAC,CAAAC,UAAoB,EAAA,EAAC,OAAO,EAAA,IAAA,EAAA,QAAA,EAC3BD,iCAACE,8BAAe,EAAA,EACd,SAAS,EAAEN,qBAAM,CAAC,WAAW,EACjB,aAAA,EAAA,MAAM,KACd,SAAS,EAAA,CACb,GACmB,CACC,EAAA,CAAA,CAC3B,EACD;AACF,aAAa,CAAC,WAAW,GAAGG,aAAuB,CAAC,WAAW;;;;"}
1
+ {"version":3,"file":"select-trigger.cjs","sources":["../../../../v1/components/select/select-trigger.tsx"],"sourcesContent":["import { ElementRef, forwardRef, SVGAttributes } from \"react\";\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { cva, VariantProps } from \"class-variance-authority\";\nimport styles from \"./select.module.css\";\n\nexport interface AriaProps {\n \"aria-label\"?: string;\n \"aria-describedby\"?: string;\n \"aria-required\"?: boolean;\n \"aria-invalid\"?: boolean;\n}\n\nexport interface TriggerStyleProps {\n style?: React.CSSProperties;\n className?: string;\n stopPropagation?: boolean;\n}\n\nexport interface IconProps extends SVGAttributes<SVGElement> {\n children?: never;\n color?: string;\n}\n\nconst trigger = cva(styles.trigger, {\n variants: {\n size: {\n small: styles[\"trigger-small\"],\n medium: styles[\"trigger-medium\"],\n },\n variant: {\n outline: styles[\"trigger-outline\"],\n text: styles[\"trigger-text\"],\n },\n },\n defaultVariants: {\n size: \"medium\",\n variant: \"outline\",\n },\n});\n\ntype SelectTriggerProps = SelectPrimitive.SelectTriggerProps &\n VariantProps<typeof trigger> & {\n iconProps?: IconProps;\n } & AriaProps &\n TriggerStyleProps;\n\nexport const SelectTrigger = forwardRef<\n ElementRef<typeof SelectPrimitive.Trigger>,\n SelectTriggerProps\n>(\n (\n {\n size,\n variant,\n className,\n children,\n iconProps = {},\n \"aria-label\": ariaLabel,\n style,\n stopPropagation = false,\n ...props\n },\n ref,\n ) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={trigger({ size, variant, className })}\n aria-label={ariaLabel || \"Select option\"}\n style={{\n ...style,\n display: \"flex\",\n justifyContent: \"space-between\",\n }}\n onPointerDown={e => {\n if (stopPropagation) {\n e.stopPropagation();\n }\n }}\n {...props}>\n <div className={styles.triggerContent}>{children}</div>\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon\n className={styles.triggerIcon}\n aria-hidden=\"true\"\n {...iconProps}\n />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n ),\n);\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n"],"names":["cva","styles","forwardRef","_jsxs","SelectPrimitive.Trigger","_jsx","SelectPrimitive.Icon","ChevronDownIcon"],"mappings":";;;;;;;;;AAwBA,MAAM,OAAO,GAAGA,WAAG,CAACC,qBAAM,CAAC,OAAO,EAAE;AAClC,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,KAAK,EAAEA,qBAAM,CAAC,eAAe,CAAC;AAC9B,YAAA,MAAM,EAAEA,qBAAM,CAAC,gBAAgB,CAAC;AACjC,SAAA;AACD,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAEA,qBAAM,CAAC,iBAAiB,CAAC;AAClC,YAAA,IAAI,EAAEA,qBAAM,CAAC,cAAc,CAAC;AAC7B,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,IAAI,EAAE,QAAQ;AACd,QAAA,OAAO,EAAE,SAAS;AACnB,KAAA;AACF,CAAA,CAAC,CAAC;AAQI,MAAM,aAAa,GAAGC,gBAAU,CAIrC,CACE,EACE,IAAI,EACJ,OAAO,EACP,SAAS,EACT,QAAQ,EACR,SAAS,GAAG,EAAE,EACd,YAAY,EAAE,SAAS,EACvB,KAAK,EACL,eAAe,GAAG,KAAK,EACvB,GAAG,KAAK,EACT,EACD,GAAG,MAEHC,iCAAC,CAAAC,aAAuB,EACtB,EAAA,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,EAAA,YAAA,EACpC,SAAS,IAAI,eAAe,EACxC,KAAK,EAAE;AACL,QAAA,GAAG,KAAK;AACR,QAAA,OAAO,EAAE,MAAM;AACf,QAAA,cAAc,EAAE,eAAe;AAChC,KAAA,EACD,aAAa,EAAE,CAAC,IAAG;QACjB,IAAI,eAAe,EAAE;YACnB,CAAC,CAAC,eAAe,EAAE,CAAC;SACrB;AACH,KAAC,KACG,KAAK,EAAA,QAAA,EAAA,CACTC,gCAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAEJ,qBAAM,CAAC,cAAc,EAAA,QAAA,EAAG,QAAQ,EAAO,CAAA,EACvDI,gCAAC,CAAAC,UAAoB,EAAA,EAAC,OAAO,EAAA,IAAA,EAAA,QAAA,EAC3BD,iCAACE,8BAAe,EAAA,EACd,SAAS,EAAEN,qBAAM,CAAC,WAAW,EACjB,aAAA,EAAA,MAAM,KACd,SAAS,EAAA,CACb,GACmB,CACC,EAAA,CAAA,CAC3B,EACD;AACF,aAAa,CAAC,WAAW,GAAGG,aAAuB,CAAC,WAAW;;;;"}
@@ -1,3 +1,4 @@
1
+ import { SVGAttributes } from "react";
1
2
  import * as SelectPrimitive from "@radix-ui/react-select";
2
3
  import { VariantProps } from "class-variance-authority";
3
4
  export interface AriaProps {
@@ -11,16 +12,14 @@ export interface TriggerStyleProps {
11
12
  className?: string;
12
13
  stopPropagation?: boolean;
13
14
  }
14
- export interface IconProps extends React.SVGAttributes<SVGElement> {
15
+ export interface IconProps extends SVGAttributes<SVGElement> {
15
16
  children?: never;
16
17
  color?: string;
17
18
  }
18
- export declare const SelectTrigger: import("react").ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
19
+ export declare const SelectTrigger: import("react").ForwardRefExoticComponent<SelectPrimitive.SelectTriggerProps & VariantProps<(props?: ({
19
20
  size?: "small" | "medium" | null | undefined;
20
21
  variant?: "text" | "outline" | null | undefined;
21
22
  } & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
22
- children?: import("react").ReactNode;
23
- } & {
24
23
  iconProps?: IconProps | undefined;
25
24
  } & AriaProps & TriggerStyleProps & import("react").RefAttributes<HTMLButtonElement>>;
26
25
  //# sourceMappingURL=select-trigger.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"select-trigger.d.ts","sourceRoot":"","sources":["../../../../v1/components/select/select-trigger.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAO,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAG7D,MAAM,WAAW,SAAS;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,SAAU,SAAQ,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC;IAChE,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAmBD,eAAO,MAAM,aAAa;;;;;;;qFA+CzB,CAAC"}
1
+ {"version":3,"file":"select-trigger.d.ts","sourceRoot":"","sources":["../../../../v1/components/select/select-trigger.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0B,aAAa,EAAE,MAAM,OAAO,CAAC;AAE9D,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAO,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAG7D,MAAM,WAAW,SAAS;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,SAAU,SAAQ,aAAa,CAAC,UAAU,CAAC;IAC1D,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAyBD,eAAO,MAAM,aAAa;;;;;qFA2CzB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"select-trigger.js","sources":["../../../../v1/components/select/select-trigger.tsx"],"sourcesContent":["import {\n ComponentPropsWithoutRef,\n ElementRef,\n forwardRef,\n PropsWithChildren,\n} from \"react\";\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { cva, VariantProps } from \"class-variance-authority\";\nimport styles from \"./select.module.css\";\n\nexport interface AriaProps {\n \"aria-label\"?: string;\n \"aria-describedby\"?: string;\n \"aria-required\"?: boolean;\n \"aria-invalid\"?: boolean;\n}\n\nexport interface TriggerStyleProps {\n style?: React.CSSProperties;\n className?: string;\n stopPropagation?: boolean;\n}\n\nexport interface IconProps extends React.SVGAttributes<SVGElement> {\n children?: never;\n color?: string;\n}\n\nconst trigger = cva(styles.trigger, {\n variants: {\n size: {\n small: styles[\"trigger-small\"],\n medium: styles[\"trigger-medium\"],\n },\n variant: {\n outline: styles[\"trigger-outline\"],\n text: styles[\"trigger-text\"],\n },\n },\n defaultVariants: {\n size: \"medium\",\n variant: \"outline\",\n },\n});\n\nexport const SelectTrigger = forwardRef<\n ElementRef<typeof SelectPrimitive.Trigger>,\n ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> &\n PropsWithChildren<VariantProps<typeof trigger>> & {\n iconProps?: IconProps;\n } & AriaProps &\n TriggerStyleProps\n>(\n (\n {\n size,\n variant,\n className,\n children,\n iconProps = {},\n \"aria-label\": ariaLabel,\n style,\n stopPropagation = false,\n ...props\n },\n ref,\n ) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={trigger({ size, variant, className })}\n aria-label={ariaLabel || \"Select option\"}\n style={{\n ...style,\n display: \"flex\",\n justifyContent: \"space-between\",\n }}\n onPointerDown={e => {\n if (stopPropagation) {\n e.stopPropagation();\n }\n }}\n {...props}>\n <div className={styles.triggerContent}>{children}</div>\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon\n className={styles.triggerIcon}\n aria-hidden=\"true\"\n {...iconProps}\n />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n ),\n);\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n"],"names":["_jsxs","SelectPrimitive.Trigger","_jsx","SelectPrimitive.Icon"],"mappings":";;;;;;;AA6BA,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,EAAE;AAClC,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,KAAK,EAAE,MAAM,CAAC,eAAe,CAAC;AAC9B,YAAA,MAAM,EAAE,MAAM,CAAC,gBAAgB,CAAC;AACjC,SAAA;AACD,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,MAAM,CAAC,iBAAiB,CAAC;AAClC,YAAA,IAAI,EAAE,MAAM,CAAC,cAAc,CAAC;AAC7B,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,IAAI,EAAE,QAAQ;AACd,QAAA,OAAO,EAAE,SAAS;AACnB,KAAA;AACF,CAAA,CAAC,CAAC;AAEI,MAAM,aAAa,GAAG,UAAU,CAQrC,CACE,EACE,IAAI,EACJ,OAAO,EACP,SAAS,EACT,QAAQ,EACR,SAAS,GAAG,EAAE,EACd,YAAY,EAAE,SAAS,EACvB,KAAK,EACL,eAAe,GAAG,KAAK,EACvB,GAAG,KAAK,EACT,EACD,GAAG,MAEHA,sBAAC,CAAAC,OAAuB,EACtB,EAAA,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,EAAA,YAAA,EACpC,SAAS,IAAI,eAAe,EACxC,KAAK,EAAE;AACL,QAAA,GAAG,KAAK;AACR,QAAA,OAAO,EAAE,MAAM;AACf,QAAA,cAAc,EAAE,eAAe;AAChC,KAAA,EACD,aAAa,EAAE,CAAC,IAAG;QACjB,IAAI,eAAe,EAAE;YACnB,CAAC,CAAC,eAAe,EAAE,CAAC;SACrB;AACH,KAAC,KACG,KAAK,EAAA,QAAA,EAAA,CACTC,qBAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,cAAc,EAAA,QAAA,EAAG,QAAQ,EAAO,CAAA,EACvDA,qBAAC,CAAAC,IAAoB,EAAA,EAAC,OAAO,EAAA,IAAA,EAAA,QAAA,EAC3BD,sBAAC,eAAe,EAAA,EACd,SAAS,EAAE,MAAM,CAAC,WAAW,EACjB,aAAA,EAAA,MAAM,KACd,SAAS,EAAA,CACb,GACmB,CACC,EAAA,CAAA,CAC3B,EACD;AACF,aAAa,CAAC,WAAW,GAAGD,OAAuB,CAAC,WAAW;;;;"}
1
+ {"version":3,"file":"select-trigger.js","sources":["../../../../v1/components/select/select-trigger.tsx"],"sourcesContent":["import { ElementRef, forwardRef, SVGAttributes } from \"react\";\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { cva, VariantProps } from \"class-variance-authority\";\nimport styles from \"./select.module.css\";\n\nexport interface AriaProps {\n \"aria-label\"?: string;\n \"aria-describedby\"?: string;\n \"aria-required\"?: boolean;\n \"aria-invalid\"?: boolean;\n}\n\nexport interface TriggerStyleProps {\n style?: React.CSSProperties;\n className?: string;\n stopPropagation?: boolean;\n}\n\nexport interface IconProps extends SVGAttributes<SVGElement> {\n children?: never;\n color?: string;\n}\n\nconst trigger = cva(styles.trigger, {\n variants: {\n size: {\n small: styles[\"trigger-small\"],\n medium: styles[\"trigger-medium\"],\n },\n variant: {\n outline: styles[\"trigger-outline\"],\n text: styles[\"trigger-text\"],\n },\n },\n defaultVariants: {\n size: \"medium\",\n variant: \"outline\",\n },\n});\n\ntype SelectTriggerProps = SelectPrimitive.SelectTriggerProps &\n VariantProps<typeof trigger> & {\n iconProps?: IconProps;\n } & AriaProps &\n TriggerStyleProps;\n\nexport const SelectTrigger = forwardRef<\n ElementRef<typeof SelectPrimitive.Trigger>,\n SelectTriggerProps\n>(\n (\n {\n size,\n variant,\n className,\n children,\n iconProps = {},\n \"aria-label\": ariaLabel,\n style,\n stopPropagation = false,\n ...props\n },\n ref,\n ) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={trigger({ size, variant, className })}\n aria-label={ariaLabel || \"Select option\"}\n style={{\n ...style,\n display: \"flex\",\n justifyContent: \"space-between\",\n }}\n onPointerDown={e => {\n if (stopPropagation) {\n e.stopPropagation();\n }\n }}\n {...props}>\n <div className={styles.triggerContent}>{children}</div>\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon\n className={styles.triggerIcon}\n aria-hidden=\"true\"\n {...iconProps}\n />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n ),\n);\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n"],"names":["_jsxs","SelectPrimitive.Trigger","_jsx","SelectPrimitive.Icon"],"mappings":";;;;;;;AAwBA,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,EAAE;AAClC,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,KAAK,EAAE,MAAM,CAAC,eAAe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ACb,GACmB,CACC,EAAA,CAAA,CAC3B,EACD;AACF,aAAa,CAAC,WAAW,GAAGD,OAAuB,CAAC,WAAW;;;;"}
@@ -6,9 +6,10 @@ var selectContent = require('./select-content.cjs');
6
6
  var selectItem = require('./select-item.cjs');
7
7
  var selectValue = require('./select-value.cjs');
8
8
  var selectRoot = require('./select-root.cjs');
9
+ var selectMisc = require('./select-misc.cjs');
9
10
 
10
11
  const Select = Object.assign(selectRoot.SelectRoot, {
11
- Group: index.Group,
12
+ Group: selectMisc.SelectGroup,
12
13
  Value: selectValue.SelectValue,
13
14
  ScrollUpButton: index.ScrollDownButton,
14
15
  ScrollDownButton: index.ScrollDownButton,
@@ -16,7 +17,8 @@ const Select = Object.assign(selectRoot.SelectRoot, {
16
17
  Trigger: selectTrigger.SelectTrigger,
17
18
  Content: selectContent.SelectContent,
18
19
  Item: selectItem.SelectItem,
19
- Separator: index.Separator,
20
+ Separator: selectMisc.SelectSeparator,
21
+ Label: selectMisc.SelectLabel,
20
22
  });
21
23
 
22
24
  exports.Select = Select;
@@ -1 +1 @@
1
- {"version":3,"file":"select.cjs","sources":["../../../../v1/components/select/select.tsx"],"sourcesContent":["import * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { SelectTrigger } from \"./select-trigger\";\nimport { SelectContent } from \"./select-content\";\nimport { SelectItem } from \"./select-item\";\nimport { SelectValue } from \"./select-value\";\nimport { SelectRoot } from \"./select-root\";\n\nexport const Select = Object.assign(SelectRoot, {\n Group: SelectPrimitive.Group,\n Value: SelectValue,\n ScrollUpButton: SelectPrimitive.ScrollDownButton,\n ScrollDownButton: SelectPrimitive.ScrollDownButton,\n Viewport: SelectPrimitive.Viewport,\n Trigger: SelectTrigger,\n Content: SelectContent,\n Item: SelectItem,\n Separator: SelectPrimitive.Separator,\n});\n"],"names":["SelectRoot","SelectPrimitive.Group","SelectValue","SelectPrimitive.ScrollDownButton","SelectPrimitive.Viewport","SelectTrigger","SelectContent","SelectItem","SelectPrimitive.Separator"],"mappings":";;;;;;;;;MAOa,MAAM,GAAG,MAAM,CAAC,MAAM,CAACA,qBAAU,EAAE;IAC9C,KAAK,EAAEC,WAAqB;AAC5B,IAAA,KAAK,EAAEC,uBAAW;IAClB,cAAc,EAAEC,sBAAgC;IAChD,gBAAgB,EAAEA,sBAAgC;IAClD,QAAQ,EAAEC,cAAwB;AAClC,IAAA,OAAO,EAAEC,2BAAa;AACtB,IAAA,OAAO,EAAEC,2BAAa;AACtB,IAAA,IAAI,EAAEC,qBAAU;IAChB,SAAS,EAAEC,eAAyB;AACrC,CAAA;;;;"}
1
+ {"version":3,"file":"select.cjs","sources":["../../../../v1/components/select/select.tsx"],"sourcesContent":["import * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { SelectTrigger } from \"./select-trigger\";\nimport { SelectContent } from \"./select-content\";\nimport { SelectItem } from \"./select-item\";\nimport { SelectValue } from \"./select-value\";\nimport { SelectRoot } from \"./select-root\";\nimport { SelectGroup, SelectLabel, SelectSeparator } from \"./select-misc\";\n\nexport const Select = Object.assign(SelectRoot, {\n Group: SelectGroup,\n Value: SelectValue,\n ScrollUpButton: SelectPrimitive.ScrollDownButton,\n ScrollDownButton: SelectPrimitive.ScrollDownButton,\n Viewport: SelectPrimitive.Viewport,\n Trigger: SelectTrigger,\n Content: SelectContent,\n Item: SelectItem,\n Separator: SelectSeparator,\n Label: SelectLabel,\n});\n"],"names":["SelectRoot","SelectGroup","SelectValue","SelectPrimitive.ScrollDownButton","SelectPrimitive.Viewport","SelectTrigger","SelectContent","SelectItem","SelectSeparator","SelectLabel"],"mappings":";;;;;;;;;;MAQa,MAAM,GAAG,MAAM,CAAC,MAAM,CAACA,qBAAU,EAAE;AAC9C,IAAA,KAAK,EAAEC,sBAAW;AAClB,IAAA,KAAK,EAAEC,uBAAW;IAClB,cAAc,EAAEC,sBAAgC;IAChD,gBAAgB,EAAEA,sBAAgC;IAClD,QAAQ,EAAEC,cAAwB;AAClC,IAAA,OAAO,EAAEC,2BAAa;AACtB,IAAA,OAAO,EAAEC,2BAAa;AACtB,IAAA,IAAI,EAAEC,qBAAU;AAChB,IAAA,SAAS,EAAEC,0BAAe;AAC1B,IAAA,KAAK,EAAEC,sBAAW;AACnB,CAAA;;;;"}
@@ -1,23 +1,22 @@
1
1
  import * as SelectPrimitive from "@radix-ui/react-select";
2
- export declare const Select: (({ children, value, onValueChange, defaultValue, ...props }: SelectPrimitive.SelectProps) => import("react/jsx-runtime").JSX.Element) & {
2
+ export declare const Select: (({ children, value, onValueChange, defaultValue, autocomplete, autocompleteMode, searchValue: providedSearchValue, onSearch, defaultSearchValue, open: controlledOpen, defaultOpen, onOpenChange, htmlAutoComplete, ...props }: import("./select-root").SelectRootProps) => import("react/jsx-runtime").JSX.Element) & {
3
3
  Group: import("react").ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & import("react").RefAttributes<HTMLDivElement>>;
4
4
  Value: import("react").ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & import("react").RefAttributes<HTMLSpanElement>>;
5
5
  ScrollUpButton: import("react").ForwardRefExoticComponent<SelectPrimitive.SelectScrollDownButtonProps & import("react").RefAttributes<HTMLDivElement>>;
6
6
  ScrollDownButton: import("react").ForwardRefExoticComponent<SelectPrimitive.SelectScrollDownButtonProps & import("react").RefAttributes<HTMLDivElement>>;
7
7
  Viewport: import("react").ForwardRefExoticComponent<SelectPrimitive.SelectViewportProps & import("react").RefAttributes<HTMLDivElement>>;
8
- Trigger: import("react").ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("class-variance-authority").VariantProps<(props?: ({
8
+ Trigger: import("react").ForwardRefExoticComponent<SelectPrimitive.SelectTriggerProps & import("class-variance-authority").VariantProps<(props?: ({
9
9
  size?: "small" | "medium" | null | undefined;
10
10
  variant?: "text" | "outline" | null | undefined;
11
11
  } & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
12
- children?: import("react").ReactNode;
13
- } & {
14
12
  iconProps?: import("./select-trigger").IconProps | undefined;
15
13
  } & import("./select-trigger").AriaProps & import("./select-trigger").TriggerStyleProps & import("react").RefAttributes<HTMLButtonElement>>;
16
- Content: import("react").ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
17
- Item: import("react").ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
14
+ Content: import("react").ForwardRefExoticComponent<import("./select-content").SelectContentProps & import("react").RefAttributes<HTMLDivElement>>;
15
+ Item: import("react").ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps, "asChild"> & {
18
16
  textProps?: import("../text").TextProps | undefined;
19
17
  leadingIcon?: import("react").ReactNode;
20
18
  } & import("react").RefAttributes<HTMLDivElement>>;
21
19
  Separator: import("react").ForwardRefExoticComponent<SelectPrimitive.SelectSeparatorProps & import("react").RefAttributes<HTMLDivElement>>;
20
+ Label: import("react").ForwardRefExoticComponent<SelectPrimitive.SelectLabelProps & import("react").RefAttributes<HTMLDivElement>>;
22
21
  };
23
22
  //# sourceMappingURL=select.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../v1/components/select/select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAO1D,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;CAUjB,CAAC"}
1
+ {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../v1/components/select/select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAQ1D,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;CAWjB,CAAC"}
@@ -1,12 +1,13 @@
1
- import { Group, ScrollDownButton, Viewport, Separator } from '../../node_modules/.pnpm/@radix-ui_react-select@2.2.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-select/dist/index.js';
1
+ import { ScrollDownButton, Viewport } from '../../node_modules/.pnpm/@radix-ui_react-select@2.2.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-select/dist/index.js';
2
2
  import { SelectTrigger } from './select-trigger.js';
3
3
  import { SelectContent } from './select-content.js';
4
4
  import { SelectItem } from './select-item.js';
5
5
  import { SelectValue } from './select-value.js';
6
6
  import { SelectRoot } from './select-root.js';
7
+ import { SelectGroup, SelectSeparator, SelectLabel } from './select-misc.js';
7
8
 
8
9
  const Select = Object.assign(SelectRoot, {
9
- Group: Group,
10
+ Group: SelectGroup,
10
11
  Value: SelectValue,
11
12
  ScrollUpButton: ScrollDownButton,
12
13
  ScrollDownButton: ScrollDownButton,
@@ -14,7 +15,8 @@ const Select = Object.assign(SelectRoot, {
14
15
  Trigger: SelectTrigger,
15
16
  Content: SelectContent,
16
17
  Item: SelectItem,
17
- Separator: Separator,
18
+ Separator: SelectSeparator,
19
+ Label: SelectLabel,
18
20
  });
19
21
 
20
22
  export { Select };