@designsystem-se/af 39.2.2 → 39.2.3

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 (196) hide show
  1. package/components/digi-expandable-accordion.js +18 -11
  2. package/components/digi-expandable-faq-item.js +21 -14
  3. package/components/digi-info-card.js +3 -3
  4. package/custom-elements.json +1 -1
  5. package/dist/cjs/badge-notification-shape.enum-CEyEo2G5.js +8 -0
  6. package/dist/cjs/button-size.enum-DgyvMkwE.js +7 -0
  7. package/dist/cjs/{button-variation.enum-ngMqFLdW.js → button-variation.enum-DkUalo9f.js} +0 -6
  8. package/dist/cjs/{calendar-week-view-heading-level.enum-BI2f9bbk.js → calendar-week-view-heading-level.enum-NEkm5SUq.js} +0 -7
  9. package/dist/cjs/digi-arbetsformedlingen.cjs.js +1 -1
  10. package/dist/cjs/digi-badge-notification.cjs.entry.js +65 -0
  11. package/dist/cjs/digi-button.cjs.entry.js +131 -0
  12. package/dist/cjs/{digi-badge-notification_8.cjs.entry.js → digi-calendar-week-view.cjs.entry.js} +72 -645
  13. package/dist/cjs/{digi-calendar-datepicker.cjs.entry.js → digi-calendar_19.cjs.entry.js} +1613 -56
  14. package/dist/cjs/digi-code-block_3.cjs.entry.js +8 -13
  15. package/dist/cjs/digi-code-example.cjs.entry.js +4 -3
  16. package/dist/cjs/digi-dialog.cjs.entry.js +8 -13
  17. package/dist/cjs/digi-footer.cjs.entry.js +7 -12
  18. package/dist/cjs/digi-form-error-list.cjs.entry.js +7 -12
  19. package/dist/cjs/digi-form-file-upload.cjs.entry.js +9 -10
  20. package/dist/cjs/digi-form-input-search.cjs.entry.js +5 -6
  21. package/dist/cjs/digi-form-receipt.cjs.entry.js +7 -12
  22. package/dist/cjs/digi-form-select-filter.cjs.entry.js +8 -13
  23. package/dist/cjs/digi-header-navigation.cjs.entry.js +7 -12
  24. package/dist/cjs/digi-header.cjs.entry.js +7 -12
  25. package/dist/cjs/digi-info-card.cjs.entry.js +3 -3
  26. package/dist/cjs/digi-navigation-pagination.cjs.entry.js +7 -12
  27. package/dist/cjs/digi-notification-alert.cjs.entry.js +7 -12
  28. package/dist/cjs/digi-notification-error-page.cjs.entry.js +7 -12
  29. package/dist/cjs/digi-tablist-panel.cjs.entry.js +20 -0
  30. package/dist/cjs/digi-tablist.cjs.entry.js +312 -0
  31. package/dist/cjs/digi-title-logo.cjs.entry.js +7 -12
  32. package/dist/cjs/digi-tools-feedback.cjs.entry.js +9 -14
  33. package/dist/cjs/{form-input-type.enum-DvF_MTHK.js → form-input-type.enum-CCCcY8gv.js} +7 -0
  34. package/dist/cjs/{form-file-upload-variation.enum-xcEOoggr.js → form-validation-message-variation.enum-DgkifAnP.js} +7 -0
  35. package/dist/cjs/index-Cn1hHaSy.js +16 -40
  36. package/dist/cjs/{index-Bdlw-Iuy.js → index-DUQtADgG.js} +189 -19
  37. package/dist/cjs/index.cjs.js +64 -69
  38. package/dist/cjs/loader.cjs.js +1 -1
  39. package/dist/cjs/{typography-variation.enum-BDSt7CVI.js → typography-variation.enum-CVUvogxJ.js} +86 -0
  40. package/dist/collection/components/_expandable/expandable-accordion/expandable-accordion.js +18 -11
  41. package/dist/collection/components/_expandable/expandable-faq-item/expandable-faq-item.js +21 -14
  42. package/dist/collection/components/_info-card/info-card/info-card.js +5 -5
  43. package/dist/collection/design-tokens/components/_logo.variables.scss +0 -2
  44. package/dist/digi-arbetsformedlingen/digi-arbetsformedlingen.esm.js +1 -1
  45. package/dist/digi-arbetsformedlingen/index.esm.js +1 -1
  46. package/dist/digi-arbetsformedlingen/p-0230ec9b.entry.js +1 -0
  47. package/dist/digi-arbetsformedlingen/p-0394e694.entry.js +1 -0
  48. package/dist/digi-arbetsformedlingen/p-04bbbd14.entry.js +1 -0
  49. package/dist/digi-arbetsformedlingen/p-0cf25433.entry.js +1 -0
  50. package/dist/digi-arbetsformedlingen/p-17824a0b.entry.js +1 -0
  51. package/dist/digi-arbetsformedlingen/p-25815f15.entry.js +1 -0
  52. package/dist/digi-arbetsformedlingen/p-3d4ac22e.entry.js +1 -0
  53. package/dist/digi-arbetsformedlingen/p-4aefce1e.entry.js +1 -0
  54. package/dist/digi-arbetsformedlingen/p-5ee5766d.entry.js +1 -0
  55. package/dist/digi-arbetsformedlingen/p-870a00f8.entry.js +1 -0
  56. package/dist/digi-arbetsformedlingen/p-88dc2ed4.entry.js +1 -0
  57. package/dist/digi-arbetsformedlingen/p-9n7Okhf1.js +1 -0
  58. package/dist/digi-arbetsformedlingen/p-C6S1HfeA.js +1 -0
  59. package/dist/digi-arbetsformedlingen/p-C7xgnp99.js +1 -0
  60. package/dist/digi-arbetsformedlingen/p-CKoZU0-H.js +1 -0
  61. package/dist/digi-arbetsformedlingen/p-Cnyfh_8_.js +1 -0
  62. package/dist/digi-arbetsformedlingen/{p-DwNlf6Sh.js → p-DH_-wpLB.js} +1 -1
  63. package/dist/digi-arbetsformedlingen/p-Zivp2NJB.js +1 -0
  64. package/dist/digi-arbetsformedlingen/p-a29b6fff.entry.js +1 -0
  65. package/dist/digi-arbetsformedlingen/{p-375ea6f8.entry.js → p-ace2e5fd.entry.js} +1 -1
  66. package/dist/digi-arbetsformedlingen/p-b411a549.entry.js +1 -0
  67. package/dist/digi-arbetsformedlingen/p-b7712996.entry.js +1 -0
  68. package/dist/digi-arbetsformedlingen/p-bfccf413.entry.js +1 -0
  69. package/dist/digi-arbetsformedlingen/p-cdd65abb.entry.js +1 -0
  70. package/dist/digi-arbetsformedlingen/p-d4406627.entry.js +1 -0
  71. package/dist/digi-arbetsformedlingen/p-dd95c75e.entry.js +1 -0
  72. package/dist/digi-arbetsformedlingen/p-e5396b1e.entry.js +1 -0
  73. package/dist/digi-arbetsformedlingen/p-e7c10f6a.entry.js +1 -0
  74. package/dist/digi-arbetsformedlingen/p-f91295ac.entry.js +1 -0
  75. package/dist/digi-arbetsformedlingen/p-ffb4fac6.entry.js +1 -0
  76. package/dist/digi-arbetsformedlingen/p-y5Nm4oWF.js +1 -0
  77. package/dist/esm/badge-notification-shape.enum-CKoZU0-H.js +8 -0
  78. package/dist/esm/button-size.enum-C7xgnp99.js +7 -0
  79. package/dist/esm/{button-variation.enum-BMQm4N5I.js → button-variation.enum-y5Nm4oWF.js} +1 -7
  80. package/dist/esm/{calendar-week-view-heading-level.enum-BBOpiDGx.js → calendar-week-view-heading-level.enum-DH_-wpLB.js} +1 -8
  81. package/dist/esm/digi-arbetsformedlingen.js +1 -1
  82. package/dist/esm/digi-badge-notification.entry.js +63 -0
  83. package/dist/esm/digi-button.entry.js +129 -0
  84. package/dist/esm/{digi-badge-notification_8.entry.js → digi-calendar-week-view.entry.js} +6 -572
  85. package/dist/esm/{digi-calendar-datepicker.entry.js → digi-calendar_19.entry.js} +1557 -18
  86. package/dist/esm/digi-code-block_3.entry.js +7 -12
  87. package/dist/esm/digi-code-example.entry.js +2 -1
  88. package/dist/esm/digi-dialog.entry.js +7 -12
  89. package/dist/esm/digi-footer.entry.js +7 -12
  90. package/dist/esm/digi-form-error-list.entry.js +7 -12
  91. package/dist/esm/digi-form-file-upload.entry.js +1 -2
  92. package/dist/esm/digi-form-input-search.entry.js +1 -2
  93. package/dist/esm/digi-form-receipt.entry.js +7 -12
  94. package/dist/esm/digi-form-select-filter.entry.js +7 -12
  95. package/dist/esm/digi-header-navigation.entry.js +7 -12
  96. package/dist/esm/digi-header.entry.js +7 -12
  97. package/dist/esm/digi-info-card.entry.js +3 -3
  98. package/dist/esm/digi-navigation-pagination.entry.js +7 -12
  99. package/dist/esm/digi-notification-alert.entry.js +7 -12
  100. package/dist/esm/digi-notification-error-page.entry.js +7 -12
  101. package/dist/esm/digi-tablist-panel.entry.js +18 -0
  102. package/dist/esm/digi-tablist.entry.js +310 -0
  103. package/dist/esm/digi-title-logo.entry.js +7 -12
  104. package/dist/esm/digi-tools-feedback.entry.js +7 -12
  105. package/dist/esm/{form-input-type.enum-BSJH8Lpg.js → form-input-type.enum-C6S1HfeA.js} +8 -1
  106. package/dist/esm/{form-file-upload-variation.enum-BfyJgcLA.js → form-validation-message-variation.enum-9n7Okhf1.js} +8 -1
  107. package/dist/esm/index-BnKuq1L7.js +16 -40
  108. package/dist/esm/{index-B1Je6g2n.js → index-Cnyfh_8_.js} +170 -3
  109. package/dist/esm/index.js +7 -12
  110. package/dist/esm/loader.js +1 -1
  111. package/dist/esm/{typography-variation.enum-4smNltRI.js → typography-variation.enum-Zivp2NJB.js} +87 -1
  112. package/dist/types/components/_info-card/info-card/info-card.d.ts +2 -2
  113. package/dist/types/components.d.ts +4 -4
  114. package/hydrate/index.js +42 -28
  115. package/hydrate/index.mjs +42 -28
  116. package/package.json +1 -1
  117. package/dist/cjs/digi-calendar_2.cjs.entry.js +0 -490
  118. package/dist/cjs/digi-expandable-accordion.cjs.entry.js +0 -121
  119. package/dist/cjs/digi-expandable-faq-item.cjs.entry.js +0 -119
  120. package/dist/cjs/digi-form-input.cjs.entry.js +0 -205
  121. package/dist/cjs/digi-form-label_3.cjs.entry.js +0 -147
  122. package/dist/cjs/digi-form-select_2.cjs.entry.js +0 -201
  123. package/dist/cjs/digi-icon-chevron-down.cjs.entry.js +0 -28
  124. package/dist/cjs/digi-icon-validation-error_2.cjs.entry.js +0 -51
  125. package/dist/cjs/digi-typography-heading-jumbo.cjs.entry.js +0 -46
  126. package/dist/cjs/digi-util-keydown-handler.cjs.entry.js +0 -81
  127. package/dist/cjs/expandable-accordion-header-level.enum-CjL9V3Kt.js +0 -11
  128. package/dist/cjs/expandable-faq-item-variation.enum-aKkYAQgd.js +0 -18
  129. package/dist/cjs/form-input-search-variation.enum-VVfvlVeM.js +0 -8
  130. package/dist/cjs/form-input-variation.enum-kpoXNUuI.js +0 -29
  131. package/dist/cjs/form-select-variation.enum-e6wjWyaS.js +0 -16
  132. package/dist/cjs/form-validation-message-variation.enum-BA5nmCiw.js +0 -8
  133. package/dist/cjs/index-Snltmefx.js +0 -174
  134. package/dist/cjs/index-r0sb9TCr.js +0 -66
  135. package/dist/cjs/typography-heading-jumbo-variation.enum-Di1Jeh0G.js +0 -17
  136. package/dist/digi-arbetsformedlingen/p-037a35bd.entry.js +0 -1
  137. package/dist/digi-arbetsformedlingen/p-0f7e995a.entry.js +0 -1
  138. package/dist/digi-arbetsformedlingen/p-26f6a310.entry.js +0 -1
  139. package/dist/digi-arbetsformedlingen/p-3239fb1a.entry.js +0 -1
  140. package/dist/digi-arbetsformedlingen/p-3b42582a.entry.js +0 -1
  141. package/dist/digi-arbetsformedlingen/p-3c1f9629.entry.js +0 -1
  142. package/dist/digi-arbetsformedlingen/p-4384644b.entry.js +0 -1
  143. package/dist/digi-arbetsformedlingen/p-4ddcae7b.entry.js +0 -1
  144. package/dist/digi-arbetsformedlingen/p-4smNltRI.js +0 -1
  145. package/dist/digi-arbetsformedlingen/p-569c628c.entry.js +0 -1
  146. package/dist/digi-arbetsformedlingen/p-668d38d9.entry.js +0 -1
  147. package/dist/digi-arbetsformedlingen/p-66f34ca5.entry.js +0 -1
  148. package/dist/digi-arbetsformedlingen/p-6931825c.entry.js +0 -1
  149. package/dist/digi-arbetsformedlingen/p-6cb1c6ea.entry.js +0 -1
  150. package/dist/digi-arbetsformedlingen/p-71a8478d.entry.js +0 -1
  151. package/dist/digi-arbetsformedlingen/p-7688502e.entry.js +0 -1
  152. package/dist/digi-arbetsformedlingen/p-91265ee0.entry.js +0 -1
  153. package/dist/digi-arbetsformedlingen/p-9a4eecde.entry.js +0 -1
  154. package/dist/digi-arbetsformedlingen/p-9df345c4.entry.js +0 -1
  155. package/dist/digi-arbetsformedlingen/p-B8hpiXmh.js +0 -1
  156. package/dist/digi-arbetsformedlingen/p-BBOpiDGx.js +0 -1
  157. package/dist/digi-arbetsformedlingen/p-BMQm4N5I.js +0 -1
  158. package/dist/digi-arbetsformedlingen/p-BSJH8Lpg.js +0 -1
  159. package/dist/digi-arbetsformedlingen/p-BfyJgcLA.js +0 -1
  160. package/dist/digi-arbetsformedlingen/p-BixPaBHw.js +0 -1
  161. package/dist/digi-arbetsformedlingen/p-BvWKyXb_.js +0 -1
  162. package/dist/digi-arbetsformedlingen/p-C6B2KRZo.js +0 -1
  163. package/dist/digi-arbetsformedlingen/p-CgSR-RTl.js +0 -1
  164. package/dist/digi-arbetsformedlingen/p-DCS1KcvC.js +0 -1
  165. package/dist/digi-arbetsformedlingen/p-DNjGvZvz.js +0 -1
  166. package/dist/digi-arbetsformedlingen/p-DfWZa2Wv.js +0 -1
  167. package/dist/digi-arbetsformedlingen/p-a9a1bf57.entry.js +0 -1
  168. package/dist/digi-arbetsformedlingen/p-beebbc90.entry.js +0 -1
  169. package/dist/digi-arbetsformedlingen/p-c7ade486.entry.js +0 -1
  170. package/dist/digi-arbetsformedlingen/p-d065e751.entry.js +0 -1
  171. package/dist/digi-arbetsformedlingen/p-d07a1377.entry.js +0 -1
  172. package/dist/digi-arbetsformedlingen/p-d0b3c35b.entry.js +0 -1
  173. package/dist/digi-arbetsformedlingen/p-d150094c.entry.js +0 -1
  174. package/dist/digi-arbetsformedlingen/p-df8efa59.entry.js +0 -1
  175. package/dist/digi-arbetsformedlingen/p-e2b0b070.entry.js +0 -1
  176. package/dist/digi-arbetsformedlingen/p-e7b311da.entry.js +0 -1
  177. package/dist/digi-arbetsformedlingen/p-xwICssEK.js +0 -1
  178. package/dist/esm/digi-calendar_2.entry.js +0 -487
  179. package/dist/esm/digi-expandable-accordion.entry.js +0 -119
  180. package/dist/esm/digi-expandable-faq-item.entry.js +0 -117
  181. package/dist/esm/digi-form-input.entry.js +0 -203
  182. package/dist/esm/digi-form-label_3.entry.js +0 -143
  183. package/dist/esm/digi-form-select_2.entry.js +0 -198
  184. package/dist/esm/digi-icon-chevron-down.entry.js +0 -26
  185. package/dist/esm/digi-icon-validation-error_2.entry.js +0 -48
  186. package/dist/esm/digi-typography-heading-jumbo.entry.js +0 -44
  187. package/dist/esm/digi-util-keydown-handler.entry.js +0 -79
  188. package/dist/esm/expandable-accordion-header-level.enum-DwNlf6Sh.js +0 -11
  189. package/dist/esm/expandable-faq-item-variation.enum-C6B2KRZo.js +0 -18
  190. package/dist/esm/form-input-search-variation.enum-BvWKyXb_.js +0 -8
  191. package/dist/esm/form-input-variation.enum-DfWZa2Wv.js +0 -29
  192. package/dist/esm/form-select-variation.enum-DCS1KcvC.js +0 -16
  193. package/dist/esm/form-validation-message-variation.enum-B8hpiXmh.js +0 -8
  194. package/dist/esm/index-BixPaBHw.js +0 -170
  195. package/dist/esm/index-BsIL3T_0.js +0 -63
  196. package/dist/esm/typography-heading-jumbo-variation.enum-DNjGvZvz.js +0 -17
@@ -1,5 +1,3 @@
1
- import { r as requiredArgs, t as toDate } from './index-BixPaBHw.js';
2
-
3
1
  function toInteger(dirtyNumber) {
4
2
  if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
5
3
  return NaN;
@@ -14,6 +12,64 @@ function toInteger(dirtyNumber) {
14
12
  return number < 0 ? Math.ceil(number) : Math.floor(number);
15
13
  }
16
14
 
15
+ function requiredArgs(required, args) {
16
+ if (args.length < required) {
17
+ throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');
18
+ }
19
+ }
20
+
21
+ /**
22
+ * @name toDate
23
+ * @category Common Helpers
24
+ * @summary Convert the given argument to an instance of Date.
25
+ *
26
+ * @description
27
+ * Convert the given argument to an instance of Date.
28
+ *
29
+ * If the argument is an instance of Date, the function returns its clone.
30
+ *
31
+ * If the argument is a number, it is treated as a timestamp.
32
+ *
33
+ * If the argument is none of the above, the function returns Invalid Date.
34
+ *
35
+ * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
36
+ *
37
+ * @param {Date|Number} argument - the value to convert
38
+ * @returns {Date} the parsed date in the local time zone
39
+ * @throws {TypeError} 1 argument required
40
+ *
41
+ * @example
42
+ * // Clone the date:
43
+ * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
44
+ * //=> Tue Feb 11 2014 11:30:30
45
+ *
46
+ * @example
47
+ * // Convert the timestamp to date:
48
+ * const result = toDate(1392098430000)
49
+ * //=> Tue Feb 11 2014 11:30:30
50
+ */
51
+
52
+ function toDate(argument) {
53
+ requiredArgs(1, arguments);
54
+ var argStr = Object.prototype.toString.call(argument); // Clone the date
55
+
56
+ if (argument instanceof Date || typeof argument === 'object' && argStr === '[object Date]') {
57
+ // Prevent the date to lose the milliseconds when passed to new Date() in IE10
58
+ return new Date(argument.getTime());
59
+ } else if (typeof argument === 'number' || argStr === '[object Number]') {
60
+ return new Date(argument);
61
+ } else {
62
+ if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {
63
+ // eslint-disable-next-line no-console
64
+ console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"); // eslint-disable-next-line no-console
65
+
66
+ console.warn(new Error().stack);
67
+ }
68
+
69
+ return new Date(NaN);
70
+ }
71
+ }
72
+
17
73
  /**
18
74
  * @name addMilliseconds
19
75
  * @category Millisecond Helpers
@@ -61,6 +117,117 @@ function getTimezoneOffsetInMilliseconds(date) {
61
117
  return date.getTime() - utcDate.getTime();
62
118
  }
63
119
 
120
+ /**
121
+ * @name isDate
122
+ * @category Common Helpers
123
+ * @summary Is the given value a date?
124
+ *
125
+ * @description
126
+ * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.
127
+ *
128
+ * ### v2.0.0 breaking changes:
129
+ *
130
+ * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
131
+ *
132
+ * @param {*} value - the value to check
133
+ * @returns {boolean} true if the given value is a date
134
+ * @throws {TypeError} 1 arguments required
135
+ *
136
+ * @example
137
+ * // For a valid date:
138
+ * const result = isDate(new Date())
139
+ * //=> true
140
+ *
141
+ * @example
142
+ * // For an invalid date:
143
+ * const result = isDate(new Date(NaN))
144
+ * //=> true
145
+ *
146
+ * @example
147
+ * // For some value:
148
+ * const result = isDate('2014-02-31')
149
+ * //=> false
150
+ *
151
+ * @example
152
+ * // For an object:
153
+ * const result = isDate({})
154
+ * //=> false
155
+ */
156
+
157
+ function isDate(value) {
158
+ requiredArgs(1, arguments);
159
+ return value instanceof Date || typeof value === 'object' && Object.prototype.toString.call(value) === '[object Date]';
160
+ }
161
+
162
+ /**
163
+ * @name isValid
164
+ * @category Common Helpers
165
+ * @summary Is the given date valid?
166
+ *
167
+ * @description
168
+ * Returns false if argument is Invalid Date and true otherwise.
169
+ * Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}
170
+ * Invalid Date is a Date, whose time value is NaN.
171
+ *
172
+ * Time value of Date: http://es5.github.io/#x15.9.1.1
173
+ *
174
+ * ### v2.0.0 breaking changes:
175
+ *
176
+ * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
177
+ *
178
+ * - Now `isValid` doesn't throw an exception
179
+ * if the first argument is not an instance of Date.
180
+ * Instead, argument is converted beforehand using `toDate`.
181
+ *
182
+ * Examples:
183
+ *
184
+ * | `isValid` argument | Before v2.0.0 | v2.0.0 onward |
185
+ * |---------------------------|---------------|---------------|
186
+ * | `new Date()` | `true` | `true` |
187
+ * | `new Date('2016-01-01')` | `true` | `true` |
188
+ * | `new Date('')` | `false` | `false` |
189
+ * | `new Date(1488370835081)` | `true` | `true` |
190
+ * | `new Date(NaN)` | `false` | `false` |
191
+ * | `'2016-01-01'` | `TypeError` | `false` |
192
+ * | `''` | `TypeError` | `false` |
193
+ * | `1488370835081` | `TypeError` | `true` |
194
+ * | `NaN` | `TypeError` | `false` |
195
+ *
196
+ * We introduce this change to make *date-fns* consistent with ECMAScript behavior
197
+ * that try to coerce arguments to the expected type
198
+ * (which is also the case with other *date-fns* functions).
199
+ *
200
+ * @param {*} date - the date to check
201
+ * @returns {Boolean} the date is valid
202
+ * @throws {TypeError} 1 argument required
203
+ *
204
+ * @example
205
+ * // For the valid date:
206
+ * const result = isValid(new Date(2014, 1, 31))
207
+ * //=> true
208
+ *
209
+ * @example
210
+ * // For the value, convertable into a date:
211
+ * const result = isValid(1393804800000)
212
+ * //=> true
213
+ *
214
+ * @example
215
+ * // For the invalid date:
216
+ * const result = isValid(new Date(''))
217
+ * //=> false
218
+ */
219
+
220
+ function isValid(dirtyDate) {
221
+ requiredArgs(1, arguments);
222
+
223
+ if (!isDate(dirtyDate) && typeof dirtyDate !== 'number') {
224
+ return false;
225
+ }
226
+
227
+ var date = toDate(dirtyDate);
228
+ return !isNaN(Number(date));
229
+ }
230
+
64
231
  var formatDistanceLocale = {
65
232
  lessThanXSeconds: {
66
233
  one: 'less than a second',
@@ -853,4 +1020,4 @@ function throwProtectedError(token, format, input) {
853
1020
  }
854
1021
  }
855
1022
 
856
- export { getUTCWeek as a, getUTCISOWeekYear as b, getUTCWeekYear as c, getTimezoneOffsetInMilliseconds as d, longFormatters as e, throwProtectedError as f, getUTCISOWeek as g, isProtectedDayOfYearToken as h, isProtectedWeekYearToken as i, buildFormatLongFn as j, buildLocalizeFn as k, locale as l, buildMatchFn as m, buildMatchPatternFn as n, startOfUTCISOWeek as o, startOfUTCWeek as p, subMilliseconds as s, toInteger as t };
1023
+ export { toInteger as a, getUTCWeek as b, startOfUTCWeek as c, getUTCWeekYear as d, longFormatters as e, throwProtectedError as f, getUTCISOWeek as g, isProtectedDayOfYearToken as h, isProtectedWeekYearToken as i, subMilliseconds as j, getTimezoneOffsetInMilliseconds as k, locale as l, isValid as m, getUTCISOWeekYear as n, buildFormatLongFn as o, buildLocalizeFn as p, buildMatchFn as q, requiredArgs as r, startOfUTCISOWeek as s, toDate as t, buildMatchPatternFn as u };
package/dist/esm/index.js CHANGED
@@ -1,24 +1,20 @@
1
- export { B as BadgeNotificationShape, C as CalendarWeekViewHeadingLevel } from './calendar-week-view-heading-level.enum-BBOpiDGx.js';
2
- export { B as BadgeNotificationType, C as CalendarDatepickerValidation, a as CodeBlockLanguage, D as DialogHeadingLevel, b as DialogSize, c as DialogVariation, E as ErrorPageStatusCodes, t as FeedbackVariation, F as FooterVariation, d as FormErrorListHeadingLevel, e as FormFieldsetValidation, f as FormRadiobuttonLayout, g as FormRadiobuttonValidation, h as FormRadiobuttonVariation, i as FormReceiptHeadingLevel, j as FormReceiptType, k as FormReceiptVariation, l as FormSelectFilterValidation, H as HeaderCenterContentWidth, o as InfoCardHeadingLevel, I as InfoCardMultiContainerHeadingLevel, m as InfoCardMultiHeadingLevel, n as InfoCardMultiVariation, N as NotificationAlertHeadingLevel, p as NotificationAlertSize, q as NotificationAlertVariation, T as TitleLogoVariation, r as ToolsFeedbackHeadingLevel, s as ToolsFeedbackType, u as TypographyVariation } from './typography-variation.enum-4smNltRI.js';
1
+ export { B as BadgeNotificationShape } from './badge-notification-shape.enum-CKoZU0-H.js';
2
+ export { B as BadgeNotificationType, C as CalendarDatepickerValidation, a as CodeBlockLanguage, D as DialogHeadingLevel, b as DialogSize, c as DialogVariation, y as ErrorPageStatusCodes, E as ExpandableAccordionHeaderLevel, d as ExpandableFaqItemHeadingLevel, e as ExpandableFaqItemVariation, G as FeedbackVariation, F as FooterVariation, f as FormErrorListHeadingLevel, j as FormFieldsetValidation, g as FormInputMode, h as FormInputValidation, i as FormInputVariation, k as FormRadiobuttonLayout, l as FormRadiobuttonValidation, m as FormRadiobuttonVariation, n as FormReceiptHeadingLevel, o as FormReceiptType, p as FormReceiptVariation, q as FormSelectFilterValidation, r as FormSelectValidation, s as FormSelectVariation, H as HeaderCenterContentWidth, v as InfoCardHeadingLevel, I as InfoCardMultiContainerHeadingLevel, t as InfoCardMultiHeadingLevel, u as InfoCardMultiVariation, N as NotificationAlertHeadingLevel, w as NotificationAlertSize, x as NotificationAlertVariation, T as TitleLogoVariation, z as ToolsFeedbackHeadingLevel, A as ToolsFeedbackType, J as TypographyHeadingJumboLevel, K as TypographyHeadingJumboVariation, L as TypographyVariation } from './typography-variation.enum-Zivp2NJB.js';
3
3
  export { B as BadgeStatusSize, a as BadgeStatusType, b as BadgeStatusVariation } from './badge-status-variation.enum-C0A-p3cU.js';
4
- export { B as ButtonSize, a as ButtonVariation } from './button-variation.enum-BMQm4N5I.js';
4
+ export { B as ButtonSize } from './button-size.enum-C7xgnp99.js';
5
5
  export { B as ButtonType } from './button-type.enum-DShzaNrQ.js';
6
+ export { B as ButtonVariation } from './button-variation.enum-y5Nm4oWF.js';
7
+ export { C as CalendarWeekViewHeadingLevel } from './calendar-week-view-heading-level.enum-DH_-wpLB.js';
6
8
  export { B as BarChartVariation } from './bar-chart-variation.enum-DPeoHh1J.js';
7
9
  export { C as CodeBlockVariation, a as CodeExampleLanguage, b as CodeExampleVariation } from './code-example-variation.enum-DGI7Jkg2.js';
8
10
  export { C as CodeLanguage, a as CodeVariation } from './code-variation.enum-qc6KRZue.js';
9
- export { E as ExpandableAccordionHeaderLevel } from './expandable-accordion-header-level.enum-DwNlf6Sh.js';
10
- export { E as ExpandableFaqItemHeadingLevel, a as ExpandableFaqItemVariation } from './expandable-faq-item-variation.enum-C6B2KRZo.js';
11
11
  export { E as ExpandableFaqHeadingLevel, a as ExpandableFaqVariation } from './expandable-faq-variation.enum-CES5gUEo.js';
12
12
  export { F as FooterCardVariation } from './footer-card-variation.enum-DzSu1-K0.js';
13
13
  export { F as FormCheckboxLayout, a as FormCheckboxValidation, b as FormCheckboxVariation } from './form-checkbox-variation.enum-6-MpaVf8.js';
14
- export { F as FormFileUploadHeadingLevel, a as FormFileUploadValidation, b as FormFileUploadVariation } from './form-file-upload-variation.enum-BfyJgcLA.js';
15
- export { F as FormInputSearchVariation } from './form-input-search-variation.enum-BvWKyXb_.js';
16
- export { F as FormInputButtonVariation, a as FormInputType } from './form-input-type.enum-BSJH8Lpg.js';
17
- export { F as FormInputMode, a as FormInputValidation, b as FormInputVariation } from './form-input-variation.enum-DfWZa2Wv.js';
14
+ export { F as FormFileUploadHeadingLevel, a as FormFileUploadValidation, b as FormFileUploadVariation, c as FormValidationMessageVariation } from './form-validation-message-variation.enum-9n7Okhf1.js';
15
+ export { a as FormInputButtonVariation, F as FormInputSearchVariation, b as FormInputType } from './form-input-type.enum-C6S1HfeA.js';
18
16
  export { F as FormRadiogroupValidation } from './form-radiogroup-validation.enum-DcnvI7UR.js';
19
- export { F as FormSelectValidation, a as FormSelectVariation } from './form-select-variation.enum-DCS1KcvC.js';
20
17
  export { F as FormTextareaValidation, a as FormTextareaVariation } from './form-textarea-variation.enum-DogB9kfH.js';
21
- export { F as FormValidationMessageVariation } from './form-validation-message-variation.enum-B8hpiXmh.js';
22
18
  export { I as InfoCardMultiType } from './info-card-multi-type.enum-CkIb3cUS.js';
23
19
  export { I as InfoCardBorderPosition, a as InfoCardSize, b as InfoCardType, c as InfoCardVariation } from './info-card-variation.enum-_ycZeBN4.js';
24
20
  export { L as LayoutBlockContainer, b as LayoutContainerMaxWidth, a as LayoutContainerVariation } from './layout-container-max-width.enum-CuhrrYGE.js';
@@ -44,7 +40,6 @@ export { T as TagSize } from './tag-size.enum-bQJ38En_.js';
44
40
  export { T as ToolsFeedbackBannerHeadingLevel, a as ToolsFeedbackBannerType } from './tools-feedback-banner-type.enum-DrVSK7Ws.js';
45
41
  export { F as FeedbackRatingHeadingLevel, a as FeedbackRatingType, b as FeedbackRatingVariation } from './tools-feedback-rating-variation.enum-CAmn5qzb.js';
46
42
  export { T as ToolsThemeProviderBrandEnum } from './tools-theme-provider.brand.enum-DpDyNuVC.js';
47
- export { T as TypographyHeadingJumboLevel, a as TypographyHeadingJumboVariation } from './typography-heading-jumbo-variation.enum-DNjGvZvz.js';
48
43
  export { T as TypographyMetaVariation } from './typography-meta-variation.enum-CHxBAbI8.js';
49
44
  export { T as TypographyTimeVariation } from './typography-time-variation.enum-rhVqmQwC.js';
50
45
  export { U as UtilBreakpointObserverBreakpoints } from './util-breakpoint-observer-breakpoints.enum-DPq588Q4.js';