@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,36 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
|
+
import { useAppTheme } from '../../hooks';
|
|
5
|
+
import { useCycle } from '../../hooks/useCycle';
|
|
6
|
+
import Switch from './Switch';
|
|
7
|
+
|
|
8
|
+
const meta: Meta<typeof Switch> = {
|
|
9
|
+
title: 'tripie-ui/Switch',
|
|
10
|
+
component: Switch,
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
argTypes: {},
|
|
13
|
+
decorators: [
|
|
14
|
+
(story, context) => {
|
|
15
|
+
const { mode, setMode } = useAppTheme();
|
|
16
|
+
const selectedTheme = context.globals.theme || mode;
|
|
17
|
+
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
setMode(selectedTheme);
|
|
20
|
+
}, [selectedTheme]);
|
|
21
|
+
|
|
22
|
+
return <div className={`${context.globals.theme}`}>{story()}</div>;
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default meta;
|
|
28
|
+
type Story = StoryObj<typeof meta>;
|
|
29
|
+
|
|
30
|
+
export const Default: Story = {
|
|
31
|
+
name: 'Particle',
|
|
32
|
+
render: () => {
|
|
33
|
+
const [current, cycle] = useCycle('off', 'on');
|
|
34
|
+
return <Switch current={current} cycle={cycle} text={current} />;
|
|
35
|
+
},
|
|
36
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import COLORS from '../../shared/colors';
|
|
2
|
+
import { MotionProps } from '../../shared/wrappers/motion-wrapper';
|
|
3
|
+
|
|
4
|
+
export const SWITCH_VARIANTS = {
|
|
5
|
+
BACKGROUND: {
|
|
6
|
+
off: () => ({
|
|
7
|
+
backgroundColor: COLORS[40],
|
|
8
|
+
borderColor: COLORS[400],
|
|
9
|
+
}),
|
|
10
|
+
on: () => ({
|
|
11
|
+
backgroundColor: COLORS[50],
|
|
12
|
+
borderColor: COLORS[50],
|
|
13
|
+
}),
|
|
14
|
+
} as MotionProps['variants'],
|
|
15
|
+
BUTTON: {
|
|
16
|
+
off: () => ({
|
|
17
|
+
x: '150%',
|
|
18
|
+
backgroundColor: COLORS[40],
|
|
19
|
+
}),
|
|
20
|
+
on: () => ({
|
|
21
|
+
x: '30%',
|
|
22
|
+
backgroundColor: COLORS[50],
|
|
23
|
+
}),
|
|
24
|
+
} as MotionProps['variants'],
|
|
25
|
+
TEXT: {
|
|
26
|
+
off: () => ({
|
|
27
|
+
x: '0%',
|
|
28
|
+
}),
|
|
29
|
+
on: () => ({
|
|
30
|
+
x: '200%',
|
|
31
|
+
color: COLORS[50],
|
|
32
|
+
}),
|
|
33
|
+
} as MotionProps['variants'],
|
|
34
|
+
};
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Container } from '..';
|
|
3
|
+
|
|
4
|
+
import { classNames, Motion, MotionProps } from '../../shared/wrappers';
|
|
5
|
+
import TripieContainer from '../TripieContainer/TripieContainer';
|
|
6
|
+
import Style from './text.module.scss';
|
|
7
|
+
import { VARIANTS } from './variants';
|
|
8
|
+
|
|
9
|
+
const cx = classNames.bind(Style);
|
|
10
|
+
|
|
11
|
+
export interface TextProps {
|
|
12
|
+
size?: 'default' | 'h0' | 'h1' | 'h2' | 'h3' | 'h4' | 'text' | 'small' | 'tiny';
|
|
13
|
+
bold?: boolean;
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const Text = ({ children, className, size = 'default', bold = false, ...props }: Readonly<TextProps>) => {
|
|
19
|
+
const splitText = `${children}`.split('\n').map((sentence, index) => {
|
|
20
|
+
return (
|
|
21
|
+
<span className={cx('text', bold ? 'bold' : '', size, className)} key={index + sentence} {...props}>
|
|
22
|
+
{sentence}
|
|
23
|
+
</span>
|
|
24
|
+
);
|
|
25
|
+
});
|
|
26
|
+
return <>{splitText}</>;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const AccentedText = ({ children, className, bold, size = 'default', ...props }: Readonly<TextProps>) => {
|
|
30
|
+
return (
|
|
31
|
+
<span className={cx('text', 'accented', size, bold ? 'bold' : '', className)} {...props}>
|
|
32
|
+
{children}
|
|
33
|
+
</span>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export const FlickText = ({
|
|
38
|
+
children,
|
|
39
|
+
className,
|
|
40
|
+
}: Readonly<{
|
|
41
|
+
children: ReactNode;
|
|
42
|
+
className?: string;
|
|
43
|
+
}>) => {
|
|
44
|
+
return (
|
|
45
|
+
<Motion.Span className={cx('flick', className)} variants={VARIANTS['TEXT']}>
|
|
46
|
+
{children}
|
|
47
|
+
</Motion.Span>
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const FlickText2 = ({
|
|
52
|
+
children,
|
|
53
|
+
className,
|
|
54
|
+
}: Readonly<{
|
|
55
|
+
children: ReactNode;
|
|
56
|
+
className?: string;
|
|
57
|
+
}>) => {
|
|
58
|
+
return (
|
|
59
|
+
<Motion.Span className={cx('flick', className)} variants={VARIANTS['FLICK_TEXT']}>
|
|
60
|
+
{children}
|
|
61
|
+
</Motion.Span>
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const AnimatedText = ({
|
|
66
|
+
children,
|
|
67
|
+
className,
|
|
68
|
+
disabled = false,
|
|
69
|
+
otherChild = children,
|
|
70
|
+
withBorder = false,
|
|
71
|
+
animate = 'rest',
|
|
72
|
+
action
|
|
73
|
+
}: Readonly<{
|
|
74
|
+
children: ReactNode;
|
|
75
|
+
disabled?: boolean;
|
|
76
|
+
otherChild?: ReactNode;
|
|
77
|
+
className?: string;
|
|
78
|
+
withBorder?: boolean;
|
|
79
|
+
animate?: 'rest' | 'hover';
|
|
80
|
+
action?:()=>void;
|
|
81
|
+
}>) => {
|
|
82
|
+
return (
|
|
83
|
+
<Motion.Div
|
|
84
|
+
className={cx('animated-text', withBorder && 'with-border', className)}
|
|
85
|
+
initial="rest"
|
|
86
|
+
whileHover={disabled ? 'rest' : 'hover'}
|
|
87
|
+
whileTap={disabled ? 'rest' : 'hover'}
|
|
88
|
+
animate={animate}
|
|
89
|
+
onTap={action}
|
|
90
|
+
>
|
|
91
|
+
<FlickText2>{children}</FlickText2>
|
|
92
|
+
<Container applyMargin="top"> </Container>
|
|
93
|
+
<FlickText2 className={cx('hovered')}>{otherChild}</FlickText2>
|
|
94
|
+
</Motion.Div>
|
|
95
|
+
);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const JumpingText = ({
|
|
99
|
+
children,
|
|
100
|
+
className,
|
|
101
|
+
}: Readonly<{
|
|
102
|
+
children: string;
|
|
103
|
+
className?: string;
|
|
104
|
+
}>) => {
|
|
105
|
+
return (
|
|
106
|
+
<TripieContainer className={cx('box')} margin="none">
|
|
107
|
+
{children.split('').map((item: string, index: number) => (
|
|
108
|
+
<Motion.Span
|
|
109
|
+
key={index + item}
|
|
110
|
+
className={cx('box', className)}
|
|
111
|
+
animate={{ y: [-5, 0] }}
|
|
112
|
+
transition={{
|
|
113
|
+
delay: index * 0.1,
|
|
114
|
+
duration: 0.5,
|
|
115
|
+
repeat: Infinity,
|
|
116
|
+
repeatType: 'reverse',
|
|
117
|
+
}}
|
|
118
|
+
>
|
|
119
|
+
{item}
|
|
120
|
+
</Motion.Span>
|
|
121
|
+
))}
|
|
122
|
+
</TripieContainer>
|
|
123
|
+
);
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
const SlidingText = ({
|
|
127
|
+
children,
|
|
128
|
+
className,
|
|
129
|
+
transition,
|
|
130
|
+
animate = 'fly',
|
|
131
|
+
duration = 5,
|
|
132
|
+
}: Readonly<{
|
|
133
|
+
children: ReactNode;
|
|
134
|
+
className?: string;
|
|
135
|
+
animate?: 'rest' | 'fly';
|
|
136
|
+
transition?: MotionProps['animationProps']['transition'];
|
|
137
|
+
duration?: number;
|
|
138
|
+
}>) => {
|
|
139
|
+
return (
|
|
140
|
+
<Motion.Div
|
|
141
|
+
className={cx(className)}
|
|
142
|
+
initial="rest"
|
|
143
|
+
animate={animate}
|
|
144
|
+
transition={transition}
|
|
145
|
+
variants={VARIANTS.SLIDE(duration)}
|
|
146
|
+
>
|
|
147
|
+
{children}
|
|
148
|
+
</Motion.Div>
|
|
149
|
+
);
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
Text.Accented = AccentedText;
|
|
153
|
+
Text.Slide = SlidingText;
|
|
154
|
+
Text.Animated = AnimatedText;
|
|
155
|
+
Text.Flick = FlickText;
|
|
156
|
+
Text.Jump = JumpingText;
|
|
157
|
+
|
|
158
|
+
export default Text;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
@use '../../base/' as *;
|
|
2
|
+
@use '../../functions/' as *;
|
|
3
|
+
@use '../../generator/' as *;
|
|
4
|
+
@use '../../mixins/' as *;
|
|
5
|
+
@use '../TripieButton/Animated/animated-button.module' as *;
|
|
6
|
+
@use '../../mixins.scss' as *;
|
|
7
|
+
|
|
8
|
+
@use 'sass:map';
|
|
9
|
+
|
|
10
|
+
.text {
|
|
11
|
+
@include word-wrap;
|
|
12
|
+
font-size: font-size(text);
|
|
13
|
+
&[aria-selected='false'] {
|
|
14
|
+
color: color(default, 500);
|
|
15
|
+
}
|
|
16
|
+
&[aria-selected='true'] {
|
|
17
|
+
color: color(default, 900);
|
|
18
|
+
}
|
|
19
|
+
color: inherit;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.flick {
|
|
23
|
+
z-index: 30;
|
|
24
|
+
width: fit-content;
|
|
25
|
+
height: 3rem;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.min {
|
|
29
|
+
min-width: 9rem;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.dim {
|
|
33
|
+
color: color(default, 500);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.primary {
|
|
37
|
+
color: color(primary, 900);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.secondary {
|
|
41
|
+
color: color(primary, 600);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.gray {
|
|
45
|
+
color: color(default, 800);
|
|
46
|
+
}
|
|
47
|
+
.danger {
|
|
48
|
+
color: color(danger, 600);
|
|
49
|
+
}
|
|
50
|
+
.warning {
|
|
51
|
+
color: color(warning, 300);
|
|
52
|
+
}
|
|
53
|
+
.emphasize {
|
|
54
|
+
color: color(primary, 700);
|
|
55
|
+
}
|
|
56
|
+
.box {
|
|
57
|
+
& > span {
|
|
58
|
+
position: relative;
|
|
59
|
+
display: inline-block;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.accented {
|
|
64
|
+
@include accented;
|
|
65
|
+
font-size: inherit;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.animated-text {
|
|
69
|
+
overflow-y: hidden;
|
|
70
|
+
color: inherit;
|
|
71
|
+
display: inline-flex;
|
|
72
|
+
height: 2rem;
|
|
73
|
+
flex-direction: column;
|
|
74
|
+
&:hover{
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
.small {
|
|
79
|
+
font-size: 0.8rem;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.bold {
|
|
83
|
+
font-weight: font-weight(bold);
|
|
84
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
import { useAppTheme } from '../../hooks';
|
|
4
|
+
import Text from './Text';
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof Text> = {
|
|
7
|
+
title: 'tripie-ui/Typography/Text',
|
|
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: 'default 기본',
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const Accented: Story = {
|
|
36
|
+
name: 'Text.Accented',
|
|
37
|
+
render: () => <Text.Accented>accented text</Text.Accented>,
|
|
38
|
+
};
|
|
39
|
+
export const Animated: Story = {
|
|
40
|
+
name: 'Text.Animated',
|
|
41
|
+
render: () => <Text.Animated otherChild={'other text'}>animated text</Text.Animated>,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const JumpingText: Story = {
|
|
45
|
+
name: 'Text.Jump',
|
|
46
|
+
render: () => <Text.Jump>jumping text</Text.Jump>,
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const SlidingText: Story = {
|
|
50
|
+
name: 'Text.Slide',
|
|
51
|
+
render: () => <Text.Slide>sliding text</Text.Slide>,
|
|
52
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { MotionProps } from '../../shared/wrappers/motion-wrapper';
|
|
2
|
+
|
|
3
|
+
export const VARIANTS = {
|
|
4
|
+
FLICK_TEXT: {
|
|
5
|
+
rest: {
|
|
6
|
+
opacity: 1,
|
|
7
|
+
y: '0',
|
|
8
|
+
},
|
|
9
|
+
hover: {
|
|
10
|
+
opacity: 1,
|
|
11
|
+
y: '-3rem',
|
|
12
|
+
transition: {
|
|
13
|
+
bounce: 0,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
TEXT: {
|
|
18
|
+
rest: {
|
|
19
|
+
opacity: 1,
|
|
20
|
+
y: '2rem',
|
|
21
|
+
},
|
|
22
|
+
hover: {
|
|
23
|
+
opacity: 1,
|
|
24
|
+
y: '-2rem',
|
|
25
|
+
transition: {
|
|
26
|
+
bounce: 0,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
TITLE: (restY: number, hoverY: number) => ({
|
|
32
|
+
rest: { opacity: 1, y: restY, duration: 0.5 },
|
|
33
|
+
hover: {
|
|
34
|
+
opacity: 1,
|
|
35
|
+
y: hoverY,
|
|
36
|
+
transition: {
|
|
37
|
+
duration: 0.5,
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
}),
|
|
41
|
+
SLIDE: (duration: number) =>
|
|
42
|
+
({
|
|
43
|
+
rest: () => ({}),
|
|
44
|
+
fly: () => ({
|
|
45
|
+
translateX: '100vw',
|
|
46
|
+
transition: {
|
|
47
|
+
repeat: Infinity,
|
|
48
|
+
duration: duration,
|
|
49
|
+
bounce: 1,
|
|
50
|
+
},
|
|
51
|
+
}),
|
|
52
|
+
}) as MotionProps['variants'],
|
|
53
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { classNames, Motion, MotionProps } from '../../shared/wrappers';
|
|
2
|
+
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
import { InView } from 'react-intersection-observer';
|
|
5
|
+
import COLORS from '../../shared/colors';
|
|
6
|
+
|
|
7
|
+
import { CustomAnimationProps } from '../TripieCard';
|
|
8
|
+
import TripieContainer from '../TripieContainer/TripieContainer';
|
|
9
|
+
import Style from './text-fill-animation.module.scss';
|
|
10
|
+
|
|
11
|
+
const cx = classNames.bind(Style);
|
|
12
|
+
|
|
13
|
+
const TextFillAnimation = ({
|
|
14
|
+
text,
|
|
15
|
+
baseColor,
|
|
16
|
+
endColor = COLORS[0],
|
|
17
|
+
duration = 1,
|
|
18
|
+
delay = 0,
|
|
19
|
+
replays = true,
|
|
20
|
+
}: Partial<CustomAnimationProps>) => {
|
|
21
|
+
return (
|
|
22
|
+
<InView>
|
|
23
|
+
{({ inView, ref }) => (
|
|
24
|
+
<TripieContainer margin="none" className={cx('animation', baseColor == null ? 'default' : '')} ref={ref}>
|
|
25
|
+
<span className={cx('wrap')}>
|
|
26
|
+
{text}
|
|
27
|
+
<Motion.Span
|
|
28
|
+
className={cx('text')}
|
|
29
|
+
style={
|
|
30
|
+
{
|
|
31
|
+
color: baseColor ?? endColor,
|
|
32
|
+
} as MotionProps['motionStyle']
|
|
33
|
+
}
|
|
34
|
+
animate={inView ? 'visible' : 'hidden'}
|
|
35
|
+
initial={{ width: '0%' }}
|
|
36
|
+
variants={{
|
|
37
|
+
visible: { width: '100%' },
|
|
38
|
+
hidden: { width: '0%' },
|
|
39
|
+
}}
|
|
40
|
+
transition={{ baseColor, endColor, duration, delay, replays }}
|
|
41
|
+
>
|
|
42
|
+
{text}
|
|
43
|
+
</Motion.Span>
|
|
44
|
+
</span>
|
|
45
|
+
</TripieContainer>
|
|
46
|
+
)}
|
|
47
|
+
</InView>
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const TitleTextFillAnimation = ({
|
|
52
|
+
children,
|
|
53
|
+
repeat = 1,
|
|
54
|
+
duration = 1,
|
|
55
|
+
}: Readonly<{
|
|
56
|
+
children: ReactNode;
|
|
57
|
+
repeat?: number;
|
|
58
|
+
duration?: number;
|
|
59
|
+
}>) => {
|
|
60
|
+
return (
|
|
61
|
+
<InView>
|
|
62
|
+
{({ inView, ref }) => (
|
|
63
|
+
<div className={cx('animation', 'pre-title', 'default')} ref={ref}>
|
|
64
|
+
<span className={cx('wrap')}>
|
|
65
|
+
{children}
|
|
66
|
+
<Motion.Span
|
|
67
|
+
className={cx('text', 'title')}
|
|
68
|
+
animate={inView ? 'visible' : 'hidden'}
|
|
69
|
+
initial={{ width: '0%' }}
|
|
70
|
+
variants={{
|
|
71
|
+
visible: { width: '100%' },
|
|
72
|
+
hidden: { width: '0%' },
|
|
73
|
+
}}
|
|
74
|
+
transition={{ repeat, duration }}
|
|
75
|
+
>
|
|
76
|
+
{children}
|
|
77
|
+
</Motion.Span>
|
|
78
|
+
</span>
|
|
79
|
+
</div>
|
|
80
|
+
)}
|
|
81
|
+
</InView>
|
|
82
|
+
);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
TextFillAnimation.Title = TitleTextFillAnimation;
|
|
86
|
+
|
|
87
|
+
export default TextFillAnimation;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
@use '../../variables' as *;
|
|
2
|
+
|
|
3
|
+
.title {
|
|
4
|
+
font-weight: bold;
|
|
5
|
+
background: linear-gradient(to top, $theme-600 2%, $theme-50);
|
|
6
|
+
background-clip: text;
|
|
7
|
+
color: transparent;
|
|
8
|
+
background-repeat: no-repeat;
|
|
9
|
+
background-size: 100%;
|
|
10
|
+
font-size: 55px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.pre-title {
|
|
14
|
+
font-weight: bold;
|
|
15
|
+
font-size: 55px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.animation {
|
|
19
|
+
width: '100%';
|
|
20
|
+
white-space: 'nowrap';
|
|
21
|
+
}
|
|
22
|
+
.default {
|
|
23
|
+
color: $theme-600;
|
|
24
|
+
}
|
|
25
|
+
.wrap {
|
|
26
|
+
position: relative;
|
|
27
|
+
display: inline-block;
|
|
28
|
+
text-wrap: nowrap;
|
|
29
|
+
}
|
|
30
|
+
.text {
|
|
31
|
+
position: absolute;
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
top: 0;
|
|
34
|
+
left: 0;
|
|
35
|
+
width: 0%;
|
|
36
|
+
white-space: nowrap;
|
|
37
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
|
+
|
|
5
|
+
import { useAppTheme } from '../../hooks';
|
|
6
|
+
import COLORS from '../../shared/colors';
|
|
7
|
+
import TextFillAnimation from './TextFillAnimation';
|
|
8
|
+
|
|
9
|
+
const meta: Meta<typeof TextFillAnimation> = {
|
|
10
|
+
title: 'tripie-ui/TextFillAnimation',
|
|
11
|
+
component: TextFillAnimation,
|
|
12
|
+
tags: ['autodocs'],
|
|
13
|
+
argTypes: {},
|
|
14
|
+
parameters: {
|
|
15
|
+
docs: {
|
|
16
|
+
description: {
|
|
17
|
+
component: '텍스트 색상이 채워지는 애니메이션 효과를 지닌 컴포넌트입니다.',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
decorators: [
|
|
22
|
+
(story, context) => {
|
|
23
|
+
const { mode, setMode } = useAppTheme();
|
|
24
|
+
const selectedTheme = context.globals.theme || mode;
|
|
25
|
+
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
setMode(selectedTheme);
|
|
28
|
+
}, [selectedTheme]);
|
|
29
|
+
|
|
30
|
+
return <div className={`${context.globals.theme}`}>{story()}</div>;
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export default meta;
|
|
36
|
+
type Story = StoryObj<typeof meta>;
|
|
37
|
+
|
|
38
|
+
export const Default: Story = {
|
|
39
|
+
name: 'Default',
|
|
40
|
+
render: () => <TextFillAnimation text={'Text fill animation'} />,
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const CustomStart_COLORS40: Story = {
|
|
44
|
+
name: 'TextFillAnimation.START_#858585',
|
|
45
|
+
render: () => <TextFillAnimation text={'Text fill animation'} baseColor={COLORS['40']} />,
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const CustomEnd_COLORS40: Story = {
|
|
49
|
+
name: 'TextFillAnimation.END_#858585',
|
|
50
|
+
render: () => <TextFillAnimation text={'Text fill animation'} endColor={COLORS['40']} />,
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export const CustomStart_COLORS50End_COLOR40: Story = {
|
|
54
|
+
name: 'TextFillAnimation.START_#d3ffca.END_#858585',
|
|
55
|
+
render: () => <TextFillAnimation text={'Text fill animation'} baseColor={COLORS['50']} endColor={COLORS['40']} />,
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export const TitleTextFillAnimation: Story = {
|
|
59
|
+
name: 'TextFillAnimation.Title',
|
|
60
|
+
render: () => <TextFillAnimation.Title repeat={Infinity}>Title text fill animation</TextFillAnimation.Title>,
|
|
61
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
import { classNames, Motion, MotionProps } from '../../shared/wrappers';
|
|
4
|
+
|
|
5
|
+
import Divider from '../Divider';
|
|
6
|
+
import Style from './text-underline.module.scss';
|
|
7
|
+
import { TEXT_UNDERLINE_VARIANTS } from './variants';
|
|
8
|
+
|
|
9
|
+
const cx = classNames.bind(Style);
|
|
10
|
+
|
|
11
|
+
const TextUnderLineAnimation = ({
|
|
12
|
+
children,
|
|
13
|
+
onClick,
|
|
14
|
+
className,
|
|
15
|
+
}: {
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
onClick?: () => void;
|
|
18
|
+
className?: string;
|
|
19
|
+
}) => {
|
|
20
|
+
return (
|
|
21
|
+
<Motion.Div
|
|
22
|
+
className={cx('wrap', className)}
|
|
23
|
+
onClick={onClick}
|
|
24
|
+
variants={TEXT_UNDERLINE_VARIANTS}
|
|
25
|
+
whileHover={'open'}
|
|
26
|
+
whileTap={'open'}
|
|
27
|
+
>
|
|
28
|
+
{children}
|
|
29
|
+
<Divider
|
|
30
|
+
variants={TEXT_UNDERLINE_VARIANTS.DIVIDER as unknown as MotionProps['variants']}
|
|
31
|
+
className={cx('divider')}
|
|
32
|
+
/>
|
|
33
|
+
</Motion.Div>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export default TextUnderLineAnimation;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
|
+
import { useAppTheme } from '../../hooks';
|
|
5
|
+
import TextUnderlineAnimation from './TextUnderlineAnimation';
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof TextUnderlineAnimation> = {
|
|
8
|
+
title: 'tripie-ui/TextUnderlineAnimation',
|
|
9
|
+
component: TextUnderlineAnimation,
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
parameters: {
|
|
12
|
+
docs: {
|
|
13
|
+
description: {
|
|
14
|
+
component: '호버 시 텍스트 밑줄 애니메이션이 동작하는 컴포넌트입니다.',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
argTypes: {},
|
|
19
|
+
decorators: [
|
|
20
|
+
(story, context) => {
|
|
21
|
+
const { mode, setMode } = useAppTheme();
|
|
22
|
+
const selectedTheme = context.globals.theme || mode;
|
|
23
|
+
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
setMode(selectedTheme);
|
|
26
|
+
}, [selectedTheme]);
|
|
27
|
+
|
|
28
|
+
return <div className={`${context.globals.theme}`}>{story()}</div>;
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export default meta;
|
|
34
|
+
type Story = StoryObj<typeof meta>;
|
|
35
|
+
|
|
36
|
+
export const Default: Story = {
|
|
37
|
+
name: 'TextUnderlineAnimation',
|
|
38
|
+
args: { children: 'hover to activate text underline animation' },
|
|
39
|
+
};
|