@adam-milo/ui 1.0.27 → 1.0.29

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 (160) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.js +3 -1
  3. package/dist/index10.cjs +1 -1
  4. package/dist/index10.js +1 -1
  5. package/dist/index11.cjs +1 -1
  6. package/dist/index11.js +1 -1
  7. package/dist/index12.cjs +1 -1
  8. package/dist/index12.js +1 -1
  9. package/dist/index13.cjs +1 -1
  10. package/dist/index13.js +1 -1
  11. package/dist/index14.cjs +1 -1
  12. package/dist/index14.js +1 -1
  13. package/dist/index15.cjs +1 -1
  14. package/dist/index15.js +2 -2
  15. package/dist/index16.cjs +1 -1
  16. package/dist/index16.js +1 -1
  17. package/dist/index17.cjs +1 -1
  18. package/dist/index17.js +1 -1
  19. package/dist/index18.cjs +1 -1
  20. package/dist/index18.js +1 -1
  21. package/dist/index19.cjs +1 -1
  22. package/dist/index19.js +43 -12
  23. package/dist/index2.cjs +1 -1
  24. package/dist/index2.js +1 -1
  25. package/dist/index20.cjs +1 -0
  26. package/dist/index20.js +14 -0
  27. package/dist/index22.cjs +1 -1
  28. package/dist/index22.js +20 -299
  29. package/dist/index23.cjs +1 -1
  30. package/dist/index23.js +298 -13
  31. package/dist/index24.cjs +1 -0
  32. package/dist/index24.js +16 -0
  33. package/dist/{index26.cjs → index27.cjs} +1 -1
  34. package/dist/{index26.js → index27.js} +21 -21
  35. package/dist/index3.cjs +1 -1
  36. package/dist/index3.js +2 -2
  37. package/dist/index4.cjs +1 -1
  38. package/dist/index4.js +1 -1
  39. package/dist/index40.cjs +1 -1
  40. package/dist/index40.js +18 -3
  41. package/dist/index41.cjs +1 -1
  42. package/dist/index41.js +3 -8
  43. package/dist/index42.cjs +1 -1
  44. package/dist/index42.js +7 -66
  45. package/dist/index43.cjs +1 -1
  46. package/dist/index43.js +66 -35
  47. package/dist/index44.cjs +1 -1
  48. package/dist/index44.js +31 -56
  49. package/dist/index45.cjs +1 -1
  50. package/dist/index45.js +60 -6
  51. package/dist/index46.cjs +1 -1
  52. package/dist/index46.js +6 -208
  53. package/dist/index47.cjs +1 -1
  54. package/dist/index47.js +203 -20
  55. package/dist/index48.cjs +1 -1
  56. package/dist/index48.js +23 -202
  57. package/dist/index49.cjs +1 -1
  58. package/dist/index49.js +204 -10
  59. package/dist/index5.cjs +1 -1
  60. package/dist/index5.js +1 -1
  61. package/dist/index50.cjs +1 -1
  62. package/dist/index50.js +10 -289
  63. package/dist/index51.cjs +1 -1
  64. package/dist/index51.js +288 -13
  65. package/dist/index52.cjs +1 -1
  66. package/dist/index52.js +14 -39
  67. package/dist/index53.cjs +1 -1
  68. package/dist/index53.js +36 -82
  69. package/dist/index54.cjs +1 -1
  70. package/dist/index54.js +84 -9
  71. package/dist/index55.cjs +1 -1
  72. package/dist/index55.js +8 -65
  73. package/dist/index56.cjs +1 -1
  74. package/dist/index56.js +68 -3
  75. package/dist/index57.cjs +1 -1
  76. package/dist/index57.js +3 -11
  77. package/dist/index58.cjs +1 -1
  78. package/dist/index58.js +11 -31
  79. package/dist/index59.cjs +1 -1
  80. package/dist/index59.js +30 -118
  81. package/dist/index6.cjs +1 -1
  82. package/dist/index6.js +2 -2
  83. package/dist/index60.cjs +1 -1
  84. package/dist/index60.js +120 -9
  85. package/dist/index61.cjs +1 -1
  86. package/dist/index61.js +8 -14
  87. package/dist/index63.cjs +1 -1
  88. package/dist/index63.js +14 -22
  89. package/dist/index64.cjs +1 -1
  90. package/dist/index64.js +291 -33
  91. package/dist/index65.cjs +1 -1
  92. package/dist/index65.js +22 -622
  93. package/dist/index66.cjs +1 -1
  94. package/dist/index66.js +35 -35
  95. package/dist/index67.cjs +1 -1
  96. package/dist/index67.js +620 -33
  97. package/dist/index68.cjs +1 -1
  98. package/dist/index68.js +37 -5
  99. package/dist/index69.cjs +1 -1
  100. package/dist/index69.js +36 -8
  101. package/dist/index7.cjs +1 -1
  102. package/dist/index7.js +1 -1
  103. package/dist/index70.cjs +1 -1
  104. package/dist/index70.js +5 -3
  105. package/dist/index71.cjs +1 -1
  106. package/dist/index71.js +8 -33
  107. package/dist/index72.cjs +1 -1
  108. package/dist/index72.js +3 -178
  109. package/dist/index73.cjs +1 -1
  110. package/dist/index73.js +31 -17
  111. package/dist/index74.cjs +1 -1
  112. package/dist/index74.js +165 -706
  113. package/dist/index75.cjs +1 -1
  114. package/dist/index75.js +16 -149
  115. package/dist/index76.cjs +1 -1
  116. package/dist/index76.js +697 -149
  117. package/dist/index77.cjs +1 -1
  118. package/dist/index77.js +146 -80
  119. package/dist/index78.cjs +1 -1
  120. package/dist/index78.js +170 -44
  121. package/dist/index79.cjs +1 -1
  122. package/dist/index79.js +85 -10
  123. package/dist/index8.cjs +1 -1
  124. package/dist/index8.js +1 -1
  125. package/dist/index80.cjs +1 -1
  126. package/dist/index80.js +44 -16
  127. package/dist/index81.cjs +1 -1
  128. package/dist/index81.js +10 -99
  129. package/dist/index82.cjs +1 -1
  130. package/dist/index82.js +15 -7
  131. package/dist/index83.cjs +1 -1
  132. package/dist/index83.js +99 -26
  133. package/dist/index84.cjs +1 -1
  134. package/dist/index84.js +8 -34
  135. package/dist/index85.cjs +1 -1
  136. package/dist/index85.js +27 -14
  137. package/dist/index86.cjs +1 -1
  138. package/dist/index86.js +30 -41
  139. package/dist/index87.cjs +1 -1
  140. package/dist/index87.js +13 -6
  141. package/dist/index88.cjs +1 -0
  142. package/dist/index88.js +48 -0
  143. package/dist/index89.cjs +1 -0
  144. package/dist/index89.js +9 -0
  145. package/dist/index9.cjs +1 -1
  146. package/dist/index9.js +2 -2
  147. package/dist/src/components/typography/text/Text.component.d.ts +93 -0
  148. package/dist/src/components/typography/text/Text.component.d.ts.map +1 -0
  149. package/dist/src/index.d.ts +2 -0
  150. package/dist/src/index.d.ts.map +1 -1
  151. package/dist/style.css +1 -1
  152. package/package.json +1 -1
  153. package/dist/index21.cjs +0 -1
  154. package/dist/index21.js +0 -22
  155. package/dist/index38.cjs +0 -1
  156. package/dist/index38.js +0 -21
  157. package/dist/index62.cjs +0 -1
  158. package/dist/index62.js +0 -297
  159. /package/dist/{index34.cjs → index35.cjs} +0 -0
  160. /package/dist/{index34.js → index35.js} +0 -0
package/dist/index62.js DELETED
@@ -1,297 +0,0 @@
1
- import { computePosition, offset as offset$1, shift as shift$1, flip as flip$1, size as size$1, hide as hide$1, limitShift as limitShift$1, arrow as arrow$2 } from "./index65.js";
2
- import { autoUpdate, platform } from "./index65.js";
3
- import * as React from "react";
4
- import { useLayoutEffect } from "react";
5
- import * as ReactDOM from "react-dom";
6
- var isClient = typeof document !== "undefined";
7
- var noop = function noop2() {
8
- };
9
- var index = isClient ? useLayoutEffect : noop;
10
- function deepEqual(a, b) {
11
- if (a === b) {
12
- return true;
13
- }
14
- if (typeof a !== typeof b) {
15
- return false;
16
- }
17
- if (typeof a === "function" && a.toString() === b.toString()) {
18
- return true;
19
- }
20
- let length;
21
- let i;
22
- let keys;
23
- if (a && b && typeof a === "object") {
24
- if (Array.isArray(a)) {
25
- length = a.length;
26
- if (length !== b.length) return false;
27
- for (i = length; i-- !== 0; ) {
28
- if (!deepEqual(a[i], b[i])) {
29
- return false;
30
- }
31
- }
32
- return true;
33
- }
34
- keys = Object.keys(a);
35
- length = keys.length;
36
- if (length !== Object.keys(b).length) {
37
- return false;
38
- }
39
- for (i = length; i-- !== 0; ) {
40
- if (!{}.hasOwnProperty.call(b, keys[i])) {
41
- return false;
42
- }
43
- }
44
- for (i = length; i-- !== 0; ) {
45
- const key = keys[i];
46
- if (key === "_owner" && a.$$typeof) {
47
- continue;
48
- }
49
- if (!deepEqual(a[key], b[key])) {
50
- return false;
51
- }
52
- }
53
- return true;
54
- }
55
- return a !== a && b !== b;
56
- }
57
- function getDPR(element) {
58
- if (typeof window === "undefined") {
59
- return 1;
60
- }
61
- const win = element.ownerDocument.defaultView || window;
62
- return win.devicePixelRatio || 1;
63
- }
64
- function roundByDPR(element, value) {
65
- const dpr = getDPR(element);
66
- return Math.round(value * dpr) / dpr;
67
- }
68
- function useLatestRef(value) {
69
- const ref = React.useRef(value);
70
- index(() => {
71
- ref.current = value;
72
- });
73
- return ref;
74
- }
75
- function useFloating(options) {
76
- if (options === void 0) {
77
- options = {};
78
- }
79
- const {
80
- placement = "bottom",
81
- strategy = "absolute",
82
- middleware = [],
83
- platform: platform2,
84
- elements: {
85
- reference: externalReference,
86
- floating: externalFloating
87
- } = {},
88
- transform = true,
89
- whileElementsMounted,
90
- open
91
- } = options;
92
- const [data, setData] = React.useState({
93
- x: 0,
94
- y: 0,
95
- strategy,
96
- placement,
97
- middlewareData: {},
98
- isPositioned: false
99
- });
100
- const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);
101
- if (!deepEqual(latestMiddleware, middleware)) {
102
- setLatestMiddleware(middleware);
103
- }
104
- const [_reference, _setReference] = React.useState(null);
105
- const [_floating, _setFloating] = React.useState(null);
106
- const setReference = React.useCallback((node) => {
107
- if (node !== referenceRef.current) {
108
- referenceRef.current = node;
109
- _setReference(node);
110
- }
111
- }, []);
112
- const setFloating = React.useCallback((node) => {
113
- if (node !== floatingRef.current) {
114
- floatingRef.current = node;
115
- _setFloating(node);
116
- }
117
- }, []);
118
- const referenceEl = externalReference || _reference;
119
- const floatingEl = externalFloating || _floating;
120
- const referenceRef = React.useRef(null);
121
- const floatingRef = React.useRef(null);
122
- const dataRef = React.useRef(data);
123
- const hasWhileElementsMounted = whileElementsMounted != null;
124
- const whileElementsMountedRef = useLatestRef(whileElementsMounted);
125
- const platformRef = useLatestRef(platform2);
126
- const openRef = useLatestRef(open);
127
- const update = React.useCallback(() => {
128
- if (!referenceRef.current || !floatingRef.current) {
129
- return;
130
- }
131
- const config = {
132
- placement,
133
- strategy,
134
- middleware: latestMiddleware
135
- };
136
- if (platformRef.current) {
137
- config.platform = platformRef.current;
138
- }
139
- computePosition(referenceRef.current, floatingRef.current, config).then((data2) => {
140
- const fullData = {
141
- ...data2,
142
- // The floating element's position may be recomputed while it's closed
143
- // but still mounted (such as when transitioning out). To ensure
144
- // `isPositioned` will be `false` initially on the next open, avoid
145
- // setting it to `true` when `open === false` (must be specified).
146
- isPositioned: openRef.current !== false
147
- };
148
- if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
149
- dataRef.current = fullData;
150
- ReactDOM.flushSync(() => {
151
- setData(fullData);
152
- });
153
- }
154
- });
155
- }, [latestMiddleware, placement, strategy, platformRef, openRef]);
156
- index(() => {
157
- if (open === false && dataRef.current.isPositioned) {
158
- dataRef.current.isPositioned = false;
159
- setData((data2) => ({
160
- ...data2,
161
- isPositioned: false
162
- }));
163
- }
164
- }, [open]);
165
- const isMountedRef = React.useRef(false);
166
- index(() => {
167
- isMountedRef.current = true;
168
- return () => {
169
- isMountedRef.current = false;
170
- };
171
- }, []);
172
- index(() => {
173
- if (referenceEl) referenceRef.current = referenceEl;
174
- if (floatingEl) floatingRef.current = floatingEl;
175
- if (referenceEl && floatingEl) {
176
- if (whileElementsMountedRef.current) {
177
- return whileElementsMountedRef.current(referenceEl, floatingEl, update);
178
- }
179
- update();
180
- }
181
- }, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
182
- const refs = React.useMemo(() => ({
183
- reference: referenceRef,
184
- floating: floatingRef,
185
- setReference,
186
- setFloating
187
- }), [setReference, setFloating]);
188
- const elements = React.useMemo(() => ({
189
- reference: referenceEl,
190
- floating: floatingEl
191
- }), [referenceEl, floatingEl]);
192
- const floatingStyles = React.useMemo(() => {
193
- const initialStyles = {
194
- position: strategy,
195
- left: 0,
196
- top: 0
197
- };
198
- if (!elements.floating) {
199
- return initialStyles;
200
- }
201
- const x = roundByDPR(elements.floating, data.x);
202
- const y = roundByDPR(elements.floating, data.y);
203
- if (transform) {
204
- return {
205
- ...initialStyles,
206
- transform: "translate(" + x + "px, " + y + "px)",
207
- ...getDPR(elements.floating) >= 1.5 && {
208
- willChange: "transform"
209
- }
210
- };
211
- }
212
- return {
213
- position: strategy,
214
- left: x,
215
- top: y
216
- };
217
- }, [strategy, transform, elements.floating, data.x, data.y]);
218
- return React.useMemo(() => ({
219
- ...data,
220
- update,
221
- refs,
222
- elements,
223
- floatingStyles
224
- }), [data, update, refs, elements, floatingStyles]);
225
- }
226
- const arrow$1 = (options) => {
227
- function isRef(value) {
228
- return {}.hasOwnProperty.call(value, "current");
229
- }
230
- return {
231
- name: "arrow",
232
- options,
233
- fn(state) {
234
- const {
235
- element,
236
- padding
237
- } = typeof options === "function" ? options(state) : options;
238
- if (element && isRef(element)) {
239
- if (element.current != null) {
240
- return arrow$2({
241
- element: element.current,
242
- padding
243
- }).fn(state);
244
- }
245
- return {};
246
- }
247
- if (element) {
248
- return arrow$2({
249
- element,
250
- padding
251
- }).fn(state);
252
- }
253
- return {};
254
- }
255
- };
256
- };
257
- const offset = (options, deps) => ({
258
- ...offset$1(options),
259
- options: [options, deps]
260
- });
261
- const shift = (options, deps) => ({
262
- ...shift$1(options),
263
- options: [options, deps]
264
- });
265
- const limitShift = (options, deps) => ({
266
- ...limitShift$1(options),
267
- options: [options, deps]
268
- });
269
- const flip = (options, deps) => ({
270
- ...flip$1(options),
271
- options: [options, deps]
272
- });
273
- const size = (options, deps) => ({
274
- ...size$1(options),
275
- options: [options, deps]
276
- });
277
- const hide = (options, deps) => ({
278
- ...hide$1(options),
279
- options: [options, deps]
280
- });
281
- const arrow = (options, deps) => ({
282
- ...arrow$1(options),
283
- options: [options, deps]
284
- });
285
- export {
286
- arrow,
287
- autoUpdate,
288
- computePosition,
289
- flip,
290
- hide,
291
- limitShift,
292
- offset,
293
- platform,
294
- shift,
295
- size,
296
- useFloating
297
- };
File without changes
File without changes