@jirawatpyk/aura-react 5.7.3 → 5.9.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 +40 -0
- package/dist/aura.bundle.js +1751 -1208
- package/dist/cjs/index.cjs +1751 -1208
- package/dist/esm/Accordion.js +2 -1
- package/dist/esm/Alert.js +7 -19
- package/dist/esm/AppShell.js +2 -1
- package/dist/esm/Badge.js +2 -19
- package/dist/esm/Breadcrumb.js +2 -1
- package/dist/esm/Button.js +17 -17
- package/dist/esm/Card.js +2 -19
- 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/EmptyState.js +2 -15
- 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 +2 -1
- 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/StatusPill.js +4 -14
- package/dist/esm/Stepper.js +2 -1
- package/dist/esm/Table.js +104 -11
- package/dist/esm/Tabs.js +79 -9
- 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 +33 -0
- package/dist/esm/colorScheme.js +8 -1
- package/dist/esm/display.js +155 -0
- package/dist/esm/iconSvg.js +53 -0
- package/dist/esm/icons.js +531 -0
- package/dist/esm/index.js +4 -1
- package/dist/esm/internal.js +1 -27
- 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 +69 -6
- package/dist/index.d.ts +69 -6
- 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 +618 -275
- package/dist/server/index.d.cts +141 -0
- package/dist/server/index.d.ts +141 -0
- package/dist/server/index.js +608 -275
- package/dist/styles.css +35 -0
- package/dist/styles.layer.css +35 -0
- 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
|
@@ -1,28 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { Icon } from "./Icon.js";
|
|
4
3
|
import { IconButton } from "./IconButton.js";
|
|
5
|
-
import {
|
|
4
|
+
import { alertElement } from "./display.js";
|
|
6
5
|
import { useStrings } from "./locale.js";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
success: "circle-check",
|
|
10
|
-
warning: "triangle-alert",
|
|
11
|
-
danger: "circle-alert"
|
|
12
|
-
};
|
|
6
|
+
import { IconX } from "./icons.js";
|
|
7
|
+
import { ALERT_ICON } from "./display.js";
|
|
13
8
|
const Alert = React.forwardRef(function Alert2(props, ref) {
|
|
14
9
|
const t = useStrings();
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
{
|
|
19
|
-
ref,
|
|
20
|
-
className: cx("aura-alert", "aura-alert--" + tone, props.className),
|
|
21
|
-
role: tone === "danger" || tone === "warning" ? "alert" : "status"
|
|
22
|
-
},
|
|
23
|
-
/* @__PURE__ */ React.createElement(Icon, { name: ALERT_ICON[tone], className: "aura-alert__icon" }),
|
|
24
|
-
/* @__PURE__ */ React.createElement("div", { className: "aura-alert__body" }, props.title ? /* @__PURE__ */ React.createElement("p", { className: "aura-alert__title" }, props.title) : null, props.children ? /* @__PURE__ */ React.createElement("div", { className: "aura-alert__text" }, props.children) : null, props.action ? /* @__PURE__ */ React.createElement("div", { className: "aura-alert__action" }, props.action) : null),
|
|
25
|
-
props.onDismiss ? /* @__PURE__ */ React.createElement(IconButton, { icon: "x", label: t.dismiss, className: "aura-alert__close", onClick: props.onDismiss }) : null
|
|
10
|
+
return alertElement(
|
|
11
|
+
props,
|
|
12
|
+
ref,
|
|
13
|
+
props.onDismiss ? /* @__PURE__ */ React.createElement(IconButton, { icon: /* @__PURE__ */ React.createElement(IconX, null), label: t.dismiss, className: "aura-alert__close", onClick: props.onDismiss }) : null
|
|
26
14
|
);
|
|
27
15
|
});
|
|
28
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/Badge.js
CHANGED
|
@@ -1,25 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { cx, omit, tone } from "./internal.js";
|
|
3
|
+
import { badgeElement } from "./display.js";
|
|
5
4
|
const Badge = React.forwardRef(function Badge2(props, ref) {
|
|
6
|
-
|
|
7
|
-
return /* @__PURE__ */ React.createElement(
|
|
8
|
-
"span",
|
|
9
|
-
{
|
|
10
|
-
...rest,
|
|
11
|
-
ref,
|
|
12
|
-
className: cx(
|
|
13
|
-
"aura-badge",
|
|
14
|
-
"aura-badge--" + tone(props.tone),
|
|
15
|
-
props.variant === "solid" && "is-solid",
|
|
16
|
-
props.variant === "outline" && "is-outline",
|
|
17
|
-
props.className
|
|
18
|
-
)
|
|
19
|
-
},
|
|
20
|
-
props.icon ? /* @__PURE__ */ React.createElement(Icon, { name: props.icon, size: 12 }) : null,
|
|
21
|
-
props.children
|
|
22
|
-
);
|
|
5
|
+
return badgeElement(props, ref);
|
|
23
6
|
});
|
|
24
7
|
export {
|
|
25
8
|
Badge
|
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
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { omit } from "./internal.js";
|
|
4
|
+
import { buttonClass } from "./display.js";
|
|
4
5
|
import { Icon } from "./Icon.js";
|
|
5
6
|
import { useLinkComponent } from "./locale.js";
|
|
7
|
+
import { IconLoaderCircle } from "./icons.js";
|
|
6
8
|
function ButtonLink(props, ref, Link) {
|
|
7
9
|
const variant = props.variant || "primary";
|
|
8
10
|
const disabled = !!props.disabled;
|
|
@@ -28,13 +30,12 @@ function ButtonLink(props, ref, Link) {
|
|
|
28
30
|
role: disabled ? "link" : void 0,
|
|
29
31
|
"aria-disabled": disabled || void 0,
|
|
30
32
|
tabIndex: disabled ? -1 : props.tabIndex,
|
|
31
|
-
className:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
props.
|
|
35
|
-
props.
|
|
36
|
-
|
|
37
|
-
),
|
|
33
|
+
className: buttonClass({
|
|
34
|
+
variant,
|
|
35
|
+
size: props.size,
|
|
36
|
+
fullWidth: props.fullWidth,
|
|
37
|
+
className: props.className
|
|
38
|
+
}),
|
|
38
39
|
onClick: disabled ? void 0 : props.onClick
|
|
39
40
|
},
|
|
40
41
|
props.icon ? /* @__PURE__ */ React.createElement(Icon, { name: props.icon }) : null,
|
|
@@ -69,21 +70,20 @@ const Button = React.forwardRef(
|
|
|
69
70
|
...rest,
|
|
70
71
|
ref,
|
|
71
72
|
type: props.type || "button",
|
|
72
|
-
className:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
props.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
),
|
|
73
|
+
className: buttonClass({
|
|
74
|
+
variant,
|
|
75
|
+
size: props.size,
|
|
76
|
+
fullWidth: props.fullWidth,
|
|
77
|
+
loading,
|
|
78
|
+
className: props.className
|
|
79
|
+
}),
|
|
80
80
|
"aria-busy": loading || void 0,
|
|
81
81
|
"aria-disabled": loading || void 0,
|
|
82
82
|
onClick: loading ? function(e) {
|
|
83
83
|
e.preventDefault();
|
|
84
84
|
} : props.onClick
|
|
85
85
|
},
|
|
86
|
-
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,
|
|
87
87
|
props.children,
|
|
88
88
|
props.iconRight && !loading ? /* @__PURE__ */ React.createElement(Icon, { name: props.iconRight }) : null
|
|
89
89
|
);
|
package/dist/esm/Card.js
CHANGED
|
@@ -1,25 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import {
|
|
4
|
-
const h = React.createElement;
|
|
3
|
+
import { cardElement } from "./display.js";
|
|
5
4
|
const Card = React.forwardRef(function Card2(props, ref) {
|
|
6
|
-
|
|
7
|
-
return h(
|
|
8
|
-
props.as || "section",
|
|
9
|
-
{
|
|
10
|
-
ref,
|
|
11
|
-
className: cx(
|
|
12
|
-
"aura-card",
|
|
13
|
-
creative && "aura-card--creative",
|
|
14
|
-
props.interactive && "is-interactive",
|
|
15
|
-
props.className
|
|
16
|
-
),
|
|
17
|
-
"aria-labelledby": props.title && props.titleId ? props.titleId : void 0
|
|
18
|
-
},
|
|
19
|
-
props.title || props.actions ? /* @__PURE__ */ React.createElement("div", { className: "aura-card__head" }, /* @__PURE__ */ React.createElement("div", { className: "aura-card__heading" }, props.title ? h("h" + (props.headingLevel || 3), { className: "aura-card__title", id: props.titleId }, props.title) : null, props.description ? /* @__PURE__ */ React.createElement("p", { className: "aura-card__desc" }, props.description) : null), props.actions ? /* @__PURE__ */ React.createElement("div", { className: "aura-card__actions" }, props.actions) : null) : null,
|
|
20
|
-
props.children ? /* @__PURE__ */ React.createElement("div", { className: "aura-card__body" }, props.children) : null,
|
|
21
|
-
props.footer ? /* @__PURE__ */ React.createElement("div", { className: "aura-card__foot" }, props.footer) : null
|
|
22
|
-
);
|
|
5
|
+
return cardElement(props, ref);
|
|
23
6
|
});
|
|
24
7
|
export {
|
|
25
8
|
Card
|
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/EmptyState.js
CHANGED
|
@@ -1,21 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { cx } from "./internal.js";
|
|
5
|
-
const h = React.createElement;
|
|
3
|
+
import { emptyStateElement } from "./display.js";
|
|
6
4
|
const EmptyState = React.forwardRef(function EmptyState2(props, ref) {
|
|
7
|
-
|
|
8
|
-
return /* @__PURE__ */ React.createElement(
|
|
9
|
-
"div",
|
|
10
|
-
{
|
|
11
|
-
ref,
|
|
12
|
-
className: cx("aura-empty", props.size === "sm" && "is-sm", props.bordered && "is-bordered", props.className)
|
|
13
|
-
},
|
|
14
|
-
/* @__PURE__ */ React.createElement("span", { className: "aura-empty__icon", "aria-hidden": true }, /* @__PURE__ */ React.createElement(Icon, { name: props.icon || "inbox", size: props.size === "sm" ? "md" : "lg" })),
|
|
15
|
-
/* @__PURE__ */ React.createElement(HT, { className: "aura-empty__title" }, props.title),
|
|
16
|
-
props.description ? /* @__PURE__ */ React.createElement("p", { className: "aura-empty__text" }, props.description) : null,
|
|
17
|
-
props.action ? /* @__PURE__ */ React.createElement("div", { className: "aura-empty__action" }, props.action) : null
|
|
18
|
-
);
|
|
5
|
+
return emptyStateElement(props, ref);
|
|
19
6
|
});
|
|
20
7
|
export {
|
|
21
8
|
EmptyState
|