@rikstv/shared-components 3.3.13 → 3.3.14-alpha.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.
@@ -0,0 +1,70 @@
1
+ import { jsxs as d, jsx as s } from "react/jsx-runtime";
2
+ import { forwardRef as B, useState as c } from "react";
3
+ import { H as F, B as T } from "../typography/Typography-CXNJ1SFo.mjs";
4
+ import "../icons/HeartToggle-Bwgo4FxH.mjs";
5
+ import { S as b, a as x, b as O, c as R, d as D } from "../icons/Icons-CgcqUFmH.mjs";
6
+ const E = "_rds-alert--icon_m8jce_67", H = "_rds-alert--content-title_m8jce_79", M = "_rds-alert--content_m8jce_79", V = "_rds-alert--dismiss_m8jce_109", q = "_dismissed_m8jce_138", z = "_dismiss-fade-out_m8jce_1", e = {
7
+ rdsAlertIcon: E,
8
+ rdsAlertContentTitle: H,
9
+ rdsAlertContent: M,
10
+ rdsAlertDismiss: V,
11
+ dismissed: q,
12
+ dismissFadeOut: z
13
+ }, G = {
14
+ warning: { title: "Advarsel", Icon: R },
15
+ error: { title: "Feil", Icon: O },
16
+ info: { title: "Informasjon", Icon: x },
17
+ success: { title: "Vellykket", Icon: b }
18
+ }, J = B(
19
+ ({
20
+ className: m,
21
+ intent: r = "warning",
22
+ variant: l = "filled",
23
+ testId: A = "rds-alert",
24
+ heading: f,
25
+ noHeading: i = !1,
26
+ children: _,
27
+ dismissible: v = !0,
28
+ lightBackground: u,
29
+ onDismissed: t,
30
+ LinkToDetails: C,
31
+ ...p
32
+ }, j) => {
33
+ const [I, n] = c(!1), [h, a] = c(!1), g = ["rds-alert", u ? "rds-light" : "", I ? e.dismissed : "", m].filter(Boolean).join(" ");
34
+ if (h)
35
+ return null;
36
+ const N = () => {
37
+ n(!1), a(!1);
38
+ }, { title: o, Icon: S } = G[r], y = (w) => {
39
+ w.animationName === e.dismissFadeOut && (a(!0), t == null || t(N));
40
+ }, k = v && l !== "inline";
41
+ return /* @__PURE__ */ d(
42
+ "div",
43
+ {
44
+ role: "alert",
45
+ "aria-live": "polite",
46
+ ref: j,
47
+ className: g,
48
+ "data-testid": A,
49
+ "data-intent": r,
50
+ "data-variant": l,
51
+ onAnimationEnd: y,
52
+ ...p,
53
+ children: [
54
+ /* @__PURE__ */ s(S, { className: e.rdsAlertIcon }),
55
+ /* @__PURE__ */ d("div", { className: e.rdsAlertContent, children: [
56
+ !i && /* @__PURE__ */ s(F, { className: e.rdsAlertContentTitle, as: "span", children: f || o }),
57
+ i && /* @__PURE__ */ s("span", { className: "sr-only", children: o }),
58
+ /* @__PURE__ */ s(T, { as: "div", children: _ }),
59
+ C
60
+ ] }),
61
+ k && /* @__PURE__ */ s("div", { className: e.rdsAlertDismiss, children: /* @__PURE__ */ s("button", { "aria-label": "Avvis varsel", onClick: () => n(!0), children: /* @__PURE__ */ s(D, {}) }) })
62
+ ]
63
+ }
64
+ );
65
+ }
66
+ );
67
+ J.displayName = "Alert";
68
+ export {
69
+ J as A
70
+ };
@@ -1,31 +1,33 @@
1
- import { A as C } from "./Arrow-DlptGprM.mjs";
1
+ import { A as t } from "./Arrow-DlptGprM.mjs";
2
2
  import { C as l } from "./Chevron-BBlkokQX.mjs";
3
- import { S as r, H as a, a as o } from "./HeartToggle-Bwgo4FxH.mjs";
3
+ import { S as r, H as a, a as n } from "./HeartToggle-Bwgo4FxH.mjs";
4
4
  import * as e from "react";
5
- const n = (t) => /* @__PURE__ */ e.createElement("svg", { viewBox: "4 4 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-label": "Avmerking", ...t }, /* @__PURE__ */ e.createElement("path", { fill: "currentColor", d: "M13.4614 23.777C13.2314 23.777 13.0114 23.687 12.8514 23.517L7.24137 17.727C6.91137 17.387 6.92138 16.847 7.26138 16.527C7.60138 16.197 8.14138 16.207 8.46138 16.547L13.3714 21.617L23.1714 8.34705C23.4514 7.96705 23.9814 7.88705 24.3614 8.16705C24.7414 8.44705 24.8214 8.97705 24.5414 9.35705L14.1514 23.427C14.0014 23.627 13.7714 23.757 13.5214 23.767C13.5014 23.767 13.4814 23.767 13.4614 23.767V23.777Z" })), c = (t) => /* @__PURE__ */ e.createElement("svg", { "aria-label": "Pause-symbol", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", ...t }, /* @__PURE__ */ e.createElement("defs", null), /* @__PURE__ */ e.createElement("path", { fill: "currentColor", d: "M12.8889 6H9.33333C8.59695 6 8 6.57999 8 7.29545V23.7045C8 24.42 8.59695 25 9.33333 25H12.8889C13.6253 25 14.2222 24.42 14.2222 23.7045V7.29545C14.2222 6.57999 13.6253 6 12.8889 6Z" }), /* @__PURE__ */ e.createElement("path", { fill: "currentColor", d: "M22.6667 6H19.1111C18.3747 6 17.7778 6.57999 17.7778 7.29545V23.7045C17.7778 24.42 18.3747 25 19.1111 25H22.6667C23.403 25 24 24.42 24 23.7045V7.29545C24 6.57999 23.403 6 22.6667 6Z" })), s = (t) => /* @__PURE__ */ e.createElement("svg", { "aria-label": "Play-symbol", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "-4 0 36 32", ...t }, /* @__PURE__ */ e.createElement("defs", null), /* @__PURE__ */ e.createElement("path", { fill: "currentColor", d: "M30.6 14.2L3.4.6A2 2 0 00.5 2.4v27.2a2 2 0 003 1.8l27.1-13.6a2 2 0 000-3.6z" })), i = (t) => /* @__PURE__ */ e.createElement("svg", { viewBox: "4 4 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { fill: "currentColor", d: "M17.0475 15.8475L23.4475 9.4475C23.7775 9.1175 23.7775 8.5775 23.4475 8.2475C23.1175 7.9175 22.5775 7.9175 22.2475 8.2475L15.8475 14.6475L9.4475 8.2475C9.1175 7.9175 8.5775 7.9175 8.2475 8.2475C7.9175 8.5775 7.9175 9.1175 8.2475 9.4475L14.6475 15.8475L8.2475 22.2475C7.9175 22.5775 7.9175 23.1175 8.2475 23.4475C8.4175 23.6175 8.6275 23.6975 8.8475 23.6975C9.0675 23.6975 9.2875 23.6175 9.4475 23.4475L15.8475 17.0475L22.2475 23.4475C22.4175 23.6175 22.6275 23.6975 22.8475 23.6975C23.0675 23.6975 23.2875 23.6175 23.4475 23.4475C23.7775 23.1175 23.7775 22.5775 23.4475 22.2475L17.0475 15.8475Z" })), g = (t) => /* @__PURE__ */ e.createElement("svg", { width: "100%", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { fill: "currentColor", d: "M12 3C10.22 3 8.47991 3.52784 6.99987 4.51677C5.51983 5.50571 4.36628 6.91131 3.68509 8.55585C3.0039 10.2004 2.82567 12.01 3.17294 13.7558C3.5202 15.5016 4.37737 17.1053 5.63604 18.364C6.89472 19.6226 8.49836 20.4798 10.2442 20.8271C11.99 21.1743 13.7996 20.9961 15.4442 20.3149C17.0887 19.6337 18.4943 18.4802 19.4832 17.0001C20.4722 15.5201 21 13.78 21 12C20.9974 9.61384 20.0484 7.32616 18.3611 5.63889C16.6738 3.95162 14.3862 3.00258 12 3V3ZM12.1875 6.75C12.41 6.75 12.6275 6.81598 12.8125 6.9396C12.9975 7.06321 13.1417 7.23891 13.2269 7.44448C13.312 7.65005 13.3343 7.87625 13.2909 8.09448C13.2475 8.31271 13.1403 8.51316 12.983 8.6705C12.8257 8.82783 12.6252 8.93498 12.407 8.97838C12.1888 9.02179 11.9626 8.99951 11.757 8.91436C11.5514 8.82922 11.3757 8.68502 11.2521 8.50002C11.1285 8.31501 11.0625 8.0975 11.0625 7.875C11.0625 7.57663 11.181 7.29048 11.392 7.0795C11.603 6.86853 11.8891 6.75 12.1875 6.75ZM13.875 16.875H10.875C10.6761 16.875 10.4853 16.796 10.3447 16.6553C10.204 16.5147 10.125 16.3239 10.125 16.125C10.125 15.9261 10.204 15.7353 10.3447 15.5947C10.4853 15.454 10.6761 15.375 10.875 15.375H11.4375C11.4872 15.375 11.5349 15.3552 11.5701 15.3201C11.6053 15.2849 11.625 15.2372 11.625 15.1875V11.8125C11.625 11.7628 11.6053 11.7151 11.5701 11.6799C11.5349 11.6448 11.4872 11.625 11.4375 11.625H10.875C10.6761 11.625 10.4853 11.546 10.3447 11.4053C10.204 11.2647 10.125 11.0739 10.125 10.875C10.125 10.6761 10.204 10.4853 10.3447 10.3447C10.4853 10.204 10.6761 10.125 10.875 10.125H11.625C12.0228 10.125 12.4044 10.283 12.6857 10.5643C12.967 10.8456 13.125 11.2272 13.125 11.625V15.1875C13.125 15.2372 13.1448 15.2849 13.1799 15.3201C13.2151 15.3552 13.2628 15.375 13.3125 15.375H13.875C14.0739 15.375 14.2647 15.454 14.4053 15.5947C14.546 15.7353 14.625 15.9261 14.625 16.125C14.625 16.3239 14.546 16.5147 14.4053 16.6553C14.2647 16.796 14.0739 16.875 13.875 16.875Z" })), w = (t) => /* @__PURE__ */ e.createElement("svg", { width: "100%", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { fill: "currentColor", d: "M20.8191 18.5475L13.7205 4.0725C13.3982 3.42 12.7235 3 12.0039 3C11.2843 3 10.6022 3.42 10.2873 4.0725L3.18118 18.5475C2.91882 19.08 2.9488 19.695 3.26363 20.1975C3.57846 20.7 4.11817 21 4.71035 21H19.2975C19.8896 21 20.4293 20.7 20.7442 20.1975C21.059 19.695 21.089 19.0725 20.8266 18.5475H20.8191ZM11.4342 9.1875C11.4342 8.88 11.6891 8.625 11.9964 8.625C12.3037 8.625 12.5586 8.88 12.5586 9.1875V14.8125C12.5586 15.12 12.3037 15.375 11.9964 15.375C11.6891 15.375 11.4342 15.12 11.4342 14.8125V9.1875ZM11.9964 18.1875C11.5317 18.1875 11.1569 17.8125 11.1569 17.3475C11.1569 16.8825 11.5317 16.5075 11.9964 16.5075C12.4612 16.5075 12.836 16.8825 12.836 17.3475C12.836 17.8125 12.4612 18.1875 11.9964 18.1875Z" })), m = (t) => /* @__PURE__ */ e.createElement("svg", { width: "100%", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { fill: "currentColor", d: "M12 4.5C7.86 4.5 4.5 7.86 4.5 12C4.5 16.14 7.86 19.5 12 19.5C16.14 19.5 19.5 16.14 19.5 12C19.5 7.86 16.14 4.5 12 4.5ZM10.6928 15.5572C10.5863 15.6637 10.4137 15.6637 10.3072 15.5572L7.27912 12.5291C6.98689 12.2369 6.98689 11.7631 7.27912 11.4709C7.57105 11.1789 8.04427 11.1786 8.33662 11.4701L10.5 13.6275C10.5 13.6275 15.3662 8.76129 15.66 8.4675C15.9538 8.17371 16.4304 8.17456 16.7231 8.46938C17.0144 8.76274 17.0136 9.23643 16.7212 9.52875L10.6928 15.5572Z" }), /* @__PURE__ */ e.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M12 18.75C15.7279 18.75 18.75 15.7279 18.75 12C18.75 8.27208 15.7279 5.25 12 5.25C8.27208 5.25 5.25 8.27208 5.25 12C5.25 15.7279 8.27208 18.75 12 18.75ZM12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z" })), v = (t) => /* @__PURE__ */ e.createElement("svg", { "aria-label": "Pluss-tegn", viewBox: "0 0 20 21", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("g", { id: "Add" }, /* @__PURE__ */ e.createElement("path", { id: "Vector", d: "M14.9062 9.875H10.4375V5.40625C10.4375 5.1125 10.2 4.875 9.90625 4.875C9.6125 4.875 9.375 5.1125 9.375 5.40625V9.875H4.90625C4.6125 9.875 4.375 10.1125 4.375 10.4062C4.375 10.7 4.6125 10.9375 4.90625 10.9375H9.375V15.4062C9.375 15.7 9.6125 15.9375 9.90625 15.9375C10.2 15.9375 10.4375 15.7 10.4375 15.4062V10.9375H14.9062C15.2 10.9375 15.4375 10.7 15.4375 10.4062C15.4375 10.1125 15.2 9.875 14.9062 9.875Z" }))), d = (t) => /* @__PURE__ */ e.createElement("svg", { "aria-label": "Minus-tegn", viewBox: "0 0 20 21", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("g", { id: "Subtract / Subtract" }, /* @__PURE__ */ e.createElement("path", { id: "Vector (Stroke)", fillRule: "evenodd", clipRule: "evenodd", d: "M2.5 10.5C2.5 10.2411 2.70987 10.0312 2.96875 10.0312H17.0312C17.2901 10.0312 17.5 10.2411 17.5 10.5C17.5 10.7589 17.2901 10.9688 17.0312 10.9688H2.96875C2.70987 10.9688 2.5 10.7589 2.5 10.5Z" }))), h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5
+ const o = (C) => /* @__PURE__ */ e.createElement("svg", { viewBox: "4 4 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-label": "Avmerking", ...C }, /* @__PURE__ */ e.createElement("path", { fill: "currentColor", d: "M13.4614 23.777C13.2314 23.777 13.0114 23.687 12.8514 23.517L7.24137 17.727C6.91137 17.387 6.92138 16.847 7.26138 16.527C7.60138 16.197 8.14138 16.207 8.46138 16.547L13.3714 21.617L23.1714 8.34705C23.4514 7.96705 23.9814 7.88705 24.3614 8.16705C24.7414 8.44705 24.8214 8.97705 24.5414 9.35705L14.1514 23.427C14.0014 23.627 13.7714 23.757 13.5214 23.767C13.5014 23.767 13.4814 23.767 13.4614 23.767V23.777Z" })), c = (C) => /* @__PURE__ */ e.createElement("svg", { "aria-label": "Pause-symbol", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", ...C }, /* @__PURE__ */ e.createElement("defs", null), /* @__PURE__ */ e.createElement("path", { fill: "currentColor", d: "M12.8889 6H9.33333C8.59695 6 8 6.57999 8 7.29545V23.7045C8 24.42 8.59695 25 9.33333 25H12.8889C13.6253 25 14.2222 24.42 14.2222 23.7045V7.29545C14.2222 6.57999 13.6253 6 12.8889 6Z" }), /* @__PURE__ */ e.createElement("path", { fill: "currentColor", d: "M22.6667 6H19.1111C18.3747 6 17.7778 6.57999 17.7778 7.29545V23.7045C17.7778 24.42 18.3747 25 19.1111 25H22.6667C23.403 25 24 24.42 24 23.7045V7.29545C24 6.57999 23.403 6 22.6667 6Z" })), s = (C) => /* @__PURE__ */ e.createElement("svg", { "aria-label": "Play-symbol", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "-4 0 36 32", ...C }, /* @__PURE__ */ e.createElement("defs", null), /* @__PURE__ */ e.createElement("path", { fill: "currentColor", d: "M30.6 14.2L3.4.6A2 2 0 00.5 2.4v27.2a2 2 0 003 1.8l27.1-13.6a2 2 0 000-3.6z" })), i = (C) => /* @__PURE__ */ e.createElement("svg", { viewBox: "4 4 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...C }, /* @__PURE__ */ e.createElement("path", { fill: "currentColor", d: "M17.0475 15.8475L23.4475 9.4475C23.7775 9.1175 23.7775 8.5775 23.4475 8.2475C23.1175 7.9175 22.5775 7.9175 22.2475 8.2475L15.8475 14.6475L9.4475 8.2475C9.1175 7.9175 8.5775 7.9175 8.2475 8.2475C7.9175 8.5775 7.9175 9.1175 8.2475 9.4475L14.6475 15.8475L8.2475 22.2475C7.9175 22.5775 7.9175 23.1175 8.2475 23.4475C8.4175 23.6175 8.6275 23.6975 8.8475 23.6975C9.0675 23.6975 9.2875 23.6175 9.4475 23.4475L15.8475 17.0475L22.2475 23.4475C22.4175 23.6175 22.6275 23.6975 22.8475 23.6975C23.0675 23.6975 23.2875 23.6175 23.4475 23.4475C23.7775 23.1175 23.7775 22.5775 23.4475 22.2475L17.0475 15.8475Z" })), w = (C) => /* @__PURE__ */ e.createElement("svg", { width: "100%", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...C }, /* @__PURE__ */ e.createElement("path", { fill: "currentColor", d: "M12 3C10.22 3 8.47991 3.52784 6.99987 4.51677C5.51983 5.50571 4.36628 6.91131 3.68509 8.55585C3.0039 10.2004 2.82567 12.01 3.17294 13.7558C3.5202 15.5016 4.37737 17.1053 5.63604 18.364C6.89472 19.6226 8.49836 20.4798 10.2442 20.8271C11.99 21.1743 13.7996 20.9961 15.4442 20.3149C17.0887 19.6337 18.4943 18.4802 19.4832 17.0001C20.4722 15.5201 21 13.78 21 12C20.9974 9.61384 20.0484 7.32616 18.3611 5.63889C16.6738 3.95162 14.3862 3.00258 12 3V3ZM12.1875 6.75C12.41 6.75 12.6275 6.81598 12.8125 6.9396C12.9975 7.06321 13.1417 7.23891 13.2269 7.44448C13.312 7.65005 13.3343 7.87625 13.2909 8.09448C13.2475 8.31271 13.1403 8.51316 12.983 8.6705C12.8257 8.82783 12.6252 8.93498 12.407 8.97838C12.1888 9.02179 11.9626 8.99951 11.757 8.91436C11.5514 8.82922 11.3757 8.68502 11.2521 8.50002C11.1285 8.31501 11.0625 8.0975 11.0625 7.875C11.0625 7.57663 11.181 7.29048 11.392 7.0795C11.603 6.86853 11.8891 6.75 12.1875 6.75ZM13.875 16.875H10.875C10.6761 16.875 10.4853 16.796 10.3447 16.6553C10.204 16.5147 10.125 16.3239 10.125 16.125C10.125 15.9261 10.204 15.7353 10.3447 15.5947C10.4853 15.454 10.6761 15.375 10.875 15.375H11.4375C11.4872 15.375 11.5349 15.3552 11.5701 15.3201C11.6053 15.2849 11.625 15.2372 11.625 15.1875V11.8125C11.625 11.7628 11.6053 11.7151 11.5701 11.6799C11.5349 11.6448 11.4872 11.625 11.4375 11.625H10.875C10.6761 11.625 10.4853 11.546 10.3447 11.4053C10.204 11.2647 10.125 11.0739 10.125 10.875C10.125 10.6761 10.204 10.4853 10.3447 10.3447C10.4853 10.204 10.6761 10.125 10.875 10.125H11.625C12.0228 10.125 12.4044 10.283 12.6857 10.5643C12.967 10.8456 13.125 11.2272 13.125 11.625V15.1875C13.125 15.2372 13.1448 15.2849 13.1799 15.3201C13.2151 15.3552 13.2628 15.375 13.3125 15.375H13.875C14.0739 15.375 14.2647 15.454 14.4053 15.5947C14.546 15.7353 14.625 15.9261 14.625 16.125C14.625 16.3239 14.546 16.5147 14.4053 16.6553C14.2647 16.796 14.0739 16.875 13.875 16.875Z" })), g = (C) => /* @__PURE__ */ e.createElement("svg", { width: "100%", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...C }, /* @__PURE__ */ e.createElement("path", { fill: "currentColor", d: "M20.8191 18.5475L13.7205 4.0725C13.3982 3.42 12.7235 3 12.0039 3C11.2843 3 10.6022 3.42 10.2873 4.0725L3.18118 18.5475C2.91882 19.08 2.9488 19.695 3.26363 20.1975C3.57846 20.7 4.11817 21 4.71035 21H19.2975C19.8896 21 20.4293 20.7 20.7442 20.1975C21.059 19.695 21.089 19.0725 20.8266 18.5475H20.8191ZM11.4342 9.1875C11.4342 8.88 11.6891 8.625 11.9964 8.625C12.3037 8.625 12.5586 8.88 12.5586 9.1875V14.8125C12.5586 15.12 12.3037 15.375 11.9964 15.375C11.6891 15.375 11.4342 15.12 11.4342 14.8125V9.1875ZM11.9964 18.1875C11.5317 18.1875 11.1569 17.8125 11.1569 17.3475C11.1569 16.8825 11.5317 16.5075 11.9964 16.5075C12.4612 16.5075 12.836 16.8825 12.836 17.3475C12.836 17.8125 12.4612 18.1875 11.9964 18.1875Z" })), m = (C) => /* @__PURE__ */ e.createElement("svg", { width: "100%", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...C }, /* @__PURE__ */ e.createElement("path", { fill: "currentColor", d: "M12 4.5C7.86 4.5 4.5 7.86 4.5 12C4.5 16.14 7.86 19.5 12 19.5C16.14 19.5 19.5 16.14 19.5 12C19.5 7.86 16.14 4.5 12 4.5ZM10.6928 15.5572C10.5863 15.6637 10.4137 15.6637 10.3072 15.5572L7.27912 12.5291C6.98689 12.2369 6.98689 11.7631 7.27912 11.4709C7.57105 11.1789 8.04427 11.1786 8.33662 11.4701L10.5 13.6275C10.5 13.6275 15.3662 8.76129 15.66 8.4675C15.9538 8.17371 16.4304 8.17456 16.7231 8.46938C17.0144 8.76274 17.0136 9.23643 16.7212 9.52875L10.6928 15.5572Z" }), /* @__PURE__ */ e.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M12 18.75C15.7279 18.75 18.75 15.7279 18.75 12C18.75 8.27208 15.7279 5.25 12 5.25C8.27208 5.25 5.25 8.27208 5.25 12C5.25 15.7279 8.27208 18.75 12 18.75ZM12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z" })), v = (C) => /* @__PURE__ */ e.createElement("svg", { width: "100%", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...C }, /* @__PURE__ */ e.createElement("path", { fill: "currentColor", d: "M11.9884 3.00201C9.58362 3.04138 7.29091 4.02554 5.60592 5.74176C4.76283 6.58114 4.09763 7.58189 3.65008 8.6842C3.20254 9.7865 2.98184 10.9677 3.00117 12.1573C2.99979 13.3196 3.22779 14.4708 3.67212 15.5448C4.11645 16.6189 4.76837 17.5947 5.59051 18.4164C6.41265 19.238 7.38886 19.8894 8.46318 20.3331C9.53751 20.7768 10.6888 21.0041 11.8512 21.002H12.0117C14.4172 20.9773 16.7147 19.9993 18.4 18.2826C20.0853 16.5659 21.0208 14.2508 21.0012 11.8453C21.0039 10.6688 20.7714 9.5037 20.3174 8.41843C19.8633 7.33315 19.1968 6.34962 18.357 5.52569C17.5173 4.70175 16.5213 4.05404 15.4276 3.62064C14.3339 3.18724 13.1646 2.97691 11.9884 3.00201ZM10.8762 15.4085C10.8708 15.2615 10.8947 15.1148 10.9467 14.9771C10.9986 14.8394 11.0775 14.7135 11.1787 14.6066C11.2799 14.4998 11.4013 14.4142 11.536 14.3548C11.6706 14.2955 11.8158 14.2636 11.9629 14.261H11.9832C12.2791 14.2616 12.5634 14.3767 12.7763 14.5822C12.9893 14.7878 13.1144 15.0678 13.1254 15.3635C13.1309 15.5106 13.107 15.6573 13.0551 15.795C13.0032 15.9327 12.9244 16.0587 12.8232 16.1656C12.7219 16.2725 12.6004 16.3581 12.4657 16.4174C12.331 16.4767 12.1858 16.5085 12.0387 16.511H12.0184C11.7226 16.5101 11.4385 16.3948 11.2257 16.1894C11.0128 15.9839 10.8876 15.7041 10.8762 15.4085ZM11.2512 12.377V7.87701C11.2512 7.6781 11.3302 7.48733 11.4708 7.34668C11.6115 7.20603 11.8023 7.12701 12.0012 7.12701C12.2001 7.12701 12.3908 7.20603 12.5315 7.34668C12.6722 7.48733 12.7512 7.6781 12.7512 7.87701V12.377C12.7512 12.5759 12.6722 12.7667 12.5315 12.9073C12.3908 13.048 12.2001 13.127 12.0012 13.127C11.8023 13.127 11.6115 13.048 11.4708 12.9073C11.3302 12.7667 11.2512 12.5759 11.2512 12.377Z" })), d = (C) => /* @__PURE__ */ e.createElement("svg", { "aria-label": "Pluss-tegn", viewBox: "0 0 20 21", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...C }, /* @__PURE__ */ e.createElement("g", { id: "Add" }, /* @__PURE__ */ e.createElement("path", { id: "Vector", d: "M14.9062 9.875H10.4375V5.40625C10.4375 5.1125 10.2 4.875 9.90625 4.875C9.6125 4.875 9.375 5.1125 9.375 5.40625V9.875H4.90625C4.6125 9.875 4.375 10.1125 4.375 10.4062C4.375 10.7 4.6125 10.9375 4.90625 10.9375H9.375V15.4062C9.375 15.7 9.6125 15.9375 9.90625 15.9375C10.2 15.9375 10.4375 15.7 10.4375 15.4062V10.9375H14.9062C15.2 10.9375 15.4375 10.7 15.4375 10.4062C15.4375 10.1125 15.2 9.875 14.9062 9.875Z" }))), f = (C) => /* @__PURE__ */ e.createElement("svg", { "aria-label": "Minus-tegn", viewBox: "0 0 20 21", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...C }, /* @__PURE__ */ e.createElement("g", { id: "Subtract / Subtract" }, /* @__PURE__ */ e.createElement("path", { id: "Vector (Stroke)", fillRule: "evenodd", clipRule: "evenodd", d: "M2.5 10.5C2.5 10.2411 2.70987 10.0312 2.96875 10.0312H17.0312C17.2901 10.0312 17.5 10.2411 17.5 10.5C17.5 10.7589 17.2901 10.9688 17.0312 10.9688H2.96875C2.70987 10.9688 2.5 10.7589 2.5 10.5Z" }))), E = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6
6
  __proto__: null,
7
- Add: v,
8
- AlertTriangle: w,
9
- Arrow: C,
7
+ Add: d,
8
+ AlertCircle: v,
9
+ AlertTriangle: g,
10
+ Arrow: t,
10
11
  CheckCircle: m,
11
- Checkmark: n,
12
+ Checkmark: o,
12
13
  Chevron: l,
13
14
  Close: i,
14
15
  Heart: r,
15
16
  HeartToggle: a,
16
- HeartUnfilled: o,
17
- InfoCircle: g,
17
+ HeartUnfilled: n,
18
+ InfoCircle: w,
18
19
  Pause: c,
19
20
  Play: s,
20
- Subtract: d
21
+ Subtract: f
21
22
  }, Symbol.toStringTag, { value: "Module" }));
22
23
  export {
23
- h as I,
24
+ E as I,
24
25
  m as S,
25
- g as a,
26
- w as b,
27
- i as c,
28
- n as d,
29
- v as e,
30
- d as f
26
+ w as a,
27
+ v as b,
28
+ g as c,
29
+ i as d,
30
+ o as e,
31
+ d as f,
32
+ f as g
31
33
  };
@@ -10,6 +10,7 @@ import { default as Close } from './Close.svg?react';
10
10
  import { default as InfoCircle } from './Info-circle.svg?react';
11
11
  import { default as AlertTriangle } from './AlertTriangle.svg?react';
12
12
  import { default as CheckCircle } from './CheckCircle.svg?react';
13
+ import { default as AlertCircle } from './AlertCircle.svg?react';
13
14
  import { default as Add } from './Add.svg?react';
14
15
  import { default as Subtract } from './Subtract.svg?react';
15
- export { Arrow, Checkmark, Chevron, Heart, HeartToggle, HeartUnfilled, Pause, Play, Close, InfoCircle, AlertTriangle, CheckCircle, Add, Subtract, };
16
+ export { Arrow, Checkmark, Chevron, Heart, HeartToggle, HeartUnfilled, Pause, Play, Close, InfoCircle, AlertTriangle, AlertCircle, CheckCircle, Add, Subtract, };
@@ -1,9 +1,9 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../icons/HeartToggle-Bwgo4FxH.mjs";
4
- import { d as o } from "../icons/Icons-2z4jxD15.mjs";
5
- import { L as i } from "./ListItem-ClQsSisn.mjs";
6
- const k = ({ children: r, ...m }) => /* @__PURE__ */ t(i, { testId: "rds-list-item--check", icon: /* @__PURE__ */ t(o, {}), ...m, children: r });
4
+ import { e as o } from "../icons/Icons-CgcqUFmH.mjs";
5
+ import { L as e } from "./ListItem-ClQsSisn.mjs";
6
+ const k = ({ children: r, ...m }) => /* @__PURE__ */ t(e, { testId: "rds-list-item--check", icon: /* @__PURE__ */ t(o, {}), ...m, children: r });
7
7
  export {
8
8
  k as C
9
9
  };
@@ -1,9 +1,9 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../icons/HeartToggle-Bwgo4FxH.mjs";
4
- import { c as o } from "../icons/Icons-2z4jxD15.mjs";
4
+ import { d as o } from "../icons/Icons-CgcqUFmH.mjs";
5
5
  import { L as m } from "./ListItem-ClQsSisn.mjs";
6
- const f = ({ children: r, ...s }) => /* @__PURE__ */ t(m, { testId: "rds-list-item--cross", icon: /* @__PURE__ */ t(o, {}), ...s, children: r });
6
+ const d = ({ children: r, ...s }) => /* @__PURE__ */ t(m, { testId: "rds-list-item--cross", icon: /* @__PURE__ */ t(o, {}), ...s, children: r });
7
7
  export {
8
- f as C
8
+ d as C
9
9
  };
@@ -2,12 +2,12 @@ import { jsx as e, jsxs as s } from "react/jsx-runtime";
2
2
  import { forwardRef as x, Children as v } from "react";
3
3
  import { S as C } from "../typography/Typography-CXNJ1SFo.mjs";
4
4
  import "../icons/HeartToggle-Bwgo4FxH.mjs";
5
- import { b as y, S as N, a as i } from "../icons/Icons-2z4jxD15.mjs";
6
- const $ = "_rds-panel_1x54j_1", b = "_content-and-buttons_1x54j_34", P = "_content_1x54j_34", S = "_title_1x54j_60", A = "_content-centered_1x54j_69", k = "_icon_1x54j_80", B = "_buttons_1x54j_87", n = {
5
+ import { c as y, S as N, a as i } from "../icons/Icons-CgcqUFmH.mjs";
6
+ const $ = "_rds-panel_1x54j_1", P = "_content-and-buttons_1x54j_34", S = "_content_1x54j_34", b = "_title_1x54j_60", A = "_content-centered_1x54j_69", k = "_icon_1x54j_80", B = "_buttons_1x54j_87", n = {
7
7
  rdsPanel: $,
8
- contentAndButtons: b,
9
- content: P,
10
- title: S,
8
+ contentAndButtons: P,
9
+ content: S,
10
+ title: b,
11
11
  contentCentered: A,
12
12
  icon: k,
13
13
  buttons: B
@@ -2,7 +2,7 @@ import { jsx as n, jsxs as m } from "react/jsx-runtime";
2
2
  import { forwardRef as b, useRef as p, useState as h } from "react";
3
3
  import { B as C } from "../checkbox/BaseCheckbox-BGkrjof6.mjs";
4
4
  import "../icons/HeartToggle-Bwgo4FxH.mjs";
5
- import { e as N, f as x } from "../icons/Icons-2z4jxD15.mjs";
5
+ import { f as N, g as x } from "../icons/Icons-CgcqUFmH.mjs";
6
6
  const B = b(
7
7
  ({ defaultChecked: a, toggledContentId: i, lightBackground: r, children: c, onChange: o, id: g, className: d = "", ...u }, _) => {
8
8
  const f = p(null), [t, l] = h(!!a), e = _ || f;
@@ -5,8 +5,8 @@ import { G as k } from "./components/spacing/Gutter-PXX_UdiX.mjs";
5
5
  import { G as N } from "./components/spacing/GutterPadding-Bd7tSm3F.mjs";
6
6
  import { N as Q } from "./components/notificationDot/NotificationDot-C2_j4FdL.mjs";
7
7
  import { A as _ } from "./components/accordion/Accordion-rewqLwCV.mjs";
8
- import { P as U } from "./components/panel/Panel-drl2owId.mjs";
9
- import { A as z } from "./components/alert/Alert-BDfwNOJx.mjs";
8
+ import { P as U } from "./components/panel/Panel-3hKyYFKO.mjs";
9
+ import { A as z } from "./components/alert/Alert-Bib0anpB.mjs";
10
10
  import { B as K, a as X } from "./components/breadcrumb/Breadcrumb-BJNLZ7iB.mjs";
11
11
  import { P as Z } from "./components/progress/Progress-CjnegHvC.mjs";
12
12
  import { L as re } from "./components/loader/Loader-gjL6yh1f.mjs";
@@ -17,7 +17,7 @@ import { G as fe, P as le, S as xe, T as ge } from "./components/button/ArrowBut
17
17
  import { G as ye, P as Te, S as ve, T as Be } from "./components/button/IconButton-DVEZ8K3d.mjs";
18
18
  import { T as we } from "./components/toggleButton/ToggleButton-CGLyQll6.mjs";
19
19
  import { T as Ie } from "./components/toggleInlineButton/ToggleInlineButton-Cnet1doK.mjs";
20
- import { T as be } from "./components/toggleLinkButton/ToggleLinkButton-aFK3jhbx.mjs";
20
+ import { T as be } from "./components/toggleLinkButton/ToggleLinkButton-BzwzqRHv.mjs";
21
21
  import { C as Pe } from "./components/checkbox/Checkbox-Cl4PCYXu.mjs";
22
22
  import { R as Se } from "./components/toggle/RadioToggle-C_79eEFl.mjs";
23
23
  import { F as Ce } from "./components/toggle/FieldSet-BM_JN_UL.mjs";
@@ -25,12 +25,12 @@ import { T as Fe } from "./components/textfield/TextField-Ct-ceRzE.mjs";
25
25
  import { P as De } from "./components/textfield/PasswordTextField-BfvT8zYj.mjs";
26
26
  import { B as ke, d as Ve, D as Ne, a as $e, b as Qe, c as We, H as _e, L as qe, M as Ue, S as je, e as ze, f as Je, g as Ke, T as Xe } from "./components/typography/Typography-CXNJ1SFo.mjs";
27
27
  import { L as Ze } from "./components/list/List-4jHnUXn_.mjs";
28
- import { C as rr } from "./components/list/CheckmarkListItem-B8_bwuQI.mjs";
28
+ import { C as rr } from "./components/list/CheckmarkListItem-DE0v1Zhg.mjs";
29
29
  import { L as nr } from "./components/list/ListItem-ClQsSisn.mjs";
30
- import { C as sr } from "./components/list/CrossmarkListItem-5UQyojvM.mjs";
30
+ import { C as sr } from "./components/list/CrossmarkListItem-DFXTjZR6.mjs";
31
31
  import { O as ar } from "./components/list/OrderedListItem-CphW2Aa0.mjs";
32
32
  import { useState as x, useEffect as m, useRef as c, useCallback as g, useLayoutEffect as y } from "react";
33
- import { I as ur } from "./components/icons/Icons-2z4jxD15.mjs";
33
+ import { I as ur } from "./components/icons/Icons-CgcqUFmH.mjs";
34
34
  import { B as mr } from "./components/button/BaseLinkButton-niQ474XP.mjs";
35
35
  const h = "(prefers-reduced-motion: reduce)", T = (e) => typeof window < "u" && window.matchMedia ? window.matchMedia(e).matches : !1, v = (e, t) => {
36
36
  typeof e.addEventListener < "u" && e.addEventListener("change", t);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rikstv/shared-components",
3
- "version": "3.3.13",
3
+ "version": "3.3.14-alpha.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -1,70 +0,0 @@
1
- import { jsxs as d, jsx as s } from "react/jsx-runtime";
2
- import { forwardRef as F, useState as c } from "react";
3
- import { H as T, B as b } from "../typography/Typography-CXNJ1SFo.mjs";
4
- import "../icons/HeartToggle-Bwgo4FxH.mjs";
5
- import { S as x, a as m, b as O, c as R } from "../icons/Icons-2z4jxD15.mjs";
6
- const D = "_rds-alert--icon_m8jce_67", E = "_rds-alert--content-title_m8jce_79", H = "_rds-alert--content_m8jce_79", M = "_rds-alert--dismiss_m8jce_109", V = "_dismissed_m8jce_138", q = "_dismiss-fade-out_m8jce_1", e = {
7
- rdsAlertIcon: D,
8
- rdsAlertContentTitle: E,
9
- rdsAlertContent: H,
10
- rdsAlertDismiss: M,
11
- dismissed: V,
12
- dismissFadeOut: q
13
- }, z = {
14
- warning: { title: "Advarsel", Icon: O },
15
- error: { title: "Feil", Icon: m },
16
- info: { title: "Informasjon", Icon: m },
17
- success: { title: "Vellykket", Icon: x }
18
- }, G = F(
19
- ({
20
- className: f,
21
- intent: r = "warning",
22
- variant: l = "filled",
23
- testId: A = "rds-alert",
24
- heading: _,
25
- noHeading: i = !1,
26
- children: v,
27
- dismissible: u = !0,
28
- lightBackground: p,
29
- onDismissed: t,
30
- LinkToDetails: C,
31
- ...j
32
- }, I) => {
33
- const [h, n] = c(!1), [N, a] = c(!1), g = ["rds-alert", p ? "rds-light" : "", h ? e.dismissed : "", f].filter(Boolean).join(" ");
34
- if (N)
35
- return null;
36
- const S = () => {
37
- n(!1), a(!1);
38
- }, { title: o, Icon: y } = z[r], k = (B) => {
39
- B.animationName === e.dismissFadeOut && (a(!0), t == null || t(S));
40
- }, w = u && l !== "inline";
41
- return /* @__PURE__ */ d(
42
- "div",
43
- {
44
- role: "alert",
45
- "aria-live": "polite",
46
- ref: I,
47
- className: g,
48
- "data-testid": A,
49
- "data-intent": r,
50
- "data-variant": l,
51
- onAnimationEnd: k,
52
- ...j,
53
- children: [
54
- /* @__PURE__ */ s(y, { className: e.rdsAlertIcon }),
55
- /* @__PURE__ */ d("div", { className: e.rdsAlertContent, children: [
56
- !i && /* @__PURE__ */ s(T, { className: e.rdsAlertContentTitle, as: "span", children: _ || o }),
57
- i && /* @__PURE__ */ s("span", { className: "sr-only", children: o }),
58
- /* @__PURE__ */ s(b, { as: "div", children: v }),
59
- C
60
- ] }),
61
- w && /* @__PURE__ */ s("div", { className: e.rdsAlertDismiss, children: /* @__PURE__ */ s("button", { "aria-label": "Avvis varsel", onClick: () => n(!0), children: /* @__PURE__ */ s(R, {}) }) })
62
- ]
63
- }
64
- );
65
- }
66
- );
67
- G.displayName = "Alert";
68
- export {
69
- G as A
70
- };