@gradient-ui/core 0.5.0-rc.0 → 0.8.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 (151) hide show
  1. package/README.md +4 -4
  2. package/dist/{GLoading.vue_vue_type_style_index_0_lang-CBB_GocW.js → GLoading.vue_vue_type_style_index_0_lang-BbVYszn2.js} +90 -88
  3. package/dist/GLoading.vue_vue_type_style_index_0_lang-DW5X0giH.cjs +1 -0
  4. package/dist/GSwitch.vue_vue_type_script_setup_true_lang-BPwF9Kug.js +8734 -0
  5. package/dist/GSwitch.vue_vue_type_script_setup_true_lang-C45EmRhx.cjs +1 -0
  6. package/dist/{camelToKebabCase-6qY6WHvl.js → camelToKebabCase-BWbQb81D.js} +4 -4
  7. package/dist/components.cjs +1 -1
  8. package/dist/components.mjs +73 -65
  9. package/dist/default--73FwpwZ.cjs +4 -0
  10. package/dist/default-DlsS6GI_.js +58 -0
  11. package/dist/directives.cjs +1 -1
  12. package/dist/directives.mjs +1 -1
  13. package/dist/index-DVHKm06w.cjs +1 -0
  14. package/dist/index-DeFv4BdJ.js +418 -0
  15. package/dist/index.cjs +1 -1
  16. package/dist/index.mjs +197 -173
  17. package/dist/{mask-CZX-I_iy.js → mask-669nMf98.js} +2 -2
  18. package/dist/{mask-BbofdFd4.cjs → mask-Bh_UkcCe.cjs} +1 -1
  19. package/dist/materialSurface-BbFTyJuA.js +634 -0
  20. package/dist/materialSurface-DOfA2E9c.cjs +1 -0
  21. package/dist/scheme-CZ0a0X5e.cjs +299 -0
  22. package/dist/scheme-Dqwdqg6N.js +1405 -0
  23. package/dist/services.cjs +1 -1
  24. package/dist/services.mjs +1 -1
  25. package/dist/style.css +1 -1
  26. package/dist/{surface-BKu4KfkY.js → surface-C3w1Rz6V.js} +50 -47
  27. package/dist/surface-DB9flb-h.cjs +1 -0
  28. package/dist/theme.cjs +1 -1
  29. package/dist/theme.mjs +52 -48
  30. package/dist/types/components/index.d.ts +10 -0
  31. package/dist/types/components/ui/GAlert/GAlert.vue.d.ts +3 -3
  32. package/dist/types/components/ui/GAvatar/GAvatar.vue.d.ts +873 -0
  33. package/dist/types/components/ui/GAvatar/GAvatarGroup.vue.d.ts +194 -0
  34. package/dist/types/components/ui/GAvatar/index.d.ts +3 -0
  35. package/dist/types/components/ui/GAvatar/types.d.ts +585 -0
  36. package/dist/types/components/ui/GBadge/GBadge.vue.d.ts +5 -5
  37. package/dist/types/components/ui/GButton/GButton.vue.d.ts +3 -3
  38. package/dist/types/components/ui/GCard/GCard.vue.d.ts +949 -0
  39. package/dist/types/components/ui/GCard/index.d.ts +2 -0
  40. package/dist/types/components/ui/GCard/types.d.ts +519 -0
  41. package/dist/types/components/ui/GCheckControl/GCheckGroup.vue.d.ts +1 -1
  42. package/dist/types/components/ui/GChip/GChip.vue.d.ts +8 -4
  43. package/dist/types/components/ui/GChip/types.d.ts +1 -0
  44. package/dist/types/components/ui/GCombobox/GCombobox.vue.d.ts +37 -0
  45. package/dist/types/components/ui/GCombobox/index.d.ts +2 -0
  46. package/dist/types/components/ui/GCombobox/types.d.ts +59 -0
  47. package/dist/types/components/ui/GDivider/GDivider.vue.d.ts +965 -0
  48. package/dist/types/components/ui/GDivider/index.d.ts +2 -0
  49. package/dist/types/components/ui/GDivider/types.d.ts +518 -0
  50. package/dist/types/components/ui/GExpansion/GExpansion.vue.d.ts +9 -9
  51. package/dist/types/components/ui/GExpansionGroup/types.d.ts +4 -1
  52. package/dist/types/components/ui/GFAB/GFAB.vue.d.ts +4 -4
  53. package/dist/types/components/ui/GFieldBase/GFieldBase.vue.d.ts +75 -0
  54. package/dist/types/components/ui/GFieldBase/props.d.ts +73 -4
  55. package/dist/types/components/ui/GGradientMaterial/GGradientMaterial.vue.d.ts +3 -3
  56. package/dist/types/components/ui/GInput/GInput.vue.d.ts +75 -0
  57. package/dist/types/components/ui/GMenu/GMenu.vue.d.ts +1 -1
  58. package/dist/types/components/ui/GMenu/GSubmenu.vue.d.ts +6 -6
  59. package/dist/types/components/ui/GMenuItem/GMenuItem.vue.d.ts +1 -1
  60. package/dist/types/components/ui/GNavbar/GNavbar.vue.d.ts +3 -3
  61. package/dist/types/components/ui/GQuickActions/GQuickActions.vue.d.ts +1 -1
  62. package/dist/types/components/ui/GSelect/types.d.ts +6 -0
  63. package/dist/types/components/ui/GSelectItem.vue.d.ts +1 -1
  64. package/dist/types/components/ui/GSnackbar/GSnackbar.vue.d.ts +4 -4
  65. package/dist/types/components/ui/GStepper/GStepItem.vue.d.ts +16 -0
  66. package/dist/types/components/ui/GStepper/GStepPanel.vue.d.ts +76 -0
  67. package/dist/types/components/ui/GStepper/GStepper.vue.d.ts +63 -0
  68. package/dist/types/components/ui/GStepper/GStepperActions.vue.d.ts +22 -0
  69. package/dist/types/components/ui/GStepper/context.d.ts +42 -0
  70. package/dist/types/components/ui/GStepper/index.d.ts +4 -0
  71. package/dist/types/components/ui/GStepper/types.d.ts +708 -0
  72. package/dist/types/components/ui/GTable/GTable.vue.d.ts +13 -13
  73. package/dist/types/components/ui/GTable/types.d.ts +59 -55
  74. package/dist/types/components/ui/GTextarea/GTextarea.vue.d.ts +75 -0
  75. package/dist/types/components/ui/GToggleButton/GToggleButton.vue.d.ts +4 -4
  76. package/dist/types/theme/default.d.ts +2 -1
  77. package/dist/types/theme/gradient.d.ts +1 -1
  78. package/dist/types/theme/index.d.ts +6 -6
  79. package/dist/types/use/actionSurface.d.ts +5 -1650
  80. package/dist/types/use/density.d.ts +16 -0
  81. package/dist/types/use/form/fieldKeyboard.d.ts +19 -0
  82. package/dist/types/use/form/props.d.ts +54 -2
  83. package/dist/types/use/form/textFieldControl.d.ts +9 -1
  84. package/dist/types/use/gradient.d.ts +4 -1653
  85. package/dist/types/use/gradientMaterial.d.ts +1 -1
  86. package/dist/types/use/index.d.ts +9 -0
  87. package/dist/types/use/input/props.d.ts +43 -4
  88. package/dist/types/use/material.d.ts +3 -2
  89. package/dist/types/use/materialSurface.d.ts +10 -4
  90. package/dist/types/use/navigation/controller.d.ts +14 -0
  91. package/dist/types/use/navigation/index.d.ts +4 -0
  92. package/dist/types/use/navigation/item.d.ts +9 -0
  93. package/dist/types/use/navigation/keyboard.d.ts +4 -0
  94. package/dist/types/use/navigation/types.d.ts +42 -0
  95. package/dist/types/use/select/comboboxController.d.ts +36 -0
  96. package/dist/types/use/select/commit.d.ts +23 -0
  97. package/dist/types/use/select/controller.d.ts +5 -0
  98. package/dist/types/use/select/creatable.d.ts +18 -0
  99. package/dist/types/use/select/fieldControl.d.ts +59 -0
  100. package/dist/types/use/select/filter.d.ts +14 -0
  101. package/dist/types/use/select/listboxKeyboard.d.ts +9 -0
  102. package/dist/types/use/select/modelFallbackItems.d.ts +12 -0
  103. package/dist/types/use/select/search.d.ts +14 -0
  104. package/dist/types/use/select/searchFieldControl.d.ts +24 -0
  105. package/dist/types/use/select/selectionSummary.d.ts +1 -0
  106. package/dist/types/use/select/tokenInputKeyboard.d.ts +11 -0
  107. package/dist/types/use/stateIcon.d.ts +9 -0
  108. package/dist/types/use/stepper/controller.d.ts +20 -0
  109. package/dist/types/use/stepper/index.d.ts +1 -0
  110. package/dist/types/use/surfaceColor.d.ts +2 -1
  111. package/dist/types/use/surfaceMaterial.d.ts +45 -0
  112. package/dist/types/use/textarea/props.d.ts +43 -4
  113. package/dist/use.cjs +1 -1
  114. package/dist/use.mjs +54 -42
  115. package/dist/useSnackbar-6OiYxhJA.cjs +1 -0
  116. package/dist/useSnackbar-BYPu4tJ4.js +922 -0
  117. package/package.json +4 -2
  118. package/dist/GLoading.vue_vue_type_style_index_0_lang-Bv3dWEq8.cjs +0 -1
  119. package/dist/GSwitch.vue_vue_type_script_setup_true_lang-BS6bb1XY.cjs +0 -1
  120. package/dist/GSwitch.vue_vue_type_script_setup_true_lang-UTBNFP5X.js +0 -7015
  121. package/dist/default-BhuY-A3o.cjs +0 -4
  122. package/dist/default-OTmCd0Aq.js +0 -131
  123. package/dist/index-B3_n44N_.cjs +0 -1
  124. package/dist/index-BtCLucTD.js +0 -66
  125. package/dist/material-Ca7ZZAiO.cjs +0 -194
  126. package/dist/material-okvXHenb.js +0 -1162
  127. package/dist/materialSurface-BBrP9ltj.js +0 -591
  128. package/dist/materialSurface-CK8LN_dU.cjs +0 -1
  129. package/dist/surface-8z3gR7vF.cjs +0 -1
  130. package/dist/types/theme/gradient/animation/css.d.ts +0 -12
  131. package/dist/types/theme/gradient/animation/index.d.ts +0 -1
  132. package/dist/types/theme/gradient/colorMath.d.ts +0 -3
  133. package/dist/types/theme/gradient/constants.d.ts +0 -3
  134. package/dist/types/theme/gradient/core.d.ts +0 -1
  135. package/dist/types/theme/gradient/effects/index.d.ts +0 -1
  136. package/dist/types/theme/gradient/effects/morph.d.ts +0 -5
  137. package/dist/types/theme/gradient/effects/shadow.d.ts +0 -3
  138. package/dist/types/theme/gradient/formatters/canvas.d.ts +0 -2
  139. package/dist/types/theme/gradient/formatters/css.d.ts +0 -3
  140. package/dist/types/theme/gradient/formatters/index.d.ts +0 -1
  141. package/dist/types/theme/gradient/formatters/svg.d.ts +0 -5
  142. package/dist/types/theme/gradient/index.d.ts +0 -1
  143. package/dist/types/theme/gradient/material.d.ts +0 -1
  144. package/dist/types/theme/gradient/model.d.ts +0 -5
  145. package/dist/types/theme/gradient/presets.d.ts +0 -158
  146. package/dist/types/theme/gradient/recipes.d.ts +0 -14
  147. package/dist/types/theme/gradient/tokens.d.ts +0 -72
  148. package/dist/types/theme/gradient/types.d.ts +0 -117
  149. package/dist/types/theme/gradient/utils.d.ts +0 -10
  150. package/dist/useSnackbar-BHQshEZ8.cjs +0 -1
  151. package/dist/useSnackbar-DeNHZH8v.js +0 -908
@@ -1,72 +1,80 @@
1
- import { B as G, G as e, a as r, b as o, c as t, d as n, _ as i, e as p, f as u, g as d, h as b, i as l, j as v, k as x, l as T, m as c, n as k, o as m, p as f, q as M, r as I, s as N, t as g, u as A, v as B, w as S, x as L, y as h, z as w, A as C, C as E, D as y, E as D, F, H as P, I as _, J as q, K as R, L as j, M as z, N as H } from "./GSwitch.vue_vue_type_script_setup_true_lang-UTBNFP5X.js";
2
- import { _ as K, G as O, a as Q } from "./GLoading.vue_vue_type_style_index_0_lang-CBB_GocW.js";
3
- import { _ as U, G as W, a as X, b as Y, u as Z, c as $ } from "./useSnackbar-DeNHZH8v.js";
4
- import { G as sa, g as Ga, v as ea, l as ra, a as oa, r as ta, s as na, b as ia } from "./mask-CZX-I_iy.js";
5
- import { a as ua, d as da, u as ba, b as la } from "./index-Cs3XQ3JB.js";
6
- import { d as xa, u as Ta } from "./index-BtCLucTD.js";
1
+ import { B as G, G as e, a as r, b as o, c as t, d as n, e as i, f as p, g as u, _ as d, h as b, i as l, j as v, k as x, l as T, m as c, n as k, o as m, p as S, q as A, r as f, s as M, t as I, u as N, v as g, w as B, x as C, y as L, z as h, A as P, C as w, D, E, F as y, H as F, I as R, J as _, K as q, L as O, M as Q, N as V, O as j, P as z, Q as H, R as J, S as K, T as U, U as W, V as X } from "./GSwitch.vue_vue_type_script_setup_true_lang-BPwF9Kug.js";
2
+ import { _ as Z, G as $, a as aa } from "./GLoading.vue_vue_type_style_index_0_lang-BbVYszn2.js";
3
+ import { _ as Ga, G as ea, a as ra, b as oa, u as ta, c as na } from "./useSnackbar-BYPu4tJ4.js";
4
+ import { G as pa, g as ua, v as da, l as ba, a as la, r as va, s as xa, b as Ta } from "./mask-669nMf98.js";
5
+ import { a as ka, d as ma, u as Sa, b as Aa } from "./index-Cs3XQ3JB.js";
6
+ import { d as Ma, u as Ia } from "./index-DeFv4BdJ.js";
7
7
  export {
8
8
  G as BaseOverlay,
9
9
  e as GAlert,
10
10
  r as GAside,
11
11
  o as GAsideGroup,
12
12
  t as GAsideItem,
13
- n as GBadge,
14
- U as GButton,
15
- i as GCheckbox,
16
- p as GCheckboxGroup,
17
- u as GChip,
18
- d as GDrawer,
19
- b as GDropdownGroup,
20
- l as GExpandTransition,
21
- v as GExpansion,
22
- x as GExpansionGroup,
23
- T as GFAB,
24
- c as GForm,
25
- W as GGradient,
26
- k as GGradientMaterial,
27
- X as GIcon,
28
- m as GInput,
29
- K as GLoading,
30
- f as GMenu,
31
- M as GModal,
32
- I as GNavGroup,
33
- N as GNavItem,
34
- g as GNavList,
35
- A as GNavbar,
36
- B as GNavbarItem,
37
- S as GNavbarMenu,
38
- L as GNavbarSubItem,
39
- O as GProgress,
40
- h as GQuickActions,
41
- w as GRadio,
42
- C as GSelect,
43
- Y as GSnackbar,
44
- E as GSquircle,
45
- y as GSwitch,
46
- D as GTab,
47
- F as GTabList,
48
- P as GTabPanel,
49
- _ as GTabPanels,
50
- q as GTable,
51
- R as GTabs,
52
- j as GText,
53
- z as GTextarea,
54
- sa as GTooltip,
55
- Q as GTransition,
56
- H as GTransitionGroup,
57
- ua as applyMask,
58
- xa as defaultBreakpoints,
59
- da as defaultMaskTokens,
60
- ba as unmaskValue,
61
- Ta as useBreakpoints,
62
- Z as useLoading,
63
- la as useMask,
64
- $ as useSnackbar,
65
- Ga as vGradientIcon,
66
- ea as vGradientText,
67
- ra as vLoading,
68
- oa as vMask,
69
- ta as vRipple,
70
- na as vSpecular,
71
- ia as vTooltip
13
+ n as GAvatar,
14
+ i as GAvatarGroup,
15
+ p as GBadge,
16
+ Ga as GButton,
17
+ u as GCard,
18
+ d as GCheckbox,
19
+ b as GCheckboxGroup,
20
+ l as GChip,
21
+ v as GCombobox,
22
+ x as GDivider,
23
+ T as GDrawer,
24
+ c as GDropdownGroup,
25
+ k as GExpandTransition,
26
+ m as GExpansion,
27
+ S as GExpansionGroup,
28
+ A as GFAB,
29
+ f as GForm,
30
+ ea as GGradient,
31
+ M as GGradientMaterial,
32
+ ra as GIcon,
33
+ I as GInput,
34
+ Z as GLoading,
35
+ N as GMenu,
36
+ g as GModal,
37
+ B as GNavGroup,
38
+ C as GNavItem,
39
+ L as GNavList,
40
+ h as GNavbar,
41
+ P as GNavbarItem,
42
+ w as GNavbarMenu,
43
+ D as GNavbarSubItem,
44
+ $ as GProgress,
45
+ E as GQuickActions,
46
+ y as GRadio,
47
+ F as GSelect,
48
+ oa as GSnackbar,
49
+ R as GSquircle,
50
+ _ as GStepPanel,
51
+ q as GStepper,
52
+ O as GStepperActions,
53
+ Q as GSwitch,
54
+ V as GTab,
55
+ j as GTabList,
56
+ z as GTabPanel,
57
+ H as GTabPanels,
58
+ J as GTable,
59
+ K as GTabs,
60
+ U as GText,
61
+ W as GTextarea,
62
+ pa as GTooltip,
63
+ aa as GTransition,
64
+ X as GTransitionGroup,
65
+ ka as applyMask,
66
+ Ma as defaultBreakpoints,
67
+ ma as defaultMaskTokens,
68
+ Sa as unmaskValue,
69
+ Ia as useBreakpoints,
70
+ ta as useLoading,
71
+ Aa as useMask,
72
+ na as useSnackbar,
73
+ ua as vGradientIcon,
74
+ da as vGradientText,
75
+ ba as vLoading,
76
+ la as vMask,
77
+ va as vRipple,
78
+ xa as vSpecular,
79
+ Ta as vTooltip
72
80
  };
@@ -0,0 +1,4 @@
1
+ "use strict";const E=require("./camelToKebabCase-BQDotaQm.cjs"),l=require("@gradient-ui/gradient-engine"),u=require("vue"),D=(e,{className:t,id:n,prefix:s})=>{const o=Object.entries(e).map(([m,c])=>` --g-${s}-${E.camelToKebabCase(m)}: ${c};`),r=`.${t} {
2
+ ${o.join(`
3
+ `)}
4
+ }`;let a=document.getElementById(n);return a||(a=document.createElement("style"),a.id=n,document.head.appendChild(a)),a.textContent=r,a},g="g-theme--material",i="g-theme--",T=Symbol("gradient-theme"),h=(e,t)=>D(e,{className:g,id:`g-${t}-style`,prefix:t}),f=(e=l.DEFAULT_SEED,t={})=>d(e,"light",t),v=(e=l.DEFAULT_SEED,t={})=>d(e,"dark",t),d=(e=l.DEFAULT_SEED,t="light",n={})=>{const s=document.documentElement;s.classList.add(g),s.classList.remove(`${i}light`,`${i}dark`),s.classList.add(`${i}${t}`);const o=l.createDesignTokens({colors:n.colors,mode:t,seed:l.normalizeDesignTokenSeed(e)}),{tokens:r}=o;return{tokens:r,themeCSS:h(r.theme,"theme"),colorsCSS:h(r.colors,"color"),gradientCSS:h(r.gradients,"gradient")}},S=(e={})=>{const t=u.ref(e.seed??l.DEFAULT_SEED),n=u.ref(e.mode??"light"),s=u.shallowRef(null),o=()=>typeof window>"u"?null:(s.value=d(t.value,n.value,{colors:e.colors}),s.value),r=c=>(t.value=c,o()),a=c=>(n.value=c,o()),m=()=>(n.value=n.value==="dark"?"light":"dark",o());return e.autoApply!==!1&&o(),{seed:t,mode:n,result:s,apply:o,setSeed:r,setMode:a,toggleMode:m}},k=(e=S())=>(u.provide(T,e),e),y=(e,t)=>{e.provide(T,t)},L=()=>u.inject(T,null);exports.createDefaultDarkTheme=v;exports.createDefaultLightTheme=f;exports.createDefaultTheme=d;exports.createTheme=S;exports.installTheme=y;exports.provideTheme=k;exports.useTheme=L;
@@ -0,0 +1,58 @@
1
+ import { f as T } from "./camelToKebabCase-BWbQb81D.js";
2
+ import { DEFAULT_SEED as c, createDesignTokens as f, normalizeDesignTokenSeed as p } from "@gradient-ui/gradient-engine";
3
+ import { inject as v, ref as g, shallowRef as y, provide as k } from "vue";
4
+ const E = (e, { className: t, id: o, prefix: s }) => {
5
+ const n = Object.entries(e).map(
6
+ ([d, l]) => ` --g-${s}-${T(d)}: ${l};`
7
+ ), a = `.${t} {
8
+ ${n.join(`
9
+ `)}
10
+ }`;
11
+ let r = document.getElementById(o);
12
+ return r || (r = document.createElement("style"), r.id = o, document.head.appendChild(r)), r.textContent = a, r;
13
+ }, S = "g-theme--material", m = "g-theme--", i = Symbol("gradient-theme"), u = (e, t) => E(e, {
14
+ className: S,
15
+ id: `g-${t}-style`,
16
+ prefix: t
17
+ }), b = (e = c, t = {}) => h(e, "light", t), A = (e = c, t = {}) => h(e, "dark", t), h = (e = c, t = "light", o = {}) => {
18
+ const s = document.documentElement;
19
+ s.classList.add(S), s.classList.remove(
20
+ `${m}light`,
21
+ `${m}dark`
22
+ ), s.classList.add(`${m}${t}`);
23
+ const n = f({
24
+ colors: o.colors,
25
+ mode: t,
26
+ seed: p(e)
27
+ }), { tokens: a } = n;
28
+ return {
29
+ tokens: a,
30
+ themeCSS: u(a.theme, "theme"),
31
+ colorsCSS: u(a.colors, "color"),
32
+ gradientCSS: u(a.gradients, "gradient")
33
+ };
34
+ }, $ = (e = {}) => {
35
+ const t = g(e.seed ?? c), o = g(e.mode ?? "light"), s = y(null), n = () => typeof window > "u" ? null : (s.value = h(t.value, o.value, {
36
+ colors: e.colors
37
+ }), s.value), a = (l) => (t.value = l, n()), r = (l) => (o.value = l, n()), d = () => (o.value = o.value === "dark" ? "light" : "dark", n());
38
+ return e.autoApply !== !1 && n(), {
39
+ seed: t,
40
+ mode: o,
41
+ result: s,
42
+ apply: n,
43
+ setSeed: a,
44
+ setMode: r,
45
+ toggleMode: d
46
+ };
47
+ }, M = (e = $()) => (k(i, e), e), _ = (e, t) => {
48
+ e.provide(i, t);
49
+ }, j = () => v(i, null);
50
+ export {
51
+ b as a,
52
+ h as b,
53
+ A as c,
54
+ $ as d,
55
+ _ as i,
56
+ M as p,
57
+ j as u
58
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./mask-BbofdFd4.cjs");exports.vGradientIcon=e.gradientIcon;exports.vGradientText=e.vGradientText;exports.vLoading=e.loading;exports.vMask=e.vMask;exports.vRipple=e.ripple;exports.vSpecular=e.specular;exports.vTooltip=e.vTooltip;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./mask-Bh_UkcCe.cjs");exports.vGradientIcon=e.gradientIcon;exports.vGradientText=e.vGradientText;exports.vLoading=e.loading;exports.vMask=e.vMask;exports.vRipple=e.ripple;exports.vSpecular=e.specular;exports.vTooltip=e.vTooltip;
@@ -1,4 +1,4 @@
1
- import { g as v, v as e, l as o, a as r, r as i, s as p, b as t } from "./mask-CZX-I_iy.js";
1
+ import { g as v, v as e, l as o, a as r, r as i, s as p, b as t } from "./mask-669nMf98.js";
2
2
  export {
3
3
  v as vGradientIcon,
4
4
  e as vGradientText,
@@ -0,0 +1 @@
1
+ "use strict";const t=require("vue"),F=require("./surface-DB9flb-h.cjs");function C(e){const u=()=>t.toValue(e.orientation)??"horizontal";function r(a,d){const n=e.getEnabledItems(),v=n.findIndex(s=>Object.is(s.value,d)),f=u()==="horizontal",c=f?"ArrowLeft":"ArrowUp",o=f?"ArrowRight":"ArrowDown";if(a.key===c){e.focusItem(v<=0?n.length-1:v-1,a);return}if(a.key===o){e.focusItem(v>=n.length-1?0:v+1,a);return}if(a.key==="Home"){e.focusItem(0,a);return}if(a.key==="End"){e.focusItem(n.length-1,a);return}t.toValue(e.selectOnAction)&&(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),e.select(d,a))}return{onItemKeydown:r}}const B=e=>String(e??"default").replace(/[^a-zA-Z0-9_-]/g,"-");function D(e){const u=t.ref(t.toValue(e.defaultValue)),r=t.shallowRef([]),a=t.computed(()=>t.toValue(e.modelValue)!==void 0),d=t.computed({get(){return a.value?t.toValue(e.modelValue):u.value},set(i){a.value||(u.value=i),e.onUpdateModelValue(i)}}),n=()=>!!t.toValue(e.disabled);function v(i){return i!==void 0&&Object.is(d.value,i)}function f(i,V){var h;n()||i===void 0||e.canSelect&&!e.canSelect(i,V)||(d.value=i,(h=e.onSelect)==null||h.call(e,i,V))}function c(i){const V=r.value.filter(h=>h.el!==i.el);V.push(i),r.value=V,t.toValue(e.mandatory)&&d.value===void 0&&i.value!==void 0&&!i.disabled&&f(i.value)}function o(i){r.value=r.value.filter(V=>V.el!==i)}function s(){return r.value.filter(i=>!i.disabled&&i.value!==void 0)}function I(i,V){const y=s()[i];y&&(V.preventDefault(),y.el.focus(),t.toValue(e.selectOnFocus)&&f(y.value,V))}const{onItemKeydown:g}=C({orientation:e.orientation,selectOnAction:e.selectOnAction,getEnabledItems:s,focusItem:I,select:f});return{model:d,registeredItems:r,isSelected:v,select:f,registerItem:c,unregisterItem:o,getEnabledItems:s,focusItem:I,onItemKeydown:g,getItemId:i=>`${e.idPrefix}-${e.itemIdSegment??"item"}-${B(i)}`,getPanelId:i=>`${e.idPrefix}-${e.panelIdSegment??"panel"}-${B(i)}`}}function P(e){const u=t.computed(()=>t.toValue(e.value)),r=t.computed(()=>!!(t.toValue(e.disabled)||t.toValue(e.parentDisabled))),a=t.computed(()=>{var o;return!!((o=e.isSelected)!=null&&o.call(e,u.value))});function d(){var o;e.rootRef.value&&((o=e.registerItem)==null||o.call(e,{value:u.value,el:e.rootRef.value,disabled:r.value}))}function n(){var o;e.rootRef.value&&((o=e.unregisterItem)==null||o.call(e,e.rootRef.value))}function v(o,s){var I;(I=e.select)==null||I.call(e,o,s)}function f(o){var s;r.value||(v(u.value,o),(s=e.onClick)==null||s.call(e,o))}function c(o){var s;(s=e.onItemKeydown)==null||s.call(e,o,u.value)}return t.onMounted(d),t.onBeforeUnmount(n),t.watch(()=>[u.value,r.value],()=>d()),{value:u,disabled:r,selected:a,select:v,onClick:f,onKeydown:c}}function O(e){const u=t.computed(()=>(t.toValue(e.items)??[]).map((l,m)=>({...l,index:m}))),r=t.computed(()=>new Map(u.value.map(l=>[l.value,l]))),a=t.computed(()=>u.value.findIndex(l=>Object.is(l.value,s.model.value))),d=t.computed(()=>a.value>=0?u.value[a.value]:void 0),n=()=>!!t.toValue(e.disabled),v=l=>l.completed??(a.value>=0&&l.index<a.value),f=l=>!!(t.toValue(e.editable)||l.editable||v(l)),c=l=>n()||l.disabled?!1:t.toValue(e.linear)?a.value<0?l.index===0||f(l):l.index<=a.value+1?!0:f(l):!0,o=l=>{const m=l===void 0?void 0:r.value.get(l);return m?c(m):!1},s=D({modelValue:()=>t.toValue(e.modelValue),defaultValue:()=>t.toValue(e.defaultValue),disabled:e.disabled,mandatory:e.mandatory,orientation:e.orientation,selectOnFocus:()=>t.toValue(e.activation)==="automatic",selectOnAction:()=>t.toValue(e.activation)==="manual",idPrefix:e.idPrefix,itemIdSegment:"step",panelIdSegment:"step-panel",canSelect:o,onUpdateModelValue:e.onUpdateModelValue,onSelect:(l,m)=>{var b;return(b=e.onSelect)==null?void 0:b.call(e,l,l===void 0?void 0:r.value.get(l),m)}}),I=()=>u.value.find(l=>l.index>a.value&&c(l)),g=()=>[...u.value].reverse().find(l=>l.index<a.value&&c(l)),x=t.computed(()=>!!I()),A=t.computed(()=>!!g()),i=t.computed(()=>{const m=u.value.filter(c).at(-1);return!!(m&&Object.is(m.value,s.model.value))}),V=l=>c(l)?l.state==="error"||l.error?"error":s.isSelected(l.value)?"active":v(l)?"completed":"pending":"disabled",h=l=>{if(l.state)return l.state;if(l.error)return"error"},y=l=>{const m=l.value===void 0?void 0:r.value.get(l.value);s.registerItem({...l,disabled:l.disabled||(m?!c(m):!0)})},w=(l,m)=>s.select(l,m);return{...s,items:u,activeIndex:a,activeItem:d,canNext:x,canPrev:A,isLast:i,isStepAvailable:c,isStepCompleted:v,getItemState:V,getItemSemanticState:h,registerStep:y,select:w,next:l=>{var b;const m=I();m&&(w(m.value,l),(b=e.onNext)==null||b.call(e,m.value,m,l))},prev:l=>{var b;const m=g();m&&(w(m.value,l),(b=e.onPrev)==null||b.call(e,m.value,m,l))},finish:l=>{var m;(m=e.onFinish)==null||m.call(e,s.model.value,d.value,l)}}}const R=({state:e,icon:u,icons:r,defaultIcons:a})=>(r==null?void 0:r[e])??(a==null?void 0:a[e])??u,U=F.propsFactory({density:{type:String,default:"comfortable"}});function E(e,u,r="density"){return t.computed(()=>`${u}_${r}-${e.density}`)}const M=(e,u)=>typeof e=="function"?e(u):e===void 0||!!t.toValue(e),k=(e,u)=>typeof e=="function"?e(u):!!e,N=(e,u)=>Array.isArray(e.key)?e.key.includes(u):e.key===u;function $(e){function u(r){if(t.toValue(e.disabled)||t.toValue(e.readonly)||e.ignoreComposing!==!1&&r.isComposing)return;const a=t.toValue(e.handlers).find(d=>N(d,r.key)&&M(d.when,r));a&&(k(a.preventDefault,r)&&r.preventDefault(),k(a.stopPropagation,r)&&r.stopPropagation(),a.handler(r))}return{handleKeydown:u}}function L(e){function u(n){var v,f,c;n.disabled||((v=e.isCustomItem)!=null&&v.call(e,n)&&((f=e.onAdd)==null||f.call(e,n.raw,t.toValue(e.searchValue).trim())),e.selectItem(n),(c=e.onSelect)==null||c.call(e,n),t.toValue(e.isMultiple)?e.setSearch(""):e.setSearch(n.label),t.toValue(e.shouldCloseOnSelect)&&(e.open.value=!1),e.onInputValidation())}function r(n){const v=e.resolveMenuItem(n);v&&u(v)}function a(){const n=e.firstVisibleItem();n&&u(n)}function d(n){e.selectItem(n),e.onInputValidation()}return{commitItem:u,onSelect:r,selectFirstVisibleItem:a,removeItem:d}}function z(e){return{handlers:[{key:"Enter",preventDefault:!0,handler:e.selectFirstVisibleItem},{key:"Escape",handler:()=>{e.open.value=!1}}]}}const j="input, button";function W(e){function u(f){e.setSearch(f.target.value),e.open.value=!0,e.onInputValidation()}function r(f){e.onFocus(),e.open.value=!0,e.emitFocus(f)}function a(f){var c;e.onBlur(),e.emitBlur(f),(c=e.afterBlur)==null||c.call(e)}function d(){e.clearValue(),e.setSearch(""),e.onInputValidation(),e.emitClear()}function n(){var f;t.toValue(e.disabled)||((f=e.inputRef.value)==null||f.focus(),e.open.value=!0)}function v(f){if(t.toValue(e.disabled))return;const c=f.target,o=e.activatorIgnoreSelector??j;c!=null&&c.closest(o)||(f.preventDefault(),n())}return{handleInput:u,handleFocus:r,handleBlur:a,handleClear:d,focusControl:n,handleActivatorMousedown:v}}function q(e){return{handlers:[{key:"Backspace",when:()=>!!t.toValue(e.enabled)&&!t.toValue(e.searchValue)&&t.toValue(e.items).length>0,handler:()=>{const a=t.toValue(e.items),d=a[a.length-1];d!==void 0&&e.removeItem(d)}}]}}const K={sm:600,md:900,lg:1200,xl:1536};function S(e,u){return typeof u=="number"?u:e[u]??0}function H(e=K){const u=t.ref(0),r=t.ref(0);function a(){u.value=window.innerWidth,r.value=window.innerHeight}t.onMounted(()=>{a(),window.addEventListener("resize",a,{passive:!0})}),t.onBeforeUnmount(()=>{window.removeEventListener("resize",a)});function d(c){return t.computed(()=>u.value>=S(e,c))}function n(c){return t.computed(()=>u.value<=S(e,c))}function v(c,o){return t.computed(()=>{const s=S(e,c),I=S(e,o);return u.value>=s&&u.value<=I})}const f=t.computed(()=>{var s;const c=Object.entries(e).sort((I,g)=>I[1]-g[1]);let o=((s=c[0])==null?void 0:s[0])??"";for(const[I,g]of c)u.value>=g&&(o=I);return o});return{breakpoints:e,width:u,height:r,name:f,up:d,down:n,between:v,smAndUp:d("sm"),smAndDown:n("sm"),mdAndUp:d("md"),mdAndDown:n("md"),lgAndUp:d("lg"),lgAndDown:n("lg"),xlAndUp:d("xl"),xlAndDown:n("xl")}}exports.defaultBreakpoints=K;exports.makeDensityProps=U;exports.resolveStateIcon=R;exports.useBreakpoints=H;exports.useDensity=E;exports.useFieldKeyboard=$;exports.useNavigationController=D;exports.useNavigationItem=P;exports.useNavigationKeyboard=C;exports.useSearchFieldControl=W;exports.useSelectCommit=L;exports.useSelectListboxKeyboard=z;exports.useStepperController=O;exports.useTokenInputKeyboard=q;
@@ -0,0 +1,418 @@
1
+ import { toValue as c, ref as V, shallowRef as P, computed as h, onMounted as K, onBeforeUnmount as O, watch as F } from "vue";
2
+ import { p as R } from "./surface-C3w1Rz6V.js";
3
+ function E(e) {
4
+ const l = () => c(e.orientation) ?? "horizontal";
5
+ function a(r, d) {
6
+ const n = e.getEnabledItems(), I = n.findIndex(
7
+ (v) => Object.is(v.value, d)
8
+ ), f = l() === "horizontal", u = f ? "ArrowLeft" : "ArrowUp", s = f ? "ArrowRight" : "ArrowDown";
9
+ if (r.key === u) {
10
+ e.focusItem(
11
+ I <= 0 ? n.length - 1 : I - 1,
12
+ r
13
+ );
14
+ return;
15
+ }
16
+ if (r.key === s) {
17
+ e.focusItem(
18
+ I >= n.length - 1 ? 0 : I + 1,
19
+ r
20
+ );
21
+ return;
22
+ }
23
+ if (r.key === "Home") {
24
+ e.focusItem(0, r);
25
+ return;
26
+ }
27
+ if (r.key === "End") {
28
+ e.focusItem(n.length - 1, r);
29
+ return;
30
+ }
31
+ c(e.selectOnAction) && (r.key === "Enter" || r.key === " ") && (r.preventDefault(), e.select(d, r));
32
+ }
33
+ return {
34
+ onItemKeydown: a
35
+ };
36
+ }
37
+ const D = (e) => String(e ?? "default").replace(/[^a-zA-Z0-9_-]/g, "-");
38
+ function U(e) {
39
+ const l = V(
40
+ c(e.defaultValue)
41
+ ), a = P([]), r = h(
42
+ () => c(e.modelValue) !== void 0
43
+ ), d = h({
44
+ get() {
45
+ return r.value ? c(e.modelValue) : l.value;
46
+ },
47
+ set(i) {
48
+ r.value || (l.value = i), e.onUpdateModelValue(i);
49
+ }
50
+ }), n = () => !!c(e.disabled);
51
+ function I(i) {
52
+ return i !== void 0 && Object.is(d.value, i);
53
+ }
54
+ function f(i, o) {
55
+ var S;
56
+ n() || i === void 0 || e.canSelect && !e.canSelect(i, o) || (d.value = i, (S = e.onSelect) == null || S.call(e, i, o));
57
+ }
58
+ function u(i) {
59
+ const o = a.value.filter(
60
+ (S) => S.el !== i.el
61
+ );
62
+ o.push(i), a.value = o, c(e.mandatory) && d.value === void 0 && i.value !== void 0 && !i.disabled && f(i.value);
63
+ }
64
+ function s(i) {
65
+ a.value = a.value.filter(
66
+ (o) => o.el !== i
67
+ );
68
+ }
69
+ function v() {
70
+ return a.value.filter(
71
+ (i) => !i.disabled && i.value !== void 0
72
+ );
73
+ }
74
+ function g(i, o) {
75
+ const w = v()[i];
76
+ w && (o.preventDefault(), w.el.focus(), c(e.selectOnFocus) && f(w.value, o));
77
+ }
78
+ const { onItemKeydown: b } = E({
79
+ orientation: e.orientation,
80
+ selectOnAction: e.selectOnAction,
81
+ getEnabledItems: v,
82
+ focusItem: g,
83
+ select: f
84
+ });
85
+ return {
86
+ model: d,
87
+ registeredItems: a,
88
+ isSelected: I,
89
+ select: f,
90
+ registerItem: u,
91
+ unregisterItem: s,
92
+ getEnabledItems: v,
93
+ focusItem: g,
94
+ onItemKeydown: b,
95
+ getItemId: (i) => `${e.idPrefix}-${e.itemIdSegment ?? "item"}-${D(i)}`,
96
+ getPanelId: (i) => `${e.idPrefix}-${e.panelIdSegment ?? "panel"}-${D(i)}`
97
+ };
98
+ }
99
+ function T(e) {
100
+ const l = h(() => c(e.value)), a = h(
101
+ () => !!(c(e.disabled) || c(e.parentDisabled))
102
+ ), r = h(() => {
103
+ var s;
104
+ return !!((s = e.isSelected) != null && s.call(e, l.value));
105
+ });
106
+ function d() {
107
+ var s;
108
+ e.rootRef.value && ((s = e.registerItem) == null || s.call(e, {
109
+ value: l.value,
110
+ el: e.rootRef.value,
111
+ disabled: a.value
112
+ }));
113
+ }
114
+ function n() {
115
+ var s;
116
+ e.rootRef.value && ((s = e.unregisterItem) == null || s.call(e, e.rootRef.value));
117
+ }
118
+ function I(s, v) {
119
+ var g;
120
+ (g = e.select) == null || g.call(e, s, v);
121
+ }
122
+ function f(s) {
123
+ var v;
124
+ a.value || (I(l.value, s), (v = e.onClick) == null || v.call(e, s));
125
+ }
126
+ function u(s) {
127
+ var v;
128
+ (v = e.onItemKeydown) == null || v.call(e, s, l.value);
129
+ }
130
+ return K(d), O(n), F(
131
+ () => [l.value, a.value],
132
+ () => d()
133
+ ), {
134
+ value: l,
135
+ disabled: a,
136
+ selected: r,
137
+ select: I,
138
+ onClick: f,
139
+ onKeydown: u
140
+ };
141
+ }
142
+ function Z(e) {
143
+ const l = h(
144
+ () => (c(e.items) ?? []).map((t, m) => ({
145
+ ...t,
146
+ index: m
147
+ }))
148
+ ), a = h(
149
+ () => new Map(l.value.map((t) => [t.value, t]))
150
+ ), r = h(
151
+ () => l.value.findIndex(
152
+ (t) => Object.is(t.value, v.model.value)
153
+ )
154
+ ), d = h(
155
+ () => r.value >= 0 ? l.value[r.value] : void 0
156
+ ), n = () => !!c(e.disabled), I = (t) => t.completed ?? (r.value >= 0 && t.index < r.value), f = (t) => !!(c(e.editable) || t.editable || I(t)), u = (t) => n() || t.disabled ? !1 : c(e.linear) ? r.value < 0 ? t.index === 0 || f(t) : t.index <= r.value + 1 ? !0 : f(t) : !0, s = (t) => {
157
+ const m = t === void 0 ? void 0 : a.value.get(t);
158
+ return m ? u(m) : !1;
159
+ }, v = U({
160
+ modelValue: () => c(e.modelValue),
161
+ defaultValue: () => c(e.defaultValue),
162
+ disabled: e.disabled,
163
+ mandatory: e.mandatory,
164
+ orientation: e.orientation,
165
+ selectOnFocus: () => c(e.activation) === "automatic",
166
+ selectOnAction: () => c(e.activation) === "manual",
167
+ idPrefix: e.idPrefix,
168
+ itemIdSegment: "step",
169
+ panelIdSegment: "step-panel",
170
+ canSelect: s,
171
+ onUpdateModelValue: e.onUpdateModelValue,
172
+ onSelect: (t, m) => {
173
+ var y;
174
+ return (y = e.onSelect) == null ? void 0 : y.call(
175
+ e,
176
+ t,
177
+ t === void 0 ? void 0 : a.value.get(t),
178
+ m
179
+ );
180
+ }
181
+ }), g = () => l.value.find(
182
+ (t) => t.index > r.value && u(t)
183
+ ), b = () => [...l.value].reverse().find(
184
+ (t) => t.index < r.value && u(t)
185
+ ), B = h(() => !!g()), k = h(() => !!b()), i = h(() => {
186
+ const m = l.value.filter(u).at(-1);
187
+ return !!(m && Object.is(m.value, v.model.value));
188
+ }), o = (t) => u(t) ? t.state === "error" || t.error ? "error" : v.isSelected(t.value) ? "active" : I(t) ? "completed" : "pending" : "disabled", S = (t) => {
189
+ if (t.state) return t.state;
190
+ if (t.error) return "error";
191
+ }, w = (t) => {
192
+ const m = t.value === void 0 ? void 0 : a.value.get(t.value);
193
+ v.registerItem({
194
+ ...t,
195
+ disabled: t.disabled || (m ? !u(m) : !0)
196
+ });
197
+ }, A = (t, m) => v.select(t, m);
198
+ return {
199
+ ...v,
200
+ items: l,
201
+ activeIndex: r,
202
+ activeItem: d,
203
+ canNext: B,
204
+ canPrev: k,
205
+ isLast: i,
206
+ isStepAvailable: u,
207
+ isStepCompleted: I,
208
+ getItemState: o,
209
+ getItemSemanticState: S,
210
+ registerStep: w,
211
+ select: A,
212
+ next: (t) => {
213
+ var y;
214
+ const m = g();
215
+ m && (A(m.value, t), (y = e.onNext) == null || y.call(e, m.value, m, t));
216
+ },
217
+ prev: (t) => {
218
+ var y;
219
+ const m = b();
220
+ m && (A(m.value, t), (y = e.onPrev) == null || y.call(e, m.value, m, t));
221
+ },
222
+ finish: (t) => {
223
+ var m;
224
+ (m = e.onFinish) == null || m.call(e, v.model.value, d.value, t);
225
+ }
226
+ };
227
+ }
228
+ const q = ({
229
+ state: e,
230
+ icon: l,
231
+ icons: a,
232
+ defaultIcons: r
233
+ }) => (a == null ? void 0 : a[e]) ?? (r == null ? void 0 : r[e]) ?? l, G = R({
234
+ density: {
235
+ type: String,
236
+ default: "comfortable"
237
+ }
238
+ });
239
+ function J(e, l, a = "density") {
240
+ return h(() => `${l}_${a}-${e.density}`);
241
+ }
242
+ const $ = (e, l) => typeof e == "function" ? e(l) : e === void 0 || !!c(e), C = (e, l) => typeof e == "function" ? e(l) : !!e, M = (e, l) => Array.isArray(e.key) ? e.key.includes(l) : e.key === l;
243
+ function Q(e) {
244
+ function l(a) {
245
+ if (c(e.disabled) || c(e.readonly) || e.ignoreComposing !== !1 && a.isComposing) return;
246
+ const r = c(e.handlers).find(
247
+ (d) => M(d, a.key) && $(d.when, a)
248
+ );
249
+ r && (C(r.preventDefault, a) && a.preventDefault(), C(r.stopPropagation, a) && a.stopPropagation(), r.handler(a));
250
+ }
251
+ return {
252
+ handleKeydown: l
253
+ };
254
+ }
255
+ function X(e) {
256
+ function l(n) {
257
+ var I, f, u;
258
+ n.disabled || ((I = e.isCustomItem) != null && I.call(e, n) && ((f = e.onAdd) == null || f.call(e, n.raw, c(e.searchValue).trim())), e.selectItem(n), (u = e.onSelect) == null || u.call(e, n), c(e.isMultiple) ? e.setSearch("") : e.setSearch(n.label), c(e.shouldCloseOnSelect) && (e.open.value = !1), e.onInputValidation());
259
+ }
260
+ function a(n) {
261
+ const I = e.resolveMenuItem(n);
262
+ I && l(I);
263
+ }
264
+ function r() {
265
+ const n = e.firstVisibleItem();
266
+ n && l(n);
267
+ }
268
+ function d(n) {
269
+ e.selectItem(n), e.onInputValidation();
270
+ }
271
+ return {
272
+ commitItem: l,
273
+ onSelect: a,
274
+ selectFirstVisibleItem: r,
275
+ removeItem: d
276
+ };
277
+ }
278
+ function Y(e) {
279
+ return {
280
+ handlers: [
281
+ {
282
+ key: "Enter",
283
+ preventDefault: !0,
284
+ handler: e.selectFirstVisibleItem
285
+ },
286
+ {
287
+ key: "Escape",
288
+ handler: () => {
289
+ e.open.value = !1;
290
+ }
291
+ }
292
+ ]
293
+ };
294
+ }
295
+ const z = "input, button";
296
+ function p(e) {
297
+ function l(f) {
298
+ e.setSearch(f.target.value), e.open.value = !0, e.onInputValidation();
299
+ }
300
+ function a(f) {
301
+ e.onFocus(), e.open.value = !0, e.emitFocus(f);
302
+ }
303
+ function r(f) {
304
+ var u;
305
+ e.onBlur(), e.emitBlur(f), (u = e.afterBlur) == null || u.call(e);
306
+ }
307
+ function d() {
308
+ e.clearValue(), e.setSearch(""), e.onInputValidation(), e.emitClear();
309
+ }
310
+ function n() {
311
+ var f;
312
+ c(e.disabled) || ((f = e.inputRef.value) == null || f.focus(), e.open.value = !0);
313
+ }
314
+ function I(f) {
315
+ if (c(e.disabled)) return;
316
+ const u = f.target, s = e.activatorIgnoreSelector ?? z;
317
+ u != null && u.closest(s) || (f.preventDefault(), n());
318
+ }
319
+ return {
320
+ handleInput: l,
321
+ handleFocus: a,
322
+ handleBlur: r,
323
+ handleClear: d,
324
+ focusControl: n,
325
+ handleActivatorMousedown: I
326
+ };
327
+ }
328
+ function ee(e) {
329
+ return {
330
+ handlers: [
331
+ {
332
+ key: "Backspace",
333
+ when: () => !!c(e.enabled) && !c(e.searchValue) && c(e.items).length > 0,
334
+ handler: () => {
335
+ const r = c(e.items), d = r[r.length - 1];
336
+ d !== void 0 && e.removeItem(d);
337
+ }
338
+ }
339
+ ]
340
+ };
341
+ }
342
+ const L = {
343
+ sm: 600,
344
+ md: 900,
345
+ lg: 1200,
346
+ xl: 1536
347
+ };
348
+ function x(e, l) {
349
+ return typeof l == "number" ? l : e[l] ?? 0;
350
+ }
351
+ function te(e = L) {
352
+ const l = V(0), a = V(0);
353
+ function r() {
354
+ l.value = window.innerWidth, a.value = window.innerHeight;
355
+ }
356
+ K(() => {
357
+ r(), window.addEventListener("resize", r, { passive: !0 });
358
+ }), O(() => {
359
+ window.removeEventListener("resize", r);
360
+ });
361
+ function d(u) {
362
+ return h(
363
+ () => l.value >= x(e, u)
364
+ );
365
+ }
366
+ function n(u) {
367
+ return h(
368
+ () => l.value <= x(e, u)
369
+ );
370
+ }
371
+ function I(u, s) {
372
+ return h(() => {
373
+ const v = x(e, u), g = x(e, s);
374
+ return l.value >= v && l.value <= g;
375
+ });
376
+ }
377
+ const f = h(() => {
378
+ var v;
379
+ const u = Object.entries(e).sort((g, b) => g[1] - b[1]);
380
+ let s = ((v = u[0]) == null ? void 0 : v[0]) ?? "";
381
+ for (const [g, b] of u)
382
+ l.value >= b && (s = g);
383
+ return s;
384
+ });
385
+ return {
386
+ breakpoints: e,
387
+ width: l,
388
+ height: a,
389
+ name: f,
390
+ up: d,
391
+ down: n,
392
+ between: I,
393
+ smAndUp: d("sm"),
394
+ smAndDown: n("sm"),
395
+ mdAndUp: d("md"),
396
+ mdAndDown: n("md"),
397
+ lgAndUp: d("lg"),
398
+ lgAndDown: n("lg"),
399
+ xlAndUp: d("xl"),
400
+ xlAndDown: n("xl")
401
+ };
402
+ }
403
+ export {
404
+ J as a,
405
+ Q as b,
406
+ U as c,
407
+ L as d,
408
+ T as e,
409
+ E as f,
410
+ p as g,
411
+ X as h,
412
+ Y as i,
413
+ Z as j,
414
+ ee as k,
415
+ G as m,
416
+ q as r,
417
+ te as u
418
+ };