@fluidattacks/design 11.11.0 → 11.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,80 +1,80 @@
1
- import { jsx as r, jsxs as G } from "react/jsx-runtime";
2
- import { useVirtualizer as Je } from "../../../../../node_modules/@tanstack/react-virtual/dist/esm/index.js";
3
- import { useState as g, useMemo as $, useRef as y, useCallback as v } from "react";
4
- import { useButton as Pe } from "../../../../../node_modules/react-aria/dist/private/button/useButton.js";
5
- import { useComboBox as Qe } from "../../../../../node_modules/react-aria/dist/private/combobox/useComboBox.js";
6
- import { useFilter as Xe } from "../../../../../node_modules/react-aria/dist/private/i18n/useFilter.js";
7
- import { useListBox as Ze } from "../../../../../node_modules/react-aria/dist/private/listbox/useListBox.js";
8
- import { useComboBoxState as _e } from "../../../../../node_modules/react-stately/dist/private/combobox/useComboBoxState.js";
9
- import { Item as eo } from "../../../../../node_modules/react-stately/dist/private/collections/Item.js";
10
- import { useTheme as oo } from "styled-components";
11
- import { OutlineContainer as to } from "../../../outline-container/index.js";
12
- import { StyledTextInputContainer as ro } from "../../../styles.js";
1
+ import { jsx as r, jsxs as D } from "react/jsx-runtime";
2
+ import { useVirtualizer as Pe } from "../../../../../node_modules/@tanstack/react-virtual/dist/esm/index.js";
3
+ import { useState as g, useMemo as y, useRef as v, useCallback as x } from "react";
4
+ import { useButton as Qe } from "../../../../../node_modules/react-aria/dist/private/button/useButton.js";
5
+ import { useComboBox as Xe } from "../../../../../node_modules/react-aria/dist/private/combobox/useComboBox.js";
6
+ import { useFilter as Ze } from "../../../../../node_modules/react-aria/dist/private/i18n/useFilter.js";
7
+ import { useListBox as _e } from "../../../../../node_modules/react-aria/dist/private/listbox/useListBox.js";
8
+ import { useComboBoxState as eo } from "../../../../../node_modules/react-stately/dist/private/combobox/useComboBoxState.js";
9
+ import { Item as oo } from "../../../../../node_modules/react-stately/dist/private/collections/Item.js";
10
+ import { useTheme as to } from "styled-components";
11
+ import { OutlineContainer as ro } from "../../../outline-container/index.js";
12
+ import { StyledTextInputContainer as no } from "../../../styles.js";
13
13
  import { Popover as ye } from "../../../utils/popover/index.js";
14
- import { Option as no } from "../option/index.js";
15
- import { StyledStatusMessage as so, ChevronIconButton as lo, StyledDropdown as ve, StyledGroupHeader as ao, StyledEmptyMessage as co } from "../styles.js";
16
- import { describeSelection as io, toSelection as xe } from "../utils.js";
17
- import { Icon as J } from "../../../../icon/index.js";
18
- import { IconButton as po } from "../../../../icon-button/index.js";
14
+ import { Option as so } from "../option/index.js";
15
+ import { StyledStatusMessage as lo, ChevronIconButton as ao, StyledDropdown as ve, StyledGroupHeader as co, StyledEmptyMessage as io } from "../styles.js";
16
+ import { describeSelection as po, toSelection as xe } from "../utils.js";
17
+ import { Icon as q } from "../../../../icon/index.js";
18
+ import { IconButton as uo } from "../../../../icon-button/index.js";
19
19
  import "../../../../typography/heading/index.js";
20
20
  import "../../../../typography/span/index.js";
21
- import { Text as P } from "../../../../typography/text/index.js";
22
- import { useClickOutside as uo } from "../../../../../hooks/use-click-outside.js";
23
- const Mo = ({
21
+ import { Text as J } from "../../../../typography/text/index.js";
22
+ import { useClickOutside as fo } from "../../../../../hooks/use-click-outside.js";
23
+ const No = ({
24
24
  field: i,
25
25
  disabled: h = !1,
26
- disabledKeys: b,
26
+ disabledKeys: w,
27
27
  error: $e,
28
28
  helpLink: be,
29
29
  helpLinkText: we,
30
30
  helpText: Se,
31
- label: Q,
32
- loadingItems: X,
31
+ label: P,
32
+ loadingItems: Q,
33
33
  name: l,
34
34
  multiSelection: t = !1,
35
35
  items: o,
36
- onBlur: j,
36
+ onBlur: L,
37
37
  onChange: d,
38
- onClear: Z,
38
+ onClear: X,
39
39
  placeholder: Be,
40
40
  clearable: Ce = !1,
41
- countLabel: _,
42
- emptyMessage: ee,
43
- statusMessage: oe,
41
+ countLabel: Z,
42
+ emptyMessage: _,
43
+ statusMessage: ee,
44
44
  required: Ae,
45
- setValue: w,
45
+ setValue: S,
46
46
  tooltip: Oe,
47
47
  value: ze,
48
- watch: S,
49
- weight: Re
48
+ watch: B,
49
+ weight: Ie
50
50
  }) => {
51
- const m = oo(), k = h ? void 0 : $e, a = i?.value ?? ze, [M, x] = g(() => t ? io(
52
- xe(S?.(`${l}Options`)),
51
+ const m = to(), G = h ? void 0 : $e, a = i?.value ?? ze, [N, $] = g(() => t ? po(
52
+ xe(B?.(`${l}Options`)),
53
53
  o.map((e) => e.value),
54
- b ?? [],
54
+ w ?? [],
55
55
  o.find((e) => e.value === "All")?.name,
56
- _
57
- ).text : o.find((e) => e.value === a)?.name ?? ""), [te, B] = g(a), H = (X === !1 || !a) && !t, C = $(
58
- () => H ? o.find((e) => e.value === a)?.name ?? "" : "",
59
- [H, a, o]
60
- ), [Ie, Fe] = g(a), [De, re] = g(C), [Ge, N] = g(a);
61
- a !== Ie ? (Fe(a), re(C), !t && (X !== !0 || !a) && a !== Ge && (N(a), x(
56
+ Z
57
+ ).text : o.find((e) => e.value === a)?.name ?? ""), [oe, C] = g(a), j = (Q === !1 || !a) && !t, A = y(
58
+ () => j ? o.find((e) => e.value === a)?.name ?? "" : "",
59
+ [j, a, o]
60
+ ), [Re, Fe] = g(a), [Me, te] = g(A), [ke, V] = g(a);
61
+ a !== Re ? (Fe(a), te(A), !t && (Q !== !0 || !a) && a !== ke && (V(a), $(
62
62
  o.find((e) => e.value === a)?.name ?? ""
63
- ), B(a ?? ""))) : H && C !== De && (re(C), x(C), B(a ?? ""));
64
- const [ke, U] = g(o), [ne, A] = g(!1), { contains: V } = Xe({ sensitivity: "base" }), W = y(null), Y = y(null), O = y(null), z = y(null), se = y(null), R = y(null), q = y(/* @__PURE__ */ new Set()), Me = $(() => {
65
- const e = q.current, s = Array.from(b ?? []), p = o.some((n) => n.group !== void 0);
63
+ ), C(a ?? ""))) : j && A !== Me && (te(A), $(A), C(a ?? ""));
64
+ const [De, H] = g(o), [re, O] = g(!1), { contains: T } = Ze({ sensitivity: "base" }), U = v(null), W = v(null), z = v(null), I = v(null), ne = v(null), R = v(null), Y = v(/* @__PURE__ */ new Set()), Ge = y(() => {
65
+ const e = Y.current, s = Array.from(w ?? []), p = o.some((n) => n.group !== void 0);
66
66
  return o.toSorted((n, f) => {
67
67
  if (n.value === "All") return -1;
68
68
  if (f.value === "All") return 1;
69
- const K = s.includes(n.value), L = s.includes(f.value);
69
+ const b = s.includes(n.value), he = s.includes(f.value);
70
70
  if (p) {
71
- const F = n.group ?? "", D = f.group ?? "";
71
+ const M = n.group ?? "", k = f.group ?? "";
72
72
  if (!n.group && f.group) return -1;
73
73
  if (n.group && !f.group) return 1;
74
- if (F !== D)
75
- return F.localeCompare(D);
76
- if (K && !L) return 1;
77
- if (!K && L) return -1;
74
+ if (M !== k)
75
+ return M.localeCompare(k);
76
+ if (b !== he) return b ? 1 : -1;
77
+ if (b) return 0;
78
78
  if (t) {
79
79
  const me = e.has(n.value), ge = e.has(f.value);
80
80
  if (me && !ge) return -1;
@@ -82,16 +82,16 @@ const Mo = ({
82
82
  }
83
83
  return n.name.localeCompare(f.name);
84
84
  }
85
- if (K && !L) return 1;
86
- if (!K && L) return -1;
85
+ if (b !== he) return b ? 1 : -1;
86
+ if (b) return 0;
87
87
  if (t) {
88
- const F = e.has(n.value), D = e.has(f.value);
89
- return F && !D ? -1 : !F && D ? 1 : n.name.localeCompare(f.name);
88
+ const M = e.has(n.value), k = e.has(f.value);
89
+ return M && !k ? -1 : !M && k ? 1 : n.name.localeCompare(f.name);
90
90
  }
91
91
  return 0;
92
92
  }).map(
93
- (n) => V(n.name, M) || ne ? /* @__PURE__ */ r(
94
- eo,
93
+ (n) => T(n.name, N) || re ? /* @__PURE__ */ r(
94
+ oo,
95
95
  {
96
96
  "aria-label": n.value,
97
97
  hrefLang: n.href,
@@ -101,162 +101,165 @@ const Mo = ({
101
101
  n.value
102
102
  ) : null
103
103
  );
104
- }, [V, b, M, o, t, ne]), Ne = v(
104
+ }, [T, w, N, o, t, re]), Ne = x(
105
105
  (e) => {
106
106
  const s = e.split(/,|\s/u).slice(-1)[0].trim();
107
- x(t ? s : e), e === "" || e.endsWith(",") ? A(!0) : (A(!1), i || N(e), B((p) => {
107
+ $(t ? s : e), e === "" || e.endsWith(",") ? O(!0) : (O(!1), i || V(e), C((p) => {
108
108
  const u = e === "" ? "" : p;
109
109
  return i && i.onChange(u), d && d(e), u;
110
- }), U(
110
+ }), H(
111
111
  o.filter(
112
- (p) => V(p.name, t ? s : e)
112
+ (p) => T(p.name, t ? s : e)
113
113
  )
114
114
  ));
115
115
  },
116
- [V, o, i, t, d]
117
- ), Ve = v(
116
+ [T, o, i, t, d]
117
+ ), Ve = x(
118
118
  (e) => {
119
- x(o.find((s) => s.value === e)?.name ?? ""), B(e ? String(e) : ""), N(i ? e : String(e ?? "")), i && i.onChange(e), d && d(e ? String(e) : ""), U(o);
119
+ $(o.find((s) => s.value === e)?.name ?? ""), C(e ? String(e) : ""), V(i ? e : String(e ?? "")), i && i.onChange(e), d && d(e ? String(e) : ""), H(o);
120
120
  },
121
121
  [o, i, d]
122
- ), le = v(
122
+ ), se = x(
123
123
  (e) => {
124
- e.key === "Enter" && e.preventDefault(), A(!1);
124
+ e.key === "Enter" && e.preventDefault(), O(!1);
125
125
  },
126
126
  []
127
- ), Te = v(() => {
128
- j && j(), i && i.onBlur();
129
- }, [i, j]), Ee = v(() => {
130
- A(!0);
131
- }, []), c = _e({
127
+ ), Te = x(() => {
128
+ L && L(), i && i.onBlur();
129
+ }, [i, L]), Ee = x(() => {
130
+ O(!0);
131
+ }, []), c = eo({
132
132
  allowsCustomValue: t,
133
133
  allowsEmptyCollection: !0,
134
- disabledKeys: b,
135
- inputValue: M,
136
- items: ke,
134
+ disabledKeys: w,
135
+ inputValue: N,
136
+ items: De,
137
137
  menuTrigger: "focus",
138
138
  shouldCloseOnBlur: !t,
139
- selectedKey: te,
139
+ selectedKey: oe,
140
140
  onBlur: Te,
141
141
  onInputChange: Ne,
142
- onKeyDown: le,
142
+ onKeyDown: se,
143
143
  onKeyUp: Ee,
144
144
  onOpenChange(e, s) {
145
- e && t && S && (q.current = new Set(
146
- xe(S(`${l}Options`)).filter(Boolean)
147
- )), A(
145
+ e && t && B && (Y.current = new Set(
146
+ xe(B(`${l}Options`)).filter(Boolean)
147
+ )), O(
148
148
  e && (s === "manual" || s === "focus")
149
149
  ), e && s !== "focus" && requestAnimationFrame(() => {
150
- W.current?.focus();
150
+ U.current?.focus();
151
151
  });
152
152
  },
153
153
  onSelectionChange: t ? void 0 : Ve,
154
- children: Me
155
- }), Ke = v(() => {
156
- x(""), B(null), U(o), c.setSelectedKey(null), c.setInputValue(""), i || N(""), d && d(""), t && w && (w(`${l}Options`, []), w(`${l}CheckAll`, "")), Z?.();
154
+ children: Ge
155
+ }), Ke = x(() => {
156
+ $(""), C(null), H(o), c.setSelectedKey(null), c.setInputValue(""), i || V(""), d && d(""), t && S && (S(`${l}Options`, []), S(`${l}CheckAll`, "")), X?.();
157
157
  }, [
158
158
  i,
159
159
  o,
160
160
  t,
161
161
  l,
162
- Z,
162
+ X,
163
163
  d,
164
- w,
164
+ S,
165
165
  c
166
166
  ]), {
167
167
  buttonProps: Le,
168
168
  inputProps: je,
169
169
  listBoxProps: He
170
- } = Qe(
170
+ } = Xe(
171
171
  {
172
- inputValue: M,
173
- buttonRef: Y,
172
+ inputValue: N,
173
+ buttonRef: W,
174
174
  id: l,
175
- inputRef: W,
176
- label: Q ?? l,
177
- listBoxRef: O,
175
+ inputRef: U,
176
+ label: P ?? l,
177
+ listBoxRef: z,
178
178
  name: l,
179
179
  placeholder: Be,
180
180
  popoverRef: R
181
181
  },
182
182
  c
183
- ), { listBoxProps: ae } = Ze(He, c, O), { buttonProps: Ue } = Pe(Le, Y), { width: ce } = z.current?.getBoundingClientRect() ?? {
183
+ ), { listBoxProps: le } = _e(He, c, z), { buttonProps: Ue } = Qe(Le, W), { width: ae } = I.current?.getBoundingClientRect() ?? {
184
184
  width: 240
185
185
  };
186
- uo(z, () => {
186
+ fo(I, () => {
187
187
  c.isOpen && !t && c.close();
188
188
  }, [R]);
189
- const I = Array.from(c.collection), ie = t ? I.findLastIndex(
190
- (e) => e.key === "All" || q.current.has(String(e.key))
191
- ) : -1, We = $(() => o.map((e) => e.value), [o]), pe = $(
189
+ const F = Array.from(c.collection), ce = t ? F.findLastIndex(
190
+ (e) => e.key === "All" || Y.current.has(String(e.key))
191
+ ) : -1, We = y(() => o.map((e) => e.value), [o]), ie = y(
192
192
  () => new Map(o.map((e) => [e.value, e.group])),
193
193
  [o]
194
- ), Ye = $(
194
+ ), Ye = y(
195
195
  () => new Map(o.map((e) => [e.value, e.tag])),
196
196
  [o]
197
- ), T = $(() => I.reduce(
197
+ ), qe = y(
198
+ () => new Map(o.map((e) => [e.value, e.icon])),
199
+ [o]
200
+ ), E = y(() => F.reduce(
198
201
  (e, s, p) => {
199
- const u = pe.get(String(s.key));
202
+ const u = ie.get(String(s.key));
200
203
  return u !== void 0 && u !== e.currentGroup ? (e.result.push({ type: "header", group: u }), e.currentGroup = u) : u === void 0 && e.currentGroup !== void 0 && (e.currentGroup = void 0), e.result.push({ type: "item", index: p }), e;
201
204
  },
202
205
  { result: [], currentGroup: void 0 }
203
- ).result, [I, pe]), ue = Je({
204
- count: T.length,
205
- estimateSize: (e) => T[e].type === "header" ? 44 : 28,
206
- getScrollElement: () => O.current,
206
+ ).result, [F, ie]), pe = Pe({
207
+ count: E.length,
208
+ estimateSize: (e) => E[e].type === "header" ? 44 : 28,
209
+ getScrollElement: () => z.current,
207
210
  useFlushSync: !1
208
- }), fe = c.isOpen && !h, E = fe && !!oe, de = fe && o.length === 0 && !!ee, qe = v(
211
+ }), ue = c.isOpen && !h, K = ue && !!ee, fe = ue && o.length === 0 && !!_, Je = x(
209
212
  (e) => {
210
213
  e.preventDefault();
211
214
  },
212
215
  []
213
- ), he = E ? (
216
+ ), de = K ? (
214
217
  // A listbox only owns options, so the row itself must stay presentational
215
- /* @__PURE__ */ r(so, { onMouseDown: qe, role: "presentation", children: /* @__PURE__ */ r("div", { "aria-live": "polite", role: "status", children: /* @__PURE__ */ r(
216
- P,
218
+ /* @__PURE__ */ r(lo, { onMouseDown: Je, role: "presentation", children: /* @__PURE__ */ r("div", { "aria-live": "polite", role: "status", children: /* @__PURE__ */ r(
219
+ J,
217
220
  {
218
221
  color: m.palette.gray[400],
219
222
  size: "sm",
220
223
  textOverflow: "auto",
221
224
  whiteSpace: "wrap",
222
- children: oe
225
+ children: ee
223
226
  }
224
227
  ) }) })
225
228
  ) : null;
226
- return /* @__PURE__ */ G(
227
- to,
229
+ return /* @__PURE__ */ D(
230
+ ro,
228
231
  {
229
- containerRef: se,
230
- error: k,
232
+ containerRef: ne,
233
+ error: G,
231
234
  helpLink: be,
232
235
  helpLinkText: we,
233
236
  helpText: Se,
234
237
  htmlFor: l,
235
238
  id: `combobox-${l}`,
236
- label: Q,
239
+ label: P,
237
240
  required: Ae,
238
241
  tooltip: Oe,
239
- weight: Re,
242
+ weight: Ie,
240
243
  children: [
241
- /* @__PURE__ */ G(
242
- ro,
244
+ /* @__PURE__ */ D(
245
+ no,
243
246
  {
244
- className: `${h ? "disabled" : ""} ${k ? "error" : ""}`,
245
- ref: z,
247
+ className: `${h ? "disabled" : ""} ${G ? "error" : ""}`,
248
+ ref: I,
246
249
  children: [
247
250
  /* @__PURE__ */ r(
248
251
  "input",
249
252
  {
250
253
  ...je,
251
- "aria-invalid": k ? "true" : "false",
254
+ "aria-invalid": G ? "true" : "false",
252
255
  "aria-label": l,
253
256
  disabled: h,
254
- onKeyDown: le,
255
- ref: W
257
+ onKeyDown: se,
258
+ ref: U
256
259
  }
257
260
  ),
258
- k ? /* @__PURE__ */ r(
259
- J,
261
+ G ? /* @__PURE__ */ r(
262
+ q,
260
263
  {
261
264
  icon: "exclamation-circle",
262
265
  iconClass: "error-icon",
@@ -264,8 +267,8 @@ const Mo = ({
264
267
  iconSize: "lg"
265
268
  }
266
269
  ) : void 0,
267
- Ce && !h && (t ? (S?.(`${l}Options`)?.length ?? 0) > 0 : te) ? /* @__PURE__ */ r(
268
- po,
270
+ Ce && !h && (t ? (B?.(`${l}Options`)?.length ?? 0) > 0 : oe) ? /* @__PURE__ */ r(
271
+ uo,
269
272
  {
270
273
  icon: "xmark",
271
274
  iconColor: m.palette.gray[400],
@@ -278,8 +281,8 @@ const Mo = ({
278
281
  variant: "ghost"
279
282
  }
280
283
  ) : void 0,
281
- /* @__PURE__ */ G(
282
- lo,
284
+ /* @__PURE__ */ D(
285
+ ao,
283
286
  {
284
287
  ...Ue,
285
288
  $variant: "ghost",
@@ -287,11 +290,11 @@ const Mo = ({
287
290
  disabled: h,
288
291
  px: 0.125,
289
292
  py: 0.125,
290
- ref: Y,
293
+ ref: W,
291
294
  type: "button",
292
295
  children: [
293
296
  /* @__PURE__ */ r("div", { className: "chevron-down", children: /* @__PURE__ */ r(
294
- J,
297
+ q,
295
298
  {
296
299
  clickable: !1,
297
300
  icon: "chevron-down",
@@ -301,7 +304,7 @@ const Mo = ({
301
304
  }
302
305
  ) }),
303
306
  /* @__PURE__ */ r("div", { className: "chevron-up", children: /* @__PURE__ */ r(
304
- J,
307
+ q,
305
308
  {
306
309
  clickable: !1,
307
310
  icon: "chevron-up",
@@ -325,25 +328,25 @@ const Mo = ({
325
328
  placement: "bottom start",
326
329
  popoverRef: R,
327
330
  state: c,
328
- triggerRef: z,
329
- children: /* @__PURE__ */ G(
331
+ triggerRef: I,
332
+ children: /* @__PURE__ */ D(
330
333
  ve,
331
334
  {
332
- ...ae,
333
- $hasStatus: E,
334
- $multiSelection: t && !Array.from(b ?? []).includes("All"),
335
- $width: ce,
336
- ref: O,
335
+ ...le,
336
+ $hasStatus: K,
337
+ $multiSelection: t && !Array.from(w ?? []).includes("All"),
338
+ $width: ae,
339
+ ref: z,
337
340
  children: [
338
341
  /* @__PURE__ */ r(
339
342
  "div",
340
343
  {
341
344
  style: {
342
- height: `${ue.getTotalSize()}px`,
345
+ height: `${pe.getTotalSize()}px`,
343
346
  position: "relative"
344
347
  },
345
- children: ue.getVirtualItems().map((e) => {
346
- const s = T[e.index];
348
+ children: pe.getVirtualItems().map((e) => {
349
+ const s = E[e.index];
347
350
  if (s.type === "header")
348
351
  return /* @__PURE__ */ r(
349
352
  "div",
@@ -356,8 +359,8 @@ const Mo = ({
356
359
  height: `${e.size}px`,
357
360
  transform: `translateY(${e.start}px)`
358
361
  },
359
- children: /* @__PURE__ */ r(ao, { children: /* @__PURE__ */ r(
360
- P,
362
+ children: /* @__PURE__ */ r(co, { children: /* @__PURE__ */ r(
363
+ J,
361
364
  {
362
365
  color: m.palette.gray[400],
363
366
  fontWeight: "bold",
@@ -368,7 +371,7 @@ const Mo = ({
368
371
  },
369
372
  `header-${e.index}`
370
373
  );
371
- const p = I[s.index], u = T[e.index + 1], n = p.key === "All" && u?.type === "header", f = t && s.index === ie && ie >= 0 && s.index < I.length - 1 && !n;
374
+ const p = F[s.index], u = E[e.index + 1], n = p.key === "All" && u?.type === "header", f = t && s.index === ce && ce >= 0 && s.index < F.length - 1 && !n;
372
375
  return /* @__PURE__ */ r(
373
376
  "div",
374
377
  {
@@ -382,20 +385,21 @@ const Mo = ({
382
385
  borderBottom: f ? `1px solid ${m.palette.gray[200]}` : void 0
383
386
  },
384
387
  children: /* @__PURE__ */ r(
385
- no,
388
+ so,
386
389
  {
387
390
  allItemKeys: We,
388
- containerRef: se,
389
- countLabel: _,
391
+ containerRef: ne,
392
+ countLabel: Z,
393
+ icon: qe.get(String(p.key)),
390
394
  item: p,
391
395
  multiSelection: t,
392
396
  name: l,
393
397
  popoverRef: R,
394
- setInputValue: x,
395
- setValue: w,
398
+ setInputValue: $,
399
+ setValue: S,
396
400
  state: c,
397
401
  tag: Ye.get(String(p.key)),
398
- watch: S
402
+ watch: B
399
403
  }
400
404
  )
401
405
  },
@@ -404,12 +408,12 @@ const Mo = ({
404
408
  })
405
409
  }
406
410
  ),
407
- he
411
+ de
408
412
  ]
409
413
  }
410
414
  )
411
415
  }
412
- ) : !de && !E ? null : /* @__PURE__ */ r(
416
+ ) : !fe && !K ? null : /* @__PURE__ */ r(
413
417
  ye,
414
418
  {
415
419
  className: "dropdown",
@@ -418,27 +422,27 @@ const Mo = ({
418
422
  placement: "bottom start",
419
423
  popoverRef: R,
420
424
  state: c,
421
- triggerRef: z,
422
- children: /* @__PURE__ */ G(
425
+ triggerRef: I,
426
+ children: /* @__PURE__ */ D(
423
427
  ve,
424
428
  {
425
- ...ae,
426
- $hasStatus: E,
429
+ ...le,
430
+ $hasStatus: K,
427
431
  $multiSelection: !1,
428
- $width: ce,
429
- ref: O,
432
+ $width: ae,
433
+ ref: z,
430
434
  children: [
431
- de ? /* @__PURE__ */ r(co, { children: /* @__PURE__ */ r(
432
- P,
435
+ fe ? /* @__PURE__ */ r(io, { children: /* @__PURE__ */ r(
436
+ J,
433
437
  {
434
438
  color: m.palette.gray[400],
435
439
  size: "md",
436
440
  textOverflow: "auto",
437
441
  whiteSpace: "wrap",
438
- children: ee
442
+ children: _
439
443
  }
440
444
  ) }) : null,
441
- he
445
+ de
442
446
  ]
443
447
  }
444
448
  )
@@ -449,5 +453,5 @@ const Mo = ({
449
453
  );
450
454
  };
451
455
  export {
452
- Mo as ComboBoxField
456
+ No as ComboBoxField
453
457
  };
@@ -2,6 +2,8 @@ import { Meta } from '@storybook/react-vite';
2
2
  import { IComboBoxProps } from '.';
3
3
  declare const config: Meta;
4
4
  declare const Default: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IComboBoxProps>;
5
+ declare const optionStates: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IComboBoxProps>;
6
+ declare const disabledMultiSelect: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IComboBoxProps>;
5
7
  declare const multiSelectWithAll: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IComboBoxProps>;
6
8
  declare const withEmptyMessage: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IComboBoxProps>;
7
9
  declare const withStatusMessage: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IComboBoxProps>;
@@ -11,5 +13,5 @@ declare const narrowMultiSelect: import('storybook/internal/csf').AnnotatedStory
11
13
  declare const countLabelMultiSelect: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IComboBoxProps>;
12
14
  declare const whiteOptionsMultiSelect: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IComboBoxProps>;
13
15
  declare const preselectedMultiSelect: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IComboBoxProps>;
14
- export { countLabelMultiSelect, Default, multiSelectWithAll, withEmptyMessage, withStatusMessage, withClearButton, groupedMultiSelect, narrowMultiSelect, preselectedMultiSelect, whiteOptionsMultiSelect, };
16
+ export { countLabelMultiSelect, Default, disabledMultiSelect, multiSelectWithAll, optionStates, withEmptyMessage, withStatusMessage, withClearButton, groupedMultiSelect, narrowMultiSelect, preselectedMultiSelect, whiteOptionsMultiSelect, };
15
17
  export default config;
@@ -1,3 +1,3 @@
1
1
  import { IOptionProps } from '../types';
2
- declare const Option: <T extends object>({ allItemKeys, containerRef, countLabel, item, multiSelection, name, popoverRef, setInputValue, setValue, state, tag, watch, }: Readonly<IOptionProps<T>>) => JSX.Element;
2
+ declare const Option: <T extends object>({ allItemKeys, containerRef, countLabel, icon, item, multiSelection, name, popoverRef, setInputValue, setValue, state, tag, watch, }: Readonly<IOptionProps<T>>) => JSX.Element;
3
3
  export { Option };
@@ -1,137 +1,153 @@
1
- import { jsx as l, jsxs as H } from "react/jsx-runtime";
2
- import { useRef as J, useMemo as k, useCallback as f } from "react";
3
- import { useOption as Q } from "../../../../../node_modules/react-aria/dist/private/listbox/useOption.js";
4
- import { useTheme as W } from "styled-components";
5
- import { StyledOption as X } from "../styles.js";
6
- import { describeSelection as Y, toSelection as u } from "../utils.js";
7
- import { Checkbox as D } from "../../../../checkbox/index.js";
8
- import { Icon as Z } from "../../../../icon/index.js";
9
- import { Link as _ } from "../../../../link/index.js";
10
- import { Tag as I } from "../../../../tag/index.js";
1
+ import { jsxs as D, Fragment as X, jsx as n } from "react/jsx-runtime";
2
+ import { useRef as Y, useMemo as f, useCallback as k } from "react";
3
+ import { useOption as Z } from "../../../../../node_modules/react-aria/dist/private/listbox/useOption.js";
4
+ import { useTheme as _ } from "styled-components";
5
+ import { StyledOption as I } from "../styles.js";
6
+ import { describeSelection as V, toSelection as F } from "../utils.js";
7
+ import { Checkbox as w } from "../../../../checkbox/index.js";
8
+ import { Icon as N } from "../../../../icon/index.js";
9
+ import { Link as oo } from "../../../../link/index.js";
10
+ import { Tag as eo } from "../../../../tag/index.js";
11
11
  import "../../../../typography/heading/index.js";
12
12
  import "../../../../typography/span/index.js";
13
- import { Text as V } from "../../../../typography/text/index.js";
14
- import { useClickOutside as oo } from "../../../../../hooks/use-click-outside.js";
15
- import { openUrl as eo } from "../../../../../utils/open-url.js";
16
- const yo = ({
17
- allItemKeys: a,
18
- containerRef: w,
19
- countLabel: $,
13
+ import { Text as ro } from "../../../../typography/text/index.js";
14
+ import { useClickOutside as to } from "../../../../../hooks/use-click-outside.js";
15
+ import { openUrl as io } from "../../../../../utils/open-url.js";
16
+ const bo = ({
17
+ allItemKeys: g,
18
+ containerRef: q,
19
+ countLabel: O,
20
+ icon: $,
20
21
  item: o,
21
22
  multiSelection: s,
22
23
  name: e,
23
- popoverRef: z,
24
- setInputValue: t,
25
- setValue: n,
26
- state: c,
27
- tag: y,
24
+ popoverRef: B,
25
+ setInputValue: c,
26
+ setValue: t,
27
+ state: i,
28
+ tag: A,
28
29
  watch: h
29
30
  }) => {
30
- const F = W(), C = J(null), d = o.props.hrefLang, g = c.disabledKeys, A = a.filter(
31
- (r) => !Array.from(g).includes(r) && r !== "All"
32
- ), { optionProps: q, isSelected: S, isFocused: B, isDisabled: O } = Q(
31
+ const K = _(), b = Y(null), d = o.props.hrefLang, y = i.disabledKeys, m = g.filter(
32
+ (r) => !Array.from(y).includes(r) && r !== "All"
33
+ ), { optionProps: M, isSelected: v, isFocused: P, isDisabled: p } = Z(
33
34
  { key: o.key },
34
- c,
35
- C
36
- ), b = k(() => c.collection.getItem("All")?.rendered?.toString(), [c.collection]), K = [
37
- S ? "selected" : "",
38
- B ? "focused" : "",
39
- O ? "disabled" : ""
40
- ].join(" "), m = f(
35
+ i,
36
+ b
37
+ ), x = f(() => i.collection.getItem("All")?.rendered?.toString(), [i.collection]), R = [
38
+ v ? "selected" : "",
39
+ P ? "focused" : "",
40
+ p ? "disabled" : ""
41
+ ].join(" "), S = k(
41
42
  (r) => {
42
- const { allSelected: i, text: p } = Y(
43
+ const { allSelected: l, text: a } = V(
43
44
  r,
44
- a,
45
45
  g,
46
- b,
47
- $
46
+ y,
47
+ x,
48
+ O
48
49
  );
49
- n?.(`${e}CheckAll`, i ? p : ""), t(p);
50
+ t?.(`${e}CheckAll`, l ? a : ""), c(a);
50
51
  },
51
52
  [
52
- a,
53
- b,
54
- $,
55
53
  g,
54
+ x,
55
+ O,
56
+ y,
56
57
  e,
57
- t,
58
- n
58
+ c,
59
+ t
59
60
  ]
60
- ), M = f(
61
+ ), U = k(
61
62
  (r) => {
62
63
  if (r.target.checked) {
63
- const i = [...A].sort();
64
- n?.(`${e}Options`, i), n?.(`${e}CheckAll`, r.target.value), t(r.target.value);
64
+ const l = [...m].sort();
65
+ t?.(`${e}Options`, l), t?.(`${e}CheckAll`, r.target.value), c(r.target.value);
65
66
  } else
66
- n?.(`${e}Options`, []), n?.(`${e}CheckAll`, ""), t("");
67
+ t?.(`${e}Options`, []), t?.(`${e}CheckAll`, ""), c("");
67
68
  },
68
- [A, e, t, n]
69
- ), N = f(
69
+ [m, e, c, t]
70
+ ), E = k(
70
71
  (r) => {
71
- const i = r.target.value, p = u(h?.(`${e}Options`)), j = r.target.checked ? [...p, i] : p.filter((G) => G !== i);
72
- n?.(`${e}Options`, j), m(j);
72
+ const l = r.target.value, a = F(h?.(`${e}Options`)), z = r.target.checked ? [...a, l] : a.filter((W) => W !== l);
73
+ t?.(`${e}Options`, z), S(z);
73
74
  },
74
- [e, n, h, m]
75
- ), v = h?.(`${e}Options`), x = k(
76
- () => u(v),
77
- [v]
78
- ), P = k(
79
- () => x.includes(o.key.toString()),
80
- [x, o.key]
81
- ), L = h?.(`${e}CheckAll`), R = k(() => !!L, [L]), U = o.key === "All" ? /* @__PURE__ */ l(
82
- D,
75
+ [e, t, h, S]
76
+ ), u = h?.(`${e}Options`), L = f(
77
+ () => F(u),
78
+ [u]
79
+ ), G = f(
80
+ () => L.includes(o.key.toString()),
81
+ [L, o.key]
82
+ ), T = h?.(`${e}CheckAll`), H = f(() => !!T, [T]), C = /* @__PURE__ */ D(X, { children: [
83
+ $ === void 0 ? void 0 : /* @__PURE__ */ n(
84
+ N,
85
+ {
86
+ icon: $,
87
+ iconSize: "lg",
88
+ iconType: "fa-light",
89
+ spanClass: "option-icon"
90
+ }
91
+ ),
92
+ /* @__PURE__ */ n("span", { className: "option-name", children: o.rendered })
93
+ ] }), J = o.key === "All" ? /* @__PURE__ */ n(
94
+ w,
83
95
  {
84
- checked: R,
85
- label: o.rendered?.toString(),
96
+ checked: H,
97
+ "data-testid": o.textValue,
98
+ disabled: p,
99
+ label: C,
86
100
  name: `${e}CheckAll`,
87
- onChange: M,
101
+ onChange: U,
88
102
  value: o.rendered?.toString()
89
103
  }
90
- ) : /* @__PURE__ */ l(
91
- D,
104
+ ) : /* @__PURE__ */ n(
105
+ w,
92
106
  {
93
- checked: P,
94
- label: o.rendered?.toString(),
107
+ checked: G,
108
+ "data-testid": o.textValue,
109
+ disabled: p,
110
+ label: C,
95
111
  name: `${e}Options`,
96
- onChange: N,
112
+ onChange: E,
97
113
  value: o.key.toString()
98
114
  }
99
- ), T = s && !O ? U : /* @__PURE__ */ l(
100
- V,
115
+ ), j = s ? J : /* @__PURE__ */ n(
116
+ ro,
101
117
  {
102
- color: F.palette.gray[800],
118
+ color: K.palette.gray[800],
103
119
  size: "md",
104
120
  textOverflow: "ellipsis",
105
121
  whiteSpace: "nowrap",
106
- children: o.rendered
122
+ children: C
107
123
  }
108
- ), E = f(
124
+ ), Q = k(
109
125
  (r) => {
110
- r.preventDefault(), t(o.rendered?.toString() ?? ""), c.setSelectedKey(o.key), requestAnimationFrame(() => {
111
- c.setOpen(!1);
112
- }), eo(d);
126
+ r.preventDefault(), c(o.rendered?.toString() ?? ""), i.setSelectedKey(o.key), requestAnimationFrame(() => {
127
+ i.setOpen(!1);
128
+ }), io(d);
113
129
  },
114
- [d, o.key, o.rendered, c, t]
130
+ [d, o.key, o.rendered, i, c]
115
131
  );
116
- return oo(z, () => {
117
- s && c.close();
118
- }, [w]), /* @__PURE__ */ H(
119
- X,
132
+ return to(B, () => {
133
+ s && i.close();
134
+ }, [q]), /* @__PURE__ */ D(
135
+ I,
120
136
  {
121
- ...!s && !d ? q : {},
137
+ ...!s && !d ? M : {},
122
138
  $multiSelection: s,
123
- className: K,
139
+ className: R,
124
140
  "data-testid": `${e}-option-${o.key}`,
125
- ref: C,
141
+ ref: b,
126
142
  title: o.textValue,
127
143
  children: [
128
- d ? /* @__PURE__ */ l(_, { href: d, onClick: E, children: T }) : T,
129
- S && !O && !s ? /* @__PURE__ */ l(Z, { icon: "check", iconSize: "sm", iconType: "fa-light" }) : void 0,
130
- y === void 0 ? void 0 : /* @__PURE__ */ l(I, { tagLabel: y, variant: "inactive" })
144
+ d && !p ? /* @__PURE__ */ n(oo, { href: d, onClick: Q, children: j }) : j,
145
+ v && !p && !s ? /* @__PURE__ */ n(N, { icon: "check", iconSize: "sm", iconType: "fa-light" }) : void 0,
146
+ A === void 0 ? void 0 : /* @__PURE__ */ n(eo, { tagLabel: A, variant: "inactive" })
131
147
  ]
132
148
  }
133
149
  );
134
150
  };
135
151
  export {
136
- yo as Option
152
+ bo as Option
137
153
  };
@@ -1,7 +1,8 @@
1
- import { styled as o } from "styled-components";
2
- import { StyledIconButton as l } from "../../../icon-button/styles.js";
3
- const t = o.ul`
4
- ${({ theme: a, $hasStatus: n, $multiSelection: p, $width: i }) => `
1
+ import { styled as n } from "styled-components";
2
+ import { LabelText as l } from "../../../checkbox/styles.js";
3
+ import { StyledIconButton as t } from "../../../icon-button/styles.js";
4
+ const d = n.ul`
5
+ ${({ theme: a, $hasStatus: o, $multiSelection: p, $width: i }) => `
5
6
  align-self: center;
6
7
  background: ${a.palette.white};
7
8
  border: 1px solid ${a.palette.gray[200]};
@@ -11,7 +12,7 @@ const t = o.ul`
11
12
  max-height: 200px;
12
13
  min-width: ${i < 240 ? i : 240}px;
13
14
  overflow: hidden auto;
14
- padding: ${a.spacing[0.25]} 0 ${n ? "0" : a.spacing[0.25]} 0;
15
+ padding: ${a.spacing[0.25]} 0 ${o ? "0" : a.spacing[0.25]} 0;
15
16
  scrollbar-color: ${a.palette.gray[600]} ${a.palette.gray[100]};
16
17
  scroll-padding: ${a.spacing[0.5]};
17
18
  width: 95%;
@@ -20,8 +21,8 @@ const t = o.ul`
20
21
  border-bottom: ${p ? `1px solid ${a.palette.gray[200]}` : "unset"};
21
22
  }
22
23
  `}
23
- `, d = o.li`
24
- ${({ theme: a, $multiSelection: n }) => `
24
+ `, g = n.li`
25
+ ${({ theme: a, $multiSelection: o }) => `
25
26
  align-items: center;
26
27
  background: ${a.palette.white};
27
28
  color: ${a.palette.gray[800]};
@@ -30,12 +31,12 @@ const t = o.ul`
30
31
  gap: ${a.spacing[0.5]};
31
32
  justify-content: space-between;
32
33
  line-height: ${a.spacing[1.25]};
33
- padding: ${n ? `${a.spacing[0.125]} ${a.spacing[0.75]}` : `${a.spacing[0.25]} ${a.spacing[1]}`};
34
+ padding: ${o ? `${a.spacing[0.125]} ${a.spacing[0.75]}` : `${a.spacing[0.25]} ${a.spacing[1]}`};
34
35
 
35
36
  a, p, label {
36
37
  display: inline-flex;
37
38
  overflow: hidden;
38
- padding: ${n ? a.spacing[0.25] : "0"};
39
+ padding: ${o ? a.spacing[0.25] : "0"};
39
40
  width: 100%;
40
41
  }
41
42
 
@@ -53,24 +54,41 @@ const t = o.ul`
53
54
  color: ${a.palette.gray[700]};
54
55
  }
55
56
 
57
+ .option-icon {
58
+ color: ${a.palette.gray[800]};
59
+ margin-right: ${a.spacing[0.5]};
60
+ }
61
+
62
+ .option-name {
63
+ color: ${a.palette.gray[800]};
64
+ }
65
+
56
66
  &:hover:not(.disabled, .selected) {
57
- background: ${a.palette.gray[100]};
67
+ background: ${a.palette.gray[50]};
58
68
  }
59
69
 
60
70
  &.selected {
61
- background: ${n ? a.palette.white : a.palette.gray[200]};
71
+ background: ${o ? a.palette.white : a.palette.gray[100]};
62
72
  }
63
73
 
64
74
  &.disabled {
65
- background: ${a.palette.gray[100]};
66
75
  cursor: not-allowed;
67
76
 
68
- p, span {
69
- color: ${a.palette.gray[500]};
77
+ input:disabled ~ ${l} {
78
+ opacity: 1;
79
+ }
80
+
81
+ .option-icon {
82
+ opacity: 0.4;
83
+ }
84
+
85
+ .option-name {
86
+ color: ${a.palette.gray[600]};
87
+ opacity: 0.5;
70
88
  }
71
89
  }
72
90
  `}
73
- `, c = o.li`
91
+ `, e = n.li`
74
92
  ${({ theme: a }) => `
75
93
  align-items: center;
76
94
  color: ${a.palette.gray[400]};
@@ -81,13 +99,13 @@ const t = o.ul`
81
99
  padding: ${a.spacing[0.25]} ${a.spacing[1]};
82
100
  size: 28;
83
101
  `}
84
- `, g = o(l)`
85
- ${({ disabled: a, theme: n }) => `
102
+ `, $ = n(t)`
103
+ ${({ disabled: a, theme: o }) => `
86
104
  position: relative;
87
105
 
88
106
  & .chevron-down span,
89
107
  & .chevron-up span {
90
- ${a ? `color: ${n.palette.gray[300]};` : ""}
108
+ ${a ? `color: ${o.palette.gray[300]};` : ""}
91
109
  }
92
110
 
93
111
  /* CLOSE STATE */
@@ -104,7 +122,7 @@ const t = o.ul`
104
122
  display: none;
105
123
  }
106
124
  `}
107
- `, e = o.li`
125
+ `, y = n.li`
108
126
  ${({ theme: a }) => `
109
127
  border-top: 1px solid ${a.palette.gray[200]};
110
128
  color: ${a.palette.gray[400]};
@@ -116,7 +134,7 @@ const t = o.ul`
116
134
  padding: ${a.spacing[0.25]} ${a.spacing[1]};
117
135
  user-select: none;
118
136
  `}
119
- `, $ = o.li`
137
+ `, b = n.li`
120
138
  ${({ theme: a }) => `
121
139
  background: ${a.palette.white};
122
140
  border-top: 1px solid ${a.palette.gray[200]};
@@ -130,10 +148,10 @@ const t = o.ul`
130
148
  `}
131
149
  `;
132
150
  export {
133
- g as ChevronIconButton,
134
- t as StyledDropdown,
135
- c as StyledEmptyMessage,
136
- e as StyledGroupHeader,
137
- d as StyledOption,
138
- $ as StyledStatusMessage
151
+ $ as ChevronIconButton,
152
+ d as StyledDropdown,
153
+ e as StyledEmptyMessage,
154
+ y as StyledGroupHeader,
155
+ g as StyledOption,
156
+ b as StyledStatusMessage
139
157
  };
@@ -1,3 +1,4 @@
1
+ import { IconName } from '@fortawesome/free-solid-svg-icons';
1
2
  import { Key, Node } from '@react-types/shared';
2
3
  import { InputHTMLAttributes, MutableRefObject } from 'react';
3
4
  import { Control, UseFormSetValue, UseFormWatch } from 'react-hook-form';
@@ -8,13 +9,15 @@ import { IOutlineContainerProps } from '../../types';
8
9
  * @interface IItem
9
10
  * @property { string } [group] - Optional group header for the item.
10
11
  * @property { string } [href] - The href of the item.
12
+ * @property { IconName } [icon] - Optional icon shown before the name.
11
13
  * @property { string } name - The name of the item.
12
- * @property { string } [tag] - Optional tag of the item.
14
+ * @property { string } [tag] - Optional tag shown at the end of the item.
13
15
  * @property { string } value - The value of the item.
14
16
  */
15
17
  interface IItem {
16
18
  group?: string;
17
19
  href?: string;
20
+ icon?: IconName;
18
21
  name: string;
19
22
  tag?: string;
20
23
  value: string;
@@ -24,6 +27,7 @@ interface IItem {
24
27
  * @interface IOptionProps
25
28
  * @property { MutableRefObject } containerRef - The ref of the ComboBox container.
26
29
  * @property { string } [countLabel] - Plural noun of the selection summary.
30
+ * @property { IconName } [icon] - Optional icon shown before the name.
27
31
  * @property { IItem } item - The item to be rendered as an option.
28
32
  * @property { boolean } multiSelection - Enable to select more than one option.
29
33
  * @property { string } name - The name of the Select.
@@ -35,6 +39,7 @@ interface IOptionProps<T> {
35
39
  allItemKeys: string[];
36
40
  containerRef: MutableRefObject<HTMLDivElement | null>;
37
41
  countLabel?: string;
42
+ icon?: IconName;
38
43
  item: Node<IItem>;
39
44
  multiSelection: boolean;
40
45
  name: string;
@@ -1,17 +1,17 @@
1
1
  import { jsxs as f, jsx as o } from "react/jsx-runtime";
2
- import { useRef as P, useCallback as y } from "react";
3
- import { useButton as x } from "../../../../node_modules/react-aria/dist/private/button/useButton.js";
2
+ import { useRef as $, useCallback as x } from "react";
3
+ import { useButton as y } from "../../../../node_modules/react-aria/dist/private/button/useButton.js";
4
4
  import { useOverlayTrigger as T } from "../../../../node_modules/react-aria/dist/private/overlays/useOverlayTrigger.js";
5
5
  import { useOverlayTriggerState as v } from "../../../../node_modules/react-stately/dist/private/overlays/useOverlayTriggerState.js";
6
6
  import { MonthPanel as O } from "./panel.js";
7
- import { TriggerButton as S } from "./styles.js";
8
- import { formatPeriod as C } from "./utils.js";
9
- import { OutlineContainer as j } from "../../outline-container/index.js";
10
- import { Dialog as k } from "../../utils/dialog/index.js";
11
- import { Popover as z } from "../../utils/popover/index.js";
12
- import { theme as B } from "../../../colors/index.js";
7
+ import { TriggerButton as S, PeriodText as C } from "./styles.js";
8
+ import { formatPeriod as j } from "./utils.js";
9
+ import { OutlineContainer as k } from "../../outline-container/index.js";
10
+ import { Dialog as z } from "../../utils/dialog/index.js";
11
+ import { Popover as B } from "../../utils/popover/index.js";
12
+ import { theme as D } from "../../../colors/index.js";
13
13
  import { Icon as p } from "../../../icon/index.js";
14
- const L = ({
14
+ const N = ({
15
15
  disabled: t = !1,
16
16
  label: n,
17
17
  maxValue: a,
@@ -20,20 +20,20 @@ const L = ({
20
20
  onChange: s,
21
21
  value: l
22
22
  }) => {
23
- const e = P(null), r = v({}), { close: c } = r, { triggerProps: d, overlayProps: h } = T(
23
+ const e = $(null), r = v({}), { close: c } = r, { triggerProps: d, overlayProps: h } = T(
24
24
  { type: "dialog" },
25
25
  r,
26
26
  e
27
- ), { buttonProps: u } = x(
27
+ ), { buttonProps: u } = y(
28
28
  { ...d, isDisabled: t, onPress: r.toggle },
29
29
  e
30
- ), b = y(
31
- ($) => {
32
- s($), c();
30
+ ), b = x(
31
+ (P) => {
32
+ s(P), c();
33
33
  },
34
34
  [c, s]
35
- ), m = B.palette.gray[t ? 400 : 700];
36
- return /* @__PURE__ */ f(j, { htmlFor: i, label: n, children: [
35
+ ), m = D.palette.gray[t ? 400 : 700];
36
+ return /* @__PURE__ */ f(k, { htmlFor: i, label: n, children: [
37
37
  /* @__PURE__ */ f(S, { ...u, id: i, ref: e, children: [
38
38
  /* @__PURE__ */ o(
39
39
  p,
@@ -44,7 +44,7 @@ const L = ({
44
44
  iconType: "fa-light"
45
45
  }
46
46
  ),
47
- /* @__PURE__ */ o("span", { children: C(l) }),
47
+ /* @__PURE__ */ o(C, { children: j(l) }),
48
48
  /* @__PURE__ */ o(
49
49
  p,
50
50
  {
@@ -56,13 +56,13 @@ const L = ({
56
56
  )
57
57
  ] }),
58
58
  r.isOpen && !t ? /* @__PURE__ */ o(
59
- z,
59
+ B,
60
60
  {
61
61
  offset: 8,
62
62
  placement: "bottom end",
63
63
  state: r,
64
64
  triggerRef: e,
65
- children: /* @__PURE__ */ o(k, { ...h, "aria-label": n ?? i, children: /* @__PURE__ */ o(
65
+ children: /* @__PURE__ */ o(z, { ...h, "aria-label": n ?? i, children: /* @__PURE__ */ o(
66
66
  O,
67
67
  {
68
68
  maxValue: a,
@@ -77,5 +77,5 @@ const L = ({
77
77
  ] });
78
78
  };
79
79
  export {
80
- L as MonthPicker
80
+ N as MonthPicker
81
81
  };
@@ -91,8 +91,6 @@ const D = 0, B = 11, v = (t) => t === void 0 ? void 0 : M(t)?.year, H = (t, e, r
91
91
  t
92
92
  ),
93
93
  onClick: u,
94
- px: 0.5,
95
- py: 0.625,
96
94
  variant: "textLink",
97
95
  children: "Today"
98
96
  }
@@ -1,6 +1,7 @@
1
1
  declare const TriggerButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never> & Partial<Pick<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>>> & string;
2
+ declare const PeriodText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never> & Partial<Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>>> & string;
2
3
  declare const YearBar: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
3
4
  declare const MonthGrid: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
4
5
  declare const MonthItem: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never> & Partial<Pick<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>>> & string;
5
6
  declare const Footer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
6
- export { Footer, MonthGrid, MonthItem, TriggerButton, YearBar };
7
+ export { Footer, MonthGrid, MonthItem, PeriodText, TriggerButton, YearBar };
@@ -1,5 +1,5 @@
1
- import { styled as r } from "styled-components";
2
- const a = r.button`
1
+ import { styled as a } from "styled-components";
2
+ const o = a.button`
3
3
  ${({ theme: t }) => `
4
4
  align-items: center;
5
5
  background: ${t.palette.white};
@@ -31,13 +31,11 @@ const a = r.button`
31
31
  color: ${t.palette.gray[400]};
32
32
  cursor: not-allowed;
33
33
  }
34
-
35
- > span {
36
- flex: 1;
37
- text-align: left;
38
- }
39
34
  `}
40
- `, e = r.div`
35
+ `, p = a.span`
36
+ flex: 1;
37
+ text-align: left;
38
+ `, i = a.div`
41
39
  ${({ theme: t }) => `
42
40
  align-items: center;
43
41
  color: ${t.palette.gray[800]};
@@ -58,11 +56,11 @@ const a = r.button`
58
56
  width: 200px;
59
57
  }
60
58
  `}
61
- `, p = r.div`
59
+ `, n = a.div`
62
60
  display: grid;
63
61
  grid-template-columns: repeat(4, 1fr);
64
62
  width: 100%;
65
- `, i = r.button`
63
+ `, e = a.button`
66
64
  ${({ theme: t }) => `
67
65
  background: none;
68
66
  border: none;
@@ -86,19 +84,26 @@ const a = r.button`
86
84
  cursor: auto;
87
85
  }
88
86
  `}
89
- `, n = r.div`
87
+ `, d = a.div`
90
88
  ${({ theme: t }) => `
91
89
  align-items: center;
92
90
  border-top: 1px solid ${t.palette.gray[200]};
93
91
  display: flex;
94
92
  justify-content: space-between;
93
+ padding: ${t.spacing[0.25]} 0;
95
94
  width: 100%;
95
+
96
+ > button {
97
+ --btn-padding-x: ${t.spacing[0.5]};
98
+ --btn-padding-y: ${t.spacing[0.625]};
99
+ }
96
100
  `}
97
101
  `;
98
102
  export {
99
- n as Footer,
100
- p as MonthGrid,
101
- i as MonthItem,
102
- a as TriggerButton,
103
- e as YearBar
103
+ d as Footer,
104
+ n as MonthGrid,
105
+ e as MonthItem,
106
+ p as PeriodText,
107
+ o as TriggerButton,
108
+ i as YearBar
104
109
  };
package/package.json CHANGED
@@ -135,5 +135,5 @@
135
135
  "./dist/index.js"
136
136
  ],
137
137
  "typings": "./dist/index.d.ts",
138
- "version": "11.11.0"
138
+ "version": "11.11.1"
139
139
  }