@1money/component-ui 0.0.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/.agents/skills/1money-component-dev/SKILL.md +224 -0
- package/.agents/skills/1money-component-dev/checklist.md +159 -0
- package/.agents/skills/1money-component-dev/references/ComponentPatterns.md +478 -0
- package/.agents/skills/1money-component-dev/references/FigmaExtractionChecklist.md +144 -0
- package/.agents/skills/1money-component-dev/references/HooksGuide.md +360 -0
- package/.agents/skills/1money-component-dev/references/SemanticColors.md +215 -0
- package/.agents/skills/1money-component-dev/references/StyleSystemAPI.md +389 -0
- package/.claude/settings.local.json +103 -0
- package/.claude/skills/1money-component-dev/SKILL.md +229 -0
- package/.claude/skills/1money-component-dev/checklist.md +159 -0
- package/.claude/skills/1money-component-dev/references/ComponentPatterns.md +478 -0
- package/.claude/skills/1money-component-dev/references/FigmaExtractionChecklist.md +144 -0
- package/.claude/skills/1money-component-dev/references/HooksGuide.md +360 -0
- package/.claude/skills/1money-component-dev/references/SemanticColors.md +215 -0
- package/.claude/skills/1money-component-dev/references/StyleSystemAPI.md +389 -0
- package/.claude/skills/1money-component-review/SKILL.md +316 -0
- package/.claude/skills/component-pipeline/SKILL.md +116 -0
- package/.claude/skills/component-pipeline/checklist.md +125 -0
- package/.hintrc +13 -0
- package/@types/global.d.ts +28 -0
- package/AGENTS.md +540 -0
- package/CLAUDE.md +1 -0
- package/LICENSE +21 -0
- package/README.md +169 -0
- package/es/components/Accordion/Accordion.d.ts +6 -0
- package/es/components/Accordion/Accordion.js +102 -0
- package/es/components/Accordion/index.d.ts +4 -0
- package/es/components/Accordion/index.js +5 -0
- package/es/components/Accordion/interface.d.ts +29 -0
- package/es/components/Accordion/interface.js +2 -0
- package/es/components/Accordion/style/Accordion.css +1 -0
- package/es/components/Accordion/style/Accordion.scss +127 -0
- package/es/components/Accordion/style/css.js +2 -0
- package/es/components/Accordion/style/index.d.ts +1 -0
- package/es/components/Accordion/style/index.js +2 -0
- package/es/components/Alert/Alert.d.ts +6 -0
- package/es/components/Alert/Alert.js +94 -0
- package/es/components/Alert/index.d.ts +4 -0
- package/es/components/Alert/index.js +5 -0
- package/es/components/Alert/interface.d.ts +40 -0
- package/es/components/Alert/interface.js +6 -0
- package/es/components/Alert/style/Alert.css +1 -0
- package/es/components/Alert/style/Alert.scss +89 -0
- package/es/components/Alert/style/css.js +3 -0
- package/es/components/Alert/style/index.d.ts +2 -0
- package/es/components/Alert/style/index.js +3 -0
- package/es/components/Button/Button.d.ts +4 -0
- package/es/components/Button/Button.js +121 -0
- package/es/components/Button/constants.d.ts +56 -0
- package/es/components/Button/constants.js +69 -0
- package/es/components/Button/index.d.ts +5 -0
- package/es/components/Button/index.js +6 -0
- package/es/components/Button/interface.d.ts +14 -0
- package/es/components/Button/interface.js +2 -0
- package/es/components/Button/style/Button.css +1 -0
- package/es/components/Button/style/Button.scss +190 -0
- package/es/components/Button/style/css.js +2 -0
- package/es/components/Button/style/index.d.ts +1 -0
- package/es/components/Button/style/index.js +2 -0
- package/es/components/Calendar/Calendar.d.ts +7 -0
- package/es/components/Calendar/Calendar.js +112 -0
- package/es/components/Calendar/index.d.ts +4 -0
- package/es/components/Calendar/index.js +5 -0
- package/es/components/Calendar/interface.d.ts +29 -0
- package/es/components/Calendar/interface.js +2 -0
- package/es/components/Calendar/style/Calendar.css +1 -0
- package/es/components/Calendar/style/Calendar.scss +377 -0
- package/es/components/Calendar/style/css.js +2 -0
- package/es/components/Calendar/style/index.d.ts +1 -0
- package/es/components/Calendar/style/index.js +2 -0
- package/es/components/Carousel/Carousel.d.ts +6 -0
- package/es/components/Carousel/Carousel.js +46 -0
- package/es/components/Carousel/index.d.ts +4 -0
- package/es/components/Carousel/index.js +5 -0
- package/es/components/Carousel/interface.d.ts +15 -0
- package/es/components/Carousel/interface.js +2 -0
- package/es/components/Carousel/style/Carousel.css +1 -0
- package/es/components/Carousel/style/Carousel.scss +63 -0
- package/es/components/Carousel/style/css.js +2 -0
- package/es/components/Carousel/style/index.d.ts +1 -0
- package/es/components/Carousel/style/index.js +2 -0
- package/es/components/Checkbox/BaseCheckbox.d.ts +6 -0
- package/es/components/Checkbox/BaseCheckbox.js +84 -0
- package/es/components/Checkbox/Checkbox.d.ts +6 -0
- package/es/components/Checkbox/Checkbox.js +120 -0
- package/es/components/Checkbox/CheckboxGroup.d.ts +5 -0
- package/es/components/Checkbox/CheckboxGroup.js +140 -0
- package/es/components/Checkbox/CheckboxGroupContext.d.ts +14 -0
- package/es/components/Checkbox/CheckboxGroupContext.js +3 -0
- package/es/components/Checkbox/constants.d.ts +7 -0
- package/es/components/Checkbox/constants.js +8 -0
- package/es/components/Checkbox/index.d.ts +10 -0
- package/es/components/Checkbox/index.js +10 -0
- package/es/components/Checkbox/interface.d.ts +77 -0
- package/es/components/Checkbox/interface.js +2 -0
- package/es/components/Checkbox/style/Checkbox.css +1 -0
- package/es/components/Checkbox/style/Checkbox.scss +235 -0
- package/es/components/Checkbox/style/css.js +2 -0
- package/es/components/Checkbox/style/index.d.ts +1 -0
- package/es/components/Checkbox/style/index.js +2 -0
- package/es/components/CoachMark/CoachMark.d.ts +4 -0
- package/es/components/CoachMark/CoachMark.js +142 -0
- package/es/components/CoachMark/index.d.ts +4 -0
- package/es/components/CoachMark/index.js +5 -0
- package/es/components/CoachMark/interface.d.ts +47 -0
- package/es/components/CoachMark/interface.js +2 -0
- package/es/components/CoachMark/style/CoachMark.css +1 -0
- package/es/components/CoachMark/style/CoachMark.scss +176 -0
- package/es/components/CoachMark/style/css.js +5 -0
- package/es/components/CoachMark/style/index.d.ts +4 -0
- package/es/components/CoachMark/style/index.js +5 -0
- package/es/components/Copy/Copy.d.ts +6 -0
- package/es/components/Copy/Copy.js +70 -0
- package/es/components/Copy/index.d.ts +4 -0
- package/es/components/Copy/index.js +5 -0
- package/es/components/Copy/interface.d.ts +20 -0
- package/es/components/Copy/interface.js +2 -0
- package/es/components/Copy/style/Copy.css +1 -0
- package/es/components/Copy/style/Copy.scss +35 -0
- package/es/components/Copy/style/css.js +2 -0
- package/es/components/Copy/style/index.d.ts +1 -0
- package/es/components/Copy/style/index.js +2 -0
- package/es/components/Divider/Divider.d.ts +4 -0
- package/es/components/Divider/Divider.js +53 -0
- package/es/components/Divider/index.d.ts +4 -0
- package/es/components/Divider/index.js +5 -0
- package/es/components/Divider/interface.d.ts +20 -0
- package/es/components/Divider/interface.js +2 -0
- package/es/components/Divider/style/Divider.css +1 -0
- package/es/components/Divider/style/Divider.scss +149 -0
- package/es/components/Divider/style/css.js +2 -0
- package/es/components/Divider/style/index.d.ts +1 -0
- package/es/components/Divider/style/index.js +2 -0
- package/es/components/Drawer/Drawer.d.ts +4 -0
- package/es/components/Drawer/Drawer.js +271 -0
- package/es/components/Drawer/constants.d.ts +15 -0
- package/es/components/Drawer/constants.js +16 -0
- package/es/components/Drawer/index.d.ts +3 -0
- package/es/components/Drawer/index.js +4 -0
- package/es/components/Drawer/interface.d.ts +79 -0
- package/es/components/Drawer/interface.js +2 -0
- package/es/components/Drawer/style/Drawer.css +1 -0
- package/es/components/Drawer/style/Drawer.scss +163 -0
- package/es/components/Drawer/style/css.js +2 -0
- package/es/components/Drawer/style/index.d.ts +1 -0
- package/es/components/Drawer/style/index.js +2 -0
- package/es/components/Dropdown/Dropdown.d.ts +5 -0
- package/es/components/Dropdown/Dropdown.js +24 -0
- package/es/components/Dropdown/index.d.ts +3 -0
- package/es/components/Dropdown/index.js +4 -0
- package/es/components/Dropdown/interface.d.ts +8 -0
- package/es/components/Dropdown/interface.js +2 -0
- package/es/components/Dropdown/style/Dropdown.css +0 -0
- package/es/components/Dropdown/style/Dropdown.scss +2 -0
- package/es/components/Dropdown/style/css.js +3 -0
- package/es/components/Dropdown/style/index.d.ts +2 -0
- package/es/components/Dropdown/style/index.js +3 -0
- package/es/components/Empty/Empty.d.ts +6 -0
- package/es/components/Empty/Empty.js +68 -0
- package/es/components/Empty/index.d.ts +4 -0
- package/es/components/Empty/index.js +5 -0
- package/es/components/Empty/interface.d.ts +11 -0
- package/es/components/Empty/interface.js +2 -0
- package/es/components/Empty/style/Empty.css +1 -0
- package/es/components/Empty/style/Empty.scss +53 -0
- package/es/components/Empty/style/css.js +3 -0
- package/es/components/Empty/style/index.d.ts +2 -0
- package/es/components/Empty/style/index.js +3 -0
- package/es/components/Flex/Flex.d.ts +5 -0
- package/es/components/Flex/Flex.js +50 -0
- package/es/components/Flex/constants.d.ts +41 -0
- package/es/components/Flex/constants.js +45 -0
- package/es/components/Flex/index.d.ts +5 -0
- package/es/components/Flex/index.js +6 -0
- package/es/components/Flex/interface.d.ts +13 -0
- package/es/components/Flex/interface.js +2 -0
- package/es/components/Flex/style/Flex.css +1 -0
- package/es/components/Flex/style/Flex.scss +70 -0
- package/es/components/Flex/style/css.js +2 -0
- package/es/components/Flex/style/index.d.ts +1 -0
- package/es/components/Flex/style/index.js +2 -0
- package/es/components/Form/Form.d.ts +4 -0
- package/es/components/Form/Form.js +73 -0
- package/es/components/Form/FormItem.d.ts +4 -0
- package/es/components/Form/FormItem.js +183 -0
- package/es/components/Form/constants.d.ts +19 -0
- package/es/components/Form/constants.js +19 -0
- package/es/components/Form/context.d.ts +5 -0
- package/es/components/Form/context.js +19 -0
- package/es/components/Form/hooks/useForm.d.ts +3 -0
- package/es/components/Form/hooks/useForm.js +541 -0
- package/es/components/Form/hooks/useFormCore.d.ts +3 -0
- package/es/components/Form/hooks/useFormCore.js +348 -0
- package/es/components/Form/index.d.ts +10 -0
- package/es/components/Form/index.js +17 -0
- package/es/components/Form/interface.d.ts +166 -0
- package/es/components/Form/interface.js +2 -0
- package/es/components/Form/style/Form.css +1 -0
- package/es/components/Form/style/Form.scss +57 -0
- package/es/components/Form/style/css.js +2 -0
- package/es/components/Form/style/index.d.ts +1 -0
- package/es/components/Form/style/index.js +2 -0
- package/es/components/Grid/Col.d.ts +4 -0
- package/es/components/Grid/Col.js +83 -0
- package/es/components/Grid/Grid.d.ts +10 -0
- package/es/components/Grid/Grid.js +15 -0
- package/es/components/Grid/Row.d.ts +4 -0
- package/es/components/Grid/Row.js +41 -0
- package/es/components/Grid/constants.d.ts +48 -0
- package/es/components/Grid/constants.js +71 -0
- package/es/components/Grid/helper.d.ts +15 -0
- package/es/components/Grid/helper.js +87 -0
- package/es/components/Grid/index.d.ts +7 -0
- package/es/components/Grid/index.js +8 -0
- package/es/components/Grid/interface.d.ts +38 -0
- package/es/components/Grid/interface.js +2 -0
- package/es/components/Grid/style/Grid.css +1 -0
- package/es/components/Grid/style/Grid.scss +184 -0
- package/es/components/Grid/style/css.js +2 -0
- package/es/components/Grid/style/index.d.ts +1 -0
- package/es/components/Grid/style/index.js +2 -0
- package/es/components/Icons/Icons.d.ts +192 -0
- package/es/components/Icons/Icons.js +192 -0
- package/es/components/Icons/Illustrations.d.ts +18 -0
- package/es/components/Icons/Illustrations.js +874 -0
- package/es/components/Icons/Logo.d.ts +36 -0
- package/es/components/Icons/Logo.js +209 -0
- package/es/components/Icons/SVGs.d.ts +265 -0
- package/es/components/Icons/SVGs.js +1918 -0
- package/es/components/Icons/Wrapper.d.ts +6 -0
- package/es/components/Icons/Wrapper.js +100 -0
- package/es/components/Icons/index.d.ts +4 -0
- package/es/components/Icons/index.js +4 -0
- package/es/components/Icons/interface.d.ts +27 -0
- package/es/components/Icons/interface.js +2 -0
- package/es/components/Icons/style/Icons.css +1 -0
- package/es/components/Icons/style/Icons.scss +85 -0
- package/es/components/Icons/style/css.js +2 -0
- package/es/components/Icons/style/index.d.ts +1 -0
- package/es/components/Icons/style/index.js +2 -0
- package/es/components/Input/Amount/Amount.d.ts +6 -0
- package/es/components/Input/Amount/Amount.js +192 -0
- package/es/components/Input/Amount/helper.d.ts +35 -0
- package/es/components/Input/Amount/helper.js +95 -0
- package/es/components/Input/Amount/index.d.ts +3 -0
- package/es/components/Input/Amount/index.js +4 -0
- package/es/components/Input/Amount/style/Amount.css +1 -0
- package/es/components/Input/Amount/style/Amount.scss +89 -0
- package/es/components/Input/Amount/style/css.js +2 -0
- package/es/components/Input/Amount/style/index.d.ts +1 -0
- package/es/components/Input/Amount/style/index.js +2 -0
- package/es/components/Input/FieldShell/FieldShell.css +1 -0
- package/es/components/Input/FieldShell/FieldShell.d.ts +19 -0
- package/es/components/Input/FieldShell/FieldShell.js +76 -0
- package/es/components/Input/FieldShell/FieldShell.scss +62 -0
- package/es/components/Input/FieldShell/index.d.ts +3 -0
- package/es/components/Input/FieldShell/index.js +3 -0
- package/es/components/Input/Input/Input.css +1 -0
- package/es/components/Input/Input/Input.d.ts +3 -0
- package/es/components/Input/Input/Input.js +158 -0
- package/es/components/Input/Input/Input.scss +131 -0
- package/es/components/Input/Input/index.d.ts +2 -0
- package/es/components/Input/Input/index.js +3 -0
- package/es/components/Input/Mask/Mask.d.ts +5 -0
- package/es/components/Input/Mask/Mask.js +337 -0
- package/es/components/Input/Mask/index.d.ts +2 -0
- package/es/components/Input/Mask/index.js +3 -0
- package/es/components/Input/OTP/OTP.css +1 -0
- package/es/components/Input/OTP/OTP.d.ts +5 -0
- package/es/components/Input/OTP/OTP.js +150 -0
- package/es/components/Input/OTP/OTP.scss +75 -0
- package/es/components/Input/OTP/index.d.ts +2 -0
- package/es/components/Input/OTP/index.js +3 -0
- package/es/components/Input/Password/Password.d.ts +5 -0
- package/es/components/Input/Password/Password.js +121 -0
- package/es/components/Input/Password/index.d.ts +2 -0
- package/es/components/Input/Password/index.js +3 -0
- package/es/components/Input/Search/Search.d.ts +5 -0
- package/es/components/Input/Search/Search.js +144 -0
- package/es/components/Input/Search/index.d.ts +2 -0
- package/es/components/Input/Search/index.js +3 -0
- package/es/components/Input/TextArea/TextArea.css +1 -0
- package/es/components/Input/TextArea/TextArea.d.ts +5 -0
- package/es/components/Input/TextArea/TextArea.js +93 -0
- package/es/components/Input/TextArea/TextArea.scss +87 -0
- package/es/components/Input/TextArea/index.d.ts +2 -0
- package/es/components/Input/TextArea/index.js +3 -0
- package/es/components/Input/Trade/Trade.css +1 -0
- package/es/components/Input/Trade/Trade.d.ts +5 -0
- package/es/components/Input/Trade/Trade.js +130 -0
- package/es/components/Input/Trade/Trade.scss +184 -0
- package/es/components/Input/Trade/index.d.ts +2 -0
- package/es/components/Input/Trade/index.js +3 -0
- package/es/components/Input/constants.d.ts +15 -0
- package/es/components/Input/constants.js +16 -0
- package/es/components/Input/index.d.ts +4 -0
- package/es/components/Input/index.js +5 -0
- package/es/components/Input/interface.d.ts +153 -0
- package/es/components/Input/interface.js +2 -0
- package/es/components/Input/style/css.js +7 -0
- package/es/components/Input/style/index.d.ts +6 -0
- package/es/components/Input/style/index.js +7 -0
- package/es/components/Input/useAmountInput.d.ts +35 -0
- package/es/components/Input/useAmountInput.js +207 -0
- package/es/components/Input/useSyncRef.d.ts +2 -0
- package/es/components/Input/useSyncRef.js +13 -0
- package/es/components/Modal/Modal.d.ts +4 -0
- package/es/components/Modal/Modal.js +383 -0
- package/es/components/Modal/constants.d.ts +58 -0
- package/es/components/Modal/constants.js +55 -0
- package/es/components/Modal/index.d.ts +4 -0
- package/es/components/Modal/index.js +5 -0
- package/es/components/Modal/interface.d.ts +37 -0
- package/es/components/Modal/interface.js +2 -0
- package/es/components/Modal/style/Modal.css +1 -0
- package/es/components/Modal/style/Modal.scss +254 -0
- package/es/components/Modal/style/css.js +2 -0
- package/es/components/Modal/style/index.d.ts +1 -0
- package/es/components/Modal/style/index.js +2 -0
- package/es/components/Navigation/Nav.d.ts +5 -0
- package/es/components/Navigation/Nav.js +198 -0
- package/es/components/Navigation/Navigation.d.ts +5 -0
- package/es/components/Navigation/Navigation.js +299 -0
- package/es/components/Navigation/NavigationLogo.d.ts +7 -0
- package/es/components/Navigation/NavigationLogo.js +36 -0
- package/es/components/Navigation/index.d.ts +5 -0
- package/es/components/Navigation/index.js +6 -0
- package/es/components/Navigation/interface.d.ts +95 -0
- package/es/components/Navigation/interface.js +2 -0
- package/es/components/Navigation/style/Nav.css +1 -0
- package/es/components/Navigation/style/Nav.scss +174 -0
- package/es/components/Navigation/style/Navigation.css +1 -0
- package/es/components/Navigation/style/Navigation.scss +443 -0
- package/es/components/Navigation/style/css.js +3 -0
- package/es/components/Navigation/style/index.d.ts +2 -0
- package/es/components/Navigation/style/index.js +3 -0
- package/es/components/Notification/Notification.d.ts +6 -0
- package/es/components/Notification/Notification.js +114 -0
- package/es/components/Notification/NotificationStatic.d.ts +4 -0
- package/es/components/Notification/NotificationStatic.js +501 -0
- package/es/components/Notification/constants.d.ts +5 -0
- package/es/components/Notification/constants.js +7 -0
- package/es/components/Notification/index.d.ts +5 -0
- package/es/components/Notification/index.js +5 -0
- package/es/components/Notification/interface.d.ts +70 -0
- package/es/components/Notification/interface.js +7 -0
- package/es/components/Notification/style/Notification.css +1 -0
- package/es/components/Notification/style/Notification.scss +200 -0
- package/es/components/Notification/style/css.js +2 -0
- package/es/components/Notification/style/index.d.ts +1 -0
- package/es/components/Notification/style/index.js +2 -0
- package/es/components/Pagination/Pagination.d.ts +5 -0
- package/es/components/Pagination/Pagination.js +137 -0
- package/es/components/Pagination/constants.d.ts +53 -0
- package/es/components/Pagination/constants.js +56 -0
- package/es/components/Pagination/index.d.ts +6 -0
- package/es/components/Pagination/index.js +7 -0
- package/es/components/Pagination/interface.d.ts +54 -0
- package/es/components/Pagination/interface.js +2 -0
- package/es/components/Pagination/style/Pagination.css +1 -0
- package/es/components/Pagination/style/Pagination.scss +95 -0
- package/es/components/Pagination/style/css.js +2 -0
- package/es/components/Pagination/style/index.d.ts +1 -0
- package/es/components/Pagination/style/index.js +2 -0
- package/es/components/Pagination/usePagination.d.ts +3 -0
- package/es/components/Pagination/usePagination.js +154 -0
- package/es/components/Popconfirm/Popconfirm.d.ts +6 -0
- package/es/components/Popconfirm/Popconfirm.js +131 -0
- package/es/components/Popconfirm/constants.d.ts +72 -0
- package/es/components/Popconfirm/constants.js +71 -0
- package/es/components/Popconfirm/index.d.ts +4 -0
- package/es/components/Popconfirm/index.js +5 -0
- package/es/components/Popconfirm/interface.d.ts +40 -0
- package/es/components/Popconfirm/interface.js +2 -0
- package/es/components/Popconfirm/style/Popconfirm.css +1 -0
- package/es/components/Popconfirm/style/Popconfirm.scss +264 -0
- package/es/components/Popconfirm/style/css.js +5 -0
- package/es/components/Popconfirm/style/index.d.ts +4 -0
- package/es/components/Popconfirm/style/index.js +5 -0
- package/es/components/Portal/Portal.d.ts +3 -0
- package/es/components/Portal/Portal.js +54 -0
- package/es/components/Portal/index.d.ts +4 -0
- package/es/components/Portal/index.js +5 -0
- package/es/components/Portal/interface.d.ts +7 -0
- package/es/components/Portal/interface.js +2 -0
- package/es/components/ProForm/ProForm.d.ts +3 -0
- package/es/components/ProForm/ProForm.js +254 -0
- package/es/components/ProForm/ProFormDependency.d.ts +3 -0
- package/es/components/ProForm/ProFormDependency.js +69 -0
- package/es/components/ProForm/ProFormGroup.d.ts +3 -0
- package/es/components/ProForm/ProFormGroup.js +78 -0
- package/es/components/ProForm/ProFormList.d.ts +3 -0
- package/es/components/ProForm/ProFormList.js +253 -0
- package/es/components/ProForm/Submitter.d.ts +6 -0
- package/es/components/ProForm/Submitter.js +67 -0
- package/es/components/ProForm/constants.d.ts +18 -0
- package/es/components/ProForm/constants.js +23 -0
- package/es/components/ProForm/context.d.ts +5 -0
- package/es/components/ProForm/context.js +26 -0
- package/es/components/ProForm/fields/ProFormCheckbox.d.ts +3 -0
- package/es/components/ProForm/fields/ProFormCheckbox.js +11 -0
- package/es/components/ProForm/fields/ProFormCheckboxGroup.d.ts +3 -0
- package/es/components/ProForm/fields/ProFormCheckboxGroup.js +12 -0
- package/es/components/ProForm/fields/ProFormDatePicker.d.ts +3 -0
- package/es/components/ProForm/fields/ProFormDatePicker.js +23 -0
- package/es/components/ProForm/fields/ProFormFieldSet.d.ts +4 -0
- package/es/components/ProForm/fields/ProFormFieldSet.js +62 -0
- package/es/components/ProForm/fields/ProFormPassword.d.ts +3 -0
- package/es/components/ProForm/fields/ProFormPassword.js +11 -0
- package/es/components/ProForm/fields/ProFormRadioGroup.d.ts +3 -0
- package/es/components/ProForm/fields/ProFormRadioGroup.js +10 -0
- package/es/components/ProForm/fields/ProFormSelect.d.ts +3 -0
- package/es/components/ProForm/fields/ProFormSelect.js +40 -0
- package/es/components/ProForm/fields/ProFormSlider.d.ts +3 -0
- package/es/components/ProForm/fields/ProFormSlider.js +10 -0
- package/es/components/ProForm/fields/ProFormSwitch.d.ts +3 -0
- package/es/components/ProForm/fields/ProFormSwitch.js +11 -0
- package/es/components/ProForm/fields/ProFormText.d.ts +3 -0
- package/es/components/ProForm/fields/ProFormText.js +10 -0
- package/es/components/ProForm/fields/ProFormTextArea.d.ts +3 -0
- package/es/components/ProForm/fields/ProFormTextArea.js +10 -0
- package/es/components/ProForm/fields/ProFormUpload.d.ts +3 -0
- package/es/components/ProForm/fields/ProFormUpload.js +25 -0
- package/es/components/ProForm/fields/createProFormField.d.ts +4 -0
- package/es/components/ProForm/fields/createProFormField.js +229 -0
- package/es/components/ProForm/fields/index.d.ts +13 -0
- package/es/components/ProForm/fields/index.js +14 -0
- package/es/components/ProForm/hooks/useFieldRequest.d.ts +7 -0
- package/es/components/ProForm/hooks/useFieldRequest.js +90 -0
- package/es/components/ProForm/index.d.ts +30 -0
- package/es/components/ProForm/index.js +37 -0
- package/es/components/ProForm/interface.d.ts +240 -0
- package/es/components/ProForm/interface.js +2 -0
- package/es/components/ProForm/layouts/DrawerForm.d.ts +3 -0
- package/es/components/ProForm/layouts/DrawerForm.js +73 -0
- package/es/components/ProForm/layouts/ModalForm.d.ts +3 -0
- package/es/components/ProForm/layouts/ModalForm.js +74 -0
- package/es/components/ProForm/layouts/QueryFilter.d.ts +4 -0
- package/es/components/ProForm/layouts/QueryFilter.js +158 -0
- package/es/components/ProForm/layouts/index.d.ts +4 -0
- package/es/components/ProForm/layouts/index.js +5 -0
- package/es/components/ProForm/layouts/useOverlayForm.d.ts +17 -0
- package/es/components/ProForm/layouts/useOverlayForm.js +107 -0
- package/es/components/ProForm/style/ProForm.css +1 -0
- package/es/components/ProForm/style/ProForm.scss +118 -0
- package/es/components/ProForm/style/css.js +2 -0
- package/es/components/ProForm/style/index.d.ts +1 -0
- package/es/components/ProForm/style/index.js +2 -0
- package/es/components/ProForm/utils.d.ts +22 -0
- package/es/components/ProForm/utils.js +211 -0
- package/es/components/Progress/Progress.d.ts +6 -0
- package/es/components/Progress/Progress.js +94 -0
- package/es/components/Progress/constants.d.ts +26 -0
- package/es/components/Progress/constants.js +32 -0
- package/es/components/Progress/index.d.ts +5 -0
- package/es/components/Progress/index.js +6 -0
- package/es/components/Progress/interface.d.ts +26 -0
- package/es/components/Progress/interface.js +2 -0
- package/es/components/Progress/style/Progress.css +1 -0
- package/es/components/Progress/style/Progress.scss +120 -0
- package/es/components/Progress/style/css.js +2 -0
- package/es/components/Progress/style/index.d.ts +1 -0
- package/es/components/Progress/style/index.js +2 -0
- package/es/components/Radio/BaseRadio.d.ts +16 -0
- package/es/components/Radio/BaseRadio.js +58 -0
- package/es/components/Radio/Radio.d.ts +6 -0
- package/es/components/Radio/Radio.js +179 -0
- package/es/components/Radio/RadioGroup.d.ts +5 -0
- package/es/components/Radio/RadioGroup.js +100 -0
- package/es/components/Radio/RadioGroupContext.d.ts +22 -0
- package/es/components/Radio/RadioGroupContext.js +7 -0
- package/es/components/Radio/constants.d.ts +36 -0
- package/es/components/Radio/constants.js +63 -0
- package/es/components/Radio/index.d.ts +5 -0
- package/es/components/Radio/index.js +6 -0
- package/es/components/Radio/interface.d.ts +115 -0
- package/es/components/Radio/interface.js +2 -0
- package/es/components/Radio/style/Radio.css +1 -0
- package/es/components/Radio/style/Radio.scss +431 -0
- package/es/components/Radio/style/css.js +3 -0
- package/es/components/Radio/style/index.d.ts +2 -0
- package/es/components/Radio/style/index.js +3 -0
- package/es/components/ResizeObserver/Collection.d.ts +19 -0
- package/es/components/ResizeObserver/Collection.js +41 -0
- package/es/components/ResizeObserver/ResizeObserver.d.ts +7 -0
- package/es/components/ResizeObserver/ResizeObserver.js +31 -0
- package/es/components/ResizeObserver/SingleObserver/index.d.ts +7 -0
- package/es/components/ResizeObserver/SingleObserver/index.js +38 -0
- package/es/components/ResizeObserver/index.d.ts +7 -0
- package/es/components/ResizeObserver/index.js +6 -0
- package/es/components/ResizeObserver/interface.d.ts +16 -0
- package/es/components/ResizeObserver/interface.js +2 -0
- package/es/components/ResizeObserver/useResizeObserver.d.ts +2 -0
- package/es/components/ResizeObserver/useResizeObserver.js +70 -0
- package/es/components/ResizeObserver/utils/observerUtil.d.ts +7 -0
- package/es/components/ResizeObserver/utils/observerUtil.js +39 -0
- package/es/components/ResizeObserver/utils/reactUtil.d.ts +19 -0
- package/es/components/ResizeObserver/utils/reactUtil.js +78 -0
- package/es/components/Segment/Segment.d.ts +6 -0
- package/es/components/Segment/Segment.js +100 -0
- package/es/components/Segment/index.d.ts +4 -0
- package/es/components/Segment/index.js +5 -0
- package/es/components/Segment/interface.d.ts +23 -0
- package/es/components/Segment/interface.js +2 -0
- package/es/components/Segment/style/Segment.css +1 -0
- package/es/components/Segment/style/Segment.scss +80 -0
- package/es/components/Segment/style/css.js +2 -0
- package/es/components/Segment/style/index.d.ts +1 -0
- package/es/components/Segment/style/index.js +2 -0
- package/es/components/Select/Select.d.ts +6 -0
- package/es/components/Select/Select.js +520 -0
- package/es/components/Select/SelectFieldShell.d.ts +22 -0
- package/es/components/Select/SelectFieldShell.js +73 -0
- package/es/components/Select/SelectOptionContent.d.ts +9 -0
- package/es/components/Select/SelectOptionContent.js +36 -0
- package/es/components/Select/SelectSearchControl.d.ts +12 -0
- package/es/components/Select/SelectSearchControl.js +38 -0
- package/es/components/Select/SelectValueContent.d.ts +18 -0
- package/es/components/Select/SelectValueContent.js +99 -0
- package/es/components/Select/constants.d.ts +14 -0
- package/es/components/Select/constants.js +20 -0
- package/es/components/Select/index.d.ts +4 -0
- package/es/components/Select/index.js +5 -0
- package/es/components/Select/interface.d.ts +83 -0
- package/es/components/Select/interface.js +4 -0
- package/es/components/Select/style/Select.css +1 -0
- package/es/components/Select/style/Select.scss +480 -0
- package/es/components/Select/style/css.js +4 -0
- package/es/components/Select/style/index.d.ts +3 -0
- package/es/components/Select/style/index.js +4 -0
- package/es/components/Select/utils.d.ts +21 -0
- package/es/components/Select/utils.js +140 -0
- package/es/components/Skeleton/Skeleton.d.ts +6 -0
- package/es/components/Skeleton/Skeleton.js +49 -0
- package/es/components/Skeleton/index.d.ts +4 -0
- package/es/components/Skeleton/index.js +5 -0
- package/es/components/Skeleton/interface.d.ts +19 -0
- package/es/components/Skeleton/interface.js +2 -0
- package/es/components/Skeleton/style/Skeleton.css +1 -0
- package/es/components/Skeleton/style/Skeleton.scss +47 -0
- package/es/components/Skeleton/style/css.js +2 -0
- package/es/components/Skeleton/style/index.d.ts +1 -0
- package/es/components/Skeleton/style/index.js +2 -0
- package/es/components/Slider/Slider.d.ts +6 -0
- package/es/components/Slider/Slider.js +116 -0
- package/es/components/Slider/index.d.ts +4 -0
- package/es/components/Slider/index.js +5 -0
- package/es/components/Slider/interface.d.ts +39 -0
- package/es/components/Slider/interface.js +2 -0
- package/es/components/Slider/style/Slider.css +1 -0
- package/es/components/Slider/style/Slider.scss +182 -0
- package/es/components/Slider/style/css.js +2 -0
- package/es/components/Slider/style/index.d.ts +1 -0
- package/es/components/Slider/style/index.js +2 -0
- package/es/components/Space/Space.d.ts +5 -0
- package/es/components/Space/Space.js +78 -0
- package/es/components/Space/constants.d.ts +33 -0
- package/es/components/Space/constants.js +37 -0
- package/es/components/Space/index.d.ts +5 -0
- package/es/components/Space/index.js +6 -0
- package/es/components/Space/interface.d.ts +12 -0
- package/es/components/Space/interface.js +2 -0
- package/es/components/Space/style/Space.css +1 -0
- package/es/components/Space/style/Space.scss +40 -0
- package/es/components/Space/style/css.js +2 -0
- package/es/components/Space/style/index.d.ts +1 -0
- package/es/components/Space/style/index.js +2 -0
- package/es/components/Spinner/Spinner.d.ts +6 -0
- package/es/components/Spinner/Spinner.js +83 -0
- package/es/components/Spinner/index.d.ts +4 -0
- package/es/components/Spinner/index.js +5 -0
- package/es/components/Spinner/interface.d.ts +14 -0
- package/es/components/Spinner/interface.js +2 -0
- package/es/components/Spinner/style/Spinner.css +1 -0
- package/es/components/Spinner/style/Spinner.scss +90 -0
- package/es/components/Spinner/style/css.js +2 -0
- package/es/components/Spinner/style/index.d.ts +1 -0
- package/es/components/Spinner/style/index.js +2 -0
- package/es/components/Step/Step.d.ts +5 -0
- package/es/components/Step/Step.js +116 -0
- package/es/components/Step/constants.d.ts +59 -0
- package/es/components/Step/constants.js +65 -0
- package/es/components/Step/index.d.ts +4 -0
- package/es/components/Step/index.js +5 -0
- package/es/components/Step/interface.d.ts +22 -0
- package/es/components/Step/interface.js +2 -0
- package/es/components/Step/style/Step.css +1 -0
- package/es/components/Step/style/Step.scss +91 -0
- package/es/components/Step/style/css.js +2 -0
- package/es/components/Step/style/index.d.ts +1 -0
- package/es/components/Step/style/index.js +2 -0
- package/es/components/Switch/Switch.d.ts +6 -0
- package/es/components/Switch/Switch.js +93 -0
- package/es/components/Switch/constants.d.ts +11 -0
- package/es/components/Switch/constants.js +12 -0
- package/es/components/Switch/index.d.ts +5 -0
- package/es/components/Switch/index.js +6 -0
- package/es/components/Switch/interface.d.ts +26 -0
- package/es/components/Switch/interface.js +2 -0
- package/es/components/Switch/style/Switch.css +1 -0
- package/es/components/Switch/style/Switch.scss +126 -0
- package/es/components/Switch/style/css.js +3 -0
- package/es/components/Switch/style/index.d.ts +2 -0
- package/es/components/Switch/style/index.js +3 -0
- package/es/components/Table/Table.d.ts +10 -0
- package/es/components/Table/Table.js +164 -0
- package/es/components/Table/VirtualTable.d.ts +9 -0
- package/es/components/Table/VirtualTable.js +166 -0
- package/es/components/Table/constants.d.ts +4 -0
- package/es/components/Table/constants.js +5 -0
- package/es/components/Table/core/useTableColumns.d.ts +34 -0
- package/es/components/Table/core/useTableColumns.js +191 -0
- package/es/components/Table/core/useTableDataPipeline.d.ts +50 -0
- package/es/components/Table/core/useTableDataPipeline.js +262 -0
- package/es/components/Table/core/useTableExpand.d.ts +9 -0
- package/es/components/Table/core/useTableExpand.js +38 -0
- package/es/components/Table/core/useTableSelection.d.ts +17 -0
- package/es/components/Table/core/useTableSelection.js +144 -0
- package/es/components/Table/features/ExpandTrigger.d.ts +4 -0
- package/es/components/Table/features/ExpandTrigger.js +24 -0
- package/es/components/Table/features/SelectionColumn.d.ts +11 -0
- package/es/components/Table/features/SelectionColumn.js +41 -0
- package/es/components/Table/features/SortTrigger.d.ts +7 -0
- package/es/components/Table/features/SortTrigger.js +26 -0
- package/es/components/Table/index.d.ts +6 -0
- package/es/components/Table/index.js +7 -0
- package/es/components/Table/interface.d.ts +179 -0
- package/es/components/Table/interface.js +2 -0
- package/es/components/Table/internal/index.d.ts +3 -0
- package/es/components/Table/internal/index.js +3 -0
- package/es/components/Table/internal/kernel/Body/BodyRow.d.ts +37 -0
- package/es/components/Table/internal/kernel/Body/BodyRow.js +174 -0
- package/es/components/Table/internal/kernel/Body/ExpandedRow.d.ts +15 -0
- package/es/components/Table/internal/kernel/Body/ExpandedRow.js +56 -0
- package/es/components/Table/internal/kernel/Body/MeasureCell.d.ts +8 -0
- package/es/components/Table/internal/kernel/Body/MeasureCell.js +39 -0
- package/es/components/Table/internal/kernel/Body/MeasureRow.d.ts +10 -0
- package/es/components/Table/internal/kernel/Body/MeasureRow.js +53 -0
- package/es/components/Table/internal/kernel/Body/index.d.ts +9 -0
- package/es/components/Table/internal/kernel/Body/index.js +124 -0
- package/es/components/Table/internal/kernel/Cell/index.d.ts +39 -0
- package/es/components/Table/internal/kernel/Cell/index.js +179 -0
- package/es/components/Table/internal/kernel/Cell/useCellRender.d.ts +3 -0
- package/es/components/Table/internal/kernel/Cell/useCellRender.js +63 -0
- package/es/components/Table/internal/kernel/Cell/useHoverState.d.ts +2 -0
- package/es/components/Table/internal/kernel/Cell/useHoverState.js +15 -0
- package/es/components/Table/internal/kernel/ColGroup.d.ts +8 -0
- package/es/components/Table/internal/kernel/ColGroup.js +56 -0
- package/es/components/Table/internal/kernel/FixedHolder/index.d.ts +27 -0
- package/es/components/Table/internal/kernel/FixedHolder/index.js +181 -0
- package/es/components/Table/internal/kernel/Footer/Cell.d.ts +11 -0
- package/es/components/Table/internal/kernel/Footer/Cell.js +50 -0
- package/es/components/Table/internal/kernel/Footer/Row.d.ts +8 -0
- package/es/components/Table/internal/kernel/Footer/Row.js +20 -0
- package/es/components/Table/internal/kernel/Footer/Summary.d.ts +14 -0
- package/es/components/Table/internal/kernel/Footer/Summary.js +13 -0
- package/es/components/Table/internal/kernel/Footer/SummaryContext.d.ts +11 -0
- package/es/components/Table/internal/kernel/Footer/SummaryContext.js +4 -0
- package/es/components/Table/internal/kernel/Footer/index.d.ts +16 -0
- package/es/components/Table/internal/kernel/Footer/index.js +36 -0
- package/es/components/Table/internal/kernel/Header/Header.d.ts +9 -0
- package/es/components/Table/internal/kernel/Header/Header.js +109 -0
- package/es/components/Table/internal/kernel/Header/HeaderRow.d.ts +18 -0
- package/es/components/Table/internal/kernel/Header/HeaderRow.js +60 -0
- package/es/components/Table/internal/kernel/Panel/index.d.ts +7 -0
- package/es/components/Table/internal/kernel/Panel/index.js +15 -0
- package/es/components/Table/internal/kernel/Table.d.ts +126 -0
- package/es/components/Table/internal/kernel/Table.js +692 -0
- package/es/components/Table/internal/kernel/VirtualTable/BodyGrid.d.ts +13 -0
- package/es/components/Table/internal/kernel/VirtualTable/BodyGrid.js +287 -0
- package/es/components/Table/internal/kernel/VirtualTable/BodyLine.d.ts +14 -0
- package/es/components/Table/internal/kernel/VirtualTable/BodyLine.js +113 -0
- package/es/components/Table/internal/kernel/VirtualTable/VirtualCell.d.ts +26 -0
- package/es/components/Table/internal/kernel/VirtualTable/VirtualCell.js +105 -0
- package/es/components/Table/internal/kernel/VirtualTable/context.d.ts +13 -0
- package/es/components/Table/internal/kernel/VirtualTable/context.js +5 -0
- package/es/components/Table/internal/kernel/VirtualTable/index.d.ts +17 -0
- package/es/components/Table/internal/kernel/VirtualTable/index.js +91 -0
- package/es/components/Table/internal/kernel/constant.d.ts +2 -0
- package/es/components/Table/internal/kernel/constant.js +4 -0
- package/es/components/Table/internal/kernel/context/PerfContext.d.ts +6 -0
- package/es/components/Table/internal/kernel/context/PerfContext.js +8 -0
- package/es/components/Table/internal/kernel/context/TableContext.d.ts +51 -0
- package/es/components/Table/internal/kernel/context/TableContext.js +10 -0
- package/es/components/Table/internal/kernel/hooks/useColumns/index.d.ts +31 -0
- package/es/components/Table/internal/kernel/hooks/useColumns/index.js +210 -0
- package/es/components/Table/internal/kernel/hooks/useColumns/useWidthColumns.d.ts +5 -0
- package/es/components/Table/internal/kernel/hooks/useColumns/useWidthColumns.js +69 -0
- package/es/components/Table/internal/kernel/hooks/useExpand.d.ts +10 -0
- package/es/components/Table/internal/kernel/hooks/useExpand.js +84 -0
- package/es/components/Table/internal/kernel/hooks/useFixedInfo.d.ts +2 -0
- package/es/components/Table/internal/kernel/hooks/useFixedInfo.js +18 -0
- package/es/components/Table/internal/kernel/hooks/useFlattenRecords.d.ts +19 -0
- package/es/components/Table/internal/kernel/hooks/useFlattenRecords.js +54 -0
- package/es/components/Table/internal/kernel/hooks/useFrame.d.ts +7 -0
- package/es/components/Table/internal/kernel/hooks/useFrame.js +63 -0
- package/es/components/Table/internal/kernel/hooks/useHover.d.ts +2 -0
- package/es/components/Table/internal/kernel/hooks/useHover.js +19 -0
- package/es/components/Table/internal/kernel/hooks/useRenderTimes.d.ts +5 -0
- package/es/components/Table/internal/kernel/hooks/useRenderTimes.js +41 -0
- package/es/components/Table/internal/kernel/hooks/useRowInfo.d.ts +11 -0
- package/es/components/Table/internal/kernel/hooks/useRowInfo.js +62 -0
- package/es/components/Table/internal/kernel/hooks/useSticky.d.ts +10 -0
- package/es/components/Table/internal/kernel/hooks/useSticky.js +33 -0
- package/es/components/Table/internal/kernel/hooks/useStickyOffsets.d.ts +6 -0
- package/es/components/Table/internal/kernel/hooks/useStickyOffsets.js +31 -0
- package/es/components/Table/internal/kernel/index.d.ts +12 -0
- package/es/components/Table/internal/kernel/index.js +11 -0
- package/es/components/Table/internal/kernel/interface.d.ts +202 -0
- package/es/components/Table/internal/kernel/interface.js +2 -0
- package/es/components/Table/internal/kernel/namePathType.d.ts +13 -0
- package/es/components/Table/internal/kernel/namePathType.js +3 -0
- package/es/components/Table/internal/kernel/selector-context/Immutable.d.ts +10 -0
- package/es/components/Table/internal/kernel/selector-context/Immutable.js +73 -0
- package/es/components/Table/internal/kernel/selector-context/context.d.ts +26 -0
- package/es/components/Table/internal/kernel/selector-context/context.js +83 -0
- package/es/components/Table/internal/kernel/selector-context/index.d.ts +7 -0
- package/es/components/Table/internal/kernel/selector-context/index.js +9 -0
- package/es/components/Table/internal/kernel/selector-context/isEqual.d.ts +5 -0
- package/es/components/Table/internal/kernel/selector-context/isEqual.js +48 -0
- package/es/components/Table/internal/kernel/stickyScrollBar.d.ts +12 -0
- package/es/components/Table/internal/kernel/stickyScrollBar.js +192 -0
- package/es/components/Table/internal/kernel/sugar/Column.d.ts +10 -0
- package/es/components/Table/internal/kernel/sugar/Column.js +11 -0
- package/es/components/Table/internal/kernel/sugar/ColumnGroup.d.ts +12 -0
- package/es/components/Table/internal/kernel/sugar/ColumnGroup.js +11 -0
- package/es/components/Table/internal/kernel/utils/dom/canUseDom.d.ts +1 -0
- package/es/components/Table/internal/kernel/utils/dom/canUseDom.js +4 -0
- package/es/components/Table/internal/kernel/utils/dom/isVisible.d.ts +2 -0
- package/es/components/Table/internal/kernel/utils/dom/isVisible.js +28 -0
- package/es/components/Table/internal/kernel/utils/expandUtil.d.ts +4 -0
- package/es/components/Table/internal/kernel/utils/expandUtil.js +47 -0
- package/es/components/Table/internal/kernel/utils/fixUtil.d.ts +21 -0
- package/es/components/Table/internal/kernel/utils/fixUtil.js +64 -0
- package/es/components/Table/internal/kernel/utils/get.d.ts +1 -0
- package/es/components/Table/internal/kernel/utils/get.js +11 -0
- package/es/components/Table/internal/kernel/utils/getScrollBarSize.d.ts +7 -0
- package/es/components/Table/internal/kernel/utils/getScrollBarSize.js +38 -0
- package/es/components/Table/internal/kernel/utils/legacyUtil.d.ts +5 -0
- package/es/components/Table/internal/kernel/utils/legacyUtil.js +31 -0
- package/es/components/Table/internal/kernel/utils/offsetUtil.d.ts +4 -0
- package/es/components/Table/internal/kernel/utils/offsetUtil.js +14 -0
- package/es/components/Table/internal/kernel/utils/pickAttrs.d.ts +6 -0
- package/es/components/Table/internal/kernel/utils/pickAttrs.js +33 -0
- package/es/components/Table/internal/kernel/utils/useMemo.d.ts +1 -0
- package/es/components/Table/internal/kernel/utils/useMemo.js +10 -0
- package/es/components/Table/internal/kernel/utils/valueUtil.d.ts +8 -0
- package/es/components/Table/internal/kernel/utils/valueUtil.js +30 -0
- package/es/components/Table/internal/kernel/utils/warning.d.ts +4 -0
- package/es/components/Table/internal/kernel/utils/warning.js +17 -0
- package/es/components/Table/renderers/BodyCell.d.ts +15 -0
- package/es/components/Table/renderers/BodyCell.js +40 -0
- package/es/components/Table/renderers/CellContent.d.ts +4 -0
- package/es/components/Table/renderers/CellContent.js +26 -0
- package/es/components/Table/renderers/EmptyState.d.ts +4 -0
- package/es/components/Table/renderers/EmptyState.js +15 -0
- package/es/components/Table/renderers/ExpandedRowContainer.d.ts +4 -0
- package/es/components/Table/renderers/ExpandedRowContainer.js +10 -0
- package/es/components/Table/renderers/HeaderCell.d.ts +7 -0
- package/es/components/Table/renderers/HeaderCell.js +22 -0
- package/es/components/Table/style/Table.css +1 -0
- package/es/components/Table/style/Table.scss +376 -0
- package/es/components/Table/style/css.js +10 -0
- package/es/components/Table/style/index.d.ts +9 -0
- package/es/components/Table/style/index.js +10 -0
- package/es/components/Tabs/Tabs.d.ts +6 -0
- package/es/components/Tabs/Tabs.js +111 -0
- package/es/components/Tabs/index.d.ts +4 -0
- package/es/components/Tabs/index.js +5 -0
- package/es/components/Tabs/interface.d.ts +27 -0
- package/es/components/Tabs/interface.js +2 -0
- package/es/components/Tabs/style/Tabs.css +1 -0
- package/es/components/Tabs/style/Tabs.scss +100 -0
- package/es/components/Tabs/style/css.js +2 -0
- package/es/components/Tabs/style/index.d.ts +1 -0
- package/es/components/Tabs/style/index.js +2 -0
- package/es/components/Tag/Tag.d.ts +6 -0
- package/es/components/Tag/Tag.js +80 -0
- package/es/components/Tag/constants.d.ts +18 -0
- package/es/components/Tag/constants.js +28 -0
- package/es/components/Tag/index.d.ts +5 -0
- package/es/components/Tag/index.js +6 -0
- package/es/components/Tag/interface.d.ts +15 -0
- package/es/components/Tag/interface.js +2 -0
- package/es/components/Tag/style/Tag.css +1 -0
- package/es/components/Tag/style/Tag.scss +103 -0
- package/es/components/Tag/style/css.js +2 -0
- package/es/components/Tag/style/index.d.ts +1 -0
- package/es/components/Tag/style/index.js +2 -0
- package/es/components/Tooltip/Tooltip.d.ts +6 -0
- package/es/components/Tooltip/Tooltip.js +62 -0
- package/es/components/Tooltip/index.d.ts +4 -0
- package/es/components/Tooltip/index.js +5 -0
- package/es/components/Tooltip/interface.d.ts +20 -0
- package/es/components/Tooltip/interface.js +2 -0
- package/es/components/Tooltip/style/Tooltip.css +1 -0
- package/es/components/Tooltip/style/Tooltip.scss +95 -0
- package/es/components/Tooltip/style/css.js +2 -0
- package/es/components/Tooltip/style/index.d.ts +1 -0
- package/es/components/Tooltip/style/index.js +2 -0
- package/es/components/Tour/Tour.d.ts +3 -0
- package/es/components/Tour/Tour.js +243 -0
- package/es/components/Tour/index.d.ts +4 -0
- package/es/components/Tour/index.js +5 -0
- package/es/components/Tour/interface.d.ts +46 -0
- package/es/components/Tour/interface.js +2 -0
- package/es/components/Trigger/Trigger.d.ts +5 -0
- package/es/components/Trigger/Trigger.js +151 -0
- package/es/components/Trigger/index.d.ts +3 -0
- package/es/components/Trigger/index.js +4 -0
- package/es/components/Trigger/interface.d.ts +52 -0
- package/es/components/Trigger/interface.js +2 -0
- package/es/components/Trigger/style/Trigger.css +1 -0
- package/es/components/Trigger/style/Trigger.scss +18 -0
- package/es/components/Trigger/style/css.js +2 -0
- package/es/components/Trigger/style/index.d.ts +1 -0
- package/es/components/Trigger/style/index.js +2 -0
- package/es/components/Typography/Typography.d.ts +17 -0
- package/es/components/Typography/Typography.js +201 -0
- package/es/components/Typography/constants.d.ts +33 -0
- package/es/components/Typography/constants.js +9 -0
- package/es/components/Typography/index.d.ts +4 -0
- package/es/components/Typography/index.js +5 -0
- package/es/components/Typography/interface.d.ts +72 -0
- package/es/components/Typography/interface.js +22 -0
- package/es/components/Typography/render.d.ts +328 -0
- package/es/components/Typography/render.js +106 -0
- package/es/components/Typography/style/Typography.css +1 -0
- package/es/components/Typography/style/Typography.scss +132 -0
- package/es/components/Typography/style/css.js +4 -0
- package/es/components/Typography/style/index.d.ts +3 -0
- package/es/components/Typography/style/index.js +4 -0
- package/es/components/Typography/useTypographyEnhancements.d.ts +43 -0
- package/es/components/Typography/useTypographyEnhancements.js +110 -0
- package/es/components/Typography/utils.d.ts +17 -0
- package/es/components/Typography/utils.js +88 -0
- package/es/components/Upload/Upload.d.ts +7 -0
- package/es/components/Upload/Upload.js +88 -0
- package/es/components/Upload/UploadFileBar.d.ts +6 -0
- package/es/components/Upload/UploadFileBar.js +63 -0
- package/es/components/Upload/index.d.ts +5 -0
- package/es/components/Upload/index.js +6 -0
- package/es/components/Upload/interface.d.ts +41 -0
- package/es/components/Upload/interface.js +2 -0
- package/es/components/Upload/style/Upload.css +1 -0
- package/es/components/Upload/style/Upload.scss +44 -0
- package/es/components/Upload/style/UploadFileBar.css +1 -0
- package/es/components/Upload/style/UploadFileBar.scss +94 -0
- package/es/components/Upload/style/css.js +3 -0
- package/es/components/Upload/style/index.d.ts +2 -0
- package/es/components/Upload/style/index.js +3 -0
- package/es/components/VirtualList/Filler.d.ts +21 -0
- package/es/components/VirtualList/Filler.js +56 -0
- package/es/components/VirtualList/Item.d.ts +6 -0
- package/es/components/VirtualList/Item.js +12 -0
- package/es/components/VirtualList/ScrollBar.d.ts +22 -0
- package/es/components/VirtualList/ScrollBar.js +237 -0
- package/es/components/VirtualList/VirtualList.d.ts +62 -0
- package/es/components/VirtualList/VirtualList.js +529 -0
- package/es/components/VirtualList/constants.d.ts +4 -0
- package/es/components/VirtualList/constants.js +5 -0
- package/es/components/VirtualList/hooks/useChildren.d.ts +2 -0
- package/es/components/VirtualList/hooks/useChildren.js +25 -0
- package/es/components/VirtualList/hooks/useDiffItem.d.ts +2 -0
- package/es/components/VirtualList/hooks/useDiffItem.js +16 -0
- package/es/components/VirtualList/hooks/useFrameWheel.d.ts +10 -0
- package/es/components/VirtualList/hooks/useFrameWheel.js +85 -0
- package/es/components/VirtualList/hooks/useGetSize.d.ts +7 -0
- package/es/components/VirtualList/hooks/useGetSize.js +47 -0
- package/es/components/VirtualList/hooks/useHeights.d.ts +8 -0
- package/es/components/VirtualList/hooks/useHeights.js +96 -0
- package/es/components/VirtualList/hooks/useMobileTouchMove.d.ts +2 -0
- package/es/components/VirtualList/hooks/useMobileTouchMove.js +85 -0
- package/es/components/VirtualList/hooks/useOriginScroll.d.ts +2 -0
- package/es/components/VirtualList/hooks/useOriginScroll.js +44 -0
- package/es/components/VirtualList/hooks/useScrollDrag.d.ts +3 -0
- package/es/components/VirtualList/hooks/useScrollDrag.js +76 -0
- package/es/components/VirtualList/hooks/useScrollTo.d.ts +18 -0
- package/es/components/VirtualList/hooks/useScrollTo.js +132 -0
- package/es/components/VirtualList/index.d.ts +9 -0
- package/es/components/VirtualList/index.js +5 -0
- package/es/components/VirtualList/interface.d.ts +26 -0
- package/es/components/VirtualList/interface.js +2 -0
- package/es/components/VirtualList/style/VirtualList.css +1 -0
- package/es/components/VirtualList/style/VirtualList.scss +5 -0
- package/es/components/VirtualList/style/css.js +2 -0
- package/es/components/VirtualList/style/index.d.ts +1 -0
- package/es/components/VirtualList/style/index.js +2 -0
- package/es/components/VirtualList/utils/CacheMap.d.ts +16 -0
- package/es/components/VirtualList/utils/CacheMap.js +43 -0
- package/es/components/VirtualList/utils/algorithmUtil.d.ts +23 -0
- package/es/components/VirtualList/utils/algorithmUtil.js +77 -0
- package/es/components/VirtualList/utils/isFirefox.d.ts +2 -0
- package/es/components/VirtualList/utils/isFirefox.js +4 -0
- package/es/components/VirtualList/utils/raf.d.ts +9 -0
- package/es/components/VirtualList/utils/raf.js +47 -0
- package/es/components/VirtualList/utils/scrollbarUtil.d.ts +1 -0
- package/es/components/VirtualList/utils/scrollbarUtil.js +12 -0
- package/es/index.css +1 -0
- package/es/index.d.ts +89 -0
- package/es/index.js +46 -0
- package/es/styles/_api.scss +5 -0
- package/es/styles/_settings.scss +5 -0
- package/es/styles/index.css +1 -0
- package/es/styles/index.scss +2 -0
- package/es/styles/public/_index.scss +2 -0
- package/es/styles/public/_system.scss +1 -0
- package/es/styles/public/_theme.scss +3 -0
- package/es/styles/recipes/_index.scss +1 -0
- package/es/styles/recipes/_variants.scss +110 -0
- package/es/styles/system/_index.scss +4 -0
- package/es/styles/system/_props.scss +95 -0
- package/es/styles/system/_public.scss +5 -0
- package/es/styles/system/_sx.scss +81 -0
- package/es/styles/theme/_breakpoints.scss +95 -0
- package/es/styles/theme/_functions.scss +271 -0
- package/es/styles/theme/_index.scss +6 -0
- package/es/styles/theme/_mixins.scss +37 -0
- package/es/styles/theme/_scales.scss +29 -0
- package/es/styles/theme/_values.scss +68 -0
- package/es/styles/tokens/_index.scss +11 -0
- package/es/styles/tokens/breakpoint/_index.scss +2 -0
- package/es/styles/tokens/breakpoint/_primitives.scss +8 -0
- package/es/styles/tokens/color/_index.scss +3 -0
- package/es/styles/tokens/color/_primitives.scss +42 -0
- package/es/styles/tokens/color/_semantic-color.scss +172 -0
- package/es/styles/tokens/opacity/_functions.scss +13 -0
- package/es/styles/tokens/opacity/_index.scss +3 -0
- package/es/styles/tokens/opacity/_primitives.scss +12 -0
- package/es/styles/tokens/radius/_index.scss +2 -0
- package/es/styles/tokens/radius/_primitives.scss +11 -0
- package/es/styles/tokens/shadow/_index.scss +2 -0
- package/es/styles/tokens/shadow/_primitives.scss +7 -0
- package/es/styles/tokens/sizing/_functions.scss +17 -0
- package/es/styles/tokens/sizing/_index.scss +4 -0
- package/es/styles/tokens/sizing/_primitives.scss +12 -0
- package/es/styles/tokens/sizing/_semantic-sizing.scss +11 -0
- package/es/styles/tokens/spacing/_functions.scss +51 -0
- package/es/styles/tokens/spacing/_index.scss +4 -0
- package/es/styles/tokens/spacing/_primitives.scss +22 -0
- package/es/styles/tokens/spacing/_semantic-spacing.scss +22 -0
- package/es/styles/tokens/typography/_functions.scss +31 -0
- package/es/styles/tokens/typography/_index.scss +4 -0
- package/es/styles/tokens/typography/_primitives.scss +27 -0
- package/es/styles/tokens/typography/_semantic-typography.scss +216 -0
- package/es/styles/utilities/_generator.scss +55 -0
- package/es/styles/utilities/_index.scss +14 -0
- package/es/utils/classnames.d.ts +5 -0
- package/es/utils/classnames.js +18 -0
- package/es/utils/clipboard.d.ts +2 -0
- package/es/utils/clipboard.js +50 -0
- package/es/utils/ref.d.ts +4 -0
- package/es/utils/ref.js +32 -0
- package/es/utils/uuid.d.ts +2 -0
- package/es/utils/uuid.js +16 -0
- package/jest.setup.d.ts +1 -0
- package/jest.setup.ts +1 -0
- package/lib/components/Accordion/Accordion.d.ts +6 -0
- package/lib/components/Accordion/Accordion.js +112 -0
- package/lib/components/Accordion/index.d.ts +4 -0
- package/lib/components/Accordion/index.js +33 -0
- package/lib/components/Accordion/interface.d.ts +29 -0
- package/lib/components/Accordion/interface.js +6 -0
- package/lib/components/Accordion/style/Accordion.css +1 -0
- package/lib/components/Accordion/style/Accordion.scss +127 -0
- package/lib/components/Accordion/style/css.js +4 -0
- package/lib/components/Accordion/style/index.d.ts +1 -0
- package/lib/components/Accordion/style/index.js +4 -0
- package/lib/components/Alert/Alert.d.ts +6 -0
- package/lib/components/Alert/Alert.js +103 -0
- package/lib/components/Alert/index.d.ts +4 -0
- package/lib/components/Alert/index.js +33 -0
- package/lib/components/Alert/interface.d.ts +40 -0
- package/lib/components/Alert/interface.js +12 -0
- package/lib/components/Alert/style/Alert.css +1 -0
- package/lib/components/Alert/style/Alert.scss +89 -0
- package/lib/components/Alert/style/css.js +5 -0
- package/lib/components/Alert/style/index.d.ts +2 -0
- package/lib/components/Alert/style/index.js +5 -0
- package/lib/components/Button/Button.d.ts +4 -0
- package/lib/components/Button/Button.js +131 -0
- package/lib/components/Button/constants.d.ts +56 -0
- package/lib/components/Button/constants.js +76 -0
- package/lib/components/Button/index.d.ts +5 -0
- package/lib/components/Button/index.js +45 -0
- package/lib/components/Button/interface.d.ts +14 -0
- package/lib/components/Button/interface.js +6 -0
- package/lib/components/Button/style/Button.css +1 -0
- package/lib/components/Button/style/Button.scss +190 -0
- package/lib/components/Button/style/css.js +4 -0
- package/lib/components/Button/style/index.d.ts +1 -0
- package/lib/components/Button/style/index.js +4 -0
- package/lib/components/Calendar/Calendar.d.ts +7 -0
- package/lib/components/Calendar/Calendar.js +122 -0
- package/lib/components/Calendar/index.d.ts +4 -0
- package/lib/components/Calendar/index.js +33 -0
- package/lib/components/Calendar/interface.d.ts +29 -0
- package/lib/components/Calendar/interface.js +6 -0
- package/lib/components/Calendar/style/Calendar.css +1 -0
- package/lib/components/Calendar/style/Calendar.scss +377 -0
- package/lib/components/Calendar/style/css.js +4 -0
- package/lib/components/Calendar/style/index.d.ts +1 -0
- package/lib/components/Calendar/style/index.js +4 -0
- package/lib/components/Carousel/Carousel.d.ts +6 -0
- package/lib/components/Carousel/Carousel.js +56 -0
- package/lib/components/Carousel/index.d.ts +4 -0
- package/lib/components/Carousel/index.js +33 -0
- package/lib/components/Carousel/interface.d.ts +15 -0
- package/lib/components/Carousel/interface.js +6 -0
- package/lib/components/Carousel/style/Carousel.css +1 -0
- package/lib/components/Carousel/style/Carousel.scss +63 -0
- package/lib/components/Carousel/style/css.js +4 -0
- package/lib/components/Carousel/style/index.d.ts +1 -0
- package/lib/components/Carousel/style/index.js +4 -0
- package/lib/components/Checkbox/BaseCheckbox.d.ts +6 -0
- package/lib/components/Checkbox/BaseCheckbox.js +94 -0
- package/lib/components/Checkbox/Checkbox.d.ts +6 -0
- package/lib/components/Checkbox/Checkbox.js +130 -0
- package/lib/components/Checkbox/CheckboxGroup.d.ts +5 -0
- package/lib/components/Checkbox/CheckboxGroup.js +150 -0
- package/lib/components/Checkbox/CheckboxGroupContext.d.ts +14 -0
- package/lib/components/Checkbox/CheckboxGroupContext.js +9 -0
- package/lib/components/Checkbox/constants.d.ts +7 -0
- package/lib/components/Checkbox/constants.js +14 -0
- package/lib/components/Checkbox/index.d.ts +10 -0
- package/lib/components/Checkbox/index.js +52 -0
- package/lib/components/Checkbox/interface.d.ts +77 -0
- package/lib/components/Checkbox/interface.js +6 -0
- package/lib/components/Checkbox/style/Checkbox.css +1 -0
- package/lib/components/Checkbox/style/Checkbox.scss +235 -0
- package/lib/components/Checkbox/style/css.js +4 -0
- package/lib/components/Checkbox/style/index.d.ts +1 -0
- package/lib/components/Checkbox/style/index.js +4 -0
- package/lib/components/CoachMark/CoachMark.d.ts +4 -0
- package/lib/components/CoachMark/CoachMark.js +152 -0
- package/lib/components/CoachMark/index.d.ts +4 -0
- package/lib/components/CoachMark/index.js +33 -0
- package/lib/components/CoachMark/interface.d.ts +47 -0
- package/lib/components/CoachMark/interface.js +8 -0
- package/lib/components/CoachMark/style/CoachMark.css +1 -0
- package/lib/components/CoachMark/style/CoachMark.scss +176 -0
- package/lib/components/CoachMark/style/css.js +7 -0
- package/lib/components/CoachMark/style/index.d.ts +4 -0
- package/lib/components/CoachMark/style/index.js +7 -0
- package/lib/components/Copy/Copy.d.ts +6 -0
- package/lib/components/Copy/Copy.js +80 -0
- package/lib/components/Copy/index.d.ts +4 -0
- package/lib/components/Copy/index.js +33 -0
- package/lib/components/Copy/interface.d.ts +20 -0
- package/lib/components/Copy/interface.js +6 -0
- package/lib/components/Copy/style/Copy.css +1 -0
- package/lib/components/Copy/style/Copy.scss +35 -0
- package/lib/components/Copy/style/css.js +4 -0
- package/lib/components/Copy/style/index.d.ts +1 -0
- package/lib/components/Copy/style/index.js +4 -0
- package/lib/components/Divider/Divider.d.ts +4 -0
- package/lib/components/Divider/Divider.js +62 -0
- package/lib/components/Divider/index.d.ts +4 -0
- package/lib/components/Divider/index.js +31 -0
- package/lib/components/Divider/interface.d.ts +20 -0
- package/lib/components/Divider/interface.js +6 -0
- package/lib/components/Divider/style/Divider.css +1 -0
- package/lib/components/Divider/style/Divider.scss +149 -0
- package/lib/components/Divider/style/css.js +4 -0
- package/lib/components/Divider/style/index.d.ts +1 -0
- package/lib/components/Divider/style/index.js +4 -0
- package/lib/components/Drawer/Drawer.d.ts +4 -0
- package/lib/components/Drawer/Drawer.js +281 -0
- package/lib/components/Drawer/constants.d.ts +15 -0
- package/lib/components/Drawer/constants.js +22 -0
- package/lib/components/Drawer/index.d.ts +3 -0
- package/lib/components/Drawer/index.js +46 -0
- package/lib/components/Drawer/interface.d.ts +79 -0
- package/lib/components/Drawer/interface.js +6 -0
- package/lib/components/Drawer/style/Drawer.css +1 -0
- package/lib/components/Drawer/style/Drawer.scss +163 -0
- package/lib/components/Drawer/style/css.js +4 -0
- package/lib/components/Drawer/style/index.d.ts +1 -0
- package/lib/components/Drawer/style/index.js +4 -0
- package/lib/components/Dropdown/Dropdown.d.ts +5 -0
- package/lib/components/Dropdown/Dropdown.js +31 -0
- package/lib/components/Dropdown/index.d.ts +3 -0
- package/lib/components/Dropdown/index.js +35 -0
- package/lib/components/Dropdown/interface.d.ts +8 -0
- package/lib/components/Dropdown/interface.js +6 -0
- package/lib/components/Dropdown/style/Dropdown.css +0 -0
- package/lib/components/Dropdown/style/Dropdown.scss +2 -0
- package/lib/components/Dropdown/style/css.js +5 -0
- package/lib/components/Dropdown/style/index.d.ts +2 -0
- package/lib/components/Dropdown/style/index.js +5 -0
- package/lib/components/Empty/Empty.d.ts +6 -0
- package/lib/components/Empty/Empty.js +77 -0
- package/lib/components/Empty/index.d.ts +4 -0
- package/lib/components/Empty/index.js +33 -0
- package/lib/components/Empty/interface.d.ts +11 -0
- package/lib/components/Empty/interface.js +6 -0
- package/lib/components/Empty/style/Empty.css +1 -0
- package/lib/components/Empty/style/Empty.scss +53 -0
- package/lib/components/Empty/style/css.js +5 -0
- package/lib/components/Empty/style/index.d.ts +2 -0
- package/lib/components/Empty/style/index.js +5 -0
- package/lib/components/Flex/Flex.d.ts +5 -0
- package/lib/components/Flex/Flex.js +60 -0
- package/lib/components/Flex/constants.d.ts +41 -0
- package/lib/components/Flex/constants.js +51 -0
- package/lib/components/Flex/index.d.ts +5 -0
- package/lib/components/Flex/index.js +60 -0
- package/lib/components/Flex/interface.d.ts +13 -0
- package/lib/components/Flex/interface.js +6 -0
- package/lib/components/Flex/style/Flex.css +1 -0
- package/lib/components/Flex/style/Flex.scss +70 -0
- package/lib/components/Flex/style/css.js +4 -0
- package/lib/components/Flex/style/index.d.ts +1 -0
- package/lib/components/Flex/style/index.js +4 -0
- package/lib/components/Form/Form.d.ts +4 -0
- package/lib/components/Form/Form.js +80 -0
- package/lib/components/Form/FormItem.d.ts +4 -0
- package/lib/components/Form/FormItem.js +193 -0
- package/lib/components/Form/constants.d.ts +19 -0
- package/lib/components/Form/constants.js +25 -0
- package/lib/components/Form/context.d.ts +5 -0
- package/lib/components/Form/context.js +25 -0
- package/lib/components/Form/hooks/useForm.d.ts +3 -0
- package/lib/components/Form/hooks/useForm.js +551 -0
- package/lib/components/Form/hooks/useFormCore.d.ts +3 -0
- package/lib/components/Form/hooks/useFormCore.js +355 -0
- package/lib/components/Form/index.d.ts +10 -0
- package/lib/components/Form/index.js +83 -0
- package/lib/components/Form/interface.d.ts +166 -0
- package/lib/components/Form/interface.js +6 -0
- package/lib/components/Form/style/Form.css +1 -0
- package/lib/components/Form/style/Form.scss +57 -0
- package/lib/components/Form/style/css.js +4 -0
- package/lib/components/Form/style/index.d.ts +1 -0
- package/lib/components/Form/style/index.js +4 -0
- package/lib/components/Grid/Col.d.ts +4 -0
- package/lib/components/Grid/Col.js +93 -0
- package/lib/components/Grid/Grid.d.ts +10 -0
- package/lib/components/Grid/Grid.js +21 -0
- package/lib/components/Grid/Row.d.ts +4 -0
- package/lib/components/Grid/Row.js +50 -0
- package/lib/components/Grid/constants.d.ts +48 -0
- package/lib/components/Grid/constants.js +77 -0
- package/lib/components/Grid/helper.d.ts +15 -0
- package/lib/components/Grid/helper.js +94 -0
- package/lib/components/Grid/index.d.ts +7 -0
- package/lib/components/Grid/index.js +62 -0
- package/lib/components/Grid/interface.d.ts +38 -0
- package/lib/components/Grid/interface.js +6 -0
- package/lib/components/Grid/style/Grid.css +1 -0
- package/lib/components/Grid/style/Grid.scss +184 -0
- package/lib/components/Grid/style/css.js +4 -0
- package/lib/components/Grid/style/index.d.ts +1 -0
- package/lib/components/Grid/style/index.js +4 -0
- package/lib/components/Icons/Icons.d.ts +192 -0
- package/lib/components/Icons/Icons.js +193 -0
- package/lib/components/Icons/Illustrations.d.ts +18 -0
- package/lib/components/Icons/Illustrations.js +881 -0
- package/lib/components/Icons/Logo.d.ts +36 -0
- package/lib/components/Icons/Logo.js +219 -0
- package/lib/components/Icons/SVGs.d.ts +265 -0
- package/lib/components/Icons/SVGs.js +1926 -0
- package/lib/components/Icons/Wrapper.d.ts +6 -0
- package/lib/components/Icons/Wrapper.js +109 -0
- package/lib/components/Icons/index.d.ts +4 -0
- package/lib/components/Icons/index.js +52 -0
- package/lib/components/Icons/interface.d.ts +27 -0
- package/lib/components/Icons/interface.js +6 -0
- package/lib/components/Icons/style/Icons.css +1 -0
- package/lib/components/Icons/style/Icons.scss +85 -0
- package/lib/components/Icons/style/css.js +4 -0
- package/lib/components/Icons/style/index.d.ts +1 -0
- package/lib/components/Icons/style/index.js +4 -0
- package/lib/components/Input/Amount/Amount.d.ts +6 -0
- package/lib/components/Input/Amount/Amount.js +201 -0
- package/lib/components/Input/Amount/helper.d.ts +35 -0
- package/lib/components/Input/Amount/helper.js +102 -0
- package/lib/components/Input/Amount/index.d.ts +3 -0
- package/lib/components/Input/Amount/index.js +18 -0
- package/lib/components/Input/Amount/style/Amount.css +1 -0
- package/lib/components/Input/Amount/style/Amount.scss +89 -0
- package/lib/components/Input/Amount/style/css.js +4 -0
- package/lib/components/Input/Amount/style/index.d.ts +1 -0
- package/lib/components/Input/Amount/style/index.js +4 -0
- package/lib/components/Input/FieldShell/FieldShell.css +1 -0
- package/lib/components/Input/FieldShell/FieldShell.d.ts +19 -0
- package/lib/components/Input/FieldShell/FieldShell.js +85 -0
- package/lib/components/Input/FieldShell/FieldShell.scss +62 -0
- package/lib/components/Input/FieldShell/index.d.ts +3 -0
- package/lib/components/Input/FieldShell/index.js +22 -0
- package/lib/components/Input/Input/Input.css +1 -0
- package/lib/components/Input/Input/Input.d.ts +3 -0
- package/lib/components/Input/Input/Input.js +168 -0
- package/lib/components/Input/Input/Input.scss +131 -0
- package/lib/components/Input/Input/index.d.ts +2 -0
- package/lib/components/Input/Input/index.js +22 -0
- package/lib/components/Input/Mask/Mask.d.ts +5 -0
- package/lib/components/Input/Mask/Mask.js +347 -0
- package/lib/components/Input/Mask/index.d.ts +2 -0
- package/lib/components/Input/Mask/index.js +22 -0
- package/lib/components/Input/OTP/OTP.css +1 -0
- package/lib/components/Input/OTP/OTP.d.ts +5 -0
- package/lib/components/Input/OTP/OTP.js +157 -0
- package/lib/components/Input/OTP/OTP.scss +75 -0
- package/lib/components/Input/OTP/index.d.ts +2 -0
- package/lib/components/Input/OTP/index.js +22 -0
- package/lib/components/Input/Password/Password.d.ts +5 -0
- package/lib/components/Input/Password/Password.js +131 -0
- package/lib/components/Input/Password/index.d.ts +2 -0
- package/lib/components/Input/Password/index.js +22 -0
- package/lib/components/Input/Search/Search.d.ts +5 -0
- package/lib/components/Input/Search/Search.js +154 -0
- package/lib/components/Input/Search/index.d.ts +2 -0
- package/lib/components/Input/Search/index.js +22 -0
- package/lib/components/Input/TextArea/TextArea.css +1 -0
- package/lib/components/Input/TextArea/TextArea.d.ts +5 -0
- package/lib/components/Input/TextArea/TextArea.js +103 -0
- package/lib/components/Input/TextArea/TextArea.scss +87 -0
- package/lib/components/Input/TextArea/index.d.ts +2 -0
- package/lib/components/Input/TextArea/index.js +22 -0
- package/lib/components/Input/Trade/Trade.css +1 -0
- package/lib/components/Input/Trade/Trade.d.ts +5 -0
- package/lib/components/Input/Trade/Trade.js +139 -0
- package/lib/components/Input/Trade/Trade.scss +184 -0
- package/lib/components/Input/Trade/index.d.ts +2 -0
- package/lib/components/Input/Trade/index.js +22 -0
- package/lib/components/Input/constants.d.ts +15 -0
- package/lib/components/Input/constants.js +22 -0
- package/lib/components/Input/index.d.ts +4 -0
- package/lib/components/Input/index.js +49 -0
- package/lib/components/Input/interface.d.ts +153 -0
- package/lib/components/Input/interface.js +6 -0
- package/lib/components/Input/style/css.js +9 -0
- package/lib/components/Input/style/index.d.ts +6 -0
- package/lib/components/Input/style/index.js +9 -0
- package/lib/components/Input/useAmountInput.d.ts +35 -0
- package/lib/components/Input/useAmountInput.js +214 -0
- package/lib/components/Input/useSyncRef.d.ts +2 -0
- package/lib/components/Input/useSyncRef.js +19 -0
- package/lib/components/Modal/Modal.d.ts +4 -0
- package/lib/components/Modal/Modal.js +390 -0
- package/lib/components/Modal/constants.d.ts +58 -0
- package/lib/components/Modal/constants.js +62 -0
- package/lib/components/Modal/index.d.ts +4 -0
- package/lib/components/Modal/index.js +33 -0
- package/lib/components/Modal/interface.d.ts +37 -0
- package/lib/components/Modal/interface.js +6 -0
- package/lib/components/Modal/style/Modal.css +1 -0
- package/lib/components/Modal/style/Modal.scss +254 -0
- package/lib/components/Modal/style/css.js +4 -0
- package/lib/components/Modal/style/index.d.ts +1 -0
- package/lib/components/Modal/style/index.js +4 -0
- package/lib/components/Navigation/Nav.d.ts +5 -0
- package/lib/components/Navigation/Nav.js +208 -0
- package/lib/components/Navigation/Navigation.d.ts +5 -0
- package/lib/components/Navigation/Navigation.js +309 -0
- package/lib/components/Navigation/NavigationLogo.d.ts +7 -0
- package/lib/components/Navigation/NavigationLogo.js +42 -0
- package/lib/components/Navigation/index.d.ts +5 -0
- package/lib/components/Navigation/index.js +41 -0
- package/lib/components/Navigation/interface.d.ts +95 -0
- package/lib/components/Navigation/interface.js +6 -0
- package/lib/components/Navigation/style/Nav.css +1 -0
- package/lib/components/Navigation/style/Nav.scss +174 -0
- package/lib/components/Navigation/style/Navigation.css +1 -0
- package/lib/components/Navigation/style/Navigation.scss +443 -0
- package/lib/components/Navigation/style/css.js +5 -0
- package/lib/components/Navigation/style/index.d.ts +2 -0
- package/lib/components/Navigation/style/index.js +5 -0
- package/lib/components/Notification/Notification.d.ts +6 -0
- package/lib/components/Notification/Notification.js +122 -0
- package/lib/components/Notification/NotificationStatic.d.ts +4 -0
- package/lib/components/Notification/NotificationStatic.js +515 -0
- package/lib/components/Notification/constants.d.ts +5 -0
- package/lib/components/Notification/constants.js +13 -0
- package/lib/components/Notification/index.d.ts +5 -0
- package/lib/components/Notification/index.js +52 -0
- package/lib/components/Notification/interface.d.ts +70 -0
- package/lib/components/Notification/interface.js +13 -0
- package/lib/components/Notification/style/Notification.css +1 -0
- package/lib/components/Notification/style/Notification.scss +200 -0
- package/lib/components/Notification/style/css.js +4 -0
- package/lib/components/Notification/style/index.d.ts +1 -0
- package/lib/components/Notification/style/index.js +4 -0
- package/lib/components/Pagination/Pagination.d.ts +5 -0
- package/lib/components/Pagination/Pagination.js +146 -0
- package/lib/components/Pagination/constants.d.ts +53 -0
- package/lib/components/Pagination/constants.js +63 -0
- package/lib/components/Pagination/index.d.ts +6 -0
- package/lib/components/Pagination/index.js +53 -0
- package/lib/components/Pagination/interface.d.ts +54 -0
- package/lib/components/Pagination/interface.js +6 -0
- package/lib/components/Pagination/style/Pagination.css +1 -0
- package/lib/components/Pagination/style/Pagination.scss +95 -0
- package/lib/components/Pagination/style/css.js +4 -0
- package/lib/components/Pagination/style/index.d.ts +1 -0
- package/lib/components/Pagination/style/index.js +4 -0
- package/lib/components/Pagination/usePagination.d.ts +3 -0
- package/lib/components/Pagination/usePagination.js +161 -0
- package/lib/components/Popconfirm/Popconfirm.d.ts +6 -0
- package/lib/components/Popconfirm/Popconfirm.js +141 -0
- package/lib/components/Popconfirm/constants.d.ts +72 -0
- package/lib/components/Popconfirm/constants.js +78 -0
- package/lib/components/Popconfirm/index.d.ts +4 -0
- package/lib/components/Popconfirm/index.js +33 -0
- package/lib/components/Popconfirm/interface.d.ts +40 -0
- package/lib/components/Popconfirm/interface.js +6 -0
- package/lib/components/Popconfirm/style/Popconfirm.css +1 -0
- package/lib/components/Popconfirm/style/Popconfirm.scss +264 -0
- package/lib/components/Popconfirm/style/css.js +7 -0
- package/lib/components/Popconfirm/style/index.d.ts +4 -0
- package/lib/components/Popconfirm/style/index.js +7 -0
- package/lib/components/Portal/Portal.d.ts +3 -0
- package/lib/components/Portal/Portal.js +61 -0
- package/lib/components/Portal/index.d.ts +4 -0
- package/lib/components/Portal/index.js +33 -0
- package/lib/components/Portal/interface.d.ts +7 -0
- package/lib/components/Portal/interface.js +6 -0
- package/lib/components/ProForm/ProForm.d.ts +3 -0
- package/lib/components/ProForm/ProForm.js +264 -0
- package/lib/components/ProForm/ProFormDependency.d.ts +3 -0
- package/lib/components/ProForm/ProFormDependency.js +75 -0
- package/lib/components/ProForm/ProFormGroup.d.ts +3 -0
- package/lib/components/ProForm/ProFormGroup.js +85 -0
- package/lib/components/ProForm/ProFormList.d.ts +3 -0
- package/lib/components/ProForm/ProFormList.js +260 -0
- package/lib/components/ProForm/Submitter.d.ts +6 -0
- package/lib/components/ProForm/Submitter.js +74 -0
- package/lib/components/ProForm/constants.d.ts +18 -0
- package/lib/components/ProForm/constants.js +29 -0
- package/lib/components/ProForm/context.d.ts +5 -0
- package/lib/components/ProForm/context.js +32 -0
- package/lib/components/ProForm/fields/ProFormCheckbox.d.ts +3 -0
- package/lib/components/ProForm/fields/ProFormCheckbox.js +17 -0
- package/lib/components/ProForm/fields/ProFormCheckboxGroup.d.ts +3 -0
- package/lib/components/ProForm/fields/ProFormCheckboxGroup.js +18 -0
- package/lib/components/ProForm/fields/ProFormDatePicker.d.ts +3 -0
- package/lib/components/ProForm/fields/ProFormDatePicker.js +29 -0
- package/lib/components/ProForm/fields/ProFormFieldSet.d.ts +4 -0
- package/lib/components/ProForm/fields/ProFormFieldSet.js +72 -0
- package/lib/components/ProForm/fields/ProFormPassword.d.ts +3 -0
- package/lib/components/ProForm/fields/ProFormPassword.js +17 -0
- package/lib/components/ProForm/fields/ProFormRadioGroup.d.ts +3 -0
- package/lib/components/ProForm/fields/ProFormRadioGroup.js +16 -0
- package/lib/components/ProForm/fields/ProFormSelect.d.ts +3 -0
- package/lib/components/ProForm/fields/ProFormSelect.js +46 -0
- package/lib/components/ProForm/fields/ProFormSlider.d.ts +3 -0
- package/lib/components/ProForm/fields/ProFormSlider.js +16 -0
- package/lib/components/ProForm/fields/ProFormSwitch.d.ts +3 -0
- package/lib/components/ProForm/fields/ProFormSwitch.js +17 -0
- package/lib/components/ProForm/fields/ProFormText.d.ts +3 -0
- package/lib/components/ProForm/fields/ProFormText.js +16 -0
- package/lib/components/ProForm/fields/ProFormTextArea.d.ts +3 -0
- package/lib/components/ProForm/fields/ProFormTextArea.js +16 -0
- package/lib/components/ProForm/fields/ProFormUpload.d.ts +3 -0
- package/lib/components/ProForm/fields/ProFormUpload.js +32 -0
- package/lib/components/ProForm/fields/createProFormField.d.ts +4 -0
- package/lib/components/ProForm/fields/createProFormField.js +237 -0
- package/lib/components/ProForm/fields/index.d.ts +13 -0
- package/lib/components/ProForm/fields/index.js +97 -0
- package/lib/components/ProForm/hooks/useFieldRequest.d.ts +7 -0
- package/lib/components/ProForm/hooks/useFieldRequest.js +98 -0
- package/lib/components/ProForm/index.d.ts +30 -0
- package/lib/components/ProForm/index.js +187 -0
- package/lib/components/ProForm/interface.d.ts +240 -0
- package/lib/components/ProForm/interface.js +6 -0
- package/lib/components/ProForm/layouts/DrawerForm.d.ts +3 -0
- package/lib/components/ProForm/layouts/DrawerForm.js +80 -0
- package/lib/components/ProForm/layouts/ModalForm.d.ts +3 -0
- package/lib/components/ProForm/layouts/ModalForm.js +81 -0
- package/lib/components/ProForm/layouts/QueryFilter.d.ts +4 -0
- package/lib/components/ProForm/layouts/QueryFilter.js +167 -0
- package/lib/components/ProForm/layouts/index.d.ts +4 -0
- package/lib/components/ProForm/layouts/index.js +34 -0
- package/lib/components/ProForm/layouts/useOverlayForm.d.ts +17 -0
- package/lib/components/ProForm/layouts/useOverlayForm.js +117 -0
- package/lib/components/ProForm/style/ProForm.css +1 -0
- package/lib/components/ProForm/style/ProForm.scss +118 -0
- package/lib/components/ProForm/style/css.js +4 -0
- package/lib/components/ProForm/style/index.d.ts +1 -0
- package/lib/components/ProForm/style/index.js +4 -0
- package/lib/components/ProForm/utils.d.ts +22 -0
- package/lib/components/ProForm/utils.js +228 -0
- package/lib/components/Progress/Progress.d.ts +6 -0
- package/lib/components/Progress/Progress.js +103 -0
- package/lib/components/Progress/constants.d.ts +26 -0
- package/lib/components/Progress/constants.js +38 -0
- package/lib/components/Progress/index.d.ts +5 -0
- package/lib/components/Progress/index.js +45 -0
- package/lib/components/Progress/interface.d.ts +26 -0
- package/lib/components/Progress/interface.js +6 -0
- package/lib/components/Progress/style/Progress.css +1 -0
- package/lib/components/Progress/style/Progress.scss +120 -0
- package/lib/components/Progress/style/css.js +4 -0
- package/lib/components/Progress/style/index.d.ts +1 -0
- package/lib/components/Progress/style/index.js +4 -0
- package/lib/components/Radio/BaseRadio.d.ts +16 -0
- package/lib/components/Radio/BaseRadio.js +65 -0
- package/lib/components/Radio/Radio.d.ts +6 -0
- package/lib/components/Radio/Radio.js +189 -0
- package/lib/components/Radio/RadioGroup.d.ts +5 -0
- package/lib/components/Radio/RadioGroup.js +110 -0
- package/lib/components/Radio/RadioGroupContext.d.ts +22 -0
- package/lib/components/Radio/RadioGroupContext.js +13 -0
- package/lib/components/Radio/constants.d.ts +36 -0
- package/lib/components/Radio/constants.js +69 -0
- package/lib/components/Radio/index.d.ts +5 -0
- package/lib/components/Radio/index.js +41 -0
- package/lib/components/Radio/interface.d.ts +115 -0
- package/lib/components/Radio/interface.js +6 -0
- package/lib/components/Radio/style/Radio.css +1 -0
- package/lib/components/Radio/style/Radio.scss +431 -0
- package/lib/components/Radio/style/css.js +5 -0
- package/lib/components/Radio/style/index.d.ts +2 -0
- package/lib/components/Radio/style/index.js +5 -0
- package/lib/components/ResizeObserver/Collection.d.ts +19 -0
- package/lib/components/ResizeObserver/Collection.js +51 -0
- package/lib/components/ResizeObserver/ResizeObserver.d.ts +7 -0
- package/lib/components/ResizeObserver/ResizeObserver.js +41 -0
- package/lib/components/ResizeObserver/SingleObserver/index.d.ts +7 -0
- package/lib/components/ResizeObserver/SingleObserver/index.js +48 -0
- package/lib/components/ResizeObserver/index.d.ts +7 -0
- package/lib/components/ResizeObserver/index.js +30 -0
- package/lib/components/ResizeObserver/interface.d.ts +16 -0
- package/lib/components/ResizeObserver/interface.js +6 -0
- package/lib/components/ResizeObserver/useResizeObserver.d.ts +2 -0
- package/lib/components/ResizeObserver/useResizeObserver.js +79 -0
- package/lib/components/ResizeObserver/utils/observerUtil.d.ts +7 -0
- package/lib/components/ResizeObserver/utils/observerUtil.js +47 -0
- package/lib/components/ResizeObserver/utils/reactUtil.d.ts +19 -0
- package/lib/components/ResizeObserver/utils/reactUtil.js +91 -0
- package/lib/components/Segment/Segment.d.ts +6 -0
- package/lib/components/Segment/Segment.js +110 -0
- package/lib/components/Segment/index.d.ts +4 -0
- package/lib/components/Segment/index.js +33 -0
- package/lib/components/Segment/interface.d.ts +23 -0
- package/lib/components/Segment/interface.js +6 -0
- package/lib/components/Segment/style/Segment.css +1 -0
- package/lib/components/Segment/style/Segment.scss +80 -0
- package/lib/components/Segment/style/css.js +4 -0
- package/lib/components/Segment/style/index.d.ts +1 -0
- package/lib/components/Segment/style/index.js +4 -0
- package/lib/components/Select/Select.d.ts +6 -0
- package/lib/components/Select/Select.js +530 -0
- package/lib/components/Select/SelectFieldShell.d.ts +22 -0
- package/lib/components/Select/SelectFieldShell.js +79 -0
- package/lib/components/Select/SelectOptionContent.d.ts +9 -0
- package/lib/components/Select/SelectOptionContent.js +42 -0
- package/lib/components/Select/SelectSearchControl.d.ts +12 -0
- package/lib/components/Select/SelectSearchControl.js +44 -0
- package/lib/components/Select/SelectValueContent.d.ts +18 -0
- package/lib/components/Select/SelectValueContent.js +105 -0
- package/lib/components/Select/constants.d.ts +14 -0
- package/lib/components/Select/constants.js +26 -0
- package/lib/components/Select/index.d.ts +4 -0
- package/lib/components/Select/index.js +49 -0
- package/lib/components/Select/interface.d.ts +83 -0
- package/lib/components/Select/interface.js +10 -0
- package/lib/components/Select/style/Select.css +1 -0
- package/lib/components/Select/style/Select.scss +480 -0
- package/lib/components/Select/style/css.js +6 -0
- package/lib/components/Select/style/index.d.ts +3 -0
- package/lib/components/Select/style/index.js +6 -0
- package/lib/components/Select/utils.d.ts +21 -0
- package/lib/components/Select/utils.js +161 -0
- package/lib/components/Skeleton/Skeleton.d.ts +6 -0
- package/lib/components/Skeleton/Skeleton.js +58 -0
- package/lib/components/Skeleton/index.d.ts +4 -0
- package/lib/components/Skeleton/index.js +33 -0
- package/lib/components/Skeleton/interface.d.ts +19 -0
- package/lib/components/Skeleton/interface.js +6 -0
- package/lib/components/Skeleton/style/Skeleton.css +1 -0
- package/lib/components/Skeleton/style/Skeleton.scss +47 -0
- package/lib/components/Skeleton/style/css.js +4 -0
- package/lib/components/Skeleton/style/index.d.ts +1 -0
- package/lib/components/Skeleton/style/index.js +4 -0
- package/lib/components/Slider/Slider.d.ts +6 -0
- package/lib/components/Slider/Slider.js +126 -0
- package/lib/components/Slider/index.d.ts +4 -0
- package/lib/components/Slider/index.js +33 -0
- package/lib/components/Slider/interface.d.ts +39 -0
- package/lib/components/Slider/interface.js +6 -0
- package/lib/components/Slider/style/Slider.css +1 -0
- package/lib/components/Slider/style/Slider.scss +182 -0
- package/lib/components/Slider/style/css.js +4 -0
- package/lib/components/Slider/style/index.d.ts +1 -0
- package/lib/components/Slider/style/index.js +4 -0
- package/lib/components/Space/Space.d.ts +5 -0
- package/lib/components/Space/Space.js +88 -0
- package/lib/components/Space/constants.d.ts +33 -0
- package/lib/components/Space/constants.js +43 -0
- package/lib/components/Space/index.d.ts +5 -0
- package/lib/components/Space/index.js +53 -0
- package/lib/components/Space/interface.d.ts +12 -0
- package/lib/components/Space/interface.js +6 -0
- package/lib/components/Space/style/Space.css +1 -0
- package/lib/components/Space/style/Space.scss +40 -0
- package/lib/components/Space/style/css.js +4 -0
- package/lib/components/Space/style/index.d.ts +1 -0
- package/lib/components/Space/style/index.js +4 -0
- package/lib/components/Spinner/Spinner.d.ts +6 -0
- package/lib/components/Spinner/Spinner.js +91 -0
- package/lib/components/Spinner/index.d.ts +4 -0
- package/lib/components/Spinner/index.js +33 -0
- package/lib/components/Spinner/interface.d.ts +14 -0
- package/lib/components/Spinner/interface.js +8 -0
- package/lib/components/Spinner/style/Spinner.css +1 -0
- package/lib/components/Spinner/style/Spinner.scss +90 -0
- package/lib/components/Spinner/style/css.js +4 -0
- package/lib/components/Spinner/style/index.d.ts +1 -0
- package/lib/components/Spinner/style/index.js +4 -0
- package/lib/components/Step/Step.d.ts +5 -0
- package/lib/components/Step/Step.js +126 -0
- package/lib/components/Step/constants.d.ts +59 -0
- package/lib/components/Step/constants.js +72 -0
- package/lib/components/Step/index.d.ts +4 -0
- package/lib/components/Step/index.js +33 -0
- package/lib/components/Step/interface.d.ts +22 -0
- package/lib/components/Step/interface.js +6 -0
- package/lib/components/Step/style/Step.css +1 -0
- package/lib/components/Step/style/Step.scss +91 -0
- package/lib/components/Step/style/css.js +4 -0
- package/lib/components/Step/style/index.d.ts +1 -0
- package/lib/components/Step/style/index.js +4 -0
- package/lib/components/Switch/Switch.d.ts +6 -0
- package/lib/components/Switch/Switch.js +103 -0
- package/lib/components/Switch/constants.d.ts +11 -0
- package/lib/components/Switch/constants.js +18 -0
- package/lib/components/Switch/index.d.ts +5 -0
- package/lib/components/Switch/index.js +45 -0
- package/lib/components/Switch/interface.d.ts +26 -0
- package/lib/components/Switch/interface.js +6 -0
- package/lib/components/Switch/style/Switch.css +1 -0
- package/lib/components/Switch/style/Switch.scss +126 -0
- package/lib/components/Switch/style/css.js +5 -0
- package/lib/components/Switch/style/index.d.ts +2 -0
- package/lib/components/Switch/style/index.js +5 -0
- package/lib/components/Table/Table.d.ts +10 -0
- package/lib/components/Table/Table.js +173 -0
- package/lib/components/Table/VirtualTable.d.ts +9 -0
- package/lib/components/Table/VirtualTable.js +175 -0
- package/lib/components/Table/constants.d.ts +4 -0
- package/lib/components/Table/constants.js +11 -0
- package/lib/components/Table/core/useTableColumns.d.ts +34 -0
- package/lib/components/Table/core/useTableColumns.js +198 -0
- package/lib/components/Table/core/useTableDataPipeline.d.ts +50 -0
- package/lib/components/Table/core/useTableDataPipeline.js +269 -0
- package/lib/components/Table/core/useTableExpand.d.ts +9 -0
- package/lib/components/Table/core/useTableExpand.js +45 -0
- package/lib/components/Table/core/useTableSelection.d.ts +17 -0
- package/lib/components/Table/core/useTableSelection.js +151 -0
- package/lib/components/Table/features/ExpandTrigger.d.ts +4 -0
- package/lib/components/Table/features/ExpandTrigger.js +30 -0
- package/lib/components/Table/features/SelectionColumn.d.ts +11 -0
- package/lib/components/Table/features/SelectionColumn.js +47 -0
- package/lib/components/Table/features/SortTrigger.d.ts +7 -0
- package/lib/components/Table/features/SortTrigger.js +32 -0
- package/lib/components/Table/index.d.ts +6 -0
- package/lib/components/Table/index.js +47 -0
- package/lib/components/Table/interface.d.ts +179 -0
- package/lib/components/Table/interface.js +6 -0
- package/lib/components/Table/internal/index.d.ts +3 -0
- package/lib/components/Table/internal/index.js +52 -0
- package/lib/components/Table/internal/kernel/Body/BodyRow.d.ts +37 -0
- package/lib/components/Table/internal/kernel/Body/BodyRow.js +186 -0
- package/lib/components/Table/internal/kernel/Body/ExpandedRow.d.ts +15 -0
- package/lib/components/Table/internal/kernel/Body/ExpandedRow.js +67 -0
- package/lib/components/Table/internal/kernel/Body/MeasureCell.d.ts +8 -0
- package/lib/components/Table/internal/kernel/Body/MeasureCell.js +50 -0
- package/lib/components/Table/internal/kernel/Body/MeasureRow.d.ts +10 -0
- package/lib/components/Table/internal/kernel/Body/MeasureRow.js +64 -0
- package/lib/components/Table/internal/kernel/Body/index.d.ts +9 -0
- package/lib/components/Table/internal/kernel/Body/index.js +135 -0
- package/lib/components/Table/internal/kernel/Cell/index.d.ts +39 -0
- package/lib/components/Table/internal/kernel/Cell/index.js +190 -0
- package/lib/components/Table/internal/kernel/Cell/useCellRender.d.ts +3 -0
- package/lib/components/Table/internal/kernel/Cell/useCellRender.js +74 -0
- package/lib/components/Table/internal/kernel/Cell/useHoverState.d.ts +2 -0
- package/lib/components/Table/internal/kernel/Cell/useHoverState.js +23 -0
- package/lib/components/Table/internal/kernel/ColGroup.d.ts +8 -0
- package/lib/components/Table/internal/kernel/ColGroup.js +68 -0
- package/lib/components/Table/internal/kernel/FixedHolder/index.d.ts +27 -0
- package/lib/components/Table/internal/kernel/FixedHolder/index.js +193 -0
- package/lib/components/Table/internal/kernel/Footer/Cell.d.ts +11 -0
- package/lib/components/Table/internal/kernel/Footer/Cell.js +60 -0
- package/lib/components/Table/internal/kernel/Footer/Row.d.ts +8 -0
- package/lib/components/Table/internal/kernel/Footer/Row.js +31 -0
- package/lib/components/Table/internal/kernel/Footer/Summary.d.ts +14 -0
- package/lib/components/Table/internal/kernel/Footer/Summary.js +20 -0
- package/lib/components/Table/internal/kernel/Footer/SummaryContext.d.ts +11 -0
- package/lib/components/Table/internal/kernel/Footer/SummaryContext.js +13 -0
- package/lib/components/Table/internal/kernel/Footer/index.d.ts +16 -0
- package/lib/components/Table/internal/kernel/Footer/index.js +47 -0
- package/lib/components/Table/internal/kernel/Header/Header.d.ts +9 -0
- package/lib/components/Table/internal/kernel/Header/Header.js +120 -0
- package/lib/components/Table/internal/kernel/Header/HeaderRow.d.ts +18 -0
- package/lib/components/Table/internal/kernel/Header/HeaderRow.js +71 -0
- package/lib/components/Table/internal/kernel/Panel/index.d.ts +7 -0
- package/lib/components/Table/internal/kernel/Panel/index.js +25 -0
- package/lib/components/Table/internal/kernel/Table.d.ts +126 -0
- package/lib/components/Table/internal/kernel/Table.js +701 -0
- package/lib/components/Table/internal/kernel/VirtualTable/BodyGrid.d.ts +13 -0
- package/lib/components/Table/internal/kernel/VirtualTable/BodyGrid.js +299 -0
- package/lib/components/Table/internal/kernel/VirtualTable/BodyLine.d.ts +14 -0
- package/lib/components/Table/internal/kernel/VirtualTable/BodyLine.js +125 -0
- package/lib/components/Table/internal/kernel/VirtualTable/VirtualCell.d.ts +26 -0
- package/lib/components/Table/internal/kernel/VirtualTable/VirtualCell.js +117 -0
- package/lib/components/Table/internal/kernel/VirtualTable/context.d.ts +13 -0
- package/lib/components/Table/internal/kernel/VirtualTable/context.js +12 -0
- package/lib/components/Table/internal/kernel/VirtualTable/index.d.ts +17 -0
- package/lib/components/Table/internal/kernel/VirtualTable/index.js +101 -0
- package/lib/components/Table/internal/kernel/constant.d.ts +2 -0
- package/lib/components/Table/internal/kernel/constant.js +10 -0
- package/lib/components/Table/internal/kernel/context/PerfContext.d.ts +6 -0
- package/lib/components/Table/internal/kernel/context/PerfContext.js +18 -0
- package/lib/components/Table/internal/kernel/context/TableContext.d.ts +51 -0
- package/lib/components/Table/internal/kernel/context/TableContext.js +16 -0
- package/lib/components/Table/internal/kernel/hooks/useColumns/index.d.ts +31 -0
- package/lib/components/Table/internal/kernel/hooks/useColumns/index.js +223 -0
- package/lib/components/Table/internal/kernel/hooks/useColumns/useWidthColumns.d.ts +5 -0
- package/lib/components/Table/internal/kernel/hooks/useColumns/useWidthColumns.js +79 -0
- package/lib/components/Table/internal/kernel/hooks/useExpand.d.ts +10 -0
- package/lib/components/Table/internal/kernel/hooks/useExpand.js +95 -0
- package/lib/components/Table/internal/kernel/hooks/useFixedInfo.d.ts +2 -0
- package/lib/components/Table/internal/kernel/hooks/useFixedInfo.js +29 -0
- package/lib/components/Table/internal/kernel/hooks/useFlattenRecords.d.ts +19 -0
- package/lib/components/Table/internal/kernel/hooks/useFlattenRecords.js +64 -0
- package/lib/components/Table/internal/kernel/hooks/useFrame.d.ts +7 -0
- package/lib/components/Table/internal/kernel/hooks/useFrame.js +72 -0
- package/lib/components/Table/internal/kernel/hooks/useHover.d.ts +2 -0
- package/lib/components/Table/internal/kernel/hooks/useHover.js +30 -0
- package/lib/components/Table/internal/kernel/hooks/useRenderTimes.d.ts +5 -0
- package/lib/components/Table/internal/kernel/hooks/useRenderTimes.js +51 -0
- package/lib/components/Table/internal/kernel/hooks/useRowInfo.d.ts +11 -0
- package/lib/components/Table/internal/kernel/hooks/useRowInfo.js +70 -0
- package/lib/components/Table/internal/kernel/hooks/useSticky.d.ts +10 -0
- package/lib/components/Table/internal/kernel/hooks/useSticky.js +44 -0
- package/lib/components/Table/internal/kernel/hooks/useStickyOffsets.d.ts +6 -0
- package/lib/components/Table/internal/kernel/hooks/useStickyOffsets.js +38 -0
- package/lib/components/Table/internal/kernel/index.d.ts +12 -0
- package/lib/components/Table/internal/kernel/index.js +74 -0
- package/lib/components/Table/internal/kernel/interface.d.ts +202 -0
- package/lib/components/Table/internal/kernel/interface.js +6 -0
- package/lib/components/Table/internal/kernel/namePathType.d.ts +13 -0
- package/lib/components/Table/internal/kernel/namePathType.js +6 -0
- package/lib/components/Table/internal/kernel/selector-context/Immutable.d.ts +10 -0
- package/lib/components/Table/internal/kernel/selector-context/Immutable.js +82 -0
- package/lib/components/Table/internal/kernel/selector-context/context.d.ts +26 -0
- package/lib/components/Table/internal/kernel/selector-context/context.js +93 -0
- package/lib/components/Table/internal/kernel/selector-context/index.d.ts +7 -0
- package/lib/components/Table/internal/kernel/selector-context/index.js +34 -0
- package/lib/components/Table/internal/kernel/selector-context/isEqual.d.ts +5 -0
- package/lib/components/Table/internal/kernel/selector-context/isEqual.js +55 -0
- package/lib/components/Table/internal/kernel/stickyScrollBar.d.ts +12 -0
- package/lib/components/Table/internal/kernel/stickyScrollBar.js +203 -0
- package/lib/components/Table/internal/kernel/sugar/Column.d.ts +10 -0
- package/lib/components/Table/internal/kernel/sugar/Column.js +17 -0
- package/lib/components/Table/internal/kernel/sugar/ColumnGroup.d.ts +12 -0
- package/lib/components/Table/internal/kernel/sugar/ColumnGroup.js +17 -0
- package/lib/components/Table/internal/kernel/utils/dom/canUseDom.d.ts +1 -0
- package/lib/components/Table/internal/kernel/utils/dom/canUseDom.js +10 -0
- package/lib/components/Table/internal/kernel/utils/dom/isVisible.d.ts +2 -0
- package/lib/components/Table/internal/kernel/utils/dom/isVisible.js +34 -0
- package/lib/components/Table/internal/kernel/utils/expandUtil.d.ts +4 -0
- package/lib/components/Table/internal/kernel/utils/expandUtil.js +60 -0
- package/lib/components/Table/internal/kernel/utils/fixUtil.d.ts +21 -0
- package/lib/components/Table/internal/kernel/utils/fixUtil.js +70 -0
- package/lib/components/Table/internal/kernel/utils/get.d.ts +1 -0
- package/lib/components/Table/internal/kernel/utils/get.js +17 -0
- package/lib/components/Table/internal/kernel/utils/getScrollBarSize.d.ts +7 -0
- package/lib/components/Table/internal/kernel/utils/getScrollBarSize.js +45 -0
- package/lib/components/Table/internal/kernel/utils/legacyUtil.d.ts +5 -0
- package/lib/components/Table/internal/kernel/utils/legacyUtil.js +40 -0
- package/lib/components/Table/internal/kernel/utils/offsetUtil.d.ts +4 -0
- package/lib/components/Table/internal/kernel/utils/offsetUtil.js +21 -0
- package/lib/components/Table/internal/kernel/utils/pickAttrs.d.ts +6 -0
- package/lib/components/Table/internal/kernel/utils/pickAttrs.js +39 -0
- package/lib/components/Table/internal/kernel/utils/useMemo.d.ts +1 -0
- package/lib/components/Table/internal/kernel/utils/useMemo.js +19 -0
- package/lib/components/Table/internal/kernel/utils/valueUtil.d.ts +8 -0
- package/lib/components/Table/internal/kernel/utils/valueUtil.js +38 -0
- package/lib/components/Table/internal/kernel/utils/warning.d.ts +4 -0
- package/lib/components/Table/internal/kernel/utils/warning.js +26 -0
- package/lib/components/Table/renderers/BodyCell.d.ts +15 -0
- package/lib/components/Table/renderers/BodyCell.js +47 -0
- package/lib/components/Table/renderers/CellContent.d.ts +4 -0
- package/lib/components/Table/renderers/CellContent.js +32 -0
- package/lib/components/Table/renderers/EmptyState.d.ts +4 -0
- package/lib/components/Table/renderers/EmptyState.js +21 -0
- package/lib/components/Table/renderers/ExpandedRowContainer.d.ts +4 -0
- package/lib/components/Table/renderers/ExpandedRowContainer.js +16 -0
- package/lib/components/Table/renderers/HeaderCell.d.ts +7 -0
- package/lib/components/Table/renderers/HeaderCell.js +28 -0
- package/lib/components/Table/style/Table.css +1 -0
- package/lib/components/Table/style/Table.scss +376 -0
- package/lib/components/Table/style/css.js +12 -0
- package/lib/components/Table/style/index.d.ts +9 -0
- package/lib/components/Table/style/index.js +12 -0
- package/lib/components/Tabs/Tabs.d.ts +6 -0
- package/lib/components/Tabs/Tabs.js +121 -0
- package/lib/components/Tabs/index.d.ts +4 -0
- package/lib/components/Tabs/index.js +33 -0
- package/lib/components/Tabs/interface.d.ts +27 -0
- package/lib/components/Tabs/interface.js +6 -0
- package/lib/components/Tabs/style/Tabs.css +1 -0
- package/lib/components/Tabs/style/Tabs.scss +100 -0
- package/lib/components/Tabs/style/css.js +4 -0
- package/lib/components/Tabs/style/index.d.ts +1 -0
- package/lib/components/Tabs/style/index.js +4 -0
- package/lib/components/Tag/Tag.d.ts +6 -0
- package/lib/components/Tag/Tag.js +89 -0
- package/lib/components/Tag/constants.d.ts +18 -0
- package/lib/components/Tag/constants.js +34 -0
- package/lib/components/Tag/index.d.ts +5 -0
- package/lib/components/Tag/index.js +45 -0
- package/lib/components/Tag/interface.d.ts +15 -0
- package/lib/components/Tag/interface.js +6 -0
- package/lib/components/Tag/style/Tag.css +1 -0
- package/lib/components/Tag/style/Tag.scss +103 -0
- package/lib/components/Tag/style/css.js +4 -0
- package/lib/components/Tag/style/index.d.ts +1 -0
- package/lib/components/Tag/style/index.js +4 -0
- package/lib/components/Tooltip/Tooltip.d.ts +6 -0
- package/lib/components/Tooltip/Tooltip.js +71 -0
- package/lib/components/Tooltip/index.d.ts +4 -0
- package/lib/components/Tooltip/index.js +33 -0
- package/lib/components/Tooltip/interface.d.ts +20 -0
- package/lib/components/Tooltip/interface.js +6 -0
- package/lib/components/Tooltip/style/Tooltip.css +1 -0
- package/lib/components/Tooltip/style/Tooltip.scss +95 -0
- package/lib/components/Tooltip/style/css.js +4 -0
- package/lib/components/Tooltip/style/index.d.ts +1 -0
- package/lib/components/Tooltip/style/index.js +4 -0
- package/lib/components/Tour/Tour.d.ts +3 -0
- package/lib/components/Tour/Tour.js +250 -0
- package/lib/components/Tour/index.d.ts +4 -0
- package/lib/components/Tour/index.js +33 -0
- package/lib/components/Tour/interface.d.ts +46 -0
- package/lib/components/Tour/interface.js +6 -0
- package/lib/components/Trigger/Trigger.d.ts +5 -0
- package/lib/components/Trigger/Trigger.js +161 -0
- package/lib/components/Trigger/index.d.ts +3 -0
- package/lib/components/Trigger/index.js +35 -0
- package/lib/components/Trigger/interface.d.ts +52 -0
- package/lib/components/Trigger/interface.js +6 -0
- package/lib/components/Trigger/style/Trigger.css +1 -0
- package/lib/components/Trigger/style/Trigger.scss +18 -0
- package/lib/components/Trigger/style/css.js +4 -0
- package/lib/components/Trigger/style/index.d.ts +1 -0
- package/lib/components/Trigger/style/index.js +4 -0
- package/lib/components/Typography/Typography.d.ts +17 -0
- package/lib/components/Typography/Typography.js +207 -0
- package/lib/components/Typography/constants.d.ts +33 -0
- package/lib/components/Typography/constants.js +15 -0
- package/lib/components/Typography/index.d.ts +4 -0
- package/lib/components/Typography/index.js +79 -0
- package/lib/components/Typography/interface.d.ts +72 -0
- package/lib/components/Typography/interface.js +28 -0
- package/lib/components/Typography/render.d.ts +328 -0
- package/lib/components/Typography/render.js +116 -0
- package/lib/components/Typography/style/Typography.css +1 -0
- package/lib/components/Typography/style/Typography.scss +132 -0
- package/lib/components/Typography/style/css.js +6 -0
- package/lib/components/Typography/style/index.d.ts +3 -0
- package/lib/components/Typography/style/index.js +6 -0
- package/lib/components/Typography/useTypographyEnhancements.d.ts +43 -0
- package/lib/components/Typography/useTypographyEnhancements.js +117 -0
- package/lib/components/Typography/utils.d.ts +17 -0
- package/lib/components/Typography/utils.js +105 -0
- package/lib/components/Upload/Upload.d.ts +7 -0
- package/lib/components/Upload/Upload.js +97 -0
- package/lib/components/Upload/UploadFileBar.d.ts +6 -0
- package/lib/components/Upload/UploadFileBar.js +72 -0
- package/lib/components/Upload/index.d.ts +5 -0
- package/lib/components/Upload/index.js +41 -0
- package/lib/components/Upload/interface.d.ts +41 -0
- package/lib/components/Upload/interface.js +6 -0
- package/lib/components/Upload/style/Upload.css +1 -0
- package/lib/components/Upload/style/Upload.scss +44 -0
- package/lib/components/Upload/style/UploadFileBar.css +1 -0
- package/lib/components/Upload/style/UploadFileBar.scss +94 -0
- package/lib/components/Upload/style/css.js +5 -0
- package/lib/components/Upload/style/index.d.ts +2 -0
- package/lib/components/Upload/style/index.js +5 -0
- package/lib/components/VirtualList/Filler.d.ts +21 -0
- package/lib/components/VirtualList/Filler.js +66 -0
- package/lib/components/VirtualList/Item.d.ts +6 -0
- package/lib/components/VirtualList/Item.js +21 -0
- package/lib/components/VirtualList/ScrollBar.d.ts +22 -0
- package/lib/components/VirtualList/ScrollBar.js +247 -0
- package/lib/components/VirtualList/VirtualList.d.ts +62 -0
- package/lib/components/VirtualList/VirtualList.js +540 -0
- package/lib/components/VirtualList/constants.d.ts +4 -0
- package/lib/components/VirtualList/constants.js +11 -0
- package/lib/components/VirtualList/hooks/useChildren.d.ts +2 -0
- package/lib/components/VirtualList/hooks/useChildren.js +34 -0
- package/lib/components/VirtualList/hooks/useDiffItem.d.ts +2 -0
- package/lib/components/VirtualList/hooks/useDiffItem.js +25 -0
- package/lib/components/VirtualList/hooks/useFrameWheel.d.ts +10 -0
- package/lib/components/VirtualList/hooks/useFrameWheel.js +92 -0
- package/lib/components/VirtualList/hooks/useGetSize.d.ts +7 -0
- package/lib/components/VirtualList/hooks/useGetSize.js +57 -0
- package/lib/components/VirtualList/hooks/useHeights.d.ts +8 -0
- package/lib/components/VirtualList/hooks/useHeights.js +106 -0
- package/lib/components/VirtualList/hooks/useMobileTouchMove.d.ts +2 -0
- package/lib/components/VirtualList/hooks/useMobileTouchMove.js +91 -0
- package/lib/components/VirtualList/hooks/useOriginScroll.d.ts +2 -0
- package/lib/components/VirtualList/hooks/useOriginScroll.js +50 -0
- package/lib/components/VirtualList/hooks/useScrollDrag.d.ts +3 -0
- package/lib/components/VirtualList/hooks/useScrollDrag.js +87 -0
- package/lib/components/VirtualList/hooks/useScrollTo.d.ts +18 -0
- package/lib/components/VirtualList/hooks/useScrollTo.js +142 -0
- package/lib/components/VirtualList/index.d.ts +9 -0
- package/lib/components/VirtualList/index.js +31 -0
- package/lib/components/VirtualList/interface.d.ts +26 -0
- package/lib/components/VirtualList/interface.js +6 -0
- package/lib/components/VirtualList/style/VirtualList.css +1 -0
- package/lib/components/VirtualList/style/VirtualList.scss +5 -0
- package/lib/components/VirtualList/style/css.js +4 -0
- package/lib/components/VirtualList/style/index.d.ts +1 -0
- package/lib/components/VirtualList/style/index.js +4 -0
- package/lib/components/VirtualList/utils/CacheMap.d.ts +16 -0
- package/lib/components/VirtualList/utils/CacheMap.js +50 -0
- package/lib/components/VirtualList/utils/algorithmUtil.d.ts +23 -0
- package/lib/components/VirtualList/utils/algorithmUtil.js +84 -0
- package/lib/components/VirtualList/utils/isFirefox.d.ts +2 -0
- package/lib/components/VirtualList/utils/isFirefox.js +11 -0
- package/lib/components/VirtualList/utils/raf.d.ts +9 -0
- package/lib/components/VirtualList/utils/raf.js +53 -0
- package/lib/components/VirtualList/utils/scrollbarUtil.d.ts +1 -0
- package/lib/components/VirtualList/utils/scrollbarUtil.js +18 -0
- package/lib/index.css +1 -0
- package/lib/index.d.ts +89 -0
- package/lib/index.js +494 -0
- package/lib/styles/_api.scss +5 -0
- package/lib/styles/_settings.scss +5 -0
- package/lib/styles/index.css +1 -0
- package/lib/styles/index.scss +2 -0
- package/lib/styles/public/_index.scss +2 -0
- package/lib/styles/public/_system.scss +1 -0
- package/lib/styles/public/_theme.scss +3 -0
- package/lib/styles/recipes/_index.scss +1 -0
- package/lib/styles/recipes/_variants.scss +110 -0
- package/lib/styles/system/_index.scss +4 -0
- package/lib/styles/system/_props.scss +95 -0
- package/lib/styles/system/_public.scss +5 -0
- package/lib/styles/system/_sx.scss +81 -0
- package/lib/styles/theme/_breakpoints.scss +95 -0
- package/lib/styles/theme/_functions.scss +271 -0
- package/lib/styles/theme/_index.scss +6 -0
- package/lib/styles/theme/_mixins.scss +37 -0
- package/lib/styles/theme/_scales.scss +29 -0
- package/lib/styles/theme/_values.scss +68 -0
- package/lib/styles/tokens/_index.scss +11 -0
- package/lib/styles/tokens/breakpoint/_index.scss +2 -0
- package/lib/styles/tokens/breakpoint/_primitives.scss +8 -0
- package/lib/styles/tokens/color/_index.scss +3 -0
- package/lib/styles/tokens/color/_primitives.scss +42 -0
- package/lib/styles/tokens/color/_semantic-color.scss +172 -0
- package/lib/styles/tokens/opacity/_functions.scss +13 -0
- package/lib/styles/tokens/opacity/_index.scss +3 -0
- package/lib/styles/tokens/opacity/_primitives.scss +12 -0
- package/lib/styles/tokens/radius/_index.scss +2 -0
- package/lib/styles/tokens/radius/_primitives.scss +11 -0
- package/lib/styles/tokens/shadow/_index.scss +2 -0
- package/lib/styles/tokens/shadow/_primitives.scss +7 -0
- package/lib/styles/tokens/sizing/_functions.scss +17 -0
- package/lib/styles/tokens/sizing/_index.scss +4 -0
- package/lib/styles/tokens/sizing/_primitives.scss +12 -0
- package/lib/styles/tokens/sizing/_semantic-sizing.scss +11 -0
- package/lib/styles/tokens/spacing/_functions.scss +51 -0
- package/lib/styles/tokens/spacing/_index.scss +4 -0
- package/lib/styles/tokens/spacing/_primitives.scss +22 -0
- package/lib/styles/tokens/spacing/_semantic-spacing.scss +22 -0
- package/lib/styles/tokens/typography/_functions.scss +31 -0
- package/lib/styles/tokens/typography/_index.scss +4 -0
- package/lib/styles/tokens/typography/_primitives.scss +27 -0
- package/lib/styles/tokens/typography/_semantic-typography.scss +216 -0
- package/lib/styles/utilities/_generator.scss +55 -0
- package/lib/styles/utilities/_index.scss +14 -0
- package/lib/utils/classnames.d.ts +5 -0
- package/lib/utils/classnames.js +25 -0
- package/lib/utils/clipboard.d.ts +2 -0
- package/lib/utils/clipboard.js +56 -0
- package/lib/utils/ref.d.ts +4 -0
- package/lib/utils/ref.js +41 -0
- package/lib/utils/uuid.d.ts +2 -0
- package/lib/utils/uuid.js +23 -0
- package/package.json +442 -0
- package/patches/primereact.patch +323 -0
- package/patches/react-pro-sidebar.patch +6421 -0
- package/public/favicon.ico +0 -0
- package/public/fonts/Aeonik/Aeonik-Air.ttf +0 -0
- package/public/fonts/Aeonik/Aeonik-AirItalic.ttf +0 -0
- package/public/fonts/Aeonik/Aeonik-Black.ttf +0 -0
- package/public/fonts/Aeonik/Aeonik-BlackItalic.ttf +0 -0
- package/public/fonts/Aeonik/Aeonik-Bold.ttf +0 -0
- package/public/fonts/Aeonik/Aeonik-BoldItalic.ttf +0 -0
- package/public/fonts/Aeonik/Aeonik-Light.ttf +0 -0
- package/public/fonts/Aeonik/Aeonik-LightItalic.ttf +0 -0
- package/public/fonts/Aeonik/Aeonik-Medium.ttf +0 -0
- package/public/fonts/Aeonik/Aeonik-MediumItalic.ttf +0 -0
- package/public/fonts/Aeonik/Aeonik-Regular.ttf +0 -0
- package/public/fonts/Aeonik/Aeonik-RegularItalic.ttf +0 -0
- package/public/fonts/Aeonik/Aeonik-Thin.ttf +0 -0
- package/public/fonts/Aeonik/Aeonik-ThinItalic.ttf +0 -0
- package/public/fonts/Inter/Inter-Black.ttf +0 -0
- package/public/fonts/Inter/Inter-BlackItalic.ttf +0 -0
- package/public/fonts/Inter/Inter-Bold.ttf +0 -0
- package/public/fonts/Inter/Inter-BoldItalic.ttf +0 -0
- package/public/fonts/Inter/Inter-ExtraBold.ttf +0 -0
- package/public/fonts/Inter/Inter-ExtraBoldItalic.ttf +0 -0
- package/public/fonts/Inter/Inter-ExtraLight.ttf +0 -0
- package/public/fonts/Inter/Inter-ExtraLightItalic.ttf +0 -0
- package/public/fonts/Inter/Inter-Italic.ttf +0 -0
- package/public/fonts/Inter/Inter-Light.ttf +0 -0
- package/public/fonts/Inter/Inter-LightItalic.ttf +0 -0
- package/public/fonts/Inter/Inter-Medium.ttf +0 -0
- package/public/fonts/Inter/Inter-MediumItalic.ttf +0 -0
- package/public/fonts/Inter/Inter-Regular.ttf +0 -0
- package/public/fonts/Inter/Inter-SemiBold.ttf +0 -0
- package/public/fonts/Inter/Inter-SemiBoldItalic.ttf +0 -0
- package/public/fonts/Inter/Inter-Thin.ttf +0 -0
- package/public/fonts/Inter/Inter-ThinItalic.ttf +0 -0
- package/public/fonts/Outfit/Outfit-Black.ttf +0 -0
- package/public/fonts/Outfit/Outfit-Bold.ttf +0 -0
- package/public/fonts/Outfit/Outfit-ExtraBold.ttf +0 -0
- package/public/fonts/Outfit/Outfit-ExtraLight.ttf +0 -0
- package/public/fonts/Outfit/Outfit-Light.ttf +0 -0
- package/public/fonts/Outfit/Outfit-Medium.ttf +0 -0
- package/public/fonts/Outfit/Outfit-Regular.ttf +0 -0
- package/public/fonts/Outfit/Outfit-SemiBold.ttf +0 -0
- package/public/fonts/Outfit/Outfit-Thin.ttf +0 -0
- package/public/github-mark.svg +3 -0
- package/public/tokens/GYEN.svg +9 -0
- package/public/tokens/PYUSD.svg +9 -0
- package/public/tokens/USDT.svg +6 -0
- package/scripts/mcp-server/index.d.mts +1 -0
- package/scripts/mcp-server/index.mjs +45 -0
- package/scripts/mcp-server/resources.d.mts +1 -0
- package/scripts/mcp-server/resources.mjs +102 -0
- package/test/jsdom-global-register.d.ts +1 -0
- package/test/jsdom-global-register.js +1 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { createElement as _createElement } from "react";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { toArray } from './utils/reactUtil';
|
|
4
|
+
import SingleObserver from './SingleObserver';
|
|
5
|
+
import { Collection } from './Collection';
|
|
6
|
+
var INTERNAL_PREFIX_KEY = 'om-react-ui-observer-key';
|
|
7
|
+
function ResizeObserver(props, ref) {
|
|
8
|
+
var _a;
|
|
9
|
+
var children = props.children;
|
|
10
|
+
var childNodes = typeof children === 'function' ? [children] : toArray(children);
|
|
11
|
+
// eslint-disable-next-line no-undef
|
|
12
|
+
if (typeof process !== 'undefined' && ((_a = process.env) === null || _a === void 0 ? void 0 : _a.NODE_ENV) !== 'production') {
|
|
13
|
+
if (childNodes.length > 1) {
|
|
14
|
+
console.warn('[ResizeObserver] Find more than one child node with `children`. Please use ResizeObserver.Collection instead.');
|
|
15
|
+
} else if (childNodes.length === 0) {
|
|
16
|
+
console.warn('[ResizeObserver] `children` is empty. Nothing is in observe.');
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return childNodes.map(function (child, index) {
|
|
20
|
+
var key = (child === null || child === void 0 ? void 0 : child.key) || "".concat(INTERNAL_PREFIX_KEY, "-").concat(index);
|
|
21
|
+
return /*#__PURE__*/_createElement(SingleObserver, Object.assign({}, props, {
|
|
22
|
+
key: key,
|
|
23
|
+
ref: index === 0 ? ref : undefined
|
|
24
|
+
}), child);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
var RefResizeObserver = /*#__PURE__*/React.forwardRef(ResizeObserver);
|
|
28
|
+
RefResizeObserver.displayName = 'ResizeObserver';
|
|
29
|
+
RefResizeObserver.Collection = Collection;
|
|
30
|
+
export default RefResizeObserver;
|
|
31
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbXBvbmVudHMvUmVzaXplT2JzZXJ2ZXIvUmVzaXplT2JzZXJ2ZXIuanMiLCJjb21wb25lbnRzL3NyYy9jb21wb25lbnRzL1Jlc2l6ZU9ic2VydmVyL1Jlc2l6ZU9ic2VydmVyLnRzeCJdLCJuYW1lcyI6WyJjcmVhdGVFbGVtZW50IiwiX2Ny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lZlJlc2l6ZU9ic2VydmVyOyIsbnVsbF0sInNvdXJjZVJvb3QiOiIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMifQ==
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { ResizeObserverProps } from '../interface';
|
|
3
|
+
export interface SingleObserverProps extends ResizeObserverProps {
|
|
4
|
+
children: React.ReactElement | ((ref: React.RefObject<Element>) => React.ReactElement);
|
|
5
|
+
}
|
|
6
|
+
declare const RefSingleObserver: React.ForwardRefExoticComponent<SingleObserverProps & React.RefAttributes<HTMLElement>>;
|
|
7
|
+
export default RefSingleObserver;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { CollectionContext } from '../Collection';
|
|
3
|
+
import useResizeObserver from '../useResizeObserver';
|
|
4
|
+
import { getDOM, supportRef, getNodeRef } from '../utils/reactUtil';
|
|
5
|
+
import { useComposeRef } from '../../../utils/ref';
|
|
6
|
+
function SingleObserver(props, ref) {
|
|
7
|
+
var children = props.children,
|
|
8
|
+
disabled = props.disabled,
|
|
9
|
+
onResize = props.onResize,
|
|
10
|
+
data = props.data;
|
|
11
|
+
var elementRef = React.useRef(null);
|
|
12
|
+
var onCollectionResize = React.useContext(CollectionContext);
|
|
13
|
+
// =========================== Children ===========================
|
|
14
|
+
var isRenderProps = typeof children === 'function';
|
|
15
|
+
var mergedChildren = isRenderProps ? children(elementRef) : children;
|
|
16
|
+
// ============================= Ref ==============================
|
|
17
|
+
var canRef = !isRenderProps && /*#__PURE__*/React.isValidElement(mergedChildren) && supportRef(mergedChildren);
|
|
18
|
+
var originRef = canRef ? getNodeRef(mergedChildren) : null;
|
|
19
|
+
var mergedRef = useComposeRef(originRef, elementRef);
|
|
20
|
+
var getDomElement = React.useCallback(function () {
|
|
21
|
+
return getDOM(elementRef.current);
|
|
22
|
+
}, []);
|
|
23
|
+
React.useImperativeHandle(ref, function () {
|
|
24
|
+
return getDomElement();
|
|
25
|
+
});
|
|
26
|
+
// =========================== Observe ============================
|
|
27
|
+
useResizeObserver(!disabled, getDomElement, onResize, function (sizeInfo, target) {
|
|
28
|
+
onCollectionResize === null || onCollectionResize === void 0 ? void 0 : onCollectionResize(sizeInfo, target, data);
|
|
29
|
+
});
|
|
30
|
+
// ============================ Render ============================
|
|
31
|
+
return canRef ? /*#__PURE__*/React.cloneElement(mergedChildren, {
|
|
32
|
+
ref: mergedRef
|
|
33
|
+
}) : mergedChildren;
|
|
34
|
+
}
|
|
35
|
+
var RefSingleObserver = /*#__PURE__*/React.forwardRef(SingleObserver);
|
|
36
|
+
RefSingleObserver.displayName = 'SingleObserver';
|
|
37
|
+
export default RefSingleObserver;
|
|
38
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbXBvbmVudHMvUmVzaXplT2JzZXJ2ZXIvc3JjL2NvbXBvbmVudHMvUmVzaXplT2JzZXJ2ZXIvU2luZ2xlT2JzZXJ2ZXIvaW5kZXgudHN4IiwiY29tcG9uZW50cy9SZXNpemVPYnNlcnZlci9TaW5nbGVPYnNlcnZlci9pbmRleC5qcyJdLCJuYW1lcyI6WyJSZWFjdCIsIkNvbGxlY3Rpb25Db250ZXh0IiwidXNlUmVzaXplT2JzZXJ2ZXIiLCJnZXRET00iLCJzdXBwb3J0UmVmIiwiZ2V0Tm9kZVJlZiIsInVzZUNvbXBvc2VSZWYiLCJTaW5nbGVPYnNlcnZlciIsInByb3BzIiwicmVmIiwiY2hpbGRyZW4iLCJkaXNhYmxlZCIsIm9uUmVzaXplIiwiZGF0YSIsImVsZW1lbnRSZWYiLCJ1c2VSZWYiLCJvbkNvbGxlY3Rpb25SZXNpemUiLCJ1c2VDb250ZXh0IiwiaXNSZW5kZXJQcm9wcyIsIm1lcmdlZENoaWxkcmVuIiwiY2FuUmVmIiwiaXNWYWxpZEVsZW1lbnQiLCJvcmlnaW5SZWYiL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sZW1lbnRSZWYpIDogY2hpbGRyZW47XG4gICAgLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gUmVmID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuICAgIGNvbnN0IGNhblJlZiA9ICFpc1JlbmRlclByb3BzICYmIFJlYWN0LmlzVmFsaWRFbGVtZW50KG1lcmdlZENoaWxkcmVuKSAmJiBzdXBwb3J0UmVmKG1lcmdlZENoaWxkcmVuKTtcbiAgICBjb25zdCBvcmlnaW5SZWYgPSBjYW5SZWYgPyBnZXROb2RlUmVmKG1lcmdlZENoaWxkcmVuKSA6IG51bGw7XG4gICAgY29uc3QgbWVyZ2VkUmVmID0gdXNlQ29tcG9zZVJlZihvcmlnaW5SZWYsIGVsZW1lbnRSZWYpO1xuICAgIGNvbnN0IGdldERvbUVsZW1lbnQgPSBSZWFjdC51c2VDYWxsYmFjaygoKSA9PiBnZXRET00oZWxlbWVudFJlZi5jdXJyZW50KSwgW10pO1xuICAgIFJlYWN0LnVzZUltcGVyYXRpdmVIYW5kbGUocmVmLCAoKSA9PiBnZXREb21FbGVtZW50KCkpO1xuICAgIC8vID09PT09PT09PT09PT09PT09PT09PT09PT09PSBPYnNlcnZlID09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiAgICB1c2VSZXNpemVPYnNlcnZlcighZGlzYWJsZWQsIGdldERvbUVsZW1lbnQsIG9uUmVzaXplLCAoc2l6ZUluZm8sIHRhcmdldCkgPT4ge1xuICAgICAgICBvbkNvbGxlY3Rpb25SZXNpemUgPT09IG51bGwgfHwgb25Db2xsZWN0aW9uUmVzaXplID09PSB2b2lkIDAgPyB2b2lkIDAgOiBvbkNvbGxlY3Rpb25SZXNpemUoc2l6ZUluZm8sIHRhcmdldCwgZGF0YSk7XG4gICAgfSk7XG4gICAgLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PSBSZW5kZXIgPT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuICAgIHJldHVybiBjYW5SZWZcbiAgICAgICAgPyBSZWFjdC5jbG9uZUVsZW1lbnQobWVyZ2VkQ2hpbGRyZW4sIHtcbiAgICAgICAgICAgIHJlZjogbWVyZ2VkUmVmLFxuICAgICAgICB9KVxuICAgICAgICA6IG1lcmdlZENoaWxkcmVuO1xufVxuY29uc3QgUmVmU2luZ2xlT2JzZXJ2ZXIgPSBSZWFjdC5mb3J3YXJkUmVmKFNpbmdsZU9ic2VydmVyKTtcblJlZlNpbmdsZU9ic2VydmVyLmRpc3BsYXlOYW1lID0gJ1NpbmdsZU9ic2VydmVyJztcbmV4cG9ydCBkZWZhdWx0IFJlZlNpbmdsZU9ic2VydmVyOyJdLCJzb3VyY2VSb290IjoiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjIn0=
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import ResizeObserver from './ResizeObserver';
|
|
2
|
+
export { default as ResizeObserver } from './ResizeObserver';
|
|
3
|
+
export default ResizeObserver;
|
|
4
|
+
export { default as useResizeObserver } from './useResizeObserver';
|
|
5
|
+
export { Collection } from './Collection';
|
|
6
|
+
export type { SizeInfo, OnResize, ResizeObserverProps } from './interface';
|
|
7
|
+
export type { ResizeInfo, CollectionProps } from './Collection';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import ResizeObserver from './ResizeObserver';
|
|
2
|
+
export { default as ResizeObserver } from './ResizeObserver';
|
|
3
|
+
export default ResizeObserver;
|
|
4
|
+
export { default as useResizeObserver } from './useResizeObserver';
|
|
5
|
+
export { Collection } from './Collection';
|
|
6
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbXBvbmVudHMvc3JjL2NvbXBvbmVudHMvUmVzaXplT2JzZXJ2ZXIvaW5kZXgudHMiXSwibmFtZXMiOlsiUmVzaXplT2JzZXJ2ZXIiLCJkZWZhdWx0IiwidXNlUmVzaXplT2JzZXJ2ZXIiLCJDb2xsZWN0aW9uIl0sIm1hcHBpbmdzIjoiQUFBQSxPQUFPQSxjQUFjLE1BQU0sa0JBQWtCO0FBRTdDLFNBQVNDLE9BQU8sSUFBSUQsY0FBYyxRQUFRLGtCQUFrQjtBQUU1RCxlQUFlQSxjQUFjO0FBRTdCLFNBQVNDLE9BQU8sSUFBSUMsaUJBQWlCLFFBQVEscUJBQXFCO0FBQ2xFLFNBQVNDLFVBQVUsUUFBUSxjQUFjIiwiZmlsZSI6ImNvbXBvbmVudHMvUmVzaXplT2JzZXJ2ZXIvaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6W251bGxdLCJzb3VyY2VSb290IjoiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjIn0=
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
export interface SizeInfo {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
offsetWidth: number;
|
|
6
|
+
offsetHeight: number;
|
|
7
|
+
}
|
|
8
|
+
export type OnResize = (size: SizeInfo, element: HTMLElement) => void;
|
|
9
|
+
export interface ResizeObserverProps {
|
|
10
|
+
/** Pass to ResizeObserver.Collection with additional data */
|
|
11
|
+
data?: any;
|
|
12
|
+
children: React.ReactNode | ((ref: React.RefObject<any>) => React.ReactElement);
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/** Trigger if element resized. Will always trigger when first time render. */
|
|
15
|
+
onResize?: OnResize;
|
|
16
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcG9uZW50cy9SZXNpemVPYnNlcnZlci9pbnRlcmZhY2UuanMiLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMiLCJzb3VyY2VzIjpbImNvbXBvbmVudHMvUmVzaXplT2JzZXJ2ZXIvaW50ZXJmYWNlLmpzIl0sInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB7fTsiXSwibWFwcGluZ3MiOiJBQUFBIiwiaWdub3JlTGlzdCI6W119
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { observe, unobserve } from './utils/observerUtil';
|
|
3
|
+
import { useEventCallback } from '@1money/hooks';
|
|
4
|
+
export default function useResizeObserver(enabled, getTarget, onDelayResize, onSyncResize) {
|
|
5
|
+
// ============================= Size =============================
|
|
6
|
+
var sizeRef = React.useRef({
|
|
7
|
+
width: -1,
|
|
8
|
+
height: -1,
|
|
9
|
+
offsetWidth: -1,
|
|
10
|
+
offsetHeight: -1
|
|
11
|
+
});
|
|
12
|
+
// =========================== Observe ============================
|
|
13
|
+
// Handler
|
|
14
|
+
var onInternalResize = useEventCallback(function (target) {
|
|
15
|
+
var htmlTarget = target;
|
|
16
|
+
var _htmlTarget$getBoundi = htmlTarget.getBoundingClientRect(),
|
|
17
|
+
width = _htmlTarget$getBoundi.width,
|
|
18
|
+
height = _htmlTarget$getBoundi.height;
|
|
19
|
+
var offsetWidth = htmlTarget.offsetWidth,
|
|
20
|
+
offsetHeight = htmlTarget.offsetHeight;
|
|
21
|
+
/**
|
|
22
|
+
* Resize observer trigger when content size changed.
|
|
23
|
+
* In most case we just care about element size,
|
|
24
|
+
* let's use `boundary` instead of `contentRect` here to avoid shaking.
|
|
25
|
+
*/
|
|
26
|
+
var fixedWidth = Math.floor(width);
|
|
27
|
+
var fixedHeight = Math.floor(height);
|
|
28
|
+
if (sizeRef.current.width !== fixedWidth || sizeRef.current.height !== fixedHeight || sizeRef.current.offsetWidth !== offsetWidth || sizeRef.current.offsetHeight !== offsetHeight) {
|
|
29
|
+
var size = {
|
|
30
|
+
width: fixedWidth,
|
|
31
|
+
height: fixedHeight,
|
|
32
|
+
offsetWidth: offsetWidth,
|
|
33
|
+
offsetHeight: offsetHeight
|
|
34
|
+
};
|
|
35
|
+
sizeRef.current = size;
|
|
36
|
+
// IE is strange, right?
|
|
37
|
+
var mergedOffsetWidth = offsetWidth === Math.round(width) ? width : offsetWidth;
|
|
38
|
+
var mergedOffsetHeight = offsetHeight === Math.round(height) ? height : offsetHeight;
|
|
39
|
+
var sizeInfo = Object.assign(Object.assign({}, size), {
|
|
40
|
+
offsetWidth: mergedOffsetWidth,
|
|
41
|
+
offsetHeight: mergedOffsetHeight
|
|
42
|
+
});
|
|
43
|
+
onSyncResize === null || onSyncResize === void 0 ? void 0 : onSyncResize(sizeInfo, htmlTarget);
|
|
44
|
+
// defer the callback but not defer to next frame
|
|
45
|
+
Promise.resolve().then(function () {
|
|
46
|
+
onDelayResize === null || onDelayResize === void 0 ? void 0 : onDelayResize(sizeInfo, htmlTarget);
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
// Dynamic observe
|
|
51
|
+
var isFuncTarget = typeof getTarget === 'function';
|
|
52
|
+
var funcTargetIdRef = React.useRef(0);
|
|
53
|
+
var getTargetRef = React.useRef(getTarget);
|
|
54
|
+
getTargetRef.current = getTarget;
|
|
55
|
+
React.useEffect(function () {
|
|
56
|
+
var currentGetTarget = getTargetRef.current;
|
|
57
|
+
var target = typeof currentGetTarget === 'function' ? currentGetTarget() : currentGetTarget;
|
|
58
|
+
if (target && enabled) {
|
|
59
|
+
observe(target, onInternalResize);
|
|
60
|
+
} else if (enabled && isFuncTarget) {
|
|
61
|
+
funcTargetIdRef.current += 1;
|
|
62
|
+
}
|
|
63
|
+
return function () {
|
|
64
|
+
if (target) {
|
|
65
|
+
unobserve(target, onInternalResize);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
}, [enabled, isFuncTarget, isFuncTarget ? funcTargetIdRef.current : getTarget]);
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbXBvbmVud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nVzZUVmZmVjdCgoKSA9PiB7XG4gICAgICAgIGNvbnN0IGN1cnJlbnRHZXRUYXJnZXQgPSBnZXRUYXJnZXRSZWYuY3VycmVudDtcbiAgICAgICAgY29uc3QgdGFyZ2V0ID0gdHlwZW9mIGN1cnJlbnRHZXRUYXJnZXQgPT09ICdmdW5jdGlvbicgPyBjdXJyZW50R2V0VGFyZ2V0KCkgOiBjdXJyZW50R2V0VGFyZ2V0O1xuICAgICAgICBpZiAodGFyZ2V0ICYmIGVuYWJsZWQpIHtcbiAgICAgICAgICAgIG9ic2VydmUodGFyZ2V0LCBvbkludGVybmFsUmVzaXplKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChlbmFibGVkICYmIGlzRnVuY1RhcmdldCkge1xuICAgICAgICAgICAgZnVuY1RhcmdldElkUmVmLmN1cnJlbnQgKz0gMTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gKCkgPT4ge1xuICAgICAgICAgICAgaWYgKHRhcmdldCkge1xuICAgICAgICAgICAgICAgIHVub2JzZXJ2ZSh0YXJnZXQsIG9uSW50ZXJuYWxSZXNpemUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH0sIFtlbmFibGVkLCBpc0Z1bmNUYXJnZXQsIGlzRnVuY1RhcmdldCA/IGZ1bmNUYXJnZXRJZFJlZi5jdXJyZW50IDogZ2V0VGFyZ2V0XSk7XG59Il0sInNvdXJjZVJvb3QiOiIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMifQ==
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type ResizeListener = (element: Element) => void;
|
|
2
|
+
declare function onResize(entities: ResizeObserverEntry[]): void;
|
|
3
|
+
/** @private Test only for mock trigger resize event */
|
|
4
|
+
export declare const _rs: typeof onResize;
|
|
5
|
+
export declare function observe(element: Element, callback: ResizeListener): void;
|
|
6
|
+
export declare function unobserve(element: Element, callback: ResizeListener): void;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// =============================== Const ===============================
|
|
2
|
+
var elementListeners = new Map();
|
|
3
|
+
function onResize(entities) {
|
|
4
|
+
entities.forEach(function (entity) {
|
|
5
|
+
var _a;
|
|
6
|
+
var target = entity.target;
|
|
7
|
+
(_a = elementListeners.get(target)) === null || _a === void 0 ? void 0 : _a.forEach(function (listener) {
|
|
8
|
+
return listener(target);
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
// Delay create ResizeObserver since it's not supported in server side
|
|
13
|
+
var observer;
|
|
14
|
+
function ensureResizeObserver() {
|
|
15
|
+
if (!observer) {
|
|
16
|
+
observer = new ResizeObserver(onResize);
|
|
17
|
+
}
|
|
18
|
+
return observer;
|
|
19
|
+
}
|
|
20
|
+
/** @private Test only for mock trigger resize event */
|
|
21
|
+
export var _rs = onResize;
|
|
22
|
+
// ============================== Observe ==============================
|
|
23
|
+
export function observe(element, callback) {
|
|
24
|
+
if (!elementListeners.has(element)) {
|
|
25
|
+
elementListeners.set(element, new Set());
|
|
26
|
+
ensureResizeObserver().observe(element);
|
|
27
|
+
}
|
|
28
|
+
elementListeners.get(element).add(callback);
|
|
29
|
+
}
|
|
30
|
+
export function unobserve(element, callback) {
|
|
31
|
+
if (elementListeners.has(element)) {
|
|
32
|
+
elementListeners.get(element)["delete"](callback);
|
|
33
|
+
if (!elementListeners.get(element).size) {
|
|
34
|
+
ensureResizeObserver().unobserve(element);
|
|
35
|
+
elementListeners["delete"](element);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbXBvbmVudHMvUmVzaXplT2JzZXJ2ZXIvc3JjL2NvbXBvbmVudHMvUmVzaXplT2JzZXJ2ZXIvdXRpbHMvb2JzZXJ2ZXJVdGlsLnRzIiwiY29tcG9uZW50cy9SZXNpemVPYnNlcnZl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ZiAoIWVsZW1lbnRMaXN0ZW5lcnMuaGFzKGVsZW1lbnQpKSB7XG4gICAgICAgIGVsZW1lbnRMaXN0ZW5lcnMuc2V0KGVsZW1lbnQsIG5ldyBTZXQoKSk7XG4gICAgICAgIGVuc3VyZVJlc2l6ZU9ic2VydmVyKCkub2JzZXJ2ZShlbGVtZW50KTtcbiAgICB9XG4gICAgZWxlbWVudExpc3RlbmVycy5nZXQoZWxlbWVudCkuYWRkKGNhbGxiYWNrKTtcbn1cbmV4cG9ydCBmdW5jdGlvbiB1bm9ic2VydmUoZWxlbWVudCwgY2FsbGJhY2spIHtcbiAgICBpZiAoZWxlbWVudExpc3RlbmVycy5oYXMoZWxlbWVudCkpIHtcbiAgICAgICAgZWxlbWVudExpc3RlbmVycy5nZXQoZWxlbWVudCkuZGVsZXRlKGNhbGxiYWNrKTtcbiAgICAgICAgaWYgKCFlbGVtZW50TGlzdGVuZXJzLmdldChlbGVtZW50KS5zaXplKSB7XG4gICAgICAgICAgICBlbnN1cmVSZXNpemVPYnNlcnZlcigpLnVub2JzZXJ2ZShlbGVtZW50KTtcbiAgICAgICAgICAgIGVsZW1lbnRMaXN0ZW5lcnMuZGVsZXRlKGVsZW1lbnQpO1xuICAgICAgICB9XG4gICAgfVxufSJdLCJzb3VyY2VSb290IjoiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjIn0=
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Flatten React children into a flat array, expanding fragments.
|
|
4
|
+
*/
|
|
5
|
+
export declare function toArray(children: React.ReactNode): React.ReactElement[];
|
|
6
|
+
/**
|
|
7
|
+
* Extract a real DOM node from a ref-like object.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getDOM(node: any): HTMLElement | SVGElement | null;
|
|
10
|
+
/**
|
|
11
|
+
* Check if a React element supports ref forwarding.
|
|
12
|
+
* In React 19+, all non-fragment elements support refs.
|
|
13
|
+
*/
|
|
14
|
+
export declare function supportRef(node: any): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Get ref from React element, handling React 19 property changes.
|
|
17
|
+
* Excludes fragments.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getNodeRef(node: React.ReactElement): React.Ref<any> | null;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
2
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
var REACT_MAJOR_VERSION = parseInt(React.version.split('.')[0], 10);
|
|
5
|
+
/**
|
|
6
|
+
* Flatten React children into a flat array, expanding fragments.
|
|
7
|
+
*/
|
|
8
|
+
export function toArray(children) {
|
|
9
|
+
var result = [];
|
|
10
|
+
React.Children.forEach(children, function (child) {
|
|
11
|
+
if (child === undefined || child === null) return;
|
|
12
|
+
if (Array.isArray(child)) {
|
|
13
|
+
result.push.apply(result, _toConsumableArray(toArray(child)));
|
|
14
|
+
} else if (/*#__PURE__*/React.isValidElement(child) && child.type === React.Fragment) {
|
|
15
|
+
result.push.apply(result, _toConsumableArray(toArray(child.props.children)));
|
|
16
|
+
} else {
|
|
17
|
+
result.push(child);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
return result;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Extract a real DOM node from a ref-like object.
|
|
24
|
+
*/
|
|
25
|
+
export function getDOM(node) {
|
|
26
|
+
if (node && _typeof(node) === 'object' && node.nativeElement) {
|
|
27
|
+
var nativeElement = node.nativeElement;
|
|
28
|
+
if (nativeElement instanceof HTMLElement || nativeElement instanceof SVGElement) {
|
|
29
|
+
return nativeElement;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (node instanceof HTMLElement || node instanceof SVGElement) {
|
|
33
|
+
return node;
|
|
34
|
+
}
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
function isReactElement(node) {
|
|
38
|
+
return /*#__PURE__*/React.isValidElement(node) && !isFragment(node);
|
|
39
|
+
}
|
|
40
|
+
function isFragment(node) {
|
|
41
|
+
return /*#__PURE__*/React.isValidElement(node) && node.type === React.Fragment;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Check if a React element supports ref forwarding.
|
|
45
|
+
* In React 19+, all non-fragment elements support refs.
|
|
46
|
+
*/
|
|
47
|
+
export function supportRef(node) {
|
|
48
|
+
var _a, _b;
|
|
49
|
+
if (!node) return false;
|
|
50
|
+
// React 19+ no need `forwardRef` anymore. So just pass if is a React element (not fragment).
|
|
51
|
+
if (isReactElement(node) && REACT_MAJOR_VERSION >= 19) return true;
|
|
52
|
+
// unwrap memo
|
|
53
|
+
var type = node.type;
|
|
54
|
+
var realType = (type === null || type === void 0 ? void 0 : type.$$typeof) === Symbol["for"]('react.memo') ? type.type : type;
|
|
55
|
+
// Function component without forwardRef
|
|
56
|
+
if (typeof realType === 'function' && !((_a = realType.prototype) === null || _a === void 0 ? void 0 : _a.render) && realType.$$typeof !== Symbol["for"]('react.forward_ref')) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
// Class component without forwardRef
|
|
60
|
+
if (typeof node === 'function' && !((_b = node.prototype) === null || _b === void 0 ? void 0 : _b.render) && node.$$typeof !== Symbol["for"]('react.forward_ref')) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Get ref from React element, handling React 19 property changes.
|
|
67
|
+
* Excludes fragments.
|
|
68
|
+
*/
|
|
69
|
+
export function getNodeRef(node) {
|
|
70
|
+
var _a;
|
|
71
|
+
if (!isReactElement(node)) return null;
|
|
72
|
+
// React 19+ moves ref into props
|
|
73
|
+
if (Object.prototype.propertyIsEnumerable.call(node.props, 'ref')) {
|
|
74
|
+
return node.props.ref;
|
|
75
|
+
}
|
|
76
|
+
return (_a = node.ref) !==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XJjZVJvb3QiOiIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMifQ==
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
6
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { memo, useCallback, useRef, useState } from 'react';
|
|
12
|
+
import { useControlledState, useEventCallback, useLayoutEffect } from '@1money/hooks';
|
|
13
|
+
import { default as classnames, joinCls } from '../../utils/classnames';
|
|
14
|
+
import './style';
|
|
15
|
+
export var Segment = function Segment(props) {
|
|
16
|
+
var _a, _b;
|
|
17
|
+
var _props$className = props.className,
|
|
18
|
+
className = _props$className === void 0 ? '' : _props$className,
|
|
19
|
+
_props$prefixCls = props.prefixCls,
|
|
20
|
+
prefixCls = _props$prefixCls === void 0 ? 'segment' : _props$prefixCls,
|
|
21
|
+
value = props.value,
|
|
22
|
+
defaultValue = props.defaultValue,
|
|
23
|
+
items = props.items,
|
|
24
|
+
_props$animated = props.animated,
|
|
25
|
+
animated = _props$animated === void 0 ? true : _props$animated,
|
|
26
|
+
onChange = props.onChange,
|
|
27
|
+
rest = __rest(props, ["className", "prefixCls", "value", "defaultValue", "items", "animated", "onChange"]);
|
|
28
|
+
var classes = classnames(prefixCls);
|
|
29
|
+
var containerRef = useRef(null);
|
|
30
|
+
var itemRefs = useRef(new Map());
|
|
31
|
+
var _useState = useState(null),
|
|
32
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
33
|
+
indicatorStyle = _useState2[0],
|
|
34
|
+
setIndicatorStyle = _useState2[1];
|
|
35
|
+
var _useControlledState = useControlledState((_b = defaultValue !== null && defaultValue !== void 0 ? defaultValue : (_a = items[0]) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '', value),
|
|
36
|
+
_useControlledState2 = _slicedToArray(_useControlledState, 2),
|
|
37
|
+
currentValue = _useControlledState2[0],
|
|
38
|
+
setCurrentValue = _useControlledState2[1];
|
|
39
|
+
var updateIndicator = useCallback(function () {
|
|
40
|
+
var container = containerRef.current;
|
|
41
|
+
var activeItem = itemRefs.current.get(currentValue);
|
|
42
|
+
if (!container || !activeItem) return;
|
|
43
|
+
var containerRect = container.getBoundingClientRect();
|
|
44
|
+
var itemRect = activeItem.getBoundingClientRect();
|
|
45
|
+
setIndicatorStyle({
|
|
46
|
+
width: itemRect.width,
|
|
47
|
+
transform: "translateX(".concat(itemRect.left - containerRect.left + container.scrollLeft, "px)")
|
|
48
|
+
});
|
|
49
|
+
}, [currentValue]);
|
|
50
|
+
useLayoutEffect(function () {
|
|
51
|
+
updateIndicator();
|
|
52
|
+
}, [currentValue, items, updateIndicator]);
|
|
53
|
+
var handleItemClick = useEventCallback(function (item) {
|
|
54
|
+
if (item.disabled) return;
|
|
55
|
+
setCurrentValue(item.value);
|
|
56
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(item.value);
|
|
57
|
+
});
|
|
58
|
+
var setItemRef = useCallback(function (val, el) {
|
|
59
|
+
if (el) {
|
|
60
|
+
itemRefs.current.set(val, el);
|
|
61
|
+
} else {
|
|
62
|
+
itemRefs.current["delete"](val);
|
|
63
|
+
}
|
|
64
|
+
}, []);
|
|
65
|
+
return _jsx("div", Object.assign({}, rest, {
|
|
66
|
+
className: classes(undefined, className),
|
|
67
|
+
children: _jsxs("div", {
|
|
68
|
+
className: classes('track'),
|
|
69
|
+
ref: containerRef,
|
|
70
|
+
role: "radiogroup",
|
|
71
|
+
children: [indicatorStyle && _jsx("span", {
|
|
72
|
+
className: classes('indicator'),
|
|
73
|
+
style: Object.assign(Object.assign({}, indicatorStyle), !animated && {
|
|
74
|
+
transition: 'none'
|
|
75
|
+
})
|
|
76
|
+
}), items.map(function (item) {
|
|
77
|
+
return _jsx("button", {
|
|
78
|
+
ref: function ref(el) {
|
|
79
|
+
return setItemRef(item.value, el);
|
|
80
|
+
},
|
|
81
|
+
role: "radio",
|
|
82
|
+
type: "button",
|
|
83
|
+
"aria-checked": item.value === currentValue,
|
|
84
|
+
"aria-disabled": item.disabled,
|
|
85
|
+
tabIndex: item.value === currentValue ? 0 : -1,
|
|
86
|
+
className: classes('item', joinCls(item.value === currentValue && classes('item-active'), item.disabled && classes('item-disabled'))),
|
|
87
|
+
onClick: function onClick() {
|
|
88
|
+
return handleItemClick(item);
|
|
89
|
+
},
|
|
90
|
+
children: _jsx("span", {
|
|
91
|
+
className: classes('item-label'),
|
|
92
|
+
children: item.label
|
|
93
|
+
})
|
|
94
|
+
}, item.value);
|
|
95
|
+
})]
|
|
96
|
+
})
|
|
97
|
+
}));
|
|
98
|
+
};
|
|
99
|
+
export default /*#__PURE__*/memo(Segment);
|
|
100
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbXBvbmVudHMvU2VnbWVudC9TZWdtZW50LmpzIiwiY29tcG9uZW50cy9zcmMvY29tcG9uZW50cy9TZWdtZW50L1NlZ21lbnQudHN4Il0sIm5hbWVzIjpbIl9fcmVzdCIsInMiLCJlIiwidCIsInAiLCJPYmplY3QiLCJwcm90b3R5cGUiLCJoYXNPd25Qcm9wZXJ0eSIsImNhbGwiLCJpbmRleE9mIiwiZ2V0T3duUHJvcGVydHlTeW1ib2xzIiwiaSIsImxlbmd0aCIsInByb3BlcnR5SXNFbnVtZXJhYmxlIiwian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sIHR5cGU6IFwiYnV0dG9uXCIsIFwiYXJpYS1jaGVja2VkXCI6IGl0ZW0udmFsdWUgPT09IGN1cnJlbnRWYWx1ZSwgXCJhcmlhLWRpc2FibGVkXCI6IGl0ZW0uZGlzYWJsZWQsIHRhYkluZGV4OiBpdGVtLnZhbHVlID09PSBjdXJyZW50VmFsdWUgPyAwIDogLTEsIGNsYXNzTmFtZTogY2xhc3NlcygnaXRlbScsIGpvaW5DbHMoaXRlbS52YWx1ZSA9PT0gY3VycmVudFZhbHVlICYmIGNsYXNzZXMoJ2l0ZW0tYWN0aXZlJyksIGl0ZW0uZGlzYWJsZWQgJiYgY2xhc3NlcygnaXRlbS1kaXNhYmxlZCcpKSksIG9uQ2xpY2s6ICgpID0+IGhhbmRsZUl0ZW1DbGljayhpdGVtKSwgY2hpbGRyZW46IF9qc3goXCJzcGFuXCIsIHsgY2xhc3NOYW1lOiBjbGFzc2VzKCdpdGVtLWxhYmVsJyksIGNoaWxkcmVuOiBpdGVtLmxhYmVsIH0pIH0sIGl0ZW0udmFsdWUpKSldIH0pIH0pKSk7XG59O1xuZXhwb3J0IGRlZmF1bHQgbWVtbyhTZWdtZW50KTsiLG51bGxdLCJzb3VyY2VSb290IjoiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjIn0=
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import Segment from './Segment';
|
|
2
|
+
export { Segment } from './Segment';
|
|
3
|
+
export default Segment;
|
|
4
|
+
export * from './interface';
|
|
5
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbXBvbmVudHMvc3JjL2NvbXBvbmVudHMvU2VnbWVudC9pbmRleC50cyJdLCJuYW1lcyI6WyJTZWdtZW50Il0sIm1hcHBpbmdzIjoiQUFBQSxPQUFPQSxPQUFPLE1BQU0sV0FBVztBQUUvQixTQUFTQSxPQUFPLFFBQVEsV0FBVztBQUVuQyxlQUFlQSxPQUFPO0FBRXRCLGNBQWMsYUFBYSIsImZpbGUiOiJjb21wb25lbnRzL1NlZ21lbnQvaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6W251bGxdLCJzb3VyY2VSb290IjoiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjIn0=
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface SegmentItem {
|
|
3
|
+
/** Unique value for the segment option */
|
|
4
|
+
value: string;
|
|
5
|
+
/** Display label */
|
|
6
|
+
label: ReactNode;
|
|
7
|
+
/** Whether the option is disabled */
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface SegmentProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
|
|
11
|
+
/** CSS class prefix for customization */
|
|
12
|
+
prefixCls?: string;
|
|
13
|
+
/** Current selected value (controlled mode) */
|
|
14
|
+
value?: string;
|
|
15
|
+
/** Default selected value (uncontrolled mode) */
|
|
16
|
+
defaultValue?: string;
|
|
17
|
+
/** Segment options */
|
|
18
|
+
items: SegmentItem[];
|
|
19
|
+
/** Whether to animate the indicator transition (default: true) */
|
|
20
|
+
animated?: boolean;
|
|
21
|
+
/** Callback when selection changes */
|
|
22
|
+
onChange?: (value: string) => void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcG9uZW50cy9TZWdtZW50L2ludGVyZmFjZS5qcyIsIm5hbWVzIjpbXSwic291cmNlUm9vdCI6Ii4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYyIsInNvdXJjZXMiOlsiY29tcG9uZW50cy9TZWdtZW50L2ludGVyZmFjZS5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQge307Il0sIm1hcHBpbmdzIjoiQUFBQSIsImlnbm9yZUxpc3QiOltdfQ==
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.om-react-ui-segment{display:inline-flex}.om-react-ui-segment-track{position:relative;display:inline-flex;gap:var(--om-spacing-100,4px);align-items:center;padding:var(--om-spacing-100,4px);background-color:var(--om-bg-neutral-tertiary,#f0f0f0);border-radius:var(--om-radius-full,9999px)}.om-react-ui-segment-indicator{position:absolute;top:var(--om-spacing-100,4px);bottom:var(--om-spacing-100,4px);left:0;z-index:0;background-color:var(--om-bg-neutral,#131313);border-radius:var(--om-radius-full,9999px);transition:transform .3s cubic-bezier(.645,.045,.355,1),width .3s cubic-bezier(.645,.045,.355,1)}.om-react-ui-segment-item{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;height:calc(var(--om-spacing-800, 32px) + var(--om-spacing-100, 4px));padding:var(--om-spacing-200,8px) var(--om-spacing-400,16px);color:var(--om-text-default-tertiary,#646465);background:none;border:none;border-radius:var(--om-radius-full,9999px);outline:none;cursor:pointer;transition:color .2s ease;font-size:var(--om-label-lg-font-size);font-family:var(--om-label-lg-font-family);line-height:var(--om-label-lg-line-height);letter-spacing:var(--om-label-lg-letter-spacing);font-weight:var(--om-label-lg-font-weight)}.om-react-ui-segment-item:hover:not(.om-react-ui-segment-item-disabled):not(.om-react-ui-segment-item-active){color:var(--om-text-default,#131313)}.om-react-ui-segment-item-active{color:var(--om-text-on-neutral,#fff)}.om-react-ui-segment-item-disabled{color:var(--om-text-disabled,#bbbdc1);cursor:not-allowed}.om-react-ui-segment-item-label{white-space:nowrap}
|