@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
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
@import '../styles/style_styleguide_react/fonts';
|
|
2
|
-
@import '../styles/style_styleguide_react/colors';
|
|
3
|
-
|
|
4
|
-
@mixin sharedButtonText {
|
|
5
|
-
padding: 5px 20px;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
:global(.sis-scope) {
|
|
9
|
-
:global(.btn--dark) {
|
|
10
|
-
:global(.btn__text) {
|
|
11
|
-
@include sharedButtonText;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
:global(.btn--gray) {
|
|
16
|
-
background: $buttonCancel;
|
|
17
|
-
|
|
18
|
-
&:disabled {
|
|
19
|
-
background: $buttonCancel;
|
|
20
|
-
opacity: 1;
|
|
21
|
-
|
|
22
|
-
&:hover {
|
|
23
|
-
background: $buttonCancelHovered;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
:global(.app-icon),
|
|
27
|
-
:global(.btn__text) {
|
|
28
|
-
opacity: 0.4;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.sharedComponentsButton {
|
|
34
|
-
line-height: $lineHeightMedium;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.sharedComponentsButtonText {
|
|
38
|
-
@include sharedButtonText;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
:global(.btn).btnSecondary {
|
|
42
|
-
border: 1px solid $wizardFore;
|
|
43
|
-
background-color: $buttonSecondary;
|
|
44
|
-
|
|
45
|
-
&:hover {
|
|
46
|
-
background-color: $buttonSecondaryHovered;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
&:disabled {
|
|
50
|
-
background-color: $buttonSecondary;
|
|
51
|
-
|
|
52
|
-
&:hover {
|
|
53
|
-
background-color: $buttonSecondary;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { DEPRECATED_Button } from './DEPRECATED_Button';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'DEPRECATED/Button',
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export const Primary = () => (
|
|
10
|
-
<div
|
|
11
|
-
style={{
|
|
12
|
-
display: 'inline-flex',
|
|
13
|
-
justifyContent: 'space-between',
|
|
14
|
-
height: '175px',
|
|
15
|
-
padding: '20px 50px',
|
|
16
|
-
flexDirection: 'column',
|
|
17
|
-
}}
|
|
18
|
-
>
|
|
19
|
-
<>
|
|
20
|
-
<DEPRECATED_Button text={'normal!'} />
|
|
21
|
-
<DEPRECATED_Button text={'hover!'} style={{ backgroundColor: '#f2b900' }} />
|
|
22
|
-
<DEPRECATED_Button text={'disable!'} disabled />
|
|
23
|
-
</>
|
|
24
|
-
</div>
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
export const PrimaryWithIcon = () => (
|
|
28
|
-
<div
|
|
29
|
-
style={{
|
|
30
|
-
display: 'inline-flex',
|
|
31
|
-
justifyContent: 'space-between',
|
|
32
|
-
height: '175px',
|
|
33
|
-
padding: '20px 50px',
|
|
34
|
-
flexDirection: 'column',
|
|
35
|
-
}}
|
|
36
|
-
>
|
|
37
|
-
<>
|
|
38
|
-
<DEPRECATED_Button text={'normal!'} iconName="general-plus" />
|
|
39
|
-
<DEPRECATED_Button
|
|
40
|
-
text={'hover!'}
|
|
41
|
-
iconName="general-plus"
|
|
42
|
-
style={{ backgroundColor: '#f2b900' }}
|
|
43
|
-
/>
|
|
44
|
-
<DEPRECATED_Button text={'disable!'} iconName="general-plus" disabled />
|
|
45
|
-
</>
|
|
46
|
-
</div>
|
|
47
|
-
);
|
|
48
|
-
|
|
49
|
-
export const Secondary = () => (
|
|
50
|
-
<div
|
|
51
|
-
style={{
|
|
52
|
-
display: 'inline-flex',
|
|
53
|
-
justifyContent: 'space-between',
|
|
54
|
-
height: '175px',
|
|
55
|
-
padding: '20px 50px',
|
|
56
|
-
flexDirection: 'column',
|
|
57
|
-
}}
|
|
58
|
-
>
|
|
59
|
-
<>
|
|
60
|
-
<DEPRECATED_Button text={'normal!'} secondary />
|
|
61
|
-
<DEPRECATED_Button text={'hover!'} secondary style={{ backgroundColor: '#F4F4F8' }} />
|
|
62
|
-
<DEPRECATED_Button text={'disable!'} secondary disabled />
|
|
63
|
-
</>
|
|
64
|
-
</div>
|
|
65
|
-
);
|
|
66
|
-
|
|
67
|
-
export const SecondaryWithIcon = () => (
|
|
68
|
-
<div
|
|
69
|
-
style={{
|
|
70
|
-
display: 'inline-flex',
|
|
71
|
-
justifyContent: 'space-between',
|
|
72
|
-
height: '175px',
|
|
73
|
-
padding: '20px 50px',
|
|
74
|
-
flexDirection: 'column',
|
|
75
|
-
}}
|
|
76
|
-
>
|
|
77
|
-
<>
|
|
78
|
-
<DEPRECATED_Button text={'normal!'} iconName="general-plus" secondary />
|
|
79
|
-
<DEPRECATED_Button
|
|
80
|
-
text={'hover!'}
|
|
81
|
-
iconName="general-plus"
|
|
82
|
-
secondary
|
|
83
|
-
style={{ backgroundColor: '#F4F4F8' }}
|
|
84
|
-
/>
|
|
85
|
-
<DEPRECATED_Button text={'disable!'} iconName="general-plus" secondary disabled />
|
|
86
|
-
</>
|
|
87
|
-
</div>
|
|
88
|
-
);
|
|
89
|
-
|
|
90
|
-
export const Cancel = () => (
|
|
91
|
-
<div
|
|
92
|
-
style={{
|
|
93
|
-
display: 'inline-flex',
|
|
94
|
-
justifyContent: 'space-between',
|
|
95
|
-
height: '175px',
|
|
96
|
-
padding: '20px 50px',
|
|
97
|
-
flexDirection: 'column',
|
|
98
|
-
}}
|
|
99
|
-
>
|
|
100
|
-
<>
|
|
101
|
-
<DEPRECATED_Button text={'normal!'} gray />
|
|
102
|
-
<DEPRECATED_Button text={'hover!'} style={{ backgroundColor: '#D1D1D7' }} />
|
|
103
|
-
<DEPRECATED_Button text={'disable!'} gray disabled />
|
|
104
|
-
</>
|
|
105
|
-
</div>
|
|
106
|
-
);
|
|
107
|
-
|
|
108
|
-
export const CancelWithIcon = () => (
|
|
109
|
-
<div
|
|
110
|
-
style={{
|
|
111
|
-
display: 'inline-flex',
|
|
112
|
-
justifyContent: 'space-between',
|
|
113
|
-
height: '175px',
|
|
114
|
-
padding: '20px 50px',
|
|
115
|
-
flexDirection: 'column',
|
|
116
|
-
}}
|
|
117
|
-
>
|
|
118
|
-
<>
|
|
119
|
-
<DEPRECATED_Button text={'normal!'} iconName="general-plus" gray />
|
|
120
|
-
<DEPRECATED_Button
|
|
121
|
-
text={'hover!'}
|
|
122
|
-
iconName="general-plus"
|
|
123
|
-
style={{ backgroundColor: '#D1D1D7' }}
|
|
124
|
-
/>
|
|
125
|
-
<DEPRECATED_Button text={'disable!'} iconName="general-plus" gray disabled />
|
|
126
|
-
</>
|
|
127
|
-
</div>
|
|
128
|
-
);
|
|
129
|
-
|
|
130
|
-
export const Text = () => (
|
|
131
|
-
<div
|
|
132
|
-
style={{
|
|
133
|
-
display: 'inline-flex',
|
|
134
|
-
justifyContent: 'space-between',
|
|
135
|
-
height: '175px',
|
|
136
|
-
padding: '20px 50px',
|
|
137
|
-
flexDirection: 'column',
|
|
138
|
-
}}
|
|
139
|
-
>
|
|
140
|
-
<>
|
|
141
|
-
<DEPRECATED_Button text={'normal!'} dark />
|
|
142
|
-
<DEPRECATED_Button text={'hover!'} style={{ backgroundColor: '#f4f4f8' }} dark />
|
|
143
|
-
<DEPRECATED_Button text={'disable!'} disabled dark />
|
|
144
|
-
</>
|
|
145
|
-
</div>
|
|
146
|
-
);
|
|
147
|
-
|
|
148
|
-
export const TextWithIcon = () => (
|
|
149
|
-
<div
|
|
150
|
-
style={{
|
|
151
|
-
display: 'inline-flex',
|
|
152
|
-
justifyContent: 'space-between',
|
|
153
|
-
height: '175px',
|
|
154
|
-
padding: '20px 50px',
|
|
155
|
-
flexDirection: 'column',
|
|
156
|
-
}}
|
|
157
|
-
>
|
|
158
|
-
<>
|
|
159
|
-
<DEPRECATED_Button text={'normal!'} dark iconName={'general-edit'} />
|
|
160
|
-
<DEPRECATED_Button
|
|
161
|
-
text={'hover!'}
|
|
162
|
-
style={{ backgroundColor: '#f4f4f8' }}
|
|
163
|
-
iconName={'general-edit'}
|
|
164
|
-
dark
|
|
165
|
-
/>
|
|
166
|
-
<DEPRECATED_Button text={'disable!'} iconName={'general-edit'} disabled dark />
|
|
167
|
-
</>
|
|
168
|
-
</div>
|
|
169
|
-
);
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { describe, it, expect, vi } from 'vitest';
|
|
3
|
-
import { render, screen, fireEvent } from '@testing-library/react';
|
|
4
|
-
|
|
5
|
-
import { DEPRECATED_Button } from './DEPRECATED_Button';
|
|
6
|
-
|
|
7
|
-
import '@testing-library/jest-dom';
|
|
8
|
-
|
|
9
|
-
describe('Button Component', () => {
|
|
10
|
-
it('should render correctly with default props', () => {
|
|
11
|
-
render(<DEPRECATED_Button text="Click Me" />);
|
|
12
|
-
|
|
13
|
-
expect(screen.getByText('Click Me')).toBeInTheDocument();
|
|
14
|
-
expect(screen.getByRole('button')).toHaveClass('btn');
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
it('should apply custom className when provided as prop', () => {
|
|
18
|
-
render(<DEPRECATED_Button text="Click Me" className="custom-class" />);
|
|
19
|
-
|
|
20
|
-
expect(screen.getByRole('button')).toHaveClass('custom-class');
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
it('should render an DEPRECATED_Icon with correct props when provided', () => {
|
|
24
|
-
const iconName = 'icon-name';
|
|
25
|
-
const iconClassName = 'custom-icon-class';
|
|
26
|
-
const hoverSuffix = 'hover-suffix';
|
|
27
|
-
|
|
28
|
-
const { container } = render(
|
|
29
|
-
<DEPRECATED_Button
|
|
30
|
-
text="Button with Icon"
|
|
31
|
-
iconName={iconName}
|
|
32
|
-
iconClassName={iconClassName}
|
|
33
|
-
hoverSuffix={hoverSuffix}
|
|
34
|
-
disabled
|
|
35
|
-
/>,
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
const icon = container.querySelector(`.${iconClassName}`);
|
|
39
|
-
expect(icon).toHaveClass('btn__icon');
|
|
40
|
-
expect(icon).toHaveClass(iconClassName);
|
|
41
|
-
expect(icon).toHaveAttribute('name', iconName);
|
|
42
|
-
expect(icon).toHaveAttribute('disabled');
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
it('should render an DEPRECATED_Icon with correct hover suffix when provided', () => {
|
|
46
|
-
const iconName = 'icon-name';
|
|
47
|
-
const iconClassName = 'custom-icon-class';
|
|
48
|
-
const hoverSuffix = 'hover-suffix';
|
|
49
|
-
|
|
50
|
-
const { container } = render(
|
|
51
|
-
<DEPRECATED_Button
|
|
52
|
-
text="Button with Icon"
|
|
53
|
-
iconName={iconName}
|
|
54
|
-
iconClassName={iconClassName}
|
|
55
|
-
hoverSuffix={hoverSuffix}
|
|
56
|
-
/>,
|
|
57
|
-
);
|
|
58
|
-
let icon = container.querySelector(`.${iconClassName}`) as Element;
|
|
59
|
-
fireEvent.mouseEnter(icon);
|
|
60
|
-
icon = container.querySelector(`.${iconClassName}`) as Element;
|
|
61
|
-
|
|
62
|
-
expect(icon).toHaveClass('app-icon--icon-namehover-suffix');
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
it('should render a trailing DEPRECATED_Icon with correct props when trailingIconName is provided', () => {
|
|
66
|
-
const trailingIconName = 'trailing-icon';
|
|
67
|
-
const hoverSuffix = 'trailing-hover';
|
|
68
|
-
|
|
69
|
-
const { container } = render(
|
|
70
|
-
<DEPRECATED_Button
|
|
71
|
-
text="Button with Trailing Icon"
|
|
72
|
-
trailingIconName={trailingIconName}
|
|
73
|
-
hoverSuffix={hoverSuffix}
|
|
74
|
-
/>,
|
|
75
|
-
);
|
|
76
|
-
const trailingIcon = container.querySelector('.app-icon.app-icon--trailing-icon.btn__icon');
|
|
77
|
-
|
|
78
|
-
expect(trailingIcon).toBeInTheDocument();
|
|
79
|
-
expect(trailingIcon).toHaveAttribute('name', trailingIconName);
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
it('should render only an DEPRECATED_Icon when no text is provided and passes correct props', () => {
|
|
83
|
-
const iconName = 'icon-only';
|
|
84
|
-
const { container } = render(<DEPRECATED_Button iconName={iconName} disabled />);
|
|
85
|
-
|
|
86
|
-
const button = screen.getByRole('button');
|
|
87
|
-
const icon = container.querySelector(".app-icon[class~='app-icon--icon-only']");
|
|
88
|
-
|
|
89
|
-
expect(button).toHaveClass('btn--icon');
|
|
90
|
-
expect(icon).toBeInTheDocument();
|
|
91
|
-
expect(icon).toHaveAttribute('name', iconName);
|
|
92
|
-
expect(icon).toHaveAttribute('disabled');
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
it('should render both text and DEPRECATED_Icon with proper spacing', () => {
|
|
96
|
-
const { container } = render(<DEPRECATED_Button text="Text with Icon" iconName="icon-name" />);
|
|
97
|
-
|
|
98
|
-
const button = screen.getByRole('button');
|
|
99
|
-
const icon = container.querySelector('.app-icon.app-icon--icon-name.btn__icon');
|
|
100
|
-
|
|
101
|
-
expect(icon).toBeInTheDocument();
|
|
102
|
-
expect(button).toHaveTextContent('Text with Icon');
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
it('should disable the button when disabled is true', () => {
|
|
106
|
-
render(<DEPRECATED_Button text="Disabled" disabled />);
|
|
107
|
-
|
|
108
|
-
const button = screen.getByRole('button');
|
|
109
|
-
|
|
110
|
-
expect(button).toBeDisabled();
|
|
111
|
-
expect(button).toHaveClass('btn--disabled');
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
it('should call the onClick handler when clicked', () => {
|
|
115
|
-
const handleClick = vi.fn();
|
|
116
|
-
render(<DEPRECATED_Button text="Click Me" onClick={handleClick} />);
|
|
117
|
-
const button = screen.getByRole('button');
|
|
118
|
-
|
|
119
|
-
button.click();
|
|
120
|
-
|
|
121
|
-
expect(handleClick).toHaveBeenCalledTimes(1);
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
it('should apply the correct aria-label', () => {
|
|
125
|
-
render(<DEPRECATED_Button text="Aria Test" ariaLabel="custom-label" />);
|
|
126
|
-
|
|
127
|
-
const button = screen.getByRole('button');
|
|
128
|
-
|
|
129
|
-
expect(button).toHaveAttribute('aria-label', 'custom-label');
|
|
130
|
-
});
|
|
131
|
-
|
|
132
|
-
it('should set the title when button is disabled and allowDisabledTitle is true', () => {
|
|
133
|
-
render(
|
|
134
|
-
<DEPRECATED_Button
|
|
135
|
-
title="Disabled Button Allowed"
|
|
136
|
-
disabled
|
|
137
|
-
allowDisabledTitle
|
|
138
|
-
dataTestId="button"
|
|
139
|
-
/>,
|
|
140
|
-
);
|
|
141
|
-
|
|
142
|
-
const button = screen.getByTestId('button');
|
|
143
|
-
|
|
144
|
-
expect(button).toHaveAttribute('title', 'Disabled Button Allowed');
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
it('should not set the title when button is disabled and allowDisabledTitle is false', () => {
|
|
148
|
-
render(<DEPRECATED_Button title="Disabled Button" disabled dataTestId="button" />);
|
|
149
|
-
|
|
150
|
-
const button = screen.getByTestId('button');
|
|
151
|
-
|
|
152
|
-
expect(button).not.toHaveAttribute('title');
|
|
153
|
-
});
|
|
154
|
-
});
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import classNames from 'classnames';
|
|
4
|
-
|
|
5
|
-
import { DEPRECATED_Icon } from '../DEPRECATED_Icon';
|
|
6
|
-
|
|
7
|
-
import styles from './DEPRECATED_Button.module.scss';
|
|
8
|
-
|
|
9
|
-
export type ButtonProps = {
|
|
10
|
-
allowDisabledTitle?: boolean;
|
|
11
|
-
className?: string;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
hoverSuffix?: string;
|
|
14
|
-
iconClassName?: string;
|
|
15
|
-
iconName?: string;
|
|
16
|
-
transparent?: boolean;
|
|
17
|
-
text?: string;
|
|
18
|
-
trailingIconName?: string;
|
|
19
|
-
title?: string;
|
|
20
|
-
dark?: boolean;
|
|
21
|
-
gray?: boolean;
|
|
22
|
-
secondary?: boolean;
|
|
23
|
-
dataTestId?: string;
|
|
24
|
-
ariaLabel?: React.AriaAttributes['aria-label'];
|
|
25
|
-
} & React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
26
|
-
|
|
27
|
-
// Used since in sisense-styleguide repo, there is a new line between the icon span and the text span
|
|
28
|
-
// The browser shows this new line as a space between the button spans and the text,
|
|
29
|
-
// so we are doing it as well until the styleguide will be changed
|
|
30
|
-
const SPACE = ' ';
|
|
31
|
-
|
|
32
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
33
|
-
const DEPRECATED_Button = (props: ButtonProps) => {
|
|
34
|
-
const {
|
|
35
|
-
allowDisabledTitle,
|
|
36
|
-
className,
|
|
37
|
-
disabled,
|
|
38
|
-
hoverSuffix,
|
|
39
|
-
iconClassName,
|
|
40
|
-
iconName,
|
|
41
|
-
transparent,
|
|
42
|
-
text,
|
|
43
|
-
trailingIconName,
|
|
44
|
-
title,
|
|
45
|
-
dark,
|
|
46
|
-
gray,
|
|
47
|
-
secondary,
|
|
48
|
-
dataTestId,
|
|
49
|
-
ariaLabel = 'button',
|
|
50
|
-
...otherProps
|
|
51
|
-
} = props;
|
|
52
|
-
|
|
53
|
-
const isIconOnlyComponent = !text;
|
|
54
|
-
|
|
55
|
-
const buttonClass = classNames(
|
|
56
|
-
'btn',
|
|
57
|
-
{
|
|
58
|
-
'btn--disabled': disabled,
|
|
59
|
-
'btn--transp': transparent,
|
|
60
|
-
'btn--dark': dark,
|
|
61
|
-
'btn--icon': isIconOnlyComponent,
|
|
62
|
-
'btn--gray': gray,
|
|
63
|
-
[styles.btnSecondary]: secondary,
|
|
64
|
-
},
|
|
65
|
-
styles.sharedComponentsButton,
|
|
66
|
-
className,
|
|
67
|
-
);
|
|
68
|
-
|
|
69
|
-
const iconClass = classNames('btn__icon', iconClassName);
|
|
70
|
-
const iconComponent = iconName && (
|
|
71
|
-
<DEPRECATED_Icon
|
|
72
|
-
className={iconClass}
|
|
73
|
-
name={iconName}
|
|
74
|
-
disabled={disabled}
|
|
75
|
-
hoverSuffix={hoverSuffix}
|
|
76
|
-
/>
|
|
77
|
-
);
|
|
78
|
-
|
|
79
|
-
const textClass = classNames('btn__text', styles.sharedComponentsButtonText);
|
|
80
|
-
const textComponent = text && <span className={textClass}>{text}</span>;
|
|
81
|
-
|
|
82
|
-
const spaceComponent = iconComponent && textComponent && SPACE;
|
|
83
|
-
const trailingIconComponent = trailingIconName && (
|
|
84
|
-
<DEPRECATED_Icon
|
|
85
|
-
className={iconClass}
|
|
86
|
-
name={trailingIconName}
|
|
87
|
-
disabled={disabled}
|
|
88
|
-
hoverSuffix={hoverSuffix}
|
|
89
|
-
/>
|
|
90
|
-
);
|
|
91
|
-
|
|
92
|
-
const extraProps = {
|
|
93
|
-
disabled,
|
|
94
|
-
title: title && (!disabled || allowDisabledTitle) ? title : undefined,
|
|
95
|
-
...otherProps,
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
return (
|
|
99
|
-
<button {...extraProps} className={buttonClass} data-testid={dataTestId} aria-label={ariaLabel}>
|
|
100
|
-
{iconComponent}
|
|
101
|
-
{spaceComponent}
|
|
102
|
-
{textComponent}
|
|
103
|
-
{trailingIconComponent}
|
|
104
|
-
</button>
|
|
105
|
-
);
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
DEPRECATED_Button.propTypes = {
|
|
109
|
-
allowDisabledTitle: PropTypes.bool,
|
|
110
|
-
className: PropTypes.string,
|
|
111
|
-
disabled: PropTypes.bool,
|
|
112
|
-
hoverSuffix: PropTypes.string,
|
|
113
|
-
iconClassName: PropTypes.string,
|
|
114
|
-
iconName: PropTypes.string,
|
|
115
|
-
onClick: PropTypes.func.isRequired,
|
|
116
|
-
text: PropTypes.string,
|
|
117
|
-
title: PropTypes.string,
|
|
118
|
-
trailingIconName: PropTypes.string,
|
|
119
|
-
transparent: PropTypes.bool,
|
|
120
|
-
dark: PropTypes.bool,
|
|
121
|
-
gray: PropTypes.bool,
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
DEPRECATED_Button.defaultProps = {
|
|
125
|
-
allowDisabledTitle: false,
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
export default DEPRECATED_Button;
|
|
129
|
-
export { DEPRECATED_Button }; // Named export
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
:global(.sis-scope) {
|
|
2
|
-
:global(.custom-checkbox__icon.app-icon) {
|
|
3
|
-
&.transparent {
|
|
4
|
-
background: transparent !important;
|
|
5
|
-
color: transparent;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
:global(.custom-checkbox__input:checked + .custom-checkbox__icon) {
|
|
10
|
-
&.transparent {
|
|
11
|
-
color: #3a4356;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
:global(.custom-checkbox__text) {
|
|
16
|
-
padding-left: 4px;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.icon {
|
|
21
|
-
margin: 0 -5px 0 0px;
|
|
22
|
-
// If there is not a onDescriptionClick, the icon will not have
|
|
23
|
-
// onClick set, and thus would not show a pointer but should.
|
|
24
|
-
cursor: pointer;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.disabled {
|
|
28
|
-
pointer-events: none;
|
|
29
|
-
// sis-scope uses an adjacency selector to style the span,
|
|
30
|
-
// but the optional icon is between the checkbox and text.
|
|
31
|
-
:global(.custom-checkbox__text) {
|
|
32
|
-
color: rgba(91, 99, 114, 0.4);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
:global(.app-icon) {
|
|
36
|
-
opacity: 0.4;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.sharedComponentsInputCheckbox {
|
|
41
|
-
width: 28px;
|
|
42
|
-
height: 28px;
|
|
43
|
-
padding: 8px;
|
|
44
|
-
|
|
45
|
-
&:hover {
|
|
46
|
-
background-color: rgba(91, 99, 114, 0.1);
|
|
47
|
-
border-radius: 50%;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render, screen, fireEvent } from '@testing-library/react';
|
|
3
|
-
import { describe, it, expect, vi } from 'vitest';
|
|
4
|
-
|
|
5
|
-
import { DEPRECATED_Checkbox } from './DEPRECATED_Checkbox';
|
|
6
|
-
|
|
7
|
-
import '@testing-library/jest-dom';
|
|
8
|
-
|
|
9
|
-
describe('DEPRECATED_Checkbox', () => {
|
|
10
|
-
it('should render the checkbox with the provided text', () => {
|
|
11
|
-
render(<DEPRECATED_Checkbox checked={false} text="Checkbox Label" onChange={vi.fn()} />);
|
|
12
|
-
|
|
13
|
-
expect(screen.getByText('Checkbox Label')).toBeInTheDocument();
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
it('should render as checked when the checked prop is true', () => {
|
|
17
|
-
render(<DEPRECATED_Checkbox checked={true} text="Checked Checkbox" onChange={vi.fn()} />);
|
|
18
|
-
|
|
19
|
-
const checkbox = screen.getByRole('checkbox');
|
|
20
|
-
|
|
21
|
-
expect(checkbox).toBeChecked();
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it('should trigger onChange when clicked', () => {
|
|
25
|
-
const handleChange = vi.fn();
|
|
26
|
-
render(<DEPRECATED_Checkbox checked={false} onChange={handleChange} dataTestId="checkbox" />);
|
|
27
|
-
|
|
28
|
-
const checkbox = screen.getByTestId('checkbox');
|
|
29
|
-
fireEvent.click(checkbox);
|
|
30
|
-
|
|
31
|
-
expect(handleChange).toHaveBeenCalled();
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
it('should render the title when provided and not disabled', () => {
|
|
35
|
-
render(<DEPRECATED_Checkbox checked={false} title="Checkbox Title" onChange={vi.fn()} />);
|
|
36
|
-
|
|
37
|
-
const checkbox = screen.getByRole('checkbox');
|
|
38
|
-
|
|
39
|
-
expect(checkbox).toHaveAttribute('title', 'Checkbox Title');
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
it('should not render the title when disabled', () => {
|
|
43
|
-
render(
|
|
44
|
-
<DEPRECATED_Checkbox checked={false} title="Checkbox Title" disabled onChange={vi.fn()} />,
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
const checkbox = screen.getByRole('checkbox');
|
|
48
|
-
|
|
49
|
-
expect(checkbox).not.toHaveAttribute('title');
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
it('should apply the correct classes for inline and transparent props', () => {
|
|
53
|
-
const { container } = render(
|
|
54
|
-
<DEPRECATED_Checkbox
|
|
55
|
-
checked={false}
|
|
56
|
-
inline
|
|
57
|
-
transparent
|
|
58
|
-
onChange={vi.fn()}
|
|
59
|
-
className="custom-class"
|
|
60
|
-
/>,
|
|
61
|
-
);
|
|
62
|
-
|
|
63
|
-
const checkboxContainer = container.querySelector(`.custom-checkbox--inline`);
|
|
64
|
-
|
|
65
|
-
expect(checkboxContainer).toHaveClass('custom-checkbox');
|
|
66
|
-
expect(checkboxContainer).toHaveClass('custom-checkbox--inline');
|
|
67
|
-
expect(checkboxContainer).toHaveClass('custom-class');
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
it('should call onDescriptionClick when the description is clicked', () => {
|
|
71
|
-
const handleDescriptionClick = vi.fn();
|
|
72
|
-
render(
|
|
73
|
-
<DEPRECATED_Checkbox
|
|
74
|
-
checked={false}
|
|
75
|
-
text="Clickable Description"
|
|
76
|
-
onChange={vi.fn()}
|
|
77
|
-
onDescriptionClick={handleDescriptionClick}
|
|
78
|
-
/>,
|
|
79
|
-
);
|
|
80
|
-
|
|
81
|
-
fireEvent.click(screen.getByText('Clickable Description'));
|
|
82
|
-
|
|
83
|
-
expect(handleDescriptionClick).toHaveBeenCalled();
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
it('should render an icon if iconName is provided', () => {
|
|
87
|
-
const { container } = render(
|
|
88
|
-
<DEPRECATED_Checkbox
|
|
89
|
-
checked={false}
|
|
90
|
-
iconName="test-icon"
|
|
91
|
-
onChange={vi.fn()}
|
|
92
|
-
dataTestId="checkbox"
|
|
93
|
-
/>,
|
|
94
|
-
);
|
|
95
|
-
|
|
96
|
-
const icon = container.querySelector(`.app-icon.app-icon--test-icon`);
|
|
97
|
-
|
|
98
|
-
expect(icon).toBeInTheDocument();
|
|
99
|
-
expect(icon).toHaveClass('app-icon app-icon--test-icon');
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
it('should call onDescriptionClick when the icon is clicked', () => {
|
|
103
|
-
const handleDescriptionClick = vi.fn();
|
|
104
|
-
const { container } = render(
|
|
105
|
-
<DEPRECATED_Checkbox
|
|
106
|
-
checked={false}
|
|
107
|
-
iconName="test-icon"
|
|
108
|
-
onChange={vi.fn()}
|
|
109
|
-
onDescriptionClick={handleDescriptionClick}
|
|
110
|
-
/>,
|
|
111
|
-
);
|
|
112
|
-
const icon = container.querySelector(`.app-icon.app-icon--test-icon`);
|
|
113
|
-
|
|
114
|
-
fireEvent.click(icon as Element);
|
|
115
|
-
|
|
116
|
-
expect(handleDescriptionClick).toHaveBeenCalled();
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
it('should apply additional class names to the input checkbox element', () => {
|
|
120
|
-
render(
|
|
121
|
-
<DEPRECATED_Checkbox
|
|
122
|
-
checked={false}
|
|
123
|
-
inputCheckboxClassName="additional-input-class"
|
|
124
|
-
onChange={vi.fn()}
|
|
125
|
-
/>,
|
|
126
|
-
);
|
|
127
|
-
const inputWrapper = screen.getByRole('checkbox').closest('div');
|
|
128
|
-
|
|
129
|
-
expect(inputWrapper).toHaveClass('additional-input-class');
|
|
130
|
-
});
|
|
131
|
-
});
|