@viasat/beam-shared 2.73.0 → 2.75.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/chunks/{accordion.CCM7ddD5.js → accordion.A3yltWFz.js} +5 -4
  2. package/chunks/accordion.DP1rm9_A.js +1 -0
  3. package/chunks/alert.DwopRZkE.js +1 -0
  4. package/chunks/{alert.D8PMGdJr.js → alert.wF10G8FF.js} +3 -2
  5. package/chunks/badgeDot.C2TamtnU.js +1 -0
  6. package/chunks/{badgeDot.DBxqhjSs.js → badgeDot.CWtNxaFE.js} +8 -7
  7. package/chunks/{badgeIndicator.DZ9xMRTG.js → badgeIndicator.D-1CVwig.js} +8 -7
  8. package/chunks/badgeIndicator.D_QSrDSn.js +1 -0
  9. package/chunks/{button.C1OY75tc.js → button.ClWD-ds8.js} +18 -17
  10. package/chunks/button.DOHIUdLB.js +1 -0
  11. package/chunks/calendar.23PKEXn7.js +25 -0
  12. package/chunks/calendar.CYTsVQ2I.js +1 -0
  13. package/chunks/card.C-tARzEH.js +1 -0
  14. package/chunks/{card.B_VSRP8W.js → card.CotmXW0w.js} +3 -2
  15. package/chunks/{closeButton.g8_iRoUg.js → closeButton.DkQemJOw.js} +3 -2
  16. package/chunks/closeButton.ds6dqaBH.js +1 -0
  17. package/chunks/{dataTable.CPblcOmF.js → dataTable.CaaWvLAY.js} +3 -2
  18. package/chunks/dataTable.CeVBbrdO.js +1 -0
  19. package/chunks/divider.BN-f6rLo.js +1 -0
  20. package/chunks/{divider.D2kuHop2.js → divider.DSeF--BE.js} +6 -5
  21. package/chunks/{fileUpload.CzC_CuxM.js → fileUpload.BAVGAhL-.js} +3 -2
  22. package/chunks/fileUpload.DQkUV9mF.js +1 -0
  23. package/chunks/form.C62JejOl.js +1 -0
  24. package/chunks/{form.CTBHjnJb.js → form.DyDc2mHF.js} +1 -1
  25. package/chunks/icon.DHBnR0qq.js +1 -0
  26. package/chunks/{icon.tCAxaKQh.js → icon.sWtREjWm.js} +3 -2
  27. package/chunks/input.BBEKFcgF.js +1 -0
  28. package/chunks/{input.DG5FyEpi.js → input.CLQm-Cl1.js} +4 -3
  29. package/chunks/link.DPUMLs5q.js +1 -0
  30. package/chunks/{link.D_ySgWgk.js → link.TLlyYgo1.js} +8 -7
  31. package/chunks/list.B0NvdwcQ.js +1 -0
  32. package/chunks/{list.BwnGPz2Y.js → list.BNHkai5G.js} +11 -10
  33. package/chunks/{logo.Cl29Chxj.js → logo.DUDVVJUM.js} +3 -2
  34. package/chunks/logo.H5nutttf.js +1 -0
  35. package/chunks/{panel.B1cO_Hpy.js → panel.Cj46nBOO.js} +1 -1
  36. package/chunks/{panel.CBf44fut.js → panel.DO4zEX0X.js} +1 -1
  37. package/chunks/progressBar.BG-rn01v.js +1 -0
  38. package/chunks/{progressBar.Bb9NF0G2.js → progressBar.DbECMGBt.js} +11 -10
  39. package/chunks/{spinner.g2VG2eDa.js → spinner.BbisT0VU.js} +3 -2
  40. package/chunks/spinner.D9_W0rjC.js +1 -0
  41. package/chunks/tabs.ButW3U8L.js +1 -0
  42. package/chunks/{tabs.C7gorntx.js → tabs.DfSBd-3J.js} +4 -3
  43. package/chunks/text.Boa7i2_y.js +1 -0
  44. package/chunks/{text.J0CEkrH-.js → text.Dd2FpK_P.js} +3 -2
  45. package/index.cjs.js +1 -1
  46. package/index.es.js +182 -170
  47. package/lib/components/accordion.cjs.js +1 -1
  48. package/lib/components/accordion.es.js +4 -3
  49. package/lib/components/alert.cjs.js +1 -1
  50. package/lib/components/alert.es.js +6 -5
  51. package/lib/components/badgeDot.cjs.js +1 -1
  52. package/lib/components/badgeDot.es.js +5 -4
  53. package/lib/components/badgeIndicator.cjs.js +1 -1
  54. package/lib/components/badgeIndicator.es.js +18 -17
  55. package/lib/components/button.cjs.js +1 -1
  56. package/lib/components/button.es.js +10 -9
  57. package/lib/components/calendar.cjs.js +1 -0
  58. package/lib/components/calendar.d.ts +12 -0
  59. package/lib/components/calendar.es.js +8 -0
  60. package/lib/components/card.cjs.js +1 -1
  61. package/lib/components/card.es.js +4 -3
  62. package/lib/components/closeButton.cjs.js +1 -1
  63. package/lib/components/closeButton.es.js +3 -2
  64. package/lib/components/dataTable.cjs.js +1 -1
  65. package/lib/components/dataTable.es.js +6 -5
  66. package/lib/components/divider.cjs.js +1 -1
  67. package/lib/components/divider.es.js +8 -7
  68. package/lib/components/fileUpload.cjs.js +1 -1
  69. package/lib/components/fileUpload.es.js +20 -19
  70. package/lib/components/form.cjs.js +1 -1
  71. package/lib/components/form.es.js +2 -2
  72. package/lib/components/icon.cjs.js +1 -1
  73. package/lib/components/icon.es.js +4 -3
  74. package/lib/components/index.cjs.js +1 -1
  75. package/lib/components/index.d.ts +1 -0
  76. package/lib/components/index.es.js +71 -69
  77. package/lib/components/input.cjs.js +1 -1
  78. package/lib/components/input.es.js +5 -4
  79. package/lib/components/link.cjs.js +1 -1
  80. package/lib/components/link.es.js +4 -3
  81. package/lib/components/list.cjs.js +1 -1
  82. package/lib/components/list.es.js +8 -7
  83. package/lib/components/logo.cjs.js +1 -1
  84. package/lib/components/logo.es.js +4 -3
  85. package/lib/components/panel.cjs.js +1 -1
  86. package/lib/components/panel.es.js +2 -2
  87. package/lib/components/progressBar.cjs.js +1 -1
  88. package/lib/components/progressBar.es.js +9 -8
  89. package/lib/components/spinner.cjs.js +1 -1
  90. package/lib/components/spinner.es.js +15 -14
  91. package/lib/components/tabs.cjs.js +1 -1
  92. package/lib/components/tabs.es.js +6 -5
  93. package/lib/components/text.cjs.js +1 -1
  94. package/lib/components/text.es.js +11 -10
  95. package/lib/utils/dates.cjs.js +1 -0
  96. package/lib/utils/dates.d.ts +49 -0
  97. package/lib/utils/dates.es.js +27 -0
  98. package/lib/utils/helpers.cjs.js +1 -1
  99. package/lib/utils/helpers.d.ts +0 -10
  100. package/lib/utils/helpers.es.js +28 -30
  101. package/lib/utils/index.cjs.js +1 -1
  102. package/lib/utils/index.d.ts +2 -0
  103. package/lib/utils/index.es.js +82 -72
  104. package/lib/utils/memo.cjs.js +1 -0
  105. package/lib/utils/memo.d.ts +33 -0
  106. package/lib/utils/memo.es.js +16 -0
  107. package/package.json +1 -1
  108. package/chunks/accordion.C1LkPYXv.js +0 -1
  109. package/chunks/alert.B4q5-o6H.js +0 -1
  110. package/chunks/badgeDot.Dkqfk3zg.js +0 -1
  111. package/chunks/badgeIndicator.CJwy6go2.js +0 -1
  112. package/chunks/button.Bbz_mfWv.js +0 -1
  113. package/chunks/card.BRp1Xa5-.js +0 -1
  114. package/chunks/closeButton.C1A3p88y.js +0 -1
  115. package/chunks/dataTable.DmFirVeI.js +0 -1
  116. package/chunks/divider.rAzhUMwO.js +0 -1
  117. package/chunks/fileUpload.C-l2YXzO.js +0 -1
  118. package/chunks/form.DHQXnPEp.js +0 -1
  119. package/chunks/icon.SiHuIfL8.js +0 -1
  120. package/chunks/input.BxPkmKmK.js +0 -1
  121. package/chunks/link.VyBRMFxS.js +0 -1
  122. package/chunks/list.D6NIx1OS.js +0 -1
  123. package/chunks/logo.CLQZSaVN.js +0 -1
  124. package/chunks/progressBar.DcG-X-RY.js +0 -1
  125. package/chunks/spinner.B6R6yphw.js +0 -1
  126. package/chunks/tabs.CJUp7Ss0.js +0 -1
  127. package/chunks/text.CW-ftgoP.js +0 -1
@@ -1,19 +1,20 @@
1
1
  import "../utils/classNames.es.js";
2
2
  import "../utils/constants.es.js";
3
- import { b as n, c as r, a as l, d as m, g as p, e as t, f as o, h as f, i as c, j as d, k as C, l as S, m as x, n as z } from "../../chunks/spinner.g2VG2eDa.js";
3
+ import "../utils/dates.es.js";
4
+ import { b as n, c as m, a as p, d as l, g as t, e as o, f, h as c, i as d, j as C, k as S, l as x, m as z, n as D } from "../../chunks/spinner.BbisT0VU.js";
4
5
  export {
5
6
  n as baseClassNamePrefix,
6
- r as checkIfSpinnerIsDetermined,
7
- l as classModifierPrefix,
8
- m as classNames,
9
- p as getCircleDimensions,
10
- t as spinnerDefaultSize,
11
- o as spinnerSizeClassModifiers,
12
- f as spinnerSizes,
13
- c as spinnerSizesToDimensions,
14
- d as spinnerValueVar,
15
- C as spinnerWidths,
16
- S as spinnerWrapClassName,
17
- x as strokeMiterlimit,
18
- z as subElementClassPrefix
7
+ m as checkIfSpinnerIsDetermined,
8
+ p as classModifierPrefix,
9
+ l as classNames,
10
+ t as getCircleDimensions,
11
+ o as spinnerDefaultSize,
12
+ f as spinnerSizeClassModifiers,
13
+ c as spinnerSizes,
14
+ d as spinnerSizesToDimensions,
15
+ C as spinnerValueVar,
16
+ S as spinnerWidths,
17
+ x as spinnerWrapClassName,
18
+ z as strokeMiterlimit,
19
+ D as subElementClassPrefix
19
20
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../utils/constants.cjs.js");require("../../chunks/divider.rAzhUMwO.js");const e=require("../../chunks/tabs.CJUp7Ss0.js");exports.TabsDividerColors=e.TabsDividerColors;exports.TabsOrientations=e.TabsOrientations;exports.TabsSizes=e.TabsSizes;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../utils/constants.cjs.js");require("../utils/dates.cjs.js");require("../../chunks/divider.BN-f6rLo.js");const e=require("../../chunks/tabs.ButW3U8L.js");exports.TabsDividerColors=e.TabsDividerColors;exports.TabsOrientations=e.TabsOrientations;exports.TabsSizes=e.TabsSizes;
@@ -1,8 +1,9 @@
1
1
  import "../utils/constants.es.js";
2
- import "../../chunks/divider.D2kuHop2.js";
3
- import { T as r, a as t, b } from "../../chunks/tabs.C7gorntx.js";
2
+ import "../utils/dates.es.js";
3
+ import "../../chunks/divider.DSeF--BE.js";
4
+ import { T as t, a as b, b as e } from "../../chunks/tabs.DfSBd-3J.js";
4
5
  export {
5
- r as TabsDividerColors,
6
- t as TabsOrientations,
7
- b as TabsSizes
6
+ t as TabsDividerColors,
7
+ b as TabsOrientations,
8
+ e as TabsSizes
8
9
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../utils/constants.cjs.js");const E=require("../../chunks/text.CW-ftgoP.js");exports.COMPACT_CLASS_PREFIX=E.COMPACT_CLASS_PREFIX;exports.DEFAULT_KIND_TO_ELEMENT_MAP=E.DEFAULT_KIND_TO_ELEMENT_MAP;exports.TEXT_ALIGNMENT_VALUES=E.TEXT_ALIGNMENT_VALUES;exports.TEXT_COLOR_VALUES=E.TEXT_COLOR_VALUES;exports.TEXT_ELEMENT_VALUES=E.TEXT_ELEMENT_VALUES;exports.TEXT_KIND_VALUES=E.TEXT_KIND_VALUES;exports.TEXT_WEIGHT_VALUES=E.TEXT_WEIGHT_VALUES;exports.TEXT_WORD_BREAK_VALUES=E.TEXT_WORD_BREAK_VALUES;exports.TYPOGRAPHY_CLASS_BASE=E.TYPOGRAPHY_CLASS_BASE;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../utils/constants.cjs.js");require("../utils/dates.cjs.js");const E=require("../../chunks/text.Boa7i2_y.js");exports.COMPACT_CLASS_PREFIX=E.COMPACT_CLASS_PREFIX;exports.DEFAULT_KIND_TO_ELEMENT_MAP=E.DEFAULT_KIND_TO_ELEMENT_MAP;exports.TEXT_ALIGNMENT_VALUES=E.TEXT_ALIGNMENT_VALUES;exports.TEXT_COLOR_VALUES=E.TEXT_COLOR_VALUES;exports.TEXT_ELEMENT_VALUES=E.TEXT_ELEMENT_VALUES;exports.TEXT_KIND_VALUES=E.TEXT_KIND_VALUES;exports.TEXT_WEIGHT_VALUES=E.TEXT_WEIGHT_VALUES;exports.TEXT_WORD_BREAK_VALUES=E.TEXT_WORD_BREAK_VALUES;exports.TYPOGRAPHY_CLASS_BASE=E.TYPOGRAPHY_CLASS_BASE;
@@ -1,13 +1,14 @@
1
1
  import "../utils/constants.es.js";
2
- import { C as A, D as L, T as S, a, b as s, c as U, d as X, e as C, f as N } from "../../chunks/text.J0CEkrH-.js";
2
+ import "../utils/dates.es.js";
3
+ import { C as L, D as S, T as a, a as s, b as U, c as X, d as C, e as N, f as O } from "../../chunks/text.Dd2FpK_P.js";
3
4
  export {
4
- A as COMPACT_CLASS_PREFIX,
5
- L as DEFAULT_KIND_TO_ELEMENT_MAP,
6
- S as TEXT_ALIGNMENT_VALUES,
7
- a as TEXT_COLOR_VALUES,
8
- s as TEXT_ELEMENT_VALUES,
9
- U as TEXT_KIND_VALUES,
10
- X as TEXT_WEIGHT_VALUES,
11
- C as TEXT_WORD_BREAK_VALUES,
12
- N as TYPOGRAPHY_CLASS_BASE
5
+ L as COMPACT_CLASS_PREFIX,
6
+ S as DEFAULT_KIND_TO_ELEMENT_MAP,
7
+ a as TEXT_ALIGNMENT_VALUES,
8
+ s as TEXT_COLOR_VALUES,
9
+ U as TEXT_ELEMENT_VALUES,
10
+ X as TEXT_KIND_VALUES,
11
+ C as TEXT_WEIGHT_VALUES,
12
+ N as TEXT_WORD_BREAK_VALUES,
13
+ O as TYPOGRAPHY_CLASS_BASE
13
14
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./memo.cjs.js"),t=(e,r,n)=>e*1e4+r*100+n,s=e=>t(e.getFullYear(),e.getMonth()+1,e.getDate()),i=e=>e instanceof Date&&!Number.isNaN(e.getTime()),o="en-US",a=l.createBoundedMemo(e=>e,e=>{try{return new Intl.Locale(e).toString()}catch{return e.toLowerCase()}}),c=e=>{try{return Intl.DateTimeFormat.supportedLocalesOf([e]).length>0}catch{return!1}},L=e=>c(e)?e:o,y=()=>a.clear();exports.DEFAULT_LOCALE=o;exports.__clearLocaleKeyCache=y;exports.canonicalLocaleKey=a;exports.dateToDayKey=s;exports.isLocaleSupported=c;exports.isValidDate=i;exports.resolveLocale=L;exports.toDayKey=t;
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Date and locale primitives shared by every date-bearing component.
3
+ *
4
+ * Calendar and DateField each grew their own copies of these; they are pure,
5
+ * framework-agnostic and identical in behaviour, so they live here instead of
6
+ * drifting apart. Component-specific calendar maths stays in the component.
7
+ */
8
+ /**
9
+ * Calendar-day sort key — `YYYYMMDD` as a number
10
+ * (`year * 10000 + month * 100 + day`), month 1-based. Lets two dates be
11
+ * compared or ordered by calendar day, ignoring time and timezone.
12
+ */
13
+ export declare const toDayKey: (year: number, month: number, day: number) => number;
14
+ /** `toDayKey` for a `Date`, using its local calendar day. */
15
+ export declare const dateToDayKey: (date: Date) => number;
16
+ /** True for a `Date` instance that isn't `Invalid Date`. */
17
+ export declare const isValidDate: (value: unknown) => value is Date;
18
+ /** ECMAScript's own baseline, used when a locale is omitted or unresolvable. */
19
+ export declare const DEFAULT_LOCALE = "en-US";
20
+ /**
21
+ * Canonical BCP-47 cache key, so `en-US` and `en-us` share one entry. A
22
+ * malformed tag can't be canonicalized, so it's lower-cased — still
23
+ * case-insensitive, and it can't collide with a canonical key, which is never
24
+ * all-lowercase for a region subtag.
25
+ *
26
+ * Memoized on the raw tag because callers use it as the key for their own
27
+ * caches, so it runs on every lookup rather than every miss. Constructing an
28
+ * `Intl.Locale` and stringifying it measures around 2.6 µs — an order of
29
+ * magnitude more than the `format` calls it guards. Keying on the raw tag does
30
+ * mean `en-US` and `en-us` take a slot each; that's the price of not paying the
31
+ * 2.6 µs to find out they're the same, and the memo's ceiling bounds it.
32
+ */
33
+ export declare const canonicalLocaleKey: import('./memo').BoundedMemo<[locale: string], string>;
34
+ /**
35
+ * Whether the runtime actually supports the tag. `supportedLocalesOf` is the
36
+ * gatekeeper: a structurally-valid but unknown tag (`xy-ZZ`) resolves to the
37
+ * runtime default rather than throwing, so callers must check this to force
38
+ * their own fallback. Throws on a malformed tag, which counts as unsupported.
39
+ */
40
+ export declare const isLocaleSupported: (locale: string) => boolean;
41
+ /**
42
+ * The locale to actually format with — the tag itself when the runtime knows
43
+ * it, {@link DEFAULT_LOCALE} otherwise. Formatting an unsupported tag directly
44
+ * would silently use the *runtime's* default locale, which differs between a
45
+ * server and a browser, so callers resolve through this instead.
46
+ */
47
+ export declare const resolveLocale: (locale: string) => string;
48
+ /** @internal — test-only. Clears the canonical-key cache for Intl isolation. */
49
+ export declare const __clearLocaleKeyCache: () => void;
@@ -0,0 +1,27 @@
1
+ import { createBoundedMemo as n } from "./memo.es.js";
2
+ const r = (e, t, o) => e * 1e4 + t * 100 + o, i = (e) => r(e.getFullYear(), e.getMonth() + 1, e.getDate()), L = (e) => e instanceof Date && !Number.isNaN(e.getTime()), a = "en-US", c = n(
3
+ (e) => e,
4
+ (e) => {
5
+ try {
6
+ return new Intl.Locale(e).toString();
7
+ } catch {
8
+ return e.toLowerCase();
9
+ }
10
+ }
11
+ ), s = (e) => {
12
+ try {
13
+ return Intl.DateTimeFormat.supportedLocalesOf([e]).length > 0;
14
+ } catch {
15
+ return !1;
16
+ }
17
+ }, u = (e) => s(e) ? e : a, y = () => c.clear();
18
+ export {
19
+ a as DEFAULT_LOCALE,
20
+ y as __clearLocaleKeyCache,
21
+ c as canonicalLocaleKey,
22
+ i as dateToDayKey,
23
+ s as isLocaleSupported,
24
+ L as isValidDate,
25
+ u as resolveLocale,
26
+ r as toDayKey
27
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("./constants.cjs.js"),T=e=>e.charAt(0).toUpperCase()+e.slice(1),y=e=>Object.values(e),S=e=>Object.entries(e);function E(e,t=w.FPS_120){let o;const r=(...n)=>{o!==void 0&&clearTimeout(o),o=setTimeout(()=>e(...n),t)};return r.cancel=()=>{o!==void 0&&clearTimeout(o)},r}const R=e=>{var o;const t=e.target;try{return t.assignedNodes().length>0||((o=t.assignedNodes()[0].textContent)==null?void 0:o.trim())!==""}catch{return!1}},C=e=>{if(!e||e.length===0)return!1;for(const t of e)if(t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE&&t.data.trim()!=="")return!0;return!1},x=(e,t={})=>{const o=Object.entries(t).reduce((r,[n,a])=>`${r} ${n}='${a}'`,"");return e.replace("<svg",`<svg ${o}`)},D=(e,t)=>t.some(o=>e.has(o)),M=e=>({decorate:t=>{if(!e)return;Object.keys(t).forEach(r=>{e[r]=t[r]})}}),L=e=>{const o=e.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"]), [contenteditable]:not([contenteditable="false"])');return o||null},A=(e,t)=>!!e.composedPath().find(n=>n===t),B=(e,t)=>{if(!e||Object.keys(e).length===0)return[e,e];const o={},r={};return Object.keys(e).forEach(n=>{t.includes(n)?o[n]=e[n]:r[n]=e[n]}),[o,r]},I=()=>typeof window>"u"||typeof navigator>"u"?!1:/iP(ad|hone|od)/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,P=()=>{if(typeof window>"u")return!1;const e=(navigator==null?void 0:navigator.userAgent)||(navigator==null?void 0:navigator.vendor)||(window==null?void 0:window.opera),t=["(android|bb\\d+|meego).+mobile","avantgo|bada\\/","blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)","iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront","opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/","plucker|pocket|psp|series([46])0|symbian|treo|up\\.(browser|link)","vodafone|wap|windows ce|xda|xiino"].join("|"),o=["1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)","ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)","as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)","bl(ac|az)|br([ev])w|bumb|bw-([nu])|c55\\/|capi|ccwa|cdm-","cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi","dica|dmob|do([cp])o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)","esl8|ez([4-7]0|os|wa|ze)|fetc|fly([-_])|g1 u|g560|gene|gf-5|g-mo","go(\\.w|od)|gr(ad|un)|haie|hcit|hd-([mpt])|hei-|hi(pt|ta)","hp( i|ip)|hs-c|ht(c([- _agpst])|tp)|hu(aw|tc)|i-(20|go|ma)","i230|iac([ \\-\\/])"].join("|");return new RegExp(t,"i").test(e)||new RegExp(o,"i").test(e.substr(0,4))};var h=(e=>(e.TOP="top",e.LEFT="left",e.RIGHT="right",e.BOTTOM="bottom",e))(h||{});const F=(e,t=300)=>{let o,r,n;return function(){const a=this,i=arguments;o?(clearTimeout(r),r=setTimeout(()=>{Date.now()-n>=t&&(e.apply(a,i),n=Date.now())},Math.max(t-(Date.now()-n),0))):(e.apply(a,i),n=Date.now(),o=!0)}},O=(e,t,o)=>{const{innerHeight:r,innerWidth:n}=window,{top:a,left:i,right:m,bottom:b}=o;return{top:(g,d)=>{if(d){const c=r-b,u=c<e,f=a>c;return u&&f?"bottom":"top"}const s=r-b,l=a<e,p=s>e;return l&&p?"bottom":"top"},bottom:(g,d)=>{if(d){const c=r-b,u=a<e,f=c>e;return u&&f?"top":"bottom"}const s=r-b,l=s<e,p=a>s;return l&&p?"top":"bottom"},left:g=>{if(g){const p=n-m,c=t>p,u=i>t;return c&&u?"right":"left"}const d=n-m,s=i<t,l=d>t;return s&&l?"right":"left"},right:g=>{if(g){const p=n-m,c=i<t,u=p>t;return c&&u?"left":"right"}const s=n-m<t,l=i>t;return s&&l?"left":"right"}}};function N(e,t){return Math.random()*(t-e)+e}function k(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e}function z(e){return typeof window>"u"?!1:window.HTMLElement.prototype.hasOwnProperty(e)}const K=e=>e.replace(/^([A-Z])/,t=>t.toLowerCase()).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),v=(e,t,o)=>e*1e4+t*100+o,$=e=>v(e.getFullYear(),e.getMonth()+1,e.getDate());exports.Directions=h;exports.attributeDecorator=M;exports.camelCaseToKebabCase=K;exports.capitalizeFirstLetter=T;exports.dateToDayKey=$;exports.debounce=E;exports.doesEventContainElement=A;exports.doesWebComponentSlotExist=R;exports.enrichSVGIcon=x;exports.findFirstFocusableElement=L;exports.getDirection=O;exports.getRandomArbitrary=N;exports.getRandomInt=k;exports.getTypedEntries=S;exports.getTypedValues=y;exports.isAPISupported=z;exports.isIOS=I;exports.isMobileDevice=P;exports.nodesHaveContent=C;exports.partitionProps=B;exports.propsChanged=D;exports.throttle=F;exports.toDayKey=v;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./constants.cjs.js"),w=e=>e.charAt(0).toUpperCase()+e.slice(1),S=e=>Object.values(e),T=e=>Object.entries(e);function y(e,t=v.FPS_120){let o;const r=(...n)=>{o!==void 0&&clearTimeout(o),o=setTimeout(()=>e(...n),t)};return r.cancel=()=>{o!==void 0&&clearTimeout(o)},r}const E=e=>{var o;const t=e.target;try{return t.assignedNodes().length>0||((o=t.assignedNodes()[0].textContent)==null?void 0:o.trim())!==""}catch{return!1}},R=e=>{if(!e||e.length===0)return!1;for(const t of e)if(t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE&&t.data.trim()!=="")return!0;return!1},C=(e,t={})=>{const o=Object.entries(t).reduce((r,[n,a])=>`${r} ${n}='${a}'`,"");return e.replace("<svg",`<svg ${o}`)},x=(e,t)=>t.some(o=>e.has(o)),M=e=>({decorate:t=>{if(!e)return;Object.keys(t).forEach(r=>{e[r]=t[r]})}}),L=e=>{const o=e.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"]), [contenteditable]:not([contenteditable="false"])');return o||null},A=(e,t)=>!!e.composedPath().find(n=>n===t),B=(e,t)=>{if(!e||Object.keys(e).length===0)return[e,e];const o={},r={};return Object.keys(e).forEach(n=>{t.includes(n)?o[n]=e[n]:r[n]=e[n]}),[o,r]},I=()=>typeof window>"u"||typeof navigator>"u"?!1:/iP(ad|hone|od)/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,P=()=>{if(typeof window>"u")return!1;const e=(navigator==null?void 0:navigator.userAgent)||(navigator==null?void 0:navigator.vendor)||(window==null?void 0:window.opera),t=["(android|bb\\d+|meego).+mobile","avantgo|bada\\/","blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)","iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront","opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/","plucker|pocket|psp|series([46])0|symbian|treo|up\\.(browser|link)","vodafone|wap|windows ce|xda|xiino"].join("|"),o=["1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)","ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)","as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)","bl(ac|az)|br([ev])w|bumb|bw-([nu])|c55\\/|capi|ccwa|cdm-","cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi","dica|dmob|do([cp])o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)","esl8|ez([4-7]0|os|wa|ze)|fetc|fly([-_])|g1 u|g560|gene|gf-5|g-mo","go(\\.w|od)|gr(ad|un)|haie|hcit|hd-([mpt])|hei-|hi(pt|ta)","hp( i|ip)|hs-c|ht(c([- _agpst])|tp)|hu(aw|tc)|i-(20|go|ma)","i230|iac([ \\-\\/])"].join("|");return new RegExp(t,"i").test(e)||new RegExp(o,"i").test(e.substr(0,4))};var h=(e=>(e.TOP="top",e.LEFT="left",e.RIGHT="right",e.BOTTOM="bottom",e))(h||{});const D=(e,t=300)=>{let o,r,n;return function(){const a=this,c=arguments;o?(clearTimeout(r),r=setTimeout(()=>{Date.now()-n>=t&&(e.apply(a,c),n=Date.now())},Math.max(t-(Date.now()-n),0))):(e.apply(a,c),n=Date.now(),o=!0)}},F=(e,t,o)=>{const{innerHeight:r,innerWidth:n}=window,{top:a,left:c,right:g,bottom:b}=o;return{top:(m,d)=>{if(d){const i=r-b,u=i<e,f=a>i;return u&&f?"bottom":"top"}const s=r-b,l=a<e,p=s>e;return l&&p?"bottom":"top"},bottom:(m,d)=>{if(d){const i=r-b,u=a<e,f=i>e;return u&&f?"top":"bottom"}const s=r-b,l=s<e,p=a>s;return l&&p?"top":"bottom"},left:m=>{if(m){const p=n-g,i=t>p,u=c>t;return i&&u?"right":"left"}const d=n-g,s=c<t,l=d>t;return s&&l?"right":"left"},right:m=>{if(m){const p=n-g,i=c<t,u=p>t;return i&&u?"left":"right"}const s=n-g<t,l=c>t;return s&&l?"left":"right"}}};function O(e,t){return Math.random()*(t-e)+e}function N(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e}function k(e){return typeof window>"u"?!1:window.HTMLElement.prototype.hasOwnProperty(e)}const z=e=>e.replace(/^([A-Z])/,t=>t.toLowerCase()).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase();exports.Directions=h;exports.attributeDecorator=M;exports.camelCaseToKebabCase=z;exports.capitalizeFirstLetter=w;exports.debounce=y;exports.doesEventContainElement=A;exports.doesWebComponentSlotExist=E;exports.enrichSVGIcon=C;exports.findFirstFocusableElement=L;exports.getDirection=F;exports.getRandomArbitrary=O;exports.getRandomInt=N;exports.getTypedEntries=T;exports.getTypedValues=S;exports.isAPISupported=k;exports.isIOS=I;exports.isMobileDevice=P;exports.nodesHaveContent=R;exports.partitionProps=B;exports.propsChanged=x;exports.throttle=D;
@@ -71,13 +71,3 @@ export declare function isAPISupported(prop: string): boolean;
71
71
  * Converts a camelCase (or PascalCase) string to kebab-case
72
72
  */
73
73
  export declare const camelCaseToKebabCase: (camelCaseString: string) => string;
74
- /**
75
- * Calendar-day sort key — `YYYYMMDD` as a number
76
- * (`year * 10000 + month * 100 + day`), month 1-based. Lets two dates be
77
- * compared/ordered by calendar day, ignoring time and timezone. Kept here (pure,
78
- * framework-agnostic) so DateField's utils and the `dateRange` form validator
79
- * share one formula instead of drifting copies.
80
- */
81
- export declare const toDayKey: (year: number, month: number, day: number) => number;
82
- /** `toDayKey` for a `Date`, using its local calendar day. */
83
- export declare const dateToDayKey: (date: Date) => number;
@@ -1,6 +1,6 @@
1
1
  import { FPS_120 as h } from "./constants.es.js";
2
- const S = (e) => e.charAt(0).toUpperCase() + e.slice(1), y = (e) => Object.values(e), E = (e) => Object.entries(e);
3
- function R(e, t = h) {
2
+ const T = (e) => e.charAt(0).toUpperCase() + e.slice(1), S = (e) => Object.values(e), y = (e) => Object.entries(e);
3
+ function E(e, t = h) {
4
4
  let o;
5
5
  const r = (...n) => {
6
6
  o !== void 0 && clearTimeout(o), o = setTimeout(() => e(...n), t);
@@ -9,7 +9,7 @@ function R(e, t = h) {
9
9
  o !== void 0 && clearTimeout(o);
10
10
  }, r;
11
11
  }
12
- const x = (e) => {
12
+ const R = (e) => {
13
13
  var o;
14
14
  const t = e.target;
15
15
  try {
@@ -17,12 +17,12 @@ const x = (e) => {
17
17
  } catch {
18
18
  return !1;
19
19
  }
20
- }, C = (e) => {
20
+ }, x = (e) => {
21
21
  if (!e || e.length === 0) return !1;
22
22
  for (const t of e)
23
23
  if (t.nodeType === Node.ELEMENT_NODE || t.nodeType === Node.TEXT_NODE && t.data.trim() !== "") return !0;
24
24
  return !1;
25
- }, M = (e, t = {}) => {
25
+ }, C = (e, t = {}) => {
26
26
  const o = Object.entries(t).reduce(
27
27
  (r, [n, a]) => `${r} ${n}='${a}'`,
28
28
  ""
@@ -35,10 +35,10 @@ const x = (e) => {
35
35
  e[r] = t[r];
36
36
  });
37
37
  }
38
- }), A = (e) => {
38
+ }), M = (e) => {
39
39
  const o = e.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"]), [contenteditable]:not([contenteditable="false"])');
40
40
  return o || null;
41
- }, D = (e, t) => !!e.composedPath().find((n) => n === t), N = (e, t) => {
41
+ }, A = (e, t) => !!e.composedPath().find((n) => n === t), N = (e, t) => {
42
42
  if (!e || Object.keys(e).length === 0)
43
43
  return [e, e];
44
44
  const o = {}, r = {};
@@ -70,7 +70,7 @@ const x = (e) => {
70
70
  return new RegExp(t, "i").test(e) || new RegExp(o, "i").test(e.substr(0, 4));
71
71
  };
72
72
  var w = /* @__PURE__ */ ((e) => (e.TOP = "top", e.LEFT = "left", e.RIGHT = "right", e.BOTTOM = "bottom", e))(w || {});
73
- const F = (e, t = 300) => {
73
+ const I = (e, t = 300) => {
74
74
  let o, r, n;
75
75
  return function() {
76
76
  const a = this, i = arguments;
@@ -78,7 +78,7 @@ const F = (e, t = 300) => {
78
78
  Date.now() - n >= t && (e.apply(a, i), n = Date.now());
79
79
  }, Math.max(t - (Date.now() - n), 0))) : (e.apply(a, i), n = Date.now(), o = !0);
80
80
  };
81
- }, I = (e, t, o) => {
81
+ }, O = (e, t, o) => {
82
82
  const { innerHeight: r, innerWidth: n } = window, {
83
83
  top: a,
84
84
  left: i,
@@ -120,38 +120,36 @@ const F = (e, t = 300) => {
120
120
  }
121
121
  };
122
122
  };
123
- function O(e, t) {
123
+ function z(e, t) {
124
124
  return Math.random() * (t - e) + e;
125
125
  }
126
- function z(e, t) {
126
+ function D(e, t) {
127
127
  return e = Math.ceil(e), t = Math.floor(t), Math.floor(Math.random() * (t - e + 1)) + e;
128
128
  }
129
- function $(e) {
129
+ function F(e) {
130
130
  return typeof window > "u" ? !1 : window.HTMLElement.prototype.hasOwnProperty(e);
131
131
  }
132
- const K = (e) => e.replace(/^([A-Z])/, (t) => t.toLowerCase()).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), v = (e, t, o) => e * 1e4 + t * 100 + o, Z = (e) => v(e.getFullYear(), e.getMonth() + 1, e.getDate());
132
+ const $ = (e) => e.replace(/^([A-Z])/, (t) => t.toLowerCase()).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
133
133
  export {
134
134
  w as Directions,
135
135
  L as attributeDecorator,
136
- K as camelCaseToKebabCase,
137
- S as capitalizeFirstLetter,
138
- Z as dateToDayKey,
139
- R as debounce,
140
- D as doesEventContainElement,
141
- x as doesWebComponentSlotExist,
142
- M as enrichSVGIcon,
143
- A as findFirstFocusableElement,
144
- I as getDirection,
145
- O as getRandomArbitrary,
146
- z as getRandomInt,
147
- E as getTypedEntries,
148
- y as getTypedValues,
149
- $ as isAPISupported,
136
+ $ as camelCaseToKebabCase,
137
+ T as capitalizeFirstLetter,
138
+ E as debounce,
139
+ A as doesEventContainElement,
140
+ R as doesWebComponentSlotExist,
141
+ C as enrichSVGIcon,
142
+ M as findFirstFocusableElement,
143
+ O as getDirection,
144
+ z as getRandomArbitrary,
145
+ D as getRandomInt,
146
+ y as getTypedEntries,
147
+ S as getTypedValues,
148
+ F as isAPISupported,
150
149
  P as isIOS,
151
150
  k as isMobileDevice,
152
- C as nodesHaveContent,
151
+ x as nodesHaveContent,
153
152
  N as partitionProps,
154
153
  B as propsChanged,
155
- F as throttle,
156
- v as toDayKey
154
+ I as throttle
157
155
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./classNames.cjs.js"),e=require("./constants.cjs.js"),t=require("./helpers.cjs.js"),i=require("./styles.cjs.js"),s=require("./dom.cjs.js"),n=require("./raf.cjs.js"),a=require("./overflow.cjs.js");exports.generateSpacingClasses=r.generateSpacingClasses;exports.getBEMClassNames=r.getBEMClassNames;exports.ACCENT=e.ACCENT;exports.ATTRIBUTE=e.ATTRIBUTE;exports.BASE_FONT_SIZE=e.BASE_FONT_SIZE;exports.BEAM_INVERSE=e.BEAM_INVERSE;exports.DEFAULT_ACCENT=e.DEFAULT_ACCENT;exports.DEFAULT_MODE=e.DEFAULT_MODE;exports.DEFAULT_PRODUCT_TYPE=e.DEFAULT_PRODUCT_TYPE;exports.DEFAULT_THEME=e.DEFAULT_THEME;exports.EXPRESSIVE_THEMES=e.EXPRESSIVE_THEMES;exports.FPS_1=e.FPS_1;exports.FPS_120=e.FPS_120;exports.FPS_30=e.FPS_30;exports.FPS_60=e.FPS_60;exports.PRODUCT_TYPE=e.PRODUCT_TYPE;exports.STORAGE_KEY=e.STORAGE_KEY;exports.SYSTEM_MODE_ENABLED_KEY=e.SYSTEM_MODE_ENABLED_KEY;exports.SpacingValues=e.SpacingValues;exports.SpacingValuesAsNumbers=e.SpacingValuesAsNumbers;exports.StaticAppearances=e.StaticAppearances;exports.accentThemeClassName=e.accentThemeClassName;exports.allColors=e.allColors;exports.allSizes=e.allSizes;exports.appearance=e.appearance;exports.appearances=e.appearances;exports.consumer=e.consumer;exports.emphases=e.emphases;exports.enterprise=e.enterprise;exports.expressiveThemeClassName=e.expressiveThemeClassName;exports.info=e.info;exports.infoPrimary=e.infoPrimary;exports.infoSecondary=e.infoSecondary;exports.information=e.information;exports.inverse=e.inverse;exports.lg=e.lg;exports.md=e.md;exports.negative=e.negative;exports.positive=e.positive;exports.prefix=e.prefix;exports.primary=e.primary;exports.productTypeThemeClassName=e.productTypeThemeClassName;exports.secondary=e.secondary;exports.secondaryInverse=e.secondaryInverse;exports.sizes=e.sizes;exports.sm=e.sm;exports.themeClassName=e.themeClassName;exports.themeTypeValues=e.themeTypeValues;exports.warning=e.warning;exports.xl=e.xl;exports.xs=e.xs;exports.xxs=e.xxs;exports.Directions=t.Directions;exports.attributeDecorator=t.attributeDecorator;exports.camelCaseToKebabCase=t.camelCaseToKebabCase;exports.capitalizeFirstLetter=t.capitalizeFirstLetter;exports.dateToDayKey=t.dateToDayKey;exports.debounce=t.debounce;exports.doesEventContainElement=t.doesEventContainElement;exports.doesWebComponentSlotExist=t.doesWebComponentSlotExist;exports.enrichSVGIcon=t.enrichSVGIcon;exports.findFirstFocusableElement=t.findFirstFocusableElement;exports.getDirection=t.getDirection;exports.getRandomArbitrary=t.getRandomArbitrary;exports.getRandomInt=t.getRandomInt;exports.getTypedEntries=t.getTypedEntries;exports.getTypedValues=t.getTypedValues;exports.isAPISupported=t.isAPISupported;exports.isIOS=t.isIOS;exports.isMobileDevice=t.isMobileDevice;exports.nodesHaveContent=t.nodesHaveContent;exports.partitionProps=t.partitionProps;exports.propsChanged=t.propsChanged;exports.throttle=t.throttle;exports.toDayKey=t.toDayKey;exports.generateCssVarPrefix=i.generateCssVarPrefix;exports.addScrollToRect=s.addScrollToRect;exports.compareDomOrder=s.compareDomOrder;exports.findTopLevelSlottedWrapper=s.findTopLevelSlottedWrapper;exports.getElementScrollBoundingClientRect=s.getElementScrollBoundingClientRect;exports.getSecureRelAttribute=s.getSecureRelAttribute;exports.readStringProp=s.readStringProp;exports.createRafScheduler=n.createRafScheduler;exports.computeFitCount=a.computeFitCount;exports.hasScrollOverflow=a.hasScrollOverflow;exports.isMultiLineClamped=a.isMultiLineClamped;exports.isOverFlowing=a.isOverFlowing;exports.isSingleLineClamped=a.isSingleLineClamped;exports.isTextWrapping=a.isTextWrapping;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./classNames.cjs.js"),e=require("./constants.cjs.js"),t=require("./dates.cjs.js"),a=require("./helpers.cjs.js"),o=require("./memo.cjs.js"),n=require("./styles.cjs.js"),s=require("./dom.cjs.js"),l=require("./raf.cjs.js"),i=require("./overflow.cjs.js");exports.generateSpacingClasses=r.generateSpacingClasses;exports.getBEMClassNames=r.getBEMClassNames;exports.ACCENT=e.ACCENT;exports.ATTRIBUTE=e.ATTRIBUTE;exports.BASE_FONT_SIZE=e.BASE_FONT_SIZE;exports.BEAM_INVERSE=e.BEAM_INVERSE;exports.DEFAULT_ACCENT=e.DEFAULT_ACCENT;exports.DEFAULT_MODE=e.DEFAULT_MODE;exports.DEFAULT_PRODUCT_TYPE=e.DEFAULT_PRODUCT_TYPE;exports.DEFAULT_THEME=e.DEFAULT_THEME;exports.EXPRESSIVE_THEMES=e.EXPRESSIVE_THEMES;exports.FPS_1=e.FPS_1;exports.FPS_120=e.FPS_120;exports.FPS_30=e.FPS_30;exports.FPS_60=e.FPS_60;exports.PRODUCT_TYPE=e.PRODUCT_TYPE;exports.STORAGE_KEY=e.STORAGE_KEY;exports.SYSTEM_MODE_ENABLED_KEY=e.SYSTEM_MODE_ENABLED_KEY;exports.SpacingValues=e.SpacingValues;exports.SpacingValuesAsNumbers=e.SpacingValuesAsNumbers;exports.StaticAppearances=e.StaticAppearances;exports.accentThemeClassName=e.accentThemeClassName;exports.allColors=e.allColors;exports.allSizes=e.allSizes;exports.appearance=e.appearance;exports.appearances=e.appearances;exports.consumer=e.consumer;exports.emphases=e.emphases;exports.enterprise=e.enterprise;exports.expressiveThemeClassName=e.expressiveThemeClassName;exports.info=e.info;exports.infoPrimary=e.infoPrimary;exports.infoSecondary=e.infoSecondary;exports.information=e.information;exports.inverse=e.inverse;exports.lg=e.lg;exports.md=e.md;exports.negative=e.negative;exports.positive=e.positive;exports.prefix=e.prefix;exports.primary=e.primary;exports.productTypeThemeClassName=e.productTypeThemeClassName;exports.secondary=e.secondary;exports.secondaryInverse=e.secondaryInverse;exports.sizes=e.sizes;exports.sm=e.sm;exports.themeClassName=e.themeClassName;exports.themeTypeValues=e.themeTypeValues;exports.warning=e.warning;exports.xl=e.xl;exports.xs=e.xs;exports.xxs=e.xxs;exports.DEFAULT_LOCALE=t.DEFAULT_LOCALE;exports.__clearLocaleKeyCache=t.__clearLocaleKeyCache;exports.canonicalLocaleKey=t.canonicalLocaleKey;exports.dateToDayKey=t.dateToDayKey;exports.isLocaleSupported=t.isLocaleSupported;exports.isValidDate=t.isValidDate;exports.resolveLocale=t.resolveLocale;exports.toDayKey=t.toDayKey;exports.Directions=a.Directions;exports.attributeDecorator=a.attributeDecorator;exports.camelCaseToKebabCase=a.camelCaseToKebabCase;exports.capitalizeFirstLetter=a.capitalizeFirstLetter;exports.debounce=a.debounce;exports.doesEventContainElement=a.doesEventContainElement;exports.doesWebComponentSlotExist=a.doesWebComponentSlotExist;exports.enrichSVGIcon=a.enrichSVGIcon;exports.findFirstFocusableElement=a.findFirstFocusableElement;exports.getDirection=a.getDirection;exports.getRandomArbitrary=a.getRandomArbitrary;exports.getRandomInt=a.getRandomInt;exports.getTypedEntries=a.getTypedEntries;exports.getTypedValues=a.getTypedValues;exports.isAPISupported=a.isAPISupported;exports.isIOS=a.isIOS;exports.isMobileDevice=a.isMobileDevice;exports.nodesHaveContent=a.nodesHaveContent;exports.partitionProps=a.partitionProps;exports.propsChanged=a.propsChanged;exports.throttle=a.throttle;exports.DEFAULT_MEMO_LIMIT=o.DEFAULT_MEMO_LIMIT;exports.createBoundedMemo=o.createBoundedMemo;exports.generateCssVarPrefix=n.generateCssVarPrefix;exports.addScrollToRect=s.addScrollToRect;exports.compareDomOrder=s.compareDomOrder;exports.findTopLevelSlottedWrapper=s.findTopLevelSlottedWrapper;exports.getElementScrollBoundingClientRect=s.getElementScrollBoundingClientRect;exports.getSecureRelAttribute=s.getSecureRelAttribute;exports.readStringProp=s.readStringProp;exports.createRafScheduler=l.createRafScheduler;exports.computeFitCount=i.computeFitCount;exports.hasScrollOverflow=i.hasScrollOverflow;exports.isMultiLineClamped=i.isMultiLineClamped;exports.isOverFlowing=i.isOverFlowing;exports.isSingleLineClamped=i.isSingleLineClamped;exports.isTextWrapping=i.isTextWrapping;
@@ -1,6 +1,8 @@
1
1
  export * from './classNames';
2
2
  export * from './constants';
3
+ export * from './dates';
3
4
  export * from './helpers';
5
+ export * from './memo';
4
6
  export * from './styles';
5
7
  export * from './dom';
6
8
  export * from './raf';
@@ -1,96 +1,106 @@
1
- import { generateSpacingClasses as t, getBEMClassNames as a } from "./classNames.es.js";
2
- import { ACCENT as s, ATTRIBUTE as i, BASE_FONT_SIZE as n, BEAM_INVERSE as p, DEFAULT_ACCENT as l, DEFAULT_MODE as m, DEFAULT_PRODUCT_TYPE as E, DEFAULT_THEME as c, EXPRESSIVE_THEMES as S, FPS_1 as T, FPS_120 as d, FPS_30 as C, FPS_60 as g, PRODUCT_TYPE as u, STORAGE_KEY as _, SYSTEM_MODE_ENABLED_KEY as f, SpacingValues as x, SpacingValuesAsNumbers as A, StaticAppearances as D, accentThemeClassName as y, allColors as F, allSizes as P, appearance as R, appearances as h, consumer as v, emphases as N, enterprise as b, expressiveThemeClassName as O, info as I, infoPrimary as L, infoSecondary as M, information as V, inverse as U, lg as B, md as K, negative as Y, positive as w, prefix as z, primary as H, productTypeThemeClassName as W, secondary as G, secondaryInverse as X, sizes as Z, sm as j, themeClassName as k, themeTypeValues as q, warning as J, xl as Q, xs as $, xxs as ee } from "./constants.es.js";
3
- import { Directions as te, attributeDecorator as ae, camelCaseToKebabCase as oe, capitalizeFirstLetter as se, dateToDayKey as ie, debounce as ne, doesEventContainElement as pe, doesWebComponentSlotExist as le, enrichSVGIcon as me, findFirstFocusableElement as Ee, getDirection as ce, getRandomArbitrary as Se, getRandomInt as Te, getTypedEntries as de, getTypedValues as Ce, isAPISupported as ge, isIOS as ue, isMobileDevice as _e, nodesHaveContent as fe, partitionProps as xe, propsChanged as Ae, throttle as De, toDayKey as ye } from "./helpers.es.js";
4
- import { generateCssVarPrefix as Pe } from "./styles.es.js";
5
- import { addScrollToRect as he, compareDomOrder as ve, findTopLevelSlottedWrapper as Ne, getElementScrollBoundingClientRect as be, getSecureRelAttribute as Oe, readStringProp as Ie } from "./dom.es.js";
6
- import { createRafScheduler as Me } from "./raf.es.js";
7
- import { computeFitCount as Ue, hasScrollOverflow as Be, isMultiLineClamped as Ke, isOverFlowing as Ye, isSingleLineClamped as we, isTextWrapping as ze } from "./overflow.es.js";
1
+ import { generateSpacingClasses as a, getBEMClassNames as o } from "./classNames.es.js";
2
+ import { ACCENT as s, ATTRIBUTE as i, BASE_FONT_SIZE as n, BEAM_INVERSE as l, DEFAULT_ACCENT as p, DEFAULT_MODE as c, DEFAULT_PRODUCT_TYPE as m, DEFAULT_THEME as E, EXPRESSIVE_THEMES as T, FPS_1 as S, FPS_120 as d, FPS_30 as C, FPS_60 as _, PRODUCT_TYPE as g, STORAGE_KEY as u, SYSTEM_MODE_ENABLED_KEY as f, SpacingValues as A, SpacingValuesAsNumbers as D, StaticAppearances as x, accentThemeClassName as L, allColors as y, allSizes as F, appearance as P, appearances as M, consumer as h, emphases as v, enterprise as O, expressiveThemeClassName as R, info as I, infoPrimary as N, infoSecondary as b, information as U, inverse as V, lg as B, md as K, negative as Y, positive as w, prefix as z, primary as H, productTypeThemeClassName as W, secondary as G, secondaryInverse as X, sizes as Z, sm as j, themeClassName as k, themeTypeValues as q, warning as J, xl as Q, xs as $, xxs as ee } from "./constants.es.js";
3
+ import { DEFAULT_LOCALE as ae, __clearLocaleKeyCache as oe, canonicalLocaleKey as te, dateToDayKey as se, isLocaleSupported as ie, isValidDate as ne, resolveLocale as le, toDayKey as pe } from "./dates.es.js";
4
+ import { Directions as me, attributeDecorator as Ee, camelCaseToKebabCase as Te, capitalizeFirstLetter as Se, debounce as de, doesEventContainElement as Ce, doesWebComponentSlotExist as _e, enrichSVGIcon as ge, findFirstFocusableElement as ue, getDirection as fe, getRandomArbitrary as Ae, getRandomInt as De, getTypedEntries as xe, getTypedValues as Le, isAPISupported as ye, isIOS as Fe, isMobileDevice as Pe, nodesHaveContent as Me, partitionProps as he, propsChanged as ve, throttle as Oe } from "./helpers.es.js";
5
+ import { DEFAULT_MEMO_LIMIT as Ie, createBoundedMemo as Ne } from "./memo.es.js";
6
+ import { generateCssVarPrefix as Ue } from "./styles.es.js";
7
+ import { addScrollToRect as Be, compareDomOrder as Ke, findTopLevelSlottedWrapper as Ye, getElementScrollBoundingClientRect as we, getSecureRelAttribute as ze, readStringProp as He } from "./dom.es.js";
8
+ import { createRafScheduler as Ge } from "./raf.es.js";
9
+ import { computeFitCount as Ze, hasScrollOverflow as je, isMultiLineClamped as ke, isOverFlowing as qe, isSingleLineClamped as Je, isTextWrapping as Qe } from "./overflow.es.js";
8
10
  export {
9
11
  s as ACCENT,
10
12
  i as ATTRIBUTE,
11
13
  n as BASE_FONT_SIZE,
12
- p as BEAM_INVERSE,
13
- l as DEFAULT_ACCENT,
14
- m as DEFAULT_MODE,
15
- E as DEFAULT_PRODUCT_TYPE,
16
- c as DEFAULT_THEME,
17
- te as Directions,
18
- S as EXPRESSIVE_THEMES,
19
- T as FPS_1,
14
+ l as BEAM_INVERSE,
15
+ p as DEFAULT_ACCENT,
16
+ ae as DEFAULT_LOCALE,
17
+ Ie as DEFAULT_MEMO_LIMIT,
18
+ c as DEFAULT_MODE,
19
+ m as DEFAULT_PRODUCT_TYPE,
20
+ E as DEFAULT_THEME,
21
+ me as Directions,
22
+ T as EXPRESSIVE_THEMES,
23
+ S as FPS_1,
20
24
  d as FPS_120,
21
25
  C as FPS_30,
22
- g as FPS_60,
23
- u as PRODUCT_TYPE,
24
- _ as STORAGE_KEY,
26
+ _ as FPS_60,
27
+ g as PRODUCT_TYPE,
28
+ u as STORAGE_KEY,
25
29
  f as SYSTEM_MODE_ENABLED_KEY,
26
- x as SpacingValues,
27
- A as SpacingValuesAsNumbers,
28
- D as StaticAppearances,
29
- y as accentThemeClassName,
30
- he as addScrollToRect,
31
- F as allColors,
32
- P as allSizes,
33
- R as appearance,
34
- h as appearances,
35
- ae as attributeDecorator,
36
- oe as camelCaseToKebabCase,
37
- se as capitalizeFirstLetter,
38
- ve as compareDomOrder,
39
- Ue as computeFitCount,
40
- v as consumer,
41
- Me as createRafScheduler,
42
- ie as dateToDayKey,
43
- ne as debounce,
44
- pe as doesEventContainElement,
45
- le as doesWebComponentSlotExist,
46
- N as emphases,
47
- me as enrichSVGIcon,
48
- b as enterprise,
49
- O as expressiveThemeClassName,
50
- Ee as findFirstFocusableElement,
51
- Ne as findTopLevelSlottedWrapper,
52
- Pe as generateCssVarPrefix,
53
- t as generateSpacingClasses,
54
- a as getBEMClassNames,
55
- ce as getDirection,
56
- be as getElementScrollBoundingClientRect,
57
- Se as getRandomArbitrary,
58
- Te as getRandomInt,
59
- Oe as getSecureRelAttribute,
60
- de as getTypedEntries,
61
- Ce as getTypedValues,
62
- Be as hasScrollOverflow,
30
+ A as SpacingValues,
31
+ D as SpacingValuesAsNumbers,
32
+ x as StaticAppearances,
33
+ oe as __clearLocaleKeyCache,
34
+ L as accentThemeClassName,
35
+ Be as addScrollToRect,
36
+ y as allColors,
37
+ F as allSizes,
38
+ P as appearance,
39
+ M as appearances,
40
+ Ee as attributeDecorator,
41
+ Te as camelCaseToKebabCase,
42
+ te as canonicalLocaleKey,
43
+ Se as capitalizeFirstLetter,
44
+ Ke as compareDomOrder,
45
+ Ze as computeFitCount,
46
+ h as consumer,
47
+ Ne as createBoundedMemo,
48
+ Ge as createRafScheduler,
49
+ se as dateToDayKey,
50
+ de as debounce,
51
+ Ce as doesEventContainElement,
52
+ _e as doesWebComponentSlotExist,
53
+ v as emphases,
54
+ ge as enrichSVGIcon,
55
+ O as enterprise,
56
+ R as expressiveThemeClassName,
57
+ ue as findFirstFocusableElement,
58
+ Ye as findTopLevelSlottedWrapper,
59
+ Ue as generateCssVarPrefix,
60
+ a as generateSpacingClasses,
61
+ o as getBEMClassNames,
62
+ fe as getDirection,
63
+ we as getElementScrollBoundingClientRect,
64
+ Ae as getRandomArbitrary,
65
+ De as getRandomInt,
66
+ ze as getSecureRelAttribute,
67
+ xe as getTypedEntries,
68
+ Le as getTypedValues,
69
+ je as hasScrollOverflow,
63
70
  I as info,
64
- L as infoPrimary,
65
- M as infoSecondary,
66
- V as information,
67
- U as inverse,
68
- ge as isAPISupported,
69
- ue as isIOS,
70
- _e as isMobileDevice,
71
- Ke as isMultiLineClamped,
72
- Ye as isOverFlowing,
73
- we as isSingleLineClamped,
74
- ze as isTextWrapping,
71
+ N as infoPrimary,
72
+ b as infoSecondary,
73
+ U as information,
74
+ V as inverse,
75
+ ye as isAPISupported,
76
+ Fe as isIOS,
77
+ ie as isLocaleSupported,
78
+ Pe as isMobileDevice,
79
+ ke as isMultiLineClamped,
80
+ qe as isOverFlowing,
81
+ Je as isSingleLineClamped,
82
+ Qe as isTextWrapping,
83
+ ne as isValidDate,
75
84
  B as lg,
76
85
  K as md,
77
86
  Y as negative,
78
- fe as nodesHaveContent,
79
- xe as partitionProps,
87
+ Me as nodesHaveContent,
88
+ he as partitionProps,
80
89
  w as positive,
81
90
  z as prefix,
82
91
  H as primary,
83
92
  W as productTypeThemeClassName,
84
- Ae as propsChanged,
85
- Ie as readStringProp,
93
+ ve as propsChanged,
94
+ He as readStringProp,
95
+ le as resolveLocale,
86
96
  G as secondary,
87
97
  X as secondaryInverse,
88
98
  Z as sizes,
89
99
  j as sm,
90
100
  k as themeClassName,
91
101
  q as themeTypeValues,
92
- De as throttle,
93
- ye as toDayKey,
102
+ Oe as throttle,
103
+ pe as toDayKey,
94
104
  J as warning,
95
105
  Q as xl,
96
106
  $ as xs,
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=100,M=(r,a,u=s)=>{const e=new Map;return Object.assign((...c)=>{const t=r(...c);if(e.has(t)){const o=e.get(t);return e.delete(t),e.set(t,o),o}const n=a(...c);return e.set(t,n),e.size>u&&e.delete(e.keys().next().value),n},{clear:()=>e.clear()})};exports.DEFAULT_MEMO_LIMIT=s;exports.createBoundedMemo=M;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Entries a {@link createBoundedMemo} keeps before evicting.
3
+ *
4
+ * Sized for per-locale caches. A browser holds one or two locales and never
5
+ * gets near it. A server that takes the locale from `Accept-Language` is keyed
6
+ * by whatever tags clients send — an unknown or malformed tag still earns its
7
+ * own entry — so without a ceiling the process grows for as long as it runs.
8
+ * 100 is far above any real per-process locale count.
9
+ */
10
+ export declare const DEFAULT_MEMO_LIMIT = 100;
11
+ /** A memoized function, plus a way to empty it for test isolation. */
12
+ export interface BoundedMemo<Args extends unknown[], Value> {
13
+ (...args: Args): Value;
14
+ /** @internal — test-only. Drops every cached entry. */
15
+ clear(): void;
16
+ }
17
+ /**
18
+ * Caches `build` under `keyOf`, keeping at most `limit` entries and evicting
19
+ * the least recently used one past that.
20
+ *
21
+ * Least-recently-used rather than first-in-first-out because callers may
22
+ * depend on the result's identity — Calendar's weekday labels feed a `useMemo`
23
+ * dependency list, so evicting a value still in use would rebuild it with a new
24
+ * identity and re-render everything below. Touching an entry moves it out of
25
+ * the eviction queue, so anything in active use stays put.
26
+ *
27
+ * Past the limit the failure is a cliff, not a slope: a working set larger than
28
+ * `limit` evicts every entry just before it is next needed and the hit rate
29
+ * drops to zero. Keep one entry per logical key — don't fold variants into the
30
+ * key of a single memo, which quietly divides the headroom — and raise the
31
+ * limit rather than let a plausible workload sit just above it.
32
+ */
33
+ export declare const createBoundedMemo: <Args extends unknown[], Value>(keyOf: (...args: Args) => string, build: (...args: Args) => Value, limit?: number) => BoundedMemo<Args, Value>;
@@ -0,0 +1,16 @@
1
+ const l = 100, u = (o, a, r = 100) => {
2
+ const e = /* @__PURE__ */ new Map();
3
+ return Object.assign((...c) => {
4
+ const t = o(...c);
5
+ if (e.has(t)) {
6
+ const s = e.get(t);
7
+ return e.delete(t), e.set(t, s), s;
8
+ }
9
+ const n = a(...c);
10
+ return e.set(t, n), e.size > r && e.delete(e.keys().next().value), n;
11
+ }, { clear: () => e.clear() });
12
+ };
13
+ export {
14
+ l as DEFAULT_MEMO_LIMIT,
15
+ u as createBoundedMemo
16
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viasat/beam-shared",
3
- "version": "2.73.0",
3
+ "version": "2.75.0",
4
4
  "description": "Shared utilities, component definitions, and constants for the Beam Design System",
5
5
  "license": "MIT",
6
6
  "author": "Viasat",
@@ -1 +0,0 @@
1
- "use strict";const e=require("../lib/utils/constants.cjs.js"),s=[e.allSizes.sm,e.allSizes.md,e.allSizes.lg],l=e.allSizes.md,o=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_ACCORDION_SIZE:l,sizes:s},Symbol.toStringTag,{value:"Module"}));exports.DEFAULT_ACCORDION_SIZE=l;exports.accordion=o;exports.sizes=s;
@@ -1 +0,0 @@
1
- "use strict";const e=require("../lib/utils/constants.cjs.js"),c=require("../lib/utils/CSSLookup.cjs.js"),a=[e.allSizes.sm,e.allSizes.md],n=[e.appearances.infoPrimary,e.appearances.infoSecondary,e.appearances.positive,e.appearances.warning,e.appearances.negative],t={alert:"alert",alertDialog:"alertdialog"},s=i=>{const l=i==="sm"?2.625:3.125;return c.convertRemToPixels(l)},o={positive:"Success",warning:"Warning",negative:"Error",infoPrimary:"Information",infoSecondary:"Information"},r="Dismiss Alert",p=Object.freeze(Object.defineProperty({__proto__:null,appearances:n,closeButtonAriaLabel:r,getContentDefaultHeight:s,iconAriaLabels:o,roles:t,sizes:a},Symbol.toStringTag,{value:"Module"}));exports.alert=p;exports.appearances=n;exports.closeButtonAriaLabel=r;exports.getContentDefaultHeight=s;exports.iconAriaLabels=o;exports.roles=t;exports.sizes=a;
@@ -1 +0,0 @@
1
- "use strict";const e=require("../lib/utils/constants.cjs.js"),a=[e.appearances.infoPrimary,e.appearances.infoSecondary,e.appearances.positive,e.appearances.warning,e.appearances.negative],n=[e.emphases.strong,e.emphases.subtle],r={infoPrimary:"Primary Info",infoSecondary:"Secondary Info",positive:"Positive",warning:"Warning",negative:"Error"},o=Object.freeze(Object.defineProperty({__proto__:null,appearanceToAriaLabel:r,badgeDotAppearance:a,badgeDotEmphasis:n},Symbol.toStringTag,{value:"Module"}));exports.appearanceToAriaLabel=r;exports.badgeDot=o;exports.badgeDotAppearance=a;exports.badgeDotEmphasis=n;