@stokelp/ui 2.21.0 → 2.23.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.
- package/dist/components/table/Table.d.ts +1 -1
- package/dist/components/table/TableProvider.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/ui.cjs +5 -5
- package/dist/ui.cjs.map +1 -1
- package/dist/ui.js +14 -10
- package/dist/ui.js.map +1 -1
- package/package.json +1 -1
package/dist/ui.js
CHANGED
|
@@ -558,20 +558,20 @@ const C9 = f("input", ga, {
|
|
|
558
558
|
if (!c)
|
|
559
559
|
throw new Error("useTable must be used within a <TableProvider/>");
|
|
560
560
|
return c;
|
|
561
|
-
}, mu = ({ children: c, onSortChange: s }) => {
|
|
562
|
-
const [
|
|
563
|
-
sortDescriptor: null
|
|
561
|
+
}, mu = ({ children: c, onSortChange: s, descriptor: n }) => {
|
|
562
|
+
const [m, b] = qa(vu, {
|
|
563
|
+
sortDescriptor: n ?? null
|
|
564
564
|
});
|
|
565
565
|
z0(() => {
|
|
566
|
-
s == null || s(
|
|
567
|
-
}, [JSON.stringify(
|
|
568
|
-
const
|
|
569
|
-
...
|
|
570
|
-
dispatch:
|
|
566
|
+
s == null || s(m.sortDescriptor);
|
|
567
|
+
}, [JSON.stringify(m.sortDescriptor)]);
|
|
568
|
+
const H = {
|
|
569
|
+
...m,
|
|
570
|
+
dispatch: b
|
|
571
571
|
};
|
|
572
|
-
return /* @__PURE__ */ r(Y0.Provider, { value:
|
|
572
|
+
return /* @__PURE__ */ r(Y0.Provider, { value: H, children: c });
|
|
573
573
|
}, { withProvider: bu, withContext: s2 } = e1(Pa), sf = f("div", Sa), Ru = bu(f("table"), "root"), yu = j(
|
|
574
|
-
({ children: c, onSortChange: s,
|
|
574
|
+
({ children: c, onSortChange: s, descriptor: n, ...m }, b) => /* @__PURE__ */ r(mu, { descriptor: n, onSortChange: s, children: /* @__PURE__ */ r(Ru, { ref: b, ...m, children: c }) })
|
|
575
575
|
);
|
|
576
576
|
yu.displayName = "Table";
|
|
577
577
|
const pf = s2(f("thead"), "thead"), j7 = s2(f("div"), "sortIndicatorRoot"), L3 = s2(f("svg"), "sortIndicator"), ff = s2(f("tbody"), "tbody"), hf = s2(f("tr"), "tr"), xu = s2(f("th"), "th"), wu = j(
|
|
@@ -16373,6 +16373,10 @@ const Ls = /* @__PURE__ */ Vc(cs), ss = Ls(
|
|
|
16373
16373
|
},
|
|
16374
16374
|
secondary: {
|
|
16375
16375
|
colorPalette: "secondary"
|
|
16376
|
+
},
|
|
16377
|
+
success: {
|
|
16378
|
+
bg: "success.500",
|
|
16379
|
+
color: "white"
|
|
16376
16380
|
}
|
|
16377
16381
|
}
|
|
16378
16382
|
},
|