@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,81 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
import { useAppTheme } from '../../hooks';
|
|
4
|
+
import TripieContainer from './TripieContainer';
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof TripieContainer> = {
|
|
7
|
+
title: 'tripie-ui/Container',
|
|
8
|
+
component: TripieContainer,
|
|
9
|
+
tags: ['autodocs'],
|
|
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
|
+
type Story = StoryObj<typeof meta>;
|
|
26
|
+
|
|
27
|
+
export const Default: Story = {
|
|
28
|
+
name: 'Margin-Default',
|
|
29
|
+
args: {
|
|
30
|
+
children: 'default container',
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export const PreserveWhiteSpace: Story = {
|
|
35
|
+
name: 'PreserveWhiteSpace',
|
|
36
|
+
args: {
|
|
37
|
+
children: 'preserve white space =true 설정 시 \n 줄바꿈 이스케이프 문자열 줄바꿈이 유지됩니다.',
|
|
38
|
+
preserveWhiteSpace: true,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const AllDefault: Story = {
|
|
43
|
+
name: 'Margin-m',
|
|
44
|
+
args: {
|
|
45
|
+
children: 'MarginAll m container',
|
|
46
|
+
margin: 'm',
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const AllXsm: Story = {
|
|
51
|
+
name: 'Margin-xm',
|
|
52
|
+
args: {
|
|
53
|
+
children: 'm container',
|
|
54
|
+
margin: 'xsm',
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export const AllSm: Story = {
|
|
59
|
+
name: 'Margin-sm',
|
|
60
|
+
args: {
|
|
61
|
+
children: 'sm container',
|
|
62
|
+
|
|
63
|
+
margin: 'sm',
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export const AllL: Story = {
|
|
68
|
+
name: 'Margin-l',
|
|
69
|
+
args: {
|
|
70
|
+
children: ' l container',
|
|
71
|
+
margin: 'l',
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export const AllXl: Story = {
|
|
76
|
+
name: 'Margin-xl',
|
|
77
|
+
args: {
|
|
78
|
+
children: ' xl container',
|
|
79
|
+
margin: 'xl',
|
|
80
|
+
},
|
|
81
|
+
};
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { classNames, Motion, MotionProps } from '../../shared/wrappers';
|
|
3
|
+
|
|
4
|
+
import { useRouter } from 'next/navigation';
|
|
5
|
+
import { ReactNode } from 'react';
|
|
6
|
+
import Style from './icon.module.scss';
|
|
7
|
+
|
|
8
|
+
import { ICON_RESOURCE } from '../../shared/resource';
|
|
9
|
+
import { ICON_VARIANTS } from './variants';
|
|
10
|
+
|
|
11
|
+
const cx = classNames.bind(Style);
|
|
12
|
+
|
|
13
|
+
export type MotionSlideUpProps = Partial<MotionProps['animationProps']> & { children?: ReactNode; className?: string };
|
|
14
|
+
|
|
15
|
+
export type Transport = 'WALK' | 'TRAM' | 'TRAIN' | 'SHIP' | 'BUS' | 'FLAG' | 'CAR';
|
|
16
|
+
|
|
17
|
+
export type IconProps = {
|
|
18
|
+
className?: string;
|
|
19
|
+
withBorder?: boolean;
|
|
20
|
+
onTapStart?: () => void;
|
|
21
|
+
animate?: MotionProps['animationProps']['animate'];
|
|
22
|
+
variants?: MotionProps['variants'];
|
|
23
|
+
src?: string;
|
|
24
|
+
transition?: MotionProps['animationProps']['transition'];
|
|
25
|
+
onTap?: () => void;
|
|
26
|
+
sizes?: 'large' | 'icon';
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const Icon = ({
|
|
30
|
+
className,
|
|
31
|
+
onTapStart,
|
|
32
|
+
src = ICON_RESOURCE('ARROW'),
|
|
33
|
+
animate,
|
|
34
|
+
sizes = 'icon',
|
|
35
|
+
variants = ICON_VARIANTS.DEFAULT,
|
|
36
|
+
transition,
|
|
37
|
+
}: Readonly<IconProps>) => {
|
|
38
|
+
return (
|
|
39
|
+
<Motion.Img
|
|
40
|
+
onTapStart={onTapStart}
|
|
41
|
+
className={cx(sizes, className)}
|
|
42
|
+
variants={variants}
|
|
43
|
+
transition={transition}
|
|
44
|
+
animate={animate}
|
|
45
|
+
src={src}
|
|
46
|
+
alt={`${src} icon`}
|
|
47
|
+
/>
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export type NavigationDirection = { direction?: 'back' | 'front'; disabled?: boolean; navigateUrl?: string };
|
|
52
|
+
export type NavigationIconProps = IconProps & NavigationDirection;
|
|
53
|
+
|
|
54
|
+
const NavigateIcon = ({
|
|
55
|
+
className,
|
|
56
|
+
direction = 'back',
|
|
57
|
+
src,
|
|
58
|
+
sizes = 'icon',
|
|
59
|
+
animate,
|
|
60
|
+
disabled,
|
|
61
|
+
onTapStart,
|
|
62
|
+
navigateUrl,
|
|
63
|
+
variants = ICON_VARIANTS.NAVIGATE(direction),
|
|
64
|
+
transition,
|
|
65
|
+
}: Readonly<NavigationIconProps>) => {
|
|
66
|
+
const navigate = useRouter();
|
|
67
|
+
|
|
68
|
+
const onNavigate = ({ direction }: NavigationDirection) => {
|
|
69
|
+
if (navigateUrl != null) {
|
|
70
|
+
return navigate.replace(navigateUrl);
|
|
71
|
+
}
|
|
72
|
+
direction === 'back' ? navigate.back() : navigate.forward();
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<Motion.Button
|
|
77
|
+
disabled={disabled}
|
|
78
|
+
onTapStart={() => {
|
|
79
|
+
onTapStart != null ? onTapStart() : onNavigate({ direction });
|
|
80
|
+
}}
|
|
81
|
+
whileTap={'hover'}
|
|
82
|
+
whileHover={'hover'}
|
|
83
|
+
className={cx(sizes, className)}
|
|
84
|
+
variants={variants}
|
|
85
|
+
transition={transition}
|
|
86
|
+
initial={'closed'}
|
|
87
|
+
animate={animate}
|
|
88
|
+
>
|
|
89
|
+
<img src={ICON_RESOURCE('ARROW')} alt={src + '버튼'} className={cx('icon-image')} />
|
|
90
|
+
</Motion.Button>
|
|
91
|
+
);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const RefreshIcon = ({ className, onTapStart, animate, transition, sizes = 'icon' }: Readonly<IconProps>) => {
|
|
95
|
+
return (
|
|
96
|
+
<Motion.Div
|
|
97
|
+
onTapStart={onTapStart}
|
|
98
|
+
whileTap={'hover'}
|
|
99
|
+
whileHover={'hover'}
|
|
100
|
+
className={cx(sizes, className)}
|
|
101
|
+
variants={ICON_VARIANTS.REFRESH('undo')}
|
|
102
|
+
transition={transition}
|
|
103
|
+
initial={'closed'}
|
|
104
|
+
animate={animate}
|
|
105
|
+
>
|
|
106
|
+
<img src={ICON_RESOURCE('REFRESH')} alt={'새로고침 버튼'} className={cx('icon-image')} />
|
|
107
|
+
</Motion.Div>
|
|
108
|
+
);
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const PlaneIcon = ({ className, sizes = 'icon' }: Readonly<IconProps>) => {
|
|
112
|
+
return (
|
|
113
|
+
<Motion.Img
|
|
114
|
+
variants={ICON_VARIANTS.PLANE}
|
|
115
|
+
animate={'fly'}
|
|
116
|
+
initial={'rotate'}
|
|
117
|
+
src={ICON_RESOURCE('PLANE')}
|
|
118
|
+
alt={'plane icon'}
|
|
119
|
+
className={cx(sizes, 'plane', className)}
|
|
120
|
+
/>
|
|
121
|
+
);
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
const CloudIcon = ({ index = 0, sizes = 'icon' }: { index: number; sizes?: IconProps['sizes'] }) => {
|
|
125
|
+
return (
|
|
126
|
+
<Motion.Img
|
|
127
|
+
variants={ICON_VARIANTS.CLOUD}
|
|
128
|
+
initial={{
|
|
129
|
+
opacity: `${0.2}`,
|
|
130
|
+
translateX: `${80 * (Math.random() * (index + 1))}vw`,
|
|
131
|
+
translateY: `${Math.random() * 100}px`,
|
|
132
|
+
}}
|
|
133
|
+
animate={{ translateX: '-100vw' }}
|
|
134
|
+
transition={{ decelerate: 2, repeat: Infinity, duration: 35, bounce: 0, delay: index * 0.1 }}
|
|
135
|
+
src={ICON_RESOURCE('CLOUD')}
|
|
136
|
+
className={cx(sizes)}
|
|
137
|
+
alt={'cloud icon'}
|
|
138
|
+
/>
|
|
139
|
+
);
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
const LoadingIcon = ({ className, sizes = 'icon' }: Readonly<IconProps>) => {
|
|
143
|
+
return (
|
|
144
|
+
<Motion.Img
|
|
145
|
+
animate={{ rotate: '360deg' }}
|
|
146
|
+
transition={{ repeat: Infinity, duration: 10, bounce: 0 }}
|
|
147
|
+
src={ICON_RESOURCE('LOADING')}
|
|
148
|
+
className={cx(sizes, className)}
|
|
149
|
+
alt={'loading icon'}
|
|
150
|
+
/>
|
|
151
|
+
);
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
const CursorIcon = ({
|
|
155
|
+
hovered = '',
|
|
156
|
+
className,
|
|
157
|
+
transition,
|
|
158
|
+
sizes = 'icon',
|
|
159
|
+
}: Readonly<IconProps> & { hovered?: string }) => {
|
|
160
|
+
return (
|
|
161
|
+
<Motion.Img
|
|
162
|
+
variants={ICON_VARIANTS.CURSOR}
|
|
163
|
+
src={ICON_RESOURCE('CURSOR')}
|
|
164
|
+
initial={'initial'}
|
|
165
|
+
animate={hovered}
|
|
166
|
+
transition={transition}
|
|
167
|
+
alt={'cursor icon'}
|
|
168
|
+
className={cx(sizes, className)}
|
|
169
|
+
/>
|
|
170
|
+
);
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
const ScrollIcon = ({
|
|
174
|
+
hovered = '',
|
|
175
|
+
className,
|
|
176
|
+
next = true,
|
|
177
|
+
transition,
|
|
178
|
+
onTapStart,
|
|
179
|
+
sizes = 'icon',
|
|
180
|
+
}: Readonly<IconProps> & {
|
|
181
|
+
hovered?: string;
|
|
182
|
+
next?: boolean;
|
|
183
|
+
}) => {
|
|
184
|
+
return (
|
|
185
|
+
<Motion.Img
|
|
186
|
+
variants={ICON_VARIANTS.SCROLL(next)}
|
|
187
|
+
onTapStart={onTapStart}
|
|
188
|
+
src={ICON_RESOURCE('NEXT')}
|
|
189
|
+
initial={'initial'}
|
|
190
|
+
animate={hovered}
|
|
191
|
+
alt={'next icon'}
|
|
192
|
+
transition={transition}
|
|
193
|
+
className={cx(sizes, next ? 'next' : 'prev', className)}
|
|
194
|
+
/>
|
|
195
|
+
);
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
const TransportIcon = ({
|
|
199
|
+
active = false,
|
|
200
|
+
type = 'FLAG',
|
|
201
|
+
className,
|
|
202
|
+
sizes = 'icon',
|
|
203
|
+
}: Readonly<IconProps> & {
|
|
204
|
+
active?: boolean;
|
|
205
|
+
type?: Transport;
|
|
206
|
+
}) => {
|
|
207
|
+
return (
|
|
208
|
+
<Motion.Img
|
|
209
|
+
animate={active ? { rotate: [0, 10, -10, 0] } : { rotate: 0 }}
|
|
210
|
+
transition={active ? { repeat: Infinity, repeatType: 'loop', duration: 0.8, ease: 'easeInOut' } : {}}
|
|
211
|
+
className={cx(sizes, className)}
|
|
212
|
+
src={ICON_RESOURCE(type)}
|
|
213
|
+
alt={`${type} 아이콘`}
|
|
214
|
+
/>
|
|
215
|
+
);
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
const XIcon = ({ className, sizes = 'icon' }: Readonly<IconProps>) => {
|
|
219
|
+
return <Motion.Img className={cx(sizes, className)} src={ICON_RESOURCE('X')} alt={`X 아이콘`} />;
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
const CheckIcon = ({ className, sizes = 'icon' }: Readonly<IconProps>) => {
|
|
223
|
+
return <Motion.Img className={cx(sizes, className)} src={ICON_RESOURCE('CHECK')} alt={`체크 아이콘`} />;
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
const AuthIcon = ({ className, sizes = 'icon', src = ICON_RESOURCE('GITHUB') }: Readonly<IconProps>) => {
|
|
227
|
+
return <Motion.Img className={cx(sizes, className)} variants={ICON_VARIANTS.ROTATE} src={src} alt={`oauth 아이콘`} />;
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
Icon.Navigate = NavigateIcon;
|
|
231
|
+
Icon.Refresh = RefreshIcon;
|
|
232
|
+
Icon.Plane = PlaneIcon;
|
|
233
|
+
Icon.Cloud = CloudIcon;
|
|
234
|
+
Icon.Loading = LoadingIcon;
|
|
235
|
+
Icon.Transport = TransportIcon;
|
|
236
|
+
Icon.Cursor = CursorIcon;
|
|
237
|
+
Icon.Scroll = ScrollIcon;
|
|
238
|
+
Icon.X = XIcon;
|
|
239
|
+
Icon.Auth = AuthIcon;
|
|
240
|
+
Icon.Check = CheckIcon;
|
|
241
|
+
|
|
242
|
+
export default Icon;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
|
|
4
|
+
import { useAppTheme } from '../../hooks';
|
|
5
|
+
import Icon from './Icon';
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof Icon> = {
|
|
8
|
+
title: 'tripie-ui/Icon/Transport',
|
|
9
|
+
component: Icon,
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
parameters: {
|
|
12
|
+
docs: {
|
|
13
|
+
description: {
|
|
14
|
+
component: '교통 수단 관련 아이콘 컴포넌트들입니다.',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
decorators: [
|
|
19
|
+
(story, context) => {
|
|
20
|
+
const { mode, setMode } = useAppTheme();
|
|
21
|
+
const selectedTheme = context.globals.theme || mode;
|
|
22
|
+
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
setMode(selectedTheme);
|
|
25
|
+
}, [selectedTheme]);
|
|
26
|
+
|
|
27
|
+
return <div className={`${context.globals.theme}`}>{story()}</div>;
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default meta;
|
|
33
|
+
type Story = StoryObj<typeof meta>;
|
|
34
|
+
|
|
35
|
+
export const TransportIcon: Story = {
|
|
36
|
+
name: 'Icon.Transport',
|
|
37
|
+
render: () => <Icon.Transport />,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export const TransportBusIcon: Story = {
|
|
41
|
+
name: 'Icon.Transport.Bus',
|
|
42
|
+
render: () => <Icon.Transport type={'BUS'} />,
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const TransportActiveBusIcon: Story = {
|
|
46
|
+
name: 'Icon.Transport.Bus.Active',
|
|
47
|
+
render: () => <Icon.Transport active={true} type={'BUS'} />,
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const TransportCarIcon: Story = {
|
|
51
|
+
name: 'Icon.Transport.Car',
|
|
52
|
+
render: () => <Icon.Transport type={'CAR'} />,
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export const TransportActiveCarIcon: Story = {
|
|
56
|
+
name: 'Icon.Transport.Car.Active',
|
|
57
|
+
render: () => <Icon.Transport active={true} type={'CAR'} />,
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const TransportFlagIcon: Story = {
|
|
61
|
+
name: 'Icon.Transport.Flag',
|
|
62
|
+
render: () => <Icon.Transport type={'FLAG'} />,
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const TransportActiveFlagIcon: Story = {
|
|
66
|
+
name: 'Icon.Transport.Flag.Active',
|
|
67
|
+
render: () => <Icon.Transport active={true} type={'FLAG'} />,
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const TransportShipIcon: Story = {
|
|
71
|
+
name: 'Icon.Transport.Ship',
|
|
72
|
+
render: () => <Icon.Transport type={'SHIP'} />,
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export const TransportActiveShipIcon: Story = {
|
|
76
|
+
name: 'Icon.Transport.Ship.Active',
|
|
77
|
+
render: () => <Icon.Transport active={true} type={'SHIP'} />,
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export const TransportTrainIcon: Story = {
|
|
81
|
+
name: 'Icon.Transport.Train',
|
|
82
|
+
render: () => <Icon.Transport type={'TRAIN'} />,
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export const TransportActiveTrainIcon: Story = {
|
|
86
|
+
name: 'Icon.Transport.Train.Active',
|
|
87
|
+
render: () => <Icon.Transport active={true} type={'TRAIN'} />,
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export const TransportTramIcon: Story = {
|
|
91
|
+
name: 'Icon.Transport.Tram',
|
|
92
|
+
render: () => <Icon.Transport type={'TRAM'} />,
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export const TransportActiveTramIcon: Story = {
|
|
96
|
+
name: 'Icon.Transport.Tram.Active',
|
|
97
|
+
render: () => <Icon.Transport active={true} type={'TRAM'} />,
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export const TransportWalkIcon: Story = {
|
|
101
|
+
name: 'Icon.Transport.Walk',
|
|
102
|
+
render: () => <Icon.Transport type={'WALK'} />,
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
export const TransportActiveWalkIcon: Story = {
|
|
106
|
+
name: 'Icon.Transport.Walk.Active',
|
|
107
|
+
render: () => <Icon.Transport active={true} type={'WALK'} />,
|
|
108
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
@mixin sizes($size: 'default') {
|
|
2
|
+
background-color: inherit;
|
|
3
|
+
border: none;
|
|
4
|
+
padding: 0;
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
|
|
9
|
+
@if ($size == 'default') {
|
|
10
|
+
width: 1rem;
|
|
11
|
+
height: 1rem;
|
|
12
|
+
} @else if($size == 'large') {
|
|
13
|
+
height: 2rem;
|
|
14
|
+
width: 2rem;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.icon {
|
|
19
|
+
@include sizes('default');
|
|
20
|
+
}
|
|
21
|
+
.plane {
|
|
22
|
+
@include sizes('default');
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: 50%;
|
|
25
|
+
z-index: 600;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.large {
|
|
29
|
+
@include sizes('large');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.icon-image {
|
|
33
|
+
min-width: 1rem;
|
|
34
|
+
min-height: 1rem;
|
|
35
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
|
|
4
|
+
import { useAppTheme } from '../../hooks';
|
|
5
|
+
import Icon from './Icon';
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof Icon> = {
|
|
8
|
+
title: 'tripie-ui/Icon',
|
|
9
|
+
component: Icon,
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
parameters: {
|
|
12
|
+
docs: {
|
|
13
|
+
description: {
|
|
14
|
+
component: '교통 수단 이외 상호작용이 가능한 모든 아이콘 컴포넌트들입니다.',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
decorators: [
|
|
19
|
+
(story, context) => {
|
|
20
|
+
const { mode, setMode } = useAppTheme();
|
|
21
|
+
const selectedTheme = context.globals.theme || mode;
|
|
22
|
+
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
setMode(selectedTheme);
|
|
25
|
+
}, [selectedTheme]);
|
|
26
|
+
|
|
27
|
+
return <div className={`${context.globals.theme}`}>{story()}</div>;
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default meta;
|
|
33
|
+
type Story = StoryObj<typeof meta>;
|
|
34
|
+
|
|
35
|
+
export const Default: Story = {
|
|
36
|
+
name: 'Icon.Default',
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const LargeNavigateIcon: Story = {
|
|
40
|
+
name: 'Icon.Navigate.Large',
|
|
41
|
+
render: () => <Icon.Navigate sizes="large" />,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const NavigateIcon: Story = {
|
|
45
|
+
name: 'Icon.Navigate',
|
|
46
|
+
render: () => <Icon.Navigate />,
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const RefreshIcon: Story = {
|
|
50
|
+
name: 'Icon.Refresh',
|
|
51
|
+
render: () => <Icon.Refresh />,
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export const PlaneIcon: Story = {
|
|
55
|
+
name: 'Icon.Plane',
|
|
56
|
+
render: () => <Icon.Plane />,
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const CloudIcon: Story = {
|
|
60
|
+
name: 'Icon.Cloud',
|
|
61
|
+
render: () => <Icon.Cloud index={0} />,
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export const CursorIcon: Story = {
|
|
65
|
+
name: 'Icon.Cursor',
|
|
66
|
+
render: () => <Icon.Cursor />,
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const ScrollIcon: Story = {
|
|
70
|
+
name: 'Icon.Scroll',
|
|
71
|
+
render: () => <Icon.Scroll />,
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export const XIcon: Story = {
|
|
75
|
+
name: 'Icon.X',
|
|
76
|
+
render: () => <Icon.X />,
|
|
77
|
+
};
|
|
78
|
+
export const CheckIcon: Story = {
|
|
79
|
+
name: 'Icon.Check',
|
|
80
|
+
render: () => <Icon.Check />,
|
|
81
|
+
};
|