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

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