@tesouro/embedded-components-react 0.11.219 → 0.11.221

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/README.md +11 -7
  2. package/dist/experimental/QuickViewWidget.d.ts +25 -13
  3. package/dist/experimental/index.d.ts +25 -13
  4. package/dist/index.css +394 -30
  5. package/dist/index.d.ts +24 -7
  6. package/dist/lib/AcceptDisclosuresWidget.d.ts +6 -2
  7. package/dist/lib/BankAccountsWidget.d.ts +4 -0
  8. package/dist/lib/BillPayWidget.d.ts +4 -3
  9. package/dist/lib/ExpenseManagementWidget.d.ts +7 -0
  10. package/dist/lib/ReceivablesWidget.d.ts +3 -2
  11. package/dist/lib/WidgetSuite.d.ts +13 -1
  12. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js +1 -2
  13. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/lib/AcceptDisclosuresWidget/resolveAcceptDisclosuresContent.js +1 -2
  14. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js +0 -1
  15. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +7 -0
  16. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index9.js +1 -1
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +5 -1
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index12.js +27 -13
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index29.js +1 -0
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index31.js +3 -0
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillPayWidget.js +61 -51
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +6 -6
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js +48 -37
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +28 -30
  25. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/ui/dist/index2.js +1 -0
  26. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/ui/dist/index5.js +3 -0
  27. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/AccordionItemCard/AccordionItemCard.js +8 -3
  28. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesTransactionsFilterBar/ExpensesTransactionsFilterBar.js +1 -1
  29. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/FileViewer.js +3 -0
  30. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/labels.js +1 -0
  31. package/dist/libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/SingleInsight/SingleInsight.js +47 -44
  32. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +105 -97
  33. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +21 -21
  34. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +66 -63
  35. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +73 -74
  36. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +2 -1
  37. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +4 -1
  38. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +42 -35
  39. package/dist/libs/tesouro-embedded-components-react/offer-widget/ui/dist/index7.js +1 -1
  40. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/feature/dist/lib/BillsQuickViewWidget/BillsQuickViewWidgetFeature.js +0 -8
  41. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/ui/dist/index3.js +13 -14
  42. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/lib/CardsQuickViewWidget/CardsQuickViewWidgetFeature.js +1 -6
  43. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/ui/dist/index3.js +5 -5
  44. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/invoices/feature/dist/lib/InvoicesQuickViewWidget/InvoicesQuickViewWidgetFeature.js +0 -8
  45. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/invoices/ui/dist/index3.js +13 -14
  46. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/ui/dist/index6.js +1 -0
  47. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index12.js +5 -6
  48. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index3.js +1 -1
  49. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +119 -119
  50. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  51. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index9.js +86 -77
  52. package/dist/libs/tesouro-embedded-components-react/shared/quick-view/ui/dist/index3.js +18 -19
  53. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/ConsentBlock/ConsentBlock.js +11 -12
  54. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/FdicLogo.js +76 -72
  55. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js +7 -5
  56. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/UploadTray/UploadTray.js +49 -43
  57. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/theme/createTheme.js +20 -4
  58. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/theme/themeTokens.js +10 -10
  59. package/dist/libs/tesouro-embedded-components-react/upload-receipt-widget/feature/dist/lib/UploadReceiptWidget.js +1 -0
  60. package/dist/libs/tesouro-embedded-components-react/upload-receipt-widget/ui/dist/index2.js +1 -0
  61. package/dist/packages/shared-ui-shadcn/dist/index.js +141 -124
  62. package/package.json +1 -1
@@ -61,7 +61,7 @@ var e = {
61
61
  "--ttw-secondary": "oklch(0.97 0 0)",
62
62
  "--ttw-secondary-foreground": "oklch(0.205 0 0)",
63
63
  "--ttw-muted": "oklch(0.97 0 0)",
64
- "--ttw-muted-foreground": "oklch(0.556 0 0)",
64
+ "--ttw-muted-foreground": "oklch(0.53 0 0)",
65
65
  "--ttw-accent": "oklch(0.97 0 0)",
66
66
  "--ttw-accent-foreground": "oklch(0.205 0 0)",
67
67
  "--ttw-destructive": "#dc2626",
@@ -85,7 +85,7 @@ var e = {
85
85
  "--ttw-sidebar-accent-foreground": "--ttw-accent-foreground",
86
86
  "--ttw-sidebar-border": "--ttw-border",
87
87
  "--ttw-sidebar-ring": "--ttw-ring"
88
- }, r = 4.5, i = [
88
+ }, r = 4.5, i = r, a = [
89
89
  {
90
90
  fill: "--ttw-background",
91
91
  text: "--ttw-foreground"
@@ -109,7 +109,7 @@ var e = {
109
109
  {
110
110
  fill: "--ttw-muted",
111
111
  text: "--ttw-muted-foreground",
112
- minimum: 3
112
+ minimum: i
113
113
  },
114
114
  {
115
115
  fill: "--ttw-accent",
@@ -131,7 +131,7 @@ var e = {
131
131
  fill: "--ttw-sidebar-accent",
132
132
  text: "--ttw-sidebar-accent-foreground"
133
133
  }
134
- ], a = [
134
+ ], o = [
135
135
  {
136
136
  hue: "--ttw-info",
137
137
  subtle: "--ttw-info-subtle",
@@ -162,14 +162,14 @@ var e = {
162
162
  subtle: "--ttw-cyan-subtle",
163
163
  text: "--ttw-cyan-foreground"
164
164
  }
165
- ], o = {
165
+ ], s = {
166
166
  mixWeight: .16,
167
167
  lightness: .56,
168
168
  chromaScale: 2.5
169
- }, s = {
169
+ }, c = {
170
170
  mixWeight: .6,
171
171
  lightness: .55
172
- }, c = {
172
+ }, l = {
173
173
  hueStep: 30,
174
174
  light: [
175
175
  .498,
@@ -201,11 +201,11 @@ var e = {
201
201
  .444,
202
202
  .396
203
203
  ]
204
- }, l = {
204
+ }, u = {
205
205
  subtle: .12,
206
206
  text: .6
207
- }, u = {
207
+ }, d = {
208
208
  min: 0,
209
209
  max: 1.25
210
210
  };
211
- export { t as DEFAULT_THEME_TOKENS, r as MIN_TEXT_CONTRAST, i as THEME_CONTRAST_PAIRS, u as THEME_RADIUS_RANGE_REM, n as THEME_TOKEN_FALLBACKS, e as THEME_TOKEN_NAMES, a as THEME_TONES, o as TONE_FILL, c as TONE_FILL_GAMUT, l as TONE_LEGACY_MIX, s as TONE_TEXT };
211
+ export { t as DEFAULT_THEME_TOKENS, i as MIN_MUTED_TEXT_CONTRAST, r as MIN_TEXT_CONTRAST, a as THEME_CONTRAST_PAIRS, d as THEME_RADIUS_RANGE_REM, n as THEME_TOKEN_FALLBACKS, e as THEME_TOKEN_NAMES, o as THEME_TONES, s as TONE_FILL, l as TONE_FILL_GAMUT, u as TONE_LEGACY_MIX, c as TONE_TEXT };
@@ -111,6 +111,7 @@ function f({ emailAddress: f, onFileUpload: p, onAwaitMatching: m, isUploading:
111
111
  className: "ttw:relative",
112
112
  children: [x && /* @__PURE__ */ c(e, {
113
113
  title: t.TrayTitle,
114
+ listLabel: t.TrayList,
114
115
  summary: C,
115
116
  closeLabel: t.CloseTray,
116
117
  collapseLabel: t.CollapseTray,
@@ -22,6 +22,7 @@ function n(e) {
22
22
  }
23
23
  var r = {
24
24
  TrayTitle: "Receipt uploads",
25
+ TrayList: "Uploaded receipts",
25
26
  CloseTray: "Close receipt uploads",
26
27
  CollapseTray: "Collapse receipt uploads",
27
28
  ExpandTray: "Expand receipt uploads",
@@ -8686,12 +8686,20 @@ function U_({ className: e, ...t }) {
8686
8686
  });
8687
8687
  }
8688
8688
  var W_ = { close: "Close" }, G_ = { loading: "Loading" };
8689
- function K_({ className: e, ...t }) {
8690
- return /* @__PURE__ */ y(be, {
8691
- role: "status",
8692
- "aria-label": G_.loading,
8689
+ function K_({ className: e, "aria-label": t = G_.loading, "aria-hidden": n, ...r }) {
8690
+ let i = /* @__PURE__ */ y(be, {
8691
+ "aria-hidden": !0,
8693
8692
  className: J("ttw:size-4 ttw:animate-spin", e),
8694
- ...t
8693
+ ...r
8694
+ });
8695
+ return n === !0 || n === "true" ? i : /* @__PURE__ */ b("span", {
8696
+ role: "status",
8697
+ "aria-label": t,
8698
+ className: "ttw:inline-flex",
8699
+ children: [i, /* @__PURE__ */ y("span", {
8700
+ className: "ttw:sr-only",
8701
+ children: t
8702
+ })]
8695
8703
  });
8696
8704
  }
8697
8705
  var q_ = z_("ttw:inline-flex ttw:cursor-pointer ttw:items-center ttw:justify-center ttw:gap-2 ttw:whitespace-nowrap ttw:rounded-md ttw:text-sm ttw:font-medium ttw:transition-all ttw:disabled:pointer-events-none ttw:disabled:opacity-50 ttw:[&_svg]:pointer-events-none ttw:[&_svg:not([class*='size-'])]:size-4 ttw:shrink-0 ttw:[&_svg]:shrink-0 ttw:outline-none ttw:focus-visible:border-ring ttw:focus-visible:ring-ring/50 ttw:focus-visible:ring-[3px] ttw:aria-invalid:ring-destructive/20 ttw:dark:aria-invalid:ring-destructive/40 ttw:aria-invalid:border-destructive", {
@@ -9140,7 +9148,7 @@ function qv({ items: e, value: t, onValueChange: r, inputId: i, required: a, inv
9140
9148
  }, [e]), I = !c && F[0] ? ie.get(F[0]) ?? F[0] : "", L = n.useMemo(() => {
9141
9149
  let t = ee.trim().toLowerCase();
9142
9150
  return t ? e.filter((e) => `${Kv(e)} ${Gv(e)}`.toLowerCase().includes(t)) : [...e];
9143
- }, [e, ee]);
9151
+ }, [e, ee]), ae = L.length > 0 || p, R = T && ae;
9144
9152
  n.useEffect(() => {
9145
9153
  k(L.length > 0 ? 0 : -1);
9146
9154
  }, [L]), n.useEffect(() => {
@@ -9164,11 +9172,11 @@ function qv({ items: e, value: t, onValueChange: r, inputId: i, required: a, inv
9164
9172
  document.removeEventListener("mousedown", e);
9165
9173
  };
9166
9174
  }, []);
9167
- let ae = (e) => {
9175
+ let z = (e) => {
9168
9176
  l || (c ? (F.includes(e) ? r(F.filter((t) => t !== e)) : r([...F, e]), N(""), C.current?.focus()) : (r(e), N(""), E(!1)));
9169
- }, R = (e) => {
9177
+ }, oe = (e) => {
9170
9178
  l || r(c ? F.filter((t) => t !== e) : "");
9171
- }, z = (e) => {
9179
+ }, se = (e) => {
9172
9180
  if (!l) {
9173
9181
  if (e.key === "ArrowDown") e.preventDefault(), E(!0), L.length > 0 && k((e) => e < 0 ? 0 : Math.min(e + 1, L.length - 1));
9174
9182
  else if (e.key === "ArrowUp") e.preventDefault(), E(!0), L.length > 0 && k((e) => e < 0 ? 0 : Math.max(e - 1, 0));
@@ -9178,7 +9186,7 @@ function qv({ items: e, value: t, onValueChange: r, inputId: i, required: a, inv
9178
9186
  return;
9179
9187
  }
9180
9188
  let t = L[O];
9181
- O >= 0 && t && ae(Gv(t));
9189
+ O >= 0 && t && z(Gv(t));
9182
9190
  } else if (e.key === "Escape") {
9183
9191
  if (!T) return;
9184
9192
  e.stopPropagation(), E(!1), N("");
@@ -9189,119 +9197,127 @@ function qv({ items: e, value: t, onValueChange: r, inputId: i, required: a, inv
9189
9197
  ref: S,
9190
9198
  className: J("ttw:relative ttw:w-full", g),
9191
9199
  ...v,
9192
- children: [/* @__PURE__ */ b("div", {
9193
- className: J("ttw:flex ttw:min-h-9 ttw:w-full ttw:flex-wrap ttw:items-center ttw:gap-1.5 ttw:rounded-md ttw:border ttw:border-input ttw:bg-transparent ttw:px-2.5 ttw:py-1.5 ttw:text-sm ttw:shadow-xs", l ? "ttw:cursor-not-allowed ttw:opacity-60" : "ttw:focus-within:border-ring ttw:focus-within:ring-[3px] ttw:focus-within:ring-ring/50", o && "ttw:border-destructive ttw:focus-within:border-destructive ttw:focus-within:ring-destructive/20"),
9194
- onClick: () => {
9195
- l || (T || N(""), E(!0), C.current?.focus());
9196
- },
9197
- children: [
9198
- c ? F.map((e) => {
9199
- let t = ie.get(e) ?? e;
9200
- return /* @__PURE__ */ b("span", {
9201
- className: "ttw:flex ttw:min-h-5.5 ttw:min-w-0 ttw:max-w-full ttw:items-center ttw:gap-1 ttw:rounded-sm ttw:bg-muted ttw:pl-1.5 ttw:pr-0.5 ttw:text-xs ttw:font-medium",
9202
- style: {
9203
- backgroundColor: u,
9204
- color: d
9205
- },
9206
- children: [/* @__PURE__ */ y("span", {
9207
- className: "ttw:min-w-0 ttw:flex-1 ttw:truncate",
9208
- children: t
9209
- }), /* @__PURE__ */ y("button", {
9210
- type: "button",
9211
- disabled: l,
9212
- "aria-label": Hv(x.removeAriaLabel, { label: t }),
9213
- className: J("ttw:inline-flex ttw:size-4 ttw:shrink-0 ttw:items-center ttw:justify-center ttw:rounded-sm ttw:opacity-60", l ? "ttw:cursor-not-allowed" : "ttw:cursor-pointer ttw:hover:opacity-100"),
9214
- onClick: (t) => {
9215
- l || (t.stopPropagation(), R(e));
9200
+ children: [
9201
+ /* @__PURE__ */ b("div", {
9202
+ className: J("ttw:flex ttw:min-h-9 ttw:w-full ttw:flex-wrap ttw:items-center ttw:gap-1.5 ttw:rounded-md ttw:border ttw:border-input ttw:bg-transparent ttw:px-2.5 ttw:py-1.5 ttw:text-sm ttw:shadow-xs", l ? "ttw:cursor-not-allowed ttw:opacity-60" : "ttw:focus-within:border-ring ttw:focus-within:ring-[3px] ttw:focus-within:ring-ring/50", o && "ttw:border-destructive ttw:focus-within:border-destructive ttw:focus-within:ring-destructive/20"),
9203
+ onClick: () => {
9204
+ l || (T || N(""), E(!0), C.current?.focus());
9205
+ },
9206
+ children: [
9207
+ c ? F.map((e) => {
9208
+ let t = ie.get(e) ?? e;
9209
+ return /* @__PURE__ */ b("span", {
9210
+ className: "ttw:flex ttw:min-h-5.5 ttw:min-w-0 ttw:max-w-full ttw:items-center ttw:gap-1 ttw:rounded-sm ttw:bg-muted ttw:pl-1.5 ttw:pr-0.5 ttw:text-xs ttw:font-medium",
9211
+ style: {
9212
+ backgroundColor: u,
9213
+ color: d
9216
9214
  },
9217
- children: /* @__PURE__ */ y(Se, { className: "ttw:size-3" })
9218
- })]
9219
- }, e);
9220
- }) : null,
9221
- /* @__PURE__ */ y("input", {
9222
- ref: C,
9223
- id: i,
9224
- type: "text",
9225
- role: "combobox",
9226
- "aria-expanded": T,
9227
- "aria-controls": T ? A : void 0,
9228
- "aria-autocomplete": "list",
9229
- "aria-activedescendant": T && L[O] ? j(O) : void 0,
9230
- disabled: l,
9231
- "aria-required": a || void 0,
9232
- "aria-invalid": o || void 0,
9233
- "aria-describedby": s,
9234
- value: !c && !T ? I : ee,
9235
- placeholder: x.placeholder,
9236
- className: "ttw:min-w-16 ttw:flex-1 ttw:bg-transparent ttw:outline-none",
9237
- onFocus: () => {
9238
- l || (T || N(""), E(!0));
9239
- },
9240
- onChange: (e) => {
9241
- if (T) N(e.target.value), E(!0);
9242
- else {
9243
- let t = e.nativeEvent.data ?? "";
9244
- N(t), E(!0);
9245
- }
9246
- },
9247
- onKeyDown: z
9248
- }),
9249
- !c && !l && F.length > 0 ? /* @__PURE__ */ y("button", {
9250
- type: "button",
9251
- "aria-label": x.clearAriaLabel,
9252
- className: "ttw:inline-flex ttw:size-4 ttw:shrink-0 ttw:cursor-pointer ttw:items-center ttw:justify-center ttw:rounded-sm ttw:opacity-60 ttw:hover:opacity-100",
9253
- onClick: (e) => {
9254
- e.stopPropagation(), R(F[0]), N("");
9255
- },
9256
- children: /* @__PURE__ */ y(Se, { className: "ttw:size-3" })
9257
- }) : null
9258
- ]
9259
- }), T && ne ? _(/* @__PURE__ */ y("div", {
9260
- ref: te,
9261
- style: {
9262
- position: "fixed",
9263
- top: ne.top + 6,
9264
- left: ne.left,
9265
- width: ne.width,
9266
- pointerEvents: "auto"
9267
- },
9268
- className: "ttw:z-50 ttw:max-h-80 ttw:rounded-md ttw:bg-popover ttw:text-popover-foreground ttw:shadow-md ttw:ring-1 ttw:ring-foreground/10",
9269
- onPointerDown: (e) => e.stopPropagation(),
9270
- children: /* @__PURE__ */ b("ul", {
9271
- ref: w,
9272
- id: A,
9273
- role: "listbox",
9274
- "aria-multiselectable": c || void 0,
9275
- className: "ttw:max-h-80 ttw:overflow-y-auto ttw:p-1",
9276
- onScroll: () => {
9277
- if (!f || !w.current) return;
9278
- let { scrollTop: e, scrollHeight: t, clientHeight: n } = w.current;
9279
- t - e - n < 50 && f();
9215
+ children: [/* @__PURE__ */ y("span", {
9216
+ className: "ttw:min-w-0 ttw:flex-1 ttw:truncate",
9217
+ children: t
9218
+ }), /* @__PURE__ */ y("button", {
9219
+ type: "button",
9220
+ disabled: l,
9221
+ "aria-label": Hv(x.removeAriaLabel, { label: t }),
9222
+ className: J("ttw:inline-flex ttw:size-4 ttw:shrink-0 ttw:items-center ttw:justify-center ttw:rounded-sm ttw:opacity-60", l ? "ttw:cursor-not-allowed" : "ttw:cursor-pointer ttw:hover:opacity-100"),
9223
+ onClick: (t) => {
9224
+ l || (t.stopPropagation(), oe(e));
9225
+ },
9226
+ children: /* @__PURE__ */ y(Se, { className: "ttw:size-3" })
9227
+ })]
9228
+ }, e);
9229
+ }) : null,
9230
+ /* @__PURE__ */ y("input", {
9231
+ ref: C,
9232
+ id: i,
9233
+ type: "text",
9234
+ role: "combobox",
9235
+ "aria-expanded": R,
9236
+ "aria-controls": R ? A : void 0,
9237
+ "aria-autocomplete": "list",
9238
+ "aria-activedescendant": T && L[O] ? j(O) : void 0,
9239
+ disabled: l,
9240
+ "aria-required": a || void 0,
9241
+ "aria-invalid": o || void 0,
9242
+ "aria-describedby": s,
9243
+ value: !c && !T ? I : ee,
9244
+ placeholder: x.placeholder,
9245
+ className: "ttw:min-w-16 ttw:flex-1 ttw:bg-transparent ttw:outline-none",
9246
+ onFocus: () => {
9247
+ l || (T || N(""), E(!0));
9248
+ },
9249
+ onChange: (e) => {
9250
+ if (T) N(e.target.value), E(!0);
9251
+ else {
9252
+ let t = e.nativeEvent.data ?? "";
9253
+ N(t), E(!0);
9254
+ }
9255
+ },
9256
+ onKeyDown: se
9257
+ }),
9258
+ !c && !l && F.length > 0 ? /* @__PURE__ */ y("button", {
9259
+ type: "button",
9260
+ "aria-label": x.clearAriaLabel,
9261
+ className: "ttw:inline-flex ttw:size-4 ttw:shrink-0 ttw:cursor-pointer ttw:items-center ttw:justify-center ttw:rounded-sm ttw:opacity-60 ttw:hover:opacity-100",
9262
+ onClick: (e) => {
9263
+ e.stopPropagation(), oe(F[0]), N("");
9264
+ },
9265
+ children: /* @__PURE__ */ y(Se, { className: "ttw:size-3" })
9266
+ }) : null
9267
+ ]
9268
+ }),
9269
+ /* @__PURE__ */ y("div", {
9270
+ role: "status",
9271
+ className: "ttw:sr-only",
9272
+ children: T && L.length === 0 ? x.emptyMessage : null
9273
+ }),
9274
+ T && ne ? _(/* @__PURE__ */ b("div", {
9275
+ ref: te,
9276
+ style: {
9277
+ position: "fixed",
9278
+ top: ne.top + 6,
9279
+ left: ne.left,
9280
+ width: ne.width,
9281
+ pointerEvents: "auto"
9280
9282
  },
9281
- children: [L.length === 0 ? /* @__PURE__ */ y("li", {
9282
- role: "presentation",
9283
- className: "ttw:px-2 ttw:py-2 ttw:text-sm ttw:text-muted-foreground",
9283
+ className: "ttw:z-50 ttw:max-h-80 ttw:rounded-md ttw:bg-popover ttw:text-popover-foreground ttw:shadow-md ttw:ring-1 ttw:ring-foreground/10",
9284
+ onPointerDown: (e) => e.stopPropagation(),
9285
+ children: [L.length === 0 ? /* @__PURE__ */ y("div", {
9286
+ "aria-hidden": !0,
9287
+ className: "ttw:px-3 ttw:py-3 ttw:text-sm ttw:text-muted-foreground",
9284
9288
  children: x.emptyMessage
9285
- }) : L.map((e, t) => {
9286
- let n = Gv(e), r = F.includes(n), i = O === t;
9287
- return /* @__PURE__ */ b("li", {
9288
- id: j(t),
9289
- role: "option",
9290
- "aria-selected": r,
9291
- className: J("ttw:flex ttw:w-full ttw:cursor-pointer ttw:items-center ttw:gap-2 ttw:rounded-sm ttw:px-2 ttw:py-1.5 ttw:text-sm", i ? "ttw:bg-accent ttw:text-accent-foreground" : "ttw:hover:bg-accent ttw:hover:text-accent-foreground"),
9292
- onMouseEnter: () => k(t),
9293
- onMouseDown: (e) => {
9294
- e.preventDefault(), ae(n);
9295
- },
9296
- children: [Kv(e), r ? /* @__PURE__ */ y(le, { className: "ttw:ml-auto ttw:size-4" }) : null]
9297
- }, n);
9298
- }), p ? /* @__PURE__ */ y("li", {
9299
- role: "presentation",
9300
- className: "ttw:px-2 ttw:py-2 ttw:text-center ttw:text-sm ttw:text-muted-foreground",
9301
- children: x.loadingMore
9302
- }) : null]
9303
- })
9304
- }), P ?? document.body) : null]
9289
+ }) : null, /* @__PURE__ */ b("ul", {
9290
+ ref: w,
9291
+ id: A,
9292
+ role: "listbox",
9293
+ "aria-multiselectable": c || void 0,
9294
+ className: J("ttw:max-h-80 ttw:overflow-y-auto ttw:p-1", !ae && "ttw:hidden"),
9295
+ onScroll: () => {
9296
+ if (!f || !w.current) return;
9297
+ let { scrollTop: e, scrollHeight: t, clientHeight: n } = w.current;
9298
+ t - e - n < 50 && f();
9299
+ },
9300
+ children: [L.map((e, t) => {
9301
+ let n = Gv(e), r = F.includes(n), i = O === t;
9302
+ return /* @__PURE__ */ b("li", {
9303
+ id: j(t),
9304
+ role: "option",
9305
+ "aria-selected": r,
9306
+ className: J("ttw:flex ttw:w-full ttw:cursor-pointer ttw:items-center ttw:gap-2 ttw:rounded-sm ttw:px-2 ttw:py-1.5 ttw:text-sm", i ? "ttw:bg-accent ttw:text-accent-foreground" : "ttw:hover:bg-accent ttw:hover:text-accent-foreground"),
9307
+ onMouseEnter: () => k(t),
9308
+ onMouseDown: (e) => {
9309
+ e.preventDefault(), z(n);
9310
+ },
9311
+ children: [Kv(e), r ? /* @__PURE__ */ y(le, { className: "ttw:ml-auto ttw:size-4" }) : null]
9312
+ }, n);
9313
+ }), p ? /* @__PURE__ */ y("li", {
9314
+ role: "presentation",
9315
+ className: "ttw:px-2 ttw:py-2 ttw:text-center ttw:text-sm ttw:text-muted-foreground",
9316
+ children: x.loadingMore
9317
+ }) : null]
9318
+ })]
9319
+ }), P ?? document.body) : null
9320
+ ]
9305
9321
  });
9306
9322
  }
9307
9323
  var Jv = {
@@ -9402,7 +9418,7 @@ function ey({ className: e, inset: t, variant: n = "default", ...r }) {
9402
9418
  "data-slot": "context-menu-item",
9403
9419
  "data-inset": t,
9404
9420
  "data-variant": n,
9405
- className: J("ttw:focus:bg-accent ttw:focus:text-accent-foreground ttw:data-[variant=destructive]:text-destructive ttw:data-[variant=destructive]:focus:bg-destructive/10 ttw:dark:data-[variant=destructive]:focus:bg-destructive/20 ttw:data-[variant=destructive]:focus:text-destructive ttw:data-[variant=destructive]:*:[svg]:!text-destructive ttw:[&_svg:not([class*=text-])]:text-muted-foreground ttw:relative ttw:flex ttw:cursor-pointer ttw:items-center ttw:gap-2 ttw:rounded-sm ttw:px-2 ttw:py-1.5 ttw:text-sm ttw:outline-hidden ttw:select-none ttw:data-[disabled]:pointer-events-none ttw:data-[disabled]:opacity-50 ttw:data-[inset]:pl-8 ttw:[&_svg]:pointer-events-none ttw:[&_svg]:shrink-0 ttw:[&_svg:not([class*=size-])]:size-4", e),
9421
+ className: J("ttw:focus:bg-accent ttw:focus:text-accent-foreground ttw:data-[variant=destructive]:text-destructive ttw:data-[variant=destructive]:focus:bg-destructive-subtle ttw:data-[variant=destructive]:focus:text-destructive-subtle-foreground ttw:data-[variant=destructive]:*:[svg]:!text-destructive ttw:[&_svg:not([class*=text-])]:text-muted-foreground ttw:relative ttw:flex ttw:cursor-pointer ttw:items-center ttw:gap-2 ttw:rounded-sm ttw:px-2 ttw:py-1.5 ttw:text-sm ttw:outline-hidden ttw:select-none ttw:data-[disabled]:pointer-events-none ttw:data-[disabled]:opacity-50 ttw:data-[inset]:pl-8 ttw:[&_svg]:pointer-events-none ttw:[&_svg]:shrink-0 ttw:[&_svg:not([class*=size-])]:size-4", e),
9406
9422
  ...r
9407
9423
  });
9408
9424
  }
@@ -9462,7 +9478,7 @@ function sy({ className: e, inset: t, variant: n = "default", ...r }) {
9462
9478
  "data-slot": "dropdown-menu-item",
9463
9479
  "data-inset": t,
9464
9480
  "data-variant": n,
9465
- className: J("ttw:focus:bg-accent ttw:focus:text-accent-foreground ttw:data-[variant=destructive]:text-destructive ttw:data-[variant=destructive]:focus:bg-destructive/10 ttw:dark:data-[variant=destructive]:focus:bg-destructive/20 ttw:data-[variant=destructive]:focus:text-destructive ttw:data-[variant=destructive]:*:[svg]:!text-destructive ttw:[&_svg:not([class*=text-])]:text-muted-foreground ttw:relative ttw:flex ttw:cursor-pointer ttw:items-center ttw:gap-2 ttw:rounded-sm ttw:px-2 ttw:py-1.5 ttw:text-sm ttw:outline-hidden ttw:select-none ttw:data-[disabled]:pointer-events-none ttw:data-[disabled]:opacity-50 ttw:data-[inset]:pl-8 ttw:[&_svg]:pointer-events-none ttw:[&_svg]:shrink-0 ttw:[&_svg:not([class*=size-])]:size-4", e),
9481
+ className: J("ttw:focus:bg-accent ttw:focus:text-accent-foreground ttw:data-[variant=destructive]:text-destructive ttw:data-[variant=destructive]:focus:bg-destructive-subtle ttw:data-[variant=destructive]:focus:text-destructive-subtle-foreground ttw:data-[variant=destructive]:*:[svg]:!text-destructive ttw:[&_svg:not([class*=text-])]:text-muted-foreground ttw:relative ttw:flex ttw:cursor-pointer ttw:items-center ttw:gap-2 ttw:rounded-sm ttw:px-2 ttw:py-1.5 ttw:text-sm ttw:outline-hidden ttw:select-none ttw:data-[disabled]:pointer-events-none ttw:data-[disabled]:opacity-50 ttw:data-[inset]:pl-8 ttw:[&_svg]:pointer-events-none ttw:[&_svg]:shrink-0 ttw:[&_svg:not([class*=size-])]:size-4", e),
9466
9482
  ...r
9467
9483
  });
9468
9484
  }
@@ -9735,7 +9751,7 @@ function Ly({ hasNextPage: e = !1, hasPrevPage: t = !1, onNextPage: r, onPrevPag
9735
9751
  let p = {
9736
9752
  ...Iy,
9737
9753
  ...d
9738
- }, m = n.useId();
9754
+ }, m = n.useId(), h = n.useId();
9739
9755
  return /* @__PURE__ */ b("div", {
9740
9756
  "data-slot": "table-pagination",
9741
9757
  className: J("ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-end ttw:gap-x-6 ttw:gap-y-2 ttw:border-t ttw:border-border ttw:px-4 ttw:py-2 ttw:text-sm ttw:text-muted-foreground", f),
@@ -9754,8 +9770,9 @@ function Ly({ hasNextPage: e = !1, hasPrevPage: t = !1, onNextPage: r, onPrevPag
9754
9770
  disabled: l,
9755
9771
  onValueChange: (e) => c(Number(e)),
9756
9772
  children: [/* @__PURE__ */ y(ky, {
9773
+ id: h,
9757
9774
  size: "sm",
9758
- "aria-labelledby": m,
9775
+ "aria-labelledby": `${m} ${h}`,
9759
9776
  className: "ttw:text-foreground",
9760
9777
  children: /* @__PURE__ */ y(Oy, {})
9761
9778
  }), /* @__PURE__ */ y(Ay, { children: s.map((e) => /* @__PURE__ */ y(My, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.11.219",
3
+ "version": "0.11.221",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": [