taro-uno-ui 0.9.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -0
- package/dist/app.config.d.ts +38 -0
- package/dist/app.d.ts +6 -0
- package/dist/components/basic/Button/Button.d.ts +6 -0
- package/dist/components/basic/Button/Button.styles.d.ts +2 -0
- package/dist/components/basic/Button/Button.types.d.ts +74 -0
- package/dist/components/basic/Button/index.d.ts +4 -0
- package/dist/components/basic/Divider/Divider.d.ts +6 -0
- package/dist/components/basic/Divider/Divider.styles.d.ts +87 -0
- package/dist/components/basic/Divider/Divider.types.d.ts +242 -0
- package/dist/components/basic/Divider/index.d.ts +6 -0
- package/dist/components/basic/Icon/Icon.d.ts +5 -0
- package/dist/components/basic/Icon/Icon.data.d.ts +29 -0
- package/dist/components/basic/Icon/Icon.styles.d.ts +61 -0
- package/dist/components/basic/Icon/Icon.types.d.ts +199 -0
- package/dist/components/basic/Icon/IconManager.d.ts +120 -0
- package/dist/components/basic/Icon/index.d.ts +6 -0
- package/dist/components/basic/Text/Text.d.ts +7 -0
- package/dist/components/basic/Text/Text.styles.d.ts +67 -0
- package/dist/components/basic/Text/Text.types.d.ts +274 -0
- package/dist/components/basic/Text/index.d.ts +5 -0
- package/dist/components/basic/Typography/Typography.d.ts +8 -0
- package/dist/components/basic/Typography/Typography.styles.d.ts +83 -0
- package/dist/components/basic/Typography/Typography.types.d.ts +245 -0
- package/dist/components/basic/Typography/index.d.ts +3 -0
- package/dist/components/basic/Video/Video.d.ts +7 -0
- package/dist/components/basic/Video/Video.styles.d.ts +212 -0
- package/dist/components/basic/Video/Video.types.d.ts +447 -0
- package/dist/components/basic/Video/index.d.ts +10 -0
- package/dist/components/basic/index.d.ts +217 -0
- package/dist/components/common/ErrorBoundary.d.ts +19 -0
- package/dist/components/common/LazyComponent.d.ts +78 -0
- package/dist/components/common/ResponsiveContainer.d.ts +23 -0
- package/dist/components/common/ResponsiveGrid.d.ts +44 -0
- package/dist/components/common/SecurityProvider.d.ts +15 -0
- package/dist/components/common/ThemeProvider.d.ts +17 -0
- package/dist/components/common/VirtualList.d.ts +89 -0
- package/dist/components/common/index.d.ts +17 -0
- package/dist/components/display/Avatar/Avatar.d.ts +3 -0
- package/dist/components/display/Avatar/Avatar.styles.d.ts +2 -0
- package/dist/components/display/Avatar/Avatar.types.d.ts +37 -0
- package/dist/components/display/Avatar/index.d.ts +3 -0
- package/dist/components/display/Badge/Badge.d.ts +3 -0
- package/dist/components/display/Badge/Badge.types.d.ts +27 -0
- package/dist/components/display/Badge/index.d.ts +2 -0
- package/dist/components/display/Calendar/Calendar.d.ts +5 -0
- package/dist/components/display/Calendar/Calendar.styles.d.ts +2 -0
- package/dist/components/display/Calendar/Calendar.types.d.ts +87 -0
- package/dist/components/display/Calendar/index.d.ts +3 -0
- package/dist/components/display/Card/Card.d.ts +3 -0
- package/dist/components/display/Card/Card.styles.d.ts +1 -0
- package/dist/components/display/Card/Card.types.d.ts +52 -0
- package/dist/components/display/Card/index.d.ts +3 -0
- package/dist/components/display/Carousel/Carousel.d.ts +5 -0
- package/dist/components/display/Carousel/Carousel.styles.d.ts +2 -0
- package/dist/components/display/Carousel/Carousel.types.d.ts +55 -0
- package/dist/components/display/Carousel/index.d.ts +3 -0
- package/dist/components/display/List/List.d.ts +4 -0
- package/dist/components/display/List/List.styles.d.ts +1 -0
- package/dist/components/display/List/List.types.d.ts +64 -0
- package/dist/components/display/List/index.d.ts +3 -0
- package/dist/components/display/Rate/Rate.d.ts +6 -0
- package/dist/components/display/Rate/Rate.styles.d.ts +100 -0
- package/dist/components/display/Rate/Rate.types.d.ts +105 -0
- package/dist/components/display/Rate/index.d.ts +17 -0
- package/dist/components/display/Table/Table.d.ts +7 -0
- package/dist/components/display/Table/Table.styles.d.ts +84 -0
- package/dist/components/display/Table/Table.types.d.ts +251 -0
- package/dist/components/display/Table/index.d.ts +4 -0
- package/dist/components/display/Tag/Tag.d.ts +5 -0
- package/dist/components/display/Tag/Tag.styles.d.ts +2 -0
- package/dist/components/display/Tag/Tag.types.d.ts +47 -0
- package/dist/components/display/Tag/index.d.ts +3 -0
- package/dist/components/display/Timeline/Timeline.d.ts +16 -0
- package/dist/components/display/Timeline/Timeline.styles.d.ts +2 -0
- package/dist/components/display/Timeline/Timeline.types.d.ts +53 -0
- package/dist/components/display/Timeline/index.d.ts +3 -0
- package/dist/components/display/index.d.ts +67 -0
- package/dist/components/feedback/Loading/Loading.d.ts +4 -0
- package/dist/components/feedback/Loading/Loading.styles.d.ts +2 -0
- package/dist/components/feedback/Loading/Loading.types.d.ts +29 -0
- package/dist/components/feedback/Loading/index.d.ts +4 -0
- package/dist/components/feedback/Message/Message.d.ts +4 -0
- package/dist/components/feedback/Message/Message.styles.d.ts +34 -0
- package/dist/components/feedback/Message/Message.types.d.ts +33 -0
- package/dist/components/feedback/Message/index.d.ts +4 -0
- package/dist/components/feedback/Modal/Modal.d.ts +8 -0
- package/dist/components/feedback/Modal/Modal.styles.d.ts +18 -0
- package/dist/components/feedback/Modal/Modal.types.d.ts +143 -0
- package/dist/components/feedback/Modal/index.d.ts +3 -0
- package/dist/components/feedback/Notification/Notification.d.ts +4 -0
- package/dist/components/feedback/Notification/Notification.styles.d.ts +88 -0
- package/dist/components/feedback/Notification/Notification.types.d.ts +279 -0
- package/dist/components/feedback/Notification/NotificationManager.d.ts +4 -0
- package/dist/components/feedback/Notification/index.d.ts +25 -0
- package/dist/components/feedback/Progress/Progress.d.ts +4 -0
- package/dist/components/feedback/Progress/Progress.styles.d.ts +261 -0
- package/dist/components/feedback/Progress/Progress.test.simple.d.ts +2 -0
- package/dist/components/feedback/Progress/Progress.types.d.ts +147 -0
- package/dist/components/feedback/Progress/index.d.ts +3 -0
- package/dist/components/feedback/Progress/utils/animation.d.ts +55 -0
- package/dist/components/feedback/Progress/utils/index.d.ts +2 -0
- package/dist/components/feedback/Progress/utils/progress-calculator.d.ts +75 -0
- package/dist/components/feedback/Result/Result.d.ts +7 -0
- package/dist/components/feedback/Result/Result.styles.d.ts +2 -0
- package/dist/components/feedback/Result/Result.types.d.ts +66 -0
- package/dist/components/feedback/Result/index.d.ts +3 -0
- package/dist/components/feedback/Toast/Toast.d.ts +7 -0
- package/dist/components/feedback/Toast/Toast.styles.d.ts +14 -0
- package/dist/components/feedback/Toast/Toast.types.d.ts +81 -0
- package/dist/components/feedback/Toast/index.d.ts +3 -0
- package/dist/components/feedback/Tooltip/Tooltip.d.ts +4 -0
- package/dist/components/feedback/Tooltip/Tooltip.examples.d.ts +6 -0
- package/dist/components/feedback/Tooltip/Tooltip.styles.d.ts +78 -0
- package/dist/components/feedback/Tooltip/Tooltip.types.d.ts +130 -0
- package/dist/components/feedback/Tooltip/index.d.ts +3 -0
- package/dist/components/feedback/index.d.ts +71 -0
- package/dist/components/form/Cascader/Cascader.d.ts +7 -0
- package/dist/components/form/Cascader/Cascader.styles.d.ts +107 -0
- package/dist/components/form/Cascader/Cascader.types.d.ts +418 -0
- package/dist/components/form/Cascader/hooks/index.d.ts +3 -0
- package/dist/components/form/Cascader/hooks/useCascaderFieldNames.d.ts +12 -0
- package/dist/components/form/Cascader/hooks/useCascaderOptions.d.ts +15 -0
- package/dist/components/form/Cascader/hooks/useCascaderState.d.ts +23 -0
- package/dist/components/form/Cascader/index.d.ts +6 -0
- package/dist/components/form/Cascader/utils/formatDisplayValue.d.ts +9 -0
- package/dist/components/form/Cascader/utils/index.d.ts +1 -0
- package/dist/components/form/Checkbox/Checkbox.d.ts +6 -0
- package/dist/components/form/Checkbox/Checkbox.styles.d.ts +111 -0
- package/dist/components/form/Checkbox/Checkbox.types.d.ts +473 -0
- package/dist/components/form/Checkbox/CheckboxGroup.d.ts +6 -0
- package/dist/components/form/Checkbox/index.d.ts +8 -0
- package/dist/components/form/DatePicker/DatePicker.d.ts +6 -0
- package/dist/components/form/DatePicker/DatePicker.styles.d.ts +99 -0
- package/dist/components/form/DatePicker/DatePicker.types.d.ts +236 -0
- package/dist/components/form/DatePicker/index.d.ts +3 -0
- package/dist/components/form/Form/Form.d.ts +8 -0
- package/dist/components/form/Form/Form.styles.d.ts +84 -0
- package/dist/components/form/Form/Form.types.d.ts +416 -0
- package/dist/components/form/Form/index.d.ts +9 -0
- package/dist/components/form/Form/useFormLogic.d.ts +22 -0
- package/dist/components/form/Input/Input.d.ts +6 -0
- package/dist/components/form/Input/Input.styles.d.ts +61 -0
- package/dist/components/form/Input/Input.types.d.ts +294 -0
- package/dist/components/form/Input/index.d.ts +8 -0
- package/dist/components/form/Input/useInputLogic.d.ts +35 -0
- package/dist/components/form/InputNumber/InputNumber.d.ts +6 -0
- package/dist/components/form/InputNumber/InputNumber.styles.d.ts +120 -0
- package/dist/components/form/InputNumber/InputNumber.types.d.ts +303 -0
- package/dist/components/form/InputNumber/components/InputNumberClearButton.d.ts +10 -0
- package/dist/components/form/InputNumber/components/InputNumberControls.d.ts +11 -0
- package/dist/components/form/InputNumber/components/index.d.ts +2 -0
- package/dist/components/form/InputNumber/hooks/index.d.ts +4 -0
- package/dist/components/form/InputNumber/hooks/useInputNumberState.d.ts +38 -0
- package/dist/components/form/InputNumber/hooks/useInputNumberValidation.d.ts +12 -0
- package/dist/components/form/InputNumber/index.d.ts +5 -0
- package/dist/components/form/Radio/Radio.d.ts +6 -0
- package/dist/components/form/Radio/Radio.styles.d.ts +80 -0
- package/dist/components/form/Radio/Radio.types.d.ts +415 -0
- package/dist/components/form/Radio/index.d.ts +8 -0
- package/dist/components/form/Select/Select.d.ts +6 -0
- package/dist/components/form/Select/Select.styles.d.ts +71 -0
- package/dist/components/form/Select/Select.types.d.ts +418 -0
- package/dist/components/form/Select/index.d.ts +8 -0
- package/dist/components/form/Slider/Slider.d.ts +7 -0
- package/dist/components/form/Slider/Slider.styles.d.ts +2 -0
- package/dist/components/form/Slider/Slider.types.d.ts +85 -0
- package/dist/components/form/Slider/index.d.ts +3 -0
- package/dist/components/form/Switch/Switch.d.ts +10 -0
- package/dist/components/form/Switch/Switch.styles.d.ts +154 -0
- package/dist/components/form/Switch/Switch.types.d.ts +351 -0
- package/dist/components/form/Switch/index.d.ts +7 -0
- package/dist/components/form/Textarea/Textarea.d.ts +6 -0
- package/dist/components/form/Textarea/Textarea.styles.d.ts +66 -0
- package/dist/components/form/Textarea/Textarea.types.d.ts +348 -0
- package/dist/components/form/Textarea/index.d.ts +7 -0
- package/dist/components/form/TimePicker/TimePicker.d.ts +6 -0
- package/dist/components/form/TimePicker/TimePicker.styles.d.ts +104 -0
- package/dist/components/form/TimePicker/TimePicker.types.d.ts +385 -0
- package/dist/components/form/TimePicker/index.d.ts +4 -0
- package/dist/components/form/Transfer/Transfer.d.ts +7 -0
- package/dist/components/form/Transfer/Transfer.styles.d.ts +106 -0
- package/dist/components/form/Transfer/Transfer.types.d.ts +384 -0
- package/dist/components/form/Transfer/components/TransferItem.d.ts +23 -0
- package/dist/components/form/Transfer/components/TransferList.d.ts +55 -0
- package/dist/components/form/Transfer/components/TransferOperations.d.ts +21 -0
- package/dist/components/form/Transfer/components/TransferPagination.d.ts +19 -0
- package/dist/components/form/Transfer/components/TransferSearch.d.ts +21 -0
- package/dist/components/form/Transfer/components/index.d.ts +6 -0
- package/dist/components/form/Transfer/hooks/index.d.ts +3 -0
- package/dist/components/form/Transfer/hooks/useTransferData.d.ts +41 -0
- package/dist/components/form/Transfer/hooks/useTransferState.d.ts +21 -0
- package/dist/components/form/Transfer/index.d.ts +9 -0
- package/dist/components/form/Upload/Upload.d.ts +7 -0
- package/dist/components/form/Upload/Upload.styles.d.ts +2 -0
- package/dist/components/form/Upload/Upload.types.d.ts +143 -0
- package/dist/components/form/Upload/index.d.ts +3 -0
- package/dist/components/form/index.d.ts +126 -0
- package/dist/components/index.d.ts +122 -0
- package/dist/components/layout/Affix/Affix.d.ts +4 -0
- package/dist/components/layout/Affix/Affix.styles.d.ts +1669 -0
- package/dist/components/layout/Affix/Affix.types.d.ts +25 -0
- package/dist/components/layout/Affix/index.d.ts +3 -0
- package/dist/components/layout/Col/Col.d.ts +6 -0
- package/dist/components/layout/Col/Col.styles.d.ts +52 -0
- package/dist/components/layout/Col/Col.types.d.ts +54 -0
- package/dist/components/layout/Col/index.d.ts +3 -0
- package/dist/components/layout/Container/Container.d.ts +6 -0
- package/dist/components/layout/Container/Container.styles.d.ts +41 -0
- package/dist/components/layout/Container/Container.types.d.ts +59 -0
- package/dist/components/layout/Container/index.d.ts +3 -0
- package/dist/components/layout/Grid/Grid.d.ts +6 -0
- package/dist/components/layout/Grid/Grid.styles.d.ts +60 -0
- package/dist/components/layout/Grid/Grid.types.d.ts +68 -0
- package/dist/components/layout/Grid/index.d.ts +3 -0
- package/dist/components/layout/Layout/Content.d.ts +4 -0
- package/dist/components/layout/Layout/Footer.d.ts +4 -0
- package/dist/components/layout/Layout/Header.d.ts +4 -0
- package/dist/components/layout/Layout/Layout.d.ts +4 -0
- package/dist/components/layout/Layout/Layout.styles.d.ts +3366 -0
- package/dist/components/layout/Layout/Layout.types.d.ts +48 -0
- package/dist/components/layout/Layout/Sider.d.ts +4 -0
- package/dist/components/layout/Layout/index.d.ts +8 -0
- package/dist/components/layout/Row/Row.d.ts +6 -0
- package/dist/components/layout/Row/Row.styles.d.ts +55 -0
- package/dist/components/layout/Row/Row.types.d.ts +51 -0
- package/dist/components/layout/Row/index.d.ts +3 -0
- package/dist/components/layout/Space/Space.d.ts +6 -0
- package/dist/components/layout/Space/Space.styles.d.ts +69 -0
- package/dist/components/layout/Space/Space.types.d.ts +84 -0
- package/dist/components/layout/Space/index.d.ts +3 -0
- package/dist/components/layout/index.d.ts +39 -0
- package/dist/components/navigation/Menu/Menu.constants.d.ts +59 -0
- package/dist/components/navigation/Menu/Menu.d.ts +10 -0
- package/dist/components/navigation/Menu/Menu.stories.d.ts +157 -0
- package/dist/components/navigation/Menu/Menu.styles.d.ts +143 -0
- package/dist/components/navigation/Menu/Menu.types.d.ts +210 -0
- package/dist/components/navigation/Menu/Menu.utils.d.ts +54 -0
- package/dist/components/navigation/Menu/MenuItem.d.ts +32 -0
- package/dist/components/navigation/Menu/SubMenu.d.ts +41 -0
- package/dist/components/navigation/Menu/index.d.ts +54 -0
- package/dist/components/navigation/NavBar/NavBar.d.ts +7 -0
- package/dist/components/navigation/NavBar/NavBar.styles.d.ts +114 -0
- package/dist/components/navigation/NavBar/NavBar.types.d.ts +50 -0
- package/dist/components/navigation/NavBar/index.d.ts +3 -0
- package/dist/components/navigation/Pagination/Pagination.d.ts +6 -0
- package/dist/components/navigation/Pagination/Pagination.styles.d.ts +55 -0
- package/dist/components/navigation/Pagination/Pagination.types.d.ts +77 -0
- package/dist/components/navigation/Pagination/index.d.ts +15 -0
- package/dist/components/navigation/Steps/Step.d.ts +4 -0
- package/dist/components/navigation/Steps/Steps.d.ts +4 -0
- package/dist/components/navigation/Steps/Steps.styles.d.ts +6716 -0
- package/dist/components/navigation/Steps/Steps.types.d.ts +41 -0
- package/dist/components/navigation/Steps/index.d.ts +3 -0
- package/dist/components/navigation/Tabs/Tabs.d.ts +6 -0
- package/dist/components/navigation/Tabs/Tabs.styles.d.ts +60 -0
- package/dist/components/navigation/Tabs/Tabs.types.d.ts +107 -0
- package/dist/components/navigation/Tabs/index.d.ts +3 -0
- package/dist/components/navigation/index.d.ts +35 -0
- package/dist/constants/index.d.ts +624 -0
- package/dist/hooks/index.d.ts +28 -0
- package/dist/hooks/types.d.ts +7 -0
- package/dist/hooks/useAsync.d.ts +17 -0
- package/dist/hooks/useClickOutside.d.ts +19 -0
- package/dist/hooks/useCounter.d.ts +36 -0
- package/dist/hooks/useDebounce.d.ts +31 -0
- package/dist/hooks/useDeepCompareEffect.d.ts +22 -0
- package/dist/hooks/useEventHandling.d.ts +81 -0
- package/dist/hooks/useEventListener.d.ts +19 -0
- package/dist/hooks/useLifecycle.d.ts +66 -0
- package/dist/hooks/useMediaQuery.d.ts +22 -0
- package/dist/hooks/useMutation.d.ts +47 -0
- package/dist/hooks/usePerformance.d.ts +73 -0
- package/dist/hooks/usePerformanceMonitor.d.ts +66 -0
- package/dist/hooks/usePlatform.d.ts +20 -0
- package/dist/hooks/usePrevious.d.ts +14 -0
- package/dist/hooks/useRequest.d.ts +32 -0
- package/dist/hooks/useStateManagement.d.ts +62 -0
- package/dist/hooks/useStorage.d.ts +27 -0
- package/dist/hooks/useStyle.d.ts +127 -0
- package/dist/hooks/useTheme.d.ts +58 -0
- package/dist/hooks/useToggle.d.ts +28 -0
- package/dist/hooks/useVirtualScroll.d.ts +42 -0
- package/dist/index.d.ts +271 -0
- package/dist/js/{index-DffLRSro.js → index-CDFsvu80.js} +15369 -10741
- package/dist/js/index-CDFsvu80.js.map +1 -0
- package/dist/js/index-DFdcksbe.js.map +1 -1
- package/dist/js/index-DXRIkWX1.js.map +1 -1
- package/dist/js/{index-6NJ3A1Dn.js → index-JffnTUrv.js} +15430 -10801
- package/dist/js/index-JffnTUrv.js.map +1 -0
- package/dist/platform/index.d.ts +172 -0
- package/dist/providers/AppProvider.d.ts +34 -0
- package/dist/providers/index.d.ts +1 -0
- package/dist/theme/ThemeProvider.d.ts +34 -0
- package/dist/theme/ThemeProvider.types.d.ts +21 -0
- package/dist/theme/animations.d.ts +96 -0
- package/dist/theme/defaults.d.ts +6 -0
- package/dist/theme/design-system.d.ts +400 -0
- package/dist/theme/design-tokens.d.ts +459 -0
- package/dist/theme/index.d.ts +187 -0
- package/dist/theme/responsive.d.ts +63 -0
- package/dist/theme/styles.d.ts +65 -0
- package/dist/theme/tokens/colors.d.ts +72 -0
- package/dist/theme/tokens/effects.d.ts +122 -0
- package/dist/theme/tokens/index.d.ts +94 -0
- package/dist/theme/tokens/spacing.d.ts +65 -0
- package/dist/theme/tokens/typography.d.ts +73 -0
- package/dist/theme/types.d.ts +153 -0
- package/dist/theme/useThemeUtils.d.ts +21 -0
- package/dist/theme/utils.d.ts +255 -0
- package/dist/theme/variables.d.ts +170 -0
- package/dist/types/accessibility.d.ts +46 -0
- package/dist/types/button.d.ts +285 -0
- package/dist/types/component-props.d.ts +109 -0
- package/dist/types/index.d.ts +343 -0
- package/dist/types/standardized-components.d.ts +263 -0
- package/dist/types/utils.d.ts +190 -0
- package/dist/utils/abort-controller.d.ts +19 -0
- package/dist/utils/cache.d.ts +28 -0
- package/dist/utils/createNamespace.d.ts +9 -0
- package/dist/utils/environment.d.ts +26 -0
- package/dist/utils/error-handler.d.ts +37 -0
- package/dist/utils/errorLogger.d.ts +72 -0
- package/dist/utils/formatUtils.d.ts +93 -0
- package/dist/utils/http/error-codes.d.ts +131 -0
- package/dist/utils/http/http-client.d.ts +53 -0
- package/dist/utils/http/request-cache.d.ts +65 -0
- package/dist/utils/http/request.d.ts +280 -0
- package/dist/utils/http/taro-adapter.d.ts +4 -0
- package/dist/utils/http/types.d.ts +351 -0
- package/dist/utils/http/web-adapter.d.ts +4 -0
- package/dist/utils/index.d.ts +46 -0
- package/dist/utils/inputValidator.d.ts +74 -0
- package/dist/utils/performance/performance.d.ts +167 -0
- package/dist/utils/responsiveUtils.d.ts +148 -0
- package/dist/utils/rtl-support.d.ts +78 -0
- package/dist/utils/security/api-security.d.ts +82 -0
- package/dist/utils/security/xss-protection.d.ts +20 -0
- package/dist/utils/securityHeaders.d.ts +74 -0
- package/dist/utils/typeHelpers.d.ts +1 -0
- package/dist/utils/types/dataProcessing.d.ts +111 -0
- package/dist/utils/types/typeHelpers.d.ts +50 -0
- package/dist/utils/xssProtection.d.ts +90 -0
- package/package.json +14 -10
- package/src/components/basic/Button/Button.tsx +53 -13
- package/src/components/basic/Button/Button.types.ts +45 -9
- package/src/components/basic/Divider/Divider.tsx +60 -29
- package/src/components/basic/Icon/Icon.data.ts +474 -0
- package/src/components/basic/Icon/Icon.test.tsx +2 -2
- package/src/components/basic/Icon/Icon.tsx +48 -35
- package/src/components/basic/Icon/IconManager.ts +229 -0
- package/src/components/basic/Text/Text.styles.ts +3 -3
- package/src/components/basic/Text/Text.types.ts +14 -4
- package/src/components/basic/Typography/Typography.styles.ts +10 -9
- package/src/components/basic/Typography/Typography.tsx +15 -13
- package/src/components/basic/Typography/Typography.types.ts +41 -41
- package/src/components/basic/Typography/index.tsx +1 -1
- package/src/components/basic/Video/Video.styles.ts +777 -0
- package/src/components/basic/Video/Video.test.tsx +490 -0
- package/src/components/basic/Video/Video.tsx +1468 -0
- package/src/components/basic/Video/Video.types.ts +500 -0
- package/src/components/basic/Video/index.tsx +26 -0
- package/src/components/basic/index.tsx +13 -15
- package/src/components/common/ErrorBoundary.tsx +1 -1
- package/src/components/common/LazyComponent.tsx +9 -8
- package/src/components/common/SecurityProvider.tsx +2 -14
- package/src/components/common/ThemeProvider.tsx +43 -56
- package/src/components/common/VirtualList.tsx +187 -205
- package/src/components/common/index.tsx +25 -0
- package/src/components/display/Avatar/Avatar.styles.ts +1 -1
- package/src/components/display/Avatar/Avatar.tsx +6 -19
- package/src/components/display/Avatar/Avatar.types.ts +1 -1
- package/src/components/display/Avatar/index.ts +1 -1
- package/src/components/display/Badge/Badge.tsx +3 -16
- package/src/components/display/Badge/Badge.types.ts +1 -1
- package/src/components/display/Badge/index.ts +1 -1
- package/src/components/display/Calendar/Calendar.styles.ts +36 -36
- package/src/components/display/Calendar/Calendar.test.tsx +27 -15
- package/src/components/display/Calendar/Calendar.tsx +56 -35
- package/src/components/display/Calendar/Calendar.types.ts +1 -1
- package/src/components/display/Calendar/index.ts +1 -1
- package/src/components/display/Card/Card.styles.ts +2 -2
- package/src/components/display/Card/Card.test.tsx +6 -4
- package/src/components/display/Card/Card.tsx +1 -1
- package/src/components/display/Card/Card.types.ts +4 -4
- package/src/components/display/Card/index.ts +1 -1
- package/src/components/display/Carousel/Carousel.styles.ts +31 -31
- package/src/components/display/Carousel/Carousel.tsx +34 -39
- package/src/components/display/Carousel/Carousel.types.ts +1 -1
- package/src/components/display/Carousel/index.ts +1 -1
- package/src/components/display/List/List.styles.ts +3 -3
- package/src/components/display/List/List.tsx +0 -1
- package/src/components/display/List/index.ts +1 -1
- package/src/components/display/Rate/Rate.styles.ts +5 -17
- package/src/components/display/Rate/Rate.tsx +6 -14
- package/src/components/display/Rate/Rate.types.ts +4 -3
- package/src/components/display/Rate/index.ts +3 -11
- package/src/components/display/Table/Table.test.tsx +2 -0
- package/src/components/display/Table/Table.tsx +3 -7
- package/src/components/display/Table/Table.types.ts +3 -2
- package/src/components/display/Tag/Tag.styles.ts +31 -31
- package/src/components/display/Tag/Tag.tsx +9 -26
- package/src/components/display/Tag/Tag.types.ts +1 -1
- package/src/components/display/Tag/index.ts +1 -1
- package/src/components/display/Timeline/Timeline.styles.ts +32 -32
- package/src/components/display/Timeline/Timeline.tsx +23 -42
- package/src/components/display/Timeline/Timeline.types.ts +1 -1
- package/src/components/display/Timeline/index.ts +1 -1
- package/src/components/display/index.tsx +33 -29
- package/src/components/feedback/Loading/Loading.tsx +6 -1
- package/src/components/feedback/Loading/index.ts +2 -5
- package/src/components/feedback/Message/Message.styles.ts +3 -3
- package/src/components/feedback/Message/index.ts +2 -5
- package/src/components/feedback/Modal/Modal.styles.ts +1 -1
- package/src/components/feedback/Modal/Modal.tsx +9 -31
- package/src/components/feedback/Modal/Modal.types.ts +12 -2
- package/src/components/feedback/Notification/Notification.styles.ts +49 -39
- package/src/components/feedback/Notification/Notification.test.tsx +1 -1
- package/src/components/feedback/Notification/Notification.tsx +97 -120
- package/src/components/feedback/Notification/Notification.types.ts +11 -8
- package/src/components/feedback/Notification/NotificationManager.tsx +135 -106
- package/src/components/feedback/Notification/index.ts +10 -3
- package/src/components/feedback/Notification/index.tsx +16 -26
- package/src/components/feedback/Progress/Progress.styles.ts +23 -14
- package/src/components/feedback/Progress/Progress.tsx +93 -113
- package/src/components/feedback/Progress/Progress.types.ts +1 -1
- package/src/components/feedback/Progress/index.ts +1 -1
- package/src/components/feedback/Progress/utils/animation.ts +12 -23
- package/src/components/feedback/Progress/utils/index.ts +2 -2
- package/src/components/feedback/Progress/utils/progress-calculator.ts +14 -32
- package/src/components/feedback/Result/Result.styles.ts +29 -29
- package/src/components/feedback/Result/Result.tsx +8 -20
- package/src/components/feedback/Result/Result.types.ts +7 -7
- package/src/components/feedback/Result/index.tsx +1 -1
- package/src/components/feedback/Toast/Toast.styles.ts +1 -1
- package/src/components/feedback/Toast/Toast.tsx +25 -13
- package/src/components/feedback/Tooltip/Tooltip.examples.tsx +21 -44
- package/src/components/feedback/Tooltip/Tooltip.styles.ts +16 -22
- package/src/components/feedback/Tooltip/Tooltip.test.tsx +1 -1
- package/src/components/feedback/Tooltip/Tooltip.tsx +65 -46
- package/src/components/feedback/Tooltip/Tooltip.types.ts +14 -20
- package/src/components/feedback/Tooltip/index.ts +1 -1
- package/src/components/feedback/Tooltip/index.tsx +12 -24
- package/src/components/feedback/index.tsx +54 -42
- package/src/components/form/Cascader/Cascader.styles.ts +2 -2
- package/src/components/form/Cascader/Cascader.tsx +84 -88
- package/src/components/form/Cascader/Cascader.types.ts +49 -50
- package/src/components/form/Cascader/hooks/useCascaderFieldNames.ts +11 -8
- package/src/components/form/Cascader/hooks/useCascaderOptions.ts +73 -55
- package/src/components/form/Cascader/hooks/useCascaderState.ts +31 -25
- package/src/components/form/Cascader/index.ts +1 -1
- package/src/components/form/Cascader/utils/formatDisplayValue.ts +4 -4
- package/src/components/form/Checkbox/Checkbox.styles.ts +83 -84
- package/src/components/form/Checkbox/Checkbox.tsx +2 -9
- package/src/components/form/Checkbox/CheckboxGroup.tsx +7 -7
- package/src/components/form/DatePicker/DatePicker.test.tsx +1 -1
- package/src/components/form/DatePicker/DatePicker.tsx +91 -75
- package/src/components/form/DatePicker/DatePicker.types.ts +4 -1
- package/src/components/form/Form/Form.tsx +66 -504
- package/src/components/form/Form/Form.types.ts +16 -1
- package/src/components/form/Form/useFormLogic.ts +497 -0
- package/src/components/form/Input/Input.styles.ts +8 -1
- package/src/components/form/Input/Input.tsx +55 -291
- package/src/components/form/Input/Input.types.ts +13 -1
- package/src/components/form/Input/useInputLogic.test.ts +82 -0
- package/src/components/form/Input/useInputLogic.ts +260 -0
- package/src/components/form/InputNumber/InputNumber.styles.ts +76 -25
- package/src/components/form/InputNumber/InputNumber.tsx +53 -21
- package/src/components/form/InputNumber/InputNumber.types.ts +21 -3
- package/src/components/form/InputNumber/components/InputNumberClearButton.tsx +3 -11
- package/src/components/form/InputNumber/components/InputNumberControls.tsx +3 -12
- package/src/components/form/InputNumber/hooks/index.ts +1 -1
- package/src/components/form/InputNumber/hooks/useInputNumberState.ts +7 -9
- package/src/components/form/InputNumber/hooks/useInputNumberValidation.ts +18 -17
- package/src/components/form/InputNumber/index.ts +7 -7
- package/src/components/form/Radio/Radio.styles.ts +1 -8
- package/src/components/form/Radio/Radio.tsx +3 -9
- package/src/components/form/Radio/Radio.types.ts +5 -1
- package/src/components/form/Select/Select.styles.ts +5 -1
- package/src/components/form/Select/Select.tsx +15 -15
- package/src/components/form/Select/Select.types.ts +2 -1
- package/src/components/form/Slider/Slider.styles.ts +13 -13
- package/src/components/form/Slider/Slider.tsx +19 -33
- package/src/components/form/Slider/Slider.types.ts +14 -12
- package/src/components/form/Slider/index.tsx +2 -9
- package/src/components/form/Switch/Switch.styles.ts +1 -7
- package/src/components/form/Switch/Switch.tsx +7 -13
- package/src/components/form/Textarea/Textarea.styles.ts +4 -4
- package/src/components/form/Textarea/Textarea.tsx +7 -1
- package/src/components/form/Textarea/Textarea.types.ts +4 -1
- package/src/components/form/TimePicker/TimePicker.styles.ts +8 -12
- package/src/components/form/TimePicker/TimePicker.tsx +122 -100
- package/src/components/form/TimePicker/TimePicker.types.ts +2 -2
- package/src/components/form/TimePicker/index.ts +1 -1
- package/src/components/form/Transfer/Transfer.styles.ts +3 -15
- package/src/components/form/Transfer/Transfer.tsx +146 -134
- package/src/components/form/Transfer/Transfer.types.ts +34 -26
- package/src/components/form/Transfer/components/TransferItem.tsx +55 -62
- package/src/components/form/Transfer/components/TransferList.tsx +212 -199
- package/src/components/form/Transfer/components/TransferOperations.tsx +52 -55
- package/src/components/form/Transfer/components/TransferPagination.tsx +115 -111
- package/src/components/form/Transfer/components/TransferSearch.tsx +52 -55
- package/src/components/form/Transfer/hooks/useTransferData.ts +91 -81
- package/src/components/form/Transfer/hooks/useTransferState.ts +22 -16
- package/src/components/form/Transfer/index.ts +2 -8
- package/src/components/form/Upload/Upload.styles.ts +21 -21
- package/src/components/form/Upload/Upload.tsx +189 -142
- package/src/components/form/Upload/Upload.types.ts +31 -31
- package/src/components/form/Upload/index.tsx +1 -1
- package/src/components/form/index.tsx +60 -29
- package/src/components/index.tsx +0 -1
- package/src/components/layout/Affix/Affix.styles.ts +16 -11
- package/src/components/layout/Affix/Affix.tsx +67 -75
- package/src/components/layout/Affix/Affix.types.ts +18 -18
- package/src/components/layout/Affix/index.tsx +1 -1
- package/src/components/layout/Col/Col.styles.ts +17 -17
- package/src/components/layout/Col/Col.test.tsx +7 -5
- package/src/components/layout/Col/Col.tsx +3 -21
- package/src/components/layout/Col/Col.types.ts +1 -1
- package/src/components/layout/Container/Container.styles.ts +3 -1
- package/src/components/layout/Container/Container.tsx +2 -11
- package/src/components/layout/Grid/Grid.tsx +3 -53
- package/src/components/layout/Layout/Content.tsx +24 -32
- package/src/components/layout/Layout/Footer.tsx +24 -32
- package/src/components/layout/Layout/Header.tsx +24 -32
- package/src/components/layout/Layout/Layout.styles.ts +17 -17
- package/src/components/layout/Layout/Layout.tsx +14 -25
- package/src/components/layout/Layout/Layout.types.ts +29 -29
- package/src/components/layout/Layout/Sider.tsx +44 -56
- package/src/components/layout/Layout/index.tsx +16 -2
- package/src/components/layout/Row/Row.tsx +15 -43
- package/src/components/layout/Space/Space.tsx +3 -11
- package/src/components/layout/Space/Space.types.ts +1 -1
- package/src/components/layout/index.tsx +29 -19
- package/src/components/navigation/Menu/Menu.constants.ts +69 -0
- package/src/components/navigation/Menu/Menu.stories.tsx +107 -0
- package/src/components/navigation/Menu/Menu.styles.ts +25 -37
- package/src/components/navigation/Menu/Menu.tsx +8 -11
- package/src/components/navigation/Menu/Menu.types.ts +2 -2
- package/src/components/navigation/Menu/Menu.utils.ts +17 -17
- package/src/components/navigation/Menu/MenuItem.tsx +9 -11
- package/src/components/navigation/Menu/SubMenu.tsx +8 -6
- package/src/components/navigation/Menu/index.tsx +4 -69
- package/src/components/navigation/NavBar/NavBar.styles.ts +1 -1
- package/src/components/navigation/NavBar/NavBar.tsx +7 -10
- package/src/components/navigation/NavBar/NavBar.types.ts +3 -3
- package/src/components/navigation/NavBar/index.tsx +1 -1
- package/src/components/navigation/Pagination/Pagination.test.tsx +2 -3
- package/src/components/navigation/Pagination/Pagination.tsx +3 -3
- package/src/components/navigation/Pagination/Pagination.types.ts +3 -2
- package/src/components/navigation/Pagination/index.ts +9 -3
- package/src/components/navigation/Steps/Step.tsx +24 -44
- package/src/components/navigation/Steps/Steps.styles.ts +28 -13
- package/src/components/navigation/Steps/Steps.test.tsx +2 -0
- package/src/components/navigation/Steps/Steps.tsx +88 -89
- package/src/components/navigation/Steps/Steps.types.ts +30 -30
- package/src/components/navigation/Steps/index.tsx +1 -1
- package/src/components/navigation/Tabs/Tabs.test.tsx +3 -2
- package/src/components/navigation/Tabs/Tabs.types.ts +4 -3
- package/src/components/navigation/index.tsx +21 -16
- package/src/constants/index.ts +1 -1
- package/src/hooks/index.ts +52 -102
- package/src/hooks/types.ts +4 -5
- package/src/hooks/useAsync.ts +46 -47
- package/src/hooks/useClickOutside.ts +52 -0
- package/src/hooks/useCounter.ts +87 -0
- package/src/hooks/useDebounce.ts +150 -0
- package/src/hooks/useDeepCompareEffect.ts +88 -0
- package/src/hooks/useEventListener.ts +77 -0
- package/src/hooks/useMediaQuery.ts +75 -0
- package/src/hooks/useMutation.ts +233 -0
- package/src/hooks/usePerformance.ts +1 -64
- package/src/hooks/usePlatform.ts +3 -1
- package/src/hooks/usePrevious.ts +25 -0
- package/src/hooks/useRequest.ts +12 -7
- package/src/hooks/useStateManagement.ts +1 -1
- package/src/hooks/useStorage.ts +169 -0
- package/src/hooks/useStyle.ts +8 -2
- package/src/hooks/useToggle.ts +54 -0
- package/src/index.ts +34 -9
- package/src/theme/ThemeProvider.tsx +3 -7
- package/src/theme/ThemeProvider.types.ts +1 -1
- package/src/theme/defaults.ts +1 -1
- package/src/theme/design-system.ts +2 -2
- package/src/theme/design-tokens.ts +85 -99
- package/src/theme/generated/dark-theme.scss +1 -1
- package/src/theme/generated/tokens.scss +82 -18
- package/src/theme/index.ts +8 -29
- package/src/theme/responsive.tsx +36 -34
- package/src/theme/styles.ts +1 -1
- package/src/theme/useThemeUtils.ts +43 -43
- package/src/theme/utils.ts +32 -32
- package/src/theme/variables.ts +70 -51
- package/src/types/accessibility.ts +36 -37
- package/src/types/button.ts +25 -27
- package/src/types/component-props.ts +6 -1
- package/src/types/glob.d.ts +4 -0
- package/src/types/index.ts +2 -2
- package/src/types/standardized-components.ts +9 -3
- package/src/types/utils.ts +13 -23
- package/src/utils/__tests__/responsiveUtils.test.ts +5 -4
- package/src/utils/abort-controller.ts +48 -0
- package/src/utils/cache.ts +2 -6
- package/src/utils/createNamespace.ts +4 -4
- package/src/utils/environment.ts +26 -6
- package/src/utils/error-handler.ts +2 -2
- package/src/utils/errorLogger.ts +16 -20
- package/src/utils/formatUtils.ts +38 -70
- package/src/utils/http/error-codes.ts +314 -0
- package/src/utils/http/http-client.test.ts +63 -0
- package/src/utils/{network → http}/http-client.ts +45 -35
- package/src/utils/http/request-cache.ts +127 -0
- package/src/utils/http/request.ts +954 -0
- package/src/utils/http/taro-adapter.test.ts +74 -0
- package/src/utils/http/taro-adapter.ts +24 -0
- package/src/utils/http/types.ts +414 -0
- package/src/utils/http/web-adapter.ts +33 -0
- package/src/utils/index.ts +5 -8
- package/src/utils/inputValidator.ts +17 -14
- package/src/utils/performance/performance.ts +60 -71
- package/src/utils/responsiveUtils.ts +7 -16
- package/src/utils/rtl-support.ts +29 -19
- package/src/utils/security/api-security.ts +47 -39
- package/src/utils/securityHeaders.ts +61 -67
- package/src/utils/typeHelpers.ts +10 -10
- package/src/utils/types/dataProcessing.ts +93 -92
- package/src/utils/types/typeHelpers.ts +31 -21
- package/src/utils/xssProtection.ts +96 -48
- package/dist/js/index-6NJ3A1Dn.js.map +0 -1
- package/dist/js/index-DffLRSro.js.map +0 -1
- package/src/components/form/Input/Input.enhanced.tsx +0 -732
- package/src/components/navigation/Menu/__tests__/Menu.test.tsx +0 -687
- package/src/components/navigation/Tree/Tree.styles.ts +0 -553
- package/src/components/navigation/Tree/Tree.test.basic.tsx +0 -7
- package/src/components/navigation/Tree/Tree.test.functional.tsx +0 -496
- package/src/components/navigation/Tree/Tree.test.import.check.tsx +0 -6
- package/src/components/navigation/Tree/Tree.test.import.tsx +0 -6
- package/src/components/navigation/Tree/Tree.test.minimal.tsx +0 -5
- package/src/components/navigation/Tree/Tree.test.simple.tsx +0 -30
- package/src/components/navigation/Tree/Tree.test.tsx +0 -908
- package/src/components/navigation/Tree/Tree.test.working.tsx +0 -673
- package/src/components/navigation/Tree/Tree.tsx +0 -600
- package/src/components/navigation/Tree/Tree.types.ts +0 -909
- package/src/components/navigation/Tree/Tree.utils.ts +0 -452
- package/src/components/navigation/Tree/index.ts +0 -33
- package/src/components/navigation/Tree/index.tsx +0 -23
- package/src/utils/network/http-client.test.ts +0 -18
package/src/theme/variables.ts
CHANGED
|
@@ -185,91 +185,110 @@ export class CSSVariableGenerator {
|
|
|
185
185
|
name: 'colors',
|
|
186
186
|
prefix: 'color',
|
|
187
187
|
variables: [
|
|
188
|
-
'primary',
|
|
189
|
-
'
|
|
190
|
-
'
|
|
191
|
-
'
|
|
192
|
-
'
|
|
193
|
-
'
|
|
188
|
+
'primary',
|
|
189
|
+
'primaryLight',
|
|
190
|
+
'primaryDark',
|
|
191
|
+
'secondary',
|
|
192
|
+
'success',
|
|
193
|
+
'warning',
|
|
194
|
+
'error',
|
|
195
|
+
'info',
|
|
196
|
+
'text',
|
|
197
|
+
'textSecondary',
|
|
198
|
+
'textDisabled',
|
|
199
|
+
'textInverse',
|
|
200
|
+
'background',
|
|
201
|
+
'backgroundCard',
|
|
202
|
+
'backgroundInput',
|
|
203
|
+
'backgroundMask',
|
|
204
|
+
'border',
|
|
205
|
+
'borderLight',
|
|
206
|
+
'borderFocus',
|
|
207
|
+
'shadow',
|
|
208
|
+
'shadowLight',
|
|
209
|
+
'brand',
|
|
210
|
+
'accent',
|
|
211
|
+
'link',
|
|
212
|
+
'divider',
|
|
194
213
|
],
|
|
195
214
|
inheritance: [
|
|
196
215
|
{
|
|
197
216
|
parent: 'primary',
|
|
198
217
|
child: 'primaryLight',
|
|
199
|
-
transform: (value) => this.lightenColor(value, 0.2)
|
|
218
|
+
transform: (value) => this.lightenColor(value, 0.2),
|
|
200
219
|
},
|
|
201
220
|
{
|
|
202
221
|
parent: 'primary',
|
|
203
222
|
child: 'primaryDark',
|
|
204
|
-
transform: (value) => this.darkenColor(value, 0.2)
|
|
205
|
-
}
|
|
206
|
-
]
|
|
223
|
+
transform: (value) => this.darkenColor(value, 0.2),
|
|
224
|
+
},
|
|
225
|
+
],
|
|
207
226
|
},
|
|
208
227
|
{
|
|
209
228
|
name: 'spacing',
|
|
210
229
|
prefix: 'spacing',
|
|
211
|
-
variables: ['xs', 'sm', 'md', 'lg', 'xl', 'xxl', 'padding', 'margin', 'gap']
|
|
230
|
+
variables: ['xs', 'sm', 'md', 'lg', 'xl', 'xxl', 'padding', 'margin', 'gap'],
|
|
212
231
|
},
|
|
213
232
|
{
|
|
214
233
|
name: 'typography',
|
|
215
234
|
prefix: 'font',
|
|
216
|
-
variables: ['family-sans', 'family-serif', 'family-mono', 'family-heading']
|
|
235
|
+
variables: ['family-sans', 'family-serif', 'family-mono', 'family-heading'],
|
|
217
236
|
},
|
|
218
237
|
{
|
|
219
238
|
name: 'fontSize',
|
|
220
239
|
prefix: 'text',
|
|
221
|
-
variables: ['xs', 'sm', 'base', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl']
|
|
240
|
+
variables: ['xs', 'sm', 'base', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl'],
|
|
222
241
|
},
|
|
223
242
|
{
|
|
224
243
|
name: 'fontWeight',
|
|
225
244
|
prefix: 'weight',
|
|
226
|
-
variables: ['light', 'normal', 'medium', 'semibold', 'bold']
|
|
245
|
+
variables: ['light', 'normal', 'medium', 'semibold', 'bold'],
|
|
227
246
|
},
|
|
228
247
|
{
|
|
229
248
|
name: 'lineHeight',
|
|
230
249
|
prefix: 'leading',
|
|
231
|
-
variables: ['tight', 'normal', 'relaxed', 'loose']
|
|
250
|
+
variables: ['tight', 'normal', 'relaxed', 'loose'],
|
|
232
251
|
},
|
|
233
252
|
{
|
|
234
253
|
name: 'letterSpacing',
|
|
235
254
|
prefix: 'tracking',
|
|
236
|
-
variables: ['tight', 'normal', 'wide']
|
|
255
|
+
variables: ['tight', 'normal', 'wide'],
|
|
237
256
|
},
|
|
238
257
|
{
|
|
239
258
|
name: 'borderRadius',
|
|
240
259
|
prefix: 'radius',
|
|
241
|
-
variables: ['none', 'sm', 'md', 'lg', 'xl', 'full', 'circle']
|
|
260
|
+
variables: ['none', 'sm', 'md', 'lg', 'xl', 'full', 'circle'],
|
|
242
261
|
},
|
|
243
262
|
{
|
|
244
263
|
name: 'shadow',
|
|
245
264
|
prefix: 'shadow',
|
|
246
|
-
variables: ['none', 'sm', 'md', 'lg', 'xl', '2xl', 'inner']
|
|
265
|
+
variables: ['none', 'sm', 'md', 'lg', 'xl', '2xl', 'inner'],
|
|
247
266
|
},
|
|
248
267
|
{
|
|
249
268
|
name: 'animation',
|
|
250
269
|
prefix: 'duration',
|
|
251
|
-
variables: ['fast', 'normal', 'slow']
|
|
270
|
+
variables: ['fast', 'normal', 'slow'],
|
|
252
271
|
},
|
|
253
272
|
{
|
|
254
273
|
name: 'easing',
|
|
255
274
|
prefix: 'ease',
|
|
256
|
-
variables: ['linear', 'ease', 'easeIn', 'easeOut', 'easeInOut']
|
|
275
|
+
variables: ['linear', 'ease', 'easeIn', 'easeOut', 'easeInOut'],
|
|
257
276
|
},
|
|
258
277
|
{
|
|
259
278
|
name: 'breakpoints',
|
|
260
279
|
prefix: 'breakpoint',
|
|
261
|
-
variables: ['xs', 'sm', 'md', 'lg', 'xl', 'xxl']
|
|
280
|
+
variables: ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'],
|
|
262
281
|
},
|
|
263
282
|
{
|
|
264
283
|
name: 'zIndex',
|
|
265
284
|
prefix: 'z',
|
|
266
|
-
variables: ['dropdown', 'sticky', 'fixed', 'modal', 'popover', 'tooltip']
|
|
285
|
+
variables: ['dropdown', 'sticky', 'fixed', 'modal', 'popover', 'tooltip'],
|
|
267
286
|
},
|
|
268
287
|
{
|
|
269
288
|
name: 'transition',
|
|
270
289
|
prefix: 'transition',
|
|
271
|
-
variables: ['base', 'fast', 'slow']
|
|
272
|
-
}
|
|
290
|
+
variables: ['base', 'fast', 'slow'],
|
|
291
|
+
},
|
|
273
292
|
];
|
|
274
293
|
}
|
|
275
294
|
|
|
@@ -279,28 +298,28 @@ export class CSSVariableGenerator {
|
|
|
279
298
|
|
|
280
299
|
// 生成颜色变量
|
|
281
300
|
variables.colors = this.generateColorVariables();
|
|
282
|
-
|
|
301
|
+
|
|
283
302
|
// 生成间距变量
|
|
284
303
|
variables.spacing = this.generateSpacingVariables();
|
|
285
|
-
|
|
304
|
+
|
|
286
305
|
// 生成字体变量
|
|
287
306
|
variables.typography = this.generateTypographyVariables();
|
|
288
|
-
|
|
307
|
+
|
|
289
308
|
// 生成边框变量
|
|
290
309
|
variables.borderRadius = this.generateBorderRadiusVariables();
|
|
291
|
-
|
|
310
|
+
|
|
292
311
|
// 生成阴影变量
|
|
293
312
|
variables.shadow = this.generateShadowVariables();
|
|
294
|
-
|
|
313
|
+
|
|
295
314
|
// 生成动画变量
|
|
296
315
|
variables.animation = this.generateAnimationVariables();
|
|
297
|
-
|
|
316
|
+
|
|
298
317
|
// 生成断点变量
|
|
299
318
|
variables.breakpoints = this.generateBreakpointVariables();
|
|
300
|
-
|
|
319
|
+
|
|
301
320
|
// 生成Z-index变量
|
|
302
321
|
variables.zIndex = this.generateZIndexVariables();
|
|
303
|
-
|
|
322
|
+
|
|
304
323
|
// 生成过渡变量
|
|
305
324
|
variables.transition = this.generateTransitionVariables();
|
|
306
325
|
|
|
@@ -310,7 +329,7 @@ export class CSSVariableGenerator {
|
|
|
310
329
|
// 生成颜色变量
|
|
311
330
|
private generateColorVariables(): CSSVariables['colors'] {
|
|
312
331
|
const { colors } = this.theme;
|
|
313
|
-
|
|
332
|
+
|
|
314
333
|
return {
|
|
315
334
|
primary: colors.primary,
|
|
316
335
|
primaryLight: this.lightenColor(colors.primary, 0.2),
|
|
@@ -343,7 +362,7 @@ export class CSSVariableGenerator {
|
|
|
343
362
|
// 生成间距变量
|
|
344
363
|
private generateSpacingVariables(): CSSVariables['spacing'] {
|
|
345
364
|
const { spacing } = this.theme;
|
|
346
|
-
|
|
365
|
+
|
|
347
366
|
return {
|
|
348
367
|
xs: `${spacing.xs}px`,
|
|
349
368
|
sm: `${spacing.sm}px`,
|
|
@@ -360,7 +379,7 @@ export class CSSVariableGenerator {
|
|
|
360
379
|
// 生成字体变量
|
|
361
380
|
private generateTypographyVariables(): CSSVariables['typography'] {
|
|
362
381
|
const { typography } = this.theme;
|
|
363
|
-
|
|
382
|
+
|
|
364
383
|
return {
|
|
365
384
|
fontFamily: {
|
|
366
385
|
sans: typography.fontFamily.sans.join(', '),
|
|
@@ -403,7 +422,7 @@ export class CSSVariableGenerator {
|
|
|
403
422
|
// 生成边框变量
|
|
404
423
|
private generateBorderRadiusVariables(): CSSVariables['borderRadius'] {
|
|
405
424
|
const { borderRadius } = this.theme;
|
|
406
|
-
|
|
425
|
+
|
|
407
426
|
return {
|
|
408
427
|
none: `${borderRadius.none}px`,
|
|
409
428
|
sm: `${borderRadius.sm}px`,
|
|
@@ -418,7 +437,7 @@ export class CSSVariableGenerator {
|
|
|
418
437
|
// 生成阴影变量
|
|
419
438
|
private generateShadowVariables(): CSSVariables['shadow'] {
|
|
420
439
|
const { shadow } = this.theme;
|
|
421
|
-
|
|
440
|
+
|
|
422
441
|
return {
|
|
423
442
|
none: shadow.none,
|
|
424
443
|
sm: shadow.sm,
|
|
@@ -433,7 +452,7 @@ export class CSSVariableGenerator {
|
|
|
433
452
|
// 生成动画变量
|
|
434
453
|
private generateAnimationVariables(): CSSVariables['animation'] {
|
|
435
454
|
const { animation } = this.theme;
|
|
436
|
-
|
|
455
|
+
|
|
437
456
|
return {
|
|
438
457
|
duration: animation.duration,
|
|
439
458
|
easing: animation.easing,
|
|
@@ -443,7 +462,7 @@ export class CSSVariableGenerator {
|
|
|
443
462
|
// 生成断点变量
|
|
444
463
|
private generateBreakpointVariables(): CSSVariables['breakpoints'] {
|
|
445
464
|
const { breakpoints } = this.theme.spacing;
|
|
446
|
-
|
|
465
|
+
|
|
447
466
|
return {
|
|
448
467
|
xs: `${breakpoints.xs}px`,
|
|
449
468
|
sm: `${breakpoints.sm}px`,
|
|
@@ -469,7 +488,7 @@ export class CSSVariableGenerator {
|
|
|
469
488
|
// 生成过渡变量
|
|
470
489
|
private generateTransitionVariables(): CSSVariables['transition'] {
|
|
471
490
|
const { animation } = this.theme;
|
|
472
|
-
|
|
491
|
+
|
|
473
492
|
return {
|
|
474
493
|
base: `all ${animation.duration.normal} ${animation.easing.easeInOut}`,
|
|
475
494
|
fast: `all ${animation.duration.fast} ${animation.easing.easeInOut}`,
|
|
@@ -480,9 +499,9 @@ export class CSSVariableGenerator {
|
|
|
480
499
|
// 生成CSS变量字符串
|
|
481
500
|
public generateCSSString(): string {
|
|
482
501
|
const variables = this.generateVariables();
|
|
483
|
-
|
|
502
|
+
|
|
484
503
|
let css = ':root {\n';
|
|
485
|
-
|
|
504
|
+
|
|
486
505
|
// 递归生成变量
|
|
487
506
|
const generateSection = (obj: any, prefix: string = '') => {
|
|
488
507
|
Object.entries(obj).forEach(([key, value]) => {
|
|
@@ -494,10 +513,10 @@ export class CSSVariableGenerator {
|
|
|
494
513
|
}
|
|
495
514
|
});
|
|
496
515
|
};
|
|
497
|
-
|
|
516
|
+
|
|
498
517
|
generateSection(variables);
|
|
499
518
|
css += '}\n';
|
|
500
|
-
|
|
519
|
+
|
|
501
520
|
// 生成暗色主题变量
|
|
502
521
|
css += '[data-theme="dark"] {\n';
|
|
503
522
|
const darkVariables = this.generateDarkThemeVariables();
|
|
@@ -505,14 +524,14 @@ export class CSSVariableGenerator {
|
|
|
505
524
|
css += ` --${key}: ${value};\n`;
|
|
506
525
|
});
|
|
507
526
|
css += '}\n';
|
|
508
|
-
|
|
527
|
+
|
|
509
528
|
return css;
|
|
510
529
|
}
|
|
511
530
|
|
|
512
531
|
// 生成暗色主题变量
|
|
513
532
|
private generateDarkThemeVariables(): Record<string, string> {
|
|
514
533
|
const darkColors = this.generateColorVariables();
|
|
515
|
-
|
|
534
|
+
|
|
516
535
|
return {
|
|
517
536
|
'color-text': darkColors.text,
|
|
518
537
|
'color-text-secondary': darkColors.textSecondary,
|
|
@@ -534,22 +553,22 @@ export class CSSVariableGenerator {
|
|
|
534
553
|
private lightenColor(hex: string, amount: number): string {
|
|
535
554
|
const rgb = this.hexToRgb(hex);
|
|
536
555
|
if (!rgb) return hex;
|
|
537
|
-
|
|
556
|
+
|
|
538
557
|
const r = Math.min(255, Math.floor(rgb.r + (255 - rgb.r) * amount));
|
|
539
558
|
const g = Math.min(255, Math.floor(rgb.g + (255 - rgb.g) * amount));
|
|
540
559
|
const b = Math.min(255, Math.floor(rgb.b + (255 - rgb.b) * amount));
|
|
541
|
-
|
|
560
|
+
|
|
542
561
|
return this.rgbToHex(r, g, b);
|
|
543
562
|
}
|
|
544
563
|
|
|
545
564
|
private darkenColor(hex: string, amount: number): string {
|
|
546
565
|
const rgb = this.hexToRgb(hex);
|
|
547
566
|
if (!rgb) return hex;
|
|
548
|
-
|
|
567
|
+
|
|
549
568
|
const r = Math.max(0, Math.floor(rgb.r * (1 - amount)));
|
|
550
569
|
const g = Math.max(0, Math.floor(rgb.g * (1 - amount)));
|
|
551
570
|
const b = Math.max(0, Math.floor(rgb.b * (1 - amount)));
|
|
552
|
-
|
|
571
|
+
|
|
553
572
|
return this.rgbToHex(r, g, b);
|
|
554
573
|
}
|
|
555
574
|
|
|
@@ -580,4 +599,4 @@ export const generateCSSVariablesString = (theme: ThemeConfig): string => {
|
|
|
580
599
|
return generator.generateCSSString();
|
|
581
600
|
};
|
|
582
601
|
|
|
583
|
-
export default CSSVariableGenerator;
|
|
602
|
+
export default CSSVariableGenerator;
|
|
@@ -1,51 +1,50 @@
|
|
|
1
1
|
export interface AccessibilityState {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
disabled?: boolean;
|
|
3
|
+
selected?: boolean;
|
|
4
|
+
checked?: boolean | 'mixed';
|
|
5
|
+
expanded?: boolean;
|
|
6
|
+
busy?: boolean;
|
|
7
|
+
pressed?: boolean;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export interface AccessibilityValue {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
min?: number;
|
|
12
|
+
max?: number;
|
|
13
|
+
now?: number;
|
|
14
|
+
text?: string;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export interface AccessibilityProps {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
accessible?: boolean;
|
|
19
|
+
accessibilityLabel?: string;
|
|
20
|
+
accessibilityRole?: string;
|
|
21
|
+
accessibilityHint?: string;
|
|
22
|
+
accessibilityState?: AccessibilityState;
|
|
23
|
+
accessibilityValue?: AccessibilityValue;
|
|
24
|
+
accessibilityId?: string;
|
|
25
|
+
accessibilityLiveRegion?: 'none' | 'polite' | 'assertive';
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export interface AccessibilityActionEvent {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
nativeEvent: {
|
|
30
|
+
actionName: string;
|
|
31
|
+
actionTarget?: string;
|
|
32
|
+
};
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
export interface AccessibilityEvents {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
36
|
+
onAccessibilityAction?: (event: AccessibilityActionEvent) => void;
|
|
37
|
+
onAccessibilityFocus?: (event: any) => void;
|
|
38
|
+
onAccessibilityHintChange?: (event: any) => void;
|
|
39
|
+
onAccessibilityStateChange?: (event: any) => void;
|
|
40
|
+
onAccessibilityValueChange?: (event: any) => void;
|
|
41
|
+
onAccessibilityLabelChange?: (event: any) => void;
|
|
42
|
+
onAccessibilityRoleChange?: (event: any) => void;
|
|
43
|
+
onAccessibilityRequest?: (event: AccessibilityActionEvent) => void;
|
|
44
|
+
onAccessibilityDone?: (event: any) => void;
|
|
45
|
+
onAccessibilityCancel?: (event: any) => void;
|
|
46
|
+
onAccessibilityError?: (event: any) => void;
|
|
47
|
+
onAccessibilityWarning?: (event: any) => void;
|
|
48
|
+
onAccessibilityInfo?: (event: any) => void;
|
|
49
|
+
onAccessibilitySuccess?: (event: any) => void;
|
|
50
50
|
}
|
|
51
|
-
|
package/src/types/button.ts
CHANGED
|
@@ -37,10 +37,7 @@ export type ButtonStatus = 'normal' | 'loading' | 'disabled' | 'active';
|
|
|
37
37
|
export type ButtonIconPosition = 'left' | 'right';
|
|
38
38
|
|
|
39
39
|
/** 按钮原生属性类型 */
|
|
40
|
-
export type ButtonNativeProps = Omit<
|
|
41
|
-
React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
42
|
-
'size' | 'type' | 'onClick'
|
|
43
|
-
>;
|
|
40
|
+
export type ButtonNativeProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'size' | 'type' | 'onClick'>;
|
|
44
41
|
|
|
45
42
|
// ==================== Button属性类型 ====================
|
|
46
43
|
|
|
@@ -286,37 +283,38 @@ export interface ButtonUtils {
|
|
|
286
283
|
/** 按钮尺寸验证器 */
|
|
287
284
|
export const buttonSizeValidator: Validator<ButtonSize> = createValidator(
|
|
288
285
|
(value): value is ButtonSize => ['xs', 'sm', 'md', 'lg', 'xl'].includes(value as ButtonSize),
|
|
289
|
-
'Invalid button size. Must be one of: xs, sm, md, lg, xl'
|
|
286
|
+
'Invalid button size. Must be one of: xs, sm, md, lg, xl',
|
|
290
287
|
);
|
|
291
288
|
|
|
292
289
|
/** 按钮类型验证器 */
|
|
293
290
|
export const buttonTypeValidator: Validator<ButtonType> = createValidator(
|
|
294
|
-
(value): value is ButtonType =>
|
|
295
|
-
|
|
291
|
+
(value): value is ButtonType =>
|
|
292
|
+
['default', 'primary', 'secondary', 'success', 'warning', 'error', 'info'].includes(value as ButtonType),
|
|
293
|
+
'Invalid button type. Must be one of: default, primary, secondary, success, warning, error, info',
|
|
296
294
|
);
|
|
297
295
|
|
|
298
296
|
/** 按钮变体验证器 */
|
|
299
297
|
export const buttonVariantValidator: Validator<ButtonVariant> = createValidator(
|
|
300
298
|
(value): value is ButtonVariant => ['solid', 'outline', 'ghost', 'text'].includes(value as ButtonVariant),
|
|
301
|
-
'Invalid button variant. Must be one of: solid, outline, ghost, text'
|
|
299
|
+
'Invalid button variant. Must be one of: solid, outline, ghost, text',
|
|
302
300
|
);
|
|
303
301
|
|
|
304
302
|
/** 按钮形状验证器 */
|
|
305
303
|
export const buttonShapeValidator: Validator<ButtonShape> = createValidator(
|
|
306
304
|
(value): value is ButtonShape => ['default', 'rounded', 'circle', 'square'].includes(value as ButtonShape),
|
|
307
|
-
'Invalid button shape. Must be one of: default, rounded, circle, square'
|
|
305
|
+
'Invalid button shape. Must be one of: default, rounded, circle, square',
|
|
308
306
|
);
|
|
309
307
|
|
|
310
308
|
/** 按钮状态验证器 */
|
|
311
309
|
export const buttonStatusValidator: Validator<ButtonStatus> = createValidator(
|
|
312
310
|
(value): value is ButtonStatus => ['normal', 'loading', 'disabled', 'active'].includes(value as ButtonStatus),
|
|
313
|
-
'Invalid button status. Must be one of: normal, loading, disabled, active'
|
|
311
|
+
'Invalid button status. Must be one of: normal, loading, disabled, active',
|
|
314
312
|
);
|
|
315
313
|
|
|
316
314
|
/** 按钮图标位置验证器 */
|
|
317
315
|
export const buttonIconPositionValidator: Validator<ButtonIconPosition> = createValidator(
|
|
318
316
|
(value): value is ButtonIconPosition => ['left', 'right'].includes(value as ButtonIconPosition),
|
|
319
|
-
'Invalid button icon position. Must be one of: left, right'
|
|
317
|
+
'Invalid button icon position. Must be one of: left, right',
|
|
320
318
|
);
|
|
321
319
|
|
|
322
320
|
// ==================== Button类型守卫 ====================
|
|
@@ -354,9 +352,9 @@ export function isValidButtonIconPosition(value: unknown): value is ButtonIconPo
|
|
|
354
352
|
/** 检查是否为有效的按钮属性 */
|
|
355
353
|
export function isValidButtonProps(props: unknown): props is ButtonProps {
|
|
356
354
|
if (!props || typeof props !== 'object') return false;
|
|
357
|
-
|
|
355
|
+
|
|
358
356
|
const obj = props as Record<string, unknown>;
|
|
359
|
-
|
|
357
|
+
|
|
360
358
|
// 验证基本属性类型
|
|
361
359
|
if (obj['size'] !== undefined && !isValidButtonSize(obj['size'])) return false;
|
|
362
360
|
if (obj['type'] !== undefined && !isValidButtonType(obj['type'])) return false;
|
|
@@ -364,34 +362,34 @@ export function isValidButtonProps(props: unknown): props is ButtonProps {
|
|
|
364
362
|
if (obj['shape'] !== undefined && !isValidButtonShape(obj['shape'])) return false;
|
|
365
363
|
if (obj['status'] !== undefined && !isValidButtonStatus(obj['status'])) return false;
|
|
366
364
|
if (obj['iconPosition'] !== undefined && !isValidButtonIconPosition(obj['iconPosition'])) return false;
|
|
367
|
-
|
|
365
|
+
|
|
368
366
|
// 验证布尔值属性
|
|
369
367
|
const booleanProps = ['block', 'danger', 'loading', 'disabled', 'ripple', 'shadow', 'bordered'];
|
|
370
368
|
for (const prop of booleanProps) {
|
|
371
369
|
if (obj[prop] !== undefined && !isBoolean(obj[prop])) return false;
|
|
372
370
|
}
|
|
373
|
-
|
|
371
|
+
|
|
374
372
|
// 验证字符串属性
|
|
375
373
|
const stringProps = ['className', 'loadingText', 'color', 'backgroundColor', 'textColor', 'borderColor'];
|
|
376
374
|
for (const prop of stringProps) {
|
|
377
375
|
if (obj[prop] !== undefined && !isString(obj[prop])) return false;
|
|
378
376
|
}
|
|
379
|
-
|
|
377
|
+
|
|
380
378
|
// 验证数字属性
|
|
381
379
|
const numberProps = ['animationDuration', 'groupIndex', 'groupSize'];
|
|
382
380
|
for (const prop of numberProps) {
|
|
383
381
|
if (obj[prop] !== undefined && !isNumber(obj[prop])) return false;
|
|
384
382
|
}
|
|
385
|
-
|
|
383
|
+
|
|
386
384
|
// 验证函数属性
|
|
387
385
|
const functionProps = ['onClick', 'onPressIn', 'onPressOut', 'onLongPress'];
|
|
388
386
|
for (const prop of functionProps) {
|
|
389
387
|
if (obj[prop] !== undefined && !isFunction(obj[prop])) return false;
|
|
390
388
|
}
|
|
391
|
-
|
|
389
|
+
|
|
392
390
|
// 验证React元素属性
|
|
393
391
|
if (obj['icon'] !== undefined && !isReactElement(obj['icon']) && !isString(obj['icon'])) return false;
|
|
394
|
-
|
|
392
|
+
|
|
395
393
|
return true;
|
|
396
394
|
}
|
|
397
395
|
|
|
@@ -477,17 +475,17 @@ export function createButtonClassName(props: Partial<ButtonProps>): string {
|
|
|
477
475
|
'taro-uno-button--bordered': !!bordered,
|
|
478
476
|
};
|
|
479
477
|
|
|
480
|
-
return classNames(
|
|
481
|
-
...baseClasses,
|
|
482
|
-
conditionalClasses,
|
|
483
|
-
className
|
|
484
|
-
);
|
|
478
|
+
return classNames(...baseClasses, conditionalClasses, className);
|
|
485
479
|
}
|
|
486
480
|
|
|
487
481
|
/** 计算按钮最终状态 */
|
|
488
482
|
export function calculateFinalStatus(props: Partial<ButtonProps>): ButtonStatus {
|
|
489
|
-
const {
|
|
490
|
-
|
|
483
|
+
const {
|
|
484
|
+
loading = defaultButtonProps.loading,
|
|
485
|
+
disabled = defaultButtonProps.disabled,
|
|
486
|
+
status = defaultButtonProps.status,
|
|
487
|
+
} = props;
|
|
488
|
+
|
|
491
489
|
if (loading) return 'loading';
|
|
492
490
|
if (disabled) return 'disabled';
|
|
493
491
|
return status || 'normal';
|
|
@@ -559,4 +557,4 @@ export function formatButtonStatus(status: ButtonStatus): string {
|
|
|
559
557
|
|
|
560
558
|
// ==================== 导出 ====================
|
|
561
559
|
|
|
562
|
-
export * from './index';
|
|
560
|
+
export * from './index';
|
|
@@ -61,7 +61,12 @@ export interface LoadingProps extends BaseComponentProps {
|
|
|
61
61
|
|
|
62
62
|
// ==================== 复合组件属性接口 ====================
|
|
63
63
|
export interface StandardComponentProps
|
|
64
|
-
extends SizeableProps,
|
|
64
|
+
extends SizeableProps,
|
|
65
|
+
VariantProps,
|
|
66
|
+
StatusProps,
|
|
67
|
+
ShapeProps,
|
|
68
|
+
DisabledProps,
|
|
69
|
+
LoadingProps {
|
|
65
70
|
/** 组件唯一标识 */
|
|
66
71
|
id?: string;
|
|
67
72
|
/** 无障碍标签 */
|
package/src/types/index.ts
CHANGED
|
@@ -15,7 +15,6 @@ export * from './utils';
|
|
|
15
15
|
// 导出Button组件专用类型
|
|
16
16
|
export * from './button';
|
|
17
17
|
|
|
18
|
-
|
|
19
18
|
// 导出标准化组件类型
|
|
20
19
|
export * from './standardized-components';
|
|
21
20
|
|
|
@@ -54,7 +53,8 @@ export type Variant = 'default' | 'primary' | 'secondary' | 'success' | 'warning
|
|
|
54
53
|
export type Status = 'default' | 'loading' | 'disabled' | 'error' | 'success';
|
|
55
54
|
|
|
56
55
|
/** 通用组件属性接口 */
|
|
57
|
-
export interface BaseComponentProps
|
|
56
|
+
export interface BaseComponentProps
|
|
57
|
+
extends Partial<Omit<React.HTMLAttributes<HTMLElement>, 'className' | 'style' | 'children' | 'onClick'>> {
|
|
58
58
|
/** 自定义类名 */
|
|
59
59
|
className?: string;
|
|
60
60
|
/** 自定义样式 */
|
|
@@ -97,8 +97,14 @@ export interface ClickableProps extends BaseComponentProps {
|
|
|
97
97
|
|
|
98
98
|
/** 标准组件属性 - 组合所有常用属性 */
|
|
99
99
|
export interface StandardComponentProps
|
|
100
|
-
extends SizeableProps,
|
|
101
|
-
|
|
100
|
+
extends SizeableProps,
|
|
101
|
+
VariantProps,
|
|
102
|
+
StatusProps,
|
|
103
|
+
ShapeProps,
|
|
104
|
+
DisabledProps,
|
|
105
|
+
ReadonlyProps,
|
|
106
|
+
LoadingProps,
|
|
107
|
+
ClickableProps {
|
|
102
108
|
/** 组件唯一标识 */
|
|
103
109
|
id?: string;
|
|
104
110
|
/** 数据属性 */
|
|
@@ -541,4 +547,4 @@ export type ExtractComponentProps<T> = T extends React.ComponentType<infer P> ?
|
|
|
541
547
|
/** 组件引用提取类型 */
|
|
542
548
|
export type ExtractComponentRef<T> = T extends React.RefObject<infer R> ? R : never;
|
|
543
549
|
|
|
544
|
-
// ==================== 导出 ====================
|
|
550
|
+
// ==================== 导出 ====================
|