@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,3 @@
|
|
|
1
|
+
import { MultiSelectMenuProps } from './types';
|
|
2
|
+
declare const MultiSelectMenu: ({ items, selected, onSelect, trigger, minWidth, maxWidth, maxHeight, disabled, enableSearch, searchPlaceholder, enableSelectAll, selectAllText, onSelectAll, alignment, side, sideOffset, alignOffset, open, onOpenChange, }: MultiSelectMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default MultiSelectMenu;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MultiSelectMenuItemType } from './types';
|
|
2
|
+
declare const MultiSelectMenuItem: {
|
|
3
|
+
({ item, onSelect, selected, }: {
|
|
4
|
+
item: MultiSelectMenuItemType;
|
|
5
|
+
onSelect: (value: string) => void;
|
|
6
|
+
selected: string[];
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
displayName: string;
|
|
9
|
+
};
|
|
10
|
+
export default MultiSelectMenuItem;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MultiSelectMenuItemType } from './types';
|
|
2
|
+
declare const MultiSelectSubMenu: {
|
|
3
|
+
({ item, onSelect, selected, }: {
|
|
4
|
+
item: MultiSelectMenuItemType;
|
|
5
|
+
onSelect: (value: string) => void;
|
|
6
|
+
selected: string[];
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
displayName: string;
|
|
9
|
+
};
|
|
10
|
+
export default MultiSelectSubMenu;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const SelectAllItem: ({ selected, availableValues, onSelectAll, selectAllText, disabled, }: {
|
|
2
|
+
selected: string[];
|
|
3
|
+
availableValues: string[];
|
|
4
|
+
onSelectAll: (selectAll: boolean) => void;
|
|
5
|
+
selectAllText: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default SelectAllItem;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { MultiSelectMenuSize, MultiSelectSelectionTagType, MultiSelectVariant } from './types';
|
|
3
|
+
import { FoundationTokenType } from '../../tokens/theme.token';
|
|
4
|
+
type TriggerStates = 'open' | 'closed' | 'hover' | 'focus';
|
|
5
|
+
export type SingleSelectItemStates = 'default' | 'hover' | 'active' | 'focus' | 'focusVisible' | 'disabled' | 'selected';
|
|
6
|
+
export type MultiSelectTokensType = {
|
|
7
|
+
trigger: {
|
|
8
|
+
padding: {
|
|
9
|
+
[key in MultiSelectMenuSize]: CSSObject['padding'];
|
|
10
|
+
};
|
|
11
|
+
borderRadius: {
|
|
12
|
+
[key in MultiSelectMenuSize]: CSSObject['borderRadius'];
|
|
13
|
+
};
|
|
14
|
+
boxShadow: {
|
|
15
|
+
[key in MultiSelectVariant]: CSSObject['boxShadow'];
|
|
16
|
+
};
|
|
17
|
+
backgroundColor: {
|
|
18
|
+
container: {
|
|
19
|
+
[key in TriggerStates]: CSSObject['backgroundColor'];
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
outline: {
|
|
23
|
+
[key in MultiSelectVariant]: {
|
|
24
|
+
[key in TriggerStates]: CSSObject['outline'];
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
selectionTag: {
|
|
28
|
+
container: {
|
|
29
|
+
[key in MultiSelectSelectionTagType]: {
|
|
30
|
+
color: CSSObject['color'];
|
|
31
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
32
|
+
fontWeight: CSSObject['fontWeight'];
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
dropdown: {
|
|
38
|
+
shadow: CSSObject['boxShadow'];
|
|
39
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
40
|
+
paddingTop: CSSObject['paddingTop'];
|
|
41
|
+
paddingBottom: CSSObject['paddingBottom'];
|
|
42
|
+
border: CSSObject['border'];
|
|
43
|
+
outline: CSSObject['outline'];
|
|
44
|
+
borderRadius: CSSObject['borderRadius'];
|
|
45
|
+
item: {
|
|
46
|
+
padding: CSSObject['padding'];
|
|
47
|
+
margin: CSSObject['margin'];
|
|
48
|
+
borderRadius: CSSObject['borderRadius'];
|
|
49
|
+
gap: CSSObject['gap'];
|
|
50
|
+
backgroundColor: {
|
|
51
|
+
[key in SingleSelectItemStates]: CSSObject['backgroundColor'];
|
|
52
|
+
};
|
|
53
|
+
label: {
|
|
54
|
+
fontSize: CSSObject['fontSize'];
|
|
55
|
+
fontWeight: CSSObject['fontWeight'];
|
|
56
|
+
color: {
|
|
57
|
+
[key in SingleSelectItemStates]: CSSObject['color'];
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
subLabel: {
|
|
61
|
+
fontSize: CSSObject['fontSize'];
|
|
62
|
+
fontWeight: CSSObject['fontWeight'];
|
|
63
|
+
color: {
|
|
64
|
+
[key in SingleSelectItemStates]: CSSObject['color'];
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
seperator: {
|
|
69
|
+
color: CSSObject['color'];
|
|
70
|
+
height: CSSObject['height'];
|
|
71
|
+
margin: CSSObject['margin'];
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
export declare const multiSelectTokens: MultiSelectTokensType;
|
|
76
|
+
export declare const getMultiSelectTokens: (foundationToken: FoundationTokenType) => MultiSelectTokensType;
|
|
77
|
+
export {};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export declare enum MultiSelectVariant {
|
|
2
|
+
CONTAINER = "container",
|
|
3
|
+
NO_CONTAINER = "no-container"
|
|
4
|
+
}
|
|
5
|
+
export declare enum MultiSelectMenuAlignment {
|
|
6
|
+
START = "start",
|
|
7
|
+
CENTER = "center",
|
|
8
|
+
END = "end"
|
|
9
|
+
}
|
|
10
|
+
export declare enum MultiSelectMenuSide {
|
|
11
|
+
TOP = "top",
|
|
12
|
+
LEFT = "left",
|
|
13
|
+
RIGHT = "right",
|
|
14
|
+
BOTTOM = "bottom"
|
|
15
|
+
}
|
|
16
|
+
export declare enum MultiSelectMenuSize {
|
|
17
|
+
SMALL = "sm",
|
|
18
|
+
MEDIUM = "md",
|
|
19
|
+
LARGE = "lg"
|
|
20
|
+
}
|
|
21
|
+
export declare enum MultiSelectSelectionTagType {
|
|
22
|
+
COUNT = "count",
|
|
23
|
+
TEXT = "text"
|
|
24
|
+
}
|
|
25
|
+
export type MultiSelectMenuItemType = {
|
|
26
|
+
label: string;
|
|
27
|
+
value: string;
|
|
28
|
+
checked?: boolean;
|
|
29
|
+
subLabel?: string;
|
|
30
|
+
slot1?: React.ReactNode;
|
|
31
|
+
slot2?: React.ReactNode;
|
|
32
|
+
slot3?: React.ReactNode;
|
|
33
|
+
slot4?: React.ReactNode;
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
onClick?: () => void;
|
|
36
|
+
subMenu?: MultiSelectMenuItemType[];
|
|
37
|
+
};
|
|
38
|
+
export type MultiSelectMenuGroupType = {
|
|
39
|
+
groupLabel?: string;
|
|
40
|
+
items: MultiSelectMenuItemType[];
|
|
41
|
+
showSeparator?: boolean;
|
|
42
|
+
};
|
|
43
|
+
export type MultiSelectProps = {
|
|
44
|
+
selectedValues: string[];
|
|
45
|
+
onChange: (selectedValue: string) => void;
|
|
46
|
+
items: MultiSelectMenuGroupType[];
|
|
47
|
+
label: string;
|
|
48
|
+
sublabel?: string;
|
|
49
|
+
disabled?: boolean;
|
|
50
|
+
helpIconHintText?: string;
|
|
51
|
+
name?: string;
|
|
52
|
+
required?: boolean;
|
|
53
|
+
variant?: MultiSelectVariant;
|
|
54
|
+
selectionTagType?: MultiSelectSelectionTagType;
|
|
55
|
+
slot?: React.ReactNode;
|
|
56
|
+
hintText?: string;
|
|
57
|
+
placeholder: string;
|
|
58
|
+
size?: MultiSelectMenuSize;
|
|
59
|
+
enableSearch?: boolean;
|
|
60
|
+
searchPlaceholder?: string;
|
|
61
|
+
enableSelectAll?: boolean;
|
|
62
|
+
selectAllText?: string;
|
|
63
|
+
useDrawerOnMobile?: boolean;
|
|
64
|
+
minWidth?: number;
|
|
65
|
+
maxWidth?: number;
|
|
66
|
+
maxHeight?: number;
|
|
67
|
+
alignment?: MultiSelectMenuAlignment;
|
|
68
|
+
side?: MultiSelectMenuSide;
|
|
69
|
+
sideOffset?: number;
|
|
70
|
+
alignOffset?: number;
|
|
71
|
+
};
|
|
72
|
+
export type MultiSelectMenuProps = {
|
|
73
|
+
items: MultiSelectMenuGroupType[];
|
|
74
|
+
selected: string[];
|
|
75
|
+
onSelect: (value: string) => void;
|
|
76
|
+
trigger: React.ReactNode;
|
|
77
|
+
minWidth?: number;
|
|
78
|
+
maxWidth?: number;
|
|
79
|
+
maxHeight?: number;
|
|
80
|
+
disabled?: boolean;
|
|
81
|
+
enableSearch?: boolean;
|
|
82
|
+
searchPlaceholder?: string;
|
|
83
|
+
enableSelectAll?: boolean;
|
|
84
|
+
selectAllText?: string;
|
|
85
|
+
onSelectAll?: (selectAll: boolean) => void;
|
|
86
|
+
alignment?: MultiSelectMenuAlignment;
|
|
87
|
+
side?: MultiSelectMenuSide;
|
|
88
|
+
sideOffset?: number;
|
|
89
|
+
alignOffset?: number;
|
|
90
|
+
open: boolean;
|
|
91
|
+
onOpenChange: (open: boolean) => void;
|
|
92
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MultiSelectMenuGroupType, MultiSelectMenuItemType } from './types';
|
|
2
|
+
export declare const getSelectAllState: (selected: string[], availableValues: string[]) => {
|
|
3
|
+
allSelected: boolean;
|
|
4
|
+
someSelected: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const map: (groups: MultiSelectMenuGroupType[]) => Record<string, string>;
|
|
7
|
+
export declare const getAllValues: (groups: MultiSelectMenuGroupType[]) => string[];
|
|
8
|
+
export declare const handleSelectAll: (selectAll: boolean, items: MultiSelectMenuGroupType[], selectedValues: string[], onChange: (value: string) => void) => void;
|
|
9
|
+
export declare const filterMenuItem: (item: MultiSelectMenuItemType, lower: string) => MultiSelectMenuItemType | null;
|
|
10
|
+
export declare const getAllAvailableValues: (groups: MultiSelectMenuGroupType[]) => string[];
|
|
11
|
+
export declare const filterMenuGroups: (groups: MultiSelectMenuGroupType[], searchText: string) => MultiSelectMenuGroupType[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PopoverProps } from './types';
|
|
2
|
+
declare const Popover: {
|
|
3
|
+
({ heading, description, trigger, children, showCloseButton, onOpenChange, open, asModal, primaryAction, secondaryAction, sideOffset, side, align, alignOffset, width, minWidth, maxWidth, height, minHeight, maxHeight, zIndex, size, onClose, }: PopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
6
|
+
export default Popover;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PopoverProps } from './types';
|
|
2
|
+
declare const PopoverFooter: {
|
|
3
|
+
({ primaryAction, secondaryAction, }: Pick<PopoverProps, "primaryAction" | "secondaryAction">): import("react/jsx-runtime").JSX.Element | null;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
6
|
+
export default PopoverFooter;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PopoverProps } from './types';
|
|
2
|
+
declare const PopoverHeader: {
|
|
3
|
+
({ heading, description, showCloseButton, onClose, size, }: Pick<PopoverProps, "heading" | "description" | "showCloseButton" | "size" | "onClose">): import("react/jsx-runtime").JSX.Element | null;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
6
|
+
export default PopoverHeader;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { PopoverSize } from './types';
|
|
3
|
+
import { FoundationTokenType } from '../../tokens/theme.token';
|
|
4
|
+
export type PopoverTokenType = {
|
|
5
|
+
background: CSSObject['backgroundColor'];
|
|
6
|
+
border: CSSObject['border'];
|
|
7
|
+
shadow: CSSObject['boxShadow'];
|
|
8
|
+
gap: CSSObject['gap'];
|
|
9
|
+
zIndex: CSSObject['zIndex'];
|
|
10
|
+
borderRadius: CSSObject['borderRadius'];
|
|
11
|
+
headerContainer: {
|
|
12
|
+
heading: {
|
|
13
|
+
fontSize: {
|
|
14
|
+
[key in PopoverSize]: CSSObject['fontSize'];
|
|
15
|
+
};
|
|
16
|
+
fontWeight: {
|
|
17
|
+
[key in PopoverSize]: CSSObject['fontWeight'];
|
|
18
|
+
};
|
|
19
|
+
color: {
|
|
20
|
+
[key in PopoverSize]: CSSObject['color'];
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
description: {
|
|
24
|
+
fontSize: {
|
|
25
|
+
[key in PopoverSize]: CSSObject['fontSize'];
|
|
26
|
+
};
|
|
27
|
+
color: {
|
|
28
|
+
[key in PopoverSize]: CSSObject['color'];
|
|
29
|
+
};
|
|
30
|
+
fontWeight: {
|
|
31
|
+
[key in PopoverSize]: CSSObject['fontWeight'];
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
footer: {
|
|
36
|
+
justifyContent: CSSObject['justifyContent'];
|
|
37
|
+
gap: CSSObject['gap'];
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export declare const getPopoverTokens: (foundationTokens: FoundationTokenType) => PopoverTokenType;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ButtonV2Props } from '../Button';
|
|
2
|
+
export type PopoverActionType = Omit<ButtonV2Props, 'buttonGroupPosition' | 'subType'>;
|
|
3
|
+
export declare enum PopoverSize {
|
|
4
|
+
SMALL = "small",
|
|
5
|
+
MEDIUM = "medium"
|
|
6
|
+
}
|
|
7
|
+
export type PopoverProps = {
|
|
8
|
+
heading?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
trigger: React.ReactNode;
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
showCloseButton?: boolean;
|
|
13
|
+
onOpenChange?: (open: boolean) => void;
|
|
14
|
+
open?: boolean;
|
|
15
|
+
asModal?: boolean;
|
|
16
|
+
primaryAction?: PopoverActionType;
|
|
17
|
+
secondaryAction?: PopoverActionType;
|
|
18
|
+
sideOffset?: number;
|
|
19
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
20
|
+
align?: 'start' | 'center' | 'end';
|
|
21
|
+
alignOffset?: number;
|
|
22
|
+
width?: number;
|
|
23
|
+
minWidth?: number;
|
|
24
|
+
maxWidth?: number;
|
|
25
|
+
height?: number;
|
|
26
|
+
minHeight?: number;
|
|
27
|
+
maxHeight?: number;
|
|
28
|
+
zIndex?: number;
|
|
29
|
+
size?: PopoverSize;
|
|
30
|
+
onClose?: () => void;
|
|
31
|
+
};
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { default as React, JSX } from 'react';
|
|
2
|
+
import { CSSObject } from 'styled-components';
|
|
3
|
+
type SpacingValue = string | number;
|
|
4
|
+
type StateStyles = {
|
|
5
|
+
_hover?: StyledBlockProps;
|
|
6
|
+
_focus?: StyledBlockProps;
|
|
7
|
+
_active?: StyledBlockProps;
|
|
8
|
+
_disabled?: StyledBlockProps;
|
|
9
|
+
_visited?: StyledBlockProps;
|
|
10
|
+
_focusVisible?: StyledBlockProps;
|
|
11
|
+
};
|
|
12
|
+
type StyledBlockProps = StateStyles & {
|
|
13
|
+
color?: CSSObject['color'];
|
|
14
|
+
position?: CSSObject['position'];
|
|
15
|
+
inset?: CSSObject['inset'];
|
|
16
|
+
top?: CSSObject['top'];
|
|
17
|
+
right?: CSSObject['right'];
|
|
18
|
+
bottom?: CSSObject['bottom'];
|
|
19
|
+
left?: CSSObject['left'];
|
|
20
|
+
zIndex?: CSSObject['zIndex'];
|
|
21
|
+
pointerEvents?: CSSObject['pointerEvents'];
|
|
22
|
+
opacity?: CSSObject['opacity'];
|
|
23
|
+
padding?: SpacingValue;
|
|
24
|
+
paddingTop?: SpacingValue;
|
|
25
|
+
paddingBottom?: SpacingValue;
|
|
26
|
+
paddingLeft?: SpacingValue;
|
|
27
|
+
paddingRight?: SpacingValue;
|
|
28
|
+
paddingX?: SpacingValue;
|
|
29
|
+
paddingY?: SpacingValue;
|
|
30
|
+
margin?: SpacingValue;
|
|
31
|
+
marginTop?: SpacingValue;
|
|
32
|
+
marginBottom?: SpacingValue;
|
|
33
|
+
marginLeft?: SpacingValue;
|
|
34
|
+
marginRight?: SpacingValue;
|
|
35
|
+
marginX?: SpacingValue;
|
|
36
|
+
marginY?: SpacingValue;
|
|
37
|
+
display?: CSSObject['display'];
|
|
38
|
+
flexDirection?: CSSObject['flexDirection'];
|
|
39
|
+
justifyContent?: CSSObject['justifyContent'];
|
|
40
|
+
alignItems?: CSSObject['alignItems'];
|
|
41
|
+
flexWrap?: CSSObject['flexWrap'];
|
|
42
|
+
flexGrow?: CSSObject['flexGrow'];
|
|
43
|
+
flexShrink?: CSSObject['flexShrink'];
|
|
44
|
+
flexBasis?: CSSObject['flexBasis'];
|
|
45
|
+
gap?: CSSObject['gap'];
|
|
46
|
+
rowGap?: CSSObject['rowGap'];
|
|
47
|
+
columnGap?: CSSObject['columnGap'];
|
|
48
|
+
alignContent?: CSSObject['alignContent'];
|
|
49
|
+
alignSelf?: CSSObject['alignSelf'];
|
|
50
|
+
justifySelf?: CSSObject['justifySelf'];
|
|
51
|
+
borderRadius?: CSSObject['borderRadius'];
|
|
52
|
+
borderTopLeftRadius?: CSSObject['borderTopLeftRadius'];
|
|
53
|
+
borderTopRightRadius?: CSSObject['borderTopRightRadius'];
|
|
54
|
+
borderBottomLeftRadius?: CSSObject['borderBottomLeftRadius'];
|
|
55
|
+
borderBottomRightRadius?: CSSObject['borderBottomRightRadius'];
|
|
56
|
+
outline?: CSSObject['outline'];
|
|
57
|
+
outlineColor?: CSSObject['outlineColor'];
|
|
58
|
+
outlineWidth?: CSSObject['outlineWidth'];
|
|
59
|
+
outlineStyle?: CSSObject['outlineStyle'];
|
|
60
|
+
outlineOffset?: CSSObject['outlineOffset'];
|
|
61
|
+
width?: CSSObject['width'];
|
|
62
|
+
height?: CSSObject['height'];
|
|
63
|
+
minWidth?: CSSObject['minWidth'];
|
|
64
|
+
minHeight?: CSSObject['minHeight'];
|
|
65
|
+
maxWidth?: CSSObject['maxWidth'];
|
|
66
|
+
maxHeight?: CSSObject['maxHeight'];
|
|
67
|
+
size?: SpacingValue;
|
|
68
|
+
backgroundColor?: CSSObject['backgroundColor'];
|
|
69
|
+
backgroundImage?: CSSObject['backgroundImage'];
|
|
70
|
+
backgroundSize?: CSSObject['backgroundSize'];
|
|
71
|
+
border?: CSSObject['border'];
|
|
72
|
+
borderTop?: CSSObject['borderTop'];
|
|
73
|
+
borderBottom?: CSSObject['borderBottom'];
|
|
74
|
+
borderLeft?: CSSObject['borderLeft'];
|
|
75
|
+
borderRight?: CSSObject['borderRight'];
|
|
76
|
+
boxShadow?: CSSObject['boxShadow'];
|
|
77
|
+
overflow?: CSSObject['overflow'];
|
|
78
|
+
overflowX?: CSSObject['overflowX'];
|
|
79
|
+
overflowY?: CSSObject['overflowY'];
|
|
80
|
+
whiteSpace?: CSSObject['whiteSpace'];
|
|
81
|
+
transition?: CSSObject['transition'];
|
|
82
|
+
contentCentered?: boolean;
|
|
83
|
+
cursor?: CSSObject['cursor'];
|
|
84
|
+
fontSize?: CSSObject['fontSize'];
|
|
85
|
+
fontWeight?: CSSObject['fontWeight'];
|
|
86
|
+
lineHeight?: CSSObject['lineHeight'];
|
|
87
|
+
letterSpacing?: CSSObject['letterSpacing'];
|
|
88
|
+
textAlign?: CSSObject['textAlign'];
|
|
89
|
+
textTransform?: CSSObject['textTransform'];
|
|
90
|
+
textOverflow?: CSSObject['textOverflow'];
|
|
91
|
+
};
|
|
92
|
+
type SemanticTagType = keyof Pick<JSX.IntrinsicElements, 'div' | 'section' | 'article' | 'header' | 'footer' | 'main' | 'span' | 'nav' | 'hr'>;
|
|
93
|
+
export type BlockProps = StyledBlockProps & Omit<React.HTMLAttributes<HTMLElement>, 'as' | 'color'> & {
|
|
94
|
+
children?: React.ReactNode;
|
|
95
|
+
as?: SemanticTagType;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Block Component
|
|
99
|
+
* @description
|
|
100
|
+
* The Block component is a primitive component that renders a styled div element.
|
|
101
|
+
* It is used to create consistent spacing and layout patterns across the application.
|
|
102
|
+
*
|
|
103
|
+
* @todo
|
|
104
|
+
* - Add support for focus-visible outline
|
|
105
|
+
*/
|
|
106
|
+
declare const Block: React.ForwardRefExoticComponent<StateStyles & {
|
|
107
|
+
color?: CSSObject["color"];
|
|
108
|
+
position?: CSSObject["position"];
|
|
109
|
+
inset?: CSSObject["inset"];
|
|
110
|
+
top?: CSSObject["top"];
|
|
111
|
+
right?: CSSObject["right"];
|
|
112
|
+
bottom?: CSSObject["bottom"];
|
|
113
|
+
left?: CSSObject["left"];
|
|
114
|
+
zIndex?: CSSObject["zIndex"];
|
|
115
|
+
pointerEvents?: CSSObject["pointerEvents"];
|
|
116
|
+
opacity?: CSSObject["opacity"];
|
|
117
|
+
padding?: SpacingValue;
|
|
118
|
+
paddingTop?: SpacingValue;
|
|
119
|
+
paddingBottom?: SpacingValue;
|
|
120
|
+
paddingLeft?: SpacingValue;
|
|
121
|
+
paddingRight?: SpacingValue;
|
|
122
|
+
paddingX?: SpacingValue;
|
|
123
|
+
paddingY?: SpacingValue;
|
|
124
|
+
margin?: SpacingValue;
|
|
125
|
+
marginTop?: SpacingValue;
|
|
126
|
+
marginBottom?: SpacingValue;
|
|
127
|
+
marginLeft?: SpacingValue;
|
|
128
|
+
marginRight?: SpacingValue;
|
|
129
|
+
marginX?: SpacingValue;
|
|
130
|
+
marginY?: SpacingValue;
|
|
131
|
+
display?: CSSObject["display"];
|
|
132
|
+
flexDirection?: CSSObject["flexDirection"];
|
|
133
|
+
justifyContent?: CSSObject["justifyContent"];
|
|
134
|
+
alignItems?: CSSObject["alignItems"];
|
|
135
|
+
flexWrap?: CSSObject["flexWrap"];
|
|
136
|
+
flexGrow?: CSSObject["flexGrow"];
|
|
137
|
+
flexShrink?: CSSObject["flexShrink"];
|
|
138
|
+
flexBasis?: CSSObject["flexBasis"];
|
|
139
|
+
gap?: CSSObject["gap"];
|
|
140
|
+
rowGap?: CSSObject["rowGap"];
|
|
141
|
+
columnGap?: CSSObject["columnGap"];
|
|
142
|
+
alignContent?: CSSObject["alignContent"];
|
|
143
|
+
alignSelf?: CSSObject["alignSelf"];
|
|
144
|
+
justifySelf?: CSSObject["justifySelf"];
|
|
145
|
+
borderRadius?: CSSObject["borderRadius"];
|
|
146
|
+
borderTopLeftRadius?: CSSObject["borderTopLeftRadius"];
|
|
147
|
+
borderTopRightRadius?: CSSObject["borderTopRightRadius"];
|
|
148
|
+
borderBottomLeftRadius?: CSSObject["borderBottomLeftRadius"];
|
|
149
|
+
borderBottomRightRadius?: CSSObject["borderBottomRightRadius"];
|
|
150
|
+
outline?: CSSObject["outline"];
|
|
151
|
+
outlineColor?: CSSObject["outlineColor"];
|
|
152
|
+
outlineWidth?: CSSObject["outlineWidth"];
|
|
153
|
+
outlineStyle?: CSSObject["outlineStyle"];
|
|
154
|
+
outlineOffset?: CSSObject["outlineOffset"];
|
|
155
|
+
width?: CSSObject["width"];
|
|
156
|
+
height?: CSSObject["height"];
|
|
157
|
+
minWidth?: CSSObject["minWidth"];
|
|
158
|
+
minHeight?: CSSObject["minHeight"];
|
|
159
|
+
maxWidth?: CSSObject["maxWidth"];
|
|
160
|
+
maxHeight?: CSSObject["maxHeight"];
|
|
161
|
+
size?: SpacingValue;
|
|
162
|
+
backgroundColor?: CSSObject["backgroundColor"];
|
|
163
|
+
backgroundImage?: CSSObject["backgroundImage"];
|
|
164
|
+
backgroundSize?: CSSObject["backgroundSize"];
|
|
165
|
+
border?: CSSObject["border"];
|
|
166
|
+
borderTop?: CSSObject["borderTop"];
|
|
167
|
+
borderBottom?: CSSObject["borderBottom"];
|
|
168
|
+
borderLeft?: CSSObject["borderLeft"];
|
|
169
|
+
borderRight?: CSSObject["borderRight"];
|
|
170
|
+
boxShadow?: CSSObject["boxShadow"];
|
|
171
|
+
overflow?: CSSObject["overflow"];
|
|
172
|
+
overflowX?: CSSObject["overflowX"];
|
|
173
|
+
overflowY?: CSSObject["overflowY"];
|
|
174
|
+
whiteSpace?: CSSObject["whiteSpace"];
|
|
175
|
+
transition?: CSSObject["transition"];
|
|
176
|
+
contentCentered?: boolean;
|
|
177
|
+
cursor?: CSSObject["cursor"];
|
|
178
|
+
fontSize?: CSSObject["fontSize"];
|
|
179
|
+
fontWeight?: CSSObject["fontWeight"];
|
|
180
|
+
lineHeight?: CSSObject["lineHeight"];
|
|
181
|
+
letterSpacing?: CSSObject["letterSpacing"];
|
|
182
|
+
textAlign?: CSSObject["textAlign"];
|
|
183
|
+
textTransform?: CSSObject["textTransform"];
|
|
184
|
+
textOverflow?: CSSObject["textOverflow"];
|
|
185
|
+
} & Omit<React.HTMLAttributes<HTMLElement>, "color" | "as"> & {
|
|
186
|
+
children?: React.ReactNode;
|
|
187
|
+
as?: SemanticTagType;
|
|
188
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
189
|
+
export default Block;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CSSObject } from 'styled-components';
|
|
3
|
+
type StateStyles = {
|
|
4
|
+
_hover?: PrimitiveButtonProps;
|
|
5
|
+
_focus?: PrimitiveButtonProps;
|
|
6
|
+
_active?: PrimitiveButtonProps;
|
|
7
|
+
_disabled?: PrimitiveButtonProps;
|
|
8
|
+
_visited?: PrimitiveButtonProps;
|
|
9
|
+
_focusVisible?: PrimitiveButtonProps;
|
|
10
|
+
_focusWithin?: PrimitiveButtonProps;
|
|
11
|
+
};
|
|
12
|
+
type PrimitiveButtonProps = StateStyles & {
|
|
13
|
+
padding?: CSSObject['padding'];
|
|
14
|
+
paddingX?: CSSObject['padding'];
|
|
15
|
+
paddingY?: CSSObject['padding'];
|
|
16
|
+
margin?: CSSObject['margin'];
|
|
17
|
+
marginX?: CSSObject['margin'];
|
|
18
|
+
marginY?: CSSObject['margin'];
|
|
19
|
+
display?: CSSObject['display'];
|
|
20
|
+
justifyContent?: CSSObject['justifyContent'];
|
|
21
|
+
alignItems?: CSSObject['alignItems'];
|
|
22
|
+
gap?: CSSObject['gap'];
|
|
23
|
+
contentCentered?: boolean;
|
|
24
|
+
width?: CSSObject['width'];
|
|
25
|
+
height?: CSSObject['height'];
|
|
26
|
+
size?: CSSObject['width'] | CSSObject['height'];
|
|
27
|
+
minWidth?: CSSObject['minWidth'];
|
|
28
|
+
maxWidth?: CSSObject['maxWidth'];
|
|
29
|
+
minHeight?: CSSObject['minHeight'];
|
|
30
|
+
maxHeight?: CSSObject['maxHeight'];
|
|
31
|
+
flexGrow?: CSSObject['flexGrow'];
|
|
32
|
+
flexShrink?: CSSObject['flexShrink'];
|
|
33
|
+
flexBasis?: CSSObject['flexBasis'];
|
|
34
|
+
position?: CSSObject['position'];
|
|
35
|
+
top?: CSSObject['top'];
|
|
36
|
+
right?: CSSObject['right'];
|
|
37
|
+
bottom?: CSSObject['bottom'];
|
|
38
|
+
left?: CSSObject['left'];
|
|
39
|
+
zIndex?: CSSObject['zIndex'];
|
|
40
|
+
backgroundColor?: CSSObject['backgroundColor'];
|
|
41
|
+
background?: CSSObject['background'];
|
|
42
|
+
color?: CSSObject['color'];
|
|
43
|
+
border?: CSSObject['border'];
|
|
44
|
+
borderTop?: CSSObject['borderTop'];
|
|
45
|
+
borderRight?: CSSObject['borderRight'];
|
|
46
|
+
borderBottom?: CSSObject['borderBottom'];
|
|
47
|
+
borderLeft?: CSSObject['borderLeft'];
|
|
48
|
+
borderRadius?: CSSObject['borderRadius'];
|
|
49
|
+
boxShadow?: CSSObject['boxShadow'];
|
|
50
|
+
textAlign?: CSSObject['textAlign'];
|
|
51
|
+
whiteSpace?: CSSObject['whiteSpace'];
|
|
52
|
+
overflow?: CSSObject['overflow'];
|
|
53
|
+
overflowX?: CSSObject['overflowX'];
|
|
54
|
+
overflowY?: CSSObject['overflowY'];
|
|
55
|
+
cursor?: CSSObject['cursor'];
|
|
56
|
+
outline?: CSSObject['outline'];
|
|
57
|
+
outlineOffset?: CSSObject['outlineOffset'];
|
|
58
|
+
outlineStyle?: CSSObject['outlineStyle'];
|
|
59
|
+
outlineWidth?: CSSObject['outlineWidth'];
|
|
60
|
+
outlineColor?: CSSObject['outlineColor'];
|
|
61
|
+
disabled?: boolean;
|
|
62
|
+
fontWeight?: CSSObject['fontWeight'];
|
|
63
|
+
fontSize?: CSSObject['fontSize'];
|
|
64
|
+
fontFamily?: CSSObject['fontFamily'];
|
|
65
|
+
textDecoration?: CSSObject['textDecoration'];
|
|
66
|
+
textUnderlineOffset?: CSSObject['textUnderlineOffset'];
|
|
67
|
+
textTransform?: CSSObject['textTransform'];
|
|
68
|
+
};
|
|
69
|
+
export type ButtonProps = PrimitiveButtonProps & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color'> & {
|
|
70
|
+
children?: React.ReactNode;
|
|
71
|
+
};
|
|
72
|
+
declare const PrimitiveButton: React.ForwardRefExoticComponent<StateStyles & {
|
|
73
|
+
padding?: CSSObject["padding"];
|
|
74
|
+
paddingX?: CSSObject["padding"];
|
|
75
|
+
paddingY?: CSSObject["padding"];
|
|
76
|
+
margin?: CSSObject["margin"];
|
|
77
|
+
marginX?: CSSObject["margin"];
|
|
78
|
+
marginY?: CSSObject["margin"];
|
|
79
|
+
display?: CSSObject["display"];
|
|
80
|
+
justifyContent?: CSSObject["justifyContent"];
|
|
81
|
+
alignItems?: CSSObject["alignItems"];
|
|
82
|
+
gap?: CSSObject["gap"];
|
|
83
|
+
contentCentered?: boolean;
|
|
84
|
+
width?: CSSObject["width"];
|
|
85
|
+
height?: CSSObject["height"];
|
|
86
|
+
size?: CSSObject["width"] | CSSObject["height"];
|
|
87
|
+
minWidth?: CSSObject["minWidth"];
|
|
88
|
+
maxWidth?: CSSObject["maxWidth"];
|
|
89
|
+
minHeight?: CSSObject["minHeight"];
|
|
90
|
+
maxHeight?: CSSObject["maxHeight"];
|
|
91
|
+
flexGrow?: CSSObject["flexGrow"];
|
|
92
|
+
flexShrink?: CSSObject["flexShrink"];
|
|
93
|
+
flexBasis?: CSSObject["flexBasis"];
|
|
94
|
+
position?: CSSObject["position"];
|
|
95
|
+
top?: CSSObject["top"];
|
|
96
|
+
right?: CSSObject["right"];
|
|
97
|
+
bottom?: CSSObject["bottom"];
|
|
98
|
+
left?: CSSObject["left"];
|
|
99
|
+
zIndex?: CSSObject["zIndex"];
|
|
100
|
+
backgroundColor?: CSSObject["backgroundColor"];
|
|
101
|
+
background?: CSSObject["background"];
|
|
102
|
+
color?: CSSObject["color"];
|
|
103
|
+
border?: CSSObject["border"];
|
|
104
|
+
borderTop?: CSSObject["borderTop"];
|
|
105
|
+
borderRight?: CSSObject["borderRight"];
|
|
106
|
+
borderBottom?: CSSObject["borderBottom"];
|
|
107
|
+
borderLeft?: CSSObject["borderLeft"];
|
|
108
|
+
borderRadius?: CSSObject["borderRadius"];
|
|
109
|
+
boxShadow?: CSSObject["boxShadow"];
|
|
110
|
+
textAlign?: CSSObject["textAlign"];
|
|
111
|
+
whiteSpace?: CSSObject["whiteSpace"];
|
|
112
|
+
overflow?: CSSObject["overflow"];
|
|
113
|
+
overflowX?: CSSObject["overflowX"];
|
|
114
|
+
overflowY?: CSSObject["overflowY"];
|
|
115
|
+
cursor?: CSSObject["cursor"];
|
|
116
|
+
outline?: CSSObject["outline"];
|
|
117
|
+
outlineOffset?: CSSObject["outlineOffset"];
|
|
118
|
+
outlineStyle?: CSSObject["outlineStyle"];
|
|
119
|
+
outlineWidth?: CSSObject["outlineWidth"];
|
|
120
|
+
outlineColor?: CSSObject["outlineColor"];
|
|
121
|
+
disabled?: boolean;
|
|
122
|
+
fontWeight?: CSSObject["fontWeight"];
|
|
123
|
+
fontSize?: CSSObject["fontSize"];
|
|
124
|
+
fontFamily?: CSSObject["fontFamily"];
|
|
125
|
+
textDecoration?: CSSObject["textDecoration"];
|
|
126
|
+
textUnderlineOffset?: CSSObject["textUnderlineOffset"];
|
|
127
|
+
textTransform?: CSSObject["textTransform"];
|
|
128
|
+
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "color"> & {
|
|
129
|
+
children?: React.ReactNode;
|
|
130
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
131
|
+
export default PrimitiveButton;
|