@arthurzakharov/ui-kit 1.6.3 → 1.6.4

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
+ ._Checkbox_1ueio_1{display:flex;flex-direction:column}._Label_1ueio_6{position:relative;display:inline-flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;gap:var(--rm-ui-padding-xs)}._Label_1ueio_6:hover{cursor:pointer}._Choice_1ueio_19{position:relative;left:0;top:3px}._Content_1ueio_25{font-weight:var(--rm-ui-font-weight-regular);color:var(--rm-ui-color-text-primary)}._Content_1ueio_25 button,._Content_1ueio_25 span[role=button]{color:var(--rm-ui-color-link);outline-offset:2px;display:inline;margin:0;padding:0;border:0;background:none;font:inherit;line-height:inherit;color:inherit;text-decoration:underline;vertical-align:baseline;cursor:pointer}._Content_1ueio_25 button:hover,._Content_1ueio_25 span[role=button]:hover{cursor:pointer;text-decoration:underline}._Content_1ueio_25 button:focus-visible,._Content_1ueio_25 span[role=button]:focus-visible{outline-color:var(--rm-ui-color-focus)}._Body_1ueio_58{font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body)}._BodySmall_1ueio_63{font-size:var(--rm-ui-font-size-body-small);line-height:var(--rm-ui-line-height-body-small)}._ErrorMessage_1ueio_68{padding-top:var(--rm-ui-padding-xxs)}
@@ -1,17 +1,17 @@
1
1
  import { jsxs as p, jsx as e } from "react/jsx-runtime";
2
- import { useRef as E } from "react";
3
- import { useHover as M } from "usehooks-ts";
2
+ import { useRef as M } from "react";
3
+ import { useHover as N } from "usehooks-ts";
4
4
  import _ from "clsx";
5
- import { FadeSlide as N } from "../../../animations/fade-slide/fade-slide.component.js";
5
+ import { FadeSlide as S } from "../../../animations/fade-slide/fade-slide.component.js";
6
6
  import "../../primitives/box/box.component.js";
7
7
  import { baseProps as C } from "../../../utils/functions/functions.util.js";
8
- import { Choice as S } from "../../primitives/choice/choice.component.js";
8
+ import { Choice as v } from "../../primitives/choice/choice.component.js";
9
9
  import { ErrorMessage as F } from "../../primitives/error-message/error-message.component.js";
10
10
  import { HiddenInput as L } from "../../primitives/hidden-input/hidden-input.component.js";
11
11
  import "lucide-react";
12
12
  import { useControlInteraction as $ } from "../../utils/hooks/use-control-interaction/use-control-interaction.hook.js";
13
13
  import { Converter as j } from "../../../utils/converter/converter.util.js";
14
- import '../../../assets/checkbox-CAGKGCVC.css';const H = "_Checkbox_vvcdn_1", I = "_Label_vvcdn_6", P = "_Choice_vvcdn_19", D = "_Content_vvcdn_25", R = "_Body_vvcdn_58", T = "_BodySmall_vvcdn_63", q = "_ErrorMessage_vvcdn_68", o = {
14
+ import '../../../assets/checkbox-BVxmXTx8.css';const H = "_Checkbox_1ueio_1", I = "_Label_1ueio_6", P = "_Choice_1ueio_19", D = "_Content_1ueio_25", R = "_Body_1ueio_58", T = "_BodySmall_1ueio_63", q = "_ErrorMessage_1ueio_68", o = {
15
15
  Checkbox: H,
16
16
  Label: I,
17
17
  Choice: P,
@@ -21,67 +21,67 @@ import '../../../assets/checkbox-CAGKGCVC.css';const H = "_Checkbox_vvcdn_1", I
21
21
  ErrorMessage: q
22
22
  }, Z = ({
23
23
  // Interactive props
24
- id: c,
24
+ id: t,
25
25
  value: r = !1,
26
- disabled: t = !1,
27
- state: s = "idle",
26
+ disabled: s = !1,
27
+ state: n = "idle",
28
28
  onChange: f,
29
- onFocus: v,
29
+ onFocus: u,
30
30
  onBlur: b,
31
31
  // Checkbox props
32
32
  iconSize: x = "md",
33
33
  textSize: a = "body-small",
34
- message: l = "",
34
+ message: i = "",
35
35
  // PropsWithChildren
36
36
  children: y,
37
37
  // Base props
38
- ...m
38
+ ...l
39
39
  }) => {
40
- const d = E(null), k = M(d), { focused: i, emitChange: h, handleFocus: B, handleBlur: u } = $({
41
- id: c,
42
- disabled: t,
40
+ const m = M(null), k = N(m), { focused: d, emitChange: h, handleFocus: B, handleBlur: g } = $({
41
+ id: t,
42
+ disabled: s,
43
43
  onChange: f,
44
- onFocus: v,
44
+ onFocus: u,
45
45
  onBlur: b
46
46
  });
47
- return /* @__PURE__ */ p("div", { "data-testid": C(m, "data-testid", "checkbox"), className: _(o.Checkbox, C(m, "className")), children: [
47
+ return /* @__PURE__ */ p("div", { "data-testid": C(l, "data-testid", "checkbox"), className: _(o.Checkbox, C(l, "className")), children: [
48
48
  /* @__PURE__ */ p(
49
49
  "label",
50
50
  {
51
51
  "data-testid": "checkbox-label",
52
- ref: d,
53
- htmlFor: c,
52
+ ref: m,
53
+ htmlFor: t,
54
54
  className: o.Label,
55
- onClick: (n) => {
56
- i || (n.preventDefault(), h(!r, "mouse"));
55
+ onClick: (c) => {
56
+ d || (c.preventDefault(), h(!r, "mouse"));
57
57
  },
58
58
  onFocus: B,
59
- onBlur: u,
59
+ onBlur: g,
60
60
  children: [
61
61
  /* @__PURE__ */ e(
62
62
  L,
63
63
  {
64
64
  type: "checkbox",
65
- id: c,
66
- name: c,
65
+ id: t,
66
+ name: t,
67
67
  value: j.Boolean.ToBooleanString(r),
68
68
  checked: r,
69
- disabled: t,
70
- onChange: (n, g) => {
71
- n.stopPropagation(), h(!r, g);
69
+ disabled: s,
70
+ onChange: (c, E) => {
71
+ c.stopPropagation(), h(!r, E);
72
72
  }
73
73
  }
74
74
  ),
75
75
  /* @__PURE__ */ e("div", { className: o.Choice, children: /* @__PURE__ */ e(
76
- S,
76
+ v,
77
77
  {
78
78
  type: "checkbox",
79
79
  size: x,
80
- state: s,
80
+ state: n,
81
81
  checked: r,
82
- focused: i,
82
+ focused: d,
83
83
  hovered: k,
84
- disabled: t
84
+ disabled: s
85
85
  }
86
86
  ) }),
87
87
  /* @__PURE__ */ e(
@@ -97,7 +97,7 @@ import '../../../assets/checkbox-CAGKGCVC.css';const H = "_Checkbox_vvcdn_1", I
97
97
  ]
98
98
  }
99
99
  ),
100
- /* @__PURE__ */ e(N, { name: "text-message", condition: s === "error" && !!l, children: /* @__PURE__ */ e(F, { text: l, className: o.ErrorMessage }) })
100
+ /* @__PURE__ */ e(S, { name: "text-message", condition: n === "error" && !!i, children: /* @__PURE__ */ e(F, { text: i, className: o.ErrorMessage }) })
101
101
  ] });
102
102
  };
103
103
  export {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arthurzakharov/ui-kit",
3
3
  "private": false,
4
- "version": "1.6.3",
4
+ "version": "1.6.4",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",
@@ -1 +0,0 @@
1
- ._Checkbox_vvcdn_1{display:flex;flex-direction:column}._Label_vvcdn_6{position:relative;display:inline-flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;gap:var(--rm-ui-padding-xs)}._Label_vvcdn_6:hover{cursor:pointer}._Choice_vvcdn_19{position:relative;left:0;top:3px}._Content_vvcdn_25{font-weight:var(--rm-ui-font-weight-regular);color:var(--rm-ui-color-text-primary)}._Content_vvcdn_25 button,._Content_vvcdn_25 span[data-type=button]{color:var(--rm-ui-color-link);outline-offset:2px;display:inline;margin:0;padding:0;border:0;background:none;font:inherit;line-height:inherit;color:inherit;text-decoration:underline;vertical-align:baseline;cursor:pointer}._Content_vvcdn_25 button:hover,._Content_vvcdn_25 span[data-type=button]:hover{cursor:pointer;text-decoration:underline}._Content_vvcdn_25 button:focus-visible,._Content_vvcdn_25 span[data-type=button]:focus-visible{outline-color:var(--rm-ui-color-focus)}._Body_vvcdn_58{font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body)}._BodySmall_vvcdn_63{font-size:var(--rm-ui-font-size-body-small);line-height:var(--rm-ui-line-height-body-small)}._ErrorMessage_vvcdn_68{padding-top:var(--rm-ui-padding-xxs)}