@juspay/blend-design-system 0.0.1
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 +177 -0
- package/dist/assets/main.css +1 -0
- package/dist/breakpoints/breakPoints.d.ts +5 -0
- package/dist/components/Accordion/Accordion.d.ts +4 -0
- package/dist/components/Accordion/AccordionItem.d.ts +6 -0
- package/dist/components/Accordion/accordion.tokens.d.ts +49 -0
- package/dist/components/Accordion/index.d.ts +3 -0
- package/dist/components/Accordion/types.d.ts +29 -0
- package/dist/components/Alert/Alert.d.ts +4 -0
- package/dist/components/Alert/alert.tokens.d.ts +25 -0
- package/dist/components/Alert/index.d.ts +2 -0
- package/dist/components/Alert/types.d.ts +33 -0
- package/dist/components/Avatar/Avatar.d.ts +12 -0
- package/dist/components/Avatar/StyledAvatar.d.ts +8 -0
- package/dist/components/Avatar/avatarUtils.d.ts +7 -0
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/Avatar/token.d.ts +71 -0
- package/dist/components/Avatar/types.d.ts +29 -0
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +11 -0
- package/dist/components/AvatarGroup/StyledAvatarGroup.d.ts +6 -0
- package/dist/components/AvatarGroup/avatarGroupUtils.d.ts +24 -0
- package/dist/components/AvatarGroup/index.d.ts +2 -0
- package/dist/components/AvatarGroup/token.d.ts +89 -0
- package/dist/components/AvatarGroup/types.d.ts +29 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +8 -0
- package/dist/components/Breadcrumb/breadcrumb.tokens.d.ts +31 -0
- package/dist/components/Breadcrumb/index.d.ts +2 -0
- package/dist/components/Breadcrumb/types.d.ts +6 -0
- package/dist/components/Button/Button.d.ts +18 -0
- package/dist/components/Button/button.tokens.d.ts +61 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Button/types.d.ts +34 -0
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +4 -0
- package/dist/components/ButtonGroup/index.d.ts +2 -0
- package/dist/components/ButtonGroup/types.d.ts +6 -0
- package/dist/components/Charts/ChartHeader.d.ts +2 -0
- package/dist/components/Charts/ChartLegend.d.ts +3 -0
- package/dist/components/Charts/ChartUtils.d.ts +5 -0
- package/dist/components/Charts/Charts.d.ts +3 -0
- package/dist/components/Charts/CustomTooltip.d.ts +2 -0
- package/dist/components/Charts/index.d.ts +2 -0
- package/dist/components/Charts/renderChart.d.ts +2 -0
- package/dist/components/Charts/types.d.ts +83 -0
- package/dist/components/Charts/utils.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +3 -0
- package/dist/components/Checkbox/StyledCheckbox.d.ts +11 -0
- package/dist/components/Checkbox/checkbox.token.d.ts +96 -0
- package/dist/components/Checkbox/checkboxUtils.d.ts +68 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Checkbox/types.d.ts +21 -0
- package/dist/components/DataTable/ColumnFilter/index.d.ts +9 -0
- package/dist/components/DataTable/ColumnManager.d.ts +5 -0
- package/dist/components/DataTable/DataTable.d.ts +3 -0
- package/dist/components/DataTable/DataTable.stories.d.ts +16 -0
- package/dist/components/DataTable/DataTableHeader/index.d.ts +3 -0
- package/dist/components/DataTable/DataTableHeader/types.d.ts +20 -0
- package/dist/components/DataTable/DataTablePagination.d.ts +11 -0
- package/dist/components/DataTable/TableBody/BulkActionBar.d.ts +8 -0
- package/dist/components/DataTable/TableBody/index.d.ts +4 -0
- package/dist/components/DataTable/TableBody/types.d.ts +32 -0
- package/dist/components/DataTable/TableCell/index.d.ts +3 -0
- package/dist/components/DataTable/TableCell/types.d.ts +12 -0
- package/dist/components/DataTable/TableFooter/index.d.ts +3 -0
- package/dist/components/DataTable/TableFooter/types.d.ts +10 -0
- package/dist/components/DataTable/TableHeader/FilterComponents.d.ts +59 -0
- package/dist/components/DataTable/TableHeader/handlers.d.ts +28 -0
- package/dist/components/DataTable/TableHeader/index.d.ts +3 -0
- package/dist/components/DataTable/TableHeader/types.d.ts +21 -0
- package/dist/components/DataTable/TableHeader/utils.d.ts +29 -0
- package/dist/components/DataTable/columnTypes.d.ts +87 -0
- package/dist/components/DataTable/dataTable.tokens.d.ts +174 -0
- package/dist/components/DataTable/index.d.ts +10 -0
- package/dist/components/DataTable/types.d.ts +230 -0
- package/dist/components/DataTable/utils.d.ts +52 -0
- package/dist/components/DateRangePicker/CalendarGrid.d.ts +11 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +4 -0
- package/dist/components/DateRangePicker/QuickRangeSelector.d.ts +13 -0
- package/dist/components/DateRangePicker/TimeSelector.d.ts +7 -0
- package/dist/components/DateRangePicker/dateRangePicker.tokens.d.ts +188 -0
- package/dist/components/DateRangePicker/index.d.ts +2 -0
- package/dist/components/DateRangePicker/types.d.ts +38 -0
- package/dist/components/DateRangePicker/utils.d.ts +470 -0
- package/dist/components/Directory/Directory.d.ts +6 -0
- package/dist/components/Directory/NavItem.d.ts +7 -0
- package/dist/components/Directory/Section.d.ts +3 -0
- package/dist/components/Directory/index.d.ts +2 -0
- package/dist/components/Directory/types.d.ts +29 -0
- package/dist/components/Directory/utils.d.ts +9 -0
- package/dist/components/Drawer/Drawer.d.ts +6 -0
- package/dist/components/Drawer/components/DrawerBase.d.ts +30 -0
- package/dist/components/Drawer/components/NestedSelectDrawer.d.ts +72 -0
- package/dist/components/Drawer/components/SelectDrawer.d.ts +9 -0
- package/dist/components/Drawer/components/StatusDrawer.d.ts +5 -0
- package/dist/components/Drawer/drawer.tokens.d.ts +60 -0
- package/dist/components/Drawer/index.d.ts +3 -0
- package/dist/components/Drawer/types.d.ts +384 -0
- package/dist/components/Dropdown/Dropdown.d.ts +9 -0
- package/dist/components/GradientBlur/GradientBlur.d.ts +2 -0
- package/dist/components/Inputs/DropdownInput/DropdownInput.d.ts +3 -0
- package/dist/components/Inputs/DropdownInput/dropdownInput.tokens.d.ts +33 -0
- package/dist/components/Inputs/DropdownInput/index.d.ts +2 -0
- package/dist/components/Inputs/DropdownInput/types.d.ts +31 -0
- package/dist/components/Inputs/MultiValueInput/MultiValueInput.d.ts +3 -0
- package/dist/components/Inputs/MultiValueInput/index.d.ts +2 -0
- package/dist/components/Inputs/MultiValueInput/multiValueInput.tokens.d.ts +33 -0
- package/dist/components/Inputs/MultiValueInput/types.d.ts +25 -0
- package/dist/components/Inputs/NumberInput/NumberInput.d.ts +3 -0
- package/dist/components/Inputs/NumberInput/index.d.ts +2 -0
- package/dist/components/Inputs/NumberInput/numberInput.tokens.d.ts +44 -0
- package/dist/components/Inputs/NumberInput/types.d.ts +16 -0
- package/dist/components/Inputs/OTPInput/OTPInput.d.ts +3 -0
- package/dist/components/Inputs/OTPInput/index.d.ts +2 -0
- package/dist/components/Inputs/OTPInput/otpInput.tokens.d.ts +34 -0
- package/dist/components/Inputs/OTPInput/types.d.ts +11 -0
- package/dist/components/Inputs/SearchInput/SearchInput.d.ts +3 -0
- package/dist/components/Inputs/SearchInput/index.d.ts +2 -0
- package/dist/components/Inputs/SearchInput/searchInput.tokens.d.ts +41 -0
- package/dist/components/Inputs/SearchInput/types.d.ts +7 -0
- package/dist/components/Inputs/TextArea/TextArea.d.ts +3 -0
- package/dist/components/Inputs/TextArea/index.d.ts +2 -0
- package/dist/components/Inputs/TextArea/textarea.token.d.ts +27 -0
- package/dist/components/Inputs/TextArea/types.d.ts +22 -0
- package/dist/components/Inputs/TextInput/TextInput.d.ts +3 -0
- package/dist/components/Inputs/TextInput/index.d.ts +2 -0
- package/dist/components/Inputs/TextInput/textInput.tokens.d.ts +33 -0
- package/dist/components/Inputs/TextInput/types.d.ts +24 -0
- package/dist/components/Inputs/UnitInput/UnitInput.d.ts +3 -0
- package/dist/components/Inputs/UnitInput/index.d.ts +2 -0
- package/dist/components/Inputs/UnitInput/types.d.ts +25 -0
- package/dist/components/Inputs/UnitInput/unitInput.tokens.d.ts +40 -0
- package/dist/components/Inputs/index.d.ts +8 -0
- package/dist/components/Inputs/utils/InputFooter/InputFooter.d.ts +8 -0
- package/dist/components/Inputs/utils/InputLabels/InputLabels.d.ts +18 -0
- package/dist/components/Menu/Menu.d.ts +8 -0
- package/dist/components/Menu/MenuGroupLabel.d.ts +3 -0
- package/dist/components/Menu/MenuItem.d.ts +9 -0
- package/dist/components/Menu/MenuPlayground.d.ts +3 -0
- package/dist/components/Menu/MenuPlaygroundComprehensive.d.ts +3 -0
- package/dist/components/Menu/SubMenu.d.ts +5 -0
- package/dist/components/Menu/index.d.ts +2 -0
- package/dist/components/Menu/menu.styles.d.ts +2 -0
- package/dist/components/Menu/menu.tokens.d.ts +100 -0
- package/dist/components/Menu/types.d.ts +55 -0
- package/dist/components/Menu/utils.d.ts +3 -0
- package/dist/components/Modal/Modal.d.ts +3 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/Modal/modal.tokens.d.ts +48 -0
- package/dist/components/Modal/types.d.ts +22 -0
- package/dist/components/MultiSelect/MultiSelect.d.ts +3 -0
- package/dist/components/MultiSelect/MultiSelectMenu.d.ts +3 -0
- package/dist/components/MultiSelect/MultiSelectMenuItem.d.ts +10 -0
- package/dist/components/MultiSelect/MultiSelectSubMenu.d.ts +10 -0
- package/dist/components/MultiSelect/SelectAllItem.d.ts +8 -0
- package/dist/components/MultiSelect/index.d.ts +2 -0
- package/dist/components/MultiSelect/multiSelect.tokens.d.ts +77 -0
- package/dist/components/MultiSelect/types.d.ts +92 -0
- package/dist/components/MultiSelect/utils.d.ts +11 -0
- package/dist/components/Popover/Popover.d.ts +6 -0
- package/dist/components/Popover/PopoverFooter.d.ts +6 -0
- package/dist/components/Popover/PopoverHeader.d.ts +6 -0
- package/dist/components/Popover/index.d.ts +2 -0
- package/dist/components/Popover/popover.tokens.d.ts +40 -0
- package/dist/components/Popover/types.d.ts +31 -0
- package/dist/components/Primitives/Block/Block.d.ts +189 -0
- package/dist/components/Primitives/PrimitiveButton/PrimitiveButton.d.ts +131 -0
- package/dist/components/Primitives/PrimitiveInput/PrimitiveInput.d.ts +91 -0
- package/dist/components/Primitives/PrimitiveLink.d.ts +58 -0
- package/dist/components/Primitives/PrimitiveText/PrimitiveText.d.ts +39 -0
- package/dist/components/Primitives/PrimitiveTextArea.d.ts +88 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +4 -0
- package/dist/components/ProgressBar/index.d.ts +3 -0
- package/dist/components/ProgressBar/progressbar.tokens.d.ts +63 -0
- package/dist/components/ProgressBar/types.d.ts +22 -0
- package/dist/components/ProgressBar/utils.d.ts +7 -0
- package/dist/components/Radio/Radio.d.ts +6 -0
- package/dist/components/Radio/RadioGroup.d.ts +4 -0
- package/dist/components/Radio/StyledRadio.d.ts +7 -0
- package/dist/components/Radio/index.d.ts +4 -0
- package/dist/components/Radio/radio.token.d.ts +75 -0
- package/dist/components/Radio/types.d.ts +30 -0
- package/dist/components/Radio/utils.d.ts +47 -0
- package/dist/components/Select/Select.d.ts +25 -0
- package/dist/components/Select/SelectMenu.d.ts +3 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Select/select.token.d.ts +40 -0
- package/dist/components/Select/types.d.ts +55 -0
- package/dist/components/Sidebar/Sidebar.d.ts +4 -0
- package/dist/components/Sidebar/index.d.ts +2 -0
- package/dist/components/Sidebar/types.d.ts +44 -0
- package/dist/components/SingleSelect/SingleSelect.d.ts +3 -0
- package/dist/components/SingleSelect/SingleSelectMenu.d.ts +21 -0
- package/dist/components/SingleSelect/index.d.ts +2 -0
- package/dist/components/SingleSelect/types.d.ts +26 -0
- package/dist/components/Slider/Slider.d.ts +5 -0
- package/dist/components/Slider/index.d.ts +3 -0
- package/dist/components/Slider/types.d.ts +30 -0
- package/dist/components/Slider/utils.d.ts +49 -0
- package/dist/components/Snackbar/Snackbar.d.ts +4 -0
- package/dist/components/Snackbar/index.d.ts +3 -0
- package/dist/components/Snackbar/snackbar.tokens.d.ts +52 -0
- package/dist/components/Snackbar/types.d.ts +26 -0
- package/dist/components/SplitTag/SplitTag.d.ts +6 -0
- package/dist/components/SplitTag/index.d.ts +2 -0
- package/dist/components/SplitTag/types.d.ts +16 -0
- package/dist/components/StatCard/StatCard.d.ts +6 -0
- package/dist/components/StatCard/index.d.ts +2 -0
- package/dist/components/StatCard/statcard.tokens.d.ts +145 -0
- package/dist/components/StatCard/types.d.ts +32 -0
- package/dist/components/Switch/StyledSwitch.d.ts +11 -0
- package/dist/components/Switch/Switch.d.ts +5 -0
- package/dist/components/Switch/SwitchGroup.d.ts +4 -0
- package/dist/components/Switch/index.d.ts +4 -0
- package/dist/components/Switch/switch.token.d.ts +112 -0
- package/dist/components/Switch/types.d.ts +30 -0
- package/dist/components/Switch/utils.d.ts +58 -0
- package/dist/components/Tabs/StyledTabs.d.ts +22 -0
- package/dist/components/Tabs/Tabs.d.ts +5 -0
- package/dist/components/Tabs/TabsContent.d.ts +2 -0
- package/dist/components/Tabs/TabsList.d.ts +8 -0
- package/dist/components/Tabs/TabsTrigger.d.ts +10 -0
- package/dist/components/Tabs/index.d.ts +6 -0
- package/dist/components/Tabs/tabs.token.d.ts +60 -0
- package/dist/components/Tabs/types.d.ts +34 -0
- package/dist/components/Tags/Tags.d.ts +3 -0
- package/dist/components/Tags/index.d.ts +2 -0
- package/dist/components/Tags/tag.tokens.d.ts +57 -0
- package/dist/components/Tags/types.d.ts +35 -0
- package/dist/components/Text/Text.d.ts +12 -0
- package/dist/components/Tooltip/Tooltip.d.ts +3 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/Tooltip/tooltip.tokens.d.ts +31 -0
- package/dist/components/Tooltip/types.d.ts +33 -0
- package/dist/context/ThemeContext.d.ts +66 -0
- package/dist/context/ThemeProvider.d.ts +11 -0
- package/dist/context/index.d.ts +4 -0
- package/dist/context/initComponentTokens.d.ts +4 -0
- package/dist/context/useComponentToken.d.ts +29 -0
- package/dist/foundationToken.d.ts +214 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/useBreakPoints.d.ts +4 -0
- package/dist/hooks/useClickOutside.d.ts +3 -0
- package/dist/hooks/useDebounce.d.ts +1 -0
- package/dist/hooks/useResizeObserver.d.ts +1 -0
- package/dist/hooks/useResponsiveTokens.d.ts +2 -0
- package/dist/hooks/useScrollLock.d.ts +2 -0
- package/dist/main.d.ts +34 -0
- package/dist/main.js +50499 -0
- package/dist/tokens/border.tokens.d.ts +29 -0
- package/dist/tokens/color.tokens.d.ts +16 -0
- package/dist/tokens/font.tokens.d.ts +72 -0
- package/dist/tokens/index.d.ts +2 -0
- package/dist/tokens/opacity.tokens.d.ts +18 -0
- package/dist/tokens/shadows.tokens.d.ts +15 -0
- package/dist/tokens/theme.token.d.ts +16 -0
- package/dist/tokens/unit.tokens.d.ts +34 -0
- package/package.json +99 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CSSObject } from 'styled-components';
|
|
3
|
+
type StateStyles = {
|
|
4
|
+
_hover?: PrimitiveInputProps;
|
|
5
|
+
_focus?: PrimitiveInputProps;
|
|
6
|
+
_active?: PrimitiveInputProps;
|
|
7
|
+
_disabled?: PrimitiveInputProps;
|
|
8
|
+
_visited?: PrimitiveInputProps;
|
|
9
|
+
_focusVisible?: PrimitiveInputProps;
|
|
10
|
+
_focusWithin?: PrimitiveInputProps;
|
|
11
|
+
_focusActive?: PrimitiveInputProps;
|
|
12
|
+
};
|
|
13
|
+
type PrimitiveInputProps = StateStyles & {
|
|
14
|
+
color?: CSSObject['color'];
|
|
15
|
+
position?: CSSObject['position'];
|
|
16
|
+
inset?: CSSObject['inset'];
|
|
17
|
+
top?: CSSObject['top'];
|
|
18
|
+
right?: CSSObject['right'];
|
|
19
|
+
bottom?: CSSObject['bottom'];
|
|
20
|
+
left?: CSSObject['left'];
|
|
21
|
+
zIndex?: CSSObject['zIndex'];
|
|
22
|
+
pointerEvents?: CSSObject['pointerEvents'];
|
|
23
|
+
opacity?: CSSObject['opacity'];
|
|
24
|
+
padding?: CSSObject['padding'];
|
|
25
|
+
paddingTop?: CSSObject['paddingTop'];
|
|
26
|
+
paddingBottom?: CSSObject['paddingBottom'];
|
|
27
|
+
paddingLeft?: CSSObject['paddingLeft'];
|
|
28
|
+
paddingRight?: CSSObject['paddingRight'];
|
|
29
|
+
paddingX?: CSSObject['padding'];
|
|
30
|
+
paddingY?: CSSObject['padding'];
|
|
31
|
+
paddingInlineStart?: CSSObject['paddingInlineStart'];
|
|
32
|
+
paddingInlineEnd?: CSSObject['paddingInlineEnd'];
|
|
33
|
+
margin?: CSSObject['margin'];
|
|
34
|
+
marginTop?: CSSObject['marginTop'];
|
|
35
|
+
marginBottom?: CSSObject['marginBottom'];
|
|
36
|
+
marginLeft?: CSSObject['marginLeft'];
|
|
37
|
+
marginRight?: CSSObject['marginRight'];
|
|
38
|
+
marginX?: CSSObject['margin'];
|
|
39
|
+
marginY?: CSSObject['margin'];
|
|
40
|
+
display?: CSSObject['display'];
|
|
41
|
+
flexDirection?: CSSObject['flexDirection'];
|
|
42
|
+
justifyContent?: CSSObject['justifyContent'];
|
|
43
|
+
alignItems?: CSSObject['alignItems'];
|
|
44
|
+
flexWrap?: CSSObject['flexWrap'];
|
|
45
|
+
flexGrow?: CSSObject['flexGrow'];
|
|
46
|
+
flexShrink?: CSSObject['flexShrink'];
|
|
47
|
+
flexBasis?: CSSObject['flexBasis'];
|
|
48
|
+
gap?: CSSObject['gap'];
|
|
49
|
+
rowGap?: CSSObject['rowGap'];
|
|
50
|
+
columnGap?: CSSObject['columnGap'];
|
|
51
|
+
alignContent?: CSSObject['alignContent'];
|
|
52
|
+
alignSelf?: CSSObject['alignSelf'];
|
|
53
|
+
justifySelf?: CSSObject['justifySelf'];
|
|
54
|
+
borderRadius?: CSSObject['borderRadius'];
|
|
55
|
+
borderTopLeftRadius?: CSSObject['borderTopLeftRadius'];
|
|
56
|
+
borderTopRightRadius?: CSSObject['borderTopRightRadius'];
|
|
57
|
+
borderBottomLeftRadius?: CSSObject['borderBottomLeftRadius'];
|
|
58
|
+
borderBottomRightRadius?: CSSObject['borderBottomRightRadius'];
|
|
59
|
+
outline?: CSSObject['outline'];
|
|
60
|
+
outlineColor?: CSSObject['outlineColor'];
|
|
61
|
+
outlineWidth?: CSSObject['outlineWidth'];
|
|
62
|
+
outlineStyle?: CSSObject['outlineStyle'];
|
|
63
|
+
outlineOffset?: CSSObject['outlineOffset'];
|
|
64
|
+
width?: CSSObject['width'];
|
|
65
|
+
height?: CSSObject['height'];
|
|
66
|
+
minWidth?: CSSObject['minWidth'];
|
|
67
|
+
minHeight?: CSSObject['minHeight'];
|
|
68
|
+
maxWidth?: CSSObject['maxWidth'];
|
|
69
|
+
maxHeight?: CSSObject['maxHeight'];
|
|
70
|
+
size?: CSSObject['width'] | CSSObject['height'];
|
|
71
|
+
backgroundColor?: CSSObject['backgroundColor'];
|
|
72
|
+
border?: CSSObject['border'];
|
|
73
|
+
borderTop?: CSSObject['borderTop'];
|
|
74
|
+
borderBottom?: CSSObject['borderBottom'];
|
|
75
|
+
borderLeft?: CSSObject['borderLeft'];
|
|
76
|
+
borderRight?: CSSObject['borderRight'];
|
|
77
|
+
boxShadow?: CSSObject['boxShadow'];
|
|
78
|
+
overflow?: CSSObject['overflow'];
|
|
79
|
+
overflowX?: CSSObject['overflowX'];
|
|
80
|
+
overflowY?: CSSObject['overflowY'];
|
|
81
|
+
contentCentered?: boolean;
|
|
82
|
+
cursor?: CSSObject['cursor'];
|
|
83
|
+
placeholderStyles?: CSSObject;
|
|
84
|
+
};
|
|
85
|
+
export type InputProps = React.InputHTMLAttributes<HTMLInputElement> & PrimitiveInputProps & {
|
|
86
|
+
as?: 'input' | 'textarea';
|
|
87
|
+
key?: string | number;
|
|
88
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
89
|
+
};
|
|
90
|
+
declare const PrimitiveInput: React.FC<InputProps>;
|
|
91
|
+
export default PrimitiveInput;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { default as React, JSX } from 'react';
|
|
2
|
+
import { CSSObject } from 'styled-components';
|
|
3
|
+
type StateStyles = {
|
|
4
|
+
_hover?: StyledLinkProps;
|
|
5
|
+
_focus?: StyledLinkProps;
|
|
6
|
+
_active?: StyledLinkProps;
|
|
7
|
+
_disabled?: StyledLinkProps;
|
|
8
|
+
_visited?: StyledLinkProps;
|
|
9
|
+
};
|
|
10
|
+
type StyledLinkProps = StateStyles & {
|
|
11
|
+
color?: CSSObject['color'];
|
|
12
|
+
gap?: CSSObject['gap'];
|
|
13
|
+
fontSize?: CSSObject['fontSize'];
|
|
14
|
+
fontWeight?: CSSObject['fontWeight'];
|
|
15
|
+
lineHeight?: CSSObject['lineHeight'];
|
|
16
|
+
letterSpacing?: CSSObject['letterSpacing'];
|
|
17
|
+
textAlign?: CSSObject['textAlign'];
|
|
18
|
+
textTransform?: CSSObject['textTransform'];
|
|
19
|
+
textOverflow?: CSSObject['textOverflow'];
|
|
20
|
+
textDecoration?: CSSObject['textDecoration'];
|
|
21
|
+
padding?: CSSObject['padding'];
|
|
22
|
+
paddingX?: CSSObject['paddingX'];
|
|
23
|
+
paddingY?: CSSObject['paddingY'];
|
|
24
|
+
paddingTop?: CSSObject['paddingTop'];
|
|
25
|
+
paddingBottom?: CSSObject['paddingBottom'];
|
|
26
|
+
paddingLeft?: CSSObject['paddingLeft'];
|
|
27
|
+
paddingRight?: CSSObject['paddingRight'];
|
|
28
|
+
margin?: CSSObject['margin'];
|
|
29
|
+
marginX?: CSSObject['marginX'];
|
|
30
|
+
marginY?: CSSObject['marginY'];
|
|
31
|
+
marginTop?: CSSObject['marginTop'];
|
|
32
|
+
marginBottom?: CSSObject['marginBottom'];
|
|
33
|
+
marginLeft?: CSSObject['marginLeft'];
|
|
34
|
+
marginRight?: CSSObject['marginRight'];
|
|
35
|
+
display?: CSSObject['display'];
|
|
36
|
+
width?: CSSObject['width'];
|
|
37
|
+
height?: CSSObject['height'];
|
|
38
|
+
cursor?: CSSObject['cursor'];
|
|
39
|
+
whiteSpace?: CSSObject['whiteSpace'];
|
|
40
|
+
transition?: CSSObject['transition'];
|
|
41
|
+
backgroundColor?: CSSObject['backgroundColor'];
|
|
42
|
+
border?: CSSObject['border'];
|
|
43
|
+
borderRadius?: CSSObject['borderRadius'];
|
|
44
|
+
opacity?: CSSObject['opacity'];
|
|
45
|
+
};
|
|
46
|
+
type SemanticLinkTag = keyof Pick<JSX.IntrinsicElements, 'a' | 'span' | 'div'>;
|
|
47
|
+
export type PrimitiveLinkProps = StyledLinkProps & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'color' | 'as'> & {
|
|
48
|
+
as?: SemanticLinkTag;
|
|
49
|
+
children?: React.ReactNode;
|
|
50
|
+
ref?: React.Ref<HTMLAnchorElement>;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* PrimitiveLink Component
|
|
54
|
+
* @description
|
|
55
|
+
* A highly customizable anchor component styled via props.
|
|
56
|
+
*/
|
|
57
|
+
declare const PrimitiveLink: React.ForwardRefExoticComponent<Omit<PrimitiveLinkProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
58
|
+
export default PrimitiveLink;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { default as React, JSX } from 'react';
|
|
2
|
+
import { CSSObject } from 'styled-components';
|
|
3
|
+
export type SemanticTagType = keyof Pick<JSX.IntrinsicElements, 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'span' | 'code' | 'q' | 'small' | 'label'>;
|
|
4
|
+
export type PrimitiveTextProps = {
|
|
5
|
+
fontWeight?: CSSObject['fontWeight'];
|
|
6
|
+
color?: CSSObject['color'];
|
|
7
|
+
textAlign?: CSSObject['textAlign'];
|
|
8
|
+
letterSpacing?: CSSObject['letterSpacing'];
|
|
9
|
+
fontFamily?: CSSObject['fontFamily'];
|
|
10
|
+
opacity?: CSSObject['opacity'];
|
|
11
|
+
margin?: CSSObject['margin'];
|
|
12
|
+
marginX?: CSSObject['margin'];
|
|
13
|
+
marginY?: CSSObject['margin'];
|
|
14
|
+
padding?: CSSObject['padding'];
|
|
15
|
+
paddingX?: CSSObject['padding'];
|
|
16
|
+
paddingY?: CSSObject['padding'];
|
|
17
|
+
fontSize?: CSSObject['fontSize'];
|
|
18
|
+
lineHeight?: CSSObject['lineHeight'];
|
|
19
|
+
truncate?: boolean;
|
|
20
|
+
userSelect?: CSSObject['userSelect'];
|
|
21
|
+
name?: CSSObject['name'];
|
|
22
|
+
htmlFor?: CSSObject['htmlFor'];
|
|
23
|
+
textTransform?: CSSObject['textTransform'];
|
|
24
|
+
};
|
|
25
|
+
export type TextProps = PrimitiveTextProps & Omit<React.HTMLAttributes<HTMLElement>, 'color'> & {
|
|
26
|
+
children: React.ReactNode;
|
|
27
|
+
as?: SemanticTagType;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* PrimitiveText Component
|
|
31
|
+
* @description
|
|
32
|
+
* A low-level text primitive that renders styled text without variant abstraction.
|
|
33
|
+
*
|
|
34
|
+
* @param {React.ReactNode} children - The content to render.
|
|
35
|
+
* @param {SemanticTagType} as - Optional semantic tag to render as.
|
|
36
|
+
* @param {PrimitiveTextProps} rest - Styling props.
|
|
37
|
+
*/
|
|
38
|
+
declare const PrimitiveText: React.FC<TextProps>;
|
|
39
|
+
export default PrimitiveText;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CSSObject } from 'styled-components';
|
|
3
|
+
type StateStyles = {
|
|
4
|
+
_hover?: PrimitiveTextareaProps;
|
|
5
|
+
_focus?: PrimitiveTextareaProps;
|
|
6
|
+
_active?: PrimitiveTextareaProps;
|
|
7
|
+
_disabled?: PrimitiveTextareaProps;
|
|
8
|
+
_visited?: PrimitiveTextareaProps;
|
|
9
|
+
_focusVisible?: PrimitiveTextareaProps;
|
|
10
|
+
_focusWithin?: PrimitiveTextareaProps;
|
|
11
|
+
_focusActive?: PrimitiveTextareaProps;
|
|
12
|
+
};
|
|
13
|
+
type PrimitiveTextareaProps = StateStyles & {
|
|
14
|
+
color?: CSSObject['color'];
|
|
15
|
+
position?: CSSObject['position'];
|
|
16
|
+
inset?: CSSObject['inset'];
|
|
17
|
+
top?: CSSObject['top'];
|
|
18
|
+
right?: CSSObject['right'];
|
|
19
|
+
bottom?: CSSObject['bottom'];
|
|
20
|
+
left?: CSSObject['left'];
|
|
21
|
+
zIndex?: CSSObject['zIndex'];
|
|
22
|
+
pointerEvents?: CSSObject['pointerEvents'];
|
|
23
|
+
opacity?: CSSObject['opacity'];
|
|
24
|
+
padding?: CSSObject['padding'];
|
|
25
|
+
paddingTop?: CSSObject['paddingTop'];
|
|
26
|
+
paddingBottom?: CSSObject['paddingBottom'];
|
|
27
|
+
paddingLeft?: CSSObject['paddingLeft'];
|
|
28
|
+
paddingRight?: CSSObject['paddingRight'];
|
|
29
|
+
paddingX?: CSSObject['padding'];
|
|
30
|
+
paddingY?: CSSObject['padding'];
|
|
31
|
+
paddingInlineStart?: CSSObject['paddingInlineStart'];
|
|
32
|
+
paddingInlineEnd?: CSSObject['paddingInlineEnd'];
|
|
33
|
+
margin?: CSSObject['margin'];
|
|
34
|
+
marginTop?: CSSObject['marginTop'];
|
|
35
|
+
marginBottom?: CSSObject['marginBottom'];
|
|
36
|
+
marginLeft?: CSSObject['marginLeft'];
|
|
37
|
+
marginRight?: CSSObject['marginRight'];
|
|
38
|
+
marginX?: CSSObject['margin'];
|
|
39
|
+
marginY?: CSSObject['margin'];
|
|
40
|
+
display?: CSSObject['display'];
|
|
41
|
+
flexDirection?: CSSObject['flexDirection'];
|
|
42
|
+
justifyContent?: CSSObject['justifyContent'];
|
|
43
|
+
alignItems?: CSSObject['alignItems'];
|
|
44
|
+
flexWrap?: CSSObject['flexWrap'];
|
|
45
|
+
flexGrow?: CSSObject['flexGrow'];
|
|
46
|
+
flexShrink?: CSSObject['flexShrink'];
|
|
47
|
+
flexBasis?: CSSObject['flexBasis'];
|
|
48
|
+
gap?: CSSObject['gap'];
|
|
49
|
+
rowGap?: CSSObject['rowGap'];
|
|
50
|
+
columnGap?: CSSObject['columnGap'];
|
|
51
|
+
alignContent?: CSSObject['alignContent'];
|
|
52
|
+
alignSelf?: CSSObject['alignSelf'];
|
|
53
|
+
justifySelf?: CSSObject['justifySelf'];
|
|
54
|
+
borderRadius?: CSSObject['borderRadius'];
|
|
55
|
+
borderTopLeftRadius?: CSSObject['borderTopLeftRadius'];
|
|
56
|
+
borderTopRightRadius?: CSSObject['borderTopRightRadius'];
|
|
57
|
+
borderBottomLeftRadius?: CSSObject['borderBottomLeftRadius'];
|
|
58
|
+
borderBottomRightRadius?: CSSObject['borderBottomRightRadius'];
|
|
59
|
+
outline?: CSSObject['outline'];
|
|
60
|
+
outlineColor?: CSSObject['outlineColor'];
|
|
61
|
+
outlineWidth?: CSSObject['outlineWidth'];
|
|
62
|
+
outlineStyle?: CSSObject['outlineStyle'];
|
|
63
|
+
outlineOffset?: CSSObject['outlineOffset'];
|
|
64
|
+
width?: CSSObject['width'];
|
|
65
|
+
height?: CSSObject['height'];
|
|
66
|
+
minWidth?: CSSObject['minWidth'];
|
|
67
|
+
minHeight?: CSSObject['minHeight'];
|
|
68
|
+
maxWidth?: CSSObject['maxWidth'];
|
|
69
|
+
maxHeight?: CSSObject['maxHeight'];
|
|
70
|
+
backgroundColor?: CSSObject['backgroundColor'];
|
|
71
|
+
border?: CSSObject['border'];
|
|
72
|
+
borderTop?: CSSObject['borderTop'];
|
|
73
|
+
borderBottom?: CSSObject['borderBottom'];
|
|
74
|
+
borderLeft?: CSSObject['borderLeft'];
|
|
75
|
+
borderRight?: CSSObject['borderRight'];
|
|
76
|
+
boxShadow?: CSSObject['boxShadow'];
|
|
77
|
+
overflow?: CSSObject['overflow'];
|
|
78
|
+
overflowX?: CSSObject['overflowX'];
|
|
79
|
+
overflowY?: CSSObject['overflowY'];
|
|
80
|
+
contentCentered?: boolean;
|
|
81
|
+
cursor?: CSSObject['cursor'];
|
|
82
|
+
placeholderStyles?: CSSObject;
|
|
83
|
+
resize?: CSSObject['resize'];
|
|
84
|
+
fontFamily?: CSSObject['fontFamily'];
|
|
85
|
+
};
|
|
86
|
+
export type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement> & PrimitiveTextareaProps;
|
|
87
|
+
declare const PrimitiveTextarea: React.FC<TextareaProps>;
|
|
88
|
+
export default PrimitiveTextarea;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { ProgressBarSize } from './types';
|
|
2
|
+
import { CSSObject } from 'styled-components';
|
|
3
|
+
export type ProgressBarTokenType = {
|
|
4
|
+
container: {
|
|
5
|
+
borderRadius: string;
|
|
6
|
+
overflow: string;
|
|
7
|
+
};
|
|
8
|
+
height: {
|
|
9
|
+
[ProgressBarSize.SMALL]: CSSObject['height'];
|
|
10
|
+
[ProgressBarSize.MEDIUM]: CSSObject['height'];
|
|
11
|
+
[ProgressBarSize.LARGE]: CSSObject['height'];
|
|
12
|
+
};
|
|
13
|
+
fill: {
|
|
14
|
+
solid: {
|
|
15
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
16
|
+
borderRadius: CSSObject['borderRadius'];
|
|
17
|
+
};
|
|
18
|
+
segmented: {
|
|
19
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
20
|
+
borderRadius: CSSObject['borderRadius'];
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
empty: {
|
|
24
|
+
solid: {
|
|
25
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
26
|
+
};
|
|
27
|
+
segmented: {
|
|
28
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
29
|
+
backgroundImage: CSSObject['backgroundImage'];
|
|
30
|
+
backgroundSize: CSSObject['backgroundSize'];
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
circular: {
|
|
34
|
+
size: {
|
|
35
|
+
[ProgressBarSize.SMALL]: CSSObject['width'];
|
|
36
|
+
[ProgressBarSize.MEDIUM]: CSSObject['width'];
|
|
37
|
+
[ProgressBarSize.LARGE]: CSSObject['width'];
|
|
38
|
+
};
|
|
39
|
+
strokeWidth: {
|
|
40
|
+
[ProgressBarSize.SMALL]: number;
|
|
41
|
+
[ProgressBarSize.MEDIUM]: number;
|
|
42
|
+
[ProgressBarSize.LARGE]: number;
|
|
43
|
+
};
|
|
44
|
+
solid: {
|
|
45
|
+
stroke: CSSObject['stroke'];
|
|
46
|
+
background: CSSObject['stroke'];
|
|
47
|
+
};
|
|
48
|
+
segmented: {
|
|
49
|
+
stroke: CSSObject['stroke'];
|
|
50
|
+
background: CSSObject['stroke'];
|
|
51
|
+
dashArray: string;
|
|
52
|
+
dashOffset: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
label: {
|
|
56
|
+
fontSize: CSSObject['fontSize'];
|
|
57
|
+
fontWeight: CSSObject['fontWeight'];
|
|
58
|
+
color: CSSObject['color'];
|
|
59
|
+
};
|
|
60
|
+
transition: string;
|
|
61
|
+
};
|
|
62
|
+
declare const progressBarTokens: ProgressBarTokenType;
|
|
63
|
+
export default progressBarTokens;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare enum ProgressBarSize {
|
|
2
|
+
SMALL = "sm",
|
|
3
|
+
MEDIUM = "md",
|
|
4
|
+
LARGE = "lg"
|
|
5
|
+
}
|
|
6
|
+
export declare enum ProgressBarVariant {
|
|
7
|
+
SOLID = "solid",
|
|
8
|
+
SEGMENTED = "segmented",
|
|
9
|
+
CIRCULAR = "circular"
|
|
10
|
+
}
|
|
11
|
+
export declare enum ProgressBarType {
|
|
12
|
+
SOLID = "solid",
|
|
13
|
+
SEGMENTED = "segmented"
|
|
14
|
+
}
|
|
15
|
+
export type ProgressBarProps = {
|
|
16
|
+
value: number;
|
|
17
|
+
size?: ProgressBarSize;
|
|
18
|
+
variant?: ProgressBarVariant;
|
|
19
|
+
type?: ProgressBarType;
|
|
20
|
+
showLabel?: boolean;
|
|
21
|
+
className?: string;
|
|
22
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ProgressBarSize, ProgressBarVariant } from './types';
|
|
2
|
+
import { CSSObject } from 'styled-components';
|
|
3
|
+
export declare const getProgressBarStyles: (size: ProgressBarSize) => CSSObject;
|
|
4
|
+
export declare const getProgressBarFillStyles: (variant: ProgressBarVariant) => CSSObject;
|
|
5
|
+
export declare const getProgressBarEmptyStyles: (variant: ProgressBarVariant) => CSSObject;
|
|
6
|
+
export declare const getProgressBarLabelStyles: () => CSSObject;
|
|
7
|
+
export declare const clampValue: (value: number) => number;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { RadioProps } from './types';
|
|
2
|
+
export declare const Radio: {
|
|
3
|
+
({ id, value, checked, defaultChecked, onChange, disabled, required, error, size, children, subtext, slot, name, ...rest }: RadioProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
6
|
+
export default Radio;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RadioSize } from './types';
|
|
2
|
+
export declare const StyledRadioInput: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {
|
|
3
|
+
size: RadioSize;
|
|
4
|
+
$isDisabled: boolean;
|
|
5
|
+
$isChecked: boolean;
|
|
6
|
+
$error?: boolean;
|
|
7
|
+
}>> & string;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { ThemeType } from '../../tokens';
|
|
3
|
+
import { RadioSize } from './types';
|
|
4
|
+
import { BreakpointType } from '../../breakpoints/breakPoints';
|
|
5
|
+
export type RadioState = 'default' | 'hover' | 'disabled' | 'error';
|
|
6
|
+
export type RadioIndicatorState = 'active' | 'inactive';
|
|
7
|
+
export type RadioTokensType = Readonly<{
|
|
8
|
+
gap: CSSObject['gap'];
|
|
9
|
+
slotGap: CSSObject['gap'];
|
|
10
|
+
groupGap: CSSObject['gap'];
|
|
11
|
+
indicator: {
|
|
12
|
+
[key in RadioIndicatorState]: {
|
|
13
|
+
background: {
|
|
14
|
+
[key in Exclude<RadioState, 'error'>]: CSSObject['backgroundColor'];
|
|
15
|
+
};
|
|
16
|
+
border: {
|
|
17
|
+
[key in Exclude<RadioState, 'error'>]: CSSObject['borderColor'];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
activeIndicator: {
|
|
22
|
+
active: {
|
|
23
|
+
background: {
|
|
24
|
+
[key in Exclude<RadioState, 'hover' | 'error'>]: CSSObject['backgroundColor'];
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
content: {
|
|
29
|
+
label: {
|
|
30
|
+
color: {
|
|
31
|
+
[key in RadioState]: CSSObject['color'];
|
|
32
|
+
};
|
|
33
|
+
font: {
|
|
34
|
+
[key in RadioSize]: {
|
|
35
|
+
fontSize: CSSObject['fontSize'];
|
|
36
|
+
fontWeight: CSSObject['fontWeight'];
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
sublabel: {
|
|
41
|
+
color: {
|
|
42
|
+
[key in RadioState]: CSSObject['color'];
|
|
43
|
+
};
|
|
44
|
+
font: {
|
|
45
|
+
[key in RadioSize]: {
|
|
46
|
+
fontSize: CSSObject['fontSize'];
|
|
47
|
+
fontWeight: CSSObject['fontWeight'];
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
height: {
|
|
53
|
+
[key in RadioSize]: CSSObject['height'];
|
|
54
|
+
};
|
|
55
|
+
borderWidth: {
|
|
56
|
+
[key in RadioIndicatorState]: {
|
|
57
|
+
[key in Exclude<RadioState, 'error'>]: number;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
slot: {
|
|
61
|
+
size: {
|
|
62
|
+
[key in RadioSize]: CSSObject['width'];
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
required: {
|
|
66
|
+
color: CSSObject['color'];
|
|
67
|
+
spacing: CSSObject['marginLeft'];
|
|
68
|
+
};
|
|
69
|
+
}>;
|
|
70
|
+
export type ResponsiveRadioTokens = {
|
|
71
|
+
[key in keyof BreakpointType]: RadioTokensType;
|
|
72
|
+
};
|
|
73
|
+
export declare const getRadioTokens: (foundationToken: ThemeType) => ResponsiveRadioTokens;
|
|
74
|
+
declare const radioTokens: ResponsiveRadioTokens;
|
|
75
|
+
export default radioTokens;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare enum RadioSize {
|
|
3
|
+
SMALL = "sm",
|
|
4
|
+
MEDIUM = "md"
|
|
5
|
+
}
|
|
6
|
+
export type RadioProps = {
|
|
7
|
+
id?: string;
|
|
8
|
+
value?: string;
|
|
9
|
+
checked?: boolean;
|
|
10
|
+
defaultChecked?: boolean;
|
|
11
|
+
onChange?: (checked: boolean) => void;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
error?: boolean;
|
|
15
|
+
size?: RadioSize;
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
subtext?: string;
|
|
18
|
+
slot?: ReactNode;
|
|
19
|
+
name?: string;
|
|
20
|
+
};
|
|
21
|
+
export type RadioGroupProps = {
|
|
22
|
+
id?: string;
|
|
23
|
+
label?: string;
|
|
24
|
+
name: string;
|
|
25
|
+
defaultValue?: string;
|
|
26
|
+
value?: string;
|
|
27
|
+
children: ReactNode;
|
|
28
|
+
onChange?: (value: string) => void;
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { RadioSize, RadioProps } from './types';
|
|
3
|
+
import { RadioTokensType } from './radio.token';
|
|
4
|
+
export declare const getRadioDataState: (checked: boolean) => string;
|
|
5
|
+
export declare const extractPixelValue: (tokenValue: string) => number;
|
|
6
|
+
export declare const getSpacingBySize: (size: RadioSize) => {
|
|
7
|
+
marginLeft: string;
|
|
8
|
+
marginTop: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const isControlledRadio: (checked: boolean | undefined) => boolean;
|
|
11
|
+
export declare const createRadioInputProps: (checked: boolean | undefined, defaultChecked: boolean) => {
|
|
12
|
+
checked: boolean | undefined;
|
|
13
|
+
defaultChecked?: undefined;
|
|
14
|
+
} | {
|
|
15
|
+
defaultChecked: boolean;
|
|
16
|
+
checked?: undefined;
|
|
17
|
+
};
|
|
18
|
+
export declare const getCurrentCheckedState: (checked: boolean | undefined, defaultChecked: boolean) => boolean;
|
|
19
|
+
export declare const createRadioChangeHandler: (disabled: boolean, onChange?: (checked: boolean) => void) => (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
20
|
+
export declare const isRadioElement: (child: React.ReactElement, RadioComponent: React.ComponentType<RadioProps>) => child is React.ReactElement<RadioProps>;
|
|
21
|
+
export declare const shouldRadioBeChecked: (groupValue: string | undefined, groupDefaultValue: string | undefined, radioValue: string) => boolean;
|
|
22
|
+
export declare const createGroupChangeHandler: (onChange?: (value: string) => void) => (isChecked: boolean, childValue: string) => void;
|
|
23
|
+
export declare const isValidRadioValue: (value: unknown) => value is string;
|
|
24
|
+
/**
|
|
25
|
+
* Gets the text color based on radio state
|
|
26
|
+
*/
|
|
27
|
+
export declare const getRadioTextColor: (radioTokens: RadioTokensType, isDisabled: boolean, error: boolean, isSubtext?: boolean) => string;
|
|
28
|
+
/**
|
|
29
|
+
* Gets the text properties for radio labels and subtext
|
|
30
|
+
*/
|
|
31
|
+
export declare const getRadioTextProps: (radioTokens: RadioTokensType, size: RadioSize, isDisabled: boolean, error: boolean, isSubtext?: boolean) => {
|
|
32
|
+
fontSize: string;
|
|
33
|
+
fontWeight: string;
|
|
34
|
+
color: string;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Gets label styles for radio components
|
|
38
|
+
*/
|
|
39
|
+
export declare const getRadioLabelStyles: (radioTokens: RadioTokensType, isDisabled: boolean) => {
|
|
40
|
+
display: "inline-flex";
|
|
41
|
+
alignItems: "center";
|
|
42
|
+
padding: number;
|
|
43
|
+
margin: number;
|
|
44
|
+
minHeight: string;
|
|
45
|
+
cursor: "not-allowed" | "pointer";
|
|
46
|
+
lineHeight: number;
|
|
47
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { SelectMenuGroupType, SelectMenuSize, SelectMenuVariant } from './types';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
export declare enum SelectionTagType {
|
|
4
|
+
COUNT = "count",
|
|
5
|
+
TEXT = "text"
|
|
6
|
+
}
|
|
7
|
+
type SelectProps = {
|
|
8
|
+
label: string;
|
|
9
|
+
subLabel?: string;
|
|
10
|
+
hintText?: string;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
helpIconText?: string;
|
|
13
|
+
placeholder: string;
|
|
14
|
+
size?: SelectMenuSize;
|
|
15
|
+
items: SelectMenuGroupType[];
|
|
16
|
+
variant?: SelectMenuVariant;
|
|
17
|
+
selected: string | string[];
|
|
18
|
+
onSelectChange: (value: string | string[]) => void;
|
|
19
|
+
allowMultiSelect?: boolean;
|
|
20
|
+
enableSearch?: boolean;
|
|
21
|
+
selectionTagType?: SelectionTagType;
|
|
22
|
+
slot?: React.ReactNode;
|
|
23
|
+
};
|
|
24
|
+
declare const Select: ({ items, variant, label, subLabel, hintText, required, helpIconText, placeholder, size, selected, onSelectChange, allowMultiSelect, enableSearch, selectionTagType, slot, }: SelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export default Select;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { SelectMenuProps } from './types';
|
|
2
|
+
declare const SelectMenu: ({ trigger, items, asModal, alignment, side, sideOffset, alignOffset, maxHeight, selected, onSelect, allowMultiSelect, enableSearch, onOpenChange, }: SelectMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default SelectMenu;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
type SelectTokenTypes = {
|
|
3
|
+
trigger: {
|
|
4
|
+
container: {
|
|
5
|
+
gap: CSSObject['gap'];
|
|
6
|
+
};
|
|
7
|
+
label: {
|
|
8
|
+
color: CSSObject['color'];
|
|
9
|
+
fontWeight: CSSObject['fontWeight'];
|
|
10
|
+
fontSize: CSSObject['fontSize'];
|
|
11
|
+
};
|
|
12
|
+
selectedValue: {
|
|
13
|
+
color: CSSObject['color'];
|
|
14
|
+
font: {
|
|
15
|
+
weight: CSSObject['fontWeight'];
|
|
16
|
+
size: {
|
|
17
|
+
sm: CSSObject['fontSize'];
|
|
18
|
+
md: CSSObject['fontSize'];
|
|
19
|
+
lg: CSSObject['fontSize'];
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
padding: {
|
|
23
|
+
sm: {
|
|
24
|
+
x: CSSObject['padding'];
|
|
25
|
+
y: CSSObject['padding'];
|
|
26
|
+
};
|
|
27
|
+
md: {
|
|
28
|
+
x: CSSObject['padding'];
|
|
29
|
+
y: CSSObject['padding'];
|
|
30
|
+
};
|
|
31
|
+
lg: {
|
|
32
|
+
x: CSSObject['padding'];
|
|
33
|
+
y: CSSObject['padding'];
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
declare const selectTokens: Readonly<SelectTokenTypes>;
|
|
40
|
+
export default selectTokens;
|