welcome-ui 10.6.8 → 10.6.9

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,64 +1,64 @@
1
1
  "use client";
2
2
  import './DatePicker.css';
3
- import { jsxs as G, jsx as l } from "react/jsx-runtime";
3
+ import { jsxs as G, jsx as i } from "react/jsx-runtime";
4
4
  import { useState as A, useMemo as $, useEffect as S, forwardRef as J, useRef as Q } from "react";
5
- import { D as V, C as W } from "./CustomPopper-DWdMQOgg.js";
5
+ import { D as V, C as W } from "./CustomPopper-PWIRxhgV.js";
6
6
  import { Button as j } from "./Button.js";
7
7
  import { Icon as F } from "./Icon.js";
8
8
  import { Select as M } from "./Select.js";
9
9
  import { c as v } from "./index-B6iGEm-i.js";
10
- import { g as X, a as Z, s as B, D as P, b as Y } from "./utils-ZE_dEXnJ.js";
10
+ import { g as X, a as Z, s as B, D as P, b as Y } from "./utils-Cf0NRrqX.js";
11
11
  import { InputText as g } from "./InputText.js";
12
12
  const C = v(B), L = ({
13
13
  changeMonth: x,
14
14
  changeYear: N,
15
15
  date: f,
16
16
  decreaseMonth: T,
17
- decreaseYear: z,
18
- endYear: m,
19
- increaseMonth: I,
17
+ decreaseYear: k,
18
+ endYear: c,
19
+ increaseMonth: z,
20
20
  increaseYear: y,
21
21
  isMonthYearPicker: t,
22
22
  locale: D,
23
- startYear: c
23
+ startYear: m
24
24
  }) => {
25
- const [p, R] = A(null), [a, k] = A(null), i = $(() => X(D), [D]), r = $(() => Z(c, m), [c, m]), o = (t || p === i[0].label) && a === c, w = (t || p === i[i.length - 1].label) && a === m;
25
+ const [p, I] = A(null), [a, R] = A(null), l = $(() => X(D), [D]), r = $(() => Z(m, c), [m, c]), o = (t || p === l[0].label) && a === m, w = (t || p === l[l.length - 1].label) && a === c;
26
26
  return S(() => {
27
- const b = new Date(f), u = i[b.getMonth()].label, E = b.getFullYear();
28
- R(u), k(E);
29
- }, [f, i]), /* @__PURE__ */ G("div", { className: C("custom-header"), children: [
30
- /* @__PURE__ */ l(
27
+ const b = new Date(f), u = l[b.getMonth()].label, E = b.getFullYear();
28
+ I(u), R(E);
29
+ }, [f, l]), /* @__PURE__ */ G("div", { className: C("custom-header"), children: [
30
+ /* @__PURE__ */ i(
31
31
  j,
32
32
  {
33
33
  disabled: o,
34
- onClick: t ? z : T,
34
+ onClick: t ? k : T,
35
35
  size: "sm",
36
36
  title: `Previous ${t ? "year" : "month"}`,
37
37
  variant: "tertiary",
38
- children: /* @__PURE__ */ l(F, { name: "angle-left-b", size: "xs" })
38
+ children: /* @__PURE__ */ i(F, { name: "angle-left-b", size: "xs" })
39
39
  }
40
40
  ),
41
- !t && /* @__PURE__ */ l(
41
+ !t && /* @__PURE__ */ i(
42
42
  M,
43
43
  {
44
44
  id: "month",
45
45
  name: "month",
46
46
  onChange: x,
47
- options: i,
47
+ options: l,
48
48
  size: "md",
49
49
  value: p
50
50
  }
51
51
  ),
52
- /* @__PURE__ */ l(M, { id: "year", name: "year", onChange: N, options: r, size: "md", value: a }),
53
- /* @__PURE__ */ l(
52
+ /* @__PURE__ */ i(M, { id: "year", name: "year", onChange: N, options: r, size: "md", value: a }),
53
+ /* @__PURE__ */ i(
54
54
  j,
55
55
  {
56
56
  disabled: w,
57
- onClick: t ? y : I,
57
+ onClick: t ? y : z,
58
58
  size: "sm",
59
59
  title: `Next ${t ? "year" : "month"}`,
60
60
  variant: "tertiary",
61
- children: /* @__PURE__ */ l(F, { name: "angle-right-b", size: "xs" })
61
+ children: /* @__PURE__ */ i(F, { name: "angle-right-b", size: "xs" })
62
62
  }
63
63
  )
64
64
  ] });
@@ -70,18 +70,18 @@ const K = v(B), h = J(
70
70
  className: N,
71
71
  dateFormat: f = "dd/MM/yyyy",
72
72
  disabled: T,
73
- endYear: z = P.getFullYear(),
74
- icon: m,
75
- iconPlacement: I = "left",
73
+ endYear: k = P.getFullYear(),
74
+ icon: c,
75
+ iconPlacement: z = "left",
76
76
  locale: y,
77
77
  onChange: t,
78
78
  placeholder: D,
79
- preventVirtualKeyboard: c = !1,
79
+ preventVirtualKeyboard: m = !1,
80
80
  showMonthYearPicker: p,
81
- size: R = "md",
81
+ size: I = "md",
82
82
  startYear: a = 1900,
83
- transparent: k,
84
- useWeekdaysShort: i = !0,
83
+ transparent: R,
84
+ useWeekdaysShort: l = !0,
85
85
  value: r = P,
86
86
  ...o
87
87
  }, w) => {
@@ -116,27 +116,27 @@ const K = v(B), h = J(
116
116
  // type issue in react-datepicker (https://github.com/Hacker0x01/react-datepicker/issues/5391)
117
117
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
118
118
  // @ts-expect-error
119
- /* @__PURE__ */ l(
119
+ /* @__PURE__ */ i(
120
120
  V,
121
121
  {
122
122
  autoComplete: "off",
123
123
  calendarClassName: "date-picker-popper",
124
- customInput: /* @__PURE__ */ l(
124
+ customInput: /* @__PURE__ */ i(
125
125
  g,
126
126
  {
127
127
  autoFocus: x,
128
128
  className: K("date-picker", N),
129
129
  "data-testid": o["data-testid"],
130
130
  disabled: T,
131
- icon: m,
132
- iconPlacement: I,
133
- inputMode: c ? "none" : "text",
131
+ icon: c,
132
+ iconPlacement: z,
133
+ inputMode: m ? "none" : "text",
134
134
  isClearable: !0,
135
135
  onReset: _,
136
136
  placeholder: D,
137
137
  ref: H,
138
- size: R,
139
- transparent: k
138
+ size: I,
139
+ transparent: R
140
140
  }
141
141
  ),
142
142
  dateFormat: f,
@@ -144,10 +144,10 @@ const K = v(B), h = J(
144
144
  onChange: q,
145
145
  onKeyDown: U,
146
146
  popperContainer: W,
147
- renderCustomHeader: (e) => /* @__PURE__ */ l(
147
+ renderCustomHeader: (e) => /* @__PURE__ */ i(
148
148
  L,
149
149
  {
150
- endYear: z,
150
+ endYear: k,
151
151
  isMonthYearPicker: p,
152
152
  locale: y,
153
153
  startYear: a,
@@ -156,9 +156,14 @@ const K = v(B), h = J(
156
156
  ),
157
157
  selected: E,
158
158
  showMonthYearPicker: p,
159
- useWeekdaysShort: i,
159
+ useWeekdaysShort: l,
160
160
  ...o,
161
- wrapperClassName: K(o.wrapperClassName, "date-picker-wrapper", "field-input")
161
+ wrapperClassName: K(
162
+ "picker-input-root",
163
+ "date-picker-wrapper",
164
+ "field-input",
165
+ o.wrapperClassName
166
+ )
162
167
  }
163
168
  )
164
169
  );
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as A } from "react/jsx-runtime";
3
3
  import { forwardRef as E, useState as P, useRef as x, useEffect as a, Children as N, cloneElement as H } from "react";
4
- import { D as I, b, s as j } from "./utils-ZE_dEXnJ.js";
4
+ import { D as I, b, s as j } from "./utils-Cf0NRrqX.js";
5
5
  import { c as F } from "./index-B6iGEm-i.js";
6
6
  const L = F(j), M = E(
7
7
  ({
package/dist/Field.css CHANGED
@@ -1 +1 @@
1
- @layer components{._root_13hug_2{display:grid;grid-template-areas:"label" "input";width:100%;height:fit-content}._root_13hug_2:has(._label_13hug_8):has(._hint_13hug_8){grid-template-areas:"label" "input" "hint"}._root_13hug_2:not(:has(._label_13hug_8)):has(._hint_13hug_8){grid-template-areas:"input" "hint"}._root_13hug_2:not(._inline_13hug_14) ._hint_13hug_8{margin-top:var(--field-gap-assistive)}._root_13hug_2:not(._inline_13hug_14) ._label_13hug_8{margin-bottom:var(--field-gap-label)}._root_13hug_2 .field-input{align-self:center;grid-area:input}._root_13hug_2 .field-input.date-picker-wrapper{justify-self:start}._inline_13hug_14{grid-template-areas:"input label";grid-template-columns:min-content 1fr;height:fit-content;grid-row-gap:var(--field-gap-assistive);grid-column-gap:var(--field-gap-label)}._inline_13hug_14:has(._label_13hug_8):has(._hint_13hug_8){grid-template-areas:"input label" ". hint"}._inline_13hug_14:not(:has(._label_13hug_8)):has(._hint_13hug_8){grid-template-areas:"input ." ". hint"}._label_13hug_8{grid-area:label}._hint_13hug_8{grid-area:hint;display:flex;gap:var(--field-gap-label)}._hint-max-length_13hug_48{margin-left:auto}._visuallyHidden_13hug_51{border:0!important;clip:rect(0 0 0 0)!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important;white-space:nowrap!important}}
1
+ @layer components{._root_bk683_2{display:grid;grid-template-areas:"label" "input";width:100%;height:fit-content}._root_bk683_2:has(._label_bk683_8):has(._hint_bk683_8){grid-template-areas:"label" "input" "hint"}._root_bk683_2:not(:has(._label_bk683_8)):has(._hint_bk683_8){grid-template-areas:"input" "hint"}._root_bk683_2:not(._inline_bk683_14) ._hint_bk683_8{margin-top:var(--field-gap-assistive)}._root_bk683_2:not(._inline_bk683_14) ._label_bk683_8{margin-bottom:var(--field-gap-label)}._root_bk683_2 .field-input{align-self:center;grid-area:input}._root_bk683_2 .field-input.date-picker-wrapper,._root_bk683_2 .field-input.time-picker-wrapper{justify-self:start}._inline_bk683_14{grid-template-areas:"input label";grid-template-columns:min-content 1fr;height:fit-content;grid-row-gap:var(--field-gap-assistive);grid-column-gap:var(--field-gap-label)}._inline_bk683_14:has(._label_bk683_8):has(._hint_bk683_8){grid-template-areas:"input label" ". hint"}._inline_bk683_14:not(:has(._label_bk683_8)):has(._hint_bk683_8){grid-template-areas:"input ." ". hint"}._label_bk683_8{grid-area:label}._hint_bk683_8{grid-area:hint;display:flex;gap:var(--field-gap-label)}._hint-max-length_bk683_48{margin-left:auto}._visuallyHidden_bk683_51{border:0!important;clip:rect(0 0 0 0)!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important;white-space:nowrap!important}}
package/dist/Field.js CHANGED
@@ -1,89 +1,89 @@
1
1
  "use client";
2
2
  import './Field.css';
3
- import { jsxs as y, jsx as f } from "react/jsx-runtime";
4
- import { createContext as $, useMemo as q, useId as A, useContext as R } from "react";
5
- import { Hint as S } from "./Hint.js";
6
- import { Label as T } from "./Label.js";
7
- import { c as W } from "./index-B6iGEm-i.js";
8
- import { f as k } from "./forwardRefWithAs-8eP3ZN15.js";
9
- const z = "_root_13hug_2", E = "_label_13hug_8", G = "_hint_13hug_8", J = "_inline_13hug_14", K = "_visuallyHidden_13hug_51", O = {
3
+ import { jsxs as I, jsx as f } from "react/jsx-runtime";
4
+ import { createContext as M, useMemo as $, useId as q, useContext as A } from "react";
5
+ import { Hint as R } from "./Hint.js";
6
+ import { Label as S } from "./Label.js";
7
+ import { c as T } from "./index-B6iGEm-i.js";
8
+ import { f as W } from "./forwardRefWithAs-8eP3ZN15.js";
9
+ const z = "_root_bk683_2", E = "_label_bk683_8", G = "_hint_bk683_8", J = "_inline_bk683_14", K = "_visuallyHidden_bk683_51", O = {
10
10
  root: z,
11
11
  label: E,
12
12
  hint: G,
13
13
  inline: J,
14
- "hint-max-length": "_hint-max-length_13hug_48",
14
+ "hint-max-length": "_hint-max-length_bk683_48",
15
15
  visuallyHidden: K
16
- }, d = W(O), I = $({
16
+ }, d = T(O), N = M({
17
17
  getInputProps: (n) => n,
18
18
  hintID: "",
19
19
  labelID: "",
20
20
  variant: void 0
21
21
  });
22
22
  function _(n) {
23
- const c = A();
23
+ const c = q();
24
24
  return n || c;
25
25
  }
26
26
  function ee() {
27
- return R(I);
27
+ return A(N);
28
28
  }
29
- const Q = k((n, c) => {
29
+ const Q = W((n, c) => {
30
30
  const {
31
- children: N,
31
+ children: g,
32
32
  className: p,
33
- disabled: u,
34
- error: g,
33
+ disabled: m,
34
+ error: v,
35
35
  hideLabel: D,
36
36
  hint: F,
37
37
  hintProps: l,
38
- id: H,
39
- inline: j,
40
- label: B,
38
+ id: k,
39
+ inline: H,
40
+ label: j,
41
41
  labelProps: i,
42
42
  maxLength: e,
43
- required: m,
44
- success: v,
45
- warning: x,
46
- ...C
47
- } = n, t = g ? "danger" : v ? "success" : x ? "warning" : void 0, s = g ?? x ?? v ?? F, a = e ? `${new Intl.NumberFormat().format(e.count)} / ${new Intl.NumberFormat().format(e.max)}` : void 0, r = _(i == null ? void 0 : i.id), o = _(l == null ? void 0 : l.id), h = _(H), w = q(
43
+ required: u,
44
+ success: x,
45
+ warning: y,
46
+ ...B
47
+ } = n, t = v ? "danger" : x ? "success" : y ? "warning" : void 0, s = v ?? y ?? x ?? F, a = e ? `${new Intl.NumberFormat().format(e.count)} / ${new Intl.NumberFormat().format(e.max)}` : void 0, r = _(i == null ? void 0 : i.id), o = _(l == null ? void 0 : l.id), b = _(k), C = $(
48
48
  () => ({
49
- getInputProps(b) {
50
- const L = [b["aria-describedby"], (s || a) && o].filter(Boolean).join(" ") || void 0, M = [b["aria-labelledby"], r].filter(Boolean).join(" ");
49
+ getInputProps(h) {
50
+ const w = [h["aria-describedby"], (s || a) && o].filter(Boolean).join(" ") || void 0, L = [h["aria-labelledby"], r].filter(Boolean).join(" ");
51
51
  return {
52
- ...b,
53
- "aria-describedby": L,
52
+ ...h,
53
+ "aria-describedby": w,
54
54
  "aria-invalid": t === "danger" ? !0 : void 0,
55
- "aria-labelledby": M,
56
- disabled: u,
57
- id: h,
55
+ "aria-labelledby": L,
56
+ disabled: m,
57
+ id: b,
58
58
  /**
59
59
  * pass maxCount to children for block form
60
60
  */
61
61
  maxLength: e == null ? void 0 : e.max,
62
- required: m
62
+ required: u
63
63
  };
64
64
  },
65
65
  hintID: o,
66
66
  labelID: r,
67
67
  variant: t
68
68
  }),
69
- [o, r, t, s, a, u, h, e == null ? void 0 : e.max, m]
69
+ [o, r, t, s, a, m, b, e == null ? void 0 : e.max, u]
70
70
  );
71
- return /* @__PURE__ */ y("div", { ref: c, ...C, className: d("root", j && "inline", p), children: [
71
+ return /* @__PURE__ */ I("div", { ref: c, ...B, className: d("root", H && "inline", p), children: [
72
72
  /* @__PURE__ */ f(
73
- T,
73
+ S,
74
74
  {
75
- disabled: u,
76
- htmlFor: h,
75
+ disabled: m,
76
+ htmlFor: b,
77
77
  id: r,
78
- required: m,
78
+ required: u,
79
79
  variant: t,
80
80
  ...i,
81
81
  className: d("label", D && "visuallyHidden", i == null ? void 0 : i.className),
82
- children: B
82
+ children: j
83
83
  }
84
84
  ),
85
- /* @__PURE__ */ f(I.Provider, { value: w, children: N }),
86
- s || a ? /* @__PURE__ */ y(S, { className: d("hint"), id: o, variant: t, ...l, children: [
85
+ /* @__PURE__ */ f(N.Provider, { value: C, children: g }),
86
+ s || a ? /* @__PURE__ */ I(R, { className: d("hint"), id: o, variant: t, ...l, children: [
87
87
  s,
88
88
  a ? /* @__PURE__ */ f("span", { className: d("hint-max-length"), children: a }) : null
89
89
  ] }) : null
@@ -92,7 +92,7 @@ const Q = k((n, c) => {
92
92
  Q.displayName = "Field";
93
93
  export {
94
94
  Q as Field,
95
- I as FieldContext,
95
+ N as FieldContext,
96
96
  O as fieldClasses,
97
97
  _ as useDefaultID,
98
98
  ee as useField
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { jsx as f } from "react/jsx-runtime";
3
3
  import { forwardRef as S, useState as j, useRef as F, useEffect as d } from "react";
4
- import { D as I, C as L } from "./CustomPopper-DWdMQOgg.js";
5
- import { D as M, b as O, s as U } from "./utils-ZE_dEXnJ.js";
4
+ import { D as I, C as L } from "./CustomPopper-PWIRxhgV.js";
5
+ import { D as M, b as O, s as U } from "./utils-Cf0NRrqX.js";
6
6
  import { InputText as _ } from "./InputText.js";
7
7
  import { c as q } from "./index-B6iGEm-i.js";
8
8
  const a = q(U), z = S(
@@ -16,34 +16,34 @@ const a = q(U), z = S(
16
16
  onChange: t,
17
17
  placeholder: w,
18
18
  size: x = "md",
19
- timeIntervals: m = 15,
19
+ timeIntervals: p = 15,
20
20
  transparent: y,
21
21
  value: r = M,
22
22
  ...c
23
- }, p) => {
24
- const i = (e) => O(e, m), [A, l] = j(i(r)), H = F(), P = p || H;
23
+ }, m) => {
24
+ const l = (e) => O(e, p), [A, i] = j(l(r)), H = F(), P = m || H;
25
25
  d(() => {
26
- t == null || t(i(r));
26
+ t == null || t(l(r));
27
27
  }, []), d(() => {
28
28
  var s;
29
- const e = i(r);
30
- ((s = new Date(r)) == null ? void 0 : s.getTime()) - (e == null ? void 0 : e.getTime()) !== 0 && (t == null || t(e)), l(e);
29
+ const e = l(r);
30
+ ((s = new Date(r)) == null ? void 0 : s.getTime()) - (e == null ? void 0 : e.getTime()) !== 0 && (t == null || t(e)), i(e);
31
31
  }, [r]);
32
32
  const b = (e) => {
33
33
  var s;
34
- e.preventDefault(), (s = P.current) == null || s.blur(), l(null), t == null || t(null);
34
+ e.preventDefault(), (s = P.current) == null || s.blur(), i(null), t == null || t(null);
35
35
  }, E = (e) => {
36
36
  if (!e) {
37
- l(null), t == null || t(null);
37
+ i(null), t == null || t(null);
38
38
  return;
39
39
  }
40
40
  const s = Array.isArray(e) ? e[0] : e;
41
41
  if (!s) {
42
- l(null), t == null || t(null);
42
+ i(null), t == null || t(null);
43
43
  return;
44
44
  }
45
- const u = i(s);
46
- s.setHours(u.getHours(), u.getMinutes()), l(s), t == null || t(new Date(s));
45
+ const u = l(s);
46
+ s.setHours(u.getHours(), u.getMinutes()), i(s), t == null || t(new Date(s));
47
47
  };
48
48
  return (
49
49
  // type issue in react-datepicker (https://github.com/Hacker0x01/react-datepicker/issues/5391)
@@ -64,7 +64,7 @@ const a = q(U), z = S(
64
64
  iconPlacement: R,
65
65
  isClearable: !1,
66
66
  onReset: b,
67
- ref: p,
67
+ ref: m,
68
68
  size: x,
69
69
  transparent: y
70
70
  }
@@ -76,9 +76,14 @@ const a = q(U), z = S(
76
76
  selected: A,
77
77
  showTimeSelect: !0,
78
78
  showTimeSelectOnly: !0,
79
- timeIntervals: m,
79
+ timeIntervals: p,
80
80
  ...c,
81
- wrapperClassName: a(c.wrapperClassName, "date-picker-wrapper", "field-input")
81
+ wrapperClassName: a(
82
+ "picker-input-root",
83
+ "time-picker-wrapper",
84
+ "field-input",
85
+ c.wrapperClassName
86
+ )
82
87
  }
83
88
  )
84
89
  );
@@ -0,0 +1,120 @@
1
+ "use client";
2
+ import './utils.css';
3
+ import { g as J } from "./index-B6iGEm-i.js";
4
+ const Y = {
5
+ "custom-header": "_custom-header_1bmta_2",
6
+ "date-picker": "_date-picker_1bmta_10",
7
+ "time-picker": "_time-picker_1bmta_14",
8
+ "date-time-picker": "_date-time-picker_1bmta_18",
9
+ "picker-input-root": "_picker-input-root_1bmta_35",
10
+ "picker-popper-root": "_picker-popper-root_1bmta_39"
11
+ };
12
+ var u, l;
13
+ function H() {
14
+ if (l) return u;
15
+ l = 1;
16
+ var i = 1 / 0, o = 9007199254740991, a = 17976931348623157e292, c = NaN, _ = "[object Function]", y = "[object GeneratorFunction]", I = "[object Symbol]", h = /^\s+|\s+$/g, k = /^[-+]0x[0-9a-f]+$/i, M = /^0b[01]+$/i, T = /^0o[0-7]+$/i, D = /^(?:0|[1-9]\d*)$/, N = parseInt, d = Object.prototype, b = d.toString, A = Math.ceil, E = Math.max;
17
+ function F(r, e, t, n) {
18
+ for (var G = -1, m = E(A((e - r) / (t || 1)), 0), p = Array(m); m--; )
19
+ p[++G] = r, r += t;
20
+ return p;
21
+ }
22
+ function O(r) {
23
+ return function(e, t, n) {
24
+ return n && typeof n != "number" && j(e, t, n) && (t = n = void 0), e = s(e), t === void 0 ? (t = e, e = 0) : t = s(t), n = n === void 0 ? e < t ? 1 : -1 : s(n), F(e, t, n);
25
+ };
26
+ }
27
+ function S(r, e) {
28
+ return e = e ?? o, !!e && (typeof r == "number" || D.test(r)) && r > -1 && r % 1 == 0 && r < e;
29
+ }
30
+ function j(r, e, t) {
31
+ if (!f(t))
32
+ return !1;
33
+ var n = typeof e;
34
+ return (n == "number" ? R(t) && S(e, t.length) : n == "string" && e in t) ? x(t[e], r) : !1;
35
+ }
36
+ function x(r, e) {
37
+ return r === e || r !== r && e !== e;
38
+ }
39
+ function R(r) {
40
+ return r != null && L(r.length) && !w(r);
41
+ }
42
+ function w(r) {
43
+ var e = f(r) ? b.call(r) : "";
44
+ return e == _ || e == y;
45
+ }
46
+ function L(r) {
47
+ return typeof r == "number" && r > -1 && r % 1 == 0 && r <= o;
48
+ }
49
+ function f(r) {
50
+ var e = typeof r;
51
+ return !!r && (e == "object" || e == "function");
52
+ }
53
+ function $(r) {
54
+ return !!r && typeof r == "object";
55
+ }
56
+ function q(r) {
57
+ return typeof r == "symbol" || $(r) && b.call(r) == I;
58
+ }
59
+ function s(r) {
60
+ if (!r)
61
+ return r === 0 ? r : 0;
62
+ if (r = B(r), r === i || r === -i) {
63
+ var e = r < 0 ? -1 : 1;
64
+ return e * a;
65
+ }
66
+ return r === r ? r : 0;
67
+ }
68
+ function B(r) {
69
+ if (typeof r == "number")
70
+ return r;
71
+ if (q(r))
72
+ return c;
73
+ if (f(r)) {
74
+ var e = typeof r.valueOf == "function" ? r.valueOf() : r;
75
+ r = f(e) ? e + "" : e;
76
+ }
77
+ if (typeof r != "string")
78
+ return r === 0 ? r : +r;
79
+ r = r.replace(h, "");
80
+ var t = M.test(r);
81
+ return t || T.test(r) ? N(r.slice(2), t ? 2 : 8) : k.test(r) ? c : +r;
82
+ }
83
+ var C = O();
84
+ return u = C, u;
85
+ }
86
+ var P = H();
87
+ const U = /* @__PURE__ */ J(P), g = [
88
+ { label: "January", value: 0 },
89
+ { label: "February", value: 1 },
90
+ { label: "March", value: 2 },
91
+ { label: "April", value: 3 },
92
+ { label: "May", value: 4 },
93
+ { label: "June", value: 5 },
94
+ { label: "July", value: 6 },
95
+ { label: "August", value: 7 },
96
+ { label: "September", value: 8 },
97
+ { label: "October", value: 9 },
98
+ { label: "November", value: 10 },
99
+ { label: "December", value: 11 }
100
+ ], z = /* @__PURE__ */ new Date(), K = (i, o = 15) => {
101
+ if (!i)
102
+ return null;
103
+ let a = new Date(i);
104
+ isNaN(a.getTime()) && (a = /* @__PURE__ */ new Date());
105
+ const c = Math.ceil(a.getMinutes() / o) * o;
106
+ return new Date(a.setMinutes(c, 0, 0));
107
+ }, Q = (i) => i ? g.map(({ value: o }) => ({
108
+ label: i.localize.month(o),
109
+ value: o
110
+ })) : g, V = (i, o) => U(i, o + 1).map((a) => ({
111
+ label: a.toString(),
112
+ value: a
113
+ })).reverse();
114
+ export {
115
+ z as D,
116
+ V as a,
117
+ K as b,
118
+ Q as g,
119
+ Y as s
120
+ };
package/dist/utils.css CHANGED
@@ -1 +1 @@
1
- @layer components{._custom-header_1w74t_2{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--border-radius-xl);text-align:left}._date-picker_1w74t_9{text-align:left}._time-picker_1w74t_12{text-align:center}._date-time-picker_1w74t_15{position:relative;display:inline-flex;flex-wrap:nowrap}._date-time-picker_1w74t_15 div:first-child{margin-right:-1px}._date-time-picker_1w74t_15 ._date-picker_1w74t_9{border-top-right-radius:0;border-bottom-right-radius:0}._date-time-picker_1w74t_15 ._time-picker_1w74t_12{border-top-left-radius:0;border-bottom-left-radius:0}}
1
+ ._custom-header_1bmta_2{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--border-radius-xl);text-align:left}._date-picker_1bmta_10{text-align:left}._time-picker_1bmta_14{text-align:center}._date-time-picker_1bmta_18{position:relative;display:inline-flex;flex-wrap:nowrap}._date-time-picker_1bmta_18 div:first-child{margin-right:-1px}._date-time-picker_1bmta_18 ._date-picker_1bmta_10{border-top-right-radius:0;border-bottom-right-radius:0}._date-time-picker_1bmta_18 ._time-picker_1bmta_14{border-top-left-radius:0;border-bottom-left-radius:0}._picker-input-root_1bmta_35 .react-datepicker__input-container{display:block}._picker-popper-root_1bmta_39 .react-datepicker{padding:var(--border-radius-xl);font-family:inherit;font-size:var(--font-size-14);background-color:var(--color-background-neutral-inverse-fixed);border:var(--border-width-xs) solid var(--color-background-neutral-subtlest);border-radius:var(--border-radius-sm)}._picker-popper-root_1bmta_39 .react-datepicker--time-only{padding:0}._picker-popper-root_1bmta_39 .react-datepicker--time-only .react-datepicker__time-box{border-radius:0}._picker-popper-root_1bmta_39 .react-datepicker__time{background-color:inherit}._picker-popper-root_1bmta_39 .react-datepicker__aria-live{position:absolute;clip-path:circle(0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;width:1px;white-space:nowrap}._picker-popper-root_1bmta_39 .react-datepicker-time__header,._picker-popper-root_1bmta_39 .react-datepicker__triangle{display:none}._picker-popper-root_1bmta_39 .react-datepicker__time-container{width:100px;text-align:center}._picker-popper-root_1bmta_39 .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box{width:100%}._picker-popper-root_1bmta_39 .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list{height:200px;overflow-y:auto}._picker-popper-root_1bmta_39 .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item{height:auto;padding:var(--border-radius-md);cursor:pointer}._picker-popper-root_1bmta_39 .react-datepicker__header{padding:0;background-color:var(--color-background-neutral-inverse-fixed);border:none}._picker-popper-root_1bmta_39 .react-datepicker__day,._picker-popper-root_1bmta_39 .react-datepicker__day-name,._picker-popper-root_1bmta_39 .react-datepicker__time-list-item{color:var(--color-icon-warm-tertiary);font-weight:var(--font-weight-regular)}._picker-popper-root_1bmta_39 .react-datepicker__day,._picker-popper-root_1bmta_39 .react-datepicker__day-name{margin:.166rem .45rem}._picker-popper-root_1bmta_39 .react-datepicker__day-name{text-transform:uppercase;font-weight:var(--font-weight-medium);font-size:var(--border-radius-lg);letter-spacing:1px}._picker-popper-root_1bmta_39 .react-datepicker__day--outside-month{color:var(--color-border-warm-primary)}._picker-popper-root_1bmta_39 .react-datepicker__day--today{color:var(--color-background-neutral-primary-fixed);font-weight:var(--font-weight-semi-bold);background-color:var(--color-background-brand-primary)}._picker-popper-root_1bmta_39 .react-datepicker__day:hover,._picker-popper-root_1bmta_39 .react-datepicker__month-text:hover,._picker-popper-root_1bmta_39 .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item:hover{background-color:var(--color-background-warm-primary)}._picker-popper-root_1bmta_39 .react-datepicker__day,._picker-popper-root_1bmta_39 .react-datepicker__day--keyboard-selected,._picker-popper-root_1bmta_39 .react-datepicker__day--selected,._picker-popper-root_1bmta_39 .react-datepicker__day--in-selecting-range,._picker-popper-root_1bmta_39 .react-datepicker__day--in-range,._picker-popper-root_1bmta_39 .react-datepicker__day:not([aria-disabled=true]){border-radius:var(--border-radius-full)}._picker-popper-root_1bmta_39 .react-datepicker__day:hover,._picker-popper-root_1bmta_39 .react-datepicker__day--keyboard-selected:hover,._picker-popper-root_1bmta_39 .react-datepicker__day--selected:hover,._picker-popper-root_1bmta_39 .react-datepicker__day--in-selecting-range:hover,._picker-popper-root_1bmta_39 .react-datepicker__day--in-range:hover,._picker-popper-root_1bmta_39 .react-datepicker__day:not([aria-disabled=true]):hover{border-radius:var(--border-radius-full)}._picker-popper-root_1bmta_39 .react-datepicker__month .react-datepicker__month-text,._picker-popper-root_1bmta_39 .react-datepicker__month .react-datepicker__month-text--selected,._picker-popper-root_1bmta_39 .react-datepicker__month .react-datepicker__month-text--keyboard-selected,._picker-popper-root_1bmta_39 .react-datepicker__month .react-datepicker__month-text--in-selecting-range,._picker-popper-root_1bmta_39 .react-datepicker__month .react-datepicker__month-text--in-range,._picker-popper-root_1bmta_39 .react-datepicker__month .react-datepicker__month-text:hover{width:var(--size-icon-2xl);height:var(--size-icon-xl);margin:2px;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--size-icon-xl)}._picker-popper-root_1bmta_39 .react-datepicker__month .react-datepicker__month-text:hover,._picker-popper-root_1bmta_39 .react-datepicker__month .react-datepicker__month-text--selected:hover,._picker-popper-root_1bmta_39 .react-datepicker__month .react-datepicker__month-text--keyboard-selected:hover,._picker-popper-root_1bmta_39 .react-datepicker__month .react-datepicker__month-text--in-selecting-range:hover,._picker-popper-root_1bmta_39 .react-datepicker__month .react-datepicker__month-text--in-range:hover,._picker-popper-root_1bmta_39 .react-datepicker__month .react-datepicker__month-text:hover:hover{border-radius:var(--size-icon-xl)}._picker-popper-root_1bmta_39 .react-datepicker__day--keyboard-selected,._picker-popper-root_1bmta_39 .react-datepicker__month-text--keyboard-selected,._picker-popper-root_1bmta_39 .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected,._picker-popper-root_1bmta_39 .react-datepicker__day--selected,._picker-popper-root_1bmta_39 .react-datepicker__day--keyboard-selected:not([aria-disabled=true]),._picker-popper-root_1bmta_39 .react-datepicker__day--selected:not([aria-disabled=true]),._picker-popper-root_1bmta_39 .react-datepicker__day--in-selecting-range,._picker-popper-root_1bmta_39 .react-datepicker__day--in-range,._picker-popper-root_1bmta_39 .react-datepicker__month .react-datepicker__month-text--selected,._picker-popper-root_1bmta_39 .react-datepicker__month .react-datepicker__month-text--in-selecting-range,._picker-popper-root_1bmta_39 .react-datepicker__month .react-datepicker__month-text--in-range{background-color:var(--color-background-brand-primary);color:var(--color-background-neutral-primary-fixed);font-weight:var(--font-weight-semi-bold);outline:none}._picker-popper-root_1bmta_39 .react-datepicker__day--keyboard-selected:hover,._picker-popper-root_1bmta_39 .react-datepicker__month-text--keyboard-selected:hover,._picker-popper-root_1bmta_39 .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected:hover,._picker-popper-root_1bmta_39 .react-datepicker__day--selected:hover,._picker-popper-root_1bmta_39 .react-datepicker__day--keyboard-selected:not([aria-disabled=true]):hover,._picker-popper-root_1bmta_39 .react-datepicker__day--selected:not([aria-disabled=true]):hover,._picker-popper-root_1bmta_39 .react-datepicker__day--in-selecting-range:hover,._picker-popper-root_1bmta_39 .react-datepicker__day--in-range:hover,._picker-popper-root_1bmta_39 .react-datepicker__month .react-datepicker__month-text--selected:hover,._picker-popper-root_1bmta_39 .react-datepicker__month .react-datepicker__month-text--in-selecting-range:hover,._picker-popper-root_1bmta_39 .react-datepicker__month .react-datepicker__month-text--in-range:hover{background-color:var(--color-background-brand-primary);color:var(--color-background-neutral-primary-fixed);font-weight:var(--font-weight-semi-bold);outline:none}._picker-popper-root_1bmta_39 .react-datepicker__day-names,._picker-popper-root_1bmta_39 .react-datepicker__month{margin:0 -.45rem}._picker-popper-root_1bmta_39 .react-datepicker__month-text--today,._picker-popper-root_1bmta_39 .react-datepicker__current-month,._picker-popper-root_1bmta_39 .react-datepicker-time__header,._picker-popper-root_1bmta_39 .react-datepicker-year-header{font-weight:var(--font-weight-medium)}
package/dist/utils.js CHANGED
@@ -1,5 +1,4 @@
1
1
  "use client";
2
- import './utils.css';
3
2
  import { u, b as f } from "./index-B6iGEm-i.js";
4
3
  import { c as b } from "./index-B6iGEm-i.js";
5
4
  import { f as S } from "./forwardRefWithAs-8eP3ZN15.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "welcome-ui",
3
- "version": "10.6.8",
3
+ "version": "10.6.9",
4
4
  "description": "Customizable design system with react, typescript, tailwindcss and ariakit.",
5
5
  "files": [
6
6
  "dist"
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "scripts": {
30
30
  "start": "vite build --watch",
31
- "build": "vite build && node ./scripts/patch-css-imports.js",
31
+ "build": "vite build",
32
32
  "tokens:build": "node ./src/theme/scripts/build-tokens.js",
33
33
  "tokens:generate-theme-variables": "tsx src/theme/scripts/generate-theme-variables.ts",
34
34
  "theme:generate": "yarn tokens:build && tsx src/theme/scripts/generate-theme.ts && yarn run -T prettier --write 'src/theme/generated/theme.css' && yarn tokens:generate-theme-variables",
@@ -1 +0,0 @@
1
- .react-datepicker{padding:var(--border-radius-xl);font-family:inherit;font-size:var(--font-size-14);background-color:var(--color-background-neutral-inverse-fixed);border:var(--border-width-xs) solid var(--color-background-neutral-subtlest);border-radius:var(--border-radius-sm)}.react-datepicker--time-only{padding:0}.react-datepicker--time-only .react-datepicker__time-box{border-radius:0}.react-datepicker__time{background-color:inherit}.react-datepicker__input-container{display:block}.react-datepicker__aria-live{position:absolute;clip-path:circle(0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;width:1px;white-space:nowrap}.react-datepicker-popper{z-index:1}.react-datepicker-time__header,.react-datepicker__triangle{display:none}.react-datepicker__time-container{width:100px;text-align:center}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box{width:100%}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list{height:200px;overflow-y:auto}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item{height:auto;padding:var(--border-radius-md);cursor:pointer}.react-datepicker__header{padding:0;background-color:var(--color-background-neutral-inverse-fixed);border:none}.react-datepicker__day,.react-datepicker__day-name,.react-datepicker__time-list-item{color:var(--color-icon-warm-tertiary);font-weight:var(--font-weight-regular)}.react-datepicker__day,.react-datepicker__day-name{margin:.166rem .45rem}.react-datepicker__day-name{text-transform:uppercase;font-weight:var(--font-weight-medium);font-size:var(--border-radius-lg);letter-spacing:1px}.react-datepicker__day--outside-month{color:var(--color-border-warm-primary)}.react-datepicker__day--today{color:var(--color-background-neutral-primary-fixed);font-weight:var(--font-weight-semi-bold);background-color:var(--color-background-brand-primary)}.react-datepicker__day:hover,.react-datepicker__month-text:hover,.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item:hover{background-color:var(--color-background-warm-primary)}.react-datepicker__day,.react-datepicker__day--keyboard-selected,.react-datepicker__day--selected,.react-datepicker__day--in-selecting-range,.react-datepicker__day--in-range,.react-datepicker__day:not([aria-disabled=true]){border-radius:var(--border-radius-full)}.react-datepicker__day:hover,.react-datepicker__day--keyboard-selected:hover,.react-datepicker__day--selected:hover,.react-datepicker__day--in-selecting-range:hover,.react-datepicker__day--in-range:hover,.react-datepicker__day:not([aria-disabled=true]):hover{border-radius:var(--border-radius-full)}.react-datepicker__month .react-datepicker__month-text,.react-datepicker__month .react-datepicker__month-text--selected,.react-datepicker__month .react-datepicker__month-text--keyboard-selected,.react-datepicker__month .react-datepicker__month-text--in-selecting-range,.react-datepicker__month .react-datepicker__month-text--in-range,.react-datepicker__month .react-datepicker__month-text:hover{width:var(--size-icon-2xl);height:var(--size-icon-xl);margin:2px;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--size-icon-xl)}.react-datepicker__month .react-datepicker__month-text:hover,.react-datepicker__month .react-datepicker__month-text--selected:hover,.react-datepicker__month .react-datepicker__month-text--keyboard-selected:hover,.react-datepicker__month .react-datepicker__month-text--in-selecting-range:hover,.react-datepicker__month .react-datepicker__month-text--in-range:hover,.react-datepicker__month .react-datepicker__month-text:hover:hover{border-radius:var(--size-icon-xl)}.react-datepicker__day--keyboard-selected,.react-datepicker__month-text--keyboard-selected,.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected,.react-datepicker__day--selected,.react-datepicker__day--selected:not([aria-disabled=true]),.react-datepicker__day--in-selecting-range,.react-datepicker__day--in-range,.react-datepicker__month .react-datepicker__month-text--selected,.react-datepicker__month .react-datepicker__month-text--in-selecting-range,.react-datepicker__month .react-datepicker__month-text--in-range{background-color:var(--color-background-brand-primary);color:var(--color-background-neutral-primary-fixed);font-weight:var(--font-weight-semi-bold);outline:none}.react-datepicker__day--keyboard-selected:hover,.react-datepicker__month-text--keyboard-selected:hover,.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected:hover,.react-datepicker__day--selected:hover,.react-datepicker__day--selected:not([aria-disabled=true]):hover,.react-datepicker__day--in-selecting-range:hover,.react-datepicker__day--in-range:hover,.react-datepicker__month .react-datepicker__month-text--selected:hover,.react-datepicker__month .react-datepicker__month-text--in-selecting-range:hover,.react-datepicker__month .react-datepicker__month-text--in-range:hover{background-color:var(--color-background-brand-primary);color:var(--color-background-neutral-primary-fixed);font-weight:var(--font-weight-semi-bold);outline:none}.react-datepicker__day-names,.react-datepicker__month{margin:0 -.45rem}.react-datepicker__month-text--today,.react-datepicker__current-month,.react-datepicker-time__header,.react-datepicker-year-header{font-weight:var(--font-weight-medium)}