@rikstv/shared-components 3.0.16 → 3.0.18

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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,659 @@
1
+ # 📖 Changelog
2
+
3
+ ## 3.0.18
4
+
5
+ - ⚠️ (Breaking change) Remove export of `breakpoints.scss` and `rem.scss`
6
+ - Internal changes
7
+ - refactor `core.scss` into `core.css`
8
+ - inline colors and custom media queries in `core.css`
9
+ - update snippet extension with custom media variables
10
+
11
+ ## 3.0.17
12
+
13
+ - Small adjustments to `<Alert>`
14
+ - make sure icon does not shrink on mobiles
15
+ - alert content set to Body-text
16
+ - update H4 to span 16-20px (was 16-18px)
17
+
18
+ ## 3.0.16
19
+
20
+ - Adds focus outline to togglebutton
21
+
22
+ ## 3.0.14
23
+
24
+ - `<Checkbox>`: use `:where` to decrease specificity needed for overrides.
25
+ - Add example on how to override CSS variables to portal
26
+
27
+ ## 3.0.12
28
+
29
+ - Expose Icons via `import { Icons } from @rikstv/shared-components`, use like `<Icons.HeartFilled />`
30
+ - Make `Chevron`, `HeartFilled` and `HeartUnfilled` default to 100% width and fill using `currentColor`
31
+
32
+ ## 3.0.11
33
+
34
+ - Rename `<Alert>` callback property `onFadeOutEnd` to `onDismissed`
35
+
36
+ ## 3.0.10
37
+
38
+ - Fix postcss-preset-env config to only transpile css-nesting (otherwise removed custom media quieries from output)
39
+
40
+ ## 3.0.9
41
+
42
+ - Fix CSS specificity for `<Alert>`-title colors
43
+
44
+ ## 3.0.8
45
+
46
+ - Add [postcss-preset-env](https://www.npmjs.com/package/postcss-preset-env) to CSS-modules for nesting etc
47
+
48
+ ## 3.0.7
49
+
50
+ - ⚠️ Deprecations:
51
+ - Remove colors:
52
+ - `--rds-feedback-confirm`, replaced by `--rds-feedback-success` and `--rds-feedback-success-dark`
53
+ - `--rds-feedback-error-text`, replaced by `--rds-feedback-error`
54
+ - `--rds-feedback-error-object`, replaced by `--rds-feedback-error-dark`
55
+ - Add new colors to align with [Figma design system colors](https://www.figma.com/file/eZpToN8EpnZiD9AU2Xc8bN/Global-%2F-Farger?node-id=399%3A0&mode=dev):
56
+ - `--rds-feedback-success`
57
+ - `--rds-feedback-success-dark`
58
+ - `--rds-feedback-info-dark`
59
+ - `--rds-feedback-warning-dark`
60
+ - `--rds-feedback-error-dark`
61
+ - Add new component `<Alert>` - a dismissable panel styleable with prop `intent` (color scheme and icon) and `variant` (background and padding)
62
+ - <https://designsystem.strim.no/alert>
63
+
64
+ ## 3.0.4
65
+
66
+ - Adding sub-title-3. A light green HAL Matex title
67
+
68
+ ## 3.0.3
69
+
70
+ - Added `<GhostButton>`, `<GhostArrowButton>` and `<GhostIconButton>` as a toned down `<PrimaryButton>`
71
+
72
+ ## 3.0.2
73
+
74
+ - Fix list first child size styling to be first DIRECT child
75
+ - Allow override `<List>` gap via `--rds-list-gap`, defaults to `1em`
76
+
77
+ ## 3.0.1
78
+
79
+ - Update svg's for checkmark and crossmark list items
80
+ - Simplify styling for all listitems 👆
81
+ - Allow pass icon to `<ListItem>`
82
+ - Style `<List>` with flex and gaps instead of `margin-bottom`
83
+ - Set `min-width` for icons in `<Panel>`
84
+
85
+ ## 3.0.0
86
+
87
+ - Delete LinkButton and refactor BaseLinkButton. Forces users to create a wrapper component for BaseLinkButton in their client app, and add their own correct typing. Done to avoid the use of LinkButton, which only rendered a normal a-tag and caused a full refresh of the page when clicked.
88
+
89
+ ## 2.0.19
90
+
91
+ - Removed unused tracking from accordions
92
+
93
+ ## 2.0.18
94
+
95
+ - Updated Accordion for better analytics possibilities. KS wanted this
96
+
97
+ ## 2.0.17
98
+
99
+ - Wrap Textfield component in a container div, to make custom styling easier
100
+
101
+ ## 2.0.16
102
+
103
+ - Make dropdown props generic
104
+
105
+ ## 2.0.15
106
+
107
+ - Add new `Dropdown` component. Moved from play-common
108
+
109
+ ## 2.0.14
110
+
111
+ - Add new `Checkmark` icon to use in `CheckmarkListItem`, replaces the use of css :before pseudo class.
112
+
113
+ ## 2.0.13
114
+
115
+ - Fixes react developer warnings in portal
116
+ - Add prop to typography components: `as="div"` that renders the element as a `DIV` instead of `P`. Useful for wrapping elements that need to set a font.
117
+
118
+ ## 2.0.12
119
+
120
+ - Use plugin [`vite-plugin-dts`](https://github.com/qmhc/vite-plugin-dts) to generate types
121
+
122
+ ## 2.0.11
123
+
124
+ - Add `warning2` variant to `Panel` (yellow background)
125
+
126
+ ## 2.0.10
127
+
128
+ - Add `highlighted` variant to `LinkButton` and add microanimation to all arrow buttons on hover
129
+
130
+ ## 2.0.9
131
+
132
+ - Use `HALMatex Strim Medium` instead of `HALMatex Strim Regular` for H-tags
133
+
134
+ ## 2.0.8
135
+
136
+ - Update Secondary button hover color
137
+
138
+ ## 2.0.7
139
+
140
+ - Update regex in split function in snippets to include all variables (earlier regex did not include first entries)
141
+
142
+ ## 2.0.6
143
+
144
+ - Rename color variables and update usages in portal
145
+
146
+ ## 2.0.5
147
+
148
+ - Add `?inline` to the end of css imports to avoid possible duplicate loading of css (after updating to Vite 4)
149
+
150
+ ## 2.0.4
151
+
152
+ - Fix parsing of minified sass
153
+
154
+ ## 2.0.3
155
+
156
+ - Fix `package.json` exports field (`shared-components.es.js` => `shared-components.mjs`)
157
+
158
+ ## 2.0.2
159
+
160
+ - Export custom media queries for breakpoints `--rds-media-{size}` and `--rds-media-min-{size}`
161
+
162
+ ## 2.0.1
163
+
164
+ - Update Cypress from v10 to v12
165
+
166
+ ## 2.0.0
167
+
168
+ - Update Vite from v2 to v4
169
+
170
+ ## 1.1.97
171
+
172
+ - Update React from v17 to v18
173
+
174
+ ## 1.1.96
175
+
176
+ - Add --rds-roundness--image property
177
+ - Add some transparent variant of colors in use in players
178
+
179
+ ### 💥 Portal 💥
180
+
181
+ - Fix issue where roundness and typography values weren't displayed in portal
182
+
183
+ ## 1.1.95
184
+
185
+ ### 💥 Portal 💥
186
+
187
+ - Add 'Stil og tone' section (Strim and RiksTV version).
188
+
189
+ ## 1.1.94
190
+
191
+ - Re-adjust `Lead` typography to use `HALmatex Light`.
192
+ - This requires usage of a new font from `static.rikstv.no` which should be preloaded in the app
193
+
194
+ ## 1.1.93
195
+
196
+ - Adjust `Lead` typography to align with `title-4` (except line height)
197
+ - Add lightmode color for `Lead` based on the same color as `title-4`
198
+ - Fixed erronous lightmode name for `sub-title-2` 🤦‍♂️
199
+
200
+ ## 1.1.92
201
+
202
+ - Add NotificationDot
203
+
204
+ ## 1.1.91
205
+
206
+ - Fixes issue with flexing content of ordered items, checkmarklistitems and crossmarklistiems
207
+
208
+ ## 1.1.90
209
+
210
+ - Remove repository link in package.json of shared-components
211
+
212
+ ## 1.1.89
213
+
214
+ - Add "with-keyboard-focus-within" global class
215
+
216
+ ## 1.1.88
217
+
218
+ - More class props for ToggleInlineButton
219
+
220
+ ## 1.1.87
221
+
222
+ - Refactor Checkbox, ToggleButton and ToggleLinkButton to use new BaseCheckbox
223
+ - Added new ToggleInlineButton
224
+
225
+ ## 1.1.86
226
+
227
+ - Add --rds-spacing--40
228
+
229
+ ## 💥 1.1.84 💥
230
+
231
+ - Remove toggleButton label text on small screens as default
232
+ - Remove `showLabel` prop
233
+ - Remove `innerClass` prop
234
+ - To keep current behavior set `alwaysShowLabel={true}`
235
+
236
+ ## 1.1.82
237
+
238
+ - version with no feature changes
239
+
240
+ ## 1.1.81
241
+
242
+ - increment version since move to registry.npmjs.org
243
+
244
+ ## 1.1.80
245
+
246
+ - Add Span do typography doc
247
+
248
+ ## 1.1.79
249
+
250
+ - add innerClass and minor refactoring to toggleButton
251
+
252
+ ## 1.1.78
253
+
254
+ - update snippets ignorefile to fix issue with snippets generation
255
+
256
+ ## 1.1.77
257
+
258
+ - release snippets, no change
259
+
260
+ ## 1.1.76
261
+
262
+ - add postcss language support in snippets extension
263
+
264
+ ## 1.1.75
265
+
266
+ - Let error message take space in the DOM, will now reflow, but that is preferable to missing part of error message
267
+
268
+ ## 1.1.74
269
+
270
+ - Don't set defaultChecked on checkbox since checked is set (ToggleLinkButton)
271
+
272
+ ## 1.1.73
273
+
274
+ - Fix light mode for ToggleLinkButton
275
+
276
+ ## 1.1.72
277
+
278
+ - Added ToggleLinkButton
279
+
280
+ ## 1.1.71
281
+
282
+ - Fix color of lead
283
+ - Update readme
284
+
285
+ ## 1.1.70
286
+
287
+ Add lead typography
288
+
289
+ ## 1.1.69
290
+
291
+ Button API fix
292
+
293
+ - `transparent` prop is made optional
294
+
295
+ ## 💥 1.1.67 💥
296
+
297
+ - 💥 Button API has changed slightly
298
+ - `lightBackground` no longer has the option of `transparent`
299
+ - `transparent` is moved to a boolean property of itself
300
+ - To keep current behavior change `lightBackground="transparent"` to `lightBackground={true} transparent={true}`
301
+
302
+ ## 1.1.66
303
+
304
+ ### 💥 Portal 💥
305
+
306
+ - 💥 MDX 2 is now running the show, please read [this](https://mdxjs.com/migrating/v2/) for all changes affecting MDX
307
+ - Added an ErrorBoundary to the portal
308
+ - Changed Vite-plugin to handle React, svgs and hot reload
309
+ - 💥 Generated types are now cached locally after first generation, `npm run dev:clean` will delete all the cache
310
+ - 💥 Inline code blocks are now handled by the CodeBlock, if you want a multiline code block that must now be marked with `multiline`
311
+ - 💥 New syntax to mark code block as live or render, used to be `live=true`, now its just `live` or `render`
312
+
313
+ ## 1.1.65
314
+
315
+ - Added CircularProgressBar
316
+
317
+ ## 1.1.64
318
+
319
+ - Added xlarge roundness
320
+
321
+ ## 1.1.63
322
+
323
+ - Loading spinner to buttons
324
+
325
+ ## 1.1.58
326
+
327
+ - Add info icon to Panel
328
+
329
+ ## 1.1.57
330
+
331
+ - Auto release extension
332
+
333
+ ## 1.1.56
334
+
335
+ - PrimaryButton with arrow
336
+
337
+ ## 1.1.52
338
+
339
+ - Fix width issue with RadioToggleInput caused by position absolute on input element
340
+
341
+ ## 1.1.51
342
+
343
+ - Add snippets generator
344
+
345
+ ## 1.1.50
346
+
347
+ - Add new typography style `rds-sub-title-2`
348
+
349
+ ## 1.1.49
350
+
351
+ - Minor adjustment to brand colors and added a few new
352
+
353
+ ### Portal
354
+
355
+ - Improved display of colors
356
+ - Improved documentation of color usage
357
+ - Dynamic documentation of brand colors
358
+ - Fixed a bug where some custom properties had gone missing from portal
359
+ - Improved display of spacing
360
+ - Cleanup of documentation in core
361
+
362
+ ## 1.1.48
363
+
364
+ - Add test for List and List-components
365
+
366
+ ## 1.1.47
367
+
368
+ - Added xs, ml, lw and xl breakpoints
369
+
370
+ ## 1.1.46
371
+
372
+ - Add semantic Strim color `--faded-text`
373
+
374
+ ## 1.1.45
375
+
376
+ - Better aligning for dot in ListItem
377
+
378
+ ## 1.1.44
379
+
380
+ - Add every color in the design system in new strim/rikstvColor.scss-files
381
+ - For the existing semantic colors (in rtv.scss and strm.scss), point to these new color variables instead
382
+ - Display all new colors (both design system colors and semantics) in the portal
383
+
384
+ ## 1.1.43
385
+
386
+ - Add ordered list option to List component
387
+
388
+ ## 1.1.42
389
+
390
+ - Add progress component
391
+
392
+ ## 1.1.41
393
+
394
+ - Add breadcrumb component
395
+
396
+ ## 1.1.40
397
+
398
+ - Improve screenreader experience of Check and Cross mark list items
399
+
400
+ ## 1.1.39
401
+
402
+ - Fix layout issue with accordion if multiple in grid
403
+
404
+ ## 💥 1.1.38
405
+
406
+ - 💥 Accordion in light mode now has a light background, not dark
407
+ - 💥 Accordion removed left aligned chevron
408
+ - Update accordion style
409
+
410
+ ## 1.1.37
411
+
412
+ - Fix panel color
413
+
414
+ ## 1.1.36
415
+
416
+ - Update panel design
417
+
418
+ ## 1.1.35
419
+
420
+ - Update `align-items` of `CheckmarkListItem` from `flex-start` to `center`
421
+
422
+ ## 1.0.36
423
+
424
+ - Add `--rds-roundness--large` of 24px in Strim brand, and 8px in RTV brand
425
+
426
+ ## 1.0.35
427
+
428
+ - Add `.with-keyboard-focus` utility class
429
+
430
+ ### Portal
431
+
432
+ - Add skip-to-content link before navigation
433
+
434
+ ## 1.0.34
435
+
436
+ ### Portal
437
+
438
+ - Show `changelog` in portal
439
+
440
+ ## 1.0.33
441
+
442
+ - Padding left/right on buttons. 16px for small screens and 24px for bigger
443
+ - Padding top/bottom on buttons. 44px for small screens and 48px for bigger
444
+
445
+ ## 1.0.31
446
+
447
+ - Add ref to List - technically breaking change, but on our case it shouldn't be
448
+ - Add `useAnimatedHeight`
449
+ - Add `useBrowserPreference`
450
+ - Add `useClickOutsideListner`
451
+ - Add `useIntersectionObserver`
452
+ - Expose `useMutationObserver`
453
+
454
+ ## 1.0.30
455
+
456
+ - Fixes visual bug for Textfield on iOS 15 when type is 'search'
457
+
458
+ ## 1.0.29
459
+
460
+ - LinkButton now forwards ref onto BaseButton
461
+
462
+ ## 1.0.28
463
+
464
+ - Add 'transparent background option to LinkButton
465
+
466
+ ## 1.0.27
467
+
468
+ - Fix layout issue with Accordion
469
+
470
+ ## 1.0.26
471
+
472
+ - Update README
473
+
474
+ ## 1.0.25
475
+
476
+ - Add 'transparent' background option to Secondary Button.
477
+
478
+ ## 1.0.23
479
+
480
+ ### Portal
481
+
482
+ - Improve display of custom properties
483
+ - Align colors in /colors
484
+
485
+ ## 1.0.22
486
+
487
+ - Add Loader
488
+
489
+ ## 1.0.21
490
+
491
+ - Add breakpoints
492
+ - Add media query mixins
493
+ - Add gutter components
494
+ - Add default width
495
+
496
+ ### Portal
497
+
498
+ - Improve documentation of custom properties
499
+ - Rename spacing -> layout
500
+
501
+ ## 1.0.20
502
+
503
+ ### Portal
504
+
505
+ - Dogfood textField in portal
506
+
507
+ ## 1.0.19
508
+
509
+ - Font faces are now defined as part of core, font files are fetched from "CDN".
510
+
511
+ ## 1.0.16
512
+
513
+ - Add List, CheckmarkListItem, CrossmarkListItem and ListItem
514
+
515
+ ## 1.0.15
516
+
517
+ - Add readability width custom property
518
+
519
+ ### Portal
520
+
521
+ - Change hashrouting to browser routes, update dependencies
522
+ - Change svg-handling lib
523
+
524
+ ## 1.0.14
525
+
526
+ - Add white as option for button, fixes issue with secondary button on lightBackground
527
+
528
+ ## 1.0.13
529
+
530
+ - Adjust Panel warning variant background
531
+
532
+ ## 1.0.12
533
+
534
+ - Add Panel component
535
+
536
+ ## 1.0.12
537
+
538
+ - Add panel component
539
+
540
+ ## 1.0.11
541
+
542
+ - Improve LinkButton types
543
+
544
+ ## 1.0.10
545
+
546
+ - Add LinkButton link component
547
+
548
+ ## 1.0.9
549
+
550
+ - Fix type-export
551
+ - 1.0.8 moved `.scss` files one level deeper, `/dist/components/{Component}/{}.scss` please advice
552
+
553
+ ## 1.0.8
554
+
555
+ - Add checkbox component
556
+
557
+ ### Portal
558
+
559
+ - Improve type-generation, results in much smaller bundle
560
+ - Remove github and npm links
561
+ - Change favicon to strim
562
+
563
+ ## 1.0.3 - 1.0.7
564
+
565
+ - 💥 New textfield design, `error` is now `errorMessage`
566
+
567
+ <details>
568
+ <summary>1.0.0 🥳</summary>
569
+
570
+ - The design system finally has a home! [https://designsystem.strim.no/](https://designsystem.strim.no/)
571
+ - The design system packages has moved to our internal Nexus
572
+ - Release strategy is all new, please read [this](https://designsystem.strim.no/#/lage-komponenter)
573
+
574
+ ### 👉 Migration 👈
575
+
576
+ - Change all references to https://github.com/lfbergee with [https://git.rikstv.no/rikstv/shared/rikstv.designsystem](https://git.rikstv.no/rikstv/shared/rikstv.designsystem) and https://lfbergee.github.com/rtv-ds with [https://designsystem.strim.no/](https://designsystem.strim.no/).
577
+ - Change the origin of the repo, it is now `git@git.rikstv.no:rikstv/shared/rikstv.designsystem.git`, it's recommended to clone a new copy as the history has changed significantly
578
+ - Packages are now supplied from internal Nexus, not the public repo. Add `@rikstv:registry=https://artifacts.internal.rikstv.no/repository/npm-rikstv/` to your `.npmrc`.
579
+
580
+ </details>
581
+
582
+ <details>
583
+ <summary>Older releases</summary>
584
+
585
+ ## 0.8.0 💥 Changes the secondary and tertiary background colors. Also adds new color "--rds-background-card"
586
+
587
+ ## 0.7.0 💥 Supply style as a single file, no longer splitting css files into each component, se reasoning [here](https://github.com/lfbergee/rtv-ds/issues/278)
588
+
589
+ ### 👉 Migration 👈
590
+
591
+ 1. Import or preload `import "@rikstv/shared-components/dist/style.css"` early in your app or in root html file
592
+ 1. Remove all import of spesific `.css` files
593
+ or:
594
+ 1. Change import from `.css` to `.scss`, also the naming convention of sass files differs from css, so every import must be updated
595
+
596
+ ## 0.6.11 - 0.0.1
597
+
598
+ - Adds new feedback colors for Strim and RiksTV. The "rds-feedback-error" color is now deprecated.
599
+ - Fix build of TextField
600
+ - Add TextField
601
+ - Improve links in light mode
602
+ - Adds lightmode for primary and secondary button in strim
603
+ - Pimary and secondary buttons wrapped with lightMode component will adjust style accordingly
604
+ - lightBackground attribute can be used to override/trigger the lightMode styling
605
+ - Add accordion
606
+ - Improve style import for RadioToggle
607
+ - Let link inherit all font props
608
+ - Add link style and documentation
609
+ - New fonts added, display-title, title-1 and title-2 now expects HalMatex-Bold to be available in the app
610
+ - Adjust typography scale
611
+ - Function to generate proper fluid clamping
612
+ - Simplify release.
613
+ - More inclusive PeerDependency
614
+ - Remove react-dom as peerDep
615
+ - Align icons in buttons properly in safari
616
+ - Uses 'align-items' css to align icons in buttons for safari
617
+ - Adds forwardRef to all buttons in Button.tsx and IconButton.tsx
618
+ - Updates the colors of buttons
619
+ - Ref can be used with buttons
620
+ - All buttons have updated colors
621
+ - Added forwardRef to all buttons.
622
+ - Use numerical values for typography `line-heights`
623
+ - Change `rds-title-4` from `18-22px` to `16-22px`
624
+ - Added optional `iconClass`-prop to `IconButton`
625
+ - Darker title-1 color
626
+ - Typography for light background
627
+ - Light background wrapper component
628
+ - Light background typograhy
629
+ - Use HalMatex for Title2
630
+ - Add system-ui to font-stack
631
+ - new `sr-only` screenreader only class
632
+ - hide legend in radio toggle by default
633
+ - RadioToggleTest
634
+ - new color, accent-hover
635
+ - updated button style, taller and bolder
636
+ - update toggle style, same as button and new hover
637
+ - new color, bakground-tertiary
638
+ - Use relative values in spacing scale and radio-toggle
639
+ - Supply px-to-rem conversion function
640
+ - Rename Strim component to StrimProvider
641
+ - Rename RiksTV Component to RiksTVProvider
642
+ - Scope custom properties
643
+ - Remove font declaration from root style file
644
+ - Fix focus on RadioToggle
645
+ - Fix overflow issue on small screens in portal
646
+ - Icons now should show also in Safari
647
+ - RadioToggle button component
648
+ - Focus mixin
649
+ - Focus in Button
650
+ - Focus in portal-component
651
+ - Input method detect function
652
+ - Rewritten Core-component with input detection
653
+ - Added change log
654
+ - Initial component setup
655
+ - Initial portal setup
656
+ - Initial npm setup
657
+ - Component usage documentation
658
+
659
+ </details>
@@ -0,0 +1,68 @@
1
+ import { j as s } from "../accordion/Accordion-b8669b7e.mjs";
2
+ import { forwardRef as S, useState as o } from "react";
3
+ import { H as k, B as w } from "../typography/Typography-563b6318.mjs";
4
+ import "../icons/HeartToggle-54bb18c7.mjs";
5
+ import { S as y, a as B, b as a, c as T } from "../icons/Icons-2b68875c.mjs";
6
+ const R = "_rds-alert--icon_1cbbx_66", E = "_rds-alert--content-title_1cbbx_74", H = "_rds-alert--content_1cbbx_74", O = "_rds-alert--dismiss_1cbbx_100", D = "_dismissed_1cbbx_129", F = "_fade-out_1cbbx_1", t = {
7
+ rdsAlertIcon: R,
8
+ rdsAlertContentTitle: E,
9
+ rdsAlertContent: H,
10
+ rdsAlertDismiss: O,
11
+ dismissed: D,
12
+ fadeOut: F
13
+ }, M = {
14
+ warning: { title: "Advarsel", Icon: B },
15
+ error: { title: "Feil", Icon: a },
16
+ info: { title: "Informasjon", Icon: a },
17
+ success: { title: "Vellykket", Icon: T }
18
+ }, V = S(
19
+ ({
20
+ className: c,
21
+ intent: r = "warning",
22
+ variant: l = "filled",
23
+ testId: d = "rds-alert",
24
+ heading: m,
25
+ children: f,
26
+ dismissible: A = !0,
27
+ lightBackground: _,
28
+ onDismissed: e,
29
+ LinkToDetails: x,
30
+ ...b
31
+ }, v) => {
32
+ const [u, n] = o(!1), [j, i] = o(!1), p = ["rds-alert", _ ? "rds-light" : "", u ? t.dismissed : "", c].filter(Boolean).join(" ");
33
+ if (j)
34
+ return null;
35
+ const C = () => {
36
+ n(!1), i(!1);
37
+ }, { title: I, Icon: g } = M[r], h = () => {
38
+ i(!0), e == null || e(C);
39
+ }, N = A && l !== "inline";
40
+ return /* @__PURE__ */ s.jsxs(
41
+ "div",
42
+ {
43
+ role: "alert",
44
+ "aria-live": "polite",
45
+ ref: v,
46
+ className: p,
47
+ "data-testid": d,
48
+ "data-intent": r,
49
+ "data-variant": l,
50
+ onAnimationEnd: h,
51
+ ...b,
52
+ children: [
53
+ /* @__PURE__ */ s.jsx(g, { className: t.rdsAlertIcon }),
54
+ /* @__PURE__ */ s.jsxs("div", { className: t.rdsAlertContent, children: [
55
+ /* @__PURE__ */ s.jsx(k, { className: t.rdsAlertContentTitle, as: "span", children: m || I }),
56
+ /* @__PURE__ */ s.jsx(w, { children: f }),
57
+ x
58
+ ] }),
59
+ N && /* @__PURE__ */ s.jsx("div", { className: t.rdsAlertDismiss, children: /* @__PURE__ */ s.jsx("button", { "aria-label": "Avvis varsel", onClick: () => n(!0), children: /* @__PURE__ */ s.jsx(y, {}) }) })
60
+ ]
61
+ }
62
+ );
63
+ }
64
+ );
65
+ V.displayName = "Alert";
66
+ export {
67
+ V as A
68
+ };