@jirawatpyk/aura-react 5.43.0 → 5.45.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 +25 -0
- package/dist/aura.bundle.js +295 -226
- package/dist/cjs/index.cjs +295 -226
- package/dist/esm/IconButton.js +2 -1
- package/dist/esm/PageHeader.js +9 -1
- package/dist/esm/PageHeaderClient.js +62 -0
- package/dist/esm/index.js +1 -1
- package/dist/index.d.cts +16 -0
- package/dist/index.d.ts +16 -0
- package/dist/server/index.cjs +9 -1
- package/dist/server/index.d.cts +13 -0
- package/dist/server/index.d.ts +13 -0
- package/dist/server/index.js +9 -1
- package/dist/styles.css +55 -1
- package/dist/styles.layer.css +55 -1
- package/package.json +1 -1
package/dist/aura.bundle.js
CHANGED
|
@@ -87,7 +87,7 @@ window.Aura = (() => {
|
|
|
87
87
|
IconButton: () => IconButton,
|
|
88
88
|
Menu: () => Menu,
|
|
89
89
|
NumberField: () => NumberField,
|
|
90
|
-
PageHeader: () =>
|
|
90
|
+
PageHeader: () => PageHeader3,
|
|
91
91
|
Pagination: () => Pagination,
|
|
92
92
|
PasswordField: () => PasswordField,
|
|
93
93
|
Popover: () => Popover,
|
|
@@ -1583,7 +1583,7 @@ window.Aura = (() => {
|
|
|
1583
1583
|
|
|
1584
1584
|
// src/IconButton.tsx
|
|
1585
1585
|
var IconButton = React8.forwardRef(function IconButton2(props, ref) {
|
|
1586
|
-
const rest = omit(props, ["icon", "label", "className", "size", "tone", "touchHeight"]);
|
|
1586
|
+
const rest = omit(props, ["icon", "label", "className", "size", "tone", "touchHeight", "variant"]);
|
|
1587
1587
|
useAutoTip();
|
|
1588
1588
|
const own = props.title !== void 0;
|
|
1589
1589
|
return /* @__PURE__ */ React8.createElement(
|
|
@@ -1597,6 +1597,7 @@ window.Aura = (() => {
|
|
|
1597
1597
|
className: cx(
|
|
1598
1598
|
"aura-icon-btn",
|
|
1599
1599
|
props.tone === "danger" && "aura-icon-btn--danger",
|
|
1600
|
+
props.variant === "outline" && "aura-icon-btn--outline",
|
|
1600
1601
|
props.touchHeight && "aura-icon-btn--touch",
|
|
1601
1602
|
props.className
|
|
1602
1603
|
)
|
|
@@ -6852,8 +6853,8 @@ window.Aura = (() => {
|
|
|
6852
6853
|
}
|
|
6853
6854
|
);
|
|
6854
6855
|
};
|
|
6855
|
-
const
|
|
6856
|
-
for (let b = 0; b < lines; b++)
|
|
6856
|
+
const bars2 = [];
|
|
6857
|
+
for (let b = 0; b < lines; b++) bars2.push(bar(b));
|
|
6857
6858
|
sk.push(
|
|
6858
6859
|
/* @__PURE__ */ React33.createElement(
|
|
6859
6860
|
"span",
|
|
@@ -6877,7 +6878,7 @@ window.Aura = (() => {
|
|
|
6877
6878
|
c.skeletonTouch && "is-touch"
|
|
6878
6879
|
)
|
|
6879
6880
|
}
|
|
6880
|
-
) : lines > 1 ? /* @__PURE__ */ React33.createElement("span", { className: "aura-skel-lines" },
|
|
6881
|
+
) : lines > 1 ? /* @__PURE__ */ React33.createElement("span", { className: "aura-skel-lines" }, bars2) : bars2[0]
|
|
6881
6882
|
)
|
|
6882
6883
|
);
|
|
6883
6884
|
});
|
|
@@ -7819,6 +7820,9 @@ window.Aura = (() => {
|
|
|
7819
7820
|
);
|
|
7820
7821
|
});
|
|
7821
7822
|
|
|
7823
|
+
// src/PageHeaderClient.tsx
|
|
7824
|
+
var React44 = __toESM(require_react(), 1);
|
|
7825
|
+
|
|
7822
7826
|
// src/PageHeader.tsx
|
|
7823
7827
|
var React43 = __toESM(require_react(), 1);
|
|
7824
7828
|
var h8 = React43.createElement;
|
|
@@ -7832,6 +7836,8 @@ window.Aura = (() => {
|
|
|
7832
7836
|
const below2 = props.actionsFullWidthBelow;
|
|
7833
7837
|
const hide2 = props.titleHideBelow;
|
|
7834
7838
|
const hasMeta = props.meta != null && props.meta !== false;
|
|
7839
|
+
const hasActions = props.actions != null && props.actions !== false;
|
|
7840
|
+
const bar = hasActions && (props.actionsBarBelow === "sm" || props.actionsBarBelow === "md") ? props.actionsBarBelow : null;
|
|
7835
7841
|
return h8(
|
|
7836
7842
|
"div",
|
|
7837
7843
|
Object.assign(attrs2, {
|
|
@@ -7841,6 +7847,7 @@ window.Aura = (() => {
|
|
|
7841
7847
|
(below2 === "sm" || below2 === "md" || below2 === "lg") && "aura-page-header--actions-full-below-" + below2,
|
|
7842
7848
|
(hide2 === "sm" || hide2 === "md" || hide2 === "lg") && "aura-page-header--title-hide-below-" + hide2,
|
|
7843
7849
|
(hide2 === "sm" || hide2 === "md" || hide2 === "lg") && !hasMeta && "has-no-meta",
|
|
7850
|
+
bar && "aura-page-header--actions-bar-below-" + bar,
|
|
7844
7851
|
props.className
|
|
7845
7852
|
),
|
|
7846
7853
|
style: props.style
|
|
@@ -7853,16 +7860,78 @@ window.Aura = (() => {
|
|
|
7853
7860
|
h8("h" + level, { className: "aura-page-header__title", id: props.titleId }, props.title),
|
|
7854
7861
|
props.meta != null && props.meta !== false ? h8("div", { className: "aura-page-header__meta" }, props.meta) : null
|
|
7855
7862
|
),
|
|
7856
|
-
props.actions != null && props.actions !== false ? h8(
|
|
7863
|
+
props.actions != null && props.actions !== false ? h8(
|
|
7864
|
+
"div",
|
|
7865
|
+
{ className: "aura-page-header__actions" },
|
|
7866
|
+
bar && props.actionsStatus != null && props.actionsStatus !== false ? h8("div", { className: "aura-page-header__status", role: "status" }, props.actionsStatus) : null,
|
|
7867
|
+
props.actions
|
|
7868
|
+
) : null
|
|
7869
|
+
);
|
|
7870
|
+
});
|
|
7871
|
+
|
|
7872
|
+
// src/PageHeaderClient.tsx
|
|
7873
|
+
var NAME = "--aura-page-actions-height";
|
|
7874
|
+
var bars = [];
|
|
7875
|
+
function trapped(el) {
|
|
7876
|
+
for (let p = el.parentElement; p && p !== document.documentElement; p = p.parentElement) {
|
|
7877
|
+
const s = getComputedStyle(p);
|
|
7878
|
+
if (s.transform !== "none" || s.filter !== "none" || (s.backdropFilter || "none") !== "none" || s.contentVisibility === "auto" || s.perspective !== "none" || /transform|filter|perspective/.test(s.willChange) || /paint|layout|strict|content/.test(s.contain))
|
|
7879
|
+
return true;
|
|
7880
|
+
}
|
|
7881
|
+
return false;
|
|
7882
|
+
}
|
|
7883
|
+
var PageHeader3 = React44.forwardRef(function PageHeader4(props, ref) {
|
|
7884
|
+
const own = React44.useRef(null);
|
|
7885
|
+
const merged = useMergedRef(ref, own);
|
|
7886
|
+
const bar = props.actionsBarBelow;
|
|
7887
|
+
const hasActions = props.actions != null && props.actions !== false;
|
|
7888
|
+
React44.useEffect(
|
|
7889
|
+
function() {
|
|
7890
|
+
if (bar !== "sm" && bar !== "md" || !hasActions || !own.current) return;
|
|
7891
|
+
const el = own.current.querySelector(":scope > .aura-page-header__actions");
|
|
7892
|
+
if (!el) return;
|
|
7893
|
+
const root = document.documentElement;
|
|
7894
|
+
let checked = false;
|
|
7895
|
+
function sync() {
|
|
7896
|
+
if (bars[bars.length - 1] !== sync) return;
|
|
7897
|
+
if (getComputedStyle(el).position === "fixed") {
|
|
7898
|
+
root.style.setProperty(NAME, el.offsetHeight + "px");
|
|
7899
|
+
if (!checked && (checked = true, trapped(el)))
|
|
7900
|
+
devWarnOnce(
|
|
7901
|
+
"pageheader-bar-trapped",
|
|
7902
|
+
"PageHeader actionsBarBelow: an ancestor has a transform, filter, will-change or paint containment, so the fixed bar is placed against it instead of the screen. Remove it from the page header's ancestors."
|
|
7903
|
+
);
|
|
7904
|
+
} else root.style.removeProperty(NAME);
|
|
7905
|
+
}
|
|
7906
|
+
if (bars.length)
|
|
7907
|
+
devWarnOnce(
|
|
7908
|
+
"pageheader-bar-twice",
|
|
7909
|
+
"PageHeader actionsBarBelow: two bars on one page overlap at the bottom of the screen. Give it to one PageHeader per page."
|
|
7910
|
+
);
|
|
7911
|
+
bars.push(sync);
|
|
7912
|
+
const ro = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(sync);
|
|
7913
|
+
if (ro) ro.observe(el);
|
|
7914
|
+
window.addEventListener("resize", sync);
|
|
7915
|
+
sync();
|
|
7916
|
+
return function() {
|
|
7917
|
+
if (ro) ro.disconnect();
|
|
7918
|
+
window.removeEventListener("resize", sync);
|
|
7919
|
+
bars.splice(bars.indexOf(sync), 1);
|
|
7920
|
+
if (bars.length) bars[bars.length - 1]();
|
|
7921
|
+
else root.style.removeProperty(NAME);
|
|
7922
|
+
};
|
|
7923
|
+
},
|
|
7924
|
+
[bar, hasActions]
|
|
7857
7925
|
);
|
|
7926
|
+
return /* @__PURE__ */ React44.createElement(PageHeader, { ...props, ref: merged });
|
|
7858
7927
|
});
|
|
7859
7928
|
|
|
7860
7929
|
// src/StatusTile.tsx
|
|
7861
|
-
var
|
|
7930
|
+
var React46 = __toESM(require_react(), 1);
|
|
7862
7931
|
|
|
7863
7932
|
// src/tiles.tsx
|
|
7864
|
-
var
|
|
7865
|
-
var h9 =
|
|
7933
|
+
var React45 = __toESM(require_react(), 1);
|
|
7934
|
+
var h9 = React45.createElement;
|
|
7866
7935
|
var STATUS_ICON = {
|
|
7867
7936
|
down: IconCircleAlert,
|
|
7868
7937
|
problem: IconTriangleAlert,
|
|
@@ -7954,7 +8023,7 @@ window.Aura = (() => {
|
|
|
7954
8023
|
) : null
|
|
7955
8024
|
);
|
|
7956
8025
|
}
|
|
7957
|
-
var TileGrid =
|
|
8026
|
+
var TileGrid = React45.forwardRef(function TileGrid2(props, ref) {
|
|
7958
8027
|
const style = Object.assign(
|
|
7959
8028
|
{},
|
|
7960
8029
|
respVars("aura-grid-cols", props.columns == null ? { base: 2, md: 3 } : props.columns),
|
|
@@ -7970,16 +8039,16 @@ window.Aura = (() => {
|
|
|
7970
8039
|
}),
|
|
7971
8040
|
/* toArray drops null and booleans and keys each element; a Fragment's children are items too. */
|
|
7972
8041
|
flat(props.children).map(function(c, i) {
|
|
7973
|
-
return h9("li", { key:
|
|
8042
|
+
return h9("li", { key: React45.isValidElement(c) && c.key != null ? c.key : i }, c);
|
|
7974
8043
|
})
|
|
7975
8044
|
);
|
|
7976
8045
|
});
|
|
7977
8046
|
function flat(children) {
|
|
7978
8047
|
const out = [];
|
|
7979
|
-
|
|
7980
|
-
if (
|
|
8048
|
+
React45.Children.toArray(children).forEach(function(c) {
|
|
8049
|
+
if (React45.isValidElement(c) && c.type === React45.Fragment)
|
|
7981
8050
|
flat(c.props.children).forEach(function(x) {
|
|
7982
|
-
out.push(
|
|
8051
|
+
out.push(React45.isValidElement(x) ? React45.cloneElement(x, { key: String(c.key) + "/" + String(x.key) }) : x);
|
|
7983
8052
|
});
|
|
7984
8053
|
else if (c !== "") out.push(c);
|
|
7985
8054
|
});
|
|
@@ -7993,7 +8062,7 @@ window.Aura = (() => {
|
|
|
7993
8062
|
function num(v) {
|
|
7994
8063
|
return typeof v === "number" && isFinite(v) ? v : null;
|
|
7995
8064
|
}
|
|
7996
|
-
var Sparkline =
|
|
8065
|
+
var Sparkline = React45.forwardRef(function Sparkline2(props, ref) {
|
|
7997
8066
|
const wh = SIZES2[props.size || "sm"] || SIZES2.sm;
|
|
7998
8067
|
const W = wh[0], H = wh[1];
|
|
7999
8068
|
const data = (props.data || []).map(num);
|
|
@@ -8067,8 +8136,8 @@ window.Aura = (() => {
|
|
|
8067
8136
|
});
|
|
8068
8137
|
|
|
8069
8138
|
// src/StatusTile.tsx
|
|
8070
|
-
var useIsoLayoutEffect2 = typeof window !== "undefined" ?
|
|
8071
|
-
var StatusTile =
|
|
8139
|
+
var useIsoLayoutEffect2 = typeof window !== "undefined" ? React46.useLayoutEffect : React46.useEffect;
|
|
8140
|
+
var StatusTile = React46.forwardRef(function StatusTile2(props, ref) {
|
|
8072
8141
|
const Link = useLinkComponent(props.linkComponent);
|
|
8073
8142
|
const t = useStrings();
|
|
8074
8143
|
useAutoTip();
|
|
@@ -8077,8 +8146,8 @@ window.Aura = (() => {
|
|
|
8077
8146
|
"status-tile-label",
|
|
8078
8147
|
"StatusTile `aria-label` needs `href`: without a link the tile is a plain box, where a name is not allowed."
|
|
8079
8148
|
);
|
|
8080
|
-
const titleRef =
|
|
8081
|
-
const check =
|
|
8149
|
+
const titleRef = React46.useRef(null);
|
|
8150
|
+
const check = React46.useCallback(function() {
|
|
8082
8151
|
const el = titleRef.current;
|
|
8083
8152
|
if (!el) return;
|
|
8084
8153
|
const cut = el.scrollHeight > el.clientHeight + 1;
|
|
@@ -8088,7 +8157,7 @@ window.Aura = (() => {
|
|
|
8088
8157
|
}, []);
|
|
8089
8158
|
useIsoLayoutEffect2(check, [props.title, check]);
|
|
8090
8159
|
const linked = !!props.href;
|
|
8091
|
-
|
|
8160
|
+
React46.useEffect(
|
|
8092
8161
|
function() {
|
|
8093
8162
|
const el = titleRef.current;
|
|
8094
8163
|
if (!el) return;
|
|
@@ -8113,14 +8182,14 @@ window.Aura = (() => {
|
|
|
8113
8182
|
});
|
|
8114
8183
|
|
|
8115
8184
|
// src/AppShell.tsx
|
|
8116
|
-
var
|
|
8185
|
+
var React48 = __toESM(require_react(), 1);
|
|
8117
8186
|
|
|
8118
8187
|
// src/scrollHide.ts
|
|
8119
|
-
var
|
|
8188
|
+
var React47 = __toESM(require_react(), 1);
|
|
8120
8189
|
var STEP = 8;
|
|
8121
8190
|
function useHideOnScroll(enabled, el, media, from) {
|
|
8122
|
-
const st =
|
|
8123
|
-
|
|
8191
|
+
const st = React47.useState(false), hidden = st[0], setHidden = st[1];
|
|
8192
|
+
React47.useEffect(
|
|
8124
8193
|
function() {
|
|
8125
8194
|
if (!enabled || typeof window === "undefined") {
|
|
8126
8195
|
setHidden(false);
|
|
@@ -8210,31 +8279,31 @@ window.Aura = (() => {
|
|
|
8210
8279
|
}
|
|
8211
8280
|
|
|
8212
8281
|
// src/AppShell.tsx
|
|
8213
|
-
var AppShell =
|
|
8282
|
+
var AppShell = React48.forwardRef(function AppShell2(props, ref) {
|
|
8214
8283
|
const t = useStrings();
|
|
8215
8284
|
const bp = useBreakpoint();
|
|
8216
8285
|
const wide = bp === "lg" || bp === "xl";
|
|
8217
|
-
const st =
|
|
8218
|
-
|
|
8286
|
+
const st = React48.useState(false), open = st[0], setOpen = st[1];
|
|
8287
|
+
React48.useEffect(
|
|
8219
8288
|
function() {
|
|
8220
8289
|
if (wide) setOpen(false);
|
|
8221
8290
|
},
|
|
8222
8291
|
[wide]
|
|
8223
8292
|
);
|
|
8224
|
-
const navEl = props.nav &&
|
|
8293
|
+
const navEl = props.nav && React48.isValidElement(props.nav) ? props.nav : null;
|
|
8225
8294
|
const shared = !!navEl && navEl.props.value === void 0 && (navEl.props.defaultValue !== void 0 || navEl.props.sections !== void 0 || navEl.props.items !== void 0);
|
|
8226
|
-
const navState =
|
|
8295
|
+
const navState = React48.useState(navEl ? navEl.props.defaultValue : void 0);
|
|
8227
8296
|
function onNav(id) {
|
|
8228
8297
|
if (shared) navState[1](id);
|
|
8229
8298
|
if (navEl && navEl.props.onChange) navEl.props.onChange(id);
|
|
8230
8299
|
}
|
|
8231
|
-
const rootRef =
|
|
8232
|
-
const barRef =
|
|
8300
|
+
const rootRef = React48.useRef(null);
|
|
8301
|
+
const barRef = React48.useRef(null);
|
|
8233
8302
|
const mergedRef = useMergedRef(ref, rootRef);
|
|
8234
8303
|
const hasBar = !!(props.header || props.nav);
|
|
8235
|
-
const barH =
|
|
8304
|
+
const barH = React48.useState(null);
|
|
8236
8305
|
const away = useHideOnScroll(!!props.headerHideOnScroll && hasBar, barRef, "(max-width: 1023.98px)", barH[0] || 56);
|
|
8237
|
-
const awayRef =
|
|
8306
|
+
const awayRef = React48.useRef(away);
|
|
8238
8307
|
awayRef.current = away;
|
|
8239
8308
|
useIsoLayoutEffect(
|
|
8240
8309
|
function() {
|
|
@@ -8263,8 +8332,8 @@ window.Aura = (() => {
|
|
|
8263
8332
|
},
|
|
8264
8333
|
[hasBar]
|
|
8265
8334
|
);
|
|
8266
|
-
const deskNav = navEl && shared ?
|
|
8267
|
-
const drawerNav = navEl ?
|
|
8335
|
+
const deskNav = navEl && shared ? React48.cloneElement(navEl, { value: navState[0], onChange: onNav }) : props.nav;
|
|
8336
|
+
const drawerNav = navEl ? React48.cloneElement(navEl, {
|
|
8268
8337
|
value: shared ? navState[0] : navEl.props.value,
|
|
8269
8338
|
onChange: function(id) {
|
|
8270
8339
|
onNav(id);
|
|
@@ -8279,7 +8348,7 @@ window.Aura = (() => {
|
|
|
8279
8348
|
collapsed: false,
|
|
8280
8349
|
collapsible: false
|
|
8281
8350
|
}) : props.nav;
|
|
8282
|
-
return /* @__PURE__ */
|
|
8351
|
+
return /* @__PURE__ */ React48.createElement(
|
|
8283
8352
|
"div",
|
|
8284
8353
|
{
|
|
8285
8354
|
ref: mergedRef,
|
|
@@ -8294,8 +8363,8 @@ window.Aura = (() => {
|
|
|
8294
8363
|
props.className
|
|
8295
8364
|
)
|
|
8296
8365
|
},
|
|
8297
|
-
props.nav ? /* @__PURE__ */
|
|
8298
|
-
props.nav ? /* @__PURE__ */
|
|
8366
|
+
props.nav ? /* @__PURE__ */ React48.createElement("div", { className: "aura-shell__nav" }, deskNav) : null,
|
|
8367
|
+
props.nav ? /* @__PURE__ */ React48.createElement(
|
|
8299
8368
|
Drawer,
|
|
8300
8369
|
{
|
|
8301
8370
|
open,
|
|
@@ -8312,7 +8381,7 @@ window.Aura = (() => {
|
|
|
8312
8381
|
},
|
|
8313
8382
|
drawerNav
|
|
8314
8383
|
) : null,
|
|
8315
|
-
/* @__PURE__ */
|
|
8384
|
+
/* @__PURE__ */ React48.createElement("div", { className: "aura-shell__main" }, props.header || props.nav ? /* @__PURE__ */ React48.createElement(
|
|
8316
8385
|
"header",
|
|
8317
8386
|
{
|
|
8318
8387
|
ref: barRef,
|
|
@@ -8324,11 +8393,11 @@ window.Aura = (() => {
|
|
|
8324
8393
|
away && "is-away"
|
|
8325
8394
|
)
|
|
8326
8395
|
},
|
|
8327
|
-
props.nav ? /* @__PURE__ */
|
|
8396
|
+
props.nav ? /* @__PURE__ */ React48.createElement(
|
|
8328
8397
|
IconButton,
|
|
8329
8398
|
{
|
|
8330
8399
|
className: "aura-shell__menu",
|
|
8331
|
-
icon: /* @__PURE__ */
|
|
8400
|
+
icon: /* @__PURE__ */ React48.createElement(IconMenu, null),
|
|
8332
8401
|
label: props.menuLabel || t.openNav,
|
|
8333
8402
|
size: "md",
|
|
8334
8403
|
onClick: function() {
|
|
@@ -8337,8 +8406,8 @@ window.Aura = (() => {
|
|
|
8337
8406
|
"aria-expanded": open
|
|
8338
8407
|
}
|
|
8339
8408
|
) : null,
|
|
8340
|
-
/* @__PURE__ */
|
|
8341
|
-
) : null, /* @__PURE__ */
|
|
8409
|
+
/* @__PURE__ */ React48.createElement("div", { className: "aura-shell__bar-content" }, props.header)
|
|
8410
|
+
) : null, /* @__PURE__ */ React48.createElement(
|
|
8342
8411
|
"main",
|
|
8343
8412
|
{
|
|
8344
8413
|
className: cx("aura-shell__content", props.contentPadding === false && "is-flush"),
|
|
@@ -8351,17 +8420,17 @@ window.Aura = (() => {
|
|
|
8351
8420
|
});
|
|
8352
8421
|
|
|
8353
8422
|
// src/ActionBar.tsx
|
|
8354
|
-
var
|
|
8355
|
-
var ActionBar =
|
|
8423
|
+
var React49 = __toESM(require_react(), 1);
|
|
8424
|
+
var ActionBar = React49.forwardRef(function ActionBar2(props, ref) {
|
|
8356
8425
|
const t = useStrings();
|
|
8357
8426
|
const bulk = props.selected != null;
|
|
8358
8427
|
const idle = bulk && !props.selected;
|
|
8359
8428
|
const count = bulk && props.selected ? t.selectedCount(props.selected) : null;
|
|
8360
|
-
const hasStart =
|
|
8429
|
+
const hasStart = React49.Children.toArray(props.start).some(function(c) {
|
|
8361
8430
|
return c !== "";
|
|
8362
8431
|
});
|
|
8363
|
-
const cameFrom =
|
|
8364
|
-
const own =
|
|
8432
|
+
const cameFrom = React49.useRef(null);
|
|
8433
|
+
const own = React49.useRef(null);
|
|
8365
8434
|
function clear() {
|
|
8366
8435
|
props.onClearSelection();
|
|
8367
8436
|
setTimeout(function() {
|
|
@@ -8370,7 +8439,7 @@ window.Aura = (() => {
|
|
|
8370
8439
|
if ((!a || a === document.body || !a.isConnected) && back && back.isConnected) back.focus();
|
|
8371
8440
|
}, 0);
|
|
8372
8441
|
}
|
|
8373
|
-
return /* @__PURE__ */
|
|
8442
|
+
return /* @__PURE__ */ React49.createElement(
|
|
8374
8443
|
"div",
|
|
8375
8444
|
{
|
|
8376
8445
|
ref: function(el) {
|
|
@@ -8392,16 +8461,16 @@ window.Aura = (() => {
|
|
|
8392
8461
|
props.className
|
|
8393
8462
|
)
|
|
8394
8463
|
},
|
|
8395
|
-
/* @__PURE__ */
|
|
8464
|
+
/* @__PURE__ */ React49.createElement("div", { className: cx("aura-actionbar__inner", hasStart && "has-start") }, /* @__PURE__ */ React49.createElement("div", { className: "aura-actionbar__status", role: "status" }, count, count && props.status ? " \xB7 " : null, props.status), !idle && hasStart ? /* @__PURE__ */ React49.createElement("div", { className: "aura-actionbar__start" }, props.start) : null, !idle ? /* @__PURE__ */ React49.createElement("div", { className: "aura-actionbar__actions" }, count && props.onClearSelection ? /* @__PURE__ */ React49.createElement(Button, { variant: "ghost", size: "sm", touchHeight: props.touchHeight, onClick: clear }, t.clear()) : null, props.children) : null)
|
|
8396
8465
|
);
|
|
8397
8466
|
});
|
|
8398
8467
|
|
|
8399
8468
|
// src/Separator.tsx
|
|
8400
|
-
var
|
|
8401
|
-
var Separator =
|
|
8469
|
+
var React50 = __toESM(require_react(), 1);
|
|
8470
|
+
var Separator = React50.forwardRef(function Separator2(props, ref) {
|
|
8402
8471
|
const vertical = props.orientation === "vertical";
|
|
8403
8472
|
const decorative = props.decorative !== false;
|
|
8404
|
-
return /* @__PURE__ */
|
|
8473
|
+
return /* @__PURE__ */ React50.createElement(
|
|
8405
8474
|
"div",
|
|
8406
8475
|
{
|
|
8407
8476
|
ref,
|
|
@@ -8414,13 +8483,13 @@ window.Aura = (() => {
|
|
|
8414
8483
|
});
|
|
8415
8484
|
|
|
8416
8485
|
// src/Table.tsx
|
|
8417
|
-
var
|
|
8418
|
-
var StackLabels =
|
|
8419
|
-
var ColumnIndex =
|
|
8486
|
+
var React51 = __toESM(require_react(), 1);
|
|
8487
|
+
var StackLabels = React51.createContext(null);
|
|
8488
|
+
var ColumnIndex = React51.createContext(-1);
|
|
8420
8489
|
function flat2(children) {
|
|
8421
8490
|
const out = [];
|
|
8422
|
-
|
|
8423
|
-
if (
|
|
8491
|
+
React51.Children.toArray(children).forEach(function(c) {
|
|
8492
|
+
if (React51.isValidElement(c) && c.type === React51.Fragment)
|
|
8424
8493
|
out.push.apply(out, flat2(c.props.children));
|
|
8425
8494
|
else out.push(c);
|
|
8426
8495
|
});
|
|
@@ -8434,7 +8503,7 @@ window.Aura = (() => {
|
|
|
8434
8503
|
});
|
|
8435
8504
|
return parts.length ? parts.join("") : void 0;
|
|
8436
8505
|
}
|
|
8437
|
-
if (
|
|
8506
|
+
if (React51.isValidElement(node)) {
|
|
8438
8507
|
const p = node.props;
|
|
8439
8508
|
if (p["aria-hidden"] === true || p["aria-hidden"] === "true") return void 0;
|
|
8440
8509
|
return text(p.children);
|
|
@@ -8444,13 +8513,13 @@ window.Aura = (() => {
|
|
|
8444
8513
|
function headerLabels(children) {
|
|
8445
8514
|
let out = [];
|
|
8446
8515
|
flat2(children).forEach(function(c) {
|
|
8447
|
-
if (out.length || !
|
|
8516
|
+
if (out.length || !React51.isValidElement(c) || c.type !== THead) return;
|
|
8448
8517
|
const row = flat2(c.props.children).find(function(r2) {
|
|
8449
|
-
return
|
|
8518
|
+
return React51.isValidElement(r2);
|
|
8450
8519
|
});
|
|
8451
8520
|
if (!row) return;
|
|
8452
8521
|
flat2(row.props.children).forEach(function(cell) {
|
|
8453
|
-
if (!
|
|
8522
|
+
if (!React51.isValidElement(cell)) return;
|
|
8454
8523
|
const p = cell.props;
|
|
8455
8524
|
const t = text(p.children);
|
|
8456
8525
|
const label = p.label != null ? p.label : t != null ? t.replace(/\s+/g, " ").trim() || void 0 : void 0;
|
|
@@ -8460,7 +8529,7 @@ window.Aura = (() => {
|
|
|
8460
8529
|
});
|
|
8461
8530
|
return out;
|
|
8462
8531
|
}
|
|
8463
|
-
var Table =
|
|
8532
|
+
var Table = React51.forwardRef(function Table2(props, ref) {
|
|
8464
8533
|
const {
|
|
8465
8534
|
caption,
|
|
8466
8535
|
captionHidden,
|
|
@@ -8490,12 +8559,12 @@ window.Aura = (() => {
|
|
|
8490
8559
|
"tbl-stack-labels",
|
|
8491
8560
|
"Table stackBelow: no THead > Tr > Th found among its children, so cells have no labels. Pass `label` on each Td."
|
|
8492
8561
|
);
|
|
8493
|
-
const outer =
|
|
8562
|
+
const outer = React51.useContext(StackLabels);
|
|
8494
8563
|
const pageDensity = useDensity();
|
|
8495
8564
|
const capId = uid();
|
|
8496
|
-
const wrap =
|
|
8497
|
-
const sc =
|
|
8498
|
-
const wide =
|
|
8565
|
+
const wrap = React51.useRef(null);
|
|
8566
|
+
const sc = React51.useState(false), scrolls = sc[0];
|
|
8567
|
+
const wide = React51.useState(false);
|
|
8499
8568
|
useIsoLayoutEffect(function() {
|
|
8500
8569
|
const el = wrap.current;
|
|
8501
8570
|
if (!el || typeof ResizeObserver === "undefined") return;
|
|
@@ -8512,7 +8581,7 @@ window.Aura = (() => {
|
|
|
8512
8581
|
ro.disconnect();
|
|
8513
8582
|
};
|
|
8514
8583
|
}, []);
|
|
8515
|
-
const table = /* @__PURE__ */
|
|
8584
|
+
const table = /* @__PURE__ */ React51.createElement(
|
|
8516
8585
|
"div",
|
|
8517
8586
|
{
|
|
8518
8587
|
ref: wrap,
|
|
@@ -8536,7 +8605,7 @@ window.Aura = (() => {
|
|
|
8536
8605
|
"aria-labelledby": scrolls ? caption != null ? capId : rest["aria-labelledby"] : void 0,
|
|
8537
8606
|
"aria-label": scrolls && caption == null ? rest["aria-label"] : void 0
|
|
8538
8607
|
},
|
|
8539
|
-
/* @__PURE__ */
|
|
8608
|
+
/* @__PURE__ */ React51.createElement(
|
|
8540
8609
|
"table",
|
|
8541
8610
|
{
|
|
8542
8611
|
ref,
|
|
@@ -8552,11 +8621,11 @@ window.Aura = (() => {
|
|
|
8552
8621
|
role: stackBelow ? "table" : void 0,
|
|
8553
8622
|
...rest
|
|
8554
8623
|
},
|
|
8555
|
-
caption != null ? /* @__PURE__ */
|
|
8556
|
-
labels ? /* @__PURE__ */
|
|
8624
|
+
caption != null ? /* @__PURE__ */ React51.createElement("caption", { id: capId, className: cx("aura-tbl__caption", captionHidden && "aura-sr-only") }, caption) : null,
|
|
8625
|
+
labels ? /* @__PURE__ */ React51.createElement(StackLabels.Provider, { value: labels }, children) : outer ? /* @__PURE__ */ React51.createElement(StackLabels.Provider, { value: null }, children) : children
|
|
8557
8626
|
)
|
|
8558
8627
|
);
|
|
8559
|
-
return cards ? /* @__PURE__ */
|
|
8628
|
+
return cards ? /* @__PURE__ */ React51.createElement(
|
|
8560
8629
|
"div",
|
|
8561
8630
|
{
|
|
8562
8631
|
className: cx(
|
|
@@ -8569,10 +8638,10 @@ window.Aura = (() => {
|
|
|
8569
8638
|
) : table;
|
|
8570
8639
|
});
|
|
8571
8640
|
function section(tag, cls) {
|
|
8572
|
-
const C =
|
|
8641
|
+
const C = React51.forwardRef(function TableSection(props, ref) {
|
|
8573
8642
|
const { className, ...rest } = props;
|
|
8574
|
-
const stacked =
|
|
8575
|
-
return
|
|
8643
|
+
const stacked = React51.useContext(StackLabels) != null;
|
|
8644
|
+
return React51.createElement(
|
|
8576
8645
|
tag,
|
|
8577
8646
|
Object.assign({ ref, className: cx(cls, className), role: stacked ? "rowgroup" : void 0 }, rest)
|
|
8578
8647
|
);
|
|
@@ -8585,14 +8654,14 @@ window.Aura = (() => {
|
|
|
8585
8654
|
TBody.displayName = "TBody";
|
|
8586
8655
|
var TFoot = section("tfoot", "aura-tbl__foot");
|
|
8587
8656
|
TFoot.displayName = "TFoot";
|
|
8588
|
-
var Tr =
|
|
8657
|
+
var Tr = React51.forwardRef(function Tr2(props, ref) {
|
|
8589
8658
|
const { className, children, ...rest } = props;
|
|
8590
|
-
const stacked =
|
|
8659
|
+
const stacked = React51.useContext(StackLabels) != null;
|
|
8591
8660
|
let col = 0;
|
|
8592
|
-
return /* @__PURE__ */
|
|
8661
|
+
return /* @__PURE__ */ React51.createElement("tr", { ref, className: cx("aura-tbl__row", className), role: stacked ? "row" : void 0, ...rest }, stacked ? flat2(children).map(function(c) {
|
|
8593
8662
|
const at = col;
|
|
8594
|
-
if (
|
|
8595
|
-
return /* @__PURE__ */
|
|
8663
|
+
if (React51.isValidElement(c)) col += Math.max(1, Number(c.props.colSpan) || 1);
|
|
8664
|
+
return /* @__PURE__ */ React51.createElement(ColumnIndex.Provider, { key: React51.isValidElement(c) && c.key != null ? c.key : at, value: at }, c);
|
|
8596
8665
|
}) : children);
|
|
8597
8666
|
});
|
|
8598
8667
|
function cellClass(base, p) {
|
|
@@ -8606,10 +8675,10 @@ window.Aura = (() => {
|
|
|
8606
8675
|
p.className
|
|
8607
8676
|
);
|
|
8608
8677
|
}
|
|
8609
|
-
var Th =
|
|
8678
|
+
var Th = React51.forwardRef(function Th2(props, ref) {
|
|
8610
8679
|
const { align, numeric, mono, className, scope, label, card, ...rest } = props;
|
|
8611
|
-
const stacked =
|
|
8612
|
-
return /* @__PURE__ */
|
|
8680
|
+
const stacked = React51.useContext(StackLabels) != null;
|
|
8681
|
+
return /* @__PURE__ */ React51.createElement(
|
|
8613
8682
|
"th",
|
|
8614
8683
|
{
|
|
8615
8684
|
ref,
|
|
@@ -8621,12 +8690,12 @@ window.Aura = (() => {
|
|
|
8621
8690
|
}
|
|
8622
8691
|
);
|
|
8623
8692
|
});
|
|
8624
|
-
var Td =
|
|
8693
|
+
var Td = React51.forwardRef(function Td2(props, ref) {
|
|
8625
8694
|
const { align, numeric, mono, className, scope, label, card, ...rest } = props;
|
|
8626
|
-
const labels =
|
|
8695
|
+
const labels = React51.useContext(StackLabels), col = React51.useContext(ColumnIndex);
|
|
8627
8696
|
const slot = labels && (card === "title" || card === "action") ? card : void 0;
|
|
8628
8697
|
const shown = labels && !slot ? label != null ? label : col >= 0 ? labels[col] : void 0 : void 0;
|
|
8629
|
-
return /* @__PURE__ */
|
|
8698
|
+
return /* @__PURE__ */ React51.createElement(
|
|
8630
8699
|
"td",
|
|
8631
8700
|
{
|
|
8632
8701
|
ref,
|
|
@@ -8640,8 +8709,8 @@ window.Aura = (() => {
|
|
|
8640
8709
|
});
|
|
8641
8710
|
|
|
8642
8711
|
// src/BottomNav.tsx
|
|
8643
|
-
var
|
|
8644
|
-
var BottomNav =
|
|
8712
|
+
var React52 = __toESM(require_react(), 1);
|
|
8713
|
+
var BottomNav = React52.forwardRef(function BottomNav2(props, ref) {
|
|
8645
8714
|
const t = useStrings();
|
|
8646
8715
|
const Link = useLinkComponent(props.linkComponent);
|
|
8647
8716
|
const st = useMaybeControlled(
|
|
@@ -8651,7 +8720,7 @@ window.Aura = (() => {
|
|
|
8651
8720
|
);
|
|
8652
8721
|
const active = st[0];
|
|
8653
8722
|
const hide2 = props.hideFrom === false ? "always" : "below-" + (props.hideFrom || "lg");
|
|
8654
|
-
const own =
|
|
8723
|
+
const own = React52.useRef(null);
|
|
8655
8724
|
const hf = props.hideFrom === false ? null : props.hideFrom || "lg";
|
|
8656
8725
|
const away = useHideOnScroll(
|
|
8657
8726
|
!!props.hideOnScroll,
|
|
@@ -8659,7 +8728,7 @@ window.Aura = (() => {
|
|
|
8659
8728
|
hf ? "(max-width: " + (breakpoints[hf] - 0.02) + "px)" : "all",
|
|
8660
8729
|
64
|
|
8661
8730
|
);
|
|
8662
|
-
const setRef =
|
|
8731
|
+
const setRef = React52.useCallback(
|
|
8663
8732
|
function(el) {
|
|
8664
8733
|
own.current = el;
|
|
8665
8734
|
if (typeof ref === "function") ref(el);
|
|
@@ -8667,7 +8736,7 @@ window.Aura = (() => {
|
|
|
8667
8736
|
},
|
|
8668
8737
|
[ref]
|
|
8669
8738
|
);
|
|
8670
|
-
return /* @__PURE__ */
|
|
8739
|
+
return /* @__PURE__ */ React52.createElement(React52.Fragment, null, /* @__PURE__ */ React52.createElement("div", { className: cx("aura-bottomnav-spacer", "aura-bottomnav--" + hide2), "aria-hidden": "true" }), /* @__PURE__ */ React52.createElement(
|
|
8671
8740
|
"nav",
|
|
8672
8741
|
{
|
|
8673
8742
|
ref: setRef,
|
|
@@ -8680,7 +8749,7 @@ window.Aura = (() => {
|
|
|
8680
8749
|
),
|
|
8681
8750
|
"aria-label": props.label || t.mainNav
|
|
8682
8751
|
},
|
|
8683
|
-
/* @__PURE__ */
|
|
8752
|
+
/* @__PURE__ */ React52.createElement("ul", { className: "aura-bottomnav__list" }, props.items.map(function(it) {
|
|
8684
8753
|
if (it.ariaLabel && typeof it.label === "string" && it.ariaLabel.toLowerCase().indexOf(it.label.toLowerCase()) < 0)
|
|
8685
8754
|
devWarnOnce(
|
|
8686
8755
|
"bottomnav-label-" + it.id,
|
|
@@ -8701,20 +8770,20 @@ window.Aura = (() => {
|
|
|
8701
8770
|
}
|
|
8702
8771
|
};
|
|
8703
8772
|
const inner = [
|
|
8704
|
-
/* @__PURE__ */
|
|
8705
|
-
it.ariaLabel ? /* @__PURE__ */
|
|
8706
|
-
/* @__PURE__ */
|
|
8707
|
-
suffix && !it.ariaLabel ? /* @__PURE__ */
|
|
8773
|
+
/* @__PURE__ */ React52.createElement("span", { key: "i", className: "aura-bottomnav__icon" }, /* @__PURE__ */ React52.createElement(Icon, { name: it.icon, size: "md" }), count ? /* @__PURE__ */ React52.createElement("span", { className: "aura-bottomnav__count", "aria-hidden": "true" }, count) : it.badge ? /* @__PURE__ */ React52.createElement("span", { className: "aura-bottomnav__dot", "aria-hidden": "true" }) : null),
|
|
8774
|
+
it.ariaLabel ? /* @__PURE__ */ React52.createElement("span", { key: "n", className: "aura-sr-only" }, it.ariaLabel + suffix) : null,
|
|
8775
|
+
/* @__PURE__ */ React52.createElement("span", { key: "l", className: "aura-bottomnav__label", "aria-hidden": it.ariaLabel ? true : void 0 }, it.label),
|
|
8776
|
+
suffix && !it.ariaLabel ? /* @__PURE__ */ React52.createElement("span", { key: "s", className: "aura-sr-only" }, suffix) : null
|
|
8708
8777
|
];
|
|
8709
|
-
return /* @__PURE__ */
|
|
8778
|
+
return /* @__PURE__ */ React52.createElement("li", { key: it.id, className: "aura-bottomnav__cell" }, it.href ? /* @__PURE__ */ React52.createElement(Link, { href: it.href, ...common }, inner) : /* @__PURE__ */ React52.createElement("button", { type: "button", ...common }, inner));
|
|
8710
8779
|
}))
|
|
8711
8780
|
));
|
|
8712
8781
|
});
|
|
8713
8782
|
|
|
8714
8783
|
// src/Surface.tsx
|
|
8715
|
-
var
|
|
8716
|
-
var h10 =
|
|
8717
|
-
var Surface =
|
|
8784
|
+
var React53 = __toESM(require_react(), 1);
|
|
8785
|
+
var h10 = React53.createElement;
|
|
8786
|
+
var Surface = React53.forwardRef(function Surface2(props, ref) {
|
|
8718
8787
|
const t = props.texture || "mesh";
|
|
8719
8788
|
const rest = omit(props, ["texture", "className", "children", "as"]);
|
|
8720
8789
|
return h10(
|
|
@@ -8735,14 +8804,14 @@ window.Aura = (() => {
|
|
|
8735
8804
|
});
|
|
8736
8805
|
|
|
8737
8806
|
// src/Stat.tsx
|
|
8738
|
-
var
|
|
8739
|
-
var Stat =
|
|
8807
|
+
var React54 = __toESM(require_react(), 1);
|
|
8808
|
+
var Stat = React54.forwardRef(function Stat2(props, ref) {
|
|
8740
8809
|
const Link = useLinkComponent(props.linkComponent);
|
|
8741
8810
|
return statElement(props, ref, Link);
|
|
8742
8811
|
});
|
|
8743
8812
|
|
|
8744
8813
|
// src/TimePicker.tsx
|
|
8745
|
-
var
|
|
8814
|
+
var React55 = __toESM(require_react(), 1);
|
|
8746
8815
|
var import_react_dom12 = __toESM(require_react_dom(), 1);
|
|
8747
8816
|
|
|
8748
8817
|
// src/text.ts
|
|
@@ -8784,7 +8853,7 @@ window.Aura = (() => {
|
|
|
8784
8853
|
function fromMin(n3) {
|
|
8785
8854
|
return pad3(Math.floor(n3 / 60)) + ":" + pad3(n3 % 60);
|
|
8786
8855
|
}
|
|
8787
|
-
var TimePicker =
|
|
8856
|
+
var TimePicker = React55.forwardRef(function TimePicker2(props, ref) {
|
|
8788
8857
|
const t = useStrings();
|
|
8789
8858
|
const auto = uid(), id = props.id || auto, listId = id + "-list";
|
|
8790
8859
|
const st = useMaybeControlled(
|
|
@@ -8794,7 +8863,7 @@ window.Aura = (() => {
|
|
|
8794
8863
|
);
|
|
8795
8864
|
const value = st[0];
|
|
8796
8865
|
const step = props.step || 30, lo = toMin(props.min) != null ? toMin(props.min) : 0, hi = toMin(props.max) != null ? toMin(props.max) : 24 * 60 - 1;
|
|
8797
|
-
const slots =
|
|
8866
|
+
const slots = React55.useMemo(
|
|
8798
8867
|
function() {
|
|
8799
8868
|
const out = [];
|
|
8800
8869
|
for (let m = lo; m <= hi; m += step) out.push(fromMin(m));
|
|
@@ -8806,12 +8875,12 @@ window.Aura = (() => {
|
|
|
8806
8875
|
const n3 = toMin(v);
|
|
8807
8876
|
return n3 == null || n3 < lo || n3 > hi || props.isTimeDisabled && props.isTimeDisabled(v);
|
|
8808
8877
|
}
|
|
8809
|
-
const openState =
|
|
8810
|
-
const editState =
|
|
8811
|
-
const aState =
|
|
8812
|
-
const errState =
|
|
8813
|
-
const pos =
|
|
8814
|
-
const boxRef =
|
|
8878
|
+
const openState = React55.useState(false), open = openState[0], setOpen = openState[1];
|
|
8879
|
+
const editState = React55.useState(null), editing = editState[0], setEditing = editState[1];
|
|
8880
|
+
const aState = React55.useState(0), active = aState[0], setActive = aState[1];
|
|
8881
|
+
const errState = React55.useState(null);
|
|
8882
|
+
const pos = React55.useState(null);
|
|
8883
|
+
const boxRef = React55.useRef(null), inputRef = React55.useRef(null), listRef = React55.useRef(null), inputMerged = useMergedRef(ref, inputRef);
|
|
8815
8884
|
const mounted = useMounted();
|
|
8816
8885
|
function nearest(v) {
|
|
8817
8886
|
const n3 = toMin(v);
|
|
@@ -8839,7 +8908,7 @@ window.Aura = (() => {
|
|
|
8839
8908
|
},
|
|
8840
8909
|
[open]
|
|
8841
8910
|
);
|
|
8842
|
-
|
|
8911
|
+
React55.useEffect(
|
|
8843
8912
|
function() {
|
|
8844
8913
|
if (!open) return;
|
|
8845
8914
|
function outside(e) {
|
|
@@ -8861,7 +8930,7 @@ window.Aura = (() => {
|
|
|
8861
8930
|
},
|
|
8862
8931
|
[open]
|
|
8863
8932
|
);
|
|
8864
|
-
|
|
8933
|
+
React55.useEffect(
|
|
8865
8934
|
function() {
|
|
8866
8935
|
if (!open || !listRef.current) return;
|
|
8867
8936
|
const el = listRef.current.querySelector('[data-idx="' + active + '"]');
|
|
@@ -8960,9 +9029,9 @@ window.Aura = (() => {
|
|
|
8960
9029
|
}
|
|
8961
9030
|
const error = errState[0] || props.error;
|
|
8962
9031
|
const list = open && mounted && pos[0] ? (0, import_react_dom12.createPortal)(
|
|
8963
|
-
/* @__PURE__ */
|
|
9032
|
+
/* @__PURE__ */ React55.createElement("div", { ref: listRef, className: "aura-combo__popover aura-time__popover", style: pos[0] }, /* @__PURE__ */ React55.createElement("ul", { id: listId, role: "listbox", "aria-label": props.label, className: "aura-combo__list" }, slots.map(function(s, i) {
|
|
8964
9033
|
const dis = blocked(s), sel = s === value;
|
|
8965
|
-
return /* @__PURE__ */
|
|
9034
|
+
return /* @__PURE__ */ React55.createElement(
|
|
8966
9035
|
"li",
|
|
8967
9036
|
{
|
|
8968
9037
|
key: s,
|
|
@@ -8987,13 +9056,13 @@ window.Aura = (() => {
|
|
|
8987
9056
|
if (active !== i) setActive(i);
|
|
8988
9057
|
}
|
|
8989
9058
|
},
|
|
8990
|
-
/* @__PURE__ */
|
|
8991
|
-
sel ? /* @__PURE__ */
|
|
9059
|
+
/* @__PURE__ */ React55.createElement("span", { className: "aura-combo__label" }, s),
|
|
9060
|
+
sel ? /* @__PURE__ */ React55.createElement(Icon, { name: /* @__PURE__ */ React55.createElement(IconCheck, null), className: "aura-combo__check" }) : null
|
|
8992
9061
|
);
|
|
8993
9062
|
}))),
|
|
8994
9063
|
document.body
|
|
8995
9064
|
) : null;
|
|
8996
|
-
return /* @__PURE__ */
|
|
9065
|
+
return /* @__PURE__ */ React55.createElement(
|
|
8997
9066
|
Field,
|
|
8998
9067
|
{
|
|
8999
9068
|
id,
|
|
@@ -9005,7 +9074,7 @@ window.Aura = (() => {
|
|
|
9005
9074
|
disabled: props.disabled,
|
|
9006
9075
|
className: cx(touchClass(props.touchHeight), props.className)
|
|
9007
9076
|
},
|
|
9008
|
-
/* @__PURE__ */
|
|
9077
|
+
/* @__PURE__ */ React55.createElement("div", { ref: boxRef, className: cx("aura-input aura-combo aura-time has-icon", open && "is-open") }, /* @__PURE__ */ React55.createElement(Icon, { name: /* @__PURE__ */ React55.createElement(IconClock, null), className: "aura-input__icon" }), /* @__PURE__ */ React55.createElement(
|
|
9009
9078
|
"input",
|
|
9010
9079
|
{
|
|
9011
9080
|
ref: inputMerged,
|
|
@@ -9045,7 +9114,7 @@ window.Aura = (() => {
|
|
|
9045
9114
|
}, 0);
|
|
9046
9115
|
}
|
|
9047
9116
|
}
|
|
9048
|
-
), props.clearable !== false && value != null && !props.disabled ? /* @__PURE__ */
|
|
9117
|
+
), props.clearable !== false && value != null && !props.disabled ? /* @__PURE__ */ React55.createElement(
|
|
9049
9118
|
"button",
|
|
9050
9119
|
{
|
|
9051
9120
|
type: "button",
|
|
@@ -9058,8 +9127,8 @@ window.Aura = (() => {
|
|
|
9058
9127
|
if (inputRef.current) inputRef.current.focus();
|
|
9059
9128
|
}
|
|
9060
9129
|
},
|
|
9061
|
-
/* @__PURE__ */
|
|
9062
|
-
) : null, /* @__PURE__ */
|
|
9130
|
+
/* @__PURE__ */ React55.createElement(Icon, { name: /* @__PURE__ */ React55.createElement(IconX, null) })
|
|
9131
|
+
) : null, /* @__PURE__ */ React55.createElement(
|
|
9063
9132
|
"button",
|
|
9064
9133
|
{
|
|
9065
9134
|
type: "button",
|
|
@@ -9077,14 +9146,14 @@ window.Aura = (() => {
|
|
|
9077
9146
|
}
|
|
9078
9147
|
}
|
|
9079
9148
|
},
|
|
9080
|
-
/* @__PURE__ */
|
|
9149
|
+
/* @__PURE__ */ React55.createElement(Icon, { name: /* @__PURE__ */ React55.createElement(IconChevronDown, null) })
|
|
9081
9150
|
)),
|
|
9082
9151
|
list
|
|
9083
9152
|
);
|
|
9084
9153
|
});
|
|
9085
9154
|
|
|
9086
9155
|
// src/FileUpload.tsx
|
|
9087
|
-
var
|
|
9156
|
+
var React56 = __toESM(require_react(), 1);
|
|
9088
9157
|
function matches(file, accept) {
|
|
9089
9158
|
if (!accept) return true;
|
|
9090
9159
|
const name = (file.name || "").toLowerCase(), type = (file.type || "").toLowerCase();
|
|
@@ -9108,24 +9177,24 @@ window.Aura = (() => {
|
|
|
9108
9177
|
}).join(", ");
|
|
9109
9178
|
}
|
|
9110
9179
|
var seq = 0;
|
|
9111
|
-
var FileUpload =
|
|
9180
|
+
var FileUpload = React56.forwardRef(function FileUpload2(props, ref) {
|
|
9112
9181
|
const t = useStrings();
|
|
9113
9182
|
const auto = uid(), id = props.id || auto;
|
|
9114
9183
|
const st = useMaybeControlled(props.value, props.defaultValue || [], props.onChange);
|
|
9115
9184
|
const items2 = st[0] || [];
|
|
9116
|
-
const dragState =
|
|
9117
|
-
const inputRef =
|
|
9118
|
-
const urls =
|
|
9185
|
+
const dragState = React56.useState(false), over = dragState[0];
|
|
9186
|
+
const inputRef = React56.useRef(null), inputMerged = useMergedRef(ref, inputRef);
|
|
9187
|
+
const urls = React56.useRef({});
|
|
9119
9188
|
const maxFiles = props.multiple ? props.maxFiles : 1;
|
|
9120
9189
|
const note = t.accepts(describeAccept(props.accept, t), props.maxSize ? formatBytes(props.maxSize) : "");
|
|
9121
|
-
|
|
9190
|
+
React56.useEffect(function() {
|
|
9122
9191
|
return function() {
|
|
9123
9192
|
Object.keys(urls.current).forEach(function(k) {
|
|
9124
9193
|
URL.revokeObjectURL(urls.current[k]);
|
|
9125
9194
|
});
|
|
9126
9195
|
};
|
|
9127
9196
|
}, []);
|
|
9128
|
-
|
|
9197
|
+
React56.useEffect(
|
|
9129
9198
|
function() {
|
|
9130
9199
|
const el = inputRef.current;
|
|
9131
9200
|
if (!el || !props.name || typeof DataTransfer === "undefined") return;
|
|
@@ -9185,7 +9254,7 @@ window.Aura = (() => {
|
|
|
9185
9254
|
if (inputRef.current) inputRef.current.focus();
|
|
9186
9255
|
}
|
|
9187
9256
|
const error = props.error;
|
|
9188
|
-
return /* @__PURE__ */
|
|
9257
|
+
return /* @__PURE__ */ React56.createElement(
|
|
9189
9258
|
Field,
|
|
9190
9259
|
{
|
|
9191
9260
|
id,
|
|
@@ -9197,7 +9266,7 @@ window.Aura = (() => {
|
|
|
9197
9266
|
disabled: props.disabled,
|
|
9198
9267
|
className: props.className
|
|
9199
9268
|
},
|
|
9200
|
-
/* @__PURE__ */
|
|
9269
|
+
/* @__PURE__ */ React56.createElement(
|
|
9201
9270
|
"div",
|
|
9202
9271
|
{
|
|
9203
9272
|
className: cx("aura-upload", over && "is-over", props.disabled && "is-disabled", error && "is-invalid"),
|
|
@@ -9218,9 +9287,9 @@ window.Aura = (() => {
|
|
|
9218
9287
|
add(e.dataTransfer && e.dataTransfer.files);
|
|
9219
9288
|
}
|
|
9220
9289
|
},
|
|
9221
|
-
/* @__PURE__ */
|
|
9222
|
-
/* @__PURE__ */
|
|
9223
|
-
/* @__PURE__ */
|
|
9290
|
+
/* @__PURE__ */ React56.createElement(Icon, { name: /* @__PURE__ */ React56.createElement(IconCloudUpload, null), size: "lg", className: "aura-upload__icon" }),
|
|
9291
|
+
/* @__PURE__ */ React56.createElement("span", { className: "aura-upload__text" }, t.dropFiles, " "),
|
|
9292
|
+
/* @__PURE__ */ React56.createElement(
|
|
9224
9293
|
"input",
|
|
9225
9294
|
{
|
|
9226
9295
|
ref: inputMerged,
|
|
@@ -9242,12 +9311,12 @@ window.Aura = (() => {
|
|
|
9242
9311
|
}
|
|
9243
9312
|
}
|
|
9244
9313
|
),
|
|
9245
|
-
/* @__PURE__ */
|
|
9246
|
-
note ? /* @__PURE__ */
|
|
9314
|
+
/* @__PURE__ */ React56.createElement("span", { className: "aura-upload__browse", "aria-hidden": true }, props.multiple ? t.browse : t.browseOne),
|
|
9315
|
+
note ? /* @__PURE__ */ React56.createElement("span", { className: "aura-upload__note", id: id + "-note" }, note) : null
|
|
9247
9316
|
),
|
|
9248
|
-
items2.length ? /* @__PURE__ */
|
|
9317
|
+
items2.length ? /* @__PURE__ */ React56.createElement("ul", { className: "aura-upload__list", "aria-live": "polite" }, items2.map(function(it) {
|
|
9249
9318
|
const src = thumb(it);
|
|
9250
|
-
return /* @__PURE__ */
|
|
9319
|
+
return /* @__PURE__ */ React56.createElement("li", { key: it.id, className: cx("aura-upload__item", it.error && "is-error") }, src ? /* @__PURE__ */ React56.createElement("img", { className: "aura-upload__thumb", src, alt: "" }) : /* @__PURE__ */ React56.createElement("span", { className: "aura-upload__thumb is-icon", "aria-hidden": true }, /* @__PURE__ */ React56.createElement(Icon, { name: /^image\//.test(it.type || "") ? /* @__PURE__ */ React56.createElement(IconImage, null) : /* @__PURE__ */ React56.createElement(IconFile, null), size: "md" })), /* @__PURE__ */ React56.createElement("span", { className: "aura-upload__meta" }, it.url && !it.error ? /* @__PURE__ */ React56.createElement("a", { className: "aura-upload__name", href: it.url, target: "_blank", rel: "noreferrer" }, it.name) : /* @__PURE__ */ React56.createElement("span", { className: "aura-upload__name" }, it.name), /* @__PURE__ */ React56.createElement("span", { className: "aura-upload__sub" }, it.error ? /* @__PURE__ */ React56.createElement(React56.Fragment, null, /* @__PURE__ */ React56.createElement(Icon, { name: /* @__PURE__ */ React56.createElement(IconCircleAlert, null), size: 12 }), it.error) : it.status === "uploading" ? t.uploading + (it.progress != null ? " " + Math.round(it.progress) + "%" : "") : it.status === "done" ? /* @__PURE__ */ React56.createElement(React56.Fragment, null, /* @__PURE__ */ React56.createElement(Icon, { name: /* @__PURE__ */ React56.createElement(IconCircleCheck, null), size: 12 }), formatBytes(it.size)) : formatBytes(it.size)), it.status === "uploading" ? /* @__PURE__ */ React56.createElement(
|
|
9251
9320
|
"span",
|
|
9252
9321
|
{
|
|
9253
9322
|
className: "aura-upload__bar",
|
|
@@ -9257,11 +9326,11 @@ window.Aura = (() => {
|
|
|
9257
9326
|
"aria-valuemax": 100,
|
|
9258
9327
|
"aria-valuenow": it.progress != null ? Math.round(it.progress) : void 0
|
|
9259
9328
|
},
|
|
9260
|
-
/* @__PURE__ */
|
|
9261
|
-
) : null), /* @__PURE__ */
|
|
9329
|
+
/* @__PURE__ */ React56.createElement("span", { style: { width: (it.progress || 0) + "%" } })
|
|
9330
|
+
) : null), /* @__PURE__ */ React56.createElement(
|
|
9262
9331
|
IconButton,
|
|
9263
9332
|
{
|
|
9264
|
-
icon: /* @__PURE__ */
|
|
9333
|
+
icon: /* @__PURE__ */ React56.createElement(IconX, null),
|
|
9265
9334
|
label: t.remove(it.name),
|
|
9266
9335
|
onClick: function() {
|
|
9267
9336
|
remove(it);
|
|
@@ -9577,9 +9646,9 @@ window.Aura = (() => {
|
|
|
9577
9646
|
}
|
|
9578
9647
|
|
|
9579
9648
|
// src/ThemeStyle.tsx
|
|
9580
|
-
var
|
|
9649
|
+
var React57 = __toESM(require_react(), 1);
|
|
9581
9650
|
function ThemeStyle(props) {
|
|
9582
|
-
const css =
|
|
9651
|
+
const css = React57.useMemo(
|
|
9583
9652
|
function() {
|
|
9584
9653
|
try {
|
|
9585
9654
|
return createTheme({
|
|
@@ -9596,11 +9665,11 @@ window.Aura = (() => {
|
|
|
9596
9665
|
[props.brand, props.signal, props.primary, props.name, props.selector]
|
|
9597
9666
|
);
|
|
9598
9667
|
if (css === null) return null;
|
|
9599
|
-
return /* @__PURE__ */
|
|
9668
|
+
return /* @__PURE__ */ React57.createElement("style", { "data-aura-theme": props.name || props.brand, dangerouslySetInnerHTML: { __html: css } });
|
|
9600
9669
|
}
|
|
9601
9670
|
|
|
9602
9671
|
// src/colorScheme.tsx
|
|
9603
|
-
var
|
|
9672
|
+
var React58 = __toESM(require_react(), 1);
|
|
9604
9673
|
|
|
9605
9674
|
// src/colorSchemeScript.ts
|
|
9606
9675
|
var DEFAULT_KEY = "aura-color-scheme";
|
|
@@ -9617,7 +9686,7 @@ window.Aura = (() => {
|
|
|
9617
9686
|
|
|
9618
9687
|
// src/colorScheme.tsx
|
|
9619
9688
|
function ColorSchemeScript(props) {
|
|
9620
|
-
return /* @__PURE__ */
|
|
9689
|
+
return /* @__PURE__ */ React58.createElement(
|
|
9621
9690
|
"script",
|
|
9622
9691
|
{
|
|
9623
9692
|
"data-aura-color-scheme": "",
|
|
@@ -9642,7 +9711,7 @@ window.Aura = (() => {
|
|
|
9642
9711
|
function useColorScheme(options) {
|
|
9643
9712
|
const key = options && options.storageKey || DEFAULT_KEY;
|
|
9644
9713
|
const fallback = options && options.defaultScheme || "system";
|
|
9645
|
-
const subscribe2 =
|
|
9714
|
+
const subscribe2 = React58.useCallback(
|
|
9646
9715
|
function(cb) {
|
|
9647
9716
|
const mq = window.matchMedia ? window.matchMedia("(prefers-color-scheme: dark)") : null;
|
|
9648
9717
|
function onSystem() {
|
|
@@ -9664,7 +9733,7 @@ window.Aura = (() => {
|
|
|
9664
9733
|
},
|
|
9665
9734
|
[fallback, key]
|
|
9666
9735
|
);
|
|
9667
|
-
const snapshot =
|
|
9736
|
+
const snapshot = React58.useSyncExternalStore(
|
|
9668
9737
|
subscribe2,
|
|
9669
9738
|
function() {
|
|
9670
9739
|
const s = readScheme(fallback);
|
|
@@ -9675,7 +9744,7 @@ window.Aura = (() => {
|
|
|
9675
9744
|
}
|
|
9676
9745
|
);
|
|
9677
9746
|
const parts = snapshot.split("|");
|
|
9678
|
-
const setScheme =
|
|
9747
|
+
const setScheme = React58.useCallback(
|
|
9679
9748
|
function(next) {
|
|
9680
9749
|
if (!valid(next)) return;
|
|
9681
9750
|
try {
|
|
@@ -9694,14 +9763,14 @@ window.Aura = (() => {
|
|
|
9694
9763
|
const cs = useColorScheme(props);
|
|
9695
9764
|
const names = { light: t.schemeLight, dark: t.schemeDark, system: t.schemeSystem };
|
|
9696
9765
|
const label = props.label || t.colorScheme;
|
|
9697
|
-
return /* @__PURE__ */
|
|
9766
|
+
return /* @__PURE__ */ React58.createElement(
|
|
9698
9767
|
DropdownMenu,
|
|
9699
9768
|
{
|
|
9700
9769
|
label,
|
|
9701
|
-
trigger: /* @__PURE__ */
|
|
9770
|
+
trigger: /* @__PURE__ */ React58.createElement(
|
|
9702
9771
|
IconButton,
|
|
9703
9772
|
{
|
|
9704
|
-
icon: cs.resolved === "dark" ? /* @__PURE__ */
|
|
9773
|
+
icon: cs.resolved === "dark" ? /* @__PURE__ */ React58.createElement(IconMoon, null) : /* @__PURE__ */ React58.createElement(IconSun, null),
|
|
9705
9774
|
label: label + ": " + names[cs.scheme]
|
|
9706
9775
|
}
|
|
9707
9776
|
),
|
|
@@ -9719,14 +9788,14 @@ window.Aura = (() => {
|
|
|
9719
9788
|
}
|
|
9720
9789
|
|
|
9721
9790
|
// src/Badge.tsx
|
|
9722
|
-
var
|
|
9723
|
-
var Badge =
|
|
9791
|
+
var React59 = __toESM(require_react(), 1);
|
|
9792
|
+
var Badge = React59.forwardRef(function Badge2(props, ref) {
|
|
9724
9793
|
return badgeElement(props, ref);
|
|
9725
9794
|
});
|
|
9726
9795
|
|
|
9727
9796
|
// src/Progress.tsx
|
|
9728
|
-
var
|
|
9729
|
-
var Progress =
|
|
9797
|
+
var React60 = __toESM(require_react(), 1);
|
|
9798
|
+
var Progress = React60.forwardRef(function Progress2(props, ref) {
|
|
9730
9799
|
const t = useStrings();
|
|
9731
9800
|
const auto = uid(), id = props.id || auto;
|
|
9732
9801
|
const max = props.max || 100, det = props.value != null;
|
|
@@ -9735,7 +9804,7 @@ window.Aura = (() => {
|
|
|
9735
9804
|
const spct = sec ? Math.max(0, Math.min(100 - pct, sec / max * 100)) : 0;
|
|
9736
9805
|
const valueText = props.valueText != null ? props.valueText : props.valueLabel != null ? String(props.valueLabel) : sec ? t.progressReserved(props.value, sec, max) : void 0;
|
|
9737
9806
|
const shown = props.valueLabel != null ? props.valueLabel : det ? Math.round(pct) + "%" : null;
|
|
9738
|
-
return /* @__PURE__ */
|
|
9807
|
+
return /* @__PURE__ */ React60.createElement(
|
|
9739
9808
|
"div",
|
|
9740
9809
|
{
|
|
9741
9810
|
ref,
|
|
@@ -9746,8 +9815,8 @@ window.Aura = (() => {
|
|
|
9746
9815
|
props.className
|
|
9747
9816
|
)
|
|
9748
9817
|
},
|
|
9749
|
-
props.label || props.showValue && shown ? /* @__PURE__ */
|
|
9750
|
-
/* @__PURE__ */
|
|
9818
|
+
props.label || props.showValue && shown ? /* @__PURE__ */ React60.createElement("div", { className: "aura-progress__head" }, props.label ? /* @__PURE__ */ React60.createElement("span", { className: "aura-progress__label", id: id + "-label" }, props.label) : /* @__PURE__ */ React60.createElement("span", null), props.showValue && shown ? /* @__PURE__ */ React60.createElement("span", { className: "aura-progress__value" }, shown) : null) : null,
|
|
9819
|
+
/* @__PURE__ */ React60.createElement(
|
|
9751
9820
|
"div",
|
|
9752
9821
|
{
|
|
9753
9822
|
className: cx("aura-progress__track", !det && "is-indeterminate"),
|
|
@@ -9759,8 +9828,8 @@ window.Aura = (() => {
|
|
|
9759
9828
|
"aria-valuenow": det ? props.value : void 0,
|
|
9760
9829
|
"aria-valuetext": det ? valueText : void 0
|
|
9761
9830
|
},
|
|
9762
|
-
/* @__PURE__ */
|
|
9763
|
-
sec ? /* @__PURE__ */
|
|
9831
|
+
/* @__PURE__ */ React60.createElement("span", { className: "aura-progress__bar", style: det ? { width: pct + "%" } : void 0 }),
|
|
9832
|
+
sec ? /* @__PURE__ */ React60.createElement(
|
|
9764
9833
|
"span",
|
|
9765
9834
|
{
|
|
9766
9835
|
className: "aura-progress__bar aura-progress__bar--reserved",
|
|
@@ -9768,19 +9837,19 @@ window.Aura = (() => {
|
|
|
9768
9837
|
}
|
|
9769
9838
|
) : null
|
|
9770
9839
|
),
|
|
9771
|
-
props.hint ? /* @__PURE__ */
|
|
9840
|
+
props.hint ? /* @__PURE__ */ React60.createElement("p", { className: "aura-progress__hint" }, props.hint) : null
|
|
9772
9841
|
);
|
|
9773
9842
|
});
|
|
9774
9843
|
|
|
9775
9844
|
// src/Skeleton.tsx
|
|
9776
|
-
var
|
|
9777
|
-
var Skeleton =
|
|
9845
|
+
var React61 = __toESM(require_react(), 1);
|
|
9846
|
+
var Skeleton = React61.forwardRef(function Skeleton2(props, ref) {
|
|
9778
9847
|
const v = props.variant || "text";
|
|
9779
9848
|
if (v === "text" && (props.lines || 1) > 1) {
|
|
9780
9849
|
const n3 = props.lines, rows = [];
|
|
9781
9850
|
for (let i = 0; i < n3; i++)
|
|
9782
|
-
rows.push(/* @__PURE__ */
|
|
9783
|
-
return /* @__PURE__ */
|
|
9851
|
+
rows.push(/* @__PURE__ */ React61.createElement("span", { key: i, className: "aura-skel aura-skel--text", style: { width: i === n3 - 1 ? "60%" : "100%" } }));
|
|
9852
|
+
return /* @__PURE__ */ React61.createElement(
|
|
9784
9853
|
"span",
|
|
9785
9854
|
{
|
|
9786
9855
|
ref,
|
|
@@ -9798,17 +9867,17 @@ window.Aura = (() => {
|
|
|
9798
9867
|
if (v === "circle") {
|
|
9799
9868
|
style.width = style.height = props.size || props.width || 40;
|
|
9800
9869
|
}
|
|
9801
|
-
return /* @__PURE__ */
|
|
9870
|
+
return /* @__PURE__ */ React61.createElement("span", { ref, "aria-hidden": true, className: cx("aura-skel", "aura-skel--" + v, props.className), style });
|
|
9802
9871
|
});
|
|
9803
9872
|
|
|
9804
9873
|
// src/EmptyState.tsx
|
|
9805
|
-
var
|
|
9806
|
-
var EmptyState =
|
|
9874
|
+
var React62 = __toESM(require_react(), 1);
|
|
9875
|
+
var EmptyState = React62.forwardRef(function EmptyState2(props, ref) {
|
|
9807
9876
|
return emptyStateElement(props, ref);
|
|
9808
9877
|
});
|
|
9809
9878
|
|
|
9810
9879
|
// src/Pagination.tsx
|
|
9811
|
-
var
|
|
9880
|
+
var React63 = __toESM(require_react(), 1);
|
|
9812
9881
|
function pageList(page, count, sib) {
|
|
9813
9882
|
let out = [], lo = Math.max(2, page - sib), hi = Math.min(count - 1, page + sib);
|
|
9814
9883
|
if (page - sib <= 3) {
|
|
@@ -9828,7 +9897,7 @@ window.Aura = (() => {
|
|
|
9828
9897
|
if (count > 1) out.push(count);
|
|
9829
9898
|
return out;
|
|
9830
9899
|
}
|
|
9831
|
-
var Pagination =
|
|
9900
|
+
var Pagination = React63.forwardRef(function Pagination2(props, ref) {
|
|
9832
9901
|
const t = useStrings();
|
|
9833
9902
|
useAutoTip();
|
|
9834
9903
|
const count = Math.max(1, props.pageCount || 1);
|
|
@@ -9848,7 +9917,7 @@ window.Aura = (() => {
|
|
|
9848
9917
|
},
|
|
9849
9918
|
extra
|
|
9850
9919
|
);
|
|
9851
|
-
return link ? /* @__PURE__ */
|
|
9920
|
+
return link ? /* @__PURE__ */ React63.createElement(
|
|
9852
9921
|
Link,
|
|
9853
9922
|
{
|
|
9854
9923
|
href: link(p),
|
|
@@ -9861,7 +9930,7 @@ window.Aura = (() => {
|
|
|
9861
9930
|
...common
|
|
9862
9931
|
},
|
|
9863
9932
|
label
|
|
9864
|
-
) : /* @__PURE__ */
|
|
9933
|
+
) : /* @__PURE__ */ React63.createElement(
|
|
9865
9934
|
"button",
|
|
9866
9935
|
{
|
|
9867
9936
|
type: "button",
|
|
@@ -9875,7 +9944,7 @@ window.Aura = (() => {
|
|
|
9875
9944
|
}
|
|
9876
9945
|
function arrow(p, icon, label, rel, disabled) {
|
|
9877
9946
|
if (!link || disabled)
|
|
9878
|
-
return /* @__PURE__ */
|
|
9947
|
+
return /* @__PURE__ */ React63.createElement(
|
|
9879
9948
|
IconButton,
|
|
9880
9949
|
{
|
|
9881
9950
|
icon,
|
|
@@ -9886,7 +9955,7 @@ window.Aura = (() => {
|
|
|
9886
9955
|
}
|
|
9887
9956
|
}
|
|
9888
9957
|
);
|
|
9889
|
-
return /* @__PURE__ */
|
|
9958
|
+
return /* @__PURE__ */ React63.createElement(
|
|
9890
9959
|
Link,
|
|
9891
9960
|
{
|
|
9892
9961
|
href: link(p),
|
|
@@ -9901,17 +9970,17 @@ window.Aura = (() => {
|
|
|
9901
9970
|
}
|
|
9902
9971
|
}
|
|
9903
9972
|
},
|
|
9904
|
-
/* @__PURE__ */
|
|
9973
|
+
/* @__PURE__ */ React63.createElement(Icon, { name: icon, size: "sm" })
|
|
9905
9974
|
);
|
|
9906
9975
|
}
|
|
9907
|
-
return /* @__PURE__ */
|
|
9908
|
-
return typeof p === "number" ? /* @__PURE__ */
|
|
9909
|
-
})), /* @__PURE__ */
|
|
9976
|
+
return /* @__PURE__ */ React63.createElement("nav", { ref, className: cx("aura-pagination", props.className), "aria-label": props.label || t.pagination }, arrow(page - 1, /* @__PURE__ */ React63.createElement(IconChevronLeft, null), t.prevPage, "prev", page <= 1), /* @__PURE__ */ React63.createElement("ol", { className: "aura-pagination__list" }, pageList(page, count, props.siblingCount == null ? 1 : props.siblingCount).map(function(p) {
|
|
9977
|
+
return typeof p === "number" ? /* @__PURE__ */ React63.createElement("li", { key: p }, item(p, p)) : /* @__PURE__ */ React63.createElement("li", { key: p, className: "aura-pagination__gap", "aria-hidden": true }, "\u2026");
|
|
9978
|
+
})), /* @__PURE__ */ React63.createElement("span", { className: "aura-pagination__compact", "aria-hidden": true }, t.page(page, count)), arrow(page + 1, /* @__PURE__ */ React63.createElement(IconChevronRight, null), t.nextPage, "next", page >= count));
|
|
9910
9979
|
});
|
|
9911
9980
|
|
|
9912
9981
|
// src/Accordion.tsx
|
|
9913
|
-
var
|
|
9914
|
-
var Accordion =
|
|
9982
|
+
var React64 = __toESM(require_react(), 1);
|
|
9983
|
+
var Accordion = React64.forwardRef(function Accordion2(props, ref) {
|
|
9915
9984
|
const auto = uid(), base = props.id || auto;
|
|
9916
9985
|
const multiple = props.type === "multiple";
|
|
9917
9986
|
const st = useMaybeControlled(
|
|
@@ -9949,9 +10018,9 @@ window.Aura = (() => {
|
|
|
9949
10018
|
n3.focus();
|
|
9950
10019
|
}
|
|
9951
10020
|
}
|
|
9952
|
-
return /* @__PURE__ */
|
|
10021
|
+
return /* @__PURE__ */ React64.createElement("div", { ref, className: cx("aura-accordion", props.className), onKeyDown: onKey }, items2.map(function(it) {
|
|
9953
10022
|
const on = open.indexOf(it.id) >= 0, bid = base + "-btn-" + it.id, pid = base + "-panel-" + it.id;
|
|
9954
|
-
return /* @__PURE__ */
|
|
10023
|
+
return /* @__PURE__ */ React64.createElement("div", { key: it.id, className: cx("aura-accordion__item", on && "is-open") }, /* @__PURE__ */ React64.createElement(HT, { className: "aura-accordion__heading" }, /* @__PURE__ */ React64.createElement(
|
|
9955
10024
|
"button",
|
|
9956
10025
|
{
|
|
9957
10026
|
type: "button",
|
|
@@ -9964,10 +10033,10 @@ window.Aura = (() => {
|
|
|
9964
10033
|
toggle(it.id);
|
|
9965
10034
|
}
|
|
9966
10035
|
},
|
|
9967
|
-
it.icon ? /* @__PURE__ */
|
|
9968
|
-
/* @__PURE__ */
|
|
9969
|
-
/* @__PURE__ */
|
|
9970
|
-
)), /* @__PURE__ */
|
|
10036
|
+
it.icon ? /* @__PURE__ */ React64.createElement(Icon, { name: it.icon, className: "aura-accordion__lead" }) : null,
|
|
10037
|
+
/* @__PURE__ */ React64.createElement("span", { className: "aura-accordion__title" }, /* @__PURE__ */ React64.createElement("span", { id: it.description ? bid + "-title" : void 0 }, it.title), it.description ? /* @__PURE__ */ React64.createElement("span", { className: "aura-accordion__desc", id: bid + "-desc", "aria-hidden": true }, it.description) : null),
|
|
10038
|
+
/* @__PURE__ */ React64.createElement(Icon, { name: /* @__PURE__ */ React64.createElement(IconChevronDown, null), className: "aura-accordion__chevron" })
|
|
10039
|
+
)), /* @__PURE__ */ React64.createElement(
|
|
9971
10040
|
"div",
|
|
9972
10041
|
{
|
|
9973
10042
|
id: pid,
|
|
@@ -9982,7 +10051,7 @@ window.Aura = (() => {
|
|
|
9982
10051
|
});
|
|
9983
10052
|
|
|
9984
10053
|
// src/Popover.tsx
|
|
9985
|
-
var
|
|
10054
|
+
var React65 = __toESM(require_react(), 1);
|
|
9986
10055
|
var import_react_dom13 = __toESM(require_react_dom(), 1);
|
|
9987
10056
|
function position(anchor, pop, placement) {
|
|
9988
10057
|
const r2 = anchor.getBoundingClientRect(), pw = pop.offsetWidth, ph = pop.scrollHeight, vw = window.innerWidth, vh = window.innerHeight, gap = 6;
|
|
@@ -10000,15 +10069,15 @@ window.Aura = (() => {
|
|
|
10000
10069
|
const left = align === "end" ? r2.right - pw : align === "center" ? r2.left + r2.width / 2 - pw / 2 : r2.left;
|
|
10001
10070
|
return { top: Math.max(8, top), left: Math.max(8, Math.min(left, vw - pw - 8)), side, maxHeight };
|
|
10002
10071
|
}
|
|
10003
|
-
var Popover =
|
|
10072
|
+
var Popover = React65.forwardRef(function Popover2(props, ref) {
|
|
10004
10073
|
const t = useStrings();
|
|
10005
10074
|
const density = useDensity();
|
|
10006
10075
|
const auto = uid(), id = props.id || auto;
|
|
10007
10076
|
const st = useMaybeControlled(props.open, !!props.defaultOpen, props.onOpenChange);
|
|
10008
10077
|
const open = !!st[0];
|
|
10009
|
-
const wrap =
|
|
10010
|
-
const pos =
|
|
10011
|
-
const inTree =
|
|
10078
|
+
const wrap = React65.useRef(null), pop = React65.useRef(null), popMerged = useMergedRef(ref, pop);
|
|
10079
|
+
const pos = React65.useState(null), mounted = useMounted();
|
|
10080
|
+
const inTree = React65.useRef(false);
|
|
10012
10081
|
function trigger() {
|
|
10013
10082
|
return wrap.current && (wrap.current.querySelector('button, [role="button"], a, input') || wrap.current.firstElementChild);
|
|
10014
10083
|
}
|
|
@@ -10035,7 +10104,7 @@ window.Aura = (() => {
|
|
|
10035
10104
|
},
|
|
10036
10105
|
[open, mounted, props.placement]
|
|
10037
10106
|
);
|
|
10038
|
-
|
|
10107
|
+
React65.useEffect(
|
|
10039
10108
|
function() {
|
|
10040
10109
|
if (!open || !mounted) return;
|
|
10041
10110
|
if (props.autoFocus !== false && pop.current) {
|
|
@@ -10060,9 +10129,9 @@ window.Aura = (() => {
|
|
|
10060
10129
|
},
|
|
10061
10130
|
[open, mounted]
|
|
10062
10131
|
);
|
|
10063
|
-
const child =
|
|
10132
|
+
const child = React65.Children.only(props.trigger);
|
|
10064
10133
|
const panel = open && mounted ? (0, import_react_dom13.createPortal)(
|
|
10065
|
-
/* @__PURE__ */
|
|
10134
|
+
/* @__PURE__ */ React65.createElement(
|
|
10066
10135
|
"div",
|
|
10067
10136
|
{
|
|
10068
10137
|
ref: popMerged,
|
|
@@ -10092,17 +10161,17 @@ window.Aura = (() => {
|
|
|
10092
10161
|
} else trapTab(e, pop.current);
|
|
10093
10162
|
}
|
|
10094
10163
|
},
|
|
10095
|
-
props.title ? /* @__PURE__ */
|
|
10164
|
+
props.title ? /* @__PURE__ */ React65.createElement("div", { className: "aura-popover__head" }, /* @__PURE__ */ React65.createElement("p", { className: "aura-popover__title", id: id + "-title" }, props.title), /* @__PURE__ */ React65.createElement(
|
|
10096
10165
|
IconButton,
|
|
10097
10166
|
{
|
|
10098
|
-
icon: /* @__PURE__ */
|
|
10167
|
+
icon: /* @__PURE__ */ React65.createElement(IconX, null),
|
|
10099
10168
|
label: t.close,
|
|
10100
10169
|
onClick: function() {
|
|
10101
10170
|
close(true);
|
|
10102
10171
|
}
|
|
10103
10172
|
}
|
|
10104
10173
|
)) : null,
|
|
10105
|
-
/* @__PURE__ */
|
|
10174
|
+
/* @__PURE__ */ React65.createElement("div", { className: "aura-popover__body" }, typeof props.children === "function" ? props.children({
|
|
10106
10175
|
close: function() {
|
|
10107
10176
|
close(true);
|
|
10108
10177
|
}
|
|
@@ -10110,7 +10179,7 @@ window.Aura = (() => {
|
|
|
10110
10179
|
),
|
|
10111
10180
|
document.body
|
|
10112
10181
|
) : null;
|
|
10113
|
-
return /* @__PURE__ */
|
|
10182
|
+
return /* @__PURE__ */ React65.createElement("span", { ref: wrap, className: "aura-popover-anchor" }, React65.cloneElement(child, {
|
|
10114
10183
|
onClick: function(e) {
|
|
10115
10184
|
if (child.props.onClick) child.props.onClick(e);
|
|
10116
10185
|
st[1](!open);
|
|
@@ -10122,7 +10191,7 @@ window.Aura = (() => {
|
|
|
10122
10191
|
});
|
|
10123
10192
|
|
|
10124
10193
|
// src/NumberField.tsx
|
|
10125
|
-
var
|
|
10194
|
+
var React66 = __toESM(require_react(), 1);
|
|
10126
10195
|
function decimalsOf(n3) {
|
|
10127
10196
|
const s = String(n3);
|
|
10128
10197
|
const i = s.indexOf(".");
|
|
@@ -10135,7 +10204,7 @@ window.Aura = (() => {
|
|
|
10135
10204
|
if (!/^-?(\d+\.?\d*|\.\d+)$/.test(s)) return NaN;
|
|
10136
10205
|
return Number(s);
|
|
10137
10206
|
}
|
|
10138
|
-
var NumberField =
|
|
10207
|
+
var NumberField = React66.forwardRef(function NumberField2(props, ref) {
|
|
10139
10208
|
const t = useStrings();
|
|
10140
10209
|
const auto = uid(), id = props.id || auto;
|
|
10141
10210
|
const step = props.step || 1;
|
|
@@ -10146,7 +10215,7 @@ window.Aura = (() => {
|
|
|
10146
10215
|
props.onChange
|
|
10147
10216
|
);
|
|
10148
10217
|
const value = st[0], setValue = st[1];
|
|
10149
|
-
const draftState =
|
|
10218
|
+
const draftState = React66.useState(null), draft = draftState[0], setDraft = draftState[1];
|
|
10150
10219
|
function fmt2(n3) {
|
|
10151
10220
|
if (n3 == null || isNaN(n3)) return "";
|
|
10152
10221
|
return n3.toLocaleString("en", { minimumFractionDigits: decimals, maximumFractionDigits: decimals });
|
|
@@ -10195,7 +10264,7 @@ window.Aura = (() => {
|
|
|
10195
10264
|
};
|
|
10196
10265
|
const valueText = value == null ? void 0 : [affixText(props.prefix), fmt2(value), affixText(props.suffix)].join(" ").trim();
|
|
10197
10266
|
const stepper = props.stepper !== false && !props.readOnly;
|
|
10198
|
-
return /* @__PURE__ */
|
|
10267
|
+
return /* @__PURE__ */ React66.createElement(
|
|
10199
10268
|
Field,
|
|
10200
10269
|
{
|
|
10201
10270
|
id,
|
|
@@ -10207,7 +10276,7 @@ window.Aura = (() => {
|
|
|
10207
10276
|
disabled: props.disabled,
|
|
10208
10277
|
className: cx(touchClass(props.touchHeight), props.className)
|
|
10209
10278
|
},
|
|
10210
|
-
/* @__PURE__ */
|
|
10279
|
+
/* @__PURE__ */ React66.createElement("div", { className: cx("aura-input aura-number", stepper && "has-stepper") }, props.prefix != null ? /* @__PURE__ */ React66.createElement("span", { className: "aura-number__affix", "aria-hidden": true }, props.prefix) : null, /* @__PURE__ */ React66.createElement(
|
|
10211
10280
|
"input",
|
|
10212
10281
|
{
|
|
10213
10282
|
ref,
|
|
@@ -10254,7 +10323,7 @@ window.Aura = (() => {
|
|
|
10254
10323
|
},
|
|
10255
10324
|
onKeyDown
|
|
10256
10325
|
}
|
|
10257
|
-
), props.suffix != null ? /* @__PURE__ */
|
|
10326
|
+
), props.suffix != null ? /* @__PURE__ */ React66.createElement("span", { className: "aura-number__affix", "aria-hidden": true }, props.suffix) : null, stepper ? /* @__PURE__ */ React66.createElement("span", { className: "aura-number__steps" }, /* @__PURE__ */ React66.createElement(
|
|
10258
10327
|
"button",
|
|
10259
10328
|
{
|
|
10260
10329
|
type: "button",
|
|
@@ -10270,8 +10339,8 @@ window.Aura = (() => {
|
|
|
10270
10339
|
nudge(-step);
|
|
10271
10340
|
}
|
|
10272
10341
|
},
|
|
10273
|
-
/* @__PURE__ */
|
|
10274
|
-
), /* @__PURE__ */
|
|
10342
|
+
/* @__PURE__ */ React66.createElement(Icon, { name: /* @__PURE__ */ React66.createElement(IconMinus, null) })
|
|
10343
|
+
), /* @__PURE__ */ React66.createElement(
|
|
10275
10344
|
"button",
|
|
10276
10345
|
{
|
|
10277
10346
|
type: "button",
|
|
@@ -10287,14 +10356,14 @@ window.Aura = (() => {
|
|
|
10287
10356
|
nudge(step);
|
|
10288
10357
|
}
|
|
10289
10358
|
},
|
|
10290
|
-
/* @__PURE__ */
|
|
10359
|
+
/* @__PURE__ */ React66.createElement(Icon, { name: /* @__PURE__ */ React66.createElement(IconPlus, null) })
|
|
10291
10360
|
)) : null)
|
|
10292
10361
|
);
|
|
10293
10362
|
});
|
|
10294
10363
|
|
|
10295
10364
|
// src/Stepper.tsx
|
|
10296
|
-
var
|
|
10297
|
-
var Stepper =
|
|
10365
|
+
var React67 = __toESM(require_react(), 1);
|
|
10366
|
+
var Stepper = React67.forwardRef(function Stepper2(props, ref) {
|
|
10298
10367
|
const t = useStrings();
|
|
10299
10368
|
const idBase = uid();
|
|
10300
10369
|
const steps = props.steps || [];
|
|
@@ -10305,22 +10374,22 @@ window.Aura = (() => {
|
|
|
10305
10374
|
if (at < 0) at = 0;
|
|
10306
10375
|
const vertical = props.orientation === "vertical";
|
|
10307
10376
|
const cur2 = steps[at];
|
|
10308
|
-
return /* @__PURE__ */
|
|
10377
|
+
return /* @__PURE__ */ React67.createElement(
|
|
10309
10378
|
"nav",
|
|
10310
10379
|
{
|
|
10311
10380
|
ref,
|
|
10312
10381
|
"aria-label": props.label,
|
|
10313
10382
|
className: cx("aura-stepper", vertical ? "aura-stepper--vertical" : "aura-stepper--horizontal", props.className)
|
|
10314
10383
|
},
|
|
10315
|
-
/* @__PURE__ */
|
|
10384
|
+
/* @__PURE__ */ React67.createElement("ol", { className: "aura-stepper__list" }, steps.map(function(s, i) {
|
|
10316
10385
|
const state = i < at ? "done" : i === at ? "current" : "upcoming";
|
|
10317
10386
|
const error = s.status === "error";
|
|
10318
|
-
const marker = /* @__PURE__ */
|
|
10387
|
+
const marker = /* @__PURE__ */ React67.createElement("span", { className: "aura-stepper__marker", "aria-hidden": true }, error ? /* @__PURE__ */ React67.createElement(Icon, { name: /* @__PURE__ */ React67.createElement(IconCircleAlert, null) }) : state === "done" ? /* @__PURE__ */ React67.createElement(Icon, { name: /* @__PURE__ */ React67.createElement(IconCheck, null) }) : i + 1);
|
|
10319
10388
|
const note = error ? t.stepError : state === "done" ? t.stepDone : "";
|
|
10320
10389
|
const clickable = state === "done" && !!props.onStepClick;
|
|
10321
10390
|
const named = clickable && (typeof s.label === "string" || typeof s.label === "number") && String(s.label).trim() !== "";
|
|
10322
10391
|
const descId = idBase + "-step-" + i;
|
|
10323
|
-
const text2 = /* @__PURE__ */
|
|
10392
|
+
const text2 = /* @__PURE__ */ React67.createElement("span", { className: "aura-stepper__text" }, named ? /* @__PURE__ */ React67.createElement("span", { className: "aura-sr-only" }, String(s.label) + (note ? ", " + note : "")) : null, /* @__PURE__ */ React67.createElement("span", { className: "aura-stepper__label", "aria-hidden": named ? true : void 0 }, s.label, note && !named ? /* @__PURE__ */ React67.createElement("span", { className: "aura-sr-only" }, ", " + note) : null), s.description ? /* @__PURE__ */ React67.createElement(
|
|
10324
10393
|
"span",
|
|
10325
10394
|
{
|
|
10326
10395
|
className: "aura-stepper__desc",
|
|
@@ -10329,14 +10398,14 @@ window.Aura = (() => {
|
|
|
10329
10398
|
},
|
|
10330
10399
|
s.description
|
|
10331
10400
|
) : null);
|
|
10332
|
-
return /* @__PURE__ */
|
|
10401
|
+
return /* @__PURE__ */ React67.createElement(
|
|
10333
10402
|
"li",
|
|
10334
10403
|
{
|
|
10335
10404
|
key: s.id,
|
|
10336
10405
|
className: cx("aura-stepper__item", "is-" + state, error && "is-error"),
|
|
10337
10406
|
"aria-current": state === "current" ? "step" : void 0
|
|
10338
10407
|
},
|
|
10339
|
-
clickable ? /* @__PURE__ */
|
|
10408
|
+
clickable ? /* @__PURE__ */ React67.createElement(
|
|
10340
10409
|
"button",
|
|
10341
10410
|
{
|
|
10342
10411
|
type: "button",
|
|
@@ -10348,19 +10417,19 @@ window.Aura = (() => {
|
|
|
10348
10417
|
},
|
|
10349
10418
|
marker,
|
|
10350
10419
|
text2
|
|
10351
|
-
) : /* @__PURE__ */
|
|
10420
|
+
) : /* @__PURE__ */ React67.createElement("span", { className: "aura-stepper__step" }, marker, text2)
|
|
10352
10421
|
);
|
|
10353
10422
|
})),
|
|
10354
|
-
!vertical && cur2 ? /* @__PURE__ */
|
|
10423
|
+
!vertical && cur2 ? /* @__PURE__ */ React67.createElement("p", { className: "aura-stepper__compact", "aria-hidden": true }, /* @__PURE__ */ React67.createElement("span", { className: "aura-stepper__count" }, t.stepOf(at + 1, steps.length), cur2.status === "error" ? /* @__PURE__ */ React67.createElement("span", { className: "aura-stepper__count-error" }, " \u2014 " + t.stepError) : null), /* @__PURE__ */ React67.createElement("span", { className: "aura-stepper__compact-label" }, cur2.label)) : null
|
|
10355
10424
|
);
|
|
10356
10425
|
});
|
|
10357
10426
|
|
|
10358
10427
|
// src/SegmentedControl.tsx
|
|
10359
|
-
var
|
|
10428
|
+
var React68 = __toESM(require_react(), 1);
|
|
10360
10429
|
function toOpt2(o) {
|
|
10361
10430
|
return typeof o === "object" ? o : { value: o, label: o };
|
|
10362
10431
|
}
|
|
10363
|
-
var SegmentedControl =
|
|
10432
|
+
var SegmentedControl = React68.forwardRef(
|
|
10364
10433
|
function SegmentedControl2(props, ref) {
|
|
10365
10434
|
const options = (props.options || []).map(toOpt2);
|
|
10366
10435
|
useAutoTip();
|
|
@@ -10374,7 +10443,7 @@ window.Aura = (() => {
|
|
|
10374
10443
|
);
|
|
10375
10444
|
const value = st[0], setValue = st[1];
|
|
10376
10445
|
const auto = uid(), id = props.id || auto;
|
|
10377
|
-
const refs =
|
|
10446
|
+
const refs = React68.useRef([]);
|
|
10378
10447
|
const selIdx = options.findIndex(function(o) {
|
|
10379
10448
|
return o.value === value;
|
|
10380
10449
|
});
|
|
@@ -10407,7 +10476,7 @@ window.Aura = (() => {
|
|
|
10407
10476
|
move(options.length, -1);
|
|
10408
10477
|
}
|
|
10409
10478
|
}
|
|
10410
|
-
return /* @__PURE__ */
|
|
10479
|
+
return /* @__PURE__ */ React68.createElement(
|
|
10411
10480
|
"div",
|
|
10412
10481
|
{
|
|
10413
10482
|
ref,
|
|
@@ -10427,7 +10496,7 @@ window.Aura = (() => {
|
|
|
10427
10496
|
options.map(function(o, i) {
|
|
10428
10497
|
const on = o.value === value;
|
|
10429
10498
|
const off = props.disabled || o.disabled;
|
|
10430
|
-
return /* @__PURE__ */
|
|
10499
|
+
return /* @__PURE__ */ React68.createElement(
|
|
10431
10500
|
"button",
|
|
10432
10501
|
{
|
|
10433
10502
|
key: o.value,
|
|
@@ -10449,8 +10518,8 @@ window.Aura = (() => {
|
|
|
10449
10518
|
onKeyDown(e, i);
|
|
10450
10519
|
}
|
|
10451
10520
|
},
|
|
10452
|
-
o.icon ? /* @__PURE__ */
|
|
10453
|
-
o.iconOnly ? null : /* @__PURE__ */
|
|
10521
|
+
o.icon ? /* @__PURE__ */ React68.createElement(Icon, { name: o.icon }) : null,
|
|
10522
|
+
o.iconOnly ? null : /* @__PURE__ */ React68.createElement("span", null, o.label)
|
|
10454
10523
|
);
|
|
10455
10524
|
})
|
|
10456
10525
|
);
|