@emeraldemperaur/vector-sigma 1.4.0 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -6
- package/lib/index.cjs +332 -122
- package/lib/index.esm.js +324 -117
- package/lib/types/components/avatar/avatar.d.ts +3 -3
- package/lib/types/components/button/button.d.ts +2 -2
- package/lib/types/components/checkbox/checkbox.d.ts +3 -3
- package/lib/types/components/conditional/conditional.d.ts +3 -3
- package/lib/types/components/datepicker/datepicker.d.ts +2 -2
- package/lib/types/components/daterangepicker/daterangepicker.d.ts +2 -2
- package/lib/types/components/datetimepicker/datetimepicker.d.ts +2 -2
- package/lib/types/components/dropdown/dropdown.d.ts +2 -2
- package/lib/types/components/file/file.d.ts +1 -1
- package/lib/types/components/file/filemultiple.d.ts +1 -1
- package/lib/types/components/image/image.d.ts +2 -2
- package/lib/types/components/input/input.d.ts +2 -2
- package/lib/types/components/input/uuidInput.d.ts +1 -1
- package/lib/types/components/inputcurrency/inputcurrency.d.ts +2 -2
- package/lib/types/components/inputcurrency/stockInput.d.ts +1 -1
- package/lib/types/components/radio/radio.d.ts +2 -2
- package/lib/types/components/select/select.d.ts +1 -1
- package/lib/types/components/selectmultiple/selectmultiple.d.ts +1 -1
- package/lib/types/components/slider/range.d.ts +1 -1
- package/lib/types/components/slider/slider.d.ts +2 -2
- package/lib/types/components/toggle/toggle.d.ts +1 -1
- package/lib/types/components/xtitle/xtitle.d.ts +1 -1
- package/lib/types/index.d.ts +2 -0
- package/package.json +1 -1
package/lib/index.cjs
CHANGED
|
@@ -664,7 +664,7 @@ var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
|
664
664
|
whiteSpace: "nowrap",
|
|
665
665
|
wordWrap: "normal"
|
|
666
666
|
});
|
|
667
|
-
var NAME$
|
|
667
|
+
var NAME$4 = "VisuallyHidden";
|
|
668
668
|
var VisuallyHidden = React__namespace.forwardRef(
|
|
669
669
|
(props, forwardedRef) => {
|
|
670
670
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -677,9 +677,26 @@ var VisuallyHidden = React__namespace.forwardRef(
|
|
|
677
677
|
);
|
|
678
678
|
}
|
|
679
679
|
);
|
|
680
|
-
VisuallyHidden.displayName = NAME$
|
|
680
|
+
VisuallyHidden.displayName = NAME$4;
|
|
681
681
|
var Root$8 = VisuallyHidden;
|
|
682
682
|
|
|
683
|
+
// src/accessible-icon.tsx
|
|
684
|
+
var NAME$3 = "AccessibleIcon";
|
|
685
|
+
var AccessibleIcon = ({ children, label }) => {
|
|
686
|
+
const child = React__namespace.Children.only(children);
|
|
687
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
688
|
+
React__namespace.cloneElement(child, {
|
|
689
|
+
// accessibility
|
|
690
|
+
"aria-hidden": "true",
|
|
691
|
+
focusable: "false"
|
|
692
|
+
// See: https://allyjs.io/tutorials/focusing-in-svg.html#making-svg-elements-focusable
|
|
693
|
+
}),
|
|
694
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Root$8, { children: label })
|
|
695
|
+
] });
|
|
696
|
+
};
|
|
697
|
+
AccessibleIcon.displayName = NAME$3;
|
|
698
|
+
var Root2$4 = AccessibleIcon;
|
|
699
|
+
|
|
683
700
|
// packages/react/context/src/create-context.tsx
|
|
684
701
|
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
685
702
|
let defaultContexts = [];
|
|
@@ -9005,6 +9022,8 @@ var Portal = TooltipPortal;
|
|
|
9005
9022
|
var Content2 = TooltipContent;
|
|
9006
9023
|
var Arrow2 = TooltipArrow;
|
|
9007
9024
|
|
|
9025
|
+
const s$9=Root2$4;
|
|
9026
|
+
|
|
9008
9027
|
var classnames = {exports: {}};
|
|
9009
9028
|
|
|
9010
9029
|
/*!
|
|
@@ -9092,153 +9111,177 @@ function requireClassnames () {
|
|
|
9092
9111
|
var classnamesExports = requireClassnames();
|
|
9093
9112
|
var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
9094
9113
|
|
|
9095
|
-
const o$
|
|
9114
|
+
const o$f={asChild:{type:"boolean"}};
|
|
9115
|
+
|
|
9116
|
+
const t$h={width:{type:"string",className:"rt-r-w",customProperties:["--width"],responsive:true},minWidth:{type:"string",className:"rt-r-min-w",customProperties:["--min-width"],responsive:true},maxWidth:{type:"string",className:"rt-r-max-w",customProperties:["--max-width"],responsive:true}};
|
|
9096
9117
|
|
|
9097
|
-
const
|
|
9118
|
+
const e$l={height:{type:"string",className:"rt-r-h",customProperties:["--height"],responsive:true},minHeight:{type:"string",className:"rt-r-min-h",customProperties:["--min-height"],responsive:true},maxHeight:{type:"string",className:"rt-r-max-h",customProperties:["--max-height"],responsive:true}};
|
|
9098
9119
|
|
|
9099
|
-
const e
|
|
9120
|
+
const o$e=["gray","gold","bronze","brown","yellow","amber","orange","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","lime","mint","sky"],e$k=["auto","gray","mauve","slate","sage","olive","sand"],r$m={color:{type:"enum",values:o$e,default:void 0}},s$8={color:{type:"enum",values:o$e,default:""}};
|
|
9100
9121
|
|
|
9101
|
-
const o$d=
|
|
9122
|
+
const o$d={highContrast:{type:"boolean",className:"rt-high-contrast",default:void 0}};
|
|
9102
9123
|
|
|
9103
|
-
const
|
|
9124
|
+
const e$j=["normal","start","end","both"],r$l={trim:{type:"enum",className:"rt-r-lt",values:e$j,responsive:true}};
|
|
9104
9125
|
|
|
9105
|
-
const e$
|
|
9126
|
+
const e$i=["left","center","right"],t$g={align:{type:"enum",className:"rt-r-ta",values:e$i,responsive:true}};
|
|
9106
9127
|
|
|
9107
|
-
const e$
|
|
9128
|
+
const e$h=["wrap","nowrap","pretty","balance"],r$k={wrap:{type:"enum",className:"rt-r-tw",values:e$h,responsive:true}};
|
|
9108
9129
|
|
|
9109
|
-
const e$
|
|
9130
|
+
const e$g={truncate:{type:"boolean",className:"rt-truncate"}};
|
|
9110
9131
|
|
|
9111
|
-
const e$
|
|
9132
|
+
const e$f=["light","regular","medium","bold"],t$f={weight:{type:"enum",className:"rt-r-weight",values:e$f,responsive:true}};
|
|
9112
9133
|
|
|
9113
|
-
const
|
|
9134
|
+
const m$4=["h1","h2","h3","h4","h5","h6"],a$g=["1","2","3","4","5","6","7","8","9"],n$8={as:{type:"enum",values:m$4,default:"h1"},...o$f,size:{type:"enum",className:"rt-r-size",values:a$g,default:"6",responsive:true},...t$f,...t$g,...r$l,...e$g,...r$k,...r$m,...o$d};
|
|
9114
9135
|
|
|
9115
|
-
const e$
|
|
9136
|
+
const e$e=["initial","xs","sm","md","lg","xl"],r$j=new Set(e$e);
|
|
9116
9137
|
|
|
9117
|
-
function e$
|
|
9138
|
+
function e$d(n,r){return Object.prototype.hasOwnProperty.call(n,r)}
|
|
9118
9139
|
|
|
9119
|
-
function r$
|
|
9140
|
+
function r$i(e){return typeof e=="object"&&e!==null&&Object.keys(e).some(s=>r$j.has(s))}
|
|
9120
9141
|
|
|
9121
|
-
function R$1({className:r,customProperties:s,...i}){const p=g$1({allowArbitraryValues:true,className:r,...i}),n=m$3({customProperties:s,...i});return [p,n]}function g$1({allowArbitraryValues:r,value:s,className:i,propValues:p,parseValue:n=e=>e}){const e=[];if(s){if(typeof s=="string"&&p.includes(s))return l$6(i,s,n);if(r$
|
|
9142
|
+
function R$1({className:r,customProperties:s,...i}){const p=g$1({allowArbitraryValues:true,className:r,...i}),n=m$3({customProperties:s,...i});return [p,n]}function g$1({allowArbitraryValues:r,value:s,className:i,propValues:p,parseValue:n=e=>e}){const e=[];if(s){if(typeof s=="string"&&p.includes(s))return l$6(i,s,n);if(r$i(s)){const t=s;for(const o in t){if(!e$d(t,o)||!r$j.has(o))continue;const u=t[o];if(u!==void 0){if(p.includes(u)){const f=l$6(i,u,n),v=o==="initial"?f:`${o}:${f}`;e.push(v);}else if(r){const f=o==="initial"?i:`${o}:${i}`;e.push(f);}}}return e.join(" ")}if(r)return i}}function l$6(r,s,i){const p=r?"-":"",n=i(s),e=n?.startsWith("-"),t=e?"-":"",o=e?n?.substring(1):n;return `${t}${r}${p}${o}`}function m$3({customProperties:r,value:s,propValues:i,parseValue:p=n=>n}){let n={};if(!(!s||typeof s=="string"&&i.includes(s))){if(typeof s=="string"&&(n=Object.fromEntries(r.map(e=>[e,s]))),r$i(s)){const e=s;for(const t in e){if(!e$d(e,t)||!r$j.has(t))continue;const o=e[t];if(!i.includes(o))for(const u of r)n={[t==="initial"?u:`${u}-${t}`]:o,...n};}}for(const e in n){const t=n[e];t!==void 0&&(n[e]=p(t));}return n}}
|
|
9122
9143
|
|
|
9123
9144
|
function l$5(...t){let e={};for(const n of t)n&&(e={...e,...n});return Object.keys(e).length?e:void 0}
|
|
9124
9145
|
|
|
9125
|
-
function N(...r){return Object.assign({},...r)}function v$3(r,...m){let t,l;const a={...r},f=N(...m);for(const n in f){let s=a[n];const e=f[n];if(e.default!==void 0&&s===void 0&&(s=e.default),e.type==="enum"&&![e.default,...e.values].includes(s)&&!r$
|
|
9146
|
+
function N$1(...r){return Object.assign({},...r)}function v$3(r,...m){let t,l;const a={...r},f=N$1(...m);for(const n in f){let s=a[n];const e=f[n];if(e.default!==void 0&&s===void 0&&(s=e.default),e.type==="enum"&&![e.default,...e.values].includes(s)&&!r$i(s)&&(s=e.default),a[n]=s,"className"in e&&e.className){delete a[n];const u="responsive"in e;if(!s||r$i(s)&&!u)continue;if(r$i(s)&&(e.default!==void 0&&s.initial===void 0&&(s.initial=e.default),e.type==="enum"&&([e.default,...e.values].includes(s.initial)||(s.initial=e.default))),e.type==="enum"){const i=g$1({allowArbitraryValues:false,value:s,className:e.className,propValues:e.values,parseValue:e.parseValue});t=classNames(t,i);continue}if(e.type==="string"||e.type==="enum | string"){const i=e.type==="string"?[]:e.values,[d,y]=R$1({className:e.className,customProperties:e.customProperties,propValues:i,parseValue:e.parseValue,value:s});l=l$5(l,y),t=classNames(t,d);continue}if(e.type==="boolean"&&s){t=classNames(t,e.className);continue}}}return a.className=classNames(t,r.className),a.style=l$5(l,r.style),a}
|
|
9126
9147
|
|
|
9127
|
-
const e$
|
|
9148
|
+
const e$c=["0","1","2","3","4","5","6","7","8","9","-1","-2","-3","-4","-5","-6","-7","-8","-9"],r$h={m:{type:"enum | string",values:e$c,responsive:true,className:"rt-r-m",customProperties:["--m"]},mx:{type:"enum | string",values:e$c,responsive:true,className:"rt-r-mx",customProperties:["--ml","--mr"]},my:{type:"enum | string",values:e$c,responsive:true,className:"rt-r-my",customProperties:["--mt","--mb"]},mt:{type:"enum | string",values:e$c,responsive:true,className:"rt-r-mt",customProperties:["--mt"]},mr:{type:"enum | string",values:e$c,responsive:true,className:"rt-r-mr",customProperties:["--mr"]},mb:{type:"enum | string",values:e$c,responsive:true,className:"rt-r-mb",customProperties:["--mb"]},ml:{type:"enum | string",values:e$c,responsive:true,className:"rt-r-ml",customProperties:["--ml"]}};
|
|
9128
9149
|
|
|
9129
|
-
const
|
|
9150
|
+
const r$g=React__namespace.forwardRef((p,t)=>{const{children:e,className:s,asChild:a,as:n="h1",color:i,...m}=v$3(p,n$8,r$h);return React__namespace.createElement(Slot$2,{"data-accent-color":i,...m,ref:t,className:classNames("rt-Heading",s)},a?e:React__namespace.createElement(n,null,e))});r$g.displayName="Heading";
|
|
9130
9151
|
|
|
9131
|
-
const
|
|
9152
|
+
const m$2=["span","div","label","p"],a$f=["1","2","3","4","5","6","7","8","9"],n$7={as:{type:"enum",values:m$2,default:"span"},...o$f,size:{type:"enum",className:"rt-r-size",values:a$f,responsive:true},...t$f,...t$g,...r$l,...e$g,...r$k,...r$m,...o$d};
|
|
9132
9153
|
|
|
9133
|
-
|
|
9154
|
+
const p$d=React__namespace.forwardRef((t,r)=>{const{children:e,className:s,asChild:m,as:a="span",color:n,...P}=v$3(t,n$7,r$h);return React__namespace.createElement(Slot$2,{"data-accent-color":n,...P,ref:r,className:classNames("rt-Text",s)},m?e:React__namespace.createElement(a,null,e))});p$d.displayName="Text";
|
|
9134
9155
|
|
|
9135
|
-
|
|
9156
|
+
function a$e(e){switch(e){case "tomato":case "red":case "ruby":case "crimson":case "pink":case "plum":case "purple":case "violet":return "mauve";case "iris":case "indigo":case "blue":case "sky":case "cyan":return "slate";case "teal":case "jade":case "mint":case "green":return "sage";case "grass":case "lime":return "olive";case "yellow":case "amber":case "orange":case "brown":case "gold":case "bronze":return "sand";case "gray":return "gray"}}
|
|
9136
9157
|
|
|
9137
|
-
const
|
|
9158
|
+
const e$b=["none","small","medium","large","full"],r$f={radius:{type:"enum",values:e$b,default:void 0}};
|
|
9138
9159
|
|
|
9139
|
-
const
|
|
9160
|
+
const t$e=["solid","translucent"],n$6=["90%","95%","100%","105%","110%"],s$7={hasBackground:{default:true},appearance:{default:"inherit"},accentColor:{values:o$e,default:"indigo"},grayColor:{values:e$k,default:"auto"},panelBackground:{values:t$e,default:"translucent"},radius:{values:e$b,default:"medium"},scaling:{values:n$6,default:"100%"}};
|
|
9140
9161
|
|
|
9141
|
-
const
|
|
9162
|
+
const d$3=()=>{},P$2=React__namespace.createContext(void 0);function H(){const a=React__namespace.useContext(P$2);if(a===void 0)throw new Error("`useThemeContext` must be used within a `Theme`");return a}const R=React__namespace.forwardRef((a,s)=>React__namespace.useContext(P$2)===void 0?React__namespace.createElement(Provider,{delayDuration:200},React__namespace.createElement(Provider$1,{dir:"ltr"},React__namespace.createElement(I$2,{...a,ref:s}))):React__namespace.createElement(A,{...a,ref:s}));R.displayName="Theme";const I$2=React__namespace.forwardRef((a,s)=>{const{appearance:r=s$7.appearance.default,accentColor:c=s$7.accentColor.default,grayColor:l=s$7.grayColor.default,panelBackground:p=s$7.panelBackground.default,radius:n=s$7.radius.default,scaling:t=s$7.scaling.default,hasBackground:i=s$7.hasBackground.default,...u}=a,[h,m]=React__namespace.useState(r);React__namespace.useEffect(()=>m(r),[r]);const[y,g]=React__namespace.useState(c);React__namespace.useEffect(()=>g(c),[c]);const[v,C]=React__namespace.useState(l);React__namespace.useEffect(()=>C(l),[l]);const[k,f]=React__namespace.useState(p);React__namespace.useEffect(()=>f(p),[p]);const[B,x]=React__namespace.useState(n);React__namespace.useEffect(()=>x(n),[n]);const[T,b]=React__namespace.useState(t);return React__namespace.useEffect(()=>b(t),[t]),React__namespace.createElement(A,{...u,ref:s,isRoot:true,hasBackground:i,appearance:h,accentColor:y,grayColor:v,panelBackground:k,radius:B,scaling:T,onAppearanceChange:m,onAccentColorChange:g,onGrayColorChange:C,onPanelBackgroundChange:f,onRadiusChange:x,onScalingChange:b})});I$2.displayName="ThemeRoot";const A=React__namespace.forwardRef((a,s)=>{const r=React__namespace.useContext(P$2),{asChild:c,isRoot:l,hasBackground:p,appearance:n=r?.appearance??s$7.appearance.default,accentColor:t=r?.accentColor??s$7.accentColor.default,grayColor:i=r?.resolvedGrayColor??s$7.grayColor.default,panelBackground:u=r?.panelBackground??s$7.panelBackground.default,radius:h=r?.radius??s$7.radius.default,scaling:m=r?.scaling??s$7.scaling.default,onAppearanceChange:y=d$3,onAccentColorChange:g=d$3,onGrayColorChange:v=d$3,onPanelBackgroundChange:C=d$3,onRadiusChange:k=d$3,onScalingChange:f=d$3,...B}=a,x=c?Slot$2:"div",T=i==="auto"?a$e(t):i,b=a.appearance==="light"||a.appearance==="dark",S=p===void 0?l||b:p;return React__namespace.createElement(P$2.Provider,{value:React__namespace.useMemo(()=>({appearance:n,accentColor:t,grayColor:i,resolvedGrayColor:T,panelBackground:u,radius:h,scaling:m,onAppearanceChange:y,onAccentColorChange:g,onGrayColorChange:v,onPanelBackgroundChange:C,onRadiusChange:k,onScalingChange:f}),[n,t,i,T,u,h,m,y,g,v,C,k,f])},React__namespace.createElement(x,{"data-is-root-theme":l?"true":"false","data-accent-color":t,"data-gray-color":T,"data-has-background":S?"true":"false","data-panel-background":u,"data-radius":h,"data-scaling":m,ref:s,...B,className:classNames("radix-themes",{light:n==="light",dark:n==="dark"},B.className)}))});A.displayName="ThemeImpl";
|
|
9163
|
+
|
|
9164
|
+
const a$d=t=>{if(!React__namespace.isValidElement(t))throw Error(`Expected a single React Element child, but got: ${React__namespace.Children.toArray(t).map(e=>typeof e=="object"&&"type"in e&&typeof e.type=="string"?e.type:typeof e).join(", ")}`);return t};
|
|
9142
9165
|
|
|
9143
9166
|
const i$9=Root$7;
|
|
9144
9167
|
|
|
9145
9168
|
function d$2(i,e){const{asChild:r,children:c}=i;if(!r)return typeof e=="function"?e(c):e;const t=React__namespace.Children.only(c);return React__namespace.cloneElement(t,{children:typeof e=="function"?e(t.props.children):e})}
|
|
9146
9169
|
|
|
9147
|
-
const t$
|
|
9170
|
+
const t$d=["1","2","3"],a$c=["solid","soft","surface","outline"],p$c={...o$f,size:{type:"enum",className:"rt-r-size",values:t$d,default:"1",responsive:true},variant:{type:"enum",className:"rt-variant",values:a$c,default:"soft"},...s$8,...o$d,...r$f};
|
|
9148
9171
|
|
|
9149
|
-
const e$
|
|
9172
|
+
const e$a=React__namespace.forwardRef((r,p)=>{const{asChild:t,className:s,color:a,radius:m,...n}=v$3(r,p$c,r$h),d=t?Slot$2:"span";return React__namespace.createElement(d,{"data-accent-color":a,"data-radius":m,...n,ref:p,className:classNames("rt-reset","rt-Badge",s)})});e$a.displayName="Badge";
|
|
9150
9173
|
|
|
9151
|
-
const e$
|
|
9174
|
+
const e$9=Slot$2;
|
|
9152
9175
|
|
|
9153
|
-
const s$6=["div","span"],o$
|
|
9176
|
+
const s$6=["div","span"],o$c=["none","inline","inline-block","block","contents"],p$b={as:{type:"enum",values:s$6,default:"div"},...o$f,display:{type:"enum",className:"rt-r-display",values:o$c,responsive:true}};
|
|
9154
9177
|
|
|
9155
|
-
const e$
|
|
9178
|
+
const e$8=["0","1","2","3","4","5","6","7","8","9"],p$a={p:{type:"enum | string",className:"rt-r-p",customProperties:["--p"],values:e$8,responsive:true},px:{type:"enum | string",className:"rt-r-px",customProperties:["--pl","--pr"],values:e$8,responsive:true},py:{type:"enum | string",className:"rt-r-py",customProperties:["--pt","--pb"],values:e$8,responsive:true},pt:{type:"enum | string",className:"rt-r-pt",customProperties:["--pt"],values:e$8,responsive:true},pr:{type:"enum | string",className:"rt-r-pr",customProperties:["--pr"],values:e$8,responsive:true},pb:{type:"enum | string",className:"rt-r-pb",customProperties:["--pb"],values:e$8,responsive:true},pl:{type:"enum | string",className:"rt-r-pl",customProperties:["--pl"],values:e$8,responsive:true}};
|
|
9156
9179
|
|
|
9157
|
-
const r$
|
|
9180
|
+
const r$e=["visible","hidden","clip","scroll","auto"],i$8=["static","relative","absolute","fixed","sticky"],e$7=["0","1","2","3","4","5","6","7","8","9","-1","-2","-3","-4","-5","-6","-7","-8","-9"],p$9=["0","1"],n$5=["0","1"],a$b=["start","center","end","baseline","stretch"],u$4=["start","center","end","baseline","stretch"],l$4={...p$a,...t$h,...e$l,position:{type:"enum",className:"rt-r-position",values:i$8,responsive:true},inset:{type:"enum | string",className:"rt-r-inset",customProperties:["--inset"],values:e$7,responsive:true},top:{type:"enum | string",className:"rt-r-top",customProperties:["--top"],values:e$7,responsive:true},right:{type:"enum | string",className:"rt-r-right",customProperties:["--right"],values:e$7,responsive:true},bottom:{type:"enum | string",className:"rt-r-bottom",customProperties:["--bottom"],values:e$7,responsive:true},left:{type:"enum | string",className:"rt-r-left",customProperties:["--left"],values:e$7,responsive:true},overflow:{type:"enum",className:"rt-r-overflow",values:r$e,responsive:true},overflowX:{type:"enum",className:"rt-r-ox",values:r$e,responsive:true},overflowY:{type:"enum",className:"rt-r-oy",values:r$e,responsive:true},flexBasis:{type:"string",className:"rt-r-fb",customProperties:["--flex-basis"],responsive:true},flexShrink:{type:"enum | string",className:"rt-r-fs",customProperties:["--flex-shrink"],values:p$9,responsive:true},flexGrow:{type:"enum | string",className:"rt-r-fg",customProperties:["--flex-grow"],values:n$5,responsive:true},gridArea:{type:"string",className:"rt-r-ga",customProperties:["--grid-area"],responsive:true},gridColumn:{type:"string",className:"rt-r-gc",customProperties:["--grid-column"],responsive:true},gridColumnStart:{type:"string",className:"rt-r-gcs",customProperties:["--grid-column-start"],responsive:true},gridColumnEnd:{type:"string",className:"rt-r-gce",customProperties:["--grid-column-end"],responsive:true},gridRow:{type:"string",className:"rt-r-gr",customProperties:["--grid-row"],responsive:true},gridRowStart:{type:"string",className:"rt-r-grs",customProperties:["--grid-row-start"],responsive:true},gridRowEnd:{type:"string",className:"rt-r-gre",customProperties:["--grid-row-end"],responsive:true},alignSelf:{type:"enum",className:"rt-r-as",values:a$b,responsive:true},justifySelf:{type:"enum",className:"rt-r-js",values:u$4,responsive:true}};
|
|
9158
9181
|
|
|
9159
|
-
const p$8=React__namespace.forwardRef((r,s)=>{const{className:t,asChild:e,as:m="div",...a}=v$3(r,p$b,l$4,r$
|
|
9182
|
+
const p$8=React__namespace.forwardRef((r,s)=>{const{className:t,asChild:e,as:m="div",...a}=v$3(r,p$b,l$4,r$h);return React__namespace.createElement(e?e$9:m,{...a,ref:s,className:classNames("rt-Box",t)})});p$8.displayName="Box";
|
|
9160
9183
|
|
|
9161
|
-
const t$
|
|
9184
|
+
const t$c=["1","2","3","4"],a$a=["classic","solid","soft","surface","outline","ghost"],i$7={...o$f,size:{type:"enum",className:"rt-r-size",values:t$c,default:"2",responsive:true},variant:{type:"enum",className:"rt-variant",values:a$a,default:"solid"},...s$8,...o$d,...r$f,loading:{type:"boolean",className:"rt-loading",default:false}};
|
|
9162
9185
|
|
|
9163
|
-
const e$
|
|
9186
|
+
const e$6=["0","1","2","3","4","5","6","7","8","9"],p$7={gap:{type:"enum | string",className:"rt-r-gap",customProperties:["--gap"],values:e$6,responsive:true},gapX:{type:"enum | string",className:"rt-r-cg",customProperties:["--column-gap"],values:e$6,responsive:true},gapY:{type:"enum | string",className:"rt-r-rg",customProperties:["--row-gap"],values:e$6,responsive:true}};
|
|
9164
9187
|
|
|
9165
|
-
const t$
|
|
9188
|
+
const t$b=["div","span"],p$6=["none","inline-flex","flex"],a$9=["row","column","row-reverse","column-reverse"],o$b=["start","center","end","baseline","stretch"],n$4=["start","center","end","between"],l$3=["nowrap","wrap","wrap-reverse"],u$3={as:{type:"enum",values:t$b,default:"div"},...o$f,display:{type:"enum",className:"rt-r-display",values:p$6,responsive:true},direction:{type:"enum",className:"rt-r-fd",values:a$9,responsive:true},align:{type:"enum",className:"rt-r-ai",values:o$b,responsive:true},justify:{type:"enum",className:"rt-r-jc",values:n$4,parseValue:f$4,responsive:true},wrap:{type:"enum",className:"rt-r-fw",values:l$3,responsive:true},...p$7};function f$4(e){return e==="between"?"space-between":e}
|
|
9166
9189
|
|
|
9167
|
-
const p$5=React__namespace.forwardRef((r,e)=>{const{className:s,asChild:t,as:m="div",...l}=v$3(r,u$3,l$4,r$
|
|
9190
|
+
const p$5=React__namespace.forwardRef((r,e)=>{const{className:s,asChild:t,as:m="div",...l}=v$3(r,u$3,l$4,r$h);return React__namespace.createElement(t?e$9:m,{...l,ref:e,className:classNames("rt-Flex",s)})});p$5.displayName="Flex";
|
|
9168
9191
|
|
|
9169
|
-
const e$
|
|
9192
|
+
const e$5=["1","2","3"],s$5={size:{type:"enum",className:"rt-r-size",values:e$5,default:"2",responsive:true},loading:{type:"boolean",default:true}};
|
|
9170
9193
|
|
|
9171
|
-
const s$4=React__namespace.forwardRef((i,o)=>{const{className:a,children:e,loading:t,...m}=v$3(i,s$5,r$
|
|
9194
|
+
const s$4=React__namespace.forwardRef((i,o)=>{const{className:a,children:e,loading:t,...m}=v$3(i,s$5,r$h);if(!t)return e;const r=React__namespace.createElement("span",{...m,ref:o,className:classNames("rt-Spinner",a)},React__namespace.createElement("span",{className:"rt-SpinnerLeaf"}),React__namespace.createElement("span",{className:"rt-SpinnerLeaf"}),React__namespace.createElement("span",{className:"rt-SpinnerLeaf"}),React__namespace.createElement("span",{className:"rt-SpinnerLeaf"}),React__namespace.createElement("span",{className:"rt-SpinnerLeaf"}),React__namespace.createElement("span",{className:"rt-SpinnerLeaf"}),React__namespace.createElement("span",{className:"rt-SpinnerLeaf"}),React__namespace.createElement("span",{className:"rt-SpinnerLeaf"}));return e===void 0?r:React__namespace.createElement(p$5,{asChild:true,position:"relative",align:"center",justify:"center"},React__namespace.createElement("span",null,React__namespace.createElement("span",{"aria-hidden":true,style:{display:"contents",visibility:"hidden"},inert:void 0},e),React__namespace.createElement(p$5,{asChild:true,align:"center",justify:"center",position:"absolute",inset:"0"},React__namespace.createElement("span",null,r))))});s$4.displayName="Spinner";
|
|
9172
9195
|
|
|
9173
9196
|
const d$1=Root$8;
|
|
9174
9197
|
|
|
9175
|
-
function s$3(e,t){if(e!==void 0)return typeof e=="string"?t(e):Object.fromEntries(Object.entries(e).map(([n,o])=>[n,t(o)]))}function r$
|
|
9198
|
+
function s$3(e,t){if(e!==void 0)return typeof e=="string"?t(e):Object.fromEntries(Object.entries(e).map(([n,o])=>[n,t(o)]))}function r$d(e){switch(e){case "1":return "1";case "2":case "3":return "2";case "4":return "3"}}
|
|
9199
|
+
|
|
9200
|
+
const n$3=React__namespace.forwardRef((t,p)=>{const{size:i=i$7.size.default}=t,{className:a,children:e,asChild:m,color:d,radius:l,disabled:s=t.loading,...u}=v$3(t,i$7,r$h),f=m?Slot$2:"button";return React__namespace.createElement(f,{"data-disabled":s||void 0,"data-accent-color":d,"data-radius":l,...u,ref:p,className:classNames("rt-reset","rt-BaseButton",a),disabled:s},t.loading?React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":true},e),React__namespace.createElement(d$1,null,e),React__namespace.createElement(p$5,{asChild:true,align:"center",justify:"center",position:"absolute",inset:"0"},React__namespace.createElement("span",null,React__namespace.createElement(s$4,{size:s$3(i,r$d)})))):e)});n$3.displayName="BaseButton";
|
|
9176
9201
|
|
|
9177
|
-
const
|
|
9202
|
+
const o$a=React__namespace.forwardRef(({className:e,...n},r)=>React__namespace.createElement(n$3,{...n,ref:r,className:classNames("rt-Button",e)}));o$a.displayName="Button";
|
|
9178
9203
|
|
|
9179
|
-
const
|
|
9204
|
+
const e$4=["1","2","3","4","5"],r$c=["surface","classic","ghost"],a$8={...o$f,size:{type:"enum",className:"rt-r-size",values:e$4,default:"1",responsive:true},variant:{type:"enum",className:"rt-variant",values:r$c,default:"surface"}};
|
|
9205
|
+
|
|
9206
|
+
const o$9=React__namespace.forwardRef((p,e)=>{const{asChild:t,className:s,...a}=v$3(p,a$8,r$h),m=t?Slot$2:"div";return React__namespace.createElement(m,{ref:e,...a,className:classNames("rt-reset","rt-BaseCard","rt-Card",s)})});o$9.displayName="Card";
|
|
9180
9207
|
|
|
9181
9208
|
// src/internal.ts
|
|
9182
9209
|
var Primitive = Primitive$1;
|
|
9183
9210
|
Primitive.dispatchDiscreteCustomEvent = dispatchDiscreteCustomEvent;
|
|
9184
9211
|
Primitive.Root = Primitive$1;
|
|
9185
9212
|
|
|
9186
|
-
const a$7=["div","span"],o$8=["none","inline-grid","grid"],u$2=["1","2","3","4","5","6","7","8","9"],p$4=["1","2","3","4","5","6","7","8","9"],l$2=["row","column","dense","row-dense","column-dense"],i$6=["start","center","end","baseline","stretch"],c$3=["start","center","end","between"],f$3=["start","center","end","baseline","between","around","evenly","stretch"],m$1=["start","center","end","baseline","stretch"],s$2={as:{type:"enum",values:a$7,default:"div"},...o$
|
|
9213
|
+
const a$7=["div","span"],o$8=["none","inline-grid","grid"],u$2=["1","2","3","4","5","6","7","8","9"],p$4=["1","2","3","4","5","6","7","8","9"],l$2=["row","column","dense","row-dense","column-dense"],i$6=["start","center","end","baseline","stretch"],c$3=["start","center","end","between"],f$3=["start","center","end","baseline","between","around","evenly","stretch"],m$1=["start","center","end","baseline","stretch"],s$2={as:{type:"enum",values:a$7,default:"div"},...o$f,display:{type:"enum",className:"rt-r-display",values:o$8,responsive:true},areas:{type:"string",className:"rt-r-gta",customProperties:["--grid-template-areas"],responsive:true},columns:{type:"enum | string",className:"rt-r-gtc",customProperties:["--grid-template-columns"],values:u$2,parseValue:t$a,responsive:true},rows:{type:"enum | string",className:"rt-r-gtr",customProperties:["--grid-template-rows"],values:p$4,parseValue:t$a,responsive:true},flow:{type:"enum",className:"rt-r-gaf",values:l$2,responsive:true},align:{type:"enum",className:"rt-r-ai",values:i$6,responsive:true},justify:{type:"enum",className:"rt-r-jc",values:c$3,parseValue:y$2,responsive:true},alignContent:{type:"enum",className:"rt-r-ac",values:f$3,parseValue:d,responsive:true},justifyItems:{type:"enum",className:"rt-r-ji",values:m$1,responsive:true},...p$7};function t$a(e){return s$2.columns.values.includes(e)?e:e?.match(/^\d+$/)?`repeat(${e}, minmax(0, 1fr))`:e}function y$2(e){return e==="between"?"space-between":e}function d(e){switch(e){case "between":return "space-between";case "around":return "space-around";case "evenly":return "space-evenly";default:return e}}
|
|
9187
9214
|
|
|
9188
|
-
const r$
|
|
9215
|
+
const r$b=["1","2","3"],o$7=["classic","surface","soft"],t$9={size:{type:"enum",className:"rt-r-size",values:r$b,default:"2",responsive:true},variant:{type:"enum",className:"rt-variant",values:o$7,default:"surface"},...r$m,...o$d};
|
|
9189
9216
|
|
|
9190
|
-
const o$6=React__namespace.forwardRef((p,s)=>{const{className:t,asChild:e,as:i="div",...m}=v$3(p,s$2,l$4,r$
|
|
9217
|
+
const o$6=React__namespace.forwardRef((p,s)=>{const{className:t,asChild:e,as:i="div",...m}=v$3(p,s$2,l$4,r$h);return React__namespace.createElement(e?e$9:i,{...m,ref:s,className:classNames("rt-Grid",t)})});o$6.displayName="Grid";
|
|
9191
9218
|
|
|
9192
|
-
const r$
|
|
9219
|
+
const r$a=React.forwardRef((e,n)=>React.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...e,ref:n},React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z"})));r$a.displayName="ThickDividerHorizontalIcon";const t$8=React.forwardRef((e,n)=>React.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...e,ref:n},React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.53547 0.62293C8.88226 0.849446 8.97976 1.3142 8.75325 1.66099L4.5083 8.1599C4.38833 8.34356 4.19397 8.4655 3.9764 8.49358C3.75883 8.52167 3.53987 8.45309 3.3772 8.30591L0.616113 5.80777C0.308959 5.52987 0.285246 5.05559 0.563148 4.74844C0.84105 4.44128 1.31533 4.41757 1.62249 4.69547L3.73256 6.60459L7.49741 0.840706C7.72393 0.493916 8.18868 0.396414 8.53547 0.62293Z"})));t$8.displayName="ThickCheckIcon";const i$5=React.forwardRef((e,n)=>React.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...e,ref:n},React.createElement("path",{d:"M0.135232 3.15803C0.324102 2.95657 0.640521 2.94637 0.841971 3.13523L4.5 6.56464L8.158 3.13523C8.3595 2.94637 8.6759 2.95657 8.8648 3.15803C9.0536 3.35949 9.0434 3.67591 8.842 3.86477L4.84197 7.6148C4.64964 7.7951 4.35036 7.7951 4.15803 7.6148L0.158031 3.86477C-0.0434285 3.67591 -0.0536285 3.35949 0.135232 3.15803Z"})));i$5.displayName="ChevronDownIcon";const l$1=React.forwardRef((e,n)=>React.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...e,ref:n},React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.23826 0.201711C3.54108 -0.0809141 4.01567 -0.0645489 4.29829 0.238264L7.79829 3.98826C8.06724 4.27642 8.06724 4.72359 7.79829 5.01174L4.29829 8.76174C4.01567 9.06455 3.54108 9.08092 3.23826 8.79829C2.93545 8.51567 2.91909 8.04108 3.20171 7.73826L6.22409 4.5L3.20171 1.26174C2.91909 0.958928 2.93545 0.484337 3.23826 0.201711Z"})));l$1.displayName="ThickChevronRightIcon";
|
|
9193
9220
|
|
|
9194
|
-
const c$2=React__namespace.forwardRef((p,i)=>{const{className:s,color:h,checked:a,defaultChecked:o,onCheckedChange:m,...n}=v$3(p,t$
|
|
9221
|
+
const c$2=React__namespace.forwardRef((p,i)=>{const{className:s,color:h,checked:a,defaultChecked:o,onCheckedChange:m,...n}=v$3(p,t$9,r$h),[r,k]=useControllableState({prop:a,defaultProp:o,onChange:m});return React__namespace.createElement(Checkbox,{"data-accent-color":h,...n,defaultChecked:o,checked:r,onCheckedChange:k,asChild:false,ref:i,className:classNames("rt-reset","rt-BaseCheckboxRoot","rt-CheckboxRoot",s)},React__namespace.createElement(CheckboxIndicator,{asChild:true,className:"rt-BaseCheckboxIndicator rt-CheckboxIndicator"},React__namespace.createElement(r==="indeterminate"?r$a:t$8,null)))});c$2.displayName="Checkbox";
|
|
9195
9222
|
|
|
9196
|
-
const r$
|
|
9223
|
+
const r$9=["1","2","3","4"],t$7=["none","initial"],p$3=["left","center","right"],n$2={...o$f,size:{type:"enum",className:"rt-r-size",values:r$9,default:"4",responsive:true},display:{type:"enum",className:"rt-r-display",values:t$7,parseValue:a$6,responsive:true},align:{type:"enum",className:"rt-r-ai",values:p$3,parseValue:i$4,responsive:true}};function a$6(e){return e==="initial"?"flex":e}function i$4(e){return e==="left"?"start":e==="right"?"end":e}
|
|
9197
9224
|
|
|
9198
|
-
const p$2=React__namespace.forwardRef(({width:n,minWidth:s,maxWidth:i,height:m,minHeight:a,maxHeight:f,...P},l)=>{const{asChild:r,children:C,className:c,...y}=v$3(P,n$2,l$4,r$
|
|
9225
|
+
const p$2=React__namespace.forwardRef(({width:n,minWidth:s,maxWidth:i,height:m,minHeight:a,maxHeight:f,...P},l)=>{const{asChild:r,children:C,className:c,...y}=v$3(P,n$2,l$4,r$h),{className:d,style:h}=v$3({width:n,minWidth:s,maxWidth:i,height:m,minHeight:a,maxHeight:f},t$h,e$l),u=r?Slot$2:"div";return React__namespace.createElement(u,{...y,ref:l,className:classNames("rt-Container",c)},d$2({asChild:r,children:C},v=>React__namespace.createElement("div",{className:classNames("rt-ContainerInner",d),style:h},v)))});p$2.displayName="Container";
|
|
9199
9226
|
|
|
9200
|
-
const r$
|
|
9227
|
+
const r$8=["1","2","3"],t$6={...o$f,size:{values:r$8,default:"1"},...r$f,scrollbars:{default:"both"}};
|
|
9201
9228
|
|
|
9202
9229
|
function a$5(r){const{m:t,mx:m,my:o,mt:p,mr:n,mb:s,ml:e,...i}=r;return {m:t,mx:m,my:o,mt:p,mr:n,mb:s,ml:e,rest:i}}
|
|
9203
9230
|
|
|
9204
|
-
const r$
|
|
9231
|
+
const r$7=r$h.m.values;function S$1(s){const[e,t]=R$1({className:"rt-r-m",customProperties:["--margin"],propValues:r$7,value:s.m}),[a,o]=R$1({className:"rt-r-mx",customProperties:["--margin-left","--margin-right"],propValues:r$7,value:s.mx}),[l,i]=R$1({className:"rt-r-my",customProperties:["--margin-top","--margin-bottom"],propValues:r$7,value:s.my}),[p,u]=R$1({className:"rt-r-mt",customProperties:["--margin-top"],propValues:r$7,value:s.mt}),[n,c]=R$1({className:"rt-r-mr",customProperties:["--margin-right"],propValues:r$7,value:s.mr}),[g,P]=R$1({className:"rt-r-mb",customProperties:["--margin-bottom"],propValues:r$7,value:s.mb}),[N,C]=R$1({className:"rt-r-ml",customProperties:["--margin-left"],propValues:r$7,value:s.ml});return [classNames(e,a,l,p,n,g,N),l$5(t,o,i,u,c,P,C)]}
|
|
9205
9232
|
|
|
9206
|
-
const c$1=React__namespace.forwardRef((n,S)=>{const{rest:f,...P}=a$5(n),[u,A]=S$1(P),{asChild:a,children:d,className:y,style:v,type:t,scrollHideDelay:N=t!=="scroll"?0:void 0,dir:V,size:i=t$
|
|
9233
|
+
const c$1=React__namespace.forwardRef((n,S)=>{const{rest:f,...P}=a$5(n),[u,A]=S$1(P),{asChild:a,children:d,className:y,style:v,type:t,scrollHideDelay:N=t!=="scroll"?0:void 0,dir:V,size:i=t$6.size.default,radius:p=t$6.radius.default,scrollbars:l=t$6.scrollbars.default,...b}=f;return React__namespace.createElement(Root$4,{type:t,scrollHideDelay:N,className:classNames("rt-ScrollAreaRoot",u,y),style:l$5(A,v),asChild:a},d$2({asChild:a,children:d},g=>React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement(Viewport$1,{...b,ref:S,className:"rt-ScrollAreaViewport"},g),React__namespace.createElement("div",{className:"rt-ScrollAreaViewportFocusRing"}),l!=="vertical"?React__namespace.createElement(Scrollbar,{"data-radius":p,orientation:"horizontal",className:classNames("rt-ScrollAreaScrollbar",g$1({className:"rt-r-size",value:i,propValues:t$6.size.values}))},React__namespace.createElement(Thumb$2,{className:"rt-ScrollAreaThumb"})):null,l!=="horizontal"?React__namespace.createElement(Scrollbar,{"data-radius":p,orientation:"vertical",className:classNames("rt-ScrollAreaScrollbar",g$1({className:"rt-r-size",value:i,propValues:t$6.size.values}))},React__namespace.createElement(Thumb$2,{className:"rt-ScrollAreaThumb"})):null,l==="both"?React__namespace.createElement(Corner,{className:"rt-ScrollAreaCorner"}):null)))});c$1.displayName="ScrollArea";
|
|
9207
9234
|
|
|
9208
9235
|
const o$5=React__namespace.forwardRef(({className:e,...n},r)=>React__namespace.createElement(n$3,{...n,ref:r,className:classNames("rt-IconButton",e)}));o$5.displayName="IconButton";
|
|
9209
9236
|
|
|
9210
|
-
const
|
|
9237
|
+
const e$3=["1","2","3","4","5","6","7","8","9"],r$6=["classic","soft"],t$5={...o$f,size:{type:"enum",className:"rt-r-size",values:e$3,responsive:true},variant:{type:"enum",className:"rt-variant",values:r$6,default:"classic"}};
|
|
9238
|
+
|
|
9239
|
+
const r$5=React__namespace.forwardRef((p,e)=>{const{asChild:t,className:s,...m}=v$3(p,t$5,r$h),d=t?Slot$2:"kbd";return React__namespace.createElement(d,{...m,ref:e,className:classNames("rt-reset","rt-Kbd",s)})});r$5.displayName="Kbd";
|
|
9211
9240
|
|
|
9212
|
-
const
|
|
9241
|
+
const p$1=["1","2","3","4"],r$4={...o$f,size:{type:"enum",className:"rt-r-size",values:p$1,default:"2",responsive:true},width:t$h.width,minWidth:t$h.minWidth,maxWidth:{...t$h.maxWidth,default:"480px"},...e$l};
|
|
9213
9242
|
|
|
9214
|
-
const
|
|
9243
|
+
const P$1=e=>React__namespace.createElement(Root2$2,{...e});P$1.displayName="Popover.Root";const s$1=React__namespace.forwardRef(({children:e,...r},t)=>React__namespace.createElement(Trigger$2,{...r,ref:t,asChild:true},a$d(e)));s$1.displayName="Popover.Trigger";const i$3=React__namespace.forwardRef((e,r)=>{const{className:t,forceMount:a,container:f,...l}=v$3(e,r$4);return React__namespace.createElement(Portal$2,{container:f,forceMount:a},React__namespace.createElement(R,{asChild:true},React__namespace.createElement(Content2$2,{align:"start",sideOffset:8,collisionPadding:10,...l,ref:r,className:classNames("rt-PopperContent","rt-PopoverContent",t)})))});i$3.displayName="Popover.Content";const v$2=React__namespace.forwardRef(({children:e,...r},t)=>React__namespace.createElement(Close,{...r,ref:t,asChild:true},a$d(e)));v$2.displayName="Popover.Close";const m=React__namespace.forwardRef(({children:e,...r},t)=>React__namespace.createElement(Anchor2,{...r,ref:t}));m.displayName="Popover.Anchor";
|
|
9215
9244
|
|
|
9216
|
-
const
|
|
9245
|
+
const o$4=["1","2","3"],t$4=["classic","surface","soft"],a$4={...o$f,size:{type:"enum",className:"rt-r-size",values:o$4,default:"2",responsive:true},variant:{type:"enum",className:"rt-variant",values:t$4,default:"surface"},...r$m,...o$d};
|
|
9217
9246
|
|
|
9218
|
-
const
|
|
9247
|
+
const f$2="RadioGroup",[v$1]=createContextScope(f$2,[createRadioGroupScope]),P=createRadioGroupScope(),[S,l]=v$1(f$2),I$1=React__namespace.forwardRef(({color:a=a$4.color.default,highContrast:e=a$4.highContrast.default,size:r=a$4.size.default,variant:t=a$4.variant.default,...i},s)=>{const{__scopeRadioGroup:p,className:m,...x}=v$3(i,r$h),C=P(p);return React__namespace.createElement(S,{scope:p,color:a,highContrast:e,size:r,variant:t},React__namespace.createElement(Root2$1,{...C,...x,ref:s,className:classNames("rt-RadioGroupRoot",m)}))});I$1.displayName="RadioGroup.Root";const y$1=React__namespace.forwardRef((a,e)=>{const{__scopeRadioGroup:r,children:t,className:i,style:s,...p}=a,{size:m}=l("RadioGroupItem",r);return t?React__namespace.createElement(p$d,{as:"label",size:m,className:classNames("rt-RadioGroupItem",i),style:s},React__namespace.createElement(n$1,{__scopeRadioGroup:r,...p,ref:e}),t&&React__namespace.createElement("span",{className:"rt-RadioGroupItemInner"},t)):React__namespace.createElement(n$1,{__scopeRadioGroup:r,...p,ref:e,className:i,style:s})});y$1.displayName="RadioGroup.Item";const n$1=React__namespace.forwardRef(({__scopeRadioGroup:a,...e},r)=>{const t=l("RadioGroupItemRadio",a),i=P(a),{color:s,className:p}=v$3({...e,...t},a$4,r$h);return React__namespace.createElement(Item2,{...i,"data-accent-color":s,...e,asChild:false,ref:r,className:classNames("rt-reset","rt-BaseRadioRoot",p)})});n$1.displayName="RadioGroup.ItemRadio";
|
|
9219
9248
|
|
|
9220
|
-
const
|
|
9249
|
+
const r$3=["1","2","3"],o$3={size:{type:"enum",className:"rt-r-size",values:r$3,default:"2",responsive:true}},a$3=["classic","surface","soft","ghost"],i$2={variant:{type:"enum",className:"rt-variant",values:a$3,default:"surface"},...r$m,...r$f,placeholder:{type:"string"}},n=["solid","soft"],p={variant:{type:"enum",className:"rt-variant",values:n,default:"solid"},...r$m,...o$d};
|
|
9221
9250
|
|
|
9222
|
-
const
|
|
9251
|
+
const f$1=React__namespace.createContext({}),C$1=r=>{const{children:o,size:t=o$3.size.default,...s}=r;return React__namespace.createElement(Root2,{...s},React__namespace.createElement(f$1.Provider,{value:React__namespace.useMemo(()=>({size:t}),[t])},o))};C$1.displayName="Select.Root";const u$1=React__namespace.forwardRef((r,o)=>{const t=React__namespace.useContext(f$1),{children:s,className:p,color:n,radius:m,placeholder:c,...S}=v$3({size:t?.size,...r},{size:o$3.size},i$2,r$h);return React__namespace.createElement(Trigger$1,{asChild:true},React__namespace.createElement("button",{"data-accent-color":n,"data-radius":m,...S,ref:o,className:classNames("rt-reset","rt-SelectTrigger",p)},React__namespace.createElement("span",{className:"rt-SelectTriggerInner"},React__namespace.createElement(Value,{placeholder:c},s)),React__namespace.createElement(Icon$1,{asChild:true},React__namespace.createElement(i$5,{className:"rt-SelectIcon"}))))});u$1.displayName="Select.Trigger";const g=React__namespace.forwardRef((r,o)=>{const t=React__namespace.useContext(f$1),{className:s,children:p$1,color:n,container:m,...c}=v$3({size:t?.size,...r},{size:o$3.size},p),S=H(),T=n||S.accentColor;return React__namespace.createElement(Portal$1,{container:m},React__namespace.createElement(R,{asChild:true},React__namespace.createElement(Content2$1,{"data-accent-color":T,sideOffset:4,...c,asChild:false,ref:o,className:classNames({"rt-PopperContent":c.position==="popper"},"rt-SelectContent",s)},React__namespace.createElement(Root$4,{type:"auto",className:"rt-ScrollAreaRoot"},React__namespace.createElement(Viewport,{asChild:true,className:"rt-SelectViewport"},React__namespace.createElement(Viewport$1,{className:"rt-ScrollAreaViewport",style:{overflowY:void 0}},p$1)),React__namespace.createElement(Scrollbar,{className:"rt-ScrollAreaScrollbar rt-r-size-1",orientation:"vertical"},React__namespace.createElement(Thumb$2,{className:"rt-ScrollAreaThumb"}))))))});g.displayName="Select.Content";const v=React__namespace.forwardRef((r,o)=>{const{className:t,children:s,...p}=r;return React__namespace.createElement(Item,{...p,asChild:false,ref:o,className:classNames("rt-SelectItem",t)},React__namespace.createElement(ItemIndicator,{className:"rt-SelectItemIndicator"},React__namespace.createElement(t$8,{className:"rt-SelectItemIndicatorIcon"})),React__namespace.createElement(ItemText,null,s))});v.displayName="Select.Item";const y=React__namespace.forwardRef(({className:r,...o},t)=>React__namespace.createElement(Group,{...o,asChild:false,ref:t,className:classNames("rt-SelectGroup",r)}));y.displayName="Select.Group";const h=React__namespace.forwardRef(({className:r,...o},t)=>React__namespace.createElement(Label,{...o,asChild:false,ref:t,className:classNames("rt-SelectLabel",r)}));h.displayName="Select.Label";const I=React__namespace.forwardRef(({className:r,...o},t)=>React__namespace.createElement(Separator,{...o,asChild:false,ref:t,className:classNames("rt-SelectSeparator",r)}));I.displayName="Select.Separator";
|
|
9223
9252
|
|
|
9224
|
-
const
|
|
9253
|
+
const e$2=["horizontal","vertical"],r$2=["1","2","3","4"],t$3={orientation:{type:"enum",className:"rt-r-orientation",values:e$2,default:"horizontal",responsive:true},size:{type:"enum",className:"rt-r-size",values:r$2,default:"1",responsive:true},color:{...r$m.color,default:"gray"},decorative:{type:"boolean",default:true}};
|
|
9225
9254
|
|
|
9226
|
-
const o$
|
|
9255
|
+
const o$2=React__namespace.forwardRef((p,e)=>{const{className:t,color:a,decorative:s,...m}=v$3(p,t$3,r$h);return React__namespace.createElement("span",{"data-accent-color":a,role:s?void 0:"separator",...m,ref:e,className:classNames("rt-Separator",t)})});o$2.displayName="Separator";
|
|
9227
9256
|
|
|
9228
|
-
const
|
|
9257
|
+
const r$1=parseFloat(React__namespace.version)>=19||"";
|
|
9229
9258
|
|
|
9230
|
-
const o=["1","2","3"],t$
|
|
9259
|
+
const o$1=["1","2","3"],t$2=["classic","surface","soft"],a$2={size:{type:"enum",className:"rt-r-size",values:o$1,default:"2",responsive:true},variant:{type:"enum",className:"rt-variant",values:t$2,default:"surface"},...r$m,...o$d,...r$f};
|
|
9231
9260
|
|
|
9232
|
-
const
|
|
9261
|
+
const s=React__namespace.forwardRef((i,a)=>{const{className:d,color:l,radius:m,tabIndex:t,...r}=v$3(i,a$2,r$h);return React__namespace.createElement(Root$3,{"data-accent-color":l,"data-radius":m,ref:a,...r,asChild:false,className:classNames("rt-SliderRoot",d)},React__namespace.createElement(Track,{className:"rt-SliderTrack"},React__namespace.createElement(Range,{className:classNames("rt-SliderRange",{"rt-high-contrast":i.highContrast}),"data-inverted":r.inverted?"":void 0})),(r.value??r.defaultValue??[]).map((S,n)=>React__namespace.createElement(Thumb$1,{key:n,className:"rt-SliderThumb",...t!==void 0?{tabIndex:t}:void 0})))});s.displayName="Slider";
|
|
9233
9262
|
|
|
9234
|
-
const
|
|
9263
|
+
const o=["1","2","3"],t$1=["classic","surface","soft"],a$1={size:{type:"enum",className:"rt-r-size",values:o,default:"2",responsive:true},variant:{type:"enum",className:"rt-variant",values:t$1,default:"surface"},...r$m,...o$d,...r$f};
|
|
9235
9264
|
|
|
9236
|
-
const
|
|
9265
|
+
const i$1=React__namespace.forwardRef((o,p)=>{const{className:s,color:m,radius:c,...a}=v$3(o,a$1,r$h);return React__namespace.createElement(Root$2,{"data-accent-color":m,"data-radius":c,...a,asChild:false,ref:p,className:classNames("rt-reset","rt-SwitchRoot",s)},React__namespace.createElement(Thumb,{className:classNames("rt-SwitchThumb",{"rt-high-contrast":o.highContrast})}))});i$1.displayName="Switch";
|
|
9266
|
+
|
|
9267
|
+
const r=["1","2","3"],t=["classic","surface","soft"],f={size:{type:"enum",className:"rt-r-size",values:r,default:"2",responsive:true},variant:{type:"enum",className:"rt-variant",values:t,default:"surface"},...r$m,...r$f},a=["left","right"],i={side:{type:"enum",values:a},...r$m,gap:u$3.gap,px:p$a.px,pl:p$a.pl,pr:p$a.pr};
|
|
9268
|
+
|
|
9269
|
+
const u=React__namespace.forwardRef((r,s)=>{const e=React__namespace.useRef(null),{children:l,className:i,color:p,radius:f$1,style:x,...P}=v$3(r,f,r$h);return React__namespace.createElement("div",{"data-accent-color":p,"data-radius":f$1,style:x,className:classNames("rt-TextFieldRoot",i),onPointerDown:T=>{const n=T.target;if(n.closest("input, button, a"))return;const o=e.current;if(!o)return;const a=n.closest(`
|
|
9237
9270
|
.rt-TextFieldSlot[data-side='right'],
|
|
9238
9271
|
.rt-TextFieldSlot:not([data-side='right']) ~ .rt-TextFieldSlot:not([data-side='left'])
|
|
9239
9272
|
`)?o.value.length:0;requestAnimationFrame(()=>{try{o.setSelectionRange(a,a);}catch{}o.focus();});}},React__namespace.createElement("input",{spellCheck:"false",...P,ref:composeRefs(e,s),className:"rt-reset rt-TextFieldInput"}),l)});u.displayName="TextField.Root";const c=React__namespace.forwardRef((r,s)=>{const{className:e,color:l,side:i$1,...p}=v$3(r,i);return React__namespace.createElement("div",{"data-accent-color":l,"data-side":i$1,...p,ref:s,className:classNames("rt-TextFieldSlot",e)})});c.displayName="TextField.Slot";
|
|
9240
9273
|
|
|
9241
|
-
const
|
|
9274
|
+
const N=React__namespace.forwardRef(({defaultOpen:n=true,...a},l)=>{const[c,h]=React__namespace.useState(n);return React__namespace.createElement(z,{...a,ref:l,open:c,onOpenChange:h})});N.displayName="ThemePanel";const z=React__namespace.forwardRef((n,a)=>{const{open:l,onOpenChange:c,onAppearanceChange:h,...v}=n,G=H(),{appearance:d,onAppearanceChange:B,accentColor:g,onAccentColorChange:$,grayColor:f,onGrayColorChange:F,panelBackground:T,onPanelBackgroundChange:O,radius:w,onRadiusChange:D,scaling:x,onScalingChange:j}=G,[k,P]=React__namespace.useState(d==="inherit"?null:d),E=h!==void 0,K=useCallbackRef$1(h),M=React__namespace.useCallback(t=>{const o=a9();if(d!=="inherit"){B(t);return}E?K(t):(P(t),l9(t)),o();},[d,B,E,K]),Z=a$e(g),S=f==="auto"?Z:f,[W,H$1]=React__namespace.useState("idle");async function U(){const t={appearance:d===s$7.appearance.default?void 0:d,accentColor:g===s$7.accentColor.default?void 0:g,grayColor:f===s$7.grayColor.default?void 0:f,panelBackground:T===s$7.panelBackground.default?void 0:T,radius:w===s$7.radius.default?void 0:w,scaling:x===s$7.scaling.default?void 0:x},o=Object.keys(t).filter(i=>t[i]!==void 0).map(i=>`${i}="${t[i]}"`).join(" "),m=o?`<Theme ${o}>`:"<Theme>";H$1("copying"),await navigator.clipboard.writeText(m),H$1("copied"),setTimeout(()=>H$1("idle"),2e3);}const b=`
|
|
9275
|
+
[contenteditable],
|
|
9276
|
+
[role="combobox"],
|
|
9277
|
+
[role="listbox"],
|
|
9278
|
+
[role="menu"],
|
|
9279
|
+
input:not([type="radio"], [type="checkbox"]),
|
|
9280
|
+
select,
|
|
9281
|
+
textarea
|
|
9282
|
+
`;return React__namespace.useEffect(()=>{function t(o){const m=o.altKey||o.ctrlKey||o.shiftKey||o.metaKey,i=document.activeElement?.closest(b);o.key?.toUpperCase()==="T"&&!m&&!i&&c(!l);}return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[c,l,b]),React__namespace.useEffect(()=>{function t(o){const m=o.altKey||o.ctrlKey||o.shiftKey||o.metaKey,i=document.activeElement?.closest(b);o.key?.toUpperCase()==="D"&&!m&&!i&&M(k==="light"?"dark":"light");}return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[M,k,b]),React__namespace.useEffect(()=>{const t=document.documentElement,o=document.body;function m(){const y=t.classList.contains("dark")||t.classList.contains("dark-theme")||o.classList.contains("dark")||o.classList.contains("dark-theme");P(d==="inherit"?y?"dark":"light":d);}const i=new MutationObserver(function(y){y.forEach(function(X){X.attributeName==="class"&&m();});});return m(),d==="inherit"&&(i.observe(t,{attributes:true}),i.observe(o,{attributes:true})),()=>i.disconnect()},[d]),React__namespace.createElement(R,{asChild:true,radius:"medium",scaling:"100%"},React__namespace.createElement(p$5,{direction:"column",position:"fixed",top:"0",right:"0",mr:"4",mt:"4",inert:l?void 0:r$1,...v,ref:a,style:{zIndex:9999,overflow:"hidden",maxHeight:"calc(100vh - var(--space-4) - var(--space-4))",borderRadius:"var(--radius-4)",backgroundColor:"var(--color-panel-solid)",transformOrigin:"top center",transitionProperty:"transform, box-shadow",transitionDuration:"200ms",transitionTimingFunction:l?"ease-out":"ease-in",transform:l?"none":"translateX(105%)",boxShadow:l?"var(--shadow-5)":"var(--shadow-2)",...n.style}},React__namespace.createElement(c$1,null,React__namespace.createElement(p$8,{flexGrow:"1",p:"5",position:"relative"},React__namespace.createElement(p$8,{position:"absolute",top:"0",right:"0",m:"2"},React__namespace.createElement(e,{content:"Press T to show/hide the Theme Panel",side:"bottom",sideOffset:6},React__namespace.createElement(r$5,{asChild:true,size:"3",tabIndex:0,className:"rt-ThemePanelShortcut"},React__namespace.createElement("button",{onClick:()=>c(!l)},"T")))),React__namespace.createElement(r$g,{size:"5",trim:"both",as:"h3",mb:"5"},"Theme"),React__namespace.createElement(p$d,{id:"accent-color-title",as:"p",size:"2",weight:"medium",mt:"5"},"Accent color"),React__namespace.createElement(o$6,{columns:"10",gap:"2",mt:"3",role:"group","aria-labelledby":"accent-color-title"},s$7.accentColor.values.map(t=>React__namespace.createElement("label",{key:t,className:"rt-ThemePanelSwatch",style:{backgroundColor:`var(--${t}-9)`}},React__namespace.createElement(e,{content:`${C(t)}${g==="gray"&&S!=="gray"?` (${C(S)})`:""}`},React__namespace.createElement("input",{className:"rt-ThemePanelSwatchInput",type:"radio",name:"accentColor",value:t,checked:g===t,onChange:o=>$(o.target.value)}))))),React__namespace.createElement(p$5,{asChild:true,align:"center",justify:"between"},React__namespace.createElement(p$d,{as:"p",id:"gray-color-title",size:"2",weight:"medium",mt:"5"},"Gray color")),React__namespace.createElement(o$6,{columns:"10",gap:"2",mt:"3",role:"group","aria-labelledby":"gray-color-title"},s$7.grayColor.values.map(t=>React__namespace.createElement(p$5,{key:t,asChild:true,align:"center",justify:"center"},React__namespace.createElement("label",{className:"rt-ThemePanelSwatch",style:{backgroundColor:t==="auto"?`var(--${Z}-9)`:t==="gray"?"var(--gray-9)":`var(--${t}-9)`,filter:t==="gray"?"saturate(0)":void 0}},React__namespace.createElement(e,{content:`${C(t)}${t==="auto"?` (${C(Z)})`:""}`},React__namespace.createElement("input",{className:"rt-ThemePanelSwatchInput",type:"radio",name:"grayColor",value:t,checked:f===t,onChange:o=>F(o.target.value)})))))),React__namespace.createElement(p$d,{id:"appearance-title",as:"p",size:"2",weight:"medium",mt:"5"},"Appearance"),React__namespace.createElement(o$6,{columns:"2",gap:"2",mt:"3",role:"group","aria-labelledby":"appearance-title"},["light","dark"].map(t=>React__namespace.createElement("label",{key:t,className:"rt-ThemePanelRadioCard"},React__namespace.createElement("input",{className:"rt-ThemePanelRadioCardInput",type:"radio",name:"appearance",value:t,checked:k===t,onChange:o=>M(o.target.value)}),React__namespace.createElement(p$5,{align:"center",justify:"center",height:"32px",gap:"2"},t==="light"?React__namespace.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{margin:"0 -1px"}},React__namespace.createElement("path",{d:"M7.5 0C7.77614 0 8 0.223858 8 0.5V2.5C8 2.77614 7.77614 3 7.5 3C7.22386 3 7 2.77614 7 2.5V0.5C7 0.223858 7.22386 0 7.5 0ZM2.1967 2.1967C2.39196 2.00144 2.70854 2.00144 2.90381 2.1967L4.31802 3.61091C4.51328 3.80617 4.51328 4.12276 4.31802 4.31802C4.12276 4.51328 3.80617 4.51328 3.61091 4.31802L2.1967 2.90381C2.00144 2.70854 2.00144 2.39196 2.1967 2.1967ZM0.5 7C0.223858 7 0 7.22386 0 7.5C0 7.77614 0.223858 8 0.5 8H2.5C2.77614 8 3 7.77614 3 7.5C3 7.22386 2.77614 7 2.5 7H0.5ZM2.1967 12.8033C2.00144 12.608 2.00144 12.2915 2.1967 12.0962L3.61091 10.682C3.80617 10.4867 4.12276 10.4867 4.31802 10.682C4.51328 10.8772 4.51328 11.1938 4.31802 11.3891L2.90381 12.8033C2.70854 12.9986 2.39196 12.9986 2.1967 12.8033ZM12.5 7C12.2239 7 12 7.22386 12 7.5C12 7.77614 12.2239 8 12.5 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12.5ZM10.682 4.31802C10.4867 4.12276 10.4867 3.80617 10.682 3.61091L12.0962 2.1967C12.2915 2.00144 12.608 2.00144 12.8033 2.1967C12.9986 2.39196 12.9986 2.70854 12.8033 2.90381L11.3891 4.31802C11.1938 4.51328 10.8772 4.51328 10.682 4.31802ZM8 12.5C8 12.2239 7.77614 12 7.5 12C7.22386 12 7 12.2239 7 12.5V14.5C7 14.7761 7.22386 15 7.5 15C7.77614 15 8 14.7761 8 14.5V12.5ZM10.682 10.682C10.8772 10.4867 11.1938 10.4867 11.3891 10.682L12.8033 12.0962C12.9986 12.2915 12.9986 12.608 12.8033 12.8033C12.608 12.9986 12.2915 12.9986 12.0962 12.8033L10.682 11.3891C10.4867 11.1938 10.4867 10.8772 10.682 10.682ZM5.5 7.5C5.5 6.39543 6.39543 5.5 7.5 5.5C8.60457 5.5 9.5 6.39543 9.5 7.5C9.5 8.60457 8.60457 9.5 7.5 9.5C6.39543 9.5 5.5 8.60457 5.5 7.5ZM7.5 4.5C5.84315 4.5 4.5 5.84315 4.5 7.5C4.5 9.15685 5.84315 10.5 7.5 10.5C9.15685 10.5 10.5 9.15685 10.5 7.5C10.5 5.84315 9.15685 4.5 7.5 4.5Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})):React__namespace.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{margin:"0 -1px"}},React__namespace.createElement("path",{d:"M2.89998 0.499976C2.89998 0.279062 2.72089 0.0999756 2.49998 0.0999756C2.27906 0.0999756 2.09998 0.279062 2.09998 0.499976V1.09998H1.49998C1.27906 1.09998 1.09998 1.27906 1.09998 1.49998C1.09998 1.72089 1.27906 1.89998 1.49998 1.89998H2.09998V2.49998C2.09998 2.72089 2.27906 2.89998 2.49998 2.89998C2.72089 2.89998 2.89998 2.72089 2.89998 2.49998V1.89998H3.49998C3.72089 1.89998 3.89998 1.72089 3.89998 1.49998C3.89998 1.27906 3.72089 1.09998 3.49998 1.09998H2.89998V0.499976ZM5.89998 3.49998C5.89998 3.27906 5.72089 3.09998 5.49998 3.09998C5.27906 3.09998 5.09998 3.27906 5.09998 3.49998V4.09998H4.49998C4.27906 4.09998 4.09998 4.27906 4.09998 4.49998C4.09998 4.72089 4.27906 4.89998 4.49998 4.89998H5.09998V5.49998C5.09998 5.72089 5.27906 5.89998 5.49998 5.89998C5.72089 5.89998 5.89998 5.72089 5.89998 5.49998V4.89998H6.49998C6.72089 4.89998 6.89998 4.72089 6.89998 4.49998C6.89998 4.27906 6.72089 4.09998 6.49998 4.09998H5.89998V3.49998ZM1.89998 6.49998C1.89998 6.27906 1.72089 6.09998 1.49998 6.09998C1.27906 6.09998 1.09998 6.27906 1.09998 6.49998V7.09998H0.499976C0.279062 7.09998 0.0999756 7.27906 0.0999756 7.49998C0.0999756 7.72089 0.279062 7.89998 0.499976 7.89998H1.09998V8.49998C1.09998 8.72089 1.27906 8.89997 1.49998 8.89997C1.72089 8.89997 1.89998 8.72089 1.89998 8.49998V7.89998H2.49998C2.72089 7.89998 2.89998 7.72089 2.89998 7.49998C2.89998 7.27906 2.72089 7.09998 2.49998 7.09998H1.89998V6.49998ZM8.54406 0.98184L8.24618 0.941586C8.03275 0.917676 7.90692 1.1655 8.02936 1.34194C8.17013 1.54479 8.29981 1.75592 8.41754 1.97445C8.91878 2.90485 9.20322 3.96932 9.20322 5.10022C9.20322 8.37201 6.82247 11.0878 3.69887 11.6097C3.45736 11.65 3.20988 11.6772 2.96008 11.6906C2.74563 11.702 2.62729 11.9535 2.77721 12.1072C2.84551 12.1773 2.91535 12.2458 2.98667 12.3128L3.05883 12.3795L3.31883 12.6045L3.50684 12.7532L3.62796 12.8433L3.81491 12.9742L3.99079 13.089C4.11175 13.1651 4.23536 13.2375 4.36157 13.3059L4.62496 13.4412L4.88553 13.5607L5.18837 13.6828L5.43169 13.7686C5.56564 13.8128 5.70149 13.8529 5.83857 13.8885C5.94262 13.9155 6.04767 13.9401 6.15405 13.9622C6.27993 13.9883 6.40713 14.0109 6.53544 14.0298L6.85241 14.0685L7.11934 14.0892C7.24637 14.0965 7.37436 14.1002 7.50322 14.1002C11.1483 14.1002 14.1032 11.1453 14.1032 7.50023C14.1032 7.25044 14.0893 7.00389 14.0623 6.76131L14.0255 6.48407C13.991 6.26083 13.9453 6.04129 13.8891 5.82642C13.8213 5.56709 13.7382 5.31398 13.6409 5.06881L13.5279 4.80132L13.4507 4.63542L13.3766 4.48666C13.2178 4.17773 13.0353 3.88295 12.8312 3.60423L12.6782 3.40352L12.4793 3.16432L12.3157 2.98361L12.1961 2.85951L12.0355 2.70246L11.8134 2.50184L11.4925 2.24191L11.2483 2.06498L10.9562 1.87446L10.6346 1.68894L10.3073 1.52378L10.1938 1.47176L9.95488 1.3706L9.67791 1.2669L9.42566 1.1846L9.10075 1.09489L8.83599 1.03486L8.54406 0.98184ZM10.4032 5.30023C10.4032 4.27588 10.2002 3.29829 9.83244 2.40604C11.7623 3.28995 13.1032 5.23862 13.1032 7.50023C13.1032 10.593 10.596 13.1002 7.50322 13.1002C6.63646 13.1002 5.81597 12.9036 5.08355 12.5522C6.5419 12.0941 7.81081 11.2082 8.74322 10.0416C8.87963 10.2284 9.10028 10.3497 9.34928 10.3497C9.76349 10.3497 10.0993 10.0139 10.0993 9.59971C10.0993 9.24256 9.84965 8.94373 9.51535 8.86816C9.57741 8.75165 9.63653 8.63334 9.6926 8.51332C9.88358 8.63163 10.1088 8.69993 10.35 8.69993C11.0403 8.69993 11.6 8.14028 11.6 7.44993C11.6 6.75976 11.0406 6.20024 10.3505 6.19993C10.3853 5.90487 10.4032 5.60464 10.4032 5.30023Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})),React__namespace.createElement(p$d,{size:"1",weight:"medium"},C(t)))))),React__namespace.createElement(p$d,{id:"radius-title",as:"p",size:"2",weight:"medium",mt:"5"},"Radius"),React__namespace.createElement(o$6,{columns:"5",gap:"2",mt:"3",role:"group","aria-labelledby":"radius-title"},s$7.radius.values.map(t=>React__namespace.createElement(p$5,{key:t,direction:"column",align:"center"},React__namespace.createElement("label",{className:"rt-ThemePanelRadioCard"},React__namespace.createElement("input",{className:"rt-ThemePanelRadioCardInput",type:"radio",name:"radius",id:`theme-panel-radius-${t}`,value:t,checked:w===t,onChange:o=>D(o.target.value)}),React__namespace.createElement(R,{asChild:true,radius:t},React__namespace.createElement(p$8,{m:"3",width:"32px",height:"32px",style:{borderTopLeftRadius:t==="full"?"80%":"var(--radius-5)",backgroundImage:"linear-gradient(to bottom right, var(--accent-3), var(--accent-4))",borderTop:"2px solid var(--accent-a8)",borderLeft:"2px solid var(--accent-a8)"}}))),React__namespace.createElement(p$8,{asChild:true,pt:"2"},React__namespace.createElement(p$d,{asChild:true,size:"1",color:"gray"},React__namespace.createElement("label",{htmlFor:`theme-panel-radius-${t}`},C(t))))))),React__namespace.createElement(p$d,{id:"scaling-title",as:"p",size:"2",weight:"medium",mt:"5"},"Scaling"),React__namespace.createElement(o$6,{columns:"5",gap:"2",mt:"3",role:"group","aria-labelledby":"scaling-title"},s$7.scaling.values.map(t=>React__namespace.createElement("label",{key:t,className:"rt-ThemePanelRadioCard"},React__namespace.createElement("input",{className:"rt-ThemePanelRadioCardInput",type:"radio",name:"scaling",value:t,checked:x===t,onChange:o=>j(o.target.value)}),React__namespace.createElement(p$5,{align:"center",justify:"center",height:"32px"},React__namespace.createElement(R,{asChild:true,scaling:t},React__namespace.createElement(p$5,{align:"center",justify:"center"},React__namespace.createElement(p$d,{size:"1",weight:"medium"},C(t)))))))),React__namespace.createElement(p$5,{mt:"5",align:"center",gap:"2"},React__namespace.createElement(p$d,{id:"panel-background-title",as:"p",size:"2",weight:"medium"},"Panel background"),React__namespace.createElement(P$1,null,React__namespace.createElement(s$1,null,React__namespace.createElement(o$5,{size:"1",variant:"ghost",color:"gray"},React__namespace.createElement(s$9,{label:"Learn more about panel background options"},React__namespace.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},React__namespace.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z",fillRule:"evenodd",clipRule:"evenodd"}))))),React__namespace.createElement(i$3,{size:"1",style:{maxWidth:220},side:"top",align:"center"},React__namespace.createElement(p$d,{as:"p",size:"2"},"Whether Card and Table panels are translucent, showing some of\xA0the background behind them.")))),React__namespace.createElement(o$6,{columns:"2",gap:"2",mt:"3",role:"group","aria-labelledby":"panel-background-title"},s$7.panelBackground.values.map(t=>React__namespace.createElement("label",{key:t,className:"rt-ThemePanelRadioCard"},React__namespace.createElement("input",{className:"rt-ThemePanelRadioCardInput",type:"radio",name:"panelBackground",value:t,checked:T===t,onChange:o=>O(o.target.value)}),React__namespace.createElement(p$5,{align:"center",justify:"center",height:"32px",gap:"2"},t==="solid"?React__namespace.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{margin:"0 -2px"}},React__namespace.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})):React__namespace.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{margin:"0 -2px"}},React__namespace.createElement("path",{opacity:".05",d:"M6.78296 13.376C8.73904 9.95284 8.73904 5.04719 6.78296 1.62405L7.21708 1.37598C9.261 4.95283 9.261 10.0472 7.21708 13.624L6.78296 13.376Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),React__namespace.createElement("path",{opacity:".1",d:"M7.28204 13.4775C9.23929 9.99523 9.23929 5.00475 7.28204 1.52248L7.71791 1.2775C9.76067 4.9119 9.76067 10.0881 7.71791 13.7225L7.28204 13.4775Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),React__namespace.createElement("path",{opacity:".15",d:"M7.82098 13.5064C9.72502 9.99523 9.72636 5.01411 7.82492 1.50084L8.26465 1.26285C10.2465 4.92466 10.2451 10.085 8.26052 13.7448L7.82098 13.5064Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),React__namespace.createElement("path",{opacity:".2",d:"M8.41284 13.429C10.1952 9.92842 10.1957 5.07537 8.41435 1.57402L8.85999 1.34729C10.7139 4.99113 10.7133 10.0128 8.85841 13.6559L8.41284 13.429Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),React__namespace.createElement("path",{opacity:".25",d:"M9.02441 13.2956C10.6567 9.8379 10.6586 5.17715 9.03005 1.71656L9.48245 1.50366C11.1745 5.09919 11.1726 9.91629 9.47657 13.5091L9.02441 13.2956Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),React__namespace.createElement("path",{opacity:".3",d:"M9.66809 13.0655C11.1097 9.69572 11.1107 5.3121 9.67088 1.94095L10.1307 1.74457C11.6241 5.24121 11.6231 9.76683 10.1278 13.2622L9.66809 13.0655Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),React__namespace.createElement("path",{opacity:".35",d:"M10.331 12.7456C11.5551 9.52073 11.5564 5.49103 10.3347 2.26444L10.8024 2.0874C12.0672 5.42815 12.0659 9.58394 10.7985 12.9231L10.331 12.7456Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),React__namespace.createElement("path",{opacity:".4",d:"M11.0155 12.2986C11.9938 9.29744 11.9948 5.71296 11.0184 2.71067L11.4939 2.55603C12.503 5.6589 12.502 9.35178 11.4909 12.4535L11.0155 12.2986Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),React__namespace.createElement("path",{opacity:".45",d:"M11.7214 11.668C12.4254 9.01303 12.4262 5.99691 11.7237 3.34116L12.2071 3.21329C12.9318 5.95292 12.931 9.05728 12.2047 11.7961L11.7214 11.668Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),React__namespace.createElement("path",{opacity:".5",d:"M12.4432 10.752C12.8524 8.63762 12.8523 6.36089 12.4429 4.2466L12.9338 4.15155C13.3553 6.32861 13.3554 8.66985 12.9341 10.847L12.4432 10.752Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),React__namespace.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})),React__namespace.createElement(p$d,{size:"1",weight:"medium"},C(t)))))),React__namespace.createElement(o$a,{mt:"5",style:{width:"100%"},onClick:U},W==="copied"?"Copied":"Copy Theme")))))});z.displayName="ThemePanelImpl";function a9(){const n=document.createElement("style");return n.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(n),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(n);},1);}}function C(n){return n.charAt(0).toUpperCase()+n.slice(1)}function l9(n){const a=document.documentElement,l=a.classList.contains("light-theme"),c=a.classList.contains("dark-theme"),h=a.classList.contains("light"),v=a.classList.contains("dark");(l||c)&&(a.classList.remove("light-theme","dark-theme"),a.style.colorScheme=n,a.classList.add(`${n}-theme`)),(h||v)&&(a.classList.remove("light","dark"),a.style.colorScheme=n,a.classList.add(n)),!l&&!c&&!h&&!v&&(a.style.colorScheme=n,a.classList.add(n));}
|
|
9283
|
+
|
|
9284
|
+
const e$1={content:{type:"ReactNode",required:true},width:t$h.width,minWidth:t$h.minWidth,maxWidth:{...t$h.maxWidth,default:"360px"}};
|
|
9242
9285
|
|
|
9243
9286
|
const e=React__namespace.forwardRef((i,p)=>{const{children:r,className:n,open:s,defaultOpen:l,onOpenChange:m,delayDuration:a,disableHoverableContent:f,content:P,container:T,forceMount:c,...d}=v$3(i,e$1),C={open:s,defaultOpen:l,onOpenChange:m,delayDuration:a,disableHoverableContent:f};return React__namespace.createElement(Root3,{...C},React__namespace.createElement(Trigger,{asChild:true},r),React__namespace.createElement(Portal,{container:T,forceMount:c},React__namespace.createElement(R,{asChild:true},React__namespace.createElement(Content2,{sideOffset:4,collisionPadding:10,...d,asChild:false,ref:p,className:classNames("rt-TooltipContent",n)},React__namespace.createElement(p$d,{as:"p",className:"rt-TooltipText",size:"1"},P),React__namespace.createElement(Arrow2,{className:"rt-TooltipArrow"})))))});e.displayName="Tooltip";
|
|
9244
9287
|
|
|
@@ -12124,8 +12167,8 @@ const getStyles$1 = (inputtype, shape, hasError) => {
|
|
|
12124
12167
|
}
|
|
12125
12168
|
return Object.assign(Object.assign(Object.assign({}, base), { borderRadius }), designStyles);
|
|
12126
12169
|
};
|
|
12127
|
-
const
|
|
12128
|
-
var { inputtype = 'avatar', alias, readOnly, width, placeholder = '', value, shape = 'circle', size = 120, style, accept = 'image/*' } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "placeholder", "value", "shape", "size", "style", "accept"]);
|
|
12170
|
+
const AvatarInput = (_a) => {
|
|
12171
|
+
var { inputtype = 'avatar-outline', alias, readOnly, width, placeholder = '', value, shape = 'circle', size = 120, style, accept = 'image/*' } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "placeholder", "value", "shape", "size", "style", "accept"]);
|
|
12129
12172
|
const [field, meta, helpers] = formik.useField(alias);
|
|
12130
12173
|
const { setTouched } = formik.useFormikContext();
|
|
12131
12174
|
const inputRef = React.useRef(null);
|
|
@@ -12255,6 +12298,10 @@ const ACCEPTED_FORMATS = [
|
|
|
12255
12298
|
"application/json", // JSON
|
|
12256
12299
|
".zip", "application/zip", "application/x-zip-compressed" // ZIP
|
|
12257
12300
|
].join(',');
|
|
12301
|
+
const ACCEPTED_EXTENSIONS = [
|
|
12302
|
+
".jpeg", ".jpg", ".pdf", ".png", ".gif",
|
|
12303
|
+
".docx", ".xlsx", ".csv", ".txt", ".json", ".zip"
|
|
12304
|
+
].join(",");
|
|
12258
12305
|
// Byte Formatter
|
|
12259
12306
|
const formatBytes = (bytes, decimals = 2) => {
|
|
12260
12307
|
if (!+bytes)
|
|
@@ -12266,8 +12313,8 @@ const formatBytes = (bytes, decimals = 2) => {
|
|
|
12266
12313
|
return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}`;
|
|
12267
12314
|
};
|
|
12268
12315
|
|
|
12269
|
-
const
|
|
12270
|
-
var { inputtype = 'button', alias, readOnly, style, width, children } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "style", "width", "children"]);
|
|
12316
|
+
const ButtonInput = (_a) => {
|
|
12317
|
+
var { inputtype = 'button-outline', alias, readOnly, style, width, children } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "style", "width", "children"]);
|
|
12271
12318
|
const buttonRef = React.useRef(null);
|
|
12272
12319
|
const [neumorphicVars, setNeumorphicVars] = React.useState({});
|
|
12273
12320
|
const [bgColor, setBgColor] = React.useState('#ffffff');
|
|
@@ -12289,7 +12336,7 @@ const xButton = (_a) => {
|
|
|
12289
12336
|
display: 'inline-flex',
|
|
12290
12337
|
alignItems: 'center',
|
|
12291
12338
|
justifyContent: 'center',
|
|
12292
|
-
gap: '8px',
|
|
12339
|
+
gap: '8px',
|
|
12293
12340
|
};
|
|
12294
12341
|
const materialStyle = {
|
|
12295
12342
|
textTransform: 'uppercase',
|
|
@@ -12305,13 +12352,11 @@ const xButton = (_a) => {
|
|
|
12305
12352
|
background: 'transparent',
|
|
12306
12353
|
};
|
|
12307
12354
|
const neumorphicStyle = {
|
|
12308
|
-
// CSS variables injection
|
|
12309
12355
|
backgroundColor: bgColor,
|
|
12310
|
-
color: 'var(--gray-12)',
|
|
12356
|
+
color: 'var(--gray-12)',
|
|
12311
12357
|
border: 'none',
|
|
12312
12358
|
borderRadius: '12px',
|
|
12313
12359
|
fontWeight: 600,
|
|
12314
|
-
// The Standard State
|
|
12315
12360
|
boxShadow: '6px 6px 12px var(--neu-shadow-dark), -6px -6px 12px var(--neu-shadow-light)',
|
|
12316
12361
|
transition: 'all 0.2s ease-in-out',
|
|
12317
12362
|
};
|
|
@@ -12336,7 +12381,6 @@ const xButton = (_a) => {
|
|
|
12336
12381
|
return {
|
|
12337
12382
|
variant: 'ghost',
|
|
12338
12383
|
className: 'neumorphic-btn',
|
|
12339
|
-
// Merge custom vars with styles
|
|
12340
12384
|
style: Object.assign(Object.assign(Object.assign({}, neumorphicStyle), neumorphicVars), style)
|
|
12341
12385
|
};
|
|
12342
12386
|
default:
|
|
@@ -12354,7 +12398,7 @@ const xButton = (_a) => {
|
|
|
12354
12398
|
transform: translateY(-2px);
|
|
12355
12399
|
}
|
|
12356
12400
|
` } })),
|
|
12357
|
-
React.createElement(o$
|
|
12401
|
+
React.createElement(o$a, Object.assign({ name: alias, disabled: readOnly, id: `${alias}FormInput`, "aria-describedby": `${alias}InputLabel`, ref: buttonRef, onClick: handler }, props, getVariantProps()),
|
|
12358
12402
|
props.icon && (React.createElement("span", { style: { display: 'flex', alignItems: 'center' } }, props.icon)),
|
|
12359
12403
|
children),
|
|
12360
12404
|
React.createElement("div", null, props.isHinted ?
|
|
@@ -12364,15 +12408,14 @@ const xButton = (_a) => {
|
|
|
12364
12408
|
React.createElement(Icon, { name: 'questionmarkcircled', height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null))));
|
|
12365
12409
|
};
|
|
12366
12410
|
|
|
12367
|
-
const
|
|
12368
|
-
var { inputtype = 'checkbox', alias, readOnly, width, placeholder = '', style, value, inputoptions, direction = 'column', columns, className } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "placeholder", "style", "value", "inputoptions", "direction", "columns", "className"]);
|
|
12411
|
+
const CheckboxGroupInput = (_a) => {
|
|
12412
|
+
var { inputtype = 'checkbox-outline', alias, readOnly, width, placeholder = '', style, value, inputoptions, direction = 'column', columns, className } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "placeholder", "style", "value", "inputoptions", "direction", "columns", "className"]);
|
|
12369
12413
|
const { setFieldValue, setFieldTouched } = formik.useFormikContext();
|
|
12370
12414
|
const [field, meta] = formik.useField(alias);
|
|
12371
12415
|
const currentValues = (Array.isArray(field.value) ? field.value : []);
|
|
12372
12416
|
const hasError = Boolean(meta.touched && meta.error);
|
|
12373
12417
|
const containerRef = React.useRef(null);
|
|
12374
12418
|
const [neuVars, setNeuVars] = React.useState({});
|
|
12375
|
-
// Add/Remove Checked Values
|
|
12376
12419
|
const handleCheckedChange = (checked, value) => {
|
|
12377
12420
|
let newValues = [...currentValues];
|
|
12378
12421
|
if (checked) {
|
|
@@ -12398,7 +12441,6 @@ const CheckboxGroup = (_a) => {
|
|
|
12398
12441
|
return (React.createElement(Column, { span: width, newLine: props.newRow },
|
|
12399
12442
|
React.createElement(p$5, { direction: "column", gap: "2", width: "100%", ref: containerRef, style: style, className: className },
|
|
12400
12443
|
inputtype === 'checkbox-neumorphic' && (React.createElement("style", { dangerouslySetInnerHTML: { __html: `
|
|
12401
|
-
/* Hide default Radix checkbox appearance to replace with our own */
|
|
12402
12444
|
.neu-checkbox .rt-CheckboxButton {
|
|
12403
12445
|
background-color: var(--neu-bg);
|
|
12404
12446
|
border: none;
|
|
@@ -12413,14 +12455,13 @@ const CheckboxGroup = (_a) => {
|
|
|
12413
12455
|
box-shadow: inset 3px 3px 6px var(--neu-shadow-dark), inset -3px -3px 6px var(--neu-shadow-light);
|
|
12414
12456
|
background-color: var(--neu-bg); /* Keep bg same, let icon show color */
|
|
12415
12457
|
}
|
|
12416
|
-
/* The Check Icon Color */
|
|
12417
12458
|
.neu-checkbox .rt-CheckboxIndicator {
|
|
12418
12459
|
color: var(--neu-check-color);
|
|
12419
12460
|
}
|
|
12420
12461
|
` } })),
|
|
12421
12462
|
React.createElement(o$6, { columns: columns || (direction === 'row' ? 'repeat(auto-fit, minmax(100px, 1fr))' : '1'), gap: "3", style: neuVars }, inputoptions.map((inputoption) => {
|
|
12422
12463
|
const isChecked = currentValues.some(val => String(val) === String(inputoption.optionvalue));
|
|
12423
|
-
return (React.createElement(p$d, { as: "label", key: inputoption.optionvalue, size: "2", style: {
|
|
12464
|
+
return (React.createElement(p$d, { as: "label", key: inputoption.optionvalue || crypto.randomUUID(), size: "2", style: {
|
|
12424
12465
|
display: 'flex',
|
|
12425
12466
|
alignItems: 'center',
|
|
12426
12467
|
gap: '8px',
|
|
@@ -12472,7 +12513,7 @@ const getDesignStyles = (inputtype, isOpen) => {
|
|
|
12472
12513
|
return Object.assign(Object.assign({}, base), { backgroundColor: 'transparent', border: '1px solid var(--gray-6)', borderLeft: isOpen ? '4px solid var(--accent-9)' : '1px solid var(--gray-6)' });
|
|
12473
12514
|
};
|
|
12474
12515
|
const ConditionalTrigger = (_a) => {
|
|
12475
|
-
var { alias, readOnly, width, placeholder = '', value, inputtype = 'conditionaltoggle', triggerValue = true, inputoptions = [], toggledinputtype =
|
|
12516
|
+
var { alias, readOnly, width, placeholder = '', value, inputtype = 'conditionaltoggle-outline', triggerValue = true, inputoptions = [], toggledinputtype = "conditionaltoggle-outline", children, style, className } = _a, props = __rest$1(_a, ["alias", "readOnly", "width", "placeholder", "value", "inputtype", "triggerValue", "inputoptions", "toggledinputtype", "children", "style", "className"]);
|
|
12476
12517
|
const [field, meta, helpers] = formik.useField(alias);
|
|
12477
12518
|
const { setTouched } = formik.useFormikContext();
|
|
12478
12519
|
const inputId = `${alias}FormInput` || crypto.randomUUID();
|
|
@@ -12494,9 +12535,9 @@ const ConditionalTrigger = (_a) => {
|
|
|
12494
12535
|
case inputtype.includes('conditionalselect'):
|
|
12495
12536
|
return (React.createElement(p$5, { direction: "column", gap: "1", style: { width: '100%' } },
|
|
12496
12537
|
React.createElement(p$d, { as: "label", size: "2", weight: "bold" }, props.inputLabel),
|
|
12497
|
-
React.createElement(C, { name: alias, disabled: readOnly, value: field.value, defaultValue: placeholder || String(value) || "", onValueChange: handleChange },
|
|
12538
|
+
React.createElement(C$1, { name: alias, disabled: readOnly, value: field.value, defaultValue: placeholder || String(value) || "", onValueChange: handleChange },
|
|
12498
12539
|
React.createElement(u$1, { id: inputId, variant: isNeumorphic ? 'soft' : 'surface', style: { width: '100%' } }),
|
|
12499
|
-
React.createElement(g, null, inputoptions.map((inputoption) => (React.createElement(v, { key: inputoption.optionvalue, value: inputoption.optionvalue }, inputoption.text)))))));
|
|
12540
|
+
React.createElement(g, null, inputoptions.map((inputoption) => (React.createElement(v, { key: inputoption.optionvalue || crypto.randomUUID(), value: inputoption.optionvalue }, inputoption.text)))))));
|
|
12500
12541
|
case inputtype.includes('conditionaltoggle'):
|
|
12501
12542
|
default:
|
|
12502
12543
|
return (React.createElement(p$5, { justify: "between", align: "center", style: { width: '100%' } },
|
|
@@ -20803,7 +20844,7 @@ const ensureDate = (date) => {
|
|
|
20803
20844
|
};
|
|
20804
20845
|
|
|
20805
20846
|
const DatePicker = (_a) => {
|
|
20806
|
-
var { inputtype = 'datepicker', alias, readOnly, width, placeholder = 'Pick a date', value, minvalue, maxvalue, className, style } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "placeholder", "value", "minvalue", "maxvalue", "className", "style"]);
|
|
20847
|
+
var { inputtype = 'datepicker-outline', alias, readOnly, width, placeholder = 'Pick a date', value, minvalue, maxvalue, className, style } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "placeholder", "value", "minvalue", "maxvalue", "className", "style"]);
|
|
20807
20848
|
const { setFieldValue, setFieldTouched } = formik.useFormikContext();
|
|
20808
20849
|
const [field, meta] = formik.useField(alias);
|
|
20809
20850
|
const hasError = Boolean(meta.touched && meta.error);
|
|
@@ -20920,7 +20961,7 @@ const DatePicker = (_a) => {
|
|
|
20920
20961
|
|
|
20921
20962
|
const DateRangePicker = (_a) => {
|
|
20922
20963
|
var _b, _c;
|
|
20923
|
-
var { inputtype = 'daterangepicker', alias, readOnly, width, placeholder = '', value, minvalue, maxvalue, className, style } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "placeholder", "value", "minvalue", "maxvalue", "className", "style"]);
|
|
20964
|
+
var { inputtype = 'daterangepicker-outline', alias, readOnly, width, placeholder = '', value, minvalue, maxvalue, className, style } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "placeholder", "value", "minvalue", "maxvalue", "className", "style"]);
|
|
20924
20965
|
const { setFieldValue, setFieldTouched } = formik.useFormikContext();
|
|
20925
20966
|
const [field, meta] = formik.useField(alias);
|
|
20926
20967
|
const hasError = Boolean(meta.touched && meta.error);
|
|
@@ -21025,7 +21066,7 @@ const DateRangePicker = (_a) => {
|
|
|
21025
21066
|
};
|
|
21026
21067
|
|
|
21027
21068
|
const DateTimePicker = (_a) => {
|
|
21028
|
-
var { inputtype = 'datetimepicker', alias, readOnly, width, placeholder = '', value, minvalue, maxvalue, className, style } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "placeholder", "value", "minvalue", "maxvalue", "className", "style"]);
|
|
21069
|
+
var { inputtype = 'datetimepicker-outline', alias, readOnly, width, placeholder = '', value, minvalue, maxvalue, className, style } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "placeholder", "value", "minvalue", "maxvalue", "className", "style"]);
|
|
21029
21070
|
const { setFieldValue, setFieldTouched } = formik.useFormikContext();
|
|
21030
21071
|
const [field, meta] = formik.useField(alias);
|
|
21031
21072
|
const hasError = Boolean(meta.touched && meta.error);
|
|
@@ -21142,7 +21183,7 @@ const DateTimePicker = (_a) => {
|
|
|
21142
21183
|
React.createElement("input", { type: "number", className: "time-input", min: "0", max: "23", value: selectedDate ? format$2(selectedDate, 'HH') : '12', onChange: (e) => handleTimeChange('hours', e.target.value) }),
|
|
21143
21184
|
React.createElement(p$d, null, ":"),
|
|
21144
21185
|
React.createElement("input", { type: "number", className: "time-input", min: "0", max: "59", value: selectedDate ? format$2(selectedDate, 'mm') : '00', onChange: (e) => handleTimeChange('minutes', e.target.value) }),
|
|
21145
|
-
React.createElement(o$
|
|
21186
|
+
React.createElement(o$a, { size: "1", variant: "soft", onClick: () => setIsOpen(false) }, "Done"))))),
|
|
21146
21187
|
React.createElement("div", null,
|
|
21147
21188
|
React.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias }, props.inputLabel),
|
|
21148
21189
|
hasError ?
|
|
@@ -21156,7 +21197,7 @@ const DateTimePicker = (_a) => {
|
|
|
21156
21197
|
};
|
|
21157
21198
|
|
|
21158
21199
|
const Dropdown = (_a) => {
|
|
21159
|
-
var { inputtype = 'dropdown-
|
|
21200
|
+
var { inputtype = 'dropdown-outline', alias, readOnly, width, placeholder, value, inputoptions, style } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "placeholder", "value", "inputoptions", "style"]);
|
|
21160
21201
|
const triggerRef = React.useRef(null);
|
|
21161
21202
|
const [neuVars, setNeuVars] = React.useState({});
|
|
21162
21203
|
const { setFieldValue, setFieldTouched } = formik.useFormikContext();
|
|
@@ -21239,7 +21280,7 @@ const Dropdown = (_a) => {
|
|
|
21239
21280
|
cursor: pointer;
|
|
21240
21281
|
}
|
|
21241
21282
|
` } })),
|
|
21242
|
-
React.createElement(C, { name: alias, disabled: readOnly, "aria-describedby": `${alias}InputLabel`, defaultValue: props.defaultValue || value, value: field.value || value, onValueChange: (val) => {
|
|
21283
|
+
React.createElement(C$1, { name: alias, disabled: readOnly, "aria-describedby": `${alias}InputLabel`, defaultValue: props.defaultValue || value, value: field.value || value, onValueChange: (val) => {
|
|
21243
21284
|
setFieldValue(alias, val);
|
|
21244
21285
|
setTimeout(() => setFieldTouched(alias, true), 0);
|
|
21245
21286
|
}, onOpenChange: (isOpen) => {
|
|
@@ -21248,10 +21289,9 @@ const Dropdown = (_a) => {
|
|
|
21248
21289
|
}
|
|
21249
21290
|
} },
|
|
21250
21291
|
React.createElement(u$1, { id: `${alias}FormInput`, ref: triggerRef, variant: "ghost", placeholder: placeholder, className: `${inputtype === 'dropdown-neumorphic' ? 'neu-select-trigger' : ''} ${props.className || ''}`, style: Object.assign(Object.assign({}, activeTriggerStyle), style) }),
|
|
21251
|
-
React.createElement(g, { position: "popper", sideOffset: 5, style: activeContentStyle }, inputoptions.map((inputoption) => (React.createElement(React.Fragment,
|
|
21252
|
-
React.createElement(
|
|
21253
|
-
React.createElement("a", { href: inputoption.optionurl || "", target: "_blank", rel: "noopener noreferrer" },
|
|
21254
|
-
React.createElement(v, { id: String(inputoption.optionid) || '', key: inputoption.optionid, value: inputoption.optionvalue, className: inputtype === 'dropdown-neumorphic' ? 'neu-select-item' : '' }, inputoption.text)))
|
|
21292
|
+
React.createElement(g, { position: "popper", sideOffset: 5, style: activeContentStyle }, inputoptions.map((inputoption) => (React.createElement(React.Fragment, { key: inputoption.optionid || crypto.randomUUID() }, inputoption.optionurl ?
|
|
21293
|
+
React.createElement(v, { id: String(inputoption.optionid) || '', key: inputoption.optionid, value: inputoption.optionvalue, className: inputtype === 'dropdown-neumorphic' ? 'neu-select-item' : '' },
|
|
21294
|
+
React.createElement("a", { style: { textDecoration: 'none' }, href: inputoption.optionurl || "", target: "_blank", rel: "noopener noreferrer" }, inputoption.text))
|
|
21255
21295
|
:
|
|
21256
21296
|
React.createElement(React.Fragment, null,
|
|
21257
21297
|
React.createElement(v, { id: String(inputoption.optionid) || '', key: inputoption.optionid, value: inputoption.optionvalue, className: inputtype === 'dropdown-neumorphic' ? 'neu-select-item' : '' }, inputoption.text))))))),
|
|
@@ -21267,7 +21307,7 @@ const Dropdown = (_a) => {
|
|
|
21267
21307
|
React.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null)))));
|
|
21268
21308
|
};
|
|
21269
21309
|
|
|
21270
|
-
const getFileIcon = (type, name) => {
|
|
21310
|
+
const getFileIcon$1 = (type, name) => {
|
|
21271
21311
|
if (type.includes('image'))
|
|
21272
21312
|
return React.createElement(Icon, { name: 'image', width: "24", height: "24" });
|
|
21273
21313
|
if (type.includes('pdf'))
|
|
@@ -21282,10 +21322,9 @@ const getFileIcon = (type, name) => {
|
|
|
21282
21322
|
};
|
|
21283
21323
|
const File$1 = (_a) => {
|
|
21284
21324
|
var _b;
|
|
21285
|
-
var { inputtype = 'fileinput', alias, readOnly, width, placeholder = '', value, preview = false, className, style } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "placeholder", "value", "preview", "className", "style"]);
|
|
21325
|
+
var { inputtype = 'fileinput-outline', alias, readOnly, width, placeholder = '', value, preview = false, className, style } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "placeholder", "value", "preview", "className", "style"]);
|
|
21286
21326
|
const { setFieldValue, setFieldTouched } = formik.useFormikContext();
|
|
21287
21327
|
const [field, meta] = formik.useField(alias);
|
|
21288
|
-
// File object or null
|
|
21289
21328
|
const selectedFile = field.value;
|
|
21290
21329
|
const hasError = Boolean(meta.touched && meta.error);
|
|
21291
21330
|
const inputRef = React.useRef(null);
|
|
@@ -21308,7 +21347,7 @@ const File$1 = (_a) => {
|
|
|
21308
21347
|
if (inputRef.current)
|
|
21309
21348
|
inputRef.current.value = '';
|
|
21310
21349
|
};
|
|
21311
|
-
//
|
|
21350
|
+
// Preview URL generator
|
|
21312
21351
|
React.useEffect(() => {
|
|
21313
21352
|
if (!selectedFile || !selectedFile.type.startsWith('image/')) {
|
|
21314
21353
|
setPreviewUrl(null);
|
|
@@ -21368,7 +21407,7 @@ const File$1 = (_a) => {
|
|
|
21368
21407
|
React.createElement(p$8, { style: { padding: 8, borderRadius: '50%', backgroundColor: 'var(--gray-3)' } },
|
|
21369
21408
|
React.createElement(Icon, { name: 'upload', width: "18", height: "18" })),
|
|
21370
21409
|
React.createElement(p$5, { direction: "column" },
|
|
21371
|
-
React.createElement(p$d, { size: "2", weight: "bold", color: "gray" }, "
|
|
21410
|
+
React.createElement(p$d, { size: "2", weight: "bold", color: "gray" }, "Upload File"),
|
|
21372
21411
|
React.createElement(p$d, { size: "1", color: "gray" }, "Supports PDF, Images, Excel, JSON...")))) : (
|
|
21373
21412
|
// --- SELECTED STATE ---
|
|
21374
21413
|
React.createElement(p$5, { align: "center", gap: "4", style: { width: '100%' } },
|
|
@@ -21378,12 +21417,12 @@ const File$1 = (_a) => {
|
|
|
21378
21417
|
display: 'flex', alignItems: 'center', justifyContent: 'center',
|
|
21379
21418
|
backgroundColor: 'var(--accent-3)', color: 'var(--accent-9)',
|
|
21380
21419
|
borderRadius: 6, flexShrink: 0
|
|
21381
|
-
} }, getFileIcon(selectedFile.type, selectedFile.name))),
|
|
21420
|
+
} }, getFileIcon$1(selectedFile.type, selectedFile.name))),
|
|
21382
21421
|
React.createElement(p$5, { direction: "column", style: { flexGrow: 1, overflow: 'hidden' } },
|
|
21383
21422
|
React.createElement(p$d, { size: "2", weight: "bold", style: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' } }, selectedFile.name),
|
|
21384
21423
|
React.createElement(p$5, { gap: "2", align: "center" },
|
|
21385
21424
|
React.createElement(p$d, { size: "1", color: "gray" }, formatBytes(selectedFile.size)),
|
|
21386
|
-
React.createElement(e$
|
|
21425
|
+
React.createElement(e$a, { size: "1", color: "gray", variant: "soft" }, (_b = selectedFile.name.split('.').pop()) === null || _b === void 0 ? void 0 : _b.toUpperCase()))),
|
|
21387
21426
|
React.createElement(o$5, { size: "1", variant: "ghost", color: "red", onClick: handleClear, style: { borderRadius: '50%', padding: 4 } },
|
|
21388
21427
|
React.createElement(Icon, { name: 'close', width: "16", height: "16" }))))),
|
|
21389
21428
|
React.createElement("div", null,
|
|
@@ -21398,6 +21437,174 @@ const File$1 = (_a) => {
|
|
|
21398
21437
|
React.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null))));
|
|
21399
21438
|
};
|
|
21400
21439
|
|
|
21440
|
+
const getFileIcon = (fileOrUrl) => {
|
|
21441
|
+
var _a, _b, _c, _d, _e;
|
|
21442
|
+
if (typeof fileOrUrl === 'string') {
|
|
21443
|
+
const ext = (_a = fileOrUrl.split('.').pop()) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
21444
|
+
if (['jpg', 'jpeg', 'png', 'gif'].includes(ext || ''))
|
|
21445
|
+
return React.createElement(Icon, { name: 'image' });
|
|
21446
|
+
if (ext === 'pdf')
|
|
21447
|
+
return React.createElement(Icon, { name: 'filetext', color: "red" });
|
|
21448
|
+
return React.createElement(Icon, { name: 'file' });
|
|
21449
|
+
}
|
|
21450
|
+
if ((_b = fileOrUrl.type) === null || _b === void 0 ? void 0 : _b.startsWith('image/'))
|
|
21451
|
+
return React.createElement(Icon, { name: 'image' });
|
|
21452
|
+
if ((_c = fileOrUrl.type) === null || _c === void 0 ? void 0 : _c.includes('pdf'))
|
|
21453
|
+
return React.createElement(Icon, { name: 'filetext', color: "red" });
|
|
21454
|
+
if (((_d = fileOrUrl.type) === null || _d === void 0 ? void 0 : _d.includes('sheet')) || ((_e = fileOrUrl.type) === null || _e === void 0 ? void 0 : _e.includes('csv')))
|
|
21455
|
+
return React.createElement(Icon, { name: 'filetext', color: "green" });
|
|
21456
|
+
return React.createElement(Icon, { name: 'filetext' });
|
|
21457
|
+
};
|
|
21458
|
+
// --- Styles ---
|
|
21459
|
+
const styles = {
|
|
21460
|
+
'filemultiple': {
|
|
21461
|
+
border: '2px dashed var(--gray-a8)',
|
|
21462
|
+
borderRadius: 'var(--radius-3)',
|
|
21463
|
+
background: 'transparent',
|
|
21464
|
+
},
|
|
21465
|
+
// Outline
|
|
21466
|
+
'filemultiple-outline': {
|
|
21467
|
+
border: '2px dashed var(--gray-a8)',
|
|
21468
|
+
borderRadius: 'var(--radius-3)',
|
|
21469
|
+
background: 'transparent',
|
|
21470
|
+
},
|
|
21471
|
+
// Material
|
|
21472
|
+
'filemultiple-material': {
|
|
21473
|
+
border: 'none',
|
|
21474
|
+
borderBottom: '2px solid var(--accent-9)',
|
|
21475
|
+
background: 'var(--gray-a3)',
|
|
21476
|
+
borderRadius: '4px 4px 0 0',
|
|
21477
|
+
},
|
|
21478
|
+
// Neumorphic
|
|
21479
|
+
'filemultiple-neumorphic': {
|
|
21480
|
+
border: 'none',
|
|
21481
|
+
borderRadius: '16px',
|
|
21482
|
+
background: '#e0e0e0',
|
|
21483
|
+
boxShadow: '6px 6px 12px #b8b9be, -6px -6px 12px #ffffff',
|
|
21484
|
+
}
|
|
21485
|
+
};
|
|
21486
|
+
const FileMultiple = (_a) => {
|
|
21487
|
+
var { inputtype = 'filemultiple-outline', alias, readOnly, width, placeholder = '', value, preview = true, className, style } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "placeholder", "value", "preview", "className", "style"]);
|
|
21488
|
+
const [field, meta] = formik.useField(alias);
|
|
21489
|
+
const { setFieldValue, setFieldTouched } = formik.useFormikContext();
|
|
21490
|
+
const inputRef = React.useRef(null);
|
|
21491
|
+
const [objectUrls, setObjectUrls] = React.useState({});
|
|
21492
|
+
const inputId = `${alias}FormInput` || crypto.randomUUID();
|
|
21493
|
+
const errorId = `${alias}-error`;
|
|
21494
|
+
const currentFiles = Array.isArray(field.value) ? field.value : [];
|
|
21495
|
+
React.useEffect(() => {
|
|
21496
|
+
if (!preview)
|
|
21497
|
+
return;
|
|
21498
|
+
const newUrls = {};
|
|
21499
|
+
let changed = false;
|
|
21500
|
+
currentFiles.forEach((file) => {
|
|
21501
|
+
if (file instanceof File && file.type.startsWith('image/')) {
|
|
21502
|
+
if (!objectUrls[file.name]) {
|
|
21503
|
+
newUrls[file.name] = URL.createObjectURL(file);
|
|
21504
|
+
changed = true;
|
|
21505
|
+
}
|
|
21506
|
+
else {
|
|
21507
|
+
newUrls[file.name] = objectUrls[file.name];
|
|
21508
|
+
}
|
|
21509
|
+
}
|
|
21510
|
+
});
|
|
21511
|
+
if (changed || Object.keys(newUrls).length !== Object.keys(objectUrls).length) {
|
|
21512
|
+
setObjectUrls(newUrls);
|
|
21513
|
+
}
|
|
21514
|
+
}, [currentFiles, preview]);
|
|
21515
|
+
const handleFileChange = (e) => {
|
|
21516
|
+
if (e.target.files && e.target.files.length > 0) {
|
|
21517
|
+
const newFiles = Array.from(e.target.files);
|
|
21518
|
+
// Append new files to extants
|
|
21519
|
+
setFieldValue(alias, [...currentFiles, ...newFiles]);
|
|
21520
|
+
setFieldTouched(alias, true);
|
|
21521
|
+
}
|
|
21522
|
+
// Reset input value to allow file reselection
|
|
21523
|
+
if (inputRef.current)
|
|
21524
|
+
inputRef.current.value = '';
|
|
21525
|
+
};
|
|
21526
|
+
const handleRemove = (indexToRemove) => {
|
|
21527
|
+
const fileToRemove = currentFiles[indexToRemove];
|
|
21528
|
+
const updatedFiles = currentFiles.filter((_, index) => index !== indexToRemove);
|
|
21529
|
+
setFieldValue(alias, updatedFiles);
|
|
21530
|
+
if (fileToRemove instanceof File && objectUrls[fileToRemove.name]) {
|
|
21531
|
+
URL.revokeObjectURL(objectUrls[fileToRemove.name]);
|
|
21532
|
+
}
|
|
21533
|
+
};
|
|
21534
|
+
const isNeumorphic = inputtype === 'filemultiple-neumorphic';
|
|
21535
|
+
const hasError = meta.touched && meta.error;
|
|
21536
|
+
return (React.createElement(Column, { span: width, newLine: props.newRow },
|
|
21537
|
+
React.createElement(p$8, { className: className, style: style },
|
|
21538
|
+
React.createElement(p$8, { onClick: () => { var _a; return (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.click(); }, p: "4", style: Object.assign(Object.assign({}, styles[inputtype]), { cursor: 'pointer', transition: 'all 0.2s', borderColor: hasError ? 'var(--red-9)' : (styles[inputtype].borderBottom ? 'var(--accent-9)' : 'var(--gray-a8)'), position: 'relative' }) },
|
|
21539
|
+
React.createElement(p$5, { align: "center", gap: "4" },
|
|
21540
|
+
React.createElement(p$8, { style: {
|
|
21541
|
+
background: isNeumorphic ? '#e0e0e0' : 'var(--accent-3)',
|
|
21542
|
+
borderRadius: '50%',
|
|
21543
|
+
padding: '10px',
|
|
21544
|
+
boxShadow: isNeumorphic ? 'inset 3px 3px 6px #b8b9be, inset -3px -3px 6px #ffffff' : 'none'
|
|
21545
|
+
} },
|
|
21546
|
+
React.createElement(Icon, { name: 'upload', width: "20", height: "20", color: isNeumorphic ? '#555' : 'var(--accent-9)' })),
|
|
21547
|
+
React.createElement(p$5, { direction: "column" },
|
|
21548
|
+
React.createElement(p$d, { weight: "bold", style: { color: isNeumorphic ? '#444' : 'inherit' } }, currentFiles.length > 0
|
|
21549
|
+
? `${currentFiles.length} file${currentFiles.length !== 1 ? 's' : ''} selected`
|
|
21550
|
+
: "Choose files..."),
|
|
21551
|
+
React.createElement(p$d, { size: "1", color: "gray", style: { opacity: 0.8 } }, "PDF, Images, Office Docs, JSON, ZIP"))),
|
|
21552
|
+
React.createElement("input", { id: inputId || alias, ref: inputRef, readOnly: readOnly, name: alias, type: "file", multiple: true, accept: ACCEPTED_EXTENSIONS, onChange: handleFileChange, style: { display: 'none' }, "aria-describedby": hasError ? errorId : undefined })),
|
|
21553
|
+
preview && currentFiles.length > 0 && (React.createElement(o$6, { columns: "repeat(auto-fill, minmax(220px, 1fr))", gap: "3", mt: "3" }, currentFiles.map((file, index) => {
|
|
21554
|
+
// Detect preview URL:
|
|
21555
|
+
// If string (URL from DB), use urlpath
|
|
21556
|
+
// If File (blob), use objectUrl
|
|
21557
|
+
let previewUrl = null;
|
|
21558
|
+
let fileName = 'Unknown File';
|
|
21559
|
+
let fileSize = '';
|
|
21560
|
+
if (typeof file === 'string') {
|
|
21561
|
+
previewUrl = file;
|
|
21562
|
+
fileName = file.split('/').pop() || file;
|
|
21563
|
+
}
|
|
21564
|
+
else {
|
|
21565
|
+
previewUrl = objectUrls[file.name] || null;
|
|
21566
|
+
fileName = file.name;
|
|
21567
|
+
fileSize = (file.size / 1024 / 1024).toFixed(2) + ' MB';
|
|
21568
|
+
}
|
|
21569
|
+
return (React.createElement(o$9, { key: `${fileName}-${index}`, style: isNeumorphic ? {
|
|
21570
|
+
background: '#e0e0e0',
|
|
21571
|
+
border: 'none',
|
|
21572
|
+
boxShadow: '4px 4px 8px #b8b9be, -4px -4px 8px #ffffff'
|
|
21573
|
+
} : {} },
|
|
21574
|
+
React.createElement(p$5, { align: "center", gap: "3" },
|
|
21575
|
+
React.createElement(p$8, { style: {
|
|
21576
|
+
width: 40,
|
|
21577
|
+
height: 40,
|
|
21578
|
+
borderRadius: '6px',
|
|
21579
|
+
overflow: 'hidden',
|
|
21580
|
+
background: 'var(--gray-a3)',
|
|
21581
|
+
display: 'flex',
|
|
21582
|
+
alignItems: 'center',
|
|
21583
|
+
justifyContent: 'center'
|
|
21584
|
+
} }, previewUrl && (fileName.match(/\.(jpeg|jpg|png|gif|webp)$/i) || (file instanceof File && file.type.startsWith('image/'))) ? (React.createElement("img", { src: previewUrl, alt: "preview", style: { width: '100%', height: '100%', objectFit: 'cover' } })) : (getFileIcon(file))),
|
|
21585
|
+
React.createElement(p$5, { direction: "column", style: { flex: 1, overflow: 'hidden' } },
|
|
21586
|
+
React.createElement(p$d, { size: "1", weight: "bold", style: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', color: isNeumorphic ? '#444' : 'inherit' } }, fileName),
|
|
21587
|
+
fileSize && React.createElement(p$d, { size: "1", color: "gray" }, fileSize)),
|
|
21588
|
+
React.createElement(o$5, { size: "1", variant: "ghost", color: "red", type: "button", onClick: (e) => {
|
|
21589
|
+
e.stopPropagation();
|
|
21590
|
+
handleRemove(index);
|
|
21591
|
+
} },
|
|
21592
|
+
React.createElement(Icon, { name: 'close' })))));
|
|
21593
|
+
}))),
|
|
21594
|
+
React.createElement("div", null,
|
|
21595
|
+
React.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias }, props.inputLabel),
|
|
21596
|
+
hasError ?
|
|
21597
|
+
React.createElement(React.Fragment, null,
|
|
21598
|
+
React.createElement("p", { id: errorId, className: 'core-input-label-error' }, typeof meta.error === 'string' ?
|
|
21599
|
+
React.createElement(React.Fragment, null, props.errorText || "Required field")
|
|
21600
|
+
: 'Invalid file selection')) : null,
|
|
21601
|
+
props.isHinted ?
|
|
21602
|
+
React.createElement(React.Fragment, null,
|
|
21603
|
+
React.createElement(e, { content: props.hintText || "No hint available", align: "start", sideOffset: 5, className: "core-input-tooltip" },
|
|
21604
|
+
React.createElement("a", { href: props.hintUrl || "", target: "_blank", rel: "noopener noreferrer" },
|
|
21605
|
+
React.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null))));
|
|
21606
|
+
};
|
|
21607
|
+
|
|
21401
21608
|
var _excluded$6 = ["title"],
|
|
21402
21609
|
_excluded2 = ["title"],
|
|
21403
21610
|
_excluded3 = ["title"],
|
|
@@ -36299,7 +36506,7 @@ const PhoneInput = (_a) => {
|
|
|
36299
36506
|
React.createElement(p$5, { direction: "column", gap: "2", style: { width: '100%' } },
|
|
36300
36507
|
React.createElement(u, Object.assign({ size: size, variant: "surface", id: `${alias}FormInput`, "aria-describedby": `${alias}InputLabel`, color: hasError ? "red" : undefined, className: `${variantClass} ${className || ''}` }, props, { name: alias }),
|
|
36301
36508
|
React.createElement(c, { style: { padding: 0 } },
|
|
36302
|
-
React.createElement(C, { value: country, onValueChange: (value) => setCountry(value) },
|
|
36509
|
+
React.createElement(C$1, { value: country, onValueChange: (value) => setCountry(value) },
|
|
36303
36510
|
React.createElement(u$1, { variant: "ghost", style: {
|
|
36304
36511
|
height: '100%',
|
|
36305
36512
|
padding: '0 8px 0 12px',
|
|
@@ -41737,7 +41944,7 @@ const CurrencyInput = (_a) => {
|
|
|
41737
41944
|
backgroundColor: isOutline ? 'var(--color-surface)' : undefined,
|
|
41738
41945
|
cursor: 'text'
|
|
41739
41946
|
} },
|
|
41740
|
-
React.createElement(C, { value: activeCurrency.code, onValueChange: (val) => setFieldValue(currencyFieldName, val) },
|
|
41947
|
+
React.createElement(C$1, { value: activeCurrency.code, onValueChange: (val) => setFieldValue(currencyFieldName, val) },
|
|
41741
41948
|
React.createElement(u$1, { variant: "ghost", style: {
|
|
41742
41949
|
height: '100%',
|
|
41743
41950
|
padding: '0 8px 0 12px',
|
|
@@ -41823,7 +42030,7 @@ const StockInput = (_a) => {
|
|
|
41823
42030
|
const input = document.getElementById(`${alias}FormInput`);
|
|
41824
42031
|
input === null || input === void 0 ? void 0 : input.focus();
|
|
41825
42032
|
} },
|
|
41826
|
-
React.createElement(e$
|
|
42033
|
+
React.createElement(e$a, { size: "2", variant: "soft", color: "gray", style: {
|
|
41827
42034
|
height: '100%',
|
|
41828
42035
|
padding: '0 10px',
|
|
41829
42036
|
borderRadius: 'var(--radius-1)',
|
|
@@ -41856,8 +42063,8 @@ const StockInput = (_a) => {
|
|
|
41856
42063
|
React.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } }))))))));
|
|
41857
42064
|
};
|
|
41858
42065
|
|
|
41859
|
-
const
|
|
41860
|
-
var { inputtype = 'radio', alias, readOnly, width, placeholder = '', style, value, inputoptions, direction = 'column', columns, className } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "placeholder", "style", "value", "inputoptions", "direction", "columns", "className"]);
|
|
42066
|
+
const RadioGroupInput = (_a) => {
|
|
42067
|
+
var { inputtype = 'radio-outline', alias, readOnly, width, placeholder = '', style, value, inputoptions, direction = 'column', columns, className } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "placeholder", "style", "value", "inputoptions", "direction", "columns", "className"]);
|
|
41861
42068
|
const { setFieldValue, setFieldTouched } = formik.useFormikContext();
|
|
41862
42069
|
const [field, meta] = formik.useField(alias);
|
|
41863
42070
|
const hasError = Boolean(meta.touched && meta.error);
|
|
@@ -41937,7 +42144,7 @@ const xRadioGroup = (_a) => {
|
|
|
41937
42144
|
};
|
|
41938
42145
|
|
|
41939
42146
|
const OptionSelect = (_a) => {
|
|
41940
|
-
var { inputtype = 'select', alias, readOnly, width, placeholder = '', style, value, inputoptions, className } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "placeholder", "style", "value", "inputoptions", "className"]);
|
|
42147
|
+
var { inputtype = 'select-outline', alias, readOnly, width, placeholder = '', style, value, inputoptions, className } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "placeholder", "style", "value", "inputoptions", "className"]);
|
|
41941
42148
|
const triggerRef = React.useRef(null);
|
|
41942
42149
|
const [neuVars, setNeuVars] = React.useState({});
|
|
41943
42150
|
const { setFieldValue, setFieldTouched } = formik.useFormikContext();
|
|
@@ -41998,7 +42205,7 @@ const OptionSelect = (_a) => {
|
|
|
41998
42205
|
cursor: pointer;
|
|
41999
42206
|
}
|
|
42000
42207
|
` } })),
|
|
42001
|
-
React.createElement(C, { name: alias, disabled: readOnly, "aria-describedby": `${alias}InputLabel`, defaultValue: props.defaultValue || value, value: field.value || value, onValueChange: (val) => {
|
|
42208
|
+
React.createElement(C$1, { name: alias, disabled: readOnly, "aria-describedby": `${alias}InputLabel`, defaultValue: props.defaultValue || value, value: field.value || value, onValueChange: (val) => {
|
|
42002
42209
|
setFieldValue(alias, val);
|
|
42003
42210
|
setTimeout(() => setFieldTouched(alias, true), 0);
|
|
42004
42211
|
}, onOpenChange: (isOpen) => {
|
|
@@ -42022,7 +42229,7 @@ const OptionSelect = (_a) => {
|
|
|
42022
42229
|
|
|
42023
42230
|
const MultipleSelect = (_a) => {
|
|
42024
42231
|
var _b;
|
|
42025
|
-
var { inputtype = 'multiselect', alias, readOnly, width, placeholder = '', style, value, inputoptions, className } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "placeholder", "style", "value", "inputoptions", "className"]);
|
|
42232
|
+
var { inputtype = 'multiselect-outline', alias, readOnly, width, placeholder = '', style, value, inputoptions, className } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "placeholder", "style", "value", "inputoptions", "className"]);
|
|
42026
42233
|
const { setFieldValue, setFieldTouched } = formik.useFormikContext();
|
|
42027
42234
|
const [field, meta] = formik.useField(alias);
|
|
42028
42235
|
const selectedValues = (Array.isArray(field.value) ? field.value : []);
|
|
@@ -42117,8 +42324,8 @@ const MultipleSelect = (_a) => {
|
|
|
42117
42324
|
React.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null))));
|
|
42118
42325
|
};
|
|
42119
42326
|
|
|
42120
|
-
const
|
|
42121
|
-
var { inputtype = 'slider', alias, readOnly, width, placeholder = '', value, minvalue = 0, maxvalue = 100, stepvalue = 1, className, style } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "placeholder", "value", "minvalue", "maxvalue", "stepvalue", "className", "style"]);
|
|
42327
|
+
const SliderInput = (_a) => {
|
|
42328
|
+
var { inputtype = 'slider-outline', alias, readOnly, width, placeholder = '', value, minvalue = 0, maxvalue = 100, stepvalue = 1, className, style } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "placeholder", "value", "minvalue", "maxvalue", "stepvalue", "className", "style"]);
|
|
42122
42329
|
const { setFieldValue, setFieldTouched } = formik.useFormikContext();
|
|
42123
42330
|
const [field, meta] = formik.useField(alias);
|
|
42124
42331
|
const fieldValue = Array.isArray(field.value) ? field.value : [field.value || minvalue];
|
|
@@ -42216,7 +42423,7 @@ const xSlider = (_a) => {
|
|
|
42216
42423
|
};
|
|
42217
42424
|
|
|
42218
42425
|
const RangeSlider = (_a) => {
|
|
42219
|
-
var { inputtype = 'range', alias, readOnly, width, placeholder = '', value, minvalue = 0, maxvalue = 100, stepvalue = 1, minStepsBetweenThumbs = 0, className, style } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "placeholder", "value", "minvalue", "maxvalue", "stepvalue", "minStepsBetweenThumbs", "className", "style"]);
|
|
42426
|
+
var { inputtype = 'range-outline', alias, readOnly, width, placeholder = '', value, minvalue = 0, maxvalue = 100, stepvalue = 1, minStepsBetweenThumbs = 0, className, style } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "placeholder", "value", "minvalue", "maxvalue", "stepvalue", "minStepsBetweenThumbs", "className", "style"]);
|
|
42220
42427
|
const { setFieldValue, setFieldTouched } = formik.useFormikContext();
|
|
42221
42428
|
const [field, meta] = formik.useField(alias);
|
|
42222
42429
|
// Range Formik Logic
|
|
@@ -42294,7 +42501,7 @@ const RangeSlider = (_a) => {
|
|
|
42294
42501
|
};
|
|
42295
42502
|
|
|
42296
42503
|
const Toggle = (_a) => {
|
|
42297
|
-
var { inputtype = 'toggle', alias, readOnly, width, pressed, defaultPressed, onPressedChange, style, children } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "pressed", "defaultPressed", "onPressedChange", "style", "children"]);
|
|
42504
|
+
var { inputtype = 'toggle-outline', alias, readOnly, width, pressed, defaultPressed, onPressedChange, style, children } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "pressed", "defaultPressed", "onPressedChange", "style", "children"]);
|
|
42298
42505
|
const buttonRef = React.useRef(null);
|
|
42299
42506
|
const [neumorphicVars, setNeumorphicVars] = React.useState({});
|
|
42300
42507
|
React.useEffect(() => {
|
|
@@ -42339,7 +42546,7 @@ const Toggle = (_a) => {
|
|
|
42339
42546
|
};
|
|
42340
42547
|
return (React.createElement(Column, { span: width, newLine: props.newRow },
|
|
42341
42548
|
React.createElement(Root$1, { pressed: pressed, defaultPressed: defaultPressed, onPressedChange: onPressedChange, name: alias, disabled: readOnly, id: `${alias}FormInput`, "aria-describedby": `${alias}InputLabel`, asChild: true },
|
|
42342
|
-
React.createElement(o$
|
|
42549
|
+
React.createElement(o$a, Object.assign({ disabled: readOnly, ref: buttonRef }, props, { className: `design-toggle ${inputtype}`, style: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, style), (inputtype === 'toggle' ? materialStyle : {})), (inputtype === 'toggle-material' ? materialStyle : {})), (inputtype === 'toggle-outline' ? outlineStyle : {})), (inputtype === 'toggle-neumorphic' ? Object.assign(Object.assign({}, neumorphicStyle), neumorphicVars) : {})) }),
|
|
42343
42550
|
React.createElement("style", { dangerouslySetInnerHTML: { __html: `
|
|
42344
42551
|
/* --- MATERIAL --- */
|
|
42345
42552
|
.design-toggle.toggle-material[data-state='on'] {
|
|
@@ -42394,7 +42601,7 @@ const Row = ({ children, className, gap = "4" }) => {
|
|
|
42394
42601
|
return (React.createElement(o$6, { columns: "12", gap: gap, width: "auto", className: className }, children));
|
|
42395
42602
|
};
|
|
42396
42603
|
|
|
42397
|
-
const
|
|
42604
|
+
const SectionTitle = (_a) => {
|
|
42398
42605
|
var { title, iconname, textColor = "#FFFFFF", backgroundColor = "#000000", fontFamily } = _a, props = __rest$1(_a, ["title", "iconname", "textColor", "backgroundColor", "fontFamily"]);
|
|
42399
42606
|
return (React.createElement(React.Fragment, null,
|
|
42400
42607
|
React.createElement(Row, null,
|
|
@@ -46917,8 +47124,10 @@ const xFormSchema = object({
|
|
|
46917
47124
|
model: array(SectionSchema),
|
|
46918
47125
|
});
|
|
46919
47126
|
|
|
47127
|
+
exports.AvatarInput = AvatarInput;
|
|
47128
|
+
exports.ButtonInput = ButtonInput;
|
|
46920
47129
|
exports.CURRENCIES = CURRENCIES;
|
|
46921
|
-
exports.
|
|
47130
|
+
exports.CheckboxGroupInput = CheckboxGroupInput;
|
|
46922
47131
|
exports.Column = Column;
|
|
46923
47132
|
exports.ConditionalTrigger = ConditionalTrigger;
|
|
46924
47133
|
exports.Container = Container;
|
|
@@ -46929,6 +47138,7 @@ exports.DateRangePicker = DateRangePicker;
|
|
|
46929
47138
|
exports.DateTimePicker = DateTimePicker;
|
|
46930
47139
|
exports.Dropdown = Dropdown;
|
|
46931
47140
|
exports.File = File$1;
|
|
47141
|
+
exports.FileMultiple = FileMultiple;
|
|
46932
47142
|
exports.FlagIcon = FlagIcon;
|
|
46933
47143
|
exports.Icon = Icon;
|
|
46934
47144
|
exports.Image = Image;
|
|
@@ -46937,17 +47147,17 @@ exports.MultipleSelect = MultipleSelect;
|
|
|
46937
47147
|
exports.OptionSelect = OptionSelect;
|
|
46938
47148
|
exports.PasswordInput = PasswordInput;
|
|
46939
47149
|
exports.PhoneInput = PhoneInput;
|
|
47150
|
+
exports.RadioGroupInput = RadioGroupInput;
|
|
46940
47151
|
exports.RangeSlider = RangeSlider;
|
|
46941
47152
|
exports.Row = Row;
|
|
47153
|
+
exports.SectionTitle = SectionTitle;
|
|
47154
|
+
exports.SliderInput = SliderInput;
|
|
46942
47155
|
exports.StockInput = StockInput;
|
|
47156
|
+
exports.Theme = R;
|
|
47157
|
+
exports.ThemePanel = N;
|
|
46943
47158
|
exports.Toggle = Toggle;
|
|
46944
47159
|
exports.UUIDInput = UUIDInput;
|
|
46945
47160
|
exports.parseUuidFormat = parseUuidFormat;
|
|
46946
47161
|
exports.primeMatrix = primeMatrix;
|
|
46947
47162
|
exports.vectorSigma = vectorSigma;
|
|
46948
|
-
exports.xAvatar = xAvatar;
|
|
46949
|
-
exports.xButton = xButton;
|
|
46950
47163
|
exports.xFormSchema = xFormSchema;
|
|
46951
|
-
exports.xRadioGroup = xRadioGroup;
|
|
46952
|
-
exports.xSlider = xSlider;
|
|
46953
|
-
exports.xTitle = xTitle;
|