@apliteni/apliteni-ui 0.39.0 → 0.40.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apliteni/apliteni-ui",
3
- "version": "0.39.0",
3
+ "version": "0.40.0",
4
4
  "workspaces": [
5
5
  "react"
6
6
  ],
@@ -99,5 +99,18 @@
99
99
  }
100
100
  .rx-caret {
101
101
  margin-left: 2px;
102
+ width: 16px;
103
+ height: 16px;
104
+ flex-shrink: 0;
105
+ stroke-width: 2.4;
102
106
  color: var(--muted);
107
+ transition: transform var(--dur-fast) var(--ease-out);
108
+ }
109
+ .rx-caret[data-up] {
110
+ transform: rotate(180deg);
111
+ }
112
+ @media (prefers-reduced-motion: reduce) {
113
+ .rx-caret {
114
+ transition: none;
115
+ }
103
116
  }
@@ -899,7 +899,24 @@ function DataTable({
899
899
  onSortChange?.(next);
900
900
  toFirstPage();
901
901
  };
902
- const caret = (k) => sort.key === k ? sort.dir === 1 ? " \u25B2" : " \u25BC" : " \u2195";
902
+ const caret = (k) => /* @__PURE__ */ jsx10(
903
+ "svg",
904
+ {
905
+ className: "rx-caret",
906
+ "data-up": sort.key === k && sort.dir === 1 || void 0,
907
+ viewBox: "0 0 24 24",
908
+ fill: "none",
909
+ stroke: "currentColor",
910
+ strokeLinecap: "round",
911
+ strokeLinejoin: "round",
912
+ "aria-hidden": "true",
913
+ focusable: "false",
914
+ children: sort.key === k ? /* @__PURE__ */ jsx10("path", { d: "m8 10 4 4 4-4" }) : /* @__PURE__ */ jsxs8(Fragment2, { children: [
915
+ /* @__PURE__ */ jsx10("path", { d: "m8 9 4-4 4 4" }),
916
+ /* @__PURE__ */ jsx10("path", { d: "m8 15 4 4 4-4" })
917
+ ] })
918
+ }
919
+ );
903
920
  const pageAllOn = selectable && slice.length > 0 && slice.every((r) => selected.has(r.name));
904
921
  return /* @__PURE__ */ jsxs8(Fragment2, { children: [
905
922
  /* @__PURE__ */ jsx10(
@@ -937,7 +954,7 @@ function DataTable({
937
954
  "aria-sort": sort.key === c.key ? sort.dir === 1 ? "ascending" : "descending" : c.sortable && sortIsKnown ? "none" : void 0,
938
955
  children: c.sortable ? /* @__PURE__ */ jsxs8("button", { type: "button", className: "rx-sort", onClick: () => onSort(c.key), children: [
939
956
  c.label,
940
- /* @__PURE__ */ jsx10("span", { className: "rx-caret", "aria-hidden": "true", children: caret(c.key) })
957
+ caret(c.key)
941
958
  ] }) : c.label
942
959
  },
943
960
  c.key