@primer/styled-react 0.0.0-20251007203417 → 0.0.0-20251007203926

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 (53) hide show
  1. package/dist/{components/PageHeader.js → Tooltip-DIHgr01r.js} +49 -4
  2. package/dist/components.json +0 -1
  3. package/dist/deprecated.js +179 -5
  4. package/dist/experimental.js +55 -5
  5. package/dist/index.d.ts +1 -2
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +666 -37
  8. package/package.json +3 -3
  9. package/dist/components/ActionList.js +0 -104
  10. package/dist/components/ActionMenu.js +0 -17
  11. package/dist/components/Autocomplete.js +0 -17
  12. package/dist/components/Avatar.js +0 -13
  13. package/dist/components/BaseStyles.d.ts +0 -17
  14. package/dist/components/BaseStyles.d.ts.map +0 -1
  15. package/dist/components/BaseStyles.js +0 -51
  16. package/dist/components/Breadcrumbs.js +0 -37
  17. package/dist/components/Checkbox.js +0 -13
  18. package/dist/components/CheckboxGroup.js +0 -38
  19. package/dist/components/CircleBadge.js +0 -11
  20. package/dist/components/CounterLabel.js +0 -13
  21. package/dist/components/DataTable.js +0 -32
  22. package/dist/components/Dialog.js +0 -42
  23. package/dist/components/Flash.js +0 -11
  24. package/dist/components/Header.js +0 -51
  25. package/dist/components/Heading.js +0 -11
  26. package/dist/components/Label.js +0 -25
  27. package/dist/components/Link.js +0 -25
  28. package/dist/components/LinkButton.js +0 -11
  29. package/dist/components/NavList.js +0 -56
  30. package/dist/components/Overlay.js +0 -11
  31. package/dist/components/PageLayout.js +0 -39
  32. package/dist/components/RadioGroup.js +0 -38
  33. package/dist/components/RelativeTime.js +0 -13
  34. package/dist/components/SegmentedControl.js +0 -27
  35. package/dist/components/Spinner.js +0 -12
  36. package/dist/components/StateLabel.js +0 -13
  37. package/dist/components/SubNav.js +0 -23
  38. package/dist/components/Text.js +0 -26
  39. package/dist/components/ThemeProvider.d.ts +0 -30
  40. package/dist/components/ThemeProvider.d.ts.map +0 -1
  41. package/dist/components/ThemeProvider.js +0 -196
  42. package/dist/components/Timeline.js +0 -46
  43. package/dist/components/ToggleSwitch.js +0 -13
  44. package/dist/components/Token.js +0 -36
  45. package/dist/components/Tooltip.js +0 -13
  46. package/dist/components/Truncate.js +0 -11
  47. package/dist/components/UnderlineNav.js +0 -43
  48. package/dist/components/UnderlinePanels.js +0 -27
  49. package/dist/components/deprecated/ActionList.js +0 -48
  50. package/dist/components/deprecated/DialogV1.js +0 -44
  51. package/dist/components/deprecated/Octicon.js +0 -39
  52. package/dist/components/deprecated/TabNav.js +0 -44
  53. package/dist/components/deprecated/Tooltip.js +0 -31
package/dist/index.js CHANGED
@@ -1,37 +1,666 @@
1
- "use client";
2
- export { Box, Button, Details, FormControl, IconButton, ProgressBar, Select, TextInput, Textarea, merge, sx, theme, themeGet, useColorSchemeVar, useTheme } from '@primer/react';
3
- export { ThemeProvider } from './components/ThemeProvider.js';
4
- export { BaseStyles } from './components/BaseStyles.js';
5
- export { ActionList } from './components/ActionList.js';
6
- export { ActionMenu } from './components/ActionMenu.js';
7
- export { Autocomplete } from './components/Autocomplete.js';
8
- export { Avatar } from './components/Avatar.js';
9
- export { Breadcrumb, Breadcrumbs } from './components/Breadcrumbs.js';
10
- export { Checkbox } from './components/Checkbox.js';
11
- export { CheckboxGroup } from './components/CheckboxGroup.js';
12
- export { CircleBadge } from './components/CircleBadge.js';
13
- export { CounterLabel } from './components/CounterLabel.js';
14
- export { Dialog } from './components/Dialog.js';
15
- export { Flash } from './components/Flash.js';
16
- export { Header } from './components/Header.js';
17
- export { Heading } from './components/Heading.js';
18
- export { Label } from './components/Label.js';
19
- export { Link } from './components/Link.js';
20
- export { LinkButton } from './components/LinkButton.js';
21
- export { NavList } from './components/NavList.js';
22
- export { Overlay } from './components/Overlay.js';
23
- export { PageLayout } from './components/PageLayout.js';
24
- export { PageHeader } from './components/PageHeader.js';
25
- export { RadioGroup } from './components/RadioGroup.js';
26
- export { RelativeTime } from './components/RelativeTime.js';
27
- export { SegmentedControl } from './components/SegmentedControl.js';
28
- export { Spinner } from './components/Spinner.js';
29
- export { StateLabel } from './components/StateLabel.js';
30
- export { SubNav } from './components/SubNav.js';
31
- export { Text } from './components/Text.js';
32
- export { Timeline } from './components/Timeline.js';
33
- export { ToggleSwitch } from './components/ToggleSwitch.js';
34
- export { Tooltip } from './components/Tooltip.js';
35
- export { Token } from './components/Token.js';
36
- export { Truncate } from './components/Truncate.js';
37
- export { UnderlineNav } from './components/UnderlineNav.js';
1
+ import { ActionList as ActionList$1, sx, ActionMenu as ActionMenu$1, Autocomplete as Autocomplete$1, Box, Avatar as Avatar$1, Breadcrumbs as Breadcrumbs$1, Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, CircleBadge as CircleBadge$1, CounterLabel as CounterLabel$1, Flash as Flash$1, Header as Header$1, Heading as Heading$1, Label as Label$1, Link as Link$1, LinkButton as LinkButton$1, NavList as NavList$1, Overlay as Overlay$1, PageLayout as PageLayout$1, RadioGroup as RadioGroup$1, RelativeTime as RelativeTime$1, SegmentedControl as SegmentedControl$1, Spinner as Spinner$1, StateLabel as StateLabel$1, SubNav as SubNav$1, Text as Text$1, Timeline as Timeline$1, ToggleSwitch as ToggleSwitch$1, useTheme, theme, Token as Token$1, Truncate as Truncate$1, UnderlineNav as UnderlineNav$1 } from '@primer/react';
2
+ export { Box, Button, Details, FormControl, IconButton, ProgressBar, Select, TextInput, Textarea, ThemeProvider, merge, sx, theme, themeGet, useColorSchemeVar, useTheme } from '@primer/react';
3
+ import React, { forwardRef } from 'react';
4
+ import styled from 'styled-components';
5
+ import { jsx } from 'react/jsx-runtime';
6
+ export { D as Dialog, P as PageHeader, T as Tooltip } from './Tooltip-DIHgr01r.js';
7
+ import css from '@styled-system/css';
8
+
9
+ const StyledActionList = styled(ActionList$1).withConfig({
10
+ shouldForwardProp: prop => prop !== 'sx'
11
+ }).withConfig({
12
+ displayName: "ActionList__StyledActionList",
13
+ componentId: "sc-hw2362-0"
14
+ })(["", ""], sx);
15
+ const ActionListImpl = /*#__PURE__*/React.forwardRef(function ActionListImpl({
16
+ as,
17
+ ...rest
18
+ }, ref) {
19
+ return /*#__PURE__*/jsx(StyledActionList, {
20
+ ref: ref,
21
+ ...rest,
22
+ ...(as ? {
23
+ forwardedAs: as
24
+ } : {})
25
+ });
26
+ });
27
+ const ActionListLinkItem = styled(ActionList$1.LinkItem).withConfig({
28
+ shouldForwardProp: prop => prop !== 'sx'
29
+ }).withConfig({
30
+ displayName: "ActionList__ActionListLinkItem",
31
+ componentId: "sc-hw2362-1"
32
+ })(["", ""], sx);
33
+ const StyledActionListTrailingAction = styled(ActionList$1.TrailingAction).withConfig({
34
+ shouldForwardProp: prop => prop !== 'sx'
35
+ }).withConfig({
36
+ displayName: "ActionList__StyledActionListTrailingAction",
37
+ componentId: "sc-hw2362-2"
38
+ })(["", ""], sx);
39
+ const ActionListTrailingAction = /*#__PURE__*/React.forwardRef((props, ref) => {
40
+ const {
41
+ as,
42
+ ...rest
43
+ } = props;
44
+ return /*#__PURE__*/jsx(StyledActionListTrailingAction, {
45
+ ...rest,
46
+ ...(as ? {
47
+ forwardedAs: as
48
+ } : {}),
49
+ ref: ref
50
+ });
51
+ });
52
+ const StyledActionListItem = styled(ActionList$1.Item).withConfig({
53
+ shouldForwardProp: prop => prop !== 'sx'
54
+ }).withConfig({
55
+ displayName: "ActionList__StyledActionListItem",
56
+ componentId: "sc-hw2362-3"
57
+ })(["", ""], sx);
58
+ const ActionListItem = /*#__PURE__*/React.forwardRef(({
59
+ children,
60
+ as,
61
+ ...props
62
+ }, ref) => /*#__PURE__*/jsx(StyledActionListItem, {
63
+ ref: ref,
64
+ ...props,
65
+ ...(as ? {
66
+ forwardedAs: as
67
+ } : {}),
68
+ children: children
69
+ }));
70
+ const ActionListGroup = styled(ActionList$1.Group).withConfig({
71
+ shouldForwardProp: prop => prop !== 'sx'
72
+ }).withConfig({
73
+ displayName: "ActionList__ActionListGroup",
74
+ componentId: "sc-hw2362-4"
75
+ })(["", ""], sx);
76
+ const ActionListDivider = styled(ActionList$1.Divider).withConfig({
77
+ shouldForwardProp: prop => prop !== 'sx'
78
+ }).withConfig({
79
+ displayName: "ActionList__ActionListDivider",
80
+ componentId: "sc-hw2362-5"
81
+ })(["", ""], sx);
82
+ const ActionListLeadingVisual = styled(ActionList$1.LeadingVisual).withConfig({
83
+ shouldForwardProp: prop => prop !== 'sx'
84
+ }).withConfig({
85
+ displayName: "ActionList__ActionListLeadingVisual",
86
+ componentId: "sc-hw2362-6"
87
+ })(["", ""], sx);
88
+ const ActionListTrailingVisual = styled(ActionList$1.TrailingVisual).withConfig({
89
+ shouldForwardProp: prop => prop !== 'sx'
90
+ }).withConfig({
91
+ displayName: "ActionList__ActionListTrailingVisual",
92
+ componentId: "sc-hw2362-7"
93
+ })(["", ""], sx);
94
+ const ActionList = Object.assign(ActionListImpl, {
95
+ Item: ActionListItem,
96
+ LinkItem: ActionListLinkItem,
97
+ Group: ActionListGroup,
98
+ GroupHeading: ActionList$1.GroupHeading,
99
+ Divider: ActionListDivider,
100
+ Description: ActionList$1.Description,
101
+ LeadingVisual: ActionListLeadingVisual,
102
+ TrailingVisual: ActionListTrailingVisual,
103
+ Heading: ActionList$1.Heading,
104
+ TrailingAction: ActionListTrailingAction
105
+ });
106
+
107
+ const ActionMenuOverlay = styled(ActionMenu$1.Overlay).withConfig({
108
+ shouldForwardProp: prop => prop !== 'sx'
109
+ }).withConfig({
110
+ displayName: "ActionMenu__ActionMenuOverlay",
111
+ componentId: "sc-w5s60e-0"
112
+ })(["", ""], sx);
113
+ const ActionMenu = Object.assign(ActionMenu$1, {
114
+ Button: ActionMenu$1.Button,
115
+ Anchor: ActionMenu$1.Anchor,
116
+ Overlay: ActionMenuOverlay,
117
+ Divider: ActionMenu$1.Divider
118
+ });
119
+
120
+ const AutocompleteOverlay = styled(Autocomplete$1.Overlay).withConfig({
121
+ shouldForwardProp: prop => prop !== 'sx'
122
+ }).withConfig({
123
+ displayName: "Autocomplete__AutocompleteOverlay",
124
+ componentId: "sc-j8ax2e-0"
125
+ })(["", ""], sx);
126
+ const Autocomplete = Object.assign(Autocomplete$1, {
127
+ Context: Autocomplete$1.Context,
128
+ Input: Autocomplete$1.Input,
129
+ Menu: Autocomplete$1.Menu,
130
+ Overlay: AutocompleteOverlay
131
+ });
132
+
133
+ const Avatar = /*#__PURE__*/forwardRef(function Avatar(props, ref) {
134
+ return /*#__PURE__*/jsx(Box, {
135
+ as: Avatar$1,
136
+ ref: ref,
137
+ ...props
138
+ });
139
+ });
140
+
141
+ const BreadcrumbsImpl = styled(Breadcrumbs$1).withConfig({
142
+ shouldForwardProp: prop => prop !== 'sx'
143
+ }).withConfig({
144
+ displayName: "Breadcrumbs__BreadcrumbsImpl",
145
+ componentId: "sc-1qj8pw-0"
146
+ })(["", ""], sx);
147
+ const StyledBreadcrumbsItem = styled(Breadcrumbs$1.Item).withConfig({
148
+ shouldForwardProp: prop => prop !== 'sx'
149
+ }).withConfig({
150
+ displayName: "Breadcrumbs__StyledBreadcrumbsItem",
151
+ componentId: "sc-1qj8pw-1"
152
+ })(["", ""], sx);
153
+ function BreadcrumbsItem({
154
+ as,
155
+ ...props
156
+ }) {
157
+ return /*#__PURE__*/jsx(StyledBreadcrumbsItem, {
158
+ ...props,
159
+ ...(as ? {
160
+ forwardedAs: as
161
+ } : {})
162
+ });
163
+ }
164
+ const Breadcrumbs = Object.assign(BreadcrumbsImpl, {
165
+ Item: BreadcrumbsItem
166
+ });
167
+
168
+ /**
169
+ * @deprecated Use the `Breadcrumbs` component instead (i.e. `<Breadcrumb>` → `<Breadcrumbs>`)
170
+ */
171
+ const Breadcrumb = Breadcrumbs;
172
+
173
+ const Checkbox = /*#__PURE__*/forwardRef(function Checkbox(props, ref) {
174
+ return /*#__PURE__*/jsx(Box, {
175
+ as: Checkbox$1,
176
+ ref: ref,
177
+ ...props
178
+ });
179
+ });
180
+
181
+ const CheckboxGroupImpl = props => {
182
+ return /*#__PURE__*/jsx(Box, {
183
+ as: CheckboxGroup$1,
184
+ ...props
185
+ });
186
+ };
187
+
188
+ // Define local types based on the internal component props
189
+
190
+ const CheckboxOrRadioGroupLabel$1 = props => {
191
+ return /*#__PURE__*/jsx(Box, {
192
+ as: CheckboxGroup$1.Label,
193
+ ...props
194
+ });
195
+ };
196
+ const CheckboxOrRadioGroupCaption$1 = props => {
197
+ return /*#__PURE__*/jsx(Box, {
198
+ as: CheckboxGroup$1.Caption,
199
+ ...props
200
+ });
201
+ };
202
+ const CheckboxOrRadioGroupValidation$1 = props => {
203
+ return /*#__PURE__*/jsx(Box, {
204
+ as: CheckboxGroup$1.Validation,
205
+ ...props
206
+ });
207
+ };
208
+ const CheckboxGroup = Object.assign(CheckboxGroupImpl, {
209
+ Label: CheckboxOrRadioGroupLabel$1,
210
+ Caption: CheckboxOrRadioGroupCaption$1,
211
+ Validation: CheckboxOrRadioGroupValidation$1
212
+ });
213
+
214
+ const CircleBadge = styled(CircleBadge$1).withConfig({
215
+ shouldForwardProp: prop => prop !== 'sx'
216
+ }).withConfig({
217
+ displayName: "CircleBadge",
218
+ componentId: "sc-1u7lp3v-0"
219
+ })(["", ""], sx);
220
+
221
+ const CounterLabel = /*#__PURE__*/forwardRef(function CounterLabel(props, ref) {
222
+ return /*#__PURE__*/jsx(Box, {
223
+ as: CounterLabel$1,
224
+ ref: ref,
225
+ ...props
226
+ });
227
+ });
228
+
229
+ const Flash = styled(Flash$1).withConfig({
230
+ shouldForwardProp: prop => prop !== 'sx'
231
+ }).withConfig({
232
+ displayName: "Flash",
233
+ componentId: "sc-413izo-0"
234
+ })(["", ""], sx);
235
+
236
+ const StyledHeader = /*#__PURE__*/forwardRef(function Header(props, ref) {
237
+ return /*#__PURE__*/jsx(Box, {
238
+ as: Header$1,
239
+ ref: ref,
240
+ ...props
241
+ });
242
+ });
243
+ const HeaderImpl = /*#__PURE__*/forwardRef(({
244
+ as,
245
+ ...props
246
+ }, ref) => /*#__PURE__*/jsx(StyledHeader, {
247
+ ...props,
248
+ ...(as ? {
249
+ forwardedAs: as
250
+ } : {}),
251
+ ref: ref
252
+ }));
253
+ const HeaderItem = /*#__PURE__*/forwardRef(function HeaderItem(props, ref) {
254
+ return /*#__PURE__*/jsx(Box, {
255
+ as: Header$1.Item,
256
+ ref: ref,
257
+ ...props
258
+ });
259
+ });
260
+ const StyledHeaderLink = /*#__PURE__*/forwardRef(function HeaderLink(props, ref) {
261
+ return /*#__PURE__*/jsx(Box, {
262
+ as: Header$1.Link,
263
+ ref: ref,
264
+ ...props
265
+ });
266
+ });
267
+ const HeaderLink = /*#__PURE__*/forwardRef(({
268
+ as,
269
+ ...props
270
+ }, ref) => /*#__PURE__*/jsx(StyledHeaderLink, {
271
+ ...props,
272
+ ...(as ? {
273
+ forwardedAs: as
274
+ } : {}),
275
+ ref: ref
276
+ }));
277
+ const Header = Object.assign(HeaderImpl, {
278
+ Item: HeaderItem,
279
+ Link: HeaderLink
280
+ });
281
+
282
+ const Heading = styled(Heading$1).withConfig({
283
+ shouldForwardProp: prop => prop !== 'sx'
284
+ }).withConfig({
285
+ displayName: "Heading",
286
+ componentId: "sc-1vc165i-0"
287
+ })(["", ""], sx);
288
+
289
+ const StyledLabel = /*#__PURE__*/forwardRef(function Label(props, ref) {
290
+ return /*#__PURE__*/jsx(Box, {
291
+ as: Label$1,
292
+ ref: ref,
293
+ ...props
294
+ });
295
+ });
296
+ const Label = /*#__PURE__*/forwardRef(({
297
+ as,
298
+ ...props
299
+ }, ref) => {
300
+ return /*#__PURE__*/jsx(StyledLabel, {
301
+ ...props,
302
+ ...(as ? {
303
+ forwardedAs: as
304
+ } : {}),
305
+ ref: ref
306
+ });
307
+ });
308
+
309
+ const StyledLink = styled(Link$1).withConfig({
310
+ shouldForwardProp: prop => prop !== 'sx'
311
+ }).withConfig({
312
+ displayName: "Link__StyledLink",
313
+ componentId: "sc-1syctfj-0"
314
+ })(["", ""], sx);
315
+ const Link = /*#__PURE__*/forwardRef(({
316
+ as,
317
+ ...props
318
+ }, ref) => {
319
+ return /*#__PURE__*/jsx(StyledLink, {
320
+ ...props,
321
+ ...(as ? {
322
+ forwardedAs: as
323
+ } : {}),
324
+ ref: ref
325
+ });
326
+ });
327
+
328
+ const LinkButton = styled(LinkButton$1).withConfig({
329
+ shouldForwardProp: prop => prop !== 'sx'
330
+ }).withConfig({
331
+ displayName: "LinkButton",
332
+ componentId: "sc-1v6zkmg-0"
333
+ })(["", ""], sx);
334
+
335
+ const NavListImpl = /*#__PURE__*/forwardRef(function NavList(props, ref) {
336
+ return /*#__PURE__*/jsx(Box, {
337
+ as: NavList$1,
338
+ ref: ref,
339
+ ...props
340
+ });
341
+ });
342
+ const NavListItem = /*#__PURE__*/forwardRef(function NavListItem(props, ref) {
343
+ // @ts-expect-error - PrimerNavList.Item is not recognized as a valid component type
344
+ return /*#__PURE__*/jsx(Box, {
345
+ as: NavList$1.Item,
346
+ ref: ref,
347
+ ...props
348
+ });
349
+ });
350
+ const NavListGroup = /*#__PURE__*/forwardRef(function NavListGroup(props, ref) {
351
+ // @ts-expect-error - PrimerNavList.Group is not recognized as a valid component type
352
+ return /*#__PURE__*/jsx(Box, {
353
+ as: NavList$1.Group,
354
+ ref: ref,
355
+ ...props
356
+ });
357
+ });
358
+ const NavListGroupHeading = /*#__PURE__*/forwardRef(function NavListGroupHeading(props, ref) {
359
+ // @ts-expect-error - PrimerNavList.GroupHeading is not recognized as a valid component type
360
+ return /*#__PURE__*/jsx(Box, {
361
+ as: NavList$1.GroupHeading,
362
+ ref: ref,
363
+ ...props
364
+ });
365
+ });
366
+ const NavListLeadingVisual = /*#__PURE__*/forwardRef(function NavListLeadingVisual(props, ref) {
367
+ // @ts-expect-error - PrimerNavList.LeadingVisual is not recognized as a valid component type
368
+ return /*#__PURE__*/jsx(Box, {
369
+ as: NavList$1.LeadingVisual,
370
+ ref: ref,
371
+ ...props
372
+ });
373
+ });
374
+ const NavList = Object.assign(NavListImpl, {
375
+ Item: NavListItem,
376
+ Group: NavListGroup,
377
+ GroupHeading: NavListGroupHeading,
378
+ LeadingVisual: NavListLeadingVisual,
379
+ SubNav: NavList$1.SubNav,
380
+ Divider: NavList$1.Divider,
381
+ TrailingVisual: NavList$1.TrailingVisual,
382
+ TrailingAction: NavList$1.TrailingAction,
383
+ GroupExpand: NavList$1.GroupExpand
384
+ });
385
+
386
+ const Overlay = styled(Overlay$1).withConfig({
387
+ shouldForwardProp: prop => prop !== 'sx'
388
+ }).withConfig({
389
+ displayName: "Overlay",
390
+ componentId: "sc-tjbd74-0"
391
+ })(["", ""], sx);
392
+
393
+ const Wrapper = styled.div.withConfig({
394
+ displayName: "PageLayout__Wrapper",
395
+ componentId: "sc-pjybtc-0"
396
+ })(["", ""], sx);
397
+ const PageLayoutImpl = /*#__PURE__*/React.forwardRef((props, ref) => {
398
+ // @ts-expect-error - PrimerPageLayout is not recognized as a valid component type
399
+ return /*#__PURE__*/jsx(Wrapper, {
400
+ as: PageLayout$1,
401
+ ref: ref,
402
+ ...props
403
+ });
404
+ });
405
+ const PageLayoutContent = /*#__PURE__*/React.forwardRef((props, ref) => {
406
+ return /*#__PURE__*/jsx(Wrapper, {
407
+ as: PageLayout$1.Content,
408
+ ref: ref,
409
+ ...props
410
+ });
411
+ });
412
+ const PageLayoutPane = /*#__PURE__*/React.forwardRef((props, ref) => {
413
+ return /*#__PURE__*/jsx(Wrapper, {
414
+ as: PageLayout$1.Pane,
415
+ ref: ref,
416
+ ...props
417
+ });
418
+ });
419
+ const PageLayout = Object.assign(PageLayoutImpl, {
420
+ Content: PageLayoutContent,
421
+ Header: PageLayout$1.Header,
422
+ Pane: PageLayoutPane,
423
+ Footer: PageLayout$1.Footer
424
+ });
425
+
426
+ const RadioGroupImpl = props => {
427
+ return /*#__PURE__*/jsx(Box, {
428
+ as: RadioGroup$1,
429
+ ...props
430
+ });
431
+ };
432
+
433
+ // Define local types based on the internal component props
434
+
435
+ const CheckboxOrRadioGroupLabel = props => {
436
+ return /*#__PURE__*/jsx(Box, {
437
+ as: RadioGroup$1.Label,
438
+ ...props
439
+ });
440
+ };
441
+ const CheckboxOrRadioGroupCaption = props => {
442
+ return /*#__PURE__*/jsx(Box, {
443
+ as: RadioGroup$1.Caption,
444
+ ...props
445
+ });
446
+ };
447
+ const CheckboxOrRadioGroupValidation = props => {
448
+ return /*#__PURE__*/jsx(Box, {
449
+ as: RadioGroup$1.Validation,
450
+ ...props
451
+ });
452
+ };
453
+ const RadioGroup = Object.assign(RadioGroupImpl, {
454
+ Label: CheckboxOrRadioGroupLabel,
455
+ Caption: CheckboxOrRadioGroupCaption,
456
+ Validation: CheckboxOrRadioGroupValidation
457
+ });
458
+
459
+ function RelativeTime(props) {
460
+ // @ts-expect-error the types for Box are not correctly inferred here
461
+ return /*#__PURE__*/jsx(Box, {
462
+ as: RelativeTime$1,
463
+ ...props
464
+ });
465
+ }
466
+
467
+ const SegmentedControlButton = props => {
468
+ return /*#__PURE__*/jsx(Box, {
469
+ as: SegmentedControl$1.Button,
470
+ ...props
471
+ });
472
+ };
473
+ const SegmentedControlIconButton = props => {
474
+ return /*#__PURE__*/jsx(Box, {
475
+ as: SegmentedControl$1.IconButton,
476
+ ...props
477
+ });
478
+ };
479
+ const SegmentedControlImpl = props => {
480
+ return /*#__PURE__*/jsx(Box, {
481
+ as: SegmentedControl$1,
482
+ ...props
483
+ });
484
+ };
485
+ const SegmentedControl = Object.assign(SegmentedControlImpl, {
486
+ Button: SegmentedControlButton,
487
+ IconButton: SegmentedControlIconButton
488
+ });
489
+
490
+ function Spinner(props) {
491
+ return /*#__PURE__*/jsx(Box, {
492
+ as: Spinner$1,
493
+ ...props
494
+ });
495
+ }
496
+
497
+ const StateLabel = /*#__PURE__*/forwardRef(function StateLabel(props, ref) {
498
+ return /*#__PURE__*/jsx(Box, {
499
+ as: StateLabel$1,
500
+ ref: ref,
501
+ ...props
502
+ });
503
+ });
504
+
505
+ const SubNavImpl = /*#__PURE__*/forwardRef(function SubNav(props, ref) {
506
+ return /*#__PURE__*/jsx(Box, {
507
+ as: SubNav$1,
508
+ ref: ref,
509
+ ...props
510
+ });
511
+ });
512
+ const SubNavLink = /*#__PURE__*/forwardRef(function SubNavLink(props, ref) {
513
+ return /*#__PURE__*/jsx(Box, {
514
+ as: SubNav$1.Link,
515
+ ref: ref,
516
+ ...props
517
+ });
518
+ });
519
+ const SubNav = Object.assign(SubNavImpl, {
520
+ Link: SubNavLink
521
+ });
522
+
523
+ const StyledText = styled(Text$1).withConfig({
524
+ shouldForwardProp: prop => prop !== 'sx'
525
+ }).withConfig({
526
+ displayName: "Text__StyledText",
527
+ componentId: "sc-1klmep6-0"
528
+ })(["", ""], sx);
529
+ const Text = /*#__PURE__*/forwardRef(({
530
+ as,
531
+ ...props
532
+ }, ref) => {
533
+ return /*#__PURE__*/jsx(StyledText, {
534
+ ...props,
535
+ ...(as ? {
536
+ forwardedAs: as
537
+ } : {}),
538
+ ref: ref
539
+ });
540
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
541
+ });
542
+
543
+ const TimelineImpl = /*#__PURE__*/forwardRef(function Timeline(props, ref) {
544
+ return /*#__PURE__*/jsx(Box, {
545
+ as: Timeline$1,
546
+ ref: ref,
547
+ ...props
548
+ });
549
+ });
550
+ const TimelineItem = /*#__PURE__*/forwardRef(function TimelineItem(props, ref) {
551
+ return /*#__PURE__*/jsx(Box, {
552
+ as: Timeline$1.Item,
553
+ ref: ref,
554
+ ...props
555
+ });
556
+ });
557
+ function TimelineBadge(props) {
558
+ return /*#__PURE__*/jsx(Box, {
559
+ as: Timeline$1.Badge,
560
+ ...props
561
+ });
562
+ }
563
+ const TimelineBody = /*#__PURE__*/forwardRef(function TimelineBody(props, ref) {
564
+ return /*#__PURE__*/jsx(Box, {
565
+ as: Timeline$1.Body,
566
+ ref: ref,
567
+ ...props
568
+ });
569
+ });
570
+ const TimelineBreak = /*#__PURE__*/forwardRef(function TimelineBreak(props, ref) {
571
+ return /*#__PURE__*/jsx(Box, {
572
+ as: Timeline$1.Break,
573
+ ref: ref,
574
+ ...props
575
+ });
576
+ });
577
+ const Timeline = Object.assign(TimelineImpl, {
578
+ Item: TimelineItem,
579
+ Badge: TimelineBadge,
580
+ Body: TimelineBody,
581
+ Break: TimelineBreak
582
+ });
583
+
584
+ const ToggleSwitch = /*#__PURE__*/forwardRef(function ToggleSwitch(props, ref) {
585
+ return /*#__PURE__*/jsx(Box, {
586
+ as: ToggleSwitch$1,
587
+ ref: ref,
588
+ ...props
589
+ });
590
+ });
591
+
592
+ const Token = /*#__PURE__*/React.forwardRef(({
593
+ sx: sxProp,
594
+ style,
595
+ ...rest
596
+ }, ref) => {
597
+ const contextTheme = useTheme();
598
+ const theme$1 = contextTheme.theme || theme;
599
+
600
+ // If no sx prop is provided, just return PrimerToken directly
601
+ if (!sxProp) {
602
+ return /*#__PURE__*/jsx(Token$1, {
603
+ ...rest,
604
+ style: style,
605
+ ref: ref
606
+ });
607
+ }
608
+
609
+ // Convert sx to CSS styles using the theme context
610
+ const sxStyles = css(sxProp)(theme$1);
611
+ const mergedStyle = {
612
+ ...sxStyles,
613
+ ...style
614
+ };
615
+ return /*#__PURE__*/jsx(Token$1, {
616
+ ...rest,
617
+ style: mergedStyle,
618
+ ref: ref
619
+ });
620
+ });
621
+
622
+ const Truncate = styled(Truncate$1).withConfig({
623
+ shouldForwardProp: prop => prop !== 'sx'
624
+ }).withConfig({
625
+ displayName: "Truncate",
626
+ componentId: "sc-x3i4it-0"
627
+ })(["", ""], sx);
628
+
629
+ const StyledUnderlineNav = /*#__PURE__*/forwardRef(function UnderlineNav(props, ref) {
630
+ return /*#__PURE__*/jsx(Box, {
631
+ as: UnderlineNav$1,
632
+ ref: ref,
633
+ ...props
634
+ });
635
+ });
636
+ const UnderlineNavImpl = /*#__PURE__*/forwardRef(({
637
+ as,
638
+ ...props
639
+ }, ref) => /*#__PURE__*/jsx(StyledUnderlineNav, {
640
+ ...props,
641
+ ...(as ? {
642
+ forwardedAs: as
643
+ } : {}),
644
+ ref: ref
645
+ }));
646
+ const StyledUnderlineNavItem = styled(UnderlineNav$1.Item).withConfig({
647
+ shouldForwardProp: prop => prop !== 'sx'
648
+ }).withConfig({
649
+ displayName: "UnderlineNav__StyledUnderlineNavItem",
650
+ componentId: "sc-dx6br2-0"
651
+ })(["", ""], sx);
652
+ const UnderlineNavItem = /*#__PURE__*/forwardRef(({
653
+ as,
654
+ ...props
655
+ }, ref) => /*#__PURE__*/jsx(StyledUnderlineNavItem, {
656
+ ...props,
657
+ ...(as ? {
658
+ forwardedAs: as
659
+ } : {}),
660
+ ref: ref
661
+ }));
662
+ const UnderlineNav = Object.assign(UnderlineNavImpl, {
663
+ Item: UnderlineNavItem
664
+ });
665
+
666
+ export { ActionList, ActionMenu, Autocomplete, Avatar, Breadcrumb, Breadcrumbs, Checkbox, CheckboxGroup, CircleBadge, CounterLabel, Flash, Header, Heading, Label, Link, LinkButton, NavList, Overlay, PageLayout, RadioGroup, RelativeTime, SegmentedControl, Spinner, StateLabel, SubNav, Text, Timeline, ToggleSwitch, Token, Truncate, UnderlineNav };