@juspay/blend-design-system 0.0.37-beta.7 → 0.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{node-C_DmV86X.js → breadcrumbV2.tokens-CovJEwot.js} +16 -0
- package/dist/components/Accordion/index.d.ts +2 -0
- package/dist/components/AccordionV2/accordionV2.animations.d.ts +1 -1
- package/dist/components/Alert/index.d.ts +1 -0
- package/dist/components/Avatar/index.d.ts +1 -0
- package/dist/components/Breadcrumb/index.d.ts +1 -0
- package/dist/components/Button/index.d.ts +1 -0
- package/dist/components/ButtonGroup/index.d.ts +1 -0
- package/dist/components/Card/index.d.ts +1 -0
- package/dist/components/CardV2/CardV2.d.ts +45 -0
- package/dist/components/CardV2/CardV2.utils.d.ts +14 -0
- package/dist/components/CardV2/CardV2Components.d.ts +8 -0
- package/dist/components/CardV2/CardV2Context.d.ts +14 -0
- package/dist/components/CardV2/CardV2Skeleton.d.ts +6 -0
- package/dist/components/CardV2/accessibility/CardV2AccessibilityReport.d.ts +2 -0
- package/dist/components/CardV2/accessibility/index.d.ts +1 -0
- package/dist/components/CardV2/cardV2.dark.tokens.d.ts +3 -0
- package/dist/components/CardV2/cardV2.light.tokens.d.ts +3 -0
- package/dist/components/CardV2/cardV2.tokens.d.ts +5 -0
- package/dist/components/CardV2/cardV2.tokens.types.d.ts +92 -0
- package/dist/components/CardV2/cardV2.types.d.ts +106 -0
- package/dist/components/CardV2/index.d.ts +5 -0
- package/dist/components/Charts/index.d.ts +10 -0
- package/dist/components/Charts/types.d.ts +2 -0
- package/dist/components/ChatInput/index.d.ts +1 -0
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/CodeEditor/index.d.ts +1 -0
- package/dist/components/CodeEditor/types.d.ts +22 -2
- package/dist/components/CodeEditorV2/CodeEditorV2.d.ts +1 -1
- package/dist/components/CodeEditorV2/codeEditorV2.types.d.ts +23 -2
- package/dist/components/DataTable/PivotTableModal/pivotModal.styled.d.ts +184 -0
- package/dist/components/DataTable/TableBody/types.d.ts +3 -1
- package/dist/components/DataTable/hooks/index.d.ts +2 -0
- package/dist/components/DataTable/hooks/useReducedMotion.d.ts +1 -0
- package/dist/components/DataTable/hooks/useRowFlip.d.ts +6 -0
- package/dist/components/DataTable/types.d.ts +26 -0
- package/dist/components/DateRangePicker/CalendarGrid.d.ts +5 -2
- package/dist/components/DateRangePicker/types.d.ts +3 -1
- package/dist/components/DateRangePicker/utils.d.ts +5 -5
- package/dist/components/Directory/Directory.d.ts +1 -1
- package/dist/components/Directory/NavItem.d.ts +1 -1
- package/dist/components/Directory/Section.d.ts +1 -1
- package/dist/components/Directory/VirtualizedDirectory.d.ts +3 -0
- package/dist/components/Directory/directory.tokens.d.ts +7 -0
- package/dist/components/Directory/types.d.ts +38 -1
- package/dist/components/Directory/utils.d.ts +3 -1
- package/dist/components/Drawer/index.d.ts +1 -0
- package/dist/components/Inputs/MultiValueInput/index.d.ts +1 -0
- package/dist/components/Inputs/NumberInput/index.d.ts +1 -0
- package/dist/components/Inputs/OTPInput/index.d.ts +1 -0
- package/dist/components/Inputs/SearchInput/index.d.ts +1 -0
- package/dist/components/Inputs/TextArea/index.d.ts +1 -0
- package/dist/components/Inputs/TextInput/index.d.ts +1 -0
- package/dist/components/InputsV2/TextAreaV2/utils.d.ts +2 -1
- package/dist/components/InputsV2/TextInputV2/utils.d.ts +2 -1
- package/dist/components/InputsV2/UploadV2/UploadContainerV2.d.ts +24 -0
- package/dist/components/InputsV2/UploadV2/UploadV2.d.ts +31 -0
- package/dist/components/InputsV2/UploadV2/UploadV2.dark.tokens.d.ts +3 -0
- package/dist/components/InputsV2/UploadV2/UploadV2.light.tokens.d.ts +3 -0
- package/dist/components/InputsV2/UploadV2/UploadV2.tokens.d.ts +5 -0
- package/dist/components/InputsV2/UploadV2/UploadV2.tokens.types.d.ts +115 -0
- package/dist/components/InputsV2/UploadV2/UploadV2.types.d.ts +56 -0
- package/dist/components/InputsV2/UploadV2/index.d.ts +3 -0
- package/dist/components/InputsV2/UploadV2/utils.d.ts +32 -0
- package/dist/components/KeyValuePair/index.d.ts +1 -0
- package/dist/components/Menu/Menu.d.ts +1 -1
- package/dist/components/Menu/index.d.ts +1 -0
- package/dist/components/Menu/types.d.ts +7 -0
- package/dist/components/Menu/utils.d.ts +10 -2
- package/dist/components/MenuV2/MenuV2Content.d.ts +1 -0
- package/dist/components/MenuV2/menuV2.types.d.ts +5 -0
- package/dist/components/MenuV2/menuV2.utils.d.ts +10 -2
- package/dist/components/Modal/index.d.ts +1 -0
- package/dist/components/ModalV2/ModalV2.d.ts +22 -0
- package/dist/components/ModalV2/ModalV2Footer.d.ts +10 -0
- package/dist/components/ModalV2/ModalV2Header.d.ts +15 -0
- package/dist/components/ModalV2/ModalV2Skeleton.d.ts +4 -0
- package/dist/components/ModalV2/index.d.ts +4 -0
- package/dist/components/ModalV2/mobileModalV2.d.ts +23 -0
- package/dist/components/ModalV2/modalAnimationV2.d.ts +3 -0
- package/dist/components/ModalV2/modalV2.dark.tokens.d.ts +3 -0
- package/dist/components/ModalV2/modalV2.light.tokens.d.ts +3 -0
- package/dist/components/ModalV2/modalV2.tokens.d.ts +5 -0
- package/dist/components/ModalV2/modalV2.tokens.types.d.ts +91 -0
- package/dist/components/ModalV2/modalV2.types.d.ts +66 -0
- package/dist/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/dist/components/MultiSelect/MultiSelectMenu.d.ts +1 -1
- package/dist/components/MultiSelect/index.d.ts +2 -0
- package/dist/components/MultiSelect/types.d.ts +2 -0
- package/dist/components/MultiSelectV2/MultiSelectV2.d.ts +1 -1
- package/dist/components/MultiSelectV2/MultiSelectV2Menu.d.ts +1 -1
- package/dist/components/MultiSelectV2/multiSelectV2.types.d.ts +2 -0
- package/dist/components/Popover/index.d.ts +1 -0
- package/dist/components/Primitives/Block/Block.d.ts +1 -1
- package/dist/components/ProgressBar/index.d.ts +1 -0
- package/dist/components/Radio/index.d.ts +2 -0
- package/dist/components/Sidebar/SidebarContent.d.ts +9 -1
- package/dist/components/Sidebar/index.d.ts +1 -0
- package/dist/components/Sidebar/types.d.ts +9 -1
- package/dist/components/SidebarV2/SidebarV2Panel.d.ts +10 -2
- package/dist/components/SidebarV2/types.d.ts +9 -1
- package/dist/components/SingleSelect/SingleSelect.d.ts +1 -1
- package/dist/components/SingleSelect/SingleSelectMenu.d.ts +2 -1
- package/dist/components/SingleSelect/index.d.ts +1 -0
- package/dist/components/SingleSelect/types.d.ts +1 -0
- package/dist/components/SingleSelectV2/SingleSelectV2.d.ts +1 -1
- package/dist/components/SingleSelectV2/SingleSelectV2Menu.d.ts +1 -1
- package/dist/components/SingleSelectV2/singleSelectV2.tokens.types.d.ts +8 -0
- package/dist/components/SingleSelectV2/singleSelectV2.types.d.ts +2 -0
- package/dist/components/Skeleton/SkeletonCompound.d.ts +24 -33
- package/dist/components/Snackbar/Snackbar.d.ts +1 -1
- package/dist/components/Snackbar/index.d.ts +2 -0
- package/dist/components/Snackbar/snackbar.tokens.d.ts +1 -0
- package/dist/components/Snackbar/types.d.ts +2 -0
- package/dist/components/StatCard/index.d.ts +1 -0
- package/dist/components/Stepper/index.d.ts +1 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Tabs/index.d.ts +1 -0
- package/dist/components/Tags/index.d.ts +1 -0
- package/dist/components/Timeline/Timeline.d.ts +13 -37
- package/dist/components/Tooltip/index.d.ts +1 -0
- package/dist/components/Topbar/index.d.ts +1 -0
- package/dist/components/Upload/index.d.ts +1 -0
- package/dist/context/ThemeContext.d.ts +6 -0
- package/dist/context/useComponentToken.d.ts +4 -1
- package/dist/main.d.ts +6 -0
- package/dist/main.js +45436 -42186
- package/dist/node-B3rrXW84.js +1023 -0
- package/dist/node.d.ts +2 -0
- package/dist/node.js +21 -18
- package/dist/{tokens.js → token-engine.js} +1 -1
- package/lib/components/Accordion/AccordionItem.tsx +2 -6
- package/lib/components/Accordion/index.ts +2 -0
- package/lib/components/AccordionV2/AccordionV2Item.tsx +1 -1
- package/lib/components/AccordionV2/accordionV2.animations.ts +1 -5
- package/lib/components/Alert/index.ts +1 -0
- package/lib/components/Avatar/index.ts +1 -0
- package/lib/components/Breadcrumb/index.ts +1 -0
- package/lib/components/Button/index.ts +1 -0
- package/lib/components/ButtonGroup/index.ts +1 -0
- package/lib/components/Card/index.ts +1 -0
- package/lib/components/CardV2/CardV2.tsx +327 -0
- package/lib/components/CardV2/CardV2.utils.tsx +77 -0
- package/lib/components/CardV2/CardV2Components.tsx +297 -0
- package/lib/components/CardV2/CardV2Context.tsx +18 -0
- package/lib/components/CardV2/CardV2Skeleton.tsx +40 -0
- package/lib/components/CardV2/accessibility/CardV2AccessibilityReport.ts +284 -0
- package/lib/components/CardV2/accessibility/index.ts +1 -0
- package/lib/components/CardV2/cardV2.dark.tokens.ts +177 -0
- package/lib/components/CardV2/cardV2.light.tokens.ts +177 -0
- package/lib/components/CardV2/cardV2.tokens.ts +21 -0
- package/lib/components/CardV2/cardV2.tokens.types.ts +94 -0
- package/lib/components/CardV2/cardV2.types.ts +131 -0
- package/lib/components/CardV2/index.ts +13 -0
- package/lib/components/Charts/ChartLegend.tsx +25 -5
- package/lib/components/Charts/Charts.tsx +10 -0
- package/lib/components/Charts/index.ts +10 -0
- package/lib/components/Charts/types.tsx +2 -0
- package/lib/components/ChatInput/index.tsx +1 -0
- package/lib/components/Checkbox/index.ts +1 -0
- package/lib/components/CodeEditor/MonacoEditorWrapper.tsx +6 -2
- package/lib/components/CodeEditor/index.ts +1 -0
- package/lib/components/CodeEditor/types.ts +52 -2
- package/lib/components/CodeEditorV2/MonacoEditor/MonacoEditorWrapper.tsx +6 -2
- package/lib/components/CodeEditorV2/codeEditorV2.types.ts +44 -5
- package/lib/components/DataTable/DataTable.tsx +8 -0
- package/lib/components/DataTable/TableBody/index.tsx +47 -11
- package/lib/components/DataTable/TableBody/types.ts +7 -1
- package/lib/components/DataTable/TableCell/index.tsx +1 -1
- package/lib/components/DataTable/hooks/index.ts +2 -0
- package/lib/components/DataTable/hooks/useReducedMotion.ts +19 -0
- package/lib/components/DataTable/hooks/useRowFlip.ts +170 -0
- package/lib/components/DataTable/types.ts +32 -0
- package/lib/components/DateRangePicker/CalendarGrid.tsx +39 -6
- package/lib/components/DateRangePicker/DateRangePicker.tsx +27 -4
- package/lib/components/DateRangePicker/types.ts +6 -1
- package/lib/components/DateRangePicker/utils.ts +123 -12
- package/lib/components/Directory/Directory.tsx +31 -0
- package/lib/components/Directory/NavItem.tsx +177 -86
- package/lib/components/Directory/Section.tsx +9 -0
- package/lib/components/Directory/VirtualizedDirectory.tsx +670 -0
- package/lib/components/Directory/directory.tokens.ts +21 -0
- package/lib/components/Directory/types.ts +43 -1
- package/lib/components/Directory/utils.ts +81 -1
- package/lib/components/Drawer/index.ts +1 -0
- package/lib/components/Inputs/DropdownInput/DropdownInput.tsx +6 -2
- package/lib/components/Inputs/MultiValueInput/index.ts +1 -0
- package/lib/components/Inputs/NumberInput/NumberInput.tsx +6 -2
- package/lib/components/Inputs/NumberInput/index.ts +1 -0
- package/lib/components/Inputs/OTPInput/index.ts +1 -0
- package/lib/components/Inputs/SearchInput/index.ts +1 -0
- package/lib/components/Inputs/TextArea/TextArea.tsx +4 -2
- package/lib/components/Inputs/TextArea/index.ts +1 -0
- package/lib/components/Inputs/TextInput/TextInput.tsx +6 -2
- package/lib/components/Inputs/TextInput/index.ts +1 -0
- package/lib/components/Inputs/UnitInput/UnitInput.tsx +6 -2
- package/lib/components/InputsV2/NumberInputV2/NumberInputV2.tsx +6 -2
- package/lib/components/InputsV2/TextAreaV2/TextAreaV2.tsx +2 -1
- package/lib/components/InputsV2/TextAreaV2/utils.ts +3 -1
- package/lib/components/InputsV2/TextInputV2/TextInputV2.tsx +1 -0
- package/lib/components/InputsV2/TextInputV2/utils.ts +6 -8
- package/lib/components/InputsV2/UploadV2/UploadContainerV2.tsx +470 -0
- package/lib/components/InputsV2/UploadV2/UploadV2.dark.tokens.ts +348 -0
- package/lib/components/InputsV2/UploadV2/UploadV2.light.tokens.ts +348 -0
- package/lib/components/InputsV2/UploadV2/UploadV2.tokens.ts +20 -0
- package/lib/components/InputsV2/UploadV2/UploadV2.tokens.types.ts +117 -0
- package/lib/components/InputsV2/UploadV2/UploadV2.tsx +336 -0
- package/lib/components/InputsV2/UploadV2/UploadV2.types.ts +67 -0
- package/lib/components/InputsV2/UploadV2/index.ts +3 -0
- package/lib/components/InputsV2/UploadV2/utils.ts +170 -0
- package/lib/components/KeyValuePair/index.ts +1 -0
- package/lib/components/Menu/Menu.tsx +18 -2
- package/lib/components/Menu/SubMenu.tsx +25 -3
- package/lib/components/Menu/index.ts +1 -0
- package/lib/components/Menu/types.tsx +14 -0
- package/lib/components/Menu/utils.ts +46 -3
- package/lib/components/MenuV2/MenuV2.tsx +9 -2
- package/lib/components/MenuV2/MenuV2Content.tsx +6 -0
- package/lib/components/MenuV2/MenuV2SubMenu.tsx +16 -2
- package/lib/components/MenuV2/menuV2.types.ts +11 -0
- package/lib/components/MenuV2/menuV2.utils.ts +45 -3
- package/lib/components/Modal/index.ts +1 -0
- package/lib/components/ModalV2/ModalV2.tsx +269 -0
- package/lib/components/ModalV2/ModalV2Footer.tsx +76 -0
- package/lib/components/ModalV2/ModalV2Header.tsx +144 -0
- package/lib/components/ModalV2/ModalV2Skeleton.tsx +80 -0
- package/lib/components/ModalV2/index.ts +4 -0
- package/lib/components/ModalV2/mobileModalV2.tsx +411 -0
- package/lib/components/ModalV2/modalAnimationV2.tsx +19 -0
- package/lib/components/ModalV2/modalV2.dark.tokens.ts +183 -0
- package/lib/components/ModalV2/modalV2.light.tokens.ts +183 -0
- package/lib/components/ModalV2/modalV2.tokens.ts +21 -0
- package/lib/components/ModalV2/modalV2.tokens.types.ts +94 -0
- package/lib/components/ModalV2/modalV2.types.ts +80 -0
- package/lib/components/MultiSelect/MultiSelect.tsx +4 -1
- package/lib/components/MultiSelect/MultiSelectMenu.tsx +8 -0
- package/lib/components/MultiSelect/MultiSelectTrigger.tsx +2 -1
- package/lib/components/MultiSelect/index.ts +2 -0
- package/lib/components/MultiSelect/types.ts +2 -0
- package/lib/components/MultiSelectV2/MultiSelectV2.tsx +2 -0
- package/lib/components/MultiSelectV2/MultiSelectV2Menu.tsx +8 -0
- package/lib/components/MultiSelectV2/MultiSelectV2Trigger.tsx +4 -1
- package/lib/components/MultiSelectV2/multiSelectV2.types.ts +2 -0
- package/lib/components/Popover/index.ts +1 -0
- package/lib/components/Primitives/Block/Block.tsx +1 -1
- package/lib/components/ProgressBar/index.ts +1 -0
- package/lib/components/Radio/index.ts +2 -0
- package/lib/components/Sidebar/Sidebar.tsx +38 -0
- package/lib/components/Sidebar/SidebarContent.tsx +25 -1
- package/lib/components/Sidebar/index.ts +1 -0
- package/lib/components/Sidebar/types.ts +13 -1
- package/lib/components/SidebarV2/SidebarV2.tsx +30 -0
- package/lib/components/SidebarV2/SidebarV2Panel.tsx +25 -1
- package/lib/components/SidebarV2/types.ts +9 -1
- package/lib/components/SingleSelect/SingleSelect.tsx +4 -1
- package/lib/components/SingleSelect/SingleSelectMenu.tsx +171 -138
- package/lib/components/SingleSelect/SingleSelectTrigger.tsx +3 -1
- package/lib/components/SingleSelect/index.ts +1 -0
- package/lib/components/SingleSelect/types.ts +1 -0
- package/lib/components/SingleSelectV2/SingleSelectV2.tsx +2 -0
- package/lib/components/SingleSelectV2/SingleSelectV2Menu.tsx +84 -58
- package/lib/components/SingleSelectV2/SingleSelectV2Search.tsx +1 -0
- package/lib/components/SingleSelectV2/SingleSelectV2Trigger.tsx +3 -1
- package/lib/components/SingleSelectV2/singleSelectV2.dark.tokens.ts +8 -0
- package/lib/components/SingleSelectV2/singleSelectV2.light.tokens.ts +8 -0
- package/lib/components/SingleSelectV2/singleSelectV2.tokens.types.ts +8 -0
- package/lib/components/SingleSelectV2/singleSelectV2.types.ts +2 -0
- package/lib/components/Skeleton/SkeletonCompound.tsx +45 -31
- package/lib/components/Snackbar/Snackbar.tsx +18 -8
- package/lib/components/Snackbar/index.ts +2 -0
- package/lib/components/Snackbar/snackbar.tokens.ts +6 -0
- package/lib/components/Snackbar/types.ts +2 -0
- package/lib/components/StatCard/StatCard.tsx +29 -0
- package/lib/components/StatCard/index.ts +1 -0
- package/lib/components/Stepper/index.ts +1 -0
- package/lib/components/Switch/index.ts +2 -0
- package/lib/components/Tabs/index.ts +1 -0
- package/lib/components/Tags/index.ts +1 -0
- package/lib/components/Timeline/Timeline.tsx +9 -1
- package/lib/components/Tooltip/index.ts +1 -0
- package/lib/components/Topbar/index.ts +1 -0
- package/lib/components/Upload/index.ts +1 -0
- package/lib/context/ThemeContext.tsx +16 -0
- package/lib/context/initComponentTokens.ts +11 -0
- package/lib/context/useComponentToken.ts +15 -1
- package/lib/hooks/useResponsiveTokens.ts +63 -0
- package/lib/main.ts +16 -0
- package/lib/node.ts +2 -0
- package/package.json +5 -4
- package/dist/tokens.d.ts +0 -2
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { InputSizeV2, InputStateV2 } from '../inputV2.types';
|
|
3
|
+
import { BreakpointType } from '../../../breakpoints/breakPoints';
|
|
4
|
+
import { UploadDragState, UploadState } from './UploadV2.types';
|
|
5
|
+
export type UploadV2TokensType = {
|
|
6
|
+
gap: CSSObject['gap'];
|
|
7
|
+
topContainer: {
|
|
8
|
+
label: {
|
|
9
|
+
fontSize: {
|
|
10
|
+
[key in InputSizeV2]: CSSObject['fontSize'];
|
|
11
|
+
};
|
|
12
|
+
fontWeight: {
|
|
13
|
+
[key in InputSizeV2]: CSSObject['fontWeight'];
|
|
14
|
+
};
|
|
15
|
+
lineHeight: {
|
|
16
|
+
[key in InputSizeV2]: CSSObject['lineHeight'];
|
|
17
|
+
};
|
|
18
|
+
color: {
|
|
19
|
+
[key in InputStateV2]: CSSObject['color'];
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
subLabel: {
|
|
23
|
+
fontSize: {
|
|
24
|
+
[key in InputSizeV2]: CSSObject['fontSize'];
|
|
25
|
+
};
|
|
26
|
+
fontWeight: {
|
|
27
|
+
[key in InputSizeV2]: CSSObject['fontWeight'];
|
|
28
|
+
};
|
|
29
|
+
lineHeight: {
|
|
30
|
+
[key in InputSizeV2]: CSSObject['lineHeight'];
|
|
31
|
+
};
|
|
32
|
+
color: {
|
|
33
|
+
[key in InputStateV2]: CSSObject['color'];
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
required: {
|
|
37
|
+
color: CSSObject['color'];
|
|
38
|
+
};
|
|
39
|
+
helpIcon: {
|
|
40
|
+
width: {
|
|
41
|
+
[key in InputSizeV2]: CSSObject['width'];
|
|
42
|
+
};
|
|
43
|
+
color: {
|
|
44
|
+
[key in InputStateV2]: CSSObject['color'];
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
uploadContainer: {
|
|
49
|
+
gap: CSSObject['gap'];
|
|
50
|
+
paddingTop: CSSObject['paddingTop'];
|
|
51
|
+
paddingBottom: CSSObject['paddingBottom'];
|
|
52
|
+
paddingLeft: CSSObject['paddingLeft'];
|
|
53
|
+
paddingRight: CSSObject['paddingRight'];
|
|
54
|
+
borderRadius: CSSObject['borderRadius'];
|
|
55
|
+
border: {
|
|
56
|
+
[key in UploadState | UploadDragState]: CSSObject['border'];
|
|
57
|
+
};
|
|
58
|
+
backgroundColor: {
|
|
59
|
+
[key in UploadState | UploadDragState]: CSSObject['backgroundColor'];
|
|
60
|
+
};
|
|
61
|
+
header: {
|
|
62
|
+
gap: CSSObject['gap'];
|
|
63
|
+
title: {
|
|
64
|
+
fontSize: CSSObject['fontSize'];
|
|
65
|
+
fontWeight: CSSObject['fontWeight'];
|
|
66
|
+
color: CSSObject['color'];
|
|
67
|
+
};
|
|
68
|
+
description: {
|
|
69
|
+
fontSize: CSSObject['fontSize'];
|
|
70
|
+
fontWeight: CSSObject['fontWeight'];
|
|
71
|
+
color: CSSObject['color'];
|
|
72
|
+
};
|
|
73
|
+
errorText: {
|
|
74
|
+
fontSize: CSSObject['fontSize'];
|
|
75
|
+
fontWeight: CSSObject['fontWeight'];
|
|
76
|
+
color: CSSObject['color'];
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
fileTag: {
|
|
80
|
+
maxWidth: CSSObject['maxWidth'];
|
|
81
|
+
gap: CSSObject['gap'];
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
bottomContainer: {
|
|
85
|
+
hintText: {
|
|
86
|
+
fontSize: {
|
|
87
|
+
[key in InputSizeV2]: CSSObject['fontSize'];
|
|
88
|
+
};
|
|
89
|
+
fontWeight: {
|
|
90
|
+
[key in InputSizeV2]: CSSObject['fontWeight'];
|
|
91
|
+
};
|
|
92
|
+
lineHeight: {
|
|
93
|
+
[key in InputSizeV2]: CSSObject['lineHeight'];
|
|
94
|
+
};
|
|
95
|
+
color: {
|
|
96
|
+
[key in InputStateV2]: CSSObject['color'];
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
errorMessage: {
|
|
100
|
+
fontSize: {
|
|
101
|
+
[key in InputSizeV2]: CSSObject['fontSize'];
|
|
102
|
+
};
|
|
103
|
+
fontWeight: {
|
|
104
|
+
[key in InputSizeV2]: CSSObject['fontWeight'];
|
|
105
|
+
};
|
|
106
|
+
lineHeight: {
|
|
107
|
+
[key in InputSizeV2]: CSSObject['lineHeight'];
|
|
108
|
+
};
|
|
109
|
+
color: CSSObject['color'];
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
export type ResponsiveUploadV2Tokens = {
|
|
114
|
+
[key in keyof BreakpointType]: UploadV2TokensType;
|
|
115
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { InputSizeV2 } from '../inputV2.types';
|
|
2
|
+
export declare enum UploadState {
|
|
3
|
+
IDLE = "idle",
|
|
4
|
+
UPLOADING = "uploading",
|
|
5
|
+
SUCCESS = "success",
|
|
6
|
+
ERROR = "error",
|
|
7
|
+
DISABLED = "disabled"
|
|
8
|
+
}
|
|
9
|
+
export declare enum UploadDragState {
|
|
10
|
+
DRAG_ENTER = "drag_enter",
|
|
11
|
+
DRAG_LEAVE = "drag_leave",
|
|
12
|
+
DRAG_OVER = "drag_over",
|
|
13
|
+
DROP = "drop"
|
|
14
|
+
}
|
|
15
|
+
export declare const UploadErrorReason: {
|
|
16
|
+
readonly OVERSIZED: "oversized";
|
|
17
|
+
readonly MAX_FILES: "maxFiles";
|
|
18
|
+
readonly INVALID_TYPE: "invalidType";
|
|
19
|
+
};
|
|
20
|
+
export type UploadErrorReasonValue = (typeof UploadErrorReason)[keyof typeof UploadErrorReason];
|
|
21
|
+
export type UploadFileV2 = {
|
|
22
|
+
id?: string;
|
|
23
|
+
file: File;
|
|
24
|
+
isValid: boolean;
|
|
25
|
+
errorReason?: UploadErrorReasonValue;
|
|
26
|
+
};
|
|
27
|
+
export type UploadV2Props = {
|
|
28
|
+
id?: string;
|
|
29
|
+
name?: string;
|
|
30
|
+
label?: string;
|
|
31
|
+
subLabel?: string;
|
|
32
|
+
description?: string;
|
|
33
|
+
size?: InputSizeV2;
|
|
34
|
+
helpIconText?: string;
|
|
35
|
+
required?: boolean;
|
|
36
|
+
multiple?: boolean;
|
|
37
|
+
/** File types to accept (e.g., ['.jpg', '.png', 'image/*', '.pdf']) */
|
|
38
|
+
acceptedFileTypes?: string[];
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
slot?: React.ReactNode;
|
|
41
|
+
files?: UploadFileV2[];
|
|
42
|
+
/** Callback when files are selected or changed */
|
|
43
|
+
onChange?: (files: UploadFileV2[]) => void;
|
|
44
|
+
state?: UploadState;
|
|
45
|
+
error?: {
|
|
46
|
+
show: boolean;
|
|
47
|
+
message?: string;
|
|
48
|
+
};
|
|
49
|
+
errorText?: string;
|
|
50
|
+
hintText?: string;
|
|
51
|
+
maxSize?: number;
|
|
52
|
+
maxFiles?: number;
|
|
53
|
+
progressBarValue?: number;
|
|
54
|
+
progressBarMaxWidth?: string;
|
|
55
|
+
uploadHeaderText?: string;
|
|
56
|
+
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'style' | 'className' | 'multiple' | 'slot' | 'onChange'>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { UploadFileV2 } from './UploadV2.types';
|
|
2
|
+
export declare const FILE_NAME_TAG_MAX_LEN = 24;
|
|
3
|
+
export declare const createClickHandler: (disabled: boolean, fileInputRef: React.RefObject<HTMLInputElement>) => () => void;
|
|
4
|
+
export declare const useUploadState: () => {
|
|
5
|
+
internalDragState: {
|
|
6
|
+
isDragActive: boolean;
|
|
7
|
+
isDragAccept: boolean;
|
|
8
|
+
isDragReject: boolean;
|
|
9
|
+
};
|
|
10
|
+
setInternalDragState: import('react').Dispatch<import('react').SetStateAction<{
|
|
11
|
+
isDragActive: boolean;
|
|
12
|
+
isDragAccept: boolean;
|
|
13
|
+
isDragReject: boolean;
|
|
14
|
+
}>>;
|
|
15
|
+
setDragCounter: import('react').Dispatch<import('react').SetStateAction<number>>;
|
|
16
|
+
};
|
|
17
|
+
export declare const createDragHandlers: (disabled: boolean, setDragCounter: (fn: (prev: number) => number) => void, updateDragStateFn: (isDragActive: boolean, files?: File[]) => void, processFilesFn: (files: FileList) => void) => {
|
|
18
|
+
handleDragEnter: (e: React.DragEvent) => void;
|
|
19
|
+
handleDragLeave: (e: React.DragEvent) => void;
|
|
20
|
+
handleDragOver: (e: React.DragEvent) => void;
|
|
21
|
+
handleDrop: (e: React.DragEvent) => void;
|
|
22
|
+
};
|
|
23
|
+
export declare const truncateFileNameForTag: (name: string) => string;
|
|
24
|
+
export declare const getFileId: (uploadFile: UploadFileV2, index: number) => string;
|
|
25
|
+
export declare const isFileTypeAccepted: (file: File, acceptedFileTypes: string[]) => boolean;
|
|
26
|
+
declare const KNOWN_UPLOAD_ERROR_REASONS: readonly ["oversized", "maxFiles", "invalidType"];
|
|
27
|
+
type KnownUploadErrorReason = (typeof KNOWN_UPLOAD_ERROR_REASONS)[number];
|
|
28
|
+
export declare const formatFileSize: (sizeInBytes: number) => string;
|
|
29
|
+
export declare const isKnownUploadErrorReason: (reason: unknown) => reason is KnownUploadErrorReason;
|
|
30
|
+
export declare const normalizeUploadErrorReason: (reason: unknown) => "oversized" | "maxFiles" | "invalidType" | undefined;
|
|
31
|
+
export declare const getValidationMessage: (reason?: unknown, maxSize?: number, maxFiles?: number) => string;
|
|
32
|
+
export {};
|
|
@@ -2,7 +2,7 @@ import { CSSObject } from 'styled-components';
|
|
|
2
2
|
import { MenuProps } from './types';
|
|
3
3
|
export declare const contentBaseStyle: CSSObject;
|
|
4
4
|
declare const Menu: {
|
|
5
|
-
({ trigger, items, asModal, alignment, side, sideOffset, alignOffset, collisonBoundaryRef, maxHeight, enableSearch, searchPlaceholder, minWidth, maxWidth, open, onOpenChange, enableVirtualScrolling, virtualItemHeight, virtualOverscan, virtualScrollThreshold, skeleton, }: MenuProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
({ trigger, items, asModal, alignment, side, sideOffset, alignOffset, collisonBoundaryRef, maxHeight, enableSearch, searchPlaceholder, searchSortFn, onEnter, minWidth, maxWidth, open, onOpenChange, enableVirtualScrolling, virtualItemHeight, virtualOverscan, virtualScrollThreshold, skeleton, }: MenuProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
displayName: string;
|
|
7
7
|
};
|
|
8
8
|
export default Menu;
|
|
@@ -17,6 +17,7 @@ export type MenuSkeletonProps = {
|
|
|
17
17
|
show?: boolean;
|
|
18
18
|
variant?: SkeletonVariant;
|
|
19
19
|
};
|
|
20
|
+
export type MenuSearchSortFn = (items: MenuItemType[], searchText: string) => MenuItemType[];
|
|
20
21
|
export type MenuProps = {
|
|
21
22
|
trigger: React.ReactNode;
|
|
22
23
|
items?: MenuGroupType[];
|
|
@@ -26,6 +27,8 @@ export type MenuProps = {
|
|
|
26
27
|
minWidth?: number;
|
|
27
28
|
enableSearch?: boolean;
|
|
28
29
|
searchPlaceholder?: string;
|
|
30
|
+
searchSortFn?: MenuSearchSortFn;
|
|
31
|
+
onEnter?: (searchText: string, filteredGroups: MenuGroupType[]) => void;
|
|
29
32
|
enableVirtualScrolling?: boolean;
|
|
30
33
|
virtualItemHeight?: number | ((item: MenuItemType, index: number) => number);
|
|
31
34
|
virtualOverscan?: number;
|
|
@@ -68,6 +71,10 @@ export type MenuItemType = {
|
|
|
68
71
|
subMenu?: MenuItemType[];
|
|
69
72
|
enableSubMenuSearch?: boolean;
|
|
70
73
|
subMenuSearchPlaceholder?: string;
|
|
74
|
+
/** Custom sort function for submenu search results. Defaults to exact → prefix → substring. */
|
|
75
|
+
subMenuSearchSortFn?: MenuSearchSortFn;
|
|
76
|
+
/** Called when the user presses Enter while focused on the submenu search input. */
|
|
77
|
+
onSubMenuSearchEnter?: (searchText: string, filteredResults: MenuItemType[]) => void;
|
|
71
78
|
tooltip?: string | React.ReactNode;
|
|
72
79
|
tooltipProps?: {
|
|
73
80
|
side?: TooltipSide;
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
import { MenuGroupType, MenuItemType } from './types';
|
|
2
|
-
export declare
|
|
1
|
+
import { MenuGroupType, MenuItemType, MenuSearchSortFn } from './types';
|
|
2
|
+
export declare enum MenuMatchRank {
|
|
3
|
+
EXACT = 0,
|
|
4
|
+
PREFIX = 1,
|
|
5
|
+
SUBSTRING = 2,
|
|
6
|
+
NONE = 3
|
|
7
|
+
}
|
|
8
|
+
export declare const getItemMatchRank: (item: MenuItemType, lower: string) => MenuMatchRank;
|
|
9
|
+
export declare const defaultSearchSortFn: MenuSearchSortFn;
|
|
10
|
+
export declare const filterMenuGroups: (groups: MenuGroupType[], searchText: string, searchSortFn?: MenuSearchSortFn) => MenuGroupType[];
|
|
3
11
|
export declare const filterMenuItem: (item: MenuItemType, lower: string) => MenuItemType | null;
|
|
@@ -9,6 +9,7 @@ export type MenuV2ContentProps = {
|
|
|
9
9
|
searchPlaceholder: string;
|
|
10
10
|
searchText: string;
|
|
11
11
|
onSearchTextChange: (value: string) => void;
|
|
12
|
+
onEnter?: () => void;
|
|
12
13
|
maxHeight?: CSSObject['maxHeight'];
|
|
13
14
|
minHeight?: CSSObject['minHeight'];
|
|
14
15
|
minWidth?: CSSObject['minWidth'];
|
|
@@ -32,6 +32,7 @@ export type MenuV2ItemLabel = {
|
|
|
32
32
|
text: string;
|
|
33
33
|
leftSlot?: React.ReactElement;
|
|
34
34
|
};
|
|
35
|
+
export type MenuV2SearchSortFn = (items: MenuV2ItemType[], searchText: string) => MenuV2ItemType[];
|
|
35
36
|
export type MenuV2ItemType = {
|
|
36
37
|
id?: string;
|
|
37
38
|
label: MenuV2ItemLabel;
|
|
@@ -43,6 +44,8 @@ export type MenuV2ItemType = {
|
|
|
43
44
|
subMenu?: MenuV2ItemType[];
|
|
44
45
|
enableSubMenuSearch?: boolean;
|
|
45
46
|
subMenuSearchPlaceholder?: string;
|
|
47
|
+
subMenuSearchSortFn?: MenuV2SearchSortFn;
|
|
48
|
+
onSubMenuSearchEnter?: (searchText: string, filteredResults: MenuV2ItemType[]) => void;
|
|
46
49
|
tooltip?: string | ReactNode;
|
|
47
50
|
tooltipProps?: MenuV2ItemTooltipProps;
|
|
48
51
|
};
|
|
@@ -72,6 +75,8 @@ export type MenuV2Props = {
|
|
|
72
75
|
dimensions?: MenuV2Dimensions;
|
|
73
76
|
enableSearch?: boolean;
|
|
74
77
|
searchPlaceholder?: string;
|
|
78
|
+
searchSortFn?: MenuV2SearchSortFn;
|
|
79
|
+
onEnter?: (searchText: string, filteredGroups: MenuV2GroupType[]) => void;
|
|
75
80
|
enableVirtualScrolling?: boolean;
|
|
76
81
|
virtualScrolling?: MenuV2VirtualScrollingConfig;
|
|
77
82
|
open?: boolean;
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { MenuV2GroupType, MenuV2ItemType } from './menuV2.types';
|
|
2
|
+
import { MenuV2GroupType, MenuV2ItemType, MenuV2SearchSortFn } from './menuV2.types';
|
|
3
3
|
import { MenuV2TokensType, MenuV2ItemStates } from './menuV2.tokens';
|
|
4
4
|
type MenuV2ItemTokens = MenuV2TokensType['group']['item'];
|
|
5
5
|
export declare const getItemSlots: (item: MenuV2ItemType) => [ReactNode?];
|
|
6
|
+
export declare enum MenuV2MatchRank {
|
|
7
|
+
EXACT = 0,
|
|
8
|
+
PREFIX = 1,
|
|
9
|
+
SUBSTRING = 2,
|
|
10
|
+
NONE = 3
|
|
11
|
+
}
|
|
12
|
+
export declare const getItemMatchRank: (item: MenuV2ItemType, lower: string) => MenuV2MatchRank;
|
|
13
|
+
export declare const defaultSearchSortFn: MenuV2SearchSortFn;
|
|
6
14
|
export declare const filterMenuV2Item: (item: MenuV2ItemType, lower: string) => MenuV2ItemType | null;
|
|
7
15
|
export declare const getMenuItemBackgroundColor: (state: MenuV2ItemStates, itemTokens: MenuV2ItemTokens, item: MenuV2ItemType) => string | undefined;
|
|
8
16
|
export declare const getMenuItemOptionColor: (state: MenuV2ItemStates, itemTokens: MenuV2ItemTokens, item: MenuV2ItemType) => string | undefined;
|
|
@@ -22,5 +30,5 @@ export type MenuV2FlatRow = {
|
|
|
22
30
|
itemIndex: number;
|
|
23
31
|
};
|
|
24
32
|
export declare const flattenMenuV2Groups: (groups: MenuV2GroupType[]) => MenuV2FlatRow[];
|
|
25
|
-
export declare const filterMenuV2Groups: (groups: MenuV2GroupType[], searchText: string) => MenuV2GroupType[];
|
|
33
|
+
export declare const filterMenuV2Groups: (groups: MenuV2GroupType[], searchText: string, searchSortFn?: MenuV2SearchSortFn) => MenuV2GroupType[];
|
|
26
34
|
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare const ModalV2: import('react').ForwardRefExoticComponent<{
|
|
2
|
+
isOpen: boolean;
|
|
3
|
+
isCustom?: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
title?: string;
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
children: import('react').ReactNode;
|
|
8
|
+
primaryAction?: import('./modalV2.types').ModalV2ButtonAction;
|
|
9
|
+
secondaryAction?: import('./modalV2.types').ModalV2ButtonAction;
|
|
10
|
+
showCloseButton?: boolean;
|
|
11
|
+
showHeader?: boolean;
|
|
12
|
+
showFooter?: boolean;
|
|
13
|
+
closeOnBackdropClick?: boolean;
|
|
14
|
+
customHeader?: import('react').ReactNode;
|
|
15
|
+
customFooter?: import('react').ReactNode;
|
|
16
|
+
headerSlot?: import('react').ReactNode;
|
|
17
|
+
showDivider?: boolean;
|
|
18
|
+
dimensions?: import('./modalV2.types').ModalV2Dimensions;
|
|
19
|
+
useDrawerOnMobile?: boolean;
|
|
20
|
+
skeleton?: import('./modalV2.types').ModalV2BodySkeletonProps;
|
|
21
|
+
} & Omit<import('react').HTMLAttributes<HTMLDivElement>, "style" | "className" | "title" | "children"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
22
|
+
export default ModalV2;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ModalV2Props } from './modalV2.types';
|
|
2
|
+
import { SkeletonVariant } from '../Skeleton';
|
|
3
|
+
declare const ModalV2Footer: ({ primaryAction, secondaryAction, showDivider, showSkeleton, skeletonVariant, }: {
|
|
4
|
+
primaryAction?: ModalV2Props["primaryAction"];
|
|
5
|
+
secondaryAction?: ModalV2Props["secondaryAction"];
|
|
6
|
+
showDivider?: boolean;
|
|
7
|
+
showSkeleton?: boolean;
|
|
8
|
+
skeletonVariant?: SkeletonVariant;
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
export default ModalV2Footer;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { SkeletonVariant } from '../Skeleton';
|
|
3
|
+
declare const ModalV2Header: ({ title, subtitle, onClose, showCloseButton, headerSlot, showDivider, showSkeleton, skeletonVariant, titleId, subtitleId, }: {
|
|
4
|
+
title?: string;
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
showCloseButton?: boolean;
|
|
8
|
+
headerSlot?: ReactNode;
|
|
9
|
+
showDivider?: boolean;
|
|
10
|
+
showSkeleton?: boolean;
|
|
11
|
+
skeletonVariant?: SkeletonVariant;
|
|
12
|
+
titleId?: string;
|
|
13
|
+
subtitleId?: string;
|
|
14
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
15
|
+
export default ModalV2Header;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
declare const MobileModalV2: React.ForwardRefExoticComponent<{
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
isCustom?: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
title?: string;
|
|
7
|
+
subtitle?: string;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
primaryAction?: import('./modalV2.types').ModalV2ButtonAction;
|
|
10
|
+
secondaryAction?: import('./modalV2.types').ModalV2ButtonAction;
|
|
11
|
+
showCloseButton?: boolean;
|
|
12
|
+
showHeader?: boolean;
|
|
13
|
+
showFooter?: boolean;
|
|
14
|
+
closeOnBackdropClick?: boolean;
|
|
15
|
+
customHeader?: React.ReactNode;
|
|
16
|
+
customFooter?: React.ReactNode;
|
|
17
|
+
headerSlot?: React.ReactNode;
|
|
18
|
+
showDivider?: boolean;
|
|
19
|
+
dimensions?: import('./modalV2.types').ModalV2Dimensions;
|
|
20
|
+
useDrawerOnMobile?: boolean;
|
|
21
|
+
skeleton?: import('./modalV2.types').ModalV2BodySkeletonProps;
|
|
22
|
+
} & Omit<React.HTMLAttributes<HTMLDivElement>, "style" | "className" | "title" | "children"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
export default MobileModalV2;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const modalBackdropAnimationsV2: (isAnimatingIn: boolean) => import('styled-components').RuleSet<object>;
|
|
2
|
+
export declare const modalContentAnimationsV2: (isAnimatingIn: boolean) => import('styled-components').RuleSet<object>;
|
|
3
|
+
export declare const ANIMATION_DURATION = 300;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FoundationTokenType } from '../../tokens/theme.token';
|
|
2
|
+
import { Theme } from '../../context/theme.enum';
|
|
3
|
+
import { ResponsiveModalV2Tokens } from './modalV2.tokens.types';
|
|
4
|
+
export type { ModalV2State, ModalV2TokensType, ResponsiveModalV2Tokens, } from './modalV2.tokens.types';
|
|
5
|
+
export declare const getModalV2Tokens: (foundationToken: FoundationTokenType, theme?: Theme | string) => ResponsiveModalV2Tokens;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { BreakpointType } from '../../breakpoints/breakPoints';
|
|
3
|
+
export type ModalV2State = 'default';
|
|
4
|
+
export type ModalV2TokensType = {
|
|
5
|
+
boxShadow: CSSObject['boxShadow'];
|
|
6
|
+
borderRadius: CSSObject['borderRadius'];
|
|
7
|
+
overlay: {
|
|
8
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
9
|
+
offset: CSSObject['offset'];
|
|
10
|
+
};
|
|
11
|
+
paddingTop: CSSObject['paddingTop'];
|
|
12
|
+
paddingRight: CSSObject['paddingRight'];
|
|
13
|
+
paddingBottom: CSSObject['paddingBottom'];
|
|
14
|
+
paddingLeft: CSSObject['paddingLeft'];
|
|
15
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
16
|
+
header: {
|
|
17
|
+
gap: CSSObject['gap'];
|
|
18
|
+
paddingTop: CSSObject['paddingTop'];
|
|
19
|
+
paddingRight: CSSObject['paddingRight'];
|
|
20
|
+
paddingBottom: CSSObject['paddingBottom'];
|
|
21
|
+
paddingLeft: CSSObject['paddingLeft'];
|
|
22
|
+
maxHeight: CSSObject['maxHeight'];
|
|
23
|
+
borderBottom: CSSObject['border'];
|
|
24
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
25
|
+
borderTopLeftRadius: CSSObject['borderTopLeftRadius'];
|
|
26
|
+
borderTopRightRadius: CSSObject['borderTopRightRadius'];
|
|
27
|
+
slot: {
|
|
28
|
+
gap: CSSObject['gap'];
|
|
29
|
+
};
|
|
30
|
+
text: {
|
|
31
|
+
title: {
|
|
32
|
+
color: CSSObject['color'];
|
|
33
|
+
fontSize: CSSObject['fontSize'];
|
|
34
|
+
fontWeight: CSSObject['fontWeight'];
|
|
35
|
+
lineHeight: CSSObject['lineHeight'];
|
|
36
|
+
};
|
|
37
|
+
subtitle: {
|
|
38
|
+
color: CSSObject['color'];
|
|
39
|
+
fontSize: CSSObject['fontSize'];
|
|
40
|
+
fontWeight: CSSObject['fontWeight'];
|
|
41
|
+
lineHeight: CSSObject['lineHeight'];
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
divider: {
|
|
46
|
+
borderColor: CSSObject['borderColor'];
|
|
47
|
+
};
|
|
48
|
+
skeleton: {
|
|
49
|
+
header: {
|
|
50
|
+
gap: CSSObject['gap'];
|
|
51
|
+
paddingTop: CSSObject['paddingTop'];
|
|
52
|
+
paddingRight: CSSObject['paddingRight'];
|
|
53
|
+
paddingBottom: CSSObject['paddingBottom'];
|
|
54
|
+
paddingLeft: CSSObject['paddingLeft'];
|
|
55
|
+
borderBottom: CSSObject['border'];
|
|
56
|
+
width: CSSObject['width'];
|
|
57
|
+
height: CSSObject['height'];
|
|
58
|
+
borderRadius: CSSObject['borderRadius'];
|
|
59
|
+
};
|
|
60
|
+
body: {
|
|
61
|
+
gap: CSSObject['gap'];
|
|
62
|
+
width: CSSObject['width'];
|
|
63
|
+
height: CSSObject['height'];
|
|
64
|
+
borderRadius: CSSObject['borderRadius'];
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
body: {
|
|
68
|
+
paddingTop: CSSObject['paddingTop'];
|
|
69
|
+
paddingRight: CSSObject['paddingRight'];
|
|
70
|
+
paddingBottom: CSSObject['paddingBottom'];
|
|
71
|
+
paddingLeft: CSSObject['paddingLeft'];
|
|
72
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
73
|
+
};
|
|
74
|
+
footer: {
|
|
75
|
+
paddingTop: CSSObject['paddingTop'];
|
|
76
|
+
paddingRight: CSSObject['paddingRight'];
|
|
77
|
+
paddingBottom: CSSObject['paddingBottom'];
|
|
78
|
+
paddingLeft: CSSObject['paddingLeft'];
|
|
79
|
+
borderTop: CSSObject['border'];
|
|
80
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
81
|
+
gap: CSSObject['gap'];
|
|
82
|
+
};
|
|
83
|
+
closeButton: {
|
|
84
|
+
color: CSSObject['color'];
|
|
85
|
+
width: CSSObject['width'];
|
|
86
|
+
height: CSSObject['height'];
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
export type ResponsiveModalV2Tokens = {
|
|
90
|
+
[key in keyof BreakpointType]: ModalV2TokensType;
|
|
91
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { SkeletonVariant } from '../Skeleton';
|
|
2
|
+
import { ModalV2TokensType } from './modalV2.tokens.types';
|
|
3
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
4
|
+
import { ButtonV2Props } from '../ButtonV2';
|
|
5
|
+
import { CSSObject } from 'styled-components';
|
|
6
|
+
export type HeaderSkeletonConfig = {
|
|
7
|
+
show: boolean;
|
|
8
|
+
showDivider: boolean;
|
|
9
|
+
showCloseButton: boolean;
|
|
10
|
+
};
|
|
11
|
+
export type BodySkeletonConfig = {
|
|
12
|
+
show: boolean;
|
|
13
|
+
width: string;
|
|
14
|
+
height: string | number;
|
|
15
|
+
};
|
|
16
|
+
export type FooterSkeletonConfig = {
|
|
17
|
+
show: boolean;
|
|
18
|
+
showDivider: boolean;
|
|
19
|
+
};
|
|
20
|
+
export type ModalV2SkeletonProps = {
|
|
21
|
+
modalTokens: ModalV2TokensType;
|
|
22
|
+
headerSkeleton?: HeaderSkeletonConfig;
|
|
23
|
+
bodySkeleton?: BodySkeletonConfig;
|
|
24
|
+
footerSkeleton?: FooterSkeletonConfig;
|
|
25
|
+
skeletonVariant: SkeletonVariant;
|
|
26
|
+
};
|
|
27
|
+
export type ModalV2ButtonAction = Omit<ButtonV2Props, 'buttonGroupPosition'>;
|
|
28
|
+
export type BodySkeletonProps = {
|
|
29
|
+
show?: boolean;
|
|
30
|
+
width?: string;
|
|
31
|
+
height?: string | number;
|
|
32
|
+
};
|
|
33
|
+
export type ModalV2BodySkeletonProps = {
|
|
34
|
+
show?: boolean;
|
|
35
|
+
variant?: SkeletonVariant;
|
|
36
|
+
bodySkeletonProps?: BodySkeletonProps;
|
|
37
|
+
};
|
|
38
|
+
export type ModalV2Dimensions = {
|
|
39
|
+
width?: CSSObject['width'];
|
|
40
|
+
height?: CSSObject['height'];
|
|
41
|
+
minWidth?: CSSObject['minWidth'];
|
|
42
|
+
maxWidth?: CSSObject['maxWidth'];
|
|
43
|
+
minHeight?: CSSObject['minHeight'];
|
|
44
|
+
maxHeight?: CSSObject['maxHeight'];
|
|
45
|
+
};
|
|
46
|
+
export type ModalV2Props = {
|
|
47
|
+
isOpen: boolean;
|
|
48
|
+
isCustom?: boolean;
|
|
49
|
+
onClose: () => void;
|
|
50
|
+
title?: string;
|
|
51
|
+
subtitle?: string;
|
|
52
|
+
children: ReactNode;
|
|
53
|
+
primaryAction?: ModalV2ButtonAction;
|
|
54
|
+
secondaryAction?: ModalV2ButtonAction;
|
|
55
|
+
showCloseButton?: boolean;
|
|
56
|
+
showHeader?: boolean;
|
|
57
|
+
showFooter?: boolean;
|
|
58
|
+
closeOnBackdropClick?: boolean;
|
|
59
|
+
customHeader?: ReactNode;
|
|
60
|
+
customFooter?: ReactNode;
|
|
61
|
+
headerSlot?: ReactNode;
|
|
62
|
+
showDivider?: boolean;
|
|
63
|
+
dimensions?: ModalV2Dimensions;
|
|
64
|
+
useDrawerOnMobile?: boolean;
|
|
65
|
+
skeleton?: ModalV2BodySkeletonProps;
|
|
66
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'title' | 'className' | 'style'>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { MultiSelectProps } from './types';
|
|
2
|
-
declare const MultiSelect: ({ selectedValues, onChange, items, label, sublabel, disabled, helpIconHintText, name, required, variant, selectionTagType, slot, hintText, placeholder, size, enableSearch, searchPlaceholder, enableSelectAll, selectAllText, maxSelections, customTrigger, useDrawerOnMobile, minMenuWidth, maxMenuWidth, maxMenuHeight, alignment, side, sideOffset, alignOffset, inline, error, errorMessage, showActionButtons, primaryAction, secondaryAction, showItemDividers, showHeaderBorder, fullWidth, enableVirtualization, virtualListItemHeight, virtualListOverscan, itemsToRender, onEndReached, endReachedThreshold, hasMore, loadingComponent, skeleton, maxTriggerWidth, minTriggerWidth, allowCustomValue, customValueLabel, showClearButton, onClearAllClick, onOpenChange, multiSelectGroupPosition, ...rest }: MultiSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const MultiSelect: ({ selectedValues, onChange, items, label, sublabel, disabled, helpIconHintText, name, required, variant, selectionTagType, slot, hintText, placeholder, size, enableSearch, searchPlaceholder, enableSelectAll, selectAllText, maxSelections, customTrigger, useDrawerOnMobile, minMenuWidth, maxMenuWidth, maxMenuHeight, alignment, side, sideOffset, alignOffset, inline, error, errorMessage, showActionButtons, primaryAction, secondaryAction, showItemDividers, showHeaderBorder, fullWidth, enableVirtualization, virtualListItemHeight, virtualListOverscan, itemsToRender, onEndReached, endReachedThreshold, hasMore, loadingComponent, skeleton, maxTriggerWidth, minTriggerWidth, allowCustomValue, customValueLabel, showClearButton, onClearAllClick, onOpenChange, multiSelectGroupPosition, menuFooter, ...rest }: MultiSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default MultiSelect;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { MultiSelectMenuProps } from './types';
|
|
2
|
-
declare const MultiSelectMenu: ({ items, selected, onSelect, trigger, minMenuWidth, maxMenuWidth, maxMenuHeight, disabled, enableSearch, searchPlaceholder, enableSelectAll, selectAllText, maxSelections, onSelectAll, alignment, side, sideOffset, alignOffset, collisionBoundary, open, onOpenChange, showActionButtons, primaryAction, secondaryAction, enableVirtualization, virtualListItemHeight, virtualListOverscan, onEndReached, endReachedThreshold, hasMore, skeleton, size, variant, allowCustomValue, customValueLabel, menuId, }: MultiSelectMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const MultiSelectMenu: ({ items, selected, onSelect, trigger, minMenuWidth, maxMenuWidth, maxMenuHeight, disabled, enableSearch, searchPlaceholder, enableSelectAll, selectAllText, maxSelections, onSelectAll, alignment, side, sideOffset, alignOffset, collisionBoundary, open, onOpenChange, showActionButtons, primaryAction, secondaryAction, enableVirtualization, virtualListItemHeight, virtualListOverscan, onEndReached, endReachedThreshold, hasMore, skeleton, size, variant, allowCustomValue, customValueLabel, menuId, menuFooter, }: MultiSelectMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default MultiSelectMenu;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
/** @deprecated Will be deprecated soon. Use MultiSelectV2 instead. */
|
|
1
2
|
export { default as MultiSelect } from './MultiSelect';
|
|
3
|
+
/** @deprecated Will be deprecated soon. Use MultiSelectV2 instead. */
|
|
2
4
|
export { default as MultiSelectTrigger } from './MultiSelectTrigger';
|
|
3
5
|
export * from './multiSelect.tokens';
|
|
4
6
|
export * from './types';
|
|
@@ -126,6 +126,7 @@ export type MultiSelectProps = {
|
|
|
126
126
|
showClearButton?: boolean;
|
|
127
127
|
onClearAllClick?: () => void;
|
|
128
128
|
multiSelectGroupPosition?: 'center' | 'left' | 'right';
|
|
129
|
+
menuFooter?: React.ReactNode;
|
|
129
130
|
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'slot' | 'onChange'>;
|
|
130
131
|
export type MultiSelectMenuProps = {
|
|
131
132
|
items: MultiSelectMenuGroupType[];
|
|
@@ -176,4 +177,5 @@ export type MultiSelectMenuProps = {
|
|
|
176
177
|
customValueLabel?: string;
|
|
177
178
|
menuId?: string;
|
|
178
179
|
collisionBoundary?: Element | null | Array<Element | null>;
|
|
180
|
+
menuFooter?: React.ReactNode;
|
|
179
181
|
};
|