pixel-react 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.prettierrc.js +13 -0
- package/.storybook/main.ts +26 -0
- package/.storybook/preview.ts +26 -0
- package/.yarn/install-state.gz +0 -0
- package/.yarnrc.yml +1 -0
- package/README.md +25 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/index.scss +0 -0
- package/lib/StyleGuide/ColorPalette/ColorPalette.d.ts +3 -0
- package/lib/StyleGuide/ColorPalette/ColorPalette.stories.d.ts +6 -0
- package/lib/StyleGuide/ColorPalette/colorPaletteList.d.ts +3 -0
- package/lib/StyleGuide/ColorPalette/index.d.ts +1 -0
- package/lib/StyleGuide/ColorPalette/types.d.ts +15 -0
- package/lib/StyleGuide/Typography/Typography.d.ts +3 -0
- package/lib/StyleGuide/Typography/Typography.stories.d.ts +6 -0
- package/lib/StyleGuide/Typography/TypographyList.d.ts +5 -0
- package/lib/StyleGuide/Typography/types.d.ts +8 -0
- package/lib/assets/utils/functionUtils.d.ts +1 -0
- package/lib/components/Accordion/Accordion.d.ts +8 -0
- package/lib/components/Accordion/Accordion.stories.d.ts +6 -0
- package/lib/components/Accordion/index.d.ts +1 -0
- package/lib/components/Accordion/types.d.ts +27 -0
- package/lib/components/AddResourceButton/AddButton.d.ts +4 -0
- package/lib/components/AddResourceButton/AddButton.stories.d.ts +8 -0
- package/lib/components/AddResourceButton/ArrowsButton/ArrowsButton.d.ts +6 -0
- package/lib/components/AddResourceButton/index.d.ts +1 -0
- package/lib/components/AddResourceButton/type.d.ts +65 -0
- package/lib/components/Button/Button.d.ts +5 -0
- package/lib/components/Button/Button.stories.d.ts +12 -0
- package/lib/components/Button/index.d.ts +1 -0
- package/lib/components/Button/types.d.ts +61 -0
- package/lib/components/Charts/DonutChart/DonutChart.d.ts +5 -0
- package/lib/components/Charts/DonutChart/DonutChart.stories.d.ts +6 -0
- package/lib/components/Charts/DonutChart/index.d.ts +1 -0
- package/lib/components/Charts/DonutChart/type.d.ts +13 -0
- package/lib/components/Charts/RadialChart/RadialChart.d.ts +5 -0
- package/lib/components/Charts/RadialChart/RadialChart.stories.d.ts +6 -0
- package/lib/components/Charts/RadialChart/index.d.ts +1 -0
- package/lib/components/Charts/RadialChart/types.d.ts +25 -0
- package/lib/components/Checkbox/Checkbox.d.ts +6 -0
- package/lib/components/Checkbox/Checkbox.stories.d.ts +8 -0
- package/lib/components/Checkbox/index.d.ts +1 -0
- package/lib/components/Checkbox/types.d.ts +30 -0
- package/lib/components/Chip/Chip.d.ts +4 -0
- package/lib/components/Chip/Chip.stories.d.ts +14 -0
- package/lib/components/Chip/index.d.ts +1 -0
- package/lib/components/Chip/types.d.ts +18 -0
- package/lib/components/Drawer/Drawer.d.ts +4 -0
- package/lib/components/Drawer/Drawer.stories.d.ts +7 -0
- package/lib/components/Drawer/Types.d.ts +85 -0
- package/lib/components/Drawer/index.d.ts +1 -0
- package/lib/components/ExpandableMenu/ExpandableMenu.d.ts +5 -0
- package/lib/components/ExpandableMenu/ExpandableMenu.stories.d.ts +7 -0
- package/lib/components/ExpandableMenu/index.d.ts +1 -0
- package/lib/components/ExpandableMenu/types.d.ts +34 -0
- package/lib/components/FileDropzone/Dropzone.d.ts +5 -0
- package/lib/components/FileDropzone/FileDropzone.d.ts +4 -0
- package/lib/components/FileDropzone/FileDropzone.stories.d.ts +8 -0
- package/lib/components/FileDropzone/FilePreview.d.ts +4 -0
- package/lib/components/FileDropzone/index.d.ts +1 -0
- package/lib/components/FileDropzone/types.d.ts +103 -0
- package/lib/components/Form/Form.d.ts +16 -0
- package/lib/components/Form/Form.stories.d.ts +6 -0
- package/lib/components/Form/index.d.ts +1 -0
- package/lib/components/Form/types.d.ts +1 -0
- package/lib/components/GridLayout/GridLayout.d.ts +6 -0
- package/lib/components/GridLayout/GridLayout.stories.d.ts +8 -0
- package/lib/components/GridLayout/index.d.ts +2 -0
- package/lib/components/GridLayout/types.d.ts +57 -0
- package/lib/components/HighlightText/HighlightText.d.ts +4 -0
- package/lib/components/HighlightText/HighlightText.stories.d.ts +6 -0
- package/lib/components/HighlightText/index.d.ts +1 -0
- package/lib/components/HighlightText/types.d.ts +4 -0
- package/lib/components/Icon/Icon.d.ts +4 -0
- package/lib/components/Icon/Icon.stories.d.ts +7 -0
- package/lib/components/Icon/iconList.d.ts +2 -0
- package/lib/components/Icon/index.d.ts +1 -0
- package/lib/components/Icon/types.d.ts +10 -0
- package/lib/components/Input/Input.d.ts +4 -0
- package/lib/components/Input/Input.stories.d.ts +9 -0
- package/lib/components/Input/index.d.ts +1 -0
- package/lib/components/Input/types.d.ts +74 -0
- package/lib/components/InputWithDropdown/InputWithDropdown.d.ts +4 -0
- package/lib/components/InputWithDropdown/InputWithDropdown.stories.d.ts +8 -0
- package/lib/components/InputWithDropdown/index.d.ts +1 -0
- package/lib/components/InputWithDropdown/types.d.ts +88 -0
- package/lib/components/LazyLoad/LazyLoad.d.ts +2 -0
- package/lib/components/LazyLoad/LazyLoad.stories.d.ts +6 -0
- package/lib/components/LazyLoad/LazyLoading.d.ts +2 -0
- package/lib/components/LazyLoad/index.d.ts +1 -0
- package/lib/components/MenuOption/MenuOption.d.ts +4 -0
- package/lib/components/MenuOption/MenuOption.stories.d.ts +15 -0
- package/lib/components/MenuOption/index.d.ts +1 -0
- package/lib/components/MenuOption/types.d.ts +134 -0
- package/lib/components/MiniModal/MiniModal.d.ts +4 -0
- package/lib/components/MiniModal/MiniModal.stories.d.ts +9 -0
- package/lib/components/MiniModal/index.d.ts +1 -0
- package/lib/components/MiniModal/types.d.ts +89 -0
- package/lib/components/MultiSelect/Dropdown.d.ts +4 -0
- package/lib/components/MultiSelect/MultiSelect.d.ts +4 -0
- package/lib/components/MultiSelect/MultiSelect.stories.d.ts +9 -0
- package/lib/components/MultiSelect/MultiSelectTypes.d.ts +18 -0
- package/lib/components/MultiSelect/dropdownTypes.d.ts +15 -0
- package/lib/components/MultiSelect/index.d.ts +1 -0
- package/lib/components/RadioButton/RadioButton.d.ts +4 -0
- package/lib/components/RadioButton/RadioButton.stories.d.ts +10 -0
- package/lib/components/RadioButton/index.d.ts +1 -0
- package/lib/components/RadioButton/radioButtonTypes.d.ts +35 -0
- package/lib/components/RadioGroup/RadioGroup.d.ts +4 -0
- package/lib/components/RadioGroup/RadioGroup.stories.d.ts +8 -0
- package/lib/components/RadioGroup/index.d.ts +1 -0
- package/lib/components/RadioGroup/radioGroupTypes.d.ts +47 -0
- package/lib/components/Search/Search.d.ts +4 -0
- package/lib/components/Search/Search.stories.d.ts +6 -0
- package/lib/components/Search/index.d.ts +1 -0
- package/lib/components/Search/types.d.ts +15 -0
- package/lib/components/Select/Select.d.ts +4 -0
- package/lib/components/Select/Select.stories.d.ts +13 -0
- package/lib/components/Select/components/Dropdown/Dropdown.d.ts +4 -0
- package/lib/components/Select/components/Dropdown/dropdownTypes.d.ts +15 -0
- package/lib/components/Select/index.d.ts +1 -0
- package/lib/components/Select/types.d.ts +68 -0
- package/lib/components/Table/Table.d.ts +4 -0
- package/lib/components/Table/Table.stories.d.ts +11 -0
- package/lib/components/Table/Types.d.ts +98 -0
- package/lib/components/Table/index.d.ts +1 -0
- package/lib/components/TableTree/TableTree.d.ts +21 -0
- package/lib/components/TableTree/TableTree.stories.d.ts +7 -0
- package/lib/components/TableTree/data.d.ts +313 -0
- package/lib/components/TableTree/index.d.ts +1 -0
- package/lib/components/Tabs/Tabs.d.ts +5 -0
- package/lib/components/Tabs/Tabs.stories.d.ts +8 -0
- package/lib/components/Tabs/index.d.ts +1 -0
- package/lib/components/Tabs/types.d.ts +40 -0
- package/lib/components/TextArea/Textarea.d.ts +4 -0
- package/lib/components/TextArea/Textarea.stories.d.ts +9 -0
- package/lib/components/TextArea/Types.d.ts +78 -0
- package/lib/components/TextArea/index.d.ts +1 -0
- package/lib/components/ThemeProvider/ThemeProvider.d.ts +7 -0
- package/lib/components/ThemeProvider/index.d.ts +1 -0
- package/lib/components/ThemeProvider/types.d.ts +11 -0
- package/lib/components/Toast/Toast.d.ts +5 -0
- package/lib/components/Toast/Toast.stories.d.ts +6 -0
- package/lib/components/Toast/index.d.ts +1 -0
- package/lib/components/Toast/types.d.ts +20 -0
- package/lib/components/Toggle/Toggle.d.ts +5 -0
- package/lib/components/Toggle/Toggle.stories.d.ts +12 -0
- package/lib/components/Toggle/index.d.ts +1 -0
- package/lib/components/Toggle/types.d.ts +50 -0
- package/lib/components/Tooltip/Tooltip.d.ts +5 -0
- package/lib/components/Tooltip/Tooltip.stories.d.ts +15 -0
- package/lib/components/Tooltip/index.d.ts +1 -0
- package/lib/components/Tooltip/types.d.ts +37 -0
- package/lib/components/Typography/Typography.d.ts +5 -0
- package/lib/components/Typography/Typography.stories.d.ts +10 -0
- package/lib/components/Typography/index.d.ts +1 -0
- package/lib/components/Typography/types.d.ts +47 -0
- package/lib/hooks/keyboardevents/useEscKeyEvent.d.ts +2 -0
- package/lib/hooks/useClickOutside.d.ts +2 -0
- package/lib/hooks/useFileDropzone.d.ts +3 -0
- package/lib/hooks/usePortalPosition.d.ts +9 -0
- package/lib/hooks/useTheme.d.ts +3 -0
- package/lib/index.css +404 -0
- package/lib/index.d.ts +1286 -0
- package/lib/index.esm.css +404 -0
- package/lib/index.esm.js +9317 -0
- package/lib/index.esm.js.map +1 -0
- package/lib/index.js +9376 -0
- package/lib/index.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/utils/TableCell/TableCell.d.ts +1 -0
- package/lib/utils/checkEmpty/checkEmpty.d.ts +3 -0
- package/lib/utils/checkEmpty/checkEmpty.stories.d.ts +6 -0
- package/lib/utils/ffID/ffID.stories.d.ts +6 -0
- package/lib/utils/ffID/ffid.d.ts +2 -0
- package/lib/utils/getExtension/getExtension.d.ts +4 -0
- package/lib/utils/getExtension/getExtension.stories.d.ts +6 -0
- package/lib/utils/truncateText/truncateText.d.ts +1 -0
- package/lib/utils/truncateText/truncateText.stories.d.ts +6 -0
- package/package.json +62 -0
- package/rollup.config.mjs +57 -0
- package/src/StyleGuide/ColorPalette/ColorPalette.scss +58 -0
- package/src/StyleGuide/ColorPalette/ColorPalette.stories.tsx +16 -0
- package/src/StyleGuide/ColorPalette/ColorPalette.tsx +61 -0
- package/src/StyleGuide/ColorPalette/colorPaletteList.ts +97 -0
- package/src/StyleGuide/ColorPalette/index.ts +1 -0
- package/src/StyleGuide/ColorPalette/types.ts +17 -0
- package/src/StyleGuide/Typography/Typography.scss +100 -0
- package/src/StyleGuide/Typography/Typography.stories.tsx +16 -0
- package/src/StyleGuide/Typography/Typography.tsx +60 -0
- package/src/StyleGuide/Typography/TypographyList.ts +3 -0
- package/src/StyleGuide/Typography/types.ts +9 -0
- package/src/assets/Themes/BaseTheme.scss +130 -0
- package/src/assets/Themes/DarkTheme.scss +131 -0
- package/src/assets/Themes/Theme.scss +200 -0
- package/src/assets/icons/Arrow.svg +5 -0
- package/src/assets/icons/accordion_header_icon.svg +10 -0
- package/src/assets/icons/arrow_down.svg +3 -0
- package/src/assets/icons/arrow_right.svg +5 -0
- package/src/assets/icons/arrow_up.svg +3 -0
- package/src/assets/icons/arrows_down_icon.svg +3 -0
- package/src/assets/icons/arrows_right_icon.svg +10 -0
- package/src/assets/icons/arrows_top_icon.svg +3 -0
- package/src/assets/icons/check_mark.svg +3 -0
- package/src/assets/icons/close_pill.svg +3 -0
- package/src/assets/icons/delete.svg +17 -0
- package/src/assets/icons/dropzone_icon.svg +18 -0
- package/src/assets/icons/error.svg +17 -0
- package/src/assets/icons/file.svg +12 -0
- package/src/assets/icons/info.svg +17 -0
- package/src/assets/icons/logo.svg +18 -0
- package/src/assets/icons/manage_apps.svg +3 -0
- package/src/assets/icons/moon_stars.svg +10 -0
- package/src/assets/icons/more.svg +11 -0
- package/src/assets/icons/plus_icon.svg +11 -0
- package/src/assets/icons/remove.svg +12 -0
- package/src/assets/icons/replace.svg +12 -0
- package/src/assets/icons/search.svg +3 -0
- package/src/assets/icons/success.svg +13 -0
- package/src/assets/icons/sun_icon.svg +10 -0
- package/src/assets/icons/tick_icon.svg +5 -0
- package/src/assets/icons/toast_close.svg +3 -0
- package/src/assets/icons/warning.svg +17 -0
- package/src/assets/icons/wrong_mark.svg +3 -0
- package/src/assets/styles/_colors.scss +145 -0
- package/src/assets/styles/_fonts.scss +68 -0
- package/src/assets/styles/_mixins.scss +20 -0
- package/src/assets/utils/functionUtils.ts +5 -0
- package/src/components/Accordion/Accordion.scss +45 -0
- package/src/components/Accordion/Accordion.stories.tsx +31 -0
- package/src/components/Accordion/Accordion.tsx +62 -0
- package/src/components/Accordion/index.ts +1 -0
- package/src/components/Accordion/types.ts +28 -0
- package/src/components/AddResourceButton/AddButton.scss +36 -0
- package/src/components/AddResourceButton/AddButton.stories.tsx +126 -0
- package/src/components/AddResourceButton/AddButton.tsx +121 -0
- package/src/components/AddResourceButton/ArrowsButton/ArrowsButton.scss +160 -0
- package/src/components/AddResourceButton/ArrowsButton/ArrowsButton.tsx +38 -0
- package/src/components/AddResourceButton/index.ts +1 -0
- package/src/components/AddResourceButton/type.ts +60 -0
- package/src/components/Button/Button.scss +148 -0
- package/src/components/Button/Button.stories.tsx +74 -0
- package/src/components/Button/Button.tsx +66 -0
- package/src/components/Button/index.ts +1 -0
- package/src/components/Button/types.ts +65 -0
- package/src/components/Charts/DonutChart/DonutChart.scss +76 -0
- package/src/components/Charts/DonutChart/DonutChart.stories.tsx +30 -0
- package/src/components/Charts/DonutChart/DonutChart.tsx +241 -0
- package/src/components/Charts/DonutChart/index.ts +1 -0
- package/src/components/Charts/DonutChart/type.ts +23 -0
- package/src/components/Charts/RadialChart/RadialChart.scss +12 -0
- package/src/components/Charts/RadialChart/RadialChart.stories.tsx +36 -0
- package/src/components/Charts/RadialChart/RadialChart.tsx +174 -0
- package/src/components/Charts/RadialChart/index.ts +1 -0
- package/src/components/Charts/RadialChart/types.ts +32 -0
- package/src/components/Checkbox/Checkbox.scss +89 -0
- package/src/components/Checkbox/Checkbox.stories.tsx +47 -0
- package/src/components/Checkbox/Checkbox.tsx +61 -0
- package/src/components/Checkbox/index.ts +1 -0
- package/src/components/Checkbox/types.ts +30 -0
- package/src/components/Chip/Chip.scss +70 -0
- package/src/components/Chip/Chip.stories.tsx +88 -0
- package/src/components/Chip/Chip.tsx +35 -0
- package/src/components/Chip/index.ts +1 -0
- package/src/components/Chip/types.ts +19 -0
- package/src/components/Drawer/Drawer.scss +121 -0
- package/src/components/Drawer/Drawer.stories.tsx +88 -0
- package/src/components/Drawer/Drawer.tsx +179 -0
- package/src/components/Drawer/Types.ts +88 -0
- package/src/components/Drawer/index.ts +1 -0
- package/src/components/ExpandableMenu/ExpandableMenu.scss +110 -0
- package/src/components/ExpandableMenu/ExpandableMenu.stories.tsx +67 -0
- package/src/components/ExpandableMenu/ExpandableMenu.tsx +101 -0
- package/src/components/ExpandableMenu/index.ts +1 -0
- package/src/components/ExpandableMenu/types.ts +34 -0
- package/src/components/FileDropzone/Dropzone.tsx +55 -0
- package/src/components/FileDropzone/FileDropzone.scss +134 -0
- package/src/components/FileDropzone/FileDropzone.stories.tsx +83 -0
- package/src/components/FileDropzone/FileDropzone.tsx +98 -0
- package/src/components/FileDropzone/FilePreview.tsx +75 -0
- package/src/components/FileDropzone/index.ts +1 -0
- package/src/components/FileDropzone/types.ts +113 -0
- package/src/components/Form/Form.scss +98 -0
- package/src/components/Form/Form.stories.tsx +177 -0
- package/src/components/Form/Form.tsx +57 -0
- package/src/components/Form/index.ts +1 -0
- package/src/components/Form/types.ts +1 -0
- package/src/components/Form/validation.json +29 -0
- package/src/components/GridLayout/GridLayout.scss +71 -0
- package/src/components/GridLayout/GridLayout.stories.tsx +128 -0
- package/src/components/GridLayout/GridLayout.tsx +30 -0
- package/src/components/GridLayout/GridLayoutStory.scss +25 -0
- package/src/components/GridLayout/index.ts +1 -0
- package/src/components/GridLayout/types.ts +64 -0
- package/src/components/HighlightText/HighlightText.scss +3 -0
- package/src/components/HighlightText/HighlightText.stories.tsx +22 -0
- package/src/components/HighlightText/HighlightText.tsx +33 -0
- package/src/components/HighlightText/index.ts +1 -0
- package/src/components/HighlightText/types.ts +4 -0
- package/src/components/Icon/Icon.stories.tsx +37 -0
- package/src/components/Icon/Icon.tsx +43 -0
- package/src/components/Icon/Icons.scss +34 -0
- package/src/components/Icon/iconList.ts +62 -0
- package/src/components/Icon/index.ts +1 -0
- package/src/components/Icon/types.ts +10 -0
- package/src/components/Input/Input.scss +150 -0
- package/src/components/Input/Input.stories.tsx +96 -0
- package/src/components/Input/Input.tsx +93 -0
- package/src/components/Input/index.ts +1 -0
- package/src/components/Input/types.ts +77 -0
- package/src/components/InputWithDropdown/InputWithDropdown.scss +185 -0
- package/src/components/InputWithDropdown/InputWithDropdown.stories.tsx +114 -0
- package/src/components/InputWithDropdown/InputWithDropdown.tsx +85 -0
- package/src/components/InputWithDropdown/index.ts +1 -0
- package/src/components/InputWithDropdown/types.ts +110 -0
- package/src/components/LazyLoad/LazyLoad.d.ts +3 -0
- package/src/components/LazyLoad/LazyLoad.stories.tsx +33 -0
- package/src/components/LazyLoad/LazyLoad.ts +2 -0
- package/src/components/LazyLoad/LazyLoading.tsx +19 -0
- package/src/components/LazyLoad/index.ts +1 -0
- package/src/components/MenuOption/MenuOption.scss +69 -0
- package/src/components/MenuOption/MenuOption.stories.tsx +259 -0
- package/src/components/MenuOption/MenuOption.tsx +126 -0
- package/src/components/MenuOption/index.ts +1 -0
- package/src/components/MenuOption/types.ts +161 -0
- package/src/components/MiniModal/MiniModal.scss +139 -0
- package/src/components/MiniModal/MiniModal.stories.tsx +475 -0
- package/src/components/MiniModal/MiniModal.tsx +218 -0
- package/src/components/MiniModal/index.ts +1 -0
- package/src/components/MiniModal/types.ts +88 -0
- package/src/components/MultiSelect/Dropdown.scss +66 -0
- package/src/components/MultiSelect/Dropdown.tsx +77 -0
- package/src/components/MultiSelect/MultiSelect.scss +190 -0
- package/src/components/MultiSelect/MultiSelect.stories.tsx +85 -0
- package/src/components/MultiSelect/MultiSelect.tsx +260 -0
- package/src/components/MultiSelect/MultiSelectTypes.ts +19 -0
- package/src/components/MultiSelect/dropdownTypes.ts +15 -0
- package/src/components/MultiSelect/index.ts +1 -0
- package/src/components/RadioButton/RadioButton.scss +99 -0
- package/src/components/RadioButton/RadioButton.stories.tsx +43 -0
- package/src/components/RadioButton/RadioButton.tsx +32 -0
- package/src/components/RadioButton/index.ts +1 -0
- package/src/components/RadioButton/radioButtonTypes.tsx +40 -0
- package/src/components/RadioGroup/RadioGroup.scss +5 -0
- package/src/components/RadioGroup/RadioGroup.stories.tsx +81 -0
- package/src/components/RadioGroup/RadioGroup.tsx +30 -0
- package/src/components/RadioGroup/index.ts +1 -0
- package/src/components/RadioGroup/radioGroupTypes.tsx +54 -0
- package/src/components/Search/Search.scss +87 -0
- package/src/components/Search/Search.stories.tsx +26 -0
- package/src/components/Search/Search.tsx +103 -0
- package/src/components/Search/index.ts +1 -0
- package/src/components/Search/types.ts +15 -0
- package/src/components/Select/Select.scss +247 -0
- package/src/components/Select/Select.stories.tsx +156 -0
- package/src/components/Select/Select.tsx +368 -0
- package/src/components/Select/components/Dropdown/Dropdown.scss +70 -0
- package/src/components/Select/components/Dropdown/Dropdown.tsx +89 -0
- package/src/components/Select/components/Dropdown/dropdownTypes.ts +19 -0
- package/src/components/Select/index.ts +1 -0
- package/src/components/Select/types.ts +122 -0
- package/src/components/Table/Table.scss +101 -0
- package/src/components/Table/Table.stories.tsx +345 -0
- package/src/components/Table/Table.tsx +128 -0
- package/src/components/Table/Types.ts +100 -0
- package/src/components/Table/index.ts +1 -0
- package/src/components/TableTree/TableTree.scss +142 -0
- package/src/components/TableTree/TableTree.stories.tsx +121 -0
- package/src/components/TableTree/TableTree.tsx +216 -0
- package/src/components/TableTree/TableTreeStories.scss +22 -0
- package/src/components/TableTree/data.ts +573 -0
- package/src/components/TableTree/index.ts +1 -0
- package/src/components/Tabs/Tabs.scss +76 -0
- package/src/components/Tabs/Tabs.stories.tsx +104 -0
- package/src/components/Tabs/Tabs.tsx +64 -0
- package/src/components/Tabs/index.ts +1 -0
- package/src/components/Tabs/types.ts +38 -0
- package/src/components/TextArea/Textarea.scss +145 -0
- package/src/components/TextArea/Textarea.stories.tsx +92 -0
- package/src/components/TextArea/Textarea.tsx +84 -0
- package/src/components/TextArea/Types.ts +82 -0
- package/src/components/TextArea/index.tsx +1 -0
- package/src/components/ThemeProvider/ThemeProvider.tsx +24 -0
- package/src/components/ThemeProvider/index.ts +1 -0
- package/src/components/ThemeProvider/types.ts +14 -0
- package/src/components/Toast/Toast.scss +121 -0
- package/src/components/Toast/Toast.stories.tsx +180 -0
- package/src/components/Toast/Toast.tsx +116 -0
- package/src/components/Toast/index.ts +1 -0
- package/src/components/Toast/types.ts +27 -0
- package/src/components/Toggle/Toggle.scss +132 -0
- package/src/components/Toggle/Toggle.stories.tsx +132 -0
- package/src/components/Toggle/Toggle.tsx +96 -0
- package/src/components/Toggle/index.ts +1 -0
- package/src/components/Toggle/types.ts +43 -0
- package/src/components/Tooltip/Tooltip.scss +27 -0
- package/src/components/Tooltip/Tooltip.stories.tsx +97 -0
- package/src/components/Tooltip/Tooltip.tsx +194 -0
- package/src/components/Tooltip/index.ts +1 -0
- package/src/components/Tooltip/types.ts +60 -0
- package/src/components/Typography/Typography.scss +49 -0
- package/src/components/Typography/Typography.stories.tsx +57 -0
- package/src/components/Typography/Typography.tsx +39 -0
- package/src/components/Typography/index.ts +1 -0
- package/src/components/Typography/types.ts +56 -0
- package/src/fonts/Montserrat/Montserrat-Medium.ttf +0 -0
- package/src/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
- package/src/fonts/Montserrat/Montserrat-SemiBold.ttf +0 -0
- package/src/fonts/Poppins/Poppins-Black.ttf +0 -0
- package/src/fonts/Poppins/Poppins-BlackItalic.ttf +0 -0
- package/src/fonts/Poppins/Poppins-Bold.ttf +0 -0
- package/src/fonts/Poppins/Poppins-BoldItalic.ttf +0 -0
- package/src/fonts/Poppins/Poppins-ExtraBold.ttf +0 -0
- package/src/fonts/Poppins/Poppins-ExtraBoldItalic.ttf +0 -0
- package/src/fonts/Poppins/Poppins-ExtraLight.ttf +0 -0
- package/src/fonts/Poppins/Poppins-ExtraLightItalic.ttf +0 -0
- package/src/fonts/Poppins/Poppins-Italic.ttf +0 -0
- package/src/fonts/Poppins/Poppins-Light.ttf +0 -0
- package/src/fonts/Poppins/Poppins-LightItalic.ttf +0 -0
- package/src/fonts/Poppins/Poppins-Medium.ttf +0 -0
- package/src/fonts/Poppins/Poppins-MediumItalic.ttf +0 -0
- package/src/fonts/Poppins/Poppins-Regular.ttf +0 -0
- package/src/fonts/Poppins/Poppins-SemiBold.ttf +0 -0
- package/src/fonts/Poppins/Poppins-SemiBoldItalic.ttf +0 -0
- package/src/fonts/Poppins/Poppins-Thin.ttf +0 -0
- package/src/fonts/Poppins/Poppins-ThinItalic.ttf +0 -0
- package/src/hooks/keyboardevents/useEscKeyEvent.tsx +31 -0
- package/src/hooks/useClickOutside.tsx +30 -0
- package/src/hooks/useFileDropzone.tsx +273 -0
- package/src/hooks/usePortalPosition.tsx +53 -0
- package/src/hooks/useTheme.tsx +13 -0
- package/src/index.ts +91 -0
- package/src/utils/TableCell/TableCell.ts +16 -0
- package/src/utils/checkEmpty/checkEmpty.stories.tsx +34 -0
- package/src/utils/checkEmpty/checkEmpty.ts +10 -0
- package/src/utils/ffID/ffID.stories.tsx +35 -0
- package/src/utils/ffID/ffid.ts +9 -0
- package/src/utils/getExtension/getExtension.stories.tsx +23 -0
- package/src/utils/getExtension/getExtension.ts +28 -0
- package/src/utils/truncateText/truncateText.stories.tsx +37 -0
- package/src/utils/truncateText/truncateText.ts +4 -0
- package/tsconfig.json +55 -0
- package/ui-library.zip +0 -0
- package/vite.config.js +30 -0
@@ -0,0 +1,85 @@
|
|
1
|
+
import classNames from 'classnames';
|
2
|
+
import './InputWithDropdown.scss';
|
3
|
+
import { InputWithDropdownProps } from './types';
|
4
|
+
import Select from '../Select/Select';
|
5
|
+
import Typography from '../Typography';
|
6
|
+
|
7
|
+
const InputWithDropdown = ({
|
8
|
+
name = '',
|
9
|
+
label,
|
10
|
+
value,
|
11
|
+
type,
|
12
|
+
disabled = false,
|
13
|
+
required = false,
|
14
|
+
placeholder,
|
15
|
+
error,
|
16
|
+
helperText,
|
17
|
+
optionsList,
|
18
|
+
selectedOption,
|
19
|
+
onDropdownChangeHandler = () => {},
|
20
|
+
onInputChangeHandler,
|
21
|
+
}: InputWithDropdownProps) => {
|
22
|
+
return (
|
23
|
+
<div
|
24
|
+
className={classNames('ff-input-with-dropdown-container', {
|
25
|
+
'ff-input-with-dropdown-container--filled': !!value,
|
26
|
+
})}
|
27
|
+
>
|
28
|
+
<fieldset
|
29
|
+
className={classNames('ff-input-with-dropdown', {
|
30
|
+
'ff-input-with-dropdown--filled': !!value,
|
31
|
+
'ff-input-with-dropdown--no-hover': !!value,
|
32
|
+
'ff-input-with-dropdown--disabled': !!disabled,
|
33
|
+
'ff-input-with-dropdown--error': !!error,
|
34
|
+
})}
|
35
|
+
>
|
36
|
+
<div className={classNames('ff-floating-label-input-container')}>
|
37
|
+
<Typography
|
38
|
+
as="label"
|
39
|
+
htmlFor={name}
|
40
|
+
className={classNames('ff-floating-label', {
|
41
|
+
'ff-floating-label--filled': !!value,
|
42
|
+
'ff-floating-label--no-hover': !!value,
|
43
|
+
'ff-floating-label--error': !!error,
|
44
|
+
})}
|
45
|
+
>
|
46
|
+
{required && <span className="ff-required-asterisk">*</span>}{' '}
|
47
|
+
{label}
|
48
|
+
</Typography>
|
49
|
+
<input
|
50
|
+
name={name}
|
51
|
+
type={type}
|
52
|
+
id={name}
|
53
|
+
value={value}
|
54
|
+
onChange={onInputChangeHandler}
|
55
|
+
placeholder={placeholder}
|
56
|
+
required={required}
|
57
|
+
disabled={disabled}
|
58
|
+
className={classNames('ff-floating-input', {
|
59
|
+
'ff-floating-input--filled': !!value,
|
60
|
+
'ff-floating-input--disabled': !!disabled,
|
61
|
+
'ff-floating-input--error': !!error,
|
62
|
+
})}
|
63
|
+
/>
|
64
|
+
</div>
|
65
|
+
<Select
|
66
|
+
optionsList={optionsList}
|
67
|
+
selectedOption={selectedOption}
|
68
|
+
showLabel={false}
|
69
|
+
showBorder={false}
|
70
|
+
onChange={onDropdownChangeHandler}
|
71
|
+
disabled={disabled}
|
72
|
+
className={classNames('ff-floating-dropdown', {
|
73
|
+
'ff-floating-dropdown--disabled': !!disabled,
|
74
|
+
'ff-floating-dropdown--error': !!error,
|
75
|
+
})}
|
76
|
+
/>
|
77
|
+
</fieldset>
|
78
|
+
{error && helperText && (
|
79
|
+
<span className="ff-helper-text">{helperText}</span>
|
80
|
+
)}
|
81
|
+
</div>
|
82
|
+
);
|
83
|
+
};
|
84
|
+
|
85
|
+
export default InputWithDropdown;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from './InputWithDropdown';
|
@@ -0,0 +1,110 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
|
3
|
+
export interface Option {
|
4
|
+
label: string | ReactNode; // The display label for the dropdown option
|
5
|
+
value: string; // The value associated with the dropdown option
|
6
|
+
}
|
7
|
+
|
8
|
+
export interface InputWithDropdownProps {
|
9
|
+
/**
|
10
|
+
* Name | name of the input field
|
11
|
+
*/
|
12
|
+
name: string;
|
13
|
+
|
14
|
+
/**
|
15
|
+
* Label | field label to be displayed
|
16
|
+
*/
|
17
|
+
label: string;
|
18
|
+
|
19
|
+
/**
|
20
|
+
* value | input field value
|
21
|
+
*/
|
22
|
+
value: string | number;
|
23
|
+
|
24
|
+
/**
|
25
|
+
* variants to set color/style of the input field
|
26
|
+
*/
|
27
|
+
variant?: 'default' | 'primary';
|
28
|
+
|
29
|
+
/**
|
30
|
+
* type to set the input field type
|
31
|
+
*/
|
32
|
+
type: 'text' | 'password' | 'number' | 'time';
|
33
|
+
|
34
|
+
/**
|
35
|
+
* error | If true, error message will be displayed
|
36
|
+
*/
|
37
|
+
error?: boolean;
|
38
|
+
|
39
|
+
/**
|
40
|
+
* helperText | error, success, warning message to be shown
|
41
|
+
*/
|
42
|
+
helperText?: string;
|
43
|
+
|
44
|
+
/**
|
45
|
+
* to disable the input field
|
46
|
+
*/
|
47
|
+
disabled?: boolean;
|
48
|
+
|
49
|
+
/**
|
50
|
+
* if true, input field will be mandatory
|
51
|
+
*/
|
52
|
+
required?: boolean;
|
53
|
+
|
54
|
+
/**
|
55
|
+
* placeholder for the input field
|
56
|
+
*/
|
57
|
+
placeholder?: string;
|
58
|
+
|
59
|
+
/**
|
60
|
+
* classnames to style the input field
|
61
|
+
*/
|
62
|
+
className?: string;
|
63
|
+
|
64
|
+
/**
|
65
|
+
* Options for the select dropdown
|
66
|
+
*/
|
67
|
+
optionsList: Option[];
|
68
|
+
|
69
|
+
/**
|
70
|
+
* Selected option for the select dropdown
|
71
|
+
*/
|
72
|
+
selectedOption?: Option;
|
73
|
+
|
74
|
+
/**
|
75
|
+
* onChange handler for input changes
|
76
|
+
*/
|
77
|
+
onInputChangeHandler?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
78
|
+
|
79
|
+
/**
|
80
|
+
* onChange handler for dropdown changes
|
81
|
+
*/
|
82
|
+
onDropdownChangeHandler?: (option: Option) => void;
|
83
|
+
|
84
|
+
/**
|
85
|
+
* onFocus action for input field
|
86
|
+
*/
|
87
|
+
onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
88
|
+
|
89
|
+
/**
|
90
|
+
* id to select the input field uniquely
|
91
|
+
*/
|
92
|
+
id?: string;
|
93
|
+
|
94
|
+
/**
|
95
|
+
* if on, suggestion popup will be displayed
|
96
|
+
*/
|
97
|
+
autoComplete?: 'on' | 'off';
|
98
|
+
|
99
|
+
/**
|
100
|
+
* minimum and maximum values for the number type input field
|
101
|
+
*/
|
102
|
+
minValue?: number;
|
103
|
+
|
104
|
+
maxValue?: number;
|
105
|
+
|
106
|
+
/**
|
107
|
+
* background of the input field prop
|
108
|
+
*/
|
109
|
+
isBackgroundTransparent?: boolean;
|
110
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
2
|
+
import LazyLoading from './LazyLoading';
|
3
|
+
|
4
|
+
const meta: Meta = {
|
5
|
+
title: 'Components/LazyLoad',
|
6
|
+
component: LazyLoading,
|
7
|
+
parameters: {
|
8
|
+
layout: 'centered',
|
9
|
+
docs: {
|
10
|
+
description: {
|
11
|
+
component: `
|
12
|
+
The \`LazyLoading\` component is designed to optimize performance by only rendering the necessary parts of a large dataset that are visible within the viewport.
|
13
|
+
This component is particularly useful for applications that handle a significant amount of content, such as image galleries or infinite scrolling lists.
|
14
|
+
|
15
|
+
LazyLoad works by only rendering part of a large data set (just enough to fill the viewport). This helps address some common performance bottlenecks:
|
16
|
+
|
17
|
+
i) It reduces the amount of work (and time) required to render the initial view and to process updates. \n
|
18
|
+
ii) It reduces the memory footprint by avoiding over-allocation of DOM nodes.`,
|
19
|
+
story:
|
20
|
+
'This is a description with [library](https://www.npmjs.com/package/react-window) to an external website.',
|
21
|
+
},
|
22
|
+
},
|
23
|
+
},
|
24
|
+
tags: ['autodocs'],
|
25
|
+
};
|
26
|
+
|
27
|
+
type Story = StoryObj<typeof LazyLoading>;
|
28
|
+
|
29
|
+
export const Primary: Story = {
|
30
|
+
render: () => <LazyLoading />,
|
31
|
+
};
|
32
|
+
|
33
|
+
export default meta;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import LazyLoad from './LazyLoad';
|
2
|
+
const { FixedSizeList } = LazyLoad;
|
3
|
+
const Row = ({
|
4
|
+
index,
|
5
|
+
style,
|
6
|
+
}: {
|
7
|
+
index: number;
|
8
|
+
style: React.CSSProperties;
|
9
|
+
}) => <div style={style}>Row {index}</div>;
|
10
|
+
|
11
|
+
const LazyLoading = () => {
|
12
|
+
return (
|
13
|
+
<FixedSizeList height={300} itemCount={100000} itemSize={30} width={400}>
|
14
|
+
{Row}
|
15
|
+
</FixedSizeList>
|
16
|
+
);
|
17
|
+
};
|
18
|
+
|
19
|
+
export default LazyLoading;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './LazyLoad';
|
@@ -0,0 +1,69 @@
|
|
1
|
+
@import '../../assets/styles/fonts';
|
2
|
+
|
3
|
+
.ff-menu-option-container {
|
4
|
+
cursor: pointer;
|
5
|
+
position: relative;
|
6
|
+
|
7
|
+
.ff-icon-label {
|
8
|
+
display: flex;
|
9
|
+
align-items: center;
|
10
|
+
gap: 4px;
|
11
|
+
.ff-menuicon-container {
|
12
|
+
display: flex;
|
13
|
+
justify-content: center;
|
14
|
+
align-items: center;
|
15
|
+
cursor: pointer;
|
16
|
+
&:hover {
|
17
|
+
background-color: var(--hover-color);
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
.ff-menuicon-container-clicked {
|
22
|
+
display: flex;
|
23
|
+
justify-content: center;
|
24
|
+
align-items: center;
|
25
|
+
background-color: var(--brand-color);
|
26
|
+
cursor: pointer;
|
27
|
+
&:hover {
|
28
|
+
background-color: var(--brand-color);
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
.ff-option-card {
|
34
|
+
position: absolute;
|
35
|
+
border: 1px solid var(--option-card-border-color);
|
36
|
+
background: var(--option-card-bg-color);
|
37
|
+
border-radius: 4px;
|
38
|
+
margin: 2px;
|
39
|
+
min-height: 32px;
|
40
|
+
min-width: 111px;
|
41
|
+
z-index: 100000;
|
42
|
+
white-space: nowrap;
|
43
|
+
|
44
|
+
.ff-options {
|
45
|
+
@extend .fontSm;
|
46
|
+
cursor: pointer;
|
47
|
+
border-radius: 4px;
|
48
|
+
display: flex;
|
49
|
+
align-items: center;
|
50
|
+
padding: 8px;
|
51
|
+
line-height: 16px;
|
52
|
+
gap: 8px;
|
53
|
+
&:hover {
|
54
|
+
background-color: var(--hover-color);
|
55
|
+
}
|
56
|
+
label {
|
57
|
+
cursor: pointer;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
.ff-disable-option {
|
62
|
+
opacity: 0.5;
|
63
|
+
cursor: no-drop;
|
64
|
+
label {
|
65
|
+
cursor: no-drop;
|
66
|
+
}
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|
@@ -0,0 +1,259 @@
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
2
|
+
import MenuOption from './MenuOption';
|
3
|
+
import './MenuOption.scss';
|
4
|
+
|
5
|
+
export const DefaultMenuOption: Story = {
|
6
|
+
args: {
|
7
|
+
iconName: 'more',
|
8
|
+
options: [
|
9
|
+
{
|
10
|
+
label: 'StepGroup',
|
11
|
+
icon: 'success',
|
12
|
+
value: [],
|
13
|
+
disable: true,
|
14
|
+
},
|
15
|
+
{
|
16
|
+
label: 'Script',
|
17
|
+
value: ['SCR101', 'SCR102'],
|
18
|
+
icon: 'success',
|
19
|
+
},
|
20
|
+
{
|
21
|
+
label: 'Script',
|
22
|
+
value: ['SCR101', 'SCR102'],
|
23
|
+
icon: 'success',
|
24
|
+
},
|
25
|
+
{
|
26
|
+
label: 'Script',
|
27
|
+
value: ['SCR101', 'SCR102'],
|
28
|
+
icon: 'success',
|
29
|
+
},
|
30
|
+
],
|
31
|
+
},
|
32
|
+
};
|
33
|
+
|
34
|
+
const meta: Meta<typeof MenuOption> = {
|
35
|
+
title: 'Components/MenuOption',
|
36
|
+
component: MenuOption,
|
37
|
+
parameters: {
|
38
|
+
layout: 'centered',
|
39
|
+
},
|
40
|
+
tags: ['autodocs'],
|
41
|
+
argTypes: {
|
42
|
+
iconName: {
|
43
|
+
control: 'text',
|
44
|
+
defaultValue: 'more',
|
45
|
+
},
|
46
|
+
labelName: {
|
47
|
+
control: 'text',
|
48
|
+
defaultValue: 'Controlled Menu',
|
49
|
+
},
|
50
|
+
tooltipTitle: {
|
51
|
+
control: 'text',
|
52
|
+
defaultValue: 'Select an option',
|
53
|
+
},
|
54
|
+
tooltipPlacement: {
|
55
|
+
control: {
|
56
|
+
type: 'select',
|
57
|
+
options: ['top', 'bottom', 'left', 'right'],
|
58
|
+
},
|
59
|
+
defaultValue: 'top',
|
60
|
+
},
|
61
|
+
dropdownPlacement: {
|
62
|
+
control: {
|
63
|
+
type: 'select',
|
64
|
+
options: ['top', 'bottom', 'left', 'right'],
|
65
|
+
},
|
66
|
+
defaultValue: 'bottom',
|
67
|
+
},
|
68
|
+
},
|
69
|
+
};
|
70
|
+
|
71
|
+
type Story = StoryObj<typeof MenuOption>;
|
72
|
+
|
73
|
+
export const ControlledMenuOption: Story = {
|
74
|
+
render: (args) => {
|
75
|
+
const options = [
|
76
|
+
{
|
77
|
+
label: 'Option1',
|
78
|
+
value: 'opt1',
|
79
|
+
icon: 'success',
|
80
|
+
},
|
81
|
+
{
|
82
|
+
label: 'Option2',
|
83
|
+
value: 'opt2',
|
84
|
+
icon: 'success',
|
85
|
+
},
|
86
|
+
{
|
87
|
+
label: 'Delete option',
|
88
|
+
value: 'deleteOpt',
|
89
|
+
icon: 'delete',
|
90
|
+
},
|
91
|
+
];
|
92
|
+
|
93
|
+
return (
|
94
|
+
<MenuOption
|
95
|
+
iconName={args.iconName}
|
96
|
+
labelName={args.labelName}
|
97
|
+
options={options}
|
98
|
+
tooltipTitle={args.tooltipTitle}
|
99
|
+
tooltipPlacement={args.tooltipPlacement}
|
100
|
+
dropdownPlacement={args.dropdownPlacement}
|
101
|
+
/>
|
102
|
+
);
|
103
|
+
},
|
104
|
+
};
|
105
|
+
|
106
|
+
// Story for MenuOption with label
|
107
|
+
export const MenuOptionWithLabel: Story = {
|
108
|
+
args: {
|
109
|
+
labelName: 'more',
|
110
|
+
iconName: 'more',
|
111
|
+
options: [
|
112
|
+
{
|
113
|
+
label: 'Option1',
|
114
|
+
value: 'opt1',
|
115
|
+
icon: 'success',
|
116
|
+
},
|
117
|
+
{
|
118
|
+
label: 'Option2',
|
119
|
+
value: 'opt2',
|
120
|
+
icon: 'success',
|
121
|
+
},
|
122
|
+
],
|
123
|
+
},
|
124
|
+
};
|
125
|
+
|
126
|
+
// Story for MenuOption with disabled hover effect
|
127
|
+
export const MenuOptionWithDisabledHoverEffect: Story = {
|
128
|
+
render: () => {
|
129
|
+
const options = [
|
130
|
+
{
|
131
|
+
label: 'StepGroup',
|
132
|
+
icon: 'success',
|
133
|
+
value: [],
|
134
|
+
disable: true,
|
135
|
+
},
|
136
|
+
{
|
137
|
+
label: 'Script',
|
138
|
+
value: ['SCR101', 'SCR102'],
|
139
|
+
icon: 'success',
|
140
|
+
},
|
141
|
+
];
|
142
|
+
return (
|
143
|
+
<MenuOption
|
144
|
+
iconName="more"
|
145
|
+
tooltipTitle="more options"
|
146
|
+
tooltipPlacement="top"
|
147
|
+
dropdownPlacement="right"
|
148
|
+
options={options}
|
149
|
+
/>
|
150
|
+
);
|
151
|
+
},
|
152
|
+
};
|
153
|
+
|
154
|
+
// Story for MenuOption with tooltip
|
155
|
+
export const MenuOptionWithToolTip: Story = {
|
156
|
+
args: {
|
157
|
+
labelName: 'ImpactList',
|
158
|
+
iconName: 'success',
|
159
|
+
tooltipTitle: 'More Info',
|
160
|
+
tooltipPlacement: 'bottom',
|
161
|
+
options: [
|
162
|
+
{
|
163
|
+
label: 'Option1',
|
164
|
+
value: 'opt1',
|
165
|
+
icon: 'success',
|
166
|
+
},
|
167
|
+
{
|
168
|
+
label: 'Option2',
|
169
|
+
value: 'opt2',
|
170
|
+
icon: 'success',
|
171
|
+
},
|
172
|
+
],
|
173
|
+
},
|
174
|
+
};
|
175
|
+
|
176
|
+
// Story for MenuOption with 'top' placement
|
177
|
+
export const MenuOptionPlacementTop: Story = {
|
178
|
+
args: {
|
179
|
+
iconName: 'more',
|
180
|
+
labelName: 'Top Placement',
|
181
|
+
dropdownPlacement: 'top',
|
182
|
+
options: [
|
183
|
+
{
|
184
|
+
label: 'Option1',
|
185
|
+
value: 'opt1',
|
186
|
+
icon: 'success',
|
187
|
+
},
|
188
|
+
{
|
189
|
+
label: 'Option2',
|
190
|
+
value: 'opt2',
|
191
|
+
icon: 'success',
|
192
|
+
},
|
193
|
+
],
|
194
|
+
},
|
195
|
+
};
|
196
|
+
|
197
|
+
// Story for MenuOption with 'down' placement
|
198
|
+
export const MenuOptionPlacementDown: Story = {
|
199
|
+
args: {
|
200
|
+
iconName: 'more',
|
201
|
+
labelName: ' Placement',
|
202
|
+
dropdownPlacement: 'down',
|
203
|
+
options: [
|
204
|
+
{
|
205
|
+
label: 'Option1',
|
206
|
+
value: 'opt1',
|
207
|
+
icon: 'success',
|
208
|
+
},
|
209
|
+
{
|
210
|
+
label: 'Option2',
|
211
|
+
value: 'opt2',
|
212
|
+
icon: 'success',
|
213
|
+
},
|
214
|
+
],
|
215
|
+
},
|
216
|
+
};
|
217
|
+
|
218
|
+
// Story for MenuOption with 'left' placement
|
219
|
+
export const MenuOptionPlacementLeft: Story = {
|
220
|
+
args: {
|
221
|
+
iconName: 'more',
|
222
|
+
labelName: 'Left Placement',
|
223
|
+
dropdownPlacement: 'left',
|
224
|
+
options: [
|
225
|
+
{
|
226
|
+
label: 'Option1',
|
227
|
+
value: 'opt1',
|
228
|
+
icon: 'delete',
|
229
|
+
},
|
230
|
+
{
|
231
|
+
label: 'Option2',
|
232
|
+
value: 'opt2',
|
233
|
+
icon: 'success',
|
234
|
+
},
|
235
|
+
],
|
236
|
+
},
|
237
|
+
};
|
238
|
+
|
239
|
+
// Story for MenuOption with 'right' placement
|
240
|
+
export const MenuOptionPlacementRight: Story = {
|
241
|
+
args: {
|
242
|
+
iconName: 'more',
|
243
|
+
dropdownPlacement: 'right',
|
244
|
+
options: [
|
245
|
+
{
|
246
|
+
label: 'Option1',
|
247
|
+
value: 'opt1',
|
248
|
+
icon: 'success',
|
249
|
+
},
|
250
|
+
{
|
251
|
+
label: 'Option2',
|
252
|
+
value: 'opt2',
|
253
|
+
icon: 'success',
|
254
|
+
},
|
255
|
+
],
|
256
|
+
},
|
257
|
+
};
|
258
|
+
|
259
|
+
export default meta;
|