@folkehelseinstituttet/designsystem 0.37.0 → 0.38.1

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 (138) hide show
  1. package/custom-elements.json +1 -1
  2. package/fhi-body.js +1 -1
  3. package/fhi-button.js +1 -1
  4. package/fhi-checkbox.js +2 -2
  5. package/fhi-data-table-cell.js +1 -1
  6. package/fhi-data-table-row.js +1 -1
  7. package/fhi-data-table.js +1 -1
  8. package/fhi-date-input.js +122 -234
  9. package/fhi-date-input.js.map +1 -1
  10. package/fhi-display.js +2 -2
  11. package/fhi-flex.js +1 -1
  12. package/fhi-grid.js +1 -1
  13. package/fhi-headline.js +2 -2
  14. package/fhi-icon-arrow-down-left.js +1 -1
  15. package/fhi-icon-arrow-down-right.js +1 -1
  16. package/fhi-icon-arrow-down.js +1 -1
  17. package/fhi-icon-arrow-left.js +1 -1
  18. package/fhi-icon-arrow-right-left.js +1 -1
  19. package/fhi-icon-arrow-right.js +1 -1
  20. package/fhi-icon-arrow-up-down.js +1 -1
  21. package/fhi-icon-arrow-up-left.js +1 -1
  22. package/fhi-icon-arrow-up-right.js +1 -1
  23. package/fhi-icon-arrow-up.js +1 -1
  24. package/fhi-icon-bell.js +1 -1
  25. package/fhi-icon-calendar-clock.js +1 -1
  26. package/fhi-icon-calendar.js +1 -1
  27. package/fhi-icon-chart-bar-stacked.js +1 -1
  28. package/fhi-icon-chart-bar.js +1 -1
  29. package/fhi-icon-chart-column-stacked.js +1 -1
  30. package/fhi-icon-chart-column.js +1 -1
  31. package/fhi-icon-chart-line.js +1 -1
  32. package/fhi-icon-chart-no-axes-combined.js +1 -1
  33. package/fhi-icon-chart-pie.js +1 -1
  34. package/fhi-icon-check.js +1 -1
  35. package/fhi-icon-chevron-down.js +1 -1
  36. package/fhi-icon-chevron-left.js +1 -1
  37. package/fhi-icon-chevron-right.js +1 -1
  38. package/fhi-icon-chevron-up.js +1 -1
  39. package/fhi-icon-chevrons-down.js +1 -1
  40. package/fhi-icon-chevrons-left.js +1 -1
  41. package/fhi-icon-chevrons-right.js +1 -1
  42. package/fhi-icon-chevrons-up.js +1 -1
  43. package/fhi-icon-circle-arrow-down.js +1 -1
  44. package/fhi-icon-circle-arrow-left.js +1 -1
  45. package/fhi-icon-circle-arrow-right.js +1 -1
  46. package/fhi-icon-circle-arrow-up.js +1 -1
  47. package/fhi-icon-circle-check-big.js +1 -1
  48. package/fhi-icon-circle-check.js +1 -1
  49. package/fhi-icon-circle-chevron-down.js +1 -1
  50. package/fhi-icon-circle-chevron-left.js +1 -1
  51. package/fhi-icon-circle-chevron-right.js +1 -1
  52. package/fhi-icon-circle-chevron-up.js +1 -1
  53. package/fhi-icon-circle-exclamation.js +1 -1
  54. package/fhi-icon-circle-info.js +1 -1
  55. package/fhi-icon-circle-minus.js +1 -1
  56. package/fhi-icon-circle-plus.js +1 -1
  57. package/fhi-icon-circle-question.js +1 -1
  58. package/fhi-icon-circle-x.js +1 -1
  59. package/fhi-icon-circle.js +1 -1
  60. package/fhi-icon-clock.js +1 -1
  61. package/fhi-icon-copy.js +1 -1
  62. package/fhi-icon-download.js +1 -1
  63. package/fhi-icon-ellipsis-vertical.js +1 -1
  64. package/fhi-icon-ellipsis.js +1 -1
  65. package/fhi-icon-exclamation.js +1 -1
  66. package/fhi-icon-expand.js +1 -1
  67. package/fhi-icon-external-link.js +1 -1
  68. package/fhi-icon-eye-off.js +1 -1
  69. package/fhi-icon-eye.js +1 -1
  70. package/fhi-icon-file-text.d.ts +1 -0
  71. package/fhi-icon-file-text.js +52 -0
  72. package/fhi-icon-file-text.js.map +1 -0
  73. package/fhi-icon-file-text.manifest.json +1 -0
  74. package/fhi-icon-file.js +1 -1
  75. package/fhi-icon-filter.js +1 -1
  76. package/fhi-icon-folder.js +1 -1
  77. package/fhi-icon-gear.js +1 -1
  78. package/fhi-icon-grid-9-dots.js +1 -1
  79. package/fhi-icon-grip-horizontal.js +1 -1
  80. package/fhi-icon-grip-vertical.js +1 -1
  81. package/fhi-icon-history.js +1 -1
  82. package/fhi-icon-info.js +1 -1
  83. package/fhi-icon-link-2-off.js +1 -1
  84. package/fhi-icon-link-2.js +1 -1
  85. package/fhi-icon-link.js +1 -1
  86. package/fhi-icon-lock-open.js +1 -1
  87. package/fhi-icon-lock.js +1 -1
  88. package/fhi-icon-log-in.js +1 -1
  89. package/fhi-icon-log-out.js +1 -1
  90. package/fhi-icon-mail.js +1 -1
  91. package/fhi-icon-map-pin.js +1 -1
  92. package/fhi-icon-menu.js +1 -1
  93. package/fhi-icon-message.js +1 -1
  94. package/fhi-icon-minus.js +1 -1
  95. package/fhi-icon-octagon-alert.js +1 -1
  96. package/fhi-icon-paperclip.js +1 -1
  97. package/fhi-icon-pencil.js +1 -1
  98. package/fhi-icon-phone.js +1 -1
  99. package/fhi-icon-pin-off.js +1 -1
  100. package/fhi-icon-pin.js +1 -1
  101. package/fhi-icon-plus.js +1 -1
  102. package/fhi-icon-printer.js +1 -1
  103. package/fhi-icon-question.js +1 -1
  104. package/fhi-icon-refresh.js +1 -1
  105. package/fhi-icon-rotate-left.js +1 -1
  106. package/fhi-icon-rotate-right.js +1 -1
  107. package/fhi-icon-search.js +1 -1
  108. package/fhi-icon-send.js +1 -1
  109. package/fhi-icon-share.js +1 -1
  110. package/fhi-icon-sheet.js +1 -1
  111. package/fhi-icon-square-check-big.js +1 -1
  112. package/fhi-icon-square-check.js +1 -1
  113. package/fhi-icon-square-pen.js +1 -1
  114. package/fhi-icon-square-x.js +1 -1
  115. package/fhi-icon-square.js +1 -1
  116. package/fhi-icon-trash.js +1 -1
  117. package/fhi-icon-triangle-alert.js +1 -1
  118. package/fhi-icon-upload.js +1 -1
  119. package/fhi-icon-user.js +1 -1
  120. package/fhi-icon-x.js +1 -1
  121. package/fhi-label.js +1 -1
  122. package/fhi-modal-dialog.js +1 -1
  123. package/fhi-radio.js +2 -2
  124. package/fhi-tag.js +1 -1
  125. package/fhi-text-input.js +86 -177
  126. package/fhi-text-input.js.map +1 -1
  127. package/fhi-title.js +2 -2
  128. package/fhi-tooltip.js +1 -1
  129. package/{if-defined-BW6N1yuF.js → if-defined-B_sR6Mtk.js} +2 -2
  130. package/{if-defined-BW6N1yuF.js.map → if-defined-B_sR6Mtk.js.map} +1 -1
  131. package/index.js +179 -176
  132. package/index.js.map +1 -1
  133. package/package.json +1 -1
  134. package/{property-DGdAXcEz.js → property-B2Ico5CW.js} +2 -2
  135. package/{property-DGdAXcEz.js.map → property-B2Ico5CW.js.map} +1 -1
  136. package/{unsafe-html-lUureUEN.js → unsafe-html-DfuTUjUu.js} +2 -2
  137. package/{unsafe-html-lUureUEN.js.map → unsafe-html-DfuTUjUu.js.map} +1 -1
  138. package/web-types.json +37 -1
package/fhi-body.js CHANGED
@@ -1,4 +1,4 @@
1
- import { i as g, n, a as f, b as p, t as y } from "./property-DGdAXcEz.js";
1
+ import { i as g, n, a as f, b as p, t as y } from "./property-B2Ico5CW.js";
2
2
  var m = Object.defineProperty, d = Object.getOwnPropertyDescriptor, s = (t, r, o, a) => {
3
3
  for (var e = a > 1 ? void 0 : a ? d(r, o) : r, l = t.length - 1, h; l >= 0; l--)
4
4
  (h = t[l]) && (e = (a ? h(r, o, e) : h(e)) || e);
package/fhi-button.js CHANGED
@@ -1,4 +1,4 @@
1
- import { i as u, n as i, a as s, b, t as v } from "./property-DGdAXcEz.js";
1
+ import { i as u, n as i, a as s, b, t as v } from "./property-B2Ico5CW.js";
2
2
  var g = Object.defineProperty, h = Object.getOwnPropertyDescriptor, n = (r, e, a, c) => {
3
3
  for (var t = c > 1 ? void 0 : c ? h(e, a) : e, o = r.length - 1, d; o >= 0; o--)
4
4
  (d = r[o]) && (t = (c ? d(e, a, t) : d(t)) || t);
package/fhi-checkbox.js CHANGED
@@ -1,5 +1,5 @@
1
- import { i as b, n as a, a as v, b as s, t as k } from "./property-DGdAXcEz.js";
2
- import { o as d } from "./if-defined-BW6N1yuF.js";
1
+ import { i as b, n as a, a as v, b as s, t as k } from "./property-B2Ico5CW.js";
2
+ import { o as d } from "./if-defined-B_sR6Mtk.js";
3
3
  var p = Object.defineProperty, u = Object.getOwnPropertyDescriptor, c = (r, t, i, h) => {
4
4
  for (var e = h > 1 ? void 0 : h ? u(t, i) : t, l = r.length - 1, n; l >= 0; l--)
5
5
  (n = r[l]) && (e = (h ? n(t, i, e) : n(e)) || e);
@@ -1,4 +1,4 @@
1
- import { i as d, n as s, a as f, b as c, t as p } from "./property-DGdAXcEz.js";
1
+ import { i as d, n as s, a as f, b as c, t as p } from "./property-B2Ico5CW.js";
2
2
  var y = Object.defineProperty, b = Object.getOwnPropertyDescriptor, h = (e, a, r, l) => {
3
3
  for (var t = l > 1 ? void 0 : l ? b(a, r) : a, o = e.length - 1, n; o >= 0; o--)
4
4
  (n = e[o]) && (t = (l ? n(a, r, t) : n(t)) || t);
@@ -1,4 +1,4 @@
1
- import { i as c, n as f, a as u, b as v, t as w } from "./property-DGdAXcEz.js";
1
+ import { i as c, n as f, a as u, b as v, t as w } from "./property-B2Ico5CW.js";
2
2
  import { e as p } from "./base-D76d76ww.js";
3
3
  /**
4
4
  * @license
package/fhi-data-table.js CHANGED
@@ -1,4 +1,4 @@
1
- import { i as h, n as b, a as c, b as n, t as f } from "./property-DGdAXcEz.js";
1
+ import { i as h, n as b, a as c, b as n, t as f } from "./property-B2Ico5CW.js";
2
2
  import "./fhi-grid.js";
3
3
  import "./fhi-body.js";
4
4
  var u = Object.defineProperty, p = Object.getOwnPropertyDescriptor, s = (t, r, l, o) => {
package/fhi-date-input.js CHANGED
@@ -1,31 +1,31 @@
1
- import { i as c, n as o, a as u, b as l, t as g } from "./property-DGdAXcEz.js";
2
- import { e as y } from "./query-Ddbd72Um.js";
3
- import { o as d } from "./if-defined-BW6N1yuF.js";
1
+ import { i as c, n as r, a as u, b as l, t as f } from "./property-B2Ico5CW.js";
2
+ import { e as g } from "./query-Ddbd72Um.js";
3
+ import { o as p } from "./if-defined-B_sR6Mtk.js";
4
4
  import "./fhi-icon-calendar.js";
5
5
  const v = () => /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
6
- var f = Object.defineProperty, m = Object.getOwnPropertyDescriptor, r = (t, a, p, n) => {
7
- for (var i = n > 1 ? void 0 : n ? m(a, p) : a, s = t.length - 1, h; s >= 0; s--)
8
- (h = t[s]) && (i = (n ? h(a, p, i) : h(i)) || i);
9
- return n && i && f(a, p, i), i;
6
+ var b = Object.defineProperty, y = Object.getOwnPropertyDescriptor, a = (e, i, s, n) => {
7
+ for (var o = n > 1 ? void 0 : n ? y(i, s) : i, h = e.length - 1, d; h >= 0; h--)
8
+ (d = e[h]) && (o = (n ? d(i, s, o) : d(o)) || o);
9
+ return n && o && b(i, s, o), o;
10
10
  };
11
- const b = "fhi-date-input";
12
- let e = class extends u {
11
+ const m = "fhi-date-input";
12
+ let t = class extends u {
13
13
  constructor() {
14
14
  super(), this.label = void 0, this.message = void 0, this.helpText = void 0, this.min = void 0, this.max = void 0, this.status = void 0, this.readonly = !1, this.disabled = !1, this._name = void 0, this._value = "", this._internals = this.attachInternals();
15
15
  }
16
16
  get name() {
17
17
  return this._name;
18
18
  }
19
- set name(t) {
20
- const a = this._name;
21
- this._name = t, this.requestUpdate("name", a), this._internals.setFormValue(this.value ?? null);
19
+ set name(e) {
20
+ const i = this._name;
21
+ this._name = e, this.requestUpdate("name", i), this._internals.setFormValue(this.value ?? null);
22
22
  }
23
23
  get value() {
24
24
  return this._value;
25
25
  }
26
- set value(t) {
27
- const a = this._value;
28
- this._value = t, this.requestUpdate("value", a), this._internals.setFormValue(this._value ?? null);
26
+ set value(e) {
27
+ const i = this._value;
28
+ this._value = e, this.requestUpdate("value", i), this._internals.setFormValue(this._value ?? null);
29
29
  }
30
30
  connectedCallback() {
31
31
  super.connectedCallback(), this._internals.setFormValue(this.value ?? null);
@@ -41,8 +41,8 @@ let e = class extends u {
41
41
  })
42
42
  );
43
43
  }
44
- _handleInput(t) {
45
- this.value = this._input.value, this._internals.setFormValue(this.value ?? null), t.stopPropagation(), this._dispatchInputEvent();
44
+ _handleInput(e) {
45
+ this.value = this._input.value, this._internals.setFormValue(this.value ?? null), e.stopPropagation(), this._dispatchInputEvent();
46
46
  }
47
47
  _dispatchInputEvent() {
48
48
  this.dispatchEvent(
@@ -52,14 +52,14 @@ let e = class extends u {
52
52
  })
53
53
  );
54
54
  }
55
- _handleKeyDown(t) {
56
- t.key === "Enter" && this._internals.form && this._internals.form.requestSubmit();
55
+ _handleKeyDown(e) {
56
+ e.key === "Enter" && this._internals.form && this._internals.form.requestSubmit();
57
57
  }
58
58
  formResetCallback() {
59
59
  this.value = this.getAttribute("value"), this._internals.setFormValue(this.value ?? null);
60
60
  }
61
- _showDate(t) {
62
- t && t.type == "keydown" && t.key !== "Enter" && t.code !== "Space" || this._input.showPicker();
61
+ _showDate(e) {
62
+ e && e.type == "keydown" && e.key !== "Enter" && e.code !== "Space" || this._input.showPicker();
63
63
  }
64
64
  render() {
65
65
  return l`
@@ -69,9 +69,9 @@ let e = class extends u {
69
69
  <input
70
70
  type="date"
71
71
  id="input-element"
72
- name=${d(this.name)}
73
- min=${d(this.min)}
74
- max=${d(this.max)}
72
+ name=${p(this.name)}
73
+ min=${p(this.min)}
74
+ max=${p(this.max)}
75
75
  .value=${this.value ?? ""}
76
76
  ?readonly=${this.readonly}
77
77
  ?disabled=${this.disabled}
@@ -94,186 +94,73 @@ let e = class extends u {
94
94
  `;
95
95
  }
96
96
  };
97
- e.formAssociated = !0;
98
- e.styles = c`
99
- :host {
100
- --typography-font-family: var(--fhi-font-family-default);
101
-
102
- --opacity-disabled: var(--fhi-opacity-disabled);
103
-
104
- --dimension-width: calc(var(--fhi-spacing-1000) * 2);
105
-
106
- /* label */
107
- --color-label-text: var(--fhi-color-neutral-text-default);
108
- --color-label-text-error: var(--fhi-color-danger-text-default);
109
-
110
- --typography-label-font-family: var(--fhi-typography-label-small-font);
111
- --typography-label-font-weight: var(
112
- --fhi-typography-label-small-font-weight
113
- );
114
- --typography-label-font-size: var(--fhi-typography-label-small-font-size);
115
- --typography-label-line-height: var(
116
- --fhi-typography-label-small-line-height
117
- );
118
- --typography-label-letter-spacing: var(
119
- --fhi-typography-label-small-letter-spacing
120
- );
121
- --dimension-label-margin-bottom: var(--fhi-spacing-050);
122
-
123
- /* input */
124
- --color-input-text: var(--fhi-color-neutral-text-default);
125
- --color-input-text-error: var(--fhi-color-danger-text-default);
126
- --color-input-background: var(--fhi-color-neutral-background-default);
127
- --color-input-background-active: var(
128
- --fhi-color-accent-background-default
129
- );
130
- --color-input-background-hover: var(--fhi-color-accent-background-subtle);
131
- --color-input-background-error: var(
132
- --fhi-color-danger-background-default
133
- );
134
- --color-input-border: var(--fhi-color-neutral-border-default);
135
- --color-input-border-hover: var(--fhi-color-accent-border-default);
136
- --color-input-border-active: var(--fhi-color-accent-border-strong);
137
- --color-input-border-error: var(--fhi-color-danger-border-strong);
138
- --color-input-border-disabled: var(--fhi-color-neutral-border-default);
139
- --color-input-selection-background: var(
140
- --fhi-color-accent-surface-active
141
- );
142
-
143
- --typography-input-font-weight: var(
144
- --fhi-typography-body-medium-font-weight
145
- );
146
- --typography-input-font-size: var(--fhi-typography-body-medium-font-size);
147
- --typography-input-line-height: var(
148
- --fhi-typography-body-medium-line-height
149
- );
150
- --typography-input-letter-spacing: var(
151
- --fhi-typography-body-medium-letter-spacing
152
- );
153
-
154
- --dimension-input-border-width: var(--fhi-dimension-border-width);
155
-
156
- --dimension-input-height: var(--fhi-spacing-500);
157
- --dimension-input-border-radius: var(--fhi-border-radius-050);
158
- --dimension-input-padding-left: var(--fhi-spacing-150);
159
- --dimension-input-padding-right: var(--fhi-spacing-150);
160
-
161
- --motion-input-transition: all var(--fhi-motion-ease-default)
162
- var(--fhi-motion-duration-quick);
163
-
164
- /* icon */
165
- --dimension-icon-margin-right: var(--fhi-spacing-100);
166
- --dimension-icon-padding-left: var(--fhi-spacing-050);
167
-
168
- --color-icon-focus-outline: var(--fhi-color-accent-border-default);
169
-
170
- --dimension-icon-border-radius: var(--fhi-border-radius-050);
171
-
172
- /* message */
173
- --color-message-text: var(--fhi-color-neutral-text-default);
174
- --color-message-text-error: var(--fhi-color-danger-text-subtle);
175
-
176
- --typography-message-font-weight: var(
177
- --fhi-typography-body-small-font-weight
178
- );
179
- --typography-message-font-size: var(
180
- --fhi-typography-body-small-font-size
181
- );
182
- --typography-message-line-height: var(
183
- --fhi-typography-body-small-line-height
184
- );
185
- --typography-message-letter-spacing: var(
186
- --fhi-typography-body-small-letter-spacing
187
- );
188
-
189
- --dimension-message-margin-top: var(--fhi-spacing-050);
190
-
191
- /* help-text */
192
- --color-help-text-text: var(--fhi-color-neutral-text-subtle);
193
- --color-help-text-text-error: var(--fhi-color-danger-text-default);
194
-
195
- --typography-help-text-font-weight: var(
196
- --fhi-typography-body-small-font-weight
197
- );
198
- --typography-help-text-font-size: var(
199
- --fhi-typography-body-small-font-size
200
- );
201
- --typography-help-text-line-height: var(
202
- --fhi-typography-body-small-line-height
203
- );
204
- --typography-help-text-letter-spacing: var(
205
- --fhi-typography-body-small-letter-spacing
206
- );
207
- --dimension-help-text-margin-bottom: var(--fhi-spacing-050);
208
- }
209
-
97
+ t.formAssociated = !0;
98
+ t.styles = c`
210
99
  :host {
211
100
  display: flex;
212
101
  flex-direction: column;
213
- font-family: var(--typography-font-family);
102
+ font-family: var(--fhi-font-family-default);
214
103
  -webkit-font-smoothing: antialiased;
215
- width: var(--dimension-width);
104
+ width: calc(var(--fhi-spacing-1000) * 2);
216
105
 
217
106
  label {
218
- font-weight: var(--typography-label-font-weight);
219
- font-size: var(--typography-label-font-size);
220
- line-height: var(--typography-label-line-height);
221
- letter-spacing: var(--typography-label-letter-spacing);
222
- color: var(--color-label-text);
223
- margin: 0 0 var(--dimension-label-margin-bottom) 0;
107
+ font-weight: var(--fhi-typography-label-small-font-weight);
108
+ font-size: var(--fhi-typography-label-small-font-size);
109
+ line-height: var(--fhi-typography-label-small-line-height);
110
+ letter-spacing: var(--fhi-typography-label-small-letter-spacing);
111
+ color: var(--fhi-color-neutral-text-default);
112
+ margin: 0 0 var(--fhi-spacing-050) 0;
224
113
  }
225
114
  label:has(+ p) {
226
115
  margin: 0 0 0 0;
227
116
  }
228
117
 
229
118
  input[type='date'] {
230
- font-family: var(--typography-font-family);
231
- font-weight: var(--typography-input-font-weight);
232
- font-size: var(--typography-input-font-size);
233
- line-height: var(--typography-input-line-height);
234
- letter-spacing: var(--typography-input-letter-spacing);
119
+ font-family: var(--fhi-font-family-default);
120
+ font-weight: var(--fhi-typography-body-medium-font-weight);
121
+ font-size: var(--fhi-typography-body-medium-font-size);
122
+ line-height: var(--fhi-typography-body-medium-line-height);
123
+ letter-spacing: var(--fhi-typography-body-medium-letter-spacing);
235
124
  box-sizing: border-box;
236
- height: var(--dimension-input-height);
237
- border: var(--dimension-input-border-width) solid
238
- var(--color-input-border);
239
- border-radius: var(--dimension-input-border-radius);
240
- padding: 0 var(--dimension-input-padding-right) 0
241
- var(--dimension-input-padding-left);
242
- margin-top: var(--dimension-input-margin-top);
243
- color: var(--color-input-text);
244
- background-color: var(--color-input-background);
245
- transition: var(--motion-input-transition);
125
+ height: var(--fhi-spacing-500);
126
+ border: var(--fhi-dimension-border-width) solid
127
+ var(--fhi-color-neutral-border-default);
128
+ border-radius: var(--fhi-border-radius-050);
129
+ padding: 0 var(--fhi-spacing-150) 0 var(--fhi-spacing-150);
130
+
131
+ color: var(--fhi-color-neutral-text-default);
132
+ background-color: var(--fhi-color-neutral-background-default);
133
+ transition: all var(--fhi-motion-ease-default)
134
+ var(--fhi-motion-duration-quick);
246
135
  appearance: none;
247
136
  -moz-appearance: none;
248
137
  -webkit-appearance: none;
249
138
  width: 100%;
250
139
  &:hover {
251
- border-color: var(--color-input-border-hover);
252
- background-color: var(--color-input-background-hover);
140
+ border-color: var(--fhi-color-accent-border-default);
141
+ background-color: var(--fhi-color-accent-background-subtle);
253
142
  }
254
143
  &:focus {
255
- outline: none;
256
- border-color: var(--color-input-border-active);
257
- background-color: var(--color-input-background-active);
144
+ border-color: var(--fhi-color-accent-border-strong);
145
+ background-color: var(--fhi-color-accent-background-default);
258
146
  }
259
147
  }
260
148
  .message {
261
- margin: var(--dimension-message-margin-top) 0 0 0;
262
- color: var(--color-message-text);
263
- font-weight: var(--typography-message-font-weight);
264
- font-size: var(--typography-message-font-size);
265
- line-height: var(--typography-message-line-height);
266
- letter-spacing: var(--typography-message-letter-spacing);
149
+ margin: var(--fhi-spacing-050) 0 0 0;
150
+ color: var(--fhi-color-neutral-text-default);
151
+ font-weight: var(--fhi-typography-body-small-font-weight);
152
+ font-size: var(--fhi-typography-body-small-font-size);
153
+ line-height: var(--fhi-typography-body-small-line-height);
154
+ letter-spacing: var(--fhi-typography-body-small-letter-spacing);
267
155
  }
268
156
 
269
157
  .help-text {
270
- margin: var(--dimension-help-text-margin-top) 0 0 0;
271
- color: var(--color-help-text-text);
272
- font-weight: var(--typography-help-text-font-weight);
273
- font-size: var(--typography-help-text-font-size);
274
- line-height: var(--typography-help-text-line-height);
275
- letter-spacing: var(--typography-help-text-letter-spacing);
276
- margin: 0 0 var(--dimension-help-text-margin-bottom) 0;
158
+ color: var(--fhi-color-neutral-text-subtle);
159
+ font-weight: var(--fhi-typography-body-small-font-weight);
160
+ font-size: var(--fhi-typography-body-small-font-size);
161
+ line-height: var(--fhi-typography-body-small-line-height);
162
+ letter-spacing: var(--fhi-typography-body-small-letter-spacing);
163
+ margin: 0 0 var(--fhi-spacing-050) 0;
277
164
  }
278
165
  [type='date']::-webkit-inner-spin-button {
279
166
  opacity: 0;
@@ -290,7 +177,7 @@ e.styles = c`
290
177
  }
291
178
  }
292
179
  .input-container {
293
- height: var(--dimension-input-height);
180
+ height: var(--fhi-spacing-500);
294
181
  position: relative;
295
182
  }
296
183
  .date-icon {
@@ -298,26 +185,27 @@ e.styles = c`
298
185
  right: 0;
299
186
  top: 50%;
300
187
  transform: translateY(-50%);
301
- margin-right: var(--dimension-icon-margin-right);
188
+ margin-right: var(--fhi-spacing-100);
302
189
  height: fit-content;
303
- transition: var(--motion-input-transition);
304
- border-radius: var(--dimension-icon-border-radius);
190
+ transition: all var(--fhi-motion-ease-default)
191
+ var(--fhi-motion-duration-quick);
192
+ border-radius: var(--fhi-border-radius-050);
305
193
  &:focus {
306
- outline: solid var(--color-icon-focus-outline);
194
+ outline: solid var(--fhi-color-accent-border-default);
307
195
  }
308
196
  }
309
197
  }
310
198
 
311
199
  :host([disabled]) {
312
- opacity: var(--opacity-disabled);
200
+ opacity: var(--fhi-opacity-disabled);
313
201
  cursor: not-allowed;
314
202
  * {
315
203
  cursor: not-allowed;
316
204
  }
317
205
  input[type='date'] {
318
206
  &:hover {
319
- border-color: var(--color-input-border);
320
- background-color: var(--color-input-background);
207
+ border-color: var(--fhi-color-neutral-border-default);
208
+ background-color: var(--fhi-color-neutral-background-default);
321
209
  }
322
210
  }
323
211
  .date-icon {
@@ -333,8 +221,8 @@ e.styles = c`
333
221
  border: unset;
334
222
  border-radius: unset;
335
223
  background-color: unset;
336
- border-left: var(--dimension-input-border-width) solid
337
- var(--color-input-border);
224
+ border-left: var(--fhi-dimension-border-width) solid
225
+ var(--fhi-color-neutral-border-default);
338
226
  &:hover + .date-icon {
339
227
  background-color: unset;
340
228
  }
@@ -347,22 +235,22 @@ e.styles = c`
347
235
 
348
236
  :host([status='error']:not([disabled]):not([readonly])) {
349
237
  label {
350
- color: var(--color-label-text-error);
238
+ color: var(--fhi-color-danger-text-default);
351
239
  }
352
240
  input[type='date'] {
353
- border-color: var(--color-input-border-error);
354
- background-color: var(--color-input-background-error);
355
- color: var(--color-input-text-error);
241
+ border-color: var(--fhi-color-danger-border-strong);
242
+ background-color: var(--fhi-color-danger-background-default);
243
+ color: var(--fhi-color-danger-text-default);
356
244
  }
357
245
  .message {
358
- color: var(--color-message-text-error);
246
+ color: var(--fhi-color-danger-text-subtle);
359
247
  }
360
248
  .help-text {
361
- color: var(--color-help-text-text-error);
249
+ color: var(--fhi-color-danger-text-default);
362
250
  }
363
251
  .date-icon {
364
- background-color: var(--color-input-background-error);
365
- color: var(--color-input-text-error);
252
+ background-color: var(--fhi-color-danger-background-default);
253
+ color: var(--fhi-color-danger-text-default);
366
254
  }
367
255
  }
368
256
 
@@ -375,44 +263,44 @@ e.styles = c`
375
263
  }
376
264
  }
377
265
  `;
378
- r([
379
- o({ type: String })
380
- ], e.prototype, "label", 2);
381
- r([
382
- o({ type: String })
383
- ], e.prototype, "message", 2);
384
- r([
385
- o({ type: String, attribute: "help-text" })
386
- ], e.prototype, "helpText", 2);
387
- r([
388
- o({ type: String })
389
- ], e.prototype, "min", 2);
390
- r([
391
- o({ type: String })
392
- ], e.prototype, "max", 2);
393
- r([
394
- o({ type: String, reflect: !0 })
395
- ], e.prototype, "status", 2);
396
- r([
397
- o({ type: Boolean, reflect: !0 })
398
- ], e.prototype, "readonly", 2);
399
- r([
400
- o({ type: Boolean, reflect: !0 })
401
- ], e.prototype, "disabled", 2);
402
- r([
403
- y("#input-element")
404
- ], e.prototype, "_input", 2);
405
- r([
406
- o({ type: String, reflect: !0 })
407
- ], e.prototype, "name", 1);
408
- r([
409
- o({ type: String })
410
- ], e.prototype, "value", 1);
411
- e = r([
412
- g(b)
413
- ], e);
266
+ a([
267
+ r({ type: String })
268
+ ], t.prototype, "label", 2);
269
+ a([
270
+ r({ type: String })
271
+ ], t.prototype, "message", 2);
272
+ a([
273
+ r({ type: String, attribute: "help-text" })
274
+ ], t.prototype, "helpText", 2);
275
+ a([
276
+ r({ type: String })
277
+ ], t.prototype, "min", 2);
278
+ a([
279
+ r({ type: String })
280
+ ], t.prototype, "max", 2);
281
+ a([
282
+ r({ type: String, reflect: !0 })
283
+ ], t.prototype, "status", 2);
284
+ a([
285
+ r({ type: Boolean, reflect: !0 })
286
+ ], t.prototype, "readonly", 2);
287
+ a([
288
+ r({ type: Boolean, reflect: !0 })
289
+ ], t.prototype, "disabled", 2);
290
+ a([
291
+ g("#input-element")
292
+ ], t.prototype, "_input", 2);
293
+ a([
294
+ r({ type: String, reflect: !0 })
295
+ ], t.prototype, "name", 1);
296
+ a([
297
+ r({ type: String })
298
+ ], t.prototype, "value", 1);
299
+ t = a([
300
+ f(m)
301
+ ], t);
414
302
  export {
415
- e as FhiDateInput,
416
- b as FhiDateInputSelector
303
+ t as FhiDateInput,
304
+ m as FhiDateInputSelector
417
305
  };
418
306
  //# sourceMappingURL=fhi-date-input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fhi-date-input.js","sources":["../../src/utils/browser.ts","../../src/components/fhi-date-input/fhi-date-input.component.ts"],"sourcesContent":["/**\n * Check if the browser is Safari\n * @returns `true` if the browser is Safari\n */\nconst isSafari = () => {\n return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n};\n\nexport { isSafari };\n","import { html, css, LitElement } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport '../icons/fhi-icon-calendar.component.js';\n\nimport { isSafari } from '../../utils/browser';\n\nexport const FhiDateInputSelector = 'fhi-date-input';\n\nexport type FhiDateValue = `${number}-${number}-${number}` | undefined; // YYYY-MM-DD\n\n/**\n * ## FHI Date input\n *\n * {@link https://designsystemet.dhi.no/?path=/docs/komponenter-date-input--docs}\n *\n * The `<fhi-date-input>` component represents a date input field styled and implemented according to the FHI Design System guidelines.\n * It allows users to select or input a date.\n *\n * @tag fhi-date-input\n * @element fhi-date-input\n *\n */\n@customElement(FhiDateInputSelector)\nexport class FhiDateInput extends LitElement {\n /** @internal */\n static readonly formAssociated = true;\n\n /**\n * The text that labels the input field.\n * An input field should always have a label to ensure accessibility.\n * @type {string}\n */\n @property({ type: String }) label?: string = undefined;\n\n /**\n * The message shown beneath the input field.\n * This is often used to provide additional information or feedback to the user.\n * @type {string}\n */\n @property({ type: String }) message?: string = undefined;\n\n /**\n * The help-text shown above the input field.\n * This is often used to provide additional information to the user.\n * @type {string}\n */\n @property({ type: String, attribute: 'help-text' }) helpText?: string =\n undefined;\n\n /**\n * Sets minium date available for selection in the input field. Format `YYYY-MM-DD`.\n * @type {string}\n */\n @property({ type: String }) min?: FhiDateValue = undefined;\n\n /**\n * Sets maximum date available for selection in the input field. Format `YYYY-MM-DD`.\n * @type {string}\n */\n @property({ type: String }) max?: FhiDateValue = undefined;\n\n /**\n * Sets the visual status of the input. There is currently only one status available: `error`.\n *\n * The `error` status is used to indicate that there is an issue with the input, such as invalid or missing data.\n * @reflect\n * @type {'error'}\n */\n @property({ type: String, reflect: true }) status?: 'error' = undefined;\n\n /**\n * Sets the input to read-only. A read-only field cannot be modified by the user but may be submitted with the form.\n * @reflect\n * @type {boolean}\n */\n @property({ type: Boolean, reflect: true }) readonly? = false;\n\n /**\n * Disables the input. This changes its appearance and makes it non-interactive.\n * @reflect\n * @type {boolean}\n */\n @property({ type: Boolean, reflect: true }) disabled? = false;\n\n @query('#input-element')\n private _input!: HTMLInputElement;\n\n private _name?: string | undefined = undefined;\n\n /**\n * The name of the input. This is submitted with the form data as a `key`.\n *\n * This attribute conforms with the standard HTML `name` attribute for input fields.\n * See: {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#name}\n *\n * @reflect\n * @type {string}\n */\n @property({ type: String, reflect: true })\n get name(): string | undefined {\n return this._name;\n }\n\n set name(newName: string | undefined) {\n const oldName = this._name;\n this._name = newName;\n this.requestUpdate('name', oldName);\n this._internals.setFormValue(this.value ?? null);\n }\n\n private _value?: string = '';\n\n /**\n * The default value of the input field, formatted as `YYYY-MM-DD`.\n *\n * You can fetch the current value of the date input by accessing this property directly on the component instance, or by listening for the `change` or `input` events which are dispatched whenever the value changes.\n *\n * This attribute conforms with the standard HTML `value` attribute for input fields.\n * See: {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value}\n *\n * @type {string}\n */\n @property({ type: String })\n get value(): FhiDateValue {\n return this._value as FhiDateValue;\n }\n\n set value(newValue: FhiDateValue) {\n const oldValue = this._value;\n this._value = newValue;\n this.requestUpdate('value', oldValue);\n this._internals.setFormValue(this._value ?? null);\n }\n\n private _internals: ElementInternals;\n\n constructor() {\n super();\n this._internals = this.attachInternals();\n }\n\n public connectedCallback(): void {\n super.connectedCallback();\n this._internals.setFormValue(this.value ?? null);\n }\n\n private _handleChange(): void {\n this._dispatchChangeEvent();\n }\n\n private _dispatchChangeEvent(): void {\n /**\n * @type {Event} - Standard DOM event with the type `change`.\n * This event is dispatched when the value of the input changes.\n */\n this.dispatchEvent(\n new Event('change', {\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n private _handleInput(event: Event): void {\n this.value = this._input.value as FhiDateValue;\n this._internals.setFormValue(this.value ?? null);\n event.stopPropagation();\n this._dispatchInputEvent();\n }\n\n private _dispatchInputEvent(): void {\n /**\n * @type {Event} - Standard DOM event with the type `input`.\n * This event is dispatched when the value of the input changes.\n */\n this.dispatchEvent(\n new Event('input', {\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n private _handleKeyDown(event: KeyboardEvent): void {\n if (event.key === 'Enter' && this._internals.form) {\n this._internals.form!.requestSubmit();\n }\n }\n\n public formResetCallback(): void {\n this.value = this.getAttribute('value') as FhiDateValue;\n this._internals.setFormValue(this.value ?? null);\n }\n\n private _showDate(event?: KeyboardEvent) {\n if (\n event &&\n event.type == 'keydown' &&\n event.key !== 'Enter' &&\n event.code !== 'Space'\n ) {\n return;\n }\n this._input.showPicker();\n }\n\n render() {\n return html`\n ${this.label && html`<label for=\"input-element\">${this.label}</label>`}\n ${this.helpText && html`<p class=\"help-text\">${this.helpText}</p>`}\n <div class=\"input-container\">\n <input\n type=\"date\"\n id=\"input-element\"\n name=${ifDefined(this.name)}\n min=${ifDefined(this.min)}\n max=${ifDefined(this.max)}\n .value=${this.value ?? ''}\n ?readonly=${this.readonly}\n ?disabled=${this.disabled}\n @change=${this._handleChange}\n @input=${this._handleInput}\n @keydown=${this._handleKeyDown}\n />\n <span\n class=\"date-icon\"\n @click=${this._showDate}\n @keydown=${this._showDate}\n tabindex=${isSafari() ? '-1' : '0'}\n role=\"button\"\n aria-label=\"Vis datovelger\"\n aria-haspopup=\"true\"\n ><fhi-icon-calendar></fhi-icon-calendar\n ></span>\n </div>\n ${this.message && html`<p class=\"message\">${this.message}</p>`}\n `;\n }\n\n static styles = css`\n :host {\n --typography-font-family: var(--fhi-font-family-default);\n\n --opacity-disabled: var(--fhi-opacity-disabled);\n\n --dimension-width: calc(var(--fhi-spacing-1000) * 2);\n\n /* label */\n --color-label-text: var(--fhi-color-neutral-text-default);\n --color-label-text-error: var(--fhi-color-danger-text-default);\n\n --typography-label-font-family: var(--fhi-typography-label-small-font);\n --typography-label-font-weight: var(\n --fhi-typography-label-small-font-weight\n );\n --typography-label-font-size: var(--fhi-typography-label-small-font-size);\n --typography-label-line-height: var(\n --fhi-typography-label-small-line-height\n );\n --typography-label-letter-spacing: var(\n --fhi-typography-label-small-letter-spacing\n );\n --dimension-label-margin-bottom: var(--fhi-spacing-050);\n\n /* input */\n --color-input-text: var(--fhi-color-neutral-text-default);\n --color-input-text-error: var(--fhi-color-danger-text-default);\n --color-input-background: var(--fhi-color-neutral-background-default);\n --color-input-background-active: var(\n --fhi-color-accent-background-default\n );\n --color-input-background-hover: var(--fhi-color-accent-background-subtle);\n --color-input-background-error: var(\n --fhi-color-danger-background-default\n );\n --color-input-border: var(--fhi-color-neutral-border-default);\n --color-input-border-hover: var(--fhi-color-accent-border-default);\n --color-input-border-active: var(--fhi-color-accent-border-strong);\n --color-input-border-error: var(--fhi-color-danger-border-strong);\n --color-input-border-disabled: var(--fhi-color-neutral-border-default);\n --color-input-selection-background: var(\n --fhi-color-accent-surface-active\n );\n\n --typography-input-font-weight: var(\n --fhi-typography-body-medium-font-weight\n );\n --typography-input-font-size: var(--fhi-typography-body-medium-font-size);\n --typography-input-line-height: var(\n --fhi-typography-body-medium-line-height\n );\n --typography-input-letter-spacing: var(\n --fhi-typography-body-medium-letter-spacing\n );\n\n --dimension-input-border-width: var(--fhi-dimension-border-width);\n\n --dimension-input-height: var(--fhi-spacing-500);\n --dimension-input-border-radius: var(--fhi-border-radius-050);\n --dimension-input-padding-left: var(--fhi-spacing-150);\n --dimension-input-padding-right: var(--fhi-spacing-150);\n\n --motion-input-transition: all var(--fhi-motion-ease-default)\n var(--fhi-motion-duration-quick);\n\n /* icon */\n --dimension-icon-margin-right: var(--fhi-spacing-100);\n --dimension-icon-padding-left: var(--fhi-spacing-050);\n\n --color-icon-focus-outline: var(--fhi-color-accent-border-default);\n\n --dimension-icon-border-radius: var(--fhi-border-radius-050);\n\n /* message */\n --color-message-text: var(--fhi-color-neutral-text-default);\n --color-message-text-error: var(--fhi-color-danger-text-subtle);\n\n --typography-message-font-weight: var(\n --fhi-typography-body-small-font-weight\n );\n --typography-message-font-size: var(\n --fhi-typography-body-small-font-size\n );\n --typography-message-line-height: var(\n --fhi-typography-body-small-line-height\n );\n --typography-message-letter-spacing: var(\n --fhi-typography-body-small-letter-spacing\n );\n\n --dimension-message-margin-top: var(--fhi-spacing-050);\n\n /* help-text */\n --color-help-text-text: var(--fhi-color-neutral-text-subtle);\n --color-help-text-text-error: var(--fhi-color-danger-text-default);\n\n --typography-help-text-font-weight: var(\n --fhi-typography-body-small-font-weight\n );\n --typography-help-text-font-size: var(\n --fhi-typography-body-small-font-size\n );\n --typography-help-text-line-height: var(\n --fhi-typography-body-small-line-height\n );\n --typography-help-text-letter-spacing: var(\n --fhi-typography-body-small-letter-spacing\n );\n --dimension-help-text-margin-bottom: var(--fhi-spacing-050);\n }\n\n :host {\n display: flex;\n flex-direction: column;\n font-family: var(--typography-font-family);\n -webkit-font-smoothing: antialiased;\n width: var(--dimension-width);\n\n label {\n font-weight: var(--typography-label-font-weight);\n font-size: var(--typography-label-font-size);\n line-height: var(--typography-label-line-height);\n letter-spacing: var(--typography-label-letter-spacing);\n color: var(--color-label-text);\n margin: 0 0 var(--dimension-label-margin-bottom) 0;\n }\n label:has(+ p) {\n margin: 0 0 0 0;\n }\n\n input[type='date'] {\n font-family: var(--typography-font-family);\n font-weight: var(--typography-input-font-weight);\n font-size: var(--typography-input-font-size);\n line-height: var(--typography-input-line-height);\n letter-spacing: var(--typography-input-letter-spacing);\n box-sizing: border-box;\n height: var(--dimension-input-height);\n border: var(--dimension-input-border-width) solid\n var(--color-input-border);\n border-radius: var(--dimension-input-border-radius);\n padding: 0 var(--dimension-input-padding-right) 0\n var(--dimension-input-padding-left);\n margin-top: var(--dimension-input-margin-top);\n color: var(--color-input-text);\n background-color: var(--color-input-background);\n transition: var(--motion-input-transition);\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n width: 100%;\n &:hover {\n border-color: var(--color-input-border-hover);\n background-color: var(--color-input-background-hover);\n }\n &:focus {\n outline: none;\n border-color: var(--color-input-border-active);\n background-color: var(--color-input-background-active);\n }\n }\n .message {\n margin: var(--dimension-message-margin-top) 0 0 0;\n color: var(--color-message-text);\n font-weight: var(--typography-message-font-weight);\n font-size: var(--typography-message-font-size);\n line-height: var(--typography-message-line-height);\n letter-spacing: var(--typography-message-letter-spacing);\n }\n\n .help-text {\n margin: var(--dimension-help-text-margin-top) 0 0 0;\n color: var(--color-help-text-text);\n font-weight: var(--typography-help-text-font-weight);\n font-size: var(--typography-help-text-font-size);\n line-height: var(--typography-help-text-line-height);\n letter-spacing: var(--typography-help-text-letter-spacing);\n margin: 0 0 var(--dimension-help-text-margin-bottom) 0;\n }\n [type='date']::-webkit-inner-spin-button {\n opacity: 0;\n }\n [type='date']::-webkit-calendar-picker-indicator {\n opacity: 0;\n -webkit-appearance: none;\n display: none;\n visibility: hidden;\n\n &:target {\n outline: solid;\n font-size: 5rem;\n }\n }\n .input-container {\n height: var(--dimension-input-height);\n position: relative;\n }\n .date-icon {\n position: absolute;\n right: 0;\n top: 50%;\n transform: translateY(-50%);\n margin-right: var(--dimension-icon-margin-right);\n height: fit-content;\n transition: var(--motion-input-transition);\n border-radius: var(--dimension-icon-border-radius);\n &:focus {\n outline: solid var(--color-icon-focus-outline);\n }\n }\n }\n\n :host([disabled]) {\n opacity: var(--opacity-disabled);\n cursor: not-allowed;\n * {\n cursor: not-allowed;\n }\n input[type='date'] {\n &:hover {\n border-color: var(--color-input-border);\n background-color: var(--color-input-background);\n }\n }\n .date-icon {\n background-color: unset;\n &:focus {\n outline: none;\n }\n }\n }\n\n :host([readonly]:not([disabled])) {\n input[type='date'] {\n border: unset;\n border-radius: unset;\n background-color: unset;\n border-left: var(--dimension-input-border-width) solid\n var(--color-input-border);\n &:hover + .date-icon {\n background-color: unset;\n }\n }\n .date-icon {\n background-color: unset;\n display: none;\n }\n }\n\n :host([status='error']:not([disabled]):not([readonly])) {\n label {\n color: var(--color-label-text-error);\n }\n input[type='date'] {\n border-color: var(--color-input-border-error);\n background-color: var(--color-input-background-error);\n color: var(--color-input-text-error);\n }\n .message {\n color: var(--color-message-text-error);\n }\n .help-text {\n color: var(--color-help-text-text-error);\n }\n .date-icon {\n background-color: var(--color-input-background-error);\n color: var(--color-input-text-error);\n }\n }\n\n @-moz-document url-prefix() {\n :host {\n .date-icon {\n display: none;\n visibility: hidden;\n }\n }\n }\n `;\n}\n"],"names":["isSafari","FhiDateInputSelector","FhiDateInput","LitElement","newName","oldName","newValue","oldValue","event","html","ifDefined","css","__decorateClass","property","query","customElement"],"mappings":";;;;AAIA,MAAMA,IAAW,MACR,iCAAiC,KAAK,UAAU,SAAS;;;;;;ACE3D,MAAMC,IAAuB;AAiB7B,IAAMC,IAAN,cAA2BC,EAAW;AAAA,EAiH3C,cAAc;AACZ,UAAA,GAzG0B,KAAA,QAAiB,QAOjB,KAAA,UAAmB,QAOK,KAAA,WAClD,QAM0B,KAAA,MAAqB,QAMrB,KAAA,MAAqB,QASN,KAAA,SAAmB,QAOlB,KAAA,WAAY,IAOZ,KAAA,WAAY,IAKxD,KAAQ,QAA6B,QAuBrC,KAAQ,SAAkB,IA4BxB,KAAK,aAAa,KAAK,gBAAA;AAAA,EACzB;AAAA,EAxCA,IAAI,OAA2B;AAC7B,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,IAAI,K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HC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GA3E9BX,EA4EP,WAAA,QAAA,CAAA;AAwBAU,EAAA;AAAA,EADHC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAnGfX,EAoGP,WAAA,SAAA,CAAA;AApGOA,IAANU,EAAA;AAAA,EADNG,EAAcd,CAAoB;AAAA,GACtBC,CAAA;"}
1
+ {"version":3,"file":"fhi-date-input.js","sources":["../../src/utils/browser.ts","../../src/components/fhi-date-input/fhi-date-input.component.ts"],"sourcesContent":["/**\n * Check if the browser is Safari\n * @returns `true` if the browser is Safari\n */\nconst isSafari = () => {\n return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n};\n\nexport { isSafari };\n","import { html, css, LitElement } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport '../icons/fhi-icon-calendar.component.js';\n\nimport { isSafari } from '../../utils/browser';\n\nexport const FhiDateInputSelector = 'fhi-date-input';\n\nexport type FhiDateValue = `${number}-${number}-${number}` | undefined; // YYYY-MM-DD\n\n/**\n * ## FHI Date input\n *\n * {@link https://designsystemet.dhi.no/?path=/docs/komponenter-date-input--docs}\n *\n * The `<fhi-date-input>` component represents a date input field styled and implemented according to the FHI Design System guidelines.\n * It allows users to select or input a date.\n *\n * @tag fhi-date-input\n * @element fhi-date-input\n *\n */\n@customElement(FhiDateInputSelector)\nexport class FhiDateInput extends LitElement {\n /** @internal */\n static readonly formAssociated = true;\n\n /**\n * The text that labels the input field.\n * An input field should always have a label to ensure accessibility.\n * @type {string}\n */\n @property({ type: String }) label?: string = undefined;\n\n /**\n * The message shown beneath the input field.\n * This is often used to provide additional information or feedback to the user.\n * @type {string}\n */\n @property({ type: String }) message?: string = undefined;\n\n /**\n * The help-text shown above the input field.\n * This is often used to provide additional information to the user.\n * @type {string}\n */\n @property({ type: String, attribute: 'help-text' }) helpText?: string =\n undefined;\n\n /**\n * Sets minium date available for selection in the input field. Format `YYYY-MM-DD`.\n * @type {string}\n */\n @property({ type: String }) min?: FhiDateValue = undefined;\n\n /**\n * Sets maximum date available for selection in the input field. Format `YYYY-MM-DD`.\n * @type {string}\n */\n @property({ type: String }) max?: FhiDateValue = undefined;\n\n /**\n * Sets the visual status of the input. There is currently only one status available: `error`.\n *\n * The `error` status is used to indicate that there is an issue with the input, such as invalid or missing data.\n * @reflect\n * @type {'error'}\n */\n @property({ type: String, reflect: true }) status?: 'error' = undefined;\n\n /**\n * Sets the input to read-only. A read-only field cannot be modified by the user but may be submitted with the form.\n * @reflect\n * @type {boolean}\n */\n @property({ type: Boolean, reflect: true }) readonly? = false;\n\n /**\n * Disables the input. This changes its appearance and makes it non-interactive.\n * @reflect\n * @type {boolean}\n */\n @property({ type: Boolean, reflect: true }) disabled? = false;\n\n @query('#input-element')\n private _input!: HTMLInputElement;\n\n private _name?: string | undefined = undefined;\n\n /**\n * The name of the input. This is submitted with the form data as a `key`.\n *\n * This attribute conforms with the standard HTML `name` attribute for input fields.\n * See: {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#name}\n *\n * @reflect\n * @type {string}\n */\n @property({ type: String, reflect: true })\n get name(): string | undefined {\n return this._name;\n }\n\n set name(newName: string | undefined) {\n const oldName = this._name;\n this._name = newName;\n this.requestUpdate('name', oldName);\n this._internals.setFormValue(this.value ?? null);\n }\n\n private _value?: string = '';\n\n /**\n * The default value of the input field, formatted as `YYYY-MM-DD`.\n *\n * You can fetch the current value of the date input by accessing this property directly on the component instance, or by listening for the `change` or `input` events which are dispatched whenever the value changes.\n *\n * This attribute conforms with the standard HTML `value` attribute for input fields.\n * See: {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value}\n *\n * @type {string}\n */\n @property({ type: String })\n get value(): FhiDateValue {\n return this._value as FhiDateValue;\n }\n\n set value(newValue: FhiDateValue) {\n const oldValue = this._value;\n this._value = newValue;\n this.requestUpdate('value', oldValue);\n this._internals.setFormValue(this._value ?? null);\n }\n\n private _internals: ElementInternals;\n\n constructor() {\n super();\n this._internals = this.attachInternals();\n }\n\n public connectedCallback(): void {\n super.connectedCallback();\n this._internals.setFormValue(this.value ?? null);\n }\n\n private _handleChange(): void {\n this._dispatchChangeEvent();\n }\n\n private _dispatchChangeEvent(): void {\n /**\n * @type {Event} - Standard DOM event with the type `change`.\n * This event is dispatched when the value of the input changes.\n */\n this.dispatchEvent(\n new Event('change', {\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n private _handleInput(event: Event): void {\n this.value = this._input.value as FhiDateValue;\n this._internals.setFormValue(this.value ?? null);\n event.stopPropagation();\n this._dispatchInputEvent();\n }\n\n private _dispatchInputEvent(): void {\n /**\n * @type {Event} - Standard DOM event with the type `input`.\n * This event is dispatched when the value of the input changes.\n */\n this.dispatchEvent(\n new Event('input', {\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n private _handleKeyDown(event: KeyboardEvent): void {\n if (event.key === 'Enter' && this._internals.form) {\n this._internals.form!.requestSubmit();\n }\n }\n\n public formResetCallback(): void {\n this.value = this.getAttribute('value') as FhiDateValue;\n this._internals.setFormValue(this.value ?? null);\n }\n\n private _showDate(event?: KeyboardEvent) {\n if (\n event &&\n event.type == 'keydown' &&\n event.key !== 'Enter' &&\n event.code !== 'Space'\n ) {\n return;\n }\n this._input.showPicker();\n }\n\n render() {\n return html`\n ${this.label && html`<label for=\"input-element\">${this.label}</label>`}\n ${this.helpText && html`<p class=\"help-text\">${this.helpText}</p>`}\n <div class=\"input-container\">\n <input\n type=\"date\"\n id=\"input-element\"\n name=${ifDefined(this.name)}\n min=${ifDefined(this.min)}\n max=${ifDefined(this.max)}\n .value=${this.value ?? ''}\n ?readonly=${this.readonly}\n ?disabled=${this.disabled}\n @change=${this._handleChange}\n @input=${this._handleInput}\n @keydown=${this._handleKeyDown}\n />\n <span\n class=\"date-icon\"\n @click=${this._showDate}\n @keydown=${this._showDate}\n tabindex=${isSafari() ? '-1' : '0'}\n role=\"button\"\n aria-label=\"Vis datovelger\"\n aria-haspopup=\"true\"\n ><fhi-icon-calendar></fhi-icon-calendar\n ></span>\n </div>\n ${this.message && html`<p class=\"message\">${this.message}</p>`}\n `;\n }\n\n static styles = css`\n :host {\n display: flex;\n flex-direction: column;\n font-family: var(--fhi-font-family-default);\n -webkit-font-smoothing: antialiased;\n width: calc(var(--fhi-spacing-1000) * 2);\n\n label {\n font-weight: var(--fhi-typography-label-small-font-weight);\n font-size: var(--fhi-typography-label-small-font-size);\n line-height: var(--fhi-typography-label-small-line-height);\n letter-spacing: var(--fhi-typography-label-small-letter-spacing);\n color: var(--fhi-color-neutral-text-default);\n margin: 0 0 var(--fhi-spacing-050) 0;\n }\n label:has(+ p) {\n margin: 0 0 0 0;\n }\n\n input[type='date'] {\n font-family: var(--fhi-font-family-default);\n font-weight: var(--fhi-typography-body-medium-font-weight);\n font-size: var(--fhi-typography-body-medium-font-size);\n line-height: var(--fhi-typography-body-medium-line-height);\n letter-spacing: var(--fhi-typography-body-medium-letter-spacing);\n box-sizing: border-box;\n height: var(--fhi-spacing-500);\n border: var(--fhi-dimension-border-width) solid\n var(--fhi-color-neutral-border-default);\n border-radius: var(--fhi-border-radius-050);\n padding: 0 var(--fhi-spacing-150) 0 var(--fhi-spacing-150);\n\n color: var(--fhi-color-neutral-text-default);\n background-color: var(--fhi-color-neutral-background-default);\n transition: all var(--fhi-motion-ease-default)\n var(--fhi-motion-duration-quick);\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n width: 100%;\n &:hover {\n border-color: var(--fhi-color-accent-border-default);\n background-color: var(--fhi-color-accent-background-subtle);\n }\n &:focus {\n border-color: var(--fhi-color-accent-border-strong);\n background-color: var(--fhi-color-accent-background-default);\n }\n }\n .message {\n margin: var(--fhi-spacing-050) 0 0 0;\n color: var(--fhi-color-neutral-text-default);\n font-weight: var(--fhi-typography-body-small-font-weight);\n font-size: var(--fhi-typography-body-small-font-size);\n line-height: var(--fhi-typography-body-small-line-height);\n letter-spacing: var(--fhi-typography-body-small-letter-spacing);\n }\n\n .help-text {\n color: var(--fhi-color-neutral-text-subtle);\n font-weight: var(--fhi-typography-body-small-font-weight);\n font-size: var(--fhi-typography-body-small-font-size);\n line-height: var(--fhi-typography-body-small-line-height);\n letter-spacing: var(--fhi-typography-body-small-letter-spacing);\n margin: 0 0 var(--fhi-spacing-050) 0;\n }\n [type='date']::-webkit-inner-spin-button {\n opacity: 0;\n }\n [type='date']::-webkit-calendar-picker-indicator {\n opacity: 0;\n -webkit-appearance: none;\n display: none;\n visibility: hidden;\n\n &:target {\n outline: solid;\n font-size: 5rem;\n }\n }\n .input-container {\n height: var(--fhi-spacing-500);\n position: relative;\n }\n .date-icon {\n position: absolute;\n right: 0;\n top: 50%;\n transform: translateY(-50%);\n margin-right: var(--fhi-spacing-100);\n height: fit-content;\n transition: all var(--fhi-motion-ease-default)\n var(--fhi-motion-duration-quick);\n border-radius: var(--fhi-border-radius-050);\n &:focus {\n outline: solid var(--fhi-color-accent-border-default);\n }\n }\n }\n\n :host([disabled]) {\n opacity: var(--fhi-opacity-disabled);\n cursor: not-allowed;\n * {\n cursor: not-allowed;\n }\n input[type='date'] {\n &:hover {\n border-color: var(--fhi-color-neutral-border-default);\n background-color: var(--fhi-color-neutral-background-default);\n }\n }\n .date-icon {\n background-color: unset;\n &:focus {\n outline: none;\n }\n }\n }\n\n :host([readonly]:not([disabled])) {\n input[type='date'] {\n border: unset;\n border-radius: unset;\n background-color: unset;\n border-left: var(--fhi-dimension-border-width) solid\n var(--fhi-color-neutral-border-default);\n &:hover + .date-icon {\n background-color: unset;\n }\n }\n .date-icon {\n background-color: unset;\n display: none;\n }\n }\n\n :host([status='error']:not([disabled]):not([readonly])) {\n label {\n color: var(--fhi-color-danger-text-default);\n }\n input[type='date'] {\n border-color: var(--fhi-color-danger-border-strong);\n background-color: var(--fhi-color-danger-background-default);\n color: var(--fhi-color-danger-text-default);\n }\n .message {\n color: var(--fhi-color-danger-text-subtle);\n }\n .help-text {\n color: var(--fhi-color-danger-text-default);\n }\n .date-icon {\n background-color: var(--fhi-color-danger-background-default);\n color: var(--fhi-color-danger-text-default);\n }\n }\n\n @-moz-document url-prefix() {\n :host {\n .date-icon {\n display: none;\n visibility: hidden;\n }\n }\n }\n `;\n}\n"],"names":["isSafari","FhiDateInputSelector","FhiDateInput","LitElement","newName","oldName","newValue","oldValue","event","html","ifDefined","css","__decorateClass","property","query","customElement"],"mappings":";;;;AAIA,MAAMA,IAAW,MACR,iCAAiC,KAAK,UAAU,SAAS;;;;;;ACE3D,MAAMC,IAAuB;AAiB7B,IAAMC,IAAN,cAA2BC,EAAW;AAAA,EAiH3C,cAAc;AACZ,UAAA,GAzG0B,KAAA,QAAiB,QAOjB,KAAA,UAAmB,QAOK,KAAA,WAClD,QAM0B,KAAA,MAAqB,QAMrB,KAAA,MAAqB,QASN,KAAA,SAAmB,QAOlB,KAAA,WAAY,IAOZ,KAAA,WAAY,IAKxD,KAAQ,QAA6B,QAuBrC,KAAQ,SAAkB,IA4BxB,KAAK,aAAa,KAAK,gBAAA;AAAA,EACzB;AAAA,EAxCA,IAAI,OAA2B;AAC7B,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,IAAI,KAAKC,GAA6B;AACpC,UAAMC,IAAU,KAAK;AACrB,SAAK,QAAQD,GACb,KAAK,cAAc,QAAQC,CAAO,GAClC,KAAK,WAAW,aAAa,KAAK,SAAS,IAAI;AAAA,EACjD;AAAA,EAeA,IAAI,QAAsB;AACxB,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,IAAI,MAAMC,GAAwB;AAChC,UAAMC,IAAW,KAAK;AACtB,SAAK,SAASD,GACd,KAAK,cAAc,SAASC,CAAQ,GACpC,KAAK,WAAW,aAAa,KAAK,UAAU,IAAI;AAAA,EAClD;AAAA,EASO,oBAA0B;AAC/B,UAAM,kBAAA,GACN,KAAK,WAAW,aAAa,KAAK,SAAS,IAAI;AAAA,EACjD;AAAA,EAEQ,gBAAsB;AAC5B,SAAK,qBAAA;A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,QAAA,CAAA;AAwBAU,EAAA;AAAA,EADHC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAnGfX,EAoGP,WAAA,SAAA,CAAA;AApGOA,IAANU,EAAA;AAAA,EADNG,EAAcd,CAAoB;AAAA,GACtBC,CAAA;"}
package/fhi-display.js CHANGED
@@ -1,5 +1,5 @@
1
- import { i as n, n as p, a as g, b as f, t as y } from "./property-DGdAXcEz.js";
2
- import { o as m } from "./unsafe-html-lUureUEN.js";
1
+ import { i as n, n as p, a as g, b as f, t as y } from "./property-B2Ico5CW.js";
2
+ import { o as m } from "./unsafe-html-DfuTUjUu.js";
3
3
  var v = Object.defineProperty, d = Object.getOwnPropertyDescriptor, r = (e, t, s, a) => {
4
4
  for (var i = a > 1 ? void 0 : a ? d(t, s) : t, o = e.length - 1, h; o >= 0; o--)
5
5
  (h = e[o]) && (i = (a ? h(t, s, i) : h(i)) || i);
package/fhi-flex.js CHANGED
@@ -1,4 +1,4 @@
1
- import { i as g, n, a as h, b as m, t as c } from "./property-DGdAXcEz.js";
1
+ import { i as g, n, a as h, b as m, t as c } from "./property-B2Ico5CW.js";
2
2
  var u = Object.defineProperty, f = Object.getOwnPropertyDescriptor, i = (s, a, r, o) => {
3
3
  for (var e = o > 1 ? void 0 : o ? f(a, r) : a, p = s.length - 1, l; p >= 0; p--)
4
4
  (l = s[p]) && (e = (o ? l(a, r, e) : l(e)) || e);