@ogcio/design-system-react 1.29.0 → 1.31.0

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 (109) hide show
  1. package/README.md +11 -33
  2. package/dist/alert/variants.d.ts +78 -2
  3. package/dist/atoms/DsButton.d.ts +194 -0
  4. package/dist/atoms/DsButton.js +330 -0
  5. package/dist/atoms/InsetText.d.ts +14 -0
  6. package/dist/atoms/InsetText.js +17 -0
  7. package/dist/atoms/icons/Close.d.ts +3 -0
  8. package/dist/atoms/icons/Close.js +23 -0
  9. package/dist/atoms/icons/KeyboardArrowDown.d.ts +3 -0
  10. package/dist/atoms/icons/KeyboardArrowDown.js +23 -0
  11. package/dist/atoms/icons/KeyboardArrowUp.d.ts +3 -0
  12. package/dist/atoms/icons/KeyboardArrowUp.js +23 -0
  13. package/dist/atoms/icons/Visibility.d.ts +3 -0
  14. package/dist/atoms/icons/Visibility.js +23 -0
  15. package/dist/atoms/icons/VisibilityOff.d.ts +3 -0
  16. package/dist/atoms/icons/VisibilityOff.js +23 -0
  17. package/dist/atoms/icons/index.d.ts +6 -0
  18. package/dist/atoms/icons/index.js +12 -0
  19. package/dist/atoms/icons/logos/LogoBlack.d.ts +3 -0
  20. package/dist/atoms/icons/logos/LogoBlack.js +327 -0
  21. package/dist/atoms/icons/logos/LogoGoldGreen.d.ts +3 -0
  22. package/dist/atoms/icons/logos/LogoGoldGreen.js +327 -0
  23. package/dist/atoms/icons/logos/LogoGoldWhite.d.ts +3 -0
  24. package/dist/atoms/icons/logos/LogoGoldWhite.js +87 -0
  25. package/dist/atoms/icons/logos/LogoHarpBlack.d.ts +3 -0
  26. package/dist/atoms/icons/logos/LogoHarpBlack.js +68 -0
  27. package/dist/atoms/icons/logos/LogoHarpWhite.d.ts +3 -0
  28. package/dist/{assets/logos/LogoHarpBlack.js → atoms/icons/logos/LogoHarpWhite.js} +33 -31
  29. package/dist/atoms/icons/logos/LogoWhite.d.ts +3 -0
  30. package/dist/atoms/icons/logos/LogoWhite.js +327 -0
  31. package/dist/atoms/icons/logos/index.d.ts +6 -0
  32. package/dist/atoms/icons/logos/index.js +14 -0
  33. package/dist/atoms/icons/types.d.ts +10 -0
  34. package/dist/atoms/icons/types.js +1 -0
  35. package/dist/atoms/index.d.ts +3 -0
  36. package/dist/atoms/index.js +16 -0
  37. package/dist/autocomplete/autocomplete.js +131 -115
  38. package/dist/blockquote/blockquote.d.ts +4 -1
  39. package/dist/blockquote/blockquote.js +18 -4
  40. package/dist/breadcrumbs/breadcrumbs.js +54 -33
  41. package/dist/button-group/button-group.js +31 -28
  42. package/dist/character-count/character-count.js +5 -5
  43. package/dist/chip/chip.js +41 -19
  44. package/dist/combo-box/combo-box.js +6 -13
  45. package/dist/combo-box/dropdown-item.js +39 -40
  46. package/dist/cookie-banner/cookie-banner.js +28 -20
  47. package/dist/data-table/data-table-footer.js +57 -51
  48. package/dist/data-table/data-table-header.d.ts +7 -7
  49. package/dist/data-table/data-table-header.js +97 -110
  50. package/dist/data-table/data-table-selected-rows.d.ts +1 -0
  51. package/dist/data-table/data-table-selected-rows.js +15 -19
  52. package/dist/details/details.js +43 -23
  53. package/dist/drawer/drawer.js +35 -32
  54. package/dist/footer/footer.js +54 -46
  55. package/dist/forms/form-field/form-field.d.ts +2 -2
  56. package/dist/forms/form-field/form-field.js +40 -30
  57. package/dist/forms/form-field/types.d.ts +10 -3
  58. package/dist/header/components/header-slot.js +33 -32
  59. package/dist/header/header-legacy.js +8 -8
  60. package/dist/header/variants.d.ts +220 -20
  61. package/dist/heading/heading.d.ts +70 -2
  62. package/dist/hooks/use-aria-hider.d.ts +1 -1
  63. package/dist/hooks/use-aria-hider.js +14 -13
  64. package/dist/hooks/use-breakpoint.js +15 -12
  65. package/dist/hooks/use-focus-trap.d.ts +1 -1
  66. package/dist/hooks/use-focus-trap.js +179 -179
  67. package/dist/icon/icon.d.ts +10 -0
  68. package/dist/icon/icon.js +64 -52
  69. package/dist/icon/icons.d.ts +1 -1
  70. package/dist/icons/index.d.ts +1 -0
  71. package/dist/icons/index.js +12 -0
  72. package/dist/index.d.ts +1 -0
  73. package/dist/index.js +144 -142
  74. package/dist/input-file/input-file.js +15 -12
  75. package/dist/input-password/input-password.js +13 -12
  76. package/dist/input-text/input-text.js +18 -16
  77. package/dist/label/label.d.ts +43 -0
  78. package/dist/label/label.js +7 -6
  79. package/dist/logos/index.d.ts +1 -0
  80. package/dist/logos/index.js +14 -0
  81. package/dist/modal/modal.js +125 -127
  82. package/dist/popover/popover.js +67 -64
  83. package/dist/score-select/score-select.js +20 -20
  84. package/dist/select/select-next.js +45 -45
  85. package/dist/spinner/spinner.d.ts +30 -2
  86. package/dist/styles.css +12 -2
  87. package/dist/table/table-row.js +14 -7
  88. package/dist/table/table.d.ts +22 -2
  89. package/dist/tabs/tab-item.d.ts +2 -2
  90. package/dist/tabs/tab-panel.js +6 -6
  91. package/dist/tabs/tabs.js +19 -19
  92. package/dist/text-input/text-input.d.ts +1 -1
  93. package/dist/textarea/textarea.js +27 -28
  94. package/dist/toast/ds-toast.d.ts +78 -2
  95. package/fonts.css +10 -0
  96. package/package.json +17 -12
  97. package/dist/assets/logos/LogoBlack.d.ts +0 -3
  98. package/dist/assets/logos/LogoBlack.js +0 -322
  99. package/dist/assets/logos/LogoGoldGreen.d.ts +0 -3
  100. package/dist/assets/logos/LogoGoldGreen.js +0 -322
  101. package/dist/assets/logos/LogoGoldWhite.d.ts +0 -3
  102. package/dist/assets/logos/LogoGoldWhite.js +0 -82
  103. package/dist/assets/logos/LogoHarpBlack.d.ts +0 -3
  104. package/dist/assets/logos/LogoHarpWhite.d.ts +0 -3
  105. package/dist/assets/logos/LogoHarpWhite.js +0 -60
  106. package/dist/assets/logos/LogoWhite.d.ts +0 -3
  107. package/dist/assets/logos/LogoWhite.js +0 -322
  108. package/dist/assets/logos/index.d.ts +0 -6
  109. package/dist/assets/logos/index.js +0 -14
@@ -3,7 +3,17 @@ export declare const headerVariants: import('tailwind-variants').TVReturnType<{
3
3
  default: string;
4
4
  light: string;
5
5
  };
6
- }, undefined, "gi-header", TVConfig<V, EV>, {
6
+ }, undefined, "gi-header", import('tailwind-variants/dist/config.js').TVConfig<{
7
+ appearance: {
8
+ default: string;
9
+ light: string;
10
+ };
11
+ }, {
12
+ appearance: {
13
+ default: string;
14
+ light: string;
15
+ };
16
+ }>, {
7
17
  appearance: {
8
18
  default: string;
9
19
  light: string;
@@ -13,13 +23,33 @@ export declare const headerVariants: import('tailwind-variants').TVReturnType<{
13
23
  default: string;
14
24
  light: string;
15
25
  };
16
- }, undefined, "gi-header", TVConfig<V, EV>, unknown, unknown, undefined>>;
26
+ }, undefined, "gi-header", import('tailwind-variants/dist/config.js').TVConfig<{
27
+ appearance: {
28
+ default: string;
29
+ light: string;
30
+ };
31
+ }, {
32
+ appearance: {
33
+ default: string;
34
+ light: string;
35
+ };
36
+ }>, unknown, unknown, undefined>>;
17
37
  export declare const headerMenuVariants: import('tailwind-variants').TVReturnType<{
18
38
  appearance: {
19
39
  default: string;
20
40
  light: string;
21
41
  };
22
- }, undefined, "gi-header-menu", TVConfig<V, EV>, {
42
+ }, undefined, "gi-header-menu", import('tailwind-variants/dist/config.js').TVConfig<{
43
+ appearance: {
44
+ default: string;
45
+ light: string;
46
+ };
47
+ }, {
48
+ appearance: {
49
+ default: string;
50
+ light: string;
51
+ };
52
+ }>, {
23
53
  appearance: {
24
54
  default: string;
25
55
  light: string;
@@ -29,13 +59,33 @@ export declare const headerMenuVariants: import('tailwind-variants').TVReturnTyp
29
59
  default: string;
30
60
  light: string;
31
61
  };
32
- }, undefined, "gi-header-menu", TVConfig<V, EV>, unknown, unknown, undefined>>;
62
+ }, undefined, "gi-header-menu", import('tailwind-variants/dist/config.js').TVConfig<{
63
+ appearance: {
64
+ default: string;
65
+ light: string;
66
+ };
67
+ }, {
68
+ appearance: {
69
+ default: string;
70
+ light: string;
71
+ };
72
+ }>, unknown, unknown, undefined>>;
33
73
  export declare const headerToolItemVariants: import('tailwind-variants').TVReturnType<{
34
74
  appearance: {
35
75
  default: string;
36
76
  light: string;
37
77
  };
38
- }, undefined, "gi-header-tool-item", TVConfig<V, EV>, {
78
+ }, undefined, "gi-header-tool-item", import('tailwind-variants/dist/config.js').TVConfig<{
79
+ appearance: {
80
+ default: string;
81
+ light: string;
82
+ };
83
+ }, {
84
+ appearance: {
85
+ default: string;
86
+ light: string;
87
+ };
88
+ }>, {
39
89
  appearance: {
40
90
  default: string;
41
91
  light: string;
@@ -45,13 +95,33 @@ export declare const headerToolItemVariants: import('tailwind-variants').TVRetur
45
95
  default: string;
46
96
  light: string;
47
97
  };
48
- }, undefined, "gi-header-tool-item", TVConfig<V, EV>, unknown, unknown, undefined>>;
98
+ }, undefined, "gi-header-tool-item", import('tailwind-variants/dist/config.js').TVConfig<{
99
+ appearance: {
100
+ default: string;
101
+ light: string;
102
+ };
103
+ }, {
104
+ appearance: {
105
+ default: string;
106
+ light: string;
107
+ };
108
+ }>, unknown, unknown, undefined>>;
49
109
  export declare const headerSecondaryLinksVariants: import('tailwind-variants').TVReturnType<{
50
110
  appearance: {
51
111
  default: string;
52
112
  light: string;
53
113
  };
54
- }, undefined, "gi-header-secondary-bar gi-order-1", TVConfig<V, EV>, {
114
+ }, undefined, "gi-header-secondary-bar gi-order-1", import('tailwind-variants/dist/config.js').TVConfig<{
115
+ appearance: {
116
+ default: string;
117
+ light: string;
118
+ };
119
+ }, {
120
+ appearance: {
121
+ default: string;
122
+ light: string;
123
+ };
124
+ }>, {
55
125
  appearance: {
56
126
  default: string;
57
127
  light: string;
@@ -61,13 +131,33 @@ export declare const headerSecondaryLinksVariants: import('tailwind-variants').T
61
131
  default: string;
62
132
  light: string;
63
133
  };
64
- }, undefined, "gi-header-secondary-bar gi-order-1", TVConfig<V, EV>, unknown, unknown, undefined>>;
134
+ }, undefined, "gi-header-secondary-bar gi-order-1", import('tailwind-variants/dist/config.js').TVConfig<{
135
+ appearance: {
136
+ default: string;
137
+ light: string;
138
+ };
139
+ }, {
140
+ appearance: {
141
+ default: string;
142
+ light: string;
143
+ };
144
+ }>, unknown, unknown, undefined>>;
65
145
  export declare const headerSecondaryLinkItemVariants: import('tailwind-variants').TVReturnType<{
66
146
  appearance: {
67
147
  default: string;
68
148
  light: string;
69
149
  };
70
- }, undefined, "gi-header-secondary-item", TVConfig<V, EV>, {
150
+ }, undefined, "gi-header-secondary-item", import('tailwind-variants/dist/config.js').TVConfig<{
151
+ appearance: {
152
+ default: string;
153
+ light: string;
154
+ };
155
+ }, {
156
+ appearance: {
157
+ default: string;
158
+ light: string;
159
+ };
160
+ }>, {
71
161
  appearance: {
72
162
  default: string;
73
163
  light: string;
@@ -77,13 +167,33 @@ export declare const headerSecondaryLinkItemVariants: import('tailwind-variants'
77
167
  default: string;
78
168
  light: string;
79
169
  };
80
- }, undefined, "gi-header-secondary-item", TVConfig<V, EV>, unknown, unknown, undefined>>;
170
+ }, undefined, "gi-header-secondary-item", import('tailwind-variants/dist/config.js').TVConfig<{
171
+ appearance: {
172
+ default: string;
173
+ light: string;
174
+ };
175
+ }, {
176
+ appearance: {
177
+ default: string;
178
+ light: string;
179
+ };
180
+ }>, unknown, unknown, undefined>>;
81
181
  export declare const headerSecondaryLinkSlotItemVariants: import('tailwind-variants').TVReturnType<{
82
182
  appearance: {
83
183
  default: string;
84
184
  light: string;
85
185
  };
86
- }, undefined, "gi-header-secondary-item-slot", TVConfig<V, EV>, {
186
+ }, undefined, "gi-header-secondary-item-slot", import('tailwind-variants/dist/config.js').TVConfig<{
187
+ appearance: {
188
+ default: string;
189
+ light: string;
190
+ };
191
+ }, {
192
+ appearance: {
193
+ default: string;
194
+ light: string;
195
+ };
196
+ }>, {
87
197
  appearance: {
88
198
  default: string;
89
199
  light: string;
@@ -93,13 +203,33 @@ export declare const headerSecondaryLinkSlotItemVariants: import('tailwind-varia
93
203
  default: string;
94
204
  light: string;
95
205
  };
96
- }, undefined, "gi-header-secondary-item-slot", TVConfig<V, EV>, unknown, unknown, undefined>>;
206
+ }, undefined, "gi-header-secondary-item-slot", import('tailwind-variants/dist/config.js').TVConfig<{
207
+ appearance: {
208
+ default: string;
209
+ light: string;
210
+ };
211
+ }, {
212
+ appearance: {
213
+ default: string;
214
+ light: string;
215
+ };
216
+ }>, unknown, unknown, undefined>>;
97
217
  export declare const headerTitleVariants: import('tailwind-variants').TVReturnType<{
98
218
  appearance: {
99
219
  default: string;
100
220
  light: string;
101
221
  };
102
- }, undefined, "gi-header-title", TVConfig<V, EV>, {
222
+ }, undefined, "gi-header-title", import('tailwind-variants/dist/config.js').TVConfig<{
223
+ appearance: {
224
+ default: string;
225
+ light: string;
226
+ };
227
+ }, {
228
+ appearance: {
229
+ default: string;
230
+ light: string;
231
+ };
232
+ }>, {
103
233
  appearance: {
104
234
  default: string;
105
235
  light: string;
@@ -109,13 +239,33 @@ export declare const headerTitleVariants: import('tailwind-variants').TVReturnTy
109
239
  default: string;
110
240
  light: string;
111
241
  };
112
- }, undefined, "gi-header-title", TVConfig<V, EV>, unknown, unknown, undefined>>;
242
+ }, undefined, "gi-header-title", import('tailwind-variants/dist/config.js').TVConfig<{
243
+ appearance: {
244
+ default: string;
245
+ light: string;
246
+ };
247
+ }, {
248
+ appearance: {
249
+ default: string;
250
+ light: string;
251
+ };
252
+ }>, unknown, unknown, undefined>>;
113
253
  export declare const headerDividerVariants: import('tailwind-variants').TVReturnType<{
114
254
  appearance: {
115
255
  default: string;
116
256
  light: string;
117
257
  };
118
- }, undefined, "gi-header-divider", TVConfig<V, EV>, {
258
+ }, undefined, "gi-header-divider", import('tailwind-variants/dist/config.js').TVConfig<{
259
+ appearance: {
260
+ default: string;
261
+ light: string;
262
+ };
263
+ }, {
264
+ appearance: {
265
+ default: string;
266
+ light: string;
267
+ };
268
+ }>, {
119
269
  appearance: {
120
270
  default: string;
121
271
  light: string;
@@ -125,13 +275,33 @@ export declare const headerDividerVariants: import('tailwind-variants').TVReturn
125
275
  default: string;
126
276
  light: string;
127
277
  };
128
- }, undefined, "gi-header-divider", TVConfig<V, EV>, unknown, unknown, undefined>>;
278
+ }, undefined, "gi-header-divider", import('tailwind-variants/dist/config.js').TVConfig<{
279
+ appearance: {
280
+ default: string;
281
+ light: string;
282
+ };
283
+ }, {
284
+ appearance: {
285
+ default: string;
286
+ light: string;
287
+ };
288
+ }>, unknown, unknown, undefined>>;
129
289
  export declare const headerSlotContainerVariants: import('tailwind-variants').TVReturnType<{
130
290
  appearance: {
131
291
  default: string;
132
292
  light: string;
133
293
  };
134
- }, undefined, "gi-header-slot-container", TVConfig<V, EV>, {
294
+ }, undefined, "gi-header-slot-container", import('tailwind-variants/dist/config.js').TVConfig<{
295
+ appearance: {
296
+ default: string;
297
+ light: string;
298
+ };
299
+ }, {
300
+ appearance: {
301
+ default: string;
302
+ light: string;
303
+ };
304
+ }>, {
135
305
  appearance: {
136
306
  default: string;
137
307
  light: string;
@@ -141,13 +311,33 @@ export declare const headerSlotContainerVariants: import('tailwind-variants').TV
141
311
  default: string;
142
312
  light: string;
143
313
  };
144
- }, undefined, "gi-header-slot-container", TVConfig<V, EV>, unknown, unknown, undefined>>;
314
+ }, undefined, "gi-header-slot-container", import('tailwind-variants/dist/config.js').TVConfig<{
315
+ appearance: {
316
+ default: string;
317
+ light: string;
318
+ };
319
+ }, {
320
+ appearance: {
321
+ default: string;
322
+ light: string;
323
+ };
324
+ }>, unknown, unknown, undefined>>;
145
325
  export declare const headerLogoVariants: import('tailwind-variants').TVReturnType<{
146
326
  appearance: {
147
327
  default: string;
148
328
  light: string;
149
329
  };
150
- }, undefined, "gi-header-logo", TVConfig<V, EV>, {
330
+ }, undefined, "gi-header-logo", import('tailwind-variants/dist/config.js').TVConfig<{
331
+ appearance: {
332
+ default: string;
333
+ light: string;
334
+ };
335
+ }, {
336
+ appearance: {
337
+ default: string;
338
+ light: string;
339
+ };
340
+ }>, {
151
341
  appearance: {
152
342
  default: string;
153
343
  light: string;
@@ -157,4 +347,14 @@ export declare const headerLogoVariants: import('tailwind-variants').TVReturnTyp
157
347
  default: string;
158
348
  light: string;
159
349
  };
160
- }, undefined, "gi-header-logo", TVConfig<V, EV>, unknown, unknown, undefined>>;
350
+ }, undefined, "gi-header-logo", import('tailwind-variants/dist/config.js').TVConfig<{
351
+ appearance: {
352
+ default: string;
353
+ light: string;
354
+ };
355
+ }, {
356
+ appearance: {
357
+ default: string;
358
+ light: string;
359
+ };
360
+ }>, unknown, unknown, undefined>>;
@@ -35,7 +35,41 @@ export declare const headingVariants: import('tailwind-variants').TVReturnType<{
35
35
  }, {
36
36
  text: string;
37
37
  base: string;
38
- }, undefined, TVConfig<V, EV>, {
38
+ }, undefined, import('tailwind-variants/dist/config.js').TVConfig<{
39
+ size: {
40
+ xl: string;
41
+ lg: string;
42
+ md: string;
43
+ sm: string;
44
+ xs: string;
45
+ '2xs': string;
46
+ };
47
+ as: {
48
+ h1: string;
49
+ h2: string;
50
+ h3: string;
51
+ h4: string;
52
+ h5: string;
53
+ h6: string;
54
+ };
55
+ }, {
56
+ size: {
57
+ xl: string;
58
+ lg: string;
59
+ md: string;
60
+ sm: string;
61
+ xs: string;
62
+ '2xs': string;
63
+ };
64
+ as: {
65
+ h1: string;
66
+ h2: string;
67
+ h3: string;
68
+ h4: string;
69
+ h5: string;
70
+ h6: string;
71
+ };
72
+ }>, {
39
73
  size: {
40
74
  xl: string;
41
75
  lg: string;
@@ -75,7 +109,41 @@ export declare const headingVariants: import('tailwind-variants').TVReturnType<{
75
109
  }, {
76
110
  text: string;
77
111
  base: string;
78
- }, undefined, TVConfig<V, EV>, unknown, unknown, undefined>>;
112
+ }, undefined, import('tailwind-variants/dist/config.js').TVConfig<{
113
+ size: {
114
+ xl: string;
115
+ lg: string;
116
+ md: string;
117
+ sm: string;
118
+ xs: string;
119
+ '2xs': string;
120
+ };
121
+ as: {
122
+ h1: string;
123
+ h2: string;
124
+ h3: string;
125
+ h4: string;
126
+ h5: string;
127
+ h6: string;
128
+ };
129
+ }, {
130
+ size: {
131
+ xl: string;
132
+ lg: string;
133
+ md: string;
134
+ sm: string;
135
+ xs: string;
136
+ '2xs': string;
137
+ };
138
+ as: {
139
+ h1: string;
140
+ h2: string;
141
+ h3: string;
142
+ h4: string;
143
+ h5: string;
144
+ h6: string;
145
+ };
146
+ }>, unknown, unknown, undefined>>;
79
147
  export type HeadingProps = VariantProps<typeof headingVariants> & {
80
148
  caption?: string;
81
149
  } & React.HTMLAttributes<HTMLHeadingElement>;
@@ -1 +1 @@
1
- export declare const useAriaHider: (refNode: HTMLElement | null, shouldActivate: boolean) => void;
1
+ export declare const useAriaHider: (ref: React.RefObject<HTMLElement | null>, shouldActivate: boolean) => void;
@@ -1,20 +1,21 @@
1
- import { useLayoutEffect as d } from "react";
2
- const m = (e, n) => {
3
- d(() => {
4
- if (n !== !0 || e === null)
1
+ import { useLayoutEffect as s } from "react";
2
+ const f = (n, o) => {
3
+ s(() => {
4
+ var t, u;
5
+ if (o !== !0 || !n.current)
5
6
  return;
6
- const r = [...(e.ownerDocument ?? document).body.children].filter((t) => {
7
- const o = t === e, i = t.getAttribute("aria-hidden") === "true";
8
- return !o && !i;
7
+ const i = n.current, r = i.ownerDocument ?? document, c = [...r.body.children].filter((e) => {
8
+ const d = e === i, m = e.getAttribute("aria-hidden") === "true";
9
+ return !d && !m;
9
10
  });
10
- for (const t of r)
11
- t.setAttribute("aria-hidden", "true");
11
+ for (const e of c)
12
+ e.contains(r.activeElement) && ((u = (t = r.activeElement) == null ? void 0 : t.blur) == null || u.call(t)), e.setAttribute("aria-hidden", "true");
12
13
  return () => {
13
- for (const t of r)
14
- t.removeAttribute("aria-hidden");
14
+ for (const e of c)
15
+ e.removeAttribute("aria-hidden");
15
16
  };
16
- }, [n, e]);
17
+ }, [o, n.current]);
17
18
  };
18
19
  export {
19
- m as useAriaHider
20
+ f as useAriaHider
20
21
  };
@@ -1,24 +1,27 @@
1
1
  "use client";
2
- import { useState as i, useEffect as o } from "react";
3
- const r = {
2
+ import { useState as i, useEffect as s } from "react";
3
+ const t = {
4
4
  ExtraSmall: "xs",
5
5
  Small: "sm",
6
6
  Medium: "md",
7
7
  Large: "lg",
8
8
  ExtraLarge: "xl"
9
- }, u = (e) => e < 480 ? r.ExtraSmall : e < 640 ? r.Small : e < 768 ? r.Medium : e < 1024 ? r.Large : r.ExtraLarge, c = () => {
10
- const [e, a] = i(null), [s, l] = i(null);
11
- return o(() => {
12
- const t = () => {
13
- const n = globalThis.window.innerWidth;
14
- l(n), a(u(n));
9
+ }, u = (e) => e < 480 ? t.ExtraSmall : e < 640 ? t.Small : e < 768 ? t.Medium : e < 1024 ? t.Large : t.ExtraLarge, c = () => {
10
+ const [e, l] = i(null), [a, o] = i(null);
11
+ return s(() => {
12
+ const n = () => {
13
+ const r = Math.min(
14
+ globalThis.document.documentElement.clientWidth,
15
+ globalThis.window.innerWidth
16
+ );
17
+ o(r), l(u(r));
15
18
  };
16
- return t(), globalThis.window.addEventListener("resize", t), () => {
17
- globalThis.window.removeEventListener("resize", t);
19
+ return n(), globalThis.window.addEventListener("resize", n), () => {
20
+ globalThis.window.removeEventListener("resize", n);
18
21
  };
19
- }, []), { breakpoint: e, width: s };
22
+ }, []), { breakpoint: e, width: a };
20
23
  };
21
24
  export {
22
- r as Breakpoint,
25
+ t as Breakpoint,
23
26
  c as useBreakpoint
24
27
  };
@@ -1,2 +1,2 @@
1
1
  import { Options as FocusTrapOptions } from 'focus-trap';
2
- export declare const useFocusTrap: (element: HTMLElement | null, isActive: boolean, options?: FocusTrapOptions) => void;
2
+ export declare const useFocusTrap: (ref: React.RefObject<HTMLElement | null>, isActive: boolean, options?: FocusTrapOptions) => void;