@arthurzakharov/ui-kit 1.9.6 → 1.9.7
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._FormRow_1cyhm_1{display:flex;flex-direction:column;align-items:stretch}._XXS_1cyhm_7{gap:var(--rm-ui-padding-xxs);--rm-form-row-gap: var(--rm-ui-padding-xxs)}._XS_1cyhm_12{gap:var(--rm-ui-padding-xs);--rm-form-row-gap: var(--rm-ui-padding-xs)}._SM_1cyhm_17{gap:var(--rm-ui-padding-sm);--rm-form-row-gap: var(--rm-ui-padding-sm)}._MD_1cyhm_22{gap:var(--rm-ui-padding-md);--rm-form-row-gap: var(--rm-ui-padding-md)}._LG_1cyhm_27,._XL_1cyhm_32{gap:var(--rm-ui-padding-xl);--rm-form-row-gap: var(--rm-ui-padding-xl)}._XXL_1cyhm_37{gap:var(--rm-ui-padding-xxl);--rm-form-row-gap: var(--rm-ui-padding-xxl)}._XXXL_1cyhm_42{gap:var(--rm-ui-padding-xxxl);--rm-form-row-gap: var(--rm-ui-padding-xxxl)}@media screen and (min-width:768px){._FormRow_1cyhm_1{flex-direction:row}._Child_1cyhm_52[data-children-quantity="1"]{width:100%}._Child_1cyhm_52[data-children-quantity="2"]:not([data-width]){width:50%}._Child_1cyhm_52[data-children-quantity="3"]:not([data-width]){width:calc(100% / 3)}._Child_1cyhm_52[data-children-quantity="4"]:not([data-width]){width:25%}._Child_1cyhm_52[data-width="1"]{width:100%}._Child_1cyhm_52[data-width="1/2"]{width:50%}._Child_1cyhm_52[data-width="1/2"][data-children-quantity="1"]{width:calc((100% / 2) - var(--rm-form-row-gap))}._Child_1cyhm_52[data-width="1/3"]{width:calc(100% / 3)}._Child_1cyhm_52[data-width="1/3"][data-children-quantity="1"]{width:calc((100% / 3) - var(--rm-form-row-gap))}._Child_1cyhm_52[data-width="2/3"]{width:calc(200% / 3)}._Child_1cyhm_52[data-width="2/3"][data-children-quantity="1"]{width:calc((200% / 3) - var(--rm-form-row-gap))}._Child_1cyhm_52[data-width="1/4"]{width:25%}._Child_1cyhm_52[data-width="1/4"][data-children-quantity="1"]{width:calc((100% / 4) - var(--rm-form-row-gap))}._Child_1cyhm_52[data-width="2/4"]{width:50%}._Child_1cyhm_52[data-width="2/4"][data-children-quantity="1"]{width:calc((200% / 4) - var(--rm-form-row-gap))}._Child_1cyhm_52[data-width="3/4"]{width:75%}._Child_1cyhm_52[data-width="3/4"][data-children-quantity="1"]{width:calc((300% / 4) - var(--rm-form-row-gap))}}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Children as
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { Children as X, isValidElement as u } from "react";
|
|
3
3
|
import f from "clsx";
|
|
4
|
-
import { baseProps as
|
|
5
|
-
import '../../assets/form-row-
|
|
4
|
+
import { baseProps as h } from "../../utils/functions/functions.util.js";
|
|
5
|
+
import '../../assets/form-row-C3gc233I.css';const L = "_FormRow_1cyhm_1", w = "_XXS_1cyhm_7", S = "_XS_1cyhm_12", y = "_SM_1cyhm_17", F = "_MD_1cyhm_22", x = "_LG_1cyhm_27", v = "_XL_1cyhm_32", b = "_XXL_1cyhm_37", M = "_XXXL_1cyhm_42", R = "_Child_1cyhm_52", o = {
|
|
6
6
|
FormRow: L,
|
|
7
7
|
XXS: w,
|
|
8
8
|
XS: S,
|
|
9
|
-
SM:
|
|
9
|
+
SM: y,
|
|
10
10
|
MD: F,
|
|
11
11
|
LG: x,
|
|
12
12
|
XL: v,
|
|
13
13
|
XXL: b,
|
|
14
14
|
XXXL: M,
|
|
15
15
|
Child: R
|
|
16
|
-
},
|
|
16
|
+
}, s = {
|
|
17
17
|
1: 12,
|
|
18
18
|
"1/2": 6,
|
|
19
19
|
"1/3": 4,
|
|
@@ -21,44 +21,44 @@ import '../../assets/form-row-Dgz7icFK.css';const L = "_FormRow_ne9gl_1", w = "_
|
|
|
21
21
|
"1/4": 3,
|
|
22
22
|
"2/4": 6,
|
|
23
23
|
"3/4": 9
|
|
24
|
-
}, k =
|
|
25
|
-
if (
|
|
26
|
-
const l =
|
|
27
|
-
let
|
|
28
|
-
if (
|
|
29
|
-
if (
|
|
24
|
+
}, k = s[1], j = ({ children: r, gap: t = "sm", widths: e, ...i }) => {
|
|
25
|
+
if (X.count(r) === 0) return null;
|
|
26
|
+
const l = X.toArray(r).filter(u);
|
|
27
|
+
let a = !1;
|
|
28
|
+
if (e)
|
|
29
|
+
if (e.length !== l.length)
|
|
30
30
|
console.warn(
|
|
31
|
-
`[FormRow] \`widths\` length (${
|
|
31
|
+
`[FormRow] \`widths\` length (${e.length}) does not match the number of children (${l.length}). Falling back to default equal-width behaviour.`
|
|
32
32
|
);
|
|
33
33
|
else {
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
`[FormRow] \`widths\` contains unknown value "${
|
|
37
|
-
) :
|
|
38
|
-
`[FormRow] \`widths\` total (${
|
|
39
|
-
) :
|
|
34
|
+
const c = e.find((n) => !(n in s));
|
|
35
|
+
c !== void 0 ? console.warn(
|
|
36
|
+
`[FormRow] \`widths\` contains unknown value "${c}". Supported values are: ${Object.keys(s).join(", ")}. Falling back to default equal-width behaviour.`
|
|
37
|
+
) : e.reduce((d, _) => d + s[_], 0) > k ? console.warn(
|
|
38
|
+
`[FormRow] \`widths\` total (${e.join(" + ")}) exceeds 1. Falling back to default equal-width behaviour.`
|
|
39
|
+
) : a = !0;
|
|
40
40
|
}
|
|
41
|
-
return /* @__PURE__ */
|
|
41
|
+
return /* @__PURE__ */ m(
|
|
42
42
|
"div",
|
|
43
43
|
{
|
|
44
|
-
"data-testid":
|
|
45
|
-
className: f(o.FormRow,
|
|
46
|
-
[o.XXS]:
|
|
47
|
-
[o.XS]:
|
|
48
|
-
[o.SM]:
|
|
49
|
-
[o.MD]:
|
|
50
|
-
[o.LG]:
|
|
51
|
-
[o.XL]:
|
|
52
|
-
[o.XXL]:
|
|
53
|
-
[o.XXXL]:
|
|
44
|
+
"data-testid": h(i, "data-testid", "form-row"),
|
|
45
|
+
className: f(o.FormRow, h(i, "className"), {
|
|
46
|
+
[o.XXS]: t === "xxs",
|
|
47
|
+
[o.XS]: t === "xs",
|
|
48
|
+
[o.SM]: t === "sm",
|
|
49
|
+
[o.MD]: t === "md",
|
|
50
|
+
[o.LG]: t === "lg",
|
|
51
|
+
[o.XL]: t === "xl",
|
|
52
|
+
[o.XXL]: t === "xxl",
|
|
53
|
+
[o.XXXL]: t === "xxxl"
|
|
54
54
|
}),
|
|
55
|
-
children: l.map((
|
|
55
|
+
children: l.map((c, n) => /* @__PURE__ */ m(
|
|
56
56
|
"div",
|
|
57
57
|
{
|
|
58
58
|
"data-children-quantity": l.length,
|
|
59
|
-
"data-width":
|
|
59
|
+
"data-width": a ? e[n] : void 0,
|
|
60
60
|
className: o.Child,
|
|
61
|
-
children:
|
|
61
|
+
children: c
|
|
62
62
|
},
|
|
63
63
|
n
|
|
64
64
|
))
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._FormRow_ne9gl_1{display:flex;flex-direction:column;align-items:stretch}._XXS_ne9gl_14{gap:var(--rm-ui-padding-xxs);--rm-form-row-gap: var(--rm-ui-padding-xxs)}._XS_ne9gl_19{gap:var(--rm-ui-padding-xs);--rm-form-row-gap: var(--rm-ui-padding-xs)}._SM_ne9gl_24{gap:var(--rm-ui-padding-sm);--rm-form-row-gap: var(--rm-ui-padding-sm)}._MD_ne9gl_29{gap:var(--rm-ui-padding-md);--rm-form-row-gap: var(--rm-ui-padding-md)}._LG_ne9gl_34,._XL_ne9gl_39{gap:var(--rm-ui-padding-xl);--rm-form-row-gap: var(--rm-ui-padding-xl)}._XXL_ne9gl_44{gap:var(--rm-ui-padding-xxl);--rm-form-row-gap: var(--rm-ui-padding-xxl)}._XXXL_ne9gl_49{gap:var(--rm-ui-padding-xxxl);--rm-form-row-gap: var(--rm-ui-padding-xxxl)}@media screen and (min-width:768px){._FormRow_ne9gl_1{flex-direction:row}._Child_ne9gl_67:not([data-children-quantity="1"]):not([data-width]){flex-grow:1}._Child_ne9gl_67[data-children-quantity="1"]{width:100%}._Child_ne9gl_67[data-children-quantity="2"]:not([data-width]){width:50%}._Child_ne9gl_67[data-children-quantity="3"]:not([data-width]){width:calc(100% / 3)}._Child_ne9gl_67[data-children-quantity="4"]:not([data-width]){width:25%}._Child_ne9gl_67[data-children-quantity="2"]{--rm-form-row-gap-shrink: calc(var(--rm-form-row-gap) / 2)}._Child_ne9gl_67[data-children-quantity="3"]{--rm-form-row-gap-shrink: calc(var(--rm-form-row-gap) * 2 / 3)}._Child_ne9gl_67[data-children-quantity="4"]{--rm-form-row-gap-shrink: calc(var(--rm-form-row-gap) * 3 / 4)}._Child_ne9gl_67[data-width="1"]{width:100%}._Child_ne9gl_67[data-width="1/2"]{width:calc(100% / 2 - var(--rm-form-row-gap-shrink, 0px))}._Child_ne9gl_67[data-width="1/3"]{width:calc(100% / 3 - var(--rm-form-row-gap-shrink, 0px))}._Child_ne9gl_67[data-width="2/3"]{width:calc(200% / 3 - var(--rm-form-row-gap-shrink, 0px))}._Child_ne9gl_67[data-width="1/4"]{width:calc(100% / 4 - var(--rm-form-row-gap-shrink, 0px))}._Child_ne9gl_67[data-width="2/4"]{width:calc(200% / 4 - var(--rm-form-row-gap-shrink, 0px))}._Child_ne9gl_67[data-width="3/4"]{width:calc(300% / 4 - var(--rm-form-row-gap-shrink, 0px))}}
|