@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,60 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { FoundationTokenType } from '../../tokens/theme.token';
|
|
3
|
+
export type DrawerTokensType = {
|
|
4
|
+
overlay: {
|
|
5
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
6
|
+
zIndex: CSSObject['zIndex'];
|
|
7
|
+
};
|
|
8
|
+
content: {
|
|
9
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
10
|
+
borderRadius: CSSObject['borderRadius'];
|
|
11
|
+
boxShadow: CSSObject['boxShadow'];
|
|
12
|
+
zIndex: CSSObject['zIndex'];
|
|
13
|
+
border: CSSObject['border'];
|
|
14
|
+
};
|
|
15
|
+
mobileOffset: {
|
|
16
|
+
top: CSSObject['top'];
|
|
17
|
+
bottom: CSSObject['bottom'];
|
|
18
|
+
left: CSSObject['left'];
|
|
19
|
+
right: CSSObject['right'];
|
|
20
|
+
};
|
|
21
|
+
handle: {
|
|
22
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
23
|
+
borderRadius: CSSObject['borderRadius'];
|
|
24
|
+
width: CSSObject['width'];
|
|
25
|
+
height: CSSObject['height'];
|
|
26
|
+
};
|
|
27
|
+
header: {
|
|
28
|
+
padding: CSSObject['padding'];
|
|
29
|
+
borderBottom: CSSObject['borderBottom'];
|
|
30
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
31
|
+
title: {
|
|
32
|
+
color: CSSObject['color'];
|
|
33
|
+
fontSize: CSSObject['fontSize'];
|
|
34
|
+
fontWeight: CSSObject['fontWeight'];
|
|
35
|
+
lineHeight: CSSObject['lineHeight'];
|
|
36
|
+
};
|
|
37
|
+
description: {
|
|
38
|
+
color: CSSObject['color'];
|
|
39
|
+
fontSize: CSSObject['fontSize'];
|
|
40
|
+
lineHeight: CSSObject['lineHeight'];
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
body: {
|
|
44
|
+
padding: CSSObject['padding'];
|
|
45
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
46
|
+
maxHeight: CSSObject['maxHeight'];
|
|
47
|
+
overflowY: CSSObject['overflowY'];
|
|
48
|
+
};
|
|
49
|
+
footer: {
|
|
50
|
+
padding: CSSObject['padding'];
|
|
51
|
+
borderTop: CSSObject['borderTop'];
|
|
52
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
53
|
+
gap: CSSObject['gap'];
|
|
54
|
+
alignItems: CSSObject['alignItems'];
|
|
55
|
+
justifyContent: CSSObject['justifyContent'];
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export declare const drawerTokens: DrawerTokensType;
|
|
59
|
+
export declare const getDrawerComponentTokens: (foundationToken: FoundationTokenType) => DrawerTokensType;
|
|
60
|
+
export default drawerTokens;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { Drawer, DrawerTrigger, DrawerPortal, DrawerOverlay, DrawerContent, DrawerHeader, DrawerTitle, DrawerDescription, DrawerBody, DrawerFooter, DrawerClose, StatusDrawer, MultiSelectDrawer, SingleSelectDrawer, NestedMultiSelectDrawer, NestedSingleSelectDrawer, } from './Drawer';
|
|
2
|
+
export * from './types';
|
|
3
|
+
export type { DrawerTokensType } from './drawer.tokens';
|
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ButtonV2Props } from '../Button/types';
|
|
3
|
+
export type DrawerDirection = 'top' | 'bottom' | 'left' | 'right';
|
|
4
|
+
export type DrawerProps = {
|
|
5
|
+
/**
|
|
6
|
+
* Whether the drawer is open
|
|
7
|
+
*/
|
|
8
|
+
open?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Callback when the drawer open state changes
|
|
11
|
+
*/
|
|
12
|
+
onOpenChange?: (open: boolean) => void;
|
|
13
|
+
/**
|
|
14
|
+
* The direction from which the drawer slides in
|
|
15
|
+
* @default 'bottom'
|
|
16
|
+
*/
|
|
17
|
+
direction?: DrawerDirection;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the drawer should be modal (with overlay)
|
|
20
|
+
* @default true
|
|
21
|
+
*/
|
|
22
|
+
modal?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Whether the drawer can be dismissed by clicking outside
|
|
25
|
+
* @default true
|
|
26
|
+
*/
|
|
27
|
+
dismissible?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Whether to show the drag handle (only for bottom/top drawers)
|
|
30
|
+
* @default true
|
|
31
|
+
*/
|
|
32
|
+
showHandle?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Custom handle element
|
|
35
|
+
*/
|
|
36
|
+
handle?: ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* Whether the drawer should be nested (for stacking effect)
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
41
|
+
nested?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Custom snap points for the drawer (only for bottom/top drawers)
|
|
44
|
+
*/
|
|
45
|
+
snapPoints?: (string | number)[];
|
|
46
|
+
/**
|
|
47
|
+
* Active snap point (can be index or the snap point value itself)
|
|
48
|
+
*/
|
|
49
|
+
activeSnapPoint?: number | string | null;
|
|
50
|
+
/**
|
|
51
|
+
* Callback when snap point changes
|
|
52
|
+
*/
|
|
53
|
+
onSnapPointChange?: (activeSnapPoint: number | string | null) => void;
|
|
54
|
+
/**
|
|
55
|
+
* Whether the drawer should fade from the given snap point index
|
|
56
|
+
*/
|
|
57
|
+
fadeFromIndex?: number;
|
|
58
|
+
/**
|
|
59
|
+
* Disable velocity-based snapping, ensuring sequential snap point navigation
|
|
60
|
+
* @default false
|
|
61
|
+
*/
|
|
62
|
+
snapToSequentialPoint?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Custom mobile offset values (overrides token defaults)
|
|
65
|
+
*/
|
|
66
|
+
mobileOffset?: {
|
|
67
|
+
top?: string;
|
|
68
|
+
bottom?: string;
|
|
69
|
+
left?: string;
|
|
70
|
+
right?: string;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Custom class name for the drawer content
|
|
74
|
+
*/
|
|
75
|
+
className?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Custom class name for the overlay
|
|
78
|
+
*/
|
|
79
|
+
overlayClassName?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Custom styles for the drawer content
|
|
82
|
+
*/
|
|
83
|
+
style?: React.CSSProperties;
|
|
84
|
+
/**
|
|
85
|
+
* Children content
|
|
86
|
+
*/
|
|
87
|
+
children: ReactNode;
|
|
88
|
+
};
|
|
89
|
+
export type DrawerTriggerProps = {
|
|
90
|
+
/**
|
|
91
|
+
* The trigger element
|
|
92
|
+
*/
|
|
93
|
+
children: ReactNode;
|
|
94
|
+
/**
|
|
95
|
+
* Custom class name
|
|
96
|
+
*/
|
|
97
|
+
className?: string;
|
|
98
|
+
/**
|
|
99
|
+
* Whether the trigger is disabled
|
|
100
|
+
*/
|
|
101
|
+
disabled?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Custom click handler
|
|
104
|
+
*/
|
|
105
|
+
onClick?: () => void;
|
|
106
|
+
};
|
|
107
|
+
export type DrawerContentProps = {
|
|
108
|
+
/**
|
|
109
|
+
* Content of the drawer
|
|
110
|
+
*/
|
|
111
|
+
children: ReactNode;
|
|
112
|
+
/**
|
|
113
|
+
* Custom class name
|
|
114
|
+
*/
|
|
115
|
+
className?: string;
|
|
116
|
+
/**
|
|
117
|
+
* Custom styles
|
|
118
|
+
*/
|
|
119
|
+
style?: React.CSSProperties;
|
|
120
|
+
};
|
|
121
|
+
export type DrawerHeaderProps = {
|
|
122
|
+
/**
|
|
123
|
+
* Header content
|
|
124
|
+
*/
|
|
125
|
+
children: ReactNode;
|
|
126
|
+
/**
|
|
127
|
+
* Custom class name
|
|
128
|
+
*/
|
|
129
|
+
className?: string;
|
|
130
|
+
};
|
|
131
|
+
export type DrawerTitleProps = {
|
|
132
|
+
/**
|
|
133
|
+
* Title content
|
|
134
|
+
*/
|
|
135
|
+
children: ReactNode;
|
|
136
|
+
/**
|
|
137
|
+
* Custom class name
|
|
138
|
+
*/
|
|
139
|
+
className?: string;
|
|
140
|
+
};
|
|
141
|
+
export type DrawerDescriptionProps = {
|
|
142
|
+
/**
|
|
143
|
+
* Description content
|
|
144
|
+
*/
|
|
145
|
+
children: ReactNode;
|
|
146
|
+
/**
|
|
147
|
+
* Custom class name
|
|
148
|
+
*/
|
|
149
|
+
className?: string;
|
|
150
|
+
};
|
|
151
|
+
export type DrawerFooterProps = {
|
|
152
|
+
/**
|
|
153
|
+
* Footer content
|
|
154
|
+
*/
|
|
155
|
+
children: ReactNode;
|
|
156
|
+
/**
|
|
157
|
+
* Custom class name
|
|
158
|
+
*/
|
|
159
|
+
className?: string;
|
|
160
|
+
};
|
|
161
|
+
export type DrawerCloseProps = {
|
|
162
|
+
/**
|
|
163
|
+
* Close button content
|
|
164
|
+
*/
|
|
165
|
+
children: ReactNode;
|
|
166
|
+
/**
|
|
167
|
+
* Custom class name
|
|
168
|
+
*/
|
|
169
|
+
className?: string;
|
|
170
|
+
/**
|
|
171
|
+
* Whether the close button is disabled
|
|
172
|
+
*/
|
|
173
|
+
disabled?: boolean;
|
|
174
|
+
};
|
|
175
|
+
export type StatusDrawerProps = {
|
|
176
|
+
/**
|
|
177
|
+
* Whether the drawer is open
|
|
178
|
+
*/
|
|
179
|
+
open?: boolean;
|
|
180
|
+
/**
|
|
181
|
+
* Callback when the drawer open state changes
|
|
182
|
+
*/
|
|
183
|
+
onOpenChange?: (open: boolean) => void;
|
|
184
|
+
/**
|
|
185
|
+
* The heading text (gray-700, heading.sm)
|
|
186
|
+
*/
|
|
187
|
+
heading: string;
|
|
188
|
+
/**
|
|
189
|
+
* The description text (gray-500, body.md)
|
|
190
|
+
*/
|
|
191
|
+
description: string;
|
|
192
|
+
/**
|
|
193
|
+
* Primary action button props (e.g., Delete, OK, Confirm)
|
|
194
|
+
*/
|
|
195
|
+
primaryButtonProps: ButtonV2Props;
|
|
196
|
+
/**
|
|
197
|
+
* Secondary action button props (e.g., Cancel) - optional
|
|
198
|
+
*/
|
|
199
|
+
secondaryButtonProps?: ButtonV2Props;
|
|
200
|
+
/**
|
|
201
|
+
* 56x56px slot for any React element (icon, image, etc.)
|
|
202
|
+
*/
|
|
203
|
+
slot: ReactNode;
|
|
204
|
+
/**
|
|
205
|
+
* The direction from which the drawer slides in
|
|
206
|
+
* @default 'bottom'
|
|
207
|
+
*/
|
|
208
|
+
direction?: DrawerDirection;
|
|
209
|
+
/**
|
|
210
|
+
* Whether the drawer should be modal (with overlay)
|
|
211
|
+
* @default true
|
|
212
|
+
*/
|
|
213
|
+
modal?: boolean;
|
|
214
|
+
/**
|
|
215
|
+
* Whether the drawer can be dismissed by clicking outside
|
|
216
|
+
* @default true
|
|
217
|
+
*/
|
|
218
|
+
dismissible?: boolean;
|
|
219
|
+
/**
|
|
220
|
+
* Custom mobile offset values (overrides token defaults)
|
|
221
|
+
*/
|
|
222
|
+
mobileOffset?: {
|
|
223
|
+
top?: string;
|
|
224
|
+
bottom?: string;
|
|
225
|
+
left?: string;
|
|
226
|
+
right?: string;
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
* Custom class name for the drawer content
|
|
230
|
+
*/
|
|
231
|
+
className?: string;
|
|
232
|
+
/**
|
|
233
|
+
* Custom styles for the drawer content
|
|
234
|
+
*/
|
|
235
|
+
style?: React.CSSProperties;
|
|
236
|
+
};
|
|
237
|
+
export type SelectDrawerItem = {
|
|
238
|
+
/**
|
|
239
|
+
* Unique identifier for the item
|
|
240
|
+
*/
|
|
241
|
+
value: string;
|
|
242
|
+
/**
|
|
243
|
+
* Display label for the item
|
|
244
|
+
*/
|
|
245
|
+
label: string;
|
|
246
|
+
/**
|
|
247
|
+
* Optional subtitle/description
|
|
248
|
+
*/
|
|
249
|
+
subLabel?: string;
|
|
250
|
+
/**
|
|
251
|
+
* Optional icon or element to display on the left
|
|
252
|
+
*/
|
|
253
|
+
slot1?: ReactNode;
|
|
254
|
+
/**
|
|
255
|
+
* Whether the item is disabled
|
|
256
|
+
*/
|
|
257
|
+
disabled?: boolean;
|
|
258
|
+
};
|
|
259
|
+
export type SelectDrawerGroup = {
|
|
260
|
+
/**
|
|
261
|
+
* Optional group label
|
|
262
|
+
*/
|
|
263
|
+
groupLabel?: string;
|
|
264
|
+
/**
|
|
265
|
+
* Items in this group
|
|
266
|
+
*/
|
|
267
|
+
items: SelectDrawerItem[];
|
|
268
|
+
/**
|
|
269
|
+
* Whether to show separator after this group
|
|
270
|
+
*/
|
|
271
|
+
showSeparator?: boolean;
|
|
272
|
+
};
|
|
273
|
+
export type SelectDrawerProps = {
|
|
274
|
+
/**
|
|
275
|
+
* Whether the drawer is open
|
|
276
|
+
*/
|
|
277
|
+
open?: boolean;
|
|
278
|
+
/**
|
|
279
|
+
* Callback when the drawer open state changes
|
|
280
|
+
*/
|
|
281
|
+
onOpenChange?: (open: boolean) => void;
|
|
282
|
+
/**
|
|
283
|
+
* The heading text (gray-800, body.lg)
|
|
284
|
+
*/
|
|
285
|
+
heading: string;
|
|
286
|
+
/**
|
|
287
|
+
* The description text (gray-500, body.md)
|
|
288
|
+
*/
|
|
289
|
+
description?: string;
|
|
290
|
+
/**
|
|
291
|
+
* 14x14px slot for any React element (icon, etc.)
|
|
292
|
+
*/
|
|
293
|
+
rightSlot?: ReactNode;
|
|
294
|
+
/**
|
|
295
|
+
* Array of items or groups to display
|
|
296
|
+
*/
|
|
297
|
+
items: SelectDrawerGroup[];
|
|
298
|
+
/**
|
|
299
|
+
* Currently selected values (for multi-select)
|
|
300
|
+
*/
|
|
301
|
+
selectedValues?: string[];
|
|
302
|
+
/**
|
|
303
|
+
* Single selected value (for single-select)
|
|
304
|
+
*/
|
|
305
|
+
selectedValue?: string;
|
|
306
|
+
/**
|
|
307
|
+
* Callback when selection changes (multi-select)
|
|
308
|
+
*/
|
|
309
|
+
onSelectionChange?: (selectedValues: string[]) => void;
|
|
310
|
+
/**
|
|
311
|
+
* Callback when single selection changes
|
|
312
|
+
*/
|
|
313
|
+
onValueChange?: (value: string) => void;
|
|
314
|
+
/**
|
|
315
|
+
* Whether to enable search functionality
|
|
316
|
+
* @default true
|
|
317
|
+
*/
|
|
318
|
+
enableSearch?: boolean;
|
|
319
|
+
/**
|
|
320
|
+
* Search placeholder text
|
|
321
|
+
* @default 'Search'
|
|
322
|
+
*/
|
|
323
|
+
searchPlaceholder?: string;
|
|
324
|
+
/**
|
|
325
|
+
* Whether this is a multi-select drawer
|
|
326
|
+
* @default true
|
|
327
|
+
*/
|
|
328
|
+
multiSelect?: boolean;
|
|
329
|
+
/**
|
|
330
|
+
* Cancel button text
|
|
331
|
+
* @default 'Clear All'
|
|
332
|
+
*/
|
|
333
|
+
cancelText?: string;
|
|
334
|
+
/**
|
|
335
|
+
* Confirm button text
|
|
336
|
+
* @default 'Done'
|
|
337
|
+
*/
|
|
338
|
+
confirmText?: string;
|
|
339
|
+
/**
|
|
340
|
+
* Cancel button click handler
|
|
341
|
+
*/
|
|
342
|
+
onCancel?: () => void;
|
|
343
|
+
/**
|
|
344
|
+
* Confirm button click handler
|
|
345
|
+
*/
|
|
346
|
+
onConfirm?: () => void;
|
|
347
|
+
/**
|
|
348
|
+
* Whether to show the cancel button
|
|
349
|
+
* @default true
|
|
350
|
+
*/
|
|
351
|
+
showCancelButton?: boolean;
|
|
352
|
+
/**
|
|
353
|
+
* The direction from which the drawer slides in
|
|
354
|
+
* @default 'bottom'
|
|
355
|
+
*/
|
|
356
|
+
direction?: DrawerDirection;
|
|
357
|
+
/**
|
|
358
|
+
* Whether the drawer should be modal (with overlay)
|
|
359
|
+
* @default true
|
|
360
|
+
*/
|
|
361
|
+
modal?: boolean;
|
|
362
|
+
/**
|
|
363
|
+
* Whether the drawer can be dismissed by clicking outside
|
|
364
|
+
* @default true
|
|
365
|
+
*/
|
|
366
|
+
dismissible?: boolean;
|
|
367
|
+
/**
|
|
368
|
+
* Custom mobile offset values (overrides token defaults)
|
|
369
|
+
*/
|
|
370
|
+
mobileOffset?: {
|
|
371
|
+
top?: string;
|
|
372
|
+
bottom?: string;
|
|
373
|
+
left?: string;
|
|
374
|
+
right?: string;
|
|
375
|
+
};
|
|
376
|
+
/**
|
|
377
|
+
* Custom class name for the drawer content
|
|
378
|
+
*/
|
|
379
|
+
className?: string;
|
|
380
|
+
/**
|
|
381
|
+
* Custom styles for the drawer content
|
|
382
|
+
*/
|
|
383
|
+
style?: React.CSSProperties;
|
|
384
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MenuV2GroupType } from '../Menu';
|
|
2
|
+
declare const Dropdown: ({ label, optionalLabel, hintText, slot, items, }: {
|
|
3
|
+
label?: string;
|
|
4
|
+
optionalLabel?: string;
|
|
5
|
+
hintText?: string;
|
|
6
|
+
slot?: React.ReactNode;
|
|
7
|
+
items: MenuV2GroupType[];
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default Dropdown;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DropdownInputProps } from './types';
|
|
2
|
+
declare const DropdownInput: ({ label, sublabel, disabled, helpIconHintText, name, required, error, errorMessage, hintText, value, onChange, slot, size, placeholder, dropDownValue, onDropDownChange, dropDownItems, dropdownName, onDropdownOpen, onDropdownClose, ...rest }: DropdownInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default DropdownInput;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { FoundationTokenType } from '../../../tokens/theme.token';
|
|
3
|
+
import { DropdownInputSize, DropdownInputState } from './types';
|
|
4
|
+
export type DropdownInputTokensType = {
|
|
5
|
+
input: {
|
|
6
|
+
gap: CSSObject['gap'];
|
|
7
|
+
borderRadius?: CSSObject['borderRadius'];
|
|
8
|
+
boxShadow: {
|
|
9
|
+
[key in DropdownInputState]: CSSObject['boxShadow'];
|
|
10
|
+
};
|
|
11
|
+
paddingX: {
|
|
12
|
+
[key in DropdownInputSize]: CSSObject['padding'];
|
|
13
|
+
};
|
|
14
|
+
paddingY: {
|
|
15
|
+
[key in DropdownInputSize]: CSSObject['padding'];
|
|
16
|
+
};
|
|
17
|
+
border: {
|
|
18
|
+
[key in DropdownInputState]: CSSObject['border'];
|
|
19
|
+
};
|
|
20
|
+
color: {
|
|
21
|
+
[key in DropdownInputState]: CSSObject['color'];
|
|
22
|
+
};
|
|
23
|
+
outline: {
|
|
24
|
+
[key in DropdownInputState]: CSSObject['outline'];
|
|
25
|
+
};
|
|
26
|
+
backgroundColor: {
|
|
27
|
+
[key in DropdownInputState]: CSSObject['backgroundColor'];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
declare const dropdownInputTokens: Readonly<DropdownInputTokensType>;
|
|
32
|
+
export declare const getDropdownInputTokens: (foundationTheme: FoundationTokenType) => DropdownInputTokensType;
|
|
33
|
+
export default dropdownInputTokens;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { TextInputSize } from '../TextInput/types';
|
|
2
|
+
import { SelectMenuGroupType } from '../../Select/types';
|
|
3
|
+
export declare enum DropdownInputSize {
|
|
4
|
+
MD = "md",
|
|
5
|
+
LG = "lg"
|
|
6
|
+
}
|
|
7
|
+
export declare enum DropdownInputState {
|
|
8
|
+
DEFAULT = "default",
|
|
9
|
+
HOVER = "hover",
|
|
10
|
+
FOCUS = "focus",
|
|
11
|
+
ERROR = "error",
|
|
12
|
+
DISABLED = "disabled"
|
|
13
|
+
}
|
|
14
|
+
export type DropdownInputProps = {
|
|
15
|
+
label?: string;
|
|
16
|
+
sublabel?: string;
|
|
17
|
+
helpIconHintText?: string;
|
|
18
|
+
error?: boolean;
|
|
19
|
+
errorMessage?: string;
|
|
20
|
+
hintText?: string;
|
|
21
|
+
value?: string;
|
|
22
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
23
|
+
slot?: React.ReactNode;
|
|
24
|
+
size?: TextInputSize;
|
|
25
|
+
dropDownValue?: string;
|
|
26
|
+
onDropDownChange?: (value: string) => void;
|
|
27
|
+
dropDownItems: SelectMenuGroupType[];
|
|
28
|
+
dropdownName?: string;
|
|
29
|
+
onDropdownOpen?: () => void;
|
|
30
|
+
onDropdownClose?: () => void;
|
|
31
|
+
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'style' | 'className'>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { MultiValueInputProps } from './types';
|
|
2
|
+
declare const MultiValueInput: ({ label, sublabel, disabled, required, error, errorMessage, hintText, tags, onTagAdd, onTagRemove, size, ...rest }: MultiValueInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default MultiValueInput;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { FoundationTokenType } from '../../../tokens/theme.token';
|
|
3
|
+
import { MultiValueInputSize, MultiValueInputState } from './types';
|
|
4
|
+
export type MultiValueInputTokensType = {
|
|
5
|
+
input: {
|
|
6
|
+
gap: CSSObject['gap'];
|
|
7
|
+
borderRadius?: CSSObject['borderRadius'];
|
|
8
|
+
boxShadow: {
|
|
9
|
+
[key in MultiValueInputState]: CSSObject['boxShadow'];
|
|
10
|
+
};
|
|
11
|
+
paddingX: {
|
|
12
|
+
[key in MultiValueInputSize]: CSSObject['padding'];
|
|
13
|
+
};
|
|
14
|
+
paddingY: {
|
|
15
|
+
[key in MultiValueInputSize]: CSSObject['padding'];
|
|
16
|
+
};
|
|
17
|
+
border: {
|
|
18
|
+
[key in MultiValueInputState]: CSSObject['border'];
|
|
19
|
+
};
|
|
20
|
+
color: {
|
|
21
|
+
[key in MultiValueInputState]: CSSObject['color'];
|
|
22
|
+
};
|
|
23
|
+
outline: {
|
|
24
|
+
[key in MultiValueInputState]: CSSObject['outline'];
|
|
25
|
+
};
|
|
26
|
+
backgroundColor: {
|
|
27
|
+
[key in MultiValueInputState]: CSSObject['backgroundColor'];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
declare const multiValueInputTokens: Readonly<MultiValueInputTokensType>;
|
|
32
|
+
export declare const getMultiValueInputTokens: (foundationTheme: FoundationTokenType) => MultiValueInputTokensType;
|
|
33
|
+
export default multiValueInputTokens;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { TextInputSize } from '../TextInput/types';
|
|
2
|
+
export declare enum MultiValueInputSize {
|
|
3
|
+
MD = "md",
|
|
4
|
+
LG = "lg"
|
|
5
|
+
}
|
|
6
|
+
export declare enum MultiValueInputState {
|
|
7
|
+
DEFAULT = "default",
|
|
8
|
+
HOVER = "hover",
|
|
9
|
+
FOCUS = "focus",
|
|
10
|
+
ERROR = "error",
|
|
11
|
+
DISABLED = "disabled"
|
|
12
|
+
}
|
|
13
|
+
export type MultiValueInputProps = {
|
|
14
|
+
label?: string;
|
|
15
|
+
sublabel?: string;
|
|
16
|
+
helpIconHintText?: string;
|
|
17
|
+
error?: boolean;
|
|
18
|
+
errorMessage?: string;
|
|
19
|
+
hintText?: string;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
tags?: string[];
|
|
22
|
+
onTagAdd?: (tag: string) => void;
|
|
23
|
+
onTagRemove?: (tag: string) => void;
|
|
24
|
+
size?: TextInputSize;
|
|
25
|
+
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'style' | 'className'>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { NumberInputProps } from './types';
|
|
2
|
+
declare const NumberInput: ({ value, onChange, min, max, step, error, errorMessage, required, disabled, size, placeholder, sublabel, helpIconHintText, label, hintText, name, ...rest }: NumberInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default NumberInput;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { FoundationTokenType } from '../../../tokens/theme.token';
|
|
3
|
+
declare enum TextInputSize {
|
|
4
|
+
MD = "md",
|
|
5
|
+
LG = "lg"
|
|
6
|
+
}
|
|
7
|
+
declare enum TextInputState {
|
|
8
|
+
DEFAULT = "default",
|
|
9
|
+
HOVER = "hover",
|
|
10
|
+
FOCUS = "focus",
|
|
11
|
+
ERROR = "error",
|
|
12
|
+
DISABLED = "disabled"
|
|
13
|
+
}
|
|
14
|
+
export type NumberInputTokensType = {
|
|
15
|
+
input: {
|
|
16
|
+
gap: CSSObject['gap'];
|
|
17
|
+
borderRadius?: CSSObject['borderRadius'];
|
|
18
|
+
boxShadow: {
|
|
19
|
+
[key in TextInputState]: CSSObject['boxShadow'];
|
|
20
|
+
};
|
|
21
|
+
paddingX: {
|
|
22
|
+
[key in TextInputSize]: CSSObject['padding'];
|
|
23
|
+
};
|
|
24
|
+
paddingY: {
|
|
25
|
+
[key in TextInputSize]: CSSObject['padding'];
|
|
26
|
+
};
|
|
27
|
+
border: {
|
|
28
|
+
[key in TextInputState]: CSSObject['border'];
|
|
29
|
+
};
|
|
30
|
+
color: {
|
|
31
|
+
[key in TextInputState]: CSSObject['color'];
|
|
32
|
+
};
|
|
33
|
+
outline: {
|
|
34
|
+
[key in TextInputState]: CSSObject['outline'];
|
|
35
|
+
};
|
|
36
|
+
backgroundColor: {
|
|
37
|
+
default: CSSObject['backgroundColor'];
|
|
38
|
+
disabled: CSSObject['backgroundColor'];
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
declare const numberInputTokens: Readonly<NumberInputTokensType>;
|
|
43
|
+
export declare const getNumberInputTokens: (foundationTheme: FoundationTokenType) => NumberInputTokensType;
|
|
44
|
+
export default numberInputTokens;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare enum NumberInputSize {
|
|
2
|
+
MEDIUM = "md",
|
|
3
|
+
LARGE = "lg"
|
|
4
|
+
}
|
|
5
|
+
export type NumberInputProps = {
|
|
6
|
+
value: number;
|
|
7
|
+
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
8
|
+
step?: number;
|
|
9
|
+
error?: boolean;
|
|
10
|
+
errorMessage?: string;
|
|
11
|
+
size?: NumberInputSize;
|
|
12
|
+
label?: string;
|
|
13
|
+
sublabel?: string;
|
|
14
|
+
helpIconHintText?: string;
|
|
15
|
+
hintText?: string;
|
|
16
|
+
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'style' | 'className' | 'value'>;
|