@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,8 @@
|
|
|
1
|
+
import type { ViewStyle } from 'react-native';
|
|
2
|
+
import type { Tokens } from '../../theme/tokens';
|
|
3
|
+
export type PopoverSemanticStyles = {
|
|
4
|
+
overlay?: ViewStyle;
|
|
5
|
+
content?: ViewStyle;
|
|
6
|
+
};
|
|
7
|
+
export declare const createDefaultStyles: (t: Tokens) => PopoverSemanticStyles;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/popover/style/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,GAAG,MAAM,KAAG,qBAc9C,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 水平布局容器
|
|
3
|
+
*
|
|
4
|
+
* 默认 flexDirection: 'row' + alignItems: 'center'。
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import type { ViewProps, ViewStyle } from 'react-native';
|
|
8
|
+
type AlignItems = ViewStyle['alignItems'];
|
|
9
|
+
type JustifyContent = ViewStyle['justifyContent'];
|
|
10
|
+
export interface RowProps extends ViewProps {
|
|
11
|
+
/** alignItems,默认 'center' */
|
|
12
|
+
align?: AlignItems;
|
|
13
|
+
/** justifyContent */
|
|
14
|
+
justify?: JustifyContent;
|
|
15
|
+
/** 子元素间距 */
|
|
16
|
+
gap?: number;
|
|
17
|
+
/** 是否换行 */
|
|
18
|
+
wrap?: boolean;
|
|
19
|
+
}
|
|
20
|
+
declare const Row: React.FC<RowProps>;
|
|
21
|
+
export default Row;
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/row/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzD,KAAK,UAAU,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC;AAC1C,KAAK,cAAc,GAAG,SAAS,CAAC,gBAAgB,CAAC,CAAC;AAElD,MAAM,WAAW,QAAS,SAAQ,SAAS;IACzC,6BAA6B;IAC7B,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,qBAAqB;IACrB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,YAAY;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW;IACX,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,QAAA,MAAM,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAmB3B,CAAC;AAEF,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/row/style/index.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;CAKhB,CAAC;AAEP,eAAO,MAAM,SAAS;;CAIf,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 间距占位组件
|
|
3
|
+
*
|
|
4
|
+
* 在两个元素之间插入固定间距。
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
export interface SpaceProps {
|
|
8
|
+
/** 间距大小,默认 12 */
|
|
9
|
+
size?: number;
|
|
10
|
+
/** 方向,默认 'vertical' */
|
|
11
|
+
direction?: 'horizontal' | 'vertical';
|
|
12
|
+
}
|
|
13
|
+
declare const Space: React.FC<SpaceProps>;
|
|
14
|
+
export default Space;
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/space/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,UAAU;IACzB,iBAAiB;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uBAAuB;IACvB,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;CACvC;AAED,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAQ/B,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/space/style/index.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM;;CAAuB,CAAC;AAElE,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM;;CAAsB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 语义化文字组件
|
|
3
|
+
*
|
|
4
|
+
* variant 驱动样式,支持嵌套 Text。
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import type { TextProps as RNTextProps } from 'react-native';
|
|
8
|
+
import type { FontWeight } from './style';
|
|
9
|
+
export interface TextProps extends RNTextProps {
|
|
10
|
+
variant?: 'title' | 'heading' | 'body' | 'caption' | 'micro';
|
|
11
|
+
secondary?: boolean;
|
|
12
|
+
primary?: boolean;
|
|
13
|
+
color?: string;
|
|
14
|
+
weight?: FontWeight;
|
|
15
|
+
}
|
|
16
|
+
declare const Text: React.FC<TextProps>;
|
|
17
|
+
export default Text;
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/text/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAG1C,MAAM,WAAW,SAAU,SAAQ,WAAW;IAC5C,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;IAC7D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AAED,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CA2B7B,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { TextStyle } from 'react-native';
|
|
2
|
+
import type { Tokens } from '../../theme/tokens';
|
|
3
|
+
export type FontWeight = 'medium' | 'semibold' | 'bold';
|
|
4
|
+
export declare const createVariantMap: (t: Tokens) => {
|
|
5
|
+
title: {
|
|
6
|
+
fontSize: number;
|
|
7
|
+
lineHeight: number;
|
|
8
|
+
fontWeight: "600";
|
|
9
|
+
color: string;
|
|
10
|
+
};
|
|
11
|
+
heading: {
|
|
12
|
+
fontSize: number;
|
|
13
|
+
lineHeight: number;
|
|
14
|
+
fontWeight: "600";
|
|
15
|
+
color: string;
|
|
16
|
+
};
|
|
17
|
+
body: {
|
|
18
|
+
fontSize: number;
|
|
19
|
+
lineHeight: number;
|
|
20
|
+
color: string;
|
|
21
|
+
};
|
|
22
|
+
caption: {
|
|
23
|
+
fontSize: number;
|
|
24
|
+
lineHeight: number;
|
|
25
|
+
color: string;
|
|
26
|
+
};
|
|
27
|
+
micro: {
|
|
28
|
+
fontSize: number;
|
|
29
|
+
lineHeight: number;
|
|
30
|
+
color: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export declare const WEIGHT_MAP: Record<FontWeight, TextStyle>;
|
|
34
|
+
export declare const createSecondaryStyle: (t: Tokens) => TextStyle;
|
|
35
|
+
export declare const createPrimaryStyle: (t: Tokens) => TextStyle;
|
|
36
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/text/style/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;AAExD,eAAO,MAAM,gBAAgB,GAAI,GAAG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBxC,CAAC;AAEH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,SAAS,CAIpD,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,GAAG,MAAM,KAAG,SAE/C,CAAC;AAEH,eAAO,MAAM,kBAAkB,GAAI,GAAG,MAAM,KAAG,SAE7C,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ConfigProvider — 声明式主题系统
|
|
3
|
+
*
|
|
4
|
+
* 通过 React Context 注入 token,支持嵌套覆盖。
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import type { Tokens } from './tokens';
|
|
8
|
+
export type TokenOverrides = Partial<Tokens>;
|
|
9
|
+
export interface ConfigProviderProps {
|
|
10
|
+
theme?: {
|
|
11
|
+
token?: TokenOverrides;
|
|
12
|
+
};
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
export declare const ConfigProvider: React.FC<ConfigProviderProps>;
|
|
16
|
+
export declare function useTokens(): Tokens;
|
|
17
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../src/theme/context.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAA6C,MAAM,OAAO,CAAC;AAElE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAI7C,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,cAAc,CAAA;KAAE,CAAC;IACnC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAcxD,CAAC;AAEF,wBAAgB,SAAS,IAAI,MAAM,CAElC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Design Tokens — 静态默认值
|
|
3
|
+
*/
|
|
4
|
+
export declare const defaultTokens: {
|
|
5
|
+
colorPrimary: string;
|
|
6
|
+
colorSuccess: string;
|
|
7
|
+
colorWarning: string;
|
|
8
|
+
colorError: string;
|
|
9
|
+
colorBgPage: string;
|
|
10
|
+
colorBgElevated: string;
|
|
11
|
+
colorBgUserMsg: string;
|
|
12
|
+
colorText: string;
|
|
13
|
+
colorTextSecondary: string;
|
|
14
|
+
colorTextPlaceholder: string;
|
|
15
|
+
colorBorder: string;
|
|
16
|
+
colorLink: string;
|
|
17
|
+
colorBgHeader: string;
|
|
18
|
+
colorHeaderText: string;
|
|
19
|
+
colorHeaderIcon: string;
|
|
20
|
+
fontSizeXs: number;
|
|
21
|
+
fontSizeSm: number;
|
|
22
|
+
fontSize: number;
|
|
23
|
+
fontSizeMd: number;
|
|
24
|
+
fontSizeLg: number;
|
|
25
|
+
fontSizeXl: number;
|
|
26
|
+
lineHeight: number;
|
|
27
|
+
lineHeightLg: number;
|
|
28
|
+
spaceXs: number;
|
|
29
|
+
spaceSm: number;
|
|
30
|
+
space: number;
|
|
31
|
+
spaceMd: number;
|
|
32
|
+
spaceLg: number;
|
|
33
|
+
spaceXl: number;
|
|
34
|
+
spaceXxl: number;
|
|
35
|
+
radiusSm: number;
|
|
36
|
+
radius: number;
|
|
37
|
+
radiusLg: number;
|
|
38
|
+
radiusXl: number;
|
|
39
|
+
radiusFull: number;
|
|
40
|
+
shadowSm: {
|
|
41
|
+
shadowColor: string;
|
|
42
|
+
shadowOffset: {
|
|
43
|
+
width: number;
|
|
44
|
+
height: number;
|
|
45
|
+
};
|
|
46
|
+
shadowOpacity: number;
|
|
47
|
+
shadowRadius: number;
|
|
48
|
+
elevation: number;
|
|
49
|
+
};
|
|
50
|
+
shadow: {
|
|
51
|
+
shadowColor: string;
|
|
52
|
+
shadowOffset: {
|
|
53
|
+
width: number;
|
|
54
|
+
height: number;
|
|
55
|
+
};
|
|
56
|
+
shadowOpacity: number;
|
|
57
|
+
shadowRadius: number;
|
|
58
|
+
elevation: number;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
export type Tokens = typeof defaultTokens;
|
|
62
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../../../src/theme/tokens.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyDzB,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,OAAO,aAAa,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 统一触摸反馈组件
|
|
3
|
+
*
|
|
4
|
+
* 基于 Pressable,替代 TouchableOpacity。
|
|
5
|
+
* 按下时透明度降低,支持 activeOpacity 自定义。
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import type { ViewProps } from 'react-native';
|
|
9
|
+
export interface TouchableProps extends ViewProps {
|
|
10
|
+
onPress?: () => void;
|
|
11
|
+
onLongPress?: () => void;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** 按下态透明度,默认 0.7 */
|
|
14
|
+
activeOpacity?: number;
|
|
15
|
+
testID?: string;
|
|
16
|
+
}
|
|
17
|
+
declare const Touchable: React.FC<TouchableProps>;
|
|
18
|
+
export default Touchable;
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/touchable/index.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAa,MAAM,cAAc,CAAC;AAGzD,MAAM,WAAW,cAAe,SAAQ,SAAS;IAC/C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oBAAoB;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAqBvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/touchable/style/index.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa;;CAEtB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WaveAnimation 原子组件
|
|
3
|
+
*
|
|
4
|
+
* 柱状声波动画,可配置柱数、尺寸和颜色。
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import type { ViewStyle } from 'react-native';
|
|
8
|
+
export interface WaveAnimationProps {
|
|
9
|
+
active: boolean;
|
|
10
|
+
color?: string;
|
|
11
|
+
barCount?: number;
|
|
12
|
+
barWidth?: number;
|
|
13
|
+
minHeight?: number;
|
|
14
|
+
maxHeight?: number;
|
|
15
|
+
style?: ViewStyle;
|
|
16
|
+
testID?: string;
|
|
17
|
+
}
|
|
18
|
+
declare const _default: React.NamedExoticComponent<WaveAnimationProps>;
|
|
19
|
+
export default _default;
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/wave-animation/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAA4B,MAAM,OAAO,CAAC;AAEjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;;AAyED,wBAAyC"}
|
package/package.json
CHANGED
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unif/react-native-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "UNIF React Native UI Components",
|
|
5
|
-
"main": "./
|
|
6
|
-
"
|
|
5
|
+
"main": "./lib/commonjs/index.js",
|
|
6
|
+
"module": "./lib/module/index.js",
|
|
7
|
+
"types": "./lib/typescript/commonjs/src/index.d.ts",
|
|
8
|
+
"react-native": "./src/index.tsx",
|
|
9
|
+
"source": "./src/index.tsx",
|
|
7
10
|
"exports": {
|
|
8
11
|
".": {
|
|
9
12
|
"source": "./src/index.tsx",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
13
|
+
"react-native": "./src/index.tsx",
|
|
14
|
+
"import": {
|
|
15
|
+
"types": "./lib/typescript/module/src/index.d.ts",
|
|
16
|
+
"default": "./lib/module/index.js"
|
|
17
|
+
},
|
|
18
|
+
"require": {
|
|
19
|
+
"types": "./lib/typescript/commonjs/src/index.d.ts",
|
|
20
|
+
"default": "./lib/commonjs/index.js"
|
|
21
|
+
}
|
|
12
22
|
},
|
|
13
23
|
"./package.json": "./package.json"
|
|
14
24
|
},
|
|
@@ -102,6 +112,7 @@
|
|
|
102
112
|
"source": "src",
|
|
103
113
|
"output": "lib",
|
|
104
114
|
"targets": [
|
|
115
|
+
"commonjs",
|
|
105
116
|
[
|
|
106
117
|
"module",
|
|
107
118
|
{
|
|
@@ -14,8 +14,9 @@ import {
|
|
|
14
14
|
} from 'react-native';
|
|
15
15
|
import type { ViewStyle } from 'react-native';
|
|
16
16
|
import { mergeStyles } from '../hooks';
|
|
17
|
+
import { useTokens } from '../theme/context';
|
|
17
18
|
import type { ActionSheetSemanticStyles, ActionSheetOption } from './style';
|
|
18
|
-
import {
|
|
19
|
+
import { createDefaultStyles } from './style';
|
|
19
20
|
|
|
20
21
|
export interface ActionSheetProps {
|
|
21
22
|
visible: boolean;
|
|
@@ -39,9 +40,12 @@ const ActionSheet: React.FC<ActionSheetProps> = ({
|
|
|
39
40
|
styles: semanticStyles,
|
|
40
41
|
testID,
|
|
41
42
|
}) => {
|
|
43
|
+
const tokens = useTokens();
|
|
44
|
+
const defaultStyles = useMemo(() => createDefaultStyles(tokens), [tokens]);
|
|
45
|
+
|
|
42
46
|
const s = useMemo(
|
|
43
|
-
() => mergeStyles<ActionSheetSemanticStyles>(
|
|
44
|
-
[semanticStyles],
|
|
47
|
+
() => mergeStyles<ActionSheetSemanticStyles>(defaultStyles, semanticStyles),
|
|
48
|
+
[defaultStyles, semanticStyles],
|
|
45
49
|
);
|
|
46
50
|
|
|
47
51
|
if (!visible) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ViewStyle, TextStyle } from 'react-native';
|
|
2
|
-
import {
|
|
2
|
+
import type { Tokens } from '../../theme/tokens';
|
|
3
3
|
|
|
4
4
|
export type ActionSheetSemanticStyles = {
|
|
5
5
|
overlay?: ViewStyle;
|
|
@@ -16,18 +16,20 @@ export interface ActionSheetOption {
|
|
|
16
16
|
icon?: React.ReactNode;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
export const
|
|
19
|
+
export const createDefaultStyles = (
|
|
20
|
+
t: Tokens,
|
|
21
|
+
): ActionSheetSemanticStyles => ({
|
|
20
22
|
overlay: {
|
|
21
23
|
flex: 1,
|
|
22
24
|
backgroundColor: 'rgba(0,0,0,0.3)',
|
|
23
25
|
},
|
|
24
26
|
panel: {
|
|
25
|
-
backgroundColor:
|
|
27
|
+
backgroundColor: t.colorBgElevated,
|
|
26
28
|
borderTopLeftRadius: 12,
|
|
27
29
|
borderTopRightRadius: 12,
|
|
28
30
|
paddingTop: 20,
|
|
29
31
|
paddingBottom: 24,
|
|
30
|
-
paddingHorizontal:
|
|
32
|
+
paddingHorizontal: t.spaceMd,
|
|
31
33
|
},
|
|
32
34
|
grid: {
|
|
33
35
|
flexDirection: 'row',
|
|
@@ -40,13 +42,13 @@ export const DEFAULT_STYLES: ActionSheetSemanticStyles = {
|
|
|
40
42
|
width: 56,
|
|
41
43
|
height: 56,
|
|
42
44
|
borderRadius: 12,
|
|
43
|
-
backgroundColor:
|
|
45
|
+
backgroundColor: t.colorBgPage,
|
|
44
46
|
justifyContent: 'center',
|
|
45
47
|
alignItems: 'center',
|
|
46
|
-
marginBottom:
|
|
48
|
+
marginBottom: t.spaceSm,
|
|
47
49
|
},
|
|
48
50
|
optionLabel: {
|
|
49
51
|
fontSize: 12,
|
|
50
|
-
color:
|
|
52
|
+
color: t.colorTextSecondary,
|
|
51
53
|
},
|
|
52
|
-
};
|
|
54
|
+
});
|
package/src/avatar/index.tsx
CHANGED
|
@@ -8,8 +8,9 @@ import React, { useMemo } from 'react';
|
|
|
8
8
|
import { View, Image } from 'react-native';
|
|
9
9
|
import type { ViewStyle, ImageSourcePropType } from 'react-native';
|
|
10
10
|
import { mergeStyles } from '../hooks';
|
|
11
|
+
import { useTokens } from '../theme/context';
|
|
11
12
|
import type { AvatarSemanticStyles } from './style';
|
|
12
|
-
import {
|
|
13
|
+
import { createDefaultStyles } from './style';
|
|
13
14
|
|
|
14
15
|
export interface AvatarProps {
|
|
15
16
|
size?: number;
|
|
@@ -28,9 +29,12 @@ const Avatar: React.FC<AvatarProps> = ({
|
|
|
28
29
|
styles: semanticStyles,
|
|
29
30
|
testID,
|
|
30
31
|
}) => {
|
|
32
|
+
const tokens = useTokens();
|
|
33
|
+
const defaultStyles = useMemo(() => createDefaultStyles(tokens), [tokens]);
|
|
34
|
+
|
|
31
35
|
const s = useMemo(
|
|
32
|
-
() => mergeStyles<AvatarSemanticStyles>(
|
|
33
|
-
[semanticStyles],
|
|
36
|
+
() => mergeStyles<AvatarSemanticStyles>(defaultStyles, semanticStyles),
|
|
37
|
+
[defaultStyles, semanticStyles],
|
|
34
38
|
);
|
|
35
39
|
|
|
36
40
|
const sizeStyle: ViewStyle = {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import type { ViewStyle, ImageStyle } from 'react-native';
|
|
2
|
-
import {
|
|
2
|
+
import type { Tokens } from '../../theme/tokens';
|
|
3
3
|
|
|
4
4
|
export type AvatarSemanticStyles = {
|
|
5
5
|
root?: ViewStyle;
|
|
6
6
|
image?: ImageStyle;
|
|
7
7
|
};
|
|
8
8
|
|
|
9
|
-
export const
|
|
9
|
+
export const createDefaultStyles = (t: Tokens): AvatarSemanticStyles => ({
|
|
10
10
|
root: {
|
|
11
11
|
justifyContent: 'center',
|
|
12
12
|
alignItems: 'center',
|
|
13
|
-
backgroundColor:
|
|
13
|
+
backgroundColor: t.colorBgElevated,
|
|
14
14
|
overflow: 'hidden',
|
|
15
|
-
...
|
|
15
|
+
...t.shadowSm,
|
|
16
16
|
},
|
|
17
17
|
image: {
|
|
18
18
|
width: '100%' as any,
|
|
19
19
|
height: '100%' as any,
|
|
20
20
|
},
|
|
21
|
-
};
|
|
21
|
+
});
|
package/src/button/index.tsx
CHANGED
|
@@ -8,11 +8,12 @@ import React, { useMemo } from 'react';
|
|
|
8
8
|
import { Pressable, Text, View, ActivityIndicator } from 'react-native';
|
|
9
9
|
import type { ViewStyle } from 'react-native';
|
|
10
10
|
import { mergeStyles } from '../hooks';
|
|
11
|
+
import { useTokens } from '../theme/context';
|
|
11
12
|
import type { ButtonSemanticStyles } from './style';
|
|
12
13
|
import {
|
|
13
14
|
DEFAULT_STYLES,
|
|
14
15
|
SIZE_STYLES,
|
|
15
|
-
|
|
16
|
+
createTypeStyles,
|
|
16
17
|
DISABLED_STYLES,
|
|
17
18
|
BLOCK_STYLES,
|
|
18
19
|
PRESSED_STYLE,
|
|
@@ -46,17 +47,20 @@ const Button: React.FC<ButtonProps> = ({
|
|
|
46
47
|
testID,
|
|
47
48
|
children,
|
|
48
49
|
}: ButtonProps) => {
|
|
50
|
+
const tokens = useTokens();
|
|
51
|
+
const typeStyles = useMemo(() => createTypeStyles(tokens), [tokens]);
|
|
52
|
+
|
|
49
53
|
const s = useMemo(
|
|
50
54
|
() =>
|
|
51
55
|
mergeStyles<ButtonSemanticStyles>(
|
|
52
56
|
DEFAULT_STYLES,
|
|
53
57
|
SIZE_STYLES[size],
|
|
54
|
-
|
|
58
|
+
typeStyles[type],
|
|
55
59
|
disabled ? DISABLED_STYLES : undefined,
|
|
56
60
|
block ? BLOCK_STYLES : undefined,
|
|
57
61
|
semanticStyles,
|
|
58
62
|
),
|
|
59
|
-
[type, size, disabled, block, semanticStyles],
|
|
63
|
+
[type, size, disabled, block, semanticStyles, typeStyles],
|
|
60
64
|
);
|
|
61
65
|
|
|
62
66
|
return (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StyleSheet } from 'react-native';
|
|
2
2
|
import type { ViewStyle, TextStyle } from 'react-native';
|
|
3
|
-
import {
|
|
3
|
+
import type { Tokens } from '../../theme/tokens';
|
|
4
4
|
|
|
5
5
|
export type ButtonSemanticStyles = {
|
|
6
6
|
root?: ViewStyle;
|
|
@@ -33,24 +33,26 @@ export const SIZE_STYLES: Record<string, Partial<ButtonSemanticStyles>> = {
|
|
|
33
33
|
},
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
export const
|
|
36
|
+
export const createTypeStyles = (
|
|
37
|
+
t: Tokens,
|
|
38
|
+
): Record<string, Partial<ButtonSemanticStyles>> => ({
|
|
37
39
|
primary: {
|
|
38
|
-
root: { backgroundColor:
|
|
40
|
+
root: { backgroundColor: t.colorPrimary },
|
|
39
41
|
content: { color: '#FFF', fontWeight: '600' },
|
|
40
42
|
},
|
|
41
43
|
outline: {
|
|
42
|
-
root: { borderWidth: 1, borderColor:
|
|
43
|
-
content: { color:
|
|
44
|
+
root: { borderWidth: 1, borderColor: t.colorBorder },
|
|
45
|
+
content: { color: t.colorTextSecondary },
|
|
44
46
|
},
|
|
45
47
|
ghost: {
|
|
46
|
-
root: { borderWidth: 1, borderColor:
|
|
47
|
-
content: { color:
|
|
48
|
+
root: { borderWidth: 1, borderColor: t.colorPrimary },
|
|
49
|
+
content: { color: t.colorPrimary },
|
|
48
50
|
},
|
|
49
51
|
danger: {
|
|
50
|
-
root: { backgroundColor:
|
|
52
|
+
root: { backgroundColor: t.colorError },
|
|
51
53
|
content: { color: '#FFF', fontWeight: '600' },
|
|
52
54
|
},
|
|
53
|
-
};
|
|
55
|
+
});
|
|
54
56
|
|
|
55
57
|
export const DISABLED_STYLES: Partial<ButtonSemanticStyles> = {
|
|
56
58
|
root: { opacity: 0.5 },
|
package/src/chip/index.tsx
CHANGED
|
@@ -8,8 +8,14 @@ import React, { useMemo } from 'react';
|
|
|
8
8
|
import { View, Text, Pressable } from 'react-native';
|
|
9
9
|
import type { ViewStyle } from 'react-native';
|
|
10
10
|
import { mergeStyles } from '../hooks';
|
|
11
|
+
import { useTokens } from '../theme/context';
|
|
11
12
|
import type { ChipSemanticStyles } from './style';
|
|
12
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
createDefaultStyles,
|
|
15
|
+
createSelectedStyles,
|
|
16
|
+
DISABLED_STYLES,
|
|
17
|
+
createSmallStyles,
|
|
18
|
+
} from './style';
|
|
13
19
|
|
|
14
20
|
export interface ChipProps {
|
|
15
21
|
children: React.ReactNode;
|
|
@@ -36,16 +42,21 @@ const Chip: React.FC<ChipProps> = ({
|
|
|
36
42
|
styles: semanticStyles,
|
|
37
43
|
testID,
|
|
38
44
|
}) => {
|
|
45
|
+
const tokens = useTokens();
|
|
46
|
+
const defaultStyles = useMemo(() => createDefaultStyles(tokens), [tokens]);
|
|
47
|
+
const selectedStyles = useMemo(() => createSelectedStyles(tokens), [tokens]);
|
|
48
|
+
const smallStyles = useMemo(() => createSmallStyles(tokens), [tokens]);
|
|
49
|
+
|
|
39
50
|
const s = useMemo(
|
|
40
51
|
() =>
|
|
41
52
|
mergeStyles<ChipSemanticStyles>(
|
|
42
|
-
|
|
43
|
-
size === 'small' ?
|
|
44
|
-
selected ?
|
|
53
|
+
defaultStyles,
|
|
54
|
+
size === 'small' ? smallStyles : undefined,
|
|
55
|
+
selected ? selectedStyles : undefined,
|
|
45
56
|
disabled ? DISABLED_STYLES : undefined,
|
|
46
57
|
semanticStyles,
|
|
47
58
|
),
|
|
48
|
-
[size, selected, disabled, semanticStyles],
|
|
59
|
+
[size, selected, disabled, semanticStyles, defaultStyles, selectedStyles, smallStyles],
|
|
49
60
|
);
|
|
50
61
|
|
|
51
62
|
const content = (
|
package/src/chip/style/index.tsx
CHANGED
|
@@ -1,34 +1,36 @@
|
|
|
1
1
|
import type { ViewStyle, TextStyle } from 'react-native';
|
|
2
|
-
import {
|
|
2
|
+
import type { Tokens } from '../../theme/tokens';
|
|
3
3
|
|
|
4
4
|
export type ChipSemanticStyles = {
|
|
5
5
|
root?: ViewStyle;
|
|
6
6
|
content?: TextStyle;
|
|
7
7
|
};
|
|
8
8
|
|
|
9
|
-
export const
|
|
9
|
+
export const createDefaultStyles = (t: Tokens): ChipSemanticStyles => ({
|
|
10
10
|
root: {
|
|
11
11
|
backgroundColor: '#F0F0F5',
|
|
12
|
-
borderRadius:
|
|
12
|
+
borderRadius: t.radiusFull,
|
|
13
13
|
paddingHorizontal: 14,
|
|
14
14
|
paddingVertical: 7,
|
|
15
15
|
},
|
|
16
16
|
content: {
|
|
17
|
-
fontSize:
|
|
18
|
-
color:
|
|
17
|
+
fontSize: t.fontSizeSm,
|
|
18
|
+
color: t.colorText,
|
|
19
19
|
},
|
|
20
|
-
};
|
|
20
|
+
});
|
|
21
21
|
|
|
22
|
-
export const
|
|
22
|
+
export const createSelectedStyles = (
|
|
23
|
+
t: Tokens,
|
|
24
|
+
): Partial<ChipSemanticStyles> => ({
|
|
23
25
|
root: {
|
|
24
26
|
borderWidth: 1,
|
|
25
|
-
borderColor:
|
|
27
|
+
borderColor: t.colorPrimary,
|
|
26
28
|
backgroundColor: '#FFF5EB',
|
|
27
29
|
},
|
|
28
30
|
content: {
|
|
29
|
-
color:
|
|
31
|
+
color: t.colorPrimary,
|
|
30
32
|
},
|
|
31
|
-
};
|
|
33
|
+
});
|
|
32
34
|
|
|
33
35
|
export const DISABLED_STYLES: Partial<ChipSemanticStyles> = {
|
|
34
36
|
root: {
|
|
@@ -36,12 +38,12 @@ export const DISABLED_STYLES: Partial<ChipSemanticStyles> = {
|
|
|
36
38
|
},
|
|
37
39
|
};
|
|
38
40
|
|
|
39
|
-
export const
|
|
41
|
+
export const createSmallStyles = (t: Tokens): Partial<ChipSemanticStyles> => ({
|
|
40
42
|
root: {
|
|
41
43
|
paddingHorizontal: 10,
|
|
42
44
|
paddingVertical: 4,
|
|
43
45
|
},
|
|
44
46
|
content: {
|
|
45
|
-
fontSize:
|
|
47
|
+
fontSize: t.fontSizeXs,
|
|
46
48
|
},
|
|
47
|
-
};
|
|
49
|
+
});
|