@primer/styled-react 0.0.0-20251007234959 → 0.0.0-20251008034312
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../src/components/Label.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,UAAU,IAAI,gBAAgB,
|
|
1
|
+
{"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../src/components/Label.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,UAAU,IAAI,gBAAgB,EAAuB,MAAM,eAAe,CAAA;AACvF,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAErC,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AAGvD,KAAK,UAAU,GAAG,gBAAgB,GAAG,MAAM,GAAG;IAAC,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;CAAC,CAAA;AAQtE,QAAA,MAAM,KAAK,EAEL,mBAAmB,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;AAE7C,OAAO,EAAC,KAAK,EAAE,KAAK,UAAU,EAAC,CAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { type SpinnerProps as PrimerSpinnerProps } from '@primer/react';
|
|
2
|
-
import
|
|
3
|
-
import type { SxProp } from '../sx';
|
|
1
|
+
import { Spinner as PrimerSpinner, type SpinnerProps as PrimerSpinnerProps } from '@primer/react';
|
|
2
|
+
import { type SxProp } from '../sx';
|
|
4
3
|
export type SpinnerProps = PrimerSpinnerProps & SxProp;
|
|
5
|
-
export declare
|
|
4
|
+
export declare const Spinner: import("styled-components").StyledComponent<typeof PrimerSpinner, any, SpinnerProps, never>;
|
|
6
5
|
//# sourceMappingURL=Spinner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../src/components/Spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../src/components/Spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,aAAa,EAAE,KAAK,YAAY,IAAI,kBAAkB,EAAC,MAAM,eAAe,CAAA;AAC/F,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAGrC,MAAM,MAAM,YAAY,GAAG,kBAAkB,GAAG,MAAM,CAAA;AAEtD,eAAO,MAAM,OAAO,6FAInB,CAAA"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { type TokenProps as PrimerTokenProps
|
|
1
|
+
import { type TokenProps as PrimerTokenProps } from '@primer/react';
|
|
2
|
+
import { type SxProp } from '../sx';
|
|
2
3
|
import type { ForwardRefComponent } from '../polymorphic';
|
|
3
4
|
import type { PropsWithChildren } from 'react';
|
|
4
5
|
type TokenProps = PropsWithChildren<PrimerTokenProps> & SxProp;
|
|
5
|
-
declare const Token: ForwardRefComponent<
|
|
6
|
+
declare const Token: ForwardRefComponent<"a" | "button" | "span", TokenProps>;
|
|
6
7
|
export { Token, type TokenProps };
|
|
7
8
|
//# sourceMappingURL=Token.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Token.d.ts","sourceRoot":"","sources":["../../src/components/Token.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"Token.d.ts","sourceRoot":"","sources":["../../src/components/Token.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,KAAK,UAAU,IAAI,gBAAgB,EAAuB,MAAM,eAAe,CAAA;AACvF,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AACrC,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AACvD,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAA;AAG5C,KAAK,UAAU,GAAG,iBAAiB,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAA;AAQ9D,QAAA,MAAM,KAAK,EAEL,mBAAmB,CAAC,GAAG,GAAG,QAAQ,GAAG,MAAM,EAAE,UAAU,CAAC,CAAA;AAE9D,OAAO,EAAC,KAAK,EAAE,KAAK,UAAU,EAAC,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { ActionList as ActionList$1, sx, ActionMenu as ActionMenu$1, Autocomplete as Autocomplete$1, Box, Avatar as Avatar$1, Breadcrumbs as Breadcrumbs$1, Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, CircleBadge as CircleBadge$1, CounterLabel as CounterLabel$1, Flash as Flash$1, Header as Header$1, Heading as Heading$1, Label as Label$1, Link as Link$1, LinkButton as LinkButton$1, NavList as NavList$1, Overlay as Overlay$1, PageLayout as PageLayout$1, RadioGroup as RadioGroup$1, RelativeTime as RelativeTime$1, SegmentedControl as SegmentedControl$1, Spinner as Spinner$1, StateLabel as StateLabel$1, SubNav as SubNav$1, Text as Text$1, Timeline as Timeline$1, ToggleSwitch as ToggleSwitch$1,
|
|
1
|
+
import { ActionList as ActionList$1, sx, ActionMenu as ActionMenu$1, Autocomplete as Autocomplete$1, Box, Avatar as Avatar$1, Breadcrumbs as Breadcrumbs$1, Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, CircleBadge as CircleBadge$1, CounterLabel as CounterLabel$1, Flash as Flash$1, Header as Header$1, Heading as Heading$1, Label as Label$1, Link as Link$1, LinkButton as LinkButton$1, NavList as NavList$1, Overlay as Overlay$1, PageLayout as PageLayout$1, RadioGroup as RadioGroup$1, RelativeTime as RelativeTime$1, SegmentedControl as SegmentedControl$1, 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
2
|
export { Box, Button, Details, FormControl, IconButton, ProgressBar, Select, TextInput, Textarea, ThemeProvider, merge, sx, theme, themeGet, useColorSchemeVar, useTheme } from '@primer/react';
|
|
3
3
|
import React, { forwardRef } from 'react';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
export { D as Dialog, P as PageHeader, T as Tooltip } from './Tooltip-DIHgr01r.js';
|
|
7
|
-
import css from '@styled-system/css';
|
|
8
7
|
|
|
9
8
|
const StyledActionList = styled(ActionList$1).withConfig({
|
|
10
9
|
shouldForwardProp: prop => prop !== 'sx'
|
|
@@ -286,13 +285,12 @@ const Heading = styled(Heading$1).withConfig({
|
|
|
286
285
|
componentId: "sc-1vc165i-0"
|
|
287
286
|
})(["", ""], sx);
|
|
288
287
|
|
|
289
|
-
const StyledLabel =
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
});
|
|
288
|
+
const StyledLabel = styled(Label$1).withConfig({
|
|
289
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
290
|
+
}).withConfig({
|
|
291
|
+
displayName: "Label__StyledLabel",
|
|
292
|
+
componentId: "sc-1cpass9-0"
|
|
293
|
+
})(["", ""], sx);
|
|
296
294
|
const Label = /*#__PURE__*/forwardRef(({
|
|
297
295
|
as,
|
|
298
296
|
...props
|
|
@@ -487,12 +485,12 @@ const SegmentedControl = Object.assign(SegmentedControlImpl, {
|
|
|
487
485
|
IconButton: SegmentedControlIconButton
|
|
488
486
|
});
|
|
489
487
|
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
}
|
|
488
|
+
const Spinner = styled(Spinner$1).withConfig({
|
|
489
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
490
|
+
}).withConfig({
|
|
491
|
+
displayName: "Spinner",
|
|
492
|
+
componentId: "sc-jbw2a0-0"
|
|
493
|
+
})(["", ""], sx);
|
|
496
494
|
|
|
497
495
|
const StateLabel = /*#__PURE__*/forwardRef(function StateLabel(props, ref) {
|
|
498
496
|
return /*#__PURE__*/jsx(Box, {
|
|
@@ -589,32 +587,21 @@ const ToggleSwitch = /*#__PURE__*/forwardRef(function ToggleSwitch(props, ref) {
|
|
|
589
587
|
});
|
|
590
588
|
});
|
|
591
589
|
|
|
592
|
-
const
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
590
|
+
const StyledToken = styled(Token$1).withConfig({
|
|
591
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
592
|
+
}).withConfig({
|
|
593
|
+
displayName: "Token__StyledToken",
|
|
594
|
+
componentId: "sc-ldn0r8-0"
|
|
595
|
+
})(["", ""], sx);
|
|
596
|
+
const Token = /*#__PURE__*/forwardRef(({
|
|
597
|
+
as,
|
|
598
|
+
...props
|
|
596
599
|
}, ref) => {
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
return /*#__PURE__*/jsx(Token$1, {
|
|
603
|
-
...rest,
|
|
604
|
-
style: style,
|
|
605
|
-
ref: ref
|
|
606
|
-
});
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
// Convert sx to CSS styles using the theme context
|
|
610
|
-
const sxStyles = css(sxProp)(theme$1);
|
|
611
|
-
const mergedStyle = {
|
|
612
|
-
...sxStyles,
|
|
613
|
-
...style
|
|
614
|
-
};
|
|
615
|
-
return /*#__PURE__*/jsx(Token$1, {
|
|
616
|
-
...rest,
|
|
617
|
-
style: mergedStyle,
|
|
600
|
+
return /*#__PURE__*/jsx(StyledToken, {
|
|
601
|
+
...props,
|
|
602
|
+
...(as ? {
|
|
603
|
+
forwardedAs: as
|
|
604
|
+
} : {}),
|
|
618
605
|
ref: ref
|
|
619
606
|
});
|
|
620
607
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/styled-react",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-20251008034312",
|
|
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": "0.0.0-
|
|
33
|
+
"@primer/react": "0.0.0-20251008034312",
|
|
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": "0.0.0-
|
|
49
|
+
"@primer/react": "0.0.0-20251008034312",
|
|
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",
|