mimir-ui-kit 1.35.4 → 1.36.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. package/dist/{Input-B-gKQ9FT.js → Input-DlGNMuUD.js} +67 -64
  2. package/dist/assets/Input.css +1 -1
  3. package/dist/assets/ListPhotos.css +1 -1
  4. package/dist/assets/MultiSelectSearch.css +1 -0
  5. package/dist/assets/SelectSearch.css +1 -1
  6. package/dist/combobox-CDU06zJj.js +2855 -0
  7. package/dist/components/Accordion/Accordion.js +168 -166
  8. package/dist/components/Button/Button.d.ts +36 -0
  9. package/dist/components/Button/Button.js +44 -43
  10. package/dist/components/CheckboxMimir/CheckboxMimir.d.ts +2 -0
  11. package/dist/components/CheckboxMimir/CheckboxMimir.js +37 -30
  12. package/dist/components/Chip/Chip.d.ts +5 -1
  13. package/dist/components/Chip/Chip.js +23 -22
  14. package/dist/components/DatePicker/DatePicker.js +1 -1
  15. package/dist/components/Input/Input.js +1 -1
  16. package/dist/components/Input/index.js +1 -1
  17. package/dist/components/InputPassword/InputPassword.js +1 -1
  18. package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
  19. package/dist/components/ListPhotos/ListPhotos.js +4 -4
  20. package/dist/components/MultiSelectSearch/MultiSelectSearch.d.ts +22 -0
  21. package/dist/components/MultiSelectSearch/MultiSelectSearch.js +318 -0
  22. package/dist/components/MultiSelectSearch/constants.d.ts +4 -0
  23. package/dist/components/MultiSelectSearch/constants.js +4 -0
  24. package/dist/components/MultiSelectSearch/index.d.ts +3 -0
  25. package/dist/components/MultiSelectSearch/index.js +6 -0
  26. package/dist/components/MultiSelectSearch/types.d.ts +60 -0
  27. package/dist/components/MultiSelectSearch/utils.d.ts +8 -0
  28. package/dist/components/MultiSelectSearch/utils.js +19 -0
  29. package/dist/components/OtpInput/OtpInput.js +1 -1
  30. package/dist/components/SelectSearch/SelectSearch.js +172 -3017
  31. package/dist/components/SelectSearch/utils.d.ts +5 -0
  32. package/dist/components/SelectSearch/utils.js +17 -0
  33. package/dist/components/Switcher/Switcher.js +48 -48
  34. package/dist/components/TabTrail/TabTrail.js +171 -171
  35. package/dist/components/TextArea/TextArea.js +1 -1
  36. package/dist/components/index.d.ts +3 -0
  37. package/dist/components/index.js +48 -44
  38. package/dist/index.js +50 -46
  39. package/dist/open-closed-CdldUPoq.js +86 -0
  40. package/dist/use-resolve-button-type-DhFdPxnv.js +12 -0
  41. package/package.json +3 -2
  42. package/dist/open-closed-Cy6VDfYc.js +0 -93
  43. package/dist/use-resolve-button-type-BAxjHhds.js +0 -19
@@ -1,17 +1,17 @@
1
1
  import { Button as e } from "./Button/Button.js";
2
- import { EButtonForm as p, EButtonSize as a, EButtonVariantBorderless as m, EButtonVariantDefault as i, EButtonVariantOutline as f, EButtonVariantRound as x } from "./Button/constants.js";
3
- import { I as E } from "../Input-B-gKQ9FT.js";
4
- import { EInputSize as u, EInputStatus as s, EInputVariant as l } from "./Input/constants.js";
2
+ import { EButtonForm as p, EButtonSize as a, EButtonVariantBorderless as i, EButtonVariantDefault as m, EButtonVariantOutline as f, EButtonVariantRound as x } from "./Button/constants.js";
3
+ import { I as S } from "../Input-DlGNMuUD.js";
4
+ import { EInputSize as u, EInputStatus as l, EInputVariant as s } from "./Input/constants.js";
5
5
  import { TextArea as c } from "./TextArea/TextArea.js";
6
6
  import { InputPassword as I } from "./InputPassword/InputPassword.js";
7
7
  import { InputPhoneNumber as k } from "./InputPhoneNumber/InputPhoneNumber.js";
8
- import { getMaskedInputPhoneValue as V, getUnmaskedInputValue as z } from "./InputPhoneNumber/utils.js";
8
+ import { getMaskedInputPhoneValue as B, getUnmaskedInputValue as V } from "./InputPhoneNumber/utils.js";
9
9
  import { OtpInput as P } from "./OtpInput/OtpInput.js";
10
10
  import { RadioGroup as U } from "./RadioGroup/RadioGroup.js";
11
11
  import { DatePicker as C } from "./DatePicker/DatePicker.js";
12
- import { MergedButton as b } from "./MergedButton/MergedButton.js";
13
- import { EMergedButtonVariantRound as v } from "./MergedButton/constants.js";
14
- import { AppImage as G } from "./Image/Image.js";
12
+ import { MergedButton as R } from "./MergedButton/MergedButton.js";
13
+ import { EMergedButtonVariantRound as L } from "./MergedButton/constants.js";
14
+ import { AppImage as D } from "./Image/Image.js";
15
15
  import { Loader as y } from "./Loader/Loader.js";
16
16
  import { Slider as Z } from "./Slider/index.js";
17
17
  import { Drawer as O } from "./Drawer/Drawer.js";
@@ -23,20 +23,20 @@ import { EVoteSize as $ } from "./Vote/constants.js";
23
23
  import { SelectSearch as ro } from "./SelectSearch/SelectSearch.js";
24
24
  import { ESelectSearchSize as to } from "./SelectSearch/constants.js";
25
25
  import { CheckboxMimir as ao } from "./CheckboxMimir/CheckboxMimir.js";
26
- import { Tag as io } from "./Tag/Tag.js";
26
+ import { Tag as mo } from "./Tag/Tag.js";
27
27
  import { ETagSize as xo, ETagType as no } from "./Tag/constants.js";
28
- import { Timer as So } from "./Timer/Timer.js";
29
- import { Accordion as so } from "./Accordion/Accordion.js";
28
+ import { Timer as Eo } from "./Timer/Timer.js";
29
+ import { Accordion as lo } from "./Accordion/Accordion.js";
30
30
  import { EAccordionSize as co } from "./Accordion/constants.js";
31
31
  import { AccordionItem as Io } from "./Accordion/AccordionItem/AccordionItem.js";
32
32
  import { TabTrail as ko } from "./TabTrail/TabTrail.js";
33
- import { ETabTrailSize as Vo } from "./TabTrail/constants.js";
33
+ import { ETabTrailSize as Bo } from "./TabTrail/constants.js";
34
34
  import { Pagination as ho } from "./Pagination/Pagination.js";
35
35
  import { ToastProvider as Ao } from "./Toasts/ToastsProvider.js";
36
36
  import { useToast as wo } from "./Toasts/hooks.js";
37
- import { EToastPosition as Ro, EToastVariant as bo } from "./Toasts/constants.js";
38
- import { UploaderPhotos as vo } from "./UploaderPhotos/UploaderPhotos.js";
39
- import { UploaderFiles as Go } from "./UploaderFiles/UploaderFiles.js";
37
+ import { EToastPosition as Mo, EToastVariant as Ro } from "./Toasts/constants.js";
38
+ import { UploaderPhotos as Lo } from "./UploaderPhotos/UploaderPhotos.js";
39
+ import { UploaderFiles as Do } from "./UploaderFiles/UploaderFiles.js";
40
40
  import { Uploader as yo } from "./Uploader/Uploader.js";
41
41
  import { Link as Zo } from "./AnchorLink/Link.js";
42
42
  import { ELinkSize as Oo, ELinkVariant as jo } from "./AnchorLink/constants.js";
@@ -47,20 +47,22 @@ import { EChipSize as Yo, EChipVariant as _o } from "./Chip/constants.js";
47
47
  import { UniversalUploader as or } from "./UniversalUploader/UniversalUploader.js";
48
48
  import { EUploaderType as er } from "./UniversalUploader/constants.js";
49
49
  import { InputRangeSlider as pr } from "./InputRangeSlider/InputRangeSlider.js";
50
- import { EInputRangeSliderBorderState as mr, EInputRangeSliderPositions as ir } from "./InputRangeSlider/constants.js";
50
+ import { EInputRangeSliderBorderState as ir, EInputRangeSliderPositions as mr } from "./InputRangeSlider/constants.js";
51
51
  import { GosZnak as xr } from "./GosZnak/GosZnak.js";
52
- import { EGosZnakSize as Er, EGosZnakType as Sr } from "./GosZnak/constants.js";
53
- import { Switcher as sr } from "./Switcher/Switcher.js";
52
+ import { EGosZnakSize as Sr, EGosZnakType as Er } from "./GosZnak/constants.js";
53
+ import { Switcher as lr } from "./Switcher/Switcher.js";
54
54
  import { ELabelPositions as dr } from "./Switcher/constants.js";
55
55
  import { TwinSwitcher as Tr } from "./TwinSwitcher/TwinSwitcher.js";
56
56
  import { SkeletonBrick as gr } from "./Skeleton/SkeletonBrick/SkeletonBrick.js";
57
- import { SkeletonText as Br } from "./Skeleton/SkeletonText/SkeletonText.js";
58
- import { SkeletonCircle as zr } from "./Skeleton/SkeletonCircle/SkeletonCircle.js";
57
+ import { SkeletonText as zr } from "./Skeleton/SkeletonText/SkeletonText.js";
58
+ import { SkeletonCircle as Vr } from "./Skeleton/SkeletonCircle/SkeletonCircle.js";
59
59
  import { ESkeletonVariant as Pr } from "./Skeleton/constants.js";
60
60
  import { Avatar as Ur } from "./Avatar/Avatar.js";
61
61
  import { EAvatarSize as Cr } from "./Avatar/constants.js";
62
+ import { MultiSelectSearch as Rr } from "./MultiSelectSearch/MultiSelectSearch.js";
63
+ import { EMultiSelectSearchSize as Lr } from "./MultiSelectSearch/constants.js";
62
64
  export {
63
- so as Accordion,
65
+ lo as Accordion,
64
66
  Io as AccordionItem,
65
67
  Ur as Avatar,
66
68
  e as Button,
@@ -72,68 +74,70 @@ export {
72
74
  Cr as EAvatarSize,
73
75
  p as EButtonForm,
74
76
  a as EButtonSize,
75
- m as EButtonVariantBorderless,
76
- i as EButtonVariantDefault,
77
+ i as EButtonVariantBorderless,
78
+ m as EButtonVariantDefault,
77
79
  f as EButtonVariantOutline,
78
80
  x as EButtonVariantRound,
79
81
  Yo as EChipSize,
80
82
  _o as EChipVariant,
81
83
  q as EDrawerPosition,
82
- Er as EGosZnakSize,
83
- Sr as EGosZnakType,
84
- mr as EInputRangeSliderBorderState,
85
- ir as EInputRangeSliderPositions,
84
+ Sr as EGosZnakSize,
85
+ Er as EGosZnakType,
86
+ ir as EInputRangeSliderBorderState,
87
+ mr as EInputRangeSliderPositions,
86
88
  u as EInputSize,
87
- s as EInputStatus,
88
- l as EInputVariant,
89
+ l as EInputStatus,
90
+ s as EInputVariant,
89
91
  dr as ELabelPositions,
90
92
  Oo as ELinkSize,
91
93
  jo as ELinkVariant,
92
- v as EMergedButtonVariantRound,
94
+ L as EMergedButtonVariantRound,
95
+ Lr as EMultiSelectSearchSize,
93
96
  Ko as ENotificationBadgeSize,
94
97
  to as ESelectSearchSize,
95
98
  Pr as ESkeletonVariant,
96
99
  Q as EStepColor,
97
100
  W as EStepsSize,
98
- Vo as ETabTrailSize,
101
+ Bo as ETabTrailSize,
99
102
  xo as ETagSize,
100
103
  no as ETagType,
101
- Ro as EToastPosition,
102
- bo as EToastVariant,
104
+ Mo as EToastPosition,
105
+ Ro as EToastVariant,
103
106
  er as EUploaderType,
104
107
  $ as EVoteSize,
105
108
  xr as GosZnak,
106
- G as Image,
107
- E as Input,
109
+ D as Image,
110
+ S as Input,
108
111
  I as InputPassword,
109
112
  k as InputPhoneNumber,
110
113
  pr as InputRangeSlider,
111
114
  Zo as Link,
112
115
  y as Loader,
113
- b as MergedButton,
116
+ R as MergedButton,
117
+ Rr as MultiSelectSearch,
114
118
  Ho as NotificationBadge,
115
119
  P as OtpInput,
116
120
  ho as Pagination,
117
121
  U as RadioGroup,
118
122
  ro as SelectSearch,
119
123
  gr as SkeletonBrick,
120
- zr as SkeletonCircle,
121
- Br as SkeletonText,
124
+ Vr as SkeletonCircle,
125
+ zr as SkeletonText,
122
126
  Z as Slider,
123
127
  J as Steps,
124
- sr as Switcher,
128
+ lr as Switcher,
125
129
  ko as TabTrail,
126
- io as Tag,
130
+ mo as Tag,
127
131
  c as TextArea,
128
- So as Timer,
132
+ Eo as Timer,
129
133
  Ao as ToastProvider,
130
134
  Tr as TwinSwitcher,
131
135
  or as UniversalUploader,
132
136
  yo as Uploader,
133
- Go as UploaderFiles,
134
- vo as UploaderPhotos,
137
+ Do as UploaderFiles,
138
+ Lo as UploaderPhotos,
135
139
  Y as Vote,
136
- V as getMaskedInputPhoneValue,
137
- z as getUnmaskedInputValue,
140
+ B as getMaskedInputPhoneValue,
141
+ V as getUnmaskedInputValue,
138
142
  wo as useToast
139
143
  };
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { Button as e } from "./components/Button/Button.js";
2
2
  import { EButtonForm as p, EButtonSize as a, EButtonVariantBorderless as m, EButtonVariantDefault as f, EButtonVariantOutline as i, EButtonVariantRound as x } from "./components/Button/constants.js";
3
- import { I as u } from "./Input-B-gKQ9FT.js";
4
- import { EInputSize as E, EInputStatus as S, EInputVariant as d } from "./components/Input/constants.js";
3
+ import { I as u } from "./Input-DlGNMuUD.js";
4
+ import { EInputSize as S, EInputStatus as E, EInputVariant as l } from "./components/Input/constants.js";
5
5
  import { TextArea as c } from "./components/TextArea/TextArea.js";
6
6
  import { InputPassword as I } from "./components/InputPassword/InputPassword.js";
7
7
  import { InputPhoneNumber as k } from "./components/InputPhoneNumber/InputPhoneNumber.js";
8
- import { getMaskedInputPhoneValue as z, getUnmaskedInputValue as V } from "./components/InputPhoneNumber/utils.js";
9
- import { OtpInput as P } from "./components/OtpInput/OtpInput.js";
8
+ import { getMaskedInputPhoneValue as B, getUnmaskedInputValue as V } from "./components/InputPhoneNumber/utils.js";
9
+ import { OtpInput as M } from "./components/OtpInput/OtpInput.js";
10
10
  import { RadioGroup as y } from "./components/RadioGroup/RadioGroup.js";
11
11
  import { DatePicker as R } from "./components/DatePicker/DatePicker.js";
12
12
  import { MergedButton as A } from "./components/MergedButton/MergedButton.js";
@@ -26,13 +26,13 @@ import { CheckboxMimir as ao } from "./components/CheckboxMimir/CheckboxMimir.js
26
26
  import { Tag as fo } from "./components/Tag/Tag.js";
27
27
  import { ETagSize as xo, ETagType as no } from "./components/Tag/constants.js";
28
28
  import { Timer as so } from "./components/Timer/Timer.js";
29
- import { Accordion as So } from "./components/Accordion/Accordion.js";
29
+ import { Accordion as Eo } from "./components/Accordion/Accordion.js";
30
30
  import { EAccordionSize as co } from "./components/Accordion/constants.js";
31
31
  import { AccordionItem as Io } from "./components/Accordion/AccordionItem/AccordionItem.js";
32
32
  import { TabTrail as ko } from "./components/TabTrail/TabTrail.js";
33
- import { ETabTrailSize as zo } from "./components/TabTrail/constants.js";
33
+ import { ETabTrailSize as Bo } from "./components/TabTrail/constants.js";
34
34
  import { Pagination as ho } from "./components/Pagination/Pagination.js";
35
- import { ToastProvider as Mo } from "./components/Toasts/ToastsProvider.js";
35
+ import { ToastProvider as Po } from "./components/Toasts/ToastsProvider.js";
36
36
  import { useToast as Co } from "./components/Toasts/hooks.js";
37
37
  import { EToastPosition as bo, EToastVariant as Ao } from "./components/Toasts/constants.js";
38
38
  import { UploaderPhotos as vo } from "./components/UploaderPhotos/UploaderPhotos.js";
@@ -50,28 +50,30 @@ import { InputRangeSlider as pr } from "./components/InputRangeSlider/InputRange
50
50
  import { EInputRangeSliderBorderState as mr, EInputRangeSliderPositions as fr } from "./components/InputRangeSlider/constants.js";
51
51
  import { GosZnak as xr } from "./components/GosZnak/GosZnak.js";
52
52
  import { EGosZnakSize as ur, EGosZnakType as sr } from "./components/GosZnak/constants.js";
53
- import { Switcher as Sr } from "./components/Switcher/Switcher.js";
54
- import { ELabelPositions as lr } from "./components/Switcher/constants.js";
53
+ import { Switcher as Er } from "./components/Switcher/Switcher.js";
54
+ import { ELabelPositions as dr } from "./components/Switcher/constants.js";
55
55
  import { TwinSwitcher as Tr } from "./components/TwinSwitcher/TwinSwitcher.js";
56
56
  import { SkeletonBrick as gr } from "./components/Skeleton/SkeletonBrick/SkeletonBrick.js";
57
- import { SkeletonText as Br } from "./components/Skeleton/SkeletonText/SkeletonText.js";
57
+ import { SkeletonText as zr } from "./components/Skeleton/SkeletonText/SkeletonText.js";
58
58
  import { SkeletonCircle as Vr } from "./components/Skeleton/SkeletonCircle/SkeletonCircle.js";
59
- import { ESkeletonVariant as Pr } from "./components/Skeleton/constants.js";
59
+ import { ESkeletonVariant as Mr } from "./components/Skeleton/constants.js";
60
60
  import { Avatar as yr } from "./components/Avatar/Avatar.js";
61
61
  import { EAvatarSize as Rr } from "./components/Avatar/constants.js";
62
- import { useMediaQuery as Ar } from "./hooks/useMediaQuery/useMediaQuery.js";
63
- import { EMediaQuery as vr, EMinMediaQuery as wr } from "./hooks/useMediaQuery/constants.js";
64
- import { useLockBodyScroll as Dr } from "./hooks/useLockBodyScroll/useLockBodyScroll.js";
65
- import { useInterval as Nr } from "./hooks/useInterval/useInterval.js";
66
- import { useTimer as Qr } from "./hooks/useTimer/index.js";
67
- import { useCopyToClipboard as Fr } from "./hooks/useCopyToClipboard/useCopyToClipboard.js";
68
- import { useMergeRefs as qr } from "./hooks/useMergeRefs/useMergeRefs.js";
69
- import { useResizeObserver as Jr } from "./hooks/useResizeObserver/useResizeObserver.js";
70
- import { Icon as Wr } from "./icons/Icon.js";
71
- import { formating as Yr } from "./utils/index.js";
72
- import { parseDate as $r } from "./utils/formating/Date.js";
62
+ import { MultiSelectSearch as Ar } from "./components/MultiSelectSearch/MultiSelectSearch.js";
63
+ import { EMultiSelectSearchSize as vr } from "./components/MultiSelectSearch/constants.js";
64
+ import { useMediaQuery as Lr } from "./hooks/useMediaQuery/useMediaQuery.js";
65
+ import { EMediaQuery as Gr, EMinMediaQuery as Nr } from "./hooks/useMediaQuery/constants.js";
66
+ import { useLockBodyScroll as Qr } from "./hooks/useLockBodyScroll/useLockBodyScroll.js";
67
+ import { useInterval as Fr } from "./hooks/useInterval/useInterval.js";
68
+ import { useTimer as qr } from "./hooks/useTimer/index.js";
69
+ import { useCopyToClipboard as Jr } from "./hooks/useCopyToClipboard/useCopyToClipboard.js";
70
+ import { useMergeRefs as Wr } from "./hooks/useMergeRefs/useMergeRefs.js";
71
+ import { useResizeObserver as Yr } from "./hooks/useResizeObserver/useResizeObserver.js";
72
+ import { Icon as $r } from "./icons/Icon.js";
73
+ import { formating as re } from "./utils/index.js";
74
+ import { parseDate as te } from "./utils/formating/Date.js";
73
75
  import './assets/index.css';export {
74
- So as Accordion,
76
+ Eo as Accordion,
75
77
  Io as AccordionItem,
76
78
  yr as Avatar,
77
79
  e as Button,
@@ -94,21 +96,22 @@ import './assets/index.css';export {
94
96
  sr as EGosZnakType,
95
97
  mr as EInputRangeSliderBorderState,
96
98
  fr as EInputRangeSliderPositions,
97
- E as EInputSize,
98
- S as EInputStatus,
99
- d as EInputVariant,
100
- lr as ELabelPositions,
99
+ S as EInputSize,
100
+ E as EInputStatus,
101
+ l as EInputVariant,
102
+ dr as ELabelPositions,
101
103
  Zo as ELinkSize,
102
104
  Fo as ELinkVariant,
103
- vr as EMediaQuery,
105
+ Gr as EMediaQuery,
104
106
  v as EMergedButtonVariantRound,
105
- wr as EMinMediaQuery,
107
+ Nr as EMinMediaQuery,
108
+ vr as EMultiSelectSearchSize,
106
109
  Jo as ENotificationBadgeSize,
107
110
  to as ESelectSearchSize,
108
- Pr as ESkeletonVariant,
111
+ Mr as ESkeletonVariant,
109
112
  K as EStepColor,
110
113
  W as EStepsSize,
111
- zo as ETabTrailSize,
114
+ Bo as ETabTrailSize,
112
115
  xo as ETagSize,
113
116
  no as ETagType,
114
117
  bo as EToastPosition,
@@ -116,7 +119,7 @@ import './assets/index.css';export {
116
119
  er as EUploaderType,
117
120
  $ as EVoteSize,
118
121
  xr as GosZnak,
119
- Wr as Icon,
122
+ $r as Icon,
120
123
  L as Image,
121
124
  u as Input,
122
125
  I as InputPassword,
@@ -125,38 +128,39 @@ import './assets/index.css';export {
125
128
  Oo as Link,
126
129
  G as Loader,
127
130
  A as MergedButton,
131
+ Ar as MultiSelectSearch,
128
132
  qo as NotificationBadge,
129
- P as OtpInput,
133
+ M as OtpInput,
130
134
  ho as Pagination,
131
135
  y as RadioGroup,
132
136
  ro as SelectSearch,
133
137
  gr as SkeletonBrick,
134
138
  Vr as SkeletonCircle,
135
- Br as SkeletonText,
139
+ zr as SkeletonText,
136
140
  O as Slider,
137
141
  H as Steps,
138
- Sr as Switcher,
142
+ Er as Switcher,
139
143
  ko as TabTrail,
140
144
  fo as Tag,
141
145
  c as TextArea,
142
146
  so as Timer,
143
- Mo as ToastProvider,
147
+ Po as ToastProvider,
144
148
  Tr as TwinSwitcher,
145
149
  or as UniversalUploader,
146
150
  Go as Uploader,
147
151
  Lo as UploaderFiles,
148
152
  vo as UploaderPhotos,
149
153
  Y as Vote,
150
- Yr as formating,
151
- z as getMaskedInputPhoneValue,
154
+ re as formating,
155
+ B as getMaskedInputPhoneValue,
152
156
  V as getUnmaskedInputValue,
153
- $r as parseDate,
154
- Fr as useCopyToClipboard,
155
- Nr as useInterval,
156
- Dr as useLockBodyScroll,
157
- Ar as useMediaQuery,
158
- qr as useMergeRefs,
159
- Jr as useResizeObserver,
160
- Qr as useTimer,
157
+ te as parseDate,
158
+ Jr as useCopyToClipboard,
159
+ Fr as useInterval,
160
+ Qr as useLockBodyScroll,
161
+ Lr as useMediaQuery,
162
+ Wr as useMergeRefs,
163
+ Yr as useResizeObserver,
164
+ qr as useTimer,
161
165
  Co as useToast
162
166
  };
@@ -0,0 +1,86 @@
1
+ import h, { useState as F, useCallback as c, useRef as m, createContext as A, useContext as E } from "react";
2
+ import { p as x, n as O, d as y } from "./keyboard-B0lm_zyn.js";
3
+ function k(e = 0) {
4
+ let [t, n] = F(e), l = c((o) => n(o), [t]), s = c((o) => n((u) => u | o), [t]), r = c((o) => (t & o) === o, [t]), a = c((o) => n((u) => u & ~o), [n]), i = c((o) => n((u) => u ^ o), [n]);
5
+ return { flags: t, setFlag: l, addFlag: s, hasFlag: r, removeFlag: a, toggleFlag: i };
6
+ }
7
+ var v;
8
+ typeof process < "u" && typeof globalThis < "u" && ((v = process == null ? void 0 : process.env) == null ? void 0 : v.NODE_ENV) === "test" && typeof Element.prototype.getAnimations > "u" && (Element.prototype.getAnimations = function() {
9
+ return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.", "Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.", "", "Example usage:", "```js", "import { mockAnimationsApi } from 'jsdom-testing-mocks'", "mockAnimationsApi()", "```"].join(`
10
+ `)), [];
11
+ });
12
+ var N = ((e) => (e[e.None = 0] = "None", e[e.Closed = 1] = "Closed", e[e.Enter = 2] = "Enter", e[e.Leave = 4] = "Leave", e))(N || {});
13
+ function L(e) {
14
+ let t = {};
15
+ for (let n in e) e[n] === !0 && (t[`data-${n}`] = "");
16
+ return t;
17
+ }
18
+ function R(e, t, n, l) {
19
+ let [s, r] = F(n), { hasFlag: a, addFlag: i, removeFlag: o } = k(e && s ? 3 : 0), u = m(!1), d = m(!1), C = x();
20
+ return O(() => {
21
+ var f;
22
+ if (e) {
23
+ if (n && r(!0), !t) {
24
+ n && i(3);
25
+ return;
26
+ }
27
+ return (f = void 0) == null || f.call(l, n), $(t, { inFlight: u, prepare() {
28
+ d.current ? d.current = !1 : d.current = u.current, u.current = !0, !d.current && (n ? (i(3), o(4)) : (i(4), o(2)));
29
+ }, run() {
30
+ d.current ? n ? (o(3), i(4)) : (o(4), i(3)) : n ? o(1) : i(1);
31
+ }, done() {
32
+ var g;
33
+ d.current && typeof t.getAnimations == "function" && t.getAnimations().length > 0 || (u.current = !1, o(7), n || r(!1), (g = void 0) == null || g.call(l, n));
34
+ } });
35
+ }
36
+ }, [e, n, t, C]), e ? [s, { closed: a(1), enter: a(2), leave: a(4), transition: a(2) || a(4) }] : [n, { closed: void 0, enter: void 0, leave: void 0, transition: void 0 }];
37
+ }
38
+ function $(e, { prepare: t, run: n, done: l, inFlight: s }) {
39
+ let r = y();
40
+ return P(e, { prepare: t, inFlight: s }), r.nextFrame(() => {
41
+ n(), r.requestAnimationFrame(() => {
42
+ r.add(j(e, l));
43
+ });
44
+ }), r.dispose;
45
+ }
46
+ function j(e, t) {
47
+ var n, l;
48
+ let s = y();
49
+ if (!e) return s.dispose;
50
+ let r = !1;
51
+ s.add(() => {
52
+ r = !0;
53
+ });
54
+ let a = (l = (n = e.getAnimations) == null ? void 0 : n.call(e).filter((i) => i instanceof CSSTransition)) != null ? l : [];
55
+ return a.length === 0 ? (t(), s.dispose) : (Promise.allSettled(a.map((i) => i.finished)).then(() => {
56
+ r || t();
57
+ }), s.dispose);
58
+ }
59
+ function P(e, { inFlight: t, prepare: n }) {
60
+ if (t != null && t.current) {
61
+ n();
62
+ return;
63
+ }
64
+ let l = e.style.transition;
65
+ e.style.transition = "none", n(), e.offsetHeight, e.style.transition = l;
66
+ }
67
+ let p = A(null);
68
+ p.displayName = "OpenClosedContext";
69
+ var S = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))(S || {});
70
+ function T() {
71
+ return E(p);
72
+ }
73
+ function _({ value: e, children: t }) {
74
+ return h.createElement(p.Provider, { value: e }, t);
75
+ }
76
+ function w({ children: e }) {
77
+ return h.createElement(p.Provider, { value: null }, e);
78
+ }
79
+ export {
80
+ L as H,
81
+ R,
82
+ _ as c,
83
+ S as i,
84
+ w as s,
85
+ T as u
86
+ };
@@ -0,0 +1,12 @@
1
+ import { useMemo as o } from "react";
2
+ function a(t, e) {
3
+ return o(() => {
4
+ var r;
5
+ if (t.type) return t.type;
6
+ let n = (r = t.as) != null ? r : "button";
7
+ if (typeof n == "string" && n.toLowerCase() === "button" || (e == null ? void 0 : e.tagName) === "BUTTON" && !e.hasAttribute("type")) return "button";
8
+ }, [t.type, t.as, e]);
9
+ }
10
+ export {
11
+ a as e
12
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mimir-ui-kit",
3
3
  "private": false,
4
- "version": "1.35.4",
4
+ "version": "1.36.1",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {
@@ -51,7 +51,8 @@
51
51
  },
52
52
  "devDependencies": {
53
53
  "@chromatic-com/storybook": "^1.6.1",
54
- "@headlessui/react": "^2.1.2",
54
+ "@headlessui/react": "^2.1.8",
55
+ "@laynezh/vite-plugin-lib-assets": "^0.5.23",
55
56
  "@loadable/component": "^5.15.2",
56
57
  "@storybook/addon-essentials": "^8.2.2",
57
58
  "@storybook/addon-interactions": "^8.2.2",
@@ -1,93 +0,0 @@
1
- import h, { useState as y, useCallback as f, useRef as C, createContext as x, useContext as L } from "react";
2
- import { p as O, n as T, d as E } from "./keyboard-B0lm_zyn.js";
3
- function A(e) {
4
- let n = { called: !1 };
5
- return (...t) => {
6
- if (!n.called) return n.called = !0, e(...t);
7
- };
8
- }
9
- function D(e = 0) {
10
- let [n, t] = y(e), a = f((r) => t(r), [n]), c = f((r) => t((i) => i | r), [n]), o = f((r) => (n & r) === r, [n]), d = f((r) => t((i) => i & ~r), [t]), u = f((r) => t((i) => i ^ r), [t]);
11
- return { flags: n, setFlag: a, addFlag: c, hasFlag: o, removeFlag: d, toggleFlag: u };
12
- }
13
- var N = ((e) => (e[e.None = 0] = "None", e[e.Closed = 1] = "Closed", e[e.Enter = 2] = "Enter", e[e.Leave = 4] = "Leave", e))(N || {});
14
- function k(e) {
15
- let n = {};
16
- for (let t in e) e[t] === !0 && (n[`data-${t}`] = "");
17
- return n;
18
- }
19
- function B(e, n, t, a) {
20
- let [c, o] = y(t), { hasFlag: d, addFlag: u, removeFlag: r } = D(e && c ? 3 : 0), i = C(!1), l = C(!1), s = O();
21
- return T(function g() {
22
- var p;
23
- if (!e) return;
24
- t && o(!0);
25
- let v = n.current;
26
- return v ? ((p = void 0) == null || p.call(a, t), R(v, { inFlight: i, prepare() {
27
- l.current ? l.current = !1 : l.current = i.current, i.current = !0, !l.current && (t ? (u(3), r(4)) : (u(4), r(2)));
28
- }, run() {
29
- l.current ? t ? (r(3), u(4)) : (r(4), u(3)) : t ? r(1) : u(1);
30
- }, done() {
31
- var F;
32
- l.current && typeof v.getAnimations == "function" && v.getAnimations().length > 0 || (i.current = !1, r(7), t || o(!1), (F = void 0) == null || F.call(a, t));
33
- } })) : t ? (u(3), s.nextFrame(() => g())) : void 0;
34
- }, [e, t, n, s]), e ? [c, { closed: d(1), enter: d(2), leave: d(4), transition: d(2) || d(4) }] : [t, { closed: void 0, enter: void 0, leave: void 0, transition: void 0 }];
35
- }
36
- function R(e, { prepare: n, run: t, done: a, inFlight: c }) {
37
- let o = E();
38
- return P(e, { prepare: n, inFlight: c }), o.nextFrame(() => {
39
- o.add($(e, a)), t();
40
- }), o.dispose;
41
- }
42
- function $(e, n) {
43
- let t = A(n), a = E();
44
- if (!e) return a.dispose;
45
- let { transitionDuration: c, transitionDelay: o } = getComputedStyle(e), [d, u] = [c, o].map((i) => {
46
- let [l = 0] = i.split(",").filter(Boolean).map((s) => s.includes("ms") ? parseFloat(s) : parseFloat(s) * 1e3).sort((s, g) => g - s);
47
- return l;
48
- }), r = d + u;
49
- if (r !== 0) {
50
- let i = a.group((l) => {
51
- let s = l.setTimeout(() => {
52
- t(), l.dispose();
53
- }, r);
54
- l.addEventListener(e, "transitionrun", (g) => {
55
- g.target === g.currentTarget && (s(), l.addEventListener(e, "transitioncancel", (p) => {
56
- p.target === p.currentTarget && (t(), i());
57
- }));
58
- });
59
- });
60
- a.addEventListener(e, "transitionend", (l) => {
61
- l.target === l.currentTarget && (t(), a.dispose());
62
- });
63
- } else t();
64
- return a.dispose;
65
- }
66
- function P(e, { inFlight: n, prepare: t }) {
67
- if (n != null && n.current) {
68
- t();
69
- return;
70
- }
71
- let a = e.style.transition;
72
- e.style.transition = "none", t(), e.offsetHeight, e.style.transition = a;
73
- }
74
- let m = x(null);
75
- m.displayName = "OpenClosedContext";
76
- var S = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))(S || {});
77
- function H() {
78
- return L(m);
79
- }
80
- function M({ value: e, children: n }) {
81
- return h.createElement(m.Provider, { value: e }, n);
82
- }
83
- function V({ children: e }) {
84
- return h.createElement(m.Provider, { value: null }, e);
85
- }
86
- export {
87
- k as A,
88
- B as V,
89
- M as c,
90
- S as i,
91
- V as s,
92
- H as u
93
- };
@@ -1,19 +0,0 @@
1
- import { useState as i } from "react";
2
- import { n as u } from "./keyboard-B0lm_zyn.js";
3
- function o(t) {
4
- var n;
5
- if (t.type) return t.type;
6
- let r = (n = t.as) != null ? n : "button";
7
- if (typeof r == "string" && r.toLowerCase() === "button") return "button";
8
- }
9
- function a(t, n) {
10
- let [r, e] = i(() => o(t));
11
- return u(() => {
12
- e(o(t));
13
- }, [t.type, t.as]), u(() => {
14
- r || n.current && n.current instanceof HTMLButtonElement && !n.current.hasAttribute("type") && e("button");
15
- }, [r, n]), r;
16
- }
17
- export {
18
- a as T
19
- };