@anker-in/headless-ui 0.0.27-alpha.25 → 0.0.27-alpha.26
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/AccordionCards/index.js +1 -1
- package/dist/cjs/biz-components/AccordionCards/index.js.map +2 -2
- package/dist/cjs/biz-components/HeroBanner/HeroBanner.js +1 -1
- package/dist/cjs/biz-components/HeroBanner/HeroBanner.js.map +2 -2
- package/dist/cjs/biz-components/MediaPlayerBase/index.js +1 -1
- package/dist/cjs/biz-components/MediaPlayerBase/index.js.map +2 -2
- package/dist/cjs/biz-components/MediaPlayerBase/types.d.ts +8 -10
- package/dist/cjs/biz-components/MediaPlayerBase/types.js +1 -1
- package/dist/cjs/biz-components/MediaPlayerBase/types.js.map +1 -1
- package/dist/cjs/biz-components/MediaPlayerMulti/index.js +1 -1
- package/dist/cjs/biz-components/MediaPlayerMulti/index.js.map +3 -3
- package/dist/cjs/biz-components/MediaPlayerMulti/types.d.ts +4 -2
- package/dist/cjs/biz-components/MediaPlayerMulti/types.js +1 -1
- package/dist/cjs/biz-components/MediaPlayerMulti/types.js.map +1 -1
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +3 -3
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/types.d.ts +3 -2
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/types.js +1 -1
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/types.js.map +1 -1
- package/dist/cjs/biz-components/Slogan/index.js +1 -1
- package/dist/cjs/biz-components/Slogan/index.js.map +2 -2
- package/dist/cjs/biz-components/Title/index.d.ts +9 -0
- package/dist/cjs/biz-components/Title/index.js +2 -0
- package/dist/cjs/biz-components/Title/index.js.map +7 -0
- package/dist/cjs/biz-components/Title/types.d.ts +22 -0
- package/dist/cjs/biz-components/Title/types.js +2 -0
- package/dist/cjs/biz-components/Title/types.js.map +7 -0
- package/dist/cjs/biz-components/index.d.ts +3 -0
- package/dist/cjs/biz-components/index.js +1 -1
- package/dist/cjs/biz-components/index.js.map +3 -3
- package/dist/cjs/components/button.js.map +2 -2
- package/dist/cjs/components/container.js +1 -1
- package/dist/cjs/components/container.js.map +2 -2
- package/dist/cjs/shared/Styles.js.map +1 -1
- package/dist/cjs/stories/mediaplayerBase.stories.js +1 -1
- package/dist/cjs/stories/mediaplayerBase.stories.js.map +2 -2
- package/dist/cjs/stories/mediaplayerMulti.stories.js +1 -1
- package/dist/cjs/stories/mediaplayerMulti.stories.js.map +2 -2
- package/dist/cjs/types/props.d.ts +1 -0
- package/dist/cjs/types/props.js +1 -1
- package/dist/cjs/types/props.js.map +1 -1
- package/dist/esm/biz-components/AccordionCards/index.js +1 -1
- package/dist/esm/biz-components/AccordionCards/index.js.map +2 -2
- package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
- package/dist/esm/biz-components/HeroBanner/HeroBanner.js.map +2 -2
- package/dist/esm/biz-components/MediaPlayerBase/index.js +1 -1
- package/dist/esm/biz-components/MediaPlayerBase/index.js.map +2 -2
- package/dist/esm/biz-components/MediaPlayerBase/types.d.ts +8 -10
- package/dist/esm/biz-components/MediaPlayerMulti/index.js +1 -1
- package/dist/esm/biz-components/MediaPlayerMulti/index.js.map +3 -3
- package/dist/esm/biz-components/MediaPlayerMulti/types.d.ts +4 -2
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +3 -3
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/types.d.ts +3 -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/biz-components/Title/index.d.ts +9 -0
- package/dist/esm/biz-components/Title/index.js +2 -0
- package/dist/esm/biz-components/Title/index.js.map +7 -0
- package/dist/esm/biz-components/Title/types.d.ts +22 -0
- package/dist/esm/biz-components/Title/types.js +1 -0
- package/dist/esm/biz-components/Title/types.js.map +7 -0
- package/dist/esm/biz-components/index.d.ts +3 -0
- package/dist/esm/biz-components/index.js +1 -1
- package/dist/esm/biz-components/index.js.map +2 -2
- package/dist/esm/components/button.js.map +2 -2
- package/dist/esm/components/container.js +1 -1
- package/dist/esm/components/container.js.map +2 -2
- package/dist/esm/shared/Styles.js.map +1 -1
- package/dist/esm/stories/mediaplayerBase.stories.js +1 -1
- package/dist/esm/stories/mediaplayerBase.stories.js.map +2 -2
- package/dist/esm/stories/mediaplayerMulti.stories.js +1 -1
- package/dist/esm/stories/mediaplayerMulti.stories.js.map +2 -2
- package/dist/esm/types/props.d.ts +1 -0
- package/package.json +2 -1
- package/style.css +28 -16
|
@@ -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 */\n// eslint-disable-next-line tailwindcss/enforces-negative-arbitrary-values\nconst buttonVariants = cva(\n 'ring-offset-background focus-visible:ring-ring rounded-btn inline-flex items-center justify-center border-[1.6px] border-solid 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 primary:\n 'bg-btn-primary text-btn-primary-foreground hover:bg-btn-primary-active border-info-primary hover:border-btn-primary-active hover:text-btn-primary-active-foreground',\n secondary:\n 'bg-btn-secondary border-info-primary text-btn-secondary-foreground hover:bg-btn-secondary-active hover:text-btn-secondary border border-solid',\n link: 'text-info-primary hover:text-btn-primary-active border-none underline-offset-4 hover:underline',\n ghost: 'text-info-primary 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 pb-[10px] pt-[11px] text-[14px] leading-tight',\n lg: 'px-7 pb-[14px] pt-[15px] 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 },\n compoundVariants: [\n {\n variant: 'primary',\n hoverEffect: 'slide',\n class:\n 'before:rounded-btn hover:!bg-btn-primary before:bg-btn-primary-active relative z-[1] overflow-hidden before:absolute before:inset-y-0 before:-z-[1] 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 'before:rounded-btn hover:!bg-btn-secondary before:bg-btn-secondary-active relative z-[1] overflow-hidden before:absolute before:inset-y-0 before:-z-[1] 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-active disabled:border-btn-primary-disabled-border',\n },\n {\n variant: 'secondary',\n state: 'loading',\n class:\n 'bg-btn-secondary disabled:bg-btn-secondary-disabled disabled:text-btn-secondary-disabled-foreground disabled:border-btn-primary-disabled',\n },\n {\n variant: 'primary',\n state: 'disabled',\n class:\n 'disabled:bg-btn-primary-disabled disabled:text-btn-primary-disabled-foreground disabled:border-btn-primary-disabled',\n },\n {\n variant: 'secondary',\n state: 'disabled',\n class:\n 'disabled:bg-btn-secondary-disabled disabled:text-btn-secondary-disabled-foreground disabled:border-btn-secondary-disabled-border',\n },\n {\n variant: 'link',\n state: 'disabled',\n class: 'disabled:text-info-quaternary',\n },\n ],\n defaultVariants: {\n variant: 'primary',\n size: 'base',\n hoverEffect: 'none',\n state: 'default',\n },\n }\n)\n\nconst loadingSvgVariants = cva('', {\n variants: {\n variant: {\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
|
|
5
|
-
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,
|
|
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 */\n// eslint-disable-next-line tailwindcss/enforces-negative-arbitrary-values\nconst buttonVariants = cva(\n 'ring-offset-background focus-visible:ring-ring rounded-btn inline-flex items-center justify-center border-[1.6px] border-solid 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 primary:\n 'bg-btn-primary text-btn-primary-foreground hover:bg-btn-primary-active border-info-primary hover:border-btn-primary-active hover:text-btn-primary-active-foreground',\n secondary:\n 'bg-btn-secondary border-info-primary text-btn-secondary-foreground hover:bg-btn-secondary-active hover:text-btn-secondary border border-solid',\n link: 'text-info-primary hover:text-btn-primary-active border-none underline-offset-4 hover:underline',\n ghost: 'text-info-primary 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 pb-[10px] pt-[11px] text-[14px] leading-tight',\n lg: 'px-7 pb-[14px] pt-[15px] 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 },\n compoundVariants: [\n {\n variant: 'primary',\n hoverEffect: 'slide',\n class:\n 'before:rounded-btn hover:!bg-btn-primary before:bg-btn-primary-active relative z-[1] overflow-hidden before:absolute before:inset-y-0 before:-z-[1] 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 'before:rounded-btn hover:!bg-btn-secondary before:bg-btn-secondary-active relative z-[1] overflow-hidden before:absolute before:inset-y-0 before:-z-[1] 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-active disabled:border-btn-primary-disabled-border',\n },\n {\n variant: 'secondary',\n state: 'loading',\n class:\n 'bg-btn-secondary disabled:bg-btn-secondary-disabled disabled:text-btn-secondary-disabled-foreground disabled:border-btn-primary-disabled',\n },\n {\n variant: 'primary',\n state: 'disabled',\n class:\n 'disabled:bg-btn-primary-disabled disabled:text-btn-primary-disabled-foreground disabled:border-btn-primary-disabled',\n },\n {\n variant: 'secondary',\n state: 'disabled',\n class:\n 'disabled:bg-btn-secondary-disabled disabled:text-btn-secondary-disabled-foreground disabled:border-btn-secondary-disabled-border',\n },\n {\n variant: 'link',\n state: 'disabled',\n class: 'disabled:text-info-quaternary',\n },\n ],\n defaultVariants: {\n variant: 'primary',\n size: 'base',\n hoverEffect: 'none',\n state: 'default',\n },\n }\n)\n\nconst loadingSvgVariants = cva('', {\n variants: {\n variant: {\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 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 }), 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": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAoJU,IAAAI,EAAA,6BAlJVC,EAAuB,oBACvBC,EAAqB,gCACrBC,EAA+B,2CAC/BC,EAAuC,oCACvCC,EAAoB,kCACpBC,EAAmB,+BAMnB,MAAMC,KAAiB,OACrB,gRACA,CACE,SAAU,CACR,QAAS,CACP,QACE,sKACF,UACE,gJACF,KAAM,iGACN,MAAO,0EACT,EACA,KAAM,CACJ,GAAI,uCACJ,KAAM,qDACN,GAAI,sDACJ,KAAM,qCACR,EAEA,YAAa,CACX,KAAM,GACN,MAAO,EACT,EACA,MAAO,CACL,QAAS,GACT,SAAU,GACV,QAAS,EACX,CACF,EACA,iBAAkB,CAChB,CACE,QAAS,UACT,YAAa,QACb,MACE,8SACJ,EACA,CACE,QAAS,YACT,YAAa,QACb,MACE,mTACJ,EACA,CACE,QAAS,UACT,MAAO,UACP,MAAO,mEACT,EACA,CACE,QAAS,YACT,MAAO,UACP,MACE,0IACJ,EACA,CACE,QAAS,UACT,MAAO,WACP,MACE,qHACJ,EACA,CACE,QAAS,YACT,MAAO,WACP,MACE,kIACJ,EACA,CACE,QAAS,OACT,MAAO,WACP,MAAO,+BACT,CACF,EACA,gBAAiB,CACf,QAAS,UACT,KAAM,OACN,YAAa,OACb,MAAO,SACT,CACF,CACF,EAEMC,KAAqB,OAAI,GAAI,CACjC,SAAU,CACR,QAAS,CACP,QAAS,gCACT,UAAW,kCACX,KAAM,iBACN,MAAO,gBACT,CACF,EACA,gBAAiB,CACf,QAAS,SACX,CACF,CAAC,EAeKC,EAASR,EAAM,WACnB,CACE,CACE,QAAAS,EAAU,GACV,KAAAC,EAAO,OACP,SAAAC,EACA,QAAAC,EACA,YAAAC,EAAc,OACd,UAAAC,EACA,SAAAC,EAAW,GACX,QAAAC,EAAU,GACV,QAAAC,EACA,GAAGC,CACL,EACAC,OAOE,OALWV,EAAU,OAAO,SAK3B,CACC,SALeM,GAAYC,EAM3B,aAAW,MAAGV,EAAe,CAAE,QAAAM,EAAS,KAAAF,EAAM,YAAAG,EAAa,MALjDG,EAAU,UAAYD,EAAW,WAAa,SAKS,CAAC,EAAGD,CAAS,EAC9E,IAAKK,EACJ,GAAGD,EAEH,SAAAF,KACC,oBACE,oBAAC,QAAK,MAAO,CAAE,QAAS,WAAY,WAAY,QAAS,EAAG,cAAW,GACpE,SAAAL,EACH,KACA,OAAC,QAAK,UAAU,WACb,SAAAM,MAGC,OAAC,EAAAG,QAAA,CACC,UAAWb,EAAmB,CAC5B,QAAAK,CACF,CAAC,EACH,EAEJ,KACA,OAAC,kBAAgB,SAAAD,EAAS,GAC5B,EAEAA,EAEJ,CAGN,EAEAH,EAAO,YAAc,SACrB,IAAOX,EAAQW",
|
|
6
6
|
"names": ["button_exports", "__export", "button_default", "__toCommonJS", "import_jsx_runtime", "React", "import_react_slot", "import_react_visually_hidden", "import_class_variance_authority", "import_spinner", "import_helpers", "buttonVariants", "loadingSvgVariants", "Button", "asChild", "size", "children", "variant", "hoverEffect", "className", "disabled", "loading", "spinner", "props", "ref", "Spinner"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";var C=Object.create;var
|
|
1
|
+
"use strict";"use client";var C=Object.create;var n=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var f=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var b=(e,o)=>{for(var t in o)n(e,t,{get:o[t],enumerable:!0})},m=(e,o,t,p)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of y(o))!R.call(e,a)&&a!==t&&n(e,a,{get:()=>o[a],enumerable:!(p=x(o,a))||p.enumerable});return e};var h=(e,o,t)=>(t=e!=null?C(f(e)):{},m(o||!e||!e.__esModule?n(t,"default",{value:e,enumerable:!0}):t,e)),N=e=>m(n({},"__esModule",{value:!0}),e);var P={};b(P,{Container:()=>r});module.exports=N(P);var c=require("react/jsx-runtime"),s=h(require("react")),i=require("../helpers/utils.js"),l=require("@radix-ui/react-slot");const r=s.default.forwardRef(({...e},o)=>{const{asChild:t,children:p,className:a,...d}=e;return(0,c.jsx)(t?l.Slot:"div",{...d,ref:o,className:(0,i.cn)("tablet:px-8 laptop:px-16 desktop:px-16 lg-desktop:px-auto mx-auto box-border max-w-[1664px]","tablet:my-20 laptop:my-24 desktop:my-28 lg-desktop:my-32 my-16",a),children:p})});r.displayName="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": ["'use client'\nimport 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(\n 'tablet:
|
|
5
|
-
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,eAAAE,IAAA,eAAAC,EAAAH,GAgBI,IAAAI,EAAA,6BAfJC,EAAkB,oBAClBC,EAAmB,+BACnBC,EAAqB,gCAQrB,MAAML,EAAY,EAAAM,QAAM,WAA6C,CAAC,CAAE,GAAGC,CAAM,EAAGC,IAAiB,CACnG,KAAM,CAAE,QAAAC,EAAS,SAAAC,EAAU,UAAAC,EAAW,GAAGC,CAAe,EAAIL,EAG5D,SACE,OAHWE,EAAU,OAAO,MAG3B,CACE,GAAGG,EACJ,IAAKJ,EACL,aAAW,MACT,
|
|
4
|
+
"sourcesContent": ["'use client'\nimport 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(\n 'tablet:px-8 laptop:px-16 desktop:px-16 lg-desktop:px-auto mx-auto box-border max-w-[1664px]',\n 'tablet:my-20 laptop:my-24 desktop:my-28 lg-desktop:my-32 my-16',\n className\n )}\n >\n {children}\n </Comp>\n )\n})\nContainer.displayName = 'Container'\n\nexport { Container }\nexport type { ContainerProps }\n"],
|
|
5
|
+
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,eAAAE,IAAA,eAAAC,EAAAH,GAgBI,IAAAI,EAAA,6BAfJC,EAAkB,oBAClBC,EAAmB,+BACnBC,EAAqB,gCAQrB,MAAML,EAAY,EAAAM,QAAM,WAA6C,CAAC,CAAE,GAAGC,CAAM,EAAGC,IAAiB,CACnG,KAAM,CAAE,QAAAC,EAAS,SAAAC,EAAU,UAAAC,EAAW,GAAGC,CAAe,EAAIL,EAG5D,SACE,OAHWE,EAAU,OAAO,MAG3B,CACE,GAAGG,EACJ,IAAKJ,EACL,aAAW,MACT,8FACA,iEACAG,CACF,EAEC,SAAAD,EACH,CAEJ,CAAC,EACDV,EAAU,YAAc",
|
|
6
6
|
"names": ["container_exports", "__export", "Container", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_react_slot", "React", "props", "forwardedRef", "asChild", "children", "className", "containerProps"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/shared/Styles.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, { useMemo } from 'react'\n\nexport interface StylesProps {\n /** \u81EA\u5B9A\u4E49\u6837\u5F0F\u5B57\u7B26\u4E32 */\n style?: string\n /** \u552F\u4E00\u6807\u8BC6\u7B26 */\n uid?: string\n /** \u662F\u5426\u7981\u7528 */\n disabled?: boolean\n}\n\n/**\n * \u751F\u6210\u552F\u4E00\u6807\u8BC6\u7B26\n */\nconst generateUID = () => {\n return `style_${Math.random().toString(36).substring(2, 9)}_${Date.now().toString(36)}`\n}\n\n/**\n * \u4ECE\u7EC4\u4EF6 props \u4E2D\u63D0\u53D6\u6837\u5F0F\u76F8\u5173\u5C5E\u6027\n */\nexport const getStylesProps = <T extends Record<string, unknown>>(props: T & StylesProps): StylesProps => {\n const { style, uid, disabled } = props\n return { style, uid, disabled }\n}\n\n/**\n * \u6837\u5F0F\u6CE8\u5165\u7EC4\u4EF6\n */\nconst Styles: React.FC<StylesProps> = ({ style, uid = generateUID(), disabled = false }) => {\n if (!style || disabled) {\n return null\n }\n\n return <style suppressHydrationWarning data-style-id={uid}>{`.block-${uid} { ${style} }`}</style>\n}\n\n/**\n * \u6837\u5F0F Hook\uFF0C\u8FD4\u56DE\u6837\u5F0F\u7C7B\u540D\u548C\u6837\u5F0F\u7EC4\u4EF6\n * @param styleProps - \u6837\u5F0F\u5C5E\u6027\n */\nexport const useStyles = (styleProps: Partial<StylesProps>) => {\n const uid = useMemo(() => styleProps?.uid || generateUID(), [styleProps?.uid])\n\n const StyleComponent = useMemo(() => <Styles {...styleProps} uid={uid} />, [styleProps, uid])\n\n return {\n className: `block-${uid} `,\n StyleComponent,\n uid,\n } as const\n}\n\n/**\n * \u6837\u5F0F\u9AD8\u9636\u7EC4\u4EF6\uFF0C \u7528\u4E8E\u7ED9\u7EC4\u4EF6\u7528style \u6807\u7B7E\u7684\u5F62\u5F0F\u8FFD\u52A0\u6837\u5F0F\n * @param WrappedComponent - \u9700\u8981\u5305\u88C5\u7684\u7EC4\u4EF6\n * @param defaultStyleProps - \u9ED8\u8BA4\u6837\u5F0F\u5C5E\u6027\n */\nexport function withStyles<P extends object>(\n WrappedComponent: React.ComponentType<P>,\n defaultStyleProps?: Partial<StylesProps>\n) {\n const WithStyles = function (props: Omit<P, keyof StylesProps> & Partial<StylesProps> & { className?: string }) {\n const finalStyleProps = {\n ...defaultStyleProps,\n ...getStylesProps(props),\n }\n\n const { className, StyleComponent } = useStyles(finalStyleProps)\n\n return (\n <>\n {StyleComponent}\n <WrappedComponent {...(props as P)} className={`${className} ${props.className}`} />\n </>\n )\n }\n\n // \u76F4\u63A5\u4F7F\u7528\u539F\u59CB\u7EC4\u4EF6\u7684\u540D\u79F0\n WithStyles.displayName = WrappedComponent.displayName || WrappedComponent.name || 'Component'\n return WithStyles\n}\n
|
|
4
|
+
"sourcesContent": ["import React, { useMemo } from 'react'\n\nexport interface StylesProps {\n /** \u81EA\u5B9A\u4E49\u6837\u5F0F\u5B57\u7B26\u4E32 */\n style?: string\n /** \u552F\u4E00\u6807\u8BC6\u7B26 */\n uid?: string\n /** \u662F\u5426\u7981\u7528 */\n disabled?: boolean\n}\n\n/**\n * \u751F\u6210\u552F\u4E00\u6807\u8BC6\u7B26\n */\nconst generateUID = () => {\n return `style_${Math.random().toString(36).substring(2, 9)}_${Date.now().toString(36)}`\n}\n\n/**\n * \u4ECE\u7EC4\u4EF6 props \u4E2D\u63D0\u53D6\u6837\u5F0F\u76F8\u5173\u5C5E\u6027\n */\nexport const getStylesProps = <T extends Record<string, unknown>>(props: T & StylesProps): StylesProps => {\n const { style, uid, disabled } = props\n return { style, uid, disabled }\n}\n\n/**\n * \u6837\u5F0F\u6CE8\u5165\u7EC4\u4EF6\n */\nconst Styles: React.FC<StylesProps> = ({ style, uid = generateUID(), disabled = false }) => {\n if (!style || disabled) {\n return null\n }\n\n return <style suppressHydrationWarning data-style-id={uid}>{`.block-${uid} { ${style} }`}</style>\n}\n\n/**\n * \u6837\u5F0F Hook\uFF0C\u8FD4\u56DE\u6837\u5F0F\u7C7B\u540D\u548C\u6837\u5F0F\u7EC4\u4EF6\n * @param styleProps - \u6837\u5F0F\u5C5E\u6027\n */\nexport const useStyles = (styleProps: Partial<StylesProps>) => {\n const uid = useMemo(() => styleProps?.uid || generateUID(), [styleProps?.uid])\n\n const StyleComponent = useMemo(() => <Styles {...styleProps} uid={uid} />, [styleProps, uid])\n\n return {\n className: `block-${uid} `,\n StyleComponent,\n uid,\n } as const\n}\n\n/**\n * \u6837\u5F0F\u9AD8\u9636\u7EC4\u4EF6\uFF0C \u7528\u4E8E\u7ED9\u7EC4\u4EF6\u7528style \u6807\u7B7E\u7684\u5F62\u5F0F\u8FFD\u52A0\u6837\u5F0F\n * @param WrappedComponent - \u9700\u8981\u5305\u88C5\u7684\u7EC4\u4EF6\n * @param defaultStyleProps - \u9ED8\u8BA4\u6837\u5F0F\u5C5E\u6027\n */\nexport function withStyles<P extends object>(\n WrappedComponent: React.ComponentType<P>,\n defaultStyleProps?: Partial<StylesProps>\n) {\n const WithStyles = function (props: Omit<P, keyof StylesProps> & Partial<StylesProps> & { className?: string }) {\n const finalStyleProps = {\n ...defaultStyleProps,\n ...getStylesProps(props),\n }\n\n const { className, StyleComponent } = useStyles(finalStyleProps)\n\n return (\n <>\n {StyleComponent}\n <WrappedComponent {...(props as P)} className={`${className} ${props.className}`} />\n </>\n )\n }\n\n // \u76F4\u63A5\u4F7F\u7528\u539F\u59CB\u7EC4\u4EF6\u7684\u540D\u79F0\n WithStyles.displayName = WrappedComponent.displayName || WrappedComponent.name || 'Component'\n return WithStyles\n}\n"],
|
|
5
5
|
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,oBAAAE,EAAA,cAAAC,EAAA,eAAAC,IAAA,eAAAC,EAAAL,GAkCS,IAAAM,EAAA,6BAlCTC,EAA+B,iBAc/B,MAAMC,EAAc,IACX,SAAS,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,UAAU,EAAG,CAAC,CAAC,IAAI,KAAK,IAAI,EAAE,SAAS,EAAE,CAAC,GAM1EN,EAAqDO,GAAwC,CACxG,KAAM,CAAE,MAAAC,EAAO,IAAAC,EAAK,SAAAC,CAAS,EAAIH,EACjC,MAAO,CAAE,MAAAC,EAAO,IAAAC,EAAK,SAAAC,CAAS,CAChC,EAKMC,EAAgC,CAAC,CAAE,MAAAH,EAAO,IAAAC,EAAMH,EAAY,EAAG,SAAAI,EAAW,EAAM,IAChF,CAACF,GAASE,EACL,QAGF,OAAC,SAAM,yBAAwB,GAAC,gBAAeD,EAAM,mBAAUA,CAAG,MAAMD,CAAK,KAAK,EAO9EP,EAAaW,GAAqC,CAC7D,MAAMH,KAAM,WAAQ,IAAMG,GAAY,KAAON,EAAY,EAAG,CAACM,GAAY,GAAG,CAAC,EAEvEC,KAAiB,WAAQ,OAAM,OAACF,EAAA,CAAQ,GAAGC,EAAY,IAAKH,EAAK,EAAI,CAACG,EAAYH,CAAG,CAAC,EAE5F,MAAO,CACL,UAAW,SAASA,CAAG,IACvB,eAAAI,EACA,IAAAJ,CACF,CACF,EAOO,SAASP,EACdY,EACAC,EACA,CACA,MAAMC,EAAa,SAAUT,EAAmF,CAC9G,MAAMU,EAAkB,CACtB,GAAGF,EACH,GAAGf,EAAeO,CAAK,CACzB,EAEM,CAAE,UAAAW,EAAW,eAAAL,CAAe,EAAIZ,EAAUgB,CAAe,EAE/D,SACE,oBACG,UAAAJ,KACD,OAACC,EAAA,CAAkB,GAAIP,EAAa,UAAW,GAAGW,CAAS,IAAIX,EAAM,SAAS,GAAI,GACpF,CAEJ,EAGA,OAAAS,EAAW,YAAcF,EAAiB,aAAeA,EAAiB,MAAQ,YAC3EE,CACT",
|
|
6
6
|
"names": ["Styles_exports", "__export", "getStylesProps", "useStyles", "withStyles", "__toCommonJS", "import_jsx_runtime", "import_react", "generateUID", "props", "style", "uid", "disabled", "Styles", "styleProps", "StyleComponent", "WrappedComponent", "defaultStyleProps", "WithStyles", "finalStyleProps", "className"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var d=Object.create;var r=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty;var n=(e,t)=>{for(var a in t)r(e,a,{get:t[a],enumerable:!0})},i=(e,t,a,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of l(t))!c.call(e,o)&&o!==a&&r(e,o,{get:()=>t[o],enumerable:!(s=f(t,o))||s.enumerable});return e};var b=(e,t,a)=>(a=e!=null?d(y(e)):{},i(t||!e||!e.__esModule?r(a,"default",{value:e,enumerable:!0}):a,e)),m=e=>i(r({},"__esModule",{value:!0}),e);var B={};n(B,{Default:()=>g,default:()=>M});module.exports=m(B);var p=b(require("../biz-components/MediaPlayerBase/index.js"));const h={title:"Biz-Components/MediaPlayerBase",component:p.default,parameters:{layout:"fullscreen"}};var M=h;const g={args:{data:{title:"Live Charged.",videoTitle:`The World's <span class="text-brand-1">NO.1</span> Mobile Charging Brand*`,img:"https://cdn.shopify.com/s/files/1/0819/5735/5793/files/bb4296bf-5436-4998-866d-2665b11e6494_89394f2f67489421c24267fae7fba035.jpg?v=1745399761",btnText:"Watch Video",media:"https://cdn.shopify.com/videos/c/o/v/97144231c93943c4aae54f8056b1073b.mp4"}}};
|
|
2
2
|
//# sourceMappingURL=mediaplayerBase.stories.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/stories/mediaplayerBase.stories.tsx"],
|
|
4
|
-
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport MediaPlayerBase from '../biz-components/MediaPlayerBase/index.js'\n\nconst meta: Meta<typeof MediaPlayerBase> = {\n title: 'Biz-Components/MediaPlayerBase',\n component: MediaPlayerBase,\n parameters: {\n layout: 'fullscreen',\n },\n}\n\nexport default meta\ntype Story = StoryObj<typeof MediaPlayerBase>\n\nexport const Default: Story = {\n args: {\n title: 'Live Charged.',\n
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,YAAAC,IAAA,eAAAC,EAAAJ,GACA,IAAAK,EAA4B,yDAE5B,MAAMC,EAAqC,CACzC,MAAO,iCACP,UAAW,EAAAC,QACX,WAAY,CACV,OAAQ,YACV,CACF,EAEA,IAAOJ,EAAQG,EAGR,MAAMJ,EAAiB,CAC5B,KAAM,CACJ,MAAO,gBACP,WAAY,4EACZ,IAAK,gJACL,QAAS,cACT,MAAO,2EACT,CACF",
|
|
4
|
+
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport MediaPlayerBase from '../biz-components/MediaPlayerBase/index.js'\n\nconst meta: Meta<typeof MediaPlayerBase> = {\n title: 'Biz-Components/MediaPlayerBase',\n component: MediaPlayerBase,\n parameters: {\n layout: 'fullscreen',\n },\n}\n\nexport default meta\ntype Story = StoryObj<typeof MediaPlayerBase>\n\nexport const Default: Story = {\n args: {\n data: {\n title: 'Live Charged.',\n videoTitle: 'The World\\'s <span class=\"text-brand-1\">NO.1</span> Mobile Charging Brand*',\n img: 'https://cdn.shopify.com/s/files/1/0819/5735/5793/files/bb4296bf-5436-4998-866d-2665b11e6494_89394f2f67489421c24267fae7fba035.jpg?v=1745399761',\n btnText: 'Watch Video',\n media: 'https://cdn.shopify.com/videos/c/o/v/97144231c93943c4aae54f8056b1073b.mp4',\n },\n },\n}\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,YAAAC,IAAA,eAAAC,EAAAJ,GACA,IAAAK,EAA4B,yDAE5B,MAAMC,EAAqC,CACzC,MAAO,iCACP,UAAW,EAAAC,QACX,WAAY,CACV,OAAQ,YACV,CACF,EAEA,IAAOJ,EAAQG,EAGR,MAAMJ,EAAiB,CAC5B,KAAM,CACJ,KAAM,CACJ,MAAO,gBACP,WAAY,4EACZ,IAAK,gJACL,QAAS,cACT,MAAO,2EACT,CACF,CACF",
|
|
6
6
|
"names": ["mediaplayerBase_stories_exports", "__export", "Default", "mediaplayerBase_stories_default", "__toCommonJS", "import_MediaPlayerBase", "meta", "MediaPlayerBase"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var l=Object.create;var s=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var
|
|
1
|
+
"use strict";var l=Object.create;var s=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var m=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var y=(e,t)=>{for(var a in t)s(e,a,{get:t[a],enumerable:!0})},c=(e,t,a,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of d(t))!b.call(e,o)&&o!==a&&s(e,o,{get:()=>t[o],enumerable:!(r=f(t,o))||r.enumerable});return e};var u=(e,t,a)=>(a=e!=null?l(m(e)):{},c(t||!e||!e.__esModule?s(a,"default",{value:e,enumerable:!0}):a,e)),p=e=>c(s({},"__esModule",{value:!0}),e);var I={};y(I,{Default:()=>M,Multi:()=>k,default:()=>g});module.exports=p(I);var n=u(require("../biz-components/MediaPlayerMulti/index.js"));const i=[{name:"MKBHD",description:"18.2 Million Youtube subscribers",quote:'"If efficiency means something to you, then definitely check out Anker, who makes these chargers and cables that I really like."',backgroundImage:"https://cdn.shopify.com/s/files/1/0819/5735/5793/files/9b8ef5a9-97c5-4b81-9fdd-1c2805a12702_dca27557ea115cd0c51fa8ee0d7ebd7b.jpg?v=1745464110"},{name:"Unbox Therapy",description:"18.2 Million Youtube subscribers",quote:'"I highly recommend the Anker Nano Pro. This truly is a no-brainer."',backgroundImage:"https://cdn.shopify.com/s/files/1/0819/5735/5793/files/1dd1b39c-1206-48a5-96ec-1083627f51bb_3a34a11a40cbfb857cec1f91eeeaff29.jpg?v=1745464094"}],h={title:"Biz-Components/MediaPlayerMulti",component:n.default,parameters:{layout:"fullscreen"},tags:["autodocs"]};var g=h;const M={args:{data:{items:i}}},k={args:{data:{items:i?.concat(i)}}};
|
|
2
2
|
//# sourceMappingURL=mediaplayerMulti.stories.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/stories/mediaplayerMulti.stories.tsx"],
|
|
4
|
-
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport MediaPlayerMulti from '../biz-components/MediaPlayerMulti/index.js'\n\nconst testimonialItems = [\n {\n name: 'MKBHD',\n description: '18.2 Million Youtube subscribers',\n quote:\n '\"If efficiency means something to you, then definitely check out Anker, who makes these chargers and cables that I really like.\"',\n backgroundImage:\n 'https://cdn.shopify.com/s/files/1/0819/5735/5793/files/9b8ef5a9-97c5-4b81-9fdd-1c2805a12702_dca27557ea115cd0c51fa8ee0d7ebd7b.jpg?v=1745464110',\n },\n {\n name: 'Unbox Therapy',\n description: '18.2 Million Youtube subscribers',\n quote: '\"I highly recommend the Anker Nano Pro. This truly is a no-brainer.\"',\n backgroundImage:\n 'https://cdn.shopify.com/s/files/1/0819/5735/5793/files/1dd1b39c-1206-48a5-96ec-1083627f51bb_3a34a11a40cbfb857cec1f91eeeaff29.jpg?v=1745464094',\n },\n]\n\nconst meta = {\n title: 'Biz-Components/MediaPlayerMulti',\n component: MediaPlayerMulti,\n parameters: {\n layout: 'fullscreen',\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof MediaPlayerMulti>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {\n args: {\n items: testimonialItems,\n },\n}\n\nexport const Multi: Story = {\n args: {\n items: testimonialItems?.concat(testimonialItems),\n },\n}\n"],
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,UAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAL,GACA,IAAAM,EAA6B,0DAE7B,MAAMC,EAAmB,CACvB,CACE,KAAM,QACN,YAAa,mCACb,MACE,mIACF,gBACE,+IACJ,EACA,CACE,KAAM,gBACN,YAAa,mCACb,MAAO,uEACP,gBACE,+IACJ,CACF,EAEMC,EAAO,CACX,MAAO,kCACP,UAAW,EAAAC,QACX,WAAY,CACV,OAAQ,YACV,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOL,EAAQI,EAGR,MAAMN,EAAiB,CAC5B,KAAM,CACJ,MAAOK,CACT,CACF,EAEaJ,EAAe,CAC1B,KAAM,CACJ,MAAOI,GAAkB,OAAOA,CAAgB,CAClD,CACF",
|
|
4
|
+
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport MediaPlayerMulti from '../biz-components/MediaPlayerMulti/index.js'\n\nconst testimonialItems = [\n {\n name: 'MKBHD',\n description: '18.2 Million Youtube subscribers',\n quote:\n '\"If efficiency means something to you, then definitely check out Anker, who makes these chargers and cables that I really like.\"',\n backgroundImage:\n 'https://cdn.shopify.com/s/files/1/0819/5735/5793/files/9b8ef5a9-97c5-4b81-9fdd-1c2805a12702_dca27557ea115cd0c51fa8ee0d7ebd7b.jpg?v=1745464110',\n },\n {\n name: 'Unbox Therapy',\n description: '18.2 Million Youtube subscribers',\n quote: '\"I highly recommend the Anker Nano Pro. This truly is a no-brainer.\"',\n backgroundImage:\n 'https://cdn.shopify.com/s/files/1/0819/5735/5793/files/1dd1b39c-1206-48a5-96ec-1083627f51bb_3a34a11a40cbfb857cec1f91eeeaff29.jpg?v=1745464094',\n },\n]\n\nconst meta = {\n title: 'Biz-Components/MediaPlayerMulti',\n component: MediaPlayerMulti,\n parameters: {\n layout: 'fullscreen',\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof MediaPlayerMulti>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {\n args: {\n data: {\n items: testimonialItems,\n },\n },\n}\n\nexport const Multi: Story = {\n args: {\n data: {\n items: testimonialItems?.concat(testimonialItems),\n },\n },\n}\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,UAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAL,GACA,IAAAM,EAA6B,0DAE7B,MAAMC,EAAmB,CACvB,CACE,KAAM,QACN,YAAa,mCACb,MACE,mIACF,gBACE,+IACJ,EACA,CACE,KAAM,gBACN,YAAa,mCACb,MAAO,uEACP,gBACE,+IACJ,CACF,EAEMC,EAAO,CACX,MAAO,kCACP,UAAW,EAAAC,QACX,WAAY,CACV,OAAQ,YACV,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOL,EAAQI,EAGR,MAAMN,EAAiB,CAC5B,KAAM,CACJ,KAAM,CACJ,MAAOK,CACT,CACF,CACF,EAEaJ,EAAe,CAC1B,KAAM,CACJ,KAAM,CACJ,MAAOI,GAAkB,OAAOA,CAAgB,CAClD,CACF,CACF",
|
|
6
6
|
"names": ["mediaplayerMulti_stories_exports", "__export", "Default", "Multi", "mediaplayerMulti_stories_default", "__toCommonJS", "import_MediaPlayerMulti", "testimonialItems", "meta", "MediaPlayerMulti"]
|
|
7
7
|
}
|
package/dist/cjs/types/props.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var o=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var y=(t,e,p,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of i(e))!s.call(t,n)&&n!==p&&o(t,n,{get:()=>e[n],enumerable:!(r=a(e,n))||r.enumerable});return t};var g=t=>y(o({},"__esModule",{value:!0}),t);var l={};module.exports=g(l);
|
|
2
2
|
//# sourceMappingURL=props.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/types/props.ts"],
|
|
4
|
-
"sourcesContent": ["export interface ComponentCommonProps {\n style?: string\n event?: any\n condition?: any\n}\n\nexport type Theme = 'light' | 'dark'\nexport type Shape = 'rounded' | 'square'\nexport type Align = 'left' | 'center' | 'right'\n"],
|
|
4
|
+
"sourcesContent": ["export interface ComponentCommonProps {\n style?: string\n event?: any\n condition?: any\n className?: string\n}\n\nexport type Theme = 'light' | 'dark'\nexport type Shape = 'rounded' | 'square'\nexport type Align = 'left' | 'center' | 'right'\n"],
|
|
5
5
|
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
6
|
"names": ["props_exports", "__toCommonJS"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as r,jsxs as f}from"react/jsx-runtime";import{cn as s}from"../../helpers/utils.js";import h from"../../components/picture.js";import
|
|
1
|
+
"use client";import{jsx as r,jsxs as f}from"react/jsx-runtime";import{cn as s}from"../../helpers/utils.js";import h from"../../components/picture.js";import T from"../../components/button.js";import{useState as c,useEffect as x,useRef as m}from"react";function W(){const[i,l]=c(window?.innerWidth||0);return x(()=>{const a=()=>l(window?.innerWidth||0);return window?.addEventListener("resize",a),()=>window?.removeEventListener("resize",a)},[]),i<=768}const C=({products:i=[],className:l="",shape:a="square",itemShape:w="square",event:g,primaryButton:y=""})=>{const E=W(),[k,p]=c(null),[N,v]=c({}),b=m([]),d=m({}),u=m({}),L=(t,e)=>{e&&(b.current[t]=e)},F=t=>{if(u.current?.[t]){const e={...d.current,[t]:!0};v(e),d.current=e}};return x(()=>{const t=b.current;return t?.forEach((e,n)=>{e.addEventListener("transitionend",()=>F(n))}),()=>{t?.forEach((e,n)=>{e.removeEventListener("transitionend",()=>F(n))})}},[]),E?r("div",{className:s("flex h-[400px] w-full gap-4 overflow-x-auto",l),children:i?.map((t,e)=>r("div",{className:"shrink-0 grow-0 basis-[296px] border border-solid border-[#dddddd] bg-[#FFFFFF]",children:r(h,{className:"size-full object-cover [&_img]:h-full [&_img]:object-cover",source:t?.img})},e))}):r("div",{className:s("laptop:h-[448px] desktop:h-[560px] flex h-[336px] w-full gap-4 overflow-hidden",l),children:i?.map((t,e)=>{const n=k===e;return f("div",{style:{flex:n?6:1,transition:"all 0.3s ease-in-out"},ref:o=>{o&&L(e,o)},className:s("relative cursor-pointer overflow-hidden",w==="round"?"rounded-2xl":""),onMouseEnter:()=>{p(e),u.current[e]=!0},onMouseLeave:()=>{p(null);const o={...d.current,[e]:!1};v(o),d.current=o,u.current[e]=!1},children:[r(h,{source:t?.img,className:"size-full object-cover [&_img]:h-full [&_img]:object-cover"}),N?.[e]?f("div",{className:s("absolute inset-x-0 bottom-0 flex items-end justify-between overflow-hidden px-6 pb-6","transition-all delay-300 duration-[50ms]",n?"opacity-100":"opacity-0"),children:[f("div",{className:"mr-1 flex-1 overflow-hidden",children:[r("p",{className:"laptop:text-2xl desktop:text-[32px] mb-1 text-xl font-bold text-[#FFFFFF]",children:t?.title}),r("h3",{className:"desktop:text-lg text-sm font-medium text-[#FFFFFF]",children:t?.subTitle})]}),r(T,{size:"sm",hoverEffect:"slide",variant:"secondary",onClick:()=>g?.primaryButton?.onClick?.(t),className:s("desktop:text-base mb-1.5 overflow-hidden border-[#FFFFFF] bg-transparent text-sm font-bold text-[#FFFFFF]",a==="round"?"rounded-2xl":""),children:y})]}):null]},e)})})};var q=C;export{q as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/AccordionCards/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport Button from '../../components/button.js'\nimport { useState, useEffect, useRef } from 'react'\n\n/** Hook\uFF1A\u76D1\u542C\u7A97\u53E3\u5BBD\u5EA6 */\nfunction useWindowWidth() {\n const [width, setWidth] = useState(window?.innerWidth || 0)\n useEffect(() => {\n const onResize = () => setWidth(window?.innerWidth || 0)\n window?.addEventListener('resize', onResize)\n return () => window?.removeEventListener('resize', onResize)\n }, [])\n return width <= 768\n}\n\ntype AccordionCardsType = {\n products: Array<{\n /** \u6807\u9898\u6587\u672C */\n title: string\n /** \u56FE\u7247*/\n img: string\n /** \u5185\u5BB9\u8282\u70B9 */\n subTitle: string\n }>\n className?: string\n /** \u6309\u94AE\u5F62\u72B6 */\n shape?: 'round' | 'square'\n /** \u5361\u7247\u5F62\u72B6 */\n itemShape?: 'round' | 'square'\n /** \u4E3B\u6309\u94AE\u914D\u7F6E */\n primaryButton?: string\n /** \u6309\u94AE\u4E8B\u4EF6*/\n event?: {\n primaryButton?: {\n onClick: (v: any) => void\n }\n }\n}\n\nconst AccordionCards = ({\n products = [],\n className = '',\n shape = 'square',\n itemShape = 'square',\n event,\n primaryButton = '',\n}: AccordionCardsType) => {\n const isMobile = useWindowWidth()\n const [hoverIndex, setHoverIndex] = useState<number | null>(null)\n const [currentWidth, setCurrentWidth] = useState<{ [key: number]: boolean }>({})\n\n const accordionRef = useRef<HTMLDivElement[]>([])\n const refWidth = useRef<{ [key: number]: boolean }>({})\n const enterRef = useRef<{ [key: number]: boolean }>({})\n\n const getRef = (index: number, el: HTMLDivElement) => {\n if (el) {\n accordionRef.current[index] = el\n }\n }\n\n const handleTransitionEnd = (index: number) => {\n if (enterRef.current?.[index]) {\n const current = { ...refWidth.current, [index]: true }\n setCurrentWidth(current)\n refWidth.current = current\n }\n }\n\n useEffect(() => {\n const element = accordionRef.current\n element?.forEach((item, index) => {\n item.addEventListener('transitionend', () => handleTransitionEnd(index))\n })\n return () => {\n element?.forEach((item, index) => {\n item.removeEventListener('transitionend', () => handleTransitionEnd(index))\n })\n }\n }, [])\n\n // \u79FB\u52A8\u7AEF\n if (isMobile) {\n return (\n <div className={cn('flex h-[400px] w-full gap-4 overflow-x-auto', className)}>\n {products?.map((item, idx) => (\n <div key={idx} className=\"shrink-0 grow-0 basis-[296px] border border-solid border-[#dddddd] bg-[#FFFFFF]\">\n <Picture className=\"size-full object-cover [&_img]:h-full [&_img]:object-cover\" source={item?.img} />\n </div>\n ))}\n </div>\n )\n }\n\n // \u684C\u9762\u7AEF\n return (\n <div className={cn('laptop:h-[448px] desktop:h-[560px] flex h-[336px] w-full gap-4 overflow-hidden', className)}>\n {products?.map((item, idx) => {\n const isExpanded = hoverIndex === idx\n const flexValue = isExpanded ? 6 : 1\n return (\n <div\n key={idx}\n style={{\n flex: flexValue,\n transition: 'all 0.3s ease-in-out',\n }}\n ref={el => el
|
|
5
|
-
"mappings": "aAyFY,cAAAA,
|
|
4
|
+
"sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport Button from '../../components/button.js'\nimport { useState, useEffect, useRef } from 'react'\n\n/** Hook\uFF1A\u76D1\u542C\u7A97\u53E3\u5BBD\u5EA6 */\nfunction useWindowWidth() {\n const [width, setWidth] = useState(window?.innerWidth || 0)\n useEffect(() => {\n const onResize = () => setWidth(window?.innerWidth || 0)\n window?.addEventListener('resize', onResize)\n return () => window?.removeEventListener('resize', onResize)\n }, [])\n return width <= 768\n}\n\ntype AccordionCardsType = {\n products: Array<{\n /** \u6807\u9898\u6587\u672C */\n title: string\n /** \u56FE\u7247*/\n img: string\n /** \u5185\u5BB9\u8282\u70B9 */\n subTitle: string\n }>\n className?: string\n /** \u6309\u94AE\u5F62\u72B6 */\n shape?: 'round' | 'square'\n /** \u5361\u7247\u5F62\u72B6 */\n itemShape?: 'round' | 'square'\n /** \u4E3B\u6309\u94AE\u914D\u7F6E */\n primaryButton?: string\n /** \u6309\u94AE\u4E8B\u4EF6*/\n event?: {\n primaryButton?: {\n onClick: (v: any) => void\n }\n }\n}\n\nconst AccordionCards = ({\n products = [],\n className = '',\n shape = 'square',\n itemShape = 'square',\n event,\n primaryButton = '',\n}: AccordionCardsType) => {\n const isMobile = useWindowWidth()\n const [hoverIndex, setHoverIndex] = useState<number | null>(null)\n const [currentWidth, setCurrentWidth] = useState<{ [key: number]: boolean }>({})\n\n const accordionRef = useRef<HTMLDivElement[]>([])\n const refWidth = useRef<{ [key: number]: boolean }>({})\n const enterRef = useRef<{ [key: number]: boolean }>({})\n\n const getRef = (index: number, el: HTMLDivElement) => {\n if (el) {\n accordionRef.current[index] = el\n }\n }\n\n const handleTransitionEnd = (index: number) => {\n if (enterRef.current?.[index]) {\n const current = { ...refWidth.current, [index]: true }\n setCurrentWidth(current)\n refWidth.current = current\n }\n }\n\n useEffect(() => {\n const element = accordionRef.current\n element?.forEach((item, index) => {\n item.addEventListener('transitionend', () => handleTransitionEnd(index))\n })\n return () => {\n element?.forEach((item, index) => {\n item.removeEventListener('transitionend', () => handleTransitionEnd(index))\n })\n }\n }, [])\n\n // \u79FB\u52A8\u7AEF\n if (isMobile) {\n return (\n <div className={cn('flex h-[400px] w-full gap-4 overflow-x-auto', className)}>\n {products?.map((item, idx) => (\n <div key={idx} className=\"shrink-0 grow-0 basis-[296px] border border-solid border-[#dddddd] bg-[#FFFFFF]\">\n <Picture className=\"size-full object-cover [&_img]:h-full [&_img]:object-cover\" source={item?.img} />\n </div>\n ))}\n </div>\n )\n }\n\n // \u684C\u9762\u7AEF\n return (\n <div className={cn('laptop:h-[448px] desktop:h-[560px] flex h-[336px] w-full gap-4 overflow-hidden', className)}>\n {products?.map((item, idx) => {\n const isExpanded = hoverIndex === idx\n const flexValue = isExpanded ? 6 : 1\n return (\n <div\n key={idx}\n style={{\n flex: flexValue,\n transition: 'all 0.3s ease-in-out',\n }}\n ref={(el: HTMLDivElement | null) => {\n if (el) getRef(idx, el)\n }}\n className={cn('relative cursor-pointer overflow-hidden', itemShape === 'round' ? 'rounded-2xl' : '')}\n onMouseEnter={() => {\n setHoverIndex(idx)\n enterRef.current[idx] = true\n }}\n onMouseLeave={() => {\n setHoverIndex(null)\n const current = { ...refWidth.current, [idx]: false }\n setCurrentWidth(current)\n refWidth.current = current\n enterRef.current[idx] = false\n }}\n >\n <Picture source={item?.img} className=\"size-full object-cover [&_img]:h-full [&_img]:object-cover\" />\n {currentWidth?.[idx] ? (\n <div\n className={cn(\n 'absolute inset-x-0 bottom-0 flex items-end justify-between overflow-hidden px-6 pb-6',\n 'transition-all delay-300 duration-[50ms]',\n isExpanded ? 'opacity-100' : 'opacity-0'\n )}\n >\n <div className=\"mr-1 flex-1 overflow-hidden\">\n <p className=\"laptop:text-2xl desktop:text-[32px] mb-1 text-xl font-bold text-[#FFFFFF]\">\n {item?.title}\n </p>\n <h3 className=\"desktop:text-lg text-sm font-medium text-[#FFFFFF]\">{item?.subTitle}</h3>\n </div>\n <Button\n size=\"sm\"\n hoverEffect=\"slide\"\n variant=\"secondary\"\n onClick={() => event?.primaryButton?.onClick?.(item)}\n className={cn(\n 'desktop:text-base mb-1.5 overflow-hidden border-[#FFFFFF] bg-transparent text-sm font-bold text-[#FFFFFF]',\n shape === 'round' ? 'rounded-2xl' : ''\n )}\n >\n {primaryButton}\n </Button>\n </div>\n ) : null}\n </div>\n )\n })}\n </div>\n )\n}\n\nexport default AccordionCards\n"],
|
|
5
|
+
"mappings": "aAyFY,cAAAA,EA6CI,QAAAC,MA7CJ,oBAxFZ,OAAS,MAAAC,MAAU,yBACnB,OAAOC,MAAa,8BACpB,OAAOC,MAAY,6BACnB,OAAS,YAAAC,EAAU,aAAAC,EAAW,UAAAC,MAAc,QAG5C,SAASC,GAAiB,CACxB,KAAM,CAACC,EAAOC,CAAQ,EAAIL,EAAS,QAAQ,YAAc,CAAC,EAC1D,OAAAC,EAAU,IAAM,CACd,MAAMK,EAAW,IAAMD,EAAS,QAAQ,YAAc,CAAC,EACvD,eAAQ,iBAAiB,SAAUC,CAAQ,EACpC,IAAM,QAAQ,oBAAoB,SAAUA,CAAQ,CAC7D,EAAG,CAAC,CAAC,EACEF,GAAS,GAClB,CA0BA,MAAMG,EAAiB,CAAC,CACtB,SAAAC,EAAW,CAAC,EACZ,UAAAC,EAAY,GACZ,MAAAC,EAAQ,SACR,UAAAC,EAAY,SACZ,MAAAC,EACA,cAAAC,EAAgB,EAClB,IAA0B,CACxB,MAAMC,EAAWX,EAAe,EAC1B,CAACY,EAAYC,CAAa,EAAIhB,EAAwB,IAAI,EAC1D,CAACiB,EAAcC,CAAe,EAAIlB,EAAqC,CAAC,CAAC,EAEzEmB,EAAejB,EAAyB,CAAC,CAAC,EAC1CkB,EAAWlB,EAAmC,CAAC,CAAC,EAChDmB,EAAWnB,EAAmC,CAAC,CAAC,EAEhDoB,EAAS,CAACC,EAAeC,IAAuB,CAChDA,IACFL,EAAa,QAAQI,CAAK,EAAIC,EAElC,EAEMC,EAAuBF,GAAkB,CAC7C,GAAIF,EAAS,UAAUE,CAAK,EAAG,CAC7B,MAAMG,EAAU,CAAE,GAAGN,EAAS,QAAS,CAACG,CAAK,EAAG,EAAK,EACrDL,EAAgBQ,CAAO,EACvBN,EAAS,QAAUM,CACrB,CACF,EAeA,OAbAzB,EAAU,IAAM,CACd,MAAM0B,EAAUR,EAAa,QAC7B,OAAAQ,GAAS,QAAQ,CAACC,EAAML,IAAU,CAChCK,EAAK,iBAAiB,gBAAiB,IAAMH,EAAoBF,CAAK,CAAC,CACzE,CAAC,EACM,IAAM,CACXI,GAAS,QAAQ,CAACC,EAAML,IAAU,CAChCK,EAAK,oBAAoB,gBAAiB,IAAMH,EAAoBF,CAAK,CAAC,CAC5E,CAAC,CACH,CACF,EAAG,CAAC,CAAC,EAGDT,EAEAnB,EAAC,OAAI,UAAWE,EAAG,8CAA+CY,CAAS,EACxE,SAAAD,GAAU,IAAI,CAACoB,EAAMC,IACpBlC,EAAC,OAAc,UAAU,kFACvB,SAAAA,EAACG,EAAA,CAAQ,UAAU,6DAA6D,OAAQ8B,GAAM,IAAK,GAD3FC,CAEV,CACD,EACH,EAMFlC,EAAC,OAAI,UAAWE,EAAG,iFAAkFY,CAAS,EAC3G,SAAAD,GAAU,IAAI,CAACoB,EAAMC,IAAQ,CAC5B,MAAMC,EAAaf,IAAec,EAElC,OACEjC,EAAC,OAEC,MAAO,CACL,KALYkC,EAAa,EAAI,EAM7B,WAAY,sBACd,EACA,IAAMN,GAA8B,CAC9BA,GAAIF,EAAOO,EAAKL,CAAE,CACxB,EACA,UAAW3B,EAAG,0CAA2Cc,IAAc,QAAU,cAAgB,EAAE,EACnG,aAAc,IAAM,CAClBK,EAAca,CAAG,EACjBR,EAAS,QAAQQ,CAAG,EAAI,EAC1B,EACA,aAAc,IAAM,CAClBb,EAAc,IAAI,EAClB,MAAMU,EAAU,CAAE,GAAGN,EAAS,QAAS,CAACS,CAAG,EAAG,EAAM,EACpDX,EAAgBQ,CAAO,EACvBN,EAAS,QAAUM,EACnBL,EAAS,QAAQQ,CAAG,EAAI,EAC1B,EAEA,UAAAlC,EAACG,EAAA,CAAQ,OAAQ8B,GAAM,IAAK,UAAU,6DAA6D,EAClGX,IAAeY,CAAG,EACjBjC,EAAC,OACC,UAAWC,EACT,uFACA,2CACAiC,EAAa,cAAgB,WAC/B,EAEA,UAAAlC,EAAC,OAAI,UAAU,8BACb,UAAAD,EAAC,KAAE,UAAU,4EACV,SAAAiC,GAAM,MACT,EACAjC,EAAC,MAAG,UAAU,qDAAsD,SAAAiC,GAAM,SAAS,GACrF,EACAjC,EAACI,EAAA,CACC,KAAK,KACL,YAAY,QACZ,QAAQ,YACR,QAAS,IAAMa,GAAO,eAAe,UAAUgB,CAAI,EACnD,UAAW/B,EACT,4GACAa,IAAU,QAAU,cAAgB,EACtC,EAEC,SAAAG,EACH,GACF,EACE,OAjDCgB,CAkDP,CAEJ,CAAC,EACH,CAEJ,EAEA,IAAOE,EAAQxB",
|
|
6
6
|
"names": ["jsx", "jsxs", "cn", "Picture", "Button", "useState", "useEffect", "useRef", "useWindowWidth", "width", "setWidth", "onResize", "AccordionCards", "products", "className", "shape", "itemShape", "event", "primaryButton", "isMobile", "hoverIndex", "setHoverIndex", "currentWidth", "setCurrentWidth", "accordionRef", "refWidth", "enterRef", "getRef", "index", "el", "handleTransitionEnd", "current", "element", "item", "idx", "isExpanded", "AccordionCards_default"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as a}from"react/jsx-runtime";import
|
|
1
|
+
"use client";import{jsx as e,jsxs as a}from"react/jsx-runtime";import p from"react";import{Button as c,Heading as y,Picture as k,Text as d}from"../../components/index.js";import{cn as t}from"../../helpers/index.js";import{withStyles as w}from"../../shared/Styles.js";const u=p.forwardRef(({data:g,className:f},h)=>{const{title:n,subtitle:x,background:v,primaryButton:o,secondaryButton:s,theme:r="light",products:l=[]}=g,i=r==="dark"?"text-white":"text-[#1D1D1F]",b=r==="dark"?"bg-white":"bg-[#1D1D1F]";return a("div",{"data-ui-component-id":"HeroBanner",ref:h,className:t(r==="dark"?"aiui-dark":"","lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] relative aspect-[390/660] w-full overflow-hidden",f),children:[e(k,{className:"laptop:w-full absolute h-full",imgClassName:"h-full object-cover",source:v}),a("div",{className:"laptop:top-1/2 laptop:-translate-y-1/2 relative top-[30%] z-10 flex flex-col gap-8 px-32",children:[n&&a("div",{className:"max-w-[686px] space-y-4",children:[e(y,{as:"h1",size:5,className:t("hero-banner-title",i),html:n}),e(d,{className:t("hero-banner-subtitle text-lg font-medium leading-[1.2] tracking-[-0.02em]",i),html:x})]}),a("div",{className:"flex items-center gap-4",children:[s&&e(c,{size:"lg",variant:"primary",className:"hero-banner-primary-button",...s,children:s.text}),o&&e(c,{size:"lg",variant:"secondary",...o,className:"hero-banner-secondary-button",children:o.text})]})]}),l.length>0&&e("div",{className:"absolute bottom-0 z-10 flex items-center gap-3 px-32 pb-6",children:l.map((N,m)=>a(p.Fragment,{children:[e(d,{className:t("hero-banner-product-text text-sm font-medium leading-[1.2] tracking-[-0.02em]",r==="dark"?"text-white":"text-[#1D1D1F]"),children:N.title}),m<l.length-1&&e("div",{className:t("h-4 w-px",b)})]},m))})]})});u.displayName="HeroBanner";var C=w(u);export{C as default};
|
|
2
2
|
//# sourceMappingURL=HeroBanner.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/HeroBanner/HeroBanner.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React from 'react'\nimport type { HeroBannerProps } from './types.js'\nimport { Button, Heading, Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\nimport { withStyles } from '../../shared/Styles.js'\n\nconst HeroBanner = React.forwardRef<HTMLDivElement, HeroBannerProps>(({ data, className }, ref) => {\n const { title, subtitle, background, primaryButton, secondaryButton, theme = 'light', products = [] } = data\n const textColorClass = theme === 'dark' ? 'text-white' : 'text-[#1D1D1F]'\n const dividerColorClass = theme === 'dark' ? 'bg-white' : 'bg-[#1D1D1F]'\n\n return (\n <div\n data-ui-component-id=\"HeroBanner\"\n ref={ref}\n className={cn(\n theme === 'dark' ? 'aiui-dark' : '',\n 'lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] relative aspect-[390/660] w-full overflow-hidden',\n className\n )}\n >\n <Picture className=\"laptop:w-full absolute h-full\" imgClassName=\"h-full object-cover\" source={background} />\n {/* \u5185\u5BB9\u533A\u57DF */}\n <div className=\"laptop:top-1/2 laptop:-translate-y-1/2 relative top-[30%] z-10 flex flex-col gap-8 px-32\">\n <div className=\"max-w-[686px] space-y-4\">\n
|
|
5
|
-
"mappings": "aAsBM,cAAAA,
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React from 'react'\nimport type { HeroBannerProps } from './types.js'\nimport { Button, Heading, Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\nimport { withStyles } from '../../shared/Styles.js'\n\nconst HeroBanner = React.forwardRef<HTMLDivElement, HeroBannerProps>(({ data, className }, ref) => {\n const { title, subtitle, background, primaryButton, secondaryButton, theme = 'light', products = [] } = data\n const textColorClass = theme === 'dark' ? 'text-white' : 'text-[#1D1D1F]'\n const dividerColorClass = theme === 'dark' ? 'bg-white' : 'bg-[#1D1D1F]'\n\n return (\n <div\n data-ui-component-id=\"HeroBanner\"\n ref={ref}\n className={cn(\n theme === 'dark' ? 'aiui-dark' : '',\n 'lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] relative aspect-[390/660] w-full overflow-hidden',\n className\n )}\n >\n <Picture className=\"laptop:w-full absolute h-full\" imgClassName=\"h-full object-cover\" source={background} />\n {/* \u5185\u5BB9\u533A\u57DF */}\n <div className=\"laptop:top-1/2 laptop:-translate-y-1/2 relative top-[30%] z-10 flex flex-col gap-8 px-32\">\n {title && (\n <div className=\"max-w-[686px] space-y-4\">\n <Heading as=\"h1\" size={5} className={cn('hero-banner-title', textColorClass)} html={title} />\n <Text\n className={cn(\n 'hero-banner-subtitle text-lg font-medium leading-[1.2] tracking-[-0.02em]',\n textColorClass\n )}\n html={subtitle}\n />\n </div>\n )}\n {/* \u6309\u94AE\u7EC4 */}\n <div className=\"flex items-center gap-4\">\n {secondaryButton && (\n <Button size=\"lg\" variant=\"primary\" className=\"hero-banner-primary-button\" {...secondaryButton}>\n {secondaryButton.text}\n </Button>\n )}\n {primaryButton && (\n <Button size=\"lg\" variant=\"secondary\" {...primaryButton} className=\"hero-banner-secondary-button\">\n {primaryButton.text}\n </Button>\n )}\n </div>\n </div>\n\n {/* \u5E95\u90E8\u4EA7\u54C1\u5217\u8868 */}\n {products.length > 0 && (\n <div className=\"absolute bottom-0 z-10 flex items-center gap-3 px-32 pb-6\">\n {products.map((product, index) => (\n <React.Fragment key={index}>\n <Text\n className={cn(\n 'hero-banner-product-text text-sm font-medium leading-[1.2] tracking-[-0.02em]',\n theme === 'dark' ? 'text-white' : 'text-[#1D1D1F]'\n )}\n >\n {product.title}\n </Text>\n {index < products.length - 1 && <div className={cn('h-4 w-px', dividerColorClass)} />}\n </React.Fragment>\n ))}\n </div>\n )}\n </div>\n )\n})\n\nHeroBanner.displayName = 'HeroBanner'\n\nexport default withStyles(HeroBanner)\n"],
|
|
5
|
+
"mappings": "aAsBM,cAAAA,EAII,QAAAC,MAJJ,oBArBN,OAAOC,MAAW,QAElB,OAAS,UAAAC,EAAQ,WAAAC,EAAS,WAAAC,EAAS,QAAAC,MAAY,4BAC/C,OAAS,MAAAC,MAAU,yBACnB,OAAS,cAAAC,MAAkB,yBAE3B,MAAMC,EAAaP,EAAM,WAA4C,CAAC,CAAE,KAAAQ,EAAM,UAAAC,CAAU,EAAGC,IAAQ,CACjG,KAAM,CAAE,MAAAC,EAAO,SAAAC,EAAU,WAAAC,EAAY,cAAAC,EAAe,gBAAAC,EAAiB,MAAAC,EAAQ,QAAS,SAAAC,EAAW,CAAC,CAAE,EAAIT,EAClGU,EAAiBF,IAAU,OAAS,aAAe,iBACnDG,EAAoBH,IAAU,OAAS,WAAa,eAE1D,OACEjB,EAAC,OACC,uBAAqB,aACrB,IAAKW,EACL,UAAWL,EACTW,IAAU,OAAS,YAAc,GACjC,2JACAP,CACF,EAEA,UAAAX,EAACK,EAAA,CAAQ,UAAU,gCAAgC,aAAa,sBAAsB,OAAQU,EAAY,EAE1Gd,EAAC,OAAI,UAAU,2FACZ,UAAAY,GACCZ,EAAC,OAAI,UAAU,0BACb,UAAAD,EAACI,EAAA,CAAQ,GAAG,KAAK,KAAM,EAAG,UAAWG,EAAG,oBAAqBa,CAAc,EAAG,KAAMP,EAAO,EAC3Fb,EAACM,EAAA,CACC,UAAWC,EACT,4EACAa,CACF,EACA,KAAMN,EACR,GACF,EAGFb,EAAC,OAAI,UAAU,0BACZ,UAAAgB,GACCjB,EAACG,EAAA,CAAO,KAAK,KAAK,QAAQ,UAAU,UAAU,6BAA8B,GAAGc,EAC5E,SAAAA,EAAgB,KACnB,EAEDD,GACChB,EAACG,EAAA,CAAO,KAAK,KAAK,QAAQ,YAAa,GAAGa,EAAe,UAAU,+BAChE,SAAAA,EAAc,KACjB,GAEJ,GACF,EAGCG,EAAS,OAAS,GACjBnB,EAAC,OAAI,UAAU,4DACZ,SAAAmB,EAAS,IAAI,CAACG,EAASC,IACtBtB,EAACC,EAAM,SAAN,CACC,UAAAF,EAACM,EAAA,CACC,UAAWC,EACT,gFACAW,IAAU,OAAS,aAAe,gBACpC,EAEC,SAAAI,EAAQ,MACX,EACCC,EAAQJ,EAAS,OAAS,GAAKnB,EAAC,OAAI,UAAWO,EAAG,WAAYc,CAAiB,EAAG,IAThEE,CAUrB,CACD,EACH,GAEJ,CAEJ,CAAC,EAEDd,EAAW,YAAc,aAEzB,IAAOe,EAAQhB,EAAWC,CAAU",
|
|
6
6
|
"names": ["jsx", "jsxs", "React", "Button", "Heading", "Picture", "Text", "cn", "withStyles", "HeroBanner", "data", "className", "ref", "title", "subtitle", "background", "primaryButton", "secondaryButton", "theme", "products", "textColorClass", "dividerColorClass", "product", "index", "HeroBanner_default"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as a,jsxs as s}from"react/jsx-runtime";import{useState as m,useRef as n}from"react";import{cn as x}from"../../helpers/utils.js";import{withStyles as u}from"../../shared/Styles.js";import f from"../../components/picture.js";import b from"../../components/button.js";const y=({className:o="",data:{title:p,videoTitle:r,btnText:i,img:c,media:d}})=>{const[t,l]=m(!1),e=n(null);return s("div",{className:x(" relative w-full",o),children:[s("div",{className:"media-content absolute left-1/2 top-1/2 z-10 flex -translate-x-1/2 -translate-y-1/2 flex-col items-center gap-5",children:[a("div",{className:"lg-desktop:text-[64px] text-center text-[40px] font-bold text-white lg:text-5xl",dangerouslySetInnerHTML:{__html:t?r:p}}),!t&&a(b,{className:"member-equity-button-primary lg-desktop:px-7 lg-desktop:py-[14px] lg-desktop:text-base tablet:px-5 tablet:py-[10px] tablet:text-sm desktop:px-6 desktop:py-[11px] desktop:text-sm mx-auto border border-white bg-transparent px-4 py-2 text-xs text-white hover:bg-white hover:text-black lg:px-7 lg:py-[12px] lg:text-base",variant:"primary",onClick:()=>{t?(e.current&&e.current.pause(),l(!1)):(e.current&&e.current.play(),l(!0))},children:i})]}),s("div",{className:"media-cover lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] lg:aspect-w-[1440] lg:aspect-h-[700] desktop:aspect-w-[1024] desktop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660] relative overflow-hidden",children:[a("video",{ref:e,className:"size-full object-cover",src:d,muted:!0,loop:!0}),!t&&a(f,{className:"z-1 absolute left-0 top-0 size-full object-cover",source:c})]})]})};var N=u(y);export{N as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/MediaPlayerBase/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React, { useState, useRef } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport Picture from '../../components/picture.js'\nimport Button from '../../components/button.js'\nimport type { MediaPlayerBaseProps } from './types.js'\n\nconst MediaPlayerBase: React.FC<MediaPlayerBaseProps> = ({\n className = '',\n title
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React, { useState, useRef } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport Picture from '../../components/picture.js'\nimport Button from '../../components/button.js'\n// import { convertLexicalToHTML } from '@payloadcms/richtext-lexical/dist/exports/html/index.js'\nimport type { MediaPlayerBaseProps } from './types.js'\n\nconst MediaPlayerBase: React.FC<MediaPlayerBaseProps> = ({\n className = '',\n data: { title, videoTitle, btnText, img, media },\n}) => {\n const [isPlaying, setIsPlaying] = useState(false)\n const videoRef = useRef<HTMLVideoElement>(null)\n\n // const title_html = typeof title === 'string' ? title : convertLexicalToHTML({ data: title })\n // const videoTitle_html = typeof videoTitle === 'string' ? videoTitle : convertLexicalToHTML({ data: videoTitle })\n\n return (\n <div className={cn(' relative w-full', className)}>\n <div className=\"media-content absolute left-1/2 top-1/2 z-10 flex -translate-x-1/2 -translate-y-1/2 flex-col items-center gap-5\">\n <div\n className=\"lg-desktop:text-[64px] text-center text-[40px] font-bold text-white lg:text-5xl\"\n dangerouslySetInnerHTML={{ __html: isPlaying ? videoTitle : title }}\n />\n {!isPlaying && (\n <Button\n className=\"member-equity-button-primary lg-desktop:px-7 lg-desktop:py-[14px] lg-desktop:text-base tablet:px-5 tablet:py-[10px] tablet:text-sm desktop:px-6 desktop:py-[11px] desktop:text-sm mx-auto border border-white bg-transparent px-4 py-2 text-xs text-white hover:bg-white hover:text-black lg:px-7 lg:py-[12px] lg:text-base\"\n variant=\"primary\"\n onClick={() => {\n if (isPlaying) {\n if (videoRef.current) {\n videoRef.current.pause()\n }\n setIsPlaying(false)\n } else {\n if (videoRef.current) {\n videoRef.current.play()\n }\n setIsPlaying(true)\n }\n }}\n >\n {btnText}\n </Button>\n )}\n </div>\n <div className=\"media-cover lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] lg:aspect-w-[1440] lg:aspect-h-[700] desktop:aspect-w-[1024] desktop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660] relative overflow-hidden\">\n <video ref={videoRef} className=\"size-full object-cover\" src={media} muted loop />\n {!isPlaying && <Picture className=\"z-1 absolute left-0 top-0 size-full object-cover\" source={img} />}\n </div>\n </div>\n )\n}\n\nexport default withStyles(MediaPlayerBase)\n"],
|
|
5
|
+
"mappings": "aAqBM,OACE,OAAAA,EADF,QAAAC,MAAA,oBApBN,OAAgB,YAAAC,EAAU,UAAAC,MAAc,QACxC,OAAS,MAAAC,MAAU,yBACnB,OAAS,cAAAC,MAAkB,yBAC3B,OAAOC,MAAa,8BACpB,OAAOC,MAAY,6BAInB,MAAMC,EAAkD,CAAC,CACvD,UAAAC,EAAY,GACZ,KAAM,CAAE,MAAAC,EAAO,WAAAC,EAAY,QAAAC,EAAS,IAAAC,EAAK,MAAAC,CAAM,CACjD,IAAM,CACJ,KAAM,CAACC,EAAWC,CAAY,EAAId,EAAS,EAAK,EAC1Ce,EAAWd,EAAyB,IAAI,EAK9C,OACEF,EAAC,OAAI,UAAWG,EAAG,mBAAoBK,CAAS,EAC9C,UAAAR,EAAC,OAAI,UAAU,kHACb,UAAAD,EAAC,OACC,UAAU,kFACV,wBAAyB,CAAE,OAAQe,EAAYJ,EAAaD,CAAM,EACpE,EACC,CAACK,GACAf,EAACO,EAAA,CACC,UAAU,8TACV,QAAQ,UACR,QAAS,IAAM,CACTQ,GACEE,EAAS,SACXA,EAAS,QAAQ,MAAM,EAEzBD,EAAa,EAAK,IAEdC,EAAS,SACXA,EAAS,QAAQ,KAAK,EAExBD,EAAa,EAAI,EAErB,EAEC,SAAAJ,EACH,GAEJ,EACAX,EAAC,OAAI,UAAU,0PACb,UAAAD,EAAC,SAAM,IAAKiB,EAAU,UAAU,yBAAyB,IAAKH,EAAO,MAAK,GAAC,KAAI,GAAC,EAC/E,CAACC,GAAaf,EAACM,EAAA,CAAQ,UAAU,mDAAmD,OAAQO,EAAK,GACpG,GACF,CAEJ,EAEA,IAAOK,EAAQb,EAAWG,CAAe",
|
|
6
6
|
"names": ["jsx", "jsxs", "useState", "useRef", "cn", "withStyles", "Picture", "Button", "MediaPlayerBase", "className", "title", "videoTitle", "btnText", "img", "media", "isPlaying", "setIsPlaying", "videoRef", "MediaPlayerBase_default"]
|
|
7
7
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import type
|
|
2
|
-
export interface MediaPlayerBaseProps {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
style?: {
|
|
10
|
-
[key: string]: React.CSSProperties;
|
|
1
|
+
import type { ComponentCommonProps } from '../../types/props.js';
|
|
2
|
+
export interface MediaPlayerBaseProps extends ComponentCommonProps {
|
|
3
|
+
data: {
|
|
4
|
+
title: string;
|
|
5
|
+
videoTitle: string;
|
|
6
|
+
btnText: string;
|
|
7
|
+
img: string;
|
|
8
|
+
media: string;
|
|
11
9
|
};
|
|
12
10
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as l}from"react/jsx-runtime";import"react";import{cn as
|
|
1
|
+
"use client";import{jsx as e,jsxs as l}from"react/jsx-runtime";import"react";import{cn as s}from"../../helpers/utils.js";import{withStyles as d}from"../../shared/Styles.js";import{Picture as m}from"../../components/index.js";import r from"../Title/index.js";const c=({data:{items:o=[],title:a},className:i=""})=>l("div",{className:i,children:[a&&e(r,{data:{title:a}}),e("div",{className:s("flex gap-4 overflow-x-auto",i),children:o.map((t,p)=>l("div",{className:s("w-swiper-1/2 tablet:flex-row flex shrink-0 flex-col overflow-hidden","lg-desktop:h-[480px] desktop:h-[384px] laptop:h-[360px] h-[360px]"),children:[l("div",{className:"tablet:w-[49%] relative w-full flex-none",children:[e(m,{source:t.backgroundImage,alt:t.name,className:"size-full",imgClassName:"w-full h-full object-cover"}),e("div",{className:"absolute bottom-6 right-6 flex items-center justify-center",children:e("div",{className:"tablet:size-12 flex size-10 items-center justify-center rounded-full bg-white bg-opacity-20",children:e("svg",{width:"12",height:"14",viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M12 7L0 14L0 0L12 7Z",fill:"white"})})})})]}),l("div",{className:"tablet:gap-[60px] tablet:p-6 flex flex-col gap-[30px] bg-white p-4",children:[l("div",{className:"flex flex-col gap-2",children:[e("h3",{className:"lg-desktop:text-lg text-sm font-medium leading-[1.2] tracking-[-0.02em] text-[#1D1D1F]",children:t.name}),e("p",{className:"lg-desktop:text-lg text-sm font-medium leading-[1.2] tracking-[-0.02em] text-[#1D1D1F]",children:t.description})]}),e("p",{className:"lg-desktop:text-2xl text-lg font-bold leading-[1.2] tracking-[-0.04em] text-[#1D1D1F]",children:t.quote})]})]},p))})]});var u=d(c);export{u as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/MediaPlayerMulti/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport Picture from '../../components/
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["jsx", "jsxs", "cn", "withStyles", "Picture", "MediaPlayerMulti", "items", "
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport { Picture } from '../../components/index.js'\nimport Title from '../Title/index.js'\n\nimport type { TestimonialSectionProps } from './types.js'\n\nconst MediaPlayerMulti: React.FC<TestimonialSectionProps> = ({ data: { items = [], title }, className = '' }) => {\n return (\n <div className={className}>\n {title && <Title data={{ title }} />}\n <div className={cn('flex gap-4 overflow-x-auto', className)}>\n {items.map((item, index) => (\n <div\n key={index}\n className={cn(\n 'w-swiper-1/2 tablet:flex-row flex shrink-0 flex-col overflow-hidden',\n 'lg-desktop:h-[480px] desktop:h-[384px] laptop:h-[360px] h-[360px]'\n )}\n >\n <div className=\"tablet:w-[49%] relative w-full flex-none\">\n <Picture\n source={item.backgroundImage}\n alt={item.name}\n className=\"size-full\"\n imgClassName=\"w-full h-full object-cover\"\n />\n <div className=\"absolute bottom-6 right-6 flex items-center justify-center\">\n <div className=\"tablet:size-12 flex size-10 items-center justify-center rounded-full bg-white bg-opacity-20\">\n <svg width=\"12\" height=\"14\" viewBox=\"0 0 12 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 7L0 14L0 0L12 7Z\" fill=\"white\" />\n </svg>\n </div>\n </div>\n </div>\n\n <div className=\"tablet:gap-[60px] tablet:p-6 flex flex-col gap-[30px] bg-white p-4\">\n <div className=\"flex flex-col gap-2\">\n <h3 className=\"lg-desktop:text-lg text-sm font-medium leading-[1.2] tracking-[-0.02em] text-[#1D1D1F]\">\n {item.name}\n </h3>\n <p className=\"lg-desktop:text-lg text-sm font-medium leading-[1.2] tracking-[-0.02em] text-[#1D1D1F]\">\n {item.description}\n </p>\n </div>\n\n <p className=\"lg-desktop:text-2xl text-lg font-bold leading-[1.2] tracking-[-0.04em] text-[#1D1D1F]\">\n {item.quote}\n </p>\n </div>\n </div>\n ))}\n </div>\n </div>\n )\n}\n\nexport default withStyles(MediaPlayerMulti)\n"],
|
|
5
|
+
"mappings": "aAYgB,cAAAA,EAUJ,QAAAC,MAVI,oBAXhB,MAAkB,QAClB,OAAS,MAAAC,MAAU,yBACnB,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,WAAAC,MAAe,4BACxB,OAAOC,MAAW,oBAIlB,MAAMC,EAAsD,CAAC,CAAE,KAAM,CAAE,MAAAC,EAAQ,CAAC,EAAG,MAAAC,CAAM,EAAG,UAAAC,EAAY,EAAG,IAEvGR,EAAC,OAAI,UAAWQ,EACb,UAAAD,GAASR,EAACK,EAAA,CAAM,KAAM,CAAE,MAAAG,CAAM,EAAG,EAClCR,EAAC,OAAI,UAAWE,EAAG,6BAA8BO,CAAS,EACvD,SAAAF,EAAM,IAAI,CAACG,EAAMC,IAChBV,EAAC,OAEC,UAAWC,EACT,sEACA,mEACF,EAEA,UAAAD,EAAC,OAAI,UAAU,2CACb,UAAAD,EAACI,EAAA,CACC,OAAQM,EAAK,gBACb,IAAKA,EAAK,KACV,UAAU,YACV,aAAa,6BACf,EACAV,EAAC,OAAI,UAAU,6DACb,SAAAA,EAAC,OAAI,UAAU,8FACb,SAAAA,EAAC,OAAI,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,6BAChE,SAAAA,EAAC,QAAK,EAAE,uBAAuB,KAAK,QAAQ,EAC9C,EACF,EACF,GACF,EAEAC,EAAC,OAAI,UAAU,qEACb,UAAAA,EAAC,OAAI,UAAU,sBACb,UAAAD,EAAC,MAAG,UAAU,yFACX,SAAAU,EAAK,KACR,EACAV,EAAC,KAAE,UAAU,yFACV,SAAAU,EAAK,YACR,GACF,EAEAV,EAAC,KAAE,UAAU,wFACV,SAAAU,EAAK,MACR,GACF,IAnCKC,CAoCP,CACD,EACH,GACF,EAIJ,IAAOC,EAAQT,EAAWG,CAAgB",
|
|
6
|
+
"names": ["jsx", "jsxs", "cn", "withStyles", "Picture", "Title", "MediaPlayerMulti", "items", "title", "className", "item", "index", "MediaPlayerMulti_default"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as t,jsxs as
|
|
1
|
+
import{jsx as t,jsxs as o}from"react/jsx-runtime";import u from"react";import{withStyles as f}from"../../shared/Styles.js";import h from"../../components/picture.js";import n from"../../components/button.js";import{Heading as c}from"../../components/heading.js";import{Text as k}from"../../components/text.js";import{Carousel as x,CarouselContent as y,CarouselItem as v}from"../../components/carousel.js";import{Grid as N,GridItem as g}from"../../components/gird.js";const d=({item:s})=>{const{theme:l="light",title:r,description:m,imageUrl:a,primaryBtn:i,secondaryBtn:e}=s;return o("div",{className:`item-wrapper relative w-full border ${l==="dark"?"aiui-dark":"aiui-light"}`,children:[t(h,{source:a,className:"inset-0"}),o("div",{className:"laptop:p-6 desktop:p-[32px] absolute inset-x-0 bottom-0 flex flex-col gap-6 p-3",children:[o("div",{children:[t(c,{className:"item-title",children:r}),t(k,{className:"item-description",children:m})]}),o("div",{className:"flex gap-2",children:[i&&t(n,{variant:"primary",asChild:!0,children:t("a",{href:i.link,children:i.text})}),e&&t(n,{variant:"secondary",asChild:!0,children:t("a",{href:e.link,children:e.text})})]})]})]})},B=u.forwardRef((s,l)=>{const{sectionTitle:r,items:m=[],carousel:a}=s.data,i=e=>{switch(e){case"full":return 12;case"half":return 6;case"one-third":return 4}};return o("section",{"data-ui-component-id":"MultiLayoutGraphicBlock",ref:l,className:"",children:[r&&t(c,{className:"section-title desktop:mb-[32px] mb-[34px]",as:"h1",size:5,children:r}),t(N,{className:"w-full",children:m.map((e,p)=>t(g,{span:i(e.width),children:t(d,{item:e})},p))}),a&&a?.items.length>0?t(x,{className:"laptop:mt-4 mt-3",children:t(y,{className:"flex",children:a.items.map((e,p)=>t(v,{className:"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5",children:t(d,{item:e})},p))})}):null]})});var T=f(B);export{T as default};
|
|
2
2
|
//# sourceMappingURL=MultiLayoutGraphicBlock.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react'\nimport type { MultiLayoutGraphicBlockProps, Item } from './types'\nimport { withStyles } from '../../shared/Styles.js'\nimport Picture from '../../components/picture.js'\nimport Button from '../../components/button.js'\nimport { Heading } from '../../components/heading.js'\nimport { Text } from '../../components/text.js'\nimport { Carousel, CarouselContent, CarouselItem } from '../../components/carousel.js'\nimport { Grid, GridItem } from '../../components/gird.js'\n\nconst ItemBlock = ({ item }: { item: Item }) => {\n const { theme, title, description, imageUrl, primaryBtn, secondaryBtn } = item\n\n return (\n <div className={`item-wrapper relative w-full border ${theme === 'dark' ? 'aiui-dark' : 'aiui-light'}`}>\n <Picture source={imageUrl} className=\"inset-0\" />\n <div className=\"laptop:p-6 desktop:p-[32px] absolute inset-x-0 bottom-0 flex flex-col gap-6 p-3\">\n <div>\n <Heading className=\"item-title\">{title}</Heading>\n <Text className=\"item-description\">{description}</Text>\n </div>\n <div className=\"flex gap-2\">\n <Button variant=\"primary\">{primaryBtn.text}</Button>\n <Button variant=\"secondary\">{secondaryBtn.text}</Button>\n </div>\n </div>\n </div>\n )\n}\n\nconst MultiLayoutGraphicBlock = React.forwardRef<HTMLDivElement, MultiLayoutGraphicBlockProps>((props, ref) => {\n const { items = [], carousel } = props.data\n\n const getSpan = (width: 'full' | 'half' | 'one-third') => {\n switch (width) {\n case 'full':\n return 12\n case 'half':\n return 6\n case 'one-third':\n return 4\n }\n }\n\n return (\n <section data-ui-component-id=\"MultiLayoutGraphicBlock\" ref={ref} className=\"\">\n <Grid className=\"w-full\">\n {items.map((item, index) => (\n <GridItem key={index} span={getSpan(item.width)}>\n <ItemBlock item={item} />\n </GridItem>\n ))}\n </Grid>\n {carousel?.items.length > 0 ? (\n <Carousel className=\"laptop:mt-4 mt-3\">\n <CarouselContent className=\"flex\">\n {carousel.items.map((item, index) => (\n <CarouselItem key={index} className=\"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5\">\n <ItemBlock item={item} />\n </CarouselItem>\n ))}\n </CarouselContent>\n </Carousel>\n ) : null}\n </section>\n )\n})\n\nexport default withStyles(MultiLayoutGraphicBlock)\n"],
|
|
5
|
-
"mappings": "AAeM,cAAAA,EAEE,QAAAC,MAFF,oBAfN,OAAOC,MAAW,QAElB,OAAS,cAAAC,MAAkB,yBAC3B,OAAOC,MAAa,8BACpB,OAAOC,MAAY,6BACnB,OAAS,WAAAC,MAAe,8BACxB,OAAS,QAAAC,MAAY,2BACrB,OAAS,YAAAC,EAAU,mBAAAC,EAAiB,gBAAAC,MAAoB,+BACxD,OAAS,QAAAC,EAAM,YAAAC,MAAgB,2BAE/B,MAAMC,EAAY,CAAC,CAAE,KAAAC,CAAK,IAAsB,CAC9C,KAAM,CAAE,MAAAC,
|
|
6
|
-
"names": ["jsx", "jsxs", "React", "withStyles", "Picture", "Button", "Heading", "Text", "Carousel", "CarouselContent", "CarouselItem", "Grid", "GridItem", "ItemBlock", "item", "theme", "title", "description", "imageUrl", "primaryBtn", "secondaryBtn", "MultiLayoutGraphicBlock", "props", "ref", "items", "carousel", "getSpan", "width", "index", "MultiLayoutGraphicBlock_default"]
|
|
4
|
+
"sourcesContent": ["import React from 'react'\nimport type { MultiLayoutGraphicBlockProps, Item } from './types'\nimport { withStyles } from '../../shared/Styles.js'\nimport Picture from '../../components/picture.js'\nimport Button from '../../components/button.js'\nimport { Heading } from '../../components/heading.js'\nimport { Text } from '../../components/text.js'\nimport { Carousel, CarouselContent, CarouselItem } from '../../components/carousel.js'\nimport { Grid, GridItem } from '../../components/gird.js'\n\nconst ItemBlock = ({ item }: { item: Item }) => {\n const { theme = 'light', title, description, imageUrl, primaryBtn, secondaryBtn } = item\n\n return (\n <div className={`item-wrapper relative w-full border ${theme === 'dark' ? 'aiui-dark' : 'aiui-light'}`}>\n <Picture source={imageUrl} className=\"inset-0\" />\n <div className=\"laptop:p-6 desktop:p-[32px] absolute inset-x-0 bottom-0 flex flex-col gap-6 p-3\">\n <div>\n <Heading className=\"item-title\">{title}</Heading>\n <Text className=\"item-description\">{description}</Text>\n </div>\n <div className=\"flex gap-2\">\n {primaryBtn && (\n <Button variant=\"primary\" asChild>\n <a href={primaryBtn.link}>{primaryBtn.text}</a>\n </Button>\n )}\n {secondaryBtn && (\n <Button variant=\"secondary\" asChild>\n <a href={secondaryBtn.link}>{secondaryBtn.text}</a>\n </Button>\n )}\n </div>\n </div>\n </div>\n )\n}\n\nconst MultiLayoutGraphicBlock = React.forwardRef<HTMLDivElement, MultiLayoutGraphicBlockProps>((props, ref) => {\n const { sectionTitle, items = [], carousel } = props.data\n\n const getSpan = (width: 'full' | 'half' | 'one-third') => {\n switch (width) {\n case 'full':\n return 12\n case 'half':\n return 6\n case 'one-third':\n return 4\n }\n }\n\n return (\n <section data-ui-component-id=\"MultiLayoutGraphicBlock\" ref={ref} className=\"\">\n {sectionTitle && (\n <Heading className=\"section-title desktop:mb-[32px] mb-[34px]\" as=\"h1\" size={5}>\n {sectionTitle}\n </Heading>\n )}\n <Grid className=\"w-full\">\n {items.map((item, index) => (\n <GridItem key={index} span={getSpan(item.width)}>\n <ItemBlock item={item} />\n </GridItem>\n ))}\n </Grid>\n {carousel && carousel?.items.length > 0 ? (\n <Carousel className=\"laptop:mt-4 mt-3\">\n <CarouselContent className=\"flex\">\n {carousel.items.map((item, index) => (\n <CarouselItem key={index} className=\"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5\">\n <ItemBlock item={item} />\n </CarouselItem>\n ))}\n </CarouselContent>\n </Carousel>\n ) : null}\n </section>\n )\n})\n\nexport default withStyles(MultiLayoutGraphicBlock)\n"],
|
|
5
|
+
"mappings": "AAeM,cAAAA,EAEE,QAAAC,MAFF,oBAfN,OAAOC,MAAW,QAElB,OAAS,cAAAC,MAAkB,yBAC3B,OAAOC,MAAa,8BACpB,OAAOC,MAAY,6BACnB,OAAS,WAAAC,MAAe,8BACxB,OAAS,QAAAC,MAAY,2BACrB,OAAS,YAAAC,EAAU,mBAAAC,EAAiB,gBAAAC,MAAoB,+BACxD,OAAS,QAAAC,EAAM,YAAAC,MAAgB,2BAE/B,MAAMC,EAAY,CAAC,CAAE,KAAAC,CAAK,IAAsB,CAC9C,KAAM,CAAE,MAAAC,EAAQ,QAAS,MAAAC,EAAO,YAAAC,EAAa,SAAAC,EAAU,WAAAC,EAAY,aAAAC,CAAa,EAAIN,EAEpF,OACEb,EAAC,OAAI,UAAW,uCAAuCc,IAAU,OAAS,YAAc,YAAY,GAClG,UAAAf,EAACI,EAAA,CAAQ,OAAQc,EAAU,UAAU,UAAU,EAC/CjB,EAAC,OAAI,UAAU,kFACb,UAAAA,EAAC,OACC,UAAAD,EAACM,EAAA,CAAQ,UAAU,aAAc,SAAAU,EAAM,EACvChB,EAACO,EAAA,CAAK,UAAU,mBAAoB,SAAAU,EAAY,GAClD,EACAhB,EAAC,OAAI,UAAU,aACZ,UAAAkB,GACCnB,EAACK,EAAA,CAAO,QAAQ,UAAU,QAAO,GAC/B,SAAAL,EAAC,KAAE,KAAMmB,EAAW,KAAO,SAAAA,EAAW,KAAK,EAC7C,EAEDC,GACCpB,EAACK,EAAA,CAAO,QAAQ,YAAY,QAAO,GACjC,SAAAL,EAAC,KAAE,KAAMoB,EAAa,KAAO,SAAAA,EAAa,KAAK,EACjD,GAEJ,GACF,GACF,CAEJ,EAEMC,EAA0BnB,EAAM,WAAyD,CAACoB,EAAOC,IAAQ,CAC7G,KAAM,CAAE,aAAAC,EAAc,MAAAC,EAAQ,CAAC,EAAG,SAAAC,CAAS,EAAIJ,EAAM,KAE/CK,EAAWC,GAAyC,CACxD,OAAQA,EAAO,CACb,IAAK,OACH,MAAO,IACT,IAAK,OACH,MAAO,GACT,IAAK,YACH,MAAO,EACX,CACF,EAEA,OACE3B,EAAC,WAAQ,uBAAqB,0BAA0B,IAAKsB,EAAK,UAAU,GACzE,UAAAC,GACCxB,EAACM,EAAA,CAAQ,UAAU,4CAA4C,GAAG,KAAK,KAAM,EAC1E,SAAAkB,EACH,EAEFxB,EAACW,EAAA,CAAK,UAAU,SACb,SAAAc,EAAM,IAAI,CAACX,EAAMe,IAChB7B,EAACY,EAAA,CAAqB,KAAMe,EAAQb,EAAK,KAAK,EAC5C,SAAAd,EAACa,EAAA,CAAU,KAAMC,EAAM,GADVe,CAEf,CACD,EACH,EACCH,GAAYA,GAAU,MAAM,OAAS,EACpC1B,EAACQ,EAAA,CAAS,UAAU,mBAClB,SAAAR,EAACS,EAAA,CAAgB,UAAU,OACxB,SAAAiB,EAAS,MAAM,IAAI,CAACZ,EAAMe,IACzB7B,EAACU,EAAA,CAAyB,UAAU,qDAClC,SAAAV,EAACa,EAAA,CAAU,KAAMC,EAAM,GADNe,CAEnB,CACD,EACH,EACF,EACE,MACN,CAEJ,CAAC,EAED,IAAOC,EAAQ3B,EAAWkB,CAAuB",
|
|
6
|
+
"names": ["jsx", "jsxs", "React", "withStyles", "Picture", "Button", "Heading", "Text", "Carousel", "CarouselContent", "CarouselItem", "Grid", "GridItem", "ItemBlock", "item", "theme", "title", "description", "imageUrl", "primaryBtn", "secondaryBtn", "MultiLayoutGraphicBlock", "props", "ref", "sectionTitle", "items", "carousel", "getSpan", "width", "index", "MultiLayoutGraphicBlock_default"]
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Theme } from '../../types/props';
|
|
2
2
|
export type Item = {
|
|
3
|
-
theme
|
|
3
|
+
theme?: Theme;
|
|
4
4
|
title: string;
|
|
5
5
|
description: string;
|
|
6
6
|
imageUrl: string;
|
|
@@ -15,10 +15,11 @@ export type Item = {
|
|
|
15
15
|
};
|
|
16
16
|
export type MultiLayoutGraphicBlockProps = {
|
|
17
17
|
data: {
|
|
18
|
+
sectionTitle?: string;
|
|
18
19
|
items: ({
|
|
19
20
|
width: 'full' | 'half' | 'one-third';
|
|
20
21
|
} & Item)[];
|
|
21
|
-
carousel
|
|
22
|
+
carousel?: {
|
|
22
23
|
items: Item[];
|
|
23
24
|
};
|
|
24
25
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as t,jsxs as o}from"react/jsx-runtime";import
|
|
1
|
+
"use client";import{jsx as t,jsxs as o}from"react/jsx-runtime";import a from"react";import{cn as x}from"../../helpers/utils.js";import{Heading as f,Text as g}from"../../components/index.js";import{withStyles as d}from"../../shared/Styles.js";const p=a.forwardRef(({data:s,className:i},m)=>{const{title:n,features:e}=s;return o("div",{ref:m,className:x("laptop:flex-row laptop:items-end laptop:justify-between flex w-full flex-col items-start justify-center text-center","tablet:py-10 laptop:py-12 desktop:py-16 lg-desktop:py-20 gap-8 py-8",i),children:[t(f,{as:"h2",size:2,weight:"bold",align:"left",className:"slogan-title laptop:text-[40px] desktop:text-[48px] lg-desktop:text-[64px] text-[40px] !leading-none text-[#1D1D1F]",children:n}),e&&e.length>0&&t("div",{className:"flex w-full max-w-[423px] flex-row items-center gap-3",children:e.slice(0,3).map((r,l)=>o(a.Fragment,{children:[l>0&&t("div",{className:"w-px self-stretch bg-[#D9D9D9]"}),t("div",{className:"flex-1",children:t(g,{align:"left",className:"slogan-feature-text laptop:line-clamp-2 tablet:text-[13px] laptop:text-[14px] line-clamp-3 text-[12px] font-medium leading-[1.4] text-[#1D1D1F]",html:r.title})})]},l))})]})});p.displayName="Slogan";var v=d(p);export{v as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/Slogan/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { Heading, Text } from '../../components/index.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport type { SloganProps } from './types.js'\n\nconst Slogan = React.forwardRef<HTMLDivElement, SloganProps>(({ data, className }, ref) => {\n const { title, features } = data\n return (\n <div\n ref={ref}\n className={cn(\n 'laptop:flex-row laptop:items-end laptop:justify-between flex w-full flex-col items-start justify-center text-center',\n 'tablet:
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { Heading, Text } from '../../components/index.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport type { SloganProps } from './types.js'\n\nconst Slogan = React.forwardRef<HTMLDivElement, SloganProps>(({ data, className }, ref) => {\n const { title, features } = data\n return (\n <div\n ref={ref}\n className={cn(\n 'laptop:flex-row laptop:items-end laptop:justify-between flex w-full flex-col items-start justify-center text-center',\n 'tablet:py-10 laptop:py-12 desktop:py-16 lg-desktop:py-20 gap-8 py-8',\n className\n )}\n >\n <Heading\n as=\"h2\"\n size={2}\n weight={'bold'}\n align={'left'}\n className=\"slogan-title laptop:text-[40px] desktop:text-[48px] lg-desktop:text-[64px] text-[40px] !leading-none text-[#1D1D1F]\"\n >\n {title}\n </Heading>\n {features && features.length > 0 && (\n <div className=\"flex w-full max-w-[423px] flex-row items-center gap-3\">\n {features.slice(0, 3).map((feature, index) => (\n <React.Fragment key={index}>\n {index > 0 && <div className=\"w-px self-stretch bg-[#D9D9D9]\" />}\n <div className=\"flex-1\">\n <Text\n align=\"left\"\n className=\"slogan-feature-text laptop:line-clamp-2 tablet:text-[13px] laptop:text-[14px] line-clamp-3 text-[12px] font-medium leading-[1.4] text-[#1D1D1F]\"\n html={feature.title}\n />\n </div>\n </React.Fragment>\n ))}\n </div>\n )}\n </div>\n )\n})\n\nSlogan.displayName = 'Slogan'\n\nexport default withStyles(Slogan)\n"],
|
|
5
|
+
"mappings": "aAkBM,cAAAA,EAYM,QAAAC,MAZN,oBAjBN,OAAOC,MAAW,QAClB,OAAS,MAAAC,MAAU,yBACnB,OAAS,WAAAC,EAAS,QAAAC,MAAY,4BAC9B,OAAS,cAAAC,MAAkB,yBAG3B,MAAMC,EAASL,EAAM,WAAwC,CAAC,CAAE,KAAAM,EAAM,UAAAC,CAAU,EAAGC,IAAQ,CACzF,KAAM,CAAE,MAAAC,EAAO,SAAAC,CAAS,EAAIJ,EAC5B,OACEP,EAAC,OACC,IAAKS,EACL,UAAWP,EACT,sHACA,sEACAM,CACF,EAEA,UAAAT,EAACI,EAAA,CACC,GAAG,KACH,KAAM,EACN,OAAQ,OACR,MAAO,OACP,UAAU,sHAET,SAAAO,EACH,EACCC,GAAYA,EAAS,OAAS,GAC7BZ,EAAC,OAAI,UAAU,wDACZ,SAAAY,EAAS,MAAM,EAAG,CAAC,EAAE,IAAI,CAACC,EAASC,IAClCb,EAACC,EAAM,SAAN,CACE,UAAAY,EAAQ,GAAKd,EAAC,OAAI,UAAU,iCAAiC,EAC9DA,EAAC,OAAI,UAAU,SACb,SAAAA,EAACK,EAAA,CACC,MAAM,OACN,UAAU,kJACV,KAAMQ,EAAQ,MAChB,EACF,IARmBC,CASrB,CACD,EACH,GAEJ,CAEJ,CAAC,EAEDP,EAAO,YAAc,SAErB,IAAOQ,EAAQT,EAAWC,CAAM",
|
|
6
6
|
"names": ["jsx", "jsxs", "React", "cn", "Heading", "Text", "withStyles", "Slogan", "data", "className", "ref", "title", "features", "feature", "index", "Slogan_default"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TitleProps } from './types.js';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
(props: Omit<TitleProps & React.RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps> & {
|
|
5
|
+
className?: string;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";import{jsx as i}from"react/jsx-runtime";import r from"react";import{cn as l}from"../../helpers/utils.js";import{Heading as s}from"../../components/index.js";import{withStyles as p}from"../../shared/Styles.js";const e=r.forwardRef(({data:o,className:m})=>{const{title:t}=o;return t&&i("div",{className:l("tablet:mb-8 mb-6 space-y-4",m),children:i(s,{as:"h2",size:5,html:t})})});e.displayName="Title";var n=p(e);export{n as default};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|