@floegence/floe-webapp-core 0.86.76 → 0.87.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/components/index.d.ts +2 -0
  2. package/dist/components/ui/Accordion.d.ts +16 -0
  3. package/dist/components/ui/Accordion.js +59 -0
  4. package/dist/components/ui/Breadcrumb.d.ts +14 -0
  5. package/dist/components/ui/Breadcrumb.js +72 -0
  6. package/dist/components/ui/Calendar.d.ts +17 -0
  7. package/dist/components/ui/Calendar.js +151 -0
  8. package/dist/components/ui/Checkbox.js +137 -130
  9. package/dist/components/ui/DataTable.d.ts +33 -0
  10. package/dist/components/ui/DataTable.js +269 -0
  11. package/dist/components/ui/DatePicker.d.ts +35 -0
  12. package/dist/components/ui/DatePicker.js +198 -0
  13. package/dist/components/ui/Dropdown.d.ts +4 -20
  14. package/dist/components/ui/Dropdown.js +195 -231
  15. package/dist/components/ui/Form.d.ts +24 -5
  16. package/dist/components/ui/Form.js +179 -128
  17. package/dist/components/ui/Input.d.ts +6 -0
  18. package/dist/components/ui/Input.js +237 -189
  19. package/dist/components/ui/Pagination.js +211 -162
  20. package/dist/components/ui/Popover.d.ts +6 -1
  21. package/dist/components/ui/Popover.js +75 -56
  22. package/dist/components/ui/Select.d.ts +46 -0
  23. package/dist/components/ui/Select.js +414 -0
  24. package/dist/components/ui/Slider.d.ts +7 -0
  25. package/dist/components/ui/Slider.js +28 -0
  26. package/dist/components/ui/Switch.js +41 -32
  27. package/dist/components/ui/Table.d.ts +9 -0
  28. package/dist/components/ui/Table.js +97 -0
  29. package/dist/components/ui/calendarModel.d.ts +6 -0
  30. package/dist/components/ui/calendarModel.js +37 -0
  31. package/dist/components/ui/controllable.d.ts +7 -0
  32. package/dist/components/ui/controllable.js +10 -0
  33. package/dist/components/ui/dataTableModel.d.ts +18 -0
  34. package/dist/components/ui/dataTableModel.js +18 -0
  35. package/dist/components/ui/formFieldContext.d.ts +26 -0
  36. package/dist/components/ui/formFieldContext.js +40 -0
  37. package/dist/components/ui/index.d.ts +13 -1
  38. package/dist/components/ui/picker/PickerBase.js +106 -112
  39. package/dist/context/LocaleContext.d.ts +55 -0
  40. package/dist/context/LocaleContext.js +80 -0
  41. package/dist/context/index.d.ts +1 -0
  42. package/dist/floe.css +1 -0
  43. package/dist/full.d.ts +2 -0
  44. package/dist/full.js +776 -737
  45. package/dist/index.js +111 -107
  46. package/dist/standalone.css +1 -0
  47. package/dist/styles/themes/presets.d.ts +7 -3
  48. package/dist/styles/themes/presets.js +91 -39
  49. package/dist/styles.css +1 -1
  50. package/dist/themes/porcelain-light.css +19 -0
  51. package/dist/themes/shell-presets.generated.css +62 -49
  52. package/dist/ui.js +223 -184
  53. package/dist/workbench-themes.css +3 -0
  54. package/package.json +1 -1
@@ -1,8 +1,9 @@
1
- import { createComponent as t, spread as M, mergeProps as I, insert as s, effect as g, className as w, memo as J, setAttribute as m, template as u, delegateEvents as D } from "solid-js/web";
2
- import { splitProps as j, createMemo as q, Switch as H, Match as N, Show as $, For as E } from "solid-js";
3
- import { cn as f } from "../../utils/cn.js";
4
- var K = /* @__PURE__ */ u('<svg viewBox="0 0 16 16"fill=currentColor><path fill-rule=evenodd d="M9.78 4.22a.75.75 0 010 1.06L7.06 8l2.72 2.72a.75.75 0 11-1.06 1.06L5.47 8.53a.75.75 0 010-1.06l3.25-3.25a.75.75 0 011.06 0z"clip-rule=evenodd>'), O = /* @__PURE__ */ u('<svg viewBox="0 0 16 16"fill=currentColor><path fill-rule=evenodd d="M6.22 4.22a.75.75 0 011.06 0l3.25 3.25a.75.75 0 010 1.06l-3.25 3.25a.75.75 0 01-1.06-1.06L8.94 8 6.22 5.28a.75.75 0 010-1.06z"clip-rule=evenodd>'), Q = /* @__PURE__ */ u('<svg viewBox="0 0 16 16"fill=currentColor><path fill-rule=evenodd d="M8.78 4.22a.75.75 0 010 1.06L6.06 8l2.72 2.72a.75.75 0 11-1.06 1.06L4.47 8.53a.75.75 0 010-1.06l3.25-3.25a.75.75 0 011.06 0z"clip-rule=evenodd></path><path fill-rule=evenodd d="M12.78 4.22a.75.75 0 010 1.06L10.06 8l2.72 2.72a.75.75 0 11-1.06 1.06L8.47 8.53a.75.75 0 010-1.06l3.25-3.25a.75.75 0 011.06 0z"clip-rule=evenodd>'), U = /* @__PURE__ */ u('<svg viewBox="0 0 16 16"fill=currentColor><path fill-rule=evenodd d="M3.22 4.22a.75.75 0 011.06 0l3.25 3.25a.75.75 0 010 1.06l-3.25 3.25a.75.75 0 01-1.06-1.06L5.94 8 3.22 5.28a.75.75 0 010-1.06z"clip-rule=evenodd></path><path fill-rule=evenodd d="M7.22 4.22a.75.75 0 011.06 0l3.25 3.25a.75.75 0 010 1.06l-3.25 3.25a.75.75 0 01-1.06-1.06L9.94 8 7.22 5.28a.75.75 0 010-1.06z"clip-rule=evenodd>'), V = /* @__PURE__ */ u('<svg viewBox="0 0 16 16"fill=currentColor><circle cx=4 cy=8 r=1.5></circle><circle cx=8 cy=8 r=1.5></circle><circle cx=12 cy=8 r=1.5>'), W = /* @__PURE__ */ u("<button type=button data-floe-surface-part=action>"), X = /* @__PURE__ */ u("<nav aria-label=Pagination><span>Page <!> of "), Y = /* @__PURE__ */ u("<nav aria-label=Pagination><span> / "), Z = /* @__PURE__ */ u("<span> items"), ee = /* @__PURE__ */ u('<div class="flex items-center gap-2"><span>Show</span><select data-floe-surface=inset>'), te = /* @__PURE__ */ u('<div class="flex items-center gap-2"><span>Go to</span><input data-floe-surface=inset type=number min=1>'), re = /* @__PURE__ */ u('<nav aria-label=Pagination><div class="flex items-center gap-1">'), le = /* @__PURE__ */ u("<option>"), ne = /* @__PURE__ */ u("<span>");
5
- const ae = {
1
+ import { createComponent as l, spread as M, mergeProps as I, insert as s, effect as g, className as k, setAttribute as v, memo as O, template as h, delegateEvents as q } from "solid-js/web";
2
+ import { splitProps as H, createMemo as K, Switch as Q, Match as A, Show as z, For as j } from "solid-js";
3
+ import { cn as m } from "../../utils/cn.js";
4
+ import { useFloeLocale as U } from "../../context/LocaleContext.js";
5
+ var V = /* @__PURE__ */ h('<svg viewBox="0 0 16 16"fill=currentColor><path fill-rule=evenodd d="M9.78 4.22a.75.75 0 010 1.06L7.06 8l2.72 2.72a.75.75 0 11-1.06 1.06L5.47 8.53a.75.75 0 010-1.06l3.25-3.25a.75.75 0 011.06 0z"clip-rule=evenodd>'), W = /* @__PURE__ */ h('<svg viewBox="0 0 16 16"fill=currentColor><path fill-rule=evenodd d="M6.22 4.22a.75.75 0 011.06 0l3.25 3.25a.75.75 0 010 1.06l-3.25 3.25a.75.75 0 01-1.06-1.06L8.94 8 6.22 5.28a.75.75 0 010-1.06z"clip-rule=evenodd>'), X = /* @__PURE__ */ h('<svg viewBox="0 0 16 16"fill=currentColor><path fill-rule=evenodd d="M8.78 4.22a.75.75 0 010 1.06L6.06 8l2.72 2.72a.75.75 0 11-1.06 1.06L4.47 8.53a.75.75 0 010-1.06l3.25-3.25a.75.75 0 011.06 0z"clip-rule=evenodd></path><path fill-rule=evenodd d="M12.78 4.22a.75.75 0 010 1.06L10.06 8l2.72 2.72a.75.75 0 11-1.06 1.06L8.47 8.53a.75.75 0 010-1.06l3.25-3.25a.75.75 0 011.06 0z"clip-rule=evenodd>'), Y = /* @__PURE__ */ h('<svg viewBox="0 0 16 16"fill=currentColor><path fill-rule=evenodd d="M3.22 4.22a.75.75 0 011.06 0l3.25 3.25a.75.75 0 010 1.06l-3.25 3.25a.75.75 0 01-1.06-1.06L5.94 8 3.22 5.28a.75.75 0 010-1.06z"clip-rule=evenodd></path><path fill-rule=evenodd d="M7.22 4.22a.75.75 0 011.06 0l3.25 3.25a.75.75 0 010 1.06l-3.25 3.25a.75.75 0 01-1.06-1.06L9.94 8 7.22 5.28a.75.75 0 010-1.06z"clip-rule=evenodd>'), Z = /* @__PURE__ */ h('<svg viewBox="0 0 16 16"fill=currentColor><circle cx=4 cy=8 r=1.5></circle><circle cx=8 cy=8 r=1.5></circle><circle cx=12 cy=8 r=1.5>'), ee = /* @__PURE__ */ h("<button type=button data-floe-surface-part=action>"), te = /* @__PURE__ */ h("<nav><span>"), re = /* @__PURE__ */ h("<nav><span> / "), J = /* @__PURE__ */ h("<span>"), le = /* @__PURE__ */ h('<div class="flex items-center gap-2"><span></span><select data-floe-surface=inset>'), ne = /* @__PURE__ */ h('<div class="flex items-center gap-2"><span></span><input data-floe-surface=inset type=number min=1>'), ae = /* @__PURE__ */ h('<nav><div class="flex items-center gap-1">'), ie = /* @__PURE__ */ h("<option>");
6
+ const oe = {
6
7
  sm: {
7
8
  button: "h-7 min-w-7 px-2 text-xs",
8
9
  text: "text-xs",
@@ -19,313 +20,361 @@ const ae = {
19
20
  input: "h-9 w-18 text-sm"
20
21
  }
21
22
  };
22
- function A(d) {
23
+ function R(u) {
23
24
  return (() => {
24
- var e = K();
25
- return g(() => m(e, "class", d.class)), e;
25
+ var t = V();
26
+ return g(() => v(t, "class", u.class)), t;
26
27
  })();
27
28
  }
28
- function R(d) {
29
+ function F(u) {
29
30
  return (() => {
30
- var e = O();
31
- return g(() => m(e, "class", d.class)), e;
31
+ var t = W();
32
+ return g(() => v(t, "class", u.class)), t;
32
33
  })();
33
34
  }
34
- function T(d) {
35
+ function D(u) {
35
36
  return (() => {
36
- var e = Q();
37
- return g(() => m(e, "class", d.class)), e;
37
+ var t = X();
38
+ return g(() => v(t, "class", u.class)), t;
38
39
  })();
39
40
  }
40
- function G(d) {
41
+ function G(u) {
41
42
  return (() => {
42
- var e = U();
43
- return g(() => m(e, "class", d.class)), e;
43
+ var t = Y();
44
+ return g(() => v(t, "class", u.class)), t;
44
45
  })();
45
46
  }
46
- function ie(d) {
47
+ function se(u) {
47
48
  return (() => {
48
- var e = V();
49
- return g(() => m(e, "class", d.class)), e;
49
+ var t = Z();
50
+ return g(() => v(t, "class", u.class)), t;
50
51
  })();
51
52
  }
52
- function se(d, e, x) {
53
- const P = x * 2 + 5;
54
- if (e <= P)
53
+ function ce(u, t, e) {
54
+ const S = e * 2 + 5;
55
+ if (t <= S)
55
56
  return Array.from({
56
- length: e
57
- }, (b, o) => o + 1);
58
- const _ = Math.max(d - x, 1), y = Math.min(d + x, e), v = _ > 2, z = y < e - 1;
59
- return !v && z ? [...Array.from({
60
- length: 3 + 2 * x
61
- }, (o, S) => S + 1), "ellipsis", e] : v && !z ? [1, "ellipsis", ...Array.from({
62
- length: 3 + 2 * x
63
- }, (o, S) => e - (3 + 2 * x) + S + 1)] : [1, "ellipsis", ...Array.from({
64
- length: y - _ + 1
65
- }, (b, o) => _ + o), "ellipsis", e];
57
+ length: t
58
+ }, (w, x) => x + 1);
59
+ const y = Math.max(u - e, 1), L = Math.min(u + e, t), P = y > 2, f = L < t - 1;
60
+ return !P && f ? [...Array.from({
61
+ length: 3 + 2 * e
62
+ }, (x, d) => d + 1), "ellipsis", t] : P && !f ? [1, "ellipsis", ...Array.from({
63
+ length: 3 + 2 * e
64
+ }, (x, d) => t - (3 + 2 * e) + d + 1)] : [1, "ellipsis", ...Array.from({
65
+ length: L - y + 1
66
+ }, (w, x) => y + x), "ellipsis", t];
66
67
  }
67
- function ue(d) {
68
- const [e, x] = j(d, ["page", "totalPages", "onChange", "size", "variant", "siblingCount", "showFirstLast", "showPageSize", "pageSize", "pageSizes", "onPageSizeChange", "showJumpTo", "totalItems", "disabled", "class"]), P = () => e.size ?? "md", _ = () => e.variant ?? "default", y = () => e.siblingCount ?? 1, v = () => ae[P()], z = q(() => se(e.page, e.totalPages, y())), L = () => e.page > 1, b = () => e.page < e.totalPages, o = (r) => {
68
+ function he(u) {
69
+ const t = U(), [e, S] = H(u, ["page", "totalPages", "onChange", "size", "variant", "siblingCount", "showFirstLast", "showPageSize", "pageSize", "pageSizes", "onPageSizeChange", "showJumpTo", "totalItems", "disabled", "class"]), y = () => e.size ?? "md", L = () => e.variant ?? "default", P = () => e.siblingCount ?? 1, f = () => oe[y()], N = K(() => ce(e.page, e.totalPages, P())), w = () => e.page > 1, x = () => e.page < e.totalPages, d = (r) => {
69
70
  if (e.disabled) return;
70
- const a = Math.max(1, Math.min(r, e.totalPages));
71
- a !== e.page && e.onChange?.(a);
72
- }, S = (r) => {
73
- const a = r.target, l = parseInt(a.value, 10);
74
- isNaN(l) || o(l), a.value = "";
75
- }, p = (r) => {
76
- const a = () => r.onClick?.();
71
+ const i = Math.max(1, Math.min(r, e.totalPages));
72
+ i !== e.page && e.onChange?.(i);
73
+ }, B = (r) => {
74
+ const i = r.target, a = parseInt(i.value, 10);
75
+ isNaN(a) || d(a), i.value = "";
76
+ }, b = (r) => {
77
+ const i = () => r.onClick?.();
77
78
  return (() => {
78
- var l = W();
79
- return l.$$click = a, s(l, () => r.children), g((i) => {
80
- var c = r.isActive ? "inset" : "raised", n = r.isActive ? "page" : void 0, h = r.disabled || e.disabled, C = r.title, k = f("inline-flex items-center justify-center rounded-sm font-medium", "transition-[background-color,border-color,color] duration-[var(--floe-duration-fast)] ease-[var(--floe-ease-out)] cursor-pointer", v().button, r.isActive ? "bg-[var(--floe-plane)] text-[var(--floe-ink)] border border-[var(--floe-accent-line)] shadow-[var(--floe-elevation-raised)]" : "bg-transparent text-[var(--floe-ink-soft)] border border-[var(--floe-line)] hover:border-[var(--floe-line-strong)] hover:bg-[var(--floe-state-hover)] hover:text-[var(--floe-ink)]", (r.disabled || e.disabled) && "opacity-50 cursor-not-allowed");
81
- return c !== i.e && m(l, "data-floe-surface", i.e = c), n !== i.t && m(l, "aria-current", i.t = n), h !== i.a && (l.disabled = i.a = h), C !== i.o && m(l, "title", i.o = C), k !== i.i && w(l, i.i = k), i;
79
+ var a = ee();
80
+ return a.$$click = i, s(a, () => r.children), g((o) => {
81
+ var c = r.isActive ? "inset" : "raised", n = r.isActive ? "page" : void 0, p = r.disabled || e.disabled, C = r.title ?? (r.page ? t.t("page", {
82
+ page: r.page
83
+ }) : void 0), _ = r.title, $ = m("inline-flex items-center justify-center rounded-sm font-medium", "transition-[background-color,border-color,color] duration-[var(--floe-duration-fast)] ease-[var(--floe-ease-out)] cursor-pointer", f().button, r.isActive ? "bg-[var(--floe-plane)] text-[var(--floe-ink)] border border-[var(--floe-accent-line)] shadow-[var(--floe-elevation-raised)]" : "bg-transparent text-[var(--floe-ink-soft)] border border-[var(--floe-line)] hover:border-[var(--floe-line-strong)] hover:bg-[var(--floe-state-hover)] hover:text-[var(--floe-ink)]", (r.disabled || e.disabled) && "opacity-50 cursor-not-allowed");
84
+ return c !== o.e && v(a, "data-floe-surface", o.e = c), n !== o.t && v(a, "aria-current", o.t = n), p !== o.a && (a.disabled = o.a = p), C !== o.o && v(a, "aria-label", o.o = C), _ !== o.i && v(a, "title", o.i = _), $ !== o.n && k(a, o.n = $), o;
82
85
  }, {
83
86
  e: void 0,
84
87
  t: void 0,
85
88
  a: void 0,
86
89
  o: void 0,
87
- i: void 0
88
- }), l;
90
+ i: void 0,
91
+ n: void 0
92
+ }), a;
89
93
  })();
90
94
  };
91
- return t(H, {
95
+ return l(Q, {
92
96
  get children() {
93
- return [t(N, {
97
+ return [l(A, {
94
98
  get when() {
95
- return _() === "simple";
99
+ return L() === "simple";
96
100
  },
97
101
  get children() {
98
- var r = X(), a = r.firstChild, l = a.firstChild, i = l.nextSibling;
99
- return i.nextSibling, M(r, I({
102
+ var r = te(), i = r.firstChild;
103
+ return M(r, I({
104
+ get dir() {
105
+ return t.direction;
106
+ },
107
+ get "aria-label"() {
108
+ return t.t("pagination");
109
+ },
100
110
  get class() {
101
- return f("flex items-center gap-2", e.class);
111
+ return m("flex items-center gap-2", e.class);
102
112
  }
103
- }, x), !1, !0), s(r, t(p, {
113
+ }, S), !1, !0), s(r, l(b, {
104
114
  get disabled() {
105
- return !L();
115
+ return !w();
116
+ },
117
+ onClick: () => d(e.page - 1),
118
+ get title() {
119
+ return t.t("previousPage");
106
120
  },
107
- onClick: () => o(e.page - 1),
108
- title: "Previous page",
109
121
  get children() {
110
- return t(A, {
111
- class: "w-4 h-4"
122
+ return l(R, {
123
+ class: "w-4 h-4 rtl:rotate-180"
112
124
  });
113
125
  }
114
- }), a), s(a, () => e.page, i), s(a, () => e.totalPages, null), s(r, t(p, {
126
+ }), i), s(i, () => t.t("pageOf", {
127
+ page: e.page,
128
+ total: e.totalPages
129
+ })), s(r, l(b, {
115
130
  get disabled() {
116
- return !b();
131
+ return !x();
132
+ },
133
+ onClick: () => d(e.page + 1),
134
+ get title() {
135
+ return t.t("nextPage");
117
136
  },
118
- onClick: () => o(e.page + 1),
119
- title: "Next page",
120
137
  get children() {
121
- return t(R, {
122
- class: "w-4 h-4"
138
+ return l(F, {
139
+ class: "w-4 h-4 rtl:rotate-180"
123
140
  });
124
141
  }
125
- }), null), g(() => w(a, f("text-[var(--floe-ink-soft)] px-2", v().text))), r;
142
+ }), null), g(() => k(i, m("text-[var(--floe-ink-soft)] px-2", f().text))), r;
126
143
  }
127
- }), t(N, {
144
+ }), l(A, {
128
145
  get when() {
129
- return _() === "minimal";
146
+ return L() === "minimal";
130
147
  },
131
148
  get children() {
132
- var r = Y(), a = r.firstChild, l = a.firstChild;
149
+ var r = re(), i = r.firstChild, a = i.firstChild;
133
150
  return M(r, I({
151
+ get dir() {
152
+ return t.direction;
153
+ },
154
+ get "aria-label"() {
155
+ return t.t("pagination");
156
+ },
134
157
  get class() {
135
- return f("flex items-center gap-1", e.class);
158
+ return m("flex items-center gap-1", e.class);
136
159
  }
137
- }, x), !1, !0), s(r, t($, {
160
+ }, S), !1, !0), s(r, l(z, {
138
161
  get when() {
139
162
  return e.showFirstLast;
140
163
  },
141
164
  get children() {
142
- return t(p, {
165
+ return l(b, {
143
166
  get disabled() {
144
- return !L();
167
+ return !w();
168
+ },
169
+ onClick: () => d(1),
170
+ get title() {
171
+ return t.t("firstPage");
145
172
  },
146
- onClick: () => o(1),
147
- title: "First page",
148
173
  get children() {
149
- return t(T, {
150
- class: "w-4 h-4"
174
+ return l(D, {
175
+ class: "w-4 h-4 rtl:rotate-180"
151
176
  });
152
177
  }
153
178
  });
154
179
  }
155
- }), a), s(r, t(p, {
180
+ }), i), s(r, l(b, {
156
181
  get disabled() {
157
- return !L();
182
+ return !w();
183
+ },
184
+ onClick: () => d(e.page - 1),
185
+ get title() {
186
+ return t.t("previousPage");
158
187
  },
159
- onClick: () => o(e.page - 1),
160
- title: "Previous page",
161
188
  get children() {
162
- return t(A, {
163
- class: "w-4 h-4"
189
+ return l(R, {
190
+ class: "w-4 h-4 rtl:rotate-180"
164
191
  });
165
192
  }
166
- }), a), s(a, () => e.page, l), s(a, () => e.totalPages, null), s(r, t(p, {
193
+ }), i), s(i, () => e.page, a), s(i, () => e.totalPages, null), s(r, l(b, {
167
194
  get disabled() {
168
- return !b();
195
+ return !x();
196
+ },
197
+ onClick: () => d(e.page + 1),
198
+ get title() {
199
+ return t.t("nextPage");
169
200
  },
170
- onClick: () => o(e.page + 1),
171
- title: "Next page",
172
201
  get children() {
173
- return t(R, {
174
- class: "w-4 h-4"
202
+ return l(F, {
203
+ class: "w-4 h-4 rtl:rotate-180"
175
204
  });
176
205
  }
177
- }), null), s(r, t($, {
206
+ }), null), s(r, l(z, {
178
207
  get when() {
179
208
  return e.showFirstLast;
180
209
  },
181
210
  get children() {
182
- return t(p, {
211
+ return l(b, {
183
212
  get disabled() {
184
- return !b();
213
+ return !x();
214
+ },
215
+ onClick: () => d(e.totalPages),
216
+ get title() {
217
+ return t.t("lastPage");
185
218
  },
186
- onClick: () => o(e.totalPages),
187
- title: "Last page",
188
219
  get children() {
189
- return t(G, {
190
- class: "w-4 h-4"
220
+ return l(G, {
221
+ class: "w-4 h-4 rtl:rotate-180"
191
222
  });
192
223
  }
193
224
  });
194
225
  }
195
- }), null), g(() => w(a, f("text-[var(--floe-ink-soft)] px-3 tabular-nums", v().text))), r;
226
+ }), null), g(() => k(i, m("text-[var(--floe-ink-soft)] px-3 tabular-nums", f().text))), r;
196
227
  }
197
- }), t(N, {
228
+ }), l(A, {
198
229
  get when() {
199
- return _() === "default";
230
+ return L() === "default";
200
231
  },
201
232
  get children() {
202
- var r = re(), a = r.firstChild;
233
+ var r = ae(), i = r.firstChild;
203
234
  return M(r, I({
235
+ get dir() {
236
+ return t.direction;
237
+ },
238
+ get "aria-label"() {
239
+ return t.t("pagination");
240
+ },
204
241
  get class() {
205
- return f("flex items-center gap-4", e.class);
242
+ return m("flex flex-wrap items-center gap-4", e.class);
206
243
  }
207
- }, x), !1, !0), s(r, t($, {
244
+ }, S), !1, !0), s(r, l(z, {
208
245
  get when() {
209
246
  return e.totalItems !== void 0;
210
247
  },
211
248
  get children() {
212
- var l = Z(), i = l.firstChild;
213
- return s(l, () => e.totalItems, i), g(() => w(l, f("text-[var(--floe-ink-soft)]", v().text))), l;
249
+ var a = J();
250
+ return s(a, () => t.t("itemCount", {
251
+ count: e.totalItems ?? 0
252
+ })), g(() => k(a, m("text-[var(--floe-ink-soft)]", f().text))), a;
214
253
  }
215
- }), a), s(r, t($, {
254
+ }), i), s(r, l(z, {
216
255
  get when() {
217
- return J(() => !!e.showPageSize)() && e.pageSizes;
256
+ return O(() => !!e.showPageSize)() && e.pageSizes;
218
257
  },
219
258
  get children() {
220
- var l = ee(), i = l.firstChild, c = i.nextSibling;
221
- return c.addEventListener("change", (n) => e.onPageSizeChange?.(parseInt(n.target.value, 10))), s(c, t(E, {
259
+ var a = le(), o = a.firstChild, c = o.nextSibling;
260
+ return s(o, () => t.t("pageSize")), c.addEventListener("change", (n) => e.onPageSizeChange?.(parseInt(n.target.value, 10))), s(c, l(j, {
222
261
  get each() {
223
262
  return e.pageSizes;
224
263
  },
225
264
  children: (n) => (() => {
226
- var h = le();
227
- return h.value = n, s(h, n), h;
265
+ var p = ie();
266
+ return p.value = n, s(p, n), p;
228
267
  })()
229
268
  })), g((n) => {
230
- var h = f("text-[var(--floe-ink-soft)]", v().text), C = e.disabled, k = f("rounded-control border border-[var(--floe-line)] bg-background px-2 focus:outline-none", v().input, e.disabled && "opacity-50 cursor-not-allowed");
231
- return h !== n.e && w(i, n.e = h), C !== n.t && (c.disabled = n.t = C), k !== n.a && w(c, n.a = k), n;
269
+ var p = m("text-[var(--floe-ink-soft)]", f().text), C = t.t("pageSize"), _ = e.disabled, $ = m("rounded-control border border-[var(--floe-line)] bg-background px-2 focus:outline-none", f().input, e.disabled && "opacity-50 cursor-not-allowed");
270
+ return p !== n.e && k(o, n.e = p), C !== n.t && v(c, "aria-label", n.t = C), _ !== n.a && (c.disabled = n.a = _), $ !== n.o && k(c, n.o = $), n;
232
271
  }, {
233
272
  e: void 0,
234
273
  t: void 0,
235
- a: void 0
236
- }), g(() => c.value = e.pageSize), l;
274
+ a: void 0,
275
+ o: void 0
276
+ }), g(() => c.value = e.pageSize), a;
237
277
  }
238
- }), a), s(a, t($, {
278
+ }), i), s(i, l(z, {
239
279
  get when() {
240
280
  return e.showFirstLast;
241
281
  },
242
282
  get children() {
243
- return t(p, {
283
+ return l(b, {
244
284
  get disabled() {
245
- return !L();
285
+ return !w();
286
+ },
287
+ onClick: () => d(1),
288
+ get title() {
289
+ return t.t("firstPage");
246
290
  },
247
- onClick: () => o(1),
248
- title: "First page",
249
291
  get children() {
250
- return t(T, {
251
- class: "w-4 h-4"
292
+ return l(D, {
293
+ class: "w-4 h-4 rtl:rotate-180"
252
294
  });
253
295
  }
254
296
  });
255
297
  }
256
- }), null), s(a, t(p, {
298
+ }), null), s(i, l(b, {
257
299
  get disabled() {
258
- return !L();
300
+ return !w();
301
+ },
302
+ onClick: () => d(e.page - 1),
303
+ get title() {
304
+ return t.t("previousPage");
259
305
  },
260
- onClick: () => o(e.page - 1),
261
- title: "Previous page",
262
306
  get children() {
263
- return t(A, {
264
- class: "w-4 h-4"
307
+ return l(R, {
308
+ class: "w-4 h-4 rtl:rotate-180"
265
309
  });
266
310
  }
267
- }), null), s(a, t(E, {
311
+ }), null), s(i, l(j, {
268
312
  get each() {
269
- return z();
313
+ return N();
270
314
  },
271
- children: (l) => l === "ellipsis" ? (() => {
272
- var i = ne();
273
- return s(i, t(ie, {
274
- class: "w-4 h-4"
275
- })), g(() => w(i, f("px-2 text-[var(--floe-ink-soft)]", v().text))), i;
276
- })() : t(p, {
277
- page: l,
315
+ children: (a) => a === "ellipsis" ? (() => {
316
+ var o = J();
317
+ return s(o, l(se, {
318
+ class: "w-4 h-4 rtl:rotate-180"
319
+ })), g(() => k(o, m("px-2 text-[var(--floe-ink-soft)]", f().text))), o;
320
+ })() : l(b, {
321
+ page: a,
278
322
  get isActive() {
279
- return l === e.page;
323
+ return a === e.page;
280
324
  },
281
- onClick: () => o(l),
282
- children: l
325
+ onClick: () => d(a),
326
+ children: a
283
327
  })
284
- }), null), s(a, t(p, {
328
+ }), null), s(i, l(b, {
285
329
  get disabled() {
286
- return !b();
330
+ return !x();
331
+ },
332
+ onClick: () => d(e.page + 1),
333
+ get title() {
334
+ return t.t("nextPage");
287
335
  },
288
- onClick: () => o(e.page + 1),
289
- title: "Next page",
290
336
  get children() {
291
- return t(R, {
292
- class: "w-4 h-4"
337
+ return l(F, {
338
+ class: "w-4 h-4 rtl:rotate-180"
293
339
  });
294
340
  }
295
- }), null), s(a, t($, {
341
+ }), null), s(i, l(z, {
296
342
  get when() {
297
343
  return e.showFirstLast;
298
344
  },
299
345
  get children() {
300
- return t(p, {
346
+ return l(b, {
301
347
  get disabled() {
302
- return !b();
348
+ return !x();
349
+ },
350
+ onClick: () => d(e.totalPages),
351
+ get title() {
352
+ return t.t("lastPage");
303
353
  },
304
- onClick: () => o(e.totalPages),
305
- title: "Last page",
306
354
  get children() {
307
- return t(G, {
308
- class: "w-4 h-4"
355
+ return l(G, {
356
+ class: "w-4 h-4 rtl:rotate-180"
309
357
  });
310
358
  }
311
359
  });
312
360
  }
313
- }), null), s(r, t($, {
361
+ }), null), s(r, l(z, {
314
362
  get when() {
315
363
  return e.showJumpTo;
316
364
  },
317
365
  get children() {
318
- var l = te(), i = l.firstChild, c = i.nextSibling;
319
- return c.addEventListener("blur", S), c.$$keydown = (n) => n.key === "Enter" && S(n), g((n) => {
320
- var h = f("text-[var(--floe-ink-soft)]", v().text), C = e.totalPages, k = String(e.page), F = e.disabled, B = f("rounded-control border border-[var(--floe-line)] bg-background px-2 text-center", "focus:outline-none", "[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none", v().input, e.disabled && "opacity-50 cursor-not-allowed");
321
- return h !== n.e && w(i, n.e = h), C !== n.t && m(c, "max", n.t = C), k !== n.a && m(c, "placeholder", n.a = k), F !== n.o && (c.disabled = n.o = F), B !== n.i && w(c, n.i = B), n;
366
+ var a = ne(), o = a.firstChild, c = o.nextSibling;
367
+ return s(o, () => t.t("jumpTo")), c.addEventListener("blur", B), c.$$keydown = (n) => n.key === "Enter" && B(n), g((n) => {
368
+ var p = m("text-[var(--floe-ink-soft)]", f().text), C = t.t("jumpTo"), _ = e.totalPages, $ = String(e.page), E = e.disabled, T = m("rounded-control border border-[var(--floe-line)] bg-background px-2 text-center", "focus:outline-none", "[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none", f().input, e.disabled && "opacity-50 cursor-not-allowed");
369
+ return p !== n.e && k(o, n.e = p), C !== n.t && v(c, "aria-label", n.t = C), _ !== n.a && v(c, "max", n.a = _), $ !== n.o && v(c, "placeholder", n.o = $), E !== n.i && (c.disabled = n.i = E), T !== n.n && k(c, n.n = T), n;
322
370
  }, {
323
371
  e: void 0,
324
372
  t: void 0,
325
373
  a: void 0,
326
374
  o: void 0,
327
- i: void 0
328
- }), l;
375
+ i: void 0,
376
+ n: void 0
377
+ }), a;
329
378
  }
330
379
  }), null), r;
331
380
  }
@@ -333,7 +382,7 @@ function ue(d) {
333
382
  }
334
383
  });
335
384
  }
336
- D(["click", "keydown"]);
385
+ q(["click", "keydown"]);
337
386
  export {
338
- ue as Pagination
387
+ he as Pagination
339
388
  };
@@ -1,8 +1,13 @@
1
1
  import { type JSX } from 'solid-js';
2
2
  export type PopoverPlacement = 'bottom-start' | 'bottom-center' | 'bottom-end' | 'top-start' | 'top-center' | 'top-end';
3
+ export interface PopoverTriggerProps {
4
+ 'aria-haspopup': 'dialog';
5
+ 'aria-expanded': boolean;
6
+ 'aria-controls': string | undefined;
7
+ }
3
8
  export interface PopoverProps {
4
9
  /** The element that opens the panel. It keeps its own layout and semantics. */
5
- trigger: JSX.Element;
10
+ trigger: JSX.Element | ((props: PopoverTriggerProps) => JSX.Element);
6
11
  children: JSX.Element | ((close: () => void) => JSX.Element);
7
12
  /** Controlled visibility. Omit for uncontrolled use with `defaultOpen`. */
8
13
  open?: boolean;