@crispy-seed/data-table 0.1.1 → 0.1.2

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 (49) hide show
  1. package/dist/index.cjs +4563 -2
  2. package/dist/index.js +4547 -1
  3. package/package.json +1 -1
  4. package/dist/DataTable-12s-D02v6Qj5.js +0 -1523
  5. package/dist/DataTable-12s-Gpv6I4J8.cjs +0 -1574
  6. package/dist/DataTable-12s-Zml1x9Kr-12s-B-mwMBhn.cjs +0 -161
  7. package/dist/DataTable-12s-Zml1x9Kr-12s-BR-yHfob.js +0 -153
  8. package/dist/Menu-12s-A4lEc__n.cjs +0 -103
  9. package/dist/Menu-12s-v9vnaq8F.js +0 -77
  10. package/dist/Select-12s-CE3SMzFp.js +0 -218
  11. package/dist/Select-12s-CNQC9z8t.cjs +0 -249
  12. package/dist/body-cells-12s-2sTwdliH.cjs +0 -461
  13. package/dist/body-cells-12s-Ba2uF4T-.js +0 -452
  14. package/dist/column-calc-12s-C1-I2KdV.js +0 -129
  15. package/dist/column-calc-12s-CJ26VuDJ.cjs +0 -149
  16. package/dist/column-layout-12s-BhQmNTJG.js +0 -99
  17. package/dist/column-layout-12s-k2fZYeKl.cjs +0 -120
  18. package/dist/column-menu-12s-6Yvu4SZ0.js +0 -406
  19. package/dist/column-menu-12s-BnknuXGh.cjs +0 -426
  20. package/dist/editors-12s-C0RxmTcI.cjs +0 -554
  21. package/dist/editors-12s-COixUnI2.js +0 -524
  22. package/dist/resize-12s-CajyNXFB.js +0 -58
  23. package/dist/resize-12s-ChLpxb4i.cjs +0 -58
  24. package/dist/states-12s-BB0PT_bq.cjs +0 -125
  25. package/dist/states-12s-m5mBR90e.js +0 -122
  26. package/dist/toolbar-12s-B1xiS-Zu.js +0 -68
  27. package/dist/toolbar-12s-DzLbghpK.cjs +0 -70
  28. package/dist/useDataTable-12s-BHiDUubw-12s-CBeCwTe7.js +0 -61
  29. package/dist/useDataTable-12s-BHiDUubw-12s-Dgvt7XDk.cjs +0 -61
  30. package/dist/useDataTableColumnCalc-12s-DTQQTtEJ-12s-CvD14JYo.cjs +0 -207
  31. package/dist/useDataTableColumnCalc-12s-DTQQTtEJ-12s-DsEse3uq.js +0 -183
  32. package/dist/useDataTableColumns-12s-Cn2ZAzFL-12s-CD6goR59.js +0 -289
  33. package/dist/useDataTableColumns-12s-Cn2ZAzFL-12s-CUk_CpYT.cjs +0 -292
  34. package/dist/useDataTableEdit-12s-9Wb_UCrN-12s-BoOHq3GB.js +0 -98
  35. package/dist/useDataTableEdit-12s-9Wb_UCrN-12s-De6YHBba.cjs +0 -98
  36. package/dist/useDataTableFilter-12s-ZzbmWMin-12s-CWyBeFna.js +0 -74
  37. package/dist/useDataTableFilter-12s-ZzbmWMin-12s-lpjzZY3_.cjs +0 -74
  38. package/dist/useDataTableInfiniteScroll-12s-8ZG31URd-12s-BexjP6iO.js +0 -104
  39. package/dist/useDataTableInfiniteScroll-12s-8ZG31URd-12s-Bt8gojr9.cjs +0 -104
  40. package/dist/useDataTableRow-12s-CPYaDa1p-12s-4qkGoz-j.js +0 -30
  41. package/dist/useDataTableRow-12s-CPYaDa1p-12s-DG64uYjn.cjs +0 -30
  42. package/dist/useDataTableScroll-12s-BKDCr0en-12s-C7f2vHeG.js +0 -61
  43. package/dist/useDataTableScroll-12s-BKDCr0en-12s-CUvUYMtt.cjs +0 -61
  44. package/dist/useDataTableSearch-12s-Ck3iWcpX-12s-B-65V6gH.js +0 -37
  45. package/dist/useDataTableSearch-12s-Ck3iWcpX-12s-DhVfN2Hq.cjs +0 -37
  46. package/dist/useDataTableSelection-12s-BIDtiRQq-12s-IS__VAnU.cjs +0 -71
  47. package/dist/useDataTableSelection-12s-BIDtiRQq-12s-O6M_BhrH.js +0 -71
  48. package/dist/useDataTableSort-12s-DvJYtmeS-12s-C5VGnsq4.cjs +0 -78
  49. package/dist/useDataTableSort-12s-DvJYtmeS-12s-DABSNt6U.js +0 -78
@@ -1,218 +0,0 @@
1
- 'use client';
2
- function __insertCSS(code) {
3
- if (!code || typeof document == 'undefined') return
4
- let head = document.head || document.getElementsByTagName('head')[0]
5
- let style = document.createElement('style')
6
- style.type = 'text/css'
7
- head.appendChild(style)
8
- ;style.styleSheet ? (style.styleSheet.cssText = code) : style.appendChild(document.createTextNode(code))
9
- }
10
-
11
- import { jsx } from 'react/jsx-runtime';
12
- import { Select, useSelectContext, useSelectItemContext } from '@seed-design/react-select';
13
- import { useFieldContext } from '@seed-design/react-field';
14
- import { mergeProps } from '@seed-design/dom-utils';
15
- import { select } from '@seed-design/css/recipes/select';
16
- import { selectTrigger } from '@seed-design/css/recipes/select-trigger';
17
- import { selectItem } from '@seed-design/css/recipes/select-item';
18
- import { c as createSlotRecipeContext, a as createWithStateProps, I as InternalIcon, P as Primitive, b as clsx, s as splitMultipleVariantsProps } from './DataTable-12s-D02v6Qj5.js';
19
- import * as React from 'react';
20
-
21
- // A select-only combobox spans three specs — the trigger, the floating listbox
22
- // container, and the option rows — each with its own independent states and its own
23
- // variant map. `SelectRoot` seeds defaults for all three, but only the container
24
- // resolves there, since its slots are spread across the portal subtree with no
25
- // single element to own them. The trigger and each option row resolve their own
26
- // recipe, so a per-instance variant can override the root's default.
27
- const { ClassNamesProvider: TriggerClassNamesProvider, PropsProvider: TriggerPropsProvider, useProps: useTriggerProps, withContext: withTriggerContext, useClassNames: useTriggerClassNames } = createSlotRecipeContext(selectTrigger);
28
- const { ClassNamesProvider: ContentClassNamesProvider, withContext: withContentContext, useClassNames: useContentClassNames } = createSlotRecipeContext(select);
29
- const { ClassNamesProvider: ItemClassNamesProvider, PropsProvider: ItemPropsProvider, useProps: useItemProps, withContext: withItemContext, useClassNames: useItemClassNames } = createSlotRecipeContext(selectItem);
30
- const withStateProps = createWithStateProps([
31
- useSelectContext
32
- ]);
33
- const withItemStateProps = createWithStateProps([
34
- useSelectItemContext
35
- ]);
36
- // NOTE: `gutter` and `overflowPadding` are specified in Rootage (`select.yaml`,
37
- // both `$dimension.x2`) and generated into `@seed-design/css`, but nothing reads
38
- // them: floating-ui's `offset`/`shift` take numbers, not CSS custom properties,
39
- // so the headless layer falls back to its own `8`. That default stays
40
- // design-system-agnostic on purpose — this layer is the one that owns the
41
- // Rootage binding, so seed the spec values from here when they need to win,
42
- // the way `HelpBubbleRoot` passes `gutter` through `defaultProps`.
43
- const SelectRoot = (props)=>{
44
- const [{ select: contentVariantProps, selectTrigger: triggerVariantProps, selectItem: itemVariantProps }, otherProps] = splitMultipleVariantsProps(props, {
45
- select,
46
- selectTrigger,
47
- selectItem
48
- });
49
- const contentClassNames = select(contentVariantProps);
50
- return /*#__PURE__*/ jsx(ContentClassNamesProvider, {
51
- value: contentClassNames,
52
- children: /*#__PURE__*/ jsx(TriggerPropsProvider, {
53
- value: triggerVariantProps,
54
- children: /*#__PURE__*/ jsx(ItemPropsProvider, {
55
- value: itemVariantProps,
56
- children: /*#__PURE__*/ jsx(Select.Root, {
57
- ...otherProps
58
- })
59
- })
60
- })
61
- });
62
- };
63
- const SelectTrigger = /*#__PURE__*/ React.forwardRef(({ className, ...props }, ref)=>{
64
- const [variantProps, otherProps] = selectTrigger.splitVariantProps(props);
65
- const rootProps = useTriggerProps();
66
- const classNames = selectTrigger({
67
- ...rootProps,
68
- ...variantProps
69
- });
70
- const fieldContext = useFieldContext({
71
- strict: false
72
- });
73
- // Pull only the field's labelledby/describedby: `useSelect` owns the
74
- // combobox's aria-invalid/required and native disabled, so we don't merge
75
- // those from the field (avoids duplicate ownership and aria-disabled on top
76
- // of the native disabled button).
77
- const mergedProps = mergeProps(fieldContext ? {
78
- "aria-labelledby": fieldContext.inputAriaAttributes["aria-labelledby"],
79
- "aria-describedby": fieldContext.inputAriaAttributes["aria-describedby"]
80
- } : {}, otherProps);
81
- if (process.env.NODE_ENV !== "production" && !fieldContext && !otherProps["aria-label"] && !otherProps["aria-labelledby"]) {
82
- console.warn("SelectTrigger: Please provide `aria-label` or `aria-labelledby` for accessibility, or put `SelectTrigger` inside a `Field` where a `FieldLabel` is provided.");
83
- }
84
- return /*#__PURE__*/ jsx(TriggerClassNamesProvider, {
85
- value: classNames,
86
- children: /*#__PURE__*/ jsx(Select.Trigger, {
87
- ref: ref,
88
- className: clsx(classNames.root, className),
89
- ...mergedProps
90
- })
91
- });
92
- });
93
- SelectTrigger.displayName = "SelectTrigger";
94
- const SelectValue = withTriggerContext(withStateProps(Select.Value), "value");
95
- const SelectPlaceholder = withTriggerContext(withStateProps(Select.Placeholder), "placeholder");
96
- const SelectPrefixIcon = /*#__PURE__*/ React.forwardRef(({ fallback, className, ...otherProps }, ref)=>{
97
- const { selectedItem, stateProps } = useSelectContext();
98
- const classNames = useTriggerClassNames();
99
- const svg = selectedItem?.icon ?? fallback;
100
- if (!svg) return null;
101
- return /*#__PURE__*/ jsx(InternalIcon, {
102
- ref: ref,
103
- svg: svg,
104
- className: clsx(classNames.prefixIcon, className),
105
- ...stateProps,
106
- ...otherProps
107
- });
108
- });
109
- SelectPrefixIcon.displayName = "SelectPrefixIcon";
110
- const SelectSuffixIcon = withTriggerContext(withStateProps(InternalIcon), "suffixIcon");
111
- const SelectPositioner = /*#__PURE__*/ React.forwardRef(({ className, ...props }, ref)=>{
112
- const classNames = useContentClassNames();
113
- return /*#__PURE__*/ jsx(Select.Positioner, {
114
- ref: ref,
115
- className: clsx(classNames.positioner, className),
116
- ...props
117
- });
118
- });
119
- SelectPositioner.displayName = "SelectPositioner";
120
- const SelectContent = /*#__PURE__*/ React.forwardRef(({ className, ...otherProps }, ref)=>{
121
- const classNames = useContentClassNames();
122
- const fieldContext = useFieldContext({
123
- strict: false
124
- });
125
- // Label the listbox popup with the same field label (APG combobox pattern).
126
- const mergedProps = mergeProps(fieldContext ? {
127
- "aria-labelledby": fieldContext.inputAriaAttributes["aria-labelledby"]
128
- } : {}, otherProps);
129
- return /*#__PURE__*/ jsx(Select.Content, {
130
- ref: ref,
131
- className: clsx(classNames.content, className),
132
- ...mergedProps
133
- });
134
- });
135
- SelectContent.displayName = "SelectContent";
136
- const SelectScrollArea = withContentContext(Primitive.div, "scrollArea");
137
- withContentContext(Select.Group, "group");
138
- withContentContext(Select.GroupLabel, "groupLabel");
139
- const SelectItem = /*#__PURE__*/ React.forwardRef(({ prefixIcon, className, ...props }, ref)=>{
140
- const [variantProps, otherProps] = selectItem.splitVariantProps(props);
141
- const rootProps = useItemProps();
142
- const classNames = selectItem({
143
- ...rootProps,
144
- ...variantProps
145
- });
146
- return /*#__PURE__*/ jsx(ItemClassNamesProvider, {
147
- value: classNames,
148
- children: /*#__PURE__*/ jsx(Select.Item, {
149
- ref: ref,
150
- icon: prefixIcon,
151
- ...otherProps,
152
- className: clsx(classNames.root, className)
153
- })
154
- });
155
- });
156
- SelectItem.displayName = "SelectItem";
157
- const SelectItemPrefixIcon = /*#__PURE__*/ React.forwardRef(({ svg: svgOverride, className, ...otherProps }, ref)=>{
158
- const { icon, stateProps } = useSelectItemContext();
159
- const classNames = useItemClassNames();
160
- const svg = svgOverride ?? icon;
161
- if (!svg) return null;
162
- return /*#__PURE__*/ jsx(InternalIcon, {
163
- ref: ref,
164
- svg: svg,
165
- className: clsx(classNames.prefixIcon, className),
166
- ...stateProps,
167
- ...otherProps
168
- });
169
- });
170
- SelectItemPrefixIcon.displayName = "SelectItemPrefixIcon";
171
- const SelectItemBody = withItemContext(withItemStateProps(Primitive.div), "body");
172
- const SelectItemLabel = /*#__PURE__*/ React.forwardRef(({ children, className, ...otherProps }, ref)=>{
173
- const { label, stateProps } = useSelectItemContext();
174
- const classNames = useItemClassNames();
175
- // stateProps stays because the label's disabled style targets its own
176
- // `data-disabled`.
177
- return /*#__PURE__*/ jsx(Primitive.span, {
178
- ref: ref,
179
- className: clsx(classNames.label, className),
180
- ...stateProps,
181
- ...otherProps,
182
- children: children ?? label
183
- });
184
- });
185
- SelectItemLabel.displayName = "SelectItemLabel";
186
- withItemContext(withItemStateProps(Primitive.span), "description");
187
- const SelectItemIndicator = /*#__PURE__*/ React.forwardRef(({ selected: selectedSvg, unselected: unselectedSvg, className, ...otherProps }, ref)=>{
188
- const { isSelected, stateProps } = useSelectItemContext();
189
- const classNames = useItemClassNames();
190
- const svg = isSelected ? selectedSvg : unselectedSvg;
191
- if (!svg) return null;
192
- return /*#__PURE__*/ jsx(InternalIcon, {
193
- ref: ref,
194
- svg: svg,
195
- className: clsx(classNames.indicator, className),
196
- ...stateProps,
197
- ...otherProps
198
- });
199
- });
200
- SelectItemIndicator.displayName = "SelectItemIndicator";
201
- const SelectHiddenSelect = /*#__PURE__*/ React.forwardRef((props, ref)=>{
202
- const fieldContext = useFieldContext({
203
- strict: false
204
- });
205
- // The field label's `htmlFor` targets the field input id. Carrying that id on
206
- // the hidden native select — a labelable element whose label activation only
207
- // focuses, never opens anything — makes label clicks reach the trigger through
208
- // the hidden select's focus redirect. Associating the label with the trigger
209
- // button instead would forward label clicks as activation and open the listbox.
210
- return /*#__PURE__*/ jsx(Select.HiddenSelect, {
211
- ref: ref,
212
- id: fieldContext?.inputProps.id,
213
- ...props
214
- });
215
- });
216
- SelectHiddenSelect.displayName = "SelectHiddenSelect";
217
-
218
- export { SelectRoot as S, SelectTrigger as a, SelectValue as b, SelectPlaceholder as c, SelectSuffixIcon as d, SelectPositioner as e, SelectContent as f, SelectScrollArea as g, SelectItem as h, SelectItemBody as i, SelectItemLabel as j, SelectItemIndicator as k };
@@ -1,249 +0,0 @@
1
- 'use client';
2
- function __insertCSS(code) {
3
- if (!code || typeof document == 'undefined') return
4
- let head = document.head || document.getElementsByTagName('head')[0]
5
- let style = document.createElement('style')
6
- style.type = 'text/css'
7
- head.appendChild(style)
8
- ;style.styleSheet ? (style.styleSheet.cssText = code) : style.appendChild(document.createTextNode(code))
9
- }
10
-
11
- var jsxRuntime = require('react/jsx-runtime');
12
- var reactSelect = require('@seed-design/react-select');
13
- var reactField = require('@seed-design/react-field');
14
- var domUtils = require('@seed-design/dom-utils');
15
- var select = require('@seed-design/css/recipes/select');
16
- var selectTrigger = require('@seed-design/css/recipes/select-trigger');
17
- var selectItem = require('@seed-design/css/recipes/select-item');
18
- var DataTable12s = require('./DataTable-12s-Gpv6I4J8.cjs');
19
- var React = require('react');
20
-
21
- function _interopNamespace(e) {
22
- if (e && e.__esModule) return e;
23
- var n = Object.create(null);
24
- if (e) {
25
- Object.keys(e).forEach(function (k) {
26
- if (k !== 'default') {
27
- var d = Object.getOwnPropertyDescriptor(e, k);
28
- Object.defineProperty(n, k, d.get ? d : {
29
- enumerable: true,
30
- get: function () { return e[k]; }
31
- });
32
- }
33
- });
34
- }
35
- n.default = e;
36
- return n;
37
- }
38
-
39
- var React__namespace = /*#__PURE__*/_interopNamespace(React);
40
-
41
- // A select-only combobox spans three specs — the trigger, the floating listbox
42
- // container, and the option rows — each with its own independent states and its own
43
- // variant map. `SelectRoot` seeds defaults for all three, but only the container
44
- // resolves there, since its slots are spread across the portal subtree with no
45
- // single element to own them. The trigger and each option row resolve their own
46
- // recipe, so a per-instance variant can override the root's default.
47
- const { ClassNamesProvider: TriggerClassNamesProvider, PropsProvider: TriggerPropsProvider, useProps: useTriggerProps, withContext: withTriggerContext, useClassNames: useTriggerClassNames } = DataTable12s.createSlotRecipeContext(selectTrigger.selectTrigger);
48
- const { ClassNamesProvider: ContentClassNamesProvider, withContext: withContentContext, useClassNames: useContentClassNames } = DataTable12s.createSlotRecipeContext(select.select);
49
- const { ClassNamesProvider: ItemClassNamesProvider, PropsProvider: ItemPropsProvider, useProps: useItemProps, withContext: withItemContext, useClassNames: useItemClassNames } = DataTable12s.createSlotRecipeContext(selectItem.selectItem);
50
- const withStateProps = DataTable12s.createWithStateProps([
51
- reactSelect.useSelectContext
52
- ]);
53
- const withItemStateProps = DataTable12s.createWithStateProps([
54
- reactSelect.useSelectItemContext
55
- ]);
56
- // NOTE: `gutter` and `overflowPadding` are specified in Rootage (`select.yaml`,
57
- // both `$dimension.x2`) and generated into `@seed-design/css`, but nothing reads
58
- // them: floating-ui's `offset`/`shift` take numbers, not CSS custom properties,
59
- // so the headless layer falls back to its own `8`. That default stays
60
- // design-system-agnostic on purpose — this layer is the one that owns the
61
- // Rootage binding, so seed the spec values from here when they need to win,
62
- // the way `HelpBubbleRoot` passes `gutter` through `defaultProps`.
63
- const SelectRoot = (props)=>{
64
- const [{ select: contentVariantProps, selectTrigger: triggerVariantProps, selectItem: itemVariantProps }, otherProps] = DataTable12s.splitMultipleVariantsProps(props, {
65
- select: select.select,
66
- selectTrigger: selectTrigger.selectTrigger,
67
- selectItem: selectItem.selectItem
68
- });
69
- const contentClassNames = select.select(contentVariantProps);
70
- return /*#__PURE__*/ jsxRuntime.jsx(ContentClassNamesProvider, {
71
- value: contentClassNames,
72
- children: /*#__PURE__*/ jsxRuntime.jsx(TriggerPropsProvider, {
73
- value: triggerVariantProps,
74
- children: /*#__PURE__*/ jsxRuntime.jsx(ItemPropsProvider, {
75
- value: itemVariantProps,
76
- children: /*#__PURE__*/ jsxRuntime.jsx(reactSelect.Select.Root, {
77
- ...otherProps
78
- })
79
- })
80
- })
81
- });
82
- };
83
- const SelectTrigger = /*#__PURE__*/ React__namespace.forwardRef(({ className, ...props }, ref)=>{
84
- const [variantProps, otherProps] = selectTrigger.selectTrigger.splitVariantProps(props);
85
- const rootProps = useTriggerProps();
86
- const classNames = selectTrigger.selectTrigger({
87
- ...rootProps,
88
- ...variantProps
89
- });
90
- const fieldContext = reactField.useFieldContext({
91
- strict: false
92
- });
93
- // Pull only the field's labelledby/describedby: `useSelect` owns the
94
- // combobox's aria-invalid/required and native disabled, so we don't merge
95
- // those from the field (avoids duplicate ownership and aria-disabled on top
96
- // of the native disabled button).
97
- const mergedProps = domUtils.mergeProps(fieldContext ? {
98
- "aria-labelledby": fieldContext.inputAriaAttributes["aria-labelledby"],
99
- "aria-describedby": fieldContext.inputAriaAttributes["aria-describedby"]
100
- } : {}, otherProps);
101
- if (process.env.NODE_ENV !== "production" && !fieldContext && !otherProps["aria-label"] && !otherProps["aria-labelledby"]) {
102
- console.warn("SelectTrigger: Please provide `aria-label` or `aria-labelledby` for accessibility, or put `SelectTrigger` inside a `Field` where a `FieldLabel` is provided.");
103
- }
104
- return /*#__PURE__*/ jsxRuntime.jsx(TriggerClassNamesProvider, {
105
- value: classNames,
106
- children: /*#__PURE__*/ jsxRuntime.jsx(reactSelect.Select.Trigger, {
107
- ref: ref,
108
- className: DataTable12s.clsx(classNames.root, className),
109
- ...mergedProps
110
- })
111
- });
112
- });
113
- SelectTrigger.displayName = "SelectTrigger";
114
- const SelectValue = withTriggerContext(withStateProps(reactSelect.Select.Value), "value");
115
- const SelectPlaceholder = withTriggerContext(withStateProps(reactSelect.Select.Placeholder), "placeholder");
116
- const SelectPrefixIcon = /*#__PURE__*/ React__namespace.forwardRef(({ fallback, className, ...otherProps }, ref)=>{
117
- const { selectedItem, stateProps } = reactSelect.useSelectContext();
118
- const classNames = useTriggerClassNames();
119
- const svg = selectedItem?.icon ?? fallback;
120
- if (!svg) return null;
121
- return /*#__PURE__*/ jsxRuntime.jsx(DataTable12s.InternalIcon, {
122
- ref: ref,
123
- svg: svg,
124
- className: DataTable12s.clsx(classNames.prefixIcon, className),
125
- ...stateProps,
126
- ...otherProps
127
- });
128
- });
129
- SelectPrefixIcon.displayName = "SelectPrefixIcon";
130
- const SelectSuffixIcon = withTriggerContext(withStateProps(DataTable12s.InternalIcon), "suffixIcon");
131
- const SelectPositioner = /*#__PURE__*/ React__namespace.forwardRef(({ className, ...props }, ref)=>{
132
- const classNames = useContentClassNames();
133
- return /*#__PURE__*/ jsxRuntime.jsx(reactSelect.Select.Positioner, {
134
- ref: ref,
135
- className: DataTable12s.clsx(classNames.positioner, className),
136
- ...props
137
- });
138
- });
139
- SelectPositioner.displayName = "SelectPositioner";
140
- const SelectContent = /*#__PURE__*/ React__namespace.forwardRef(({ className, ...otherProps }, ref)=>{
141
- const classNames = useContentClassNames();
142
- const fieldContext = reactField.useFieldContext({
143
- strict: false
144
- });
145
- // Label the listbox popup with the same field label (APG combobox pattern).
146
- const mergedProps = domUtils.mergeProps(fieldContext ? {
147
- "aria-labelledby": fieldContext.inputAriaAttributes["aria-labelledby"]
148
- } : {}, otherProps);
149
- return /*#__PURE__*/ jsxRuntime.jsx(reactSelect.Select.Content, {
150
- ref: ref,
151
- className: DataTable12s.clsx(classNames.content, className),
152
- ...mergedProps
153
- });
154
- });
155
- SelectContent.displayName = "SelectContent";
156
- const SelectScrollArea = withContentContext(DataTable12s.Primitive.div, "scrollArea");
157
- withContentContext(reactSelect.Select.Group, "group");
158
- withContentContext(reactSelect.Select.GroupLabel, "groupLabel");
159
- const SelectItem = /*#__PURE__*/ React__namespace.forwardRef(({ prefixIcon, className, ...props }, ref)=>{
160
- const [variantProps, otherProps] = selectItem.selectItem.splitVariantProps(props);
161
- const rootProps = useItemProps();
162
- const classNames = selectItem.selectItem({
163
- ...rootProps,
164
- ...variantProps
165
- });
166
- return /*#__PURE__*/ jsxRuntime.jsx(ItemClassNamesProvider, {
167
- value: classNames,
168
- children: /*#__PURE__*/ jsxRuntime.jsx(reactSelect.Select.Item, {
169
- ref: ref,
170
- icon: prefixIcon,
171
- ...otherProps,
172
- className: DataTable12s.clsx(classNames.root, className)
173
- })
174
- });
175
- });
176
- SelectItem.displayName = "SelectItem";
177
- const SelectItemPrefixIcon = /*#__PURE__*/ React__namespace.forwardRef(({ svg: svgOverride, className, ...otherProps }, ref)=>{
178
- const { icon, stateProps } = reactSelect.useSelectItemContext();
179
- const classNames = useItemClassNames();
180
- const svg = svgOverride ?? icon;
181
- if (!svg) return null;
182
- return /*#__PURE__*/ jsxRuntime.jsx(DataTable12s.InternalIcon, {
183
- ref: ref,
184
- svg: svg,
185
- className: DataTable12s.clsx(classNames.prefixIcon, className),
186
- ...stateProps,
187
- ...otherProps
188
- });
189
- });
190
- SelectItemPrefixIcon.displayName = "SelectItemPrefixIcon";
191
- const SelectItemBody = withItemContext(withItemStateProps(DataTable12s.Primitive.div), "body");
192
- const SelectItemLabel = /*#__PURE__*/ React__namespace.forwardRef(({ children, className, ...otherProps }, ref)=>{
193
- const { label, stateProps } = reactSelect.useSelectItemContext();
194
- const classNames = useItemClassNames();
195
- // stateProps stays because the label's disabled style targets its own
196
- // `data-disabled`.
197
- return /*#__PURE__*/ jsxRuntime.jsx(DataTable12s.Primitive.span, {
198
- ref: ref,
199
- className: DataTable12s.clsx(classNames.label, className),
200
- ...stateProps,
201
- ...otherProps,
202
- children: children ?? label
203
- });
204
- });
205
- SelectItemLabel.displayName = "SelectItemLabel";
206
- withItemContext(withItemStateProps(DataTable12s.Primitive.span), "description");
207
- const SelectItemIndicator = /*#__PURE__*/ React__namespace.forwardRef(({ selected: selectedSvg, unselected: unselectedSvg, className, ...otherProps }, ref)=>{
208
- const { isSelected, stateProps } = reactSelect.useSelectItemContext();
209
- const classNames = useItemClassNames();
210
- const svg = isSelected ? selectedSvg : unselectedSvg;
211
- if (!svg) return null;
212
- return /*#__PURE__*/ jsxRuntime.jsx(DataTable12s.InternalIcon, {
213
- ref: ref,
214
- svg: svg,
215
- className: DataTable12s.clsx(classNames.indicator, className),
216
- ...stateProps,
217
- ...otherProps
218
- });
219
- });
220
- SelectItemIndicator.displayName = "SelectItemIndicator";
221
- const SelectHiddenSelect = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>{
222
- const fieldContext = reactField.useFieldContext({
223
- strict: false
224
- });
225
- // The field label's `htmlFor` targets the field input id. Carrying that id on
226
- // the hidden native select — a labelable element whose label activation only
227
- // focuses, never opens anything — makes label clicks reach the trigger through
228
- // the hidden select's focus redirect. Associating the label with the trigger
229
- // button instead would forward label clicks as activation and open the listbox.
230
- return /*#__PURE__*/ jsxRuntime.jsx(reactSelect.Select.HiddenSelect, {
231
- ref: ref,
232
- id: fieldContext?.inputProps.id,
233
- ...props
234
- });
235
- });
236
- SelectHiddenSelect.displayName = "SelectHiddenSelect";
237
-
238
- exports.SelectContent = SelectContent;
239
- exports.SelectItem = SelectItem;
240
- exports.SelectItemBody = SelectItemBody;
241
- exports.SelectItemIndicator = SelectItemIndicator;
242
- exports.SelectItemLabel = SelectItemLabel;
243
- exports.SelectPlaceholder = SelectPlaceholder;
244
- exports.SelectPositioner = SelectPositioner;
245
- exports.SelectRoot = SelectRoot;
246
- exports.SelectScrollArea = SelectScrollArea;
247
- exports.SelectSuffixIcon = SelectSuffixIcon;
248
- exports.SelectTrigger = SelectTrigger;
249
- exports.SelectValue = SelectValue;