@jirawatpyk/aura-react 5.8.0 → 5.10.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/README.md +36 -0
- package/dist/aura.bundle.js +1528 -1098
- package/dist/cjs/index.cjs +1528 -1098
- package/dist/esm/Accordion.js +2 -1
- package/dist/esm/Alert.js +2 -1
- package/dist/esm/AppShell.js +2 -1
- package/dist/esm/Breadcrumb.js +2 -1
- package/dist/esm/Button.js +2 -1
- package/dist/esm/Checkbox.js +2 -1
- package/dist/esm/Combobox.js +7 -6
- package/dist/esm/Command.js +3 -2
- package/dist/esm/DataTable.js +35 -13
- package/dist/esm/DatePicker.js +8 -7
- package/dist/esm/Dialog.js +38 -5
- package/dist/esm/DropdownMenu.js +1 -1
- package/dist/esm/Field.js +2 -1
- package/dist/esm/FileUpload.js +4 -3
- package/dist/esm/FilterBar.js +3 -2
- package/dist/esm/FormErrorSummary.js +2 -1
- package/dist/esm/Icon.js +50 -31
- package/dist/esm/Menu.js +37 -12
- package/dist/esm/NumberField.js +3 -2
- package/dist/esm/Pagination.js +3 -2
- package/dist/esm/PasswordField.js +2 -1
- package/dist/esm/Popover.js +2 -1
- package/dist/esm/RadioGroup.js +2 -1
- package/dist/esm/Select.js +4 -3
- package/dist/esm/SideNav.js +3 -2
- package/dist/esm/Stat.js +8 -1
- package/dist/esm/Stepper.js +2 -1
- package/dist/esm/Tabs.js +89 -13
- package/dist/esm/Tag.js +3 -2
- package/dist/esm/TimePicker.js +5 -4
- package/dist/esm/Toaster.js +3 -2
- package/dist/esm/classes.js +14 -1
- package/dist/esm/colorScheme.js +8 -1
- package/dist/esm/display.js +22 -12
- package/dist/esm/iconSvg.js +53 -0
- package/dist/esm/icons.js +531 -0
- package/dist/esm/index.js +2 -1
- package/dist/esm/internal.js +1 -14
- package/dist/esm/locale.js +7 -0
- package/dist/esm/strings.js +4 -245
- package/dist/esm/strings.sv.js +127 -0
- package/dist/esm/strings.th.js +127 -0
- package/dist/icons/index.cjs +613 -0
- package/dist/icons/index.d.cts +106 -0
- package/dist/icons/index.d.ts +106 -0
- package/dist/index.d.cts +52 -2
- package/dist/index.d.ts +52 -2
- package/dist/locales/sv.cjs +149 -0
- package/dist/locales/sv.d.cts +96 -0
- package/dist/locales/sv.d.ts +96 -0
- package/dist/locales/th.cjs +149 -0
- package/dist/locales/th.d.cts +96 -0
- package/dist/locales/th.d.ts +96 -0
- package/dist/server/index.cjs +445 -314
- package/dist/server/index.d.cts +24 -0
- package/dist/server/index.d.ts +24 -0
- package/dist/server/index.js +445 -314
- package/dist/styles.css +22 -1
- package/dist/styles.layer.css +22 -1
- package/package.json +35 -3
- package/scripts/aura-icons-codemod.mjs +345 -0
package/dist/esm/Accordion.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { Icon } from "./Icon.js";
|
|
4
4
|
import { cx, uid, useMaybeControlled } from "./internal.js";
|
|
5
|
+
import { IconChevronDown } from "./icons.js";
|
|
5
6
|
const h = React.createElement;
|
|
6
7
|
const Accordion = React.forwardRef(function Accordion2(props, ref) {
|
|
7
8
|
const auto = uid(), base = props.id || auto;
|
|
@@ -57,7 +58,7 @@ const Accordion = React.forwardRef(function Accordion2(props, ref) {
|
|
|
57
58
|
},
|
|
58
59
|
it.icon ? /* @__PURE__ */ React.createElement(Icon, { name: it.icon, className: "aura-accordion__lead" }) : null,
|
|
59
60
|
/* @__PURE__ */ React.createElement("span", { className: "aura-accordion__title" }, it.title, it.description ? /* @__PURE__ */ React.createElement("span", { className: "aura-accordion__desc" }, it.description) : null),
|
|
60
|
-
/* @__PURE__ */ React.createElement(Icon, { name:
|
|
61
|
+
/* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconChevronDown, null), className: "aura-accordion__chevron" })
|
|
61
62
|
)), /* @__PURE__ */ React.createElement("div", { id: pid, role: "region", "aria-labelledby": bid, className: "aura-accordion__panel", hidden: !on }, it.content));
|
|
62
63
|
}));
|
|
63
64
|
});
|
package/dist/esm/Alert.js
CHANGED
|
@@ -3,13 +3,14 @@ import * as React from "react";
|
|
|
3
3
|
import { IconButton } from "./IconButton.js";
|
|
4
4
|
import { alertElement } from "./display.js";
|
|
5
5
|
import { useStrings } from "./locale.js";
|
|
6
|
+
import { IconX } from "./icons.js";
|
|
6
7
|
import { ALERT_ICON } from "./display.js";
|
|
7
8
|
const Alert = React.forwardRef(function Alert2(props, ref) {
|
|
8
9
|
const t = useStrings();
|
|
9
10
|
return alertElement(
|
|
10
11
|
props,
|
|
11
12
|
ref,
|
|
12
|
-
props.onDismiss ? /* @__PURE__ */ React.createElement(IconButton, { icon:
|
|
13
|
+
props.onDismiss ? /* @__PURE__ */ React.createElement(IconButton, { icon: /* @__PURE__ */ React.createElement(IconX, null), label: t.dismiss, className: "aura-alert__close", onClick: props.onDismiss }) : null
|
|
13
14
|
);
|
|
14
15
|
});
|
|
15
16
|
export {
|
package/dist/esm/AppShell.js
CHANGED
|
@@ -5,6 +5,7 @@ import { IconButton } from "./IconButton.js";
|
|
|
5
5
|
import { cx } from "./internal.js";
|
|
6
6
|
import { useStrings } from "./locale.js";
|
|
7
7
|
import { useBreakpoint } from "./responsive.js";
|
|
8
|
+
import { IconMenu } from "./icons.js";
|
|
8
9
|
const AppShell = React.forwardRef(function AppShell2(props, ref) {
|
|
9
10
|
const t = useStrings();
|
|
10
11
|
const bp = useBreakpoint();
|
|
@@ -51,7 +52,7 @@ const AppShell = React.forwardRef(function AppShell2(props, ref) {
|
|
|
51
52
|
IconButton,
|
|
52
53
|
{
|
|
53
54
|
className: "aura-shell__menu",
|
|
54
|
-
icon:
|
|
55
|
+
icon: /* @__PURE__ */ React.createElement(IconMenu, null),
|
|
55
56
|
label: props.menuLabel || t.openNav,
|
|
56
57
|
size: "md",
|
|
57
58
|
onClick: function() {
|
package/dist/esm/Breadcrumb.js
CHANGED
|
@@ -3,6 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
import { Icon } from "./Icon.js";
|
|
4
4
|
import { cx } from "./internal.js";
|
|
5
5
|
import { useLinkComponent, useStrings } from "./locale.js";
|
|
6
|
+
import { IconChevronRight } from "./icons.js";
|
|
6
7
|
const Breadcrumb = React.forwardRef(function Breadcrumb2(props, ref) {
|
|
7
8
|
const t = useStrings();
|
|
8
9
|
const Link = useLinkComponent(props.linkComponent);
|
|
@@ -12,7 +13,7 @@ const Breadcrumb = React.forwardRef(function Breadcrumb2(props, ref) {
|
|
|
12
13
|
return /* @__PURE__ */ React.createElement("li", { key: i }, last ? /* @__PURE__ */ React.createElement("span", { "aria-current": "page", className: "aura-crumbs__current" }, it.label) : it.href ? /* @__PURE__ */ React.createElement(Link, { href: it.href, onClick: it.onClick }, it.label) : it.onClick ? /* @__PURE__ */ React.createElement("button", { type: "button", onClick: it.onClick }, it.label) : (
|
|
13
14
|
/* 5.7: a segment with no page and no action is text, not a button that does nothing. */
|
|
14
15
|
/* @__PURE__ */ React.createElement("span", { className: "aura-crumbs__text" }, it.label)
|
|
15
|
-
), last ? null : /* @__PURE__ */ React.createElement(Icon, { name:
|
|
16
|
+
), last ? null : /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconChevronRight, null), size: 12, className: "aura-crumbs__sep" }));
|
|
16
17
|
})));
|
|
17
18
|
});
|
|
18
19
|
export {
|
package/dist/esm/Button.js
CHANGED
|
@@ -4,6 +4,7 @@ import { omit } from "./internal.js";
|
|
|
4
4
|
import { buttonClass } from "./display.js";
|
|
5
5
|
import { Icon } from "./Icon.js";
|
|
6
6
|
import { useLinkComponent } from "./locale.js";
|
|
7
|
+
import { IconLoaderCircle } from "./icons.js";
|
|
7
8
|
function ButtonLink(props, ref, Link) {
|
|
8
9
|
const variant = props.variant || "primary";
|
|
9
10
|
const disabled = !!props.disabled;
|
|
@@ -82,7 +83,7 @@ const Button = React.forwardRef(
|
|
|
82
83
|
e.preventDefault();
|
|
83
84
|
} : props.onClick
|
|
84
85
|
},
|
|
85
|
-
loading ? /* @__PURE__ */ React.createElement(Icon, { name:
|
|
86
|
+
loading ? /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconLoaderCircle, null), className: "aura-spin" }) : props.icon ? /* @__PURE__ */ React.createElement(Icon, { name: props.icon }) : null,
|
|
86
87
|
props.children,
|
|
87
88
|
props.iconRight && !loading ? /* @__PURE__ */ React.createElement(Icon, { name: props.iconRight }) : null
|
|
88
89
|
);
|
package/dist/esm/Checkbox.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { cx, devWarnOnce, omit, uid, useMergedRef, useMaybeControlled } from "./internal.js";
|
|
4
4
|
import { Icon } from "./Icon.js";
|
|
5
|
+
import { IconCheck, IconMinus } from "./icons.js";
|
|
5
6
|
const Checkbox = React.forwardRef(function Checkbox2(props, ref) {
|
|
6
7
|
const own = React.useRef(null), merged = useMergedRef(ref, own);
|
|
7
8
|
const st = useMaybeControlled(props.checked, !!props.defaultChecked, props.onChange);
|
|
@@ -56,7 +57,7 @@ const Checkbox = React.forwardRef(function Checkbox2(props, ref) {
|
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
59
|
),
|
|
59
|
-
/* @__PURE__ */ React.createElement("span", { className: "aura-check__box", "aria-hidden": true }, props.indeterminate ? /* @__PURE__ */ React.createElement(Icon, { name:
|
|
60
|
+
/* @__PURE__ */ React.createElement("span", { className: "aura-check__box", "aria-hidden": true }, props.indeterminate ? /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconMinus, null), size: 12, strokeWidth: 3 }) : on ? /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconCheck, null), size: 12, strokeWidth: 3 }) : null),
|
|
60
61
|
!labelled && props.description ? /* @__PURE__ */ React.createElement("span", { className: "aura-sr-only", id: descId }, props.description) : null,
|
|
61
62
|
labelled ? /* @__PURE__ */ React.createElement("span", { className: "aura-check__text" }, /* @__PURE__ */ React.createElement("span", { className: "aura-check__label" }, text), props.description ? /* @__PURE__ */ React.createElement("span", { className: "aura-check__desc", id: descId }, props.description) : null) : null
|
|
62
63
|
);
|
package/dist/esm/Combobox.js
CHANGED
|
@@ -5,6 +5,7 @@ import { createPortal } from "react-dom";
|
|
|
5
5
|
import { cx, uid, useMaybeControlled, useMounted, useIsoLayoutEffect, useMergedRef } from "./internal.js";
|
|
6
6
|
import { Icon } from "./Icon.js";
|
|
7
7
|
import { Field } from "./Field.js";
|
|
8
|
+
import { IconCheck, IconChevronDown, IconLoaderCircle, IconSearch, IconX } from "./icons.js";
|
|
8
9
|
function norm(s) {
|
|
9
10
|
return String(s == null ? "" : s).normalize("NFC").toLocaleLowerCase("th");
|
|
10
11
|
}
|
|
@@ -227,10 +228,10 @@ const Combobox = React.forwardRef(
|
|
|
227
228
|
},
|
|
228
229
|
o.icon ? /* @__PURE__ */ React.createElement(Icon, { name: o.icon }) : null,
|
|
229
230
|
/* @__PURE__ */ React.createElement("span", { className: "aura-combo__text" }, /* @__PURE__ */ React.createElement("span", { className: "aura-combo__label" }, o.label), o.description ? /* @__PURE__ */ React.createElement("span", { className: "aura-combo__desc" }, o.description) : null),
|
|
230
|
-
isSel ? /* @__PURE__ */ React.createElement(Icon, { name:
|
|
231
|
+
isSel ? /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconCheck, null), className: "aura-combo__check" }) : null
|
|
231
232
|
);
|
|
232
233
|
})
|
|
233
|
-
) : null, props.loading || !live.length || more ? /* @__PURE__ */ React.createElement("div", { className: "aura-combo__list", role: "status" }, props.loading ? /* @__PURE__ */ React.createElement("div", { className: "aura-combo__note" }, /* @__PURE__ */ React.createElement(Icon, { name:
|
|
234
|
+
) : null, props.loading || !live.length || more ? /* @__PURE__ */ React.createElement("div", { className: "aura-combo__list", role: "status" }, props.loading ? /* @__PURE__ */ React.createElement("div", { className: "aura-combo__note" }, /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconLoaderCircle, null), className: "aura-spin" }), props.loadingText || t.searching) : !live.length ? /* @__PURE__ */ React.createElement("div", { className: "aura-combo__note" }, props.emptyText || t.noMatches) : /* @__PURE__ */ React.createElement("div", { className: "aura-combo__note" }, t.keepTyping((props.options || []).length))) : null),
|
|
234
235
|
document.body
|
|
235
236
|
) : null;
|
|
236
237
|
return /* @__PURE__ */ React.createElement(
|
|
@@ -245,7 +246,7 @@ const Combobox = React.forwardRef(
|
|
|
245
246
|
disabled: props.disabled,
|
|
246
247
|
className: props.className
|
|
247
248
|
},
|
|
248
|
-
/* @__PURE__ */ React.createElement("div", { ref: boxRef, className: cx("aura-input aura-combo has-icon", open && "is-open", multi && "is-multi") }, /* @__PURE__ */ React.createElement(Icon, { name: props.icon ||
|
|
249
|
+
/* @__PURE__ */ React.createElement("div", { ref: boxRef, className: cx("aura-input aura-combo has-icon", open && "is-open", multi && "is-multi") }, /* @__PURE__ */ React.createElement(Icon, { name: props.icon || /* @__PURE__ */ React.createElement(IconSearch, null), className: "aura-input__icon" }), multi && picked.length ? /* @__PURE__ */ React.createElement("span", { className: "aura-combo__chips" }, picked.map(function(o) {
|
|
249
250
|
return /* @__PURE__ */ React.createElement("span", { key: o.value, className: "aura-combo__chip" }, /* @__PURE__ */ React.createElement("span", { className: "aura-combo__chip-label" }, o.label), props.disabled || props.readOnly ? null : /* @__PURE__ */ React.createElement(
|
|
250
251
|
"button",
|
|
251
252
|
{
|
|
@@ -265,7 +266,7 @@ const Combobox = React.forwardRef(
|
|
|
265
266
|
if (inputRef.current) inputRef.current.focus();
|
|
266
267
|
}
|
|
267
268
|
},
|
|
268
|
-
/* @__PURE__ */ React.createElement(Icon, { name:
|
|
269
|
+
/* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconX, null) })
|
|
269
270
|
));
|
|
270
271
|
})) : null, multi ? /* @__PURE__ */ React.createElement("span", { id: summaryId, className: "aura-sr-only" }, picked.length ? t.selectedCount(picked.length) + ": " + picked.map(function(o) {
|
|
271
272
|
return o.label;
|
|
@@ -320,7 +321,7 @@ const Combobox = React.forwardRef(
|
|
|
320
321
|
if (inputRef.current) inputRef.current.focus();
|
|
321
322
|
}
|
|
322
323
|
},
|
|
323
|
-
/* @__PURE__ */ React.createElement(Icon, { name:
|
|
324
|
+
/* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconX, null) })
|
|
324
325
|
) : null, /* @__PURE__ */ React.createElement(
|
|
325
326
|
"button",
|
|
326
327
|
{
|
|
@@ -339,7 +340,7 @@ const Combobox = React.forwardRef(
|
|
|
339
340
|
}
|
|
340
341
|
}
|
|
341
342
|
},
|
|
342
|
-
/* @__PURE__ */ React.createElement(Icon, { name:
|
|
343
|
+
/* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconChevronDown, null) })
|
|
343
344
|
)),
|
|
344
345
|
list
|
|
345
346
|
);
|
package/dist/esm/Command.js
CHANGED
|
@@ -6,6 +6,7 @@ import { defaultFilter } from "./Combobox.js";
|
|
|
6
6
|
import { cx, uid } from "./internal.js";
|
|
7
7
|
import { useDensity, useStrings } from "./locale.js";
|
|
8
8
|
import { useModal } from "./useModal.js";
|
|
9
|
+
import { IconLoaderCircle, IconSearch } from "./icons.js";
|
|
9
10
|
function isMac() {
|
|
10
11
|
return typeof navigator !== "undefined" && /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent);
|
|
11
12
|
}
|
|
@@ -149,7 +150,7 @@ function Command(props) {
|
|
|
149
150
|
tabIndex: -1,
|
|
150
151
|
className: cx("aura-command", props.className)
|
|
151
152
|
},
|
|
152
|
-
/* @__PURE__ */ React.createElement("div", { className: "aura-command__search" }, /* @__PURE__ */ React.createElement(Icon, { name:
|
|
153
|
+
/* @__PURE__ */ React.createElement("div", { className: "aura-command__search" }, /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconSearch, null), className: "aura-command__search-icon" }), /* @__PURE__ */ React.createElement(
|
|
153
154
|
"input",
|
|
154
155
|
{
|
|
155
156
|
ref: input,
|
|
@@ -173,7 +174,7 @@ function Command(props) {
|
|
|
173
174
|
onKeyDown: onKey
|
|
174
175
|
}
|
|
175
176
|
), /* @__PURE__ */ React.createElement("kbd", { className: "aura-command__kbd" }, "Esc")),
|
|
176
|
-
/* @__PURE__ */ React.createElement("div", { className: "aura-command__list", "aria-busy": props.loading || void 0 }, props.loading ? /* @__PURE__ */ React.createElement("div", { className: "aura-command__loading" }, /* @__PURE__ */ React.createElement(Icon, { name:
|
|
177
|
+
/* @__PURE__ */ React.createElement("div", { className: "aura-command__list", "aria-busy": props.loading || void 0 }, props.loading ? /* @__PURE__ */ React.createElement("div", { className: "aura-command__loading" }, /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconLoaderCircle, null), className: "aura-spin" }), t.searching) : null, !flat.length ? props.loading ? null : /* @__PURE__ */ React.createElement("div", { className: "aura-command__empty" }, props.empty != null ? props.empty : props.emptyText || t.noMatches) : /* @__PURE__ */ React.createElement(
|
|
177
178
|
"div",
|
|
178
179
|
{
|
|
179
180
|
id: listId,
|
package/dist/esm/DataTable.js
CHANGED
|
@@ -8,6 +8,22 @@ import { IconButton } from "./IconButton.js";
|
|
|
8
8
|
import { Checkbox } from "./Checkbox.js";
|
|
9
9
|
import { Menu } from "./Menu.js";
|
|
10
10
|
import { StatusPill, toneFor, TONE_ORDER } from "./StatusPill.js";
|
|
11
|
+
import {
|
|
12
|
+
IconArrowDown,
|
|
13
|
+
IconArrowLeft,
|
|
14
|
+
IconArrowRight,
|
|
15
|
+
IconArrowUp,
|
|
16
|
+
IconArrowUpDown,
|
|
17
|
+
IconChevronLeft,
|
|
18
|
+
IconChevronRight,
|
|
19
|
+
IconColumns3,
|
|
20
|
+
IconEllipsis,
|
|
21
|
+
IconEyeOff,
|
|
22
|
+
IconInbox,
|
|
23
|
+
IconPin,
|
|
24
|
+
IconPinOff,
|
|
25
|
+
IconRotateCcw
|
|
26
|
+
} from "./icons.js";
|
|
11
27
|
const BP = { sm: 640, md: 768, lg: 1024, xl: 1280 };
|
|
12
28
|
const DEFAULT_COLUMNS = [
|
|
13
29
|
{ key: "id", label: "ID", width: 96, mono: true },
|
|
@@ -622,14 +638,14 @@ const DataTableImpl = React.forwardRef(function DataTable(props, ref) {
|
|
|
622
638
|
items.push(
|
|
623
639
|
{
|
|
624
640
|
label: t.sortAsc,
|
|
625
|
-
icon:
|
|
641
|
+
icon: /* @__PURE__ */ React.createElement(IconArrowUp, null),
|
|
626
642
|
onSelect: function() {
|
|
627
643
|
applySort({ key: c.key, dir: "asc" });
|
|
628
644
|
}
|
|
629
645
|
},
|
|
630
646
|
{
|
|
631
647
|
label: t.sortDesc,
|
|
632
|
-
icon:
|
|
648
|
+
icon: /* @__PURE__ */ React.createElement(IconArrowDown, null),
|
|
633
649
|
onSelect: function() {
|
|
634
650
|
applySort({ key: c.key, dir: "desc" });
|
|
635
651
|
}
|
|
@@ -639,7 +655,7 @@ const DataTableImpl = React.forwardRef(function DataTable(props, ref) {
|
|
|
639
655
|
if (c.width != null)
|
|
640
656
|
items.push({
|
|
641
657
|
label: isPinned(c) ? t.unpin : t.pin,
|
|
642
|
-
icon: isPinned(c) ?
|
|
658
|
+
icon: isPinned(c) ? /* @__PURE__ */ React.createElement(IconPinOff, null) : /* @__PURE__ */ React.createElement(IconPin, null),
|
|
643
659
|
onSelect: function() {
|
|
644
660
|
togglePin(c.key);
|
|
645
661
|
}
|
|
@@ -648,7 +664,7 @@ const DataTableImpl = React.forwardRef(function DataTable(props, ref) {
|
|
|
648
664
|
items.push(
|
|
649
665
|
{
|
|
650
666
|
label: t.moveLeft,
|
|
651
|
-
icon:
|
|
667
|
+
icon: /* @__PURE__ */ React.createElement(IconArrowLeft, null),
|
|
652
668
|
disabled: gi <= 0,
|
|
653
669
|
onSelect: function() {
|
|
654
670
|
moveCol(c.key, -1);
|
|
@@ -656,7 +672,7 @@ const DataTableImpl = React.forwardRef(function DataTable(props, ref) {
|
|
|
656
672
|
},
|
|
657
673
|
{
|
|
658
674
|
label: t.moveRight,
|
|
659
|
-
icon:
|
|
675
|
+
icon: /* @__PURE__ */ React.createElement(IconArrowRight, null),
|
|
660
676
|
disabled: gi >= group.length - 1,
|
|
661
677
|
onSelect: function() {
|
|
662
678
|
moveCol(c.key, 1);
|
|
@@ -667,7 +683,7 @@ const DataTableImpl = React.forwardRef(function DataTable(props, ref) {
|
|
|
667
683
|
{ separator: true },
|
|
668
684
|
{
|
|
669
685
|
label: t.hideColumn,
|
|
670
|
-
icon:
|
|
686
|
+
icon: /* @__PURE__ */ React.createElement(IconEyeOff, null),
|
|
671
687
|
disabled: shown.length <= 1,
|
|
672
688
|
onSelect: function() {
|
|
673
689
|
setHidden(c.key, true);
|
|
@@ -688,7 +704,7 @@ const DataTableImpl = React.forwardRef(function DataTable(props, ref) {
|
|
|
688
704
|
setHidden(k, on);
|
|
689
705
|
}
|
|
690
706
|
};
|
|
691
|
-
}).concat([{ separator: true }, { label: t.resetColumns, icon:
|
|
707
|
+
}).concat([{ separator: true }, { label: t.resetColumns, icon: /* @__PURE__ */ React.createElement(IconRotateCcw, null), onSelect: resetColumns }]);
|
|
692
708
|
}
|
|
693
709
|
function openMenu(kind, key, anchor, rc) {
|
|
694
710
|
setMenu({ kind, key, anchor, rc });
|
|
@@ -864,8 +880,14 @@ const DataTableImpl = React.forwardRef(function DataTable(props, ref) {
|
|
|
864
880
|
}
|
|
865
881
|
},
|
|
866
882
|
c.label,
|
|
867
|
-
/* @__PURE__ */ React.createElement(
|
|
868
|
-
|
|
883
|
+
/* @__PURE__ */ React.createElement(
|
|
884
|
+
Icon,
|
|
885
|
+
{
|
|
886
|
+
name: isSorted ? sort.dir === "desc" ? /* @__PURE__ */ React.createElement(IconArrowDown, null) : /* @__PURE__ */ React.createElement(IconArrowUp, null) : /* @__PURE__ */ React.createElement(IconArrowUpDown, null),
|
|
887
|
+
size: 12
|
|
888
|
+
}
|
|
889
|
+
)
|
|
890
|
+
) : /* @__PURE__ */ React.createElement("span", { className: cx("aura-table__th-label", !c.label && "aura-sr-only") }, c.label || (c.actions ? t.actions : c.key)), pin ? /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconPin, null), size: 12, className: "aura-table__pin-icon", label: t.pinned }) : null, controls ? /* @__PURE__ */ React.createElement(
|
|
869
891
|
"button",
|
|
870
892
|
{
|
|
871
893
|
type: "button",
|
|
@@ -879,7 +901,7 @@ const DataTableImpl = React.forwardRef(function DataTable(props, ref) {
|
|
|
879
901
|
openMenu("col", c.key, e.currentTarget, { r: 0, c: ci });
|
|
880
902
|
}
|
|
881
903
|
},
|
|
882
|
-
/* @__PURE__ */ React.createElement(Icon, { name:
|
|
904
|
+
/* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconEllipsis, null) })
|
|
883
905
|
) : null),
|
|
884
906
|
canResize(c) ? /* @__PURE__ */ React.createElement(
|
|
885
907
|
"span",
|
|
@@ -1032,7 +1054,7 @@ const DataTableImpl = React.forwardRef(function DataTable(props, ref) {
|
|
|
1032
1054
|
}
|
|
1033
1055
|
} else if (!rows.length) {
|
|
1034
1056
|
const em = props.empty || {};
|
|
1035
|
-
body = /* @__PURE__ */ React.createElement("div", { className: "aura-table__empty", role: "row" }, /* @__PURE__ */ React.createElement("div", { role: "gridcell" }, /* @__PURE__ */ React.createElement("span", { className: "aura-table__empty-icon" }, /* @__PURE__ */ React.createElement(Icon, { name: em.icon ||
|
|
1057
|
+
body = /* @__PURE__ */ React.createElement("div", { className: "aura-table__empty", role: "row" }, /* @__PURE__ */ React.createElement("div", { role: "gridcell" }, /* @__PURE__ */ React.createElement("span", { className: "aura-table__empty-icon" }, /* @__PURE__ */ React.createElement(Icon, { name: em.icon || /* @__PURE__ */ React.createElement(IconInbox, null), size: "lg" })), /* @__PURE__ */ React.createElement("p", { className: "aura-table__empty-title" }, em.title || t.empty), em.description ? /* @__PURE__ */ React.createElement("p", { className: "aura-table__empty-text" }, em.description) : null, em.action ? /* @__PURE__ */ React.createElement("div", { className: "aura-table__empty-action" }, em.action) : null));
|
|
1036
1058
|
} else {
|
|
1037
1059
|
const bodyRows = body = [];
|
|
1038
1060
|
if (virtual && start > 0)
|
|
@@ -1083,7 +1105,7 @@ const DataTableImpl = React.forwardRef(function DataTable(props, ref) {
|
|
|
1083
1105
|
}
|
|
1084
1106
|
let foot = null;
|
|
1085
1107
|
function pagerButton(dir) {
|
|
1086
|
-
const p = page + dir, off = busy || (dir < 0 ? page <= 1 : page >= pageCount), label = dir < 0 ? t.prevPage : t.nextPage, icon = dir < 0 ?
|
|
1108
|
+
const p = page + dir, off = busy || (dir < 0 ? page <= 1 : page >= pageCount), label = dir < 0 ? t.prevPage : t.nextPage, icon = dir < 0 ? /* @__PURE__ */ React.createElement(IconChevronLeft, null) : /* @__PURE__ */ React.createElement(IconChevronRight, null);
|
|
1087
1109
|
if (props.getPageHref && !off)
|
|
1088
1110
|
return /* @__PURE__ */ React.createElement(
|
|
1089
1111
|
Link,
|
|
@@ -1248,7 +1270,7 @@ const DataTableImpl = React.forwardRef(function DataTable(props, ref) {
|
|
|
1248
1270
|
controls ? /* @__PURE__ */ React.createElement("div", { className: "aura-table__picker" }, /* @__PURE__ */ React.createElement(
|
|
1249
1271
|
IconButton,
|
|
1250
1272
|
{
|
|
1251
|
-
icon:
|
|
1273
|
+
icon: /* @__PURE__ */ React.createElement(IconColumns3, null),
|
|
1252
1274
|
label: t.showHideColumns,
|
|
1253
1275
|
"aria-haspopup": "menu",
|
|
1254
1276
|
onClick: function(e) {
|
package/dist/esm/DatePicker.js
CHANGED
|
@@ -6,6 +6,7 @@ import { cx, uid, useMaybeControlled, useMounted, useIsoLayoutEffect, trapTab, u
|
|
|
6
6
|
import { Icon } from "./Icon.js";
|
|
7
7
|
import { IconButton } from "./IconButton.js";
|
|
8
8
|
import { Field } from "./Field.js";
|
|
9
|
+
import { IconCalendar, IconChevronDown, IconChevronLeft, IconChevronRight, IconX } from "./icons.js";
|
|
9
10
|
import {
|
|
10
11
|
ERA,
|
|
11
12
|
addDays,
|
|
@@ -142,7 +143,7 @@ const Calendar = React.forwardRef(function Calendar2(props, ref) {
|
|
|
142
143
|
return /* @__PURE__ */ React.createElement("div", { className: "aura-cal", ref: gridMerged, key: gridKey }, /* @__PURE__ */ React.createElement("div", { className: "aura-cal__head" }, /* @__PURE__ */ React.createElement(
|
|
143
144
|
IconButton,
|
|
144
145
|
{
|
|
145
|
-
icon:
|
|
146
|
+
icon: /* @__PURE__ */ React.createElement(IconChevronLeft, null),
|
|
146
147
|
label: dt.prevYears,
|
|
147
148
|
onClick: function() {
|
|
148
149
|
setFocus(new Date(yr - 12, focusDate.getMonth(), 1));
|
|
@@ -161,7 +162,7 @@ const Calendar = React.forwardRef(function Calendar2(props, ref) {
|
|
|
161
162
|
), /* @__PURE__ */ React.createElement(
|
|
162
163
|
IconButton,
|
|
163
164
|
{
|
|
164
|
-
icon:
|
|
165
|
+
icon: /* @__PURE__ */ React.createElement(IconChevronRight, null),
|
|
165
166
|
label: dt.nextYears,
|
|
166
167
|
onClick: function() {
|
|
167
168
|
setFocus(new Date(yr + 12, focusDate.getMonth(), 1));
|
|
@@ -189,7 +190,7 @@ const Calendar = React.forwardRef(function Calendar2(props, ref) {
|
|
|
189
190
|
return /* @__PURE__ */ React.createElement("div", { className: "aura-cal", ref: gridMerged, key: gridKey }, /* @__PURE__ */ React.createElement("div", { className: "aura-cal__head" }, /* @__PURE__ */ React.createElement(
|
|
190
191
|
IconButton,
|
|
191
192
|
{
|
|
192
|
-
icon:
|
|
193
|
+
icon: /* @__PURE__ */ React.createElement(IconChevronLeft, null),
|
|
193
194
|
label: dt.prevMonth,
|
|
194
195
|
onClick: function() {
|
|
195
196
|
setFocus(addMonths(focusDate, -1));
|
|
@@ -206,11 +207,11 @@ const Calendar = React.forwardRef(function Calendar2(props, ref) {
|
|
|
206
207
|
}
|
|
207
208
|
},
|
|
208
209
|
monthTitle,
|
|
209
|
-
/* @__PURE__ */ React.createElement(Icon, { name:
|
|
210
|
+
/* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconChevronDown, null), size: 14 })
|
|
210
211
|
), /* @__PURE__ */ React.createElement(
|
|
211
212
|
IconButton,
|
|
212
213
|
{
|
|
213
|
-
icon:
|
|
214
|
+
icon: /* @__PURE__ */ React.createElement(IconChevronRight, null),
|
|
214
215
|
label: dt.nextMonth,
|
|
215
216
|
onClick: function() {
|
|
216
217
|
setFocus(addMonths(focusDate, 1));
|
|
@@ -388,7 +389,7 @@ function DateField(props) {
|
|
|
388
389
|
"aria-label": props.clearLabel,
|
|
389
390
|
onClick: props.onClear
|
|
390
391
|
},
|
|
391
|
-
/* @__PURE__ */ React.createElement(Icon, { name:
|
|
392
|
+
/* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconX, null) })
|
|
392
393
|
) : null, /* @__PURE__ */ React.createElement(
|
|
393
394
|
"button",
|
|
394
395
|
{
|
|
@@ -403,7 +404,7 @@ function DateField(props) {
|
|
|
403
404
|
props.onToggle(!props.open);
|
|
404
405
|
}
|
|
405
406
|
},
|
|
406
|
-
/* @__PURE__ */ React.createElement(Icon, { name:
|
|
407
|
+
/* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconCalendar, null) })
|
|
407
408
|
))
|
|
408
409
|
);
|
|
409
410
|
}
|
package/dist/esm/Dialog.js
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { useStrings, useDensity } from "./locale.js";
|
|
4
4
|
import { createPortal } from "react-dom";
|
|
5
|
-
import { cx, uid, useMergedRef } from "./internal.js";
|
|
5
|
+
import { cx, omit, uid, useMergedRef } from "./internal.js";
|
|
6
6
|
import { IconButton } from "./IconButton.js";
|
|
7
7
|
import { useModal } from "./useModal.js";
|
|
8
|
+
import { IconX } from "./icons.js";
|
|
8
9
|
const Dialog = React.forwardRef(function Dialog2(props, ref) {
|
|
9
10
|
const t = useStrings();
|
|
10
11
|
const density = useDensity();
|
|
@@ -42,7 +43,7 @@ const Dialog = React.forwardRef(function Dialog2(props, ref) {
|
|
|
42
43
|
tabIndex: -1,
|
|
43
44
|
className: cx("aura-dialog", "aura-dialog--" + (props.size || "md"), props.className)
|
|
44
45
|
},
|
|
45
|
-
/* @__PURE__ */ React.createElement("div", { className: "aura-dialog__head" }, /* @__PURE__ */ React.createElement("h2", { className: "aura-dialog__title", id: titleId }, props.title), props.dismissible !== false ? /* @__PURE__ */ React.createElement(IconButton, { icon:
|
|
46
|
+
/* @__PURE__ */ React.createElement("div", { className: "aura-dialog__head" }, /* @__PURE__ */ React.createElement("h2", { className: "aura-dialog__title", id: titleId }, props.title), props.dismissible !== false ? /* @__PURE__ */ React.createElement(IconButton, { icon: /* @__PURE__ */ React.createElement(IconX, null), label: t.close, className: "aura-dialog__close", onClick: close }) : null),
|
|
46
47
|
props.description ? /* @__PURE__ */ React.createElement("p", { className: "aura-dialog__desc", id: descId }, props.description) : null,
|
|
47
48
|
props.children ? /* @__PURE__ */ React.createElement("div", { className: "aura-dialog__body" }, props.children) : null,
|
|
48
49
|
props.footer ? /* @__PURE__ */ React.createElement("div", { className: "aura-dialog__foot" }, props.footer) : null
|
|
@@ -65,6 +66,25 @@ const Drawer = React.forwardRef(function Drawer2(props, ref) {
|
|
|
65
66
|
});
|
|
66
67
|
if (!modal.ready) return null;
|
|
67
68
|
const side = props.side === "left" ? "left" : "right";
|
|
69
|
+
const rest = omit(props, [
|
|
70
|
+
"open",
|
|
71
|
+
"onClose",
|
|
72
|
+
"side",
|
|
73
|
+
"size",
|
|
74
|
+
"title",
|
|
75
|
+
"description",
|
|
76
|
+
"children",
|
|
77
|
+
"footer",
|
|
78
|
+
"dismissible",
|
|
79
|
+
"dismissOnScrim",
|
|
80
|
+
"autoFocus",
|
|
81
|
+
"aria-label",
|
|
82
|
+
"aria-describedby",
|
|
83
|
+
"aria-labelledby",
|
|
84
|
+
"className",
|
|
85
|
+
"closeLabel",
|
|
86
|
+
"closeProps"
|
|
87
|
+
]);
|
|
68
88
|
const drawerScrimCloses = props.dismissible !== false && props.dismissOnScrim !== false;
|
|
69
89
|
return createPortal(
|
|
70
90
|
/* @__PURE__ */ React.createElement("div", { className: "aura-dialog-layer aura-drawer-layer", "data-density": density, onKeyDown: modal.onKeyDown }, /* @__PURE__ */ React.createElement(
|
|
@@ -80,16 +100,29 @@ const Drawer = React.forwardRef(function Drawer2(props, ref) {
|
|
|
80
100
|
), /* @__PURE__ */ React.createElement(
|
|
81
101
|
"div",
|
|
82
102
|
{
|
|
103
|
+
...rest,
|
|
83
104
|
ref: merged,
|
|
84
105
|
role: "dialog",
|
|
85
106
|
"aria-modal": true,
|
|
86
|
-
"aria-labelledby": props.title ? titleId :
|
|
107
|
+
"aria-labelledby": props.title ? titleId : props["aria-labelledby"],
|
|
87
108
|
"aria-label": props.title ? void 0 : props["aria-label"],
|
|
88
|
-
"aria-describedby": props.description ? descId : void 0,
|
|
109
|
+
"aria-describedby": cx(props.description ? descId : "", props["aria-describedby"]) || void 0,
|
|
89
110
|
tabIndex: -1,
|
|
90
111
|
className: cx("aura-drawer", "aura-drawer--" + side, "aura-drawer--" + (props.size || "md"), props.className)
|
|
91
112
|
},
|
|
92
|
-
props.title || props.dismissible !== false ? /* @__PURE__ */ React.createElement("div", { className: "aura-drawer__head" }, props.title ? /* @__PURE__ */ React.createElement("h2", { className: "aura-drawer__title", id: titleId }, props.title) : /* @__PURE__ */ React.createElement("span", { style: { flex: 1 } }), props.dismissible !== false ? /* @__PURE__ */ React.createElement(
|
|
113
|
+
props.title || props.dismissible !== false ? /* @__PURE__ */ React.createElement("div", { className: "aura-drawer__head" }, props.title ? /* @__PURE__ */ React.createElement("h2", { className: "aura-drawer__title", id: titleId }, props.title) : /* @__PURE__ */ React.createElement("span", { style: { flex: 1 } }), props.dismissible !== false ? /* @__PURE__ */ React.createElement(
|
|
114
|
+
IconButton,
|
|
115
|
+
{
|
|
116
|
+
...props.closeProps,
|
|
117
|
+
icon: /* @__PURE__ */ React.createElement(IconX, null),
|
|
118
|
+
label: props.closeLabel || t.close,
|
|
119
|
+
onClick: function(e) {
|
|
120
|
+
const own2 = props.closeProps && props.closeProps.onClick;
|
|
121
|
+
if (own2) own2(e);
|
|
122
|
+
if (!e.defaultPrevented) close();
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
) : null) : null,
|
|
93
126
|
props.description ? /* @__PURE__ */ React.createElement("p", { className: "aura-drawer__desc", id: descId }, props.description) : null,
|
|
94
127
|
/* @__PURE__ */ React.createElement("div", { className: "aura-drawer__body" }, props.children),
|
|
95
128
|
props.footer ? /* @__PURE__ */ React.createElement("div", { className: "aura-drawer__foot" }, props.footer) : null
|
package/dist/esm/DropdownMenu.js
CHANGED
|
@@ -11,7 +11,7 @@ const DropdownMenu = React.forwardRef(function DropdownMenu2(props, ref) {
|
|
|
11
11
|
function() {
|
|
12
12
|
if (!anchor || !toLast.current || !menuRef.current) return;
|
|
13
13
|
toLast.current = false;
|
|
14
|
-
const list = menuRef.current.querySelectorAll('[role^="menuitem"]
|
|
14
|
+
const list = menuRef.current.querySelectorAll('[role^="menuitem"]');
|
|
15
15
|
if (list.length) list[list.length - 1].focus();
|
|
16
16
|
},
|
|
17
17
|
[anchor]
|
package/dist/esm/Field.js
CHANGED
|
@@ -3,6 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
import { Icon } from "./Icon.js";
|
|
4
4
|
import { cx } from "./internal.js";
|
|
5
5
|
import { useStrings } from "./locale.js";
|
|
6
|
+
import { IconCircleAlert } from "./icons.js";
|
|
6
7
|
const h = React.createElement;
|
|
7
8
|
const Field = React.forwardRef(function Field2(props, ref) {
|
|
8
9
|
const t = useStrings();
|
|
@@ -20,7 +21,7 @@ const Field = React.forwardRef(function Field2(props, ref) {
|
|
|
20
21
|
props.optional ? /* @__PURE__ */ React.createElement("span", { className: "aura-field__opt" }, " (" + t.optional + ")") : null
|
|
21
22
|
) : null,
|
|
22
23
|
props.children,
|
|
23
|
-
props.error ? /* @__PURE__ */ React.createElement("p", { className: "aura-field__error", id: props.id + "-error" }, /* @__PURE__ */ React.createElement(Icon, { name:
|
|
24
|
+
props.error ? /* @__PURE__ */ React.createElement("p", { className: "aura-field__error", id: props.id + "-error" }, /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconCircleAlert, null), size: 14 }), props.error) : props.hint ? /* @__PURE__ */ React.createElement("p", { className: "aura-field__hint", id: props.id + "-hint" }, props.hint) : null
|
|
24
25
|
);
|
|
25
26
|
});
|
|
26
27
|
function describedBy(id, p) {
|
package/dist/esm/FileUpload.js
CHANGED
|
@@ -6,6 +6,7 @@ import { Icon } from "./Icon.js";
|
|
|
6
6
|
import { IconButton } from "./IconButton.js";
|
|
7
7
|
import { Field } from "./Field.js";
|
|
8
8
|
import { formatBytes } from "./text.js";
|
|
9
|
+
import { IconCircleAlert, IconCircleCheck, IconCloudUpload, IconFile, IconImage, IconX } from "./icons.js";
|
|
9
10
|
function matches(file, accept) {
|
|
10
11
|
if (!accept) return true;
|
|
11
12
|
const name = (file.name || "").toLowerCase(), type = (file.type || "").toLowerCase();
|
|
@@ -139,7 +140,7 @@ const FileUpload = React.forwardRef(function FileUpload2(props, ref) {
|
|
|
139
140
|
add(e.dataTransfer && e.dataTransfer.files);
|
|
140
141
|
}
|
|
141
142
|
},
|
|
142
|
-
/* @__PURE__ */ React.createElement(Icon, { name:
|
|
143
|
+
/* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconCloudUpload, null), size: "lg", className: "aura-upload__icon" }),
|
|
143
144
|
/* @__PURE__ */ React.createElement("span", { className: "aura-upload__text" }, t.dropFiles, " "),
|
|
144
145
|
/* @__PURE__ */ React.createElement(
|
|
145
146
|
"input",
|
|
@@ -168,7 +169,7 @@ const FileUpload = React.forwardRef(function FileUpload2(props, ref) {
|
|
|
168
169
|
),
|
|
169
170
|
items.length ? /* @__PURE__ */ React.createElement("ul", { className: "aura-upload__list", "aria-live": "polite" }, items.map(function(it) {
|
|
170
171
|
const src = thumb(it);
|
|
171
|
-
return /* @__PURE__ */ React.createElement("li", { key: it.id, className: cx("aura-upload__item", it.error && "is-error") }, src ? /* @__PURE__ */ React.createElement("img", { className: "aura-upload__thumb", src, alt: "" }) : /* @__PURE__ */ React.createElement("span", { className: "aura-upload__thumb is-icon", "aria-hidden": true }, /* @__PURE__ */ React.createElement(Icon, { name: /^image\//.test(it.type || "") ?
|
|
172
|
+
return /* @__PURE__ */ React.createElement("li", { key: it.id, className: cx("aura-upload__item", it.error && "is-error") }, src ? /* @__PURE__ */ React.createElement("img", { className: "aura-upload__thumb", src, alt: "" }) : /* @__PURE__ */ React.createElement("span", { className: "aura-upload__thumb is-icon", "aria-hidden": true }, /* @__PURE__ */ React.createElement(Icon, { name: /^image\//.test(it.type || "") ? /* @__PURE__ */ React.createElement(IconImage, null) : /* @__PURE__ */ React.createElement(IconFile, null), size: "md" })), /* @__PURE__ */ React.createElement("span", { className: "aura-upload__meta" }, it.url && !it.error ? /* @__PURE__ */ React.createElement("a", { className: "aura-upload__name", href: it.url, target: "_blank", rel: "noreferrer" }, it.name) : /* @__PURE__ */ React.createElement("span", { className: "aura-upload__name" }, it.name), /* @__PURE__ */ React.createElement("span", { className: "aura-upload__sub" }, it.error ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconCircleAlert, null), size: 12 }), it.error) : it.status === "uploading" ? t.uploading + (it.progress != null ? " " + Math.round(it.progress) + "%" : "") : it.status === "done" ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconCircleCheck, null), size: 12 }), formatBytes(it.size)) : formatBytes(it.size)), it.status === "uploading" ? /* @__PURE__ */ React.createElement(
|
|
172
173
|
"span",
|
|
173
174
|
{
|
|
174
175
|
className: "aura-upload__bar",
|
|
@@ -182,7 +183,7 @@ const FileUpload = React.forwardRef(function FileUpload2(props, ref) {
|
|
|
182
183
|
) : null), /* @__PURE__ */ React.createElement(
|
|
183
184
|
IconButton,
|
|
184
185
|
{
|
|
185
|
-
icon:
|
|
186
|
+
icon: /* @__PURE__ */ React.createElement(IconX, null),
|
|
186
187
|
label: t.remove(it.name),
|
|
187
188
|
onClick: function() {
|
|
188
189
|
remove(it);
|
package/dist/esm/FilterBar.js
CHANGED
|
@@ -5,6 +5,7 @@ import { IconButton } from "./IconButton.js";
|
|
|
5
5
|
import { Tag } from "./Tag.js";
|
|
6
6
|
import { cx, uid } from "./internal.js";
|
|
7
7
|
import { useStrings } from "./locale.js";
|
|
8
|
+
import { IconSearch, IconX } from "./icons.js";
|
|
8
9
|
const FilterBar = React.forwardRef(function FilterBar2(props, ref) {
|
|
9
10
|
const t = useStrings();
|
|
10
11
|
const id = uid();
|
|
@@ -56,7 +57,7 @@ const FilterBar = React.forwardRef(function FilterBar2(props, ref) {
|
|
|
56
57
|
"aria-label": props.label || t.filters,
|
|
57
58
|
className: cx("aura-filterbar", props.className)
|
|
58
59
|
},
|
|
59
|
-
/* @__PURE__ */ React.createElement("div", { className: "aura-filterbar__row" }, hasSearch ? /* @__PURE__ */ React.createElement("div", { className: "aura-input has-icon aura-filterbar__search" }, /* @__PURE__ */ React.createElement(Icon, { name:
|
|
60
|
+
/* @__PURE__ */ React.createElement("div", { className: "aura-filterbar__row" }, hasSearch ? /* @__PURE__ */ React.createElement("div", { className: "aura-input has-icon aura-filterbar__search" }, /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconSearch, null), className: "aura-input__icon" }), /* @__PURE__ */ React.createElement(
|
|
60
61
|
"input",
|
|
61
62
|
{
|
|
62
63
|
id,
|
|
@@ -80,7 +81,7 @@ const FilterBar = React.forwardRef(function FilterBar2(props, ref) {
|
|
|
80
81
|
), draft[0] ? /* @__PURE__ */ React.createElement(
|
|
81
82
|
IconButton,
|
|
82
83
|
{
|
|
83
|
-
icon:
|
|
84
|
+
icon: /* @__PURE__ */ React.createElement(IconX, null),
|
|
84
85
|
label: t.clear((props.searchLabel || t.search).toLowerCase()),
|
|
85
86
|
className: "aura-filterbar__clear-search",
|
|
86
87
|
onClick: function() {
|
|
@@ -3,6 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
import { Icon } from "./Icon.js";
|
|
4
4
|
import { cx, uid } from "./internal.js";
|
|
5
5
|
import { useStrings } from "./locale.js";
|
|
6
|
+
import { IconCircleAlert } from "./icons.js";
|
|
6
7
|
function items(errors) {
|
|
7
8
|
if (Array.isArray(errors)) return errors;
|
|
8
9
|
const out = [];
|
|
@@ -97,7 +98,7 @@ const FormErrorSummary = React.forwardRef(
|
|
|
97
98
|
"aria-labelledby": id + "-title",
|
|
98
99
|
className: cx("aura-alert aura-alert--danger aura-error-summary", props.className)
|
|
99
100
|
},
|
|
100
|
-
/* @__PURE__ */ React.createElement(Icon, { name:
|
|
101
|
+
/* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconCircleAlert, null), className: "aura-alert__icon" }),
|
|
101
102
|
/* @__PURE__ */ React.createElement("div", { className: "aura-alert__body" }, /* @__PURE__ */ React.createElement("h2", { className: "aura-alert__title", id: id + "-title" }, props.title || t.errorSummary(list.length)), /* @__PURE__ */ React.createElement("ul", { className: "aura-error-summary__list" }, list.map(function(e) {
|
|
102
103
|
return /* @__PURE__ */ React.createElement("li", { key: e.field }, /* @__PURE__ */ React.createElement(
|
|
103
104
|
"a",
|