@seakoi/native-ui 1.1.3 → 1.3.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/CHANGELOG.md +52 -0
- package/dist/commonjs/components/base/carousel/carousel-indicator.js +56 -0
- package/dist/commonjs/components/base/carousel/carousel-slides.js +140 -0
- package/dist/commonjs/components/base/carousel/carousel.js +114 -122
- package/dist/commonjs/components/base/carousel/hooks/index.js +0 -14
- package/dist/commonjs/components/base/carousel/hooks/use-carousel-index.js +16 -13
- package/dist/commonjs/components/base/carousel/hooks/use-carousel-lifecycle.js +6 -2
- package/dist/commonjs/components/base/carousel/hooks/use-carousel-pan-responder.js +40 -12
- package/dist/commonjs/components/base/carousel/hooks/use-carousel-position.js +6 -2
- package/dist/commonjs/components/base/carousel/index.js +1 -15
- package/dist/commonjs/components/base/carousel/style/index.js +12 -0
- package/dist/commonjs/components/base/date-picker/date-picker.js +56 -44
- package/dist/commonjs/components/base/date-picker/date-range-picker.js +142 -50
- package/dist/commonjs/components/base/date-picker/style/index.js +15 -0
- package/dist/commonjs/components/base/date-picker-view/date-picker-view.js +19 -53
- package/dist/commonjs/components/base/date-picker-view/index.js +0 -22
- package/dist/commonjs/components/base/index.js +53 -9
- package/dist/commonjs/components/base/input/base-input.js +4 -2
- package/dist/commonjs/components/base/overflow/all-mode-overflow.js +49 -0
- package/dist/commonjs/components/base/overflow/fixed-count-overflow.js +70 -0
- package/dist/commonjs/components/base/overflow/index.js +16 -0
- package/dist/commonjs/components/base/overflow/overflow.js +72 -0
- package/dist/commonjs/components/base/overflow/responsive-overflow.js +280 -0
- package/dist/commonjs/components/base/overflow/style/index.js +39 -0
- package/dist/commonjs/components/base/overflow/types.js +5 -0
- package/dist/commonjs/components/base/picker/index.js +26 -4
- package/dist/commonjs/components/base/picker/picker-content.js +64 -0
- package/dist/commonjs/components/base/picker/picker-context.js +9 -0
- package/dist/commonjs/components/base/picker/picker-field.js +39 -0
- package/dist/commonjs/components/base/picker/picker.js +26 -95
- package/dist/commonjs/components/base/picker/style/index.js +8 -4
- package/dist/commonjs/components/base/picker-backup/base-picker-container.js +50 -0
- package/dist/commonjs/components/base/picker-backup/index.js +27 -0
- package/dist/commonjs/components/base/picker-backup/picker-backup.js +75 -0
- package/dist/commonjs/components/base/picker-backup/picker-copy.js +106 -0
- package/dist/commonjs/components/base/{picker → picker-backup}/picker-trigger.js +5 -5
- package/dist/commonjs/components/base/picker-backup/style/index.js +19 -0
- package/dist/commonjs/components/base/picker-backup/utils.js +53 -0
- package/dist/commonjs/components/base/picker-view/picker-view-column.js +15 -0
- package/dist/commonjs/components/base/picker-view/picker-view.js +4 -4
- package/dist/commonjs/components/base/portal/portal-host.js +5 -3
- package/dist/commonjs/components/base/select/hooks/use-select-actions.js +155 -0
- package/dist/commonjs/components/base/select/hooks/use-select-options.js +169 -0
- package/dist/commonjs/components/base/select/hooks/use-selector.js +104 -0
- package/dist/commonjs/components/base/select/index.js +16 -0
- package/dist/commonjs/components/base/select/select-multiple-content.js +182 -0
- package/dist/commonjs/components/base/select/select-popup.js +233 -0
- package/dist/commonjs/components/base/select/select-single-content.js +100 -0
- package/dist/commonjs/components/base/select/select-suffix.js +67 -0
- package/dist/commonjs/components/base/select/select.js +285 -0
- package/dist/commonjs/components/base/select/style/index.js +40 -0
- package/dist/commonjs/components/base/select/style/select-multiple-content-styles.js +46 -0
- package/dist/commonjs/components/base/select/style/select-popup-styles.js +67 -0
- package/dist/commonjs/components/base/select/style/select-single-content-styles.js +28 -0
- package/dist/commonjs/components/base/select/style/select-styles.js +46 -0
- package/dist/commonjs/components/base/select/style/select-suffix-styles.js +21 -0
- package/dist/commonjs/components/base/select/types.js +5 -0
- package/dist/commonjs/components/base/tabs/style/index.js +37 -0
- package/dist/commonjs/components/base/tabs/tabs.js +90 -45
- package/dist/commonjs/components/base/tag/index.js +20 -0
- package/dist/commonjs/components/base/tag/style/index.js +89 -0
- package/dist/commonjs/components/base/tag/tag-context.js +12 -0
- package/dist/commonjs/components/base/tag/tag-group.js +35 -0
- package/dist/commonjs/components/base/tag/tag.js +47 -0
- package/dist/commonjs/components/base/tag/types.js +5 -0
- package/dist/commonjs/native-provider/native-provider.js +5 -5
- package/dist/commonjs/shared/utils/index.js +11 -0
- package/dist/commonjs/shared/utils/object.js +39 -0
- package/dist/module/components/base/carousel/carousel-indicator.js +51 -0
- package/dist/module/components/base/carousel/carousel-slides.js +135 -0
- package/dist/module/components/base/carousel/carousel.js +116 -124
- package/dist/module/components/base/carousel/hooks/index.js +0 -2
- package/dist/module/components/base/carousel/hooks/use-carousel-index.js +15 -11
- package/dist/module/components/base/carousel/hooks/use-carousel-lifecycle.js +6 -2
- package/dist/module/components/base/carousel/hooks/use-carousel-pan-responder.js +40 -11
- package/dist/module/components/base/carousel/hooks/use-carousel-position.js +5 -1
- package/dist/module/components/base/carousel/index.js +1 -5
- package/dist/module/components/base/carousel/style/index.js +12 -0
- package/dist/module/components/base/date-picker/date-picker.js +60 -48
- package/dist/module/components/base/date-picker/date-range-picker.js +146 -54
- package/dist/module/components/base/date-picker/style/index.js +11 -0
- package/dist/module/components/base/date-picker-view/date-picker-view.js +23 -57
- package/dist/module/components/base/date-picker-view/index.js +1 -3
- package/dist/module/components/base/index.js +4 -0
- package/dist/module/components/base/input/base-input.js +4 -2
- package/dist/module/components/base/overflow/all-mode-overflow.js +43 -0
- package/dist/module/components/base/overflow/fixed-count-overflow.js +64 -0
- package/dist/module/components/base/overflow/index.js +3 -0
- package/dist/module/components/base/overflow/overflow.js +66 -0
- package/dist/module/components/base/overflow/responsive-overflow.js +274 -0
- package/dist/module/components/base/overflow/style/index.js +36 -0
- package/dist/module/components/base/overflow/types.js +3 -0
- package/dist/module/components/base/picker/index.js +9 -1
- package/dist/module/components/base/picker/picker-content.js +58 -0
- package/dist/module/components/base/picker/picker-context.js +4 -0
- package/dist/module/components/base/picker/picker-field.js +34 -0
- package/dist/module/components/base/picker/picker.js +29 -98
- package/dist/module/components/base/picker/style/index.js +7 -3
- package/dist/module/components/base/picker-backup/base-picker-container.js +44 -0
- package/dist/module/components/base/picker-backup/index.js +4 -0
- package/dist/module/components/base/picker-backup/picker-backup.js +69 -0
- package/dist/module/components/base/picker-backup/picker-copy.js +101 -0
- package/dist/module/components/base/{picker → picker-backup}/picker-trigger.js +2 -2
- package/dist/module/components/base/picker-backup/style/index.js +15 -0
- package/dist/module/components/base/picker-backup/utils.js +48 -0
- package/dist/module/components/base/picker-view/picker-view-column.js +15 -0
- package/dist/module/components/base/picker-view/picker-view.js +4 -4
- package/dist/module/components/base/portal/portal-host.js +4 -3
- package/dist/module/components/base/select/hooks/use-select-actions.js +151 -0
- package/dist/module/components/base/select/hooks/use-select-options.js +162 -0
- package/dist/module/components/base/select/hooks/use-selector.js +100 -0
- package/dist/module/components/base/select/index.js +3 -0
- package/dist/module/components/base/select/select-multiple-content.js +176 -0
- package/dist/module/components/base/select/select-popup.js +227 -0
- package/dist/module/components/base/select/select-single-content.js +94 -0
- package/dist/module/components/base/select/select-suffix.js +61 -0
- package/dist/module/components/base/select/select.js +279 -0
- package/dist/module/components/base/select/style/index.js +7 -0
- package/dist/module/components/base/select/style/select-multiple-content-styles.js +43 -0
- package/dist/module/components/base/select/style/select-popup-styles.js +64 -0
- package/dist/module/components/base/select/style/select-single-content-styles.js +25 -0
- package/dist/module/components/base/select/style/select-styles.js +43 -0
- package/dist/module/components/base/select/style/select-suffix-styles.js +18 -0
- package/dist/module/components/base/select/types.js +3 -0
- package/dist/module/components/base/tabs/style/index.js +33 -0
- package/dist/module/components/base/tabs/tabs.js +92 -47
- package/dist/module/components/base/tag/index.js +5 -0
- package/dist/module/components/base/tag/style/index.js +85 -0
- package/dist/module/components/base/tag/tag-context.js +8 -0
- package/dist/module/components/base/tag/tag-group.js +29 -0
- package/dist/module/components/base/tag/tag.js +41 -0
- package/dist/module/components/base/tag/types.js +3 -0
- package/dist/module/native-provider/native-provider.js +5 -5
- package/dist/module/shared/utils/index.js +2 -1
- package/dist/module/shared/utils/object.js +35 -0
- package/dist/typescript/components/base/carousel/carousel-indicator.d.ts +42 -0
- package/dist/typescript/components/base/carousel/carousel-indicator.d.ts.map +1 -0
- package/dist/typescript/components/base/carousel/carousel-slides.d.ts +49 -0
- package/dist/typescript/components/base/carousel/carousel-slides.d.ts.map +1 -0
- package/dist/typescript/components/base/carousel/carousel.d.ts +16 -11
- package/dist/typescript/components/base/carousel/carousel.d.ts.map +1 -1
- package/dist/typescript/components/base/carousel/hooks/index.d.ts +0 -2
- package/dist/typescript/components/base/carousel/hooks/index.d.ts.map +1 -1
- package/dist/typescript/components/base/carousel/hooks/use-carousel-index.d.ts.map +1 -1
- package/dist/typescript/components/base/carousel/hooks/use-carousel-lifecycle.d.ts.map +1 -1
- package/dist/typescript/components/base/carousel/hooks/use-carousel-pan-responder.d.ts.map +1 -1
- package/dist/typescript/components/base/carousel/hooks/use-carousel-position.d.ts.map +1 -1
- package/dist/typescript/components/base/carousel/index.d.ts +1 -4
- package/dist/typescript/components/base/carousel/index.d.ts.map +1 -1
- package/dist/typescript/components/base/carousel/style/index.d.ts +12 -0
- package/dist/typescript/components/base/carousel/style/index.d.ts.map +1 -1
- package/dist/typescript/components/base/carousel/types.d.ts +8 -17
- package/dist/typescript/components/base/carousel/types.d.ts.map +1 -1
- package/dist/typescript/components/base/date-picker/date-picker.d.ts +4 -2
- package/dist/typescript/components/base/date-picker/date-picker.d.ts.map +1 -1
- package/dist/typescript/components/base/date-picker/date-range-picker.d.ts +12 -3
- package/dist/typescript/components/base/date-picker/date-range-picker.d.ts.map +1 -1
- package/dist/typescript/components/base/date-picker/style/index.d.ts +9 -0
- package/dist/typescript/components/base/date-picker/style/index.d.ts.map +1 -0
- package/dist/typescript/components/base/date-picker-view/date-picker-view.d.ts +1 -6
- package/dist/typescript/components/base/date-picker-view/date-picker-view.d.ts.map +1 -1
- package/dist/typescript/components/base/date-picker-view/index.d.ts +0 -2
- package/dist/typescript/components/base/date-picker-view/index.d.ts.map +1 -1
- package/dist/typescript/components/base/date-picker-view/types.d.ts +1 -1
- package/dist/typescript/components/base/index.d.ts +4 -0
- package/dist/typescript/components/base/index.d.ts.map +1 -1
- package/dist/typescript/components/base/input/base-input.d.ts.map +1 -1
- package/dist/typescript/components/base/overflow/all-mode-overflow.d.ts +11 -0
- package/dist/typescript/components/base/overflow/all-mode-overflow.d.ts.map +1 -0
- package/dist/typescript/components/base/overflow/fixed-count-overflow.d.ts +11 -0
- package/dist/typescript/components/base/overflow/fixed-count-overflow.d.ts.map +1 -0
- package/dist/typescript/components/base/overflow/index.d.ts +3 -0
- package/dist/typescript/components/base/overflow/index.d.ts.map +1 -0
- package/dist/typescript/components/base/overflow/overflow.d.ts +13 -0
- package/dist/typescript/components/base/overflow/overflow.d.ts.map +1 -0
- package/dist/typescript/components/base/overflow/responsive-overflow.d.ts +12 -0
- package/dist/typescript/components/base/overflow/responsive-overflow.d.ts.map +1 -0
- package/dist/typescript/components/base/overflow/style/index.d.ts +31 -0
- package/dist/typescript/components/base/overflow/style/index.d.ts.map +1 -0
- package/dist/typescript/components/base/overflow/types.d.ts +77 -0
- package/dist/typescript/components/base/overflow/types.d.ts.map +1 -0
- package/dist/typescript/components/base/picker/index.d.ts +7 -1
- package/dist/typescript/components/base/picker/index.d.ts.map +1 -1
- package/dist/typescript/components/base/picker/picker-content.d.ts +27 -0
- package/dist/typescript/components/base/picker/picker-content.d.ts.map +1 -0
- package/dist/typescript/components/base/picker/picker-context.d.ts +18 -0
- package/dist/typescript/components/base/picker/picker-context.d.ts.map +1 -0
- package/dist/typescript/components/base/picker/picker-field.d.ts +10 -0
- package/dist/typescript/components/base/picker/picker-field.d.ts.map +1 -0
- package/dist/typescript/components/base/picker/picker.d.ts +22 -11
- package/dist/typescript/components/base/picker/picker.d.ts.map +1 -1
- package/dist/typescript/components/base/picker/style/index.d.ts +6 -2
- package/dist/typescript/components/base/picker/style/index.d.ts.map +1 -1
- package/dist/typescript/components/base/picker-backup/base-picker-container.d.ts +15 -0
- package/dist/typescript/components/base/picker-backup/base-picker-container.d.ts.map +1 -0
- package/dist/typescript/components/base/picker-backup/index.d.ts +3 -0
- package/dist/typescript/components/base/picker-backup/index.d.ts.map +1 -0
- package/dist/typescript/components/base/picker-backup/picker-backup.d.ts +26 -0
- package/dist/typescript/components/base/picker-backup/picker-backup.d.ts.map +1 -0
- package/dist/typescript/components/base/picker-backup/picker-copy.d.ts +13 -0
- package/dist/typescript/components/base/picker-backup/picker-copy.d.ts.map +1 -0
- package/dist/typescript/components/base/picker-backup/picker-trigger.d.ts.map +1 -0
- package/dist/typescript/components/base/picker-backup/style/index.d.ts +13 -0
- package/dist/typescript/components/base/picker-backup/style/index.d.ts.map +1 -0
- package/dist/typescript/components/base/picker-backup/utils.d.ts +8 -0
- package/dist/typescript/components/base/picker-backup/utils.d.ts.map +1 -0
- package/dist/typescript/components/base/picker-view/picker-view-column.d.ts.map +1 -1
- package/dist/typescript/components/base/picker-view/utils/picker.d.ts +3 -3
- package/dist/typescript/components/base/picker-view/utils/picker.d.ts.map +1 -1
- package/dist/typescript/components/base/portal/portal-host.d.ts +1 -0
- package/dist/typescript/components/base/portal/portal-host.d.ts.map +1 -1
- package/dist/typescript/components/base/portal/types.d.ts +2 -0
- package/dist/typescript/components/base/portal/types.d.ts.map +1 -1
- package/dist/typescript/components/base/select/hooks/use-select-actions.d.ts +144 -0
- package/dist/typescript/components/base/select/hooks/use-select-actions.d.ts.map +1 -0
- package/dist/typescript/components/base/select/hooks/use-select-options.d.ts +91 -0
- package/dist/typescript/components/base/select/hooks/use-select-options.d.ts.map +1 -0
- package/dist/typescript/components/base/select/hooks/use-selector.d.ts +90 -0
- package/dist/typescript/components/base/select/hooks/use-selector.d.ts.map +1 -0
- package/dist/typescript/components/base/select/index.d.ts +3 -0
- package/dist/typescript/components/base/select/index.d.ts.map +1 -0
- package/dist/typescript/components/base/select/select-multiple-content.d.ts +51 -0
- package/dist/typescript/components/base/select/select-multiple-content.d.ts.map +1 -0
- package/dist/typescript/components/base/select/select-popup.d.ts +107 -0
- package/dist/typescript/components/base/select/select-popup.d.ts.map +1 -0
- package/dist/typescript/components/base/select/select-single-content.d.ts +48 -0
- package/dist/typescript/components/base/select/select-single-content.d.ts.map +1 -0
- package/dist/typescript/components/base/select/select-suffix.d.ts +43 -0
- package/dist/typescript/components/base/select/select-suffix.d.ts.map +1 -0
- package/dist/typescript/components/base/select/select.d.ts +40 -0
- package/dist/typescript/components/base/select/select.d.ts.map +1 -0
- package/dist/typescript/components/base/select/style/index.d.ts +6 -0
- package/dist/typescript/components/base/select/style/index.d.ts.map +1 -0
- package/dist/typescript/components/base/select/style/select-multiple-content-styles.d.ts +40 -0
- package/dist/typescript/components/base/select/style/select-multiple-content-styles.d.ts.map +1 -0
- package/dist/typescript/components/base/select/style/select-popup-styles.d.ts +61 -0
- package/dist/typescript/components/base/select/style/select-popup-styles.d.ts.map +1 -0
- package/dist/typescript/components/base/select/style/select-single-content-styles.d.ts +22 -0
- package/dist/typescript/components/base/select/style/select-single-content-styles.d.ts.map +1 -0
- package/dist/typescript/components/base/select/style/select-styles.d.ts +40 -0
- package/dist/typescript/components/base/select/style/select-styles.d.ts.map +1 -0
- package/dist/typescript/components/base/select/style/select-suffix-styles.d.ts +15 -0
- package/dist/typescript/components/base/select/style/select-suffix-styles.d.ts.map +1 -0
- package/dist/typescript/components/base/select/types.d.ts +206 -0
- package/dist/typescript/components/base/select/types.d.ts.map +1 -0
- package/dist/typescript/components/base/tabs/style/index.d.ts +29 -0
- package/dist/typescript/components/base/tabs/style/index.d.ts.map +1 -0
- package/dist/typescript/components/base/tabs/tabs.d.ts +26 -5
- package/dist/typescript/components/base/tabs/tabs.d.ts.map +1 -1
- package/dist/typescript/components/base/tag/index.d.ts +5 -0
- package/dist/typescript/components/base/tag/index.d.ts.map +1 -0
- package/dist/typescript/components/base/tag/style/index.d.ts +61 -0
- package/dist/typescript/components/base/tag/style/index.d.ts.map +1 -0
- package/dist/typescript/components/base/tag/tag-context.d.ts +3 -0
- package/dist/typescript/components/base/tag/tag-context.d.ts.map +1 -0
- package/dist/typescript/components/base/tag/tag-group.d.ts +4 -0
- package/dist/typescript/components/base/tag/tag-group.d.ts.map +1 -0
- package/dist/typescript/components/base/tag/tag.d.ts +4 -0
- package/dist/typescript/components/base/tag/tag.d.ts.map +1 -0
- package/dist/typescript/components/base/tag/types.d.ts +48 -0
- package/dist/typescript/components/base/tag/types.d.ts.map +1 -0
- package/dist/typescript/native-provider/native-provider.d.ts +2 -0
- package/dist/typescript/native-provider/native-provider.d.ts.map +1 -1
- package/dist/typescript/shared/utils/index.d.ts +1 -0
- package/dist/typescript/shared/utils/index.d.ts.map +1 -1
- package/dist/typescript/shared/utils/object.d.ts +21 -0
- package/dist/typescript/shared/utils/object.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/base/carousel/carousel-indicator.tsx +80 -0
- package/src/components/base/carousel/carousel-slides.tsx +177 -0
- package/src/components/base/carousel/carousel.tsx +108 -118
- package/src/components/base/carousel/hooks/index.ts +0 -2
- package/src/components/base/carousel/hooks/use-carousel-index.ts +13 -9
- package/src/components/base/carousel/hooks/use-carousel-lifecycle.ts +4 -3
- package/src/components/base/carousel/hooks/use-carousel-pan-responder.ts +40 -16
- package/src/components/base/carousel/hooks/use-carousel-position.ts +4 -1
- package/src/components/base/carousel/index.ts +1 -3
- package/src/components/base/carousel/style/index.ts +12 -0
- package/src/components/base/carousel/types.ts +8 -21
- package/src/components/base/date-picker/date-picker.tsx +64 -61
- package/src/components/base/date-picker/date-range-picker.tsx +178 -70
- package/src/components/base/date-picker/style/index.ts +10 -0
- package/src/components/base/date-picker-view/date-picker-view.tsx +21 -68
- package/src/components/base/date-picker-view/index.ts +0 -2
- package/src/components/base/date-picker-view/types.ts +1 -1
- package/src/components/base/index.ts +4 -0
- package/src/components/base/input/base-input.tsx +4 -2
- package/src/components/base/overflow/all-mode-overflow.tsx +49 -0
- package/src/components/base/overflow/fixed-count-overflow.tsx +71 -0
- package/src/components/base/overflow/index.ts +2 -0
- package/src/components/base/overflow/overflow.tsx +60 -0
- package/src/components/base/overflow/responsive-overflow.tsx +349 -0
- package/src/components/base/overflow/style/index.ts +32 -0
- package/src/components/base/overflow/types.ts +75 -0
- package/src/components/base/picker/index.ts +11 -1
- package/src/components/base/picker/picker-content.tsx +90 -0
- package/src/components/base/picker/picker-context.ts +19 -0
- package/src/components/base/picker/picker-field.tsx +56 -0
- package/src/components/base/picker/picker.tsx +49 -116
- package/src/components/base/picker/style/index.ts +4 -2
- package/src/components/base/picker-backup/base-picker-container.tsx +55 -0
- package/src/components/base/picker-backup/index.ts +2 -0
- package/src/components/base/picker-backup/picker-backup.tsx +110 -0
- package/src/components/base/picker-backup/picker-copy.tsx +125 -0
- package/src/components/base/{picker → picker-backup}/picker-trigger.tsx +2 -2
- package/src/components/base/picker-backup/style/index.ts +14 -0
- package/src/components/base/picker-backup/utils.ts +62 -0
- package/src/components/base/picker-view/picker-view-column.tsx +20 -0
- package/src/components/base/picker-view/picker-view.tsx +4 -4
- package/src/components/base/picker-view/utils/picker.ts +3 -5
- package/src/components/base/portal/portal-host.tsx +13 -3
- package/src/components/base/portal/types.ts +2 -0
- package/src/components/base/select/hooks/use-select-actions.ts +263 -0
- package/src/components/base/select/hooks/use-select-options.ts +250 -0
- package/src/components/base/select/hooks/use-selector.ts +155 -0
- package/src/components/base/select/index.ts +2 -0
- package/src/components/base/select/select-multiple-content.tsx +292 -0
- package/src/components/base/select/select-popup.tsx +384 -0
- package/src/components/base/select/select-single-content.tsx +127 -0
- package/src/components/base/select/select-suffix.tsx +100 -0
- package/src/components/base/select/select.tsx +302 -0
- package/src/components/base/select/style/index.ts +5 -0
- package/src/components/base/select/style/select-multiple-content-styles.ts +41 -0
- package/src/components/base/select/style/select-popup-styles.ts +62 -0
- package/src/components/base/select/style/select-single-content-styles.ts +23 -0
- package/src/components/base/select/style/select-styles.ts +41 -0
- package/src/components/base/select/style/select-suffix-styles.ts +16 -0
- package/src/components/base/select/types.ts +261 -0
- package/src/components/base/tabs/style/index.ts +32 -0
- package/src/components/base/tabs/tabs.tsx +146 -55
- package/src/components/base/tag/index.ts +5 -0
- package/src/components/base/tag/style/index.tsx +84 -0
- package/src/components/base/tag/tag-context.ts +9 -0
- package/src/components/base/tag/tag-group.tsx +31 -0
- package/src/components/base/tag/tag.tsx +50 -0
- package/src/components/base/tag/types.ts +71 -0
- package/src/native-provider/native-provider.tsx +4 -4
- package/src/shared/utils/index.ts +1 -0
- package/src/shared/utils/object.ts +37 -0
- package/dist/commonjs/components/base/carousel/carousel-item.js +0 -45
- package/dist/commonjs/components/base/carousel/constants.js +0 -25
- package/dist/commonjs/components/base/carousel/hooks/use-carousel-indicator.js +0 -63
- package/dist/commonjs/components/base/carousel/hooks/use-carousel-slides.js +0 -95
- package/dist/commonjs/components/base/carousel/utils.js +0 -63
- package/dist/commonjs/components/base/date-picker-view/date-range-picker-view.js +0 -145
- package/dist/commonjs/components/base/date-picker-view/date-time-picker.js +0 -39
- package/dist/module/components/base/carousel/carousel-item.js +0 -40
- package/dist/module/components/base/carousel/constants.js +0 -21
- package/dist/module/components/base/carousel/hooks/use-carousel-indicator.js +0 -58
- package/dist/module/components/base/carousel/hooks/use-carousel-slides.js +0 -90
- package/dist/module/components/base/carousel/utils.js +0 -55
- package/dist/module/components/base/date-picker-view/date-range-picker-view.js +0 -138
- package/dist/module/components/base/date-picker-view/date-time-picker.js +0 -34
- package/dist/typescript/components/base/carousel/carousel-item.d.ts +0 -26
- package/dist/typescript/components/base/carousel/carousel-item.d.ts.map +0 -1
- package/dist/typescript/components/base/carousel/constants.d.ts +0 -17
- package/dist/typescript/components/base/carousel/constants.d.ts.map +0 -1
- package/dist/typescript/components/base/carousel/hooks/use-carousel-indicator.d.ts +0 -37
- package/dist/typescript/components/base/carousel/hooks/use-carousel-indicator.d.ts.map +0 -1
- package/dist/typescript/components/base/carousel/hooks/use-carousel-slides.d.ts +0 -51
- package/dist/typescript/components/base/carousel/hooks/use-carousel-slides.d.ts.map +0 -1
- package/dist/typescript/components/base/carousel/utils.d.ts +0 -25
- package/dist/typescript/components/base/carousel/utils.d.ts.map +0 -1
- package/dist/typescript/components/base/date-picker-view/date-range-picker-view.d.ts +0 -26
- package/dist/typescript/components/base/date-picker-view/date-range-picker-view.d.ts.map +0 -1
- package/dist/typescript/components/base/date-picker-view/date-time-picker.d.ts +0 -3
- package/dist/typescript/components/base/date-picker-view/date-time-picker.d.ts.map +0 -1
- package/dist/typescript/components/base/picker/picker-trigger.d.ts.map +0 -1
- package/src/components/base/carousel/carousel-item.tsx +0 -35
- package/src/components/base/carousel/constants.ts +0 -19
- package/src/components/base/carousel/hooks/use-carousel-indicator.tsx +0 -84
- package/src/components/base/carousel/hooks/use-carousel-slides.tsx +0 -131
- package/src/components/base/carousel/utils.ts +0 -55
- package/src/components/base/date-picker-view/date-range-picker-view.tsx +0 -191
- package/src/components/base/date-picker-view/date-time-picker.tsx +0 -34
- /package/dist/typescript/components/base/{picker → picker-backup}/picker-trigger.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/base/carousel/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/base/carousel/index.ts"],"names":[],"mappings":"AAEA,cAAc,YAAY,CAAC;AAC3B,mBAAmB,SAAS,CAAC;AAE7B,eAAO,MAAM,QAAQ,sGAAY,CAAC"}
|
|
@@ -12,6 +12,18 @@ export declare const useCarouselStyles: (options?: import("../../../../shared/ut
|
|
|
12
12
|
flexGrow: number;
|
|
13
13
|
flexShrink: number;
|
|
14
14
|
};
|
|
15
|
+
trackInnerHorizontal: {
|
|
16
|
+
flexDirection: "row";
|
|
17
|
+
height: "100%";
|
|
18
|
+
flexGrow: number;
|
|
19
|
+
flexShrink: number;
|
|
20
|
+
};
|
|
21
|
+
trackInnerVertical: {
|
|
22
|
+
flexDirection: "column";
|
|
23
|
+
width: "100%";
|
|
24
|
+
flexGrow: number;
|
|
25
|
+
flexShrink: number;
|
|
26
|
+
};
|
|
15
27
|
slide: {
|
|
16
28
|
flexGrow: number;
|
|
17
29
|
flexShrink: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/base/carousel/style/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/base/carousel/style/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmD3B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ReactNode, Ref } from 'react';
|
|
2
2
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
3
|
/** Carousel 组件暴露的实例方法 */
|
|
4
4
|
export interface CarouselRef {
|
|
@@ -10,7 +10,7 @@ export interface CarouselRef {
|
|
|
10
10
|
swipePrev: () => void;
|
|
11
11
|
}
|
|
12
12
|
/** Carousel 组件属性 */
|
|
13
|
-
export interface CarouselProps {
|
|
13
|
+
export interface CarouselProps<Data = unknown> {
|
|
14
14
|
/**
|
|
15
15
|
* 初始展示的索引
|
|
16
16
|
* 该属性是响应式的,当值变化时轮播会跳转到对应索引
|
|
@@ -86,21 +86,19 @@ export interface CarouselProps {
|
|
|
86
86
|
rubberband?: boolean;
|
|
87
87
|
/**
|
|
88
88
|
* 虚拟渲染时前后额外渲染的滑块个数
|
|
89
|
-
* 仅在使用 render prop 且传入 total 时生效
|
|
90
89
|
* @default 2
|
|
91
90
|
*/
|
|
92
91
|
virtualOverscan?: number;
|
|
93
92
|
/**
|
|
94
|
-
*
|
|
95
|
-
* 使用 render prop children 时需要手动传入
|
|
93
|
+
* 数据源数组
|
|
96
94
|
*/
|
|
97
|
-
|
|
95
|
+
data: Data[];
|
|
98
96
|
/**
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
97
|
+
* 渲染每一项的函数
|
|
98
|
+
* @param item - 数据项
|
|
99
|
+
* @param index - 索引
|
|
102
100
|
*/
|
|
103
|
-
|
|
101
|
+
renderItem: (item: Data, index: number) => ReactNode;
|
|
104
102
|
/**
|
|
105
103
|
* 是否阻断原生手势响应
|
|
106
104
|
* 关闭后可与嵌套的 ScrollView 等原生可滚动容器协同工作
|
|
@@ -111,11 +109,4 @@ export interface CarouselProps {
|
|
|
111
109
|
style?: StyleProp<ViewStyle>;
|
|
112
110
|
ref?: Ref<CarouselRef>;
|
|
113
111
|
}
|
|
114
|
-
/** CarouselItem 组件属性 */
|
|
115
|
-
export interface CarouselItemProps {
|
|
116
|
-
/** 滑块内容 */
|
|
117
|
-
children?: ReactNode;
|
|
118
|
-
/** 滑块容器样式 */
|
|
119
|
-
style?: StyleProp<ViewStyle>;
|
|
120
|
-
}
|
|
121
112
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/base/carousel/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/base/carousel/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,yBAAyB;AACzB,MAAM,WAAW,WAAW;IAC1B,cAAc;IACd,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,aAAa;IACb,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,aAAa;IACb,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,oBAAoB;AACpB,MAAM,WAAW,aAAa,CAAC,IAAI,GAAG,OAAO;IAC3C;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAE/B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;;OAGG;IACH,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IAEtC,aAAa;IACb,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAExC,YAAY;IACZ,cAAc,CAAC,EAAE;QACf,gBAAgB;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,cAAc;QACd,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;KAC9B,CAAC;IAEF;;;;OAIG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,SAAS,CAAC,CAAC;IAEpE;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,IAAI,EAAE,IAAI,EAAE,CAAC;IAEb;;;;OAIG;IACH,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;IAErD;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B,WAAW;IACX,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAE7B,GAAG,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;CACxB"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type DatePickerViewProps, type
|
|
3
|
-
export interface DatePickerProps extends
|
|
2
|
+
import { type DatePickerViewProps, type PickerMergeProps } from '#components/base';
|
|
3
|
+
export interface DatePickerProps extends PickerMergeProps<Date>, Omit<DatePickerViewProps, 'onClose' | 'onChange' | 'value' | 'defaultValue'> {
|
|
4
4
|
/**
|
|
5
5
|
* 自定义格式化函数。
|
|
6
6
|
* 配置参考 https://day.js.org/docs/zh-CN/display/format
|
|
7
7
|
*/
|
|
8
8
|
formatter?: string | ((date: Date) => string);
|
|
9
|
+
/** 确定按钮文案 */
|
|
10
|
+
confirmText?: string;
|
|
9
11
|
}
|
|
10
12
|
export declare const DatePicker: React.FC<DatePickerProps>;
|
|
11
13
|
//# sourceMappingURL=date-picker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../../../../src/components/base/date-picker/date-picker.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../../../../src/components/base/date-picker/date-picker.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,EAGL,KAAK,mBAAmB,EAGxB,KAAK,gBAAgB,EACtB,MAAM,kBAAkB,CAAC;AAI1B,MAAM,WAAW,eACf,SAAQ,gBAAgB,CAAC,IAAI,CAAC,EAC5B,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,UAAU,GAAG,OAAO,GAAG,cAAc,CAAC;IAC9E;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC,CAAC;IAC9C,aAAa;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAsEhD,CAAC"}
|
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type
|
|
3
|
-
|
|
2
|
+
import { type PickerMergeProps } from '#components/base';
|
|
3
|
+
import type { DatePickerViewProps } from '../date-picker-view/types';
|
|
4
|
+
export interface DateRangePickerProps extends PickerMergeProps<[Date, Date]>, Omit<DatePickerViewProps, 'onClose' | 'onChange' | 'value' | 'defaultValue'> {
|
|
4
5
|
/**
|
|
5
6
|
* 自定义格式化函数。
|
|
6
7
|
* 配置参考 https://day.js.org/docs/zh-CN/display/format
|
|
7
8
|
*/
|
|
8
|
-
formatter?: string | ((date: [Date, Date]
|
|
9
|
+
formatter?: string | ((date: [Date, Date]) => string);
|
|
9
10
|
/** 范围分隔符 */
|
|
10
11
|
separator?: string;
|
|
12
|
+
/** start 开始时间的占位文案 */
|
|
13
|
+
startText?: string;
|
|
14
|
+
/** end 结束时间的占位文案 */
|
|
15
|
+
endText?: string;
|
|
16
|
+
/** 确定按钮文案 */
|
|
17
|
+
confirmText?: string;
|
|
18
|
+
/** 重置按钮文案 */
|
|
19
|
+
resetText?: string;
|
|
11
20
|
}
|
|
12
21
|
export declare const DateRangePicker: React.FC<DateRangePickerProps>;
|
|
13
22
|
//# sourceMappingURL=date-range-picker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-range-picker.d.ts","sourceRoot":"","sources":["../../../../../src/components/base/date-picker/date-range-picker.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"date-range-picker.d.ts","sourceRoot":"","sources":["../../../../../src/components/base/date-picker/date-range-picker.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,EAKL,KAAK,gBAAgB,EAEtB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGrE,MAAM,WAAW,oBACf,SAAQ,gBAAgB,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,EACpC,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,UAAU,GAAG,OAAO,GAAG,cAAc,CAAC;IAC9E;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,MAAM,CAAC,CAAC;IACtD,YAAY;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sBAAsB;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAgL1D,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const useDatePickerStyles: (options?: import("../../../../shared/utils").AnyObject | undefined) => {
|
|
2
|
+
container: {
|
|
3
|
+
backgroundColor: "rgba(255, 255, 255, 1)";
|
|
4
|
+
padding: number;
|
|
5
|
+
rowGap: number;
|
|
6
|
+
flex: number;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/base/date-picker/style/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB;;;;;;;CAO7B,CAAC"}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { DateTimePickerProps } from './types';
|
|
3
|
-
export interface DatePickerViewProps extends DateTimePickerProps, ModalHeaderBaseProps {
|
|
4
|
-
/** 确定按钮文案 */
|
|
5
|
-
confirmText?: string;
|
|
6
|
-
}
|
|
1
|
+
import type { DatePickerViewProps } from './types';
|
|
7
2
|
export declare const DatePickerView: React.FC<DatePickerViewProps>;
|
|
8
3
|
//# sourceMappingURL=date-picker-view.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker-view.d.ts","sourceRoot":"","sources":["../../../../../src/components/base/date-picker-view/date-picker-view.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"date-picker-view.d.ts","sourceRoot":"","sources":["../../../../../src/components/base/date-picker-view/date-picker-view.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAyBxD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/base/date-picker-view/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/base/date-picker-view/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,mBAAmB,SAAS,CAAC"}
|
|
@@ -13,7 +13,7 @@ export type Columns = ColumnItem[];
|
|
|
13
13
|
export type DatePickerColumnMode = 'Y' | 'Y-M' | 'Y-D' | 'M' | 'M-D' | 'D';
|
|
14
14
|
export type DatePickerColumnType = 'Y' | 'M' | 'D';
|
|
15
15
|
export type RenderLabel = (t: DatePickerColumnType, n: number) => string;
|
|
16
|
-
export interface
|
|
16
|
+
export interface DatePickerViewProps {
|
|
17
17
|
/**
|
|
18
18
|
* 选中项
|
|
19
19
|
*/
|
|
@@ -22,13 +22,17 @@ export * from './link';
|
|
|
22
22
|
export * from './loading';
|
|
23
23
|
export * from './modal';
|
|
24
24
|
export * from './nav-bar';
|
|
25
|
+
export * from './overflow';
|
|
25
26
|
export * from './picker';
|
|
27
|
+
export * from './picker-backup';
|
|
26
28
|
export * from './picker-view';
|
|
27
29
|
export * from './portal';
|
|
28
30
|
export * from './radio';
|
|
29
31
|
export * from './result';
|
|
32
|
+
export * from './select';
|
|
30
33
|
export * from './surface';
|
|
31
34
|
export * from './switch';
|
|
32
35
|
export * from './tabs';
|
|
36
|
+
export * from './tag';
|
|
33
37
|
export * from './text';
|
|
34
38
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/base/index.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/base/index.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-input.d.ts","sourceRoot":"","sources":["../../../../../src/components/base/input/base-input.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,KAAK,aAAa,EAA+B,MAAM,OAAO,CAAC;AAC/E,OAAO,EAGL,KAAK,SAAS,EACd,SAAS,IAAI,eAAe,EAC5B,KAAK,cAAc,IAAI,eAAe,EACtC,KAAK,SAAS,EAEd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAStB,MAAM,WAAW,cACf,SAAQ,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,EACpC,aAAa,CAAC,eAAe,CAAC;IAChC,aAAa;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe;IACf,UAAU,CAAC,EAAE,OAAO,GAAG;QAAE,SAAS,EAAE,KAAK,CAAC,YAAY,CAAA;KAAE,CAAC;IACzD,cAAc;IACd,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,cAAc;IACd,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,YAAY;IACZ,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,eAAe,CAAC,EAAE,cAAc,GAAG,uBAAuB,CAAC;IAC3D,kBAAkB;IAClB,iBAAiB,CAAC,EAAE,CAClB,sBAAsB,EAAE,MAAM,EAC9B,8BAA8B,EAAE,MAAM,KACnC,IAAI,CAAC;IACV,YAAY;IACZ,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC,WAAW;IACX,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,mBAAmB;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,iBAAiB;IACjB,WAAW,CAAC,EAAE,CAAC,eAAe,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,KAAK,MAAM,CAAC;IACzE,eAAe;IACf,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5C;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,
|
|
1
|
+
{"version":3,"file":"base-input.d.ts","sourceRoot":"","sources":["../../../../../src/components/base/input/base-input.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,KAAK,aAAa,EAA+B,MAAM,OAAO,CAAC;AAC/E,OAAO,EAGL,KAAK,SAAS,EACd,SAAS,IAAI,eAAe,EAC5B,KAAK,cAAc,IAAI,eAAe,EACtC,KAAK,SAAS,EAEd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAStB,MAAM,WAAW,cACf,SAAQ,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,EACpC,aAAa,CAAC,eAAe,CAAC;IAChC,aAAa;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe;IACf,UAAU,CAAC,EAAE,OAAO,GAAG;QAAE,SAAS,EAAE,KAAK,CAAC,YAAY,CAAA;KAAE,CAAC;IACzD,cAAc;IACd,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,cAAc;IACd,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,YAAY;IACZ,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,eAAe,CAAC,EAAE,cAAc,GAAG,uBAAuB,CAAC;IAC3D,kBAAkB;IAClB,iBAAiB,CAAC,EAAE,CAClB,sBAAsB,EAAE,MAAM,EAC9B,8BAA8B,EAAE,MAAM,KACnC,IAAI,CAAC;IACV,YAAY;IACZ,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC,WAAW;IACX,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,mBAAmB;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,iBAAiB;IACjB,WAAW,CAAC,EAAE,CAAC,eAAe,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,KAAK,MAAM,CAAC;IACzE,eAAe;IACf,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5C;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAyL9C,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type useOverflowStyles } from './style';
|
|
3
|
+
import type { OverflowProps } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* 全部显示模式组件
|
|
6
|
+
*/
|
|
7
|
+
export declare const AllModeOverflow: <ItemType = unknown>({ data, renderItem, prefix, suffix, style, prefixStyle, itemStyle, suffixStyle, onVisibleCountChange, styles, getKey, }: OverflowProps<ItemType> & {
|
|
8
|
+
styles: ReturnType<typeof useOverflowStyles>;
|
|
9
|
+
getKey: (item: ItemType, index: number) => React.Key;
|
|
10
|
+
}) => React.JSX.Element;
|
|
11
|
+
//# sourceMappingURL=all-mode-overflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"all-mode-overflow.d.ts","sourceRoot":"","sources":["../../../../../src/components/base/overflow/all-mode-overflow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAGzC,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,QAAQ,GAAG,OAAO,EAAG,yHAYlD,aAAa,CAAC,QAAQ,CAAC,GAAG;IAC3B,MAAM,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;IAC7C,MAAM,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,GAAG,CAAC;CACtD,sBAwBA,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type useOverflowStyles } from './style';
|
|
3
|
+
import type { OverflowProps } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* 固定数量模式组件
|
|
6
|
+
*/
|
|
7
|
+
export declare const FixedCountOverflow: <ItemType = unknown>({ data, renderItem, renderRest, maxCount, prefix, suffix, style, prefixStyle, itemStyle, suffixStyle, restStyle, onVisibleCountChange, styles, getKey, }: OverflowProps<ItemType> & {
|
|
8
|
+
styles: ReturnType<typeof useOverflowStyles>;
|
|
9
|
+
getKey: (item: ItemType, index: number) => React.Key;
|
|
10
|
+
}) => React.JSX.Element;
|
|
11
|
+
//# sourceMappingURL=fixed-count-overflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixed-count-overflow.d.ts","sourceRoot":"","sources":["../../../../../src/components/base/overflow/fixed-count-overflow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiC,MAAM,OAAO,CAAC;AAGtD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,QAAQ,GAAG,OAAO,EAAG,0JAerD,aAAa,CAAC,QAAQ,CAAC,GAAG;IAC3B,MAAM,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;IAC7C,MAAM,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,GAAG,CAAC;CACtD,sBA2CA,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/base/overflow/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,mBAAmB,SAAS,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { OverflowProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Overflow 组件
|
|
5
|
+
*
|
|
6
|
+
* 利用 onLayout 在渲染前触发的特性,实现单次渲染的溢出处理组件
|
|
7
|
+
* 固定数量模式直接渲染,响应式模式通过预先计算确定最终显示状态
|
|
8
|
+
*
|
|
9
|
+
* @param props - 组件属性
|
|
10
|
+
* @returns React 元素
|
|
11
|
+
*/
|
|
12
|
+
export declare const Overflow: <ItemType = unknown>(props: OverflowProps<ItemType>) => React.JSX.Element;
|
|
13
|
+
//# sourceMappingURL=overflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overflow.d.ts","sourceRoot":"","sources":["../../../../../src/components/base/overflow/overflow.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAM3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ,GAAI,QAAQ,GAAG,OAAO,EAAG,OAAO,aAAa,CAAC,QAAQ,CAAC,sBAyC3E,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type useOverflowStyles } from './style';
|
|
3
|
+
import type { OverflowProps } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* 响应式 Overflow 组件
|
|
6
|
+
* 只有在 props 变化时才重新测量,onLayout 不直接触发测量
|
|
7
|
+
*/
|
|
8
|
+
export declare const ResponsiveOverflow: <ItemType = unknown>({ data, renderItem, renderRest, prefix, suffix, style, prefixStyle, itemStyle, suffixStyle, restStyle, onVisibleCountChange, itemsWidthTolerance, styles, getKey, }: OverflowProps<ItemType> & {
|
|
9
|
+
styles: ReturnType<typeof useOverflowStyles>;
|
|
10
|
+
getKey: (item: ItemType, index: number) => React.Key;
|
|
11
|
+
}) => React.JSX.Element;
|
|
12
|
+
//# sourceMappingURL=responsive-overflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responsive-overflow.d.ts","sourceRoot":"","sources":["../../../../../src/components/base/overflow/responsive-overflow.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAqB7C;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAAI,QAAQ,GAAG,OAAO,EAAG,qKAerD,aAAa,CAAC,QAAQ,CAAC,GAAG;IAC3B,MAAM,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;IAC7C,MAAM,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,GAAG,CAAC;CACtD,sBA4SA,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 创建样式
|
|
3
|
+
*/
|
|
4
|
+
export declare const useOverflowStyles: (options?: import("../../../../shared/utils").AnyObject | undefined) => {
|
|
5
|
+
container: {
|
|
6
|
+
flexDirection: "row";
|
|
7
|
+
flexWrap: "wrap" | "nowrap";
|
|
8
|
+
overflow: "hidden";
|
|
9
|
+
width: "100%";
|
|
10
|
+
};
|
|
11
|
+
item: {
|
|
12
|
+
flexShrink: number;
|
|
13
|
+
paddingHorizontal: number;
|
|
14
|
+
paddingVertical: number;
|
|
15
|
+
};
|
|
16
|
+
rest: {
|
|
17
|
+
backgroundColor: "rgba(243, 243, 243, 1)";
|
|
18
|
+
borderRadius: 2;
|
|
19
|
+
paddingHorizontal: 6;
|
|
20
|
+
height: "100%";
|
|
21
|
+
display: "flex";
|
|
22
|
+
alignItems: "center";
|
|
23
|
+
color: "rgba(0, 0, 0, 0.4)";
|
|
24
|
+
};
|
|
25
|
+
hidden: {
|
|
26
|
+
opacity: number;
|
|
27
|
+
pointerEvents: "none";
|
|
28
|
+
position: "absolute";
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/base/overflow/style/index.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;CA0B3B,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* Overflow 组件属性
|
|
5
|
+
*/
|
|
6
|
+
export interface OverflowProps<ItemType = unknown> {
|
|
7
|
+
/**
|
|
8
|
+
* 数据源
|
|
9
|
+
*/
|
|
10
|
+
data: ItemType[];
|
|
11
|
+
/**
|
|
12
|
+
* 获取元素唯一标识
|
|
13
|
+
* @default (item, index) => index
|
|
14
|
+
*/
|
|
15
|
+
itemKey?: keyof ItemType | ((item: ItemType, index: number) => React.Key);
|
|
16
|
+
/**
|
|
17
|
+
* 渲染单个元素
|
|
18
|
+
* @param item 数据项
|
|
19
|
+
* @param info 渲染信息(索引)
|
|
20
|
+
*/
|
|
21
|
+
renderItem: (item: ItemType, info: {
|
|
22
|
+
index: number;
|
|
23
|
+
}) => React.ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* 渲染"更多"节点
|
|
26
|
+
* @param omittedItems 被折叠的元素数组
|
|
27
|
+
* @default (items) => `+${items.length}...`
|
|
28
|
+
*/
|
|
29
|
+
renderRest?: React.ReactNode | ((omittedItems: ItemType[]) => React.ReactNode);
|
|
30
|
+
/**
|
|
31
|
+
* 最大显示数量
|
|
32
|
+
* - 'responsive': 响应式模式,根据容器宽度自动计算
|
|
33
|
+
* - 'all': 显示所有内容,不进行任何截断
|
|
34
|
+
* - number: 固定显示数量
|
|
35
|
+
* @default 'responsive'
|
|
36
|
+
*/
|
|
37
|
+
maxCount?: number | 'responsive' | 'all';
|
|
38
|
+
/**
|
|
39
|
+
* 前缀元素
|
|
40
|
+
*/
|
|
41
|
+
prefix?: React.ReactNode;
|
|
42
|
+
/**
|
|
43
|
+
* 后缀元素
|
|
44
|
+
*/
|
|
45
|
+
suffix?: React.ReactNode;
|
|
46
|
+
/**
|
|
47
|
+
* 容器样式
|
|
48
|
+
*/
|
|
49
|
+
style?: StyleProp<ViewStyle>;
|
|
50
|
+
/**
|
|
51
|
+
* 前缀元素样式
|
|
52
|
+
*/
|
|
53
|
+
prefixStyle?: StyleProp<ViewStyle>;
|
|
54
|
+
/**
|
|
55
|
+
* 数据项元素样式
|
|
56
|
+
*/
|
|
57
|
+
itemStyle?: StyleProp<ViewStyle>;
|
|
58
|
+
/**
|
|
59
|
+
* 后缀元素样式
|
|
60
|
+
*/
|
|
61
|
+
suffixStyle?: StyleProp<ViewStyle>;
|
|
62
|
+
/**
|
|
63
|
+
* "更多"节点样式
|
|
64
|
+
*/
|
|
65
|
+
restStyle?: StyleProp<ViewStyle>;
|
|
66
|
+
/**
|
|
67
|
+
* 可见元素数量变化回调
|
|
68
|
+
* @param visibleCount 当前可见的元素数量
|
|
69
|
+
*/
|
|
70
|
+
onVisibleCountChange?: (visibleCount: number) => void;
|
|
71
|
+
/**
|
|
72
|
+
* 在响应式模式下,当元素总宽度超出容器宽度但在容差范围内时,仍然显示全部元素而不截断
|
|
73
|
+
* @default 0
|
|
74
|
+
*/
|
|
75
|
+
itemsWidthTolerance?: number;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/base/overflow/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,aAAa,CAAC,QAAQ,GAAG,OAAO;IAC/C;;OAEG;IACH,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,QAAQ,GAAG,CAAC,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,GAAG,CAAC,CAAC;IAC1E;;;;OAIG;IACH,UAAU,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC;IACzE;;;;OAIG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,YAAY,EAAE,QAAQ,EAAE,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;IAC/E;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,KAAK,CAAC;IACzC;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACnC;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACnC;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACtD;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B"}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import { PickerField } from './picker-field';
|
|
1
2
|
export * from './picker';
|
|
2
|
-
export * from './picker-
|
|
3
|
+
export * from './picker-content';
|
|
4
|
+
export * from './picker-field';
|
|
5
|
+
export declare const Picker: import("react").FC<import("react").PropsWithChildren<import("./picker").PickerProps<any>>> & {
|
|
6
|
+
Field: typeof PickerField;
|
|
7
|
+
Content: import("react").FC<import("./picker-content").PickerContentProps>;
|
|
8
|
+
};
|
|
3
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/base/picker/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/base/picker/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAE/B,eAAO,MAAM,MAAM;;;CAGjB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import { type ModalProps } from '#components/base';
|
|
4
|
+
import type { Any } from '#shared/utils';
|
|
5
|
+
/**
|
|
6
|
+
* Picker 内容组件的属性接口
|
|
7
|
+
* 继承自 Modal 组件,排除 visible 和 children 属性
|
|
8
|
+
*/
|
|
9
|
+
export interface PickerContentProps extends Omit<ModalProps, 'visible' | 'children'> {
|
|
10
|
+
/** 是否隐藏头部关闭图标 */
|
|
11
|
+
hiddenHeaderCloseIcon?: boolean;
|
|
12
|
+
/** 头部标题内容 */
|
|
13
|
+
headerTitle?: React.ReactNode;
|
|
14
|
+
/** 头部样式 */
|
|
15
|
+
headerStyle?: StyleProp<ViewStyle>;
|
|
16
|
+
/** 子元素,可以是 React 元素或渲染函数 */
|
|
17
|
+
children?: React.ReactElement | ((props: {
|
|
18
|
+
/** 当前选中的值 */
|
|
19
|
+
value: Any;
|
|
20
|
+
/** 值变化回调函数 */
|
|
21
|
+
onChange?: (value: Any) => void;
|
|
22
|
+
}) => React.ReactElement);
|
|
23
|
+
/** 内容区域样式 */
|
|
24
|
+
style?: StyleProp<ViewStyle>;
|
|
25
|
+
}
|
|
26
|
+
export declare const PickerContent: React.FC<PickerContentProps>;
|
|
27
|
+
//# sourceMappingURL=picker-content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"picker-content.d.ts","sourceRoot":"","sources":["../../../../../src/components/base/picker/picker-content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,EAIL,KAAK,UAAU,EAEhB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAKzC;;;GAGG;AACH,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,UAAU,EAAE,SAAS,GAAG,UAAU,CAAC;IAChD,iBAAiB;IACjB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,aAAa;IACb,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,WAAW;IACX,WAAW,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACnC,4BAA4B;IAC5B,QAAQ,CAAC,EACL,KAAK,CAAC,YAAY,GAClB,CAAC,CAAC,KAAK,EAAE;QACP,aAAa;QACb,KAAK,EAAE,GAAG,CAAC;QACX,cAAc;QACd,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;KACjC,KAAK,KAAK,CAAC,YAAY,CAAC,CAAC;IAC9B,aAAa;IACb,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAiDtD,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Any } from '#shared/utils';
|
|
3
|
+
export interface PickerContextState<Value = Any> {
|
|
4
|
+
/** 当前选中的值 */
|
|
5
|
+
value?: Value;
|
|
6
|
+
/** 选择器是否可见 */
|
|
7
|
+
visible?: boolean;
|
|
8
|
+
/** 是否禁用 */
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
/** 设置禁用状态 */
|
|
11
|
+
setDisabled?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
12
|
+
/** 切换选择器可见状态 */
|
|
13
|
+
toggleVisible?: () => void;
|
|
14
|
+
/** 值变化回调 */
|
|
15
|
+
onChange?: (value: Value | undefined) => void;
|
|
16
|
+
}
|
|
17
|
+
export declare const PickerContext: React.Context<PickerContextState<any> | null>;
|
|
18
|
+
//# sourceMappingURL=picker-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"picker-context.d.ts","sourceRoot":"","sources":["../../../../../src/components/base/picker/picker-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,WAAW,kBAAkB,CAAC,KAAK,GAAG,GAAG;IAC7C,aAAa;IACb,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,cAAc;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa;IACb,WAAW,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5D,gBAAgB;IAChB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,YAAY;IACZ,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,KAAK,IAAI,CAAC;CAC/C;AACD,eAAO,MAAM,aAAa,+CAAuD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type Any } from '#shared/utils';
|
|
3
|
+
export interface PickerFieldProps<Value = Any> {
|
|
4
|
+
/** 未选中时显示的占位内容 */
|
|
5
|
+
placeholder?: React.ReactNode;
|
|
6
|
+
/** 自定义渲染选中值的显示内容 */
|
|
7
|
+
renderValue?: (value: Value) => React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare function PickerField<Value>(props: PickerFieldProps<Value>): React.JSX.Element;
|
|
10
|
+
//# sourceMappingURL=picker-field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"picker-field.d.ts","sourceRoot":"","sources":["../../../../../src/components/base/picker/picker-field.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAKnD,OAAO,EAAE,KAAK,GAAG,EAAwB,MAAM,eAAe,CAAC;AAK/D,MAAM,WAAW,gBAAgB,CAAC,KAAK,GAAG,GAAG;IAC3C,kBAAkB;IAClB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,oBAAoB;IACpB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,KAAK,CAAC,SAAS,CAAC;CACjD;AACD,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAC,qBAqChE"}
|
|
@@ -1,13 +1,24 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { type PropsWithChildren } from 'react';
|
|
2
|
+
import type { Any } from '#shared/utils';
|
|
3
|
+
import type { PickerContentProps } from './picker-content';
|
|
4
|
+
import type { PickerFieldProps } from './picker-field';
|
|
5
|
+
/**
|
|
6
|
+
* Picker 组件的基础属性接口
|
|
7
|
+
* @template T 选择器值的类型
|
|
8
|
+
*/
|
|
9
|
+
export interface PickerProps<T = Any> {
|
|
10
|
+
/** 受控模式下的当前值 */
|
|
11
|
+
value?: T;
|
|
12
|
+
/** 非受控模式下的默认值 */
|
|
13
|
+
defaultValue?: T;
|
|
14
|
+
/** 触发 onChange 的事件名称,默认为 'onChange' */
|
|
15
|
+
trigger?: string;
|
|
16
|
+
/** 是否禁用选择器 */
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/** 值变化时的回调函数 */
|
|
19
|
+
onChange?: (value: T) => void;
|
|
11
20
|
}
|
|
12
|
-
export
|
|
21
|
+
export interface PickerMergeProps<T> extends PickerProps<T>, PickerFieldProps<T>, PickerContentProps {
|
|
22
|
+
}
|
|
23
|
+
export declare const Picker: React.FC<PropsWithChildren<PickerProps>>;
|
|
13
24
|
//# sourceMappingURL=picker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"picker.d.ts","sourceRoot":"","sources":["../../../../../src/components/base/picker/picker.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"picker.d.ts","sourceRoot":"","sources":["../../../../../src/components/base/picker/picker.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAqB,MAAM,OAAO,CAAC;AAElE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD;;;GAGG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,GAAG;IAClC,gBAAgB;IAChB,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,iBAAiB;IACjB,YAAY,CAAC,EAAE,CAAC,CAAC;IACjB,uCAAuC;IACvC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB;IAChB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,gBAAgB,CAAC,CAAC,CACjC,SAAQ,WAAW,CAAC,CAAC,CAAC,EACpB,gBAAgB,CAAC,CAAC,CAAC,EACnB,kBAAkB;CAAG;AAEzB,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAAC,WAAW,CAAC,CA8B3D,CAAC"}
|
|
@@ -2,8 +2,6 @@ export declare const usePickerFieldStyles: (options?: import("../../../../shared
|
|
|
2
2
|
container: {
|
|
3
3
|
flex: number;
|
|
4
4
|
alignSelf: "stretch";
|
|
5
|
-
};
|
|
6
|
-
content: {
|
|
7
5
|
backgroundColor: "rgba(255, 255, 255, 1)";
|
|
8
6
|
paddingVertical: number;
|
|
9
7
|
paddingHorizontal: number;
|
|
@@ -12,4 +10,10 @@ export declare const usePickerFieldStyles: (options?: import("../../../../shared
|
|
|
12
10
|
backgroundColor: "rgba(238, 238, 240, 1)";
|
|
13
11
|
};
|
|
14
12
|
};
|
|
13
|
+
export declare const usePickerContentStyles: (options?: import("../../../../shared/utils").AnyObject | undefined) => {
|
|
14
|
+
container: {
|
|
15
|
+
flex: number;
|
|
16
|
+
padding: number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
15
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/base/picker/style/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/base/picker/style/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB;;;;;;;;;;;CAW9B,CAAC;AAEJ,eAAO,MAAM,sBAAsB;;;;;CAEhC,CAAC"}
|