@cronocode/react-box 2.0.2 → 2.0.5
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/box.mjs +3 -3
- package/components/baseSvg.d.ts +1 -1
- package/components/checkbox.d.ts +1 -3
- package/components/label.cjs +1 -0
- package/components/label.d.ts +6 -0
- package/components/label.mjs +7 -0
- package/components/label.test.cjs +1 -0
- package/components/label.test.mjs +2 -0
- package/components/label2.cjs +311 -0
- package/components/label2.mjs +17395 -0
- package/components/radioButton.d.ts +1 -3
- package/components/textarea.d.ts +1 -2
- package/components/textbox.d.ts +1 -2
- package/components/tooltip.cjs +1 -1
- package/core/boxStyles.d.ts +28 -2
- package/core/theme.d.ts +1 -0
- package/core/types.d.ts +27 -23
- package/core.cjs +20 -15
- package/core.mjs +1258 -392
- package/magic-string.es.cjs +10 -0
- package/magic-string.es.mjs +738 -0
- package/package.json +2 -1
- package/utils.cjs +308 -1
- package/utils.mjs +3914 -49
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { default as Box } from '../box';
|
|
2
|
-
import { default as React } from 'react';
|
|
3
2
|
|
|
4
3
|
type BoxProps = Omit<React.ComponentProps<typeof Box<'input'>>, 'ref' | 'tag'>;
|
|
5
4
|
type BoxTagProps = Required<BoxProps>['props'];
|
|
@@ -15,8 +14,7 @@ interface Props extends Omit<BoxProps, 'props'> {
|
|
|
15
14
|
autoFocus?: boolean;
|
|
16
15
|
readOnly?: boolean;
|
|
17
16
|
required?: boolean;
|
|
18
|
-
checked?: boolean;
|
|
19
17
|
defaultChecked?: boolean;
|
|
20
18
|
}
|
|
21
|
-
declare const _default:
|
|
19
|
+
declare const _default: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<HTMLInputElement>>;
|
|
22
20
|
export default _default;
|
package/components/textarea.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { default as Box } from '../box';
|
|
2
|
-
import { default as React } from 'react';
|
|
3
2
|
|
|
4
3
|
type BoxProps = Omit<React.ComponentProps<typeof Box<'textarea'>>, 'ref' | 'tag'>;
|
|
5
4
|
type BoxTagProps = Required<BoxProps>['props'];
|
|
@@ -22,5 +21,5 @@ interface Props extends Omit<BoxProps, 'props'> {
|
|
|
22
21
|
readOnly?: boolean;
|
|
23
22
|
required?: boolean;
|
|
24
23
|
}
|
|
25
|
-
declare const _default:
|
|
24
|
+
declare const _default: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<HTMLTextAreaElement>>;
|
|
26
25
|
export default _default;
|
package/components/textbox.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { default as Box } from '../box';
|
|
2
|
-
import { default as React } from 'react';
|
|
3
2
|
|
|
4
3
|
type BoxProps = Omit<React.ComponentProps<typeof Box<'input'>>, 'ref' | 'tag'>;
|
|
5
4
|
type BoxTagProps = Required<BoxProps>['props'];
|
|
@@ -22,5 +21,5 @@ interface Props extends Omit<BoxProps, 'props'> {
|
|
|
22
21
|
required?: boolean;
|
|
23
22
|
step?: number | string;
|
|
24
23
|
}
|
|
25
|
-
declare const _default:
|
|
24
|
+
declare const _default: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<HTMLInputElement>>;
|
|
26
25
|
export default _default;
|
package/components/tooltip.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const u=require("react/jsx-runtime"),h=require("react-dom"),f=require("../box.cjs"),s=require("react");function v(){return s.useMemo(()=>{const i="crono-box";let
|
|
1
|
+
"use strict";const u=require("react/jsx-runtime"),h=require("react-dom"),f=require("../box.cjs"),s=require("react");function v(){return s.useMemo(()=>{const i="crono-box";let n=document.getElementById(i);return n||(n=document.createElement("div"),n.id=i,document.body.appendChild(n)),n},[])}const a=2;function x(i){const{onPositionChange:n}=i,l=s.useRef(null),[e,p]=s.useState(),m=v(),w=s.useCallback((o,t)=>{const r=c=>{c.target.contains(o)&&t(o)};return document.addEventListener("scroll",r,{capture:!0}),()=>{document.removeEventListener("scroll",r,{capture:!0})}},[e]),b=s.useCallback((o,t)=>{const r=c=>{t(o)};return window.addEventListener("resize",r,{capture:!0}),()=>{window.removeEventListener("resize",r,{capture:!0})}},[e]),d=s.useCallback(o=>{const t=o.getBoundingClientRect(),r=Math.round((t.top+window.scrollY)*a)/a,c=Math.round((t.left+window.scrollX)*a)/a;((e==null?void 0:e.top)!==r||(e==null?void 0:e.left)!==c)&&(n==null||n({top:r,left:c}),p({top:r,left:c,width:t.width>0?t.width:void 0}))},[e]);return s.useLayoutEffect(()=>{if(l.current){d(l.current);const o=w(l.current,d),t=b(l.current,d);return()=>{o(),t()}}},[e]),u.jsxs(u.Fragment,{children:[u.jsx(f,{ref:l}),e&&h.createPortal(u.jsx(f,{position:"absolute",top:0,left:0,transition:"none",style:{transform:`translate(${e.left}px,${e.top}px)`,width:e.width},children:u.jsx(f,{position:"absolute",width:"fit",...i})}),m)]})}module.exports=x;
|
package/core/boxStyles.d.ts
CHANGED
|
@@ -1103,7 +1103,7 @@ export declare const simpleBoxStyles: {
|
|
|
1103
1103
|
appearance: {
|
|
1104
1104
|
cssNames: string[];
|
|
1105
1105
|
values1: {
|
|
1106
|
-
values: readonly ["none"];
|
|
1106
|
+
values: readonly ["none", "auto", "menulist-button", "textfield", "button", "checkbox"];
|
|
1107
1107
|
};
|
|
1108
1108
|
values2: {
|
|
1109
1109
|
values: readonly [];
|
|
@@ -1174,6 +1174,30 @@ export declare const simpleBoxStyles: {
|
|
|
1174
1174
|
values: readonly [];
|
|
1175
1175
|
};
|
|
1176
1176
|
};
|
|
1177
|
+
visibility: {
|
|
1178
|
+
cssNames: string[];
|
|
1179
|
+
values1: {
|
|
1180
|
+
values: readonly ["visible", "hidden", "collapse"];
|
|
1181
|
+
};
|
|
1182
|
+
values2: {
|
|
1183
|
+
values: readonly [];
|
|
1184
|
+
};
|
|
1185
|
+
values3: {
|
|
1186
|
+
values: readonly [];
|
|
1187
|
+
};
|
|
1188
|
+
};
|
|
1189
|
+
resize: {
|
|
1190
|
+
cssNames: string[];
|
|
1191
|
+
values1: {
|
|
1192
|
+
values: readonly ["none", "both", "horizontal", "vertical", "block", "inline"];
|
|
1193
|
+
};
|
|
1194
|
+
values2: {
|
|
1195
|
+
values: readonly [];
|
|
1196
|
+
};
|
|
1197
|
+
values3: {
|
|
1198
|
+
values: readonly [];
|
|
1199
|
+
};
|
|
1200
|
+
};
|
|
1177
1201
|
};
|
|
1178
1202
|
export type StyleKey = keyof typeof simpleBoxStyles;
|
|
1179
1203
|
export declare const boxThemeStyles: {
|
|
@@ -1218,7 +1242,9 @@ export declare const svgThemeStyles: {
|
|
|
1218
1242
|
formatSelector: typeof BoxStylesFormatters.ClassName.svg;
|
|
1219
1243
|
};
|
|
1220
1244
|
};
|
|
1221
|
-
export declare const
|
|
1245
|
+
export declare const pseudoGroupClass: string[];
|
|
1246
|
+
export type PseudoGroupClass = (typeof pseudoGroupClass)[number];
|
|
1247
|
+
export declare const pseudoClassSuffixes: readonly ["hover", "focus", "hasFocus", "active", "checked", "hasChecked", "indeterminate", "valid", "hasValid", "invalid", "hasInvalid", "required", "optional", "disabled", "hasDisabled"];
|
|
1222
1248
|
export type PseudoClassSuffix = (typeof pseudoClassSuffixes)[number];
|
|
1223
1249
|
export declare const boxBreakpoints: readonly ["sm", "md", "lg", "xl", "xxl"];
|
|
1224
1250
|
export type BoxBreakpointsType = (typeof boxBreakpoints)[number];
|
package/core/theme.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export interface ThemeSetup<T = BoxStyleProps> {
|
|
|
20
20
|
textarea?: ThemeComponentStyles<T>;
|
|
21
21
|
checkbox?: ThemeComponentStyles<T>;
|
|
22
22
|
radioButton?: ThemeComponentStyles<T>;
|
|
23
|
+
label?: ThemeComponentStyles<T>;
|
|
23
24
|
}
|
|
24
25
|
interface BoxAugmentedProps {
|
|
25
26
|
colors?: Record<string, string>;
|
package/core/types.d.ts
CHANGED
|
@@ -13,23 +13,39 @@ type BoxStyles<T extends Record<string, StyleItem>> = {
|
|
|
13
13
|
[K in keyof T]?: T[K]['values1']['values'][number] | T[K]['values2']['values'][number] | T[K]['values3']['values'][number];
|
|
14
14
|
};
|
|
15
15
|
type BoxNormalStyles = BoxStyles<typeof simpleBoxStyles> & Augmented.BoxProps;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
type SvgNormalStyles = BoxStyles<typeof simpleBoxStyles> & Augmented.SvgProps;
|
|
17
|
+
interface BoxPseudoClasses<T> {
|
|
18
|
+
disabled?: boolean | [boolean, T];
|
|
19
|
+
disabledGroup?: string | Record<string, T>;
|
|
20
|
+
hasDisabled?: T;
|
|
21
|
+
hover?: T;
|
|
22
|
+
hoverGroup?: string | Record<string, T>;
|
|
23
|
+
focus?: T;
|
|
24
|
+
hasFocus?: T;
|
|
25
|
+
focusGroup?: string | Record<string, T>;
|
|
26
|
+
active?: T;
|
|
27
|
+
activeGroup?: string | Record<string, T>;
|
|
28
|
+
checked?: boolean;
|
|
29
|
+
hasChecked?: T;
|
|
30
|
+
valid?: T;
|
|
31
|
+
hasValid?: T;
|
|
32
|
+
invalid?: T;
|
|
33
|
+
hasInvalid?: T;
|
|
25
34
|
}
|
|
26
35
|
interface BoxThemePseudoClassProps {
|
|
27
36
|
hover?: BoxNormalStyles;
|
|
28
37
|
focus?: BoxNormalStyles;
|
|
38
|
+
hasFocus?: BoxNormalStyles;
|
|
29
39
|
active?: BoxNormalStyles;
|
|
30
40
|
disabled?: BoxNormalStyles;
|
|
41
|
+
hasDisabled?: BoxNormalStyles;
|
|
31
42
|
indeterminate?: BoxNormalStyles;
|
|
32
43
|
checked?: BoxNormalStyles;
|
|
44
|
+
hasChecked?: BoxNormalStyles;
|
|
45
|
+
valid?: BoxNormalStyles;
|
|
46
|
+
hasValid?: BoxNormalStyles;
|
|
47
|
+
invalid?: BoxNormalStyles;
|
|
48
|
+
hasInvalid?: BoxNormalStyles;
|
|
33
49
|
}
|
|
34
50
|
export interface BoxBreakpoints<T = BoxThemeProps> {
|
|
35
51
|
sm?: T;
|
|
@@ -39,18 +55,6 @@ export interface BoxBreakpoints<T = BoxThemeProps> {
|
|
|
39
55
|
xxl?: T;
|
|
40
56
|
}
|
|
41
57
|
export type BoxThemeProps = BoxNormalStyles & BoxThemePseudoClassProps & BoxBreakpoints;
|
|
42
|
-
export type BoxStyleProps = BoxNormalStyles & BoxPseudoClasses & ThemeComponentProps & BoxBreakpoints<BoxStyleProps>;
|
|
43
|
-
|
|
44
|
-
rotate?: BoxNormalStyles['rotate'];
|
|
45
|
-
flip?: BoxNormalStyles['flip'];
|
|
46
|
-
transitionDuration?: BoxNormalStyles['transitionDuration'];
|
|
47
|
-
disabledGroup?: Record<string, SvgNormalStyles>;
|
|
48
|
-
hover?: SvgNormalStyles;
|
|
49
|
-
hoverGroup?: string | Record<string, SvgNormalStyles>;
|
|
50
|
-
focus?: SvgNormalStyles;
|
|
51
|
-
focusGroup?: string | Record<string, SvgNormalStyles>;
|
|
52
|
-
active?: SvgNormalStyles;
|
|
53
|
-
activeGroup?: string | Record<string, SvgNormalStyles>;
|
|
54
|
-
}
|
|
55
|
-
export type BoxSvgStyles = SvgNormalStyles & ThemeComponentProps & Augmented.SvgProps;
|
|
58
|
+
export type BoxStyleProps = BoxNormalStyles & BoxPseudoClasses<BoxNormalStyles> & ThemeComponentProps & BoxBreakpoints<BoxStyleProps>;
|
|
59
|
+
export type BoxSvgStyles = SvgNormalStyles & BoxPseudoClasses<SvgNormalStyles> & ThemeComponentProps & BoxBreakpoints<BoxSvgStyles>;
|
|
56
60
|
export {};
|
package/core.cjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict";const G=require("react"),Y=require("./utils.cjs");var e;(a=>{(u=>{function t(o,m){return`${o}${m.replace("/","-")}`}u.fraction=t;function n(o){return[`${o} path`,`${o} circle`,`${o} rect`,`${o} line`]}u.svg=n})(a.ClassName||(a.ClassName={})),(u=>{function t(l,s){return`${s/4}rem`}u.rem=t;function n(l,s){return`${s}px`}u.px=n;function o(l,s){const[r,i]=s.split("/");return`${+r/+i*100}%`}u.fraction=o;function m(l,s){switch(s){case"fit":return"100%";case"fit-screen":return l.toLocaleLowerCase().includes("height")?"100vh":"100vw";default:return s}}u.widthHeight=m;function N(l){return(s,r)=>`var(--${l}${r});`}u.variables=N;function T(l){return(s,r)=>`var(--${l}${r});`}u.svgVariables=T;function S(l,s){return`repeat(${s},minmax(0,1fr))`}u.gridColumns=S;function c(l,s){return s==="full-row"?"1/-1":`span ${s}/span ${s}`}u.gridColumn=c;function f(l,s){return`${s}ms`}u.ms=f;function b(l,s){return`${s}deg`}u.rotate=b;function d(l,s){return s==="xAxis"?"-1 1":"1 -1"}u.flip=d})(a.Value||(a.Value={}))})(e||(e={}));const v=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,64,68,72,76,80,84,88,92,96,100,110,120,128,130,140,150,160,170,180,190,192,200,225,250,256,275,300,320,350,384,400],ae=[-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-22,-24,-26,-28,-30,-32,-34,-36,-38,-40,-44,-48,-52,-56,-60,-64,-68,-72,-76,-80,-84,-88,-92,-96,-100],h=[...v,...ae],W=["solid","dashed","dotted","double","groove","ridge","inset","outset","none","hidden"],P=["auto","hidden","scroll","visible"],z=["1/2","1/3","2/3","1/4","2/4","3/4","1/5","2/5","3/5","4/5","1/6","2/6","3/6","4/6","5/6","1/12","2/12","3/12","4/12","5/12","6/12","7/12","8/12","9/12","10/12","11/12"],I=["fit","fit-screen","auto","fit-content","max-content","min-content"],K=["auto","flex-start","flex-end","center","baseline","stretch"],le={display:{cssNames:["display"],values1:{values:["none","block","inline-block","flex","inline-flex","grid","inline-grid","contents"]},values2:{values:[]},values3:{values:[]}},inline:{cssNames:["display"],values1:{values:[!0],formatValue:()=>"inline-block"},values2:{values:[]},values3:{values:[]}},boxSizing:{cssNames:["box-sizing"],values1:{values:["border-box","content-box"]},values2:{values:[]},values3:{values:[]}},width:{cssNames:["width"],values1:{values:I,formatValue:e.Value.widthHeight},values2:{values:v,formatValue:e.Value.rem},values3:{values:z,formatValue:e.Value.fraction}},minWidth:{cssNames:["min-width"],values1:{values:I,formatValue:e.Value.widthHeight},values2:{values:v,formatValue:e.Value.rem},values3:{values:z,formatValue:e.Value.fraction}},maxWidth:{cssNames:["max-width"],values1:{values:I,formatValue:e.Value.widthHeight},values2:{values:v,formatValue:e.Value.rem},values3:{values:z,formatValue:e.Value.fraction}},height:{cssNames:["height"],values1:{values:I,formatValue:e.Value.widthHeight},values2:{values:v,formatValue:e.Value.rem},values3:{values:z,formatValue:e.Value.fraction}},minHeight:{cssNames:["min-height"],values1:{values:I,formatValue:e.Value.widthHeight},values2:{values:v,formatValue:e.Value.rem},values3:{values:z,formatValue:e.Value.fraction}},maxHeight:{cssNames:["max-height"],values1:{values:I,formatValue:e.Value.widthHeight},values2:{values:v,formatValue:e.Value.rem},values3:{values:z,formatValue:e.Value.fraction}},position:{cssNames:["position"],values1:{values:["static","relative","absolute","fixed","sticky"]},values2:{values:[]},values3:{values:[]}},top:{cssNames:["top"],values1:{values:h,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},right:{cssNames:["right"],values1:{values:h,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},bottom:{cssNames:["bottom"],values1:{values:h,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},left:{cssNames:["left"],values1:{values:h,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},inset:{cssNames:["inset"],values1:{values:h,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},m:{cssNames:["margin"],values1:{values:h,formatValue:e.Value.rem},values2:{values:["auto"]},values3:{values:[]}},mx:{cssNames:["margin-inline"],values1:{values:h,formatValue:e.Value.rem},values2:{values:["auto"]},values3:{values:[]}},my:{cssNames:["margin-block"],values1:{values:h,formatValue:e.Value.rem},values2:{values:["auto"]},values3:{values:[]}},mt:{cssNames:["margin-top"],values1:{values:h,formatValue:e.Value.rem},values2:{values:["auto"]},values3:{values:[]}},mr:{cssNames:["margin-right"],values1:{values:h,formatValue:e.Value.rem},values2:{values:["auto"]},values3:{values:[]}},mb:{cssNames:["margin-bottom"],values1:{values:h,formatValue:e.Value.rem},values2:{values:["auto"]},values3:{values:[]}},ml:{cssNames:["margin-left"],values1:{values:h,formatValue:e.Value.rem},values2:{values:["auto"]},values3:{values:[]}},p:{cssNames:["padding"],values1:{values:h,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},px:{cssNames:["padding-inline"],values1:{values:h,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},py:{cssNames:["padding-block"],values1:{values:h,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},pt:{cssNames:["padding-top"],values1:{values:h,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},pr:{cssNames:["padding-right"],values1:{values:h,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},pb:{cssNames:["padding-bottom"],values1:{values:h,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},pl:{cssNames:["padding-left"],values1:{values:h,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},b:{cssNames:["border-width"],values1:{values:v,formatValue:e.Value.px},values2:{values:[]},values3:{values:[]}},bx:{cssNames:["border-inline-width"],values1:{values:h,formatValue:e.Value.px},values2:{values:[]},values3:{values:[]}},by:{cssNames:["border-block-width"],values1:{values:h,formatValue:e.Value.px},values2:{values:[]},values3:{values:[]}},bt:{cssNames:["border-top-width"],values1:{values:h,formatValue:e.Value.px},values2:{values:[]},values3:{values:[]}},br:{cssNames:["border-right-width"],values1:{values:h,formatValue:e.Value.px},values2:{values:[]},values3:{values:[]}},bb:{cssNames:["border-bottom-width"],values1:{values:h,formatValue:e.Value.px},values2:{values:[]},values3:{values:[]}},bl:{cssNames:["border-left-width"],values1:{values:h,formatValue:e.Value.px},values2:{values:[]},values3:{values:[]}},borderStyle:{cssNames:["border-style"],values1:{values:W},values2:{values:[]},values3:{values:[]}},borderRadius:{cssNames:["border-radius"],values1:{values:v,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},borderRadiusTop:{cssNames:["border-top-left-radius","border-top-right-radius"],values1:{values:v,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},borderRadiusRight:{cssNames:["border-top-right-radius","border-bottom-right-radius"],values1:{values:v,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},borderRadiusBottom:{cssNames:["border-bottom-left-radius","border-bottom-right-radius"],values1:{values:v,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},borderRadiusLeft:{cssNames:["border-top-left-radius","border-bottom-left-radius"],values1:{values:v,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},borderRadiusTopLeft:{cssNames:["border-top-left-radius"],values1:{values:v,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},borderRadiusTopRight:{cssNames:["border-top-right-radius"],values1:{values:v,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},borderRadiusBottomLeft:{cssNames:["border-bottom-left-radius"],values1:{values:v,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},borderRadiusBottomRight:{cssNames:["border-bottom-right-radius"],values1:{values:v,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},cursor:{cssNames:["cursor"],values1:{values:["auto","default","none","context-menu","help","pointer","progress","wait","cell","crosshair","text","vertical-text","alias","copy","move","no-drop","not-allowed","e-resize","n-resize","ne-resize","nw-resize","s-resize","se-resize","sw-resize","w-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","col-resize","row-resize","all-scroll","zoom-in","zoom-out","grab","grabbing"]},values2:{values:[]},values3:{values:[]}},zIndex:{cssNames:["z-index"],values1:{values:[1,2,3,4,5,10,11,12,13,14,15,100,101,102,103,104,105,1e3,1001,1002,1003,1004,1005]},values2:{values:[]},values3:{values:[]}},overflow:{cssNames:["overflow"],values1:{values:P},values2:{values:[]},values3:{values:[]}},overflowX:{cssNames:["overflow-x"],values1:{values:P},values2:{values:[]},values3:{values:[]}},overflowY:{cssNames:["overflow-y"],values1:{values:P},values2:{values:[]},values3:{values:[]}},opacity:{cssNames:["opacity"],values1:{values:[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1]},values2:{values:[]},values3:{values:[]}},fontSize:{cssNames:["font-size"],values1:{values:v,formatValue:e.Value.px},values2:{values:["inherit"]},values3:{values:[]}},fontStyle:{cssNames:["font-style"],values1:{values:["italic","normal","oblique"]},values2:{values:[]},values3:{values:[]}},fontWeight:{cssNames:["font-weight"],values1:{values:[100,200,300,400,500,600,700,800,900]},values2:{values:[]},values3:{values:[]}},letterSpacing:{cssNames:["letter-spacing"],values1:{values:v,formatValue:e.Value.px},values2:{values:[]},values3:{values:[]}},lineHeight:{cssNames:["line-height"],values1:{values:v,formatValue:e.Value.px},values2:{values:["font-size"],formatValue:()=>"1"},values3:{values:[]}},textDecoration:{cssNames:["text-decoration"],values1:{values:["none","underline","overline","line-through"]},values2:{values:[]},values3:{values:[]}},textTransform:{cssNames:["text-transform"],values1:{values:["none","capitalize","lowercase","uppercase"]},values2:{values:[]},values3:{values:[]}},textAlign:{cssNames:["text-align"],values1:{values:["left","right","center","justify"]},values2:{values:[]},values3:{values:[]}},flexWrap:{cssNames:["flex-wrap"],values1:{values:["nowrap","wrap","wrap-reverse"]},values2:{values:[]},values3:{values:[]}},jc:{cssNames:["justify-content"],values1:{values:["start","end","flex-start","flex-end","center","left","right","space-between","space-around","space-evenly","stretch"]},values2:{values:[]},values3:{values:[]}},ai:{cssNames:["align-items"],values1:{values:["stretch","flex-start","flex-end","center","baseline","start","end","self-start","self-end"]},values2:{values:[]},values3:{values:[]}},alignContent:{cssNames:["align-content"],values1:{values:["flex-start","flex-end","center","space-between","space-around","space-evenly","stretch","start","end","baseline"]},values2:{values:[]},values3:{values:[]}},flex1:{cssNames:["flex"],values1:{values:[!0],formatValue:()=>"1"},values2:{values:[]},values3:{values:[]}},d:{cssNames:["flex-direction"],values1:{values:["row","row-reverse","column","column-reverse"]},values2:{values:[]},values3:{values:[]}},gap:{cssNames:["gap"],values1:{values:v,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},rowGap:{cssNames:["row-gap"],values1:{values:v,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},columnGap:{cssNames:["column-gap"],values1:{values:v,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},order:{cssNames:["order"],values1:{values:v},values2:{values:[]},values3:{values:[]}},flexGrow:{cssNames:["flex-grow"],values1:{values:v},values2:{values:[]},values3:{values:[]}},flexShrink:{cssNames:["flex-shrink"],values1:{values:v},values2:{values:[]},values3:{values:[]}},alignSelf:{cssNames:["align-self"],values1:{values:K},values2:{values:[]},values3:{values:[]}},justifySelf:{cssNames:["justify-self"],values1:{values:K},values2:{values:[]},values3:{values:[]}},gridColumns:{cssNames:["grid-template-columns"],values1:{values:v,formatValue:e.Value.gridColumns},values2:{values:[]},values3:{values:[]}},colSpan:{cssNames:["grid-column"],values1:{values:v,formatValue:e.Value.gridColumn},values2:{values:["full-row"],formatValue:e.Value.gridColumn},values3:{values:[]}},colStart:{cssNames:["grid-column-start"],values1:{values:v},values2:{values:[]},values3:{values:[]}},colEnd:{cssNames:["grid-column-end"],values1:{values:v},values2:{values:[]},values3:{values:[]}},outline:{cssNames:["outline-width"],values1:{values:v,formatValue:e.Value.px},values2:{values:[]},values3:{values:[]}},outlineStyle:{cssNames:["outline-style"],values1:{values:W},values2:{values:[]},values3:{values:[]}},outlineOffset:{cssNames:["outline-offset"],values1:{values:v,formatValue:e.Value.px},values2:{values:[]},values3:{values:[]}},transition:{cssNames:["transition-property"],values1:{values:["none","all"]},values2:{values:[]},values3:{values:[]}},transitionDuration:{cssNames:["transition-duration"],values1:{values:[50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1e3],formatValue:e.Value.ms},values2:{values:[]},values3:{values:[]}},userSelect:{cssNames:["user-select"],values1:{values:["none","auto","text","all"]},values2:{values:[]},values3:{values:[]}},appearance:{cssNames:["appearance"],values1:{values:["none"]},values2:{values:[]},values3:{values:[]}},pointerEvents:{cssNames:["pointer-events"],values1:{values:["none","auto","all"]},values2:{values:[]},values3:{values:[]}},whiteSpace:{cssNames:["white-space"],values1:{values:["break-spaces","normal","nowrap","pre","pre-line","pre-wrap"]},values2:{values:[]},values3:{values:[]}},textOverflow:{cssNames:["text-overflow"],values1:{values:["clip","ellipsis"]},values2:{values:[]},values3:{values:[]}},rotate:{cssNames:["rotate"],values1:{values:[0,90,180,270,-90,-180,-270],formatValue:e.Value.rotate},values2:{values:[]},values3:{values:[]}},flip:{cssNames:["scale"],values1:{values:["xAxis","yAxis"],formatValue:e.Value.flip},values2:{values:[]},values3:{values:[]}}},M={shadow:{cssNames:["box-shadow"],formatValue:e.Value.variables("shadow")},background:{cssNames:["background"],formatValue:e.Value.variables("background")},backgroundImage:{cssNames:["background-image"],formatValue:e.Value.variables("backgroundImage")},color:{cssNames:["color"],formatValue:e.Value.variables("color")},bgColor:{cssNames:["background-color"],formatValue:e.Value.variables("color")},borderColor:{cssNames:["border-color"],formatValue:e.Value.variables("color")},outlineColor:{cssNames:["outline-color"],formatValue:e.Value.variables("color")}},U={fill:{cssNames:["fill"],formatValue:e.Value.svgVariables("color"),formatSelector:e.ClassName.svg},stroke:{cssNames:["stroke"],formatValue:e.Value.svgVariables("color"),formatSelector:e.ClassName.svg}},D=["Hover","Focus","Active","Checked","Indeterminate","Valid","Invalid","Required","Optional","Disabled"],A=["sm","md","lg","xl","xxl"],ue={sm:640,md:768,lg:1024,xl:1280,xxl:1536};function J(){const a={...le};Object.keys(M).forEach(t=>{a[t]=M[t],a[t].isThemeStyle=!0}),Object.keys(U).forEach(t=>{a[t]=U[t],a[t].isThemeStyle=!0});let u=Object.keys(a);return D.forEach(t=>{u.forEach(n=>{a[`${n}${t}`]={...a[n],pseudoSuffix:t}})}),u=Object.keys(a),A.forEach(t=>{u.forEach(n=>{a[`${t}${n}`]={...a[n],breakpoint:t}})}),a}let C=J();function te(){C=J()}function oe(a,u,t){const n=Object.entries(C).filter(([o,m])=>m.pseudoSuffix===a&&!m.customPseudoSuffix&&!(`${o}${u}`in C)).map(([o])=>o);return n.forEach(o=>{C[`${o}${u}`]={...C[o],customPseudoSuffix:t+u}}),n.map(o=>`${o}${u}`)}class re{constructor(){this._index=0,this._cache={}}getIdentity(u){return this._cache[u]||(this._cache[u]=this.getByIndex(this._index++)),this._cache[u]}getByIndex(u){const{first:t,next:n}=ne,o=u-t.length;if(o<0)return t[u];const m=Math.floor(o/n.length),N=o-m*n.length;return this.getByIndex(m)+n[N]}}const ne={first:"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",next:"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"};var _;(a=>{a.boxClassName="_box",a.svgClassName="_svg",a.cronoStylesElementId="crono-styles";const u=`:root{--borderColor: black;--outlineColor: black;--lineHeight: 1.2;--fontSize: 14px;--transitionTime: 0.25s;--svgTransitionTime: 0.3s;#crono-box {position: absolute;top: 0;left: 0;height: 0;}}
|
|
1
|
+
"use strict";const le=require("react"),we=require("./utils.cjs");var d;(u=>{(o=>{function t(e,O){return`${e}${O.replace("/","-")}`}o.fraction=t;function m(e){return[`${e} path`,`${e} circle`,`${e} rect`,`${e} line`]}o.svg=m})(u.ClassName||(u.ClassName={})),(o=>{function t(p,h){return`${h/4}rem`}o.rem=t;function m(p,h){return`${h}px`}o.px=m;function e(p,h){const[b,x]=h.split("/");return`${+b/+x*100}%`}o.fraction=e;function O(p,h){switch(h){case"fit":return"100%";case"fit-screen":return p.toLocaleLowerCase().includes("height")?"100vh":"100vw";default:return h}}o.widthHeight=O;function q(p){return(h,b)=>`var(--${p}${b});`}o.variables=q;function H(p){return(h,b)=>`var(--${p}${b});`}o.svgVariables=H;function L(p,h){return`repeat(${h},minmax(0,1fr))`}o.gridColumns=L;function G(p,h){return h==="full-row"?"1/-1":`span ${h}/span ${h}`}o.gridColumn=G;function y(p,h){return`${h}ms`}o.ms=y;function j(p,h){return`${h}deg`}o.rotate=j;function C(p,h){return h==="xAxis"?"-1 1":"1 -1"}o.flip=C})(u.Value||(u.Value={}))})(d||(d={}));const M=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,64,68,72,76,80,84,88,92,96,100,110,120,128,130,140,150,160,170,180,190,192,200,225,250,256,275,300,320,350,384,400],Oe=[-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-22,-24,-26,-28,-30,-32,-34,-36,-38,-40,-44,-48,-52,-56,-60,-64,-68,-72,-76,-80,-84,-88,-92,-96,-100],S=[...M,...Oe],me=["solid","dashed","dotted","double","groove","ridge","inset","outset","none","hidden"],ue=["auto","hidden","scroll","visible"],ee=["1/2","1/3","2/3","1/4","2/4","3/4","1/5","2/5","3/5","4/5","1/6","2/6","3/6","4/6","5/6","1/12","2/12","3/12","4/12","5/12","6/12","7/12","8/12","9/12","10/12","11/12"],se=["fit","fit-screen","auto","fit-content","max-content","min-content"],be=["auto","flex-start","flex-end","center","baseline","stretch"],Ce={display:{cssNames:["display"],values1:{values:["none","block","inline-block","flex","inline-flex","grid","inline-grid","contents"]},values2:{values:[]},values3:{values:[]}},inline:{cssNames:["display"],values1:{values:[!0],formatValue:()=>"inline-block"},values2:{values:[]},values3:{values:[]}},boxSizing:{cssNames:["box-sizing"],values1:{values:["border-box","content-box"]},values2:{values:[]},values3:{values:[]}},width:{cssNames:["width"],values1:{values:se,formatValue:d.Value.widthHeight},values2:{values:M,formatValue:d.Value.rem},values3:{values:ee,formatValue:d.Value.fraction}},minWidth:{cssNames:["min-width"],values1:{values:se,formatValue:d.Value.widthHeight},values2:{values:M,formatValue:d.Value.rem},values3:{values:ee,formatValue:d.Value.fraction}},maxWidth:{cssNames:["max-width"],values1:{values:se,formatValue:d.Value.widthHeight},values2:{values:M,formatValue:d.Value.rem},values3:{values:ee,formatValue:d.Value.fraction}},height:{cssNames:["height"],values1:{values:se,formatValue:d.Value.widthHeight},values2:{values:M,formatValue:d.Value.rem},values3:{values:ee,formatValue:d.Value.fraction}},minHeight:{cssNames:["min-height"],values1:{values:se,formatValue:d.Value.widthHeight},values2:{values:M,formatValue:d.Value.rem},values3:{values:ee,formatValue:d.Value.fraction}},maxHeight:{cssNames:["max-height"],values1:{values:se,formatValue:d.Value.widthHeight},values2:{values:M,formatValue:d.Value.rem},values3:{values:ee,formatValue:d.Value.fraction}},position:{cssNames:["position"],values1:{values:["static","relative","absolute","fixed","sticky"]},values2:{values:[]},values3:{values:[]}},top:{cssNames:["top"],values1:{values:S,formatValue:d.Value.rem},values2:{values:[]},values3:{values:[]}},right:{cssNames:["right"],values1:{values:S,formatValue:d.Value.rem},values2:{values:[]},values3:{values:[]}},bottom:{cssNames:["bottom"],values1:{values:S,formatValue:d.Value.rem},values2:{values:[]},values3:{values:[]}},left:{cssNames:["left"],values1:{values:S,formatValue:d.Value.rem},values2:{values:[]},values3:{values:[]}},inset:{cssNames:["inset"],values1:{values:S,formatValue:d.Value.rem},values2:{values:[]},values3:{values:[]}},m:{cssNames:["margin"],values1:{values:S,formatValue:d.Value.rem},values2:{values:["auto"]},values3:{values:[]}},mx:{cssNames:["margin-inline"],values1:{values:S,formatValue:d.Value.rem},values2:{values:["auto"]},values3:{values:[]}},my:{cssNames:["margin-block"],values1:{values:S,formatValue:d.Value.rem},values2:{values:["auto"]},values3:{values:[]}},mt:{cssNames:["margin-top"],values1:{values:S,formatValue:d.Value.rem},values2:{values:["auto"]},values3:{values:[]}},mr:{cssNames:["margin-right"],values1:{values:S,formatValue:d.Value.rem},values2:{values:["auto"]},values3:{values:[]}},mb:{cssNames:["margin-bottom"],values1:{values:S,formatValue:d.Value.rem},values2:{values:["auto"]},values3:{values:[]}},ml:{cssNames:["margin-left"],values1:{values:S,formatValue:d.Value.rem},values2:{values:["auto"]},values3:{values:[]}},p:{cssNames:["padding"],values1:{values:S,formatValue:d.Value.rem},values2:{values:[]},values3:{values:[]}},px:{cssNames:["padding-inline"],values1:{values:S,formatValue:d.Value.rem},values2:{values:[]},values3:{values:[]}},py:{cssNames:["padding-block"],values1:{values:S,formatValue:d.Value.rem},values2:{values:[]},values3:{values:[]}},pt:{cssNames:["padding-top"],values1:{values:S,formatValue:d.Value.rem},values2:{values:[]},values3:{values:[]}},pr:{cssNames:["padding-right"],values1:{values:S,formatValue:d.Value.rem},values2:{values:[]},values3:{values:[]}},pb:{cssNames:["padding-bottom"],values1:{values:S,formatValue:d.Value.rem},values2:{values:[]},values3:{values:[]}},pl:{cssNames:["padding-left"],values1:{values:S,formatValue:d.Value.rem},values2:{values:[]},values3:{values:[]}},b:{cssNames:["border-width"],values1:{values:M,formatValue:d.Value.px},values2:{values:[]},values3:{values:[]}},bx:{cssNames:["border-inline-width"],values1:{values:S,formatValue:d.Value.px},values2:{values:[]},values3:{values:[]}},by:{cssNames:["border-block-width"],values1:{values:S,formatValue:d.Value.px},values2:{values:[]},values3:{values:[]}},bt:{cssNames:["border-top-width"],values1:{values:S,formatValue:d.Value.px},values2:{values:[]},values3:{values:[]}},br:{cssNames:["border-right-width"],values1:{values:S,formatValue:d.Value.px},values2:{values:[]},values3:{values:[]}},bb:{cssNames:["border-bottom-width"],values1:{values:S,formatValue:d.Value.px},values2:{values:[]},values3:{values:[]}},bl:{cssNames:["border-left-width"],values1:{values:S,formatValue:d.Value.px},values2:{values:[]},values3:{values:[]}},borderStyle:{cssNames:["border-style"],values1:{values:me},values2:{values:[]},values3:{values:[]}},borderRadius:{cssNames:["border-radius"],values1:{values:M,formatValue:d.Value.rem},values2:{values:[]},values3:{values:[]}},borderRadiusTop:{cssNames:["border-top-left-radius","border-top-right-radius"],values1:{values:M,formatValue:d.Value.rem},values2:{values:[]},values3:{values:[]}},borderRadiusRight:{cssNames:["border-top-right-radius","border-bottom-right-radius"],values1:{values:M,formatValue:d.Value.rem},values2:{values:[]},values3:{values:[]}},borderRadiusBottom:{cssNames:["border-bottom-left-radius","border-bottom-right-radius"],values1:{values:M,formatValue:d.Value.rem},values2:{values:[]},values3:{values:[]}},borderRadiusLeft:{cssNames:["border-top-left-radius","border-bottom-left-radius"],values1:{values:M,formatValue:d.Value.rem},values2:{values:[]},values3:{values:[]}},borderRadiusTopLeft:{cssNames:["border-top-left-radius"],values1:{values:M,formatValue:d.Value.rem},values2:{values:[]},values3:{values:[]}},borderRadiusTopRight:{cssNames:["border-top-right-radius"],values1:{values:M,formatValue:d.Value.rem},values2:{values:[]},values3:{values:[]}},borderRadiusBottomLeft:{cssNames:["border-bottom-left-radius"],values1:{values:M,formatValue:d.Value.rem},values2:{values:[]},values3:{values:[]}},borderRadiusBottomRight:{cssNames:["border-bottom-right-radius"],values1:{values:M,formatValue:d.Value.rem},values2:{values:[]},values3:{values:[]}},cursor:{cssNames:["cursor"],values1:{values:["auto","default","none","context-menu","help","pointer","progress","wait","cell","crosshair","text","vertical-text","alias","copy","move","no-drop","not-allowed","e-resize","n-resize","ne-resize","nw-resize","s-resize","se-resize","sw-resize","w-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","col-resize","row-resize","all-scroll","zoom-in","zoom-out","grab","grabbing"]},values2:{values:[]},values3:{values:[]}},zIndex:{cssNames:["z-index"],values1:{values:[1,2,3,4,5,10,11,12,13,14,15,100,101,102,103,104,105,1e3,1001,1002,1003,1004,1005]},values2:{values:[]},values3:{values:[]}},overflow:{cssNames:["overflow"],values1:{values:ue},values2:{values:[]},values3:{values:[]}},overflowX:{cssNames:["overflow-x"],values1:{values:ue},values2:{values:[]},values3:{values:[]}},overflowY:{cssNames:["overflow-y"],values1:{values:ue},values2:{values:[]},values3:{values:[]}},opacity:{cssNames:["opacity"],values1:{values:[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1]},values2:{values:[]},values3:{values:[]}},fontSize:{cssNames:["font-size"],values1:{values:M,formatValue:d.Value.px},values2:{values:["inherit"]},values3:{values:[]}},fontStyle:{cssNames:["font-style"],values1:{values:["italic","normal","oblique"]},values2:{values:[]},values3:{values:[]}},fontWeight:{cssNames:["font-weight"],values1:{values:[100,200,300,400,500,600,700,800,900]},values2:{values:[]},values3:{values:[]}},letterSpacing:{cssNames:["letter-spacing"],values1:{values:M,formatValue:d.Value.px},values2:{values:[]},values3:{values:[]}},lineHeight:{cssNames:["line-height"],values1:{values:M,formatValue:d.Value.px},values2:{values:["font-size"],formatValue:()=>"1"},values3:{values:[]}},textDecoration:{cssNames:["text-decoration"],values1:{values:["none","underline","overline","line-through"]},values2:{values:[]},values3:{values:[]}},textTransform:{cssNames:["text-transform"],values1:{values:["none","capitalize","lowercase","uppercase"]},values2:{values:[]},values3:{values:[]}},textAlign:{cssNames:["text-align"],values1:{values:["left","right","center","justify"]},values2:{values:[]},values3:{values:[]}},flexWrap:{cssNames:["flex-wrap"],values1:{values:["nowrap","wrap","wrap-reverse"]},values2:{values:[]},values3:{values:[]}},jc:{cssNames:["justify-content"],values1:{values:["start","end","flex-start","flex-end","center","left","right","space-between","space-around","space-evenly","stretch"]},values2:{values:[]},values3:{values:[]}},ai:{cssNames:["align-items"],values1:{values:["stretch","flex-start","flex-end","center","baseline","start","end","self-start","self-end"]},values2:{values:[]},values3:{values:[]}},alignContent:{cssNames:["align-content"],values1:{values:["flex-start","flex-end","center","space-between","space-around","space-evenly","stretch","start","end","baseline"]},values2:{values:[]},values3:{values:[]}},flex1:{cssNames:["flex"],values1:{values:[!0],formatValue:()=>"1"},values2:{values:[]},values3:{values:[]}},d:{cssNames:["flex-direction"],values1:{values:["row","row-reverse","column","column-reverse"]},values2:{values:[]},values3:{values:[]}},gap:{cssNames:["gap"],values1:{values:M,formatValue:d.Value.rem},values2:{values:[]},values3:{values:[]}},rowGap:{cssNames:["row-gap"],values1:{values:M,formatValue:d.Value.rem},values2:{values:[]},values3:{values:[]}},columnGap:{cssNames:["column-gap"],values1:{values:M,formatValue:d.Value.rem},values2:{values:[]},values3:{values:[]}},order:{cssNames:["order"],values1:{values:M},values2:{values:[]},values3:{values:[]}},flexGrow:{cssNames:["flex-grow"],values1:{values:M},values2:{values:[]},values3:{values:[]}},flexShrink:{cssNames:["flex-shrink"],values1:{values:M},values2:{values:[]},values3:{values:[]}},alignSelf:{cssNames:["align-self"],values1:{values:be},values2:{values:[]},values3:{values:[]}},justifySelf:{cssNames:["justify-self"],values1:{values:be},values2:{values:[]},values3:{values:[]}},gridColumns:{cssNames:["grid-template-columns"],values1:{values:M,formatValue:d.Value.gridColumns},values2:{values:[]},values3:{values:[]}},colSpan:{cssNames:["grid-column"],values1:{values:M,formatValue:d.Value.gridColumn},values2:{values:["full-row"],formatValue:d.Value.gridColumn},values3:{values:[]}},colStart:{cssNames:["grid-column-start"],values1:{values:M},values2:{values:[]},values3:{values:[]}},colEnd:{cssNames:["grid-column-end"],values1:{values:M},values2:{values:[]},values3:{values:[]}},outline:{cssNames:["outline-width"],values1:{values:M,formatValue:d.Value.px},values2:{values:[]},values3:{values:[]}},outlineStyle:{cssNames:["outline-style"],values1:{values:me},values2:{values:[]},values3:{values:[]}},outlineOffset:{cssNames:["outline-offset"],values1:{values:M,formatValue:d.Value.px},values2:{values:[]},values3:{values:[]}},transition:{cssNames:["transition-property"],values1:{values:["none","all"]},values2:{values:[]},values3:{values:[]}},transitionDuration:{cssNames:["transition-duration"],values1:{values:[50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1e3],formatValue:d.Value.ms},values2:{values:[]},values3:{values:[]}},userSelect:{cssNames:["user-select"],values1:{values:["none","auto","text","all"]},values2:{values:[]},values3:{values:[]}},appearance:{cssNames:["appearance"],values1:{values:["none","auto","menulist-button","textfield","button","checkbox"]},values2:{values:[]},values3:{values:[]}},pointerEvents:{cssNames:["pointer-events"],values1:{values:["none","auto","all"]},values2:{values:[]},values3:{values:[]}},whiteSpace:{cssNames:["white-space"],values1:{values:["break-spaces","normal","nowrap","pre","pre-line","pre-wrap"]},values2:{values:[]},values3:{values:[]}},textOverflow:{cssNames:["text-overflow"],values1:{values:["clip","ellipsis"]},values2:{values:[]},values3:{values:[]}},rotate:{cssNames:["rotate"],values1:{values:[0,90,180,270,-90,-180,-270],formatValue:d.Value.rotate},values2:{values:[]},values3:{values:[]}},flip:{cssNames:["scale"],values1:{values:["xAxis","yAxis"],formatValue:d.Value.flip},values2:{values:[]},values3:{values:[]}},visibility:{cssNames:["visibility"],values1:{values:["visible","hidden","collapse"]},values2:{values:[]},values3:{values:[]}},resize:{cssNames:["resize"],values1:{values:["none","both","horizontal","vertical","block","inline"]},values2:{values:[]},values3:{values:[]}}},pe={shadow:{cssNames:["box-shadow"],formatValue:d.Value.variables("shadow")},background:{cssNames:["background"],formatValue:d.Value.variables("background")},backgroundImage:{cssNames:["background-image"],formatValue:d.Value.variables("backgroundImage")},color:{cssNames:["color"],formatValue:d.Value.variables("color")},bgColor:{cssNames:["background-color"],formatValue:d.Value.variables("color")},borderColor:{cssNames:["border-color"],formatValue:d.Value.variables("color")},outlineColor:{cssNames:["outline-color"],formatValue:d.Value.variables("color")}},ge={fill:{cssNames:["fill"],formatValue:d.Value.svgVariables("color"),formatSelector:d.ClassName.svg},stroke:{cssNames:["stroke"],formatValue:d.Value.svgVariables("color"),formatSelector:d.ClassName.svg}},Ee=["disabledGroup","hoverGroup","focusGroup","activeGroup"],ne=["hover","focus","hasFocus","active","checked","hasChecked","indeterminate","valid","hasValid","invalid","hasInvalid","required","optional","disabled","hasDisabled"],te=["sm","md","lg","xl","xxl"],$e={sm:640,md:768,lg:1024,xl:1280,xxl:1536};function ye(){const u={...Ce};Object.keys(pe).forEach(t=>{u[t]=pe[t],u[t].isThemeStyle=!0}),Object.keys(ge).forEach(t=>{u[t]=ge[t],u[t].isThemeStyle=!0});let o=Object.keys(u);return ne.forEach(t=>{o.forEach(m=>{u[`${m}${t}`]={...u[m],pseudoSuffix:t}})}),o=Object.keys(u),te.forEach(t=>{o.forEach(m=>{u[`${t}${m}`]={...u[m],breakpoint:t}})}),u}let U=ye();function Se(){U=ye()}function Te(u,o,t){const m=Object.entries(U).filter(([e,O])=>O.pseudoSuffix===u&&!O.customPseudoSuffix&&!(`${e}${o}`in U)).map(([e])=>e);return m.forEach(e=>{U[`${e}${o}`]={...U[e],customPseudoSuffix:t+o}}),m.map(e=>`${e}${o}`)}class ke{constructor(){this._index=0,this._cache={}}getIdentity(o){return this._cache[o]||(this._cache[o]=this.getByIndex(this._index++)),this._cache[o]}getByIndex(o){const{first:t,next:m}=Pe,e=o-t.length;if(e<0)return t[o];const O=Math.floor(e/m.length),q=e-O*m.length;return this.getByIndex(O)+m[q]}}const Pe={first:"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",next:"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"};var ce;(u=>{u.boxClassName="_box",u.svgClassName="_svg",u.cronoStylesElementId="crono-styles";const o=`:root{--borderColor: black;--outlineColor: black;--lineHeight: 1.2;--fontSize: 14px;--transitionTime: 0.25s;--svgTransitionTime: 0.3s;#crono-box {position: absolute;top: 0;left: 0;height: 0;}}
|
|
2
2
|
html{font-size: 16px;font-family: Arial, sans-serif;}
|
|
3
3
|
body{margin: 0;line-height: var(--lineHeight);font-size: var(--fontSize);}
|
|
4
4
|
a,ul{all: unset;}
|
|
5
|
-
.${
|
|
6
|
-
.${
|
|
7
|
-
`,t=new
|
|
8
|
-
`),
|
|
9
|
-
`),
|
|
10
|
-
`),
|
|
11
|
-
`),
|
|
5
|
+
.${u.boxClassName}{display: block;border: 0 solid var(--borderColor);outline: 0px solid var(--outlineColor);margin: 0;padding: 0;background-color: initial;transition: all var(--transitionTime);box-sizing: border-box;font-family: inherit;font-size: inherit;}
|
|
6
|
+
.${u.svgClassName}{display: block;border: 0 solid var(--borderColor);outline: 0px solid var(--outlineColor);margin: 0;padding: 0;transition: all var(--svgTransitionTime);}.${u.svgClassName} path,.${u.svgClassName} circle,.${u.svgClassName} rect,.${u.svgClassName} line {transition: all var(--svgTransitionTime);}
|
|
7
|
+
`,t=new ke;let m=!0,e={};H();function O(h,b,x){if(h in U)return G(h,b,x);if(Ee.includes(h))return h+b}u.get=O;function q(){if(m){let h=j([o]);ne.forEach(x=>{h=j(h,x)}),te.forEach(x=>{h.push(`@media(min-width: ${$e[x]}px){`),h=j(h,void 0,x),ne.forEach(z=>{h=j(h,z,x)}),h.push("}")});const b=p();b.innerHTML=h.join(""),m=!1}}u.flush=q;function H(){Se(),e=Object.keys(U).reduce((b,x)=>(b[x]=new Set,b),{})}u.clear=H;function L(h,b,x){Te(h,b,x).forEach(k=>{e[k]=new Set})}u.addCustomPseudoClass=L;function G(h,b,x){const z=(x??"")+h;e[z].has(b)||(m=!0,e[z].add(b));const k=`${z}${b}`;return process.env.NODE_ENV==="test"?k:t.getIdentity(k)}const y={hover:"hover",focus:"focus-within",hasFocus:"has(:focus-within)",active:"active",checked:"checked",hasChecked:"has(:checked)",indeterminate:"indeterminate",valid:"user-valid",hasValid:"has(:valid)",invalid:"user-invalid",hasInvalid:"has(:user-invalid)",required:"required",optional:"optional",disabled:"disabled",hasDisabled:"has(:disabled)"};function j(h,b,x){return Object.entries(e).filter(([k,I])=>{var D,A;return((D=U[k])==null?void 0:D.pseudoSuffix)===b&&((A=U[k])==null?void 0:A.breakpoint)===x&&I.size>0}).reduce((k,[I,D])=>(D.forEach(A=>{var oe;const W=U[I],Y=C(W,A),Q=`.${G(I,A)}`,X=z(Q,W,Y,b?y[b]:void 0),P=((oe=Y.formatValue)==null?void 0:oe.call(Y,I,A))??A,ae=U[I].cssNames.map(re=>`${re}:${P};`).join("");k.push(`${X.join(",")}{${ae}}`)}),k),h);function z(k,I,D,A){let W=k;return A&&(W=I.customPseudoSuffix?`.${I.customPseudoSuffix}:${A} ${k}`:`${k}:${A}`),D.formatSelector?D.formatSelector(W):[W]}}function C(h,b){return h.isThemeStyle?h:h.values1.values.includes(b)?h.values1:h.values2.values.includes(b)?h.values2:h.values3}function p(){const b=typeof window<"u"&&typeof window.document<"u"?window.document:global.document;let x=b.getElementById(u.cronoStylesElementId);return x||(x=b.createElement("style"),x.setAttribute("id",u.cronoStylesElementId),x.setAttribute("type","text/css"),b.head.insertBefore(x,b.head.firstChild)),x}u.getElement=p})(ce||(ce={}));const J=ce,ze={button:{styles:{display:"inline-block",p:3,cursor:"pointer",b:1,borderRadius:1,userSelect:"none",disabled:{cursor:"default"}}},checkbox:{styles:{display:"inline-block"}},radioButton:{styles:{display:"inline-block",b:1,p:2}},textbox:{styles:{display:"inline-block",b:1,borderRadius:1,p:3}},textarea:{styles:{display:"inline-block",b:1,borderRadius:1}}};var de;(u=>{u.Styles={};function o(y){u.Styles=e(ze),m(y)}u.setup=o;function t(y,j){const{colors:C={},shadows:p={},backgrounds:h={},backgroundImages:b={}}=y;C.none="none",p.none="none",h.none="none",b.none="none";const x=Object.entries(C).map(([P,K])=>`--color${P}: ${K};`).join(`
|
|
8
|
+
`),z=Object.entries(p).map(([P,K])=>`--shadow${P}: ${K};`).join(`
|
|
9
|
+
`),k=Object.entries(h).map(([P,K])=>`--background${P}: ${K};`).join(`
|
|
10
|
+
`),I=Object.entries(b).map(([P,K])=>`--backgroundImage${P}: ${K};`).join(`
|
|
11
|
+
`),D=[":root {"];x&&D.push(` ${x}`),z&&D.push(` ${z}`),k&&D.push(` ${k}`),I&&D.push(` ${I}`),D.push("}");const A=Object.keys(C).map(P=>`'${P}'`).join(" | "),W=Object.keys(h).map(P=>`'${P}'`).join(" | "),Y=Object.keys(b).map(P=>`'${P}'`).join(" | "),Q=Object.keys(p).map(P=>`'${P}'`).join(" | "),X=`import '@cronocode/react-box';
|
|
12
12
|
|
|
13
|
-
declare module '${(
|
|
14
|
-
type ColorType = ${
|
|
15
|
-
type BackgroundType = ${
|
|
16
|
-
type BackgroundImageType = ${
|
|
17
|
-
type ShadowType = ${
|
|
13
|
+
declare module '${(j==null?void 0:j.namespacePath)??"@cronocode/react-box/core/types"}' {
|
|
14
|
+
type ColorType = ${A};
|
|
15
|
+
type BackgroundType = ${W};
|
|
16
|
+
type BackgroundImageType = ${Y};
|
|
17
|
+
type ShadowType = ${Q};
|
|
18
18
|
|
|
19
19
|
namespace Augmented {
|
|
20
20
|
interface BoxProps {
|
|
@@ -33,5 +33,10 @@ a,ul{all: unset;}
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
`;return{variables:
|
|
37
|
-
`),boxDts:
|
|
36
|
+
`;return{variables:D.join(`
|
|
37
|
+
`),boxDts:X}}u.setupAugmentedProps=t;function m(y){const j=e(y);if(j.components)return Object.entries(j.components).forEach(([C,p])=>{var b;const h=(b=u.Styles.components)==null?void 0:b[C];h?u.Styles.components[C].styles={...h.styles,...p.styles}:u.Styles.components[C]=p}),j}function e(y){return O(y),q(y),L(y),y}function O(y){const{components:j,...C}=y,p=Object.entries(C);p.length&&!y.components&&(y.components={});for(const h of p){const[b,x]=h;y.components[b]=x,delete y[b]}}function q(y){if(!y.components)return;const j=Object.keys(y.components);for(const C of j){const p=y.components[C],h=H(C,p);delete p.children;for(const b of h){const[x,z]=b;y.components[x]=z}}}function H(y,j){if(!j.children)return[];const C=Object.keys(j.children),p=[];for(const h of C){const b=`${y}.${h}`,x=j.children[h],z=H(b,x);p.push(...z),delete x.children,p.push([b,x])}return p}function L(y){if(!y.components)return;const j=Object.values(y.components);for(const C of j)G(C.styles),te.forEach(p=>{if(p in C.styles){const h=C.styles[p];G(h)}}),C.themes&&Object.values(C.themes).forEach(p=>{G(p),te.forEach(h=>{if(h in p){const b=p[h];G(b)}})})}function G(y){ne.forEach(j=>{if(j in y){const C=y[j];Object.entries(C).map(([p,h])=>{y[`${p}${j}`]=h}),delete y[j]}})}})(de||(de={}));const Ve=de;function qe(u){const{clean:o,theme:t,component:m}=u;return le.useMemo(()=>{var O,q;if(o)return;let e=(O=Ve.Styles.components)==null?void 0:O[m];if(e)return t?{...e.styles,...(q=e.themes)==null?void 0:q[t]}:e.styles},[m,o,t])}const De=typeof window<"u"&&typeof window.document<"u",Ae=De?le.useLayoutEffect:le.useEffect;function Ie(u,o){const t=qe(u);return Ae(J.flush,[u]),le.useMemo(()=>{const m=[o?J.svgClassName:J.boxClassName],e=t?{...t,...u}:{...u};return xe(e),Object.entries(e).forEach(([O,q])=>{m.push(J.get(O,q))}),te.forEach(O=>{if(O in e){const q=e[O];xe(q),Object.entries(q).forEach(([H,L])=>{m.push(J.get(H,L,O))}),delete e[O]}}),m},[u,t])}function xe(u){F(u,"hover","hover"),F(u,"focus","focus"),F(u,"hasFocus","hasFocus"),F(u,"active","active"),F(u,"disabled","disabled"),F(u,"hasDisabled","hasDisabled"),F(u,"checked","checked"),F(u,"hasChecked","hasChecked"),F(u,"valid","valid"),F(u,"hasValid","hasValid"),F(u,"invalid","invalid"),F(u,"hasInvalid","hasInvalid"),ie(u,"hoverGroup","hover"),ie(u,"focusGroup","focus"),ie(u,"activeGroup","active"),ie(u,"disabledGroup","disabled")}function F(u,o,t){o in u&&Ne(u,o,t,u[o])}function ie(u,o,t){o in u&&we.ObjectUtils.isObject(u[o])&&Object.entries(u[o]).forEach(([m,e])=>{J.addCustomPseudoClass(t,m,o),Ne(u,o,t+m,e)})}function Ne(u,o,t,m){Array.isArray(m)?(Object.entries(m[1]).forEach(([e,O])=>{u[`${e}${t}`]=O}),u[o]=m[0]):we.ObjectUtils.isObject(m)&&(Object.entries(m).forEach(([e,O])=>{u[`${e}${t}`]=O}),delete u[o])}function je(...u){return u.reduce((o,t)=>t?typeof t=="string"?(o.push(t),o):Array.isArray(t)?(o.push(...je(...t)),o):(Object.entries(t).forEach(([m,e])=>{e&&o.push(m)}),o):o,[])}/*!
|
|
38
|
+
* chai
|
|
39
|
+
* http://chaijs.com
|
|
40
|
+
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
|
|
41
|
+
* MIT Licensed
|
|
42
|
+
*/var Be=function(u,o){var t=u.Assertion,m=u.AssertionError,e=o.flag;["to","be","been","is","and","has","have","with","that","which","at","of","same","but","does","still","also"].forEach(function(s){t.addProperty(s)}),t.addProperty("not",function(){e(this,"negate",!0)}),t.addProperty("deep",function(){e(this,"deep",!0)}),t.addProperty("nested",function(){e(this,"nested",!0)}),t.addProperty("own",function(){e(this,"own",!0)}),t.addProperty("ordered",function(){e(this,"ordered",!0)}),t.addProperty("any",function(){e(this,"any",!0),e(this,"all",!1)}),t.addProperty("all",function(){e(this,"all",!0),e(this,"any",!1)});function O(s,a){a&&e(this,"message",a),s=s.toLowerCase();var l=e(this,"object"),n=~["a","e","i","o","u"].indexOf(s.charAt(0))?"an ":"a ";this.assert(s===o.type(l).toLowerCase(),"expected #{this} to be "+n+s,"expected #{this} not to be "+n+s)}t.addChainableMethod("an",O),t.addChainableMethod("a",O);function q(s,a){return o.isNaN(s)&&o.isNaN(a)||s===a}function H(){e(this,"contains",!0)}function L(s,a){a&&e(this,"message",a);var l=e(this,"object"),n=o.type(l).toLowerCase(),c=e(this,"message"),v=e(this,"negate"),r=e(this,"ssfi"),i=e(this,"deep"),f=i?"deep ":"",g=i?e(this,"eql"):q;c=c?c+": ":"";var w=!1;switch(n){case"string":w=l.indexOf(s)!==-1;break;case"weakset":if(i)throw new m(c+"unable to use .deep.include with WeakSet",void 0,r);w=l.has(s);break;case"map":l.forEach(function(E){w=w||g(E,s)});break;case"set":i?l.forEach(function(E){w=w||g(E,s)}):w=l.has(s);break;case"array":i?w=l.some(function(E){return g(E,s)}):w=l.indexOf(s)!==-1;break;default:if(s!==Object(s))throw new m(c+"the given combination of arguments ("+n+" and "+o.type(s).toLowerCase()+") is invalid for this assertion. You can use an array, a map, an object, a set, a string, or a weakset instead of a "+o.type(s).toLowerCase(),void 0,r);var $=Object.keys(s),N=null,V=0;if($.forEach(function(E){var T=new t(l);if(o.transferFlags(this,T,!0),e(T,"lockSsfi",!0),!v||$.length===1){T.property(E,s[E]);return}try{T.property(E,s[E])}catch(B){if(!o.checkError.compatibleConstructor(B,m))throw B;N===null&&(N=B),V++}},this),v&&$.length>1&&V===$.length)throw N;return}this.assert(w,"expected #{this} to "+f+"include "+o.inspect(s),"expected #{this} to not "+f+"include "+o.inspect(s))}t.addChainableMethod("include",L,H),t.addChainableMethod("contain",L,H),t.addChainableMethod("contains",L,H),t.addChainableMethod("includes",L,H),t.addProperty("ok",function(){this.assert(e(this,"object"),"expected #{this} to be truthy","expected #{this} to be falsy")}),t.addProperty("true",function(){this.assert(e(this,"object")===!0,"expected #{this} to be true","expected #{this} to be false",!e(this,"negate"))}),t.addProperty("false",function(){this.assert(e(this,"object")===!1,"expected #{this} to be false","expected #{this} to be true",!!e(this,"negate"))}),t.addProperty("null",function(){this.assert(e(this,"object")===null,"expected #{this} to be null","expected #{this} not to be null")}),t.addProperty("undefined",function(){this.assert(e(this,"object")===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined")}),t.addProperty("NaN",function(){this.assert(o.isNaN(e(this,"object")),"expected #{this} to be NaN","expected #{this} not to be NaN")});function G(){var s=e(this,"object");this.assert(s!=null,"expected #{this} to exist","expected #{this} to not exist")}t.addProperty("exist",G),t.addProperty("exists",G),t.addProperty("empty",function(){var s=e(this,"object"),a=e(this,"ssfi"),l=e(this,"message"),n;switch(l=l?l+": ":"",o.type(s).toLowerCase()){case"array":case"string":n=s.length;break;case"map":case"set":n=s.size;break;case"weakmap":case"weakset":throw new m(l+".empty was passed a weak collection",void 0,a);case"function":var c=l+".empty was passed a function "+o.getName(s);throw new m(c.trim(),void 0,a);default:if(s!==Object(s))throw new m(l+".empty was passed non-string primitive "+o.inspect(s),void 0,a);n=Object.keys(s).length}this.assert(n===0,"expected #{this} to be empty","expected #{this} not to be empty")});function y(){var s=e(this,"object"),a=o.type(s);this.assert(a==="Arguments","expected #{this} to be arguments but got "+a,"expected #{this} to not be arguments")}t.addProperty("arguments",y),t.addProperty("Arguments",y);function j(s,a){a&&e(this,"message",a);var l=e(this,"object");if(e(this,"deep")){var n=e(this,"lockSsfi");e(this,"lockSsfi",!0),this.eql(s),e(this,"lockSsfi",n)}else this.assert(s===l,"expected #{this} to equal #{exp}","expected #{this} to not equal #{exp}",s,this._obj,!0)}t.addMethod("equal",j),t.addMethod("equals",j),t.addMethod("eq",j);function C(s,a){a&&e(this,"message",a);var l=e(this,"eql");this.assert(l(s,e(this,"object")),"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",s,this._obj,!0)}t.addMethod("eql",C),t.addMethod("eqls",C);function p(s,a){a&&e(this,"message",a);var l=e(this,"object"),n=e(this,"doLength"),c=e(this,"message"),v=c?c+": ":"",r=e(this,"ssfi"),i=o.type(l).toLowerCase(),f=o.type(s).toLowerCase(),g,w=!0;if(n&&i!=="map"&&i!=="set"&&new t(l,c,r,!0).to.have.property("length"),!n&&i==="date"&&f!=="date")g=v+"the argument to above must be a date";else if(f!=="number"&&(n||i==="number"))g=v+"the argument to above must be a number";else if(!n&&i!=="date"&&i!=="number"){var $=i==="string"?"'"+l+"'":l;g=v+"expected "+$+" to be a number or a date"}else w=!1;if(w)throw new m(g,void 0,r);if(n){var N="length",V;i==="map"||i==="set"?(N="size",V=l.size):V=l.length,this.assert(V>s,"expected #{this} to have a "+N+" above #{exp} but got #{act}","expected #{this} to not have a "+N+" above #{exp}",s,V)}else this.assert(l>s,"expected #{this} to be above #{exp}","expected #{this} to be at most #{exp}",s)}t.addMethod("above",p),t.addMethod("gt",p),t.addMethod("greaterThan",p);function h(s,a){a&&e(this,"message",a);var l=e(this,"object"),n=e(this,"doLength"),c=e(this,"message"),v=c?c+": ":"",r=e(this,"ssfi"),i=o.type(l).toLowerCase(),f=o.type(s).toLowerCase(),g,w=!0;if(n&&i!=="map"&&i!=="set"&&new t(l,c,r,!0).to.have.property("length"),!n&&i==="date"&&f!=="date")g=v+"the argument to least must be a date";else if(f!=="number"&&(n||i==="number"))g=v+"the argument to least must be a number";else if(!n&&i!=="date"&&i!=="number"){var $=i==="string"?"'"+l+"'":l;g=v+"expected "+$+" to be a number or a date"}else w=!1;if(w)throw new m(g,void 0,r);if(n){var N="length",V;i==="map"||i==="set"?(N="size",V=l.size):V=l.length,this.assert(V>=s,"expected #{this} to have a "+N+" at least #{exp} but got #{act}","expected #{this} to have a "+N+" below #{exp}",s,V)}else this.assert(l>=s,"expected #{this} to be at least #{exp}","expected #{this} to be below #{exp}",s)}t.addMethod("least",h),t.addMethod("gte",h),t.addMethod("greaterThanOrEqual",h);function b(s,a){a&&e(this,"message",a);var l=e(this,"object"),n=e(this,"doLength"),c=e(this,"message"),v=c?c+": ":"",r=e(this,"ssfi"),i=o.type(l).toLowerCase(),f=o.type(s).toLowerCase(),g,w=!0;if(n&&i!=="map"&&i!=="set"&&new t(l,c,r,!0).to.have.property("length"),!n&&i==="date"&&f!=="date")g=v+"the argument to below must be a date";else if(f!=="number"&&(n||i==="number"))g=v+"the argument to below must be a number";else if(!n&&i!=="date"&&i!=="number"){var $=i==="string"?"'"+l+"'":l;g=v+"expected "+$+" to be a number or a date"}else w=!1;if(w)throw new m(g,void 0,r);if(n){var N="length",V;i==="map"||i==="set"?(N="size",V=l.size):V=l.length,this.assert(V<s,"expected #{this} to have a "+N+" below #{exp} but got #{act}","expected #{this} to not have a "+N+" below #{exp}",s,V)}else this.assert(l<s,"expected #{this} to be below #{exp}","expected #{this} to be at least #{exp}",s)}t.addMethod("below",b),t.addMethod("lt",b),t.addMethod("lessThan",b);function x(s,a){a&&e(this,"message",a);var l=e(this,"object"),n=e(this,"doLength"),c=e(this,"message"),v=c?c+": ":"",r=e(this,"ssfi"),i=o.type(l).toLowerCase(),f=o.type(s).toLowerCase(),g,w=!0;if(n&&i!=="map"&&i!=="set"&&new t(l,c,r,!0).to.have.property("length"),!n&&i==="date"&&f!=="date")g=v+"the argument to most must be a date";else if(f!=="number"&&(n||i==="number"))g=v+"the argument to most must be a number";else if(!n&&i!=="date"&&i!=="number"){var $=i==="string"?"'"+l+"'":l;g=v+"expected "+$+" to be a number or a date"}else w=!1;if(w)throw new m(g,void 0,r);if(n){var N="length",V;i==="map"||i==="set"?(N="size",V=l.size):V=l.length,this.assert(V<=s,"expected #{this} to have a "+N+" at most #{exp} but got #{act}","expected #{this} to have a "+N+" above #{exp}",s,V)}else this.assert(l<=s,"expected #{this} to be at most #{exp}","expected #{this} to be above #{exp}",s)}t.addMethod("most",x),t.addMethod("lte",x),t.addMethod("lessThanOrEqual",x),t.addMethod("within",function(s,a,l){l&&e(this,"message",l);var n=e(this,"object"),c=e(this,"doLength"),v=e(this,"message"),r=v?v+": ":"",i=e(this,"ssfi"),f=o.type(n).toLowerCase(),g=o.type(s).toLowerCase(),w=o.type(a).toLowerCase(),$,N=!0,V=g==="date"&&w==="date"?s.toISOString()+".."+a.toISOString():s+".."+a;if(c&&f!=="map"&&f!=="set"&&new t(n,v,i,!0).to.have.property("length"),!c&&f==="date"&&(g!=="date"||w!=="date"))$=r+"the arguments to within must be dates";else if((g!=="number"||w!=="number")&&(c||f==="number"))$=r+"the arguments to within must be numbers";else if(!c&&f!=="date"&&f!=="number"){var E=f==="string"?"'"+n+"'":n;$=r+"expected "+E+" to be a number or a date"}else N=!1;if(N)throw new m($,void 0,i);if(c){var T="length",B;f==="map"||f==="set"?(T="size",B=n.size):B=n.length,this.assert(B>=s&&B<=a,"expected #{this} to have a "+T+" within "+V,"expected #{this} to not have a "+T+" within "+V)}else this.assert(n>=s&&n<=a,"expected #{this} to be within "+V,"expected #{this} to not be within "+V)});function z(s,a){a&&e(this,"message",a);var l=e(this,"object"),n=e(this,"ssfi"),c=e(this,"message");try{var v=l instanceof s}catch(i){throw i instanceof TypeError?(c=c?c+": ":"",new m(c+"The instanceof assertion needs a constructor but "+o.type(s)+" was given.",void 0,n)):i}var r=o.getName(s);r===null&&(r="an unnamed constructor"),this.assert(v,"expected #{this} to be an instance of "+r,"expected #{this} to not be an instance of "+r)}t.addMethod("instanceof",z),t.addMethod("instanceOf",z);function k(s,a,l){l&&e(this,"message",l);var n=e(this,"nested"),c=e(this,"own"),v=e(this,"message"),r=e(this,"object"),i=e(this,"ssfi"),f=typeof s;if(v=v?v+": ":"",n){if(f!=="string")throw new m(v+"the argument to property must be a string when using nested syntax",void 0,i)}else if(f!=="string"&&f!=="number"&&f!=="symbol")throw new m(v+"the argument to property must be a string, number, or symbol",void 0,i);if(n&&c)throw new m(v+'The "nested" and "own" flags cannot be combined.',void 0,i);if(r==null)throw new m(v+"Target cannot be null or undefined.",void 0,i);var g=e(this,"deep"),w=e(this,"negate"),$=n?o.getPathInfo(r,s):null,N=n?$.value:r[s],V=g?e(this,"eql"):(B,_)=>B===_,E="";g&&(E+="deep "),c&&(E+="own "),n&&(E+="nested "),E+="property ";var T;c?T=Object.prototype.hasOwnProperty.call(r,s):n?T=$.exists:T=o.hasProperty(r,s),(!w||arguments.length===1)&&this.assert(T,"expected #{this} to have "+E+o.inspect(s),"expected #{this} to not have "+E+o.inspect(s)),arguments.length>1&&this.assert(T&&V(a,N),"expected #{this} to have "+E+o.inspect(s)+" of #{exp}, but got #{act}","expected #{this} to not have "+E+o.inspect(s)+" of #{act}",a,N),e(this,"object",N)}t.addMethod("property",k);function I(s,a,l){e(this,"own",!0),k.apply(this,arguments)}t.addMethod("ownProperty",I),t.addMethod("haveOwnProperty",I);function D(s,a,l){typeof a=="string"&&(l=a,a=null),l&&e(this,"message",l);var n=e(this,"object"),c=Object.getOwnPropertyDescriptor(Object(n),s),v=e(this,"eql");c&&a?this.assert(v(a,c),"expected the own property descriptor for "+o.inspect(s)+" on #{this} to match "+o.inspect(a)+", got "+o.inspect(c),"expected the own property descriptor for "+o.inspect(s)+" on #{this} to not match "+o.inspect(a),a,c,!0):this.assert(c,"expected #{this} to have an own property descriptor for "+o.inspect(s),"expected #{this} to not have an own property descriptor for "+o.inspect(s)),e(this,"object",c)}t.addMethod("ownPropertyDescriptor",D),t.addMethod("haveOwnPropertyDescriptor",D);function A(){e(this,"doLength",!0)}function W(s,a){a&&e(this,"message",a);var l=e(this,"object"),n=o.type(l).toLowerCase(),c=e(this,"message"),v=e(this,"ssfi"),r="length",i;switch(n){case"map":case"set":r="size",i=l.size;break;default:new t(l,c,v,!0).to.have.property("length"),i=l.length}this.assert(i==s,"expected #{this} to have a "+r+" of #{exp} but got #{act}","expected #{this} to not have a "+r+" of #{act}",s,i)}t.addChainableMethod("length",W,A),t.addChainableMethod("lengthOf",W,A);function Y(s,a){a&&e(this,"message",a);var l=e(this,"object");this.assert(s.exec(l),"expected #{this} to match "+s,"expected #{this} not to match "+s)}t.addMethod("match",Y),t.addMethod("matches",Y),t.addMethod("string",function(s,a){a&&e(this,"message",a);var l=e(this,"object"),n=e(this,"message"),c=e(this,"ssfi");new t(l,n,c,!0).is.a("string"),this.assert(~l.indexOf(s),"expected #{this} to contain "+o.inspect(s),"expected #{this} to not contain "+o.inspect(s))});function Q(s){var a=e(this,"object"),l=o.type(a),n=o.type(s),c=e(this,"ssfi"),v=e(this,"deep"),r,i="",f,g=!0,w=e(this,"message");w=w?w+": ":"";var $=w+"when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments";if(l==="Map"||l==="Set")i=v?"deeply ":"",f=[],a.forEach(function(R,Z){f.push(Z)}),n!=="Array"&&(s=Array.prototype.slice.call(arguments));else{switch(f=o.getOwnEnumerableProperties(a),n){case"Array":if(arguments.length>1)throw new m($,void 0,c);break;case"Object":if(arguments.length>1)throw new m($,void 0,c);s=Object.keys(s);break;default:s=Array.prototype.slice.call(arguments)}s=s.map(function(R){return typeof R=="symbol"?R:String(R)})}if(!s.length)throw new m(w+"keys required",void 0,c);var N=s.length,V=e(this,"any"),E=e(this,"all"),T=s,B=v?e(this,"eql"):(R,Z)=>R===Z;if(!V&&!E&&(E=!0),V&&(g=T.some(function(R){return f.some(function(Z){return B(R,Z)})})),E&&(g=T.every(function(R){return f.some(function(Z){return B(R,Z)})}),e(this,"contains")||(g=g&&s.length==f.length)),N>1){s=s.map(function(R){return o.inspect(R)});var _=s.pop();E&&(r=s.join(", ")+", and "+_),V&&(r=s.join(", ")+", or "+_)}else r=o.inspect(s[0]);r=(N>1?"keys ":"key ")+r,r=(e(this,"contains")?"contain ":"have ")+r,this.assert(g,"expected #{this} to "+i+r,"expected #{this} to not "+i+r,T.slice(0).sort(o.compareByInspect),f.sort(o.compareByInspect),!0)}t.addMethod("keys",Q),t.addMethod("key",Q);function X(s,a,l){l&&e(this,"message",l);var n=e(this,"object"),c=e(this,"ssfi"),v=e(this,"message"),r=e(this,"negate")||!1;new t(n,v,c,!0).is.a("function"),(s instanceof RegExp||typeof s=="string")&&(a=s,s=null);var i;try{n()}catch(_){i=_}var f=s===void 0&&a===void 0,g=!!(s&&a),w=!1,$=!1;if(f||!f&&!r){var N="an error";s instanceof Error?N="#{exp}":s&&(N=o.checkError.getConstructorName(s)),this.assert(i,"expected #{this} to throw "+N,"expected #{this} to not throw an error but #{act} was thrown",s&&s.toString(),i instanceof Error?i.toString():typeof i=="string"?i:i&&o.checkError.getConstructorName(i))}if(s&&i){if(s instanceof Error){var V=o.checkError.compatibleInstance(i,s);V===r&&(g&&r?w=!0:this.assert(r,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(i&&!r?" but #{act} was thrown":""),s.toString(),i.toString()))}var E=o.checkError.compatibleConstructor(i,s);E===r&&(g&&r?w=!0:this.assert(r,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(i?" but #{act} was thrown":""),s instanceof Error?s.toString():s&&o.checkError.getConstructorName(s),i instanceof Error?i.toString():i&&o.checkError.getConstructorName(i)))}if(i&&a!==void 0&&a!==null){var T="including";a instanceof RegExp&&(T="matching");var B=o.checkError.compatibleMessage(i,a);B===r&&(g&&r?$=!0:this.assert(r,"expected #{this} to throw error "+T+" #{exp} but got #{act}","expected #{this} to throw error not "+T+" #{exp}",a,o.checkError.getMessage(i)))}w&&$&&this.assert(r,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(i?" but #{act} was thrown":""),s instanceof Error?s.toString():s&&o.checkError.getConstructorName(s),i instanceof Error?i.toString():i&&o.checkError.getConstructorName(i)),e(this,"object",i)}t.addMethod("throw",X),t.addMethod("throws",X),t.addMethod("Throw",X);function P(s,a){a&&e(this,"message",a);var l=e(this,"object"),n=e(this,"itself"),c=typeof l=="function"&&!n?l.prototype[s]:l[s];this.assert(typeof c=="function","expected #{this} to respond to "+o.inspect(s),"expected #{this} to not respond to "+o.inspect(s))}t.addMethod("respondTo",P),t.addMethod("respondsTo",P),t.addProperty("itself",function(){e(this,"itself",!0)});function K(s,a){a&&e(this,"message",a);var l=e(this,"object"),n=s(l);this.assert(n,"expected #{this} to satisfy "+o.objDisplay(s),"expected #{this} to not satisfy"+o.objDisplay(s),!e(this,"negate"),n)}t.addMethod("satisfy",K),t.addMethod("satisfies",K);function ae(s,a,l){l&&e(this,"message",l);var n=e(this,"object"),c=e(this,"message"),v=e(this,"ssfi");if(new t(n,c,v,!0).is.a("number"),typeof s!="number"||typeof a!="number"){c=c?c+": ":"";var r=a===void 0?", and a delta is required":"";throw new m(c+"the arguments to closeTo or approximately must be numbers"+r,void 0,v)}this.assert(Math.abs(n-s)<=a,"expected #{this} to be close to "+s+" +/- "+a,"expected #{this} not to be close to "+s+" +/- "+a)}t.addMethod("closeTo",ae),t.addMethod("approximately",ae);function oe(s,a,l,n,c){if(!n){if(s.length!==a.length)return!1;a=a.slice()}return s.every(function(v,r){if(c)return l?l(v,a[r]):v===a[r];if(!l){var i=a.indexOf(v);return i===-1?!1:(n||a.splice(i,1),!0)}return a.some(function(f,g){return l(v,f)?(n||a.splice(g,1),!0):!1})})}t.addMethod("members",function(s,a){a&&e(this,"message",a);var l=e(this,"object"),n=e(this,"message"),c=e(this,"ssfi");new t(l,n,c,!0).to.be.an("array"),new t(s,n,c,!0).to.be.an("array");var v=e(this,"contains"),r=e(this,"ordered"),i,f,g;v?(i=r?"an ordered superset":"a superset",f="expected #{this} to be "+i+" of #{exp}",g="expected #{this} to not be "+i+" of #{exp}"):(i=r?"ordered members":"members",f="expected #{this} to have the same "+i+" as #{exp}",g="expected #{this} to not have the same "+i+" as #{exp}");var w=e(this,"deep")?e(this,"eql"):void 0;this.assert(oe(s,l,w,v,r),f,g,s,l,!0)});function re(s,a){a&&e(this,"message",a);var l=e(this,"object"),n=e(this,"message"),c=e(this,"ssfi"),v=e(this,"contains"),r=e(this,"deep"),i=e(this,"eql");new t(s,n,c,!0).to.be.an("array"),v?this.assert(s.some(function(f){return l.indexOf(f)>-1}),"expected #{this} to contain one of #{exp}","expected #{this} to not contain one of #{exp}",s,l):r?this.assert(s.some(function(f){return i(l,f)}),"expected #{this} to deeply equal one of #{exp}","expected #{this} to deeply equal one of #{exp}",s,l):this.assert(s.indexOf(l)>-1,"expected #{this} to be one of #{exp}","expected #{this} to not be one of #{exp}",s,l)}t.addMethod("oneOf",re);function he(s,a,l){l&&e(this,"message",l);var n=e(this,"object"),c=e(this,"message"),v=e(this,"ssfi");new t(n,c,v,!0).is.a("function");var r;a?(new t(s,c,v,!0).to.have.property(a),r=s[a]):(new t(s,c,v,!0).is.a("function"),r=s()),n();var i=a==null?s():s[a],f=a==null?r:"."+a;e(this,"deltaMsgObj",f),e(this,"initialDeltaValue",r),e(this,"finalDeltaValue",i),e(this,"deltaBehavior","change"),e(this,"realDelta",i!==r),this.assert(r!==i,"expected "+f+" to change","expected "+f+" to not change")}t.addMethod("change",he),t.addMethod("changes",he);function ve(s,a,l){l&&e(this,"message",l);var n=e(this,"object"),c=e(this,"message"),v=e(this,"ssfi");new t(n,c,v,!0).is.a("function");var r;a?(new t(s,c,v,!0).to.have.property(a),r=s[a]):(new t(s,c,v,!0).is.a("function"),r=s()),new t(r,c,v,!0).is.a("number"),n();var i=a==null?s():s[a],f=a==null?r:"."+a;e(this,"deltaMsgObj",f),e(this,"initialDeltaValue",r),e(this,"finalDeltaValue",i),e(this,"deltaBehavior","increase"),e(this,"realDelta",i-r),this.assert(i-r>0,"expected "+f+" to increase","expected "+f+" to not increase")}t.addMethod("increase",ve),t.addMethod("increases",ve);function fe(s,a,l){l&&e(this,"message",l);var n=e(this,"object"),c=e(this,"message"),v=e(this,"ssfi");new t(n,c,v,!0).is.a("function");var r;a?(new t(s,c,v,!0).to.have.property(a),r=s[a]):(new t(s,c,v,!0).is.a("function"),r=s()),new t(r,c,v,!0).is.a("number"),n();var i=a==null?s():s[a],f=a==null?r:"."+a;e(this,"deltaMsgObj",f),e(this,"initialDeltaValue",r),e(this,"finalDeltaValue",i),e(this,"deltaBehavior","decrease"),e(this,"realDelta",r-i),this.assert(i-r<0,"expected "+f+" to decrease","expected "+f+" to not decrease")}t.addMethod("decrease",fe),t.addMethod("decreases",fe);function Me(s,a){a&&e(this,"message",a);var l=e(this,"deltaMsgObj"),n=e(this,"initialDeltaValue"),c=e(this,"finalDeltaValue"),v=e(this,"deltaBehavior"),r=e(this,"realDelta"),i;v==="change"?i=Math.abs(c-n)===Math.abs(s):i=r===Math.abs(s),this.assert(i,"expected "+l+" to "+v+" by "+s,"expected "+l+" to not "+v+" by "+s)}t.addMethod("by",Me),t.addProperty("extensible",function(){var s=e(this,"object"),a=s===Object(s)&&Object.isExtensible(s);this.assert(a,"expected #{this} to be extensible","expected #{this} to not be extensible")}),t.addProperty("sealed",function(){var s=e(this,"object"),a=s===Object(s)?Object.isSealed(s):!0;this.assert(a,"expected #{this} to be sealed","expected #{this} to not be sealed")}),t.addProperty("frozen",function(){var s=e(this,"object"),a=s===Object(s)?Object.isFrozen(s):!0;this.assert(a,"expected #{this} to be frozen","expected #{this} to not be frozen")}),t.addProperty("finite",function(s){var a=e(this,"object");this.assert(typeof a=="number"&&isFinite(a),"expected #{this} to be a finite number","expected #{this} to not be a finite number")})};exports.StylesContext=J;exports.Theme=Ve;exports.assertions=Be;exports.classNames=je;exports.useStyles=Ie;
|