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,160 @@
|
|
1
|
+
.ff-arrow-buttons-container {
|
2
|
+
position: absolute;
|
3
|
+
transition: opacity 0.3s ease;
|
4
|
+
|
5
|
+
&.ff-down-right-top,
|
6
|
+
&.ff-down-top {
|
7
|
+
height: 80px;
|
8
|
+
width: 52px;
|
9
|
+
transform: translateY(calc(-50% + 12px));
|
10
|
+
|
11
|
+
.ff-arrow-button--right {
|
12
|
+
top: 28px;
|
13
|
+
right: 2px;
|
14
|
+
animation: slideRight 0.4s ease-out;
|
15
|
+
}
|
16
|
+
|
17
|
+
.ff-arrow-button--top {
|
18
|
+
top: 2px;
|
19
|
+
animation: slideTop 0.4s ease-out;
|
20
|
+
}
|
21
|
+
|
22
|
+
.ff-arrow-button--down {
|
23
|
+
bottom: 2px;
|
24
|
+
animation: slideDown 0.4s ease-out;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
&.ff-right-top {
|
29
|
+
height: 52px;
|
30
|
+
width: 52px;
|
31
|
+
transform: translateY(calc(-54%));
|
32
|
+
|
33
|
+
.ff-arrow-button--right {
|
34
|
+
top: 28px;
|
35
|
+
right: 2px;
|
36
|
+
animation: slideRight 0.4s ease-out;
|
37
|
+
}
|
38
|
+
|
39
|
+
.ff-arrow-button--top {
|
40
|
+
top: 2px;
|
41
|
+
animation: slideTop 0.4s ease-out;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
&.ff-down-right {
|
46
|
+
height: 52px;
|
47
|
+
width: 52px;
|
48
|
+
|
49
|
+
.ff-arrow-button--right {
|
50
|
+
top: 0px;
|
51
|
+
right: 2px;
|
52
|
+
animation: slideRight 0.4s ease-out;
|
53
|
+
}
|
54
|
+
|
55
|
+
.ff-arrow-button--down {
|
56
|
+
bottom: 2px;
|
57
|
+
animation: slideDown 0.4s ease-out;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
&.ff-top {
|
62
|
+
height: 52px;
|
63
|
+
width: 24px;
|
64
|
+
transform: translateY(calc(-54%));
|
65
|
+
|
66
|
+
.ff-arrow-button--top {
|
67
|
+
top: 2px;
|
68
|
+
animation: slideTop 0.4s ease-out;
|
69
|
+
}
|
70
|
+
}
|
71
|
+
|
72
|
+
&.ff-right {
|
73
|
+
height: 24px;
|
74
|
+
width: 52px;
|
75
|
+
|
76
|
+
.ff-arrow-button--right {
|
77
|
+
right: 2px;
|
78
|
+
animation: slideRight 0.4s ease-out;
|
79
|
+
}
|
80
|
+
}
|
81
|
+
|
82
|
+
&.ff-down {
|
83
|
+
height: 52px;
|
84
|
+
width: 24px;
|
85
|
+
|
86
|
+
.ff-arrow-button--down {
|
87
|
+
bottom: 2px;
|
88
|
+
animation: slideDown 0.4s ease-out;
|
89
|
+
}
|
90
|
+
}
|
91
|
+
.ff-arrow-button {
|
92
|
+
background: var(--arrow-button-bg-color);
|
93
|
+
border: 0.5px solid var(--arrows-button-border-color);
|
94
|
+
padding: 0;
|
95
|
+
cursor: pointer;
|
96
|
+
width: 24px;
|
97
|
+
height: 24px;
|
98
|
+
display: flex;
|
99
|
+
border-radius: 4px;
|
100
|
+
justify-content: center;
|
101
|
+
align-items: center;
|
102
|
+
transition: all 0.3s ease;
|
103
|
+
position: absolute;
|
104
|
+
|
105
|
+
&--top {
|
106
|
+
top: 0px;
|
107
|
+
left: 0;
|
108
|
+
}
|
109
|
+
|
110
|
+
&--down {
|
111
|
+
bottom: 0px;
|
112
|
+
left: 0;
|
113
|
+
}
|
114
|
+
}
|
115
|
+
|
116
|
+
@keyframes slideTop {
|
117
|
+
from {
|
118
|
+
transform: translateY(20px);
|
119
|
+
opacity: 0;
|
120
|
+
}
|
121
|
+
50% {
|
122
|
+
transform: translateY(-10px);
|
123
|
+
opacity: 0.5;
|
124
|
+
}
|
125
|
+
to {
|
126
|
+
transform: translateY(0);
|
127
|
+
opacity: 1;
|
128
|
+
}
|
129
|
+
}
|
130
|
+
|
131
|
+
@keyframes slideRight {
|
132
|
+
from {
|
133
|
+
transform: translateX(-20px);
|
134
|
+
opacity: 0;
|
135
|
+
}
|
136
|
+
50% {
|
137
|
+
transform: translateX(10px);
|
138
|
+
opacity: 0.5;
|
139
|
+
}
|
140
|
+
to {
|
141
|
+
transform: translateX(0);
|
142
|
+
opacity: 1;
|
143
|
+
}
|
144
|
+
}
|
145
|
+
|
146
|
+
@keyframes slideDown {
|
147
|
+
from {
|
148
|
+
transform: translateY(-20px);
|
149
|
+
opacity: 0;
|
150
|
+
}
|
151
|
+
50% {
|
152
|
+
transform: translateY(10px);
|
153
|
+
opacity: 0.5;
|
154
|
+
}
|
155
|
+
to {
|
156
|
+
transform: translateY(0);
|
157
|
+
opacity: 1;
|
158
|
+
}
|
159
|
+
}
|
160
|
+
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import classNames from 'classnames';
|
2
|
+
import './ArrowsButton.scss';
|
3
|
+
import { DirectionalArrowButtonProps } from '../type';
|
4
|
+
import MenuOption from '../../MenuOption/MenuOption';
|
5
|
+
|
6
|
+
const ArrowsButton = ({
|
7
|
+
direction,
|
8
|
+
menuOptions,
|
9
|
+
onArrowClick,
|
10
|
+
}: DirectionalArrowButtonProps & { isActive: boolean }) => {
|
11
|
+
const getIconName = () => {
|
12
|
+
return `arrows_${direction}_icon`;
|
13
|
+
};
|
14
|
+
|
15
|
+
return (
|
16
|
+
<div>
|
17
|
+
<button
|
18
|
+
className={classNames(
|
19
|
+
'ff-arrow-button',
|
20
|
+
`ff-arrow-button--${direction}`
|
21
|
+
)}
|
22
|
+
onClick={onArrowClick}
|
23
|
+
>
|
24
|
+
<MenuOption
|
25
|
+
iconName={getIconName()}
|
26
|
+
options={menuOptions}
|
27
|
+
dropdownPlacement={direction}
|
28
|
+
iconSize={12}
|
29
|
+
iconButtonSize={24}
|
30
|
+
iconButtonBorderRadius={3}
|
31
|
+
onOptionClick={() => {}}
|
32
|
+
/>
|
33
|
+
</button>
|
34
|
+
</div>
|
35
|
+
);
|
36
|
+
};
|
37
|
+
|
38
|
+
export default ArrowsButton;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from './AddButton';
|
@@ -0,0 +1,60 @@
|
|
1
|
+
import { checkEmpty } from '../../utils/checkEmpty/checkEmpty';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* Describes the directional arrow used in the Add Resource Button component.
|
5
|
+
* The arrow specifies its direction (top, right, down) and associated menu options.
|
6
|
+
*
|
7
|
+
* @property {('top' | 'right' | 'down')} direction - Specifies the direction of the arrow.
|
8
|
+
* @property {(Object | null)[]} menuOptions - The list of menu options displayed when the arrow button is active.
|
9
|
+
* If null, no menu options will be shown.
|
10
|
+
*/
|
11
|
+
export interface DirectionalArrow {
|
12
|
+
direction: 'top' | 'right' | 'down';
|
13
|
+
menuOptions: ({ label: string; value: string | string[]; icon: string; disable?: boolean })[];
|
14
|
+
}
|
15
|
+
|
16
|
+
/**a
|
17
|
+
* Props for the Add Resource Button component.
|
18
|
+
*
|
19
|
+
* @property {string} [id] - An optional unique identifier for the Add Resource Button.
|
20
|
+
* @property {('primary' | 'secondary')} [variant] - Optional button style variant.
|
21
|
+
* @property {DirectionalArrow[]} directionalArrow - An array of directional arrows, each specifying the direction and associated menu options. Default values will be provided if not passed.
|
22
|
+
* @property {number} [zIndex] - An optional z-index value for positioning, defaults to 99.
|
23
|
+
*/
|
24
|
+
export interface AddResourceButtonProps {
|
25
|
+
id?: string;
|
26
|
+
variant?: 'primary' | 'secondary';
|
27
|
+
directionalArrow: {
|
28
|
+
direction: 'top' | 'right' | 'down';
|
29
|
+
menuOptions: ({ label: string; value: string | string[]; icon: string; disable?: boolean })[];
|
30
|
+
}[];
|
31
|
+
zIndex?: number;
|
32
|
+
}
|
33
|
+
|
34
|
+
/**
|
35
|
+
* Props for individual directional arrow buttons.
|
36
|
+
*
|
37
|
+
* @property {('top' | 'right' | 'down')} direction - The direction of the arrow button (top, right, or down).
|
38
|
+
* @property {(Object | any)} menuOptions - The list of menu options or a generic value for dynamic content.
|
39
|
+
* @property {() => void} onArrowClick - Callback function triggered when the arrow button is clicked.
|
40
|
+
* @property {boolean} isActive - Specifies if the button is in an active state (highlighted when selected).
|
41
|
+
*/
|
42
|
+
export interface DirectionalArrowButtonProps {
|
43
|
+
direction: 'top' | 'right' | 'down';
|
44
|
+
menuOptions: ({ label: string; value: string | string[]; icon: string; disable?: boolean })[];
|
45
|
+
onArrowClick: () => void;
|
46
|
+
isActive: boolean;
|
47
|
+
variant?: 'primary' | 'secondary';
|
48
|
+
}
|
49
|
+
|
50
|
+
/**
|
51
|
+
* Utility function to validate an array of directional arrows.
|
52
|
+
* Ensures there is at least one valid arrow in the array.
|
53
|
+
* If the array is empty, it returns a default arrow object.
|
54
|
+
*/
|
55
|
+
export const validateArrows = (arrows: DirectionalArrow[]): DirectionalArrow[] => {
|
56
|
+
if (checkEmpty(arrows)) {
|
57
|
+
return [{ direction: null as any, menuOptions: [{ label: 'Sub Module', value: 'sub_module', icon: "", disable: false }] }];
|
58
|
+
}
|
59
|
+
return arrows;
|
60
|
+
}
|
@@ -0,0 +1,148 @@
|
|
1
|
+
@use '../../assets/styles/colors' as *;
|
2
|
+
@import '../../assets/styles/fonts';
|
3
|
+
|
4
|
+
.ff-button {
|
5
|
+
width: auto;
|
6
|
+
background-color: $primary-button-text-color;
|
7
|
+
border-radius: 4px;
|
8
|
+
padding: 4px 8px;
|
9
|
+
text-align: center;
|
10
|
+
text-decoration: none;
|
11
|
+
font-weight: 500;
|
12
|
+
cursor: pointer;
|
13
|
+
display: flex;
|
14
|
+
gap: 4px;
|
15
|
+
justify-content: center;
|
16
|
+
align-items: center;
|
17
|
+
@extend .fontXs;
|
18
|
+
border: 2px solid transparent;
|
19
|
+
&--transparent {
|
20
|
+
background-color: transparent;
|
21
|
+
}
|
22
|
+
|
23
|
+
&--primary,
|
24
|
+
&--delete,
|
25
|
+
&--secondary {
|
26
|
+
position: relative;
|
27
|
+
cursor: pointer;
|
28
|
+
border-radius: 4px;
|
29
|
+
z-index: 1;
|
30
|
+
border: none;
|
31
|
+
overflow: hidden;
|
32
|
+
|
33
|
+
&:before {
|
34
|
+
content: '';
|
35
|
+
position: absolute;
|
36
|
+
inset: 0;
|
37
|
+
border-radius: 4px;
|
38
|
+
padding: 0.6px;
|
39
|
+
|
40
|
+
background: $primary-button-border;
|
41
|
+
mask: linear-gradient($primary-button-text-color 0 0) content-box,
|
42
|
+
linear-gradient($primary-button-text-color 0 0);
|
43
|
+
mask-composite: exclude;
|
44
|
+
-webkit-mask: linear-gradient($primary-button-text-color 0 0) content-box,
|
45
|
+
linear-gradient($primary-button-text-color 0 0);
|
46
|
+
-webkit-mask-composite: destination-out;
|
47
|
+
z-index: -1;
|
48
|
+
}
|
49
|
+
|
50
|
+
&:hover {
|
51
|
+
background: $primary-button-hover;
|
52
|
+
}
|
53
|
+
|
54
|
+
&:disabled {
|
55
|
+
opacity: 50%;
|
56
|
+
cursor: no-drop;
|
57
|
+
|
58
|
+
&:before {
|
59
|
+
content: '';
|
60
|
+
position: absolute;
|
61
|
+
inset: 0;
|
62
|
+
border-radius: 4px;
|
63
|
+
padding: 0.6px;
|
64
|
+
-webkit-mask-composite: destination-out;
|
65
|
+
mask-composite: exclude;
|
66
|
+
z-index: -1;
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
&--primary {
|
72
|
+
background: $primary-button-color;
|
73
|
+
|
74
|
+
&:before {
|
75
|
+
background: $primary-button-border;
|
76
|
+
}
|
77
|
+
|
78
|
+
&:hover {
|
79
|
+
background: $primary-button-hover;
|
80
|
+
}
|
81
|
+
}
|
82
|
+
|
83
|
+
&--delete {
|
84
|
+
background: $delete-button-color;
|
85
|
+
color: $primary-button-text-color;
|
86
|
+
|
87
|
+
&:before {
|
88
|
+
background: $delete-button-border;
|
89
|
+
}
|
90
|
+
|
91
|
+
&:hover {
|
92
|
+
background: $delete-button-hover;
|
93
|
+
}
|
94
|
+
}
|
95
|
+
|
96
|
+
&--secondary {
|
97
|
+
&:before {
|
98
|
+
background: $primary-button-border;
|
99
|
+
}
|
100
|
+
|
101
|
+
&:hover {
|
102
|
+
background: $secondary-button-hover;
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
106
|
+
&--tertiary {
|
107
|
+
border: none;
|
108
|
+
background: $tertiary-button-color;
|
109
|
+
|
110
|
+
&:hover {
|
111
|
+
background: $tertiary-button-hover;
|
112
|
+
}
|
113
|
+
|
114
|
+
&:disabled {
|
115
|
+
opacity: 0.5;
|
116
|
+
cursor: no-drop;
|
117
|
+
}
|
118
|
+
}
|
119
|
+
|
120
|
+
&--small {
|
121
|
+
@extend .fontXs;
|
122
|
+
font-weight: 500;
|
123
|
+
padding: 4.5px 8px;
|
124
|
+
}
|
125
|
+
|
126
|
+
&--medium {
|
127
|
+
@extend .fontXs;
|
128
|
+
font-weight: 500;
|
129
|
+
padding: 6px 12px;
|
130
|
+
}
|
131
|
+
|
132
|
+
&--large {
|
133
|
+
@extend .fontMd;
|
134
|
+
padding: 8px 16px;
|
135
|
+
}
|
136
|
+
|
137
|
+
&-primary--text {
|
138
|
+
color: $primary-button-text-color;
|
139
|
+
}
|
140
|
+
|
141
|
+
&-secondary--text,
|
142
|
+
&-tertiary--text {
|
143
|
+
background: $secondary-button-color-text;
|
144
|
+
-webkit-background-clip: text;
|
145
|
+
background-clip: text;
|
146
|
+
color: transparent;
|
147
|
+
}
|
148
|
+
}
|
@@ -0,0 +1,74 @@
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
2
|
+
import Button from './Button';
|
3
|
+
|
4
|
+
const meta: Meta<typeof Button> = {
|
5
|
+
title: 'Components/Button',
|
6
|
+
component: Button,
|
7
|
+
parameters: {
|
8
|
+
layout: 'centered',
|
9
|
+
},
|
10
|
+
tags: ['autodocs'],
|
11
|
+
};
|
12
|
+
|
13
|
+
type Story = StoryObj<typeof Button>;
|
14
|
+
|
15
|
+
const defaultArgs = {
|
16
|
+
disabled: false,
|
17
|
+
};
|
18
|
+
|
19
|
+
export const Primary: Story = {
|
20
|
+
args: {
|
21
|
+
...defaultArgs,
|
22
|
+
label: 'Primary Button',
|
23
|
+
variant: 'primary',
|
24
|
+
},
|
25
|
+
};
|
26
|
+
|
27
|
+
export const Secondary: Story = {
|
28
|
+
args: {
|
29
|
+
...defaultArgs,
|
30
|
+
label: 'Secondary Button',
|
31
|
+
variant: 'secondary',
|
32
|
+
},
|
33
|
+
};
|
34
|
+
export const Tertiary: Story = {
|
35
|
+
args: {
|
36
|
+
...defaultArgs,
|
37
|
+
label: 'Tertiary Button',
|
38
|
+
variant: 'tertiary',
|
39
|
+
},
|
40
|
+
};
|
41
|
+
export const Delete: Story = {
|
42
|
+
args: {
|
43
|
+
...defaultArgs,
|
44
|
+
label: 'Delete',
|
45
|
+
variant: 'delete',
|
46
|
+
},
|
47
|
+
};
|
48
|
+
export const PrimaryWithIcon: Story = {
|
49
|
+
args: {
|
50
|
+
...defaultArgs,
|
51
|
+
label: 'Primary Button',
|
52
|
+
variant: 'primary',
|
53
|
+
iconName: 'manage_apps',
|
54
|
+
},
|
55
|
+
};
|
56
|
+
|
57
|
+
export const SecondaryWithIcon: Story = {
|
58
|
+
args: {
|
59
|
+
...defaultArgs,
|
60
|
+
label: 'Secondary Button',
|
61
|
+
variant: 'secondary',
|
62
|
+
iconName: 'manage_apps',
|
63
|
+
},
|
64
|
+
};
|
65
|
+
export const TertiaryWithIcon: Story = {
|
66
|
+
args: {
|
67
|
+
...defaultArgs,
|
68
|
+
label: 'Tertiary Button',
|
69
|
+
variant: 'tertiary',
|
70
|
+
iconName: 'manage_apps',
|
71
|
+
},
|
72
|
+
};
|
73
|
+
|
74
|
+
export default meta;
|
@@ -0,0 +1,66 @@
|
|
1
|
+
import { forwardRef } from 'react';
|
2
|
+
import './Button.scss';
|
3
|
+
import '../../assets/styles/_colors.scss';
|
4
|
+
import Icon from '../Icon';
|
5
|
+
import { ButtonProps } from './types';
|
6
|
+
import classNames from 'classnames';
|
7
|
+
|
8
|
+
const Button = forwardRef<HTMLButtonElement, ButtonProps>(
|
9
|
+
(
|
10
|
+
{
|
11
|
+
variant = 'primary',
|
12
|
+
backgroundColor,
|
13
|
+
size = 'small',
|
14
|
+
onClick,
|
15
|
+
label,
|
16
|
+
disabled = false,
|
17
|
+
children = null,
|
18
|
+
type = 'button',
|
19
|
+
className = '',
|
20
|
+
style = {},
|
21
|
+
iconName,
|
22
|
+
iconPosition = 'left',
|
23
|
+
...props
|
24
|
+
}: ButtonProps,
|
25
|
+
ref
|
26
|
+
) => {
|
27
|
+
const renderIcon = () =>
|
28
|
+
iconName && (
|
29
|
+
<div>
|
30
|
+
<Icon
|
31
|
+
height={8}
|
32
|
+
width={8}
|
33
|
+
color={
|
34
|
+
variant === 'primary'
|
35
|
+
? `var(--primary-icon-color)`
|
36
|
+
: `var(--secondary-icon-color)`
|
37
|
+
}
|
38
|
+
name={iconName}
|
39
|
+
/>
|
40
|
+
</div>
|
41
|
+
);
|
42
|
+
return (
|
43
|
+
<button
|
44
|
+
type={type}
|
45
|
+
ref={ref}
|
46
|
+
className={classNames(
|
47
|
+
'ff-button',
|
48
|
+
`ff-button--${size}`,
|
49
|
+
`ff-button--${variant}`,
|
50
|
+
`${className}`,
|
51
|
+
'button'
|
52
|
+
)}
|
53
|
+
style={{ backgroundColor, ...style }}
|
54
|
+
onClick={onClick}
|
55
|
+
disabled={disabled}
|
56
|
+
{...props}
|
57
|
+
>
|
58
|
+
{iconPosition === 'left' && renderIcon()}
|
59
|
+
<div className={classNames(`ff-button-${variant}--text`)}>{label}</div>
|
60
|
+
{iconPosition === 'right' && renderIcon()}
|
61
|
+
{children}
|
62
|
+
</button>
|
63
|
+
);
|
64
|
+
}
|
65
|
+
);
|
66
|
+
export default Button;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from './Button';
|
@@ -0,0 +1,65 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
|
3
|
+
export interface ButtonProps {
|
4
|
+
/**
|
5
|
+
* Variant of the button
|
6
|
+
*/
|
7
|
+
variant: 'primary' | 'secondary' | 'tertiary' | 'delete';
|
8
|
+
/**
|
9
|
+
* What background color to use
|
10
|
+
*/
|
11
|
+
backgroundColor?: string;
|
12
|
+
/**
|
13
|
+
* How large should the button be?
|
14
|
+
*/
|
15
|
+
size?: 'small' | 'medium' | 'large';
|
16
|
+
/**
|
17
|
+
* Button contents
|
18
|
+
*/
|
19
|
+
label?: string;
|
20
|
+
/**
|
21
|
+
* Type of the button
|
22
|
+
*/
|
23
|
+
|
24
|
+
type?: 'button' | 'submit';
|
25
|
+
|
26
|
+
disabled?: boolean;
|
27
|
+
/**
|
28
|
+
* Optional click handler
|
29
|
+
*/
|
30
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
31
|
+
/**
|
32
|
+
* Button content
|
33
|
+
*/
|
34
|
+
children?: ReactNode;
|
35
|
+
/**
|
36
|
+
* Button id
|
37
|
+
*/
|
38
|
+
id?: string;
|
39
|
+
/**
|
40
|
+
* onSubmit function handler
|
41
|
+
*/
|
42
|
+
onSubmit?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
43
|
+
/**
|
44
|
+
* react ref for the button
|
45
|
+
*/
|
46
|
+
ref?: any;
|
47
|
+
/**
|
48
|
+
* Classname for the button
|
49
|
+
*/
|
50
|
+
className?: string;
|
51
|
+
/**
|
52
|
+
* Additional styles for the button
|
53
|
+
*/
|
54
|
+
style?: React.CSSProperties;
|
55
|
+
|
56
|
+
/**
|
57
|
+
* Give icon name availble in storybook that to be on left side of button
|
58
|
+
*/
|
59
|
+
iconName?: string;
|
60
|
+
/**
|
61
|
+
* Give icon name availble in storybook that to be on left side of button
|
62
|
+
*/
|
63
|
+
iconPosition?: 'left' | 'right';
|
64
|
+
transparentBackground?:boolean;
|
65
|
+
}
|
@@ -0,0 +1,76 @@
|
|
1
|
+
@import '../../../assets/styles/fonts';
|
2
|
+
.ff-donut-chart-section {
|
3
|
+
display: flex;
|
4
|
+
align-items: center;
|
5
|
+
padding: 8px;
|
6
|
+
}
|
7
|
+
|
8
|
+
.ff-donut-chart-svg-container {
|
9
|
+
display: flex;
|
10
|
+
svg {
|
11
|
+
text:nth-of-type(1) {
|
12
|
+
@extend .fontSm;
|
13
|
+
font-weight: 600;
|
14
|
+
}
|
15
|
+
text:nth-of-type(2) {
|
16
|
+
@extend .fontXL;
|
17
|
+
font-weight: 600;
|
18
|
+
}
|
19
|
+
text:nth-of-type(3) {
|
20
|
+
@extend .font-size-8;
|
21
|
+
font-weight: 500;
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
25
|
+
.ff-status-container {
|
26
|
+
display: flex;
|
27
|
+
flex-direction: column;
|
28
|
+
gap: 20px;
|
29
|
+
}
|
30
|
+
|
31
|
+
.ff-status-item {
|
32
|
+
display: flex;
|
33
|
+
gap: 40px;
|
34
|
+
justify-content: space-between;
|
35
|
+
opacity: 1;
|
36
|
+
@extend .fontSm;
|
37
|
+
&.ff-highlighted {
|
38
|
+
opacity: 1;
|
39
|
+
}
|
40
|
+
|
41
|
+
&.ff-fade {
|
42
|
+
opacity: 10%;
|
43
|
+
}
|
44
|
+
|
45
|
+
.ff-status-text {
|
46
|
+
font-weight: 500;
|
47
|
+
color: var(--status-skipped-text-color);
|
48
|
+
}
|
49
|
+
.ff-status-details-script-count {
|
50
|
+
display: flex;
|
51
|
+
gap: 4px;
|
52
|
+
font-weight: 600;
|
53
|
+
}
|
54
|
+
.ff-status-details-script-percentage {
|
55
|
+
font-weight: 400;
|
56
|
+
color: var(--brand2-color);
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
.ff-status-label {
|
61
|
+
display: flex;
|
62
|
+
gap: 8px;
|
63
|
+
align-items: center;
|
64
|
+
}
|
65
|
+
|
66
|
+
.ff-status-details {
|
67
|
+
display: flex;
|
68
|
+
gap: 4px;
|
69
|
+
}
|
70
|
+
|
71
|
+
.ff-status-color {
|
72
|
+
width: 16px;
|
73
|
+
height: 16px;
|
74
|
+
border-radius: 4px;
|
75
|
+
opacity: 80%;
|
76
|
+
}
|