@tripie-pyotato/design-system 0.0.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/.turbo/turbo-build.log +4 -0
- package/.turbo/turbo-lint$colon$fix.log +22 -0
- package/.turbo/turbo-lint.log +18 -0
- package/.turbo/turbo-test.log +152 -0
- package/.turbo/turbo-typecheck.log +5 -0
- package/coverage/clover.xml +1651 -0
- package/coverage/coverage-final.json +57 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/dist/button.js.html +112 -0
- package/coverage/lcov-report/dist/common.js.html +127 -0
- package/coverage/lcov-report/dist/components/body/_body.js.html +157 -0
- package/coverage/lcov-report/dist/components/body/_body.stories.js.html +193 -0
- package/coverage/lcov-report/dist/components/body/index.html +146 -0
- package/coverage/lcov-report/dist/components/body/index.js.html +109 -0
- package/coverage/lcov-report/dist/components/index.html +116 -0
- package/coverage/lcov-report/dist/components/index.js.html +127 -0
- package/coverage/lcov-report/dist/components/myButton/index.html +161 -0
- package/coverage/lcov-report/dist/components/myButton/index.js.html +154 -0
- package/coverage/lcov-report/dist/components/myButton/my-button.js.html +109 -0
- package/coverage/lcov-report/dist/components/myButton/myButton.js.html +133 -0
- package/coverage/lcov-report/dist/components/myButton/myButton.stories.js.html +181 -0
- package/coverage/lcov-report/dist/components/typography/_typography.js.html +190 -0
- package/coverage/lcov-report/dist/components/typography/_typography.stories.js.html +352 -0
- package/coverage/lcov-report/dist/components/typography/index.html +146 -0
- package/coverage/lcov-report/dist/components/typography/index.js.html +154 -0
- package/coverage/lcov-report/dist/components/typography/text/_text.js.html +139 -0
- package/coverage/lcov-report/dist/components/typography/text/_text.stories.js.html +259 -0
- package/coverage/lcov-report/dist/components/typography/text/index.html +146 -0
- package/coverage/lcov-report/dist/components/typography/text/index.js.html +160 -0
- package/coverage/lcov-report/dist/fonts/index.html +116 -0
- package/coverage/lcov-report/dist/fonts/index.js.html +154 -0
- package/coverage/lcov-report/dist/hooks/index.html +131 -0
- package/coverage/lcov-report/dist/hooks/index.js.html +136 -0
- package/coverage/lcov-report/dist/hooks/useAppTheme.js.html +202 -0
- package/coverage/lcov-report/dist/index.html +161 -0
- package/coverage/lcov-report/dist/index.js.html +139 -0
- package/coverage/lcov-report/dist/my-button.js.html +109 -0
- package/coverage/lcov-report/dist/myButton/Button.stories.js.html +229 -0
- package/coverage/lcov-report/dist/myButton/index.html +161 -0
- package/coverage/lcov-report/dist/myButton/index.js.html +154 -0
- package/coverage/lcov-report/dist/myButton/myButton.js.html +133 -0
- package/coverage/lcov-report/dist/myButton/myButton.stories.js.html +181 -0
- package/coverage/lcov-report/dist/text/index.html +176 -0
- package/coverage/lcov-report/dist/text/index.js.html +139 -0
- package/coverage/lcov-report/dist/text/text.js.html +151 -0
- package/coverage/lcov-report/dist/text/text.stories.js.html +232 -0
- package/coverage/lcov-report/dist/text/typography.js.html +160 -0
- package/coverage/lcov-report/dist/text/typography.stories.js.html +166 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +431 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov-report/src/components/body/_body.stories.tsx.html +196 -0
- package/coverage/lcov-report/src/components/body/_body.tsx.html +163 -0
- package/coverage/lcov-report/src/components/body/index.html +146 -0
- package/coverage/lcov-report/src/components/body/index.ts.html +88 -0
- package/coverage/lcov-report/src/components/index.html +116 -0
- package/coverage/lcov-report/src/components/index.ts.html +97 -0
- package/coverage/lcov-report/src/components/myButton/index.html +161 -0
- package/coverage/lcov-report/src/components/myButton/index.ts.html +91 -0
- package/coverage/lcov-report/src/components/myButton/my-button.tsx.html +109 -0
- package/coverage/lcov-report/src/components/myButton/myButton.stories.tsx.html +220 -0
- package/coverage/lcov-report/src/components/myButton/myButton.tsx.html +160 -0
- package/coverage/lcov-report/src/components/typography/font/_font.tsx.html +127 -0
- package/coverage/lcov-report/src/components/typography/font/index.html +131 -0
- package/coverage/lcov-report/src/components/typography/font/index.ts.html +91 -0
- package/coverage/lcov-report/src/components/typography/headings/_headings.stories.tsx.html +361 -0
- package/coverage/lcov-report/src/components/typography/headings/_headings.tsx.html +211 -0
- package/coverage/lcov-report/src/components/typography/headings/index.html +146 -0
- package/coverage/lcov-report/src/components/typography/headings/index.ts.html +91 -0
- package/coverage/lcov-report/src/components/typography/index.html +116 -0
- package/coverage/lcov-report/src/components/typography/index.ts.html +91 -0
- package/coverage/lcov-report/src/components/typography/link/_link.stories.tsx.html +268 -0
- package/coverage/lcov-report/src/components/typography/link/_link.tsx.html +199 -0
- package/coverage/lcov-report/src/components/typography/link/index.html +146 -0
- package/coverage/lcov-report/src/components/typography/link/index.ts.html +91 -0
- package/coverage/lcov-report/src/components/typography/paragraph/_paragraph.stories.tsx.html +229 -0
- package/coverage/lcov-report/src/components/typography/paragraph/_paragraph.tsx.html +124 -0
- package/coverage/lcov-report/src/components/typography/paragraph/index.html +131 -0
- package/coverage/lcov-report/src/components/typography/text/_text.stories.tsx.html +184 -0
- package/coverage/lcov-report/src/components/typography/text/_text.tsx.html +196 -0
- package/coverage/lcov-report/src/components/typography/text/index.html +146 -0
- package/coverage/lcov-report/src/components/typography/text/index.ts.html +91 -0
- package/coverage/lcov-report/src/hooks/index.html +131 -0
- package/coverage/lcov-report/src/hooks/index.ts.html +88 -0
- package/coverage/lcov-report/src/hooks/useAppTheme.ts.html +220 -0
- package/coverage/lcov-report/src/index.html +116 -0
- package/coverage/lcov-report/src/index.ts.html +91 -0
- package/coverage/lcov-report/turbo/generators/config.ts.html +175 -0
- package/coverage/lcov-report/turbo/generators/index.html +116 -0
- package/coverage/lcov.info +2087 -0
- package/dist/button.d.ts +7 -0
- package/dist/button.d.ts.map +1 -0
- package/dist/button.js +9 -0
- package/dist/common.d.ts +12 -0
- package/dist/common.d.ts.map +1 -0
- package/dist/common.js +14 -0
- package/dist/components/body/_body.d.ts +8 -0
- package/dist/components/body/_body.d.ts.map +1 -0
- package/dist/components/body/_body.js +24 -0
- package/dist/components/body/_body.stories.d.ts +7 -0
- package/dist/components/body/_body.stories.d.ts.map +1 -0
- package/dist/components/body/_body.stories.js +36 -0
- package/dist/components/body/index.d.ts +2 -0
- package/dist/components/body/index.d.ts.map +1 -0
- package/dist/components/body/index.js +8 -0
- package/dist/components/index.d.ts +5 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +14 -0
- package/dist/components/myButton/index.d.ts +3 -0
- package/dist/components/myButton/index.d.ts.map +1 -0
- package/dist/components/myButton/index.js +23 -0
- package/dist/components/myButton/my-button.d.ts +4 -0
- package/dist/components/myButton/my-button.d.ts.map +1 -0
- package/dist/components/myButton/my-button.js +8 -0
- package/dist/components/myButton/myButton.d.ts +7 -0
- package/dist/components/myButton/myButton.d.ts.map +1 -0
- package/dist/components/myButton/myButton.js +16 -0
- package/dist/components/myButton/myButton.stories.d.ts +7 -0
- package/dist/components/myButton/myButton.stories.d.ts.map +1 -0
- package/dist/components/myButton/myButton.stories.js +32 -0
- package/dist/components/typography/_typography.d.ts +23 -0
- package/dist/components/typography/_typography.d.ts.map +1 -0
- package/dist/components/typography/_typography.js +35 -0
- package/dist/components/typography/_typography.stories.d.ts +13 -0
- package/dist/components/typography/_typography.stories.d.ts.map +1 -0
- package/dist/components/typography/_typography.stories.js +89 -0
- package/dist/components/typography/index.d.ts +3 -0
- package/dist/components/typography/index.d.ts.map +1 -0
- package/dist/components/typography/index.js +23 -0
- package/dist/components/typography/text/_text.d.ts +19 -0
- package/dist/components/typography/text/_text.d.ts.map +1 -0
- package/dist/components/typography/text/_text.js +18 -0
- package/dist/components/typography/text/_text.stories.d.ts +10 -0
- package/dist/components/typography/text/_text.stories.d.ts.map +1 -0
- package/dist/components/typography/text/_text.stories.js +58 -0
- package/dist/components/typography/text/index.d.ts +3 -0
- package/dist/components/typography/text/index.d.ts.map +1 -0
- package/dist/components/typography/text/index.js +25 -0
- package/dist/fonts/index.d.ts +3 -0
- package/dist/fonts/index.d.ts.map +1 -0
- package/dist/fonts/index.js +23 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +17 -0
- package/dist/hooks/useAppTheme.d.ts +21 -0
- package/dist/hooks/useAppTheme.d.ts.map +1 -0
- package/dist/hooks/useAppTheme.js +39 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/my-button.d.ts +4 -0
- package/dist/my-button.d.ts.map +1 -0
- package/dist/my-button.js +8 -0
- package/dist/myButton/Button.stories.d.ts +8 -0
- package/dist/myButton/Button.stories.d.ts.map +1 -0
- package/dist/myButton/Button.stories.js +48 -0
- package/dist/myButton/index.d.ts +3 -0
- package/dist/myButton/index.d.ts.map +1 -0
- package/dist/myButton/index.js +23 -0
- package/dist/myButton/myButton.d.ts +7 -0
- package/dist/myButton/myButton.d.ts.map +1 -0
- package/dist/myButton/myButton.js +16 -0
- package/dist/myButton/myButton.stories.d.ts +7 -0
- package/dist/myButton/myButton.stories.d.ts.map +1 -0
- package/dist/myButton/myButton.stories.js +32 -0
- package/dist/src/components/Accordian/Accordian.jsx +61 -0
- package/dist/src/components/Accordian/accordian.stories.jsx +76 -0
- package/dist/src/components/Accordian/index.js +21 -0
- package/dist/src/components/Accordian/variants.js +46 -0
- package/dist/src/components/Carousel/Carousel.jsx +84 -0
- package/dist/src/components/Carousel/Carousel.spec.jsx +203 -0
- package/dist/src/components/Carousel/carousel.stories.jsx +56 -0
- package/dist/src/components/Carousel/images.js +40 -0
- package/dist/src/components/Carousel/index.js +20 -0
- package/dist/src/components/Chip/Chip.jsx +27 -0
- package/dist/src/components/Chip/Chip.spec.jsx +103 -0
- package/dist/src/components/Chip/chip.stories.jsx +61 -0
- package/dist/src/components/Chip/index.js +20 -0
- package/dist/src/components/ChipMarker/ChipMarker.jsx +17 -0
- package/dist/src/components/ChipMarker/chip.stories.jsx +42 -0
- package/dist/src/components/ChipMarker/index.js +20 -0
- package/dist/src/components/Divider/Divider.jsx +21 -0
- package/dist/src/components/Divider/constants.js +10 -0
- package/dist/src/components/Divider/divider.stories.jsx +72 -0
- package/dist/src/components/Divider/index.js +20 -0
- package/dist/src/components/Headings/Headings.jsx +37 -0
- package/dist/src/components/Headings/headings.stories.jsx +83 -0
- package/dist/src/components/Headings/index.js +20 -0
- package/dist/src/components/Link/Link.jsx +26 -0
- package/dist/src/components/Link/List.spec.jsx +22 -0
- package/dist/src/components/Link/index.js +20 -0
- package/dist/src/components/Link/link.stories.jsx +53 -0
- package/dist/src/components/List/List.jsx +29 -0
- package/dist/src/components/List/list-item.stories.jsx +81 -0
- package/dist/src/components/List/list.stories.jsx +45 -0
- package/dist/src/components/List/variants.js +24 -0
- package/dist/src/components/MotionSlideUp/MotionSlideUp.jsx +20 -0
- package/dist/src/components/MotionSlideUp/index.js +20 -0
- package/dist/src/components/Particle/Background/ParticleBackground.jsx +16 -0
- package/dist/src/components/Particle/Background/index.js +20 -0
- package/dist/src/components/Particle/Background/particle-background.stories.jsx +29 -0
- package/dist/src/components/Particle/Field/ParticleField.jsx +17 -0
- package/dist/src/components/Particle/Field/index.js +20 -0
- package/dist/src/components/Particle/Field/particle-field.stories.jsx +31 -0
- package/dist/src/components/Particle/Particles/Particles.jsx +15 -0
- package/dist/src/components/RotatingBlur/RotatingBlur.jsx +19 -0
- package/dist/src/components/RotatingBlur/index.js +20 -0
- package/dist/src/components/RotatingBlur/rotating-blur.stories.jsx +38 -0
- package/dist/src/components/SplashScreen/SplashScreen.jsx +22 -0
- package/dist/src/components/SplashScreen/index.js +20 -0
- package/dist/src/components/SplashScreen/splash-screen.stories.jsx +44 -0
- package/dist/src/components/Switch/Switch.jsx +18 -0
- package/dist/src/components/Switch/index.js +20 -0
- package/dist/src/components/Switch/switch.stories.jsx +31 -0
- package/dist/src/components/Switch/variants.js +35 -0
- package/dist/src/components/Text/Text.jsx +72 -0
- package/dist/src/components/Text/index.js +20 -0
- package/dist/src/components/Text/text.stories.jsx +44 -0
- package/dist/src/components/Text/variants.js +40 -0
- package/dist/src/components/TextFill/TextFillAnimation.jsx +51 -0
- package/dist/src/components/TextFill/index.js +20 -0
- package/dist/src/components/TextFill/text-fill-animation.stories.jsx +51 -0
- package/dist/src/components/TextUnderlineAnimation/TextUnderlineAnimation.jsx +16 -0
- package/dist/src/components/TextUnderlineAnimation/index.js +20 -0
- package/dist/src/components/TextUnderlineAnimation/text-underline-animation.stories.jsx +34 -0
- package/dist/src/components/TextUnderlineAnimation/variants.js +24 -0
- package/dist/src/components/TripieButton/Animated/AnimateButton.spec.jsx +106 -0
- package/dist/src/components/TripieButton/Animated/AnimatedButton.jsx +16 -0
- package/dist/src/components/TripieButton/Animated/animated-button.stories.jsx +58 -0
- package/dist/src/components/TripieButton/Animated/index.js +20 -0
- package/dist/src/components/TripieButton/Animated/variants.js +15 -0
- package/dist/src/components/TripieButton/MenuToggle/MenuItem/index.jsx +15 -0
- package/dist/src/components/TripieButton/MenuToggle/MenuItem/menu-item.stories.jsx +36 -0
- package/dist/src/components/TripieButton/MenuToggle/MenuItem/variants.js +19 -0
- package/dist/src/components/TripieButton/MenuToggle/MenuList/index.jsx +15 -0
- package/dist/src/components/TripieButton/MenuToggle/MenuList/menu-list.stories.jsx +41 -0
- package/dist/src/components/TripieButton/MenuToggle/MenuList/variants.js +15 -0
- package/dist/src/components/TripieButton/MenuToggle/MenuToggle.jsx +45 -0
- package/dist/src/components/TripieButton/MenuToggle/index.js +20 -0
- package/dist/src/components/TripieButton/MenuToggle/menu-toggle.stories.jsx +55 -0
- package/dist/src/components/TripieButton/NoStyle/NoStyleButton.jsx +12 -0
- package/dist/src/components/TripieButton/NoStyle/NoStyleButton.spec.jsx +87 -0
- package/dist/src/components/TripieButton/NoStyle/index.js +20 -0
- package/dist/src/components/TripieButton/NoStyle/no-style-button.stories.jsx +29 -0
- package/dist/src/components/TripieCard/Card.jsx +57 -0
- package/dist/src/components/TripieCard/card.stories.jsx +45 -0
- package/dist/src/components/TripieCard/index.js +20 -0
- package/dist/src/components/TripieContainer/TripieContainer.jsx +23 -0
- package/dist/src/components/TripieContainer/index.js +20 -0
- package/dist/src/components/TripieContainer/tripie-container.stories.jsx +70 -0
- package/dist/src/components/TripieIcon/Icon.jsx +84 -0
- package/dist/src/components/TripieIcon/icon-transport.stories.jsx +89 -0
- package/dist/src/components/TripieIcon/icon.stories.jsx +68 -0
- package/dist/src/components/TripieIcon/index.js +20 -0
- package/dist/src/components/TripieIcon/variants.js +172 -0
- package/dist/src/components/TripieImage/TripieImage.jsx +25 -0
- package/dist/src/components/TripieImage/index.js +20 -0
- package/dist/src/components/TripieImage/tripie-image.stories.jsx +86 -0
- package/dist/src/components/TripieSkeleton/Skeleton.jsx +30 -0
- package/dist/src/components/TripieSkeleton/index.js +20 -0
- package/dist/src/components/TripieSkeleton/skeleton.stories.jsx +28 -0
- package/dist/src/components/index.js +54 -0
- package/dist/src/font.js +12 -0
- package/dist/src/hooks/index.js +19 -0
- package/dist/src/hooks/useAppTheme.js +33 -0
- package/dist/src/hooks/useCycle.js +32 -0
- package/dist/src/hooks/useDrawer.js +21 -0
- package/dist/src/index.js +19 -0
- package/dist/src/shared/colors.js +20 -0
- package/dist/src/shared/index.js +19 -0
- package/dist/src/shared/resource.js +26 -0
- package/dist/src/shared/variants.js +66 -0
- package/dist/text/index.d.ts +3 -0
- package/dist/text/index.d.ts.map +1 -0
- package/dist/text/index.js +18 -0
- package/dist/text/text.d.ts +47 -0
- package/dist/text/text.d.ts.map +1 -0
- package/dist/text/text.js +22 -0
- package/dist/text/text.stories.d.ts +10 -0
- package/dist/text/text.stories.d.ts.map +1 -0
- package/dist/text/text.stories.js +49 -0
- package/dist/text/typography.d.ts +18 -0
- package/dist/text/typography.d.ts.map +1 -0
- package/dist/text/typography.js +25 -0
- package/dist/text/typography.stories.d.ts +7 -0
- package/dist/text/typography.stories.d.ts.map +1 -0
- package/dist/text/typography.stories.js +27 -0
- package/dist/turbo/generators/config.js +30 -0
- package/jest.config.cjs +21 -0
- package/jest.setup.cjs +4 -0
- package/package.json +80 -0
- package/setupTests.mjs +39 -0
- package/src/base/_breakpoint.scss +15 -0
- package/src/base/_colors.scss +98 -0
- package/src/base/_config.scss +33 -0
- package/src/base/_font-size.scss +17 -0
- package/src/base/_font-stack.scss +27 -0
- package/src/base/_font-weight.scss +23 -0
- package/src/base/_letter-spacing.scss +12 -0
- package/src/base/_line-height.scss +12 -0
- package/src/base/_motion.scss +35 -0
- package/src/base/_shape.scss +19 -0
- package/src/base/_space.scss +58 -0
- package/src/base/_theme.scss +97 -0
- package/src/base/_z-index.scss +44 -0
- package/src/base/index.scss +13 -0
- package/src/components/Accordian/Accordian.tsx +72 -0
- package/src/components/Accordian/accordian.module.scss +18 -0
- package/src/components/Accordian/accordian.stories.tsx +86 -0
- package/src/components/Accordian/index.ts +3 -0
- package/src/components/Accordian/variants.ts +45 -0
- package/src/components/Carousel/Carousel.spec.tsx +239 -0
- package/src/components/Carousel/Carousel.tsx +131 -0
- package/src/components/Carousel/carousel.module.scss +61 -0
- package/src/components/Carousel/carousel.stories.tsx +117 -0
- package/src/components/Carousel/images.ts +44 -0
- package/src/components/Carousel/index.ts +2 -0
- package/src/components/Chip/Chip.spec.tsx +59 -0
- package/src/components/Chip/Chip.tsx +64 -0
- package/src/components/Chip/chip.module.scss +79 -0
- package/src/components/Chip/chip.stories.tsx +70 -0
- package/src/components/Chip/index.ts +2 -0
- package/src/components/ChipMarker/ChipMarker.tsx +20 -0
- package/src/components/ChipMarker/chip-marker.module.scss +75 -0
- package/src/components/ChipMarker/chip.stories.tsx +48 -0
- package/src/components/ChipMarker/index.ts +2 -0
- package/src/components/Divider/Divider.tsx +29 -0
- package/src/components/Divider/constants.ts +9 -0
- package/src/components/Divider/divider.module.scss +37 -0
- package/src/components/Divider/divider.stories.tsx +94 -0
- package/src/components/Divider/index.ts +2 -0
- package/src/components/Headings/Headings.tsx +36 -0
- package/src/components/Headings/headings.module.scss +46 -0
- package/src/components/Headings/headings.stories.tsx +92 -0
- package/src/components/Headings/index.ts +2 -0
- package/src/components/Link/Link.tsx +31 -0
- package/src/components/Link/List.spec.tsx +25 -0
- package/src/components/Link/index.ts +2 -0
- package/src/components/Link/link.module.scss +26 -0
- package/src/components/Link/link.stories.tsx +61 -0
- package/src/components/List/List.tsx +63 -0
- package/src/components/List/list-item.stories.tsx +89 -0
- package/src/components/List/list.module.scss +59 -0
- package/src/components/List/list.stories.tsx +65 -0
- package/src/components/List/variants.ts +23 -0
- package/src/components/MotionSlideUp/MotionSlideUp.tsx +37 -0
- package/src/components/MotionSlideUp/index.ts +2 -0
- package/src/components/Particle/Background/ParticleBackground.tsx +18 -0
- package/src/components/Particle/Background/index.ts +2 -0
- package/src/components/Particle/Background/particle-background.module.scss +25 -0
- package/src/components/Particle/Background/particle-background.stories.tsx +36 -0
- package/src/components/Particle/Field/ParticleField.tsx +28 -0
- package/src/components/Particle/Field/index.ts +2 -0
- package/src/components/Particle/Field/particle-field.module.scss +6 -0
- package/src/components/Particle/Field/particle-field.stories.tsx +38 -0
- package/src/components/Particle/Particles/Particles.tsx +22 -0
- package/src/components/Particle/Particles/particles.module.scss +19 -0
- package/src/components/RotatingBlur/RotatingBlur.tsx +26 -0
- package/src/components/RotatingBlur/index.ts +2 -0
- package/src/components/RotatingBlur/rotating-blur.module.scss +59 -0
- package/src/components/RotatingBlur/rotating-blur.stories.tsx +45 -0
- package/src/components/SplashScreen/SplashScreen.tsx +31 -0
- package/src/components/SplashScreen/index.ts +2 -0
- package/src/components/SplashScreen/splash-screen.module.scss +12 -0
- package/src/components/SplashScreen/splash-screen.stories.tsx +53 -0
- package/src/components/Switch/Switch.tsx +33 -0
- package/src/components/Switch/index.ts +2 -0
- package/src/components/Switch/switch.module.scss +43 -0
- package/src/components/Switch/switch.stories.tsx +36 -0
- package/src/components/Switch/variants.ts +34 -0
- package/src/components/Text/Text.tsx +158 -0
- package/src/components/Text/index.ts +2 -0
- package/src/components/Text/text.module.scss +84 -0
- package/src/components/Text/text.stories.tsx +52 -0
- package/src/components/Text/variants.ts +53 -0
- package/src/components/TextFill/TextFillAnimation.tsx +87 -0
- package/src/components/TextFill/index.ts +2 -0
- package/src/components/TextFill/text-fill-animation.module.scss +37 -0
- package/src/components/TextFill/text-fill-animation.stories.tsx +61 -0
- package/src/components/TextUnderlineAnimation/TextUnderlineAnimation.tsx +37 -0
- package/src/components/TextUnderlineAnimation/index.ts +2 -0
- package/src/components/TextUnderlineAnimation/text-underline-animation.stories.tsx +39 -0
- package/src/components/TextUnderlineAnimation/text-underline.module.scss +13 -0
- package/src/components/TextUnderlineAnimation/variants.ts +23 -0
- package/src/components/TripieButton/Animated/AnimateButton.spec.tsx +84 -0
- package/src/components/TripieButton/Animated/AnimatedButton.tsx +88 -0
- package/src/components/TripieButton/Animated/animated-button.module.scss +61 -0
- package/src/components/TripieButton/Animated/animated-button.stories.tsx +68 -0
- package/src/components/TripieButton/Animated/index.ts +2 -0
- package/src/components/TripieButton/MenuToggle/MenuItem/index.tsx +28 -0
- package/src/components/TripieButton/MenuToggle/MenuItem/menu-item.module.scss +14 -0
- package/src/components/TripieButton/MenuToggle/MenuItem/menu-item.stories.tsx +42 -0
- package/src/components/TripieButton/MenuToggle/MenuItem/variants.ts +18 -0
- package/src/components/TripieButton/MenuToggle/MenuList/index.tsx +20 -0
- package/src/components/TripieButton/MenuToggle/MenuList/menu-list.module.scss +21 -0
- package/src/components/TripieButton/MenuToggle/MenuList/menu-list.stories.tsx +51 -0
- package/src/components/TripieButton/MenuToggle/MenuList/variants.ts +14 -0
- package/src/components/TripieButton/MenuToggle/MenuToggle.tsx +67 -0
- package/src/components/TripieButton/MenuToggle/index.ts +2 -0
- package/src/components/TripieButton/MenuToggle/menu-toggle.module.scss +42 -0
- package/src/components/TripieButton/MenuToggle/menu-toggle.stories.tsx +73 -0
- package/src/components/TripieButton/NoStyle/NoStyleButton.spec.tsx +50 -0
- package/src/components/TripieButton/NoStyle/NoStyleButton.tsx +27 -0
- package/src/components/TripieButton/NoStyle/index.ts +2 -0
- package/src/components/TripieButton/NoStyle/no-style-button.module.scss +5 -0
- package/src/components/TripieButton/NoStyle/no-style-button.stories.tsx +34 -0
- package/src/components/TripieCard/Card.tsx +167 -0
- package/src/components/TripieCard/card.module.scss +122 -0
- package/src/components/TripieCard/card.stories.tsx +66 -0
- package/src/components/TripieCard/index.ts +2 -0
- package/src/components/TripieContainer/TripieContainer.tsx +54 -0
- package/src/components/TripieContainer/index.ts +2 -0
- package/src/components/TripieContainer/tripie-container.module.scss +93 -0
- package/src/components/TripieContainer/tripie-container.stories.tsx +81 -0
- package/src/components/TripieIcon/Icon.tsx +242 -0
- package/src/components/TripieIcon/icon-transport.stories.tsx +108 -0
- package/src/components/TripieIcon/icon.module.scss +35 -0
- package/src/components/TripieIcon/icon.stories.tsx +81 -0
- package/src/components/TripieIcon/index.ts +2 -0
- package/src/components/TripieIcon/variants.ts +177 -0
- package/src/components/TripieImage/TripieImage.tsx +90 -0
- package/src/components/TripieImage/index.ts +2 -0
- package/src/components/TripieImage/tripie-image.module.scss +73 -0
- package/src/components/TripieImage/tripie-image.stories.tsx +128 -0
- package/src/components/TripieSkeleton/Skeleton.tsx +27 -0
- package/src/components/TripieSkeleton/index.ts +2 -0
- package/src/components/TripieSkeleton/skeleton.module.scss +7 -0
- package/src/components/TripieSkeleton/skeleton.stories.tsx +32 -0
- package/src/components/index.ts +25 -0
- package/src/font.ts +12 -0
- package/src/functions/_breakpoint.scss +21 -0
- package/src/functions/_color.scss +63 -0
- package/src/functions/_config.scss +27 -0
- package/src/functions/_shape.scss +29 -0
- package/src/functions/_space.scss +28 -0
- package/src/functions/_typography.scss +101 -0
- package/src/functions/_units.scss +66 -0
- package/src/functions/_z-index.scss +21 -0
- package/src/functions/index.scss +8 -0
- package/src/generator/_generator.scss +21 -0
- package/src/generator/index.scss +1 -0
- package/src/global.scss +49 -0
- package/src/hooks/index.ts +3 -0
- package/src/hooks/useAppTheme.ts +41 -0
- package/src/hooks/useCycle.ts +28 -0
- package/src/hooks/useDrawer.ts +29 -0
- package/src/index.ts +3 -0
- package/src/mixins/_border.scss +83 -0
- package/src/mixins/_clear.scss +21 -0
- package/src/mixins/_color.scss +19 -0
- package/src/mixins/_default.scss +40 -0
- package/src/mixins/_media.scss +26 -0
- package/src/mixins/_normalize.scss +353 -0
- package/src/mixins/_positioning.scss +34 -0
- package/src/mixins/_pseudo.scss +39 -0
- package/src/mixins/_reset.scss +70 -0
- package/src/mixins/_shape.scss +12 -0
- package/src/mixins/_skeleton.scss +89 -0
- package/src/mixins/_text.scss +52 -0
- package/src/mixins/_transition.scss +90 -0
- package/src/mixins/_z-index.scss +12 -0
- package/src/mixins/index.scss +14 -0
- package/src/mixins.scss +275 -0
- package/src/shared/colors.ts +18 -0
- package/src/shared/index.ts +3 -0
- package/src/shared/resource.ts +26 -0
- package/src/shared/variants.ts +68 -0
- package/src/shared/wrappers/classNames.ts +2 -0
- package/src/shared/wrappers/index.tsx +4 -0
- package/src/shared/wrappers/motion-wrapper.tsx +27 -0
- package/src/static/fonts/MaruBuri-Regular.eot +0 -0
- package/src/static/fonts/MaruBuri-Regular.otf +0 -0
- package/src/static/fonts/MaruBuri-Regular.ttf +0 -0
- package/src/static/fonts/MaruBuri-Regular.woff +0 -0
- package/src/static/fonts/MaruBuri-Regular.woff2 +0 -0
- package/src/styles/index.scss +2 -0
- package/src/typings.d.ts +5 -0
- package/src/variables.scss +31 -0
- package/tsconfig.json +21 -0
- package/turbo/generators/config.ts +30 -0
- package/turbo/generators/templates/component.hbs +8 -0
- package/vite.config.mjs +25 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
|
+
import { useAppTheme } from '../../hooks';
|
|
5
|
+
import Divider from './Divider';
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof Divider> = {
|
|
8
|
+
title: 'tripie-ui/Divider',
|
|
9
|
+
component: Divider,
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
argTypes: {},
|
|
12
|
+
decorators: [
|
|
13
|
+
(story, context) => {
|
|
14
|
+
const { mode, setMode } = useAppTheme();
|
|
15
|
+
const selectedTheme = context.globals.theme || mode;
|
|
16
|
+
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
setMode(selectedTheme);
|
|
19
|
+
}, [selectedTheme]);
|
|
20
|
+
|
|
21
|
+
return <div className={`${context.globals.theme}`}>{story()}</div>;
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export default meta;
|
|
27
|
+
type Story = StoryObj<typeof meta>;
|
|
28
|
+
|
|
29
|
+
export const Default: Story = {
|
|
30
|
+
name: 'Divider.Default',
|
|
31
|
+
// args: {},
|
|
32
|
+
render: () => (
|
|
33
|
+
<>
|
|
34
|
+
content before
|
|
35
|
+
<Divider />
|
|
36
|
+
content after
|
|
37
|
+
</>
|
|
38
|
+
),
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const ArticleDivider1: Story = {
|
|
42
|
+
name: 'Divider.Article.hr1',
|
|
43
|
+
render: () => (
|
|
44
|
+
<>
|
|
45
|
+
content before
|
|
46
|
+
<Divider.Article item={{ type: 'hr1' }} />
|
|
47
|
+
content after
|
|
48
|
+
</>
|
|
49
|
+
),
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export const ArticleDivider2: Story = {
|
|
53
|
+
name: 'Divider.Article.hr2',
|
|
54
|
+
render: () => (
|
|
55
|
+
<>
|
|
56
|
+
content before
|
|
57
|
+
<Divider.Article item={{ type: 'hr2' }} />
|
|
58
|
+
content after
|
|
59
|
+
</>
|
|
60
|
+
),
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export const ArticleDivider3: Story = {
|
|
64
|
+
name: 'Divider.Article.hr3',
|
|
65
|
+
render: () => (
|
|
66
|
+
<>
|
|
67
|
+
content before
|
|
68
|
+
<Divider.Article item={{ type: 'hr3' }} />
|
|
69
|
+
content after
|
|
70
|
+
</>
|
|
71
|
+
),
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export const ArticleDivider4: Story = {
|
|
75
|
+
name: 'Divider.Article.hr4',
|
|
76
|
+
render: () => (
|
|
77
|
+
<>
|
|
78
|
+
content before
|
|
79
|
+
<Divider.Article item={{ type: 'hr4' }} />
|
|
80
|
+
content after
|
|
81
|
+
</>
|
|
82
|
+
),
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export const ArticleDivider5: Story = {
|
|
86
|
+
name: 'Divider.Article.hr5',
|
|
87
|
+
render: () => (
|
|
88
|
+
<>
|
|
89
|
+
content before
|
|
90
|
+
<Divider.Article item={{ type: 'hr5' }} />
|
|
91
|
+
content after
|
|
92
|
+
</>
|
|
93
|
+
),
|
|
94
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { classNames } from '../../shared/wrappers';
|
|
4
|
+
import Text, { TextProps } from '../Text/Text';
|
|
5
|
+
import Style from './headings.module.scss';
|
|
6
|
+
|
|
7
|
+
const style = classNames.bind(Style);
|
|
8
|
+
|
|
9
|
+
const Heading = ({ children, className }: TextProps) => <Text className={style('default', className)}>{children}</Text>;
|
|
10
|
+
|
|
11
|
+
const H1 = ({ children, className }: TextProps) => {
|
|
12
|
+
return <h1 className={style('h1', className)}>{children}</h1>;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const H2 = ({ children, className }: TextProps) => {
|
|
16
|
+
return <h2 className={style('h2', className)}>{children}</h2>;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const H3 = ({ children, className }: TextProps) => {
|
|
20
|
+
return <h3 className={style('h3', className)}>{children}</h3>;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const H4 = ({ children, className }: TextProps) => {
|
|
24
|
+
return <h4 className={style('h4', className)}>{children}</h4>;
|
|
25
|
+
};
|
|
26
|
+
const Headline = ({ children, className }: TextProps) => {
|
|
27
|
+
return <h4 className={style('headline', className)}>{children}</h4>;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
Heading.Headline = Headline;
|
|
31
|
+
Heading.H1 = H1;
|
|
32
|
+
Heading.H2 = H2;
|
|
33
|
+
Heading.H3 = H3;
|
|
34
|
+
Heading.H4 = H4;
|
|
35
|
+
|
|
36
|
+
export default Heading;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
@use '../../base/' as *;
|
|
2
|
+
@use '../../functions/' as *;
|
|
3
|
+
@use '../../generator/' as *;
|
|
4
|
+
@use '../../mixins/' as *;
|
|
5
|
+
@use '../Text/text.module' as *;
|
|
6
|
+
|
|
7
|
+
@use 'sass:map';
|
|
8
|
+
|
|
9
|
+
.headings {
|
|
10
|
+
@include text-ellipsis(1);
|
|
11
|
+
@include word-wrap;
|
|
12
|
+
font-size: font-size(text);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.headline {
|
|
16
|
+
font-size: font-size(small);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.default {
|
|
20
|
+
font-size: font-size(default);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.h0 {
|
|
24
|
+
font-size: font-size(h0);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.h1 {
|
|
28
|
+
font-size: font-size(h1);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.h2 {
|
|
32
|
+
font-size: font-size(h2);
|
|
33
|
+
}
|
|
34
|
+
.h3 {
|
|
35
|
+
font-size: font-size(h3);
|
|
36
|
+
}
|
|
37
|
+
.h4 {
|
|
38
|
+
font-size: font-size(h4);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.small {
|
|
42
|
+
font-size: font-size(small);
|
|
43
|
+
}
|
|
44
|
+
.tiny {
|
|
45
|
+
font-size: font-size(tiny);
|
|
46
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
import { useAppTheme } from '../../hooks';
|
|
4
|
+
import Heading from './Headings';
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof Heading> = {
|
|
7
|
+
title: 'tripie-ui/Typography/Headings',
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
component: Heading,
|
|
10
|
+
decorators: [
|
|
11
|
+
(story, context) => {
|
|
12
|
+
const { mode, setMode } = useAppTheme();
|
|
13
|
+
const selectedTheme = context.globals.theme || mode;
|
|
14
|
+
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
setMode(selectedTheme);
|
|
17
|
+
}, [selectedTheme]);
|
|
18
|
+
|
|
19
|
+
return <div className={`${context.globals.theme}`}>{story()}</div>;
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default meta;
|
|
25
|
+
|
|
26
|
+
type Story = StoryObj<typeof meta>;
|
|
27
|
+
|
|
28
|
+
export const H1: Story = {
|
|
29
|
+
name: 'H1',
|
|
30
|
+
decorators: [
|
|
31
|
+
story => {
|
|
32
|
+
return story().type.H1({
|
|
33
|
+
children: 'Heading 1',
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const H2: Story = {
|
|
40
|
+
name: 'H2',
|
|
41
|
+
decorators: [
|
|
42
|
+
story => {
|
|
43
|
+
return story().type.H2({
|
|
44
|
+
children: 'Heading 2',
|
|
45
|
+
});
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const H3: Story = {
|
|
51
|
+
name: 'H3',
|
|
52
|
+
decorators: [
|
|
53
|
+
story => {
|
|
54
|
+
return story().type.H3({
|
|
55
|
+
children: 'Heading 3',
|
|
56
|
+
});
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
};
|
|
60
|
+
export const H4: Story = {
|
|
61
|
+
name: 'H4',
|
|
62
|
+
decorators: [
|
|
63
|
+
story => {
|
|
64
|
+
return story().type.H4({
|
|
65
|
+
children: 'Heading 4',
|
|
66
|
+
});
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export const Headline: Story = {
|
|
72
|
+
name: 'Headline',
|
|
73
|
+
decorators: [
|
|
74
|
+
story => {
|
|
75
|
+
return story().type.H4({
|
|
76
|
+
children: 'Headline',
|
|
77
|
+
});
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export const HeadlineSecondary: Story = {
|
|
83
|
+
name: 'Headline secondary',
|
|
84
|
+
decorators: [
|
|
85
|
+
story => {
|
|
86
|
+
return story().type.H4({
|
|
87
|
+
children: 'Headline',
|
|
88
|
+
className: 'secondary',
|
|
89
|
+
});
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import Link from 'next/link';
|
|
4
|
+
import { classNames } from '../../shared/wrappers';
|
|
5
|
+
import Text, { TextProps } from '../Text';
|
|
6
|
+
import Style from './link.module.scss';
|
|
7
|
+
|
|
8
|
+
const style = classNames.bind(Style);
|
|
9
|
+
|
|
10
|
+
export interface LinkProps extends React.RefAttributes<HTMLAnchorElement> {
|
|
11
|
+
href: string;
|
|
12
|
+
children: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
'aria-selected'?: boolean;
|
|
15
|
+
'aria-disabled'?: boolean;
|
|
16
|
+
role?: string;
|
|
17
|
+
size?: TextProps['size'];
|
|
18
|
+
bold?: TextProps['bold'];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function UnstyledLink({ children, className, href, role, size = 'default', ...props }: Readonly<LinkProps>) {
|
|
22
|
+
return (
|
|
23
|
+
<Link href={href} className={style('link', className)} role={role} {...props}>
|
|
24
|
+
<Text bold={true} size={size}>
|
|
25
|
+
{children}
|
|
26
|
+
</Text>
|
|
27
|
+
</Link>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export default UnstyledLink;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { render, screen } from '@testing-library/react';
|
|
2
|
+
|
|
3
|
+
import { beforeAll, describe, expect, it } from 'vitest';
|
|
4
|
+
import UnstyledLink from './Link';
|
|
5
|
+
// describe('basic math', () => {
|
|
6
|
+
// it('1+1=2', () => {
|
|
7
|
+
// expect(1 + 1).toBe(2);
|
|
8
|
+
// });
|
|
9
|
+
// });
|
|
10
|
+
|
|
11
|
+
describe('UnstyledLink Component', () => {
|
|
12
|
+
beforeAll(() => {
|
|
13
|
+
// ✅ Ensure `document` is available before running tests
|
|
14
|
+
global.document = window.document;
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
it('renders the link with the correct text and href', () => {
|
|
18
|
+
render(<UnstyledLink href="/home">Go Home</UnstyledLink>);
|
|
19
|
+
|
|
20
|
+
const linkElement = screen.getByRole('link', { name: /go home/i });
|
|
21
|
+
|
|
22
|
+
expect(linkElement).toBeInTheDocument();
|
|
23
|
+
expect(linkElement).toHaveAttribute('href', '/home');
|
|
24
|
+
});
|
|
25
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
@use '../../base/' as *;
|
|
2
|
+
@use '../../functions/' as *;
|
|
3
|
+
@use '../../generator/' as *;
|
|
4
|
+
@use '../../mixins/' as *;
|
|
5
|
+
@use '../Text/text.module' as *;
|
|
6
|
+
|
|
7
|
+
@use 'sass:map';
|
|
8
|
+
|
|
9
|
+
.link {
|
|
10
|
+
text-decoration: none;
|
|
11
|
+
color: color(default, 700);
|
|
12
|
+
|
|
13
|
+
&[aria-selected='false'] {
|
|
14
|
+
color: color(default, 500);
|
|
15
|
+
font-weight: font-weight(base);
|
|
16
|
+
}
|
|
17
|
+
&[aria-selected='true'] {
|
|
18
|
+
color: color(default, 900);
|
|
19
|
+
font-weight: font-weight(bold);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&[aria-disabled='true'] {
|
|
23
|
+
cursor: not-allowed;
|
|
24
|
+
color: color(default, 400);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
import { useAppTheme } from '../../hooks';
|
|
4
|
+
import { default as Text, default as UnstyledLink } from './Link';
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof UnstyledLink> = {
|
|
7
|
+
title: 'tripie-ui/Typography/Link',
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
component: Text,
|
|
10
|
+
decorators: [
|
|
11
|
+
(story, context) => {
|
|
12
|
+
const { mode, setMode } = useAppTheme();
|
|
13
|
+
const [selectedTheme] = context.globals.theme || mode;
|
|
14
|
+
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
setMode(selectedTheme);
|
|
17
|
+
}, [selectedTheme]);
|
|
18
|
+
|
|
19
|
+
return <div className={`${context.globals.theme}`}>{story()}</div>;
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default meta;
|
|
25
|
+
|
|
26
|
+
type Story = StoryObj<typeof meta>;
|
|
27
|
+
|
|
28
|
+
export const Default: Story = {
|
|
29
|
+
name: 'Default',
|
|
30
|
+
args: {
|
|
31
|
+
children: '기본 링크',
|
|
32
|
+
href: '#',
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const AriaSelectedTrue: Story = {
|
|
37
|
+
name: 'AriaSelectedTrue',
|
|
38
|
+
args: {
|
|
39
|
+
children: 'aria selected',
|
|
40
|
+
href: '#',
|
|
41
|
+
'aria-selected': true,
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const AriaSelectedFalse: Story = {
|
|
46
|
+
name: 'AriaSelectedFalse',
|
|
47
|
+
args: {
|
|
48
|
+
children: 'aria not selected',
|
|
49
|
+
href: '#',
|
|
50
|
+
'aria-selected': false,
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export const DisabledLink: Story = {
|
|
55
|
+
name: 'DisabledLink',
|
|
56
|
+
args: {
|
|
57
|
+
children: 'disabled link',
|
|
58
|
+
href: '#',
|
|
59
|
+
'aria-disabled': true,
|
|
60
|
+
},
|
|
61
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { classNames } from '../../shared/wrappers';
|
|
3
|
+
import TripieContainer from '../TripieContainer/TripieContainer';
|
|
4
|
+
import Style from './list.module.scss';
|
|
5
|
+
|
|
6
|
+
const cx = classNames.bind(Style);
|
|
7
|
+
|
|
8
|
+
const List = ({
|
|
9
|
+
children,
|
|
10
|
+
className,
|
|
11
|
+
rowView = false,
|
|
12
|
+
}: {
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
className?: string;
|
|
15
|
+
rowView?: boolean;
|
|
16
|
+
}) => {
|
|
17
|
+
return (
|
|
18
|
+
<TripieContainer margin="m" className={cx(className)} applyMargin="top-bottom">
|
|
19
|
+
<ul className={cx('list', rowView ? 'row-view' : '')}>{children}</ul>
|
|
20
|
+
</TripieContainer>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const ListItem = ({
|
|
25
|
+
children,
|
|
26
|
+
justifyContent = 'flex-start',
|
|
27
|
+
alignItems = 'normal',
|
|
28
|
+
gap = 'default',
|
|
29
|
+
className,
|
|
30
|
+
}: {
|
|
31
|
+
children: ReactNode;
|
|
32
|
+
justifyContent?: 'flex-start' | 'center' | 'flex-end';
|
|
33
|
+
alignItems?: 'normal' | 'center' | 'start' | 'stretch' | 'end';
|
|
34
|
+
gap?: 'default' | 'l'; // 0.5rem 1rem
|
|
35
|
+
className?: string;
|
|
36
|
+
}) => {
|
|
37
|
+
return (
|
|
38
|
+
<li
|
|
39
|
+
className={cx(
|
|
40
|
+
'list-item',
|
|
41
|
+
`justify-content-${justifyContent}`,
|
|
42
|
+
`align-items-${alignItems}`,
|
|
43
|
+
`gap-${gap}`,
|
|
44
|
+
className
|
|
45
|
+
)}
|
|
46
|
+
>
|
|
47
|
+
{children}
|
|
48
|
+
</li>
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const GridList = ({ children, className }: { children: ReactNode; className?: string }) => {
|
|
53
|
+
return (
|
|
54
|
+
<TripieContainer margin="m" className={cx(className)} applyMargin="top-bottom">
|
|
55
|
+
<ul className={cx('list', 'wrap')}>{children}</ul>
|
|
56
|
+
</TripieContainer>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
List.Item = ListItem;
|
|
61
|
+
List.Grid = GridList;
|
|
62
|
+
|
|
63
|
+
export default List;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
|
+
import { useAppTheme } from '../../hooks';
|
|
5
|
+
import Icon from '../TripieIcon/Icon';
|
|
6
|
+
import List, { ListItem } from './List';
|
|
7
|
+
|
|
8
|
+
const meta: Meta<typeof ListItem> = {
|
|
9
|
+
title: 'tripie-ui/List/Item',
|
|
10
|
+
component: List,
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
argTypes: {
|
|
13
|
+
alignItems: {
|
|
14
|
+
options: ['normal', 'center', 'start', 'stretch', 'end'],
|
|
15
|
+
control: { type: 'radio' },
|
|
16
|
+
},
|
|
17
|
+
justifyContent: {
|
|
18
|
+
options: ['flex-start', 'center', 'flex-end'],
|
|
19
|
+
control: { type: 'radio' },
|
|
20
|
+
},
|
|
21
|
+
gap: {
|
|
22
|
+
options: ['default', 'l'],
|
|
23
|
+
control: { type: 'radio' },
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
decorators: [
|
|
27
|
+
(story, context) => {
|
|
28
|
+
const { mode, setMode } = useAppTheme();
|
|
29
|
+
const selectedTheme = context.globals.theme || mode;
|
|
30
|
+
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
setMode(selectedTheme);
|
|
33
|
+
}, [selectedTheme]);
|
|
34
|
+
|
|
35
|
+
return <div className={`${context.globals.theme}`}>{story()}</div>;
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
parameters: { docs: { description: { component: '' } } },
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const Default: Story = {
|
|
42
|
+
name: 'Default',
|
|
43
|
+
render: args => {
|
|
44
|
+
return (
|
|
45
|
+
<List.Item alignItems="normal" {...args}>
|
|
46
|
+
<Icon />
|
|
47
|
+
list item
|
|
48
|
+
</List.Item>
|
|
49
|
+
);
|
|
50
|
+
},
|
|
51
|
+
args: {
|
|
52
|
+
alignItems: 'normal',
|
|
53
|
+
justifyContent: 'flex-start',
|
|
54
|
+
gap: 'default',
|
|
55
|
+
},
|
|
56
|
+
argTypes: {
|
|
57
|
+
alignItems: {
|
|
58
|
+
control: 'select',
|
|
59
|
+
defaultValue: 'normal',
|
|
60
|
+
description: 'flex 속성 align-items과 유사하게 동작, 직계 자식들을 교차축에 따라 정렬',
|
|
61
|
+
table: {
|
|
62
|
+
type: { summary: "'normal' | 'center' |'start' | 'stretch' | 'end'" },
|
|
63
|
+
defaultValue: { summary: 'normal' },
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
justifyContent: {
|
|
67
|
+
control: 'select',
|
|
68
|
+
defaultValue: 'flex-start',
|
|
69
|
+
description:
|
|
70
|
+
'flex 속성 justify-content과 유사하게 동작, "flex-start" 설정 시 플렉스 항목들을 축의 시작 부분에 정렬, "center" 설정 시 항목들을 축의 중심 부분에 정렬, "flex-end" 정렬 시 플렉스 항목들을 축의 끝 부분에 정렬',
|
|
71
|
+
table: {
|
|
72
|
+
type: { summary: "'flex-start' | 'center' | 'flex-end'" },
|
|
73
|
+
defaultValue: { summary: 'flex-start' },
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
gap: {
|
|
77
|
+
control: 'select',
|
|
78
|
+
defaultValue: 'default',
|
|
79
|
+
description: 'flex gap 속성을 "default"로 설정시 0.5rem, "l"로 설정 시 1rem',
|
|
80
|
+
table: {
|
|
81
|
+
type: { summary: "'default' | 'l'" },
|
|
82
|
+
defaultValue: { summary: 'default' },
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export default meta;
|
|
89
|
+
type Story = StoryObj<typeof meta>;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
@use '../../variables' as *;
|
|
2
|
+
@use '../../mixins' as *;
|
|
3
|
+
|
|
4
|
+
.list {
|
|
5
|
+
list-style: none;
|
|
6
|
+
padding: 0;
|
|
7
|
+
margin: 0;
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
gap: 1rem;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
width: 100%;
|
|
12
|
+
|
|
13
|
+
&.row-view {
|
|
14
|
+
flex-direction: row;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.wrap {
|
|
19
|
+
@include grid-wrap;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@mixin gap($size: 'default') {
|
|
23
|
+
gap: if($size == 'l', 1rem, 0.5rem);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.list-item {
|
|
27
|
+
display: inline-flex;
|
|
28
|
+
width: 100%;
|
|
29
|
+
|
|
30
|
+
&.justify-content-flex-start {
|
|
31
|
+
justify-content: flex-start;
|
|
32
|
+
}
|
|
33
|
+
&.justify-content-center {
|
|
34
|
+
justify-content: center;
|
|
35
|
+
}
|
|
36
|
+
&.justify-content-flex-end {
|
|
37
|
+
justify-content: flex-end;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&.align-items-start {
|
|
41
|
+
align-items: flex-start;
|
|
42
|
+
}
|
|
43
|
+
&.align-items-center {
|
|
44
|
+
align-items: center;
|
|
45
|
+
}
|
|
46
|
+
&.align-items-end {
|
|
47
|
+
align-items: flex-end;
|
|
48
|
+
}
|
|
49
|
+
&.align-items-stretch {
|
|
50
|
+
align-items: stretch;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&.gap-l {
|
|
54
|
+
@include gap('l');
|
|
55
|
+
}
|
|
56
|
+
&.gap-default {
|
|
57
|
+
@include gap('default');
|
|
58
|
+
}
|
|
59
|
+
}
|