@caspeco/casper-ui-library 7.1.0 → 7.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"base-date-picker.d.ts","sourceRoot":"","sources":["../../../lib/components/date-picker/base-date-picker.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,mBAAmB,EAAa,MAAM,SAAS,CAAC;AAgB9D,wBAAgB,cAAc,CAAC,EAC9B,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,oBAA4B,EAC5B,YAAY,EACZ,kBAAkB,EAClB,UAAiB,EACjB,IAAI,EACJ,WAAmB,EACnB,UAAkB,EAClB,iBAAiB,EACjB,aAAa,EAAE,YAAY,EAC3B,SAAS,EACT,WAAmB,EACnB,aAAa,EACb,UAAkB,EAClB,OAAY,EACZ,iBAAyB,EACzB,yBAAiC,EACjC,wBAAgC,GAChC,EAAE,mBAAmB,2CAkSrB"}
1
+ {"version":3,"file":"base-date-picker.d.ts","sourceRoot":"","sources":["../../../lib/components/date-picker/base-date-picker.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,mBAAmB,EAAa,MAAM,SAAS,CAAC;AAmB9D,wBAAgB,cAAc,CAAC,EAC9B,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,oBAA4B,EAC5B,YAAY,EACZ,kBAAkB,EAClB,UAAiB,EACjB,IAAI,EACJ,WAAmB,EACnB,UAAkB,EAClB,iBAAiB,EACjB,aAAa,EAAE,YAAY,EAC3B,SAAS,EACT,WAAmB,EACnB,aAAa,EACb,UAAkB,EAClB,OAAY,EACZ,iBAAyB,EACzB,yBAAiC,EACjC,wBAAgC,GAChC,EAAE,mBAAmB,2CAkSrB"}
@@ -1,77 +1,82 @@
1
- import { jsxs as B, jsx as i, Fragment as $t } from "react/jsx-runtime";
1
+ import { jsxs as x, jsx as i, Fragment as $t } from "react/jsx-runtime";
2
2
  import { GridItem as q, Box as bt, Grid as J } from "@chakra-ui/react";
3
- import Ft, { useState as Q, useEffect as Tt, useCallback as Gt } from "react";
3
+ import Et, { useState as Q, useEffect as Tt, useCallback as Gt } from "react";
4
4
  import { DatePickerDateCell as X } from "./date-picker-date-cell.js";
5
5
  import { DatePickerHeader as Lt } from "./date-picker-header.js";
6
- import { DatePickerWeekCell as Et } from "./date-picker-week-cell.js";
7
- import { hasDotOnDate as h, isDateStrikeThrough as Pt, getWeekCellVariant as Ut, getDateCellVariant as Z, firstLetterUpperCase as _t, hasDatePassed as zt } from "./helper.js";
8
- import { lv as At } from "../../node_modules/date-fns/locale/lv.js";
9
- import { lt as Ht } from "../../node_modules/date-fns/locale/lt.js";
10
- import { et as jt } from "../../node_modules/date-fns/locale/et.js";
11
- import { es as Kt } from "../../node_modules/date-fns/locale/es.js";
12
- import { fi as Yt } from "../../node_modules/date-fns/locale/fi.js";
13
- import { nl as qt } from "../../node_modules/date-fns/locale/nl.js";
14
- import { endOfMonth as N } from "../../node_modules/date-fns/endOfMonth.js";
15
- import { startOfWeek as Jt } from "../../node_modules/date-fns/startOfWeek.js";
16
- import { sv as Qt } from "../../node_modules/date-fns/locale/sv.js";
17
- import { da as Xt } from "../../node_modules/date-fns/locale/da.js";
18
- import { nb as Zt } from "../../node_modules/date-fns/locale/nb.js";
19
- import { enGB as Nt } from "../../node_modules/date-fns/locale/en-GB.js";
20
- import { enUS as Rt } from "../../node_modules/date-fns/locale/en-US.js";
21
- import { formatDate as R } from "../../node_modules/date-fns/format.js";
22
- import { startOfMonth as V } from "../../node_modules/date-fns/startOfMonth.js";
23
- import { addDays as tt } from "../../node_modules/date-fns/addDays.js";
24
- import { isSameMonth as rt } from "../../node_modules/date-fns/isSameMonth.js";
6
+ import { DatePickerWeekCell as Pt } from "./date-picker-week-cell.js";
7
+ import { hasDotOnDate as p, isDateStrikeThrough as Ut, getWeekCellVariant as _t, getDateCellVariant as Z, firstLetterUpperCase as zt, hasDatePassed as At } from "./helper.js";
8
+ import { nlBE as Ht } from "../../node_modules/date-fns/locale/nl-BE.js";
9
+ import { fr as N } from "../../node_modules/date-fns/locale/fr.js";
10
+ import { lv as jt } from "../../node_modules/date-fns/locale/lv.js";
11
+ import { lt as Kt } from "../../node_modules/date-fns/locale/lt.js";
12
+ import { et as Yt } from "../../node_modules/date-fns/locale/et.js";
13
+ import { es as qt } from "../../node_modules/date-fns/locale/es.js";
14
+ import { fi as Jt } from "../../node_modules/date-fns/locale/fi.js";
15
+ import { nl as Qt } from "../../node_modules/date-fns/locale/nl.js";
16
+ import { endOfMonth as R } from "../../node_modules/date-fns/endOfMonth.js";
17
+ import { startOfWeek as Xt } from "../../node_modules/date-fns/startOfWeek.js";
18
+ import { sv as Zt } from "../../node_modules/date-fns/locale/sv.js";
19
+ import { da as Nt } from "../../node_modules/date-fns/locale/da.js";
20
+ import { nb as Rt } from "../../node_modules/date-fns/locale/nb.js";
21
+ import { enGB as tr } from "../../node_modules/date-fns/locale/en-GB.js";
22
+ import { enUS as rr } from "../../node_modules/date-fns/locale/en-US.js";
23
+ import { formatDate as tt } from "../../node_modules/date-fns/format.js";
24
+ import { startOfMonth as F } from "../../node_modules/date-fns/startOfMonth.js";
25
+ import { addDays as rt } from "../../node_modules/date-fns/addDays.js";
26
+ import { isSameMonth as et } from "../../node_modules/date-fns/isSameMonth.js";
25
27
  import { isSameDay as f } from "../../node_modules/date-fns/isSameDay.js";
26
- import { getISOWeek as et } from "../../node_modules/date-fns/getISOWeek.js";
27
- import { ThemeColorVariable as ot, ThemeSpaceVariable as at, ThemeFontSizeVariable as tr, ThemeFontVariable as rr } from "../../theme/theme-types.js";
28
- const er = {
29
- "en-US": { locale: Rt },
30
- "en-GB": { locale: Nt },
31
- "nb-NO": { locale: Zt },
32
- "da-DK": { locale: Xt },
33
- "sv-SE": { locale: Qt },
34
- "nl-NL": { locale: qt },
35
- "fi-FI": { locale: Yt },
36
- "es-ES": { locale: Kt },
37
- "et-EE": { locale: jt },
38
- "lt-LT": { locale: Ht },
39
- "lv-LV": { locale: At }
28
+ import { getISOWeek as ot } from "../../node_modules/date-fns/getISOWeek.js";
29
+ import { ThemeColorVariable as at, ThemeSpaceVariable as lt, ThemeFontSizeVariable as er, ThemeFontVariable as or } from "../../theme/theme-types.js";
30
+ const ar = {
31
+ "en-US": { locale: rr },
32
+ "en-GB": { locale: tr },
33
+ "nb-NO": { locale: Rt },
34
+ "da-DK": { locale: Nt },
35
+ "sv-SE": { locale: Zt },
36
+ "nl-NL": { locale: Qt },
37
+ "fi-FI": { locale: Jt },
38
+ "es-ES": { locale: qt },
39
+ "et-EE": { locale: Yt },
40
+ "lt-LT": { locale: Kt },
41
+ "lv-LV": { locale: jt },
42
+ "fr-FR": { locale: N },
43
+ "fr-BE": { locale: N },
44
+ "nl-BE": { locale: Ht }
40
45
  };
41
- function br({
46
+ function Gr({
42
47
  selectedDate: l,
43
48
  onDateChange: S,
44
- onMonthChange: W,
45
- markSundayRed: lt,
46
- strikeThroughDates: st,
47
- showDaysOutsideMonth: nt = !1,
48
- localeString: it,
49
- canSelectPastDates: ft,
49
+ onMonthChange: V,
50
+ markSundayRed: st,
51
+ strikeThroughDates: nt,
52
+ showDaysOutsideMonth: it = !1,
53
+ localeString: ft,
54
+ canSelectPastDates: mt,
50
55
  isExpanded: C = !0,
51
- dots: c,
56
+ dots: m,
52
57
  weekNumbers: a = !1,
53
- selectWeek: m = !1,
54
- shouldDisableDate: $,
58
+ selectWeek: c = !1,
59
+ shouldDisableDate: W,
55
60
  selectedMonth: M,
56
61
  dateRange: e,
57
- isRangeDate: b = !1,
62
+ isRangeDate: $ = !1,
58
63
  onRangeChange: s,
59
64
  isDisabled: ct = !1,
60
- redDays: mt = [],
61
- disablePastMonths: Dt = !1,
65
+ redDays: Dt = [],
66
+ disablePastMonths: pt = !1,
62
67
  disableBackwardNavigation: ht = !1,
63
- disableForwardNavigation: pt = !1
68
+ disableForwardNavigation: ut = !1
64
69
  }) {
65
- const [n, F] = Q(M || l || /* @__PURE__ */ new Date()), [T, O] = Q(!0), { locale: D } = er[it];
70
+ const [n, b] = Q(M || l || /* @__PURE__ */ new Date()), [E, O] = Q(!0), { locale: D } = ar[ft];
66
71
  Tt(() => {
67
- l && F(M || l || /* @__PURE__ */ new Date());
72
+ l && b(M || l || /* @__PURE__ */ new Date());
68
73
  }, [M, C, l]);
69
- const ut = (o) => {
70
- F(o), W && W(o);
71
- }, p = Gt(
74
+ const dt = (o) => {
75
+ b(o), V && V(o);
76
+ }, h = Gt(
72
77
  (o) => {
73
- b ? ((t) => {
74
- if (T)
78
+ $ ? ((t) => {
79
+ if (E)
75
80
  s && s({ startDate: t, endDate: null }), O(!1);
76
81
  else if (e?.startDate && e.startDate > t)
77
82
  s && s({ startDate: t, endDate: null }), O(!1);
@@ -86,43 +91,43 @@ function br({
86
91
  }
87
92
  })(o) : S && S(o);
88
93
  },
89
- [S, b, T, e?.startDate, s]
94
+ [S, $, E, e?.startDate, s]
90
95
  );
91
- function dt() {
92
- const o = Jt(/* @__PURE__ */ new Date(), { locale: D });
93
- return Array.from({ length: 7 }, (r, t) => R(tt(o, t), "eee", { locale: D }));
96
+ function yt() {
97
+ const o = Xt(/* @__PURE__ */ new Date(), { locale: D });
98
+ return Array.from({ length: 7 }, (r, t) => tt(rt(o, t), "eee", { locale: D }));
94
99
  }
95
- const yt = R(V(n), "MMMM yyyy", {
100
+ const St = tt(F(n), "MMMM yyyy", {
96
101
  locale: D
97
- }), St = N(n).getDate(), Ct = [a ? "v." : void 0, ...dt()], Mt = D.options?.weekStartsOn || 0, G = (V(n).getDay() - Mt + 7) % 7, Ot = (7 - N(n).getDay()) % 7, kt = ["auto", "auto", "100%"], gt = ["auto", "auto", "100%"], It = (o) => !ft && zt(o) ? !0 : $ ? $(o) : !1, vt = Array.from({ length: St + G + Ot }, (o, r) => {
98
- const t = tt(V(n), r - G), k = rt(t, n), g = f(t, /* @__PURE__ */ new Date()), u = It(t) || ct, L = h(t, c?.yellowDotDates), E = h(t, c?.greenDotDates), P = h(t, c?.blueDotDates), U = h(t, c?.redDotDates), _ = h(t, c?.greyDotDates), z = Pt(t, st) && !u;
99
- let I = !1;
100
- l && (I = f(t, l));
101
- const wt = t.getDay() === 0, A = mt.some((Wt) => f(Wt, t)) || (lt ?? !1) && wt, v = et(t);
102
+ }), Ct = R(n).getDate(), Mt = [a ? "v." : void 0, ...yt()], Ot = D.options?.weekStartsOn || 0, T = (F(n).getDay() - Ot + 7) % 7, kt = (7 - R(n).getDay()) % 7, gt = ["auto", "auto", "100%"], Bt = ["auto", "auto", "100%"], It = (o) => !mt && At(o) ? !0 : W ? W(o) : !1, vt = Array.from({ length: Ct + T + kt }, (o, r) => {
103
+ const t = rt(F(n), r - T), k = et(t, n), g = f(t, /* @__PURE__ */ new Date()), u = It(t) || ct, G = p(t, m?.yellowDotDates), L = p(t, m?.greenDotDates), P = p(t, m?.blueDotDates), U = p(t, m?.redDotDates), _ = p(t, m?.greyDotDates), z = Ut(t, nt) && !u;
104
+ let B = !1;
105
+ l && (B = f(t, l));
106
+ const wt = t.getDay() === 0, A = Dt.some((Wt) => f(Wt, t)) || (st ?? !1) && wt, I = ot(t);
102
107
  let d = !1;
103
- m && l && (d = et(l) === v);
104
- const H = !rt(t, n), j = !!(e?.startDate && e?.endDate && t > e.startDate && t < e.endDate);
105
- let w = !1;
106
- e?.startDate && (w = f(t, e?.startDate));
107
- let x = !1, K = !1;
108
- e?.endDate && (x = f(t, e?.endDate), K = !0);
108
+ c && l && (d = ot(l) === I);
109
+ const H = !et(t, n), j = !!(e?.startDate && e?.endDate && t > e.startDate && t < e.endDate);
110
+ let v = !1;
111
+ e?.startDate && (v = f(t, e?.startDate));
112
+ let w = !1, K = !1;
113
+ e?.endDate && (w = f(t, e?.endDate), K = !0);
109
114
  const xt = Z(
110
- I || d,
115
+ B || d,
111
116
  g,
112
117
  H,
113
118
  j,
119
+ v,
114
120
  w,
115
- x,
116
121
  K
117
- ), Bt = Ut(d, g), Vt = Z(
118
- I || d,
122
+ ), Ft = _t(d, g), Vt = Z(
123
+ B || d,
119
124
  g,
120
125
  H,
121
126
  j,
122
- w,
123
- x
127
+ v,
128
+ w
124
129
  ), Y = Math.floor(r / 7) + 1, y = r % 7 + 1;
125
- return a ? /* @__PURE__ */ B(Ft.Fragment, { children: [
130
+ return a ? /* @__PURE__ */ x(Et.Fragment, { children: [
126
131
  a && r % 7 === 0 && /* @__PURE__ */ i(
127
132
  q,
128
133
  {
@@ -130,98 +135,98 @@ function br({
130
135
  gridRow: "1 / span 7",
131
136
  opacity: "0.24",
132
137
  borderRight: "1px solid",
133
- borderColor: ot.OnSurfaceBorder
138
+ borderColor: at.OnSurfaceBorder
134
139
  },
135
140
  `grid-${r}-${t.toUTCString()}`
136
141
  ),
137
142
  a && r % 7 === 0 && /* @__PURE__ */ i(
138
- Et,
143
+ Pt,
139
144
  {
140
- handleWeekChange: p,
145
+ handleWeekChange: h,
141
146
  date: t,
142
147
  gridIndex: r,
143
- variant: Bt,
144
- selectWeek: m,
148
+ variant: Ft,
149
+ selectWeek: c,
145
150
  isDisabled: u
146
151
  },
147
- `week-${r}-${v}`
152
+ `week-${r}-${I}`
148
153
  ),
149
154
  /* @__PURE__ */ i(
150
155
  X,
151
156
  {
152
157
  hasBlueDot: P,
153
- hasGreenDot: E,
154
- hasYellowDot: L,
158
+ hasGreenDot: L,
159
+ hasYellowDot: G,
155
160
  hasRedDot: U,
156
161
  hasGreyDot: _,
157
162
  gridIndex: r,
158
163
  gridColumn: a ? y + 2 : y,
159
164
  gridRow: Y,
160
165
  day: t,
161
- handleDateChange: p,
166
+ handleDateChange: h,
162
167
  variant: Vt,
163
168
  isDisabled: u,
164
169
  isStrikeThrough: z,
165
- selectWeek: m,
170
+ selectWeek: c,
166
171
  isHoliday: A
167
172
  },
168
173
  t.toString() + r
169
174
  )
170
- ] }, `fragment-${r}-${v}`) : k || nt ? /* @__PURE__ */ i(
175
+ ] }, `fragment-${r}-${I}`) : k || it ? /* @__PURE__ */ i(
171
176
  X,
172
177
  {
173
178
  hasBlueDot: P,
174
- hasGreenDot: E,
175
- hasYellowDot: L,
179
+ hasGreenDot: L,
180
+ hasYellowDot: G,
176
181
  hasRedDot: U,
177
182
  hasGreyDot: _,
178
183
  gridIndex: r,
179
184
  gridColumn: a ? y + 1 : y,
180
185
  gridRow: Y,
181
186
  day: t,
182
- handleDateChange: p,
187
+ handleDateChange: h,
183
188
  variant: xt,
184
189
  isDisabled: u,
185
190
  isStrikeThrough: z,
186
- selectWeek: m,
191
+ selectWeek: c,
187
192
  isHoliday: A
188
193
  },
189
194
  `${t.toString()}-${r}`
190
195
  ) : null;
191
196
  });
192
- return /* @__PURE__ */ B(bt, { w: gt, h: kt, children: [
197
+ return /* @__PURE__ */ x(bt, { w: Bt, h: gt, children: [
193
198
  /* @__PURE__ */ i(
194
199
  Lt,
195
200
  {
196
201
  selectedDate: l || /* @__PURE__ */ new Date(),
197
- onDateChange: p,
202
+ onDateChange: h,
198
203
  isExpanded: C,
199
- onMonthChange: ut,
204
+ onMonthChange: dt,
200
205
  selectedMonth: n,
201
- month: yt,
206
+ month: St,
202
207
  locale: D,
203
- selectWeek: m,
204
- disablePastMonths: Dt,
208
+ selectWeek: c,
209
+ disablePastMonths: pt,
205
210
  disableBackwardNavigation: ht,
206
- disableForwardNavigation: pt,
211
+ disableForwardNavigation: ut,
207
212
  dateRange: e,
208
213
  onRangeChange: s
209
214
  }
210
215
  ),
211
- C && /* @__PURE__ */ B($t, { children: [
212
- /* @__PURE__ */ i(J, { templateColumns: a ? "48px 1px 1fr 1fr 1fr 1fr 1fr 1fr 1fr" : "repeat(7, 1fr)", children: Ct.map((o, r) => {
216
+ C && /* @__PURE__ */ x($t, { children: [
217
+ /* @__PURE__ */ i(J, { templateColumns: a ? "48px 1px 1fr 1fr 1fr 1fr 1fr 1fr 1fr" : "repeat(7, 1fr)", children: Mt.map((o, r) => {
213
218
  let t;
214
219
  return a && r === 0 ? t = 1 : a ? t = r + 2 : t = r, o ? /* @__PURE__ */ i(
215
220
  q,
216
221
  {
217
222
  textAlign: "center",
218
223
  fontWeight: "500",
219
- fontFamily: rr.Body,
220
- fontSize: tr.Small,
224
+ fontFamily: or.Body,
225
+ fontSize: er.Small,
221
226
  gridColumn: t,
222
- borderRight: a && r === 0 ? `1px solid ${ot.OnSurfaceBorder}` : "",
223
- pb: at.Small,
224
- children: _t(o).slice(0, 2)
227
+ borderRight: a && r === 0 ? `1px solid ${at.OnSurfaceBorder}` : "",
228
+ pb: lt.Small,
229
+ children: zt(o).slice(0, 2)
225
230
  },
226
231
  o
227
232
  ) : null;
@@ -230,7 +235,7 @@ function br({
230
235
  J,
231
236
  {
232
237
  templateColumns: a ? "48px 1px 1fr 1fr 1fr 1fr 1fr 1fr 1fr" : "repeat(7, 1fr)",
233
- rowGap: at.Small,
238
+ rowGap: lt.Small,
234
239
  flexShrink: 1,
235
240
  children: vt
236
241
  }
@@ -239,5 +244,5 @@ function br({
239
244
  ] });
240
245
  }
241
246
  export {
242
- br as BaseDatePicker
247
+ Gr as BaseDatePicker
243
248
  };
@@ -2,7 +2,7 @@ export type DateRange = {
2
2
  startDate: Date | null;
3
3
  endDate: Date | null;
4
4
  };
5
- export type LocaleKey = "en-US" | "en-GB" | "nb-NO" | "da-DK" | "sv-SE" | "nl-NL" | "fi-FI" | "es-ES" | "et-EE" | "lt-LT" | "lv-LV";
5
+ export type LocaleKey = "en-US" | "en-GB" | "nb-NO" | "da-DK" | "sv-SE" | "nl-NL" | "nl-BE" | "fr-FR" | "fr-BE" | "fi-FI" | "es-ES" | "et-EE" | "lt-LT" | "lv-LV";
6
6
  export type DatePickerPropsBase = {
7
7
  /**
8
8
  * A callback function called when the user changes the month.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/components/date-picker/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACvB,SAAS,EAAE,IAAI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C;IAC5C;;;OAGG;IACH,aAAa,CAAC,EAAE,IAAI,CAAC;IAErB,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;IAE/C;;;;OAIG;IAEH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC;IACjB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;;OAKG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAEpC;;;;;OAKG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,IAAI,CACjC,mBAAmB,EACjB,cAAc,GACd,oBAAoB,GACpB,MAAM,GACN,YAAY,GACZ,eAAe,GACf,cAAc,GACd,eAAe,GACf,cAAc,GACd,eAAe,GACf,mBAAmB,GACnB,sBAAsB,GACtB,oBAAoB,GACpB,aAAa,GACb,YAAY,GACZ,SAAS,GACT,mBAAmB,GACnB,2BAA2B,GAC3B,0BAA0B,CAC5B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,IAAI,CACtC,mBAAmB,EACjB,cAAc,GACd,oBAAoB,GACpB,WAAW,GACX,MAAM,GACN,YAAY,GACZ,eAAe,GACf,eAAe,GACf,eAAe,GACf,aAAa,GACb,sBAAsB,GACtB,eAAe,GACf,YAAY,GACZ,SAAS,CACX,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,IAAI,CACrC,mBAAmB,EACjB,oBAAoB,GACpB,cAAc,GACd,MAAM,GACN,YAAY,GACZ,eAAe,GACf,cAAc,GACd,cAAc,GACd,eAAe,GACf,eAAe,GACf,YAAY,GACZ,SAAS,CACX,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/components/date-picker/types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GACf,eAAe,GACf,YAAY,GACZ,SAAS,CACX,CAAC"}
@@ -0,0 +1,70 @@
1
+ const r = {
2
+ lessThanXSeconds: {
3
+ one: "moins d’une seconde",
4
+ other: "moins de {{count}} secondes"
5
+ },
6
+ xSeconds: {
7
+ one: "1 seconde",
8
+ other: "{{count}} secondes"
9
+ },
10
+ halfAMinute: "30 secondes",
11
+ lessThanXMinutes: {
12
+ one: "moins d’une minute",
13
+ other: "moins de {{count}} minutes"
14
+ },
15
+ xMinutes: {
16
+ one: "1 minute",
17
+ other: "{{count}} minutes"
18
+ },
19
+ aboutXHours: {
20
+ one: "environ 1 heure",
21
+ other: "environ {{count}} heures"
22
+ },
23
+ xHours: {
24
+ one: "1 heure",
25
+ other: "{{count}} heures"
26
+ },
27
+ xDays: {
28
+ one: "1 jour",
29
+ other: "{{count}} jours"
30
+ },
31
+ aboutXWeeks: {
32
+ one: "environ 1 semaine",
33
+ other: "environ {{count}} semaines"
34
+ },
35
+ xWeeks: {
36
+ one: "1 semaine",
37
+ other: "{{count}} semaines"
38
+ },
39
+ aboutXMonths: {
40
+ one: "environ 1 mois",
41
+ other: "environ {{count}} mois"
42
+ },
43
+ xMonths: {
44
+ one: "1 mois",
45
+ other: "{{count}} mois"
46
+ },
47
+ aboutXYears: {
48
+ one: "environ 1 an",
49
+ other: "environ {{count}} ans"
50
+ },
51
+ xYears: {
52
+ one: "1 an",
53
+ other: "{{count}} ans"
54
+ },
55
+ overXYears: {
56
+ one: "plus d’un an",
57
+ other: "plus de {{count}} ans"
58
+ },
59
+ almostXYears: {
60
+ one: "presqu’un an",
61
+ other: "presque {{count}} ans"
62
+ }
63
+ }, u = (t, s, o) => {
64
+ let e;
65
+ const n = r[t];
66
+ return typeof n == "string" ? e = n : s === 1 ? e = n.one : e = n.other.replace("{{count}}", String(s)), o?.addSuffix ? o.comparison && o.comparison > 0 ? "dans " + e : "il y a " + e : e;
67
+ };
68
+ export {
69
+ u as formatDistance
70
+ };
@@ -0,0 +1,33 @@
1
+ import { buildFormatLongFn as t } from "../../_lib/buildFormatLongFn.js";
2
+ const m = {
3
+ full: "EEEE d MMMM y",
4
+ long: "d MMMM y",
5
+ medium: "d MMM y",
6
+ short: "dd/MM/y"
7
+ }, d = {
8
+ full: "HH:mm:ss zzzz",
9
+ long: "HH:mm:ss z",
10
+ medium: "HH:mm:ss",
11
+ short: "HH:mm"
12
+ }, e = {
13
+ full: "{{date}} 'à' {{time}}",
14
+ long: "{{date}} 'à' {{time}}",
15
+ medium: "{{date}}, {{time}}",
16
+ short: "{{date}}, {{time}}"
17
+ }, a = {
18
+ date: t({
19
+ formats: m,
20
+ defaultWidth: "full"
21
+ }),
22
+ time: t({
23
+ formats: d,
24
+ defaultWidth: "full"
25
+ }),
26
+ dateTime: t({
27
+ formats: e,
28
+ defaultWidth: "full"
29
+ })
30
+ };
31
+ export {
32
+ a as formatLong
33
+ };
@@ -0,0 +1,11 @@
1
+ const t = {
2
+ lastWeek: "eeee 'dernier à' p",
3
+ yesterday: "'hier à' p",
4
+ today: "'aujourd’hui à' p",
5
+ tomorrow: "'demain à' p'",
6
+ nextWeek: "eeee 'prochain à' p",
7
+ other: "P"
8
+ }, i = (e, o, a, r) => t[e];
9
+ export {
10
+ i as formatRelative
11
+ };
@@ -0,0 +1,121 @@
1
+ import { buildLocalizeFn as r } from "../../_lib/buildLocalizeFn.js";
2
+ const o = {
3
+ narrow: ["av. J.-C", "ap. J.-C"],
4
+ abbreviated: ["av. J.-C", "ap. J.-C"],
5
+ wide: ["avant Jésus-Christ", "après Jésus-Christ"]
6
+ }, d = {
7
+ narrow: ["T1", "T2", "T3", "T4"],
8
+ abbreviated: ["1er trim.", "2ème trim.", "3ème trim.", "4ème trim."],
9
+ wide: ["1er trimestre", "2ème trimestre", "3ème trimestre", "4ème trimestre"]
10
+ }, s = {
11
+ narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
12
+ abbreviated: [
13
+ "janv.",
14
+ "févr.",
15
+ "mars",
16
+ "avr.",
17
+ "mai",
18
+ "juin",
19
+ "juil.",
20
+ "août",
21
+ "sept.",
22
+ "oct.",
23
+ "nov.",
24
+ "déc."
25
+ ],
26
+ wide: [
27
+ "janvier",
28
+ "février",
29
+ "mars",
30
+ "avril",
31
+ "mai",
32
+ "juin",
33
+ "juillet",
34
+ "août",
35
+ "septembre",
36
+ "octobre",
37
+ "novembre",
38
+ "décembre"
39
+ ]
40
+ }, u = {
41
+ narrow: ["D", "L", "M", "M", "J", "V", "S"],
42
+ short: ["di", "lu", "ma", "me", "je", "ve", "sa"],
43
+ abbreviated: ["dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."],
44
+ wide: [
45
+ "dimanche",
46
+ "lundi",
47
+ "mardi",
48
+ "mercredi",
49
+ "jeudi",
50
+ "vendredi",
51
+ "samedi"
52
+ ]
53
+ }, l = {
54
+ narrow: {
55
+ am: "AM",
56
+ pm: "PM",
57
+ midnight: "minuit",
58
+ noon: "midi",
59
+ morning: "mat.",
60
+ afternoon: "ap.m.",
61
+ evening: "soir",
62
+ night: "mat."
63
+ },
64
+ abbreviated: {
65
+ am: "AM",
66
+ pm: "PM",
67
+ midnight: "minuit",
68
+ noon: "midi",
69
+ morning: "matin",
70
+ afternoon: "après-midi",
71
+ evening: "soir",
72
+ night: "matin"
73
+ },
74
+ wide: {
75
+ am: "AM",
76
+ pm: "PM",
77
+ midnight: "minuit",
78
+ noon: "midi",
79
+ morning: "du matin",
80
+ afternoon: "de l’après-midi",
81
+ evening: "du soir",
82
+ night: "du matin"
83
+ }
84
+ }, v = (n, i) => {
85
+ const a = Number(n), e = i?.unit;
86
+ if (a === 0) return "0";
87
+ const m = ["year", "week", "hour", "minute", "second"];
88
+ let t;
89
+ return a === 1 ? t = e && m.includes(e) ? "ère" : "er" : t = "ème", a + t;
90
+ }, c = ["MMM", "MMMM"], M = {
91
+ preprocessor: (n, i) => n.getDate() === 1 || !i.some(
92
+ (e) => e.isToken && c.includes(e.value)
93
+ ) ? i : i.map(
94
+ (e) => e.isToken && e.value === "do" ? { isToken: !0, value: "d" } : e
95
+ ),
96
+ ordinalNumber: v,
97
+ era: r({
98
+ values: o,
99
+ defaultWidth: "wide"
100
+ }),
101
+ quarter: r({
102
+ values: d,
103
+ defaultWidth: "wide",
104
+ argumentCallback: (n) => n - 1
105
+ }),
106
+ month: r({
107
+ values: s,
108
+ defaultWidth: "wide"
109
+ }),
110
+ day: r({
111
+ values: u,
112
+ defaultWidth: "wide"
113
+ }),
114
+ dayPeriod: r({
115
+ values: l,
116
+ defaultWidth: "wide"
117
+ })
118
+ };
119
+ export {
120
+ M as localize
121
+ };
@@ -0,0 +1,110 @@
1
+ import { buildMatchFn as a } from "../../_lib/buildMatchFn.js";
2
+ import { buildMatchPatternFn as t } from "../../_lib/buildMatchPatternFn.js";
3
+ const e = /^(\d+)(ième|ère|ème|er|e)?/i, r = /\d+/i, n = {
4
+ narrow: /^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,
5
+ abbreviated: /^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,
6
+ wide: /^(avant Jésus-Christ|après Jésus-Christ)/i
7
+ }, s = {
8
+ any: [/^av/i, /^ap/i]
9
+ }, d = {
10
+ narrow: /^T?[1234]/i,
11
+ abbreviated: /^[1234](er|ème|e)? trim\.?/i,
12
+ wide: /^[1234](er|ème|e)? trimestre/i
13
+ }, m = {
14
+ any: [/1/i, /2/i, /3/i, /4/i]
15
+ }, o = {
16
+ narrow: /^[jfmasond]/i,
17
+ abbreviated: /^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,
18
+ wide: /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i
19
+ }, c = {
20
+ narrow: [
21
+ /^j/i,
22
+ /^f/i,
23
+ /^m/i,
24
+ /^a/i,
25
+ /^m/i,
26
+ /^j/i,
27
+ /^j/i,
28
+ /^a/i,
29
+ /^s/i,
30
+ /^o/i,
31
+ /^n/i,
32
+ /^d/i
33
+ ],
34
+ any: [
35
+ /^ja/i,
36
+ /^f/i,
37
+ /^mar/i,
38
+ /^av/i,
39
+ /^ma/i,
40
+ /^juin/i,
41
+ /^juil/i,
42
+ /^ao/i,
43
+ /^s/i,
44
+ /^o/i,
45
+ /^n/i,
46
+ /^d/i
47
+ ]
48
+ }, u = {
49
+ narrow: /^[lmjvsd]/i,
50
+ short: /^(di|lu|ma|me|je|ve|sa)/i,
51
+ abbreviated: /^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,
52
+ wide: /^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i
53
+ }, h = {
54
+ narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i],
55
+ any: [/^di/i, /^lu/i, /^ma/i, /^me/i, /^je/i, /^ve/i, /^sa/i]
56
+ }, l = {
57
+ narrow: /^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,
58
+ any: /^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i
59
+ }, P = {
60
+ any: {
61
+ am: /^a/i,
62
+ pm: /^p/i,
63
+ midnight: /^min/i,
64
+ noon: /^mid/i,
65
+ morning: /mat/i,
66
+ afternoon: /ap/i,
67
+ evening: /soir/i,
68
+ night: /nuit/i
69
+ }
70
+ }, j = {
71
+ ordinalNumber: t({
72
+ matchPattern: e,
73
+ parsePattern: r,
74
+ valueCallback: (i) => parseInt(i)
75
+ }),
76
+ era: a({
77
+ matchPatterns: n,
78
+ defaultMatchWidth: "wide",
79
+ parsePatterns: s,
80
+ defaultParseWidth: "any"
81
+ }),
82
+ quarter: a({
83
+ matchPatterns: d,
84
+ defaultMatchWidth: "wide",
85
+ parsePatterns: m,
86
+ defaultParseWidth: "any",
87
+ valueCallback: (i) => i + 1
88
+ }),
89
+ month: a({
90
+ matchPatterns: o,
91
+ defaultMatchWidth: "wide",
92
+ parsePatterns: c,
93
+ defaultParseWidth: "any"
94
+ }),
95
+ day: a({
96
+ matchPatterns: u,
97
+ defaultMatchWidth: "wide",
98
+ parsePatterns: h,
99
+ defaultParseWidth: "any"
100
+ }),
101
+ dayPeriod: a({
102
+ matchPatterns: l,
103
+ defaultMatchWidth: "any",
104
+ parsePatterns: P,
105
+ defaultParseWidth: "any"
106
+ })
107
+ };
108
+ export {
109
+ j as match
110
+ };
@@ -0,0 +1,21 @@
1
+ import { formatDistance as o } from "./fr/_lib/formatDistance.js";
2
+ import { formatLong as t } from "./fr/_lib/formatLong.js";
3
+ import { formatRelative as r } from "./fr/_lib/formatRelative.js";
4
+ import { localize as a } from "./fr/_lib/localize.js";
5
+ import { match as m } from "./fr/_lib/match.js";
6
+ const s = {
7
+ code: "fr",
8
+ formatDistance: o,
9
+ formatLong: t,
10
+ formatRelative: r,
11
+ localize: a,
12
+ match: m,
13
+ options: {
14
+ weekStartsOn: 1,
15
+ firstWeekContainsDate: 4
16
+ }
17
+ };
18
+ export {
19
+ s as default,
20
+ s as fr
21
+ };
@@ -0,0 +1,70 @@
1
+ const a = {
2
+ lessThanXSeconds: {
3
+ one: "minder dan een seconde",
4
+ other: "minder dan {{count}} seconden"
5
+ },
6
+ xSeconds: {
7
+ one: "1 seconde",
8
+ other: "{{count}} seconden"
9
+ },
10
+ halfAMinute: "een halve minuut",
11
+ lessThanXMinutes: {
12
+ one: "minder dan een minuut",
13
+ other: "minder dan {{count}} minuten"
14
+ },
15
+ xMinutes: {
16
+ one: "een minuut",
17
+ other: "{{count}} minuten"
18
+ },
19
+ aboutXHours: {
20
+ one: "ongeveer 1 uur",
21
+ other: "ongeveer {{count}} uur"
22
+ },
23
+ xHours: {
24
+ one: "1 uur",
25
+ other: "{{count}} uur"
26
+ },
27
+ xDays: {
28
+ one: "1 dag",
29
+ other: "{{count}} dagen"
30
+ },
31
+ aboutXWeeks: {
32
+ one: "ongeveer 1 week",
33
+ other: "ongeveer {{count}} weken"
34
+ },
35
+ xWeeks: {
36
+ one: "1 week",
37
+ other: "{{count}} weken"
38
+ },
39
+ aboutXMonths: {
40
+ one: "ongeveer 1 maand",
41
+ other: "ongeveer {{count}} maanden"
42
+ },
43
+ xMonths: {
44
+ one: "1 maand",
45
+ other: "{{count}} maanden"
46
+ },
47
+ aboutXYears: {
48
+ one: "ongeveer 1 jaar",
49
+ other: "ongeveer {{count}} jaar"
50
+ },
51
+ xYears: {
52
+ one: "1 jaar",
53
+ other: "{{count}} jaar"
54
+ },
55
+ overXYears: {
56
+ one: "meer dan 1 jaar",
57
+ other: "meer dan {{count}} jaar"
58
+ },
59
+ almostXYears: {
60
+ one: "bijna 1 jaar",
61
+ other: "bijna {{count}} jaar"
62
+ }
63
+ }, u = (t, r, o) => {
64
+ let e;
65
+ const n = a[t];
66
+ return typeof n == "string" ? e = n : r === 1 ? e = n.one : e = n.other.replace("{{count}}", String(r)), o?.addSuffix ? o.comparison && o.comparison > 0 ? "over " + e : e + " geleden" : e;
67
+ };
68
+ export {
69
+ u as formatDistance
70
+ };
@@ -0,0 +1,33 @@
1
+ import { buildFormatLongFn as t } from "../../_lib/buildFormatLongFn.js";
2
+ const m = {
3
+ full: "EEEE d MMMM y",
4
+ long: "d MMMM y",
5
+ medium: "d MMM y",
6
+ short: "dd.MM.y"
7
+ }, o = {
8
+ full: "HH:mm:ss zzzz",
9
+ long: "HH:mm:ss z",
10
+ medium: "HH:mm:ss",
11
+ short: "HH:mm"
12
+ }, d = {
13
+ full: "{{date}} 'om' {{time}}",
14
+ long: "{{date}} 'om' {{time}}",
15
+ medium: "{{date}}, {{time}}",
16
+ short: "{{date}}, {{time}}"
17
+ }, a = {
18
+ date: t({
19
+ formats: m,
20
+ defaultWidth: "full"
21
+ }),
22
+ time: t({
23
+ formats: o,
24
+ defaultWidth: "full"
25
+ }),
26
+ dateTime: t({
27
+ formats: d,
28
+ defaultWidth: "full"
29
+ })
30
+ };
31
+ export {
32
+ a as formatLong
33
+ };
@@ -0,0 +1,11 @@
1
+ const o = {
2
+ lastWeek: "'vorige' eeee 'om' p",
3
+ yesterday: "'gisteren om' p",
4
+ today: "'vandaag om' p",
5
+ tomorrow: "'morgen om' p",
6
+ nextWeek: "eeee 'om' p",
7
+ other: "P"
8
+ }, m = (e, t, a, r) => o[e];
9
+ export {
10
+ m as formatRelative
11
+ };
@@ -0,0 +1,110 @@
1
+ import { buildLocalizeFn as a } from "../../_lib/buildLocalizeFn.js";
2
+ const n = {
3
+ narrow: ["v.C.", "n.C."],
4
+ abbreviated: ["v.Chr.", "n.Chr."],
5
+ wide: ["voor Christus", "na Christus"]
6
+ }, d = {
7
+ narrow: ["1", "2", "3", "4"],
8
+ abbreviated: ["K1", "K2", "K3", "K4"],
9
+ wide: ["1e kwartaal", "2e kwartaal", "3e kwartaal", "4e kwartaal"]
10
+ }, r = {
11
+ narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
12
+ abbreviated: [
13
+ "jan.",
14
+ "feb.",
15
+ "mrt.",
16
+ "apr.",
17
+ "mei",
18
+ "jun.",
19
+ "jul.",
20
+ "aug.",
21
+ "sep.",
22
+ "okt.",
23
+ "nov.",
24
+ "dec."
25
+ ],
26
+ wide: [
27
+ "januari",
28
+ "februari",
29
+ "maart",
30
+ "april",
31
+ "mei",
32
+ "juni",
33
+ "juli",
34
+ "augustus",
35
+ "september",
36
+ "oktober",
37
+ "november",
38
+ "december"
39
+ ]
40
+ }, t = {
41
+ narrow: ["Z", "M", "D", "W", "D", "V", "Z"],
42
+ short: ["zo", "ma", "di", "wo", "do", "vr", "za"],
43
+ abbreviated: ["zon", "maa", "din", "woe", "don", "vri", "zat"],
44
+ wide: [
45
+ "zondag",
46
+ "maandag",
47
+ "dinsdag",
48
+ "woensdag",
49
+ "donderdag",
50
+ "vrijdag",
51
+ "zaterdag"
52
+ ]
53
+ }, i = {
54
+ narrow: {
55
+ am: "AM",
56
+ pm: "PM",
57
+ midnight: "middernacht",
58
+ noon: "het middag",
59
+ morning: "'s ochtends",
60
+ afternoon: "'s namiddags",
61
+ evening: "'s avonds",
62
+ night: "'s nachts"
63
+ },
64
+ abbreviated: {
65
+ am: "AM",
66
+ pm: "PM",
67
+ midnight: "middernacht",
68
+ noon: "het middag",
69
+ morning: "'s ochtends",
70
+ afternoon: "'s namiddags",
71
+ evening: "'s avonds",
72
+ night: "'s nachts"
73
+ },
74
+ wide: {
75
+ am: "AM",
76
+ pm: "PM",
77
+ midnight: "middernacht",
78
+ noon: "het middag",
79
+ morning: "'s ochtends",
80
+ afternoon: "'s namiddags",
81
+ evening: "'s avonds",
82
+ night: "'s nachts"
83
+ }
84
+ }, o = (e, s) => Number(e) + "e", h = {
85
+ ordinalNumber: o,
86
+ era: a({
87
+ values: n,
88
+ defaultWidth: "wide"
89
+ }),
90
+ quarter: a({
91
+ values: d,
92
+ defaultWidth: "wide",
93
+ argumentCallback: (e) => e - 1
94
+ }),
95
+ month: a({
96
+ values: r,
97
+ defaultWidth: "wide"
98
+ }),
99
+ day: a({
100
+ values: t,
101
+ defaultWidth: "wide"
102
+ }),
103
+ dayPeriod: a({
104
+ values: i,
105
+ defaultWidth: "wide"
106
+ })
107
+ };
108
+ export {
109
+ h as localize
110
+ };
@@ -0,0 +1,109 @@
1
+ import { buildMatchFn as a } from "../../_lib/buildMatchFn.js";
2
+ import { buildMatchPatternFn as i } from "../../_lib/buildMatchPatternFn.js";
3
+ const e = /^(\d+)e?/i, r = /\d+/i, n = {
4
+ narrow: /^([vn]\.? ?C\.?)/,
5
+ abbreviated: /^([vn]\. ?Chr\.?)/,
6
+ wide: /^((voor|na) Christus)/
7
+ }, d = {
8
+ any: [/^v/, /^n/]
9
+ }, s = {
10
+ narrow: /^[1234]/i,
11
+ abbreviated: /^K[1234]/i,
12
+ wide: /^[1234]e kwartaal/i
13
+ }, o = {
14
+ any: [/1/i, /2/i, /3/i, /4/i]
15
+ }, m = {
16
+ narrow: /^[jfmasond]/i,
17
+ abbreviated: /^(jan.|feb.|mrt.|apr.|mei|jun.|jul.|aug.|sep.|okt.|nov.|dec.)/i,
18
+ wide: /^(januari|februari|maart|april|mei|juni|juli|augustus|september|oktober|november|december)/i
19
+ }, h = {
20
+ narrow: [
21
+ /^j/i,
22
+ /^f/i,
23
+ /^m/i,
24
+ /^a/i,
25
+ /^m/i,
26
+ /^j/i,
27
+ /^j/i,
28
+ /^a/i,
29
+ /^s/i,
30
+ /^o/i,
31
+ /^n/i,
32
+ /^d/i
33
+ ],
34
+ any: [
35
+ /^jan/i,
36
+ /^feb/i,
37
+ /^m(r|a)/i,
38
+ /^apr/i,
39
+ /^mei/i,
40
+ /^jun/i,
41
+ /^jul/i,
42
+ /^aug/i,
43
+ /^sep/i,
44
+ /^okt/i,
45
+ /^nov/i,
46
+ /^dec/i
47
+ ]
48
+ }, c = {
49
+ narrow: /^[zmdwv]/i,
50
+ short: /^(zo|ma|di|wo|do|vr|za)/i,
51
+ abbreviated: /^(zon|maa|din|woe|don|vri|zat)/i,
52
+ wide: /^(zondag|maandag|dinsdag|woensdag|donderdag|vrijdag|zaterdag)/i
53
+ }, u = {
54
+ narrow: [/^z/i, /^m/i, /^d/i, /^w/i, /^d/i, /^v/i, /^z/i],
55
+ any: [/^zo/i, /^ma/i, /^di/i, /^wo/i, /^do/i, /^vr/i, /^za/i]
56
+ }, P = {
57
+ any: /^(am|pm|middernacht|het middaguur|'s (ochtends|middags|avonds|nachts))/i
58
+ }, l = {
59
+ any: {
60
+ am: /^am/i,
61
+ pm: /^pm/i,
62
+ midnight: /^middernacht/i,
63
+ noon: /^het middaguur/i,
64
+ morning: /ochtend/i,
65
+ afternoon: /middag/i,
66
+ evening: /avond/i,
67
+ night: /nacht/i
68
+ }
69
+ }, v = {
70
+ ordinalNumber: i({
71
+ matchPattern: e,
72
+ parsePattern: r,
73
+ valueCallback: (t) => parseInt(t, 10)
74
+ }),
75
+ era: a({
76
+ matchPatterns: n,
77
+ defaultMatchWidth: "wide",
78
+ parsePatterns: d,
79
+ defaultParseWidth: "any"
80
+ }),
81
+ quarter: a({
82
+ matchPatterns: s,
83
+ defaultMatchWidth: "wide",
84
+ parsePatterns: o,
85
+ defaultParseWidth: "any",
86
+ valueCallback: (t) => t + 1
87
+ }),
88
+ month: a({
89
+ matchPatterns: m,
90
+ defaultMatchWidth: "wide",
91
+ parsePatterns: h,
92
+ defaultParseWidth: "any"
93
+ }),
94
+ day: a({
95
+ matchPatterns: c,
96
+ defaultMatchWidth: "wide",
97
+ parsePatterns: u,
98
+ defaultParseWidth: "any"
99
+ }),
100
+ dayPeriod: a({
101
+ matchPatterns: P,
102
+ defaultMatchWidth: "any",
103
+ parsePatterns: l,
104
+ defaultParseWidth: "any"
105
+ })
106
+ };
107
+ export {
108
+ v as match
109
+ };
@@ -0,0 +1,21 @@
1
+ import { formatDistance as o } from "./nl-BE/_lib/formatDistance.js";
2
+ import { formatLong as t } from "./nl-BE/_lib/formatLong.js";
3
+ import { formatRelative as a } from "./nl-BE/_lib/formatRelative.js";
4
+ import { localize as r } from "./nl-BE/_lib/localize.js";
5
+ import { match as m } from "./nl-BE/_lib/match.js";
6
+ const c = {
7
+ code: "nl-BE",
8
+ formatDistance: o,
9
+ formatLong: t,
10
+ formatRelative: a,
11
+ localize: r,
12
+ match: m,
13
+ options: {
14
+ weekStartsOn: 1,
15
+ firstWeekContainsDate: 4
16
+ }
17
+ };
18
+ export {
19
+ c as default,
20
+ c as nlBE
21
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caspeco/casper-ui-library",
3
- "version": "7.1.0",
3
+ "version": "7.2.0",
4
4
  "prettier": "@caspeco/prettier-config",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -35,19 +35,19 @@
35
35
  "@testing-library/react": "^16.3.0",
36
36
  "@testing-library/user-event": "^14.6.1",
37
37
  "@types/jest": "^30.0.0",
38
- "@types/node": "^24.8.1",
38
+ "@types/node": "^24.9.1",
39
39
  "@types/react": "^18.3.12",
40
40
  "@types/react-dom": "^18.3.1",
41
- "@vitejs/plugin-react-swc": "^4.1.0",
41
+ "@vitejs/plugin-react-swc": "^4.2.0",
42
42
  "eslint": "^9.38.0",
43
- "eslint-plugin-react-hooks": "^7.0.0",
43
+ "eslint-plugin-react-hooks": "^7.0.1",
44
44
  "eslint-plugin-react-refresh": "^0.4.24",
45
45
  "globals": "^16.4.0",
46
46
  "jsdom": "^27.0.1",
47
47
  "tsc-alias": "^1.8.16",
48
48
  "typescript": "~5.9.3",
49
- "typescript-eslint": "^8.46.1",
50
- "vite": "^7.1.11",
49
+ "typescript-eslint": "^8.46.2",
50
+ "vite": "^7.1.12",
51
51
  "vite-plugin-dts": "^4.5.4",
52
52
  "vite-tsconfig-paths": "^5.1.4",
53
53
  "vitest": "^3.2.4"