@anker-in/headless-ui 0.0.27-alpha.0 → 0.0.27-alpha.2
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/dist/cjs/biz-components/BrandEquity/BrandEquity.js +1 -1
- package/dist/cjs/biz-components/BrandEquity/BrandEquity.js.map +2 -2
- package/dist/cjs/biz-components/Category/index.js +1 -1
- package/dist/cjs/biz-components/Category/index.js.map +2 -2
- package/dist/cjs/biz-components/Evaluate/index.d.ts +1 -0
- package/dist/cjs/biz-components/Evaluate/index.js +1 -1
- package/dist/cjs/biz-components/Evaluate/index.js.map +3 -3
- package/dist/cjs/biz-components/Marquee/index.js +1 -1
- package/dist/cjs/biz-components/Marquee/index.js.map +2 -2
- package/dist/cjs/biz-components/MemberEquity/index.js +30 -30
- package/dist/cjs/biz-components/MemberEquity/index.js.map +2 -2
- package/dist/cjs/biz-components/ShelfDisplay/index.js +9 -9
- package/dist/cjs/biz-components/ShelfDisplay/index.js.map +2 -2
- package/dist/cjs/biz-components/Slogan/index.js +1 -1
- package/dist/cjs/biz-components/Slogan/index.js.map +2 -2
- package/dist/cjs/components/button.js +1 -1
- package/dist/cjs/components/button.js.map +2 -2
- package/dist/cjs/components/card.js +1 -1
- package/dist/cjs/components/card.js.map +2 -2
- package/dist/cjs/components/carousel.js +1 -1
- package/dist/cjs/components/carousel.js.map +2 -2
- package/dist/cjs/components/container.js +1 -1
- package/dist/cjs/components/container.js.map +2 -2
- package/dist/cjs/components/dialog.js +1 -1
- package/dist/cjs/components/dialog.js.map +2 -2
- package/dist/cjs/components/gird.js +1 -1
- package/dist/cjs/components/gird.js.map +2 -2
- package/dist/cjs/components/heading.d.ts +1 -1
- package/dist/cjs/components/heading.js +1 -1
- package/dist/cjs/components/heading.js.map +2 -2
- package/dist/cjs/components/text.js +1 -1
- package/dist/cjs/components/text.js.map +1 -1
- package/dist/cjs/stories/container.stories.js +6 -6
- package/dist/cjs/stories/container.stories.js.map +2 -2
- package/dist/cjs/stories/dialog.stories.js +1 -1
- package/dist/cjs/stories/dialog.stories.js.map +2 -2
- package/dist/cjs/stories/evaluate.stories.js +1 -1
- package/dist/cjs/stories/evaluate.stories.js.map +2 -2
- package/dist/cjs/stories/heading.stories.d.ts +3 -2
- package/dist/cjs/stories/heading.stories.js +1 -1
- package/dist/cjs/stories/heading.stories.js.map +2 -2
- package/dist/cjs/stories/text.stories.js +1 -1
- package/dist/cjs/stories/text.stories.js.map +2 -2
- package/dist/esm/biz-components/BrandEquity/BrandEquity.js +1 -1
- package/dist/esm/biz-components/BrandEquity/BrandEquity.js.map +2 -2
- package/dist/esm/biz-components/Category/index.js +1 -1
- package/dist/esm/biz-components/Category/index.js.map +2 -2
- package/dist/esm/biz-components/Evaluate/index.d.ts +1 -0
- package/dist/esm/biz-components/Evaluate/index.js +1 -1
- package/dist/esm/biz-components/Evaluate/index.js.map +3 -3
- package/dist/esm/biz-components/Marquee/index.js +1 -1
- package/dist/esm/biz-components/Marquee/index.js.map +2 -2
- package/dist/esm/biz-components/MemberEquity/index.js +29 -29
- package/dist/esm/biz-components/MemberEquity/index.js.map +2 -2
- package/dist/esm/biz-components/ShelfDisplay/index.js +9 -9
- package/dist/esm/biz-components/ShelfDisplay/index.js.map +2 -2
- package/dist/esm/biz-components/Slogan/index.js +1 -1
- package/dist/esm/biz-components/Slogan/index.js.map +2 -2
- package/dist/esm/components/button.js +1 -1
- package/dist/esm/components/button.js.map +2 -2
- package/dist/esm/components/card.js +1 -1
- package/dist/esm/components/card.js.map +2 -2
- package/dist/esm/components/carousel.js +1 -1
- package/dist/esm/components/carousel.js.map +2 -2
- package/dist/esm/components/container.js +1 -1
- package/dist/esm/components/container.js.map +2 -2
- package/dist/esm/components/dialog.js +1 -1
- package/dist/esm/components/dialog.js.map +2 -2
- package/dist/esm/components/gird.js +1 -1
- package/dist/esm/components/gird.js.map +2 -2
- package/dist/esm/components/heading.d.ts +1 -1
- package/dist/esm/components/heading.js +1 -1
- package/dist/esm/components/heading.js.map +2 -2
- package/dist/esm/components/text.js +1 -1
- package/dist/esm/components/text.js.map +1 -1
- package/dist/esm/stories/container.stories.js +6 -6
- package/dist/esm/stories/container.stories.js.map +2 -2
- package/dist/esm/stories/dialog.stories.js +1 -1
- package/dist/esm/stories/dialog.stories.js.map +2 -2
- package/dist/esm/stories/evaluate.stories.js +1 -1
- package/dist/esm/stories/evaluate.stories.js.map +2 -2
- package/dist/esm/stories/heading.stories.d.ts +3 -2
- package/dist/esm/stories/heading.stories.js +1 -1
- package/dist/esm/stories/heading.stories.js.map +2 -2
- package/dist/esm/stories/text.stories.js +2 -2
- package/dist/esm/stories/text.stories.js.map +2 -2
- package/package.json +2 -3
- package/style.css +69 -34
- package/src/biz-components/BrandEquity/BrandEquity.tsx +0 -77
- package/src/biz-components/BrandEquity/index.ts +0 -1
- package/src/biz-components/Category/index.tsx +0 -57
- package/src/biz-components/Evaluate/index.tsx +0 -85
- package/src/biz-components/HeroBanner/HeroBanner.tsx +0 -103
- package/src/biz-components/HeroBanner/index.tsx +0 -1
- package/src/biz-components/HeroBanner/types.ts +0 -28
- package/src/biz-components/Marquee/index.tsx +0 -79
- package/src/biz-components/MemberEquity/index.tsx +0 -114
- package/src/biz-components/MemberEquity/types.ts +0 -26
- package/src/biz-components/Shelf/Shelf.tsx +0 -22
- package/src/biz-components/Shelf/index.ts +0 -1
- package/src/biz-components/Shelf/types.ts +0 -6
- package/src/biz-components/ShelfDisplay/index.tsx +0 -142
- package/src/biz-components/Slogan/index.tsx +0 -53
- package/src/biz-components/Slogan/types.ts +0 -25
- package/src/biz-components/index.ts +0 -11
- package/src/components/alert.tsx +0 -124
- package/src/components/avatar.tsx +0 -126
- package/src/components/badge.tsx +0 -27
- package/src/components/button.tsx +0 -183
- package/src/components/card.tsx +0 -51
- package/src/components/carousel.tsx +0 -352
- package/src/components/checkbox.tsx +0 -42
- package/src/components/color.tsx +0 -77
- package/src/components/container.tsx +0 -28
- package/src/components/dialog.tsx +0 -98
- package/src/components/drawer.tsx +0 -115
- package/src/components/drop-down.tsx +0 -182
- package/src/components/gird.tsx +0 -90
- package/src/components/heading.tsx +0 -80
- package/src/components/index.ts +0 -26
- package/src/components/input-number.tsx +0 -216
- package/src/components/input.tsx +0 -79
- package/src/components/link.tsx +0 -99
- package/src/components/picture.tsx +0 -100
- package/src/components/popover.tsx +0 -31
- package/src/components/radio.tsx +0 -85
- package/src/components/skeleton.tsx +0 -41
- package/src/components/tabs.tsx +0 -78
- package/src/components/text.tsx +0 -99
- package/src/components/theme.tsx +0 -20
- package/src/helpers/component-props.ts +0 -17
- package/src/helpers/constants.ts +0 -0
- package/src/helpers/index.ts +0 -2
- package/src/helpers/utils.ts +0 -16
- package/src/icons/spinner.tsx +0 -26
- package/src/index.ts +0 -1
- package/src/shared/Styles.tsx +0 -94
- package/src/stories/HeroBanner.stories.tsx +0 -86
- package/src/stories/MemberEquity.stories.tsx +0 -107
- package/src/stories/alert.stories.tsx +0 -41
- package/src/stories/avatar.stories.tsx +0 -83
- package/src/stories/badge.stories.tsx +0 -40
- package/src/stories/brandEquity.stories.tsx +0 -73
- package/src/stories/button.stories.tsx +0 -145
- package/src/stories/card.stories.tsx +0 -97
- package/src/stories/carousel.stories.tsx +0 -161
- package/src/stories/category.stories.tsx +0 -52
- package/src/stories/checkbox.stories.tsx +0 -93
- package/src/stories/container.stories.tsx +0 -97
- package/src/stories/dialog.stories.tsx +0 -74
- package/src/stories/drawer.stories.tsx +0 -88
- package/src/stories/drop-down.stories.tsx +0 -83
- package/src/stories/evaluate.stories.tsx +0 -53
- package/src/stories/grid.stories.tsx +0 -190
- package/src/stories/heading.stories.tsx +0 -96
- package/src/stories/input-number.stories.tsx +0 -52
- package/src/stories/input.stories.tsx +0 -64
- package/src/stories/link.stories.tsx +0 -142
- package/src/stories/marquee.stories.tsx +0 -102
- package/src/stories/picture.stories.tsx +0 -51
- package/src/stories/popover.stories.tsx +0 -41
- package/src/stories/radio.stories.tsx +0 -55
- package/src/stories/shelf.stories.tsx +0 -35
- package/src/stories/shelfDisplay.stories.tsx +0 -69
- package/src/stories/skeleton.stories.tsx +0 -67
- package/src/stories/slogan.stories.tsx +0 -99
- package/src/stories/tabs.stories.tsx +0 -179
- package/src/stories/text.stories.tsx +0 -130
- package/src/styles/global.css +0 -4
- package/src/styles/index.css +0 -0
- package/src/types/index.ts +0 -0
- package/src/types/props.ts +0 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/button.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden'\nimport { type VariantProps, cva } from 'class-variance-authority'\nimport Spinner from '../icons/spinner.js'\nimport { cn } from '../helpers/index.js'\n\n/**\n * Button Variants\n */\nconst buttonVariants = cva(\n 'ring-offset-background focus-visible:ring-ring rounded-btn inline-flex items-center justify-center text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none',\n {\n variants: {\n variant: {\n nature: 'border border-solid border-black',\n primary: 'bg-btn-primary text-btn-primary-foreground hover:bg-btn-primary-active',\n secondary:\n 'bg-btn-secondary text-btn-secondary-foreground hover:bg-btn-secondary-active hover:text-btn-secondary border border-solid',\n link: 'text-primary underline-offset-4 hover:underline',\n ghost: 'hover:bg-btn-primary hover:text-btn-primary-foreground',\n },\n size: {\n sm: 'px-3 py-2 text-[12px] leading-tight',\n base: 'px-5 pt-[11px] pb-[10px] text-[14px] leading-tight',\n lg: 'px-7 pt-[15px] pb-[14px] text-[16px] leading-tight',\n icon: 'size-10 rounded-full leading-tight',\n },\n /** hover \u72B6\u6001\u4E0B\u7684\u52A8\u753B\u6548\u679C,\u9700\u8981\u6CE8\u610F\u4E0D\u540Cvariant \u4E0B\u7684\u6548\u679C */\n hoverEffect: {\n none: '',\n slide: '',\n },\n state: {\n default: '',\n disabled: '',\n loading: '',\n },\n theme: {\n dark: '',\n light: '',\n },\n },\n compoundVariants: [\n {\n variant: 'primary',\n hoverEffect: 'slide',\n class:\n 'z-[1] before:-z-[1] before:rounded-btn hover:!bg-btn-primary before:bg-btn-primary-active relative overflow-hidden before:absolute before:inset-y-0 before:w-full before:-translate-x-full before:transition-transform before:duration-300 before:ease-in-out before:content-[\"\"] hover:before:translate-x-0',\n },\n {\n variant: 'secondary',\n hoverEffect: 'slide',\n class:\n 'z-[1] before:-z-[1] before:rounded-btn hover:!bg-btn-secondary before:bg-btn-secondary-active relative overflow-hidden before:absolute before:inset-y-0 before:w-full before:-translate-x-full before:transition-transform before:duration-300 before:ease-in-out before:content-[\"\"] hover:before:translate-x-0',\n },\n {\n variant: 'primary',\n state: 'loading',\n class: 'bg-btn-primary',\n },\n {\n variant: 'secondary',\n state: 'loading',\n class: 'bg-btn-secondary disabled:bg-btn-secondary-disabled disabled:text-btn-secondary-disabled-foreground',\n },\n {\n variant: 'primary',\n state: 'disabled',\n class: 'disabled:bg-btn-primary-disabled disabled:text-btn-primary-disabled-foreground',\n },\n {\n variant: 'secondary',\n state: 'disabled',\n class: 'disabled:bg-btn-secondary-disabled disabled:text-btn-secondary-disabled-foreground',\n },\n {\n variant: 'nature',\n theme: 'dark',\n class: 'bg-transparent text-
|
|
5
|
-
"mappings": "aA4JU,mBAAAA,EACE,OAAAC,EADF,QAAAC,MAAA,oBA1JV,UAAYC,MAAW,QACvB,OAAS,QAAAC,MAAY,uBACrB,OAAS,kBAAAC,MAAsB,kCAC/B,OAA4B,OAAAC,MAAW,2BACvC,OAAOC,MAAa,sBACpB,OAAS,MAAAC,MAAU,sBAKnB,MAAMC,EAAiBH,EACrB,oPACA,CACE,SAAU,CACR,QAAS,CACP,OAAQ,mCACR,QAAS,yEACT,UACE,4HACF,KAAM,kDACN,MAAO,wDACT,EACA,KAAM,CACJ,GAAI,uCACJ,KAAM,sDACN,GAAI,sDACJ,KAAM,qCACR,EAEA,YAAa,CACX,KAAM,GACN,MAAO,EACT,EACA,MAAO,CACL,QAAS,GACT,SAAU,GACV,QAAS,EACX,EACA,MAAO,CACL,KAAM,GACN,MAAO,EACT,CACF,EACA,iBAAkB,CAChB,CACE,QAAS,UACT,YAAa,QACb,MACE,+SACJ,EACA,CACE,QAAS,YACT,YAAa,QACb,MACE,mTACJ,EACA,CACE,QAAS,UACT,MAAO,UACP,MAAO,gBACT,EACA,CACE,QAAS,YACT,MAAO,UACP,MAAO,qGACT,EACA,CACE,QAAS,UACT,MAAO,WACP,MAAO,gFACT,EACA,CACE,QAAS,YACT,MAAO,WACP,MAAO,oFACT,EACA,CACE,QAAS,SACT,MAAO,OACP,MAAO,
|
|
4
|
+
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden'\nimport { type VariantProps, cva } from 'class-variance-authority'\nimport Spinner from '../icons/spinner.js'\nimport { cn } from '../helpers/index.js'\n\n/**\n * Button Variants\n */\nconst buttonVariants = cva(\n 'ring-offset-background focus-visible:ring-ring rounded-btn inline-flex items-center justify-center text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none',\n {\n variants: {\n variant: {\n nature: 'border border-solid border-black',\n primary: 'bg-btn-primary text-btn-primary-foreground hover:bg-btn-primary-active',\n secondary:\n 'bg-btn-secondary text-btn-secondary-foreground hover:bg-btn-secondary-active hover:text-btn-secondary border border-solid',\n link: 'text-primary underline-offset-4 hover:underline',\n ghost: 'hover:bg-btn-primary hover:text-btn-primary-foreground',\n },\n size: {\n sm: 'px-3 py-2 text-[12px] leading-tight',\n base: 'px-5 pt-[11px] pb-[10px] text-[14px] leading-tight',\n lg: 'px-7 pt-[15px] pb-[14px] text-[16px] leading-tight',\n icon: 'size-10 rounded-full leading-tight',\n },\n /** hover \u72B6\u6001\u4E0B\u7684\u52A8\u753B\u6548\u679C,\u9700\u8981\u6CE8\u610F\u4E0D\u540Cvariant \u4E0B\u7684\u6548\u679C */\n hoverEffect: {\n none: '',\n slide: '',\n },\n state: {\n default: '',\n disabled: '',\n loading: '',\n },\n theme: {\n dark: '',\n light: '',\n },\n },\n compoundVariants: [\n {\n variant: 'primary',\n hoverEffect: 'slide',\n class:\n 'z-[1] before:-z-[1] before:rounded-btn hover:!bg-btn-primary before:bg-btn-primary-active relative overflow-hidden before:absolute before:inset-y-0 before:w-full before:-translate-x-full before:transition-transform before:duration-300 before:ease-in-out before:content-[\"\"] hover:before:translate-x-0',\n },\n {\n variant: 'secondary',\n hoverEffect: 'slide',\n class:\n 'z-[1] before:-z-[1] before:rounded-btn hover:!bg-btn-secondary before:bg-btn-secondary-active relative overflow-hidden before:absolute before:inset-y-0 before:w-full before:-translate-x-full before:transition-transform before:duration-300 before:ease-in-out before:content-[\"\"] hover:before:translate-x-0',\n },\n {\n variant: 'primary',\n state: 'loading',\n class: 'bg-btn-primary',\n },\n {\n variant: 'secondary',\n state: 'loading',\n class: 'bg-btn-secondary disabled:bg-btn-secondary-disabled disabled:text-btn-secondary-disabled-foreground',\n },\n {\n variant: 'primary',\n state: 'disabled',\n class: 'disabled:bg-btn-primary-disabled disabled:text-btn-primary-disabled-foreground',\n },\n {\n variant: 'secondary',\n state: 'disabled',\n class: 'disabled:bg-btn-secondary-disabled disabled:text-btn-secondary-disabled-foreground',\n },\n {\n variant: 'nature',\n theme: 'dark',\n class: 'bg-transparent text-info-primary',\n },\n {\n variant: 'nature',\n theme: 'light',\n class: 'bg-info-primary text-info-white',\n },\n ],\n defaultVariants: {\n variant: 'primary',\n size: 'base',\n hoverEffect: 'none',\n state: 'default',\n theme: 'light',\n },\n }\n)\n\nconst loadingSvgVariants = cva('', {\n variants: {\n variant: {\n nature: 'stroke-btn-primary-foreground',\n primary: 'stroke-btn-primary-foreground',\n secondary: 'stroke-btn-secondary-foreground',\n link: 'stroke-primary',\n ghost: 'stroke-primary',\n },\n },\n defaultVariants: {\n variant: 'primary',\n },\n})\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n /** \u8BBE\u7F6E\u6309\u94AE\u8F7D\u5165\u72B6\u6001 */\n loading?: boolean\n /** \u8BBE\u7F6E\u6309\u94AE\u5931\u6548\u72B6\u6001 */\n disabled?: boolean\n /** \u5B9A\u4E49\u81EA\u7EC4\u4EF6\u4F5C\u4E3A\u7236\u7EC4\u4EF6\u7684\u7C7B\u578B\uFF0C \u8BE6\u7EC6\u4F7F\u7528\u65B9\u5F0F\u8BF7\u53C2\u8003radix-ui */\n asChild?: boolean\n /** \u81EA\u5B9A\u4E49loading */\n spinner?: React.ReactNode\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n asChild = false,\n size = 'base',\n children,\n variant,\n theme = 'light',\n hoverEffect = 'none',\n className,\n disabled = false,\n loading = false,\n spinner,\n ...props\n }: ButtonProps,\n ref\n ) => {\n const Comp = asChild ? Slot : 'button'\n const isInactive = disabled || loading\n const state = loading ? 'loading' : disabled ? 'disabled' : 'default'\n\n return (\n <Comp\n disabled={isInactive}\n className={cn(buttonVariants({ variant, size, hoverEffect, state, theme }), className)}\n ref={ref}\n {...props}\n >\n {loading ? (\n <>\n <span style={{ display: 'contents', visibility: 'hidden' }} aria-hidden>\n {children}\n </span>\n <span className=\"absolute\">\n {spinner ? (\n spinner\n ) : (\n <Spinner\n className={loadingSvgVariants({\n variant,\n })}\n />\n )}\n </span>\n <VisuallyHidden>{children}</VisuallyHidden>\n </>\n ) : (\n children\n )}\n </Comp>\n )\n }\n)\n\nButton.displayName = 'Button'\nexport default Button\n"],
|
|
5
|
+
"mappings": "aA4JU,mBAAAA,EACE,OAAAC,EADF,QAAAC,MAAA,oBA1JV,UAAYC,MAAW,QACvB,OAAS,QAAAC,MAAY,uBACrB,OAAS,kBAAAC,MAAsB,kCAC/B,OAA4B,OAAAC,MAAW,2BACvC,OAAOC,MAAa,sBACpB,OAAS,MAAAC,MAAU,sBAKnB,MAAMC,EAAiBH,EACrB,oPACA,CACE,SAAU,CACR,QAAS,CACP,OAAQ,mCACR,QAAS,yEACT,UACE,4HACF,KAAM,kDACN,MAAO,wDACT,EACA,KAAM,CACJ,GAAI,uCACJ,KAAM,sDACN,GAAI,sDACJ,KAAM,qCACR,EAEA,YAAa,CACX,KAAM,GACN,MAAO,EACT,EACA,MAAO,CACL,QAAS,GACT,SAAU,GACV,QAAS,EACX,EACA,MAAO,CACL,KAAM,GACN,MAAO,EACT,CACF,EACA,iBAAkB,CAChB,CACE,QAAS,UACT,YAAa,QACb,MACE,+SACJ,EACA,CACE,QAAS,YACT,YAAa,QACb,MACE,mTACJ,EACA,CACE,QAAS,UACT,MAAO,UACP,MAAO,gBACT,EACA,CACE,QAAS,YACT,MAAO,UACP,MAAO,qGACT,EACA,CACE,QAAS,UACT,MAAO,WACP,MAAO,gFACT,EACA,CACE,QAAS,YACT,MAAO,WACP,MAAO,oFACT,EACA,CACE,QAAS,SACT,MAAO,OACP,MAAO,kCACT,EACA,CACE,QAAS,SACT,MAAO,QACP,MAAO,iCACT,CACF,EACA,gBAAiB,CACf,QAAS,UACT,KAAM,OACN,YAAa,OACb,MAAO,UACP,MAAO,OACT,CACF,CACF,EAEMI,EAAqBJ,EAAI,GAAI,CACjC,SAAU,CACR,QAAS,CACP,OAAQ,gCACR,QAAS,gCACT,UAAW,kCACX,KAAM,iBACN,MAAO,gBACT,CACF,EACA,gBAAiB,CACf,QAAS,SACX,CACF,CAAC,EAeKK,EAASR,EAAM,WACnB,CACE,CACE,QAAAS,EAAU,GACV,KAAAC,EAAO,OACP,SAAAC,EACA,QAAAC,EACA,MAAAC,EAAQ,QACR,YAAAC,EAAc,OACd,UAAAC,EACA,SAAAC,EAAW,GACX,QAAAC,EAAU,GACV,QAAAC,EACA,GAAGC,CACL,EACAC,IAOEtB,EALWW,EAAUR,EAAO,SAK3B,CACC,SALee,GAAYC,EAM3B,UAAWZ,EAAGC,EAAe,CAAE,QAAAM,EAAS,KAAAF,EAAM,YAAAI,EAAa,MALjDG,EAAU,UAAYD,EAAW,WAAa,UAKU,MAAAH,CAAM,CAAC,EAAGE,CAAS,EACrF,IAAKK,EACJ,GAAGD,EAEH,SAAAF,EACClB,EAAAF,EAAA,CACE,UAAAC,EAAC,QAAK,MAAO,CAAE,QAAS,WAAY,WAAY,QAAS,EAAG,cAAW,GACpE,SAAAa,EACH,EACAb,EAAC,QAAK,UAAU,WACb,SAAAoB,GAGCpB,EAACM,EAAA,CACC,UAAWG,EAAmB,CAC5B,QAAAK,CACF,CAAC,EACH,EAEJ,EACAd,EAACI,EAAA,CAAgB,SAAAS,EAAS,GAC5B,EAEAA,EAEJ,CAGN,EAEAH,EAAO,YAAc,SACrB,IAAOa,EAAQb",
|
|
6
6
|
"names": ["Fragment", "jsx", "jsxs", "React", "Slot", "VisuallyHidden", "cva", "Spinner", "cn", "buttonVariants", "loadingSvgVariants", "Button", "asChild", "size", "children", "variant", "theme", "hoverEffect", "className", "disabled", "loading", "spinner", "props", "ref", "button_default"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as s}from"react/jsx-runtime";import*as r from"react";import{cn as d}from"../helpers/index.js";const i=r.forwardRef(({className:e,...t},a)=>s("div",{ref:a,className:d("bg-card text-card-foreground rounded-lg border shadow-sm",e),...t}));i.displayName="Card";const o=r.forwardRef(({className:e,...t},a)=>s("div",{ref:a,className:d("lg-desktop:px-6 lg-desktop:pt-[32px] flex flex-col space-y-1.5 px-4 pt-6",e),...t}));o.displayName="CardHeader";const l=r.forwardRef(({className:e,...t},a)=>s("div",{ref:a,className:d("text-2xl font-semibold leading-none tracking-tight",e),...t}));l.displayName="CardTitle";const n=r.forwardRef(({className:e,...t},a)=>s("div",{ref:a,className:d("text-muted-foreground text-sm",e),...t}));n.displayName="CardDescription";const m=r.forwardRef(({className:e,...t},a)=>s("div",{ref:a,className:d("lg-desktop:p-6 p-4 pt-0",e),...t}));m.displayName="CardContent";const p=r.forwardRef(({className:e,...t},a)=>s("div",{ref:a,className:d("lg-desktop:px-6 lg-desktop:pb-[32px] flex items-center px-4 pb-6 pt-0",e),...t}));p.displayName="CardFooter";export{i as Card,m as CardContent,n as CardDescription,p as CardFooter,o as CardHeader,l as CardTitle};
|
|
2
2
|
//# sourceMappingURL=card.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/card.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react'\n\nimport { cn } from '../helpers/index.js'\n\nconst Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn('bg-card text-card-foreground rounded-lg border shadow-sm', className)} {...props} />\n))\nCard.displayName = 'Card'\n\nconst CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('
|
|
5
|
-
"mappings": "AAKE,cAAAA,MAAA,oBALF,UAAYC,MAAW,QAEvB,OAAS,MAAAC,MAAU,sBAEnB,MAAMC,EAAOF,EAAM,WAAiE,CAAC,CAAE,UAAAG,EAAW,GAAGC,CAAM,EAAGC,IAC5GN,EAAC,OAAI,IAAKM,EAAK,UAAWJ,EAAG,2DAA4DE,CAAS,EAAI,GAAGC,EAAO,CACjH,EACDF,EAAK,YAAc,OAEnB,MAAMI,EAAaN,EAAM,WACvB,CAAC,CAAE,UAAAG,EAAW,GAAGC,CAAM,EAAGC,IACxBN,EAAC,OACC,IAAKM,EACL,UAAWJ,EAAG,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react'\n\nimport { cn } from '../helpers/index.js'\n\nconst Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn('bg-card text-card-foreground rounded-lg border shadow-sm', className)} {...props} />\n))\nCard.displayName = 'Card'\n\nconst CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('lg-desktop:px-6 lg-desktop:pt-[32px] flex flex-col space-y-1.5 px-4 pt-6', className)}\n {...props}\n />\n )\n)\nCardHeader.displayName = 'CardHeader'\n\nconst CardTitle = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('text-2xl font-semibold leading-none tracking-tight', className)} {...props} />\n )\n)\nCardTitle.displayName = 'CardTitle'\n\nconst CardDescription = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />\n )\n)\nCardDescription.displayName = 'CardDescription'\n\nconst CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => <div ref={ref} className={cn('lg-desktop:p-6 p-4 pt-0', className)} {...props} />\n)\nCardContent.displayName = 'CardContent'\n\nconst CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('lg-desktop:px-6 lg-desktop:pb-[32px] flex items-center px-4 pb-6 pt-0', className)}\n {...props}\n />\n )\n)\nCardFooter.displayName = 'CardFooter'\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }\n"],
|
|
5
|
+
"mappings": "AAKE,cAAAA,MAAA,oBALF,UAAYC,MAAW,QAEvB,OAAS,MAAAC,MAAU,sBAEnB,MAAMC,EAAOF,EAAM,WAAiE,CAAC,CAAE,UAAAG,EAAW,GAAGC,CAAM,EAAGC,IAC5GN,EAAC,OAAI,IAAKM,EAAK,UAAWJ,EAAG,2DAA4DE,CAAS,EAAI,GAAGC,EAAO,CACjH,EACDF,EAAK,YAAc,OAEnB,MAAMI,EAAaN,EAAM,WACvB,CAAC,CAAE,UAAAG,EAAW,GAAGC,CAAM,EAAGC,IACxBN,EAAC,OACC,IAAKM,EACL,UAAWJ,EAAG,2EAA4EE,CAAS,EAClG,GAAGC,EACN,CAEJ,EACAE,EAAW,YAAc,aAEzB,MAAMC,EAAYP,EAAM,WACtB,CAAC,CAAE,UAAAG,EAAW,GAAGC,CAAM,EAAGC,IACxBN,EAAC,OAAI,IAAKM,EAAK,UAAWJ,EAAG,qDAAsDE,CAAS,EAAI,GAAGC,EAAO,CAE9G,EACAG,EAAU,YAAc,YAExB,MAAMC,EAAkBR,EAAM,WAC5B,CAAC,CAAE,UAAAG,EAAW,GAAGC,CAAM,EAAGC,IACxBN,EAAC,OAAI,IAAKM,EAAK,UAAWJ,EAAG,gCAAiCE,CAAS,EAAI,GAAGC,EAAO,CAEzF,EACAI,EAAgB,YAAc,kBAE9B,MAAMC,EAAcT,EAAM,WACxB,CAAC,CAAE,UAAAG,EAAW,GAAGC,CAAM,EAAGC,IAAQN,EAAC,OAAI,IAAKM,EAAK,UAAWJ,EAAG,0BAA2BE,CAAS,EAAI,GAAGC,EAAO,CACnH,EACAK,EAAY,YAAc,cAE1B,MAAMC,EAAaV,EAAM,WACvB,CAAC,CAAE,UAAAG,EAAW,GAAGC,CAAM,EAAGC,IACxBN,EAAC,OACC,IAAKM,EACL,UAAWJ,EAAG,wEAAyEE,CAAS,EAC/F,GAAGC,EACN,CAEJ,EACAM,EAAW,YAAc",
|
|
6
6
|
"names": ["jsx", "React", "cn", "Card", "className", "props", "ref", "CardHeader", "CardTitle", "CardDescription", "CardContent", "CardFooter"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as a,jsxs as y}from"react/jsx-runtime";import*as t from"react";import U from"embla-carousel-react";import{cn as m}from"../helpers/index.js";import P from"./button.js";const F=(e,o)=>{const[s,r]=t.useState(0),[n,p]=t.useState([]),C=t.useCallback(f=>{e&&(e.scrollTo(f),o&&o(e))},[e,o]),
|
|
1
|
+
"use client";import{jsx as a,jsxs as y}from"react/jsx-runtime";import*as t from"react";import U from"embla-carousel-react";import{cn as m}from"../helpers/index.js";import P from"./button.js";const F=(e,o)=>{const[s,r]=t.useState(0),[n,p]=t.useState([]),C=t.useCallback(f=>{e&&(e.scrollTo(f),o&&o(e))},[e,o]),i=t.useCallback(f=>{p(f.scrollSnapList())},[]),u=t.useCallback(f=>{r(f.selectedScrollSnap())},[]);return t.useEffect(()=>{e&&(i(e),u(e),e.on("reInit",i).on("reInit",u).on("select",u))},[e,i,u]),{selectedIndex:s,scrollSnaps:n,onDotButtonClick:C}},K=e=>{const{children:o,...s}=e;return a("button",{type:"button",...s,children:o})},h=t.createContext(null);function v(){const e=t.useContext(h);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}const N=t.forwardRef(({orientation:e="horizontal",showNavigation:o=!1,navigationPosition:s="inner",opts:r,setApi:n,plugins:p,className:C,children:i,...u},f)=>{const[g,l]=U({...r,axis:e==="horizontal"?"x":"y"},p),[L,R]=t.useState(!1),[k,B]=t.useState(!1),{selectedIndex:M,scrollSnaps:z,onDotButtonClick:H}=F(l),d=t.useCallback(c=>{c&&(R(c.canScrollPrev()),B(c.canScrollNext()))},[]),x=t.useCallback(()=>{l?.scrollPrev()},[l]),b=t.useCallback(()=>{l?.scrollNext()},[l]),I=t.useCallback(c=>{c.key==="ArrowLeft"?(c.preventDefault(),x()):c.key==="ArrowRight"&&(c.preventDefault(),b())},[x,b]);return t.useEffect(()=>{!l||!n||n(l)},[l,n]),t.useEffect(()=>{if(l)return d(l),l.on("reInit",d),l.on("select",d),()=>{l?.off("select",d)}},[l,d]),a(h.Provider,{value:{carouselRef:g,api:l,opts:r,orientation:e||(r?.axis==="y"?"vertical":"horizontal"),scrollPrev:x,scrollNext:b,canScrollPrev:L,canScrollNext:k},children:y("div",{ref:f,onKeyDownCapture:I,className:m("relative",C),role:"region","aria-roledescription":"carousel",...u,children:[i,o&&a("div",{className:m("absolute left-1/2 mx-auto flex -translate-x-1/2 justify-center gap-[8px]",{"laptop:bottom-[40px] bottom-[24px]":s==="inner","laptop:-bottom-[40px] -bottom-[24px]":s==="outter"}),children:z.map((c,w)=>a(K,{onClick:()=>H(w),className:m("laptop:w-[30px] h-[3px] w-[16px] bg-[#86868C]",{"bg-[#1D1D1F]":w===M})},w))})]})})});N.displayName="Carousel";const T=t.forwardRef(({className:e,...o},s)=>{const{carouselRef:r,orientation:n}=v();return a("div",{ref:r,className:"overflow-hidden",children:a("div",{ref:s,className:m("flex",n==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...o})})});T.displayName="CarouselContent";const E=t.forwardRef(({className:e,...o},s)=>{const{orientation:r}=v();return a("div",{ref:s,role:"group","aria-roledescription":"slide",className:m("w-0 shrink-0 grow-0 basis-full",r==="horizontal"?"pl-4":"pt-4",e),...o})});E.displayName="CarouselItem";const S=t.forwardRef(({className:e,variant:o="secondary",size:s="icon",children:r,...n},p)=>{const{orientation:C,scrollPrev:i,canScrollPrev:u}=v();return y(P,{ref:p,variant:o,size:s,className:m("absolute size-8 rounded-full",C==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!u,onClick:i,...n,children:[r||y("svg",{width:"58",height:"58",viewBox:"0 0 58 58",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a("circle",{opacity:"0.2",cx:"29",cy:"29",r:"29",transform:"matrix(1 -8.74228e-08 -8.74228e-08 -1 0 58)",fill:"#1D1D1F"}),a("path",{d:"M32.1583 36.8248C32.6139 36.3692 32.6139 35.6305 32.1583 35.1749L25.9832 28.9998L32.1583 22.8248C32.6139 22.3692 32.6139 21.6305 32.1583 21.1749C31.7027 20.7193 30.964 20.7193 30.5084 21.1749L23.5084 28.1749C23.0528 28.6305 23.0528 29.3692 23.5084 29.8248L30.5084 36.8248C30.964 37.2804 31.7027 37.2804 32.1583 36.8248Z",fill:"white"})]}),a("span",{className:"sr-only",children:"Previous slide"})]})});S.displayName="CarouselPrevious";const D=t.forwardRef(({className:e,variant:o="secondary",size:s="icon",children:r,...n},p)=>{const{orientation:C,scrollNext:i,canScrollNext:u}=v();return y(P,{ref:p,variant:o,size:s,className:m("absolute size-8 rounded-full",C==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!u,onClick:i,...n,children:[r||y("svg",{width:"58",height:"58",viewBox:"0 0 58 58",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a("circle",{opacity:"0.2",cx:"29",cy:"29",r:"29",transform:"rotate(-180 29 29)",fill:"#1D1D1F"}),a("path",{d:"M25.8417 36.8248C25.3861 36.3692 25.3861 35.6305 25.8417 35.1749L32.0168 28.9998L25.8417 22.8248C25.3861 22.3692 25.3861 21.6305 25.8417 21.1749C26.2973 20.7193 27.036 20.7193 27.4916 21.1749L34.4916 28.1749C34.9472 28.6305 34.9472 29.3692 34.4916 29.8248L27.4916 36.8248C27.036 37.2804 26.2973 37.2804 25.8417 36.8248Z",fill:"white"})]}),a("span",{className:"sr-only",children:"Next slide"})]})});D.displayName="CarouselNext";export{N as Carousel,T as CarouselContent,E as CarouselItem,D as CarouselNext,S as CarouselPrevious,K as DotButton};
|
|
2
2
|
//# sourceMappingURL=carousel.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/carousel.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport type { EmblaCarouselType } from 'embla-carousel'\nimport useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react'\n\nimport { cn } from '../helpers/index.js'\nimport Button from './button.js'\n\ntype CarouselApi = UseEmblaCarouselType[1]\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>\ntype CarouselOptions = UseCarouselParameters[0]\ntype CarouselPlugin = UseCarouselParameters[1]\n\ntype CarouselProps = {\n /**\n * \u662F\u5426\u663E\u793A\u5BFC\u822A\u70B9\n */\n showNavigation?: boolean\n /**\n * \u5BFC\u822A\u70B9\u4F4D\u7F6E default inner\n */\n navigationPosition?: 'inner' | 'outter'\n opts?: CarouselOptions\n plugins?: CarouselPlugin\n orientation?: 'horizontal' | 'vertical'\n setApi?: (api: CarouselApi) => void\n}\n\ntype CarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0]\n api: ReturnType<typeof useEmblaCarousel>[1]\n scrollPrev: () => void\n scrollNext: () => void\n canScrollPrev: boolean\n canScrollNext: boolean\n} & CarouselProps\n\ntype UseDotButtonType = {\n selectedIndex: number\n scrollSnaps: number[]\n onDotButtonClick: (index: number) => void\n}\n\nconst useDotButton = (\n emblaApi: EmblaCarouselType | undefined,\n onButtonClick?: (emblaApi: EmblaCarouselType) => void\n): UseDotButtonType => {\n const [selectedIndex, setSelectedIndex] = React.useState(0)\n const [scrollSnaps, setScrollSnaps] = React.useState<number[]>([])\n\n const onDotButtonClick = React.useCallback(\n (index: number) => {\n if (!emblaApi) return\n emblaApi.scrollTo(index)\n if (onButtonClick) onButtonClick(emblaApi)\n },\n [emblaApi, onButtonClick]\n )\n\n const onInit = React.useCallback((emblaApi: EmblaCarouselType) => {\n setScrollSnaps(emblaApi.scrollSnapList())\n }, [])\n\n const onSelect = React.useCallback((emblaApi: EmblaCarouselType) => {\n setSelectedIndex(emblaApi.selectedScrollSnap())\n }, [])\n\n React.useEffect(() => {\n if (!emblaApi) return\n\n onInit(emblaApi)\n onSelect(emblaApi)\n\n emblaApi.on('reInit', onInit).on('reInit', onSelect).on('select', onSelect)\n }, [emblaApi, onInit, onSelect])\n\n return {\n selectedIndex,\n scrollSnaps,\n onDotButtonClick,\n }\n}\n\ntype PropType = React.ComponentPropsWithRef<'button'>\n\nexport const DotButton: React.FC<PropType> = props => {\n const { children, ...restProps } = props\n\n return (\n <button type=\"button\" {...restProps}>\n {children}\n </button>\n )\n}\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null)\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext)\n\n if (!context) {\n throw new Error('useCarousel must be used within a <Carousel />')\n }\n\n return context\n}\n\nconst Carousel = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement> & CarouselProps>(\n (\n {\n orientation = 'horizontal',\n showNavigation = false,\n navigationPosition = 'inner',\n opts,\n setApi,\n plugins,\n className,\n children,\n ...props\n },\n ref\n ) => {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === 'horizontal' ? 'x' : 'y',\n },\n plugins\n )\n const [canScrollPrev, setCanScrollPrev] = React.useState(false)\n const [canScrollNext, setCanScrollNext] = React.useState(false)\n\n const { selectedIndex, scrollSnaps, onDotButtonClick } = useDotButton(api)\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n if (!api) {\n return\n }\n\n setCanScrollPrev(api.canScrollPrev())\n setCanScrollNext(api.canScrollNext())\n }, [])\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev()\n }, [api])\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext()\n }, [api])\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'ArrowLeft') {\n event.preventDefault()\n scrollPrev()\n } else if (event.key === 'ArrowRight') {\n event.preventDefault()\n scrollNext()\n }\n },\n [scrollPrev, scrollNext]\n )\n\n React.useEffect(() => {\n if (!api || !setApi) {\n return\n }\n\n setApi(api)\n }, [api, setApi])\n\n React.useEffect(() => {\n if (!api) {\n return\n }\n\n onSelect(api)\n api.on('reInit', onSelect)\n api.on('select', onSelect)\n\n return () => {\n api?.off('select', onSelect)\n }\n }, [api, onSelect])\n\n return (\n <CarouselContext.Provider\n value={{\n carouselRef,\n api: api,\n opts,\n orientation: orientation || (opts?.axis === 'y' ? 'vertical' : 'horizontal'),\n scrollPrev,\n scrollNext,\n canScrollPrev,\n canScrollNext,\n }}\n >\n <div\n ref={ref}\n onKeyDownCapture={handleKeyDown}\n className={cn('relative', className)}\n role=\"region\"\n aria-roledescription=\"carousel\"\n {...props}\n >\n {children}\n {showNavigation && (\n <div\n className={cn('absolute left-1/2 mx-auto flex -translate-x-1/2 justify-center gap-[8px]', {\n 'min-md:bottom-[40px] bottom-[24px]': navigationPosition === 'inner',\n 'min-md:-bottom-[40px] -bottom-[24px]': navigationPosition === 'outter',\n })}\n >\n {scrollSnaps.map((_, index) => (\n <DotButton\n key={index}\n onClick={() => onDotButtonClick(index)}\n className={cn('min-md:w-[30px] h-[3px] w-[16px] bg-[#86868C]', {\n 'bg-[#1D1D1F]': index === selectedIndex,\n })}\n />\n ))}\n </div>\n )}\n </div>\n </CarouselContext.Provider>\n )\n }\n)\nCarousel.displayName = 'Carousel'\n\nconst CarouselContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n const { carouselRef, orientation } = useCarousel()\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\">\n <div\n ref={ref}\n className={cn('flex', orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col', className)}\n {...props}\n />\n </div>\n )\n }\n)\nCarouselContent.displayName = 'CarouselContent'\n\nconst CarouselItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n const { orientation } = useCarousel()\n\n return (\n <div\n ref={ref}\n role=\"group\"\n aria-roledescription=\"slide\"\n className={cn('min-w-0 shrink-0 grow-0 basis-full', orientation === 'horizontal' ? 'pl-4' : 'pt-4', className)}\n {...props}\n />\n )\n }\n)\nCarouselItem.displayName = 'CarouselItem'\n\nconst CarouselPrevious = React.forwardRef<HTMLButtonElement, React.ComponentProps<typeof Button>>(\n ({ className, variant = 'secondary', size = 'icon', children, ...props }, ref) => {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel()\n\n return (\n <Button\n ref={ref}\n variant={variant}\n size={size}\n className={cn(\n 'absolute size-8 rounded-full',\n orientation === 'horizontal'\n ? '-left-12 top-1/2 -translate-y-1/2'\n : '-top-12 left-1/2 -translate-x-1/2 rotate-90',\n className\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n {children ? (\n children\n ) : (\n <svg width=\"58\" height=\"58\" viewBox=\"0 0 58 58\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle\n opacity=\"0.2\"\n cx=\"29\"\n cy=\"29\"\n r=\"29\"\n transform=\"matrix(1 -8.74228e-08 -8.74228e-08 -1 0 58)\"\n fill=\"#1D1D1F\"\n />\n <path\n d=\"M32.1583 36.8248C32.6139 36.3692 32.6139 35.6305 32.1583 35.1749L25.9832 28.9998L32.1583 22.8248C32.6139 22.3692 32.6139 21.6305 32.1583 21.1749C31.7027 20.7193 30.964 20.7193 30.5084 21.1749L23.5084 28.1749C23.0528 28.6305 23.0528 29.3692 23.5084 29.8248L30.5084 36.8248C30.964 37.2804 31.7027 37.2804 32.1583 36.8248Z\"\n fill=\"white\"\n />\n </svg>\n )}\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n )\n }\n)\nCarouselPrevious.displayName = 'CarouselPrevious'\n\nconst CarouselNext = React.forwardRef<HTMLButtonElement, React.ComponentProps<typeof Button>>(\n ({ className, variant = 'secondary', size = 'icon', children, ...props }, ref) => {\n const { orientation, scrollNext, canScrollNext } = useCarousel()\n\n return (\n <Button\n ref={ref}\n variant={variant}\n size={size}\n className={cn(\n 'absolute size-8 rounded-full',\n orientation === 'horizontal'\n ? '-right-12 top-1/2 -translate-y-1/2'\n : '-bottom-12 left-1/2 -translate-x-1/2 rotate-90',\n className\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n {children ? (\n children\n ) : (\n <svg width=\"58\" height=\"58\" viewBox=\"0 0 58 58\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle opacity=\"0.2\" cx=\"29\" cy=\"29\" r=\"29\" transform=\"rotate(-180 29 29)\" fill=\"#1D1D1F\" />\n <path\n d=\"M25.8417 36.8248C25.3861 36.3692 25.3861 35.6305 25.8417 35.1749L32.0168 28.9998L25.8417 22.8248C25.3861 22.3692 25.3861 21.6305 25.8417 21.1749C26.2973 20.7193 27.036 20.7193 27.4916 21.1749L34.4916 28.1749C34.9472 28.6305 34.9472 29.3692 34.4916 29.8248L27.4916 36.8248C27.036 37.2804 26.2973 37.2804 25.8417 36.8248Z\"\n fill=\"white\"\n />\n </svg>\n )}\n <span className=\"sr-only\">Next slide</span>\n </Button>\n )\n }\n)\nCarouselNext.displayName = 'CarouselNext'\n\nexport { type CarouselApi, Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext }\n"],
|
|
5
|
-
"mappings": "aA0FI,cAAAA,EA8GI,QAAAC,MA9GJ,oBAxFJ,UAAYC,MAAW,QAEvB,OAAOC,MAAqD,uBAE5D,OAAS,MAAAC,MAAU,sBACnB,OAAOC,MAAY,cAqCnB,MAAMC,EAAe,CACnBC,EACAC,IACqB,CACrB,KAAM,CAACC,EAAeC,CAAgB,EAAIR,EAAM,SAAS,CAAC,EACpD,CAACS,EAAaC,CAAc,EAAIV,EAAM,SAAmB,CAAC,CAAC,EAE3DW,EAAmBX,EAAM,YAC5BY,GAAkB,CACZP,IACLA,EAAS,SAASO,CAAK,EACnBN,GAAeA,EAAcD,CAAQ,EAC3C,EACA,CAACA,EAAUC,CAAa,CAC1B,EAEMO,EAASb,EAAM,YAAaK,GAAgC,CAChEK,EAAeL,EAAS,eAAe,CAAC,CAC1C,EAAG,CAAC,CAAC,EAECS,EAAWd,EAAM,YAAaK,GAAgC,CAClEG,EAAiBH,EAAS,mBAAmB,CAAC,CAChD,EAAG,CAAC,CAAC,EAEL,OAAAL,EAAM,UAAU,IAAM,CACfK,IAELQ,EAAOR,CAAQ,EACfS,EAAST,CAAQ,EAEjBA,EA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,EAAM,WAC5B,CAAC,CAAE,UAAA6B,EAAW,GAAGb,CAAM,EAAGc,IAAQ,CAChC,KAAM,CAAE,YAAAC,EAAa,YAAAR,CAAY,EAAIH,EAAY,EAEjD,OACEtB,EAAC,OAAI,IAAKiC,EAAa,UAAU,kBAC/B,SAAAjC,EAAC,OACC,IAAKgC,EACL,UAAW5B,EAAG,OAAQqB,IAAgB,aAAe,QAAU,iBAAkBM,CAAS,EACzF,GAAGb,EACN,EACF,CAEJ,CACF,EACA0B,EAAgB,YAAc,kBAE9B,MAAMC,EAAe3C,EAAM,WACzB,CAAC,CAAE,UAAA6B,EAAW,GAAGb,CAAM,EAAGc,IAAQ,CAChC,KAAM,CAAE,YAAAP,CAAY,EAAIH,EAAY,EAEpC,OACEtB,EAAC,OACC,IAAKgC,EACL,KAAK,QACL,uBAAqB,QACrB,UAAW5B,EAAG,
|
|
4
|
+
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport type { EmblaCarouselType } from 'embla-carousel'\nimport useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react'\n\nimport { cn } from '../helpers/index.js'\nimport Button from './button.js'\n\ntype CarouselApi = UseEmblaCarouselType[1]\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>\ntype CarouselOptions = UseCarouselParameters[0]\ntype CarouselPlugin = UseCarouselParameters[1]\n\ntype CarouselProps = {\n /**\n * \u662F\u5426\u663E\u793A\u5BFC\u822A\u70B9\n */\n showNavigation?: boolean\n /**\n * \u5BFC\u822A\u70B9\u4F4D\u7F6E default inner\n */\n navigationPosition?: 'inner' | 'outter'\n opts?: CarouselOptions\n plugins?: CarouselPlugin\n orientation?: 'horizontal' | 'vertical'\n setApi?: (api: CarouselApi) => void\n}\n\ntype CarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0]\n api: ReturnType<typeof useEmblaCarousel>[1]\n scrollPrev: () => void\n scrollNext: () => void\n canScrollPrev: boolean\n canScrollNext: boolean\n} & CarouselProps\n\ntype UseDotButtonType = {\n selectedIndex: number\n scrollSnaps: number[]\n onDotButtonClick: (index: number) => void\n}\n\nconst useDotButton = (\n emblaApi: EmblaCarouselType | undefined,\n onButtonClick?: (emblaApi: EmblaCarouselType) => void\n): UseDotButtonType => {\n const [selectedIndex, setSelectedIndex] = React.useState(0)\n const [scrollSnaps, setScrollSnaps] = React.useState<number[]>([])\n\n const onDotButtonClick = React.useCallback(\n (index: number) => {\n if (!emblaApi) return\n emblaApi.scrollTo(index)\n if (onButtonClick) onButtonClick(emblaApi)\n },\n [emblaApi, onButtonClick]\n )\n\n const onInit = React.useCallback((emblaApi: EmblaCarouselType) => {\n setScrollSnaps(emblaApi.scrollSnapList())\n }, [])\n\n const onSelect = React.useCallback((emblaApi: EmblaCarouselType) => {\n setSelectedIndex(emblaApi.selectedScrollSnap())\n }, [])\n\n React.useEffect(() => {\n if (!emblaApi) return\n\n onInit(emblaApi)\n onSelect(emblaApi)\n\n emblaApi.on('reInit', onInit).on('reInit', onSelect).on('select', onSelect)\n }, [emblaApi, onInit, onSelect])\n\n return {\n selectedIndex,\n scrollSnaps,\n onDotButtonClick,\n }\n}\n\ntype PropType = React.ComponentPropsWithRef<'button'>\n\nexport const DotButton: React.FC<PropType> = props => {\n const { children, ...restProps } = props\n\n return (\n <button type=\"button\" {...restProps}>\n {children}\n </button>\n )\n}\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null)\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext)\n\n if (!context) {\n throw new Error('useCarousel must be used within a <Carousel />')\n }\n\n return context\n}\n\nconst Carousel = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement> & CarouselProps>(\n (\n {\n orientation = 'horizontal',\n showNavigation = false,\n navigationPosition = 'inner',\n opts,\n setApi,\n plugins,\n className,\n children,\n ...props\n },\n ref\n ) => {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === 'horizontal' ? 'x' : 'y',\n },\n plugins\n )\n const [canScrollPrev, setCanScrollPrev] = React.useState(false)\n const [canScrollNext, setCanScrollNext] = React.useState(false)\n\n const { selectedIndex, scrollSnaps, onDotButtonClick } = useDotButton(api)\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n if (!api) {\n return\n }\n\n setCanScrollPrev(api.canScrollPrev())\n setCanScrollNext(api.canScrollNext())\n }, [])\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev()\n }, [api])\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext()\n }, [api])\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'ArrowLeft') {\n event.preventDefault()\n scrollPrev()\n } else if (event.key === 'ArrowRight') {\n event.preventDefault()\n scrollNext()\n }\n },\n [scrollPrev, scrollNext]\n )\n\n React.useEffect(() => {\n if (!api || !setApi) {\n return\n }\n\n setApi(api)\n }, [api, setApi])\n\n React.useEffect(() => {\n if (!api) {\n return\n }\n\n onSelect(api)\n api.on('reInit', onSelect)\n api.on('select', onSelect)\n\n return () => {\n api?.off('select', onSelect)\n }\n }, [api, onSelect])\n\n return (\n <CarouselContext.Provider\n value={{\n carouselRef,\n api: api,\n opts,\n orientation: orientation || (opts?.axis === 'y' ? 'vertical' : 'horizontal'),\n scrollPrev,\n scrollNext,\n canScrollPrev,\n canScrollNext,\n }}\n >\n <div\n ref={ref}\n onKeyDownCapture={handleKeyDown}\n className={cn('relative', className)}\n role=\"region\"\n aria-roledescription=\"carousel\"\n {...props}\n >\n {children}\n {showNavigation && (\n <div\n className={cn('absolute left-1/2 mx-auto flex -translate-x-1/2 justify-center gap-[8px]', {\n 'laptop:bottom-[40px] bottom-[24px]': navigationPosition === 'inner',\n 'laptop:-bottom-[40px] -bottom-[24px]': navigationPosition === 'outter',\n })}\n >\n {scrollSnaps.map((_, index) => (\n <DotButton\n key={index}\n onClick={() => onDotButtonClick(index)}\n className={cn('laptop:w-[30px] h-[3px] w-[16px] bg-[#86868C]', {\n 'bg-[#1D1D1F]': index === selectedIndex,\n })}\n />\n ))}\n </div>\n )}\n </div>\n </CarouselContext.Provider>\n )\n }\n)\nCarousel.displayName = 'Carousel'\n\nconst CarouselContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n const { carouselRef, orientation } = useCarousel()\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\">\n <div\n ref={ref}\n className={cn('flex', orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col', className)}\n {...props}\n />\n </div>\n )\n }\n)\nCarouselContent.displayName = 'CarouselContent'\n\nconst CarouselItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n const { orientation } = useCarousel()\n\n return (\n <div\n ref={ref}\n role=\"group\"\n aria-roledescription=\"slide\"\n className={cn('w-0 shrink-0 grow-0 basis-full', orientation === 'horizontal' ? 'pl-4' : 'pt-4', className)}\n {...props}\n />\n )\n }\n)\nCarouselItem.displayName = 'CarouselItem'\n\nconst CarouselPrevious = React.forwardRef<HTMLButtonElement, React.ComponentProps<typeof Button>>(\n ({ className, variant = 'secondary', size = 'icon', children, ...props }, ref) => {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel()\n\n return (\n <Button\n ref={ref}\n variant={variant}\n size={size}\n className={cn(\n 'absolute size-8 rounded-full',\n orientation === 'horizontal'\n ? '-left-12 top-1/2 -translate-y-1/2'\n : '-top-12 left-1/2 -translate-x-1/2 rotate-90',\n className\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n {children ? (\n children\n ) : (\n <svg width=\"58\" height=\"58\" viewBox=\"0 0 58 58\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle\n opacity=\"0.2\"\n cx=\"29\"\n cy=\"29\"\n r=\"29\"\n transform=\"matrix(1 -8.74228e-08 -8.74228e-08 -1 0 58)\"\n fill=\"#1D1D1F\"\n />\n <path\n d=\"M32.1583 36.8248C32.6139 36.3692 32.6139 35.6305 32.1583 35.1749L25.9832 28.9998L32.1583 22.8248C32.6139 22.3692 32.6139 21.6305 32.1583 21.1749C31.7027 20.7193 30.964 20.7193 30.5084 21.1749L23.5084 28.1749C23.0528 28.6305 23.0528 29.3692 23.5084 29.8248L30.5084 36.8248C30.964 37.2804 31.7027 37.2804 32.1583 36.8248Z\"\n fill=\"white\"\n />\n </svg>\n )}\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n )\n }\n)\nCarouselPrevious.displayName = 'CarouselPrevious'\n\nconst CarouselNext = React.forwardRef<HTMLButtonElement, React.ComponentProps<typeof Button>>(\n ({ className, variant = 'secondary', size = 'icon', children, ...props }, ref) => {\n const { orientation, scrollNext, canScrollNext } = useCarousel()\n\n return (\n <Button\n ref={ref}\n variant={variant}\n size={size}\n className={cn(\n 'absolute size-8 rounded-full',\n orientation === 'horizontal'\n ? '-right-12 top-1/2 -translate-y-1/2'\n : '-bottom-12 left-1/2 -translate-x-1/2 rotate-90',\n className\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n {children ? (\n children\n ) : (\n <svg width=\"58\" height=\"58\" viewBox=\"0 0 58 58\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle opacity=\"0.2\" cx=\"29\" cy=\"29\" r=\"29\" transform=\"rotate(-180 29 29)\" fill=\"#1D1D1F\" />\n <path\n d=\"M25.8417 36.8248C25.3861 36.3692 25.3861 35.6305 25.8417 35.1749L32.0168 28.9998L25.8417 22.8248C25.3861 22.3692 25.3861 21.6305 25.8417 21.1749C26.2973 20.7193 27.036 20.7193 27.4916 21.1749L34.4916 28.1749C34.9472 28.6305 34.9472 29.3692 34.4916 29.8248L27.4916 36.8248C27.036 37.2804 26.2973 37.2804 25.8417 36.8248Z\"\n fill=\"white\"\n />\n </svg>\n )}\n <span className=\"sr-only\">Next slide</span>\n </Button>\n )\n }\n)\nCarouselNext.displayName = 'CarouselNext'\n\nexport { type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EAEH,UAAAC,GAGClB,EAAC,OAAI,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,6BAChE,UAAAD,EAAC,UAAO,QAAQ,MAAM,GAAG,KAAK,GAAG,KAAK,EAAE,KAAK,UAAU,qBAAqB,KAAK,UAAU,EAC3FA,EAAC,QACC,EAAE,kUACF,KAAK,QACP,GACF,EAEFA,EAAC,QAAK,UAAU,UAAU,sBAAU,GACtC,CAEJ,CACF,EACAiD,EAAa,YAAc",
|
|
6
6
|
"names": ["jsx", "jsxs", "React", "useEmblaCarousel", "cn", "Button", "useDotButton", "emblaApi", "onButtonClick", "selectedIndex", "setSelectedIndex", "scrollSnaps", "setScrollSnaps", "onDotButtonClick", "index", "onInit", "onSelect", "DotButton", "props", "children", "restProps", "CarouselContext", "useCarousel", "context", "Carousel", "orientation", "showNavigation", "navigationPosition", "opts", "setApi", "plugins", "className", "ref", "carouselRef", "api", "canScrollPrev", "setCanScrollPrev", "canScrollNext", "setCanScrollNext", "scrollPrev", "scrollNext", "handleKeyDown", "event", "_", "CarouselContent", "CarouselItem", "CarouselPrevious", "variant", "size", "CarouselNext"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as l}from"react/jsx-runtime";import
|
|
1
|
+
import{jsx as l}from"react/jsx-runtime";import m from"react";import{cn as i}from"../helpers/utils.js";import{Slot as s}from"@radix-ui/react-slot";const o=m.forwardRef(({...e},t)=>{const{asChild:n,children:r,className:a,...p}=e;return l(n?s:"div",{...p,ref:t,className:i("box-border max-w-[1664px] mx-4 tablet:mx-8 laptop:mx-16 desktop:mx-16 lg-desktop:mx-auto ",a),children:r})});o.displayName="Container";export{o as Container};
|
|
2
2
|
//# sourceMappingURL=container.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/container.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react'\nimport { cn } from '../helpers/utils.js'\nimport { Slot } from '@radix-ui/react-slot'\n\ntype ContainerElement = React.ElementRef<'div'>\ntype ContainerProps = {\n asChild?: boolean\n children?: React.ReactNode\n className?: string\n} & React.ComponentPropsWithoutRef<'div'>\nconst Container = React.forwardRef<ContainerElement, ContainerProps>(({ ...props }, forwardedRef) => {\n const { asChild, children, className, ...containerProps } = props\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp\n {...containerProps}\n ref={forwardedRef}\n className={cn(\"box-border max-w-[1664px] mx-4
|
|
5
|
-
"mappings": "AAeI,cAAAA,MAAA,oBAfJ,OAAOC,MAAW,QAClB,OAAS,MAAAC,MAAU,sBACnB,OAAS,QAAAC,MAAY,uBAQrB,MAAMC,EAAYH,EAAM,WAA6C,CAAC,CAAE,GAAGI,CAAM,EAAGC,IAAiB,CACnG,KAAM,CAAE,QAAAC,EAAS,SAAAC,EAAU,UAAAC,EAAW,GAAGC,CAAe,EAAIL,EAG5D,OACEL,EAHWO,EAAUJ,EAAO,MAG3B,CACE,GAAGO,EACJ,IAAKJ,EACL,UAAWJ,EAAG,
|
|
4
|
+
"sourcesContent": ["import React from 'react'\nimport { cn } from '../helpers/utils.js'\nimport { Slot } from '@radix-ui/react-slot'\n\ntype ContainerElement = React.ElementRef<'div'>\ntype ContainerProps = {\n asChild?: boolean\n children?: React.ReactNode\n className?: string\n} & React.ComponentPropsWithoutRef<'div'>\nconst Container = React.forwardRef<ContainerElement, ContainerProps>(({ ...props }, forwardedRef) => {\n const { asChild, children, className, ...containerProps } = props\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp\n {...containerProps}\n ref={forwardedRef}\n className={cn(\"box-border max-w-[1664px] mx-4 tablet:mx-8 laptop:mx-16 desktop:mx-16 lg-desktop:mx-auto \", className)}\n >\n {children}\n </Comp>\n )\n})\nContainer.displayName = 'Container'\n\nexport { Container }\nexport type { ContainerProps }\n"],
|
|
5
|
+
"mappings": "AAeI,cAAAA,MAAA,oBAfJ,OAAOC,MAAW,QAClB,OAAS,MAAAC,MAAU,sBACnB,OAAS,QAAAC,MAAY,uBAQrB,MAAMC,EAAYH,EAAM,WAA6C,CAAC,CAAE,GAAGI,CAAM,EAAGC,IAAiB,CACnG,KAAM,CAAE,QAAAC,EAAS,SAAAC,EAAU,UAAAC,EAAW,GAAGC,CAAe,EAAIL,EAG5D,OACEL,EAHWO,EAAUJ,EAAO,MAG3B,CACE,GAAGO,EACJ,IAAKJ,EACL,UAAWJ,EAAG,4FAA6FO,CAAS,EAEnH,SAAAD,EACH,CAEJ,CAAC,EACDJ,EAAU,YAAc",
|
|
6
6
|
"names": ["jsx", "React", "cn", "Slot", "Container", "props", "forwardedRef", "asChild", "children", "className", "containerProps"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as o,jsxs as r}from"react/jsx-runtime";import*as
|
|
1
|
+
"use client";import{jsx as o,jsxs as r}from"react/jsx-runtime";import*as s from"react";import*as e from"@radix-ui/react-dialog";import{Cross2Icon as u}from"@radix-ui/react-icons";import{cn as l}from"../helpers/index.js";const d=e.Root;d.displayName="Dialog";const R=e.Trigger,c=e.Portal,v=e.Close,n=s.forwardRef(({className:t,...a},i)=>o(e.Overlay,{ref:i,className:l("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",t),...a}));n.displayName=e.Overlay.displayName;const f=s.forwardRef(({className:t,children:a,...i},y)=>r(c,{children:[o(n,{}),r(e.Content,{ref:y,className:l("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200 tablet:rounded-lg",t),...i,children:[a,r(e.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none",children:[o(u,{className:"size-4"}),o("span",{className:"sr-only",children:"Close"})]})]})]}));f.displayName=e.Content.displayName;const m=({className:t,...a})=>o("div",{className:l("flex flex-col space-y-1.5 text-center tablet:text-left",t),...a});m.displayName="DialogHeader";const p=({className:t,...a})=>o("div",{className:l("flex flex-col-reverse tablet:flex-row tablet:justify-end tablet:space-x-2",t),...a});p.displayName="DialogFooter";const g=s.forwardRef(({className:t,...a},i)=>o(e.Title,{ref:i,className:l("text-lg font-semibold leading-none tracking-tight",t),...a}));g.displayName=e.Title.displayName;const D=s.forwardRef(({className:t,...a},i)=>o(e.Description,{ref:i,className:l("text-muted-foreground text-sm",t),...a}));D.displayName=e.Description.displayName;export{d as Dialog,v as DialogClose,f as DialogContent,D as DialogDescription,p as DialogFooter,m as DialogHeader,n as DialogOverlay,c as DialogPortal,g as DialogTitle,R as DialogTrigger};
|
|
2
2
|
//# sourceMappingURL=dialog.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/dialog.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { Cross2Icon } from '@radix-ui/react-icons'\n\nimport { cn } from '../helpers/index.js'\n\nconst Dialog = DialogPrimitive.Root\nDialog.displayName = 'Dialog'\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80',\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200
|
|
5
|
-
"mappings": "aAqBE,cAAAA,EA0BI,QAAAC,MA1BJ,oBAnBF,UAAYC,MAAW,QACvB,UAAYC,MAAqB,yBACjC,OAAS,cAAAC,MAAkB,wBAE3B,OAAS,MAAAC,MAAU,sBAEnB,MAAMC,EAASH,EAAgB,KAC/BG,EAAO,YAAc,SAErB,MAAMC,EAAgBJ,EAAgB,QAEhCK,EAAeL,EAAgB,OAE/BM,EAAcN,EAAgB,MAE9BO,EAAgBR,EAAM,WAG1B,CAAC,CAAE,UAAAS,EAAW,GAAGC,CAAM,EAAGC,IAC1Bb,EAACG,EAAgB,QAAhB,CACC,IAAKU,EACL,UAAWR,EACT,0JACAM,CACF,EACC,GAAGC,EACN,CACD,EACDF,EAAc,YAAcP,EAAgB,QAAQ,YAEpD,MAAMW,EAAgBZ,EAAM,WAG1B,CAAC,CAAE,UAAAS,EAAW,SAAAI,EAAU,GAAGH,CAAM,EAAGC,IACpCZ,EAACO,EAAA,CACC,UAAAR,EAACU,EAAA,EAAc,EACfT,EAACE,EAAgB,QAAhB,CACC,IAAKU,EACL,UAAWR,EACT,
|
|
4
|
+
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { Cross2Icon } from '@radix-ui/react-icons'\n\nimport { cn } from '../helpers/index.js'\n\nconst Dialog = DialogPrimitive.Root\nDialog.displayName = 'Dialog'\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80',\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200 tablet:rounded-lg',\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none\">\n <Cross2Icon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-1.5 text-center tablet:text-left', className)} {...props} />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col-reverse tablet:flex-row tablet:justify-end tablet:space-x-2', className)} {...props} />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"],
|
|
5
|
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AAE,UAAAS,EAAW,GAAGC,CAAM,EAAGC,IAC1Bb,EAACG,EAAgB,MAAhB,CACC,IAAKU,EACL,UAAWR,EAAG,oDAAqDM,CAAS,EAC3E,GAAGC,EACN,CACD,EACDM,EAAY,YAAcf,EAAgB,MAAM,YAEhD,MAAMgB,EAAoBjB,EAAM,WAG9B,CAAC,CAAE,UAAAS,EAAW,GAAGC,CAAM,EAAGC,IAC1Bb,EAACG,EAAgB,YAAhB,CAA4B,IAAKU,EAAK,UAAWR,EAAG,gCAAiCM,CAAS,EAAI,GAAGC,EAAO,CAC9G,EACDO,EAAkB,YAAchB,EAAgB,YAAY",
|
|
6
6
|
"names": ["jsx", "jsxs", "React", "DialogPrimitive", "Cross2Icon", "cn", "Dialog", "DialogTrigger", "DialogPortal", "DialogClose", "DialogOverlay", "className", "props", "ref", "DialogContent", "children", "DialogHeader", "DialogFooter", "DialogTitle", "DialogDescription"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as d}from"react/jsx-runtime";import a from"react";import{cn as l}from"../helpers/utils.js";const i={1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12"},m={1:"col-start-1",2:"col-start-2",3:"col-start-3",4:"col-start-4",5:"col-start-5",6:"col-start-6",7:"col-start-7",8:"col-start-8",9:"col-start-9",10:"col-start-10",11:"col-start-11",12:"col-start-12"},f={2:"col-end-2",3:"col-end-3",4:"col-end-4",5:"col-end-5",6:"col-end-6",7:"col-end-7",8:"col-end-8",9:"col-end-9",10:"col-end-10",11:"col-end-11",12:"col-end-12",13:"col-end-13"},r=a.forwardRef(({className:o,children:s},c)=>d("div",{ref:c,className:l("grid grid-cols-12 gap-3
|
|
1
|
+
import{jsx as d}from"react/jsx-runtime";import a from"react";import{cn as l}from"../helpers/utils.js";const i={1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12"},m={1:"col-start-1",2:"col-start-2",3:"col-start-3",4:"col-start-4",5:"col-start-5",6:"col-start-6",7:"col-start-7",8:"col-start-8",9:"col-start-9",10:"col-start-10",11:"col-start-11",12:"col-start-12"},f={2:"col-end-2",3:"col-end-3",4:"col-end-4",5:"col-end-5",6:"col-end-6",7:"col-end-7",8:"col-end-8",9:"col-end-9",10:"col-end-10",11:"col-end-11",12:"col-end-12",13:"col-end-13"},r=a.forwardRef(({className:o,children:s},c)=>d("div",{ref:c,className:l("grid grid-cols-12 gap-3 laptop:gap-4",o),children:s}));r.displayName="Grid";const n=a.forwardRef(({className:o,children:s,span:c=12,start:t,end:e},p)=>d("div",{ref:p,className:l(i[c],t&&m[t],e&&f[e],o),children:s}));n.displayName="GridItem";export{r as Grid,n as GridItem};
|
|
2
2
|
//# sourceMappingURL=gird.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/gird.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react'\nimport type { ReactNode } from 'react'\nimport { cn } from '../helpers/utils.js'\n\ntype Element = React.ElementRef<'div'>\n\ninterface GridProps {\n children?: ReactNode\n className?: string\n}\n\ninterface GridItemProps {\n children?: ReactNode\n className?: string\n span?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 // \u9650\u5236\u4E3A\u5177\u4F53\u7684\u6570\u5B57\u7C7B\u578B\n start?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 // \u8D77\u59CB\u5217\u4F4D\u7F6E\n end?: 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 // \u7ED3\u675F\u5217\u4F4D\u7F6E\n}\n\nconst colSpanClasses = {\n 1: 'col-span-1',\n 2: 'col-span-2',\n 3: 'col-span-3',\n 4: 'col-span-4',\n 5: 'col-span-5',\n 6: 'col-span-6',\n 7: 'col-span-7',\n 8: 'col-span-8',\n 9: 'col-span-9',\n 10: 'col-span-10',\n 11: 'col-span-11',\n 12: 'col-span-12',\n} as const\n\nconst colStartClasses = {\n 1: 'col-start-1',\n 2: 'col-start-2',\n 3: 'col-start-3',\n 4: 'col-start-4',\n 5: 'col-start-5',\n 6: 'col-start-6',\n 7: 'col-start-7',\n 8: 'col-start-8',\n 9: 'col-start-9',\n 10: 'col-start-10',\n 11: 'col-start-11',\n 12: 'col-start-12',\n} as const\n\nconst colEndClasses = {\n 2: 'col-end-2',\n 3: 'col-end-3',\n 4: 'col-end-4',\n 5: 'col-end-5',\n 6: 'col-end-6',\n 7: 'col-end-7',\n 8: 'col-end-8',\n 9: 'col-end-9',\n 10: 'col-end-10',\n 11: 'col-end-11',\n 12: 'col-end-12',\n 13: 'col-end-13',\n} as const\n\nconst Grid = React.forwardRef<Element, GridProps>(({ className, children }, forwardedRef) => {\n return <div ref={forwardedRef} className={cn(\"grid grid-cols-12 gap-3
|
|
5
|
-
"mappings": "AAiES,cAAAA,MAAA,oBAjET,OAAOC,MAAW,QAElB,OAAS,MAAAC,MAAU,sBAiBnB,MAAMC,EAAiB,CACrB,EAAG,aACH,EAAG,aACH,EAAG,aACH,EAAG,aACH,EAAG,aACH,EAAG,aACH,EAAG,aACH,EAAG,aACH,EAAG,aACH,GAAI,cACJ,GAAI,cACJ,GAAI,aACN,EAEMC,EAAkB,CACtB,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,GAAI,eACJ,GAAI,eACJ,GAAI,cACN,EAEMC,EAAgB,CACpB,EAAG,YACH,EAAG,YACH,EAAG,YACH,EAAG,YACH,EAAG,YACH,EAAG,YACH,EAAG,YACH,EAAG,YACH,GAAI,aACJ,GAAI,aACJ,GAAI,aACJ,GAAI,YACN,EAEMC,EAAOL,EAAM,WAA+B,CAAC,CAAE,UAAAM,EAAW,SAAAC,CAAS,EAAGC,IACnET,EAAC,OAAI,IAAKS,EAAc,UAAWP,EAAG,
|
|
4
|
+
"sourcesContent": ["import React from 'react'\nimport type { ReactNode } from 'react'\nimport { cn } from '../helpers/utils.js'\n\ntype Element = React.ElementRef<'div'>\n\ninterface GridProps {\n children?: ReactNode\n className?: string\n}\n\ninterface GridItemProps {\n children?: ReactNode\n className?: string\n span?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 // \u9650\u5236\u4E3A\u5177\u4F53\u7684\u6570\u5B57\u7C7B\u578B\n start?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 // \u8D77\u59CB\u5217\u4F4D\u7F6E\n end?: 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 // \u7ED3\u675F\u5217\u4F4D\u7F6E\n}\n\nconst colSpanClasses = {\n 1: 'col-span-1',\n 2: 'col-span-2',\n 3: 'col-span-3',\n 4: 'col-span-4',\n 5: 'col-span-5',\n 6: 'col-span-6',\n 7: 'col-span-7',\n 8: 'col-span-8',\n 9: 'col-span-9',\n 10: 'col-span-10',\n 11: 'col-span-11',\n 12: 'col-span-12',\n} as const\n\nconst colStartClasses = {\n 1: 'col-start-1',\n 2: 'col-start-2',\n 3: 'col-start-3',\n 4: 'col-start-4',\n 5: 'col-start-5',\n 6: 'col-start-6',\n 7: 'col-start-7',\n 8: 'col-start-8',\n 9: 'col-start-9',\n 10: 'col-start-10',\n 11: 'col-start-11',\n 12: 'col-start-12',\n} as const\n\nconst colEndClasses = {\n 2: 'col-end-2',\n 3: 'col-end-3',\n 4: 'col-end-4',\n 5: 'col-end-5',\n 6: 'col-end-6',\n 7: 'col-end-7',\n 8: 'col-end-8',\n 9: 'col-end-9',\n 10: 'col-end-10',\n 11: 'col-end-11',\n 12: 'col-end-12',\n 13: 'col-end-13',\n} as const\n\nconst Grid = React.forwardRef<Element, GridProps>(({ className, children }, forwardedRef) => {\n return <div ref={forwardedRef} className={cn(\"grid grid-cols-12 gap-3 laptop:gap-4\", className)}>{children}</div>\n})\nGrid.displayName = 'Grid'\n\nconst GridItem = React.forwardRef<Element, GridItemProps>(\n ({ className, children, span = 12, start, end }, forwardedRef) => {\n return (\n <div\n ref={forwardedRef}\n className={cn(\n colSpanClasses[span],\n start && colStartClasses[start],\n end && colEndClasses[end],\n className\n )}\n >\n {children}\n </div>\n )\n }\n)\nGridItem.displayName = 'GridItem'\n\nexport { Grid, GridItem }\nexport type { GridProps, GridItemProps }\n"],
|
|
5
|
+
"mappings": "AAiES,cAAAA,MAAA,oBAjET,OAAOC,MAAW,QAElB,OAAS,MAAAC,MAAU,sBAiBnB,MAAMC,EAAiB,CACrB,EAAG,aACH,EAAG,aACH,EAAG,aACH,EAAG,aACH,EAAG,aACH,EAAG,aACH,EAAG,aACH,EAAG,aACH,EAAG,aACH,GAAI,cACJ,GAAI,cACJ,GAAI,aACN,EAEMC,EAAkB,CACtB,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,GAAI,eACJ,GAAI,eACJ,GAAI,cACN,EAEMC,EAAgB,CACpB,EAAG,YACH,EAAG,YACH,EAAG,YACH,EAAG,YACH,EAAG,YACH,EAAG,YACH,EAAG,YACH,EAAG,YACH,GAAI,aACJ,GAAI,aACJ,GAAI,aACJ,GAAI,YACN,EAEMC,EAAOL,EAAM,WAA+B,CAAC,CAAE,UAAAM,EAAW,SAAAC,CAAS,EAAGC,IACnET,EAAC,OAAI,IAAKS,EAAc,UAAWP,EAAG,uCAAwCK,CAAS,EAAI,SAAAC,EAAS,CAC5G,EACDF,EAAK,YAAc,OAEnB,MAAMI,EAAWT,EAAM,WACrB,CAAC,CAAE,UAAAM,EAAW,SAAAC,EAAU,KAAAG,EAAO,GAAI,MAAAC,EAAO,IAAAC,CAAI,EAAGJ,IAE7CT,EAAC,OACC,IAAKS,EACL,UAAWP,EACTC,EAAeQ,CAAI,EACnBC,GAASR,EAAgBQ,CAAK,EAC9BC,GAAOR,EAAcQ,CAAG,EACxBN,CACF,EAEC,SAAAC,EACH,CAGN,EACAE,EAAS,YAAc",
|
|
6
6
|
"names": ["jsx", "React", "cn", "colSpanClasses", "colStartClasses", "colEndClasses", "Grid", "className", "children", "forwardedRef", "GridItem", "span", "start", "end"]
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@ import { type VariantProps } from 'class-variance-authority';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
declare const headingVariants: (props?: ({
|
|
4
4
|
size?: 1 | 2 | 3 | 4 | 5 | null | undefined;
|
|
5
|
-
weight?: "bold" | "
|
|
5
|
+
weight?: "bold" | "medium" | "semibold" | "black" | "extraBold" | null | undefined;
|
|
6
6
|
align?: "left" | "right" | "center" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
|
|
8
8
|
interface HeadingProps extends React.ComponentPropsWithoutRef<'h1'>, VariantProps<typeof headingVariants> {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{cn as f}from"../helpers/index.js";import{Slot as k}from"@radix-ui/react-slot";import{cva as b}from"class-variance-authority";import y from"react";const P=b("leading-tight tracking text-info-primary",{variants:{size:{1:"text-heading-1 lg-desktop:text-[16px]",2:"text-heading-2 lg-desktop:text-[24px]",3:"text-heading-3 lg-desktop:text-[32px]",4:"text-hedaing-4 desktop:text-[36px] lg-desktop:text-[48px]",5:"text-heading-5 desktop:text-[48px] lg-desktop:text-[64px]"},weight:{medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extraBold:"font-extrabold",black:"font-black"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{size:5,weight:"bold"}}),a=y.forwardRef((l,r)=>{const{children:t,className:s,size:d=5,align:p,weight:g,asChild:h,as:x="h1",color:e,html:o,...m}=l,n=o?{dangerouslySetInnerHTML:{__html:o}}:null,c=e?{style:{color:e}}:null;return i(k,{...m,ref:r,className:f(P({size:d,weight:g,align:p}),s),...n,...c,children:h?t:i(x,{children:n?null:t})})});a.displayName="Heading";export{a as Heading};
|
|
2
2
|
//# sourceMappingURL=heading.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/heading.tsx"],
|
|
4
|
-
"sourcesContent": ["import { cn } from '../helpers/index.js'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport React from 'react'\n\nconst headingVariants = cva('leading-tight tracking text-info-primary', {\n variants: {\n size: {\n 1: 'text-heading-1',\n 2: 'text-heading-2',\n 3: 'text-heading-3',\n 4: 'text-hedaing-4',\n 5: 'text-heading-5',\n },\n weight: {\n
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { cn } from '../helpers/index.js'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport React from 'react'\n\nconst headingVariants = cva('leading-tight tracking text-info-primary', {\n variants: {\n size: {\n 1: 'text-heading-1 lg-desktop:text-[16px]',\n 2: 'text-heading-2 lg-desktop:text-[24px]',\n 3: 'text-heading-3 lg-desktop:text-[32px]',\n 4: 'text-hedaing-4 desktop:text-[36px] lg-desktop:text-[48px]',\n 5: 'text-heading-5 desktop:text-[48px] lg-desktop:text-[64px]',\n },\n weight: {\n medium: 'font-medium',\n semibold: 'font-semibold',\n bold: 'font-bold',\n extraBold: 'font-extrabold',\n black: 'font-black',\n },\n align: {\n left: 'text-left',\n center: 'text-center',\n right: 'text-right',\n },\n },\n defaultVariants: {\n size: 5,\n weight: 'bold',\n },\n})\n\ntype HeadingElement = React.ElementRef<'h1'>\n\ninterface HeadingProps extends React.ComponentPropsWithoutRef<'h1'>, VariantProps<typeof headingVariants> {\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n asChild?: boolean\n color?: string\n html?: string\n}\n\nconst Heading = React.forwardRef<HeadingElement, HeadingProps>((props, forwardedRef) => {\n const { children, className, size = 5, align, weight, asChild, as: Tag = 'h1', color, html, ...headingProps } = props\n const htmlContentProps = html\n ? {\n dangerouslySetInnerHTML: { __html: html },\n }\n : null\n\n const styleProps = color\n ? {\n style: {\n color,\n },\n }\n : null\n return (\n <Slot\n {...headingProps}\n ref={forwardedRef}\n className={cn(\n headingVariants({\n size,\n weight,\n align,\n }),\n className\n )}\n {...htmlContentProps}\n {...styleProps}\n >\n {asChild ? children : <Tag>{htmlContentProps ? null : children}</Tag>}\n </Slot>\n )\n})\n\nHeading.displayName = 'Heading'\n\nexport { Heading }\nexport type { HeadingProps }\n"],
|
|
5
|
+
"mappings": "AAwE4B,cAAAA,MAAA,oBAxE5B,OAAS,MAAAC,MAAU,sBACnB,OAAS,QAAAC,MAAY,uBACrB,OAAS,OAAAC,MAA8B,2BACvC,OAAOC,MAAW,QAElB,MAAMC,EAAkBF,EAAI,2CAA4C,CACtE,SAAU,CACR,KAAM,CACJ,EAAG,wCACH,EAAG,wCACH,EAAG,wCACH,EAAG,4DACH,EAAG,2DACL,EACA,OAAQ,CACN,OAAQ,cACR,SAAU,gBACV,KAAM,YACN,UAAW,iBACX,MAAO,YACT,EACA,MAAO,CACL,KAAM,YACN,OAAQ,cACR,MAAO,YACT,CACF,EACA,gBAAiB,CACf,KAAM,EACN,OAAQ,MACV,CACF,CAAC,EAWKG,EAAUF,EAAM,WAAyC,CAACG,EAAOC,IAAiB,CACtF,KAAM,CAAE,SAAAC,EAAU,UAAAC,EAAW,KAAAC,EAAO,EAAG,MAAAC,EAAO,OAAAC,EAAQ,QAAAC,EAAS,GAAIC,EAAM,KAAM,MAAAC,EAAO,KAAAC,EAAM,GAAGC,CAAa,EAAIX,EAC1GY,EAAmBF,EACrB,CACA,wBAAyB,CAAE,OAAQA,CAAK,CAC1C,EACE,KAEEG,EAAaJ,EACf,CACA,MAAO,CACL,MAAAA,CACF,CACF,EACE,KACJ,OACEhB,EAACE,EAAA,CACE,GAAGgB,EACJ,IAAKV,EACL,UAAWP,EACTI,EAAgB,CACd,KAAAM,EACA,OAAAE,EACA,MAAAD,CACF,CAAC,EACDF,CACF,EACC,GAAGS,EACH,GAAGC,EAEH,SAAAN,EAAUL,EAAWT,EAACe,EAAA,CAAK,SAAAI,EAAmB,KAAOV,EAAS,EACjE,CAEJ,CAAC,EAEDH,EAAQ,YAAc",
|
|
6
6
|
"names": ["jsx", "cn", "Slot", "cva", "React", "headingVariants", "Heading", "props", "forwardedRef", "children", "className", "size", "align", "weight", "asChild", "Tag", "color", "html", "headingProps", "htmlContentProps", "styleProps"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as p}from"react/jsx-runtime";import*as T from"react";import{Slot as c}from"@radix-ui/react-slot";import{cn as y}from"../helpers/index.js";import{cva as g}from"class-variance-authority";const u=g("tracking font-body",{variants:{size:{1:"text-text-1 text-info-primary",2:"text-text-2 text-info-primary",3:"text-text-3 text-info-primary"},weight:{light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{size:3,weight:"
|
|
1
|
+
import{jsx as p}from"react/jsx-runtime";import*as T from"react";import{Slot as c}from"@radix-ui/react-slot";import{cn as y}from"../helpers/index.js";import{cva as g}from"class-variance-authority";const u=g("tracking font-body",{variants:{size:{1:"text-text-1 text-info-primary",2:"text-text-2 text-info-primary",3:"text-text-3 text-info-primary"},weight:{light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{size:3,weight:"medium"}}),s=T.forwardRef((n,a)=>{const{children:t,size:i=3,weight:l,align:m,className:x,asChild:P,as:d="span",color:e,html:o,...f}=n,r=o?{dangerouslySetInnerHTML:{__html:o}}:null,h=e?{style:{color:e}}:null;return p(c,{...f,ref:a,className:y(u({size:i,weight:l,align:m}),x),...r,...h,children:P?t:p(d,{children:r?null:t})})});s.displayName="Text";export{s as Text};
|
|
2
2
|
//# sourceMappingURL=text.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/text.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cn } from '../helpers/index.js'\nimport { type VariantProps, cva } from 'class-variance-authority'\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js'\n\nconst textVariants = cva('tracking font-body', {\n variants: {\n size: {\n 1: 'text-text-1 text-info-primary',\n 2: 'text-text-2 text-info-primary',\n 3: 'text-text-3 text-info-primary',\n },\n weight: {\n light: 'font-light',\n normal: 'font-normal',\n medium: 'font-medium',\n semibold: 'font-semibold',\n bold: 'font-bold',\n },\n align: {\n left: 'text-left',\n center: 'text-center',\n right: 'text-right',\n },\n },\n defaultVariants: {\n size: 3,\n weight: '
|
|
4
|
+
"sourcesContent": ["import * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cn } from '../helpers/index.js'\nimport { type VariantProps, cva } from 'class-variance-authority'\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js'\n\nconst textVariants = cva('tracking font-body', {\n variants: {\n size: {\n 1: 'text-text-1 text-info-primary',\n 2: 'text-text-2 text-info-primary',\n 3: 'text-text-3 text-info-primary',\n },\n weight: {\n light: 'font-light',\n normal: 'font-normal',\n medium: 'font-medium',\n semibold: 'font-semibold',\n bold: 'font-bold',\n },\n align: {\n left: 'text-left',\n center: 'text-center',\n right: 'text-right',\n },\n },\n defaultVariants: {\n size: 3,\n weight: 'medium',\n },\n})\n\ntype TextElement = React.ElementRef<'span'>\ntype TextSpanProps = { as?: 'span' } & ComponentPropsWithout<'span', RemovedProps>\ntype TextDivProps = { as: 'div' } & ComponentPropsWithout<'div', RemovedProps>\ntype TextLabelProps = { as: 'label' } & ComponentPropsWithout<'label', RemovedProps>\ntype TextPProps = { as: 'p' } & ComponentPropsWithout<'p', RemovedProps>\n\ninterface CommonTextProps extends VariantProps<typeof textVariants> {\n as?: 'div' | 'label' | 'p' | 'span'\n asChild?: boolean\n color?: string\n /** \u76F8\u5F53\u4E8E dangerouslySetInnerHTML */\n html?: string\n}\n\ntype TextProps = CommonTextProps & (TextSpanProps | TextDivProps | TextLabelProps | TextPProps)\n\nconst Text = React.forwardRef<TextElement, TextProps>((props, forwardedRef) => {\n const {\n children,\n size = 3,\n weight,\n align,\n className,\n asChild,\n as: Tag = 'span',\n color,\n html,\n ...textProps\n } = props\n\n const htmlContentProps = html\n ? {\n dangerouslySetInnerHTML: { __html: html },\n }\n : null\n\n const styleProps = color\n ? {\n style: {\n color,\n },\n }\n : null\n\n return (\n <Slot\n {...textProps}\n ref={forwardedRef}\n className={cn(\n textVariants({\n size,\n weight,\n align,\n }),\n className\n )}\n {...htmlContentProps}\n {...styleProps}\n >\n {asChild ? children : <Tag>{htmlContentProps ? null : children}</Tag>}\n </Slot>\n )\n})\nText.displayName = 'Text'\n\nexport { Text }\nexport type { TextProps }\n"],
|
|
5
5
|
"mappings": "AA2F4B,cAAAA,MAAA,oBA3F5B,UAAYC,MAAW,QACvB,OAAS,QAAAC,MAAY,uBACrB,OAAS,MAAAC,MAAU,sBACnB,OAA4B,OAAAC,MAAW,2BAGvC,MAAMC,EAAeD,EAAI,qBAAsB,CAC7C,SAAU,CACR,KAAM,CACJ,EAAG,gCACH,EAAG,gCACH,EAAG,+BACL,EACA,OAAQ,CACN,MAAO,aACP,OAAQ,cACR,OAAQ,cACR,SAAU,gBACV,KAAM,WACR,EACA,MAAO,CACL,KAAM,YACN,OAAQ,cACR,MAAO,YACT,CACF,EACA,gBAAiB,CACf,KAAM,EACN,OAAQ,QACV,CACF,CAAC,EAkBKE,EAAOL,EAAM,WAAmC,CAACM,EAAOC,IAAiB,CAC7E,KAAM,CACJ,SAAAC,EACA,KAAAC,EAAO,EACP,OAAAC,EACA,MAAAC,EACA,UAAAC,EACA,QAAAC,EACA,GAAIC,EAAM,OACV,MAAAC,EACA,KAAAC,EACA,GAAGC,CACL,EAAIX,EAEEY,EAAmBF,EACrB,CACA,wBAAyB,CAAE,OAAQA,CAAK,CAC1C,EACE,KAEEG,EAAaJ,EACf,CACA,MAAO,CACL,MAAAA,CACF,CACF,EACE,KAEJ,OACEhB,EAACE,EAAA,CACE,GAAGgB,EACJ,IAAKV,EACL,UAAWL,EACTE,EAAa,CACX,KAAAK,EACA,OAAAC,EACA,MAAAC,CACF,CAAC,EACDC,CACF,EACC,GAAGM,EACH,GAAGC,EAEH,SAAAN,EAAUL,EAAWT,EAACe,EAAA,CAAK,SAAAI,EAAmB,KAAOV,EAAS,EACjE,CAEJ,CAAC,EACDH,EAAK,YAAc",
|
|
6
6
|
"names": ["jsx", "React", "Slot", "cn", "cva", "textVariants", "Text", "props", "forwardedRef", "children", "size", "weight", "align", "className", "asChild", "Tag", "color", "html", "textProps", "htmlContentProps", "styleProps"]
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as a}from"react/jsx-runtime";import"react";import{Container as t}from"../components/index.js";import"../helpers/utils.js";const
|
|
1
|
+
import{jsx as e,jsxs as a}from"react/jsx-runtime";import"react";import{Container as t}from"../components/index.js";import"../helpers/utils.js";const o={title:"Layout/Container",component:t,parameters:{layout:"fullscreen",docs:{description:{component:`
|
|
2
2
|
Container \u5BB9\u5668\u7EC4\u4EF6\uFF0C\u7528\u4E8E\u9650\u5236\u548C\u7EA6\u675F\u5185\u5BB9\u7684\u6700\u5927\u5BBD\u5EA6\uFF0C\u5B9E\u73B0\u54CD\u5E94\u5F0F\u7684\u9875\u9762\u5E03\u5C40\u3002
|
|
3
3
|
|
|
4
4
|
### \u5B9E\u73B0\u7EC6\u8282
|
|
@@ -6,10 +6,10 @@ Container \u5BB9\u5668\u7EC4\u4EF6\uFF0C\u7528\u4E8E\u9650\u5236\u548C\u7EA6\u67
|
|
|
6
6
|
- \u9ED8\u8BA4\u6700\u5927\u5BBD\u5EA6\u4E3A 1664px
|
|
7
7
|
- \u54CD\u5E94\u5F0F\u8FB9\u8DDD\u8BBE\u8BA1\uFF1A
|
|
8
8
|
- \u9ED8\u8BA4: \u5DE6\u53F3\u8FB9\u8DDD 16px (mx-4)
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
9
|
+
- tablet: \u5DE6\u53F3\u8FB9\u8DDD 32px (mx-8)
|
|
10
|
+
- laptop: \u5DE6\u53F3\u8FB9\u8DDD 64px (mx-16)
|
|
11
|
+
- desktop: \u5DE6\u53F3\u8FB9\u8DDD 64px (mx-16)
|
|
12
|
+
- lg-desktop: \u5DE6\u53F3\u8FB9\u8DDD 128px (mx-32)
|
|
13
13
|
|
|
14
|
-
`}}},tags:["autodocs"]};var i=
|
|
14
|
+
`}}},tags:["autodocs"]};var i=o;const m=()=>e(t,{className:"p-4",children:e("div",{className:"bg-blue-100 p-4 rounded-lg text-center",children:"\u57FA\u7840\u5BB9\u5668 - \u81EA\u52A8\u5C45\u4E2D\uFF0C\u54CD\u5E94\u5F0F\u5BBD\u5EA6"})}),n=()=>e(t,{className:"p-4 bg-gray-50",children:a("div",{className:"space-y-4",children:[a("div",{className:"bg-white p-4 rounded-lg shadow-sm",children:[e("h3",{className:"text-lg font-medium",children:"\u5185\u5BB9\u533A\u5757 1"}),e("p",{className:"text-gray-600",children:"\u5E26\u6709\u5185\u8FB9\u8DDD\u548C\u80CC\u666F\u8272\u7684\u5BB9\u5668\u793A\u4F8B"})]}),a("div",{className:"bg-white p-4 rounded-lg shadow-sm",children:[e("h3",{className:"text-lg font-medium",children:"\u5185\u5BB9\u533A\u5757 2"}),e("p",{className:"text-gray-600",children:"\u5C55\u793A\u5185\u5BB9\u7684\u7EC4\u7EC7\u65B9\u5F0F"})]})]})}),c=()=>e(t,{className:"px-4 tablet:px-6 laptop:px-8 py-4 bg-gradient-to-r from-blue-50 to-purple-50",children:a("div",{className:"bg-white p-4 rounded-lg shadow-sm",children:[e("h3",{className:"text-lg font-medium",children:"\u54CD\u5E94\u5F0F\u5185\u8FB9\u8DDD"}),a("p",{className:"text-gray-600",children:["\u5728\u4E0D\u540C\u5C4F\u5E55\u5C3A\u5BF8\u4E0B\u6709\u4E0D\u540C\u7684\u6C34\u5E73\u5185\u8FB9\u8DDD\uFF1A",e("br",{}),"\u9ED8\u8BA4: px-4 (16px)",e("br",{}),"tablet: px-6 (24px)",e("br",{}),"laptop: px-8 (32px)"]})]})}),g=()=>a(t,{className:"p-4",children:[e("header",{className:"bg-gray-800 text-white p-4 rounded-t-lg",children:e("h2",{className:"text-xl",children:"\u9875\u9762\u6807\u9898"})}),a("main",{className:"bg-white p-4 border-x border-gray-200",children:[e("p",{className:"text-gray-600 mb-4",children:"\u4E3B\u8981\u5185\u5BB9\u533A\u57DF"}),a("div",{className:"grid grid-cols-1 laptop:grid-cols-2 gap-4",children:[e("div",{className:"bg-blue-50 p-4 rounded",children:"\u5185\u5BB9\u5757 1"}),e("div",{className:"bg-purple-50 p-4 rounded",children:"\u5185\u5BB9\u5757 2"})]})]}),e("footer",{className:"bg-gray-100 p-4 rounded-b-lg border-x border-b border-gray-200",children:e("p",{className:"text-gray-500 text-sm",children:"\u9875\u811A\u5185\u5BB9"})})]});export{m as Basic,g as NestedContent,c as ResponsivePadding,n as WithPaddingAndBackground,i as default};
|
|
15
15
|
//# sourceMappingURL=container.stories.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/stories/container.stories.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react'\nimport { Container } from '../components/index.js'\nimport type { Meta, StoryObj } from '@storybook/react'\nimport { cn } from '../helpers/utils.js'\n\nconst meta = {\n title: 'Layout/Container',\n component: Container,\n parameters: {\n layout: 'fullscreen',\n docs: {\n description: {\n component: `\nContainer \u5BB9\u5668\u7EC4\u4EF6\uFF0C\u7528\u4E8E\u9650\u5236\u548C\u7EA6\u675F\u5185\u5BB9\u7684\u6700\u5927\u5BBD\u5EA6\uFF0C\u5B9E\u73B0\u54CD\u5E94\u5F0F\u7684\u9875\u9762\u5E03\u5C40\u3002\n\n### \u5B9E\u73B0\u7EC6\u8282\n- \u57FA\u4E8E Tailwind CSS \u5B9E\u73B0\n- \u9ED8\u8BA4\u6700\u5927\u5BBD\u5EA6\u4E3A 1664px\n- \u54CD\u5E94\u5F0F\u8FB9\u8DDD\u8BBE\u8BA1\uFF1A\n - \u9ED8\u8BA4: \u5DE6\u53F3\u8FB9\u8DDD 16px (mx-4)\n -
|
|
5
|
-
"mappings": "AAuCI,cAAAA,EAUE,QAAAC,MAVF,oBAvCJ,MAAkB,QAClB,OAAS,aAAAC,MAAiB,yBAE1B,MAAmB,sBAEnB,MAAMC,EAAO,CACX,MAAO,mBACP,UAAWD,EACX,WAAY,CACV,OAAQ,aACR,KAAM,CACJ,YAAa,CACX,UAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAcb,CACF,CACF,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOE,EAAQD,EAKR,MAAME,EAAQ,IACnBL,EAACE,EAAA,CAAU,UAAU,MACnB,SAAAF,EAAC,OAAI,UAAU,yCAAyC,mGAExD,EACF,EAIWM,EAA2B,IACtCN,EAACE,EAAA,CAAU,UAAU,iBACnB,SAAAD,EAAC,OAAI,UAAU,YACb,UAAAA,EAAC,OAAI,UAAU,oCACb,UAAAD,EAAC,MAAG,UAAU,sBAAsB,sCAAM,EAC1CA,EAAC,KAAE,UAAU,gBAAgB,gGAAc,GAC7C,EACAC,EAAC,OAAI,UAAU,oCACb,UAAAD,EAAC,MAAG,UAAU,sBAAsB,sCAAM,EAC1CA,EAAC,KAAE,UAAU,gBAAgB,kEAAS,GACxC,GACF,EACF,EAIWO,EAAoB,IAC/BP,EAACE,EAAA,CAAU,UAAU,
|
|
4
|
+
"sourcesContent": ["import React from 'react'\nimport { Container } from '../components/index.js'\nimport type { Meta, StoryObj } from '@storybook/react'\nimport { cn } from '../helpers/utils.js'\n\nconst meta = {\n title: 'Layout/Container',\n component: Container,\n parameters: {\n layout: 'fullscreen',\n docs: {\n description: {\n component: `\nContainer \u5BB9\u5668\u7EC4\u4EF6\uFF0C\u7528\u4E8E\u9650\u5236\u548C\u7EA6\u675F\u5185\u5BB9\u7684\u6700\u5927\u5BBD\u5EA6\uFF0C\u5B9E\u73B0\u54CD\u5E94\u5F0F\u7684\u9875\u9762\u5E03\u5C40\u3002\n\n### \u5B9E\u73B0\u7EC6\u8282\n- \u57FA\u4E8E Tailwind CSS \u5B9E\u73B0\n- \u9ED8\u8BA4\u6700\u5927\u5BBD\u5EA6\u4E3A 1664px\n- \u54CD\u5E94\u5F0F\u8FB9\u8DDD\u8BBE\u8BA1\uFF1A\n - \u9ED8\u8BA4: \u5DE6\u53F3\u8FB9\u8DDD 16px (mx-4)\n - tablet: \u5DE6\u53F3\u8FB9\u8DDD 32px (mx-8)\n - laptop: \u5DE6\u53F3\u8FB9\u8DDD 64px (mx-16)\n - desktop: \u5DE6\u53F3\u8FB9\u8DDD 64px (mx-16)\n - lg-desktop: \u5DE6\u53F3\u8FB9\u8DDD 128px (mx-32)\n\n `,\n },\n },\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof Container>\n\nexport default meta\n\ntype Story = StoryObj<typeof Container>\n\n// \u57FA\u7840\u793A\u4F8B\nexport const Basic = () => (\n <Container className=\"p-4\">\n <div className=\"bg-blue-100 p-4 rounded-lg text-center\">\n \u57FA\u7840\u5BB9\u5668 - \u81EA\u52A8\u5C45\u4E2D\uFF0C\u54CD\u5E94\u5F0F\u5BBD\u5EA6\n </div>\n </Container>\n)\n\n// \u5E26\u5185\u8FB9\u8DDD\u548C\u80CC\u666F\u8272\nexport const WithPaddingAndBackground = () => (\n <Container className=\"p-4 bg-gray-50\">\n <div className=\"space-y-4\">\n <div className=\"bg-white p-4 rounded-lg shadow-sm\">\n <h3 className=\"text-lg font-medium\">\u5185\u5BB9\u533A\u5757 1</h3>\n <p className=\"text-gray-600\">\u5E26\u6709\u5185\u8FB9\u8DDD\u548C\u80CC\u666F\u8272\u7684\u5BB9\u5668\u793A\u4F8B</p>\n </div>\n <div className=\"bg-white p-4 rounded-lg shadow-sm\">\n <h3 className=\"text-lg font-medium\">\u5185\u5BB9\u533A\u5757 2</h3>\n <p className=\"text-gray-600\">\u5C55\u793A\u5185\u5BB9\u7684\u7EC4\u7EC7\u65B9\u5F0F</p>\n </div>\n </div>\n </Container>\n)\n\n// \u54CD\u5E94\u5F0F\u5185\u8FB9\u8DDD\nexport const ResponsivePadding = () => (\n <Container className=\"px-4 tablet:px-6 laptop:px-8 py-4 bg-gradient-to-r from-blue-50 to-purple-50\">\n <div className=\"bg-white p-4 rounded-lg shadow-sm\">\n <h3 className=\"text-lg font-medium\">\u54CD\u5E94\u5F0F\u5185\u8FB9\u8DDD</h3>\n <p className=\"text-gray-600\">\n \u5728\u4E0D\u540C\u5C4F\u5E55\u5C3A\u5BF8\u4E0B\u6709\u4E0D\u540C\u7684\u6C34\u5E73\u5185\u8FB9\u8DDD\uFF1A\n <br />\n \u9ED8\u8BA4: px-4 (16px)\n <br />\n tablet: px-6 (24px)\n <br />\n laptop: px-8 (32px)\n </p>\n </div>\n </Container>\n)\n\n// \u5D4C\u5957\u5185\u5BB9\u793A\u4F8B\nexport const NestedContent = () => (\n <Container className=\"p-4\">\n <header className=\"bg-gray-800 text-white p-4 rounded-t-lg\">\n <h2 className=\"text-xl\">\u9875\u9762\u6807\u9898</h2>\n </header>\n <main className=\"bg-white p-4 border-x border-gray-200\">\n <p className=\"text-gray-600 mb-4\">\u4E3B\u8981\u5185\u5BB9\u533A\u57DF</p>\n <div className=\"grid grid-cols-1 laptop:grid-cols-2 gap-4\">\n <div className=\"bg-blue-50 p-4 rounded\">\u5185\u5BB9\u5757 1</div>\n <div className=\"bg-purple-50 p-4 rounded\">\u5185\u5BB9\u5757 2</div>\n </div>\n </main>\n <footer className=\"bg-gray-100 p-4 rounded-b-lg border-x border-b border-gray-200\">\n <p className=\"text-gray-500 text-sm\">\u9875\u811A\u5185\u5BB9</p>\n </footer>\n </Container>\n)\n"],
|
|
5
|
+
"mappings": "AAuCI,cAAAA,EAUE,QAAAC,MAVF,oBAvCJ,MAAkB,QAClB,OAAS,aAAAC,MAAiB,yBAE1B,MAAmB,sBAEnB,MAAMC,EAAO,CACX,MAAO,mBACP,UAAWD,EACX,WAAY,CACV,OAAQ,aACR,KAAM,CACJ,YAAa,CACX,UAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAcb,CACF,CACF,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOE,EAAQD,EAKR,MAAME,EAAQ,IACnBL,EAACE,EAAA,CAAU,UAAU,MACnB,SAAAF,EAAC,OAAI,UAAU,yCAAyC,mGAExD,EACF,EAIWM,EAA2B,IACtCN,EAACE,EAAA,CAAU,UAAU,iBACnB,SAAAD,EAAC,OAAI,UAAU,YACb,UAAAA,EAAC,OAAI,UAAU,oCACb,UAAAD,EAAC,MAAG,UAAU,sBAAsB,sCAAM,EAC1CA,EAAC,KAAE,UAAU,gBAAgB,gGAAc,GAC7C,EACAC,EAAC,OAAI,UAAU,oCACb,UAAAD,EAAC,MAAG,UAAU,sBAAsB,sCAAM,EAC1CA,EAAC,KAAE,UAAU,gBAAgB,kEAAS,GACxC,GACF,EACF,EAIWO,EAAoB,IAC/BP,EAACE,EAAA,CAAU,UAAU,+EACnB,SAAAD,EAAC,OAAI,UAAU,oCACb,UAAAD,EAAC,MAAG,UAAU,sBAAsB,gDAAM,EAC1CC,EAAC,KAAE,UAAU,gBAAgB,yHAE3BD,EAAC,OAAG,EAAE,4BAENA,EAAC,OAAG,EAAE,sBAENA,EAAC,OAAG,EAAE,uBAER,GACF,EACF,EAIWQ,EAAgB,IAC3BP,EAACC,EAAA,CAAU,UAAU,MACnB,UAAAF,EAAC,UAAO,UAAU,0CAChB,SAAAA,EAAC,MAAG,UAAU,UAAU,oCAAI,EAC9B,EACAC,EAAC,QAAK,UAAU,wCACd,UAAAD,EAAC,KAAE,UAAU,qBAAqB,gDAAM,EACxCC,EAAC,OAAI,UAAU,4CACb,UAAAD,EAAC,OAAI,UAAU,yBAAyB,gCAAK,EAC7CA,EAAC,OAAI,UAAU,2BAA2B,gCAAK,GACjD,GACF,EACAA,EAAC,UAAO,UAAU,iEAChB,SAAAA,EAAC,KAAE,UAAU,wBAAwB,oCAAI,EAC3C,GACF",
|
|
6
6
|
"names": ["jsx", "jsxs", "Container", "meta", "container_stories_default", "Basic", "WithPaddingAndBackground", "ResponsivePadding", "NestedContent"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Fragment as
|
|
1
|
+
import{Fragment as m,jsx as e,jsxs as a}from"react/jsx-runtime";import"react";import{Button as g,Dialog as c,DialogContent as t,DialogDescription as o,DialogFooter as i,DialogHeader as l,DialogTitle as r,DialogTrigger as s,Input as n}from"../components/index.js";const d={title:"Components/Dialog",component:c,subcomponents:{DialogTrigger:s,DialogContent:t,DialogHeader:l,DialogTitle:r,DialogDescription:o,DialogFooter:i},parameters:{layout:"centered",docs:{description:{component:"\u5F39\u7A97\u7EC4\u4EF6\uFF0C\u57FA\u4E8E@radix-ui/react-dialog\uFF0Chttps://www.radix-ui.com/primitives/docs/components/dialog "}}},tags:["autodocs"]};var y=d;const f={args:{children:a(m,{children:[e(s,{asChild:!0,children:e("button",{children:"Edit Profile"})}),a(t,{className:"tablet:max-w-[425px]",children:[a(l,{children:[e(r,{children:"Edit profile"}),e(o,{children:"Make changes to your profile here. Click save when you're done."})]}),a("div",{className:"grid gap-4 py-4",children:[a("div",{className:"grid grid-cols-4 items-center gap-4",children:[e("label",{htmlFor:"name",className:"text-right",children:"Name"}),e(n,{id:"name",defaultValue:"Pedro Duarte",className:"col-span-3"})]}),a("div",{className:"grid grid-cols-4 items-center gap-4",children:[e("label",{htmlFor:"username",className:"text-right",children:"Username"}),e(n,{id:"username",defaultValue:"@peduarte",className:"col-span-3"})]})]}),e(i,{children:e(g,{type:"submit",children:"Save changes"})})]})]})}};export{f as Default,y as default};
|
|
2
2
|
//# sourceMappingURL=dialog.stories.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/stories/dialog.stories.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react'\nimport {\n Button,\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n Input,\n} from '../components/index.js'\nimport type { Meta, StoryObj } from '@storybook/react/*'\n\nconst meta = {\n title: 'Components/Dialog',\n component: Dialog,\n subcomponents: {\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogTitle,\n DialogDescription,\n DialogFooter,\n } as any,\n parameters: {\n layout: 'centered',\n docs: {\n description: {\n component: '\u5F39\u7A97\u7EC4\u4EF6\uFF0C\u57FA\u4E8E@radix-ui/react-dialog\uFF0Chttps://www.radix-ui.com/primitives/docs/components/dialog ',\n },\n },\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof Dialog>\n\nexport default meta\n\ntype Story = StoryObj<typeof Dialog>\n\nexport const Default: Story = {\n args: {\n children: (\n <>\n <DialogTrigger asChild>\n <button>Edit Profile</button>\n </DialogTrigger>\n <DialogContent className=\"
|
|
5
|
-
"mappings": "AA2CM,mBAAAA,EAEI,OAAAC,EAGA,QAAAC,MALJ,oBA3CN,MAAkB,QAClB,OACE,UAAAC,EACA,UAAAC,EACA,iBAAAC,EACA,qBAAAC,EACA,gBAAAC,EACA,gBAAAC,EACA,eAAAC,EACA,iBAAAC,EACA,SAAAC,MACK,yBAGP,MAAMC,EAAO,CACX,MAAO,oBACP,UAAWR,EACX,cAAe,CACb,cAAAM,EACA,cAAAL,EACA,aAAAG,EACA,YAAAC,EACA,kBAAAH,EACA,aAAAC,CACF,EACA,WAAY,CACV,OAAQ,WACR,KAAM,CACJ,YAAa,CACX,UAAW,mIACb,CACF,CACF,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOM,EAAQD,EAIR,MAAME,EAAiB,CAC5B,KAAM,CACJ,SACEZ,EAAAF,EAAA,CACE,UAAAC,EAACS,EAAA,CAAc,QAAO,GACpB,SAAAT,EAAC,UAAO,wBAAY,EACtB,EACAC,EAACG,EAAA,CAAc,UAAU,
|
|
4
|
+
"sourcesContent": ["import React from 'react'\nimport {\n Button,\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n Input,\n} from '../components/index.js'\nimport type { Meta, StoryObj } from '@storybook/react/*'\n\nconst meta = {\n title: 'Components/Dialog',\n component: Dialog,\n subcomponents: {\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogTitle,\n DialogDescription,\n DialogFooter,\n } as any,\n parameters: {\n layout: 'centered',\n docs: {\n description: {\n component: '\u5F39\u7A97\u7EC4\u4EF6\uFF0C\u57FA\u4E8E@radix-ui/react-dialog\uFF0Chttps://www.radix-ui.com/primitives/docs/components/dialog ',\n },\n },\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof Dialog>\n\nexport default meta\n\ntype Story = StoryObj<typeof Dialog>\n\nexport const Default: Story = {\n args: {\n children: (\n <>\n <DialogTrigger asChild>\n <button>Edit Profile</button>\n </DialogTrigger>\n <DialogContent className=\"tablet:max-w-[425px]\">\n <DialogHeader>\n <DialogTitle>Edit profile</DialogTitle>\n <DialogDescription>Make changes to your profile here. Click save when you're done.</DialogDescription>\n </DialogHeader>\n <div className=\"grid gap-4 py-4\">\n <div className=\"grid grid-cols-4 items-center gap-4\">\n <label htmlFor=\"name\" className=\"text-right\">\n Name\n </label>\n <Input id=\"name\" defaultValue=\"Pedro Duarte\" className=\"col-span-3\" />\n </div>\n <div className=\"grid grid-cols-4 items-center gap-4\">\n <label htmlFor=\"username\" className=\"text-right\">\n Username\n </label>\n <Input id=\"username\" defaultValue=\"@peduarte\" className=\"col-span-3\" />\n </div>\n </div>\n <DialogFooter>\n <Button type=\"submit\">Save changes</Button>\n </DialogFooter>\n </DialogContent>\n </>\n ),\n },\n}\n"],
|
|
5
|
+
"mappings": "AA2CM,mBAAAA,EAEI,OAAAC,EAGA,QAAAC,MALJ,oBA3CN,MAAkB,QAClB,OACE,UAAAC,EACA,UAAAC,EACA,iBAAAC,EACA,qBAAAC,EACA,gBAAAC,EACA,gBAAAC,EACA,eAAAC,EACA,iBAAAC,EACA,SAAAC,MACK,yBAGP,MAAMC,EAAO,CACX,MAAO,oBACP,UAAWR,EACX,cAAe,CACb,cAAAM,EACA,cAAAL,EACA,aAAAG,EACA,YAAAC,EACA,kBAAAH,EACA,aAAAC,CACF,EACA,WAAY,CACV,OAAQ,WACR,KAAM,CACJ,YAAa,CACX,UAAW,mIACb,CACF,CACF,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOM,EAAQD,EAIR,MAAME,EAAiB,CAC5B,KAAM,CACJ,SACEZ,EAAAF,EAAA,CACE,UAAAC,EAACS,EAAA,CAAc,QAAO,GACpB,SAAAT,EAAC,UAAO,wBAAY,EACtB,EACAC,EAACG,EAAA,CAAc,UAAU,uBACvB,UAAAH,EAACM,EAAA,CACC,UAAAP,EAACQ,EAAA,CAAY,wBAAY,EACzBR,EAACK,EAAA,CAAkB,2EAA+D,GACpF,EACAJ,EAAC,OAAI,UAAU,kBACb,UAAAA,EAAC,OAAI,UAAU,sCACb,UAAAD,EAAC,SAAM,QAAQ,OAAO,UAAU,aAAa,gBAE7C,EACAA,EAACU,EAAA,CAAM,GAAG,OAAO,aAAa,eAAe,UAAU,aAAa,GACtE,EACAT,EAAC,OAAI,UAAU,sCACb,UAAAD,EAAC,SAAM,QAAQ,WAAW,UAAU,aAAa,oBAEjD,EACAA,EAACU,EAAA,CAAM,GAAG,WAAW,aAAa,YAAY,UAAU,aAAa,GACvE,GACF,EACAV,EAACM,EAAA,CACC,SAAAN,EAACE,EAAA,CAAO,KAAK,SAAS,wBAAY,EACpC,GACF,GACF,CAEJ,CACF",
|
|
6
6
|
"names": ["Fragment", "jsx", "jsxs", "Button", "Dialog", "DialogContent", "DialogDescription", "DialogFooter", "DialogHeader", "DialogTitle", "DialogTrigger", "Input", "meta", "dialog_stories_default", "Default"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t from"../biz-components/Evaluate";const s={title:"Biz-Components/Evaluate",component:t,parameters:{layout:"fullscreen"},tags:["autodocs"]};var a=s;const e=[{title:"Theoldpiggery",subTitle:"Fast Charging for 3 Devices",description:"Anker Prime 27,650mAh Power Bank (250W)",avatar:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/85087c9c0ec8c86b481eaea247812c3e.png?v=1744612102",img:"https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554"},{title:"Theoldpiggery",subTitle:"Fast Charging for 3 Devices",description:"Anker Prime 27,650mAh Power Bank (250W)",avatar:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/85087c9c0ec8c86b481eaea247812c3e.png?v=1744612102",img:"https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554"},{title:"Theoldpiggery",subTitle:"Fast Charging for 3 Devices",description:"Anker Prime 27,650mAh Power Bank (250W)Anker Prime 27,650mAh Power Bank (250W)Anker Prime 27,650mAh Power Bank (250W)650mAh Power Bank (250W)650mAh Power Bank (250W)",avatar:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/85087c9c0ec8c86b481eaea247812c3e.png?v=1744612102",img:"https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554"}],r={args:{products:e,className:"p-4"}},
|
|
1
|
+
import t from"../biz-components/Evaluate";const s={title:"Biz-Components/Evaluate",component:t,parameters:{layout:"fullscreen"},tags:["autodocs"]};var a=s;const e=[{rating:4,title:"Theoldpiggery",subTitle:"Fast Charging for 3 Devices",description:"Anker Prime 27,650mAh Power Bank (250W)",avatar:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/85087c9c0ec8c86b481eaea247812c3e.png?v=1744612102",img:"https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554"},{rating:3,title:"Theoldpiggery",subTitle:"Fast Charging for 3 Devices",description:"Anker Prime 27,650mAh Power Bank (250W)",avatar:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/85087c9c0ec8c86b481eaea247812c3e.png?v=1744612102",img:"https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554"},{rating:5,title:"Theoldpiggery",subTitle:"Fast Charging for 3 Devices",description:"Anker Prime 27,650mAh Power Bank (250W)Anker Prime 27,650mAh Power Bank (250W)Anker Prime 27,650mAh Power Bank (250W)650mAh Power Bank (250W)650mAh Power Bank (250W)",avatar:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/85087c9c0ec8c86b481eaea247812c3e.png?v=1744612102",img:"https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554"}],r={args:{products:e,className:"p-4"}},i={args:{products:e,className:"p-4",shape:"round"}};export{r as Default,i as Round,a as default};
|
|
2
2
|
//# sourceMappingURL=evaluate.stories.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/stories/evaluate.stories.tsx"],
|
|
4
|
-
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport Evaluate from '../biz-components/Evaluate'\n\nconst meta = {\n title: 'Biz-Components/Evaluate',\n component: Evaluate,\n parameters: {\n layout: 'fullscreen',\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof Evaluate>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nconst mockItems = [\n {\n title: 'Theoldpiggery',\n subTitle: 'Fast Charging for 3 Devices',\n description: 'Anker Prime 27,650mAh Power Bank (250W)',\n avatar: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/85087c9c0ec8c86b481eaea247812c3e.png?v=1744612102',\n img: 'https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554',\n },\n {\n title: 'Theoldpiggery',\n subTitle: 'Fast Charging for 3 Devices',\n description: 'Anker Prime 27,650mAh Power Bank (250W)',\n avatar: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/85087c9c0ec8c86b481eaea247812c3e.png?v=1744612102',\n img: 'https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554',\n },\n {\n title: 'Theoldpiggery',\n subTitle: 'Fast Charging for 3 Devices',\n description: 'Anker Prime 27,650mAh Power Bank (250W)Anker Prime 27,650mAh Power Bank (250W)Anker Prime 27,650mAh Power Bank (250W)650mAh Power Bank (250W)650mAh Power Bank (250W)',\n avatar: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/85087c9c0ec8c86b481eaea247812c3e.png?v=1744612102',\n img: 'https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554',\n },\n]\n\nexport const Default: Story = {\n args: {\n products: mockItems,\n className: 'p-4',\n },\n}\n\nexport const Round: Story = {\n args: {\n products: mockItems,\n className: 'p-4',\n shape: 'round',\n },\n}\n"],
|
|
5
|
-
"mappings": "AACA,OAAOA,MAAc,6BAErB,MAAMC,EAAO,CACX,MAAO,0BACP,UAAWD,EACX,WAAY,CACV,OAAQ,YACV,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOE,EAAQD,EAGf,MAAME,EAAY,CAChB,CACE,MAAO,gBACP,SAAU,8BACV,YAAa,0CACb,OAAQ,2GACR,IAAK,8HACP,EACA,CACE,MAAO,gBACP,SAAU,8BACV,YAAa,0CACb,OAAQ,2GACR,IAAK,8HACP,EACA,CACE,MAAO,gBACP,SAAU,8BACV,YAAa,wKACb,OAAQ,2GACR,IAAK,8HACP,CACF,EAEaC,EAAiB,CAC5B,KAAM,CACJ,SAAUD,EACV,UAAW,KACb,CACF,EAEaE,EAAe,CAC1B,KAAM,CACJ,SAAUF,EACV,UAAW,MACX,MAAO,OACT,CACF",
|
|
4
|
+
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport Evaluate from '../biz-components/Evaluate'\n\nconst meta = {\n title: 'Biz-Components/Evaluate',\n component: Evaluate,\n parameters: {\n layout: 'fullscreen',\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof Evaluate>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nconst mockItems = [\n {\n rating: 4,\n title: 'Theoldpiggery',\n subTitle: 'Fast Charging for 3 Devices',\n description: 'Anker Prime 27,650mAh Power Bank (250W)',\n avatar: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/85087c9c0ec8c86b481eaea247812c3e.png?v=1744612102',\n img: 'https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554',\n },\n {\n rating:3,\n title: 'Theoldpiggery',\n subTitle: 'Fast Charging for 3 Devices',\n description: 'Anker Prime 27,650mAh Power Bank (250W)',\n avatar: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/85087c9c0ec8c86b481eaea247812c3e.png?v=1744612102',\n img: 'https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554',\n },\n {\n rating: 5,\n title: 'Theoldpiggery',\n subTitle: 'Fast Charging for 3 Devices',\n description: 'Anker Prime 27,650mAh Power Bank (250W)Anker Prime 27,650mAh Power Bank (250W)Anker Prime 27,650mAh Power Bank (250W)650mAh Power Bank (250W)650mAh Power Bank (250W)',\n avatar: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/85087c9c0ec8c86b481eaea247812c3e.png?v=1744612102',\n img: 'https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554',\n },\n]\n\nexport const Default: Story = {\n args: {\n products: mockItems,\n className: 'p-4',\n },\n}\n\nexport const Round: Story = {\n args: {\n products: mockItems,\n className: 'p-4',\n shape: 'round',\n },\n}\n"],
|
|
5
|
+
"mappings": "AACA,OAAOA,MAAc,6BAErB,MAAMC,EAAO,CACX,MAAO,0BACP,UAAWD,EACX,WAAY,CACV,OAAQ,YACV,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOE,EAAQD,EAGf,MAAME,EAAY,CAChB,CACE,OAAQ,EACR,MAAO,gBACP,SAAU,8BACV,YAAa,0CACb,OAAQ,2GACR,IAAK,8HACP,EACA,CACE,OAAO,EACP,MAAO,gBACP,SAAU,8BACV,YAAa,0CACb,OAAQ,2GACR,IAAK,8HACP,EACA,CACE,OAAQ,EACR,MAAO,gBACP,SAAU,8BACV,YAAa,wKACb,OAAQ,2GACR,IAAK,8HACP,CACF,EAEaC,EAAiB,CAC5B,KAAM,CACJ,SAAUD,EACV,UAAW,KACb,CACF,EAEaE,EAAe,CAC1B,KAAM,CACJ,SAAUF,EACV,UAAW,MACX,MAAO,OACT,CACF",
|
|
6
6
|
"names": ["Evaluate", "meta", "evaluate_stories_default", "mockItems", "Default", "Round"]
|
|
7
7
|
}
|