taro-uno-ui 1.0.1 → 1.0.2
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 +67 -30
- package/dist/js/{index-CDFsvu80.js → index-QpKiGsEQ.js} +39026 -28023
- package/dist/js/index-QpKiGsEQ.js.map +1 -0
- package/dist/js/{index-JffnTUrv.js → index-nnTHNhwl.js} +38743 -27720
- package/dist/js/index-nnTHNhwl.js.map +1 -0
- package/package.json +4 -4
- package/dist/js/index-CDFsvu80.js.map +0 -1
- package/dist/js/index-DFdcksbe.js +0 -1165
- package/dist/js/index-DFdcksbe.js.map +0 -1
- package/dist/js/index-DXRIkWX1.js +0 -1148
- package/dist/js/index-DXRIkWX1.js.map +0 -1
- package/dist/js/index-JffnTUrv.js.map +0 -1
- package/dist/utils/http/request.d.ts +0 -280
- package/src/app.config.ts +0 -55
- package/src/app.scss +0 -508
- package/src/app.tsx +0 -44
- package/src/components/basic/Button/Button.styles.ts +0 -130
- package/src/components/basic/Button/Button.test.tsx +0 -154
- package/src/components/basic/Button/Button.tsx +0 -133
- package/src/components/basic/Button/Button.types.ts +0 -81
- package/src/components/basic/Button/index.tsx +0 -6
- package/src/components/basic/Divider/Divider.styles.ts +0 -488
- package/src/components/basic/Divider/Divider.test.tsx +0 -551
- package/src/components/basic/Divider/Divider.tsx +0 -392
- package/src/components/basic/Divider/Divider.types.ts +0 -261
- package/src/components/basic/Divider/index.tsx +0 -25
- package/src/components/basic/Icon/Icon.data.ts +0 -474
- package/src/components/basic/Icon/Icon.styles.ts +0 -359
- package/src/components/basic/Icon/Icon.test.tsx +0 -357
- package/src/components/basic/Icon/Icon.tsx +0 -167
- package/src/components/basic/Icon/Icon.types.ts +0 -210
- package/src/components/basic/Icon/IconManager.ts +0 -229
- package/src/components/basic/Icon/index.tsx +0 -22
- package/src/components/basic/Text/Text.styles.ts +0 -500
- package/src/components/basic/Text/Text.test.tsx +0 -299
- package/src/components/basic/Text/Text.tsx +0 -340
- package/src/components/basic/Text/Text.types.ts +0 -329
- package/src/components/basic/Text/index.tsx +0 -27
- package/src/components/basic/Typography/Typography.styles.ts +0 -347
- package/src/components/basic/Typography/Typography.tsx +0 -207
- package/src/components/basic/Typography/Typography.types.ts +0 -296
- package/src/components/basic/Typography/index.tsx +0 -14
- package/src/components/basic/Video/Video.styles.ts +0 -777
- package/src/components/basic/Video/Video.test.tsx +0 -490
- package/src/components/basic/Video/Video.tsx +0 -1468
- package/src/components/basic/Video/Video.types.ts +0 -500
- package/src/components/basic/Video/index.tsx +0 -26
- package/src/components/basic/index.tsx +0 -300
- package/src/components/common/ErrorBoundary.tsx +0 -87
- package/src/components/common/LazyComponent.tsx +0 -247
- package/src/components/common/ResponsiveContainer.tsx +0 -93
- package/src/components/common/ResponsiveGrid.tsx +0 -183
- package/src/components/common/SecurityProvider.tsx +0 -98
- package/src/components/common/ThemeProvider.tsx +0 -115
- package/src/components/common/VirtualList.tsx +0 -350
- package/src/components/common/__tests__/ErrorBoundary.test.tsx +0 -249
- package/src/components/common/index.tsx +0 -32
- package/src/components/display/Avatar/Avatar.styles.ts +0 -62
- package/src/components/display/Avatar/Avatar.test.tsx +0 -390
- package/src/components/display/Avatar/Avatar.tsx +0 -66
- package/src/components/display/Avatar/Avatar.types.ts +0 -40
- package/src/components/display/Avatar/index.ts +0 -3
- package/src/components/display/Badge/Badge.tsx +0 -29
- package/src/components/display/Badge/Badge.types.ts +0 -29
- package/src/components/display/Badge/index.ts +0 -2
- package/src/components/display/Calendar/Calendar.styles.ts +0 -255
- package/src/components/display/Calendar/Calendar.test.tsx +0 -42
- package/src/components/display/Calendar/Calendar.tsx +0 -358
- package/src/components/display/Calendar/Calendar.types.ts +0 -91
- package/src/components/display/Calendar/index.ts +0 -3
- package/src/components/display/Card/Card.styles.ts +0 -89
- package/src/components/display/Card/Card.test.tsx +0 -182
- package/src/components/display/Card/Card.tsx +0 -135
- package/src/components/display/Card/Card.types.ts +0 -55
- package/src/components/display/Card/index.ts +0 -3
- package/src/components/display/Carousel/Carousel.styles.ts +0 -206
- package/src/components/display/Carousel/Carousel.tsx +0 -290
- package/src/components/display/Carousel/Carousel.types.ts +0 -57
- package/src/components/display/Carousel/index.ts +0 -3
- package/src/components/display/List/List.styles.ts +0 -79
- package/src/components/display/List/List.tsx +0 -114
- package/src/components/display/List/List.types.ts +0 -68
- package/src/components/display/List/index.ts +0 -3
- package/src/components/display/Rate/Rate.styles.ts +0 -254
- package/src/components/display/Rate/Rate.tsx +0 -324
- package/src/components/display/Rate/Rate.types.ts +0 -112
- package/src/components/display/Rate/index.ts +0 -20
- package/src/components/display/Table/Table.styles.ts +0 -269
- package/src/components/display/Table/Table.test.tsx +0 -345
- package/src/components/display/Table/Table.tsx +0 -426
- package/src/components/display/Table/Table.types.ts +0 -256
- package/src/components/display/Table/index.tsx +0 -16
- package/src/components/display/Tag/Tag.styles.ts +0 -197
- package/src/components/display/Tag/Tag.test.tsx +0 -541
- package/src/components/display/Tag/Tag.tsx +0 -139
- package/src/components/display/Tag/Tag.types.ts +0 -49
- package/src/components/display/Tag/index.ts +0 -3
- package/src/components/display/Timeline/Timeline.styles.ts +0 -211
- package/src/components/display/Timeline/Timeline.tsx +0 -220
- package/src/components/display/Timeline/Timeline.types.ts +0 -56
- package/src/components/display/Timeline/index.ts +0 -3
- package/src/components/display/index.tsx +0 -147
- package/src/components/feedback/Loading/Loading.styles.ts +0 -117
- package/src/components/feedback/Loading/Loading.test.tsx +0 -534
- package/src/components/feedback/Loading/Loading.tsx +0 -132
- package/src/components/feedback/Loading/Loading.types.ts +0 -33
- package/src/components/feedback/Loading/index.ts +0 -6
- package/src/components/feedback/Message/Message.styles.ts +0 -41
- package/src/components/feedback/Message/Message.test.tsx +0 -234
- package/src/components/feedback/Message/Message.tsx +0 -96
- package/src/components/feedback/Message/Message.types.ts +0 -37
- package/src/components/feedback/Message/index.ts +0 -6
- package/src/components/feedback/Modal/Modal.styles.ts +0 -21
- package/src/components/feedback/Modal/Modal.test.tsx +0 -11
- package/src/components/feedback/Modal/Modal.tsx +0 -269
- package/src/components/feedback/Modal/Modal.types.ts +0 -151
- package/src/components/feedback/Modal/index.tsx +0 -11
- package/src/components/feedback/Notification/Notification.styles.ts +0 -453
- package/src/components/feedback/Notification/Notification.test.tsx +0 -401
- package/src/components/feedback/Notification/Notification.tsx +0 -347
- package/src/components/feedback/Notification/Notification.types.ts +0 -339
- package/src/components/feedback/Notification/NotificationManager.tsx +0 -405
- package/src/components/feedback/Notification/index.ts +0 -40
- package/src/components/feedback/Notification/index.tsx +0 -154
- package/src/components/feedback/Progress/Progress.styles.ts +0 -469
- package/src/components/feedback/Progress/Progress.test.simple.tsx +0 -14
- package/src/components/feedback/Progress/Progress.test.tsx +0 -312
- package/src/components/feedback/Progress/Progress.tsx +0 -488
- package/src/components/feedback/Progress/Progress.types.ts +0 -163
- package/src/components/feedback/Progress/index.ts +0 -3
- package/src/components/feedback/Progress/index.tsx +0 -38
- package/src/components/feedback/Progress/utils/animation.ts +0 -193
- package/src/components/feedback/Progress/utils/index.ts +0 -26
- package/src/components/feedback/Progress/utils/progress-calculator.ts +0 -199
- package/src/components/feedback/Result/Result.styles.ts +0 -139
- package/src/components/feedback/Result/Result.tsx +0 -221
- package/src/components/feedback/Result/Result.types.ts +0 -128
- package/src/components/feedback/Result/index.tsx +0 -3
- package/src/components/feedback/Toast/Toast.styles.ts +0 -17
- package/src/components/feedback/Toast/Toast.test.tsx +0 -10
- package/src/components/feedback/Toast/Toast.tsx +0 -384
- package/src/components/feedback/Toast/Toast.types.ts +0 -86
- package/src/components/feedback/Toast/index.tsx +0 -3
- package/src/components/feedback/Tooltip/Tooltip.examples.tsx +0 -435
- package/src/components/feedback/Tooltip/Tooltip.styles.ts +0 -340
- package/src/components/feedback/Tooltip/Tooltip.test.tsx +0 -446
- package/src/components/feedback/Tooltip/Tooltip.tsx +0 -302
- package/src/components/feedback/Tooltip/Tooltip.types.ts +0 -166
- package/src/components/feedback/Tooltip/index.ts +0 -3
- package/src/components/feedback/Tooltip/index.tsx +0 -246
- package/src/components/feedback/index.tsx +0 -176
- package/src/components/form/Cascader/Cascader.styles.ts +0 -526
- package/src/components/form/Cascader/Cascader.test.tsx +0 -77
- package/src/components/form/Cascader/Cascader.tsx +0 -581
- package/src/components/form/Cascader/Cascader.types.ts +0 -581
- package/src/components/form/Cascader/hooks/index.ts +0 -3
- package/src/components/form/Cascader/hooks/useCascaderFieldNames.ts +0 -19
- package/src/components/form/Cascader/hooks/useCascaderOptions.ts +0 -127
- package/src/components/form/Cascader/hooks/useCascaderState.ts +0 -139
- package/src/components/form/Cascader/index.ts +0 -25
- package/src/components/form/Cascader/utils/formatDisplayValue.ts +0 -19
- package/src/components/form/Cascader/utils/index.ts +0 -1
- package/src/components/form/Checkbox/Checkbox.styles.ts +0 -607
- package/src/components/form/Checkbox/Checkbox.test.tsx +0 -1140
- package/src/components/form/Checkbox/Checkbox.tsx +0 -489
- package/src/components/form/Checkbox/Checkbox.types.ts +0 -472
- package/src/components/form/Checkbox/CheckboxGroup.tsx +0 -444
- package/src/components/form/Checkbox/index.tsx +0 -27
- package/src/components/form/DatePicker/DatePicker.styles.ts +0 -393
- package/src/components/form/DatePicker/DatePicker.test.tsx +0 -407
- package/src/components/form/DatePicker/DatePicker.tsx +0 -376
- package/src/components/form/DatePicker/DatePicker.types.ts +0 -250
- package/src/components/form/DatePicker/index.tsx +0 -15
- package/src/components/form/Form/Form.styles.ts +0 -357
- package/src/components/form/Form/Form.test.tsx +0 -122
- package/src/components/form/Form/Form.tsx +0 -257
- package/src/components/form/Form/Form.types.ts +0 -422
- package/src/components/form/Form/index.tsx +0 -31
- package/src/components/form/Form/useFormLogic.ts +0 -497
- package/src/components/form/Input/Input.styles.ts +0 -445
- package/src/components/form/Input/Input.test.tsx +0 -494
- package/src/components/form/Input/Input.tsx +0 -305
- package/src/components/form/Input/Input.types.ts +0 -297
- package/src/components/form/Input/index.tsx +0 -26
- package/src/components/form/Input/useInputLogic.test.ts +0 -82
- package/src/components/form/Input/useInputLogic.ts +0 -260
- package/src/components/form/InputNumber/InputNumber.styles.ts +0 -716
- package/src/components/form/InputNumber/InputNumber.tsx +0 -402
- package/src/components/form/InputNumber/InputNumber.types.ts +0 -336
- package/src/components/form/InputNumber/components/InputNumberClearButton.tsx +0 -24
- package/src/components/form/InputNumber/components/InputNumberControls.tsx +0 -33
- package/src/components/form/InputNumber/components/index.ts +0 -2
- package/src/components/form/InputNumber/hooks/index.ts +0 -4
- package/src/components/form/InputNumber/hooks/useInputNumberState.ts +0 -313
- package/src/components/form/InputNumber/hooks/useInputNumberValidation.ts +0 -148
- package/src/components/form/InputNumber/index.ts +0 -25
- package/src/components/form/Radio/Radio.styles.ts +0 -451
- package/src/components/form/Radio/Radio.test.tsx +0 -547
- package/src/components/form/Radio/Radio.tsx +0 -277
- package/src/components/form/Radio/Radio.types.ts +0 -414
- package/src/components/form/Radio/index.tsx +0 -21
- package/src/components/form/Select/Select.styles.ts +0 -518
- package/src/components/form/Select/Select.test.tsx +0 -648
- package/src/components/form/Select/Select.tsx +0 -474
- package/src/components/form/Select/Select.types.ts +0 -429
- package/src/components/form/Select/index.tsx +0 -30
- package/src/components/form/Slider/Slider.styles.ts +0 -139
- package/src/components/form/Slider/Slider.test.tsx +0 -553
- package/src/components/form/Slider/Slider.tsx +0 -312
- package/src/components/form/Slider/Slider.types.ts +0 -110
- package/src/components/form/Slider/index.tsx +0 -3
- package/src/components/form/Switch/Switch.styles.ts +0 -534
- package/src/components/form/Switch/Switch.test.tsx +0 -345
- package/src/components/form/Switch/Switch.tsx +0 -458
- package/src/components/form/Switch/Switch.types.ts +0 -386
- package/src/components/form/Switch/index.tsx +0 -26
- package/src/components/form/Textarea/Textarea.styles.ts +0 -592
- package/src/components/form/Textarea/Textarea.test.tsx +0 -1075
- package/src/components/form/Textarea/Textarea.tsx +0 -608
- package/src/components/form/Textarea/Textarea.types.ts +0 -374
- package/src/components/form/Textarea/index.tsx +0 -26
- package/src/components/form/TimePicker/TimePicker.styles.ts +0 -434
- package/src/components/form/TimePicker/TimePicker.test.tsx +0 -306
- package/src/components/form/TimePicker/TimePicker.tsx +0 -250
- package/src/components/form/TimePicker/TimePicker.types.ts +0 -385
- package/src/components/form/TimePicker/index.ts +0 -21
- package/src/components/form/Transfer/Transfer.styles.ts +0 -490
- package/src/components/form/Transfer/Transfer.test.tsx +0 -316
- package/src/components/form/Transfer/Transfer.tsx +0 -414
- package/src/components/form/Transfer/Transfer.types.ts +0 -565
- package/src/components/form/Transfer/components/TransferItem.tsx +0 -94
- package/src/components/form/Transfer/components/TransferList.tsx +0 -298
- package/src/components/form/Transfer/components/TransferOperations.tsx +0 -81
- package/src/components/form/Transfer/components/TransferPagination.tsx +0 -139
- package/src/components/form/Transfer/components/TransferSearch.tsx +0 -85
- package/src/components/form/Transfer/components/index.ts +0 -6
- package/src/components/form/Transfer/hooks/index.ts +0 -3
- package/src/components/form/Transfer/hooks/useTransferData.ts +0 -202
- package/src/components/form/Transfer/hooks/useTransferState.ts +0 -120
- package/src/components/form/Transfer/index.ts +0 -27
- package/src/components/form/Upload/Upload.styles.ts +0 -145
- package/src/components/form/Upload/Upload.test.tsx +0 -10
- package/src/components/form/Upload/Upload.tsx +0 -498
- package/src/components/form/Upload/Upload.types.ts +0 -200
- package/src/components/form/Upload/index.tsx +0 -12
- package/src/components/form/index.tsx +0 -152
- package/src/components/index.tsx +0 -145
- package/src/components/layout/Affix/Affix.styles.ts +0 -42
- package/src/components/layout/Affix/Affix.test.tsx +0 -10
- package/src/components/layout/Affix/Affix.tsx +0 -83
- package/src/components/layout/Affix/Affix.types.ts +0 -29
- package/src/components/layout/Affix/index.tsx +0 -3
- package/src/components/layout/Col/Col.styles.ts +0 -185
- package/src/components/layout/Col/Col.test.tsx +0 -537
- package/src/components/layout/Col/Col.tsx +0 -97
- package/src/components/layout/Col/Col.types.ts +0 -59
- package/src/components/layout/Col/index.tsx +0 -3
- package/src/components/layout/Container/Container.styles.ts +0 -163
- package/src/components/layout/Container/Container.test.tsx +0 -380
- package/src/components/layout/Container/Container.tsx +0 -123
- package/src/components/layout/Container/Container.types.ts +0 -63
- package/src/components/layout/Container/index.tsx +0 -3
- package/src/components/layout/Grid/Grid.styles.ts +0 -183
- package/src/components/layout/Grid/Grid.test.tsx +0 -637
- package/src/components/layout/Grid/Grid.tsx +0 -123
- package/src/components/layout/Grid/Grid.types.ts +0 -78
- package/src/components/layout/Grid/index.tsx +0 -3
- package/src/components/layout/Layout/Content.tsx +0 -30
- package/src/components/layout/Layout/Footer.tsx +0 -30
- package/src/components/layout/Layout/Header.tsx +0 -30
- package/src/components/layout/Layout/Layout.styles.ts +0 -84
- package/src/components/layout/Layout/Layout.test.tsx +0 -10
- package/src/components/layout/Layout/Layout.tsx +0 -28
- package/src/components/layout/Layout/Layout.types.ts +0 -58
- package/src/components/layout/Layout/Sider.tsx +0 -44
- package/src/components/layout/Layout/index.tsx +0 -22
- package/src/components/layout/Row/Row.styles.ts +0 -159
- package/src/components/layout/Row/Row.test.tsx +0 -467
- package/src/components/layout/Row/Row.tsx +0 -111
- package/src/components/layout/Row/Row.types.ts +0 -60
- package/src/components/layout/Row/index.tsx +0 -3
- package/src/components/layout/Space/Space.styles.ts +0 -255
- package/src/components/layout/Space/Space.test.tsx +0 -682
- package/src/components/layout/Space/Space.tsx +0 -203
- package/src/components/layout/Space/Space.types.ts +0 -92
- package/src/components/layout/Space/index.tsx +0 -12
- package/src/components/layout/index.tsx +0 -78
- package/src/components/navigation/Menu/Menu.constants.ts +0 -69
- package/src/components/navigation/Menu/Menu.stories.tsx +0 -107
- package/src/components/navigation/Menu/Menu.styles.ts +0 -767
- package/src/components/navigation/Menu/Menu.tsx +0 -352
- package/src/components/navigation/Menu/Menu.types.ts +0 -231
- package/src/components/navigation/Menu/Menu.utils.ts +0 -187
- package/src/components/navigation/Menu/MenuItem.tsx +0 -124
- package/src/components/navigation/Menu/SubMenu.tsx +0 -150
- package/src/components/navigation/Menu/index.tsx +0 -59
- package/src/components/navigation/NavBar/NavBar.styles.ts +0 -129
- package/src/components/navigation/NavBar/NavBar.test.tsx +0 -287
- package/src/components/navigation/NavBar/NavBar.tsx +0 -228
- package/src/components/navigation/NavBar/NavBar.types.ts +0 -54
- package/src/components/navigation/NavBar/index.tsx +0 -3
- package/src/components/navigation/Pagination/Pagination.styles.ts +0 -187
- package/src/components/navigation/Pagination/Pagination.test.tsx +0 -672
- package/src/components/navigation/Pagination/Pagination.tsx +0 -395
- package/src/components/navigation/Pagination/Pagination.types.ts +0 -87
- package/src/components/navigation/Pagination/index.ts +0 -24
- package/src/components/navigation/Pagination/index.tsx +0 -9
- package/src/components/navigation/Steps/Step.tsx +0 -36
- package/src/components/navigation/Steps/Steps.styles.ts +0 -169
- package/src/components/navigation/Steps/Steps.test.tsx +0 -14
- package/src/components/navigation/Steps/Steps.tsx +0 -112
- package/src/components/navigation/Steps/Steps.types.ts +0 -47
- package/src/components/navigation/Steps/index.tsx +0 -3
- package/src/components/navigation/Tabs/Tabs.styles.ts +0 -199
- package/src/components/navigation/Tabs/Tabs.test.tsx +0 -662
- package/src/components/navigation/Tabs/Tabs.tsx +0 -253
- package/src/components/navigation/Tabs/Tabs.types.ts +0 -115
- package/src/components/navigation/Tabs/index.tsx +0 -3
- package/src/components/navigation/index.tsx +0 -88
- package/src/constants/index.ts +0 -785
- package/src/hooks/index.ts +0 -60
- package/src/hooks/types.ts +0 -9
- package/src/hooks/useAsync.ts +0 -64
- package/src/hooks/useClickOutside.ts +0 -52
- package/src/hooks/useCounter.ts +0 -87
- package/src/hooks/useDebounce.ts +0 -150
- package/src/hooks/useDeepCompareEffect.ts +0 -88
- package/src/hooks/useEventHandling.ts +0 -444
- package/src/hooks/useEventListener.ts +0 -77
- package/src/hooks/useLifecycle.ts +0 -399
- package/src/hooks/useMediaQuery.ts +0 -75
- package/src/hooks/useMutation.ts +0 -233
- package/src/hooks/usePerformance.ts +0 -378
- package/src/hooks/usePerformanceMonitor.ts +0 -348
- package/src/hooks/usePlatform.ts +0 -64
- package/src/hooks/usePrevious.ts +0 -25
- package/src/hooks/useRequest.test.ts +0 -11
- package/src/hooks/useRequest.ts +0 -140
- package/src/hooks/useStateManagement.ts +0 -300
- package/src/hooks/useStorage.ts +0 -169
- package/src/hooks/useStyle.ts +0 -543
- package/src/hooks/useTheme.ts +0 -347
- package/src/hooks/useToggle.ts +0 -54
- package/src/hooks/useVirtualScroll.ts +0 -331
- package/src/index.ts +0 -323
- package/src/platform/index.ts +0 -1188
- package/src/providers/AppProvider.test.tsx +0 -63
- package/src/providers/AppProvider.tsx +0 -155
- package/src/providers/index.ts +0 -1
- package/src/theme/ThemeProvider.tsx +0 -279
- package/src/theme/ThemeProvider.types.ts +0 -26
- package/src/theme/animations.tsx +0 -660
- package/src/theme/defaults.ts +0 -188
- package/src/theme/design-system.ts +0 -562
- package/src/theme/design-tokens.ts +0 -1122
- package/src/theme/generated/dark-theme.scss +0 -120
- package/src/theme/generated/tokens.css +0 -441
- package/src/theme/generated/tokens.scss +0 -384
- package/src/theme/index.ts +0 -99
- package/src/theme/responsive.tsx +0 -195
- package/src/theme/styles/mixins.scss +0 -612
- package/src/theme/styles/variables.scss +0 -295
- package/src/theme/styles.ts +0 -403
- package/src/theme/tokens/colors.ts +0 -256
- package/src/theme/tokens/effects.ts +0 -260
- package/src/theme/tokens/index.ts +0 -217
- package/src/theme/tokens/spacing.ts +0 -137
- package/src/theme/tokens/typography.ts +0 -186
- package/src/theme/types.ts +0 -188
- package/src/theme/useThemeUtils.ts +0 -313
- package/src/theme/utils.ts +0 -501
- package/src/theme/variables.ts +0 -602
- package/src/types/accessibility.ts +0 -50
- package/src/types/button.ts +0 -560
- package/src/types/component-props.ts +0 -322
- package/src/types/env.d.ts +0 -20
- package/src/types/glob.d.ts +0 -4
- package/src/types/index.ts +0 -427
- package/src/types/modules.d.ts +0 -40
- package/src/types/standardized-components.ts +0 -550
- package/src/types/taro-adapter.d.ts +0 -174
- package/src/types/taro-components.d.ts +0 -73
- package/src/types/utils.ts +0 -400
- package/src/utils/__tests__/inputValidator.test.ts +0 -338
- package/src/utils/__tests__/responsiveUtils.test.ts +0 -311
- package/src/utils/__tests__/xssProtection.test.ts +0 -268
- package/src/utils/abort-controller.ts +0 -48
- package/src/utils/cache.ts +0 -79
- package/src/utils/createNamespace.ts +0 -24
- package/src/utils/environment.ts +0 -115
- package/src/utils/error-handler.ts +0 -88
- package/src/utils/errorLogger.ts +0 -193
- package/src/utils/formatUtils.ts +0 -412
- package/src/utils/http/error-codes.ts +0 -314
- package/src/utils/http/http-client.test.ts +0 -63
- package/src/utils/http/http-client.ts +0 -161
- package/src/utils/http/request-cache.ts +0 -127
- package/src/utils/http/request.ts +0 -954
- package/src/utils/http/taro-adapter.test.ts +0 -74
- package/src/utils/http/taro-adapter.ts +0 -24
- package/src/utils/http/types.ts +0 -414
- package/src/utils/http/web-adapter.ts +0 -33
- package/src/utils/index.ts +0 -112
- package/src/utils/inputValidator.ts +0 -264
- package/src/utils/performance/performance.ts +0 -839
- package/src/utils/responsiveUtils.ts +0 -348
- package/src/utils/rtl-support.ts +0 -354
- package/src/utils/security/api-security.ts +0 -394
- package/src/utils/security/xss-protection.ts +0 -69
- package/src/utils/securityHeaders.ts +0 -308
- package/src/utils/typeHelpers.ts +0 -16
- package/src/utils/types/dataProcessing.ts +0 -544
- package/src/utils/types/typeHelpers.ts +0 -197
- package/src/utils/xssProtection.ts +0 -468
|
@@ -1,500 +0,0 @@
|
|
|
1
|
-
import { PlatformDetector } from '../../../utils';
|
|
2
|
-
import type { TextProps, TextSize, TextWeight, TextColor, TextStatus } from './Text.types';
|
|
3
|
-
|
|
4
|
-
/** 样式工具类 */
|
|
5
|
-
export class TextStyles {
|
|
6
|
-
/** 获取平台前缀 */
|
|
7
|
-
private static getPlatformPrefix(): string {
|
|
8
|
-
const platformValue = PlatformDetector.getPlatform();
|
|
9
|
-
// For test environment, default to h5
|
|
10
|
-
if (process.env['NODE_ENV'] === 'test' || platformValue === 'unknown') {
|
|
11
|
-
return 'taro-uno-h5-text';
|
|
12
|
-
}
|
|
13
|
-
return `taro-uno-${platformValue}-text`;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/** 尺寸映射 */
|
|
17
|
-
static readonly SIZE_MAP: Record<TextSize, { fontSize: number; _lineHeight: number }> = {
|
|
18
|
-
xs: { fontSize: 20, _lineHeight: 1.25 },
|
|
19
|
-
sm: { fontSize: 24, _lineHeight: 1.375 },
|
|
20
|
-
md: { fontSize: 28, _lineHeight: 1.5 },
|
|
21
|
-
lg: { fontSize: 32, _lineHeight: 1.625 },
|
|
22
|
-
xl: { fontSize: 36, _lineHeight: 1.75 },
|
|
23
|
-
'2xl': { fontSize: 40, _lineHeight: 1.875 },
|
|
24
|
-
'3xl': { fontSize: 48, _lineHeight: 2 },
|
|
25
|
-
'4xl': { fontSize: 56, _lineHeight: 2.125 },
|
|
26
|
-
'5xl': { fontSize: 64, _lineHeight: 2.25 },
|
|
27
|
-
'6xl': { fontSize: 72, _lineHeight: 2.375 },
|
|
28
|
-
'7xl': { fontSize: 80, _lineHeight: 2.5 },
|
|
29
|
-
'8xl': { fontSize: 96, _lineHeight: 2.625 },
|
|
30
|
-
'9xl': { fontSize: 112, _lineHeight: 2.75 },
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
/** 权重映射 */
|
|
34
|
-
static readonly WEIGHT_MAP: Record<TextWeight, number> = {
|
|
35
|
-
thin: 100,
|
|
36
|
-
extralight: 200,
|
|
37
|
-
light: 300,
|
|
38
|
-
normal: 400,
|
|
39
|
-
medium: 500,
|
|
40
|
-
semibold: 600,
|
|
41
|
-
bold: 700,
|
|
42
|
-
extrabold: 800,
|
|
43
|
-
black: 900,
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
/** 颜色映射 */
|
|
47
|
-
static readonly COLOR_MAP: Record<TextColor, string> = {
|
|
48
|
-
primary: '#0ea5e9',
|
|
49
|
-
secondary: '#6b7280',
|
|
50
|
-
success: '#22c55e',
|
|
51
|
-
warning: '#f59e0b',
|
|
52
|
-
error: '#ef4444',
|
|
53
|
-
info: '#3b82f6',
|
|
54
|
-
_disabled: '#9ca3af',
|
|
55
|
-
inherit: 'inherit',
|
|
56
|
-
current: 'currentColor',
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
/** 状态映射 */
|
|
60
|
-
static readonly STATUS_MAP: Record<TextStatus, { opacity: number; cursor: string; pointerEvents: string }> = {
|
|
61
|
-
normal: { opacity: 1, cursor: 'default', pointerEvents: 'auto' },
|
|
62
|
-
active: { opacity: 0.8, cursor: 'pointer', pointerEvents: 'auto' },
|
|
63
|
-
disabled: { opacity: 0.5, cursor: 'not-allowed', pointerEvents: 'none' },
|
|
64
|
-
loading: { opacity: 0.7, cursor: 'not-allowed', pointerEvents: 'none' },
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
/** 行高映射 */
|
|
68
|
-
static readonly LINE_HEIGHT_MAP: Record<string, number> = {
|
|
69
|
-
none: 1,
|
|
70
|
-
tight: 1.25,
|
|
71
|
-
snug: 1.375,
|
|
72
|
-
normal: 1.5,
|
|
73
|
-
relaxed: 1.625,
|
|
74
|
-
loose: 1.75,
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
/** 字母间距映射 */
|
|
78
|
-
static readonly LETTER_SPACING_MAP: Record<string, string> = {
|
|
79
|
-
tighter: '-0.05em',
|
|
80
|
-
tight: '-0.025em',
|
|
81
|
-
normal: '0',
|
|
82
|
-
wide: '0.025em',
|
|
83
|
-
wider: '0.05em',
|
|
84
|
-
widest: '0.1em',
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
/** 生成文本类名 */
|
|
88
|
-
static getClassName(props: Partial<TextProps>): string {
|
|
89
|
-
const prefix = this.getPlatformPrefix();
|
|
90
|
-
const {
|
|
91
|
-
size = 'md',
|
|
92
|
-
weight = 'normal',
|
|
93
|
-
color = 'inherit',
|
|
94
|
-
align = 'left',
|
|
95
|
-
decoration = 'none',
|
|
96
|
-
transform = 'none',
|
|
97
|
-
overflow = 'clip',
|
|
98
|
-
direction = 'ltr',
|
|
99
|
-
fontStyle = 'normal',
|
|
100
|
-
variant = 'normal',
|
|
101
|
-
status = 'normal',
|
|
102
|
-
type = 'body',
|
|
103
|
-
clickable = false,
|
|
104
|
-
loading = false,
|
|
105
|
-
disabled = false,
|
|
106
|
-
block = false,
|
|
107
|
-
inlineBlock = false,
|
|
108
|
-
selectable = false,
|
|
109
|
-
copyable = false,
|
|
110
|
-
animated = false,
|
|
111
|
-
underline = false,
|
|
112
|
-
strikethrough = false,
|
|
113
|
-
highlight = false,
|
|
114
|
-
ellipsis = false,
|
|
115
|
-
wrap = true,
|
|
116
|
-
breakWord = false,
|
|
117
|
-
className = '',
|
|
118
|
-
} = props;
|
|
119
|
-
|
|
120
|
-
const classes = [
|
|
121
|
-
prefix,
|
|
122
|
-
`${prefix}--${size}`,
|
|
123
|
-
`${prefix}--${weight}`,
|
|
124
|
-
`${prefix}--${color}`,
|
|
125
|
-
`${prefix}--${align}`,
|
|
126
|
-
`${prefix}--${decoration}`,
|
|
127
|
-
`${prefix}--${transform}`,
|
|
128
|
-
`${prefix}--${overflow}`,
|
|
129
|
-
`${prefix}--${direction}`,
|
|
130
|
-
`${prefix}--${fontStyle}`,
|
|
131
|
-
`${prefix}--${variant}`,
|
|
132
|
-
`${prefix}--${status}`,
|
|
133
|
-
`${prefix}--${type}`,
|
|
134
|
-
clickable && `${prefix}--clickable`,
|
|
135
|
-
loading && `${prefix}--loading`,
|
|
136
|
-
disabled && `${prefix}--disabled`,
|
|
137
|
-
block && `${prefix}--block`,
|
|
138
|
-
inlineBlock && `${prefix}--inline-block`,
|
|
139
|
-
selectable && `${prefix}--selectable`,
|
|
140
|
-
copyable && `${prefix}--copyable`,
|
|
141
|
-
animated && `${prefix}--animated`,
|
|
142
|
-
underline && `${prefix}--underline`,
|
|
143
|
-
strikethrough && `${prefix}--strikethrough`,
|
|
144
|
-
highlight && `${prefix}--highlight`,
|
|
145
|
-
ellipsis && `${prefix}--ellipsis`,
|
|
146
|
-
wrap && `${prefix}--wrap`,
|
|
147
|
-
breakWord && `${prefix}--break-word`,
|
|
148
|
-
className,
|
|
149
|
-
].filter(Boolean);
|
|
150
|
-
|
|
151
|
-
return classes.join(' ');
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
/** 生成文本样式 */
|
|
155
|
-
static getStyle(props: Partial<TextProps>): React.CSSProperties {
|
|
156
|
-
const {
|
|
157
|
-
size = 'md',
|
|
158
|
-
weight = 'normal',
|
|
159
|
-
color = 'inherit',
|
|
160
|
-
align = 'left',
|
|
161
|
-
decoration = 'none',
|
|
162
|
-
transform = 'none',
|
|
163
|
-
overflow = 'clip',
|
|
164
|
-
direction = 'ltr',
|
|
165
|
-
fontStyle = 'normal',
|
|
166
|
-
variant = 'normal',
|
|
167
|
-
letterSpacing,
|
|
168
|
-
lineHeight,
|
|
169
|
-
status = 'normal',
|
|
170
|
-
loading = false,
|
|
171
|
-
disabled = false,
|
|
172
|
-
maxLines,
|
|
173
|
-
animated = false,
|
|
174
|
-
animationDuration = 300,
|
|
175
|
-
underline = false,
|
|
176
|
-
strikethrough = false,
|
|
177
|
-
highlight = false,
|
|
178
|
-
highlightColor = '#fef3c7',
|
|
179
|
-
ellipsis = false,
|
|
180
|
-
wrap = true,
|
|
181
|
-
breakWord = false,
|
|
182
|
-
textShadow,
|
|
183
|
-
textOutline,
|
|
184
|
-
gradient,
|
|
185
|
-
fontFamily,
|
|
186
|
-
wordSpacing,
|
|
187
|
-
textIndent,
|
|
188
|
-
whiteSpace,
|
|
189
|
-
verticalAlign,
|
|
190
|
-
writingMode,
|
|
191
|
-
textRendering,
|
|
192
|
-
style = {},
|
|
193
|
-
} = props;
|
|
194
|
-
|
|
195
|
-
const sizeStyles = this.SIZE_MAP[size];
|
|
196
|
-
const weightStyles = this.WEIGHT_MAP[weight];
|
|
197
|
-
const colorStyles = this.COLOR_MAP[color];
|
|
198
|
-
const statusStyles = this.STATUS_MAP[status];
|
|
199
|
-
|
|
200
|
-
// 处理字母间距
|
|
201
|
-
const _letterSpacingValue =
|
|
202
|
-
typeof letterSpacing === 'string' ? this.LETTER_SPACING_MAP[letterSpacing] : `${letterSpacing}px`;
|
|
203
|
-
|
|
204
|
-
// 处理行高
|
|
205
|
-
const _lineHeightValue = typeof lineHeight === 'string' ? this.LINE_HEIGHT_MAP[lineHeight] : lineHeight;
|
|
206
|
-
|
|
207
|
-
// 处理文本装饰
|
|
208
|
-
const textDecorationValue = [];
|
|
209
|
-
if (underline) textDecorationValue.push('underline');
|
|
210
|
-
if (strikethrough) textDecorationValue.push('line-through');
|
|
211
|
-
const finalDecoration = textDecorationValue.length > 0 ? textDecorationValue.join(' ') : decoration;
|
|
212
|
-
|
|
213
|
-
// 处理渐变背景
|
|
214
|
-
const backgroundStyle = gradient
|
|
215
|
-
? {
|
|
216
|
-
backgroundImage: `linear-gradient(${gradient.direction || 'to right'}, ${gradient.start}, ${gradient.end})`,
|
|
217
|
-
WebkitBackgroundClip: 'text',
|
|
218
|
-
WebkitTextFillColor: 'transparent',
|
|
219
|
-
backgroundClip: 'text',
|
|
220
|
-
textFillColor: 'transparent',
|
|
221
|
-
}
|
|
222
|
-
: {};
|
|
223
|
-
|
|
224
|
-
// 处理最大行数
|
|
225
|
-
const overflowStyle = maxLines
|
|
226
|
-
? {
|
|
227
|
-
display: '-webkit-box',
|
|
228
|
-
WebkitBoxOrient: 'vertical' as any,
|
|
229
|
-
WebkitLineClamp: maxLines,
|
|
230
|
-
overflow: 'hidden',
|
|
231
|
-
textOverflow: 'ellipsis',
|
|
232
|
-
}
|
|
233
|
-
: {};
|
|
234
|
-
|
|
235
|
-
// 处理省略号
|
|
236
|
-
const ellipsisStyle = ellipsis
|
|
237
|
-
? {
|
|
238
|
-
whiteSpace: 'nowrap',
|
|
239
|
-
overflow: 'hidden',
|
|
240
|
-
textOverflow: 'ellipsis',
|
|
241
|
-
}
|
|
242
|
-
: {};
|
|
243
|
-
|
|
244
|
-
// 处理换行
|
|
245
|
-
const wrapStyle = !wrap
|
|
246
|
-
? {
|
|
247
|
-
whiteSpace: 'nowrap',
|
|
248
|
-
}
|
|
249
|
-
: {};
|
|
250
|
-
|
|
251
|
-
// 处理断词
|
|
252
|
-
const breakWordStyle = breakWord
|
|
253
|
-
? {
|
|
254
|
-
wordBreak: 'break-word' as any,
|
|
255
|
-
overflowWrap: 'break-word' as any,
|
|
256
|
-
}
|
|
257
|
-
: {};
|
|
258
|
-
|
|
259
|
-
return {
|
|
260
|
-
...sizeStyles,
|
|
261
|
-
fontWeight: weightStyles,
|
|
262
|
-
color: colorStyles,
|
|
263
|
-
textAlign: align,
|
|
264
|
-
textDecoration: finalDecoration,
|
|
265
|
-
textTransform: transform,
|
|
266
|
-
textOverflow: overflow,
|
|
267
|
-
direction,
|
|
268
|
-
fontStyle,
|
|
269
|
-
fontVariant: variant,
|
|
270
|
-
letterSpacing: _letterSpacingValue,
|
|
271
|
-
lineHeight: _lineHeightValue,
|
|
272
|
-
opacity: loading || disabled ? statusStyles['opacity'] : 1,
|
|
273
|
-
cursor: loading || disabled ? statusStyles['cursor'] : 'default',
|
|
274
|
-
pointerEvents: (loading || disabled ? statusStyles['pointerEvents'] : 'auto') as any,
|
|
275
|
-
transition: animated ? `all ${animationDuration}ms ease-in-out` : 'none',
|
|
276
|
-
backgroundColor: highlight ? highlightColor : 'transparent',
|
|
277
|
-
textShadow,
|
|
278
|
-
WebkitTextStroke: textOutline ? `${textOutline}px currentColor` : undefined,
|
|
279
|
-
fontFamily: Array.isArray(fontFamily) ? fontFamily.join(', ') : fontFamily,
|
|
280
|
-
wordSpacing: typeof wordSpacing === 'number' ? `${wordSpacing}px` : wordSpacing,
|
|
281
|
-
textIndent: typeof textIndent === 'number' ? `${textIndent}px` : textIndent,
|
|
282
|
-
whiteSpace,
|
|
283
|
-
verticalAlign,
|
|
284
|
-
writingMode,
|
|
285
|
-
textRendering,
|
|
286
|
-
...backgroundStyle,
|
|
287
|
-
...overflowStyle,
|
|
288
|
-
...ellipsisStyle,
|
|
289
|
-
...wrapStyle,
|
|
290
|
-
...breakWordStyle,
|
|
291
|
-
...style,
|
|
292
|
-
};
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
/** 生成链接样式 */
|
|
296
|
-
static getLinkStyle(props: {
|
|
297
|
-
color?: string;
|
|
298
|
-
underline?: boolean;
|
|
299
|
-
visited?: boolean;
|
|
300
|
-
active?: boolean;
|
|
301
|
-
hover?: boolean;
|
|
302
|
-
}): React.CSSProperties {
|
|
303
|
-
const { color = '#0ea5e9', underline = true, visited, active, hover } = props;
|
|
304
|
-
|
|
305
|
-
return {
|
|
306
|
-
color: visited ? '#7c3aed' : active ? '#0369a1' : hover ? '#0284c7' : color,
|
|
307
|
-
textDecoration: underline ? 'underline' : 'none',
|
|
308
|
-
cursor: 'pointer',
|
|
309
|
-
transition: 'color 0.2s ease-in-out',
|
|
310
|
-
};
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
/** 生成代码样式 */
|
|
314
|
-
static getCodeStyle(props: { variant?: 'inline' | 'block'; language?: string }): React.CSSProperties {
|
|
315
|
-
const { variant = 'inline' } = props;
|
|
316
|
-
|
|
317
|
-
const baseStyle: React.CSSProperties = {
|
|
318
|
-
fontFamily: 'Monaco, Menlo, "Ubuntu Mono", monospace',
|
|
319
|
-
fontSize: '0.875em',
|
|
320
|
-
backgroundColor: '#f3f4f6',
|
|
321
|
-
padding: variant === 'inline' ? '0.125em 0.25em' : '0.5em',
|
|
322
|
-
borderRadius: '0.25em',
|
|
323
|
-
border: '1px solid #e5e7eb',
|
|
324
|
-
};
|
|
325
|
-
|
|
326
|
-
if (variant === 'block') {
|
|
327
|
-
return {
|
|
328
|
-
...baseStyle,
|
|
329
|
-
display: 'block',
|
|
330
|
-
padding: '1em',
|
|
331
|
-
overflowX: 'auto',
|
|
332
|
-
whiteSpace: 'pre',
|
|
333
|
-
};
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
return baseStyle;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
/** 生成引用样式 */
|
|
340
|
-
static getQuoteStyle(props: {
|
|
341
|
-
variant?: 'solid' | 'dashed' | 'dotted';
|
|
342
|
-
position?: 'left' | 'right';
|
|
343
|
-
}): React.CSSProperties {
|
|
344
|
-
const { variant = 'solid', position = 'left' } = props;
|
|
345
|
-
|
|
346
|
-
return {
|
|
347
|
-
fontStyle: 'italic',
|
|
348
|
-
borderLeft: position === 'left' ? `4px ${variant} #e5e7eb` : 'none',
|
|
349
|
-
borderRight: position === 'right' ? `4px ${variant} #e5e7eb` : 'none',
|
|
350
|
-
paddingLeft: position === 'left' ? '1em' : '0',
|
|
351
|
-
paddingRight: position === 'right' ? '1em' : '0',
|
|
352
|
-
margin: '1em 0',
|
|
353
|
-
color: '#6b7280',
|
|
354
|
-
};
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
/** 生成标题样式 */
|
|
358
|
-
static getHeadingStyle(level: 1 | 2 | 3 | 4 | 5 | 6): React.CSSProperties {
|
|
359
|
-
const styles = {
|
|
360
|
-
1: { fontSize: '2.5em', fontWeight: 800, _lineHeight: 1.2, marginBottom: '0.5em' },
|
|
361
|
-
2: { fontSize: '2em', fontWeight: 700, _lineHeight: 1.3, marginBottom: '0.5em' },
|
|
362
|
-
3: { fontSize: '1.75em', fontWeight: 600, _lineHeight: 1.4, marginBottom: '0.5em' },
|
|
363
|
-
4: { fontSize: '1.5em', fontWeight: 600, _lineHeight: 1.5, marginBottom: '0.5em' },
|
|
364
|
-
5: { fontSize: '1.25em', fontWeight: 500, _lineHeight: 1.6, marginBottom: '0.5em' },
|
|
365
|
-
6: { fontSize: '1em', fontWeight: 500, _lineHeight: 1.7, marginBottom: '0.5em' },
|
|
366
|
-
};
|
|
367
|
-
|
|
368
|
-
return styles[level];
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
/** 生成加载动画样式 */
|
|
372
|
-
static getLoadingStyle(): React.CSSProperties {
|
|
373
|
-
return {
|
|
374
|
-
display: 'inline-block',
|
|
375
|
-
width: '1em',
|
|
376
|
-
height: '1em',
|
|
377
|
-
border: '2px solid transparent',
|
|
378
|
-
borderTopColor: 'currentColor',
|
|
379
|
-
borderRadius: '50%',
|
|
380
|
-
animation: 'spin 1s linear infinite',
|
|
381
|
-
verticalAlign: 'middle',
|
|
382
|
-
marginRight: '0.5em',
|
|
383
|
-
};
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
/** 生成CSS变量 */
|
|
387
|
-
static generateCSSVariables(): string {
|
|
388
|
-
return `
|
|
389
|
-
:root {
|
|
390
|
-
--text-primary-color: #0ea5e9;
|
|
391
|
-
--text-secondary-color: #6b7280;
|
|
392
|
-
--text-success-color: #22c55e;
|
|
393
|
-
--text-warning-color: #f59e0b;
|
|
394
|
-
--text-error-color: #ef4444;
|
|
395
|
-
--text-info-color: #3b82f6;
|
|
396
|
-
--text-_disabled-color: #9ca3af;
|
|
397
|
-
--text-_disabled-opacity: 0.5;
|
|
398
|
-
--text-_loading-opacity: 0.7;
|
|
399
|
-
--text-animation-duration: 300ms;
|
|
400
|
-
--text-highlight-color: #fef3c7;
|
|
401
|
-
--text-link-color: #0ea5e9;
|
|
402
|
-
--text-link-hover-color: #0284c7;
|
|
403
|
-
--text-link-visited-color: #7c3aed;
|
|
404
|
-
--text-code-background: #f3f4f6;
|
|
405
|
-
--text-code-border: #e5e7eb;
|
|
406
|
-
--text-quote-border: #e5e7eb;
|
|
407
|
-
--text-quote-color: #6b7280;
|
|
408
|
-
}
|
|
409
|
-
`;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
/** 生成关键帧动画 */
|
|
413
|
-
static generateKeyframes(): string {
|
|
414
|
-
return `
|
|
415
|
-
@keyframes spin {
|
|
416
|
-
from {
|
|
417
|
-
transform: rotate(0deg);
|
|
418
|
-
}
|
|
419
|
-
to {
|
|
420
|
-
transform: rotate(360deg);
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
@keyframes pulse {
|
|
425
|
-
0%, 100% {
|
|
426
|
-
opacity: 1;
|
|
427
|
-
}
|
|
428
|
-
50% {
|
|
429
|
-
opacity: 0.5;
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
@keyframes fadeIn {
|
|
434
|
-
from {
|
|
435
|
-
opacity: 0;
|
|
436
|
-
transform: translateY(10px);
|
|
437
|
-
}
|
|
438
|
-
to {
|
|
439
|
-
opacity: 1;
|
|
440
|
-
transform: translateY(0);
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
@keyframes slideIn {
|
|
445
|
-
from {
|
|
446
|
-
transform: translateX(-100%);
|
|
447
|
-
}
|
|
448
|
-
to {
|
|
449
|
-
transform: translateX(0);
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
@keyframes typewriter {
|
|
454
|
-
from {
|
|
455
|
-
width: 0;
|
|
456
|
-
}
|
|
457
|
-
to {
|
|
458
|
-
width: 100%;
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
@keyframes blink {
|
|
463
|
-
0%, 50% {
|
|
464
|
-
opacity: 1;
|
|
465
|
-
}
|
|
466
|
-
51%, 100% {
|
|
467
|
-
opacity: 0;
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
`;
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
/** 获取尺寸类名 */
|
|
474
|
-
static getSizeClassName(size: TextSize): string {
|
|
475
|
-
return `taro-uno-text--${size}`;
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
/** 获取权重类名 */
|
|
479
|
-
static getWeightClassName(weight: TextWeight): string {
|
|
480
|
-
return `taro-uno-text--${weight}`;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
/** 获取颜色类名 */
|
|
484
|
-
static getColorClassName(color: TextColor): string {
|
|
485
|
-
return `taro-uno-text--${color}`;
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
/** 获取状态类名 */
|
|
489
|
-
static getStatusClassName(status: TextStatus): string {
|
|
490
|
-
return `taro-uno-text--${status}`;
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
/** 获取类型类名 */
|
|
494
|
-
static getTypeClassName(type: string): string {
|
|
495
|
-
return `taro-uno-text--${type}`;
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
/** 导出样式工具 */
|
|
500
|
-
export const textStyles = TextStyles;
|