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,126 @@
|
|
1
|
+
import { useState, useRef } from 'react';
|
2
|
+
import './MenuOption.scss';
|
3
|
+
import Icon from '../Icon';
|
4
|
+
import classNames from 'classnames';
|
5
|
+
import Tooltip from '../Tooltip';
|
6
|
+
import {
|
7
|
+
OptionCardProps,
|
8
|
+
OptionProps,
|
9
|
+
MenuOptionProps,
|
10
|
+
OptionClick,
|
11
|
+
} from './types';
|
12
|
+
import useClickOutside from '../../hooks/useClickOutside';
|
13
|
+
import Typography from '../Typography';
|
14
|
+
|
15
|
+
const Option = ({ option, onClick }: OptionProps) => (
|
16
|
+
<div
|
17
|
+
className={classNames('ff-options', {
|
18
|
+
'ff-disable-option': option.disable,
|
19
|
+
})}
|
20
|
+
onClick={() => !option.disable && onClick(option)}
|
21
|
+
>
|
22
|
+
<Icon name={option.icon} height={16} width={16} />
|
23
|
+
<Typography
|
24
|
+
as="label"
|
25
|
+
color={option.icon === 'delete' ? 'var(--delete-text-color)' : ''}
|
26
|
+
>
|
27
|
+
{option.label}
|
28
|
+
</Typography>
|
29
|
+
</div>
|
30
|
+
);
|
31
|
+
|
32
|
+
const OptionCard = ({ options, onClick, styles }: OptionCardProps) => {
|
33
|
+
return (
|
34
|
+
<div className="ff-option-card" style={styles}>
|
35
|
+
{options.map((opt) => (
|
36
|
+
<Option key={opt.label} option={opt} onClick={onClick} />
|
37
|
+
))}
|
38
|
+
</div>
|
39
|
+
);
|
40
|
+
};
|
41
|
+
|
42
|
+
const MenuOption = ({
|
43
|
+
labelName,
|
44
|
+
iconName,
|
45
|
+
tooltipTitle,
|
46
|
+
tooltipPlacement = 'bottom',
|
47
|
+
options = [],
|
48
|
+
dropdownPlacement = 'down',
|
49
|
+
onClick = () => {},
|
50
|
+
onOptionClick = () => {},
|
51
|
+
iconButtonSize = 20,
|
52
|
+
iconButtonBorderRadius = 7,
|
53
|
+
iconSize = 16,
|
54
|
+
}: MenuOptionProps) => {
|
55
|
+
const [isClicked, setIsClicked] = useState(false);
|
56
|
+
const menuRef = useRef<HTMLDivElement>(null);
|
57
|
+
|
58
|
+
const closeDropDown = () => setIsClicked(false);
|
59
|
+
|
60
|
+
const onIconClickHandler = () => {
|
61
|
+
onClick();
|
62
|
+
setIsClicked((prev) => !prev);
|
63
|
+
};
|
64
|
+
|
65
|
+
const handleOptionClick = (option: OptionClick) => {
|
66
|
+
onOptionClick(option);
|
67
|
+
closeDropDown();
|
68
|
+
};
|
69
|
+
|
70
|
+
const dropdownPositionStyles = () => {
|
71
|
+
switch (dropdownPlacement) {
|
72
|
+
case 'top':
|
73
|
+
return { bottom: '100%', left: -2 };
|
74
|
+
case 'left':
|
75
|
+
return { top: -2, right: '100%' };
|
76
|
+
case 'right':
|
77
|
+
return { top: -2, left: '100%' };
|
78
|
+
case 'down':
|
79
|
+
default:
|
80
|
+
return { top: '100%', left: -2 };
|
81
|
+
}
|
82
|
+
};
|
83
|
+
|
84
|
+
useClickOutside(menuRef, closeDropDown);
|
85
|
+
|
86
|
+
return (
|
87
|
+
<div className="ff-menu-option-container" ref={menuRef}>
|
88
|
+
<Tooltip title={tooltipTitle} placement={tooltipPlacement}>
|
89
|
+
<div className="ff-icon-label">
|
90
|
+
<div
|
91
|
+
className={classNames('ff-menuicon-container', {
|
92
|
+
'ff-menuicon-container-clicked': isClicked,
|
93
|
+
})}
|
94
|
+
onClick={onIconClickHandler}
|
95
|
+
style={{
|
96
|
+
width: `${iconButtonSize}px`,
|
97
|
+
height: `${iconButtonSize}px`,
|
98
|
+
borderRadius: `${iconButtonBorderRadius}px`,
|
99
|
+
}}
|
100
|
+
>
|
101
|
+
<Icon
|
102
|
+
height={iconSize}
|
103
|
+
width={iconSize}
|
104
|
+
name={iconName}
|
105
|
+
color={
|
106
|
+
isClicked
|
107
|
+
? 'var(--menu-option-icon-color)'
|
108
|
+
: 'var(--menu-option-icon-clicked)'
|
109
|
+
}
|
110
|
+
/>
|
111
|
+
</div>
|
112
|
+
{labelName && <Typography as="label">{labelName} </Typography>}
|
113
|
+
</div>
|
114
|
+
</Tooltip>
|
115
|
+
{isClicked && (
|
116
|
+
<OptionCard
|
117
|
+
options={options}
|
118
|
+
onClick={handleOptionClick}
|
119
|
+
styles={dropdownPositionStyles()}
|
120
|
+
/>
|
121
|
+
)}
|
122
|
+
</div>
|
123
|
+
);
|
124
|
+
};
|
125
|
+
|
126
|
+
export default MenuOption;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from './MenuOption';
|
@@ -0,0 +1,161 @@
|
|
1
|
+
interface OptionClick {
|
2
|
+
/**
|
3
|
+
* The label displayed for the option.
|
4
|
+
* @type {string}
|
5
|
+
* @required
|
6
|
+
*/
|
7
|
+
label: string;
|
8
|
+
|
9
|
+
/**
|
10
|
+
* The value(s) associated with the option, which can be a single string or an array of strings.
|
11
|
+
* @type {Array<string> | string}
|
12
|
+
* @required
|
13
|
+
*/
|
14
|
+
value: Array<string> | string;
|
15
|
+
}
|
16
|
+
|
17
|
+
interface OptionType extends OptionClick {
|
18
|
+
/**
|
19
|
+
* The name of the icon associated with the option.
|
20
|
+
* @type {string}
|
21
|
+
* @required
|
22
|
+
*/
|
23
|
+
icon: string;
|
24
|
+
|
25
|
+
/**
|
26
|
+
* Indicates whether the option is disabled.
|
27
|
+
* @type {boolean}
|
28
|
+
* @optional
|
29
|
+
*/
|
30
|
+
disable?: boolean;
|
31
|
+
}
|
32
|
+
|
33
|
+
interface OptionCardProps {
|
34
|
+
/**
|
35
|
+
* The list of options displayed in the card.
|
36
|
+
* @type {Array<OptionType>}
|
37
|
+
* @required
|
38
|
+
*/
|
39
|
+
options: Array<OptionType>;
|
40
|
+
|
41
|
+
/**
|
42
|
+
* Callback function triggered when an option is clicked.
|
43
|
+
* @param {any} data - The data associated with the clicked option.
|
44
|
+
* @type {function}
|
45
|
+
* @required
|
46
|
+
*/
|
47
|
+
onClick: (data?: any) => void;
|
48
|
+
|
49
|
+
/**
|
50
|
+
* Optional styles applied to the card.
|
51
|
+
* @type {React.CSSProperties}
|
52
|
+
* @optional
|
53
|
+
*/
|
54
|
+
styles?: React.CSSProperties;
|
55
|
+
}
|
56
|
+
|
57
|
+
interface MenuOptionProps {
|
58
|
+
/**
|
59
|
+
* The name of the label displayed next to the icon.
|
60
|
+
* @type {string}
|
61
|
+
* @optional
|
62
|
+
*/
|
63
|
+
labelName?: string;
|
64
|
+
|
65
|
+
/**
|
66
|
+
* The name of the icon to be displayed.
|
67
|
+
* @type {string}
|
68
|
+
* @required
|
69
|
+
*/
|
70
|
+
iconName: string;
|
71
|
+
|
72
|
+
/**
|
73
|
+
* The list of options available in the dropdown.
|
74
|
+
* @type {Array<OptionType>}
|
75
|
+
* @required
|
76
|
+
*/
|
77
|
+
options: Array<OptionType>;
|
78
|
+
|
79
|
+
/**
|
80
|
+
* The title displayed in the tooltip when hovering over the icon.
|
81
|
+
* @type {string}
|
82
|
+
* @optional
|
83
|
+
*/
|
84
|
+
tooltipTitle?: string;
|
85
|
+
|
86
|
+
/**
|
87
|
+
* The placement of the tooltip relative to the icon.
|
88
|
+
* @type {'bottom' | 'left' | 'right' | 'top' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end'}
|
89
|
+
* @optional
|
90
|
+
*/
|
91
|
+
tooltipPlacement?:
|
92
|
+
| 'bottom'
|
93
|
+
| 'left'
|
94
|
+
| 'right'
|
95
|
+
| 'top'
|
96
|
+
| 'top-start'
|
97
|
+
| 'top-end'
|
98
|
+
| 'bottom-start'
|
99
|
+
| 'bottom-end';
|
100
|
+
|
101
|
+
/**
|
102
|
+
* The placement of the dropdown menu relative to the icon.
|
103
|
+
* @type {'top' | 'left' | 'right' | 'bottom'}
|
104
|
+
* @optional
|
105
|
+
*/
|
106
|
+
dropdownPlacement?: 'top' | 'left' | 'right' | 'down';
|
107
|
+
|
108
|
+
/**
|
109
|
+
* Callback function triggered when the icon is clicked.
|
110
|
+
* @type {function}
|
111
|
+
* @optional
|
112
|
+
*/
|
113
|
+
onClick?: () => void;
|
114
|
+
|
115
|
+
/**
|
116
|
+
* Callback function triggered when an option is clicked.
|
117
|
+
* @param {OptionClick} option - The option that was clicked.
|
118
|
+
* @type {function}
|
119
|
+
* @optional
|
120
|
+
*/
|
121
|
+
onOptionClick?: (option: OptionClick) => void;
|
122
|
+
/**
|
123
|
+
* The size of the icon button.
|
124
|
+
* @type {number}
|
125
|
+
* @default 20
|
126
|
+
*/
|
127
|
+
iconButtonSize?: number;
|
128
|
+
|
129
|
+
/**
|
130
|
+
* The size of the icon.
|
131
|
+
* @type {number}
|
132
|
+
* @default 16
|
133
|
+
*/
|
134
|
+
iconSize?: number;
|
135
|
+
|
136
|
+
/**
|
137
|
+
* The border radius of the icon.
|
138
|
+
* @type {number}
|
139
|
+
* @default 7
|
140
|
+
*/
|
141
|
+
iconButtonBorderRadius?: number;
|
142
|
+
}
|
143
|
+
|
144
|
+
interface OptionProps {
|
145
|
+
/**
|
146
|
+
* The option to be displayed.
|
147
|
+
* @type {OptionType}
|
148
|
+
* @required
|
149
|
+
*/
|
150
|
+
option: OptionType;
|
151
|
+
|
152
|
+
/**
|
153
|
+
* Callback function triggered when the option is clicked.
|
154
|
+
* @param {OptionClick} option - The clicked option.
|
155
|
+
* @type {function}
|
156
|
+
* @required
|
157
|
+
*/
|
158
|
+
onClick: (option: OptionClick) => void;
|
159
|
+
}
|
160
|
+
|
161
|
+
export { OptionProps, MenuOptionProps, OptionCardProps, OptionClick };
|
@@ -0,0 +1,139 @@
|
|
1
|
+
.ff-mini-edit-modal-container {
|
2
|
+
width: fit-content;
|
3
|
+
padding: 0;
|
4
|
+
position: absolute;
|
5
|
+
visibility: hidden;
|
6
|
+
&.modalVisible {
|
7
|
+
visibility: visible;
|
8
|
+
}
|
9
|
+
&.animatedModal {
|
10
|
+
animation: slideDown 0.5s ease, opacity 0.5s ease;
|
11
|
+
}
|
12
|
+
|
13
|
+
.popover-arrow {
|
14
|
+
position: absolute;
|
15
|
+
width: 0;
|
16
|
+
height: 0;
|
17
|
+
border-style: solid;
|
18
|
+
z-index: 5;
|
19
|
+
&.popover-arrow-top {
|
20
|
+
bottom: 100%;
|
21
|
+
left: 30px;
|
22
|
+
border-width: 0 10px 10px 10px;
|
23
|
+
border-color: transparent transparent var(--ff-mini-modal-border)
|
24
|
+
transparent;
|
25
|
+
filter: drop-shadow(0 -2px 1px var(--ff-mini-modal-box-shadow));
|
26
|
+
}
|
27
|
+
&.popover-arrow-left {
|
28
|
+
left: -15px; //align the arrow with modal for the right side modal
|
29
|
+
border-width: 10px 10px 10px 0;
|
30
|
+
border-color: transparent var(--ff-mini-modal-border) transparent
|
31
|
+
transparent;
|
32
|
+
filter: drop-shadow(-2px 0 1px var(--ff-mini-modal-box-shadow));
|
33
|
+
}
|
34
|
+
&.popover-arrow-bottom {
|
35
|
+
top: 100%;
|
36
|
+
left: 30px;
|
37
|
+
border-width: 10px 10px 0 10px;
|
38
|
+
border-color: var(--ff-mini-modal-border) transparent transparent
|
39
|
+
transparent; // Bottom part of the arrow with the correct color
|
40
|
+
filter: drop-shadow(0 2px 1px var(--ff-mini-modal-box-shadow));
|
41
|
+
}
|
42
|
+
&.popover-arrow-right {
|
43
|
+
right: -10px;
|
44
|
+
top: 75px;
|
45
|
+
border-width: 10px 0 10px 10px;
|
46
|
+
border-color: transparent transparent transparent
|
47
|
+
var(--ff-mini-modal-border);
|
48
|
+
filter: drop-shadow(2px 0 1px var(--ff-mini-modal-box-shadow));
|
49
|
+
}
|
50
|
+
|
51
|
+
&.left-top-arrow {
|
52
|
+
top: 10%;
|
53
|
+
}
|
54
|
+
&.left-middle-arrow {
|
55
|
+
top: 50%;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
.wrapped-div {
|
59
|
+
width: 35px;
|
60
|
+
height: 35px;
|
61
|
+
background-color: transparent;
|
62
|
+
outline: 8px solid var(--ff-mini-modal-border);
|
63
|
+
outline-offset: -8px;
|
64
|
+
position: absolute;
|
65
|
+
top: -34px;
|
66
|
+
z-index: 10;
|
67
|
+
border-radius: 7px 7px 0 0;
|
68
|
+
box-shadow: 0px -3px 4px 0px var(--ff-mini-modal-box-shadow);
|
69
|
+
&::before,
|
70
|
+
&::after {
|
71
|
+
position: absolute;
|
72
|
+
content: '';
|
73
|
+
width: 13px;
|
74
|
+
height: 13px;
|
75
|
+
background: transparent;
|
76
|
+
border-radius: 50%;
|
77
|
+
bottom: 0;
|
78
|
+
box-shadow: 8px 4px 0 var(--ff-mini-modal-border);
|
79
|
+
}
|
80
|
+
&::before {
|
81
|
+
left: -13px;
|
82
|
+
clip-path: polygon(100% 100%, 110% 45%, 0% 70%, 0% 100%);
|
83
|
+
}
|
84
|
+
&::after {
|
85
|
+
right: -13px;
|
86
|
+
clip-path: polygon(-5% 100%, 0% 40%, 100% 70%, 100% 100%);
|
87
|
+
box-shadow: -8px 4px 0 var(--ff-mini-modal-border);
|
88
|
+
}
|
89
|
+
}
|
90
|
+
.mini-edit-modal {
|
91
|
+
background: var(--ff-mini-modal-border);
|
92
|
+
position: relative;
|
93
|
+
max-height: fit-content;
|
94
|
+
z-index: 2;
|
95
|
+
padding: 4px;
|
96
|
+
width: 100%;
|
97
|
+
border-radius: 7px;
|
98
|
+
margin: 0 0 0 -5px;
|
99
|
+
height: 100%;
|
100
|
+
box-shadow: 0px 0px 4px 0px var(--ff-mini-modal-box-shadow);
|
101
|
+
|
102
|
+
header {
|
103
|
+
border-radius: 4px 4px 0 0;
|
104
|
+
}
|
105
|
+
footer {
|
106
|
+
border-radius: 0 0 4px 4px;
|
107
|
+
}
|
108
|
+
}
|
109
|
+
.modal-content {
|
110
|
+
max-height: 250px;
|
111
|
+
overflow-y: auto;
|
112
|
+
}
|
113
|
+
.modal-footer {
|
114
|
+
display: flex;
|
115
|
+
align-items: center;
|
116
|
+
justify-content: flex-end;
|
117
|
+
gap: 5px;
|
118
|
+
background-color: var(--ff-mini-modal-footer-background);
|
119
|
+
height: 24px;
|
120
|
+
padding: 0 10px 0 0;
|
121
|
+
transition: transform 0.3s ease-in-out;
|
122
|
+
}
|
123
|
+
@keyframes slideDown {
|
124
|
+
0% {
|
125
|
+
transform: translateY(-50px);
|
126
|
+
opacity: 0;
|
127
|
+
}
|
128
|
+
100% {
|
129
|
+
transform: translateY(0);
|
130
|
+
opacity: 1;
|
131
|
+
}
|
132
|
+
}
|
133
|
+
}
|
134
|
+
.ff-mini-modal-buttons-flex {
|
135
|
+
display: flex;
|
136
|
+
}
|
137
|
+
.ff-mini-modal-gap-10 {
|
138
|
+
gap: 10px;
|
139
|
+
}
|