@primer/styled-react 1.0.0-rc.0 → 1.0.0-rc.10
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/README.md +18 -0
- package/dist/components/ActionList.d.ts +44 -0
- package/dist/components/ActionList.d.ts.map +1 -0
- package/dist/components/ActionList.js +163 -0
- package/dist/components/ActionMenu.d.ts +13 -0
- package/dist/components/ActionMenu.d.ts.map +1 -0
- package/dist/components/ActionMenu.js +19 -0
- package/dist/components/Autocomplete.d.ts +17 -0
- package/dist/components/Autocomplete.d.ts.map +1 -0
- package/dist/components/Autocomplete.js +25 -0
- 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/BaseStyles.d.ts +17 -0
- package/dist/components/BaseStyles.d.ts.map +1 -0
- package/dist/components/BaseStyles.js +51 -0
- package/dist/components/Box.d.ts +19 -0
- package/dist/components/Box.d.ts.map +1 -0
- package/dist/components/Box.js +15 -0
- package/dist/components/Breadcrumbs.d.ts +18 -0
- package/dist/components/Breadcrumbs.d.ts.map +1 -0
- package/dist/components/Breadcrumbs.js +38 -0
- package/dist/components/Button.d.ts +12 -0
- package/dist/components/Button.d.ts.map +1 -0
- package/dist/components/Button.js +112 -0
- package/dist/components/Checkbox.d.ts +5 -0
- package/dist/components/Checkbox.d.ts.map +1 -0
- package/dist/components/Checkbox.js +15 -0
- package/dist/components/CheckboxGroup.d.ts +34 -0
- package/dist/components/CheckboxGroup.d.ts.map +1 -0
- package/dist/components/CheckboxGroup.js +43 -0
- package/dist/components/CircleBadge.d.ts +8 -0
- package/dist/components/CircleBadge.d.ts.map +1 -0
- package/dist/components/CircleBadge.js +12 -0
- package/dist/components/CounterLabel.d.ts +10 -0
- package/dist/components/CounterLabel.d.ts.map +1 -0
- package/dist/components/CounterLabel.js +14 -0
- package/dist/components/DataTable.d.ts +11 -0
- package/dist/components/DataTable.d.ts.map +1 -0
- package/dist/components/DataTable.js +32 -0
- package/dist/components/Dialog.d.ts +19 -0
- package/dist/components/Dialog.d.ts.map +1 -0
- package/dist/components/Dialog.js +43 -0
- package/dist/components/FeatureFlaggedTheming.d.ts +9 -0
- package/dist/components/FeatureFlaggedTheming.d.ts.map +1 -0
- package/dist/components/FeatureFlaggedTheming.js +54 -0
- package/dist/components/Flash.d.ts +8 -0
- package/dist/components/Flash.d.ts.map +1 -0
- package/dist/components/Flash.js +12 -0
- package/dist/components/FormControl.d.ts +13 -0
- package/dist/components/FormControl.d.ts.map +1 -0
- package/dist/components/FormControl.js +19 -0
- package/dist/components/Header.d.ts +11 -0
- package/dist/components/Header.d.ts.map +1 -0
- package/dist/components/Header.js +52 -0
- package/dist/components/Heading.d.ts +8 -0
- package/dist/components/Heading.d.ts.map +1 -0
- package/dist/components/Heading.js +12 -0
- package/dist/components/IconButton.d.ts +10 -0
- package/dist/components/IconButton.d.ts.map +1 -0
- package/dist/components/IconButton.js +40 -0
- package/dist/components/Label.d.ts +9 -0
- package/dist/components/Label.d.ts.map +1 -0
- package/dist/components/Label.js +26 -0
- package/dist/components/Link.d.ts +7 -0
- package/dist/components/Link.d.ts.map +1 -0
- package/dist/components/Link.js +26 -0
- package/dist/components/LinkButton.d.ts +8 -0
- package/dist/components/LinkButton.d.ts.map +1 -0
- package/dist/components/LinkButton.js +12 -0
- package/dist/components/NavList.d.ts +30 -0
- package/dist/components/NavList.d.ts.map +1 -0
- package/dist/components/NavList.js +74 -0
- package/dist/components/Overlay.d.ts +8 -0
- package/dist/components/Overlay.d.ts.map +1 -0
- package/dist/components/Overlay.js +12 -0
- package/dist/components/PageHeader.d.ts +31 -0
- package/dist/components/PageHeader.d.ts.map +1 -0
- package/dist/components/PageHeader.js +109 -0
- package/dist/components/PageLayout.d.ts +23 -0
- package/dist/components/PageLayout.d.ts.map +1 -0
- package/dist/components/PageLayout.js +43 -0
- package/dist/components/RadioGroup.d.ts +34 -0
- package/dist/components/RadioGroup.d.ts.map +1 -0
- package/dist/components/RadioGroup.js +43 -0
- package/dist/components/RelativeTime.d.ts +6 -0
- package/dist/components/RelativeTime.d.ts.map +1 -0
- package/dist/components/RelativeTime.js +14 -0
- package/dist/components/SegmentedControl.d.ts +19 -0
- package/dist/components/SegmentedControl.d.ts.map +1 -0
- package/dist/components/SegmentedControl.js +31 -0
- package/dist/components/Select.d.ts +8 -0
- package/dist/components/Select.d.ts.map +1 -0
- package/dist/components/Select.js +24 -0
- package/dist/components/Spinner.d.ts +5 -0
- package/dist/components/Spinner.d.ts.map +1 -0
- package/dist/components/Spinner.js +12 -0
- package/dist/components/StateLabel.d.ts +9 -0
- package/dist/components/StateLabel.d.ts.map +1 -0
- package/dist/components/StateLabel.js +14 -0
- package/dist/components/SubNav.d.ts +10 -0
- package/dist/components/SubNav.d.ts.map +1 -0
- package/dist/components/SubNav.js +26 -0
- package/dist/components/Text.d.ts +15 -0
- package/dist/components/Text.d.ts.map +1 -0
- package/dist/components/Text.js +26 -0
- package/dist/components/TextInput.d.ts +15 -0
- package/dist/components/TextInput.d.ts.map +1 -0
- package/dist/components/TextInput.js +38 -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 +30 -0
- package/dist/components/ThemeProvider.d.ts.map +1 -0
- package/dist/components/ThemeProvider.js +202 -0
- package/dist/components/Timeline.d.ts +26 -0
- package/dist/components/Timeline.d.ts.map +1 -0
- package/dist/components/Timeline.js +47 -0
- package/dist/components/ToggleSwitch.d.ts +6 -0
- package/dist/components/ToggleSwitch.d.ts.map +1 -0
- package/dist/components/ToggleSwitch.js +14 -0
- package/dist/components/Token.d.ts +8 -0
- package/dist/components/Token.d.ts.map +1 -0
- package/dist/components/Token.js +26 -0
- package/dist/components/Tooltip.d.ts +7 -0
- package/dist/components/Tooltip.d.ts.map +1 -0
- package/dist/components/Tooltip.js +15 -0
- package/dist/components/Truncate.d.ts +7 -0
- package/dist/components/Truncate.d.ts.map +1 -0
- package/dist/components/Truncate.js +12 -0
- package/dist/components/UnderlineNav.d.ts +11 -0
- package/dist/components/UnderlineNav.d.ts.map +1 -0
- package/dist/components/UnderlineNav.js +45 -0
- package/dist/components/UnderlinePanels.d.ts +14 -0
- package/dist/components/UnderlinePanels.d.ts.map +1 -0
- package/dist/components/UnderlinePanels.js +28 -0
- package/dist/components/deprecated/ActionList.d.ts +23 -0
- package/dist/components/deprecated/ActionList.d.ts.map +1 -0
- package/dist/components/deprecated/ActionList.js +49 -0
- package/dist/components/deprecated/DialogV1.d.ts +11 -0
- package/dist/components/deprecated/DialogV1.d.ts.map +1 -0
- package/dist/components/deprecated/DialogV1.js +44 -0
- package/dist/components/deprecated/Octicon.d.ts +17 -0
- package/dist/components/deprecated/Octicon.d.ts.map +1 -0
- package/dist/components/deprecated/Octicon.js +39 -0
- package/dist/components/deprecated/TabNav.d.ts +9 -0
- package/dist/components/deprecated/TabNav.d.ts.map +1 -0
- package/dist/components/deprecated/TabNav.js +44 -0
- package/dist/components/deprecated/Tooltip.d.ts +13 -0
- package/dist/components/deprecated/Tooltip.d.ts.map +1 -0
- package/dist/components/deprecated/Tooltip.js +32 -0
- package/dist/components.json +138 -0
- package/dist/deprecated.d.ts +6 -0
- package/dist/deprecated.d.ts.map +1 -0
- package/dist/deprecated.js +5 -1
- package/dist/experimental.d.ts +6 -0
- package/dist/experimental.d.ts.map +1 -0
- package/dist/experimental.js +5 -1
- package/dist/index.d.ts +48 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +45 -1
- package/dist/polymorphic.d.ts +38 -0
- package/dist/polymorphic.d.ts.map +1 -0
- package/dist/styled-props.d.ts +4 -0
- package/dist/styled-props.d.ts.map +1 -0
- package/dist/sx.d.ts +26 -0
- package/dist/sx.d.ts.map +1 -0
- package/dist/sx.js +8 -0
- package/package.json +11 -6
- package/dist/config/vitest/browser/setup.d.ts +0 -2
- package/dist/config/vitest/browser/setup.d.ts.map +0 -1
- package/dist/src/__tests__/exports.test.d.ts +0 -2
- package/dist/src/__tests__/exports.test.d.ts.map +0 -1
- package/dist/src/deprecated.d.ts +0 -2
- package/dist/src/deprecated.d.ts.map +0 -1
- package/dist/src/experimental.d.ts +0 -2
- package/dist/src/experimental.d.ts.map +0 -1
- package/dist/src/index.d.ts +0 -2
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/utils/__tests__/createStyledComponent.browser.test.d.ts +0 -2
- package/dist/src/utils/__tests__/createStyledComponent.browser.test.d.ts.map +0 -1
- package/dist/src/utils/createStyledComponent.d.ts +0 -20
- package/dist/src/utils/createStyledComponent.d.ts.map +0 -1
|
@@ -0,0 +1,112 @@
|
|
|
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 };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type CheckboxProps as PrimerCheckboxProps } from '@primer/react';
|
|
2
|
+
import { type SxProp } from '../sx';
|
|
3
|
+
export type CheckboxProps = PrimerCheckboxProps & SxProp;
|
|
4
|
+
export declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
5
|
+
//# sourceMappingURL=Checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../src/components/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,aAAa,IAAI,mBAAmB,EAAkB,MAAM,eAAe,CAAA;AAGpH,OAAO,EAAC,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAEjC,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,MAAM,CAAA;AAExD,eAAO,MAAM,QAAQ,yHAEnB,CACD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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 };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type CheckboxGroupProps as PrimerCheckboxGroupProps } from '@primer/react';
|
|
2
|
+
import React, { type PropsWithChildren } from 'react';
|
|
3
|
+
import type { SxProp } from '../sx';
|
|
4
|
+
export type CheckboxGroupProps = PropsWithChildren<PrimerCheckboxGroupProps> & SxProp;
|
|
5
|
+
type CheckboxOrRadioGroupLabelProps = PropsWithChildren<{
|
|
6
|
+
className?: string;
|
|
7
|
+
visuallyHidden?: boolean;
|
|
8
|
+
} & SxProp>;
|
|
9
|
+
type CheckboxOrRadioGroupCaptionProps = PropsWithChildren<{
|
|
10
|
+
className?: string;
|
|
11
|
+
} & SxProp>;
|
|
12
|
+
type CheckboxOrRadioGroupValidationProps = PropsWithChildren<{
|
|
13
|
+
className?: string;
|
|
14
|
+
variant: 'error' | 'success';
|
|
15
|
+
} & SxProp>;
|
|
16
|
+
export declare const CheckboxGroup: {
|
|
17
|
+
(props: CheckboxGroupProps): React.JSX.Element;
|
|
18
|
+
__SLOT__: symbol | undefined;
|
|
19
|
+
} & {
|
|
20
|
+
Label: {
|
|
21
|
+
(props: CheckboxOrRadioGroupLabelProps): React.JSX.Element;
|
|
22
|
+
__SLOT__: symbol | undefined;
|
|
23
|
+
};
|
|
24
|
+
Caption: {
|
|
25
|
+
(props: CheckboxOrRadioGroupCaptionProps): React.JSX.Element;
|
|
26
|
+
__SLOT__: symbol | undefined;
|
|
27
|
+
};
|
|
28
|
+
Validation: {
|
|
29
|
+
(props: CheckboxOrRadioGroupValidationProps): React.JSX.Element;
|
|
30
|
+
__SLOT__: symbol | undefined;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=CheckboxGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckboxGroup.d.ts","sourceRoot":"","sources":["../../src/components/CheckboxGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuC,KAAK,kBAAkB,IAAI,wBAAwB,EAAC,MAAM,eAAe,CAAA;AACvH,OAAO,KAAK,EAAE,EAAC,KAAK,iBAAiB,EAAC,MAAM,OAAO,CAAA;AACnD,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,OAAO,CAAA;AAGjC,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,CAAC,wBAAwB,CAAC,GAAG,MAAM,CAAA;AAOrF,KAAK,8BAA8B,GAAG,iBAAiB,CACrD;IACE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB,GAAG,MAAM,CACX,CAAA;AAKD,KAAK,gCAAgC,GAAG,iBAAiB,CACvD;IACE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,MAAM,CACX,CAAA;AAKD,KAAK,mCAAmC,GAAG,iBAAiB,CAC1D;IACE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,OAAO,GAAG,SAAS,CAAA;CAC7B,GAAG,MAAM,CACX,CAAA;AAKD,eAAO,MAAM,aAAa;YAlCQ,kBAAkB;;;;gBAWV,8BAA8B;;;;gBAS5B,gCAAgC;;;;gBAU7B,mCAAmC;;;CAQhF,CAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
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 };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type CircleBadgeProps as PrimerCircleBadgeProps } from '@primer/react';
|
|
2
|
+
import { type ForwardRefComponent } from '../polymorphic';
|
|
3
|
+
import { type SxProp } from '../sx';
|
|
4
|
+
type CircleBadgeProps<As extends React.ElementType> = PrimerCircleBadgeProps<As> & SxProp;
|
|
5
|
+
declare const CircleBadge: ForwardRefComponent<React.ElementType, CircleBadgeProps<React.ElementType>>;
|
|
6
|
+
export { CircleBadge };
|
|
7
|
+
export type { CircleBadgeProps };
|
|
8
|
+
//# sourceMappingURL=CircleBadge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CircleBadge.d.ts","sourceRoot":"","sources":["../../src/components/CircleBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmC,KAAK,gBAAgB,IAAI,sBAAsB,EAAC,MAAM,eAAe,CAAA;AAE/G,OAAO,EAAC,KAAK,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AACvD,OAAW,EAAC,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAErC,KAAK,gBAAgB,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,IAAI,sBAAsB,CAAC,EAAE,CAAC,GAAG,MAAM,CAAA;AAEzF,QAAA,MAAM,WAAW,EAAE,mBAAmB,CAAC,KAAK,CAAC,WAAW,EAAE,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,CAM5F,CAAA;AAED,OAAO,EAAC,WAAW,EAAC,CAAA;AACpB,YAAY,EAAC,gBAAgB,EAAC,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
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 };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type CounterLabelProps as PrimerCounterLabelProps } from '@primer/react';
|
|
2
|
+
import { type SxProp } from '../sx';
|
|
3
|
+
export type CounterLabelProps = PrimerCounterLabelProps & SxProp;
|
|
4
|
+
export declare const CounterLabel: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLSpanElement> & {
|
|
5
|
+
scheme?: "primary" | "secondary";
|
|
6
|
+
className?: string;
|
|
7
|
+
} & {
|
|
8
|
+
children?: import("react").ReactNode | undefined;
|
|
9
|
+
} & SxProp & import("react").RefAttributes<HTMLSpanElement>>;
|
|
10
|
+
//# sourceMappingURL=CounterLabel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CounterLabel.d.ts","sourceRoot":"","sources":["../../src/components/CounterLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,iBAAiB,IAAI,uBAAuB,EAAC,MAAM,eAAe,CAAA;AAGnH,OAAO,EAAC,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAEjC,MAAM,MAAM,iBAAiB,GAAG,uBAAuB,GAAG,MAAM,CAAA;AAEhE,eAAO,MAAM,YAAY;;;;;4DAEvB,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
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 };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Table as PrimerDataTable, type TableContainerProps } from '@primer/react/experimental';
|
|
2
|
+
import { type SxProp } from '../sx';
|
|
3
|
+
import type React from 'react';
|
|
4
|
+
type DataTableContainerProps<As extends React.ElementType = 'div'> = TableContainerProps<As> & SxProp;
|
|
5
|
+
declare function DataTableContainer<As extends React.ElementType = 'div'>({ as, ...rest }: DataTableContainerProps<As>): React.JSX.Element;
|
|
6
|
+
declare const Table: typeof PrimerDataTable & {
|
|
7
|
+
Container: typeof DataTableContainer;
|
|
8
|
+
};
|
|
9
|
+
export type { TableProps, TableHeadProps, TableBodyProps, TableRowProps, TableHeaderProps, TableCellProps, TableTitleProps, TableSubtitleProps, TableActionsProps, } from '@primer/react/experimental';
|
|
10
|
+
export { Table, type DataTableContainerProps };
|
|
11
|
+
//# sourceMappingURL=DataTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../src/components/DataTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,IAAI,eAAe,EAAE,KAAK,mBAAmB,EAAC,MAAM,4BAA4B,CAAA;AAC7F,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAErC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,KAAK,uBAAuB,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,KAAK,IAAI,mBAAmB,CAAC,EAAE,CAAC,GAAG,MAAM,CAAA;AAYrG,iBAAS,kBAAkB,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,KAAK,EAAE,EAAC,EAAE,EAAE,GAAG,IAAI,EAAC,EAAE,uBAAuB,CAAC,EAAE,CAAC,qBAE3G;AAED,QAAA,MAAM,KAAK,EAAE,OAAO,eAAe,GAAG;IACpC,SAAS,EAAE,OAAO,kBAAkB,CAAA;CAIpC,CAAA;AAEF,YAAY,EACV,UAAU,EACV,cAAc,EACd,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EAAC,KAAK,EAAE,KAAK,uBAAuB,EAAC,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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 };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { DialogProps as PrimerDialogProps } from '@primer/react';
|
|
2
|
+
import type { SxProp } from '../sx';
|
|
3
|
+
import { type PropsWithChildren } from 'react';
|
|
4
|
+
type DialogProps = PropsWithChildren<PrimerDialogProps> & SxProp;
|
|
5
|
+
type StyledBodyProps = React.ComponentProps<'div'> & SxProp;
|
|
6
|
+
type StyledFooterProps = React.ComponentProps<'div'> & SxProp;
|
|
7
|
+
declare const Dialog: import("react").ForwardRefExoticComponent<PrimerDialogProps & {
|
|
8
|
+
children?: import("react").ReactNode | undefined;
|
|
9
|
+
} & SxProp & import("react").RefAttributes<HTMLDivElement>> & {
|
|
10
|
+
Buttons: import("react").FC<PropsWithChildren<{
|
|
11
|
+
buttons: import("@primer/react").DialogButtonProps[];
|
|
12
|
+
}>>;
|
|
13
|
+
Header: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & SxProp & import("react").RefAttributes<HTMLDivElement>>;
|
|
14
|
+
Body: import("react").ForwardRefExoticComponent<Omit<StyledBodyProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
|
+
Footer: import("react").ForwardRefExoticComponent<Omit<StyledFooterProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
|
+
};
|
|
17
|
+
export { Dialog };
|
|
18
|
+
export type { DialogProps };
|
|
19
|
+
//# sourceMappingURL=Dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../src/components/Dialog.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,WAAW,IAAI,iBAAiB,EAAC,MAAM,eAAe,CAAA;AAEnE,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,OAAO,CAAA;AACjC,OAAO,EAA4C,KAAK,iBAAiB,EAAC,MAAM,OAAO,CAAA;AAEvF,KAAK,WAAW,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,GAAG,MAAM,CAAA;AAahE,KAAK,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,MAAM,CAAA;AAO3D,KAAK,iBAAiB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,MAAM,CAAA;AAM7D,QAAA,MAAM,MAAM;;;;;;;;;CAKV,CAAA;AAEF,OAAO,EAAC,MAAM,EAAC,CAAA;AACf,YAAY,EAAC,WAAW,EAAC,CAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Dialog as Dialog$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 DialogImpl = /*#__PURE__*/forwardRef(function Dialog(props, ref) {
|
|
7
|
+
// @ts-expect-error - PrimerDialog is not recognized as a valid component type
|
|
8
|
+
return /*#__PURE__*/jsx(Box, {
|
|
9
|
+
as: Dialog$1,
|
|
10
|
+
ref: ref,
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
const DialogHeader = /*#__PURE__*/forwardRef(function DialogHeader(props, ref) {
|
|
15
|
+
return /*#__PURE__*/jsx(Box, {
|
|
16
|
+
as: Dialog$1.Header,
|
|
17
|
+
ref: ref,
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
const DialogBody = /*#__PURE__*/forwardRef(function DialogBody(props, ref) {
|
|
22
|
+
// @ts-expect-error - PrimerDialog.Body is not recognized as a valid component type
|
|
23
|
+
return /*#__PURE__*/jsx(Box, {
|
|
24
|
+
as: Dialog$1.Body,
|
|
25
|
+
ref: ref,
|
|
26
|
+
...props
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
const DialogFooter = /*#__PURE__*/forwardRef(function DialogFooter(props, ref) {
|
|
30
|
+
return /*#__PURE__*/jsx(Box, {
|
|
31
|
+
as: Dialog$1.Footer,
|
|
32
|
+
ref: ref,
|
|
33
|
+
...props
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
const Dialog = Object.assign(DialogImpl, {
|
|
37
|
+
Buttons: Dialog$1.Buttons,
|
|
38
|
+
Header: DialogHeader,
|
|
39
|
+
Body: DialogBody,
|
|
40
|
+
Footer: DialogFooter
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export { Dialog };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { useTheme as primerReactUseTheme, useColorSchemeVar as primerReactUseColorSchemeVar } from '@primer/react';
|
|
2
|
+
import { type ThemeProviderProps } from './ThemeProvider';
|
|
3
|
+
import { type BaseStylesProps } from './BaseStyles';
|
|
4
|
+
export declare const ThemeProvider: React.FC<React.PropsWithChildren<ThemeProviderProps>>;
|
|
5
|
+
export declare const BaseStyles: React.FC<React.PropsWithChildren<BaseStylesProps>>;
|
|
6
|
+
export declare const useTheme: typeof primerReactUseTheme;
|
|
7
|
+
export declare const useColorSchemeVar: typeof primerReactUseColorSchemeVar;
|
|
8
|
+
export type { ThemeProviderProps, BaseStylesProps };
|
|
9
|
+
//# sourceMappingURL=FeatureFlaggedTheming.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FeatureFlaggedTheming.d.ts","sourceRoot":"","sources":["../../src/components/FeatureFlaggedTheming.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,QAAQ,IAAI,mBAAmB,EAC/B,iBAAiB,IAAI,4BAA4B,EAClD,MAAM,eAAe,CAAA;AACtB,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAsC,KAAK,eAAe,EAAC,MAAM,cAAc,CAAA;AAGtF,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CAO/E,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAOzE,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,OAAO,mBAM7B,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,OAAO,4BAMtC,CAAA;AAED,YAAY,EAAC,kBAAkB,EAAE,eAAe,EAAC,CAAA"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ThemeProvider as ThemeProvider$2, useTheme as useTheme$2, useColorSchemeVar as useColorSchemeVar$2, BaseStyles as BaseStyles$2 } from '@primer/react';
|
|
2
|
+
import { ThemeProvider as ThemeProvider$1, useTheme as useTheme$1, useColorSchemeVar as useColorSchemeVar$1 } from './ThemeProvider.js';
|
|
3
|
+
import { BaseStyles as BaseStyles$1 } from './BaseStyles.js';
|
|
4
|
+
import { useFeatureFlag } from '@primer/react/experimental';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
const ThemeProvider = ({
|
|
8
|
+
children,
|
|
9
|
+
...props
|
|
10
|
+
}) => {
|
|
11
|
+
const enabled = useFeatureFlag('primer_react_use_styled_react_theming');
|
|
12
|
+
if (enabled) {
|
|
13
|
+
return /*#__PURE__*/jsx(ThemeProvider$1, {
|
|
14
|
+
...props,
|
|
15
|
+
children: children
|
|
16
|
+
});
|
|
17
|
+
} else {
|
|
18
|
+
return /*#__PURE__*/jsx(ThemeProvider$2, {
|
|
19
|
+
...props,
|
|
20
|
+
children: children
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
const BaseStyles = ({
|
|
25
|
+
children,
|
|
26
|
+
...props
|
|
27
|
+
}) => {
|
|
28
|
+
const enabled = useFeatureFlag('primer_react_use_styled_react_theming');
|
|
29
|
+
if (enabled) {
|
|
30
|
+
return /*#__PURE__*/jsx(BaseStyles$1, {
|
|
31
|
+
...props,
|
|
32
|
+
children: children
|
|
33
|
+
});
|
|
34
|
+
} else {
|
|
35
|
+
return /*#__PURE__*/jsx(BaseStyles$2, {
|
|
36
|
+
...props,
|
|
37
|
+
children: children
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
const useTheme = () => {
|
|
42
|
+
const enabled = useFeatureFlag('primer_react_use_styled_react_theming');
|
|
43
|
+
const styledReactResults = useTheme$1();
|
|
44
|
+
const primerReactResults = useTheme$2();
|
|
45
|
+
return enabled ? styledReactResults : primerReactResults;
|
|
46
|
+
};
|
|
47
|
+
const useColorSchemeVar = (values, fallback) => {
|
|
48
|
+
const enabled = useFeatureFlag('primer_react_use_styled_react_theming');
|
|
49
|
+
const styledReactResults = useColorSchemeVar$1(values, fallback);
|
|
50
|
+
const primerReactResults = useColorSchemeVar$2(values, fallback);
|
|
51
|
+
return enabled ? styledReactResults : primerReactResults;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export { BaseStyles, ThemeProvider, useColorSchemeVar, useTheme };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type FlashProps as PrimerFlashProps } from '@primer/react';
|
|
2
|
+
import { type SxProp } from '../sx';
|
|
3
|
+
import type { ForwardRefComponent } from '../polymorphic';
|
|
4
|
+
type FlashProps = PrimerFlashProps & SxProp;
|
|
5
|
+
declare const Flash: ForwardRefComponent<'div', FlashProps>;
|
|
6
|
+
export { Flash };
|
|
7
|
+
export type { FlashProps };
|
|
8
|
+
//# sourceMappingURL=Flash.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Flash.d.ts","sourceRoot":"","sources":["../../src/components/Flash.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,UAAU,IAAI,gBAAgB,EAAuB,MAAM,eAAe,CAAA;AAEvF,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AACrC,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AAEvD,KAAK,UAAU,GAAG,gBAAgB,GAAG,MAAM,CAAA;AAE3C,QAAA,MAAM,KAAK,EAAE,mBAAmB,CAAC,KAAK,EAAE,UAAU,CAIjD,CAAA;AAED,OAAO,EAAC,KAAK,EAAC,CAAA;AACd,YAAY,EAAC,UAAU,EAAC,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Flash as Flash$1 } from '@primer/react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import sx from '../sx.js';
|
|
4
|
+
|
|
5
|
+
const Flash = styled(Flash$1).withConfig({
|
|
6
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
7
|
+
}).withConfig({
|
|
8
|
+
displayName: "Flash",
|
|
9
|
+
componentId: "sc-413izo-0"
|
|
10
|
+
})(["", ""], sx);
|
|
11
|
+
|
|
12
|
+
export { Flash };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FormControl as PrimerFormControl, type FormControlProps as PrimerFormControlProps } from '@primer/react';
|
|
2
|
+
import { type PropsWithChildren } from 'react';
|
|
3
|
+
import { type SxProp } from '../sx';
|
|
4
|
+
type FormControlProps = PropsWithChildren<PrimerFormControlProps> & SxProp;
|
|
5
|
+
declare const FormControlImpl: React.ComponentType<FormControlProps>;
|
|
6
|
+
declare const FormControl: typeof FormControlImpl & {
|
|
7
|
+
Caption: typeof PrimerFormControl.Caption;
|
|
8
|
+
LeadingVisual: typeof PrimerFormControl.LeadingVisual;
|
|
9
|
+
Validation: typeof PrimerFormControl.Validation;
|
|
10
|
+
Label: typeof PrimerFormControl.Label;
|
|
11
|
+
};
|
|
12
|
+
export { FormControl, type FormControlProps };
|
|
13
|
+
//# sourceMappingURL=FormControl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormControl.d.ts","sourceRoot":"","sources":["../../src/components/FormControl.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,IAAI,iBAAiB,EAAE,KAAK,gBAAgB,IAAI,sBAAsB,EAAC,MAAM,eAAe,CAAA;AAC/G,OAAO,EAAC,KAAK,iBAAiB,EAAC,MAAM,OAAO,CAAA;AAE5C,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAErC,KAAK,gBAAgB,GAAG,iBAAiB,CAAC,sBAAsB,CAAC,GAAG,MAAM,CAAA;AAE1E,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAI1D,CAAA;AAED,QAAA,MAAM,WAAW,EAMX,OAAO,eAAe,GAAG;IAC7B,OAAO,EAAE,OAAO,iBAAiB,CAAC,OAAO,CAAA;IACzC,aAAa,EAAE,OAAO,iBAAiB,CAAC,aAAa,CAAA;IACrD,UAAU,EAAE,OAAO,iBAAiB,CAAC,UAAU,CAAA;IAC/C,KAAK,EAAE,OAAO,iBAAiB,CAAC,KAAK,CAAA;CACtC,CAAA;AAED,OAAO,EAAC,WAAW,EAAE,KAAK,gBAAgB,EAAC,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FormControl as FormControl$1 } from '@primer/react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import sx from '../sx.js';
|
|
4
|
+
|
|
5
|
+
const FormControlImpl = styled(FormControl$1).withConfig({
|
|
6
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
7
|
+
}).withConfig({
|
|
8
|
+
displayName: "FormControl__FormControlImpl",
|
|
9
|
+
componentId: "sc-1642wfe-0"
|
|
10
|
+
})(["", ""], sx);
|
|
11
|
+
const FormControl = Object.assign(FormControlImpl, {
|
|
12
|
+
__SLOT__: FormControl$1.__SLOT__,
|
|
13
|
+
Caption: FormControl$1.Caption,
|
|
14
|
+
LeadingVisual: FormControl$1.LeadingVisual,
|
|
15
|
+
Validation: FormControl$1.Validation,
|
|
16
|
+
Label: FormControl$1.Label
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export { FormControl };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type HeaderProps as PrimerHeaderProps, type HeaderItemProps as PrimerHeaderItemProps, type HeaderLinkProps as PrimerHeaderLinkProps } from '@primer/react';
|
|
2
|
+
import type { ForwardRefComponent } from '../polymorphic';
|
|
3
|
+
import type { SxProp } from '../sx';
|
|
4
|
+
type HeaderProps = PrimerHeaderProps & SxProp;
|
|
5
|
+
type HeaderItemProps = PrimerHeaderItemProps & SxProp;
|
|
6
|
+
declare const Header: ForwardRefComponent<"header", HeaderProps> & {
|
|
7
|
+
Item: import("react").ForwardRefExoticComponent<Omit<HeaderItemProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
+
Link: import("react").ForwardRefExoticComponent<Omit<PrimerHeaderLinkProps, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
9
|
+
};
|
|
10
|
+
export { Header, type HeaderProps };
|
|
11
|
+
//# sourceMappingURL=Header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../src/components/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,IAAI,iBAAiB,EACrC,KAAK,eAAe,IAAI,qBAAqB,EAC7C,KAAK,eAAe,IAAI,qBAAqB,EAG9C,MAAM,eAAe,CAAA;AAGtB,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AACvD,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,OAAO,CAAA;AAEjC,KAAK,WAAW,GAAG,iBAAiB,GAAG,MAAM,CAAA;AAU7C,KAAK,eAAe,GAAG,qBAAqB,GAAG,MAAM,CAAA;AAcrD,QAAA,MAAM,MAAM;;;CAGV,CAAA;AAEF,OAAO,EAAC,MAAM,EAAE,KAAK,WAAW,EAAC,CAAA"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Header as Header$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 StyledHeader = /*#__PURE__*/forwardRef(function Header(props, ref) {
|
|
7
|
+
return /*#__PURE__*/jsx(Box, {
|
|
8
|
+
as: Header$1,
|
|
9
|
+
ref: ref,
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
const HeaderImpl = /*#__PURE__*/forwardRef(({
|
|
14
|
+
as,
|
|
15
|
+
...props
|
|
16
|
+
}, ref) => /*#__PURE__*/jsx(StyledHeader, {
|
|
17
|
+
...props,
|
|
18
|
+
...(as ? {
|
|
19
|
+
forwardedAs: as
|
|
20
|
+
} : {}),
|
|
21
|
+
ref: ref
|
|
22
|
+
}));
|
|
23
|
+
const HeaderItem = /*#__PURE__*/forwardRef(function HeaderItem(props, ref) {
|
|
24
|
+
return /*#__PURE__*/jsx(Box, {
|
|
25
|
+
as: Header$1.Item,
|
|
26
|
+
ref: ref,
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
const StyledHeaderLink = /*#__PURE__*/forwardRef(function HeaderLink(props, ref) {
|
|
31
|
+
return /*#__PURE__*/jsx(Box, {
|
|
32
|
+
as: Header$1.Link,
|
|
33
|
+
ref: ref,
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
const HeaderLink = /*#__PURE__*/forwardRef(({
|
|
38
|
+
as,
|
|
39
|
+
...props
|
|
40
|
+
}, ref) => /*#__PURE__*/jsx(StyledHeaderLink, {
|
|
41
|
+
...props,
|
|
42
|
+
...(as ? {
|
|
43
|
+
forwardedAs: as
|
|
44
|
+
} : {}),
|
|
45
|
+
ref: ref
|
|
46
|
+
}));
|
|
47
|
+
const Header = Object.assign(HeaderImpl, {
|
|
48
|
+
Item: HeaderItem,
|
|
49
|
+
Link: HeaderLink
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
export { Header };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type HeadingProps as PrimerHeadingProps } from '@primer/react';
|
|
2
|
+
import type { ForwardRefComponent } from '../polymorphic';
|
|
3
|
+
import { type SxProp } from '../sx';
|
|
4
|
+
type HeadingLevels = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
5
|
+
type HeadingProps = PrimerHeadingProps & SxProp;
|
|
6
|
+
declare const Heading: ForwardRefComponent<HeadingLevels, HeadingProps>;
|
|
7
|
+
export { Heading, type HeadingProps };
|
|
8
|
+
//# sourceMappingURL=Heading.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../src/components/Heading.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,KAAK,YAAY,IAAI,kBAAkB,EAAC,MAAM,eAAe,CAAA;AACrE,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AACvD,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAGrC,KAAK,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAE5D,KAAK,YAAY,GAAG,kBAAkB,GAAG,MAAM,CAAA;AAE/C,QAAA,MAAM,OAAO,EAAE,mBAAmB,CAAC,aAAa,EAAE,YAAY,CAI7D,CAAA;AAED,OAAO,EAAC,OAAO,EAAE,KAAK,YAAY,EAAC,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Heading as Heading$1 } from '@primer/react';
|
|
2
|
+
import sx from '../sx.js';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
|
|
5
|
+
const Heading = styled(Heading$1).withConfig({
|
|
6
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
7
|
+
}).withConfig({
|
|
8
|
+
displayName: "Heading",
|
|
9
|
+
componentId: "sc-1vc165i-0"
|
|
10
|
+
})(["", ""], sx);
|
|
11
|
+
|
|
12
|
+
export { Heading };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type IconButtonProps as PrimerIconButtonProps, type SlotMarker } from '@primer/react';
|
|
2
|
+
import { type ForwardRefComponent } from '../polymorphic';
|
|
3
|
+
import { type SxProp } from '../sx';
|
|
4
|
+
type IconButtonProps = PrimerIconButtonProps & SxProp & {
|
|
5
|
+
as?: React.ElementType;
|
|
6
|
+
};
|
|
7
|
+
declare const IconButton: ForwardRefComponent<"a" | "button", IconButtonProps> & SlotMarker;
|
|
8
|
+
export { IconButton };
|
|
9
|
+
export type { IconButtonProps };
|
|
10
|
+
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../src/components/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,eAAe,IAAI,qBAAqB,EAC7C,KAAK,UAAU,EAChB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAC,KAAK,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AAIvD,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAErC,KAAK,eAAe,GAAG,qBAAqB,GAAG,MAAM,GAAG;IAAC,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;CAAC,CAAA;AAQhF,QAAA,MAAM,UAAU,EAUV,mBAAmB,CAAC,GAAG,GAAG,QAAQ,EAAE,eAAe,CAAC,GAAG,UAAU,CAAA;AAIvE,OAAO,EAAC,UAAU,EAAC,CAAA;AACnB,YAAY,EAAC,eAAe,EAAC,CAAA"}
|