@twreporter/react-typescript-components 0.1.0-beta.6 → 0.1.0-beta.8
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/README.md +16 -0
- package/lib/button/constants.d.mts +3 -0
- package/lib/button/constants.d.ts +3 -0
- package/lib/button/constants.js +5 -0
- package/lib/button/constants.mjs +3 -0
- package/lib/button/index.d.mts +130 -23
- package/lib/button/index.d.ts +130 -23
- package/lib/button/index.js +11 -161
- package/lib/button/index.mjs +7 -8
- package/lib/button-CO0UXA6C.js +552 -0
- package/lib/button-CO0UXA6C.js.map +1 -0
- package/lib/button-DL6w1ghn.mjs +519 -0
- package/lib/button-DL6w1ghn.mjs.map +1 -0
- package/lib/chunk-BxBTb9qk.js +39 -0
- package/lib/constants/external-links.d.mts +16 -0
- package/lib/constants/external-links.d.ts +16 -0
- package/lib/constants/external-links.js +3 -0
- package/lib/constants/external-links.mjs +3 -0
- package/lib/constants/internal-links.d.mts +51 -0
- package/lib/constants/internal-links.d.ts +51 -0
- package/lib/constants/internal-links.js +3 -0
- package/lib/constants/internal-links.mjs +3 -0
- package/lib/constants/release-branch.d.mts +3 -0
- package/lib/constants/release-branch.d.ts +3 -0
- package/lib/constants/release-branch.js +3 -0
- package/lib/constants/release-branch.mjs +3 -0
- package/lib/constants/request-origins.d.mts +68 -0
- package/lib/constants/request-origins.d.ts +68 -0
- package/lib/constants/request-origins.js +5 -0
- package/lib/constants/request-origins.mjs +4 -0
- package/lib/constants/theme.d.mts +3 -0
- package/lib/constants/theme.d.ts +3 -0
- package/lib/constants/theme.js +3 -0
- package/lib/constants/theme.mjs +3 -0
- package/lib/constants-BDoTzOZE.d.mts +17 -0
- package/lib/constants-BS3rPbaX.d.ts +17 -0
- package/lib/constants-BWFuBApI.mjs +14 -0
- package/lib/constants-BWFuBApI.mjs.map +1 -0
- package/lib/constants-B_NgWFML.d.ts +24 -0
- package/lib/constants-BmxSMOOn.js +36 -0
- package/lib/constants-BmxSMOOn.js.map +1 -0
- package/lib/constants-BuIUKM2c.js +15 -0
- package/lib/constants-BuIUKM2c.js.map +1 -0
- package/lib/constants-C2moxnps.js +38 -0
- package/lib/constants-C2moxnps.js.map +1 -0
- package/lib/constants-CCfG07Q4.d.mts +24 -0
- package/lib/constants-CMMcn0f-.d.ts +11 -0
- package/lib/constants-CayQNGtk.d.mts +11 -0
- package/lib/constants-CmCfyfPG.mjs +25 -0
- package/lib/constants-CmCfyfPG.mjs.map +1 -0
- package/lib/constants-Cnq4ruq6.d.mts +29 -0
- package/lib/constants-CuT1aTK4.js +43 -0
- package/lib/constants-CuT1aTK4.js.map +1 -0
- package/lib/constants-Cz7n-nLz.mjs +9 -0
- package/lib/constants-Cz7n-nLz.mjs.map +1 -0
- package/lib/constants-DQxcqnYL.d.ts +29 -0
- package/lib/constants-DRxdMM_X.mjs +20 -0
- package/lib/constants-DRxdMM_X.mjs.map +1 -0
- package/lib/constants-K2ObjToq.js +26 -0
- package/lib/constants-K2ObjToq.js.map +1 -0
- package/lib/constants-gCmka4Fp.d.ts +22 -0
- package/lib/constants-oTHAnh6r.mjs +18 -0
- package/lib/constants-oTHAnh6r.mjs.map +1 -0
- package/lib/constants-wDPBqTIv.d.mts +22 -0
- package/lib/customized-link/external-link.d.mts +3 -7
- package/lib/customized-link/external-link.d.ts +3 -7
- package/lib/customized-link/external-link.js +2 -17
- package/lib/customized-link/external-link.mjs +3 -3
- package/lib/customized-link/index.d.mts +10 -8
- package/lib/customized-link/index.d.ts +10 -8
- package/lib/customized-link/index.js +6 -40
- package/lib/customized-link/index.mjs +5 -5
- package/lib/customized-link/internal-link.d.mts +3 -7
- package/lib/customized-link/internal-link.d.ts +3 -7
- package/lib/customized-link/internal-link.js +3 -19
- package/lib/customized-link/internal-link.mjs +6 -3
- package/lib/customized-link/type.d.mts +2 -9
- package/lib/customized-link/type.d.ts +2 -9
- package/lib/customized-link/type.js +0 -4
- package/lib/customized-link/type.mjs +1 -3
- package/lib/customized-link-DNKmWI0u.mjs +12 -0
- package/lib/customized-link-DNKmWI0u.mjs.map +1 -0
- package/lib/customized-link-XNoMkeYw.js +17 -0
- package/lib/customized-link-XNoMkeYw.js.map +1 -0
- package/lib/divider/constants.d.mts +3 -0
- package/lib/divider/constants.d.ts +3 -0
- package/lib/divider/constants.js +3 -0
- package/lib/divider/constants.mjs +3 -0
- package/lib/divider/index.d.mts +15 -0
- package/lib/divider/index.d.ts +15 -0
- package/lib/divider/index.js +6 -0
- package/lib/divider/index.mjs +4 -0
- package/lib/divider-CEIxmAsH.mjs +15 -0
- package/lib/divider-CEIxmAsH.mjs.map +1 -0
- package/lib/divider-Db3AhImD.js +29 -0
- package/lib/divider-Db3AhImD.js.map +1 -0
- package/lib/dropdown-menu/index.d.mts +17 -0
- package/lib/dropdown-menu/index.d.ts +17 -0
- package/lib/dropdown-menu/index.js +13 -0
- package/lib/dropdown-menu/index.mjs +13 -0
- package/lib/dropdown-menu-BWuoUGuB.mjs +135 -0
- package/lib/dropdown-menu-BWuoUGuB.mjs.map +1 -0
- package/lib/dropdown-menu-CC0Yh31s.js +180 -0
- package/lib/dropdown-menu-CC0Yh31s.js.map +1 -0
- package/lib/external-link-2XoC1_oL.d.ts +9 -0
- package/lib/external-link-BMrkjNyi.js +23 -0
- package/lib/external-link-BMrkjNyi.js.map +1 -0
- package/lib/external-link-BykRRwmY.mjs +16 -0
- package/lib/external-link-BykRRwmY.mjs.map +1 -0
- package/lib/external-link-DTOcLL22.d.mts +9 -0
- package/lib/external-links-2b4M_rcA.mjs +17 -0
- package/lib/external-links-2b4M_rcA.mjs.map +1 -0
- package/lib/external-links-SfJjb48j.js +23 -0
- package/lib/external-links-SfJjb48j.js.map +1 -0
- package/lib/hamburger-menu/index.d.mts +7 -0
- package/lib/hamburger-menu/index.d.ts +6 -0
- package/lib/hamburger-menu/index.js +21 -0
- package/lib/hamburger-menu/index.mjs +21 -0
- package/lib/hamburger-menu-BsIaOOoy.js +486 -0
- package/lib/hamburger-menu-BsIaOOoy.js.map +1 -0
- package/lib/hamburger-menu-CI3TOV9q.mjs +471 -0
- package/lib/hamburger-menu-CI3TOV9q.mjs.map +1 -0
- package/lib/header/index.d.mts +26 -0
- package/lib/header/index.d.ts +25 -0
- package/lib/header/index.js +469 -0
- package/lib/header/index.js.map +1 -0
- package/lib/header/index.mjs +463 -0
- package/lib/header/index.mjs.map +1 -0
- package/lib/heading-B_pZSTvs.js +75 -0
- package/lib/heading-B_pZSTvs.js.map +1 -0
- package/lib/heading-DL8WhtCD.mjs +37 -0
- package/lib/heading-DL8WhtCD.mjs.map +1 -0
- package/lib/icons/constants.d.mts +3 -0
- package/lib/icons/constants.d.ts +3 -0
- package/lib/icons/constants.js +5 -0
- package/lib/icons/constants.mjs +3 -0
- package/lib/icons/index.d.mts +40 -0
- package/lib/icons/index.d.ts +40 -0
- package/lib/icons/index.js +12 -0
- package/lib/icons/index.mjs +5 -0
- package/lib/icons-Bs84WbEt.mjs +57 -0
- package/lib/icons-Bs84WbEt.mjs.map +1 -0
- package/lib/icons-bC_xV5mJ.js +107 -0
- package/lib/icons-bC_xV5mJ.js.map +1 -0
- package/lib/index-CgixcmUN.d.mts +5 -0
- package/lib/index-H3peA2d_.d.ts +5 -0
- package/lib/internal-link-BLXTBMRq.js +2278 -0
- package/lib/internal-link-BLXTBMRq.js.map +1 -0
- package/lib/internal-link-DCSEl1jM.d.ts +9 -0
- package/lib/internal-link-NQb751uB.mjs +2299 -0
- package/lib/internal-link-NQb751uB.mjs.map +1 -0
- package/lib/internal-link-R2--P52c.d.mts +9 -0
- package/lib/internal-links-BF-974mA.mjs +52 -0
- package/lib/internal-links-BF-974mA.mjs.map +1 -0
- package/lib/internal-links-CBkMU8cY.js +58 -0
- package/lib/internal-links-CBkMU8cY.js.map +1 -0
- package/lib/logo/constants.d.mts +3 -0
- package/lib/logo/constants.d.ts +3 -0
- package/lib/logo/constants.js +5 -0
- package/lib/logo/constants.mjs +3 -0
- package/lib/logo/index.d.mts +42 -0
- package/lib/logo/index.d.ts +42 -0
- package/lib/logo/index.js +8 -0
- package/lib/logo/index.mjs +5 -0
- package/lib/logo-B35TnPzd.mjs +64 -0
- package/lib/logo-B35TnPzd.mjs.map +1 -0
- package/lib/logo-D5plc5jE.js +83 -0
- package/lib/logo-D5plc5jE.js.map +1 -0
- package/lib/paragraph-BWXQNQtX.mjs +30 -0
- package/lib/paragraph-BWXQNQtX.mjs.map +1 -0
- package/lib/paragraph-CJvb0_cM.js +56 -0
- package/lib/paragraph-CJvb0_cM.js.map +1 -0
- package/lib/release-branch-BLAOXJu1.d.mts +14 -0
- package/lib/release-branch-CRZV4Ivz.js +18 -0
- package/lib/release-branch-CRZV4Ivz.js.map +1 -0
- package/lib/release-branch-CsBbhuYE.d.ts +14 -0
- package/lib/release-branch-DNCD1uH_.mjs +12 -0
- package/lib/release-branch-DNCD1uH_.mjs.map +1 -0
- package/lib/request-origins-BDXulkK9.js +57 -0
- package/lib/request-origins-BDXulkK9.js.map +1 -0
- package/lib/request-origins-CGkNWg8R.mjs +46 -0
- package/lib/request-origins-CGkNWg8R.mjs.map +1 -0
- package/lib/styles.css +989 -3
- package/lib/text/constants.d.mts +3 -0
- package/lib/text/constants.d.ts +3 -0
- package/lib/text/constants.js +4 -0
- package/lib/text/constants.mjs +3 -0
- package/lib/text/heading.d.mts +22 -20
- package/lib/text/heading.d.ts +22 -20
- package/lib/text/heading.js +9 -70
- package/lib/text/heading.mjs +4 -4
- package/lib/text/paragraph.d.mts +18 -16
- package/lib/text/paragraph.d.ts +18 -16
- package/lib/text/paragraph.js +6 -57
- package/lib/text/paragraph.mjs +4 -4
- package/lib/theme-8Q9pR2P5.d.mts +13 -0
- package/lib/theme-BDGfJ8n-.d.ts +13 -0
- package/lib/theme-BG6yZVj-.mjs +11 -0
- package/lib/theme-BG6yZVj-.mjs.map +1 -0
- package/lib/theme-DDBlIbeS.js +17 -0
- package/lib/theme-DDBlIbeS.js.map +1 -0
- package/lib/title-bar/index.d.mts +55 -23
- package/lib/title-bar/index.d.ts +55 -23
- package/lib/title-bar/index.js +132 -358
- package/lib/title-bar/index.js.map +1 -1
- package/lib/title-bar/index.mjs +140 -24
- package/lib/title-bar/index.mjs.map +1 -1
- package/lib/type-C4hJK9H9.d.ts +11 -0
- package/lib/type-nAFiNBfk.d.mts +11 -0
- package/lib/types/index.d.mts +2 -3
- package/lib/types/index.d.ts +2 -3
- package/lib/types/index.js +0 -4
- package/lib/types/index.mjs +1 -3
- package/package.json +11 -6
- package/lib/button/components/text-button/index.d.mts +0 -24
- package/lib/button/components/text-button/index.d.ts +0 -24
- package/lib/button/components/text-button/index.js +0 -156
- package/lib/button/components/text-button/index.js.map +0 -1
- package/lib/button/components/text-button/index.mjs +0 -7
- package/lib/button/components/text-button/index.mjs.map +0 -1
- package/lib/button/constant.d.mts +0 -11
- package/lib/button/constant.d.ts +0 -11
- package/lib/button/constant.js +0 -13
- package/lib/button/constant.js.map +0 -1
- package/lib/button/constant.mjs +0 -3
- package/lib/button/constant.mjs.map +0 -1
- package/lib/button/enum.d.mts +0 -11
- package/lib/button/enum.d.ts +0 -11
- package/lib/button/enum.js +0 -19
- package/lib/button/enum.js.map +0 -1
- package/lib/button/enum.mjs +0 -3
- package/lib/button/enum.mjs.map +0 -1
- package/lib/button/index.js.map +0 -1
- package/lib/button/index.mjs.map +0 -1
- package/lib/button/stories/text-button.stories.d.mts +0 -55
- package/lib/button/stories/text-button.stories.d.ts +0 -55
- package/lib/button/stories/text-button.stories.js +0 -206
- package/lib/button/stories/text-button.stories.js.map +0 -1
- package/lib/button/stories/text-button.stories.mjs +0 -34
- package/lib/button/stories/text-button.stories.mjs.map +0 -1
- package/lib/chunk-6DXA3EX7.mjs +0 -35
- package/lib/chunk-6DXA3EX7.mjs.map +0 -1
- package/lib/chunk-7DK5MO62.mjs +0 -8
- package/lib/chunk-7DK5MO62.mjs.map +0 -1
- package/lib/chunk-CZVB2Y6O.mjs +0 -27
- package/lib/chunk-CZVB2Y6O.mjs.map +0 -1
- package/lib/chunk-GQWO45DN.mjs +0 -32
- package/lib/chunk-GQWO45DN.mjs.map +0 -1
- package/lib/chunk-GRCEZABQ.mjs +0 -38
- package/lib/chunk-GRCEZABQ.mjs.map +0 -1
- package/lib/chunk-HQG6Q2EY.mjs +0 -42
- package/lib/chunk-HQG6Q2EY.mjs.map +0 -1
- package/lib/chunk-JB4TYHDE.mjs +0 -11
- package/lib/chunk-JB4TYHDE.mjs.map +0 -1
- package/lib/chunk-JFT6JILC.mjs +0 -12
- package/lib/chunk-JFT6JILC.mjs.map +0 -1
- package/lib/chunk-JHLT5GDV.mjs +0 -50
- package/lib/chunk-JHLT5GDV.mjs.map +0 -1
- package/lib/chunk-QE5LVT7A.mjs +0 -90
- package/lib/chunk-QE5LVT7A.mjs.map +0 -1
- package/lib/chunk-QOLETTSG.mjs +0 -28
- package/lib/chunk-QOLETTSG.mjs.map +0 -1
- package/lib/chunk-R4F4LGAY.mjs +0 -56
- package/lib/chunk-R4F4LGAY.mjs.map +0 -1
- package/lib/chunk-UM7RNC2Y.mjs +0 -14
- package/lib/chunk-UM7RNC2Y.mjs.map +0 -1
- package/lib/chunk-URJXIWFX.mjs +0 -16
- package/lib/chunk-URJXIWFX.mjs.map +0 -1
- package/lib/chunk-X2UWIBNH.mjs +0 -16
- package/lib/chunk-X2UWIBNH.mjs.map +0 -1
- package/lib/chunk-XO7SDD7W.mjs +0 -17
- package/lib/chunk-XO7SDD7W.mjs.map +0 -1
- package/lib/customized-link/external-link.js.map +0 -1
- package/lib/customized-link/external-link.mjs.map +0 -1
- package/lib/customized-link/index.js.map +0 -1
- package/lib/customized-link/index.mjs.map +0 -1
- package/lib/customized-link/internal-link.js.map +0 -1
- package/lib/customized-link/internal-link.mjs.map +0 -1
- package/lib/customized-link/type.js.map +0 -1
- package/lib/customized-link/type.mjs.map +0 -1
- package/lib/storybook/utils/get-enum-arg.d.mts +0 -19
- package/lib/storybook/utils/get-enum-arg.d.ts +0 -19
- package/lib/storybook/utils/get-enum-arg.js +0 -31
- package/lib/storybook/utils/get-enum-arg.js.map +0 -1
- package/lib/storybook/utils/get-enum-arg.mjs +0 -3
- package/lib/storybook/utils/get-enum-arg.mjs.map +0 -1
- package/lib/styles.css.map +0 -1
- package/lib/styles.d.mts +0 -2
- package/lib/styles.d.ts +0 -2
- package/lib/text/enum/index.d.mts +0 -15
- package/lib/text/enum/index.d.ts +0 -15
- package/lib/text/enum/index.js +0 -17
- package/lib/text/enum/index.js.map +0 -1
- package/lib/text/enum/index.mjs +0 -3
- package/lib/text/enum/index.mjs.map +0 -1
- package/lib/text/heading.js.map +0 -1
- package/lib/text/heading.mjs.map +0 -1
- package/lib/text/paragraph.js.map +0 -1
- package/lib/text/paragraph.mjs.map +0 -1
- package/lib/text/stories/heading.stories.d.mts +0 -35
- package/lib/text/stories/heading.stories.d.ts +0 -35
- package/lib/text/stories/heading.stories.js +0 -131
- package/lib/text/stories/heading.stories.js.map +0 -1
- package/lib/text/stories/heading.stories.mjs +0 -50
- package/lib/text/stories/heading.stories.mjs.map +0 -1
- package/lib/text/stories/paragraph.stories.d.mts +0 -33
- package/lib/text/stories/paragraph.stories.d.ts +0 -33
- package/lib/text/stories/paragraph.stories.js +0 -108
- package/lib/text/stories/paragraph.stories.js.map +0 -1
- package/lib/text/stories/paragraph.stories.mjs +0 -40
- package/lib/text/stories/paragraph.stories.mjs.map +0 -1
- package/lib/title-bar/components/title-tab/hook.d.mts +0 -5
- package/lib/title-bar/components/title-tab/hook.d.ts +0 -5
- package/lib/title-bar/components/title-tab/hook.js +0 -34
- package/lib/title-bar/components/title-tab/hook.js.map +0 -1
- package/lib/title-bar/components/title-tab/hook.mjs +0 -3
- package/lib/title-bar/components/title-tab/hook.mjs.map +0 -1
- package/lib/title-bar/components/title-tab/index.d.mts +0 -11
- package/lib/title-bar/components/title-tab/index.d.ts +0 -11
- package/lib/title-bar/components/title-tab/index.js +0 -321
- package/lib/title-bar/components/title-tab/index.js.map +0 -1
- package/lib/title-bar/components/title-tab/index.mjs +0 -15
- package/lib/title-bar/components/title-tab/index.mjs.map +0 -1
- package/lib/title-bar/components/title-tab/tab-item.d.mts +0 -10
- package/lib/title-bar/components/title-tab/tab-item.d.ts +0 -10
- package/lib/title-bar/components/title-tab/tab-item.js +0 -204
- package/lib/title-bar/components/title-tab/tab-item.js.map +0 -1
- package/lib/title-bar/components/title-tab/tab-item.mjs +0 -12
- package/lib/title-bar/components/title-tab/tab-item.mjs.map +0 -1
- package/lib/title-bar/components/title-tab/type.d.mts +0 -8
- package/lib/title-bar/components/title-tab/type.d.ts +0 -8
- package/lib/title-bar/components/title-tab/type.js +0 -4
- package/lib/title-bar/components/title-tab/type.js.map +0 -1
- package/lib/title-bar/components/title-tab/type.mjs +0 -3
- package/lib/title-bar/components/title-tab/type.mjs.map +0 -1
- package/lib/title-bar/components/title1.d.mts +0 -10
- package/lib/title-bar/components/title1.d.ts +0 -10
- package/lib/title-bar/components/title1.js +0 -123
- package/lib/title-bar/components/title1.js.map +0 -1
- package/lib/title-bar/components/title1.mjs +0 -6
- package/lib/title-bar/components/title1.mjs.map +0 -1
- package/lib/title-bar/components/title2.d.mts +0 -11
- package/lib/title-bar/components/title2.d.ts +0 -11
- package/lib/title-bar/components/title2.js +0 -131
- package/lib/title-bar/components/title2.js.map +0 -1
- package/lib/title-bar/components/title2.mjs +0 -6
- package/lib/title-bar/components/title2.mjs.map +0 -1
- package/lib/title-bar/stories/title-tab.stories.d.mts +0 -17
- package/lib/title-bar/stories/title-tab.stories.d.ts +0 -17
- package/lib/title-bar/stories/title-tab.stories.js +0 -345
- package/lib/title-bar/stories/title-tab.stories.js.map +0 -1
- package/lib/title-bar/stories/title-tab.stories.mjs +0 -38
- package/lib/title-bar/stories/title-tab.stories.mjs.map +0 -1
- package/lib/title-bar/stories/title1.stories.d.mts +0 -18
- package/lib/title-bar/stories/title1.stories.d.ts +0 -18
- package/lib/title-bar/stories/title1.stories.js +0 -155
- package/lib/title-bar/stories/title1.stories.js.map +0 -1
- package/lib/title-bar/stories/title1.stories.mjs +0 -35
- package/lib/title-bar/stories/title1.stories.mjs.map +0 -1
- package/lib/title-bar/stories/title2.stories.d.mts +0 -18
- package/lib/title-bar/stories/title2.stories.d.ts +0 -18
- package/lib/title-bar/stories/title2.stories.js +0 -258
- package/lib/title-bar/stories/title2.stories.js.map +0 -1
- package/lib/title-bar/stories/title2.stories.mjs +0 -37
- package/lib/title-bar/stories/title2.stories.mjs.map +0 -1
- package/lib/types/index.js.map +0 -1
- package/lib/types/index.mjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"type.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"type.mjs"}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var clsx3 = require('clsx');
|
|
4
|
-
var React = require('react');
|
|
5
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
|
|
7
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
|
-
|
|
9
|
-
var clsx3__default = /*#__PURE__*/_interopDefault(clsx3);
|
|
10
|
-
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
11
|
-
|
|
12
|
-
// src/title-bar/components/title1.tsx
|
|
13
|
-
|
|
14
|
-
// src/text/enum/index.ts
|
|
15
|
-
var TYPE = {
|
|
16
|
-
default: "default",
|
|
17
|
-
article: "article"
|
|
18
|
-
};
|
|
19
|
-
var WEIGHT = {
|
|
20
|
-
extraLight: "extra-light",
|
|
21
|
-
normal: "normal",
|
|
22
|
-
bold: "bold"
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
// src/text/heading.tsx
|
|
26
|
-
var baseClass = "font-bold";
|
|
27
|
-
var variantClass = {
|
|
28
|
-
H1: "text-[28px] leading-[125%] tablet:text-[36px]",
|
|
29
|
-
H2: "text-[24px] leading-[125%] tablet:text-[32px]",
|
|
30
|
-
H3: "text-[22px] leading-[150%] tablet:text-[28px]",
|
|
31
|
-
H4: "text-[18px] leading-[150%] tablet:text-[22px]",
|
|
32
|
-
H5: "text-[17px] leading-[150%] tablet:text-[18px]",
|
|
33
|
-
H6: "text-[16px] leading-[150%] tablet:text-[16px]"
|
|
34
|
-
};
|
|
35
|
-
var HeadingVariant = (variant) => {
|
|
36
|
-
const Component = ({
|
|
37
|
-
text = "",
|
|
38
|
-
type = TYPE.default,
|
|
39
|
-
className = "",
|
|
40
|
-
...props
|
|
41
|
-
}) => {
|
|
42
|
-
const htmlTag = variant.toLowerCase();
|
|
43
|
-
const fontFamily = type === TYPE.article ? "font-title" : "font-default";
|
|
44
|
-
return React__default.default.createElement(
|
|
45
|
-
htmlTag,
|
|
46
|
-
{
|
|
47
|
-
className: clsx3__default.default(
|
|
48
|
-
fontFamily,
|
|
49
|
-
baseClass,
|
|
50
|
-
variantClass[variant],
|
|
51
|
-
className
|
|
52
|
-
),
|
|
53
|
-
...props
|
|
54
|
-
},
|
|
55
|
-
text
|
|
56
|
-
);
|
|
57
|
-
};
|
|
58
|
-
Component.displayName = variant;
|
|
59
|
-
Component.Type = TYPE;
|
|
60
|
-
return Component;
|
|
61
|
-
};
|
|
62
|
-
HeadingVariant("H1");
|
|
63
|
-
var H2 = HeadingVariant("H2");
|
|
64
|
-
HeadingVariant("H3");
|
|
65
|
-
HeadingVariant("H4");
|
|
66
|
-
HeadingVariant("H5");
|
|
67
|
-
HeadingVariant("H6");
|
|
68
|
-
var baseClass2 = "font-default leading-[150%] flex items-center m-0";
|
|
69
|
-
var variantClass2 = {
|
|
70
|
-
P1: "text-[16px]",
|
|
71
|
-
P2: "text-[14px]",
|
|
72
|
-
P3: "text-[12px]",
|
|
73
|
-
P4: "text-[10px]"
|
|
74
|
-
};
|
|
75
|
-
var ParagraphVariant = (variant) => {
|
|
76
|
-
const Component = ({
|
|
77
|
-
text = "",
|
|
78
|
-
weight = WEIGHT.normal,
|
|
79
|
-
className = "",
|
|
80
|
-
...props
|
|
81
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
82
|
-
"p",
|
|
83
|
-
{
|
|
84
|
-
className: clsx3__default.default(
|
|
85
|
-
baseClass2,
|
|
86
|
-
variantClass2[variant],
|
|
87
|
-
`font-${weight}`,
|
|
88
|
-
className
|
|
89
|
-
),
|
|
90
|
-
...props,
|
|
91
|
-
children: text
|
|
92
|
-
}
|
|
93
|
-
);
|
|
94
|
-
Component.displayName = variant;
|
|
95
|
-
Component.Weight = WEIGHT;
|
|
96
|
-
return Component;
|
|
97
|
-
};
|
|
98
|
-
var P1 = ParagraphVariant("P1");
|
|
99
|
-
ParagraphVariant("P2");
|
|
100
|
-
ParagraphVariant("P3");
|
|
101
|
-
ParagraphVariant("P4");
|
|
102
|
-
var Title1 = ({ title, subtitle = "", className = "" }) => {
|
|
103
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx3__default.default("flex justify-between flex-col", className), children: [
|
|
104
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx3__default.default("flex items-baseline gap-[16px]"), children: [
|
|
105
|
-
/* @__PURE__ */ jsxRuntime.jsx(H2, { className: "text-gray-800", text: title }),
|
|
106
|
-
subtitle ? /* @__PURE__ */ jsxRuntime.jsx(P1, { className: "text-gray-600", text: subtitle }) : null
|
|
107
|
-
] }),
|
|
108
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
109
|
-
"div",
|
|
110
|
-
{
|
|
111
|
-
className: clsx3__default.default(
|
|
112
|
-
"w-full h-[1px] bg-gray-800 mt-[8px]",
|
|
113
|
-
"desktop:mt-[16px]"
|
|
114
|
-
)
|
|
115
|
-
}
|
|
116
|
-
)
|
|
117
|
-
] });
|
|
118
|
-
};
|
|
119
|
-
var title1_default = Title1;
|
|
120
|
-
|
|
121
|
-
module.exports = title1_default;
|
|
122
|
-
//# sourceMappingURL=title1.js.map
|
|
123
|
-
//# sourceMappingURL=title1.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/text/enum/index.ts","../../../src/text/heading.tsx","../../../src/text/paragraph.tsx","../../../src/title-bar/components/title1.tsx"],"names":["React","clsx","baseClass","variantClass","jsx","jsxs"],"mappings":";;;;;;;;;;;;;;AAEO,IAAM,IAAA,GAAO;AAAA,EAClB,OAAA,EAAS,SAAA;AAAA,EACT,OAAA,EAAS;AACX,CAAA;AAIO,IAAM,MAAA,GAAS;AAAA,EACpB,UAAA,EAAY,aAAA;AAAA,EACZ,MAAA,EAAQ,QAAA;AAAA,EACR,IAAA,EAAM;AACR,CAAA;;;ACHA,IAAM,SAAA,GAAY,WAAA;AAElB,IAAM,YAAA,GAAe;AAAA,EACnB,EAAA,EAAI,+CAAA;AAAA,EACJ,EAAA,EAAI,+CAAA;AAAA,EACJ,EAAA,EAAI,+CAAA;AAAA,EACJ,EAAA,EAAI,+CAAA;AAAA,EACJ,EAAA,EAAI,+CAAA;AAAA,EACJ,EAAA,EAAI;AACN,CAAA;AAEA,IAAM,cAAA,GAAiB,CAAC,OAAA,KAAuC;AAC7D,EAAA,MAAM,YAA4D,CAAC;AAAA,IACjE,IAAA,GAAO,EAAA;AAAA,IACP,OAAO,IAAA,CAAK,OAAA;AAAA,IACZ,SAAA,GAAY,EAAA;AAAA,IACZ,GAAG;AAAA,GACL,KAAM;AACJ,IAAA,MAAM,OAAA,GAAU,QAAQ,WAAA,EAAY;AACpC,IAAA,MAAM,UAAA,GAAa,IAAA,KAAS,IAAA,CAAK,OAAA,GAAU,YAAA,GAAe,cAAA;AAC1D,IAAA,OAAOA,sBAAA,CAAM,aAAA;AAAA,MACX,OAAA;AAAA,MACA;AAAA,QACE,SAAA,EAAWC,sBAAA;AAAA,UACT,UAAA;AAAA,UACA,SAAA;AAAA,UACA,aAAa,OAAO,CAAA;AAAA,UACpB;AAAA,SACF;AAAA,QACA,GAAG;AAAA,OACL;AAAA,MACA;AAAA,KACF;AAAA,EAC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,KAAA,EAAA,EAAI,SAAA,EAAWF,sBAAAA,CAAK,+BAAA,EAAiC,SAAS,CAAA,EAC7D,QAAA,EAAA;AAAA,oBAAAI,eAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAWJ,sBAAAA,CAAK,gCAAgC,CAAA,EACnD,QAAA,EAAA;AAAA,sBAAAG,cAAAA,CAAC,EAAA,EAAA,EAAG,SAAA,EAAU,eAAA,EAAgB,MAAM,KAAA,EAAO,CAAA;AAAA,MAC1C,QAAA,mBAAWA,cAAAA,CAAC,EAAA,EAAA,EAAG,WAAU,eAAA,EAAgB,IAAA,EAAM,UAAU,CAAA,GAAK;AAAA,KAAA,EACjE,CAAA;AAAA,oBACAA,cAAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAWH,sBAAAA;AAAA,UACT,qCAAA;AAAA,UACA;AAAA;AACF;AAAA;AACF,GAAA,EACF,CAAA;AAEJ,CAAA;AAEA,IAAO,cAAA,GAAQ","file":"title1.js","sourcesContent":["import type { ValuesOf } from '../../types'\n\nexport const TYPE = {\n default: 'default',\n article: 'article',\n} as const\n\nexport type Type = ValuesOf<typeof TYPE>\n\nexport const WEIGHT = {\n extraLight: 'extra-light',\n normal: 'normal',\n bold: 'bold',\n} as const\n\nexport type Weight = ValuesOf<typeof WEIGHT>\n","import clsx from 'clsx'\nimport React from 'react'\nimport { TYPE, type Type } from './enum'\n\ntype HeadingProps = React.HTMLAttributes<HTMLHeadingElement> & {\n text?: string\n type?: Type\n className?: string\n}\n\nconst baseClass = 'font-bold'\n\nconst variantClass = {\n H1: 'text-[28px] leading-[125%] tablet:text-[36px]',\n H2: 'text-[24px] leading-[125%] tablet:text-[32px]',\n H3: 'text-[22px] leading-[150%] tablet:text-[28px]',\n H4: 'text-[18px] leading-[150%] tablet:text-[22px]',\n H5: 'text-[17px] leading-[150%] tablet:text-[18px]',\n H6: 'text-[16px] leading-[150%] tablet:text-[16px]',\n}\n\nconst HeadingVariant = (variant: keyof typeof variantClass) => {\n const Component: React.FC<HeadingProps> & { Type: typeof TYPE } = ({\n text = '',\n type = TYPE.default,\n className = '',\n ...props\n }) => {\n const htmlTag = variant.toLowerCase() // 產生 'h1', 'h2', ...\n const fontFamily = type === TYPE.article ? 'font-title' : 'font-default'\n return React.createElement(\n htmlTag,\n {\n className: clsx(\n fontFamily,\n baseClass,\n variantClass[variant],\n className\n ),\n ...props,\n },\n text\n )\n }\n Component.displayName = variant\n Component.Type = TYPE\n return Component\n}\n\nconst H1 = HeadingVariant('H1')\nconst H2 = HeadingVariant('H2')\nconst H3 = HeadingVariant('H3')\nconst H4 = HeadingVariant('H4')\nconst H5 = HeadingVariant('H5')\nconst H6 = HeadingVariant('H6')\n\nexport { H1, H2, H3, H4, H5, H6 }\n","import clsx from 'clsx'\nimport type React from 'react'\nimport { WEIGHT, type Weight } from './enum'\n\ntype ParagraphProps = React.HTMLAttributes<HTMLParagraphElement> & {\n text?: string\n weight?: Weight\n className?: string\n}\n\nconst baseClass = 'font-default leading-[150%] flex items-center m-0'\n\nconst variantClass = {\n P1: 'text-[16px]',\n P2: 'text-[14px]',\n P3: 'text-[12px]',\n P4: 'text-[10px]',\n}\n\nconst ParagraphVariant = (variant: keyof typeof variantClass) => {\n const Component: React.FC<ParagraphProps> & { Weight: typeof WEIGHT } = ({\n text = '',\n weight = WEIGHT.normal,\n className = '',\n ...props\n }) => (\n <p\n className={clsx(\n baseClass,\n variantClass[variant],\n `font-${weight}`,\n className\n )}\n {...props}\n >\n {text}\n </p>\n )\n Component.displayName = variant\n Component.Weight = WEIGHT\n return Component\n}\n\nconst P1 = ParagraphVariant('P1')\nconst P2 = ParagraphVariant('P2')\nconst P3 = ParagraphVariant('P3')\nconst P4 = ParagraphVariant('P4')\n\nexport { P1, P2, P3, P4 }\n","import clsx from 'clsx'\nimport type { FC } from 'react'\n// components\nimport { H2 } from '../../text/heading'\nimport { P1 } from '../../text/paragraph'\n\ntype Title1Props = {\n title: string\n subtitle?: string\n className?: string\n}\n\nconst Title1: FC<Title1Props> = ({ title, subtitle = '', className = '' }) => {\n return (\n <div className={clsx('flex justify-between flex-col', className)}>\n <div className={clsx('flex items-baseline gap-[16px]')}>\n <H2 className=\"text-gray-800\" text={title} />\n {subtitle ? <P1 className=\"text-gray-600\" text={subtitle} /> : null}\n </div>\n <div\n className={clsx(\n 'w-full h-[1px] bg-gray-800 mt-[8px]',\n 'desktop:mt-[16px]'\n )}\n />\n </div>\n )\n}\n\nexport default Title1\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"title1.mjs"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import react__default from 'react';
|
|
2
|
-
|
|
3
|
-
type Title2Props = {
|
|
4
|
-
title: string;
|
|
5
|
-
subtitle?: string;
|
|
6
|
-
renderButton?: react__default.ReactNode;
|
|
7
|
-
className?: string;
|
|
8
|
-
};
|
|
9
|
-
declare const Title2: react__default.FC<Title2Props>;
|
|
10
|
-
|
|
11
|
-
export { Title2 as default };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import react__default from 'react';
|
|
2
|
-
|
|
3
|
-
type Title2Props = {
|
|
4
|
-
title: string;
|
|
5
|
-
subtitle?: string;
|
|
6
|
-
renderButton?: react__default.ReactNode;
|
|
7
|
-
className?: string;
|
|
8
|
-
};
|
|
9
|
-
declare const Title2: react__default.FC<Title2Props>;
|
|
10
|
-
|
|
11
|
-
export { Title2 as default };
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var clsx3 = require('clsx');
|
|
4
|
-
var React = require('react');
|
|
5
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
|
|
7
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
|
-
|
|
9
|
-
var clsx3__default = /*#__PURE__*/_interopDefault(clsx3);
|
|
10
|
-
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
11
|
-
|
|
12
|
-
// src/title-bar/components/title2.tsx
|
|
13
|
-
|
|
14
|
-
// src/text/enum/index.ts
|
|
15
|
-
var TYPE = {
|
|
16
|
-
default: "default",
|
|
17
|
-
article: "article"
|
|
18
|
-
};
|
|
19
|
-
var WEIGHT = {
|
|
20
|
-
extraLight: "extra-light",
|
|
21
|
-
normal: "normal",
|
|
22
|
-
bold: "bold"
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
// src/text/heading.tsx
|
|
26
|
-
var baseClass = "font-bold";
|
|
27
|
-
var variantClass = {
|
|
28
|
-
H1: "text-[28px] leading-[125%] tablet:text-[36px]",
|
|
29
|
-
H2: "text-[24px] leading-[125%] tablet:text-[32px]",
|
|
30
|
-
H3: "text-[22px] leading-[150%] tablet:text-[28px]",
|
|
31
|
-
H4: "text-[18px] leading-[150%] tablet:text-[22px]",
|
|
32
|
-
H5: "text-[17px] leading-[150%] tablet:text-[18px]",
|
|
33
|
-
H6: "text-[16px] leading-[150%] tablet:text-[16px]"
|
|
34
|
-
};
|
|
35
|
-
var HeadingVariant = (variant) => {
|
|
36
|
-
const Component = ({
|
|
37
|
-
text = "",
|
|
38
|
-
type = TYPE.default,
|
|
39
|
-
className = "",
|
|
40
|
-
...props
|
|
41
|
-
}) => {
|
|
42
|
-
const htmlTag = variant.toLowerCase();
|
|
43
|
-
const fontFamily = type === TYPE.article ? "font-title" : "font-default";
|
|
44
|
-
return React__default.default.createElement(
|
|
45
|
-
htmlTag,
|
|
46
|
-
{
|
|
47
|
-
className: clsx3__default.default(
|
|
48
|
-
fontFamily,
|
|
49
|
-
baseClass,
|
|
50
|
-
variantClass[variant],
|
|
51
|
-
className
|
|
52
|
-
),
|
|
53
|
-
...props
|
|
54
|
-
},
|
|
55
|
-
text
|
|
56
|
-
);
|
|
57
|
-
};
|
|
58
|
-
Component.displayName = variant;
|
|
59
|
-
Component.Type = TYPE;
|
|
60
|
-
return Component;
|
|
61
|
-
};
|
|
62
|
-
HeadingVariant("H1");
|
|
63
|
-
HeadingVariant("H2");
|
|
64
|
-
HeadingVariant("H3");
|
|
65
|
-
HeadingVariant("H4");
|
|
66
|
-
var H5 = HeadingVariant("H5");
|
|
67
|
-
HeadingVariant("H6");
|
|
68
|
-
var baseClass2 = "font-default leading-[150%] flex items-center m-0";
|
|
69
|
-
var variantClass2 = {
|
|
70
|
-
P1: "text-[16px]",
|
|
71
|
-
P2: "text-[14px]",
|
|
72
|
-
P3: "text-[12px]",
|
|
73
|
-
P4: "text-[10px]"
|
|
74
|
-
};
|
|
75
|
-
var ParagraphVariant = (variant) => {
|
|
76
|
-
const Component = ({
|
|
77
|
-
text = "",
|
|
78
|
-
weight = WEIGHT.normal,
|
|
79
|
-
className = "",
|
|
80
|
-
...props
|
|
81
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
82
|
-
"p",
|
|
83
|
-
{
|
|
84
|
-
className: clsx3__default.default(
|
|
85
|
-
baseClass2,
|
|
86
|
-
variantClass2[variant],
|
|
87
|
-
`font-${weight}`,
|
|
88
|
-
className
|
|
89
|
-
),
|
|
90
|
-
...props,
|
|
91
|
-
children: text
|
|
92
|
-
}
|
|
93
|
-
);
|
|
94
|
-
Component.displayName = variant;
|
|
95
|
-
Component.Weight = WEIGHT;
|
|
96
|
-
return Component;
|
|
97
|
-
};
|
|
98
|
-
ParagraphVariant("P1");
|
|
99
|
-
var P2 = ParagraphVariant("P2");
|
|
100
|
-
ParagraphVariant("P3");
|
|
101
|
-
ParagraphVariant("P4");
|
|
102
|
-
var Title2 = ({
|
|
103
|
-
title,
|
|
104
|
-
subtitle = "",
|
|
105
|
-
renderButton = null,
|
|
106
|
-
className = ""
|
|
107
|
-
}) => {
|
|
108
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx3__default.default("flex justify-between flex-col", className), children: [
|
|
109
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row justify-between", children: [
|
|
110
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx3__default.default("flex items-baseline gap-[16px]"), children: [
|
|
111
|
-
/* @__PURE__ */ jsxRuntime.jsx(H5, { className: "text-gray-800", text: title }),
|
|
112
|
-
subtitle ? /* @__PURE__ */ jsxRuntime.jsx(P2, { className: "text-gray-600", text: subtitle }) : null
|
|
113
|
-
] }),
|
|
114
|
-
renderButton || null
|
|
115
|
-
] }),
|
|
116
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
117
|
-
"div",
|
|
118
|
-
{
|
|
119
|
-
className: clsx3__default.default(
|
|
120
|
-
"w-full h-[1px] bg-gray-800 mt-[8px]",
|
|
121
|
-
"desktop:mt-[16px]"
|
|
122
|
-
)
|
|
123
|
-
}
|
|
124
|
-
)
|
|
125
|
-
] });
|
|
126
|
-
};
|
|
127
|
-
var title2_default = Title2;
|
|
128
|
-
|
|
129
|
-
module.exports = title2_default;
|
|
130
|
-
//# sourceMappingURL=title2.js.map
|
|
131
|
-
//# sourceMappingURL=title2.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/text/enum/index.ts","../../../src/text/heading.tsx","../../../src/text/paragraph.tsx","../../../src/title-bar/components/title2.tsx"],"names":["React","clsx","baseClass","variantClass","jsx","jsxs"],"mappings":";;;;;;;;;;;;;;AAEO,IAAM,IAAA,GAAO;AAAA,EAClB,OAAA,EAAS,SAAA;AAAA,EACT,OAAA,EAAS;AACX,CAAA;AAIO,IAAM,MAAA,GAAS;AAAA,EACpB,UAAA,EAAY,aAAA;AAAA,EACZ,MAAA,EAAQ,QAAA;AAAA,EACR,IAAA,EAAM;AACR,CAAA;;;ACHA,IAAM,SAAA,GAAY,WAAA;AAElB,IAAM,YAAA,GAAe;AAAA,EACnB,EAAA,EAAI,+CAAA;AAAA,EACJ,EAAA,EAAI,+CAAA;AAAA,EACJ,EAAA,EAAI,+CAAA;AAAA,EACJ,EAAA,EAAI,+CAAA;AAAA,EACJ,EAAA,EAAI,+CAAA;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AA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAWH,sBAAAA;AAAA,UACT,qCAAA;AAAA,UACA;AAAA;AACF;AAAA;AACF,GAAA,EACF,CAAA;AAEJ,CAAA;AAEA,IAAO,cAAA,GAAQ","file":"title2.js","sourcesContent":["import type { ValuesOf } from '../../types'\n\nexport const TYPE = {\n default: 'default',\n article: 'article',\n} as const\n\nexport type Type = ValuesOf<typeof TYPE>\n\nexport const WEIGHT = {\n extraLight: 'extra-light',\n normal: 'normal',\n bold: 'bold',\n} as const\n\nexport type Weight = ValuesOf<typeof WEIGHT>\n","import clsx from 'clsx'\nimport React from 'react'\nimport { TYPE, type Type } from './enum'\n\ntype HeadingProps = React.HTMLAttributes<HTMLHeadingElement> & {\n text?: string\n type?: Type\n className?: string\n}\n\nconst baseClass = 'font-bold'\n\nconst variantClass = {\n H1: 'text-[28px] leading-[125%] tablet:text-[36px]',\n H2: 'text-[24px] leading-[125%] tablet:text-[32px]',\n H3: 'text-[22px] leading-[150%] tablet:text-[28px]',\n H4: 'text-[18px] leading-[150%] tablet:text-[22px]',\n H5: 'text-[17px] leading-[150%] tablet:text-[18px]',\n H6: 'text-[16px] leading-[150%] tablet:text-[16px]',\n}\n\nconst HeadingVariant = (variant: keyof typeof variantClass) => {\n const Component: React.FC<HeadingProps> & { Type: typeof TYPE } = ({\n text = '',\n type = TYPE.default,\n className = '',\n ...props\n }) => {\n const htmlTag = variant.toLowerCase() // 產生 'h1', 'h2', ...\n const fontFamily = type === TYPE.article ? 'font-title' : 'font-default'\n return React.createElement(\n htmlTag,\n {\n className: clsx(\n fontFamily,\n baseClass,\n variantClass[variant],\n className\n ),\n ...props,\n },\n text\n )\n }\n Component.displayName = variant\n Component.Type = TYPE\n return Component\n}\n\nconst H1 = HeadingVariant('H1')\nconst H2 = HeadingVariant('H2')\nconst H3 = HeadingVariant('H3')\nconst H4 = HeadingVariant('H4')\nconst H5 = HeadingVariant('H5')\nconst H6 = HeadingVariant('H6')\n\nexport { H1, H2, H3, H4, H5, H6 }\n","import clsx from 'clsx'\nimport type React from 'react'\nimport { WEIGHT, type Weight } from './enum'\n\ntype ParagraphProps = React.HTMLAttributes<HTMLParagraphElement> & {\n text?: string\n weight?: Weight\n className?: string\n}\n\nconst baseClass = 'font-default leading-[150%] flex items-center m-0'\n\nconst variantClass = {\n P1: 'text-[16px]',\n P2: 'text-[14px]',\n P3: 'text-[12px]',\n P4: 'text-[10px]',\n}\n\nconst ParagraphVariant = (variant: keyof typeof variantClass) => {\n const Component: React.FC<ParagraphProps> & { Weight: typeof WEIGHT } = ({\n text = '',\n weight = WEIGHT.normal,\n className = '',\n ...props\n }) => (\n <p\n className={clsx(\n baseClass,\n variantClass[variant],\n `font-${weight}`,\n className\n )}\n {...props}\n >\n {text}\n </p>\n )\n Component.displayName = variant\n Component.Weight = WEIGHT\n return Component\n}\n\nconst P1 = ParagraphVariant('P1')\nconst P2 = ParagraphVariant('P2')\nconst P3 = ParagraphVariant('P3')\nconst P4 = ParagraphVariant('P4')\n\nexport { P1, P2, P3, P4 }\n","import clsx from 'clsx'\nimport type React from 'react'\n// components\nimport { H5 } from '../../text/heading'\nimport { P2 } from '../../text/paragraph'\n\ntype Title2Props = {\n title: string\n subtitle?: string\n renderButton?: React.ReactNode\n className?: string\n}\n\nconst Title2: React.FC<Title2Props> = ({\n title,\n subtitle = '',\n renderButton = null,\n className = '',\n}) => {\n return (\n <div className={clsx('flex justify-between flex-col', className)}>\n <div className=\"flex flex-row justify-between\">\n <div className={clsx('flex items-baseline gap-[16px]')}>\n <H5 className=\"text-gray-800\" text={title} />\n {subtitle ? <P2 className=\"text-gray-600\" text={subtitle} /> : null}\n </div>\n {renderButton || null}\n </div>\n <div\n className={clsx(\n 'w-full h-[1px] bg-gray-800 mt-[8px]',\n 'desktop:mt-[16px]'\n )}\n />\n </div>\n )\n}\n\nexport default Title2\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"title2.mjs"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { Tab } from '../components/title-tab/type.mjs';
|
|
3
|
-
import { StoryObj } from '@storybook/react-vite';
|
|
4
|
-
|
|
5
|
-
declare const meta: {
|
|
6
|
-
title: string;
|
|
7
|
-
component: react.FC<{
|
|
8
|
-
title: string;
|
|
9
|
-
tabs: Tab[];
|
|
10
|
-
activeTabIndex?: number;
|
|
11
|
-
}>;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
type Story = StoryObj<typeof meta>;
|
|
15
|
-
declare const Basic: Story;
|
|
16
|
-
|
|
17
|
-
export { Basic, meta as default };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { Tab } from '../components/title-tab/type.js';
|
|
3
|
-
import { StoryObj } from '@storybook/react-vite';
|
|
4
|
-
|
|
5
|
-
declare const meta: {
|
|
6
|
-
title: string;
|
|
7
|
-
component: react.FC<{
|
|
8
|
-
title: string;
|
|
9
|
-
tabs: Tab[];
|
|
10
|
-
activeTabIndex?: number;
|
|
11
|
-
}>;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
type Story = StoryObj<typeof meta>;
|
|
15
|
-
declare const Basic: Story;
|
|
16
|
-
|
|
17
|
-
export { Basic, meta as default };
|