rk-designsystem 1.3.1 → 1.3.4
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/dist/assets/logos/RedCrossLogo.js +30 -0
- package/dist/components/Carousel/index.js +18 -17
- package/dist/components/Carousel/styles.module.css.js +24 -24
- package/dist/components/DateInput/index.js +34 -34
- package/dist/components/DatePicker/index.js +127 -124
- package/dist/components/DatePicker/styles.module.css.js +22 -20
- package/dist/components/Donor/index.js +36 -25
- package/dist/components/Footer/index.js +180 -185
- package/dist/components/Footer/styles.module.css.js +66 -66
- package/dist/components/GraphicElement/index.js +6 -6
- package/dist/components/Header/index.js +282 -279
- package/dist/components/Header/styles.module.css.js +47 -47
- package/dist/rk-designsystem.css +1 -1
- package/package.json +7 -13
|
@@ -67,31 +67,31 @@ const L = () => /* @__PURE__ */ t(
|
|
|
67
67
|
{ value: 660, label: "660 kr" }
|
|
68
68
|
], me = ({
|
|
69
69
|
"data-color": e = "primary-color-red",
|
|
70
|
-
amounts:
|
|
71
|
-
defaultAmount:
|
|
70
|
+
amounts: k = ie,
|
|
71
|
+
defaultAmount: N = 345,
|
|
72
72
|
oneTimeLabel: B = "En gang",
|
|
73
|
-
monthlyLabel:
|
|
73
|
+
monthlyLabel: I = "Hver måned",
|
|
74
74
|
customAmountPlaceholder: x = "Valgfritt beløp",
|
|
75
|
-
amountLabel:
|
|
75
|
+
amountLabel: z = "Velg ønsket beløp:",
|
|
76
76
|
impactMessage: M = "En gave på {amount} bidrar til ...",
|
|
77
|
-
vippsButtonLabel:
|
|
78
|
-
avtalegiroLabel:
|
|
79
|
-
avtalegiroHref:
|
|
77
|
+
vippsButtonLabel: v = "Gi med",
|
|
78
|
+
avtalegiroLabel: S = "Gi med avtalegiro",
|
|
79
|
+
avtalegiroHref: H = "#",
|
|
80
80
|
currencySuffix: Z = "kr",
|
|
81
81
|
onVippsClick: f,
|
|
82
82
|
onAvtalegiroClick: c,
|
|
83
83
|
onAmountChange: r,
|
|
84
84
|
showVippsButton: T = !0,
|
|
85
|
-
showAvtalegiroLink:
|
|
86
|
-
showImpactMessage:
|
|
85
|
+
showAvtalegiroLink: j = !0,
|
|
86
|
+
showImpactMessage: V = !0,
|
|
87
87
|
heartVariant: E = "outlined"
|
|
88
88
|
}) => {
|
|
89
|
-
const
|
|
89
|
+
const g = J(), [d, F] = m("monthly"), [C, P] = m(N), [u, b] = m(""), [w, h] = m(!1);
|
|
90
90
|
K(() => {
|
|
91
91
|
const a = "rk-donor-inline-styles";
|
|
92
92
|
if (typeof document > "u" || document.getElementById(a)) return;
|
|
93
93
|
const n = ae(i), o = document.createElement("style");
|
|
94
|
-
o.id = a, o.textContent = n, document.head.
|
|
94
|
+
o.id = a, o.textContent = n, document.head.prepend(o);
|
|
95
95
|
}, []);
|
|
96
96
|
const y = parseInt(u, 10), p = w && u && y > 0 ? y : C, D = (a) => {
|
|
97
97
|
P(a), h(!1), b(""), r == null || r(a, d);
|
|
@@ -102,10 +102,10 @@ const L = () => /* @__PURE__ */ t(
|
|
|
102
102
|
o > 0 && (r == null || r(o, d));
|
|
103
103
|
}, q = () => {
|
|
104
104
|
h(!0);
|
|
105
|
-
},
|
|
105
|
+
}, R = (a) => {
|
|
106
106
|
const n = a;
|
|
107
107
|
F(n), r == null || r(p, n);
|
|
108
|
-
},
|
|
108
|
+
}, G = () => {
|
|
109
109
|
p > 0 && (f == null || f(p, d));
|
|
110
110
|
}, U = () => {
|
|
111
111
|
c == null || c();
|
|
@@ -118,14 +118,14 @@ const L = () => /* @__PURE__ */ t(
|
|
|
118
118
|
] });
|
|
119
119
|
}, $ = /* @__PURE__ */ l("div", { className: i.content, children: [
|
|
120
120
|
/* @__PURE__ */ l("div", { className: i.amountSection, children: [
|
|
121
|
-
/* @__PURE__ */ t(Y, { className: i.amountLabel, "data-size": "sm", id:
|
|
121
|
+
/* @__PURE__ */ t(Y, { className: i.amountLabel, "data-size": "sm", id: g, children: z }),
|
|
122
122
|
/* @__PURE__ */ t(
|
|
123
123
|
"div",
|
|
124
124
|
{
|
|
125
125
|
className: i.amountButtons,
|
|
126
126
|
role: "group",
|
|
127
|
-
"aria-labelledby":
|
|
128
|
-
children:
|
|
127
|
+
"aria-labelledby": g,
|
|
128
|
+
children: k.map((a) => {
|
|
129
129
|
const n = !w && C === a.value;
|
|
130
130
|
return /* @__PURE__ */ t(
|
|
131
131
|
Q,
|
|
@@ -154,7 +154,7 @@ const L = () => /* @__PURE__ */ t(
|
|
|
154
154
|
}
|
|
155
155
|
) })
|
|
156
156
|
] }),
|
|
157
|
-
|
|
157
|
+
V && /* @__PURE__ */ l("div", { className: i.impactRow, children: [
|
|
158
158
|
/* @__PURE__ */ t("div", { className: i.heartIcon, children: E === "filled" ? /* @__PURE__ */ t(L, {}) : /* @__PURE__ */ t(ee, {}) }),
|
|
159
159
|
/* @__PURE__ */ t("p", { className: i.impactText, children: O() })
|
|
160
160
|
] }),
|
|
@@ -163,26 +163,26 @@ const L = () => /* @__PURE__ */ t(
|
|
|
163
163
|
"button",
|
|
164
164
|
{
|
|
165
165
|
className: i.vippsButton,
|
|
166
|
-
onClick:
|
|
166
|
+
onClick: G,
|
|
167
167
|
type: "button",
|
|
168
|
-
"aria-label": `${
|
|
168
|
+
"aria-label": `${v} Vipps`,
|
|
169
169
|
"data-brand-exception": "vipps",
|
|
170
170
|
children: [
|
|
171
|
-
/* @__PURE__ */ t("span", { className: i.vippsButtonLabel, children:
|
|
171
|
+
/* @__PURE__ */ t("span", { className: i.vippsButtonLabel, children: v }),
|
|
172
172
|
/* @__PURE__ */ t("span", { className: i.vippsLogo, children: /* @__PURE__ */ t(te, {}) })
|
|
173
173
|
]
|
|
174
174
|
}
|
|
175
175
|
),
|
|
176
|
-
|
|
176
|
+
j && /* @__PURE__ */ t(
|
|
177
177
|
A,
|
|
178
178
|
{
|
|
179
|
-
href:
|
|
179
|
+
href: H,
|
|
180
180
|
"data-color": "neutral",
|
|
181
181
|
className: i.avtalegiroLink,
|
|
182
182
|
onClick: (a) => {
|
|
183
183
|
c && (a.preventDefault(), U());
|
|
184
184
|
},
|
|
185
|
-
children:
|
|
185
|
+
children: S
|
|
186
186
|
}
|
|
187
187
|
)
|
|
188
188
|
] })
|
|
@@ -191,7 +191,7 @@ const L = () => /* @__PURE__ */ t(
|
|
|
191
191
|
s,
|
|
192
192
|
{
|
|
193
193
|
defaultValue: "monthly",
|
|
194
|
-
onChange:
|
|
194
|
+
onChange: R,
|
|
195
195
|
"data-size": "md",
|
|
196
196
|
className: i.tabsWrapper,
|
|
197
197
|
children: [
|
|
@@ -199,7 +199,7 @@ const L = () => /* @__PURE__ */ t(
|
|
|
199
199
|
/* @__PURE__ */ t(s.Tab, { value: "one-time", children: B }),
|
|
200
200
|
/* @__PURE__ */ l(s.Tab, { value: "monthly", children: [
|
|
201
201
|
/* @__PURE__ */ t("span", { className: i.tabHeartIcon, children: /* @__PURE__ */ t(L, {}) }),
|
|
202
|
-
|
|
202
|
+
I
|
|
203
203
|
] })
|
|
204
204
|
] }),
|
|
205
205
|
/* @__PURE__ */ t(s.Panel, { value: "one-time", className: i.tabPanel, children: d === "one-time" ? $ : null }),
|
|
@@ -375,6 +375,17 @@ function ae(e) {
|
|
|
375
375
|
width: 16px;
|
|
376
376
|
height: 15px;
|
|
377
377
|
}
|
|
378
|
+
|
|
379
|
+
/* Mobil: uten disse fikk en konsument som ikke importerer stilarket
|
|
380
|
+
skrivebordsbreddene på telefon — kortet låst til 344px på en 390px-skjerm.
|
|
381
|
+
Speiler @media-blokken i styles.module.css. */
|
|
382
|
+
@media (max-width: 480px) {
|
|
383
|
+
.${e.donor} { max-width: 100%; }
|
|
384
|
+
.${e.amountSection},
|
|
385
|
+
.${e.impactRow},
|
|
386
|
+
.${e.actionsSection} { width: 100%; }
|
|
387
|
+
.${e.vippsButton} { width: 100%; max-width: 300px; }
|
|
388
|
+
}
|
|
378
389
|
`;
|
|
379
390
|
}
|
|
380
391
|
export {
|