@kommo-crm/crm-react-ui-kit 1.0.3 → 1.0.5

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.
@@ -1 +1 @@
1
- :root{--crm-ui-kit-icon-checked-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' id='_x2014__Item_1_' x='0px' y='0px' width='12px' height='11px' viewBox='0 0 12 11' enable-background='new 0 0 12 11' xml:space='preserve'%3E%3Cg id='check.svg'%3E%3Cg%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' fill='%23363b44' d='M11.476,0.151c-0.377-0.296-0.997-0.139-1.359,0.324L5.153,6.53 C5.077,6.624,4.884,6.657,4.785,6.595L1.723,4.688C1.24,4.342,0.624,4.366,0.349,4.753c-0.268,0.378-0.18,0.994,0.209,1.464 l3.509,4.234C4.361,10.805,4.742,11,5.14,11c0.465,0,0.895-0.266,1.177-0.728l5.264-8.615C11.916,1.109,11.871,0.462,11.476,0.151 z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");--crm-ui-kit-icon-minus: url("data:image/svg+xml,%3Csvg width='10' height='4' viewBox='0 0 10 4' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0.380402H12V2.87162C12 2.87162 10.3692 3.61961 5.86091 3.61961C1.35265 3.61961 0 2.87162 0 2.87162V0.380402Z' fill='%23363b44'/%3E%3C/svg%3E%0A");--crm-ui-kit-icon-check-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='7' viewBox='0 0 9 7' fill='%23363b44'%3E%3Cpath id='feed-task' d='M249.01,1487.73l-5.878,6.28-0.1-.11-0.1.11-2.939-3.14,0.693-.74,2.348,2.51,5.286-5.65Z' transform='translate(-240 -1487)'/%3E%3C/svg%3E%0A")}:root[data-crm-ui-kit-theme=alternative]{--crm-ui-kit-icon-checked-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' id='_x2014__Item_1_' x='0px' y='0px' width='12px' height='11px' viewBox='0 0 12 11' enable-background='new 0 0 12 11' xml:space='preserve'%3E%3Cg id='check.svg'%3E%3Cg%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' fill='%23f2f2f2' d='M11.476,0.151c-0.377-0.296-0.997-0.139-1.359,0.324L5.153,6.53 C5.077,6.624,4.884,6.657,4.785,6.595L1.723,4.688C1.24,4.342,0.624,4.366,0.349,4.753c-0.268,0.378-0.18,0.994,0.209,1.464 l3.509,4.234C4.361,10.805,4.742,11,5.14,11c0.465,0,0.895-0.266,1.177-0.728l5.264-8.615C11.916,1.109,11.871,0.462,11.476,0.151 z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");--crm-ui-kit-icon-minus: url("data:image/svg+xml,%3Csvg width='12' height='4' viewBox='0 0 12 4' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0.380402H12V2.87162C12 2.87162 10.3692 3.61961 5.86091 3.61961C1.35265 3.61961 0 2.87162 0 2.87162V0.380402Z' fill='%23F2F2F2'/%3E%3C/svg%3E%0A");--crm-ui-kit-icon-check-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='7' viewBox='0 0 9 7' fill='%23ffffff'%3E%3Cpath id='feed-task' d='M249.01,1487.73l-5.878,6.28-0.1-.11-0.1.11-2.939-3.14,0.693-.74,2.348,2.51,5.286-5.65Z' transform='translate(-240 -1487)'/%3E%3C/svg%3E%0A")}
1
+ :root{--crm-ui-kit-icon-checked-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' id='_x2014__Item_1_' x='0px' y='0px' width='12px' height='11px' viewBox='0 0 12 11' enable-background='new 0 0 12 11' xml:space='preserve'%3E%3Cg id='check.svg'%3E%3Cg%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' fill='%23363b44' d='M11.476,0.151c-0.377-0.296-0.997-0.139-1.359,0.324L5.153,6.53 C5.077,6.624,4.884,6.657,4.785,6.595L1.723,4.688C1.24,4.342,0.624,4.366,0.349,4.753c-0.268,0.378-0.18,0.994,0.209,1.464 l3.509,4.234C4.361,10.805,4.742,11,5.14,11c0.465,0,0.895-0.266,1.177-0.728l5.264-8.615C11.916,1.109,11.871,0.462,11.476,0.151 z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");--crm-ui-kit-icon-minus: url("data:image/svg+xml,%3Csvg width='12' height='4' viewBox='0 0 12 4' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0.380402H12V2.87162C12 2.87162 10.3692 3.61961 5.86091 3.61961C1.35265 3.61961 0 2.87162 0 2.87162V0.380402Z' fill='%23363B44'/%3E%3C/svg%3E%0A");--crm-ui-kit-icon-check-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='7' viewBox='0 0 9 7' fill='%23363b44'%3E%3Cpath id='feed-task' d='M249.01,1487.73l-5.878,6.28-0.1-.11-0.1.11-2.939-3.14,0.693-.74,2.348,2.51,5.286-5.65Z' transform='translate(-240 -1487)'/%3E%3C/svg%3E%0A")}:root[data-crm-ui-kit-theme=alternative]{--crm-ui-kit-icon-checked-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' id='_x2014__Item_1_' x='0px' y='0px' width='12px' height='11px' viewBox='0 0 12 11' enable-background='new 0 0 12 11' xml:space='preserve'%3E%3Cg id='check.svg'%3E%3Cg%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' fill='%23f2f2f2' d='M11.476,0.151c-0.377-0.296-0.997-0.139-1.359,0.324L5.153,6.53 C5.077,6.624,4.884,6.657,4.785,6.595L1.723,4.688C1.24,4.342,0.624,4.366,0.349,4.753c-0.268,0.378-0.18,0.994,0.209,1.464 l3.509,4.234C4.361,10.805,4.742,11,5.14,11c0.465,0,0.895-0.266,1.177-0.728l5.264-8.615C11.916,1.109,11.871,0.462,11.476,0.151 z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");--crm-ui-kit-icon-minus: url("data:image/svg+xml,%3Csvg width='12' height='4' viewBox='0 0 12 4' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0.380402H12V2.87162C12 2.87162 10.3692 3.61961 5.86091 3.61961C1.35265 3.61961 0 2.87162 0 2.87162V0.380402Z' fill='%23F2F2F2'/%3E%3C/svg%3E%0A");--crm-ui-kit-icon-check-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='7' viewBox='0 0 9 7' fill='%23ffffff'%3E%3Cpath id='feed-task' d='M249.01,1487.73l-5.878,6.28-0.1-.11-0.1.11-2.939-3.14,0.693-.74,2.348,2.51,5.286-5.65Z' transform='translate(-240 -1487)'/%3E%3C/svg%3E%0A")}
@@ -1 +1 @@
1
- {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAe,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAuBzD,eAAO,MAAM,MAAM,EAwEb,UAAU,CAAC"}
1
+ {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAe,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAuBzD,eAAO,MAAM,MAAM,EA2Eb,UAAU,CAAC"}
@@ -1,78 +1,79 @@
1
- import { jsx as p } from "react/jsx-runtime";
2
- import { forwardRef as w, useState as s, useCallback as a } from "react";
3
- import { c as B } from "../../index-L8X2o7IH.mjs";
4
- import { useThemeClassName as L } from "../../hooks/useThemeClassName/useThemeClassName.js";
5
- import { noop as f } from "../../utils/noop/noop.js";
6
- import { SelectProvider as R, DISPLAY_NAME as b } from "./Select.context.js";
7
- import { Button as z } from "./components/Button/Button.js";
8
- import { Item as j } from "./components/Item/Item.js";
9
- import { List as k } from "./components/List/List.js";
10
- import { Value as y } from "./components/Value/Value.js";
11
- import { Arrow as M } from "./components/Arrow/Arrow.js";
12
- import { Icon as T } from "./components/Icon/Icon.js";
13
- import X from "./components/Option/Option.js";
14
- import '../../assets/Select.css';const Y = "_select_11uzo_1", q = "_opened_11uzo_6", u = {
15
- select: Y,
16
- opened: q
17
- }, F = -1, e = w((r, h) => {
1
+ import { jsx as f } from "react/jsx-runtime";
2
+ import { forwardRef as R, useState as a, useCallback as r } from "react";
3
+ import { c as b } from "../../index-L8X2o7IH.mjs";
4
+ import { useThemeClassName as z } from "../../hooks/useThemeClassName/useThemeClassName.js";
5
+ import { noop as u } from "../../utils/noop/noop.js";
6
+ import { SelectProvider as j, DISPLAY_NAME as k } from "./Select.context.js";
7
+ import { Button as y } from "./components/Button/Button.js";
8
+ import { Item as M } from "./components/Item/Item.js";
9
+ import { List as T } from "./components/List/List.js";
10
+ import { Value as X } from "./components/Value/Value.js";
11
+ import { Arrow as Y } from "./components/Arrow/Arrow.js";
12
+ import { Icon as q } from "./components/Icon/Icon.js";
13
+ import F from "./components/Option/Option.js";
14
+ import '../../assets/Select.css';const G = "_select_11uzo_1", J = "_opened_11uzo_6", h = {
15
+ select: G,
16
+ opened: J
17
+ }, K = -1, e = R((n, O) => {
18
18
  const {
19
19
  theme: I,
20
20
  value: v,
21
21
  defaultValue: C,
22
- onChange: l = f,
23
- onOpenChange: m = f,
24
- className: O,
25
- children: _,
22
+ onChange: l = u,
23
+ onOpenChange: i = u,
24
+ className: _,
25
+ children: x,
26
26
  isDisabled: t = !1,
27
- isDefaultOpen: x = !1,
28
- isInvalid: N = !1
29
- } = r, n = "value" in r, V = L(I), [c, i] = s(x), [g, A] = s(F), [d, D] = s(C), S = n ? v : d, E = a(
27
+ isOpen: N = !1,
28
+ isDefaultOpen: V = !1,
29
+ isInvalid: g = !1
30
+ } = n, s = "value" in n, m = "isOpen" in n, A = z(I), [D, c] = a(V), [P, S] = a(K), [d, E] = a(C), H = s ? v : d, p = m ? N : D, w = r(
30
31
  (o) => {
31
- t || (i(o), m(o));
32
+ !t && !m && (c(o), i(o));
32
33
  },
33
- [t, m]
34
- ), H = a(
34
+ [t, i]
35
+ ), B = r(
35
36
  (o) => {
36
- n || D(o), l(o), i(!1);
37
+ s || E(o), l(o), c(!1);
37
38
  },
38
- [n, l]
39
- ), P = a((o) => {
40
- A(o);
39
+ [s, l]
40
+ ), L = r((o) => {
41
+ S(o);
41
42
  }, []);
42
- return /* @__PURE__ */ p(
43
- R,
43
+ return /* @__PURE__ */ f(
44
+ j,
44
45
  {
45
- hoveredIndex: g,
46
- onHoveredIndexChange: P,
47
- onChange: H,
48
- isOpened: c,
49
- onOpen: E,
46
+ hoveredIndex: P,
47
+ onHoveredIndexChange: L,
48
+ onChange: B,
49
+ isOpened: p,
50
+ onOpen: w,
50
51
  isDisabled: t,
51
- isInvalid: N,
52
- value: S,
52
+ isInvalid: g,
53
+ value: H,
53
54
  defaultValue: d,
54
- children: /* @__PURE__ */ p(
55
+ children: /* @__PURE__ */ f(
55
56
  "div",
56
57
  {
57
- className: B(u.select, V, O, {
58
- [u.opened]: c
58
+ className: b(h.select, A, _, {
59
+ [h.opened]: p
59
60
  }),
60
- ref: h,
61
- children: _
61
+ ref: O,
62
+ children: x
62
63
  }
63
64
  )
64
65
  }
65
66
  );
66
67
  });
67
- e.displayName = b;
68
+ e.displayName = k;
68
69
  e.Root = e;
69
- e.List = k;
70
- e.Item = j;
71
- e.Button = z;
72
- e.Value = y;
73
- e.Arrow = M;
74
- e.Icon = T;
75
- e.Option = X;
70
+ e.List = T;
71
+ e.Item = M;
72
+ e.Button = y;
73
+ e.Value = X;
74
+ e.Arrow = Y;
75
+ e.Icon = q;
76
+ e.Option = F;
76
77
  export {
77
78
  e as Select
78
79
  };
@@ -69,6 +69,10 @@ export type SelectProps = {
69
69
  * Child elements, Select components.
70
70
  */
71
71
  children?: React.ReactNode;
72
+ /**
73
+ * Flag whether the list is open.
74
+ */
75
+ isOpen?: boolean;
72
76
  /**
73
77
  * Flag whether the list is initially open.
74
78
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Select.props.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAE/D,KAAK,eAAe,GAAG;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;;OAGG;IACH,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,KAAK,EAAE,mBAAmB,CAAC;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;;OAGG;IACH,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B;;OAEG;IACH,SAAS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AAK,CAAC,aAAa,CAAC,cAAc,CAAC,CAClD,CAAC;IACF;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,yBAAyB,CAAC,UAAU,CAAC,CAAC;IACnD;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,yBAAyB,CAAC,UAAU,CAAC,CAAC;IACnD;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,yBAAyB,CAAC,SAAS,CAAC,CAAC;IACjD;;OAEG;IACH,MAAM,EAAE,KAAK,CAAC,yBAAyB,CAAC,WAAW,CAAC,CAAC;CACtD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../../../src/components/Select/components/List/List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AAgBf,OAAO,EAAE,eAAe,EAAa,MAAM,cAAc,CAAC;AAgB1D,eAAO,MAAM,IAAI,oIAqFf,CAAC"}
1
+ {"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../../../src/components/Select/components/List/List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AAgBf,OAAO,EAAE,eAAe,EAAa,MAAM,cAAc,CAAC;AAgB1D,eAAO,MAAM,IAAI,oIAsFf,CAAC"}
@@ -1,64 +1,65 @@
1
1
  import { jsx as c } from "react/jsx-runtime";
2
- import p, { forwardRef as M, useMemo as k, useRef as A, useCallback as m, useEffect as E } from "react";
3
- import { u as H, L as P } from "../../../../List-AX0nB9Ji.mjs";
2
+ import p, { forwardRef as k, useMemo as A, useRef as E, useCallback as m, useEffect as H } from "react";
3
+ import { u as N, L as P } from "../../../../List-AX0nB9Ji.mjs";
4
4
  import { Portal as _ } from "../../../Portal/Portal.js";
5
5
  import { mergeRefs as y } from "../../../../lib/utils.js";
6
- import { noop as N } from "../../../../utils/noop/noop.js";
7
- import { useSelectContext as T } from "../../Select.context.js";
8
- const h = "Select.List", b = (r) => {
6
+ import { noop as T } from "../../../../utils/noop/noop.js";
7
+ import { useSelectContext as b } from "../../Select.context.js";
8
+ const h = "Select.List", j = (r) => {
9
9
  const { container: n, children: o } = r;
10
10
  return n ? /* @__PURE__ */ c(_, { container: n, children: o }) : o;
11
- }, j = M((r, n) => {
12
- const { container: o, children: s, theme: C } = r, {
11
+ }, w = k((r, n) => {
12
+ const { container: o, children: s, theme: C, className: g } = r, {
13
13
  isOpened: t,
14
14
  onOpen: i,
15
- onHoveredIndexChange: g,
16
- onChange: d = N,
17
- hoveredIndex: v,
15
+ onHoveredIndexChange: v,
16
+ onChange: d = T,
17
+ hoveredIndex: x,
18
18
  value: f
19
- } = T(h), { items: u, itemsMap: x } = k(() => {
19
+ } = b(h), { items: u, itemsMap: I } = A(() => {
20
20
  const e = {};
21
21
  return { items: p.Children.toArray(s).map(
22
- (l, S) => p.isValidElement(l) ? (e[l.props.item.value] = S, { ...l.props.item }) : {}
22
+ (l, M) => p.isValidElement(l) ? (e[l.props.item.value] = M, { ...l.props.item }) : {}
23
23
  ), itemsMap: e };
24
- }, [s]), a = A(null), I = m(() => {
24
+ }, [s]), a = E(null), L = m(() => {
25
25
  t && i(!1);
26
26
  }, [t]);
27
- H({
27
+ N({
28
28
  ref: a,
29
- handler: I
29
+ handler: L
30
30
  });
31
- const L = (e) => {
32
- g(e);
33
- }, O = m(
31
+ const O = (e) => {
32
+ v(e);
33
+ }, R = m(
34
34
  (e) => {
35
35
  i(e);
36
36
  },
37
37
  [i]
38
- ), R = m(
38
+ ), S = m(
39
39
  (e) => {
40
40
  d(u[e]);
41
41
  },
42
42
  [d, u]
43
43
  );
44
- return E(() => {
44
+ return H(() => {
45
45
  var e;
46
46
  t && ((e = a.current) == null || e.focus());
47
- }, [t]), /* @__PURE__ */ c(b, { container: o, children: /* @__PURE__ */ c(
47
+ }, [t]), /* @__PURE__ */ c(j, { container: o, children: /* @__PURE__ */ c(
48
48
  P,
49
49
  {
50
+ className: g,
50
51
  ref: y(a, n),
51
52
  isOpened: t,
52
53
  theme: C,
53
- onHoveredIndexChange: L,
54
- onToggle: O,
55
- onSelect: R,
56
- hoveredIndex: f ? x[f.value] : v,
54
+ onHoveredIndexChange: O,
55
+ onToggle: R,
56
+ onSelect: S,
57
+ hoveredIndex: f ? I[f.value] : x,
57
58
  children: s
58
59
  }
59
60
  ) });
60
61
  });
61
- j.displayName = h;
62
+ w.displayName = h;
62
63
  export {
63
- j as List
64
+ w as List
64
65
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kommo-crm/crm-react-ui-kit",
3
3
  "description": "Ready-to-use React components which implements Kommo design",
4
- "version": "1.0.3",
4
+ "version": "1.0.5",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "engines": {