@rojaostudio/ds 2.0.0-next.16 → 2.0.0-next.18
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/avatar.d.ts +20 -12
- package/dist/components/avatar.js +8 -6
- package/dist/components/badge.d.ts +7 -6
- package/dist/components/badge.js +2 -1
- package/dist/components/breadcrumb.d.ts +4 -4
- package/dist/components/breadcrumb.js +1 -1
- package/dist/components/bubble.d.ts +26 -11
- package/dist/components/bubble.js +3 -3
- package/dist/components/button.d.ts +1 -1
- package/dist/components/card.d.ts +18 -9
- package/dist/components/card.js +4 -2
- package/dist/components/color-input.d.ts +1 -1
- package/dist/components/context-menu.d.ts +5 -2
- package/dist/components/data-table-header.d.ts +10 -5
- package/dist/components/data-table-header.js +59 -4
- package/dist/components/date-picker.d.ts +1 -1
- package/dist/components/dialog.d.ts +6 -3
- package/dist/components/dialog.js +2 -2
- package/dist/components/dropdown-menu.d.ts +5 -2
- package/dist/components/dropzone.d.ts +2 -2
- package/dist/components/dropzone.js +1 -1
- package/dist/components/file-input.d.ts +13 -8
- package/dist/components/file-input.js +24 -21
- package/dist/components/filter-chip.d.ts +11 -5
- package/dist/components/filter-chip.js +15 -6
- package/dist/components/heading.d.ts +9 -6
- package/dist/components/heading.js +1 -1
- package/dist/components/icon-button.d.ts +1 -1
- package/dist/components/image-upload.d.ts +2 -2
- package/dist/components/image-upload.js +1 -1
- package/dist/components/index.d.ts +6 -6
- package/dist/components/internal/button.d.ts +1 -1
- package/dist/components/internal/menu.d.ts +3 -2
- package/dist/components/internal/menu.js +1 -1
- package/dist/components/internal/toggle.d.ts +1 -1
- package/dist/components/item.d.ts +14 -7
- package/dist/components/item.js +5 -2
- package/dist/components/marker.d.ts +11 -3
- package/dist/components/marker.js +4 -3
- package/dist/components/progress.d.ts +3 -3
- package/dist/components/progress.js +2 -2
- package/dist/components/row-actions.d.ts +3 -0
- package/dist/components/row-actions.js +8 -4
- package/dist/components/sidebar.d.ts +8 -11
- package/dist/components/sidebar.js +4 -5
- package/dist/components/spinner.d.ts +9 -6
- package/dist/components/spinner.js +3 -3
- package/dist/components/star-rating.d.ts +3 -3
- package/dist/components/star-rating.js +2 -2
- package/dist/components/stat.d.ts +18 -6
- package/dist/components/stat.js +9 -3
- package/dist/components/status.d.ts +4 -4
- package/dist/components/status.js +2 -2
- package/dist/components/summary-bar.d.ts +3 -2
- package/dist/components/summary-bar.js +10 -1
- package/dist/components/tile.d.ts +5 -5
- package/dist/components/tile.js +2 -2
- package/dist/components/time-picker.d.ts +1 -1
- package/dist/components/toast.d.ts +1 -1
- package/dist/components/toggle.d.ts +1 -1
- package/dist/components/typing-indicator.d.ts +2 -2
- package/dist/components/typing-indicator.js +1 -1
- package/package.json +1 -1
- package/styles/rds/components-styles.css +84 -48
- package/styles/rds/components.css +0 -9
|
@@ -2,14 +2,19 @@ import * as react from 'react';
|
|
|
2
2
|
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
3
3
|
import { FieldTextProps } from './internal/field.js';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
/** The field's arrangement (Figma: `layout`). */
|
|
6
|
+
type FileInputLayout = 'field' | 'dropzone' | 'tile';
|
|
7
|
+
/** @deprecated Use FileInputLayout (2.0.0-next: `variant` is `layout`). */
|
|
8
|
+
type FileInputVariant = FileInputLayout;
|
|
6
9
|
interface FileInputProps extends Omit<FieldTextProps, 'labelPosition'>, Omit<ComponentPropsWithRef<'input'>, 'type' | 'children' | 'prefix' | 'value' | 'defaultValue' | 'size'> {
|
|
7
10
|
/**
|
|
8
|
-
* The
|
|
9
|
-
* the file on, when the file is what the screen is about (a receipt, a spreadsheet). tile: a 112 square with
|
|
10
|
-
* preview, for a photo or a logo.
|
|
11
|
+
* The arrangement (Figma: `layout`). field (default): the Input's box, for a dense form. dropzone: a dashed area to
|
|
12
|
+
* drop the file on, when the file is what the screen is about (a receipt, a spreadsheet). tile: a 112 square with
|
|
13
|
+
* the image's preview, for a photo or a logo.
|
|
11
14
|
*/
|
|
12
|
-
|
|
15
|
+
layout?: FileInputLayout;
|
|
16
|
+
/** @deprecated Use `layout` (2.0.0-next): the same three values. */
|
|
17
|
+
variant?: FileInputLayout;
|
|
13
18
|
/** Controlled: the name shown (Figma: `fileName`). By default, the chosen file's name. */
|
|
14
19
|
fileName?: string;
|
|
15
20
|
/** Controlled: the size beside the name in the dropzone (Figma: `fileSize`). By default, the chosen file's, as "1,2 MB". */
|
|
@@ -43,7 +48,7 @@ interface FileInputProps extends Omit<FieldTextProps, 'labelPosition'>, Omit<Com
|
|
|
43
48
|
/** "1,2 MB", "830 KB", "512 B": the size the way a person reads it. */
|
|
44
49
|
declare function formatFileSize(bytes: number): string;
|
|
45
50
|
/**
|
|
46
|
-
* FileInput — Figma [RDS] Forms/FileInput. A file field in three
|
|
51
|
+
* FileInput — Figma [RDS] Forms/FileInput. A file field in three layouts (`layout`): field, the Input's box with the
|
|
47
52
|
* clip, "Escolher arquivo" and the name; dropzone, a dashed area that takes a dragged file; tile, a square with the
|
|
48
53
|
* image's preview and the buttons to swap or remove it. In every shape the native <input type="file"> does the work:
|
|
49
54
|
* it lies transparent over the box, so a click, Enter or Space open the system's chooser, the label names it,
|
|
@@ -51,6 +56,6 @@ declare function formatFileSize(bytes: number): string;
|
|
|
51
56
|
* size in the hint and check them in code (a failure is the errorMessage). Styles: file-input.css and
|
|
52
57
|
* internal/field.css.
|
|
53
58
|
*/
|
|
54
|
-
declare function FileInput({ variant, label, hint, error, errorMessage, required, fileName, fileSize, preview, previewAlt, dropTitle, tileText, clearable, onClear, onFiles, clearLabel, replaceLabel, chooseLabel, emptyLabel, id, disabled, className, style, onChange, ref, ...input }: FileInputProps): react.JSX.Element;
|
|
59
|
+
declare function FileInput({ layout: layoutProp, variant, label, hint, error, errorMessage, required, fileName, fileSize, preview, previewAlt, dropTitle, tileText, clearable, onClear, onFiles, clearLabel, replaceLabel, chooseLabel, emptyLabel, id, disabled, className, style, onChange, ref, ...input }: FileInputProps): react.JSX.Element;
|
|
55
60
|
|
|
56
|
-
export { FileInput, type FileInputProps, type FileInputVariant, formatFileSize };
|
|
61
|
+
export { FileInput, type FileInputLayout, type FileInputProps, type FileInputVariant, formatFileSize };
|
|
@@ -25,7 +25,8 @@ function formatFileSize(bytes) {
|
|
|
25
25
|
}
|
|
26
26
|
function FileInput(_a) {
|
|
27
27
|
var _b = _a, {
|
|
28
|
-
|
|
28
|
+
layout: layoutProp,
|
|
29
|
+
variant,
|
|
29
30
|
label,
|
|
30
31
|
hint,
|
|
31
32
|
error,
|
|
@@ -51,6 +52,7 @@ function FileInput(_a) {
|
|
|
51
52
|
onChange,
|
|
52
53
|
ref
|
|
53
54
|
} = _b, input = __objRest(_b, [
|
|
55
|
+
"layout",
|
|
54
56
|
"variant",
|
|
55
57
|
"label",
|
|
56
58
|
"hint",
|
|
@@ -77,23 +79,24 @@ function FileInput(_a) {
|
|
|
77
79
|
"onChange",
|
|
78
80
|
"ref"
|
|
79
81
|
]);
|
|
80
|
-
var _a2, _b2, _c;
|
|
82
|
+
var _a2, _b2, _c, _d;
|
|
83
|
+
const layout = (_a2 = layoutProp != null ? layoutProp : variant) != null ? _a2 : "field";
|
|
81
84
|
warnIfUnlabelled("FileInput", label, input["aria-label"], input["aria-labelledby"]);
|
|
82
|
-
const inside =
|
|
85
|
+
const inside = layout === "dropzone";
|
|
83
86
|
const ids = useFieldIds(id, inside ? void 0 : hint, error, errorMessage);
|
|
84
87
|
const { controlId, errorId, invalid } = ids;
|
|
85
88
|
const own = useRef(null);
|
|
86
89
|
const [chosen, setChosen] = useState(null);
|
|
87
90
|
const [dragging, setDragging] = useState(false);
|
|
88
91
|
useEffect(() => () => revoke(chosen), [chosen]);
|
|
89
|
-
const shownName = (
|
|
92
|
+
const shownName = (_b2 = fileName != null ? fileName : chosen == null ? void 0 : chosen.name) != null ? _b2 : "";
|
|
90
93
|
const shownSize = fileSize != null ? fileSize : fileName === void 0 && chosen ? formatFileSize(chosen.size) : void 0;
|
|
91
|
-
const shownPreview = (
|
|
92
|
-
const filled =
|
|
94
|
+
const shownPreview = (_c = preview != null ? preview : chosen == null ? void 0 : chosen.url) != null ? _c : "";
|
|
95
|
+
const filled = layout === "tile" ? Boolean(shownPreview) : Boolean(shownName);
|
|
93
96
|
const showClear = clearable && filled && !disabled;
|
|
94
97
|
const insideHintId = inside && hasContent(hint) && !filled ? `${controlId}-hint` : void 0;
|
|
95
98
|
const describedBy = [inside ? insideHintId : ids.hintId, errorId, input["aria-describedby"]].filter(Boolean).join(" ") || void 0;
|
|
96
|
-
const removeName = clearLabel != null ? clearLabel :
|
|
99
|
+
const removeName = clearLabel != null ? clearLabel : layout === "tile" ? "Remover imagem" : "Remover arquivo";
|
|
97
100
|
function change(event) {
|
|
98
101
|
const files = event.target.files;
|
|
99
102
|
if (!(files == null ? void 0 : files.length)) {
|
|
@@ -101,7 +104,7 @@ function FileInput(_a) {
|
|
|
101
104
|
} else {
|
|
102
105
|
const size = Array.from(files).reduce((sum, file) => sum + file.size, 0);
|
|
103
106
|
const first = files[0];
|
|
104
|
-
const url =
|
|
107
|
+
const url = layout === "tile" && first.type.startsWith("image/") && typeof URL.createObjectURL === "function" ? URL.createObjectURL(first) : void 0;
|
|
105
108
|
setChosen({ name: files.length === 1 ? first.name : `${files.length} arquivos`, size, url });
|
|
106
109
|
}
|
|
107
110
|
onChange == null ? void 0 : onChange(event);
|
|
@@ -149,14 +152,14 @@ function FileInput(_a) {
|
|
|
149
152
|
},
|
|
150
153
|
onDrop: drop
|
|
151
154
|
};
|
|
152
|
-
const covered = !(
|
|
155
|
+
const covered = !(layout === "tile" && filled);
|
|
153
156
|
const control = /* @__PURE__ */ jsx(
|
|
154
157
|
"input",
|
|
155
158
|
__spreadProps(__spreadValues({}, input), {
|
|
156
159
|
ref: setRef,
|
|
157
160
|
id: controlId,
|
|
158
161
|
type: "file",
|
|
159
|
-
accept: (
|
|
162
|
+
accept: (_d = input.accept) != null ? _d : layout === "tile" ? "image/*" : void 0,
|
|
160
163
|
className: ["rds-field__control", "rds-file-input__control", !covered && "rds-file-input__control--off"].filter(Boolean).join(" "),
|
|
161
164
|
tabIndex: covered ? input.tabIndex : -1,
|
|
162
165
|
required,
|
|
@@ -168,7 +171,7 @@ function FileInput(_a) {
|
|
|
168
171
|
);
|
|
169
172
|
const clearButton = showClear && /* @__PURE__ */ jsx(FieldAction, { label: removeName, icon: /* @__PURE__ */ jsx(CloseIcon, {}), onClick: clear });
|
|
170
173
|
let face;
|
|
171
|
-
if (
|
|
174
|
+
if (layout === "dropzone") {
|
|
172
175
|
face = filled ? /* @__PURE__ */ jsxs("span", { className: "rds-file-input__file", children: [
|
|
173
176
|
/* @__PURE__ */ jsx("span", { className: "rds-file-input__circle", "aria-hidden": "true", children: /* @__PURE__ */ jsx(PaperclipIcon, {}) }),
|
|
174
177
|
/* @__PURE__ */ jsxs("span", { className: "rds-file-input__file-texts", "aria-hidden": "true", children: [
|
|
@@ -183,7 +186,7 @@ function FileInput(_a) {
|
|
|
183
186
|
hasContent(hint) && /* @__PURE__ */ jsx("span", { id: insideHintId, className: "rds-file-input__caption", children: hint })
|
|
184
187
|
] })
|
|
185
188
|
] });
|
|
186
|
-
} else if (
|
|
189
|
+
} else if (layout === "tile") {
|
|
187
190
|
face = filled ? /* @__PURE__ */ jsx("img", { className: "rds-file-input__preview", src: shownPreview, alt: previewAlt != null ? previewAlt : typeof label === "string" ? `Pr\xE9via de ${label}` : "Pr\xE9via" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
188
191
|
/* @__PURE__ */ jsx("span", { className: "rds-file-input__tile-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx(ImagePlusIcon, {}) }),
|
|
189
192
|
/* @__PURE__ */ jsx("span", { className: "rds-file-input__tile-text", "aria-hidden": "true", children: tileText })
|
|
@@ -198,16 +201,16 @@ function FileInput(_a) {
|
|
|
198
201
|
] });
|
|
199
202
|
}
|
|
200
203
|
const boxClassName = [
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
204
|
+
layout === "field" && showClear && "rds-field__box--action",
|
|
205
|
+
layout === "dropzone" && "rds-file-input__area",
|
|
206
|
+
layout === "tile" && "rds-file-input__area rds-file-input__tile",
|
|
207
|
+
layout !== "field" && filled && "rds-file-input__area--filled",
|
|
208
|
+
layout !== "field" && dragging && "rds-file-input__area--dragging"
|
|
206
209
|
].filter(Boolean).join(" ");
|
|
207
210
|
return /* @__PURE__ */ jsxs(
|
|
208
211
|
FieldShell,
|
|
209
212
|
{
|
|
210
|
-
kind: `rds-file-input rds-file-input--${
|
|
213
|
+
kind: `rds-file-input rds-file-input--${layout}`,
|
|
211
214
|
controlId,
|
|
212
215
|
hintId: inside ? void 0 : ids.hintId,
|
|
213
216
|
errorId,
|
|
@@ -218,19 +221,19 @@ function FileInput(_a) {
|
|
|
218
221
|
required,
|
|
219
222
|
disabled,
|
|
220
223
|
boxClassName: boxClassName || void 0,
|
|
221
|
-
boxProps:
|
|
224
|
+
boxProps: layout === "field" ? void 0 : boxProps,
|
|
222
225
|
className,
|
|
223
226
|
style,
|
|
224
227
|
children: [
|
|
225
228
|
face,
|
|
226
229
|
control,
|
|
227
|
-
|
|
230
|
+
layout === "tile" ? filled && !disabled && /* @__PURE__ */ jsxs("span", { className: "rds-file-input__actions", children: [
|
|
228
231
|
/* @__PURE__ */ jsx(FieldAction, { label: replaceLabel, icon: /* @__PURE__ */ jsx(UploadIcon, {}), onClick: () => {
|
|
229
232
|
var _a3;
|
|
230
233
|
return (_a3 = own.current) == null ? void 0 : _a3.click();
|
|
231
234
|
} }),
|
|
232
235
|
clearButton
|
|
233
|
-
] }) :
|
|
236
|
+
] }) : layout === "field" && clearButton
|
|
234
237
|
]
|
|
235
238
|
}
|
|
236
239
|
);
|
|
@@ -8,17 +8,23 @@ interface FilterChipProps extends Omit<ComponentPropsWithRef<'button'>, 'childre
|
|
|
8
8
|
count?: ReactNode;
|
|
9
9
|
/** An icon before the label, in the label's colour (Figma: `showIcon` + `icon`). Decorative. */
|
|
10
10
|
icon?: ReactNode;
|
|
11
|
-
/** Controlled: the filter is on (Figma:
|
|
12
|
-
|
|
11
|
+
/** Controlled: the filter is on (Figma: `pressed`), as the Toggle. */
|
|
12
|
+
pressed?: boolean;
|
|
13
13
|
/** Uncontrolled: on at first. */
|
|
14
|
-
|
|
14
|
+
defaultPressed?: boolean;
|
|
15
15
|
/** Called with the new state when the chip is pressed (a button, not a link). */
|
|
16
|
+
onPressedChange?: (pressed: boolean) => void;
|
|
17
|
+
/** @deprecated Use `pressed` (2.0.0-next). */
|
|
18
|
+
active?: boolean;
|
|
19
|
+
/** @deprecated Use `defaultPressed` (2.0.0-next). */
|
|
20
|
+
defaultActive?: boolean;
|
|
21
|
+
/** @deprecated Use `onPressedChange` (2.0.0-next). */
|
|
16
22
|
onActiveChange?: (active: boolean) => void;
|
|
17
23
|
/** Rendered as aria-disabled="true": stays in the tab order and takes focus, but does not turn on or navigate. */
|
|
18
24
|
disabled?: boolean;
|
|
19
25
|
/**
|
|
20
26
|
* Render the single child element (an `<a>`, a framework `Link`) with the chip's classes, for a filter that
|
|
21
|
-
* lives in the URL and should survive back/forward. The link gets aria-current when
|
|
27
|
+
* lives in the URL and should survive back/forward. The link gets aria-current when pressed.
|
|
22
28
|
*/
|
|
23
29
|
asChild?: boolean;
|
|
24
30
|
}
|
|
@@ -28,7 +34,7 @@ interface FilterChipProps extends Omit<ComponentPropsWithRef<'button'>, 'childre
|
|
|
28
34
|
* brand tint, brand border and label. Up to 5 in a FilterChipGroup; more than that, the Select. A value that can
|
|
29
35
|
* be removed is the Chip. Styles: filter-chip.css.
|
|
30
36
|
*/
|
|
31
|
-
declare function FilterChip({ children, count, icon, active, defaultActive, onActiveChange, disabled, asChild, type, className, onClick, ...rest }: FilterChipProps): react.JSX.Element;
|
|
37
|
+
declare function FilterChip({ children, count, icon, pressed: pressedProp, defaultPressed, onPressedChange, active, defaultActive, onActiveChange, disabled, asChild, type, className, onClick, ...rest }: FilterChipProps): react.JSX.Element;
|
|
32
38
|
interface FilterChipGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
33
39
|
/** Required: what the filters cut, such as "Filtrar por tipo". Several groups on a page must be told apart. */
|
|
34
40
|
'aria-label': string;
|
|
@@ -13,8 +13,11 @@ function FilterChip(_a) {
|
|
|
13
13
|
children,
|
|
14
14
|
count,
|
|
15
15
|
icon,
|
|
16
|
+
pressed: pressedProp,
|
|
17
|
+
defaultPressed,
|
|
18
|
+
onPressedChange,
|
|
16
19
|
active,
|
|
17
|
-
defaultActive
|
|
20
|
+
defaultActive,
|
|
18
21
|
onActiveChange,
|
|
19
22
|
disabled,
|
|
20
23
|
asChild,
|
|
@@ -25,6 +28,9 @@ function FilterChip(_a) {
|
|
|
25
28
|
"children",
|
|
26
29
|
"count",
|
|
27
30
|
"icon",
|
|
31
|
+
"pressed",
|
|
32
|
+
"defaultPressed",
|
|
33
|
+
"onPressedChange",
|
|
28
34
|
"active",
|
|
29
35
|
"defaultActive",
|
|
30
36
|
"onActiveChange",
|
|
@@ -34,20 +40,23 @@ function FilterChip(_a) {
|
|
|
34
40
|
"className",
|
|
35
41
|
"onClick"
|
|
36
42
|
]);
|
|
37
|
-
|
|
38
|
-
const
|
|
43
|
+
var _a2;
|
|
44
|
+
const pressed = pressedProp != null ? pressedProp : active;
|
|
45
|
+
const [own, setOwn] = useState((_a2 = defaultPressed != null ? defaultPressed : defaultActive) != null ? _a2 : false);
|
|
46
|
+
const on = pressed != null ? pressed : own;
|
|
39
47
|
const Root = asChild ? Slot : "button";
|
|
40
48
|
function click(event) {
|
|
49
|
+
var _a3;
|
|
41
50
|
onClick == null ? void 0 : onClick(event);
|
|
42
51
|
if (event.defaultPrevented || asChild) return;
|
|
43
|
-
if (
|
|
44
|
-
onActiveChange == null ? void 0 :
|
|
52
|
+
if (pressed === void 0) setOwn(!on);
|
|
53
|
+
(_a3 = onPressedChange != null ? onPressedChange : onActiveChange) == null ? void 0 : _a3(!on);
|
|
45
54
|
}
|
|
46
55
|
return /* @__PURE__ */ jsxs(
|
|
47
56
|
Root,
|
|
48
57
|
__spreadProps(__spreadValues({}, rest), {
|
|
49
58
|
type: asChild ? void 0 : type,
|
|
50
|
-
className: ["rds-filter-chip", on && "rds-filter-chip--
|
|
59
|
+
className: ["rds-filter-chip", on && "rds-filter-chip--pressed", className].filter(Boolean).join(" "),
|
|
51
60
|
"aria-pressed": asChild ? void 0 : on,
|
|
52
61
|
"aria-current": asChild && on ? "true" : void 0,
|
|
53
62
|
"aria-disabled": disabled || void 0,
|
|
@@ -3,15 +3,18 @@ import { HTMLAttributes, ReactNode } from 'react';
|
|
|
3
3
|
|
|
4
4
|
/** The [RDS] type scale for titles: band 36/48, heading 24/30, value 20/30. */
|
|
5
5
|
type HeadingLevel = 'band' | 'heading' | 'value';
|
|
6
|
-
/**
|
|
7
|
-
type HeadingTone = '
|
|
6
|
+
/** neutral: text/heading (navy on light in Rojão, white on dark and on the brand plate). accent: the logo orange. */
|
|
7
|
+
type HeadingTone = 'neutral' | 'accent';
|
|
8
8
|
/** The element in the page outline. The visual level never decides it: the order of the page does. */
|
|
9
9
|
type HeadingElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
10
10
|
interface HeadingProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
11
11
|
/** The size, from the type scale (Figma `level`). */
|
|
12
12
|
level?: HeadingLevel;
|
|
13
|
-
/**
|
|
14
|
-
|
|
13
|
+
/**
|
|
14
|
+
* The colour of the brand pair (Figma `tone`): neutral (default) or accent. The Mark takes the other one.
|
|
15
|
+
* `'default'` is deprecated (2.0.0-next): it is `'neutral'`.
|
|
16
|
+
*/
|
|
17
|
+
tone?: HeadingTone | 'default';
|
|
15
18
|
/** The heading element. Default h2. */
|
|
16
19
|
as?: HeadingElement;
|
|
17
20
|
/** The text (Figma `text`), with an optional <Heading.Mark> stretch (Figma `showMark` + `mark`). */
|
|
@@ -22,12 +25,12 @@ interface HeadingMarkProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
22
25
|
}
|
|
23
26
|
/**
|
|
24
27
|
* Heading.Mark — Figma [RDS] .heading/mark. A stretch of the title in the other colour of the pair: accent inside a
|
|
25
|
-
*
|
|
28
|
+
* neutral Heading, neutral inside an accent one. A plain span: screen readers read the whole title, unannounced.
|
|
26
29
|
*/
|
|
27
30
|
declare function HeadingMark({ className, children, ...rest }: HeadingMarkProps): react.JSX.Element;
|
|
28
31
|
/**
|
|
29
32
|
* Heading — Figma [RDS] Content/Heading. A title in the brand pair: one colour, or both in the same title with a
|
|
30
|
-
* Heading.Mark. The colour is chosen per screen; tone=
|
|
33
|
+
* Heading.Mark. The colour is chosen per screen; tone=neutral is the rule. Orange on white fails contrast even for
|
|
31
34
|
* a large title (2.9:1 in Rojão): tone=accent belongs on dark or on the brand plate. Styles: heading.css.
|
|
32
35
|
*/
|
|
33
36
|
declare function HeadingRoot({ level, tone, as: Tag, className, children, ...rest }: HeadingProps): react.JSX.Element;
|
|
@@ -9,7 +9,7 @@ function HeadingMark(_a) {
|
|
|
9
9
|
return /* @__PURE__ */ jsx("span", __spreadProps(__spreadValues({}, rest), { className: ["rds-heading__mark", className].filter(Boolean).join(" "), children }));
|
|
10
10
|
}
|
|
11
11
|
function HeadingRoot(_c) {
|
|
12
|
-
var _d = _c, { level = "heading", tone = "
|
|
12
|
+
var _d = _c, { level = "heading", tone = "neutral", as: Tag = "h2", className, children } = _d, rest = __objRest(_d, ["level", "tone", "as", "className", "children"]);
|
|
13
13
|
return /* @__PURE__ */ jsx(
|
|
14
14
|
Tag,
|
|
15
15
|
__spreadProps(__spreadValues({}, rest), {
|
|
@@ -9,7 +9,7 @@ interface IconButtonProps extends Omit<ComponentPropsWithRef<'button'>, 'childre
|
|
|
9
9
|
label: string;
|
|
10
10
|
/** Same tones as the Button. */
|
|
11
11
|
tone?: ButtonTone;
|
|
12
|
-
/**
|
|
12
|
+
/** The emphasis (Figma: `variant`). */
|
|
13
13
|
variant?: ButtonVariant;
|
|
14
14
|
/**
|
|
15
15
|
* The size of the square (Figma: `size`): sm 36 with a 16 icon, md 44 with a 20 icon (default), lg 52 with a 24
|
|
@@ -2,7 +2,7 @@ import * as react from 'react';
|
|
|
2
2
|
import { CropPreset } from './image-crop-dialog.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* @deprecated Use `<FileInput
|
|
5
|
+
* @deprecated Use `<FileInput layout="tile">` (Figma [RDS] Forms/FileInput): the image's square with the preview
|
|
6
6
|
* and the swap and remove buttons. ImageUpload is now a thin wrapper over it that keeps most of the 1.x API compiling and
|
|
7
7
|
* keeps the upload (`onUpload`) and the crop (`crop`). It is always the tile (`variant`, `aspect` and the preview
|
|
8
8
|
* class names left in 2.0): an image asks for a preview.
|
|
@@ -49,7 +49,7 @@ interface ImageUploadProps {
|
|
|
49
49
|
crop?: ImageUploadCrop;
|
|
50
50
|
labels?: Partial<ImageUploadLabels>;
|
|
51
51
|
}
|
|
52
|
-
/** @deprecated Use `<FileInput
|
|
52
|
+
/** @deprecated Use `<FileInput layout="tile">`, with the upload in its `onFiles` and the URL in `preview`. */
|
|
53
53
|
declare function ImageUpload({ name, value, onChange, onUpload, label, hint, accept, className, crop, labels, }: ImageUploadProps): react.JSX.Element;
|
|
54
54
|
|
|
55
55
|
export { ImageUpload, type ImageUploadCrop, type ImageUploadLabels, type ImageUploadProps };
|
|
@@ -15,7 +15,7 @@ export { Status, StatusProps, StatusSize, StatusTone, StatusVariant } from './st
|
|
|
15
15
|
export { Delta, DeltaDirection, DeltaProps, DeltaTone } from './delta.js';
|
|
16
16
|
export { Progress, ProgressKind, ProgressProps, ProgressSize } from './progress.js';
|
|
17
17
|
export { StarRating, StarRatingProps, StarRatingSize } from './star-rating.js';
|
|
18
|
-
export { Card, CardContent, CardContentProps, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardProps, CardSize, CardSurface } from './card.js';
|
|
18
|
+
export { Card, CardContent, CardContentProps, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardProps, CardSize, CardSurface, CardVariant } from './card.js';
|
|
19
19
|
export { Tile, TileProps, TileSize, TileTone, TileVariant } from './tile.js';
|
|
20
20
|
export { Kbd, KbdGroup, KbdGroupProps, KbdProps } from './kbd.js';
|
|
21
21
|
export { Sparkline, SparklineProps } from './sparkline.js';
|
|
@@ -57,8 +57,8 @@ export { SettingsList, SettingsListProps } from './settings-list.js';
|
|
|
57
57
|
export { Dropzone, DropzoneProps } from './dropzone.js';
|
|
58
58
|
export { MediaTile, MediaTileAspect, MediaTileProps } from './media-tile.js';
|
|
59
59
|
export { Attachment, AttachmentOrientation, AttachmentProps, AttachmentStatus } from './attachment.js';
|
|
60
|
-
export { Bubble, BubbleAlign, BubbleProps, BubbleVariant } from './bubble.js';
|
|
61
|
-
export { Marker, MarkerProps, MarkerVariant } from './marker.js';
|
|
60
|
+
export { Bubble, BubbleAlign, BubbleProps, BubbleTone, BubbleVariant } from './bubble.js';
|
|
61
|
+
export { Marker, MarkerKind, MarkerProps, MarkerVariant } from './marker.js';
|
|
62
62
|
export { Message, MessageAlign, MessageProps } from './message.js';
|
|
63
63
|
export { MessageScroller, MessageScrollerProps } from './message-scroller.js';
|
|
64
64
|
export { Questionnaire, QuestionnaireAnswer, QuestionnaireProps } from './questionnaire.js';
|
|
@@ -66,7 +66,7 @@ export { TypingIndicator, TypingIndicatorProps } from './typing-indicator.js';
|
|
|
66
66
|
export { ChoiceCarousel, ChoiceCarouselProps } from './choice-carousel.js';
|
|
67
67
|
export { Tabs, TabsContent, TabsContentProps, TabsList, TabsListProps, TabsProps, TabsTrigger, TabsTriggerProps } from './tabs.js';
|
|
68
68
|
export { PageHeader, PageHeaderHeading, PageHeaderProps } from './page-header.js';
|
|
69
|
-
export { Sidebar, SidebarHeader, SidebarItem, SidebarItemProps, SidebarProps, SidebarSection, SidebarSectionProps, SidebarSeparator
|
|
69
|
+
export { Sidebar, SidebarHeader, SidebarItem, SidebarItemProps, SidebarProps, SidebarSection, SidebarSectionProps, SidebarSeparator } from './sidebar.js';
|
|
70
70
|
export { NavigationMenu, NavigationMenuEntry, NavigationMenuLink, NavigationMenuLinkComponent, NavigationMenuProps } from './navigation-menu.js';
|
|
71
71
|
export { SavingBar, SavingBarProps, SavingBarStatus } from './saving-bar.js';
|
|
72
72
|
export { SavingBarProvider, SavingBarRegistration, SavingBarRoot, usePageSavingBar } from './saving-bar-context.js';
|
|
@@ -79,7 +79,7 @@ export { Tooltip, TooltipProps, TooltipSide } from './tooltip.js';
|
|
|
79
79
|
export { ToastFn, ToastOptions, ToastTone, ToastVariant, ToastView, ToastViewProps, Toaster, ToasterProps, toast, toastClassName, useToast } from './toast.js';
|
|
80
80
|
export { Separator, SeparatorOrientation, SeparatorProps } from './separator.js';
|
|
81
81
|
export { Heading, HeadingElement, HeadingLevel, HeadingMark, HeadingMarkProps, HeadingProps, HeadingTone } from './heading.js';
|
|
82
|
-
export { Avatar, AvatarGroup, AvatarGroupProps, AvatarGroupSize, AvatarProps, AvatarSize, AvatarType, AvatarVariant, initials } from './avatar.js';
|
|
82
|
+
export { Avatar, AvatarContent, AvatarGroup, AvatarGroupProps, AvatarGroupSize, AvatarProps, AvatarSize, AvatarType, AvatarVariant, initials } from './avatar.js';
|
|
83
83
|
export { IconButton, IconButtonProps } from './icon-button.js';
|
|
84
84
|
export { ButtonGroup, ButtonGroupOrientation, ButtonGroupProps } from './button-group.js';
|
|
85
85
|
export { ActionBar, ActionBarProps } from './action-bar.js';
|
|
@@ -92,7 +92,7 @@ export { Accordion, AccordionItem, AccordionItemProps, AccordionProps } from './
|
|
|
92
92
|
export { Slider, SliderProps } from './slider.js';
|
|
93
93
|
export { Listbox, ListboxOption, ListboxOptionProps, ListboxProps } from './listbox.js';
|
|
94
94
|
export { Calendar, CalendarProps } from './calendar.js';
|
|
95
|
-
export { FileInput, FileInputProps, FileInputVariant, formatFileSize } from './file-input.js';
|
|
95
|
+
export { FileInput, FileInputLayout, FileInputProps, FileInputVariant, formatFileSize } from './file-input.js';
|
|
96
96
|
export { NumberInput, NumberInputProps, NumberInputStep } from './number-input.js';
|
|
97
97
|
export { InputOTP, InputOTPLength, InputOTPProps } from './input-otp.js';
|
|
98
98
|
export { Combobox, ComboboxMultipleProps, ComboboxOption, ComboboxProps, ComboboxSingleProps } from './combobox.js';
|
|
@@ -2,7 +2,7 @@ import * as react from 'react';
|
|
|
2
2
|
import { MouseEventHandler, MouseEvent } from 'react';
|
|
3
3
|
|
|
4
4
|
type ButtonTone = 'action' | 'neutral' | 'danger' | 'inverse';
|
|
5
|
-
/**
|
|
5
|
+
/** The emphasis (Figma: `variant`): fill, outline or ghost. */
|
|
6
6
|
type ButtonVariant = 'fill' | 'outline' | 'ghost';
|
|
7
7
|
/**
|
|
8
8
|
* The height: sm 36, md 44 (the default), lg 52. The touch target is 44 in every size: on sm, an invisible layer
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
/** neutral (default) or danger (Figma: `tone`). */
|
|
5
|
+
type MenuItemTone = 'neutral' | 'danger';
|
|
5
6
|
interface MenuItemContentProps {
|
|
6
7
|
/** The action, a verb ("Duplicar") (Figma: `label`). */
|
|
7
8
|
children: ReactNode;
|
|
@@ -10,7 +11,7 @@ interface MenuItemContentProps {
|
|
|
10
11
|
/** A keyboard shortcut shown on the right (Figma: `showShortcut`), such as "Ctrl D". Not announced. */
|
|
11
12
|
shortcut?: ReactNode;
|
|
12
13
|
}
|
|
13
|
-
declare const menuItemClassName: (tone?: MenuItemTone, extra?: string) => string;
|
|
14
|
+
declare const menuItemClassName: (tone?: MenuItemTone | "default", extra?: string) => string;
|
|
14
15
|
declare function MenuItemContent({ children, icon, shortcut }: MenuItemContentProps): react.JSX.Element;
|
|
15
16
|
|
|
16
17
|
export { MenuItemContent, type MenuItemContentProps, type MenuItemTone, menuItemClassName };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../chunk-ORMEWXMH.js";
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
const menuItemClassName = (tone = "
|
|
3
|
+
const menuItemClassName = (tone = "neutral", extra) => ["rds-menu__item", tone === "danger" && "rds-menu__item--danger", extra].filter(Boolean).join(" ");
|
|
4
4
|
function MenuItemContent({ children, icon, shortcut }) {
|
|
5
5
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6
6
|
icon && /* @__PURE__ */ jsx("span", { className: "rds-menu__icon", "aria-hidden": "true", children: icon }),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** The emphasis (Figma: `variant`): ghost in a toolbar, outline when it stands alone. */
|
|
2
2
|
type ToggleVariant = 'ghost' | 'outline';
|
|
3
3
|
declare function toggleClassName(variant: ToggleVariant, extra?: string): string;
|
|
4
4
|
/** A toggle without visible text needs a name, or a screen reader only says "toggle button". */
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
type
|
|
4
|
+
/** The emphasis (Figma: `variant`). */
|
|
5
|
+
type ItemVariant = 'ghost' | 'outline' | 'soft';
|
|
6
|
+
type ItemSize = 'md' | 'sm';
|
|
6
7
|
interface ItemProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
7
8
|
/** The thing's name (Figma: `title`). */
|
|
8
9
|
title: ReactNode;
|
|
@@ -12,10 +13,16 @@ interface ItemProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
|
12
13
|
media?: ReactNode;
|
|
13
14
|
/** One action or control on the right (Figma: `showAction` + `action`): a ghost Button, an IconButton, a Switch. */
|
|
14
15
|
action?: ReactNode;
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
/**
|
|
17
|
+
* ghost (default): loose in the list, a line between rows; outline: each row a block; soft: a background, no
|
|
18
|
+
* border (Figma: `variant`). `'default'` and `'muted'` are deprecated (2.0.0-next): they are ghost and soft.
|
|
19
|
+
*/
|
|
20
|
+
variant?: ItemVariant | 'default' | 'muted';
|
|
21
|
+
/**
|
|
22
|
+
* md (default) or sm for dense lists: 14 and 12 text, 8 12 padding (Figma: `size`). `'default'` is deprecated
|
|
23
|
+
* (2.0.0-next): it is `'md'`.
|
|
24
|
+
*/
|
|
25
|
+
size?: ItemSize | 'default';
|
|
19
26
|
}
|
|
20
27
|
/**
|
|
21
28
|
* Item — Figma [RDS] Content/Item. One row of a list: media, title, description and one action. Inside an ItemGroup
|
|
@@ -26,7 +33,7 @@ interface ItemGroupProps extends HTMLAttributes<HTMLUListElement> {
|
|
|
26
33
|
/** The Items. One variant for the whole list. */
|
|
27
34
|
children: ReactNode;
|
|
28
35
|
}
|
|
29
|
-
/** The list the Items go in (<ul>).
|
|
36
|
+
/** The list the Items go in (<ul>). ghost rows get a line between them; outline and soft rows a gap of 8. */
|
|
30
37
|
declare function ItemGroup({ className, children, ...rest }: ItemGroupProps): react.JSX.Element;
|
|
31
38
|
|
|
32
39
|
export { Item, ItemGroup, type ItemGroupProps, type ItemProps, type ItemSize, type ItemVariant };
|
package/dist/components/item.js
CHANGED
|
@@ -6,14 +6,17 @@ import {
|
|
|
6
6
|
} from "../chunk-ORMEWXMH.js";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { createContext, useContext } from "react";
|
|
9
|
+
const LEGACY_VARIANT = { default: "ghost", muted: "soft" };
|
|
9
10
|
const InGroup = createContext(false);
|
|
10
11
|
function Item(_a) {
|
|
11
|
-
var _b = _a, { title, description, media, action, variant = "
|
|
12
|
+
var _b = _a, { title, description, media, action, variant = "ghost", size = "md", className } = _b, rest = __objRest(_b, ["title", "description", "media", "action", "variant", "size", "className"]);
|
|
13
|
+
var _a2;
|
|
12
14
|
const Root = useContext(InGroup) ? "li" : "div";
|
|
15
|
+
const look = (_a2 = LEGACY_VARIANT[variant]) != null ? _a2 : variant;
|
|
13
16
|
return /* @__PURE__ */ jsxs(
|
|
14
17
|
Root,
|
|
15
18
|
__spreadProps(__spreadValues({}, rest), {
|
|
16
|
-
className: ["rds-item", `rds-item--${
|
|
19
|
+
className: ["rds-item", `rds-item--${look}`, size === "sm" && "rds-item--sm", className].filter(Boolean).join(" "),
|
|
17
20
|
children: [
|
|
18
21
|
media && /* @__PURE__ */ jsx("span", { className: "rds-item__media", children: media }),
|
|
19
22
|
/* @__PURE__ */ jsxs("span", { className: "rds-item__content", children: [
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
3
|
|
|
4
|
+
/** The marker's shape (Figma: `kind`): it is the form, not the emphasis, so it is not a `variant`. */
|
|
5
|
+
type MarkerKind = 'inline' | 'border' | 'separator';
|
|
6
|
+
/** @deprecated Use MarkerKind (2.0.0-next: `variant` is `kind`, and default is inline). */
|
|
4
7
|
type MarkerVariant = 'default' | 'border' | 'separator';
|
|
5
8
|
interface MarkerProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* inline (default): icon and text; border: with a line under it, to split rows; separator: the text between two
|
|
11
|
+
* lines (Figma: `kind`).
|
|
12
|
+
*/
|
|
13
|
+
kind?: MarkerKind;
|
|
14
|
+
/** @deprecated Use `kind` (2.0.0-next): default → inline, border and separator stay. */
|
|
7
15
|
variant?: MarkerVariant;
|
|
8
16
|
/** The assistant's status, a system note or a date (Figma: `text`). */
|
|
9
17
|
children: ReactNode;
|
|
@@ -19,6 +27,6 @@ interface MarkerProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
19
27
|
* Marker — Figma [RDS] Chat/Marker. A line inside the conversation that is not a message: the assistant's status
|
|
20
28
|
* ("Buscando…"), a system note or a date between two lines. Styles: marker.css.
|
|
21
29
|
*/
|
|
22
|
-
declare function Marker({ variant, children, icon, loading, className, ...rest }: MarkerProps): react.JSX.Element;
|
|
30
|
+
declare function Marker({ kind: kindProp, variant, children, icon, loading, className, ...rest }: MarkerProps): react.JSX.Element;
|
|
23
31
|
|
|
24
|
-
export { Marker, type MarkerProps, type MarkerVariant };
|
|
32
|
+
export { Marker, type MarkerKind, type MarkerProps, type MarkerVariant };
|
|
@@ -7,10 +7,11 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
7
7
|
import { SparklesIcon } from "./internal/icons.js";
|
|
8
8
|
import { Spinner } from "./spinner.js";
|
|
9
9
|
function Marker(_a) {
|
|
10
|
-
var _b = _a, {
|
|
11
|
-
const
|
|
10
|
+
var _b = _a, { kind: kindProp, variant, children, icon = /* @__PURE__ */ jsx(SparklesIcon, {}), loading, className } = _b, rest = __objRest(_b, ["kind", "variant", "children", "icon", "loading", "className"]);
|
|
11
|
+
const kind = kindProp != null ? kindProp : variant === "default" || variant === void 0 ? "inline" : variant;
|
|
12
|
+
const classes = ["rds-marker", `rds-marker--${kind}`, className].filter(Boolean).join(" ");
|
|
12
13
|
const role = loading ? "status" : void 0;
|
|
13
|
-
if (
|
|
14
|
+
if (kind === "separator") {
|
|
14
15
|
return /* @__PURE__ */ jsxs("div", __spreadProps(__spreadValues({ role }, rest), { className: classes, children: [
|
|
15
16
|
/* @__PURE__ */ jsx("span", { className: "rds-marker__line", "aria-hidden": "true" }),
|
|
16
17
|
/* @__PURE__ */ jsx("span", { className: "rds-marker__text", children }),
|
|
@@ -3,7 +3,7 @@ import { HTMLAttributes, ReactNode } from 'react';
|
|
|
3
3
|
|
|
4
4
|
/** task: something moving to the end (upload, import). measure: a value inside a known range (quota used). */
|
|
5
5
|
type ProgressKind = 'task' | 'measure';
|
|
6
|
-
type ProgressSize = '
|
|
6
|
+
type ProgressSize = 'md' | 'sm';
|
|
7
7
|
interface ProgressProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
8
8
|
/** 0 to `max` (Figma: `value`, 0 to 100 in steps of 5; the code takes any value). */
|
|
9
9
|
value: number;
|
|
@@ -18,8 +18,8 @@ interface ProgressProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'>
|
|
|
18
18
|
valueText?: ReactNode;
|
|
19
19
|
/** task → role="progressbar"; measure → role="meter". */
|
|
20
20
|
kind?: ProgressKind;
|
|
21
|
-
/**
|
|
22
|
-
size?: ProgressSize;
|
|
21
|
+
/** md: 8px bar (default); sm: 4px, for dense lists (Figma: `size`). `'default'` is deprecated (2.0.0-next): it is `'md'`. */
|
|
22
|
+
size?: ProgressSize | 'default';
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Progress — Figma [RDS] Indicators/Progress. A bar with a value: the track is the brand tint, the fill the first
|
|
@@ -15,7 +15,7 @@ function Progress(_a) {
|
|
|
15
15
|
showValue = true,
|
|
16
16
|
valueText,
|
|
17
17
|
kind = "task",
|
|
18
|
-
size = "
|
|
18
|
+
size = "md",
|
|
19
19
|
className
|
|
20
20
|
} = _b, rest = __objRest(_b, [
|
|
21
21
|
"value",
|
|
@@ -32,7 +32,7 @@ function Progress(_a) {
|
|
|
32
32
|
const clamped = Math.min(Math.max(value, 0), max);
|
|
33
33
|
const percent = max > 0 ? clamped / max * 100 : 0;
|
|
34
34
|
const text = valueText != null ? valueText : `${Math.round(percent)}%`;
|
|
35
|
-
return /* @__PURE__ */ jsxs("div", __spreadProps(__spreadValues({}, rest), { className: ["rds-progress", `rds-progress--${size}`, className].filter(Boolean).join(" "), children: [
|
|
35
|
+
return /* @__PURE__ */ jsxs("div", __spreadProps(__spreadValues({}, rest), { className: ["rds-progress", `rds-progress--${size === "default" ? "md" : size}`, className].filter(Boolean).join(" "), children: [
|
|
36
36
|
(showLabel || showValue) && /* @__PURE__ */ jsxs("div", { className: "rds-progress__row", children: [
|
|
37
37
|
showLabel && /* @__PURE__ */ jsx("span", { id: labelId, className: "rds-progress__label", children: label }),
|
|
38
38
|
showValue && /* @__PURE__ */ jsx("span", { className: "rds-progress__value", "aria-hidden": "true", children: text })
|
|
@@ -4,6 +4,9 @@ import { ReactNode } from 'react';
|
|
|
4
4
|
interface RowActionItem {
|
|
5
5
|
label: string;
|
|
6
6
|
icon?: ReactNode;
|
|
7
|
+
/** neutral (default) or danger: danger items go last, after a separator. */
|
|
8
|
+
tone?: 'neutral' | 'danger';
|
|
9
|
+
/** @deprecated Use `tone` (2.0.0-next): default → neutral, danger stays. */
|
|
7
10
|
variant?: 'default' | 'danger';
|
|
8
11
|
disabled?: boolean;
|
|
9
12
|
onClick: () => void;
|