@raystack/apsara 0.46.0-rc.4 → 0.46.0

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 (119) hide show
  1. package/dist/_virtual/index.cjs +2 -2
  2. package/dist/_virtual/index.js +2 -2
  3. package/dist/_virtual/index2.cjs +2 -2
  4. package/dist/_virtual/index2.js +2 -2
  5. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.cjs +1 -1
  6. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
  7. package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@18.2.0/node_modules/use-sync-external-store/shim/index.cjs +1 -1
  8. package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@18.2.0/node_modules/use-sync-external-store/shim/index.js +1 -1
  9. package/dist/style.css +1 -1
  10. package/dist/v1/components/avatar/avatar.cjs +18 -2
  11. package/dist/v1/components/avatar/avatar.cjs.map +1 -1
  12. package/dist/v1/components/avatar/avatar.d.ts +2 -1
  13. package/dist/v1/components/avatar/avatar.d.ts.map +1 -1
  14. package/dist/v1/components/avatar/avatar.js +18 -3
  15. package/dist/v1/components/avatar/avatar.js.map +1 -1
  16. package/dist/v1/components/avatar/utils.cjs +14 -34
  17. package/dist/v1/components/avatar/utils.cjs.map +1 -1
  18. package/dist/v1/components/avatar/utils.d.ts +1 -4
  19. package/dist/v1/components/avatar/utils.d.ts.map +1 -1
  20. package/dist/v1/components/avatar/utils.js +15 -34
  21. package/dist/v1/components/avatar/utils.js.map +1 -1
  22. package/dist/v1/components/breadcrumb/breadcrumb.cjs +35 -19
  23. package/dist/v1/components/breadcrumb/breadcrumb.cjs.map +1 -1
  24. package/dist/v1/components/breadcrumb/breadcrumb.d.ts +15 -12
  25. package/dist/v1/components/breadcrumb/breadcrumb.d.ts.map +1 -1
  26. package/dist/v1/components/breadcrumb/breadcrumb.js +37 -21
  27. package/dist/v1/components/breadcrumb/breadcrumb.js.map +1 -1
  28. package/dist/v1/components/dropdown-menu/dropdown-menu-content.cjs +5 -5
  29. package/dist/v1/components/dropdown-menu/dropdown-menu-content.cjs.map +1 -1
  30. package/dist/v1/components/dropdown-menu/dropdown-menu-content.d.ts +3 -3
  31. package/dist/v1/components/dropdown-menu/dropdown-menu-content.d.ts.map +1 -1
  32. package/dist/v1/components/dropdown-menu/dropdown-menu-content.js +5 -5
  33. package/dist/v1/components/dropdown-menu/dropdown-menu-content.js.map +1 -1
  34. package/dist/v1/components/icon-button/icon-button.cjs +8 -7
  35. package/dist/v1/components/icon-button/icon-button.cjs.map +1 -1
  36. package/dist/v1/components/icon-button/icon-button.d.ts +1 -1
  37. package/dist/v1/components/icon-button/icon-button.d.ts.map +1 -1
  38. package/dist/v1/components/icon-button/icon-button.js +8 -7
  39. package/dist/v1/components/icon-button/icon-button.js.map +1 -1
  40. package/dist/v1/components/select/select-content.cjs +16 -7
  41. package/dist/v1/components/select/select-content.cjs.map +1 -1
  42. package/dist/v1/components/select/select-content.d.ts +1 -1
  43. package/dist/v1/components/select/select-content.d.ts.map +1 -1
  44. package/dist/v1/components/select/select-content.js +16 -7
  45. package/dist/v1/components/select/select-content.js.map +1 -1
  46. package/dist/v1/components/select/select-item.cjs +19 -18
  47. package/dist/v1/components/select/select-item.cjs.map +1 -1
  48. package/dist/v1/components/select/select-item.d.ts +1 -3
  49. package/dist/v1/components/select/select-item.d.ts.map +1 -1
  50. package/dist/v1/components/select/select-item.js +19 -18
  51. package/dist/v1/components/select/select-item.js.map +1 -1
  52. package/dist/v1/components/select/select-multiple-value.cjs +67 -0
  53. package/dist/v1/components/select/select-multiple-value.cjs.map +1 -0
  54. package/dist/v1/components/select/select-multiple-value.d.ts +8 -0
  55. package/dist/v1/components/select/select-multiple-value.d.ts.map +1 -0
  56. package/dist/v1/components/select/select-multiple-value.js +65 -0
  57. package/dist/v1/components/select/select-multiple-value.js.map +1 -0
  58. package/dist/v1/components/select/select-root.cjs +64 -22
  59. package/dist/v1/components/select/select-root.cjs.map +1 -1
  60. package/dist/v1/components/select/select-root.d.ts +25 -26
  61. package/dist/v1/components/select/select-root.d.ts.map +1 -1
  62. package/dist/v1/components/select/select-root.js +64 -22
  63. package/dist/v1/components/select/select-root.js.map +1 -1
  64. package/dist/v1/components/select/select-trigger.cjs +18 -20
  65. package/dist/v1/components/select/select-trigger.cjs.map +1 -1
  66. package/dist/v1/components/select/select-trigger.d.ts +10 -18
  67. package/dist/v1/components/select/select-trigger.d.ts.map +1 -1
  68. package/dist/v1/components/select/select-trigger.js +16 -18
  69. package/dist/v1/components/select/select-trigger.js.map +1 -1
  70. package/dist/v1/components/select/select-value.cjs +23 -7
  71. package/dist/v1/components/select/select-value.cjs.map +1 -1
  72. package/dist/v1/components/select/select-value.d.ts +8 -2
  73. package/dist/v1/components/select/select-value.d.ts.map +1 -1
  74. package/dist/v1/components/select/select-value.js +22 -6
  75. package/dist/v1/components/select/select-value.js.map +1 -1
  76. package/dist/v1/components/select/select.d.ts +11 -9
  77. package/dist/v1/components/select/select.d.ts.map +1 -1
  78. package/dist/v1/components/select/select.module.css.cjs +1 -1
  79. package/dist/v1/components/select/select.module.css.js +1 -1
  80. package/dist/v1/components/select/types.d.ts +7 -0
  81. package/dist/v1/components/select/types.d.ts.map +1 -0
  82. package/dist/v1/components/sidebar/sidebar.cjs +26 -26
  83. package/dist/v1/components/sidebar/sidebar.cjs.map +1 -1
  84. package/dist/v1/components/sidebar/sidebar.d.ts +8 -8
  85. package/dist/v1/components/sidebar/sidebar.d.ts.map +1 -1
  86. package/dist/v1/components/sidebar/sidebar.js +26 -26
  87. package/dist/v1/components/sidebar/sidebar.js.map +1 -1
  88. package/dist/v1/components/tooltip/tooltip.cjs +34 -12
  89. package/dist/v1/components/tooltip/tooltip.cjs.map +1 -1
  90. package/dist/v1/components/tooltip/tooltip.d.ts +16 -9
  91. package/dist/v1/components/tooltip/tooltip.d.ts.map +1 -1
  92. package/dist/v1/components/tooltip/tooltip.js +35 -13
  93. package/dist/v1/components/tooltip/tooltip.js.map +1 -1
  94. package/dist/v1/components/tooltip/tooltip.module.css.cjs +1 -1
  95. package/dist/v1/components/tooltip/tooltip.module.css.js +1 -1
  96. package/dist/v1/components/tooltip/utils.cjs +30 -0
  97. package/dist/v1/components/tooltip/utils.cjs.map +1 -0
  98. package/dist/v1/components/tooltip/utils.d.ts +10 -0
  99. package/dist/v1/components/tooltip/utils.d.ts.map +1 -0
  100. package/dist/v1/components/tooltip/utils.js +28 -0
  101. package/dist/v1/components/tooltip/utils.js.map +1 -0
  102. package/dist/v1/hooks/index.cjs +2 -0
  103. package/dist/v1/hooks/index.cjs.map +1 -1
  104. package/dist/v1/hooks/index.d.ts +2 -1
  105. package/dist/v1/hooks/index.d.ts.map +1 -1
  106. package/dist/v1/hooks/index.js +1 -0
  107. package/dist/v1/hooks/index.js.map +1 -1
  108. package/dist/v1/hooks/useMouse.cjs +53 -0
  109. package/dist/v1/hooks/useMouse.cjs.map +1 -0
  110. package/dist/v1/hooks/useMouse.d.ts +20 -0
  111. package/dist/v1/hooks/useMouse.d.ts.map +1 -0
  112. package/dist/v1/hooks/useMouse.js +51 -0
  113. package/dist/v1/hooks/useMouse.js.map +1 -0
  114. 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 +0 -2
  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.map +1 -1
  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.js +1 -2
  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.map +1 -1
  118. package/dist/v1/style.css +1 -1
  119. package/package.json +1 -1
@@ -1,11 +1,31 @@
1
1
  import { j as jsxRuntimeExports } from '../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js';
2
2
  import { DotsHorizontalIcon, ChevronDownIcon } from '../../node_modules/.pnpm/@radix-ui_react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js';
3
- import { cva } from '../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js';
4
- import { forwardRef } from 'react';
3
+ import { cx, cva } from '../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js';
4
+ import { forwardRef, useMemo, cloneElement } from 'react';
5
5
  import { DropdownMenu } from '../dropdown-menu/dropdown-menu.js';
6
6
  import styles from './breadcrumb.module.css.js';
7
7
 
8
- const breadcrumb = cva(styles['breadcrumb'], {
8
+ const BreadcrumbItem = ({ as = jsxRuntimeExports.jsx("a", {}), onItemClick, ...props }) => {
9
+ const { label, href, icon, dropdownItems, isActive } = props;
10
+ if (label === 'ellipsis') {
11
+ return (jsxRuntimeExports.jsx("span", { className: styles['breadcrumb-ellipsis'], children: jsxRuntimeExports.jsx(DotsHorizontalIcon, {}) }));
12
+ }
13
+ if (dropdownItems) {
14
+ return (jsxRuntimeExports.jsxs(DropdownMenu, { children: [jsxRuntimeExports.jsxs(DropdownMenu.Trigger, { className: styles['breadcrumb-dropdown-trigger'], children: [icon && jsxRuntimeExports.jsx("span", { className: styles['breadcrumb-icon'], children: icon }), jsxRuntimeExports.jsx("span", { children: label }), jsxRuntimeExports.jsx(ChevronDownIcon, { className: styles['breadcrumb-dropdown-icon'] })] }), jsxRuntimeExports.jsx(DropdownMenu.Content, { className: styles['breadcrumb-dropdown-content'], children: dropdownItems.map((dropdownItem, dropdownIndex) => (jsxRuntimeExports.jsx(DropdownMenu.Item, { className: styles['breadcrumb-dropdown-item'], onSelect: () => onItemClick?.(dropdownItem), children: dropdownItem.label }, dropdownIndex))) })] }));
15
+ }
16
+ return cloneElement(as, {
17
+ className: cx(styles['breadcrumb-link'], isActive && styles['breadcrumb-link-active']),
18
+ onClick: (e) => {
19
+ if (onItemClick && href !== '#') {
20
+ e.preventDefault();
21
+ onItemClick(props);
22
+ }
23
+ },
24
+ href,
25
+ ...as.props
26
+ }, jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [icon && jsxRuntimeExports.jsx("span", { className: styles['breadcrumb-icon'], children: icon }), jsxRuntimeExports.jsx("span", { children: label })] }));
27
+ };
28
+ const breadcrumbVariants = cva(styles['breadcrumb'], {
9
29
  variants: {
10
30
  size: {
11
31
  small: styles['breadcrumb-small'],
@@ -17,24 +37,20 @@ const breadcrumb = cva(styles['breadcrumb'], {
17
37
  }
18
38
  });
19
39
  const Breadcrumb = forwardRef(({ className, size = 'medium', items, maxVisibleItems, separator = '/', onItemClick, ...props }, ref) => {
20
- const visibleItems = maxVisibleItems && items.length > maxVisibleItems
21
- ? [
22
- ...items.slice(0, 1),
23
- { label: 'ellipsis', href: '#' },
24
- ...items.slice(-Math.min(maxVisibleItems - 1, items.length - 1))
25
- ]
26
- : items;
27
- const renderItem = (item, index, isLast) => (jsxRuntimeExports.jsxs("li", { className: styles['breadcrumb-item'], children: [item.label === 'ellipsis' ? (jsxRuntimeExports.jsx("span", { className: styles['breadcrumb-ellipsis'], children: jsxRuntimeExports.jsx(DotsHorizontalIcon, {}) })) : item?.dropdownItems ? (jsxRuntimeExports.jsxs(DropdownMenu, { children: [jsxRuntimeExports.jsxs(DropdownMenu.Trigger, { className: styles['breadcrumb-dropdown-trigger'], children: [item.icon && (jsxRuntimeExports.jsx("span", { className: styles['breadcrumb-icon'], children: item.icon })), jsxRuntimeExports.jsx("span", { children: item.label }), jsxRuntimeExports.jsx(ChevronDownIcon, { className: styles['breadcrumb-dropdown-icon'] })] }), jsxRuntimeExports.jsx(DropdownMenu.Content, { className: styles['breadcrumb-dropdown-content'], children: item.dropdownItems.map((dropdownItem, dropdownIndex) => (jsxRuntimeExports.jsx(DropdownMenu.Item, { className: styles['breadcrumb-dropdown-item'], onClick: () => onItemClick &&
28
- onItemClick({
29
- label: dropdownItem.label,
30
- href: dropdownItem.href
31
- }), children: dropdownItem.label }, dropdownIndex))) })] })) : (jsxRuntimeExports.jsxs("a", { href: item.href, className: `${styles['breadcrumb-link']} ${isLast ? styles['breadcrumb-link-active'] : ''}`, onClick: e => {
32
- if (onItemClick && item.href !== '#') {
33
- e.preventDefault();
34
- onItemClick(item);
35
- }
36
- }, children: [item.icon && (jsxRuntimeExports.jsx("span", { className: styles['breadcrumb-icon'], children: item.icon })), jsxRuntimeExports.jsx("span", { children: item.label })] })), !isLast && (jsxRuntimeExports.jsx("span", { className: styles['breadcrumb-separator'], children: separator }))] }, index));
37
- return (jsxRuntimeExports.jsx("nav", { className: breadcrumb({ size: size, className }), ref: ref, ...props, children: jsxRuntimeExports.jsx("ol", { className: styles['breadcrumb-list'], children: visibleItems.map((item, index) => renderItem(item, index, index === visibleItems.length - 1)) }) }));
40
+ const visibleItems = useMemo(() => {
41
+ if (maxVisibleItems && items.length > maxVisibleItems) {
42
+ return [
43
+ ...items.slice(0, 1),
44
+ { label: 'ellipsis', href: '#' },
45
+ ...items.slice(-Math.min(maxVisibleItems - 1, items.length - 1))
46
+ ];
47
+ }
48
+ return items;
49
+ }, [maxVisibleItems, items]);
50
+ return (jsxRuntimeExports.jsx("nav", { className: breadcrumbVariants({ size, className }), ref: ref, ...props, children: jsxRuntimeExports.jsx("ol", { className: styles['breadcrumb-list'], children: visibleItems.map((item, index) => {
51
+ const isLast = index === visibleItems.length - 1;
52
+ return (jsxRuntimeExports.jsxs("li", { className: styles['breadcrumb-item'], children: [jsxRuntimeExports.jsx(BreadcrumbItem, { ...item, isActive: isLast, onItemClick: onItemClick }), !isLast && (jsxRuntimeExports.jsx("span", { className: styles['breadcrumb-separator'], children: separator }))] }, index));
53
+ }) }) }));
38
54
  });
39
55
  Breadcrumb.displayName = 'Breadcrumb';
40
56
 
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb.js","sources":["../../../../v1/components/breadcrumb/breadcrumb.tsx"],"sourcesContent":["import { ChevronDownIcon, DotsHorizontalIcon } from '@radix-ui/react-icons';\nimport { type VariantProps, cva } from 'class-variance-authority';\nimport React, { forwardRef, PropsWithChildren } from 'react';\n\nimport { DropdownMenu } from '../dropdown-menu';\nimport styles from './breadcrumb.module.css';\n\ninterface BreadcrumbItem {\n label: string;\n href: string;\n icon?: React.ReactNode;\n dropdownItems?: Array<{ label: string; href: string }>;\n}\n\nconst breadcrumb = cva(styles['breadcrumb'], {\n variants: {\n size: {\n small: styles['breadcrumb-small'],\n medium: styles['breadcrumb-medium']\n }\n },\n defaultVariants: {\n size: 'medium'\n }\n});\n\ntype BreadcrumbProps = PropsWithChildren<\n Omit<VariantProps<typeof breadcrumb>, 'size'>\n> & {\n items: BreadcrumbItem[];\n maxVisibleItems?: number;\n separator?: React.ReactNode;\n onItemClick?: (item: BreadcrumbItem) => void;\n className?: string;\n size?: 'small' | 'medium';\n};\n\nexport const Breadcrumb = forwardRef<HTMLDivElement, BreadcrumbProps>(\n (\n {\n className,\n size = 'medium',\n items,\n maxVisibleItems,\n separator = '/',\n onItemClick,\n ...props\n },\n ref\n ) => {\n const visibleItems =\n maxVisibleItems && items.length > maxVisibleItems\n ? [\n ...items.slice(0, 1),\n { label: 'ellipsis', href: '#' },\n ...items.slice(-Math.min(maxVisibleItems - 1, items.length - 1))\n ]\n : items;\n\n const renderItem = (\n item: BreadcrumbItem,\n index: number,\n isLast: boolean\n ) => (\n <li key={index} className={styles['breadcrumb-item']}>\n {item.label === 'ellipsis' ? (\n <span className={styles['breadcrumb-ellipsis']}>\n <DotsHorizontalIcon />\n </span>\n ) : item?.dropdownItems ? (\n <DropdownMenu>\n <DropdownMenu.Trigger\n className={styles['breadcrumb-dropdown-trigger']}\n >\n {item.icon && (\n <span className={styles['breadcrumb-icon']}>{item.icon}</span>\n )}\n <span>{item.label}</span>\n <ChevronDownIcon className={styles['breadcrumb-dropdown-icon']} />\n </DropdownMenu.Trigger>\n <DropdownMenu.Content\n className={styles['breadcrumb-dropdown-content']}\n >\n {item.dropdownItems.map((dropdownItem, dropdownIndex) => (\n <DropdownMenu.Item\n key={dropdownIndex}\n className={styles['breadcrumb-dropdown-item']}\n onClick={() =>\n onItemClick &&\n onItemClick({\n label: dropdownItem.label,\n href: dropdownItem.href\n })\n }\n >\n {dropdownItem.label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu.Content>\n </DropdownMenu>\n ) : (\n <a\n href={item.href}\n className={`${styles['breadcrumb-link']} ${isLast ? styles['breadcrumb-link-active'] : ''}`}\n onClick={e => {\n if (onItemClick && item.href !== '#') {\n e.preventDefault();\n onItemClick(item);\n }\n }}\n >\n {item.icon && (\n <span className={styles['breadcrumb-icon']}>{item.icon}</span>\n )}\n <span>{item.label}</span>\n </a>\n )}\n {!isLast && (\n <span className={styles['breadcrumb-separator']}>{separator}</span>\n )}\n </li>\n );\n\n return (\n <nav\n className={breadcrumb({ size: size as 'small' | 'medium', className })}\n ref={ref}\n {...props}\n >\n <ol className={styles['breadcrumb-list']}>\n {visibleItems.map((item, index) =>\n renderItem(item, index, index === visibleItems.length - 1)\n )}\n </ol>\n </nav>\n );\n }\n);\n\nBreadcrumb.displayName = 'Breadcrumb';\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;AAcA,MAAM,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE;AAC3C,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,KAAK,EAAE,MAAM,CAAC,kBAAkB,CAAC;AACjC,YAAA,MAAM,EAAE,MAAM,CAAC,mBAAmB,CAAC;AACpC,SAAA;AACF,KAAA;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,CAAC,YAAG,IAAI,CAAC,IAAI,EAAQ,CAAA,CAC/D,EACDA,qBAAA,CAAA,MAAA,EAAA,EAAA,QAAA,EAAO,IAAI,CAAC,KAAK,EAAQ,CAAA,CAAA,EAAA,CACvB,CACL,EACA,CAAC,MAAM,KACNA,qBAAM,CAAA,MAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,sBAAsB,CAAC,YAAG,SAAS,EAAA,CAAQ,CACpE,CAvDM,EAAA,EAAA,KAAK,CAwDT,CACN,CAAC;IAEF,QACEA,qBACE,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,UAAU,CAAC,EAAE,IAAI,EAAE,IAA0B,EAAE,SAAS,EAAE,CAAC,EACtE,GAAG,EAAE,GAAG,EAAA,GACJ,KAAK,EAAA,QAAA,EAETA,qBAAI,CAAA,IAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC,EAAA,QAAA,EACrC,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,KAC5B,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,KAAK,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAC3D,EAAA,CACE,EACD,CAAA,EACN;AACJ,CAAC,EACD;AAEF,UAAU,CAAC,WAAW,GAAG,YAAY;;;;"}
1
+ {"version":3,"file":"breadcrumb.js","sources":["../../../../v1/components/breadcrumb/breadcrumb.tsx"],"sourcesContent":["import { ChevronDownIcon, DotsHorizontalIcon } from '@radix-ui/react-icons';\nimport { type VariantProps, cva, cx } from 'class-variance-authority';\nimport {\n MouseEvent,\n ReactElement,\n cloneElement,\n forwardRef,\n useMemo\n} from 'react';\nimport { DropdownMenu } from '../dropdown-menu';\nimport styles from './breadcrumb.module.css';\n\ninterface BreadcrumbItemBase {\n label: string;\n href?: string;\n}\ninterface BreadcrumbItem extends BreadcrumbItemBase {\n icon?: React.ReactNode;\n dropdownItems?: BreadcrumbItemBase[];\n as?: ReactElement;\n}\n\ninterface BreadcrumbItemProps extends BreadcrumbItem {\n isActive: boolean;\n onItemClick?: (item: BreadcrumbItem) => void;\n}\n\nconst BreadcrumbItem = ({\n as = <a />,\n onItemClick,\n ...props\n}: BreadcrumbItemProps) => {\n const { label, href, icon, dropdownItems, isActive } = props;\n\n if (label === 'ellipsis') {\n return (\n <span className={styles['breadcrumb-ellipsis']}>\n <DotsHorizontalIcon />\n </span>\n );\n }\n if (dropdownItems) {\n return (\n <DropdownMenu>\n <DropdownMenu.Trigger className={styles['breadcrumb-dropdown-trigger']}>\n {icon && <span className={styles['breadcrumb-icon']}>{icon}</span>}\n <span>{label}</span>\n <ChevronDownIcon className={styles['breadcrumb-dropdown-icon']} />\n </DropdownMenu.Trigger>\n <DropdownMenu.Content className={styles['breadcrumb-dropdown-content']}>\n {dropdownItems.map((dropdownItem, dropdownIndex) => (\n <DropdownMenu.Item\n key={dropdownIndex}\n className={styles['breadcrumb-dropdown-item']}\n onSelect={() => onItemClick?.(dropdownItem)}\n >\n {dropdownItem.label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu.Content>\n </DropdownMenu>\n );\n }\n return cloneElement(\n as,\n {\n className: cx(\n styles['breadcrumb-link'],\n isActive && styles['breadcrumb-link-active']\n ),\n onClick: (e: MouseEvent) => {\n if (onItemClick && href !== '#') {\n e.preventDefault();\n onItemClick(props);\n }\n },\n href,\n ...as.props\n },\n <>\n {icon && <span className={styles['breadcrumb-icon']}>{icon}</span>}\n <span>{label}</span>\n </>\n );\n};\n\nconst breadcrumbVariants = cva(styles['breadcrumb'], {\n variants: {\n size: {\n small: styles['breadcrumb-small'],\n medium: styles['breadcrumb-medium']\n }\n },\n defaultVariants: {\n size: 'medium'\n }\n});\n\ntype BreadcrumbProps = VariantProps<typeof breadcrumbVariants> & {\n items: BreadcrumbItem[];\n maxVisibleItems?: number;\n separator?: React.ReactNode;\n onItemClick?: (item: BreadcrumbItem) => void;\n className?: string;\n size?: 'small' | 'medium';\n};\n\nexport const Breadcrumb = forwardRef<HTMLDivElement, BreadcrumbProps>(\n (\n {\n className,\n size = 'medium',\n items,\n maxVisibleItems,\n separator = '/',\n onItemClick,\n ...props\n },\n ref\n ) => {\n const visibleItems = useMemo(() => {\n if (maxVisibleItems && items.length > maxVisibleItems) {\n return [\n ...items.slice(0, 1),\n { label: 'ellipsis', href: '#' },\n ...items.slice(-Math.min(maxVisibleItems - 1, items.length - 1))\n ];\n }\n return items;\n }, [maxVisibleItems, items]);\n\n return (\n <nav\n className={breadcrumbVariants({ size, className })}\n ref={ref}\n {...props}\n >\n <ol className={styles['breadcrumb-list']}>\n {visibleItems.map((item, index) => {\n const isLast = index === visibleItems.length - 1;\n return (\n <li className={styles['breadcrumb-item']} key={index}>\n <BreadcrumbItem\n {...item}\n isActive={isLast}\n onItemClick={onItemClick}\n />\n {!isLast && (\n <span className={styles['breadcrumb-separator']}>\n {separator}\n </span>\n )}\n </li>\n );\n })}\n </ol>\n </nav>\n );\n }\n);\n\nBreadcrumb.displayName = 'Breadcrumb';\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;AA2BA,MAAM,cAAc,GAAG,CAAC,EACtB,EAAE,GAAGA,qBAAA,CAAA,GAAA,EAAA,EAAA,CAAK,EACV,WAAW,EACX,GAAG,KAAK,EACY,KAAI;AACxB,IAAA,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;AAE7D,IAAA,IAAI,KAAK,KAAK,UAAU,EAAE;AACxB,QAAA,QACEA,qBAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAE,MAAM,CAAC,qBAAqB,CAAC,EAAA,QAAA,EAC5CA,qBAAC,CAAA,kBAAkB,EAAG,EAAA,CAAA,EAAA,CACjB,EACP;KACH;IACD,IAAI,aAAa,EAAE;QACjB,QACEC,uBAAC,YAAY,EAAA,EAAA,QAAA,EAAA,CACXA,uBAAC,YAAY,CAAC,OAAO,EAAA,EAAC,SAAS,E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E,GAAG,EACJ,GAAA,KAAK,EAET,QAAA,EAAAA,qBAAA,CAAA,IAAA,EAAA,EAAI,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC,EACrC,QAAA,EAAA,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,KAAI;gBAChC,MAAM,MAAM,GAAG,KAAK,KAAK,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC;AACjD,gBAAA,QACEC,sBAAI,CAAA,IAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC,EAAA,QAAA,EAAA,CACtCD,sBAAC,cAAc,EAAA,EAAA,GACT,IAAI,EACR,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,WAAW,EACxB,CAAA,EACD,CAAC,MAAM,KACNA,qBAAM,CAAA,MAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,sBAAsB,CAAC,EAAA,QAAA,EAC5C,SAAS,EACL,CAAA,CACR,KAV4C,KAAK,CAW/C,EACL;AACJ,aAAC,CAAC,EAAA,CACC,EACD,CAAA,EACN;AACJ,CAAC,EACD;AAEF,UAAU,CAAC,WAAW,GAAG,YAAY;;;;"}
@@ -1,22 +1,22 @@
1
1
  'use strict';
2
2
 
3
3
  var jsxRuntime = require('../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.cjs');
4
- var React = require('react');
5
4
  var VIIRIBF3 = 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/__chunks/VIIRIBF3.cjs');
6
5
  var menu = 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/menu/menu.cjs');
7
6
  var combobox = 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.cjs');
8
7
  var MAXQOH4L = 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/__chunks/MAXQOH4L.cjs');
9
- var index = require('../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.cjs');
10
- var dropdownMenu_module = require('./dropdown-menu.module.css.cjs');
11
8
  var index$1 = require('../../node_modules/.pnpm/@radix-ui_react-slot@1.0.2_@types_react@18.2.12_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.cjs');
9
+ var index = require('../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.cjs');
10
+ var React = require('react');
12
11
  var dropdownMenuRoot = require('./dropdown-menu-root.cjs');
12
+ var dropdownMenu_module = require('./dropdown-menu.module.css.cjs');
13
13
 
14
- const DropdownMenuContent = React.forwardRef(({ className, children, asChild, searchPlaceholder = "Search...", ...props }, ref) => {
14
+ const DropdownMenuContent = React.forwardRef(({ className, children, asChild, searchPlaceholder = 'Search...', ...props }, ref) => {
15
15
  const menu$1 = VIIRIBF3.useMenuContext();
16
16
  const { autocomplete } = dropdownMenuRoot.useDropdownContext();
17
17
  const isSubMenu = !!menu$1?.parent;
18
18
  const comboboxRef = React.useRef(null);
19
- return (jsxRuntime.jsxRuntimeExports.jsx(menu.Menu, { ref: ref, modal: true, portal: true, portalElement: typeof window === "undefined" ? null : window?.document?.body, unmountOnHide: true, gutter: isSubMenu ? 2 : 4, className: index.cx(dropdownMenu_module.default.content, autocomplete && dropdownMenu_module.default.comboboxContainer, className), render: asChild ? jsxRuntime.jsxRuntimeExports.jsx(index$1.Slot, {}) : undefined, ...props, children: autocomplete ? (jsxRuntime.jsxRuntimeExports.jsxs(jsxRuntime.jsxRuntimeExports.Fragment, { children: [jsxRuntime.jsxRuntimeExports.jsx(combobox.Combobox, { ref: comboboxRef, placeholder: searchPlaceholder, className: dropdownMenu_module.default.comboboxInput, autoSelect: true, onPointerEnter: e => {
19
+ return (jsxRuntime.jsxRuntimeExports.jsx(menu.Menu, { ref: ref, modal: true, portal: true, portalElement: typeof window === 'undefined' ? null : window?.document?.body, unmountOnHide: true, gutter: isSubMenu ? 2 : 4, className: index.cx(dropdownMenu_module.default.content, autocomplete && dropdownMenu_module.default.comboboxContainer, className), render: asChild ? jsxRuntime.jsxRuntimeExports.jsx(index$1.Slot, {}) : undefined, ...props, children: autocomplete ? (jsxRuntime.jsxRuntimeExports.jsxs(jsxRuntime.jsxRuntimeExports.Fragment, { children: [jsxRuntime.jsxRuntimeExports.jsx(combobox.Combobox, { ref: comboboxRef, placeholder: searchPlaceholder, className: dropdownMenu_module.default.comboboxInput, autoSelect: true, onPointerEnter: e => {
20
20
  if (document && document.activeElement !== comboboxRef.current)
21
21
  comboboxRef.current?.focus();
22
22
  } }), jsxRuntime.jsxRuntimeExports.jsx(MAXQOH4L.ComboboxList, { className: dropdownMenu_module.default.comboboxContent, children: children })] })) : (children) }));
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-menu-content.cjs","sources":["../../../../v1/components/dropdown-menu/dropdown-menu-content.tsx"],"sourcesContent":["import { ElementRef, forwardRef, useRef } from \"react\";\nimport { Menu, MenuProps, useMenuContext } from \"@ariakit/react\";\nimport { Combobox, ComboboxList } from \"@ariakit/react\";\nimport { cx } from \"class-variance-authority\";\nimport styles from \"./dropdown-menu.module.css\";\nimport { WithAsChild } from \"./types\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { useDropdownContext } from \"./dropdown-menu-root\";\n\nexport interface MenuContentProps\n extends Omit<WithAsChild<MenuProps>, \"portal\"> {\n searchPlaceholder?: string;\n}\n\nexport const DropdownMenuContent = forwardRef<\n ElementRef<typeof Menu>,\n MenuContentProps\n>(\n (\n { className, children, asChild, searchPlaceholder = \"Search...\", ...props },\n ref,\n ) => {\n const menu = useMenuContext();\n const { autocomplete } = useDropdownContext();\n const isSubMenu = !!menu?.parent;\n const comboboxRef = useRef<HTMLInputElement>(null);\n\n return (\n <Menu\n ref={ref}\n modal\n portal\n portalElement={\n typeof window === \"undefined\" ? null : window?.document?.body\n }\n unmountOnHide\n gutter={isSubMenu ? 2 : 4}\n className={cx(\n styles.content,\n autocomplete && styles.comboboxContainer,\n className,\n )}\n render={asChild ? <Slot /> : undefined}\n {...props}>\n {autocomplete ? (\n <>\n <Combobox\n ref={comboboxRef}\n placeholder={searchPlaceholder}\n className={styles.comboboxInput}\n autoSelect\n onPointerEnter={e => {\n if (document && document.activeElement !== comboboxRef.current)\n comboboxRef.current?.focus();\n }}\n />\n <ComboboxList className={styles.comboboxContent}>\n {children}\n </ComboboxList>\n </>\n ) : (\n children\n )}\n </Menu>\n );\n },\n);\n"],"names":["forwardRef","menu","useMenuContext","useDropdownContext","useRef","_jsx","Menu","cx","styles","Slot","_jsxs","_Fragment","Combobox","ComboboxList"],"mappings":";;;;;;;;;;;;;AAca,MAAA,mBAAmB,GAAGA,gBAAU,CAI3C,CACE,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,iBAAiB,GAAG,WAAW,EAAE,GAAG,KAAK,EAAE,EAC3E,GAAG,KACD;AACF,IAAA,MAAMC,MAAI,GAAGC,uBAAc,EAAE,CAAC;AAC9B,IAAA,MAAM,EAAE,YAAY,EAAE,GAAGC,mCAAkB,EAAE,CAAC;AAC9C,IAAA,MAAM,SAAS,GAAG,CAAC,CAACF,MAAI,EAAE,MAAM,CAAC;AACjC,IAAA,MAAM,WAAW,GAAGG,YAAM,CAAmB,IAAI,CAAC,CAAC;IAEnD,QACEC,iCAACC,SAAI,EAAA,EACH,GAAG,EAAE,GAAG,EACR,KAAK,EACL,IAAA,EAAA,MAAM,QACN,aAAa,EACX,OAAO,MAAM,KAAK,WAAW,GAAG,IAAI,GAAG,MAAM,EAAE,QAAQ,EAAE,IAAI,EAE/D,aAAa,QACb,MAAM,EAAE,SAAS,GAAG,CAAC,GAAG,CAAC,EACzB,SAAS,EAAEC,QAAE,CACXC,2BAAM,CAAC,OAAO,EACd,YAAY,IAAIA,2BAAM,CAAC,iBAAiB,EACxC,SAAS,CACV,EACD,MAAM,EAAE,OAAO,GAAGH,gCAAC,CAAAI,YAAI,EAAG,EAAA,CAAA,GAAG,SAAS,EAClC,GAAA,KAAK,EACR,QAAA,EAAA,YAAY,IACXC,iCAAA,CAAAC,qCAAA,EAAA,EAAA,QAAA,EAAA,CACEN,gCAAC,CAAAO,iBAAQ,EACP,EAAA,GAAG,EAAE,WAAW,EAChB,WAAW,EAAE,iBAAiB,EAC9B,SAAS,EAAEJ,2BAAM,CAAC,aAAa,EAC/B,UAAU,QACV,cAAc,EAAE,CAAC,IAAG;wBAClB,IAAI,QAAQ,IAAI,QAAQ,CAAC,aAAa,KAAK,WAAW,CAAC,OAAO;AAC5D,4BAAA,WAAW,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;qBAChC,EAAA,CACD,EACFH,gCAAC,CAAAQ,qBAAY,IAAC,SAAS,EAAEL,2BAAM,CAAC,eAAe,EAAA,QAAA,EAC5C,QAAQ,EACI,CAAA,CAAA,EAAA,CACd,KAEH,QAAQ,CACT,EACI,CAAA,EACP;AACJ,CAAC;;;;"}
1
+ {"version":3,"file":"dropdown-menu-content.cjs","sources":["../../../../v1/components/dropdown-menu/dropdown-menu-content.tsx"],"sourcesContent":["import { Menu, MenuProps, useMenuContext } from '@ariakit/react';\nimport { Combobox, ComboboxList } from '@ariakit/react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cx } from 'class-variance-authority';\nimport { ElementRef, forwardRef, useRef } from 'react';\nimport { useDropdownContext } from './dropdown-menu-root';\nimport styles from './dropdown-menu.module.css';\nimport { WithAsChild } from './types';\n\nexport interface MenuContentProps extends WithAsChild<MenuProps> {\n searchPlaceholder?: string;\n}\n\nexport const DropdownMenuContent = forwardRef<\n ElementRef<typeof Menu>,\n MenuContentProps\n>(\n (\n { className, children, asChild, searchPlaceholder = 'Search...', ...props },\n ref\n ) => {\n const menu = useMenuContext();\n const { autocomplete } = useDropdownContext();\n const isSubMenu = !!menu?.parent;\n const comboboxRef = useRef<HTMLInputElement>(null);\n\n return (\n <Menu\n ref={ref}\n modal\n portal\n portalElement={\n typeof window === 'undefined' ? null : window?.document?.body\n }\n unmountOnHide\n gutter={isSubMenu ? 2 : 4}\n className={cx(\n styles.content,\n autocomplete && styles.comboboxContainer,\n className\n )}\n render={asChild ? <Slot /> : undefined}\n {...props}\n >\n {autocomplete ? (\n <>\n <Combobox\n ref={comboboxRef}\n placeholder={searchPlaceholder}\n className={styles.comboboxInput}\n autoSelect\n onPointerEnter={e => {\n if (document && document.activeElement !== comboboxRef.current)\n comboboxRef.current?.focus();\n }}\n />\n <ComboboxList className={styles.comboboxContent}>\n {children}\n </ComboboxList>\n </>\n ) : (\n children\n )}\n </Menu>\n );\n }\n);\n"],"names":["forwardRef","menu","useMenuContext","useDropdownContext","useRef","_jsx","Menu","cx","styles","Slot","_jsxs","_Fragment","Combobox","ComboboxList"],"mappings":";;;;;;;;;;;;;AAaa,MAAA,mBAAmB,GAAGA,gBAAU,CAI3C,CACE,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,iBAAiB,GAAG,WAAW,EAAE,GAAG,KAAK,EAAE,EAC3E,GAAG,KACD;AACF,IAAA,MAAMC,MAAI,GAAGC,uBAAc,EAAE,CAAC;AAC9B,IAAA,MAAM,EAAE,YAAY,EAAE,GAAGC,mCAAkB,EAAE,CAAC;AAC9C,IAAA,MAAM,SAAS,GAAG,CAAC,CAACF,MAAI,EAAE,MAAM,CAAC;AACjC,IAAA,MAAM,WAAW,GAAGG,YAAM,CAAmB,IAAI,CAAC,CAAC;IAEnD,QACEC,iCAACC,SAAI,EAAA,EACH,GAAG,EAAE,GAAG,EACR,KAAK,EACL,IAAA,EAAA,MAAM,QACN,aAAa,EACX,OAAO,MAAM,KAAK,WAAW,GAAG,IAAI,GAAG,MAAM,EAAE,QAAQ,EAAE,IAAI,EAE/D,aAAa,QACb,MAAM,EAAE,SAAS,GAAG,CAAC,GAAG,CAAC,EACzB,SAAS,EAAEC,QAAE,CACXC,2BAAM,CAAC,OAAO,EACd,YAAY,IAAIA,2BAAM,CAAC,iBAAiB,EACxC,SAAS,CACV,EACD,MAAM,EAAE,OAAO,GAAGH,gCAAC,CAAAI,YAAI,EAAG,EAAA,CAAA,GAAG,SAAS,EAClC,GAAA,KAAK,EAER,QAAA,EAAA,YAAY,IACXC,iCAAA,CAAAC,qCAAA,EAAA,EAAA,QAAA,EAAA,CACEN,gCAAC,CAAAO,iBAAQ,EACP,EAAA,GAAG,EAAE,WAAW,EAChB,WAAW,EAAE,iBAAiB,EAC9B,SAAS,EAAEJ,2BAAM,CAAC,aAAa,EAC/B,UAAU,QACV,cAAc,EAAE,CAAC,IAAG;wBAClB,IAAI,QAAQ,IAAI,QAAQ,CAAC,aAAa,KAAK,WAAW,CAAC,OAAO;AAC5D,4BAAA,WAAW,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;qBAChC,EAAA,CACD,EACFH,gCAAC,CAAAQ,qBAAY,IAAC,SAAS,EAAEL,2BAAM,CAAC,eAAe,EAAA,QAAA,EAC5C,QAAQ,EACI,CAAA,CAAA,EAAA,CACd,KAEH,QAAQ,CACT,EACI,CAAA,EACP;AACJ,CAAC;;;;"}
@@ -1,6 +1,6 @@
1
- import { MenuProps } from "@ariakit/react";
2
- import { WithAsChild } from "./types";
3
- export interface MenuContentProps extends Omit<WithAsChild<MenuProps>, "portal"> {
1
+ import { MenuProps } from '@ariakit/react';
2
+ import { WithAsChild } from './types';
3
+ export interface MenuContentProps extends WithAsChild<MenuProps> {
4
4
  searchPlaceholder?: string;
5
5
  }
6
6
  export declare const DropdownMenuContent: import("react").ForwardRefExoticComponent<Omit<MenuContentProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-menu-content.d.ts","sourceRoot":"","sources":["../../../../v1/components/dropdown-menu/dropdown-menu-content.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AAIjE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAItC,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC;IAC9C,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,eAAO,MAAM,mBAAmB,0HAoD/B,CAAC"}
1
+ {"version":3,"file":"dropdown-menu-content.d.ts","sourceRoot":"","sources":["../../../../v1/components/dropdown-menu/dropdown-menu-content.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AAOjE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,MAAM,WAAW,gBAAiB,SAAQ,WAAW,CAAC,SAAS,CAAC;IAC9D,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,eAAO,MAAM,mBAAmB,0HAqD/B,CAAC"}
@@ -1,20 +1,20 @@
1
1
  import { j as jsxRuntimeExports } from '../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js';
2
- import { forwardRef, useRef } from 'react';
3
2
  import { useMenuContext } 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/VIIRIBF3.js';
4
3
  import { Menu } 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/menu/menu.js';
5
4
  import { Combobox } 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.js';
6
5
  import { ComboboxList } 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/MAXQOH4L.js';
7
- import { cx } from '../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js';
8
- import styles from './dropdown-menu.module.css.js';
9
6
  import { Slot as $5e63c961fc1ce211$export$8c6ed5c666ac1360 } from '../../node_modules/.pnpm/@radix-ui_react-slot@1.0.2_@types_react@18.2.12_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.js';
7
+ import { cx } from '../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js';
8
+ import { forwardRef, useRef } from 'react';
10
9
  import { useDropdownContext } from './dropdown-menu-root.js';
10
+ import styles from './dropdown-menu.module.css.js';
11
11
 
12
- const DropdownMenuContent = forwardRef(({ className, children, asChild, searchPlaceholder = "Search...", ...props }, ref) => {
12
+ const DropdownMenuContent = forwardRef(({ className, children, asChild, searchPlaceholder = 'Search...', ...props }, ref) => {
13
13
  const menu = useMenuContext();
14
14
  const { autocomplete } = useDropdownContext();
15
15
  const isSubMenu = !!menu?.parent;
16
16
  const comboboxRef = useRef(null);
17
- return (jsxRuntimeExports.jsx(Menu, { ref: ref, modal: true, portal: true, portalElement: typeof window === "undefined" ? null : window?.document?.body, unmountOnHide: true, gutter: isSubMenu ? 2 : 4, className: cx(styles.content, autocomplete && styles.comboboxContainer, className), render: asChild ? jsxRuntimeExports.jsx($5e63c961fc1ce211$export$8c6ed5c666ac1360, {}) : undefined, ...props, children: autocomplete ? (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(Combobox, { ref: comboboxRef, placeholder: searchPlaceholder, className: styles.comboboxInput, autoSelect: true, onPointerEnter: e => {
17
+ return (jsxRuntimeExports.jsx(Menu, { ref: ref, modal: true, portal: true, portalElement: typeof window === 'undefined' ? null : window?.document?.body, unmountOnHide: true, gutter: isSubMenu ? 2 : 4, className: cx(styles.content, autocomplete && styles.comboboxContainer, className), render: asChild ? jsxRuntimeExports.jsx($5e63c961fc1ce211$export$8c6ed5c666ac1360, {}) : undefined, ...props, children: autocomplete ? (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(Combobox, { ref: comboboxRef, placeholder: searchPlaceholder, className: styles.comboboxInput, autoSelect: true, onPointerEnter: e => {
18
18
  if (document && document.activeElement !== comboboxRef.current)
19
19
  comboboxRef.current?.focus();
20
20
  } }), jsxRuntimeExports.jsx(ComboboxList, { className: styles.comboboxContent, children: children })] })) : (children) }));
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-menu-content.js","sources":["../../../../v1/components/dropdown-menu/dropdown-menu-content.tsx"],"sourcesContent":["import { ElementRef, forwardRef, useRef } from \"react\";\nimport { Menu, MenuProps, useMenuContext } from \"@ariakit/react\";\nimport { Combobox, ComboboxList } from \"@ariakit/react\";\nimport { cx } from \"class-variance-authority\";\nimport styles from \"./dropdown-menu.module.css\";\nimport { WithAsChild } from \"./types\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { useDropdownContext } from \"./dropdown-menu-root\";\n\nexport interface MenuContentProps\n extends Omit<WithAsChild<MenuProps>, \"portal\"> {\n searchPlaceholder?: string;\n}\n\nexport const DropdownMenuContent = forwardRef<\n ElementRef<typeof Menu>,\n MenuContentProps\n>(\n (\n { className, children, asChild, searchPlaceholder = \"Search...\", ...props },\n ref,\n ) => {\n const menu = useMenuContext();\n const { autocomplete } = useDropdownContext();\n const isSubMenu = !!menu?.parent;\n const comboboxRef = useRef<HTMLInputElement>(null);\n\n return (\n <Menu\n ref={ref}\n modal\n portal\n portalElement={\n typeof window === \"undefined\" ? null : window?.document?.body\n }\n unmountOnHide\n gutter={isSubMenu ? 2 : 4}\n className={cx(\n styles.content,\n autocomplete && styles.comboboxContainer,\n className,\n )}\n render={asChild ? <Slot /> : undefined}\n {...props}>\n {autocomplete ? (\n <>\n <Combobox\n ref={comboboxRef}\n placeholder={searchPlaceholder}\n className={styles.comboboxInput}\n autoSelect\n onPointerEnter={e => {\n if (document && document.activeElement !== comboboxRef.current)\n comboboxRef.current?.focus();\n }}\n />\n <ComboboxList className={styles.comboboxContent}>\n {children}\n </ComboboxList>\n </>\n ) : (\n children\n )}\n </Menu>\n );\n },\n);\n"],"names":["_jsx","Slot","_jsxs","_Fragment"],"mappings":";;;;;;;;;;;AAca,MAAA,mBAAmB,GAAG,UAAU,CAI3C,CACE,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,iBAAiB,GAAG,WAAW,EAAE,GAAG,KAAK,EAAE,EAC3E,GAAG,KACD;AACF,IAAA,MAAM,IAAI,GAAG,cAAc,EAAE,CAAC;AAC9B,IAAA,MAAM,EAAE,YAAY,EAAE,GAAG,kBAAkB,EAAE,CAAC;AAC9C,IAAA,MAAM,SAAS,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC;AACjC,IAAA,MAAM,WAAW,GAAG,MAAM,CAAmB,IAAI,CAAC,CAAC;IAEnD,QACEA,sBAAC,IAAI,EAAA,EACH,GAAG,EAAE,GAAG,EACR,KAAK,EACL,IAAA,EAAA,MAAM,QACN,aAAa,EACX,OAAO,MAAM,KAAK,WAAW,GAAG,IAAI,GAAG,MAAM,EAAE,QAAQ,EAAE,IAAI,EAE/D,aAAa,QACb,MAAM,EAAE,SAAS,GAAG,CAAC,GAAG,CAAC,EACzB,SAAS,EAAE,EAAE,CACX,MAAM,CAAC,OAAO,EACd,YAAY,IAAI,MAAM,CAAC,iBAAiB,EACxC,SAAS,CACV,EACD,MAAM,EAAE,OAAO,GAAGA,qBAAC,CAAAC,yCAAI,EAAG,EAAA,CAAA,GAAG,SAAS,EAClC,GAAA,KAAK,EACR,QAAA,EAAA,YAAY,IACXC,sBAAA,CAAAC,0BAAA,EAAA,EAAA,QAAA,EAAA,CACEH,qBAAC,CAAA,QAAQ,EACP,EAAA,GAAG,EAAE,WAAW,EAChB,WAAW,EAAE,iBAAiB,EAC9B,SAAS,EAAE,MAAM,CAAC,aAAa,EAC/B,UAAU,QACV,cAAc,EAAE,CAAC,IAAG;wBAClB,IAAI,QAAQ,IAAI,QAAQ,CAAC,aAAa,KAAK,WAAW,CAAC,OAAO;AAC5D,4BAAA,WAAW,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;qBAChC,EAAA,CACD,EACFA,qBAAC,CAAA,YAAY,IAAC,SAAS,EAAE,MAAM,CAAC,eAAe,EAAA,QAAA,EAC5C,QAAQ,EACI,CAAA,CAAA,EAAA,CACd,KAEH,QAAQ,CACT,EACI,CAAA,EACP;AACJ,CAAC;;;;"}
1
+ {"version":3,"file":"dropdown-menu-content.js","sources":["../../../../v1/components/dropdown-menu/dropdown-menu-content.tsx"],"sourcesContent":["import { Menu, MenuProps, useMenuContext } from '@ariakit/react';\nimport { Combobox, ComboboxList } from '@ariakit/react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cx } from 'class-variance-authority';\nimport { ElementRef, forwardRef, useRef } from 'react';\nimport { useDropdownContext } from './dropdown-menu-root';\nimport styles from './dropdown-menu.module.css';\nimport { WithAsChild } from './types';\n\nexport interface MenuContentProps extends WithAsChild<MenuProps> {\n searchPlaceholder?: string;\n}\n\nexport const DropdownMenuContent = forwardRef<\n ElementRef<typeof Menu>,\n MenuContentProps\n>(\n (\n { className, children, asChild, searchPlaceholder = 'Search...', ...props },\n ref\n ) => {\n const menu = useMenuContext();\n const { autocomplete } = useDropdownContext();\n const isSubMenu = !!menu?.parent;\n const comboboxRef = useRef<HTMLInputElement>(null);\n\n return (\n <Menu\n ref={ref}\n modal\n portal\n portalElement={\n typeof window === 'undefined' ? null : window?.document?.body\n }\n unmountOnHide\n gutter={isSubMenu ? 2 : 4}\n className={cx(\n styles.content,\n autocomplete && styles.comboboxContainer,\n className\n )}\n render={asChild ? <Slot /> : undefined}\n {...props}\n >\n {autocomplete ? (\n <>\n <Combobox\n ref={comboboxRef}\n placeholder={searchPlaceholder}\n className={styles.comboboxInput}\n autoSelect\n onPointerEnter={e => {\n if (document && document.activeElement !== comboboxRef.current)\n comboboxRef.current?.focus();\n }}\n />\n <ComboboxList className={styles.comboboxContent}>\n {children}\n </ComboboxList>\n </>\n ) : (\n children\n )}\n </Menu>\n );\n }\n);\n"],"names":["_jsx","Slot","_jsxs","_Fragment"],"mappings":";;;;;;;;;;;AAaa,MAAA,mBAAmB,GAAG,UAAU,CAI3C,CACE,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,iBAAiB,GAAG,WAAW,EAAE,GAAG,KAAK,EAAE,EAC3E,GAAG,KACD;AACF,IAAA,MAAM,IAAI,GAAG,cAAc,EAAE,CAAC;AAC9B,IAAA,MAAM,EAAE,YAAY,EAAE,GAAG,kBAAkB,EAAE,CAAC;AAC9C,IAAA,MAAM,SAAS,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC;AACjC,IAAA,MAAM,WAAW,GAAG,MAAM,CAAmB,IAAI,CAAC,CAAC;IAEnD,QACEA,sBAAC,IAAI,EAAA,EACH,GAAG,EAAE,GAAG,EACR,KAAK,EACL,IAAA,EAAA,MAAM,QACN,aAAa,EACX,OAAO,MAAM,KAAK,WAAW,GAAG,IAAI,GAAG,MAAM,EAAE,QAAQ,EAAE,IAAI,EAE/D,aAAa,QACb,MAAM,EAAE,SAAS,GAAG,CAAC,GAAG,CAAC,EACzB,SAAS,EAAE,EAAE,CACX,MAAM,CAAC,OAAO,EACd,YAAY,IAAI,MAAM,CAAC,iBAAiB,EACxC,SAAS,CACV,EACD,MAAM,EAAE,OAAO,GAAGA,qBAAC,CAAAC,yCAAI,EAAG,EAAA,CAAA,GAAG,SAAS,EAClC,GAAA,KAAK,EAER,QAAA,EAAA,YAAY,IACXC,sBAAA,CAAAC,0BAAA,EAAA,EAAA,QAAA,EAAA,CACEH,qBAAC,CAAA,QAAQ,EACP,EAAA,GAAG,EAAE,WAAW,EAChB,WAAW,EAAE,iBAAiB,EAC9B,SAAS,EAAE,MAAM,CAAC,aAAa,EAC/B,UAAU,QACV,cAAc,EAAE,CAAC,IAAG;wBAClB,IAAI,QAAQ,IAAI,QAAQ,CAAC,aAAa,KAAK,WAAW,CAAC,OAAO;AAC5D,4BAAA,WAAW,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;qBAChC,EAAA,CACD,EACFA,qBAAC,CAAA,YAAY,IAAC,SAAS,EAAE,MAAM,CAAC,eAAe,EAAA,QAAA,EAC5C,QAAQ,EACI,CAAA,CAAA,EAAA,CACd,KAEH,QAAQ,CACT,EACI,CAAA,EACP;AACJ,CAAC;;;;"}
@@ -3,22 +3,23 @@
3
3
  var jsxRuntime = require('../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.cjs');
4
4
  var index = require('../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.cjs');
5
5
  var React = require('react');
6
+ var flex = require('../flex/flex.cjs');
6
7
  var iconButton_module = require('./icon-button.module.css.cjs');
7
8
 
8
9
  const iconButton = index.cva(iconButton_module.default.iconButton, {
9
10
  variants: {
10
11
  size: {
11
- 1: iconButton_module.default["iconButton-size-1"],
12
- 2: iconButton_module.default["iconButton-size-2"],
13
- 3: iconButton_module.default["iconButton-size-3"],
14
- 4: iconButton_module.default["iconButton-size-4"],
12
+ 1: iconButton_module.default['iconButton-size-1'],
13
+ 2: iconButton_module.default['iconButton-size-2'],
14
+ 3: iconButton_module.default['iconButton-size-3'],
15
+ 4: iconButton_module.default['iconButton-size-4']
15
16
  }
16
17
  },
17
18
  defaultVariants: {
18
- size: 2,
19
- },
19
+ size: 2
20
+ }
20
21
  });
21
- const IconButton = React.forwardRef(({ className, size, disabled, children, 'aria-label': ariaLabel, style, ...props }, ref) => (jsxRuntime.jsxRuntimeExports.jsx("button", { ref: ref, className: iconButton({ size, className }), disabled: disabled, type: "button", "aria-label": ariaLabel, "aria-disabled": disabled, style: style, ...props, children: jsxRuntime.jsxRuntimeExports.jsx("div", { "aria-hidden": "true", children: children }) })));
22
+ const IconButton = React.forwardRef(({ className, size, disabled, children, 'aria-label': ariaLabel, style, ...props }, ref) => (jsxRuntime.jsxRuntimeExports.jsx("button", { ref: ref, className: iconButton({ size, className }), disabled: disabled, type: 'button', "aria-label": ariaLabel, "aria-disabled": disabled, style: style, ...props, children: jsxRuntime.jsxRuntimeExports.jsx(flex.Flex, { "aria-hidden": 'true', align: 'center', justify: 'center', children: children }) })));
22
23
  IconButton.displayName = 'IconButton';
23
24
 
24
25
  exports.IconButton = IconButton;
@@ -1 +1 @@
1
- {"version":3,"file":"icon-button.cjs","sources":["../../../../v1/components/icon-button/icon-button.tsx"],"sourcesContent":["import { cva, VariantProps } from \"class-variance-authority\";\nimport { ComponentPropsWithoutRef, ElementRef, forwardRef } from \"react\";\n\nimport styles from './icon-button.module.css';\n\nconst iconButton = cva(styles.iconButton, {\n variants: {\n size: {\n 1: styles[\"iconButton-size-1\"],\n 2: styles[\"iconButton-size-2\"],\n 3: styles[\"iconButton-size-3\"],\n 4: styles[\"iconButton-size-4\"],\n }\n },\n defaultVariants: {\n size: 2,\n },\n});\n\nexport interface IconButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof iconButton> {\n size?: 1 | 2 | 3 | 4;\n 'aria-label'?: string;\n}\n\nexport const IconButton = forwardRef<ElementRef<\"button\">, IconButtonProps>(\n ({ \n className, \n size, \n disabled, \n children, \n 'aria-label': ariaLabel,\n style,\n ...props \n }, ref) => (\n <button\n ref={ref}\n className={iconButton({ size, className })}\n disabled={disabled}\n type=\"button\"\n aria-label={ariaLabel}\n aria-disabled={disabled}\n style={style}\n {...props}\n >\n <div aria-hidden=\"true\">\n {children}\n </div>\n </button>\n )\n);\n\nIconButton.displayName = 'IconButton';\n"],"names":["cva","styles","forwardRef","_jsx"],"mappings":";;;;;;;AAKA,MAAM,UAAU,GAAGA,SAAG,CAACC,yBAAM,CAAC,UAAU,EAAE;AACxC,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,CAAC,EAAEA,yBAAM,CAAC,mBAAmB,CAAC;AAC9B,YAAA,CAAC,EAAEA,yBAAM,CAAC,mBAAmB,CAAC;AAC9B,YAAA,CAAC,EAAEA,yBAAM,CAAC,mBAAmB,CAAC;AAC9B,YAAA,CAAC,EAAEA,yBAAM,CAAC,mBAAmB,CAAC;AAC/B,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,IAAI,EAAE,CAAC;AACR,KAAA;AACF,CAAA,CAAC,CAAC;AASI,MAAM,UAAU,GAAGC,gBAAU,CAClC,CAAC,EACC,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,YAAY,EAAE,SAAS,EACvB,KAAK,EACL,GAAG,KAAK,EACT,EAAE,GAAG,MACJC,gCACE,CAAA,QAAA,EAAA,EAAA,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,UAAU,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EAC1C,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAC,QAAQ,EAAA,YAAA,EACD,SAAS,EAAA,eAAA,EACN,QAAQ,EACvB,KAAK,EAAE,KAAK,KACR,KAAK,EAAA,QAAA,EAETA,gCAAiB,CAAA,KAAA,EAAA,EAAA,aAAA,EAAA,MAAM,YACpB,QAAQ,EAAA,CACL,EACC,CAAA,CACV,EACD;AAEF,UAAU,CAAC,WAAW,GAAG,YAAY;;;;"}
1
+ {"version":3,"file":"icon-button.cjs","sources":["../../../../v1/components/icon-button/icon-button.tsx"],"sourcesContent":["import { VariantProps, cva } from 'class-variance-authority';\nimport { ElementRef, forwardRef } from 'react';\nimport { Flex } from '../flex';\n\nimport styles from './icon-button.module.css';\n\nconst iconButton = cva(styles.iconButton, {\n variants: {\n size: {\n 1: styles['iconButton-size-1'],\n 2: styles['iconButton-size-2'],\n 3: styles['iconButton-size-3'],\n 4: styles['iconButton-size-4']\n }\n },\n defaultVariants: {\n size: 2\n }\n});\n\nexport interface IconButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof iconButton> {\n size?: 1 | 2 | 3 | 4;\n 'aria-label'?: string;\n}\n\nexport const IconButton = forwardRef<ElementRef<'button'>, IconButtonProps>(\n (\n {\n className,\n size,\n disabled,\n children,\n 'aria-label': ariaLabel,\n style,\n ...props\n },\n ref\n ) => (\n <button\n ref={ref}\n className={iconButton({ size, className })}\n disabled={disabled}\n type='button'\n aria-label={ariaLabel}\n aria-disabled={disabled}\n style={style}\n {...props}\n >\n <Flex aria-hidden='true' align='center' justify='center'>\n {children}\n </Flex>\n </button>\n )\n);\n\nIconButton.displayName = 'IconButton';\n"],"names":["cva","styles","forwardRef","_jsx","Flex"],"mappings":";;;;;;;;AAMA,MAAM,UAAU,GAAGA,SAAG,CAACC,yBAAM,CAAC,UAAU,EAAE;AACxC,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,CAAC,EAAEA,yBAAM,CAAC,mBAAmB,CAAC;AAC9B,YAAA,CAAC,EAAEA,yBAAM,CAAC,mBAAmB,CAAC;AAC9B,YAAA,CAAC,EAAEA,yBAAM,CAAC,mBAAmB,CAAC;AAC9B,YAAA,CAAC,EAAEA,yBAAM,CAAC,mBAAmB,CAAC;AAC/B,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,IAAI,EAAE,CAAC;AACR,KAAA;AACF,CAAA,CAAC,CAAC;AASU,MAAA,UAAU,GAAGC,gBAAU,CAClC,CACE,EACE,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,YAAY,EAAE,SAAS,EACvB,KAAK,EACL,GAAG,KAAK,EACT,EACD,GAAG,MAEHC,gCAAA,CAAA,QAAA,EAAA,EACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,UAAU,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EAC1C,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAC,QAAQ,gBACD,SAAS,EAAA,eAAA,EACN,QAAQ,EACvB,KAAK,EAAE,KAAK,EAAA,GACR,KAAK,EAAA,QAAA,EAETA,iCAACC,SAAI,EAAA,EAAA,aAAA,EAAa,MAAM,EAAC,KAAK,EAAC,QAAQ,EAAC,OAAO,EAAC,QAAQ,EACrD,QAAA,EAAA,QAAQ,GACJ,EACA,CAAA,CACV,EACD;AAEF,UAAU,CAAC,WAAW,GAAG,YAAY;;;;"}
@@ -1,4 +1,4 @@
1
- import { VariantProps } from "class-variance-authority";
1
+ import { VariantProps } from 'class-variance-authority';
2
2
  declare const iconButton: (props?: ({
3
3
  size?: 1 | 2 | 3 | 4 | null | undefined;
4
4
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../../../v1/components/icon-button/icon-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAK7D,QAAA,MAAM,UAAU;;8EAYd,CAAC;AAEH,MAAM,WAAW,eACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,UAAU,CAAC;IACjC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,UAAU,+GAyBtB,CAAC"}
1
+ {"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../../../v1/components/icon-button/icon-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAO,MAAM,0BAA0B,CAAC;AAM7D,QAAA,MAAM,UAAU;;8EAYd,CAAC;AAEH,MAAM,WAAW,eACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,UAAU,CAAC;IACjC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,UAAU,+GA4BtB,CAAC"}
@@ -1,22 +1,23 @@
1
1
  import { j as jsxRuntimeExports } from '../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js';
2
2
  import { cva } from '../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js';
3
3
  import { forwardRef } from 'react';
4
+ import { Flex } from '../flex/flex.js';
4
5
  import styles from './icon-button.module.css.js';
5
6
 
6
7
  const iconButton = cva(styles.iconButton, {
7
8
  variants: {
8
9
  size: {
9
- 1: styles["iconButton-size-1"],
10
- 2: styles["iconButton-size-2"],
11
- 3: styles["iconButton-size-3"],
12
- 4: styles["iconButton-size-4"],
10
+ 1: styles['iconButton-size-1'],
11
+ 2: styles['iconButton-size-2'],
12
+ 3: styles['iconButton-size-3'],
13
+ 4: styles['iconButton-size-4']
13
14
  }
14
15
  },
15
16
  defaultVariants: {
16
- size: 2,
17
- },
17
+ size: 2
18
+ }
18
19
  });
19
- const IconButton = forwardRef(({ className, size, disabled, children, 'aria-label': ariaLabel, style, ...props }, ref) => (jsxRuntimeExports.jsx("button", { ref: ref, className: iconButton({ size, className }), disabled: disabled, type: "button", "aria-label": ariaLabel, "aria-disabled": disabled, style: style, ...props, children: jsxRuntimeExports.jsx("div", { "aria-hidden": "true", children: children }) })));
20
+ const IconButton = forwardRef(({ className, size, disabled, children, 'aria-label': ariaLabel, style, ...props }, ref) => (jsxRuntimeExports.jsx("button", { ref: ref, className: iconButton({ size, className }), disabled: disabled, type: 'button', "aria-label": ariaLabel, "aria-disabled": disabled, style: style, ...props, children: jsxRuntimeExports.jsx(Flex, { "aria-hidden": 'true', align: 'center', justify: 'center', children: children }) })));
20
21
  IconButton.displayName = 'IconButton';
21
22
 
22
23
  export { IconButton };
@@ -1 +1 @@
1
- {"version":3,"file":"icon-button.js","sources":["../../../../v1/components/icon-button/icon-button.tsx"],"sourcesContent":["import { cva, VariantProps } from \"class-variance-authority\";\nimport { ComponentPropsWithoutRef, ElementRef, forwardRef } from \"react\";\n\nimport styles from './icon-button.module.css';\n\nconst iconButton = cva(styles.iconButton, {\n variants: {\n size: {\n 1: styles[\"iconButton-size-1\"],\n 2: styles[\"iconButton-size-2\"],\n 3: styles[\"iconButton-size-3\"],\n 4: styles[\"iconButton-size-4\"],\n }\n },\n defaultVariants: {\n size: 2,\n },\n});\n\nexport interface IconButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof iconButton> {\n size?: 1 | 2 | 3 | 4;\n 'aria-label'?: string;\n}\n\nexport const IconButton = forwardRef<ElementRef<\"button\">, IconButtonProps>(\n ({ \n className, \n size, \n disabled, \n children, \n 'aria-label': ariaLabel,\n style,\n ...props \n }, ref) => (\n <button\n ref={ref}\n className={iconButton({ size, className })}\n disabled={disabled}\n type=\"button\"\n aria-label={ariaLabel}\n aria-disabled={disabled}\n style={style}\n {...props}\n >\n <div aria-hidden=\"true\">\n {children}\n </div>\n </button>\n )\n);\n\nIconButton.displayName = 'IconButton';\n"],"names":["_jsx"],"mappings":";;;;;AAKA,MAAM,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,UAAU,EAAE;AACxC,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,CAAC,EAAE,MAAM,CAAC,mBAAmB,CAAC;AAC9B,YAAA,CAAC,EAAE,MAAM,CAAC,mBAAmB,CAAC;AAC9B,YAAA,CAAC,EAAE,MAAM,CAAC,mBAAmB,CAAC;AAC9B,YAAA,CAAC,EAAE,MAAM,CAAC,mBAAmB,CAAC;AAC/B,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,IAAI,EAAE,CAAC;AACR,KAAA;AACF,CAAA,CAAC,CAAC;AASI,MAAM,UAAU,GAAG,UAAU,CAClC,CAAC,EACC,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,YAAY,EAAE,SAAS,EACvB,KAAK,EACL,GAAG,KAAK,EACT,EAAE,GAAG,MACJA,qBACE,CAAA,QAAA,EAAA,EAAA,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,UAAU,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EAC1C,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAC,QAAQ,EAAA,YAAA,EACD,SAAS,EAAA,eAAA,EACN,QAAQ,EACvB,KAAK,EAAE,KAAK,KACR,KAAK,EAAA,QAAA,EAETA,qBAAiB,CAAA,KAAA,EAAA,EAAA,aAAA,EAAA,MAAM,YACpB,QAAQ,EAAA,CACL,EACC,CAAA,CACV,EACD;AAEF,UAAU,CAAC,WAAW,GAAG,YAAY;;;;"}
1
+ {"version":3,"file":"icon-button.js","sources":["../../../../v1/components/icon-button/icon-button.tsx"],"sourcesContent":["import { VariantProps, cva } from 'class-variance-authority';\nimport { ElementRef, forwardRef } from 'react';\nimport { Flex } from '../flex';\n\nimport styles from './icon-button.module.css';\n\nconst iconButton = cva(styles.iconButton, {\n variants: {\n size: {\n 1: styles['iconButton-size-1'],\n 2: styles['iconButton-size-2'],\n 3: styles['iconButton-size-3'],\n 4: styles['iconButton-size-4']\n }\n },\n defaultVariants: {\n size: 2\n }\n});\n\nexport interface IconButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof iconButton> {\n size?: 1 | 2 | 3 | 4;\n 'aria-label'?: string;\n}\n\nexport const IconButton = forwardRef<ElementRef<'button'>, IconButtonProps>(\n (\n {\n className,\n size,\n disabled,\n children,\n 'aria-label': ariaLabel,\n style,\n ...props\n },\n ref\n ) => (\n <button\n ref={ref}\n className={iconButton({ size, className })}\n disabled={disabled}\n type='button'\n aria-label={ariaLabel}\n aria-disabled={disabled}\n style={style}\n {...props}\n >\n <Flex aria-hidden='true' align='center' justify='center'>\n {children}\n </Flex>\n </button>\n )\n);\n\nIconButton.displayName = 'IconButton';\n"],"names":["_jsx"],"mappings":";;;;;;AAMA,MAAM,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,UAAU,EAAE;AACxC,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,CAAC,EAAE,MAAM,CAAC,mBAAmB,CAAC;AAC9B,YAAA,CAAC,EAAE,MAAM,CAAC,mBAAmB,CAAC;AAC9B,YAAA,CAAC,EAAE,MAAM,CAAC,mBAAmB,CAAC;AAC9B,YAAA,CAAC,EAAE,MAAM,CAAC,mBAAmB,CAAC;AAC/B,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,IAAI,EAAE,CAAC;AACR,KAAA;AACF,CAAA,CAAC,CAAC;AASU,MAAA,UAAU,GAAG,UAAU,CAClC,CACE,EACE,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,YAAY,EAAE,SAAS,EACvB,KAAK,EACL,GAAG,KAAK,EACT,EACD,GAAG,MAEHA,qBAAA,CAAA,QAAA,EAAA,EACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,UAAU,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EAC1C,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAC,QAAQ,gBACD,SAAS,EAAA,eAAA,EACN,QAAQ,EACvB,KAAK,EAAE,KAAK,EAAA,GACR,KAAK,EAAA,QAAA,EAETA,sBAAC,IAAI,EAAA,EAAA,aAAA,EAAa,MAAM,EAAC,KAAK,EAAC,QAAQ,EAAC,OAAO,EAAC,QAAQ,EACrD,QAAA,EAAA,QAAQ,GACJ,EACA,CAAA,CACV,EACD;AAEF,UAAU,CAAC,WAAW,GAAG,YAAY;;;;"}
@@ -1,20 +1,29 @@
1
1
  'use strict';
2
2
 
3
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
4
  var combobox = 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.cjs');
7
5
  var MAXQOH4L = 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/__chunks/MAXQOH4L.cjs');
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');
7
+ var index$2 = require('../../node_modules/.pnpm/@radix-ui_react-slot@1.0.2_@types_react@18.2.12_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.cjs');
8
8
  var index$1 = require('../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.cjs');
9
- var select_module = require('./select.module.css.cjs');
9
+ var React = require('react');
10
10
  var selectRoot = require('./select-root.cjs');
11
+ var select_module = require('./select.module.css.cjs');
11
12
 
12
- const SelectContent = React.forwardRef(({ className, children, position = "popper", searchPlaceholder = "Search...", sideOffset = 4, ...props }, ref) => {
13
- const { autocomplete } = selectRoot.useSelectContext();
14
- return (jsxRuntime.jsxRuntimeExports.jsx(index.Portal, { children: jsxRuntime.jsxRuntimeExports.jsx(index.Content, { role: autocomplete ? "dialog" : undefined, ref: ref, position: position, sideOffset: sideOffset, className: index$1.cx(select_module.default.content, className), ...props, children: jsxRuntime.jsxRuntimeExports.jsx(index.Viewport, { className: index$1.cx(select_module.default.viewport, autocomplete && select_module.default.comboboxViewport), children: autocomplete ? (jsxRuntime.jsxRuntimeExports.jsxs(jsxRuntime.jsxRuntimeExports.Fragment, { children: [jsxRuntime.jsxRuntimeExports.jsx(combobox.Combobox, { autoSelect: true, placeholder: searchPlaceholder, className: select_module.default.comboboxInput, onBlurCapture: event => {
13
+ const SelectContent = React.forwardRef(({ className, children, position = 'popper', searchPlaceholder = 'Search...', sideOffset = 4, asChild, onEscapeKeyDown: providedOnEscapeKeyDown, onPointerDownOutside: providedOnPointerDownOutside, ...props }, ref) => {
14
+ const { autocomplete, multiple, updateSelectionInProgress } = selectRoot.useSelectContext();
15
+ const onPointerDownOutside = React.useCallback(event => {
16
+ updateSelectionInProgress(false);
17
+ providedOnPointerDownOutside?.(event);
18
+ }, [updateSelectionInProgress, providedOnPointerDownOutside]);
19
+ const onEscapeKeyDown = React.useCallback(event => {
20
+ updateSelectionInProgress(false);
21
+ providedOnEscapeKeyDown?.(event);
22
+ }, [updateSelectionInProgress, providedOnEscapeKeyDown]);
23
+ return (jsxRuntime.jsxRuntimeExports.jsx(index.Portal, { children: jsxRuntime.jsxRuntimeExports.jsx(index.Content, { ref: ref, position: position, sideOffset: sideOffset, className: index$1.cx(select_module.default.content, className), onEscapeKeyDown: multiple ? onEscapeKeyDown : providedOnEscapeKeyDown, onPointerDownOutside: multiple ? onPointerDownOutside : providedOnPointerDownOutside, role: autocomplete ? 'dialog' : 'listbox', "aria-multiselectable": !autocomplete && multiple ? true : undefined, "data-multiselectable": multiple ? true : undefined, ...props, children: jsxRuntime.jsxRuntimeExports.jsx(index.Viewport, { className: index$1.cx(select_module.default.viewport, autocomplete && select_module.default.comboboxViewport), asChild: !autocomplete ? asChild : undefined, children: autocomplete ? (jsxRuntime.jsxRuntimeExports.jsxs(jsxRuntime.jsxRuntimeExports.Fragment, { children: [jsxRuntime.jsxRuntimeExports.jsx(combobox.Combobox, { autoSelect: true, placeholder: searchPlaceholder, className: select_module.default.comboboxInput, onBlurCapture: event => {
15
24
  event.preventDefault();
16
25
  event.stopPropagation();
17
- } }), jsxRuntime.jsxRuntimeExports.jsx(MAXQOH4L.ComboboxList, { className: select_module.default.comboboxContent, children: children })] })) : (children) }) }) }));
26
+ } }), jsxRuntime.jsxRuntimeExports.jsx(MAXQOH4L.ComboboxList, { className: select_module.default.comboboxContent, "aria-multiselectable": multiple ? true : undefined, render: asChild ? jsxRuntime.jsxRuntimeExports.jsx(index$2.Slot, {}) : undefined, children: children })] })) : (children) }) }) }));
18
27
  });
19
28
  SelectContent.displayName = index.Content.displayName;
20
29
 
@@ -1 +1 @@
1
- {"version":3,"file":"select-content.cjs","sources":["../../../../v1/components/select/select-content.tsx"],"sourcesContent":["import { ElementRef, forwardRef } from \"react\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { Combobox, ComboboxList } from \"@ariakit/react\";\nimport { cx } from \"class-variance-authority\";\nimport styles from \"./select.module.css\";\nimport { useSelectContext } from \"./select-root\";\n\nexport interface SelectContentProps extends SelectPrimitive.SelectContentProps {\n searchPlaceholder?: string;\n}\n\nexport const SelectContent = forwardRef<\n ElementRef<typeof SelectPrimitive.Content>,\n SelectContentProps\n>(\n (\n {\n className,\n children,\n position = \"popper\",\n searchPlaceholder = \"Search...\",\n sideOffset = 4,\n ...props\n },\n ref,\n ) => {\n const { autocomplete } = useSelectContext();\n\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n role={autocomplete ? \"dialog\" : undefined}\n ref={ref}\n position={position}\n sideOffset={sideOffset}\n className={cx(styles.content, className)}\n {...props}>\n <SelectPrimitive.Viewport\n className={cx(\n styles.viewport,\n autocomplete && styles.comboboxViewport,\n )}>\n {autocomplete ? (\n <>\n <Combobox\n autoSelect\n placeholder={searchPlaceholder}\n className={styles.comboboxInput}\n onBlurCapture={event => {\n event.preventDefault();\n event.stopPropagation();\n }}\n />\n <ComboboxList className={styles.comboboxContent}>\n {children}\n </ComboboxList>\n </>\n ) : (\n children\n )}\n </SelectPrimitive.Viewport>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n },\n);\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n"],"names":["forwardRef","useSelectContext","_jsx","SelectPrimitive.Portal","SelectPrimitive.Content","cx","styles","SelectPrimitive.Viewport","_jsxs","Combobox","ComboboxList"],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v1/components/select/select-content.tsx"],"sourcesContent":["import { Combobox, ComboboxList } from '@ariakit/react';\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cx } from 'class-variance-authority';\nimport { ElementRef, forwardRef, useCallback } from 'react';\nimport { useSelectContext } from './select-root';\nimport styles from './select.module.css';\n\nexport interface SelectContentProps extends SelectPrimitive.SelectContentProps {\n searchPlaceholder?: string;\n}\n\nexport const SelectContent = forwardRef<\n ElementRef<typeof SelectPrimitive.Content>,\n SelectContentProps\n>(\n (\n {\n className,\n children,\n position = 'popper',\n searchPlaceholder = 'Search...',\n sideOffset = 4,\n asChild,\n onEscapeKeyDown: providedOnEscapeKeyDown,\n onPointerDownOutside: providedOnPointerDownOutside,\n ...props\n },\n ref\n ) => {\n const { autocomplete, multiple, updateSelectionInProgress } =\n useSelectContext();\n\n const onPointerDownOutside = useCallback<\n NonNullable<SelectContentProps['onPointerDownOutside']>\n >(\n event => {\n updateSelectionInProgress(false);\n providedOnPointerDownOutside?.(event);\n },\n [updateSelectionInProgress, providedOnPointerDownOutside]\n );\n\n const onEscapeKeyDown = useCallback<\n NonNullable<SelectContentProps['onEscapeKeyDown']>\n >(\n event => {\n updateSelectionInProgress(false);\n providedOnEscapeKeyDown?.(event);\n },\n [updateSelectionInProgress, providedOnEscapeKeyDown]\n );\n\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n position={position}\n sideOffset={sideOffset}\n className={cx(styles.content, className)}\n onEscapeKeyDown={multiple ? onEscapeKeyDown : providedOnEscapeKeyDown}\n onPointerDownOutside={\n multiple ? onPointerDownOutside : providedOnPointerDownOutside\n }\n role={autocomplete ? 'dialog' : 'listbox'}\n aria-multiselectable={!autocomplete && multiple ? true : undefined}\n data-multiselectable={multiple ? true : undefined}\n {...props}\n >\n <SelectPrimitive.Viewport\n className={cx(\n styles.viewport,\n autocomplete && styles.comboboxViewport\n )}\n asChild={!autocomplete ? asChild : undefined}\n >\n {autocomplete ? (\n <>\n <Combobox\n autoSelect\n placeholder={searchPlaceholder}\n className={styles.comboboxInput}\n onBlurCapture={event => {\n event.preventDefault();\n event.stopPropagation();\n }}\n />\n <ComboboxList\n className={styles.comboboxContent}\n aria-multiselectable={multiple ? true : undefined}\n render={asChild ? <Slot /> : undefined}\n >\n {children}\n </ComboboxList>\n </>\n ) : (\n children\n )}\n </SelectPrimitive.Viewport>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n }\n);\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n"],"names":["forwardRef","useSelectContext","useCallback","_jsx","SelectPrimitive.Portal","SelectPrimitive.Content","cx","styles","SelectPrimitive.Viewport","_jsxs","_Fragment","Combobox","ComboboxList","Slot"],"mappings":";;;;;;;;;;;;AAYa,MAAA,aAAa,GAAGA,gBAAU,CAIrC,CACE,EACE,SAAS,EACT,QAAQ,EACR,QAAQ,GAAG,QAAQ,EACnB,iBAAiB,GAAG,WAAW,EAC/B,UAAU,GAAG,CAAC,EACd,OAAO,EACP,eAAe,EAAE,uBAAuB,EACxC,oBAAoB,EAAE,4BAA4B,EAClD,GAAG,KAAK,EACT,EACD,GAAG,KACD;IACF,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,yBAAyB,EAAE,GACzDC,2BAAgB,EAAE,CAAC;AAErB,IAAA,MAAM,oBAAoB,GAAGC,iBAAW,CAGtC,KAAK,IAAG;QACN,yBAAyB,CAAC,KAAK,CAAC,CAAC;AACjC,QAAA,4BAA4B,GAAG,KAAK,CAAC,CAAC;AACxC,KAAC,EACD,CAAC,yBAAyB,EAAE,4BAA4B,CAAC,CAC1D,CAAC;AAEF,IAAA,MAAM,eAAe,GAAGA,iBAAW,CAGjC,KAAK,IAAG;QACN,yBAAyB,CAAC,KAAK,CAAC,CAAC;AACjC,QAAA,uBAAuB,GAAG,KAAK,CAAC,CAAC;AACnC,KAAC,EACD,CAAC,yBAAyB,EAAE,uBAAuB,CAAC,CACrD,CAAC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,QAAQ,EAAA,CACI,IACd,KAEH,QAAQ,CACT,EACwB,CAAA,EAAA,CACH,EACH,CAAA,EACzB;AACJ,CAAC,EACD;AACF,aAAa,CAAC,WAAW,GAAGR,aAAuB,CAAC,WAAW;;;;"}
@@ -1,4 +1,4 @@
1
- import * as SelectPrimitive from "@radix-ui/react-select";
1
+ import * as SelectPrimitive from '@radix-ui/react-select';
2
2
  export interface SelectContentProps extends SelectPrimitive.SelectContentProps {
3
3
  searchPlaceholder?: string;
4
4
  }
@@ -1 +1 @@
1
- {"version":3,"file":"select-content.d.ts","sourceRoot":"","sources":["../../../../v1/components/select/select-content.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAM1D,MAAM,WAAW,kBAAmB,SAAQ,eAAe,CAAC,kBAAkB;IAC5E,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,eAAO,MAAM,aAAa,+GAsDzB,CAAC"}
1
+ {"version":3,"file":"select-content.d.ts","sourceRoot":"","sources":["../../../../v1/components/select/select-content.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAO1D,MAAM,WAAW,kBAAmB,SAAQ,eAAe,CAAC,kBAAkB;IAC5E,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,eAAO,MAAM,aAAa,+GA2FzB,CAAC"}
@@ -1,18 +1,27 @@
1
1
  import { j as jsxRuntimeExports } from '../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js';
2
- import { forwardRef } from 'react';
3
- import { Portal, Content as Content2, 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';
4
2
  import { Combobox } 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.js';
5
3
  import { ComboboxList } 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/MAXQOH4L.js';
4
+ import { Portal, Content as Content2, 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';
5
+ import { Slot as $5e63c961fc1ce211$export$8c6ed5c666ac1360 } from '../../node_modules/.pnpm/@radix-ui_react-slot@1.0.2_@types_react@18.2.12_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.js';
6
6
  import { cx } from '../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js';
7
- import styles from './select.module.css.js';
7
+ import { forwardRef, useCallback } from 'react';
8
8
  import { useSelectContext } from './select-root.js';
9
+ import styles from './select.module.css.js';
9
10
 
10
- const SelectContent = forwardRef(({ className, children, position = "popper", searchPlaceholder = "Search...", sideOffset = 4, ...props }, ref) => {
11
- const { autocomplete } = useSelectContext();
12
- return (jsxRuntimeExports.jsx(Portal, { children: jsxRuntimeExports.jsx(Content2, { role: autocomplete ? "dialog" : undefined, ref: ref, position: position, sideOffset: sideOffset, className: cx(styles.content, className), ...props, children: jsxRuntimeExports.jsx(Viewport, { className: cx(styles.viewport, autocomplete && styles.comboboxViewport), children: autocomplete ? (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(Combobox, { autoSelect: true, placeholder: searchPlaceholder, className: styles.comboboxInput, onBlurCapture: event => {
11
+ const SelectContent = forwardRef(({ className, children, position = 'popper', searchPlaceholder = 'Search...', sideOffset = 4, asChild, onEscapeKeyDown: providedOnEscapeKeyDown, onPointerDownOutside: providedOnPointerDownOutside, ...props }, ref) => {
12
+ const { autocomplete, multiple, updateSelectionInProgress } = useSelectContext();
13
+ const onPointerDownOutside = useCallback(event => {
14
+ updateSelectionInProgress(false);
15
+ providedOnPointerDownOutside?.(event);
16
+ }, [updateSelectionInProgress, providedOnPointerDownOutside]);
17
+ const onEscapeKeyDown = useCallback(event => {
18
+ updateSelectionInProgress(false);
19
+ providedOnEscapeKeyDown?.(event);
20
+ }, [updateSelectionInProgress, providedOnEscapeKeyDown]);
21
+ return (jsxRuntimeExports.jsx(Portal, { children: jsxRuntimeExports.jsx(Content2, { ref: ref, position: position, sideOffset: sideOffset, className: cx(styles.content, className), onEscapeKeyDown: multiple ? onEscapeKeyDown : providedOnEscapeKeyDown, onPointerDownOutside: multiple ? onPointerDownOutside : providedOnPointerDownOutside, role: autocomplete ? 'dialog' : 'listbox', "aria-multiselectable": !autocomplete && multiple ? true : undefined, "data-multiselectable": multiple ? true : undefined, ...props, children: jsxRuntimeExports.jsx(Viewport, { className: cx(styles.viewport, autocomplete && styles.comboboxViewport), asChild: !autocomplete ? asChild : undefined, children: autocomplete ? (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(Combobox, { autoSelect: true, placeholder: searchPlaceholder, className: styles.comboboxInput, onBlurCapture: event => {
13
22
  event.preventDefault();
14
23
  event.stopPropagation();
15
- } }), jsxRuntimeExports.jsx(ComboboxList, { className: styles.comboboxContent, children: children })] })) : (children) }) }) }));
24
+ } }), jsxRuntimeExports.jsx(ComboboxList, { className: styles.comboboxContent, "aria-multiselectable": multiple ? true : undefined, render: asChild ? jsxRuntimeExports.jsx($5e63c961fc1ce211$export$8c6ed5c666ac1360, {}) : undefined, children: children })] })) : (children) }) }) }));
16
25
  });
17
26
  SelectContent.displayName = Content2.displayName;
18
27
 
@@ -1 +1 @@
1
- {"version":3,"file":"select-content.js","sources":["../../../../v1/components/select/select-content.tsx"],"sourcesContent":["import { ElementRef, forwardRef } from \"react\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { Combobox, ComboboxList } from \"@ariakit/react\";\nimport { cx } from \"class-variance-authority\";\nimport styles from \"./select.module.css\";\nimport { useSelectContext } from \"./select-root\";\n\nexport interface SelectContentProps extends SelectPrimitive.SelectContentProps {\n searchPlaceholder?: string;\n}\n\nexport const SelectContent = forwardRef<\n ElementRef<typeof SelectPrimitive.Content>,\n SelectContentProps\n>(\n (\n {\n className,\n children,\n position = \"popper\",\n searchPlaceholder = \"Search...\",\n sideOffset = 4,\n ...props\n },\n ref,\n ) => {\n const { autocomplete } = useSelectContext();\n\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n role={autocomplete ? \"dialog\" : undefined}\n ref={ref}\n position={position}\n sideOffset={sideOffset}\n className={cx(styles.content, className)}\n {...props}>\n <SelectPrimitive.Viewport\n className={cx(\n styles.viewport,\n autocomplete && styles.comboboxViewport,\n )}>\n {autocomplete ? (\n <>\n <Combobox\n autoSelect\n placeholder={searchPlaceholder}\n className={styles.comboboxInput}\n onBlurCapture={event => {\n event.preventDefault();\n event.stopPropagation();\n }}\n />\n <ComboboxList className={styles.comboboxContent}>\n {children}\n </ComboboxList>\n </>\n ) : (\n children\n )}\n </SelectPrimitive.Viewport>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n },\n);\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n"],"names":["_jsx","SelectPrimitive.Portal","SelectPrimitive.Content","SelectPrimitive.Viewport","_jsxs"],"mappings":";;;;;;;;;AAWO,MAAM,aAAa,GAAG,UAAU,CAIrC,CACE,EACE,SAAS,EACT,QAAQ,EACR,QAAQ,GAAG,QAAQ,EACnB,iBAAiB,GAAG,WAAW,EAC/B,UAAU,GAAG,CAAC,EACd,GAAG,KAAK,EACT,EACD,GAAG,KACD;AACF,IAAA,MAAM,EAAE,YAAY,EAAE,GAAG,gBAAgB,EAAE,CAAC;IAE5C,QACEA,sBAACC,MAAsB,EACrB,EAAA,QAAA,EAAAD,qBAAA,CAACE,QAAuB,IACtB,IAAI,EAAE,YAAY,GAAG,QAAQ,GAAG,SAAS,EACzC,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,EAAA,GACpC,KAAK,EACT,QAAA,EAAAF,qBAAA,CAACG,QAAwB,IACvB,SAAS,EAAE,EAAE,CACX,MAAM,CAAC,QAAQ,EACf,YAAY,IAAI,MAAM,CAAC,gBAAgB,CACxC,YACA,YAAY,IACXC,gEACEJ,qBAAC,CAAA,QAAQ,IACP,UAAU,EAAA,IAAA,EACV,WAAW,EAAE,iBAAiB,EAC9B,SAAS,EAAE,MAAM,CAAC,aAAa,EAC/B,aAAa,EAAE,KAAK,IAAG;gCACrB,KAAK,CAAC,cAAc,EAAE,CAAC;gCACvB,KAAK,CAAC,eAAe,EAAE,CAAC;6BACzB,EAAA,CACD,EACFA,qBAAA,CAAC,YAAY,EAAA,EAAC,SAAS,EAAE,MAAM,CAAC,eAAe,EAC5C,QAAA,EAAA,QAAQ,GACI,CACd,EAAA,CAAA,KAEH,QAAQ,CACT,EACwB,CAAA,EAAA,CACH,EACH,CAAA,EACzB;AACJ,CAAC,EACD;AACF,aAAa,CAAC,WAAW,GAAGE,QAAuB,CAAC,WAAW;;;;"}
1
+ {"version":3,"file":"select-content.js","sources":["../../../../v1/components/select/select-content.tsx"],"sourcesContent":["import { Combobox, ComboboxList } from '@ariakit/react';\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cx } from 'class-variance-authority';\nimport { ElementRef, forwardRef, useCallback } from 'react';\nimport { useSelectContext } from './select-root';\nimport styles from './select.module.css';\n\nexport interface SelectContentProps extends SelectPrimitive.SelectContentProps {\n searchPlaceholder?: string;\n}\n\nexport const SelectContent = forwardRef<\n ElementRef<typeof SelectPrimitive.Content>,\n SelectContentProps\n>(\n (\n {\n className,\n children,\n position = 'popper',\n searchPlaceholder = 'Search...',\n sideOffset = 4,\n asChild,\n onEscapeKeyDown: providedOnEscapeKeyDown,\n onPointerDownOutside: providedOnPointerDownOutside,\n ...props\n },\n ref\n ) => {\n const { autocomplete, multiple, updateSelectionInProgress } =\n useSelectContext();\n\n const onPointerDownOutside = useCallback<\n NonNullable<SelectContentProps['onPointerDownOutside']>\n >(\n event => {\n updateSelectionInProgress(false);\n providedOnPointerDownOutside?.(event);\n },\n [updateSelectionInProgress, providedOnPointerDownOutside]\n );\n\n const onEscapeKeyDown = useCallback<\n NonNullable<SelectContentProps['onEscapeKeyDown']>\n >(\n event => {\n updateSelectionInProgress(false);\n providedOnEscapeKeyDown?.(event);\n },\n [updateSelectionInProgress, providedOnEscapeKeyDown]\n );\n\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n position={position}\n sideOffset={sideOffset}\n className={cx(styles.content, className)}\n onEscapeKeyDown={multiple ? onEscapeKeyDown : providedOnEscapeKeyDown}\n onPointerDownOutside={\n multiple ? onPointerDownOutside : providedOnPointerDownOutside\n }\n role={autocomplete ? 'dialog' : 'listbox'}\n aria-multiselectable={!autocomplete && multiple ? true : undefined}\n data-multiselectable={multiple ? true : undefined}\n {...props}\n >\n <SelectPrimitive.Viewport\n className={cx(\n styles.viewport,\n autocomplete && styles.comboboxViewport\n )}\n asChild={!autocomplete ? asChild : undefined}\n >\n {autocomplete ? (\n <>\n <Combobox\n autoSelect\n placeholder={searchPlaceholder}\n className={styles.comboboxInput}\n onBlurCapture={event => {\n event.preventDefault();\n event.stopPropagation();\n }}\n />\n <ComboboxList\n className={styles.comboboxContent}\n aria-multiselectable={multiple ? true : undefined}\n render={asChild ? <Slot /> : undefined}\n >\n {children}\n </ComboboxList>\n </>\n ) : (\n children\n )}\n </SelectPrimitive.Viewport>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n }\n);\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n"],"names":["_jsx","SelectPrimitive.Portal","SelectPrimitive.Content","SelectPrimitive.Viewport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