@primer/styled-react 1.0.0-rc.4 → 1.0.0-rc.6
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.
- package/dist/{PageHeader-Bvki2mbE.js → PageHeader-DCDIR2C1.js} +63 -6
- package/dist/Tooltip-DIHgr01r.js +152 -0
- package/dist/Tooltip-YuSlJ5b_.js +20 -0
- package/dist/components/ActionList.d.ts +36 -0
- package/dist/components/ActionList.d.ts.map +1 -0
- package/dist/components/ActionMenu.d.ts +12 -0
- package/dist/components/ActionMenu.d.ts.map +1 -0
- package/dist/components/Autocomplete.d.ts +15 -0
- package/dist/components/Autocomplete.d.ts.map +1 -0
- package/dist/components/Avatar.d.ts +13 -0
- package/dist/components/Avatar.d.ts.map +1 -0
- package/dist/components/Breadcrumbs.d.ts +18 -0
- package/dist/components/Breadcrumbs.d.ts.map +1 -0
- package/dist/components/CheckboxGroup.d.ts +22 -0
- package/dist/components/CheckboxGroup.d.ts.map +1 -0
- package/dist/components/CircleBadge.d.ts +7 -0
- package/dist/components/CircleBadge.d.ts.map +1 -0
- package/dist/components/DataTable.d.ts +11 -0
- package/dist/components/DataTable.d.ts.map +1 -0
- package/dist/components/Dialog.d.ts +19 -0
- package/dist/components/Dialog.d.ts.map +1 -0
- package/dist/components/DialogV1.d.ts +11 -0
- package/dist/components/DialogV1.d.ts.map +1 -0
- package/dist/components/Header.d.ts.map +1 -1
- package/dist/components/Heading.d.ts +8 -0
- package/dist/components/Heading.d.ts.map +1 -0
- package/dist/components/Label.d.ts +9 -0
- package/dist/components/Label.d.ts.map +1 -0
- package/dist/components/Link.d.ts +7 -0
- package/dist/components/Link.d.ts.map +1 -0
- package/dist/components/NavList.d.ts +25 -0
- package/dist/components/NavList.d.ts.map +1 -0
- package/dist/components/Overlay.d.ts +7 -0
- package/dist/components/Overlay.d.ts.map +1 -0
- package/dist/components/PageHeader.d.ts +5 -4
- package/dist/components/PageHeader.d.ts.map +1 -1
- package/dist/components/PageLayout.d.ts +18 -0
- package/dist/components/PageLayout.d.ts.map +1 -0
- package/dist/components/Spinner.d.ts +3 -4
- package/dist/components/Spinner.d.ts.map +1 -1
- package/dist/components/TabNav.d.ts +9 -0
- package/dist/components/TabNav.d.ts.map +1 -0
- package/dist/components/Text.d.ts +7 -0
- package/dist/components/Text.d.ts.map +1 -0
- package/dist/components/Token.d.ts +8 -0
- package/dist/components/Token.d.ts.map +1 -0
- package/dist/components/Tooltip.d.ts +10 -0
- package/dist/components/Tooltip.d.ts.map +1 -0
- package/dist/components/UnderlineNav.d.ts +4 -2
- package/dist/components/UnderlineNav.d.ts.map +1 -1
- package/dist/components/UnderlinePanels.d.ts +12 -0
- package/dist/components/UnderlinePanels.d.ts.map +1 -0
- package/dist/components/deprecated/ActionList.d.ts +23 -0
- package/dist/components/deprecated/ActionList.d.ts.map +1 -0
- package/dist/components/deprecated/DialogV1.d.ts +11 -0
- package/dist/components/deprecated/DialogV1.d.ts.map +1 -0
- package/dist/components/deprecated/Octicon.d.ts +17 -0
- package/dist/components/deprecated/Octicon.d.ts.map +1 -0
- package/dist/components/deprecated/TabNav.d.ts +9 -0
- package/dist/components/deprecated/TabNav.d.ts.map +1 -0
- package/dist/components/deprecated/Tooltip.d.ts +13 -0
- package/dist/components/deprecated/Tooltip.d.ts.map +1 -0
- package/dist/components.json +18 -1
- package/dist/deprecated.d.ts +4 -1
- package/dist/deprecated.d.ts.map +1 -1
- package/dist/deprecated.js +84 -1
- package/dist/experimental.d.ts +4 -1
- package/dist/experimental.d.ts.map +1 -1
- package/dist/experimental.js +32 -5
- package/dist/index.d.ts +16 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +293 -16
- package/package.json +3 -3
- package/dist/components/StateLabelProps.d.ts +0 -8
- package/dist/components/StateLabelProps.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,77 @@
|
|
|
1
|
-
import { Box, Checkbox as Checkbox$1, CounterLabel as CounterLabel$1, Flash as Flash$1,
|
|
2
|
-
export { ActionList,
|
|
1
|
+
import { ActionMenu as ActionMenu$1, sx, 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, 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, Token as Token$1, Truncate as Truncate$1, UnderlineNav as UnderlineNav$1 } from '@primer/react';
|
|
2
|
+
export { ActionList, Box, Button, Details, FormControl, IconButton, PageLayout, ProgressBar, Select, TextInput, Textarea, ThemeProvider, merge, sx, theme, themeGet, useColorSchemeVar, useTheme } from '@primer/react';
|
|
3
|
+
import styled from 'styled-components';
|
|
3
4
|
import { forwardRef } from 'react';
|
|
4
5
|
import { jsx } from 'react/jsx-runtime';
|
|
5
|
-
|
|
6
|
-
export {
|
|
6
|
+
export { D as Dialog, P as PageHeader } from './PageHeader-DCDIR2C1.js';
|
|
7
|
+
export { T as Tooltip } from './Tooltip-YuSlJ5b_.js';
|
|
8
|
+
import '@primer/react/deprecated';
|
|
9
|
+
|
|
10
|
+
const ActionMenuOverlay = styled(ActionMenu$1.Overlay).withConfig({
|
|
11
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
12
|
+
}).withConfig({
|
|
13
|
+
displayName: "ActionMenu__ActionMenuOverlay",
|
|
14
|
+
componentId: "sc-w5s60e-0"
|
|
15
|
+
})(["", ""], sx);
|
|
16
|
+
const ActionMenu = Object.assign(ActionMenu$1, {
|
|
17
|
+
Button: ActionMenu$1.Button,
|
|
18
|
+
Anchor: ActionMenu$1.Anchor,
|
|
19
|
+
Overlay: ActionMenuOverlay,
|
|
20
|
+
Divider: ActionMenu$1.Divider
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const AutocompleteOverlay = styled(Autocomplete$1.Overlay).withConfig({
|
|
24
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
25
|
+
}).withConfig({
|
|
26
|
+
displayName: "Autocomplete__AutocompleteOverlay",
|
|
27
|
+
componentId: "sc-j8ax2e-0"
|
|
28
|
+
})(["", ""], sx);
|
|
29
|
+
const Autocomplete = Object.assign(Autocomplete$1, {
|
|
30
|
+
Context: Autocomplete$1.Context,
|
|
31
|
+
Input: Autocomplete$1.Input,
|
|
32
|
+
Menu: Autocomplete$1.Menu,
|
|
33
|
+
Overlay: AutocompleteOverlay
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const Avatar = /*#__PURE__*/forwardRef(function Avatar(props, ref) {
|
|
37
|
+
return /*#__PURE__*/jsx(Box, {
|
|
38
|
+
as: Avatar$1,
|
|
39
|
+
ref: ref,
|
|
40
|
+
...props
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const BreadcrumbsImpl = styled(Breadcrumbs$1).withConfig({
|
|
45
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
46
|
+
}).withConfig({
|
|
47
|
+
displayName: "Breadcrumbs__BreadcrumbsImpl",
|
|
48
|
+
componentId: "sc-1qj8pw-0"
|
|
49
|
+
})(["", ""], sx);
|
|
50
|
+
const StyledBreadcrumbsItem = styled(Breadcrumbs$1.Item).withConfig({
|
|
51
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
52
|
+
}).withConfig({
|
|
53
|
+
displayName: "Breadcrumbs__StyledBreadcrumbsItem",
|
|
54
|
+
componentId: "sc-1qj8pw-1"
|
|
55
|
+
})(["", ""], sx);
|
|
56
|
+
function BreadcrumbsItem({
|
|
57
|
+
as,
|
|
58
|
+
...props
|
|
59
|
+
}) {
|
|
60
|
+
return /*#__PURE__*/jsx(StyledBreadcrumbsItem, {
|
|
61
|
+
...props,
|
|
62
|
+
...(as ? {
|
|
63
|
+
forwardedAs: as
|
|
64
|
+
} : {})
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
const Breadcrumbs = Object.assign(BreadcrumbsImpl, {
|
|
68
|
+
Item: BreadcrumbsItem
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* @deprecated Use the `Breadcrumbs` component instead (i.e. `<Breadcrumb>` → `<Breadcrumbs>`)
|
|
73
|
+
*/
|
|
74
|
+
const Breadcrumb = Breadcrumbs;
|
|
7
75
|
|
|
8
76
|
const Checkbox = /*#__PURE__*/forwardRef(function Checkbox(props, ref) {
|
|
9
77
|
return /*#__PURE__*/jsx(Box, {
|
|
@@ -13,6 +81,46 @@ const Checkbox = /*#__PURE__*/forwardRef(function Checkbox(props, ref) {
|
|
|
13
81
|
});
|
|
14
82
|
});
|
|
15
83
|
|
|
84
|
+
const CheckboxGroupImpl = props => {
|
|
85
|
+
return /*#__PURE__*/jsx(Box, {
|
|
86
|
+
as: CheckboxGroup$1,
|
|
87
|
+
...props
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
// Define local types based on the internal component props
|
|
92
|
+
|
|
93
|
+
const CheckboxOrRadioGroupLabel$1 = props => {
|
|
94
|
+
return /*#__PURE__*/jsx(Box, {
|
|
95
|
+
as: CheckboxGroup$1.Label,
|
|
96
|
+
...props
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
const CheckboxOrRadioGroupCaption$1 = props => {
|
|
100
|
+
return /*#__PURE__*/jsx(Box, {
|
|
101
|
+
as: CheckboxGroup$1.Caption,
|
|
102
|
+
...props
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
const CheckboxOrRadioGroupValidation$1 = props => {
|
|
106
|
+
return /*#__PURE__*/jsx(Box, {
|
|
107
|
+
as: CheckboxGroup$1.Validation,
|
|
108
|
+
...props
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
const CheckboxGroup = Object.assign(CheckboxGroupImpl, {
|
|
112
|
+
Label: CheckboxOrRadioGroupLabel$1,
|
|
113
|
+
Caption: CheckboxOrRadioGroupCaption$1,
|
|
114
|
+
Validation: CheckboxOrRadioGroupValidation$1
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
const CircleBadge = styled(CircleBadge$1).withConfig({
|
|
118
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
119
|
+
}).withConfig({
|
|
120
|
+
displayName: "CircleBadge",
|
|
121
|
+
componentId: "sc-1u7lp3v-0"
|
|
122
|
+
})(["", ""], sx);
|
|
123
|
+
|
|
16
124
|
const CounterLabel = /*#__PURE__*/forwardRef(function CounterLabel(props, ref) {
|
|
17
125
|
return /*#__PURE__*/jsx(Box, {
|
|
18
126
|
as: CounterLabel$1,
|
|
@@ -28,13 +136,23 @@ const Flash = styled(Flash$1).withConfig({
|
|
|
28
136
|
componentId: "sc-413izo-0"
|
|
29
137
|
})(["", ""], sx);
|
|
30
138
|
|
|
31
|
-
const
|
|
139
|
+
const StyledHeader = /*#__PURE__*/forwardRef(function Header(props, ref) {
|
|
32
140
|
return /*#__PURE__*/jsx(Box, {
|
|
33
141
|
as: Header$1,
|
|
34
142
|
ref: ref,
|
|
35
143
|
...props
|
|
36
144
|
});
|
|
37
145
|
});
|
|
146
|
+
const HeaderImpl = /*#__PURE__*/forwardRef(({
|
|
147
|
+
as,
|
|
148
|
+
...props
|
|
149
|
+
}, ref) => /*#__PURE__*/jsx(StyledHeader, {
|
|
150
|
+
...props,
|
|
151
|
+
...(as ? {
|
|
152
|
+
forwardedAs: as
|
|
153
|
+
} : {}),
|
|
154
|
+
ref: ref
|
|
155
|
+
}));
|
|
38
156
|
const HeaderItem = /*#__PURE__*/forwardRef(function HeaderItem(props, ref) {
|
|
39
157
|
return /*#__PURE__*/jsx(Box, {
|
|
40
158
|
as: Header$1.Item,
|
|
@@ -42,18 +160,73 @@ const HeaderItem = /*#__PURE__*/forwardRef(function HeaderItem(props, ref) {
|
|
|
42
160
|
...props
|
|
43
161
|
});
|
|
44
162
|
});
|
|
45
|
-
const
|
|
163
|
+
const StyledHeaderLink = /*#__PURE__*/forwardRef(function HeaderLink(props, ref) {
|
|
46
164
|
return /*#__PURE__*/jsx(Box, {
|
|
47
165
|
as: Header$1.Link,
|
|
48
166
|
ref: ref,
|
|
49
167
|
...props
|
|
50
168
|
});
|
|
51
169
|
});
|
|
170
|
+
const HeaderLink = /*#__PURE__*/forwardRef(({
|
|
171
|
+
as,
|
|
172
|
+
...props
|
|
173
|
+
}, ref) => /*#__PURE__*/jsx(StyledHeaderLink, {
|
|
174
|
+
...props,
|
|
175
|
+
...(as ? {
|
|
176
|
+
forwardedAs: as
|
|
177
|
+
} : {}),
|
|
178
|
+
ref: ref
|
|
179
|
+
}));
|
|
52
180
|
const Header = Object.assign(HeaderImpl, {
|
|
53
181
|
Item: HeaderItem,
|
|
54
182
|
Link: HeaderLink
|
|
55
183
|
});
|
|
56
184
|
|
|
185
|
+
const Heading = styled(Heading$1).withConfig({
|
|
186
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
187
|
+
}).withConfig({
|
|
188
|
+
displayName: "Heading",
|
|
189
|
+
componentId: "sc-1vc165i-0"
|
|
190
|
+
})(["", ""], sx);
|
|
191
|
+
|
|
192
|
+
const StyledLabel = styled(Label$1).withConfig({
|
|
193
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
194
|
+
}).withConfig({
|
|
195
|
+
displayName: "Label__StyledLabel",
|
|
196
|
+
componentId: "sc-1cpass9-0"
|
|
197
|
+
})(["", ""], sx);
|
|
198
|
+
const Label = /*#__PURE__*/forwardRef(({
|
|
199
|
+
as,
|
|
200
|
+
...props
|
|
201
|
+
}, ref) => {
|
|
202
|
+
return /*#__PURE__*/jsx(StyledLabel, {
|
|
203
|
+
...props,
|
|
204
|
+
...(as ? {
|
|
205
|
+
forwardedAs: as
|
|
206
|
+
} : {}),
|
|
207
|
+
ref: ref
|
|
208
|
+
});
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
const StyledLink = styled(Link$1).withConfig({
|
|
212
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
213
|
+
}).withConfig({
|
|
214
|
+
displayName: "Link__StyledLink",
|
|
215
|
+
componentId: "sc-1syctfj-0"
|
|
216
|
+
})(["", ""], sx);
|
|
217
|
+
const Link = /*#__PURE__*/forwardRef(({
|
|
218
|
+
as,
|
|
219
|
+
...props
|
|
220
|
+
}, ref) => {
|
|
221
|
+
return /*#__PURE__*/jsx(StyledLink, {
|
|
222
|
+
...props,
|
|
223
|
+
...(as ? {
|
|
224
|
+
forwardedAs: as
|
|
225
|
+
} : {}),
|
|
226
|
+
ref: ref
|
|
227
|
+
});
|
|
228
|
+
});
|
|
229
|
+
|
|
57
230
|
const LinkButton = styled(LinkButton$1).withConfig({
|
|
58
231
|
shouldForwardProp: prop => prop !== 'sx'
|
|
59
232
|
}).withConfig({
|
|
@@ -61,6 +234,51 @@ const LinkButton = styled(LinkButton$1).withConfig({
|
|
|
61
234
|
componentId: "sc-1v6zkmg-0"
|
|
62
235
|
})(["", ""], sx);
|
|
63
236
|
|
|
237
|
+
const NavListImpl = /*#__PURE__*/forwardRef(function NavList(props, ref) {
|
|
238
|
+
return /*#__PURE__*/jsx(Box, {
|
|
239
|
+
as: NavList$1,
|
|
240
|
+
ref: ref,
|
|
241
|
+
...props
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
const NavListItem = /*#__PURE__*/forwardRef(function NavListItem(props, ref) {
|
|
245
|
+
// @ts-expect-error - PrimerNavList.Item is not recognized as a valid component type
|
|
246
|
+
return /*#__PURE__*/jsx(Box, {
|
|
247
|
+
as: NavList$1.Item,
|
|
248
|
+
ref: ref,
|
|
249
|
+
...props
|
|
250
|
+
});
|
|
251
|
+
});
|
|
252
|
+
const NavListGroup = /*#__PURE__*/forwardRef(function NavListGroup(props, ref) {
|
|
253
|
+
// @ts-expect-error - PrimerNavList.Group is not recognized as a valid component type
|
|
254
|
+
return /*#__PURE__*/jsx(Box, {
|
|
255
|
+
as: NavList$1.Group,
|
|
256
|
+
ref: ref,
|
|
257
|
+
...props
|
|
258
|
+
});
|
|
259
|
+
});
|
|
260
|
+
const NavList = Object.assign(NavListImpl, {
|
|
261
|
+
// Wrapped components that need sx support added back in
|
|
262
|
+
Item: NavListItem,
|
|
263
|
+
Group: NavListGroup,
|
|
264
|
+
// Re-exporting others directly
|
|
265
|
+
// TODO: try to remove typecasts to work around "non-portable types" TS error
|
|
266
|
+
SubNav: NavList$1.SubNav,
|
|
267
|
+
Divider: NavList$1.Divider,
|
|
268
|
+
LeadingVisual: NavList$1.LeadingVisual,
|
|
269
|
+
TrailingVisual: NavList$1.TrailingVisual,
|
|
270
|
+
TrailingAction: NavList$1.TrailingAction,
|
|
271
|
+
GroupHeading: NavList$1.GroupHeading,
|
|
272
|
+
GroupExpand: NavList$1.GroupExpand
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
const Overlay = styled(Overlay$1).withConfig({
|
|
276
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
277
|
+
}).withConfig({
|
|
278
|
+
displayName: "Overlay",
|
|
279
|
+
componentId: "sc-tjbd74-0"
|
|
280
|
+
})(["", ""], sx);
|
|
281
|
+
|
|
64
282
|
const RadioGroupImpl = props => {
|
|
65
283
|
return /*#__PURE__*/jsx(Box, {
|
|
66
284
|
as: RadioGroup$1,
|
|
@@ -125,12 +343,12 @@ const SegmentedControl = Object.assign(SegmentedControlImpl, {
|
|
|
125
343
|
IconButton: SegmentedControlIconButton
|
|
126
344
|
});
|
|
127
345
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}
|
|
346
|
+
const Spinner = styled(Spinner$1).withConfig({
|
|
347
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
348
|
+
}).withConfig({
|
|
349
|
+
displayName: "Spinner",
|
|
350
|
+
componentId: "sc-jbw2a0-0"
|
|
351
|
+
})(["", ""], sx);
|
|
134
352
|
|
|
135
353
|
const StateLabel = /*#__PURE__*/forwardRef(function StateLabel(props, ref) {
|
|
136
354
|
return /*#__PURE__*/jsx(Box, {
|
|
@@ -158,6 +376,26 @@ const SubNav = Object.assign(SubNavImpl, {
|
|
|
158
376
|
Link: SubNavLink
|
|
159
377
|
});
|
|
160
378
|
|
|
379
|
+
const StyledText = styled(Text$1).withConfig({
|
|
380
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
381
|
+
}).withConfig({
|
|
382
|
+
displayName: "Text__StyledText",
|
|
383
|
+
componentId: "sc-1klmep6-0"
|
|
384
|
+
})(["", ""], sx);
|
|
385
|
+
const Text = /*#__PURE__*/forwardRef(({
|
|
386
|
+
as,
|
|
387
|
+
...props
|
|
388
|
+
}, ref) => {
|
|
389
|
+
return /*#__PURE__*/jsx(StyledText, {
|
|
390
|
+
...props,
|
|
391
|
+
...(as ? {
|
|
392
|
+
forwardedAs: as
|
|
393
|
+
} : {}),
|
|
394
|
+
ref: ref
|
|
395
|
+
});
|
|
396
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
397
|
+
});
|
|
398
|
+
|
|
161
399
|
const TimelineImpl = /*#__PURE__*/forwardRef(function Timeline(props, ref) {
|
|
162
400
|
return /*#__PURE__*/jsx(Box, {
|
|
163
401
|
as: Timeline$1,
|
|
@@ -207,6 +445,25 @@ const ToggleSwitch = /*#__PURE__*/forwardRef(function ToggleSwitch(props, ref) {
|
|
|
207
445
|
});
|
|
208
446
|
});
|
|
209
447
|
|
|
448
|
+
const StyledToken = styled(Token$1).withConfig({
|
|
449
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
450
|
+
}).withConfig({
|
|
451
|
+
displayName: "Token__StyledToken",
|
|
452
|
+
componentId: "sc-ldn0r8-0"
|
|
453
|
+
})(["", ""], sx);
|
|
454
|
+
const Token = /*#__PURE__*/forwardRef(({
|
|
455
|
+
as,
|
|
456
|
+
...props
|
|
457
|
+
}, ref) => {
|
|
458
|
+
return /*#__PURE__*/jsx(StyledToken, {
|
|
459
|
+
...props,
|
|
460
|
+
...(as ? {
|
|
461
|
+
forwardedAs: as
|
|
462
|
+
} : {}),
|
|
463
|
+
ref: ref
|
|
464
|
+
});
|
|
465
|
+
});
|
|
466
|
+
|
|
210
467
|
const Truncate = styled(Truncate$1).withConfig({
|
|
211
468
|
shouldForwardProp: prop => prop !== 'sx'
|
|
212
469
|
}).withConfig({
|
|
@@ -214,21 +471,41 @@ const Truncate = styled(Truncate$1).withConfig({
|
|
|
214
471
|
componentId: "sc-x3i4it-0"
|
|
215
472
|
})(["", ""], sx);
|
|
216
473
|
|
|
217
|
-
const
|
|
474
|
+
const StyledUnderlineNav = /*#__PURE__*/forwardRef(function UnderlineNav(props, ref) {
|
|
218
475
|
return /*#__PURE__*/jsx(Box, {
|
|
219
476
|
as: UnderlineNav$1,
|
|
220
477
|
ref: ref,
|
|
221
478
|
...props
|
|
222
479
|
});
|
|
223
480
|
});
|
|
224
|
-
const
|
|
481
|
+
const UnderlineNavImpl = /*#__PURE__*/forwardRef(({
|
|
482
|
+
as,
|
|
483
|
+
...props
|
|
484
|
+
}, ref) => /*#__PURE__*/jsx(StyledUnderlineNav, {
|
|
485
|
+
...props,
|
|
486
|
+
...(as ? {
|
|
487
|
+
forwardedAs: as
|
|
488
|
+
} : {}),
|
|
489
|
+
ref: ref
|
|
490
|
+
}));
|
|
491
|
+
const StyledUnderlineNavItem = styled(UnderlineNav$1.Item).withConfig({
|
|
225
492
|
shouldForwardProp: prop => prop !== 'sx'
|
|
226
493
|
}).withConfig({
|
|
227
|
-
displayName: "
|
|
494
|
+
displayName: "UnderlineNav__StyledUnderlineNavItem",
|
|
228
495
|
componentId: "sc-dx6br2-0"
|
|
229
496
|
})(["", ""], sx);
|
|
497
|
+
const UnderlineNavItem = /*#__PURE__*/forwardRef(({
|
|
498
|
+
as,
|
|
499
|
+
...props
|
|
500
|
+
}, ref) => /*#__PURE__*/jsx(StyledUnderlineNavItem, {
|
|
501
|
+
...props,
|
|
502
|
+
...(as ? {
|
|
503
|
+
forwardedAs: as
|
|
504
|
+
} : {}),
|
|
505
|
+
ref: ref
|
|
506
|
+
}));
|
|
230
507
|
const UnderlineNav = Object.assign(UnderlineNavImpl, {
|
|
231
508
|
Item: UnderlineNavItem
|
|
232
509
|
});
|
|
233
510
|
|
|
234
|
-
export { Checkbox, CounterLabel, Flash, Header, LinkButton, RadioGroup, RelativeTime, SegmentedControl, Spinner, StateLabel, SubNav, Timeline, ToggleSwitch, Truncate, UnderlineNav };
|
|
511
|
+
export { ActionMenu, Autocomplete, Avatar, Breadcrumb, Breadcrumbs, Checkbox, CheckboxGroup, CircleBadge, CounterLabel, Flash, Header, Heading, Label, Link, LinkButton, NavList, Overlay, RadioGroup, RelativeTime, SegmentedControl, Spinner, StateLabel, SubNav, Text, Timeline, ToggleSwitch, Token, Truncate, UnderlineNav };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/styled-react",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@babel/preset-react": "^7.27.1",
|
|
32
32
|
"@babel/preset-typescript": "^7.27.1",
|
|
33
|
-
"@primer/react": "^38.0.0-rc.
|
|
33
|
+
"@primer/react": "^38.0.0-rc.5",
|
|
34
34
|
"@rollup/plugin-babel": "^6.0.4",
|
|
35
35
|
"@types/react": "18.3.11",
|
|
36
36
|
"@types/react-dom": "18.3.1",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"typescript": "^5.9.2"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@primer/react": "38.0.0-rc.
|
|
49
|
+
"@primer/react": "38.0.0-rc.5",
|
|
50
50
|
"@types/react": "18.x || 19.x",
|
|
51
51
|
"@types/react-dom": "18.x || 19.x",
|
|
52
52
|
"@types/react-is": "18.x || 19.x",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type StateLabelProps as PrimerStateLabelProps } from '@primer/react';
|
|
2
|
-
import { type SxProp } from '../sx';
|
|
3
|
-
export type StateLabelProps = PrimerStateLabelProps & SxProp;
|
|
4
|
-
export declare const StateLabel: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLSpanElement> & {
|
|
5
|
-
variant?: "small" | "normal";
|
|
6
|
-
status: "open" | "issueOpened" | "pullOpened" | "issueClosed" | "issueClosedNotPlanned" | "pullClosed" | "pullMerged" | "draft" | "issueDraft" | "pullQueued" | "unavailable" | "closed";
|
|
7
|
-
} & SxProp & import("react").RefAttributes<HTMLSpanElement>>;
|
|
8
|
-
//# sourceMappingURL=StateLabelProps.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StateLabelProps.d.ts","sourceRoot":"","sources":["../../src/components/StateLabelProps.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,eAAe,IAAI,qBAAqB,EAAC,MAAM,eAAe,CAAA;AAG3G,OAAO,EAAC,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAEjC,MAAM,MAAM,eAAe,GAAG,qBAAqB,GAAG,MAAM,CAAA;AAE5D,eAAO,MAAM,UAAU;;;4DAErB,CAAA"}
|