@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../../src/components/Tag/styles.ts"],"sourcesContent":["import { alwaysColor } from \"@xhsreds/reds-token-next\";\nimport { StyleSheet } from \"react-native\";\n\nconst styles = StyleSheet.create({\n TagContainer: {\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","TagContainer","width","height","borderRadius","justifyContent","alignItems","thumb","backgroundColor","alwaysColor","White","position","left"],"mappings":";;;AAGA,IAAMA,MAAA,GAASC,WAAWC,MAAO,CAAA;AAC/BC,EAAAA,YAAc,EAAA;AACZC,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,155 @@
|
|
|
1
|
+
import { _ as _objectSpread2, c as _slicedToArray } from '../../_chunks/GCWGuPmB.js';
|
|
2
|
+
import { StyleSheet, TouchableOpacity, Text as Text$1, View } from 'react-native';
|
|
3
|
+
import { useState, Children, useLayoutEffect, useEffect, useCallback } from 'react';
|
|
4
|
+
import { CloneContainer } from './hooks/cloneContainer.js';
|
|
5
|
+
import { getRenderText } from './hooks/getRenderText.js';
|
|
6
|
+
import createStyles from './styles.js';
|
|
7
|
+
import './hooks/nativeEmojiMap/android.js';
|
|
8
|
+
import './hooks/nativeEmojiMap/ios.js';
|
|
9
|
+
import '../ConfigProvider/hooks/ConfigCache/ConfigCache.js';
|
|
10
|
+
import '@xhsreds/reds-token-next';
|
|
11
|
+
import '../ConfigProvider/hooks/themeToken/useThemeToken.js';
|
|
12
|
+
import '../ConfigProvider/hooks/ConfigContext/ConfigContext.js';
|
|
13
|
+
|
|
14
|
+
var Text = (function (props) {
|
|
15
|
+
var _props$strikethrough = props.strikethrough,
|
|
16
|
+
strikethrough = _props$strikethrough === void 0 ? false : _props$strikethrough,
|
|
17
|
+
_props$underline = props.underline,
|
|
18
|
+
underline = _props$underline === void 0 ? false : _props$underline,
|
|
19
|
+
_props$italic = props.italic,
|
|
20
|
+
italic = _props$italic === void 0 ? false : _props$italic,
|
|
21
|
+
_props$rows = props.rows,
|
|
22
|
+
rows = _props$rows === void 0 ? 1 : _props$rows,
|
|
23
|
+
_props$expandable = props.expandable,
|
|
24
|
+
expandable = _props$expandable === void 0 ? true : _props$expandable,
|
|
25
|
+
_props$expandText = props.expandText,
|
|
26
|
+
expandText = _props$expandText === void 0 ? "\u5C55\u5F00" : _props$expandText,
|
|
27
|
+
_props$collapsible = props.collapsible,
|
|
28
|
+
collapsible = _props$collapsible === void 0 ? true : _props$collapsible,
|
|
29
|
+
_props$collapseText = props.collapseText,
|
|
30
|
+
collapseText = _props$collapseText === void 0 ? "\u6536\u8D77" : _props$collapseText,
|
|
31
|
+
_props$textStyle = props.textStyle,
|
|
32
|
+
textStyle = _props$textStyle === void 0 ? {} : _props$textStyle,
|
|
33
|
+
_props$emojiStyle = props.emojiStyle,
|
|
34
|
+
emojiStyle = _props$emojiStyle === void 0 ? {
|
|
35
|
+
height: 16,
|
|
36
|
+
width: 16
|
|
37
|
+
} : _props$emojiStyle,
|
|
38
|
+
_props$actionStyle = props.actionStyle,
|
|
39
|
+
actionStyle = _props$actionStyle === void 0 ? {} : _props$actionStyle,
|
|
40
|
+
_props$actionTextStyl = props.actionTextStyle,
|
|
41
|
+
actionTextStyle = _props$actionTextStyl === void 0 ? {} : _props$actionTextStyl,
|
|
42
|
+
children = props.children,
|
|
43
|
+
_props$onClick = props.onClick,
|
|
44
|
+
onClick = _props$onClick === void 0 ? function () {} : _props$onClick;
|
|
45
|
+
var styles = createStyles({
|
|
46
|
+
textStyleProps: {
|
|
47
|
+
strikethrough: strikethrough,
|
|
48
|
+
underline: underline,
|
|
49
|
+
italic: italic
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
var customStyles = StyleSheet.create({
|
|
53
|
+
textStyle: _objectSpread2(_objectSpread2({}, styles.textStyleInitial), textStyle),
|
|
54
|
+
lastLineStyle: _objectSpread2({}, styles.lastLineStyleInitial),
|
|
55
|
+
lastLineTextWrapperStyle: _objectSpread2({}, styles.lastLineTextWrapperInitial),
|
|
56
|
+
actionStyle: _objectSpread2(_objectSpread2({}, styles.actionStyle), actionStyle),
|
|
57
|
+
actionTextStyle: _objectSpread2(_objectSpread2({}, styles.actionTextStyleInitial), actionTextStyle)
|
|
58
|
+
});
|
|
59
|
+
var _useState = useState(false),
|
|
60
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
61
|
+
expanded = _useState2[0],
|
|
62
|
+
setExpanded = _useState2[1];
|
|
63
|
+
var _useState3 = useState(""),
|
|
64
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
65
|
+
actionText = _useState4[0],
|
|
66
|
+
setActionText = _useState4[1];
|
|
67
|
+
var _useState5 = useState(false),
|
|
68
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
69
|
+
actionShow = _useState6[0],
|
|
70
|
+
setActionShow = _useState6[1];
|
|
71
|
+
var _useState7 = useState([]),
|
|
72
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
73
|
+
lines = _useState8[0],
|
|
74
|
+
setLines = _useState8[1];
|
|
75
|
+
var _useState9 = useState(0),
|
|
76
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
77
|
+
renderRows = _useState10[0],
|
|
78
|
+
setRenderRows = _useState10[1];
|
|
79
|
+
var _useState11 = useState(""),
|
|
80
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
81
|
+
lastLineText = _useState12[0],
|
|
82
|
+
setLastLineText = _useState12[1];
|
|
83
|
+
var _useState13 = useState(false),
|
|
84
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
85
|
+
calcFinished = _useState14[0],
|
|
86
|
+
setCalcFinished = _useState14[1];
|
|
87
|
+
var renderText = Children.map(children, function (e) {
|
|
88
|
+
return getRenderText(e, emojiStyle);
|
|
89
|
+
});
|
|
90
|
+
var textContent = renderText === null || renderText === void 0 ? void 0 : renderText.filter(function (e) {
|
|
91
|
+
return typeof e === "string";
|
|
92
|
+
}).join("");
|
|
93
|
+
useLayoutEffect(function () {
|
|
94
|
+
if (expanded && actionShow) {
|
|
95
|
+
var _lines;
|
|
96
|
+
setActionText(expandText);
|
|
97
|
+
setRenderRows(rows - 1);
|
|
98
|
+
setLastLineText(((_lines = lines[rows - 1]) === null || _lines === void 0 ? void 0 : _lines.text) + actionText);
|
|
99
|
+
} else {
|
|
100
|
+
setActionText(collapseText);
|
|
101
|
+
setRenderRows(lines.length);
|
|
102
|
+
setLastLineText("");
|
|
103
|
+
}
|
|
104
|
+
}, [expanded, expandText, collapseText, rows, lines]);
|
|
105
|
+
useEffect(function () {
|
|
106
|
+
setCalcFinished(false);
|
|
107
|
+
}, [textContent]);
|
|
108
|
+
var onPress = function onPress() {
|
|
109
|
+
onClick("");
|
|
110
|
+
};
|
|
111
|
+
var onTextLayout = useCallback(function (e) {
|
|
112
|
+
var lines2 = e.nativeEvent.lines;
|
|
113
|
+
lines2.length > rows ? setActionShow(true) : setActionShow(false);
|
|
114
|
+
setLines(lines2);
|
|
115
|
+
setCalcFinished(true);
|
|
116
|
+
setExpanded(true);
|
|
117
|
+
}, [rows]);
|
|
118
|
+
var toggle = function toggle() {
|
|
119
|
+
setExpanded(function (preValue) {
|
|
120
|
+
return !preValue;
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
return /* @__PURE__ */React.createElement(React.Fragment, null, !calcFinished && /* @__PURE__ */React.createElement(CloneContainer, {
|
|
124
|
+
text: textContent,
|
|
125
|
+
textStyle: customStyles.textStyle,
|
|
126
|
+
onTextLayout: onTextLayout
|
|
127
|
+
}), /* @__PURE__ */React.createElement(TouchableOpacity, {
|
|
128
|
+
onPress: onPress
|
|
129
|
+
}, lines.map(function (item, index) {
|
|
130
|
+
if (index < renderRows) {
|
|
131
|
+
return /* @__PURE__ */React.createElement(Text$1, {
|
|
132
|
+
key: index,
|
|
133
|
+
style: customStyles.textStyle
|
|
134
|
+
}, item === null || item === void 0 ? void 0 : item.text);
|
|
135
|
+
}
|
|
136
|
+
}), actionShow && (!expanded && collapsible || expanded) && /* @__PURE__ */React.createElement(View, {
|
|
137
|
+
style: customStyles.lastLineStyle
|
|
138
|
+
}, /* @__PURE__ */React.createElement(View, {
|
|
139
|
+
style: customStyles.lastLineTextWrapperStyle
|
|
140
|
+
}, /* @__PURE__ */React.createElement(Text$1, {
|
|
141
|
+
numberOfLines: 1,
|
|
142
|
+
style: customStyles.textStyle,
|
|
143
|
+
ellipsizeMode: "clip"
|
|
144
|
+
}, lastLineText), expanded && /* @__PURE__ */React.createElement(Text$1, {
|
|
145
|
+
style: [customStyles.textStyle]
|
|
146
|
+
}, "...")), /* @__PURE__ */React.createElement(View, {
|
|
147
|
+
style: customStyles.actionStyle
|
|
148
|
+
}, (expanded && expandable || !expanded && collapsible) && /* @__PURE__ */React.createElement(Text$1, {
|
|
149
|
+
style: customStyles.actionTextStyle,
|
|
150
|
+
onPress: toggle
|
|
151
|
+
}, actionText)))));
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
export { Text as default };
|
|
155
|
+
//# sourceMappingURL=Text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.js","sources":["../../../../src/components/Text/Text.tsx"],"sourcesContent":["import { Text, TouchableOpacity, View, StyleSheet } from \"react-native\";\nimport { Children, useCallback, useEffect, useLayoutEffect, useState } from \"react\";\nimport { getRenderText, CloneContainer } from \"./hooks\";\nimport { RedsTextReal, LineInfo, TextLayoutEvent } from \"./interface\";\nimport createStyles from \"./styles\";\n\nexport default (props: RedsTextReal) => {\n const {\n strikethrough = false,\n underline = false,\n italic = false,\n rows = 1,\n expandable = true,\n expandText = \"展开\",\n collapsible = true,\n collapseText = \"收起\",\n textStyle = {},\n emojiStyle = {\n height: 16,\n width: 16,\n },\n actionStyle = {},\n actionTextStyle = {},\n children,\n onClick = () => {},\n } = props;\n\n // 默认样式\n const styles = createStyles({\n textStyleProps: {\n strikethrough,\n underline,\n italic,\n },\n });\n\n // 定制样式\n const customStyles = StyleSheet.create({\n textStyle: {\n ...styles.textStyleInitial,\n ...textStyle,\n },\n lastLineStyle: {\n ...styles.lastLineStyleInitial,\n },\n lastLineTextWrapperStyle: {\n ...styles.lastLineTextWrapperInitial,\n },\n actionStyle: {\n ...styles.actionStyle,\n ...actionStyle,\n },\n actionTextStyle: {\n ...styles.actionTextStyleInitial,\n ...actionTextStyle,\n },\n });\n\n const [expanded, setExpanded] = useState<boolean>(false);\n\n const [actionText, setActionText] = useState<string>(\"\");\n\n const [actionShow, setActionShow] = useState<boolean>(false);\n\n const [lines, setLines] = useState<LineInfo[]>([]);\n\n const [renderRows, setRenderRows] = useState<number>(0);\n\n const [lastLineText, setLastLineText] = useState<string>(\"\");\n\n const [calcFinished, setCalcFinished] = useState<boolean>(false);\n\n // 子组件文本内容\n const renderText = Children.map(children, (e) => getRenderText(e, emojiStyle));\n\n const textContent = renderText?.filter((e) => typeof e === \"string\").join(\"\");\n\n useLayoutEffect(() => {\n if (expanded && actionShow) {\n setActionText(expandText);\n setRenderRows(rows - 1);\n setLastLineText(lines[rows - 1]?.text + actionText);\n } else {\n setActionText(collapseText);\n setRenderRows(lines.length);\n setLastLineText(\"\");\n }\n }, [expanded, expandText, collapseText, rows, lines]);\n\n // 当内容字体改变,重新计算行数\n useEffect(() => {\n setCalcFinished(false);\n }, [textContent]);\n\n const onPress = () => {\n onClick(\"\");\n };\n\n // 获取文本容器的行数\n const onTextLayout = useCallback(\n (e: TextLayoutEvent) => {\n const {\n nativeEvent: { lines },\n } = e;\n\n lines.length > rows ? setActionShow(true) : setActionShow(false);\n\n setLines(lines);\n // 移除克隆的文本容器\n setCalcFinished(true);\n setExpanded(true);\n },\n [rows],\n );\n\n // 非受控功能内部处理展开收起逻辑\n const toggle = () => {\n setExpanded((preValue) => !preValue);\n };\n\n return (\n <>\n {!calcFinished && (\n <CloneContainer text={textContent} textStyle={customStyles.textStyle} onTextLayout={onTextLayout} />\n )}\n {/* 渲染除最后一行外的前几行 */}\n <TouchableOpacity onPress={onPress}>\n {lines.map((item, index) => {\n if (index < renderRows) {\n return (\n <Text key={index} style={customStyles.textStyle}>\n {item?.text}\n </Text>\n );\n }\n })}\n {/* 渲染最后一行 */}\n {actionShow && ((!expanded && collapsible) || expanded) && (\n <View style={customStyles.lastLineStyle}>\n <View style={customStyles.lastLineTextWrapperStyle}>\n <Text numberOfLines={1} style={customStyles.textStyle} ellipsizeMode={\"clip\"}>\n {lastLineText}\n </Text>\n {expanded && <Text style={[customStyles.textStyle]}>...</Text>}\n </View>\n {/* 渲染展开收起按钮 */}\n <View style={customStyles.actionStyle}>\n {((expanded && expandable) || (!expanded && collapsible)) && (\n <Text style={customStyles.actionTextStyle} onPress={toggle}>\n {actionText}\n </Text>\n )}\n </View>\n </View>\n )}\n </TouchableOpacity>\n </>\n );\n};\n"],"names":["props","_props$strikethrough","strikethrough","_props$underline","underline","_props$italic","italic","_props$rows","rows","_props$expandable","expandable","_props$expandText","expandText","_props$collapsible","collapsible","_props$collapseText","collapseText","_props$textStyle","textStyle","_props$emojiStyle","emojiStyle","height","width","_props$actionStyle","actionStyle","_props$actionTextStyl","actionTextStyle","children","_props$onClick","onClick","styles","createStyles","textStyleProps","customStyles","StyleSheet","create","_objectSpread","textStyleInitial","lastLineStyle","lastLineStyleInitial","lastLineTextWrapperStyle","lastLineTextWrapperInitial","actionTextStyleInitial","_useState","useState","_useState2","_slicedToArray","expanded","setExpanded","_useState3","_useState4","actionText","setActionText","_useState5","_useState6","actionShow","setActionShow","_useState7","_useState8","lines","setLines","_useState9","_useState10","renderRows","setRenderRows","_useState11","_useState12","lastLineText","setLastLineText","_useState13","_useState14","calcFinished","setCalcFinished","renderText","Children","map","e","getRenderText","textContent","filter","join","useLayoutEffect","_lines","text","length","useEffect","onPress","onTextLayout","useCallback","nativeEvent","toggle","preValue","CloneContainer","TouchableOpacity","item","index","React","createElement","Text","key","style","View","numberOfLines","ellipsizeMode"],"mappings":";;;;;;;;;;;;;AAMA,WAAe,CAAA,UAACA,KAAwB,EAAA;AAChC,EAAA,IAAAC,oBAAA,GAkBFD,KAAA,CAjBFE,aAAgB;AAAhBA,IAAAA,aAAgB,GAAAD,oBAAA,KAAA,KAAA,CAAA,GAAA,KAAA,GAAAA,oBAAA;IAAAE,gBAAA,GAiBdH,KAAA,CAhBFI,SAAY;AAAZA,IAAAA,SAAY,GAAAD,gBAAA,KAAA,KAAA,CAAA,GA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AAA,CAAAC,aAAA,CAAAI,IAAA,EAAA;IAAKD,KAAO,EAAAnE,YAAA,CAAaO,wBAAAA;AACxB,GAAA,iBAAAwD,KAAA,CAAAC,aAAA,CAACC,MAAK,EAAA;AAAAI,IAAAA,aAAA,EAAe,CAAG;IAAAF,KAAA,EAAOnE,YAAa,CAAAf,SAAA;AAAWqF,IAAAA,aAAe,EAAA,MAAA;AAAA,GAAA,EACnEpC,YACH,CAAA,EACCpB,QAAY,mBAAAiD,KAAA,CAAAC,aAAA,CAACC,MAAK,EAAA;AAAAE,IAAAA,KAAA,EAAO,CAACnE,YAAA,CAAaf,SAAS,CAAA;GAAA,EAAG,KAAG,CACzD,CAEA,iBAAA8E,KAAA,CAAAC,aAAA,CAACI,IAAK,EAAA;IAAAD,KAAA,EAAOnE,YAAa,CAAAT,WAAAA;AAAA,GAAA,EAAA,CACrBuB,QAAY,IAAArC,UAAA,IAAgB,CAACqC,QAAA,IAAYjC,WAC1C,oBAAAkF,KAAA,CAAAC,aAAA,CAACC,MAAK,EAAA;IAAAE,KAAA,EAAOnE,YAAa,CAAAP,eAAA;AAAiB4D,IAAAA,OAAS,EAAAI,MAAAA;AAAA,GAAA,EACjDvC,UACH,CAEJ,CACF,CAEJ,CACF,CAAA,CAAA;AAEJ,CAAA;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { CloneContainer } from './cloneContainer.js';
|
|
2
2
|
export { getRenderText } from './getRenderText.js';
|
|
3
3
|
export { loadFontFromFile } from './loadFontFromFile.js';
|
|
4
|
-
import '../../../_chunks/
|
|
4
|
+
import '../../../_chunks/GCWGuPmB.js';
|
|
5
5
|
import 'react-native';
|
|
6
6
|
import 'react';
|
|
7
7
|
import './nativeEmojiMap/android.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as _asyncToGenerator, e as _regeneratorRuntime } from '../../../_chunks/GCWGuPmB.js';
|
|
2
2
|
import { NativeModules } from 'react-native';
|
|
3
3
|
|
|
4
4
|
var loadFontFromFile = /*#__PURE__*/function () {
|
|
@@ -1,155 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import Text from './Text.js';
|
|
2
|
+
export { i as TextType } from '../../_chunks/BswK5qRp.js';
|
|
3
|
+
import '../../_chunks/GCWGuPmB.js';
|
|
4
|
+
import 'react-native';
|
|
5
|
+
import 'react';
|
|
6
|
+
import './hooks/cloneContainer.js';
|
|
7
|
+
import './hooks/getRenderText.js';
|
|
7
8
|
import './hooks/nativeEmojiMap/android.js';
|
|
8
9
|
import './hooks/nativeEmojiMap/ios.js';
|
|
10
|
+
import './styles.js';
|
|
9
11
|
import '../ConfigProvider/hooks/ConfigCache/ConfigCache.js';
|
|
10
12
|
import '@xhsreds/reds-token-next';
|
|
11
13
|
import '../ConfigProvider/hooks/themeToken/useThemeToken.js';
|
|
12
14
|
import '../ConfigProvider/hooks/ConfigContext/ConfigContext.js';
|
|
13
15
|
|
|
14
|
-
var index = (function (props) {
|
|
15
|
-
var _props$strikethrough = props.strikethrough,
|
|
16
|
-
strikethrough = _props$strikethrough === void 0 ? false : _props$strikethrough,
|
|
17
|
-
_props$underline = props.underline,
|
|
18
|
-
underline = _props$underline === void 0 ? false : _props$underline,
|
|
19
|
-
_props$italic = props.italic,
|
|
20
|
-
italic = _props$italic === void 0 ? false : _props$italic,
|
|
21
|
-
_props$rows = props.rows,
|
|
22
|
-
rows = _props$rows === void 0 ? 1 : _props$rows,
|
|
23
|
-
_props$expandable = props.expandable,
|
|
24
|
-
expandable = _props$expandable === void 0 ? true : _props$expandable,
|
|
25
|
-
_props$expandText = props.expandText,
|
|
26
|
-
expandText = _props$expandText === void 0 ? "\u5C55\u5F00" : _props$expandText,
|
|
27
|
-
_props$collapsible = props.collapsible,
|
|
28
|
-
collapsible = _props$collapsible === void 0 ? true : _props$collapsible,
|
|
29
|
-
_props$collapseText = props.collapseText,
|
|
30
|
-
collapseText = _props$collapseText === void 0 ? "\u6536\u8D77" : _props$collapseText,
|
|
31
|
-
_props$textStyle = props.textStyle,
|
|
32
|
-
textStyle = _props$textStyle === void 0 ? {} : _props$textStyle,
|
|
33
|
-
_props$emojiStyle = props.emojiStyle,
|
|
34
|
-
emojiStyle = _props$emojiStyle === void 0 ? {
|
|
35
|
-
height: 16,
|
|
36
|
-
width: 16
|
|
37
|
-
} : _props$emojiStyle,
|
|
38
|
-
_props$actionStyle = props.actionStyle,
|
|
39
|
-
actionStyle = _props$actionStyle === void 0 ? {} : _props$actionStyle,
|
|
40
|
-
_props$actionTextStyl = props.actionTextStyle,
|
|
41
|
-
actionTextStyle = _props$actionTextStyl === void 0 ? {} : _props$actionTextStyl,
|
|
42
|
-
children = props.children,
|
|
43
|
-
_props$onClick = props.onClick,
|
|
44
|
-
onClick = _props$onClick === void 0 ? function () {} : _props$onClick;
|
|
45
|
-
var styles = createStyles({
|
|
46
|
-
textStyleProps: {
|
|
47
|
-
strikethrough: strikethrough,
|
|
48
|
-
underline: underline,
|
|
49
|
-
italic: italic
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
var customStyles = StyleSheet.create({
|
|
53
|
-
textStyle: _objectSpread2(_objectSpread2({}, styles.textStyleInitial), textStyle),
|
|
54
|
-
lastLineStyle: _objectSpread2({}, styles.lastLineStyleInitial),
|
|
55
|
-
lastLineTextWrapperStyle: _objectSpread2({}, styles.lastLineTextWrapperInitial),
|
|
56
|
-
actionStyle: _objectSpread2(_objectSpread2({}, styles.actionStyle), actionStyle),
|
|
57
|
-
actionTextStyle: _objectSpread2(_objectSpread2({}, styles.actionTextStyleInitial), actionTextStyle)
|
|
58
|
-
});
|
|
59
|
-
var _useState = useState(false),
|
|
60
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
61
|
-
expanded = _useState2[0],
|
|
62
|
-
setExpanded = _useState2[1];
|
|
63
|
-
var _useState3 = useState(""),
|
|
64
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
65
|
-
actionText = _useState4[0],
|
|
66
|
-
setActionText = _useState4[1];
|
|
67
|
-
var _useState5 = useState(false),
|
|
68
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
69
|
-
actionShow = _useState6[0],
|
|
70
|
-
setActionShow = _useState6[1];
|
|
71
|
-
var _useState7 = useState([]),
|
|
72
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
73
|
-
lines = _useState8[0],
|
|
74
|
-
setLines = _useState8[1];
|
|
75
|
-
var _useState9 = useState(0),
|
|
76
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
77
|
-
renderRows = _useState10[0],
|
|
78
|
-
setRenderRows = _useState10[1];
|
|
79
|
-
var _useState11 = useState(""),
|
|
80
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
81
|
-
lastLineText = _useState12[0],
|
|
82
|
-
setLastLineText = _useState12[1];
|
|
83
|
-
var _useState13 = useState(false),
|
|
84
|
-
_useState14 = _slicedToArray(_useState13, 2),
|
|
85
|
-
calcFinished = _useState14[0],
|
|
86
|
-
setCalcFinished = _useState14[1];
|
|
87
|
-
var renderText = Children.map(children, function (e) {
|
|
88
|
-
return getRenderText(e, emojiStyle);
|
|
89
|
-
});
|
|
90
|
-
var textContent = renderText === null || renderText === void 0 ? void 0 : renderText.filter(function (e) {
|
|
91
|
-
return typeof e === "string";
|
|
92
|
-
}).join("");
|
|
93
|
-
useLayoutEffect(function () {
|
|
94
|
-
if (expanded && actionShow) {
|
|
95
|
-
var _lines;
|
|
96
|
-
setActionText(expandText);
|
|
97
|
-
setRenderRows(rows - 1);
|
|
98
|
-
setLastLineText(((_lines = lines[rows - 1]) === null || _lines === void 0 ? void 0 : _lines.text) + actionText);
|
|
99
|
-
} else {
|
|
100
|
-
setActionText(collapseText);
|
|
101
|
-
setRenderRows(lines.length);
|
|
102
|
-
setLastLineText("");
|
|
103
|
-
}
|
|
104
|
-
}, [expanded, expandText, collapseText, rows, lines]);
|
|
105
|
-
useEffect(function () {
|
|
106
|
-
setCalcFinished(false);
|
|
107
|
-
}, [textContent]);
|
|
108
|
-
var onPress = function onPress() {
|
|
109
|
-
onClick("");
|
|
110
|
-
};
|
|
111
|
-
var onTextLayout = useCallback(function (e) {
|
|
112
|
-
var lines2 = e.nativeEvent.lines;
|
|
113
|
-
lines2.length > rows ? setActionShow(true) : setActionShow(false);
|
|
114
|
-
setLines(lines2);
|
|
115
|
-
setCalcFinished(true);
|
|
116
|
-
setExpanded(true);
|
|
117
|
-
}, [rows]);
|
|
118
|
-
var toggle = function toggle() {
|
|
119
|
-
setExpanded(function (preValue) {
|
|
120
|
-
return !preValue;
|
|
121
|
-
});
|
|
122
|
-
};
|
|
123
|
-
return /* @__PURE__ */React.createElement(React.Fragment, null, !calcFinished && /* @__PURE__ */React.createElement(CloneContainer, {
|
|
124
|
-
text: textContent,
|
|
125
|
-
textStyle: customStyles.textStyle,
|
|
126
|
-
onTextLayout: onTextLayout
|
|
127
|
-
}), /* @__PURE__ */React.createElement(TouchableOpacity, {
|
|
128
|
-
onPress: onPress
|
|
129
|
-
}, lines.map(function (item, index) {
|
|
130
|
-
if (index < renderRows) {
|
|
131
|
-
return /* @__PURE__ */React.createElement(Text, {
|
|
132
|
-
key: index,
|
|
133
|
-
style: customStyles.textStyle
|
|
134
|
-
}, item === null || item === void 0 ? void 0 : item.text);
|
|
135
|
-
}
|
|
136
|
-
}), actionShow && (!expanded && collapsible || expanded) && /* @__PURE__ */React.createElement(View, {
|
|
137
|
-
style: customStyles.lastLineStyle
|
|
138
|
-
}, /* @__PURE__ */React.createElement(View, {
|
|
139
|
-
style: customStyles.lastLineTextWrapperStyle
|
|
140
|
-
}, /* @__PURE__ */React.createElement(Text, {
|
|
141
|
-
numberOfLines: 1,
|
|
142
|
-
style: customStyles.textStyle,
|
|
143
|
-
ellipsizeMode: "clip"
|
|
144
|
-
}, lastLineText), expanded && /* @__PURE__ */React.createElement(Text, {
|
|
145
|
-
style: [customStyles.textStyle]
|
|
146
|
-
}, "...")), /* @__PURE__ */React.createElement(View, {
|
|
147
|
-
style: customStyles.actionStyle
|
|
148
|
-
}, (expanded && expandable || !expanded && collapsible) && /* @__PURE__ */React.createElement(Text, {
|
|
149
|
-
style: customStyles.actionTextStyle,
|
|
150
|
-
onPress: toggle
|
|
151
|
-
}, actionText)))));
|
|
152
|
-
});
|
|
153
16
|
|
|
154
|
-
|
|
17
|
+
|
|
18
|
+
export { Text, Text as default };
|
|
155
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/Text/index.tsx"],"sourcesContent":["import { Text, TouchableOpacity, View, StyleSheet } from \"react-native\";\nimport { Children, useCallback, useEffect, useLayoutEffect, useState } from \"react\";\nimport { getRenderText, CloneContainer } from \"./hooks\";\nimport { RedsTextReal, LineInfo, TextLayoutEvent } from \"./interface\";\nimport createStyles from \"./styles\";\n\nexport default (props: RedsTextReal) => {\n const {\n strikethrough = false,\n underline = false,\n italic = false,\n rows = 1,\n expandable = true,\n expandText = \"展开\",\n collapsible = true,\n collapseText = \"收起\",\n textStyle = {},\n emojiStyle = {\n height: 16,\n width: 16,\n },\n actionStyle = {},\n actionTextStyle = {},\n children,\n onClick = () => {},\n } = props;\n\n // 默认样式\n const styles = createStyles({\n textStyleProps: {\n strikethrough,\n underline,\n italic,\n },\n });\n\n // 定制样式\n const customStyles = StyleSheet.create({\n textStyle: {\n ...styles.textStyleInitial,\n ...textStyle,\n },\n lastLineStyle: {\n ...styles.lastLineStyleInitial,\n },\n lastLineTextWrapperStyle: {\n ...styles.lastLineTextWrapperInitial,\n },\n actionStyle: {\n ...styles.actionStyle,\n ...actionStyle,\n },\n actionTextStyle: {\n ...styles.actionTextStyleInitial,\n ...actionTextStyle,\n },\n });\n\n const [expanded, setExpanded] = useState<boolean>(false);\n\n const [actionText, setActionText] = useState<string>(\"\");\n\n const [actionShow, setActionShow] = useState<boolean>(false);\n\n const [lines, setLines] = useState<LineInfo[]>([]);\n\n const [renderRows, setRenderRows] = useState<number>(0);\n\n const [lastLineText, setLastLineText] = useState<string>(\"\");\n\n const [calcFinished, setCalcFinished] = useState<boolean>(false);\n\n // 子组件文本内容\n const renderText = Children.map(children, (e) => getRenderText(e, emojiStyle));\n\n const textContent = renderText?.filter((e) => typeof e === \"string\").join(\"\");\n\n useLayoutEffect(() => {\n if (expanded && actionShow) {\n setActionText(expandText);\n setRenderRows(rows - 1);\n setLastLineText(lines[rows - 1]?.text + actionText);\n } else {\n setActionText(collapseText);\n setRenderRows(lines.length);\n setLastLineText(\"\");\n }\n }, [expanded, expandText, collapseText, rows, lines]);\n\n // 当内容字体改变,重新计算行数\n useEffect(() => {\n setCalcFinished(false);\n }, [textContent]);\n\n const onPress = () => {\n onClick(\"\");\n };\n\n // 获取文本容器的行数\n const onTextLayout = useCallback(\n (e: TextLayoutEvent) => {\n const {\n nativeEvent: { lines },\n } = e;\n\n lines.length > rows ? setActionShow(true) : setActionShow(false);\n\n setLines(lines);\n // 移除克隆的文本容器\n setCalcFinished(true);\n setExpanded(true);\n },\n [rows],\n );\n\n // 非受控功能内部处理展开收起逻辑\n const toggle = () => {\n setExpanded((preValue) => !preValue);\n };\n\n return (\n <>\n {!calcFinished && (\n <CloneContainer text={textContent} textStyle={customStyles.textStyle} onTextLayout={onTextLayout} />\n )}\n {/* 渲染除最后一行外的前几行 */}\n <TouchableOpacity onPress={onPress}>\n {lines.map((item, index) => {\n if (index < renderRows) {\n return (\n <Text key={index} style={customStyles.textStyle}>\n {item?.text}\n </Text>\n );\n }\n })}\n {/* 渲染最后一行 */}\n {actionShow && ((!expanded && collapsible) || expanded) && (\n <View style={customStyles.lastLineStyle}>\n <View style={customStyles.lastLineTextWrapperStyle}>\n <Text numberOfLines={1} style={customStyles.textStyle} ellipsizeMode={\"clip\"}>\n {lastLineText}\n </Text>\n {expanded && <Text style={[customStyles.textStyle]}>...</Text>}\n </View>\n {/* 渲染展开收起按钮 */}\n <View style={customStyles.actionStyle}>\n {((expanded && expandable) || (!expanded && collapsible)) && (\n <Text style={customStyles.actionTextStyle} onPress={toggle}>\n {actionText}\n </Text>\n )}\n </View>\n </View>\n )}\n </TouchableOpacity>\n </>\n );\n};\n"],"names":["props","_props$strikethrough","strikethrough","_props$underline","underline","_props$italic","italic","_props$rows","rows","_props$expandable","expandable","_props$expandText","expandText","_props$collapsible","collapsible","_props$collapseText","collapseText","_props$textStyle","textStyle","_props$emojiStyle","emojiStyle","height","width","_props$actionStyle","actionStyle","_props$actionTextStyl","actionTextStyle","children","_props$onClick","onClick","styles","createStyles","textStyleProps","customStyles","StyleSheet","create","_objectSpread","textStyleInitial","lastLineStyle","lastLineStyleInitial","lastLineTextWrapperStyle","lastLineTextWrapperInitial","actionTextStyleInitial","_useState","useState","_useState2","_slicedToArray","expanded","setExpanded","_useState3","_useState4","actionText","setActionText","_useState5","_useState6","actionShow","setActionShow","_useState7","_useState8","lines","setLines","_useState9","_useState10","renderRows","setRenderRows","_useState11","_useState12","lastLineText","setLastLineText","_useState13","_useState14","calcFinished","setCalcFinished","renderText","Children","map","e","getRenderText","textContent","filter","join","useLayoutEffect","_lines","text","length","useEffect","onPress","onTextLayout","useCallback","nativeEvent","toggle","preValue","CloneContainer","TouchableOpacity","item","index","React","createElement","Text","key","style","View","numberOfLines","ellipsizeMode"],"mappings":";;;;;;;;;;;;;AAMA,YAAe,CAAA,UAACA,KAAwB,EAAA;AAChC,EAAA,IAAAC,oBAAA,GAkBFD,KAAA,CAjBFE,aAAgB;AAAhBA,IAAAA,aAAgB,GAAAD,oBAAA,KAAA,KAAA,CAAA,GAAA,KAAA,GAAAA,oBAAA;IAAAE,gBAAA,GAiBdH,KAAA,CAhBFI,SAAY;AAAZA,IAAAA,SAAY,GAAAD,gBAAA,KAAA,KAAA,CAAA,GAAA,KAAA,GAAAA,gBAAA;IAAAE,aAAA,GAgBVL,KAAA,CAfFM,MAAS;AAATA,IAAAA,MAAS,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B,GAAA,iBAAAwD,KAAA,CAAAC,aAAA,CAACC,IAAK,EAAA;AAAAI,IAAAA,aAAA,EAAe,CAAG;IAAAF,KAAA,EAAOnE,YAAa,CAAAf,SAAA;AAAWqF,IAAAA,aAAe,EAAA,MAAA;AAAA,GAAA,EACnEpC,YACH,CAAA,EACCpB,QAAY,mBAAAiD,KAAA,CAAAC,aAAA,CAACC,IAAK,EAAA;AAAAE,IAAAA,KAAA,EAAO,CAACnE,YAAA,CAAaf,SAAS,CAAA;GAAA,EAAG,KAAG,CACzD,CAEA,iBAAA8E,KAAA,CAAAC,aAAA,CAACI,IAAK,EAAA;IAAAD,KAAA,EAAOnE,YAAa,CAAAT,WAAAA;AAAA,GAAA,EAAA,CACrBuB,QAAY,IAAArC,UAAA,IAAgB,CAACqC,QAAA,IAAYjC,WAC1C,oBAAAkF,KAAA,CAAAC,aAAA,CAACC,IAAK,EAAA;IAAAE,KAAA,EAAOnE,YAAa,CAAAP,eAAA;AAAiB4D,IAAAA,OAAS,EAAAI,MAAAA;AAAA,GAAA,EACjDvC,UACH,CAEJ,CACF,CAEJ,CACF,CAAA,CAAA;AAEJ,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
|
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
strikethrough: false,
|
|
3
|
-
underline: false,
|
|
4
|
-
italic: false,
|
|
5
|
-
rows: 1,
|
|
6
|
-
expandable: true,
|
|
7
|
-
expandText: "\u5C55\u5F00",
|
|
8
|
-
collapsible: true,
|
|
9
|
-
collapseText: "\u6536\u8D77"
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export { TextDefaultProps };
|
|
1
|
+
export { T as TextDefaultProps } from '../../../_chunks/BswK5qRp.js';
|
|
13
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -3,7 +3,7 @@ import '../ConfigProvider/hooks/ConfigCache/ConfigCache.js';
|
|
|
3
3
|
import 'react';
|
|
4
4
|
import { useThemeColor } from '../ConfigProvider/hooks/themeToken/useThemeToken.js';
|
|
5
5
|
import { typography } from '@xhsreds/reds-token-next';
|
|
6
|
-
import '../../_chunks/
|
|
6
|
+
import '../../_chunks/GCWGuPmB.js';
|
|
7
7
|
import '../ConfigProvider/hooks/ConfigContext/ConfigContext.js';
|
|
8
8
|
|
|
9
9
|
var createStyles = (function (_ref) {
|
package/lib/esm/index.js
CHANGED
|
@@ -1,14 +1,25 @@
|
|
|
1
|
-
export { default as Tag } from './components/Tag/
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
1
|
+
export { default as Tag } from './components/Tag/Tag.js';
|
|
2
|
+
export { i as TagType } from './_chunks/CszwJiJx.js';
|
|
3
|
+
export { default as Image } from './components/Image/Image.js';
|
|
4
|
+
export { i as ImageType } from './_chunks/BITrbAAT.js';
|
|
5
|
+
export { B as Button } from './_chunks/DhfjJNaB.js';
|
|
6
|
+
export { i as ButtonType } from './_chunks/Bw08lvHs.js';
|
|
7
|
+
export { default as Popover } from './components/Popover/Popover.js';
|
|
8
|
+
export { i as PopoverType } from './_chunks/D7oyCwVx.js';
|
|
9
|
+
export { default as Switch } from './components/Switch/Switch.js';
|
|
10
|
+
export { i as SwitchType } from './_chunks/B3zY_xWO.js';
|
|
6
11
|
export { default as ConfigProvider } from './components/ConfigProvider/ConfigProvider.js';
|
|
12
|
+
export { i as ConfigProviderType } from './_chunks/DKABHJAn.js';
|
|
7
13
|
export { useThemeColor } from './components/ConfigProvider/hooks/themeToken/useThemeToken.js';
|
|
8
|
-
export { default as Text } from './components/Text/
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
|
|
14
|
+
export { default as Text } from './components/Text/Text.js';
|
|
15
|
+
export { i as TextType } from './_chunks/BswK5qRp.js';
|
|
16
|
+
export { default as Collapse } from './components/Collapse/Collapse.js';
|
|
17
|
+
export { default as CollapseItem } from './components/Collapse/Item/Item.js';
|
|
18
|
+
export { default as Empty } from './components/Empty/Empty.js';
|
|
19
|
+
export { i as EmptyType } from './_chunks/BfaGqGMC.js';
|
|
20
|
+
export { default as Result } from './components/Result/Result.js';
|
|
21
|
+
export { i as ResultType } from './_chunks/BKS4Pa1R.js';
|
|
22
|
+
import './_chunks/GCWGuPmB.js';
|
|
12
23
|
import 'react';
|
|
13
24
|
import 'react-native';
|
|
14
25
|
import '@xhsreds/reds-token-next';
|
|
@@ -16,12 +27,10 @@ import './components/Image/styles.js';
|
|
|
16
27
|
import './components/Image/hook/index.js';
|
|
17
28
|
import './components/Image/CircularProgress.js';
|
|
18
29
|
import 'react-native-svg';
|
|
19
|
-
import './components/Button/interface/index.js';
|
|
20
30
|
import '@floating-ui/react-native';
|
|
21
31
|
import './components/ConfigProvider/hooks/ConfigCache/ConfigCache.js';
|
|
22
32
|
import './components/Popover/component.js';
|
|
23
33
|
import './components/Popover/hook.js';
|
|
24
|
-
import './components/Switch/interface/index.js';
|
|
25
34
|
import './components/Switch/styles.js';
|
|
26
35
|
import './components/ConfigProvider/hooks/ConfigContext/ConfigContext.js';
|
|
27
36
|
import './components/Text/hooks/cloneContainer.js';
|
|
@@ -29,4 +38,12 @@ import './components/Text/hooks/getRenderText.js';
|
|
|
29
38
|
import './components/Text/hooks/nativeEmojiMap/android.js';
|
|
30
39
|
import './components/Text/hooks/nativeEmojiMap/ios.js';
|
|
31
40
|
import './components/Text/styles.js';
|
|
41
|
+
import './components/Collapse/interface/index.js';
|
|
42
|
+
import './components/Collapse/hooks/useCollapseContext.js';
|
|
43
|
+
import './components/Collapse/Item/interface/index.js';
|
|
44
|
+
import './components/Collapse/Item/styles.js';
|
|
45
|
+
import './components/Empty/styles.js';
|
|
46
|
+
import './components/Empty/hooks/useDefaultIcon.js';
|
|
47
|
+
import './components/Result/styles.js';
|
|
48
|
+
import './components/Result/hooks/useDefaultIcon.js';
|
|
32
49
|
//# sourceMappingURL=index.js.map
|
package/lib/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -12,6 +12,8 @@ export interface RedsButton {
|
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
style?: ViewStyle;
|
|
14
14
|
children?: React.ReactNode;
|
|
15
|
+
iconLeft?: React.ReactNode;
|
|
16
|
+
iconRight?: React.ReactNode;
|
|
15
17
|
onClick?: (value: GestureResponderEvent) => void;
|
|
16
18
|
}
|
|
17
19
|
export declare const ButtonDefaultProps: {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { RedsCollapse } from "./interface/index";
|
|
3
|
+
declare const Collapse: {
|
|
4
|
+
(props: RedsCollapse): React.JSX.Element;
|
|
5
|
+
defaultProps: {
|
|
6
|
+
activeValue?: (string | number)[] | undefined;
|
|
7
|
+
accordion?: boolean | undefined;
|
|
8
|
+
defaultActiveValue?: (string | number)[] | undefined;
|
|
9
|
+
onChange?: ((activeValue: (string | number)[]) => void) | undefined;
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export default Collapse;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
export interface IItem {
|
|
3
|
+
value: string | number;
|
|
4
|
+
title?: string;
|
|
5
|
+
lazyRender?: boolean;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
onClick?: (value: string | number) => void;
|
|
8
|
+
}
|
|
9
|
+
export interface IItemEvent {
|
|
10
|
+
(e: "change", value: string | number): any;
|
|
11
|
+
}
|
|
12
|
+
export declare const ItemDefaultProps: IItem;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const createStyles: () => {
|
|
2
|
+
header: {
|
|
3
|
+
paddingVertical: number;
|
|
4
|
+
paddingHorizontal: number;
|
|
5
|
+
};
|
|
6
|
+
title: {
|
|
7
|
+
color: string;
|
|
8
|
+
fontSize: number;
|
|
9
|
+
fontWeight: "400" | "500" | "600" | "700";
|
|
10
|
+
lineHeight: number;
|
|
11
|
+
};
|
|
12
|
+
content: {
|
|
13
|
+
paddingTop: number;
|
|
14
|
+
paddingBottom: number;
|
|
15
|
+
paddingLeft: number;
|
|
16
|
+
paddingRight: number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default createStyles;
|