mimir-ui-kit 1.15.1 → 1.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. package/dist/Input-BFFPzelg.js +228 -0
  2. package/dist/{ProgressBar-BekX41HR.js → ProgressBar-CwLwhaeM.js} +23 -23
  3. package/dist/assets/Input.css +1 -1
  4. package/dist/assets/ListPhotos.css +1 -1
  5. package/dist/assets/OtpInput.css +1 -1
  6. package/dist/assets/ProgressBar2.css +1 -1
  7. package/dist/assets/SelectSearch.css +1 -1
  8. package/dist/assets/TextArea.css +1 -0
  9. package/dist/assets/UploaderPhotos.css +1 -1
  10. package/dist/assets/index.css +1 -1
  11. package/dist/components/DatePicker/DatePicker.d.ts +1 -9
  12. package/dist/components/DatePicker/DatePicker.js +1 -1
  13. package/dist/components/Input/Input.d.ts +11 -27
  14. package/dist/components/Input/Input.js +9 -120
  15. package/dist/components/Input/index.d.ts +1 -1
  16. package/dist/components/Input/index.js +2 -2
  17. package/dist/components/Input/types.d.ts +11 -0
  18. package/dist/components/InputPassword/InputPassword.d.ts +1 -9
  19. package/dist/components/InputPassword/InputPassword.js +1 -1
  20. package/dist/components/InputPhoneNumber/InputPhoneNumber.d.ts +1 -9
  21. package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
  22. package/dist/components/ListPhotos/ListPhotos.js +1 -1
  23. package/dist/components/OtpInput/OtpInput.js +5 -5
  24. package/dist/components/SelectSearch/SelectSearch.d.ts +0 -7
  25. package/dist/components/SelectSearch/SelectSearch.js +3802 -640
  26. package/dist/components/SelectSearch/index.d.ts +1 -1
  27. package/dist/components/SelectSearch/types.d.ts +16 -11
  28. package/dist/components/TextArea/TextArea.d.ts +5 -0
  29. package/dist/components/TextArea/TextArea.js +209 -0
  30. package/dist/components/TextArea/hooks.d.ts +1 -0
  31. package/dist/components/TextArea/hooks.js +13 -0
  32. package/dist/components/TextArea/index.d.ts +1 -0
  33. package/dist/components/TextArea/index.js +4 -0
  34. package/dist/components/TextArea/types.d.ts +3 -0
  35. package/dist/components/TextArea/types.js +1 -0
  36. package/dist/components/Toasts/ProgressBar.js +1 -1
  37. package/dist/components/Toasts/Toast.js +1 -1
  38. package/dist/components/Toasts/ToastList.js +1 -1
  39. package/dist/components/Toasts/ToastsProvider.js +1 -1
  40. package/dist/components/Uploader/Uploader.d.ts +10 -1
  41. package/dist/components/Uploader/Uploader.js +62 -56
  42. package/dist/components/UploaderPhotos/UploaderPhotos.d.ts +10 -1
  43. package/dist/components/UploaderPhotos/UploaderPhotos.js +50 -34
  44. package/dist/components/index.d.ts +3 -3
  45. package/dist/components/index.js +4 -4
  46. package/dist/hooks/index.d.ts +1 -0
  47. package/dist/hooks/index.js +2 -0
  48. package/dist/hooks/useMergeRefs/index.d.ts +1 -0
  49. package/dist/hooks/useMergeRefs/index.js +4 -0
  50. package/dist/hooks/useMergeRefs/useMergeRefs.d.ts +4 -0
  51. package/dist/hooks/useMergeRefs/useMergeRefs.js +28 -0
  52. package/dist/icons/components/12px/Close12px.js +1 -1
  53. package/dist/index.js +6 -4
  54. package/package.json +2 -3
  55. package/dist/SelectSearchOption-snHM9uZX.js +0 -3796
  56. package/dist/assets/SelectSearchOption.css +0 -1
  57. package/dist/components/SelectSearchOption/SelectSearchOption.d.ts +0 -10
  58. package/dist/components/SelectSearchOption/SelectSearchOption.js +0 -8
  59. package/dist/components/SelectSearchOption/index.d.ts +0 -2
  60. package/dist/components/SelectSearchOption/index.js +0 -4
@@ -1,7 +1,8 @@
1
1
  import { Button } from "./Button/Button.js";
2
2
  import { EButtonForm, EButtonSize, EButtonVariantDefault, EButtonVariantOutline, EButtonVariantRound } from "./Button/constants.js";
3
- import { Input } from "./Input/Input.js";
3
+ import { I } from "../Input-BFFPzelg.js";
4
4
  import { EInputSize, EInputVariant } from "./Input/constants.js";
5
+ import { TextArea } from "./TextArea/TextArea.js";
5
6
  import { InputPassword } from "./InputPassword/InputPassword.js";
6
7
  import { InputPhoneNumber } from "./InputPhoneNumber/InputPhoneNumber.js";
7
8
  import { getMaskedInputPhoneValue, getUnmaskedInputValue } from "./InputPhoneNumber/utils.js";
@@ -21,7 +22,6 @@ import { Vote } from "./Vote/Vote.js";
21
22
  import { EVoteSize } from "./Vote/constants.js";
22
23
  import { SelectSearch } from "./SelectSearch/SelectSearch.js";
23
24
  import { ESelectSearchSize } from "./SelectSearch/constants.js";
24
- import { S } from "../SelectSearchOption-snHM9uZX.js";
25
25
  import { Switch } from "./Switch/Switch.js";
26
26
  import { Tag } from "./Tag/Tag.js";
27
27
  import { ETagSize, ETagType } from "./Tag/constants.js";
@@ -64,7 +64,7 @@ export {
64
64
  EToastVariant,
65
65
  EVoteSize,
66
66
  AppImage as Image,
67
- Input,
67
+ I as Input,
68
68
  InputPassword,
69
69
  InputPhoneNumber,
70
70
  Loader,
@@ -73,12 +73,12 @@ export {
73
73
  Pagination,
74
74
  RadioGroup,
75
75
  SelectSearch,
76
- S as SelectSearchOption,
77
76
  Slider,
78
77
  Steps,
79
78
  Switch,
80
79
  TabTrail,
81
80
  Tag,
81
+ TextArea,
82
82
  Timer,
83
83
  ToastProvider,
84
84
  Uploader,
@@ -3,3 +3,4 @@ export { useLockBodyScroll } from './useLockBodyScroll';
3
3
  export { useInterval } from './useInterval';
4
4
  export { useTimer } from './useTimer';
5
5
  export { useCopyToClipboard } from './useCopyToClipboard';
6
+ export { useMergeRefs } from './useMergeRefs';
@@ -4,6 +4,7 @@ import { useLockBodyScroll } from "./useLockBodyScroll/useLockBodyScroll.js";
4
4
  import { useInterval } from "./useInterval/useInterval.js";
5
5
  import { useTimer } from "./useTimer/index.js";
6
6
  import { useCopyToClipboard } from "./useCopyToClipboard/useCopyToClipboard.js";
7
+ import { useMergeRefs } from "./useMergeRefs/useMergeRefs.js";
7
8
  export {
8
9
  EMediaQuery,
9
10
  EMinMediaQuery,
@@ -11,5 +12,6 @@ export {
11
12
  useInterval,
12
13
  useLockBodyScroll,
13
14
  useMediaQuery,
15
+ useMergeRefs,
14
16
  useTimer
15
17
  };
@@ -0,0 +1 @@
1
+ export { useMergeRefs } from './useMergeRefs';
@@ -0,0 +1,4 @@
1
+ import { useMergeRefs } from "./useMergeRefs.js";
2
+ export {
3
+ useMergeRefs
4
+ };
@@ -0,0 +1,4 @@
1
+ export type ReactRef<T> = React.RefCallback<T> | React.MutableRefObject<T>;
2
+ export declare function assignRef<T = unknown>(ref: ReactRef<T> | null | undefined, value: T): void;
3
+ export declare function mergeRefs<T>(...refs: (ReactRef<T> | null | undefined)[]): (node: T | null) => void;
4
+ export declare function useMergeRefs<T>(...refs: (ReactRef<T> | null | undefined)[]): (node: T | null) => void;
@@ -0,0 +1,28 @@
1
+ import { useMemo } from "react";
2
+ function assignRef(ref, value) {
3
+ if (ref == null) return;
4
+ if (typeof ref === "function") {
5
+ ref(value);
6
+ return;
7
+ }
8
+ try {
9
+ ref.current = value;
10
+ } catch (error) {
11
+ throw new Error(`Cannot assign value '${value}' to ref '${ref}'`);
12
+ }
13
+ }
14
+ function mergeRefs(...refs) {
15
+ return (node) => {
16
+ refs.forEach((ref) => {
17
+ assignRef(ref, node);
18
+ });
19
+ };
20
+ }
21
+ function useMergeRefs(...refs) {
22
+ return useMemo(() => mergeRefs(...refs), refs);
23
+ }
24
+ export {
25
+ assignRef,
26
+ mergeRefs,
27
+ useMergeRefs
28
+ };
@@ -9,7 +9,7 @@ const Close12px = (props) => {
9
9
  fill: "none",
10
10
  xmlns: "http://www.w3.org/2000/svg",
11
11
  ...props,
12
- children: /* @__PURE__ */ jsx("path", { d: "M3 9L8.99991 3M9 9L3 3", stroke: "#333333", "stroke-width": "1.5" })
12
+ children: /* @__PURE__ */ jsx("path", { d: "M3 9L8.99991 3M9 9L3 3", stroke: "#333333", strokeWidth: "1.5" })
13
13
  }
14
14
  );
15
15
  };
package/dist/index.js CHANGED
@@ -1,7 +1,8 @@
1
1
  import { Button } from "./components/Button/Button.js";
2
2
  import { EButtonForm, EButtonSize, EButtonVariantDefault, EButtonVariantOutline, EButtonVariantRound } from "./components/Button/constants.js";
3
- import { Input } from "./components/Input/Input.js";
3
+ import { I } from "./Input-BFFPzelg.js";
4
4
  import { EInputSize, EInputVariant } from "./components/Input/constants.js";
5
+ import { TextArea } from "./components/TextArea/TextArea.js";
5
6
  import { InputPassword } from "./components/InputPassword/InputPassword.js";
6
7
  import { InputPhoneNumber } from "./components/InputPhoneNumber/InputPhoneNumber.js";
7
8
  import { getMaskedInputPhoneValue, getUnmaskedInputValue } from "./components/InputPhoneNumber/utils.js";
@@ -21,7 +22,6 @@ import { Vote } from "./components/Vote/Vote.js";
21
22
  import { EVoteSize } from "./components/Vote/constants.js";
22
23
  import { SelectSearch } from "./components/SelectSearch/SelectSearch.js";
23
24
  import { ESelectSearchSize } from "./components/SelectSearch/constants.js";
24
- import { S } from "./SelectSearchOption-snHM9uZX.js";
25
25
  import { Switch } from "./components/Switch/Switch.js";
26
26
  import { Tag } from "./components/Tag/Tag.js";
27
27
  import { ETagSize, ETagType } from "./components/Tag/constants.js";
@@ -43,6 +43,7 @@ import { useLockBodyScroll } from "./hooks/useLockBodyScroll/useLockBodyScroll.j
43
43
  import { useInterval } from "./hooks/useInterval/useInterval.js";
44
44
  import { useTimer } from "./hooks/useTimer/index.js";
45
45
  import { useCopyToClipboard } from "./hooks/useCopyToClipboard/useCopyToClipboard.js";
46
+ import { useMergeRefs } from "./hooks/useMergeRefs/useMergeRefs.js";
46
47
  import { Icon } from "./icons/Icon.js";
47
48
  import { formating } from "./utils/index.js";
48
49
  import './assets/index.css';export {
@@ -75,7 +76,7 @@ import './assets/index.css';export {
75
76
  EVoteSize,
76
77
  Icon,
77
78
  AppImage as Image,
78
- Input,
79
+ I as Input,
79
80
  InputPassword,
80
81
  InputPhoneNumber,
81
82
  Loader,
@@ -84,12 +85,12 @@ import './assets/index.css';export {
84
85
  Pagination,
85
86
  RadioGroup,
86
87
  SelectSearch,
87
- S as SelectSearchOption,
88
88
  Slider,
89
89
  Steps,
90
90
  Switch,
91
91
  TabTrail,
92
92
  Tag,
93
+ TextArea,
93
94
  Timer,
94
95
  ToastProvider,
95
96
  Uploader,
@@ -102,6 +103,7 @@ import './assets/index.css';export {
102
103
  useInterval,
103
104
  useLockBodyScroll,
104
105
  useMediaQuery,
106
+ useMergeRefs,
105
107
  useTimer,
106
108
  useToast
107
109
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mimir-ui-kit",
3
3
  "private": false,
4
- "version": "1.15.1",
4
+ "version": "1.16.0",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {
@@ -107,8 +107,7 @@
107
107
  "@headlessui/react": "^2.1.2",
108
108
  "react": "^18.3.1",
109
109
  "react-dom": "^18.3.1",
110
- "swiper": "^11.1.5",
111
- "react-window": "^1.8.10"
110
+ "swiper": "^11.1.5"
112
111
  },
113
112
  "husky": {
114
113
  "hooks": {