@cronocode/react-box 1.5.6 → 1.5.8
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/baseSvg.module.css.cjs +1 -1
- package/baseSvg.module.css.mjs +2 -2
- package/box.cjs +1 -1
- package/box.mjs +10 -10
- package/box.module.css.cjs +1 -1
- package/box.module.css.mjs +2 -2
- package/components/dox.cjs +1 -0
- package/components/dox.d.ts +1463 -0
- package/components/dox.mjs +854 -0
- package/components/grid.cjs +1 -0
- package/components/grid.d.ts +4 -0
- package/components/grid.mjs +14 -0
- package/package.json +5 -3
- package/plugins.cjs +6 -5
- package/plugins.mjs +6 -5
- package/style.css +1 -1
- package/theme.cjs +1 -1
- package/{src/theme.d.ts → theme.d.ts} +1 -1
- package/theme.mjs +2 -2
- package/{src/types.d.ts → types.d.ts} +48 -37
- package/utils/utils.cjs +1 -1
- package/utils/utils.mjs +90 -70
- package/src/index.d.ts +0 -0
- /package/{src/box.d.ts → box.d.ts} +0 -0
- /package/{src/components → components}/baseSvg.d.ts +0 -0
- /package/{src/components → components}/button.d.ts +0 -0
- /package/{src/components → components}/checkbox.d.ts +0 -0
- /package/{src/components → components}/dataGrid.d.ts +0 -0
- /package/{src/components → components}/flex.d.ts +0 -0
- /package/{src/components → components}/form.d.ts +0 -0
- /package/{src/components → components}/radioButton.d.ts +0 -0
- /package/{src/components → components}/textarea.d.ts +0 -0
- /package/{src/components → components}/textbox.d.ts +0 -0
- /package/{src/components → components}/tooltip.d.ts +0 -0
- /package/{src/hooks → hooks}/usePortalContainer.d.ts +0 -0
- /package/{src/plugins.d.ts → plugins.d.ts} +0 -0
- /package/{src/utils → utils}/className/classNameUtils.d.ts +0 -0
- /package/{src/utils → utils}/form/formUtils.d.ts +0 -0
- /package/{src/utils → utils}/object/objectUtils.d.ts +0 -0
package/theme.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react"),r={button:{styles:{inline:!0,p:3,cursor:"pointer",b:1,borderRadius:1},disabled:{cursor:"default"}},checkbox:{styles:{inline:!0,b:1,p:2}},radioButton:{styles:{inline:!0,b:1,p:2}},textbox:{styles:{inline:!0,b:1,borderRadius:1,p:3}},textarea:{styles:{inline:!0,b:1,borderRadius:1}}};let n=r;var u;(d=>{function i(t){n=t,o()}d.setup=i;function o(){Object.keys(r).forEach(s=>{const e=n[s],l=r[s];e?(e.styles={...l.styles,...e.styles},e.disabled&&l.disabled&&(e.disabled={...l.disabled,...e.disabled})):n[s]=r[s]})}})(u||(u={}));const f=u;function m(d){const{clean:i,disabled:o,theme:t,component:s}=d;return y.useMemo(()=>{var a,b,c;if(i)return;let e=n[s]??((a=n.components)==null?void 0:a[s]);if(!e)return;let l=t?{...e.styles,...(b=e.themes)==null?void 0:b[t].styles}:e.styles;return o?t?{...l,...e.disabled,...(c=e.themes)==null?void 0:c[t].disabled}:{...l,...e.disabled}:l},[s,i,o,t])}exports.default=f;exports.useTheme=m;
|
package/theme.mjs
CHANGED
|
@@ -62,10 +62,10 @@ function p(d) {
|
|
|
62
62
|
return y(() => {
|
|
63
63
|
var a, b, c;
|
|
64
64
|
if (i)
|
|
65
|
-
return
|
|
65
|
+
return;
|
|
66
66
|
let e = n[s] ?? ((a = n.components) == null ? void 0 : a[s]);
|
|
67
67
|
if (!e)
|
|
68
|
-
return
|
|
68
|
+
return;
|
|
69
69
|
let l = t ? { ...e.styles, ...(b = e.themes) == null ? void 0 : b[t].styles } : e.styles;
|
|
70
70
|
return o ? t ? { ...l, ...e.disabled, ...(c = e.themes) == null ? void 0 : c[t].disabled } : { ...l, ...e.disabled } : l;
|
|
71
71
|
}, [s, i, o, t]);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
type Hovered<T> = {
|
|
2
2
|
[K in keyof T as K extends string ? `${K}H` : never]: T[K];
|
|
3
3
|
};
|
|
4
|
-
|
|
4
|
+
type Focused<T> = {
|
|
5
5
|
[K in keyof T as K extends string ? `${K}F` : never]: T[K];
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
type Activated<T> = {
|
|
8
8
|
[K in keyof T as K extends string ? `${K}A` : never]: T[K];
|
|
9
9
|
};
|
|
10
10
|
export declare const styleVariables: {
|
|
@@ -12,14 +12,17 @@ export declare const styleVariables: {
|
|
|
12
12
|
boxSizing: readonly ["border-box", "content-box"];
|
|
13
13
|
position: readonly ["static", "relative", "absolute", "fixed", "sticky"];
|
|
14
14
|
sizeSpecialValues: readonly ["fit", "fit-screen", "auto", "fit-content", "max-content", "min-content"];
|
|
15
|
+
widthHeightSizes: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 18, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 88, 96, 100];
|
|
16
|
+
widthHeightStringSizes: readonly ["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"];
|
|
15
17
|
borderAndOutlineStyles: readonly ["solid", "dashed", "dotted", "double", "groove", "ridge", "inset", "outset", "none", "hidden"];
|
|
16
18
|
overflows: readonly ["auto", "hidden", "scroll", "visible"];
|
|
17
19
|
textDecoration: readonly ["none", "underline"];
|
|
18
20
|
textTransform: readonly ["none", "capitalize", "lowercase", "uppercase"];
|
|
19
21
|
textAlign: readonly ["left", "right", "center", "justify"];
|
|
20
|
-
opacity: readonly [10, 20, 30, 40, 50, 60, 70, 80, 90, 100];
|
|
22
|
+
opacity: readonly [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100];
|
|
21
23
|
cursors: readonly ["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"];
|
|
22
|
-
|
|
24
|
+
positiveSizes: readonly [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, 88, 96, 100];
|
|
25
|
+
negativeSizes: readonly [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -20, -24, -28, -32, -36, -40, -44, -48, -52, -56, -60, -68, -76, -84, -92, -100];
|
|
23
26
|
sizeMultiplier: number;
|
|
24
27
|
borderSizes: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
|
25
28
|
fontSizes: readonly [6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 64, 70, 78, 86, 96];
|
|
@@ -44,11 +47,13 @@ export declare const styleVariables: {
|
|
|
44
47
|
pointerEvents: readonly ["none", "auto", "all"];
|
|
45
48
|
whiteSpace: readonly ["break-spaces", "normal", "nowrap", "pre", "pre-line", "pre-wrap"];
|
|
46
49
|
textOverflow: readonly ["clip", "ellipsis"];
|
|
50
|
+
gridColumns: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20];
|
|
47
51
|
};
|
|
52
|
+
export declare const sizes: readonly [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, 88, 96, 100, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -20, -24, -28, -32, -36, -40, -44, -48, -52, -56, -60, -68, -76, -84, -92, -100];
|
|
48
53
|
type GapType = (typeof styleVariables.gap)[number];
|
|
49
|
-
type
|
|
54
|
+
type WidthHeightSizeType = (typeof styleVariables.sizeSpecialValues)[number] | (typeof styleVariables.widthHeightSizes)[number] | (typeof styleVariables.widthHeightStringSizes)[number];
|
|
50
55
|
type BorderSizeType = (typeof styleVariables.borderSizes)[number];
|
|
51
|
-
type SizeType = (typeof
|
|
56
|
+
type SizeType = (typeof sizes)[number];
|
|
52
57
|
type CursorType = (typeof styleVariables.cursors)[number];
|
|
53
58
|
type OverflowType = (typeof styleVariables.overflows)[number];
|
|
54
59
|
type FontSizeType = (typeof styleVariables.fontSizes)[number];
|
|
@@ -79,27 +84,27 @@ interface BoxSizing {
|
|
|
79
84
|
}
|
|
80
85
|
export interface BoxPosition {
|
|
81
86
|
position?: (typeof styleVariables.position)[number];
|
|
82
|
-
inset?:
|
|
87
|
+
inset?: (typeof styleVariables.positiveSizes)[number];
|
|
83
88
|
top?: SizeType;
|
|
84
89
|
right?: SizeType;
|
|
85
90
|
bottom?: SizeType;
|
|
86
91
|
left?: SizeType;
|
|
87
92
|
}
|
|
88
93
|
export interface BoxSize {
|
|
89
|
-
width?:
|
|
90
|
-
height?:
|
|
91
|
-
minWidth?:
|
|
92
|
-
minHeight?:
|
|
93
|
-
maxWidth?:
|
|
94
|
-
maxHeight?:
|
|
94
|
+
width?: WidthHeightSizeType;
|
|
95
|
+
height?: WidthHeightSizeType;
|
|
96
|
+
minWidth?: WidthHeightSizeType;
|
|
97
|
+
minHeight?: WidthHeightSizeType;
|
|
98
|
+
maxWidth?: WidthHeightSizeType;
|
|
99
|
+
maxHeight?: WidthHeightSizeType;
|
|
95
100
|
}
|
|
96
101
|
interface BoxMargin {
|
|
97
|
-
margin?:
|
|
98
|
-
m?:
|
|
99
|
-
marginHorizontal?:
|
|
100
|
-
mx?:
|
|
101
|
-
marginVertical?:
|
|
102
|
-
my?:
|
|
102
|
+
margin?: (typeof styleVariables.positiveSizes)[number] | 'auto';
|
|
103
|
+
m?: (typeof styleVariables.positiveSizes)[number] | 'auto';
|
|
104
|
+
marginHorizontal?: (typeof styleVariables.positiveSizes)[number] | 'auto';
|
|
105
|
+
mx?: (typeof styleVariables.positiveSizes)[number] | 'auto';
|
|
106
|
+
marginVertical?: (typeof styleVariables.positiveSizes)[number] | 'auto';
|
|
107
|
+
my?: (typeof styleVariables.positiveSizes)[number] | 'auto';
|
|
103
108
|
marginTop?: SizeType | 'auto';
|
|
104
109
|
mt?: SizeType | 'auto';
|
|
105
110
|
marginRight?: SizeType | 'auto';
|
|
@@ -110,12 +115,12 @@ interface BoxMargin {
|
|
|
110
115
|
ml?: SizeType | 'auto';
|
|
111
116
|
}
|
|
112
117
|
interface BoxPadding {
|
|
113
|
-
padding?:
|
|
114
|
-
p?:
|
|
115
|
-
paddingHorizontal?:
|
|
116
|
-
px?:
|
|
117
|
-
paddingVertical?:
|
|
118
|
-
py?:
|
|
118
|
+
padding?: (typeof styleVariables.positiveSizes)[number];
|
|
119
|
+
p?: (typeof styleVariables.positiveSizes)[number];
|
|
120
|
+
paddingHorizontal?: (typeof styleVariables.positiveSizes)[number];
|
|
121
|
+
px?: (typeof styleVariables.positiveSizes)[number];
|
|
122
|
+
paddingVertical?: (typeof styleVariables.positiveSizes)[number];
|
|
123
|
+
py?: (typeof styleVariables.positiveSizes)[number];
|
|
119
124
|
paddingTop?: SizeType;
|
|
120
125
|
pt?: SizeType;
|
|
121
126
|
paddingRight?: SizeType;
|
|
@@ -146,15 +151,15 @@ interface BoxBorder {
|
|
|
146
151
|
borderLeft?: BorderSizeType;
|
|
147
152
|
bl?: BorderSizeType;
|
|
148
153
|
borderStyle?: BorderAndOutlineStyleType;
|
|
149
|
-
borderRadius?:
|
|
150
|
-
borderRadiusTop?:
|
|
151
|
-
borderRadiusRight?:
|
|
152
|
-
borderRadiusBottom?:
|
|
153
|
-
borderRadiusLeft?:
|
|
154
|
-
borderRadiusTopLeft?:
|
|
155
|
-
borderRadiusTopRight?:
|
|
156
|
-
borderRadiusBottomLeft?:
|
|
157
|
-
borderRadiusBottomRight?:
|
|
154
|
+
borderRadius?: (typeof styleVariables.positiveSizes)[number];
|
|
155
|
+
borderRadiusTop?: (typeof styleVariables.positiveSizes)[number];
|
|
156
|
+
borderRadiusRight?: (typeof styleVariables.positiveSizes)[number];
|
|
157
|
+
borderRadiusBottom?: (typeof styleVariables.positiveSizes)[number];
|
|
158
|
+
borderRadiusLeft?: (typeof styleVariables.positiveSizes)[number];
|
|
159
|
+
borderRadiusTopLeft?: (typeof styleVariables.positiveSizes)[number];
|
|
160
|
+
borderRadiusTopRight?: (typeof styleVariables.positiveSizes)[number];
|
|
161
|
+
borderRadiusBottomLeft?: (typeof styleVariables.positiveSizes)[number];
|
|
162
|
+
borderRadiusBottomRight?: (typeof styleVariables.positiveSizes)[number];
|
|
158
163
|
}
|
|
159
164
|
interface BoxCursor {
|
|
160
165
|
cursor?: CursorType;
|
|
@@ -172,7 +177,7 @@ interface BoxOpacity {
|
|
|
172
177
|
}
|
|
173
178
|
interface BoxFont {
|
|
174
179
|
fontSize?: FontSizeType;
|
|
175
|
-
lineHeight?: FontSizeType;
|
|
180
|
+
lineHeight?: FontSizeType | 'font-size';
|
|
176
181
|
fontWeight?: FontWeightType;
|
|
177
182
|
letterSpacing?: SizeType;
|
|
178
183
|
fontStyle?: FontStyleType;
|
|
@@ -204,6 +209,12 @@ interface BoxFlex {
|
|
|
204
209
|
alignSelf?: (typeof styleVariables.flexSelf)[number];
|
|
205
210
|
justifySelf?: (typeof styleVariables.flexSelf)[number];
|
|
206
211
|
}
|
|
212
|
+
interface BoxGrid {
|
|
213
|
+
gridColumns?: (typeof styleVariables.gridColumns)[number];
|
|
214
|
+
colSpan?: (typeof styleVariables.gridColumns)[number] | 'full-row';
|
|
215
|
+
colStart?: (typeof styleVariables.gridColumns)[number];
|
|
216
|
+
colEnd?: (typeof styleVariables.gridColumns)[number];
|
|
217
|
+
}
|
|
207
218
|
interface BoxTransition {
|
|
208
219
|
transition?: TransitionType;
|
|
209
220
|
}
|
|
@@ -216,7 +227,7 @@ interface BoxAppearance {
|
|
|
216
227
|
interface BoxPointerEvents {
|
|
217
228
|
pointerEvents?: PointerEventsType;
|
|
218
229
|
}
|
|
219
|
-
type BoxNormalStyles = BoxPseudoClasses & BoxDisplay & BoxSizing & BoxPosition & BoxSize & BoxMargin & BoxPadding & BoxBorder & BoxCursor & BoxZIndex & BoxOverflow & BoxOpacity & BoxFont & BoxText & BoxFlex & BoxOutline & BoxTransition & BoxUserSelect & BoxAppearance & BoxPointerEvents;
|
|
230
|
+
type BoxNormalStyles = BoxPseudoClasses & BoxDisplay & BoxSizing & BoxPosition & BoxSize & BoxMargin & BoxPadding & BoxBorder & BoxCursor & BoxZIndex & BoxOverflow & BoxOpacity & BoxFont & BoxText & BoxFlex & BoxOutline & BoxTransition & BoxUserSelect & BoxAppearance & BoxPointerEvents & BoxGrid;
|
|
220
231
|
export declare namespace Augmented {
|
|
221
232
|
interface BoxProps {
|
|
222
233
|
}
|
package/utils/utils.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const g=require("react"),C={hover:"_h",focus:"_f",shadow:"shadow_",shadowH:"shadow_h_",shadowF:"shadow_f_",shadowA:"shadow_a_",background:"bg_",backgroundH:"bg_h_",backgroundF:"bg_f_",backgroundA:"bg_a_",bg:"bg_",bgH:"bg_h_",bgF:"bg_f_",bgA:"bg_a_",color:"color_",colorH:"color_h_",colorF:"color_f_",colorA:"color_a_",backgroundColor:"bgColor_",backgroundColorH:"bgColor_h_",backgroundColorF:"bgColor_f_",backgroundColorA:"bgColor_a_",bgColor:"bgColor_",bgColorH:"bgColor_h_",bgColorF:"bgColor_f_",bgColorA:"bgColor_a_",borderColor:"borderColor_",borderColorH:"borderColor_h_",borderColorF:"borderColor_f_",borderColorA:"borderColor_a_",outlineColor:"outlineColor_",outlineColorH:"outlineColor_h_",outlineColorF:"outlineColor_f_",outlineColorA:"outlineColor_a_"},p={fill:"fill_",fillH:"fill_h_",fillF:"fill_f_",fillA:"fill_a_",stroke:"stroke_",strokeH:"stroke_h_",strokeF:"stroke_f_",strokeA:"stroke_a_"};var h;(c=>{function l(...i){return i.reduce((e,s)=>s?typeof s=="string"?(e.push(s),e):Array.isArray(s)?(e.push(...l(...s)),e):(Object.entries(s).forEach(([r,t])=>{t&&e.push(r)}),e):e,[])}c.classNames=l})(h||(h={}));const F=h;class m{constructor(){this._index=0,this._cache={}}getIdentity(l){return this._cache[l]||(this._cache[l]=this.getByIndex(this._index++)),this._cache[l]}getByIndex(l){const{first:i,next:e}=y,s=l-i.length;if(s<0)return i[l];const r=Math.floor(s/e.length),t=s-r*e.length;return this.getByIndex(r)+e[t]}}const y={first:"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",next:"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"};var f;(c=>{function l(e,...s){const r={...e},t={};return s.forEach(o=>{o in r&&(t[o]=r[o],delete r[o])}),[t,r]}c.moveToTagProps=l;function i(e,s,r){const t={...e},o=t.props||{};return s.forEach(n=>{if(n in t){if(o[n]=t[n],n==="disabled")return;delete t[n]}}),r&&Object.entries(r).forEach(([n,u])=>{o[n]=u}),t.props=o,t}c.buildProps=i})(f||(f={}));const A=f;var b;(c=>{function l(e){const s=Array.from(e.elements).reduce((r,t)=>{const o=t.name;return o&&(r[o]||(r[o]=[]),r[o].push(t)),r},{});return Object.entries(s).reduce((r,[t,o])=>{if(o.length===1){const n=o[0];i(r,t,n.type==="checkbox"||n.type==="radio"?n.checked:n.value)}else{const n=o.reduce((u,_)=>(_.type==="checkbox"||_.type==="radio"?_.checked&&u.push(_.value):u.push(_.value),u),[]);i(r,t,n)}return r},{})}c.getFormEntries=l;function i(e,s,r){if(s.includes(".")){const t=s.split(".");let o=e;t.forEach((n,u)=>{if(t.length>u+1){const _=n.match(/^(.+)\[(\d)\]$/);if(_){const[,a,d]=_;o[a]=o[a]||[],o[a][d]=o[a][d]||{},o=o[a][d]}else o[n]=o[n]||{},o=o[n]}else o[n]=r})}else e[s]=r}})(b||(b={}));const k=b;function x(){return g.useMemo(()=>{const c="crono-box";let l=document.getElementById(c);return l||(l=document.createElement("div"),l.id=c,document.body.appendChild(l)),l},[])}exports.ClassNameUtils=F;exports.FormUtils=k;exports.IdentityFactory=m;exports.ObjectUtils=A;exports.themeClasses=C;exports.themeSvgClasses=p;exports.usePortalContainer=x;
|
package/utils/utils.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useMemo as
|
|
2
|
-
const
|
|
1
|
+
import { useMemo as g } from "react";
|
|
2
|
+
const F = {
|
|
3
3
|
hover: "_h",
|
|
4
4
|
focus: "_f",
|
|
5
5
|
shadow: "shadow_",
|
|
@@ -34,7 +34,7 @@ const p = {
|
|
|
34
34
|
outlineColorH: "outlineColor_h_",
|
|
35
35
|
outlineColorF: "outlineColor_f_",
|
|
36
36
|
outlineColorA: "outlineColor_a_"
|
|
37
|
-
},
|
|
37
|
+
}, m = {
|
|
38
38
|
fill: "fill_",
|
|
39
39
|
fillH: "fill_h_",
|
|
40
40
|
fillF: "fill_f_",
|
|
@@ -44,91 +44,111 @@ const p = {
|
|
|
44
44
|
strokeF: "stroke_f_",
|
|
45
45
|
strokeA: "stroke_a_"
|
|
46
46
|
};
|
|
47
|
-
var
|
|
48
|
-
((
|
|
49
|
-
function
|
|
50
|
-
return
|
|
51
|
-
|
|
52
|
-
}),
|
|
47
|
+
var h;
|
|
48
|
+
((c) => {
|
|
49
|
+
function l(...i) {
|
|
50
|
+
return i.reduce((e, n) => n ? typeof n == "string" ? (e.push(n), e) : Array.isArray(n) ? (e.push(...l(...n)), e) : (Object.entries(n).forEach(([r, t]) => {
|
|
51
|
+
t && e.push(r);
|
|
52
|
+
}), e) : e, []);
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
})(
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
(
|
|
59
|
-
|
|
60
|
-
const r = { ...l }, e = {};
|
|
61
|
-
return s.forEach((o) => {
|
|
62
|
-
o in r && (e[o] = r[o], delete r[o]);
|
|
63
|
-
}), [e, r];
|
|
54
|
+
c.classNames = l;
|
|
55
|
+
})(h || (h = {}));
|
|
56
|
+
const x = h;
|
|
57
|
+
class A {
|
|
58
|
+
constructor() {
|
|
59
|
+
this._index = 0, this._cache = {};
|
|
64
60
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
61
|
+
getIdentity(l) {
|
|
62
|
+
return this._cache[l] || (this._cache[l] = this.getByIndex(this._index++)), this._cache[l];
|
|
63
|
+
}
|
|
64
|
+
getByIndex(l) {
|
|
65
|
+
const { first: i, next: e } = C, n = l - i.length;
|
|
66
|
+
if (n < 0)
|
|
67
|
+
return i[l];
|
|
68
|
+
const r = Math.floor(n / e.length), t = n - r * e.length;
|
|
69
|
+
return this.getByIndex(r) + e[t];
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
const C = {
|
|
73
|
+
first: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
|
74
|
+
next: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
|
|
75
|
+
};
|
|
76
|
+
var f;
|
|
77
|
+
((c) => {
|
|
78
|
+
function l(e, ...n) {
|
|
79
|
+
const r = { ...e }, t = {};
|
|
80
|
+
return n.forEach((o) => {
|
|
81
|
+
o in r && (t[o] = r[o], delete r[o]);
|
|
82
|
+
}), [t, r];
|
|
83
|
+
}
|
|
84
|
+
c.moveToTagProps = l;
|
|
85
|
+
function i(e, n, r) {
|
|
86
|
+
const t = { ...e }, o = t.props || {};
|
|
87
|
+
return n.forEach((s) => {
|
|
88
|
+
if (s in t) {
|
|
89
|
+
if (o[s] = t[s], s === "disabled")
|
|
71
90
|
return;
|
|
72
|
-
delete
|
|
91
|
+
delete t[s];
|
|
73
92
|
}
|
|
74
|
-
}), r && Object.entries(r).forEach(([
|
|
75
|
-
o[
|
|
76
|
-
}),
|
|
93
|
+
}), r && Object.entries(r).forEach(([s, a]) => {
|
|
94
|
+
o[s] = a;
|
|
95
|
+
}), t.props = o, t;
|
|
77
96
|
}
|
|
78
|
-
|
|
79
|
-
})(
|
|
80
|
-
const
|
|
81
|
-
var
|
|
82
|
-
((
|
|
83
|
-
function
|
|
84
|
-
const
|
|
85
|
-
const o =
|
|
86
|
-
return o && (r[o] || (r[o] = []), r[o].push(
|
|
97
|
+
c.buildProps = i;
|
|
98
|
+
})(f || (f = {}));
|
|
99
|
+
const k = f;
|
|
100
|
+
var b;
|
|
101
|
+
((c) => {
|
|
102
|
+
function l(e) {
|
|
103
|
+
const n = Array.from(e.elements).reduce((r, t) => {
|
|
104
|
+
const o = t.name;
|
|
105
|
+
return o && (r[o] || (r[o] = []), r[o].push(t)), r;
|
|
87
106
|
}, {});
|
|
88
|
-
return Object.entries(
|
|
107
|
+
return Object.entries(n).reduce((r, [t, o]) => {
|
|
89
108
|
if (o.length === 1) {
|
|
90
|
-
const
|
|
91
|
-
|
|
109
|
+
const s = o[0];
|
|
110
|
+
i(r, t, s.type === "checkbox" || s.type === "radio" ? s.checked : s.value);
|
|
92
111
|
} else {
|
|
93
|
-
const
|
|
94
|
-
|
|
112
|
+
const s = o.reduce((a, _) => (_.type === "checkbox" || _.type === "radio" ? _.checked && a.push(_.value) : a.push(_.value), a), []);
|
|
113
|
+
i(r, t, s);
|
|
95
114
|
}
|
|
96
115
|
return r;
|
|
97
116
|
}, {});
|
|
98
117
|
}
|
|
99
|
-
|
|
100
|
-
function
|
|
101
|
-
if (
|
|
102
|
-
const
|
|
103
|
-
let o =
|
|
104
|
-
|
|
105
|
-
if (
|
|
106
|
-
const
|
|
107
|
-
if (
|
|
108
|
-
const [,
|
|
109
|
-
o[
|
|
118
|
+
c.getFormEntries = l;
|
|
119
|
+
function i(e, n, r) {
|
|
120
|
+
if (n.includes(".")) {
|
|
121
|
+
const t = n.split(".");
|
|
122
|
+
let o = e;
|
|
123
|
+
t.forEach((s, a) => {
|
|
124
|
+
if (t.length > a + 1) {
|
|
125
|
+
const _ = s.match(/^(.+)\[(\d)\]$/);
|
|
126
|
+
if (_) {
|
|
127
|
+
const [, u, d] = _;
|
|
128
|
+
o[u] = o[u] || [], o[u][d] = o[u][d] || {}, o = o[u][d];
|
|
110
129
|
} else
|
|
111
|
-
o[
|
|
130
|
+
o[s] = o[s] || {}, o = o[s];
|
|
112
131
|
} else
|
|
113
|
-
o[
|
|
132
|
+
o[s] = r;
|
|
114
133
|
});
|
|
115
134
|
} else
|
|
116
|
-
|
|
135
|
+
e[n] = r;
|
|
117
136
|
}
|
|
118
|
-
})(
|
|
119
|
-
const
|
|
120
|
-
function
|
|
121
|
-
return
|
|
122
|
-
const
|
|
123
|
-
let
|
|
124
|
-
return
|
|
137
|
+
})(b || (b = {}));
|
|
138
|
+
const y = b;
|
|
139
|
+
function I() {
|
|
140
|
+
return g(() => {
|
|
141
|
+
const c = "crono-box";
|
|
142
|
+
let l = document.getElementById(c);
|
|
143
|
+
return l || (l = document.createElement("div"), l.id = c, document.body.appendChild(l)), l;
|
|
125
144
|
}, []);
|
|
126
145
|
}
|
|
127
146
|
export {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
A as
|
|
131
|
-
|
|
132
|
-
F as
|
|
133
|
-
|
|
147
|
+
x as C,
|
|
148
|
+
y as F,
|
|
149
|
+
A as I,
|
|
150
|
+
k as O,
|
|
151
|
+
F as a,
|
|
152
|
+
m as t,
|
|
153
|
+
I as u
|
|
134
154
|
};
|
package/src/index.d.ts
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|