@infomaximum/ui-kit 0.9.1
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/LICENSE +201 -0
- package/README.md +169 -0
- package/dist/components/Alert/Alert.d.ts +3 -0
- package/dist/components/Alert/Alert.js +67 -0
- package/dist/components/Alert/Alert.styles.d.ts +885 -0
- package/dist/components/Alert/Alert.styles.js +124 -0
- package/dist/components/Alert/Alert.tokens.d.ts +8 -0
- package/dist/components/Alert/Alert.tokens.js +10 -0
- package/dist/components/Alert/Alert.types.d.ts +26 -0
- package/dist/components/Alert/Alert.utils.d.ts +7 -0
- package/dist/components/Alert/Alert.utils.js +38 -0
- package/dist/components/Alert/index.d.ts +2 -0
- package/dist/components/Avatar/Avatar.d.ts +3 -0
- package/dist/components/Avatar/Avatar.js +23 -0
- package/dist/components/Avatar/Avatar.styles.d.ts +29 -0
- package/dist/components/Avatar/Avatar.styles.js +40 -0
- package/dist/components/Avatar/Avatar.tokens.d.ts +7 -0
- package/dist/components/Avatar/Avatar.tokens.js +8 -0
- package/dist/components/Avatar/Avatar.types.d.ts +11 -0
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/BaseTooltip/BaseTooltip.d.ts +3 -0
- package/dist/components/BaseTooltip/BaseTooltip.js +87 -0
- package/dist/components/BaseTooltip/BaseTooltip.styles.d.ts +6 -0
- package/dist/components/BaseTooltip/BaseTooltip.styles.js +36 -0
- package/dist/components/BaseTooltip/BaseTooltip.types.d.ts +19 -0
- package/dist/components/BaseTooltip/BaseTooltip.utils.d.ts +12 -0
- package/dist/components/BaseTooltip/BaseTooltip.utils.js +101 -0
- package/dist/components/BaseTooltip/hooks/useShowTooltipController.d.ts +22 -0
- package/dist/components/BaseTooltip/hooks/useShowTooltipController.js +143 -0
- package/dist/components/Button/Button.d.ts +3 -0
- package/dist/components/Button/Button.js +56 -0
- package/dist/components/Button/Button.styles.d.ts +958 -0
- package/dist/components/Button/Button.styles.js +230 -0
- package/dist/components/Button/Button.tokens.d.ts +27 -0
- package/dist/components/Button/Button.tokens.js +29 -0
- package/dist/components/Button/Button.types.d.ts +31 -0
- package/dist/components/Button/Button.utils.d.ts +8 -0
- package/dist/components/Button/Button.utils.js +38 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.d.ts +3 -0
- package/dist/components/Checkbox/Checkbox.js +72 -0
- package/dist/components/Checkbox/Checkbox.styles.d.ts +46 -0
- package/dist/components/Checkbox/Checkbox.styles.js +85 -0
- package/dist/components/Checkbox/Checkbox.tokens.d.ts +13 -0
- package/dist/components/Checkbox/Checkbox.tokens.js +15 -0
- package/dist/components/Checkbox/Checkbox.types.d.ts +27 -0
- package/dist/components/Checkbox/components/Group/Group.d.ts +3 -0
- package/dist/components/Checkbox/components/Group/Group.js +67 -0
- package/dist/components/Checkbox/components/Group/Group.style.d.ts +6 -0
- package/dist/components/Checkbox/components/Group/Group.style.js +8 -0
- package/dist/components/Checkbox/components/Group/Group.type.d.ts +18 -0
- package/dist/components/Checkbox/components/Group/Group.utils.d.ts +6 -0
- package/dist/components/Checkbox/components/Group/Group.utils.js +6 -0
- package/dist/components/Checkbox/forStories/CheckAll/CheckAll.d.ts +2 -0
- package/dist/components/Checkbox/index.d.ts +4 -0
- package/dist/components/Checkbox/index.js +8 -0
- package/dist/components/ConfigProvider/ConfigProvider.d.ts +3 -0
- package/dist/components/ConfigProvider/ConfigProvider.js +17 -0
- package/dist/components/ConfigProvider/ConfigProvider.types.d.ts +5 -0
- package/dist/components/ConfigProvider/contexts/ConfigContext.d.ts +2 -0
- package/dist/components/ConfigProvider/contexts/ConfigContext.js +5 -0
- package/dist/components/ConfigProvider/contexts/ConfigContext.types.d.ts +6 -0
- package/dist/components/ConfigProvider/contexts/index.d.ts +1 -0
- package/dist/components/ConfigProvider/hooks/useConfig/index.d.ts +1 -0
- package/dist/components/ConfigProvider/hooks/useConfig/useConfig.d.ts +9 -0
- package/dist/components/ConfigProvider/hooks/useConfig/useConfig.js +17 -0
- package/dist/components/ConfigProvider/index.d.ts +3 -0
- package/dist/components/DatePicker/DatePicker.d.ts +4 -0
- package/dist/components/DatePicker/DatePicker.js +13 -0
- package/dist/components/DatePicker/DatePicker.types.d.ts +8 -0
- package/dist/components/DatePicker/DatePicker.utils.d.ts +8 -0
- package/dist/components/DatePicker/DatePicker.utils.js +13 -0
- package/dist/components/DatePicker/components/RangePicker/RangePicker.d.ts +4 -0
- package/dist/components/DatePicker/components/RangePicker/RangePicker.js +11 -0
- package/dist/components/DatePicker/components/RangePicker/RangePicker.types.d.ts +3 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/Dropdown/Dropdown.d.ts +3 -0
- package/dist/components/Dropdown/Dropdown.js +78 -0
- package/dist/components/Dropdown/Dropdown.tokens.d.ts +13 -0
- package/dist/components/Dropdown/Dropdown.tokens.js +14 -0
- package/dist/components/Dropdown/Dropdown.types.d.ts +98 -0
- package/dist/components/Dropdown/Dropdown.types.js +30 -0
- package/dist/components/Dropdown/Dropdown.utils.d.ts +4 -0
- package/dist/components/Dropdown/Dropdown.utils.js +40 -0
- package/dist/components/Dropdown/components/Divider/Divider.d.ts +2 -0
- package/dist/components/Dropdown/components/Divider/Divider.js +11 -0
- package/dist/components/Dropdown/components/Divider/Divider.styles.d.ts +7 -0
- package/dist/components/Dropdown/components/Divider/Divider.styles.js +13 -0
- package/dist/components/Dropdown/components/Group/Group.d.ts +3 -0
- package/dist/components/Dropdown/components/Group/Group.js +37 -0
- package/dist/components/Dropdown/components/Group/Group.styles.d.ts +29 -0
- package/dist/components/Dropdown/components/Group/Group.styles.js +39 -0
- package/dist/components/Dropdown/components/Group/Group.types.d.ts +7 -0
- package/dist/components/Dropdown/components/Item/Item.d.ts +3 -0
- package/dist/components/Dropdown/components/Item/Item.js +55 -0
- package/dist/components/Dropdown/components/Item/Item.style.d.ts +51 -0
- package/dist/components/Dropdown/components/Item/Item.style.js +74 -0
- package/dist/components/Dropdown/components/Item/Item.types.d.ts +7 -0
- package/dist/components/Dropdown/components/Menu/Menu.d.ts +3 -0
- package/dist/components/Dropdown/components/Menu/Menu.js +78 -0
- package/dist/components/Dropdown/components/Menu/Menu.styles.d.ts +55 -0
- package/dist/components/Dropdown/components/Menu/Menu.styles.js +69 -0
- package/dist/components/Dropdown/components/Menu/Menu.types.d.ts +7 -0
- package/dist/components/Dropdown/components/SubMenu/SubMenu.d.ts +3 -0
- package/dist/components/Dropdown/components/SubMenu/SubMenu.js +131 -0
- package/dist/components/Dropdown/components/SubMenu/SubMenu.types.d.ts +6 -0
- package/dist/components/Dropdown/components/SubMenu/SubMenu.utils.d.ts +2 -0
- package/dist/components/Dropdown/components/SubMenu/SubMenu.utils.js +15 -0
- package/dist/components/Dropdown/contexts/dropdownContext.d.ts +22 -0
- package/dist/components/Dropdown/contexts/dropdownContext.js +5 -0
- package/dist/components/Dropdown/forStories/menusData.d.ts +9 -0
- package/dist/components/Dropdown/hooks/useFilter.d.ts +8 -0
- package/dist/components/Dropdown/hooks/useFilter.js +45 -0
- package/dist/components/Dropdown/hooks/useSelectedKeysController.d.ts +30 -0
- package/dist/components/Dropdown/hooks/useSelectedKeysController.js +58 -0
- package/dist/components/Dropdown/hooks/useStepSubMenus.d.ts +7 -0
- package/dist/components/Dropdown/hooks/useStepSubMenus.js +34 -0
- package/dist/components/Dropdown/hooks/useSubMenusController.d.ts +7 -0
- package/dist/components/Dropdown/hooks/useSubMenusController.js +30 -0
- package/dist/components/Dropdown/index.d.ts +2 -0
- package/dist/components/Input/Input.d.ts +3 -0
- package/dist/components/Input/Input.js +163 -0
- package/dist/components/Input/Input.styles.d.ts +184 -0
- package/dist/components/Input/Input.styles.js +138 -0
- package/dist/components/Input/Input.tokens.d.ts +18 -0
- package/dist/components/Input/Input.tokens.js +19 -0
- package/dist/components/Input/Input.types.d.ts +19 -0
- package/dist/components/Input/components/InputPassword/InputPassword.d.ts +2 -0
- package/dist/components/Input/components/InputPassword/InputPassword.js +51 -0
- package/dist/components/Input/components/InputPassword/InputPassword.styles.d.ts +10 -0
- package/dist/components/Input/components/InputPassword/InputPassword.styles.js +11 -0
- package/dist/components/Input/components/InputPassword/InputPassword.types.d.ts +11 -0
- package/dist/components/Input/components/InputTextArea/InputTextArea.d.ts +2 -0
- package/dist/components/Input/components/InputTextArea/InputTextArea.js +89 -0
- package/dist/components/Input/components/InputTextArea/InputTextArea.styles.d.ts +33 -0
- package/dist/components/Input/components/InputTextArea/InputTextArea.styles.js +13 -0
- package/dist/components/Input/components/InputTextArea/InputTextArea.types.d.ts +10 -0
- package/dist/components/Input/components/InputTextArea/InputTextArea.utils.d.ts +9 -0
- package/dist/components/Input/components/InputTextArea/InputTextArea.utils.js +105 -0
- package/dist/components/Input/hooks/useKeyboardEvents/index.d.ts +1 -0
- package/dist/components/Input/hooks/useKeyboardEvents/useKeyboardEvents.d.ts +7 -0
- package/dist/components/Input/hooks/useKeyboardEvents/useKeyboardEvents.js +43 -0
- package/dist/components/Input/hooks/useKeyboardEvents/useKeyboardEvents.types.d.ts +3 -0
- package/dist/components/Input/hooks/useMergeState/index.d.ts +1 -0
- package/dist/components/Input/hooks/useMergeState/useMergeState.d.ts +21 -0
- package/dist/components/Input/hooks/useMergeState/useMergeState.js +94 -0
- package/dist/components/Input/hooks/useRemovePasswordTimeout/index.d.ts +1 -0
- package/dist/components/Input/hooks/useRemovePasswordTimeout/useRemovePasswordTimeout.d.ts +4 -0
- package/dist/components/Input/hooks/useRemovePasswordTimeout/useRemovePasswordTimeout.js +49 -0
- package/dist/components/Input/hooks/useRemovePasswordTimeout/useRemovePasswordTimeout.types.d.ts +8 -0
- package/dist/components/Input/index.d.ts +2 -0
- package/dist/components/Input/utils/resolveOnChange/index.d.ts +1 -0
- package/dist/components/Input/utils/resolveOnChange/resolveOnChange.d.ts +3 -0
- package/dist/components/Input/utils/resolveOnChange/resolveOnChange.js +41 -0
- package/dist/components/InputNumber/InputNumber.d.ts +2 -0
- package/dist/components/InputNumber/InputNumber.js +189 -0
- package/dist/components/InputNumber/InputNumber.styles.d.ts +107 -0
- package/dist/components/InputNumber/InputNumber.styles.js +115 -0
- package/dist/components/InputNumber/InputNumber.tokens.d.ts +18 -0
- package/dist/components/InputNumber/InputNumber.tokens.js +19 -0
- package/dist/components/InputNumber/InputNumber.types.d.ts +41 -0
- package/dist/components/InputNumber/InputNumber.utils.d.ts +2 -0
- package/dist/components/InputNumber/InputNumber.utils.js +9 -0
- package/dist/components/InputNumber/components/StepController/StepController.d.ts +3 -0
- package/dist/components/InputNumber/components/StepController/StepController.js +26 -0
- package/dist/components/InputNumber/components/StepController/StepController.styles.d.ts +51 -0
- package/dist/components/InputNumber/components/StepController/StepController.styles.js +51 -0
- package/dist/components/InputNumber/components/StepController/StepController.types.d.ts +5 -0
- package/dist/components/InputNumber/hooks/useChangeValue/index.d.ts +1 -0
- package/dist/components/InputNumber/hooks/useChangeValue/useChangeValue.d.ts +9 -0
- package/dist/components/InputNumber/hooks/useChangeValue/useChangeValue.js +103 -0
- package/dist/components/InputNumber/hooks/useChangeValue/useChangeValue.types.d.ts +11 -0
- package/dist/components/InputNumber/hooks/useDecimalTools/index.d.ts +1 -0
- package/dist/components/InputNumber/hooks/useDecimalTools/useDecimalTools.d.ts +6 -0
- package/dist/components/InputNumber/hooks/useDecimalTools/useDecimalTools.js +59 -0
- package/dist/components/InputNumber/hooks/useDecimalTools/useDecimalTools.types.d.ts +6 -0
- package/dist/components/InputNumber/hooks/useFocusBlurEvents/index.d.ts +1 -0
- package/dist/components/InputNumber/hooks/useFocusBlurEvents/useFocusBlurEvents.d.ts +9 -0
- package/dist/components/InputNumber/hooks/useFocusBlurEvents/useFocusBlurEvents.js +35 -0
- package/dist/components/InputNumber/hooks/useFocusBlurEvents/useFocusBlurEvents.types.d.ts +7 -0
- package/dist/components/InputNumber/hooks/useKeyboardEvents/index.d.ts +1 -0
- package/dist/components/InputNumber/hooks/useKeyboardEvents/useKeyboardEvents.d.ts +6 -0
- package/dist/components/InputNumber/hooks/useKeyboardEvents/useKeyboardEvents.js +37 -0
- package/dist/components/InputNumber/hooks/useKeyboardEvents/useKeyboardEvents.types.d.ts +10 -0
- package/dist/components/InputNumber/hooks/useRange/index.d.ts +1 -0
- package/dist/components/InputNumber/hooks/useRange/useRange.d.ts +9 -0
- package/dist/components/InputNumber/hooks/useRange/useRange.js +36 -0
- package/dist/components/InputNumber/hooks/useRange/useRange.types.d.ts +7 -0
- package/dist/components/InputNumber/hooks/useStep/index.d.ts +1 -0
- package/dist/components/InputNumber/hooks/useStep/useStep.d.ts +6 -0
- package/dist/components/InputNumber/hooks/useStep/useStep.js +55 -0
- package/dist/components/InputNumber/hooks/useStep/useStep.types.d.ts +14 -0
- package/dist/components/InputNumber/hooks/useWheelEvents/index.d.ts +1 -0
- package/dist/components/InputNumber/hooks/useWheelEvents/useWheelEvents.d.ts +2 -0
- package/dist/components/InputNumber/hooks/useWheelEvents/useWheelEvents.js +27 -0
- package/dist/components/InputNumber/hooks/useWheelEvents/useWheelEvents.types.d.ts +9 -0
- package/dist/components/InputNumber/index.d.ts +2 -0
- package/dist/components/InputNumber/utils/BigIntDecimal.d.ts +27 -0
- package/dist/components/InputNumber/utils/BigIntDecimal.js +124 -0
- package/dist/components/InputNumber/utils/MiniDecimal.d.ts +3 -0
- package/dist/components/InputNumber/utils/MiniDecimal.js +42 -0
- package/dist/components/InputNumber/utils/NumberDecimal.d.ts +17 -0
- package/dist/components/InputNumber/utils/NumberDecimal.js +83 -0
- package/dist/components/InputNumber/utils/index.d.ts +4 -0
- package/dist/components/InputNumber/utils/interface.d.ts +13 -0
- package/dist/components/InputNumber/utils/numberUtil.d.ts +15 -0
- package/dist/components/InputNumber/utils/numberUtil.js +91 -0
- package/dist/components/InputNumber/utils/supportUtil.d.ts +1 -0
- package/dist/components/InputNumber/utils/supportUtil.js +6 -0
- package/dist/components/InternalPicker/config/docsStoriesLocale.d.ts +2 -0
- package/dist/components/InternalPicker/config/index.d.ts +2 -0
- package/dist/components/InternalPicker/config/types.d.ts +25 -0
- package/dist/components/InternalPicker/index.d.ts +4 -0
- package/dist/components/InternalPicker/pickers/RangePicker/RangePicker.d.ts +4 -0
- package/dist/components/InternalPicker/pickers/RangePicker/RangePicker.js +49 -0
- package/dist/components/InternalPicker/pickers/RangePicker/RangePicker.types.d.ts +8 -0
- package/dist/components/InternalPicker/pickers/RangePicker/RangePicker.utils.d.ts +3 -0
- package/dist/components/InternalPicker/pickers/RangePicker/RangePicker.utils.js +13 -0
- package/dist/components/InternalPicker/pickers/RangePicker/index.d.ts +2 -0
- package/dist/components/InternalPicker/pickers/SinglePicker/SinglePicker.d.ts +4 -0
- package/dist/components/InternalPicker/pickers/SinglePicker/SinglePicker.js +48 -0
- package/dist/components/InternalPicker/pickers/SinglePicker/SinglePicker.types.d.ts +9 -0
- package/dist/components/InternalPicker/pickers/SinglePicker/SinglePicker.utils.d.ts +21 -0
- package/dist/components/InternalPicker/pickers/SinglePicker/SinglePicker.utils.js +102 -0
- package/dist/components/InternalPicker/pickers/SinglePicker/index.d.ts +3 -0
- package/dist/components/InternalPicker/pickers/hooks/useComponents/index.d.ts +1 -0
- package/dist/components/InternalPicker/pickers/hooks/useComponents/useComponents.d.ts +8 -0
- package/dist/components/InternalPicker/pickers/hooks/useComponents/useComponents.js +18 -0
- package/dist/components/InternalPicker/pickers/hooks/useComponents/useComponents.types.d.ts +5 -0
- package/dist/components/InternalPicker/pickers/index.d.ts +2 -0
- package/dist/components/InternalPicker/styles/DatePanel.styles.d.ts +963 -0
- package/dist/components/InternalPicker/styles/DatePanel.styles.js +234 -0
- package/dist/components/InternalPicker/styles/Popup.styles.d.ts +1042 -0
- package/dist/components/InternalPicker/styles/Popup.styles.js +73 -0
- package/dist/components/InternalPicker/styles/RangeSelector.styles.d.ts +130 -0
- package/dist/components/InternalPicker/styles/RangeSelector.styles.js +45 -0
- package/dist/components/InternalPicker/styles/SingleSelector.styles.d.ts +102 -0
- package/dist/components/InternalPicker/styles/SingleSelector.styles.js +117 -0
- package/dist/components/InternalPicker/styles/TimePanel.styles.d.ts +49 -0
- package/dist/components/InternalPicker/styles/TimePanel.styles.js +64 -0
- package/dist/components/InternalPicker/styles/common.styles.d.ts +1 -0
- package/dist/components/InternalPicker/styles/common.styles.js +4 -0
- package/dist/components/InternalPicker/styles/index.d.ts +4 -0
- package/dist/components/InternalPicker/tokens.d.ts +29 -0
- package/dist/components/InternalPicker/tokens.js +30 -0
- package/dist/components/Message/components/Message/Message.d.ts +3 -0
- package/dist/components/Message/components/Message/Message.js +49 -0
- package/dist/components/Message/components/Message/Message.styles.d.ts +47 -0
- package/dist/components/Message/components/Message/Message.styles.js +93 -0
- package/dist/components/Message/components/Message/Message.tokens.d.ts +8 -0
- package/dist/components/Message/components/Message/Message.tokens.js +10 -0
- package/dist/components/Message/components/Message/Message.types.d.ts +22 -0
- package/dist/components/Message/components/Message/Message.utils.d.ts +6 -0
- package/dist/components/Message/components/Message/Message.utils.js +22 -0
- package/dist/components/Message/components/MessageList/MessageList.d.ts +3 -0
- package/dist/components/Message/components/MessageList/MessageList.js +13 -0
- package/dist/components/Message/components/MessageList/MessageList.styles.d.ts +70 -0
- package/dist/components/Message/components/MessageList/MessageList.styles.js +63 -0
- package/dist/components/Message/components/MessageList/MessageList.types.d.ts +6 -0
- package/dist/components/Message/components/MessagesHolder/MessagesHolder.d.ts +3 -0
- package/dist/components/Message/components/MessagesHolder/MessagesHolder.js +23 -0
- package/dist/components/Message/components/MessagesHolder/MessagesHolder.types.d.ts +9 -0
- package/dist/components/Message/forStories/utils.d.ts +12 -0
- package/dist/components/Message/index.d.ts +2 -0
- package/dist/components/Message/message.d.ts +9 -0
- package/dist/components/Message/message.js +105 -0
- package/dist/components/Message/message.types.d.ts +32 -0
- package/dist/components/Message/message.utils.d.ts +3 -0
- package/dist/components/Message/message.utils.js +15 -0
- package/dist/components/Popconfirm/Popconfirm.d.ts +3 -0
- package/dist/components/Popconfirm/Popconfirm.tokens.d.ts +10 -0
- package/dist/components/Popconfirm/Popconfirm.types.d.ts +28 -0
- package/dist/components/Popconfirm/components/PopconfirmFloatingElement/PopconfirmFloatingElement.d.ts +3 -0
- package/dist/components/Popconfirm/components/PopconfirmFloatingElement/PopconfirmFloatingElement.styles.d.ts +55 -0
- package/dist/components/Popover/Popover.d.ts +3 -0
- package/dist/components/Popover/Popover.js +22 -0
- package/dist/components/Popover/Popover.tokens.d.ts +9 -0
- package/dist/components/Popover/Popover.tokens.js +11 -0
- package/dist/components/Popover/Popover.types.d.ts +13 -0
- package/dist/components/Popover/component/PopoverFloatingElement/PopoverFloatingElement.d.ts +3 -0
- package/dist/components/Popover/component/PopoverFloatingElement/PopoverFloatingElement.js +21 -0
- package/dist/components/Popover/component/PopoverFloatingElement/PopoverFloatingElement.styles.d.ts +32 -0
- package/dist/components/Popover/component/PopoverFloatingElement/PopoverFloatingElement.styles.js +38 -0
- package/dist/components/Popover/forStories/utils.d.ts +1 -0
- package/dist/components/Popover/index.d.ts +2 -0
- package/dist/components/Progress/Progress.d.ts +3 -0
- package/dist/components/Progress/Progress.js +28 -0
- package/dist/components/Progress/Progress.styles.d.ts +18 -0
- package/dist/components/Progress/Progress.styles.js +39 -0
- package/dist/components/Progress/Progress.tokens.d.ts +11 -0
- package/dist/components/Progress/Progress.tokens.js +12 -0
- package/dist/components/Progress/Progress.types.d.ts +8 -0
- package/dist/components/Progress/index.d.ts +2 -0
- package/dist/components/Radio/Radio.d.ts +3 -0
- package/dist/components/Radio/Radio.js +53 -0
- package/dist/components/Radio/Radio.styles.d.ts +66 -0
- package/dist/components/Radio/Radio.styles.js +72 -0
- package/dist/components/Radio/Radio.tokens.d.ts +16 -0
- package/dist/components/Radio/Radio.tokens.js +17 -0
- package/dist/components/Radio/Radio.types.d.ts +9 -0
- package/dist/components/Radio/components/RadioGroup/RadioGroup.d.ts +3 -0
- package/dist/components/Radio/components/RadioGroup/RadioGroup.js +58 -0
- package/dist/components/Radio/components/RadioGroup/RadioGroup.styles.d.ts +5 -0
- package/dist/components/Radio/components/RadioGroup/RadioGroup.styles.js +7 -0
- package/dist/components/Radio/components/RadioGroup/RadioGroup.types.d.ts +11 -0
- package/dist/components/Radio/components/RadioInternal/RadioInternal.d.ts +2 -0
- package/dist/components/Radio/components/RadioInternal/RadioInternal.js +52 -0
- package/dist/components/Radio/components/RadioInternal/RadioInternal.styles.d.ts +61 -0
- package/dist/components/Radio/components/RadioInternal/RadioInternal.styles.js +70 -0
- package/dist/components/Radio/components/RadioInternal/RadioInternal.types.d.ts +14 -0
- package/dist/components/Radio/contexts/RadioGroupContext.d.ts +4 -0
- package/dist/components/Radio/contexts/RadioGroupContext.js +5 -0
- package/dist/components/Radio/hooks/useMergeState/index.d.ts +1 -0
- package/dist/components/Radio/hooks/useMergeState/useMergeState.d.ts +21 -0
- package/dist/components/Radio/hooks/useMergeState/useMergeState.js +94 -0
- package/dist/components/Radio/index.d.ts +2 -0
- package/dist/components/Select/Select.d.ts +3 -0
- package/dist/components/Select/Select.js +305 -0
- package/dist/components/Select/Select.styles.d.ts +135 -0
- package/dist/components/Select/Select.styles.js +210 -0
- package/dist/components/Select/Select.tokens.d.ts +27 -0
- package/dist/components/Select/Select.tokens.js +28 -0
- package/dist/components/Select/Select.types.d.ts +89 -0
- package/dist/components/Select/Select.utils.d.ts +10 -0
- package/dist/components/Select/Select.utils.js +59 -0
- package/dist/components/Select/components/SelectOption/SelectOption.d.ts +3 -0
- package/dist/components/Select/components/SelectOption/SelectOption.js +55 -0
- package/dist/components/Select/components/SelectOption/SelectOption.styles.d.ts +41 -0
- package/dist/components/Select/components/SelectOption/SelectOption.styles.js +54 -0
- package/dist/components/Select/components/SelectOption/SelectOption.types.d.ts +22 -0
- package/dist/components/Select/components/SelectOptionList/SelectOptionList.d.ts +3 -0
- package/dist/components/Select/components/SelectOptionList/SelectOptionList.js +139 -0
- package/dist/components/Select/components/SelectOptionList/SelectOptionList.styles.d.ts +66 -0
- package/dist/components/Select/components/SelectOptionList/SelectOptionList.styles.js +85 -0
- package/dist/components/Select/components/SelectOptionList/SelectOptionList.types.d.ts +42 -0
- package/dist/components/Select/components/SelectOptionList/SelectOptionList.utils.d.ts +1 -0
- package/dist/components/Select/components/SelectOptionList/SelectOptionList.utils.js +4 -0
- package/dist/components/Select/components/SelectTag/SelectTag.d.ts +3 -0
- package/dist/components/Select/components/SelectTag/SelectTag.js +24 -0
- package/dist/components/Select/components/SelectTag/SelectTag.styles.d.ts +8 -0
- package/dist/components/Select/components/SelectTag/SelectTag.styles.js +23 -0
- package/dist/components/Select/components/SelectTag/SelectTag.types.d.ts +10 -0
- package/dist/components/Select/components/TagPlaceholder/TagPlaceholder.d.ts +4 -0
- package/dist/components/Select/components/TagPlaceholder/TagPlaceholder.js +13 -0
- package/dist/components/Select/components/TagPlaceholder/TagPlaceholder.styles.d.ts +5 -0
- package/dist/components/Select/components/TagPlaceholder/TagPlaceholder.styles.js +8 -0
- package/dist/components/Select/components/TagPlaceholder/TagPlaceholder.types.d.ts +3 -0
- package/dist/components/Select/forStories/dataForExamples.d.ts +20 -0
- package/dist/components/Select/hooks/useCurrentValue.d.ts +8 -0
- package/dist/components/Select/hooks/useCurrentValue.js +31 -0
- package/dist/components/Select/hooks/useDefaultCurrentValue.d.ts +3 -0
- package/dist/components/Select/hooks/useDefaultCurrentValue.js +14 -0
- package/dist/components/Select/hooks/useDefaultSelectIndex.d.ts +2 -0
- package/dist/components/Select/hooks/useDefaultSelectIndex.js +17 -0
- package/dist/components/Select/hooks/useHideElements.d.ts +5 -0
- package/dist/components/Select/hooks/useHideElements.js +60 -0
- package/dist/components/Select/hooks/useKeyControl.d.ts +7 -0
- package/dist/components/Select/hooks/useKeyControl.js +37 -0
- package/dist/components/Select/hooks/useSearch.d.ts +11 -0
- package/dist/components/Select/hooks/useSearch.js +55 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Switch/Switch.d.ts +3 -0
- package/dist/components/Switch/Switch.js +68 -0
- package/dist/components/Switch/Switch.styles.d.ts +7 -0
- package/dist/components/Switch/Switch.styles.js +62 -0
- package/dist/components/Switch/Switch.tokens.d.ts +20 -0
- package/dist/components/Switch/Switch.tokens.js +22 -0
- package/dist/components/Switch/Switch.types.d.ts +24 -0
- package/dist/components/Switch/Switch.utils.d.ts +4 -0
- package/dist/components/Switch/Switch.utils.js +10 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Tag/Tag.d.ts +4 -0
- package/dist/components/Tag/Tag.js +42 -0
- package/dist/components/Tag/Tag.styles.d.ts +303 -0
- package/dist/components/Tag/Tag.styles.js +52 -0
- package/dist/components/Tag/Tag.types.d.ts +23 -0
- package/dist/components/Tag/Tag.utils.d.ts +86 -0
- package/dist/components/Tag/Tag.utils.js +90 -0
- package/dist/components/Tag/components/AddTagController/AddTagController.d.ts +3 -0
- package/dist/components/Tag/components/AddTagController/AddTagController.styles.d.ts +15 -0
- package/dist/components/Tag/components/AddTagController/AddTagController.types.d.ts +13 -0
- package/dist/components/Tag/components/AddTagController/forStories/utilsForStories.d.ts +3 -0
- package/dist/components/Tag/components/Checkable/Checkable.d.ts +4 -0
- package/dist/components/Tag/components/Checkable/Checkable.js +34 -0
- package/dist/components/Tag/components/Checkable/Checkable.styles.d.ts +30 -0
- package/dist/components/Tag/components/Checkable/Checkable.styles.js +35 -0
- package/dist/components/Tag/components/Checkable/Checkable.tokens.d.ts +10 -0
- package/dist/components/Tag/components/Checkable/Checkable.tokens.js +12 -0
- package/dist/components/Tag/components/Checkable/Checkable.types.d.ts +12 -0
- package/dist/components/Tag/index.d.ts +3 -0
- package/dist/components/TimePicker/TimePicker.d.ts +4 -0
- package/dist/components/TimePicker/TimePicker.js +13 -0
- package/dist/components/TimePicker/TimePicker.types.d.ts +8 -0
- package/dist/components/TimePicker/TimePicker.utils.d.ts +4 -0
- package/dist/components/TimePicker/TimePicker.utils.js +9 -0
- package/dist/components/TimePicker/components/RangePicker/RangePicker.d.ts +4 -0
- package/dist/components/TimePicker/components/RangePicker/RangePicker.js +11 -0
- package/dist/components/TimePicker/components/RangePicker/RangePicker.types.d.ts +3 -0
- package/dist/components/TimePicker/index.d.ts +2 -0
- package/dist/components/Tooltip/Tooltip.d.ts +3 -0
- package/dist/components/Tooltip/Tooltip.js +22 -0
- package/dist/components/Tooltip/Tooltip.tokens.d.ts +10 -0
- package/dist/components/Tooltip/Tooltip.tokens.js +12 -0
- package/dist/components/Tooltip/Tooltip.types.d.ts +12 -0
- package/dist/components/Tooltip/components/TooltipFloatingElement/TooltipFloatingElement.d.ts +3 -0
- package/dist/components/Tooltip/components/TooltipFloatingElement/TooltipFloatingElement.js +15 -0
- package/dist/components/Tooltip/components/TooltipFloatingElement/TooltipFloatingElement.styles.d.ts +15 -0
- package/dist/components/Tooltip/components/TooltipFloatingElement/TooltipFloatingElement.styles.js +19 -0
- package/dist/components/Tooltip/components/TooltipFloatingElement/TooltipFloatingElement.type.d.ts +6 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/Upload/Upload.d.ts +3 -0
- package/dist/components/Upload/Upload.js +125 -0
- package/dist/components/Upload/Upload.styles.d.ts +31 -0
- package/dist/components/Upload/Upload.styles.js +32 -0
- package/dist/components/Upload/Upload.tokens.d.ts +16 -0
- package/dist/components/Upload/Upload.tokens.js +17 -0
- package/dist/components/Upload/Upload.types.d.ts +34 -0
- package/dist/components/Upload/components/Dragger/Dragger.d.ts +3 -0
- package/dist/components/Upload/components/Dragger/Dragger.js +29 -0
- package/dist/components/Upload/components/Dragger/Dragger.styles.d.ts +22 -0
- package/dist/components/Upload/components/Dragger/Dragger.styles.js +24 -0
- package/dist/components/Upload/components/Dragger/Dragger.types.d.ts +6 -0
- package/dist/components/Upload/components/InternalUpload/InternalUpload.d.ts +3 -0
- package/dist/components/Upload/components/InternalUpload/InternalUpload.js +91 -0
- package/dist/components/Upload/components/InternalUpload/InternalUpload.types.d.ts +9 -0
- package/dist/components/Upload/components/UploadList/UploadList.d.ts +3 -0
- package/dist/components/Upload/components/UploadList/UploadList.js +19 -0
- package/dist/components/Upload/components/UploadList/UploadList.styles.d.ts +9 -0
- package/dist/components/Upload/components/UploadList/UploadList.styles.js +11 -0
- package/dist/components/Upload/components/UploadList/UploadList.types.d.ts +8 -0
- package/dist/components/Upload/components/UploadListItem/UploadListItem.d.ts +3 -0
- package/dist/components/Upload/components/UploadListItem/UploadListItem.js +51 -0
- package/dist/components/Upload/components/UploadListItem/UploadListItem.styles.d.ts +70 -0
- package/dist/components/Upload/components/UploadListItem/UploadListItem.styles.js +73 -0
- package/dist/components/Upload/components/UploadListItem/UploadListItem.types.d.ts +4 -0
- package/dist/components/Upload/hooks/useDnd/useDnd.d.ts +8 -0
- package/dist/components/Upload/hooks/useDnd/useDnd.js +22 -0
- package/dist/components/Upload/hooks/useDnd/useDnd.types.d.ts +3 -0
- package/dist/components/Upload/index.d.ts +2 -0
- package/dist/components/Upload/utils/attrAccept.d.ts +1 -0
- package/dist/components/Upload/utils/attrAccept.js +38 -0
- package/dist/components/Upload/utils/file2obj.d.ts +6 -0
- package/dist/components/Upload/utils/file2obj.js +13 -0
- package/dist/components/Upload/utils/modifyFileList.d.ts +3 -0
- package/dist/components/Upload/utils/modifyFileList.js +24 -0
- package/dist/components/Upload/utils/uidGenerator.d.ts +1 -0
- package/dist/components/Upload/utils/uidGenerator.js +33 -0
- package/dist/configure/dayjs.d.ts +0 -0
- package/dist/configure/dayjs.js +4 -0
- package/dist/configure/index.d.ts +0 -0
- package/dist/contexts/themeContext.d.ts +354 -0
- package/dist/contexts/themeContext.js +6 -0
- package/dist/docComponents/Demonstration/Demonstration.d.ts +4 -0
- package/dist/docComponents/Demonstration/Demonstration.styles.d.ts +9 -0
- package/dist/docComponents/Demonstration/Demonstration.types.d.ts +5 -0
- package/dist/docComponents/Description/Description.d.ts +5 -0
- package/dist/docComponents/Description/Description.style.d.ts +26 -0
- package/dist/docComponents/Doc/Doc.d.ts +4 -0
- package/dist/docComponents/Doc/Doc.style.d.ts +13 -0
- package/dist/docComponents/Example/Example.d.ts +4 -0
- package/dist/docComponents/Example/Example.styles.d.ts +9 -0
- package/dist/hocs/withThemeProvider.d.ts +2 -0
- package/dist/hocs/withThemeProvider.js +11 -0
- package/dist/hooks/useDebounce.d.ts +3 -0
- package/dist/hooks/useDebounce.js +27 -0
- package/dist/hooks/useForceUpdate.d.ts +1 -0
- package/dist/hooks/useForceUpdate.js +9 -0
- package/dist/hooks/useLoadingDelay.d.ts +6 -0
- package/dist/hooks/useLoadingDelay.js +34 -0
- package/dist/hooks/usePrevious.d.ts +1 -0
- package/dist/hooks/usePrevious.js +11 -0
- package/dist/hooks/useResizeObserver.d.ts +1 -0
- package/dist/hooks/useResizeObserver.js +25 -0
- package/dist/hooks/useTheme/index.d.ts +1 -0
- package/dist/hooks/useTheme/useTheme.d.ts +354 -0
- package/dist/hooks/useTheme/useTheme.js +8 -0
- package/dist/icons/icons/LoadingOutlined.d.ts +3 -0
- package/dist/icons/icons/LoadingOutlined.js +9 -0
- package/dist/icons/icons/index.d.ts +1 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.js +53 -0
- package/dist/providers/ThemeProvider/ThemeProvider.d.ts +3 -0
- package/dist/providers/ThemeProvider/ThemeProvider.js +11 -0
- package/dist/providers/ThemeProvider/ThemeProvider.types.d.ts +4 -0
- package/dist/providers/ThemeProvider/index.d.ts +2 -0
- package/dist/themes/baseTokens/baseColorTokens/baseColorTokens.d.ts +158 -0
- package/dist/themes/baseTokens/baseColorTokens/baseColorTokens.js +35 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/blueColors.d.ts +12 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/blueColors.js +15 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/cyanColors.d.ts +12 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/cyanColors.js +15 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/goldColors.d.ts +12 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/goldColors.js +15 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/greenColors.d.ts +12 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/greenColors.js +15 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/limeColors.d.ts +12 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/limeColors.js +15 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/magentaColors.d.ts +12 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/magentaColors.js +15 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/neutralColors.d.ts +18 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/neutralColors.js +21 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/orangeColors.d.ts +12 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/orangeColors.js +15 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/purpleColors.d.ts +12 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/purpleColors.js +15 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/redColors.d.ts +12 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/redColors.js +15 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/thrushColor.d.ts +12 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/thrushColor.js +15 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/transparentBlackColors.d.ts +12 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/transparentBlackColors.js +16 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/transparentWhiteColors.d.ts +12 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/transparentWhiteColors.js +16 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/volcanoColors.d.ts +12 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/volcanoColors.js +15 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/yellowColors.d.ts +12 -0
- package/dist/themes/baseTokens/baseColorTokens/colorGroups/yellowColors.js +15 -0
- package/dist/themes/baseTokens/baseShadowTokens/baseShadowTokens.d.ts +5 -0
- package/dist/themes/baseTokens/baseShadowTokens/baseShadowTokens.js +9 -0
- package/dist/themes/baseTokens/baseSizeTokens/baseSizeTokens.d.ts +17 -0
- package/dist/themes/baseTokens/baseSizeTokens/baseSizeTokens.js +21 -0
- package/dist/themes/baseTokens/baseTypographyTokens/baseTypographyTokens.d.ts +42 -0
- package/dist/themes/baseTokens/baseTypographyTokens/baseTypographyTokens.js +49 -0
- package/dist/themes/baseTokens/const.d.ts +2 -0
- package/dist/themes/baseTokens/const.js +7 -0
- package/dist/themes/index.d.ts +4 -0
- package/dist/themes/semanticTokens/colorSemanticTokens/semanticBlocks/PositiveColorTokens.d.ts +11 -0
- package/dist/themes/semanticTokens/colorSemanticTokens/semanticBlocks/PositiveColorTokens.js +15 -0
- package/dist/themes/semanticTokens/colorSemanticTokens/semanticBlocks/backgroundColorTokens.d.ts +25 -0
- package/dist/themes/semanticTokens/colorSemanticTokens/semanticBlocks/backgroundColorTokens.js +29 -0
- package/dist/themes/semanticTokens/colorSemanticTokens/semanticBlocks/controlShadowsTokens.d.ts +6 -0
- package/dist/themes/semanticTokens/colorSemanticTokens/semanticBlocks/controlShadowsTokens.js +12 -0
- package/dist/themes/semanticTokens/colorSemanticTokens/semanticBlocks/dangerColorTokens.d.ts +11 -0
- package/dist/themes/semanticTokens/colorSemanticTokens/semanticBlocks/dangerColorTokens.js +15 -0
- package/dist/themes/semanticTokens/colorSemanticTokens/semanticBlocks/infoColorTokens.d.ts +11 -0
- package/dist/themes/semanticTokens/colorSemanticTokens/semanticBlocks/infoColorTokens.js +15 -0
- package/dist/themes/semanticTokens/colorSemanticTokens/semanticBlocks/lineColorTokens.d.ts +8 -0
- package/dist/themes/semanticTokens/colorSemanticTokens/semanticBlocks/lineColorTokens.js +12 -0
- package/dist/themes/semanticTokens/colorSemanticTokens/semanticBlocks/primaryColorTokens.d.ts +11 -0
- package/dist/themes/semanticTokens/colorSemanticTokens/semanticBlocks/primaryColorTokens.js +15 -0
- package/dist/themes/semanticTokens/colorSemanticTokens/semanticBlocks/tagColorTokens.d.ts +40 -0
- package/dist/themes/semanticTokens/colorSemanticTokens/semanticBlocks/tagColorTokens.js +44 -0
- package/dist/themes/semanticTokens/colorSemanticTokens/semanticBlocks/textColorTokens.d.ts +19 -0
- package/dist/themes/semanticTokens/colorSemanticTokens/semanticBlocks/textColorTokens.js +24 -0
- package/dist/themes/semanticTokens/colorSemanticTokens/semanticBlocks/warningColorTokens.d.ts +11 -0
- package/dist/themes/semanticTokens/colorSemanticTokens/semanticBlocks/warningColorTokens.js +15 -0
- package/dist/themes/semanticTokens/colorSemanticTokens/semanticColorTokens.d.ts +116 -0
- package/dist/themes/semanticTokens/colorSemanticTokens/semanticColorTokens.js +25 -0
- package/dist/themes/semanticTokens/otherSemanticTokens/otherSemanticTokens.d.ts +4 -0
- package/dist/themes/semanticTokens/otherSemanticTokens/otherSemanticTokens.js +7 -0
- package/dist/themes/semanticTokens/otherSemanticTokens/semanticBlocks/opacityTokens.d.ts +5 -0
- package/dist/themes/semanticTokens/otherSemanticTokens/semanticBlocks/opacityTokens.js +8 -0
- package/dist/themes/semanticTokens/sizeSemanticTokens/semanticBlocks/borderRadiusSizeTokens.d.ts +6 -0
- package/dist/themes/semanticTokens/sizeSemanticTokens/semanticBlocks/borderRadiusSizeTokens.js +10 -0
- package/dist/themes/semanticTokens/sizeSemanticTokens/semanticBlocks/controlSizeTokens.d.ts +6 -0
- package/dist/themes/semanticTokens/sizeSemanticTokens/semanticBlocks/controlSizeTokens.js +10 -0
- package/dist/themes/semanticTokens/sizeSemanticTokens/semanticBlocks/iconSizeTokens.d.ts +9 -0
- package/dist/themes/semanticTokens/sizeSemanticTokens/semanticBlocks/iconSizeTokens.js +13 -0
- package/dist/themes/semanticTokens/sizeSemanticTokens/semanticBlocks/marginSizeTokens.d.ts +8 -0
- package/dist/themes/semanticTokens/sizeSemanticTokens/semanticBlocks/marginSizeTokens.js +12 -0
- package/dist/themes/semanticTokens/sizeSemanticTokens/semanticBlocks/paddingSizeTokens.d.ts +9 -0
- package/dist/themes/semanticTokens/sizeSemanticTokens/semanticBlocks/paddingSizeTokens.js +13 -0
- package/dist/themes/semanticTokens/sizeSemanticTokens/semanticBlocks/spaceSizeTokens.d.ts +8 -0
- package/dist/themes/semanticTokens/sizeSemanticTokens/semanticBlocks/spaceSizeTokens.js +12 -0
- package/dist/themes/semanticTokens/sizeSemanticTokens/semanticSizeTokens.d.ts +25 -0
- package/dist/themes/semanticTokens/sizeSemanticTokens/semanticSizeTokens.js +17 -0
- package/dist/themes/themes.d.ts +354 -0
- package/dist/themes/themes.js +9 -0
- package/dist/themes/themes.types.d.ts +4 -0
- package/dist/themes/themes.utils.d.ts +710 -0
- package/dist/themes/themes.utils.js +21 -0
- package/dist/types.d.ts +4 -0
- package/dist/utils/color/index.d.ts +5 -0
- package/dist/utils/color/index.js +47 -0
- package/dist/utils/color/types.d.ts +11 -0
- package/dist/utils/const/index.d.ts +1 -0
- package/dist/utils/const/index.js +4 -0
- package/dist/utils/consts.d.ts +2 -0
- package/dist/utils/consts.js +6 -0
- package/dist/utils/converters.d.ts +1 -0
- package/dist/utils/converters.js +5 -0
- package/dist/utils/index.d.ts +2 -0
- package/package.json +89 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const DEFAULT_CONTAINER = document.body;
|
|
2
|
+
const maxZIndex = 2147483647;
|
|
3
|
+
const defaultConfig = {
|
|
4
|
+
duration: 3,
|
|
5
|
+
getContainer: () => DEFAULT_CONTAINER,
|
|
6
|
+
rtl: false,
|
|
7
|
+
placement: "bottomRight",
|
|
8
|
+
top: 24,
|
|
9
|
+
bottom: 24,
|
|
10
|
+
zIndex: maxZIndex
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
DEFAULT_CONTAINER,
|
|
14
|
+
defaultConfig
|
|
15
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Theme } from 'themes';
|
|
2
|
+
export declare const getPopconfirmTokens: (theme: Theme) => {
|
|
3
|
+
popconfirmBg: "#FFFFFF";
|
|
4
|
+
popconfirmText: "#262626";
|
|
5
|
+
popconfirmIcon: "#FA8C16";
|
|
6
|
+
popconfirmMinWidth: number;
|
|
7
|
+
popconfirmMaxWidth: number;
|
|
8
|
+
popconfirmPadding: number;
|
|
9
|
+
popconfirmZIndexPopup: number;
|
|
10
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Interpolation } from '@emotion/react';
|
|
2
|
+
import { BaseTooltipProps } from '../BaseTooltip/BaseTooltip.types';
|
|
3
|
+
import { ButtonProps } from 'components/Button';
|
|
4
|
+
import { MouseEvent, ReactNode } from 'react';
|
|
5
|
+
import { Theme } from '../../themes';
|
|
6
|
+
export interface PopconfirmProps extends Omit<BaseTooltipProps, "floatingElement" | "arrowColor"> {
|
|
7
|
+
okButtonProps?: ButtonProps;
|
|
8
|
+
okText?: ReactNode;
|
|
9
|
+
cancelButtonProps?: ButtonProps;
|
|
10
|
+
cancelText?: ReactNode;
|
|
11
|
+
showCancel?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
icon?: ReactNode;
|
|
14
|
+
title?: (() => ReactNode) | ReactNode;
|
|
15
|
+
description?: (() => ReactNode) | ReactNode;
|
|
16
|
+
styles?: {
|
|
17
|
+
wrapper?: (theme: Theme) => Interpolation;
|
|
18
|
+
bodyWrapper?: (theme: Theme) => Interpolation;
|
|
19
|
+
iconWrapper?: (theme: Theme) => Interpolation;
|
|
20
|
+
contentWrapper?: (theme: Theme) => Interpolation;
|
|
21
|
+
titleWrapper?: (theme: Theme) => Interpolation;
|
|
22
|
+
descriptionWrapper?: (theme: Theme) => Interpolation;
|
|
23
|
+
buttonsWrapper?: (theme: Theme) => Interpolation;
|
|
24
|
+
};
|
|
25
|
+
onCancel?: (e: MouseEvent) => void;
|
|
26
|
+
onConfirm?: (e: MouseEvent) => void;
|
|
27
|
+
onPopupClick?: (e: MouseEvent) => void;
|
|
28
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Theme } from 'themes';
|
|
2
|
+
export declare const popconfirmFloatingElementStyle: {
|
|
3
|
+
wrapper: (theme: Theme) => {
|
|
4
|
+
readonly fontFamily: "Roboto";
|
|
5
|
+
readonly fontSize: 12;
|
|
6
|
+
readonly lineHeight: "20px";
|
|
7
|
+
readonly display: "flex";
|
|
8
|
+
readonly flexDirection: "column";
|
|
9
|
+
readonly gap: 8;
|
|
10
|
+
readonly padding: number;
|
|
11
|
+
readonly minWidth: number;
|
|
12
|
+
readonly maxWidth: number;
|
|
13
|
+
readonly borderRadius: 8;
|
|
14
|
+
readonly alignItems: "flex-start";
|
|
15
|
+
readonly background: "#FFFFFF";
|
|
16
|
+
readonly boxShadow: `0 3px 6px -4px rgba(${number}, ${number}, ${number}, 0.12), 0 6px 16px 0 rgba(${number}, ${number}, ${number}, 0.08), 0 9px 28px 8px rgba(${number}, ${number}, ${number}, 0.05)`;
|
|
17
|
+
readonly color: "#262626";
|
|
18
|
+
};
|
|
19
|
+
bodyWrapper: (theme: Theme) => {
|
|
20
|
+
display: string;
|
|
21
|
+
gap: 8;
|
|
22
|
+
};
|
|
23
|
+
iconWrapper: (theme: Theme) => {
|
|
24
|
+
fontSize: 16;
|
|
25
|
+
display: string;
|
|
26
|
+
justifyContent: string;
|
|
27
|
+
alignItems: string;
|
|
28
|
+
height: number;
|
|
29
|
+
color: "#FA8C16";
|
|
30
|
+
};
|
|
31
|
+
contentWrapper: (theme: Theme) => {
|
|
32
|
+
readonly display: "flex";
|
|
33
|
+
readonly gap: 4;
|
|
34
|
+
readonly flexDirection: "column";
|
|
35
|
+
};
|
|
36
|
+
titleWrapper: (theme: Theme) => {
|
|
37
|
+
fontWeight: string;
|
|
38
|
+
fontFamily: "Roboto";
|
|
39
|
+
fontSize: 14;
|
|
40
|
+
lineHeight: "20px";
|
|
41
|
+
color: "#262626";
|
|
42
|
+
};
|
|
43
|
+
descriptionWrapper: (theme: Theme) => {
|
|
44
|
+
fontFamily: "Roboto";
|
|
45
|
+
fontSize: 14;
|
|
46
|
+
lineHeight: "20px";
|
|
47
|
+
color: "#262626";
|
|
48
|
+
};
|
|
49
|
+
buttonsWrapper: (theme: Theme) => {
|
|
50
|
+
display: string;
|
|
51
|
+
justifyContent: string;
|
|
52
|
+
gap: 8;
|
|
53
|
+
width: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { memo } from "react";
|
|
3
|
+
import { getPopoverTokens } from "./Popover.tokens.js";
|
|
4
|
+
import { BaseTooltip } from "../BaseTooltip/BaseTooltip.js";
|
|
5
|
+
import { PopoverFloatingElement } from "./component/PopoverFloatingElement/PopoverFloatingElement.js";
|
|
6
|
+
import { withThemeProvider } from "../../hocs/withThemeProvider.js";
|
|
7
|
+
import { useTheme } from "../../hooks/useTheme/useTheme.js";
|
|
8
|
+
const PopoverComponent = memo(({
|
|
9
|
+
title,
|
|
10
|
+
content,
|
|
11
|
+
children,
|
|
12
|
+
styles,
|
|
13
|
+
...baseProps
|
|
14
|
+
}) => {
|
|
15
|
+
const theme = useTheme();
|
|
16
|
+
const popoverTokens = getPopoverTokens(theme);
|
|
17
|
+
return /* @__PURE__ */ jsx(BaseTooltip, { ...baseProps, floatingElement: /* @__PURE__ */ jsx(PopoverFloatingElement, { title, content, styles }), arrowColor: popoverTokens.popoverBg, children });
|
|
18
|
+
});
|
|
19
|
+
const Popover = withThemeProvider(PopoverComponent);
|
|
20
|
+
export {
|
|
21
|
+
Popover
|
|
22
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Interpolation } from '@emotion/react';
|
|
2
|
+
import { BaseTooltipProps } from '../BaseTooltip/BaseTooltip.types';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
import { Theme } from '../../themes';
|
|
5
|
+
export interface PopoverProps extends Omit<BaseTooltipProps, "floatingElement" | "arrowColor"> {
|
|
6
|
+
title?: ReactNode | (() => ReactNode);
|
|
7
|
+
content?: ReactNode | (() => ReactNode);
|
|
8
|
+
styles?: {
|
|
9
|
+
wrapper?: (theme: Theme) => Interpolation;
|
|
10
|
+
titleWrapper?: (theme: Theme) => Interpolation;
|
|
11
|
+
contentWrapper?: (theme: Theme) => Interpolation;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsxs, jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { isFunction } from "lodash-es";
|
|
3
|
+
import { popoverFloatingElementDefaultStyle } from "./PopoverFloatingElement.styles.js";
|
|
4
|
+
import { useTheme } from "../../../../hooks/useTheme/useTheme.js";
|
|
5
|
+
const PopoverFloatingElement = ({
|
|
6
|
+
title,
|
|
7
|
+
content,
|
|
8
|
+
styles
|
|
9
|
+
}) => {
|
|
10
|
+
var _a, _b, _c;
|
|
11
|
+
const theme = useTheme();
|
|
12
|
+
const currentTitle = isFunction(title) ? title() : title;
|
|
13
|
+
const currentContent = isFunction(content) ? content() : content;
|
|
14
|
+
return /* @__PURE__ */ jsxs("div", { css: [popoverFloatingElementDefaultStyle.wrapper(theme), (_a = styles == null ? void 0 : styles.wrapper) == null ? void 0 : _a.call(styles, theme), process.env.NODE_ENV === "production" ? "" : ";label:PopoverFloatingElement;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9idWlsZHMvZnJvbnRlbmQvbGlicy91aS1raXQvc3JjL2NvbXBvbmVudHMvUG9wb3Zlci9jb21wb25lbnQvUG9wb3ZlckZsb2F0aW5nRWxlbWVudC9Qb3BvdmVyRmxvYXRpbmdFbGVtZW50LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFhUyIsImZpbG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JiYgKFxuICAgICAgICA8ZGl2XG4gICAgICAgICAgY3NzPXtbXG4gICAgICAgICAgICBwb3BvdmVyRmxvYXRpbmdFbGVtZW50RGVmYXVsdFN0eWxlLnRpdGxlV3JhcHBlcih0aGVtZSksXG4gICAgICAgICAgICBzdHlsZXM/LnRpdGxlV3JhcHBlcj8uKHRoZW1lKSxcbiAgICAgICAgICBdfVxuICAgICAgICA+XG4gICAgICAgICAge2N1cnJlbnRUaXRsZX1cbiAgICAgICAgPC9kaXY+XG4gICAgICApfVxuICAgICAge2N1cnJlbnRDb250ZW50ICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIGNzcz17W1xuICAgICAgICAgICAgcG9wb3ZlckZsb2F0aW5nRWxlbWVudERlZmF1bHRTdHlsZS5jb250ZW50V3JhcHBlcih0aGVtZSksXG4gICAgICAgICAgICBzdHlsZXM/LmNvbnRlbnRXcmFwcGVyPy4odGhlbWUpLFxuICAgICAgICAgIF19XG4gICAgICAgID5cbiAgICAgICAgICB7Y3VycmVudENvbnRlbnR9XG4gICAgICAgIDwvZGl2PlxuICAgICAgKX1cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */"], children: [
|
|
15
|
+
currentTitle && /* @__PURE__ */ jsx("div", { css: [popoverFloatingElementDefaultStyle.titleWrapper(theme), (_b = styles == null ? void 0 : styles.titleWrapper) == null ? void 0 : _b.call(styles, theme), process.env.NODE_ENV === "production" ? "" : ";label:PopoverFloatingElement;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9idWlsZHMvZnJvbnRlbmQvbGlicy91aS1raXQvc3JjL2NvbXBvbmVudHMvUG9wb3Zlci9jb21wb25lbnQvUG9wb3ZlckZsb2F0aW5nRWxlbWVudC9Qb3BvdmVyRmxvYXRpbmdFbGVtZW50LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnQlUiL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ycmVudFRpdGxlICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIGNzcz17W1xuICAgICAgICAgICAgcG9wb3ZlckZsb2F0aW5nRWxlbWVudERlZmF1bHRTdHlsZS50aXRsZVdyYXBwZXIodGhlbWUpLFxuICAgICAgICAgICAgc3R5bGVzPy50aXRsZVdyYXBwZXI/Lih0aGVtZSksXG4gICAgICAgICAgXX1cbiAgICAgICAgPlxuICAgICAgICAgIHtjdXJyZW50VGl0bGV9XG4gICAgICAgIDwvZGl2PlxuICAgICAgKX1cbiAgICAgIHtjdXJyZW50Q29udGVudCAmJiAoXG4gICAgICAgIDxkaXZcbiAgICAgICAgICBjc3M9e1tcbiAgICAgICAgICAgIHBvcG92ZXJGbG9hdGluZ0VsZW1lbnREZWZhdWx0U3R5bGUuY29udGVudFdyYXBwZXIodGhlbWUpLFxuICAgICAgICAgICAgc3R5bGVzPy5jb250ZW50V3JhcHBlcj8uKHRoZW1lKSxcbiAgICAgICAgICBdfVxuICAgICAgICA+XG4gICAgICAgICAge2N1cnJlbnRDb250ZW50fVxuICAgICAgICA8L2Rpdj5cbiAgICAgICl9XG4gICAgPC9kaXY+XG4gICk7XG59O1xuIl19 */"], children: currentTitle }),
|
|
16
|
+
currentContent && /* @__PURE__ */ jsx("div", { css: [popoverFloatingElementDefaultStyle.contentWrapper(theme), (_c = styles == null ? void 0 : styles.contentWrapper) == null ? void 0 : _c.call(styles, theme), process.env.NODE_ENV === "production" ? "" : ";label:PopoverFloatingElement;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9idWlsZHMvZnJvbnRlbmQvbGlicy91aS1raXQvc3JjL2NvbXBvbmVudHMvUG9wb3Zlci9jb21wb25lbnQvUG9wb3ZlckZsb2F0aW5nRWxlbWVudC9Qb3BvdmVyRmxvYXRpbmdFbGVtZW50LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmd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XG4gICAgICB7Y3VycmVudFRpdGxlICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIGNzcz17W1xuICAgICAgICAgICAgcG9wb3ZlckZsb2F0aW5nRWxlbWVudERlZmF1bHRTdHlsZS50aXRsZVdyYXBwZXIodGhlbWUpLFxuICAgICAgICAgICAgc3R5bGVzPy50aXRsZVdyYXBwZXI/Lih0aGVtZSksXG4gICAgICAgICAgXX1cbiAgICAgICAgPlxuICAgICAgICAgIHtjdXJyZW50VGl0bGV9XG4gICAgICAgIDwvZGl2PlxuICAgICAgKX1cbiAgICAgIHtjdXJyZW50Q29udGVudCAmJiAoXG4gICAgICAgIDxkaXZcbiAgICAgICAgICBjc3M9e1tcbiAgICAgICAgICAgIHBvcG92ZXJGbG9hdGluZ0VsZW1lbnREZWZhdWx0U3R5bGUuY29udGVudFdyYXBwZXIodGhlbWUpLFxuICAgICAgICAgICAgc3R5bGVzPy5jb250ZW50V3JhcHBlcj8uKHRoZW1lKSxcbiAgICAgICAgICBdfVxuICAgICAgICA+XG4gICAgICAgICAge2N1cnJlbnRDb250ZW50fVxuICAgICAgICA8L2Rpdj5cbiAgICAgICl9XG4gICAgPC9kaXY+XG4gICk7XG59O1xuIl19 */"], children: currentContent })
|
|
17
|
+
] });
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
PopoverFloatingElement
|
|
21
|
+
};
|
package/dist/components/Popover/component/PopoverFloatingElement/PopoverFloatingElement.styles.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Theme } from 'themes';
|
|
2
|
+
export declare const popoverFloatingElementDefaultStyle: {
|
|
3
|
+
wrapper: (theme: Theme) => {
|
|
4
|
+
readonly fontFamily: "Roboto";
|
|
5
|
+
readonly fontSize: 12;
|
|
6
|
+
readonly lineHeight: "20px";
|
|
7
|
+
readonly display: "flex";
|
|
8
|
+
readonly flexDirection: "column";
|
|
9
|
+
readonly gap: 8;
|
|
10
|
+
readonly padding: "12px";
|
|
11
|
+
readonly minWidth: 32;
|
|
12
|
+
readonly maxWidth: number;
|
|
13
|
+
readonly borderRadius: 8;
|
|
14
|
+
readonly alignItems: "flex-start";
|
|
15
|
+
readonly background: "#FFFFFF";
|
|
16
|
+
readonly boxShadow: `0 3px 6px -4px rgba(${number}, ${number}, ${number}, 0.12), 0 6px 16px 0 rgba(${number}, ${number}, ${number}, 0.08), 0 9px 28px 8px rgba(${number}, ${number}, ${number}, 0.05)`;
|
|
17
|
+
readonly color: "#262626";
|
|
18
|
+
};
|
|
19
|
+
titleWrapper: (theme: Theme) => {
|
|
20
|
+
fontWeight: number;
|
|
21
|
+
fontFamily: "Roboto";
|
|
22
|
+
fontSize: 14;
|
|
23
|
+
lineHeight: "20px";
|
|
24
|
+
color: "#262626";
|
|
25
|
+
};
|
|
26
|
+
contentWrapper: (theme: Theme) => {
|
|
27
|
+
fontFamily: "Roboto";
|
|
28
|
+
fontSize: 14;
|
|
29
|
+
lineHeight: "20px";
|
|
30
|
+
color: "#262626";
|
|
31
|
+
};
|
|
32
|
+
};
|
package/dist/components/Popover/component/PopoverFloatingElement/PopoverFloatingElement.styles.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { getPopoverTokens } from "../../Popover.tokens.js";
|
|
2
|
+
const popoverFloatingElementDefaultStyle = {
|
|
3
|
+
wrapper: (theme) => {
|
|
4
|
+
const popoverTokens = getPopoverTokens(theme);
|
|
5
|
+
return {
|
|
6
|
+
display: "flex",
|
|
7
|
+
flexDirection: "column",
|
|
8
|
+
gap: theme.marginM,
|
|
9
|
+
padding: `${popoverTokens.popoverPadding}px`,
|
|
10
|
+
minWidth: popoverTokens.popoverMinWidth,
|
|
11
|
+
maxWidth: popoverTokens.popoverMaxWidth,
|
|
12
|
+
borderRadius: theme.borderRadiusL,
|
|
13
|
+
alignItems: "flex-start",
|
|
14
|
+
background: popoverTokens.popoverBg,
|
|
15
|
+
boxShadow: theme.shadow2,
|
|
16
|
+
color: popoverTokens.popoverText,
|
|
17
|
+
...theme.typography.body3
|
|
18
|
+
};
|
|
19
|
+
},
|
|
20
|
+
titleWrapper: (theme) => {
|
|
21
|
+
const popoverTokens = getPopoverTokens(theme);
|
|
22
|
+
return {
|
|
23
|
+
color: popoverTokens.popoverText,
|
|
24
|
+
...theme.typography.subheader1,
|
|
25
|
+
fontWeight: 500
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
contentWrapper: (theme) => {
|
|
29
|
+
const popoverTokens = getPopoverTokens(theme);
|
|
30
|
+
return {
|
|
31
|
+
color: popoverTokens.popoverText,
|
|
32
|
+
...theme.typography.body2
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
popoverFloatingElementDefaultStyle
|
|
38
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const content: import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { getProgressTokens } from "./Progress.tokens.js";
|
|
3
|
+
import { getProgressStyle, getProgressInnerStyle } from "./Progress.styles.js";
|
|
4
|
+
import { useTheme } from "../../hooks/useTheme/useTheme.js";
|
|
5
|
+
const ProgressComponent = (props) => {
|
|
6
|
+
const {
|
|
7
|
+
size = "middle",
|
|
8
|
+
status = "default",
|
|
9
|
+
percent: percentProp = 0
|
|
10
|
+
} = props;
|
|
11
|
+
const theme = useTheme();
|
|
12
|
+
const progressTokens = getProgressTokens(theme);
|
|
13
|
+
const percent = Math.min(Math.max(percentProp, 0), 100);
|
|
14
|
+
const shouldChangeToSuccessColor = status === "default" && percent === 100;
|
|
15
|
+
return /* @__PURE__ */ jsx("div", { css: getProgressStyle({
|
|
16
|
+
progressTokens,
|
|
17
|
+
size
|
|
18
|
+
}), children: /* @__PURE__ */ jsx("div", { css: getProgressInnerStyle({
|
|
19
|
+
progressTokens,
|
|
20
|
+
shouldChangeToSuccessColor,
|
|
21
|
+
status,
|
|
22
|
+
percent
|
|
23
|
+
}) }) });
|
|
24
|
+
};
|
|
25
|
+
const Progress = ProgressComponent;
|
|
26
|
+
export {
|
|
27
|
+
Progress
|
|
28
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ProgressTokens } from './Progress.tokens';
|
|
2
|
+
import { ProgressProps } from './Progress.types';
|
|
3
|
+
export declare const getProgressStyle: ({ progressTokens: { progressLineBorderRadius, progressRail, progressHeightM, progressHeightS }, size, }: {
|
|
4
|
+
progressTokens: ProgressTokens;
|
|
5
|
+
} & Required<Pick<ProgressProps, "size">>) => {
|
|
6
|
+
borderRadius: 100;
|
|
7
|
+
background: `rgba(${number}, ${number}, ${number}, 0.05)`;
|
|
8
|
+
height: 4 | 8;
|
|
9
|
+
};
|
|
10
|
+
export declare const getProgressInnerStyle: ({ progressTokens, shouldChangeToSuccessColor, status, percent, }: {
|
|
11
|
+
progressTokens: ProgressTokens;
|
|
12
|
+
shouldChangeToSuccessColor: boolean;
|
|
13
|
+
} & Required<Omit<ProgressProps, "size">>) => {
|
|
14
|
+
background: string;
|
|
15
|
+
height: string;
|
|
16
|
+
width: string;
|
|
17
|
+
borderRadius: 100;
|
|
18
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const colorGetterByStatus = {
|
|
2
|
+
default: ({
|
|
3
|
+
progressDefault
|
|
4
|
+
}) => progressDefault,
|
|
5
|
+
error: ({
|
|
6
|
+
progressError
|
|
7
|
+
}) => progressError,
|
|
8
|
+
success: ({
|
|
9
|
+
progressSuccess
|
|
10
|
+
}) => progressSuccess
|
|
11
|
+
};
|
|
12
|
+
const getProgressStyle = ({
|
|
13
|
+
progressTokens: {
|
|
14
|
+
progressLineBorderRadius,
|
|
15
|
+
progressRail,
|
|
16
|
+
progressHeightM,
|
|
17
|
+
progressHeightS
|
|
18
|
+
},
|
|
19
|
+
size
|
|
20
|
+
}) => ({
|
|
21
|
+
borderRadius: progressLineBorderRadius,
|
|
22
|
+
background: progressRail,
|
|
23
|
+
height: size === "middle" ? progressHeightM : progressHeightS
|
|
24
|
+
});
|
|
25
|
+
const getProgressInnerStyle = ({
|
|
26
|
+
progressTokens,
|
|
27
|
+
shouldChangeToSuccessColor,
|
|
28
|
+
status,
|
|
29
|
+
percent
|
|
30
|
+
}) => ({
|
|
31
|
+
background: shouldChangeToSuccessColor ? progressTokens.progressSuccess : colorGetterByStatus[status](progressTokens),
|
|
32
|
+
height: "100%",
|
|
33
|
+
width: `${percent}%`,
|
|
34
|
+
borderRadius: progressTokens.progressLineBorderRadius
|
|
35
|
+
});
|
|
36
|
+
export {
|
|
37
|
+
getProgressInnerStyle,
|
|
38
|
+
getProgressStyle
|
|
39
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Theme } from 'themes';
|
|
2
|
+
export declare const getProgressTokens: (theme: Theme) => {
|
|
3
|
+
readonly progressDefault: "#0CB3B3";
|
|
4
|
+
readonly progressError: "#FF4D4F";
|
|
5
|
+
readonly progressSuccess: "#52C41A";
|
|
6
|
+
readonly progressRail: `rgba(${number}, ${number}, ${number}, 0.05)`;
|
|
7
|
+
readonly progressHeightM: 8;
|
|
8
|
+
readonly progressHeightS: 4;
|
|
9
|
+
readonly progressLineBorderRadius: 100;
|
|
10
|
+
};
|
|
11
|
+
export type ProgressTokens = ReturnType<typeof getProgressTokens>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const getProgressTokens = (theme) => ({
|
|
2
|
+
progressDefault: theme.primaryBase,
|
|
3
|
+
progressError: theme.dangerBase,
|
|
4
|
+
progressSuccess: theme.positiveBase,
|
|
5
|
+
progressRail: theme.bgRail,
|
|
6
|
+
progressHeightM: 8,
|
|
7
|
+
progressHeightS: 4,
|
|
8
|
+
progressLineBorderRadius: 100
|
|
9
|
+
});
|
|
10
|
+
export {
|
|
11
|
+
getProgressTokens
|
|
12
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { MemoExoticComponent, RefAttributes, ForwardRefExoticComponent } from 'react';
|
|
2
|
+
import { RadioProps, WithGroup } from './Radio.types';
|
|
3
|
+
export declare const Radio: MemoExoticComponent<ForwardRefExoticComponent<RadioProps & RefAttributes<HTMLInputElement>>> & WithGroup;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useMemo, useContext, useCallback, memo } from "react";
|
|
3
|
+
import { RadioGroup } from "./components/RadioGroup/RadioGroup.js";
|
|
4
|
+
import { RadioGroupContext } from "./contexts/RadioGroupContext.js";
|
|
5
|
+
import { RadioInternal } from "./components/RadioInternal/RadioInternal.js";
|
|
6
|
+
import { isString } from "lodash-es";
|
|
7
|
+
import { getRadioTokens } from "./Radio.tokens.js";
|
|
8
|
+
import { iconWrapperStyle, radioWrapperClassName, baseRadioWrapperStyle, getRadioButtonWrapperStyle, getRadioWrapperStyle, baseRadioLabelStyle, radioLabelStyle } from "./Radio.styles.js";
|
|
9
|
+
import { useTheme } from "../../hooks/useTheme/useTheme.js";
|
|
10
|
+
const RadioComponent = forwardRef((props, ref) => {
|
|
11
|
+
const {
|
|
12
|
+
children,
|
|
13
|
+
icon: iconProp,
|
|
14
|
+
...radioProps
|
|
15
|
+
} = props;
|
|
16
|
+
const theme = useTheme();
|
|
17
|
+
const radioTokens = useMemo(() => getRadioTokens(theme), [theme]);
|
|
18
|
+
const groupContext = useContext(RadioGroupContext);
|
|
19
|
+
const handleChange = useCallback((e) => {
|
|
20
|
+
var _a, _b;
|
|
21
|
+
(_a = props.onChange) == null ? void 0 : _a.call(props, e);
|
|
22
|
+
(_b = groupContext == null ? void 0 : groupContext.onChange) == null ? void 0 : _b.call(groupContext, e);
|
|
23
|
+
}, [groupContext == null ? void 0 : groupContext.onChange, props.onChange]);
|
|
24
|
+
if (groupContext) {
|
|
25
|
+
radioProps.name = groupContext.name;
|
|
26
|
+
radioProps.onChange = handleChange;
|
|
27
|
+
radioProps.checked = props.value === groupContext.value;
|
|
28
|
+
radioProps.disabled = radioProps.disabled ?? groupContext.disabled;
|
|
29
|
+
}
|
|
30
|
+
const disabled = radioProps.disabled;
|
|
31
|
+
const checked = radioProps.checked;
|
|
32
|
+
const isButtonType = (groupContext == null ? void 0 : groupContext.optionType) === "button";
|
|
33
|
+
const isIconType = (groupContext == null ? void 0 : groupContext.buttonType) === "icon";
|
|
34
|
+
const isRenderIcon = Boolean(iconProp) && isButtonType && isIconType;
|
|
35
|
+
const icon = (() => {
|
|
36
|
+
if (isString(iconProp)) {
|
|
37
|
+
return iconProp;
|
|
38
|
+
}
|
|
39
|
+
if (iconProp) {
|
|
40
|
+
return /* @__PURE__ */ jsx("div", { css: iconWrapperStyle(theme), children: iconProp });
|
|
41
|
+
}
|
|
42
|
+
})();
|
|
43
|
+
return /* @__PURE__ */ jsxs("label", { className: radioWrapperClassName, css: [baseRadioWrapperStyle(theme, disabled), isButtonType || isRenderIcon ? getRadioButtonWrapperStyle(theme, radioTokens, isRenderIcon, checked, disabled) : getRadioWrapperStyle(radioTokens, disabled), process.env.NODE_ENV === "production" ? "" : ";label:RadioComponent;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9idWlsZHMvZnJvbnRlbmQvbGlicy91aS1raXQvc3JjL2NvbXBvbmVudHMvUmFkaW8vUmFkaW8udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXFFTSIsImZpbGUiOiIvYnVpbGRzL2Zyb250ZW5kL2xpYnMvdWkta2l0L3NyYy9jb21wb25lbnRzL1JhZGlvL1JhZGlvLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7XG4gIG1lbW8sXG4gIHVzZUNhbGxiYWNrLFxuICB1c2VDb250ZXh0LFxuICB1c2VNZW1vLFxuICBmb3J3YXJkUmVmLFxuICB0eXBlIE1lbW9FeG90aWN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CdXR0b25UeXBlIHx8IGlzUmVuZGVySWNvbn0gLz5cbiAgICAgIHtjaGlsZHJlbiAmJiAoXG4gICAgICAgIDxzcGFuIGNzcz17W2Jhc2VSYWRpb0xhYmVsU3R5bGUsIGlzQnV0dG9uVHlwZSA/IHVuZGVmaW5lZCA6IHJhZGlvTGFiZWxTdHlsZSh0aGVtZSldfT5cbiAgICAgICAgICB7Y2hpbGRyZW59XG4gICAgICAgIDwvc3Bhbj5cbiAgICAgICl9XG4gICAgICB7aWNvbn1cbiAgICA8L2xhYmVsPlxuICApO1xufSk7XG5cbmV4cG9ydCBjb25zdCBSYWRpbyA9IG1lbW8oUmFkaW9Db21wb25lbnQpIGFzIE1lbW9FeG90aWNDb21wb25lbnQ8XG4gIEZvcndhcmRSZWZFeG90aWNDb21wb25lbnQ8UmFkaW9Qcm9wcyAmIFJlZkF0dHJpYnV0ZXM8SFRNTElucHV0RWxlbWVudD4+XG4+ICZcbiAgV2l0aEdyb3VwO1xuXG5SYWRpby5Hcm91cCA9IFJhZGlvR3JvdXA7XG4iXX0= */"], children: [
|
|
44
|
+
/* @__PURE__ */ jsx(RadioInternal, { ...radioProps, ref, hideRadioInput: isButtonType || isRenderIcon }),
|
|
45
|
+
children && /* @__PURE__ */ jsx("span", { css: [baseRadioLabelStyle, isButtonType ? void 0 : radioLabelStyle(theme), process.env.NODE_ENV === "production" ? "" : ";label:RadioComponent;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9idWlsZHMvZnJvbnRlbmQvbGlicy91aS1raXQvc3JjL2NvbXBvbmVudHMvUmFkaW8vUmFkaW8udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQThFYyIsImZpbGUiOiIvYnVpbGRzL2Zyb250ZW5kL2xpYnMvdWkta2l0L3NyYy9jb21wb25lbnRzL1JhZGlvL1JhZGlvLnRzeCIsInNvdXJjZXNDb250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ub2tlbnMsIGRpc2FibGVkKSxcbiAgICAgIF19XG4gICAgPlxuICAgICAgPFJhZGlvSW50ZXJuYWwgey4uLnJhZGlvUHJvcHN9IHJlZj17cmVmfSBoaWRlUmFkaW9JbnB1dD17aXNCdXR0b25UeXBlIHx8IGlzUmVuZGVySWNvbn0gLz5cbiAgICAgIHtjaGlsZHJlbiAmJiAoXG4gICAgICAgIDxzcGFuIGNzcz17W2Jhc2VSYWRpb0xhYmVsU3R5bGUsIGlzQnV0dG9uVHlwZSA/IHVuZGVmaW5lZCA6IHJhZGlvTGFiZWxTdHlsZSh0aGVtZSldfT5cbiAgICAgICAgICB7Y2hpbGRyZW59XG4gICAgICAgIDwvc3Bhbj5cbiAgICAgICl9XG4gICAgICB7aWNvbn1cbiAgICA8L2xhYmVsPlxuICApO1xufSk7XG5cbmV4cG9ydCBjb25zdCBSYWRpbyA9IG1lbW8oUmFkaW9Db21wb25lbnQpIGFzIE1lbW9FeG90aWNDb21wb25lbnQ8XG4gIEZvcndhcmRSZWZFeG90aWNDb21wb25lbnQ8UmFkaW9Qcm9wcyAmIFJlZkF0dHJpYnV0ZXM8SFRNTElucHV0RWxlbWVudD4+XG4+ICZcbiAgV2l0aEdyb3VwO1xuXG5SYWRpby5Hcm91cCA9IFJhZGlvR3JvdXA7XG4iXX0= */"], children }),
|
|
46
|
+
icon
|
|
47
|
+
] });
|
|
48
|
+
});
|
|
49
|
+
const Radio = memo(RadioComponent);
|
|
50
|
+
Radio.Group = RadioGroup;
|
|
51
|
+
export {
|
|
52
|
+
Radio
|
|
53
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Theme } from 'themes';
|
|
2
|
+
import { RadioTokens } from './Radio.tokens';
|
|
3
|
+
export declare const radioWrapperClassName = "radio-wrapper";
|
|
4
|
+
export declare const baseRadioWrapperStyle: (theme: Theme, disabled: boolean | undefined) => {
|
|
5
|
+
fontFamily: "Roboto";
|
|
6
|
+
fontSize: 14;
|
|
7
|
+
lineHeight: "20px";
|
|
8
|
+
cursor: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const getRadioButtonWrapperStyle: (theme: Theme, radioTokens: RadioTokens, isRenderIcon: boolean, checked: boolean | undefined, disabled: boolean | undefined) => {
|
|
11
|
+
readonly position: "relative";
|
|
12
|
+
readonly zIndex: 1 | undefined;
|
|
13
|
+
readonly color: "#262626" | "#8C8C8C" | "#0CB3B3";
|
|
14
|
+
readonly backgroundColor: "#D9D9D9" | "#F0F0F0" | "#FFFFFF";
|
|
15
|
+
readonly height: 28;
|
|
16
|
+
readonly boxSizing: "border-box";
|
|
17
|
+
readonly paddingInline: number;
|
|
18
|
+
readonly paddingBlock: number;
|
|
19
|
+
readonly borderWidth: 1;
|
|
20
|
+
readonly borderStyle: "solid";
|
|
21
|
+
readonly borderColor: "#D9D9D9" | "#0CB3B3";
|
|
22
|
+
readonly borderInlineStartWidth: 0;
|
|
23
|
+
readonly ":first-of-type": {
|
|
24
|
+
readonly borderInlineStartWidth: 1;
|
|
25
|
+
readonly borderStartStartRadius: 4;
|
|
26
|
+
readonly borderEndStartRadius: 4;
|
|
27
|
+
};
|
|
28
|
+
readonly ":last-of-type": {
|
|
29
|
+
readonly borderStartEndRadius: 4;
|
|
30
|
+
readonly borderEndEndRadius: 4;
|
|
31
|
+
};
|
|
32
|
+
readonly ":not(:first-of-type)::before": {
|
|
33
|
+
readonly content: "''";
|
|
34
|
+
readonly position: "absolute";
|
|
35
|
+
readonly width: 1;
|
|
36
|
+
readonly height: "100%";
|
|
37
|
+
readonly backgroundColor: "#D9D9D9" | "#0CB3B3";
|
|
38
|
+
readonly paddingBlock: 1;
|
|
39
|
+
readonly insetBlockStart: -1;
|
|
40
|
+
readonly insetInlineStart: -1;
|
|
41
|
+
};
|
|
42
|
+
readonly ":hover": {
|
|
43
|
+
readonly color: "#2CBFBA" | undefined;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export declare const getRadioWrapperStyle: (radioTokens: RadioTokens, disabled: boolean | undefined) => {
|
|
47
|
+
display: string;
|
|
48
|
+
alignItems: string;
|
|
49
|
+
color: "#262626" | "#8C8C8C";
|
|
50
|
+
};
|
|
51
|
+
export declare const iconWrapperStyle: (theme: Theme) => {
|
|
52
|
+
display: string;
|
|
53
|
+
fontSize: 16;
|
|
54
|
+
height: string;
|
|
55
|
+
justifyContent: string;
|
|
56
|
+
alignItems: string;
|
|
57
|
+
};
|
|
58
|
+
export declare const baseRadioLabelStyle: {
|
|
59
|
+
"&&": {
|
|
60
|
+
fontFamily: string;
|
|
61
|
+
fontSize: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
export declare const radioLabelStyle: (theme: Theme) => {
|
|
65
|
+
paddingInline: 8;
|
|
66
|
+
};
|