@primer/styled-react 0.0.0-20251202220556 → 0.0.0-20251203021724
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/ActionList.js +163 -0
- package/dist/components/ActionMenu.js +19 -0
- package/dist/components/Autocomplete.js +25 -0
- package/dist/components/Avatar.js +14 -0
- package/dist/{packages/styled-react/src/components → components}/BaseStyles.js +47 -29
- package/dist/components/Box.js +15 -0
- package/dist/components/Breadcrumbs.js +38 -0
- package/dist/components/Button.js +112 -0
- package/dist/components/Checkbox.js +15 -0
- package/dist/components/CheckboxGroup.js +43 -0
- package/dist/components/CircleBadge.js +12 -0
- package/dist/components/CounterLabel.js +14 -0
- package/dist/components/DataTable.js +32 -0
- package/dist/components/Dialog.js +90 -0
- package/dist/components/Flash.js +12 -0
- package/dist/components/FormControl.js +19 -0
- package/dist/components/Header.js +52 -0
- package/dist/components/Heading.js +12 -0
- package/dist/components/IconButton.js +40 -0
- package/dist/components/Label.js +26 -0
- package/dist/components/Link.js +26 -0
- package/dist/components/LinkButton.js +12 -0
- package/dist/components/NavList.js +74 -0
- package/dist/components/Overlay.js +12 -0
- package/dist/components/PageHeader.js +109 -0
- package/dist/components/RadioGroup.js +43 -0
- package/dist/components/RelativeTime.js +14 -0
- package/dist/components/SegmentedControl.js +31 -0
- package/dist/components/Select.js +24 -0
- package/dist/components/Spinner.js +12 -0
- package/dist/components/StateLabel.js +14 -0
- package/dist/components/SubNav.js +26 -0
- package/dist/components/Text.js +26 -0
- package/dist/components/TextInput.js +38 -0
- package/dist/components/Textarea.js +26 -0
- package/dist/components/ThemeProvider.js +203 -0
- package/dist/components/Timeline.js +47 -0
- package/dist/components/ToggleSwitch.js +14 -0
- package/dist/components/Token.js +26 -0
- package/dist/components/Tooltip.js +15 -0
- package/dist/components/Truncate.js +12 -0
- package/dist/components/UnderlineNav.js +45 -0
- package/dist/components/UnderlinePanels.js +28 -0
- package/dist/components/deprecated/ActionList.js +49 -0
- package/dist/components/deprecated/DialogV1.js +44 -0
- package/dist/components/deprecated/Octicon.js +39 -0
- package/dist/components/deprecated/TabNav.js +44 -0
- package/dist/components/deprecated/Tooltip.js +32 -0
- package/dist/deprecated.js +5 -0
- package/dist/experimental.js +5 -0
- package/dist/index.js +46 -0
- package/dist/sx.js +8 -0
- package/dist/theme-get.js +10 -0
- package/package.json +4 -4
- package/dist/_virtual/rolldown_runtime.js +0 -29
- package/dist/node_modules/clsx/dist/clsx.js +0 -17
- package/dist/node_modules/deepmerge/dist/cjs.js +0 -88
- package/dist/node_modules/focus-visible/dist/focus-visible.js +0 -212
- package/dist/packages/styled-react/src/components/ActionList.js +0 -107
- package/dist/packages/styled-react/src/components/ActionMenu.js +0 -19
- package/dist/packages/styled-react/src/components/Autocomplete.js +0 -23
- package/dist/packages/styled-react/src/components/Avatar.js +0 -16
- package/dist/packages/styled-react/src/components/Box.js +0 -23
- package/dist/packages/styled-react/src/components/Breadcrumbs.js +0 -28
- package/dist/packages/styled-react/src/components/Button.js +0 -48
- package/dist/packages/styled-react/src/components/Checkbox.js +0 -17
- package/dist/packages/styled-react/src/components/CheckboxGroup.js +0 -41
- package/dist/packages/styled-react/src/components/CircleBadge.js +0 -12
- package/dist/packages/styled-react/src/components/CounterLabel.js +0 -16
- package/dist/packages/styled-react/src/components/DataTable.js +0 -24
- package/dist/packages/styled-react/src/components/Dialog.js +0 -64
- package/dist/packages/styled-react/src/components/Flash.js +0 -12
- package/dist/packages/styled-react/src/components/FormControl.js +0 -19
- package/dist/packages/styled-react/src/components/Header.js +0 -44
- package/dist/packages/styled-react/src/components/Heading.js +0 -12
- package/dist/packages/styled-react/src/components/IconButton.js +0 -27
- package/dist/packages/styled-react/src/components/Label.js +0 -21
- package/dist/packages/styled-react/src/components/Link.js +0 -21
- package/dist/packages/styled-react/src/components/LinkButton.js +0 -12
- package/dist/packages/styled-react/src/components/NavList.js +0 -55
- package/dist/packages/styled-react/src/components/Overlay.js +0 -12
- package/dist/packages/styled-react/src/components/PageHeader.js +0 -71
- package/dist/packages/styled-react/src/components/RadioGroup.js +0 -41
- package/dist/packages/styled-react/src/components/RelativeTime.js +0 -14
- package/dist/packages/styled-react/src/components/SegmentedControl.js +0 -33
- package/dist/packages/styled-react/src/components/Select.js +0 -19
- package/dist/packages/styled-react/src/components/Spinner.js +0 -12
- package/dist/packages/styled-react/src/components/StateLabel.js +0 -16
- package/dist/packages/styled-react/src/components/SubNav.js +0 -28
- package/dist/packages/styled-react/src/components/Text.js +0 -21
- package/dist/packages/styled-react/src/components/TextInput.js +0 -31
- package/dist/packages/styled-react/src/components/Textarea.js +0 -21
- package/dist/packages/styled-react/src/components/ThemeProvider.js +0 -152
- package/dist/packages/styled-react/src/components/Timeline.js +0 -49
- package/dist/packages/styled-react/src/components/ToggleSwitch.js +0 -16
- package/dist/packages/styled-react/src/components/Token.js +0 -21
- package/dist/packages/styled-react/src/components/Tooltip.js +0 -17
- package/dist/packages/styled-react/src/components/Truncate.js +0 -12
- package/dist/packages/styled-react/src/components/UnderlineNav.js +0 -33
- package/dist/packages/styled-react/src/components/UnderlinePanels.js +0 -23
- package/dist/packages/styled-react/src/components/deprecated/ActionList.js +0 -44
- package/dist/packages/styled-react/src/components/deprecated/DialogV1.js +0 -34
- package/dist/packages/styled-react/src/components/deprecated/Octicon.js +0 -32
- package/dist/packages/styled-react/src/components/deprecated/TabNav.js +0 -30
- package/dist/packages/styled-react/src/components/deprecated/Tooltip.js +0 -24
- package/dist/packages/styled-react/src/deprecated.js +0 -7
- package/dist/packages/styled-react/src/experimental.js +0 -7
- package/dist/packages/styled-react/src/index.js +0 -50
- package/dist/packages/styled-react/src/sx.js +0 -11
- package/dist/packages/styled-react/src/theme-get.js +0 -10
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { sx } from "../sx.js";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
import { Text } from "@primer/react";
|
|
4
|
-
import { forwardRef } from "react";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
|
|
7
|
-
//#region src/components/Text.tsx
|
|
8
|
-
const StyledText = styled(Text).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
9
|
-
displayName: "Text__StyledText",
|
|
10
|
-
componentId: "sc-1klmep6-0"
|
|
11
|
-
})(["", ""], sx);
|
|
12
|
-
const Text$1 = /* @__PURE__ */ forwardRef(({ as, ...props }, ref) => {
|
|
13
|
-
return /* @__PURE__ */ jsx(StyledText, {
|
|
14
|
-
...props,
|
|
15
|
-
...as ? { forwardedAs: as } : {},
|
|
16
|
-
ref
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
//#endregion
|
|
21
|
-
export { Text$1 as Text };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { sx } from "../sx.js";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
import { TextInput } from "@primer/react";
|
|
4
|
-
import { forwardRef } from "react";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
|
|
7
|
-
//#region src/components/TextInput.tsx
|
|
8
|
-
const StyledTextInput = styled(TextInput).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
9
|
-
displayName: "TextInput__StyledTextInput",
|
|
10
|
-
componentId: "sc-ttxlvl-0"
|
|
11
|
-
})(["", ""], sx);
|
|
12
|
-
const TextInputImpl = /* @__PURE__ */ forwardRef(({ as, ...props }, ref) => {
|
|
13
|
-
return /* @__PURE__ */ jsx(StyledTextInput, {
|
|
14
|
-
ref,
|
|
15
|
-
...props,
|
|
16
|
-
...as ? { forwardedAs: as } : {}
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
const TextInputAction = styled(TextInput.Action).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
20
|
-
displayName: "TextInput__TextInputAction",
|
|
21
|
-
componentId: "sc-ttxlvl-1"
|
|
22
|
-
})(["", ""], sx);
|
|
23
|
-
const TextInput$1 = Object.assign(TextInputImpl, {
|
|
24
|
-
__SLOT__: TextInput.__SLOT__,
|
|
25
|
-
Action: TextInputAction
|
|
26
|
-
});
|
|
27
|
-
TextInputAction.displayName = "TextInputAction";
|
|
28
|
-
TextInputImpl.displayName = "TextInput";
|
|
29
|
-
|
|
30
|
-
//#endregion
|
|
31
|
-
export { TextInput$1 as TextInput };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { sx } from "../sx.js";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
import { Textarea } from "@primer/react";
|
|
4
|
-
import { forwardRef } from "react";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
|
|
7
|
-
//#region src/components/Textarea.tsx
|
|
8
|
-
const StyledTextarea = styled(Textarea).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
9
|
-
displayName: "Textarea__StyledTextarea",
|
|
10
|
-
componentId: "sc-40d1gp-0"
|
|
11
|
-
})(["", ""], sx);
|
|
12
|
-
const Textarea$1 = /* @__PURE__ */ forwardRef(({ as, ...props }, ref) => {
|
|
13
|
-
return /* @__PURE__ */ jsx(StyledTextarea, {
|
|
14
|
-
...props,
|
|
15
|
-
...as ? { forwardedAs: as } : {},
|
|
16
|
-
ref
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
//#endregion
|
|
21
|
-
export { Textarea$1 as Textarea };
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import { __toESM } from "../../../../_virtual/rolldown_runtime.js";
|
|
2
|
-
import { require_cjs } from "../../../../node_modules/deepmerge/dist/cjs.js";
|
|
3
|
-
import { ThemeProvider } from "styled-components";
|
|
4
|
-
import { theme, useId, useSyncedState } from "@primer/react";
|
|
5
|
-
import React from "react";
|
|
6
|
-
import ReactDOM from "react-dom";
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
|
|
9
|
-
//#region src/components/ThemeProvider.tsx
|
|
10
|
-
var import_cjs = /* @__PURE__ */ __toESM(require_cjs());
|
|
11
|
-
const defaultColorMode = "day";
|
|
12
|
-
const defaultDayScheme = "light";
|
|
13
|
-
const defaultNightScheme = "dark";
|
|
14
|
-
const ThemeContext = /* @__PURE__ */ React.createContext({
|
|
15
|
-
setColorMode: () => null,
|
|
16
|
-
setDayScheme: () => null,
|
|
17
|
-
setNightScheme: () => null
|
|
18
|
-
});
|
|
19
|
-
const getServerHandoff = (id) => {
|
|
20
|
-
try {
|
|
21
|
-
const serverData = document.getElementById(`__PRIMER_DATA_${id}__`)?.textContent;
|
|
22
|
-
if (serverData) return JSON.parse(serverData);
|
|
23
|
-
} catch (_error) {}
|
|
24
|
-
return {};
|
|
25
|
-
};
|
|
26
|
-
const ThemeProvider$1 = ({ children, ...props }) => {
|
|
27
|
-
const { theme: fallbackTheme, colorMode: fallbackColorMode, dayScheme: fallbackDayScheme, nightScheme: fallbackNightScheme } = useTheme();
|
|
28
|
-
const theme$1 = props.theme ?? fallbackTheme ?? theme;
|
|
29
|
-
const uniqueDataId = useId();
|
|
30
|
-
const { resolvedServerColorMode } = getServerHandoff(uniqueDataId);
|
|
31
|
-
const resolvedColorModePassthrough = React.useRef(resolvedServerColorMode);
|
|
32
|
-
const [colorMode, setColorMode] = useSyncedState(props.colorMode ?? fallbackColorMode ?? defaultColorMode);
|
|
33
|
-
const [dayScheme, setDayScheme] = useSyncedState(props.dayScheme ?? fallbackDayScheme ?? defaultDayScheme);
|
|
34
|
-
const [nightScheme, setNightScheme] = useSyncedState(props.nightScheme ?? fallbackNightScheme ?? defaultNightScheme);
|
|
35
|
-
const systemColorMode = useSystemColorMode();
|
|
36
|
-
const resolvedColorMode = resolvedColorModePassthrough.current || resolveColorMode(colorMode, systemColorMode);
|
|
37
|
-
const colorScheme = chooseColorScheme(resolvedColorMode, dayScheme, nightScheme);
|
|
38
|
-
const { resolvedTheme, resolvedColorScheme } = React.useMemo(() => applyColorScheme(theme$1, colorScheme), [theme$1, colorScheme]);
|
|
39
|
-
React.useEffect(function updateColorModeAfterServerPassthrough() {
|
|
40
|
-
const resolvedColorModeOnClient = resolveColorMode(colorMode, systemColorMode);
|
|
41
|
-
if (resolvedColorModePassthrough.current) {
|
|
42
|
-
if (resolvedColorModePassthrough.current !== resolvedColorModeOnClient) window.setTimeout(() => {
|
|
43
|
-
ReactDOM.flushSync(() => {
|
|
44
|
-
setColorMode(resolvedColorModeOnClient);
|
|
45
|
-
});
|
|
46
|
-
setColorMode(colorMode);
|
|
47
|
-
});
|
|
48
|
-
resolvedColorModePassthrough.current = null;
|
|
49
|
-
}
|
|
50
|
-
}, [
|
|
51
|
-
colorMode,
|
|
52
|
-
systemColorMode,
|
|
53
|
-
setColorMode
|
|
54
|
-
]);
|
|
55
|
-
return /* @__PURE__ */ jsx(ThemeContext.Provider, {
|
|
56
|
-
value: {
|
|
57
|
-
theme: resolvedTheme,
|
|
58
|
-
colorScheme,
|
|
59
|
-
colorMode,
|
|
60
|
-
resolvedColorMode,
|
|
61
|
-
resolvedColorScheme,
|
|
62
|
-
dayScheme,
|
|
63
|
-
nightScheme,
|
|
64
|
-
setColorMode,
|
|
65
|
-
setDayScheme,
|
|
66
|
-
setNightScheme
|
|
67
|
-
},
|
|
68
|
-
children: /* @__PURE__ */ jsxs(ThemeProvider, {
|
|
69
|
-
theme: resolvedTheme,
|
|
70
|
-
children: [children, props.preventSSRMismatch ? /* @__PURE__ */ jsx("script", {
|
|
71
|
-
type: "application/json",
|
|
72
|
-
id: `__PRIMER_DATA_${uniqueDataId}__`,
|
|
73
|
-
dangerouslySetInnerHTML: { __html: JSON.stringify({ resolvedServerColorMode: resolvedColorMode }) }
|
|
74
|
-
}) : null]
|
|
75
|
-
})
|
|
76
|
-
});
|
|
77
|
-
};
|
|
78
|
-
function useTheme() {
|
|
79
|
-
return React.useContext(ThemeContext);
|
|
80
|
-
}
|
|
81
|
-
function useColorSchemeVar(values, fallback) {
|
|
82
|
-
const { colorScheme = "" } = useTheme();
|
|
83
|
-
return values[colorScheme] ?? fallback;
|
|
84
|
-
}
|
|
85
|
-
function useSystemColorMode() {
|
|
86
|
-
const [systemColorMode, setSystemColorMode] = React.useState(getSystemColorMode);
|
|
87
|
-
React.useEffect(() => {
|
|
88
|
-
const media = window?.matchMedia?.("(prefers-color-scheme: dark)");
|
|
89
|
-
function matchesMediaToColorMode(matches) {
|
|
90
|
-
return matches ? "night" : "day";
|
|
91
|
-
}
|
|
92
|
-
function handleChange(event) {
|
|
93
|
-
const isNight = event.matches;
|
|
94
|
-
setSystemColorMode(matchesMediaToColorMode(isNight));
|
|
95
|
-
}
|
|
96
|
-
if (media) {
|
|
97
|
-
const isNight = media.matches;
|
|
98
|
-
setSystemColorMode(matchesMediaToColorMode(isNight));
|
|
99
|
-
if (media.addEventListener !== void 0) {
|
|
100
|
-
media.addEventListener("change", handleChange);
|
|
101
|
-
return function cleanup() {
|
|
102
|
-
media.removeEventListener("change", handleChange);
|
|
103
|
-
};
|
|
104
|
-
} else if (media.addListener !== void 0) {
|
|
105
|
-
media.addListener(handleChange);
|
|
106
|
-
return function cleanup() {
|
|
107
|
-
media.removeListener(handleChange);
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}, []);
|
|
112
|
-
return systemColorMode;
|
|
113
|
-
}
|
|
114
|
-
function getSystemColorMode() {
|
|
115
|
-
if (typeof window !== "undefined" && window.matchMedia?.("(prefers-color-scheme: dark)")?.matches) return "night";
|
|
116
|
-
return "day";
|
|
117
|
-
}
|
|
118
|
-
function resolveColorMode(colorMode, systemColorMode) {
|
|
119
|
-
switch (colorMode) {
|
|
120
|
-
case "auto": return systemColorMode;
|
|
121
|
-
default: return colorMode;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
function chooseColorScheme(colorMode, dayScheme, nightScheme) {
|
|
125
|
-
switch (colorMode) {
|
|
126
|
-
case "day":
|
|
127
|
-
case "light": return dayScheme;
|
|
128
|
-
case "dark":
|
|
129
|
-
case "night": return nightScheme;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
function applyColorScheme(theme$1, colorScheme) {
|
|
133
|
-
if (!theme$1.colorSchemes) return {
|
|
134
|
-
resolvedTheme: theme$1,
|
|
135
|
-
resolvedColorScheme: void 0
|
|
136
|
-
};
|
|
137
|
-
if (!theme$1.colorSchemes[colorScheme]) {
|
|
138
|
-
console.error(`\`${colorScheme}\` scheme not defined in \`theme.colorSchemes\``);
|
|
139
|
-
const defaultColorScheme = Object.keys(theme$1.colorSchemes)[0];
|
|
140
|
-
return {
|
|
141
|
-
resolvedTheme: (0, import_cjs.default)(theme$1, theme$1.colorSchemes[defaultColorScheme]),
|
|
142
|
-
resolvedColorScheme: defaultColorScheme
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
return {
|
|
146
|
-
resolvedTheme: (0, import_cjs.default)(theme$1, theme$1.colorSchemes[colorScheme]),
|
|
147
|
-
resolvedColorScheme: colorScheme
|
|
148
|
-
};
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
//#endregion
|
|
152
|
-
export { ThemeProvider$1 as ThemeProvider, useColorSchemeVar, useTheme };
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { Box } from "./Box.js";
|
|
2
|
-
import { Timeline } from "@primer/react";
|
|
3
|
-
import { forwardRef } from "react";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
|
|
6
|
-
//#region src/components/Timeline.tsx
|
|
7
|
-
const TimelineImpl = /* @__PURE__ */ forwardRef(function Timeline$2(props, ref) {
|
|
8
|
-
return /* @__PURE__ */ jsx(Box, {
|
|
9
|
-
as: Timeline,
|
|
10
|
-
ref,
|
|
11
|
-
...props
|
|
12
|
-
});
|
|
13
|
-
});
|
|
14
|
-
const TimelineItem = /* @__PURE__ */ forwardRef(function TimelineItem$1(props, ref) {
|
|
15
|
-
return /* @__PURE__ */ jsx(Box, {
|
|
16
|
-
as: Timeline.Item,
|
|
17
|
-
ref,
|
|
18
|
-
...props
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
function TimelineBadge(props) {
|
|
22
|
-
return /* @__PURE__ */ jsx(Box, {
|
|
23
|
-
as: Timeline.Badge,
|
|
24
|
-
...props
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
const TimelineBody = /* @__PURE__ */ forwardRef(function TimelineBody$1(props, ref) {
|
|
28
|
-
return /* @__PURE__ */ jsx(Box, {
|
|
29
|
-
as: Timeline.Body,
|
|
30
|
-
ref,
|
|
31
|
-
...props
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
const TimelineBreak = /* @__PURE__ */ forwardRef(function TimelineBreak$1(props, ref) {
|
|
35
|
-
return /* @__PURE__ */ jsx(Box, {
|
|
36
|
-
as: Timeline.Break,
|
|
37
|
-
ref,
|
|
38
|
-
...props
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
const Timeline$1 = Object.assign(TimelineImpl, {
|
|
42
|
-
Item: TimelineItem,
|
|
43
|
-
Badge: TimelineBadge,
|
|
44
|
-
Body: TimelineBody,
|
|
45
|
-
Break: TimelineBreak
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
//#endregion
|
|
49
|
-
export { Timeline$1 as Timeline };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Box } from "./Box.js";
|
|
2
|
-
import { ToggleSwitch } from "@primer/react";
|
|
3
|
-
import { forwardRef } from "react";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
|
|
6
|
-
//#region src/components/ToggleSwitch.tsx
|
|
7
|
-
const ToggleSwitch$1 = /* @__PURE__ */ forwardRef(function ToggleSwitch$2(props, ref) {
|
|
8
|
-
return /* @__PURE__ */ jsx(Box, {
|
|
9
|
-
as: ToggleSwitch,
|
|
10
|
-
ref,
|
|
11
|
-
...props
|
|
12
|
-
});
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
//#endregion
|
|
16
|
-
export { ToggleSwitch$1 as ToggleSwitch };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { sx } from "../sx.js";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
import { Token } from "@primer/react";
|
|
4
|
-
import { forwardRef } from "react";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
|
|
7
|
-
//#region src/components/Token.tsx
|
|
8
|
-
const StyledToken = styled(Token).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
9
|
-
displayName: "Token__StyledToken",
|
|
10
|
-
componentId: "sc-ldn0r8-0"
|
|
11
|
-
})(["", ""], sx);
|
|
12
|
-
const Token$1 = /* @__PURE__ */ forwardRef(({ as, ...props }, ref) => {
|
|
13
|
-
return /* @__PURE__ */ jsx(StyledToken, {
|
|
14
|
-
...props,
|
|
15
|
-
...as ? { forwardedAs: as } : {},
|
|
16
|
-
ref
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
//#endregion
|
|
21
|
-
export { Token$1 as Token };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Box } from "./Box.js";
|
|
2
|
-
import { Tooltip } from "@primer/react";
|
|
3
|
-
import { forwardRef } from "react";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
|
|
6
|
-
//#region src/components/Tooltip.tsx
|
|
7
|
-
const Tooltip$1 = /* @__PURE__ */ forwardRef(function Tooltip$2(props, ref) {
|
|
8
|
-
return /* @__PURE__ */ jsx(Box, {
|
|
9
|
-
as: Tooltip,
|
|
10
|
-
ref,
|
|
11
|
-
...props
|
|
12
|
-
});
|
|
13
|
-
});
|
|
14
|
-
Tooltip$1.__SLOT__ = Tooltip.__SLOT__;
|
|
15
|
-
|
|
16
|
-
//#endregion
|
|
17
|
-
export { Tooltip$1 as Tooltip };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { sx } from "../sx.js";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
import { Truncate } from "@primer/react";
|
|
4
|
-
|
|
5
|
-
//#region src/components/Truncate.tsx
|
|
6
|
-
const Truncate$1 = styled(Truncate).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
7
|
-
displayName: "Truncate",
|
|
8
|
-
componentId: "sc-x3i4it-0"
|
|
9
|
-
})(["", ""], sx);
|
|
10
|
-
|
|
11
|
-
//#endregion
|
|
12
|
-
export { Truncate$1 as Truncate };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { sx } from "../sx.js";
|
|
2
|
-
import { Box } from "./Box.js";
|
|
3
|
-
import styled from "styled-components";
|
|
4
|
-
import { UnderlineNav } from "@primer/react";
|
|
5
|
-
import { forwardRef } from "react";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
|
|
8
|
-
//#region src/components/UnderlineNav.tsx
|
|
9
|
-
const StyledUnderlineNav = /* @__PURE__ */ forwardRef(function UnderlineNav$2(props, ref) {
|
|
10
|
-
return /* @__PURE__ */ jsx(Box, {
|
|
11
|
-
as: UnderlineNav,
|
|
12
|
-
ref,
|
|
13
|
-
...props
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
const UnderlineNavImpl = /* @__PURE__ */ forwardRef(({ as, ...props }, ref) => /* @__PURE__ */ jsx(StyledUnderlineNav, {
|
|
17
|
-
...props,
|
|
18
|
-
...as ? { forwardedAs: as } : {},
|
|
19
|
-
ref
|
|
20
|
-
}));
|
|
21
|
-
const StyledUnderlineNavItem = styled(UnderlineNav.Item).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
22
|
-
displayName: "UnderlineNav__StyledUnderlineNavItem",
|
|
23
|
-
componentId: "sc-dx6br2-0"
|
|
24
|
-
})(["", ""], sx);
|
|
25
|
-
const UnderlineNavItem = /* @__PURE__ */ forwardRef(({ as, ...props }, ref) => /* @__PURE__ */ jsx(StyledUnderlineNavItem, {
|
|
26
|
-
...props,
|
|
27
|
-
...as ? { forwardedAs: as } : {},
|
|
28
|
-
ref
|
|
29
|
-
}));
|
|
30
|
-
const UnderlineNav$1 = Object.assign(UnderlineNavImpl, { Item: UnderlineNavItem });
|
|
31
|
-
|
|
32
|
-
//#endregion
|
|
33
|
-
export { UnderlineNav$1 as UnderlineNav };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { sx } from "../sx.js";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
import { UnderlinePanels } from "@primer/react/experimental";
|
|
5
|
-
|
|
6
|
-
//#region src/components/UnderlinePanels.tsx
|
|
7
|
-
const StyledUnderlinePanels = styled(UnderlinePanels).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
8
|
-
displayName: "UnderlinePanels__StyledUnderlinePanels",
|
|
9
|
-
componentId: "sc-1w35i85-0"
|
|
10
|
-
})(["", ""], sx);
|
|
11
|
-
const UnderlinePanelsImpl = ({ as, ...props }) => /* @__PURE__ */ jsx(StyledUnderlinePanels, {
|
|
12
|
-
forwardedAs: as,
|
|
13
|
-
...props
|
|
14
|
-
});
|
|
15
|
-
UnderlinePanelsImpl.displayName = "UnderlinePanels";
|
|
16
|
-
const UnderlinePanels$1 = Object.assign(UnderlinePanelsImpl, {
|
|
17
|
-
Tab: UnderlinePanels.Tab,
|
|
18
|
-
Panel: UnderlinePanels.Panel
|
|
19
|
-
});
|
|
20
|
-
UnderlinePanelsImpl.__SLOT__ = UnderlinePanels.__SLOT__;
|
|
21
|
-
|
|
22
|
-
//#endregion
|
|
23
|
-
export { UnderlinePanels$1 as UnderlinePanels };
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { sx } from "../../sx.js";
|
|
2
|
-
import { Box } from "../Box.js";
|
|
3
|
-
import styled from "styled-components";
|
|
4
|
-
import { forwardRef } from "react";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
import { ActionList } from "@primer/react/deprecated";
|
|
7
|
-
|
|
8
|
-
//#region src/components/deprecated/ActionList.tsx
|
|
9
|
-
const ActionListImpl = /* @__PURE__ */ forwardRef(function ActionList$2(props, ref) {
|
|
10
|
-
return /* @__PURE__ */ jsx(Box, {
|
|
11
|
-
as: ActionList,
|
|
12
|
-
ref,
|
|
13
|
-
...props
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
const StyledActionListItem = styled(ActionList.Item).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
17
|
-
displayName: "ActionList__StyledActionListItem",
|
|
18
|
-
componentId: "sc-1ugfmds-0"
|
|
19
|
-
})(["", ""], sx);
|
|
20
|
-
const ActionListItem = /* @__PURE__ */ forwardRef(({ as, ...props }, ref) => /* @__PURE__ */ jsx(StyledActionListItem, {
|
|
21
|
-
...props,
|
|
22
|
-
...as ? { forwardedAs: as } : {},
|
|
23
|
-
ref
|
|
24
|
-
}));
|
|
25
|
-
function ActionListGroup(props) {
|
|
26
|
-
return /* @__PURE__ */ jsx(Box, {
|
|
27
|
-
as: ActionList.Group,
|
|
28
|
-
...props
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
function ActionListDivider(props) {
|
|
32
|
-
return /* @__PURE__ */ jsx(Box, {
|
|
33
|
-
as: ActionList.Divider,
|
|
34
|
-
...props
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
const ActionList$1 = Object.assign(ActionListImpl, {
|
|
38
|
-
Item: ActionListItem,
|
|
39
|
-
Group: ActionListGroup,
|
|
40
|
-
Divider: ActionListDivider
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
//#endregion
|
|
44
|
-
export { ActionList$1 as ActionList };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Box } from "../Box.js";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
import { Dialog } from "@primer/react/deprecated";
|
|
5
|
-
|
|
6
|
-
//#region src/components/deprecated/DialogV1.tsx
|
|
7
|
-
const StyledDialog = /* @__PURE__ */ forwardRef(function Dialog$2(props, ref) {
|
|
8
|
-
return /* @__PURE__ */ jsx(Box, {
|
|
9
|
-
as: Dialog,
|
|
10
|
-
ref,
|
|
11
|
-
...props
|
|
12
|
-
});
|
|
13
|
-
});
|
|
14
|
-
const DialogImpl = /* @__PURE__ */ forwardRef(({ as, ...props }, ref) => /* @__PURE__ */ jsx(StyledDialog, {
|
|
15
|
-
...props,
|
|
16
|
-
...as ? { forwardedAs: as } : {},
|
|
17
|
-
ref
|
|
18
|
-
}));
|
|
19
|
-
const StyledDialogHeader = /* @__PURE__ */ forwardRef(function DialogHeader$1(props, ref) {
|
|
20
|
-
return /* @__PURE__ */ jsx(Box, {
|
|
21
|
-
as: Dialog.Header,
|
|
22
|
-
ref,
|
|
23
|
-
...props
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
const DialogHeader = /* @__PURE__ */ forwardRef(({ as, ...props }, ref) => /* @__PURE__ */ jsx(StyledDialogHeader, {
|
|
27
|
-
...props,
|
|
28
|
-
...as ? { forwardedAs: as } : {},
|
|
29
|
-
ref
|
|
30
|
-
}));
|
|
31
|
-
const Dialog$1 = Object.assign(DialogImpl, { Header: DialogHeader });
|
|
32
|
-
|
|
33
|
-
//#endregion
|
|
34
|
-
export { Dialog$1 as Dialog };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { sx } from "../../sx.js";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
import { forwardRef } from "react";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
import { Octicon } from "@primer/react/deprecated";
|
|
6
|
-
|
|
7
|
-
//#region src/components/deprecated/Octicon.tsx
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated Use the icon component directly from `@primer/octicons-react` instead
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated Use the icon component directly from `@primer/octicons-react` instead
|
|
13
|
-
*/
|
|
14
|
-
const StyledOcticon = styled(Octicon).withConfig({ shouldForwardProp(prop) {
|
|
15
|
-
return prop !== "sx";
|
|
16
|
-
} }).withConfig({
|
|
17
|
-
displayName: "Octicon__StyledOcticon",
|
|
18
|
-
componentId: "sc-jtj3m8-0"
|
|
19
|
-
})(["", ""], ({ color, sx: sxProp }) => sx({ sx: {
|
|
20
|
-
color,
|
|
21
|
-
...sxProp
|
|
22
|
-
} }));
|
|
23
|
-
const Octicon$1 = /* @__PURE__ */ forwardRef(({ as, ...props }, ref) => {
|
|
24
|
-
return /* @__PURE__ */ jsx(StyledOcticon, {
|
|
25
|
-
...props,
|
|
26
|
-
...as ? { forwardedAs: as } : {},
|
|
27
|
-
ref
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
//#endregion
|
|
32
|
-
export { Octicon$1 as Octicon };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { sx } from "../../sx.js";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
import { forwardRef } from "react";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
import { TabNav } from "@primer/react/deprecated";
|
|
6
|
-
|
|
7
|
-
//#region src/components/deprecated/TabNav.tsx
|
|
8
|
-
const StyledTabNav = styled(TabNav).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
9
|
-
displayName: "TabNav__StyledTabNav",
|
|
10
|
-
componentId: "sc-13kad3t-0"
|
|
11
|
-
})(["", ""], sx);
|
|
12
|
-
const TabNavImpl = ({ as, ...props }) => {
|
|
13
|
-
return /* @__PURE__ */ jsx(StyledTabNav, {
|
|
14
|
-
...props,
|
|
15
|
-
...as ? { forwardedAs: as } : {}
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
const StyledTabNavLink = styled(TabNav.Link).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
19
|
-
displayName: "TabNav__StyledTabNavLink",
|
|
20
|
-
componentId: "sc-13kad3t-1"
|
|
21
|
-
})(["", ""], sx);
|
|
22
|
-
const TabNavLink = /* @__PURE__ */ forwardRef(({ as, ...props }, ref) => /* @__PURE__ */ jsx(StyledTabNavLink, {
|
|
23
|
-
...props,
|
|
24
|
-
...as ? { forwardedAs: as } : {},
|
|
25
|
-
ref
|
|
26
|
-
}));
|
|
27
|
-
const TabNav$1 = Object.assign(TabNavImpl, { Link: TabNavLink });
|
|
28
|
-
|
|
29
|
-
//#endregion
|
|
30
|
-
export { TabNav$1 as TabNav };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { sx } from "../../sx.js";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
import { forwardRef } from "react";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
import { Tooltip } from "@primer/react/deprecated";
|
|
6
|
-
|
|
7
|
-
//#region src/components/deprecated/Tooltip.tsx
|
|
8
|
-
const StyledTooltip = styled(Tooltip).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
9
|
-
displayName: "Tooltip__StyledTooltip",
|
|
10
|
-
componentId: "sc-145jcib-0"
|
|
11
|
-
})(["", ""], sx);
|
|
12
|
-
const Tooltip$1 = /* @__PURE__ */ forwardRef(function Tooltip$2({ as, ...props }, ref) {
|
|
13
|
-
return /* @__PURE__ */ jsx(StyledTooltip, {
|
|
14
|
-
...props,
|
|
15
|
-
...as ? { forwardedAs: as } : {},
|
|
16
|
-
ref
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
Tooltip$1.alignments = Tooltip.alignments;
|
|
20
|
-
Tooltip$1.directions = Tooltip.directions;
|
|
21
|
-
Tooltip$1.__SLOT__ = Tooltip.__SLOT__;
|
|
22
|
-
|
|
23
|
-
//#endregion
|
|
24
|
-
export { Tooltip$1 as Tooltip };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { TabNav } from "./components/deprecated/TabNav.js";
|
|
2
|
-
import { Dialog } from "./components/deprecated/DialogV1.js";
|
|
3
|
-
import { Octicon } from "./components/deprecated/Octicon.js";
|
|
4
|
-
import { Tooltip } from "./components/deprecated/Tooltip.js";
|
|
5
|
-
import { ActionList } from "./components/deprecated/ActionList.js";
|
|
6
|
-
|
|
7
|
-
export { ActionList, Dialog, Octicon, TabNav, Tooltip };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Dialog } from "./components/Dialog.js";
|
|
2
|
-
import { PageHeader } from "./components/PageHeader.js";
|
|
3
|
-
import { Tooltip } from "./components/Tooltip.js";
|
|
4
|
-
import { UnderlinePanels } from "./components/UnderlinePanels.js";
|
|
5
|
-
import { Table } from "./components/DataTable.js";
|
|
6
|
-
|
|
7
|
-
export { Dialog, PageHeader, Table, Tooltip, UnderlinePanels };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
'use client';
|
|
3
|
-
|
|
4
|
-
import { import_cjs, sx } from "./sx.js";
|
|
5
|
-
import { Box } from "./components/Box.js";
|
|
6
|
-
import { ThemeProvider, useColorSchemeVar, useTheme } from "./components/ThemeProvider.js";
|
|
7
|
-
import { BaseStyles } from "./components/BaseStyles.js";
|
|
8
|
-
import { get } from "./theme-get.js";
|
|
9
|
-
import { ActionList } from "./components/ActionList.js";
|
|
10
|
-
import { ActionMenu } from "./components/ActionMenu.js";
|
|
11
|
-
import { Autocomplete } from "./components/Autocomplete.js";
|
|
12
|
-
import { Avatar } from "./components/Avatar.js";
|
|
13
|
-
import { Breadcrumb, Breadcrumbs } from "./components/Breadcrumbs.js";
|
|
14
|
-
import { ButtonComponent } from "./components/Button.js";
|
|
15
|
-
import { Checkbox } from "./components/Checkbox.js";
|
|
16
|
-
import { CheckboxGroup } from "./components/CheckboxGroup.js";
|
|
17
|
-
import { CircleBadge } from "./components/CircleBadge.js";
|
|
18
|
-
import { CounterLabel } from "./components/CounterLabel.js";
|
|
19
|
-
import { Dialog } from "./components/Dialog.js";
|
|
20
|
-
import { Flash } from "./components/Flash.js";
|
|
21
|
-
import { FormControl } from "./components/FormControl.js";
|
|
22
|
-
import { Header } from "./components/Header.js";
|
|
23
|
-
import { Heading } from "./components/Heading.js";
|
|
24
|
-
import { IconButton } from "./components/IconButton.js";
|
|
25
|
-
import { Label } from "./components/Label.js";
|
|
26
|
-
import { Link } from "./components/Link.js";
|
|
27
|
-
import { LinkButton } from "./components/LinkButton.js";
|
|
28
|
-
import { NavList } from "./components/NavList.js";
|
|
29
|
-
import { Overlay } from "./components/Overlay.js";
|
|
30
|
-
import { PageHeader } from "./components/PageHeader.js";
|
|
31
|
-
import { RadioGroup } from "./components/RadioGroup.js";
|
|
32
|
-
import { RelativeTime } from "./components/RelativeTime.js";
|
|
33
|
-
import { SegmentedControl } from "./components/SegmentedControl.js";
|
|
34
|
-
import { Select } from "./components/Select.js";
|
|
35
|
-
import { Spinner } from "./components/Spinner.js";
|
|
36
|
-
import { StateLabel } from "./components/StateLabel.js";
|
|
37
|
-
import { SubNav } from "./components/SubNav.js";
|
|
38
|
-
import { Text } from "./components/Text.js";
|
|
39
|
-
import { Textarea } from "./components/Textarea.js";
|
|
40
|
-
import { TextInput } from "./components/TextInput.js";
|
|
41
|
-
import { Timeline } from "./components/Timeline.js";
|
|
42
|
-
import { ToggleSwitch } from "./components/ToggleSwitch.js";
|
|
43
|
-
import { Tooltip } from "./components/Tooltip.js";
|
|
44
|
-
import { Token } from "./components/Token.js";
|
|
45
|
-
import { Truncate } from "./components/Truncate.js";
|
|
46
|
-
import { UnderlineNav } from "./components/UnderlineNav.js";
|
|
47
|
-
import { Details, ProgressBar, theme } from "@primer/react";
|
|
48
|
-
|
|
49
|
-
var merge = import_cjs.default;
|
|
50
|
-
export { ActionList, ActionMenu, Autocomplete, Avatar, BaseStyles, Box, Breadcrumb, Breadcrumbs, ButtonComponent as Button, Checkbox, CheckboxGroup, CircleBadge, CounterLabel, Details, Dialog, Flash, FormControl, Header, Heading, IconButton, Label, Link, LinkButton, NavList, Overlay, PageHeader, ProgressBar, RadioGroup, RelativeTime, SegmentedControl, Select, Spinner, StateLabel, SubNav, Text, TextInput, Textarea, ThemeProvider, Timeline, ToggleSwitch, Token, Tooltip, Truncate, UnderlineNav, merge, sx, theme, get as themeGet, useColorSchemeVar, useTheme };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { __toESM } from "../../../_virtual/rolldown_runtime.js";
|
|
2
|
-
import { require_cjs } from "../../../node_modules/deepmerge/dist/cjs.js";
|
|
3
|
-
import css from "@styled-system/css";
|
|
4
|
-
|
|
5
|
-
//#region src/sx.ts
|
|
6
|
-
var import_cjs = /* @__PURE__ */ __toESM(require_cjs());
|
|
7
|
-
const sx = (props) => css(props.sx);
|
|
8
|
-
var sx_default = sx;
|
|
9
|
-
|
|
10
|
-
//#endregion
|
|
11
|
-
export { sx_default as default, import_cjs, sx };
|