@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
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { StyleSheet } from 'react-native';
|
|
4
|
-
import { tokens } from "../../theme/tokens.js";
|
|
5
4
|
export const DEFAULT_STYLES = {
|
|
6
5
|
root: {
|
|
7
6
|
flexDirection: 'row',
|
|
@@ -35,10 +34,10 @@ export const SIZE_STYLES = {
|
|
|
35
34
|
}
|
|
36
35
|
}
|
|
37
36
|
};
|
|
38
|
-
export const
|
|
37
|
+
export const createTypeStyles = t => ({
|
|
39
38
|
primary: {
|
|
40
39
|
root: {
|
|
41
|
-
backgroundColor:
|
|
40
|
+
backgroundColor: t.colorPrimary
|
|
42
41
|
},
|
|
43
42
|
content: {
|
|
44
43
|
color: '#FFF',
|
|
@@ -48,31 +47,31 @@ export const TYPE_STYLES = {
|
|
|
48
47
|
outline: {
|
|
49
48
|
root: {
|
|
50
49
|
borderWidth: 1,
|
|
51
|
-
borderColor:
|
|
50
|
+
borderColor: t.colorBorder
|
|
52
51
|
},
|
|
53
52
|
content: {
|
|
54
|
-
color:
|
|
53
|
+
color: t.colorTextSecondary
|
|
55
54
|
}
|
|
56
55
|
},
|
|
57
56
|
ghost: {
|
|
58
57
|
root: {
|
|
59
58
|
borderWidth: 1,
|
|
60
|
-
borderColor:
|
|
59
|
+
borderColor: t.colorPrimary
|
|
61
60
|
},
|
|
62
61
|
content: {
|
|
63
|
-
color:
|
|
62
|
+
color: t.colorPrimary
|
|
64
63
|
}
|
|
65
64
|
},
|
|
66
65
|
danger: {
|
|
67
66
|
root: {
|
|
68
|
-
backgroundColor:
|
|
67
|
+
backgroundColor: t.colorError
|
|
69
68
|
},
|
|
70
69
|
content: {
|
|
71
70
|
color: '#FFF',
|
|
72
71
|
fontWeight: '600'
|
|
73
72
|
}
|
|
74
73
|
}
|
|
75
|
-
};
|
|
74
|
+
});
|
|
76
75
|
export const DISABLED_STYLES = {
|
|
77
76
|
root: {
|
|
78
77
|
opacity: 0.5
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","
|
|
1
|
+
{"version":3,"names":["StyleSheet","DEFAULT_STYLES","root","flexDirection","alignItems","justifyContent","icon","marginRight","content","fontSize","SIZE_STYLES","default","paddingVertical","borderRadius","small","createTypeStyles","t","primary","backgroundColor","colorPrimary","color","fontWeight","outline","borderWidth","borderColor","colorBorder","colorTextSecondary","ghost","danger","colorError","DISABLED_STYLES","opacity","BLOCK_STYLES","flex","PRESSED_STYLE","loadingStyle","create","s"],"sourceRoot":"../../../../src","sources":["button/style/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc;AAUzC,OAAO,MAAMC,cAAoC,GAAG;EAClDC,IAAI,EAAE;IACJC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDC,IAAI,EAAE;IACJC,WAAW,EAAE;EACf,CAAC;EACDC,OAAO,EAAE;IACPC,QAAQ,EAAE;EACZ;AACF,CAAC;AAED,OAAO,MAAMC,WAA0D,GAAG;EACxEC,OAAO,EAAE;IACPT,IAAI,EAAE;MAAEU,eAAe,EAAE,EAAE;MAAEC,YAAY,EAAE;IAAE,CAAC;IAC9CL,OAAO,EAAE;MAAEC,QAAQ,EAAE;IAAG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5CC,CAAC,EAAE;IAAE9B,WAAW,EAAE;EAAE;AACtB,CAAC,CAAC,CAAC8B,CAAC","ignoreList":[]}
|
package/lib/module/chip/index.js
CHANGED
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
import React, { useMemo } from 'react';
|
|
10
10
|
import { View, Text, Pressable } from 'react-native';
|
|
11
11
|
import { mergeStyles } from "../hooks/index.js";
|
|
12
|
-
import {
|
|
12
|
+
import { useTokens } from "../theme/context.js";
|
|
13
|
+
import { createDefaultStyles, createSelectedStyles, DISABLED_STYLES, createSmallStyles } from "./style/index.js";
|
|
13
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
15
|
const PRESSED_STYLE = {
|
|
15
16
|
opacity: 0.7
|
|
@@ -25,7 +26,11 @@ const Chip = ({
|
|
|
25
26
|
styles: semanticStyles,
|
|
26
27
|
testID
|
|
27
28
|
}) => {
|
|
28
|
-
const
|
|
29
|
+
const tokens = useTokens();
|
|
30
|
+
const defaultStyles = useMemo(() => createDefaultStyles(tokens), [tokens]);
|
|
31
|
+
const selectedStyles = useMemo(() => createSelectedStyles(tokens), [tokens]);
|
|
32
|
+
const smallStyles = useMemo(() => createSmallStyles(tokens), [tokens]);
|
|
33
|
+
const s = useMemo(() => mergeStyles(defaultStyles, size === 'small' ? smallStyles : undefined, selected ? selectedStyles : undefined, disabled ? DISABLED_STYLES : undefined, semanticStyles), [size, selected, disabled, semanticStyles, defaultStyles, selectedStyles, smallStyles]);
|
|
29
34
|
const content = /*#__PURE__*/_jsxs(View, {
|
|
30
35
|
style: [s.root, {
|
|
31
36
|
flexDirection: 'row',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","View","Text","Pressable","mergeStyles","
|
|
1
|
+
{"version":3,"names":["React","useMemo","View","Text","Pressable","mergeStyles","useTokens","createDefaultStyles","createSelectedStyles","DISABLED_STYLES","createSmallStyles","jsx","_jsx","jsxs","_jsxs","PRESSED_STYLE","opacity","Chip","children","onPress","selected","disabled","size","icon","style","styles","semanticStyles","testID","tokens","defaultStyles","selectedStyles","smallStyles","s","undefined","content","root","flexDirection","alignItems","marginRight","numberOfLines","pressed"],"sourceRoot":"../../../src","sources":["chip/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,IAAI,EAAEC,IAAI,EAAEC,SAAS,QAAQ,cAAc;AAEpD,SAASC,WAAW,QAAQ,mBAAU;AACtC,SAASC,SAAS,QAAQ,qBAAkB;AAE5C,SACEC,mBAAmB,EACnBC,oBAAoB,EACpBC,eAAe,EACfC,iBAAiB,QACZ,kBAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAcjB,MAAMC,aAAwB,GAAG;EAAEC,OAAO,EAAE;AAAI,CAAC;AAEjD,MAAMC,IAAyB,GAAGA,CAAC;EACjCC,QAAQ;EACRC,OAAO;EACPC,QAAQ;EACRC,QAAQ;EACRC,IAAI,GAAG,SAAS;EAChBC,IAAI;EACJC,KAAK;EACLC,MAAM,EAAEC,cAAc;EACtBC;AACF,CAAC,KAAK;EACJ,MAAMC,MAAM,GAAGtB,SAAS,CAAC,CAAC;EAC1B,MAAMuB,aAAa,GAAG5B,OAAO,CAAC,MAAMM,mBAAmB,CAACqB,MAAM,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAC1E,MAAME,cAAc,GAAG7B,OAAO,CAAC,MAAMO,oBAAoB,CAACoB,MAAM,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAC5E,MAAMG,WAAW,GAAG9B,OAAO,CAAC,MAAMS,iBAAiB,CAACkB,MAAM,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAEtE,MAAMI,CAAC,GAAG/B,OAAO,CACf,MACEI,WAAW,CACTwB,aAAa,EACbP,IAAI,KAAK,OAAO,GAAGS,WAAW,GAAGE,SAAS,EAC1Cb,QAAQ,GAAGU,cAAc,GAAGG,SAAS,EACrCZ,QAAQ,GAAGZ,eAAe,GAAGwB,SAAS,EACtCP,cACF,CAAC,EACH,CAACJ,IAAI,EAAEF,QAAQ,EAAEC,QAAQ,EAAEK,cAAc,EAAEG,aAAa,EAAEC,cAAc,EAAEC,WAAW,CACvF,CAAC;EAED,MAAMG,OAAO,gBACXpB,KAAA,CAACZ,IAAI;IAACsB,KAAK,EAAE,CAACQ,CAAC,CAACG,IAAI,EAAE;MAAEC,aAAa,EAAE,KAAK;MAAEC,UAAU,EAAE;IAAS,CAAC,EAAEb,KAAK,CAAE;IAAAN,QAAA,GAC1EK,IAAI,iBAAIX,IAAA,CAACV,IAAI;MAACsB,KAAK,EAAE;QAAEc,WAAW,EAAE;MAAE,CAAE;MAAApB,QAAA,EAAEK;IAAI,CAAO,CAAC,EACtD,OAAOL,QAAQ,KAAK,QAAQ,gBAC3BN,IAAA,CAACT,IAAI;MAACqB,KAAK,EAAEQ,CAAC,CAACE,OAAQ;MAACK,aAAa,EAAE,CAAE;MAAArB,QAAA,EACtCA;IAAQ,CACL,CAAC,GAEPA,QACD;EAAA,CACG,CACP;EAED,IAAIC,OAAO,EAAE;IACX,oBACEP,IAAA,CAACR,SAAS;MACRe,OAAO,EAAEA,OAAQ;MACjBE,QAAQ,EAAEA,QAAS;MACnBG,KAAK,EAAEA,CAAC;QAAEgB;MAAQ,CAAC,KAAKA,OAAO,IAAIzB,aAAc;MACjDY,MAAM,EAAEA,MAAO;MAAAT,QAAA,EAEdgB;IAAO,CACC,CAAC;EAEhB;EAEA,OAAOA,OAAO;AAChB,CAAC;AAED,eAAejB,IAAI","ignoreList":[]}
|
|
@@ -1,40 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
export const DEFAULT_STYLES = {
|
|
3
|
+
export const createDefaultStyles = t => ({
|
|
5
4
|
root: {
|
|
6
5
|
backgroundColor: '#F0F0F5',
|
|
7
|
-
borderRadius:
|
|
6
|
+
borderRadius: t.radiusFull,
|
|
8
7
|
paddingHorizontal: 14,
|
|
9
8
|
paddingVertical: 7
|
|
10
9
|
},
|
|
11
10
|
content: {
|
|
12
|
-
fontSize:
|
|
13
|
-
color:
|
|
11
|
+
fontSize: t.fontSizeSm,
|
|
12
|
+
color: t.colorText
|
|
14
13
|
}
|
|
15
|
-
};
|
|
16
|
-
export const
|
|
14
|
+
});
|
|
15
|
+
export const createSelectedStyles = t => ({
|
|
17
16
|
root: {
|
|
18
17
|
borderWidth: 1,
|
|
19
|
-
borderColor:
|
|
18
|
+
borderColor: t.colorPrimary,
|
|
20
19
|
backgroundColor: '#FFF5EB'
|
|
21
20
|
},
|
|
22
21
|
content: {
|
|
23
|
-
color:
|
|
22
|
+
color: t.colorPrimary
|
|
24
23
|
}
|
|
25
|
-
};
|
|
24
|
+
});
|
|
26
25
|
export const DISABLED_STYLES = {
|
|
27
26
|
root: {
|
|
28
27
|
opacity: 0.5
|
|
29
28
|
}
|
|
30
29
|
};
|
|
31
|
-
export const
|
|
30
|
+
export const createSmallStyles = t => ({
|
|
32
31
|
root: {
|
|
33
32
|
paddingHorizontal: 10,
|
|
34
33
|
paddingVertical: 4
|
|
35
34
|
},
|
|
36
35
|
content: {
|
|
37
|
-
fontSize:
|
|
36
|
+
fontSize: t.fontSizeXs
|
|
38
37
|
}
|
|
39
|
-
};
|
|
38
|
+
});
|
|
40
39
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["createDefaultStyles","t","root","backgroundColor","borderRadius","radiusFull","paddingHorizontal","paddingVertical","content","fontSize","fontSizeSm","color","colorText","createSelectedStyles","borderWidth","borderColor","colorPrimary","DISABLED_STYLES","opacity","createSmallStyles","fontSizeXs"],"sourceRoot":"../../../../src","sources":["chip/style/index.tsx"],"mappings":";;AAQA,OAAO,MAAMA,mBAAmB,GAAIC,CAAS,KAA0B;EACrEC,IAAI,EAAE;IACJC,eAAe,EAAE,SAAS;IAC1BC,YAAY,EAAEH,CAAC,CAACI,UAAU;IAC1BC,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE;EACnB,CAAC;EACDC,OAAO,EAAE;IACPC,QAAQ,EAAER,CAAC,CAACS,UAAU;IACtBC,KAAK,EAAEV,CAAC,CAACW;EACX;AACF,CAAC,CAAC;AAEF,OAAO,MAAMC,oBAAoB,GAC/BZ,CAAS,KACwB;EACjCC,IAAI,EAAE;IACJY,WAAW,EAAE,CAAC;IACdC,WAAW,EAAEd,CAAC,CAACe,YAAY;IAC3Bb,eAAe,EAAE;EACnB,CAAC;EACDK,OAAO,EAAE;IACPG,KAAK,EAAEV,CAAC,CAACe;EACX;AACF,CAAC,CAAC;AAEF,OAAO,MAAMC,eAA4C,GAAG;EAC1Df,IAAI,EAAE;IACJgB,OAAO,EAAE;EACX;AACF,CAAC;AAED,OAAO,MAAMC,iBAAiB,GAAIlB,CAAS,KAAmC;EAC5EC,IAAI,EAAE;IACJI,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE;EACnB,CAAC;EACDC,OAAO,EAAE;IACPC,QAAQ,EAAER,CAAC,CAACmB;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -4,18 +4,24 @@
|
|
|
4
4
|
* 分割线组件
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import React from 'react';
|
|
7
|
+
import React, { useMemo } from 'react';
|
|
8
8
|
import { View } from 'react-native';
|
|
9
|
-
import {
|
|
9
|
+
import { useTokens } from "../theme/context.js";
|
|
10
|
+
import { createHairlineStyle, createStandardStyle } from "./style/index.js";
|
|
10
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
12
|
const Divider = ({
|
|
12
13
|
hairline = true,
|
|
13
14
|
marginHorizontal,
|
|
14
15
|
style
|
|
15
|
-
}) =>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
}) => {
|
|
17
|
+
const tokens = useTokens();
|
|
18
|
+
const hairlineStyle = useMemo(() => createHairlineStyle(tokens), [tokens]);
|
|
19
|
+
const standardStyle = useMemo(() => createStandardStyle(tokens), [tokens]);
|
|
20
|
+
return /*#__PURE__*/_jsx(View, {
|
|
21
|
+
style: [hairline ? hairlineStyle : standardStyle, marginHorizontal != null && {
|
|
22
|
+
marginHorizontal
|
|
23
|
+
}, style]
|
|
24
|
+
});
|
|
25
|
+
};
|
|
20
26
|
export default Divider;
|
|
21
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","
|
|
1
|
+
{"version":3,"names":["React","useMemo","View","useTokens","createHairlineStyle","createStandardStyle","jsx","_jsx","Divider","hairline","marginHorizontal","style","tokens","hairlineStyle","standardStyle"],"sourceRoot":"../../../src","sources":["divider/index.tsx"],"mappings":";;AAAA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,IAAI,QAAQ,cAAc;AAEnC,SAASC,SAAS,QAAQ,qBAAkB;AAC5C,SAASC,mBAAmB,EAAEC,mBAAmB,QAAQ,kBAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAQnE,MAAMC,OAA+B,GAAGA,CAAC;EACvCC,QAAQ,GAAG,IAAI;EACfC,gBAAgB;EAChBC;AACY,CAAC,KAAK;EAClB,MAAMC,MAAM,GAAGT,SAAS,CAAC,CAAC;EAC1B,MAAMU,aAAa,GAAGZ,OAAO,CAAC,MAAMG,mBAAmB,CAACQ,MAAM,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAC1E,MAAME,aAAa,GAAGb,OAAO,CAAC,MAAMI,mBAAmB,CAACO,MAAM,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAE1E,oBACEL,IAAA,CAACL,IAAI;IACHS,KAAK,EAAE,CACLF,QAAQ,GAAGI,aAAa,GAAGC,aAAa,EACxCJ,gBAAgB,IAAI,IAAI,IAAI;MAAEA;IAAiB,CAAC,EAChDC,KAAK;EACL,CACH,CAAC;AAEN,CAAC;AAED,eAAeH,OAAO","ignoreList":[]}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { StyleSheet } from 'react-native';
|
|
4
|
-
|
|
5
|
-
export const hairlineStyle = StyleSheet.create({
|
|
4
|
+
export const createHairlineStyle = t => StyleSheet.create({
|
|
6
5
|
line: {
|
|
7
6
|
height: StyleSheet.hairlineWidth,
|
|
8
|
-
backgroundColor:
|
|
7
|
+
backgroundColor: t.colorBorder
|
|
9
8
|
}
|
|
10
9
|
}).line;
|
|
11
|
-
export const
|
|
10
|
+
export const createStandardStyle = t => StyleSheet.create({
|
|
12
11
|
line: {
|
|
13
12
|
height: 1,
|
|
14
|
-
backgroundColor:
|
|
13
|
+
backgroundColor: t.colorBorder
|
|
15
14
|
}
|
|
16
15
|
}).line;
|
|
17
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","
|
|
1
|
+
{"version":3,"names":["StyleSheet","createHairlineStyle","t","create","line","height","hairlineWidth","backgroundColor","colorBorder","createStandardStyle"],"sourceRoot":"../../../../src","sources":["divider/style/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc;AAGzC,OAAO,MAAMC,mBAAmB,GAAIC,CAAS,IAC3CF,UAAU,CAACG,MAAM,CAAC;EAChBC,IAAI,EAAE;IACJC,MAAM,EAAEL,UAAU,CAACM,aAAa;IAChCC,eAAe,EAAEL,CAAC,CAACM;EACrB;AACF,CAAC,CAAC,CAACJ,IAAI;AAET,OAAO,MAAMK,mBAAmB,GAAIP,CAAS,IAC3CF,UAAU,CAACG,MAAM,CAAC;EAChBC,IAAI,EAAE;IAAEC,MAAM,EAAE,CAAC;IAAEE,eAAe,EAAEL,CAAC,CAACM;EAAY;AACpD,CAAC,CAAC,CAACJ,IAAI","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
// Theme
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
|
|
4
|
+
export { ConfigProvider, useTokens } from "./theme/context.js";
|
|
5
|
+
export { defaultTokens } from "./theme/tokens.js";
|
|
7
6
|
// Hooks
|
|
8
7
|
export { mergeStyles } from "./hooks/index.js";
|
|
9
8
|
|
|
@@ -21,9 +20,10 @@ export { default as Touchable } from "./touchable/index.js";
|
|
|
21
20
|
// Atoms
|
|
22
21
|
export { default as Avatar } from "./avatar/index.js";
|
|
23
22
|
export { default as WaveAnimation } from "./wave-animation/index.js";
|
|
24
|
-
// Base
|
|
23
|
+
// Base
|
|
25
24
|
export { default as Input } from "./input/index.js";
|
|
26
25
|
export { default as Chip } from "./chip/index.js";
|
|
27
26
|
export { default as ActionSheet } from "./action-sheet/index.js";
|
|
28
27
|
export { default as Popover } from "./popover/index.js";
|
|
28
|
+
export { default as Menu } from "./menu/index.js";
|
|
29
29
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["ConfigProvider","useTokens","defaultTokens","mergeStyles","default","Row","Column","Center","Space","Text","Button","Divider","ListItem","Touchable","Avatar","WaveAnimation","Input","Chip","ActionSheet","Popover","Menu"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA;AACA,SAASA,cAAc,EAAEC,SAAS,QAAQ,oBAAiB;AAE3D,SAASC,aAAa,QAAQ,mBAAgB;AAG9C;AACA,SAASC,WAAW,QAAQ,kBAAS;;AAErC;AACA,SAASC,OAAO,IAAIC,GAAG,QAAQ,gBAAO;AAEtC,SAASD,OAAO,IAAIE,MAAM,QAAQ,mBAAU;AAE5C,SAASF,OAAO,IAAIG,MAAM,QAAQ,mBAAU;AAE5C,SAASH,OAAO,IAAII,KAAK,QAAQ,kBAAS;AAG1C;AACA,SAASJ,OAAO,IAAIK,IAAI,QAAQ,iBAAQ;AAExC,SAASL,OAAO,IAAIM,MAAM,QAAQ,mBAAU;AAG5C,SAASN,OAAO,IAAIO,OAAO,QAAQ,oBAAW;AAC9C,SAASP,OAAO,IAAIQ,QAAQ,QAAQ,sBAAa;AACjD,SAASR,OAAO,IAAIS,SAAS,QAAQ,sBAAa;AAGlD;AACA,SAAST,OAAO,IAAIU,MAAM,QAAQ,mBAAU;AAG5C,SAASV,OAAO,IAAIW,aAAa,QAAQ,2BAAkB;AAG3D;AACA,SAASX,OAAO,IAAIY,KAAK,QAAQ,kBAAS;AAG1C,SAASZ,OAAO,IAAIa,IAAI,QAAQ,iBAAQ;AAGxC,SAASb,OAAO,IAAIc,WAAW,QAAQ,yBAAgB;AAGvD,SAASd,OAAO,IAAIe,OAAO,QAAQ,oBAAW;AAG9C,SAASf,OAAO,IAAIgB,IAAI,QAAQ,iBAAQ","ignoreList":[]}
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
import React, { useRef, useEffect, useMemo, forwardRef } from 'react';
|
|
10
10
|
import { View, TextInput } from 'react-native';
|
|
11
11
|
import { mergeStyles } from "../hooks/index.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import { useTokens } from "../theme/context.js";
|
|
13
|
+
import { createDefaultStyles } from "./style/index.js";
|
|
14
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
15
|
const Input = /*#__PURE__*/forwardRef(({
|
|
16
16
|
value,
|
|
@@ -31,8 +31,10 @@ const Input = /*#__PURE__*/forwardRef(({
|
|
|
31
31
|
testID
|
|
32
32
|
}, ref) => {
|
|
33
33
|
const inputRef = useRef(null);
|
|
34
|
+
const tokens = useTokens();
|
|
35
|
+
const defaultStyles = useMemo(() => createDefaultStyles(tokens), [tokens]);
|
|
34
36
|
React.useImperativeHandle(ref, () => inputRef.current);
|
|
35
|
-
const s = useMemo(() => mergeStyles(
|
|
37
|
+
const s = useMemo(() => mergeStyles(defaultStyles, semanticStyles), [defaultStyles, semanticStyles]);
|
|
36
38
|
useEffect(() => {
|
|
37
39
|
if (autoFocus) {
|
|
38
40
|
inputRef.current?.focus();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useRef","useEffect","useMemo","forwardRef","View","TextInput","mergeStyles","
|
|
1
|
+
{"version":3,"names":["React","useRef","useEffect","useMemo","forwardRef","View","TextInput","mergeStyles","useTokens","createDefaultStyles","jsx","_jsx","jsxs","_jsxs","Input","value","onChangeText","placeholder","multiline","maxLength","maxHeight","autoFocus","returnKeyType","onSubmitEditing","onBlur","onFocus","disabled","toolbar","style","styles","semanticStyles","testID","ref","inputRef","tokens","defaultStyles","useImperativeHandle","current","s","focus","root","children","input","undefined","placeholderTextColor","colorTextPlaceholder","editable","blurOnSubmit","displayName"],"sourceRoot":"../../../src","sources":["input/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,MAAM,EAAEC,SAAS,EAAEC,OAAO,EAAEC,UAAU,QAAQ,OAAO;AACrE,SAASC,IAAI,EAAEC,SAAS,QAAQ,cAAc;AAE9C,SAASC,WAAW,QAAQ,mBAAU;AACtC,SAASC,SAAS,QAAQ,qBAAkB;AAE5C,SAASC,mBAAmB,QAAQ,kBAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAuB9C,MAAMC,KAAK,gBAAGV,UAAU,CAAuB,CAAC;EAC9CW,KAAK;EACLC,YAAY;EACZC,WAAW;EACXC,SAAS,GAAG,KAAK;EACjBC,SAAS;EACTC,SAAS;EACTC,SAAS;EACTC,aAAa;EACbC,eAAe;EACfC,MAAM;EACNC,OAAO;EACPC,QAAQ;EACRC,OAAO;EACPC,KAAK;EACLC,MAAM,EAAEC,cAAc;EACtBC;AACF,CAAC,EAAEC,GAAG,KAAK;EACT,MAAMC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IAAA,CAACN,IAAI;MAACuB,KAAK,EAAEU,CAAC,CAACX,OAAQ;MAAAc,QAAA,EAAEd;IAAO,CAAO,CAAC;EAAA,CAChD,CAAC;AAEX,CAAC,CAAC;AAEFb,KAAK,CAACkC,WAAW,GAAG,OAAO;AAE3B,eAAelC,KAAK","ignoreList":[]}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { Platform } from 'react-native';
|
|
4
|
-
|
|
5
|
-
export const DEFAULT_STYLES = {
|
|
4
|
+
export const createDefaultStyles = t => ({
|
|
6
5
|
root: {
|
|
7
|
-
backgroundColor:
|
|
8
|
-
borderRadius:
|
|
6
|
+
backgroundColor: t.colorBgElevated,
|
|
7
|
+
borderRadius: t.radiusXl,
|
|
9
8
|
paddingHorizontal: 12,
|
|
10
9
|
paddingTop: 8,
|
|
11
10
|
paddingBottom: 6,
|
|
12
|
-
...
|
|
11
|
+
...t.shadow
|
|
13
12
|
},
|
|
14
13
|
input: {
|
|
15
|
-
fontSize:
|
|
16
|
-
color:
|
|
17
|
-
lineHeight:
|
|
14
|
+
fontSize: t.fontSize,
|
|
15
|
+
color: t.colorText,
|
|
16
|
+
lineHeight: t.lineHeight,
|
|
18
17
|
paddingVertical: Platform.OS === 'ios' ? 4 : 2,
|
|
19
18
|
paddingHorizontal: 4
|
|
20
19
|
},
|
|
@@ -23,5 +22,5 @@ export const DEFAULT_STYLES = {
|
|
|
23
22
|
alignItems: 'center',
|
|
24
23
|
paddingTop: 4
|
|
25
24
|
}
|
|
26
|
-
};
|
|
25
|
+
});
|
|
27
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","
|
|
1
|
+
{"version":3,"names":["Platform","createDefaultStyles","t","root","backgroundColor","colorBgElevated","borderRadius","radiusXl","paddingHorizontal","paddingTop","paddingBottom","shadow","input","fontSize","color","colorText","lineHeight","paddingVertical","OS","toolbar","flexDirection","alignItems"],"sourceRoot":"../../../../src","sources":["input/style/index.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AAUvC,OAAO,MAAMC,mBAAmB,GAAIC,CAAS,KAA2B;EACtEC,IAAI,EAAE;IACJC,eAAe,EAAEF,CAAC,CAACG,eAAe;IAClCC,YAAY,EAAEJ,CAAC,CAACK,QAAQ;IACxBC,iBAAiB,EAAE,EAAE;IACrBC,UAAU,EAAE,CAAC;IACbC,aAAa,EAAE,CAAC;IAChB,GAAGR,CAAC,CAACS;EACP,CAAC;EACDC,KAAK,EAAE;IACLC,QAAQ,EAAEX,CAAC,CAACW,QAAQ;IACpBC,KAAK,EAAEZ,CAAC,CAACa,SAAS;IAClBC,UAAU,EAAEd,CAAC,CAACc,UAAU;IACxBC,eAAe,EAAEjB,QAAQ,CAACkB,EAAE,KAAK,KAAK,GAAG,CAAC,GAAG,CAAC;IAC9CV,iBAAiB,EAAE;EACrB,CAAC;EACDW,OAAO,EAAE;IACPC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBZ,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -9,13 +9,9 @@
|
|
|
9
9
|
import React, { useMemo } from 'react';
|
|
10
10
|
import { View, Text, Pressable } from 'react-native';
|
|
11
11
|
import { mergeStyles } from "../hooks/index.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import { useTokens } from "../theme/context.js";
|
|
13
|
+
import { createDefaultStyles, lineStyle, contentWrapStyle } from "./style/index.js";
|
|
14
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
-
const defaultArrowStyle = {
|
|
16
|
-
fontSize: 18,
|
|
17
|
-
color: tokens.colorTextSecondary
|
|
18
|
-
};
|
|
19
15
|
const ListItem = ({
|
|
20
16
|
thumb,
|
|
21
17
|
title,
|
|
@@ -27,7 +23,13 @@ const ListItem = ({
|
|
|
27
23
|
styles: semanticStyles,
|
|
28
24
|
...props
|
|
29
25
|
}) => {
|
|
30
|
-
const
|
|
26
|
+
const tokens = useTokens();
|
|
27
|
+
const defaultStyles = useMemo(() => createDefaultStyles(tokens), [tokens]);
|
|
28
|
+
const defaultArrowStyle = useMemo(() => ({
|
|
29
|
+
fontSize: 18,
|
|
30
|
+
color: tokens.colorTextSecondary
|
|
31
|
+
}), [tokens]);
|
|
32
|
+
const s = useMemo(() => mergeStyles(defaultStyles, semanticStyles), [defaultStyles, semanticStyles]);
|
|
31
33
|
const content = /*#__PURE__*/_jsxs(View, {
|
|
32
34
|
style: [s.root, style],
|
|
33
35
|
children: [thumb, /*#__PURE__*/_jsxs(View, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","View","Text","Pressable","mergeStyles","
|
|
1
|
+
{"version":3,"names":["React","useMemo","View","Text","Pressable","mergeStyles","useTokens","createDefaultStyles","lineStyle","contentWrapStyle","jsx","_jsx","jsxs","_jsxs","ListItem","thumb","title","description","extra","arrow","arrowIcon","style","styles","semanticStyles","props","tokens","defaultStyles","defaultArrowStyle","fontSize","color","colorTextSecondary","s","content","root","children","numberOfLines","onPress","onLongPress","disabled","testID"],"sourceRoot":"../../../src","sources":["list-item/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,IAAI,EAAEC,IAAI,EAAEC,SAAS,QAAQ,cAAc;AAEpD,SAASC,WAAW,QAAQ,mBAAU;AACtC,SAASC,SAAS,QAAQ,qBAAkB;AAE5C,SAASC,mBAAmB,EAAEC,SAAS,EAAEC,gBAAgB,QAAQ,kBAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAiB3E,MAAMC,QAAiC,GAAGA,CAAC;EACzCC,KAAK;EACLC,KAAK;EACLC,WAAW;EACXC,KAAK;EACLC,KAAK;EACLC,SAAS;EACTC,KAAK;EACLC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AAK,CAAO,CAAC,gBAEjDP,IAAA,CAACT,IAAI;QAACmB,KAAK,EAAEU,CAAC,CAACb,KAAmB;QAAAgB,QAAA,EAAEhB;MAAK,CAAO,CACjD,CAAC,EACHC,KAAK,KACHC,SAAS,iBAAIT,IAAA,CAACR,IAAI;QAACkB,KAAK,EAAEM,iBAAkB;QAAAO,QAAA,EAAC;MAAC,CAAM,CAAC,CAAC;IAAA,CACrD,CAAC;EAAA,CACH,CACP;EAED,IAAIV,KAAK,CAACY,OAAO,EAAE;IACjB,oBACEzB,IAAA,CAACP,SAAS;MACRgC,OAAO,EAAEZ,KAAK,CAACY,OAAQ;MACvBC,WAAW,EAAEb,KAAK,CAACa,WAAY;MAC/BC,QAAQ,EAAEd,KAAK,CAACc,QAAS;MACzBC,MAAM,EAAEf,KAAK,CAACe,MAAO;MAAAL,QAAA,EAEpBF;IAAO,CACC,CAAC;EAEhB;EACA,OAAOA,OAAO;AAChB,CAAC;AAED,eAAelB,QAAQ","ignoreList":[]}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { StyleSheet } from 'react-native';
|
|
4
|
-
|
|
5
|
-
export const DEFAULT_SEMANTIC = {
|
|
4
|
+
export const createDefaultStyles = t => ({
|
|
6
5
|
root: {
|
|
7
6
|
flexDirection: 'row',
|
|
8
7
|
alignItems: 'center',
|
|
@@ -11,19 +10,19 @@ export const DEFAULT_SEMANTIC = {
|
|
|
11
10
|
},
|
|
12
11
|
content: {
|
|
13
12
|
fontSize: 15,
|
|
14
|
-
color:
|
|
13
|
+
color: t.colorText,
|
|
15
14
|
flex: 1
|
|
16
15
|
},
|
|
17
16
|
description: {
|
|
18
17
|
fontSize: 12,
|
|
19
|
-
color:
|
|
18
|
+
color: t.colorTextSecondary,
|
|
20
19
|
marginTop: 2
|
|
21
20
|
},
|
|
22
21
|
extra: {
|
|
23
|
-
color:
|
|
22
|
+
color: t.colorTextSecondary,
|
|
24
23
|
fontSize: 14
|
|
25
24
|
}
|
|
26
|
-
};
|
|
25
|
+
});
|
|
27
26
|
export const lineStyle = StyleSheet.create({
|
|
28
27
|
s: {
|
|
29
28
|
flex: 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","
|
|
1
|
+
{"version":3,"names":["StyleSheet","createDefaultStyles","t","root","flexDirection","alignItems","paddingHorizontal","paddingVertical","content","fontSize","color","colorText","flex","description","colorTextSecondary","marginTop","extra","lineStyle","create","s","contentWrapStyle"],"sourceRoot":"../../../../src","sources":["list-item/style/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc;AAWzC,OAAO,MAAMC,mBAAmB,GAAIC,CAAS,KAA8B;EACzEC,IAAI,EAAE;IACJC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE;EACnB,CAAC;EACDC,OAAO,EAAE;IACPC,QAAQ,EAAE,EAAE;IACZC,KAAK,EAAER,CAAC,CAACS,SAAS;IAClBC,IAAI,EAAE;EACR,CAAC;EACDC,WAAW,EAAE;IACXJ,QAAQ,EAAE,EAAE;IACZC,KAAK,EAAER,CAAC,CAACY,kBAAkB;IAC3BC,SAAS,EAAE;EACb,CAAC;EACDC,KAAK,EAAE;IACLN,KAAK,EAAER,CAAC,CAACY,kBAAkB;IAC3BL,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAEF,OAAO,MAAMQ,SAAS,GAAGjB,UAAU,CAACkB,MAAM,CAAC;EACzCC,CAAC,EAAE;IAAEP,IAAI,EAAE,CAAC;IAAER,aAAa,EAAE,KAAK;IAAEC,UAAU,EAAE;EAAS;AAC3D,CAAC,CAAC,CAACc,CAAC;AAEJ,OAAO,MAAMC,gBAAgB,GAAGpB,UAAU,CAACkB,MAAM,CAAC;EAChDC,CAAC,EAAE;IAAEP,IAAI,EAAE;EAAE;AACf,CAAC,CAAC,CAACO,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Menu 独立组件
|
|
5
|
+
*
|
|
6
|
+
* 基于 Popover 实现的菜单列表,支持 danger、icon、disabled。
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import React, { useMemo } from 'react';
|
|
10
|
+
import { View, Text, Pressable } from 'react-native';
|
|
11
|
+
import Popover from "../popover/index.js";
|
|
12
|
+
import { useTokens } from "../theme/context.js";
|
|
13
|
+
import { createDefaultStyles } from "./style/index.js";
|
|
14
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
+
const Menu = ({
|
|
16
|
+
visible,
|
|
17
|
+
onClose,
|
|
18
|
+
anchorLayout,
|
|
19
|
+
actions,
|
|
20
|
+
onAction,
|
|
21
|
+
placement = 'bottom',
|
|
22
|
+
width = 160,
|
|
23
|
+
style,
|
|
24
|
+
styles: semanticStyles,
|
|
25
|
+
testID
|
|
26
|
+
}) => {
|
|
27
|
+
const tokens = useTokens();
|
|
28
|
+
const ds = useMemo(() => createDefaultStyles(tokens), [tokens]);
|
|
29
|
+
return /*#__PURE__*/_jsx(Popover, {
|
|
30
|
+
visible: visible,
|
|
31
|
+
onClose: onClose,
|
|
32
|
+
anchorLayout: anchorLayout,
|
|
33
|
+
placement: placement,
|
|
34
|
+
width: width,
|
|
35
|
+
style: style,
|
|
36
|
+
testID: testID,
|
|
37
|
+
children: actions.map((action, index) => /*#__PURE__*/_jsxs(React.Fragment, {
|
|
38
|
+
children: [index > 0 && /*#__PURE__*/_jsx(View, {
|
|
39
|
+
style: [ds.divider, semanticStyles?.divider]
|
|
40
|
+
}), /*#__PURE__*/_jsxs(Pressable, {
|
|
41
|
+
style: [ds.item, semanticStyles?.item],
|
|
42
|
+
onPress: () => {
|
|
43
|
+
if (!action.disabled) {
|
|
44
|
+
onAction?.(action);
|
|
45
|
+
onClose();
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
disabled: action.disabled,
|
|
49
|
+
testID: testID ? `${testID}-${action.key}` : undefined,
|
|
50
|
+
children: [action.icon && /*#__PURE__*/_jsx(View, {
|
|
51
|
+
style: [ds.itemIcon, semanticStyles?.itemIcon],
|
|
52
|
+
children: action.icon
|
|
53
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
54
|
+
style: [action.danger ? ds.itemLabelDanger : ds.itemLabel, semanticStyles?.itemLabel],
|
|
55
|
+
children: action.text
|
|
56
|
+
})]
|
|
57
|
+
})]
|
|
58
|
+
}, action.key))
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
export default Menu;
|
|
62
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useMemo","View","Text","Pressable","Popover","useTokens","createDefaultStyles","jsx","_jsx","jsxs","_jsxs","Menu","visible","onClose","anchorLayout","actions","onAction","placement","width","style","styles","semanticStyles","testID","tokens","ds","children","map","action","index","Fragment","divider","item","onPress","disabled","key","undefined","icon","itemIcon","danger","itemLabelDanger","itemLabel","text"],"sourceRoot":"../../../src","sources":["menu/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,IAAI,EAAEC,IAAI,EAAEC,SAAS,QAAQ,cAAc;AAEpD,OAAOC,OAAO,MAAM,qBAAY;AAChC,SAASC,SAAS,QAAQ,qBAAkB;AAE5C,SAASC,mBAAmB,QAAQ,kBAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAyB9C,MAAMC,IAAyB,GAAGA,CAAC;EACjCC,OAAO;EACPC,OAAO;EACPC,YAAY;EACZC,OAAO;EACPC,QAAQ;EACRC,SAAS,GAAG,QAAQ;EACpBC,KAAK,GAAG,GAAG;EACXC,KAAK;EACLC,MAAM,EAAEC,cAAc;EACtBC;AACF,CA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IAAA,CAACN,IAAI;UACHiB,KAAK,EAAE,CACLQ,MAAM,CAACW,MAAM,GAAGd,EAAE,CAACe,eAAe,GAAGf,EAAE,CAACgB,SAAS,EACjDnB,cAAc,EAAEmB,SAAS,CACzB;UAAAf,QAAA,EAEDE,MAAM,CAACc;QAAI,CACR,CAAC;MAAA,CACE,CAAC;IAAA,GA5BOd,MAAM,CAACO,GA6BZ,CACjB;EAAC,CACK,CAAC;AAEd,CAAC;AAED,eAAevB,IAAI","ignoreList":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { StyleSheet } from 'react-native';
|
|
4
|
+
export const createDefaultStyles = t => ({
|
|
5
|
+
item: {
|
|
6
|
+
flexDirection: 'row',
|
|
7
|
+
alignItems: 'center',
|
|
8
|
+
paddingVertical: 12,
|
|
9
|
+
paddingHorizontal: 16
|
|
10
|
+
},
|
|
11
|
+
itemLabel: {
|
|
12
|
+
fontSize: 14,
|
|
13
|
+
color: t.colorText
|
|
14
|
+
},
|
|
15
|
+
itemLabelDanger: {
|
|
16
|
+
fontSize: 14,
|
|
17
|
+
color: t.colorError
|
|
18
|
+
},
|
|
19
|
+
itemIcon: {
|
|
20
|
+
marginRight: 8
|
|
21
|
+
},
|
|
22
|
+
divider: {
|
|
23
|
+
height: StyleSheet.hairlineWidth,
|
|
24
|
+
backgroundColor: t.colorBorder
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["StyleSheet","createDefaultStyles","t","item","flexDirection","alignItems","paddingVertical","paddingHorizontal","itemLabel","fontSize","color","colorText","itemLabelDanger","colorError","itemIcon","marginRight","divider","height","hairlineWidth","backgroundColor","colorBorder"],"sourceRoot":"../../../../src","sources":["menu/style/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc;AAWzC,OAAO,MAAMC,mBAAmB,GAAIC,CAAS,KAAM;EACjDC,IAAI,EAAE;IACJC,aAAa,EAAE,KAAc;IAC7BC,UAAU,EAAE,QAAiB;IAC7BC,eAAe,EAAE,EAAE;IACnBC,iBAAiB,EAAE;EACrB,CAAC;EACDC,SAAS,EAAE;IACTC,QAAQ,EAAE,EAAE;IACZC,KAAK,EAAER,CAAC,CAACS;EACX,CAAC;EACDC,eAAe,EAAE;IACfH,QAAQ,EAAE,EAAE;IACZC,KAAK,EAAER,CAAC,CAACW;EACX,CAAC;EACDC,QAAQ,EAAE;IACRC,WAAW,EAAE;EACf,CAAC;EACDC,OAAO,EAAE;IACPC,MAAM,EAAEjB,UAAU,CAACkB,aAAa;IAChCC,eAAe,EAAEjB,CAAC,CAACkB;EACrB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
import React, { useMemo } from 'react';
|
|
10
10
|
import { View, 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 } from "react/jsx-runtime";
|
|
14
15
|
const GAP = 4;
|
|
15
16
|
const Popover = ({
|
|
@@ -23,7 +24,9 @@ const Popover = ({
|
|
|
23
24
|
styles: semanticStyles,
|
|
24
25
|
testID
|
|
25
26
|
}) => {
|
|
26
|
-
const
|
|
27
|
+
const tokens = useTokens();
|
|
28
|
+
const defaultStyles = useMemo(() => createDefaultStyles(tokens), [tokens]);
|
|
29
|
+
const s = useMemo(() => mergeStyles(defaultStyles, semanticStyles), [defaultStyles, semanticStyles]);
|
|
27
30
|
if (!visible) {
|
|
28
31
|
return null;
|
|
29
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","View","TouchableWithoutFeedback","Modal","mergeStyles","
|
|
1
|
+
{"version":3,"names":["React","useMemo","View","TouchableWithoutFeedback","Modal","mergeStyles","useTokens","createDefaultStyles","jsx","_jsx","GAP","Popover","visible","onClose","anchorLayout","width","placement","children","style","styles","semanticStyles","testID","tokens","defaultStyles","s","positionStyle","top","y","height","left","x","bottom","transparent","animationType","onRequestClose","onPress","overlay","content"],"sourceRoot":"../../../src","sources":["popover/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SACEC,IAAI,EACJC,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;AAc9C,MAAMC,GAAG,GAAG,CAAC;AAEb,MAAMC,OAA+B,GAAGA,CAAC;EACvCC,OAAO;EACPC,OAAO;EACPC,YAAY;EACZC,KAAK,GAAG,GAAG;EACXC,SAAS,GAAG,QAAQ;EACpBC,QAAQ;EACRC,KAAK;EACLC,MAAM,EAAEC,cAAc;EACtBC;AACF,CAAC,KAAK;EACJ,MAAMC,MAAM,GAAGhB,SAAS,CAAC,CAAC;EAC1B,MAAMiB,aAAa,GAAGtB,OAAO,CAAC,MAAMM,mBAAmB,CAACe,MAAM,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAE1E,MAAME,CAAC,GAAGvB,OAAO,CACf,MAAMI,WAAW,CAAwBkB,aAAa,EAAEH,cAAc,CAAC,EACvE,CAACG,aAAa,EAAEH,cAAc,CAChC,CAAC;EAED,IAAI,CAACR,OAAO,EAAE;IACZ,OAAO,IAAI;EACb;EAEA,MAAMa,aAAwB,GAC5BT,SAAS,KAAK,QAAQ,GAClB;IAAEU,GAAG,EAAEZ,YAAY,CAACa,CAAC,GAAGb,YAAY,CAACc,MAAM,GAAGlB,GAAG;IAAEmB,IAAI,EAAEf,YAAY,CAACgB;EAAE,CAAC,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