@sisense/sdk-shared-ui 1.27.1 → 1.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Breadcrumbs-B46ViOSv.cjs +3 -0
- package/dist/Breadcrumbs-CQNCIJ2Y.js +301 -0
- package/dist/Button-CoMaroSC.cjs +1 -0
- package/dist/Button-D5ZAS_sd.js +569 -0
- package/dist/ButtonBase-Camgk6s8.cjs +74 -0
- package/dist/ButtonBase-DPVWpC8-.js +883 -0
- package/dist/CheckableList-BLLCGCKX.cjs +1 -0
- package/dist/CheckableList-CC7iKnHq.js +21 -0
- package/dist/Checkbox-3bG1OLg3.js +516 -0
- package/dist/Checkbox-oJOn5Vb9.cjs +1 -0
- package/dist/DEPRECATED_Button-D2XS1y1r.cjs +1 -0
- package/dist/DEPRECATED_Button-m2ifXo3Q.js +87 -0
- package/dist/DEPRECATED_Checkbox-CYomxatm.cjs +1 -0
- package/dist/DEPRECATED_Checkbox-DWtXr5K7.js +63 -0
- package/dist/DEPRECATED_Icon-BQ4AqiI1.js +56 -0
- package/dist/DEPRECATED_Icon-iUszZb09.cjs +1 -0
- package/dist/DEPRECATED_Toggle-DMnlQO3F.js +30 -0
- package/dist/DEPRECATED_Toggle-Dp0ZZ_6E.cjs +1 -0
- package/dist/DEPRECATED_Tooltip-C2bU8ipb.js +2316 -0
- package/dist/DEPRECATED_Tooltip-D3ReAkFF.cjs +27 -0
- package/dist/Dropdown-BtZZ4fY6.cjs +1 -0
- package/dist/Dropdown-BxoUPsca.js +231 -0
- package/dist/Icon-CqoYg88-.cjs +1 -0
- package/dist/Icon-D0uZg6iJ.js +131 -0
- package/dist/Input-BghWSV2Z.js +119 -0
- package/dist/Input-Cd6a2FUC.cjs +1 -0
- package/dist/LazyLoader-DB86QSSx.js +18 -0
- package/dist/LazyLoader-gOLNhxc-.cjs +1 -0
- package/dist/Menu-BfAQOpHl.cjs +1 -0
- package/dist/Menu-C5wQnuq6.js +1212 -0
- package/dist/Popover-0n4kd3ut.js +49 -0
- package/dist/Popover-Bp5g_ws9.cjs +1 -0
- package/dist/RadioButton-BpAksn2s.js +70 -0
- package/dist/RadioButton-Ds-0wj0r.cjs +1 -0
- package/dist/SvgIcon-Dg-EBYZz.cjs +1 -0
- package/dist/SvgIcon-DsAvI5iY.js +238 -0
- package/dist/TablePagination-DUkJaWJG.js +7758 -0
- package/dist/TablePagination-Yp8eKLZB.cjs +15 -0
- package/dist/ThemeProvider-BCsnqK18.js +5085 -0
- package/dist/ThemeProvider-BjBWRt7C.cjs +114 -0
- package/dist/Tooltip-B0-7TF8b.js +2155 -0
- package/dist/Tooltip-DE1hlnS3.cjs +7 -0
- package/dist/Typography-BGFgTnYN.js +498 -0
- package/dist/Typography-CGsd6zC4.cjs +1 -0
- package/dist/align.interface-B17uA473.cjs +1 -0
- package/dist/align.interface-DdWsijrT.js +4 -0
- package/dist/assertThisInitialized-BSnhOY1M.cjs +1 -0
- package/dist/assertThisInitialized-lz6cHcRv.js +8 -0
- package/dist/createSimplePaletteValueFilter-B7--0ryQ.js +17 -0
- package/dist/createSimplePaletteValueFilter-PTK3TAhW.cjs +1 -0
- package/dist/createSvgIcon-DDrcw4wZ.cjs +1 -0
- package/dist/createSvgIcon-rAujRRtd.js +17 -0
- package/dist/deepmerge-BuAjuQR6.cjs +17 -0
- package/dist/deepmerge-DNqbOtFI.js +177 -0
- package/dist/extends-DX42hfxm.js +13 -0
- package/dist/extends-q0Hkx4pQ.cjs +1 -0
- package/dist/index-B-zZeebW.cjs +20 -0
- package/dist/index-D0lMis-I.js +667 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +30 -24
- package/dist/integerPropType-B8hl-7D0.js +180 -0
- package/dist/integerPropType-BGlNA6vX.cjs +17 -0
- package/dist/lib/Breadcrumbs/Breadcrumbs.cjs +1 -0
- package/dist/lib/Breadcrumbs/Breadcrumbs.d.ts +16 -0
- package/dist/lib/Breadcrumbs/Breadcrumbs.d.ts.map +1 -0
- package/dist/lib/Breadcrumbs/Breadcrumbs.js +7 -0
- package/dist/lib/Breadcrumbs/index.d.ts +5 -0
- package/dist/lib/Breadcrumbs/index.d.ts.map +1 -0
- package/dist/lib/Breadcrumbs/themes/breadcrumbsTheme.d.ts +4 -0
- package/dist/lib/Breadcrumbs/themes/breadcrumbsTheme.d.ts.map +1 -0
- package/dist/lib/Breadcrumbs/themes/index.d.ts +2 -0
- package/dist/lib/Breadcrumbs/themes/index.d.ts.map +1 -0
- package/dist/lib/Button/Button.cjs +1 -0
- package/dist/lib/Button/Button.d.ts +10 -0
- package/dist/lib/Button/Button.d.ts.map +1 -0
- package/dist/lib/Button/Button.js +7 -0
- package/dist/lib/Button/index.d.ts +5 -0
- package/dist/lib/Button/index.d.ts.map +1 -0
- package/dist/lib/Button/themes/buttonsTheme.d.ts +11 -0
- package/dist/lib/Button/themes/buttonsTheme.d.ts.map +1 -0
- package/dist/lib/Button/themes/index.d.ts +2 -0
- package/dist/lib/Button/themes/index.d.ts.map +1 -0
- package/dist/lib/CheckableList/CheckableList.cjs +1 -0
- package/dist/lib/CheckableList/CheckableList.d.ts +16 -0
- package/dist/lib/CheckableList/CheckableList.d.ts.map +1 -0
- package/dist/lib/CheckableList/CheckableList.js +5 -0
- package/dist/lib/CheckableList/index.d.ts +4 -0
- package/dist/lib/CheckableList/index.d.ts.map +1 -0
- package/dist/lib/Checkbox/Checkbox.cjs +1 -0
- package/dist/lib/Checkbox/Checkbox.d.ts +20 -0
- package/dist/lib/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/lib/Checkbox/Checkbox.js +5 -0
- package/dist/lib/Checkbox/index.d.ts +4 -0
- package/dist/lib/Checkbox/index.d.ts.map +1 -0
- package/dist/lib/Checkbox/themes/checkboxTheme.d.ts +12 -0
- package/dist/lib/Checkbox/themes/checkboxTheme.d.ts.map +1 -0
- package/{src/lib/Checkbox/themes/index.ts → dist/lib/Checkbox/themes/index.d.ts} +1 -0
- package/dist/lib/Checkbox/themes/index.d.ts.map +1 -0
- package/dist/lib/Checkbox/themes/uiCustomization.d.ts +12 -0
- package/dist/lib/Checkbox/themes/uiCustomization.d.ts.map +1 -0
- package/dist/lib/DEPRECATED_Button/DEPRECATED_Button.cjs +1 -0
- package/dist/lib/DEPRECATED_Button/DEPRECATED_Button.d.ts +43 -0
- package/dist/lib/DEPRECATED_Button/DEPRECATED_Button.d.ts.map +1 -0
- package/dist/lib/DEPRECATED_Button/DEPRECATED_Button.js +5 -0
- package/dist/lib/DEPRECATED_Button/index.d.ts +4 -0
- package/dist/lib/DEPRECATED_Button/index.d.ts.map +1 -0
- package/dist/lib/DEPRECATED_Checkbox/DEPRECATED_Checkbox.cjs +1 -0
- package/dist/lib/DEPRECATED_Checkbox/DEPRECATED_Checkbox.d.ts +20 -0
- package/dist/lib/DEPRECATED_Checkbox/DEPRECATED_Checkbox.d.ts.map +1 -0
- package/dist/lib/DEPRECATED_Checkbox/DEPRECATED_Checkbox.js +5 -0
- package/dist/lib/DEPRECATED_Checkbox/index.d.ts +4 -0
- package/dist/lib/DEPRECATED_Checkbox/index.d.ts.map +1 -0
- package/dist/lib/DEPRECATED_Icon/DEPRECATED_Icon.cjs +1 -0
- package/dist/lib/DEPRECATED_Icon/DEPRECATED_Icon.d.ts +17 -0
- package/dist/lib/DEPRECATED_Icon/DEPRECATED_Icon.d.ts.map +1 -0
- package/dist/lib/DEPRECATED_Icon/DEPRECATED_Icon.js +5 -0
- package/dist/lib/DEPRECATED_Icon/index.d.ts +4 -0
- package/dist/lib/DEPRECATED_Icon/index.d.ts.map +1 -0
- package/dist/lib/DEPRECATED_Toggle/DEPRECATED_Toggle.cjs +1 -0
- package/dist/lib/DEPRECATED_Toggle/DEPRECATED_Toggle.d.ts +13 -0
- package/dist/lib/DEPRECATED_Toggle/DEPRECATED_Toggle.d.ts.map +1 -0
- package/dist/lib/DEPRECATED_Toggle/DEPRECATED_Toggle.js +5 -0
- package/dist/lib/DEPRECATED_Toggle/index.d.ts +4 -0
- package/dist/lib/DEPRECATED_Toggle/index.d.ts.map +1 -0
- package/dist/lib/DEPRECATED_Tooltip/DEPRECATED_Tooltip.cjs +1 -0
- package/dist/lib/DEPRECATED_Tooltip/DEPRECATED_Tooltip.d.ts +15 -0
- package/dist/lib/DEPRECATED_Tooltip/DEPRECATED_Tooltip.d.ts.map +1 -0
- package/dist/lib/DEPRECATED_Tooltip/DEPRECATED_Tooltip.js +5 -0
- package/dist/lib/DEPRECATED_Tooltip/index.d.ts +4 -0
- package/dist/lib/DEPRECATED_Tooltip/index.d.ts.map +1 -0
- package/dist/lib/Dropdown/Dropdown.cjs +1 -0
- package/dist/lib/Dropdown/Dropdown.d.ts +32 -0
- package/dist/lib/Dropdown/Dropdown.d.ts.map +1 -0
- package/dist/lib/Dropdown/Dropdown.js +5 -0
- package/dist/lib/Dropdown/DropdownButton/DropdownButton.d.ts +18 -0
- package/dist/lib/Dropdown/DropdownButton/DropdownButton.d.ts.map +1 -0
- package/dist/lib/Dropdown/DropdownButton/DropdownButtonBody/DropdownButtonBody.d.ts +12 -0
- package/dist/lib/Dropdown/DropdownButton/DropdownButtonBody/DropdownButtonBody.d.ts.map +1 -0
- package/{src/lib/Dropdown/DropdownButton/DropdownButtonBody/index.ts → dist/lib/Dropdown/DropdownButton/DropdownButtonBody/index.d.ts} +1 -0
- package/dist/lib/Dropdown/DropdownButton/DropdownButtonBody/index.d.ts.map +1 -0
- package/dist/lib/Dropdown/DropdownButton/DropdownButtonSearch/DropdownButtonSearch.d.ts +10 -0
- package/dist/lib/Dropdown/DropdownButton/DropdownButtonSearch/DropdownButtonSearch.d.ts.map +1 -0
- package/dist/lib/Dropdown/DropdownButton/DropdownButtonSearch/constants.d.ts +2 -0
- package/dist/lib/Dropdown/DropdownButton/DropdownButtonSearch/constants.d.ts.map +1 -0
- package/{src/lib/Dropdown/DropdownButton/DropdownButtonSearch/index.ts → dist/lib/Dropdown/DropdownButton/DropdownButtonSearch/index.d.ts} +1 -0
- package/dist/lib/Dropdown/DropdownButton/DropdownButtonSearch/index.d.ts.map +1 -0
- package/{src/lib/Dropdown/DropdownButton/hooks/index.tsx → dist/lib/Dropdown/DropdownButton/hooks/index.d.ts} +1 -0
- package/dist/lib/Dropdown/DropdownButton/hooks/index.d.ts.map +1 -0
- package/dist/lib/Dropdown/DropdownButton/hooks/useDropdownButtonSearch.d.ts +15 -0
- package/dist/lib/Dropdown/DropdownButton/hooks/useDropdownButtonSearch.d.ts.map +1 -0
- package/{src/lib/Dropdown/DropdownButton/index.ts → dist/lib/Dropdown/DropdownButton/index.d.ts} +1 -0
- package/dist/lib/Dropdown/DropdownButton/index.d.ts.map +1 -0
- package/{src/lib/Dropdown/hooks/index.tsx → dist/lib/Dropdown/hooks/index.d.ts} +1 -0
- package/dist/lib/Dropdown/hooks/index.d.ts.map +1 -0
- package/dist/lib/Dropdown/hooks/useDropdown.d.ts +9 -0
- package/dist/lib/Dropdown/hooks/useDropdown.d.ts.map +1 -0
- package/dist/lib/Dropdown/index.d.ts +5 -0
- package/dist/lib/Dropdown/index.d.ts.map +1 -0
- package/dist/lib/Dropdown/types.d.ts +12 -0
- package/dist/lib/Dropdown/types.d.ts.map +1 -0
- package/dist/lib/Icon/Icon.cjs +1 -0
- package/dist/lib/Icon/Icon.d.ts +13 -0
- package/dist/lib/Icon/Icon.d.ts.map +1 -0
- package/dist/lib/Icon/Icon.js +5 -0
- package/dist/lib/Icon/index.d.ts +4 -0
- package/dist/lib/Icon/index.d.ts.map +1 -0
- package/dist/lib/Icon/themes/iconTheme.d.ts +8 -0
- package/dist/lib/Icon/themes/iconTheme.d.ts.map +1 -0
- package/{src/lib/Icon/themes/index.ts → dist/lib/Icon/themes/index.d.ts} +1 -0
- package/dist/lib/Icon/themes/index.d.ts.map +1 -0
- package/dist/lib/Icon/themes/uiCustomization.d.ts +2 -0
- package/dist/lib/Icon/themes/uiCustomization.d.ts.map +1 -0
- package/dist/lib/Input/Input.cjs +1 -0
- package/dist/lib/Input/Input.d.ts +28 -0
- package/dist/lib/Input/Input.d.ts.map +1 -0
- package/dist/lib/Input/Input.js +5 -0
- package/dist/lib/Input/index.d.ts +4 -0
- package/dist/lib/Input/index.d.ts.map +1 -0
- package/dist/lib/LazyLoader/LazyLoader.cjs +1 -0
- package/dist/lib/LazyLoader/LazyLoader.d.ts +9 -0
- package/dist/lib/LazyLoader/LazyLoader.d.ts.map +1 -0
- package/dist/lib/LazyLoader/LazyLoader.js +5 -0
- package/dist/lib/LazyLoader/index.d.ts +4 -0
- package/dist/lib/LazyLoader/index.d.ts.map +1 -0
- package/dist/lib/Menu/Confirmation/Confirmation.d.ts +8 -0
- package/dist/lib/Menu/Confirmation/Confirmation.d.ts.map +1 -0
- package/{src/lib/Menu/Confirmation/index.ts → dist/lib/Menu/Confirmation/index.d.ts} +1 -0
- package/dist/lib/Menu/Confirmation/index.d.ts.map +1 -0
- package/dist/lib/Menu/Confirmation/translation.d.ts +2 -0
- package/dist/lib/Menu/Confirmation/translation.d.ts.map +1 -0
- package/dist/lib/Menu/Menu.cjs +1 -0
- package/dist/lib/Menu/Menu.d.ts +80 -0
- package/dist/lib/Menu/Menu.d.ts.map +1 -0
- package/dist/lib/Menu/Menu.js +8 -0
- package/dist/lib/Menu/MenuItem/MenuItem.d.ts +36 -0
- package/dist/lib/Menu/MenuItem/MenuItem.d.ts.map +1 -0
- package/{src/lib/Menu/MenuItem/index.ts → dist/lib/Menu/MenuItem/index.d.ts} +1 -0
- package/dist/lib/Menu/MenuItem/index.d.ts.map +1 -0
- package/{src/lib/Menu/index.ts → dist/lib/Menu/index.d.ts} +2 -2
- package/dist/lib/Menu/index.d.ts.map +1 -0
- package/dist/lib/Menu/utils.d.ts +6 -0
- package/dist/lib/Menu/utils.d.ts.map +1 -0
- package/dist/lib/Popover/Popover.cjs +1 -0
- package/dist/lib/Popover/Popover.d.ts +16 -0
- package/dist/lib/Popover/Popover.d.ts.map +1 -0
- package/dist/lib/Popover/Popover.js +7 -0
- package/dist/lib/Popover/align.interface.d.ts +23 -0
- package/dist/lib/Popover/align.interface.d.ts.map +1 -0
- package/{src/lib/Popover/index.ts → dist/lib/Popover/index.d.ts} +2 -2
- package/dist/lib/Popover/index.d.ts.map +1 -0
- package/dist/lib/RadioButton/RadioButton.cjs +1 -0
- package/dist/lib/RadioButton/RadioButton.d.ts +20 -0
- package/dist/lib/RadioButton/RadioButton.d.ts.map +1 -0
- package/dist/lib/RadioButton/RadioButton.js +5 -0
- package/dist/lib/RadioButton/index.d.ts +4 -0
- package/dist/lib/RadioButton/index.d.ts.map +1 -0
- package/dist/lib/TablePagination/PaginationActionsComponent/PaginationActionsComponent.d.ts +9 -0
- package/dist/lib/TablePagination/PaginationActionsComponent/PaginationActionsComponent.d.ts.map +1 -0
- package/dist/lib/TablePagination/PaginationActionsComponent/index.d.ts +2 -0
- package/dist/lib/TablePagination/PaginationActionsComponent/index.d.ts.map +1 -0
- package/dist/lib/TablePagination/PaginationActionsComponent/themes/index.d.ts +2 -0
- package/dist/lib/TablePagination/PaginationActionsComponent/themes/index.d.ts.map +1 -0
- package/dist/lib/TablePagination/PaginationActionsComponent/themes/paginationActionsComponentTheme.d.ts +3 -0
- package/dist/lib/TablePagination/PaginationActionsComponent/themes/paginationActionsComponentTheme.d.ts.map +1 -0
- package/dist/lib/TablePagination/PaginationActionsComponent/themes/uiCustomization.d.ts +2 -0
- package/dist/lib/TablePagination/PaginationActionsComponent/themes/uiCustomization.d.ts.map +1 -0
- package/dist/lib/TablePagination/TablePagination.cjs +1 -0
- package/dist/lib/TablePagination/TablePagination.d.ts +19 -0
- package/dist/lib/TablePagination/TablePagination.d.ts.map +1 -0
- package/dist/lib/TablePagination/TablePagination.js +5 -0
- package/dist/lib/TablePagination/TablePaginationContext.d.ts +3 -0
- package/dist/lib/TablePagination/TablePaginationContext.d.ts.map +1 -0
- package/dist/lib/TablePagination/index.d.ts +4 -0
- package/dist/lib/TablePagination/index.d.ts.map +1 -0
- package/{src/lib/TablePagination/themes/index.ts → dist/lib/TablePagination/themes/index.d.ts} +1 -0
- package/dist/lib/TablePagination/themes/index.d.ts.map +1 -0
- package/dist/lib/TablePagination/themes/tablePaginationResponsiveDesign.d.ts +10 -0
- package/dist/lib/TablePagination/themes/tablePaginationResponsiveDesign.d.ts.map +1 -0
- package/dist/lib/TablePagination/themes/tablePaginationTheme.d.ts +3 -0
- package/dist/lib/TablePagination/themes/tablePaginationTheme.d.ts.map +1 -0
- package/dist/lib/TablePagination/themes/uiCustomization.d.ts +2 -0
- package/dist/lib/TablePagination/themes/uiCustomization.d.ts.map +1 -0
- package/dist/lib/Tooltip/Tooltip.cjs +1 -0
- package/dist/lib/Tooltip/Tooltip.d.ts +10 -0
- package/dist/lib/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/lib/Tooltip/Tooltip.js +7 -0
- package/{src/lib/Tooltip/index.ts → dist/lib/Tooltip/index.d.ts} +2 -2
- package/dist/lib/Tooltip/index.d.ts.map +1 -0
- package/{src/lib/Tooltip/themes/index.ts → dist/lib/Tooltip/themes/index.d.ts} +1 -0
- package/dist/lib/Tooltip/themes/index.d.ts.map +1 -0
- package/dist/lib/Tooltip/themes/tooltipTheme.d.ts +3 -0
- package/dist/lib/Tooltip/themes/tooltipTheme.d.ts.map +1 -0
- package/dist/lib/Typography/Typography.cjs +1 -0
- package/dist/lib/Typography/Typography.d.ts +11 -0
- package/dist/lib/Typography/Typography.d.ts.map +1 -0
- package/dist/lib/Typography/Typography.js +7 -0
- package/{src/lib/Typography/index.ts → dist/lib/Typography/index.d.ts} +2 -2
- package/dist/lib/Typography/index.d.ts.map +1 -0
- package/{src/lib/Typography/themes/index.ts → dist/lib/Typography/themes/index.d.ts} +1 -0
- package/dist/lib/Typography/themes/index.d.ts.map +1 -0
- package/dist/lib/Typography/themes/typographyTheme.d.ts +21 -0
- package/dist/lib/Typography/themes/typographyTheme.d.ts.map +1 -0
- package/dist/lib/Typography/themes/uiCustomization.d.ts +2 -0
- package/dist/lib/Typography/themes/uiCustomization.d.ts.map +1 -0
- package/dist/lib/constants/styleguideConstants.d.ts +9 -0
- package/dist/lib/constants/styleguideConstants.d.ts.map +1 -0
- package/{src/lib/index.ts → dist/lib/index.d.ts} +3 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/{src/lib/themes/colors/index.ts → dist/lib/themes/colors/index.d.ts} +1 -0
- package/dist/lib/themes/colors/index.d.ts.map +1 -0
- package/dist/lib/themes/colors/siColors.d.ts +140 -0
- package/dist/lib/themes/colors/siColors.d.ts.map +1 -0
- package/{src/lib/themes/index.ts → dist/lib/themes/index.d.ts} +1 -0
- package/dist/lib/themes/index.d.ts.map +1 -0
- package/dist/lib/themes/themes.cjs +2 -0
- package/dist/lib/themes/themes.js +142 -0
- package/dist/lib/themes/types/SisenseTheme.d.ts +12 -0
- package/dist/lib/themes/types/SisenseTheme.d.ts.map +1 -0
- package/{src/lib/themes/types/index.ts → dist/lib/themes/types/index.d.ts} +1 -0
- package/dist/lib/themes/types/index.d.ts.map +1 -0
- package/dist/package.json +225 -0
- package/dist/setPrototypeOf-BmHXYjK5.cjs +1 -0
- package/dist/setPrototypeOf-CEtRTXk2.js +19 -0
- package/dist/styleguideConstants-CtXkvIZK.cjs +1 -0
- package/dist/styleguideConstants-D4Yls16w.js +11 -0
- package/dist/useControlled-BYdyS7Pn.js +31 -0
- package/dist/useControlled-Ysk4KqoX.cjs +3 -0
- package/dist/useFormControl-CatNKXAi.js +10 -0
- package/dist/useFormControl-haP0iPhl.cjs +1 -0
- package/dist/useSlot-7x9FkqBW.js +720 -0
- package/dist/useSlot-B_P_o-pz.cjs +1 -0
- package/dist/useSlotProps-BpXHXb21.js +102 -0
- package/dist/useSlotProps-COvANhgg.cjs +1 -0
- package/dist/useTheme-BN6DGaDZ.cjs +1 -0
- package/dist/useTheme-eCVqNAnk.js +8 -0
- package/dist/useTimeout-BG7TPjEm.js +92 -0
- package/dist/useTimeout-DQN9lwd_.cjs +2 -0
- package/package.json +21 -1
- package/.eslintignore +0 -4
- package/.prettierignore +0 -11
- package/.storybook/main.ts +0 -44
- package/.storybook/preview-head.html +0 -4
- package/.storybook/preview.tsx +0 -34
- package/src/index.ts +0 -1
- package/src/lib/@types/sass.d.ts +0 -19
- package/src/lib/CheckableList/CheckableList.module.scss +0 -13
- package/src/lib/CheckableList/CheckableList.test.tsx +0 -61
- package/src/lib/CheckableList/CheckableList.tsx +0 -41
- package/src/lib/CheckableList/index.ts +0 -4
- package/src/lib/Checkbox/Checkbox.tsx +0 -28
- package/src/lib/Checkbox/index.ts +0 -4
- package/src/lib/Checkbox/themes/checkboxTheme.ts +0 -42
- package/src/lib/Checkbox/themes/uiCustomization.ts +0 -28
- package/src/lib/DEPRECATED_Button/DEPRECATED_Button.module.scss +0 -57
- package/src/lib/DEPRECATED_Button/DEPRECATED_Button.stories.tsx +0 -169
- package/src/lib/DEPRECATED_Button/DEPRECATED_Button.test.tsx +0 -154
- package/src/lib/DEPRECATED_Button/DEPRECATED_Button.tsx +0 -129
- package/src/lib/DEPRECATED_Button/index.ts +0 -4
- package/src/lib/DEPRECATED_Checkbox/Checkbox.module.scss +0 -49
- package/src/lib/DEPRECATED_Checkbox/DEPRECATED_Checkbox.test.tsx +0 -131
- package/src/lib/DEPRECATED_Checkbox/DEPRECATED_Checkbox.tsx +0 -103
- package/src/lib/DEPRECATED_Checkbox/index.ts +0 -4
- package/src/lib/DEPRECATED_Icon/DEPRECATED_Icon.module.scss +0 -7
- package/src/lib/DEPRECATED_Icon/DEPRECATED_Icon.stories.tsx +0 -27
- package/src/lib/DEPRECATED_Icon/DEPRECATED_Icon.test.tsx +0 -105
- package/src/lib/DEPRECATED_Icon/DEPRECATED_Icon.tsx +0 -91
- package/src/lib/DEPRECATED_Icon/index.ts +0 -4
- package/src/lib/DEPRECATED_Toggle/DEPRECATED_Toggle.tsx +0 -49
- package/src/lib/DEPRECATED_Toggle/index.ts +0 -4
- package/src/lib/DEPRECATED_Tooltip/DEPRECATED_Tooltip.module.scss +0 -115
- package/src/lib/DEPRECATED_Tooltip/DEPRECATED_Tooltip.tsx +0 -68
- package/src/lib/DEPRECATED_Tooltip/index.ts +0 -4
- package/src/lib/Dropdown/Dropdown.module.scss +0 -9
- package/src/lib/Dropdown/Dropdown.tsx +0 -150
- package/src/lib/Dropdown/DropdownButton/DropdownButton.module.scss +0 -49
- package/src/lib/Dropdown/DropdownButton/DropdownButton.tsx +0 -81
- package/src/lib/Dropdown/DropdownButton/DropdownButtonBody/DropdownButtonBody.test.tsx +0 -121
- package/src/lib/Dropdown/DropdownButton/DropdownButtonBody/DropdownButtonBody.tsx +0 -39
- package/src/lib/Dropdown/DropdownButton/DropdownButtonSearch/DropdownButtonSearch.module.scss +0 -20
- package/src/lib/Dropdown/DropdownButton/DropdownButtonSearch/DropdownButtonSearch.tsx +0 -44
- package/src/lib/Dropdown/DropdownButton/DropdownButtonSearch/constants.ts +0 -1
- package/src/lib/Dropdown/DropdownButton/hooks/useDropdownButtonSearch.ts +0 -51
- package/src/lib/Dropdown/hooks/useDropdown.ts +0 -29
- package/src/lib/Dropdown/index.ts +0 -5
- package/src/lib/Dropdown/types.ts +0 -17
- package/src/lib/Icon/Icon.tsx +0 -118
- package/src/lib/Icon/index.ts +0 -4
- package/src/lib/Icon/themes/iconTheme.tsx +0 -38
- package/src/lib/Icon/themes/uiCustomization.ts +0 -9
- package/src/lib/Input/Input.module.scss +0 -97
- package/src/lib/Input/Input.test.tsx +0 -177
- package/src/lib/Input/Input.tsx +0 -134
- package/src/lib/Input/index.ts +0 -4
- package/src/lib/LazyLoader/LazyLoader.module.scss +0 -18
- package/src/lib/LazyLoader/LazyLoader.tsx +0 -42
- package/src/lib/LazyLoader/index.ts +0 -4
- package/src/lib/Menu/Confirmation/Confirmation.module.scss +0 -48
- package/src/lib/Menu/Confirmation/Confirmation.tsx +0 -45
- package/src/lib/Menu/Confirmation/translation.ts +0 -17
- package/src/lib/Menu/Menu.module.scss +0 -178
- package/src/lib/Menu/Menu.tsx +0 -363
- package/src/lib/Menu/MenuItem/MenuItem.test.tsx +0 -241
- package/src/lib/Menu/MenuItem/MenuItem.tsx +0 -186
- package/src/lib/Menu/utils.ts +0 -13
- package/src/lib/Popover/Popover.module.scss +0 -15
- package/src/lib/Popover/Popover.tsx +0 -92
- package/src/lib/Popover/align.interface.ts +0 -20
- package/src/lib/RadioButton/RadioButton.module.scss +0 -22
- package/src/lib/RadioButton/RadioButton.tsx +0 -89
- package/src/lib/RadioButton/index.ts +0 -4
- package/src/lib/TablePagination/PaginationActionsComponent/PaginationActionsComponent.tsx +0 -87
- package/src/lib/TablePagination/PaginationActionsComponent/index.ts +0 -4
- package/src/lib/TablePagination/PaginationActionsComponent/themes/index.ts +0 -4
- package/src/lib/TablePagination/PaginationActionsComponent/themes/paginationActionsComponentTheme.tsx +0 -70
- package/src/lib/TablePagination/PaginationActionsComponent/themes/uiCustomization.ts +0 -17
- package/src/lib/TablePagination/TablePagination.tsx +0 -148
- package/src/lib/TablePagination/TablePaginationContext.ts +0 -4
- package/src/lib/TablePagination/index.ts +0 -4
- package/src/lib/TablePagination/themes/tablePaginationResponsiveDesign.ts +0 -33
- package/src/lib/TablePagination/themes/tablePaginationTheme.tsx +0 -128
- package/src/lib/TablePagination/themes/uiCustomization.ts +0 -50
- package/src/lib/Tooltip/Tooltip.module.scss +0 -125
- package/src/lib/Tooltip/Tooltip.tsx +0 -34
- package/src/lib/Tooltip/themes/tooltipTheme.ts +0 -30
- package/src/lib/Typography/Typography.tsx +0 -28
- package/src/lib/Typography/themes/typographyTheme.tsx +0 -170
- package/src/lib/Typography/themes/uiCustomization.ts +0 -10
- package/src/lib/constants/styleguideConstants.ts +0 -8
- package/src/lib/styles/colors.module.scss +0 -10
- package/src/lib/styles/sisenseStyleguideReactColors.scss +0 -57
- package/src/lib/styles/style_styleguide_react/_variables.deprecated.scss +0 -107
- package/src/lib/styles/style_styleguide_react/_variables.scss +0 -100
- package/src/lib/styles/style_styleguide_react/base.scss +0 -9
- package/src/lib/styles/style_styleguide_react/colors.scss +0 -71
- package/src/lib/styles/style_styleguide_react/exports/colors.exports.scss +0 -69
- package/src/lib/styles/style_styleguide_react/exports/fonts.exports.scss +0 -33
- package/src/lib/styles/style_styleguide_react/fonts.scss +0 -27
- package/src/lib/styles/style_styleguide_react/mixins.scss +0 -90
- package/src/lib/themes/colors/siColors.ts +0 -143
- package/src/lib/themes/types/SisenseTheme.ts +0 -12
- package/tsconfig.eslint.json +0 -12
- package/tsconfig.json +0 -17
- package/tsconfig.lib.json +0 -22
- package/tsconfig.spec.json +0 -21
- package/vite.config.ts +0 -140
package/src/lib/Icon/Icon.tsx
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import React, { type ForwardedRef, forwardRef } from 'react';
|
|
2
|
-
import { IconProps as MuiIconProps } from '@mui/material';
|
|
3
|
-
import ThemeProvider from '@mui/material/styles/ThemeProvider';
|
|
4
|
-
import SvgIcon from '@mui/material/SvgIcon';
|
|
5
|
-
import classNames from 'classnames';
|
|
6
|
-
|
|
7
|
-
import { iconTheme } from './themes';
|
|
8
|
-
|
|
9
|
-
export type IconProps = {
|
|
10
|
-
className?: string;
|
|
11
|
-
name: string;
|
|
12
|
-
title?: string;
|
|
13
|
-
dataTestId?: string;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
} & MuiIconProps &
|
|
16
|
-
React.HTMLAttributes<HTMLSpanElement>;
|
|
17
|
-
|
|
18
|
-
const SisenseSvgIcon = (props: IconProps) => {
|
|
19
|
-
const { name, sx } = props;
|
|
20
|
-
const svgClassName = classNames('app-icon__svg');
|
|
21
|
-
return (
|
|
22
|
-
<SvgIcon classes={{ root: svgClassName }} sx={sx} inheritViewBox={true}>
|
|
23
|
-
<use xlinkHref={`#${name}`} />
|
|
24
|
-
<symbol id="general-arrow-big-down" viewBox="0 0 24 24">
|
|
25
|
-
<path
|
|
26
|
-
fill="currentColor"
|
|
27
|
-
d="M7.589 10L7 10.777 11.99 15 17 10.777 16.413 10l-4.422 3.727z"
|
|
28
|
-
></path>
|
|
29
|
-
</symbol>
|
|
30
|
-
<symbol id="general-arrow-left" viewBox="0 0 24 24">
|
|
31
|
-
<path
|
|
32
|
-
fill="currentColor"
|
|
33
|
-
d="M13.878 9.325a.5.5 0 1 0-.76-.65l-2.998 3.5a.5.5 0 0 0 0 .65l2.999 3.5a.5.5 0 1 0 .76-.65l-2.72-3.175 2.72-3.175z"
|
|
34
|
-
></path>
|
|
35
|
-
</symbol>
|
|
36
|
-
|
|
37
|
-
<symbol id="general-arrow-long-right" viewBox="0 0 29 8">
|
|
38
|
-
<path
|
|
39
|
-
d="M28.354 4.354a.5.5 0 0 0 0-.708L25.172.464a.5.5 0 1 0-.707.708L27.293 4l-2.828 2.828a.5.5 0 1 0 .707.708l3.182-3.182zM0 4.5h28v-1H0v1z"
|
|
40
|
-
fill="#3A4356"
|
|
41
|
-
></path>
|
|
42
|
-
</symbol>
|
|
43
|
-
|
|
44
|
-
<symbol id="general-arrow-right" viewBox="0 0 24 24">
|
|
45
|
-
<path
|
|
46
|
-
fill="currentColor"
|
|
47
|
-
d="M13.34 12.5l-2.72-3.175a.5.5 0 1 1 .76-.65l2.998 3.5a.5.5 0 0 1 0 .65l-2.998 3.5a.5.5 0 1 1-.76-.65l2.72-3.175z"
|
|
48
|
-
></path>
|
|
49
|
-
</symbol>
|
|
50
|
-
|
|
51
|
-
<symbol id="general-arrow-up" viewBox="0 0 24 24">
|
|
52
|
-
<path
|
|
53
|
-
fill="currentColor"
|
|
54
|
-
d="M12 10.16l-3.174 2.719a.5.5 0 0 1-.65-.76l3.5-2.998a.5.5 0 0 1 .65 0l3.5 2.998a.5.5 0 1 1-.65.76L12 10.159z"
|
|
55
|
-
></path>
|
|
56
|
-
</symbol>
|
|
57
|
-
|
|
58
|
-
<symbol id="general-arrow-up-down" viewBox="0 0 24 24">
|
|
59
|
-
<path
|
|
60
|
-
fill="currentColor"
|
|
61
|
-
d="M15.646 14.646a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L12 18.293l3.646-3.647zm0-5.292L12 5.707 8.354 9.354a.5.5 0 1 1-.708-.708l4-4a.5.5 0 0 1 .708 0l4 4a.5.5 0 0 1-.708.708z"
|
|
62
|
-
></path>
|
|
63
|
-
</symbol>
|
|
64
|
-
|
|
65
|
-
<symbol id="general-double-arrow-back" viewBox="0 0 24 24">
|
|
66
|
-
<path
|
|
67
|
-
fill="currentColor"
|
|
68
|
-
d="M9.658 12.5l2.72 3.175a.5.5 0 1 1-.76.65l-2.998-3.5a.5.5 0 0 1 0-.65l2.999-3.5a.5.5 0 1 1 .76.65L9.658 12.5zm5.719-3.175l-2.72 3.175 2.72 3.175a.5.5 0 1 1-.76.65l-2.998-3.5a.5.5 0 0 1 0-.65l2.998-3.5a.5.5 0 1 1 .76.65z"
|
|
69
|
-
></path>
|
|
70
|
-
</symbol>
|
|
71
|
-
|
|
72
|
-
<symbol id="general-double-arrow-front" viewBox="0 0 24 24">
|
|
73
|
-
<path
|
|
74
|
-
fill="currentColor"
|
|
75
|
-
d="M11.34 12.5L8.62 9.325a.5.5 0 0 1 .76-.65l2.998 3.5a.5.5 0 0 1 0 .65l-2.998 3.5a.5.5 0 1 1-.76-.65l2.72-3.175zm.279-3.175a.5.5 0 0 1 .76-.65l2.998 3.5a.5.5 0 0 1 0 .65l-2.999 3.5a.5.5 0 1 1-.76-.65l2.72-3.175-2.72-3.175z"
|
|
76
|
-
></path>
|
|
77
|
-
</symbol>
|
|
78
|
-
|
|
79
|
-
<symbol id="general-double-big-arrow-back" viewBox="0 0 31 31">
|
|
80
|
-
<g fill="currentColor">
|
|
81
|
-
<path d="M16 11.825l-3.842 4.297 3.662 4.087a.5.5 0 1 1-.76.65l-3.94-4.412a.5.5 0 0 1 0-.65l4.12-4.622a.5.5 0 1 1 .76.65zm5 0l-3.842 4.297 3.662 4.087a.5.5 0 1 1-.76.65l-3.94-4.412a.5.5 0 0 1 0-.65l4.12-4.622a.5.5 0 1 1 .76.65z"></path>
|
|
82
|
-
<path d="M10 11.5a.5.5 0 0 1 1 0v9a.5.5 0 0 1-1 0v-9z"></path>
|
|
83
|
-
</g>
|
|
84
|
-
</symbol>
|
|
85
|
-
|
|
86
|
-
<symbol id="general-double-big-arrow-front" viewBox="0 0 31 31">
|
|
87
|
-
<g fill="currentColor">
|
|
88
|
-
<path d="M15 20.175l3.842-4.297-3.662-4.087a.5.5 0 1 1 .76-.65l3.94 4.412a.5.5 0 0 1 0 .65l-4.12 4.622a.5.5 0 1 1-.76-.65zm-5 0l3.842-4.297-3.662-4.087a.5.5 0 1 1 .76-.65l3.94 4.412a.5.5 0 0 1 0 .65l-4.12 4.622a.5.5 0 1 1-.76-.65z"></path>
|
|
89
|
-
<path d="M21 20.5a.5.5 0 0 1-1 0v-9a.5.5 0 0 1 1 0v9z"></path>
|
|
90
|
-
</g>
|
|
91
|
-
</symbol>
|
|
92
|
-
|
|
93
|
-
<symbol id="general-x" viewBox="0 0 24 24">
|
|
94
|
-
<path
|
|
95
|
-
fill="currentColor"
|
|
96
|
-
d="M12 12.293L6.854 7.146a.5.5 0 1 0-.708.708L11.293 13l-5.147 5.146a.5.5 0 0 0 .708.708L12 13.707l5.146 5.147a.5.5 0 0 0 .708-.708L12.707 13l5.147-5.146a.5.5 0 0 0-.708-.708L12 12.293z"
|
|
97
|
-
></path>
|
|
98
|
-
</symbol>
|
|
99
|
-
</SvgIcon>
|
|
100
|
-
);
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
const Icon = forwardRef((props: IconProps, ref: ForwardedRef<HTMLSpanElement>) => {
|
|
104
|
-
const { dataTestId, name, className } = props;
|
|
105
|
-
const returnedIconComponent = <SisenseSvgIcon {...props} />;
|
|
106
|
-
const iconClassName = classNames('app-icon', `app-icon--${name}`, className);
|
|
107
|
-
|
|
108
|
-
return (
|
|
109
|
-
<ThemeProvider theme={iconTheme}>
|
|
110
|
-
<span data-testid={dataTestId} {...props} ref={ref} className={iconClassName}>
|
|
111
|
-
{returnedIconComponent}
|
|
112
|
-
</span>
|
|
113
|
-
</ThemeProvider>
|
|
114
|
-
);
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
export default Icon;
|
|
118
|
-
export { Icon };
|
package/src/lib/Icon/index.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import createTheme from '@mui/material/styles/createTheme';
|
|
2
|
-
// import { injectStylesWithWrapper, themeService, utils } from '@sbi/styleguide';
|
|
3
|
-
|
|
4
|
-
// import { calcStyles } from './uiCustomization';
|
|
5
|
-
import { siColors } from '../../themes';
|
|
6
|
-
|
|
7
|
-
// injectStylesWithWrapper && injectStylesWithWrapper(calcStyles);
|
|
8
|
-
|
|
9
|
-
declare module '@mui/material/Icon' {
|
|
10
|
-
interface IconPropsVariantOverrides {
|
|
11
|
-
gray: true;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const iconTheme = createTheme({
|
|
16
|
-
components: {
|
|
17
|
-
MuiIcon: {
|
|
18
|
-
styleOverrides: {
|
|
19
|
-
root: {
|
|
20
|
-
color: `${siColors.StPrimaryColors.primary}`,
|
|
21
|
-
top: 0,
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
MuiSvgIcon: {
|
|
26
|
-
// styleOverrides: {
|
|
27
|
-
// root: {
|
|
28
|
-
// fill: utils.makeASlightlyDifferentColor(
|
|
29
|
-
// themeService.getDesignSettings().typography.primaryTextColor,
|
|
30
|
-
// 0.9,
|
|
31
|
-
// ),
|
|
32
|
-
// },
|
|
33
|
-
// },
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
export type IconTheme = typeof iconTheme;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
// import { CalcStyles, DesignSettings, utils } from '@sbi/styleguide';
|
|
3
|
-
//
|
|
4
|
-
// export const calcStyles: CalcStyles = (designSettings: DesignSettings) => ({
|
|
5
|
-
// '.MuiSvgIcon-root': {
|
|
6
|
-
// fill: utils.makeASlightlyDifferentColor(designSettings.typography.secondaryTextColor, 0.1),
|
|
7
|
-
// color: utils.makeASlightlyDifferentColor(designSettings.typography.secondaryTextColor, 0.1),
|
|
8
|
-
// },
|
|
9
|
-
// });
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
@import '../styles/style_styleguide_react/_variables';
|
|
2
|
-
|
|
3
|
-
@mixin component {
|
|
4
|
-
position: relative;
|
|
5
|
-
display: flex;
|
|
6
|
-
align-items: center;
|
|
7
|
-
// .component .icon conflicts with .sis-scope .app-icon on position
|
|
8
|
-
.searchIcon.searchIcon {
|
|
9
|
-
position: absolute;
|
|
10
|
-
left: 8px;
|
|
11
|
-
z-index: 1;
|
|
12
|
-
opacity: 40%;
|
|
13
|
-
&.large {
|
|
14
|
-
top: 4px;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
.clearIcon.clearIcon {
|
|
18
|
-
width: 15px;
|
|
19
|
-
height: 15px;
|
|
20
|
-
position: absolute;
|
|
21
|
-
top: 3px;
|
|
22
|
-
right: 4px;
|
|
23
|
-
border-radius: 20px;
|
|
24
|
-
padding: 4px;
|
|
25
|
-
&:hover {
|
|
26
|
-
background-color: $color-gray-2;
|
|
27
|
-
}
|
|
28
|
-
&.clearIconHidden {
|
|
29
|
-
display: none;
|
|
30
|
-
}
|
|
31
|
-
&.large {
|
|
32
|
-
width: 15px;
|
|
33
|
-
height: 15px;
|
|
34
|
-
top: 4px;
|
|
35
|
-
padding: 5px;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
.passwordVisibilityIcon.passwordVisibilityIcon {
|
|
39
|
-
width: 24px;
|
|
40
|
-
height: 24px;
|
|
41
|
-
position: absolute;
|
|
42
|
-
right: 8px;
|
|
43
|
-
&.large {
|
|
44
|
-
width: 24px;
|
|
45
|
-
height: 24px;
|
|
46
|
-
top: 5px;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.customIcon {
|
|
51
|
-
position: absolute;
|
|
52
|
-
top: 3px;
|
|
53
|
-
right: 4px;
|
|
54
|
-
|
|
55
|
-
&.isLeft {
|
|
56
|
-
right: 0;
|
|
57
|
-
left: 8px;
|
|
58
|
-
}
|
|
59
|
-
&.large {
|
|
60
|
-
top: 5px;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.input {
|
|
65
|
-
border-radius: 4px;
|
|
66
|
-
outline: none;
|
|
67
|
-
background: $color-gray-4;
|
|
68
|
-
line-height: 28px;
|
|
69
|
-
height: 28px;
|
|
70
|
-
border: none;
|
|
71
|
-
text-indent: 8px;
|
|
72
|
-
width: 100%;
|
|
73
|
-
&.withLeftIcon {
|
|
74
|
-
text-indent: 32px;
|
|
75
|
-
}
|
|
76
|
-
&::placeholder {
|
|
77
|
-
color: #b0b5bf;
|
|
78
|
-
}
|
|
79
|
-
&:focus {
|
|
80
|
-
border: 1px solid $color-text;
|
|
81
|
-
}
|
|
82
|
-
&.large {
|
|
83
|
-
height: 34px;
|
|
84
|
-
line-height: 34px;
|
|
85
|
-
}
|
|
86
|
-
&::-ms-reveal {
|
|
87
|
-
display: none;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.component {
|
|
93
|
-
@include component;
|
|
94
|
-
}
|
|
95
|
-
:global(.sis-scope) .component {
|
|
96
|
-
@include component;
|
|
97
|
-
}
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render, fireEvent, screen } from '@testing-library/react';
|
|
3
|
-
import { vi } from 'vitest';
|
|
4
|
-
|
|
5
|
-
import { Input } from './Input';
|
|
6
|
-
import styles from './Input.module.scss';
|
|
7
|
-
|
|
8
|
-
import '@testing-library/jest-dom';
|
|
9
|
-
|
|
10
|
-
describe('Input Component', () => {
|
|
11
|
-
it('should render correctly with basic props', () => {
|
|
12
|
-
render(<Input onChange={vi.fn()} placeholder={'Enter text'} />);
|
|
13
|
-
|
|
14
|
-
const input = screen.getByPlaceholderText('Enter text');
|
|
15
|
-
|
|
16
|
-
expect(input).toBeInTheDocument();
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
it('should handle onChange and updates input value', () => {
|
|
20
|
-
const onChange = vi.fn();
|
|
21
|
-
render(<Input onChange={onChange} placeholder={'Enter text'} />);
|
|
22
|
-
|
|
23
|
-
const input = screen.getByPlaceholderText('Enter text');
|
|
24
|
-
fireEvent.change(input, { target: { value: 'test' } });
|
|
25
|
-
|
|
26
|
-
expect(onChange).toHaveBeenCalledWith('test');
|
|
27
|
-
expect(input).toHaveValue('test');
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
it('should clear input when clearable and clear icon is clicked', () => {
|
|
31
|
-
const onChange = vi.fn();
|
|
32
|
-
const { container } = render(
|
|
33
|
-
<Input onChange={onChange} placeholder={'Enter text'} clearable={true} value={'clear me'} />,
|
|
34
|
-
);
|
|
35
|
-
|
|
36
|
-
const clearIcon = container.querySelector('.app-icon.app-icon--general-x');
|
|
37
|
-
fireEvent.click(clearIcon as Element);
|
|
38
|
-
|
|
39
|
-
expect(onChange).toHaveBeenCalledWith('');
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
it('should render input in password mode', () => {
|
|
43
|
-
render(
|
|
44
|
-
<Input
|
|
45
|
-
onChange={vi.fn()}
|
|
46
|
-
placeholder={'Enter text'}
|
|
47
|
-
clearable={true}
|
|
48
|
-
value={'clear me'}
|
|
49
|
-
password={true}
|
|
50
|
-
/>,
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
const input = screen.getByPlaceholderText('Enter text');
|
|
54
|
-
|
|
55
|
-
expect(input).toHaveAttribute('type', 'password');
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
it('should toggle password visibility', () => {
|
|
59
|
-
const { container } = render(
|
|
60
|
-
<Input
|
|
61
|
-
onChange={vi.fn()}
|
|
62
|
-
placeholder={'Enter text'}
|
|
63
|
-
clearable={true}
|
|
64
|
-
value={'clear me'}
|
|
65
|
-
password={true}
|
|
66
|
-
/>,
|
|
67
|
-
);
|
|
68
|
-
|
|
69
|
-
const input = screen.getByPlaceholderText('Enter text');
|
|
70
|
-
const toggleIcon = container.querySelector('.app-icon.app-icon--general-show');
|
|
71
|
-
fireEvent.click(toggleIcon as Element);
|
|
72
|
-
|
|
73
|
-
expect(input).toHaveAttribute('type', 'text');
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
it('should render search icon when `search` is true', () => {
|
|
77
|
-
const { container } = render(
|
|
78
|
-
<Input onChange={vi.fn()} placeholder={'Enter text'} search={true} />,
|
|
79
|
-
);
|
|
80
|
-
const searchIcon = container.querySelector('.app-icon.app-icon--general-search-small');
|
|
81
|
-
|
|
82
|
-
expect(searchIcon).toBeInTheDocument();
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
it('should render custom icon when `icon` prop is passed', () => {
|
|
86
|
-
const { container } = render(
|
|
87
|
-
<Input
|
|
88
|
-
onChange={vi.fn()}
|
|
89
|
-
placeholder={'Enter text'}
|
|
90
|
-
search={true}
|
|
91
|
-
icon={{ placement: 'left', name: 'custom-icon' }}
|
|
92
|
-
/>,
|
|
93
|
-
);
|
|
94
|
-
|
|
95
|
-
const customIcon = container.querySelector('.app-icon.app-icon--custom-icon');
|
|
96
|
-
|
|
97
|
-
expect(customIcon).toBeInTheDocument();
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
it('should apply className correctly', () => {
|
|
101
|
-
const { container } = render(
|
|
102
|
-
<Input onChange={vi.fn()} placeholder={'Enter text'} className={'custom-class'} />,
|
|
103
|
-
);
|
|
104
|
-
|
|
105
|
-
const wrapper = container.querySelector('.custom-class');
|
|
106
|
-
|
|
107
|
-
expect(wrapper).toHaveClass('custom-class');
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
it('should apply inputClassName correctly', () => {
|
|
111
|
-
render(
|
|
112
|
-
<Input onChange={vi.fn()} placeholder={'Enter text'} inputClassName={'custom-input-class'} />,
|
|
113
|
-
);
|
|
114
|
-
|
|
115
|
-
const input = screen.getByPlaceholderText('Enter text');
|
|
116
|
-
|
|
117
|
-
expect(input).toHaveClass('custom-input-class');
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
it('should handle disabled state correctly', () => {
|
|
121
|
-
render(<Input onChange={vi.fn()} placeholder={'Enter text'} disabled={true} />);
|
|
122
|
-
const input = screen.getByPlaceholderText('Enter text');
|
|
123
|
-
|
|
124
|
-
expect(input).toBeDisabled();
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
it('should trim input when trimInput is true', () => {
|
|
128
|
-
const onChange = vi.fn();
|
|
129
|
-
render(<Input onChange={onChange} placeholder={'Enter text'} trimInput={true} />);
|
|
130
|
-
const input = screen.getByPlaceholderText('Enter text');
|
|
131
|
-
fireEvent.change(input, { target: { value: ' trimmed text ' } });
|
|
132
|
-
|
|
133
|
-
expect(onChange).toHaveBeenCalledWith('trimmed text');
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
it('should prevent default behavior on mouse down for the clear icon', () => {
|
|
137
|
-
const { container } = render(<Input clearable value="test" onChange={vi.fn()} />);
|
|
138
|
-
const clearIcon = container.querySelector('.app-icon.app-icon--general-x');
|
|
139
|
-
const mouseDownEvent = new MouseEvent('mousedown', {
|
|
140
|
-
bubbles: true,
|
|
141
|
-
cancelable: true,
|
|
142
|
-
});
|
|
143
|
-
const preventDefaultSpy = vi.spyOn(mouseDownEvent, 'preventDefault');
|
|
144
|
-
|
|
145
|
-
clearIcon?.dispatchEvent(mouseDownEvent);
|
|
146
|
-
|
|
147
|
-
expect(preventDefaultSpy).toHaveBeenCalled();
|
|
148
|
-
});
|
|
149
|
-
|
|
150
|
-
it('should prevent default behavior on mouse down for the password visibility icon', () => {
|
|
151
|
-
const { container } = render(<Input password value="test" onChange={vi.fn()} />);
|
|
152
|
-
const passwordIcon = container.querySelector('.app-icon.app-icon--general-show');
|
|
153
|
-
const mouseDownEvent = new MouseEvent('mousedown', {
|
|
154
|
-
bubbles: true,
|
|
155
|
-
cancelable: true,
|
|
156
|
-
});
|
|
157
|
-
const preventDefaultSpy = vi.spyOn(mouseDownEvent, 'preventDefault');
|
|
158
|
-
|
|
159
|
-
(passwordIcon as Element).dispatchEvent(mouseDownEvent);
|
|
160
|
-
|
|
161
|
-
expect(preventDefaultSpy).toHaveBeenCalled();
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
it('should apply "withLeftIcon" class when icon is present and placement is left', () => {
|
|
165
|
-
render(
|
|
166
|
-
<Input
|
|
167
|
-
placeholder={'Enter text'}
|
|
168
|
-
icon={{ name: 'test-icon', placement: 'left' }}
|
|
169
|
-
onChange={vi.fn()}
|
|
170
|
-
/>,
|
|
171
|
-
);
|
|
172
|
-
|
|
173
|
-
const input = screen.getByPlaceholderText('Enter text');
|
|
174
|
-
|
|
175
|
-
expect(input).toHaveClass(styles.withLeftIcon);
|
|
176
|
-
});
|
|
177
|
-
});
|
package/src/lib/Input/Input.tsx
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import React, { useState, useRef, useEffect, MouseEventHandler } from 'react';
|
|
2
|
-
import classnames from 'classnames';
|
|
3
|
-
|
|
4
|
-
import { DEPRECATED_Icon } from '../DEPRECATED_Icon';
|
|
5
|
-
|
|
6
|
-
import styles from './Input.module.scss';
|
|
7
|
-
|
|
8
|
-
export interface InputProps
|
|
9
|
-
extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'small' | 'onChange'> {
|
|
10
|
-
className?: string;
|
|
11
|
-
inputClassName?: string;
|
|
12
|
-
onChange: (value: string) => void;
|
|
13
|
-
onClicked?: MouseEventHandler;
|
|
14
|
-
onBlur?: () => void;
|
|
15
|
-
placeholder?: string;
|
|
16
|
-
search?: boolean;
|
|
17
|
-
dataTestId?: string;
|
|
18
|
-
defaultValue?: string;
|
|
19
|
-
value?: string;
|
|
20
|
-
autoFocus?: boolean;
|
|
21
|
-
clearable?: boolean;
|
|
22
|
-
password?: boolean;
|
|
23
|
-
disabled?: boolean;
|
|
24
|
-
size?: 'small' | 'large';
|
|
25
|
-
icon?: { name: string; placement?: 'right' | 'left' };
|
|
26
|
-
trimInput?: boolean;
|
|
27
|
-
ariaLabel?: React.AriaAttributes['aria-label'];
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const Input = (props: InputProps): JSX.Element => {
|
|
31
|
-
const {
|
|
32
|
-
className,
|
|
33
|
-
inputClassName,
|
|
34
|
-
onChange,
|
|
35
|
-
onClicked,
|
|
36
|
-
onBlur = () => {},
|
|
37
|
-
placeholder,
|
|
38
|
-
search,
|
|
39
|
-
dataTestId,
|
|
40
|
-
defaultValue,
|
|
41
|
-
value,
|
|
42
|
-
autoFocus,
|
|
43
|
-
clearable,
|
|
44
|
-
password,
|
|
45
|
-
disabled = false,
|
|
46
|
-
size,
|
|
47
|
-
icon,
|
|
48
|
-
trimInput,
|
|
49
|
-
ariaLabel = 'input',
|
|
50
|
-
} = props;
|
|
51
|
-
|
|
52
|
-
const [inputValue, setInputValue] = useState(defaultValue || value || '');
|
|
53
|
-
const [passwordIsVisible, setPasswordIsVisible] = useState(false);
|
|
54
|
-
const inputRef = useRef<HTMLInputElement>(null);
|
|
55
|
-
|
|
56
|
-
const { name: iconName = '', placement: iconPlacement } = icon || {};
|
|
57
|
-
|
|
58
|
-
useEffect(() => {
|
|
59
|
-
setInputValue(value || '');
|
|
60
|
-
}, [value]);
|
|
61
|
-
|
|
62
|
-
return (
|
|
63
|
-
<div className={classnames(styles.component, className)}>
|
|
64
|
-
{search && (
|
|
65
|
-
<DEPRECATED_Icon
|
|
66
|
-
className={classnames(styles.searchIcon, {
|
|
67
|
-
[styles.large]: size === 'large',
|
|
68
|
-
})}
|
|
69
|
-
name="general-search-small"
|
|
70
|
-
/>
|
|
71
|
-
)}
|
|
72
|
-
<input
|
|
73
|
-
className={classnames(styles.input, inputClassName, {
|
|
74
|
-
[styles.withLeftIcon]: search || (icon && iconPlacement === 'left'),
|
|
75
|
-
[styles.large]: size === 'large',
|
|
76
|
-
})}
|
|
77
|
-
placeholder={placeholder}
|
|
78
|
-
disabled={disabled}
|
|
79
|
-
onChange={(e) => {
|
|
80
|
-
const value = trimInput ? e.target.value.trim() : e.target.value;
|
|
81
|
-
onChange(value);
|
|
82
|
-
setInputValue(e.target.value);
|
|
83
|
-
}}
|
|
84
|
-
onClick={onClicked}
|
|
85
|
-
onBlur={onBlur}
|
|
86
|
-
data-testid={dataTestId}
|
|
87
|
-
defaultValue={defaultValue}
|
|
88
|
-
value={value ?? inputValue}
|
|
89
|
-
autoFocus={autoFocus}
|
|
90
|
-
type={password && !passwordIsVisible ? 'password' : 'text'}
|
|
91
|
-
ref={inputRef}
|
|
92
|
-
aria-label={ariaLabel}
|
|
93
|
-
/>
|
|
94
|
-
{clearable && !password && !icon && (
|
|
95
|
-
<DEPRECATED_Icon
|
|
96
|
-
className={classnames(styles.clearIcon, {
|
|
97
|
-
[styles.clearIconHidden]: inputValue === '',
|
|
98
|
-
[styles.large]: size === 'large',
|
|
99
|
-
})}
|
|
100
|
-
name="general-x"
|
|
101
|
-
onClick={() => {
|
|
102
|
-
setInputValue('');
|
|
103
|
-
onChange('');
|
|
104
|
-
}}
|
|
105
|
-
onMouseDown={(e) => e.preventDefault()}
|
|
106
|
-
/>
|
|
107
|
-
)}
|
|
108
|
-
{password && (
|
|
109
|
-
<DEPRECATED_Icon
|
|
110
|
-
className={classnames(styles.passwordVisibilityIcon, {
|
|
111
|
-
[styles.large]: size === 'large',
|
|
112
|
-
})}
|
|
113
|
-
name={passwordIsVisible ? 'general-unhide' : 'general-show'}
|
|
114
|
-
onClick={() => {
|
|
115
|
-
setPasswordIsVisible(!passwordIsVisible);
|
|
116
|
-
}}
|
|
117
|
-
onMouseDown={(e) => e.preventDefault()}
|
|
118
|
-
/>
|
|
119
|
-
)}
|
|
120
|
-
{icon && !clearable && !password && (
|
|
121
|
-
<DEPRECATED_Icon
|
|
122
|
-
className={classnames(styles.customIcon, {
|
|
123
|
-
[styles.large]: size === 'large',
|
|
124
|
-
[styles.isLeft]: iconPlacement === 'left',
|
|
125
|
-
})}
|
|
126
|
-
name={iconName}
|
|
127
|
-
/>
|
|
128
|
-
)}
|
|
129
|
-
</div>
|
|
130
|
-
);
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
export default Input;
|
|
134
|
-
export { Input };
|
package/src/lib/Input/index.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
// @import '~@sbi/styleguide/src/sass/components/_loader-two-dots.scss';
|
|
2
|
-
|
|
3
|
-
.loader {
|
|
4
|
-
display: flex;
|
|
5
|
-
align-content: center;
|
|
6
|
-
justify-content: center;
|
|
7
|
-
align-items: center;
|
|
8
|
-
|
|
9
|
-
.caption {
|
|
10
|
-
margin-top: 50%;
|
|
11
|
-
word-break: break-word;
|
|
12
|
-
text-align: center;
|
|
13
|
-
|
|
14
|
-
span {
|
|
15
|
-
position: unset;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
|
|
4
|
-
import style from './LazyLoader.module.scss';
|
|
5
|
-
|
|
6
|
-
export type LazyLoaderProps = {
|
|
7
|
-
className?: string;
|
|
8
|
-
caption?: string;
|
|
9
|
-
isLoading?: boolean;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const LazyLoader = (props: LazyLoaderProps): JSX.Element => {
|
|
13
|
-
const { className = '', caption = '', isLoading = false } = props;
|
|
14
|
-
|
|
15
|
-
const hostClasses = classNames(
|
|
16
|
-
style['loader-two-dots'],
|
|
17
|
-
{
|
|
18
|
-
[style['loader-two-dots--inactive']]: !isLoading,
|
|
19
|
-
},
|
|
20
|
-
className,
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
const loaderIndicatorClass = classNames(style.loader, style['loader-two-dots-indicator']);
|
|
24
|
-
const captionClass = classNames(style.caption);
|
|
25
|
-
|
|
26
|
-
return (
|
|
27
|
-
<div className={hostClasses}>
|
|
28
|
-
{isLoading && (
|
|
29
|
-
<div data-testid="loader-component" className={loaderIndicatorClass}>
|
|
30
|
-
{caption && (
|
|
31
|
-
<div className={captionClass}>
|
|
32
|
-
<span>{caption}</span>
|
|
33
|
-
</div>
|
|
34
|
-
)}
|
|
35
|
-
</div>
|
|
36
|
-
)}
|
|
37
|
-
</div>
|
|
38
|
-
);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export default LazyLoader;
|
|
42
|
-
export { LazyLoader };
|