@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const k=require("react"),n=require("./index-B-zZeebW.cjs"),K=require("./ThemeProvider-BjBWRt7C.cjs"),de=require("./useTheme-BN6DGaDZ.cjs"),Ee=require("react/jsx-runtime"),d=require("./useTimeout-DQN9lwd_.cjs"),Te=require("./setPrototypeOf-BmHXYjK5.cjs"),L=require("react-dom"),G=require("./useSlotProps-COvANhgg.cjs");function Z(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const r=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(s,a,r.get?r:{enumerable:!0,get:()=>t[a]})}}return s.default=t,Object.freeze(s)}const f=Z(k),me=Z(L);function ee(){const t=de.useTheme(K.defaultTheme);return process.env.NODE_ENV!=="production"&&f.useDebugValue(t),t[K.THEME_ID]||t}const J={disabled:!1};var ye=process.env.NODE_ENV!=="production"?n.PropTypes.oneOfType([n.PropTypes.number,n.PropTypes.shape({enter:n.PropTypes.number,exit:n.PropTypes.number,appear:n.PropTypes.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&n.PropTypes.oneOfType([n.PropTypes.string,n.PropTypes.shape({enter:n.PropTypes.string,exit:n.PropTypes.string,active:n.PropTypes.string}),n.PropTypes.shape({enter:n.PropTypes.string,enterDone:n.PropTypes.string,enterActive:n.PropTypes.string,exit:n.PropTypes.string,exitDone:n.PropTypes.string,exitActive:n.PropTypes.string})]);var he=function(s){return s.scrollTop},M="unmounted",g="exited",v="entering",w="entered",U="exiting",E=function(t){d._inheritsLoose(s,t);function s(r,o){var e;e=t.call(this,r,o)||this;var i=o,p=i&&!i.isMounting?r.enter:r.appear,u;return e.appearStatus=null,r.in?p?(u=g,e.appearStatus=v):u=w:r.unmountOnExit||r.mountOnEnter?u=M:u=g,e.state={status:u},e.nextCallback=null,e}s.getDerivedStateFromProps=function(o,e){var i=o.in;return i&&e.status===M?{status:g}:null};var a=s.prototype;return a.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},a.componentDidUpdate=function(o){var e=null;if(o!==this.props){var i=this.state.status;this.props.in?i!==v&&i!==w&&(e=v):(i===v||i===w)&&(e=U)}this.updateStatus(!1,e)},a.componentWillUnmount=function(){this.cancelNextCallback()},a.getTimeouts=function(){var o=this.props.timeout,e,i,p;return e=i=p=o,o!=null&&typeof o!="number"&&(e=o.exit,i=o.enter,p=o.appear!==void 0?o.appear:i),{exit:e,enter:i,appear:p}},a.updateStatus=function(o,e){if(o===void 0&&(o=!1),e!==null)if(this.cancelNextCallback(),e===v){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:L.findDOMNode(this);i&&he(i)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===g&&this.setState({status:M})},a.performEnter=function(o){var e=this,i=this.props.enter,p=this.context?this.context.isMounting:o,u=this.props.nodeRef?[p]:[L.findDOMNode(this),p],l=u[0],T=u[1],x=this.getTimeouts(),b=p?x.appear:x.enter;if(!o&&!i||J.disabled){this.safeSetState({status:w},function(){e.props.onEntered(l)});return}this.props.onEnter(l,T),this.safeSetState({status:v},function(){e.props.onEntering(l,T),e.onTransitionEnd(b,function(){e.safeSetState({status:w},function(){e.props.onEntered(l,T)})})})},a.performExit=function(){var o=this,e=this.props.exit,i=this.getTimeouts(),p=this.props.nodeRef?void 0:L.findDOMNode(this);if(!e||J.disabled){this.safeSetState({status:g},function(){o.props.onExited(p)});return}this.props.onExit(p),this.safeSetState({status:U},function(){o.props.onExiting(p),o.onTransitionEnd(i.exit,function(){o.safeSetState({status:g},function(){o.props.onExited(p)})})})},a.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},a.safeSetState=function(o,e){e=this.setNextCallback(e),this.setState(o,e)},a.setNextCallback=function(o){var e=this,i=!0;return this.nextCallback=function(p){i&&(i=!1,e.nextCallback=null,o(p))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},a.onTransitionEnd=function(o,e){this.setNextCallback(e);var i=this.props.nodeRef?this.props.nodeRef.current:L.findDOMNode(this),p=o==null&&!this.props.addEndListener;if(!i||p){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],l=u[0],T=u[1];this.props.addEndListener(l,T)}o!=null&&setTimeout(this.nextCallback,o)},a.render=function(){var o=this.state.status;if(o===M)return null;var e=this.props,i=e.children;e.in,e.mountOnEnter,e.unmountOnExit,e.appear,e.enter,e.exit,e.timeout,e.addEndListener,e.onEnter,e.onEntering,e.onEntered,e.onExit,e.onExiting,e.onExited,e.nodeRef;var p=Te._objectWithoutPropertiesLoose(e,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return k.createElement(d.TransitionGroupContext.Provider,{value:null},typeof i=="function"?i(o,p):k.cloneElement(k.Children.only(i),p))},s}(k.Component);E.contextType=d.TransitionGroupContext;E.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:n.PropTypes.shape({current:typeof Element>"u"?n.PropTypes.any:function(t,s,a,r,o,e){var i=t[s];return n.PropTypes.instanceOf(i&&"ownerDocument"in i?i.ownerDocument.defaultView.Element:Element)(t,s,a,r,o,e)}}),children:n.PropTypes.oneOfType([n.PropTypes.func.isRequired,n.PropTypes.element.isRequired]).isRequired,in:n.PropTypes.bool,mountOnEnter:n.PropTypes.bool,unmountOnExit:n.PropTypes.bool,appear:n.PropTypes.bool,enter:n.PropTypes.bool,exit:n.PropTypes.bool,timeout:function(s){var a=ye;s.addEndListener||(a=a.isRequired);for(var r=arguments.length,o=new Array(r>1?r-1:0),e=1;e<r;e++)o[e-1]=arguments[e];return a.apply(void 0,[s].concat(o))},addEndListener:n.PropTypes.func,onEnter:n.PropTypes.func,onEntering:n.PropTypes.func,onEntered:n.PropTypes.func,onExit:n.PropTypes.func,onExiting:n.PropTypes.func,onExited:n.PropTypes.func}:{};function C(){}E.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:C,onEntering:C,onEntered:C,onExit:C,onExiting:C,onExited:C};E.UNMOUNTED=M;E.EXITED=g;E.ENTERING=v;E.ENTERED=w;E.EXITING=U;function Pe(t){const{prototype:s={}}=t;return!!s.isReactComponent}function te(t,s,a,r,o){const e=t[s],i=o||s;if(e==null||typeof window>"u")return null;let p;const u=e.type;return typeof u=="function"&&!Pe(u)&&(p="Did you accidentally use a plain function component for an element instead?"),p!==void 0?new Error(`Invalid ${r} \`${i}\` supplied to \`${a}\`. Expected an element that can hold a ref. ${p} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const z=d.chainPropTypes(n.PropTypes.element,te);z.isRequired=d.chainPropTypes(n.PropTypes.element.isRequired,te);function B(t){var s;return parseInt(f.version,10)>=19?((s=t==null?void 0:t.props)==null?void 0:s.ref)||null:(t==null?void 0:t.ref)||null}const ne=t=>t.scrollTop;function W(t,s){const{timeout:a,easing:r,style:o={}}=t;return{duration:o.transitionDuration??(typeof a=="number"?a:a[s.mode]||0),easing:o.transitionTimingFunction??(typeof r=="object"?r[s.mode]:r),delay:o.transitionDelay}}function X(t){return`scale(${t}, ${t**2})`}const xe={entering:{opacity:1,transform:X(1)},entered:{opacity:1,transform:"none"}},H=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),V=f.forwardRef(function(s,a){const{addEndListener:r,appear:o=!0,children:e,easing:i,in:p,onEnter:u,onEntered:l,onEntering:T,onExit:x,onExited:b,onExiting:N,style:R,timeout:m="auto",TransitionComponent:F=E,...A}=s,_=d.useTimeout(),I=f.useRef(),D=ee(),q=f.useRef(null),ie=d.useForkRef(q,B(e),a),O=c=>h=>{if(c){const P=q.current;h===void 0?c(P):c(P,h)}},se=O(T),ae=O((c,h)=>{ne(c);const{duration:P,delay:j,easing:y}=W({style:R,timeout:m,easing:i},{mode:"enter"});let S;m==="auto"?(S=D.transitions.getAutoHeightDuration(c.clientHeight),I.current=S):S=P,c.style.transition=[D.transitions.create("opacity",{duration:S,delay:j}),D.transitions.create("transform",{duration:H?S:S*.666,delay:j,easing:y})].join(","),u&&u(c,h)}),pe=O(l),ue=O(N),ce=O(c=>{const{duration:h,delay:P,easing:j}=W({style:R,timeout:m,easing:i},{mode:"exit"});let y;m==="auto"?(y=D.transitions.getAutoHeightDuration(c.clientHeight),I.current=y):y=h,c.style.transition=[D.transitions.create("opacity",{duration:y,delay:P}),D.transitions.create("transform",{duration:H?y:y*.666,delay:H?P:P||y*.333,easing:j})].join(","),c.style.opacity=0,c.style.transform=X(.75),x&&x(c)}),le=O(b),fe=c=>{m==="auto"&&_.start(I.current||0,c),r&&r(q.current,c)};return Ee.jsx(F,{appear:o,in:p,nodeRef:q,onEnter:ae,onEntered:pe,onEntering:se,onExit:ce,onExited:le,onExiting:ue,addEndListener:fe,timeout:m==="auto"?null:m,...A,children:(c,h)=>f.cloneElement(e,{style:{opacity:0,transform:X(.75),visibility:c==="exited"&&!p?"hidden":void 0,...xe[c],...R,...e.props.style},ref:ie,...h})})});process.env.NODE_ENV!=="production"&&(V.propTypes={addEndListener:n.PropTypes.func,appear:n.PropTypes.bool,children:z.isRequired,easing:n.PropTypes.oneOfType([n.PropTypes.shape({enter:n.PropTypes.string,exit:n.PropTypes.string}),n.PropTypes.string]),in:n.PropTypes.bool,onEnter:n.PropTypes.func,onEntered:n.PropTypes.func,onEntering:n.PropTypes.func,onExit:n.PropTypes.func,onExited:n.PropTypes.func,onExiting:n.PropTypes.func,style:n.PropTypes.object,timeout:n.PropTypes.oneOfType([n.PropTypes.oneOf(["auto"]),n.PropTypes.number,n.PropTypes.shape({appear:n.PropTypes.number,enter:n.PropTypes.number,exit:n.PropTypes.number})])});V&&(V.muiSupportAuto=!0);function oe(t,s,a,r,o){if(process.env.NODE_ENV==="production")return null;const e=t[s],i=o||s;return e==null?null:e&&e.nodeType!==1?new Error(`Invalid ${r} \`${i}\` supplied to \`${a}\`. Expected an HTMLElement.`):null}const ge="exact-prop: ";function re(t){return process.env.NODE_ENV==="production"?t:{...t,[ge]:s=>{const a=Object.keys(s).filter(r=>!t.hasOwnProperty(r));return a.length>0?new Error(`The following props are not supported: ${a.map(r=>`\`${r}\``).join(", ")}. Please remove them.`):null}}}function ve(t){return t&&t.ownerDocument||document}let Q=0;function be(t){const[s,a]=f.useState(t),r=t||s;return f.useEffect(()=>{s==null&&(Q+=1,a(`mui-${Q}`))},[s]),r}const Ne={...f},Y=Ne.useId;function Re(t){if(Y!==void 0){const s=Y();return t??s}return be(t)}function De(t){return typeof t=="function"?t():t}const $=f.forwardRef(function(s,a){const{children:r,container:o,disablePortal:e=!1}=s,[i,p]=f.useState(null),u=d.useForkRef(f.isValidElement(r)?B(r):null,a);if(d.useEnhancedEffect(()=>{e||p(De(o)||document.body)},[o,e]),d.useEnhancedEffect(()=>{if(i&&!e)return d.setRef(a,i),()=>{d.setRef(a,null)}},[a,i,e]),e){if(f.isValidElement(r)){const l={ref:u};return f.cloneElement(r,l)}return r}return i&&me.createPortal(r,i)});process.env.NODE_ENV!=="production"&&($.propTypes={children:n.PropTypes.node,container:n.PropTypes.oneOfType([oe,n.PropTypes.func]),disablePortal:n.PropTypes.bool});process.env.NODE_ENV!=="production"&&($.propTypes=re($.propTypes));function Oe(t,s){const{className:a,elementType:r,ownerState:o,externalForwardedProps:e,internalForwardedProps:i,...p}=s,{component:u,slots:l={[t]:void 0},slotProps:T={[t]:void 0},...x}=e,b=l[t]||r,N=G.resolveComponentProps(T[t],o),{props:{component:R,...m},internalRef:F}=G.mergeSlotProps({className:a,...p,externalForwardedProps:t==="root"?x:void 0,externalSlotProps:N}),A=d.useForkRef(F,N==null?void 0:N.ref,s.ref),_=t==="root"?R||u:R,I=G.appendOwnerState(b,{...t==="root"&&!u&&!l[t]&&i,...t!=="root"&&!l[t]&&i,...m,..._&&{as:_},ref:A},o);return[b,I]}exports.Grow=V;exports.HTMLElementType=oe;exports.Portal=$;exports.Transition=E;exports.elementAcceptingRef=z;exports.exactProp=re;exports.getReactElementRef=B;exports.getTransitionProps=W;exports.ownerDocument=ve;exports.reflow=ne;exports.useId=Re;exports.useSlot=Oe;exports.useTheme=ee;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { f as N } from "./ThemeProvider-BCsnqK18.js";
|
|
2
|
+
import { u as v } from "./useTimeout-BG7TPjEm.js";
|
|
3
|
+
function E(n) {
|
|
4
|
+
return typeof n == "string";
|
|
5
|
+
}
|
|
6
|
+
function H(n, f, e) {
|
|
7
|
+
return n === void 0 || E(n) ? f : {
|
|
8
|
+
...f,
|
|
9
|
+
ownerState: {
|
|
10
|
+
...f.ownerState,
|
|
11
|
+
...e
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function O(n, f = []) {
|
|
16
|
+
if (n === void 0)
|
|
17
|
+
return {};
|
|
18
|
+
const e = {};
|
|
19
|
+
return Object.keys(n).filter((s) => s.match(/^on[A-Z]/) && typeof n[s] == "function" && !f.includes(s)).forEach((s) => {
|
|
20
|
+
e[s] = n[s];
|
|
21
|
+
}), e;
|
|
22
|
+
}
|
|
23
|
+
function k(n) {
|
|
24
|
+
if (n === void 0)
|
|
25
|
+
return {};
|
|
26
|
+
const f = {};
|
|
27
|
+
return Object.keys(n).filter((e) => !(e.match(/^on[A-Z]/) && typeof n[e] == "function")).forEach((e) => {
|
|
28
|
+
f[e] = n[e];
|
|
29
|
+
}), f;
|
|
30
|
+
}
|
|
31
|
+
function R(n) {
|
|
32
|
+
const {
|
|
33
|
+
getSlotProps: f,
|
|
34
|
+
additionalProps: e,
|
|
35
|
+
externalSlotProps: s,
|
|
36
|
+
externalForwardedProps: t,
|
|
37
|
+
className: m
|
|
38
|
+
} = n;
|
|
39
|
+
if (!f) {
|
|
40
|
+
const h = N(e == null ? void 0 : e.className, m, t == null ? void 0 : t.className, s == null ? void 0 : s.className), r = {
|
|
41
|
+
...e == null ? void 0 : e.style,
|
|
42
|
+
...t == null ? void 0 : t.style,
|
|
43
|
+
...s == null ? void 0 : s.style
|
|
44
|
+
}, o = {
|
|
45
|
+
...e,
|
|
46
|
+
...t,
|
|
47
|
+
...s
|
|
48
|
+
};
|
|
49
|
+
return h.length > 0 && (o.className = h), Object.keys(r).length > 0 && (o.style = r), {
|
|
50
|
+
props: o,
|
|
51
|
+
internalRef: void 0
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
const u = O({
|
|
55
|
+
...t,
|
|
56
|
+
...s
|
|
57
|
+
}), y = k(s), l = k(t), c = f(u), a = N(c == null ? void 0 : c.className, e == null ? void 0 : e.className, m, t == null ? void 0 : t.className, s == null ? void 0 : s.className), i = {
|
|
58
|
+
...c == null ? void 0 : c.style,
|
|
59
|
+
...e == null ? void 0 : e.style,
|
|
60
|
+
...t == null ? void 0 : t.style,
|
|
61
|
+
...s == null ? void 0 : s.style
|
|
62
|
+
}, g = {
|
|
63
|
+
...c,
|
|
64
|
+
...e,
|
|
65
|
+
...l,
|
|
66
|
+
...y
|
|
67
|
+
};
|
|
68
|
+
return a.length > 0 && (g.className = a), Object.keys(i).length > 0 && (g.style = i), {
|
|
69
|
+
props: g,
|
|
70
|
+
internalRef: c.ref
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function C(n, f, e) {
|
|
74
|
+
return typeof n == "function" ? n(f, e) : n;
|
|
75
|
+
}
|
|
76
|
+
function W(n) {
|
|
77
|
+
var i;
|
|
78
|
+
const {
|
|
79
|
+
elementType: f,
|
|
80
|
+
externalSlotProps: e,
|
|
81
|
+
ownerState: s,
|
|
82
|
+
skipResolvingSlotProps: t = !1,
|
|
83
|
+
...m
|
|
84
|
+
} = n, u = t ? {} : C(e, s), {
|
|
85
|
+
props: y,
|
|
86
|
+
internalRef: l
|
|
87
|
+
} = R({
|
|
88
|
+
...m,
|
|
89
|
+
externalSlotProps: u
|
|
90
|
+
}), c = v(l, u == null ? void 0 : u.ref, (i = n.additionalProps) == null ? void 0 : i.ref);
|
|
91
|
+
return H(f, {
|
|
92
|
+
...y,
|
|
93
|
+
ref: c
|
|
94
|
+
}, s);
|
|
95
|
+
}
|
|
96
|
+
export {
|
|
97
|
+
H as a,
|
|
98
|
+
O as e,
|
|
99
|
+
R as m,
|
|
100
|
+
C as r,
|
|
101
|
+
W as u
|
|
102
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("./ThemeProvider-BjBWRt7C.cjs"),R=require("./useTimeout-DQN9lwd_.cjs");function S(n){return typeof n=="string"}function E(n,c,e){return n===void 0||S(n)?c:{...c,ownerState:{...c.ownerState,...e}}}function H(n,c=[]){if(n===void 0)return{};const e={};return Object.keys(n).filter(t=>t.match(/^on[A-Z]/)&&typeof n[t]=="function"&&!c.includes(t)).forEach(t=>{e[t]=n[t]}),e}function v(n){if(n===void 0)return{};const c={};return Object.keys(n).filter(e=>!(e.match(/^on[A-Z]/)&&typeof n[e]=="function")).forEach(e=>{c[e]=n[e]}),c}function k(n){const{getSlotProps:c,additionalProps:e,externalSlotProps:t,externalForwardedProps:s,className:l}=n;if(!c){const h=a.clsx(e==null?void 0:e.className,l,s==null?void 0:s.className,t==null?void 0:t.className),N={...e==null?void 0:e.style,...s==null?void 0:s.style,...t==null?void 0:t.style},g={...e,...s,...t};return h.length>0&&(g.className=h),Object.keys(N).length>0&&(g.style=N),{props:g,internalRef:void 0}}const u=H({...s,...t}),m=v(t),r=v(s),f=c(u),y=a.clsx(f==null?void 0:f.className,e==null?void 0:e.className,l,s==null?void 0:s.className,t==null?void 0:t.className),i={...f==null?void 0:f.style,...e==null?void 0:e.style,...s==null?void 0:s.style,...t==null?void 0:t.style},o={...f,...e,...r,...m};return y.length>0&&(o.className=y),Object.keys(i).length>0&&(o.style=i),{props:o,internalRef:f.ref}}function O(n,c,e){return typeof n=="function"?n(c,e):n}function C(n){var i;const{elementType:c,externalSlotProps:e,ownerState:t,skipResolvingSlotProps:s=!1,...l}=n,u=s?{}:O(e,t),{props:m,internalRef:r}=k({...l,externalSlotProps:u}),f=R.useForkRef(r,u==null?void 0:u.ref,(i=n.additionalProps)==null?void 0:i.ref);return E(c,{...m,ref:f},t)}exports.appendOwnerState=E;exports.extractEventHandlers=H;exports.mergeSlotProps=k;exports.resolveComponentProps=O;exports.useSlotProps=C;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./ThemeProvider-BjBWRt7C.cjs"),t=e.createTheme();function r(s=t){return e.useTheme(s)}exports.useTheme=r;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
var f = Object.defineProperty;
|
|
2
|
+
var a = (e, t, r) => t in e ? f(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var o = (e, t, r) => a(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
+
import { P as u } from "./index-D0lMis-I.js";
|
|
5
|
+
import * as n from "react";
|
|
6
|
+
import p from "react";
|
|
7
|
+
import { a as l } from "./setPrototypeOf-CEtRTXk2.js";
|
|
8
|
+
const v = u.oneOfType([u.func, u.object]);
|
|
9
|
+
function N(e, t) {
|
|
10
|
+
return process.env.NODE_ENV === "production" ? () => null : function(...s) {
|
|
11
|
+
return e(...s) || t(...s);
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function O(e) {
|
|
15
|
+
try {
|
|
16
|
+
return e.matches(":focus-visible");
|
|
17
|
+
} catch {
|
|
18
|
+
process.env.NODE_ENV !== "production" && !/jsdom/.test(window.navigator.userAgent) && console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.", "Some components rely on this feature to work properly."].join(`
|
|
19
|
+
`));
|
|
20
|
+
}
|
|
21
|
+
return !1;
|
|
22
|
+
}
|
|
23
|
+
function d(e, t) {
|
|
24
|
+
typeof e == "function" ? e(t) : e && (e.current = t);
|
|
25
|
+
}
|
|
26
|
+
function _(...e) {
|
|
27
|
+
return n.useMemo(() => e.every((t) => t == null) ? null : (t) => {
|
|
28
|
+
e.forEach((r) => {
|
|
29
|
+
d(r, t);
|
|
30
|
+
});
|
|
31
|
+
}, e);
|
|
32
|
+
}
|
|
33
|
+
const m = typeof window < "u" ? n.useLayoutEffect : n.useEffect;
|
|
34
|
+
function b(e) {
|
|
35
|
+
const t = n.useRef(e);
|
|
36
|
+
return m(() => {
|
|
37
|
+
t.current = e;
|
|
38
|
+
}), n.useRef((...r) => (
|
|
39
|
+
// @ts-expect-error hide `this`
|
|
40
|
+
(0, t.current)(...r)
|
|
41
|
+
)).current;
|
|
42
|
+
}
|
|
43
|
+
const i = {};
|
|
44
|
+
function h(e, t) {
|
|
45
|
+
const r = n.useRef(i);
|
|
46
|
+
return r.current === i && (r.current = e(t)), r;
|
|
47
|
+
}
|
|
48
|
+
function P(e, t) {
|
|
49
|
+
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, l(e, t);
|
|
50
|
+
}
|
|
51
|
+
const j = p.createContext(null), y = [];
|
|
52
|
+
function E(e) {
|
|
53
|
+
n.useEffect(e, y);
|
|
54
|
+
}
|
|
55
|
+
class c {
|
|
56
|
+
constructor() {
|
|
57
|
+
o(this, "currentId", null);
|
|
58
|
+
o(this, "clear", () => {
|
|
59
|
+
this.currentId !== null && (clearTimeout(this.currentId), this.currentId = null);
|
|
60
|
+
});
|
|
61
|
+
o(this, "disposeEffect", () => this.clear);
|
|
62
|
+
}
|
|
63
|
+
static create() {
|
|
64
|
+
return new c();
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Executes `fn` after `delay`, clearing any previously scheduled call.
|
|
68
|
+
*/
|
|
69
|
+
start(t, r) {
|
|
70
|
+
this.clear(), this.currentId = setTimeout(() => {
|
|
71
|
+
this.currentId = null, r();
|
|
72
|
+
}, t);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
function L() {
|
|
76
|
+
const e = h(c.create).current;
|
|
77
|
+
return E(e.disposeEffect), e;
|
|
78
|
+
}
|
|
79
|
+
export {
|
|
80
|
+
j as T,
|
|
81
|
+
P as _,
|
|
82
|
+
h as a,
|
|
83
|
+
L as b,
|
|
84
|
+
N as c,
|
|
85
|
+
b as d,
|
|
86
|
+
m as e,
|
|
87
|
+
c as f,
|
|
88
|
+
O as i,
|
|
89
|
+
v as r,
|
|
90
|
+
d as s,
|
|
91
|
+
_ as u
|
|
92
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var d=Object.defineProperty;var y=(e,t,n)=>t in e?d(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var u=(e,t,n)=>y(e,typeof t!="symbol"?t+"":t,n);const s=require("./index-B-zZeebW.cjs"),f=require("react"),h=require("./setPrototypeOf-BmHXYjK5.cjs");function T(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const r=T(f),E=s.PropTypes.oneOfType([s.PropTypes.func,s.PropTypes.object]);function m(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...o){return e(...o)||t(...o)}}function b(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
|
|
2
|
+
`))}return!1}function a(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function O(...e){return r.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{a(n,t)})},e)}const p=typeof window<"u"?r.useLayoutEffect:r.useEffect;function I(e){const t=r.useRef(e);return p(()=>{t.current=e}),r.useRef((...n)=>(0,t.current)(...n)).current}const i={};function l(e,t){const n=r.useRef(i);return n.current===i&&(n.current=e(t)),n}function R(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,h._setPrototypeOf(e,t)}const P=f.createContext(null),v=[];function w(e){r.useEffect(e,v)}class c{constructor(){u(this,"currentId",null);u(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});u(this,"disposeEffect",()=>this.clear)}static create(){return new c}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function j(){const e=l(c.create).current;return w(e.disposeEffect),e}exports.Timeout=c;exports.TransitionGroupContext=P;exports._inheritsLoose=R;exports.chainPropTypes=m;exports.isFocusVisible=b;exports.refType=E;exports.setRef=a;exports.useEnhancedEffect=p;exports.useEventCallback=I;exports.useForkRef=O;exports.useLazyRef=l;exports.useTimeout=j;
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"url": "https://github.com/sisense/compose-sdk-monorepo",
|
|
7
7
|
"directory": "packages/sdk-shared-ui"
|
|
8
8
|
},
|
|
9
|
-
"version": "1.
|
|
9
|
+
"version": "1.29.0",
|
|
10
10
|
"type": "module",
|
|
11
11
|
"sideEffects": false,
|
|
12
12
|
"main": "./dist/index.js",
|
|
@@ -103,6 +103,16 @@
|
|
|
103
103
|
"import": "./dist/lib/Dropdown/Dropdown.js",
|
|
104
104
|
"require": "./dist/lib/Dropdown/Dropdown.cjs",
|
|
105
105
|
"types": "./dist/lib/Dropdown/Dropdown.d.ts"
|
|
106
|
+
},
|
|
107
|
+
"./Button": {
|
|
108
|
+
"import": "./dist/lib/Button/Button.js",
|
|
109
|
+
"require": "./dist/lib/Button/Button.cjs",
|
|
110
|
+
"types": "./dist/lib/Button/Button.d.ts"
|
|
111
|
+
},
|
|
112
|
+
"./Breadcrumbs": {
|
|
113
|
+
"import": "./dist/lib/Breadcrumbs/Breadcrumbs.js",
|
|
114
|
+
"require": "./dist/lib/Breadcrumbs/Breadcrumbs.cjs",
|
|
115
|
+
"types": "./dist/lib/Breadcrumbs/Breadcrumbs.d.ts"
|
|
106
116
|
}
|
|
107
117
|
},
|
|
108
118
|
"typesVersions": {
|
|
@@ -145,9 +155,18 @@
|
|
|
145
155
|
],
|
|
146
156
|
"TablePagination": [
|
|
147
157
|
"./dist/lib/TablePagination/TablePagination.d.ts"
|
|
158
|
+
],
|
|
159
|
+
"Button": [
|
|
160
|
+
"./dist/lib/Button/Button.d.ts"
|
|
161
|
+
],
|
|
162
|
+
"Breadcrumbs": [
|
|
163
|
+
"./dist/lib/Breadcrumbs/Breadcrumbs.d.ts"
|
|
148
164
|
]
|
|
149
165
|
}
|
|
150
166
|
},
|
|
167
|
+
"files": [
|
|
168
|
+
"dist/**/*"
|
|
169
|
+
],
|
|
151
170
|
"scripts": {
|
|
152
171
|
"dev": "vite",
|
|
153
172
|
"type-check": "tsc --noEmit",
|
|
@@ -196,6 +215,7 @@
|
|
|
196
215
|
},
|
|
197
216
|
"dependencies": {
|
|
198
217
|
"@mui/material": "^6.2.1",
|
|
218
|
+
"@mui/utils": "^6.4.1",
|
|
199
219
|
"classnames": "^2.5.1",
|
|
200
220
|
"prop-types": "^15.8.1",
|
|
201
221
|
"rc-tooltip": "^6.3.2",
|
package/.eslintignore
DELETED
package/.prettierignore
DELETED
package/.storybook/main.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { StorybookConfig } from '@storybook/react-vite';
|
|
2
|
-
import { dirname, join } from 'path';
|
|
3
|
-
|
|
4
|
-
const getAbsolutePath = (value: string): string =>
|
|
5
|
-
dirname(require.resolve(join(value, 'package.json')));
|
|
6
|
-
|
|
7
|
-
const config: StorybookConfig = {
|
|
8
|
-
framework: '@storybook/react-vite',
|
|
9
|
-
|
|
10
|
-
stories: ['../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
|
11
|
-
|
|
12
|
-
addons: [getAbsolutePath('@storybook/addon-docs'), getAbsolutePath('@storybook/addon-a11y')],
|
|
13
|
-
|
|
14
|
-
core: {
|
|
15
|
-
builder: {
|
|
16
|
-
options: {},
|
|
17
|
-
name: '@storybook/builder-vite',
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
async viteFinal(config) {
|
|
22
|
-
const { mergeConfig } = await import('vite');
|
|
23
|
-
return mergeConfig(config, {
|
|
24
|
-
resolve: {
|
|
25
|
-
alias: [
|
|
26
|
-
{
|
|
27
|
-
find: '@sbi/styleguide',
|
|
28
|
-
replacement: '@sbi/styleguide/dist/styleguide',
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
},
|
|
32
|
-
css: {
|
|
33
|
-
modules: {
|
|
34
|
-
scopeBehaviour: 'local',
|
|
35
|
-
generateScopedName: '[name]__[local]___[hash:base64:5]',
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
typescript: { reactDocgen: false },
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export default config;
|
package/.storybook/preview.tsx
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React, { useEffect } from 'react';
|
|
2
|
-
import { type Preview } from '@storybook/react';
|
|
3
|
-
|
|
4
|
-
const preview: Preview = {
|
|
5
|
-
tags: ['autodocs'],
|
|
6
|
-
parameters: {
|
|
7
|
-
options: {
|
|
8
|
-
storySort: {
|
|
9
|
-
order: [
|
|
10
|
-
'Inputs',
|
|
11
|
-
'Data Display',
|
|
12
|
-
'Feedback',
|
|
13
|
-
'Date - Time',
|
|
14
|
-
'Surfaces',
|
|
15
|
-
'Navigation',
|
|
16
|
-
'Layout',
|
|
17
|
-
'Utils',
|
|
18
|
-
'Deprecated',
|
|
19
|
-
],
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
decorators: [
|
|
24
|
-
(Story) => {
|
|
25
|
-
return <Story />;
|
|
26
|
-
},
|
|
27
|
-
],
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
(function loadStories() {
|
|
31
|
-
document.body.className += 'sis-scope';
|
|
32
|
-
})();
|
|
33
|
-
|
|
34
|
-
export default preview;
|
package/src/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './lib';
|
package/src/lib/@types/sass.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
declare module '*.scss' {
|
|
2
|
-
export const content: { [className: string]: string };
|
|
3
|
-
export default content;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
declare module '*.module.scss' {
|
|
7
|
-
const classes: { readonly [key: string]: string };
|
|
8
|
-
export default classes;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
declare module '*.module.sass' {
|
|
12
|
-
const classes: { readonly [key: string]: string };
|
|
13
|
-
export default classes;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
declare module '*.module.css' {
|
|
17
|
-
const classes: { readonly [key: string]: string };
|
|
18
|
-
export default classes;
|
|
19
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render, screen, fireEvent } from '@testing-library/react';
|
|
3
|
-
import { describe, it, vi, expect } from 'vitest';
|
|
4
|
-
|
|
5
|
-
import { CheckableList } from './CheckableList';
|
|
6
|
-
|
|
7
|
-
import '@testing-library/jest-dom';
|
|
8
|
-
|
|
9
|
-
describe('CheckableList', () => {
|
|
10
|
-
const items = [
|
|
11
|
-
{ name: 'Item 1', value: 'item1', checked: true, dataTestId: 'item-1' },
|
|
12
|
-
{ name: 'Item 2', value: 'item2', checked: false, dataTestId: 'item-2' },
|
|
13
|
-
];
|
|
14
|
-
|
|
15
|
-
it('should render all items', () => {
|
|
16
|
-
render(<CheckableList items={items} onChange={vi.fn()} className="custom-class" />);
|
|
17
|
-
|
|
18
|
-
items.forEach((item) => {
|
|
19
|
-
expect(screen.getByText(item.name)).toBeInTheDocument();
|
|
20
|
-
expect(screen.getByTestId(item.dataTestId)).toBeInTheDocument();
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it('should call onChange with the correct value when an item is clicked', () => {
|
|
25
|
-
const onChangeMock = vi.fn();
|
|
26
|
-
render(<CheckableList items={items} onChange={onChangeMock} className="custom-class" />);
|
|
27
|
-
|
|
28
|
-
const firstItem = screen.getByTestId('item-1');
|
|
29
|
-
fireEvent.click(firstItem);
|
|
30
|
-
|
|
31
|
-
expect(onChangeMock).toHaveBeenCalledWith('item1');
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
it('should render DEPRECATED_Icon for checked items', () => {
|
|
35
|
-
const { container } = render(
|
|
36
|
-
<CheckableList items={items} onChange={vi.fn()} className="custom-class" />,
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
const icon = container.querySelector(`.app-icon.app-icon--general-vi-small-white`);
|
|
40
|
-
|
|
41
|
-
expect(icon).toBeInTheDocument();
|
|
42
|
-
expect(icon).toHaveClass('app-icon app-icon--general-vi-small-white');
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
it('should not render DEPRECATED_Icon for unchecked items', () => {
|
|
46
|
-
render(<CheckableList items={items} onChange={vi.fn()} className="custom-class" />);
|
|
47
|
-
|
|
48
|
-
const uncheckedItem = screen.getByTestId('item-2');
|
|
49
|
-
const icon = uncheckedItem.querySelector(`.app-icon.app-icon--general-vi-small-white`);
|
|
50
|
-
|
|
51
|
-
expect(icon).toBeNull();
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
it('should apply custom className to the container', () => {
|
|
55
|
-
const { container } = render(
|
|
56
|
-
<CheckableList items={items} onChange={vi.fn()} className="custom-class" />,
|
|
57
|
-
);
|
|
58
|
-
|
|
59
|
-
expect(container.firstChild).toHaveClass('custom-class');
|
|
60
|
-
});
|
|
61
|
-
});
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { DEPRECATED_Icon } from '../DEPRECATED_Icon';
|
|
4
|
-
|
|
5
|
-
import styles from './CheckableList.module.scss';
|
|
6
|
-
|
|
7
|
-
type Item = {
|
|
8
|
-
name: string;
|
|
9
|
-
value: string;
|
|
10
|
-
checked: boolean;
|
|
11
|
-
dataTestId?: string;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export type CheckableListProps = {
|
|
15
|
-
items: Item[];
|
|
16
|
-
onChange: (value: string) => void;
|
|
17
|
-
className?: string;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const CheckableList = ({ items, className, onChange }: CheckableListProps) => {
|
|
21
|
-
return (
|
|
22
|
-
<div className={className}>
|
|
23
|
-
{items.map((item) => (
|
|
24
|
-
<div
|
|
25
|
-
key={item.value}
|
|
26
|
-
className={styles.item}
|
|
27
|
-
onClick={() => onChange(item.value)}
|
|
28
|
-
data-testid={item.dataTestId}
|
|
29
|
-
>
|
|
30
|
-
<span className={styles.name}>{item.name}</span>
|
|
31
|
-
{item.checked && (
|
|
32
|
-
<DEPRECATED_Icon className={styles.icon} name="general-vi-small-white" />
|
|
33
|
-
)}
|
|
34
|
-
</div>
|
|
35
|
-
))}
|
|
36
|
-
</div>
|
|
37
|
-
);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export default CheckableList;
|
|
41
|
-
export { CheckableList };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef } from 'react';
|
|
2
|
-
import MuiCheckbox, { CheckboxProps as MuiCheckboxProps } from '@mui/material/Checkbox';
|
|
3
|
-
import ThemeProvider from '@mui/material/styles/ThemeProvider';
|
|
4
|
-
|
|
5
|
-
import { checkboxTheme, type CheckboxTheme } from './themes';
|
|
6
|
-
|
|
7
|
-
export type CheckboxProps = {
|
|
8
|
-
dataTestId?: string;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
inline?: boolean;
|
|
11
|
-
onDescriptionClick?: () => void;
|
|
12
|
-
text?: string;
|
|
13
|
-
textClassName?: string;
|
|
14
|
-
title?: string;
|
|
15
|
-
transparent?: boolean;
|
|
16
|
-
inputCheckboxClassName?: string;
|
|
17
|
-
} & MuiCheckboxProps & { theme?: CheckboxTheme };
|
|
18
|
-
|
|
19
|
-
const Checkbox = forwardRef<HTMLButtonElement, CheckboxProps>(
|
|
20
|
-
({ theme = checkboxTheme, dataTestId, ...rest }, ref) => (
|
|
21
|
-
<ThemeProvider theme={theme}>
|
|
22
|
-
<MuiCheckbox data-testid={dataTestId} ref={ref} {...rest} />
|
|
23
|
-
</ThemeProvider>
|
|
24
|
-
),
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
export default Checkbox;
|
|
28
|
-
export { Checkbox };
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import createTheme from '@mui/material/styles/createTheme';
|
|
2
|
-
// import { injectStylesWithWrapper } from '@sbi/styleguide';
|
|
3
|
-
//import { calcStyles } from './uiCustomization';
|
|
4
|
-
|
|
5
|
-
// TODO: review this later
|
|
6
|
-
// injectStylesWithWrapper && injectStylesWithWrapper(calcStyles);
|
|
7
|
-
import { siColors, type SisenseTheme } from '../../themes';
|
|
8
|
-
|
|
9
|
-
declare module '@mui/material' {
|
|
10
|
-
interface Theme {
|
|
11
|
-
sisense: SisenseTheme;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
interface ThemeOptions {
|
|
15
|
-
sisense?: Partial<SisenseTheme>;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export const checkboxTheme = createTheme({
|
|
20
|
-
components: {
|
|
21
|
-
MuiCheckbox: {
|
|
22
|
-
styleOverrides: {
|
|
23
|
-
root: {
|
|
24
|
-
width: '28px',
|
|
25
|
-
height: '28px',
|
|
26
|
-
'&.Mui-disabled': {
|
|
27
|
-
opacity: 0.5,
|
|
28
|
-
},
|
|
29
|
-
'&:hover': {
|
|
30
|
-
backgroundColor: siColors.StInteractionColors.defaultHover,
|
|
31
|
-
},
|
|
32
|
-
'& .MuiSvgIcon-root': {
|
|
33
|
-
fontSize: 14,
|
|
34
|
-
fill: siColors.StUiColors.default,
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
export type CheckboxTheme = typeof checkboxTheme;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// import { CalcStyles, DesignSettings } from '@sbi/styleguide';
|
|
2
|
-
import { siColors } from '../../themes';
|
|
3
|
-
|
|
4
|
-
export type MuiCheckbox =
|
|
5
|
-
| {
|
|
6
|
-
'.MuiCheckbox-root': {
|
|
7
|
-
color: string;
|
|
8
|
-
'&:hover': {
|
|
9
|
-
color: string;
|
|
10
|
-
borderRadius: string;
|
|
11
|
-
backgroundColor: string;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
| Record<string, never>;
|
|
16
|
-
|
|
17
|
-
export const calcStyles: any /* CalcStyles */ = (
|
|
18
|
-
designSettings: any /* DesignSettings */,
|
|
19
|
-
): MuiCheckbox => ({
|
|
20
|
-
'.MuiCheckbox-root': {
|
|
21
|
-
color: designSettings.general.primaryButtonTextColor,
|
|
22
|
-
'&:hover': {
|
|
23
|
-
color: designSettings.typography.primaryTextColor,
|
|
24
|
-
borderRadius: '50%',
|
|
25
|
-
backgroundColor: siColors.StBackgroundColors.themeAgnostic,
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
});
|