@unif/react-native-ui 0.1.0 → 0.2.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/lib/commonjs/README.md +99 -0
- package/lib/commonjs/action-sheet/index.js +71 -0
- package/lib/commonjs/action-sheet/index.js.map +1 -0
- package/lib/commonjs/action-sheet/index.md +69 -0
- package/lib/commonjs/action-sheet/style/index.js +42 -0
- package/lib/commonjs/action-sheet/style/index.js.map +1 -0
- package/lib/commonjs/avatar/index.js +50 -0
- package/lib/commonjs/avatar/index.js.map +1 -0
- package/lib/commonjs/avatar/index.md +51 -0
- package/lib/commonjs/avatar/style/index.js +21 -0
- package/lib/commonjs/avatar/style/index.js.map +1 -0
- package/lib/commonjs/button/index.js +60 -0
- package/lib/commonjs/button/index.js.map +1 -0
- package/lib/commonjs/button/index.md +90 -0
- package/lib/commonjs/button/style/index.js +98 -0
- package/lib/commonjs/button/style/index.js.map +1 -0
- package/lib/commonjs/center/index.js +26 -0
- package/lib/commonjs/center/index.js.map +1 -0
- package/lib/commonjs/center/index.md +28 -0
- package/lib/commonjs/center/style/index.js +14 -0
- package/lib/commonjs/center/style/index.js.map +1 -0
- package/lib/commonjs/chip/index.js +69 -0
- package/lib/commonjs/chip/index.js.map +1 -0
- package/lib/commonjs/chip/index.md +60 -0
- package/lib/commonjs/chip/style/index.js +46 -0
- package/lib/commonjs/chip/style/index.js.map +1 -0
- package/lib/commonjs/column/index.js +35 -0
- package/lib/commonjs/column/index.js.map +1 -0
- package/lib/commonjs/column/index.md +34 -0
- package/lib/commonjs/column/style/index.js +13 -0
- package/lib/commonjs/column/style/index.js.map +1 -0
- package/lib/commonjs/divider/index.js +32 -0
- package/lib/commonjs/divider/index.js.map +1 -0
- package/lib/commonjs/divider/index.md +44 -0
- package/lib/commonjs/divider/style/index.js +22 -0
- package/lib/commonjs/divider/style/index.js.map +1 -0
- package/lib/commonjs/hooks/index.js +13 -0
- package/lib/commonjs/hooks/index.js.map +1 -0
- package/lib/commonjs/hooks/index.md +71 -0
- package/lib/commonjs/hooks/useMergeStyles.js +31 -0
- package/lib/commonjs/hooks/useMergeStyles.js.map +1 -0
- package/lib/commonjs/index.js +146 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/input/index.js +76 -0
- package/lib/commonjs/input/index.js.map +1 -0
- package/lib/commonjs/input/index.md +73 -0
- package/lib/commonjs/input/style/index.js +31 -0
- package/lib/commonjs/input/style/index.js.map +1 -0
- package/lib/commonjs/list-item/index.js +76 -0
- package/lib/commonjs/list-item/index.js.map +1 -0
- package/lib/commonjs/list-item/index.md +101 -0
- package/lib/commonjs/list-item/style/index.js +43 -0
- package/lib/commonjs/list-item/style/index.js.map +1 -0
- package/lib/commonjs/menu/index.js +68 -0
- package/lib/commonjs/menu/index.js.map +1 -0
- package/lib/commonjs/menu/style/index.js +32 -0
- package/lib/commonjs/menu/style/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/popover/index.js +68 -0
- package/lib/commonjs/popover/index.js.map +1 -0
- package/lib/commonjs/popover/index.md +57 -0
- package/lib/commonjs/popover/style/index.js +26 -0
- package/lib/commonjs/popover/style/index.js.map +1 -0
- package/lib/commonjs/row/index.js +36 -0
- package/lib/commonjs/row/index.js.map +1 -0
- package/lib/commonjs/row/index.md +46 -0
- package/lib/commonjs/row/style/index.js +19 -0
- package/lib/commonjs/row/style/index.js.map +1 -0
- package/lib/commonjs/space/index.js +25 -0
- package/lib/commonjs/space/index.js.map +1 -0
- package/lib/commonjs/space/index.md +31 -0
- package/lib/commonjs/space/style/index.js +15 -0
- package/lib/commonjs/space/style/index.js.map +1 -0
- package/lib/commonjs/text/index.js +40 -0
- package/lib/commonjs/text/index.js.map +1 -0
- package/lib/commonjs/text/index.md +63 -0
- package/lib/commonjs/text/style/index.js +56 -0
- package/lib/commonjs/text/style/index.js.map +1 -0
- package/lib/commonjs/theme/context.js +40 -0
- package/lib/commonjs/theme/context.js.map +1 -0
- package/lib/commonjs/theme/tokens.js +68 -0
- package/lib/commonjs/theme/tokens.js.map +1 -0
- package/lib/commonjs/touchable/index.js +40 -0
- package/lib/commonjs/touchable/index.js.map +1 -0
- package/lib/commonjs/touchable/index.md +42 -0
- package/lib/commonjs/touchable/style/index.js +13 -0
- package/lib/commonjs/touchable/style/index.js.map +1 -0
- package/lib/commonjs/wave-animation/index.js +72 -0
- package/lib/commonjs/wave-animation/index.js.map +1 -0
- package/lib/commonjs/wave-animation/index.md +50 -0
- package/lib/module/action-sheet/index.js +5 -2
- package/lib/module/action-sheet/index.js.map +1 -1
- package/lib/module/action-sheet/style/index.js +7 -8
- package/lib/module/action-sheet/style/index.js.map +1 -1
- package/lib/module/avatar/index.js +5 -2
- package/lib/module/avatar/index.js.map +1 -1
- package/lib/module/avatar/style/index.js +4 -5
- package/lib/module/avatar/style/index.js.map +1 -1
- package/lib/module/button/index.js +5 -2
- package/lib/module/button/index.js.map +1 -1
- package/lib/module/button/style/index.js +8 -9
- package/lib/module/button/style/index.js.map +1 -1
- package/lib/module/chip/index.js +7 -2
- package/lib/module/chip/index.js.map +1 -1
- package/lib/module/chip/style/index.js +12 -13
- package/lib/module/chip/style/index.js.map +1 -1
- package/lib/module/divider/index.js +13 -7
- package/lib/module/divider/index.js.map +1 -1
- package/lib/module/divider/style/index.js +4 -5
- package/lib/module/divider/style/index.js.map +1 -1
- package/lib/module/index.js +4 -4
- package/lib/module/index.js.map +1 -1
- package/lib/module/input/index.js +5 -3
- package/lib/module/input/index.js.map +1 -1
- package/lib/module/input/style/index.js +8 -9
- package/lib/module/input/style/index.js.map +1 -1
- package/lib/module/list-item/index.js +9 -7
- package/lib/module/list-item/index.js.map +1 -1
- package/lib/module/list-item/style/index.js +5 -6
- package/lib/module/list-item/style/index.js.map +1 -1
- package/lib/module/menu/index.js +62 -0
- package/lib/module/menu/index.js.map +1 -0
- package/lib/module/menu/style/index.js +27 -0
- package/lib/module/menu/style/index.js.map +1 -0
- package/lib/module/popover/index.js +5 -2
- package/lib/module/popover/index.js.map +1 -1
- package/lib/module/popover/style/index.js +3 -4
- package/lib/module/popover/style/index.js.map +1 -1
- package/lib/module/text/index.js +8 -3
- package/lib/module/text/index.js.map +1 -1
- package/lib/module/text/style/index.js +12 -14
- package/lib/module/text/style/index.js.map +1 -1
- package/lib/module/theme/context.js +33 -0
- package/lib/module/theme/context.js.map +1 -0
- package/lib/module/theme/tokens.js +3 -6
- package/lib/module/theme/tokens.js.map +1 -1
- package/lib/typescript/{jest.setup.d.ts.map → commonjs/jest.setup.d.ts.map} +1 -1
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/action-sheet/index.d.ts.map +1 -0
- package/lib/typescript/{src → commonjs/src}/action-sheet/style/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/action-sheet/style/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/avatar/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/avatar/style/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/avatar/style/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/button/index.d.ts.map +1 -0
- package/lib/typescript/{src → commonjs/src}/button/style/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/button/style/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/center/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/center/style/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/chip/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/chip/style/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/chip/style/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/column/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/column/style/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/divider/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/divider/style/index.d.ts +10 -0
- package/lib/typescript/commonjs/src/divider/style/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hooks/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hooks/useMergeStyles.d.ts.map +1 -0
- package/lib/typescript/{src → commonjs/src}/index.d.ts +6 -3
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/input/index.d.ts.map +1 -0
- package/lib/typescript/{src → commonjs/src}/input/style/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/input/style/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/list-item/index.d.ts.map +1 -0
- package/lib/typescript/{src → commonjs/src}/list-item/style/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/list-item/style/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/menu/index.d.ts +36 -0
- package/lib/typescript/commonjs/src/menu/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/menu/style/index.d.ts +32 -0
- package/lib/typescript/commonjs/src/menu/style/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/popover/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/popover/style/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/popover/style/index.d.ts.map +1 -0
- package/lib/typescript/{src/column → commonjs/src/row}/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/row/style/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/space/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/space/style/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/text/index.d.ts.map +1 -0
- package/lib/typescript/{src → commonjs/src}/text/style/index.d.ts +5 -4
- package/lib/typescript/commonjs/src/text/style/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/context.d.ts +17 -0
- package/lib/typescript/commonjs/src/theme/context.d.ts.map +1 -0
- package/lib/typescript/{src → commonjs/src}/theme/tokens.d.ts +4 -3
- package/lib/typescript/commonjs/src/theme/tokens.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/touchable/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/touchable/style/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/wave-animation/index.d.ts.map +1 -0
- package/lib/typescript/module/jest.setup.d.ts +1 -0
- package/lib/typescript/module/jest.setup.d.ts.map +1 -0
- package/lib/typescript/module/src/action-sheet/index.d.ts +22 -0
- package/lib/typescript/module/src/action-sheet/index.d.ts.map +1 -0
- package/lib/typescript/module/src/action-sheet/style/index.d.ts +17 -0
- package/lib/typescript/module/src/action-sheet/style/index.d.ts.map +1 -0
- package/lib/typescript/module/src/avatar/index.d.ts +19 -0
- package/lib/typescript/module/src/avatar/index.d.ts.map +1 -0
- package/lib/typescript/module/src/avatar/style/index.d.ts +8 -0
- package/lib/typescript/module/src/avatar/style/index.d.ts.map +1 -0
- package/lib/typescript/module/src/button/index.d.ts +24 -0
- package/lib/typescript/module/src/button/index.d.ts.map +1 -0
- package/lib/typescript/module/src/button/style/index.d.ts +17 -0
- package/lib/typescript/module/src/button/style/index.d.ts.map +1 -0
- package/lib/typescript/module/src/center/index.d.ts +11 -0
- package/lib/typescript/module/src/center/index.d.ts.map +1 -0
- package/lib/typescript/module/src/center/style/index.d.ts +5 -0
- package/lib/typescript/module/src/center/style/index.d.ts.map +1 -0
- package/lib/typescript/module/src/chip/index.d.ts +22 -0
- package/lib/typescript/module/src/chip/index.d.ts.map +1 -0
- package/lib/typescript/module/src/chip/style/index.d.ts +11 -0
- package/lib/typescript/module/src/chip/style/index.d.ts.map +1 -0
- package/lib/typescript/module/src/column/index.d.ts +20 -0
- package/lib/typescript/module/src/column/index.d.ts.map +1 -0
- package/lib/typescript/module/src/column/style/index.d.ts +4 -0
- package/lib/typescript/module/src/column/style/index.d.ts.map +1 -0
- package/lib/typescript/module/src/divider/index.d.ts +13 -0
- package/lib/typescript/module/src/divider/index.d.ts.map +1 -0
- package/lib/typescript/module/src/divider/style/index.d.ts +10 -0
- package/lib/typescript/module/src/divider/style/index.d.ts.map +1 -0
- package/lib/typescript/module/src/hooks/index.d.ts +2 -0
- package/lib/typescript/module/src/hooks/index.d.ts.map +1 -0
- package/lib/typescript/module/src/hooks/useMergeStyles.d.ts +13 -0
- package/lib/typescript/module/src/hooks/useMergeStyles.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +42 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/input/index.d.ts +29 -0
- package/lib/typescript/module/src/input/index.d.ts.map +1 -0
- package/lib/typescript/module/src/input/style/index.d.ts +9 -0
- package/lib/typescript/module/src/input/style/index.d.ts.map +1 -0
- package/lib/typescript/module/src/list-item/index.d.ts +25 -0
- package/lib/typescript/module/src/list-item/index.d.ts.map +1 -0
- package/lib/typescript/module/src/list-item/style/index.d.ts +18 -0
- package/lib/typescript/module/src/list-item/style/index.d.ts.map +1 -0
- package/lib/typescript/module/src/menu/index.d.ts +36 -0
- package/lib/typescript/module/src/menu/index.d.ts.map +1 -0
- package/lib/typescript/module/src/menu/style/index.d.ts +32 -0
- package/lib/typescript/module/src/menu/style/index.d.ts.map +1 -0
- package/lib/typescript/module/src/popover/index.d.ts +27 -0
- package/lib/typescript/module/src/popover/index.d.ts.map +1 -0
- package/lib/typescript/module/src/popover/style/index.d.ts +8 -0
- package/lib/typescript/module/src/popover/style/index.d.ts.map +1 -0
- package/lib/typescript/module/src/row/index.d.ts +22 -0
- package/lib/typescript/module/src/row/index.d.ts.map +1 -0
- package/lib/typescript/module/src/row/style/index.d.ts +8 -0
- package/lib/typescript/module/src/row/style/index.d.ts.map +1 -0
- package/lib/typescript/module/src/space/index.d.ts +15 -0
- package/lib/typescript/module/src/space/index.d.ts.map +1 -0
- package/lib/typescript/module/src/space/style/index.d.ts +7 -0
- package/lib/typescript/module/src/space/style/index.d.ts.map +1 -0
- package/lib/typescript/module/src/text/index.d.ts +18 -0
- package/lib/typescript/module/src/text/index.d.ts.map +1 -0
- package/lib/typescript/module/src/text/style/index.d.ts +36 -0
- package/lib/typescript/module/src/text/style/index.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/context.d.ts +17 -0
- package/lib/typescript/module/src/theme/context.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/tokens.d.ts +62 -0
- package/lib/typescript/module/src/theme/tokens.d.ts.map +1 -0
- package/lib/typescript/module/src/touchable/index.d.ts +19 -0
- package/lib/typescript/module/src/touchable/index.d.ts.map +1 -0
- package/lib/typescript/module/src/touchable/style/index.d.ts +4 -0
- package/lib/typescript/module/src/touchable/style/index.d.ts.map +1 -0
- package/lib/typescript/module/src/wave-animation/index.d.ts +20 -0
- package/lib/typescript/module/src/wave-animation/index.d.ts.map +1 -0
- package/package.json +16 -5
- package/src/action-sheet/index.tsx +7 -3
- package/src/action-sheet/style/index.tsx +10 -8
- package/src/avatar/index.tsx +7 -3
- package/src/avatar/style/index.tsx +5 -5
- package/src/button/index.tsx +7 -3
- package/src/button/style/index.tsx +11 -9
- package/src/chip/index.tsx +16 -5
- package/src/chip/style/index.tsx +15 -13
- package/src/divider/index.tsx +18 -11
- package/src/divider/style/index.tsx +12 -10
- package/src/index.tsx +7 -4
- package/src/input/index.tsx +6 -4
- package/src/input/style/index.tsx +9 -9
- package/src/list-item/index.tsx +11 -6
- package/src/list-item/style/index.tsx +6 -6
- package/src/menu/index.tsx +99 -0
- package/src/menu/style/index.tsx +34 -0
- package/src/popover/index.tsx +7 -3
- package/src/popover/style/index.tsx +4 -4
- package/src/text/index.tsx +9 -3
- package/src/text/style/index.tsx +16 -12
- package/src/theme/context.tsx +38 -0
- package/src/theme/tokens.ts +5 -7
- package/lib/module/theme/config.js +0 -27
- package/lib/module/theme/config.js.map +0 -1
- package/lib/typescript/src/action-sheet/index.d.ts.map +0 -1
- package/lib/typescript/src/action-sheet/style/index.d.ts.map +0 -1
- package/lib/typescript/src/avatar/index.d.ts.map +0 -1
- package/lib/typescript/src/avatar/style/index.d.ts +0 -7
- package/lib/typescript/src/avatar/style/index.d.ts.map +0 -1
- package/lib/typescript/src/button/index.d.ts.map +0 -1
- package/lib/typescript/src/button/style/index.d.ts.map +0 -1
- package/lib/typescript/src/center/index.d.ts.map +0 -1
- package/lib/typescript/src/center/style/index.d.ts.map +0 -1
- package/lib/typescript/src/chip/index.d.ts.map +0 -1
- package/lib/typescript/src/chip/style/index.d.ts +0 -10
- package/lib/typescript/src/chip/style/index.d.ts.map +0 -1
- package/lib/typescript/src/column/style/index.d.ts.map +0 -1
- package/lib/typescript/src/divider/index.d.ts.map +0 -1
- package/lib/typescript/src/divider/style/index.d.ts +0 -9
- package/lib/typescript/src/divider/style/index.d.ts.map +0 -1
- package/lib/typescript/src/hooks/index.d.ts.map +0 -1
- package/lib/typescript/src/hooks/useMergeStyles.d.ts.map +0 -1
- package/lib/typescript/src/index.d.ts.map +0 -1
- package/lib/typescript/src/input/index.d.ts.map +0 -1
- package/lib/typescript/src/input/style/index.d.ts.map +0 -1
- package/lib/typescript/src/list-item/index.d.ts.map +0 -1
- package/lib/typescript/src/list-item/style/index.d.ts.map +0 -1
- package/lib/typescript/src/popover/index.d.ts.map +0 -1
- package/lib/typescript/src/popover/style/index.d.ts +0 -7
- package/lib/typescript/src/popover/style/index.d.ts.map +0 -1
- package/lib/typescript/src/row/index.d.ts.map +0 -1
- package/lib/typescript/src/row/style/index.d.ts.map +0 -1
- package/lib/typescript/src/space/index.d.ts.map +0 -1
- package/lib/typescript/src/space/style/index.d.ts.map +0 -1
- package/lib/typescript/src/text/index.d.ts.map +0 -1
- package/lib/typescript/src/text/style/index.d.ts.map +0 -1
- package/lib/typescript/src/theme/config.d.ts +0 -18
- package/lib/typescript/src/theme/config.d.ts.map +0 -1
- package/lib/typescript/src/theme/tokens.d.ts.map +0 -1
- package/lib/typescript/src/touchable/index.d.ts.map +0 -1
- package/lib/typescript/src/touchable/style/index.d.ts.map +0 -1
- package/lib/typescript/src/wave-animation/index.d.ts.map +0 -1
- package/lib/typescript/tests/component/component.coverage.test.d.ts +0 -2
- package/lib/typescript/tests/component/component.coverage.test.d.ts.map +0 -1
- package/lib/typescript/tests/component/component.interaction.test.d.ts +0 -2
- package/lib/typescript/tests/component/component.interaction.test.d.ts.map +0 -1
- package/lib/typescript/tests/component/component.snapshot.test.d.ts +0 -2
- package/lib/typescript/tests/component/component.snapshot.test.d.ts.map +0 -1
- package/lib/typescript/tests/e2e/app.e2e.test.d.ts +0 -2
- package/lib/typescript/tests/e2e/app.e2e.test.d.ts.map +0 -1
- package/lib/typescript/tests/integration/ui.integration.test.d.ts +0 -2
- package/lib/typescript/tests/integration/ui.integration.test.d.ts.map +0 -1
- package/lib/typescript/tests/unit/mergeStyles.unit.test.d.ts +0 -2
- package/lib/typescript/tests/unit/mergeStyles.unit.test.d.ts.map +0 -1
- package/lib/typescript/tests/unit/public-api.unit.test.d.ts +0 -2
- package/lib/typescript/tests/unit/public-api.unit.test.d.ts.map +0 -1
- package/lib/typescript/tests/unit/theme-config.unit.test.d.ts +0 -2
- package/lib/typescript/tests/unit/theme-config.unit.test.d.ts.map +0 -1
- package/src/theme/config.ts +0 -26
- /package/lib/typescript/{jest.setup.d.ts → commonjs/jest.setup.d.ts} +0 -0
- /package/lib/typescript/{src → commonjs/src}/action-sheet/index.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/avatar/index.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/button/index.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/center/index.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/center/style/index.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/chip/index.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/column/index.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/column/style/index.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/divider/index.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/hooks/index.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/hooks/useMergeStyles.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/input/index.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/list-item/index.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/popover/index.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/row/index.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/row/style/index.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/space/index.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/space/style/index.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/text/index.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/touchable/index.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/touchable/style/index.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/wave-animation/index.d.ts +0 -0
- /package/lib/typescript/{package.json → module/package.json} +0 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createVariantMap = exports.createSecondaryStyle = exports.createPrimaryStyle = exports.WEIGHT_MAP = void 0;
|
|
7
|
+
const createVariantMap = t => ({
|
|
8
|
+
title: {
|
|
9
|
+
fontSize: 20,
|
|
10
|
+
lineHeight: 26,
|
|
11
|
+
fontWeight: '600',
|
|
12
|
+
color: t.colorText
|
|
13
|
+
},
|
|
14
|
+
heading: {
|
|
15
|
+
fontSize: 16,
|
|
16
|
+
lineHeight: 22,
|
|
17
|
+
fontWeight: '600',
|
|
18
|
+
color: t.colorText
|
|
19
|
+
},
|
|
20
|
+
body: {
|
|
21
|
+
fontSize: 15,
|
|
22
|
+
lineHeight: 22,
|
|
23
|
+
color: t.colorText
|
|
24
|
+
},
|
|
25
|
+
caption: {
|
|
26
|
+
fontSize: 13,
|
|
27
|
+
lineHeight: 18,
|
|
28
|
+
color: t.colorText
|
|
29
|
+
},
|
|
30
|
+
micro: {
|
|
31
|
+
fontSize: 12,
|
|
32
|
+
lineHeight: 18,
|
|
33
|
+
color: t.colorText
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
exports.createVariantMap = createVariantMap;
|
|
37
|
+
const WEIGHT_MAP = exports.WEIGHT_MAP = {
|
|
38
|
+
medium: {
|
|
39
|
+
fontWeight: '500'
|
|
40
|
+
},
|
|
41
|
+
semibold: {
|
|
42
|
+
fontWeight: '600'
|
|
43
|
+
},
|
|
44
|
+
bold: {
|
|
45
|
+
fontWeight: '700'
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const createSecondaryStyle = t => ({
|
|
49
|
+
color: t.colorTextSecondary
|
|
50
|
+
});
|
|
51
|
+
exports.createSecondaryStyle = createSecondaryStyle;
|
|
52
|
+
const createPrimaryStyle = t => ({
|
|
53
|
+
color: t.colorPrimary
|
|
54
|
+
});
|
|
55
|
+
exports.createPrimaryStyle = createPrimaryStyle;
|
|
56
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createVariantMap","t","title","fontSize","lineHeight","fontWeight","color","colorText","heading","body","caption","micro","exports","WEIGHT_MAP","medium","semibold","bold","createSecondaryStyle","colorTextSecondary","createPrimaryStyle","colorPrimary"],"sourceRoot":"../../../../src","sources":["text/style/index.tsx"],"mappings":";;;;;;AAKO,MAAMA,gBAAgB,GAAIC,CAAS,KAAM;EAC9CC,KAAK,EAAE;IACLC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,UAAU,EAAE,KAAc;IAC1BC,KAAK,EAAEL,CAAC,CAACM;EACX,CAAC;EACDC,OAAO,EAAE;IACPL,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,UAAU,EAAE,KAAc;IAC1BC,KAAK,EAAEL,CAAC,CAACM;EACX,CAAC;EACDE,IAAI,EAAE;IAAEN,QAAQ,EAAE,EAAE;IAAEC,UAAU,EAAE,EAAE;IAAEE,KAAK,EAAEL,CAAC,CAACM;EAAU,CAAC;EAC1DG,OAAO,EAAE;IAAEP,QAAQ,EAAE,EAAE;IAAEC,UAAU,EAAE,EAAE;IAAEE,KAAK,EAAEL,CAAC,CAACM;EAAU,CAAC;EAC7DI,KAAK,EAAE;IAAER,QAAQ,EAAE,EAAE;IAAEC,UAAU,EAAE,EAAE;IAAEE,KAAK,EAAEL,CAAC,CAACM;EAAU;AAC5D,CAAC,CAAC;AAACK,OAAA,CAAAZ,gBAAA,GAAAA,gBAAA;AAEI,MAAMa,UAAyC,GAAAD,OAAA,CAAAC,UAAA,GAAG;EACvDC,MAAM,EAAE;IAAET,UAAU,EAAE;EAAM,CAAC;EAC7BU,QAAQ,EAAE;IAAEV,UAAU,EAAE;EAAM,CAAC;EAC/BW,IAAI,EAAE;IAAEX,UAAU,EAAE;EAAM;AAC5B,CAAC;AAEM,MAAMY,oBAAoB,GAAIhB,CAAS,KAAiB;EAC7DK,KAAK,EAAEL,CAAC,CAACiB;AACX,CAAC,CAAC;AAACN,OAAA,CAAAK,oBAAA,GAAAA,oBAAA;AAEI,MAAME,kBAAkB,GAAIlB,CAAS,KAAiB;EAC3DK,KAAK,EAAEL,CAAC,CAACmB;AACX,CAAC,CAAC;AAACR,OAAA,CAAAO,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ConfigProvider = void 0;
|
|
7
|
+
exports.useTokens = useTokens;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _tokens = require("./tokens");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
12
|
+
/**
|
|
13
|
+
* ConfigProvider — 声明式主题系统
|
|
14
|
+
*
|
|
15
|
+
* 通过 React Context 注入 token,支持嵌套覆盖。
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const ThemeContext = /*#__PURE__*/(0, _react.createContext)(_tokens.defaultTokens);
|
|
19
|
+
const ConfigProvider = ({
|
|
20
|
+
theme,
|
|
21
|
+
children
|
|
22
|
+
}) => {
|
|
23
|
+
const parent = (0, _react.useContext)(ThemeContext);
|
|
24
|
+
const merged = (0, _react.useMemo)(() => {
|
|
25
|
+
if (!theme?.token) return parent;
|
|
26
|
+
return {
|
|
27
|
+
...parent,
|
|
28
|
+
...theme.token
|
|
29
|
+
};
|
|
30
|
+
}, [parent, theme?.token]);
|
|
31
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ThemeContext.Provider, {
|
|
32
|
+
value: merged,
|
|
33
|
+
children: children
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
exports.ConfigProvider = ConfigProvider;
|
|
37
|
+
function useTokens() {
|
|
38
|
+
return (0, _react.useContext)(ThemeContext);
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_tokens","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ThemeContext","createContext","defaultTokens","ConfigProvider","theme","children","parent","useContext","merged","useMemo","token","jsx","Provider","value","exports","useTokens"],"sourceRoot":"../../../src","sources":["theme/context.tsx"],"mappings":";;;;;;;AAMA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,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vC,MAAMQ,MAAM,GAAG,IAAAC,cAAO,EAAS,MAAM;IACnC,IAAI,CAACL,KAAK,EAAEM,KAAK,EAAE,OAAOJ,MAAM;IAChC,OAAO;MAAE,GAAGA,MAAM;MAAE,GAAGF,KAAK,CAACM;IAAM,CAAC;EACtC,CAAC,EAAE,CAACJ,MAAM,EAAEF,KAAK,EAAEM,KAAK,CAAC,CAAC;EAE1B,oBACE,IAAA9B,WAAA,CAAA+B,GAAA,EAACX,YAAY,CAACY,QAAQ;IAACC,KAAK,EAAEL,MAAO;IAAAH,QAAA,EAAEA;EAAQ,CAAwB,CAAC;AAE5E,CAAC;AAACS,OAAA,CAAAX,cAAA,GAAAA,cAAA;AAEK,SAASY,SAASA,CAAA,EAAW;EAClC,OAAO,IAAAR,iBAAU,EAACP,YAAY,CAAC;AACjC","ignoreList":[]}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.defaultTokens = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Design Tokens — 静态默认值
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const defaultTokens = exports.defaultTokens = {
|
|
12
|
+
colorPrimary: '#EB6E00',
|
|
13
|
+
colorSuccess: '#34C759',
|
|
14
|
+
colorWarning: '#FF9500',
|
|
15
|
+
colorError: '#FF3B30',
|
|
16
|
+
colorBgPage: '#F7F7F8',
|
|
17
|
+
colorBgElevated: '#FFFFFF',
|
|
18
|
+
colorBgUserMsg: '#F0F0F0',
|
|
19
|
+
colorText: '#1D1D1F',
|
|
20
|
+
colorTextSecondary: '#8E8E93',
|
|
21
|
+
colorTextPlaceholder: '#C7C7CC',
|
|
22
|
+
colorBorder: '#E5E5EA',
|
|
23
|
+
colorLink: '#007AFF',
|
|
24
|
+
colorBgHeader: '#FFFFFF',
|
|
25
|
+
colorHeaderText: '#1D1D1F',
|
|
26
|
+
colorHeaderIcon: '#8E8E93',
|
|
27
|
+
fontSizeXs: 11,
|
|
28
|
+
fontSizeSm: 13,
|
|
29
|
+
fontSize: 15,
|
|
30
|
+
fontSizeMd: 16,
|
|
31
|
+
fontSizeLg: 17,
|
|
32
|
+
fontSizeXl: 20,
|
|
33
|
+
lineHeight: 22,
|
|
34
|
+
lineHeightLg: 26,
|
|
35
|
+
spaceXs: 4,
|
|
36
|
+
spaceSm: 8,
|
|
37
|
+
space: 12,
|
|
38
|
+
spaceMd: 16,
|
|
39
|
+
spaceLg: 20,
|
|
40
|
+
spaceXl: 24,
|
|
41
|
+
spaceXxl: 32,
|
|
42
|
+
radiusSm: 6,
|
|
43
|
+
radius: 10,
|
|
44
|
+
radiusLg: 16,
|
|
45
|
+
radiusXl: 20,
|
|
46
|
+
radiusFull: 999,
|
|
47
|
+
shadowSm: {
|
|
48
|
+
shadowColor: '#000',
|
|
49
|
+
shadowOffset: {
|
|
50
|
+
width: 0,
|
|
51
|
+
height: 1
|
|
52
|
+
},
|
|
53
|
+
shadowOpacity: 0.04,
|
|
54
|
+
shadowRadius: 2,
|
|
55
|
+
elevation: 1
|
|
56
|
+
},
|
|
57
|
+
shadow: {
|
|
58
|
+
shadowColor: '#000',
|
|
59
|
+
shadowOffset: {
|
|
60
|
+
width: 0,
|
|
61
|
+
height: 2
|
|
62
|
+
},
|
|
63
|
+
shadowOpacity: 0.06,
|
|
64
|
+
shadowRadius: 4,
|
|
65
|
+
elevation: 2
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["defaultTokens","exports","colorPrimary","colorSuccess","colorWarning","colorError","colorBgPage","colorBgElevated","colorBgUserMsg","colorText","colorTextSecondary","colorTextPlaceholder","colorBorder","colorLink","colorBgHeader","colorHeaderText","colorHeaderIcon","fontSizeXs","fontSizeSm","fontSize","fontSizeMd","fontSizeLg","fontSizeXl","lineHeight","lineHeightLg","spaceXs","spaceSm","space","spaceMd","spaceLg","spaceXl","spaceXxl","radiusSm","radius","radiusLg","radiusXl","radiusFull","shadowSm","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","shadow"],"sourceRoot":"../../../src","sources":["theme/tokens.ts"],"mappings":";;;;;;AAAA;AACA;AACA;;AAEO,MAAMA,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG;EAC3BE,YAAY,EAAE,SAAS;EACvBC,YAAY,EAAE,SAAS;EACvBC,YAAY,EAAE,SAAS;EACvBC,UAAU,EAAE,SAAS;EAErBC,WAAW,EAAE,SAAS;EACtBC,eAAe,EAAE,SAAS;EAC1BC,cAAc,EAAE,SAAS;EAEzBC,SAAS,EAAE,SAAS;EACpBC,kBAAkB,EAAE,SAAS;EAC7BC,oBAAoB,EAAE,SAAS;EAC/BC,WAAW,EAAE,SAAS;EACtBC,SAAS,EAAE,SAAS;EAEpBC,aAAa,EAAE,SAAS;EACxBC,eAAe,EAAE,SAAS;EAC1BC,eAAe,EAAE,SAAS;EAE1BC,UAAU,EAAE,EAAE;EACdC,UAAU,EAAE,EAAE;EACdC,QAAQ,EAAE,EAAE;EACZC,UAAU,EAAE,EAAE;EACdC,UAAU,EAAE,EAAE;EACdC,UAAU,EAAE,EAAE;EACdC,UAAU,EAAE,EAAE;EACdC,YAAY,EAAE,EAAE;EAEhBC,OAAO,EAAE,CAAC;EACVC,OAAO,EAAE,CAAC;EACVC,KAAK,EAAE,EAAE;EACTC,OAAO,EAAE,EAAE;EACXC,OAAO,EAAE,EAAE;EACXC,OAAO,EAAE,EAAE;EACXC,QAAQ,EAAE,EAAE;EAEZC,QAAQ,EAAE,CAAC;EACXC,MAAM,EAAE,EAAE;EACVC,QAAQ,EAAE,EAAE;EACZC,QAAQ,EAAE,EAAE;EACZC,UAAU,EAAE,GAAG;EAEfC,QAAQ,EAAE;IACRC,WAAW,EAAE,MAAM;IACnBC,YAAY,EAAE;MAAEC,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCC,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE;EACb,CAAC;EACDC,MAAM,EAAE;IACNP,WAAW,EAAE,MAAM;IACnBC,YAAY,EAAE;MAAEC,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCC,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE;EACb;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _style = require("./style");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
/**
|
|
13
|
+
* 统一触摸反馈组件
|
|
14
|
+
*
|
|
15
|
+
* 基于 Pressable,替代 TouchableOpacity。
|
|
16
|
+
* 按下时透明度降低,支持 activeOpacity 自定义。
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
const Touchable = ({
|
|
20
|
+
onPress,
|
|
21
|
+
onLongPress,
|
|
22
|
+
disabled,
|
|
23
|
+
activeOpacity = 0.7,
|
|
24
|
+
style,
|
|
25
|
+
testID,
|
|
26
|
+
...rest
|
|
27
|
+
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
28
|
+
onPress: onPress,
|
|
29
|
+
onLongPress: onLongPress,
|
|
30
|
+
disabled: disabled,
|
|
31
|
+
testID: testID,
|
|
32
|
+
style: ({
|
|
33
|
+
pressed
|
|
34
|
+
}) => [style, pressed && {
|
|
35
|
+
opacity: activeOpacity
|
|
36
|
+
}, disabled && _style.disabledStyle],
|
|
37
|
+
...rest
|
|
38
|
+
});
|
|
39
|
+
var _default = exports.default = Touchable;
|
|
40
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_style","_jsxRuntime","e","__esModule","default","Touchable","onPress","onLongPress","disabled","activeOpacity","style","testID","rest","jsx","Pressable","pressed","opacity","disabledStyle","_default","exports"],"sourceRoot":"../../../src","sources":["touchable/index.tsx"],"mappings":";;;;;;AAOA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAAwC,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAVxC;AACA;AACA;AACA;AACA;AACA;;AAgBA,MAAMG,SAAmC,GAAGA,CAAC;EAC3CC,OAAO;EACPC,WAAW;EACXC,QAAQ;EACRC,aAAa,GAAG,GAAG;EACnBC,KAAK;EACLC,MAAM;EACN,GAAGC;AACW,CAAC,kBACf,IAAAX,WAAA,CAAAY,GAAA,EAACd,YAAA,CAAAe,SAAS;EACRR,OAAO,EAAEA,OAAQ;EACjBC,WAAW,EAAEA,WAAY;EACzBC,QAAQ,EAAEA,QAAS;EACnBG,MAAM,EAAEA,MAAO;EACfD,KAAK,EAAEA,CAAC;IAAEK;EAAQ,CAAC,KAAK,CACtBL,KAAK,EACLK,OAAO,IAAI;IAAEC,OAAO,EAAEP;EAAc,CAAC,EACrCD,QAAQ,IAAIS,oBAAa,CACzB;EAAA,GACEL;AAAI,CACT,CACF;AAAC,IAAAM,QAAA,GAAAC,OAAA,CAAAf,OAAA,GAEaC,SAAS","ignoreList":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Touchable 统一触摸反馈
|
|
2
|
+
|
|
3
|
+
基于 `Pressable`,统一替代 `TouchableOpacity`。按下时降低透明度,支持自定义 `activeOpacity`。
|
|
4
|
+
|
|
5
|
+
## 何时使用
|
|
6
|
+
|
|
7
|
+
- 替代所有 `TouchableOpacity` 的场景
|
|
8
|
+
- 需要可点击区域(非按钮语义)时
|
|
9
|
+
|
|
10
|
+
## 代码演示
|
|
11
|
+
|
|
12
|
+
```tsx
|
|
13
|
+
// 基础用法
|
|
14
|
+
<Touchable onPress={handlePress}>
|
|
15
|
+
<Row gap={10}>
|
|
16
|
+
<Icon name="settings" />
|
|
17
|
+
<Text>设置</Text>
|
|
18
|
+
</Row>
|
|
19
|
+
</Touchable>
|
|
20
|
+
|
|
21
|
+
// 自定义按下透明度
|
|
22
|
+
<Touchable onPress={handlePress} activeOpacity={0.5}>
|
|
23
|
+
<Text>更明显的按下效果</Text>
|
|
24
|
+
</Touchable>
|
|
25
|
+
|
|
26
|
+
// 长按
|
|
27
|
+
<Touchable onPress={handlePress} onLongPress={handleLongPress}>
|
|
28
|
+
<Text>支持长按</Text>
|
|
29
|
+
</Touchable>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## API
|
|
33
|
+
|
|
34
|
+
| 属性 | 说明 | 类型 | 默认值 |
|
|
35
|
+
|------|------|------|--------|
|
|
36
|
+
| onPress | 点击回调 | `() => void` | - |
|
|
37
|
+
| onLongPress | 长按回调 | `() => void` | - |
|
|
38
|
+
| disabled | 禁用状态 | `boolean` | `false` |
|
|
39
|
+
| activeOpacity | 按下态透明度 | `number` | `0.7` |
|
|
40
|
+
| testID | 测试标识 | `string` | - |
|
|
41
|
+
|
|
42
|
+
> 继承所有 RN `ViewProps`
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.disabledStyle = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
const disabledStyle = exports.disabledStyle = _reactNative.StyleSheet.create({
|
|
9
|
+
s: {
|
|
10
|
+
opacity: 0.4
|
|
11
|
+
}
|
|
12
|
+
}).s;
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","disabledStyle","exports","StyleSheet","create","s","opacity"],"sourceRoot":"../../../../src","sources":["touchable/style/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEO,MAAMC,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAGE,uBAAU,CAACC,MAAM,CAAC;EAC7CC,CAAC,EAAE;IAAEC,OAAO,EAAE;EAAI;AACpB,CAAC,CAAC,CAACD,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
11
|
+
/**
|
|
12
|
+
* WaveAnimation 原子组件
|
|
13
|
+
*
|
|
14
|
+
* 柱状声波动画,可配置柱数、尺寸和颜色。
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const WaveAnimation = ({
|
|
18
|
+
active,
|
|
19
|
+
color = '#FFFFFF',
|
|
20
|
+
barCount = 4,
|
|
21
|
+
barWidth = 3,
|
|
22
|
+
minHeight = 6,
|
|
23
|
+
maxHeight = 20,
|
|
24
|
+
style,
|
|
25
|
+
testID
|
|
26
|
+
}) => {
|
|
27
|
+
const animations = (0, _react.useRef)(Array.from({
|
|
28
|
+
length: barCount
|
|
29
|
+
}, () => new _reactNative.Animated.Value(minHeight))).current;
|
|
30
|
+
(0, _react.useEffect)(() => {
|
|
31
|
+
if (!active) {
|
|
32
|
+
animations.forEach(anim => anim.setValue(minHeight));
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const loops = animations.map((anim, index) => _reactNative.Animated.loop(_reactNative.Animated.sequence([_reactNative.Animated.timing(anim, {
|
|
36
|
+
toValue: maxHeight - index * 3,
|
|
37
|
+
duration: 300 + index * 100,
|
|
38
|
+
useNativeDriver: false
|
|
39
|
+
}), _reactNative.Animated.timing(anim, {
|
|
40
|
+
toValue: minHeight,
|
|
41
|
+
duration: 300 + index * 100,
|
|
42
|
+
useNativeDriver: false
|
|
43
|
+
})])));
|
|
44
|
+
loops.forEach(loop => loop.start());
|
|
45
|
+
return () => {
|
|
46
|
+
loops.forEach(loop => loop.stop());
|
|
47
|
+
};
|
|
48
|
+
}, [active, animations, minHeight, maxHeight]);
|
|
49
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
50
|
+
style: [styles.container, {
|
|
51
|
+
height: maxHeight
|
|
52
|
+
}, style],
|
|
53
|
+
testID: testID,
|
|
54
|
+
children: animations.map((anim, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
|
55
|
+
style: [{
|
|
56
|
+
width: barWidth,
|
|
57
|
+
borderRadius: barWidth / 2,
|
|
58
|
+
height: anim,
|
|
59
|
+
backgroundColor: color
|
|
60
|
+
}]
|
|
61
|
+
}, index))
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
const styles = _reactNative.StyleSheet.create({
|
|
65
|
+
container: {
|
|
66
|
+
flexDirection: 'row',
|
|
67
|
+
alignItems: 'center',
|
|
68
|
+
gap: 3
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
var _default = exports.default = /*#__PURE__*/_react.default.memo(WaveAnimation);
|
|
72
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","WaveAnimation","active","color","barCount","barWidth","minHeight","maxHeight","style","testID","animations","useRef","Array","from","length","Animated","Value","current","useEffect","forEach","anim","setValue","loops","map","index","loop","sequence","timing","toValue","duration","useNativeDriver","start","stop","jsx","View","styles","container","height","children","width","borderRadius","backgroundColor","StyleSheet","create","flexDirection","alignItems","gap","_default","exports","React","memo"],"sourceRoot":"../../../src","sources":["wave-animation/index.tsx"],"mappings":";;;;;;AAMA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAA0D,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAA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,GARGqB,KASN,CACF;EAAC,CACE,CAAC;AAEX,CAAC;AAED,MAAMW,MAAM,GAAGO,uBAAU,CAACC,MAAM,CAAC;EAC/BP,SAAS,EAAE;IACTQ,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,GAAG,EAAE;EACP;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAxD,OAAA,gBAEYyD,cAAK,CAACC,IAAI,CAACjD,aAAa,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: WaveAnimation
|
|
3
|
+
nav:
|
|
4
|
+
title: 组件
|
|
5
|
+
order: 1
|
|
6
|
+
group:
|
|
7
|
+
title: 原子
|
|
8
|
+
order: 1
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# WaveAnimation 声波动画
|
|
12
|
+
|
|
13
|
+
柱状声波动画,适用于语音录制等场景的视觉反馈。
|
|
14
|
+
|
|
15
|
+
## 何时使用
|
|
16
|
+
|
|
17
|
+
- 语音录制时展示声波效果
|
|
18
|
+
- 需要节奏性动画反馈时
|
|
19
|
+
|
|
20
|
+
## 代码演示
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
import { WaveAnimation } from '@unif/react-native-ui';
|
|
24
|
+
|
|
25
|
+
// 基本用法
|
|
26
|
+
<WaveAnimation active={isRecording} />
|
|
27
|
+
|
|
28
|
+
// 自定义参数
|
|
29
|
+
<WaveAnimation
|
|
30
|
+
active={true}
|
|
31
|
+
color="#EB6E00"
|
|
32
|
+
barCount={5}
|
|
33
|
+
barWidth={4}
|
|
34
|
+
minHeight={4}
|
|
35
|
+
maxHeight={24}
|
|
36
|
+
/>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## API
|
|
40
|
+
|
|
41
|
+
| 属性 | 说明 | 类型 | 默认值 |
|
|
42
|
+
| --------- | ------------ | ---------- | ----------- |
|
|
43
|
+
| active | 控制动画启停 | `boolean` | - |
|
|
44
|
+
| color | 柱体颜色 | `string` | `'#FFFFFF'` |
|
|
45
|
+
| barCount | 柱数 | `number` | `4` |
|
|
46
|
+
| barWidth | 柱宽 | `number` | `3` |
|
|
47
|
+
| minHeight | 最小高度 | `number` | `6` |
|
|
48
|
+
| maxHeight | 最大高度 | `number` | `20` |
|
|
49
|
+
| style | 容器样式 | `ViewStyle`| - |
|
|
50
|
+
| testID | 测试标识 | `string` | - |
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
import React, { useMemo } from 'react';
|
|
10
10
|
import { View, Text, TouchableOpacity, TouchableWithoutFeedback, Modal } from 'react-native';
|
|
11
11
|
import { mergeStyles } from "../hooks/index.js";
|
|
12
|
-
import {
|
|
12
|
+
import { useTokens } from "../theme/context.js";
|
|
13
|
+
import { createDefaultStyles } from "./style/index.js";
|
|
13
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
15
|
const ActionSheet = ({
|
|
15
16
|
visible,
|
|
@@ -21,7 +22,9 @@ const ActionSheet = ({
|
|
|
21
22
|
styles: semanticStyles,
|
|
22
23
|
testID
|
|
23
24
|
}) => {
|
|
24
|
-
const
|
|
25
|
+
const tokens = useTokens();
|
|
26
|
+
const defaultStyles = useMemo(() => createDefaultStyles(tokens), [tokens]);
|
|
27
|
+
const s = useMemo(() => mergeStyles(defaultStyles, semanticStyles), [defaultStyles, semanticStyles]);
|
|
25
28
|
if (!visible) {
|
|
26
29
|
return null;
|
|
27
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","View","Text","TouchableOpacity","TouchableWithoutFeedback","Modal","mergeStyles","
|
|
1
|
+
{"version":3,"names":["React","useMemo","View","Text","TouchableOpacity","TouchableWithoutFeedback","Modal","mergeStyles","useTokens","createDefaultStyles","jsx","_jsx","jsxs","_jsxs","ActionSheet","visible","onClose","options","onSelect","columns","style","styles","semanticStyles","testID","tokens","defaultStyles","s","transparent","animationType","onRequestClose","children","onPress","overlay","panel","grid","map","item","option","width","Math","floor","key","activeOpacity","undefined","optionIcon","icon","optionLabel","label"],"sourceRoot":"../../../src","sources":["action-sheet/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SACEC,IAAI,EACJC,IAAI,EACJC,gBAAgB,EAChBC,wBAAwB,EACxBC,KAAK,QACA,cAAc;AAErB,SAASC,WAAW,QAAQ,mBAAU;AACtC,SAASC,SAAS,QAAQ,qBAAkB;AAE5C,SAASC,mBAAmB,QAAQ,kBAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAc9C,MAAMC,WAAuC,GAAGA,CAAC;EAC/CC,OAAO;EACPC,OAAO;EACPC,OAAO;EACPC,QAAQ;EACRC,OAAO,GAAG,CAAC;EACXC,KAAK;EACLC,MAAM,EAAEC,cAAc;EACtBC;AACF,CAAC,KAAK;EACJ,MAAMC,MAAM,GAAGhB,SAAS,CAAC,CAAC;EAC1B,MAAMiB,aAAa,GAAGxB,OAAO,CAAC,MAAMQ,mBAAmB,CAACe,MAAM,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAE1E,MAAME,CAAC,GAAGzB,OAAO,CACf,MAAMM,WAAW,CAA4BkB,aAAa,EAAEH,cAAc,CAAC,EAC3E,CAACG,aAAa,EAAEH,cAAc,CAChC,CAAC;EAED,IAAI,CAACP,OAAO,EAAE;IACZ,OAAO,IAAI;EACb;EAEA,oBACEF,KAAA,CAACP,KAAK;IACJS,OAAO,EAAEA,OAAQ;IACjBY,WAAW;IACXC,aAAa,EAAC,OAAO;IACrBC,cAAc,EAAEb,OAAQ;IAAAc,QAAA,gBAExBnB,IAAA,CAACN,wBAAwB;MAAC0B,OAAO,EAAEf,OAAQ;MAAAc,QAAA,eACzCnB,IAAA,CAACT,IAAI;QAACkB,KAAK,EAAEM,CAAC,CAACM;MAAQ,CAAE;IAAC,CACF,CAAC,eAE3BrB,IAAA,CAACT,IAAI;MAACkB,KAAK,EAAE,CAACM,CAAC,CAACO,KAAK,EAAEb,KAAK,CAAE;MAACG,MAAM,EAAEA,MAAO;MAAAO,QAAA,eAC5CnB,IAAA,CAACT,IAAI;QAACkB,KAAK,EAAEM,CAAC,CAACQ,IAAK;QAAAJ,QAAA,EACjBb,OAAO,CAACkB,GAAG,CAAEC,IAAI,iBAChBvB,KAAA,CAACT,gBAAgB;UAEfgB,KAAK,EAAE,CACLM,CAAC,CAACW,MAAM,EACR;YAAEC,KAAK,EAAE,GAAGC,IAAI,CAACC,KAAK,CAAC,GAAG,GAAGrB,OAAO,CAAC;UAAW,CAAC,CACjD;UACFY,OAAO,EAAEA,CAAA,KAAMb,QAAQ,CAACkB,IAAI,CAACK,GAAG,CAAE;UAClCC,aAAa,EAAE,GAAI;UACnBnB,MAAM,EAAEA,MAAM,GAAG,GAAGA,MAAM,IAAIa,IAAI,CAACK,GAAG,EAAE,GAAGE,SAAU;UAAAb,QAAA,gBAErDnB,IAAA,CAACT,IAAI;YAACkB,KAAK,EAAEM,CAAC,CAACkB,UAAW;YAAAd,QAAA,EAAEM,IAAI,CAACS;UAAI,CAAO,CAAC,eAC7ClC,IAAA,CAACR,IAAI;YAACiB,KAAK,EAAEM,CAAC,CAACoB,WAAY;YAAAhB,QAAA,EAAEM,IAAI,CAACW;UAAK,CAAO,CAAC;QAAA,GAV1CX,IAAI,CAACK,GAWM,CACnB;MAAC,CACE;IAAC,CACH,CAAC;EAAA,CACF,CAAC;AAEZ,CAAC;AAED,eAAe3B,WAAW","ignoreList":[]}
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
export const DEFAULT_STYLES = {
|
|
3
|
+
export const createDefaultStyles = t => ({
|
|
5
4
|
overlay: {
|
|
6
5
|
flex: 1,
|
|
7
6
|
backgroundColor: 'rgba(0,0,0,0.3)'
|
|
8
7
|
},
|
|
9
8
|
panel: {
|
|
10
|
-
backgroundColor:
|
|
9
|
+
backgroundColor: t.colorBgElevated,
|
|
11
10
|
borderTopLeftRadius: 12,
|
|
12
11
|
borderTopRightRadius: 12,
|
|
13
12
|
paddingTop: 20,
|
|
14
13
|
paddingBottom: 24,
|
|
15
|
-
paddingHorizontal:
|
|
14
|
+
paddingHorizontal: t.spaceMd
|
|
16
15
|
},
|
|
17
16
|
grid: {
|
|
18
17
|
flexDirection: 'row',
|
|
@@ -25,14 +24,14 @@ export const DEFAULT_STYLES = {
|
|
|
25
24
|
width: 56,
|
|
26
25
|
height: 56,
|
|
27
26
|
borderRadius: 12,
|
|
28
|
-
backgroundColor:
|
|
27
|
+
backgroundColor: t.colorBgPage,
|
|
29
28
|
justifyContent: 'center',
|
|
30
29
|
alignItems: 'center',
|
|
31
|
-
marginBottom:
|
|
30
|
+
marginBottom: t.spaceSm
|
|
32
31
|
},
|
|
33
32
|
optionLabel: {
|
|
34
33
|
fontSize: 12,
|
|
35
|
-
color:
|
|
34
|
+
color: t.colorTextSecondary
|
|
36
35
|
}
|
|
37
|
-
};
|
|
36
|
+
});
|
|
38
37
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["createDefaultStyles","t","overlay","flex","backgroundColor","panel","colorBgElevated","borderTopLeftRadius","borderTopRightRadius","paddingTop","paddingBottom","paddingHorizontal","spaceMd","grid","flexDirection","justifyContent","option","alignItems","optionIcon","width","height","borderRadius","colorBgPage","marginBottom","spaceSm","optionLabel","fontSize","color","colorTextSecondary"],"sourceRoot":"../../../../src","sources":["action-sheet/style/index.tsx"],"mappings":";;AAkBA,OAAO,MAAMA,mBAAmB,GAC9BC,CAAS,KACsB;EAC/BC,OAAO,EAAE;IACPC,IAAI,EAAE,CAAC;IACPC,eAAe,EAAE;EACnB,CAAC;EACDC,KAAK,EAAE;IACLD,eAAe,EAAEH,CAAC,CAACK,eAAe;IAClCC,mBAAmB,EAAE,EAAE;IACvBC,oBAAoB,EAAE,EAAE;IACxBC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE,EAAE;IACjBC,iBAAiB,EAAEV,CAAC,CAACW;EACvB,CAAC;EACDC,IAAI,EAAE;IACJC,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDC,MAAM,EAAE;IACNC,UAAU,EAAE;EACd,CAAC;EACDC,UAAU,EAAE;IACVC,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVC,YAAY,EAAE,EAAE;IAChBjB,eAAe,EAAEH,CAAC,CAACqB,WAAW;IAC9BP,cAAc,EAAE,QAAQ;IACxBE,UAAU,EAAE,QAAQ;IACpBM,YAAY,EAAEtB,CAAC,CAACuB;EAClB,CAAC;EACDC,WAAW,EAAE;IACXC,QAAQ,EAAE,EAAE;IACZC,KAAK,EAAE1B,CAAC,CAAC2B;EACX;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
import React, { useMemo } from 'react';
|
|
10
10
|
import { View, Image } from 'react-native';
|
|
11
11
|
import { mergeStyles } from "../hooks/index.js";
|
|
12
|
-
import {
|
|
12
|
+
import { useTokens } from "../theme/context.js";
|
|
13
|
+
import { createDefaultStyles } from "./style/index.js";
|
|
13
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
15
|
const Avatar = ({
|
|
15
16
|
size = 40,
|
|
@@ -19,7 +20,9 @@ const Avatar = ({
|
|
|
19
20
|
styles: semanticStyles,
|
|
20
21
|
testID
|
|
21
22
|
}) => {
|
|
22
|
-
const
|
|
23
|
+
const tokens = useTokens();
|
|
24
|
+
const defaultStyles = useMemo(() => createDefaultStyles(tokens), [tokens]);
|
|
25
|
+
const s = useMemo(() => mergeStyles(defaultStyles, semanticStyles), [defaultStyles, semanticStyles]);
|
|
23
26
|
const sizeStyle = {
|
|
24
27
|
width: size,
|
|
25
28
|
height: size,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","View","Image","mergeStyles","
|
|
1
|
+
{"version":3,"names":["React","useMemo","View","Image","mergeStyles","useTokens","createDefaultStyles","jsx","_jsx","Avatar","size","source","icon","style","styles","semanticStyles","testID","tokens","defaultStyles","s","sizeStyle","width","height","borderRadius","root","children","image"],"sourceRoot":"../../../src","sources":["avatar/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,IAAI,EAAEC,KAAK,QAAQ,cAAc;AAE1C,SAASC,WAAW,QAAQ,mBAAU;AACtC,SAASC,SAAS,QAAQ,qBAAkB;AAE5C,SAASC,mBAAmB,QAAQ,kBAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAW9C,MAAMC,MAA6B,GAAGA,CAAC;EACrCC,IAAI,GAAG,EAAE;EACTC,MAAM;EACNC,IAAI;EACJC,KAAK;EACLC,MAAM,EAAEC,cAAc;EACtBC;AACF,CAAC,KAAK;EACJ,MAAMC,MAAM,GAAGZ,SAAS,CAAC,CAAC;EAC1B,MAAMa,aAAa,GAAGjB,OAAO,CAAC,MAAMK,mBAAmB,CAACW,MAAM,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAE1E,MAAME,CAAC,GAAGlB,OAAO,CACf,MAAMG,WAAW,CAAuBc,aAAa,EAAEH,cAAc,CAAC,EACtE,CAACG,aAAa,EAAEH,cAAc,CAChC,CAAC;EAED,MAAMK,SAAoB,GAAG;IAC3BC,KAAK,EAAEX,IAAI;IACXY,MAAM,EAAEZ,IAAI;IACZa,YAAY,EAAEb,IAAI,GAAG;EACvB,CAAC;EAED,oBACEF,IAAA,CAACN,IAAI;IAACW,KAAK,EAAE,CAACM,CAAC,CAACK,IAAI,EAAEJ,SAAS,EAAEP,KAAK,CAAE;IAACG,MAAM,EAAEA,MAAO;IAAAS,QAAA,EACrDd,MAAM,gBACLH,IAAA,CAACL,KAAK;MACJQ,MAAM,EAAEA,MAAO;MACfE,KAAK,EAAE,CAACM,CAAC,CAACO,KAAK,EAAE;QAAEL,KAAK,EAAEX,IAAI;QAAEY,MAAM,EAAEZ,IAAI;QAAEa,YAAY,EAAEb,IAAI,GAAG;MAAE,CAAC;IAAE,CACzE,CAAC,GACAE,IAAI,GACNA,IAAI,GACF;EAAI,CACJ,CAAC;AAEX,CAAC;AAED,eAAeH,MAAM","ignoreList":[]}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
export const DEFAULT_STYLES = {
|
|
3
|
+
export const createDefaultStyles = t => ({
|
|
5
4
|
root: {
|
|
6
5
|
justifyContent: 'center',
|
|
7
6
|
alignItems: 'center',
|
|
8
|
-
backgroundColor:
|
|
7
|
+
backgroundColor: t.colorBgElevated,
|
|
9
8
|
overflow: 'hidden',
|
|
10
|
-
...
|
|
9
|
+
...t.shadowSm
|
|
11
10
|
},
|
|
12
11
|
image: {
|
|
13
12
|
width: '100%',
|
|
14
13
|
height: '100%'
|
|
15
14
|
}
|
|
16
|
-
};
|
|
15
|
+
});
|
|
17
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["createDefaultStyles","t","root","justifyContent","alignItems","backgroundColor","colorBgElevated","overflow","shadowSm","image","width","height"],"sourceRoot":"../../../../src","sources":["avatar/style/index.tsx"],"mappings":";;AAQA,OAAO,MAAMA,mBAAmB,GAAIC,CAAS,KAA4B;EACvEC,IAAI,EAAE;IACJC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,eAAe,EAAEJ,CAAC,CAACK,eAAe;IAClCC,QAAQ,EAAE,QAAQ;IAClB,GAAGN,CAAC,CAACO;EACP,CAAC;EACDC,KAAK,EAAE;IACLC,KAAK,EAAE,MAAa;IACpBC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
import React, { useMemo } from 'react';
|
|
10
10
|
import { Pressable, Text, View, ActivityIndicator } from 'react-native';
|
|
11
11
|
import { mergeStyles } from "../hooks/index.js";
|
|
12
|
-
import {
|
|
12
|
+
import { useTokens } from "../theme/context.js";
|
|
13
|
+
import { DEFAULT_STYLES, SIZE_STYLES, createTypeStyles, DISABLED_STYLES, BLOCK_STYLES, PRESSED_STYLE, loadingStyle } from "./style/index.js";
|
|
13
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
15
|
const Button = ({
|
|
15
16
|
type = 'primary',
|
|
@@ -24,7 +25,9 @@ const Button = ({
|
|
|
24
25
|
testID,
|
|
25
26
|
children
|
|
26
27
|
}) => {
|
|
27
|
-
const
|
|
28
|
+
const tokens = useTokens();
|
|
29
|
+
const typeStyles = useMemo(() => createTypeStyles(tokens), [tokens]);
|
|
30
|
+
const s = useMemo(() => mergeStyles(DEFAULT_STYLES, SIZE_STYLES[size], typeStyles[type], disabled ? DISABLED_STYLES : undefined, block ? BLOCK_STYLES : undefined, semanticStyles), [type, size, disabled, block, semanticStyles, typeStyles]);
|
|
28
31
|
return /*#__PURE__*/_jsxs(Pressable, {
|
|
29
32
|
style: ({
|
|
30
33
|
pressed
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","Pressable","Text","View","ActivityIndicator","mergeStyles","DEFAULT_STYLES","SIZE_STYLES","
|
|
1
|
+
{"version":3,"names":["React","useMemo","Pressable","Text","View","ActivityIndicator","mergeStyles","useTokens","DEFAULT_STYLES","SIZE_STYLES","createTypeStyles","DISABLED_STYLES","BLOCK_STYLES","PRESSED_STYLE","loadingStyle","jsx","_jsx","jsxs","_jsxs","Button","type","size","icon","disabled","block","loading","onPress","style","styles","semanticStyles","testID","children","tokens","typeStyles","s","undefined","pressed","root","color","content"],"sourceRoot":"../../../src","sources":["button/index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