@vetc-miniapp/ui-react 0.0.31 → 0.0.33
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/index.js +1 -1
- package/dist/styles/VETCProvider.d.ts +3 -0
- package/dist/styles/tokens.css +35 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import{ConfigProvider as a,theme as i,App as n,Input as o,Select as l,Tag as c,Avatar as d,Card as v,Divider as s,Skeleton as g,Spin as h,message as p,notification as f,Modal as b}from"antd";import u,{useState as y,useEffect as m,useRef as x}from"react";import{LoadingOutlined as w}from"@ant-design/icons";import{createPortal as k}from"react-dom";const S={white:"#ffffff",black:"#000000",blue02:"#f4fbff",blue05:"#e4f4ff",blue10:"#cae9ff",blue15:"#afddff",blue20:"#95d1ff",blue25:"#7ac4fb",blue30:"#60b6f4",blue35:"#45a8eb",blue40:"#2b99df",blue45:"#108ad1",blue50:"#007ac1",blue60:"#005c9e",blue70:"#004179",blue80:"#002853",blue90:"#00122a",green02:"#f2fef2",green05:"#dffbdf",green10:"#bff4bf",green15:"#9feca7",green20:"#82e194",green25:"#68d583",green30:"#50c775",green35:"#39b669",green40:"#25a45e",green45:"#23965b",green50:"#208758",green60:"#1b6b4d",green70:"#15503f",green80:"#0f342d",green90:"#081a18",gray02:"#f9fafa",gray05:"#f1f1f2",gray10:"#e3e4e6",gray15:"#d4d6d9",gray20:"#c6c8cc",gray25:"#b8babf",gray30:"#abacb2",gray35:"#9d9ea5",gray40:"#8f9098",gray45:"#82828a",gray50:"#74747d",gray60:"#5e5d64",gray70:"#47464b",gray80:"#2f2f32",gray90:"#181719",red02:"#fff6f9",red05:"#ffe7f0",red10:"#ffd0de",red15:"#ffb8cc",red20:"#ffa1b8",red25:"#ff89a3",red30:"#fb718d",red35:"#f55c78",red40:"#ee4b62",red45:"#e53b4d",red50:"#da2c39",red60:"#b4211f",red70:"#852419",red80:"#571f12",red90:"#2b130a",orange02:"#fffbf0",orange05:"#fff3da",orange10:"#ffe3b4",orange15:"#ffd08f",orange20:"#ffbb69",orange25:"#ffa447",orange30:"#ff8c2f",orange35:"#ef7720",orange40:"#dd6e1d",orange45:"#cb651b",orange50:"#b85c18",orange60:"#934913",orange70:"#6f370f",orange80:"#4a250a",orange90:"#251205",yellow02:"#fff8e7",yellow05:"#ffefbc",yellow10:"#ffe374",yellow15:"#ffd62b",yellow20:"#f9c600",yellow25:"#e9b900",yellow30:"#daaa00",yellow35:"#ca9b00",yellow40:"#bb8b00",yellow45:"#ab7b00",yellow50:"#9c6b00",yellow60:"#7c4b00",yellow70:"#5d2f00",yellow80:"#3e1800",yellow90:"#1f0700"},z={brand:S.green40,brandDark:S.green50,brandLight:S.green05,positive:S.green50,positiveVariant:S.green05,onPositive:S.white,onPositiveVariant:S.green60,negative:S.red50,onNegative:S.white,warning:S.orange30,onWarning:S.white,outline:S.gray50,outlineVariant:S.gray10,outlineInverse:S.gray40,theme:S.white,themeVariant:S.gray05,inverseTheme:S.gray90,primaryOnTheme:S.gray90,secondaryOnTheme:S.gray60,primaryOnInverseTheme:S.white,secondaryOnInverseTheme:S.gray20,disabledBackground:S.gray10,disabledContent:S.gray30,disabledOutline:S.gray20,overlay:"rgba(0, 0, 0, 0.4)",overlayVariant:"rgba(0, 0, 0, 0.16)",skeleton:"rgba(0, 0, 0, 0.1)"},C={token:{colorPrimary:z.brand,colorPrimaryHover:S.green35,colorPrimaryActive:z.brandDark,colorPrimaryBg:S.green02,colorPrimaryBgHover:S.green05,colorError:z.negative,colorErrorHover:S.red60,colorErrorBg:S.red02,colorWarning:z.warning,colorWarningBg:S.orange02,colorSuccess:z.positive,colorSuccessBg:S.green02,colorText:z.primaryOnTheme,colorTextSecondary:z.secondaryOnTheme,colorTextDisabled:z.disabledContent,colorTextPlaceholder:S.gray50,colorBgContainer:z.theme,colorBgLayout:z.themeVariant,colorBgSpotlight:z.inverseTheme,colorBorder:S.gray20,colorBorderSecondary:S.gray10,colorSplit:S.gray10,colorFill:S.gray05,colorFillSecondary:S.gray10,colorFillTertiary:S.gray15,fontFamily:'"Roboto", system-ui, -apple-system, sans-serif',fontSize:16,fontSizeSM:13,fontSizeLG:18,fontSizeXL:19,fontSizeHeading1:32,fontSizeHeading2:28,fontSizeHeading3:24,fontSizeHeading4:19,fontSizeHeading5:16,fontWeightStrong:600,lineHeight:1.5,borderRadius:8,borderRadiusSM:6,borderRadiusLG:12,borderRadiusXS:4,controlHeight:48,controlHeightSM:32,controlHeightLG:56,paddingXS:8,paddingSM:12,padding:16,paddingMD:16,paddingLG:24,motionDurationFast:"150ms",motionDurationMid:"250ms"},components:{Button:{primaryColor:"#ffffff",defaultBorderColor:S.gray20,defaultColor:z.primaryOnTheme,borderRadius:12,borderRadiusSM:8,borderRadiusLG:12,controlHeight:48,controlHeightSM:32,paddingInline:16,paddingInlineSM:12,fontWeight:600},Input:{borderRadius:8,controlHeight:48,paddingInline:12,colorBorder:S.gray20,hoverBorderColor:z.outline,activeBorderColor:z.brand},Select:{borderRadius:8,controlHeight:48},Checkbox:{borderRadius:4,controlInteractiveSize:20},Radio:{radioSize:20,dotSize:8},Switch:{trackHeight:32,trackMinWidth:52,handleSize:28,colorPrimary:z.brand},Modal:{borderRadiusLG:16,paddingContentHorizontalLG:16,paddingMD:16},Card:{borderRadius:16,paddingLG:16}}};function H({children:t}){return e(a,{theme:{...C,algorithm:i.defaultAlgorithm},children:e(n,{children:t})})}const W={primary:'"Roboto", system-ui, -apple-system, sans-serif'},B={regular:400,medium:500,semibold:600,bold:700,black:900},L={"2xs":"10px",xs:"12px",sm:"14px",base:"16px",lg:"20px",xl:"24px","2xl":"28px","3xl":"32px","4xl":"36px"},F={tight:"120%",normal:"140%",relaxed:"150%"},N={none:"0",sm:"0.1px",md:"0.25px",lg:"0.5px"},M={display4xl:{fontSize:L["4xl"],fontWeight:B.bold,lineHeight:F.tight},display3xl:{fontSize:L["3xl"],fontWeight:B.bold,lineHeight:F.tight},display2xl:{fontSize:L["2xl"],fontWeight:B.bold,lineHeight:F.tight},headlineXl:{fontSize:L.xl,fontWeight:B.bold,lineHeight:F.normal},headlineLg:{fontSize:L.lg,fontWeight:B.semibold,lineHeight:F.normal},titleBase:{fontSize:L.base,fontWeight:B.semibold,lineHeight:F.relaxed,letterSpacing:N.sm},titleSm:{fontSize:L.sm,fontWeight:B.semibold,lineHeight:F.relaxed,letterSpacing:N.sm},labelBase:{fontSize:L.base,fontWeight:B.semibold,lineHeight:F.relaxed},labelSm:{fontSize:L.sm,fontWeight:B.semibold,lineHeight:F.relaxed,letterSpacing:N.lg},labelXs:{fontSize:L.xs,fontWeight:B.semibold,lineHeight:F.relaxed,letterSpacing:N.lg},bodyBase:{fontSize:L.base,fontWeight:B.regular,lineHeight:F.relaxed,letterSpacing:N.sm},bodySm:{fontSize:L.sm,fontWeight:B.regular,lineHeight:F.relaxed,letterSpacing:N.md},bodyXs:{fontSize:L.xs,fontWeight:B.regular,lineHeight:F.relaxed,letterSpacing:N.lg},body2xs:{fontSize:L["2xs"],fontWeight:B.regular,lineHeight:F.relaxed,letterSpacing:N.lg}},I={0:"0px",1:"1px",2:"2px",4:"4px",6:"6px",8:"8px",10:"10px",12:"12px",14:"14px",16:"16px",20:"20px",24:"24px",32:"32px",40:"40px",48:"48px",56:"56px",64:"64px",72:"72px",80:"80px"},A={none:"0px",xs:"4px",sm:"6px",md:"8px",lg:"12px",xl:"16px","2xl":"24px",pill:"1000px"},R={buttonLg:"48px",buttonSm:"32px",input:"48px",navBar:"56px",bottomNav:"56px",tabBar:"56px",listItem:"56px",chip:"32px",chipSm:"24px",iconStd:"24px",iconSm:"20px"},T={none:"none",sm:"0 1px 4px rgba(0, 0, 0, 0.08)",md:"0 2px 8px rgba(0, 0, 0, 0.12)",lg:"0 4px 16px rgba(0, 0, 0, 0.16)"},$={filled:{bg:"var(--vetc-color-brand)",bgHover:"var(--vetc-color-brand-hover)",bgActive:"var(--vetc-color-brand-active)",text:"var(--vetc-white)",border:"transparent",shadow:"none"},outlined:{bg:"transparent",bgHover:"var(--vetc-green-02)",bgActive:"var(--vetc-green-05)",text:"var(--vetc-color-brand)",border:"var(--vetc-color-brand)",shadow:"none"},elevated:{bg:"var(--vetc-color-bg)",bgHover:"var(--vetc-color-bg-hover)",bgActive:"var(--vetc-color-bg-pressed)",text:"var(--vetc-color-brand)",border:"transparent",shadow:"var(--vetc-shadow-md)"},ghost:{bg:"transparent",bgHover:"var(--vetc-color-bg-hover)",bgActive:"var(--vetc-color-bg-pressed)",text:"var(--vetc-color-brand)",border:"transparent",shadow:"none"},danger:{bg:"var(--vetc-color-negative)",bgHover:"var(--vetc-red-60)",bgActive:"var(--vetc-red-60)",text:"var(--vetc-white)",border:"transparent",shadow:"none"},"danger-outlined":{bg:"transparent",bgHover:"var(--vetc-red-02)",bgActive:"var(--vetc-red-05)",text:"var(--vetc-color-negative)",border:"var(--vetc-color-negative)",shadow:"none"}},D={filled:{bg:"var(--vetc-gray-90)",bgHover:"var(--vetc-gray-80)",bgActive:"var(--vetc-gray-70)",text:"var(--vetc-white)",border:"transparent",shadow:"none"},outlined:{bg:"transparent",bgHover:"var(--vetc-gray-05)",bgActive:"var(--vetc-gray-10)",text:"var(--vetc-gray-90)",border:"var(--vetc-gray-90)",shadow:"none"},elevated:{bg:"var(--vetc-color-bg)",bgHover:"var(--vetc-color-bg-hover)",bgActive:"var(--vetc-color-bg-pressed)",text:"var(--vetc-color-text-primary)",border:"transparent",shadow:"var(--vetc-shadow-md)"},ghost:{bg:"transparent",bgHover:"var(--vetc-color-bg-hover)",bgActive:"var(--vetc-color-bg-pressed)",text:"var(--vetc-color-text-primary)",border:"transparent",shadow:"none"},danger:{bg:"var(--vetc-color-negative)",bgHover:"var(--vetc-red-60)",bgActive:"var(--vetc-red-60)",text:"var(--vetc-white)",border:"transparent",shadow:"none"},"danger-outlined":{bg:"transparent",bgHover:"var(--vetc-red-02)",bgActive:"var(--vetc-red-05)",text:"var(--vetc-color-negative)",border:"var(--vetc-color-negative)",shadow:"none"}},O=({color:r})=>t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",style:{animation:"vetc-btn-spin 0.6s linear infinite",flexShrink:0},"aria-hidden":"true",children:[e("circle",{cx:"8",cy:"8",r:"6",stroke:r,strokeOpacity:"0.25",strokeWidth:"2"}),e("path",{d:"M8 2a6 6 0 016 6",stroke:r,strokeWidth:"2",strokeLinecap:"round"})]});function P({style:a="filled",variant:i="brand",size:n="lg",shape:o="rounded",block:l=!1,disabled:c=!1,loading:d=!1,icon:v,iconRight:s,onClick:g,children:h,htmlType:p="button",className:f="",css:b,id:u}){const[m,x]=y(!1),[w,k]=y(!1),S=("neutral"===i?D:$)[a],z=c||d,C="lg"===n?"var(--vetc-btn-height-lg)":"var(--vetc-btn-height-sm)",H="lg"===n?"var(--vetc-btn-font-size-lg)":"var(--vetc-btn-font-size-sm)",W="lg"===n?"var(--vetc-btn-padding-x-lg)":"var(--vetc-btn-padding-x-sm)",B="pill"===o?"var(--vetc-btn-radius-pill)":"lg"===n?"var(--vetc-btn-radius-lg)":"var(--vetc-btn-radius-sm)";let L=S.bg,F=S.border,N=S.shadow;z?(L="var(--vetc-btn-disabled-bg)",F="var(--vetc-btn-disabled-border)",N="none"):m?L=S.bgActive:w&&(L=S.bgHover);const M=z?"var(--vetc-btn-disabled-text)":S.text,I=z?"var(--vetc-gray-30)":S.text;return t(r,{children:[t("button",{id:u,type:p,disabled:z,onClick:g,onMouseEnter:()=>k(!0),onMouseLeave:()=>{k(!1),x(!1)},onMouseDown:()=>x(!0),onMouseUp:()=>x(!1),className:`vetc-btn vetc-btn--${a} vetc-btn--${i} vetc-btn--${n} ${f}`,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"var(--vetc-space-8)",height:C,width:l?"100%":void 0,paddingInline:W,borderRadius:B,border:`1px solid ${F}`,backgroundColor:L,boxShadow:N,color:M,fontSize:H,fontWeight:"var(--vetc-btn-font-weight)",fontFamily:"var(--vetc-font-family)",lineHeight:"var(--vetc-line-height-relaxed)",cursor:z?"not-allowed":"pointer",transition:"background-color var(--vetc-transition-fast), box-shadow var(--vetc-transition-fast)",userSelect:"none",outline:"none",whiteSpace:"nowrap",...b},children:[d?e(O,{color:I}):v&&e("span",{style:{display:"inline-flex",flexShrink:0},children:v}),h&&e("span",{children:h}),s&&!d&&e("span",{style:{display:"inline-flex",flexShrink:0},children:s})]}),e("style",{children:"@keyframes vetc-btn-spin { to { transform: rotate(360deg); } }"})]})}function j({primary:a,secondary:i=[],content:n,layout:o="inline",variant:l="none"}){const c="inline"===o,d="bounding"===l?{backgroundColor:"var(--vetc-btn-group-bg)",borderTop:"1px solid var(--vetc-btn-group-border-color)",padding:"var(--vetc-btn-group-padding)",fontFamily:"var(--vetc-font-family)"}:{fontFamily:"var(--vetc-font-family)"},v=c?{display:"flex",gap:"var(--vetc-btn-group-gap)",alignItems:"stretch"}:{display:"flex",flexDirection:"column",gap:"var(--vetc-btn-group-gap)"},s=i.map((t,r)=>e(P,{style:"outlined",variant:"neutral",block:!c,loading:t.loading,disabled:t.disabled,onClick:t.onClick,css:c?{flex:1}:void 0,children:t.label},r)),g=e(P,{style:a.danger?"danger":"filled",variant:a.variant??"brand",block:!c,loading:a.loading,disabled:a.disabled,onClick:a.onClick,css:c?{flex:1}:void 0,children:a.label});return t("div",{style:d,children:[n&&e("div",{style:{marginBottom:"var(--vetc-btn-group-padding)"},children:n}),e("div",{style:v,children:t(r,c?{children:[s,g]}:{children:[g,s]})})]})}const X={display4xl:{fontSize:"var(--vetc-font-size-4xl)",fontWeight:"var(--vetc-font-weight-bold)",lineHeight:"var(--vetc-line-height-tight)"},display3xl:{fontSize:"var(--vetc-font-size-3xl)",fontWeight:"var(--vetc-font-weight-bold)",lineHeight:"var(--vetc-line-height-tight)"},display2xl:{fontSize:"var(--vetc-font-size-2xl)",fontWeight:"var(--vetc-font-weight-bold)",lineHeight:"var(--vetc-line-height-tight)"},headlineXl:{fontSize:"var(--vetc-font-size-xl)",fontWeight:"var(--vetc-font-weight-bold)",lineHeight:"var(--vetc-line-height-normal)"},headlineLg:{fontSize:"var(--vetc-font-size-lg)",fontWeight:"var(--vetc-font-weight-semibold)",lineHeight:"var(--vetc-line-height-normal)"},titleBase:{fontSize:"var(--vetc-font-size-base)",fontWeight:"var(--vetc-font-weight-semibold)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-sm)"},titleSm:{fontSize:"var(--vetc-font-size-sm)",fontWeight:"var(--vetc-font-weight-semibold)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-sm)"},labelBase:{fontSize:"var(--vetc-font-size-base)",fontWeight:"var(--vetc-font-weight-semibold)",lineHeight:"var(--vetc-line-height-relaxed)"},labelSm:{fontSize:"var(--vetc-font-size-sm)",fontWeight:"var(--vetc-font-weight-semibold)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-lg)"},labelXs:{fontSize:"var(--vetc-font-size-xs)",fontWeight:"var(--vetc-font-weight-semibold)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-lg)"},labelXxs:{fontSize:"var(--vetc-font-size-2xs)",fontWeight:"var(--vetc-font-weight-semibold)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-lg)"},bodyBase:{fontSize:"var(--vetc-font-size-base)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-sm)"},bodySm:{fontSize:"var(--vetc-font-size-sm)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-md)"},bodyXs:{fontSize:"var(--vetc-font-size-xs)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-lg)"},body2xs:{fontSize:"var(--vetc-font-size-2xs)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-lg)"}},E={primary:"var(--vetc-color-text-primary)",secondary:"var(--vetc-color-text-secondary)",tertiary:"var(--vetc-color-text-tertiary)",disabled:"var(--vetc-color-text-disabled)",brand:"var(--vetc-color-brand)",error:"var(--vetc-color-text-error)",warning:"var(--vetc-color-warning)",success:"var(--vetc-color-positive)",inherit:"inherit"};function V({variant:t="bodyBase",color:r="primary",strikethrough:a=!1,underline:i=!1,truncate:n=!1,lines:o,as:l="span",children:c,className:d="",style:v,id:s}){const g={fontFamily:"var(--vetc-font-family)",margin:0,padding:0,...X[t]??X.bodyBase,color:E[r],textDecoration:a?"line-through":i?"underline":"none",...n&&!o?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:{},...o?{display:"-webkit-box",WebkitLineClamp:o,WebkitBoxOrient:"vertical",overflow:"hidden"}:{},...v};return e(l,{id:s,className:`vetc-text vetc-text--${t} ${d}`,style:g,children:c})}function _({level:t="2xl",...r}){return e(V,{...r,variant:`display${t}`,as:r.as??"h1"})}function q({level:t="xl",...r}){return e(V,{...r,variant:"xl"===t?"headlineXl":"headlineLg",as:r.as??"h2"})}function G({size:t="base",...r}){return e(V,{...r,variant:"base"===t?"titleBase":"titleSm",as:r.as??"h3"})}function Q({size:t="base",...r}){return e(V,{...r,variant:{base:"labelBase",sm:"labelSm",xs:"labelXs",xxs:"labelXxs"}[t],as:r.as??"span"})}function Y({size:t="base",...r}){return e(V,{...r,variant:{base:"bodyBase",sm:"bodySm",xs:"bodyXs","2xs":"body2xs"}[t],as:r.as??"p"})}function K({htmlFor:r,required:a,disabled:i,children:n}){return t("label",{htmlFor:r,style:{fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-input-label-font-size)",fontWeight:"var(--vetc-input-label-font-weight)",lineHeight:"var(--vetc-line-height-relaxed)",color:i?"var(--vetc-color-text-disabled)":"var(--vetc-input-label-color)",display:"block"},children:[n,a&&e("span",{style:{color:"var(--vetc-color-negative)",marginLeft:"var(--vetc-space-2)"},children:"*"})]})}function U({color:t,children:r}){return e("span",{style:{fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-input-helper-font-size)",lineHeight:"var(--vetc-line-height-relaxed)",color:t},children:r})}const J={height:"var(--vetc-input-height)",borderRadius:"var(--vetc-input-radius)",paddingInline:"var(--vetc-input-padding-x)",fontSize:"var(--vetc-input-font-size)",fontFamily:"var(--vetc-font-family)"};function Z({label:r,placeholder:a,value:i,defaultValue:n,helperText:l,status:c="default",error:d,disabled:v=!1,readOnly:s=!1,maxLength:g,showCount:h=!1,prefix:p,suffix:f,allowClear:b=!1,onChange:u,onFocus:y,onBlur:m,onPressEnter:x,type:w="text",id:k,name:S,className:z="",style:C,required:H=!1}){const W=!!d?"error":c,B="error"===W?"error":void 0,L=d??l,F="error"===W?"var(--vetc-input-helper-color-error)":"var(--vetc-input-helper-color)";return t("div",{className:`vetc-input-wrapper ${z}`,style:{display:"flex",flexDirection:"column",gap:"var(--vetc-input-gap)",...C},children:[r&&e(K,{htmlFor:k,required:H,disabled:v,children:r}),e(o,{id:k,name:S,type:w,value:i,defaultValue:n,placeholder:a,disabled:v,readOnly:s,maxLength:g,showCount:h,prefix:p,suffix:f,allowClear:b,status:B,onChange:e=>u?.(e.target.value,e),onFocus:y,onBlur:m,onPressEnter:x,style:J}),L&&e(U,{color:F,children:L})]})}function ee({label:r,placeholder:a,value:i,defaultValue:n,helperText:l,status:c="default",error:d,disabled:v=!1,readOnly:s=!1,maxLength:g,onChange:h,onFocus:p,onBlur:f,id:b,name:u,className:y="",style:m,required:x=!1}){const w=!!d,k="error"===(w?"error":c)?"error":void 0,S=d??l,z=w?"var(--vetc-input-helper-color-error)":"var(--vetc-input-helper-color)";return t("div",{className:`vetc-input-wrapper ${y??""}`,style:{display:"flex",flexDirection:"column",gap:"var(--vetc-input-gap)",...m},children:[r&&e(K,{htmlFor:b,required:x,disabled:v,children:r}),e(o.Password,{id:b,name:u,value:i,defaultValue:n,placeholder:a,disabled:v,readOnly:s,maxLength:g,status:k,onChange:e=>h?.(e.target.value,e),onFocus:p,onBlur:f,style:J}),S&&e(U,{color:z,children:S})]})}const{TextArea:te}=o;function re({htmlFor:r,required:a,disabled:i,children:n}){return t("label",{htmlFor:r,style:{fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-input-label-font-size)",fontWeight:"var(--vetc-input-label-font-weight)",lineHeight:"var(--vetc-line-height-relaxed)",color:i?"var(--vetc-color-text-disabled)":"var(--vetc-input-label-color)",display:"block"},children:[n,a&&e("span",{style:{color:"var(--vetc-color-negative)",marginLeft:"var(--vetc-space-2)"},children:"*"})]})}function ae({label:r,placeholder:a,value:i,defaultValue:n,helperText:o,error:l,disabled:c=!1,readOnly:d=!1,maxLength:v,showCount:s=!1,rows:g=4,autoSize:h,onChange:p,onFocus:f,onBlur:b,id:u,name:y,className:m="",style:x,required:w=!1}){const k=!!l,S=l??o,z=k?"var(--vetc-input-helper-color-error)":"var(--vetc-input-helper-color)";return t("div",{className:`vetc-textarea-wrapper ${m}`,style:{display:"flex",flexDirection:"column",gap:"var(--vetc-input-gap)",...x},children:[r&&e(re,{htmlFor:u,required:w,disabled:c,children:r}),e(te,{id:u,name:y,value:i,defaultValue:n,placeholder:a,disabled:c,readOnly:d,maxLength:v,showCount:s,rows:g,autoSize:h,status:k?"error":void 0,onChange:e=>p?.(e.target.value),onFocus:f,onBlur:b,style:{borderRadius:"var(--vetc-input-radius)",padding:"var(--vetc-input-padding-x)",fontSize:"var(--vetc-input-font-size)",fontFamily:"var(--vetc-font-family)",resize:"vertical"}}),S&&e("span",{style:{fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-input-helper-font-size)",lineHeight:"var(--vetc-line-height-relaxed)",color:z},children:S})]})}function ie({label:r,placeholder:a,value:i,defaultValue:n,options:o=[],helperText:c,error:d,disabled:v=!1,multiple:s=!1,searchable:g=!1,allowClear:h=!1,loading:p=!1,onChange:f,onSearch:b,id:u,className:y="",style:m,required:x=!1,popupMatchSelectWidth:w=!0}){const k=!!d,S=d??c,z=k?"var(--vetc-input-helper-color-error)":"var(--vetc-input-helper-color)";return t("div",{className:`vetc-select-wrapper ${y}`,style:{display:"flex",flexDirection:"column",gap:"var(--vetc-input-gap)",...m},children:[r&&t("label",{htmlFor:u,style:{fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-input-label-font-size)",fontWeight:"var(--vetc-input-label-font-weight)",lineHeight:"var(--vetc-line-height-relaxed)",color:v?"var(--vetc-color-text-disabled)":"var(--vetc-input-label-color)",display:"block"},children:[r,x&&e("span",{style:{color:"var(--vetc-color-negative)",marginLeft:"var(--vetc-space-2)"},children:"*"})]}),e(l,{id:u,value:i,defaultValue:n,placeholder:a,options:o,disabled:v,mode:s?"multiple":void 0,showSearch:g,allowClear:h,loading:p,status:k?"error":void 0,onChange:f,onSearch:b,popupMatchSelectWidth:w,style:{height:"var(--vetc-input-height)",width:"100%",fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-input-font-size)"}}),S&&e("span",{style:{fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-input-helper-font-size)",lineHeight:"var(--vetc-line-height-relaxed)",color:z},children:S})]})}const ne=()=>e("svg",{width:"12",height:"9",viewBox:"0 0 12 9",fill:"none","aria-hidden":"true",children:e("path",{d:"M1 4L4.5 7.5L11 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),oe=()=>e("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none","aria-hidden":"true",children:e("path",{d:"M1 1H9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})});function le({label:r,description:a,checked:i,defaultChecked:n=!1,indeterminate:o=!1,disabled:l=!1,variant:c="brand",onChange:d,value:v,id:s,className:g="",style:h}){const[p,f]=y(n),[b,u]=y(!1),m=void 0!==i,x=m?i:p,w="brand"===c?"var(--vetc-color-brand)":"var(--vetc-gray-90)";let k="transparent",S=l?"var(--vetc-color-border-disabled)":b?w:"var(--vetc-color-border)",z="var(--vetc-white)";return(x||o)&&(k=l?"var(--vetc-color-bg-disabled)":w,S=l?"var(--vetc-color-border-disabled)":b?"brand"===c?"var(--vetc-color-brand-hover)":"var(--vetc-gray-70)":w,z=l?"var(--vetc-color-text-disabled)":"var(--vetc-white)",l&&(k="var(--vetc-color-bg-disabled)")),t("label",{htmlFor:s,className:`vetc-checkbox ${g}`,onMouseEnter:()=>!l&&u(!0),onMouseLeave:()=>u(!1),style:{display:"inline-flex",alignItems:a?"flex-start":"center",gap:"var(--vetc-space-12)",cursor:l?"not-allowed":"pointer",userSelect:"none",fontFamily:"var(--vetc-font-family)",...h},children:[e("input",{id:s,type:"checkbox",checked:x,disabled:l,value:v,onChange:()=>{if(l)return;const e=!x;m||f(e),d?.(e)},style:{position:"absolute",opacity:0,width:0,height:0,pointerEvents:"none"},"aria-checked":o?"mixed":x}),t("span",{"aria-hidden":"true",style:{width:"20px",height:"20px",flexShrink:0,borderRadius:"var(--vetc-radius-xs)",border:`1.5px solid ${S}`,backgroundColor:k,display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color var(--vetc-transition-fast), border-color var(--vetc-transition-fast)",color:z,marginTop:a?"2px":0},children:[x&&!o&&e(ne,{}),o&&e(oe,{})]}),(r||a)&&t("span",{style:{display:"flex",flexDirection:"column",gap:"var(--vetc-space-2)"},children:[r&&e("span",{style:{fontSize:"var(--vetc-font-size-base)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",color:l?"var(--vetc-color-text-disabled)":"var(--vetc-color-text-primary)"},children:r}),a&&e("span",{style:{fontSize:"var(--vetc-font-size-sm)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",color:l?"var(--vetc-color-text-disabled)":"var(--vetc-color-text-secondary)"},children:a})]})]})}function ce({options:t,value:r,defaultValue:a=[],direction:i="vertical",disabled:n=!1,variant:o="brand",onChange:l,className:c="",style:d}){const[v,s]=y(a),g=void 0!==r,h=g?r:v;return e("div",{className:`vetc-checkbox-group ${c}`,style:{display:"flex",flexDirection:"vertical"===i?"column":"row",flexWrap:"horizontal"===i?"wrap":void 0,gap:"vertical"===i?"var(--vetc-space-12)":"var(--vetc-space-16)",fontFamily:"var(--vetc-font-family)",...d},children:t.map(t=>e(le,{label:t.label,description:t.description,checked:h.includes(t.value),disabled:t.disabled??n,variant:o,value:t.value,onChange:e=>((e,t)=>{const r=t?[...h,e]:h.filter(t=>t!==e);g||s(r),l?.(r)})(t.value,e)},String(t.value)))})}function de({label:r,description:a,checked:i,defaultChecked:n=!1,disabled:o=!1,variant:l="brand",onChange:c,value:d,id:v,className:s="",style:g}){const[h,p]=y(n),[f,b]=y(!1),u=void 0!==i,m=u?i:h,x="brand"===l?"var(--vetc-color-brand)":"var(--vetc-gray-90)",w=o?"var(--vetc-color-border-disabled)":m?f?"brand"===l?"var(--vetc-color-brand-hover)":"var(--vetc-gray-70)":x:f?x:"var(--vetc-color-border)",k=o?"var(--vetc-color-text-disabled)":x;return t("label",{htmlFor:v,className:`vetc-radio ${s}`,onMouseEnter:()=>!o&&b(!0),onMouseLeave:()=>b(!1),style:{display:"inline-flex",alignItems:a?"flex-start":"center",gap:"var(--vetc-space-12)",cursor:o?"not-allowed":"pointer",userSelect:"none",fontFamily:"var(--vetc-font-family)",...g},children:[e("input",{id:v,type:"radio",checked:m,disabled:o,value:d,onChange:()=>{o||m||(u||p(!0),c?.(!0))},style:{position:"absolute",opacity:0,width:0,height:0,pointerEvents:"none"}}),e("span",{"aria-hidden":"true",style:{width:"20px",height:"20px",flexShrink:0,borderRadius:"50%",border:`1.5px solid ${w}`,backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",transition:"border-color var(--vetc-transition-fast)",marginTop:a?"2px":0},children:m&&e("span",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:k,flexShrink:0}})}),(r||a)&&t("span",{style:{display:"flex",flexDirection:"column",gap:"var(--vetc-space-2)"},children:[r&&e("span",{style:{fontSize:"var(--vetc-font-size-base)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",color:o?"var(--vetc-color-text-disabled)":"var(--vetc-color-text-primary)"},children:r}),a&&e("span",{style:{fontSize:"var(--vetc-font-size-sm)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",color:o?"var(--vetc-color-text-disabled)":"var(--vetc-color-text-secondary)"},children:a})]})]})}function ve({options:t,value:r,defaultValue:a,direction:i="vertical",disabled:n=!1,variant:o="brand",onChange:l,className:c="",style:d}){const[v,s]=y(a),g=void 0!==r,h=g?r:v;return e("div",{role:"radiogroup",className:`vetc-radio-group ${c}`,style:{display:"flex",flexDirection:"vertical"===i?"column":"row",flexWrap:"horizontal"===i?"wrap":void 0,gap:"vertical"===i?"var(--vetc-space-12)":"var(--vetc-space-16)",fontFamily:"var(--vetc-font-family)",...d},children:t.map(t=>e(de,{label:t.label,description:t.description,checked:h===t.value,disabled:t.disabled??n,variant:o,value:t.value,onChange:()=>{return e=t.value,g||s(e),void l?.(e);var e}},String(t.value)))})}function se({label:a,description:i,labelPosition:n="right",checked:o,defaultChecked:l=!1,disabled:c=!1,loading:d=!1,variant:v="brand",onChange:s,id:g,className:h="",style:p}){const[f,b]=y(l),u=void 0!==o,m=u?o:f,x=c||d,w=()=>{if(x)return;const e=!m;u||b(e),s?.(e)},k=t("button",{id:g,type:"button",role:"switch","aria-checked":m,disabled:x,onClick:w,className:`vetc-switch ${h}`,style:{position:"relative",display:"inline-flex",alignItems:"center",width:"var(--vetc-switch-width)",height:"var(--vetc-switch-height)",borderRadius:"var(--vetc-radius-pill)",backgroundColor:x?"var(--vetc-color-bg-disabled)":m?"brand"===v?"var(--vetc-switch-on-bg)":"var(--vetc-gray-90)":"var(--vetc-switch-off-bg)",border:"none",cursor:x?"not-allowed":"pointer",padding:0,flexShrink:0,transition:"background-color var(--vetc-transition-fast)",outline:"none",...a||i?{}:p},children:[e("span",{style:{position:"absolute",left:m?"calc(100% - 30px)":"2px",width:"var(--vetc-switch-thumb-size)",height:"var(--vetc-switch-thumb-size)",borderRadius:"50%",backgroundColor:x?"var(--vetc-gray-20)":"var(--vetc-white)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",transition:"left var(--vetc-transition-fast)",display:"flex",alignItems:"center",justifyContent:"center"},children:d&&t("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",style:{animation:"vetc-btn-spin 0.6s linear infinite"},"aria-hidden":"true",children:[e("circle",{cx:"6",cy:"6",r:"4",stroke:"var(--vetc-gray-30)",strokeWidth:"1.5"}),e("path",{d:"M6 2a4 4 0 014 4",stroke:"var(--vetc-color-brand)",strokeWidth:"1.5",strokeLinecap:"round"})]})}),e("style",{children:"@keyframes vetc-btn-spin { to { transform: rotate(360deg); } }"})]});if(!a&&!i)return k;const S=t("span",{style:{display:"flex",flexDirection:"column",gap:"var(--vetc-space-2)",flex:1},children:[a&&e("span",{style:{fontSize:"var(--vetc-font-size-base)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",color:x?"var(--vetc-color-text-disabled)":"var(--vetc-color-text-primary)"},children:a}),i&&e("span",{style:{fontSize:"var(--vetc-font-size-sm)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",color:x?"var(--vetc-color-text-disabled)":"var(--vetc-color-text-secondary)"},children:i})]});return e("div",{style:{display:"flex",alignItems:"center",gap:"var(--vetc-space-12)",flexDirection:"left"===n?"row-reverse":"row",fontFamily:"var(--vetc-font-family)",cursor:x?"not-allowed":"pointer",...p},onClick:w,children:t(r,"right"===n?{children:[k,S]}:{children:[S,k]})})}const ge={default:{bg:"var(--vetc-chip-default-bg)",border:"var(--vetc-chip-default-border)",text:"var(--vetc-chip-default-text)",filledBg:"var(--vetc-chip-default-filled-bg)"},brand:{bg:"var(--vetc-chip-brand-bg)",border:"var(--vetc-chip-brand-border)",text:"var(--vetc-chip-brand-text)",filledBg:"var(--vetc-chip-brand-filled-bg)"},positive:{bg:"var(--vetc-chip-positive-bg)",border:"var(--vetc-chip-positive-border)",text:"var(--vetc-chip-positive-text)",filledBg:"var(--vetc-chip-positive-filled-bg)"},negative:{bg:"var(--vetc-chip-negative-bg)",border:"var(--vetc-chip-negative-border)",text:"var(--vetc-chip-negative-text)",filledBg:"var(--vetc-chip-negative-filled-bg)"},warning:{bg:"var(--vetc-chip-warning-bg)",border:"var(--vetc-chip-warning-border)",text:"var(--vetc-chip-warning-text)",filledBg:"var(--vetc-chip-warning-filled-bg)"},info:{bg:"var(--vetc-chip-info-bg)",border:"var(--vetc-chip-info-border)",text:"var(--vetc-chip-info-text)",filledBg:"var(--vetc-chip-info-filled-bg)"}};function he({style:t="tinted",type:r="default",shape:a="pill",size:i="md",icon:n,closable:o=!1,onClose:l,onClick:d,children:v,className:s="",css:g,id:h}){const p=ge[r],f="md"===i?"var(--vetc-chip-height-md)":"var(--vetc-chip-height-sm)",b="md"===i?"var(--vetc-chip-padding-x-md)":"var(--vetc-chip-padding-x-sm)",u="md"===i?"var(--vetc-chip-font-size-md)":"var(--vetc-chip-font-size-sm)",y="pill"===a?"var(--vetc-chip-radius-pill)":"var(--vetc-chip-radius-rounded)";let m=p.bg,x=`1px solid ${p.border}`,w=p.text;return"filled"===t?(m=p.filledBg,x="none",w="var(--vetc-white)"):"outlined"===t&&(m="transparent",x=`1px solid ${p.border}`,w=p.text),e(c,{id:h,closable:o,onClose:e=>{e.preventDefault(),l?.()},onClick:d,icon:n,className:`vetc-chip vetc-chip--${t} vetc-chip--${r} ${s}`,style:{display:"inline-flex",alignItems:"center",height:f,padding:`0 ${b}`,borderRadius:y,background:m,border:x,color:w,fontSize:u,fontWeight:"var(--vetc-chip-font-weight)",fontFamily:"var(--vetc-font-family)",cursor:d?"pointer":"default",userSelect:"none",lineHeight:1,gap:"var(--vetc-space-4)",transition:"var(--vetc-transition-fast)",...g},children:v})}const pe={xl:"var(--vetc-avatar-size-xl)",lg:"var(--vetc-avatar-size-lg)",md:"var(--vetc-avatar-size-md)",sm:"var(--vetc-avatar-size-sm)",xs:"var(--vetc-avatar-size-xs)"},fe={xl:56,lg:48,md:40,sm:32,xs:24},be={xl:"var(--vetc-font-size-2xl)",lg:"var(--vetc-font-size-xl)",md:"var(--vetc-font-size-base)",sm:"var(--vetc-font-size-sm)",xs:"var(--vetc-font-size-2xs)"};function ue({src:t,alt:r,initials:a,icon:i,size:n="md",shape:o="circle",color:l,className:c="",style:v,onClick:s,id:g}){return e("span",{id:g,style:{display:"inline-flex",flexShrink:0,width:pe[n],height:pe[n]},children:e(d,{src:t,alt:r,icon:t||a?void 0:i,size:fe[n],shape:o,onClick:s,className:`vetc-avatar vetc-avatar--${n} ${c}`,style:{backgroundColor:t?void 0:l??"var(--vetc-avatar-bg-default)",fontSize:be[n],fontWeight:"var(--vetc-font-weight-bold)",fontFamily:"var(--vetc-font-family)",color:"var(--vetc-avatar-text-color)",cursor:s?"pointer":"default",flexShrink:0,...v},children:!t&&a?a.slice(0,2).toUpperCase():void 0})})}function ye({elevation:t="outlined",title:r,extra:a,children:i,onClick:n,className:o="",style:l,bodyStyle:c,id:d}){return e(v,{id:d,title:r,extra:a,onClick:n,className:`vetc-card vetc-card--${t} ${o}`,styles:{body:{padding:"var(--vetc-card-padding)",fontFamily:"var(--vetc-font-family)",...c},header:r?{borderBottom:"1px solid var(--vetc-card-border)",padding:"var(--vetc-space-12) var(--vetc-card-padding)"}:void 0},style:{borderRadius:"var(--vetc-card-radius)",border:{flat:"none",raised:"none",outlined:"1px solid var(--vetc-card-border)"}[t],boxShadow:{flat:"var(--vetc-shadow-none)",raised:"var(--vetc-card-shadow-raised)",outlined:"var(--vetc-shadow-none)"}[t],cursor:n?"pointer":"default",overflow:"hidden",backgroundColor:"var(--vetc-card-bg)",fontFamily:"var(--vetc-font-family)",transition:"box-shadow var(--vetc-transition-fast)",...l},children:i})}function me({disabled:t}){return e("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:e("path",{d:"M7.5 5L12.5 10L7.5 15",stroke:t?"var(--vetc-color-icon-disabled)":"var(--vetc-color-icon-muted)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function xe({leading:r,title:a,description:i,trailing:n,arrow:o=!1,divider:l=!0,onClick:c,disabled:d=!1,className:v="",style:s,id:g}){const h=!!c&&!d;return t("div",{id:g,role:h?"button":void 0,tabIndex:h?0:void 0,className:`vetc-list-item ${v}`,onClick:d?void 0:c,onKeyDown:h?e=>{"Enter"!==e.key&&" "!==e.key||c?.()}:void 0,style:{display:"flex",alignItems:"center",minHeight:"var(--vetc-list-item-height)",padding:"0 var(--vetc-list-item-padding-x)",gap:"var(--vetc-list-item-gap)",cursor:h?"pointer":"default",borderBottom:l?"1px solid var(--vetc-list-item-border)":"none",backgroundColor:"var(--vetc-list-item-bg)",opacity:d?.5:1,fontFamily:"var(--vetc-font-family)",transition:"background-color var(--vetc-transition-fast)",outline:"none",...s},onMouseEnter:e=>{h&&(e.currentTarget.style.backgroundColor="var(--vetc-list-item-bg-hover)")},onMouseLeave:e=>{h&&(e.currentTarget.style.backgroundColor="var(--vetc-list-item-bg)")},children:[r&&e("div",{style:{flexShrink:0,display:"flex",alignItems:"center",color:"var(--vetc-list-item-icon-color)"},children:r}),t("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:"var(--vetc-space-2)"},children:[e("span",{style:{fontSize:"var(--vetc-list-item-title-size)",fontWeight:"var(--vetc-list-item-title-weight)",color:d?"var(--vetc-color-text-disabled)":"var(--vetc-list-item-title-color)",lineHeight:"var(--vetc-line-height-relaxed)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a}),i&&e("span",{style:{fontSize:"var(--vetc-list-item-desc-size)",fontWeight:"var(--vetc-font-weight-regular)",color:d?"var(--vetc-color-text-disabled)":"var(--vetc-list-item-desc-color)",lineHeight:"var(--vetc-line-height-relaxed)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:i})]}),(n||o)&&t("div",{style:{flexShrink:0,display:"flex",alignItems:"center",gap:"var(--vetc-space-8)",color:"var(--vetc-list-item-icon-color)"},children:[n,o&&e(me,{disabled:d})]})]})}function we({items:t,renderItem:r,bordered:a=!1,className:i="",style:n,id:o}){return e("div",{id:o,className:`vetc-list ${i}`,style:{border:a?"1px solid var(--vetc-color-border-variant)":"none",borderRadius:a?"var(--vetc-card-radius)":0,overflow:"hidden",backgroundColor:"var(--vetc-color-bg)",...n},children:t.map((t,a)=>e(u.Fragment,{children:r(t,a)},a))})}function ke({orientation:t="horizontal",label:r,labelAlign:a="center",thickness:i=1,color:n,margin:o,className:l="",style:c}){const d="vertical"===t;return e(s,{type:d?"vertical":"horizontal",orientationMargin:"center"!==a?0:void 0,orientation:"center"!==a?a:void 0,className:`vetc-divider ${l}`,style:{borderColor:n??"var(--vetc-divider-color)",borderTopWidth:d?void 0:i,borderLeftWidth:d?i:void 0,margin:o??(d?"0 var(--vetc-divider-margin-v)":"var(--vetc-divider-margin-h) 0"),fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-divider-label-size)",color:"var(--vetc-divider-label-color)",...c},children:r})}const Se={sm:16,md:24,lg:40};function ze({size:t="md",color:r,fullscreen:a=!1,tip:i,children:n,spinning:o=!0,className:l="",style:c}){const d=e(w,{style:{fontSize:Se[t],color:r??"var(--vetc-spinner-color)"},spin:!0});return n?e(h,{spinning:o,indicator:d,tip:i,className:`vetc-spinner ${l}`,style:c,children:n}):e("div",a?{className:`vetc-spinner-overlay ${l}`,style:{position:"fixed",inset:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--vetc-color-overlay)",zIndex:9999,...c},children:e(h,{spinning:o,indicator:d,tip:i})}:{className:`vetc-spinner ${l}`,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",...c},children:e(h,{spinning:o,indicator:d,tip:i})})}function Ce({rows:t=3,avatar:r=!1,avatarSize:a=40,title:i=!0,loading:n=!0,className:o="",style:l,children:c}){return e(g,{active:!0,loading:n,avatar:!!r&&{size:a,shape:"circle"},title:i,paragraph:{rows:t},className:`vetc-skeleton ${o}`,style:l,children:c})}const He={borderRadius:"var(--vetc-toast-radius)",fontFamily:"var(--vetc-font-family)"},We={show(e){const{type:t="default",message:r,description:a,duration:i=3,placement:n="top",icon:o,onClose:l}=e;"default"!==t?f[t]({message:r,description:a,duration:i,placement:n,icon:o,onClose:l,style:He}):p.open({type:"info",content:r,duration:i,onClose:l})},success:(e,t)=>We.show({message:e,description:t,type:"success"}),error:(e,t)=>We.show({message:e,description:t,type:"error"}),warning:(e,t)=>We.show({message:e,description:t,type:"warning"}),info:(e,t)=>We.show({message:e,description:t,type:"info"})};function Be(){const[e,t]=f.useNotification(),r=t=>{const{type:r="info",message:a,description:i,duration:n=3,placement:o="top",icon:l,onClose:c}=t;e["default"===r?"info":r]({message:a,description:i,duration:n,placement:o,icon:l,onClose:c,style:He})};return{contextHolder:t,toast:{show:r,success:(e,t)=>r({message:e,description:t,type:"success"}),error:(e,t)=>r({message:e,description:t,type:"error"}),warning:(e,t)=>r({message:e,description:t,type:"warning"}),info:(e,t)=>r({message:e,description:t,type:"info"})}}}const Le={height:"var(--vetc-btn-height-lg)",borderRadius:"var(--vetc-btn-radius-lg)",fontWeight:"var(--vetc-btn-font-weight)",fontSize:"var(--vetc-btn-font-size-lg)",fontFamily:"var(--vetc-font-family)"};function Fe({open:t,title:r,children:a,footer:i,okText:n="Xác nhận",cancelText:o="Hủy",okDisabled:l=!1,okLoading:c=!1,okDanger:d=!1,onOk:v,onCancel:s,maskClosable:g=!0,closable:h=!0,width:p,className:f="",style:u,id:y}){return e(b,{open:t,title:r,okText:n,cancelText:o,okButtonProps:{disabled:l,loading:c,danger:d,style:Le},cancelButtonProps:{style:Le},footer:null===i?null:i,onOk:v,onCancel:s,maskClosable:g,closable:h,width:p??"var(--vetc-modal-width)",centered:!0,className:`vetc-modal ${f}`,style:{fontFamily:"var(--vetc-font-family)",...u},styles:{header:{padding:"var(--vetc-modal-padding) var(--vetc-modal-padding) 0",borderBottom:"none"},body:{padding:"var(--vetc-space-8) var(--vetc-modal-padding) var(--vetc-modal-padding)"},footer:{padding:"0 var(--vetc-modal-padding) var(--vetc-modal-padding)",borderTop:"none"},mask:{backgroundColor:"var(--vetc-modal-overlay)"}},children:a})}function Ne(){return{confirm:e=>{b.confirm({title:e.title,content:e.content,okText:e.okText??"Xác nhận",cancelText:e.cancelText??"Hủy",okButtonProps:{danger:e.okDanger,style:{...Le,height:40}},cancelButtonProps:{style:{...Le,height:40}},centered:!0,onOk:e.onOk,onCancel:e.onCancel,styles:{mask:{backgroundColor:"var(--vetc-modal-overlay)"}}})}}}function Me({open:a,image:i,title:n,description:o,okText:l="Xác nhận",cancelText:c="Hủy",okDisabled:d=!1,okLoading:v=!1,okDanger:s=!1,onOk:g,onCancel:h,maskClosable:p=!0}){if(m(()=>(document.body.style.overflow=a?"hidden":"",()=>{document.body.style.overflow=""}),[a]),!a)return null;const f=n||o;return e(r,{children:k(e("div",{style:{position:"fixed",inset:0,backgroundColor:"var(--vetc-dialog-overlay)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,padding:"0 var(--vetc-space-24)"},onClick:p?h:void 0,children:t("div",{style:{width:"100%",maxWidth:"var(--vetc-dialog-width)",backgroundColor:"var(--vetc-dialog-bg)",borderRadius:"var(--vetc-dialog-radius)",overflow:"hidden",boxShadow:"var(--vetc-shadow-lg)",fontFamily:"var(--vetc-font-family)"},onClick:e=>e.stopPropagation(),children:[i&&e("div",{style:{width:"100%",height:"var(--vetc-dialog-image-height)",overflow:"hidden",flexShrink:0},children:e("img",{src:i,alt:"",style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})}),f&&t("div",{style:{padding:"var(--vetc-dialog-padding)"},children:[n&&e("div",{style:{fontSize:"var(--vetc-dialog-title-size)",fontWeight:"var(--vetc-dialog-title-weight)",color:"var(--vetc-color-text-primary)",lineHeight:"var(--vetc-line-height-relaxed)",marginBottom:o?"var(--vetc-space-8)":0},children:n}),o&&e("div",{style:{fontSize:"var(--vetc-dialog-desc-size)",color:"var(--vetc-dialog-desc-color)",lineHeight:"var(--vetc-line-height-relaxed)"},children:o})]}),t("div",{style:{display:"flex",gap:"var(--vetc-dialog-btn-gap)",padding:f?"0 var(--vetc-dialog-padding) var(--vetc-dialog-padding)":"var(--vetc-dialog-padding)"},children:[h&&e(P,{block:!0,style:"outlined",variant:"neutral",onClick:h,children:c}),e(P,{block:!0,style:s?"danger":"filled",loading:v,disabled:d,onClick:g,children:l})]})]})}),document.body)})}function Ie({open:a,title:i,children:n,maskClosable:o=!0,showHandle:l=!0,maxHeight:c="90vh",onClose:d,className:v="",style:s,id:g}){return m(()=>(document.body.style.overflow=a?"hidden":"",()=>{document.body.style.overflow=""}),[a]),a?t(r,{children:[e("div",{className:"vetc-bottom-sheet-overlay","aria-hidden":"true",onClick:()=>o&&d?.(),style:{position:"fixed",inset:0,backgroundColor:"var(--vetc-sheet-overlay)",zIndex:1e3,animation:"vetc-fade-in var(--vetc-transition-base)"}}),t("div",{id:g,role:"dialog","aria-modal":"true",className:`vetc-bottom-sheet ${v}`,style:{position:"fixed",bottom:0,left:0,right:0,backgroundColor:"var(--vetc-sheet-bg)",borderRadius:"var(--vetc-sheet-radius) var(--vetc-sheet-radius) 0 0",maxHeight:c,overflowY:"auto",zIndex:1001,fontFamily:"var(--vetc-font-family)",animation:"vetc-slide-up var(--vetc-transition-slow) cubic-bezier(0.32, 0.72, 0, 1)",...s},children:[l&&e("div",{style:{display:"flex",justifyContent:"center",paddingTop:"var(--vetc-space-8)",paddingBottom:"var(--vetc-space-4)"},children:e("div",{style:{width:"var(--vetc-sheet-handle-width)",height:"var(--vetc-sheet-handle-height)",borderRadius:"var(--vetc-radius-pill)",backgroundColor:"var(--vetc-sheet-handle-color)"}})}),i&&t("div",{style:{padding:"var(--vetc-space-12) var(--vetc-sheet-padding)",borderBottom:"1px solid var(--vetc-sheet-border)",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e("span",{style:{fontSize:"var(--vetc-sheet-title-size)",fontWeight:"var(--vetc-sheet-title-weight)",color:"var(--vetc-sheet-title-color)",lineHeight:"var(--vetc-line-height-relaxed)"},children:i}),d&&e("button",{onClick:d,"aria-label":"Đóng",style:{background:"none",border:"none",cursor:"pointer",padding:"var(--vetc-space-4)",display:"flex",color:"var(--vetc-color-icon-muted)",borderRadius:"var(--vetc-radius-pill)",transition:"background-color var(--vetc-transition-fast)"},children:e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:e("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),e("div",{style:{padding:"var(--vetc-sheet-padding)"},children:n})]}),e("style",{children:"\n @keyframes vetc-fade-in {\n from { opacity: 0 }\n to { opacity: 1 }\n }\n @keyframes vetc-slide-up {\n from { transform: translateY(100%) }\n to { transform: translateY(0) }\n }\n "})]}):null}function Ae(){return e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:e("path",{d:"M15 19L8 12L15 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function Re(){return e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:e("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}const Te={background:"none",border:"none",cursor:"pointer",width:"var(--vetc-nav-icon-btn-size)",height:"var(--vetc-nav-icon-btn-size)",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"var(--vetc-radius-pill)",color:"var(--vetc-nav-icon-color)",flexShrink:0,padding:0,transition:"background-color var(--vetc-transition-fast)"};function $e({title:r,leading:a="none",leadingIcon:i,onLeadingPress:n,actions:o=[],leftSlot:l,rightSlot:c,backgroundColor:d,divider:v=!0,transparent:s=!1,className:g="",style:h,id:p,showBack:f,backIcon:b,onBack:u,left:y,right:m}){const x=f?"back":a,w=i??b,k=n??u;return t("header",{id:p,className:`vetc-nav-bar ${g}`,style:{display:"flex",alignItems:"center",height:"var(--vetc-nav-height)",padding:"0 var(--vetc-nav-padding-x)",backgroundColor:s?"transparent":d??"var(--vetc-nav-bg)",borderBottom:v&&!s?"1px solid var(--vetc-nav-border)":"none",fontFamily:"var(--vetc-font-family)",position:"relative",...h},children:[e("div",{style:{display:"flex",alignItems:"center",minWidth:"var(--vetc-nav-icon-btn-size)",zIndex:1},children:(()=>{if(void 0!==l||void 0!==y)return l??y;if("none"===x)return null;const t=w??e("close"===x?Re:Ae,{});return e("button",{onClick:k,style:Te,"aria-label":"close"===x?"Đóng":"Quay lại",children:t})})()}),r&&e("div",{style:{position:"absolute",left:0,right:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"},children:e("span",{style:{fontSize:"var(--vetc-nav-title-size)",fontWeight:"var(--vetc-nav-title-weight)",color:"var(--vetc-nav-title-color)",lineHeight:"var(--vetc-line-height-normal)",maxWidth:"60%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r})}),e("div",{style:{display:"flex",alignItems:"center",gap:"var(--vetc-space-4)",marginLeft:"auto",zIndex:1},children:void 0!==c||void 0!==m?c??m:o.slice(0,2).map((t,r)=>e("button",{id:t.id,onClick:t.onClick,disabled:t.disabled,"aria-label":t.label,style:{...Te,opacity:t.disabled?.4:1},children:t.icon},r))})]})}function De({items:r,activeKey:a,onChange:i,variant:n="brand",backgroundColor:o,divider:l=!0,className:c="",style:d,id:v}){const s="brand"===n?"var(--vetc-tab-color-active)":"var(--vetc-color-text-primary)";return e("nav",{id:v,className:`vetc-tab-bar ${c}`,style:{display:"flex",alignItems:"stretch",height:"var(--vetc-tab-height)",backgroundColor:o??"var(--vetc-tab-bg)",borderTop:l?"1px solid var(--vetc-tab-border)":"none",fontFamily:"var(--vetc-font-family)",...d},children:r.map(r=>{const n=r.key===a,o=r.disabled?"var(--vetc-tab-color-disabled)":n?s:"var(--vetc-tab-color-inactive)";return t("button",{disabled:r.disabled,onClick:()=>!r.disabled&&i?.(r.key),"aria-current":n?"page":void 0,"aria-label":r.label,className:"vetc-tab-bar__item"+(n?" vetc-tab-bar__item--active":""),style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"var(--vetc-space-2)",background:"none",border:"none",cursor:r.disabled?"not-allowed":"pointer",padding:"var(--vetc-space-6) 0",position:"relative",opacity:r.disabled?.5:1,transition:"color var(--vetc-transition-fast)",color:o},children:[t("div",{style:{position:"relative",display:"inline-flex"},children:[e("span",{style:{color:o,display:"flex",fontSize:"24px",lineHeight:1},children:n&&r.activeIcon?r.activeIcon:r.icon}),void 0!==r.badge&&e("span",{style:{position:"absolute",top:"calc(-1 * var(--vetc-space-4))",right:"calc(-1 * var(--vetc-space-8))",minWidth:"var(--vetc-tab-badge-size)",height:"var(--vetc-tab-badge-size)",backgroundColor:"var(--vetc-tab-badge-bg)",borderRadius:"var(--vetc-radius-pill)",fontSize:"var(--vetc-tab-badge-font-size)",fontWeight:"var(--vetc-font-weight-semibold)",color:"var(--vetc-tab-badge-text)",display:"flex",alignItems:"center",justifyContent:"center",padding:"0 var(--vetc-space-4)",lineHeight:1},children:r.badge})]}),e("span",{style:{fontSize:"var(--vetc-tab-label-size)",fontWeight:"var(--vetc-tab-label-weight)",color:o,lineHeight:"var(--vetc-line-height-relaxed)"},children:r.label})]},r.key)})})}const Oe="undefined"!=typeof window,Pe=(e,t={})=>{const r=Oe&&window.flutter_inappwebview&&window.flutter_inappwebview.callHandler&&"function"==typeof window.flutter_inappwebview.callHandler?window.flutter_inappwebview:null;return r?r.callHandler("MiniAppBridge",{action:e,payload:t}):Promise.resolve({ok:!1,error:"BRIDGE_CALL_FAILED"})};let je=new Map,Xe="/";function Ee(){return je.get(Xe)}function Ve(e){Xe=e}function _e({config:t}){const[r,a]=y(null);if(m(()=>{!function(e){je=new Map(e.pages.map(e=>[e.path,e]))}(t);Ve((window.location.pathname||"/").replace("/miniapp","")||"/");let e=Ee()??null;!e&&t.pages.length>0&&(Ve(t.pages[0].path),e=Ee()??null),a(e),Pe("registerAppConfig",{config:t}).catch(e=>{console.error("[App] registerAppConfigError:",e)})},[t]),!r)return e("div",{});const i=r.Component;return e(i,{})}function qe(e){const t=x(e);m(()=>{t.current=e},[e]),m(()=>{if("undefined"==typeof window||!window.MiniApp)return;const e=window.MiniApp,r=()=>{try{t.current?.()}catch(e){console.error("[useAppResume error]",e)}};return e.on("appResume",r),()=>e.off("appResume",r)},[])}function Ge(e){const t=x(e);m(()=>{t.current=e},[e]),m(()=>{if("undefined"==typeof window||!window.MiniApp)return;const e=window.MiniApp,r=()=>{try{t.current?.()}catch(e){console.error("[useAppPause error]",e)}};return e.on("appPause",r),()=>e.off("appPause",r)},[])}function Qe(e,t){const r=x(t);m(()=>{r.current=t},[t]),m(()=>{if("undefined"==typeof window||!window.MiniApp)return;const t=window.MiniApp,a=t=>{t?.route===e&&r.current?.(t)};return t.on("didShow",a),()=>t.off("didShow",a)},[e])}function Ye(e,t){const r=x(t);m(()=>{r.current=t},[t]),m(()=>{if("undefined"==typeof window||!window.MiniApp)return;const t=window.MiniApp,a=t=>{t?.route===e&&r.current?.(t)};return t.on("didHide",a),()=>t.off("didHide",a)},[e])}function Ke(e,t){const r=x(t);m(()=>{r.current=t},[t]),m(()=>{if("undefined"==typeof window||!window.MiniApp)return;const t=window.MiniApp,a=t=>{t?.route===e&&r.current?.(t)};return t.on("onTapAppBar",a),()=>t.off("onTapAppBar",a)},[e])}function Ue(){return(e,t={},r={})=>{"number"!=typeof e?Pe("navigate",{type:"native",action:"push",route:e,params:t,options:r}).catch(console.error):Pe("navigate",{type:"native",action:"pop",delta:Math.abs(e)})}}function Je(e){const t=x(e);m(()=>{t.current=e},[e]),m(()=>{if("undefined"==typeof window||!window.MiniApp)return;const e=window.MiniApp,r=e=>{try{t.current?.(e)}catch(e){console.error("[useListenerScanQr error]",e)}};return e.on("scanQrResult",r),()=>e.off("scanQrResult",r)},[])}export{_e as App,ue as Avatar,Y as Body,Ie as BottomSheet,P as Button,j as ButtonGroup,ye as Card,le as Checkbox,ce as CheckboxGroup,he as Chip,Me as Dialog,_ as Display,ke as Divider,q as Headline,Z as Input,Q as Label,we as List,xe as ListItem,Fe as Modal,$e as NavigationBar,ee as PasswordInput,de as Radio,ve as RadioGroup,ie as Select,Ce as SkeletonLoader,ze as Spinner,se as Switch,De as TabBar,ae as Textarea,G as Title,V as Typography,H as VETCProvider,A as borderRadius,z as colorAlias,S as colorGlobal,R as componentHeight,W as fontFamily,L as fontSize,B as fontWeight,N as letterSpacing,F as lineHeight,T as shadow,I as spacing,M as textStyle,We as toast,Ge as useAppPause,qe as useAppResume,Ne as useConfirm,Ye as useDidHide,Qe as useDidShow,Je as useListenerScanQr,Ue as useNavigate,Ke as useTapAppBar,Be as useToast,C as vetcAntdTheme};
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import{ConfigProvider as a,theme as i,App as n,Input as o,Select as l,Tag as c,Avatar as d,Card as s,Divider as v,Skeleton as g,Spin as h,message as p,notification as f,Modal as b}from"antd";import u,{useState as y,useEffect as m,useRef as x}from"react";import{LoadingOutlined as w}from"@ant-design/icons";import{createPortal as k}from"react-dom";const S={white:"#ffffff",black:"#000000",blue02:"#f4fbff",blue05:"#e4f4ff",blue10:"#cae9ff",blue15:"#afddff",blue20:"#95d1ff",blue25:"#7ac4fb",blue30:"#60b6f4",blue35:"#45a8eb",blue40:"#2b99df",blue45:"#108ad1",blue50:"#007ac1",blue60:"#005c9e",blue70:"#004179",blue80:"#002853",blue90:"#00122a",green02:"#f2fef2",green05:"#dffbdf",green10:"#bff4bf",green15:"#9feca7",green20:"#82e194",green25:"#68d583",green30:"#50c775",green35:"#39b669",green40:"#25a45e",green45:"#23965b",green50:"#208758",green60:"#1b6b4d",green70:"#15503f",green80:"#0f342d",green90:"#081a18",gray02:"#f9fafa",gray05:"#f1f1f2",gray10:"#e3e4e6",gray15:"#d4d6d9",gray20:"#c6c8cc",gray25:"#b8babf",gray30:"#abacb2",gray35:"#9d9ea5",gray40:"#8f9098",gray45:"#82828a",gray50:"#74747d",gray60:"#5e5d64",gray70:"#47464b",gray80:"#2f2f32",gray90:"#181719",red02:"#fff6f9",red05:"#ffe7f0",red10:"#ffd0de",red15:"#ffb8cc",red20:"#ffa1b8",red25:"#ff89a3",red30:"#fb718d",red35:"#f55c78",red40:"#ee4b62",red45:"#e53b4d",red50:"#da2c39",red60:"#b4211f",red70:"#852419",red80:"#571f12",red90:"#2b130a",orange02:"#fffbf0",orange05:"#fff3da",orange10:"#ffe3b4",orange15:"#ffd08f",orange20:"#ffbb69",orange25:"#ffa447",orange30:"#ff8c2f",orange35:"#ef7720",orange40:"#dd6e1d",orange45:"#cb651b",orange50:"#b85c18",orange60:"#934913",orange70:"#6f370f",orange80:"#4a250a",orange90:"#251205",yellow02:"#fff8e7",yellow05:"#ffefbc",yellow10:"#ffe374",yellow15:"#ffd62b",yellow20:"#f9c600",yellow25:"#e9b900",yellow30:"#daaa00",yellow35:"#ca9b00",yellow40:"#bb8b00",yellow45:"#ab7b00",yellow50:"#9c6b00",yellow60:"#7c4b00",yellow70:"#5d2f00",yellow80:"#3e1800",yellow90:"#1f0700"},z={brand:S.green40,brandDark:S.green50,brandLight:S.green05,positive:S.green50,positiveVariant:S.green05,onPositive:S.white,onPositiveVariant:S.green60,negative:S.red50,onNegative:S.white,warning:S.orange30,onWarning:S.white,outline:S.gray50,outlineVariant:S.gray10,outlineInverse:S.gray40,theme:S.white,themeVariant:S.gray05,inverseTheme:S.gray90,primaryOnTheme:S.gray90,secondaryOnTheme:S.gray60,primaryOnInverseTheme:S.white,secondaryOnInverseTheme:S.gray20,disabledBackground:S.gray10,disabledContent:S.gray30,disabledOutline:S.gray20,overlay:"rgba(0, 0, 0, 0.4)",overlayVariant:"rgba(0, 0, 0, 0.16)",skeleton:"rgba(0, 0, 0, 0.1)"},C={token:{colorPrimary:z.brand,colorPrimaryHover:S.green35,colorPrimaryActive:z.brandDark,colorPrimaryBg:S.green02,colorPrimaryBgHover:S.green05,colorError:z.negative,colorErrorHover:S.red60,colorErrorBg:S.red02,colorWarning:z.warning,colorWarningBg:S.orange02,colorSuccess:z.positive,colorSuccessBg:S.green02,colorText:z.primaryOnTheme,colorTextSecondary:z.secondaryOnTheme,colorTextDisabled:z.disabledContent,colorTextPlaceholder:S.gray50,colorBgContainer:z.theme,colorBgLayout:z.themeVariant,colorBgSpotlight:z.inverseTheme,colorBorder:S.gray20,colorBorderSecondary:S.gray10,colorSplit:S.gray10,colorFill:S.gray05,colorFillSecondary:S.gray10,colorFillTertiary:S.gray15,fontFamily:'"Roboto", system-ui, -apple-system, sans-serif',fontSize:16,fontSizeSM:13,fontSizeLG:18,fontSizeXL:19,fontSizeHeading1:32,fontSizeHeading2:28,fontSizeHeading3:24,fontSizeHeading4:19,fontSizeHeading5:16,fontWeightStrong:600,lineHeight:1.5,borderRadius:8,borderRadiusSM:6,borderRadiusLG:12,borderRadiusXS:4,controlHeight:48,controlHeightSM:32,controlHeightLG:56,paddingXS:8,paddingSM:12,padding:16,paddingMD:16,paddingLG:24,motionDurationFast:"150ms",motionDurationMid:"250ms"},components:{Button:{primaryColor:"#ffffff",defaultBorderColor:S.gray20,defaultColor:z.primaryOnTheme,borderRadius:12,borderRadiusSM:8,borderRadiusLG:12,controlHeight:48,controlHeightSM:32,paddingInline:16,paddingInlineSM:12,fontWeight:600},Input:{borderRadius:8,controlHeight:48,paddingInline:12,colorBorder:S.gray20,hoverBorderColor:z.outline,activeBorderColor:z.brand,colorBgContainer:z.theme,hoverBg:z.theme,activeBg:z.theme},Select:{borderRadius:8,controlHeight:48},Checkbox:{borderRadius:4,controlInteractiveSize:20},Radio:{radioSize:20,dotSize:8},Switch:{trackHeight:32,trackMinWidth:52,handleSize:28,colorPrimary:z.brand},Modal:{borderRadiusLG:16,paddingContentHorizontalLG:16,paddingMD:16},Card:{borderRadius:16,paddingLG:16}}};function H({children:t}){return e(a,{theme:{...C,algorithm:i.defaultAlgorithm},children:e(n,{children:t})})}const W={primary:'"Roboto", system-ui, -apple-system, sans-serif'},B={regular:400,medium:500,semibold:600,bold:700,black:900},L={"2xs":"10px",xs:"12px",sm:"14px",base:"16px",lg:"20px",xl:"24px","2xl":"28px","3xl":"32px","4xl":"36px"},F={tight:"120%",normal:"140%",relaxed:"150%"},N={none:"0",sm:"0.1px",md:"0.25px",lg:"0.5px"},M={display4xl:{fontSize:L["4xl"],fontWeight:B.bold,lineHeight:F.tight},display3xl:{fontSize:L["3xl"],fontWeight:B.bold,lineHeight:F.tight},display2xl:{fontSize:L["2xl"],fontWeight:B.bold,lineHeight:F.tight},headlineXl:{fontSize:L.xl,fontWeight:B.bold,lineHeight:F.normal},headlineLg:{fontSize:L.lg,fontWeight:B.semibold,lineHeight:F.normal},titleBase:{fontSize:L.base,fontWeight:B.semibold,lineHeight:F.relaxed,letterSpacing:N.sm},titleSm:{fontSize:L.sm,fontWeight:B.semibold,lineHeight:F.relaxed,letterSpacing:N.sm},labelBase:{fontSize:L.base,fontWeight:B.semibold,lineHeight:F.relaxed},labelSm:{fontSize:L.sm,fontWeight:B.semibold,lineHeight:F.relaxed,letterSpacing:N.lg},labelXs:{fontSize:L.xs,fontWeight:B.semibold,lineHeight:F.relaxed,letterSpacing:N.lg},bodyBase:{fontSize:L.base,fontWeight:B.regular,lineHeight:F.relaxed,letterSpacing:N.sm},bodySm:{fontSize:L.sm,fontWeight:B.regular,lineHeight:F.relaxed,letterSpacing:N.md},bodyXs:{fontSize:L.xs,fontWeight:B.regular,lineHeight:F.relaxed,letterSpacing:N.lg},body2xs:{fontSize:L["2xs"],fontWeight:B.regular,lineHeight:F.relaxed,letterSpacing:N.lg}},I={0:"0px",1:"1px",2:"2px",4:"4px",6:"6px",8:"8px",10:"10px",12:"12px",14:"14px",16:"16px",20:"20px",24:"24px",32:"32px",40:"40px",48:"48px",56:"56px",64:"64px",72:"72px",80:"80px"},T={none:"0px",xs:"4px",sm:"6px",md:"8px",lg:"12px",xl:"16px","2xl":"24px",pill:"1000px"},A={buttonLg:"48px",buttonSm:"32px",input:"48px",navBar:"56px",bottomNav:"56px",tabBar:"56px",listItem:"56px",chip:"32px",chipSm:"24px",iconStd:"24px",iconSm:"20px"},R={none:"none",sm:"0 1px 4px rgba(0, 0, 0, 0.08)",md:"0 2px 8px rgba(0, 0, 0, 0.12)",lg:"0 4px 16px rgba(0, 0, 0, 0.16)"},$={filled:{bg:"var(--vetc-color-brand)",bgHover:"var(--vetc-color-brand-hover)",bgActive:"var(--vetc-color-brand-active)",text:"var(--vetc-white)",border:"transparent",shadow:"none"},outlined:{bg:"transparent",bgHover:"var(--vetc-green-02)",bgActive:"var(--vetc-green-05)",text:"var(--vetc-color-brand)",border:"var(--vetc-color-brand)",shadow:"none"},elevated:{bg:"var(--vetc-color-bg)",bgHover:"var(--vetc-color-bg-hover)",bgActive:"var(--vetc-color-bg-pressed)",text:"var(--vetc-color-brand)",border:"transparent",shadow:"var(--vetc-shadow-md)"},ghost:{bg:"transparent",bgHover:"var(--vetc-color-bg-hover)",bgActive:"var(--vetc-color-bg-pressed)",text:"var(--vetc-color-brand)",border:"transparent",shadow:"none"},danger:{bg:"var(--vetc-color-negative)",bgHover:"var(--vetc-red-60)",bgActive:"var(--vetc-red-60)",text:"var(--vetc-white)",border:"transparent",shadow:"none"},"danger-outlined":{bg:"transparent",bgHover:"var(--vetc-red-02)",bgActive:"var(--vetc-red-05)",text:"var(--vetc-color-negative)",border:"var(--vetc-color-negative)",shadow:"none"}},D={filled:{bg:"var(--vetc-gray-90)",bgHover:"var(--vetc-gray-80)",bgActive:"var(--vetc-gray-70)",text:"var(--vetc-white)",border:"transparent",shadow:"none"},outlined:{bg:"transparent",bgHover:"var(--vetc-gray-05)",bgActive:"var(--vetc-gray-10)",text:"var(--vetc-gray-90)",border:"var(--vetc-gray-90)",shadow:"none"},elevated:{bg:"var(--vetc-color-bg)",bgHover:"var(--vetc-color-bg-hover)",bgActive:"var(--vetc-color-bg-pressed)",text:"var(--vetc-color-text-primary)",border:"transparent",shadow:"var(--vetc-shadow-md)"},ghost:{bg:"transparent",bgHover:"var(--vetc-color-bg-hover)",bgActive:"var(--vetc-color-bg-pressed)",text:"var(--vetc-color-text-primary)",border:"transparent",shadow:"none"},danger:{bg:"var(--vetc-color-negative)",bgHover:"var(--vetc-red-60)",bgActive:"var(--vetc-red-60)",text:"var(--vetc-white)",border:"transparent",shadow:"none"},"danger-outlined":{bg:"transparent",bgHover:"var(--vetc-red-02)",bgActive:"var(--vetc-red-05)",text:"var(--vetc-color-negative)",border:"var(--vetc-color-negative)",shadow:"none"}},O=({color:r})=>t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",style:{animation:"vetc-btn-spin 0.6s linear infinite",flexShrink:0},"aria-hidden":"true",children:[e("circle",{cx:"8",cy:"8",r:"6",stroke:r,strokeOpacity:"0.25",strokeWidth:"2"}),e("path",{d:"M8 2a6 6 0 016 6",stroke:r,strokeWidth:"2",strokeLinecap:"round"})]});function P({style:a="filled",variant:i="brand",size:n="lg",shape:o="rounded",block:l=!1,disabled:c=!1,loading:d=!1,icon:s,iconRight:v,onClick:g,children:h,htmlType:p="button",className:f="",css:b,id:u}){const[m,x]=y(!1),[w,k]=y(!1),S=("neutral"===i?D:$)[a],z=c||d,C="lg"===n?"var(--vetc-btn-height-lg)":"var(--vetc-btn-height-sm)",H="lg"===n?"var(--vetc-btn-font-size-lg)":"var(--vetc-btn-font-size-sm)",W="lg"===n?"var(--vetc-btn-padding-x-lg)":"var(--vetc-btn-padding-x-sm)",B="pill"===o?"var(--vetc-btn-radius-pill)":"lg"===n?"var(--vetc-btn-radius-lg)":"var(--vetc-btn-radius-sm)";let L=S.bg,F=S.border,N=S.shadow;z?(L="var(--vetc-btn-disabled-bg)",F="var(--vetc-btn-disabled-border)",N="none"):m?L=S.bgActive:w&&(L=S.bgHover);const M=z?"var(--vetc-btn-disabled-text)":S.text,I=z?"var(--vetc-gray-30)":S.text;return t(r,{children:[t("button",{id:u,type:p,disabled:z,onClick:g,onMouseEnter:()=>k(!0),onMouseLeave:()=>{k(!1),x(!1)},onMouseDown:()=>x(!0),onMouseUp:()=>x(!1),className:`vetc-btn vetc-btn--${a} vetc-btn--${i} vetc-btn--${n} ${f}`,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"var(--vetc-space-8)",height:C,width:l?"100%":void 0,paddingInline:W,borderRadius:B,border:`1px solid ${F}`,backgroundColor:L,boxShadow:N,color:M,fontSize:H,fontWeight:"var(--vetc-btn-font-weight)",fontFamily:"var(--vetc-font-family)",lineHeight:"var(--vetc-line-height-relaxed)",cursor:z?"not-allowed":"pointer",transition:"background-color var(--vetc-transition-fast), box-shadow var(--vetc-transition-fast)",userSelect:"none",outline:"none",whiteSpace:"nowrap",WebkitTapHighlightColor:"transparent",...b},children:[d?e(O,{color:I}):s&&e("span",{style:{display:"inline-flex",flexShrink:0},children:s}),h&&e("span",{children:h}),v&&!d&&e("span",{style:{display:"inline-flex",flexShrink:0},children:v})]}),e("style",{children:"@keyframes vetc-btn-spin { to { transform: rotate(360deg); } }"})]})}function j({primary:a,secondary:i=[],content:n,layout:o="inline",variant:l="none"}){const c="inline"===o,d="bounding"===l?{backgroundColor:"var(--vetc-btn-group-bg)",borderTop:"1px solid var(--vetc-btn-group-border-color)",padding:"var(--vetc-btn-group-padding)",fontFamily:"var(--vetc-font-family)"}:{fontFamily:"var(--vetc-font-family)"},s=c?{display:"flex",gap:"var(--vetc-btn-group-gap)",alignItems:"stretch"}:{display:"flex",flexDirection:"column",gap:"var(--vetc-btn-group-gap)"},v=i.map((t,r)=>e(P,{style:"outlined",variant:"neutral",block:!c,loading:t.loading,disabled:t.disabled,onClick:t.onClick,css:c?{flex:1}:void 0,children:t.label},r)),g=e(P,{style:a.danger?"danger":"filled",variant:a.variant??"brand",block:!c,loading:a.loading,disabled:a.disabled,onClick:a.onClick,css:c?{flex:1}:void 0,children:a.label});return t("div",{style:d,children:[n&&e("div",{style:{marginBottom:"var(--vetc-btn-group-padding)"},children:n}),e("div",{style:s,children:t(r,c?{children:[v,g]}:{children:[g,v]})})]})}const X={display4xl:{fontSize:"var(--vetc-font-size-4xl)",fontWeight:"var(--vetc-font-weight-bold)",lineHeight:"var(--vetc-line-height-tight)"},display3xl:{fontSize:"var(--vetc-font-size-3xl)",fontWeight:"var(--vetc-font-weight-bold)",lineHeight:"var(--vetc-line-height-tight)"},display2xl:{fontSize:"var(--vetc-font-size-2xl)",fontWeight:"var(--vetc-font-weight-bold)",lineHeight:"var(--vetc-line-height-tight)"},headlineXl:{fontSize:"var(--vetc-font-size-xl)",fontWeight:"var(--vetc-font-weight-bold)",lineHeight:"var(--vetc-line-height-normal)"},headlineLg:{fontSize:"var(--vetc-font-size-lg)",fontWeight:"var(--vetc-font-weight-semibold)",lineHeight:"var(--vetc-line-height-normal)"},titleBase:{fontSize:"var(--vetc-font-size-base)",fontWeight:"var(--vetc-font-weight-semibold)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-sm)"},titleSm:{fontSize:"var(--vetc-font-size-sm)",fontWeight:"var(--vetc-font-weight-semibold)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-sm)"},labelBase:{fontSize:"var(--vetc-font-size-base)",fontWeight:"var(--vetc-font-weight-semibold)",lineHeight:"var(--vetc-line-height-relaxed)"},labelSm:{fontSize:"var(--vetc-font-size-sm)",fontWeight:"var(--vetc-font-weight-semibold)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-lg)"},labelXs:{fontSize:"var(--vetc-font-size-xs)",fontWeight:"var(--vetc-font-weight-semibold)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-lg)"},labelXxs:{fontSize:"var(--vetc-font-size-2xs)",fontWeight:"var(--vetc-font-weight-semibold)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-lg)"},bodyBase:{fontSize:"var(--vetc-font-size-base)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-sm)"},bodySm:{fontSize:"var(--vetc-font-size-sm)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-md)"},bodyXs:{fontSize:"var(--vetc-font-size-xs)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-lg)"},body2xs:{fontSize:"var(--vetc-font-size-2xs)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-lg)"}},E={primary:"var(--vetc-color-text-primary)",secondary:"var(--vetc-color-text-secondary)",tertiary:"var(--vetc-color-text-tertiary)",disabled:"var(--vetc-color-text-disabled)",brand:"var(--vetc-color-brand)",error:"var(--vetc-color-text-error)",warning:"var(--vetc-color-warning)",success:"var(--vetc-color-positive)",inherit:"inherit"};function V({variant:t="bodyBase",color:r="primary",strikethrough:a=!1,underline:i=!1,truncate:n=!1,lines:o,as:l="span",children:c,className:d="",style:s,id:v}){const g={fontFamily:"var(--vetc-font-family)",margin:0,padding:0,...X[t]??X.bodyBase,color:E[r],textDecoration:a?"line-through":i?"underline":"none",...n&&!o?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:{},...o?{display:"-webkit-box",WebkitLineClamp:o,WebkitBoxOrient:"vertical",overflow:"hidden"}:{},...s};return e(l,{id:v,className:`vetc-text vetc-text--${t} ${d}`,style:g,children:c})}function _({level:t="2xl",...r}){return e(V,{...r,variant:`display${t}`,as:r.as??"h1"})}function q({level:t="xl",...r}){return e(V,{...r,variant:"xl"===t?"headlineXl":"headlineLg",as:r.as??"h2"})}function G({size:t="base",...r}){return e(V,{...r,variant:"base"===t?"titleBase":"titleSm",as:r.as??"h3"})}function Q({size:t="base",...r}){return e(V,{...r,variant:{base:"labelBase",sm:"labelSm",xs:"labelXs",xxs:"labelXxs"}[t],as:r.as??"span"})}function Y({size:t="base",...r}){return e(V,{...r,variant:{base:"bodyBase",sm:"bodySm",xs:"bodyXs","2xs":"body2xs"}[t],as:r.as??"p"})}function K({htmlFor:r,required:a,disabled:i,children:n}){return t("label",{htmlFor:r,style:{fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-input-label-font-size)",fontWeight:"var(--vetc-input-label-font-weight)",lineHeight:"var(--vetc-line-height-relaxed)",color:i?"var(--vetc-color-text-disabled)":"var(--vetc-input-label-color)",display:"block"},children:[n,a&&e("span",{style:{color:"var(--vetc-color-negative)",marginLeft:"var(--vetc-space-2)"},children:"*"})]})}function U({color:t,children:r}){return e("span",{style:{fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-input-helper-font-size)",lineHeight:"var(--vetc-line-height-relaxed)",color:t},children:r})}const J={height:"var(--vetc-input-height)",borderRadius:"var(--vetc-input-radius)",paddingInline:"var(--vetc-input-padding-x)",fontSize:"var(--vetc-input-font-size)",fontFamily:"var(--vetc-font-family)",backgroundColor:"var(--vetc-input-bg)",transition:"border-color 150ms ease, box-shadow 150ms ease",WebkitTapHighlightColor:"transparent"};function Z({label:r,placeholder:a,value:i,defaultValue:n,helperText:l,status:c="default",error:d,disabled:s=!1,readOnly:v=!1,maxLength:g,showCount:h=!1,prefix:p,suffix:f,allowClear:b=!1,onChange:u,onFocus:y,onBlur:m,onPressEnter:x,type:w="text",id:k,name:S,className:z="",style:C,required:H=!1}){const W=!!d?"error":c,B="error"===W?"error":void 0,L=d??l,F="error"===W?"var(--vetc-input-helper-color-error)":"var(--vetc-input-helper-color)";return t("div",{className:`vetc-input-wrapper ${z}`,style:{display:"flex",flexDirection:"column",gap:"var(--vetc-input-gap)",...C},children:[r&&e(K,{htmlFor:k,required:H,disabled:s,children:r}),e(o,{id:k,name:S,type:w,value:i,defaultValue:n,placeholder:a,disabled:s,readOnly:v,maxLength:g,showCount:h,prefix:p,suffix:f,allowClear:b,status:B,onChange:e=>u?.(e.target.value,e),onFocus:y,onBlur:m,onPressEnter:x,style:J}),L&&e(U,{color:F,children:L})]})}function ee({label:r,placeholder:a,value:i,defaultValue:n,helperText:l,status:c="default",error:d,disabled:s=!1,readOnly:v=!1,maxLength:g,onChange:h,onFocus:p,onBlur:f,id:b,name:u,className:y="",style:m,required:x=!1}){const w=!!d,k="error"===(w?"error":c)?"error":void 0,S=d??l,z=w?"var(--vetc-input-helper-color-error)":"var(--vetc-input-helper-color)";return t("div",{className:`vetc-input-wrapper ${y??""}`,style:{display:"flex",flexDirection:"column",gap:"var(--vetc-input-gap)",...m},children:[r&&e(K,{htmlFor:b,required:x,disabled:s,children:r}),e(o.Password,{id:b,name:u,value:i,defaultValue:n,placeholder:a,disabled:s,readOnly:v,maxLength:g,status:k,onChange:e=>h?.(e.target.value,e),onFocus:p,onBlur:f,style:J}),S&&e(U,{color:z,children:S})]})}const{TextArea:te}=o;function re({htmlFor:r,required:a,disabled:i,children:n}){return t("label",{htmlFor:r,style:{fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-input-label-font-size)",fontWeight:"var(--vetc-input-label-font-weight)",lineHeight:"var(--vetc-line-height-relaxed)",color:i?"var(--vetc-color-text-disabled)":"var(--vetc-input-label-color)",display:"block"},children:[n,a&&e("span",{style:{color:"var(--vetc-color-negative)",marginLeft:"var(--vetc-space-2)"},children:"*"})]})}function ae({label:r,placeholder:a,value:i,defaultValue:n,helperText:o,error:l,disabled:c=!1,readOnly:d=!1,maxLength:s,showCount:v=!1,rows:g=4,autoSize:h,onChange:p,onFocus:f,onBlur:b,id:u,name:y,className:m="",style:x,required:w=!1}){const k=!!l,S=l??o,z=k?"var(--vetc-input-helper-color-error)":"var(--vetc-input-helper-color)";return t("div",{className:`vetc-textarea-wrapper ${m}`,style:{display:"flex",flexDirection:"column",gap:"var(--vetc-input-gap)",...x},children:[r&&e(re,{htmlFor:u,required:w,disabled:c,children:r}),e(te,{id:u,name:y,value:i,defaultValue:n,placeholder:a,disabled:c,readOnly:d,maxLength:s,showCount:v,rows:g,autoSize:h,status:k?"error":void 0,onChange:e=>p?.(e.target.value),onFocus:f,onBlur:b,style:{borderRadius:"var(--vetc-input-radius)",padding:"var(--vetc-input-padding-x)",fontSize:"var(--vetc-input-font-size)",fontFamily:"var(--vetc-font-family)",resize:"vertical"}}),S&&e("span",{style:{fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-input-helper-font-size)",lineHeight:"var(--vetc-line-height-relaxed)",color:z},children:S})]})}function ie({label:r,placeholder:a,value:i,defaultValue:n,options:o=[],helperText:c,error:d,disabled:s=!1,multiple:v=!1,searchable:g=!1,allowClear:h=!1,loading:p=!1,onChange:f,onSearch:b,id:u,className:y="",style:m,required:x=!1,popupMatchSelectWidth:w=!0}){const k=!!d,S=d??c,z=k?"var(--vetc-input-helper-color-error)":"var(--vetc-input-helper-color)";return t("div",{className:`vetc-select-wrapper ${y}`,style:{display:"flex",flexDirection:"column",gap:"var(--vetc-input-gap)",...m},children:[r&&t("label",{htmlFor:u,style:{fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-input-label-font-size)",fontWeight:"var(--vetc-input-label-font-weight)",lineHeight:"var(--vetc-line-height-relaxed)",color:s?"var(--vetc-color-text-disabled)":"var(--vetc-input-label-color)",display:"block"},children:[r,x&&e("span",{style:{color:"var(--vetc-color-negative)",marginLeft:"var(--vetc-space-2)"},children:"*"})]}),e(l,{id:u,value:i,defaultValue:n,placeholder:a,options:o,disabled:s,mode:v?"multiple":void 0,showSearch:g,allowClear:h,loading:p,status:k?"error":void 0,onChange:f,onSearch:b,popupMatchSelectWidth:w,style:{height:"var(--vetc-input-height)",width:"100%",fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-input-font-size)"}}),S&&e("span",{style:{fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-input-helper-font-size)",lineHeight:"var(--vetc-line-height-relaxed)",color:z},children:S})]})}const ne=()=>e("svg",{width:"12",height:"9",viewBox:"0 0 12 9",fill:"none","aria-hidden":"true",children:e("path",{d:"M1 4L4.5 7.5L11 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),oe=()=>e("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none","aria-hidden":"true",children:e("path",{d:"M1 1H9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})});function le({label:r,description:a,checked:i,defaultChecked:n=!1,indeterminate:o=!1,disabled:l=!1,variant:c="brand",onChange:d,value:s,id:v,className:g="",style:h}){const[p,f]=y(n),[b,u]=y(!1),m=void 0!==i,x=m?i:p,w="brand"===c?"var(--vetc-color-brand)":"var(--vetc-gray-90)";let k="transparent",S=l?"var(--vetc-color-border-disabled)":b?w:"var(--vetc-color-border)",z="var(--vetc-white)";return(x||o)&&(k=l?"var(--vetc-color-bg-disabled)":w,S=l?"var(--vetc-color-border-disabled)":b?"brand"===c?"var(--vetc-color-brand-hover)":"var(--vetc-gray-70)":w,z=l?"var(--vetc-color-text-disabled)":"var(--vetc-white)",l&&(k="var(--vetc-color-bg-disabled)")),t("label",{htmlFor:v,className:`vetc-checkbox ${g}`,onMouseEnter:()=>!l&&u(!0),onMouseLeave:()=>u(!1),style:{display:"inline-flex",alignItems:a?"flex-start":"center",gap:"var(--vetc-space-12)",cursor:l?"not-allowed":"pointer",userSelect:"none",fontFamily:"var(--vetc-font-family)",WebkitTapHighlightColor:"transparent",...h},children:[e("input",{id:v,type:"checkbox",checked:x,disabled:l,value:s,onChange:()=>{if(l)return;const e=!x;m||f(e),d?.(e)},style:{position:"absolute",opacity:0,width:0,height:0,pointerEvents:"none"},"aria-checked":o?"mixed":x}),t("span",{"aria-hidden":"true",style:{width:"20px",height:"20px",flexShrink:0,borderRadius:"var(--vetc-radius-xs)",border:`1.5px solid ${S}`,backgroundColor:k,display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color var(--vetc-transition-fast), border-color var(--vetc-transition-fast)",color:z,marginTop:a?"2px":0},children:[x&&!o&&e(ne,{}),o&&e(oe,{})]}),(r||a)&&t("span",{style:{display:"flex",flexDirection:"column",gap:"var(--vetc-space-2)"},children:[r&&e("span",{style:{fontSize:"var(--vetc-font-size-base)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",color:l?"var(--vetc-color-text-disabled)":"var(--vetc-color-text-primary)"},children:r}),a&&e("span",{style:{fontSize:"var(--vetc-font-size-sm)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",color:l?"var(--vetc-color-text-disabled)":"var(--vetc-color-text-secondary)"},children:a})]})]})}function ce({options:t,value:r,defaultValue:a=[],direction:i="vertical",disabled:n=!1,variant:o="brand",onChange:l,className:c="",style:d}){const[s,v]=y(a),g=void 0!==r,h=g?r:s;return e("div",{className:`vetc-checkbox-group ${c}`,style:{display:"flex",flexDirection:"vertical"===i?"column":"row",flexWrap:"horizontal"===i?"wrap":void 0,gap:"vertical"===i?"var(--vetc-space-12)":"var(--vetc-space-16)",fontFamily:"var(--vetc-font-family)",...d},children:t.map(t=>e(le,{label:t.label,description:t.description,checked:h.includes(t.value),disabled:t.disabled??n,variant:o,value:t.value,onChange:e=>((e,t)=>{const r=t?[...h,e]:h.filter(t=>t!==e);g||v(r),l?.(r)})(t.value,e)},String(t.value)))})}function de({label:r,description:a,checked:i,defaultChecked:n=!1,disabled:o=!1,variant:l="brand",onChange:c,value:d,id:s,className:v="",style:g}){const[h,p]=y(n),[f,b]=y(!1),u=void 0!==i,m=u?i:h,x="brand"===l?"var(--vetc-color-brand)":"var(--vetc-gray-90)",w=o?"var(--vetc-color-border-disabled)":m?f?"brand"===l?"var(--vetc-color-brand-hover)":"var(--vetc-gray-70)":x:f?x:"var(--vetc-color-border)",k=o?"var(--vetc-color-text-disabled)":x;return t("label",{htmlFor:s,className:`vetc-radio ${v}`,onMouseEnter:()=>!o&&b(!0),onMouseLeave:()=>b(!1),style:{display:"inline-flex",alignItems:a?"flex-start":"center",gap:"var(--vetc-space-12)",cursor:o?"not-allowed":"pointer",userSelect:"none",fontFamily:"var(--vetc-font-family)",WebkitTapHighlightColor:"transparent",...g},children:[e("input",{id:s,type:"radio",checked:m,disabled:o,value:d,onChange:()=>{o||m||(u||p(!0),c?.(!0))},style:{position:"absolute",opacity:0,width:0,height:0,pointerEvents:"none"}}),e("span",{"aria-hidden":"true",style:{width:"20px",height:"20px",flexShrink:0,borderRadius:"50%",border:`1.5px solid ${w}`,backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",transition:"border-color var(--vetc-transition-fast)",marginTop:a?"2px":0},children:m&&e("span",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:k,flexShrink:0}})}),(r||a)&&t("span",{style:{display:"flex",flexDirection:"column",gap:"var(--vetc-space-2)"},children:[r&&e("span",{style:{fontSize:"var(--vetc-font-size-base)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",color:o?"var(--vetc-color-text-disabled)":"var(--vetc-color-text-primary)"},children:r}),a&&e("span",{style:{fontSize:"var(--vetc-font-size-sm)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",color:o?"var(--vetc-color-text-disabled)":"var(--vetc-color-text-secondary)"},children:a})]})]})}function se({options:t,value:r,defaultValue:a,direction:i="vertical",disabled:n=!1,variant:o="brand",onChange:l,className:c="",style:d}){const[s,v]=y(a),g=void 0!==r,h=g?r:s;return e("div",{role:"radiogroup",className:`vetc-radio-group ${c}`,style:{display:"flex",flexDirection:"vertical"===i?"column":"row",flexWrap:"horizontal"===i?"wrap":void 0,gap:"vertical"===i?"var(--vetc-space-12)":"var(--vetc-space-16)",fontFamily:"var(--vetc-font-family)",...d},children:t.map(t=>e(de,{label:t.label,description:t.description,checked:h===t.value,disabled:t.disabled??n,variant:o,value:t.value,onChange:()=>{return e=t.value,g||v(e),void l?.(e);var e}},String(t.value)))})}function ve({label:a,description:i,labelPosition:n="right",checked:o,defaultChecked:l=!1,disabled:c=!1,loading:d=!1,variant:s="brand",onChange:v,id:g,className:h="",style:p}){const[f,b]=y(l),u=void 0!==o,m=u?o:f,x=c||d,w=()=>{if(x)return;const e=!m;u||b(e),v?.(e)},k=t("button",{id:g,type:"button",role:"switch","aria-checked":m,disabled:x,onClick:w,className:`vetc-switch ${h}`,style:{position:"relative",display:"inline-flex",alignItems:"center",width:"var(--vetc-switch-width)",height:"var(--vetc-switch-height)",borderRadius:"var(--vetc-radius-pill)",backgroundColor:x?"var(--vetc-color-bg-disabled)":m?"brand"===s?"var(--vetc-switch-on-bg)":"var(--vetc-gray-90)":"var(--vetc-switch-off-bg)",border:"none",cursor:x?"not-allowed":"pointer",padding:0,flexShrink:0,transition:"background-color var(--vetc-transition-fast)",outline:"none",WebkitTapHighlightColor:"transparent",...a||i?{}:p},children:[e("span",{style:{position:"absolute",left:m?"calc(100% - 30px)":"2px",width:"var(--vetc-switch-thumb-size)",height:"var(--vetc-switch-thumb-size)",borderRadius:"50%",backgroundColor:x?"var(--vetc-gray-20)":"var(--vetc-white)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",transition:"left var(--vetc-transition-fast)",display:"flex",alignItems:"center",justifyContent:"center"},children:d&&t("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",style:{animation:"vetc-btn-spin 0.6s linear infinite"},"aria-hidden":"true",children:[e("circle",{cx:"6",cy:"6",r:"4",stroke:"var(--vetc-gray-30)",strokeWidth:"1.5"}),e("path",{d:"M6 2a4 4 0 014 4",stroke:"var(--vetc-color-brand)",strokeWidth:"1.5",strokeLinecap:"round"})]})}),e("style",{children:"@keyframes vetc-btn-spin { to { transform: rotate(360deg); } }"})]});if(!a&&!i)return k;const S=t("span",{style:{display:"flex",flexDirection:"column",gap:"var(--vetc-space-2)",flex:1},children:[a&&e("span",{style:{fontSize:"var(--vetc-font-size-base)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",color:x?"var(--vetc-color-text-disabled)":"var(--vetc-color-text-primary)"},children:a}),i&&e("span",{style:{fontSize:"var(--vetc-font-size-sm)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",color:x?"var(--vetc-color-text-disabled)":"var(--vetc-color-text-secondary)"},children:i})]});return e("div",{style:{display:"flex",alignItems:"center",gap:"var(--vetc-space-12)",flexDirection:"left"===n?"row-reverse":"row",fontFamily:"var(--vetc-font-family)",cursor:x?"not-allowed":"pointer",WebkitTapHighlightColor:"transparent",...p},onClick:w,children:t(r,"right"===n?{children:[k,S]}:{children:[S,k]})})}const ge={default:{bg:"var(--vetc-chip-default-bg)",border:"var(--vetc-chip-default-border)",text:"var(--vetc-chip-default-text)",filledBg:"var(--vetc-chip-default-filled-bg)"},brand:{bg:"var(--vetc-chip-brand-bg)",border:"var(--vetc-chip-brand-border)",text:"var(--vetc-chip-brand-text)",filledBg:"var(--vetc-chip-brand-filled-bg)"},positive:{bg:"var(--vetc-chip-positive-bg)",border:"var(--vetc-chip-positive-border)",text:"var(--vetc-chip-positive-text)",filledBg:"var(--vetc-chip-positive-filled-bg)"},negative:{bg:"var(--vetc-chip-negative-bg)",border:"var(--vetc-chip-negative-border)",text:"var(--vetc-chip-negative-text)",filledBg:"var(--vetc-chip-negative-filled-bg)"},warning:{bg:"var(--vetc-chip-warning-bg)",border:"var(--vetc-chip-warning-border)",text:"var(--vetc-chip-warning-text)",filledBg:"var(--vetc-chip-warning-filled-bg)"},info:{bg:"var(--vetc-chip-info-bg)",border:"var(--vetc-chip-info-border)",text:"var(--vetc-chip-info-text)",filledBg:"var(--vetc-chip-info-filled-bg)"}};function he({style:t="tinted",type:r="default",shape:a="pill",size:i="md",icon:n,closable:o=!1,onClose:l,onClick:d,children:s,className:v="",css:g,id:h}){const p=ge[r],f="md"===i?"var(--vetc-chip-height-md)":"var(--vetc-chip-height-sm)",b="md"===i?"var(--vetc-chip-padding-x-md)":"var(--vetc-chip-padding-x-sm)",u="md"===i?"var(--vetc-chip-font-size-md)":"var(--vetc-chip-font-size-sm)",y="pill"===a?"var(--vetc-chip-radius-pill)":"var(--vetc-chip-radius-rounded)";let m=p.bg,x=`1px solid ${p.border}`,w=p.text;return"filled"===t?(m=p.filledBg,x="none",w="var(--vetc-white)"):"outlined"===t&&(m="transparent",x=`1px solid ${p.border}`,w=p.text),e(c,{id:h,closable:o,onClose:e=>{e.preventDefault(),l?.()},onClick:d,icon:n,className:`vetc-chip vetc-chip--${t} vetc-chip--${r} ${v}`,style:{display:"inline-flex",alignItems:"center",height:f,padding:`0 ${b}`,borderRadius:y,background:m,border:x,color:w,fontSize:u,fontWeight:"var(--vetc-chip-font-weight)",fontFamily:"var(--vetc-font-family)",cursor:d?"pointer":"default",userSelect:"none",lineHeight:1,gap:"var(--vetc-space-4)",transition:"var(--vetc-transition-fast)",...g},children:s})}const pe={xl:"var(--vetc-avatar-size-xl)",lg:"var(--vetc-avatar-size-lg)",md:"var(--vetc-avatar-size-md)",sm:"var(--vetc-avatar-size-sm)",xs:"var(--vetc-avatar-size-xs)"},fe={xl:56,lg:48,md:40,sm:32,xs:24},be={xl:"var(--vetc-font-size-2xl)",lg:"var(--vetc-font-size-xl)",md:"var(--vetc-font-size-base)",sm:"var(--vetc-font-size-sm)",xs:"var(--vetc-font-size-2xs)"};function ue({src:t,alt:r,initials:a,icon:i,size:n="md",shape:o="circle",color:l,className:c="",style:s,onClick:v,id:g}){return e("span",{id:g,style:{display:"inline-flex",flexShrink:0,width:pe[n],height:pe[n]},children:e(d,{src:t,alt:r,icon:t||a?void 0:i,size:fe[n],shape:o,onClick:v,className:`vetc-avatar vetc-avatar--${n} ${c}`,style:{backgroundColor:t?void 0:l??"var(--vetc-avatar-bg-default)",fontSize:be[n],fontWeight:"var(--vetc-font-weight-bold)",fontFamily:"var(--vetc-font-family)",color:"var(--vetc-avatar-text-color)",cursor:v?"pointer":"default",flexShrink:0,...s},children:!t&&a?a.slice(0,2).toUpperCase():void 0})})}function ye({elevation:t="outlined",title:r,extra:a,children:i,onClick:n,className:o="",style:l,bodyStyle:c,id:d}){return e(s,{id:d,title:r,extra:a,onClick:n,className:`vetc-card vetc-card--${t} ${o}`,styles:{body:{padding:"var(--vetc-card-padding)",fontFamily:"var(--vetc-font-family)",...c},header:r?{borderBottom:"1px solid var(--vetc-card-border)",padding:"var(--vetc-space-12) var(--vetc-card-padding)"}:void 0},style:{borderRadius:"var(--vetc-card-radius)",border:{flat:"none",raised:"none",outlined:"1px solid var(--vetc-card-border)"}[t],boxShadow:{flat:"var(--vetc-shadow-none)",raised:"var(--vetc-card-shadow-raised)",outlined:"var(--vetc-shadow-none)"}[t],cursor:n?"pointer":"default",overflow:"hidden",backgroundColor:"var(--vetc-card-bg)",fontFamily:"var(--vetc-font-family)",transition:"box-shadow var(--vetc-transition-fast)",...l},children:i})}function me({disabled:t}){return e("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:e("path",{d:"M7.5 5L12.5 10L7.5 15",stroke:t?"var(--vetc-color-icon-disabled)":"var(--vetc-color-icon-muted)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function xe({leading:r,title:a,description:i,trailing:n,arrow:o=!1,divider:l=!0,onClick:c,disabled:d=!1,className:s="",style:v,id:g}){const h=!!c&&!d;return t("div",{id:g,role:h?"button":void 0,tabIndex:h?0:void 0,className:`vetc-list-item ${s}`,onClick:d?void 0:c,onKeyDown:h?e=>{"Enter"!==e.key&&" "!==e.key||c?.()}:void 0,style:{display:"flex",alignItems:"center",minHeight:"var(--vetc-list-item-height)",padding:"0 var(--vetc-list-item-padding-x)",gap:"var(--vetc-list-item-gap)",cursor:h?"pointer":"default",borderBottom:l?"1px solid var(--vetc-list-item-border)":"none",backgroundColor:"var(--vetc-list-item-bg)",opacity:d?.5:1,fontFamily:"var(--vetc-font-family)",transition:"background-color var(--vetc-transition-fast)",outline:"none",...v},onMouseEnter:e=>{h&&(e.currentTarget.style.backgroundColor="var(--vetc-list-item-bg-hover)")},onMouseLeave:e=>{h&&(e.currentTarget.style.backgroundColor="var(--vetc-list-item-bg)")},children:[r&&e("div",{style:{flexShrink:0,display:"flex",alignItems:"center",color:"var(--vetc-list-item-icon-color)"},children:r}),t("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:"var(--vetc-space-2)"},children:[e("span",{style:{fontSize:"var(--vetc-list-item-title-size)",fontWeight:"var(--vetc-list-item-title-weight)",color:d?"var(--vetc-color-text-disabled)":"var(--vetc-list-item-title-color)",lineHeight:"var(--vetc-line-height-relaxed)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a}),i&&e("span",{style:{fontSize:"var(--vetc-list-item-desc-size)",fontWeight:"var(--vetc-font-weight-regular)",color:d?"var(--vetc-color-text-disabled)":"var(--vetc-list-item-desc-color)",lineHeight:"var(--vetc-line-height-relaxed)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:i})]}),(n||o)&&t("div",{style:{flexShrink:0,display:"flex",alignItems:"center",gap:"var(--vetc-space-8)",color:"var(--vetc-list-item-icon-color)"},children:[n,o&&e(me,{disabled:d})]})]})}function we({items:t,renderItem:r,bordered:a=!1,className:i="",style:n,id:o}){return e("div",{id:o,className:`vetc-list ${i}`,style:{border:a?"1px solid var(--vetc-color-border-variant)":"none",borderRadius:a?"var(--vetc-card-radius)":0,overflow:"hidden",backgroundColor:"var(--vetc-color-bg)",...n},children:t.map((t,a)=>e(u.Fragment,{children:r(t,a)},a))})}function ke({orientation:t="horizontal",label:r,labelAlign:a="center",thickness:i=1,color:n,margin:o,className:l="",style:c}){const d="vertical"===t;return e(v,{type:d?"vertical":"horizontal",orientationMargin:"center"!==a?0:void 0,orientation:"center"!==a?a:void 0,className:`vetc-divider ${l}`,style:{borderColor:n??"var(--vetc-divider-color)",borderTopWidth:d?void 0:i,borderLeftWidth:d?i:void 0,margin:o??(d?"0 var(--vetc-divider-margin-v)":"var(--vetc-divider-margin-h) 0"),fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-divider-label-size)",color:"var(--vetc-divider-label-color)",...c},children:r})}const Se={sm:16,md:24,lg:40};function ze({size:t="md",color:r,fullscreen:a=!1,tip:i,children:n,spinning:o=!0,className:l="",style:c}){const d=e(w,{style:{fontSize:Se[t],color:r??"var(--vetc-spinner-color)"},spin:!0});return n?e(h,{spinning:o,indicator:d,tip:i,className:`vetc-spinner ${l}`,style:c,children:n}):e("div",a?{className:`vetc-spinner-overlay ${l}`,style:{position:"fixed",inset:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--vetc-color-overlay)",zIndex:9999,...c},children:e(h,{spinning:o,indicator:d,tip:i})}:{className:`vetc-spinner ${l}`,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",...c},children:e(h,{spinning:o,indicator:d,tip:i})})}function Ce({rows:t=3,avatar:r=!1,avatarSize:a=40,title:i=!0,loading:n=!0,className:o="",style:l,children:c}){return e(g,{active:!0,loading:n,avatar:!!r&&{size:a,shape:"circle"},title:i,paragraph:{rows:t},className:`vetc-skeleton ${o}`,style:l,children:c})}const He={borderRadius:"var(--vetc-toast-radius)",fontFamily:"var(--vetc-font-family)"},We={show(e){const{type:t="default",message:r,description:a,duration:i=3,placement:n="top",icon:o,onClose:l}=e;"default"!==t?f[t]({message:r,description:a,duration:i,placement:n,icon:o,onClose:l,style:He}):p.open({type:"info",content:r,duration:i,onClose:l})},success:(e,t)=>We.show({message:e,description:t,type:"success"}),error:(e,t)=>We.show({message:e,description:t,type:"error"}),warning:(e,t)=>We.show({message:e,description:t,type:"warning"}),info:(e,t)=>We.show({message:e,description:t,type:"info"})};function Be(){const[e,t]=f.useNotification(),r=t=>{const{type:r="info",message:a,description:i,duration:n=3,placement:o="top",icon:l,onClose:c}=t;e["default"===r?"info":r]({message:a,description:i,duration:n,placement:o,icon:l,onClose:c,style:He})};return{contextHolder:t,toast:{show:r,success:(e,t)=>r({message:e,description:t,type:"success"}),error:(e,t)=>r({message:e,description:t,type:"error"}),warning:(e,t)=>r({message:e,description:t,type:"warning"}),info:(e,t)=>r({message:e,description:t,type:"info"})}}}const Le={height:"var(--vetc-btn-height-lg)",borderRadius:"var(--vetc-btn-radius-lg)",fontWeight:"var(--vetc-btn-font-weight)",fontSize:"var(--vetc-btn-font-size-lg)",fontFamily:"var(--vetc-font-family)"};function Fe({open:t,title:r,children:a,footer:i,okText:n="Xác nhận",cancelText:o="Hủy",okDisabled:l=!1,okLoading:c=!1,okDanger:d=!1,onOk:s,onCancel:v,maskClosable:g=!0,closable:h=!0,width:p,className:f="",style:u,id:y}){return e(b,{open:t,title:r,okText:n,cancelText:o,okButtonProps:{disabled:l,loading:c,danger:d,style:Le},cancelButtonProps:{style:Le},footer:null===i?null:i,onOk:s,onCancel:v,maskClosable:g,closable:h,width:p??"var(--vetc-modal-width)",centered:!0,className:`vetc-modal ${f}`,style:{fontFamily:"var(--vetc-font-family)",...u},styles:{header:{padding:"var(--vetc-modal-padding) var(--vetc-modal-padding) 0",borderBottom:"none"},body:{padding:"var(--vetc-space-8) var(--vetc-modal-padding) var(--vetc-modal-padding)"},footer:{padding:"0 var(--vetc-modal-padding) var(--vetc-modal-padding)",borderTop:"none"},mask:{backgroundColor:"var(--vetc-modal-overlay)"}},children:a})}function Ne(){return{confirm:e=>{b.confirm({title:e.title,content:e.content,okText:e.okText??"Xác nhận",cancelText:e.cancelText??"Hủy",okButtonProps:{danger:e.okDanger,style:{...Le,height:40}},cancelButtonProps:{style:{...Le,height:40}},centered:!0,onOk:e.onOk,onCancel:e.onCancel,styles:{mask:{backgroundColor:"var(--vetc-modal-overlay)"}}})}}}function Me({open:a,image:i,title:n,description:o,okText:l="Xác nhận",cancelText:c="Hủy",okDisabled:d=!1,okLoading:s=!1,okDanger:v=!1,onOk:g,onCancel:h,maskClosable:p=!0}){if(m(()=>(document.body.style.overflow=a?"hidden":"",()=>{document.body.style.overflow=""}),[a]),!a)return null;const f=n||o;return e(r,{children:k(e("div",{style:{position:"fixed",inset:0,backgroundColor:"var(--vetc-dialog-overlay)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,padding:"0 var(--vetc-space-24)"},onClick:p?h:void 0,children:t("div",{style:{width:"100%",maxWidth:"var(--vetc-dialog-width)",backgroundColor:"var(--vetc-dialog-bg)",borderRadius:"var(--vetc-dialog-radius)",overflow:"hidden",boxShadow:"var(--vetc-shadow-lg)",fontFamily:"var(--vetc-font-family)"},onClick:e=>e.stopPropagation(),children:[i&&e("div",{style:{width:"100%",height:"var(--vetc-dialog-image-height)",overflow:"hidden",flexShrink:0},children:e("img",{src:i,alt:"",style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})}),f&&t("div",{style:{padding:"var(--vetc-dialog-padding)"},children:[n&&e("div",{style:{fontSize:"var(--vetc-dialog-title-size)",fontWeight:"var(--vetc-dialog-title-weight)",color:"var(--vetc-color-text-primary)",lineHeight:"var(--vetc-line-height-relaxed)",marginBottom:o?"var(--vetc-space-8)":0},children:n}),o&&e("div",{style:{fontSize:"var(--vetc-dialog-desc-size)",color:"var(--vetc-dialog-desc-color)",lineHeight:"var(--vetc-line-height-relaxed)"},children:o})]}),t("div",{style:{display:"flex",gap:"var(--vetc-dialog-btn-gap)",padding:f?"0 var(--vetc-dialog-padding) var(--vetc-dialog-padding)":"var(--vetc-dialog-padding)"},children:[h&&e(P,{block:!0,style:"outlined",variant:"neutral",onClick:h,children:c}),e(P,{block:!0,style:v?"danger":"filled",loading:s,disabled:d,onClick:g,children:l})]})]})}),document.body)})}function Ie({open:a,title:i,children:n,maskClosable:o=!0,showHandle:l=!0,maxHeight:c="90vh",onClose:d,className:s="",style:v,id:g}){return m(()=>(document.body.style.overflow=a?"hidden":"",()=>{document.body.style.overflow=""}),[a]),a?t(r,{children:[e("div",{className:"vetc-bottom-sheet-overlay","aria-hidden":"true",onClick:()=>o&&d?.(),style:{position:"fixed",inset:0,backgroundColor:"var(--vetc-sheet-overlay)",zIndex:1e3,animation:"vetc-fade-in var(--vetc-transition-base)"}}),t("div",{id:g,role:"dialog","aria-modal":"true",className:`vetc-bottom-sheet ${s}`,style:{position:"fixed",bottom:0,left:0,right:0,backgroundColor:"var(--vetc-sheet-bg)",borderRadius:"var(--vetc-sheet-radius) var(--vetc-sheet-radius) 0 0",maxHeight:c,overflowY:"auto",zIndex:1001,fontFamily:"var(--vetc-font-family)",animation:"vetc-slide-up var(--vetc-transition-slow) cubic-bezier(0.32, 0.72, 0, 1)",...v},children:[l&&e("div",{style:{display:"flex",justifyContent:"center",paddingTop:"var(--vetc-space-8)",paddingBottom:"var(--vetc-space-4)"},children:e("div",{style:{width:"var(--vetc-sheet-handle-width)",height:"var(--vetc-sheet-handle-height)",borderRadius:"var(--vetc-radius-pill)",backgroundColor:"var(--vetc-sheet-handle-color)"}})}),i&&t("div",{style:{padding:"var(--vetc-space-12) var(--vetc-sheet-padding)",borderBottom:"1px solid var(--vetc-sheet-border)",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e("span",{style:{fontSize:"var(--vetc-sheet-title-size)",fontWeight:"var(--vetc-sheet-title-weight)",color:"var(--vetc-sheet-title-color)",lineHeight:"var(--vetc-line-height-relaxed)"},children:i}),d&&e("button",{onClick:d,"aria-label":"Đóng",style:{background:"none",border:"none",cursor:"pointer",padding:"var(--vetc-space-4)",display:"flex",color:"var(--vetc-color-icon-muted)",borderRadius:"var(--vetc-radius-pill)",transition:"background-color var(--vetc-transition-fast)"},children:e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:e("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),e("div",{style:{padding:"var(--vetc-sheet-padding)"},children:n})]}),e("style",{children:"\n @keyframes vetc-fade-in {\n from { opacity: 0 }\n to { opacity: 1 }\n }\n @keyframes vetc-slide-up {\n from { transform: translateY(100%) }\n to { transform: translateY(0) }\n }\n "})]}):null}function Te(){return e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:e("path",{d:"M15 19L8 12L15 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function Ae(){return e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:e("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}const Re={background:"none",border:"none",cursor:"pointer",width:"var(--vetc-nav-icon-btn-size)",height:"var(--vetc-nav-icon-btn-size)",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"var(--vetc-radius-pill)",color:"var(--vetc-nav-icon-color)",flexShrink:0,padding:0,transition:"background-color var(--vetc-transition-fast)"};function $e({title:r,leading:a="none",leadingIcon:i,onLeadingPress:n,actions:o=[],leftSlot:l,rightSlot:c,backgroundColor:d,divider:s=!0,transparent:v=!1,className:g="",style:h,id:p,showBack:f,backIcon:b,onBack:u,left:y,right:m}){const x=f?"back":a,w=i??b,k=n??u;return t("header",{id:p,className:`vetc-nav-bar ${g}`,style:{display:"flex",alignItems:"center",height:"var(--vetc-nav-height)",padding:"0 var(--vetc-nav-padding-x)",backgroundColor:v?"transparent":d??"var(--vetc-nav-bg)",borderBottom:s&&!v?"1px solid var(--vetc-nav-border)":"none",fontFamily:"var(--vetc-font-family)",position:"relative",...h},children:[e("div",{style:{display:"flex",alignItems:"center",minWidth:"var(--vetc-nav-icon-btn-size)",zIndex:1},children:(()=>{if(void 0!==l||void 0!==y)return l??y;if("none"===x)return null;const t=w??e("close"===x?Ae:Te,{});return e("button",{onClick:k,style:Re,"aria-label":"close"===x?"Đóng":"Quay lại",children:t})})()}),r&&e("div",{style:{position:"absolute",left:0,right:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"},children:e("span",{style:{fontSize:"var(--vetc-nav-title-size)",fontWeight:"var(--vetc-nav-title-weight)",color:"var(--vetc-nav-title-color)",lineHeight:"var(--vetc-line-height-normal)",maxWidth:"60%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r})}),e("div",{style:{display:"flex",alignItems:"center",gap:"var(--vetc-space-4)",marginLeft:"auto",zIndex:1},children:void 0!==c||void 0!==m?c??m:o.slice(0,2).map((t,r)=>e("button",{id:t.id,onClick:t.onClick,disabled:t.disabled,"aria-label":t.label,style:{...Re,opacity:t.disabled?.4:1},children:t.icon},r))})]})}function De({items:r,activeKey:a,onChange:i,variant:n="brand",backgroundColor:o,divider:l=!0,className:c="",style:d,id:s}){const v="brand"===n?"var(--vetc-tab-color-active)":"var(--vetc-color-text-primary)";return e("nav",{id:s,className:`vetc-tab-bar ${c}`,style:{display:"flex",alignItems:"stretch",height:"var(--vetc-tab-height)",backgroundColor:o??"var(--vetc-tab-bg)",borderTop:l?"1px solid var(--vetc-tab-border)":"none",fontFamily:"var(--vetc-font-family)",...d},children:r.map(r=>{const n=r.key===a,o=r.disabled?"var(--vetc-tab-color-disabled)":n?v:"var(--vetc-tab-color-inactive)";return t("button",{disabled:r.disabled,onClick:()=>!r.disabled&&i?.(r.key),"aria-current":n?"page":void 0,"aria-label":r.label,className:"vetc-tab-bar__item"+(n?" vetc-tab-bar__item--active":""),style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"var(--vetc-space-2)",background:"none",border:"none",cursor:r.disabled?"not-allowed":"pointer",padding:"var(--vetc-space-6) 0",position:"relative",opacity:r.disabled?.5:1,transition:"color var(--vetc-transition-fast)",color:o},children:[t("div",{style:{position:"relative",display:"inline-flex"},children:[e("span",{style:{color:o,display:"flex",fontSize:"24px",lineHeight:1},children:n&&r.activeIcon?r.activeIcon:r.icon}),void 0!==r.badge&&e("span",{style:{position:"absolute",top:"calc(-1 * var(--vetc-space-4))",right:"calc(-1 * var(--vetc-space-8))",minWidth:"var(--vetc-tab-badge-size)",height:"var(--vetc-tab-badge-size)",backgroundColor:"var(--vetc-tab-badge-bg)",borderRadius:"var(--vetc-radius-pill)",fontSize:"var(--vetc-tab-badge-font-size)",fontWeight:"var(--vetc-font-weight-semibold)",color:"var(--vetc-tab-badge-text)",display:"flex",alignItems:"center",justifyContent:"center",padding:"0 var(--vetc-space-4)",lineHeight:1},children:r.badge})]}),e("span",{style:{fontSize:"var(--vetc-tab-label-size)",fontWeight:"var(--vetc-tab-label-weight)",color:o,lineHeight:"var(--vetc-line-height-relaxed)"},children:r.label})]},r.key)})})}const Oe="undefined"!=typeof window,Pe=(e,t={})=>{const r=Oe&&window.flutter_inappwebview&&window.flutter_inappwebview.callHandler&&"function"==typeof window.flutter_inappwebview.callHandler?window.flutter_inappwebview:null;return r?r.callHandler("MiniAppBridge",{action:e,payload:t}):Promise.resolve({ok:!1,error:"BRIDGE_CALL_FAILED"})};let je=new Map,Xe="/";function Ee(){return je.get(Xe)}function Ve(e){Xe=e}function _e({config:t}){const[r,a]=y(null);if(m(()=>{!function(e){je=new Map(e.pages.map(e=>[e.path,e]))}(t);Ve((window.location.pathname||"/").replace("/miniapp","")||"/");let e=Ee()??null;if(!e){if(0===t.pages.length)return void console.error("[App] config.pages is empty — no pages to render.");Ve(t.pages[0].path),e=Ee()??null}a(e),Pe("registerAppConfig",{config:t}).catch(e=>{console.error("[App] registerAppConfigError:",e)})},[t]),!r)return e("div",{});const i=r.Component;return e(i,{})}function qe(e){const t=x(e);m(()=>{t.current=e},[e]),m(()=>{if("undefined"==typeof window||!window.MiniApp)return;const e=window.MiniApp,r=()=>{try{t.current?.()}catch(e){console.error("[useAppResume error]",e)}};return e.on("appResume",r),()=>e.off("appResume",r)},[])}function Ge(e){const t=x(e);m(()=>{t.current=e},[e]),m(()=>{if("undefined"==typeof window||!window.MiniApp)return;const e=window.MiniApp,r=()=>{try{t.current?.()}catch(e){console.error("[useAppPause error]",e)}};return e.on("appPause",r),()=>e.off("appPause",r)},[])}function Qe(e,t){const r=x(t);m(()=>{r.current=t},[t]),m(()=>{if("undefined"==typeof window||!window.MiniApp)return;const t=window.MiniApp,a=t=>{t?.route===e&&r.current?.(t)};return t.on("didShow",a),()=>t.off("didShow",a)},[e])}function Ye(e,t){const r=x(t);m(()=>{r.current=t},[t]),m(()=>{if("undefined"==typeof window||!window.MiniApp)return;const t=window.MiniApp,a=t=>{t?.route===e&&r.current?.(t)};return t.on("didHide",a),()=>t.off("didHide",a)},[e])}function Ke(e,t){const r=x(t);m(()=>{r.current=t},[t]),m(()=>{if("undefined"==typeof window||!window.MiniApp)return;const t=window.MiniApp,a=t=>{t?.route===e&&r.current?.(t)};return t.on("onTapAppBar",a),()=>t.off("onTapAppBar",a)},[e])}function Ue(){return(e,t={},r={})=>{"number"!=typeof e?Pe("navigate",{type:"native",action:"push",route:e,params:t,options:r}).catch(console.error):Pe("navigate",{type:"native",action:"pop",delta:Math.abs(e)})}}function Je(e){const t=x(e);m(()=>{t.current=e},[e]),m(()=>{if("undefined"==typeof window||!window.MiniApp)return;const e=window.MiniApp,r=e=>{try{t.current?.(e)}catch(e){console.error("[useListenerScanQr error]",e)}};return e.on("scanQrResult",r),()=>e.off("scanQrResult",r)},[])}export{_e as App,ue as Avatar,Y as Body,Ie as BottomSheet,P as Button,j as ButtonGroup,ye as Card,le as Checkbox,ce as CheckboxGroup,he as Chip,Me as Dialog,_ as Display,ke as Divider,q as Headline,Z as Input,Q as Label,we as List,xe as ListItem,Fe as Modal,$e as NavigationBar,ee as PasswordInput,de as Radio,se as RadioGroup,ie as Select,Ce as SkeletonLoader,ze as Spinner,ve as Switch,De as TabBar,ae as Textarea,G as Title,V as Typography,H as VETCProvider,T as borderRadius,z as colorAlias,S as colorGlobal,A as componentHeight,W as fontFamily,L as fontSize,B as fontWeight,N as letterSpacing,F as lineHeight,R as shadow,I as spacing,M as textStyle,We as toast,Ge as useAppPause,qe as useAppResume,Ne as useConfirm,Ye as useDidHide,Qe as useDidShow,Je as useListenerScanQr,Ue as useNavigate,Ke as useTapAppBar,Be as useToast,C as vetcAntdTheme};
|
package/dist/styles/tokens.css
CHANGED
|
@@ -446,3 +446,38 @@
|
|
|
446
446
|
*, *::before, *::after {
|
|
447
447
|
box-sizing: border-box;
|
|
448
448
|
}
|
|
449
|
+
|
|
450
|
+
/* ════════════════════════════════════════════════════════════
|
|
451
|
+
10. INPUT OVERRIDES
|
|
452
|
+
════════════════════════════════════════════════════════════ */
|
|
453
|
+
|
|
454
|
+
/* Giữ background trắng khi hover/focus — không để AntD flash xám */
|
|
455
|
+
.ant-input,
|
|
456
|
+
.ant-input-affix-wrapper {
|
|
457
|
+
background-color: var(--vetc-input-bg) !important;
|
|
458
|
+
transition: border-color var(--vetc-transition-fast),
|
|
459
|
+
box-shadow var(--vetc-transition-fast) !important;
|
|
460
|
+
-webkit-tap-highlight-color: transparent !important;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.ant-input:hover,
|
|
464
|
+
.ant-input:focus,
|
|
465
|
+
.ant-input-affix-wrapper:hover,
|
|
466
|
+
.ant-input-affix-wrapper:focus,
|
|
467
|
+
.ant-input-affix-wrapper-focused {
|
|
468
|
+
background-color: var(--vetc-input-bg) !important;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
/* Select — remove mobile tap highlight */
|
|
472
|
+
.ant-select-selector {
|
|
473
|
+
-webkit-tap-highlight-color: transparent !important;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
/* Fix browser autofill background (Chrome/Safari) */
|
|
477
|
+
.ant-input:-webkit-autofill,
|
|
478
|
+
.ant-input:-webkit-autofill:hover,
|
|
479
|
+
.ant-input:-webkit-autofill:focus {
|
|
480
|
+
-webkit-box-shadow: 0 0 0 1000px var(--vetc-input-bg) inset !important;
|
|
481
|
+
-webkit-text-fill-color: var(--vetc-input-text) !important;
|
|
482
|
+
transition: background-color 5000s ease-in-out 0s !important;
|
|
483
|
+
}
|