@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
|
@@ -69,6 +69,10 @@ const ScrollableContent = styled(Block)(() => ({
|
|
|
69
69
|
},
|
|
70
70
|
}))
|
|
71
71
|
|
|
72
|
+
const MenuFooter = styled(Block)`
|
|
73
|
+
flex-shrink: 0;
|
|
74
|
+
`
|
|
75
|
+
|
|
72
76
|
const MultiSelectV2Menu = ({
|
|
73
77
|
items,
|
|
74
78
|
selected,
|
|
@@ -104,6 +108,7 @@ const MultiSelectV2Menu = ({
|
|
|
104
108
|
allowCustomValue = false,
|
|
105
109
|
customValueLabel = 'Specify',
|
|
106
110
|
menuId,
|
|
111
|
+
menuFooter,
|
|
107
112
|
}: MultiSelectV2MenuProps) => {
|
|
108
113
|
const multiSelectTokens =
|
|
109
114
|
useResponsiveTokens<MultiSelectV2TokensType>('MULTI_SELECT_V2')
|
|
@@ -467,6 +472,9 @@ const MultiSelectV2Menu = ({
|
|
|
467
472
|
onClose={() => handleOpenChange(false)}
|
|
468
473
|
/>
|
|
469
474
|
)}
|
|
475
|
+
{menuFooter && (
|
|
476
|
+
<MenuFooter>{menuFooter}</MenuFooter>
|
|
477
|
+
)}
|
|
470
478
|
</>
|
|
471
479
|
)}
|
|
472
480
|
</Content>
|
|
@@ -188,7 +188,10 @@ const MultiSelectV2Trigger = ({
|
|
|
188
188
|
as="span"
|
|
189
189
|
textAlign="left"
|
|
190
190
|
paddingTop={
|
|
191
|
-
isContainer &&
|
|
191
|
+
isContainer &&
|
|
192
|
+
isSmallScreenWithLargeSize &&
|
|
193
|
+
isItemSelected &&
|
|
194
|
+
label
|
|
192
195
|
? floatingLabelPaddingTop
|
|
193
196
|
: 0
|
|
194
197
|
}
|
|
@@ -97,6 +97,7 @@ export type MultiSelectV2MenuProps = {
|
|
|
97
97
|
allowCustomValue?: boolean
|
|
98
98
|
customValueLabel?: string
|
|
99
99
|
menuId?: string
|
|
100
|
+
menuFooter?: ReactNode
|
|
100
101
|
}
|
|
101
102
|
|
|
102
103
|
export type MultiSelectV2MenuRootProps = SelectV2MenuRootPropsBase & {
|
|
@@ -170,4 +171,5 @@ export type MultiSelectV2Props = Omit<
|
|
|
170
171
|
showClearButton?: boolean
|
|
171
172
|
onClearAllClick?: () => void
|
|
172
173
|
multiSelectGroupPosition?: 'center' | 'left' | 'right'
|
|
174
|
+
menuFooter?: ReactNode
|
|
173
175
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
/** @deprecated Will be deprecated soon. Use RadioV2 instead. */
|
|
1
2
|
export { default as Radio } from './Radio'
|
|
3
|
+
/** @deprecated Will be deprecated soon. Use RadioV2 instead. */
|
|
2
4
|
export { default as RadioGroup } from './RadioGroup'
|
|
3
5
|
export { RadioSize } from './types'
|
|
4
6
|
export type { RadioProps, RadioGroupProps } from './types'
|
|
@@ -100,6 +100,14 @@ const Sidebar = forwardRef<HTMLDivElement, SidebarProps>(
|
|
|
100
100
|
defaultActiveItem,
|
|
101
101
|
showLeftPanel = true,
|
|
102
102
|
onSidebarStateChange,
|
|
103
|
+
showHierarchyLines = false,
|
|
104
|
+
hierarchyLineBorderRadius = 0,
|
|
105
|
+
expandedItems,
|
|
106
|
+
defaultExpandedItems,
|
|
107
|
+
onExpandedItemsChange,
|
|
108
|
+
onItemExpand,
|
|
109
|
+
enableVirtualization = false,
|
|
110
|
+
virtualization,
|
|
103
111
|
},
|
|
104
112
|
ref
|
|
105
113
|
) => {
|
|
@@ -402,6 +410,18 @@ const Sidebar = forwardRef<HTMLDivElement, SidebarProps>(
|
|
|
402
410
|
iconOnlyMode={iconOnlyMode}
|
|
403
411
|
footer={footer}
|
|
404
412
|
setIsHovering={setIsHovering}
|
|
413
|
+
showHierarchyLines={showHierarchyLines}
|
|
414
|
+
hierarchyLineBorderRadius={
|
|
415
|
+
hierarchyLineBorderRadius
|
|
416
|
+
}
|
|
417
|
+
expandedItems={expandedItems}
|
|
418
|
+
defaultExpandedItems={defaultExpandedItems}
|
|
419
|
+
onExpandedItemsChange={
|
|
420
|
+
onExpandedItemsChange
|
|
421
|
+
}
|
|
422
|
+
onItemExpand={onItemExpand}
|
|
423
|
+
enableVirtualization={enableVirtualization}
|
|
424
|
+
virtualization={virtualization}
|
|
405
425
|
/>
|
|
406
426
|
|
|
407
427
|
{/* Intermediate Sidebar */}
|
|
@@ -491,6 +511,24 @@ const Sidebar = forwardRef<HTMLDivElement, SidebarProps>(
|
|
|
491
511
|
}
|
|
492
512
|
iconOnlyMode={false}
|
|
493
513
|
footer={footer}
|
|
514
|
+
showHierarchyLines={
|
|
515
|
+
showHierarchyLines
|
|
516
|
+
}
|
|
517
|
+
hierarchyLineBorderRadius={
|
|
518
|
+
hierarchyLineBorderRadius
|
|
519
|
+
}
|
|
520
|
+
expandedItems={expandedItems}
|
|
521
|
+
defaultExpandedItems={
|
|
522
|
+
defaultExpandedItems
|
|
523
|
+
}
|
|
524
|
+
onExpandedItemsChange={
|
|
525
|
+
onExpandedItemsChange
|
|
526
|
+
}
|
|
527
|
+
onItemExpand={onItemExpand}
|
|
528
|
+
enableVirtualization={
|
|
529
|
+
enableVirtualization
|
|
530
|
+
}
|
|
531
|
+
virtualization={virtualization}
|
|
494
532
|
/>
|
|
495
533
|
</Block>
|
|
496
534
|
)}
|
|
@@ -5,7 +5,7 @@ import Directory from '../Directory/Directory'
|
|
|
5
5
|
import { normalizeDirectoryData } from '../Directory/utils'
|
|
6
6
|
import SidebarHeader from './SidebarHeader'
|
|
7
7
|
import SidebarFooter from './SidebarFooter'
|
|
8
|
-
import type { DirectoryData } from '../Directory/types'
|
|
8
|
+
import type { DirectoryData, DirectoryProps } from '../Directory/types'
|
|
9
9
|
import type { SidebarMerchantInfo, SidebarStateChangeType } from './types'
|
|
10
10
|
|
|
11
11
|
const DirectoryContainer = styled(Block)<{
|
|
@@ -45,6 +45,14 @@ export type SidebarContentProps = {
|
|
|
45
45
|
footer?: React.ReactNode
|
|
46
46
|
setIsHovering?: (isHovering: boolean) => void
|
|
47
47
|
sidebarState?: SidebarStateChangeType
|
|
48
|
+
showHierarchyLines?: DirectoryProps['showHierarchyLines']
|
|
49
|
+
hierarchyLineBorderRadius?: DirectoryProps['hierarchyLineBorderRadius']
|
|
50
|
+
expandedItems?: DirectoryProps['expandedItems']
|
|
51
|
+
defaultExpandedItems?: DirectoryProps['defaultExpandedItems']
|
|
52
|
+
onExpandedItemsChange?: DirectoryProps['onExpandedItemsChange']
|
|
53
|
+
onItemExpand?: DirectoryProps['onItemExpand']
|
|
54
|
+
enableVirtualization?: DirectoryProps['enableVirtualization']
|
|
55
|
+
virtualization?: DirectoryProps['virtualization']
|
|
48
56
|
}
|
|
49
57
|
|
|
50
58
|
const SidebarContent: React.FC<SidebarContentProps> = ({
|
|
@@ -66,6 +74,14 @@ const SidebarContent: React.FC<SidebarContentProps> = ({
|
|
|
66
74
|
footer,
|
|
67
75
|
setIsHovering,
|
|
68
76
|
sidebarState = 'expanded',
|
|
77
|
+
showHierarchyLines = false,
|
|
78
|
+
hierarchyLineBorderRadius = 0,
|
|
79
|
+
expandedItems,
|
|
80
|
+
defaultExpandedItems,
|
|
81
|
+
onExpandedItemsChange,
|
|
82
|
+
onItemExpand,
|
|
83
|
+
enableVirtualization = false,
|
|
84
|
+
virtualization,
|
|
69
85
|
}) => {
|
|
70
86
|
const directoryData = normalizeDirectoryData(data)
|
|
71
87
|
|
|
@@ -114,6 +130,14 @@ const SidebarContent: React.FC<SidebarContentProps> = ({
|
|
|
114
130
|
onActiveItemChange={onActiveItemChange}
|
|
115
131
|
defaultActiveItem={defaultActiveItem}
|
|
116
132
|
iconOnlyMode={iconOnlyMode}
|
|
133
|
+
showHierarchyLines={showHierarchyLines}
|
|
134
|
+
hierarchyLineBorderRadius={hierarchyLineBorderRadius}
|
|
135
|
+
expandedItems={expandedItems}
|
|
136
|
+
defaultExpandedItems={defaultExpandedItems}
|
|
137
|
+
onExpandedItemsChange={onExpandedItemsChange}
|
|
138
|
+
onItemExpand={onItemExpand}
|
|
139
|
+
enableVirtualization={enableVirtualization}
|
|
140
|
+
virtualization={virtualization}
|
|
117
141
|
/>
|
|
118
142
|
</DirectoryContainer>
|
|
119
143
|
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { type ReactNode } from 'react'
|
|
2
|
-
import type {
|
|
2
|
+
import type {
|
|
3
|
+
DirectoryData,
|
|
4
|
+
DirectoryProps,
|
|
5
|
+
NavbarItem,
|
|
6
|
+
} from '../Directory/types'
|
|
3
7
|
import type {
|
|
4
8
|
MerchantInfo,
|
|
5
9
|
LeftPanelInfo,
|
|
@@ -65,6 +69,14 @@ export type SidebarProps = {
|
|
|
65
69
|
onActiveItemChange?: (item: string | null) => void
|
|
66
70
|
defaultActiveItem?: string | null
|
|
67
71
|
onHoveringChange?: (isHovering: boolean) => void
|
|
72
|
+
showHierarchyLines?: DirectoryProps['showHierarchyLines']
|
|
73
|
+
hierarchyLineBorderRadius?: DirectoryProps['hierarchyLineBorderRadius']
|
|
74
|
+
expandedItems?: DirectoryProps['expandedItems']
|
|
75
|
+
defaultExpandedItems?: DirectoryProps['defaultExpandedItems']
|
|
76
|
+
onExpandedItemsChange?: DirectoryProps['onExpandedItemsChange']
|
|
77
|
+
onItemExpand?: DirectoryProps['onItemExpand']
|
|
78
|
+
enableVirtualization?: DirectoryProps['enableVirtualization']
|
|
79
|
+
virtualization?: DirectoryProps['virtualization']
|
|
68
80
|
}
|
|
69
81
|
|
|
70
82
|
export type MobileNavigationItem = NavbarItem & {
|
|
@@ -71,6 +71,14 @@ const SidebarV2 = forwardRef<HTMLDivElement, SidebarV2Props>(
|
|
|
71
71
|
onActiveItemChange,
|
|
72
72
|
defaultActiveItem,
|
|
73
73
|
onSidebarStateChange,
|
|
74
|
+
showHierarchyLines = false,
|
|
75
|
+
hierarchyLineBorderRadius = 0,
|
|
76
|
+
expandedItems,
|
|
77
|
+
defaultExpandedItems,
|
|
78
|
+
onExpandedItemsChange,
|
|
79
|
+
onItemExpand,
|
|
80
|
+
enableVirtualization = false,
|
|
81
|
+
virtualization,
|
|
74
82
|
},
|
|
75
83
|
ref
|
|
76
84
|
) => {
|
|
@@ -323,6 +331,16 @@ const SidebarV2 = forwardRef<HTMLDivElement, SidebarV2Props>(
|
|
|
323
331
|
setIsHovering={setIsHovering}
|
|
324
332
|
sidebarState={sidebarStatus}
|
|
325
333
|
tokens={tokens}
|
|
334
|
+
showHierarchyLines={showHierarchyLines}
|
|
335
|
+
hierarchyLineBorderRadius={
|
|
336
|
+
hierarchyLineBorderRadius
|
|
337
|
+
}
|
|
338
|
+
expandedItems={expandedItems}
|
|
339
|
+
defaultExpandedItems={defaultExpandedItems}
|
|
340
|
+
onExpandedItemsChange={onExpandedItemsChange}
|
|
341
|
+
onItemExpand={onItemExpand}
|
|
342
|
+
enableVirtualization={enableVirtualization}
|
|
343
|
+
virtualization={virtualization}
|
|
326
344
|
/>
|
|
327
345
|
)}
|
|
328
346
|
|
|
@@ -386,6 +404,18 @@ const SidebarV2 = forwardRef<HTMLDivElement, SidebarV2Props>(
|
|
|
386
404
|
footer={footer}
|
|
387
405
|
sidebarState={sidebarStatus}
|
|
388
406
|
tokens={tokens}
|
|
407
|
+
showHierarchyLines={showHierarchyLines}
|
|
408
|
+
hierarchyLineBorderRadius={
|
|
409
|
+
hierarchyLineBorderRadius
|
|
410
|
+
}
|
|
411
|
+
expandedItems={expandedItems}
|
|
412
|
+
defaultExpandedItems={defaultExpandedItems}
|
|
413
|
+
onExpandedItemsChange={
|
|
414
|
+
onExpandedItemsChange
|
|
415
|
+
}
|
|
416
|
+
onItemExpand={onItemExpand}
|
|
417
|
+
enableVirtualization={enableVirtualization}
|
|
418
|
+
virtualization={virtualization}
|
|
389
419
|
/>
|
|
390
420
|
</Block>
|
|
391
421
|
)}
|
|
@@ -3,7 +3,7 @@ import styled from 'styled-components'
|
|
|
3
3
|
import Block from '../Primitives/Block/Block'
|
|
4
4
|
import Directory from '../Directory/Directory'
|
|
5
5
|
import { normalizeDirectoryData } from '../Directory/utils'
|
|
6
|
-
import type { DirectoryData } from '../Directory/types'
|
|
6
|
+
import type { DirectoryData, DirectoryProps } from '../Directory/types'
|
|
7
7
|
import SidebarV2Header from './SidebarV2Header'
|
|
8
8
|
import SidebarV2Footer from './SidebarV2Footer'
|
|
9
9
|
import type { SidebarV2StateChangeType } from './types'
|
|
@@ -55,6 +55,14 @@ export type SidebarV2PanelProps = {
|
|
|
55
55
|
setIsHovering?: (isHovering: boolean) => void
|
|
56
56
|
sidebarState?: SidebarV2StateChangeType
|
|
57
57
|
tokens: SidebarV2TokensType
|
|
58
|
+
showHierarchyLines?: DirectoryProps['showHierarchyLines']
|
|
59
|
+
hierarchyLineBorderRadius?: DirectoryProps['hierarchyLineBorderRadius']
|
|
60
|
+
expandedItems?: DirectoryProps['expandedItems']
|
|
61
|
+
defaultExpandedItems?: DirectoryProps['defaultExpandedItems']
|
|
62
|
+
onExpandedItemsChange?: DirectoryProps['onExpandedItemsChange']
|
|
63
|
+
onItemExpand?: DirectoryProps['onItemExpand']
|
|
64
|
+
enableVirtualization?: DirectoryProps['enableVirtualization']
|
|
65
|
+
virtualization?: DirectoryProps['virtualization']
|
|
58
66
|
}
|
|
59
67
|
|
|
60
68
|
const SidebarV2Panel = ({
|
|
@@ -76,6 +84,14 @@ const SidebarV2Panel = ({
|
|
|
76
84
|
setIsHovering,
|
|
77
85
|
sidebarState = 'expanded',
|
|
78
86
|
tokens,
|
|
87
|
+
showHierarchyLines = false,
|
|
88
|
+
hierarchyLineBorderRadius = 0,
|
|
89
|
+
expandedItems,
|
|
90
|
+
defaultExpandedItems,
|
|
91
|
+
onExpandedItemsChange,
|
|
92
|
+
onItemExpand,
|
|
93
|
+
enableVirtualization = false,
|
|
94
|
+
virtualization,
|
|
79
95
|
}: SidebarV2PanelProps) => {
|
|
80
96
|
const trackHover = shouldTrackHover(setIsHovering)
|
|
81
97
|
const directoryData = normalizeDirectoryData(data)
|
|
@@ -126,6 +142,14 @@ const SidebarV2Panel = ({
|
|
|
126
142
|
onActiveItemChange={onActiveItemChange}
|
|
127
143
|
defaultActiveItem={defaultActiveItem}
|
|
128
144
|
iconOnlyMode={iconOnlyMode}
|
|
145
|
+
showHierarchyLines={showHierarchyLines}
|
|
146
|
+
hierarchyLineBorderRadius={hierarchyLineBorderRadius}
|
|
147
|
+
expandedItems={expandedItems}
|
|
148
|
+
defaultExpandedItems={defaultExpandedItems}
|
|
149
|
+
onExpandedItemsChange={onExpandedItemsChange}
|
|
150
|
+
onItemExpand={onItemExpand}
|
|
151
|
+
enableVirtualization={enableVirtualization}
|
|
152
|
+
virtualization={virtualization}
|
|
129
153
|
/>
|
|
130
154
|
</DirectoryContainer>
|
|
131
155
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ButtonHTMLAttributes, ReactNode } from 'react'
|
|
2
|
-
import type { DirectoryData } from '../Directory/types'
|
|
2
|
+
import type { DirectoryData, DirectoryProps } from '../Directory/types'
|
|
3
3
|
import type { MerchantInfo } from '../Topbar/types'
|
|
4
4
|
import type { TenantBadge } from '../Sidebar/types'
|
|
5
5
|
|
|
@@ -59,6 +59,14 @@ export type SidebarV2Props = {
|
|
|
59
59
|
activeItem?: string | null
|
|
60
60
|
onActiveItemChange?: (item: string | null) => void
|
|
61
61
|
defaultActiveItem?: string | null
|
|
62
|
+
showHierarchyLines?: DirectoryProps['showHierarchyLines']
|
|
63
|
+
hierarchyLineBorderRadius?: DirectoryProps['hierarchyLineBorderRadius']
|
|
64
|
+
expandedItems?: DirectoryProps['expandedItems']
|
|
65
|
+
defaultExpandedItems?: DirectoryProps['defaultExpandedItems']
|
|
66
|
+
onExpandedItemsChange?: DirectoryProps['onExpandedItemsChange']
|
|
67
|
+
onItemExpand?: DirectoryProps['onItemExpand']
|
|
68
|
+
enableVirtualization?: DirectoryProps['enableVirtualization']
|
|
69
|
+
virtualization?: DirectoryProps['virtualization']
|
|
62
70
|
}
|
|
63
71
|
|
|
64
72
|
export type {
|
|
@@ -104,6 +104,7 @@ const SingleSelect = ({
|
|
|
104
104
|
customValueLabel = 'Specify',
|
|
105
105
|
singleSelectGroupPosition,
|
|
106
106
|
allowDeselect = false,
|
|
107
|
+
menuFooter,
|
|
107
108
|
...rest
|
|
108
109
|
}: SingleSelectProps) => {
|
|
109
110
|
const { onFocus, onBlur, ...buttonRest } = rest
|
|
@@ -298,6 +299,7 @@ const SingleSelect = ({
|
|
|
298
299
|
allowCustomValue={allowCustomValue}
|
|
299
300
|
customValueLabel={customValueLabel}
|
|
300
301
|
menuId={menuId}
|
|
302
|
+
menuFooter={menuFooter}
|
|
301
303
|
trigger={
|
|
302
304
|
customTrigger || (
|
|
303
305
|
<PrimitiveButton
|
|
@@ -447,7 +449,8 @@ const SingleSelect = ({
|
|
|
447
449
|
textAlign="left"
|
|
448
450
|
paddingTop={
|
|
449
451
|
isSmallScreenWithLargeSize &&
|
|
450
|
-
isItemSelected
|
|
452
|
+
isItemSelected &&
|
|
453
|
+
label
|
|
451
454
|
? paddingY * 1.5
|
|
452
455
|
: 0
|
|
453
456
|
}
|