@progress/kendo-react-common 15.1.1-develop.3 → 15.2.0-develop.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/codemods/utils.js +4 -0
- package/dist/cdn/js/kendo-react-common.js +1 -1
- package/fileExtensionIcon.js +1 -1
- package/fileExtensionIcon.mjs +17 -15
- package/package.json +5 -1
- package/unstyled/dateinputs.js +1 -1
- package/unstyled/dateinputs.mjs +104 -108
- package/unstyled/inputs.d.ts +2 -0
- package/unstyled/inputs.js +1 -1
- package/unstyled/inputs.mjs +78 -76
- package/unstyled/labels.js +1 -1
- package/unstyled/labels.mjs +44 -43
package/unstyled/inputs.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("./interfaces/common.js"),e=require("./json-classes.js"),l=`${e.base.prefix}-${e.inputs.input}`,C=`${e.base.prefix}-${e.inputs.maskedtextbox}`,u=`${e.base.prefix}-${e.inputs.radio}`,g=`${e.base.prefix}-${e.inputs.textbox}`,f=`${e.base.prefix}-${e.inputs.input}-${e.inputs.prefix}`,x=`${e.base.prefix}-${e.inputs.input}-${e.inputs.suffix}`,c={input:{radio:u,size:{prefix:`${u}-`,small:`${u}-${e.sizeMap.small}`,medium:`${u}-${e.sizeMap.medium}`,large:`${u}-${e.sizeMap.large}`},disabled:`${e.base.prefix}-${e.states.disabled}`,invalid:`${e.base.prefix}-${e.states.invalid}`,checked:`${e.base.prefix}-${e.states.checked}`},wrap:`${u}-${e.containers.wrap}`,label:`${u}-${e.elements.label}`},h={input:o=>{var n;const{size:t,disabled:$,invalid:a,checked:d,c:r=c}=o,i=r.input;return{[i==null?void 0:i.radio]:!0,[i==null?void 0:i.size[t]]:i==null?void 0:i.size[t],[`${(n=i==null?void 0:i.size)==null?void 0:n.prefix}${t}`]:t&&!(i!=null&&i.size[t]),[i==null?void 0:i.disabled]:$,[i==null?void 0:i.invalid]:a,[i==null?void 0:i.checked]:d}},label:o=>{const{c:t=c}=o;return{[t==null?void 0:t.label]:!0}},wrap:o=>{const{c:t=c}=o;return{[t==null?void 0:t.wrap]:!0}}},m={ul:{main:`${u}-${e.containers.list}`,horizontal:`${e.base.prefix}-${e.containers.list}-${e.states.horizontal}`,vertical:`${e.base.prefix}-${e.containers.list}-${e.states.vertical}`},item:{main:`${u}-${e.containers.list}-${e.containers.item}`,disabled:`${e.base.prefix}-${e.states.disabled}`}},R={ul:o=>{const{horizontal:t,vertical:$,c:a=m}=o,d=a.ul;return{[d==null?void 0:d.main]:!0,[d==null?void 0:d.horizontal]:t,[d==null?void 0:d.vertical]:$}},item:o=>{const{disabled:t,c:$=m}=o,a=$.item;return{[a==null?void 0:a.main]:!0,[a==null?void 0:a.disabled]:t}}},p={wrapper:{main:C,input:l,size:{small:`${l}-${e.sizeMap.small}`,medium:`${l}-${e.sizeMap.medium}`,large:`${l}-${e.sizeMap.large}`},fillMode:{solid:`${l}-${e.fillModeMap.solid}`,outline:`${l}-${e.fillModeMap.outline}`,flat:`${l}-${e.fillModeMap.flat}`},rounded:{small:`${e.base.prefix}-${e.base.rounded}-${e.roundedMap.small}`,medium:`${e.base.prefix}-${e.base.rounded}-${e.roundedMap.medium}`,large:`${e.base.prefix}-${e.base.rounded}-${e.roundedMap.large}`},disabled:`${e.base.prefix}-${e.states.disabled}`,invalid:`${e.base.prefix}-${e.states.invalid}`,isRtl:`${e.base.prefix}-${e.base.rtl}`},inputInner:`${l}-${e.inputs.inner}`},q={wrapper:o=>{const{invalid:t,disabled:$,size:a,fillMode:d,rounded:r,c:i=p}=o,n=i.wrapper;return{[n.main]:!0,[n.input]:!0,[n.size[a]]:n.size[a],[`${l}-${a}`]:!n.size[a],[n.fillMode[d]]:n.fillMode[d],[n.rounded[r]]:n.rounded[r],[`${e.base.prefix}-${e.base.rounded}-${r}`]:r&&!n.rounded[r],[n.disabled]:$,[n.invalid]:t}},inputInner:M.getClassByName(p,"inputInner")},b={wrapper:{main:g,input:l,size:{small:`${l}-${e.sizeMap.small}`,medium:`${l}-${e.sizeMap.medium}`,large:`${l}-${e.sizeMap.large}`},fillMode:{solid:`${l}-${e.fillModeMap.solid}`,outline:`${l}-${e.fillModeMap.outline}`,flat:`${l}-${e.fillModeMap.flat}`},rounded:{small:`${e.base.prefix}-${e.base.rounded}-${e.roundedMap.small}`,medium:`${e.base.prefix}-${e.base.rounded}-${e.roundedMap.medium}`,large:`${e.base.prefix}-${e.base.rounded}-${e.roundedMap.large}`},disabled:`${e.base.prefix}-${e.states.disabled}`,focused:`${e.base.prefix}-${e.states.focus}`,required:`${e.base.prefix}-${e.states.required}`,invalid:`${e.base.prefix}-${e.states.invalid}`,isRtl:`${e.base.prefix}-${e.base.rtl}`},inputInner:`${l}-${e.inputs.inner}`,prefix:{main:f,orientation:{horizontal:`${f}-${e.orientationMap.horizontal}`,vertical:`${f}-${e.orientationMap.vertical}`}},suffix:{main:x,orientation:{horizontal:`${x}-${e.orientationMap.horizontal}`,vertical:`${x}-${e.orientationMap.vertical}`}}},k={wrapper:o=>{const{disabled:t,invalid:$,focused:a,required:d,size:r,fillMode:i,rounded:n,isRtl:v,c:B=b}=o,s=B.wrapper;return{[s==null?void 0:s.main]:!0,[s==null?void 0:s.input]:!0,[s==null?void 0:s.size[r]]:s==null?void 0:s.size[r],[`${l}-${r}`]:r&&!(s!=null&&s.size[r]),[s==null?void 0:s.fillMode[i]]:s==null?void 0:s.fillMode[i],[s==null?void 0:s.rounded[n]]:s==null?void 0:s.rounded[n],[`${e.base.prefix}-${e.base.rounded}-${n}`]:n&&!(s!=null&&s.rounded[n]),[s==null?void 0:s.disabled]:t,[s==null?void 0:s.focused]:a,[s==null?void 0:s.required]:d,[s==null?void 0:s.invalid]:$,[s==null?void 0:s.isRtl]:v}},inputInner:M.getClassByName(b,"inputInner"),prefix:o=>{const{orientation:t,c:$=b}=o,a=$.prefix;return{[a.main]:!0,[a.orientation[t]]:a.orientation[t]}},suffix:o=>{const{orientation:t,c:$=b}=o,a=$.suffix;return{[a==null?void 0:a.main]:!0,[a==null?void 0:a.orientation[t]]:a==null?void 0:a.orientation[t]}}},z={input:{main:`${l} ${l}-${e.sizeMap.medium} ${e.base.prefix}-${e.base.rounded}-${e.roundedMap.medium} ${l}-${e.fillModeMap.solid}`,disabled:`${e.base.prefix}-${e.states.disabled}`,required:`${e.base.prefix}-${e.states.required}`,invalid:`${e.base.prefix}-${e.states.invalid}`,isRtl:`${e.base.prefix}-${e.base.rtl}`},clearButton:`${e.base.prefix}-${e.base.clear}-${e.base.value}`},T={input:o=>{const{disabled:t,invalid:$,required:a,isRtl:d,c:r=z}=o,i=r.input;return{[i==null?void 0:i.main]:!0,[i==null?void 0:i.disabled]:t,[i==null?void 0:i.required]:a,[i==null?void 0:i.invalid]:$,[i==null?void 0:i.isRtl]:d}},clearButton:M.getClassByName(z,"clearButton")};exports.radioButtonClasses=c;exports.radioGroupClasses=m;exports.uInput=T;exports.uMaskedTextBox=q;exports.uRadioButton=h;exports.uRadioGroup=R;exports.uTextBox=k;
|
package/unstyled/inputs.mjs
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { getClassByName as
|
|
9
|
-
import { base as i, inputs as f, elements as G, containers as
|
|
10
|
-
const s = `${i.prefix}-${f.input}`, y = `${i.prefix}-${f.maskedtextbox}`, m = `${i.prefix}-${f.radio}`, N = `${i.prefix}-${f.textbox}`, h = `${i.prefix}-${f.input}-${f.prefix}`,
|
|
8
|
+
import { getClassByName as p } from "./interfaces/common.mjs";
|
|
9
|
+
import { base as i, inputs as f, elements as G, containers as v, states as u, sizeMap as c, roundedMap as x, fillModeMap as b, orientationMap as z } from "./json-classes.mjs";
|
|
10
|
+
const s = `${i.prefix}-${f.input}`, y = `${i.prefix}-${f.maskedtextbox}`, m = `${i.prefix}-${f.radio}`, N = `${i.prefix}-${f.textbox}`, h = `${i.prefix}-${f.input}-${f.prefix}`, C = `${i.prefix}-${f.input}-${f.suffix}`, g = {
|
|
11
11
|
input: {
|
|
12
12
|
radio: m,
|
|
13
13
|
size: {
|
|
@@ -16,59 +16,61 @@ const s = `${i.prefix}-${f.input}`, y = `${i.prefix}-${f.maskedtextbox}`, m = `$
|
|
|
16
16
|
medium: `${m}-${c.medium}`,
|
|
17
17
|
large: `${m}-${c.large}`
|
|
18
18
|
},
|
|
19
|
+
disabled: `${i.prefix}-${u.disabled}`,
|
|
19
20
|
invalid: `${i.prefix}-${u.invalid}`,
|
|
20
21
|
checked: `${i.prefix}-${u.checked}`
|
|
21
22
|
},
|
|
22
|
-
wrap: `${m}-${
|
|
23
|
+
wrap: `${m}-${v.wrap}`,
|
|
23
24
|
label: `${m}-${G.label}`
|
|
24
25
|
}, j = {
|
|
25
26
|
input: (d) => {
|
|
26
|
-
var
|
|
27
|
-
const { size:
|
|
27
|
+
var t;
|
|
28
|
+
const { size: $, disabled: r, invalid: n, checked: o, c: a = g } = d, e = a.input;
|
|
28
29
|
return {
|
|
29
|
-
[
|
|
30
|
-
[
|
|
31
|
-
[`${(
|
|
32
|
-
[
|
|
33
|
-
[
|
|
30
|
+
[e == null ? void 0 : e.radio]: !0,
|
|
31
|
+
[e == null ? void 0 : e.size[$]]: e == null ? void 0 : e.size[$],
|
|
32
|
+
[`${(t = e == null ? void 0 : e.size) == null ? void 0 : t.prefix}${$}`]: $ && !(e != null && e.size[$]),
|
|
33
|
+
[e == null ? void 0 : e.disabled]: r,
|
|
34
|
+
[e == null ? void 0 : e.invalid]: n,
|
|
35
|
+
[e == null ? void 0 : e.checked]: o
|
|
34
36
|
};
|
|
35
37
|
},
|
|
36
38
|
label: (d) => {
|
|
37
|
-
const { c:
|
|
39
|
+
const { c: $ = g } = d;
|
|
38
40
|
return {
|
|
39
|
-
[
|
|
41
|
+
[$ == null ? void 0 : $.label]: !0
|
|
40
42
|
};
|
|
41
43
|
},
|
|
42
44
|
wrap: (d) => {
|
|
43
|
-
const { c:
|
|
45
|
+
const { c: $ = g } = d;
|
|
44
46
|
return {
|
|
45
|
-
[
|
|
47
|
+
[$ == null ? void 0 : $.wrap]: !0
|
|
46
48
|
};
|
|
47
49
|
}
|
|
48
50
|
}, B = {
|
|
49
51
|
ul: {
|
|
50
|
-
main: `${m}-${
|
|
51
|
-
horizontal: `${i.prefix}-${
|
|
52
|
-
vertical: `${i.prefix}-${
|
|
52
|
+
main: `${m}-${v.list}`,
|
|
53
|
+
horizontal: `${i.prefix}-${v.list}-${u.horizontal}`,
|
|
54
|
+
vertical: `${i.prefix}-${v.list}-${u.vertical}`
|
|
53
55
|
},
|
|
54
56
|
item: {
|
|
55
|
-
main: `${m}-${
|
|
57
|
+
main: `${m}-${v.list}-${v.item}`,
|
|
56
58
|
disabled: `${i.prefix}-${u.disabled}`
|
|
57
59
|
}
|
|
58
60
|
}, A = {
|
|
59
61
|
ul: (d) => {
|
|
60
|
-
const { horizontal:
|
|
62
|
+
const { horizontal: $, vertical: r, c: n = B } = d, o = n.ul;
|
|
61
63
|
return {
|
|
62
64
|
[o == null ? void 0 : o.main]: !0,
|
|
63
|
-
[o == null ? void 0 : o.horizontal]:
|
|
64
|
-
[o == null ? void 0 : o.vertical]:
|
|
65
|
+
[o == null ? void 0 : o.horizontal]: $,
|
|
66
|
+
[o == null ? void 0 : o.vertical]: r
|
|
65
67
|
};
|
|
66
68
|
},
|
|
67
69
|
item: (d) => {
|
|
68
|
-
const { disabled:
|
|
70
|
+
const { disabled: $, c: r = B } = d, n = r.item;
|
|
69
71
|
return {
|
|
70
|
-
[
|
|
71
|
-
[
|
|
72
|
+
[n == null ? void 0 : n.main]: !0,
|
|
73
|
+
[n == null ? void 0 : n.disabled]: $
|
|
72
74
|
};
|
|
73
75
|
}
|
|
74
76
|
}, R = {
|
|
@@ -81,9 +83,9 @@ const s = `${i.prefix}-${f.input}`, y = `${i.prefix}-${f.maskedtextbox}`, m = `$
|
|
|
81
83
|
large: `${s}-${c.large}`
|
|
82
84
|
},
|
|
83
85
|
fillMode: {
|
|
84
|
-
solid: `${s}-${
|
|
85
|
-
outline: `${s}-${
|
|
86
|
-
flat: `${s}-${
|
|
86
|
+
solid: `${s}-${b.solid}`,
|
|
87
|
+
outline: `${s}-${b.outline}`,
|
|
88
|
+
flat: `${s}-${b.flat}`
|
|
87
89
|
},
|
|
88
90
|
rounded: {
|
|
89
91
|
small: `${i.prefix}-${i.rounded}-${x.small}`,
|
|
@@ -97,20 +99,20 @@ const s = `${i.prefix}-${f.input}`, y = `${i.prefix}-${f.maskedtextbox}`, m = `$
|
|
|
97
99
|
inputInner: `${s}-${f.inner}`
|
|
98
100
|
}, D = {
|
|
99
101
|
wrapper: (d) => {
|
|
100
|
-
const { invalid:
|
|
102
|
+
const { invalid: $, disabled: r, size: n, fillMode: o, rounded: a, c: e = R } = d, t = e.wrapper;
|
|
101
103
|
return {
|
|
102
|
-
[
|
|
103
|
-
[
|
|
104
|
-
[
|
|
105
|
-
[`${s}-${
|
|
106
|
-
[
|
|
107
|
-
[
|
|
108
|
-
[`${i.prefix}-${i.rounded}-${
|
|
109
|
-
[
|
|
110
|
-
[
|
|
104
|
+
[t.main]: !0,
|
|
105
|
+
[t.input]: !0,
|
|
106
|
+
[t.size[n]]: t.size[n],
|
|
107
|
+
[`${s}-${n}`]: !t.size[n],
|
|
108
|
+
[t.fillMode[o]]: t.fillMode[o],
|
|
109
|
+
[t.rounded[a]]: t.rounded[a],
|
|
110
|
+
[`${i.prefix}-${i.rounded}-${a}`]: a && !t.rounded[a],
|
|
111
|
+
[t.disabled]: r,
|
|
112
|
+
[t.invalid]: $
|
|
111
113
|
};
|
|
112
114
|
},
|
|
113
|
-
inputInner:
|
|
115
|
+
inputInner: p(R, "inputInner")
|
|
114
116
|
}, M = {
|
|
115
117
|
wrapper: {
|
|
116
118
|
main: N,
|
|
@@ -121,9 +123,9 @@ const s = `${i.prefix}-${f.input}`, y = `${i.prefix}-${f.maskedtextbox}`, m = `$
|
|
|
121
123
|
large: `${s}-${c.large}`
|
|
122
124
|
},
|
|
123
125
|
fillMode: {
|
|
124
|
-
solid: `${s}-${
|
|
125
|
-
outline: `${s}-${
|
|
126
|
-
flat: `${s}-${
|
|
126
|
+
solid: `${s}-${b.solid}`,
|
|
127
|
+
outline: `${s}-${b.outline}`,
|
|
128
|
+
flat: `${s}-${b.flat}`
|
|
127
129
|
},
|
|
128
130
|
rounded: {
|
|
129
131
|
small: `${i.prefix}-${i.rounded}-${x.small}`,
|
|
@@ -140,53 +142,53 @@ const s = `${i.prefix}-${f.input}`, y = `${i.prefix}-${f.maskedtextbox}`, m = `$
|
|
|
140
142
|
prefix: {
|
|
141
143
|
main: h,
|
|
142
144
|
orientation: {
|
|
143
|
-
horizontal: `${h}-${
|
|
144
|
-
vertical: `${h}-${
|
|
145
|
+
horizontal: `${h}-${z.horizontal}`,
|
|
146
|
+
vertical: `${h}-${z.vertical}`
|
|
145
147
|
}
|
|
146
148
|
},
|
|
147
149
|
suffix: {
|
|
148
|
-
main:
|
|
150
|
+
main: C,
|
|
149
151
|
orientation: {
|
|
150
|
-
horizontal: `${
|
|
151
|
-
vertical: `${
|
|
152
|
+
horizontal: `${C}-${z.horizontal}`,
|
|
153
|
+
vertical: `${C}-${z.vertical}`
|
|
152
154
|
}
|
|
153
155
|
}
|
|
154
156
|
}, E = {
|
|
155
157
|
wrapper: (d) => {
|
|
156
|
-
const { disabled:
|
|
158
|
+
const { disabled: $, invalid: r, focused: n, required: o, size: a, fillMode: e, rounded: t, isRtl: q, c: T = M } = d, l = T.wrapper;
|
|
157
159
|
return {
|
|
158
|
-
[
|
|
159
|
-
[
|
|
160
|
-
[
|
|
161
|
-
[`${s}-${
|
|
162
|
-
[
|
|
163
|
-
[
|
|
164
|
-
[`${i.prefix}-${i.rounded}-${
|
|
165
|
-
[
|
|
166
|
-
[
|
|
167
|
-
[
|
|
168
|
-
[
|
|
169
|
-
[
|
|
160
|
+
[l == null ? void 0 : l.main]: !0,
|
|
161
|
+
[l == null ? void 0 : l.input]: !0,
|
|
162
|
+
[l == null ? void 0 : l.size[a]]: l == null ? void 0 : l.size[a],
|
|
163
|
+
[`${s}-${a}`]: a && !(l != null && l.size[a]),
|
|
164
|
+
[l == null ? void 0 : l.fillMode[e]]: l == null ? void 0 : l.fillMode[e],
|
|
165
|
+
[l == null ? void 0 : l.rounded[t]]: l == null ? void 0 : l.rounded[t],
|
|
166
|
+
[`${i.prefix}-${i.rounded}-${t}`]: t && !(l != null && l.rounded[t]),
|
|
167
|
+
[l == null ? void 0 : l.disabled]: $,
|
|
168
|
+
[l == null ? void 0 : l.focused]: n,
|
|
169
|
+
[l == null ? void 0 : l.required]: o,
|
|
170
|
+
[l == null ? void 0 : l.invalid]: r,
|
|
171
|
+
[l == null ? void 0 : l.isRtl]: q
|
|
170
172
|
};
|
|
171
173
|
},
|
|
172
|
-
inputInner:
|
|
174
|
+
inputInner: p(M, "inputInner"),
|
|
173
175
|
prefix: (d) => {
|
|
174
|
-
const { orientation:
|
|
176
|
+
const { orientation: $, c: r = M } = d, n = r.prefix;
|
|
175
177
|
return {
|
|
176
|
-
[
|
|
177
|
-
[
|
|
178
|
+
[n.main]: !0,
|
|
179
|
+
[n.orientation[$]]: n.orientation[$]
|
|
178
180
|
};
|
|
179
181
|
},
|
|
180
182
|
suffix: (d) => {
|
|
181
|
-
const { orientation:
|
|
183
|
+
const { orientation: $, c: r = M } = d, n = r.suffix;
|
|
182
184
|
return {
|
|
183
|
-
[
|
|
184
|
-
[
|
|
185
|
+
[n == null ? void 0 : n.main]: !0,
|
|
186
|
+
[n == null ? void 0 : n.orientation[$]]: n == null ? void 0 : n.orientation[$]
|
|
185
187
|
};
|
|
186
188
|
}
|
|
187
189
|
}, k = {
|
|
188
190
|
input: {
|
|
189
|
-
main: `${s} ${s}-${c.medium} ${i.prefix}-${i.rounded}-${x.medium} ${s}-${
|
|
191
|
+
main: `${s} ${s}-${c.medium} ${i.prefix}-${i.rounded}-${x.medium} ${s}-${b.solid}`,
|
|
190
192
|
disabled: `${i.prefix}-${u.disabled}`,
|
|
191
193
|
required: `${i.prefix}-${u.required}`,
|
|
192
194
|
invalid: `${i.prefix}-${u.invalid}`,
|
|
@@ -195,19 +197,19 @@ const s = `${i.prefix}-${f.input}`, y = `${i.prefix}-${f.maskedtextbox}`, m = `$
|
|
|
195
197
|
clearButton: `${i.prefix}-${i.clear}-${i.value}`
|
|
196
198
|
}, F = {
|
|
197
199
|
input: (d) => {
|
|
198
|
-
const { disabled:
|
|
200
|
+
const { disabled: $, invalid: r, required: n, isRtl: o, c: a = k } = d, e = a.input;
|
|
199
201
|
return {
|
|
200
|
-
[
|
|
201
|
-
[
|
|
202
|
-
[
|
|
203
|
-
[
|
|
204
|
-
[
|
|
202
|
+
[e == null ? void 0 : e.main]: !0,
|
|
203
|
+
[e == null ? void 0 : e.disabled]: $,
|
|
204
|
+
[e == null ? void 0 : e.required]: n,
|
|
205
|
+
[e == null ? void 0 : e.invalid]: r,
|
|
206
|
+
[e == null ? void 0 : e.isRtl]: o
|
|
205
207
|
};
|
|
206
208
|
},
|
|
207
|
-
clearButton:
|
|
209
|
+
clearButton: p(k, "clearButton")
|
|
208
210
|
};
|
|
209
211
|
export {
|
|
210
|
-
|
|
212
|
+
g as radioButtonClasses,
|
|
211
213
|
B as radioGroupClasses,
|
|
212
214
|
F as uInput,
|
|
213
215
|
D as uMaskedTextBox,
|
package/unstyled/labels.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./json-classes.js"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./json-classes.js"),b=`${e.base.prefix}-${e.labels.label}`,r=`${e.base.prefix}-${e.labels.floatingLabel}`,$=`${e.base.prefix}-${e.labels.error}`,m=`${e.base.prefix}-${e.labels.hint}`,f={label:{main:b,empty:`${e.base.prefix}-${e.labels.label}-${e.states.empty}`,invalid:`${e.base.prefix}-${e.labels.text}-${e.themeColorMap.error}`,disabled:`${e.base.prefix}-${e.states.disabled}`}},u={label:o=>{const{empty:n,invalid:d,disabled:a,c:i=f}=o,s=i.label;return{[s==null?void 0:s.main]:!0,[s==null?void 0:s.empty]:n,[s==null?void 0:s.invalid]:d,[s==null?void 0:s.disabled]:a}}},c={wrapper:{main:`${r}-${e.labels.container}`,focused:`${e.base.prefix}-${e.states.focus}`,empty:`${e.base.prefix}-${e.states.empty}`,notEmpty:"",disabled:`${e.base.prefix}-${e.states.disabled}`,isRtl:`${e.base.prefix}-${e.base.rtl}`},label:{main:r,focused:"",empty:"",notEmpty:"",invalid:`${e.base.prefix}-${e.labels.text}-${e.themeColorMap.error}`,disabled:`${e.base.prefix}-${e.states.disabled}`}},x={wrapper:o=>{const{focused:n,empty:d,notEmpty:a,disabled:i,isRtl:s,c:l=c}=o,t=l.wrapper;return{[t==null?void 0:t.main]:!0,[t==null?void 0:t.focused]:n,[t==null?void 0:t.empty]:d,[t==null?void 0:t.notEmpty]:a,[t==null?void 0:t.disabled]:i,[t==null?void 0:t.isRtl]:s}},label:o=>{const{focused:n,empty:d,notEmpty:a,invalid:i,disabled:s,c:l=c}=o,t=l.label;return{[t==null?void 0:t.main]:!0,[t==null?void 0:t.focused]:n,[t==null?void 0:t.empty]:d,[t==null?void 0:t.notEmpty]:a,[t==null?void 0:t.invalid]:i,[t==null?void 0:t.disabled]:s}}},y={wrapper:{main:$,direction:{start:`${e.base.prefix}-${e.labels.text}-${e.directionMap.start}`,end:`${e.base.prefix}-${e.labels.text}-${e.directionMap.end}`}}},p={wrapper:o=>{const{direction:n,c:d=y}=o,a=d.wrapper;return{[a==null?void 0:a.main]:!0,[a==null?void 0:a.direction[n]]:a==null?void 0:a.direction[n]}}},C={wrapper:{main:m,direction:{start:`${e.base.prefix}-${e.labels.text}-${e.directionMap.start}`,end:`${e.base.prefix}-${e.labels.text}-${e.directionMap.end}`,disabled:`${e.base.prefix}-${e.states.disabled}`}}},E={wrapper:o=>{var s;const{direction:n,disabled:d,c:a=C}=o,i=a.wrapper;return{[i==null?void 0:i.main]:!0,[i==null?void 0:i.direction[n]]:i==null?void 0:i.direction[n],[(s=i==null?void 0:i.direction)==null?void 0:s.disabled]:d}}};exports.uError=p;exports.uFloatingLabel=x;exports.uHint=E;exports.uLabel=u;
|
package/unstyled/labels.mjs
CHANGED
|
@@ -5,96 +5,97 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { base as
|
|
9
|
-
const u = `${
|
|
8
|
+
import { base as e, labels as o, directionMap as a, states as r, themeColorMap as x } from "./json-classes.mjs";
|
|
9
|
+
const u = `${e.prefix}-${o.label}`, m = `${e.prefix}-${o.floatingLabel}`, y = `${e.prefix}-${o.error}`, b = `${e.prefix}-${o.hint}`, p = {
|
|
10
10
|
label: {
|
|
11
11
|
main: u,
|
|
12
|
-
empty: `${
|
|
13
|
-
invalid: `${
|
|
14
|
-
disabled: `${
|
|
12
|
+
empty: `${e.prefix}-${o.label}-${r.empty}`,
|
|
13
|
+
invalid: `${e.prefix}-${o.text}-${x.error}`,
|
|
14
|
+
disabled: `${e.prefix}-${r.disabled}`
|
|
15
15
|
}
|
|
16
16
|
}, L = {
|
|
17
|
-
label: (
|
|
18
|
-
const { empty: d, invalid:
|
|
17
|
+
label: (c) => {
|
|
18
|
+
const { empty: d, invalid: $, disabled: n, c: s = p } = c, i = s.label;
|
|
19
19
|
return {
|
|
20
|
-
[
|
|
21
|
-
[
|
|
22
|
-
[
|
|
23
|
-
[
|
|
20
|
+
[i == null ? void 0 : i.main]: !0,
|
|
21
|
+
[i == null ? void 0 : i.empty]: d,
|
|
22
|
+
[i == null ? void 0 : i.invalid]: $,
|
|
23
|
+
[i == null ? void 0 : i.disabled]: n
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
}, f = {
|
|
27
27
|
wrapper: {
|
|
28
28
|
main: `${m}-${o.container}`,
|
|
29
|
-
focused: `${
|
|
30
|
-
empty: `${
|
|
29
|
+
focused: `${e.prefix}-${r.focus}`,
|
|
30
|
+
empty: `${e.prefix}-${r.empty}`,
|
|
31
31
|
notEmpty: "",
|
|
32
|
-
disabled: `${
|
|
33
|
-
isRtl: `${
|
|
32
|
+
disabled: `${e.prefix}-${r.disabled}`,
|
|
33
|
+
isRtl: `${e.prefix}-${e.rtl}`
|
|
34
34
|
},
|
|
35
35
|
label: {
|
|
36
36
|
main: m,
|
|
37
37
|
focused: "",
|
|
38
38
|
empty: "",
|
|
39
39
|
notEmpty: "",
|
|
40
|
-
invalid: `${
|
|
41
|
-
disabled: `${
|
|
40
|
+
invalid: `${e.prefix}-${o.text}-${x.error}`,
|
|
41
|
+
disabled: `${e.prefix}-${r.disabled}`
|
|
42
42
|
}
|
|
43
43
|
}, g = {
|
|
44
|
-
wrapper: (
|
|
45
|
-
const { focused: d, empty:
|
|
44
|
+
wrapper: (c) => {
|
|
45
|
+
const { focused: d, empty: $, notEmpty: n, disabled: s, isRtl: i, c: l = f } = c, t = l.wrapper;
|
|
46
46
|
return {
|
|
47
47
|
[t == null ? void 0 : t.main]: !0,
|
|
48
48
|
[t == null ? void 0 : t.focused]: d,
|
|
49
|
-
[t == null ? void 0 : t.empty]:
|
|
50
|
-
[t == null ? void 0 : t.notEmpty]:
|
|
51
|
-
[t == null ? void 0 : t.disabled]:
|
|
52
|
-
[t == null ? void 0 : t.isRtl]:
|
|
49
|
+
[t == null ? void 0 : t.empty]: $,
|
|
50
|
+
[t == null ? void 0 : t.notEmpty]: n,
|
|
51
|
+
[t == null ? void 0 : t.disabled]: s,
|
|
52
|
+
[t == null ? void 0 : t.isRtl]: i
|
|
53
53
|
};
|
|
54
54
|
},
|
|
55
|
-
label: (
|
|
56
|
-
const { focused: d, empty:
|
|
55
|
+
label: (c) => {
|
|
56
|
+
const { focused: d, empty: $, notEmpty: n, invalid: s, disabled: i, c: l = f } = c, t = l.label;
|
|
57
57
|
return {
|
|
58
58
|
[t == null ? void 0 : t.main]: !0,
|
|
59
59
|
[t == null ? void 0 : t.focused]: d,
|
|
60
|
-
[t == null ? void 0 : t.empty]:
|
|
61
|
-
[t == null ? void 0 : t.notEmpty]:
|
|
62
|
-
[t == null ? void 0 : t.invalid]:
|
|
63
|
-
[t == null ? void 0 : t.disabled]:
|
|
60
|
+
[t == null ? void 0 : t.empty]: $,
|
|
61
|
+
[t == null ? void 0 : t.notEmpty]: n,
|
|
62
|
+
[t == null ? void 0 : t.invalid]: s,
|
|
63
|
+
[t == null ? void 0 : t.disabled]: i
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
}, C = {
|
|
67
67
|
wrapper: {
|
|
68
68
|
main: y,
|
|
69
69
|
direction: {
|
|
70
|
-
start: `${
|
|
71
|
-
end: `${
|
|
70
|
+
start: `${e.prefix}-${o.text}-${a.start}`,
|
|
71
|
+
end: `${e.prefix}-${o.text}-${a.end}`
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
}, h = {
|
|
75
|
-
wrapper: (
|
|
76
|
-
const { direction: d, c = C } =
|
|
75
|
+
wrapper: (c) => {
|
|
76
|
+
const { direction: d, c: $ = C } = c, n = $.wrapper;
|
|
77
77
|
return {
|
|
78
|
-
[
|
|
79
|
-
[
|
|
78
|
+
[n == null ? void 0 : n.main]: !0,
|
|
79
|
+
[n == null ? void 0 : n.direction[d]]: n == null ? void 0 : n.direction[d]
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
82
|
}, E = {
|
|
83
83
|
wrapper: {
|
|
84
84
|
main: b,
|
|
85
85
|
direction: {
|
|
86
|
-
start: `${
|
|
87
|
-
end: `${
|
|
88
|
-
disabled: `${
|
|
86
|
+
start: `${e.prefix}-${o.text}-${a.start}`,
|
|
87
|
+
end: `${e.prefix}-${o.text}-${a.end}`,
|
|
88
|
+
disabled: `${e.prefix}-${r.disabled}`
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
}, R = {
|
|
92
|
-
wrapper: (
|
|
93
|
-
|
|
92
|
+
wrapper: (c) => {
|
|
93
|
+
var i;
|
|
94
|
+
const { direction: d, disabled: $, c: n = E } = c, s = n.wrapper;
|
|
94
95
|
return {
|
|
95
|
-
[
|
|
96
|
-
[
|
|
97
|
-
[
|
|
96
|
+
[s == null ? void 0 : s.main]: !0,
|
|
97
|
+
[s == null ? void 0 : s.direction[d]]: s == null ? void 0 : s.direction[d],
|
|
98
|
+
[(i = s == null ? void 0 : s.direction) == null ? void 0 : i.disabled]: $
|
|
98
99
|
};
|
|
99
100
|
}
|
|
100
101
|
};
|