@nubisco/ui 5.50.1 → 5.51.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 (68) hide show
  1. package/dist/{AiProvider-C5ezIeiH.cjs → AiProvider-C5PGq8_N.cjs} +1 -1
  2. package/dist/{AiProvider-DHXJJRrw.js → AiProvider-DkRd4Oee.js} +2 -2
  3. package/dist/{Breadcrumbs-BDsy1vNm.js → Breadcrumbs-8VM5XZTT.js} +1 -1
  4. package/dist/{Breadcrumbs-DMpa5j7m.cjs → Breadcrumbs-avQltgRZ.cjs} +1 -1
  5. package/dist/{Confirm-CZNS6FNr.js → Confirm-Bsf8R78g.js} +1 -1
  6. package/dist/{Confirm-DbrEaYlJ.cjs → Confirm-YFZK3eSw.cjs} +1 -1
  7. package/dist/{DatePicker-fS84mRE6.js → DatePicker-DPTMT52Y.js} +94 -90
  8. package/dist/DatePicker-DShl7pkk.cjs +1 -0
  9. package/dist/NumberInput-BNlXW5XD.cjs +1 -0
  10. package/dist/{NumberInput-B-TvTlXI.js → NumberInput-BgrIXtsT.js} +50 -50
  11. package/dist/{Pagination-Sm4rX7gH.cjs → Pagination-5qvBYkmf.cjs} +1 -1
  12. package/dist/{Pagination-CQJYl76w.js → Pagination-BTvOfCJG.js} +1 -1
  13. package/dist/{Search-CfH1Q9GB.cjs → Search-CQlcMCZ0.cjs} +1 -1
  14. package/dist/{Search-BnGuTcHp.js → Search-Cj9aSYg2.js} +1 -1
  15. package/dist/{Select-CuiJz35r.js → Select-DUAPhMYG.js} +5 -5
  16. package/dist/{Select-C4s5Eek6.cjs → Select-dAsXp4vb.cjs} +1 -1
  17. package/dist/{Slider-D3YgGPcY.cjs → Slider-CYYnC2N6.cjs} +1 -1
  18. package/dist/{Slider-BP-oEeJs.js → Slider-DjPICUZY.js} +1 -1
  19. package/dist/Submenu-BabY14Vm.cjs +1 -0
  20. package/dist/Submenu-DOzhF4BM.js +164 -0
  21. package/dist/{TextInput-BVTKUEey.cjs → TextInput-BTPC7DyL.cjs} +1 -1
  22. package/dist/{TextInput-DqaVhKud.js → TextInput-CYhPkNwH.js} +2 -2
  23. package/dist/all.cjs +1 -1
  24. package/dist/all.mjs +11 -11
  25. package/dist/components/AiProvider.cjs +1 -1
  26. package/dist/components/AiProvider.mjs +1 -1
  27. package/dist/components/Breadcrumbs.cjs +1 -1
  28. package/dist/components/Breadcrumbs.mjs +1 -1
  29. package/dist/components/Confirm.cjs +1 -1
  30. package/dist/components/Confirm.mjs +1 -1
  31. package/dist/components/DatePicker.cjs +1 -1
  32. package/dist/components/DatePicker.mjs +1 -1
  33. package/dist/components/DatePicker.vue.d.ts.map +1 -1
  34. package/dist/components/Menu.d.ts +7 -0
  35. package/dist/components/NumberInput.cjs +1 -1
  36. package/dist/components/NumberInput.mjs +1 -1
  37. package/dist/components/NumberInput.vue.d.ts.map +1 -1
  38. package/dist/components/Pagination.cjs +1 -1
  39. package/dist/components/Pagination.mjs +1 -1
  40. package/dist/components/Search.cjs +1 -1
  41. package/dist/components/Search.mjs +1 -1
  42. package/dist/components/Select.cjs +1 -1
  43. package/dist/components/Select.mjs +1 -1
  44. package/dist/components/Slider.cjs +1 -1
  45. package/dist/components/Slider.mjs +1 -1
  46. package/dist/components/Submenu.cjs +1 -1
  47. package/dist/components/Submenu.mjs +1 -1
  48. package/dist/components/Submenu.vue.d.ts +1 -0
  49. package/dist/components/Submenu.vue.d.ts.map +1 -1
  50. package/dist/components/TextInput.cjs +1 -1
  51. package/dist/components/TextInput.mjs +1 -1
  52. package/dist/components/TextInput.vue.d.ts.map +1 -1
  53. package/dist/composables/useConfirm.composable.cjs +1 -1
  54. package/dist/composables/useConfirm.composable.mjs +1 -1
  55. package/dist/composables/useNbStrings.composable.cjs +1 -1
  56. package/dist/composables/useNbStrings.composable.d.ts +2 -0
  57. package/dist/composables/useNbStrings.composable.d.ts.map +1 -1
  58. package/dist/composables/useNbStrings.composable.mjs +1 -0
  59. package/dist/index.cjs +1 -1
  60. package/dist/index.mjs +11 -11
  61. package/dist/styles/NumberInput.css +1 -1
  62. package/dist/styles/TextInput.css +1 -1
  63. package/dist/ui.css +2 -2
  64. package/package.json +2 -2
  65. package/dist/DatePicker-Du21bjhe.cjs +0 -1
  66. package/dist/NumberInput-DaZI9hc3.cjs +0 -1
  67. package/dist/Submenu-DRkHiWsD.cjs +0 -1
  68. package/dist/Submenu-Dnj5MiFy.js +0 -149
@@ -1,149 +0,0 @@
1
- import { t as e } from "./Icon-B2tiGiqZ.js";
2
- import { usePhoneLayout as t } from "./composables/usePhoneLayout.composable.mjs";
3
- import { Fragment as n, Teleport as r, Transition as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createVNode as u, defineComponent as d, inject as f, nextTick as p, normalizeClass as m, normalizeStyle as h, onBeforeUnmount as g, openBlock as _, ref as v, renderSlot as y, toDisplayString as b, unref as x, watch as S, withCtx as C, withKeys as w, withModifiers as T } from "vue";
4
- import { regular as E } from "@nubisco/ui/icons/caret-right";
5
- //#region src/components/Submenu.vue?vue&type=script&setup=true&lang.ts
6
- var D = [
7
- "aria-expanded",
8
- "aria-disabled",
9
- "onKeydown"
10
- ], O = { class: "nb-menu-item__label" }, k = /* @__PURE__ */ d({
11
- __name: "Submenu",
12
- props: {
13
- icon: { default: void 0 },
14
- label: {},
15
- disabled: {
16
- type: Boolean,
17
- default: !1
18
- }
19
- },
20
- setup(d) {
21
- let { phone: k } = t(), A = () => k.value ? "var(--nb-zindex-modal-dropdown)" : "var(--nb-zindex-menu)", j = d, M = v(null), N = v(null), P = v(!1), F = f("nb-menu", null), I = null, L = null, R = a(() => `nb-menu--${F?.size ?? "md"}`), z = v({
22
- position: "fixed",
23
- top: "0px",
24
- left: "0px",
25
- zIndex: A()
26
- });
27
- function B() {
28
- if (!M.value) return;
29
- let e = M.value.getBoundingClientRect(), t = e.right, n = e.top;
30
- t + 200 > window.innerWidth && (t = e.left - 200), n + 200 > window.innerHeight && (n = Math.max(8, window.innerHeight - 200)), z.value = {
31
- position: "fixed",
32
- top: `${n}px`,
33
- left: `${t}px`,
34
- zIndex: A()
35
- };
36
- }
37
- function V() {
38
- j.disabled || (q(), P.value = !0, B(), p(() => {
39
- if (N.value && M.value) {
40
- let e = M.value.getBoundingClientRect(), t = N.value.getBoundingClientRect(), n = e.right;
41
- n + t.width > window.innerWidth && (n = e.left - t.width);
42
- let r = e.top;
43
- r + t.height > window.innerHeight && (r = Math.max(8, window.innerHeight - t.height)), z.value = {
44
- position: "fixed",
45
- top: `${r}px`,
46
- left: `${n}px`,
47
- zIndex: A()
48
- };
49
- }
50
- }));
51
- }
52
- function H() {
53
- if (q(), !P.value) return;
54
- let e = !!N.value?.contains(document.activeElement);
55
- P.value = !1, e && M.value?.focus();
56
- }
57
- function U() {
58
- return N.value ? Array.from(N.value.querySelectorAll("[role=\"menuitem\"], [role=\"menuitemcheckbox\"], [role=\"menuitemradio\"]")) : [];
59
- }
60
- function W(e, t) {
61
- let n = U();
62
- for (let r = e; r >= 0 && r < n.length; r += t) if (n[r].getAttribute("aria-disabled") !== "true") {
63
- n[r].focus();
64
- return;
65
- }
66
- }
67
- function G() {
68
- j.disabled || (V(), p(() => W(0, 1)));
69
- }
70
- function K(e) {
71
- let t = U().indexOf(document.activeElement);
72
- e.key === "ArrowDown" ? (e.preventDefault(), e.stopPropagation(), W(t + 1, 1)) : e.key === "ArrowUp" ? (e.preventDefault(), e.stopPropagation(), t > 0 && W(t - 1, -1)) : e.key === "ArrowLeft" || e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), H()) : e.key === "Tab" && (H(), F?.close());
73
- }
74
- S(N, (e, t) => {
75
- t && F?.unregisterSurface(t), e && F?.registerSurface(e);
76
- });
77
- function q() {
78
- I &&= (clearTimeout(I), null), L &&= (clearTimeout(L), null);
79
- }
80
- function J() {
81
- q(), I = setTimeout(V, 150);
82
- }
83
- function Y() {
84
- q(), L = setTimeout(H, 150);
85
- }
86
- function X() {
87
- q();
88
- }
89
- function Z() {
90
- q(), L = setTimeout(H, 150);
91
- }
92
- function Q() {
93
- j.disabled || (P.value ? H() : V());
94
- }
95
- return g(() => {
96
- q(), N.value && F?.unregisterSurface(N.value);
97
- }), (t, a) => (_(), c(n, null, [l("li", {
98
- ref_key: "triggerRef",
99
- ref: M,
100
- class: m(["nb-menu-item nb-submenu-trigger", {
101
- "nb-menu-item--disabled": d.disabled,
102
- "nb-menu-item--highlighted": P.value
103
- }]),
104
- role: "menuitem",
105
- "aria-haspopup": "menu",
106
- "aria-expanded": P.value,
107
- "aria-disabled": d.disabled || void 0,
108
- tabindex: -1,
109
- onMouseenter: J,
110
- onMouseleave: Y,
111
- onKeydown: [
112
- w(T(G, ["prevent"]), ["right"]),
113
- w(T(G, ["prevent"]), ["enter"]),
114
- w(T(G, ["prevent"]), ["space"]),
115
- w(T(H, ["prevent"]), ["left"]),
116
- w(T(H, ["prevent"]), ["escape"])
117
- ],
118
- onClick: Q
119
- }, [
120
- d.icon ? (_(), o(e, {
121
- key: 0,
122
- name: d.icon,
123
- size: 16,
124
- class: "nb-menu-item__icon"
125
- }, null, 8, ["name"])) : s("", !0),
126
- l("span", O, b(d.label), 1),
127
- u(e, {
128
- name: x(E),
129
- size: "sm",
130
- class: "nb-submenu-trigger__caret"
131
- }, null, 8, ["name"])
132
- ], 42, D), (_(), o(r, { to: "body" }, [u(i, { name: "nb-submenu" }, {
133
- default: C(() => [P.value ? (_(), c("ul", {
134
- key: 0,
135
- ref_key: "submenuRef",
136
- ref: N,
137
- role: "menu",
138
- class: m(["nb-menu nb-submenu", [R.value]]),
139
- style: h(z.value),
140
- onMouseenter: X,
141
- onMouseleave: Z,
142
- onKeydown: K
143
- }, [y(t.$slots, "default")], 38)) : s("", !0)]),
144
- _: 3
145
- })]))], 64));
146
- }
147
- });
148
- //#endregion
149
- export { k as t };