@primer/styled-react 1.0.0-rc.6 → 1.0.0-rc.8

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 (113) hide show
  1. package/dist/components/ActionList.d.ts +21 -13
  2. package/dist/components/ActionList.d.ts.map +1 -1
  3. package/dist/components/ActionList.js +162 -0
  4. package/dist/components/ActionMenu.d.ts +2 -2
  5. package/dist/components/ActionMenu.d.ts.map +1 -1
  6. package/dist/components/ActionMenu.js +18 -0
  7. package/dist/components/Autocomplete.d.ts +5 -3
  8. package/dist/components/Autocomplete.d.ts.map +1 -1
  9. package/dist/components/Autocomplete.js +24 -0
  10. package/dist/components/Avatar.js +13 -0
  11. package/dist/components/BaseStyles.d.ts +17 -0
  12. package/dist/components/BaseStyles.d.ts.map +1 -0
  13. package/dist/components/BaseStyles.js +51 -0
  14. package/dist/components/Breadcrumbs.js +37 -0
  15. package/dist/components/Button.d.ts +13 -0
  16. package/dist/components/Button.d.ts.map +1 -0
  17. package/dist/components/Button.js +111 -0
  18. package/dist/components/Checkbox.d.ts.map +1 -1
  19. package/dist/components/Checkbox.js +14 -0
  20. package/dist/components/CheckboxGroup.d.ts +16 -4
  21. package/dist/components/CheckboxGroup.d.ts.map +1 -1
  22. package/dist/components/CheckboxGroup.js +42 -0
  23. package/dist/components/CircleBadge.js +11 -0
  24. package/dist/components/CounterLabel.js +13 -0
  25. package/dist/components/DataTable.js +32 -0
  26. package/dist/components/Dialog.js +42 -0
  27. package/dist/components/FeatureFlaggedTheming.d.ts +6 -0
  28. package/dist/components/FeatureFlaggedTheming.d.ts.map +1 -0
  29. package/dist/components/FeatureFlaggedTheming.js +54 -0
  30. package/dist/components/Flash.js +11 -0
  31. package/dist/components/FormControl.d.ts +12 -0
  32. package/dist/components/FormControl.d.ts.map +1 -0
  33. package/dist/components/FormControl.js +18 -0
  34. package/dist/components/Header.js +51 -0
  35. package/dist/components/Heading.js +11 -0
  36. package/dist/components/IconButton.d.ts +9 -0
  37. package/dist/components/IconButton.d.ts.map +1 -0
  38. package/dist/components/IconButton.js +39 -0
  39. package/dist/components/Label.js +25 -0
  40. package/dist/components/Link.js +25 -0
  41. package/dist/components/LinkButton.js +11 -0
  42. package/dist/components/NavList.d.ts +27 -19
  43. package/dist/components/NavList.d.ts.map +1 -1
  44. package/dist/components/NavList.js +56 -0
  45. package/dist/components/Overlay.js +11 -0
  46. package/dist/components/PageHeader.d.ts.map +1 -1
  47. package/dist/{PageHeader-DCDIR2C1.js → components/PageHeader.js} +4 -41
  48. package/dist/components/PageLayout.d.ts +15 -10
  49. package/dist/components/PageLayout.d.ts.map +1 -1
  50. package/dist/components/PageLayout.js +42 -0
  51. package/dist/components/RadioGroup.d.ts +16 -4
  52. package/dist/components/RadioGroup.d.ts.map +1 -1
  53. package/dist/components/RadioGroup.js +42 -0
  54. package/dist/components/RelativeTime.js +13 -0
  55. package/dist/components/SegmentedControl.d.ts +9 -2
  56. package/dist/components/SegmentedControl.d.ts.map +1 -1
  57. package/dist/components/SegmentedControl.js +30 -0
  58. package/dist/components/Select.d.ts +8 -0
  59. package/dist/components/Select.d.ts.map +1 -0
  60. package/dist/components/Select.js +23 -0
  61. package/dist/components/Spinner.js +11 -0
  62. package/dist/components/StateLabel.js +13 -0
  63. package/dist/components/SubNav.d.ts +1 -0
  64. package/dist/components/SubNav.d.ts.map +1 -1
  65. package/dist/components/SubNav.js +25 -0
  66. package/dist/components/Text.d.ts +11 -3
  67. package/dist/components/Text.d.ts.map +1 -1
  68. package/dist/components/Text.js +25 -0
  69. package/dist/components/TextInput.d.ts +15 -0
  70. package/dist/components/TextInput.d.ts.map +1 -0
  71. package/dist/components/TextInput.js +37 -0
  72. package/dist/components/Textarea.d.ts +9 -0
  73. package/dist/components/Textarea.d.ts.map +1 -0
  74. package/dist/components/Textarea.js +25 -0
  75. package/dist/components/ThemeProvider.d.ts +30 -0
  76. package/dist/components/ThemeProvider.d.ts.map +1 -0
  77. package/dist/components/ThemeProvider.js +202 -0
  78. package/dist/components/Timeline.js +46 -0
  79. package/dist/components/ToggleSwitch.js +13 -0
  80. package/dist/components/Token.js +25 -0
  81. package/dist/components/Tooltip.d.ts +2 -6
  82. package/dist/components/Tooltip.d.ts.map +1 -1
  83. package/dist/components/Tooltip.js +14 -0
  84. package/dist/components/Truncate.js +11 -0
  85. package/dist/components/UnderlineNav.js +43 -0
  86. package/dist/components/UnderlinePanels.d.ts +7 -5
  87. package/dist/components/UnderlinePanels.d.ts.map +1 -1
  88. package/dist/components/UnderlinePanels.js +28 -0
  89. package/dist/components/deprecated/ActionList.js +48 -0
  90. package/dist/components/deprecated/DialogV1.js +44 -0
  91. package/dist/components/deprecated/Octicon.js +39 -0
  92. package/dist/components/deprecated/TabNav.js +44 -0
  93. package/dist/components/deprecated/Tooltip.d.ts.map +1 -1
  94. package/dist/components/deprecated/Tooltip.js +32 -0
  95. package/dist/components.json +27 -0
  96. package/dist/deprecated.d.ts +5 -4
  97. package/dist/deprecated.d.ts.map +1 -1
  98. package/dist/deprecated.js +5 -84
  99. package/dist/experimental.d.ts +1 -1
  100. package/dist/experimental.d.ts.map +1 -1
  101. package/dist/experimental.js +5 -32
  102. package/dist/index.d.ts +9 -12
  103. package/dist/index.d.ts.map +1 -1
  104. package/dist/index.js +42 -511
  105. package/dist/sx.d.ts +3 -0
  106. package/dist/sx.d.ts.map +1 -1
  107. package/package.json +3 -3
  108. package/dist/Tooltip-DIHgr01r.js +0 -152
  109. package/dist/Tooltip-YuSlJ5b_.js +0 -20
  110. package/dist/components/DialogV1.d.ts +0 -11
  111. package/dist/components/DialogV1.d.ts.map +0 -1
  112. package/dist/components/TabNav.d.ts +0 -9
  113. package/dist/components/TabNav.d.ts.map +0 -1
@@ -1,25 +1,33 @@
1
1
  import React from 'react';
2
- import { ActionList as PrimerActionList, type ActionListProps as PrimerActionListProps, type ActionListItemProps as PrimerActionListItemProps, type ActionListLinkItemProps as PrimerActionListLinkItemProps, type ActionListGroupProps as PrimerActionListGroupProps, type ActionListDividerProps as PrimerActionListDividerProps, type ActionListLeadingVisualProps as PrimerActionListLeadingVisualProps, type ActionListTrailingVisualProps as PrimerActionListTrailingVisualProps } from '@primer/react';
2
+ import { ActionList as PrimerActionList, type ActionListProps as PrimerActionListProps, type ActionListItemProps as PrimerActionListItemProps, type ActionListLinkItemProps as PrimerActionListLinkItemProps, type ActionListGroupProps as PrimerActionListGroupProps, type ActionListDividerProps as PrimerActionListDividerProps, type ActionListLeadingVisualProps as PrimerActionListLeadingVisualProps, type ActionListTrailingVisualProps as PrimerActionListTrailingVisualProps, type SlotMarker } from '@primer/react';
3
3
  import { type SxProp } from '../sx';
4
4
  import type { ForwardRefComponent } from '../polymorphic';
5
5
  type PrimerActionListTrailingActionProps = React.ComponentProps<typeof PrimerActionList.TrailingAction>;
6
6
  export type ActionListProps<As extends React.ElementType = 'ul'> = PrimerActionListProps<As> & SxProp;
7
7
  export type ActionListItemProps = React.PropsWithChildren<PrimerActionListItemProps & SxProp>;
8
- export type ActionListLinkItemProps = React.PropsWithChildren<PrimerActionListLinkItemProps & SxProp>;
9
- export type ActionListGroupProps = React.PropsWithChildren<PrimerActionListGroupProps & SxProp>;
8
+ export type ActionListLinkItemProps = React.PropsWithChildren<PrimerActionListLinkItemProps & SxProp> & {
9
+ as?: React.ElementType;
10
+ };
11
+ export type ActionListGroupProps = React.PropsWithChildren<PrimerActionListGroupProps & SxProp> & {
12
+ as?: React.ElementType;
13
+ };
10
14
  export type ActionListDividerProps = React.PropsWithChildren<PrimerActionListDividerProps & SxProp>;
11
- export type ActionListLeadingVisualProps = React.PropsWithChildren<PrimerActionListLeadingVisualProps & SxProp>;
12
- export type ActionListTrailingVisualProps = React.PropsWithChildren<PrimerActionListTrailingVisualProps & SxProp>;
15
+ export type ActionListLeadingVisualProps = React.PropsWithChildren<PrimerActionListLeadingVisualProps & SxProp> & {
16
+ as?: React.ElementType;
17
+ };
18
+ export type ActionListTrailingVisualProps = React.PropsWithChildren<PrimerActionListTrailingVisualProps & SxProp> & {
19
+ as?: React.ElementType;
20
+ };
13
21
  export type ActionListTrailingActionProps = React.PropsWithChildren<PrimerActionListTrailingActionProps & SxProp>;
14
22
  declare const ActionListImpl: React.ForwardRefExoticComponent<Omit<ActionListProps<React.ElementType<any, keyof React.JSX.IntrinsicElements>>, "ref"> & React.RefAttributes<unknown>>;
15
- declare const ActionListLinkItem: ForwardRefComponent<'a', ActionListLinkItemProps>;
23
+ declare const ActionListLinkItem: ForwardRefComponent<"a", ActionListLinkItemProps> & SlotMarker;
16
24
  type TrailingActionElements = 'button' | 'a';
17
- declare const ActionListTrailingAction: ForwardRefComponent<TrailingActionElements, ActionListTrailingActionProps>;
18
- declare const ActionListItem: ForwardRefComponent<"li", ActionListItemProps>;
19
- declare const ActionListGroup: React.ComponentType<ActionListGroupProps>;
20
- declare const ActionListDivider: React.ComponentType<ActionListDividerProps>;
21
- declare const ActionListLeadingVisual: React.ComponentType<ActionListLeadingVisualProps>;
22
- declare const ActionListTrailingVisual: React.ComponentType<ActionListTrailingVisualProps>;
25
+ declare const ActionListTrailingAction: ForwardRefComponent<TrailingActionElements, ActionListTrailingActionProps> & SlotMarker;
26
+ declare const ActionListItem: ForwardRefComponent<"li", ActionListItemProps> & SlotMarker;
27
+ declare const ActionListGroup: React.ComponentType<ActionListGroupProps> & SlotMarker;
28
+ declare const ActionListDivider: React.ComponentType<ActionListDividerProps> & SlotMarker;
29
+ declare const ActionListLeadingVisual: React.ComponentType<ActionListLeadingVisualProps> & SlotMarker;
30
+ declare const ActionListTrailingVisual: React.ComponentType<ActionListTrailingVisualProps> & SlotMarker;
23
31
  export declare const ActionList: typeof ActionListImpl & {
24
32
  Item: typeof ActionListItem;
25
33
  LinkItem: typeof ActionListLinkItem;
@@ -31,6 +39,6 @@ export declare const ActionList: typeof ActionListImpl & {
31
39
  TrailingVisual: typeof ActionListTrailingVisual;
32
40
  Heading: typeof PrimerActionList.Heading;
33
41
  TrailingAction: typeof ActionListTrailingAction;
34
- };
42
+ } & SlotMarker;
35
43
  export {};
36
44
  //# sourceMappingURL=ActionList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ActionList.d.ts","sourceRoot":"","sources":["../../src/components/ActionList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EACL,UAAU,IAAI,gBAAgB,EAC9B,KAAK,eAAe,IAAI,qBAAqB,EAC7C,KAAK,mBAAmB,IAAI,yBAAyB,EACrD,KAAK,uBAAuB,IAAI,6BAA6B,EAC7D,KAAK,oBAAoB,IAAI,0BAA0B,EACvD,KAAK,sBAAsB,IAAI,4BAA4B,EAC3D,KAAK,4BAA4B,IAAI,kCAAkC,EACvE,KAAK,6BAA6B,IAAI,mCAAmC,EAC1E,MAAM,eAAe,CAAA;AACtB,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AACrC,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AAEvD,KAAK,mCAAmC,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,cAAc,CAAC,CAAA;AAEvG,MAAM,MAAM,eAAe,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,IAAI,IAAI,qBAAqB,CAAC,EAAE,CAAC,GAAG,MAAM,CAAA;AACrG,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,iBAAiB,CAAC,yBAAyB,GAAG,MAAM,CAAC,CAAA;AAC7F,MAAM,MAAM,uBAAuB,GAAG,KAAK,CAAC,iBAAiB,CAAC,6BAA6B,GAAG,MAAM,CAAC,CAAA;AACrG,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,iBAAiB,CAAC,0BAA0B,GAAG,MAAM,CAAC,CAAA;AAC/F,MAAM,MAAM,sBAAsB,GAAG,KAAK,CAAC,iBAAiB,CAAC,4BAA4B,GAAG,MAAM,CAAC,CAAA;AACnG,MAAM,MAAM,4BAA4B,GAAG,KAAK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Aa,CAAC,6BAA6B,CAAC,GAAG,UAQpF,CAAA;AAGD,eAAO,MAAM,UAAU,EAAE,OAAO,cAAc,GAAG;IAC/C,IAAI,EAAE,OAAO,cAAc,CAAA;IAC3B,QAAQ,EAAE,OAAO,kBAAkB,CAAA;IACnC,KAAK,EAAE,OAAO,eAAe,CAAA;IAC7B,YAAY,EAAE,OAAO,gBAAgB,CAAC,YAAY,CAAA;IAClD,OAAO,EAAE,OAAO,iBAAiB,CAAA;IACjC,WAAW,EAAE,OAAO,gBAAgB,CAAC,WAAW,CAAA;IAChD,aAAa,EAAE,OAAO,uBAAuB,CAAA;IAC7C,cAAc,EAAE,OAAO,wBAAwB,CAAA;IAC/C,OAAO,EAAE,OAAO,gBAAgB,CAAC,OAAO,CAAA;IACxC,cAAc,EAAE,OAAO,wBAAwB,CAAA;CAChD,GAAG,UAWF,CAAA"}
@@ -0,0 +1,162 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+ import { ActionList as ActionList$1, sx } from '@primer/react';
4
+ import { jsx } from 'react/jsx-runtime';
5
+
6
+ const StyledActionList = styled(ActionList$1).withConfig({
7
+ shouldForwardProp: prop => prop !== 'sx'
8
+ }).withConfig({
9
+ displayName: "ActionList__StyledActionList",
10
+ componentId: "sc-hw2362-0"
11
+ })(["", ""], sx);
12
+ const ActionListImpl = /*#__PURE__*/React.forwardRef(function ActionListImpl({
13
+ as,
14
+ ...rest
15
+ }, ref) {
16
+ return /*#__PURE__*/jsx(StyledActionList, {
17
+ ref: ref,
18
+ ...rest,
19
+ ...(as ? {
20
+ forwardedAs: as
21
+ } : {})
22
+ });
23
+ });
24
+ const StyledActionListLinkItem = styled(ActionList$1.LinkItem).withConfig({
25
+ shouldForwardProp: prop => prop !== 'sx'
26
+ }).withConfig({
27
+ displayName: "ActionList__StyledActionListLinkItem",
28
+ componentId: "sc-hw2362-1"
29
+ })(["", ""], sx);
30
+ const ActionListLinkItem = /*#__PURE__*/React.forwardRef(({
31
+ children,
32
+ as,
33
+ ...props
34
+ }, ref) => /*#__PURE__*/jsx(StyledActionListLinkItem, {
35
+ ref: ref,
36
+ ...props,
37
+ ...(as ? {
38
+ forwardedAs: as
39
+ } : {}),
40
+ children: children
41
+ }));
42
+ ActionListLinkItem.displayName = 'ActionList.LinkItem';
43
+ const StyledActionListTrailingAction = styled(ActionList$1.TrailingAction).withConfig({
44
+ shouldForwardProp: prop => prop !== 'sx'
45
+ }).withConfig({
46
+ displayName: "ActionList__StyledActionListTrailingAction",
47
+ componentId: "sc-hw2362-2"
48
+ })(["", ""], sx);
49
+ const ActionListTrailingAction = /*#__PURE__*/React.forwardRef((props, ref) => {
50
+ const {
51
+ as,
52
+ ...rest
53
+ } = props;
54
+ return /*#__PURE__*/jsx(StyledActionListTrailingAction, {
55
+ ...rest,
56
+ ...(as ? {
57
+ forwardedAs: as
58
+ } : {}),
59
+ ref: ref
60
+ });
61
+ });
62
+ const StyledActionListItem = styled(ActionList$1.Item).withConfig({
63
+ shouldForwardProp: prop => prop !== 'sx'
64
+ }).withConfig({
65
+ displayName: "ActionList__StyledActionListItem",
66
+ componentId: "sc-hw2362-3"
67
+ })(["", ""], sx);
68
+ const ActionListItem = /*#__PURE__*/React.forwardRef(({
69
+ children,
70
+ as,
71
+ ...props
72
+ }, ref) => /*#__PURE__*/jsx(StyledActionListItem, {
73
+ ref: ref,
74
+ ...props,
75
+ ...(as ? {
76
+ forwardedAs: as
77
+ } : {}),
78
+ children: children
79
+ }));
80
+ const StyledActionListGroup = styled(ActionList$1.Group).withConfig({
81
+ shouldForwardProp: prop => prop !== 'sx'
82
+ }).withConfig({
83
+ displayName: "ActionList__StyledActionListGroup",
84
+ componentId: "sc-hw2362-4"
85
+ })(["", ""], sx);
86
+ const ActionListGroup = ({
87
+ children,
88
+ as,
89
+ ...props
90
+ }) => /*#__PURE__*/jsx(StyledActionListGroup, {
91
+ ...props,
92
+ ...(as ? {
93
+ forwardedAs: as
94
+ } : {}),
95
+ children: children
96
+ });
97
+ ActionListGroup.displayName = 'ActionList.Group';
98
+ const ActionListDivider = styled(ActionList$1.Divider).withConfig({
99
+ shouldForwardProp: prop => prop !== 'sx'
100
+ }).withConfig({
101
+ displayName: "ActionList__ActionListDivider",
102
+ componentId: "sc-hw2362-5"
103
+ })(["", ""], sx);
104
+ const StyledActionListLeadingVisual = styled(ActionList$1.LeadingVisual).withConfig({
105
+ shouldForwardProp: prop => prop !== 'sx'
106
+ }).withConfig({
107
+ displayName: "ActionList__StyledActionListLeadingVisual",
108
+ componentId: "sc-hw2362-6"
109
+ })(["", ""], sx);
110
+ const ActionListLeadingVisual = ({
111
+ children,
112
+ as,
113
+ ...props
114
+ }) => /*#__PURE__*/jsx(StyledActionListLeadingVisual, {
115
+ ...props,
116
+ ...(as ? {
117
+ forwardedAs: as
118
+ } : {}),
119
+ children: children
120
+ });
121
+ ActionListLeadingVisual.displayName = 'ActionList.LeadingVisual';
122
+ const StyledActionListTrailingVisual = styled(ActionList$1.TrailingVisual).withConfig({
123
+ shouldForwardProp: prop => prop !== 'sx'
124
+ }).withConfig({
125
+ displayName: "ActionList__StyledActionListTrailingVisual",
126
+ componentId: "sc-hw2362-7"
127
+ })(["", ""], sx);
128
+ const ActionListTrailingVisual = ({
129
+ children,
130
+ as,
131
+ ...props
132
+ }) => /*#__PURE__*/jsx(StyledActionListTrailingVisual, {
133
+ ...props,
134
+ ...(as ? {
135
+ forwardedAs: as
136
+ } : {}),
137
+ children: children
138
+ });
139
+ ActionListTrailingVisual.displayName = 'ActionList.TrailingVisual';
140
+ const ActionList = Object.assign(ActionListImpl, {
141
+ Item: ActionListItem,
142
+ LinkItem: ActionListLinkItem,
143
+ Group: ActionListGroup,
144
+ GroupHeading: ActionList$1.GroupHeading,
145
+ Divider: ActionListDivider,
146
+ Description: ActionList$1.Description,
147
+ LeadingVisual: ActionListLeadingVisual,
148
+ TrailingVisual: ActionListTrailingVisual,
149
+ Heading: ActionList$1.Heading,
150
+ TrailingAction: ActionListTrailingAction
151
+ });
152
+
153
+ // Assign slot markers after component definitions
154
+ ActionListItem.__SLOT__ = ActionList$1.Item.__SLOT__;
155
+ ActionListLinkItem.__SLOT__ = ActionList$1.LinkItem.__SLOT__;
156
+ ActionListGroup.__SLOT__ = ActionList$1.Group.__SLOT__;
157
+ ActionListDivider.__SLOT__ = ActionList$1.Divider.__SLOT__;
158
+ ActionListLeadingVisual.__SLOT__ = ActionList$1.LeadingVisual.__SLOT__;
159
+ ActionListTrailingVisual.__SLOT__ = ActionList$1.TrailingVisual.__SLOT__;
160
+ ActionListTrailingAction.__SLOT__ = ActionList$1.TrailingAction.__SLOT__;
161
+
162
+ export { ActionList };
@@ -1,7 +1,7 @@
1
- import { ActionMenu as PrimerActionMenu, type SxProp } from '@primer/react';
1
+ import { ActionMenu as PrimerActionMenu, type SxProp, type SlotMarker } from '@primer/react';
2
2
  import type { ComponentProps } from 'react';
3
3
  type ActionMenuOverlayProps = ComponentProps<typeof PrimerActionMenu.Overlay> & SxProp;
4
- declare const ActionMenuOverlay: React.ComponentType<ActionMenuOverlayProps>;
4
+ declare const ActionMenuOverlay: React.ComponentType<ActionMenuOverlayProps> & SlotMarker;
5
5
  export declare const ActionMenu: typeof PrimerActionMenu & {
6
6
  Button: typeof PrimerActionMenu.Button;
7
7
  Anchor: typeof PrimerActionMenu.Anchor;
@@ -1 +1 @@
1
- {"version":3,"file":"ActionMenu.d.ts","sourceRoot":"","sources":["../../src/components/ActionMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,IAAI,gBAAgB,EAAE,KAAK,MAAM,EAAC,MAAM,eAAe,CAAA;AAGzE,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,OAAO,CAAA;AAEzC,KAAK,sBAAsB,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,GAAG,MAAM,CAAA;AAEtF,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,aAAa,CAAC,sBAAsB,CAIlE,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,OAAO,gBAAgB,GAAG;IACjD,MAAM,EAAE,OAAO,gBAAgB,CAAC,MAAM,CAAA;IACtC,MAAM,EAAE,OAAO,gBAAgB,CAAC,MAAM,CAAA;IACtC,OAAO,EAAE,OAAO,iBAAiB,CAAA;IACjC,OAAO,EAAE,OAAO,gBAAgB,CAAC,OAAO,CAAA;CAMxC,CAAA"}
1
+ {"version":3,"file":"ActionMenu.d.ts","sourceRoot":"","sources":["../../src/components/ActionMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,IAAI,gBAAgB,EAAE,KAAK,MAAM,EAAE,KAAK,UAAU,EAAC,MAAM,eAAe,CAAA;AAG1F,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,OAAO,CAAA;AAEzC,KAAK,sBAAsB,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,GAAG,MAAM,CAAA;AAEtF,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,aAAa,CAAC,sBAAsB,CAAC,GAAG,UAMtE,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,OAAO,gBAAgB,GAAG;IACjD,MAAM,EAAE,OAAO,gBAAgB,CAAC,MAAM,CAAA;IACtC,MAAM,EAAE,OAAO,gBAAgB,CAAC,MAAM,CAAA;IACtC,OAAO,EAAE,OAAO,iBAAiB,CAAA;IACjC,OAAO,EAAE,OAAO,gBAAgB,CAAC,OAAO,CAAA;CAMxC,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { ActionMenu as ActionMenu$1, sx } from '@primer/react';
2
+ import styled from 'styled-components';
3
+
4
+ const ActionMenuOverlay = styled(ActionMenu$1.Overlay).withConfig({
5
+ shouldForwardProp: prop => prop !== 'sx'
6
+ }).withConfig({
7
+ displayName: "ActionMenu__ActionMenuOverlay",
8
+ componentId: "sc-w5s60e-0"
9
+ })(["", ""], sx);
10
+ const ActionMenu = Object.assign(ActionMenu$1, {
11
+ Button: ActionMenu$1.Button,
12
+ Anchor: ActionMenu$1.Anchor,
13
+ Overlay: ActionMenuOverlay,
14
+ Divider: ActionMenu$1.Divider
15
+ });
16
+ ActionMenuOverlay.__SLOT__ = ActionMenu$1.Overlay.__SLOT__;
17
+
18
+ export { ActionMenu };
@@ -1,12 +1,14 @@
1
- import { Autocomplete as PrimerAutocomplete, type AutocompleteOverlayProps as PrimerAutocompleteOverlayProps } from '@primer/react';
1
+ import { Autocomplete as PrimerAutocomplete, type AutocompleteOverlayProps as PrimerAutocompleteOverlayProps, type AutocompleteInputProps as PrimerAutocompleteInputProps, type SlotMarker } from '@primer/react';
2
2
  import { type SxProp } from '../sx';
3
3
  import type { ComponentProps } from 'react';
4
4
  export type AutocompleteOverlayProps = PrimerAutocompleteOverlayProps & SxProp;
5
- declare const AutocompleteOverlay: React.ComponentType<AutocompleteOverlayProps>;
5
+ declare const AutocompleteOverlay: React.ComponentType<AutocompleteOverlayProps> & SlotMarker;
6
+ export type AutocompleteInputProps = PrimerAutocompleteInputProps & SxProp;
7
+ declare const AutocompleteInput: React.ComponentType<AutocompleteInputProps>;
6
8
  interface AutocompleteExport {
7
9
  (props: ComponentProps<typeof PrimerAutocomplete>): React.ReactNode;
8
10
  Context: typeof PrimerAutocomplete.Context;
9
- Input: typeof PrimerAutocomplete.Input;
11
+ Input: typeof AutocompleteInput;
10
12
  Menu: typeof PrimerAutocomplete.Menu;
11
13
  Overlay: typeof AutocompleteOverlay;
12
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../src/components/Autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,IAAI,kBAAkB,EAClC,KAAK,wBAAwB,IAAI,8BAA8B,EAChE,MAAM,eAAe,CAAA;AACtB,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAErC,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,OAAO,CAAA;AAEzC,MAAM,MAAM,wBAAwB,GAAG,8BAA8B,GA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AAE,OAAO,kBAAkB,CAAC,OAAO,CAAA;IAC1C,KAAK,EAAE,OAAO,iBAAiB,CAAA;IAC/B,IAAI,EAAE,OAAO,kBAAkB,CAAC,IAAI,CAAA;IACpC,OAAO,EAAE,OAAO,mBAAmB,CAAA;CACpC;AAED,QAAA,MAAM,YAAY,EAAE,kBAKlB,CAAA;AAIF,OAAO,EAAC,YAAY,EAAC,CAAA"}
@@ -0,0 +1,24 @@
1
+ import { Autocomplete as Autocomplete$1, sx } from '@primer/react';
2
+ import styled from 'styled-components';
3
+
4
+ const AutocompleteOverlay = styled(Autocomplete$1.Overlay).withConfig({
5
+ shouldForwardProp: prop => prop !== 'sx'
6
+ }).withConfig({
7
+ displayName: "Autocomplete__AutocompleteOverlay",
8
+ componentId: "sc-j8ax2e-0"
9
+ })(["", ""], sx);
10
+ const AutocompleteInput = styled(Autocomplete$1.Input).withConfig({
11
+ shouldForwardProp: prop => prop !== 'sx'
12
+ }).withConfig({
13
+ displayName: "Autocomplete__AutocompleteInput",
14
+ componentId: "sc-j8ax2e-1"
15
+ })(["", ""], sx);
16
+ const Autocomplete = Object.assign(Autocomplete$1, {
17
+ Context: Autocomplete$1.Context,
18
+ Input: AutocompleteInput,
19
+ Menu: Autocomplete$1.Menu,
20
+ Overlay: AutocompleteOverlay
21
+ });
22
+ AutocompleteOverlay.__SLOT__ = Autocomplete$1.Overlay.__SLOT__;
23
+
24
+ export { Autocomplete };
@@ -0,0 +1,13 @@
1
+ import { Box, Avatar as Avatar$1 } from '@primer/react';
2
+ import { forwardRef } from 'react';
3
+ import { jsx } from 'react/jsx-runtime';
4
+
5
+ const Avatar = /*#__PURE__*/forwardRef(function Avatar(props, ref) {
6
+ return /*#__PURE__*/jsx(Box, {
7
+ as: Avatar$1,
8
+ ref: ref,
9
+ ...props
10
+ });
11
+ });
12
+
13
+ export { Avatar };
@@ -0,0 +1,17 @@
1
+ import type React from 'react';
2
+ import { type CSSProperties, type PropsWithChildren } from 'react';
3
+ import type * as styledSystem from 'styled-system';
4
+ import 'focus-visible';
5
+ export interface SystemCommonProps extends styledSystem.ColorProps, styledSystem.SpaceProps, styledSystem.DisplayProps {
6
+ }
7
+ export interface SystemTypographyProps extends styledSystem.TypographyProps {
8
+ whiteSpace?: 'normal' | 'nowrap' | 'pre' | 'pre-wrap' | 'pre-line';
9
+ }
10
+ export type BaseStylesProps = PropsWithChildren & {
11
+ as?: React.ComponentType<any> | keyof JSX.IntrinsicElements;
12
+ className?: string;
13
+ style?: CSSProperties;
14
+ color?: string;
15
+ } & SystemTypographyProps & SystemCommonProps;
16
+ export declare function BaseStyles({ children, color, fontFamily, lineHeight, className, as: Component, style, ...rest }: BaseStylesProps): React.JSX.Element;
17
+ //# sourceMappingURL=BaseStyles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseStyles.d.ts","sourceRoot":"","sources":["../../src/components/BaseStyles.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAC,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAC,MAAM,OAAO,CAAA;AAGhE,OAAO,KAAK,KAAK,YAAY,MAAM,eAAe,CAAA;AAGlD,OAAO,eAAe,CAAA;AAGtB,MAAM,WAAW,iBACf,SAAQ,YAAY,CAAC,UAAU,EAC7B,YAAY,CAAC,UAAU,EACvB,YAAY,CAAC,YAAY;CAAG;AAEhC,MAAM,WAAW,qBAAsB,SAAQ,YAAY,CAAC,eAAe;IACzE,UAAU,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,KAAK,GAAG,UAAU,GAAG,UAAU,CAAA;CACnE;AAqFD,MAAM,MAAM,eAAe,GAAG,iBAAiB,GAAG;IAEhD,EAAE,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,CAAC,iBAAiB,CAAA;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,qBAAqB,GACvB,iBAAiB,CAAA;AAEnB,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,KAAK,EACL,UAAU,EACV,UAAU,EACV,SAAS,EACT,EAAE,EAAE,SAAiB,EACrB,KAAK,EACL,GAAG,IAAI,EACR,EAAE,eAAe,qBA+BjB"}
@@ -0,0 +1,51 @@
1
+ import { clsx } from 'clsx';
2
+ import { useTheme } from './ThemeProvider.js';
3
+ import 'focus-visible';
4
+ import { createGlobalStyle } from 'styled-components';
5
+ import { jsxs, jsx } from 'react/jsx-runtime';
6
+
7
+ const GlobalStyle = createGlobalStyle(["*{box-sizing:border-box;}body{margin:0;}table{border-collapse:collapse;}[data-color-mode='light'] input{color-scheme:light;}[data-color-mode='dark'] input{color-scheme:dark;}@media (prefers-color-scheme:light){[data-color-mode='auto'][data-light-theme*='light']{color-scheme:light;}}@media (prefers-color-scheme:dark){[data-color-mode='auto'][data-dark-theme*='dark']{color-scheme:dark;}}[role='button']:focus:not(:focus-visible):not(:global(.focus-visible)),[role='tabpanel'][tabindex='0']:focus:not(:focus-visible):not(:global(.focus-visible)),button:focus:not(:focus-visible):not(:global(.focus-visible)),summary:focus:not(:focus-visible):not(:global(.focus-visible)),a:focus:not(:focus-visible):not(:global(.focus-visible)){outline:none;box-shadow:none;}[tabindex='0']:focus:not(:focus-visible):not(:global(.focus-visible)),details-dialog:focus:not(:focus-visible):not(:global(.focus-visible)){outline:none;}.BaseStyles{font-family:var(--BaseStyles-fontFamily,var(--fontStack-system));line-height:var(--BaseStyles-lineHeight,1.5);color:var(--BaseStyles-fgColor,var(--fgColor-default));&:has([data-color-mode='light']){input &{color-scheme:light;}}&:has([data-color-mode='dark']){input &{color-scheme:dark;}}:where(a:not([class*='prc-']):not([class*='PRC-']):not([class*='Primer_Brand__'])){color:var(--fgColor-accent,var(--color-accent-fg));text-decoration:none;&:hover{text-decoration:underline;}}}"]);
8
+ function BaseStyles({
9
+ children,
10
+ color,
11
+ fontFamily,
12
+ lineHeight,
13
+ className,
14
+ as: Component = 'div',
15
+ style,
16
+ ...rest
17
+ }) {
18
+ const {
19
+ colorMode,
20
+ colorScheme,
21
+ dayScheme,
22
+ nightScheme
23
+ } = useTheme();
24
+ const baseStyles = {
25
+ ['--BaseStyles-fgColor']: color,
26
+ ['--BaseStyles-fontFamily']: fontFamily,
27
+ ['--BaseStyles-lineHeight']: lineHeight
28
+ };
29
+ return /*#__PURE__*/jsxs(Component, {
30
+ className: clsx('BaseStyles', className),
31
+ "data-portal-root": true
32
+ /**
33
+ * We need to map valid primer/react color modes onto valid color modes for primer/primitives
34
+ * valid color modes for primer/primitives: auto | light | dark
35
+ * valid color modes for primer/primer: auto | day | night | light | dark
36
+ */,
37
+ "data-color-mode": colorMode === 'auto' ? 'auto' : colorScheme?.includes('dark') ? 'dark' : 'light',
38
+ "data-light-theme": dayScheme,
39
+ "data-dark-theme": nightScheme,
40
+ style: {
41
+ ...baseStyles,
42
+ ...style
43
+ },
44
+ ...rest,
45
+ children: [/*#__PURE__*/jsx(GlobalStyle, {
46
+ colorScheme: colorScheme?.includes('dark') ? 'dark' : 'light'
47
+ }), children]
48
+ });
49
+ }
50
+
51
+ export { BaseStyles };
@@ -0,0 +1,37 @@
1
+ import { Breadcrumbs as Breadcrumbs$1, sx } from '@primer/react';
2
+ import styled from 'styled-components';
3
+ import { jsx } from 'react/jsx-runtime';
4
+
5
+ const BreadcrumbsImpl = styled(Breadcrumbs$1).withConfig({
6
+ shouldForwardProp: prop => prop !== 'sx'
7
+ }).withConfig({
8
+ displayName: "Breadcrumbs__BreadcrumbsImpl",
9
+ componentId: "sc-1qj8pw-0"
10
+ })(["", ""], sx);
11
+ const StyledBreadcrumbsItem = styled(Breadcrumbs$1.Item).withConfig({
12
+ shouldForwardProp: prop => prop !== 'sx'
13
+ }).withConfig({
14
+ displayName: "Breadcrumbs__StyledBreadcrumbsItem",
15
+ componentId: "sc-1qj8pw-1"
16
+ })(["", ""], sx);
17
+ function BreadcrumbsItem({
18
+ as,
19
+ ...props
20
+ }) {
21
+ return /*#__PURE__*/jsx(StyledBreadcrumbsItem, {
22
+ ...props,
23
+ ...(as ? {
24
+ forwardedAs: as
25
+ } : {})
26
+ });
27
+ }
28
+ const Breadcrumbs = Object.assign(BreadcrumbsImpl, {
29
+ Item: BreadcrumbsItem
30
+ });
31
+
32
+ /**
33
+ * @deprecated Use the `Breadcrumbs` component instead (i.e. `<Breadcrumb>` → `<Breadcrumbs>`)
34
+ */
35
+ const Breadcrumb = Breadcrumbs;
36
+
37
+ export { Breadcrumb, Breadcrumbs };
@@ -0,0 +1,13 @@
1
+ import { type ButtonProps as PrimerButtonProps, type SlotMarker } from '@primer/react';
2
+ import type { SxProp } from '../sx';
3
+ import type { BetterSystemStyleObject } from '../styled-props';
4
+ import type { ForwardRefComponent } from '../polymorphic';
5
+ type ButtonComponentProps = PrimerButtonProps & SxProp & {
6
+ as?: React.ElementType;
7
+ };
8
+ declare const ButtonComponent: ForwardRefComponent<"button", ButtonComponentProps> & SlotMarker;
9
+ export declare function generateCustomSxProp(props: Partial<Pick<PrimerButtonProps, 'size' | 'block' | 'leadingVisual' | 'trailingVisual' | 'trailingAction'>>, providedSx: BetterSystemStyleObject): {
10
+ [key: string]: BetterSystemStyleObject;
11
+ };
12
+ export { ButtonComponent, type ButtonComponentProps };
13
+ //# sourceMappingURL=Button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,WAAW,IAAI,iBAAiB,EAAE,KAAK,UAAU,EAAC,MAAM,eAAe,CAAA;AAC5G,OAAO,KAAK,EAAC,MAAM,EAAsB,MAAM,OAAO,CAAA;AACtD,OAAO,KAAK,EAAC,uBAAuB,EAAC,MAAM,iBAAiB,CAAA;AAE5D,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AAIvD,KAAK,oBAAoB,GAAG,iBAAiB,GAAG,MAAM,GAAG;IAAC,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;CAAC,CAAA;AAQjF,QAAA,MAAM,eAAe,EAgBf,mBAAmB,CAAC,QAAQ,EAAE,oBAAoB,CAAC,GAAG,UAAU,CAAA;AA0CtE,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,MAAM,GAAG,OAAO,GAAG,eAAe,GAAG,gBAAgB,GAAG,gBAAgB,CAAC,CAAC,EACjH,UAAU,EAAE,uBAAuB;;EAmBpC;AAKD,OAAO,EAAC,eAAe,EAAE,KAAK,oBAAoB,EAAC,CAAA"}
@@ -0,0 +1,111 @@
1
+ import { Button, sx } from '@primer/react';
2
+ import { forwardRef } from 'react';
3
+ import styled from 'styled-components';
4
+ import { jsx } from 'react/jsx-runtime';
5
+
6
+ const StyledButtonComponent = styled(Button).withConfig({
7
+ shouldForwardProp: prop => prop !== 'sx'
8
+ }).withConfig({
9
+ displayName: "Button__StyledButtonComponent",
10
+ componentId: "sc-vqy3e4-0"
11
+ })(["", ""], sx);
12
+ const ButtonComponent = /*#__PURE__*/forwardRef(({
13
+ as,
14
+ sx,
15
+ style: propStyle,
16
+ ...props
17
+ }, ref) => {
18
+ const {
19
+ block,
20
+ size = 'medium',
21
+ leadingVisual,
22
+ trailingVisual,
23
+ trailingAction
24
+ } = props;
25
+ let sxStyles = {};
26
+ const style = {
27
+ ...(propStyle || {})
28
+ };
29
+ if (sx !== null && Object.keys(sx || {}).length > 0) {
30
+ sxStyles = generateCustomSxProp({
31
+ block,
32
+ size,
33
+ leadingVisual,
34
+ trailingVisual,
35
+ trailingAction
36
+ }, sx);
37
+ const {
38
+ color
39
+ } = sx;
40
+ if (color) style['--button-color'] = color;
41
+ }
42
+ return /*#__PURE__*/jsx(StyledButtonComponent, {
43
+ style: style,
44
+ sx: sxStyles,
45
+ ref: ref,
46
+ ...props,
47
+ ...(as ? {
48
+ forwardedAs: as
49
+ } : {})
50
+ });
51
+ });
52
+
53
+ // This function is used to generate a custom cssSelector for the sxProp
54
+
55
+ // The usual sx prop can like this:
56
+ // sx={{
57
+ // [`@media (max-width: 768px)`]: {
58
+ // '& > ul': {
59
+ // backgroundColor: 'deeppink',
60
+ // },
61
+ // '&:hover': {
62
+ // backgroundColor: 'yellow',
63
+ // },
64
+ // },
65
+ // '&:hover': {
66
+ // backgroundColor: 'yellow',
67
+ // },
68
+ // '&': {
69
+ // width : 320px
70
+ // }
71
+ // }}
72
+ //*
73
+ /* What we want for Button styles is this:
74
+ sx={{
75
+ // [`@media (max-width: 768px)`]: {
76
+ // '&[data-attribute="something"] > ul': {
77
+ // backgroundColor: 'deeppink',
78
+ // },
79
+ // '&[data-attribute="something"]:hover': {
80
+ // backgroundColor: 'yellow',
81
+ // },
82
+ // },
83
+ // '&[data-attribute="something"]:hover': {
84
+ // backgroundColor: 'yellow',
85
+ // },
86
+ // '&[data-attribute="something"]': {
87
+ // width : 320px
88
+ // }
89
+ // }}
90
+
91
+ // We need to make sure we append the customCSSSelector to the original class selector. i.e & - > &[data-attribute="Icon"][data-size="small"]
92
+ */
93
+ function generateCustomSxProp(props, providedSx) {
94
+ // Possible data attributes: data-size, data-block, data-no-visuals
95
+ const size = `[data-size="${props.size}"]`;
96
+ const block = props.block ? `[data-block="block"]` : '';
97
+ const noVisuals = props.leadingVisual || props.trailingVisual || props.trailingAction ? '' : '[data-no-visuals]';
98
+
99
+ // this is a custom selector. We need to make sure we add the data attributes to the base css class (& -> &[data-attributename="value"]])
100
+ const cssSelector = `&${size}${block}${noVisuals}`; // &[data-size="small"][data-block="block"][data-no-visuals]
101
+
102
+ const customSxProp = {};
103
+ if (!providedSx) return customSxProp;else {
104
+ customSxProp[cssSelector] = providedSx;
105
+ return customSxProp;
106
+ }
107
+ }
108
+ ButtonComponent.displayName = 'Button';
109
+ ButtonComponent.__SLOT__ = Button.__SLOT__;
110
+
111
+ export { ButtonComponent, generateCustomSxProp };
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../src/components/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,aAAa,IAAI,mBAAmB,EAAC,MAAM,eAAe,CAAA;AAGnG,OAAO,EAAC,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAEjC,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,MAAM,CAAA;AAExD,eAAO,MAAM,QAAQ,yHAEnB,CAAA"}
1
+ {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../src/components/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,aAAa,IAAI,mBAAmB,EAAkB,MAAM,eAAe,CAAA;AAGpH,OAAO,EAAC,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAEjC,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,MAAM,CAAA;AAExD,eAAO,MAAM,QAAQ,yHAEnB,CACD"}
@@ -0,0 +1,14 @@
1
+ import { Checkbox as Checkbox$1, Box } from '@primer/react';
2
+ import { forwardRef } from 'react';
3
+ import { jsx } from 'react/jsx-runtime';
4
+
5
+ const Checkbox = /*#__PURE__*/forwardRef(function Checkbox(props, ref) {
6
+ return /*#__PURE__*/jsx(Box, {
7
+ as: Checkbox$1,
8
+ ref: ref,
9
+ ...props
10
+ });
11
+ });
12
+ Checkbox.__SLOT__ = Checkbox$1.__SLOT__;
13
+
14
+ export { Checkbox };
@@ -13,10 +13,22 @@ type CheckboxOrRadioGroupValidationProps = PropsWithChildren<{
13
13
  className?: string;
14
14
  variant: 'error' | 'success';
15
15
  } & SxProp>;
16
- export declare const CheckboxGroup: ((props: CheckboxGroupProps) => React.JSX.Element) & {
17
- Label: (props: CheckboxOrRadioGroupLabelProps) => React.JSX.Element;
18
- Caption: (props: CheckboxOrRadioGroupCaptionProps) => React.JSX.Element;
19
- Validation: (props: CheckboxOrRadioGroupValidationProps) => React.JSX.Element;
16
+ export declare const CheckboxGroup: {
17
+ (props: CheckboxGroupProps): React.JSX.Element;
18
+ __SLOT__: symbol | undefined;
19
+ } & {
20
+ Label: {
21
+ (props: CheckboxOrRadioGroupLabelProps): React.JSX.Element;
22
+ __SLOT__: symbol | undefined;
23
+ };
24
+ Caption: {
25
+ (props: CheckboxOrRadioGroupCaptionProps): React.JSX.Element;
26
+ __SLOT__: symbol | undefined;
27
+ };
28
+ Validation: {
29
+ (props: CheckboxOrRadioGroupValidationProps): React.JSX.Element;
30
+ __SLOT__: symbol | undefined;
31
+ };
20
32
  };
21
33
  export {};
22
34
  //# sourceMappingURL=CheckboxGroup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxGroup.d.ts","sourceRoot":"","sources":["../../src/components/CheckboxGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,kBAAkB,IAAI,wBAAwB,EACpD,MAAM,eAAe,CAAA;AACtB,OAAO,KAAK,EAAE,EAAC,KAAK,iBAAiB,EAAC,MAAM,OAAO,CAAA;AACnD,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,OAAO,CAAA;AAEjC,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,CAAC,wBAAwB,CAAC,GAAG,MAAM,CAAA;AAOrF,KAAK,8BAA8B,GAAG,iBAAiB,CACrD;IACE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB,GAAG,MAAM,CACX,CAAA;AAKD,KAAK,gCAAgC,GAAG,iBAAiB,CACvD;IACE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,MAAM,CACX,CAAA;AAKD,KAAK,mCAAmC,GAAG,iBAAiB,CAC1D;IACE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,OAAO,GAAG,SAAS,CAAA;CAC7B,GAAG,MAAM,CACX,CAAA;AAKD,eAAO,M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