@arthurzakharov/ui-kit 1.9.5 → 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 X } from "react/jsx-runtime";
2
- import { Children as d, isValidElement as u } from "react";
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 _ } from "../../utils/functions/functions.util.js";
5
- import '../../assets/form-row-BIcA2L8w.css';const L = "_FormRow_qe4e4_1", w = "_XXS_qe4e4_7", q = "_XS_qe4e4_11", S = "_SM_qe4e4_15", F = "_MD_qe4e4_19", x = "_LG_qe4e4_23", v = "_XL_qe4e4_27", b = "_XXL_qe4e4_31", M = "_XXXL_qe4e4_35", R = "_Child_qe4e4_39", e = {
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
- XS: q,
9
- SM: S,
8
+ XS: S,
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
- }, r = {
16
+ }, s = {
17
17
  1: 12,
18
18
  "1/2": 6,
19
19
  "1/3": 4,
@@ -21,44 +21,44 @@ import '../../assets/form-row-BIcA2L8w.css';const L = "_FormRow_qe4e4_1", w = "_
21
21
  "1/4": 3,
22
22
  "2/4": 6,
23
23
  "3/4": 9
24
- }, k = r[1], j = ({ children: i, gap: o = "sm", widths: t, ...a }) => {
25
- if (d.count(i) === 0) return null;
26
- const l = d.toArray(i).filter(u);
27
- let c = !1;
28
- if (t)
29
- if (t.length !== l.length)
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 (${t.length}) does not match the number of children (${l.length}). Falling back to default equal-width behaviour.`
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 s = t.find((n) => !(n in r));
35
- s !== void 0 ? console.warn(
36
- `[FormRow] \`widths\` contains unknown value "${s}". Supported values are: ${Object.keys(r).join(", ")}. Falling back to default equal-width behaviour.`
37
- ) : t.reduce((m, h) => m + r[h], 0) > k ? console.warn(
38
- `[FormRow] \`widths\` total (${t.join(" + ")}) exceeds 1. Falling back to default equal-width behaviour.`
39
- ) : c = !0;
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__ */ X(
41
+ return /* @__PURE__ */ m(
42
42
  "div",
43
43
  {
44
- "data-testid": _(a, "data-testid", "form-row"),
45
- className: f(e.FormRow, _(a, "className"), {
46
- [e.XXS]: o === "xxs",
47
- [e.XS]: o === "xs",
48
- [e.SM]: o === "sm",
49
- [e.MD]: o === "md",
50
- [e.LG]: o === "lg",
51
- [e.XL]: o === "xl",
52
- [e.XXL]: o === "xxl",
53
- [e.XXXL]: 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((s, n) => /* @__PURE__ */ X(
55
+ children: l.map((c, n) => /* @__PURE__ */ m(
56
56
  "div",
57
57
  {
58
58
  "data-children-quantity": l.length,
59
- "data-width": c ? t[n] : void 0,
60
- className: e.Child,
61
- children: s
59
+ "data-width": a ? e[n] : void 0,
60
+ className: o.Child,
61
+ children: c
62
62
  },
63
63
  n
64
64
  ))
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arthurzakharov/ui-kit",
3
3
  "private": false,
4
- "version": "1.9.5",
4
+ "version": "1.9.7",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",
@@ -1 +0,0 @@
1
- ._FormRow_qe4e4_1{display:flex;flex-direction:column;align-items:stretch}._XXS_qe4e4_7{gap:var(--rm-ui-padding-xxs)}._XS_qe4e4_11{gap:var(--rm-ui-padding-xs)}._SM_qe4e4_15{gap:var(--rm-ui-padding-sm)}._MD_qe4e4_19{gap:var(--rm-ui-padding-md)}._LG_qe4e4_23,._XL_qe4e4_27{gap:var(--rm-ui-padding-xl)}._XXL_qe4e4_31{gap:var(--rm-ui-padding-xxl)}._XXXL_qe4e4_35{gap:var(--rm-ui-padding-xxxl)}._Child_qe4e4_39{flex-grow:1}@media screen and (min-width:768px){._FormRow_qe4e4_1{flex-direction:row}._Child_qe4e4_39[data-children-quantity="1"]{width:100%}._Child_qe4e4_39[data-children-quantity="2"]{width:50%}._Child_qe4e4_39[data-children-quantity="3"]{width:calc(100% / 3)}._Child_qe4e4_39[data-children-quantity="4"]{width:25%}._Child_qe4e4_39[data-width="1"]{width:100%}._Child_qe4e4_39[data-width="1/2"]{width:50%}._Child_qe4e4_39[data-width="1/3"]{width:calc(100% / 3)}._Child_qe4e4_39[data-width="2/3"]{width:calc(200% / 3)}._Child_qe4e4_39[data-width="1/4"]{width:25%}._Child_qe4e4_39[data-width="2/4"]{width:50%}._Child_qe4e4_39[data-width="3/4"]{width:75%}}