@primer/styled-react 0.0.0-20251205154953 → 0.0.0-20251208025650
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 +145 -89
- package/dist/components/ActionMenu.js +15 -15
- package/dist/components/Autocomplete.js +20 -18
- package/dist/components/Avatar.js +11 -13
- package/dist/components/BaseStyles.js +47 -28
- package/dist/components/Box.js +10 -18
- package/dist/components/Breadcrumbs.js +32 -22
- package/dist/components/Button.js +105 -41
- package/dist/components/Checkbox.js +12 -14
- package/dist/components/CheckboxGroup.js +36 -34
- package/dist/components/CircleBadge.js +10 -10
- package/dist/components/CounterLabel.js +11 -13
- package/dist/components/DataTable.js +27 -19
- package/dist/components/Dialog.js +79 -53
- package/dist/components/Flash.js +9 -9
- package/dist/components/FormControl.js +15 -15
- package/dist/components/Header.js +44 -36
- package/dist/components/Heading.js +9 -9
- package/dist/components/IconButton.js +36 -23
- package/dist/components/Label.js +22 -17
- package/dist/components/Link.js +22 -17
- package/dist/components/LinkButton.js +9 -9
- package/dist/components/NavList.js +65 -46
- package/dist/components/Overlay.js +9 -9
- package/dist/components/PageHeader.js +100 -62
- package/dist/components/RadioGroup.js +36 -34
- package/dist/components/RelativeTime.js +11 -11
- package/dist/components/SegmentedControl.js +25 -27
- package/dist/components/Select.js +20 -15
- package/dist/components/Spinner.js +9 -9
- package/dist/components/StateLabel.js +11 -13
- package/dist/components/SubNav.js +21 -23
- package/dist/components/Text.js +22 -17
- package/dist/components/TextInput.js +32 -25
- package/dist/components/Textarea.js +22 -17
- package/dist/components/ThemeProvider.js +185 -132
- package/dist/components/Timeline.js +38 -40
- package/dist/components/ToggleSwitch.js +11 -13
- package/dist/components/Token.js +22 -17
- package/dist/components/Tooltip.js +12 -14
- package/dist/components/Truncate.js +9 -9
- package/dist/components/UnderlineNav.js +39 -27
- package/dist/components/UnderlinePanels.js +23 -18
- package/dist/components/deprecated/ActionList.js +39 -34
- package/dist/components/deprecated/DialogV1.js +38 -28
- package/dist/components/deprecated/Octicon.js +35 -28
- package/dist/components/deprecated/TabNav.js +38 -24
- package/dist/components/deprecated/Tooltip.js +28 -20
- package/dist/deprecated.js +5 -7
- package/dist/experimental.js +5 -7
- package/dist/index.js +46 -48
- package/dist/sx.js +6 -7
- package/dist/theme-get.js +8 -8
- package/package.json +4 -7
|
@@ -1,41 +1,43 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { RadioGroup as RadioGroup$1 } from '@primer/react';
|
|
2
|
+
import 'react';
|
|
3
|
+
import Box from './Box.js';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
});
|
|
6
|
+
const RadioGroupImpl = props => {
|
|
7
|
+
return /*#__PURE__*/jsx(Box, {
|
|
8
|
+
as: RadioGroup$1,
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
|
|
13
|
+
// Define local types based on the internal component props
|
|
14
|
+
|
|
15
|
+
const CheckboxOrRadioGroupLabel = props => {
|
|
16
|
+
return /*#__PURE__*/jsx(Box, {
|
|
17
|
+
as: RadioGroup$1.Label,
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
17
20
|
};
|
|
18
|
-
const CheckboxOrRadioGroupCaption =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
const CheckboxOrRadioGroupCaption = props => {
|
|
22
|
+
return /*#__PURE__*/jsx(Box, {
|
|
23
|
+
as: RadioGroup$1.Caption,
|
|
24
|
+
...props
|
|
25
|
+
});
|
|
23
26
|
};
|
|
24
|
-
const CheckboxOrRadioGroupValidation =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
const CheckboxOrRadioGroupValidation = props => {
|
|
28
|
+
return /*#__PURE__*/jsx(Box, {
|
|
29
|
+
as: RadioGroup$1.Validation,
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
29
32
|
};
|
|
30
|
-
const RadioGroup
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
const RadioGroup = Object.assign(RadioGroupImpl, {
|
|
34
|
+
Label: CheckboxOrRadioGroupLabel,
|
|
35
|
+
Caption: CheckboxOrRadioGroupCaption,
|
|
36
|
+
Validation: CheckboxOrRadioGroupValidation
|
|
34
37
|
});
|
|
35
|
-
RadioGroupImpl.__SLOT__ = RadioGroup.__SLOT__;
|
|
36
|
-
CheckboxOrRadioGroupLabel.__SLOT__ = RadioGroup.Label.__SLOT__;
|
|
37
|
-
CheckboxOrRadioGroupCaption.__SLOT__ = RadioGroup.Caption.__SLOT__;
|
|
38
|
-
CheckboxOrRadioGroupValidation.__SLOT__ = RadioGroup.Validation.__SLOT__;
|
|
38
|
+
RadioGroupImpl.__SLOT__ = RadioGroup$1.__SLOT__;
|
|
39
|
+
CheckboxOrRadioGroupLabel.__SLOT__ = RadioGroup$1.Label.__SLOT__;
|
|
40
|
+
CheckboxOrRadioGroupCaption.__SLOT__ = RadioGroup$1.Caption.__SLOT__;
|
|
41
|
+
CheckboxOrRadioGroupValidation.__SLOT__ = RadioGroup$1.Validation.__SLOT__;
|
|
39
42
|
|
|
40
|
-
|
|
41
|
-
export { RadioGroup$1 as RadioGroup };
|
|
43
|
+
export { RadioGroup };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { RelativeTime as RelativeTime$1 } from '@primer/react';
|
|
2
|
+
import 'react';
|
|
3
|
+
import Box from './Box.js';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
function RelativeTime(props) {
|
|
7
|
+
// @ts-expect-error the types for Box are not correctly inferred here
|
|
8
|
+
return /*#__PURE__*/jsx(Box, {
|
|
9
|
+
as: RelativeTime$1,
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
export { RelativeTime$1 as RelativeTime };
|
|
14
|
+
export { RelativeTime };
|
|
@@ -1,33 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { jsx } from
|
|
1
|
+
import { SegmentedControl as SegmentedControl$1 } from '@primer/react';
|
|
2
|
+
import Box from './Box.js';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
});
|
|
5
|
+
const SegmentedControlButton = props => {
|
|
6
|
+
return /*#__PURE__*/jsx(Box, {
|
|
7
|
+
as: SegmentedControl$1.Button,
|
|
8
|
+
...props
|
|
9
|
+
});
|
|
11
10
|
};
|
|
12
|
-
const SegmentedControlIconButton =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
const SegmentedControlIconButton = props => {
|
|
12
|
+
return /*#__PURE__*/jsx(Box, {
|
|
13
|
+
as: SegmentedControl$1.IconButton,
|
|
14
|
+
...props
|
|
15
|
+
});
|
|
17
16
|
};
|
|
18
|
-
const SegmentedControlImpl =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
const SegmentedControlImpl = props => {
|
|
18
|
+
return /*#__PURE__*/jsx(Box, {
|
|
19
|
+
as: SegmentedControl$1,
|
|
20
|
+
...props
|
|
21
|
+
});
|
|
23
22
|
};
|
|
24
|
-
const SegmentedControl
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
const SegmentedControl = Object.assign(SegmentedControlImpl, {
|
|
24
|
+
__SLOT__: SegmentedControl$1.__SLOT__,
|
|
25
|
+
Button: SegmentedControlButton,
|
|
26
|
+
IconButton: SegmentedControlIconButton
|
|
28
27
|
});
|
|
29
|
-
SegmentedControlButton.__SLOT__ = SegmentedControl.Button.__SLOT__;
|
|
30
|
-
SegmentedControlIconButton.__SLOT__ = SegmentedControl.IconButton.__SLOT__;
|
|
28
|
+
SegmentedControlButton.__SLOT__ = SegmentedControl$1.Button.__SLOT__;
|
|
29
|
+
SegmentedControlIconButton.__SLOT__ = SegmentedControl$1.IconButton.__SLOT__;
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
export { SegmentedControl$1 as SegmentedControl };
|
|
31
|
+
export { SegmentedControl };
|
|
@@ -1,19 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { jsx } from
|
|
1
|
+
import { Select as Select$1 } from '@primer/react';
|
|
2
|
+
import sx from '../sx.js';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
const StyledSelect = styled(Select$1).withConfig({
|
|
7
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
8
|
+
}).withConfig({
|
|
9
|
+
displayName: "Select__StyledSelect",
|
|
10
|
+
componentId: "sc-1pyiuc8-0"
|
|
10
11
|
})(["", ""], sx);
|
|
11
|
-
const Select
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
const Select = ({
|
|
13
|
+
as,
|
|
14
|
+
...props
|
|
15
|
+
}) => {
|
|
16
|
+
return /*#__PURE__*/jsx(StyledSelect, {
|
|
17
|
+
...props,
|
|
18
|
+
...(as ? {
|
|
19
|
+
forwardedAs: as
|
|
20
|
+
} : {})
|
|
21
|
+
});
|
|
16
22
|
};
|
|
17
23
|
|
|
18
|
-
|
|
19
|
-
export { Select$1 as Select };
|
|
24
|
+
export { Select };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { Spinner as Spinner$1 } from '@primer/react';
|
|
2
|
+
import sx from '../sx.js';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
const Spinner = styled(Spinner$1).withConfig({
|
|
6
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
7
|
+
}).withConfig({
|
|
8
|
+
displayName: "Spinner",
|
|
9
|
+
componentId: "sc-jbw2a0-0"
|
|
9
10
|
})(["", ""], sx);
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
export { Spinner$1 as Spinner };
|
|
12
|
+
export { Spinner };
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { jsx } from
|
|
1
|
+
import { StateLabel as StateLabel$1 } from '@primer/react';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import Box from './Box.js';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
});
|
|
6
|
+
const StateLabel = /*#__PURE__*/forwardRef(function StateLabel(props, ref) {
|
|
7
|
+
return /*#__PURE__*/jsx(Box, {
|
|
8
|
+
as: StateLabel$1,
|
|
9
|
+
ref: ref,
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
13
12
|
});
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
export { StateLabel$1 as StateLabel };
|
|
14
|
+
export { StateLabel };
|
|
@@ -1,28 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { jsx } from
|
|
1
|
+
import { SubNav as SubNav$1 } from '@primer/react';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import Box from './Box.js';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
});
|
|
6
|
+
const SubNavImpl = /*#__PURE__*/forwardRef(function SubNav(props, ref) {
|
|
7
|
+
return /*#__PURE__*/jsx(Box, {
|
|
8
|
+
as: SubNav$1,
|
|
9
|
+
ref: ref,
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
13
12
|
});
|
|
14
|
-
const SubNavLink =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
const SubNavLink = /*#__PURE__*/forwardRef(function SubNavLink(props, ref) {
|
|
14
|
+
return /*#__PURE__*/jsx(Box, {
|
|
15
|
+
as: SubNav$1.Link,
|
|
16
|
+
ref: ref,
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
20
19
|
});
|
|
21
|
-
const SubNav
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
const SubNav = Object.assign(SubNavImpl, {
|
|
21
|
+
__SLOT__: SubNav$1.__SLOT__,
|
|
22
|
+
Link: SubNavLink
|
|
24
23
|
});
|
|
25
|
-
SubNavLink.__SLOT__ = SubNav.Link.__SLOT__;
|
|
24
|
+
SubNavLink.__SLOT__ = SubNav$1.Link.__SLOT__;
|
|
26
25
|
|
|
27
|
-
|
|
28
|
-
export { SubNav$1 as SubNav };
|
|
26
|
+
export { SubNav };
|
package/dist/components/Text.js
CHANGED
|
@@ -1,21 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { forwardRef } from
|
|
5
|
-
import { jsx } from
|
|
1
|
+
import { Text as Text$1 } from '@primer/react';
|
|
2
|
+
import sx from '../sx.js';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
const StyledText = styled(Text$1).withConfig({
|
|
8
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
9
|
+
}).withConfig({
|
|
10
|
+
displayName: "Text__StyledText",
|
|
11
|
+
componentId: "sc-1klmep6-0"
|
|
11
12
|
})(["", ""], sx);
|
|
12
|
-
const Text
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
const Text = /*#__PURE__*/forwardRef(({
|
|
14
|
+
as,
|
|
15
|
+
...props
|
|
16
|
+
}, ref) => {
|
|
17
|
+
return /*#__PURE__*/jsx(StyledText, {
|
|
18
|
+
...props,
|
|
19
|
+
...(as ? {
|
|
20
|
+
forwardedAs: as
|
|
21
|
+
} : {}),
|
|
22
|
+
ref: ref
|
|
23
|
+
});
|
|
18
24
|
});
|
|
19
25
|
|
|
20
|
-
|
|
21
|
-
export { Text$1 as Text };
|
|
26
|
+
export { Text };
|
|
@@ -1,31 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { jsx } from
|
|
1
|
+
import { TextInput as TextInput$1 } from '@primer/react';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import sx from '../sx.js';
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
const StyledTextInput = styled(TextInput$1).withConfig({
|
|
8
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
9
|
+
}).withConfig({
|
|
10
|
+
displayName: "TextInput__StyledTextInput",
|
|
11
|
+
componentId: "sc-ttxlvl-0"
|
|
11
12
|
})(["", ""], sx);
|
|
12
|
-
const TextInputImpl =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
const TextInputImpl = /*#__PURE__*/forwardRef(({
|
|
14
|
+
as,
|
|
15
|
+
...props
|
|
16
|
+
}, ref) => {
|
|
17
|
+
return /*#__PURE__*/jsx(StyledTextInput, {
|
|
18
|
+
ref: ref,
|
|
19
|
+
...props,
|
|
20
|
+
...(as ? {
|
|
21
|
+
forwardedAs: as
|
|
22
|
+
} : {})
|
|
23
|
+
});
|
|
18
24
|
});
|
|
19
|
-
const TextInputAction = styled(TextInput.Action).withConfig({
|
|
20
|
-
|
|
21
|
-
|
|
25
|
+
const TextInputAction = styled(TextInput$1.Action).withConfig({
|
|
26
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
27
|
+
}).withConfig({
|
|
28
|
+
displayName: "TextInput__TextInputAction",
|
|
29
|
+
componentId: "sc-ttxlvl-1"
|
|
22
30
|
})(["", ""], sx);
|
|
23
|
-
const TextInput
|
|
24
|
-
|
|
25
|
-
|
|
31
|
+
const TextInput = Object.assign(TextInputImpl, {
|
|
32
|
+
__SLOT__: TextInput$1.__SLOT__,
|
|
33
|
+
Action: TextInputAction
|
|
26
34
|
});
|
|
27
|
-
TextInputAction.displayName =
|
|
28
|
-
TextInputImpl.displayName =
|
|
35
|
+
TextInputAction.displayName = 'TextInputAction';
|
|
36
|
+
TextInputImpl.displayName = 'TextInput';
|
|
29
37
|
|
|
30
|
-
|
|
31
|
-
export { TextInput$1 as TextInput };
|
|
38
|
+
export { TextInput };
|
|
@@ -1,21 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import styled from
|
|
3
|
-
import
|
|
4
|
-
import { forwardRef } from
|
|
5
|
-
import { jsx } from
|
|
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
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
const StyledTextarea = styled(Textarea$1).withConfig({
|
|
8
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
9
|
+
}).withConfig({
|
|
10
|
+
displayName: "Textarea__StyledTextarea",
|
|
11
|
+
componentId: "sc-40d1gp-0"
|
|
11
12
|
})(["", ""], sx);
|
|
12
|
-
const Textarea
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
+
});
|
|
18
24
|
});
|
|
19
25
|
|
|
20
|
-
|
|
21
|
-
export { Textarea$1 as Textarea };
|
|
26
|
+
export { Textarea };
|