@apliteni/apliteni-ui 0.39.1 → 0.40.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.
@@ -1,5 +1,17 @@
1
1
  # Component choice
2
2
 
3
+ ## Make the committing action stand out
4
+
5
+ <!-- rule: paired-actions -->
6
+
7
+ **Rule:** In a pair of actions, give the committing action more visual weight than the dismissing action.
8
+
9
+ **Why:** Equal weight makes it harder to see which button commits the change.
10
+
11
+ **Do:** Use a primary Save button beside a ghost Cancel button.
12
+
13
+ **Don't:** Give Save and Cancel the same primary style.
14
+
3
15
  ## Interrupt with a question
4
16
 
5
17
  <!-- rule: interrupt -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apliteni/apliteni-ui",
3
- "version": "0.39.1",
3
+ "version": "0.40.1",
4
4
  "workspaces": [
5
5
  "react"
6
6
  ],
@@ -104,4 +104,13 @@
104
104
  flex-shrink: 0;
105
105
  stroke-width: 2.4;
106
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
+ }
107
116
  }
@@ -899,10 +899,11 @@ function DataTable({
899
899
  onSortChange?.(next);
900
900
  toFirstPage();
901
901
  };
902
- const caret = (k) => /* @__PURE__ */ jsxs8(
902
+ const caret = (k) => /* @__PURE__ */ jsx10(
903
903
  "svg",
904
904
  {
905
905
  className: "rx-caret",
906
+ "data-up": sort.key === k && sort.dir === 1 || void 0,
906
907
  viewBox: "0 0 24 24",
907
908
  fill: "none",
908
909
  stroke: "currentColor",
@@ -910,10 +911,10 @@ function DataTable({
910
911
  strokeLinejoin: "round",
911
912
  "aria-hidden": "true",
912
913
  focusable: "false",
913
- children: [
914
- (sort.key !== k || sort.dir === 1) && /* @__PURE__ */ jsx10("path", { d: sort.key === k ? "m8 14 4-4 4 4" : "m8 9 4-4 4 4" }),
915
- (sort.key !== k || sort.dir === -1) && /* @__PURE__ */ jsx10("path", { d: sort.key === k ? "m8 10 4 4 4-4" : "m8 15 4 4 4-4" })
916
- ]
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
+ ] })
917
918
  }
918
919
  );
919
920
  const pageAllOn = selectable && slice.length > 0 && slice.every((r) => selected.has(r.name));