@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
package/react/dist/index.css
CHANGED
|
@@ -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
|
}
|
package/react/dist/index.js
CHANGED
|
@@ -899,10 +899,11 @@ function DataTable({
|
|
|
899
899
|
onSortChange?.(next);
|
|
900
900
|
toFirstPage();
|
|
901
901
|
};
|
|
902
|
-
const caret = (k) => /* @__PURE__ */
|
|
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
|
-
|
|
915
|
-
|
|
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));
|