@primer/styled-react 1.0.7-rc.fa8383854 → 1.0.8-rc.2a752ecd6
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/components/BaseStyles.d.ts.map +1 -1
- package/dist/components/BaseStyles.js +1 -1
- package/dist/components/FeatureFlaggedTheming.d.ts +12 -0
- package/dist/components/FeatureFlaggedTheming.d.ts.map +1 -0
- package/dist/components/FeatureFlaggedTheming.js +45 -0
- package/dist/components.json +0 -13
- package/dist/deprecated.d.ts +0 -16
- package/dist/deprecated.d.ts.map +1 -1
- package/dist/deprecated.js +0 -1
- package/dist/index.d.ts +2 -56
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -6
- package/package.json +3 -3
- package/dist/components/FormControl.d.ts +0 -13
- package/dist/components/FormControl.d.ts.map +0 -1
- package/dist/components/FormControl.js +0 -19
- package/dist/components/Header.d.ts +0 -11
- package/dist/components/Header.d.ts.map +0 -1
- package/dist/components/Header.js +0 -52
- package/dist/components/LinkButton.d.ts +0 -8
- package/dist/components/LinkButton.d.ts.map +0 -1
- package/dist/components/LinkButton.js +0 -12
- package/dist/components/SegmentedControl.d.ts +0 -19
- package/dist/components/SegmentedControl.d.ts.map +0 -1
- package/dist/components/SegmentedControl.js +0 -31
- package/dist/components/deprecated/TabNav.d.ts +0 -9
- package/dist/components/deprecated/TabNav.d.ts.map +0 -1
- package/dist/components/deprecated/TabNav.js +0 -44
|
@@ -1 +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,EAAE,KAAK,GAAG,EAAC,MAAM,OAAO,CAAA;AAG1E,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;
|
|
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,EAAE,KAAK,GAAG,EAAC,MAAM,OAAO,CAAA;AAG1E,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;AA8ED,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,eA+BjB"}
|
|
@@ -4,7 +4,7 @@ import 'focus-visible';
|
|
|
4
4
|
import { createGlobalStyle } from 'styled-components';
|
|
5
5
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
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))
|
|
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));: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
8
|
function BaseStyles({
|
|
9
9
|
children,
|
|
10
10
|
color,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { useTheme as primerUseTheme } from '@primer/react';
|
|
3
|
+
import { useColorSchemeVar } from './ThemeProvider';
|
|
4
|
+
import type { ThemeProviderProps as StyledThemeProviderProps } from './ThemeProvider';
|
|
5
|
+
import type { BaseStylesProps as StyledBaseStylesProps } from './BaseStyles';
|
|
6
|
+
export type ThemeProviderProps = StyledThemeProviderProps;
|
|
7
|
+
export type BaseStylesProps = StyledBaseStylesProps;
|
|
8
|
+
export declare const ThemeProvider: React.FC<React.PropsWithChildren<ThemeProviderProps>>;
|
|
9
|
+
export declare function useTheme(): ReturnType<typeof primerUseTheme>;
|
|
10
|
+
export { useColorSchemeVar };
|
|
11
|
+
export declare function BaseStyles(props: BaseStylesProps): React.JSX.Element;
|
|
12
|
+
//# sourceMappingURL=FeatureFlaggedTheming.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FeatureFlaggedTheming.d.ts","sourceRoot":"","sources":["../../src/components/FeatureFlaggedTheming.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAEL,QAAQ,IAAI,cAAc,EAE3B,MAAM,eAAe,CAAA;AAMtB,OAAO,EAAmE,iBAAiB,EAAC,MAAM,iBAAiB,CAAA;AACnH,OAAO,KAAK,EAAC,kBAAkB,IAAI,wBAAwB,EAAC,MAAM,iBAAiB,CAAA;AAEnF,OAAO,KAAK,EAAC,eAAe,IAAI,qBAAqB,EAAC,MAAM,cAAc,CAAA;AAE1E,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,CAAA;AAEzD,MAAM,MAAM,eAAe,GAAG,qBAAqB,CAAA;AAEnD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CAM/E,CAAA;AAED,wBAAgB,QAAQ,IAAI,UAAU,CAAC,OAAO,cAAc,CAAC,CAQ5D;AAED,OAAO,EAAC,iBAAiB,EAAC,CAAA;AAE1B,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,qBAMhD"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { BaseStyles as BaseStyles$1, ThemeProvider as ThemeProvider$1, useTheme as useTheme$2 } from '@primer/react';
|
|
2
|
+
import { useFeatureFlag } from '@primer/react/experimental';
|
|
3
|
+
import { ThemeProvider as ThemeProvider$2, useTheme as useTheme$1 } from './ThemeProvider.js';
|
|
4
|
+
export { useColorSchemeVar } from './ThemeProvider.js';
|
|
5
|
+
import { BaseStyles as BaseStyles$2 } from './BaseStyles.js';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
const ThemeProvider = ({
|
|
9
|
+
children,
|
|
10
|
+
...props
|
|
11
|
+
}) => {
|
|
12
|
+
const enabled = useFeatureFlag('primer_react_styled_react_use_primer_theme_providers');
|
|
13
|
+
if (enabled) {
|
|
14
|
+
return /*#__PURE__*/jsx(ThemeProvider$1, {
|
|
15
|
+
...props,
|
|
16
|
+
children: children
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return /*#__PURE__*/jsx(ThemeProvider$2, {
|
|
20
|
+
...props,
|
|
21
|
+
children: children
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
function useTheme() {
|
|
25
|
+
const enabled = useFeatureFlag('primer_react_styled_react_use_primer_theme_providers');
|
|
26
|
+
const styledTheme = useTheme$1();
|
|
27
|
+
const primerTheme = useTheme$2();
|
|
28
|
+
if (enabled) {
|
|
29
|
+
return primerTheme;
|
|
30
|
+
}
|
|
31
|
+
return styledTheme;
|
|
32
|
+
}
|
|
33
|
+
function BaseStyles(props) {
|
|
34
|
+
const enabled = useFeatureFlag('primer_react_styled_react_use_primer_theme_providers');
|
|
35
|
+
if (enabled) {
|
|
36
|
+
return /*#__PURE__*/jsx(BaseStyles$1, {
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
return /*#__PURE__*/jsx(BaseStyles$2, {
|
|
41
|
+
...props
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { BaseStyles, ThemeProvider, useTheme };
|
package/dist/components.json
CHANGED
|
@@ -6,17 +6,12 @@
|
|
|
6
6
|
"Button",
|
|
7
7
|
"Dialog",
|
|
8
8
|
"Flash",
|
|
9
|
-
"FormControl",
|
|
10
|
-
"Header",
|
|
11
9
|
"Heading",
|
|
12
10
|
"IconButton",
|
|
13
11
|
"Label",
|
|
14
12
|
"Link",
|
|
15
|
-
"LinkButton",
|
|
16
13
|
"Octicon",
|
|
17
|
-
"SegmentedControl",
|
|
18
14
|
"Spinner",
|
|
19
|
-
"TabNav",
|
|
20
15
|
"Text",
|
|
21
16
|
"TextInput",
|
|
22
17
|
"ThemeProvider",
|
|
@@ -38,20 +33,12 @@
|
|
|
38
33
|
"ButtonProps",
|
|
39
34
|
"DialogHeaderProps",
|
|
40
35
|
"DialogProps",
|
|
41
|
-
"FormControlProps",
|
|
42
|
-
"HeaderProps",
|
|
43
36
|
"IconButtonProps",
|
|
44
37
|
"LabelProps",
|
|
45
|
-
"LinkButtonProps",
|
|
46
38
|
"LinkProps",
|
|
47
39
|
"OcticonProps",
|
|
48
|
-
"SegmentedControlButtonProps",
|
|
49
|
-
"SegmentedControlIconButtonProps",
|
|
50
|
-
"SegmentedControlProps",
|
|
51
40
|
"SpinnerProps",
|
|
52
41
|
"SxProp",
|
|
53
|
-
"TabNavLinkProps",
|
|
54
|
-
"TabNavProps",
|
|
55
42
|
"TextInputActionProps",
|
|
56
43
|
"TextInputProps",
|
|
57
44
|
"TextProps",
|
package/dist/deprecated.d.ts
CHANGED
|
@@ -1,20 +1,4 @@
|
|
|
1
1
|
export {
|
|
2
|
-
/**
|
|
3
|
-
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
4
|
-
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
|
5
|
-
*/
|
|
6
|
-
TabNav,
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
9
|
-
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
|
10
|
-
*/
|
|
11
|
-
type TabNavProps,
|
|
12
|
-
/**
|
|
13
|
-
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
14
|
-
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
|
15
|
-
*/
|
|
16
|
-
type TabNavLinkProps, } from './components/deprecated/TabNav';
|
|
17
|
-
export {
|
|
18
2
|
/**
|
|
19
3
|
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
20
4
|
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
package/dist/deprecated.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deprecated.d.ts","sourceRoot":"","sources":["../src/deprecated.tsx"],"names":[],"mappings":"AAAA,OAAO;AACL;;;GAGG;AACH,MAAM;AAEN;;;GAGG;AACH,KAAK,WAAW;AAEhB;;;GAGG;AACH,KAAK,
|
|
1
|
+
{"version":3,"file":"deprecated.d.ts","sourceRoot":"","sources":["../src/deprecated.tsx"],"names":[],"mappings":"AAAA,OAAO;AACL;;;GAGG;AACH,MAAM;AAEN;;;GAGG;AACH,KAAK,WAAW;AAEhB;;;GAGG;AACH,KAAK,iBAAiB,GACvB,MAAM,kCAAkC,CAAA;AAEzC,OAAO;AACL;;;GAGG;AACH,OAAO;AAEP;;;GAGG;AACH,KAAK,YAAY,GAClB,MAAM,iCAAiC,CAAA;AAExC,OAAO;AACL;;;GAGG;AACH,UAAU;AAEV;;;GAGG;AACH,KAAK,eAAe;AAEpB;;;GAGG;AACH,KAAK,mBAAmB;AAExB;;;GAGG;AACH,KAAK,oBAAoB,GAC1B,MAAM,oCAAoC,CAAA"}
|
package/dist/deprecated.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ useColorSchemeVar,
|
|
|
29
29
|
* @deprecated Theming in JavaScript is no longer supported. Prefer using
|
|
30
30
|
* `@primer/primitives` and CSS Modules instead.
|
|
31
31
|
*/
|
|
32
|
-
type ThemeProviderProps, } from './components/
|
|
32
|
+
type ThemeProviderProps, } from './components/FeatureFlaggedTheming';
|
|
33
33
|
export {
|
|
34
34
|
/**
|
|
35
35
|
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
@@ -40,7 +40,7 @@ BaseStyles,
|
|
|
40
40
|
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
41
41
|
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
|
42
42
|
*/
|
|
43
|
-
type BaseStylesProps, } from './components/
|
|
43
|
+
type BaseStylesProps, } from './components/FeatureFlaggedTheming';
|
|
44
44
|
export {
|
|
45
45
|
/**
|
|
46
46
|
* @deprecated Theming in JavaScript is no longer supported. Prefer using
|
|
@@ -128,28 +128,6 @@ export {
|
|
|
128
128
|
*/
|
|
129
129
|
Flash, } from './components/Flash';
|
|
130
130
|
export {
|
|
131
|
-
/**
|
|
132
|
-
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
133
|
-
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
|
134
|
-
*/
|
|
135
|
-
FormControl,
|
|
136
|
-
/**
|
|
137
|
-
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
138
|
-
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
|
139
|
-
*/
|
|
140
|
-
type FormControlProps, } from './components/FormControl';
|
|
141
|
-
export {
|
|
142
|
-
/**
|
|
143
|
-
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
144
|
-
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
|
145
|
-
*/
|
|
146
|
-
Header,
|
|
147
|
-
/**
|
|
148
|
-
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
149
|
-
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
|
150
|
-
*/
|
|
151
|
-
type HeaderProps, } from './components/Header';
|
|
152
|
-
export {
|
|
153
131
|
/**
|
|
154
132
|
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
155
133
|
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
|
@@ -189,38 +167,6 @@ Link,
|
|
|
189
167
|
*/
|
|
190
168
|
type LinkProps, } from './components/Link';
|
|
191
169
|
export {
|
|
192
|
-
/**
|
|
193
|
-
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
194
|
-
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
|
195
|
-
*/
|
|
196
|
-
LinkButton,
|
|
197
|
-
/**
|
|
198
|
-
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
199
|
-
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
|
200
|
-
*/
|
|
201
|
-
type LinkButtonProps, } from './components/LinkButton';
|
|
202
|
-
export {
|
|
203
|
-
/**
|
|
204
|
-
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
205
|
-
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
|
206
|
-
*/
|
|
207
|
-
SegmentedControl,
|
|
208
|
-
/**
|
|
209
|
-
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
210
|
-
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
|
211
|
-
*/
|
|
212
|
-
type SegmentedControlProps,
|
|
213
|
-
/**
|
|
214
|
-
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
215
|
-
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
|
216
|
-
*/
|
|
217
|
-
type SegmentedControlButtonProps,
|
|
218
|
-
/**
|
|
219
|
-
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
220
|
-
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
|
221
|
-
*/
|
|
222
|
-
type SegmentedControlIconButtonProps, } from './components/SegmentedControl';
|
|
223
|
-
export {
|
|
224
170
|
/**
|
|
225
171
|
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
226
172
|
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAEA,OAAO;AACL;;;GAGG;AACH,GAAG;AAEH;;;GAGG;AACH,KAAK,QAAQ,GACd,MAAM,kBAAkB,CAAA;AAGzB,OAAO;AACL;;;GAGG;AACH,aAAa;AAEb;;;GAGG;AACH,QAAQ;AAER;;;GAGG;AACH,iBAAiB;AAEjB;;;GAGG;AACH,KAAK,kBAAkB,GACxB,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAEA,OAAO;AACL;;;GAGG;AACH,GAAG;AAEH;;;GAGG;AACH,KAAK,QAAQ,GACd,MAAM,kBAAkB,CAAA;AAGzB,OAAO;AACL;;;GAGG;AACH,aAAa;AAEb;;;GAGG;AACH,QAAQ;AAER;;;GAGG;AACH,iBAAiB;AAEjB;;;GAGG;AACH,KAAK,kBAAkB,GACxB,MAAM,oCAAoC,CAAA;AAE3C,OAAO;AACL;;;GAGG;AACH,UAAU;AAEV;;;GAGG;AACH,KAAK,eAAe,GACrB,MAAM,oCAAoC,CAAA;AAE3C,OAAO;AACL;;;GAGG;AACH,KAAK,GACN,MAAM,eAAe,CAAA;AAEtB,OAAO;AACL;;;GAGG;AACH,GAAG,IAAI,QAAQ,GAChB,MAAM,aAAa,CAAA;AAEpB,OAAO;AACL;;;GAGG;AACH,UAAU;AAEV;;;GAGG;AACH,KAAK,eAAe;AAEpB;;;GAGG;AACH,KAAK,mBAAmB;AAExB;;;GAGG;AACH,KAAK,uBAAuB;AAE5B;;;GAGG;AACH,KAAK,oBAAoB;AAEzB;;;GAGG;AACH,KAAK,sBAAsB;AAE3B;;;GAGG;AACH,KAAK,4BAA4B;AAEjC;;;GAGG;AACH,KAAK,6BAA6B;AAElC;;;GAGG;AACH,KAAK,6BAA6B,GACnC,MAAM,yBAAyB,CAAA;AAEhC,OAAO;AACL;;;GAGG;AACH,eAAe,IAAI,MAAM;AAEzB;;;GAGG;AACH,KAAK,oBAAoB,IAAI,WAAW,GACzC,MAAM,qBAAqB,CAAA;AAE5B,OAAO;AACL;;;GAGG;AACH,MAAM;AAEN;;;GAGG;AACH,KAAK,WAAW,GACjB,MAAM,qBAAqB,CAAA;AAE5B,OAAO;AACL;;;GAGG;AACH,KAAK,GACN,MAAM,oBAAoB,CAAA;AAE3B,OAAO;AACL;;;GAGG;AACH,OAAO,GACR,MAAM,sBAAsB,CAAA;AAE7B,OAAO;AACL;;;GAGG;AACH,UAAU;AAEV;;;GAGG;AACH,KAAK,eAAe,GACrB,MAAM,yBAAyB,CAAA;AAEhC,OAAO;AACL;;;GAGG;AACH,KAAK;AAEL;;;GAGG;AACH,KAAK,UAAU,GAChB,MAAM,oBAAoB,CAAA;AAE3B,OAAO;AACL;;;GAGG;AACH,IAAI;AAEJ;;;GAGG;AACH,KAAK,SAAS,GACf,MAAM,mBAAmB,CAAA;AAE1B,OAAO;AACL;;;GAGG;AACH,OAAO;AAEP;;;GAGG;AACH,KAAK,YAAY,GAClB,MAAM,sBAAsB,CAAA;AAE7B,OAAO;AACL;;;GAGG;AACH,IAAI;AAEJ;;;GAGG;AACH,KAAK,SAAS,GACf,MAAM,mBAAmB,CAAA;AAE1B,OAAO;AACL;;;GAGG;AACH,SAAS;AAET;;;GAGG;AACH,KAAK,cAAc;AAEnB;;;GAGG;AACH,KAAK,oBAAoB,GAC1B,MAAM,wBAAwB,CAAA;AAE/B,OAAO;AACL;;;GAGG;AACH,YAAY;AAEZ;;;GAGG;AACH,KAAK,iBAAiB,GACvB,MAAM,2BAA2B,CAAA;AAElC,OAAO;AACL;;;GAGG;AACH,YAAY;AAEZ;;;GAGG;AACH,KAAK,iBAAiB;AAEtB;;;GAGG;AACH,KAAK,qBAAqB,GAC3B,MAAM,2BAA2B,CAAA;AAElC,OAAO;AACL;;;GAGG;AACH,KAAK;AAEL;;;GAGG;AACH,EAAE;AAEF;;;GAGG;AACH,KAAK,MAAM,GACZ,MAAM,MAAM,CAAA;AAEb,OAAO;AACL;;;GAGG;AACH,KAAK,uBAAuB,GAC7B,MAAM,MAAM,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
export { Box } from './components/Box.js';
|
|
3
|
-
export {
|
|
4
|
-
export { BaseStyles } from './components/BaseStyles.js';
|
|
3
|
+
export { BaseStyles, ThemeProvider, useTheme } from './components/FeatureFlaggedTheming.js';
|
|
5
4
|
export { theme } from '@primer/react';
|
|
6
5
|
export { get as themeGet } from './theme-get.js';
|
|
7
6
|
export { ActionList } from './components/ActionList.js';
|
|
8
7
|
export { ButtonComponent as Button } from './components/Button.js';
|
|
9
8
|
export { Dialog } from './components/Dialog.js';
|
|
10
9
|
export { Flash } from './components/Flash.js';
|
|
11
|
-
export { FormControl } from './components/FormControl.js';
|
|
12
|
-
export { Header } from './components/Header.js';
|
|
13
10
|
export { Heading } from './components/Heading.js';
|
|
14
11
|
export { IconButton } from './components/IconButton.js';
|
|
15
12
|
export { Label } from './components/Label.js';
|
|
16
13
|
export { Link } from './components/Link.js';
|
|
17
|
-
export { LinkButton } from './components/LinkButton.js';
|
|
18
|
-
export { SegmentedControl } from './components/SegmentedControl.js';
|
|
19
14
|
export { Spinner } from './components/Spinner.js';
|
|
20
15
|
export { Text } from './components/Text.js';
|
|
21
16
|
export { TextInput } from './components/TextInput.js';
|
|
@@ -23,3 +18,4 @@ export { ToggleSwitch } from './components/ToggleSwitch.js';
|
|
|
23
18
|
export { UnderlineNav } from './components/UnderlineNav.js';
|
|
24
19
|
export { sx } from './sx.js';
|
|
25
20
|
export { default as merge } from 'deepmerge';
|
|
21
|
+
export { useColorSchemeVar } from './components/ThemeProvider.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/styled-react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8-rc.2a752ecd6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@babel/preset-react": "^7.28.5",
|
|
50
50
|
"@babel/preset-typescript": "^7.28.5",
|
|
51
51
|
"@primer/primitives": "10.x || 11.x",
|
|
52
|
-
"@primer/react": "^38.22.
|
|
52
|
+
"@primer/react": "^38.22.1",
|
|
53
53
|
"@rollup/plugin-babel": "^6.1.0",
|
|
54
54
|
"@storybook/react-vite": "^10.3.3",
|
|
55
55
|
"@types/react": "18.3.11",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"rollup": "4.59.0",
|
|
68
68
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
69
69
|
"styled-components": "5.3.11",
|
|
70
|
-
"typescript": "^
|
|
70
|
+
"typescript": "^6.0.3"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"@primer/react": "*",
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FormControl as PrimerFormControl, type FormControlProps as PrimerFormControlProps } from '@primer/react';
|
|
2
|
-
import { type PropsWithChildren } from 'react';
|
|
3
|
-
import { type SxProp } from '../sx';
|
|
4
|
-
type FormControlProps = PropsWithChildren<PrimerFormControlProps> & SxProp;
|
|
5
|
-
declare const FormControlImpl: React.ComponentType<FormControlProps>;
|
|
6
|
-
declare const FormControl: typeof FormControlImpl & {
|
|
7
|
-
Caption: typeof PrimerFormControl.Caption;
|
|
8
|
-
LeadingVisual: typeof PrimerFormControl.LeadingVisual;
|
|
9
|
-
Validation: typeof PrimerFormControl.Validation;
|
|
10
|
-
Label: typeof PrimerFormControl.Label;
|
|
11
|
-
};
|
|
12
|
-
export { FormControl, type FormControlProps };
|
|
13
|
-
//# sourceMappingURL=FormControl.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FormControl.d.ts","sourceRoot":"","sources":["../../src/components/FormControl.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,IAAI,iBAAiB,EAAE,KAAK,gBAAgB,IAAI,sBAAsB,EAAC,MAAM,eAAe,CAAA;AAC/G,OAAO,EAAC,KAAK,iBAAiB,EAAC,MAAM,OAAO,CAAA;AAE5C,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAErC,KAAK,gBAAgB,GAAG,iBAAiB,CAAC,sBAAsB,CAAC,GAAG,MAAM,CAAA;AAE1E,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAI1D,CAAA;AAED,QAAA,MAAM,WAAW,EAMX,OAAO,eAAe,GAAG;IAC7B,OAAO,EAAE,OAAO,iBAAiB,CAAC,OAAO,CAAA;IACzC,aAAa,EAAE,OAAO,iBAAiB,CAAC,aAAa,CAAA;IACrD,UAAU,EAAE,OAAO,iBAAiB,CAAC,UAAU,CAAA;IAC/C,KAAK,EAAE,OAAO,iBAAiB,CAAC,KAAK,CAAA;CACtC,CAAA;AAED,OAAO,EAAC,WAAW,EAAE,KAAK,gBAAgB,EAAC,CAAA"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { FormControl as FormControl$1 } from '@primer/react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
import { sx } from '../sx.js';
|
|
4
|
-
|
|
5
|
-
const FormControlImpl = styled(FormControl$1).withConfig({
|
|
6
|
-
shouldForwardProp: prop => prop !== 'sx'
|
|
7
|
-
}).withConfig({
|
|
8
|
-
displayName: "FormControl__FormControlImpl",
|
|
9
|
-
componentId: "sc-1642wfe-0"
|
|
10
|
-
})(["", ""], sx);
|
|
11
|
-
const FormControl = Object.assign(FormControlImpl, {
|
|
12
|
-
__SLOT__: FormControl$1.__SLOT__,
|
|
13
|
-
Caption: FormControl$1.Caption,
|
|
14
|
-
LeadingVisual: FormControl$1.LeadingVisual,
|
|
15
|
-
Validation: FormControl$1.Validation,
|
|
16
|
-
Label: FormControl$1.Label
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
export { FormControl };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type HeaderProps as PrimerHeaderProps, type HeaderItemProps as PrimerHeaderItemProps, type HeaderLinkProps as PrimerHeaderLinkProps } from '@primer/react';
|
|
2
|
-
import type { ForwardRefComponent } from '../polymorphic';
|
|
3
|
-
import type { SxProp } from '../sx';
|
|
4
|
-
type HeaderProps = PrimerHeaderProps & SxProp;
|
|
5
|
-
type HeaderItemProps = PrimerHeaderItemProps & SxProp;
|
|
6
|
-
declare const Header: ForwardRefComponent<"header", HeaderProps> & {
|
|
7
|
-
Item: import("react").ForwardRefExoticComponent<Omit<HeaderItemProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
-
Link: import("react").ForwardRefExoticComponent<Omit<PrimerHeaderLinkProps, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
9
|
-
};
|
|
10
|
-
export { Header, type HeaderProps };
|
|
11
|
-
//# sourceMappingURL=Header.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../src/components/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,IAAI,iBAAiB,EACrC,KAAK,eAAe,IAAI,qBAAqB,EAC7C,KAAK,eAAe,IAAI,qBAAqB,EAG9C,MAAM,eAAe,CAAA;AAGtB,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AACvD,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,OAAO,CAAA;AAEjC,KAAK,WAAW,GAAG,iBAAiB,GAAG,MAAM,CAAA;AAU7C,KAAK,eAAe,GAAG,qBAAqB,GAAG,MAAM,CAAA;AAcrD,QAAA,MAAM,MAAM;;;CAGV,CAAA;AAEF,OAAO,EAAC,MAAM,EAAE,KAAK,WAAW,EAAC,CAAA"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { Header as Header$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 StyledHeader = /*#__PURE__*/forwardRef(function Header(props, ref) {
|
|
7
|
-
return /*#__PURE__*/jsx(Box, {
|
|
8
|
-
as: Header$1,
|
|
9
|
-
ref: ref,
|
|
10
|
-
...props
|
|
11
|
-
});
|
|
12
|
-
});
|
|
13
|
-
const HeaderImpl = /*#__PURE__*/forwardRef(({
|
|
14
|
-
as,
|
|
15
|
-
...props
|
|
16
|
-
}, ref) => /*#__PURE__*/jsx(StyledHeader, {
|
|
17
|
-
...props,
|
|
18
|
-
...(as ? {
|
|
19
|
-
forwardedAs: as
|
|
20
|
-
} : {}),
|
|
21
|
-
ref: ref
|
|
22
|
-
}));
|
|
23
|
-
const HeaderItem = /*#__PURE__*/forwardRef(function HeaderItem(props, ref) {
|
|
24
|
-
return /*#__PURE__*/jsx(Box, {
|
|
25
|
-
as: Header$1.Item,
|
|
26
|
-
ref: ref,
|
|
27
|
-
...props
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
const StyledHeaderLink = /*#__PURE__*/forwardRef(function HeaderLink(props, ref) {
|
|
31
|
-
return /*#__PURE__*/jsx(Box, {
|
|
32
|
-
as: Header$1.Link,
|
|
33
|
-
ref: ref,
|
|
34
|
-
...props
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
const HeaderLink = /*#__PURE__*/forwardRef(({
|
|
38
|
-
as,
|
|
39
|
-
...props
|
|
40
|
-
}, ref) => /*#__PURE__*/jsx(StyledHeaderLink, {
|
|
41
|
-
...props,
|
|
42
|
-
...(as ? {
|
|
43
|
-
forwardedAs: as
|
|
44
|
-
} : {}),
|
|
45
|
-
ref: ref
|
|
46
|
-
}));
|
|
47
|
-
const Header = Object.assign(HeaderImpl, {
|
|
48
|
-
Item: HeaderItem,
|
|
49
|
-
Link: HeaderLink
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
export { Header };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type LinkButtonProps as PrimerLinkButtonProps } from '@primer/react';
|
|
2
|
-
import { type ForwardRefComponent } from '../polymorphic';
|
|
3
|
-
import { type SxProp } from '../sx';
|
|
4
|
-
type LinkButtonProps = PrimerLinkButtonProps & SxProp;
|
|
5
|
-
declare const LinkButton: ForwardRefComponent<'a', LinkButtonProps>;
|
|
6
|
-
export { LinkButton };
|
|
7
|
-
export type { LinkButtonProps };
|
|
8
|
-
//# sourceMappingURL=LinkButton.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LinkButton.d.ts","sourceRoot":"","sources":["../../src/components/LinkButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,eAAe,IAAI,qBAAqB,EAAC,MAAM,eAAe,CAAA;AAE3G,OAAO,EAAC,KAAK,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AACvD,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAErC,KAAK,eAAe,GAAG,qBAAqB,GAAG,MAAM,CAAA;AAErD,QAAA,MAAM,UAAU,EAAE,mBAAmB,CAAC,GAAG,EAAE,eAAe,CAIzD,CAAA;AAED,OAAO,EAAC,UAAU,EAAC,CAAA;AACnB,YAAY,EAAC,eAAe,EAAC,CAAA"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { LinkButton as LinkButton$1 } from '@primer/react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
import { sx } from '../sx.js';
|
|
4
|
-
|
|
5
|
-
const LinkButton = styled(LinkButton$1).withConfig({
|
|
6
|
-
shouldForwardProp: prop => prop !== 'sx'
|
|
7
|
-
}).withConfig({
|
|
8
|
-
displayName: "LinkButton",
|
|
9
|
-
componentId: "sc-1v6zkmg-0"
|
|
10
|
-
})(["", ""], sx);
|
|
11
|
-
|
|
12
|
-
export { LinkButton };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { type SegmentedControlProps as PrimerSegmentedControlProps, type SegmentedControlButtonProps as PrimerSegmentedControlButtonProps, type SegmentedControlIconButtonProps as PrimerSegmentedControlIconButtonProps } from '@primer/react';
|
|
2
|
-
import type { PropsWithChildren } from 'react';
|
|
3
|
-
import type { SxProp } from '../sx';
|
|
4
|
-
type SegmentedControlProps = PropsWithChildren<PrimerSegmentedControlProps> & SxProp;
|
|
5
|
-
type SegmentedControlButtonProps = PropsWithChildren<PrimerSegmentedControlButtonProps> & SxProp;
|
|
6
|
-
type SegmentedControlIconButtonProps = PropsWithChildren<PrimerSegmentedControlIconButtonProps> & SxProp;
|
|
7
|
-
declare const SegmentedControl: ((props: SegmentedControlProps) => import("react").JSX.Element) & {
|
|
8
|
-
__SLOT__: symbol;
|
|
9
|
-
Button: {
|
|
10
|
-
(props: SegmentedControlButtonProps): import("react").JSX.Element;
|
|
11
|
-
__SLOT__: symbol | undefined;
|
|
12
|
-
};
|
|
13
|
-
IconButton: {
|
|
14
|
-
(props: SegmentedControlIconButtonProps): import("react").JSX.Element;
|
|
15
|
-
__SLOT__: symbol | undefined;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export { SegmentedControl, type SegmentedControlProps, type SegmentedControlButtonProps, type SegmentedControlIconButtonProps, };
|
|
19
|
-
//# sourceMappingURL=SegmentedControl.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControl.d.ts","sourceRoot":"","sources":["../../src/components/SegmentedControl.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,IAAI,2BAA2B,EAEzD,KAAK,2BAA2B,IAAI,iCAAiC,EACrE,KAAK,+BAA+B,IAAI,qCAAqC,EAC9E,MAAM,eAAe,CAAA;AACtB,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAA;AAC5C,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,OAAO,CAAA;AAGjC,KAAK,qBAAqB,GAAG,iBAAiB,CAAC,2BAA2B,CAAC,GAAG,MAAM,CAAA;AACpF,KAAK,2BAA2B,GAAG,iBAAiB,CAAC,iCAAiC,CAAC,GAAG,MAAM,CAAA;AAChG,KAAK,+BAA+B,GAAG,iBAAiB,CAAC,qCAAqC,CAAC,GAAG,MAAM,CAAA;AAcxG,QAAA,MAAM,gBAAgB,WAJe,qBAAqB;;;gBARnB,2BAA2B;;;;gBAIvB,+BAA+B;;;CAYxE,CAAA;AAKF,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,EAChC,KAAK,+BAA+B,GACrC,CAAA"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { SegmentedControl as SegmentedControl$1 } from '@primer/react';
|
|
2
|
-
import { Box } from './Box.js';
|
|
3
|
-
import { jsx } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
const SegmentedControlButton = props => {
|
|
6
|
-
return /*#__PURE__*/jsx(Box, {
|
|
7
|
-
as: SegmentedControl$1.Button,
|
|
8
|
-
...props
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
const SegmentedControlIconButton = props => {
|
|
12
|
-
return /*#__PURE__*/jsx(Box, {
|
|
13
|
-
as: SegmentedControl$1.IconButton,
|
|
14
|
-
...props
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
const SegmentedControlImpl = props => {
|
|
18
|
-
return /*#__PURE__*/jsx(Box, {
|
|
19
|
-
as: SegmentedControl$1,
|
|
20
|
-
...props
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
const SegmentedControl = Object.assign(SegmentedControlImpl, {
|
|
24
|
-
__SLOT__: SegmentedControl$1.__SLOT__,
|
|
25
|
-
Button: SegmentedControlButton,
|
|
26
|
-
IconButton: SegmentedControlIconButton
|
|
27
|
-
});
|
|
28
|
-
SegmentedControlButton.__SLOT__ = SegmentedControl$1.Button.__SLOT__;
|
|
29
|
-
SegmentedControlIconButton.__SLOT__ = SegmentedControl$1.IconButton.__SLOT__;
|
|
30
|
-
|
|
31
|
-
export { SegmentedControl };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { TabNavProps as PrimerTabNavProps, TabNavLinkProps as PrimerTabNavLinkProps } from '@primer/react/deprecated';
|
|
2
|
-
import { type SxProp } from '../../sx';
|
|
3
|
-
type TabNavProps = PrimerTabNavProps & SxProp;
|
|
4
|
-
type TabNavLinkProps = PrimerTabNavLinkProps & SxProp;
|
|
5
|
-
declare const TabNav: (({ as, ...props }: TabNavProps) => import("react").JSX.Element) & {
|
|
6
|
-
Link: import("react").ForwardRefExoticComponent<Omit<TabNavLinkProps, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
7
|
-
};
|
|
8
|
-
export { TabNav, type TabNavProps, type TabNavLinkProps };
|
|
9
|
-
//# sourceMappingURL=TabNav.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TabNav.d.ts","sourceRoot":"","sources":["../../../src/components/deprecated/TabNav.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,WAAW,IAAI,iBAAiB,EAAE,eAAe,IAAI,qBAAqB,EAAC,MAAM,0BAA0B,CAAA;AACxH,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,UAAU,CAAA;AAIxC,KAAK,WAAW,GAAG,iBAAiB,GAAG,MAAM,CAAA;AAC7C,KAAK,eAAe,GAAG,qBAAqB,GAAG,MAAM,CAAA;AAsBrD,QAAA,MAAM,MAAM,sBAdwB,WAAW;;CAgB7C,CAAA;AAEF,OAAO,EAAC,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,eAAe,EAAC,CAAA"}
|
|
@@ -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 };
|