@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,55 @@
|
|
|
1
|
+
export declare enum SelectMenuAlignment {
|
|
2
|
+
START = "start",
|
|
3
|
+
CENTER = "center",
|
|
4
|
+
END = "end"
|
|
5
|
+
}
|
|
6
|
+
export declare enum SelectMenuVariant {
|
|
7
|
+
CONTAINER = "container",
|
|
8
|
+
NO_CONTAINER = "no-container"
|
|
9
|
+
}
|
|
10
|
+
export declare enum SelectMenuSize {
|
|
11
|
+
SMALL = "sm",
|
|
12
|
+
MEDIUM = "md",
|
|
13
|
+
LARGE = "lg"
|
|
14
|
+
}
|
|
15
|
+
export declare enum SelectMenuSide {
|
|
16
|
+
TOP = "top",
|
|
17
|
+
LEFT = "left",
|
|
18
|
+
RIGHT = "right",
|
|
19
|
+
BOTTOM = "bottom"
|
|
20
|
+
}
|
|
21
|
+
export type SelectMenuGroupType = {
|
|
22
|
+
groupLabel?: string;
|
|
23
|
+
items: SelectMenuItemType[];
|
|
24
|
+
showSeparator?: boolean;
|
|
25
|
+
};
|
|
26
|
+
export type SelectMenuProps = {
|
|
27
|
+
trigger?: React.ReactNode;
|
|
28
|
+
items: SelectMenuGroupType[];
|
|
29
|
+
asModal?: boolean;
|
|
30
|
+
alignment?: SelectMenuAlignment;
|
|
31
|
+
side?: SelectMenuSide;
|
|
32
|
+
sideOffset?: number;
|
|
33
|
+
alignOffset?: number;
|
|
34
|
+
collisonBoundaryRef?: Element | null | Array<Element | null>;
|
|
35
|
+
maxHeight?: number;
|
|
36
|
+
selected?: string | string[];
|
|
37
|
+
onSelect?: (value: string | string[]) => void;
|
|
38
|
+
allowMultiSelect?: boolean;
|
|
39
|
+
enableSearch?: boolean;
|
|
40
|
+
onOpenChange?: (open: boolean) => void;
|
|
41
|
+
};
|
|
42
|
+
export type SelectMenuItemType = {
|
|
43
|
+
label: string;
|
|
44
|
+
value: string;
|
|
45
|
+
checked?: boolean;
|
|
46
|
+
subLabel?: string;
|
|
47
|
+
slot1?: React.ReactNode;
|
|
48
|
+
slot2?: React.ReactNode;
|
|
49
|
+
slot3?: React.ReactNode;
|
|
50
|
+
slot4?: React.ReactNode;
|
|
51
|
+
disabled?: boolean;
|
|
52
|
+
onClick?: () => void;
|
|
53
|
+
subMenu?: SelectMenuItemType[];
|
|
54
|
+
};
|
|
55
|
+
export declare const dummyMenuItemsLong: SelectMenuGroupType[];
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { DirectoryData } from '../Directory/types';
|
|
3
|
+
export type SidebarNavItem = {
|
|
4
|
+
label: string;
|
|
5
|
+
leftSlot?: ReactNode;
|
|
6
|
+
rightSlot?: ReactNode;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
};
|
|
9
|
+
export type SidebarNavSection = {
|
|
10
|
+
label?: string;
|
|
11
|
+
navItems: SidebarNavItem[];
|
|
12
|
+
};
|
|
13
|
+
export type MerchantData = {
|
|
14
|
+
label: string;
|
|
15
|
+
sections: SidebarNavSection[];
|
|
16
|
+
};
|
|
17
|
+
export type TenantData = {
|
|
18
|
+
label: string;
|
|
19
|
+
icon: ReactNode;
|
|
20
|
+
merchantData: MerchantData[];
|
|
21
|
+
};
|
|
22
|
+
type TenantInfo = {
|
|
23
|
+
label: string;
|
|
24
|
+
icon: ReactNode;
|
|
25
|
+
id?: string;
|
|
26
|
+
};
|
|
27
|
+
type MerchantInfo = {
|
|
28
|
+
label: string;
|
|
29
|
+
icon: ReactNode;
|
|
30
|
+
id?: string;
|
|
31
|
+
};
|
|
32
|
+
export type SidebarProps = {
|
|
33
|
+
tenants: TenantInfo[];
|
|
34
|
+
merchants: MerchantInfo[];
|
|
35
|
+
children: ReactNode;
|
|
36
|
+
data: DirectoryData[];
|
|
37
|
+
topbar: ReactNode;
|
|
38
|
+
activeTenant?: string;
|
|
39
|
+
setActiveTenant?: (tenant: string) => void;
|
|
40
|
+
activeMerchant?: string;
|
|
41
|
+
setActiveMerchant?: (merchant: string) => void;
|
|
42
|
+
footer?: ReactNode;
|
|
43
|
+
};
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { SingleSelectProps } from './types';
|
|
2
|
+
declare const SingleSelect: ({ label, subLabel, hintText, required, helpIconText, placeholder, size, items, name, variant, disabled, selected, onSelect, enableSearch, slot, useDrawerOnMobile, alignment, side, sideOffset, alignOffset, minWidth, maxWidth, maxHeight, }: SingleSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default SingleSelect;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SelectMenuAlignment, SelectMenuSide, SelectMenuGroupType } from '../Select';
|
|
3
|
+
type SingleSelectMenuProps = {
|
|
4
|
+
items: SelectMenuGroupType[];
|
|
5
|
+
selected: string;
|
|
6
|
+
onSelect: (value: string) => void;
|
|
7
|
+
trigger: React.ReactNode;
|
|
8
|
+
minWidth?: number;
|
|
9
|
+
maxWidth?: number;
|
|
10
|
+
maxHeight?: number;
|
|
11
|
+
enableSearch?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
alignment?: SelectMenuAlignment;
|
|
14
|
+
side?: SelectMenuSide;
|
|
15
|
+
sideOffset?: number;
|
|
16
|
+
alignOffset?: number;
|
|
17
|
+
open: boolean;
|
|
18
|
+
onOpenChange: (open: boolean) => void;
|
|
19
|
+
};
|
|
20
|
+
declare const SingleSelectMenu: ({ items, selected, onSelect, trigger, minWidth, maxWidth, maxHeight, enableSearch, disabled, alignment, side, sideOffset, alignOffset, open, onOpenChange, }: SingleSelectMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export default SingleSelectMenu;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { SelectMenuAlignment, SelectMenuSide, SelectMenuGroupType, SelectMenuSize, SelectMenuVariant } from '../Select';
|
|
2
|
+
export type SingleSelectProps = {
|
|
3
|
+
label: string;
|
|
4
|
+
subLabel?: string;
|
|
5
|
+
hintText?: string;
|
|
6
|
+
required?: boolean;
|
|
7
|
+
helpIconText?: string;
|
|
8
|
+
placeholder: string;
|
|
9
|
+
size?: SelectMenuSize;
|
|
10
|
+
items: SelectMenuGroupType[];
|
|
11
|
+
variant?: SelectMenuVariant;
|
|
12
|
+
selected: string;
|
|
13
|
+
onSelect: (value: string) => void;
|
|
14
|
+
enableSearch?: boolean;
|
|
15
|
+
slot?: React.ReactNode;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
name?: string;
|
|
18
|
+
useDrawerOnMobile?: boolean;
|
|
19
|
+
alignment?: SelectMenuAlignment;
|
|
20
|
+
side?: SelectMenuSide;
|
|
21
|
+
sideOffset?: number;
|
|
22
|
+
alignOffset?: number;
|
|
23
|
+
minWidth?: number;
|
|
24
|
+
maxWidth?: number;
|
|
25
|
+
maxHeight?: number;
|
|
26
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { SliderProps as BaseSliderProps } from './types';
|
|
2
|
+
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
3
|
+
type SliderProps = BaseSliderProps & Omit<React.ComponentProps<typeof SliderPrimitive.Root>, keyof BaseSliderProps>;
|
|
4
|
+
declare const Slider: import('react').ForwardRefExoticComponent<Omit<SliderProps, "ref"> & import('react').RefAttributes<HTMLSpanElement>>;
|
|
5
|
+
export default Slider;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare enum SliderVariant {
|
|
2
|
+
PRIMARY = "primary",
|
|
3
|
+
SECONDARY = "secondary"
|
|
4
|
+
}
|
|
5
|
+
export declare enum SliderSize {
|
|
6
|
+
SMALL = "sm",
|
|
7
|
+
MEDIUM = "md",
|
|
8
|
+
LARGE = "lg"
|
|
9
|
+
}
|
|
10
|
+
export declare enum SliderValueType {
|
|
11
|
+
NUMBER = "number",
|
|
12
|
+
PERCENTAGE = "percentage",
|
|
13
|
+
DECIMAL = "decimal"
|
|
14
|
+
}
|
|
15
|
+
export type SliderValueFormatConfig = {
|
|
16
|
+
type: SliderValueType;
|
|
17
|
+
decimalPlaces?: number;
|
|
18
|
+
prefix?: string;
|
|
19
|
+
suffix?: string;
|
|
20
|
+
showLabels?: boolean;
|
|
21
|
+
formatter?: (value: number) => string;
|
|
22
|
+
};
|
|
23
|
+
export type SliderLabelPosition = 'top' | 'bottom' | 'inline';
|
|
24
|
+
export type SliderProps = {
|
|
25
|
+
variant?: SliderVariant;
|
|
26
|
+
size?: SliderSize;
|
|
27
|
+
valueFormat?: SliderValueFormatConfig;
|
|
28
|
+
showValueLabels?: boolean;
|
|
29
|
+
labelPosition?: SliderLabelPosition;
|
|
30
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SliderVariant, SliderSize, SliderValueType, SliderValueFormatConfig } from './types';
|
|
3
|
+
type SliderCSSProperties = React.CSSProperties & {
|
|
4
|
+
'&:hover'?: {
|
|
5
|
+
boxShadow?: string;
|
|
6
|
+
};
|
|
7
|
+
'&:focus'?: {
|
|
8
|
+
outline?: string;
|
|
9
|
+
boxShadow?: string;
|
|
10
|
+
};
|
|
11
|
+
'&:active'?: {
|
|
12
|
+
cursor?: string;
|
|
13
|
+
};
|
|
14
|
+
'&:disabled'?: {
|
|
15
|
+
cursor?: string;
|
|
16
|
+
opacity?: string | number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
interface SliderTokenStyles {
|
|
20
|
+
root: SliderCSSProperties;
|
|
21
|
+
track: SliderCSSProperties;
|
|
22
|
+
range: SliderCSSProperties;
|
|
23
|
+
thumb: SliderCSSProperties;
|
|
24
|
+
}
|
|
25
|
+
export declare const getSliderTokenStyles: (variant: SliderVariant, size: SliderSize) => SliderTokenStyles;
|
|
26
|
+
/**
|
|
27
|
+
* Formats a slider value according to the specified format configuration
|
|
28
|
+
*/
|
|
29
|
+
export declare const formatSliderValue: (value: number, format?: SliderValueFormatConfig) => string;
|
|
30
|
+
/**
|
|
31
|
+
* Parse a formatted string value back to a number
|
|
32
|
+
*/
|
|
33
|
+
export declare const parseSliderValue: (formattedValue: string, format?: SliderValueFormatConfig) => number;
|
|
34
|
+
export declare const createSliderRange: (min: number, max: number, step: number, initialStart: number, initialEnd: number, type: SliderValueType, options?: {
|
|
35
|
+
prefix?: string;
|
|
36
|
+
suffix?: string;
|
|
37
|
+
decimalPlaces?: number;
|
|
38
|
+
}) => {
|
|
39
|
+
min: number;
|
|
40
|
+
max: number;
|
|
41
|
+
step: number;
|
|
42
|
+
defaultValue: number[];
|
|
43
|
+
valueFormat: SliderValueFormatConfig;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Get label styles for value display
|
|
47
|
+
*/
|
|
48
|
+
export declare const getSliderLabelStyles: (position?: "top" | "bottom" | "inline") => SliderCSSProperties;
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { VariantType } from '../Text/Text';
|
|
3
|
+
export type SnackbarTokens = Readonly<{
|
|
4
|
+
icon: {
|
|
5
|
+
color: {
|
|
6
|
+
info: CSSObject['color'];
|
|
7
|
+
success: CSSObject['color'];
|
|
8
|
+
warning: CSSObject['color'];
|
|
9
|
+
error: CSSObject['color'];
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
container: {
|
|
13
|
+
backgroundColor: CSSObject['color'];
|
|
14
|
+
borderRadius: CSSObject['borderRadius'];
|
|
15
|
+
padding: CSSObject['padding'];
|
|
16
|
+
minWidth: CSSObject['minWidth'];
|
|
17
|
+
maxWidth: CSSObject['maxWidth'];
|
|
18
|
+
boxShadow: CSSObject['boxShadow'];
|
|
19
|
+
};
|
|
20
|
+
header: {
|
|
21
|
+
layout: {
|
|
22
|
+
gap: CSSObject['gap'];
|
|
23
|
+
marginBottom: CSSObject['marginBottom'];
|
|
24
|
+
iconGap: CSSObject['gap'];
|
|
25
|
+
};
|
|
26
|
+
text: {
|
|
27
|
+
color: CSSObject['color'];
|
|
28
|
+
variant: VariantType;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
description: {
|
|
32
|
+
layout: {
|
|
33
|
+
paddingLeft: CSSObject['paddingLeft'];
|
|
34
|
+
gap: CSSObject['gap'];
|
|
35
|
+
};
|
|
36
|
+
text: {
|
|
37
|
+
color: CSSObject['color'];
|
|
38
|
+
variant: VariantType;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
actionButton: {
|
|
42
|
+
layout: {
|
|
43
|
+
paddingX: CSSObject['padding'];
|
|
44
|
+
};
|
|
45
|
+
text: {
|
|
46
|
+
color: CSSObject['color'];
|
|
47
|
+
variant: VariantType;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
}>;
|
|
51
|
+
declare const snackbarTokens: SnackbarTokens;
|
|
52
|
+
export default snackbarTokens;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare enum SnackbarVariant {
|
|
2
|
+
INFO = "info",
|
|
3
|
+
SUCCESS = "success",
|
|
4
|
+
WARNING = "warning",
|
|
5
|
+
ERROR = "error"
|
|
6
|
+
}
|
|
7
|
+
export type AddToastOptions = {
|
|
8
|
+
header: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
variant?: SnackbarVariant;
|
|
11
|
+
onClose?: () => void;
|
|
12
|
+
actionButton?: {
|
|
13
|
+
label: string;
|
|
14
|
+
onClick: () => void;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export type CustomToastProps = {
|
|
18
|
+
header: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
variant: SnackbarVariant;
|
|
21
|
+
onClose?: () => void;
|
|
22
|
+
actionButton?: {
|
|
23
|
+
label: string;
|
|
24
|
+
onClick: () => void;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TagColor, TagProps, TagShape, TagSize, TagVariant } from '../Tags';
|
|
3
|
+
export type TagConfig = {
|
|
4
|
+
text: string;
|
|
5
|
+
variant?: TagVariant;
|
|
6
|
+
style?: TagColor;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
};
|
|
9
|
+
export type SplitTagProps = {
|
|
10
|
+
primaryTag: Omit<TagProps, 'splitTagPosition' | 'size' | 'shape'>;
|
|
11
|
+
secondaryTag?: Omit<TagProps, 'splitTagPosition' | 'size' | 'shape'>;
|
|
12
|
+
leadingSlot?: ReactNode;
|
|
13
|
+
trailingSlot?: ReactNode;
|
|
14
|
+
size?: TagSize;
|
|
15
|
+
shape?: TagShape;
|
|
16
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { StatCardProps } from './types';
|
|
2
|
+
declare const StatCard: {
|
|
3
|
+
({ title, value, change, subtitle, variant, chartData, progressValue, titleIcon, actionIcon, helpIconText, }: StatCardProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
6
|
+
export default StatCard;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { StatCardVariant } from './types';
|
|
3
|
+
import { FoundationTokenType } from '../../tokens/theme.token';
|
|
4
|
+
export type StatCardState = 'default' | 'hover' | 'loading';
|
|
5
|
+
export type StatCardTokenType = {
|
|
6
|
+
height: CSSObject['height'];
|
|
7
|
+
border: {
|
|
8
|
+
[key in StatCardState]?: CSSObject['border'];
|
|
9
|
+
};
|
|
10
|
+
borderRadius: CSSObject['borderRadius'];
|
|
11
|
+
backgroundColor: {
|
|
12
|
+
[key in StatCardState]?: CSSObject['backgroundColor'];
|
|
13
|
+
};
|
|
14
|
+
boxShadow: CSSObject['boxShadow'];
|
|
15
|
+
padding: CSSObject['padding'];
|
|
16
|
+
gap: CSSObject['gap'];
|
|
17
|
+
header: {
|
|
18
|
+
gap: CSSObject['gap'];
|
|
19
|
+
titleIcon: {
|
|
20
|
+
width: CSSObject['width'];
|
|
21
|
+
height: CSSObject['height'];
|
|
22
|
+
marginBottom: CSSObject['marginBottom'];
|
|
23
|
+
};
|
|
24
|
+
title: {
|
|
25
|
+
[key in StatCardVariant]: {
|
|
26
|
+
fontSize: CSSObject['fontSize'];
|
|
27
|
+
fontWeight: CSSObject['fontWeight'];
|
|
28
|
+
color: CSSObject['color'];
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
helpIcon: {
|
|
32
|
+
width: CSSObject['width'];
|
|
33
|
+
height: CSSObject['height'];
|
|
34
|
+
color: CSSObject['color'];
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
headerStatGap: {
|
|
38
|
+
gap: CSSObject['gap'];
|
|
39
|
+
};
|
|
40
|
+
stats: {
|
|
41
|
+
gap: CSSObject['gap'];
|
|
42
|
+
value: {
|
|
43
|
+
[key in StatCardVariant]: {
|
|
44
|
+
fontSize: CSSObject['fontSize'];
|
|
45
|
+
fontWeight: CSSObject['fontWeight'];
|
|
46
|
+
color: CSSObject['color'];
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
change: {
|
|
50
|
+
marginLeft: CSSObject['marginLeft'];
|
|
51
|
+
arrow: {
|
|
52
|
+
width: CSSObject['width'];
|
|
53
|
+
height: CSSObject['height'];
|
|
54
|
+
marginRight: CSSObject['marginRight'];
|
|
55
|
+
};
|
|
56
|
+
text: {
|
|
57
|
+
fontSize: CSSObject['fontSize'];
|
|
58
|
+
fontWeight: CSSObject['fontWeight'];
|
|
59
|
+
increase: {
|
|
60
|
+
color: CSSObject['color'];
|
|
61
|
+
};
|
|
62
|
+
decrease: {
|
|
63
|
+
color: CSSObject['color'];
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
subtitle: {
|
|
68
|
+
[key in StatCardVariant]: {
|
|
69
|
+
fontSize: CSSObject['fontSize'];
|
|
70
|
+
fontWeight: CSSObject['fontWeight'];
|
|
71
|
+
color: CSSObject['color'];
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
chart: {
|
|
76
|
+
height: CSSObject['height'];
|
|
77
|
+
colors: {
|
|
78
|
+
line: {
|
|
79
|
+
increase: CSSObject['color'];
|
|
80
|
+
decrease: CSSObject['color'];
|
|
81
|
+
};
|
|
82
|
+
area: {
|
|
83
|
+
increase: CSSObject['color'];
|
|
84
|
+
decrease: CSSObject['color'];
|
|
85
|
+
};
|
|
86
|
+
gradient: {
|
|
87
|
+
end: CSSObject['color'];
|
|
88
|
+
startOpacity: number;
|
|
89
|
+
endOpacity: number;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
line: {
|
|
93
|
+
strokeWidth: CSSObject['strokeWidth'];
|
|
94
|
+
activeDot: {
|
|
95
|
+
radius: number;
|
|
96
|
+
fill: CSSObject['fill'];
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
bar: {
|
|
100
|
+
radius: number[];
|
|
101
|
+
fill: CSSObject['fill'];
|
|
102
|
+
activeBar: {
|
|
103
|
+
fill: CSSObject['fill'];
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
progressBar: {
|
|
107
|
+
height: CSSObject['height'];
|
|
108
|
+
borderRadius: CSSObject['borderRadius'];
|
|
109
|
+
gap: CSSObject['gap'];
|
|
110
|
+
background: {
|
|
111
|
+
fill: CSSObject['backgroundColor'];
|
|
112
|
+
empty: CSSObject['backgroundColor'];
|
|
113
|
+
pattern: {
|
|
114
|
+
color: CSSObject['color'];
|
|
115
|
+
size: CSSObject['backgroundSize'];
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
label: {
|
|
119
|
+
fontSize: CSSObject['fontSize'];
|
|
120
|
+
fontWeight: CSSObject['fontWeight'];
|
|
121
|
+
color: CSSObject['color'];
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
tooltip: {
|
|
125
|
+
cursor: {
|
|
126
|
+
strokeDasharray: string;
|
|
127
|
+
stroke: CSSObject['stroke'];
|
|
128
|
+
};
|
|
129
|
+
container: {
|
|
130
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
131
|
+
padding: CSSObject['padding'];
|
|
132
|
+
borderRadius: CSSObject['borderRadius'];
|
|
133
|
+
};
|
|
134
|
+
text: {
|
|
135
|
+
color: CSSObject['color'];
|
|
136
|
+
};
|
|
137
|
+
bar: {
|
|
138
|
+
cursor: {
|
|
139
|
+
fill: CSSObject['fill'];
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
export declare const getStatCardToken: (foundationToken: FoundationTokenType) => StatCardTokenType;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare enum StatCardVariant {
|
|
3
|
+
LINE = "line",
|
|
4
|
+
PROGRESS_BAR = "progress",
|
|
5
|
+
BAR = "bar",
|
|
6
|
+
NUMBER = "number"
|
|
7
|
+
}
|
|
8
|
+
export declare enum ChangeType {
|
|
9
|
+
INCREASE = "increase",
|
|
10
|
+
DECREASE = "decrease"
|
|
11
|
+
}
|
|
12
|
+
export type ChartDataPoint = {
|
|
13
|
+
value: number;
|
|
14
|
+
label: string;
|
|
15
|
+
date?: string;
|
|
16
|
+
};
|
|
17
|
+
export type StatCardChange = {
|
|
18
|
+
value: number;
|
|
19
|
+
type: ChangeType;
|
|
20
|
+
};
|
|
21
|
+
export type StatCardProps = {
|
|
22
|
+
title: string;
|
|
23
|
+
value: string | number;
|
|
24
|
+
change?: StatCardChange;
|
|
25
|
+
subtitle?: string;
|
|
26
|
+
variant: StatCardVariant;
|
|
27
|
+
chartData?: ChartDataPoint[];
|
|
28
|
+
progressValue?: number;
|
|
29
|
+
titleIcon?: ReactNode;
|
|
30
|
+
actionIcon?: ReactNode;
|
|
31
|
+
helpIconText?: string;
|
|
32
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SwitchSize } from './types';
|
|
2
|
+
export declare const StyledSwitchRoot: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
3
|
+
size: SwitchSize;
|
|
4
|
+
$isDisabled: boolean;
|
|
5
|
+
$isChecked: boolean;
|
|
6
|
+
$error?: boolean;
|
|
7
|
+
}>> & string;
|
|
8
|
+
export declare const StyledSwitchThumb: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
9
|
+
size: SwitchSize;
|
|
10
|
+
$isChecked: boolean;
|
|
11
|
+
}>> & string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { SwitchProps } from './types';
|
|
2
|
+
export declare const Switch: {
|
|
3
|
+
({ id, checked, defaultChecked, onChange, disabled, required, error, size, label, subtext, slot, name, value, ...rest }: SwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|