@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,117 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
|
+
import { useAppTheme } from '../../hooks';
|
|
5
|
+
import TripieImage from '../TripieImage/TripieImage';
|
|
6
|
+
import Carousel from './Carousel';
|
|
7
|
+
import images from './images';
|
|
8
|
+
|
|
9
|
+
const meta: Meta<typeof Carousel> = {
|
|
10
|
+
title: 'tripie-ui/Carousel',
|
|
11
|
+
component: Carousel,
|
|
12
|
+
tags: ['autodocs'],
|
|
13
|
+
parameters: {
|
|
14
|
+
docs: {
|
|
15
|
+
description: {
|
|
16
|
+
component:
|
|
17
|
+
'인스타그램의 이미지 carousel와 같이 임계점을 넘어야 해당 이미지에 고정되는 carousel 컴포넌트입니다.ex. 기본은 인접한 게시물의 60%가 보여야 해당 콘텐츠로 넘어갑니다.',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
argTypes: {},
|
|
22
|
+
decorators: [
|
|
23
|
+
(story, context) => {
|
|
24
|
+
const { mode, setMode } = useAppTheme();
|
|
25
|
+
const selectedTheme = context.globals.theme || mode;
|
|
26
|
+
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
setMode(selectedTheme);
|
|
29
|
+
}, [selectedTheme]);
|
|
30
|
+
|
|
31
|
+
return <div className={`${context.globals.theme}`}>{story()}</div>;
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export default meta;
|
|
37
|
+
type Story = StoryObj<typeof meta>;
|
|
38
|
+
|
|
39
|
+
export const Default: Story = {
|
|
40
|
+
name: 'Carousel.Image.2',
|
|
41
|
+
render: () => {
|
|
42
|
+
return (
|
|
43
|
+
<Carousel
|
|
44
|
+
items={images.slice(0, 2).map((item, index) => (
|
|
45
|
+
<TripieImage.WithSourceUrl
|
|
46
|
+
sizes="large"
|
|
47
|
+
key={item.src + index}
|
|
48
|
+
alt={item.alt}
|
|
49
|
+
src={item.src}
|
|
50
|
+
sourceUrl={item.sourceUrl}
|
|
51
|
+
blurDataURL={item.blurDataURL}
|
|
52
|
+
/>
|
|
53
|
+
))}
|
|
54
|
+
/>
|
|
55
|
+
);
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const CarouselImageOf3: Story = {
|
|
60
|
+
name: 'Carousel.Image.3',
|
|
61
|
+
render: () => {
|
|
62
|
+
return (
|
|
63
|
+
<Carousel
|
|
64
|
+
items={images.slice(0, 3).map((item, index) => (
|
|
65
|
+
<TripieImage.WithSourceUrl
|
|
66
|
+
sizes="large"
|
|
67
|
+
key={item.src + index}
|
|
68
|
+
alt={item.alt}
|
|
69
|
+
src={item.src}
|
|
70
|
+
sourceUrl={item.sourceUrl}
|
|
71
|
+
blurDataURL={item.blurDataURL}
|
|
72
|
+
/>
|
|
73
|
+
))}
|
|
74
|
+
/>
|
|
75
|
+
);
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export const CarouselImageOf4: Story = {
|
|
80
|
+
name: 'Carousel.Image.4',
|
|
81
|
+
render: () => {
|
|
82
|
+
return (
|
|
83
|
+
<Carousel
|
|
84
|
+
items={images.slice(0, 4).map((item, index) => (
|
|
85
|
+
<TripieImage.WithSourceUrl
|
|
86
|
+
sizes="large"
|
|
87
|
+
key={item.src + index}
|
|
88
|
+
alt={item.alt}
|
|
89
|
+
src={item.src}
|
|
90
|
+
sourceUrl={item.sourceUrl}
|
|
91
|
+
blurDataURL={item.blurDataURL}
|
|
92
|
+
/>
|
|
93
|
+
))}
|
|
94
|
+
/>
|
|
95
|
+
);
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export const CarouselImageOf5: Story = {
|
|
100
|
+
name: 'Carousel.Image.5',
|
|
101
|
+
render: () => {
|
|
102
|
+
return (
|
|
103
|
+
<Carousel
|
|
104
|
+
items={images.map((item, index) => (
|
|
105
|
+
<TripieImage.WithSourceUrl
|
|
106
|
+
sizes="large"
|
|
107
|
+
key={item.src + index}
|
|
108
|
+
alt={item.alt}
|
|
109
|
+
src={item.src}
|
|
110
|
+
sourceUrl={item.sourceUrl}
|
|
111
|
+
blurDataURL={item.blurDataURL}
|
|
112
|
+
/>
|
|
113
|
+
))}
|
|
114
|
+
/>
|
|
115
|
+
);
|
|
116
|
+
},
|
|
117
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
const images = [
|
|
2
|
+
{
|
|
3
|
+
sizes: 'large',
|
|
4
|
+
alt: 'https://media.triple.guide/triple-cms/c_limit,f_auto,h_2048,w_2048/1037f801-0b0e-40b1-bff1-c5be7d66eab1.jpeg',
|
|
5
|
+
src: 'https://media.triple.guide/triple-cms/c_limit,f_auto,h_2048,w_2048/1037f801-0b0e-40b1-bff1-c5be7d66eab1.jpeg',
|
|
6
|
+
sourceUrl: 'huistenbosch.co.jp/gourmet/64',
|
|
7
|
+
blurDataURL:
|
|
8
|
+
'data:image/svg+xml;base64,CiAgPHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCA4IDUnPgogICAgPGZpbHRlciBpZD0nYicgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSdzUkdCJz4KICAgICAgPGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0nMScgLz4KICAgIDwvZmlsdGVyPgogICAgPGltYWdlIHByZXNlcnZlQXNwZWN0UmF0aW89J25vbmUnIGZpbHRlcj0ndXJsKCNiKScgeD0nMCcgeT0nMCcgaGVpZ2h0PScxMDAlJyB3aWR0aD0nMTAwJScgCiAgICBocmVmPSdkYXRhOmltYWdlL2F2aWY7YmFzZTY0LC85ai8yd0JEQUFnSUNBZ0pDQWtLQ2drTkRnd09EUk1SRUJBUkV4d1VGaFFXRkJ3ckd4OGJHeDhiS3lZdUpTTWxMaVpFTlM4dk5VUk9RajVDVGw5VlZWOTNjWGVjbk5ILzJ3QkRBUWdJQ0FnSkNBa0tDZ2tORGd3T0RSTVJFQkFSRXh3VUZoUVdGQndyR3g4Ykd4OGJLeVl1SlNNbExpWkVOUzh2TlVST1FqNUNUbDlWVlY5M2NYZWNuTkgvd2dBUkNBQVFBQkFEQVNJQUFoRUJBeEVCLzhRQUZnQUJBUUVBQUFBQUFBQUFBQUFBQUFBQUJnTUYvOFFBRlFFQkFRQUFBQUFBQUFBQUFBQUFBQUFBQXdULzJnQU1Bd0VBQWhBREVBQUFBRXN6MkdGSC84UUFKUkFBQWdJQkFnUUhBQUFBQUFBQUFBQUFBUUlEQkJJQUVRVVVNVkVURlNFaU1sSnkvOW9BQ0FFQkFBRS9BRnQwR3hyclRYbW5iWmc3bkdMY2RHUDI3alVGV0VoY1ZnbEhVeU14YmNkOGZUVnpqbEdLSzBKSjRzekZKNFlpSU14WS9FKzNwcFpxL0pWZk1PS1N6TWNDd2pjSXY0eFRZNi8veEFBYUVRQUNBZ01BQUFBQUFBQUFBQUFBQUFBQkVRQVNBaE5oLzlvQUNBRUNBUUUvQU53b0dNbDEyTS8veEFBWUVRRUJBQU1BQUFBQUFBQUFBQUFBQUFBQkVRQVN3Zi9hQUFnQkF3RUJQd0RSckU1bi85az0nIC8+CiAgPC9zdmc+Cg==',
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
sizes: 'large',
|
|
12
|
+
alt: 'https://media.triple.guide/triple-cms/c_limit,f_auto,h_2048,w_2048/5aa4fd86-ce45-4675-a227-a1577bd8d823.jpeg',
|
|
13
|
+
src: 'https://media.triple.guide/triple-cms/c_limit,f_auto,h_2048,w_2048/5aa4fd86-ce45-4675-a227-a1577bd8d823.jpeg',
|
|
14
|
+
sourceUrl: 'huistenbosch.co.jp/gourmet/329',
|
|
15
|
+
blurDataURL:
|
|
16
|
+
'data:image/svg+xml;base64,CiAgPHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCA4IDUnPgogICAgPGZpbHRlciBpZD0nYicgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSdzUkdCJz4KICAgICAgPGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0nMScgLz4KICAgIDwvZmlsdGVyPgogICAgPGltYWdlIHByZXNlcnZlQXNwZWN0UmF0aW89J25vbmUnIGZpbHRlcj0ndXJsKCNiKScgeD0nMCcgeT0nMCcgaGVpZ2h0PScxMDAlJyB3aWR0aD0nMTAwJScgCiAgICBocmVmPSdkYXRhOmltYWdlL2F2aWY7YmFzZTY0LC85ai8yd0JEQUFnSUNBZ0pDQWtLQ2drTkRnd09EUk1SRUJBUkV4d1VGaFFXRkJ3ckd4OGJHeDhiS3lZdUpTTWxMaVpFTlM4dk5VUk9RajVDVGw5VlZWOTNjWGVjbk5ILzJ3QkRBUWdJQ0FnSkNBa0tDZ2tORGd3T0RSTVJFQkFSRXh3VUZoUVdGQndyR3g4Ykd4OGJLeVl1SlNNbExpWkVOUzh2TlVST1FqNUNUbDlWVlY5M2NYZWNuTkgvd2dBUkNBQVFBQkFEQVNJQUFoRUJBeEVCLzhRQUZnQUJBUUVBQUFBQUFBQUFBQUFBQUFBQUJBVUcvOFFBRkFFQkFBQUFBQUFBQUFBQUFBQUFBQUFBQmYvYUFBd0RBUUFDRUFNUUFBQUEwNW16eld2L3hBQWhFQUFEQUFFREJBTUFBQUFBQUFBQUFBQUJBZ01SQUFRVEJSSWhNUlFWWWYvYUFBZ0JBUUFCUHdDa3BmRVZJQ2ZLaUZITGVQYlp5UXZyOE9vN0xkYm8zanVKSkpPSWhheHFmTEgwZTBnRWE2cjA1NUZhSStUSHRkeU1qTFpKeVJyN3ppdFMrOUNxenFxRW9DUW9HVHIveEFBYkVRQURBUUFEQVFBQUFBQUFBQUFBQUFBQkF4RUNBQklUSWYvYUFBZ0JBZ0VCUHdCU2J2eGRoUnU4OVFWMHlUNFFlZi9FQUJvUkFBSUNBd0FBQUFBQUFBQUFBQUFBQUFFQ0F4SUFJekgvMmdBSUFRTUJBVDhBRnh0aGtmcFltMmYvMlE9PScgLz4KICA8L3N2Zz4K',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
sizes: 'large',
|
|
20
|
+
alt: 'https://media.triple.guide/triple-cms/c_limit,f_auto,h_2048,w_2048/0e054e18-9b82-4382-a239-75891abfd614.jpeg',
|
|
21
|
+
src: 'https://media.triple.guide/triple-cms/c_limit,f_auto,h_2048,w_2048/0e054e18-9b82-4382-a239-75891abfd614.jpeg',
|
|
22
|
+
sourceUrl: 'huistenbosch.co.jp/gourmet/73',
|
|
23
|
+
blurDataURL:
|
|
24
|
+
'data:image/svg+xml;base64,CiAgPHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCA4IDUnPgogICAgPGZpbHRlciBpZD0nYicgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSdzUkdCJz4KICAgICAgPGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0nMScgLz4KICAgIDwvZmlsdGVyPgogICAgPGltYWdlIHByZXNlcnZlQXNwZWN0UmF0aW89J25vbmUnIGZpbHRlcj0ndXJsKCNiKScgeD0nMCcgeT0nMCcgaGVpZ2h0PScxMDAlJyB3aWR0aD0nMTAwJScgCiAgICBocmVmPSdkYXRhOmltYWdlL2F2aWY7YmFzZTY0LGlWQk9SdzBLR2dvQUFBQU5TVWhFVWdBQUFCQUFBQUFRQ0FNQUFBQW9MUTlUQUFBQmpGQk1WRVVEQUFDOFhFNjZVMHdNQ0FpaVpFTzdnbC9EaFZvR0F3VzFjRXVNVlRzVkVoVXVLUzBVQ3cwd0xUQTRORG1pYUV5ZlhqNm1ia3lYWHo2SlBqbkdURVFlR3lYT2syZjBzUXIzNjloYWRpeUlxRE5pU1RsR05pNC9MQ3pkbm5GTEd4eUVTeTdDZFVMN3p5cjd4NHl5UFRpM2UwaktpbGJTV1ZQeHNCbXNTRCtYYWovVmRXYWFQVFpXVjJTbVNEZm1tUjcvMlNiUGZGdjV4aVgyOVBEODkrdUVocG1pbWp2OC9QcnUyOGhEUDBRdlBDZmd4cWRzbGl5SmhZbVJlR1QxcHdMR3kyMzZ6bVIzWGxDZ2JFVFdtV0pUT1N2Z21WclRqVldvV3pheVprbXJuWHBpWDJWM0hSekxoVjVJUlV4NVNUYTRtSVBDZWs5MVJpK2liRHlOTGlyYWYzR3RrempwZEdUb3ExSDhvNWZHa1ZIaHFUcnBybDM2MXBQd3dYYmNhbHZrNHVESmxsMy8xb25pcGgzZmpES3pzTE95a3gyWWRSUHN3SVYvZVg3WHRKMkpoU3hqWFYybGx4dGFneS8vNHF6MjM4VDR1VDNMNEVPeHRDcjh3MXRXVlJUZjJNL3pueURSMUVHL3VIMjh5a1gvcWkvUjA5cVhsWjRrTFJTeXMwYm95MFgvOHBSSllDVzR0anlYeWdvQUFBQUFDWEJJV1hNQUFoY29BQUlYS0FFUCsrY1dBQUFCQWtsRVFWUjRuRFhIWlZlREFCaEE0UmNHak5oZ3hJaDFkM2VIM2QzZDNkMU8vZU1lOWZoOHVlZkNjTHhzcm55K1FmbTFubis1cTU5QVBtNnVXSjdlRzlXUGRsc3RaZzloYUc3LzlQcWgxZW9vemVhbFd0d0ZUeXFWS2RTMDJ0ZnovYzE1THJjQm5veVMxTTQweTJQcG9ucFVVck1RVWtMYmU4ZVdxOXVHakdNQ1BnSEo1ZFcxblRSZmlKQUhXMHRUTGhlZ1VlOUtERVVvbWR0Y21CNFhNRUJpYVhkaVBTRVRSTUR2RnlnTTBMQWtSZWNSWXBJa1RTWVR4c0hzWWhCQmd6NXlGQ2NKbnVKNEVNV3dOT01iQ1RnR0IvcjdjTW9LWTZ4ZGREb05FYS9EM2RQZFpXZUFOckpHeHNqYWVxMDJ4a3pUT2dBQXZjNWcwT2wvL041Zi91bS9BVElpSytQS3lJZ2tBQUFBQUVsRlRrU3VRbUNDJyAvPgogIDwvc3ZnPgo=',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
sizes: 'large',
|
|
28
|
+
alt: 'https://media.triple.guide/triple-cms/c_limit,f_auto,h_2048,w_2048/24201c4a-ad69-489c-bd73-96b830ce9040.jpeg',
|
|
29
|
+
src: 'https://media.triple.guide/triple-cms/c_limit,f_auto,h_2048,w_2048/24201c4a-ad69-489c-bd73-96b830ce9040.jpeg',
|
|
30
|
+
sourceUrl: 'huistenbosch.co.jp/gourmet/66#photo',
|
|
31
|
+
blurDataURL:
|
|
32
|
+
'data:image/svg+xml;base64,CiAgPHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCA4IDUnPgogICAgPGZpbHRlciBpZD0nYicgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSdzUkdCJz4KICAgICAgPGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0nMScgLz4KICAgIDwvZmlsdGVyPgogICAgPGltYWdlIHByZXNlcnZlQXNwZWN0UmF0aW89J25vbmUnIGZpbHRlcj0ndXJsKCNiKScgeD0nMCcgeT0nMCcgaGVpZ2h0PScxMDAlJyB3aWR0aD0nMTAwJScgCiAgICBocmVmPSdkYXRhOmltYWdlL2F2aWY7YmFzZTY0LC85ai8yd0JEQUFnSUNBZ0pDQWtLQ2drTkRnd09EUk1SRUJBUkV4d1VGaFFXRkJ3ckd4OGJHeDhiS3lZdUpTTWxMaVpFTlM4dk5VUk9RajVDVGw5VlZWOTNjWGVjbk5ILzJ3QkRBUWdJQ0FnSkNBa0tDZ2tORGd3T0RSTVJFQkFSRXh3VUZoUVdGQndyR3g4Ykd4OGJLeVl1SlNNbExpWkVOUzh2TlVST1FqNUNUbDlWVlY5M2NYZWNuTkgvd2dBUkNBQVFBQkFEQVNJQUFoRUJBeEVCLzhRQUZnQUJBUUVBQUFBQUFBQUFBQUFBQUFBQUJnTUUvOFFBRlFFQkFRQUFBQUFBQUFBQUFBQUFBQUFBQkFYLzJnQU1Bd0VBQWhBREVBQUFBSkNGZXdWSC84UUFJeEFBQVFNREJBSURBQUFBQUFBQUFBQUFBZ0VEQkJFU0lRQUZFeUlHTVRKQllmL2FBQWdCQVFBQlB3Q1REOGJoczJUNGR6dnNXMk83cDV4MjA5UDNTRklSM2hjYVVBUVE1VzBKYkV3aVpUTk5iZURUVUxjQWZKS2lWUmRKQ080UitRMVgzK2EyOTlpWkZtdXlsYjVXMUVVS3hWVHRYNjlEU21kZi84UUFHQkVCQVFBREFBQUFBQUFBQUFBQUFBQUFBZ0VBRWlILzJnQUlBUUlCQVQ4QU5STTV0TS8veEFBWUVRRUJBQU1BQUFBQUFBQUFBQUFBQUFBQkFnQURJZi9hQUFnQkF3RUJQd0RZWGFWZEp6UC8yUT09JyAvPgogIDwvc3ZnPgo=',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
sizes: 'large',
|
|
36
|
+
alt: 'https://media.triple.guide/triple-cms/c_limit,f_auto,h_2048,w_2048/e3dc3514-e5c7-456e-93c2-e342483aa769.jpeg',
|
|
37
|
+
src: 'https://media.triple.guide/triple-cms/c_limit,f_auto,h_2048,w_2048/e3dc3514-e5c7-456e-93c2-e342483aa769.jpeg',
|
|
38
|
+
sourceUrl: 'huistenbosch.co.jp/gourmet/58#information',
|
|
39
|
+
blurDataURL:
|
|
40
|
+
'data:image/svg+xml;base64,CiAgPHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCA4IDUnPgogICAgPGZpbHRlciBpZD0nYicgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSdzUkdCJz4KICAgICAgPGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0nMScgLz4KICAgIDwvZmlsdGVyPgogICAgPGltYWdlIHByZXNlcnZlQXNwZWN0UmF0aW89J25vbmUnIGZpbHRlcj0ndXJsKCNiKScgeD0nMCcgeT0nMCcgaGVpZ2h0PScxMDAlJyB3aWR0aD0nMTAwJScgCiAgICBocmVmPSdkYXRhOmltYWdlL2F2aWY7YmFzZTY0LC85ai8yd0JEQUFnSUNBZ0pDQWtLQ2drTkRnd09EUk1SRUJBUkV4d1VGaFFXRkJ3ckd4OGJHeDhiS3lZdUpTTWxMaVpFTlM4dk5VUk9RajVDVGw5VlZWOTNjWGVjbk5ILzJ3QkRBUWdJQ0FnSkNBa0tDZ2tORGd3T0RSTVJFQkFSRXh3VUZoUVdGQndyR3g4Ykd4OGJLeVl1SlNNbExpWkVOUzh2TlVST1FqNUNUbDlWVlY5M2NYZWNuTkgvd2dBUkNBQVFBQkFEQVNJQUFoRUJBeEVCLzhRQUZnQUJBUUVBQUFBQUFBQUFBQUFBQUFBQUJRWUgvOFFBRkFFQkFBQUFBQUFBQUFBQUFBQUFBQUFBQlAvYUFBd0RBUUFDRUFNUUFBQUFsZEFGWE9yL3hBQWpFQUFCQXdNRUFnTUFBQUFBQUFBQUFBQURBUUlFQlNFaUFCRVNFd1l4UVdGeS85b0FDQUVCQUFFL0FQSG80MmxFYkRkRE0rYjNYVVhqR0lpRmlMTGN1WElqdnJmYk4ya3FsSEIzQlJpakt4K0QrbEZIYjgzMUhTbFZFSFlhc1F4eUh0dzV2ZUgxYTZhLy84UUFHQkVBQWdNQUFBQUFBQUFBQUFBQUFBQUFBQUVDRVNMLzJnQUlBUUlCQVQ4QWl0MmYvOFFBR0JFQUF3RUJBQUFBQUFBQUFBQUFBQUFBQWhFaEFBSC8yZ0FJQVFNQkFUOEFJWHl4Yi8vWicgLz4KICA8L3N2Zz4K',
|
|
41
|
+
},
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
export default images;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { render, screen } from '@testing-library/react';
|
|
2
|
+
import { describe, it, vi } from 'vitest';
|
|
3
|
+
|
|
4
|
+
import { motion } from 'framer-motion';
|
|
5
|
+
import '../../shared/variants';
|
|
6
|
+
|
|
7
|
+
import Chip from './Chip';
|
|
8
|
+
// !! motion framer 올바르게 mock 하는 방법? props 못 읽는 문제..
|
|
9
|
+
vi.mock('framer-motion', async () => {
|
|
10
|
+
const actual = await vi.importActual<typeof motion>('framer-motion');
|
|
11
|
+
|
|
12
|
+
return {
|
|
13
|
+
...actual,
|
|
14
|
+
motion: {
|
|
15
|
+
button: vi.fn(({ animate, whileHover, whileTap, className, ...props }: any) => {
|
|
16
|
+
console.log('Mocked motion.button animate:', animate); // Debugging log
|
|
17
|
+
return (
|
|
18
|
+
<button
|
|
19
|
+
data-animate={animate ?? 'rest'} // Ensure animate is always defined
|
|
20
|
+
data-while-hover={whileHover ?? ''}
|
|
21
|
+
data-while-tap={whileTap ?? ''}
|
|
22
|
+
className={className ?? ''}
|
|
23
|
+
{...props}
|
|
24
|
+
/>
|
|
25
|
+
);
|
|
26
|
+
}),
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
describe('Chip Component', () => {
|
|
32
|
+
it('1. should have correct motion attributes', async () => {
|
|
33
|
+
render(<Chip selected={true}>Animated Chip</Chip>);
|
|
34
|
+
const chip = screen.getByRole('button', { name: /Animated Chip/i });
|
|
35
|
+
expect(chip).toBeInTheDocument();
|
|
36
|
+
|
|
37
|
+
// // Ensure motion props are passed correctly
|
|
38
|
+
// expect(chip.getAttribute('data-animate')).toBe('selected');
|
|
39
|
+
// expect(chip.getAttribute('data-while-hover')).toBe('shine');
|
|
40
|
+
// expect(chip.getAttribute('data-while-tap')).toBe('shine');
|
|
41
|
+
// // Check computed styles if needed
|
|
42
|
+
// expect(getComputedStyle(chip).backgroundColor).toEqual('var(--themes-color-200)');
|
|
43
|
+
// expect(getComputedStyle(chip).borderColor).toEqual('var(--themes-color-400)');
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it('2. Chip disabled 속성을 true로 설정하면 disable된다.', () => {
|
|
47
|
+
render(<Chip disabled={true}>Disabled Chip</Chip>);
|
|
48
|
+
|
|
49
|
+
const chip = screen.getByRole('button', { name: /Disabled Chip/i });
|
|
50
|
+
|
|
51
|
+
expect(chip).toBeDisabled();
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it('2. Chip disabled 속성을 true로 설정하면 disable된다.', () => {
|
|
55
|
+
render(<Chip className={'restaurant'}>1</Chip>);
|
|
56
|
+
|
|
57
|
+
const chip = screen.getByRole('button', { name: /1/i });
|
|
58
|
+
});
|
|
59
|
+
});
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { classNames, Motion } from '../../shared/wrappers';
|
|
2
|
+
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
import Style from './chip.module.scss';
|
|
5
|
+
|
|
6
|
+
import { GLOW_VARIANT, SHINE_VARIANT } from '../../shared/variants';
|
|
7
|
+
|
|
8
|
+
const cx = classNames.bind(Style);
|
|
9
|
+
|
|
10
|
+
type ChipProps = {
|
|
11
|
+
selected?: boolean;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
className?: string;
|
|
14
|
+
current?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
cycle?: (state?: any) => void;
|
|
17
|
+
onClick?: () => void;
|
|
18
|
+
type?: 'submit' | 'reset' | 'button';
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const Chip = ({ children, className, onClick, selected, disabled = false }: Readonly<ChipProps>) => {
|
|
22
|
+
return (
|
|
23
|
+
<Motion.Button
|
|
24
|
+
whileHover={'shine'}
|
|
25
|
+
whileTap={'shine'}
|
|
26
|
+
disabled={disabled}
|
|
27
|
+
animate={selected ? 'selected' : 'rest'}
|
|
28
|
+
variants={SHINE_VARIANT}
|
|
29
|
+
onClick={onClick}
|
|
30
|
+
className={cx('chip', 'with-border', className)}
|
|
31
|
+
>
|
|
32
|
+
{children}
|
|
33
|
+
</Motion.Button>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const AccentedChip = ({ children, current, className, onClick, type = 'button' }: Readonly<ChipProps>) => {
|
|
38
|
+
return (
|
|
39
|
+
<Motion.Button
|
|
40
|
+
initial={'rest'}
|
|
41
|
+
className={cx('wrap', 'with-border', current === 'on' ? 'selected' : 'chip', className)}
|
|
42
|
+
variants={GLOW_VARIANT}
|
|
43
|
+
whileHover={'glow'}
|
|
44
|
+
onClick={onClick}
|
|
45
|
+
type={type}
|
|
46
|
+
>
|
|
47
|
+
<span className={cx('accented', current === 'on' ? 'selected' : 'chip')}>{children}</span>
|
|
48
|
+
<Motion.Span
|
|
49
|
+
className={cx('glow')}
|
|
50
|
+
animate={{ rotate: 360 }}
|
|
51
|
+
transition={{
|
|
52
|
+
type: 'tween',
|
|
53
|
+
duration: 2,
|
|
54
|
+
ease: 'linear',
|
|
55
|
+
repeat: Infinity,
|
|
56
|
+
}}
|
|
57
|
+
/>
|
|
58
|
+
</Motion.Button>
|
|
59
|
+
);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
Chip.Accented = AccentedChip;
|
|
63
|
+
|
|
64
|
+
export default Chip;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
@use '../../variables' as *;
|
|
2
|
+
@use '../../mixins' as *;
|
|
3
|
+
|
|
4
|
+
.with-border {
|
|
5
|
+
@include with-border;
|
|
6
|
+
padding: 0.2rem 0.6rem;
|
|
7
|
+
border-radius: 10px;
|
|
8
|
+
color: inherit;
|
|
9
|
+
}
|
|
10
|
+
.chip {
|
|
11
|
+
border-color: $theme-400;
|
|
12
|
+
background-color: $theme-200;
|
|
13
|
+
font-size: 0.8rem;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
display: inline-block;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.chip:disabled {
|
|
19
|
+
cursor: not-allowed;
|
|
20
|
+
color: $theme-300;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.accented {
|
|
24
|
+
position: relative;
|
|
25
|
+
z-index: 2;
|
|
26
|
+
margin: 0.4px;
|
|
27
|
+
padding: 0.2rem 0.6rem;
|
|
28
|
+
font-size: 0.8rem;
|
|
29
|
+
border-radius: 10px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.glow {
|
|
33
|
+
width: 100%;
|
|
34
|
+
height: 4rem;
|
|
35
|
+
background-color: $theme-50;
|
|
36
|
+
border: 1px $theme-50;
|
|
37
|
+
filter: blur(18px);
|
|
38
|
+
mask: linear-gradient(transparent 0%, $theme-50 120%);
|
|
39
|
+
position: absolute;
|
|
40
|
+
top: 0;
|
|
41
|
+
left: 50%;
|
|
42
|
+
transform-origin: left;
|
|
43
|
+
transform: translate(-50%, -50%);
|
|
44
|
+
}
|
|
45
|
+
.wrap {
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
width: fit-content;
|
|
49
|
+
height: fit-content;
|
|
50
|
+
position: relative;
|
|
51
|
+
color: $theme-50;
|
|
52
|
+
border-radius: 10px;
|
|
53
|
+
padding: 0;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.selected {
|
|
57
|
+
background-color: $theme-100;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.restaurant {
|
|
61
|
+
@include map-marker('restaurant');
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.hotel {
|
|
65
|
+
@include map-marker('hotel');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.attraction {
|
|
69
|
+
@include map-marker('attraction');
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.marker {
|
|
73
|
+
display: inline-flex;
|
|
74
|
+
border-radius: 100%;
|
|
75
|
+
align-items: center;
|
|
76
|
+
justify-content: center;
|
|
77
|
+
cursor: pointer;
|
|
78
|
+
padding: 0.2rem;
|
|
79
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
|
+
import { useAppTheme } from '../../hooks';
|
|
5
|
+
import Chip from './Chip';
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof Chip> = {
|
|
8
|
+
title: 'tripie-ui/Chip',
|
|
9
|
+
component: Chip,
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
argTypes: {},
|
|
12
|
+
parameters: {
|
|
13
|
+
docs: {
|
|
14
|
+
description: {
|
|
15
|
+
component: '칩 컴포넌트입니다.accentedChip은 호버 시 애니메이션으로 강조됩니다.',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
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: 'Chip',
|
|
38
|
+
args: {
|
|
39
|
+
children: 'Default',
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const Selected: Story = {
|
|
44
|
+
name: 'Chip.Selected',
|
|
45
|
+
args: {
|
|
46
|
+
children: 'Selected',
|
|
47
|
+
selected: true,
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const Disabled: Story = {
|
|
52
|
+
name: 'Chip.Disabled',
|
|
53
|
+
args: {
|
|
54
|
+
children: 'Disabled',
|
|
55
|
+
disabled: true,
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const RestaurantChip: Story = {
|
|
60
|
+
name: 'Chip.Restaurant',
|
|
61
|
+
args: {
|
|
62
|
+
children: '1',
|
|
63
|
+
className: 'restaurant',
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export const AccentedChip: Story = {
|
|
68
|
+
name: 'Chip.Accented',
|
|
69
|
+
render: () => <Chip.Accented>accented Chip</Chip.Accented>,
|
|
70
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { classNames } from '../../shared/wrappers';
|
|
2
|
+
|
|
3
|
+
import { useMemo } from 'react';
|
|
4
|
+
import Chip from '../Chip/Chip';
|
|
5
|
+
import Style from './chip-marker.module.scss';
|
|
6
|
+
|
|
7
|
+
const cx = classNames.bind(Style);
|
|
8
|
+
|
|
9
|
+
const ChipMarker = ({ className, children, selected }: { className: string; children: string; selected?: boolean }) => {
|
|
10
|
+
const marker = useMemo(() => {
|
|
11
|
+
return +children.split('-')[1] + 1;
|
|
12
|
+
}, [children]);
|
|
13
|
+
return (
|
|
14
|
+
<Chip className={cx('marker', className)} selected={selected}>
|
|
15
|
+
{marker}
|
|
16
|
+
</Chip>
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default ChipMarker;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
@use '../../variables' as *;
|
|
2
|
+
@use '../../mixins' as *;
|
|
3
|
+
|
|
4
|
+
.with-border {
|
|
5
|
+
@include with-border;
|
|
6
|
+
padding: 0.2rem 0.6rem;
|
|
7
|
+
border-radius: 10px;
|
|
8
|
+
color: inherit;
|
|
9
|
+
}
|
|
10
|
+
.chip {
|
|
11
|
+
border-color: $theme-400;
|
|
12
|
+
background-color: $theme-200;
|
|
13
|
+
font-size: 0.8rem;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.accented {
|
|
18
|
+
position: relative;
|
|
19
|
+
z-index: 2;
|
|
20
|
+
margin: 0.4px;
|
|
21
|
+
padding: 0.2rem 0.6rem;
|
|
22
|
+
font-size: 0.8rem;
|
|
23
|
+
border-radius: 10px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.glow {
|
|
27
|
+
width: 100%;
|
|
28
|
+
height: 4rem;
|
|
29
|
+
background-color: $theme-50;
|
|
30
|
+
border: 1px $theme-50;
|
|
31
|
+
filter: blur(18px);
|
|
32
|
+
mask: linear-gradient(transparent 0%, $theme-50 120%);
|
|
33
|
+
position: absolute;
|
|
34
|
+
top: 0;
|
|
35
|
+
left: 50%;
|
|
36
|
+
transform-origin: left;
|
|
37
|
+
transform: translate(-50%, -50%);
|
|
38
|
+
}
|
|
39
|
+
.wrap {
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
width: fit-content;
|
|
43
|
+
height: fit-content;
|
|
44
|
+
position: relative;
|
|
45
|
+
color: $theme-50;
|
|
46
|
+
border-radius: 10px;
|
|
47
|
+
padding: 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.selected {
|
|
51
|
+
background-color: $theme-100;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.restaurant {
|
|
55
|
+
@include map-marker('restaurant');
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.hotel {
|
|
59
|
+
@include map-marker('hotel');
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.attraction {
|
|
63
|
+
@include map-marker('attraction');
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.marker {
|
|
67
|
+
display: inline-flex;
|
|
68
|
+
border-radius: 100%;
|
|
69
|
+
align-items: center;
|
|
70
|
+
justify-content: center;
|
|
71
|
+
cursor: pointer;
|
|
72
|
+
padding: 0.2rem;
|
|
73
|
+
width: 1.5rem;
|
|
74
|
+
height: 1.5rem;
|
|
75
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
|
+
import { useAppTheme } from '../../hooks';
|
|
5
|
+
import ChipMarker from './ChipMarker';
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof ChipMarker> = {
|
|
8
|
+
title: 'tripie-ui/Chip/Marker',
|
|
9
|
+
component: ChipMarker,
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
argTypes: {},
|
|
12
|
+
parameters: {
|
|
13
|
+
docs: {
|
|
14
|
+
description: {
|
|
15
|
+
component: '지도에 표시되는 Marker Chip 컴포넌트입니다. 호버 및 선택 시 색상이 강조됩니다.',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
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: 'Default',
|
|
38
|
+
args: {
|
|
39
|
+
children: '0-0',
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const SecondChip: Story = {
|
|
44
|
+
name: 'Second',
|
|
45
|
+
args: {
|
|
46
|
+
children: '0-1',
|
|
47
|
+
},
|
|
48
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { classNames, Motion, MotionProps } from '../../shared/wrappers';
|
|
2
|
+
|
|
3
|
+
import { ACCORDIAN_VARIANTS } from '../../shared/variants';
|
|
4
|
+
|
|
5
|
+
import TripieContainer, { TripieContainerProps } from '../TripieContainer/TripieContainer';
|
|
6
|
+
import HR_MARGINS from './constants';
|
|
7
|
+
import Style from './divider.module.scss';
|
|
8
|
+
|
|
9
|
+
const cx = classNames.bind(Style);
|
|
10
|
+
|
|
11
|
+
export type DividerProps = Partial<{ current: string; variants: MotionProps['variants']; className: string }>;
|
|
12
|
+
|
|
13
|
+
export type ArticleDividerProps = { type: 'hr1' | 'hr2' | 'hr3' | 'hr4' | 'hr5' };
|
|
14
|
+
|
|
15
|
+
const Divider = ({ className, current, variants = ACCORDIAN_VARIANTS.DIVIDER }: DividerProps) => {
|
|
16
|
+
return <Motion.Div variants={variants} animate={current} className={cx('divider', className)} />;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const ArticleDivider = ({ item }: { item: ArticleDividerProps }) => {
|
|
20
|
+
return (
|
|
21
|
+
<TripieContainer applyMargin="top-bottom" margin={HR_MARGINS[item.type] as TripieContainerProps['margin']}>
|
|
22
|
+
<Divider className={cx('divider', `divider-${item.type}`)} />
|
|
23
|
+
</TripieContainer>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
Divider.Article = ArticleDivider;
|
|
28
|
+
|
|
29
|
+
export default Divider;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
@use '../../variables' as *;
|
|
2
|
+
|
|
3
|
+
.accordion-button {
|
|
4
|
+
width: 2rem;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.accordion-header {
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
gap: 0.5rem;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
}
|
|
14
|
+
.divider {
|
|
15
|
+
height: 1.5px;
|
|
16
|
+
width: 100%;
|
|
17
|
+
border-radius: 10px;
|
|
18
|
+
background-color: $theme-400;
|
|
19
|
+
}
|
|
20
|
+
.accordion-body {
|
|
21
|
+
color: $theme-40;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.divider-hr1 {
|
|
25
|
+
background-color: $theme-50;
|
|
26
|
+
height: 2.4px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.divider-hr2 {
|
|
30
|
+
background-color: $theme-50;
|
|
31
|
+
height: 2px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.divider-hr3 {
|
|
35
|
+
background-color: transparent;
|
|
36
|
+
height: 1.8px;
|
|
37
|
+
}
|