@primer/styled-react 0.0.0-20260325182738 → 0.0.0-20260325190039
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/Avatar.d.ts +13 -0
- package/dist/components/Avatar.d.ts.map +1 -0
- package/dist/components/Avatar.js +14 -0
- package/dist/components/Textarea.d.ts +9 -0
- package/dist/components/Textarea.d.ts.map +1 -0
- package/dist/components/Textarea.js +26 -0
- package/dist/components/ThemeProvider.d.ts.map +1 -1
- package/dist/components/ThemeProvider.js +39 -81
- package/dist/components/Timeline.d.ts +1 -1
- package/dist/components.json +4 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/package.json +3 -3
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type AvatarProps as PrimerAvatarProps } from '@primer/react';
|
|
2
|
+
import type { StyledProps } from '../styled-props';
|
|
3
|
+
type AvatarProps = PrimerAvatarProps & StyledProps;
|
|
4
|
+
declare const Avatar: import("react").ForwardRefExoticComponent<{
|
|
5
|
+
size?: number | import("@primer/react").ResponsiveValue<number>;
|
|
6
|
+
square?: boolean;
|
|
7
|
+
src: string;
|
|
8
|
+
alt?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
} & Omit<import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & import("..").SxProp & import("styled-system").SpaceProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & import("styled-system").ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & import("styled-system").TypographyProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").LayoutProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").FlexboxProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").GridProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").BackgroundProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.Background<import("styled-system").TLengthStyledSystem>> & import("styled-system").BorderProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.Border<import("styled-system").TLengthStyledSystem>> & import("styled-system").PositionProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").ShadowProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("react").RefAttributes<HTMLImageElement>>;
|
|
11
|
+
export { Avatar };
|
|
12
|
+
export type { AvatarProps };
|
|
13
|
+
//# sourceMappingURL=Avatar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../src/components/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,WAAW,IAAI,iBAAiB,EAAyB,MAAM,eAAe,CAAA;AAE3F,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAA;AAGhD,KAAK,WAAW,GAAG,iBAAiB,GAAG,WAAW,CAAA;AAClD,QAAA,MAAM,MAAM;;;;;;ynDAEV,CAAA;AAEF,OAAO,EAAC,MAAM,EAAC,CAAA;AACf,YAAY,EAAC,WAAW,EAAC,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Avatar as Avatar$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 Avatar = /*#__PURE__*/forwardRef(function Avatar(props, ref) {
|
|
7
|
+
return /*#__PURE__*/jsx(Box, {
|
|
8
|
+
as: Avatar$1,
|
|
9
|
+
ref: ref,
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export { Avatar };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type TextareaProps as PrimerTextareaProps } from '@primer/react';
|
|
2
|
+
import { type SxProp } from '../sx';
|
|
3
|
+
import type { ForwardRefComponent } from '../polymorphic';
|
|
4
|
+
type TextareaProps = PrimerTextareaProps & SxProp & {
|
|
5
|
+
as?: React.ElementType;
|
|
6
|
+
};
|
|
7
|
+
declare const Textarea: ForwardRefComponent<"textarea", TextareaProps>;
|
|
8
|
+
export { Textarea, type TextareaProps };
|
|
9
|
+
//# sourceMappingURL=Textarea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../src/components/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,aAAa,IAAI,mBAAmB,EAAC,MAAM,eAAe,CAAA;AAEnG,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AACrC,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AAGvD,KAAK,aAAa,GAAG,mBAAmB,GAAG,MAAM,GAAG;IAAC,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;CAAC,CAAA;AAQ5E,QAAA,MAAM,QAAQ,EAER,mBAAmB,CAAC,UAAU,EAAE,aAAa,CAAC,CAAA;AAEpD,OAAO,EAAC,QAAQ,EAAE,KAAK,aAAa,EAAC,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../src/components/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../src/components/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,eAAO,MAAM,gBAAgB,QAAQ,CAAA;AAKrC,MAAM,MAAM,KAAK,GAAG;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAC,CAAA;AACxC,KAAK,SAAS,GAAG,KAAK,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAA;AACnD,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,MAAM,CAAA;AAElD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,SAAS,CAAC,EAAE,iBAAiB,CAAA;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B,CAAA;AA2CD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CAyE/E,CAAA;AAED,wBAAgB,QAAQ;YAnHd,KAAK;kBACC,MAAM;gBACR,iBAAiB;wBACT,SAAS;0BACP,MAAM;gBAChB,MAAM;kBACJ,MAAM;kBACN,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;kBACvD,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;oBAC1C,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;EA4G7D;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,UAG1F;AAqED,eAAe,aAAa,CAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import ReactDOM from 'react-dom';
|
|
3
2
|
import { ThemeProvider as ThemeProvider$1 } from 'styled-components';
|
|
4
3
|
import { theme, useId, useSyncedState } from '@primer/react';
|
|
5
4
|
import deepmerge from 'deepmerge';
|
|
@@ -18,15 +17,25 @@ const ThemeContext = /*#__PURE__*/React.createContext({
|
|
|
18
17
|
});
|
|
19
18
|
|
|
20
19
|
// inspired from __NEXT_DATA__, we use application/json to avoid CSRF policy with inline scripts
|
|
20
|
+
const serverHandoffCache = new Map();
|
|
21
21
|
const getServerHandoff = id => {
|
|
22
|
+
const cached = serverHandoffCache.get(id);
|
|
23
|
+
if (cached !== undefined) return cached;
|
|
22
24
|
try {
|
|
23
25
|
const serverData = document.getElementById(`__PRIMER_DATA_${id}__`)?.textContent;
|
|
24
|
-
if (serverData)
|
|
26
|
+
if (serverData) {
|
|
27
|
+
const parsed = JSON.parse(serverData);
|
|
28
|
+
serverHandoffCache.set(id, parsed);
|
|
29
|
+
return parsed;
|
|
30
|
+
}
|
|
25
31
|
} catch (_error) {
|
|
26
32
|
// if document/element does not exist or JSON is invalid, supress error
|
|
27
33
|
}
|
|
28
|
-
|
|
34
|
+
const empty = {};
|
|
35
|
+
serverHandoffCache.set(id, empty);
|
|
36
|
+
return empty;
|
|
29
37
|
};
|
|
38
|
+
const emptySubscribe = () => () => {};
|
|
30
39
|
const ThemeProvider = ({
|
|
31
40
|
children,
|
|
32
41
|
...props
|
|
@@ -42,56 +51,33 @@ const ThemeProvider = ({
|
|
|
42
51
|
// Initialize state
|
|
43
52
|
const theme$1 = props.theme ?? fallbackTheme ?? theme;
|
|
44
53
|
const uniqueDataId = useId();
|
|
45
|
-
const {
|
|
46
|
-
resolvedServerColorMode
|
|
47
|
-
} = getServerHandoff(uniqueDataId);
|
|
48
|
-
const resolvedColorModePassthrough = React.useRef(resolvedServerColorMode);
|
|
49
54
|
const [colorMode, setColorMode] = useSyncedState(props.colorMode ?? fallbackColorMode ?? defaultColorMode);
|
|
50
55
|
const [dayScheme, setDayScheme] = useSyncedState(props.dayScheme ?? fallbackDayScheme ?? defaultDayScheme);
|
|
51
56
|
const [nightScheme, setNightScheme] = useSyncedState(props.nightScheme ?? fallbackNightScheme ?? defaultNightScheme);
|
|
52
57
|
const systemColorMode = useSystemColorMode();
|
|
53
|
-
|
|
54
|
-
|
|
58
|
+
const clientColorMode = resolveColorMode(colorMode, systemColorMode);
|
|
59
|
+
// During SSR/hydration, use the server-rendered color mode from the handoff script tag
|
|
60
|
+
// to avoid mismatches. After hydration, resolve from client state.
|
|
61
|
+
const resolvedColorMode = React.useSyncExternalStore(emptySubscribe, () => clientColorMode, () => getServerHandoff(uniqueDataId).resolvedServerColorMode ?? clientColorMode);
|
|
55
62
|
const colorScheme = chooseColorScheme(resolvedColorMode, dayScheme, nightScheme);
|
|
56
63
|
const {
|
|
57
64
|
resolvedTheme,
|
|
58
65
|
resolvedColorScheme
|
|
59
66
|
} = React.useMemo(() => applyColorScheme(theme$1, colorScheme), [theme$1, colorScheme]);
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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]);
|
|
67
|
+
const contextValue = React.useMemo(() => ({
|
|
68
|
+
theme: resolvedTheme,
|
|
69
|
+
colorScheme,
|
|
70
|
+
colorMode,
|
|
71
|
+
resolvedColorMode,
|
|
72
|
+
resolvedColorScheme,
|
|
73
|
+
dayScheme,
|
|
74
|
+
nightScheme,
|
|
75
|
+
setColorMode,
|
|
76
|
+
setDayScheme,
|
|
77
|
+
setNightScheme
|
|
78
|
+
}), [resolvedTheme, colorScheme, colorMode, resolvedColorMode, resolvedColorScheme, dayScheme, nightScheme, setColorMode, setDayScheme, setNightScheme]);
|
|
82
79
|
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
|
-
},
|
|
80
|
+
value: contextValue,
|
|
95
81
|
children: /*#__PURE__*/jsxs(ThemeProvider$1, {
|
|
96
82
|
theme: resolvedTheme,
|
|
97
83
|
children: [children, props.preventSSRMismatch ? /*#__PURE__*/jsx("script", {
|
|
@@ -115,48 +101,20 @@ function useColorSchemeVar(values, fallback) {
|
|
|
115
101
|
} = useTheme();
|
|
116
102
|
return values[colorScheme] ?? fallback;
|
|
117
103
|
}
|
|
104
|
+
function subscribeToSystemColorMode(callback) {
|
|
105
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
106
|
+
const media = window?.matchMedia?.('(prefers-color-scheme: dark)');
|
|
107
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
108
|
+
media?.addEventListener('change', callback);
|
|
109
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
110
|
+
return () => media?.removeEventListener('change', callback);
|
|
111
|
+
}
|
|
118
112
|
function useSystemColorMode() {
|
|
119
|
-
|
|
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;
|
|
113
|
+
return React.useSyncExternalStore(subscribeToSystemColorMode, getSystemColorMode, () => 'day');
|
|
153
114
|
}
|
|
154
115
|
function getSystemColorMode() {
|
|
155
116
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
156
|
-
|
|
157
|
-
return 'night';
|
|
158
|
-
}
|
|
159
|
-
return 'day';
|
|
117
|
+
return window?.matchMedia?.('(prefers-color-scheme: dark)')?.matches ? 'night' : 'day';
|
|
160
118
|
}
|
|
161
119
|
function resolveColorMode(colorMode, systemColorMode) {
|
|
162
120
|
switch (colorMode) {
|
|
@@ -7,7 +7,7 @@ export type TimelineBodyProps = PrimerTimelineBodyProps & SxProp;
|
|
|
7
7
|
export type TimelineBreakProps = PrimerTimelineBreakProps & SxProp;
|
|
8
8
|
declare function TimelineBadge(props: TimelineBadgeProps): import("react").JSX.Element;
|
|
9
9
|
export declare const Timeline: import("react").ForwardRefExoticComponent<{
|
|
10
|
-
clipSidebar?: boolean
|
|
10
|
+
clipSidebar?: boolean;
|
|
11
11
|
className?: string;
|
|
12
12
|
} & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & SxProp & import("react").RefAttributes<HTMLDivElement>> & {
|
|
13
13
|
Item: import("react").ForwardRefExoticComponent<{
|
package/dist/components.json
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"components": [
|
|
3
3
|
"ActionList",
|
|
4
4
|
"ActionMenu",
|
|
5
|
+
"Avatar",
|
|
5
6
|
"BaseStyles",
|
|
6
7
|
"Box",
|
|
7
8
|
"Breadcrumb",
|
|
@@ -25,6 +26,7 @@
|
|
|
25
26
|
"Table",
|
|
26
27
|
"TabNav",
|
|
27
28
|
"Text",
|
|
29
|
+
"Textarea",
|
|
28
30
|
"TextInput",
|
|
29
31
|
"ThemeProvider",
|
|
30
32
|
"Timeline",
|
|
@@ -43,6 +45,7 @@
|
|
|
43
45
|
"ActionListProps",
|
|
44
46
|
"ActionListTrailingActionProps",
|
|
45
47
|
"ActionListTrailingVisualProps",
|
|
48
|
+
"AvatarProps",
|
|
46
49
|
"BaseStylesProps",
|
|
47
50
|
"BetterSystemStyleObject",
|
|
48
51
|
"BoxProps",
|
|
@@ -79,6 +82,7 @@
|
|
|
79
82
|
"TableTitleProps",
|
|
80
83
|
"TabNavLinkProps",
|
|
81
84
|
"TabNavProps",
|
|
85
|
+
"TextareaProps",
|
|
82
86
|
"TextInputActionProps",
|
|
83
87
|
"TextInputProps",
|
|
84
88
|
"TextProps",
|
package/dist/index.d.ts
CHANGED
|
@@ -106,6 +106,17 @@ export {
|
|
|
106
106
|
*/
|
|
107
107
|
ActionMenu, } from './components/ActionMenu';
|
|
108
108
|
export {
|
|
109
|
+
/**
|
|
110
|
+
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
111
|
+
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
|
112
|
+
*/
|
|
113
|
+
Avatar,
|
|
114
|
+
/**
|
|
115
|
+
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
116
|
+
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
|
117
|
+
*/
|
|
118
|
+
type AvatarProps, } from './components/Avatar';
|
|
119
|
+
export {
|
|
109
120
|
/**
|
|
110
121
|
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
111
122
|
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
|
@@ -308,6 +319,17 @@ Text,
|
|
|
308
319
|
*/
|
|
309
320
|
type TextProps, } from './components/Text';
|
|
310
321
|
export {
|
|
322
|
+
/**
|
|
323
|
+
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
324
|
+
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
|
325
|
+
*/
|
|
326
|
+
Textarea,
|
|
327
|
+
/**
|
|
328
|
+
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
329
|
+
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
|
330
|
+
*/
|
|
331
|
+
type TextareaProps, } from './components/Textarea';
|
|
332
|
+
export {
|
|
311
333
|
/**
|
|
312
334
|
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
313
335
|
* 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,4BAA4B,CAAA;AAEnC,OAAO;AACL;;;GAGG;AACH,UAAU;AAEV;;;GAGG;AACH,KAAK,eAAe,GACrB,MAAM,yBAAyB,CAAA;AAEhC,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,UAAU,GACX,MAAM,yBAAyB,CAAA;AAEhC,OAAO;AACL;;;GA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,CAAA;AAElC,OAAO;AACL;;;GAGG;AACH,OAAO;AAEP;;;GAGG;AACH,KAAK,YAAY,GAClB,MAAM,sBAAsB,CAAA;AAE7B,OAAO;AACL;;;GAGG;AACH,KAAK;AAEL;;;GAGG;AACH,KAAK,UAAU,GAChB,MAAM,oBAAoB,CAAA;AAE3B,OAAO;AACL;;;GAGG;AACH,QAAQ;AAER;;;GAGG;AACH,KAAK,aAAa,GACnB,MAAM,uBAAuB,CAAA;AAE9B,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
|
@@ -6,6 +6,7 @@ export { theme } from '@primer/react';
|
|
|
6
6
|
export { get as themeGet } from './theme-get.js';
|
|
7
7
|
export { ActionList } from './components/ActionList.js';
|
|
8
8
|
export { ActionMenu } from './components/ActionMenu.js';
|
|
9
|
+
export { Avatar } from './components/Avatar.js';
|
|
9
10
|
export { Breadcrumb, Breadcrumbs } from './components/Breadcrumbs.js';
|
|
10
11
|
export { ButtonComponent as Button } from './components/Button.js';
|
|
11
12
|
export { CounterLabel } from './components/CounterLabel.js';
|
|
@@ -23,6 +24,7 @@ export { PageHeader } from './components/PageHeader.js';
|
|
|
23
24
|
export { SegmentedControl } from './components/SegmentedControl.js';
|
|
24
25
|
export { Spinner } from './components/Spinner.js';
|
|
25
26
|
export { Text } from './components/Text.js';
|
|
27
|
+
export { Textarea } from './components/Textarea.js';
|
|
26
28
|
export { TextInput } from './components/TextInput.js';
|
|
27
29
|
export { Timeline } from './components/Timeline.js';
|
|
28
30
|
export { ToggleSwitch } from './components/ToggleSwitch.js';
|
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-20260325190039",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@babel/preset-react": "^7.28.5",
|
|
47
47
|
"@babel/preset-typescript": "^7.28.5",
|
|
48
48
|
"@primer/primitives": "10.x || 11.x",
|
|
49
|
-
"@primer/react": "0.0.0-
|
|
49
|
+
"@primer/react": "0.0.0-20260325190039",
|
|
50
50
|
"@rollup/plugin-babel": "^6.1.0",
|
|
51
51
|
"@storybook/react-vite": "^10.1.11",
|
|
52
52
|
"@types/react": "18.3.11",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"typescript": "^5.9.2"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"@primer/react": "0.0.0-
|
|
70
|
+
"@primer/react": "0.0.0-20260325190039",
|
|
71
71
|
"@types/react": "18.x || 19.x",
|
|
72
72
|
"@types/react-dom": "18.x || 19.x",
|
|
73
73
|
"@types/react-is": "18.x || 19.x",
|