@primer/styled-react 0.0.0-20251202212638 → 0.0.0-20251202220556

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 (110) hide show
  1. package/dist/_virtual/rolldown_runtime.js +29 -0
  2. package/dist/node_modules/clsx/dist/clsx.js +17 -0
  3. package/dist/node_modules/deepmerge/dist/cjs.js +88 -0
  4. package/dist/node_modules/focus-visible/dist/focus-visible.js +212 -0
  5. package/dist/packages/styled-react/src/components/ActionList.js +107 -0
  6. package/dist/packages/styled-react/src/components/ActionMenu.js +19 -0
  7. package/dist/packages/styled-react/src/components/Autocomplete.js +23 -0
  8. package/dist/packages/styled-react/src/components/Avatar.js +16 -0
  9. package/dist/{components → packages/styled-react/src/components}/BaseStyles.js +29 -47
  10. package/dist/packages/styled-react/src/components/Box.js +23 -0
  11. package/dist/packages/styled-react/src/components/Breadcrumbs.js +28 -0
  12. package/dist/packages/styled-react/src/components/Button.js +48 -0
  13. package/dist/packages/styled-react/src/components/Checkbox.js +17 -0
  14. package/dist/packages/styled-react/src/components/CheckboxGroup.js +41 -0
  15. package/dist/packages/styled-react/src/components/CircleBadge.js +12 -0
  16. package/dist/packages/styled-react/src/components/CounterLabel.js +16 -0
  17. package/dist/packages/styled-react/src/components/DataTable.js +24 -0
  18. package/dist/packages/styled-react/src/components/Dialog.js +64 -0
  19. package/dist/packages/styled-react/src/components/Flash.js +12 -0
  20. package/dist/packages/styled-react/src/components/FormControl.js +19 -0
  21. package/dist/packages/styled-react/src/components/Header.js +44 -0
  22. package/dist/packages/styled-react/src/components/Heading.js +12 -0
  23. package/dist/packages/styled-react/src/components/IconButton.js +27 -0
  24. package/dist/packages/styled-react/src/components/Label.js +21 -0
  25. package/dist/packages/styled-react/src/components/Link.js +21 -0
  26. package/dist/packages/styled-react/src/components/LinkButton.js +12 -0
  27. package/dist/packages/styled-react/src/components/NavList.js +55 -0
  28. package/dist/packages/styled-react/src/components/Overlay.js +12 -0
  29. package/dist/packages/styled-react/src/components/PageHeader.js +71 -0
  30. package/dist/packages/styled-react/src/components/RadioGroup.js +41 -0
  31. package/dist/packages/styled-react/src/components/RelativeTime.js +14 -0
  32. package/dist/packages/styled-react/src/components/SegmentedControl.js +33 -0
  33. package/dist/packages/styled-react/src/components/Select.js +19 -0
  34. package/dist/packages/styled-react/src/components/Spinner.js +12 -0
  35. package/dist/packages/styled-react/src/components/StateLabel.js +16 -0
  36. package/dist/packages/styled-react/src/components/SubNav.js +28 -0
  37. package/dist/packages/styled-react/src/components/Text.js +21 -0
  38. package/dist/packages/styled-react/src/components/TextInput.js +31 -0
  39. package/dist/packages/styled-react/src/components/Textarea.js +21 -0
  40. package/dist/packages/styled-react/src/components/ThemeProvider.js +152 -0
  41. package/dist/packages/styled-react/src/components/Timeline.js +49 -0
  42. package/dist/packages/styled-react/src/components/ToggleSwitch.js +16 -0
  43. package/dist/packages/styled-react/src/components/Token.js +21 -0
  44. package/dist/packages/styled-react/src/components/Tooltip.js +17 -0
  45. package/dist/packages/styled-react/src/components/Truncate.js +12 -0
  46. package/dist/packages/styled-react/src/components/UnderlineNav.js +33 -0
  47. package/dist/packages/styled-react/src/components/UnderlinePanels.js +23 -0
  48. package/dist/packages/styled-react/src/components/deprecated/ActionList.js +44 -0
  49. package/dist/packages/styled-react/src/components/deprecated/DialogV1.js +34 -0
  50. package/dist/packages/styled-react/src/components/deprecated/Octicon.js +32 -0
  51. package/dist/packages/styled-react/src/components/deprecated/TabNav.js +30 -0
  52. package/dist/packages/styled-react/src/components/deprecated/Tooltip.js +24 -0
  53. package/dist/packages/styled-react/src/deprecated.js +7 -0
  54. package/dist/packages/styled-react/src/experimental.js +7 -0
  55. package/dist/packages/styled-react/src/index.js +50 -0
  56. package/dist/packages/styled-react/src/sx.js +11 -0
  57. package/dist/packages/styled-react/src/theme-get.js +10 -0
  58. package/package.json +4 -4
  59. package/dist/components/ActionList.js +0 -163
  60. package/dist/components/ActionMenu.js +0 -19
  61. package/dist/components/Autocomplete.js +0 -25
  62. package/dist/components/Avatar.js +0 -14
  63. package/dist/components/Box.js +0 -15
  64. package/dist/components/Breadcrumbs.js +0 -38
  65. package/dist/components/Button.js +0 -112
  66. package/dist/components/Checkbox.js +0 -15
  67. package/dist/components/CheckboxGroup.js +0 -43
  68. package/dist/components/CircleBadge.js +0 -12
  69. package/dist/components/CounterLabel.js +0 -14
  70. package/dist/components/DataTable.js +0 -32
  71. package/dist/components/Dialog.js +0 -90
  72. package/dist/components/Flash.js +0 -12
  73. package/dist/components/FormControl.js +0 -19
  74. package/dist/components/Header.js +0 -52
  75. package/dist/components/Heading.js +0 -12
  76. package/dist/components/IconButton.js +0 -40
  77. package/dist/components/Label.js +0 -26
  78. package/dist/components/Link.js +0 -26
  79. package/dist/components/LinkButton.js +0 -12
  80. package/dist/components/NavList.js +0 -74
  81. package/dist/components/Overlay.js +0 -12
  82. package/dist/components/PageHeader.js +0 -109
  83. package/dist/components/RadioGroup.js +0 -43
  84. package/dist/components/RelativeTime.js +0 -14
  85. package/dist/components/SegmentedControl.js +0 -31
  86. package/dist/components/Select.js +0 -24
  87. package/dist/components/Spinner.js +0 -12
  88. package/dist/components/StateLabel.js +0 -14
  89. package/dist/components/SubNav.js +0 -26
  90. package/dist/components/Text.js +0 -26
  91. package/dist/components/TextInput.js +0 -38
  92. package/dist/components/Textarea.js +0 -26
  93. package/dist/components/ThemeProvider.js +0 -203
  94. package/dist/components/Timeline.js +0 -47
  95. package/dist/components/ToggleSwitch.js +0 -14
  96. package/dist/components/Token.js +0 -26
  97. package/dist/components/Tooltip.js +0 -15
  98. package/dist/components/Truncate.js +0 -12
  99. package/dist/components/UnderlineNav.js +0 -45
  100. package/dist/components/UnderlinePanels.js +0 -28
  101. package/dist/components/deprecated/ActionList.js +0 -49
  102. package/dist/components/deprecated/DialogV1.js +0 -44
  103. package/dist/components/deprecated/Octicon.js +0 -39
  104. package/dist/components/deprecated/TabNav.js +0 -44
  105. package/dist/components/deprecated/Tooltip.js +0 -32
  106. package/dist/deprecated.js +0 -5
  107. package/dist/experimental.js +0 -5
  108. package/dist/index.js +0 -46
  109. package/dist/sx.js +0 -8
  110. package/dist/theme-get.js +0 -10
@@ -1,26 +0,0 @@
1
- import { Text as Text$1 } from '@primer/react';
2
- import sx from '../sx.js';
3
- import styled from 'styled-components';
4
- import { forwardRef } from 'react';
5
- import { jsx } from 'react/jsx-runtime';
6
-
7
- const StyledText = styled(Text$1).withConfig({
8
- shouldForwardProp: prop => prop !== 'sx'
9
- }).withConfig({
10
- displayName: "Text__StyledText",
11
- componentId: "sc-1klmep6-0"
12
- })(["", ""], sx);
13
- const Text = /*#__PURE__*/forwardRef(({
14
- as,
15
- ...props
16
- }, ref) => {
17
- return /*#__PURE__*/jsx(StyledText, {
18
- ...props,
19
- ...(as ? {
20
- forwardedAs: as
21
- } : {}),
22
- ref: ref
23
- });
24
- });
25
-
26
- export { Text };
@@ -1,38 +0,0 @@
1
- import { TextInput as TextInput$1 } from '@primer/react';
2
- import { forwardRef } from 'react';
3
- import sx from '../sx.js';
4
- import styled from 'styled-components';
5
- import { jsx } from 'react/jsx-runtime';
6
-
7
- const StyledTextInput = styled(TextInput$1).withConfig({
8
- shouldForwardProp: prop => prop !== 'sx'
9
- }).withConfig({
10
- displayName: "TextInput__StyledTextInput",
11
- componentId: "sc-ttxlvl-0"
12
- })(["", ""], sx);
13
- const TextInputImpl = /*#__PURE__*/forwardRef(({
14
- as,
15
- ...props
16
- }, ref) => {
17
- return /*#__PURE__*/jsx(StyledTextInput, {
18
- ref: ref,
19
- ...props,
20
- ...(as ? {
21
- forwardedAs: as
22
- } : {})
23
- });
24
- });
25
- const TextInputAction = styled(TextInput$1.Action).withConfig({
26
- shouldForwardProp: prop => prop !== 'sx'
27
- }).withConfig({
28
- displayName: "TextInput__TextInputAction",
29
- componentId: "sc-ttxlvl-1"
30
- })(["", ""], sx);
31
- const TextInput = Object.assign(TextInputImpl, {
32
- __SLOT__: TextInput$1.__SLOT__,
33
- Action: TextInputAction
34
- });
35
- TextInputAction.displayName = 'TextInputAction';
36
- TextInputImpl.displayName = 'TextInput';
37
-
38
- export { TextInput };
@@ -1,26 +0,0 @@
1
- import { Textarea as Textarea$1 } from '@primer/react';
2
- import styled from 'styled-components';
3
- import sx from '../sx.js';
4
- import { forwardRef } from 'react';
5
- import { jsx } from 'react/jsx-runtime';
6
-
7
- const StyledTextarea = styled(Textarea$1).withConfig({
8
- shouldForwardProp: prop => prop !== 'sx'
9
- }).withConfig({
10
- displayName: "Textarea__StyledTextarea",
11
- componentId: "sc-40d1gp-0"
12
- })(["", ""], sx);
13
- const Textarea = /*#__PURE__*/forwardRef(({
14
- as,
15
- ...props
16
- }, ref) => {
17
- return /*#__PURE__*/jsx(StyledTextarea, {
18
- ...props,
19
- ...(as ? {
20
- forwardedAs: as
21
- } : {}),
22
- ref: ref
23
- });
24
- });
25
-
26
- export { Textarea };
@@ -1,203 +0,0 @@
1
- import React from 'react';
2
- import ReactDOM from 'react-dom';
3
- import { ThemeProvider as ThemeProvider$1 } from 'styled-components';
4
- import { theme, useId, useSyncedState } from '@primer/react';
5
- import deepmerge from 'deepmerge';
6
- import { jsx, jsxs } from 'react/jsx-runtime';
7
-
8
- const defaultColorMode = 'day';
9
- const defaultDayScheme = 'light';
10
- const defaultNightScheme = 'dark';
11
-
12
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
13
-
14
- const ThemeContext = /*#__PURE__*/React.createContext({
15
- setColorMode: () => null,
16
- setDayScheme: () => null,
17
- setNightScheme: () => null
18
- });
19
-
20
- // inspired from __NEXT_DATA__, we use application/json to avoid CSRF policy with inline scripts
21
- const getServerHandoff = id => {
22
- try {
23
- const serverData = document.getElementById(`__PRIMER_DATA_${id}__`)?.textContent;
24
- if (serverData) return JSON.parse(serverData);
25
- } catch (_error) {
26
- // if document/element does not exist or JSON is invalid, supress error
27
- }
28
- return {};
29
- };
30
- const ThemeProvider = ({
31
- children,
32
- ...props
33
- }) => {
34
- // Get fallback values from parent ThemeProvider (if exists)
35
- const {
36
- theme: fallbackTheme,
37
- colorMode: fallbackColorMode,
38
- dayScheme: fallbackDayScheme,
39
- nightScheme: fallbackNightScheme
40
- } = useTheme();
41
-
42
- // Initialize state
43
- const theme$1 = props.theme ?? fallbackTheme ?? theme;
44
- const uniqueDataId = useId();
45
- const {
46
- resolvedServerColorMode
47
- } = getServerHandoff(uniqueDataId);
48
- const resolvedColorModePassthrough = React.useRef(resolvedServerColorMode);
49
- const [colorMode, setColorMode] = useSyncedState(props.colorMode ?? fallbackColorMode ?? defaultColorMode);
50
- const [dayScheme, setDayScheme] = useSyncedState(props.dayScheme ?? fallbackDayScheme ?? defaultDayScheme);
51
- const [nightScheme, setNightScheme] = useSyncedState(props.nightScheme ?? fallbackNightScheme ?? defaultNightScheme);
52
- const systemColorMode = useSystemColorMode();
53
- // eslint-disable-next-line react-hooks/refs
54
- const resolvedColorMode = resolvedColorModePassthrough.current || resolveColorMode(colorMode, systemColorMode);
55
- const colorScheme = chooseColorScheme(resolvedColorMode, dayScheme, nightScheme);
56
- const {
57
- resolvedTheme,
58
- resolvedColorScheme
59
- } = React.useMemo(() => applyColorScheme(theme$1, colorScheme), [theme$1, colorScheme]);
60
-
61
- // this effect will only run on client
62
- React.useEffect(function updateColorModeAfterServerPassthrough() {
63
- const resolvedColorModeOnClient = resolveColorMode(colorMode, systemColorMode);
64
- if (resolvedColorModePassthrough.current) {
65
- // if the resolved color mode passed on from the server is not the resolved color mode on client, change it!
66
- if (resolvedColorModePassthrough.current !== resolvedColorModeOnClient) {
67
- window.setTimeout(() => {
68
- // use ReactDOM.flushSync to prevent automatic batching of state updates since React 18
69
- // ref: https://github.com/reactwg/react-18/discussions/21
70
- ReactDOM.flushSync(() => {
71
- // override colorMode to whatever is resolved on the client to get a re-render
72
- setColorMode(resolvedColorModeOnClient);
73
- });
74
-
75
- // immediately after that, set the colorMode to what the user passed to respond to system color mode changes
76
- setColorMode(colorMode);
77
- });
78
- }
79
- resolvedColorModePassthrough.current = null;
80
- }
81
- }, [colorMode, systemColorMode, setColorMode]);
82
- return /*#__PURE__*/jsx(ThemeContext.Provider, {
83
- value: {
84
- theme: resolvedTheme,
85
- colorScheme,
86
- colorMode,
87
- resolvedColorMode,
88
- resolvedColorScheme,
89
- dayScheme,
90
- nightScheme,
91
- setColorMode,
92
- setDayScheme,
93
- setNightScheme
94
- },
95
- children: /*#__PURE__*/jsxs(ThemeProvider$1, {
96
- theme: resolvedTheme,
97
- children: [children, props.preventSSRMismatch ? /*#__PURE__*/jsx("script", {
98
- type: "application/json",
99
- id: `__PRIMER_DATA_${uniqueDataId}__`,
100
- dangerouslySetInnerHTML: {
101
- __html: JSON.stringify({
102
- resolvedServerColorMode: resolvedColorMode
103
- })
104
- }
105
- }) : null]
106
- })
107
- });
108
- };
109
- function useTheme() {
110
- return React.useContext(ThemeContext);
111
- }
112
- function useColorSchemeVar(values, fallback) {
113
- const {
114
- colorScheme = ''
115
- } = useTheme();
116
- return values[colorScheme] ?? fallback;
117
- }
118
- function useSystemColorMode() {
119
- const [systemColorMode, setSystemColorMode] = React.useState(getSystemColorMode);
120
- React.useEffect(() => {
121
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
122
- const media = window?.matchMedia?.('(prefers-color-scheme: dark)');
123
- function matchesMediaToColorMode(matches) {
124
- return matches ? 'night' : 'day';
125
- }
126
- function handleChange(event) {
127
- const isNight = event.matches;
128
- setSystemColorMode(matchesMediaToColorMode(isNight));
129
- }
130
-
131
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
132
- if (media) {
133
- // just in case the preference changed before the event listener was attached
134
- const isNight = media.matches;
135
- setSystemColorMode(matchesMediaToColorMode(isNight));
136
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
137
- if (media.addEventListener !== undefined) {
138
- media.addEventListener('change', handleChange);
139
- return function cleanup() {
140
- media.removeEventListener('change', handleChange);
141
- };
142
- }
143
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
144
- else if (media.addListener !== undefined) {
145
- media.addListener(handleChange);
146
- return function cleanup() {
147
- media.removeListener(handleChange);
148
- };
149
- }
150
- }
151
- }, []);
152
- return systemColorMode;
153
- }
154
- function getSystemColorMode() {
155
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
156
- if (typeof window !== 'undefined' && window.matchMedia?.('(prefers-color-scheme: dark)')?.matches) {
157
- return 'night';
158
- }
159
- return 'day';
160
- }
161
- function resolveColorMode(colorMode, systemColorMode) {
162
- switch (colorMode) {
163
- case 'auto':
164
- return systemColorMode;
165
- default:
166
- return colorMode;
167
- }
168
- }
169
- function chooseColorScheme(colorMode, dayScheme, nightScheme) {
170
- switch (colorMode) {
171
- case 'day':
172
- case 'light':
173
- return dayScheme;
174
- case 'dark':
175
- case 'night':
176
- return nightScheme;
177
- }
178
- }
179
- function applyColorScheme(theme, colorScheme) {
180
- if (!theme.colorSchemes) {
181
- return {
182
- resolvedTheme: theme,
183
- resolvedColorScheme: undefined
184
- };
185
- }
186
- if (!theme.colorSchemes[colorScheme]) {
187
- // eslint-disable-next-line no-console
188
- console.error(`\`${colorScheme}\` scheme not defined in \`theme.colorSchemes\``);
189
-
190
- // Apply the first defined color scheme
191
- const defaultColorScheme = Object.keys(theme.colorSchemes)[0];
192
- return {
193
- resolvedTheme: deepmerge(theme, theme.colorSchemes[defaultColorScheme]),
194
- resolvedColorScheme: defaultColorScheme
195
- };
196
- }
197
- return {
198
- resolvedTheme: deepmerge(theme, theme.colorSchemes[colorScheme]),
199
- resolvedColorScheme: colorScheme
200
- };
201
- }
202
-
203
- export { ThemeProvider, ThemeProvider as default, defaultColorMode, useColorSchemeVar, useTheme };
@@ -1,47 +0,0 @@
1
- import { Timeline as Timeline$1 } from '@primer/react';
2
- import Box from './Box.js';
3
- import { forwardRef } from 'react';
4
- import { jsx } from 'react/jsx-runtime';
5
-
6
- const TimelineImpl = /*#__PURE__*/forwardRef(function Timeline(props, ref) {
7
- return /*#__PURE__*/jsx(Box, {
8
- as: Timeline$1,
9
- ref: ref,
10
- ...props
11
- });
12
- });
13
- const TimelineItem = /*#__PURE__*/forwardRef(function TimelineItem(props, ref) {
14
- return /*#__PURE__*/jsx(Box, {
15
- as: Timeline$1.Item,
16
- ref: ref,
17
- ...props
18
- });
19
- });
20
- function TimelineBadge(props) {
21
- return /*#__PURE__*/jsx(Box, {
22
- as: Timeline$1.Badge,
23
- ...props
24
- });
25
- }
26
- const TimelineBody = /*#__PURE__*/forwardRef(function TimelineBody(props, ref) {
27
- return /*#__PURE__*/jsx(Box, {
28
- as: Timeline$1.Body,
29
- ref: ref,
30
- ...props
31
- });
32
- });
33
- const TimelineBreak = /*#__PURE__*/forwardRef(function TimelineBreak(props, ref) {
34
- return /*#__PURE__*/jsx(Box, {
35
- as: Timeline$1.Break,
36
- ref: ref,
37
- ...props
38
- });
39
- });
40
- const Timeline = Object.assign(TimelineImpl, {
41
- Item: TimelineItem,
42
- Badge: TimelineBadge,
43
- Body: TimelineBody,
44
- Break: TimelineBreak
45
- });
46
-
47
- export { Timeline };
@@ -1,14 +0,0 @@
1
- import { ToggleSwitch as ToggleSwitch$1 } from '@primer/react';
2
- import { forwardRef } from 'react';
3
- import Box from './Box.js';
4
- import { jsx } from 'react/jsx-runtime';
5
-
6
- const ToggleSwitch = /*#__PURE__*/forwardRef(function ToggleSwitch(props, ref) {
7
- return /*#__PURE__*/jsx(Box, {
8
- as: ToggleSwitch$1,
9
- ref: ref,
10
- ...props
11
- });
12
- });
13
-
14
- export { ToggleSwitch };
@@ -1,26 +0,0 @@
1
- import { forwardRef } from 'react';
2
- import { Token as Token$1 } from '@primer/react';
3
- import sx from '../sx.js';
4
- import styled from 'styled-components';
5
- import { jsx } from 'react/jsx-runtime';
6
-
7
- const StyledToken = styled(Token$1).withConfig({
8
- shouldForwardProp: prop => prop !== 'sx'
9
- }).withConfig({
10
- displayName: "Token__StyledToken",
11
- componentId: "sc-ldn0r8-0"
12
- })(["", ""], sx);
13
- const Token = /*#__PURE__*/forwardRef(({
14
- as,
15
- ...props
16
- }, ref) => {
17
- return /*#__PURE__*/jsx(StyledToken, {
18
- ...props,
19
- ...(as ? {
20
- forwardedAs: as
21
- } : {}),
22
- ref: ref
23
- });
24
- });
25
-
26
- export { Token };
@@ -1,15 +0,0 @@
1
- import { Tooltip as Tooltip$1 } from '@primer/react';
2
- import Box from './Box.js';
3
- import { forwardRef } from 'react';
4
- import { jsx } from 'react/jsx-runtime';
5
-
6
- const Tooltip = /*#__PURE__*/forwardRef(function Tooltip(props, ref) {
7
- return /*#__PURE__*/jsx(Box, {
8
- as: Tooltip$1,
9
- ref: ref,
10
- ...props
11
- });
12
- });
13
- Tooltip.__SLOT__ = Tooltip$1.__SLOT__;
14
-
15
- export { Tooltip };
@@ -1,12 +0,0 @@
1
- import { Truncate as Truncate$1 } from '@primer/react';
2
- import sx from '../sx.js';
3
- import styled from 'styled-components';
4
-
5
- const Truncate = styled(Truncate$1).withConfig({
6
- shouldForwardProp: prop => prop !== 'sx'
7
- }).withConfig({
8
- displayName: "Truncate",
9
- componentId: "sc-x3i4it-0"
10
- })(["", ""], sx);
11
-
12
- export { Truncate };
@@ -1,45 +0,0 @@
1
- import { UnderlineNav as UnderlineNav$1 } from '@primer/react';
2
- import Box from './Box.js';
3
- import { forwardRef } from 'react';
4
- import styled from 'styled-components';
5
- import sx from '../sx.js';
6
- import { jsx } from 'react/jsx-runtime';
7
-
8
- const StyledUnderlineNav = /*#__PURE__*/forwardRef(function UnderlineNav(props, ref) {
9
- return /*#__PURE__*/jsx(Box, {
10
- as: UnderlineNav$1,
11
- ref: ref,
12
- ...props
13
- });
14
- });
15
- const UnderlineNavImpl = /*#__PURE__*/forwardRef(({
16
- as,
17
- ...props
18
- }, ref) => /*#__PURE__*/jsx(StyledUnderlineNav, {
19
- ...props,
20
- ...(as ? {
21
- forwardedAs: as
22
- } : {}),
23
- ref: ref
24
- }));
25
- const StyledUnderlineNavItem = styled(UnderlineNav$1.Item).withConfig({
26
- shouldForwardProp: prop => prop !== 'sx'
27
- }).withConfig({
28
- displayName: "UnderlineNav__StyledUnderlineNavItem",
29
- componentId: "sc-dx6br2-0"
30
- })(["", ""], sx);
31
- const UnderlineNavItem = /*#__PURE__*/forwardRef(({
32
- as,
33
- ...props
34
- }, ref) => /*#__PURE__*/jsx(StyledUnderlineNavItem, {
35
- ...props,
36
- ...(as ? {
37
- forwardedAs: as
38
- } : {}),
39
- ref: ref
40
- }));
41
- const UnderlineNav = Object.assign(UnderlineNavImpl, {
42
- Item: UnderlineNavItem
43
- });
44
-
45
- export { UnderlineNav, UnderlineNavImpl, UnderlineNavItem };
@@ -1,28 +0,0 @@
1
- import { UnderlinePanels as UnderlinePanels$1 } from '@primer/react/experimental';
2
- import styled from 'styled-components';
3
- import sx from '../sx.js';
4
- import { jsx } from 'react/jsx-runtime';
5
-
6
- const StyledUnderlinePanels = styled(UnderlinePanels$1).withConfig({
7
- shouldForwardProp: prop => prop !== 'sx'
8
- }).withConfig({
9
- displayName: "UnderlinePanels__StyledUnderlinePanels",
10
- componentId: "sc-1w35i85-0"
11
- })(["", ""], sx);
12
-
13
- // @ts-ignore forwardedAs is valid here but I don't know how to fix the typescript error
14
- const UnderlinePanelsImpl = ({
15
- as,
16
- ...props
17
- }) => /*#__PURE__*/jsx(StyledUnderlinePanels, {
18
- forwardedAs: as,
19
- ...props
20
- });
21
- UnderlinePanelsImpl.displayName = 'UnderlinePanels';
22
- const UnderlinePanels = Object.assign(UnderlinePanelsImpl, {
23
- Tab: UnderlinePanels$1.Tab,
24
- Panel: UnderlinePanels$1.Panel
25
- });
26
- UnderlinePanelsImpl.__SLOT__ = UnderlinePanels$1.__SLOT__;
27
-
28
- export { UnderlinePanels };
@@ -1,49 +0,0 @@
1
- import { forwardRef } from 'react';
2
- import { ActionList as ActionList$1 } from '@primer/react/deprecated';
3
- import sx from '../../sx.js';
4
- import Box from '../Box.js';
5
- import styled from 'styled-components';
6
- import { jsx } from 'react/jsx-runtime';
7
-
8
- const ActionListImpl = /*#__PURE__*/forwardRef(function ActionList(props, ref) {
9
- return /*#__PURE__*/jsx(Box, {
10
- as: ActionList$1,
11
- ref: ref,
12
- ...props
13
- });
14
- });
15
- const StyledActionListItem = styled(ActionList$1.Item).withConfig({
16
- shouldForwardProp: prop => prop !== 'sx'
17
- }).withConfig({
18
- displayName: "ActionList__StyledActionListItem",
19
- componentId: "sc-1ugfmds-0"
20
- })(["", ""], sx);
21
- const ActionListItem = /*#__PURE__*/forwardRef(({
22
- as,
23
- ...props
24
- }, ref) => /*#__PURE__*/jsx(StyledActionListItem, {
25
- ...props,
26
- ...(as ? {
27
- forwardedAs: as
28
- } : {}),
29
- ref: ref
30
- }));
31
- function ActionListGroup(props) {
32
- return /*#__PURE__*/jsx(Box, {
33
- as: ActionList$1.Group,
34
- ...props
35
- });
36
- }
37
- function ActionListDivider(props) {
38
- return /*#__PURE__*/jsx(Box, {
39
- as: ActionList$1.Divider,
40
- ...props
41
- });
42
- }
43
- const ActionList = Object.assign(ActionListImpl, {
44
- Item: ActionListItem,
45
- Group: ActionListGroup,
46
- Divider: ActionListDivider
47
- });
48
-
49
- export { ActionList };
@@ -1,44 +0,0 @@
1
- import { Dialog as Dialog$1 } from '@primer/react/deprecated';
2
- import Box from '../Box.js';
3
- import { forwardRef } from 'react';
4
- import { jsx } from 'react/jsx-runtime';
5
-
6
- const StyledDialog = /*#__PURE__*/forwardRef(function Dialog(props, ref) {
7
- return /*#__PURE__*/jsx(Box, {
8
- as: Dialog$1,
9
- ref: ref,
10
- ...props
11
- });
12
- });
13
- const DialogImpl = /*#__PURE__*/forwardRef(({
14
- as,
15
- ...props
16
- }, ref) => /*#__PURE__*/jsx(StyledDialog, {
17
- ...props,
18
- ...(as ? {
19
- forwardedAs: as
20
- } : {}),
21
- ref: ref
22
- }));
23
- const StyledDialogHeader = /*#__PURE__*/forwardRef(function DialogHeader(props, ref) {
24
- return /*#__PURE__*/jsx(Box, {
25
- as: Dialog$1.Header,
26
- ref: ref,
27
- ...props
28
- });
29
- });
30
- const DialogHeader = /*#__PURE__*/forwardRef(({
31
- as,
32
- ...props
33
- }, ref) => /*#__PURE__*/jsx(StyledDialogHeader, {
34
- ...props,
35
- ...(as ? {
36
- forwardedAs: as
37
- } : {}),
38
- ref: ref
39
- }));
40
- const Dialog = Object.assign(DialogImpl, {
41
- Header: DialogHeader
42
- });
43
-
44
- export { Dialog };
@@ -1,39 +0,0 @@
1
- import { Octicon as Octicon$1 } from '@primer/react/deprecated';
2
- import styled from 'styled-components';
3
- import sx from '../../sx.js';
4
- import { forwardRef } from 'react';
5
- import { jsx } from 'react/jsx-runtime';
6
-
7
- /**
8
- * @deprecated Use the icon component directly from `@primer/octicons-react` instead
9
- */
10
- const StyledOcticon = styled(Octicon$1).withConfig({
11
- shouldForwardProp(prop) {
12
- return prop !== 'sx';
13
- }
14
- }).withConfig({
15
- displayName: "Octicon__StyledOcticon",
16
- componentId: "sc-jtj3m8-0"
17
- })(["", ""], ({
18
- color,
19
- sx: sxProp
20
- }) => sx({
21
- sx: {
22
- color,
23
- ...sxProp
24
- }
25
- }));
26
- const Octicon = /*#__PURE__*/forwardRef(({
27
- as,
28
- ...props
29
- }, ref) => {
30
- return /*#__PURE__*/jsx(StyledOcticon, {
31
- ...props,
32
- ...(as ? {
33
- forwardedAs: as
34
- } : {}),
35
- ref: ref
36
- });
37
- });
38
-
39
- export { Octicon, Octicon as default };
@@ -1,44 +0,0 @@
1
- import { TabNav as TabNav$1 } from '@primer/react/deprecated';
2
- import sx from '../../sx.js';
3
- import styled from 'styled-components';
4
- import { forwardRef } from 'react';
5
- import { jsx } from 'react/jsx-runtime';
6
-
7
- const StyledTabNav = styled(TabNav$1).withConfig({
8
- shouldForwardProp: prop => prop !== 'sx'
9
- }).withConfig({
10
- displayName: "TabNav__StyledTabNav",
11
- componentId: "sc-13kad3t-0"
12
- })(["", ""], sx);
13
- const TabNavImpl = ({
14
- as,
15
- ...props
16
- }) => {
17
- return /*#__PURE__*/jsx(StyledTabNav, {
18
- ...props,
19
- ...(as ? {
20
- forwardedAs: as
21
- } : {})
22
- });
23
- };
24
- const StyledTabNavLink = styled(TabNav$1.Link).withConfig({
25
- shouldForwardProp: prop => prop !== 'sx'
26
- }).withConfig({
27
- displayName: "TabNav__StyledTabNavLink",
28
- componentId: "sc-13kad3t-1"
29
- })(["", ""], sx);
30
- const TabNavLink = /*#__PURE__*/forwardRef(({
31
- as,
32
- ...props
33
- }, ref) => /*#__PURE__*/jsx(StyledTabNavLink, {
34
- ...props,
35
- ...(as ? {
36
- forwardedAs: as
37
- } : {}),
38
- ref: ref
39
- }));
40
- const TabNav = Object.assign(TabNavImpl, {
41
- Link: TabNavLink
42
- });
43
-
44
- export { TabNav };