@limetech/lime-elements 36.3.0-next.14 → 36.3.0-next.16

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 (35) hide show
  1. package/dist/cjs/{dateFormatter-d7a8d40d.js → dateFormatter-5353def7.js} +227 -141
  2. package/dist/cjs/limel-date-picker.cjs.entry.js +1 -1
  3. package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +9 -3
  4. package/dist/cjs/limel-form.cjs.entry.js +79 -1
  5. package/dist/collection/components/chip-set/chip-set.js +1 -1
  6. package/dist/collection/components/date-picker/date-picker.js +1 -1
  7. package/dist/collection/components/date-picker/dateFormatter.js +7 -3
  8. package/dist/collection/components/date-picker/flatpickr-adapter/flatpickr-adapter.js +1 -1
  9. package/dist/collection/components/date-picker/pickers/Picker.js +11 -2
  10. package/dist/collection/components/file/file.js +1 -1
  11. package/dist/collection/components/form/form.css +74 -0
  12. package/dist/collection/components/form/form.js +1 -0
  13. package/dist/collection/components/form/form.types.js +8 -0
  14. package/dist/collection/components/form/row/row.js +47 -0
  15. package/dist/collection/components/form/templates/object-field.js +5 -0
  16. package/dist/collection/components/form/templates/row-layout.js +20 -0
  17. package/dist/collection/components/snackbar/snackbar.js +1 -1
  18. package/dist/esm/{dateFormatter-784c3334.js → dateFormatter-e13137e8.js} +227 -141
  19. package/dist/esm/limel-date-picker.entry.js +1 -1
  20. package/dist/esm/limel-flatpickr-adapter.entry.js +9 -3
  21. package/dist/esm/limel-form.entry.js +79 -1
  22. package/dist/lime-elements/lime-elements.esm.js +1 -1
  23. package/dist/lime-elements/{p-d512656b.entry.js → p-7fb5f651.entry.js} +1 -1
  24. package/dist/lime-elements/{p-73df4d83.js → p-9900c44b.js} +5 -3
  25. package/dist/lime-elements/{p-c4a89055.entry.js → p-aec225e5.entry.js} +1 -1
  26. package/dist/lime-elements/{p-9ec08ebc.entry.js → p-b6a99c02.entry.js} +1 -1
  27. package/dist/types/components/date-picker/date.types.d.ts +1 -1
  28. package/dist/types/components/date-picker/dateFormatter.d.ts +3 -2
  29. package/dist/types/components/date-picker/pickers/Picker.d.ts +3 -0
  30. package/dist/types/components/form/form.d.ts +1 -0
  31. package/dist/types/components/form/form.types.d.ts +16 -1
  32. package/dist/types/components/form/row/row.d.ts +16 -0
  33. package/dist/types/components/form/templates/row-layout.d.ts +11 -0
  34. package/dist/types/components/form/templates/types.d.ts +3 -0
  35. package/package.json +10 -10
@@ -217,7 +217,7 @@ export class DatePickerCalendar {
217
217
  "mutable": false,
218
218
  "complexType": {
219
219
  "original": "Languages",
220
- "resolved": "\"da\" | \"en\" | \"fi\" | \"nb\" | \"nl\" | \"no\" | \"sv\"",
220
+ "resolved": "\"da\" | \"de\" | \"en\" | \"fi\" | \"fr\" | \"nb\" | \"nl\" | \"no\" | \"sv\"",
221
221
  "references": {
222
222
  "Languages": {
223
223
  "location": "import",
@@ -1,8 +1,11 @@
1
1
  import flatpickr from 'flatpickr';
2
2
  import FlatpickrLanguages from 'flatpickr/dist/l10n';
3
3
  import 'moment/locale/da';
4
+ import 'moment/locale/de';
4
5
  import 'moment/locale/fi';
6
+ import 'moment/locale/fr';
5
7
  import 'moment/locale/nb';
8
+ import 'moment/locale/nl';
6
9
  import 'moment/locale/sv';
7
10
  import moment from 'moment/moment';
8
11
  import { isAndroidDevice, isIOSDevice } from '../../../util/device';
@@ -69,10 +72,16 @@ export class Picker {
69
72
  });
70
73
  }
71
74
  getFlatpickrLang() {
72
- return this.language === 'nb' ? 'no' : this.language;
75
+ if (this.language === 'nb') {
76
+ return 'no';
77
+ }
78
+ return this.language;
73
79
  }
74
80
  getMomentLang() {
75
- return this.language === 'no' ? 'nb' : this.language;
81
+ if (this.language === 'no') {
82
+ return 'nb';
83
+ }
84
+ return this.language;
76
85
  }
77
86
  getPickerDate(selectedDates) {
78
87
  return selectedDates[0] ? new Date(selectedDates[0].toJSON()) : null;
@@ -303,7 +303,7 @@ export class File {
303
303
  "mutable": false,
304
304
  "complexType": {
305
305
  "original": "Languages",
306
- "resolved": "\"da\" | \"en\" | \"fi\" | \"nb\" | \"nl\" | \"no\" | \"sv\"",
306
+ "resolved": "\"da\" | \"de\" | \"en\" | \"fi\" | \"fr\" | \"nb\" | \"nl\" | \"no\" | \"sv\"",
307
307
  "references": {
308
308
  "Languages": {
309
309
  "location": "import",
@@ -66,6 +66,8 @@
66
66
 
67
67
  /**
68
68
  * @prop --form-body-padding: space around content of the form
69
+ * @prop --form-background-color-of-even-rows: Background of even rows in the form, when layout type is `row`. Defaults to `transparent`.
70
+ * @prop --form-background-color-of-odd-rows:Background of odd rows in the form, when layout type is `row`. Defaults to `--contrast-200`.
69
71
  */
70
72
  .mdc-typography {
71
73
  -moz-osx-font-smoothing: grayscale;
@@ -600,4 +602,76 @@
600
602
  }
601
603
  .form-group .form-group .form-group .form-group .mdc-typography--headline1:before {
602
604
  display: none;
605
+ }
606
+
607
+ /*
608
+ * This file is imported into every component!
609
+ *
610
+ * Nothing in this file may output any CSS
611
+ * without being explicitly called by outside code.
612
+ */
613
+ .limel-form-row--layout {
614
+ --limel-form-row-border-radius: 0.375rem;
615
+ --limel-form-row-icon-size: 1.75rem;
616
+ --limel-form-row-main-information-gap: 0.5rem;
617
+ display: flex;
618
+ flex-direction: column;
619
+ }
620
+ .limel-form-row--layout .row {
621
+ display: flex;
622
+ gap: 0.5rem;
623
+ flex-direction: column;
624
+ padding: 0.5rem 1rem;
625
+ }
626
+ .limel-form-row--layout .row:nth-child(odd) {
627
+ background-color: var(--form-background-color-of-odd-rows, rgb(var(--contrast-200)));
628
+ }
629
+ .limel-form-row--layout .row:nth-child(even) {
630
+ background-color: var(--form-background-color-of-even-rows, transparent);
631
+ }
632
+ .limel-form-row--layout .row:first-child {
633
+ border-radius: var(--limel-form-row-border-radius) var(--limel-form-row-border-radius) 0 0;
634
+ }
635
+ .limel-form-row--layout .row:last-child {
636
+ border-radius: 0 0 var(--limel-form-row-border-radius) var(--limel-form-row-border-radius);
637
+ }
638
+ .limel-form-row--layout .main-information {
639
+ display: flex;
640
+ flex-direction: row;
641
+ align-items: center;
642
+ gap: var(--limel-form-row-main-information-gap);
643
+ min-width: 0;
644
+ }
645
+ .limel-form-row--layout limel-icon {
646
+ width: var(--limel-form-row-icon-size);
647
+ flex-shrink: 0;
648
+ min-width: 0;
649
+ }
650
+ .limel-form-row--layout .title {
651
+ overflow: hidden;
652
+ white-space: nowrap;
653
+ text-overflow: ellipsis;
654
+ margin: 0;
655
+ font-weight: normal;
656
+ flex-grow: 1;
657
+ color: var(--mdc-theme-on-surface);
658
+ font-size: var(--mdc-typography-subtitle1-font-size, 0.875rem);
659
+ }
660
+ .limel-form-row--layout .description {
661
+ margin: 0;
662
+ color: var(--mdc-theme-text-secondary-on-background);
663
+ font-size: var(--mdc-typography-body2-font-size, 0.8125rem);
664
+ line-height: 1.5;
665
+ }
666
+ .limel-form-row--layout .has-icon .description {
667
+ padding-left: calc(var(--limel-form-row-icon-size) + var(--limel-form-row-main-information-gap));
668
+ }
669
+ .limel-form-row--layout .form-group.field {
670
+ flex-shrink: 0;
671
+ display: flex;
672
+ align-content: center;
673
+ }
674
+ .limel-form-row--layout .form-group.field limel-slider {
675
+ min-width: 8rem;
676
+ display: block;
603
677
  }
@@ -23,6 +23,7 @@ import { mapValues } from 'lodash-es';
23
23
  * @exampleComponent limel-example-form-span-fields
24
24
  * @exampleComponent limel-example-custom-error-message
25
25
  * @exampleComponent limel-example-server-errors
26
+ * @exampleComponent limel-example-form-row-layout
26
27
  */
27
28
  export class Form {
28
29
  constructor() {
@@ -8,4 +8,12 @@ export var FormLayoutType;
8
8
  * Render the form fields using a responsive grid layout
9
9
  */
10
10
  FormLayoutType["Grid"] = "grid";
11
+ /**
12
+ * Render the form fields in full-width rows.
13
+ * Each row can have a leading `icon`, and a field.
14
+ * `title` and `description` provided by the schema will be placed
15
+ * on the row itself, and not on the field.
16
+ * This layout is good for creating UIs for user settings pages.
17
+ */
18
+ FormLayoutType["Row"] = "row";
11
19
  })(FormLayoutType || (FormLayoutType = {}));
@@ -0,0 +1,47 @@
1
+ import React from 'react';
2
+ export class Row extends React.Component {
3
+ constructor(props) {
4
+ super(props);
5
+ this.props = props;
6
+ }
7
+ render() {
8
+ const classes = ['row'];
9
+ if (this.icon) {
10
+ classes.push('has-icon');
11
+ }
12
+ return React.createElement('div', {
13
+ className: classes.join(' '),
14
+ }, this.renderMainInformation(), this.renderDescription());
15
+ }
16
+ renderIcon() {
17
+ if (this.icon) {
18
+ return React.createElement('limel-icon', {
19
+ name: this.icon,
20
+ });
21
+ }
22
+ }
23
+ renderMainInformation() {
24
+ return React.createElement('div', { className: 'main-information' }, this.renderIcon(), this.renderTitle(), this.renderChildren());
25
+ }
26
+ renderTitle() {
27
+ var _a;
28
+ return React.createElement('h1', { className: 'title' }, (_a = this.schema) === null || _a === void 0 ? void 0 : _a.title);
29
+ }
30
+ renderDescription() {
31
+ var _a;
32
+ if ((_a = this.schema) === null || _a === void 0 ? void 0 : _a.description) {
33
+ return React.createElement('p', { className: 'description' }, this.schema.description);
34
+ }
35
+ }
36
+ renderChildren() {
37
+ const children = this.props.children;
38
+ return Object.assign(Object.assign({}, children), { props: Object.assign(Object.assign({}, children.props), { schema: Object.assign(Object.assign({}, children.props.schema), { title: null, description: null }) }) });
39
+ }
40
+ get schema() {
41
+ return this.props.children.props.schema;
42
+ }
43
+ get icon() {
44
+ var _a, _b, _c;
45
+ return (_c = (_b = (_a = this.schema) === null || _a === void 0 ? void 0 : _a.lime) === null || _b === void 0 ? void 0 : _b.layout) === null || _c === void 0 ? void 0 : _c.icon;
46
+ }
47
+ }
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { FormLayoutType } from '../form.types';
3
3
  import { renderDescription, renderTitle } from './common';
4
4
  import { GridLayout } from './grid-layout';
5
+ import { RowLayout } from './row-layout';
5
6
  export const ObjectFieldTemplate = (props) => {
6
7
  const id = props.idSchema.$id;
7
8
  if (id === 'root' || !isCollapsible(props.schema)) {
@@ -41,6 +42,7 @@ function renderLayout(properties, layout) {
41
42
  const layouts = {
42
43
  default: renderDefaultLayout,
43
44
  grid: renderGridLayout,
45
+ row: renderRowLayout,
44
46
  };
45
47
  return layouts[type](properties, layout);
46
48
  }
@@ -54,6 +56,9 @@ function renderGridLayout(properties, layout) {
54
56
  options: layout,
55
57
  }, properties.map((element) => element.content));
56
58
  }
59
+ function renderRowLayout(properties) {
60
+ return React.createElement(RowLayout, {}, properties.map((element) => element.content));
61
+ }
57
62
  function isCollapsible(schema) {
58
63
  var _a;
59
64
  return !!((_a = schema.lime) === null || _a === void 0 ? void 0 : _a.collapsible);
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { Row } from '../row/row';
3
+ export class RowLayout extends React.Component {
4
+ constructor(props) {
5
+ super(props);
6
+ this.props = props;
7
+ this.elementRef = React.createRef();
8
+ }
9
+ render() {
10
+ const classes = ['limel-form-row--layout'];
11
+ return React.createElement('div', {
12
+ className: classes.join(' '),
13
+ ref: this.elementRef,
14
+ }, this.props.children.map((child, index) => {
15
+ return React.createElement(Row, {
16
+ key: index.toString(),
17
+ }, child);
18
+ }));
19
+ }
20
+ }
@@ -179,7 +179,7 @@ export class Snackbar {
179
179
  "mutable": false,
180
180
  "complexType": {
181
181
  "original": "Languages",
182
- "resolved": "\"da\" | \"en\" | \"fi\" | \"nb\" | \"nl\" | \"no\" | \"sv\"",
182
+ "resolved": "\"da\" | \"de\" | \"en\" | \"fi\" | \"fr\" | \"nb\" | \"nl\" | \"no\" | \"sv\"",
183
183
  "references": {
184
184
  "Languages": {
185
185
  "location": "import",
@@ -61,6 +61,89 @@ createCommonjsModule(function (module, exports) {
61
61
  })));
62
62
  });
63
63
 
64
+ createCommonjsModule(function (module, exports) {
65
+ (function (global, factory) {
66
+ typeof commonjsRequire === 'function' ? factory(moment) :
67
+ factory(global.moment);
68
+ }(commonjsGlobal, (function (moment) {
69
+ //! moment.js locale configuration
70
+
71
+ function processRelativeTime(number, withoutSuffix, key, isFuture) {
72
+ var format = {
73
+ m: ['eine Minute', 'einer Minute'],
74
+ h: ['eine Stunde', 'einer Stunde'],
75
+ d: ['ein Tag', 'einem Tag'],
76
+ dd: [number + ' Tage', number + ' Tagen'],
77
+ w: ['eine Woche', 'einer Woche'],
78
+ M: ['ein Monat', 'einem Monat'],
79
+ MM: [number + ' Monate', number + ' Monaten'],
80
+ y: ['ein Jahr', 'einem Jahr'],
81
+ yy: [number + ' Jahre', number + ' Jahren'],
82
+ };
83
+ return withoutSuffix ? format[key][0] : format[key][1];
84
+ }
85
+
86
+ var de = moment.defineLocale('de', {
87
+ months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
88
+ '_'
89
+ ),
90
+ monthsShort:
91
+ 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
92
+ monthsParseExact: true,
93
+ weekdays:
94
+ 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
95
+ '_'
96
+ ),
97
+ weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
98
+ weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
99
+ weekdaysParseExact: true,
100
+ longDateFormat: {
101
+ LT: 'HH:mm',
102
+ LTS: 'HH:mm:ss',
103
+ L: 'DD.MM.YYYY',
104
+ LL: 'D. MMMM YYYY',
105
+ LLL: 'D. MMMM YYYY HH:mm',
106
+ LLLL: 'dddd, D. MMMM YYYY HH:mm',
107
+ },
108
+ calendar: {
109
+ sameDay: '[heute um] LT [Uhr]',
110
+ sameElse: 'L',
111
+ nextDay: '[morgen um] LT [Uhr]',
112
+ nextWeek: 'dddd [um] LT [Uhr]',
113
+ lastDay: '[gestern um] LT [Uhr]',
114
+ lastWeek: '[letzten] dddd [um] LT [Uhr]',
115
+ },
116
+ relativeTime: {
117
+ future: 'in %s',
118
+ past: 'vor %s',
119
+ s: 'ein paar Sekunden',
120
+ ss: '%d Sekunden',
121
+ m: processRelativeTime,
122
+ mm: '%d Minuten',
123
+ h: processRelativeTime,
124
+ hh: '%d Stunden',
125
+ d: processRelativeTime,
126
+ dd: processRelativeTime,
127
+ w: processRelativeTime,
128
+ ww: '%d Wochen',
129
+ M: processRelativeTime,
130
+ MM: processRelativeTime,
131
+ y: processRelativeTime,
132
+ yy: processRelativeTime,
133
+ },
134
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
135
+ ordinal: '%d.',
136
+ week: {
137
+ dow: 1, // Monday is the first day of the week.
138
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
139
+ },
140
+ });
141
+
142
+ return de;
143
+
144
+ })));
145
+ });
146
+
64
147
  createCommonjsModule(function (module, exports) {
65
148
  (function (global, factory) {
66
149
  typeof commonjsRequire === 'function' ? factory(moment) :
@@ -192,146 +275,6 @@ createCommonjsModule(function (module, exports) {
192
275
  })));
193
276
  });
194
277
 
195
- createCommonjsModule(function (module, exports) {
196
- (function (global, factory) {
197
- typeof commonjsRequire === 'function' ? factory(moment) :
198
- factory(global.moment);
199
- }(commonjsGlobal, (function (moment) {
200
- //! moment.js locale configuration
201
-
202
- var nb = moment.defineLocale('nb', {
203
- months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
204
- '_'
205
- ),
206
- monthsShort:
207
- 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
208
- monthsParseExact: true,
209
- weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
210
- weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),
211
- weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
212
- weekdaysParseExact: true,
213
- longDateFormat: {
214
- LT: 'HH:mm',
215
- LTS: 'HH:mm:ss',
216
- L: 'DD.MM.YYYY',
217
- LL: 'D. MMMM YYYY',
218
- LLL: 'D. MMMM YYYY [kl.] HH:mm',
219
- LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',
220
- },
221
- calendar: {
222
- sameDay: '[i dag kl.] LT',
223
- nextDay: '[i morgen kl.] LT',
224
- nextWeek: 'dddd [kl.] LT',
225
- lastDay: '[i går kl.] LT',
226
- lastWeek: '[forrige] dddd [kl.] LT',
227
- sameElse: 'L',
228
- },
229
- relativeTime: {
230
- future: 'om %s',
231
- past: '%s siden',
232
- s: 'noen sekunder',
233
- ss: '%d sekunder',
234
- m: 'ett minutt',
235
- mm: '%d minutter',
236
- h: 'en time',
237
- hh: '%d timer',
238
- d: 'en dag',
239
- dd: '%d dager',
240
- w: 'en uke',
241
- ww: '%d uker',
242
- M: 'en måned',
243
- MM: '%d måneder',
244
- y: 'ett år',
245
- yy: '%d år',
246
- },
247
- dayOfMonthOrdinalParse: /\d{1,2}\./,
248
- ordinal: '%d.',
249
- week: {
250
- dow: 1, // Monday is the first day of the week.
251
- doy: 4, // The week that contains Jan 4th is the first week of the year.
252
- },
253
- });
254
-
255
- return nb;
256
-
257
- })));
258
- });
259
-
260
- createCommonjsModule(function (module, exports) {
261
- (function (global, factory) {
262
- typeof commonjsRequire === 'function' ? factory(moment) :
263
- factory(global.moment);
264
- }(commonjsGlobal, (function (moment) {
265
- //! moment.js locale configuration
266
-
267
- var sv = moment.defineLocale('sv', {
268
- months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split(
269
- '_'
270
- ),
271
- monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
272
- weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
273
- weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
274
- weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),
275
- longDateFormat: {
276
- LT: 'HH:mm',
277
- LTS: 'HH:mm:ss',
278
- L: 'YYYY-MM-DD',
279
- LL: 'D MMMM YYYY',
280
- LLL: 'D MMMM YYYY [kl.] HH:mm',
281
- LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',
282
- lll: 'D MMM YYYY HH:mm',
283
- llll: 'ddd D MMM YYYY HH:mm',
284
- },
285
- calendar: {
286
- sameDay: '[Idag] LT',
287
- nextDay: '[Imorgon] LT',
288
- lastDay: '[Igår] LT',
289
- nextWeek: '[På] dddd LT',
290
- lastWeek: '[I] dddd[s] LT',
291
- sameElse: 'L',
292
- },
293
- relativeTime: {
294
- future: 'om %s',
295
- past: 'för %s sedan',
296
- s: 'några sekunder',
297
- ss: '%d sekunder',
298
- m: 'en minut',
299
- mm: '%d minuter',
300
- h: 'en timme',
301
- hh: '%d timmar',
302
- d: 'en dag',
303
- dd: '%d dagar',
304
- M: 'en månad',
305
- MM: '%d månader',
306
- y: 'ett år',
307
- yy: '%d år',
308
- },
309
- dayOfMonthOrdinalParse: /\d{1,2}(\:e|\:a)/,
310
- ordinal: function (number) {
311
- var b = number % 10,
312
- output =
313
- ~~((number % 100) / 10) === 1
314
- ? ':e'
315
- : b === 1
316
- ? ':a'
317
- : b === 2
318
- ? ':a'
319
- : b === 3
320
- ? ':e'
321
- : ':e';
322
- return number + output;
323
- },
324
- week: {
325
- dow: 1, // Monday is the first day of the week.
326
- doy: 4, // The week that contains Jan 4th is the first week of the year.
327
- },
328
- });
329
-
330
- return sv;
331
-
332
- })));
333
- });
334
-
335
278
  createCommonjsModule(function (module, exports) {
336
279
  (function (global, factory) {
337
280
  typeof commonjsRequire === 'function' ? factory(moment) :
@@ -447,6 +390,71 @@ createCommonjsModule(function (module, exports) {
447
390
  })));
448
391
  });
449
392
 
393
+ createCommonjsModule(function (module, exports) {
394
+ (function (global, factory) {
395
+ typeof commonjsRequire === 'function' ? factory(moment) :
396
+ factory(global.moment);
397
+ }(commonjsGlobal, (function (moment) {
398
+ //! moment.js locale configuration
399
+
400
+ var nb = moment.defineLocale('nb', {
401
+ months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
402
+ '_'
403
+ ),
404
+ monthsShort:
405
+ 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
406
+ monthsParseExact: true,
407
+ weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
408
+ weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),
409
+ weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
410
+ weekdaysParseExact: true,
411
+ longDateFormat: {
412
+ LT: 'HH:mm',
413
+ LTS: 'HH:mm:ss',
414
+ L: 'DD.MM.YYYY',
415
+ LL: 'D. MMMM YYYY',
416
+ LLL: 'D. MMMM YYYY [kl.] HH:mm',
417
+ LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',
418
+ },
419
+ calendar: {
420
+ sameDay: '[i dag kl.] LT',
421
+ nextDay: '[i morgen kl.] LT',
422
+ nextWeek: 'dddd [kl.] LT',
423
+ lastDay: '[i går kl.] LT',
424
+ lastWeek: '[forrige] dddd [kl.] LT',
425
+ sameElse: 'L',
426
+ },
427
+ relativeTime: {
428
+ future: 'om %s',
429
+ past: '%s siden',
430
+ s: 'noen sekunder',
431
+ ss: '%d sekunder',
432
+ m: 'ett minutt',
433
+ mm: '%d minutter',
434
+ h: 'en time',
435
+ hh: '%d timer',
436
+ d: 'en dag',
437
+ dd: '%d dager',
438
+ w: 'en uke',
439
+ ww: '%d uker',
440
+ M: 'en måned',
441
+ MM: '%d måneder',
442
+ y: 'ett år',
443
+ yy: '%d år',
444
+ },
445
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
446
+ ordinal: '%d.',
447
+ week: {
448
+ dow: 1, // Monday is the first day of the week.
449
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
450
+ },
451
+ });
452
+
453
+ return nb;
454
+
455
+ })));
456
+ });
457
+
450
458
  createCommonjsModule(function (module, exports) {
451
459
  (function (global, factory) {
452
460
  typeof commonjsRequire === 'function' ? factory(moment) :
@@ -557,6 +565,81 @@ createCommonjsModule(function (module, exports) {
557
565
  })));
558
566
  });
559
567
 
568
+ createCommonjsModule(function (module, exports) {
569
+ (function (global, factory) {
570
+ typeof commonjsRequire === 'function' ? factory(moment) :
571
+ factory(global.moment);
572
+ }(commonjsGlobal, (function (moment) {
573
+ //! moment.js locale configuration
574
+
575
+ var sv = moment.defineLocale('sv', {
576
+ months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split(
577
+ '_'
578
+ ),
579
+ monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
580
+ weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
581
+ weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
582
+ weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),
583
+ longDateFormat: {
584
+ LT: 'HH:mm',
585
+ LTS: 'HH:mm:ss',
586
+ L: 'YYYY-MM-DD',
587
+ LL: 'D MMMM YYYY',
588
+ LLL: 'D MMMM YYYY [kl.] HH:mm',
589
+ LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',
590
+ lll: 'D MMM YYYY HH:mm',
591
+ llll: 'ddd D MMM YYYY HH:mm',
592
+ },
593
+ calendar: {
594
+ sameDay: '[Idag] LT',
595
+ nextDay: '[Imorgon] LT',
596
+ lastDay: '[Igår] LT',
597
+ nextWeek: '[På] dddd LT',
598
+ lastWeek: '[I] dddd[s] LT',
599
+ sameElse: 'L',
600
+ },
601
+ relativeTime: {
602
+ future: 'om %s',
603
+ past: 'för %s sedan',
604
+ s: 'några sekunder',
605
+ ss: '%d sekunder',
606
+ m: 'en minut',
607
+ mm: '%d minuter',
608
+ h: 'en timme',
609
+ hh: '%d timmar',
610
+ d: 'en dag',
611
+ dd: '%d dagar',
612
+ M: 'en månad',
613
+ MM: '%d månader',
614
+ y: 'ett år',
615
+ yy: '%d år',
616
+ },
617
+ dayOfMonthOrdinalParse: /\d{1,2}(\:e|\:a)/,
618
+ ordinal: function (number) {
619
+ var b = number % 10,
620
+ output =
621
+ ~~((number % 100) / 10) === 1
622
+ ? ':e'
623
+ : b === 1
624
+ ? ':a'
625
+ : b === 2
626
+ ? ':a'
627
+ : b === 3
628
+ ? ':e'
629
+ : ':e';
630
+ return number + output;
631
+ },
632
+ week: {
633
+ dow: 1, // Monday is the first day of the week.
634
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
635
+ },
636
+ });
637
+
638
+ return sv;
639
+
640
+ })));
641
+ });
642
+
560
643
  class DateFormatter {
561
644
  constructor(language = 'en') {
562
645
  this.language = language;
@@ -574,7 +657,10 @@ class DateFormatter {
574
657
  return null;
575
658
  }
576
659
  getLanguage() {
577
- return this.language === 'no' ? 'nb' : this.language;
660
+ if (this.language === 'no') {
661
+ return 'nb';
662
+ }
663
+ return this.language;
578
664
  }
579
665
  getDateFormat(type) {
580
666
  return ({
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-cdfd351d.js';
2
2
  import { c as createRandomString } from './random-string-2246b81e.js';
3
3
  import { i as isIOSDevice, a as isAndroidDevice } from './device-39db3b5f.js';
4
- import { D as DateFormatter } from './dateFormatter-784c3334.js';
4
+ import { D as DateFormatter } from './dateFormatter-e13137e8.js';
5
5
  import { M as MDCTextField } from './component-288691f3.js';
6
6
  import './_commonjsHelpers-5ec8f9b7.js';
7
7
  import './moment-faa8a4a8.js';