@jirawatpyk/aura-react 5.44.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 +20 -0
- package/dist/aura.bundle.js +293 -225
- package/dist/cjs/index.cjs +293 -225
- 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 +13 -0
- package/dist/index.d.ts +13 -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 +39 -0
- package/dist/styles.layer.css +39 -0
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -68,7 +68,7 @@ __export(index_exports, {
|
|
|
68
68
|
IconButton: () => IconButton,
|
|
69
69
|
Menu: () => Menu,
|
|
70
70
|
NumberField: () => NumberField,
|
|
71
|
-
PageHeader: () =>
|
|
71
|
+
PageHeader: () => PageHeader3,
|
|
72
72
|
Pagination: () => Pagination,
|
|
73
73
|
PasswordField: () => PasswordField,
|
|
74
74
|
Popover: () => Popover,
|
|
@@ -6835,8 +6835,8 @@ var DataTableImpl = React33.forwardRef(function DataTable(props, ref) {
|
|
|
6835
6835
|
}
|
|
6836
6836
|
);
|
|
6837
6837
|
};
|
|
6838
|
-
const
|
|
6839
|
-
for (let b = 0; b < lines; b++)
|
|
6838
|
+
const bars2 = [];
|
|
6839
|
+
for (let b = 0; b < lines; b++) bars2.push(bar(b));
|
|
6840
6840
|
sk.push(
|
|
6841
6841
|
/* @__PURE__ */ React33.createElement(
|
|
6842
6842
|
"span",
|
|
@@ -6860,7 +6860,7 @@ var DataTableImpl = React33.forwardRef(function DataTable(props, ref) {
|
|
|
6860
6860
|
c.skeletonTouch && "is-touch"
|
|
6861
6861
|
)
|
|
6862
6862
|
}
|
|
6863
|
-
) : lines > 1 ? /* @__PURE__ */ React33.createElement("span", { className: "aura-skel-lines" },
|
|
6863
|
+
) : lines > 1 ? /* @__PURE__ */ React33.createElement("span", { className: "aura-skel-lines" }, bars2) : bars2[0]
|
|
6864
6864
|
)
|
|
6865
6865
|
);
|
|
6866
6866
|
});
|
|
@@ -7802,6 +7802,9 @@ var Container = React42.forwardRef(function Container2(props, ref) {
|
|
|
7802
7802
|
);
|
|
7803
7803
|
});
|
|
7804
7804
|
|
|
7805
|
+
// src/PageHeaderClient.tsx
|
|
7806
|
+
var React44 = __toESM(require("react"), 1);
|
|
7807
|
+
|
|
7805
7808
|
// src/PageHeader.tsx
|
|
7806
7809
|
var React43 = __toESM(require("react"), 1);
|
|
7807
7810
|
var h8 = React43.createElement;
|
|
@@ -7815,6 +7818,8 @@ var PageHeader = React43.forwardRef(function PageHeader2(props, ref) {
|
|
|
7815
7818
|
const below2 = props.actionsFullWidthBelow;
|
|
7816
7819
|
const hide2 = props.titleHideBelow;
|
|
7817
7820
|
const hasMeta = props.meta != null && props.meta !== false;
|
|
7821
|
+
const hasActions = props.actions != null && props.actions !== false;
|
|
7822
|
+
const bar = hasActions && (props.actionsBarBelow === "sm" || props.actionsBarBelow === "md") ? props.actionsBarBelow : null;
|
|
7818
7823
|
return h8(
|
|
7819
7824
|
"div",
|
|
7820
7825
|
Object.assign(attrs2, {
|
|
@@ -7824,6 +7829,7 @@ var PageHeader = React43.forwardRef(function PageHeader2(props, ref) {
|
|
|
7824
7829
|
(below2 === "sm" || below2 === "md" || below2 === "lg") && "aura-page-header--actions-full-below-" + below2,
|
|
7825
7830
|
(hide2 === "sm" || hide2 === "md" || hide2 === "lg") && "aura-page-header--title-hide-below-" + hide2,
|
|
7826
7831
|
(hide2 === "sm" || hide2 === "md" || hide2 === "lg") && !hasMeta && "has-no-meta",
|
|
7832
|
+
bar && "aura-page-header--actions-bar-below-" + bar,
|
|
7827
7833
|
props.className
|
|
7828
7834
|
),
|
|
7829
7835
|
style: props.style
|
|
@@ -7836,16 +7842,78 @@ var PageHeader = React43.forwardRef(function PageHeader2(props, ref) {
|
|
|
7836
7842
|
h8("h" + level, { className: "aura-page-header__title", id: props.titleId }, props.title),
|
|
7837
7843
|
props.meta != null && props.meta !== false ? h8("div", { className: "aura-page-header__meta" }, props.meta) : null
|
|
7838
7844
|
),
|
|
7839
|
-
props.actions != null && props.actions !== false ? h8(
|
|
7845
|
+
props.actions != null && props.actions !== false ? h8(
|
|
7846
|
+
"div",
|
|
7847
|
+
{ className: "aura-page-header__actions" },
|
|
7848
|
+
bar && props.actionsStatus != null && props.actionsStatus !== false ? h8("div", { className: "aura-page-header__status", role: "status" }, props.actionsStatus) : null,
|
|
7849
|
+
props.actions
|
|
7850
|
+
) : null
|
|
7851
|
+
);
|
|
7852
|
+
});
|
|
7853
|
+
|
|
7854
|
+
// src/PageHeaderClient.tsx
|
|
7855
|
+
var NAME = "--aura-page-actions-height";
|
|
7856
|
+
var bars = [];
|
|
7857
|
+
function trapped(el) {
|
|
7858
|
+
for (let p = el.parentElement; p && p !== document.documentElement; p = p.parentElement) {
|
|
7859
|
+
const s = getComputedStyle(p);
|
|
7860
|
+
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))
|
|
7861
|
+
return true;
|
|
7862
|
+
}
|
|
7863
|
+
return false;
|
|
7864
|
+
}
|
|
7865
|
+
var PageHeader3 = React44.forwardRef(function PageHeader4(props, ref) {
|
|
7866
|
+
const own = React44.useRef(null);
|
|
7867
|
+
const merged = useMergedRef(ref, own);
|
|
7868
|
+
const bar = props.actionsBarBelow;
|
|
7869
|
+
const hasActions = props.actions != null && props.actions !== false;
|
|
7870
|
+
React44.useEffect(
|
|
7871
|
+
function() {
|
|
7872
|
+
if (bar !== "sm" && bar !== "md" || !hasActions || !own.current) return;
|
|
7873
|
+
const el = own.current.querySelector(":scope > .aura-page-header__actions");
|
|
7874
|
+
if (!el) return;
|
|
7875
|
+
const root = document.documentElement;
|
|
7876
|
+
let checked = false;
|
|
7877
|
+
function sync() {
|
|
7878
|
+
if (bars[bars.length - 1] !== sync) return;
|
|
7879
|
+
if (getComputedStyle(el).position === "fixed") {
|
|
7880
|
+
root.style.setProperty(NAME, el.offsetHeight + "px");
|
|
7881
|
+
if (!checked && (checked = true, trapped(el)))
|
|
7882
|
+
devWarnOnce(
|
|
7883
|
+
"pageheader-bar-trapped",
|
|
7884
|
+
"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."
|
|
7885
|
+
);
|
|
7886
|
+
} else root.style.removeProperty(NAME);
|
|
7887
|
+
}
|
|
7888
|
+
if (bars.length)
|
|
7889
|
+
devWarnOnce(
|
|
7890
|
+
"pageheader-bar-twice",
|
|
7891
|
+
"PageHeader actionsBarBelow: two bars on one page overlap at the bottom of the screen. Give it to one PageHeader per page."
|
|
7892
|
+
);
|
|
7893
|
+
bars.push(sync);
|
|
7894
|
+
const ro = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(sync);
|
|
7895
|
+
if (ro) ro.observe(el);
|
|
7896
|
+
window.addEventListener("resize", sync);
|
|
7897
|
+
sync();
|
|
7898
|
+
return function() {
|
|
7899
|
+
if (ro) ro.disconnect();
|
|
7900
|
+
window.removeEventListener("resize", sync);
|
|
7901
|
+
bars.splice(bars.indexOf(sync), 1);
|
|
7902
|
+
if (bars.length) bars[bars.length - 1]();
|
|
7903
|
+
else root.style.removeProperty(NAME);
|
|
7904
|
+
};
|
|
7905
|
+
},
|
|
7906
|
+
[bar, hasActions]
|
|
7840
7907
|
);
|
|
7908
|
+
return /* @__PURE__ */ React44.createElement(PageHeader, { ...props, ref: merged });
|
|
7841
7909
|
});
|
|
7842
7910
|
|
|
7843
7911
|
// src/StatusTile.tsx
|
|
7844
|
-
var
|
|
7912
|
+
var React46 = __toESM(require("react"), 1);
|
|
7845
7913
|
|
|
7846
7914
|
// src/tiles.tsx
|
|
7847
|
-
var
|
|
7848
|
-
var h9 =
|
|
7915
|
+
var React45 = __toESM(require("react"), 1);
|
|
7916
|
+
var h9 = React45.createElement;
|
|
7849
7917
|
var STATUS_ICON = {
|
|
7850
7918
|
down: IconCircleAlert,
|
|
7851
7919
|
problem: IconTriangleAlert,
|
|
@@ -7937,7 +8005,7 @@ function statusTileElement(props, ref, Link, t, titleRef) {
|
|
|
7937
8005
|
) : null
|
|
7938
8006
|
);
|
|
7939
8007
|
}
|
|
7940
|
-
var TileGrid =
|
|
8008
|
+
var TileGrid = React45.forwardRef(function TileGrid2(props, ref) {
|
|
7941
8009
|
const style = Object.assign(
|
|
7942
8010
|
{},
|
|
7943
8011
|
respVars("aura-grid-cols", props.columns == null ? { base: 2, md: 3 } : props.columns),
|
|
@@ -7953,16 +8021,16 @@ var TileGrid = React44.forwardRef(function TileGrid2(props, ref) {
|
|
|
7953
8021
|
}),
|
|
7954
8022
|
/* toArray drops null and booleans and keys each element; a Fragment's children are items too. */
|
|
7955
8023
|
flat(props.children).map(function(c, i) {
|
|
7956
|
-
return h9("li", { key:
|
|
8024
|
+
return h9("li", { key: React45.isValidElement(c) && c.key != null ? c.key : i }, c);
|
|
7957
8025
|
})
|
|
7958
8026
|
);
|
|
7959
8027
|
});
|
|
7960
8028
|
function flat(children) {
|
|
7961
8029
|
const out = [];
|
|
7962
|
-
|
|
7963
|
-
if (
|
|
8030
|
+
React45.Children.toArray(children).forEach(function(c) {
|
|
8031
|
+
if (React45.isValidElement(c) && c.type === React45.Fragment)
|
|
7964
8032
|
flat(c.props.children).forEach(function(x) {
|
|
7965
|
-
out.push(
|
|
8033
|
+
out.push(React45.isValidElement(x) ? React45.cloneElement(x, { key: String(c.key) + "/" + String(x.key) }) : x);
|
|
7966
8034
|
});
|
|
7967
8035
|
else if (c !== "") out.push(c);
|
|
7968
8036
|
});
|
|
@@ -7976,7 +8044,7 @@ function r(n3) {
|
|
|
7976
8044
|
function num(v) {
|
|
7977
8045
|
return typeof v === "number" && isFinite(v) ? v : null;
|
|
7978
8046
|
}
|
|
7979
|
-
var Sparkline =
|
|
8047
|
+
var Sparkline = React45.forwardRef(function Sparkline2(props, ref) {
|
|
7980
8048
|
const wh = SIZES2[props.size || "sm"] || SIZES2.sm;
|
|
7981
8049
|
const W = wh[0], H = wh[1];
|
|
7982
8050
|
const data = (props.data || []).map(num);
|
|
@@ -8050,8 +8118,8 @@ var Sparkline = React44.forwardRef(function Sparkline2(props, ref) {
|
|
|
8050
8118
|
});
|
|
8051
8119
|
|
|
8052
8120
|
// src/StatusTile.tsx
|
|
8053
|
-
var useIsoLayoutEffect2 = typeof window !== "undefined" ?
|
|
8054
|
-
var StatusTile =
|
|
8121
|
+
var useIsoLayoutEffect2 = typeof window !== "undefined" ? React46.useLayoutEffect : React46.useEffect;
|
|
8122
|
+
var StatusTile = React46.forwardRef(function StatusTile2(props, ref) {
|
|
8055
8123
|
const Link = useLinkComponent(props.linkComponent);
|
|
8056
8124
|
const t = useStrings();
|
|
8057
8125
|
useAutoTip();
|
|
@@ -8060,8 +8128,8 @@ var StatusTile = React45.forwardRef(function StatusTile2(props, ref) {
|
|
|
8060
8128
|
"status-tile-label",
|
|
8061
8129
|
"StatusTile `aria-label` needs `href`: without a link the tile is a plain box, where a name is not allowed."
|
|
8062
8130
|
);
|
|
8063
|
-
const titleRef =
|
|
8064
|
-
const check =
|
|
8131
|
+
const titleRef = React46.useRef(null);
|
|
8132
|
+
const check = React46.useCallback(function() {
|
|
8065
8133
|
const el = titleRef.current;
|
|
8066
8134
|
if (!el) return;
|
|
8067
8135
|
const cut = el.scrollHeight > el.clientHeight + 1;
|
|
@@ -8071,7 +8139,7 @@ var StatusTile = React45.forwardRef(function StatusTile2(props, ref) {
|
|
|
8071
8139
|
}, []);
|
|
8072
8140
|
useIsoLayoutEffect2(check, [props.title, check]);
|
|
8073
8141
|
const linked = !!props.href;
|
|
8074
|
-
|
|
8142
|
+
React46.useEffect(
|
|
8075
8143
|
function() {
|
|
8076
8144
|
const el = titleRef.current;
|
|
8077
8145
|
if (!el) return;
|
|
@@ -8096,14 +8164,14 @@ var StatusTile = React45.forwardRef(function StatusTile2(props, ref) {
|
|
|
8096
8164
|
});
|
|
8097
8165
|
|
|
8098
8166
|
// src/AppShell.tsx
|
|
8099
|
-
var
|
|
8167
|
+
var React48 = __toESM(require("react"), 1);
|
|
8100
8168
|
|
|
8101
8169
|
// src/scrollHide.ts
|
|
8102
|
-
var
|
|
8170
|
+
var React47 = __toESM(require("react"), 1);
|
|
8103
8171
|
var STEP = 8;
|
|
8104
8172
|
function useHideOnScroll(enabled, el, media, from) {
|
|
8105
|
-
const st =
|
|
8106
|
-
|
|
8173
|
+
const st = React47.useState(false), hidden = st[0], setHidden = st[1];
|
|
8174
|
+
React47.useEffect(
|
|
8107
8175
|
function() {
|
|
8108
8176
|
if (!enabled || typeof window === "undefined") {
|
|
8109
8177
|
setHidden(false);
|
|
@@ -8193,31 +8261,31 @@ function useHideOnScroll(enabled, el, media, from) {
|
|
|
8193
8261
|
}
|
|
8194
8262
|
|
|
8195
8263
|
// src/AppShell.tsx
|
|
8196
|
-
var AppShell =
|
|
8264
|
+
var AppShell = React48.forwardRef(function AppShell2(props, ref) {
|
|
8197
8265
|
const t = useStrings();
|
|
8198
8266
|
const bp = useBreakpoint();
|
|
8199
8267
|
const wide = bp === "lg" || bp === "xl";
|
|
8200
|
-
const st =
|
|
8201
|
-
|
|
8268
|
+
const st = React48.useState(false), open = st[0], setOpen = st[1];
|
|
8269
|
+
React48.useEffect(
|
|
8202
8270
|
function() {
|
|
8203
8271
|
if (wide) setOpen(false);
|
|
8204
8272
|
},
|
|
8205
8273
|
[wide]
|
|
8206
8274
|
);
|
|
8207
|
-
const navEl = props.nav &&
|
|
8275
|
+
const navEl = props.nav && React48.isValidElement(props.nav) ? props.nav : null;
|
|
8208
8276
|
const shared = !!navEl && navEl.props.value === void 0 && (navEl.props.defaultValue !== void 0 || navEl.props.sections !== void 0 || navEl.props.items !== void 0);
|
|
8209
|
-
const navState =
|
|
8277
|
+
const navState = React48.useState(navEl ? navEl.props.defaultValue : void 0);
|
|
8210
8278
|
function onNav(id) {
|
|
8211
8279
|
if (shared) navState[1](id);
|
|
8212
8280
|
if (navEl && navEl.props.onChange) navEl.props.onChange(id);
|
|
8213
8281
|
}
|
|
8214
|
-
const rootRef =
|
|
8215
|
-
const barRef =
|
|
8282
|
+
const rootRef = React48.useRef(null);
|
|
8283
|
+
const barRef = React48.useRef(null);
|
|
8216
8284
|
const mergedRef = useMergedRef(ref, rootRef);
|
|
8217
8285
|
const hasBar = !!(props.header || props.nav);
|
|
8218
|
-
const barH =
|
|
8286
|
+
const barH = React48.useState(null);
|
|
8219
8287
|
const away = useHideOnScroll(!!props.headerHideOnScroll && hasBar, barRef, "(max-width: 1023.98px)", barH[0] || 56);
|
|
8220
|
-
const awayRef =
|
|
8288
|
+
const awayRef = React48.useRef(away);
|
|
8221
8289
|
awayRef.current = away;
|
|
8222
8290
|
useIsoLayoutEffect(
|
|
8223
8291
|
function() {
|
|
@@ -8246,8 +8314,8 @@ var AppShell = React47.forwardRef(function AppShell2(props, ref) {
|
|
|
8246
8314
|
},
|
|
8247
8315
|
[hasBar]
|
|
8248
8316
|
);
|
|
8249
|
-
const deskNav = navEl && shared ?
|
|
8250
|
-
const drawerNav = navEl ?
|
|
8317
|
+
const deskNav = navEl && shared ? React48.cloneElement(navEl, { value: navState[0], onChange: onNav }) : props.nav;
|
|
8318
|
+
const drawerNav = navEl ? React48.cloneElement(navEl, {
|
|
8251
8319
|
value: shared ? navState[0] : navEl.props.value,
|
|
8252
8320
|
onChange: function(id) {
|
|
8253
8321
|
onNav(id);
|
|
@@ -8262,7 +8330,7 @@ var AppShell = React47.forwardRef(function AppShell2(props, ref) {
|
|
|
8262
8330
|
collapsed: false,
|
|
8263
8331
|
collapsible: false
|
|
8264
8332
|
}) : props.nav;
|
|
8265
|
-
return /* @__PURE__ */
|
|
8333
|
+
return /* @__PURE__ */ React48.createElement(
|
|
8266
8334
|
"div",
|
|
8267
8335
|
{
|
|
8268
8336
|
ref: mergedRef,
|
|
@@ -8277,8 +8345,8 @@ var AppShell = React47.forwardRef(function AppShell2(props, ref) {
|
|
|
8277
8345
|
props.className
|
|
8278
8346
|
)
|
|
8279
8347
|
},
|
|
8280
|
-
props.nav ? /* @__PURE__ */
|
|
8281
|
-
props.nav ? /* @__PURE__ */
|
|
8348
|
+
props.nav ? /* @__PURE__ */ React48.createElement("div", { className: "aura-shell__nav" }, deskNav) : null,
|
|
8349
|
+
props.nav ? /* @__PURE__ */ React48.createElement(
|
|
8282
8350
|
Drawer,
|
|
8283
8351
|
{
|
|
8284
8352
|
open,
|
|
@@ -8295,7 +8363,7 @@ var AppShell = React47.forwardRef(function AppShell2(props, ref) {
|
|
|
8295
8363
|
},
|
|
8296
8364
|
drawerNav
|
|
8297
8365
|
) : null,
|
|
8298
|
-
/* @__PURE__ */
|
|
8366
|
+
/* @__PURE__ */ React48.createElement("div", { className: "aura-shell__main" }, props.header || props.nav ? /* @__PURE__ */ React48.createElement(
|
|
8299
8367
|
"header",
|
|
8300
8368
|
{
|
|
8301
8369
|
ref: barRef,
|
|
@@ -8307,11 +8375,11 @@ var AppShell = React47.forwardRef(function AppShell2(props, ref) {
|
|
|
8307
8375
|
away && "is-away"
|
|
8308
8376
|
)
|
|
8309
8377
|
},
|
|
8310
|
-
props.nav ? /* @__PURE__ */
|
|
8378
|
+
props.nav ? /* @__PURE__ */ React48.createElement(
|
|
8311
8379
|
IconButton,
|
|
8312
8380
|
{
|
|
8313
8381
|
className: "aura-shell__menu",
|
|
8314
|
-
icon: /* @__PURE__ */
|
|
8382
|
+
icon: /* @__PURE__ */ React48.createElement(IconMenu, null),
|
|
8315
8383
|
label: props.menuLabel || t.openNav,
|
|
8316
8384
|
size: "md",
|
|
8317
8385
|
onClick: function() {
|
|
@@ -8320,8 +8388,8 @@ var AppShell = React47.forwardRef(function AppShell2(props, ref) {
|
|
|
8320
8388
|
"aria-expanded": open
|
|
8321
8389
|
}
|
|
8322
8390
|
) : null,
|
|
8323
|
-
/* @__PURE__ */
|
|
8324
|
-
) : null, /* @__PURE__ */
|
|
8391
|
+
/* @__PURE__ */ React48.createElement("div", { className: "aura-shell__bar-content" }, props.header)
|
|
8392
|
+
) : null, /* @__PURE__ */ React48.createElement(
|
|
8325
8393
|
"main",
|
|
8326
8394
|
{
|
|
8327
8395
|
className: cx("aura-shell__content", props.contentPadding === false && "is-flush"),
|
|
@@ -8334,17 +8402,17 @@ var AppShell = React47.forwardRef(function AppShell2(props, ref) {
|
|
|
8334
8402
|
});
|
|
8335
8403
|
|
|
8336
8404
|
// src/ActionBar.tsx
|
|
8337
|
-
var
|
|
8338
|
-
var ActionBar =
|
|
8405
|
+
var React49 = __toESM(require("react"), 1);
|
|
8406
|
+
var ActionBar = React49.forwardRef(function ActionBar2(props, ref) {
|
|
8339
8407
|
const t = useStrings();
|
|
8340
8408
|
const bulk = props.selected != null;
|
|
8341
8409
|
const idle = bulk && !props.selected;
|
|
8342
8410
|
const count = bulk && props.selected ? t.selectedCount(props.selected) : null;
|
|
8343
|
-
const hasStart =
|
|
8411
|
+
const hasStart = React49.Children.toArray(props.start).some(function(c) {
|
|
8344
8412
|
return c !== "";
|
|
8345
8413
|
});
|
|
8346
|
-
const cameFrom =
|
|
8347
|
-
const own =
|
|
8414
|
+
const cameFrom = React49.useRef(null);
|
|
8415
|
+
const own = React49.useRef(null);
|
|
8348
8416
|
function clear() {
|
|
8349
8417
|
props.onClearSelection();
|
|
8350
8418
|
setTimeout(function() {
|
|
@@ -8353,7 +8421,7 @@ var ActionBar = React48.forwardRef(function ActionBar2(props, ref) {
|
|
|
8353
8421
|
if ((!a || a === document.body || !a.isConnected) && back && back.isConnected) back.focus();
|
|
8354
8422
|
}, 0);
|
|
8355
8423
|
}
|
|
8356
|
-
return /* @__PURE__ */
|
|
8424
|
+
return /* @__PURE__ */ React49.createElement(
|
|
8357
8425
|
"div",
|
|
8358
8426
|
{
|
|
8359
8427
|
ref: function(el) {
|
|
@@ -8375,16 +8443,16 @@ var ActionBar = React48.forwardRef(function ActionBar2(props, ref) {
|
|
|
8375
8443
|
props.className
|
|
8376
8444
|
)
|
|
8377
8445
|
},
|
|
8378
|
-
/* @__PURE__ */
|
|
8446
|
+
/* @__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)
|
|
8379
8447
|
);
|
|
8380
8448
|
});
|
|
8381
8449
|
|
|
8382
8450
|
// src/Separator.tsx
|
|
8383
|
-
var
|
|
8384
|
-
var Separator =
|
|
8451
|
+
var React50 = __toESM(require("react"), 1);
|
|
8452
|
+
var Separator = React50.forwardRef(function Separator2(props, ref) {
|
|
8385
8453
|
const vertical = props.orientation === "vertical";
|
|
8386
8454
|
const decorative = props.decorative !== false;
|
|
8387
|
-
return /* @__PURE__ */
|
|
8455
|
+
return /* @__PURE__ */ React50.createElement(
|
|
8388
8456
|
"div",
|
|
8389
8457
|
{
|
|
8390
8458
|
ref,
|
|
@@ -8397,13 +8465,13 @@ var Separator = React49.forwardRef(function Separator2(props, ref) {
|
|
|
8397
8465
|
});
|
|
8398
8466
|
|
|
8399
8467
|
// src/Table.tsx
|
|
8400
|
-
var
|
|
8401
|
-
var StackLabels =
|
|
8402
|
-
var ColumnIndex =
|
|
8468
|
+
var React51 = __toESM(require("react"), 1);
|
|
8469
|
+
var StackLabels = React51.createContext(null);
|
|
8470
|
+
var ColumnIndex = React51.createContext(-1);
|
|
8403
8471
|
function flat2(children) {
|
|
8404
8472
|
const out = [];
|
|
8405
|
-
|
|
8406
|
-
if (
|
|
8473
|
+
React51.Children.toArray(children).forEach(function(c) {
|
|
8474
|
+
if (React51.isValidElement(c) && c.type === React51.Fragment)
|
|
8407
8475
|
out.push.apply(out, flat2(c.props.children));
|
|
8408
8476
|
else out.push(c);
|
|
8409
8477
|
});
|
|
@@ -8417,7 +8485,7 @@ function text(node) {
|
|
|
8417
8485
|
});
|
|
8418
8486
|
return parts.length ? parts.join("") : void 0;
|
|
8419
8487
|
}
|
|
8420
|
-
if (
|
|
8488
|
+
if (React51.isValidElement(node)) {
|
|
8421
8489
|
const p = node.props;
|
|
8422
8490
|
if (p["aria-hidden"] === true || p["aria-hidden"] === "true") return void 0;
|
|
8423
8491
|
return text(p.children);
|
|
@@ -8427,13 +8495,13 @@ function text(node) {
|
|
|
8427
8495
|
function headerLabels(children) {
|
|
8428
8496
|
let out = [];
|
|
8429
8497
|
flat2(children).forEach(function(c) {
|
|
8430
|
-
if (out.length || !
|
|
8498
|
+
if (out.length || !React51.isValidElement(c) || c.type !== THead) return;
|
|
8431
8499
|
const row = flat2(c.props.children).find(function(r2) {
|
|
8432
|
-
return
|
|
8500
|
+
return React51.isValidElement(r2);
|
|
8433
8501
|
});
|
|
8434
8502
|
if (!row) return;
|
|
8435
8503
|
flat2(row.props.children).forEach(function(cell) {
|
|
8436
|
-
if (!
|
|
8504
|
+
if (!React51.isValidElement(cell)) return;
|
|
8437
8505
|
const p = cell.props;
|
|
8438
8506
|
const t = text(p.children);
|
|
8439
8507
|
const label = p.label != null ? p.label : t != null ? t.replace(/\s+/g, " ").trim() || void 0 : void 0;
|
|
@@ -8443,7 +8511,7 @@ function headerLabels(children) {
|
|
|
8443
8511
|
});
|
|
8444
8512
|
return out;
|
|
8445
8513
|
}
|
|
8446
|
-
var Table =
|
|
8514
|
+
var Table = React51.forwardRef(function Table2(props, ref) {
|
|
8447
8515
|
const {
|
|
8448
8516
|
caption,
|
|
8449
8517
|
captionHidden,
|
|
@@ -8473,12 +8541,12 @@ var Table = React50.forwardRef(function Table2(props, ref) {
|
|
|
8473
8541
|
"tbl-stack-labels",
|
|
8474
8542
|
"Table stackBelow: no THead > Tr > Th found among its children, so cells have no labels. Pass `label` on each Td."
|
|
8475
8543
|
);
|
|
8476
|
-
const outer =
|
|
8544
|
+
const outer = React51.useContext(StackLabels);
|
|
8477
8545
|
const pageDensity = useDensity();
|
|
8478
8546
|
const capId = uid();
|
|
8479
|
-
const wrap =
|
|
8480
|
-
const sc =
|
|
8481
|
-
const wide =
|
|
8547
|
+
const wrap = React51.useRef(null);
|
|
8548
|
+
const sc = React51.useState(false), scrolls = sc[0];
|
|
8549
|
+
const wide = React51.useState(false);
|
|
8482
8550
|
useIsoLayoutEffect(function() {
|
|
8483
8551
|
const el = wrap.current;
|
|
8484
8552
|
if (!el || typeof ResizeObserver === "undefined") return;
|
|
@@ -8495,7 +8563,7 @@ var Table = React50.forwardRef(function Table2(props, ref) {
|
|
|
8495
8563
|
ro.disconnect();
|
|
8496
8564
|
};
|
|
8497
8565
|
}, []);
|
|
8498
|
-
const table = /* @__PURE__ */
|
|
8566
|
+
const table = /* @__PURE__ */ React51.createElement(
|
|
8499
8567
|
"div",
|
|
8500
8568
|
{
|
|
8501
8569
|
ref: wrap,
|
|
@@ -8519,7 +8587,7 @@ var Table = React50.forwardRef(function Table2(props, ref) {
|
|
|
8519
8587
|
"aria-labelledby": scrolls ? caption != null ? capId : rest["aria-labelledby"] : void 0,
|
|
8520
8588
|
"aria-label": scrolls && caption == null ? rest["aria-label"] : void 0
|
|
8521
8589
|
},
|
|
8522
|
-
/* @__PURE__ */
|
|
8590
|
+
/* @__PURE__ */ React51.createElement(
|
|
8523
8591
|
"table",
|
|
8524
8592
|
{
|
|
8525
8593
|
ref,
|
|
@@ -8535,11 +8603,11 @@ var Table = React50.forwardRef(function Table2(props, ref) {
|
|
|
8535
8603
|
role: stackBelow ? "table" : void 0,
|
|
8536
8604
|
...rest
|
|
8537
8605
|
},
|
|
8538
|
-
caption != null ? /* @__PURE__ */
|
|
8539
|
-
labels ? /* @__PURE__ */
|
|
8606
|
+
caption != null ? /* @__PURE__ */ React51.createElement("caption", { id: capId, className: cx("aura-tbl__caption", captionHidden && "aura-sr-only") }, caption) : null,
|
|
8607
|
+
labels ? /* @__PURE__ */ React51.createElement(StackLabels.Provider, { value: labels }, children) : outer ? /* @__PURE__ */ React51.createElement(StackLabels.Provider, { value: null }, children) : children
|
|
8540
8608
|
)
|
|
8541
8609
|
);
|
|
8542
|
-
return cards ? /* @__PURE__ */
|
|
8610
|
+
return cards ? /* @__PURE__ */ React51.createElement(
|
|
8543
8611
|
"div",
|
|
8544
8612
|
{
|
|
8545
8613
|
className: cx(
|
|
@@ -8552,10 +8620,10 @@ var Table = React50.forwardRef(function Table2(props, ref) {
|
|
|
8552
8620
|
) : table;
|
|
8553
8621
|
});
|
|
8554
8622
|
function section(tag, cls) {
|
|
8555
|
-
const C =
|
|
8623
|
+
const C = React51.forwardRef(function TableSection(props, ref) {
|
|
8556
8624
|
const { className, ...rest } = props;
|
|
8557
|
-
const stacked =
|
|
8558
|
-
return
|
|
8625
|
+
const stacked = React51.useContext(StackLabels) != null;
|
|
8626
|
+
return React51.createElement(
|
|
8559
8627
|
tag,
|
|
8560
8628
|
Object.assign({ ref, className: cx(cls, className), role: stacked ? "rowgroup" : void 0 }, rest)
|
|
8561
8629
|
);
|
|
@@ -8568,14 +8636,14 @@ var TBody = section("tbody", "aura-tbl__body");
|
|
|
8568
8636
|
TBody.displayName = "TBody";
|
|
8569
8637
|
var TFoot = section("tfoot", "aura-tbl__foot");
|
|
8570
8638
|
TFoot.displayName = "TFoot";
|
|
8571
|
-
var Tr =
|
|
8639
|
+
var Tr = React51.forwardRef(function Tr2(props, ref) {
|
|
8572
8640
|
const { className, children, ...rest } = props;
|
|
8573
|
-
const stacked =
|
|
8641
|
+
const stacked = React51.useContext(StackLabels) != null;
|
|
8574
8642
|
let col = 0;
|
|
8575
|
-
return /* @__PURE__ */
|
|
8643
|
+
return /* @__PURE__ */ React51.createElement("tr", { ref, className: cx("aura-tbl__row", className), role: stacked ? "row" : void 0, ...rest }, stacked ? flat2(children).map(function(c) {
|
|
8576
8644
|
const at = col;
|
|
8577
|
-
if (
|
|
8578
|
-
return /* @__PURE__ */
|
|
8645
|
+
if (React51.isValidElement(c)) col += Math.max(1, Number(c.props.colSpan) || 1);
|
|
8646
|
+
return /* @__PURE__ */ React51.createElement(ColumnIndex.Provider, { key: React51.isValidElement(c) && c.key != null ? c.key : at, value: at }, c);
|
|
8579
8647
|
}) : children);
|
|
8580
8648
|
});
|
|
8581
8649
|
function cellClass(base, p) {
|
|
@@ -8589,10 +8657,10 @@ function cellClass(base, p) {
|
|
|
8589
8657
|
p.className
|
|
8590
8658
|
);
|
|
8591
8659
|
}
|
|
8592
|
-
var Th =
|
|
8660
|
+
var Th = React51.forwardRef(function Th2(props, ref) {
|
|
8593
8661
|
const { align, numeric, mono, className, scope, label, card, ...rest } = props;
|
|
8594
|
-
const stacked =
|
|
8595
|
-
return /* @__PURE__ */
|
|
8662
|
+
const stacked = React51.useContext(StackLabels) != null;
|
|
8663
|
+
return /* @__PURE__ */ React51.createElement(
|
|
8596
8664
|
"th",
|
|
8597
8665
|
{
|
|
8598
8666
|
ref,
|
|
@@ -8604,12 +8672,12 @@ var Th = React50.forwardRef(function Th2(props, ref) {
|
|
|
8604
8672
|
}
|
|
8605
8673
|
);
|
|
8606
8674
|
});
|
|
8607
|
-
var Td =
|
|
8675
|
+
var Td = React51.forwardRef(function Td2(props, ref) {
|
|
8608
8676
|
const { align, numeric, mono, className, scope, label, card, ...rest } = props;
|
|
8609
|
-
const labels =
|
|
8677
|
+
const labels = React51.useContext(StackLabels), col = React51.useContext(ColumnIndex);
|
|
8610
8678
|
const slot = labels && (card === "title" || card === "action") ? card : void 0;
|
|
8611
8679
|
const shown = labels && !slot ? label != null ? label : col >= 0 ? labels[col] : void 0 : void 0;
|
|
8612
|
-
return /* @__PURE__ */
|
|
8680
|
+
return /* @__PURE__ */ React51.createElement(
|
|
8613
8681
|
"td",
|
|
8614
8682
|
{
|
|
8615
8683
|
ref,
|
|
@@ -8623,8 +8691,8 @@ var Td = React50.forwardRef(function Td2(props, ref) {
|
|
|
8623
8691
|
});
|
|
8624
8692
|
|
|
8625
8693
|
// src/BottomNav.tsx
|
|
8626
|
-
var
|
|
8627
|
-
var BottomNav =
|
|
8694
|
+
var React52 = __toESM(require("react"), 1);
|
|
8695
|
+
var BottomNav = React52.forwardRef(function BottomNav2(props, ref) {
|
|
8628
8696
|
const t = useStrings();
|
|
8629
8697
|
const Link = useLinkComponent(props.linkComponent);
|
|
8630
8698
|
const st = useMaybeControlled(
|
|
@@ -8634,7 +8702,7 @@ var BottomNav = React51.forwardRef(function BottomNav2(props, ref) {
|
|
|
8634
8702
|
);
|
|
8635
8703
|
const active = st[0];
|
|
8636
8704
|
const hide2 = props.hideFrom === false ? "always" : "below-" + (props.hideFrom || "lg");
|
|
8637
|
-
const own =
|
|
8705
|
+
const own = React52.useRef(null);
|
|
8638
8706
|
const hf = props.hideFrom === false ? null : props.hideFrom || "lg";
|
|
8639
8707
|
const away = useHideOnScroll(
|
|
8640
8708
|
!!props.hideOnScroll,
|
|
@@ -8642,7 +8710,7 @@ var BottomNav = React51.forwardRef(function BottomNav2(props, ref) {
|
|
|
8642
8710
|
hf ? "(max-width: " + (breakpoints[hf] - 0.02) + "px)" : "all",
|
|
8643
8711
|
64
|
|
8644
8712
|
);
|
|
8645
|
-
const setRef =
|
|
8713
|
+
const setRef = React52.useCallback(
|
|
8646
8714
|
function(el) {
|
|
8647
8715
|
own.current = el;
|
|
8648
8716
|
if (typeof ref === "function") ref(el);
|
|
@@ -8650,7 +8718,7 @@ var BottomNav = React51.forwardRef(function BottomNav2(props, ref) {
|
|
|
8650
8718
|
},
|
|
8651
8719
|
[ref]
|
|
8652
8720
|
);
|
|
8653
|
-
return /* @__PURE__ */
|
|
8721
|
+
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(
|
|
8654
8722
|
"nav",
|
|
8655
8723
|
{
|
|
8656
8724
|
ref: setRef,
|
|
@@ -8663,7 +8731,7 @@ var BottomNav = React51.forwardRef(function BottomNav2(props, ref) {
|
|
|
8663
8731
|
),
|
|
8664
8732
|
"aria-label": props.label || t.mainNav
|
|
8665
8733
|
},
|
|
8666
|
-
/* @__PURE__ */
|
|
8734
|
+
/* @__PURE__ */ React52.createElement("ul", { className: "aura-bottomnav__list" }, props.items.map(function(it) {
|
|
8667
8735
|
if (it.ariaLabel && typeof it.label === "string" && it.ariaLabel.toLowerCase().indexOf(it.label.toLowerCase()) < 0)
|
|
8668
8736
|
devWarnOnce(
|
|
8669
8737
|
"bottomnav-label-" + it.id,
|
|
@@ -8684,20 +8752,20 @@ var BottomNav = React51.forwardRef(function BottomNav2(props, ref) {
|
|
|
8684
8752
|
}
|
|
8685
8753
|
};
|
|
8686
8754
|
const inner = [
|
|
8687
|
-
/* @__PURE__ */
|
|
8688
|
-
it.ariaLabel ? /* @__PURE__ */
|
|
8689
|
-
/* @__PURE__ */
|
|
8690
|
-
suffix && !it.ariaLabel ? /* @__PURE__ */
|
|
8755
|
+
/* @__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),
|
|
8756
|
+
it.ariaLabel ? /* @__PURE__ */ React52.createElement("span", { key: "n", className: "aura-sr-only" }, it.ariaLabel + suffix) : null,
|
|
8757
|
+
/* @__PURE__ */ React52.createElement("span", { key: "l", className: "aura-bottomnav__label", "aria-hidden": it.ariaLabel ? true : void 0 }, it.label),
|
|
8758
|
+
suffix && !it.ariaLabel ? /* @__PURE__ */ React52.createElement("span", { key: "s", className: "aura-sr-only" }, suffix) : null
|
|
8691
8759
|
];
|
|
8692
|
-
return /* @__PURE__ */
|
|
8760
|
+
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));
|
|
8693
8761
|
}))
|
|
8694
8762
|
));
|
|
8695
8763
|
});
|
|
8696
8764
|
|
|
8697
8765
|
// src/Surface.tsx
|
|
8698
|
-
var
|
|
8699
|
-
var h10 =
|
|
8700
|
-
var Surface =
|
|
8766
|
+
var React53 = __toESM(require("react"), 1);
|
|
8767
|
+
var h10 = React53.createElement;
|
|
8768
|
+
var Surface = React53.forwardRef(function Surface2(props, ref) {
|
|
8701
8769
|
const t = props.texture || "mesh";
|
|
8702
8770
|
const rest = omit(props, ["texture", "className", "children", "as"]);
|
|
8703
8771
|
return h10(
|
|
@@ -8718,14 +8786,14 @@ var Surface = React52.forwardRef(function Surface2(props, ref) {
|
|
|
8718
8786
|
});
|
|
8719
8787
|
|
|
8720
8788
|
// src/Stat.tsx
|
|
8721
|
-
var
|
|
8722
|
-
var Stat =
|
|
8789
|
+
var React54 = __toESM(require("react"), 1);
|
|
8790
|
+
var Stat = React54.forwardRef(function Stat2(props, ref) {
|
|
8723
8791
|
const Link = useLinkComponent(props.linkComponent);
|
|
8724
8792
|
return statElement(props, ref, Link);
|
|
8725
8793
|
});
|
|
8726
8794
|
|
|
8727
8795
|
// src/TimePicker.tsx
|
|
8728
|
-
var
|
|
8796
|
+
var React55 = __toESM(require("react"), 1);
|
|
8729
8797
|
var import_react_dom12 = require("react-dom");
|
|
8730
8798
|
|
|
8731
8799
|
// src/text.ts
|
|
@@ -8767,7 +8835,7 @@ function toMin(t) {
|
|
|
8767
8835
|
function fromMin(n3) {
|
|
8768
8836
|
return pad3(Math.floor(n3 / 60)) + ":" + pad3(n3 % 60);
|
|
8769
8837
|
}
|
|
8770
|
-
var TimePicker =
|
|
8838
|
+
var TimePicker = React55.forwardRef(function TimePicker2(props, ref) {
|
|
8771
8839
|
const t = useStrings();
|
|
8772
8840
|
const auto = uid(), id = props.id || auto, listId = id + "-list";
|
|
8773
8841
|
const st = useMaybeControlled(
|
|
@@ -8777,7 +8845,7 @@ var TimePicker = React54.forwardRef(function TimePicker2(props, ref) {
|
|
|
8777
8845
|
);
|
|
8778
8846
|
const value = st[0];
|
|
8779
8847
|
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;
|
|
8780
|
-
const slots =
|
|
8848
|
+
const slots = React55.useMemo(
|
|
8781
8849
|
function() {
|
|
8782
8850
|
const out = [];
|
|
8783
8851
|
for (let m = lo; m <= hi; m += step) out.push(fromMin(m));
|
|
@@ -8789,12 +8857,12 @@ var TimePicker = React54.forwardRef(function TimePicker2(props, ref) {
|
|
|
8789
8857
|
const n3 = toMin(v);
|
|
8790
8858
|
return n3 == null || n3 < lo || n3 > hi || props.isTimeDisabled && props.isTimeDisabled(v);
|
|
8791
8859
|
}
|
|
8792
|
-
const openState =
|
|
8793
|
-
const editState =
|
|
8794
|
-
const aState =
|
|
8795
|
-
const errState =
|
|
8796
|
-
const pos =
|
|
8797
|
-
const boxRef =
|
|
8860
|
+
const openState = React55.useState(false), open = openState[0], setOpen = openState[1];
|
|
8861
|
+
const editState = React55.useState(null), editing = editState[0], setEditing = editState[1];
|
|
8862
|
+
const aState = React55.useState(0), active = aState[0], setActive = aState[1];
|
|
8863
|
+
const errState = React55.useState(null);
|
|
8864
|
+
const pos = React55.useState(null);
|
|
8865
|
+
const boxRef = React55.useRef(null), inputRef = React55.useRef(null), listRef = React55.useRef(null), inputMerged = useMergedRef(ref, inputRef);
|
|
8798
8866
|
const mounted = useMounted();
|
|
8799
8867
|
function nearest(v) {
|
|
8800
8868
|
const n3 = toMin(v);
|
|
@@ -8822,7 +8890,7 @@ var TimePicker = React54.forwardRef(function TimePicker2(props, ref) {
|
|
|
8822
8890
|
},
|
|
8823
8891
|
[open]
|
|
8824
8892
|
);
|
|
8825
|
-
|
|
8893
|
+
React55.useEffect(
|
|
8826
8894
|
function() {
|
|
8827
8895
|
if (!open) return;
|
|
8828
8896
|
function outside(e) {
|
|
@@ -8844,7 +8912,7 @@ var TimePicker = React54.forwardRef(function TimePicker2(props, ref) {
|
|
|
8844
8912
|
},
|
|
8845
8913
|
[open]
|
|
8846
8914
|
);
|
|
8847
|
-
|
|
8915
|
+
React55.useEffect(
|
|
8848
8916
|
function() {
|
|
8849
8917
|
if (!open || !listRef.current) return;
|
|
8850
8918
|
const el = listRef.current.querySelector('[data-idx="' + active + '"]');
|
|
@@ -8943,9 +9011,9 @@ var TimePicker = React54.forwardRef(function TimePicker2(props, ref) {
|
|
|
8943
9011
|
}
|
|
8944
9012
|
const error = errState[0] || props.error;
|
|
8945
9013
|
const list = open && mounted && pos[0] ? (0, import_react_dom12.createPortal)(
|
|
8946
|
-
/* @__PURE__ */
|
|
9014
|
+
/* @__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) {
|
|
8947
9015
|
const dis = blocked(s), sel = s === value;
|
|
8948
|
-
return /* @__PURE__ */
|
|
9016
|
+
return /* @__PURE__ */ React55.createElement(
|
|
8949
9017
|
"li",
|
|
8950
9018
|
{
|
|
8951
9019
|
key: s,
|
|
@@ -8970,13 +9038,13 @@ var TimePicker = React54.forwardRef(function TimePicker2(props, ref) {
|
|
|
8970
9038
|
if (active !== i) setActive(i);
|
|
8971
9039
|
}
|
|
8972
9040
|
},
|
|
8973
|
-
/* @__PURE__ */
|
|
8974
|
-
sel ? /* @__PURE__ */
|
|
9041
|
+
/* @__PURE__ */ React55.createElement("span", { className: "aura-combo__label" }, s),
|
|
9042
|
+
sel ? /* @__PURE__ */ React55.createElement(Icon, { name: /* @__PURE__ */ React55.createElement(IconCheck, null), className: "aura-combo__check" }) : null
|
|
8975
9043
|
);
|
|
8976
9044
|
}))),
|
|
8977
9045
|
document.body
|
|
8978
9046
|
) : null;
|
|
8979
|
-
return /* @__PURE__ */
|
|
9047
|
+
return /* @__PURE__ */ React55.createElement(
|
|
8980
9048
|
Field,
|
|
8981
9049
|
{
|
|
8982
9050
|
id,
|
|
@@ -8988,7 +9056,7 @@ var TimePicker = React54.forwardRef(function TimePicker2(props, ref) {
|
|
|
8988
9056
|
disabled: props.disabled,
|
|
8989
9057
|
className: cx(touchClass(props.touchHeight), props.className)
|
|
8990
9058
|
},
|
|
8991
|
-
/* @__PURE__ */
|
|
9059
|
+
/* @__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(
|
|
8992
9060
|
"input",
|
|
8993
9061
|
{
|
|
8994
9062
|
ref: inputMerged,
|
|
@@ -9028,7 +9096,7 @@ var TimePicker = React54.forwardRef(function TimePicker2(props, ref) {
|
|
|
9028
9096
|
}, 0);
|
|
9029
9097
|
}
|
|
9030
9098
|
}
|
|
9031
|
-
), props.clearable !== false && value != null && !props.disabled ? /* @__PURE__ */
|
|
9099
|
+
), props.clearable !== false && value != null && !props.disabled ? /* @__PURE__ */ React55.createElement(
|
|
9032
9100
|
"button",
|
|
9033
9101
|
{
|
|
9034
9102
|
type: "button",
|
|
@@ -9041,8 +9109,8 @@ var TimePicker = React54.forwardRef(function TimePicker2(props, ref) {
|
|
|
9041
9109
|
if (inputRef.current) inputRef.current.focus();
|
|
9042
9110
|
}
|
|
9043
9111
|
},
|
|
9044
|
-
/* @__PURE__ */
|
|
9045
|
-
) : null, /* @__PURE__ */
|
|
9112
|
+
/* @__PURE__ */ React55.createElement(Icon, { name: /* @__PURE__ */ React55.createElement(IconX, null) })
|
|
9113
|
+
) : null, /* @__PURE__ */ React55.createElement(
|
|
9046
9114
|
"button",
|
|
9047
9115
|
{
|
|
9048
9116
|
type: "button",
|
|
@@ -9060,14 +9128,14 @@ var TimePicker = React54.forwardRef(function TimePicker2(props, ref) {
|
|
|
9060
9128
|
}
|
|
9061
9129
|
}
|
|
9062
9130
|
},
|
|
9063
|
-
/* @__PURE__ */
|
|
9131
|
+
/* @__PURE__ */ React55.createElement(Icon, { name: /* @__PURE__ */ React55.createElement(IconChevronDown, null) })
|
|
9064
9132
|
)),
|
|
9065
9133
|
list
|
|
9066
9134
|
);
|
|
9067
9135
|
});
|
|
9068
9136
|
|
|
9069
9137
|
// src/FileUpload.tsx
|
|
9070
|
-
var
|
|
9138
|
+
var React56 = __toESM(require("react"), 1);
|
|
9071
9139
|
function matches(file, accept) {
|
|
9072
9140
|
if (!accept) return true;
|
|
9073
9141
|
const name = (file.name || "").toLowerCase(), type = (file.type || "").toLowerCase();
|
|
@@ -9091,24 +9159,24 @@ function describeAccept(accept, t) {
|
|
|
9091
9159
|
}).join(", ");
|
|
9092
9160
|
}
|
|
9093
9161
|
var seq = 0;
|
|
9094
|
-
var FileUpload =
|
|
9162
|
+
var FileUpload = React56.forwardRef(function FileUpload2(props, ref) {
|
|
9095
9163
|
const t = useStrings();
|
|
9096
9164
|
const auto = uid(), id = props.id || auto;
|
|
9097
9165
|
const st = useMaybeControlled(props.value, props.defaultValue || [], props.onChange);
|
|
9098
9166
|
const items2 = st[0] || [];
|
|
9099
|
-
const dragState =
|
|
9100
|
-
const inputRef =
|
|
9101
|
-
const urls =
|
|
9167
|
+
const dragState = React56.useState(false), over = dragState[0];
|
|
9168
|
+
const inputRef = React56.useRef(null), inputMerged = useMergedRef(ref, inputRef);
|
|
9169
|
+
const urls = React56.useRef({});
|
|
9102
9170
|
const maxFiles = props.multiple ? props.maxFiles : 1;
|
|
9103
9171
|
const note = t.accepts(describeAccept(props.accept, t), props.maxSize ? formatBytes(props.maxSize) : "");
|
|
9104
|
-
|
|
9172
|
+
React56.useEffect(function() {
|
|
9105
9173
|
return function() {
|
|
9106
9174
|
Object.keys(urls.current).forEach(function(k) {
|
|
9107
9175
|
URL.revokeObjectURL(urls.current[k]);
|
|
9108
9176
|
});
|
|
9109
9177
|
};
|
|
9110
9178
|
}, []);
|
|
9111
|
-
|
|
9179
|
+
React56.useEffect(
|
|
9112
9180
|
function() {
|
|
9113
9181
|
const el = inputRef.current;
|
|
9114
9182
|
if (!el || !props.name || typeof DataTransfer === "undefined") return;
|
|
@@ -9168,7 +9236,7 @@ var FileUpload = React55.forwardRef(function FileUpload2(props, ref) {
|
|
|
9168
9236
|
if (inputRef.current) inputRef.current.focus();
|
|
9169
9237
|
}
|
|
9170
9238
|
const error = props.error;
|
|
9171
|
-
return /* @__PURE__ */
|
|
9239
|
+
return /* @__PURE__ */ React56.createElement(
|
|
9172
9240
|
Field,
|
|
9173
9241
|
{
|
|
9174
9242
|
id,
|
|
@@ -9180,7 +9248,7 @@ var FileUpload = React55.forwardRef(function FileUpload2(props, ref) {
|
|
|
9180
9248
|
disabled: props.disabled,
|
|
9181
9249
|
className: props.className
|
|
9182
9250
|
},
|
|
9183
|
-
/* @__PURE__ */
|
|
9251
|
+
/* @__PURE__ */ React56.createElement(
|
|
9184
9252
|
"div",
|
|
9185
9253
|
{
|
|
9186
9254
|
className: cx("aura-upload", over && "is-over", props.disabled && "is-disabled", error && "is-invalid"),
|
|
@@ -9201,9 +9269,9 @@ var FileUpload = React55.forwardRef(function FileUpload2(props, ref) {
|
|
|
9201
9269
|
add(e.dataTransfer && e.dataTransfer.files);
|
|
9202
9270
|
}
|
|
9203
9271
|
},
|
|
9204
|
-
/* @__PURE__ */
|
|
9205
|
-
/* @__PURE__ */
|
|
9206
|
-
/* @__PURE__ */
|
|
9272
|
+
/* @__PURE__ */ React56.createElement(Icon, { name: /* @__PURE__ */ React56.createElement(IconCloudUpload, null), size: "lg", className: "aura-upload__icon" }),
|
|
9273
|
+
/* @__PURE__ */ React56.createElement("span", { className: "aura-upload__text" }, t.dropFiles, " "),
|
|
9274
|
+
/* @__PURE__ */ React56.createElement(
|
|
9207
9275
|
"input",
|
|
9208
9276
|
{
|
|
9209
9277
|
ref: inputMerged,
|
|
@@ -9225,12 +9293,12 @@ var FileUpload = React55.forwardRef(function FileUpload2(props, ref) {
|
|
|
9225
9293
|
}
|
|
9226
9294
|
}
|
|
9227
9295
|
),
|
|
9228
|
-
/* @__PURE__ */
|
|
9229
|
-
note ? /* @__PURE__ */
|
|
9296
|
+
/* @__PURE__ */ React56.createElement("span", { className: "aura-upload__browse", "aria-hidden": true }, props.multiple ? t.browse : t.browseOne),
|
|
9297
|
+
note ? /* @__PURE__ */ React56.createElement("span", { className: "aura-upload__note", id: id + "-note" }, note) : null
|
|
9230
9298
|
),
|
|
9231
|
-
items2.length ? /* @__PURE__ */
|
|
9299
|
+
items2.length ? /* @__PURE__ */ React56.createElement("ul", { className: "aura-upload__list", "aria-live": "polite" }, items2.map(function(it) {
|
|
9232
9300
|
const src = thumb(it);
|
|
9233
|
-
return /* @__PURE__ */
|
|
9301
|
+
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(
|
|
9234
9302
|
"span",
|
|
9235
9303
|
{
|
|
9236
9304
|
className: "aura-upload__bar",
|
|
@@ -9240,11 +9308,11 @@ var FileUpload = React55.forwardRef(function FileUpload2(props, ref) {
|
|
|
9240
9308
|
"aria-valuemax": 100,
|
|
9241
9309
|
"aria-valuenow": it.progress != null ? Math.round(it.progress) : void 0
|
|
9242
9310
|
},
|
|
9243
|
-
/* @__PURE__ */
|
|
9244
|
-
) : null), /* @__PURE__ */
|
|
9311
|
+
/* @__PURE__ */ React56.createElement("span", { style: { width: (it.progress || 0) + "%" } })
|
|
9312
|
+
) : null), /* @__PURE__ */ React56.createElement(
|
|
9245
9313
|
IconButton,
|
|
9246
9314
|
{
|
|
9247
|
-
icon: /* @__PURE__ */
|
|
9315
|
+
icon: /* @__PURE__ */ React56.createElement(IconX, null),
|
|
9248
9316
|
label: t.remove(it.name),
|
|
9249
9317
|
onClick: function() {
|
|
9250
9318
|
remove(it);
|
|
@@ -9560,9 +9628,9 @@ function createTheme(opts) {
|
|
|
9560
9628
|
}
|
|
9561
9629
|
|
|
9562
9630
|
// src/ThemeStyle.tsx
|
|
9563
|
-
var
|
|
9631
|
+
var React57 = __toESM(require("react"), 1);
|
|
9564
9632
|
function ThemeStyle(props) {
|
|
9565
|
-
const css =
|
|
9633
|
+
const css = React57.useMemo(
|
|
9566
9634
|
function() {
|
|
9567
9635
|
try {
|
|
9568
9636
|
return createTheme({
|
|
@@ -9579,11 +9647,11 @@ function ThemeStyle(props) {
|
|
|
9579
9647
|
[props.brand, props.signal, props.primary, props.name, props.selector]
|
|
9580
9648
|
);
|
|
9581
9649
|
if (css === null) return null;
|
|
9582
|
-
return /* @__PURE__ */
|
|
9650
|
+
return /* @__PURE__ */ React57.createElement("style", { "data-aura-theme": props.name || props.brand, dangerouslySetInnerHTML: { __html: css } });
|
|
9583
9651
|
}
|
|
9584
9652
|
|
|
9585
9653
|
// src/colorScheme.tsx
|
|
9586
|
-
var
|
|
9654
|
+
var React58 = __toESM(require("react"), 1);
|
|
9587
9655
|
|
|
9588
9656
|
// src/colorSchemeScript.ts
|
|
9589
9657
|
var DEFAULT_KEY = "aura-color-scheme";
|
|
@@ -9600,7 +9668,7 @@ function colorSchemeScript(options) {
|
|
|
9600
9668
|
|
|
9601
9669
|
// src/colorScheme.tsx
|
|
9602
9670
|
function ColorSchemeScript(props) {
|
|
9603
|
-
return /* @__PURE__ */
|
|
9671
|
+
return /* @__PURE__ */ React58.createElement(
|
|
9604
9672
|
"script",
|
|
9605
9673
|
{
|
|
9606
9674
|
"data-aura-color-scheme": "",
|
|
@@ -9625,7 +9693,7 @@ function apply(scheme) {
|
|
|
9625
9693
|
function useColorScheme(options) {
|
|
9626
9694
|
const key = options && options.storageKey || DEFAULT_KEY;
|
|
9627
9695
|
const fallback = options && options.defaultScheme || "system";
|
|
9628
|
-
const subscribe2 =
|
|
9696
|
+
const subscribe2 = React58.useCallback(
|
|
9629
9697
|
function(cb) {
|
|
9630
9698
|
const mq = window.matchMedia ? window.matchMedia("(prefers-color-scheme: dark)") : null;
|
|
9631
9699
|
function onSystem() {
|
|
@@ -9647,7 +9715,7 @@ function useColorScheme(options) {
|
|
|
9647
9715
|
},
|
|
9648
9716
|
[fallback, key]
|
|
9649
9717
|
);
|
|
9650
|
-
const snapshot =
|
|
9718
|
+
const snapshot = React58.useSyncExternalStore(
|
|
9651
9719
|
subscribe2,
|
|
9652
9720
|
function() {
|
|
9653
9721
|
const s = readScheme(fallback);
|
|
@@ -9658,7 +9726,7 @@ function useColorScheme(options) {
|
|
|
9658
9726
|
}
|
|
9659
9727
|
);
|
|
9660
9728
|
const parts = snapshot.split("|");
|
|
9661
|
-
const setScheme =
|
|
9729
|
+
const setScheme = React58.useCallback(
|
|
9662
9730
|
function(next) {
|
|
9663
9731
|
if (!valid(next)) return;
|
|
9664
9732
|
try {
|
|
@@ -9677,14 +9745,14 @@ function ColorSchemeToggle(props) {
|
|
|
9677
9745
|
const cs = useColorScheme(props);
|
|
9678
9746
|
const names = { light: t.schemeLight, dark: t.schemeDark, system: t.schemeSystem };
|
|
9679
9747
|
const label = props.label || t.colorScheme;
|
|
9680
|
-
return /* @__PURE__ */
|
|
9748
|
+
return /* @__PURE__ */ React58.createElement(
|
|
9681
9749
|
DropdownMenu,
|
|
9682
9750
|
{
|
|
9683
9751
|
label,
|
|
9684
|
-
trigger: /* @__PURE__ */
|
|
9752
|
+
trigger: /* @__PURE__ */ React58.createElement(
|
|
9685
9753
|
IconButton,
|
|
9686
9754
|
{
|
|
9687
|
-
icon: cs.resolved === "dark" ? /* @__PURE__ */
|
|
9755
|
+
icon: cs.resolved === "dark" ? /* @__PURE__ */ React58.createElement(IconMoon, null) : /* @__PURE__ */ React58.createElement(IconSun, null),
|
|
9688
9756
|
label: label + ": " + names[cs.scheme]
|
|
9689
9757
|
}
|
|
9690
9758
|
),
|
|
@@ -9702,14 +9770,14 @@ function ColorSchemeToggle(props) {
|
|
|
9702
9770
|
}
|
|
9703
9771
|
|
|
9704
9772
|
// src/Badge.tsx
|
|
9705
|
-
var
|
|
9706
|
-
var Badge =
|
|
9773
|
+
var React59 = __toESM(require("react"), 1);
|
|
9774
|
+
var Badge = React59.forwardRef(function Badge2(props, ref) {
|
|
9707
9775
|
return badgeElement(props, ref);
|
|
9708
9776
|
});
|
|
9709
9777
|
|
|
9710
9778
|
// src/Progress.tsx
|
|
9711
|
-
var
|
|
9712
|
-
var Progress =
|
|
9779
|
+
var React60 = __toESM(require("react"), 1);
|
|
9780
|
+
var Progress = React60.forwardRef(function Progress2(props, ref) {
|
|
9713
9781
|
const t = useStrings();
|
|
9714
9782
|
const auto = uid(), id = props.id || auto;
|
|
9715
9783
|
const max = props.max || 100, det = props.value != null;
|
|
@@ -9718,7 +9786,7 @@ var Progress = React59.forwardRef(function Progress2(props, ref) {
|
|
|
9718
9786
|
const spct = sec ? Math.max(0, Math.min(100 - pct, sec / max * 100)) : 0;
|
|
9719
9787
|
const valueText = props.valueText != null ? props.valueText : props.valueLabel != null ? String(props.valueLabel) : sec ? t.progressReserved(props.value, sec, max) : void 0;
|
|
9720
9788
|
const shown = props.valueLabel != null ? props.valueLabel : det ? Math.round(pct) + "%" : null;
|
|
9721
|
-
return /* @__PURE__ */
|
|
9789
|
+
return /* @__PURE__ */ React60.createElement(
|
|
9722
9790
|
"div",
|
|
9723
9791
|
{
|
|
9724
9792
|
ref,
|
|
@@ -9729,8 +9797,8 @@ var Progress = React59.forwardRef(function Progress2(props, ref) {
|
|
|
9729
9797
|
props.className
|
|
9730
9798
|
)
|
|
9731
9799
|
},
|
|
9732
|
-
props.label || props.showValue && shown ? /* @__PURE__ */
|
|
9733
|
-
/* @__PURE__ */
|
|
9800
|
+
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,
|
|
9801
|
+
/* @__PURE__ */ React60.createElement(
|
|
9734
9802
|
"div",
|
|
9735
9803
|
{
|
|
9736
9804
|
className: cx("aura-progress__track", !det && "is-indeterminate"),
|
|
@@ -9742,8 +9810,8 @@ var Progress = React59.forwardRef(function Progress2(props, ref) {
|
|
|
9742
9810
|
"aria-valuenow": det ? props.value : void 0,
|
|
9743
9811
|
"aria-valuetext": det ? valueText : void 0
|
|
9744
9812
|
},
|
|
9745
|
-
/* @__PURE__ */
|
|
9746
|
-
sec ? /* @__PURE__ */
|
|
9813
|
+
/* @__PURE__ */ React60.createElement("span", { className: "aura-progress__bar", style: det ? { width: pct + "%" } : void 0 }),
|
|
9814
|
+
sec ? /* @__PURE__ */ React60.createElement(
|
|
9747
9815
|
"span",
|
|
9748
9816
|
{
|
|
9749
9817
|
className: "aura-progress__bar aura-progress__bar--reserved",
|
|
@@ -9751,19 +9819,19 @@ var Progress = React59.forwardRef(function Progress2(props, ref) {
|
|
|
9751
9819
|
}
|
|
9752
9820
|
) : null
|
|
9753
9821
|
),
|
|
9754
|
-
props.hint ? /* @__PURE__ */
|
|
9822
|
+
props.hint ? /* @__PURE__ */ React60.createElement("p", { className: "aura-progress__hint" }, props.hint) : null
|
|
9755
9823
|
);
|
|
9756
9824
|
});
|
|
9757
9825
|
|
|
9758
9826
|
// src/Skeleton.tsx
|
|
9759
|
-
var
|
|
9760
|
-
var Skeleton =
|
|
9827
|
+
var React61 = __toESM(require("react"), 1);
|
|
9828
|
+
var Skeleton = React61.forwardRef(function Skeleton2(props, ref) {
|
|
9761
9829
|
const v = props.variant || "text";
|
|
9762
9830
|
if (v === "text" && (props.lines || 1) > 1) {
|
|
9763
9831
|
const n3 = props.lines, rows = [];
|
|
9764
9832
|
for (let i = 0; i < n3; i++)
|
|
9765
|
-
rows.push(/* @__PURE__ */
|
|
9766
|
-
return /* @__PURE__ */
|
|
9833
|
+
rows.push(/* @__PURE__ */ React61.createElement("span", { key: i, className: "aura-skel aura-skel--text", style: { width: i === n3 - 1 ? "60%" : "100%" } }));
|
|
9834
|
+
return /* @__PURE__ */ React61.createElement(
|
|
9767
9835
|
"span",
|
|
9768
9836
|
{
|
|
9769
9837
|
ref,
|
|
@@ -9781,17 +9849,17 @@ var Skeleton = React60.forwardRef(function Skeleton2(props, ref) {
|
|
|
9781
9849
|
if (v === "circle") {
|
|
9782
9850
|
style.width = style.height = props.size || props.width || 40;
|
|
9783
9851
|
}
|
|
9784
|
-
return /* @__PURE__ */
|
|
9852
|
+
return /* @__PURE__ */ React61.createElement("span", { ref, "aria-hidden": true, className: cx("aura-skel", "aura-skel--" + v, props.className), style });
|
|
9785
9853
|
});
|
|
9786
9854
|
|
|
9787
9855
|
// src/EmptyState.tsx
|
|
9788
|
-
var
|
|
9789
|
-
var EmptyState =
|
|
9856
|
+
var React62 = __toESM(require("react"), 1);
|
|
9857
|
+
var EmptyState = React62.forwardRef(function EmptyState2(props, ref) {
|
|
9790
9858
|
return emptyStateElement(props, ref);
|
|
9791
9859
|
});
|
|
9792
9860
|
|
|
9793
9861
|
// src/Pagination.tsx
|
|
9794
|
-
var
|
|
9862
|
+
var React63 = __toESM(require("react"), 1);
|
|
9795
9863
|
function pageList(page, count, sib) {
|
|
9796
9864
|
let out = [], lo = Math.max(2, page - sib), hi = Math.min(count - 1, page + sib);
|
|
9797
9865
|
if (page - sib <= 3) {
|
|
@@ -9811,7 +9879,7 @@ function pageList(page, count, sib) {
|
|
|
9811
9879
|
if (count > 1) out.push(count);
|
|
9812
9880
|
return out;
|
|
9813
9881
|
}
|
|
9814
|
-
var Pagination =
|
|
9882
|
+
var Pagination = React63.forwardRef(function Pagination2(props, ref) {
|
|
9815
9883
|
const t = useStrings();
|
|
9816
9884
|
useAutoTip();
|
|
9817
9885
|
const count = Math.max(1, props.pageCount || 1);
|
|
@@ -9831,7 +9899,7 @@ var Pagination = React62.forwardRef(function Pagination2(props, ref) {
|
|
|
9831
9899
|
},
|
|
9832
9900
|
extra
|
|
9833
9901
|
);
|
|
9834
|
-
return link ? /* @__PURE__ */
|
|
9902
|
+
return link ? /* @__PURE__ */ React63.createElement(
|
|
9835
9903
|
Link,
|
|
9836
9904
|
{
|
|
9837
9905
|
href: link(p),
|
|
@@ -9844,7 +9912,7 @@ var Pagination = React62.forwardRef(function Pagination2(props, ref) {
|
|
|
9844
9912
|
...common
|
|
9845
9913
|
},
|
|
9846
9914
|
label
|
|
9847
|
-
) : /* @__PURE__ */
|
|
9915
|
+
) : /* @__PURE__ */ React63.createElement(
|
|
9848
9916
|
"button",
|
|
9849
9917
|
{
|
|
9850
9918
|
type: "button",
|
|
@@ -9858,7 +9926,7 @@ var Pagination = React62.forwardRef(function Pagination2(props, ref) {
|
|
|
9858
9926
|
}
|
|
9859
9927
|
function arrow(p, icon, label, rel, disabled) {
|
|
9860
9928
|
if (!link || disabled)
|
|
9861
|
-
return /* @__PURE__ */
|
|
9929
|
+
return /* @__PURE__ */ React63.createElement(
|
|
9862
9930
|
IconButton,
|
|
9863
9931
|
{
|
|
9864
9932
|
icon,
|
|
@@ -9869,7 +9937,7 @@ var Pagination = React62.forwardRef(function Pagination2(props, ref) {
|
|
|
9869
9937
|
}
|
|
9870
9938
|
}
|
|
9871
9939
|
);
|
|
9872
|
-
return /* @__PURE__ */
|
|
9940
|
+
return /* @__PURE__ */ React63.createElement(
|
|
9873
9941
|
Link,
|
|
9874
9942
|
{
|
|
9875
9943
|
href: link(p),
|
|
@@ -9884,17 +9952,17 @@ var Pagination = React62.forwardRef(function Pagination2(props, ref) {
|
|
|
9884
9952
|
}
|
|
9885
9953
|
}
|
|
9886
9954
|
},
|
|
9887
|
-
/* @__PURE__ */
|
|
9955
|
+
/* @__PURE__ */ React63.createElement(Icon, { name: icon, size: "sm" })
|
|
9888
9956
|
);
|
|
9889
9957
|
}
|
|
9890
|
-
return /* @__PURE__ */
|
|
9891
|
-
return typeof p === "number" ? /* @__PURE__ */
|
|
9892
|
-
})), /* @__PURE__ */
|
|
9958
|
+
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) {
|
|
9959
|
+
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");
|
|
9960
|
+
})), /* @__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));
|
|
9893
9961
|
});
|
|
9894
9962
|
|
|
9895
9963
|
// src/Accordion.tsx
|
|
9896
|
-
var
|
|
9897
|
-
var Accordion =
|
|
9964
|
+
var React64 = __toESM(require("react"), 1);
|
|
9965
|
+
var Accordion = React64.forwardRef(function Accordion2(props, ref) {
|
|
9898
9966
|
const auto = uid(), base = props.id || auto;
|
|
9899
9967
|
const multiple = props.type === "multiple";
|
|
9900
9968
|
const st = useMaybeControlled(
|
|
@@ -9932,9 +10000,9 @@ var Accordion = React63.forwardRef(function Accordion2(props, ref) {
|
|
|
9932
10000
|
n3.focus();
|
|
9933
10001
|
}
|
|
9934
10002
|
}
|
|
9935
|
-
return /* @__PURE__ */
|
|
10003
|
+
return /* @__PURE__ */ React64.createElement("div", { ref, className: cx("aura-accordion", props.className), onKeyDown: onKey }, items2.map(function(it) {
|
|
9936
10004
|
const on = open.indexOf(it.id) >= 0, bid = base + "-btn-" + it.id, pid = base + "-panel-" + it.id;
|
|
9937
|
-
return /* @__PURE__ */
|
|
10005
|
+
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(
|
|
9938
10006
|
"button",
|
|
9939
10007
|
{
|
|
9940
10008
|
type: "button",
|
|
@@ -9947,10 +10015,10 @@ var Accordion = React63.forwardRef(function Accordion2(props, ref) {
|
|
|
9947
10015
|
toggle(it.id);
|
|
9948
10016
|
}
|
|
9949
10017
|
},
|
|
9950
|
-
it.icon ? /* @__PURE__ */
|
|
9951
|
-
/* @__PURE__ */
|
|
9952
|
-
/* @__PURE__ */
|
|
9953
|
-
)), /* @__PURE__ */
|
|
10018
|
+
it.icon ? /* @__PURE__ */ React64.createElement(Icon, { name: it.icon, className: "aura-accordion__lead" }) : null,
|
|
10019
|
+
/* @__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),
|
|
10020
|
+
/* @__PURE__ */ React64.createElement(Icon, { name: /* @__PURE__ */ React64.createElement(IconChevronDown, null), className: "aura-accordion__chevron" })
|
|
10021
|
+
)), /* @__PURE__ */ React64.createElement(
|
|
9954
10022
|
"div",
|
|
9955
10023
|
{
|
|
9956
10024
|
id: pid,
|
|
@@ -9965,7 +10033,7 @@ var Accordion = React63.forwardRef(function Accordion2(props, ref) {
|
|
|
9965
10033
|
});
|
|
9966
10034
|
|
|
9967
10035
|
// src/Popover.tsx
|
|
9968
|
-
var
|
|
10036
|
+
var React65 = __toESM(require("react"), 1);
|
|
9969
10037
|
var import_react_dom13 = require("react-dom");
|
|
9970
10038
|
function position(anchor, pop, placement) {
|
|
9971
10039
|
const r2 = anchor.getBoundingClientRect(), pw = pop.offsetWidth, ph = pop.scrollHeight, vw = window.innerWidth, vh = window.innerHeight, gap = 6;
|
|
@@ -9983,15 +10051,15 @@ function position(anchor, pop, placement) {
|
|
|
9983
10051
|
const left = align === "end" ? r2.right - pw : align === "center" ? r2.left + r2.width / 2 - pw / 2 : r2.left;
|
|
9984
10052
|
return { top: Math.max(8, top), left: Math.max(8, Math.min(left, vw - pw - 8)), side, maxHeight };
|
|
9985
10053
|
}
|
|
9986
|
-
var Popover =
|
|
10054
|
+
var Popover = React65.forwardRef(function Popover2(props, ref) {
|
|
9987
10055
|
const t = useStrings();
|
|
9988
10056
|
const density = useDensity();
|
|
9989
10057
|
const auto = uid(), id = props.id || auto;
|
|
9990
10058
|
const st = useMaybeControlled(props.open, !!props.defaultOpen, props.onOpenChange);
|
|
9991
10059
|
const open = !!st[0];
|
|
9992
|
-
const wrap =
|
|
9993
|
-
const pos =
|
|
9994
|
-
const inTree =
|
|
10060
|
+
const wrap = React65.useRef(null), pop = React65.useRef(null), popMerged = useMergedRef(ref, pop);
|
|
10061
|
+
const pos = React65.useState(null), mounted = useMounted();
|
|
10062
|
+
const inTree = React65.useRef(false);
|
|
9995
10063
|
function trigger() {
|
|
9996
10064
|
return wrap.current && (wrap.current.querySelector('button, [role="button"], a, input') || wrap.current.firstElementChild);
|
|
9997
10065
|
}
|
|
@@ -10018,7 +10086,7 @@ var Popover = React64.forwardRef(function Popover2(props, ref) {
|
|
|
10018
10086
|
},
|
|
10019
10087
|
[open, mounted, props.placement]
|
|
10020
10088
|
);
|
|
10021
|
-
|
|
10089
|
+
React65.useEffect(
|
|
10022
10090
|
function() {
|
|
10023
10091
|
if (!open || !mounted) return;
|
|
10024
10092
|
if (props.autoFocus !== false && pop.current) {
|
|
@@ -10043,9 +10111,9 @@ var Popover = React64.forwardRef(function Popover2(props, ref) {
|
|
|
10043
10111
|
},
|
|
10044
10112
|
[open, mounted]
|
|
10045
10113
|
);
|
|
10046
|
-
const child =
|
|
10114
|
+
const child = React65.Children.only(props.trigger);
|
|
10047
10115
|
const panel = open && mounted ? (0, import_react_dom13.createPortal)(
|
|
10048
|
-
/* @__PURE__ */
|
|
10116
|
+
/* @__PURE__ */ React65.createElement(
|
|
10049
10117
|
"div",
|
|
10050
10118
|
{
|
|
10051
10119
|
ref: popMerged,
|
|
@@ -10075,17 +10143,17 @@ var Popover = React64.forwardRef(function Popover2(props, ref) {
|
|
|
10075
10143
|
} else trapTab(e, pop.current);
|
|
10076
10144
|
}
|
|
10077
10145
|
},
|
|
10078
|
-
props.title ? /* @__PURE__ */
|
|
10146
|
+
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(
|
|
10079
10147
|
IconButton,
|
|
10080
10148
|
{
|
|
10081
|
-
icon: /* @__PURE__ */
|
|
10149
|
+
icon: /* @__PURE__ */ React65.createElement(IconX, null),
|
|
10082
10150
|
label: t.close,
|
|
10083
10151
|
onClick: function() {
|
|
10084
10152
|
close(true);
|
|
10085
10153
|
}
|
|
10086
10154
|
}
|
|
10087
10155
|
)) : null,
|
|
10088
|
-
/* @__PURE__ */
|
|
10156
|
+
/* @__PURE__ */ React65.createElement("div", { className: "aura-popover__body" }, typeof props.children === "function" ? props.children({
|
|
10089
10157
|
close: function() {
|
|
10090
10158
|
close(true);
|
|
10091
10159
|
}
|
|
@@ -10093,7 +10161,7 @@ var Popover = React64.forwardRef(function Popover2(props, ref) {
|
|
|
10093
10161
|
),
|
|
10094
10162
|
document.body
|
|
10095
10163
|
) : null;
|
|
10096
|
-
return /* @__PURE__ */
|
|
10164
|
+
return /* @__PURE__ */ React65.createElement("span", { ref: wrap, className: "aura-popover-anchor" }, React65.cloneElement(child, {
|
|
10097
10165
|
onClick: function(e) {
|
|
10098
10166
|
if (child.props.onClick) child.props.onClick(e);
|
|
10099
10167
|
st[1](!open);
|
|
@@ -10105,7 +10173,7 @@ var Popover = React64.forwardRef(function Popover2(props, ref) {
|
|
|
10105
10173
|
});
|
|
10106
10174
|
|
|
10107
10175
|
// src/NumberField.tsx
|
|
10108
|
-
var
|
|
10176
|
+
var React66 = __toESM(require("react"), 1);
|
|
10109
10177
|
function decimalsOf(n3) {
|
|
10110
10178
|
const s = String(n3);
|
|
10111
10179
|
const i = s.indexOf(".");
|
|
@@ -10118,7 +10186,7 @@ function parse(text2) {
|
|
|
10118
10186
|
if (!/^-?(\d+\.?\d*|\.\d+)$/.test(s)) return NaN;
|
|
10119
10187
|
return Number(s);
|
|
10120
10188
|
}
|
|
10121
|
-
var NumberField =
|
|
10189
|
+
var NumberField = React66.forwardRef(function NumberField2(props, ref) {
|
|
10122
10190
|
const t = useStrings();
|
|
10123
10191
|
const auto = uid(), id = props.id || auto;
|
|
10124
10192
|
const step = props.step || 1;
|
|
@@ -10129,7 +10197,7 @@ var NumberField = React65.forwardRef(function NumberField2(props, ref) {
|
|
|
10129
10197
|
props.onChange
|
|
10130
10198
|
);
|
|
10131
10199
|
const value = st[0], setValue = st[1];
|
|
10132
|
-
const draftState =
|
|
10200
|
+
const draftState = React66.useState(null), draft = draftState[0], setDraft = draftState[1];
|
|
10133
10201
|
function fmt2(n3) {
|
|
10134
10202
|
if (n3 == null || isNaN(n3)) return "";
|
|
10135
10203
|
return n3.toLocaleString("en", { minimumFractionDigits: decimals, maximumFractionDigits: decimals });
|
|
@@ -10178,7 +10246,7 @@ var NumberField = React65.forwardRef(function NumberField2(props, ref) {
|
|
|
10178
10246
|
};
|
|
10179
10247
|
const valueText = value == null ? void 0 : [affixText(props.prefix), fmt2(value), affixText(props.suffix)].join(" ").trim();
|
|
10180
10248
|
const stepper = props.stepper !== false && !props.readOnly;
|
|
10181
|
-
return /* @__PURE__ */
|
|
10249
|
+
return /* @__PURE__ */ React66.createElement(
|
|
10182
10250
|
Field,
|
|
10183
10251
|
{
|
|
10184
10252
|
id,
|
|
@@ -10190,7 +10258,7 @@ var NumberField = React65.forwardRef(function NumberField2(props, ref) {
|
|
|
10190
10258
|
disabled: props.disabled,
|
|
10191
10259
|
className: cx(touchClass(props.touchHeight), props.className)
|
|
10192
10260
|
},
|
|
10193
|
-
/* @__PURE__ */
|
|
10261
|
+
/* @__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(
|
|
10194
10262
|
"input",
|
|
10195
10263
|
{
|
|
10196
10264
|
ref,
|
|
@@ -10237,7 +10305,7 @@ var NumberField = React65.forwardRef(function NumberField2(props, ref) {
|
|
|
10237
10305
|
},
|
|
10238
10306
|
onKeyDown
|
|
10239
10307
|
}
|
|
10240
|
-
), props.suffix != null ? /* @__PURE__ */
|
|
10308
|
+
), 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(
|
|
10241
10309
|
"button",
|
|
10242
10310
|
{
|
|
10243
10311
|
type: "button",
|
|
@@ -10253,8 +10321,8 @@ var NumberField = React65.forwardRef(function NumberField2(props, ref) {
|
|
|
10253
10321
|
nudge(-step);
|
|
10254
10322
|
}
|
|
10255
10323
|
},
|
|
10256
|
-
/* @__PURE__ */
|
|
10257
|
-
), /* @__PURE__ */
|
|
10324
|
+
/* @__PURE__ */ React66.createElement(Icon, { name: /* @__PURE__ */ React66.createElement(IconMinus, null) })
|
|
10325
|
+
), /* @__PURE__ */ React66.createElement(
|
|
10258
10326
|
"button",
|
|
10259
10327
|
{
|
|
10260
10328
|
type: "button",
|
|
@@ -10270,14 +10338,14 @@ var NumberField = React65.forwardRef(function NumberField2(props, ref) {
|
|
|
10270
10338
|
nudge(step);
|
|
10271
10339
|
}
|
|
10272
10340
|
},
|
|
10273
|
-
/* @__PURE__ */
|
|
10341
|
+
/* @__PURE__ */ React66.createElement(Icon, { name: /* @__PURE__ */ React66.createElement(IconPlus, null) })
|
|
10274
10342
|
)) : null)
|
|
10275
10343
|
);
|
|
10276
10344
|
});
|
|
10277
10345
|
|
|
10278
10346
|
// src/Stepper.tsx
|
|
10279
|
-
var
|
|
10280
|
-
var Stepper =
|
|
10347
|
+
var React67 = __toESM(require("react"), 1);
|
|
10348
|
+
var Stepper = React67.forwardRef(function Stepper2(props, ref) {
|
|
10281
10349
|
const t = useStrings();
|
|
10282
10350
|
const idBase = uid();
|
|
10283
10351
|
const steps = props.steps || [];
|
|
@@ -10288,22 +10356,22 @@ var Stepper = React66.forwardRef(function Stepper2(props, ref) {
|
|
|
10288
10356
|
if (at < 0) at = 0;
|
|
10289
10357
|
const vertical = props.orientation === "vertical";
|
|
10290
10358
|
const cur2 = steps[at];
|
|
10291
|
-
return /* @__PURE__ */
|
|
10359
|
+
return /* @__PURE__ */ React67.createElement(
|
|
10292
10360
|
"nav",
|
|
10293
10361
|
{
|
|
10294
10362
|
ref,
|
|
10295
10363
|
"aria-label": props.label,
|
|
10296
10364
|
className: cx("aura-stepper", vertical ? "aura-stepper--vertical" : "aura-stepper--horizontal", props.className)
|
|
10297
10365
|
},
|
|
10298
|
-
/* @__PURE__ */
|
|
10366
|
+
/* @__PURE__ */ React67.createElement("ol", { className: "aura-stepper__list" }, steps.map(function(s, i) {
|
|
10299
10367
|
const state = i < at ? "done" : i === at ? "current" : "upcoming";
|
|
10300
10368
|
const error = s.status === "error";
|
|
10301
|
-
const marker = /* @__PURE__ */
|
|
10369
|
+
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);
|
|
10302
10370
|
const note = error ? t.stepError : state === "done" ? t.stepDone : "";
|
|
10303
10371
|
const clickable = state === "done" && !!props.onStepClick;
|
|
10304
10372
|
const named = clickable && (typeof s.label === "string" || typeof s.label === "number") && String(s.label).trim() !== "";
|
|
10305
10373
|
const descId = idBase + "-step-" + i;
|
|
10306
|
-
const text2 = /* @__PURE__ */
|
|
10374
|
+
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(
|
|
10307
10375
|
"span",
|
|
10308
10376
|
{
|
|
10309
10377
|
className: "aura-stepper__desc",
|
|
@@ -10312,14 +10380,14 @@ var Stepper = React66.forwardRef(function Stepper2(props, ref) {
|
|
|
10312
10380
|
},
|
|
10313
10381
|
s.description
|
|
10314
10382
|
) : null);
|
|
10315
|
-
return /* @__PURE__ */
|
|
10383
|
+
return /* @__PURE__ */ React67.createElement(
|
|
10316
10384
|
"li",
|
|
10317
10385
|
{
|
|
10318
10386
|
key: s.id,
|
|
10319
10387
|
className: cx("aura-stepper__item", "is-" + state, error && "is-error"),
|
|
10320
10388
|
"aria-current": state === "current" ? "step" : void 0
|
|
10321
10389
|
},
|
|
10322
|
-
clickable ? /* @__PURE__ */
|
|
10390
|
+
clickable ? /* @__PURE__ */ React67.createElement(
|
|
10323
10391
|
"button",
|
|
10324
10392
|
{
|
|
10325
10393
|
type: "button",
|
|
@@ -10331,19 +10399,19 @@ var Stepper = React66.forwardRef(function Stepper2(props, ref) {
|
|
|
10331
10399
|
},
|
|
10332
10400
|
marker,
|
|
10333
10401
|
text2
|
|
10334
|
-
) : /* @__PURE__ */
|
|
10402
|
+
) : /* @__PURE__ */ React67.createElement("span", { className: "aura-stepper__step" }, marker, text2)
|
|
10335
10403
|
);
|
|
10336
10404
|
})),
|
|
10337
|
-
!vertical && cur2 ? /* @__PURE__ */
|
|
10405
|
+
!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
|
|
10338
10406
|
);
|
|
10339
10407
|
});
|
|
10340
10408
|
|
|
10341
10409
|
// src/SegmentedControl.tsx
|
|
10342
|
-
var
|
|
10410
|
+
var React68 = __toESM(require("react"), 1);
|
|
10343
10411
|
function toOpt2(o) {
|
|
10344
10412
|
return typeof o === "object" ? o : { value: o, label: o };
|
|
10345
10413
|
}
|
|
10346
|
-
var SegmentedControl =
|
|
10414
|
+
var SegmentedControl = React68.forwardRef(
|
|
10347
10415
|
function SegmentedControl2(props, ref) {
|
|
10348
10416
|
const options = (props.options || []).map(toOpt2);
|
|
10349
10417
|
useAutoTip();
|
|
@@ -10357,7 +10425,7 @@ var SegmentedControl = React67.forwardRef(
|
|
|
10357
10425
|
);
|
|
10358
10426
|
const value = st[0], setValue = st[1];
|
|
10359
10427
|
const auto = uid(), id = props.id || auto;
|
|
10360
|
-
const refs =
|
|
10428
|
+
const refs = React68.useRef([]);
|
|
10361
10429
|
const selIdx = options.findIndex(function(o) {
|
|
10362
10430
|
return o.value === value;
|
|
10363
10431
|
});
|
|
@@ -10390,7 +10458,7 @@ var SegmentedControl = React67.forwardRef(
|
|
|
10390
10458
|
move(options.length, -1);
|
|
10391
10459
|
}
|
|
10392
10460
|
}
|
|
10393
|
-
return /* @__PURE__ */
|
|
10461
|
+
return /* @__PURE__ */ React68.createElement(
|
|
10394
10462
|
"div",
|
|
10395
10463
|
{
|
|
10396
10464
|
ref,
|
|
@@ -10410,7 +10478,7 @@ var SegmentedControl = React67.forwardRef(
|
|
|
10410
10478
|
options.map(function(o, i) {
|
|
10411
10479
|
const on = o.value === value;
|
|
10412
10480
|
const off = props.disabled || o.disabled;
|
|
10413
|
-
return /* @__PURE__ */
|
|
10481
|
+
return /* @__PURE__ */ React68.createElement(
|
|
10414
10482
|
"button",
|
|
10415
10483
|
{
|
|
10416
10484
|
key: o.value,
|
|
@@ -10432,8 +10500,8 @@ var SegmentedControl = React67.forwardRef(
|
|
|
10432
10500
|
onKeyDown(e, i);
|
|
10433
10501
|
}
|
|
10434
10502
|
},
|
|
10435
|
-
o.icon ? /* @__PURE__ */
|
|
10436
|
-
o.iconOnly ? null : /* @__PURE__ */
|
|
10503
|
+
o.icon ? /* @__PURE__ */ React68.createElement(Icon, { name: o.icon }) : null,
|
|
10504
|
+
o.iconOnly ? null : /* @__PURE__ */ React68.createElement("span", null, o.label)
|
|
10437
10505
|
);
|
|
10438
10506
|
})
|
|
10439
10507
|
);
|