@sisense/sdk-shared-ui 1.27.1 → 1.28.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/CheckableList-BLLCGCKX.cjs +1 -0
- package/dist/CheckableList-CC7iKnHq.js +21 -0
- package/dist/Checkbox-CrbGw8d7.js +513 -0
- package/dist/Checkbox-Dy9BTXfS.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-B1V-T6UH.cjs +1 -0
- package/dist/Icon-Cs6oGRgo.js +110 -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-LwOuESoH.js +238 -0
- package/dist/SvgIcon-SnObJHZS.cjs +1 -0
- package/dist/TablePagination-B8I5QURH.js +7929 -0
- package/dist/TablePagination-DH0TZ21v.cjs +31 -0
- package/dist/ThemeProvider-aq1EWT1u.js +5041 -0
- package/dist/ThemeProvider-sqppyE-5.cjs +114 -0
- package/dist/Tooltip-Dokek6y8.cjs +7 -0
- package/dist/Tooltip-vVc6Lxew.js +2153 -0
- package/dist/TransitionGroupContext-BlR3HYBG.cjs +4 -0
- package/dist/TransitionGroupContext-Ci_clMyv.js +120 -0
- package/dist/Typography-C891hjk2.js +497 -0
- package/dist/Typography-vldQClJj.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-CXJWSg3i.js +902 -0
- package/dist/createSvgIcon-DF4qzIJY.cjs +74 -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/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} +1 -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 +208 -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/useSlot-BfQr8KCN.js +803 -0
- package/dist/useSlot-C3-OaWva.cjs +1 -0
- package/dist/useTheme-CtIZL8WJ.js +8 -0
- package/dist/useTheme-DJmNR5EL.cjs +1 -0
- package/package.json +4 -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,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
|
-
});
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import React, { ChangeEvent, MouseEvent } from 'react';
|
|
2
|
-
import classnames from 'classnames';
|
|
3
|
-
|
|
4
|
-
import { DEPRECATED_Icon } from '../DEPRECATED_Icon';
|
|
5
|
-
|
|
6
|
-
import style from './Checkbox.module.scss';
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
9
|
-
export type DEPRECATED_CheckboxProps = {
|
|
10
|
-
checked: boolean;
|
|
11
|
-
className?: string;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
inline?: boolean;
|
|
14
|
-
onChange: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
15
|
-
|
|
16
|
-
// The description is the icon and text. If undefined, use onChange.
|
|
17
|
-
onDescriptionClick?: () => void;
|
|
18
|
-
text?: string;
|
|
19
|
-
textClassName?: string;
|
|
20
|
-
title?: string;
|
|
21
|
-
transparent?: boolean;
|
|
22
|
-
dataTestId?: string;
|
|
23
|
-
iconName?: string;
|
|
24
|
-
inputCheckboxClassName?: string;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
28
|
-
const DEPRECATED_Checkbox = (props: DEPRECATED_CheckboxProps) => {
|
|
29
|
-
const {
|
|
30
|
-
className,
|
|
31
|
-
disabled,
|
|
32
|
-
inline,
|
|
33
|
-
text,
|
|
34
|
-
textClassName,
|
|
35
|
-
title,
|
|
36
|
-
transparent,
|
|
37
|
-
dataTestId,
|
|
38
|
-
iconName,
|
|
39
|
-
onDescriptionClick,
|
|
40
|
-
inputCheckboxClassName,
|
|
41
|
-
...otherProps
|
|
42
|
-
} = props;
|
|
43
|
-
|
|
44
|
-
const propsPassedToInput: any = { disabled, ...otherProps };
|
|
45
|
-
if (title && !disabled) {
|
|
46
|
-
// eslint-disable-next-line
|
|
47
|
-
propsPassedToInput.title = title;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const cssPrefix = 'custom-checkbox';
|
|
51
|
-
|
|
52
|
-
const containerClass = classnames(
|
|
53
|
-
cssPrefix,
|
|
54
|
-
{
|
|
55
|
-
'custom-checkbox--inline': inline,
|
|
56
|
-
[style.disabled]: disabled,
|
|
57
|
-
},
|
|
58
|
-
className,
|
|
59
|
-
);
|
|
60
|
-
const checkboxClass = classnames(`${cssPrefix}__icon`, 'app-icon app-icon--form-checkbox-mark', {
|
|
61
|
-
[style.transparent]: transparent,
|
|
62
|
-
});
|
|
63
|
-
const textClass = classnames(`${cssPrefix}__text`, textClassName);
|
|
64
|
-
const onDescriptionClickWrapper = onDescriptionClick
|
|
65
|
-
? (e: MouseEvent) => {
|
|
66
|
-
onDescriptionClick();
|
|
67
|
-
e.preventDefault();
|
|
68
|
-
}
|
|
69
|
-
: undefined;
|
|
70
|
-
|
|
71
|
-
return (
|
|
72
|
-
<div className={containerClass}>
|
|
73
|
-
<label className={`${cssPrefix}__label`}>
|
|
74
|
-
<div className={classnames(style.sharedComponentsInputCheckbox, inputCheckboxClassName)}>
|
|
75
|
-
<input
|
|
76
|
-
type="checkbox"
|
|
77
|
-
className={`${cssPrefix}__input`}
|
|
78
|
-
data-testid={dataTestId}
|
|
79
|
-
{...propsPassedToInput}
|
|
80
|
-
/>
|
|
81
|
-
<span className={checkboxClass}>
|
|
82
|
-
<svg className="app-icon__svg">
|
|
83
|
-
<use xlinkHref="#form-checkbox-mark" />
|
|
84
|
-
</svg>
|
|
85
|
-
</span>
|
|
86
|
-
</div>
|
|
87
|
-
{iconName && (
|
|
88
|
-
<DEPRECATED_Icon
|
|
89
|
-
name={iconName}
|
|
90
|
-
className={style.icon}
|
|
91
|
-
onClick={onDescriptionClickWrapper}
|
|
92
|
-
/>
|
|
93
|
-
)}
|
|
94
|
-
<span className={textClass} onClick={onDescriptionClickWrapper}>
|
|
95
|
-
{text}
|
|
96
|
-
</span>
|
|
97
|
-
</label>
|
|
98
|
-
</div>
|
|
99
|
-
);
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
export default DEPRECATED_Checkbox;
|
|
103
|
-
export { DEPRECATED_Checkbox };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { DEPRECATED_Icon } from './DEPRECATED_Icon';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'DEPRECATED/Icon',
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export const GeneralArrowDown = () => <DEPRECATED_Icon name={'general-arrow-down'} />;
|
|
10
|
-
|
|
11
|
-
export const GeneralArrowDownDisabled = () => (
|
|
12
|
-
<DEPRECATED_Icon name={'general-arrow-down'} disabled />
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
export const GeneralArrowDownClickable = () => (
|
|
16
|
-
<DEPRECATED_Icon name={'general-arrow-down'} onClick={() => {}} />
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
export const GeneralViSmallWhite = () => <DEPRECATED_Icon name={'general-vi-small-white'} />;
|
|
20
|
-
|
|
21
|
-
export const GeneralViSmallWhiteDisabled = () => (
|
|
22
|
-
<DEPRECATED_Icon name={'general-vi-small-white'} disabled />
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
export const GeneralViSmallWhiteClickable = () => (
|
|
26
|
-
<DEPRECATED_Icon name={'general-vi-small-white'} onClick={() => {}} />
|
|
27
|
-
);
|