@react-spectrum/s2 0.10.1 → 0.11.1

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 (52) hide show
  1. package/dist/ComboBox.cjs +19 -4
  2. package/dist/ComboBox.cjs.map +1 -1
  3. package/dist/ComboBox.css.map +1 -1
  4. package/dist/ComboBox.mjs +19 -4
  5. package/dist/ComboBox.mjs.map +1 -1
  6. package/dist/DatePicker.cjs +2 -5
  7. package/dist/DatePicker.cjs.map +1 -1
  8. package/dist/DatePicker.css.map +1 -1
  9. package/dist/DatePicker.mjs +2 -5
  10. package/dist/DatePicker.mjs.map +1 -1
  11. package/dist/DateRangePicker.cjs +2 -5
  12. package/dist/DateRangePicker.cjs.map +1 -1
  13. package/dist/DateRangePicker.css.map +1 -1
  14. package/dist/DateRangePicker.mjs +2 -5
  15. package/dist/DateRangePicker.mjs.map +1 -1
  16. package/dist/SelectBoxGroup.cjs +342 -0
  17. package/dist/SelectBoxGroup.cjs.map +1 -0
  18. package/dist/SelectBoxGroup.css +503 -0
  19. package/dist/SelectBoxGroup.css.map +1 -0
  20. package/dist/SelectBoxGroup.mjs +335 -0
  21. package/dist/SelectBoxGroup.mjs.map +1 -0
  22. package/dist/SkeletonCollection.cjs +6 -1
  23. package/dist/SkeletonCollection.cjs.map +1 -1
  24. package/dist/SkeletonCollection.mjs +7 -2
  25. package/dist/SkeletonCollection.mjs.map +1 -1
  26. package/dist/Tabs.cjs +102 -77
  27. package/dist/Tabs.cjs.map +1 -1
  28. package/dist/Tabs.css +8 -4
  29. package/dist/Tabs.css.map +1 -1
  30. package/dist/Tabs.mjs +102 -77
  31. package/dist/Tabs.mjs.map +1 -1
  32. package/dist/main.cjs +5 -0
  33. package/dist/main.cjs.map +1 -1
  34. package/dist/module.mjs +3 -1
  35. package/dist/module.mjs.map +1 -1
  36. package/dist/types.d.ts +43 -1
  37. package/dist/types.d.ts.map +1 -1
  38. package/package.json +21 -21
  39. package/src/ComboBox.tsx +20 -5
  40. package/src/DatePicker.tsx +1 -7
  41. package/src/DateRangePicker.tsx +1 -7
  42. package/src/SelectBoxGroup.tsx +408 -0
  43. package/src/SkeletonCollection.tsx +6 -2
  44. package/src/Tabs.tsx +49 -24
  45. package/src/index.ts +2 -0
  46. package/style/dist/main.cjs +24 -24
  47. package/style/dist/module.mjs +13 -13
  48. package/style/dist/properties.mjs +3 -3
  49. package/style/dist/spectrum-theme.cjs +219 -219
  50. package/style/dist/spectrum-theme.mjs +210 -210
  51. package/style/dist/style-macro.cjs +80 -80
  52. package/style/dist/style-macro.mjs +75 -75
@@ -0,0 +1,408 @@
1
+ /*
2
+ * Copyright 2025 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language
9
+ * governing permissions and limitations under the License.
10
+ */
11
+
12
+ import {baseColor, focusRing, style} from '../style' with {type: 'macro'};
13
+ import {box, iconStyles} from './Checkbox';
14
+ import Checkmark from '../ui-icons/Checkmark';
15
+ import {
16
+ ContextValue,
17
+ DEFAULT_SLOT,
18
+ ListBox,
19
+ ListBoxItem,
20
+ ListBoxProps,
21
+ Provider
22
+ } from 'react-aria-components';
23
+ import {DOMRef, DOMRefValue, GlobalDOMAttributes, Key, Orientation} from '@react-types/shared';
24
+ import {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};
25
+ import {IllustrationContext} from '../src/Icon';
26
+ import {pressScale} from './pressScale';
27
+ import React, {createContext, forwardRef, ReactNode, useContext, useMemo, useRef} from 'react';
28
+ import {TextContext} from './Content';
29
+ import {useSpectrumContextProps} from './useSpectrumContextProps';
30
+
31
+ export interface SelectBoxGroupProps<T> extends StyleProps, Omit<ListBoxProps<T>, keyof GlobalDOMAttributes | 'layout' | 'dragAndDropHooks' | 'dependencies' | 'renderEmptyState' | 'children' | 'onAction' | 'shouldFocusOnHover' | 'selectionBehavior' | 'shouldSelectOnPressUp' | 'shouldFocusWrap' | 'style' | 'className'> {
32
+ /**
33
+ * The SelectBox elements contained within the SelectBoxGroup.
34
+ */
35
+ children: ReactNode,
36
+ /**
37
+ * The layout direction of the content in each SelectBox.
38
+ * @default 'vertical'
39
+ */
40
+ orientation?: Orientation,
41
+ /**
42
+ * The selection mode for the SelectBoxGroup.
43
+ * @default 'single'
44
+ */
45
+ selectionMode?: 'single' | 'multiple',
46
+ /**
47
+ * Whether the SelectBoxGroup is disabled.
48
+ */
49
+ isDisabled?: boolean
50
+ }
51
+
52
+ export interface SelectBoxProps extends StyleProps {
53
+ /** The unique id of the SelectBox. */
54
+ id?: Key,
55
+ /** A string representation of the SelectBox's contents, used for features like typeahead. */
56
+ textValue?: string,
57
+ /** An accessibility label for this item. */
58
+ 'aria-label'?: string,
59
+ /**
60
+ * The contents of the SelectBox.
61
+ */
62
+ children: ReactNode,
63
+ /**
64
+ * Whether the SelectBox is disabled.
65
+ */
66
+ isDisabled?: boolean
67
+ }
68
+
69
+ interface SelectBoxContextValue {
70
+ allowMultiSelect?: boolean,
71
+ orientation?: Orientation,
72
+ isDisabled?: boolean
73
+ }
74
+
75
+ const SelectBoxContext = createContext<SelectBoxContextValue>({orientation: 'vertical'});
76
+ export const SelectBoxGroupContext = createContext<ContextValue<Partial<SelectBoxGroupProps<any>>, DOMRefValue<HTMLDivElement>>>(null);
77
+
78
+ const labelOnly = ':has([slot=label]):not(:has([slot=description]))';
79
+ const noIllustration = ':not(:has([slot=illustration]))';
80
+ const selectBoxStyles = style({
81
+ ...focusRing(),
82
+ display: 'grid',
83
+ gridAutoRows: '1fr',
84
+ position: 'relative',
85
+ font: 'ui',
86
+ cursor: 'default',
87
+ boxSizing: 'border-box',
88
+ overflow: 'hidden',
89
+ width: {
90
+ default: 170,
91
+ orientation: {
92
+ horizontal: 368
93
+ }
94
+ },
95
+ height: {
96
+ default: 170,
97
+ orientation: {
98
+ horizontal: 'auto'
99
+ }
100
+ },
101
+ minWidth: {
102
+ default: 144,
103
+ orientation: {
104
+ horizontal: 188
105
+ }
106
+ },
107
+ maxWidth: {
108
+ default: 170,
109
+ orientation: {
110
+ horizontal: 480
111
+ }
112
+ },
113
+ minHeight: {
114
+ default: 144,
115
+ orientation: {
116
+ horizontal: 80
117
+ }
118
+ },
119
+ maxHeight: {
120
+ default: 170,
121
+ orientation: {
122
+ horizontal: 240
123
+ }
124
+ },
125
+ padding: {
126
+ default: 24,
127
+ orientation: {
128
+ horizontal: 16
129
+ }
130
+ },
131
+ paddingStart: {
132
+ orientation: {
133
+ horizontal: 32
134
+ }
135
+ },
136
+ paddingEnd: {
137
+ orientation: {
138
+ horizontal: 24
139
+ }
140
+ },
141
+ gridTemplateAreas: {
142
+ orientation: {
143
+ vertical: [
144
+ 'illustration',
145
+ '.',
146
+ 'label'
147
+ ],
148
+ horizontal: {
149
+ default: [
150
+ 'illustration . label',
151
+ 'illustration . description'
152
+ ],
153
+ [labelOnly]: [
154
+ 'illustration . label'
155
+ ]
156
+ }
157
+ }
158
+ },
159
+ gridTemplateRows: {
160
+ orientation: {
161
+ vertical: ['min-content', 8, 'min-content'],
162
+ horizontal: {
163
+ default: ['min-content', 2, 'min-content'],
164
+ [noIllustration]: ['min-content']
165
+ }
166
+ }
167
+ },
168
+ gridTemplateColumns: {
169
+ orientation: {
170
+ horizontal: 'min-content 10px 1fr'
171
+ }
172
+ },
173
+ alignContent: {
174
+ orientation: {
175
+ vertical: 'center'
176
+ }
177
+ },
178
+ borderRadius: 'lg',
179
+ borderStyle: 'solid',
180
+ borderColor: {
181
+ default: 'transparent',
182
+ isSelected: 'gray-900',
183
+ isDisabled: 'transparent'
184
+ },
185
+ backgroundColor: {
186
+ default: 'layer-2',
187
+ isDisabled: 'disabled'
188
+ },
189
+ color: {
190
+ isDisabled: 'disabled'
191
+ },
192
+ boxShadow: {
193
+ default: 'emphasized',
194
+ isHovered: 'elevated',
195
+ isSelected: 'elevated',
196
+ isDisabled: 'none'
197
+ },
198
+ borderWidth: 2,
199
+ transition: 'default'
200
+ }, getAllowedOverrides());
201
+
202
+ const illustrationContainer = style({
203
+ gridArea: 'illustration',
204
+ alignSelf: 'center',
205
+ justifySelf: 'center',
206
+ minSize: 48,
207
+ '--iconPrimary': {
208
+ type: 'color',
209
+ value: {
210
+ default: baseColor('neutral'),
211
+ isDisabled: 'disabled'
212
+ }
213
+ }
214
+ });
215
+
216
+ const descriptionText = style({
217
+ gridArea: 'description',
218
+ alignSelf: 'center',
219
+ display: {
220
+ default: 'block',
221
+ orientation: {
222
+ vertical: 'none'
223
+ }
224
+ },
225
+ overflow: 'hidden',
226
+ textAlign: {
227
+ default: 'center',
228
+ orientation: {
229
+ horizontal: 'start'
230
+ }
231
+ },
232
+ color: {
233
+ default: baseColor('neutral'),
234
+ isDisabled: 'disabled'
235
+ }
236
+ });
237
+
238
+ const labelText = style({
239
+ gridArea: 'label',
240
+ alignSelf: 'center',
241
+ justifySelf: {
242
+ default: 'center',
243
+ orientation: {
244
+ horizontal: 'start'
245
+ }
246
+ },
247
+ width: '100%',
248
+ overflow: 'hidden',
249
+ minWidth: 0,
250
+ textAlign: {
251
+ default: 'center',
252
+ orientation: {
253
+ horizontal: 'start'
254
+ }
255
+ },
256
+ whiteSpace: 'nowrap',
257
+ textOverflow: 'ellipsis',
258
+ fontWeight: {
259
+ orientation: {
260
+ horizontal: 'bold'
261
+ }
262
+ },
263
+ color: {
264
+ default: baseColor('neutral'),
265
+ isDisabled: 'disabled'
266
+ }
267
+ });
268
+
269
+ const gridStyles = style<{orientation?: Orientation}>({
270
+ display: 'grid',
271
+ gridAutoRows: '1fr',
272
+ gap: 24,
273
+ justifyContent: 'center',
274
+ '--size': {
275
+ type: 'width',
276
+ value: {
277
+ orientation: {
278
+ horizontal: 368,
279
+ vertical: 170
280
+ }
281
+ }
282
+ },
283
+ gridTemplateColumns: {
284
+ orientation: {
285
+ horizontal: 'repeat(auto-fit, var(--size))',
286
+ vertical: 'repeat(auto-fit, var(--size))'
287
+ }
288
+ }
289
+ }, getAllowedOverrides());
290
+
291
+ /**
292
+ * SelectBox is a single selectable item in a SelectBoxGroup.
293
+ */
294
+ export function SelectBox(props: SelectBoxProps): ReactNode {
295
+ let {children, isDisabled: individualDisabled = false, UNSAFE_style, UNSAFE_className, styles, ...otherProps} = props;
296
+
297
+ let {
298
+ orientation = 'vertical',
299
+ isDisabled: groupDisabled = false
300
+ } = useContext(SelectBoxContext);
301
+
302
+ const isDisabled = individualDisabled || groupDisabled;
303
+ const ref = useRef<HTMLDivElement>(null);
304
+
305
+ return (
306
+ <ListBoxItem
307
+ isDisabled={isDisabled}
308
+ ref={ref}
309
+ className={renderProps => (UNSAFE_className || '') + selectBoxStyles({
310
+ ...renderProps,
311
+ orientation
312
+ }, styles)}
313
+ style={pressScale(ref, UNSAFE_style)}
314
+ {...otherProps}>
315
+ {({isSelected, isDisabled, isHovered}) => {
316
+ return (
317
+ <>
318
+ <div
319
+ className={style({
320
+ position: 'absolute',
321
+ top: 8,
322
+ insetStart: 8,
323
+ pointerEvents: 'none'
324
+ })}
325
+ aria-hidden="true">
326
+ {!isDisabled && (
327
+ <div
328
+ className={box({
329
+ isSelected,
330
+ isDisabled,
331
+ size: 'M'
332
+ } as any)}>
333
+ <Checkmark
334
+ size="S"
335
+ className={iconStyles} />
336
+ </div>
337
+ )}
338
+ </div>
339
+ <Provider
340
+ values={[
341
+ [IllustrationContext, {
342
+ size: 'S',
343
+ styles: illustrationContainer({size: 'S', orientation, isDisabled, isHovered})
344
+ }],
345
+ [TextContext, {
346
+ slots: {
347
+ [DEFAULT_SLOT]: {
348
+ styles: labelText({orientation, isDisabled, isHovered})
349
+ },
350
+ label: {
351
+ styles: labelText({orientation, isDisabled, isHovered})
352
+ },
353
+ description: {
354
+ styles: descriptionText({orientation, isDisabled, isHovered})
355
+ }
356
+ }
357
+ }]
358
+ ]}>
359
+ {children}
360
+ </Provider>
361
+ </>
362
+ );
363
+ }}
364
+ </ListBoxItem>
365
+ );
366
+ }
367
+
368
+ /*
369
+ * SelectBoxGroup allows users to select one or more options from a list.
370
+ */
371
+ export const SelectBoxGroup = /*#__PURE__*/ forwardRef(function SelectBoxGroup<T extends object>(props: SelectBoxGroupProps<T>, ref: DOMRef<HTMLDivElement>) {
372
+ [props, ref] = useSpectrumContextProps(props, ref, SelectBoxGroupContext);
373
+
374
+ let {
375
+ children,
376
+ selectionMode = 'single',
377
+ orientation = 'vertical',
378
+ isDisabled = false,
379
+ UNSAFE_className,
380
+ UNSAFE_style,
381
+ styles,
382
+ ...otherProps
383
+ } = props;
384
+
385
+ const selectBoxContextValue = useMemo(
386
+ () => {
387
+ const contextValue = {
388
+ orientation,
389
+ isDisabled
390
+ };
391
+ return contextValue;
392
+ },
393
+ [orientation, isDisabled]
394
+ );
395
+
396
+ return (
397
+ <ListBox
398
+ selectionMode={selectionMode}
399
+ layout="grid"
400
+ className={(UNSAFE_className || '') + gridStyles({orientation}, styles)}
401
+ style={UNSAFE_style}
402
+ {...otherProps}>
403
+ <SelectBoxContext.Provider value={selectBoxContextValue}>
404
+ {children}
405
+ </SelectBoxContext.Provider>
406
+ </ListBox>
407
+ );
408
+ });
@@ -10,7 +10,7 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- import {createLeafComponent} from '@react-aria/collections';
13
+ import {CollectionNode, createLeafComponent} from '@react-aria/collections';
14
14
  import {ReactNode} from 'react';
15
15
  import {Skeleton} from './Skeleton';
16
16
 
@@ -20,10 +20,14 @@ export interface SkeletonCollectionProps {
20
20
 
21
21
  let cache = new WeakMap();
22
22
 
23
+ class SkeletonNode extends CollectionNode<unknown> {
24
+ static readonly type = 'skeleton';
25
+ }
26
+
23
27
  /**
24
28
  * A SkeletonCollection generates placeholder content within a collection component such as CardView.
25
29
  */
26
- export const SkeletonCollection = createLeafComponent('skeleton', (props: SkeletonCollectionProps, ref, node) => {
30
+ export const SkeletonCollection = createLeafComponent(SkeletonNode, (props: SkeletonCollectionProps, ref, node) => {
27
31
  // Cache rendering based on node object identity. This allows the children function to randomize
28
32
  // its content (e.g. heights) and preserve on re-renders.
29
33
  // TODO: do we need a `dependencies` prop here?
package/src/Tabs.tsx CHANGED
@@ -82,10 +82,23 @@ const InternalTabsContext = createContext<Partial<TabsProps> & {
82
82
  prevRef?: RefObject<DOMRect | null>,
83
83
  selectedKey?: Key | null
84
84
  }>({});
85
- const CollapseContext = createContext({
85
+
86
+ interface CollapseContextType {
87
+ showTabs: boolean,
88
+ menuId: string,
89
+ valueId: string,
90
+ ariaLabel?: string | undefined,
91
+ ariaDescribedBy?: string | undefined,
92
+ tabs: Array<Node<any>>,
93
+ listRef?: RefObject<HTMLDivElement | null>,
94
+ onSelectionChange?: (key: Key) => void
95
+ }
96
+
97
+ const CollapseContext = createContext<CollapseContextType>({
86
98
  showTabs: true,
87
99
  menuId: '',
88
- valueId: ''
100
+ valueId: '',
101
+ tabs: []
89
102
  });
90
103
 
91
104
  const tabs = style({
@@ -198,35 +211,57 @@ const tablist = style({
198
211
  minWidth: 'min'
199
212
  });
200
213
 
214
+ const tablistWrapper = style({
215
+ position: 'relative',
216
+ minWidth: 0,
217
+ flexShrink: 0,
218
+ flexGrow: 0
219
+ }, getAllowedOverrides());
220
+
201
221
  export function TabList<T extends object>(props: TabListProps<T>): ReactNode | null {
202
- let {showTabs} = useContext(CollapseContext) ?? {};
222
+ let {showTabs, menuId, valueId, tabs, listRef, onSelectionChange, ariaLabel, ariaDescribedBy} = useContext(CollapseContext) ?? {};
223
+ let {density, orientation, labelBehavior} = useContext(InternalTabsContext);
203
224
 
204
225
  if (showTabs) {
205
226
  return <TabListInner {...props} />;
206
227
  }
207
- return null;
228
+
229
+ return (
230
+ <div className={tablistWrapper(null, props.styles)}>
231
+ {listRef && <div className={tablist({orientation, labelBehavior, density})}>
232
+ <HiddenTabs items={tabs} density={density} listRef={listRef} />
233
+ </div>}
234
+ <TabsMenu
235
+ id={menuId}
236
+ valueId={valueId}
237
+ items={tabs}
238
+ onSelectionChange={onSelectionChange}
239
+ aria-label={ariaLabel}
240
+ aria-describedby={ariaDescribedBy} />
241
+ </div>
242
+ );
208
243
  }
209
244
 
210
245
  function TabListInner<T extends object>(props: TabListProps<T>) {
211
246
  let {
212
247
  tablistRef,
248
+ orientation,
213
249
  density,
214
250
  labelBehavior,
215
251
  'aria-label': ariaLabel,
216
252
  'aria-labelledby': ariaLabelledBy
217
253
  } = useContext(InternalTabsContext) ?? {};
254
+ let {tabs, listRef} = useContext(CollapseContext) ?? {};
218
255
 
219
256
  return (
220
257
  <div
221
258
  style={props.UNSAFE_style}
222
259
  className={
223
260
  (props.UNSAFE_className || '') +
224
- style({
225
- position: 'relative',
226
- flexGrow: 0,
227
- flexShrink: 0,
228
- minWidth: 'min'
229
- }, getAllowedOverrides())(null, props.styles)}>
261
+ tablistWrapper(null, props.styles)}>
262
+ {listRef && <div className={tablist({orientation, labelBehavior, density})}>
263
+ <HiddenTabs items={tabs} density={density} listRef={listRef} />
264
+ </div>}
230
265
  <RACTabList
231
266
  {...props}
232
267
  aria-label={ariaLabel}
@@ -519,7 +554,7 @@ let HiddenTabs = function (props: {
519
554
  size?: string,
520
555
  density?: 'compact' | 'regular'
521
556
  }) {
522
- let {listRef, items, size, density} = props;
557
+ let {listRef, items = [], size, density} = props;
523
558
 
524
559
  return (
525
560
  <div
@@ -612,7 +647,7 @@ let TabsMenu = (props: {valueId: string, items: Array<Node<any>>, onSelectionCha
612
647
  };
613
648
 
614
649
  let CollapsingTabs = ({collection, containerRef, ...props}: {collection: Collection<Node<unknown>>, containerRef: any} & TabsProps) => {
615
- let {density = 'regular', orientation = 'horizontal', labelBehavior = 'show', onSelectionChange} = props;
650
+ let {orientation = 'horizontal', onSelectionChange} = props;
616
651
  let [showItems, _setShowItems] = useState(true);
617
652
  showItems = orientation === 'vertical' ? true : showItems;
618
653
  let setShowItems = useCallback((value: boolean) => {
@@ -683,14 +718,7 @@ let CollapsingTabs = ({collection, containerRef, ...props}: {collection: Collect
683
718
  } else {
684
719
  contents = (
685
720
  <>
686
- <TabsMenu
687
- id={menuId}
688
- valueId={valueId}
689
- items={children}
690
- onSelectionChange={onSelectionChange}
691
- aria-label={props['aria-label']}
692
- aria-describedby={props['aria-labelledby']} />
693
- <CollapseContext.Provider value={{showTabs: false, menuId, valueId}}>
721
+ <CollapseContext.Provider value={{showTabs: false, tabs: children, menuId, valueId, listRef: listRef, onSelectionChange, ariaLabel: props['aria-label'], ariaDescribedBy: props['aria-labelledby']}}>
694
722
  {props.children}
695
723
  </CollapseContext.Provider>
696
724
  </>
@@ -699,10 +727,7 @@ let CollapsingTabs = ({collection, containerRef, ...props}: {collection: Collect
699
727
 
700
728
  return (
701
729
  <div style={props.UNSAFE_style} className={(props.UNSAFE_className || '') + tabs({orientation}, props.styles)} ref={containerRef}>
702
- <div className={tablist({orientation, labelBehavior, density})}>
703
- <HiddenTabs items={children} density={density} listRef={listRef} />
704
- </div>
705
- <CollapseContext.Provider value={{showTabs: true, menuId, valueId}}>
730
+ <CollapseContext.Provider value={{showTabs: true, menuId, valueId, tabs: children, listRef: listRef}}>
706
731
  {contents}
707
732
  </CollapseContext.Provider>
708
733
  </div>
package/src/index.ts CHANGED
@@ -72,6 +72,7 @@ export {RangeCalendar, RangeCalendarContext} from './RangeCalendar';
72
72
  export {RangeSlider, RangeSliderContext} from './RangeSlider';
73
73
  export {SearchField, SearchFieldContext} from './SearchField';
74
74
  export {SegmentedControl, SegmentedControlItem, SegmentedControlContext} from './SegmentedControl';
75
+ export {SelectBox, SelectBoxGroup, SelectBoxGroupContext} from './SelectBoxGroup';
75
76
  export {Slider, SliderContext} from './Slider';
76
77
  export {Skeleton, useIsSkeleton} from './Skeleton';
77
78
  export {SkeletonCollection} from './SkeletonCollection';
@@ -148,6 +149,7 @@ export type {RadioProps} from './Radio';
148
149
  export type {RadioGroupProps} from './RadioGroup';
149
150
  export type {SearchFieldProps} from './SearchField';
150
151
  export type {SegmentedControlProps, SegmentedControlItemProps} from './SegmentedControl';
152
+ export type {SelectBoxProps, SelectBoxGroupProps} from './SelectBoxGroup';
151
153
  export type {SliderProps} from './Slider';
152
154
  export type {RangeCalendarProps} from './RangeCalendar';
153
155
  export type {RangeSliderProps} from './RangeSlider';
@@ -1,22 +1,22 @@
1
- var $364a8b5208b4a0ee$exports = require("./spectrum-theme.cjs");
1
+ var $709ed173fa1293ee$exports = require("./spectrum-theme.cjs");
2
2
 
3
3
 
4
4
  function $parcel$export(e, n, v, s) {
5
5
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
6
6
  }
7
7
 
8
- $parcel$export(module.exports, "size", () => $149d3f79c0701456$export$346677f925de839c);
9
- $parcel$export(module.exports, "space", () => $149d3f79c0701456$export$a941ed4b947d12f8);
10
- $parcel$export(module.exports, "fontRelative", () => $149d3f79c0701456$export$ba024f4caf693d15);
11
- $parcel$export(module.exports, "focusRing", () => $149d3f79c0701456$export$8e24544ddba725ee);
12
- $parcel$export(module.exports, "iconStyle", () => $149d3f79c0701456$export$dcc3981cc6efe940);
13
- $parcel$export(module.exports, "baseColor", () => $364a8b5208b4a0ee$exports.baseColor);
14
- $parcel$export(module.exports, "color", () => $364a8b5208b4a0ee$exports.color);
15
- $parcel$export(module.exports, "edgeToText", () => $364a8b5208b4a0ee$exports.edgeToText);
16
- $parcel$export(module.exports, "lightDark", () => $364a8b5208b4a0ee$exports.lightDark);
17
- $parcel$export(module.exports, "linearGradient", () => $364a8b5208b4a0ee$exports.linearGradient);
18
- $parcel$export(module.exports, "colorMix", () => $364a8b5208b4a0ee$exports.colorMix);
19
- $parcel$export(module.exports, "style", () => $364a8b5208b4a0ee$exports.style);
8
+ $parcel$export(module.exports, "size", () => $e9b3cd6ccd792adf$export$346677f925de839c);
9
+ $parcel$export(module.exports, "space", () => $e9b3cd6ccd792adf$export$a941ed4b947d12f8);
10
+ $parcel$export(module.exports, "fontRelative", () => $e9b3cd6ccd792adf$export$ba024f4caf693d15);
11
+ $parcel$export(module.exports, "focusRing", () => $e9b3cd6ccd792adf$export$8e24544ddba725ee);
12
+ $parcel$export(module.exports, "iconStyle", () => $e9b3cd6ccd792adf$export$dcc3981cc6efe940);
13
+ $parcel$export(module.exports, "baseColor", () => $709ed173fa1293ee$exports.baseColor);
14
+ $parcel$export(module.exports, "color", () => $709ed173fa1293ee$exports.color);
15
+ $parcel$export(module.exports, "edgeToText", () => $709ed173fa1293ee$exports.edgeToText);
16
+ $parcel$export(module.exports, "lightDark", () => $709ed173fa1293ee$exports.lightDark);
17
+ $parcel$export(module.exports, "linearGradient", () => $709ed173fa1293ee$exports.linearGradient);
18
+ $parcel$export(module.exports, "colorMix", () => $709ed173fa1293ee$exports.colorMix);
19
+ $parcel$export(module.exports, "style", () => $709ed173fa1293ee$exports.style);
20
20
  /*
21
21
  * Copyright 2024 Adobe. All rights reserved.
22
22
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
@@ -28,16 +28,16 @@ $parcel$export(module.exports, "style", () => $364a8b5208b4a0ee$exports.style);
28
28
  * OF ANY KIND, either express or implied. See the License for the specific language
29
29
  * governing permissions and limitations under the License.
30
30
  */
31
- function $149d3f79c0701456$export$346677f925de839c(px) {
32
- return `[${(0, $364a8b5208b4a0ee$exports.size)(px)}]`;
31
+ function $e9b3cd6ccd792adf$export$346677f925de839c(px) {
32
+ return `[${(0, $709ed173fa1293ee$exports.size)(px)}]`;
33
33
  }
34
- function $149d3f79c0701456$export$a941ed4b947d12f8(px) {
35
- return `[${(0, $364a8b5208b4a0ee$exports.space)(px)}]`;
34
+ function $e9b3cd6ccd792adf$export$a941ed4b947d12f8(px) {
35
+ return `[${(0, $709ed173fa1293ee$exports.space)(px)}]`;
36
36
  }
37
- function $149d3f79c0701456$export$ba024f4caf693d15(base, baseFontSize) {
38
- return `[${(0, $364a8b5208b4a0ee$exports.fontRelative)(base, baseFontSize)}]`;
37
+ function $e9b3cd6ccd792adf$export$ba024f4caf693d15(base, baseFontSize) {
38
+ return `[${(0, $709ed173fa1293ee$exports.fontRelative)(base, baseFontSize)}]`;
39
39
  }
40
- const $149d3f79c0701456$export$8e24544ddba725ee = ()=>({
40
+ const $e9b3cd6ccd792adf$export$8e24544ddba725ee = ()=>({
41
41
  outlineStyle: {
42
42
  default: 'none',
43
43
  isFocusVisible: 'solid'
@@ -46,22 +46,22 @@ const $149d3f79c0701456$export$8e24544ddba725ee = ()=>({
46
46
  outlineWidth: 2,
47
47
  outlineOffset: 2
48
48
  });
49
- const $149d3f79c0701456$var$iconSizes = {
49
+ const $e9b3cd6ccd792adf$var$iconSizes = {
50
50
  XS: 14,
51
51
  S: 16,
52
52
  M: 20,
53
53
  L: 22,
54
54
  XL: 26
55
55
  };
56
- function $149d3f79c0701456$export$dcc3981cc6efe940(options) {
56
+ function $e9b3cd6ccd792adf$export$dcc3981cc6efe940(options) {
57
57
  let { size: size = 'M', color: color, ...styles } = options;
58
58
  if (color) styles['--iconPrimary'] = {
59
59
  type: 'fill',
60
60
  value: color
61
61
  };
62
- styles['size'] = $149d3f79c0701456$var$iconSizes[size];
62
+ styles['size'] = $e9b3cd6ccd792adf$var$iconSizes[size];
63
63
  // @ts-ignore
64
- return (0, $364a8b5208b4a0ee$exports.style).call(this, styles);
64
+ return (0, $709ed173fa1293ee$exports.style).call(this, styles);
65
65
  }
66
66
 
67
67