@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,112 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { ThemeType } from '../../tokens';
|
|
3
|
+
import { SwitchSize } from './types';
|
|
4
|
+
import { BreakpointType } from '../../breakpoints/breakPoints';
|
|
5
|
+
export type SwitchState = 'default' | 'hover' | 'disabled' | 'error';
|
|
6
|
+
export type SwitchIndicatorState = 'active' | 'inactive';
|
|
7
|
+
export type SwitchTokensType = {
|
|
8
|
+
gap: CSSObject['gap'];
|
|
9
|
+
slotGap: CSSObject['gap'];
|
|
10
|
+
contentGap: CSSObject['gap'];
|
|
11
|
+
height: {
|
|
12
|
+
[key in SwitchSize]: CSSObject['height'];
|
|
13
|
+
};
|
|
14
|
+
width: {
|
|
15
|
+
[key in SwitchSize]: CSSObject['width'];
|
|
16
|
+
};
|
|
17
|
+
borderRadius: {
|
|
18
|
+
base: CSSObject['borderRadius'];
|
|
19
|
+
thumb: CSSObject['borderRadius'];
|
|
20
|
+
};
|
|
21
|
+
indicator: {
|
|
22
|
+
[key in SwitchIndicatorState]: {
|
|
23
|
+
background: {
|
|
24
|
+
[key in Exclude<SwitchState, 'error'>]: CSSObject['backgroundColor'];
|
|
25
|
+
};
|
|
26
|
+
border: {
|
|
27
|
+
[key in Exclude<SwitchState, 'error'>]: CSSObject['borderColor'];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
thumb: {
|
|
32
|
+
background: CSSObject['backgroundColor'];
|
|
33
|
+
border: {
|
|
34
|
+
color: CSSObject['borderColor'];
|
|
35
|
+
width: CSSObject['borderWidth'];
|
|
36
|
+
};
|
|
37
|
+
size: {
|
|
38
|
+
[key in SwitchSize]: {
|
|
39
|
+
width: CSSObject['width'];
|
|
40
|
+
height: CSSObject['height'];
|
|
41
|
+
top: CSSObject['top'];
|
|
42
|
+
left: CSSObject['left'];
|
|
43
|
+
offset: {
|
|
44
|
+
active: CSSObject['left'];
|
|
45
|
+
inactive: CSSObject['left'];
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
content: {
|
|
51
|
+
label: {
|
|
52
|
+
color: {
|
|
53
|
+
[key in SwitchState]: CSSObject['color'];
|
|
54
|
+
};
|
|
55
|
+
font: {
|
|
56
|
+
[key in SwitchSize]: {
|
|
57
|
+
fontSize: CSSObject['fontSize'];
|
|
58
|
+
fontWeight: CSSObject['fontWeight'];
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
sublabel: {
|
|
63
|
+
color: {
|
|
64
|
+
[key in SwitchState]: CSSObject['color'];
|
|
65
|
+
};
|
|
66
|
+
font: {
|
|
67
|
+
[key in SwitchSize]: {
|
|
68
|
+
fontSize: CSSObject['fontSize'];
|
|
69
|
+
fontWeight: CSSObject['fontWeight'];
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
spacing: {
|
|
73
|
+
left: {
|
|
74
|
+
[key in SwitchSize]: CSSObject['marginLeft'];
|
|
75
|
+
};
|
|
76
|
+
top: CSSObject['marginTop'];
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
borderWidth: {
|
|
81
|
+
[key in SwitchIndicatorState]: {
|
|
82
|
+
[key in Exclude<SwitchState, 'error'>]: number;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
focus: {
|
|
86
|
+
outline: {
|
|
87
|
+
width: CSSObject['borderWidth'];
|
|
88
|
+
color: CSSObject['borderColor'];
|
|
89
|
+
offset: CSSObject['outlineOffset'];
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
slot: {
|
|
93
|
+
size: {
|
|
94
|
+
[key in SwitchSize]: CSSObject['width'];
|
|
95
|
+
};
|
|
96
|
+
spacing: CSSObject['margin'];
|
|
97
|
+
};
|
|
98
|
+
required: {
|
|
99
|
+
color: CSSObject['color'];
|
|
100
|
+
spacing: CSSObject['margin'];
|
|
101
|
+
};
|
|
102
|
+
transition: {
|
|
103
|
+
duration: CSSObject['transitionDuration'];
|
|
104
|
+
easing: CSSObject['transitionTimingFunction'];
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
export type ResponsiveSwitchTokens = {
|
|
108
|
+
[key in keyof BreakpointType]: SwitchTokensType;
|
|
109
|
+
};
|
|
110
|
+
export declare const getSwitchTokens: (foundationToken: ThemeType) => ResponsiveSwitchTokens;
|
|
111
|
+
declare const switchTokens: ResponsiveSwitchTokens;
|
|
112
|
+
export default switchTokens;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare enum SwitchSize {
|
|
3
|
+
SMALL = "sm",
|
|
4
|
+
MEDIUM = "md"
|
|
5
|
+
}
|
|
6
|
+
export type SwitchProps = {
|
|
7
|
+
id?: string;
|
|
8
|
+
checked?: boolean;
|
|
9
|
+
defaultChecked?: boolean;
|
|
10
|
+
onChange?: (checked: boolean) => void;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
error?: boolean;
|
|
14
|
+
size?: SwitchSize;
|
|
15
|
+
label?: ReactNode;
|
|
16
|
+
subtext?: ReactNode;
|
|
17
|
+
slot?: ReactNode;
|
|
18
|
+
name?: string;
|
|
19
|
+
value?: string;
|
|
20
|
+
};
|
|
21
|
+
export type SwitchGroupProps = {
|
|
22
|
+
id?: string;
|
|
23
|
+
label?: string;
|
|
24
|
+
name?: string;
|
|
25
|
+
children: ReactNode;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
value?: string[];
|
|
28
|
+
defaultValue?: string[];
|
|
29
|
+
onChange?: (value: string[]) => void;
|
|
30
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SwitchSize, SwitchProps } from './types';
|
|
3
|
+
import { SwitchTokensType } from './switch.token';
|
|
4
|
+
export declare const getSwitchDataState: (checked: boolean) => string;
|
|
5
|
+
export declare const extractPixelValue: (tokenValue: string) => number;
|
|
6
|
+
export declare const getSpacingBySize: (size: SwitchSize) => {
|
|
7
|
+
marginLeft: string;
|
|
8
|
+
marginTop: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Determines if the switch component is controlled based on the checked prop
|
|
12
|
+
*/
|
|
13
|
+
export declare const isControlledSwitch: (checked: boolean | undefined) => boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Creates a toggle handler for switch components
|
|
16
|
+
*/
|
|
17
|
+
export declare const createSwitchToggleHandler: (currentChecked: boolean, disabled: boolean, isControlled: boolean, setInternalChecked?: React.Dispatch<React.SetStateAction<boolean>>, onChange?: (checked: boolean) => void) => () => void;
|
|
18
|
+
/**
|
|
19
|
+
* Gets the text color based on switch state
|
|
20
|
+
*/
|
|
21
|
+
export declare const getSwitchTextColor: (tokens: SwitchTokensType, disabled: boolean, error: boolean) => string;
|
|
22
|
+
/**
|
|
23
|
+
* Gets the subtext color based on switch state
|
|
24
|
+
*/
|
|
25
|
+
export declare const getSwitchSubtextColor: (tokens: SwitchTokensType, disabled: boolean, error: boolean) => string;
|
|
26
|
+
/**
|
|
27
|
+
* Gets the text properties for switch labels
|
|
28
|
+
*/
|
|
29
|
+
export declare const getSwitchTextProps: (tokens: SwitchTokensType, size: SwitchSize, disabled: boolean, error: boolean) => {
|
|
30
|
+
fontSize: string;
|
|
31
|
+
fontWeight: string;
|
|
32
|
+
color: string;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Gets the subtext properties for switch
|
|
36
|
+
*/
|
|
37
|
+
export declare const getSwitchSubtextProps: (tokens: SwitchTokensType, size: SwitchSize, disabled: boolean, error: boolean) => {
|
|
38
|
+
fontSize: string;
|
|
39
|
+
color: string;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Gets label styles for switch components
|
|
43
|
+
*/
|
|
44
|
+
export declare const getSwitchLabelStyles: (disabled: boolean) => {
|
|
45
|
+
cursor: "not-allowed" | "pointer";
|
|
46
|
+
display: "flex";
|
|
47
|
+
alignItems: "center";
|
|
48
|
+
margin: number;
|
|
49
|
+
padding: number;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Validates if a child element is a Switch component
|
|
53
|
+
*/
|
|
54
|
+
export declare const isSwitchElement: (child: React.ReactElement, SwitchComponent: React.ComponentType<SwitchProps>) => child is React.ReactElement<SwitchProps>;
|
|
55
|
+
/**
|
|
56
|
+
* Creates a group change handler for switch groups
|
|
57
|
+
*/
|
|
58
|
+
export declare const createSwitchGroupChangeHandler: (values: string[], isControlled: boolean, setInternalValues?: React.Dispatch<React.SetStateAction<string[]>>, onChange?: (values: string[]) => void) => (checked: boolean, childValue: string) => void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { TabsVariant, TabsSize } from './types';
|
|
2
|
+
import { TabsTokensType } from './tabs.token';
|
|
3
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
4
|
+
export declare const StyledTabs: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<TabsPrimitive.TabsProps & import('react').RefAttributes<HTMLDivElement>, never>> & string & Omit<import('react').ForwardRefExoticComponent<TabsPrimitive.TabsProps & import('react').RefAttributes<HTMLDivElement>>, keyof import('react').Component<any, {}, any>>;
|
|
5
|
+
export declare const StyledTabsContent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<TabsPrimitive.TabsContentProps & import('react').RefAttributes<HTMLDivElement>, {
|
|
6
|
+
$tabsToken: TabsTokensType;
|
|
7
|
+
}>> & string & Omit<import('react').ForwardRefExoticComponent<TabsPrimitive.TabsContentProps & import('react').RefAttributes<HTMLDivElement>>, keyof import('react').Component<any, {}, any>>;
|
|
8
|
+
export declare const StyledTabsList: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<TabsPrimitive.TabsListProps & import('react').RefAttributes<HTMLDivElement>, {
|
|
9
|
+
$variant: TabsVariant;
|
|
10
|
+
$size: TabsSize;
|
|
11
|
+
$expanded: boolean;
|
|
12
|
+
$fitContent: boolean;
|
|
13
|
+
$tabsToken: TabsTokensType;
|
|
14
|
+
}>> & string & Omit<import('react').ForwardRefExoticComponent<TabsPrimitive.TabsListProps & import('react').RefAttributes<HTMLDivElement>>, keyof import('react').Component<any, {}, any>>;
|
|
15
|
+
export declare const StyledTabsTrigger: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<TabsPrimitive.TabsTriggerProps & import('react').RefAttributes<HTMLButtonElement>, {
|
|
16
|
+
$variant: TabsVariant;
|
|
17
|
+
$size: TabsSize;
|
|
18
|
+
$tabsToken: TabsTokensType;
|
|
19
|
+
}>> & string & Omit<import('react').ForwardRefExoticComponent<TabsPrimitive.TabsTriggerProps & import('react').RefAttributes<HTMLButtonElement>>, keyof import('react').Component<any, {}, any>>;
|
|
20
|
+
export declare const IconContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
|
|
21
|
+
$tabsToken: TabsTokensType;
|
|
22
|
+
}>> & string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
declare const Tabs: import('react').ForwardRefExoticComponent<Omit<import('@radix-ui/react-tabs').TabsProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & {
|
|
2
|
+
variant?: import('./types').TabsVariant;
|
|
3
|
+
size?: import('./types').TabsSize;
|
|
4
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export default Tabs;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TabsSize, TabsVariant } from './types';
|
|
2
|
+
declare const TabsList: import('react').ForwardRefExoticComponent<Omit<import('@radix-ui/react-tabs').TabsListProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & {
|
|
3
|
+
variant?: TabsVariant;
|
|
4
|
+
size?: TabsSize;
|
|
5
|
+
expanded?: boolean;
|
|
6
|
+
fitContent?: boolean;
|
|
7
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export default TabsList;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TabsVariant, TabsSize } from './types';
|
|
2
|
+
declare const TabsTrigger: import('react').ForwardRefExoticComponent<Omit<import('@radix-ui/react-tabs').TabsTriggerProps & import('react').RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
3
|
+
value: string;
|
|
4
|
+
variant?: TabsVariant;
|
|
5
|
+
size?: TabsSize;
|
|
6
|
+
leftSlot?: import('react').ReactNode;
|
|
7
|
+
rightSlot?: import('react').ReactNode;
|
|
8
|
+
children: string | number;
|
|
9
|
+
} & import('react').RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
export default TabsTrigger;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as Tabs } from './Tabs';
|
|
2
|
+
import { default as TabsList } from './TabsList';
|
|
3
|
+
import { default as TabsTrigger } from './TabsTrigger';
|
|
4
|
+
import { default as TabsContent } from './TabsContent';
|
|
5
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
6
|
+
export * from './types';
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { ThemeType } from '../../tokens';
|
|
3
|
+
import { TabsVariant, TabsSize } from './types';
|
|
4
|
+
export type TabsState = 'default' | 'hover' | 'active' | 'disabled';
|
|
5
|
+
export type TabsTokensType = {
|
|
6
|
+
gap: {
|
|
7
|
+
[key in TabsVariant]: CSSObject['gap'];
|
|
8
|
+
};
|
|
9
|
+
list: {
|
|
10
|
+
padding: {
|
|
11
|
+
[key in TabsVariant]: CSSObject['padding'];
|
|
12
|
+
};
|
|
13
|
+
backgroundColor: {
|
|
14
|
+
[key in TabsVariant]: CSSObject['backgroundColor'];
|
|
15
|
+
};
|
|
16
|
+
borderRadius: {
|
|
17
|
+
[key in TabsVariant]: CSSObject['borderRadius'];
|
|
18
|
+
};
|
|
19
|
+
borderBottom: {
|
|
20
|
+
[key in TabsVariant]: CSSObject['borderBottom'];
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
trigger: {
|
|
24
|
+
height: {
|
|
25
|
+
[key in TabsSize]: CSSObject['height'];
|
|
26
|
+
};
|
|
27
|
+
padding: {
|
|
28
|
+
[key in TabsSize]: CSSObject['padding'];
|
|
29
|
+
};
|
|
30
|
+
fontSize: {
|
|
31
|
+
[key in TabsSize]: CSSObject['fontSize'];
|
|
32
|
+
};
|
|
33
|
+
iconGap: CSSObject['gap'];
|
|
34
|
+
fontWeight: {
|
|
35
|
+
[key in TabsVariant]: {
|
|
36
|
+
[key in TabsState]?: CSSObject['fontWeight'];
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
color: {
|
|
40
|
+
[key in TabsVariant]: {
|
|
41
|
+
[key in TabsState]?: CSSObject['color'];
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
backgroundColor: {
|
|
45
|
+
[key in TabsVariant]: {
|
|
46
|
+
[key in TabsState]?: CSSObject['backgroundColor'];
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
borderRadius: {
|
|
50
|
+
[key in TabsVariant]: CSSObject['borderRadius'];
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
underline: {
|
|
54
|
+
height: CSSObject['height'];
|
|
55
|
+
color: CSSObject['color'];
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export declare const getTabsTokens: (foundationToken: ThemeType) => TabsTokensType;
|
|
59
|
+
declare const tabsTokens: TabsTokensType;
|
|
60
|
+
export default tabsTokens;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
3
|
+
export declare enum TabsVariant {
|
|
4
|
+
BOXED = "boxed",
|
|
5
|
+
FLOATING = "floating",
|
|
6
|
+
UNDERLINE = "underline"
|
|
7
|
+
}
|
|
8
|
+
export declare enum TabsSize {
|
|
9
|
+
MD = "md",
|
|
10
|
+
LG = "lg"
|
|
11
|
+
}
|
|
12
|
+
export type TabsProps = ComponentPropsWithoutRef<typeof TabsPrimitive.Root> & {
|
|
13
|
+
variant?: TabsVariant;
|
|
14
|
+
size?: TabsSize;
|
|
15
|
+
};
|
|
16
|
+
export type TabsListProps = ComponentPropsWithoutRef<typeof TabsPrimitive.List> & {
|
|
17
|
+
variant?: TabsVariant;
|
|
18
|
+
size?: TabsSize;
|
|
19
|
+
expanded?: boolean;
|
|
20
|
+
fitContent?: boolean;
|
|
21
|
+
};
|
|
22
|
+
export type TabsTriggerProps = ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger> & {
|
|
23
|
+
value: string;
|
|
24
|
+
variant?: TabsVariant;
|
|
25
|
+
size?: TabsSize;
|
|
26
|
+
leftSlot?: ReactNode;
|
|
27
|
+
rightSlot?: ReactNode;
|
|
28
|
+
children: string | number;
|
|
29
|
+
};
|
|
30
|
+
export type TabsContentProps = ComponentPropsWithoutRef<typeof TabsPrimitive.Content>;
|
|
31
|
+
export type TabsStyles = {
|
|
32
|
+
list: string;
|
|
33
|
+
trigger: string;
|
|
34
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { ThemeType } from '../../tokens';
|
|
3
|
+
import { TagColor, TagShape, TagSize, TagVariant } from './types';
|
|
4
|
+
import { BreakpointType } from '../../breakpoints/breakPoints';
|
|
5
|
+
export type TagTokensType = Readonly<{
|
|
6
|
+
background: {
|
|
7
|
+
[key in TagVariant]: {
|
|
8
|
+
[key in TagColor]: CSSObject['color'];
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
color: {
|
|
12
|
+
[key in TagVariant]: {
|
|
13
|
+
[key in TagColor]: CSSObject['color'];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
borderColor: {
|
|
17
|
+
[key in TagVariant]: {
|
|
18
|
+
[key in TagColor]: CSSObject['color'];
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
borderRadius: {
|
|
22
|
+
[key in TagShape]: {
|
|
23
|
+
[key in TagSize]: CSSObject['borderRadius'];
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
borderWidth: {
|
|
27
|
+
[key in TagVariant]: {
|
|
28
|
+
[key in TagColor]: CSSObject['borderWidth'];
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
font: {
|
|
32
|
+
[key in TagSize]: {
|
|
33
|
+
fontSize: CSSObject['fontSize'];
|
|
34
|
+
fontWeight: CSSObject['fontWeight'];
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
gap: {
|
|
38
|
+
[key in TagSize]: CSSObject['gap'];
|
|
39
|
+
};
|
|
40
|
+
padding: {
|
|
41
|
+
[key in TagSize]: CSSObject['padding'];
|
|
42
|
+
};
|
|
43
|
+
height: {
|
|
44
|
+
[key in TagSize]: CSSObject['height'];
|
|
45
|
+
};
|
|
46
|
+
slot: {
|
|
47
|
+
size: {
|
|
48
|
+
[key in TagSize]: CSSObject['width'];
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
}>;
|
|
52
|
+
export type ResponsiveTagTokens = {
|
|
53
|
+
[key in keyof BreakpointType]: TagTokensType;
|
|
54
|
+
};
|
|
55
|
+
declare const tagTokens: TagTokensType;
|
|
56
|
+
export declare const getTagTokens: (foundationToken: ThemeType) => ResponsiveTagTokens;
|
|
57
|
+
export default tagTokens;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare enum TagVariant {
|
|
3
|
+
NO_FILL = "noFill",
|
|
4
|
+
ATTENTIVE = "attentive",
|
|
5
|
+
SUBTLE = "subtle"
|
|
6
|
+
}
|
|
7
|
+
export declare enum TagColor {
|
|
8
|
+
NEUTRAL = "neutral",
|
|
9
|
+
PRIMARY = "primary",
|
|
10
|
+
SUCCESS = "success",
|
|
11
|
+
ERROR = "error",
|
|
12
|
+
WARNING = "warning",
|
|
13
|
+
PURPLE = "purple"
|
|
14
|
+
}
|
|
15
|
+
export declare enum TagSize {
|
|
16
|
+
XS = "xs",
|
|
17
|
+
SM = "sm",
|
|
18
|
+
MD = "md",
|
|
19
|
+
LG = "lg"
|
|
20
|
+
}
|
|
21
|
+
export declare enum TagShape {
|
|
22
|
+
ROUNDED = "rounded",
|
|
23
|
+
SQUARICAL = "squarical"
|
|
24
|
+
}
|
|
25
|
+
export type TagProps = {
|
|
26
|
+
text: string;
|
|
27
|
+
variant?: TagVariant;
|
|
28
|
+
color?: TagColor;
|
|
29
|
+
size?: TagSize;
|
|
30
|
+
shape?: TagShape;
|
|
31
|
+
leftSlot?: ReactNode;
|
|
32
|
+
rightSlot?: ReactNode;
|
|
33
|
+
onClick?: () => void;
|
|
34
|
+
splitTagPosition?: 'left' | 'right';
|
|
35
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React, JSX } from 'react';
|
|
2
|
+
import { PrimitiveTextProps } from '../Primitives/PrimitiveText/PrimitiveText';
|
|
3
|
+
export type SemanticTagType = keyof Pick<JSX.IntrinsicElements, 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'span' | 'code' | 'q' | 'small' | 'label'>;
|
|
4
|
+
export type TextProps = PrimitiveTextProps & {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
variant?: VariantType;
|
|
7
|
+
as?: SemanticTagType;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
};
|
|
10
|
+
export type VariantType = 'body.xs' | 'body.sm' | 'body.md' | 'body.lg' | 'display.sm' | 'display.md' | 'display.lg' | 'display.xl' | 'heading.sm' | 'heading.md' | 'heading.lg' | 'heading.xl' | 'heading.2xl' | 'code.sm' | 'code.md' | 'code.lg';
|
|
11
|
+
declare const Text: ({ children, variant, as, color, fontWeight, fontSize, truncate, style, ...rest }: TextProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default Text;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { TooltipSize } from './types';
|
|
3
|
+
import { FoundationTokenType } from '../../tokens/theme.token';
|
|
4
|
+
export type TooltipTokensType = {
|
|
5
|
+
background: CSSObject['backgroundColor'];
|
|
6
|
+
color: CSSObject['color'];
|
|
7
|
+
fontWeight: {
|
|
8
|
+
[key in TooltipSize]: CSSObject['fontWeight'];
|
|
9
|
+
};
|
|
10
|
+
borderRadius: {
|
|
11
|
+
[key in TooltipSize]: CSSObject['borderRadius'];
|
|
12
|
+
};
|
|
13
|
+
maxWidth: {
|
|
14
|
+
[key in TooltipSize]: CSSObject['maxWidth'];
|
|
15
|
+
};
|
|
16
|
+
padding: {
|
|
17
|
+
[key in TooltipSize]: CSSObject['padding'];
|
|
18
|
+
};
|
|
19
|
+
fontSize: {
|
|
20
|
+
[key in TooltipSize]: CSSObject['fontSize'];
|
|
21
|
+
};
|
|
22
|
+
lineHeight: {
|
|
23
|
+
[key in TooltipSize]: CSSObject['lineHeight'];
|
|
24
|
+
};
|
|
25
|
+
gap: {
|
|
26
|
+
[key in TooltipSize]: CSSObject['gap'];
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
declare const tooltipTokens: TooltipTokensType;
|
|
30
|
+
export declare const getTooltipTokens: (foundationToken: FoundationTokenType) => TooltipTokensType;
|
|
31
|
+
export default tooltipTokens;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare enum TooltipSlotDirection {
|
|
3
|
+
LEFT = "left",
|
|
4
|
+
RIGHT = "right"
|
|
5
|
+
}
|
|
6
|
+
export declare enum TooltipSide {
|
|
7
|
+
TOP = "top",
|
|
8
|
+
RIGHT = "right",
|
|
9
|
+
LEFT = "left",
|
|
10
|
+
BOTTOM = "bottom"
|
|
11
|
+
}
|
|
12
|
+
export declare enum TooltipAlign {
|
|
13
|
+
START = "start",
|
|
14
|
+
END = "end",
|
|
15
|
+
CENTER = "center"
|
|
16
|
+
}
|
|
17
|
+
export declare enum TooltipSize {
|
|
18
|
+
SMALL = "sm",
|
|
19
|
+
LARGE = "lg"
|
|
20
|
+
}
|
|
21
|
+
export type TooltipProps = {
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
content: ReactNode | string;
|
|
24
|
+
open?: boolean;
|
|
25
|
+
side?: TooltipSide;
|
|
26
|
+
align?: TooltipAlign;
|
|
27
|
+
showArrow?: boolean;
|
|
28
|
+
size?: TooltipSize;
|
|
29
|
+
slot?: ReactNode;
|
|
30
|
+
slotDirection?: TooltipSlotDirection;
|
|
31
|
+
delayDuration?: number;
|
|
32
|
+
offset?: number;
|
|
33
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ThemeType } from '../tokens';
|
|
2
|
+
import { ResponsiveTagTokens } from '../components/Tags/tag.tokens';
|
|
3
|
+
import { SearchInputTokensType } from '../components/Inputs/SearchInput/searchInput.tokens';
|
|
4
|
+
import { TextAreaTokensType } from '../components/Inputs/TextArea/textarea.token';
|
|
5
|
+
import { ResponsiveRadioTokens } from '../components/Radio/radio.token';
|
|
6
|
+
import { ResponsiveSwitchTokens } from '../components/Switch/switch.token';
|
|
7
|
+
import { TextInputTokensType } from '../components/Inputs/TextInput/textInput.tokens';
|
|
8
|
+
import { NumberInputTokensType } from '../components/Inputs/NumberInput/numberInput.tokens';
|
|
9
|
+
import { ResponsiveAlertTokens } from '../components/Alert/alert.tokens';
|
|
10
|
+
import { OTPInputTokensType } from '../components/Inputs/OTPInput/otpInput.tokens';
|
|
11
|
+
import { TooltipTokensType } from '../components/Tooltip/tooltip.tokens';
|
|
12
|
+
import { UnitInputTokensType } from '../components/Inputs/UnitInput/unitInput.tokens';
|
|
13
|
+
import { MultiValueInputTokensType } from '../components/Inputs/MultiValueInput/multiValueInput.tokens';
|
|
14
|
+
import { DropdownInputTokensType } from '../components/Inputs/DropdownInput/dropdownInput.tokens';
|
|
15
|
+
import { ResponsiveCheckboxTokens } from '../components/Checkbox/checkbox.token';
|
|
16
|
+
import { TabsTokensType } from '../components/Tabs/tabs.token';
|
|
17
|
+
import { ResponsiveButtonTokens } from '../components/Button/button.tokens';
|
|
18
|
+
import { ModalTokensType } from '../components/Modal/modal.tokens';
|
|
19
|
+
import { ResponsiveBreadcrumbTokens } from '../components/Breadcrumb/breadcrumb.tokens';
|
|
20
|
+
import { PopoverTokenType } from '../components/Popover/popover.tokens';
|
|
21
|
+
import { ResponsiveMenuTokensType } from '../components/Menu/menu.tokens';
|
|
22
|
+
import { MultiSelectTokensType } from '../components/MultiSelect/multiSelect.tokens';
|
|
23
|
+
import { TableTokenType } from '../components/DataTable/dataTable.tokens';
|
|
24
|
+
import { CalendarTokenType } from '../components/DateRangePicker/dateRangePicker.tokens';
|
|
25
|
+
import { AccordionTokenType } from '../components/Accordion/accordion.tokens';
|
|
26
|
+
import { StatCardTokenType } from '../components/StatCard/statcard.tokens';
|
|
27
|
+
import { ProgressBarTokenType } from '../components/ProgressBar/progressbar.tokens';
|
|
28
|
+
import { DrawerTokensType } from '../components/Drawer/drawer.tokens';
|
|
29
|
+
import { BreakpointType } from '../breakpoints/breakPoints';
|
|
30
|
+
export type ComponentTokenType = {
|
|
31
|
+
TAGS?: ResponsiveTagTokens;
|
|
32
|
+
SEARCH_INPUT?: SearchInputTokensType;
|
|
33
|
+
TEXT_AREA?: TextAreaTokensType;
|
|
34
|
+
RADIO?: ResponsiveRadioTokens;
|
|
35
|
+
SWITCH?: ResponsiveSwitchTokens;
|
|
36
|
+
TEXT_INPUT?: TextInputTokensType;
|
|
37
|
+
NUMBER_INPUT?: NumberInputTokensType;
|
|
38
|
+
ALERT?: ResponsiveAlertTokens;
|
|
39
|
+
OTP_INPUT?: OTPInputTokensType;
|
|
40
|
+
TOOLTIP?: TooltipTokensType;
|
|
41
|
+
UNIT_INPUT?: UnitInputTokensType;
|
|
42
|
+
MULTI_VALUE_INPUT?: MultiValueInputTokensType;
|
|
43
|
+
DROPDOWN_INPUT?: DropdownInputTokensType;
|
|
44
|
+
CHECKBOX?: ResponsiveCheckboxTokens;
|
|
45
|
+
TABS?: TabsTokensType;
|
|
46
|
+
BUTTON?: ResponsiveButtonTokens;
|
|
47
|
+
MODAL?: ModalTokensType;
|
|
48
|
+
BREADCRUMB?: ResponsiveBreadcrumbTokens;
|
|
49
|
+
POPOVER?: PopoverTokenType;
|
|
50
|
+
MENU?: ResponsiveMenuTokensType;
|
|
51
|
+
MULTI_SELECT?: MultiSelectTokensType;
|
|
52
|
+
TABLE?: TableTokenType;
|
|
53
|
+
CALENDAR?: CalendarTokenType;
|
|
54
|
+
ACCORDION?: AccordionTokenType;
|
|
55
|
+
STAT_CARD?: StatCardTokenType;
|
|
56
|
+
PROGRESS_BAR?: ProgressBarTokenType;
|
|
57
|
+
DRAWER?: DrawerTokensType;
|
|
58
|
+
};
|
|
59
|
+
type ThemeContextType = {
|
|
60
|
+
foundationTokens: ThemeType;
|
|
61
|
+
componentTokens: Required<ComponentTokenType>;
|
|
62
|
+
breakpoints: BreakpointType;
|
|
63
|
+
};
|
|
64
|
+
declare const ThemeContext: import('react').Context<ThemeContextType>;
|
|
65
|
+
export declare const useTheme: () => ThemeContextType;
|
|
66
|
+
export default ThemeContext;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BreakpointType } from '../breakpoints/breakPoints';
|
|
2
|
+
import { ThemeType } from '../tokens';
|
|
3
|
+
import { ComponentTokenType } from './ThemeContext';
|
|
4
|
+
type ThemeProviderProps = {
|
|
5
|
+
foundationTokens?: ThemeType;
|
|
6
|
+
componentTokens?: ComponentTokenType;
|
|
7
|
+
breakpoints?: BreakpointType;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
};
|
|
10
|
+
declare const ThemeProvider: ({ foundationTokens, componentTokens, breakpoints, children, }: ThemeProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default ThemeProvider;
|