@xhsreds/reds-rn-next 0.0.23 → 0.1.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/benchmarks/out.json +332 -0
- package/coverage/.tmp/coverage-0.json +1 -0
- package/coverage/.tmp/coverage-1.json +1 -0
- package/coverage/.tmp/coverage-2.json +1 -0
- package/coverage/.tmp/coverage-3.json +1 -0
- package/coverage/.tmp/coverage-4.json +1 -0
- package/coverage/.tmp/coverage-5.json +1 -0
- package/coverage/.tmp/coverage-6.json +1 -0
- package/coverage/.tmp/coverage-7.json +1 -0
- package/coverage/.tmp/coverage-8.json +1 -0
- package/coverage/.tmp/coverage-9.json +1 -0
- package/lib/cjs/_chunks/8GiEQzJI.js +14 -0
- package/lib/cjs/_chunks/8GiEQzJI.js.map +1 -0
- package/lib/cjs/_chunks/C61-qTj5.js +45 -0
- package/lib/cjs/_chunks/C61-qTj5.js.map +1 -0
- package/lib/cjs/_chunks/CH-nghLh.js +25 -0
- package/lib/cjs/_chunks/CH-nghLh.js.map +1 -0
- package/lib/cjs/_chunks/CvikiypO.js +20 -0
- package/lib/cjs/_chunks/CvikiypO.js.map +1 -0
- package/lib/cjs/_chunks/CyggXkdu.js +20 -0
- package/lib/cjs/_chunks/CyggXkdu.js.map +1 -0
- package/lib/cjs/_chunks/{0oZeAV32.js → D9ngGICz.js} +14 -1
- package/lib/cjs/_chunks/{0oZeAV32.js.map → D9ngGICz.js.map} +1 -1
- package/lib/cjs/_chunks/DOAnQxcP.js +16 -0
- package/lib/cjs/_chunks/DOAnQxcP.js.map +1 -0
- package/lib/cjs/_chunks/{BUZe8G-Q.js → DkF74KKv.js} +31 -10
- package/lib/cjs/_chunks/DkF74KKv.js.map +1 -0
- package/lib/cjs/_chunks/Dmk9_Zw3.js +20 -0
- package/lib/cjs/_chunks/Dmk9_Zw3.js.map +1 -0
- package/lib/cjs/_chunks/y2LtPP5n.js +21 -0
- package/lib/cjs/_chunks/y2LtPP5n.js.map +1 -0
- package/lib/cjs/_chunks/zrKJYx9X.js +49 -0
- package/lib/cjs/_chunks/zrKJYx9X.js.map +1 -0
- package/lib/cjs/components/Button/Button.js +44 -0
- package/lib/cjs/components/Button/Button.js.map +1 -0
- package/lib/cjs/components/Button/index.js +25 -8
- package/lib/cjs/components/Button/index.js.map +1 -1
- package/lib/cjs/components/Button/interface/index.js +5 -11
- package/lib/cjs/components/Button/interface/index.js.map +1 -1
- package/lib/cjs/components/Button/styleMap.js +24 -8
- package/lib/cjs/components/Button/styleMap.js.map +1 -1
- package/lib/cjs/components/Collapse/Collapse.js +60 -0
- package/lib/cjs/components/Collapse/Collapse.js.map +1 -0
- package/lib/cjs/components/Collapse/Item/Item.js +113 -0
- package/lib/cjs/components/Collapse/Item/Item.js.map +1 -0
- package/lib/cjs/components/Collapse/Item/interface/index.js +12 -0
- package/lib/cjs/components/Collapse/Item/interface/index.js.map +1 -0
- package/lib/cjs/components/Collapse/Item/styles.js +36 -0
- package/lib/cjs/components/Collapse/Item/styles.js.map +1 -0
- package/lib/cjs/components/Collapse/hooks/useCollapseContext.js +14 -0
- package/lib/cjs/components/Collapse/hooks/useCollapseContext.js.map +1 -0
- package/lib/cjs/components/Collapse/index.js +21 -0
- package/lib/cjs/components/Collapse/index.js.map +1 -0
- package/lib/cjs/components/Collapse/interface/index.js +11 -0
- package/lib/cjs/components/Collapse/interface/index.js.map +1 -0
- package/lib/cjs/components/ConfigProvider/ConfigProvider.js +1 -1
- package/lib/cjs/components/ConfigProvider/hooks/ConfigCache/ConfigCache.js +1 -1
- package/lib/cjs/components/ConfigProvider/hooks/ConfigCache/index.js +1 -1
- package/lib/cjs/components/ConfigProvider/hooks/themeToken/useThemeToken.js +1 -1
- package/lib/cjs/components/ConfigProvider/index.js +13 -22
- package/lib/cjs/components/ConfigProvider/index.js.map +1 -1
- package/lib/cjs/components/ConfigProvider/interface/index.js +5 -34
- package/lib/cjs/components/ConfigProvider/interface/index.js.map +1 -1
- package/lib/cjs/components/Empty/Empty.js +44 -0
- package/lib/cjs/components/Empty/Empty.js.map +1 -0
- package/lib/cjs/components/Empty/hooks/useDefaultIcon.js +10 -0
- package/lib/cjs/components/Empty/hooks/useDefaultIcon.js.map +1 -0
- package/lib/cjs/components/Empty/index.js +22 -0
- package/lib/cjs/components/Empty/index.js.map +1 -0
- package/lib/cjs/components/Empty/interface/index.js +8 -0
- package/lib/cjs/components/Empty/interface/index.js.map +1 -0
- package/lib/cjs/components/Empty/styles.js +38 -0
- package/lib/cjs/components/Empty/styles.js.map +1 -0
- package/lib/cjs/components/Image/Image.js +130 -0
- package/lib/cjs/components/Image/Image.js.map +1 -0
- package/lib/cjs/components/Image/hook/index.js +2 -2
- package/lib/cjs/components/Image/index.js +4 -4
- package/lib/cjs/components/Image/index.js.map +1 -1
- package/lib/cjs/components/Image/interface/index.js +8 -35
- package/lib/cjs/components/Image/interface/index.js.map +1 -1
- package/lib/cjs/components/Popover/Popover.js +128 -0
- package/lib/cjs/components/Popover/Popover.js.map +1 -0
- package/lib/cjs/components/Popover/component.js +1 -1
- package/lib/cjs/components/Popover/hook.js +1 -1
- package/lib/cjs/components/Popover/index.js +12 -120
- package/lib/cjs/components/Popover/index.js.map +1 -1
- package/lib/cjs/components/Popover/interface/index.js +5 -11
- package/lib/cjs/components/Popover/interface/index.js.map +1 -1
- package/lib/cjs/components/Popover/styles.js +29 -0
- package/lib/cjs/components/Popover/styles.js.map +1 -0
- package/lib/cjs/components/Result/Result.js +52 -0
- package/lib/cjs/components/Result/Result.js.map +1 -0
- package/lib/cjs/components/Result/hooks/useDefaultIcon.js +19 -0
- package/lib/cjs/components/Result/hooks/useDefaultIcon.js.map +1 -0
- package/lib/cjs/components/Result/index.js +22 -0
- package/lib/cjs/components/Result/index.js.map +1 -0
- package/lib/cjs/components/Result/interface/index.js +8 -0
- package/lib/cjs/components/Result/interface/index.js.map +1 -0
- package/lib/cjs/components/Result/styles.js +47 -0
- package/lib/cjs/components/Result/styles.js.map +1 -0
- package/lib/cjs/components/Switch/Switch.js +80 -0
- package/lib/cjs/components/Switch/Switch.js.map +1 -0
- package/lib/cjs/components/Switch/index.js +10 -63
- package/lib/cjs/components/Switch/index.js.map +1 -1
- package/lib/cjs/components/Switch/interface/index.js +4 -9
- package/lib/cjs/components/Switch/interface/index.js.map +1 -1
- package/lib/cjs/components/Switch/styles.js.map +1 -1
- package/lib/cjs/components/Tag/Tag.js +203 -0
- package/lib/cjs/components/Tag/Tag.js.map +1 -0
- package/lib/cjs/components/Tag/index.js +10 -207
- package/lib/cjs/components/Tag/index.js.map +1 -1
- package/lib/cjs/components/Tag/interface/index.js +4 -17
- package/lib/cjs/components/Tag/interface/index.js.map +1 -1
- package/lib/cjs/components/Tag/styles.js +29 -0
- package/lib/cjs/components/Tag/styles.js.map +1 -0
- package/lib/cjs/components/Text/Text.js +159 -0
- package/lib/cjs/components/Text/Text.js.map +1 -0
- package/lib/cjs/components/Text/hooks/cloneContainer.js +1 -1
- package/lib/cjs/components/Text/hooks/index.js +1 -1
- package/lib/cjs/components/Text/hooks/loadFontFromFile.js +1 -1
- package/lib/cjs/components/Text/index.js +12 -146
- package/lib/cjs/components/Text/index.js.map +1 -1
- package/lib/cjs/components/Text/interface/index.js +5 -12
- package/lib/cjs/components/Text/interface/index.js.map +1 -1
- package/lib/cjs/components/Text/styles.js +1 -1
- package/lib/cjs/index.js +46 -22
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/_chunks/B3zY_xWO.js +17 -0
- package/lib/esm/_chunks/B3zY_xWO.js.map +1 -0
- package/lib/esm/_chunks/BITrbAAT.js +42 -0
- package/lib/esm/_chunks/BITrbAAT.js.map +1 -0
- package/lib/esm/_chunks/BKS4Pa1R.js +13 -0
- package/lib/esm/_chunks/BKS4Pa1R.js.map +1 -0
- package/lib/esm/_chunks/BfaGqGMC.js +11 -0
- package/lib/esm/_chunks/BfaGqGMC.js.map +1 -0
- package/lib/esm/_chunks/BswK5qRp.js +18 -0
- package/lib/esm/_chunks/BswK5qRp.js.map +1 -0
- package/lib/esm/_chunks/Bw08lvHs.js +17 -0
- package/lib/esm/_chunks/Bw08lvHs.js.map +1 -0
- package/lib/esm/_chunks/CszwJiJx.js +22 -0
- package/lib/esm/_chunks/CszwJiJx.js.map +1 -0
- package/lib/esm/_chunks/D7oyCwVx.js +17 -0
- package/lib/esm/_chunks/D7oyCwVx.js.map +1 -0
- package/lib/esm/_chunks/DKABHJAn.js +41 -0
- package/lib/esm/_chunks/DKABHJAn.js.map +1 -0
- package/lib/esm/_chunks/{C6lwOm3T.js → DhfjJNaB.js} +31 -11
- package/lib/esm/_chunks/DhfjJNaB.js.map +1 -0
- package/lib/esm/_chunks/{zVU7tqWk.js → GCWGuPmB.js} +14 -2
- package/lib/esm/_chunks/{zVU7tqWk.js.map → GCWGuPmB.js.map} +1 -1
- package/lib/esm/components/Button/Button.js +36 -0
- package/lib/esm/components/Button/Button.js.map +1 -0
- package/lib/esm/components/Button/index.js +27 -8
- package/lib/esm/components/Button/index.js.map +1 -1
- package/lib/esm/components/Button/interface/index.js +1 -11
- package/lib/esm/components/Button/interface/index.js.map +1 -1
- package/lib/esm/components/Button/styleMap.js +23 -8
- package/lib/esm/components/Button/styleMap.js.map +1 -1
- package/lib/esm/components/Collapse/Collapse.js +56 -0
- package/lib/esm/components/Collapse/Collapse.js.map +1 -0
- package/lib/esm/components/Collapse/Item/Item.js +109 -0
- package/lib/esm/components/Collapse/Item/Item.js.map +1 -0
- package/lib/esm/components/Collapse/Item/interface/index.js +10 -0
- package/lib/esm/components/Collapse/Item/interface/index.js.map +1 -0
- package/lib/esm/components/Collapse/Item/styles.js +32 -0
- package/lib/esm/components/Collapse/Item/styles.js.map +1 -0
- package/lib/esm/components/Collapse/hooks/useCollapseContext.js +12 -0
- package/lib/esm/components/Collapse/hooks/useCollapseContext.js.map +1 -0
- package/lib/esm/components/Collapse/index.js +14 -0
- package/lib/esm/components/Collapse/index.js.map +1 -0
- package/lib/esm/components/Collapse/interface/index.js +9 -0
- package/lib/esm/components/Collapse/interface/index.js.map +1 -0
- package/lib/esm/components/ConfigProvider/ConfigProvider.js +1 -1
- package/lib/esm/components/ConfigProvider/hooks/ConfigCache/ConfigCache.js +1 -1
- package/lib/esm/components/ConfigProvider/hooks/ConfigCache/index.js +1 -1
- package/lib/esm/components/ConfigProvider/hooks/themeToken/useThemeToken.js +1 -1
- package/lib/esm/components/ConfigProvider/index.js +10 -22
- package/lib/esm/components/ConfigProvider/index.js.map +1 -1
- package/lib/esm/components/ConfigProvider/interface/index.js +1 -34
- package/lib/esm/components/ConfigProvider/interface/index.js.map +1 -1
- package/lib/esm/components/Empty/Empty.js +40 -0
- package/lib/esm/components/Empty/Empty.js.map +1 -0
- package/lib/esm/components/Empty/hooks/useDefaultIcon.js +8 -0
- package/lib/esm/components/Empty/hooks/useDefaultIcon.js.map +1 -0
- package/lib/esm/components/Empty/index.js +16 -0
- package/lib/esm/components/Empty/index.js.map +1 -0
- package/lib/esm/components/Empty/interface/index.js +2 -0
- package/lib/esm/components/Empty/interface/index.js.map +1 -0
- package/lib/esm/components/Empty/styles.js +34 -0
- package/lib/esm/components/Empty/styles.js.map +1 -0
- package/lib/esm/components/Image/Image.js +126 -0
- package/lib/esm/components/Image/Image.js.map +1 -0
- package/lib/esm/components/Image/hook/index.js +2 -2
- package/lib/esm/components/Image/index.js +4 -4
- package/lib/esm/components/Image/index.js.map +1 -1
- package/lib/esm/components/Image/interface/index.js +1 -32
- package/lib/esm/components/Image/interface/index.js.map +1 -1
- package/lib/esm/components/Popover/Popover.js +124 -0
- package/lib/esm/components/Popover/Popover.js.map +1 -0
- package/lib/esm/components/Popover/component.js +1 -1
- package/lib/esm/components/Popover/hook.js +1 -1
- package/lib/esm/components/Popover/index.js +10 -120
- package/lib/esm/components/Popover/index.js.map +1 -1
- package/lib/esm/components/Popover/interface/index.js +1 -11
- package/lib/esm/components/Popover/interface/index.js.map +1 -1
- package/lib/esm/components/Popover/styles.js +25 -0
- package/lib/esm/components/Popover/styles.js.map +1 -0
- package/lib/esm/components/Result/Result.js +48 -0
- package/lib/esm/components/Result/Result.js.map +1 -0
- package/lib/esm/components/Result/hooks/useDefaultIcon.js +17 -0
- package/lib/esm/components/Result/hooks/useDefaultIcon.js.map +1 -0
- package/lib/esm/components/Result/index.js +16 -0
- package/lib/esm/components/Result/index.js.map +1 -0
- package/lib/esm/components/Result/interface/index.js +2 -0
- package/lib/esm/components/Result/interface/index.js.map +1 -0
- package/lib/esm/components/Result/styles.js +43 -0
- package/lib/esm/components/Result/styles.js.map +1 -0
- package/lib/esm/components/Switch/Switch.js +76 -0
- package/lib/esm/components/Switch/Switch.js.map +1 -0
- package/lib/esm/components/Switch/index.js +8 -63
- package/lib/esm/components/Switch/index.js.map +1 -1
- package/lib/esm/components/Switch/interface/index.js +2 -11
- package/lib/esm/components/Switch/interface/index.js.map +1 -1
- package/lib/esm/components/Switch/styles.js.map +1 -1
- package/lib/esm/components/Tag/Tag.js +199 -0
- package/lib/esm/components/Tag/Tag.js.map +1 -0
- package/lib/esm/components/Tag/index.js +8 -207
- package/lib/esm/components/Tag/index.js.map +1 -1
- package/lib/esm/components/Tag/interface/index.js +1 -18
- package/lib/esm/components/Tag/interface/index.js.map +1 -1
- package/lib/esm/components/Tag/styles.js +25 -0
- package/lib/esm/components/Tag/styles.js.map +1 -0
- package/lib/esm/components/Text/Text.js +155 -0
- package/lib/esm/components/Text/Text.js.map +1 -0
- package/lib/esm/components/Text/hooks/cloneContainer.js +1 -1
- package/lib/esm/components/Text/hooks/index.js +1 -1
- package/lib/esm/components/Text/hooks/loadFontFromFile.js +1 -1
- package/lib/esm/components/Text/index.js +10 -146
- package/lib/esm/components/Text/index.js.map +1 -1
- package/lib/esm/components/Text/interface/index.js +1 -12
- package/lib/esm/components/Text/interface/index.js.map +1 -1
- package/lib/esm/components/Text/styles.js +1 -1
- package/lib/esm/index.js +28 -11
- package/lib/esm/index.js.map +1 -1
- package/lib/types/components/Button/Button.d.ts +4 -0
- package/lib/types/components/Button/index.d.ts +3 -3
- package/lib/types/components/Button/interface/index.d.ts +2 -0
- package/lib/types/components/Button/styleMap.d.ts +8 -0
- package/lib/types/components/Collapse/Collapse.d.ts +13 -0
- package/lib/types/components/Collapse/Item/Item.d.ts +7 -0
- package/lib/types/components/Collapse/Item/interface/index.d.ts +12 -0
- package/lib/types/components/Collapse/Item/styles.d.ts +19 -0
- package/lib/types/components/Collapse/demo/index.d.ts +2 -0
- package/lib/types/components/Collapse/hooks/useCollapseContext.d.ts +3 -0
- package/lib/types/components/Collapse/index.d.ts +3 -0
- package/lib/types/components/Collapse/interface/index.d.ts +24 -0
- package/lib/types/components/Collapse/test/demo.d.ts +2 -0
- package/lib/types/components/Collapse/test/index.bench.d.ts +1 -0
- package/lib/types/components/Collapse/test/index.test.d.ts +1 -0
- package/lib/types/components/ConfigProvider/hooks/ConfigCache/interface.d.ts +1 -1
- package/lib/types/components/ConfigProvider/index.d.ts +2 -0
- package/lib/types/components/Empty/Empty.d.ts +9 -0
- package/lib/types/components/Empty/demo/index.d.ts +2 -0
- package/lib/types/components/Empty/hooks/useDefaultIcon.d.ts +5 -0
- package/lib/types/components/Empty/index.d.ts +4 -0
- package/lib/types/components/Empty/interface/index.d.ts +9 -0
- package/lib/types/components/Empty/styles.d.ts +20 -0
- package/lib/types/components/Empty/test/index.bench.d.ts +1 -0
- package/lib/types/components/Empty/test/index.test.d.ts +1 -0
- package/lib/types/components/Image/Image.d.ts +5 -0
- package/lib/types/components/Image/index.d.ts +4 -5
- package/lib/types/components/Popover/Popover.d.ts +4 -0
- package/lib/types/components/Popover/index.d.ts +4 -4
- package/lib/types/components/Popover/styles.d.ts +20 -0
- package/lib/types/components/Result/Result.d.ts +11 -0
- package/lib/types/components/Result/demo/index.d.ts +2 -0
- package/lib/types/components/Result/hooks/useDefaultIcon.d.ts +14 -0
- package/lib/types/components/Result/index.d.ts +4 -0
- package/lib/types/components/Result/interface/index.d.ts +13 -0
- package/lib/types/components/Result/styles.d.ts +29 -0
- package/lib/types/components/Result/test/Demo.d.ts +2 -0
- package/lib/types/components/Result/test/index.bench.d.ts +1 -0
- package/lib/types/components/Result/test/index.test.d.ts +1 -0
- package/lib/types/components/Switch/Switch.d.ts +13 -0
- package/lib/types/components/Switch/index.d.ts +3 -12
- package/lib/types/components/Tag/Tag.d.ts +4 -0
- package/lib/types/components/Tag/index.d.ts +3 -3
- package/lib/types/components/Tag/interface/index.d.ts +2 -5
- package/lib/types/components/Tag/styles.d.ts +20 -0
- package/lib/types/components/Text/Text.d.ts +4 -0
- package/lib/types/components/Text/index.d.ts +4 -4
- package/lib/types/index.d.ts +10 -10
- package/package.json +2 -2
- package/src/components/Button/{index.tsx → Button.tsx} +5 -2
- package/src/components/Button/demo/index.tsx +4 -1
- package/src/components/Button/doc/index.mdx +15 -13
- package/src/components/Button/index.ts +5 -0
- package/src/components/Button/interface/index.ts +2 -0
- package/src/components/Button/styleMap.ts +9 -0
- package/src/components/Button/test/__snapshots__/index.test.tsx.snap +3 -0
- package/src/components/Button/test/index.test.tsx +25 -1
- package/src/components/Collapse/Collapse.tsx +72 -0
- package/src/components/Collapse/Item/Item.tsx +103 -0
- package/src/components/Collapse/Item/interface/index.ts +21 -0
- package/src/components/Collapse/Item/styles.ts +27 -0
- package/src/components/Collapse/demo/index.tsx +60 -0
- package/src/components/Collapse/doc/index.mdx +24 -0
- package/src/components/Collapse/hooks/useCollapseContext.ts +8 -0
- package/src/components/Collapse/index.ts +4 -0
- package/src/components/Collapse/interface/index.ts +25 -0
- package/src/components/Collapse/test/demo.tsx +62 -0
- package/src/components/Collapse/test/index.bench.tsx +13 -0
- package/src/components/Collapse/test/index.test.tsx +61 -0
- package/src/components/ConfigProvider/doc/index.mdx +8 -8
- package/src/components/ConfigProvider/hooks/ConfigCache/interface.ts +1 -1
- package/src/components/ConfigProvider/index.ts +3 -0
- package/src/components/Empty/Empty.tsx +29 -0
- package/src/components/Empty/demo/index.tsx +39 -0
- package/src/components/Empty/doc/index.mdx +19 -0
- package/src/components/Empty/hooks/useDefaultIcon.ts +5 -0
- package/src/components/Empty/index.ts +5 -0
- package/src/components/Empty/interface/index.ts +10 -0
- package/src/components/Empty/styles.ts +29 -0
- package/src/components/Empty/test/index.bench.tsx +12 -0
- package/src/components/Empty/test/index.test.tsx +26 -0
- package/src/components/Image/Image.tsx +121 -0
- package/src/components/Image/demo/index.tsx +2 -1
- package/src/components/Image/doc/index.mdx +13 -13
- package/src/components/Image/index.ts +5 -0
- package/src/components/Image/index.tsx +1 -2
- package/src/components/Popover/demo/index.tsx +2 -2
- package/src/components/Popover/doc/index.mdx +15 -15
- package/src/components/Popover/index.ts +5 -0
- package/src/components/Popover/styles.ts +24 -0
- package/src/components/Result/Result.tsx +35 -0
- package/src/components/Result/demo/index.tsx +58 -0
- package/src/components/Result/doc/index.mdx +21 -0
- package/src/components/Result/hooks/useDefaultIcon.ts +21 -0
- package/src/components/Result/index.ts +5 -0
- package/src/components/Result/interface/index.ts +14 -0
- package/src/components/Result/styles.ts +38 -0
- package/src/components/Result/test/Demo.tsx +80 -0
- package/src/components/Result/test/index.bench.tsx +12 -0
- package/src/components/Result/test/index.test.tsx +101 -0
- package/src/components/Switch/{index.tsx → Switch.tsx} +23 -9
- package/src/components/Switch/demo/index.tsx +7 -1
- package/src/components/Switch/doc/index.mdx +11 -11
- package/src/components/Switch/index.ts +5 -0
- package/src/components/Switch/test/index.bench.tsx +1 -1
- package/src/components/Switch/test/paper.bench.tsx +1 -1
- package/src/components/Tag/Tag.tsx +195 -0
- package/src/components/Tag/demo/index.tsx +0 -24
- package/src/components/Tag/doc/index.mdx +18 -20
- package/src/components/Tag/index.ts +5 -0
- package/src/components/Tag/interface/index.ts +1 -5
- package/src/components/{Switch/styles.tsx → Tag/styles.ts} +1 -1
- package/src/components/Tag/test/index.test.tsx +4 -32
- package/src/components/Text/doc/index.mdx +17 -17
- package/src/components/Text/index.ts +5 -0
- package/src/index.ts +10 -12
- package/lib/cjs/_chunks/BUZe8G-Q.js.map +0 -1
- package/lib/cjs/components/Popover/manifest.js +0 -3
- package/lib/cjs/components/Popover/manifest.js.map +0 -1
- package/lib/esm/_chunks/C6lwOm3T.js.map +0 -1
- package/lib/esm/components/Popover/manifest.js +0 -2
- package/lib/esm/components/Popover/manifest.js.map +0 -1
- package/lib/types/components/Popover/manifest.d.ts +0 -3
- package/src/components/Popover/manifest.ts +0 -3
- package/src/components/Tag/index.tsx +0 -199
- /package/src/components/Popover/{index.tsx → Popover.tsx} +0 -0
- /package/src/components/{ConfigProvider/index.tsx → Switch/styles.ts} +0 -0
- /package/src/components/Text/{index.tsx → Text.tsx} +0 -0
|
@@ -1,67 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import Switch from './Switch.js';
|
|
2
|
+
export { i as SwitchType } from '../../_chunks/B3zY_xWO.js';
|
|
3
|
+
import '../../_chunks/GCWGuPmB.js';
|
|
4
|
+
import 'react';
|
|
5
|
+
import 'react-native';
|
|
6
|
+
import './styles.js';
|
|
6
7
|
import '@xhsreds/reds-token-next';
|
|
7
8
|
|
|
8
|
-
var Switch = function Switch(_ref) {
|
|
9
|
-
var value = _ref.value,
|
|
10
|
-
defaultValue = _ref.defaultValue,
|
|
11
|
-
onChange = _ref.onChange,
|
|
12
|
-
onClick = _ref.onClick,
|
|
13
|
-
trackOnColor = _ref.trackOnColor,
|
|
14
|
-
trackOffColor = _ref.trackOffColor;
|
|
15
|
-
var isControlled = useRef(value !== void 0);
|
|
16
|
-
var _useState = useState(defaultValue),
|
|
17
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
18
|
-
isOn = _useState2[0],
|
|
19
|
-
setIsOn = _useState2[1];
|
|
20
|
-
var animatedValue = useRef(new Animated.Value(defaultValue ? 18 : 2)).current;
|
|
21
|
-
var thumbTranslateX = animatedValue.interpolate({
|
|
22
|
-
inputRange: [2, 18],
|
|
23
|
-
outputRange: [2, 18]
|
|
24
|
-
});
|
|
25
|
-
useEffect(function () {
|
|
26
|
-
onChange === null || onChange === void 0 || onChange(!!isOn);
|
|
27
|
-
}, [isOn]);
|
|
28
|
-
useEffect(function () {
|
|
29
|
-
isControlled.current && setIsOn(value);
|
|
30
|
-
}, [value]);
|
|
31
|
-
var toggleSwitch = useCallback(function (e) {
|
|
32
|
-
onClick === null || onClick === void 0 || onClick(e);
|
|
33
|
-
!isControlled.current && setIsOn(function (v) {
|
|
34
|
-
return !v;
|
|
35
|
-
});
|
|
36
|
-
}, []);
|
|
37
|
-
var dynamicStyles = useMemo(function () {
|
|
38
|
-
Animated.timing(animatedValue, {
|
|
39
|
-
toValue: isOn ? 18 : 2,
|
|
40
|
-
duration: 200,
|
|
41
|
-
useNativeDriver: true
|
|
42
|
-
}).start();
|
|
43
|
-
return {
|
|
44
|
-
backgroundColor: isOn ? trackOnColor : trackOffColor,
|
|
45
|
-
transform: [{
|
|
46
|
-
translateX: thumbTranslateX
|
|
47
|
-
}]
|
|
48
|
-
};
|
|
49
|
-
}, [isOn]);
|
|
50
|
-
return /* @__PURE__ */React.createElement(TouchableWithoutFeedback, {
|
|
51
|
-
onPress: function onPress(e) {
|
|
52
|
-
return toggleSwitch(e);
|
|
53
|
-
}
|
|
54
|
-
}, /* @__PURE__ */React.createElement(View, {
|
|
55
|
-
style: [styles.switchContainer, {
|
|
56
|
-
backgroundColor: dynamicStyles.backgroundColor
|
|
57
|
-
}]
|
|
58
|
-
}, /* @__PURE__ */React.createElement(Animated.View, {
|
|
59
|
-
style: [styles.thumb, {
|
|
60
|
-
transform: dynamicStyles.transform
|
|
61
|
-
}]
|
|
62
|
-
})));
|
|
63
|
-
};
|
|
64
|
-
Switch.defaultProps = SwitchDefaultProps;
|
|
65
9
|
|
|
66
|
-
|
|
10
|
+
|
|
11
|
+
export { Switch, Switch as default };
|
|
67
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
var SwitchDefaultProps = {
|
|
4
|
-
value: void 0,
|
|
5
|
-
defaultValue: false,
|
|
6
|
-
disabled: false,
|
|
7
|
-
trackOnColor: lightColor.Primary,
|
|
8
|
-
trackOffColor: lightColor.Fill2
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export { SwitchDefaultProps };
|
|
1
|
+
import '@xhsreds/reds-token-next';
|
|
2
|
+
export { S as SwitchDefaultProps } from '../../../_chunks/B3zY_xWO.js';
|
|
12
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../../src/components/Switch/styles.
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../../src/components/Switch/styles.ts"],"sourcesContent":["import { alwaysColor } from \"@xhsreds/reds-token-next\";\nimport { StyleSheet } from \"react-native\";\n\nconst styles = StyleSheet.create({\n switchContainer: {\n width: 40,\n height: 24,\n borderRadius: 15,\n justifyContent: \"center\",\n alignItems: \"center\",\n },\n thumb: {\n width: 20,\n height: 20,\n borderRadius: 10,\n backgroundColor: alwaysColor.White,\n justifyContent: \"center\",\n alignItems: \"center\",\n position: \"absolute\",\n left: 0,\n },\n});\n\nexport default styles;\n"],"names":["styles","StyleSheet","create","switchContainer","width","height","borderRadius","justifyContent","alignItems","thumb","backgroundColor","alwaysColor","White","position","left"],"mappings":";;;AAGA,IAAMA,MAAA,GAASC,WAAWC,MAAO,CAAA;AAC/BC,EAAAA,eAAiB,EAAA;AACfC,IAAAA,KAAO,EAAA,EAAA;AACPC,IAAAA,MAAQ,EAAA,EAAA;AACRC,IAAAA,YAAc,EAAA,EAAA;AACdC,IAAAA,cAAgB,EAAA,QAAA;AAChBC,IAAAA,UAAY,EAAA,QAAA;GACd;AACAC,EAAAA,KAAO,EAAA;AACLL,IAAAA,KAAO,EAAA,EAAA;AACPC,IAAAA,MAAQ,EAAA,EAAA;AACRC,IAAAA,YAAc,EAAA,EAAA;IACdI,iBAAiBC,WAAY,CAAAC,KAAA;AAC7BL,IAAAA,cAAgB,EAAA,QAAA;AAChBC,IAAAA,UAAY,EAAA,QAAA;AACZK,IAAAA,QAAU,EAAA,UAAA;AACVC,IAAAA,IAAM,EAAA,CAAA;AACR,GAAA;AACF,CAAC;;;;"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { c as _slicedToArray } from '../../_chunks/GCWGuPmB.js';
|
|
2
|
+
import React, { memo, forwardRef, useState, useImperativeHandle, useMemo } from 'react';
|
|
3
|
+
import { StyleSheet, View, TouchableOpacity, Text } from 'react-native';
|
|
4
|
+
import { T as TagDefaultProps } from '../../_chunks/CszwJiJx.js';
|
|
5
|
+
import { lightColor, alwaysColor, typography } from '@xhsreds/reds-token-next';
|
|
6
|
+
|
|
7
|
+
var typeStyles = {
|
|
8
|
+
primary: {
|
|
9
|
+
backgroundColor: lightColor.Primary2,
|
|
10
|
+
color: lightColor.Primary,
|
|
11
|
+
borderColor: lightColor.Primary
|
|
12
|
+
},
|
|
13
|
+
"default": {
|
|
14
|
+
backgroundColor: lightColor.Fill1,
|
|
15
|
+
color: lightColor.Paragraph,
|
|
16
|
+
borderColor: lightColor.Separator2
|
|
17
|
+
},
|
|
18
|
+
warning: {
|
|
19
|
+
backgroundColor: lightColor.Warning2,
|
|
20
|
+
color: lightColor.Warning,
|
|
21
|
+
borderColor: lightColor.Warning
|
|
22
|
+
},
|
|
23
|
+
success: {
|
|
24
|
+
backgroundColor: lightColor.Success2,
|
|
25
|
+
color: lightColor.Success,
|
|
26
|
+
borderColor: lightColor.Success
|
|
27
|
+
},
|
|
28
|
+
info: {
|
|
29
|
+
backgroundColor: lightColor.Info2,
|
|
30
|
+
color: lightColor.Info,
|
|
31
|
+
borderColor: lightColor.Info
|
|
32
|
+
},
|
|
33
|
+
ghost: {
|
|
34
|
+
backgroundColor: alwaysColor.Black,
|
|
35
|
+
color: alwaysColor.White,
|
|
36
|
+
borderColor: alwaysColor.LightTitle
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
var sizeStyles = {
|
|
40
|
+
mini: {
|
|
41
|
+
fontSize: typography.C3FontSize,
|
|
42
|
+
lineHeight: typography.C3LineHeight,
|
|
43
|
+
height: 16,
|
|
44
|
+
paddingHorizontal: 4,
|
|
45
|
+
paddingVertical: 1,
|
|
46
|
+
borderRadius: 4
|
|
47
|
+
},
|
|
48
|
+
small: {
|
|
49
|
+
fontSize: typography.C3FontSize,
|
|
50
|
+
lineHeight: typography.C3LineHeight,
|
|
51
|
+
height: 20,
|
|
52
|
+
paddingHorizontal: 6,
|
|
53
|
+
paddingVertical: 3,
|
|
54
|
+
borderRadius: 4
|
|
55
|
+
},
|
|
56
|
+
medium: {
|
|
57
|
+
fontSize: typography.C2FontSize,
|
|
58
|
+
lineHeight: typography.C2LineHeight,
|
|
59
|
+
height: 28,
|
|
60
|
+
paddingHorizontal: 10,
|
|
61
|
+
paddingVertical: 5,
|
|
62
|
+
borderRadius: 6
|
|
63
|
+
},
|
|
64
|
+
large: {
|
|
65
|
+
fontSize: typography.B2FontSize,
|
|
66
|
+
lineHeight: typography.B2LineHeight,
|
|
67
|
+
height: 36,
|
|
68
|
+
paddingHorizontal: 16,
|
|
69
|
+
paddingVertical: 8,
|
|
70
|
+
borderRadius: 6
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
var shapeStyles = {
|
|
74
|
+
square: {},
|
|
75
|
+
round: {
|
|
76
|
+
borderRadius: 999
|
|
77
|
+
},
|
|
78
|
+
mark: {
|
|
79
|
+
borderRadius: 999,
|
|
80
|
+
borderTopLeftRadius: 0,
|
|
81
|
+
borderBottomLeftRadius: 0
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
var Tag = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
85
|
+
var content = props.content,
|
|
86
|
+
_props$type = props.type,
|
|
87
|
+
type = _props$type === void 0 ? TagDefaultProps.type : _props$type,
|
|
88
|
+
_props$size = props.size,
|
|
89
|
+
size = _props$size === void 0 ? TagDefaultProps.size : _props$size,
|
|
90
|
+
_props$plain = props.plain,
|
|
91
|
+
plain = _props$plain === void 0 ? TagDefaultProps.plain : _props$plain,
|
|
92
|
+
borderRadius = props.borderRadius,
|
|
93
|
+
_props$disabled = props.disabled,
|
|
94
|
+
disabled = _props$disabled === void 0 ? TagDefaultProps.disabled : _props$disabled,
|
|
95
|
+
_props$shape = props.shape,
|
|
96
|
+
shape = _props$shape === void 0 ? TagDefaultProps.shape : _props$shape,
|
|
97
|
+
_props$closeabled = props.closeabled,
|
|
98
|
+
closeabled = _props$closeabled === void 0 ? TagDefaultProps.closeabled : _props$closeabled,
|
|
99
|
+
icon = props.icon,
|
|
100
|
+
afterIcon = props.afterIcon,
|
|
101
|
+
closeIcon = props.closeIcon,
|
|
102
|
+
onClose = props.onClose,
|
|
103
|
+
children = props.children;
|
|
104
|
+
var _useState = useState(true),
|
|
105
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
106
|
+
visible = _useState2[0],
|
|
107
|
+
setVisible = _useState2[1];
|
|
108
|
+
useImperativeHandle(ref, function () {
|
|
109
|
+
return {
|
|
110
|
+
setVisible: setVisible
|
|
111
|
+
};
|
|
112
|
+
});
|
|
113
|
+
var tagStyle = useMemo(function () {
|
|
114
|
+
var style = {
|
|
115
|
+
fontFamily: "PingFang SC",
|
|
116
|
+
fontWeight: typography.C3FontWeight,
|
|
117
|
+
alignItems: "center",
|
|
118
|
+
borderWidth: 0.5,
|
|
119
|
+
borderColor: "transparent",
|
|
120
|
+
cursor: disabled ? "not-allowed" : "pointer",
|
|
121
|
+
userSelect: "none",
|
|
122
|
+
opacity: disabled ? 0.5 : 1,
|
|
123
|
+
alignSelf: "flex-start",
|
|
124
|
+
flexShrink: 0,
|
|
125
|
+
flexDirection: "row"
|
|
126
|
+
};
|
|
127
|
+
if (type) {
|
|
128
|
+
var currentType = type;
|
|
129
|
+
Object.assign(style, plain ? {
|
|
130
|
+
backgroundColor: "transparent",
|
|
131
|
+
borderColor: typeStyles[currentType].borderColor,
|
|
132
|
+
color: typeStyles[currentType].color
|
|
133
|
+
} : {
|
|
134
|
+
backgroundColor: typeStyles[currentType].backgroundColor,
|
|
135
|
+
borderColor: "transparent",
|
|
136
|
+
color: typeStyles[currentType].color
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
if (size) {
|
|
140
|
+
Object.assign(style, sizeStyles[size]);
|
|
141
|
+
}
|
|
142
|
+
if (borderRadius) {
|
|
143
|
+
style.borderRadius = borderRadius;
|
|
144
|
+
} else if (shape) {
|
|
145
|
+
Object.assign(style, shapeStyles[shape]);
|
|
146
|
+
}
|
|
147
|
+
return style;
|
|
148
|
+
}, [type, size, plain, borderRadius, shape, disabled]);
|
|
149
|
+
var textStyle = useMemo(function () {
|
|
150
|
+
return {
|
|
151
|
+
color: type ? typeStyles[type].color : void 0
|
|
152
|
+
};
|
|
153
|
+
}, [type]);
|
|
154
|
+
var handleClose = function handleClose(event) {
|
|
155
|
+
if (!disabled) {
|
|
156
|
+
setVisible(false);
|
|
157
|
+
onClose && onClose(event);
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
if (!visible) return null;
|
|
161
|
+
return /* @__PURE__ */React.createElement(View, {
|
|
162
|
+
style: [styles.tag, tagStyle]
|
|
163
|
+
}, /* @__PURE__ */React.createElement(TouchableOpacity, {
|
|
164
|
+
disabled: disabled,
|
|
165
|
+
style: {
|
|
166
|
+
flexDirection: "row",
|
|
167
|
+
alignItems: "center"
|
|
168
|
+
}
|
|
169
|
+
}, icon && /* @__PURE__ */React.createElement(View, {
|
|
170
|
+
style: {
|
|
171
|
+
marginRight: 3
|
|
172
|
+
}
|
|
173
|
+
}, icon), !content ? /* @__PURE__ */React.createElement(Text, {
|
|
174
|
+
style: textStyle
|
|
175
|
+
}, children) : /* @__PURE__ */React.createElement(Text, {
|
|
176
|
+
style: textStyle
|
|
177
|
+
}, typeof content === "function" ? content({}) : content), afterIcon && /* @__PURE__ */React.createElement(View, {
|
|
178
|
+
style: {
|
|
179
|
+
marginLeft: 3
|
|
180
|
+
}
|
|
181
|
+
}, afterIcon)), closeabled && /* @__PURE__ */React.createElement(TouchableOpacity, {
|
|
182
|
+
onPress: handleClose,
|
|
183
|
+
style: {
|
|
184
|
+
marginLeft: 3
|
|
185
|
+
}
|
|
186
|
+
}, closeIcon));
|
|
187
|
+
}));
|
|
188
|
+
var styles = StyleSheet.create({
|
|
189
|
+
tag: {
|
|
190
|
+
alignItems: "center",
|
|
191
|
+
borderWidth: 0.5,
|
|
192
|
+
borderColor: "transparent",
|
|
193
|
+
paddingHorizontal: 10,
|
|
194
|
+
paddingVertical: 5
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
export { Tag as default };
|
|
199
|
+
//# sourceMappingURL=Tag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.js","sources":["../../../../src/components/Tag/Tag.tsx"],"sourcesContent":["import React, { useState, useMemo, useImperativeHandle, forwardRef, memo, FunctionComponent } from \"react\";\nimport { View, Text, StyleSheet, GestureResponderEvent, TouchableOpacity } from \"react-native\";\nimport { RedsTag, TagDefaultProps } from \"./interface\";\nimport { lightColor, typography, alwaysColor } from \"@xhsreds/reds-token-next\";\n\nconst typeStyles = {\n primary: {\n backgroundColor: lightColor.Primary2,\n color: lightColor.Primary,\n borderColor: lightColor.Primary,\n },\n default: {\n backgroundColor: lightColor.Fill1,\n color: lightColor.Paragraph,\n borderColor: lightColor.Separator2,\n },\n warning: {\n backgroundColor: lightColor.Warning2,\n color: lightColor.Warning,\n borderColor: lightColor.Warning,\n },\n success: {\n backgroundColor: lightColor.Success2,\n color: lightColor.Success,\n borderColor: lightColor.Success,\n },\n info: {\n backgroundColor: lightColor.Info2,\n color: lightColor.Info,\n borderColor: lightColor.Info,\n },\n ghost: {\n backgroundColor: alwaysColor.Black,\n color: alwaysColor.White,\n borderColor: alwaysColor.LightTitle,\n },\n};\n\nconst sizeStyles: { [key: string]: any } = {\n mini: {\n fontSize: typography.C3FontSize,\n lineHeight: typography.C3LineHeight,\n height: 16,\n paddingHorizontal: 4,\n paddingVertical: 1,\n borderRadius: 4,\n },\n small: {\n fontSize: typography.C3FontSize,\n lineHeight: typography.C3LineHeight,\n height: 20,\n paddingHorizontal: 6,\n paddingVertical: 3,\n borderRadius: 4,\n },\n medium: {\n fontSize: typography.C2FontSize,\n lineHeight: typography.C2LineHeight,\n height: 28,\n paddingHorizontal: 10,\n paddingVertical: 5,\n borderRadius: 6,\n },\n large: {\n fontSize: typography.B2FontSize,\n lineHeight: typography.B2LineHeight,\n height: 36,\n paddingHorizontal: 16,\n paddingVertical: 8,\n borderRadius: 6,\n },\n};\n\nconst shapeStyles: { [key: string]: any } = {\n square: {},\n round: { borderRadius: 999 },\n mark: { borderRadius: 999, borderTopLeftRadius: 0, borderBottomLeftRadius: 0 },\n};\n\nconst Tag: FunctionComponent<RedsTag> = memo(\n forwardRef((props: RedsTag, ref) => {\n const {\n content,\n type = TagDefaultProps.type,\n size = TagDefaultProps.size,\n plain = TagDefaultProps.plain,\n borderRadius,\n disabled = TagDefaultProps.disabled,\n shape = TagDefaultProps.shape,\n closeabled = TagDefaultProps.closeabled,\n icon,\n afterIcon,\n closeIcon,\n onClose,\n children,\n } = props;\n\n const [visible, setVisible] = useState<boolean>(true);\n\n useImperativeHandle(ref, () => ({\n setVisible,\n }));\n\n const tagStyle = useMemo(() => {\n const style: any = {\n fontFamily: \"PingFang SC\",\n fontWeight: typography.C3FontWeight,\n alignItems: \"center\",\n borderWidth: 0.5,\n borderColor: \"transparent\",\n cursor: disabled ? \"not-allowed\" : \"pointer\",\n userSelect: \"none\",\n opacity: disabled ? 0.5 : 1,\n alignSelf: \"flex-start\",\n flexShrink: 0,\n flexDirection: \"row\",\n };\n if (type) {\n const currentType = type as keyof typeof typeStyles;\n Object.assign(\n style,\n plain\n ? {\n backgroundColor: \"transparent\",\n borderColor: typeStyles[currentType].borderColor,\n color: typeStyles[currentType].color,\n }\n : {\n backgroundColor: typeStyles[currentType].backgroundColor,\n borderColor: \"transparent\",\n color: typeStyles[currentType].color,\n },\n );\n }\n\n if (size) {\n Object.assign(style, sizeStyles[size]);\n }\n\n if (borderRadius) {\n style.borderRadius = borderRadius;\n } else if (shape) {\n Object.assign(style, shapeStyles[shape]);\n }\n\n return style;\n }, [type, size, plain, borderRadius, shape, disabled]);\n\n const textStyle = useMemo(() => {\n return {\n color: type ? typeStyles[type as keyof typeof typeStyles].color : undefined,\n };\n }, [type]);\n\n const handleClose = (event: GestureResponderEvent) => {\n if (!disabled) {\n setVisible(false);\n onClose && onClose(event);\n }\n };\n\n if (!visible) return null;\n\n return (\n <View style={[styles.tag, tagStyle]}>\n <TouchableOpacity disabled={disabled} style={{ flexDirection: \"row\", alignItems: \"center\" }}>\n {icon && <View style={{ marginRight: 3 }}>{icon}</View>}\n {!content ? (\n <Text style={textStyle}>{children}</Text>\n ) : (\n <Text style={textStyle}>{typeof content === \"function\" ? content({}) : content}</Text>\n )}\n {afterIcon && <View style={{ marginLeft: 3 }}>{afterIcon}</View>}\n </TouchableOpacity>\n {closeabled && (\n <TouchableOpacity onPress={handleClose} style={{ marginLeft: 3 }}>\n {closeIcon}\n </TouchableOpacity>\n )}\n </View>\n );\n }),\n);\n\nconst styles = StyleSheet.create({\n tag: {\n alignItems: \"center\",\n borderWidth: 0.5,\n borderColor: \"transparent\",\n paddingHorizontal: 10,\n paddingVertical: 5,\n },\n});\n\nexport default Tag;\n"],"names":["typeStyles","primary","backgroundColor","lightColor","Primary2","color","Primary","borderColor","Fill1","Paragraph","Separator2","warning","Warning2","Warning","success","Success2","Success","info","Info2","Info","ghost","alwaysColor","Black","White","LightTitle","sizeStyles","mini","fontSize","typography","C3FontSize","lineHeight","C3LineHeight","height","paddingHorizontal","paddingVertical","borderRadius","small","medium","C2FontSize","C2LineHeight","large","B2FontSize","B2LineHeight","shapeStyles","square","round","mark","borderTopLeftRadius","borderBottomLeftRadius","Tag","memo","forwardRef","props","ref","content","_props$type","type","TagDefaultProps","_props$size","size","_props$plain","plain","_props$disabled","disabled","_props$shape","shape","_props$closeabled","closeabled","icon","afterIcon","closeIcon","onClose","children","_useState","useState","_useState2","_slicedToArray","visible","setVisible","useImperativeHandle","tagStyle","useMemo","style","fontFamily","fontWeight","C3FontWeight","alignItems","borderWidth","cursor","userSelect","opacity","alignSelf","flexShrink","flexDirection","currentType","Object","assign","textStyle","handleClose","event","React","createElement","View","styles","tag","TouchableOpacity","marginRight","Text","marginLeft","onPress","StyleSheet","create"],"mappings":";;;;;;AAKA,IAAMA,UAAa,GAAA;AACjBC,EAAAA,OAAS,EAAA;IACPC,iBAAiBC,UAAW,CAAAC,QAAA;IAC5BC,OAAOF,UAAW,CAAAG,OAAA;IAClBC,aAAaJ,UAAW,CAAAG,OAAAA;GAC1B;EACA,SAAS,EAAA;IACPJ,iBAAiBC,UAAW,CAAAK,KAAA;IAC5BH,OAAOF,UAAW,CAAAM,SAAA;IAClBF,aAAaJ,UAAW,CAAAO,UAAAA;GAC1B;AACAC,EAAAA,OAAS,EAAA;IACPT,iBAAiBC,UAAW,CAAAS,QAAA;IAC5BP,OAAOF,UAAW,CAAAU,OAAA;IAClBN,aAAaJ,UAAW,CAAAU,OAAAA;GAC1B;AACAC,EAAAA,OAAS,EAAA;IACPZ,iBAAiBC,UAAW,CAAAY,QAAA;IAC5BV,OAAOF,UAAW,CAAAa,OAAA;IAClBT,aAAaJ,UAAW,CAAAa,OAAAA;GAC1B;AACAC,EAAAA,IAAM,EAAA;IACJf,iBAAiBC,UAAW,CA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C,CAAA;;;;"}
|
|
@@ -1,210 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import Tag from './Tag.js';
|
|
2
|
+
export { i as TagType } from '../../_chunks/CszwJiJx.js';
|
|
3
|
+
import '../../_chunks/GCWGuPmB.js';
|
|
4
|
+
import 'react';
|
|
5
|
+
import 'react-native';
|
|
6
|
+
import '@xhsreds/reds-token-next';
|
|
5
7
|
|
|
6
|
-
var typeStyles = {
|
|
7
|
-
primary: {
|
|
8
|
-
backgroundColor: lightColor.Primary2,
|
|
9
|
-
color: lightColor.Primary,
|
|
10
|
-
borderColor: lightColor.Primary
|
|
11
|
-
},
|
|
12
|
-
"default": {
|
|
13
|
-
backgroundColor: lightColor.Fill1,
|
|
14
|
-
color: lightColor.Paragraph,
|
|
15
|
-
borderColor: lightColor.Separator2
|
|
16
|
-
},
|
|
17
|
-
warning: {
|
|
18
|
-
backgroundColor: lightColor.Warning2,
|
|
19
|
-
color: lightColor.Warning,
|
|
20
|
-
borderColor: lightColor.Warning
|
|
21
|
-
},
|
|
22
|
-
success: {
|
|
23
|
-
backgroundColor: lightColor.Success2,
|
|
24
|
-
color: lightColor.Success,
|
|
25
|
-
borderColor: lightColor.Success
|
|
26
|
-
},
|
|
27
|
-
info: {
|
|
28
|
-
backgroundColor: lightColor.Info2,
|
|
29
|
-
color: lightColor.Info,
|
|
30
|
-
borderColor: lightColor.Info
|
|
31
|
-
},
|
|
32
|
-
ghost: {
|
|
33
|
-
backgroundColor: alwaysColor.Black,
|
|
34
|
-
color: alwaysColor.White,
|
|
35
|
-
borderColor: alwaysColor.LightTitle
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var sizeStyles = {
|
|
39
|
-
mini: {
|
|
40
|
-
fontSize: typography.C3FontSize,
|
|
41
|
-
lineHeight: typography.C3LineHeight,
|
|
42
|
-
height: 16,
|
|
43
|
-
paddingHorizontal: 4,
|
|
44
|
-
paddingVertical: 1,
|
|
45
|
-
borderRadius: 4
|
|
46
|
-
},
|
|
47
|
-
small: {
|
|
48
|
-
fontSize: typography.C3FontSize,
|
|
49
|
-
lineHeight: typography.C3LineHeight,
|
|
50
|
-
height: 20,
|
|
51
|
-
paddingHorizontal: 6,
|
|
52
|
-
paddingVertical: 3,
|
|
53
|
-
borderRadius: 4
|
|
54
|
-
},
|
|
55
|
-
medium: {
|
|
56
|
-
fontSize: typography.C2FontSize,
|
|
57
|
-
lineHeight: typography.C2LineHeight,
|
|
58
|
-
height: 28,
|
|
59
|
-
paddingHorizontal: 10,
|
|
60
|
-
paddingVertical: 5,
|
|
61
|
-
borderRadius: 6
|
|
62
|
-
},
|
|
63
|
-
large: {
|
|
64
|
-
fontSize: typography.B2FontSize,
|
|
65
|
-
lineHeight: typography.B2LineHeight,
|
|
66
|
-
height: 36,
|
|
67
|
-
paddingHorizontal: 16,
|
|
68
|
-
paddingVertical: 8,
|
|
69
|
-
borderRadius: 6
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
var shapeStyles = {
|
|
73
|
-
square: {},
|
|
74
|
-
round: {
|
|
75
|
-
borderRadius: 999
|
|
76
|
-
},
|
|
77
|
-
mark: {
|
|
78
|
-
borderRadius: 999,
|
|
79
|
-
borderTopLeftRadius: 0,
|
|
80
|
-
borderBottomLeftRadius: 0
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
var Tag = function Tag(_ref) {
|
|
84
|
-
var content = _ref.content,
|
|
85
|
-
_ref$type = _ref.type,
|
|
86
|
-
type = _ref$type === void 0 ? "default" : _ref$type,
|
|
87
|
-
_ref$size = _ref.size,
|
|
88
|
-
size = _ref$size === void 0 ? "medium" : _ref$size,
|
|
89
|
-
_ref$plain = _ref.plain,
|
|
90
|
-
plain = _ref$plain === void 0 ? false : _ref$plain,
|
|
91
|
-
borderRadius = _ref.borderRadius,
|
|
92
|
-
_ref$disabled = _ref.disabled,
|
|
93
|
-
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
94
|
-
_ref$shape = _ref.shape,
|
|
95
|
-
shape = _ref$shape === void 0 ? "square" : _ref$shape,
|
|
96
|
-
_ref$checkable = _ref.checkable,
|
|
97
|
-
checkable = _ref$checkable === void 0 ? false : _ref$checkable,
|
|
98
|
-
_ref$checked = _ref.checked,
|
|
99
|
-
checked = _ref$checked === void 0 ? false : _ref$checked,
|
|
100
|
-
_ref$closeabled = _ref.closeabled,
|
|
101
|
-
closeabled = _ref$closeabled === void 0 ? false : _ref$closeabled,
|
|
102
|
-
icon = _ref.icon,
|
|
103
|
-
afterIcon = _ref.afterIcon,
|
|
104
|
-
closeIcon = _ref.closeIcon,
|
|
105
|
-
onCheck = _ref.onCheck,
|
|
106
|
-
onClose = _ref.onClose,
|
|
107
|
-
children = _ref.children;
|
|
108
|
-
var _useState = useState(checked),
|
|
109
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
110
|
-
internalChecked = _useState2[0],
|
|
111
|
-
setInternalChecked = _useState2[1];
|
|
112
|
-
var _useState3 = useState(true),
|
|
113
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
114
|
-
visible = _useState4[0],
|
|
115
|
-
setVisible = _useState4[1];
|
|
116
|
-
var tagStyle = useMemo(function () {
|
|
117
|
-
var style = {
|
|
118
|
-
fontFamily: "PingFang SC",
|
|
119
|
-
fontWeight: typography.C3FontWeight,
|
|
120
|
-
alignItems: "center",
|
|
121
|
-
borderWidth: 0.5,
|
|
122
|
-
borderColor: "transparent",
|
|
123
|
-
cursor: disabled ? "not-allowed" : "pointer",
|
|
124
|
-
userSelect: "none",
|
|
125
|
-
opacity: disabled ? 0.5 : 1,
|
|
126
|
-
alignSelf: "flex-start",
|
|
127
|
-
flexShrink: 0,
|
|
128
|
-
flexDirection: "row"
|
|
129
|
-
};
|
|
130
|
-
var currentType = internalChecked ? "primary" : type;
|
|
131
|
-
if (type) {
|
|
132
|
-
Object.assign(style, plain ? {
|
|
133
|
-
backgroundColor: "transparent",
|
|
134
|
-
borderColor: typeStyles[currentType].borderColor,
|
|
135
|
-
color: typeStyles[currentType].color
|
|
136
|
-
} : {
|
|
137
|
-
backgroundColor: typeStyles[currentType].backgroundColor,
|
|
138
|
-
borderColor: "transparent",
|
|
139
|
-
color: typeStyles[currentType].color
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
if (size) {
|
|
143
|
-
Object.assign(style, sizeStyles[size]);
|
|
144
|
-
}
|
|
145
|
-
if (borderRadius) {
|
|
146
|
-
style.borderRadius = borderRadius;
|
|
147
|
-
} else if (shape) {
|
|
148
|
-
Object.assign(style, shapeStyles[shape]);
|
|
149
|
-
}
|
|
150
|
-
return style;
|
|
151
|
-
}, [type, size, plain, borderRadius, shape, internalChecked, disabled]);
|
|
152
|
-
var textStyle = useMemo(function () {
|
|
153
|
-
var currentType = internalChecked ? "primary" : type;
|
|
154
|
-
return {
|
|
155
|
-
color: typeStyles[currentType].color
|
|
156
|
-
};
|
|
157
|
-
}, [type, internalChecked]);
|
|
158
|
-
var handleCheck = function handleCheck(event) {
|
|
159
|
-
if (checkable && !disabled) {
|
|
160
|
-
setInternalChecked(!internalChecked);
|
|
161
|
-
onCheck && onCheck(!internalChecked);
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
var handleClose = function handleClose(event) {
|
|
165
|
-
if (!disabled) {
|
|
166
|
-
setVisible(false);
|
|
167
|
-
onClose && onClose(event);
|
|
168
|
-
}
|
|
169
|
-
};
|
|
170
|
-
if (!visible) return null;
|
|
171
|
-
return /* @__PURE__ */React.createElement(View, {
|
|
172
|
-
style: [styles.tag, tagStyle]
|
|
173
|
-
}, /* @__PURE__ */React.createElement(Pressable, {
|
|
174
|
-
onPress: handleCheck,
|
|
175
|
-
disabled: disabled,
|
|
176
|
-
style: {
|
|
177
|
-
flexDirection: "row",
|
|
178
|
-
alignItems: "center"
|
|
179
|
-
}
|
|
180
|
-
}, icon && /* @__PURE__ */React.createElement(View, {
|
|
181
|
-
style: {
|
|
182
|
-
marginRight: 3
|
|
183
|
-
}
|
|
184
|
-
}, icon), !content ? /* @__PURE__ */React.createElement(Text, {
|
|
185
|
-
style: textStyle
|
|
186
|
-
}, children) : /* @__PURE__ */React.createElement(Text, {
|
|
187
|
-
style: textStyle
|
|
188
|
-
}, typeof content === "function" ? content({}) : content), afterIcon && /* @__PURE__ */React.createElement(View, {
|
|
189
|
-
style: {
|
|
190
|
-
marginLeft: 3
|
|
191
|
-
}
|
|
192
|
-
}, afterIcon)), closeabled && /* @__PURE__ */React.createElement(Pressable, {
|
|
193
|
-
onPress: handleClose,
|
|
194
|
-
style: {
|
|
195
|
-
marginLeft: 3
|
|
196
|
-
}
|
|
197
|
-
}, closeIcon));
|
|
198
|
-
};
|
|
199
|
-
var styles = StyleSheet.create({
|
|
200
|
-
tag: {
|
|
201
|
-
alignItems: "center",
|
|
202
|
-
borderWidth: 0.5,
|
|
203
|
-
borderColor: "transparent",
|
|
204
|
-
paddingHorizontal: 10,
|
|
205
|
-
paddingVertical: 5
|
|
206
|
-
}
|
|
207
|
-
});
|
|
208
8
|
|
|
209
|
-
|
|
9
|
+
|
|
10
|
+
export { Tag, Tag as default };
|
|
210
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/Tag/index.tsx"],"sourcesContent":["import React, { useState, useMemo, ReactNode, FunctionComponent } from \"react\";\nimport { View, Text, StyleSheet, GestureResponderEvent, Pressable } from \"react-native\";\nimport { RedsTag } from \"./interface\";\nimport { lightColor, typography, alwaysColor } from \"@xhsreds/reds-token-next\";\n\nconst typeStyles = {\n primary: {\n backgroundColor: lightColor.Primary2,\n color: lightColor.Primary,\n borderColor: lightColor.Primary,\n },\n default: {\n backgroundColor: lightColor.Fill1,\n color: lightColor.Paragraph,\n borderColor: lightColor.Separator2,\n },\n warning: {\n backgroundColor: lightColor.Warning2,\n color: lightColor.Warning,\n borderColor: lightColor.Warning,\n },\n success: {\n backgroundColor: lightColor.Success2,\n color: lightColor.Success,\n borderColor: lightColor.Success,\n },\n info: {\n backgroundColor: lightColor.Info2,\n color: lightColor.Info,\n borderColor: lightColor.Info,\n },\n ghost: {\n backgroundColor: alwaysColor.Black,\n color: alwaysColor.White,\n borderColor: alwaysColor.LightTitle,\n },\n};\n\nconst sizeStyles = {\n mini: {\n fontSize: typography.C3FontSize,\n lineHeight: typography.C3LineHeight,\n height: 16,\n paddingHorizontal: 4,\n paddingVertical: 1,\n borderRadius: 4,\n },\n small: {\n fontSize: typography.C3FontSize,\n lineHeight: typography.C3LineHeight,\n height: 20,\n paddingHorizontal: 6,\n paddingVertical: 3,\n borderRadius: 4,\n },\n medium: {\n fontSize: typography.C2FontSize,\n lineHeight: typography.C2LineHeight,\n height: 28,\n paddingHorizontal: 10,\n paddingVertical: 5,\n borderRadius: 6,\n },\n large: {\n fontSize: typography.B2FontSize,\n lineHeight: typography.B2LineHeight,\n height: 36,\n paddingHorizontal: 16,\n paddingVertical: 8,\n borderRadius: 6,\n },\n};\n\nconst shapeStyles = {\n square: {},\n round: { borderRadius: 999 },\n mark: { borderRadius: 999, borderTopLeftRadius: 0, borderBottomLeftRadius: 0 },\n};\n\nconst Tag: FunctionComponent<RedsTag> = ({\n content,\n type = \"default\",\n size = \"medium\",\n plain = false,\n borderRadius,\n disabled = false,\n shape = \"square\",\n checkable = false,\n checked = false,\n closeabled = false,\n icon,\n afterIcon,\n closeIcon,\n onCheck,\n onClose,\n children,\n}) => {\n const [internalChecked, setInternalChecked] = useState<boolean>(checked);\n const [visible, setVisible] = useState<boolean>(true);\n\n const tagStyle = useMemo(() => {\n const style: any = {\n fontFamily: \"PingFang SC\",\n fontWeight: typography.C3FontWeight,\n alignItems: \"center\",\n borderWidth: 0.5,\n borderColor: \"transparent\",\n cursor: disabled ? \"not-allowed\" : \"pointer\",\n userSelect: \"none\",\n opacity: disabled ? 0.5 : 1,\n alignSelf: \"flex-start\",\n flexShrink: 0,\n flexDirection: \"row\",\n };\n const currentType = internalChecked ? \"primary\" : type;\n if (type) {\n Object.assign(\n style,\n plain\n ? {\n backgroundColor: \"transparent\",\n borderColor: typeStyles[currentType].borderColor,\n color: typeStyles[currentType].color,\n }\n : {\n backgroundColor: typeStyles[currentType].backgroundColor,\n borderColor: \"transparent\",\n color: typeStyles[currentType].color,\n },\n );\n }\n\n if (size) {\n Object.assign(style, sizeStyles[size]);\n }\n\n if (borderRadius) {\n style.borderRadius = borderRadius;\n } else if (shape) {\n Object.assign(style, shapeStyles[shape]);\n }\n\n return style;\n }, [type, size, plain, borderRadius, shape, internalChecked, disabled]);\n\n const textStyle = useMemo(() => {\n const currentType = internalChecked ? \"primary\" : type;\n return {\n color: typeStyles[currentType].color,\n };\n }, [type, internalChecked]);\n\n const handleCheck = (event: GestureResponderEvent) => {\n if (checkable && !disabled) {\n setInternalChecked(!internalChecked);\n onCheck && onCheck(!internalChecked);\n }\n };\n\n const handleClose = (event: GestureResponderEvent) => {\n if (!disabled) {\n setVisible(false);\n onClose && onClose(event);\n }\n };\n\n if (!visible) return null;\n\n return (\n <View style={[styles.tag, tagStyle]}>\n <Pressable onPress={handleCheck} disabled={disabled} style={{ flexDirection: \"row\", alignItems: \"center\" }}>\n {icon && <View style={{ marginRight: 3 }}>{icon}</View>}\n {!content ? (\n <Text style={textStyle}>{children}</Text>\n ) : (\n <Text style={textStyle}>{typeof content === \"function\" ? content({}) : content}</Text>\n )}\n {afterIcon && <View style={{ marginLeft: 3 }}>{afterIcon}</View>}\n </Pressable>\n {closeabled && (\n <Pressable onPress={handleClose} style={{ marginLeft: 3 }}>\n {closeIcon}\n </Pressable>\n )}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n tag: {\n alignItems: \"center\",\n borderWidth: 0.5,\n borderColor: \"transparent\",\n paddingHorizontal: 10,\n paddingVertical: 5,\n },\n});\n\nexport default Tag;\n"],"names":["typeStyles","primary","backgroundColor","lightColor","Primary2","color","Primary","borderColor","Fill1","Paragraph","Separator2","warning","Warning2","Warning","success","Success2","Success","info","Info2","Info","ghost","alwaysColor","Black","White","LightTitle","sizeStyles","mini","fontSize","typography","C3FontSize","lineHeight","C3LineHeight","height","paddingHorizontal","paddingVertical","borderRadius","small","medium","C2FontSize","C2LineHeight","large","B2FontSize","B2LineHeight","shapeStyles","square","round","mark","borderTopLeftRadius","borderBottomLeftRadius","Tag","content","_ref","_ref$type","type","_ref$size","size","_ref$plain","plain","_ref$disabled","disabled","_ref$shape","shape","_ref$checkable","checkable","_ref$checked","checked","_ref$closeabled","closeabled","icon","afterIcon","closeIcon","onCheck","onClose","children","_useState","useState","_useState2","_slicedToArray","internalChecked","setInternalChecked","_useState3","_useState4","visible","setVisible","tagStyle","useMemo","style","fontFamily","fontWeight","C3FontWeight","alignItems","borderWidth","cursor","userSelect","opacity","alignSelf","flexShrink","flexDirection","currentType","Object","assign","textStyle","handleCheck","event","handleClose","React","createElement","View","styles","tag","Pressable","onPress","marginRight","Text","marginLeft","StyleSheet","create"],"mappings":";;;;;AAKA,IAAMA,UAAa,GAAA;AACjBC,EAAAA,OAAS,EAAA;IACPC,iBAAiBC,UAAW,CAAAC,QAAA;IAC5BC,OAAOF,UAAW,CAAAG,OAAA;IAClBC,aAAaJ,UAAW,CAAAG,OAAAA;GAC1B;EACA,SAAS,EAAA;IACPJ,iBAAiBC,UAAW,CAAAK,KAAA;IAC5BH,OAAOF,UAAW,CAAAM,SAAA;IAClBF,aAAaJ,UAAW,CAAAO,UAAAA;GAC1B;AACAC,EAAAA,OAAS,EAAA;IACPT,iBAAiBC,UAAW,CAAAS,QAAA;IAC5BP,OAAOF,UAAW,CAAAU,OAAA;IAClBN,aAAaJ,UAAW,CAAAU,OAAAA;GAC1B;AACAC,EAAAA,OAAS,EAAA;IACPZ,iBAAiBC,UAAW,CAAAY,QAAA;IAC5BV,OAAOF,UAAW,CAAAa,OAAA;IAClBT,aAAaJ,UAAW,CAAAa,OAAAA;GAC1B;AACAC,EAAAA,IAAM,EAAA;IACJf,iBAAi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,CAACO;AAAK3B,IAAAA,KAAO,EAAAe,SAAAA;GAAA,EAAY5B,QAAS,CAAA,kBAEjCgC,KAAA,CAAAC,aAAA,CAAAO,IAAA,EAAA;AAAK3B,IAAAA,KAAO,EAAAe,SAAAA;GAAA,EAAY,OAAOnD,OAAY,KAAA,UAAA,GAAaA,OAAQ,CAAA,EAAE,CAAI,GAAAA,OAAQ,CAEhF,EAAAmB,SAAA,uCAAcsC,IAAK,EAAA;AAAArB,IAAAA,KAAA,EAAO;AAAE4B,MAAAA,UAAA,EAAY,CAAA;AAAE,KAAA;AAAI,GAAA,EAAA7C,SAAU,CAC3D,CAAA,EACCF,6BACEsC,KAAA,CAAAC,aAAA,CAAAI,SAAA,EAAA;AAAUC,IAAAA,OAAS,EAAAP,WAAA;AAAalB,IAAAA,OAAO;AAAE4B,MAAAA,UAAA,EAAY,CAAA;AAAE,KAAA;GAAA,EACrD5C,SACH,CAEJ,CAAA,CAAA;AAEJ,EAAA;AAEA,IAAMsC,MAAA,GAASO,WAAWC,MAAO,CAAA;AAC/BP,EAAAA,GAAK,EAAA;AACHnB,IAAAA,UAAY,EAAA,QAAA;AACZC,IAAAA,WAAa,EAAA,GAAA;AACbpF,IAAAA,WAAa,EAAA,aAAA;AACb0B,IAAAA,iBAAmB,EAAA,EAAA;AACnBC,IAAAA,eAAiB,EAAA,CAAA;AACnB,GAAA;AACF,CAAC,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
|
@@ -1,19 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
content: void 0,
|
|
3
|
-
type: "default",
|
|
4
|
-
size: "medium",
|
|
5
|
-
plain: false,
|
|
6
|
-
borderRadius: void 0,
|
|
7
|
-
disabled: false,
|
|
8
|
-
shape: "square",
|
|
9
|
-
checkable: false,
|
|
10
|
-
checked: false,
|
|
11
|
-
closeabled: false,
|
|
12
|
-
icon: void 0,
|
|
13
|
-
afterIcon: void 0,
|
|
14
|
-
closeIcon: void 0,
|
|
15
|
-
children: void 0
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export { TagDefaultProps };
|
|
1
|
+
export { T as TagDefaultProps } from '../../../_chunks/CszwJiJx.js';
|
|
19
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { alwaysColor } from '@xhsreds/reds-token-next';
|
|
2
|
+
import { StyleSheet } from 'react-native';
|
|
3
|
+
|
|
4
|
+
var styles = StyleSheet.create({
|
|
5
|
+
TagContainer: {
|
|
6
|
+
width: 40,
|
|
7
|
+
height: 24,
|
|
8
|
+
borderRadius: 15,
|
|
9
|
+
justifyContent: "center",
|
|
10
|
+
alignItems: "center"
|
|
11
|
+
},
|
|
12
|
+
thumb: {
|
|
13
|
+
width: 20,
|
|
14
|
+
height: 20,
|
|
15
|
+
borderRadius: 10,
|
|
16
|
+
backgroundColor: alwaysColor.White,
|
|
17
|
+
justifyContent: "center",
|
|
18
|
+
alignItems: "center",
|
|
19
|
+
position: "absolute",
|
|
20
|
+
left: 0
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export { styles as default };
|
|
25
|
+
//# sourceMappingURL=styles.js.map
|