triafly-ui-kit 1.0.24 → 1.0.25

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.
Files changed (93) hide show
  1. package/README.md +93 -93
  2. package/dist/{_commonjsHelpers-C6fGbg64.js → _virtual/_commonjsHelpers.js} +1 -1
  3. package/dist/_virtual/index.js +7 -0
  4. package/dist/_virtual/index2.js +7 -0
  5. package/dist/_virtual/index3.js +4 -0
  6. package/dist/_virtual/papaparse.min.js +7 -0
  7. package/dist/_virtual/papaparse.min2.js +4 -0
  8. package/dist/_virtual/react-paginate.js +7 -0
  9. package/dist/_virtual/react-paginate2.js +4 -0
  10. package/dist/assets/src/components/Ui/Tooltip/Tooltip.stories.module.css +1 -0
  11. package/dist/components/Ui/Accordeon/Accordeon.js +11 -10
  12. package/dist/components/Ui/Alert/Alert.js +9 -8
  13. package/dist/components/Ui/Avatar/Avatar.js +4 -3
  14. package/dist/components/Ui/Badge/Badge.js +19 -32
  15. package/dist/components/Ui/Button/Button.js +16 -15
  16. package/dist/components/Ui/ButtonsArray/ButtonsArray.js +8 -7
  17. package/dist/components/Ui/Checkbox/Checkbox.js +17 -16
  18. package/dist/components/Ui/CliTextareaInput/CliTextareaInput.js +16 -15
  19. package/dist/components/Ui/CustomLink/CustomLink.js +15 -14
  20. package/dist/components/Ui/DatePicker/DatePicker.js +16 -8
  21. package/dist/components/Ui/DatePicker/DatePicker.stories.js +39 -33
  22. package/dist/components/Ui/DropdownInput/DropdownInput.js +15 -14
  23. package/dist/components/Ui/DropdownMenu/DropdownMenu.js +4 -3
  24. package/dist/components/Ui/FileUpload/FileUpload.js +126 -544
  25. package/dist/components/Ui/Form/FormRoot/FormRoot.js +2 -1
  26. package/dist/components/Ui/Loader/Loader.js +5 -4
  27. package/dist/components/Ui/ModalWindow/ModalWindow.js +13 -12
  28. package/dist/components/Ui/Pagination/Pagination.js +20 -275
  29. package/dist/components/Ui/Radio/Radio.js +2 -1
  30. package/dist/components/Ui/SearchInput/SearchInput.js +13 -12
  31. package/dist/components/Ui/Skeleton/Skeleton.js +16 -18
  32. package/dist/components/Ui/Switch/Switch.js +10 -9
  33. package/dist/components/Ui/Table/MemoizedRow/MemoizedRow.js +30 -59
  34. package/dist/components/Ui/Table/Table.js +5 -4
  35. package/dist/components/Ui/Tabs/Tabs.js +6 -5
  36. package/dist/components/Ui/TextInput/TextInput.js +11 -10
  37. package/dist/components/Ui/TextareaInput/TextareaInput.js +18 -17
  38. package/dist/components/Ui/Tooltip/Tooltip.js +3 -2
  39. package/dist/components/Ui/Tooltip/Tooltip.stories.js +9 -14
  40. package/dist/context/ToastContext/ToastContext.js +22 -24
  41. package/dist/main.d.ts +0 -14
  42. package/dist/main.js +147 -149
  43. package/dist/node_modules/classnames/index.js +42 -0
  44. package/dist/node_modules/fast-deep-equal/index.js +31 -0
  45. package/dist/node_modules/papaparse/papaparse.min.js +421 -0
  46. package/dist/node_modules/react-paginate/dist/react-paginate.js +259 -0
  47. package/dist/src/components/Ui/Badge/Badge.module.scss.js +30 -0
  48. package/dist/src/components/Ui/Skeleton/Skeleton.module.scss.js +9 -0
  49. package/dist/src/components/Ui/Tooltip/Tooltip.stories.module.css.js +15 -0
  50. package/dist/src/context/ToastContext/ToastContext.module.scss.js +9 -0
  51. package/dist/styles/_mixins.scss +22 -0
  52. package/dist/styles/fix.scss +4 -0
  53. package/dist/styles/main.scss +27 -0
  54. package/dist/styles/reset.scss +106 -0
  55. package/dist/styles/typography.scss +102 -0
  56. package/dist/styles/variables.scss +278 -0
  57. package/package.json +110 -106
  58. package/src/styles/_mixins.scss +22 -0
  59. package/src/styles/fix.scss +4 -0
  60. package/src/styles/main.scss +27 -0
  61. package/src/styles/reset.scss +106 -0
  62. package/src/styles/typography.scss +102 -0
  63. package/src/styles/variables.scss +278 -0
  64. package/dist/assets/Tooltip.css +0 -1
  65. package/dist/components/Ui/DatePicker/index.js +0 -4
  66. package/dist/index-2QXL0WYc.js +0 -45
  67. /package/dist/assets/{Accordeon.css → src/components/Ui/Accordeon/Accordeon.css} +0 -0
  68. /package/dist/assets/{Alert.css → src/components/Ui/Alert/Alert.css} +0 -0
  69. /package/dist/assets/{Avatar.css → src/components/Ui/Avatar/Avatar.css} +0 -0
  70. /package/dist/assets/{Badge.css → src/components/Ui/Badge/Badge.module.css} +0 -0
  71. /package/dist/assets/{Button.css → src/components/Ui/Button/Button.css} +0 -0
  72. /package/dist/assets/{ButtonsArray.css → src/components/Ui/ButtonsArray/ButtonsArray.css} +0 -0
  73. /package/dist/assets/{Checkbox.css → src/components/Ui/Checkbox/Checkbox.css} +0 -0
  74. /package/dist/assets/{CliTextareaInput.css → src/components/Ui/CliTextareaInput/CliTextareaInput.css} +0 -0
  75. /package/dist/assets/{CustomLink.css → src/components/Ui/CustomLink/CustomLink.css} +0 -0
  76. /package/dist/assets/{DatePicker.css → src/components/Ui/DatePicker/DatePicker.css} +0 -0
  77. /package/dist/assets/{DropdownInput.css → src/components/Ui/DropdownInput/DropdownInput.css} +0 -0
  78. /package/dist/assets/{DropdownMenu.css → src/components/Ui/DropdownMenu/DropdownMenu.css} +0 -0
  79. /package/dist/assets/{FileUpload.css → src/components/Ui/FileUpload/FileUpload.css} +0 -0
  80. /package/dist/assets/{FormRoot.css → src/components/Ui/Form/FormRoot/Form.css} +0 -0
  81. /package/dist/assets/{Loader.css → src/components/Ui/Loader/Loader.css} +0 -0
  82. /package/dist/assets/{ModalWindow.css → src/components/Ui/ModalWindow/ModalWindow.css} +0 -0
  83. /package/dist/assets/{Pagination.css → src/components/Ui/Pagination/Pagination.css} +0 -0
  84. /package/dist/assets/{Radio.css → src/components/Ui/Radio/Radio.css} +0 -0
  85. /package/dist/assets/{SearchInput.css → src/components/Ui/SearchInput/SearchInput.css} +0 -0
  86. /package/dist/assets/{Skeleton.css → src/components/Ui/Skeleton/Skeleton.module.css} +0 -0
  87. /package/dist/assets/{Switch.css → src/components/Ui/Switch/Switch.css} +0 -0
  88. /package/dist/assets/{Table.css → src/components/Ui/Table/Table.css} +0 -0
  89. /package/dist/assets/{Tabs.css → src/components/Ui/Tabs/Tabs.css} +0 -0
  90. /package/dist/assets/{TextInput.css → src/components/Ui/TextInput/TextInput.css} +0 -0
  91. /package/dist/assets/{TextareaInput.css → src/components/Ui/TextareaInput/TextareaInput.css} +0 -0
  92. /package/dist/assets/{Tooltip2.css → src/components/Ui/Tooltip/Tooltip.css} +0 -0
  93. /package/dist/assets/{ToastContext.css → src/context/ToastContext/ToastContext.module.css} +0 -0
@@ -1,79 +1,50 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import b from "react";
3
- import { g } from "../../../../_commonjsHelpers-C6fGbg64.js";
4
- import { c as s } from "../../../../index-2QXL0WYc.js";
5
- var p, c;
6
- function y() {
7
- return c || (c = 1, p = function r(t, e) {
8
- if (t === e) return !0;
9
- if (t && e && typeof t == "object" && typeof e == "object") {
10
- if (t.constructor !== e.constructor) return !1;
11
- var o, n, u;
12
- if (Array.isArray(t)) {
13
- if (o = t.length, o != e.length) return !1;
14
- for (n = o; n-- !== 0; )
15
- if (!r(t[n], e[n])) return !1;
16
- return !0;
17
- }
18
- if (t.constructor === RegExp) return t.source === e.source && t.flags === e.flags;
19
- if (t.valueOf !== Object.prototype.valueOf) return t.valueOf() === e.valueOf();
20
- if (t.toString !== Object.prototype.toString) return t.toString() === e.toString();
21
- if (u = Object.keys(t), o = u.length, o !== Object.keys(e).length) return !1;
22
- for (n = o; n-- !== 0; )
23
- if (!Object.prototype.hasOwnProperty.call(e, u[n])) return !1;
24
- for (n = o; n-- !== 0; ) {
25
- var f = u[n];
26
- if (!r(t[f], e[f])) return !1;
27
- }
28
- return !0;
29
- }
30
- return t !== t && e !== e;
31
- }), p;
32
- }
33
- var O = y();
34
- const i = /* @__PURE__ */ g(O), S = b.memo(
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import c from "react";
3
+ import m from "../../../../_virtual/index2.js";
4
+ import d from "../../../../_virtual/index.js";
5
+ const h = c.memo(
35
6
  ({
36
- record: r,
37
- columns: t,
38
- rowKey: e,
39
- rowClassName: o,
40
- index: n,
41
- stickyLeft: u,
42
- onClickTr: f,
43
- bordered: m
7
+ record: t,
8
+ columns: _,
9
+ rowKey: a,
10
+ rowClassName: n,
11
+ index: l,
12
+ stickyLeft: r,
13
+ onClickTr: b,
14
+ bordered: i
44
15
  }) => {
45
- const d = (a) => {
46
- !a.target.closest("[data-no-bubble]") && f && f(r);
16
+ const s = (e) => {
17
+ !e.target.closest("[data-no-bubble]") && b && b(t);
47
18
  };
48
- return /* @__PURE__ */ l(
19
+ return /* @__PURE__ */ p(
49
20
  "tr",
50
21
  {
51
- className: s(
22
+ className: d(
52
23
  "table-component__wrapper__table__tbody__tr",
53
- o == null ? void 0 : o(r, n),
24
+ n == null ? void 0 : n(t, l),
54
25
  {
55
- "table-component__wrapper__table__tbody__tr--hoverable": !!f
26
+ "table-component__wrapper__table__tbody__tr--hoverable": !!b
56
27
  }
57
28
  ),
58
- onClick: d,
59
- children: t.map((a, _) => /* @__PURE__ */ l(
29
+ onClick: s,
30
+ children: _.map((e, o) => /* @__PURE__ */ p(
60
31
  "td",
61
32
  {
62
- className: s("table-component__wrapper__table__tbody__td", a.className, {
63
- "table-component__wrapper__table__tbody__td--bordered": m,
64
- "table-component__wrapper__table__tbody__td--sticky-left": u && _ === 0
33
+ className: d("table-component__wrapper__table__tbody__td", e.className, {
34
+ "table-component__wrapper__table__tbody__td--bordered": i,
35
+ "table-component__wrapper__table__tbody__td--sticky-left": r && o === 0
65
36
  }),
66
- align: a.align,
67
- children: a.render ? a.render(r[a.dataIndex], r) : String(r[a.dataIndex] ?? "")
37
+ align: e.align,
38
+ children: e.render ? e.render(t[e.dataIndex], t) : String(t[e.dataIndex] ?? "")
68
39
  },
69
- `${a.key}-${_}`
40
+ `${e.key}-${o}`
70
41
  ))
71
42
  },
72
- typeof e == "function" ? e(r) : String(r[e])
43
+ typeof a == "function" ? a(t) : String(t[a])
73
44
  );
74
45
  },
75
- (r, t) => i(r.columns, t.columns) && i(r.record, t.record)
46
+ (t, _) => m(t.columns, _.columns) && m(t.record, _.record)
76
47
  );
77
48
  export {
78
- S as MemoizedRow
49
+ h as MemoizedRow
79
50
  };
@@ -1,10 +1,11 @@
1
1
  import { jsx as t, jsxs as _ } from "react/jsx-runtime";
2
2
  import U, { useState as N, useEffect as q, useCallback as d } from "react";
3
- import { c as o } from "../../../index-2QXL0WYc.js";
3
+ import o from "../../../_virtual/index.js";
4
+ import '../../../assets/src/components/Ui/Table/Table.css';/* empty css */
4
5
  import { IconCaretDown as w, IconCaretUp as F } from "../Icons/Icons.js";
5
6
  import { MemoizedRow as G } from "./MemoizedRow/MemoizedRow.js";
6
7
  import { Loader as H } from "../Loader/Loader.js";
7
- import '../../../assets/Table.css';const y = {
8
+ const y = {
8
9
  asc: /* @__PURE__ */ t(w, { viewBox: "0 -6 24 24", "aria-hidden": "true" }),
9
10
  desc: /* @__PURE__ */ t(F, { viewBox: "0 -4 24 24", "aria-hidden": "true" }),
10
11
  default: /* @__PURE__ */ t(w, { viewBox: "0 -6 24 24", "aria-hidden": "true" })
@@ -154,7 +155,7 @@ function J({
154
155
  }
155
156
  ) });
156
157
  }
157
- const Z = U.memo(J);
158
+ const K = U.memo(J);
158
159
  export {
159
- Z as Table
160
+ K as Table
160
161
  };
@@ -1,15 +1,16 @@
1
- import { jsxs as o, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
2
  import { useState as v } from "react";
3
- import '../../../assets/Tabs.css';const f = ({ items: s, defaultActiveKey: t, onChange: d }) => {
3
+ import '../../../assets/src/components/Ui/Tabs/Tabs.css';/* empty css */
4
+ const f = ({ items: s, defaultActiveKey: t, onChange: d }) => {
4
5
  var c, b;
5
- const [l, i] = v(t || ((c = s[0]) == null ? void 0 : c.key)), n = (a) => {
6
+ const [l, i] = v(t || ((c = s[0]) == null ? void 0 : c.key)), o = (a) => {
6
7
  s.some((r) => r.key === a && !r.disabled) && (i(a), d == null || d(a));
7
8
  };
8
- return /* @__PURE__ */ o("div", { className: "tabs", children: [
9
+ return /* @__PURE__ */ n("div", { className: "tabs", children: [
9
10
  /* @__PURE__ */ e("div", { className: "tabs-bar", children: s.map((a) => /* @__PURE__ */ e(
10
11
  "button",
11
12
  {
12
- onClick: () => !a.disabled && n(a.key),
13
+ onClick: () => !a.disabled && o(a.key),
13
14
  className: `tab-button ${l === a.key ? "active" : ""} ${a.disabled ? "disabled" : ""}`,
14
15
  disabled: a.disabled,
15
16
  children: a.label
@@ -1,10 +1,11 @@
1
- import { jsxs as m, jsx as e, Fragment as b } from "react/jsx-runtime";
1
+ import { jsxs as d, jsx as e, Fragment as b } from "react/jsx-runtime";
2
2
  import { forwardRef as g, useState as A } from "react";
3
+ import '../../../assets/src/components/Ui/TextInput/TextInput.css';/* empty css */
3
4
  import { IconX as F, IconCheck as R, IconSearch as T, IconLock as X, IconAt as q } from "../Icons/Icons.js";
4
5
  import { Loader as B } from "../Loader/Loader.js";
5
- import '../../../assets/TextInput.css';const D = g(
6
+ const D = g(
6
7
  ({
7
- label: t,
8
+ label: s,
8
9
  placeholder: h = "",
9
10
  value: n,
10
11
  // Значение из пропсов
@@ -24,11 +25,11 @@ import '../../../assets/TextInput.css';const D = g(
24
25
  onKeyDown: z,
25
26
  onBlur: $
26
27
  }, w) => {
27
- const [C, o] = A(""), s = n !== void 0, u = s ? n : C, j = (d) => {
28
- const V = d.target.value;
29
- s || o(V), a && a(d);
28
+ const [C, o] = A(""), t = n !== void 0, u = t ? n : C, j = (m) => {
29
+ const V = m.target.value;
30
+ t || o(V), a && a(m);
30
31
  }, L = () => {
31
- s && a ? a({ target: { value: "" } }) : o("");
32
+ t && a ? a({ target: { value: "" } }) : o("");
32
33
  }, S = () => {
33
34
  switch (c) {
34
35
  case "email":
@@ -43,7 +44,7 @@ import '../../../assets/TextInput.css';const D = g(
43
44
  return /* @__PURE__ */ e(b, {});
44
45
  }
45
46
  };
46
- return /* @__PURE__ */ m(
47
+ return /* @__PURE__ */ d(
47
48
  "div",
48
49
  {
49
50
  className: `text-input
@@ -51,8 +52,8 @@ import '../../../assets/TextInput.css';const D = g(
51
52
  ${N && "invalid"}
52
53
  ${r && "clearable"}`,
53
54
  children: [
54
- t && /* @__PURE__ */ e("label", { children: t }),
55
- /* @__PURE__ */ m("div", { className: `input-container ${c ? `has-icon icon-${c}` : ""}`, children: [
55
+ s && /* @__PURE__ */ e("label", { children: s }),
56
+ /* @__PURE__ */ d("div", { className: `input-container ${c ? `has-icon icon-${c}` : ""}`, children: [
56
57
  /* @__PURE__ */ e(
57
58
  "input",
58
59
  {
@@ -1,12 +1,13 @@
1
- import { jsxs as r, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
2
  import { forwardRef as C, useState as V } from "react";
3
- import { c as $ } from "../../../index-2QXL0WYc.js";
3
+ import '../../../assets/src/components/Ui/TextareaInput/TextareaInput.css';/* empty css */
4
+ import $ from "../../../_virtual/index.js";
4
5
  import { IconX as b } from "../Icons/Icons.js";
5
- import '../../../assets/TextareaInput.css';const g = C(
6
+ const g = C(
6
7
  ({
7
8
  label: c,
8
- name: f = "TextareaInput",
9
- placeholder: p,
9
+ name: p = "TextareaInput",
10
+ placeholder: f,
10
11
  errorMessage: i,
11
12
  hasError: u = !1,
12
13
  isDisabled: x,
@@ -18,15 +19,15 @@ import '../../../assets/TextareaInput.css';const g = C(
18
19
  isClearable: d,
19
20
  spellCheck: N = !1
20
21
  }, h) => {
21
- const [I, m] = V(""), s = o !== void 0, t = s ? o : I, w = (z) => {
22
- const n = z.target.value;
23
- (!a || n.length <= a) && (s || m(n), l && l(n));
22
+ const [I, m] = V(""), t = o !== void 0, s = t ? o : I, w = (z) => {
23
+ const r = z.target.value;
24
+ (!a || r.length <= a) && (t || m(r), l && l(r));
24
25
  }, T = () => {
25
- s && l ? l("") : m("");
26
+ t && l ? l("") : m("");
26
27
  }, j = $({
27
28
  "no-resize": !v
28
29
  });
29
- return /* @__PURE__ */ r(
30
+ return /* @__PURE__ */ n(
30
31
  "div",
31
32
  {
32
33
  className: `textarea-input
@@ -34,24 +35,24 @@ import '../../../assets/TextareaInput.css';const g = C(
34
35
  ${d && "clearable"}`,
35
36
  children: [
36
37
  c && /* @__PURE__ */ e("label", { children: c }),
37
- /* @__PURE__ */ r("div", { className: "textarea-wrapper", children: [
38
+ /* @__PURE__ */ n("div", { className: "textarea-wrapper", children: [
38
39
  /* @__PURE__ */ e(
39
40
  "textarea",
40
41
  {
41
42
  ref: h,
42
43
  className: j,
43
- value: t,
44
+ value: s,
44
45
  onChange: w,
45
- name: f,
46
- placeholder: p,
46
+ name: p,
47
+ placeholder: f,
47
48
  disabled: x,
48
49
  spellCheck: N
49
50
  }
50
51
  ),
51
- d && t && /* @__PURE__ */ e("div", { className: "clear-value", onClick: T, children: /* @__PURE__ */ e(b, { size: 20 }) })
52
+ d && s && /* @__PURE__ */ e("div", { className: "clear-value", onClick: T, children: /* @__PURE__ */ e(b, { size: 20 }) })
52
53
  ] }),
53
- a && /* @__PURE__ */ r("p", { className: "char-limit", children: [
54
- t.length,
54
+ a && /* @__PURE__ */ n("p", { className: "char-limit", children: [
55
+ s.length,
55
56
  "/",
56
57
  a
57
58
  ] }),
@@ -1,6 +1,7 @@
1
1
  import { jsxs as I, jsx as O } from "react/jsx-runtime";
2
2
  import { useState as g, useRef as C, useCallback as u, useEffect as m } from "react";
3
- import '../../../assets/Tooltip2.css';const V = ({
3
+ import '../../../assets/src/components/Ui/Tooltip/Tooltip.css';/* empty css */
4
+ const W = ({
4
5
  content: E,
5
6
  children: y,
6
7
  position: n = "top",
@@ -88,5 +89,5 @@ import '../../../assets/Tooltip2.css';const V = ({
88
89
  ] });
89
90
  };
90
91
  export {
91
- V as Tooltip
92
+ W as Tooltip
92
93
  };
@@ -1,12 +1,7 @@
1
1
  import { jsxs as e, jsx as i } from "react/jsx-runtime";
2
+ import t from "../../../src/components/Ui/Tooltip/Tooltip.stories.module.css.js";
2
3
  import { Tooltip as o } from "./Tooltip.js";
3
- import '../../../assets/Tooltip.css';const c = "_container_193w2_1", r = "_trigger_193w2_14", n = "_clickTrigger_193w2_29 _trigger_193w2_14", l = "_positionsContainer_193w2_38", s = "_positionGroup_193w2_42", t = {
4
- container: c,
5
- trigger: r,
6
- clickTrigger: n,
7
- positionsContainer: l,
8
- positionGroup: s
9
- }, d = {
4
+ const n = {
10
5
  title: "UIKit/Tooltip",
11
6
  component: o,
12
7
  tags: ["autodocs"],
@@ -24,7 +19,7 @@ import '../../../assets/Tooltip.css';const c = "_container_193w2_1", r = "_trigg
24
19
  options: ["toggle", "show", "hide"]
25
20
  }
26
21
  }
27
- }, p = {
22
+ }, s = {
28
23
  render: () => /* @__PURE__ */ e("div", { className: t.container, children: [
29
24
  /* @__PURE__ */ i(o, { content: "Top-left tooltip", className: "white", position: "top", children: /* @__PURE__ */ i("div", { className: t.trigger, children: "Top-left (hover)" }) }),
30
25
  /* @__PURE__ */ i(o, { content: "Top-right tooltip", position: "top", trigger: "click", clickBehavior: "toggle", children: /* @__PURE__ */ i("div", { className: t.clickTrigger, children: "Top-right (click toggle)" }) }),
@@ -32,7 +27,7 @@ import '../../../assets/Tooltip.css';const c = "_container_193w2_1", r = "_trigg
32
27
  /* @__PURE__ */ i(o, { content: "Bottom-left tooltip", position: "left", trigger: "click", clickBehavior: "show", children: /* @__PURE__ */ i("div", { className: t.clickTrigger, children: "Bottom-left (click show)" }) }),
33
28
  /* @__PURE__ */ i(o, { content: "Bottom-right tooltip", position: "right", trigger: "mixed", clickBehavior: "hide", children: /* @__PURE__ */ i("div", { className: t.mixedTrigger, children: "Bottom-right (hover + click hide)" }) })
34
29
  ] })
35
- }, a = {
30
+ }, h = {
36
31
  render: () => /* @__PURE__ */ e("div", { className: t.positionsContainer, children: [
37
32
  /* @__PURE__ */ i("h3", { children: "Hover Triggers" }),
38
33
  /* @__PURE__ */ e("div", { className: t.positionGroup, children: [
@@ -76,7 +71,7 @@ import '../../../assets/Tooltip.css';const c = "_container_193w2_1", r = "_trigg
76
71
  )
77
72
  ] })
78
73
  ] })
79
- }, m = {
74
+ }, g = {
80
75
  args: {
81
76
  content: "Interactive tooltip content",
82
77
  children: /* @__PURE__ */ i("button", { style: { padding: "8px 16px" }, type: "button", children: "Hover or click me" }),
@@ -85,8 +80,8 @@ import '../../../assets/Tooltip.css';const c = "_container_193w2_1", r = "_trigg
85
80
  }
86
81
  };
87
82
  export {
88
- a as AllPositions,
89
- p as EdgeCases,
90
- m as InteractiveExample,
91
- d as default
83
+ h as AllPositions,
84
+ s as EdgeCases,
85
+ g as InteractiveExample,
86
+ n as default
92
87
  };
@@ -1,40 +1,38 @@
1
1
  import { jsxs as v, jsx as d } from "react/jsx-runtime";
2
- import { createContext as f, useState as h, useCallback as u, useMemo as _, useContext as w } from "react";
3
- import C from "react-dom";
4
- import '../../assets/ToastContext.css';const P = "_Wrapper_12sk9_1", W = "_Toast_12sk9_11", m = {
5
- Wrapper: P,
6
- Toast: W
7
- }, T = f(void 0), g = () => {
8
- const o = w(T);
9
- if (!o)
2
+ import { createContext as f, useState as h, useCallback as u, useMemo as w, useContext as C } from "react";
3
+ import P from "react-dom";
4
+ import m from "../../src/context/ToastContext/ToastContext.module.scss.js";
5
+ const l = f(void 0), y = () => {
6
+ const e = C(l);
7
+ if (!e)
10
8
  throw new Error("useToast must be used within a ToastProvider");
11
- return o;
12
- }, j = ({ children: o }) => {
13
- const [l, r] = h([]), p = 3, n = 4e3, c = u((t) => {
14
- r((s) => s.filter((e) => e.id !== t));
9
+ return e;
10
+ }, M = ({ children: e }) => {
11
+ const [T, a] = h([]), p = 3, n = 4e3, c = u((t) => {
12
+ a((o) => o.filter((s) => s.id !== t));
15
13
  }, []), i = u(
16
14
  (t) => {
17
- const s = {
15
+ const o = {
18
16
  id: Date.now(),
19
17
  message: t,
20
18
  duration: n
21
19
  };
22
- r((e) => {
23
- const a = [...e, s];
24
- return a.length > p ? a.slice(1) : a;
25
- }), setTimeout(() => c(s.id), n);
20
+ a((s) => {
21
+ const r = [...s, o];
22
+ return r.length > p ? r.slice(1) : r;
23
+ }), setTimeout(() => c(o.id), n);
26
24
  },
27
25
  [c]
28
- ), x = _(() => ({ addToast: i }), [i]);
29
- return /* @__PURE__ */ v(T.Provider, { value: x, children: [
30
- o,
31
- C.createPortal(
32
- /* @__PURE__ */ d("div", { className: m.Wrapper, children: l.map((t) => /* @__PURE__ */ d("div", { className: m.Toast, children: t.message }, t.id)) }),
26
+ ), x = w(() => ({ addToast: i }), [i]);
27
+ return /* @__PURE__ */ v(l.Provider, { value: x, children: [
28
+ e,
29
+ P.createPortal(
30
+ /* @__PURE__ */ d("div", { className: m.Wrapper, children: T.map((t) => /* @__PURE__ */ d("div", { className: m.Toast, children: t.message }, t.id)) }),
33
31
  document.body
34
32
  )
35
33
  ] });
36
34
  };
37
35
  export {
38
- j as ToastProvider,
39
- g as useToast
36
+ M as ToastProvider,
37
+ y as useToast
40
38
  };
package/dist/main.d.ts CHANGED
@@ -132,20 +132,6 @@ export declare type Column<T extends object = Record<string, unknown>> = {
132
132
 
133
133
  export declare const CustomLink: default_2.FC<LinkProps>;
134
134
 
135
- export declare const DatePicker: default_2.FC<DatePickerProps>;
136
-
137
- declare interface DatePickerProps {
138
- name?: string;
139
- value?: Date | null;
140
- onChange?: (date: Date | null) => void;
141
- placeholder?: string;
142
- className?: string;
143
- inputClassName?: string;
144
- calendarClassName?: string;
145
- minDate?: Date;
146
- maxDate?: Date;
147
- }
148
-
149
135
  export declare const DropdownInput: default_2.FC<DropdownInputProps>;
150
136
 
151
137
  declare type DropdownInputProps = {