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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/dist/_virtual/rolldown_runtime.js +29 -0
  2. package/dist/node_modules/clsx/dist/clsx.js +17 -0
  3. package/dist/node_modules/deepmerge/dist/cjs.js +88 -0
  4. package/dist/node_modules/focus-visible/dist/focus-visible.js +212 -0
  5. package/dist/packages/styled-react/src/components/ActionList.js +107 -0
  6. package/dist/packages/styled-react/src/components/ActionMenu.js +19 -0
  7. package/dist/packages/styled-react/src/components/Autocomplete.js +23 -0
  8. package/dist/packages/styled-react/src/components/Avatar.js +16 -0
  9. package/dist/{components → packages/styled-react/src/components}/BaseStyles.js +29 -47
  10. package/dist/packages/styled-react/src/components/Box.js +23 -0
  11. package/dist/packages/styled-react/src/components/Breadcrumbs.js +28 -0
  12. package/dist/packages/styled-react/src/components/Button.js +48 -0
  13. package/dist/packages/styled-react/src/components/Checkbox.js +17 -0
  14. package/dist/packages/styled-react/src/components/CheckboxGroup.js +41 -0
  15. package/dist/packages/styled-react/src/components/CircleBadge.js +12 -0
  16. package/dist/packages/styled-react/src/components/CounterLabel.js +16 -0
  17. package/dist/packages/styled-react/src/components/DataTable.js +24 -0
  18. package/dist/packages/styled-react/src/components/Dialog.js +64 -0
  19. package/dist/packages/styled-react/src/components/Flash.js +12 -0
  20. package/dist/packages/styled-react/src/components/FormControl.js +19 -0
  21. package/dist/packages/styled-react/src/components/Header.js +44 -0
  22. package/dist/packages/styled-react/src/components/Heading.js +12 -0
  23. package/dist/packages/styled-react/src/components/IconButton.js +27 -0
  24. package/dist/packages/styled-react/src/components/Label.js +21 -0
  25. package/dist/packages/styled-react/src/components/Link.js +21 -0
  26. package/dist/packages/styled-react/src/components/LinkButton.js +12 -0
  27. package/dist/packages/styled-react/src/components/NavList.js +55 -0
  28. package/dist/packages/styled-react/src/components/Overlay.js +12 -0
  29. package/dist/packages/styled-react/src/components/PageHeader.js +71 -0
  30. package/dist/packages/styled-react/src/components/RadioGroup.js +41 -0
  31. package/dist/packages/styled-react/src/components/RelativeTime.js +14 -0
  32. package/dist/packages/styled-react/src/components/SegmentedControl.js +33 -0
  33. package/dist/packages/styled-react/src/components/Select.js +19 -0
  34. package/dist/packages/styled-react/src/components/Spinner.js +12 -0
  35. package/dist/packages/styled-react/src/components/StateLabel.js +16 -0
  36. package/dist/packages/styled-react/src/components/SubNav.js +28 -0
  37. package/dist/packages/styled-react/src/components/Text.js +21 -0
  38. package/dist/packages/styled-react/src/components/TextInput.js +31 -0
  39. package/dist/packages/styled-react/src/components/Textarea.js +21 -0
  40. package/dist/packages/styled-react/src/components/ThemeProvider.js +152 -0
  41. package/dist/packages/styled-react/src/components/Timeline.js +49 -0
  42. package/dist/packages/styled-react/src/components/ToggleSwitch.js +16 -0
  43. package/dist/packages/styled-react/src/components/Token.js +21 -0
  44. package/dist/packages/styled-react/src/components/Tooltip.js +17 -0
  45. package/dist/packages/styled-react/src/components/Truncate.js +12 -0
  46. package/dist/packages/styled-react/src/components/UnderlineNav.js +33 -0
  47. package/dist/packages/styled-react/src/components/UnderlinePanels.js +23 -0
  48. package/dist/packages/styled-react/src/components/deprecated/ActionList.js +44 -0
  49. package/dist/packages/styled-react/src/components/deprecated/DialogV1.js +34 -0
  50. package/dist/packages/styled-react/src/components/deprecated/Octicon.js +32 -0
  51. package/dist/packages/styled-react/src/components/deprecated/TabNav.js +30 -0
  52. package/dist/packages/styled-react/src/components/deprecated/Tooltip.js +24 -0
  53. package/dist/packages/styled-react/src/deprecated.js +7 -0
  54. package/dist/packages/styled-react/src/experimental.js +7 -0
  55. package/dist/packages/styled-react/src/index.js +50 -0
  56. package/dist/packages/styled-react/src/sx.js +11 -0
  57. package/dist/packages/styled-react/src/theme-get.js +10 -0
  58. package/package.json +4 -4
  59. package/dist/components/ActionList.js +0 -163
  60. package/dist/components/ActionMenu.js +0 -19
  61. package/dist/components/Autocomplete.js +0 -25
  62. package/dist/components/Avatar.js +0 -14
  63. package/dist/components/Box.js +0 -15
  64. package/dist/components/Breadcrumbs.js +0 -38
  65. package/dist/components/Button.js +0 -112
  66. package/dist/components/Checkbox.js +0 -15
  67. package/dist/components/CheckboxGroup.js +0 -43
  68. package/dist/components/CircleBadge.js +0 -12
  69. package/dist/components/CounterLabel.js +0 -14
  70. package/dist/components/DataTable.js +0 -32
  71. package/dist/components/Dialog.js +0 -90
  72. package/dist/components/Flash.js +0 -12
  73. package/dist/components/FormControl.js +0 -19
  74. package/dist/components/Header.js +0 -52
  75. package/dist/components/Heading.js +0 -12
  76. package/dist/components/IconButton.js +0 -40
  77. package/dist/components/Label.js +0 -26
  78. package/dist/components/Link.js +0 -26
  79. package/dist/components/LinkButton.js +0 -12
  80. package/dist/components/NavList.js +0 -74
  81. package/dist/components/Overlay.js +0 -12
  82. package/dist/components/PageHeader.js +0 -109
  83. package/dist/components/RadioGroup.js +0 -43
  84. package/dist/components/RelativeTime.js +0 -14
  85. package/dist/components/SegmentedControl.js +0 -31
  86. package/dist/components/Select.js +0 -24
  87. package/dist/components/Spinner.js +0 -12
  88. package/dist/components/StateLabel.js +0 -14
  89. package/dist/components/SubNav.js +0 -26
  90. package/dist/components/Text.js +0 -26
  91. package/dist/components/TextInput.js +0 -38
  92. package/dist/components/Textarea.js +0 -26
  93. package/dist/components/ThemeProvider.js +0 -203
  94. package/dist/components/Timeline.js +0 -47
  95. package/dist/components/ToggleSwitch.js +0 -14
  96. package/dist/components/Token.js +0 -26
  97. package/dist/components/Tooltip.js +0 -15
  98. package/dist/components/Truncate.js +0 -12
  99. package/dist/components/UnderlineNav.js +0 -45
  100. package/dist/components/UnderlinePanels.js +0 -28
  101. package/dist/components/deprecated/ActionList.js +0 -49
  102. package/dist/components/deprecated/DialogV1.js +0 -44
  103. package/dist/components/deprecated/Octicon.js +0 -39
  104. package/dist/components/deprecated/TabNav.js +0 -44
  105. package/dist/components/deprecated/Tooltip.js +0 -32
  106. package/dist/deprecated.js +0 -5
  107. package/dist/experimental.js +0 -5
  108. package/dist/index.js +0 -46
  109. package/dist/sx.js +0 -8
  110. package/dist/theme-get.js +0 -10
@@ -0,0 +1,50 @@
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 };
@@ -0,0 +1,11 @@
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 };
@@ -0,0 +1,10 @@
1
+ import * as styledSystem from "styled-system";
2
+ import { theme } from "@primer/react";
3
+ import { themeGet } from "@styled-system/theme-get";
4
+
5
+ //#region src/theme-get.ts
6
+ const { get: getKey } = styledSystem;
7
+ const get = (key) => themeGet(key, getKey(theme, key));
8
+
9
+ //#endregion
10
+ export { get };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/styled-react",
3
- "version": "0.0.0-20251202212638",
3
+ "version": "0.0.0-20251202220556",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -43,7 +43,7 @@
43
43
  "devDependencies": {
44
44
  "@babel/preset-react": "^7.28.5",
45
45
  "@babel/preset-typescript": "^7.28.5",
46
- "@primer/react": "0.0.0-20251202212638",
46
+ "@primer/react": "0.0.0-20251202220556",
47
47
  "@rollup/plugin-babel": "^6.1.0",
48
48
  "@types/react": "18.3.11",
49
49
  "@types/react-dom": "18.3.1",
@@ -54,13 +54,13 @@
54
54
  "react": "18.3.1",
55
55
  "react-dom": "18.3.1",
56
56
  "rimraf": "^6.0.1",
57
- "rollup": "4.53.3",
57
+ "rolldown": "^1.0.0-beta.52",
58
58
  "rollup-plugin-typescript2": "^0.36.0",
59
59
  "styled-components": "5.3.11",
60
60
  "typescript": "^5.9.2"
61
61
  },
62
62
  "peerDependencies": {
63
- "@primer/react": "0.0.0-20251202212638",
63
+ "@primer/react": "0.0.0-20251202220556",
64
64
  "@types/react": "18.x || 19.x",
65
65
  "@types/react-dom": "18.x || 19.x",
66
66
  "@types/react-is": "18.x || 19.x",
@@ -1,163 +0,0 @@
1
- import React from 'react';
2
- import styled from 'styled-components';
3
- import { ActionList as ActionList$1 } from '@primer/react';
4
- import sx from '../sx.js';
5
- import { jsx } from 'react/jsx-runtime';
6
-
7
- const StyledActionList = styled(ActionList$1).withConfig({
8
- shouldForwardProp: prop => prop !== 'sx'
9
- }).withConfig({
10
- displayName: "ActionList__StyledActionList",
11
- componentId: "sc-hw2362-0"
12
- })(["", ""], sx);
13
- const ActionListImpl = /*#__PURE__*/React.forwardRef(function ActionListImpl({
14
- as,
15
- ...rest
16
- }, ref) {
17
- return /*#__PURE__*/jsx(StyledActionList, {
18
- ref: ref,
19
- ...rest,
20
- ...(as ? {
21
- forwardedAs: as
22
- } : {})
23
- });
24
- });
25
- const StyledActionListLinkItem = styled(ActionList$1.LinkItem).withConfig({
26
- shouldForwardProp: prop => prop !== 'sx'
27
- }).withConfig({
28
- displayName: "ActionList__StyledActionListLinkItem",
29
- componentId: "sc-hw2362-1"
30
- })(["", ""], sx);
31
- const ActionListLinkItem = /*#__PURE__*/React.forwardRef(({
32
- children,
33
- as,
34
- ...props
35
- }, ref) => /*#__PURE__*/jsx(StyledActionListLinkItem, {
36
- ref: ref,
37
- ...props,
38
- ...(as ? {
39
- forwardedAs: as
40
- } : {}),
41
- children: children
42
- }));
43
- ActionListLinkItem.displayName = 'ActionList.LinkItem';
44
- const StyledActionListTrailingAction = styled(ActionList$1.TrailingAction).withConfig({
45
- shouldForwardProp: prop => prop !== 'sx'
46
- }).withConfig({
47
- displayName: "ActionList__StyledActionListTrailingAction",
48
- componentId: "sc-hw2362-2"
49
- })(["", ""], sx);
50
- const ActionListTrailingAction = /*#__PURE__*/React.forwardRef((props, ref) => {
51
- const {
52
- as,
53
- ...rest
54
- } = props;
55
- return /*#__PURE__*/jsx(StyledActionListTrailingAction, {
56
- ...rest,
57
- ...(as ? {
58
- forwardedAs: as
59
- } : {}),
60
- ref: ref
61
- });
62
- });
63
- const StyledActionListItem = styled(ActionList$1.Item).withConfig({
64
- shouldForwardProp: prop => prop !== 'sx'
65
- }).withConfig({
66
- displayName: "ActionList__StyledActionListItem",
67
- componentId: "sc-hw2362-3"
68
- })(["", ""], sx);
69
- const ActionListItem = /*#__PURE__*/React.forwardRef(({
70
- children,
71
- as,
72
- ...props
73
- }, ref) => /*#__PURE__*/jsx(StyledActionListItem, {
74
- ref: ref,
75
- ...props,
76
- ...(as ? {
77
- forwardedAs: as
78
- } : {}),
79
- children: children
80
- }));
81
- const StyledActionListGroup = styled(ActionList$1.Group).withConfig({
82
- shouldForwardProp: prop => prop !== 'sx'
83
- }).withConfig({
84
- displayName: "ActionList__StyledActionListGroup",
85
- componentId: "sc-hw2362-4"
86
- })(["", ""], sx);
87
- const ActionListGroup = ({
88
- children,
89
- as,
90
- ...props
91
- }) => /*#__PURE__*/jsx(StyledActionListGroup, {
92
- ...props,
93
- ...(as ? {
94
- forwardedAs: as
95
- } : {}),
96
- children: children
97
- });
98
- ActionListGroup.displayName = 'ActionList.Group';
99
- const ActionListDivider = styled(ActionList$1.Divider).withConfig({
100
- shouldForwardProp: prop => prop !== 'sx'
101
- }).withConfig({
102
- displayName: "ActionList__ActionListDivider",
103
- componentId: "sc-hw2362-5"
104
- })(["", ""], sx);
105
- const StyledActionListLeadingVisual = styled(ActionList$1.LeadingVisual).withConfig({
106
- shouldForwardProp: prop => prop !== 'sx'
107
- }).withConfig({
108
- displayName: "ActionList__StyledActionListLeadingVisual",
109
- componentId: "sc-hw2362-6"
110
- })(["", ""], sx);
111
- const ActionListLeadingVisual = ({
112
- children,
113
- as,
114
- ...props
115
- }) => /*#__PURE__*/jsx(StyledActionListLeadingVisual, {
116
- ...props,
117
- ...(as ? {
118
- forwardedAs: as
119
- } : {}),
120
- children: children
121
- });
122
- ActionListLeadingVisual.displayName = 'ActionList.LeadingVisual';
123
- const StyledActionListTrailingVisual = styled(ActionList$1.TrailingVisual).withConfig({
124
- shouldForwardProp: prop => prop !== 'sx'
125
- }).withConfig({
126
- displayName: "ActionList__StyledActionListTrailingVisual",
127
- componentId: "sc-hw2362-7"
128
- })(["", ""], sx);
129
- const ActionListTrailingVisual = ({
130
- children,
131
- as,
132
- ...props
133
- }) => /*#__PURE__*/jsx(StyledActionListTrailingVisual, {
134
- ...props,
135
- ...(as ? {
136
- forwardedAs: as
137
- } : {}),
138
- children: children
139
- });
140
- ActionListTrailingVisual.displayName = 'ActionList.TrailingVisual';
141
- const ActionList = Object.assign(ActionListImpl, {
142
- Item: ActionListItem,
143
- LinkItem: ActionListLinkItem,
144
- Group: ActionListGroup,
145
- GroupHeading: ActionList$1.GroupHeading,
146
- Divider: ActionListDivider,
147
- Description: ActionList$1.Description,
148
- LeadingVisual: ActionListLeadingVisual,
149
- TrailingVisual: ActionListTrailingVisual,
150
- Heading: ActionList$1.Heading,
151
- TrailingAction: ActionListTrailingAction
152
- });
153
-
154
- // Assign slot markers after component definitions
155
- ActionListItem.__SLOT__ = ActionList$1.Item.__SLOT__;
156
- ActionListLinkItem.__SLOT__ = ActionList$1.LinkItem.__SLOT__;
157
- ActionListGroup.__SLOT__ = ActionList$1.Group.__SLOT__;
158
- ActionListDivider.__SLOT__ = ActionList$1.Divider.__SLOT__;
159
- ActionListLeadingVisual.__SLOT__ = ActionList$1.LeadingVisual.__SLOT__;
160
- ActionListTrailingVisual.__SLOT__ = ActionList$1.TrailingVisual.__SLOT__;
161
- ActionListTrailingAction.__SLOT__ = ActionList$1.TrailingAction.__SLOT__;
162
-
163
- export { ActionList };
@@ -1,19 +0,0 @@
1
- import { ActionMenu as ActionMenu$1 } from '@primer/react';
2
- import sx from '../sx.js';
3
- import styled from 'styled-components';
4
-
5
- const ActionMenuOverlay = styled(ActionMenu$1.Overlay).withConfig({
6
- shouldForwardProp: prop => prop !== 'sx'
7
- }).withConfig({
8
- displayName: "ActionMenu__ActionMenuOverlay",
9
- componentId: "sc-w5s60e-0"
10
- })(["", ""], sx);
11
- const ActionMenu = Object.assign(ActionMenu$1, {
12
- Button: ActionMenu$1.Button,
13
- Anchor: ActionMenu$1.Anchor,
14
- Overlay: ActionMenuOverlay,
15
- Divider: ActionMenu$1.Divider
16
- });
17
- ActionMenuOverlay.__SLOT__ = ActionMenu$1.Overlay.__SLOT__;
18
-
19
- export { ActionMenu };
@@ -1,25 +0,0 @@
1
- import { Autocomplete as Autocomplete$1 } from '@primer/react';
2
- import sx from '../sx.js';
3
- import styled from 'styled-components';
4
-
5
- const AutocompleteOverlay = styled(Autocomplete$1.Overlay).withConfig({
6
- shouldForwardProp: prop => prop !== 'sx'
7
- }).withConfig({
8
- displayName: "Autocomplete__AutocompleteOverlay",
9
- componentId: "sc-j8ax2e-0"
10
- })(["", ""], sx);
11
- const AutocompleteInput = styled(Autocomplete$1.Input).withConfig({
12
- shouldForwardProp: prop => prop !== 'sx'
13
- }).withConfig({
14
- displayName: "Autocomplete__AutocompleteInput",
15
- componentId: "sc-j8ax2e-1"
16
- })(["", ""], sx);
17
- const Autocomplete = Object.assign(Autocomplete$1, {
18
- Context: Autocomplete$1.Context,
19
- Input: AutocompleteInput,
20
- Menu: Autocomplete$1.Menu,
21
- Overlay: AutocompleteOverlay
22
- });
23
- AutocompleteOverlay.__SLOT__ = Autocomplete$1.Overlay.__SLOT__;
24
-
25
- export { Autocomplete };
@@ -1,14 +0,0 @@
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 };
@@ -1,15 +0,0 @@
1
- import styled from 'styled-components';
2
- import { space, color, typography, layout, flexbox, grid, background, border, position, shadow } from 'styled-system';
3
- import sx from '../sx.js';
4
-
5
- /**
6
- * @deprecated The Box component is deprecated. Replace with a `div` or
7
- * appropriate HTML element instead, with CSS modules for styling.
8
- * @see https://github.com/primer/react/blob/main/contributor-docs/migration-from-box.md
9
- */
10
- const Box = styled.div.withConfig({
11
- displayName: "Box",
12
- componentId: "sc-62in7e-0"
13
- })(space, color, typography, layout, flexbox, grid, background, border, position, shadow, sx);
14
-
15
- export { Box, Box as default };
@@ -1,38 +0,0 @@
1
- import { Breadcrumbs as Breadcrumbs$1 } from '@primer/react';
2
- import sx from '../sx.js';
3
- import styled from 'styled-components';
4
- import { jsx } from 'react/jsx-runtime';
5
-
6
- const BreadcrumbsImpl = styled(Breadcrumbs$1).withConfig({
7
- shouldForwardProp: prop => prop !== 'sx'
8
- }).withConfig({
9
- displayName: "Breadcrumbs__BreadcrumbsImpl",
10
- componentId: "sc-1qj8pw-0"
11
- })(["", ""], sx);
12
- const StyledBreadcrumbsItem = styled(Breadcrumbs$1.Item).withConfig({
13
- shouldForwardProp: prop => prop !== 'sx'
14
- }).withConfig({
15
- displayName: "Breadcrumbs__StyledBreadcrumbsItem",
16
- componentId: "sc-1qj8pw-1"
17
- })(["", ""], sx);
18
- function BreadcrumbsItem({
19
- as,
20
- ...props
21
- }) {
22
- return /*#__PURE__*/jsx(StyledBreadcrumbsItem, {
23
- ...props,
24
- ...(as ? {
25
- forwardedAs: as
26
- } : {})
27
- });
28
- }
29
- const Breadcrumbs = Object.assign(BreadcrumbsImpl, {
30
- Item: BreadcrumbsItem
31
- });
32
-
33
- /**
34
- * @deprecated Use the `Breadcrumbs` component instead (i.e. `<Breadcrumb>` → `<Breadcrumbs>`)
35
- */
36
- const Breadcrumb = Breadcrumbs;
37
-
38
- export { Breadcrumb, Breadcrumbs };
@@ -1,112 +0,0 @@
1
- import { Button } from '@primer/react';
2
- import { forwardRef } from 'react';
3
- import styled from 'styled-components';
4
- import sx from '../sx.js';
5
- import { jsx } from 'react/jsx-runtime';
6
-
7
- const StyledButtonComponent = styled(Button).withConfig({
8
- shouldForwardProp: prop => prop !== 'sx'
9
- }).withConfig({
10
- displayName: "Button__StyledButtonComponent",
11
- componentId: "sc-vqy3e4-0"
12
- })(["", ""], sx);
13
- const ButtonComponent = /*#__PURE__*/forwardRef(({
14
- as,
15
- sx,
16
- style: propStyle,
17
- ...props
18
- }, ref) => {
19
- const {
20
- block,
21
- size = 'medium',
22
- leadingVisual,
23
- trailingVisual,
24
- trailingAction
25
- } = props;
26
- let sxStyles = {};
27
- const style = {
28
- ...(propStyle || {})
29
- };
30
- if (sx !== null && Object.keys(sx || {}).length > 0) {
31
- sxStyles = generateCustomSxProp({
32
- block,
33
- size,
34
- leadingVisual,
35
- trailingVisual,
36
- trailingAction
37
- }, sx);
38
- const {
39
- color
40
- } = sx;
41
- if (color) style['--button-color'] = color;
42
- }
43
- return /*#__PURE__*/jsx(StyledButtonComponent, {
44
- style: style,
45
- sx: sxStyles,
46
- ref: ref,
47
- ...props,
48
- ...(as ? {
49
- forwardedAs: as
50
- } : {})
51
- });
52
- });
53
-
54
- // This function is used to generate a custom cssSelector for the sxProp
55
-
56
- // The usual sx prop can like this:
57
- // sx={{
58
- // [`@media (max-width: 768px)`]: {
59
- // '& > ul': {
60
- // backgroundColor: 'deeppink',
61
- // },
62
- // '&:hover': {
63
- // backgroundColor: 'yellow',
64
- // },
65
- // },
66
- // '&:hover': {
67
- // backgroundColor: 'yellow',
68
- // },
69
- // '&': {
70
- // width : 320px
71
- // }
72
- // }}
73
- //*
74
- /* What we want for Button styles is this:
75
- sx={{
76
- // [`@media (max-width: 768px)`]: {
77
- // '&[data-attribute="something"] > ul': {
78
- // backgroundColor: 'deeppink',
79
- // },
80
- // '&[data-attribute="something"]:hover': {
81
- // backgroundColor: 'yellow',
82
- // },
83
- // },
84
- // '&[data-attribute="something"]:hover': {
85
- // backgroundColor: 'yellow',
86
- // },
87
- // '&[data-attribute="something"]': {
88
- // width : 320px
89
- // }
90
- // }}
91
-
92
- // We need to make sure we append the customCSSSelector to the original class selector. i.e & - > &[data-attribute="Icon"][data-size="small"]
93
- */
94
- function generateCustomSxProp(props, providedSx) {
95
- // Possible data attributes: data-size, data-block, data-no-visuals
96
- const size = `[data-size="${props.size}"]`;
97
- const block = props.block ? `[data-block="block"]` : '';
98
- const noVisuals = props.leadingVisual || props.trailingVisual || props.trailingAction ? '' : '[data-no-visuals]';
99
-
100
- // this is a custom selector. We need to make sure we add the data attributes to the base css class (& -> &[data-attributename="value"]])
101
- const cssSelector = `&${size}${block}${noVisuals}`; // &[data-size="small"][data-block="block"][data-no-visuals]
102
-
103
- const customSxProp = {};
104
- if (!providedSx) return customSxProp;else {
105
- customSxProp[cssSelector] = providedSx;
106
- return customSxProp;
107
- }
108
- }
109
- ButtonComponent.displayName = 'Button';
110
- ButtonComponent.__SLOT__ = Button.__SLOT__;
111
-
112
- export { ButtonComponent, generateCustomSxProp };
@@ -1,15 +0,0 @@
1
- import { Checkbox as Checkbox$1 } from '@primer/react';
2
- import Box from './Box.js';
3
- import { forwardRef } from 'react';
4
- import { jsx } from 'react/jsx-runtime';
5
-
6
- const Checkbox = /*#__PURE__*/forwardRef(function Checkbox(props, ref) {
7
- return /*#__PURE__*/jsx(Box, {
8
- as: Checkbox$1,
9
- ref: ref,
10
- ...props
11
- });
12
- });
13
- Checkbox.__SLOT__ = Checkbox$1.__SLOT__;
14
-
15
- export { Checkbox };
@@ -1,43 +0,0 @@
1
- import { CheckboxGroup as CheckboxGroup$1 } from '@primer/react';
2
- import 'react';
3
- import Box from './Box.js';
4
- import { jsx } from 'react/jsx-runtime';
5
-
6
- const CheckboxGroupImpl = props => {
7
- return /*#__PURE__*/jsx(Box, {
8
- as: CheckboxGroup$1,
9
- ...props
10
- });
11
- };
12
-
13
- // Define local types based on the internal component props
14
-
15
- const CheckboxOrRadioGroupLabel = props => {
16
- return /*#__PURE__*/jsx(Box, {
17
- as: CheckboxGroup$1.Label,
18
- ...props
19
- });
20
- };
21
- const CheckboxOrRadioGroupCaption = props => {
22
- return /*#__PURE__*/jsx(Box, {
23
- as: CheckboxGroup$1.Caption,
24
- ...props
25
- });
26
- };
27
- const CheckboxOrRadioGroupValidation = props => {
28
- return /*#__PURE__*/jsx(Box, {
29
- as: CheckboxGroup$1.Validation,
30
- ...props
31
- });
32
- };
33
- const CheckboxGroup = Object.assign(CheckboxGroupImpl, {
34
- Label: CheckboxOrRadioGroupLabel,
35
- Caption: CheckboxOrRadioGroupCaption,
36
- Validation: CheckboxOrRadioGroupValidation
37
- });
38
- CheckboxGroupImpl.__SLOT__ = CheckboxGroup$1.__SLOT__;
39
- CheckboxOrRadioGroupLabel.__SLOT__ = CheckboxGroup$1.Label.__SLOT__;
40
- CheckboxOrRadioGroupCaption.__SLOT__ = CheckboxGroup$1.Caption.__SLOT__;
41
- CheckboxOrRadioGroupValidation.__SLOT__ = CheckboxGroup$1.Validation.__SLOT__;
42
-
43
- export { CheckboxGroup };
@@ -1,12 +0,0 @@
1
- import { CircleBadge as CircleBadge$1 } from '@primer/react';
2
- import styled from 'styled-components';
3
- import sx from '../sx.js';
4
-
5
- const CircleBadge = styled(CircleBadge$1).withConfig({
6
- shouldForwardProp: prop => prop !== 'sx'
7
- }).withConfig({
8
- displayName: "CircleBadge",
9
- componentId: "sc-1u7lp3v-0"
10
- })(["", ""], sx);
11
-
12
- export { CircleBadge };
@@ -1,14 +0,0 @@
1
- import { CounterLabel as CounterLabel$1 } from '@primer/react';
2
- import Box from './Box.js';
3
- import { forwardRef } from 'react';
4
- import { jsx } from 'react/jsx-runtime';
5
-
6
- const CounterLabel = /*#__PURE__*/forwardRef(function CounterLabel(props, ref) {
7
- return /*#__PURE__*/jsx(Box, {
8
- as: CounterLabel$1,
9
- ref: ref,
10
- ...props
11
- });
12
- });
13
-
14
- export { CounterLabel };
@@ -1,32 +0,0 @@
1
- import { Table as Table$1 } from '@primer/react/experimental';
2
- import sx from '../sx.js';
3
- import styled from 'styled-components';
4
- import { jsx } from 'react/jsx-runtime';
5
-
6
- const {
7
- Container: PrimerDataTableContainer,
8
- ...rest
9
- } = Table$1;
10
- const StyleDataTableContainer = styled(PrimerDataTableContainer).withConfig({
11
- shouldForwardProp: prop => prop !== 'sx'
12
- }).withConfig({
13
- displayName: "DataTable__StyleDataTableContainer",
14
- componentId: "sc-qy1ey2-0"
15
- })(["", ""], sx);
16
- function DataTableContainer({
17
- as,
18
- ...rest
19
- }) {
20
- return /*#__PURE__*/jsx(StyleDataTableContainer, {
21
- ...rest,
22
- ...(as ? {
23
- forwardedAs: as
24
- } : {})
25
- });
26
- }
27
- const Table = Object.assign(Table$1, {
28
- Container: DataTableContainer,
29
- ...rest
30
- });
31
-
32
- export { Table };