@jirawatpyk/aura-react 5.66.0 → 5.67.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 +4 -0
- package/dist/aura.bundle.js +673 -596
- package/dist/cjs/index.cjs +672 -595
- package/dist/esm/CheckboxGroup.js +81 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/strings.js +1 -0
- package/dist/esm/strings.sv.js +1 -0
- package/dist/esm/strings.th.js +1 -0
- package/dist/index.d.cts +22 -0
- package/dist/index.d.ts +22 -0
- package/dist/locales/sv.cjs +1 -0
- package/dist/locales/sv.d.cts +2 -0
- package/dist/locales/sv.d.ts +2 -0
- package/dist/locales/th.cjs +1 -0
- package/dist/locales/th.d.cts +2 -0
- package/dist/locales/th.d.ts +2 -0
- package/dist/server/index.cjs +3 -0
- package/dist/server/index.d.cts +2 -0
- package/dist/server/index.d.ts +2 -0
- package/dist/server/index.js +3 -0
- package/dist/styles.css +2 -0
- package/dist/styles.layer.css +2 -0
- package/package.json +1 -1
package/dist/aura.bundle.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @ds-bundle: {"format":4,"namespace":"Aura","components":[{"name":"Icon"},{"name":"Button"},{"name":"IconButton"},{"name":"Menu"},{"name":"DropdownMenu"},{"name":"Checkbox"},{"name":"StatusPill"},{"name":"TextField"},{"name":"Textarea"},{"name":"Select"},{"name":"FilterSelect"},{"name":"FilterDateRange"},{"name":"RadioGroup"},{"name":"Switch"},{"name":"Combobox"},{"name":"DatePicker"},{"name":"DateRangePicker"},{"name":"Calendar"},{"name":"Alert"},{"name":"Toaster"},{"name":"PasswordField"},{"name":"FormErrorSummary"},{"name":"FilterBar"},{"name":"Command"},{"name":"Tooltip"},{"name":"Dialog"},{"name":"Drawer"},{"name":"DataTable"},{"name":"Card"},{"name":"Tabs"},{"name":"SideNav"},{"name":"Breadcrumb"},{"name":"Avatar"},{"name":"Stack"},{"name":"Grid"},{"name":"Container"},{"name":"PageHeader"},{"name":"StatusTile"},{"name":"TileGrid"},{"name":"Sparkline"},{"name":"AppShell"},{"name":"ActionBar"},{"name":"Separator"},{"name":"Table"},{"name":"Tr"},{"name":"Th"},{"name":"Td"},{"name":"TableSkeleton"},{"name":"BottomNav"},{"name":"Surface"},{"name":"Stat"},{"name":"TimePicker"},{"name":"FileUpload"},{"name":"ColorSchemeScript"},{"name":"ColorSchemeToggle"},{"name":"Badge"},{"name":"Tag"},{"name":"Progress"},{"name":"Skeleton"},{"name":"EmptyState"},{"name":"Pagination"},{"name":"Accordion"},{"name":"Popover"},{"name":"NumberField"},{"name":"Stepper"},{"name":"SegmentedControl"}]} */
|
|
1
|
+
/* @ds-bundle: {"format":4,"namespace":"Aura","components":[{"name":"Icon"},{"name":"Button"},{"name":"IconButton"},{"name":"Menu"},{"name":"DropdownMenu"},{"name":"Checkbox"},{"name":"StatusPill"},{"name":"TextField"},{"name":"Textarea"},{"name":"Select"},{"name":"FilterSelect"},{"name":"FilterDateRange"},{"name":"RadioGroup"},{"name":"CheckboxGroup"},{"name":"Switch"},{"name":"Combobox"},{"name":"DatePicker"},{"name":"DateRangePicker"},{"name":"Calendar"},{"name":"Alert"},{"name":"Toaster"},{"name":"PasswordField"},{"name":"FormErrorSummary"},{"name":"FilterBar"},{"name":"Command"},{"name":"Tooltip"},{"name":"Dialog"},{"name":"Drawer"},{"name":"DataTable"},{"name":"Card"},{"name":"Tabs"},{"name":"SideNav"},{"name":"Breadcrumb"},{"name":"Avatar"},{"name":"Stack"},{"name":"Grid"},{"name":"Container"},{"name":"PageHeader"},{"name":"StatusTile"},{"name":"TileGrid"},{"name":"Sparkline"},{"name":"AppShell"},{"name":"ActionBar"},{"name":"Separator"},{"name":"Table"},{"name":"Tr"},{"name":"Th"},{"name":"Td"},{"name":"TableSkeleton"},{"name":"BottomNav"},{"name":"Surface"},{"name":"Stat"},{"name":"TimePicker"},{"name":"FileUpload"},{"name":"ColorSchemeScript"},{"name":"ColorSchemeToggle"},{"name":"Badge"},{"name":"Tag"},{"name":"Progress"},{"name":"Skeleton"},{"name":"EmptyState"},{"name":"Pagination"},{"name":"Accordion"},{"name":"Popover"},{"name":"NumberField"},{"name":"Stepper"},{"name":"SegmentedControl"}]} */
|
|
2
2
|
window.Aura = (() => {
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -63,6 +63,7 @@ window.Aura = (() => {
|
|
|
63
63
|
Calendar: () => Calendar,
|
|
64
64
|
Card: () => Card,
|
|
65
65
|
Checkbox: () => Checkbox,
|
|
66
|
+
CheckboxGroup: () => CheckboxGroup,
|
|
66
67
|
ColorSchemeScript: () => ColorSchemeScript,
|
|
67
68
|
ColorSchemeToggle: () => ColorSchemeToggle,
|
|
68
69
|
Combobox: () => Combobox,
|
|
@@ -1029,6 +1030,7 @@ window.Aura = (() => {
|
|
|
1029
1030
|
statusOk: "\u0E1B\u0E01\u0E15\u0E34",
|
|
1030
1031
|
statusUnknown: "\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
|
|
1031
1032
|
opensInNewTab: "\u0E40\u0E1B\u0E34\u0E14\u0E43\u0E19\u0E41\u0E17\u0E47\u0E1A\u0E43\u0E2B\u0E21\u0E48",
|
|
1033
|
+
required: "\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19",
|
|
1032
1034
|
filtersApplied: function(n3) {
|
|
1033
1035
|
return "\u0E15\u0E31\u0E27\u0E01\u0E23\u0E2D\u0E07, \u0E43\u0E0A\u0E49\u0E2D\u0E22\u0E39\u0E48 " + n3.toLocaleString("en") + " \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23";
|
|
1034
1036
|
},
|
|
@@ -1170,6 +1172,7 @@ window.Aura = (() => {
|
|
|
1170
1172
|
statusOk: "OK",
|
|
1171
1173
|
statusUnknown: "Ingen data",
|
|
1172
1174
|
opensInNewTab: "\xF6ppnas i en ny flik",
|
|
1175
|
+
required: "obligatoriskt",
|
|
1173
1176
|
filtersApplied: function(n3) {
|
|
1174
1177
|
return "Filter, " + n3.toLocaleString("sv-SE") + " aktiva";
|
|
1175
1178
|
},
|
|
@@ -1312,6 +1315,7 @@ window.Aura = (() => {
|
|
|
1312
1315
|
statusOk: "OK",
|
|
1313
1316
|
statusUnknown: "No data",
|
|
1314
1317
|
opensInNewTab: "opens in a new tab",
|
|
1318
|
+
required: "required",
|
|
1315
1319
|
filtersApplied: function(n3) {
|
|
1316
1320
|
return "Filters, " + n3.toLocaleString("en") + " applied";
|
|
1317
1321
|
},
|
|
@@ -3901,15 +3905,88 @@ window.Aura = (() => {
|
|
|
3901
3905
|
);
|
|
3902
3906
|
});
|
|
3903
3907
|
|
|
3904
|
-
// src/
|
|
3908
|
+
// src/CheckboxGroup.tsx
|
|
3905
3909
|
var React21 = __toESM(require_react(), 1);
|
|
3906
|
-
var
|
|
3910
|
+
var CheckboxGroup = React21.forwardRef(
|
|
3911
|
+
function CheckboxGroup2(props, ref) {
|
|
3912
|
+
const t = useStrings();
|
|
3913
|
+
const auto = uid(), id = props.id || auto;
|
|
3914
|
+
const st = useMaybeControlled(props.value, props.defaultValue || [], props.onChange);
|
|
3915
|
+
const picked = st[0] || [];
|
|
3916
|
+
const opts = (props.options || []).map(function(o) {
|
|
3917
|
+
return typeof o === "object" ? o : { value: o, label: o };
|
|
3918
|
+
});
|
|
3919
|
+
const name = props.name || id;
|
|
3920
|
+
const setRef = React21.useCallback(
|
|
3921
|
+
function(el) {
|
|
3922
|
+
if (el)
|
|
3923
|
+
el.focus = function(o) {
|
|
3924
|
+
const b = el.querySelector('input[type="checkbox"]:checked:not(:disabled)') || el.querySelector('input[type="checkbox"]:not(:disabled)');
|
|
3925
|
+
if (b) b.focus(o);
|
|
3926
|
+
};
|
|
3927
|
+
if (typeof ref === "function") ref(el);
|
|
3928
|
+
else if (ref) ref.current = el;
|
|
3929
|
+
},
|
|
3930
|
+
[ref]
|
|
3931
|
+
);
|
|
3932
|
+
return /* @__PURE__ */ React21.createElement(
|
|
3933
|
+
"fieldset",
|
|
3934
|
+
{
|
|
3935
|
+
ref: setRef,
|
|
3936
|
+
className: cx(
|
|
3937
|
+
"aura-field aura-radio-group aura-checkbox-group",
|
|
3938
|
+
props.error && "is-invalid",
|
|
3939
|
+
touchClass(props.touchHeight),
|
|
3940
|
+
props.className
|
|
3941
|
+
),
|
|
3942
|
+
"aria-describedby": describedBy(id, props),
|
|
3943
|
+
disabled: props.disabled
|
|
3944
|
+
},
|
|
3945
|
+
props.label ? /* @__PURE__ */ React21.createElement("legend", { className: "aura-field__label" }, props.label, props.required ? /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement("span", { className: "aura-field__req", "aria-hidden": true }, " *"), /* @__PURE__ */ React21.createElement("span", { className: "aura-sr-only" }, " (" + t.required + ")")) : null) : null,
|
|
3946
|
+
/* @__PURE__ */ React21.createElement("div", { className: cx("aura-radio-group__list", props.orientation === "horizontal" && "is-horizontal") }, opts.map(function(v) {
|
|
3947
|
+
return /* @__PURE__ */ React21.createElement(
|
|
3948
|
+
Checkbox,
|
|
3949
|
+
{
|
|
3950
|
+
key: v.value,
|
|
3951
|
+
name,
|
|
3952
|
+
value: v.value,
|
|
3953
|
+
checked: picked.indexOf(v.value) >= 0,
|
|
3954
|
+
disabled: props.disabled || v.disabled,
|
|
3955
|
+
description: v.description,
|
|
3956
|
+
touchHeight: props.touchHeight,
|
|
3957
|
+
"aria-invalid": props.error ? true : void 0,
|
|
3958
|
+
"aria-describedby": props.error ? id + "-error" : void 0,
|
|
3959
|
+
onChange: function(on) {
|
|
3960
|
+
const known = opts.map(function(o) {
|
|
3961
|
+
return o.value;
|
|
3962
|
+
});
|
|
3963
|
+
const next = known.filter(function(val) {
|
|
3964
|
+
return val === v.value ? on : picked.indexOf(val) >= 0;
|
|
3965
|
+
}).concat(
|
|
3966
|
+
picked.filter(function(val) {
|
|
3967
|
+
return known.indexOf(val) < 0;
|
|
3968
|
+
})
|
|
3969
|
+
);
|
|
3970
|
+
st[1](next);
|
|
3971
|
+
}
|
|
3972
|
+
},
|
|
3973
|
+
v.label
|
|
3974
|
+
);
|
|
3975
|
+
})),
|
|
3976
|
+
props.error ? /* @__PURE__ */ React21.createElement("p", { className: "aura-field__error", id: id + "-error" }, /* @__PURE__ */ React21.createElement(Icon, { name: /* @__PURE__ */ React21.createElement(IconCircleAlert, null), size: 14 }), props.error) : props.hint ? /* @__PURE__ */ React21.createElement("p", { className: "aura-field__hint", id: id + "-hint" }, props.hint) : null
|
|
3977
|
+
);
|
|
3978
|
+
}
|
|
3979
|
+
);
|
|
3980
|
+
|
|
3981
|
+
// src/Switch.tsx
|
|
3982
|
+
var React22 = __toESM(require_react(), 1);
|
|
3983
|
+
var Switch = React22.forwardRef(function Switch2(props, ref) {
|
|
3907
3984
|
const auto = uid(), id = props.id || auto;
|
|
3908
3985
|
const st = useMaybeControlled(props.checked, !!props.defaultChecked, props.onChange);
|
|
3909
3986
|
const on = !!st[0];
|
|
3910
3987
|
const ro = !!props.readOnly && !props.disabled;
|
|
3911
3988
|
const described = [props.description ? id + "-desc" : "", props["aria-describedby"] || ""].filter(Boolean).join(" ");
|
|
3912
|
-
return /* @__PURE__ */
|
|
3989
|
+
return /* @__PURE__ */ React22.createElement(
|
|
3913
3990
|
"div",
|
|
3914
3991
|
{
|
|
3915
3992
|
className: cx("aura-switch-row", props.disabled && "is-disabled", ro && "is-readonly", props.className),
|
|
@@ -3919,7 +3996,7 @@ window.Aura = (() => {
|
|
|
3919
3996
|
st[1](!on);
|
|
3920
3997
|
}
|
|
3921
3998
|
},
|
|
3922
|
-
/* @__PURE__ */
|
|
3999
|
+
/* @__PURE__ */ React22.createElement(
|
|
3923
4000
|
"button",
|
|
3924
4001
|
{
|
|
3925
4002
|
ref,
|
|
@@ -3937,15 +4014,15 @@ window.Aura = (() => {
|
|
|
3937
4014
|
if (!ro) st[1](!on);
|
|
3938
4015
|
}
|
|
3939
4016
|
},
|
|
3940
|
-
/* @__PURE__ */
|
|
4017
|
+
/* @__PURE__ */ React22.createElement("span", { className: "aura-switch__thumb" })
|
|
3941
4018
|
),
|
|
3942
|
-
props.label ? /* @__PURE__ */
|
|
3943
|
-
props.icon ? /* @__PURE__ */
|
|
4019
|
+
props.label ? /* @__PURE__ */ React22.createElement("span", { className: "aura-choice__text" }, /* @__PURE__ */ React22.createElement("label", { className: "aura-choice__label", id: id + "-label", htmlFor: id }, props.label), props.description ? /* @__PURE__ */ React22.createElement("span", { className: "aura-choice__desc", id: id + "-desc" }, props.description) : null) : props.description ? /* @__PURE__ */ React22.createElement("span", { className: "aura-sr-only", id: id + "-desc" }, props.description) : null,
|
|
4020
|
+
props.icon ? /* @__PURE__ */ React22.createElement(Icon, { name: props.icon, className: "aura-switch-row__icon" }) : null
|
|
3944
4021
|
);
|
|
3945
4022
|
});
|
|
3946
4023
|
|
|
3947
4024
|
// src/Combobox.tsx
|
|
3948
|
-
var
|
|
4025
|
+
var React23 = __toESM(require_react(), 1);
|
|
3949
4026
|
var import_react_dom5 = __toESM(require_react_dom(), 1);
|
|
3950
4027
|
function norm(s) {
|
|
3951
4028
|
return String(s == null ? "" : s).normalize("NFC").toLocaleLowerCase("th");
|
|
@@ -3960,7 +4037,7 @@ window.Aura = (() => {
|
|
|
3960
4037
|
return norm(k).indexOf(q) >= 0;
|
|
3961
4038
|
});
|
|
3962
4039
|
}
|
|
3963
|
-
var Combobox =
|
|
4040
|
+
var Combobox = React23.forwardRef(
|
|
3964
4041
|
function Combobox2(all, ref) {
|
|
3965
4042
|
const props = all;
|
|
3966
4043
|
const multi = all.multiple === true;
|
|
@@ -4002,11 +4079,11 @@ window.Aura = (() => {
|
|
|
4002
4079
|
return o.value === v;
|
|
4003
4080
|
})[0];
|
|
4004
4081
|
}).filter(Boolean) : [];
|
|
4005
|
-
const openState =
|
|
4006
|
-
const qState =
|
|
4007
|
-
const aState =
|
|
4008
|
-
const posState =
|
|
4009
|
-
const inputRef =
|
|
4082
|
+
const openState = React23.useState(false), open = openState[0], setOpen = openState[1];
|
|
4083
|
+
const qState = React23.useState(null), query = qState[0], setQuery = qState[1];
|
|
4084
|
+
const aState = React23.useState(0), active = aState[0], setActive = aState[1];
|
|
4085
|
+
const posState = React23.useState(null);
|
|
4086
|
+
const inputRef = React23.useRef(null), inputMerged = useMergedRef(ref, inputRef), boxRef = React23.useRef(null), listRef = React23.useRef(null);
|
|
4010
4087
|
const mounted = useMounted();
|
|
4011
4088
|
const limit = props.limit || 200;
|
|
4012
4089
|
const filter = props.filter || defaultFilter;
|
|
@@ -4036,7 +4113,7 @@ window.Aura = (() => {
|
|
|
4036
4113
|
},
|
|
4037
4114
|
[open, shown.length, values.length]
|
|
4038
4115
|
);
|
|
4039
|
-
|
|
4116
|
+
React23.useEffect(
|
|
4040
4117
|
function() {
|
|
4041
4118
|
if (!open) return;
|
|
4042
4119
|
function outside(e) {
|
|
@@ -4059,7 +4136,7 @@ window.Aura = (() => {
|
|
|
4059
4136
|
},
|
|
4060
4137
|
[open]
|
|
4061
4138
|
);
|
|
4062
|
-
|
|
4139
|
+
React23.useEffect(
|
|
4063
4140
|
function() {
|
|
4064
4141
|
if (!open || !listRef.current) return;
|
|
4065
4142
|
const el = listRef.current.querySelector('[data-idx="' + activeIdx + '"]');
|
|
@@ -4079,8 +4156,8 @@ window.Aura = (() => {
|
|
|
4079
4156
|
setOpen(false);
|
|
4080
4157
|
setQuery(null);
|
|
4081
4158
|
}
|
|
4082
|
-
const committed =
|
|
4083
|
-
const commitRef =
|
|
4159
|
+
const committed = React23.useRef(false);
|
|
4160
|
+
const commitRef = React23.useRef(function() {
|
|
4084
4161
|
return false;
|
|
4085
4162
|
});
|
|
4086
4163
|
function commitTyped() {
|
|
@@ -4168,7 +4245,7 @@ window.Aura = (() => {
|
|
|
4168
4245
|
function renderOpt(o, i) {
|
|
4169
4246
|
const isSel = multi ? isPicked(o.value) : !!selected && o.value === selected.value;
|
|
4170
4247
|
const blocked = o.disabled || multi && full && !isSel;
|
|
4171
|
-
return /* @__PURE__ */
|
|
4248
|
+
return /* @__PURE__ */ React23.createElement(
|
|
4172
4249
|
"li",
|
|
4173
4250
|
{
|
|
4174
4251
|
key: o.value,
|
|
@@ -4194,9 +4271,9 @@ window.Aura = (() => {
|
|
|
4194
4271
|
if (activeIdx !== i) setActive(i);
|
|
4195
4272
|
}
|
|
4196
4273
|
},
|
|
4197
|
-
o.icon ? /* @__PURE__ */
|
|
4198
|
-
/* @__PURE__ */
|
|
4199
|
-
isSel ? /* @__PURE__ */
|
|
4274
|
+
o.icon ? /* @__PURE__ */ React23.createElement(Icon, { name: o.icon }) : null,
|
|
4275
|
+
/* @__PURE__ */ React23.createElement("span", { className: "aura-combo__text" }, /* @__PURE__ */ React23.createElement("span", { className: "aura-combo__label", id: o.description ? optId(i) + "-label" : void 0 }, o.label), o.description ? /* @__PURE__ */ React23.createElement("span", { className: "aura-combo__desc", id: optId(i) + "-desc", "aria-hidden": true }, o.description) : null),
|
|
4276
|
+
isSel ? /* @__PURE__ */ React23.createElement(Icon, { name: /* @__PURE__ */ React23.createElement(IconCheck, null), className: "aura-combo__check" }) : null
|
|
4200
4277
|
);
|
|
4201
4278
|
}
|
|
4202
4279
|
function grouped(list2) {
|
|
@@ -4209,7 +4286,7 @@ window.Aura = (() => {
|
|
|
4209
4286
|
return out;
|
|
4210
4287
|
}
|
|
4211
4288
|
const list = open && mounted && posState[0] ? (0, import_react_dom5.createPortal)(
|
|
4212
|
-
/* @__PURE__ */
|
|
4289
|
+
/* @__PURE__ */ React23.createElement(
|
|
4213
4290
|
"div",
|
|
4214
4291
|
{
|
|
4215
4292
|
ref: listRef,
|
|
@@ -4220,7 +4297,7 @@ window.Aura = (() => {
|
|
|
4220
4297
|
e.preventDefault();
|
|
4221
4298
|
}
|
|
4222
4299
|
},
|
|
4223
|
-
live.length ? /* @__PURE__ */
|
|
4300
|
+
live.length ? /* @__PURE__ */ React23.createElement(
|
|
4224
4301
|
"ul",
|
|
4225
4302
|
{
|
|
4226
4303
|
id: listId,
|
|
@@ -4231,20 +4308,20 @@ window.Aura = (() => {
|
|
|
4231
4308
|
},
|
|
4232
4309
|
grouped(live).map(function(seg) {
|
|
4233
4310
|
if (seg.g == null)
|
|
4234
|
-
return /* @__PURE__ */
|
|
4311
|
+
return /* @__PURE__ */ React23.createElement(React23.Fragment, { key: "u" + seg.items[0][1] }, seg.items.map(function(p) {
|
|
4235
4312
|
return renderOpt(p[0], p[1]);
|
|
4236
4313
|
}));
|
|
4237
4314
|
const gid = id + "-group-" + seg.g + "-" + seg.items[0][1];
|
|
4238
|
-
return /* @__PURE__ */
|
|
4315
|
+
return /* @__PURE__ */ React23.createElement("li", { key: gid, role: "group", "aria-labelledby": gid, className: "aura-combo__group" }, /* @__PURE__ */ React23.createElement("span", { id: gid, role: "presentation", className: "aura-combo__group-label" }, groups[seg.g].label), /* @__PURE__ */ React23.createElement("ul", { role: "none", className: "aura-combo__grouplist" }, seg.items.map(function(p) {
|
|
4239
4316
|
return renderOpt(p[0], p[1]);
|
|
4240
4317
|
})));
|
|
4241
4318
|
})
|
|
4242
4319
|
) : null,
|
|
4243
|
-
props.loading || !live.length || more ? /* @__PURE__ */
|
|
4320
|
+
props.loading || !live.length || more ? /* @__PURE__ */ React23.createElement("div", { className: "aura-combo__list", role: "status" }, props.loading ? /* @__PURE__ */ React23.createElement("div", { className: "aura-combo__note" }, /* @__PURE__ */ React23.createElement(Icon, { name: /* @__PURE__ */ React23.createElement(IconLoaderCircle, null), className: "aura-spin" }), props.loadingText || t.searching) : !live.length ? /* @__PURE__ */ React23.createElement("div", { className: "aura-combo__note" }, props.emptyText || t.noMatches) : /* @__PURE__ */ React23.createElement("div", { className: "aura-combo__note" }, t.keepTyping(options.length))) : null
|
|
4244
4321
|
),
|
|
4245
4322
|
document.body
|
|
4246
4323
|
) : null;
|
|
4247
|
-
return /* @__PURE__ */
|
|
4324
|
+
return /* @__PURE__ */ React23.createElement(
|
|
4248
4325
|
Field,
|
|
4249
4326
|
{
|
|
4250
4327
|
id,
|
|
@@ -4257,8 +4334,8 @@ window.Aura = (() => {
|
|
|
4257
4334
|
disabled: props.disabled,
|
|
4258
4335
|
className: cx(touchClass(props.touchHeight), props.className)
|
|
4259
4336
|
},
|
|
4260
|
-
/* @__PURE__ */
|
|
4261
|
-
return /* @__PURE__ */
|
|
4337
|
+
/* @__PURE__ */ React23.createElement("div", { ref: boxRef, className: cx("aura-input aura-combo has-icon", open && "is-open", multi && "is-multi") }, /* @__PURE__ */ React23.createElement(Icon, { name: props.icon || /* @__PURE__ */ React23.createElement(IconSearch, null), className: "aura-input__icon" }), multi && picked.length ? /* @__PURE__ */ React23.createElement("span", { className: "aura-combo__chips" }, picked.map(function(o) {
|
|
4338
|
+
return /* @__PURE__ */ React23.createElement("span", { key: o.value, className: "aura-combo__chip" }, /* @__PURE__ */ React23.createElement("span", { className: "aura-combo__chip-label" }, o.label), props.disabled || props.readOnly ? null : /* @__PURE__ */ React23.createElement(
|
|
4262
4339
|
"button",
|
|
4263
4340
|
{
|
|
4264
4341
|
type: "button",
|
|
@@ -4277,13 +4354,13 @@ window.Aura = (() => {
|
|
|
4277
4354
|
if (inputRef.current) inputRef.current.focus();
|
|
4278
4355
|
}
|
|
4279
4356
|
},
|
|
4280
|
-
/* @__PURE__ */
|
|
4357
|
+
/* @__PURE__ */ React23.createElement(Icon, { name: /* @__PURE__ */ React23.createElement(IconX, null) })
|
|
4281
4358
|
));
|
|
4282
|
-
})) : null, multi ? /* @__PURE__ */
|
|
4359
|
+
})) : null, multi ? /* @__PURE__ */ React23.createElement("span", { id: summaryId, className: "aura-sr-only" }, picked.length ? t.selectedCount(picked.length) + ": " + picked.map(function(o) {
|
|
4283
4360
|
return o.label;
|
|
4284
4361
|
}).join(", ") : "") : null, props.name ? multi ? values.map(function(v) {
|
|
4285
|
-
return /* @__PURE__ */
|
|
4286
|
-
}) : /* @__PURE__ */
|
|
4362
|
+
return /* @__PURE__ */ React23.createElement("input", { key: v, type: "hidden", name: props.name, value: v });
|
|
4363
|
+
}) : /* @__PURE__ */ React23.createElement("input", { type: "hidden", name: props.name, value: value == null ? "" : value }) : null, /* @__PURE__ */ React23.createElement(
|
|
4287
4364
|
"input",
|
|
4288
4365
|
{
|
|
4289
4366
|
ref: inputMerged,
|
|
@@ -4332,7 +4409,7 @@ window.Aura = (() => {
|
|
|
4332
4409
|
}, 0);
|
|
4333
4410
|
}
|
|
4334
4411
|
}
|
|
4335
|
-
), props.clearable !== false && values.length && !props.disabled && !props.readOnly ? /* @__PURE__ */
|
|
4412
|
+
), props.clearable !== false && values.length && !props.disabled && !props.readOnly ? /* @__PURE__ */ React23.createElement(
|
|
4336
4413
|
"button",
|
|
4337
4414
|
{
|
|
4338
4415
|
type: "button",
|
|
@@ -4345,8 +4422,8 @@ window.Aura = (() => {
|
|
|
4345
4422
|
if (inputRef.current) inputRef.current.focus();
|
|
4346
4423
|
}
|
|
4347
4424
|
},
|
|
4348
|
-
/* @__PURE__ */
|
|
4349
|
-
) : null, /* @__PURE__ */
|
|
4425
|
+
/* @__PURE__ */ React23.createElement(Icon, { name: /* @__PURE__ */ React23.createElement(IconX, null) })
|
|
4426
|
+
) : null, /* @__PURE__ */ React23.createElement(
|
|
4350
4427
|
"button",
|
|
4351
4428
|
{
|
|
4352
4429
|
type: "button",
|
|
@@ -4364,7 +4441,7 @@ window.Aura = (() => {
|
|
|
4364
4441
|
}
|
|
4365
4442
|
}
|
|
4366
4443
|
},
|
|
4367
|
-
/* @__PURE__ */
|
|
4444
|
+
/* @__PURE__ */ React23.createElement(Icon, { name: /* @__PURE__ */ React23.createElement(IconChevronDown, null) })
|
|
4368
4445
|
)),
|
|
4369
4446
|
list
|
|
4370
4447
|
);
|
|
@@ -4372,20 +4449,20 @@ window.Aura = (() => {
|
|
|
4372
4449
|
);
|
|
4373
4450
|
|
|
4374
4451
|
// src/Alert.tsx
|
|
4375
|
-
var
|
|
4376
|
-
var Alert =
|
|
4452
|
+
var React24 = __toESM(require_react(), 1);
|
|
4453
|
+
var Alert = React24.forwardRef(function Alert2(props, ref) {
|
|
4377
4454
|
const t = useStrings();
|
|
4378
4455
|
const autoId = uid();
|
|
4379
4456
|
return alertElement(
|
|
4380
4457
|
props,
|
|
4381
4458
|
ref,
|
|
4382
|
-
props.onDismiss ? /* @__PURE__ */
|
|
4459
|
+
props.onDismiss ? /* @__PURE__ */ React24.createElement(IconButton, { icon: /* @__PURE__ */ React24.createElement(IconX, null), label: t.dismiss, className: "aura-alert__close", onClick: props.onDismiss }) : null,
|
|
4383
4460
|
autoId
|
|
4384
4461
|
);
|
|
4385
4462
|
});
|
|
4386
4463
|
|
|
4387
4464
|
// src/Toaster.tsx
|
|
4388
|
-
var
|
|
4465
|
+
var React25 = __toESM(require_react(), 1);
|
|
4389
4466
|
var import_react_dom6 = __toESM(require_react_dom(), 1);
|
|
4390
4467
|
var MAX_VISIBLE = 3;
|
|
4391
4468
|
var toastState = {
|
|
@@ -4461,8 +4538,8 @@ window.Aura = (() => {
|
|
|
4461
4538
|
function ToastItem(props) {
|
|
4462
4539
|
const str = useStrings();
|
|
4463
4540
|
const Link = useLinkComponent();
|
|
4464
|
-
const node =
|
|
4465
|
-
const origin =
|
|
4541
|
+
const node = React25.useRef(null);
|
|
4542
|
+
const origin = React25.useRef(null);
|
|
4466
4543
|
useIsoLayoutEffect(function() {
|
|
4467
4544
|
origin.current = outsideToaster(document.activeElement);
|
|
4468
4545
|
const el = node.current;
|
|
@@ -4478,8 +4555,8 @@ window.Aura = (() => {
|
|
|
4478
4555
|
}, 0);
|
|
4479
4556
|
};
|
|
4480
4557
|
}, []);
|
|
4481
|
-
const t = props.toast, timer2 =
|
|
4482
|
-
const hover =
|
|
4558
|
+
const t = props.toast, timer2 = React25.useRef(null), left = React25.useRef(t.duration || 5e3), since = React25.useRef(0);
|
|
4559
|
+
const hover = React25.useRef(false), focused = React25.useRef(false);
|
|
4483
4560
|
function syncFocus() {
|
|
4484
4561
|
if (focused.current && !(node.current && node.current.contains(document.activeElement))) focused.current = false;
|
|
4485
4562
|
}
|
|
@@ -4501,7 +4578,7 @@ window.Aura = (() => {
|
|
|
4501
4578
|
left.current -= Date.now() - since.current;
|
|
4502
4579
|
}
|
|
4503
4580
|
}
|
|
4504
|
-
|
|
4581
|
+
React25.useEffect(
|
|
4505
4582
|
function() {
|
|
4506
4583
|
if (timer2.current) clearTimeout(timer2.current);
|
|
4507
4584
|
timer2.current = null;
|
|
@@ -4520,7 +4597,7 @@ window.Aura = (() => {
|
|
|
4520
4597
|
if (a.onClick) a.onClick();
|
|
4521
4598
|
if (a.dismiss !== false) toast.dismiss(t.id);
|
|
4522
4599
|
}
|
|
4523
|
-
return /* @__PURE__ */
|
|
4600
|
+
return /* @__PURE__ */ React25.createElement(
|
|
4524
4601
|
"div",
|
|
4525
4602
|
{
|
|
4526
4603
|
ref: node,
|
|
@@ -4557,16 +4634,16 @@ window.Aura = (() => {
|
|
|
4557
4634
|
resume();
|
|
4558
4635
|
}
|
|
4559
4636
|
},
|
|
4560
|
-
/* @__PURE__ */
|
|
4637
|
+
/* @__PURE__ */ React25.createElement(
|
|
4561
4638
|
Icon,
|
|
4562
4639
|
{
|
|
4563
|
-
name: t.loading ? /* @__PURE__ */
|
|
4640
|
+
name: t.loading ? /* @__PURE__ */ React25.createElement(IconLoaderCircle, null) : React25.createElement(ALERT_ICON[t.tone] || IconInfo),
|
|
4564
4641
|
className: cx("aura-toast__icon", t.loading && "aura-spin")
|
|
4565
4642
|
}
|
|
4566
4643
|
),
|
|
4567
|
-
/* @__PURE__ */
|
|
4568
|
-
actions.length ? /* @__PURE__ */
|
|
4569
|
-
return a.href ? /* @__PURE__ */
|
|
4644
|
+
/* @__PURE__ */ React25.createElement("div", { className: "aura-toast__body" }, /* @__PURE__ */ React25.createElement("p", { className: "aura-toast__title" }, t.title), rich ? /* @__PURE__ */ React25.createElement("div", { className: "aura-toast__text" }, t.description) : null),
|
|
4645
|
+
actions.length ? /* @__PURE__ */ React25.createElement("div", { className: "aura-toast__actions" }, actions.map(function(a, i) {
|
|
4646
|
+
return a.href ? /* @__PURE__ */ React25.createElement(
|
|
4570
4647
|
Link,
|
|
4571
4648
|
{
|
|
4572
4649
|
key: i,
|
|
@@ -4578,7 +4655,7 @@ window.Aura = (() => {
|
|
|
4578
4655
|
}
|
|
4579
4656
|
},
|
|
4580
4657
|
a.label
|
|
4581
|
-
) : /* @__PURE__ */
|
|
4658
|
+
) : /* @__PURE__ */ React25.createElement(
|
|
4582
4659
|
"button",
|
|
4583
4660
|
{
|
|
4584
4661
|
key: i,
|
|
@@ -4591,10 +4668,10 @@ window.Aura = (() => {
|
|
|
4591
4668
|
a.label
|
|
4592
4669
|
);
|
|
4593
4670
|
})) : null,
|
|
4594
|
-
/* @__PURE__ */
|
|
4671
|
+
/* @__PURE__ */ React25.createElement(
|
|
4595
4672
|
IconButton,
|
|
4596
4673
|
{
|
|
4597
|
-
icon: /* @__PURE__ */
|
|
4674
|
+
icon: /* @__PURE__ */ React25.createElement(IconX, null),
|
|
4598
4675
|
label: str.dismissToast,
|
|
4599
4676
|
className: "aura-toast__close",
|
|
4600
4677
|
onClick: function() {
|
|
@@ -4622,8 +4699,8 @@ window.Aura = (() => {
|
|
|
4622
4699
|
function Toaster(props = {}) {
|
|
4623
4700
|
const t = useStrings();
|
|
4624
4701
|
const mounted = useMounted();
|
|
4625
|
-
const s =
|
|
4626
|
-
|
|
4702
|
+
const s = React25.useState(toastState.list);
|
|
4703
|
+
React25.useEffect(function() {
|
|
4627
4704
|
toastState.subs.push(s[1]);
|
|
4628
4705
|
s[1](toastState.list.slice());
|
|
4629
4706
|
return function() {
|
|
@@ -4632,9 +4709,9 @@ window.Aura = (() => {
|
|
|
4632
4709
|
});
|
|
4633
4710
|
};
|
|
4634
4711
|
}, []);
|
|
4635
|
-
const region =
|
|
4712
|
+
const region = React25.useRef(null);
|
|
4636
4713
|
const hotkey = props.hotkey === void 0 ? "Alt+T" : props.hotkey;
|
|
4637
|
-
|
|
4714
|
+
React25.useEffect(
|
|
4638
4715
|
function() {
|
|
4639
4716
|
if (!hotkey) return;
|
|
4640
4717
|
const match = hotkeyMatcher(hotkey);
|
|
@@ -4665,7 +4742,7 @@ window.Aura = (() => {
|
|
|
4665
4742
|
const pos = props.position || "bottom";
|
|
4666
4743
|
const offset = props.offset;
|
|
4667
4744
|
return (0, import_react_dom6.createPortal)(
|
|
4668
|
-
/* @__PURE__ */
|
|
4745
|
+
/* @__PURE__ */ React25.createElement(
|
|
4669
4746
|
"div",
|
|
4670
4747
|
{
|
|
4671
4748
|
ref: region,
|
|
@@ -4677,7 +4754,7 @@ window.Aura = (() => {
|
|
|
4677
4754
|
"aria-keyshortcuts": hotkey || void 0
|
|
4678
4755
|
},
|
|
4679
4756
|
s[0].map(function(t2) {
|
|
4680
|
-
return /* @__PURE__ */
|
|
4757
|
+
return /* @__PURE__ */ React25.createElement(ToastItem, { key: t2.id, toast: t2 });
|
|
4681
4758
|
})
|
|
4682
4759
|
),
|
|
4683
4760
|
document.body
|
|
@@ -4685,12 +4762,12 @@ window.Aura = (() => {
|
|
|
4685
4762
|
}
|
|
4686
4763
|
|
|
4687
4764
|
// src/PasswordField.tsx
|
|
4688
|
-
var
|
|
4689
|
-
var PasswordField =
|
|
4765
|
+
var React26 = __toESM(require_react(), 1);
|
|
4766
|
+
var PasswordField = React26.forwardRef(function PasswordField2(props, ref) {
|
|
4690
4767
|
const t = useStrings();
|
|
4691
|
-
const shown =
|
|
4768
|
+
const shown = React26.useState(false);
|
|
4692
4769
|
const rest = omit(props, ["toggle", "className"]);
|
|
4693
|
-
return /* @__PURE__ */
|
|
4770
|
+
return /* @__PURE__ */ React26.createElement(
|
|
4694
4771
|
TextField,
|
|
4695
4772
|
{
|
|
4696
4773
|
autoComplete: "current-password",
|
|
@@ -4700,10 +4777,10 @@ window.Aura = (() => {
|
|
|
4700
4777
|
spellCheck: false,
|
|
4701
4778
|
autoCapitalize: "none",
|
|
4702
4779
|
className: cx("aura-password", props.className),
|
|
4703
|
-
suffix: props.toggle === false ? void 0 : /* @__PURE__ */
|
|
4780
|
+
suffix: props.toggle === false ? void 0 : /* @__PURE__ */ React26.createElement(
|
|
4704
4781
|
IconButton,
|
|
4705
4782
|
{
|
|
4706
|
-
icon: shown[0] ? /* @__PURE__ */
|
|
4783
|
+
icon: shown[0] ? /* @__PURE__ */ React26.createElement(IconEyeOff, null) : /* @__PURE__ */ React26.createElement(IconEye, null),
|
|
4707
4784
|
label: t.showPassword,
|
|
4708
4785
|
"aria-pressed": shown[0],
|
|
4709
4786
|
disabled: props.disabled,
|
|
@@ -4717,7 +4794,7 @@ window.Aura = (() => {
|
|
|
4717
4794
|
});
|
|
4718
4795
|
|
|
4719
4796
|
// src/FormErrorSummary.tsx
|
|
4720
|
-
var
|
|
4797
|
+
var React27 = __toESM(require_react(), 1);
|
|
4721
4798
|
function items(errors) {
|
|
4722
4799
|
if (Array.isArray(errors)) return errors;
|
|
4723
4800
|
const out = [];
|
|
@@ -4746,16 +4823,16 @@ window.Aura = (() => {
|
|
|
4746
4823
|
}
|
|
4747
4824
|
return named;
|
|
4748
4825
|
}
|
|
4749
|
-
var FormErrorSummary =
|
|
4826
|
+
var FormErrorSummary = React27.forwardRef(
|
|
4750
4827
|
function FormErrorSummary2(props, ref) {
|
|
4751
4828
|
const t = useStrings();
|
|
4752
4829
|
const auto = uid(), id = props.id || auto;
|
|
4753
4830
|
const list = items(props.errors);
|
|
4754
|
-
const box =
|
|
4831
|
+
const box = React27.useRef(null);
|
|
4755
4832
|
const keyed = props.focusKey !== void 0;
|
|
4756
|
-
const lastKey =
|
|
4833
|
+
const lastKey = React27.useRef(null), armed = React27.useRef(false), hadErrors = React27.useRef(false);
|
|
4757
4834
|
const has = list.length > 0;
|
|
4758
|
-
|
|
4835
|
+
React27.useEffect(
|
|
4759
4836
|
function() {
|
|
4760
4837
|
const appeared = has && !hadErrors.current;
|
|
4761
4838
|
hadErrors.current = has;
|
|
@@ -4779,7 +4856,7 @@ window.Aura = (() => {
|
|
|
4779
4856
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4780
4857
|
[has, props.focusKey, keyed]
|
|
4781
4858
|
);
|
|
4782
|
-
|
|
4859
|
+
React27.useEffect(
|
|
4783
4860
|
function() {
|
|
4784
4861
|
if (!keyed) return;
|
|
4785
4862
|
function disarm() {
|
|
@@ -4798,7 +4875,7 @@ window.Aura = (() => {
|
|
|
4798
4875
|
[keyed]
|
|
4799
4876
|
);
|
|
4800
4877
|
if (!list.length) return null;
|
|
4801
|
-
return /* @__PURE__ */
|
|
4878
|
+
return /* @__PURE__ */ React27.createElement(
|
|
4802
4879
|
"div",
|
|
4803
4880
|
{
|
|
4804
4881
|
ref: function(el) {
|
|
@@ -4812,9 +4889,9 @@ window.Aura = (() => {
|
|
|
4812
4889
|
"aria-labelledby": id + "-title",
|
|
4813
4890
|
className: cx("aura-alert aura-alert--danger aura-error-summary", props.className)
|
|
4814
4891
|
},
|
|
4815
|
-
/* @__PURE__ */
|
|
4816
|
-
/* @__PURE__ */
|
|
4817
|
-
return /* @__PURE__ */
|
|
4892
|
+
/* @__PURE__ */ React27.createElement(Icon, { name: /* @__PURE__ */ React27.createElement(IconCircleAlert, null), className: "aura-alert__icon" }),
|
|
4893
|
+
/* @__PURE__ */ React27.createElement("div", { className: "aura-alert__body" }, /* @__PURE__ */ React27.createElement("h2", { className: "aura-alert__title", id: id + "-title" }, props.title || t.errorSummary(list.length)), /* @__PURE__ */ React27.createElement("ul", { className: "aura-error-summary__list" }, list.map(function(e) {
|
|
4894
|
+
return /* @__PURE__ */ React27.createElement("li", { key: e.field }, /* @__PURE__ */ React27.createElement(
|
|
4818
4895
|
"a",
|
|
4819
4896
|
{
|
|
4820
4897
|
href: "#" + e.field,
|
|
@@ -4839,14 +4916,14 @@ window.Aura = (() => {
|
|
|
4839
4916
|
);
|
|
4840
4917
|
|
|
4841
4918
|
// src/FilterBar.tsx
|
|
4842
|
-
var
|
|
4919
|
+
var React32 = __toESM(require_react(), 1);
|
|
4843
4920
|
|
|
4844
4921
|
// src/Dialog.tsx
|
|
4845
|
-
var
|
|
4922
|
+
var React29 = __toESM(require_react(), 1);
|
|
4846
4923
|
var import_react_dom7 = __toESM(require_react_dom(), 1);
|
|
4847
4924
|
|
|
4848
4925
|
// src/useModal.tsx
|
|
4849
|
-
var
|
|
4926
|
+
var React28 = __toESM(require_react(), 1);
|
|
4850
4927
|
var locks = 0;
|
|
4851
4928
|
var savedOverflow = "";
|
|
4852
4929
|
function lockScroll() {
|
|
@@ -4873,11 +4950,11 @@ window.Aura = (() => {
|
|
|
4873
4950
|
}
|
|
4874
4951
|
function useModal(open, ref, opts) {
|
|
4875
4952
|
const mounted = useMounted();
|
|
4876
|
-
const prev =
|
|
4953
|
+
const prev = React28.useRef(null);
|
|
4877
4954
|
const o = opts || {};
|
|
4878
|
-
const latest =
|
|
4955
|
+
const latest = React28.useRef(o);
|
|
4879
4956
|
latest.current = o;
|
|
4880
|
-
|
|
4957
|
+
React28.useEffect(
|
|
4881
4958
|
function() {
|
|
4882
4959
|
if (!open || !mounted) return;
|
|
4883
4960
|
prev.current = document.activeElement;
|
|
@@ -4932,15 +5009,15 @@ window.Aura = (() => {
|
|
|
4932
5009
|
}
|
|
4933
5010
|
|
|
4934
5011
|
// src/Dialog.tsx
|
|
4935
|
-
var DialogClose =
|
|
5012
|
+
var DialogClose = React29.createContext(null);
|
|
4936
5013
|
function useDialogClose() {
|
|
4937
|
-
return
|
|
5014
|
+
return React29.useContext(DialogClose) || function() {
|
|
4938
5015
|
};
|
|
4939
5016
|
}
|
|
4940
|
-
var Dialog =
|
|
5017
|
+
var Dialog = React29.forwardRef(function Dialog2(props, ref) {
|
|
4941
5018
|
const t = useStrings();
|
|
4942
5019
|
const density = useDensity();
|
|
4943
|
-
const own =
|
|
5020
|
+
const own = React29.useRef(null), merged = useMergedRef(ref, own), titleId = uid(), descId = uid();
|
|
4944
5021
|
const openState = useMaybeControlled(props.open, false, null), open = openState[0];
|
|
4945
5022
|
if (props.open === void 0 && !props.trigger)
|
|
4946
5023
|
devWarnOnce("dialog-no-open", "Dialog has neither `open` nor `trigger`, so it can never open. Pass one of them.");
|
|
@@ -4968,7 +5045,7 @@ window.Aura = (() => {
|
|
|
4968
5045
|
onCloseComplete: props.onCloseComplete
|
|
4969
5046
|
});
|
|
4970
5047
|
const trig = props.trigger;
|
|
4971
|
-
const trigger = trig &&
|
|
5048
|
+
const trigger = trig && React29.isValidElement(trig) ? React29.cloneElement(trig, {
|
|
4972
5049
|
"aria-haspopup": "dialog",
|
|
4973
5050
|
"aria-expanded": open,
|
|
4974
5051
|
"data-aura-trigger": trigId,
|
|
@@ -5003,7 +5080,7 @@ window.Aura = (() => {
|
|
|
5003
5080
|
"aria-modal"
|
|
5004
5081
|
]);
|
|
5005
5082
|
const panel = (0, import_react_dom7.createPortal)(
|
|
5006
|
-
/* @__PURE__ */
|
|
5083
|
+
/* @__PURE__ */ React29.createElement("div", { className: "aura-dialog-layer", "data-density": density, onKeyDown: modal.onKeyDown }, /* @__PURE__ */ React29.createElement(
|
|
5007
5084
|
"div",
|
|
5008
5085
|
{
|
|
5009
5086
|
className: "aura-scrim",
|
|
@@ -5013,7 +5090,7 @@ window.Aura = (() => {
|
|
|
5013
5090
|
},
|
|
5014
5091
|
"aria-hidden": true
|
|
5015
5092
|
}
|
|
5016
|
-
), /* @__PURE__ */
|
|
5093
|
+
), /* @__PURE__ */ React29.createElement(
|
|
5017
5094
|
"div",
|
|
5018
5095
|
{
|
|
5019
5096
|
...rest,
|
|
@@ -5025,18 +5102,18 @@ window.Aura = (() => {
|
|
|
5025
5102
|
tabIndex: -1,
|
|
5026
5103
|
className: cx("aura-dialog", "aura-dialog--" + (props.size || "md"), props.className)
|
|
5027
5104
|
},
|
|
5028
|
-
/* @__PURE__ */
|
|
5029
|
-
props.description ? /* @__PURE__ */
|
|
5030
|
-
/* @__PURE__ */
|
|
5105
|
+
/* @__PURE__ */ React29.createElement("div", { className: "aura-dialog__head" }, /* @__PURE__ */ React29.createElement("h2", { className: "aura-dialog__title", id: titleId }, props.title), props.dismissible !== false ? /* @__PURE__ */ React29.createElement(IconButton, { icon: /* @__PURE__ */ React29.createElement(IconX, null), label: t.close, className: "aura-dialog__close", onClick: close }) : null),
|
|
5106
|
+
props.description ? /* @__PURE__ */ React29.createElement("p", { className: "aura-dialog__desc", id: descId }, props.description) : null,
|
|
5107
|
+
/* @__PURE__ */ React29.createElement(DialogClose.Provider, { value: closeNow }, props.children ? /* @__PURE__ */ React29.createElement("div", { className: "aura-dialog__body" }, props.children) : null, props.footer ? /* @__PURE__ */ React29.createElement("div", { className: "aura-dialog__foot" }, props.footer) : null)
|
|
5031
5108
|
)),
|
|
5032
5109
|
document.body
|
|
5033
5110
|
);
|
|
5034
|
-
return trigger ? /* @__PURE__ */
|
|
5111
|
+
return trigger ? /* @__PURE__ */ React29.createElement(React29.Fragment, null, trigger, panel) : panel;
|
|
5035
5112
|
});
|
|
5036
|
-
var Drawer =
|
|
5113
|
+
var Drawer = React29.forwardRef(function Drawer2(props, ref) {
|
|
5037
5114
|
const t = useStrings();
|
|
5038
5115
|
const density = useDensity();
|
|
5039
|
-
const own =
|
|
5116
|
+
const own = React29.useRef(null), merged = useMergedRef(ref, own), titleId = uid(), descId = uid();
|
|
5040
5117
|
function close() {
|
|
5041
5118
|
if (props.dismissible !== false && props.onClose) props.onClose();
|
|
5042
5119
|
}
|
|
@@ -5073,7 +5150,7 @@ window.Aura = (() => {
|
|
|
5073
5150
|
]);
|
|
5074
5151
|
const drawerScrimCloses = props.dismissible !== false && props.dismissOnScrim !== false;
|
|
5075
5152
|
return (0, import_react_dom7.createPortal)(
|
|
5076
|
-
/* @__PURE__ */
|
|
5153
|
+
/* @__PURE__ */ React29.createElement("div", { className: "aura-dialog-layer aura-drawer-layer", "data-density": density, onKeyDown: modal.onKeyDown }, /* @__PURE__ */ React29.createElement(
|
|
5077
5154
|
"div",
|
|
5078
5155
|
{
|
|
5079
5156
|
className: "aura-scrim",
|
|
@@ -5083,7 +5160,7 @@ window.Aura = (() => {
|
|
|
5083
5160
|
} : void 0,
|
|
5084
5161
|
"aria-hidden": true
|
|
5085
5162
|
}
|
|
5086
|
-
), /* @__PURE__ */
|
|
5163
|
+
), /* @__PURE__ */ React29.createElement(
|
|
5087
5164
|
"div",
|
|
5088
5165
|
{
|
|
5089
5166
|
...rest,
|
|
@@ -5096,11 +5173,11 @@ window.Aura = (() => {
|
|
|
5096
5173
|
tabIndex: -1,
|
|
5097
5174
|
className: cx("aura-drawer", "aura-drawer--" + side, "aura-drawer--" + (props.size || "md"), props.className)
|
|
5098
5175
|
},
|
|
5099
|
-
props.title || props.dismissible !== false ? /* @__PURE__ */
|
|
5176
|
+
props.title || props.dismissible !== false ? /* @__PURE__ */ React29.createElement("div", { className: "aura-drawer__head" }, props.title ? /* @__PURE__ */ React29.createElement("h2", { className: "aura-drawer__title", id: titleId }, props.title) : /* @__PURE__ */ React29.createElement("span", { style: { flex: 1 } }), props.dismissible !== false ? /* @__PURE__ */ React29.createElement(
|
|
5100
5177
|
IconButton,
|
|
5101
5178
|
{
|
|
5102
5179
|
...props.closeProps,
|
|
5103
|
-
icon: /* @__PURE__ */
|
|
5180
|
+
icon: /* @__PURE__ */ React29.createElement(IconX, null),
|
|
5104
5181
|
label: props.closeLabel || t.close,
|
|
5105
5182
|
onClick: function(e) {
|
|
5106
5183
|
const own2 = props.closeProps && props.closeProps.onClick;
|
|
@@ -5109,24 +5186,24 @@ window.Aura = (() => {
|
|
|
5109
5186
|
}
|
|
5110
5187
|
}
|
|
5111
5188
|
) : null) : null,
|
|
5112
|
-
props.description ? /* @__PURE__ */
|
|
5113
|
-
/* @__PURE__ */
|
|
5114
|
-
props.footer ? /* @__PURE__ */
|
|
5189
|
+
props.description ? /* @__PURE__ */ React29.createElement("p", { className: "aura-drawer__desc", id: descId }, props.description) : null,
|
|
5190
|
+
/* @__PURE__ */ React29.createElement("div", { className: "aura-drawer__body" }, props.children),
|
|
5191
|
+
props.footer ? /* @__PURE__ */ React29.createElement("div", { className: "aura-drawer__foot" }, props.footer) : null
|
|
5115
5192
|
)),
|
|
5116
5193
|
document.body
|
|
5117
5194
|
);
|
|
5118
5195
|
});
|
|
5119
5196
|
|
|
5120
5197
|
// src/Tag.tsx
|
|
5121
|
-
var
|
|
5198
|
+
var React31 = __toESM(require_react(), 1);
|
|
5122
5199
|
|
|
5123
5200
|
// src/Tooltip.tsx
|
|
5124
|
-
var
|
|
5201
|
+
var React30 = __toESM(require_react(), 1);
|
|
5125
5202
|
var import_react_dom8 = __toESM(require_react_dom(), 1);
|
|
5126
|
-
var Tooltip =
|
|
5127
|
-
const id = uid(), st =
|
|
5128
|
-
const anchor =
|
|
5129
|
-
const pos =
|
|
5203
|
+
var Tooltip = React30.forwardRef(function Tooltip2(props, ref) {
|
|
5204
|
+
const id = uid(), st = React30.useState(false), open = props.open !== void 0 ? props.open : st[0], set = st[1];
|
|
5205
|
+
const anchor = React30.useRef(null), anchorMerged = useMergedRef(ref, anchor), tip2 = React30.useRef(null), timer2 = React30.useRef(void 0);
|
|
5206
|
+
const pos = React30.useState(null), mounted = useMounted();
|
|
5130
5207
|
function show3(now) {
|
|
5131
5208
|
clearTimeout(timer2.current);
|
|
5132
5209
|
timer2.current = setTimeout(
|
|
@@ -5146,7 +5223,7 @@ window.Aura = (() => {
|
|
|
5146
5223
|
set(false);
|
|
5147
5224
|
}, 120);
|
|
5148
5225
|
}
|
|
5149
|
-
|
|
5226
|
+
React30.useEffect(function() {
|
|
5150
5227
|
return function() {
|
|
5151
5228
|
clearTimeout(timer2.current);
|
|
5152
5229
|
};
|
|
@@ -5190,7 +5267,7 @@ window.Aura = (() => {
|
|
|
5190
5267
|
},
|
|
5191
5268
|
[open, mounted]
|
|
5192
5269
|
);
|
|
5193
|
-
|
|
5270
|
+
React30.useEffect(
|
|
5194
5271
|
function() {
|
|
5195
5272
|
if (!open) return;
|
|
5196
5273
|
function esc(e) {
|
|
@@ -5203,8 +5280,8 @@ window.Aura = (() => {
|
|
|
5203
5280
|
},
|
|
5204
5281
|
[open]
|
|
5205
5282
|
);
|
|
5206
|
-
const child =
|
|
5207
|
-
const trigger = /* @__PURE__ */
|
|
5283
|
+
const child = React30.Children.only(props.children);
|
|
5284
|
+
const trigger = /* @__PURE__ */ React30.createElement(
|
|
5208
5285
|
"span",
|
|
5209
5286
|
{
|
|
5210
5287
|
ref: anchorMerged,
|
|
@@ -5218,10 +5295,10 @@ window.Aura = (() => {
|
|
|
5218
5295
|
},
|
|
5219
5296
|
onBlur: hide2
|
|
5220
5297
|
},
|
|
5221
|
-
|
|
5298
|
+
React30.cloneElement(child, { "aria-describedby": open ? id : child.props["aria-describedby"] })
|
|
5222
5299
|
);
|
|
5223
|
-
return /* @__PURE__ */
|
|
5224
|
-
/* @__PURE__ */
|
|
5300
|
+
return /* @__PURE__ */ React30.createElement(React30.Fragment, null, trigger, open && mounted ? (0, import_react_dom8.createPortal)(
|
|
5301
|
+
/* @__PURE__ */ React30.createElement(
|
|
5225
5302
|
"div",
|
|
5226
5303
|
{
|
|
5227
5304
|
ref: tip2,
|
|
@@ -5248,13 +5325,13 @@ window.Aura = (() => {
|
|
|
5248
5325
|
return node.map(function(n3) {
|
|
5249
5326
|
return textOf2(n3, all);
|
|
5250
5327
|
}).join("");
|
|
5251
|
-
if (
|
|
5328
|
+
if (React31.isValidElement(node)) {
|
|
5252
5329
|
const p = node.props;
|
|
5253
5330
|
return !all && (p["aria-hidden"] === true || p["aria-hidden"] === "true") ? "" : textOf2(p.children, all);
|
|
5254
5331
|
}
|
|
5255
5332
|
return "";
|
|
5256
5333
|
}
|
|
5257
|
-
var Tag =
|
|
5334
|
+
var Tag = React31.forwardRef(function Tag2(props, ref) {
|
|
5258
5335
|
const t = useStrings();
|
|
5259
5336
|
const selectable = props.onClick != null || props.selected != null;
|
|
5260
5337
|
const rest = omit(props, [
|
|
@@ -5267,10 +5344,10 @@ window.Aura = (() => {
|
|
|
5267
5344
|
"removeLabel",
|
|
5268
5345
|
"touchHeight"
|
|
5269
5346
|
]);
|
|
5270
|
-
const textRef =
|
|
5347
|
+
const textRef = React31.useRef(null);
|
|
5271
5348
|
useAutoTip();
|
|
5272
|
-
const cutState =
|
|
5273
|
-
const check =
|
|
5349
|
+
const cutState = React31.useState(false), isCut = cutState[0];
|
|
5350
|
+
const check = React31.useCallback(function() {
|
|
5274
5351
|
const el = textRef.current;
|
|
5275
5352
|
if (el) cutState[1](el.scrollWidth > el.clientWidth + 1);
|
|
5276
5353
|
}, []);
|
|
@@ -5289,11 +5366,11 @@ window.Aura = (() => {
|
|
|
5289
5366
|
);
|
|
5290
5367
|
const fullText = isCut ? textOf2(props.children, true).replace(/\s+/g, " ").trim() : "";
|
|
5291
5368
|
const inner = [
|
|
5292
|
-
props.icon ? /* @__PURE__ */
|
|
5293
|
-
/* @__PURE__ */
|
|
5369
|
+
props.icon ? /* @__PURE__ */ React31.createElement(Icon, { key: "i", name: props.icon, size: 14 }) : null,
|
|
5370
|
+
/* @__PURE__ */ React31.createElement("span", { key: "t", ref: textRef, className: "aura-tag__text", "data-aura-tip": fullText || void 0 }, props.children)
|
|
5294
5371
|
];
|
|
5295
5372
|
if (selectable) {
|
|
5296
|
-
return /* @__PURE__ */
|
|
5373
|
+
return /* @__PURE__ */ React31.createElement(
|
|
5297
5374
|
"button",
|
|
5298
5375
|
{
|
|
5299
5376
|
...rest,
|
|
@@ -5308,7 +5385,7 @@ window.Aura = (() => {
|
|
|
5308
5385
|
props.className
|
|
5309
5386
|
)
|
|
5310
5387
|
},
|
|
5311
|
-
props.selected ? /* @__PURE__ */
|
|
5388
|
+
props.selected ? /* @__PURE__ */ React31.createElement(Icon, { name: /* @__PURE__ */ React31.createElement(IconCheck, null), size: 14 }) : inner[0],
|
|
5312
5389
|
inner[1]
|
|
5313
5390
|
);
|
|
5314
5391
|
}
|
|
@@ -5318,8 +5395,8 @@ window.Aura = (() => {
|
|
|
5318
5395
|
"tag-remove-label",
|
|
5319
5396
|
'Tag: the remove button has no name \u2014 its children have no text. Pass removeLabel (e.g. "Remove Acme AB").'
|
|
5320
5397
|
);
|
|
5321
|
-
return /* @__PURE__ */
|
|
5322
|
-
const btn = /* @__PURE__ */
|
|
5398
|
+
return /* @__PURE__ */ React31.createElement("span", { ...rest, ref, className: cx("aura-tag", props.disabled && "is-disabled", props.className) }, inner, props.onRemove && !props.disabled ? function() {
|
|
5399
|
+
const btn = /* @__PURE__ */ React31.createElement(
|
|
5323
5400
|
"button",
|
|
5324
5401
|
{
|
|
5325
5402
|
type: "button",
|
|
@@ -5327,9 +5404,9 @@ window.Aura = (() => {
|
|
|
5327
5404
|
"aria-label": props.removeLabel || t.remove(name),
|
|
5328
5405
|
onClick: props.onRemove
|
|
5329
5406
|
},
|
|
5330
|
-
/* @__PURE__ */
|
|
5407
|
+
/* @__PURE__ */ React31.createElement(Icon, { name: /* @__PURE__ */ React31.createElement(IconX, null), size: 14 })
|
|
5331
5408
|
);
|
|
5332
|
-
return /* @__PURE__ */
|
|
5409
|
+
return /* @__PURE__ */ React31.createElement(Tooltip, { content: fullText, open: fullText ? void 0 : false }, btn);
|
|
5333
5410
|
}() : null);
|
|
5334
5411
|
});
|
|
5335
5412
|
|
|
@@ -5352,16 +5429,16 @@ window.Aura = (() => {
|
|
|
5352
5429
|
};
|
|
5353
5430
|
|
|
5354
5431
|
// src/FilterBar.tsx
|
|
5355
|
-
var FilterBar =
|
|
5432
|
+
var FilterBar = React32.forwardRef(function FilterBar2(props, ref) {
|
|
5356
5433
|
const t = useStrings();
|
|
5357
5434
|
const id = uid();
|
|
5358
5435
|
const hasSearch = !!props.onSearchChange;
|
|
5359
|
-
const draft =
|
|
5360
|
-
const timer2 =
|
|
5361
|
-
const sent =
|
|
5362
|
-
const onChange =
|
|
5436
|
+
const draft = React32.useState(props.search || "");
|
|
5437
|
+
const timer2 = React32.useRef(null);
|
|
5438
|
+
const sent = React32.useRef(props.search || "");
|
|
5439
|
+
const onChange = React32.useRef(props.onSearchChange);
|
|
5363
5440
|
onChange.current = props.onSearchChange;
|
|
5364
|
-
|
|
5441
|
+
React32.useEffect(
|
|
5365
5442
|
function() {
|
|
5366
5443
|
if ((props.search || "") !== sent.current) {
|
|
5367
5444
|
sent.current = props.search || "";
|
|
@@ -5370,7 +5447,7 @@ window.Aura = (() => {
|
|
|
5370
5447
|
},
|
|
5371
5448
|
[props.search]
|
|
5372
5449
|
);
|
|
5373
|
-
|
|
5450
|
+
React32.useEffect(function() {
|
|
5374
5451
|
return function() {
|
|
5375
5452
|
if (timer2.current) clearTimeout(timer2.current);
|
|
5376
5453
|
};
|
|
@@ -5393,14 +5470,14 @@ window.Aura = (() => {
|
|
|
5393
5470
|
);
|
|
5394
5471
|
}
|
|
5395
5472
|
const filters = props.filters || [];
|
|
5396
|
-
const hasChildren =
|
|
5473
|
+
const hasChildren = React32.Children.toArray(props.children).length > 0;
|
|
5397
5474
|
const collapse = props.collapseBelow && hasChildren ? props.collapseBelow : null;
|
|
5398
|
-
const sheet =
|
|
5475
|
+
const sheet = React32.useState(false), open = !!collapse && sheet[0];
|
|
5399
5476
|
const sheetId = id + "-filters";
|
|
5400
|
-
const doneRef =
|
|
5477
|
+
const doneRef = React32.useRef(null), moreRef = React32.useRef(null), own = React32.useRef(null), rootRef = useMergedRef(ref, own);
|
|
5401
5478
|
if (collapse)
|
|
5402
|
-
|
|
5403
|
-
if (!
|
|
5479
|
+
React32.Children.forEach(props.children, function(c) {
|
|
5480
|
+
if (!React32.isValidElement(c) || c.type === Button || c.type === IconButton) return;
|
|
5404
5481
|
const p = c.props;
|
|
5405
5482
|
if (p.defaultValue !== void 0 || p.defaultChecked !== void 0 || "label" in p && !("value" in p) && !("selected" in p) && !("checked" in p))
|
|
5406
5483
|
devWarnOnce(
|
|
@@ -5418,7 +5495,7 @@ window.Aura = (() => {
|
|
|
5418
5495
|
) || bar.querySelector(".aura-filterbar__search input");
|
|
5419
5496
|
}
|
|
5420
5497
|
const applied = props.filterCount != null ? props.filterCount : filters.length;
|
|
5421
|
-
|
|
5498
|
+
React32.useEffect(
|
|
5422
5499
|
function() {
|
|
5423
5500
|
if (!open || !collapse || typeof window.matchMedia !== "function") return;
|
|
5424
5501
|
const mq = window.matchMedia("(min-width: " + breakpoints[collapse] + "px)");
|
|
@@ -5443,7 +5520,7 @@ window.Aura = (() => {
|
|
|
5443
5520
|
}
|
|
5444
5521
|
const anything = filters.length > 0 || !!(props.search || draft[0]);
|
|
5445
5522
|
const count = props.resultCount == null ? null : typeof props.resultCount === "number" ? t.results(props.resultCount) : props.resultCount;
|
|
5446
|
-
const searchBox = hasSearch ? /* @__PURE__ */
|
|
5523
|
+
const searchBox = hasSearch ? /* @__PURE__ */ React32.createElement("div", { className: "aura-input has-icon aura-filterbar__search" }, /* @__PURE__ */ React32.createElement(Icon, { name: /* @__PURE__ */ React32.createElement(IconSearch, null), className: "aura-input__icon" }), /* @__PURE__ */ React32.createElement(
|
|
5447
5524
|
"input",
|
|
5448
5525
|
{
|
|
5449
5526
|
id,
|
|
@@ -5464,10 +5541,10 @@ window.Aura = (() => {
|
|
|
5464
5541
|
}
|
|
5465
5542
|
}
|
|
5466
5543
|
}
|
|
5467
|
-
), draft[0] ? /* @__PURE__ */
|
|
5544
|
+
), draft[0] ? /* @__PURE__ */ React32.createElement(
|
|
5468
5545
|
IconButton,
|
|
5469
5546
|
{
|
|
5470
|
-
icon: /* @__PURE__ */
|
|
5547
|
+
icon: /* @__PURE__ */ React32.createElement(IconX, null),
|
|
5471
5548
|
label: t.clear((props.searchLabel || t.search).toLowerCase()),
|
|
5472
5549
|
className: "aura-filterbar__clear-search",
|
|
5473
5550
|
onClick: function() {
|
|
@@ -5476,12 +5553,12 @@ window.Aura = (() => {
|
|
|
5476
5553
|
}
|
|
5477
5554
|
}
|
|
5478
5555
|
) : null) : null;
|
|
5479
|
-
const more = collapse ? /* @__PURE__ */
|
|
5556
|
+
const more = collapse ? /* @__PURE__ */ React32.createElement(
|
|
5480
5557
|
Button,
|
|
5481
5558
|
{
|
|
5482
5559
|
ref: moreRef,
|
|
5483
5560
|
variant: "secondary",
|
|
5484
|
-
icon: /* @__PURE__ */
|
|
5561
|
+
icon: /* @__PURE__ */ React32.createElement(IconSlidersHorizontal, null),
|
|
5485
5562
|
className: "aura-filterbar__more",
|
|
5486
5563
|
"aria-haspopup": "dialog",
|
|
5487
5564
|
"aria-expanded": open,
|
|
@@ -5490,9 +5567,9 @@ window.Aura = (() => {
|
|
|
5490
5567
|
sheet[1](true);
|
|
5491
5568
|
}
|
|
5492
5569
|
},
|
|
5493
|
-
applied > 0 ? /* @__PURE__ */
|
|
5570
|
+
applied > 0 ? /* @__PURE__ */ React32.createElement(React32.Fragment, null, /* @__PURE__ */ React32.createElement("span", { className: "aura-sr-only" }, t.filtersApplied(applied)), /* @__PURE__ */ React32.createElement("span", { "aria-hidden": true }, t.filters + " (" + applied + ")")) : t.filters
|
|
5494
5571
|
) : null;
|
|
5495
|
-
return /* @__PURE__ */
|
|
5572
|
+
return /* @__PURE__ */ React32.createElement(
|
|
5496
5573
|
"div",
|
|
5497
5574
|
{
|
|
5498
5575
|
ref: rootRef,
|
|
@@ -5508,15 +5585,15 @@ window.Aura = (() => {
|
|
|
5508
5585
|
props.className
|
|
5509
5586
|
)
|
|
5510
5587
|
},
|
|
5511
|
-
/* @__PURE__ */
|
|
5588
|
+
/* @__PURE__ */ React32.createElement("div", { className: "aura-filterbar__row" }, collapse ? (
|
|
5512
5589
|
/* 5.42: the search and the Filters button share a row of their own below the breakpoint (count and actions
|
|
5513
5590
|
* wrap under them); from the breakpoint up this box is display: contents and the bar is as before. */
|
|
5514
|
-
/* @__PURE__ */
|
|
5515
|
-
) : searchBox, hasChildren && !open ? /* @__PURE__ */
|
|
5516
|
-
filters.length || props.onClearAll && anything ? /* @__PURE__ */
|
|
5517
|
-
return /* @__PURE__ */
|
|
5518
|
-
}), props.onClearAll && anything ? /* @__PURE__ */
|
|
5519
|
-
collapse ? /* @__PURE__ */
|
|
5591
|
+
/* @__PURE__ */ React32.createElement("div", { className: cx("aura-filterbar__lead", !hasSearch && "is-alone") }, searchBox, more)
|
|
5592
|
+
) : searchBox, hasChildren && !open ? /* @__PURE__ */ React32.createElement("div", { className: "aura-filterbar__controls" }, props.children) : null, /* @__PURE__ */ React32.createElement("span", { className: "aura-filterbar__spacer" }), count != null ? /* @__PURE__ */ React32.createElement("span", { className: "aura-filterbar__count", "aria-live": "polite" }, count) : null, props.actions ? /* @__PURE__ */ React32.createElement("div", { className: "aura-filterbar__actions" }, props.actions) : null),
|
|
5593
|
+
filters.length || props.onClearAll && anything ? /* @__PURE__ */ React32.createElement("div", { className: "aura-filterbar__chips" }, filters.map(function(f) {
|
|
5594
|
+
return /* @__PURE__ */ React32.createElement(Tag, { key: f.id, onRemove: f.onRemove }, f.label);
|
|
5595
|
+
}), props.onClearAll && anything ? /* @__PURE__ */ React32.createElement("button", { type: "button", className: "aura-filterbar__clear", onClick: clearAll }, t.clearFilters) : null) : null,
|
|
5596
|
+
collapse ? /* @__PURE__ */ React32.createElement(
|
|
5520
5597
|
Dialog,
|
|
5521
5598
|
{
|
|
5522
5599
|
open,
|
|
@@ -5528,7 +5605,7 @@ window.Aura = (() => {
|
|
|
5528
5605
|
title: t.filters,
|
|
5529
5606
|
size: "sm",
|
|
5530
5607
|
className: "aura-filterbar__sheet",
|
|
5531
|
-
footer: /* @__PURE__ */
|
|
5608
|
+
footer: /* @__PURE__ */ React32.createElement(React32.Fragment, null, props.onClearAll && filters.length ? /* @__PURE__ */ React32.createElement(
|
|
5532
5609
|
Button,
|
|
5533
5610
|
{
|
|
5534
5611
|
variant: "secondary",
|
|
@@ -5539,7 +5616,7 @@ window.Aura = (() => {
|
|
|
5539
5616
|
}
|
|
5540
5617
|
},
|
|
5541
5618
|
t.clearFilters
|
|
5542
|
-
) : null, /* @__PURE__ */
|
|
5619
|
+
) : null, /* @__PURE__ */ React32.createElement(
|
|
5543
5620
|
Button,
|
|
5544
5621
|
{
|
|
5545
5622
|
ref: doneRef,
|
|
@@ -5551,13 +5628,13 @@ window.Aura = (() => {
|
|
|
5551
5628
|
t.done
|
|
5552
5629
|
))
|
|
5553
5630
|
},
|
|
5554
|
-
/* @__PURE__ */
|
|
5631
|
+
/* @__PURE__ */ React32.createElement(FilterSheet.Provider, { value: true }, /* @__PURE__ */ React32.createElement("div", { className: "aura-filterbar aura-filterbar--sheet is-touch-always" }, props.children))
|
|
5555
5632
|
) : null
|
|
5556
5633
|
);
|
|
5557
5634
|
});
|
|
5558
5635
|
|
|
5559
5636
|
// src/Command.tsx
|
|
5560
|
-
var
|
|
5637
|
+
var React33 = __toESM(require_react(), 1);
|
|
5561
5638
|
var import_react_dom9 = __toESM(require_react_dom(), 1);
|
|
5562
5639
|
function isMac() {
|
|
5563
5640
|
return typeof navigator !== "undefined" && /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent);
|
|
@@ -5566,21 +5643,21 @@ window.Aura = (() => {
|
|
|
5566
5643
|
const t = useStrings();
|
|
5567
5644
|
const density = useDensity();
|
|
5568
5645
|
const id = uid(), listId = id + "-list";
|
|
5569
|
-
const box =
|
|
5570
|
-
const input =
|
|
5571
|
-
const qState =
|
|
5646
|
+
const box = React33.useRef(null);
|
|
5647
|
+
const input = React33.useRef(null);
|
|
5648
|
+
const qState = React33.useState(""), act = React33.useState(null);
|
|
5572
5649
|
const query = props.query !== void 0 ? props.query : qState[0];
|
|
5573
5650
|
function setQuery(v) {
|
|
5574
5651
|
if (props.query === void 0) qState[1](v);
|
|
5575
5652
|
if (props.onQueryChange) props.onQueryChange(v);
|
|
5576
5653
|
}
|
|
5577
|
-
const openRef =
|
|
5654
|
+
const openRef = React33.useRef(props.open);
|
|
5578
5655
|
openRef.current = props.open;
|
|
5579
5656
|
const close = function() {
|
|
5580
5657
|
props.onOpenChange(false);
|
|
5581
5658
|
};
|
|
5582
5659
|
const modal = useModal(props.open, box, { onEscape: close });
|
|
5583
|
-
|
|
5660
|
+
React33.useEffect(
|
|
5584
5661
|
function() {
|
|
5585
5662
|
if (props.hotkey === false) return;
|
|
5586
5663
|
function onKey2(e) {
|
|
@@ -5596,7 +5673,7 @@ window.Aura = (() => {
|
|
|
5596
5673
|
},
|
|
5597
5674
|
[props.hotkey, props.onOpenChange]
|
|
5598
5675
|
);
|
|
5599
|
-
|
|
5676
|
+
React33.useEffect(
|
|
5600
5677
|
function() {
|
|
5601
5678
|
if (!props.open) {
|
|
5602
5679
|
if (query) setQuery("");
|
|
@@ -5636,7 +5713,7 @@ window.Aura = (() => {
|
|
|
5636
5713
|
const optId = function(i2) {
|
|
5637
5714
|
return id + "-o" + i2;
|
|
5638
5715
|
};
|
|
5639
|
-
|
|
5716
|
+
React33.useEffect(
|
|
5640
5717
|
function() {
|
|
5641
5718
|
if (!box.current || active < 0) return;
|
|
5642
5719
|
const el = box.current.querySelector("#" + CSS.escape(optId(active)));
|
|
@@ -5681,7 +5758,7 @@ window.Aura = (() => {
|
|
|
5681
5758
|
if (!modal.ready) return null;
|
|
5682
5759
|
let i = -1;
|
|
5683
5760
|
return (0, import_react_dom9.createPortal)(
|
|
5684
|
-
/* @__PURE__ */
|
|
5761
|
+
/* @__PURE__ */ React33.createElement(
|
|
5685
5762
|
"div",
|
|
5686
5763
|
{
|
|
5687
5764
|
className: "aura-dialog-layer aura-command-layer",
|
|
@@ -5691,8 +5768,8 @@ window.Aura = (() => {
|
|
|
5691
5768
|
e.stopPropagation();
|
|
5692
5769
|
}
|
|
5693
5770
|
},
|
|
5694
|
-
/* @__PURE__ */
|
|
5695
|
-
/* @__PURE__ */
|
|
5771
|
+
/* @__PURE__ */ React33.createElement("div", { className: "aura-scrim", onClick: close, "aria-hidden": true }),
|
|
5772
|
+
/* @__PURE__ */ React33.createElement(
|
|
5696
5773
|
"div",
|
|
5697
5774
|
{
|
|
5698
5775
|
ref: box,
|
|
@@ -5702,7 +5779,7 @@ window.Aura = (() => {
|
|
|
5702
5779
|
tabIndex: -1,
|
|
5703
5780
|
className: cx("aura-command", props.className)
|
|
5704
5781
|
},
|
|
5705
|
-
/* @__PURE__ */
|
|
5782
|
+
/* @__PURE__ */ React33.createElement("div", { className: "aura-command__search" }, /* @__PURE__ */ React33.createElement(Icon, { name: /* @__PURE__ */ React33.createElement(IconSearch, null), className: "aura-command__search-icon" }), /* @__PURE__ */ React33.createElement(
|
|
5706
5783
|
"input",
|
|
5707
5784
|
{
|
|
5708
5785
|
ref: input,
|
|
@@ -5725,8 +5802,8 @@ window.Aura = (() => {
|
|
|
5725
5802
|
},
|
|
5726
5803
|
onKeyDown: onKey
|
|
5727
5804
|
}
|
|
5728
|
-
), /* @__PURE__ */
|
|
5729
|
-
/* @__PURE__ */
|
|
5805
|
+
), /* @__PURE__ */ React33.createElement("kbd", { className: "aura-command__kbd" }, "Esc")),
|
|
5806
|
+
/* @__PURE__ */ React33.createElement("div", { className: "aura-command__list", "aria-busy": props.loading || void 0 }, props.loading ? /* @__PURE__ */ React33.createElement("div", { className: "aura-command__loading" }, /* @__PURE__ */ React33.createElement(Icon, { name: /* @__PURE__ */ React33.createElement(IconLoaderCircle, null), className: "aura-spin" }), t.searching) : null, !flat3.length ? props.loading ? null : /* @__PURE__ */ React33.createElement("div", { className: "aura-command__empty" }, props.empty != null ? props.empty : props.emptyText || t.noMatches) : /* @__PURE__ */ React33.createElement(
|
|
5730
5807
|
"div",
|
|
5731
5808
|
{
|
|
5732
5809
|
id: listId,
|
|
@@ -5736,7 +5813,7 @@ window.Aura = (() => {
|
|
|
5736
5813
|
},
|
|
5737
5814
|
groups.map(function(g, gi) {
|
|
5738
5815
|
const gid = id + "-g" + gi;
|
|
5739
|
-
return /* @__PURE__ */
|
|
5816
|
+
return /* @__PURE__ */ React33.createElement(
|
|
5740
5817
|
"div",
|
|
5741
5818
|
{
|
|
5742
5819
|
key: g.name || gi,
|
|
@@ -5744,11 +5821,11 @@ window.Aura = (() => {
|
|
|
5744
5821
|
"aria-labelledby": g.name ? gid : void 0,
|
|
5745
5822
|
className: "aura-command__group"
|
|
5746
5823
|
},
|
|
5747
|
-
g.name ? /* @__PURE__ */
|
|
5824
|
+
g.name ? /* @__PURE__ */ React33.createElement("div", { className: "aura-command__heading", id: gid, role: "presentation" }, g.name) : null,
|
|
5748
5825
|
g.items.map(function(it) {
|
|
5749
5826
|
i++;
|
|
5750
5827
|
const n3 = i;
|
|
5751
|
-
return /* @__PURE__ */
|
|
5828
|
+
return /* @__PURE__ */ React33.createElement(
|
|
5752
5829
|
"div",
|
|
5753
5830
|
{
|
|
5754
5831
|
key: it.id,
|
|
@@ -5772,16 +5849,16 @@ window.Aura = (() => {
|
|
|
5772
5849
|
run(it);
|
|
5773
5850
|
}
|
|
5774
5851
|
},
|
|
5775
|
-
it.icon ? /* @__PURE__ */
|
|
5776
|
-
/* @__PURE__ */
|
|
5777
|
-
it.shortcut ? /* @__PURE__ */
|
|
5852
|
+
it.icon ? /* @__PURE__ */ React33.createElement(Icon, { name: it.icon }) : null,
|
|
5853
|
+
/* @__PURE__ */ React33.createElement("span", { className: "aura-command__text" }, /* @__PURE__ */ React33.createElement("span", { className: "aura-command__label", id: it.description ? optId(n3) + "-label" : void 0 }, it.label), it.description ? /* @__PURE__ */ React33.createElement("span", { className: "aura-command__desc", id: optId(n3) + "-desc", "aria-hidden": true }, it.description) : null),
|
|
5854
|
+
it.shortcut ? /* @__PURE__ */ React33.createElement("kbd", { className: "aura-command__kbd", id: it.description ? optId(n3) + "-kbd" : void 0 }, it.shortcut) : null
|
|
5778
5855
|
);
|
|
5779
5856
|
})
|
|
5780
5857
|
);
|
|
5781
5858
|
})
|
|
5782
5859
|
)),
|
|
5783
|
-
/* @__PURE__ */
|
|
5784
|
-
/* @__PURE__ */
|
|
5860
|
+
/* @__PURE__ */ React33.createElement("span", { className: "aura-sr-only", role: "status" }, props.loading ? t.searching : query && !flat3.length ? t.noMatches : props.loading === false && query ? t.results(flat3.length) : ""),
|
|
5861
|
+
/* @__PURE__ */ React33.createElement("div", { className: "aura-command__foot", "aria-hidden": true }, t.commandHint, /* @__PURE__ */ React33.createElement("span", { className: "aura-command__mod" }, isMac() ? "\u2318K" : "Ctrl K"))
|
|
5785
5862
|
)
|
|
5786
5863
|
),
|
|
5787
5864
|
document.body
|
|
@@ -5789,7 +5866,7 @@ window.Aura = (() => {
|
|
|
5789
5866
|
}
|
|
5790
5867
|
|
|
5791
5868
|
// src/DataTable.tsx
|
|
5792
|
-
var
|
|
5869
|
+
var React34 = __toESM(require_react(), 1);
|
|
5793
5870
|
var import_react_dom10 = __toESM(require_react_dom(), 1);
|
|
5794
5871
|
function ownRowAttrs(p) {
|
|
5795
5872
|
if (!p) return null;
|
|
@@ -5825,7 +5902,7 @@ window.Aura = (() => {
|
|
|
5825
5902
|
var ROW_H_DEFAULT = 48;
|
|
5826
5903
|
var OVERSCAN = 8;
|
|
5827
5904
|
var FLEX_MIN = 160;
|
|
5828
|
-
var DataTableImpl =
|
|
5905
|
+
var DataTableImpl = React34.forwardRef(function DataTable(props, ref) {
|
|
5829
5906
|
const t = useStrings();
|
|
5830
5907
|
const columns = props.columns || DEFAULT_COLUMNS;
|
|
5831
5908
|
const byKey = {};
|
|
@@ -5852,7 +5929,7 @@ window.Aura = (() => {
|
|
|
5852
5929
|
);
|
|
5853
5930
|
const sort = sortState[0], setSort = sortState[1];
|
|
5854
5931
|
const selState = useMaybeControlled(props.selected, props.defaultSelected || [], null);
|
|
5855
|
-
const onSel =
|
|
5932
|
+
const onSel = React34.useRef(props.onSelectionChange);
|
|
5856
5933
|
onSel.current = props.onSelectionChange;
|
|
5857
5934
|
const canSelect = function(r2) {
|
|
5858
5935
|
return !!r2 && (!props.isRowSelectable || !!props.isRowSelectable(r2));
|
|
@@ -5872,7 +5949,7 @@ window.Aura = (() => {
|
|
|
5872
5949
|
const droppedSig = selState[0].length === selected.length ? "" : "#" + selState[0].filter(function(k) {
|
|
5873
5950
|
return rejected[String(k)];
|
|
5874
5951
|
}).join("\0") + "#" + selected.join("\0");
|
|
5875
|
-
|
|
5952
|
+
React34.useEffect(
|
|
5876
5953
|
function() {
|
|
5877
5954
|
if (droppedSig !== "") setSelected(selected);
|
|
5878
5955
|
},
|
|
@@ -5909,19 +5986,19 @@ window.Aura = (() => {
|
|
|
5909
5986
|
}),
|
|
5910
5987
|
props.onPinnedColumnsChange
|
|
5911
5988
|
);
|
|
5912
|
-
const widthState =
|
|
5989
|
+
const widthState = React34.useState({});
|
|
5913
5990
|
const widths = widthState[0], setWidths = widthState[1];
|
|
5914
|
-
const activeState =
|
|
5915
|
-
const scrollState =
|
|
5991
|
+
const activeState = React34.useState({ r: 1, c: 0 });
|
|
5992
|
+
const scrollState = React34.useState(0);
|
|
5916
5993
|
const scrollTop = scrollState[0], setScrollTop = scrollState[1];
|
|
5917
|
-
const scrolledX =
|
|
5918
|
-
const menuState =
|
|
5994
|
+
const scrolledX = React34.useState(false);
|
|
5995
|
+
const menuState = React34.useState(null);
|
|
5919
5996
|
const menu = menuState[0], setMenu = menuState[1];
|
|
5920
|
-
const dragState =
|
|
5997
|
+
const dragState = React34.useState(null);
|
|
5921
5998
|
const drag = dragState[0], setDrag = dragState[1];
|
|
5922
|
-
const gridRef =
|
|
5923
|
-
const wrapRef =
|
|
5924
|
-
const boxWidth =
|
|
5999
|
+
const gridRef = React34.useRef(null);
|
|
6000
|
+
const wrapRef = React34.useRef(null), wrapMerged = useMergedRef(ref, wrapRef);
|
|
6001
|
+
const boxWidth = React34.useState(null);
|
|
5925
6002
|
const measure = !!props.stackBelow || columns.some(function(c) {
|
|
5926
6003
|
return c.hideBelow != null;
|
|
5927
6004
|
});
|
|
@@ -5931,7 +6008,7 @@ window.Aura = (() => {
|
|
|
5931
6008
|
return px != null && a.indexOf(px) === i;
|
|
5932
6009
|
}).length
|
|
5933
6010
|
);
|
|
5934
|
-
|
|
6011
|
+
React34.useEffect(
|
|
5935
6012
|
function() {
|
|
5936
6013
|
if (!measure || !wrapRef.current || typeof ResizeObserver === "undefined") return;
|
|
5937
6014
|
const ro = new ResizeObserver(function(en) {
|
|
@@ -5977,8 +6054,8 @@ window.Aura = (() => {
|
|
|
5977
6054
|
const px = hidePx(c);
|
|
5978
6055
|
return px != null && below(boxWidth[0], px);
|
|
5979
6056
|
}
|
|
5980
|
-
const scrollRef =
|
|
5981
|
-
const edgeState =
|
|
6057
|
+
const scrollRef = React34.useRef(null);
|
|
6058
|
+
const edgeState = React34.useState("");
|
|
5982
6059
|
const checkMoreX = function() {
|
|
5983
6060
|
const el = scrollRef.current;
|
|
5984
6061
|
if (!el) return;
|
|
@@ -5986,9 +6063,9 @@ window.Aura = (() => {
|
|
|
5986
6063
|
const next = more ? [el.offsetTop, el.clientHeight, el.offsetWidth - el.clientWidth].join(" ") : "";
|
|
5987
6064
|
if (next !== edgeState[0]) edgeState[1](next);
|
|
5988
6065
|
};
|
|
5989
|
-
const checkRef =
|
|
6066
|
+
const checkRef = React34.useRef(checkMoreX);
|
|
5990
6067
|
checkRef.current = checkMoreX;
|
|
5991
|
-
|
|
6068
|
+
React34.useEffect(function() {
|
|
5992
6069
|
const el = scrollRef.current;
|
|
5993
6070
|
if (!el || typeof ResizeObserver === "undefined") return;
|
|
5994
6071
|
const ro = new ResizeObserver(function() {
|
|
@@ -6000,7 +6077,7 @@ window.Aura = (() => {
|
|
|
6000
6077
|
ro.disconnect();
|
|
6001
6078
|
};
|
|
6002
6079
|
}, []);
|
|
6003
|
-
const tipState =
|
|
6080
|
+
const tipState = React34.useState(null), tip2 = tipState[0], setTip = tipState[1];
|
|
6004
6081
|
function showFull(e) {
|
|
6005
6082
|
const el = e.target.closest ? e.target.closest(".aura-table__td") : null;
|
|
6006
6083
|
if (!el || el.scrollWidth <= el.clientWidth + 1 || el.querySelector("button, input, .aura-pill"))
|
|
@@ -6012,7 +6089,7 @@ window.Aura = (() => {
|
|
|
6012
6089
|
setTip(null);
|
|
6013
6090
|
}
|
|
6014
6091
|
const tipEl = tip2 && typeof document !== "undefined" ? (0, import_react_dom10.createPortal)(
|
|
6015
|
-
/* @__PURE__ */
|
|
6092
|
+
/* @__PURE__ */ React34.createElement(
|
|
6016
6093
|
"div",
|
|
6017
6094
|
{
|
|
6018
6095
|
className: "aura-tooltip aura-tooltip--above",
|
|
@@ -6023,7 +6100,7 @@ window.Aura = (() => {
|
|
|
6023
6100
|
),
|
|
6024
6101
|
document.body
|
|
6025
6102
|
) : null;
|
|
6026
|
-
const rowH =
|
|
6103
|
+
const rowH = React34.useState(ROW_H_DEFAULT);
|
|
6027
6104
|
const ROW_H = rowH[0];
|
|
6028
6105
|
useIsoLayoutEffect(function() {
|
|
6029
6106
|
const el = wrapRef.current;
|
|
@@ -6031,8 +6108,8 @@ window.Aura = (() => {
|
|
|
6031
6108
|
const v = parseFloat(getComputedStyle(el).getPropertyValue("--aura-table-row-height"));
|
|
6032
6109
|
if (v > 0 && v !== rowH[0]) rowH[1](v);
|
|
6033
6110
|
});
|
|
6034
|
-
const pending =
|
|
6035
|
-
const resizing =
|
|
6111
|
+
const pending = React34.useRef(null);
|
|
6112
|
+
const resizing = React34.useRef(false);
|
|
6036
6113
|
useIsoLayoutEffect(function() {
|
|
6037
6114
|
if (!gridRef.current || tabMode) return;
|
|
6038
6115
|
const els = gridRef.current.querySelectorAll(
|
|
@@ -6155,7 +6232,7 @@ window.Aura = (() => {
|
|
|
6155
6232
|
return s;
|
|
6156
6233
|
}
|
|
6157
6234
|
const sortCol = sort && sort.key ? byKey[sort.key] : void 0;
|
|
6158
|
-
const view =
|
|
6235
|
+
const view = React34.useMemo(
|
|
6159
6236
|
function() {
|
|
6160
6237
|
if (manual || !sort || !sort.key || !byKey[sort.key]) return rows;
|
|
6161
6238
|
const col = byKey[sort.key];
|
|
@@ -6197,8 +6274,8 @@ window.Aura = (() => {
|
|
|
6197
6274
|
const pageRows = pageSize && !manual ? view.slice(first, first + pageSize) : view;
|
|
6198
6275
|
const canSortAny = !busy && (manual ? total > 1 : rows.length > 1);
|
|
6199
6276
|
const shownTotal = manual && props.totalRows == null ? first + rows.length : total;
|
|
6200
|
-
const prevCount =
|
|
6201
|
-
|
|
6277
|
+
const prevCount = React34.useRef(pageCount);
|
|
6278
|
+
React34.useEffect(
|
|
6202
6279
|
function() {
|
|
6203
6280
|
if (busy) return;
|
|
6204
6281
|
const before = prevCount.current;
|
|
@@ -6212,9 +6289,9 @@ window.Aura = (() => {
|
|
|
6212
6289
|
[pageState[0], page, busy, pageCount]
|
|
6213
6290
|
);
|
|
6214
6291
|
const linkPaging = !!props.getPageHref && !props.onPageChange && !oneCallback;
|
|
6215
|
-
const prevLink =
|
|
6216
|
-
const jumpState =
|
|
6217
|
-
|
|
6292
|
+
const prevLink = React34.useRef(null), nextLink = React34.useRef(null), jumpLink = React34.useRef(null);
|
|
6293
|
+
const jumpState = React34.useState(null);
|
|
6294
|
+
React34.useEffect(
|
|
6218
6295
|
function() {
|
|
6219
6296
|
if (jumpState[0] == null) return;
|
|
6220
6297
|
if (jumpLink.current) jumpLink.current.click();
|
|
@@ -6265,7 +6342,7 @@ window.Aura = (() => {
|
|
|
6265
6342
|
);
|
|
6266
6343
|
}
|
|
6267
6344
|
function rowLinkWrap(r2, content) {
|
|
6268
|
-
return rowHref ? /* @__PURE__ */
|
|
6345
|
+
return rowHref ? /* @__PURE__ */ React34.createElement(Link, { href: rowHref(r2), className: "aura-table__row-link" }, content) : content;
|
|
6269
6346
|
}
|
|
6270
6347
|
const height = props.height || 0;
|
|
6271
6348
|
const autoRows = props.rowHeight === "auto" && !height;
|
|
@@ -6309,8 +6386,8 @@ window.Aura = (() => {
|
|
|
6309
6386
|
const acShown = nearestShown(ac, 1, function(cc) {
|
|
6310
6387
|
return !cardHidden[cc];
|
|
6311
6388
|
});
|
|
6312
|
-
const lastFocus =
|
|
6313
|
-
|
|
6389
|
+
const lastFocus = React34.useRef(null);
|
|
6390
|
+
React34.useEffect(
|
|
6314
6391
|
function() {
|
|
6315
6392
|
const was = lastFocus.current, g = gridRef.current;
|
|
6316
6393
|
if (!stacked || !was || !g || !g.contains(was) || was.getClientRects().length > 0) return;
|
|
@@ -6325,7 +6402,7 @@ window.Aura = (() => {
|
|
|
6325
6402
|
if (!activeRendered) return r2 === 0 && c === ac ? 0 : -1;
|
|
6326
6403
|
return r2 === ar && c === acShown ? 0 : -1;
|
|
6327
6404
|
}
|
|
6328
|
-
|
|
6405
|
+
React34.useEffect(function() {
|
|
6329
6406
|
const p = pending.current;
|
|
6330
6407
|
if (!p || !gridRef.current) return;
|
|
6331
6408
|
let c = p.c;
|
|
@@ -6388,8 +6465,8 @@ window.Aura = (() => {
|
|
|
6388
6465
|
return selSet[String(k)];
|
|
6389
6466
|
}).length;
|
|
6390
6467
|
const all = nSel > 0 && nSel === pageKeys.length;
|
|
6391
|
-
const anchor =
|
|
6392
|
-
const shiftClick =
|
|
6468
|
+
const anchor = React34.useRef(null);
|
|
6469
|
+
const shiftClick = React34.useRef(false);
|
|
6393
6470
|
function toggle(k, on, how) {
|
|
6394
6471
|
const same2 = function(x) {
|
|
6395
6472
|
return String(x) === String(k);
|
|
@@ -6545,14 +6622,14 @@ window.Aura = (() => {
|
|
|
6545
6622
|
items2.push(
|
|
6546
6623
|
{
|
|
6547
6624
|
label: t.sortAsc,
|
|
6548
|
-
icon: /* @__PURE__ */
|
|
6625
|
+
icon: /* @__PURE__ */ React34.createElement(IconArrowUp, null),
|
|
6549
6626
|
onSelect: function() {
|
|
6550
6627
|
applySort({ key: c.key, dir: "asc" });
|
|
6551
6628
|
}
|
|
6552
6629
|
},
|
|
6553
6630
|
{
|
|
6554
6631
|
label: t.sortDesc,
|
|
6555
|
-
icon: /* @__PURE__ */
|
|
6632
|
+
icon: /* @__PURE__ */ React34.createElement(IconArrowDown, null),
|
|
6556
6633
|
onSelect: function() {
|
|
6557
6634
|
applySort({ key: c.key, dir: "desc" });
|
|
6558
6635
|
}
|
|
@@ -6562,7 +6639,7 @@ window.Aura = (() => {
|
|
|
6562
6639
|
if (c.width != null)
|
|
6563
6640
|
items2.push({
|
|
6564
6641
|
label: isPinned(c) ? t.unpin : t.pin,
|
|
6565
|
-
icon: isPinned(c) ? /* @__PURE__ */
|
|
6642
|
+
icon: isPinned(c) ? /* @__PURE__ */ React34.createElement(IconPinOff, null) : /* @__PURE__ */ React34.createElement(IconPin, null),
|
|
6566
6643
|
onSelect: function() {
|
|
6567
6644
|
togglePin(c.key);
|
|
6568
6645
|
}
|
|
@@ -6571,7 +6648,7 @@ window.Aura = (() => {
|
|
|
6571
6648
|
items2.push(
|
|
6572
6649
|
{
|
|
6573
6650
|
label: t.moveLeft,
|
|
6574
|
-
icon: /* @__PURE__ */
|
|
6651
|
+
icon: /* @__PURE__ */ React34.createElement(IconArrowLeft, null),
|
|
6575
6652
|
disabled: gi <= 0,
|
|
6576
6653
|
onSelect: function() {
|
|
6577
6654
|
moveCol(c.key, -1);
|
|
@@ -6579,7 +6656,7 @@ window.Aura = (() => {
|
|
|
6579
6656
|
},
|
|
6580
6657
|
{
|
|
6581
6658
|
label: t.moveRight,
|
|
6582
|
-
icon: /* @__PURE__ */
|
|
6659
|
+
icon: /* @__PURE__ */ React34.createElement(IconArrowRight, null),
|
|
6583
6660
|
disabled: gi >= group.length - 1,
|
|
6584
6661
|
onSelect: function() {
|
|
6585
6662
|
moveCol(c.key, 1);
|
|
@@ -6590,7 +6667,7 @@ window.Aura = (() => {
|
|
|
6590
6667
|
{ separator: true },
|
|
6591
6668
|
{
|
|
6592
6669
|
label: t.hideColumn,
|
|
6593
|
-
icon: /* @__PURE__ */
|
|
6670
|
+
icon: /* @__PURE__ */ React34.createElement(IconEyeOff, null),
|
|
6594
6671
|
disabled: shown.length <= 1,
|
|
6595
6672
|
onSelect: function() {
|
|
6596
6673
|
setHidden(c.key, true);
|
|
@@ -6611,7 +6688,7 @@ window.Aura = (() => {
|
|
|
6611
6688
|
setHidden(k, on);
|
|
6612
6689
|
}
|
|
6613
6690
|
};
|
|
6614
|
-
}).concat([{ separator: true }, { label: t.resetColumns, icon: /* @__PURE__ */
|
|
6691
|
+
}).concat([{ separator: true }, { label: t.resetColumns, icon: /* @__PURE__ */ React34.createElement(IconRotateCcw, null), onSelect: resetColumns }]);
|
|
6615
6692
|
}
|
|
6616
6693
|
function openMenu(kind, key, anchor2, rc) {
|
|
6617
6694
|
setMenu({ kind, key, anchor: anchor2, rc });
|
|
@@ -6688,10 +6765,10 @@ window.Aura = (() => {
|
|
|
6688
6765
|
e.stopPropagation();
|
|
6689
6766
|
}
|
|
6690
6767
|
}
|
|
6691
|
-
const head = [/* @__PURE__ */
|
|
6768
|
+
const head = [/* @__PURE__ */ React34.createElement("span", { key: "__gl", className: "aura-table__gutter", "aria-hidden": true })];
|
|
6692
6769
|
if (selectable)
|
|
6693
6770
|
head.push(
|
|
6694
|
-
/* @__PURE__ */
|
|
6771
|
+
/* @__PURE__ */ React34.createElement(
|
|
6695
6772
|
"span",
|
|
6696
6773
|
{
|
|
6697
6774
|
key: "__sel",
|
|
@@ -6705,7 +6782,7 @@ window.Aura = (() => {
|
|
|
6705
6782
|
activeState[1]({ r: 0, c: 0 });
|
|
6706
6783
|
}
|
|
6707
6784
|
},
|
|
6708
|
-
pageKeys.length ? /* @__PURE__ */
|
|
6785
|
+
pageKeys.length ? /* @__PURE__ */ React34.createElement(
|
|
6709
6786
|
Checkbox,
|
|
6710
6787
|
{
|
|
6711
6788
|
ref: props.selectAllRef,
|
|
@@ -6717,7 +6794,7 @@ window.Aura = (() => {
|
|
|
6717
6794
|
onChange: toggleAll
|
|
6718
6795
|
}
|
|
6719
6796
|
) : null,
|
|
6720
|
-
pageKeys.length ? /* @__PURE__ */
|
|
6797
|
+
pageKeys.length ? /* @__PURE__ */ React34.createElement("span", { className: "aura-table__sel-text" }, nSel ? t.selectedCount(nSel) : t.selectAll) : /* @__PURE__ */ React34.createElement("span", { className: "aura-sr-only" }, t.selectRows)
|
|
6721
6798
|
)
|
|
6722
6799
|
);
|
|
6723
6800
|
vis.forEach(function(c, i) {
|
|
@@ -6728,7 +6805,7 @@ window.Aura = (() => {
|
|
|
6728
6805
|
const ariaSort = sort && canSortAny ? isSorted && canSort ? sort.dir === "desc" ? "descending" : "ascending" : canSort ? "none" : void 0 : own || (canSort ? "none" : void 0);
|
|
6729
6806
|
const pin = isPinned(c), edge = pin && i === nPinned - 1;
|
|
6730
6807
|
head.push(
|
|
6731
|
-
/* @__PURE__ */
|
|
6808
|
+
/* @__PURE__ */ React34.createElement(
|
|
6732
6809
|
"span",
|
|
6733
6810
|
{
|
|
6734
6811
|
key: c.key,
|
|
@@ -6779,7 +6856,7 @@ window.Aura = (() => {
|
|
|
6779
6856
|
setDrag(null);
|
|
6780
6857
|
}
|
|
6781
6858
|
},
|
|
6782
|
-
/* @__PURE__ */
|
|
6859
|
+
/* @__PURE__ */ React34.createElement("span", { className: "aura-table__th-inner" }, canSort ? /* @__PURE__ */ React34.createElement(
|
|
6783
6860
|
"button",
|
|
6784
6861
|
{
|
|
6785
6862
|
type: "button",
|
|
@@ -6791,14 +6868,14 @@ window.Aura = (() => {
|
|
|
6791
6868
|
}
|
|
6792
6869
|
},
|
|
6793
6870
|
c.label,
|
|
6794
|
-
/* @__PURE__ */
|
|
6871
|
+
/* @__PURE__ */ React34.createElement(
|
|
6795
6872
|
Icon,
|
|
6796
6873
|
{
|
|
6797
|
-
name: isSorted ? sort.dir === "desc" ? /* @__PURE__ */
|
|
6874
|
+
name: isSorted ? sort.dir === "desc" ? /* @__PURE__ */ React34.createElement(IconArrowDown, null) : /* @__PURE__ */ React34.createElement(IconArrowUp, null) : /* @__PURE__ */ React34.createElement(IconArrowUpDown, null),
|
|
6798
6875
|
size: 12
|
|
6799
6876
|
}
|
|
6800
6877
|
)
|
|
6801
|
-
) : /* @__PURE__ */
|
|
6878
|
+
) : /* @__PURE__ */ React34.createElement("span", { className: cx("aura-table__th-label", !c.label && "aura-sr-only") }, c.label || (c.actions ? t.actions : c.key)), pin ? /* @__PURE__ */ React34.createElement(Icon, { name: /* @__PURE__ */ React34.createElement(IconPin, null), size: 12, className: "aura-table__pin-icon", label: t.pinned }) : null, controls ? /* @__PURE__ */ React34.createElement(
|
|
6802
6879
|
"button",
|
|
6803
6880
|
{
|
|
6804
6881
|
type: "button",
|
|
@@ -6812,9 +6889,9 @@ window.Aura = (() => {
|
|
|
6812
6889
|
openMenu("col", c.key, e.currentTarget, { r: 0, c: ci });
|
|
6813
6890
|
}
|
|
6814
6891
|
},
|
|
6815
|
-
/* @__PURE__ */
|
|
6892
|
+
/* @__PURE__ */ React34.createElement(Icon, { name: /* @__PURE__ */ React34.createElement(IconEllipsis, null) })
|
|
6816
6893
|
) : null),
|
|
6817
|
-
canResize(c) ? /* @__PURE__ */
|
|
6894
|
+
canResize(c) ? /* @__PURE__ */ React34.createElement(
|
|
6818
6895
|
"span",
|
|
6819
6896
|
{
|
|
6820
6897
|
className: "aura-table__resize",
|
|
@@ -6836,7 +6913,7 @@ window.Aura = (() => {
|
|
|
6836
6913
|
);
|
|
6837
6914
|
});
|
|
6838
6915
|
head.push(
|
|
6839
|
-
/* @__PURE__ */
|
|
6916
|
+
/* @__PURE__ */ React34.createElement(
|
|
6840
6917
|
"span",
|
|
6841
6918
|
{
|
|
6842
6919
|
key: "__gr",
|
|
@@ -6847,15 +6924,15 @@ window.Aura = (() => {
|
|
|
6847
6924
|
);
|
|
6848
6925
|
function cellContent(c, r2) {
|
|
6849
6926
|
const v = r2[c.key];
|
|
6850
|
-
return c.render ? c.render(r2) : c.pill ? /* @__PURE__ */
|
|
6927
|
+
return c.render ? c.render(r2) : c.pill ? /* @__PURE__ */ React34.createElement(StatusPill, { ...{ tone: c.tones && c.tones[v] } }, v) : v;
|
|
6851
6928
|
}
|
|
6852
6929
|
function rowCells(r2, i, k, isSel) {
|
|
6853
6930
|
const ri = i + 1;
|
|
6854
6931
|
const selLabel = selectable && canSelect(r2) ? props.rowSelectLabel && props.rowSelectLabel(r2) || t.selectRow(k) : void 0;
|
|
6855
|
-
const cells = [/* @__PURE__ */
|
|
6932
|
+
const cells = [/* @__PURE__ */ React34.createElement("span", { key: "__gl", className: "aura-table__gutter", "aria-hidden": true })];
|
|
6856
6933
|
if (selectable)
|
|
6857
6934
|
cells.push(
|
|
6858
|
-
/* @__PURE__ */
|
|
6935
|
+
/* @__PURE__ */ React34.createElement(
|
|
6859
6936
|
"span",
|
|
6860
6937
|
{
|
|
6861
6938
|
key: "__sel",
|
|
@@ -6872,7 +6949,7 @@ window.Aura = (() => {
|
|
|
6872
6949
|
shiftClick.current = e.shiftKey;
|
|
6873
6950
|
}
|
|
6874
6951
|
},
|
|
6875
|
-
canSelect(r2) ? /* @__PURE__ */
|
|
6952
|
+
canSelect(r2) ? /* @__PURE__ */ React34.createElement(
|
|
6876
6953
|
Checkbox,
|
|
6877
6954
|
{
|
|
6878
6955
|
hideLabel: true,
|
|
@@ -6891,7 +6968,7 @@ window.Aura = (() => {
|
|
|
6891
6968
|
vis.forEach(function(c, j) {
|
|
6892
6969
|
const ci = j + (selectable ? 1 : 0), v = r2[c.key], pin = isPinned(c);
|
|
6893
6970
|
cells.push(
|
|
6894
|
-
/* @__PURE__ */
|
|
6971
|
+
/* @__PURE__ */ React34.createElement(
|
|
6895
6972
|
"span",
|
|
6896
6973
|
{
|
|
6897
6974
|
key: c.key,
|
|
@@ -6913,13 +6990,13 @@ window.Aura = (() => {
|
|
|
6913
6990
|
if (activeState[0].r !== ri || activeState[0].c !== ci) activeState[1]({ r: ri, c: ci });
|
|
6914
6991
|
}
|
|
6915
6992
|
},
|
|
6916
|
-
autoRows ? /* @__PURE__ */
|
|
6993
|
+
autoRows ? /* @__PURE__ */ React34.createElement("span", { className: "aura-table__cell" }, j === 0 ? rowLinkWrap(r2, cellContent(c, r2)) : cellContent(c, r2)) : j === 0 ? rowLinkWrap(r2, cellContent(c, r2)) : cellContent(c, r2)
|
|
6917
6994
|
)
|
|
6918
6995
|
);
|
|
6919
6996
|
});
|
|
6920
|
-
if (hasFields) cells.push(/* @__PURE__ */
|
|
6997
|
+
if (hasFields) cells.push(/* @__PURE__ */ React34.createElement("span", { key: "__br", className: "aura-table__break", "aria-hidden": true }));
|
|
6921
6998
|
cells.push(
|
|
6922
|
-
/* @__PURE__ */
|
|
6999
|
+
/* @__PURE__ */ React34.createElement(
|
|
6923
7000
|
"span",
|
|
6924
7001
|
{
|
|
6925
7002
|
key: "__gr",
|
|
@@ -6936,17 +7013,17 @@ window.Aura = (() => {
|
|
|
6936
7013
|
const n3 = pageSize || props.skeletonRows || 5;
|
|
6937
7014
|
const skRows = body = [];
|
|
6938
7015
|
for (let i = 0; i < n3; i++) {
|
|
6939
|
-
const sk = [/* @__PURE__ */
|
|
7016
|
+
const sk = [/* @__PURE__ */ React34.createElement("span", { key: "__gl", className: "aura-table__gutter" })];
|
|
6940
7017
|
if (selectable)
|
|
6941
7018
|
sk.push(
|
|
6942
|
-
/* @__PURE__ */
|
|
7019
|
+
/* @__PURE__ */ React34.createElement("span", { key: "__sel", className: cx("aura-table__sel", nPinned && "is-pinned") }, /* @__PURE__ */ React34.createElement("span", { className: "aura-skel aura-skel--box" }))
|
|
6943
7020
|
);
|
|
6944
7021
|
vis.forEach(function(c, j) {
|
|
6945
7022
|
const part = cardPart(c, j);
|
|
6946
7023
|
const action = part === "footer" || part === "actions";
|
|
6947
7024
|
const lines = c.pill ? 1 : Math.max(1, Math.min(10, Math.floor(Number(c.skeletonLines)) || 1));
|
|
6948
7025
|
const bar = function(n4) {
|
|
6949
|
-
return /* @__PURE__ */
|
|
7026
|
+
return /* @__PURE__ */ React34.createElement(
|
|
6950
7027
|
"span",
|
|
6951
7028
|
{
|
|
6952
7029
|
key: n4,
|
|
@@ -6958,7 +7035,7 @@ window.Aura = (() => {
|
|
|
6958
7035
|
const bars2 = [];
|
|
6959
7036
|
for (let b = 0; b < lines; b++) bars2.push(bar(b));
|
|
6960
7037
|
sk.push(
|
|
6961
|
-
/* @__PURE__ */
|
|
7038
|
+
/* @__PURE__ */ React34.createElement(
|
|
6962
7039
|
"span",
|
|
6963
7040
|
{
|
|
6964
7041
|
key: c.key,
|
|
@@ -6971,7 +7048,7 @@ window.Aura = (() => {
|
|
|
6971
7048
|
style: cellStyle(c, j),
|
|
6972
7049
|
...cardAttrs(c, j)
|
|
6973
7050
|
},
|
|
6974
|
-
action ? /* @__PURE__ */
|
|
7051
|
+
action ? /* @__PURE__ */ React34.createElement(
|
|
6975
7052
|
"span",
|
|
6976
7053
|
{
|
|
6977
7054
|
className: cx(
|
|
@@ -6980,16 +7057,16 @@ window.Aura = (() => {
|
|
|
6980
7057
|
c.skeletonTouch && "is-touch"
|
|
6981
7058
|
)
|
|
6982
7059
|
}
|
|
6983
|
-
) : lines > 1 ? /* @__PURE__ */
|
|
7060
|
+
) : lines > 1 ? /* @__PURE__ */ React34.createElement("span", { className: "aura-skel-lines" }, bars2) : bars2[0]
|
|
6984
7061
|
)
|
|
6985
7062
|
);
|
|
6986
7063
|
});
|
|
6987
|
-
if (hasFields) sk.push(/* @__PURE__ */
|
|
7064
|
+
if (hasFields) sk.push(/* @__PURE__ */ React34.createElement("span", { key: "__br", className: "aura-table__break" }));
|
|
6988
7065
|
sk.push(
|
|
6989
|
-
/* @__PURE__ */
|
|
7066
|
+
/* @__PURE__ */ React34.createElement("span", { key: "__gr", className: cx("aura-table__gutter aura-table__gutter--end", controls && "has-picker") })
|
|
6990
7067
|
);
|
|
6991
7068
|
skRows.push(
|
|
6992
|
-
/* @__PURE__ */
|
|
7069
|
+
/* @__PURE__ */ React34.createElement(
|
|
6993
7070
|
"div",
|
|
6994
7071
|
{
|
|
6995
7072
|
key: "sk" + i,
|
|
@@ -7003,18 +7080,18 @@ window.Aura = (() => {
|
|
|
7003
7080
|
}
|
|
7004
7081
|
} else if (!rows.length) {
|
|
7005
7082
|
const em = props.empty || {};
|
|
7006
|
-
body = /* @__PURE__ */
|
|
7083
|
+
body = /* @__PURE__ */ React34.createElement("div", { className: "aura-table__empty", role: "row" }, /* @__PURE__ */ React34.createElement("div", { role: "gridcell" }, /* @__PURE__ */ React34.createElement("span", { className: "aura-table__empty-icon" }, /* @__PURE__ */ React34.createElement(Icon, { name: em.icon || /* @__PURE__ */ React34.createElement(IconInbox, null), size: "lg" })), /* @__PURE__ */ React34.createElement("p", { className: "aura-table__empty-title" }, em.title || t.empty), em.description ? /* @__PURE__ */ React34.createElement("p", { className: "aura-table__empty-text" }, em.description) : null, em.action ? /* @__PURE__ */ React34.createElement("div", { className: "aura-table__empty-action" }, em.action) : null));
|
|
7007
7084
|
} else {
|
|
7008
7085
|
const bodyRows = body = [];
|
|
7009
7086
|
if (virtual && start > 0)
|
|
7010
7087
|
bodyRows.push(
|
|
7011
|
-
/* @__PURE__ */
|
|
7088
|
+
/* @__PURE__ */ React34.createElement("div", { key: "__top", className: "aura-table__spacer", style: { height: start * ROW_H + "px" }, "aria-hidden": true })
|
|
7012
7089
|
);
|
|
7013
7090
|
for (let ri = start; ri < end; ri++) {
|
|
7014
7091
|
(function(r2, i) {
|
|
7015
7092
|
const k = r2[rowKey], isSel = !!selSet[k];
|
|
7016
7093
|
bodyRows.push(
|
|
7017
|
-
/* @__PURE__ */
|
|
7094
|
+
/* @__PURE__ */ React34.createElement(
|
|
7018
7095
|
"div",
|
|
7019
7096
|
{
|
|
7020
7097
|
key: k,
|
|
@@ -7043,7 +7120,7 @@ window.Aura = (() => {
|
|
|
7043
7120
|
}
|
|
7044
7121
|
if (virtual && end < pageRows.length)
|
|
7045
7122
|
bodyRows.push(
|
|
7046
|
-
/* @__PURE__ */
|
|
7123
|
+
/* @__PURE__ */ React34.createElement(
|
|
7047
7124
|
"div",
|
|
7048
7125
|
{
|
|
7049
7126
|
key: "__bot",
|
|
@@ -7056,9 +7133,9 @@ window.Aura = (() => {
|
|
|
7056
7133
|
}
|
|
7057
7134
|
let foot = null;
|
|
7058
7135
|
function pagerButton(dir) {
|
|
7059
|
-
const p = page + dir, off = busy || (dir < 0 ? page <= 1 : page >= pageCount), label = dir < 0 ? t.prevPage : t.nextPage, icon = dir < 0 ? /* @__PURE__ */
|
|
7136
|
+
const p = page + dir, off = busy || (dir < 0 ? page <= 1 : page >= pageCount), label = dir < 0 ? t.prevPage : t.nextPage, icon = dir < 0 ? /* @__PURE__ */ React34.createElement(IconChevronLeft, null) : /* @__PURE__ */ React34.createElement(IconChevronRight, null);
|
|
7060
7137
|
if (props.getPageHref && !off)
|
|
7061
|
-
return /* @__PURE__ */
|
|
7138
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7062
7139
|
Link,
|
|
7063
7140
|
{
|
|
7064
7141
|
ref: dir < 0 ? prevLink : nextLink,
|
|
@@ -7073,9 +7150,9 @@ window.Aura = (() => {
|
|
|
7073
7150
|
}
|
|
7074
7151
|
}
|
|
7075
7152
|
},
|
|
7076
|
-
/* @__PURE__ */
|
|
7153
|
+
/* @__PURE__ */ React34.createElement(Icon, { name: icon })
|
|
7077
7154
|
);
|
|
7078
|
-
return /* @__PURE__ */
|
|
7155
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7079
7156
|
IconButton,
|
|
7080
7157
|
{
|
|
7081
7158
|
icon,
|
|
@@ -7090,11 +7167,11 @@ window.Aura = (() => {
|
|
|
7090
7167
|
const openTotal = manual && props.totalRows == null && !!pageSize && rows.length >= pageSize;
|
|
7091
7168
|
if (pageSize && (rows.length || busy || page > 1)) {
|
|
7092
7169
|
const from = rows.length ? first + 1 : 0, to = manual ? first + rows.length : Math.min(first + pageSize, view.length);
|
|
7093
|
-
foot = /* @__PURE__ */
|
|
7170
|
+
foot = /* @__PURE__ */ React34.createElement("div", { className: "aura-table__foot" }, /* @__PURE__ */ React34.createElement("span", { "aria-live": "polite" }, busy ? t.loading : openTotal ? t.rangeOpen(from, to) : t.range(from, to, shownTotal)), /* @__PURE__ */ React34.createElement("span", { className: "aura-table__pager" }, /* @__PURE__ */ React34.createElement("span", null, openTotal ? t.pageOpen(page) : t.page(page, pageCount)), pagerButton(-1), pagerButton(1)));
|
|
7094
7171
|
} else if (height && rows.length && !loading) {
|
|
7095
|
-
foot = /* @__PURE__ */
|
|
7172
|
+
foot = /* @__PURE__ */ React34.createElement("div", { className: "aura-table__foot" }, /* @__PURE__ */ React34.createElement("span", null, t.rowCount(shownTotal)), selectable && selected.length ? /* @__PURE__ */ React34.createElement("span", null, t.selectedCount(selected.length)) : /* @__PURE__ */ React34.createElement("span", null));
|
|
7096
7173
|
}
|
|
7097
|
-
const totalRow = props.footer && rows.length && !loading ? /* @__PURE__ */
|
|
7174
|
+
const totalRow = props.footer && rows.length && !loading ? /* @__PURE__ */ React34.createElement(
|
|
7098
7175
|
"div",
|
|
7099
7176
|
{
|
|
7100
7177
|
role: "row",
|
|
@@ -7103,8 +7180,8 @@ window.Aura = (() => {
|
|
|
7103
7180
|
className: cx("aura-table__row aura-table__total", props.stickyFooter && "is-sticky"),
|
|
7104
7181
|
style: rowStyle
|
|
7105
7182
|
},
|
|
7106
|
-
/* @__PURE__ */
|
|
7107
|
-
selectable ? /* @__PURE__ */
|
|
7183
|
+
/* @__PURE__ */ React34.createElement("span", { className: "aura-table__gutter", "aria-hidden": true }),
|
|
7184
|
+
selectable ? /* @__PURE__ */ React34.createElement(
|
|
7108
7185
|
"span",
|
|
7109
7186
|
{
|
|
7110
7187
|
role: "gridcell",
|
|
@@ -7119,7 +7196,7 @@ window.Aura = (() => {
|
|
|
7119
7196
|
) : null,
|
|
7120
7197
|
vis.map(function(c, j) {
|
|
7121
7198
|
const pin = isPinned(c), ci = j + (selectable ? 1 : 0);
|
|
7122
|
-
return /* @__PURE__ */
|
|
7199
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7123
7200
|
"span",
|
|
7124
7201
|
{
|
|
7125
7202
|
key: c.key,
|
|
@@ -7145,8 +7222,8 @@ window.Aura = (() => {
|
|
|
7145
7222
|
props.footer[c.key]
|
|
7146
7223
|
);
|
|
7147
7224
|
}),
|
|
7148
|
-
hasFields ? /* @__PURE__ */
|
|
7149
|
-
/* @__PURE__ */
|
|
7225
|
+
hasFields ? /* @__PURE__ */ React34.createElement("span", { className: "aura-table__break", "aria-hidden": true }) : null,
|
|
7226
|
+
/* @__PURE__ */ React34.createElement(
|
|
7150
7227
|
"span",
|
|
7151
7228
|
{
|
|
7152
7229
|
className: cx("aura-table__gutter aura-table__gutter--end", controls && "has-picker"),
|
|
@@ -7160,7 +7237,7 @@ window.Aura = (() => {
|
|
|
7160
7237
|
scrollPaddingBottom: stickyTotal ? ROW_H + "px" : void 0
|
|
7161
7238
|
};
|
|
7162
7239
|
if (height) scrollStyle["--aura-table-h"] = height + "px";
|
|
7163
|
-
const gridEl = /* @__PURE__ */
|
|
7240
|
+
const gridEl = /* @__PURE__ */ React34.createElement(
|
|
7164
7241
|
"div",
|
|
7165
7242
|
{
|
|
7166
7243
|
ref: levels.length ? wrapRef : wrapMerged,
|
|
@@ -7181,8 +7258,8 @@ window.Aura = (() => {
|
|
|
7181
7258
|
),
|
|
7182
7259
|
style: levels.length ? { ["--aura-q-back"]: String(levels[levels.length - 1].px / Q) } : void 0
|
|
7183
7260
|
},
|
|
7184
|
-
refreshing ? /* @__PURE__ */
|
|
7185
|
-
edgeState[0] && !stacked ? /* @__PURE__ */
|
|
7261
|
+
refreshing ? /* @__PURE__ */ React34.createElement("span", { className: "aura-table__busy-bar", "aria-hidden": true }) : null,
|
|
7262
|
+
edgeState[0] && !stacked ? /* @__PURE__ */ React34.createElement(
|
|
7186
7263
|
"span",
|
|
7187
7264
|
{
|
|
7188
7265
|
className: "aura-table__edge",
|
|
@@ -7194,7 +7271,7 @@ window.Aura = (() => {
|
|
|
7194
7271
|
}
|
|
7195
7272
|
}
|
|
7196
7273
|
) : null,
|
|
7197
|
-
/* @__PURE__ */
|
|
7274
|
+
/* @__PURE__ */ React34.createElement(
|
|
7198
7275
|
"div",
|
|
7199
7276
|
{
|
|
7200
7277
|
ref: function(el) {
|
|
@@ -7232,7 +7309,7 @@ window.Aura = (() => {
|
|
|
7232
7309
|
checkMoreX();
|
|
7233
7310
|
}
|
|
7234
7311
|
},
|
|
7235
|
-
/* @__PURE__ */
|
|
7312
|
+
/* @__PURE__ */ React34.createElement(
|
|
7236
7313
|
"div",
|
|
7237
7314
|
{
|
|
7238
7315
|
className: cx("aura-table__head", selectable && nRows > 0 && !busy && "has-select-all"),
|
|
@@ -7245,11 +7322,11 @@ window.Aura = (() => {
|
|
|
7245
7322
|
body,
|
|
7246
7323
|
totalRow
|
|
7247
7324
|
),
|
|
7248
|
-
busy ? /* @__PURE__ */
|
|
7249
|
-
controls ? /* @__PURE__ */
|
|
7325
|
+
busy ? /* @__PURE__ */ React34.createElement("span", { className: "aura-sr-only", role: "status" }, t.loadingRows) : null,
|
|
7326
|
+
controls ? /* @__PURE__ */ React34.createElement("div", { className: "aura-table__picker" }, /* @__PURE__ */ React34.createElement(
|
|
7250
7327
|
IconButton,
|
|
7251
7328
|
{
|
|
7252
|
-
icon: /* @__PURE__ */
|
|
7329
|
+
icon: /* @__PURE__ */ React34.createElement(IconColumns3, null),
|
|
7253
7330
|
label: t.showHideColumns,
|
|
7254
7331
|
"aria-haspopup": "menu",
|
|
7255
7332
|
onClick: function(e) {
|
|
@@ -7258,7 +7335,7 @@ window.Aura = (() => {
|
|
|
7258
7335
|
}
|
|
7259
7336
|
)) : null,
|
|
7260
7337
|
foot,
|
|
7261
|
-
menu ? /* @__PURE__ */
|
|
7338
|
+
menu ? /* @__PURE__ */ React34.createElement(
|
|
7262
7339
|
Menu,
|
|
7263
7340
|
{
|
|
7264
7341
|
anchor: menu.anchor,
|
|
@@ -7268,13 +7345,13 @@ window.Aura = (() => {
|
|
|
7268
7345
|
}
|
|
7269
7346
|
) : null,
|
|
7270
7347
|
tipEl,
|
|
7271
|
-
jumpState[0] != null && props.getPageHref ? /* @__PURE__ */
|
|
7348
|
+
jumpState[0] != null && props.getPageHref ? /* @__PURE__ */ React34.createElement(Link, { ref: jumpLink, href: props.getPageHref(jumpState[0]), hidden: true, tabIndex: -1, "aria-hidden": true }) : null
|
|
7272
7349
|
);
|
|
7273
7350
|
if (!levels.length) return gridEl;
|
|
7274
7351
|
let out = gridEl;
|
|
7275
7352
|
for (let i = levels.length - 1; i >= 0; i--) {
|
|
7276
7353
|
const prev = i === 0 ? Q : levels[i - 1].px;
|
|
7277
|
-
out = /* @__PURE__ */
|
|
7354
|
+
out = /* @__PURE__ */ React34.createElement(
|
|
7278
7355
|
"div",
|
|
7279
7356
|
{
|
|
7280
7357
|
className: cx("aura-table-q", "aura-table-q--" + levels[i].name),
|
|
@@ -7283,7 +7360,7 @@ window.Aura = (() => {
|
|
|
7283
7360
|
out
|
|
7284
7361
|
);
|
|
7285
7362
|
}
|
|
7286
|
-
return /* @__PURE__ */
|
|
7363
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7287
7364
|
"div",
|
|
7288
7365
|
{
|
|
7289
7366
|
ref,
|
|
@@ -7300,14 +7377,14 @@ window.Aura = (() => {
|
|
|
7300
7377
|
var DataTable2 = DataTableImpl;
|
|
7301
7378
|
|
|
7302
7379
|
// src/Card.tsx
|
|
7303
|
-
var
|
|
7304
|
-
var Card =
|
|
7380
|
+
var React35 = __toESM(require_react(), 1);
|
|
7381
|
+
var Card = React35.forwardRef(function Card2(props, ref) {
|
|
7305
7382
|
return cardElement(props, ref);
|
|
7306
7383
|
});
|
|
7307
7384
|
|
|
7308
7385
|
// src/Tabs.tsx
|
|
7309
|
-
var
|
|
7310
|
-
var Tabs =
|
|
7386
|
+
var React36 = __toESM(require_react(), 1);
|
|
7387
|
+
var Tabs = React36.forwardRef(function Tabs2(props, ref) {
|
|
7311
7388
|
const items2 = props.tabs || [], base = uid();
|
|
7312
7389
|
const asLinks = items2.length > 0 && items2.every(function(t) {
|
|
7313
7390
|
return !!t.href;
|
|
@@ -7321,7 +7398,7 @@ window.Aura = (() => {
|
|
|
7321
7398
|
props.onChange
|
|
7322
7399
|
);
|
|
7323
7400
|
const cur2 = asLinks && "value" in props ? props.value : st[0];
|
|
7324
|
-
const refs =
|
|
7401
|
+
const refs = React36.useRef({});
|
|
7325
7402
|
const current2 = items2.filter(function(t) {
|
|
7326
7403
|
return t.id === cur2;
|
|
7327
7404
|
})[0] || firstOn || items2[0];
|
|
@@ -7339,7 +7416,7 @@ window.Aura = (() => {
|
|
|
7339
7416
|
return cx("aura-tab", on && "is-active", seg && "aura-segmented__option", seg && on && "is-selected", extra);
|
|
7340
7417
|
};
|
|
7341
7418
|
const rootCls = cx("aura-tabs", seg && "aura-tabs--segmented", touchClass(props.touchHeight));
|
|
7342
|
-
const [focusId, setFocusId] =
|
|
7419
|
+
const [focusId, setFocusId] = React36.useState(null);
|
|
7343
7420
|
items2.forEach(function(t) {
|
|
7344
7421
|
const al = t.tabProps && t.tabProps["aria-label"];
|
|
7345
7422
|
if (al && al.toLowerCase().indexOf(String(t.label).toLowerCase()) !== 0)
|
|
@@ -7349,19 +7426,19 @@ window.Aura = (() => {
|
|
|
7349
7426
|
);
|
|
7350
7427
|
});
|
|
7351
7428
|
if (asLinks)
|
|
7352
|
-
return /* @__PURE__ */
|
|
7429
|
+
return /* @__PURE__ */ React36.createElement(
|
|
7353
7430
|
"nav",
|
|
7354
7431
|
{
|
|
7355
7432
|
ref,
|
|
7356
7433
|
"aria-label": props.label,
|
|
7357
7434
|
className: cx(rootCls, "aura-tabs--links", props.className)
|
|
7358
7435
|
},
|
|
7359
|
-
/* @__PURE__ */
|
|
7436
|
+
/* @__PURE__ */ React36.createElement("div", { className: listCls }, items2.map(function(t) {
|
|
7360
7437
|
const on = t.id === cur2;
|
|
7361
7438
|
const inner = [
|
|
7362
|
-
t.icon ? /* @__PURE__ */
|
|
7439
|
+
t.icon ? /* @__PURE__ */ React36.createElement(Icon, { key: "i", name: t.icon }) : null,
|
|
7363
7440
|
t.label,
|
|
7364
|
-
t.count != null ? /* @__PURE__ */
|
|
7441
|
+
t.count != null ? /* @__PURE__ */ React36.createElement("span", { key: "c", className: "aura-tab__count" }, t.count) : null
|
|
7365
7442
|
];
|
|
7366
7443
|
const own = omit(t.tabProps || {}, [
|
|
7367
7444
|
"type",
|
|
@@ -7375,7 +7452,7 @@ window.Aura = (() => {
|
|
|
7375
7452
|
"name",
|
|
7376
7453
|
"value"
|
|
7377
7454
|
]);
|
|
7378
|
-
return t.disabled ? /* @__PURE__ */
|
|
7455
|
+
return t.disabled ? /* @__PURE__ */ React36.createElement(
|
|
7379
7456
|
"span",
|
|
7380
7457
|
{
|
|
7381
7458
|
...omit(own, ["onClick"]),
|
|
@@ -7384,7 +7461,7 @@ window.Aura = (() => {
|
|
|
7384
7461
|
"aria-disabled": true
|
|
7385
7462
|
},
|
|
7386
7463
|
inner
|
|
7387
|
-
) : /* @__PURE__ */
|
|
7464
|
+
) : /* @__PURE__ */ React36.createElement(
|
|
7388
7465
|
Link,
|
|
7389
7466
|
{
|
|
7390
7467
|
...own,
|
|
@@ -7414,7 +7491,7 @@ window.Aura = (() => {
|
|
|
7414
7491
|
const stop2 = manual && focusId && items2.filter(function(t) {
|
|
7415
7492
|
return t.id === focusId && !t.disabled;
|
|
7416
7493
|
})[0] || current2;
|
|
7417
|
-
return /* @__PURE__ */
|
|
7494
|
+
return /* @__PURE__ */ React36.createElement("div", { ref, className: cx(rootCls, props.className) }, /* @__PURE__ */ React36.createElement(
|
|
7418
7495
|
"div",
|
|
7419
7496
|
{
|
|
7420
7497
|
role: "tablist",
|
|
@@ -7447,7 +7524,7 @@ window.Aura = (() => {
|
|
|
7447
7524
|
items2.map(function(t) {
|
|
7448
7525
|
const on = current2 && t.id === current2.id;
|
|
7449
7526
|
const own = t.tabProps || {};
|
|
7450
|
-
return /* @__PURE__ */
|
|
7527
|
+
return /* @__PURE__ */ React36.createElement(
|
|
7451
7528
|
"button",
|
|
7452
7529
|
{
|
|
7453
7530
|
...own,
|
|
@@ -7474,9 +7551,9 @@ window.Aura = (() => {
|
|
|
7474
7551
|
st[1](t.id);
|
|
7475
7552
|
}
|
|
7476
7553
|
},
|
|
7477
|
-
t.icon ? /* @__PURE__ */
|
|
7554
|
+
t.icon ? /* @__PURE__ */ React36.createElement(Icon, { name: t.icon }) : null,
|
|
7478
7555
|
t.label,
|
|
7479
|
-
t.count != null ? /* @__PURE__ */
|
|
7556
|
+
t.count != null ? /* @__PURE__ */ React36.createElement("span", { className: "aura-tab__count" }, t.count) : null
|
|
7480
7557
|
);
|
|
7481
7558
|
})
|
|
7482
7559
|
), props.keepMounted ? (
|
|
@@ -7484,7 +7561,7 @@ window.Aura = (() => {
|
|
|
7484
7561
|
items2.map(function(t) {
|
|
7485
7562
|
if (t.content === void 0) return null;
|
|
7486
7563
|
const on = current2 && t.id === current2.id;
|
|
7487
|
-
return /* @__PURE__ */
|
|
7564
|
+
return /* @__PURE__ */ React36.createElement(
|
|
7488
7565
|
"div",
|
|
7489
7566
|
{
|
|
7490
7567
|
key: t.id,
|
|
@@ -7498,7 +7575,7 @@ window.Aura = (() => {
|
|
|
7498
7575
|
t.content
|
|
7499
7576
|
);
|
|
7500
7577
|
})
|
|
7501
|
-
) : current2 && current2.content !== void 0 ? /* @__PURE__ */
|
|
7578
|
+
) : current2 && current2.content !== void 0 ? /* @__PURE__ */ React36.createElement(
|
|
7502
7579
|
"div",
|
|
7503
7580
|
{
|
|
7504
7581
|
role: "tabpanel",
|
|
@@ -7512,14 +7589,14 @@ window.Aura = (() => {
|
|
|
7512
7589
|
});
|
|
7513
7590
|
|
|
7514
7591
|
// src/SideNav.tsx
|
|
7515
|
-
var
|
|
7592
|
+
var React37 = __toESM(require_react(), 1);
|
|
7516
7593
|
var import_react_dom11 = __toESM(require_react_dom(), 1);
|
|
7517
7594
|
function contains(it, id) {
|
|
7518
7595
|
return !!id && !!it.children && it.children.some(function(c) {
|
|
7519
7596
|
return c.id === id || contains(c, id);
|
|
7520
7597
|
});
|
|
7521
7598
|
}
|
|
7522
|
-
var SideNav =
|
|
7599
|
+
var SideNav = React37.forwardRef(function SideNav2(props, ref) {
|
|
7523
7600
|
const t = useStrings();
|
|
7524
7601
|
const Link = useLinkComponent(props.linkComponent);
|
|
7525
7602
|
const base = uid();
|
|
@@ -7531,14 +7608,14 @@ window.Aura = (() => {
|
|
|
7531
7608
|
const active = st[0];
|
|
7532
7609
|
const col = useMaybeControlled(props.collapsed, !!props.defaultCollapsed, props.onCollapsedChange);
|
|
7533
7610
|
const collapsed = col[0];
|
|
7534
|
-
const tipState =
|
|
7535
|
-
|
|
7611
|
+
const tipState = React37.useState(null), tip2 = tipState[0], setTip = tipState[1];
|
|
7612
|
+
React37.useEffect(
|
|
7536
7613
|
function() {
|
|
7537
7614
|
if (!collapsed) setTip(null);
|
|
7538
7615
|
},
|
|
7539
7616
|
[collapsed]
|
|
7540
7617
|
);
|
|
7541
|
-
|
|
7618
|
+
React37.useEffect(
|
|
7542
7619
|
function() {
|
|
7543
7620
|
if (!tip2) return;
|
|
7544
7621
|
function esc(e) {
|
|
@@ -7563,12 +7640,12 @@ window.Aura = (() => {
|
|
|
7563
7640
|
return { onMouseEnter: show3, onFocus: show3, onMouseLeave: hide2, onBlur: hide2 };
|
|
7564
7641
|
}
|
|
7565
7642
|
const sections = props.sections || [{ items: props.items || [] }];
|
|
7566
|
-
const openState =
|
|
7643
|
+
const openState = React37.useState({}), toggled = openState[0], setToggled = openState[1];
|
|
7567
7644
|
function isOpen(it) {
|
|
7568
7645
|
if (toggled[it.id] != null) return toggled[it.id];
|
|
7569
7646
|
return !!it.defaultOpen || contains(it, active);
|
|
7570
7647
|
}
|
|
7571
|
-
|
|
7648
|
+
React37.useEffect(
|
|
7572
7649
|
function() {
|
|
7573
7650
|
if (!active) return;
|
|
7574
7651
|
const next = {};
|
|
@@ -7590,7 +7667,7 @@ window.Aura = (() => {
|
|
|
7590
7667
|
},
|
|
7591
7668
|
[active]
|
|
7592
7669
|
);
|
|
7593
|
-
const navRef =
|
|
7670
|
+
const navRef = React37.useRef(null);
|
|
7594
7671
|
function onKeyDown(e) {
|
|
7595
7672
|
const k = e.key;
|
|
7596
7673
|
if (k !== "ArrowDown" && k !== "ArrowUp" && k !== "Home" && k !== "End") return;
|
|
@@ -7609,12 +7686,12 @@ window.Aura = (() => {
|
|
|
7609
7686
|
function inner(it, group, open) {
|
|
7610
7687
|
const marked = it.count != null && it.count > 0 || it.badge != null;
|
|
7611
7688
|
return [
|
|
7612
|
-
it.icon ? /* @__PURE__ */
|
|
7613
|
-
collapsed && marked ? /* @__PURE__ */
|
|
7614
|
-
/* @__PURE__ */
|
|
7615
|
-
it.badge != null ? /* @__PURE__ */
|
|
7616
|
-
it.count != null ? /* @__PURE__ */
|
|
7617
|
-
group ? /* @__PURE__ */
|
|
7689
|
+
it.icon ? /* @__PURE__ */ React37.createElement(Icon, { key: "i", name: it.icon }) : collapsed ? /* @__PURE__ */ React37.createElement("span", { key: "i", className: "aura-nav__initial", "aria-hidden": "true" }, it.label.charAt(0)) : null,
|
|
7690
|
+
collapsed && marked ? /* @__PURE__ */ React37.createElement("span", { key: "d", className: "aura-nav__dot", "aria-hidden": "true" }) : null,
|
|
7691
|
+
/* @__PURE__ */ React37.createElement("span", { key: "l", className: "aura-nav__label" }, it.label),
|
|
7692
|
+
it.badge != null ? /* @__PURE__ */ React37.createElement("span", { key: "b", className: "aura-nav__badge" }, it.badge) : null,
|
|
7693
|
+
it.count != null ? /* @__PURE__ */ React37.createElement("span", { key: "c", className: "aura-nav__count" }, it.count) : null,
|
|
7694
|
+
group ? /* @__PURE__ */ React37.createElement(Icon, { key: "g", name: /* @__PURE__ */ React37.createElement(IconChevronDown, null), className: cx("aura-nav__chevron", open && "is-open") }) : null
|
|
7618
7695
|
];
|
|
7619
7696
|
}
|
|
7620
7697
|
function item(it, depth) {
|
|
@@ -7622,7 +7699,7 @@ window.Aura = (() => {
|
|
|
7622
7699
|
const open = !collapsed && isOpen(it);
|
|
7623
7700
|
const listId = base + "-" + it.id;
|
|
7624
7701
|
const holdsActive = contains(it, active);
|
|
7625
|
-
return /* @__PURE__ */
|
|
7702
|
+
return /* @__PURE__ */ React37.createElement("li", { key: it.id, className: "aura-nav__group" }, /* @__PURE__ */ React37.createElement(
|
|
7626
7703
|
"button",
|
|
7627
7704
|
{
|
|
7628
7705
|
type: "button",
|
|
@@ -7651,7 +7728,7 @@ window.Aura = (() => {
|
|
|
7651
7728
|
}
|
|
7652
7729
|
},
|
|
7653
7730
|
inner(it, true, open)
|
|
7654
|
-
), /* @__PURE__ */
|
|
7731
|
+
), /* @__PURE__ */ React37.createElement("ul", { id: listId, className: "aura-nav__list aura-nav__sub", hidden: !open }, it.children.map(function(c) {
|
|
7655
7732
|
return item(c, depth + 1);
|
|
7656
7733
|
})));
|
|
7657
7734
|
}
|
|
@@ -7670,9 +7747,9 @@ window.Aura = (() => {
|
|
|
7670
7747
|
if (action && props.onAction) props.onAction(it.id);
|
|
7671
7748
|
}
|
|
7672
7749
|
};
|
|
7673
|
-
return /* @__PURE__ */
|
|
7750
|
+
return /* @__PURE__ */ React37.createElement("li", { key: it.id }, it.href ? /* @__PURE__ */ React37.createElement(Link, { href: it.href, ...common }, inner(it, false, false)) : /* @__PURE__ */ React37.createElement("button", { type: "button", ...common }, inner(it, false, false)));
|
|
7674
7751
|
}
|
|
7675
|
-
return /* @__PURE__ */
|
|
7752
|
+
return /* @__PURE__ */ React37.createElement(
|
|
7676
7753
|
"nav",
|
|
7677
7754
|
{
|
|
7678
7755
|
ref: function(el) {
|
|
@@ -7692,14 +7769,14 @@ window.Aura = (() => {
|
|
|
7692
7769
|
"aria-label": props.label || t.mainNav,
|
|
7693
7770
|
onKeyDown
|
|
7694
7771
|
},
|
|
7695
|
-
props.header ? /* @__PURE__ */
|
|
7696
|
-
/* @__PURE__ */
|
|
7697
|
-
return /* @__PURE__ */
|
|
7772
|
+
props.header ? /* @__PURE__ */ React37.createElement("div", { className: "aura-nav__header" }, props.header) : null,
|
|
7773
|
+
/* @__PURE__ */ React37.createElement("div", { className: "aura-nav__scroll" }, sections.map(function(s, i) {
|
|
7774
|
+
return /* @__PURE__ */ React37.createElement("div", { key: i, className: "aura-nav__section" }, s.title ? /* @__PURE__ */ React37.createElement("p", { className: "aura-nav__title" }, s.title) : null, /* @__PURE__ */ React37.createElement("ul", { className: "aura-nav__list" }, s.items.map(function(it) {
|
|
7698
7775
|
return item(it, 0);
|
|
7699
7776
|
})));
|
|
7700
7777
|
})),
|
|
7701
|
-
props.footer ? /* @__PURE__ */
|
|
7702
|
-
props.collapsible && props.collapseToggle === "row" ? /* @__PURE__ */
|
|
7778
|
+
props.footer ? /* @__PURE__ */ React37.createElement("div", { className: "aura-nav__footer" }, props.footer) : null,
|
|
7779
|
+
props.collapsible && props.collapseToggle === "row" ? /* @__PURE__ */ React37.createElement("div", { className: "aura-nav__toggle aura-nav__toggle--row" }, /* @__PURE__ */ React37.createElement(
|
|
7703
7780
|
"button",
|
|
7704
7781
|
{
|
|
7705
7782
|
type: "button",
|
|
@@ -7710,12 +7787,12 @@ window.Aura = (() => {
|
|
|
7710
7787
|
col[1](!collapsed);
|
|
7711
7788
|
}
|
|
7712
7789
|
},
|
|
7713
|
-
/* @__PURE__ */
|
|
7714
|
-
/* @__PURE__ */
|
|
7715
|
-
)) : props.collapsible ? /* @__PURE__ */
|
|
7790
|
+
/* @__PURE__ */ React37.createElement(Icon, { name: collapsed ? /* @__PURE__ */ React37.createElement(IconPanelLeftOpen, null) : /* @__PURE__ */ React37.createElement(IconPanelLeftClose, null) }),
|
|
7791
|
+
/* @__PURE__ */ React37.createElement("span", { className: "aura-nav__label" }, collapsed ? t.expandNav : t.collapseNav)
|
|
7792
|
+
)) : props.collapsible ? /* @__PURE__ */ React37.createElement("div", { className: "aura-nav__toggle" }, /* @__PURE__ */ React37.createElement(
|
|
7716
7793
|
IconButton,
|
|
7717
7794
|
{
|
|
7718
|
-
icon: collapsed ? /* @__PURE__ */
|
|
7795
|
+
icon: collapsed ? /* @__PURE__ */ React37.createElement(IconPanelLeftOpen, null) : /* @__PURE__ */ React37.createElement(IconPanelLeftClose, null),
|
|
7719
7796
|
label: collapsed ? t.expandNav : t.collapseNav,
|
|
7720
7797
|
size: "md",
|
|
7721
7798
|
onClick: function() {
|
|
@@ -7725,7 +7802,7 @@ window.Aura = (() => {
|
|
|
7725
7802
|
}
|
|
7726
7803
|
)) : null,
|
|
7727
7804
|
tip2 && typeof document !== "undefined" ? (0, import_react_dom11.createPortal)(
|
|
7728
|
-
/* @__PURE__ */
|
|
7805
|
+
/* @__PURE__ */ React37.createElement(
|
|
7729
7806
|
"div",
|
|
7730
7807
|
{
|
|
7731
7808
|
className: "aura-tooltip aura-tooltip--right",
|
|
@@ -7740,8 +7817,8 @@ window.Aura = (() => {
|
|
|
7740
7817
|
});
|
|
7741
7818
|
|
|
7742
7819
|
// src/Breadcrumb.tsx
|
|
7743
|
-
var
|
|
7744
|
-
var Breadcrumb =
|
|
7820
|
+
var React38 = __toESM(require_react(), 1);
|
|
7821
|
+
var Breadcrumb = React38.forwardRef(function Breadcrumb2(props, ref) {
|
|
7745
7822
|
const t = useStrings();
|
|
7746
7823
|
const Link = useLinkComponent(props.linkComponent);
|
|
7747
7824
|
const items2 = props.items || [];
|
|
@@ -7749,12 +7826,12 @@ window.Aura = (() => {
|
|
|
7749
7826
|
const trail = items2.map(function(it) {
|
|
7750
7827
|
return it.label + "" + (it.href || "");
|
|
7751
7828
|
}).join("");
|
|
7752
|
-
const st =
|
|
7829
|
+
const st = React38.useState(null), expanded = st[0] === trail, setExpanded = function() {
|
|
7753
7830
|
st[1](trail);
|
|
7754
7831
|
};
|
|
7755
|
-
const listRef =
|
|
7756
|
-
const focusNext =
|
|
7757
|
-
|
|
7832
|
+
const listRef = React38.useRef(null);
|
|
7833
|
+
const focusNext = React38.useRef(false);
|
|
7834
|
+
React38.useEffect(
|
|
7758
7835
|
function() {
|
|
7759
7836
|
if (!expanded || !focusNext.current) return;
|
|
7760
7837
|
focusNext.current = false;
|
|
@@ -7769,8 +7846,8 @@ window.Aura = (() => {
|
|
|
7769
7846
|
},
|
|
7770
7847
|
[expanded]
|
|
7771
7848
|
);
|
|
7772
|
-
const sep = /* @__PURE__ */
|
|
7773
|
-
const more = collapsible && !expanded ? /* @__PURE__ */
|
|
7849
|
+
const sep = /* @__PURE__ */ React38.createElement(Icon, { name: /* @__PURE__ */ React38.createElement(IconChevronRight, null), size: 12, className: "aura-crumbs__sep" });
|
|
7850
|
+
const more = collapsible && !expanded ? /* @__PURE__ */ React38.createElement("li", { key: "more", className: "aura-crumbs__more" }, /* @__PURE__ */ React38.createElement(
|
|
7774
7851
|
"button",
|
|
7775
7852
|
{
|
|
7776
7853
|
type: "button",
|
|
@@ -7793,23 +7870,23 @@ window.Aura = (() => {
|
|
|
7793
7870
|
if (it.onClick) it.onClick();
|
|
7794
7871
|
} : void 0;
|
|
7795
7872
|
out.push(
|
|
7796
|
-
/* @__PURE__ */
|
|
7873
|
+
/* @__PURE__ */ React38.createElement(
|
|
7797
7874
|
"li",
|
|
7798
7875
|
{
|
|
7799
7876
|
key: i,
|
|
7800
7877
|
...it.itemProps,
|
|
7801
7878
|
className: cx(it.itemProps && it.itemProps.className, collapsible && !last && i > 0 && "aura-crumbs__middle") || void 0
|
|
7802
7879
|
},
|
|
7803
|
-
last ? /* @__PURE__ */
|
|
7880
|
+
last ? /* @__PURE__ */ React38.createElement("span", { ...plain, "aria-current": "page", className: cx("aura-crumbs__current", lp.className) }, it.label) : it.href ? /* @__PURE__ */ React38.createElement(Link, { ...lp, href: it.href, onClick: click }, it.label) : it.onClick ? /* @__PURE__ */ React38.createElement("button", { ...lp, type: "button", onClick: click }, it.label) : (
|
|
7804
7881
|
/* 5.7: a segment with no page and no action is text, not a button that does nothing. */
|
|
7805
|
-
/* @__PURE__ */
|
|
7882
|
+
/* @__PURE__ */ React38.createElement("span", { ...plain, className: cx("aura-crumbs__text", lp.className) }, it.label)
|
|
7806
7883
|
),
|
|
7807
7884
|
last ? null : sep
|
|
7808
7885
|
)
|
|
7809
7886
|
);
|
|
7810
7887
|
if (i === 0 && more) out.push(more);
|
|
7811
7888
|
});
|
|
7812
|
-
return /* @__PURE__ */
|
|
7889
|
+
return /* @__PURE__ */ React38.createElement(
|
|
7813
7890
|
"nav",
|
|
7814
7891
|
{
|
|
7815
7892
|
ref,
|
|
@@ -7820,27 +7897,27 @@ window.Aura = (() => {
|
|
|
7820
7897
|
props.className
|
|
7821
7898
|
)
|
|
7822
7899
|
},
|
|
7823
|
-
/* @__PURE__ */
|
|
7900
|
+
/* @__PURE__ */ React38.createElement("ol", { ref: listRef }, out)
|
|
7824
7901
|
);
|
|
7825
7902
|
});
|
|
7826
7903
|
|
|
7827
7904
|
// src/Avatar.tsx
|
|
7828
|
-
var
|
|
7829
|
-
var Avatar =
|
|
7830
|
-
const errState =
|
|
7905
|
+
var React39 = __toESM(require_react(), 1);
|
|
7906
|
+
var Avatar = React39.forwardRef(function Avatar2(props, ref) {
|
|
7907
|
+
const errState = React39.useState(null);
|
|
7831
7908
|
return avatarElement(props, ref, errState[0], function() {
|
|
7832
7909
|
errState[1](props.src || null);
|
|
7833
7910
|
});
|
|
7834
7911
|
});
|
|
7835
7912
|
|
|
7836
7913
|
// src/Stack.tsx
|
|
7837
|
-
var
|
|
7914
|
+
var React41 = __toESM(require_react(), 1);
|
|
7838
7915
|
|
|
7839
7916
|
// src/responsive.tsx
|
|
7840
|
-
var
|
|
7917
|
+
var React40 = __toESM(require_react(), 1);
|
|
7841
7918
|
var ORDER2 = ["base", "sm", "md", "lg", "xl"];
|
|
7842
7919
|
function useBreakpoint() {
|
|
7843
|
-
return
|
|
7920
|
+
return React40.useSyncExternalStore(subscribe, current, function() {
|
|
7844
7921
|
return "lg";
|
|
7845
7922
|
});
|
|
7846
7923
|
}
|
|
@@ -7866,8 +7943,8 @@ window.Aura = (() => {
|
|
|
7866
7943
|
}
|
|
7867
7944
|
|
|
7868
7945
|
// src/Stack.tsx
|
|
7869
|
-
var h5 =
|
|
7870
|
-
var Stack =
|
|
7946
|
+
var h5 = React41.createElement;
|
|
7947
|
+
var Stack = React41.forwardRef(function Stack2(props, ref) {
|
|
7871
7948
|
const style = Object.assign(
|
|
7872
7949
|
{},
|
|
7873
7950
|
respVars("aura-stack-dir", props.direction || "column"),
|
|
@@ -7881,9 +7958,9 @@ window.Aura = (() => {
|
|
|
7881
7958
|
});
|
|
7882
7959
|
|
|
7883
7960
|
// src/Grid.tsx
|
|
7884
|
-
var
|
|
7885
|
-
var h6 =
|
|
7886
|
-
var Grid =
|
|
7961
|
+
var React42 = __toESM(require_react(), 1);
|
|
7962
|
+
var h6 = React42.createElement;
|
|
7963
|
+
var Grid = React42.forwardRef(function Grid2(props, ref) {
|
|
7887
7964
|
const style = Object.assign(
|
|
7888
7965
|
{},
|
|
7889
7966
|
respVars("aura-grid-gap", props.gap == null ? 6 : props.gap, space),
|
|
@@ -7898,9 +7975,9 @@ window.Aura = (() => {
|
|
|
7898
7975
|
});
|
|
7899
7976
|
|
|
7900
7977
|
// src/Container.tsx
|
|
7901
|
-
var
|
|
7902
|
-
var h7 =
|
|
7903
|
-
var Container =
|
|
7978
|
+
var React43 = __toESM(require_react(), 1);
|
|
7979
|
+
var h7 = React43.createElement;
|
|
7980
|
+
var Container = React43.forwardRef(function Container2(props, ref) {
|
|
7904
7981
|
const attrs2 = {};
|
|
7905
7982
|
Object.keys(props).forEach(function(k) {
|
|
7906
7983
|
if (k === "id" || k === "lang" || k === "dir" || /^(aria|data)-/.test(k))
|
|
@@ -7923,11 +8000,11 @@ window.Aura = (() => {
|
|
|
7923
8000
|
});
|
|
7924
8001
|
|
|
7925
8002
|
// src/PageHeaderClient.tsx
|
|
7926
|
-
var
|
|
8003
|
+
var React45 = __toESM(require_react(), 1);
|
|
7927
8004
|
|
|
7928
8005
|
// src/PageHeader.tsx
|
|
7929
|
-
var
|
|
7930
|
-
var h8 =
|
|
8006
|
+
var React44 = __toESM(require_react(), 1);
|
|
8007
|
+
var h8 = React44.createElement;
|
|
7931
8008
|
var LAZY = Symbol.for("react.lazy");
|
|
7932
8009
|
function chipsOnly(node) {
|
|
7933
8010
|
let el = 0;
|
|
@@ -7946,8 +8023,8 @@ window.Aura = (() => {
|
|
|
7946
8023
|
}
|
|
7947
8024
|
return walk(value);
|
|
7948
8025
|
}
|
|
7949
|
-
if (
|
|
7950
|
-
if (n3.type ===
|
|
8026
|
+
if (React44.isValidElement(n3)) {
|
|
8027
|
+
if (n3.type === React44.Fragment) return walk(n3.props.children);
|
|
7951
8028
|
el++;
|
|
7952
8029
|
return true;
|
|
7953
8030
|
}
|
|
@@ -7955,7 +8032,7 @@ window.Aura = (() => {
|
|
|
7955
8032
|
};
|
|
7956
8033
|
return walk(node) && el > 0;
|
|
7957
8034
|
}
|
|
7958
|
-
var PageHeader =
|
|
8035
|
+
var PageHeader = React44.forwardRef(function PageHeader2(props, ref) {
|
|
7959
8036
|
const attrs2 = {};
|
|
7960
8037
|
Object.keys(props).forEach(function(k) {
|
|
7961
8038
|
if (k === "id" || k === "lang" || k === "dir" || k === "role" || /^(aria|data)-/.test(k))
|
|
@@ -8035,12 +8112,12 @@ window.Aura = (() => {
|
|
|
8035
8112
|
}
|
|
8036
8113
|
return false;
|
|
8037
8114
|
}
|
|
8038
|
-
var PageHeader3 =
|
|
8039
|
-
const own =
|
|
8115
|
+
var PageHeader3 = React45.forwardRef(function PageHeader4(props, ref) {
|
|
8116
|
+
const own = React45.useRef(null);
|
|
8040
8117
|
const merged = useMergedRef(ref, own);
|
|
8041
8118
|
const bar = props.actionsBarBelow;
|
|
8042
8119
|
const hasActions = props.actions != null && props.actions !== false;
|
|
8043
|
-
|
|
8120
|
+
React45.useEffect(
|
|
8044
8121
|
function() {
|
|
8045
8122
|
if (bar !== "sm" && bar !== "md" || !hasActions || !own.current) return;
|
|
8046
8123
|
const el = own.current.querySelector(":scope > .aura-page-header__actions");
|
|
@@ -8079,20 +8156,20 @@ window.Aura = (() => {
|
|
|
8079
8156
|
[bar, hasActions]
|
|
8080
8157
|
);
|
|
8081
8158
|
const focusTitle = !!props.focusTitleOnMount;
|
|
8082
|
-
|
|
8159
|
+
React45.useEffect(function() {
|
|
8083
8160
|
if (!focusTitle || !own.current) return;
|
|
8084
8161
|
const t = own.current.querySelector(".aura-page-header__title");
|
|
8085
8162
|
if (t) t.focus({ preventScroll: true });
|
|
8086
8163
|
}, []);
|
|
8087
|
-
return /* @__PURE__ */
|
|
8164
|
+
return /* @__PURE__ */ React45.createElement(PageHeader, { ...props, ref: merged });
|
|
8088
8165
|
});
|
|
8089
8166
|
|
|
8090
8167
|
// src/StatusTile.tsx
|
|
8091
|
-
var
|
|
8168
|
+
var React47 = __toESM(require_react(), 1);
|
|
8092
8169
|
|
|
8093
8170
|
// src/tiles.tsx
|
|
8094
|
-
var
|
|
8095
|
-
var h9 =
|
|
8171
|
+
var React46 = __toESM(require_react(), 1);
|
|
8172
|
+
var h9 = React46.createElement;
|
|
8096
8173
|
var STATUS_ICON = {
|
|
8097
8174
|
down: IconCircleAlert,
|
|
8098
8175
|
problem: IconTriangleAlert,
|
|
@@ -8184,7 +8261,7 @@ window.Aura = (() => {
|
|
|
8184
8261
|
) : null
|
|
8185
8262
|
);
|
|
8186
8263
|
}
|
|
8187
|
-
var TileGrid =
|
|
8264
|
+
var TileGrid = React46.forwardRef(function TileGrid2(props, ref) {
|
|
8188
8265
|
const style = Object.assign(
|
|
8189
8266
|
{},
|
|
8190
8267
|
respVars("aura-grid-cols", props.columns == null ? { base: 2, md: 3 } : props.columns),
|
|
@@ -8200,16 +8277,16 @@ window.Aura = (() => {
|
|
|
8200
8277
|
}),
|
|
8201
8278
|
/* toArray drops null and booleans and keys each element; a Fragment's children are items too. */
|
|
8202
8279
|
flat(props.children).map(function(c, i) {
|
|
8203
|
-
return h9("li", { key:
|
|
8280
|
+
return h9("li", { key: React46.isValidElement(c) && c.key != null ? c.key : i }, c);
|
|
8204
8281
|
})
|
|
8205
8282
|
);
|
|
8206
8283
|
});
|
|
8207
8284
|
function flat(children) {
|
|
8208
8285
|
const out = [];
|
|
8209
|
-
|
|
8210
|
-
if (
|
|
8286
|
+
React46.Children.toArray(children).forEach(function(c) {
|
|
8287
|
+
if (React46.isValidElement(c) && c.type === React46.Fragment)
|
|
8211
8288
|
flat(c.props.children).forEach(function(x) {
|
|
8212
|
-
out.push(
|
|
8289
|
+
out.push(React46.isValidElement(x) ? React46.cloneElement(x, { key: String(c.key) + "/" + String(x.key) }) : x);
|
|
8213
8290
|
});
|
|
8214
8291
|
else if (c !== "") out.push(c);
|
|
8215
8292
|
});
|
|
@@ -8223,7 +8300,7 @@ window.Aura = (() => {
|
|
|
8223
8300
|
function num(v) {
|
|
8224
8301
|
return typeof v === "number" && isFinite(v) ? v : null;
|
|
8225
8302
|
}
|
|
8226
|
-
var Sparkline =
|
|
8303
|
+
var Sparkline = React46.forwardRef(function Sparkline2(props, ref) {
|
|
8227
8304
|
const wh = SIZES2[props.size || "sm"] || SIZES2.sm;
|
|
8228
8305
|
const W = wh[0], H = wh[1];
|
|
8229
8306
|
const data = (props.data || []).map(num);
|
|
@@ -8297,8 +8374,8 @@ window.Aura = (() => {
|
|
|
8297
8374
|
});
|
|
8298
8375
|
|
|
8299
8376
|
// src/StatusTile.tsx
|
|
8300
|
-
var useIsoLayoutEffect2 = typeof window !== "undefined" ?
|
|
8301
|
-
var StatusTile =
|
|
8377
|
+
var useIsoLayoutEffect2 = typeof window !== "undefined" ? React47.useLayoutEffect : React47.useEffect;
|
|
8378
|
+
var StatusTile = React47.forwardRef(function StatusTile2(props, ref) {
|
|
8302
8379
|
const Link = useLinkComponent(props.linkComponent);
|
|
8303
8380
|
const t = useStrings();
|
|
8304
8381
|
useAutoTip();
|
|
@@ -8307,8 +8384,8 @@ window.Aura = (() => {
|
|
|
8307
8384
|
"status-tile-label",
|
|
8308
8385
|
"StatusTile `aria-label` needs `href`: without a link the tile is a plain box, where a name is not allowed."
|
|
8309
8386
|
);
|
|
8310
|
-
const titleRef =
|
|
8311
|
-
const check =
|
|
8387
|
+
const titleRef = React47.useRef(null);
|
|
8388
|
+
const check = React47.useCallback(function() {
|
|
8312
8389
|
const el = titleRef.current;
|
|
8313
8390
|
if (!el) return;
|
|
8314
8391
|
const cut = el.scrollHeight > el.clientHeight + 1;
|
|
@@ -8318,7 +8395,7 @@ window.Aura = (() => {
|
|
|
8318
8395
|
}, []);
|
|
8319
8396
|
useIsoLayoutEffect2(check, [props.title, check]);
|
|
8320
8397
|
const linked = !!props.href;
|
|
8321
|
-
|
|
8398
|
+
React47.useEffect(
|
|
8322
8399
|
function() {
|
|
8323
8400
|
const el = titleRef.current;
|
|
8324
8401
|
if (!el) return;
|
|
@@ -8343,14 +8420,14 @@ window.Aura = (() => {
|
|
|
8343
8420
|
});
|
|
8344
8421
|
|
|
8345
8422
|
// src/AppShell.tsx
|
|
8346
|
-
var
|
|
8423
|
+
var React49 = __toESM(require_react(), 1);
|
|
8347
8424
|
|
|
8348
8425
|
// src/scrollHide.ts
|
|
8349
|
-
var
|
|
8426
|
+
var React48 = __toESM(require_react(), 1);
|
|
8350
8427
|
var STEP = 8;
|
|
8351
8428
|
function useHideOnScroll(enabled, el, media, from) {
|
|
8352
|
-
const st =
|
|
8353
|
-
|
|
8429
|
+
const st = React48.useState(false), hidden = st[0], setHidden = st[1];
|
|
8430
|
+
React48.useEffect(
|
|
8354
8431
|
function() {
|
|
8355
8432
|
if (!enabled || typeof window === "undefined") {
|
|
8356
8433
|
setHidden(false);
|
|
@@ -8443,32 +8520,32 @@ window.Aura = (() => {
|
|
|
8443
8520
|
function pinned(bar) {
|
|
8444
8521
|
return getComputedStyle(bar).position !== "static";
|
|
8445
8522
|
}
|
|
8446
|
-
var AppShell =
|
|
8523
|
+
var AppShell = React49.forwardRef(function AppShell2(props, ref) {
|
|
8447
8524
|
const t = useStrings();
|
|
8448
8525
|
const bp = useBreakpoint();
|
|
8449
8526
|
const wide = bp === "lg" || bp === "xl";
|
|
8450
|
-
const st =
|
|
8451
|
-
|
|
8527
|
+
const st = React49.useState(false), open = st[0], setOpen = st[1];
|
|
8528
|
+
React49.useEffect(
|
|
8452
8529
|
function() {
|
|
8453
8530
|
if (wide) setOpen(false);
|
|
8454
8531
|
},
|
|
8455
8532
|
[wide]
|
|
8456
8533
|
);
|
|
8457
|
-
const navEl = props.nav &&
|
|
8534
|
+
const navEl = props.nav && React49.isValidElement(props.nav) ? props.nav : null;
|
|
8458
8535
|
const shared = !!navEl && navEl.props.value === void 0 && (navEl.props.defaultValue !== void 0 || navEl.props.sections !== void 0 || navEl.props.items !== void 0);
|
|
8459
|
-
const navState =
|
|
8536
|
+
const navState = React49.useState(navEl ? navEl.props.defaultValue : void 0);
|
|
8460
8537
|
function onNav(id) {
|
|
8461
8538
|
if (shared) navState[1](id);
|
|
8462
8539
|
if (navEl && navEl.props.onChange) navEl.props.onChange(id);
|
|
8463
8540
|
}
|
|
8464
|
-
const rootRef =
|
|
8465
|
-
const barRef =
|
|
8466
|
-
const probeRef =
|
|
8541
|
+
const rootRef = React49.useRef(null);
|
|
8542
|
+
const barRef = React49.useRef(null);
|
|
8543
|
+
const probeRef = React49.useRef(null);
|
|
8467
8544
|
const mergedRef = useMergedRef(ref, rootRef);
|
|
8468
8545
|
const hasBar = !!(props.header || props.nav);
|
|
8469
|
-
const barH =
|
|
8546
|
+
const barH = React49.useState(null);
|
|
8470
8547
|
const away = useHideOnScroll(!!props.headerHideOnScroll && hasBar, barRef, "(max-width: 1023.98px)", barH[0] || 56);
|
|
8471
|
-
const awayRef =
|
|
8548
|
+
const awayRef = React49.useRef(away);
|
|
8472
8549
|
awayRef.current = away;
|
|
8473
8550
|
useIsoLayoutEffect(
|
|
8474
8551
|
function() {
|
|
@@ -8503,8 +8580,8 @@ window.Aura = (() => {
|
|
|
8503
8580
|
},
|
|
8504
8581
|
[hasBar]
|
|
8505
8582
|
);
|
|
8506
|
-
const deskNav = navEl && shared ?
|
|
8507
|
-
const drawerNav = navEl ?
|
|
8583
|
+
const deskNav = navEl && shared ? React49.cloneElement(navEl, { value: navState[0], onChange: onNav }) : props.nav;
|
|
8584
|
+
const drawerNav = navEl ? React49.cloneElement(navEl, {
|
|
8508
8585
|
value: shared ? navState[0] : navEl.props.value,
|
|
8509
8586
|
onChange: function(id) {
|
|
8510
8587
|
onNav(id);
|
|
@@ -8519,7 +8596,7 @@ window.Aura = (() => {
|
|
|
8519
8596
|
collapsed: false,
|
|
8520
8597
|
collapsible: false
|
|
8521
8598
|
}) : props.nav;
|
|
8522
|
-
return /* @__PURE__ */
|
|
8599
|
+
return /* @__PURE__ */ React49.createElement(
|
|
8523
8600
|
"div",
|
|
8524
8601
|
{
|
|
8525
8602
|
ref: mergedRef,
|
|
@@ -8534,8 +8611,8 @@ window.Aura = (() => {
|
|
|
8534
8611
|
props.className
|
|
8535
8612
|
)
|
|
8536
8613
|
},
|
|
8537
|
-
props.nav ? /* @__PURE__ */
|
|
8538
|
-
props.nav ? /* @__PURE__ */
|
|
8614
|
+
props.nav ? /* @__PURE__ */ React49.createElement("div", { className: "aura-shell__nav" }, deskNav) : null,
|
|
8615
|
+
props.nav ? /* @__PURE__ */ React49.createElement(
|
|
8539
8616
|
Drawer,
|
|
8540
8617
|
{
|
|
8541
8618
|
open,
|
|
@@ -8552,7 +8629,7 @@ window.Aura = (() => {
|
|
|
8552
8629
|
},
|
|
8553
8630
|
drawerNav
|
|
8554
8631
|
) : null,
|
|
8555
|
-
/* @__PURE__ */
|
|
8632
|
+
/* @__PURE__ */ React49.createElement("div", { className: "aura-shell__main" }, props.header || props.nav ? /* @__PURE__ */ React49.createElement(
|
|
8556
8633
|
"header",
|
|
8557
8634
|
{
|
|
8558
8635
|
ref: barRef,
|
|
@@ -8564,11 +8641,11 @@ window.Aura = (() => {
|
|
|
8564
8641
|
away && "is-away"
|
|
8565
8642
|
)
|
|
8566
8643
|
},
|
|
8567
|
-
props.nav ? /* @__PURE__ */
|
|
8644
|
+
props.nav ? /* @__PURE__ */ React49.createElement(
|
|
8568
8645
|
IconButton,
|
|
8569
8646
|
{
|
|
8570
8647
|
className: "aura-shell__menu",
|
|
8571
|
-
icon: /* @__PURE__ */
|
|
8648
|
+
icon: /* @__PURE__ */ React49.createElement(IconMenu, null),
|
|
8572
8649
|
label: props.menuLabel || t.openNav,
|
|
8573
8650
|
size: "md",
|
|
8574
8651
|
touchHeight: true,
|
|
@@ -8578,9 +8655,9 @@ window.Aura = (() => {
|
|
|
8578
8655
|
"aria-expanded": open
|
|
8579
8656
|
}
|
|
8580
8657
|
) : null,
|
|
8581
|
-
/* @__PURE__ */
|
|
8582
|
-
/* @__PURE__ */
|
|
8583
|
-
) : null, /* @__PURE__ */
|
|
8658
|
+
/* @__PURE__ */ React49.createElement("div", { className: "aura-shell__bar-content" }, props.header),
|
|
8659
|
+
/* @__PURE__ */ React49.createElement("span", { className: "aura-shell__probe", "aria-hidden": "true", ref: probeRef })
|
|
8660
|
+
) : null, /* @__PURE__ */ React49.createElement(
|
|
8584
8661
|
"main",
|
|
8585
8662
|
{
|
|
8586
8663
|
className: cx("aura-shell__content", props.contentPadding === false && "is-flush"),
|
|
@@ -8593,17 +8670,17 @@ window.Aura = (() => {
|
|
|
8593
8670
|
});
|
|
8594
8671
|
|
|
8595
8672
|
// src/ActionBar.tsx
|
|
8596
|
-
var
|
|
8597
|
-
var ActionBar =
|
|
8673
|
+
var React50 = __toESM(require_react(), 1);
|
|
8674
|
+
var ActionBar = React50.forwardRef(function ActionBar2(props, ref) {
|
|
8598
8675
|
const t = useStrings();
|
|
8599
8676
|
const bulk = props.selected != null;
|
|
8600
8677
|
const idle = bulk && !props.selected;
|
|
8601
8678
|
const count = bulk && props.selected ? t.selectedCount(props.selected) : null;
|
|
8602
|
-
const hasStart =
|
|
8679
|
+
const hasStart = React50.Children.toArray(props.start).some(function(c) {
|
|
8603
8680
|
return c !== "";
|
|
8604
8681
|
});
|
|
8605
|
-
const cameFrom =
|
|
8606
|
-
const own =
|
|
8682
|
+
const cameFrom = React50.useRef(null);
|
|
8683
|
+
const own = React50.useRef(null);
|
|
8607
8684
|
function clear() {
|
|
8608
8685
|
props.onClearSelection();
|
|
8609
8686
|
setTimeout(function() {
|
|
@@ -8612,7 +8689,7 @@ window.Aura = (() => {
|
|
|
8612
8689
|
if ((!a || a === document.body || !a.isConnected) && back && back.isConnected) back.focus();
|
|
8613
8690
|
}, 0);
|
|
8614
8691
|
}
|
|
8615
|
-
return /* @__PURE__ */
|
|
8692
|
+
return /* @__PURE__ */ React50.createElement(
|
|
8616
8693
|
"div",
|
|
8617
8694
|
{
|
|
8618
8695
|
ref: function(el) {
|
|
@@ -8634,16 +8711,16 @@ window.Aura = (() => {
|
|
|
8634
8711
|
props.className
|
|
8635
8712
|
)
|
|
8636
8713
|
},
|
|
8637
|
-
/* @__PURE__ */
|
|
8714
|
+
/* @__PURE__ */ React50.createElement("div", { className: cx("aura-actionbar__inner", hasStart && "has-start") }, /* @__PURE__ */ React50.createElement("div", { className: "aura-actionbar__status", role: "status" }, count, count && props.status ? " \xB7 " : null, props.status), !idle && hasStart ? /* @__PURE__ */ React50.createElement("div", { className: "aura-actionbar__start" }, props.start) : null, !idle ? /* @__PURE__ */ React50.createElement("div", { className: "aura-actionbar__actions" }, count && props.onClearSelection ? /* @__PURE__ */ React50.createElement(Button, { variant: "ghost", size: "sm", touchHeight: props.touchHeight, onClick: clear }, t.clear()) : null, props.children) : null)
|
|
8638
8715
|
);
|
|
8639
8716
|
});
|
|
8640
8717
|
|
|
8641
8718
|
// src/Separator.tsx
|
|
8642
|
-
var
|
|
8643
|
-
var Separator =
|
|
8719
|
+
var React51 = __toESM(require_react(), 1);
|
|
8720
|
+
var Separator = React51.forwardRef(function Separator2(props, ref) {
|
|
8644
8721
|
const vertical = props.orientation === "vertical";
|
|
8645
8722
|
const decorative = props.decorative !== false;
|
|
8646
|
-
return /* @__PURE__ */
|
|
8723
|
+
return /* @__PURE__ */ React51.createElement(
|
|
8647
8724
|
"div",
|
|
8648
8725
|
{
|
|
8649
8726
|
ref,
|
|
@@ -8656,13 +8733,13 @@ window.Aura = (() => {
|
|
|
8656
8733
|
});
|
|
8657
8734
|
|
|
8658
8735
|
// src/Table.tsx
|
|
8659
|
-
var
|
|
8736
|
+
var React53 = __toESM(require_react(), 1);
|
|
8660
8737
|
|
|
8661
8738
|
// src/TableSkeleton.tsx
|
|
8662
|
-
var
|
|
8663
|
-
var h10 =
|
|
8739
|
+
var React52 = __toESM(require_react(), 1);
|
|
8740
|
+
var h10 = React52.createElement;
|
|
8664
8741
|
function inertProps() {
|
|
8665
|
-
return { inert: parseInt(
|
|
8742
|
+
return { inert: parseInt(React52.version, 10) >= 19 ? true : "", "aria-hidden": true };
|
|
8666
8743
|
}
|
|
8667
8744
|
function widthOf(w) {
|
|
8668
8745
|
return w == null || w === "" ? void 0 : typeof w === "number" ? w + "px" : w;
|
|
@@ -8820,12 +8897,12 @@ window.Aura = (() => {
|
|
|
8820
8897
|
}
|
|
8821
8898
|
|
|
8822
8899
|
// src/Table.tsx
|
|
8823
|
-
var StackLabels =
|
|
8824
|
-
var ColumnIndex =
|
|
8900
|
+
var StackLabels = React53.createContext(null);
|
|
8901
|
+
var ColumnIndex = React53.createContext(-1);
|
|
8825
8902
|
function flat2(children) {
|
|
8826
8903
|
const out = [];
|
|
8827
|
-
|
|
8828
|
-
if (
|
|
8904
|
+
React53.Children.toArray(children).forEach(function(c) {
|
|
8905
|
+
if (React53.isValidElement(c) && c.type === React53.Fragment)
|
|
8829
8906
|
out.push.apply(out, flat2(c.props.children));
|
|
8830
8907
|
else out.push(c);
|
|
8831
8908
|
});
|
|
@@ -8839,7 +8916,7 @@ window.Aura = (() => {
|
|
|
8839
8916
|
});
|
|
8840
8917
|
return parts.length ? parts.join("") : void 0;
|
|
8841
8918
|
}
|
|
8842
|
-
if (
|
|
8919
|
+
if (React53.isValidElement(node)) {
|
|
8843
8920
|
const p = node.props;
|
|
8844
8921
|
if (p["aria-hidden"] === true || p["aria-hidden"] === "true") return void 0;
|
|
8845
8922
|
return text(p.children);
|
|
@@ -8849,13 +8926,13 @@ window.Aura = (() => {
|
|
|
8849
8926
|
function headerLabels(children) {
|
|
8850
8927
|
let out = [];
|
|
8851
8928
|
flat2(children).forEach(function(c) {
|
|
8852
|
-
if (out.length || !
|
|
8929
|
+
if (out.length || !React53.isValidElement(c) || c.type !== THead) return;
|
|
8853
8930
|
const row = flat2(c.props.children).find(function(r2) {
|
|
8854
|
-
return
|
|
8931
|
+
return React53.isValidElement(r2);
|
|
8855
8932
|
});
|
|
8856
8933
|
if (!row) return;
|
|
8857
8934
|
flat2(row.props.children).forEach(function(cell) {
|
|
8858
|
-
if (!
|
|
8935
|
+
if (!React53.isValidElement(cell)) return;
|
|
8859
8936
|
const p = cell.props;
|
|
8860
8937
|
const t = text(p.children);
|
|
8861
8938
|
const label = p.label != null ? p.label : t != null ? t.replace(/\s+/g, " ").trim() || void 0 : void 0;
|
|
@@ -8868,13 +8945,13 @@ window.Aura = (() => {
|
|
|
8868
8945
|
function headerColumns(children) {
|
|
8869
8946
|
const out = [];
|
|
8870
8947
|
flat2(children).forEach(function(c) {
|
|
8871
|
-
if (out.length || !
|
|
8948
|
+
if (out.length || !React53.isValidElement(c) || c.type !== THead) return;
|
|
8872
8949
|
const row = flat2(c.props.children).find(function(r2) {
|
|
8873
|
-
return
|
|
8950
|
+
return React53.isValidElement(r2);
|
|
8874
8951
|
});
|
|
8875
8952
|
if (!row) return;
|
|
8876
8953
|
flat2(row.props.children).forEach(function(cell) {
|
|
8877
|
-
if (!
|
|
8954
|
+
if (!React53.isValidElement(cell)) return;
|
|
8878
8955
|
const p = cell.props;
|
|
8879
8956
|
const t = text(p.children);
|
|
8880
8957
|
const style = p.style;
|
|
@@ -8892,7 +8969,7 @@ window.Aura = (() => {
|
|
|
8892
8969
|
});
|
|
8893
8970
|
return out;
|
|
8894
8971
|
}
|
|
8895
|
-
var Table =
|
|
8972
|
+
var Table = React53.forwardRef(function Table2(props, ref) {
|
|
8896
8973
|
const {
|
|
8897
8974
|
caption,
|
|
8898
8975
|
captionHidden,
|
|
@@ -8920,7 +8997,7 @@ window.Aura = (() => {
|
|
|
8920
8997
|
);
|
|
8921
8998
|
const shownChildren = skeletonCols ? [
|
|
8922
8999
|
flat2(children).filter(function(c) {
|
|
8923
|
-
return
|
|
9000
|
+
return React53.isValidElement(c) && c.type === THead;
|
|
8924
9001
|
}),
|
|
8925
9002
|
skeletonBody(skeletonCols, loadingRows != null ? Math.max(0, loadingRows) : 5, !!stackBelow)
|
|
8926
9003
|
] : children;
|
|
@@ -8936,12 +9013,12 @@ window.Aura = (() => {
|
|
|
8936
9013
|
"tbl-stack-labels",
|
|
8937
9014
|
"Table stackBelow: no THead > Tr > Th found among its children, so cells have no labels. Pass `label` on each Td."
|
|
8938
9015
|
);
|
|
8939
|
-
const outer =
|
|
9016
|
+
const outer = React53.useContext(StackLabels);
|
|
8940
9017
|
const pageDensity = useDensity();
|
|
8941
9018
|
const capId = uid();
|
|
8942
|
-
const wrap =
|
|
8943
|
-
const sc =
|
|
8944
|
-
const wide =
|
|
9019
|
+
const wrap = React53.useRef(null);
|
|
9020
|
+
const sc = React53.useState(false), scrolls = sc[0];
|
|
9021
|
+
const wide = React53.useState(false);
|
|
8945
9022
|
useIsoLayoutEffect(function() {
|
|
8946
9023
|
const el = wrap.current;
|
|
8947
9024
|
if (!el || typeof ResizeObserver === "undefined") return;
|
|
@@ -8958,7 +9035,7 @@ window.Aura = (() => {
|
|
|
8958
9035
|
ro.disconnect();
|
|
8959
9036
|
};
|
|
8960
9037
|
}, []);
|
|
8961
|
-
const table = /* @__PURE__ */
|
|
9038
|
+
const table = /* @__PURE__ */ React53.createElement(
|
|
8962
9039
|
"div",
|
|
8963
9040
|
{
|
|
8964
9041
|
ref: wrap,
|
|
@@ -8983,7 +9060,7 @@ window.Aura = (() => {
|
|
|
8983
9060
|
"aria-labelledby": scrolls && !loading ? caption != null ? capId : rest["aria-labelledby"] : void 0,
|
|
8984
9061
|
"aria-label": scrolls && !loading && caption == null ? rest["aria-label"] : void 0
|
|
8985
9062
|
},
|
|
8986
|
-
/* @__PURE__ */
|
|
9063
|
+
/* @__PURE__ */ React53.createElement(
|
|
8987
9064
|
"table",
|
|
8988
9065
|
{
|
|
8989
9066
|
ref,
|
|
@@ -9000,12 +9077,12 @@ window.Aura = (() => {
|
|
|
9000
9077
|
role: stackBelow ? "table" : void 0,
|
|
9001
9078
|
...rest
|
|
9002
9079
|
},
|
|
9003
|
-
caption != null ? /* @__PURE__ */
|
|
9080
|
+
caption != null ? /* @__PURE__ */ React53.createElement("caption", { id: capId, className: cx("aura-tbl__caption", captionHidden && "aura-sr-only") }, caption) : null,
|
|
9004
9081
|
skeletonCols ? skeletonColgroup(skeletonCols) : null,
|
|
9005
|
-
labels ? /* @__PURE__ */
|
|
9082
|
+
labels ? /* @__PURE__ */ React53.createElement(StackLabels.Provider, { value: labels }, shownChildren) : outer ? /* @__PURE__ */ React53.createElement(StackLabels.Provider, { value: null }, shownChildren) : shownChildren
|
|
9006
9083
|
)
|
|
9007
9084
|
);
|
|
9008
|
-
return cards ? /* @__PURE__ */
|
|
9085
|
+
return cards ? /* @__PURE__ */ React53.createElement(
|
|
9009
9086
|
"div",
|
|
9010
9087
|
{
|
|
9011
9088
|
className: cx(
|
|
@@ -9018,10 +9095,10 @@ window.Aura = (() => {
|
|
|
9018
9095
|
) : table;
|
|
9019
9096
|
});
|
|
9020
9097
|
function section(tag, cls) {
|
|
9021
|
-
const C =
|
|
9098
|
+
const C = React53.forwardRef(function TableSection(props, ref) {
|
|
9022
9099
|
const { className, ...rest } = props;
|
|
9023
|
-
const stacked =
|
|
9024
|
-
return
|
|
9100
|
+
const stacked = React53.useContext(StackLabels) != null;
|
|
9101
|
+
return React53.createElement(
|
|
9025
9102
|
tag,
|
|
9026
9103
|
Object.assign({ ref, className: cx(cls, className), role: stacked ? "rowgroup" : void 0 }, rest)
|
|
9027
9104
|
);
|
|
@@ -9034,14 +9111,14 @@ window.Aura = (() => {
|
|
|
9034
9111
|
TBody.displayName = "TBody";
|
|
9035
9112
|
var TFoot = section("tfoot", "aura-tbl__foot");
|
|
9036
9113
|
TFoot.displayName = "TFoot";
|
|
9037
|
-
var Tr =
|
|
9114
|
+
var Tr = React53.forwardRef(function Tr2(props, ref) {
|
|
9038
9115
|
const { className, children, ...rest } = props;
|
|
9039
|
-
const stacked =
|
|
9116
|
+
const stacked = React53.useContext(StackLabels) != null;
|
|
9040
9117
|
let col = 0;
|
|
9041
|
-
return /* @__PURE__ */
|
|
9118
|
+
return /* @__PURE__ */ React53.createElement("tr", { ref, className: cx("aura-tbl__row", className), role: stacked ? "row" : void 0, ...rest }, stacked ? flat2(children).map(function(c) {
|
|
9042
9119
|
const at = col;
|
|
9043
|
-
if (
|
|
9044
|
-
return /* @__PURE__ */
|
|
9120
|
+
if (React53.isValidElement(c)) col += Math.max(1, Number(c.props.colSpan) || 1);
|
|
9121
|
+
return /* @__PURE__ */ React53.createElement(ColumnIndex.Provider, { key: React53.isValidElement(c) && c.key != null ? c.key : at, value: at }, c);
|
|
9045
9122
|
}) : children);
|
|
9046
9123
|
});
|
|
9047
9124
|
function cellClass(base, p) {
|
|
@@ -9058,10 +9135,10 @@ window.Aura = (() => {
|
|
|
9058
9135
|
p.className
|
|
9059
9136
|
);
|
|
9060
9137
|
}
|
|
9061
|
-
var Th =
|
|
9138
|
+
var Th = React53.forwardRef(function Th2(props, ref) {
|
|
9062
9139
|
const { align, numeric, mono, className, scope, label, card, skeleton, skeletonWidth, wrap, ...rest } = props;
|
|
9063
|
-
const stacked =
|
|
9064
|
-
return /* @__PURE__ */
|
|
9140
|
+
const stacked = React53.useContext(StackLabels) != null;
|
|
9141
|
+
return /* @__PURE__ */ React53.createElement(
|
|
9065
9142
|
"th",
|
|
9066
9143
|
{
|
|
9067
9144
|
ref,
|
|
@@ -9073,12 +9150,12 @@ window.Aura = (() => {
|
|
|
9073
9150
|
}
|
|
9074
9151
|
);
|
|
9075
9152
|
});
|
|
9076
|
-
var Td =
|
|
9153
|
+
var Td = React53.forwardRef(function Td2(props, ref) {
|
|
9077
9154
|
const { align, numeric, mono, className, scope, label, card, skeleton, skeletonWidth, wrap, ...rest } = props;
|
|
9078
|
-
const labels =
|
|
9155
|
+
const labels = React53.useContext(StackLabels), col = React53.useContext(ColumnIndex);
|
|
9079
9156
|
const slot = labels && (card === "title" || card === "action") ? card : void 0;
|
|
9080
9157
|
const shown = labels && !slot ? label != null ? label : col >= 0 ? labels[col] : void 0 : void 0;
|
|
9081
|
-
return /* @__PURE__ */
|
|
9158
|
+
return /* @__PURE__ */ React53.createElement(
|
|
9082
9159
|
"td",
|
|
9083
9160
|
{
|
|
9084
9161
|
ref,
|
|
@@ -9092,8 +9169,8 @@ window.Aura = (() => {
|
|
|
9092
9169
|
});
|
|
9093
9170
|
|
|
9094
9171
|
// src/BottomNav.tsx
|
|
9095
|
-
var
|
|
9096
|
-
var BottomNav =
|
|
9172
|
+
var React54 = __toESM(require_react(), 1);
|
|
9173
|
+
var BottomNav = React54.forwardRef(function BottomNav2(props, ref) {
|
|
9097
9174
|
const t = useStrings();
|
|
9098
9175
|
const Link = useLinkComponent(props.linkComponent);
|
|
9099
9176
|
const st = useMaybeControlled(
|
|
@@ -9103,7 +9180,7 @@ window.Aura = (() => {
|
|
|
9103
9180
|
);
|
|
9104
9181
|
const active = st[0];
|
|
9105
9182
|
const hide2 = props.hideFrom === false ? "always" : "below-" + (props.hideFrom || "lg");
|
|
9106
|
-
const own =
|
|
9183
|
+
const own = React54.useRef(null);
|
|
9107
9184
|
const hf = props.hideFrom === false ? null : props.hideFrom || "lg";
|
|
9108
9185
|
const away = useHideOnScroll(
|
|
9109
9186
|
!!props.hideOnScroll,
|
|
@@ -9111,7 +9188,7 @@ window.Aura = (() => {
|
|
|
9111
9188
|
hf ? "(max-width: " + (breakpoints[hf] - 0.02) + "px)" : "all",
|
|
9112
9189
|
64
|
|
9113
9190
|
);
|
|
9114
|
-
const setRef =
|
|
9191
|
+
const setRef = React54.useCallback(
|
|
9115
9192
|
function(el) {
|
|
9116
9193
|
own.current = el;
|
|
9117
9194
|
if (typeof ref === "function") ref(el);
|
|
@@ -9119,7 +9196,7 @@ window.Aura = (() => {
|
|
|
9119
9196
|
},
|
|
9120
9197
|
[ref]
|
|
9121
9198
|
);
|
|
9122
|
-
return /* @__PURE__ */
|
|
9199
|
+
return /* @__PURE__ */ React54.createElement(React54.Fragment, null, /* @__PURE__ */ React54.createElement("div", { className: cx("aura-bottomnav-spacer", "aura-bottomnav--" + hide2), "aria-hidden": "true" }), /* @__PURE__ */ React54.createElement(
|
|
9123
9200
|
"nav",
|
|
9124
9201
|
{
|
|
9125
9202
|
ref: setRef,
|
|
@@ -9132,7 +9209,7 @@ window.Aura = (() => {
|
|
|
9132
9209
|
),
|
|
9133
9210
|
"aria-label": props.label || t.mainNav
|
|
9134
9211
|
},
|
|
9135
|
-
/* @__PURE__ */
|
|
9212
|
+
/* @__PURE__ */ React54.createElement("ul", { className: "aura-bottomnav__list" }, props.items.map(function(it) {
|
|
9136
9213
|
if (it.ariaLabel && typeof it.label === "string" && it.ariaLabel.toLowerCase().indexOf(it.label.toLowerCase()) < 0)
|
|
9137
9214
|
devWarnOnce(
|
|
9138
9215
|
"bottomnav-label-" + it.id,
|
|
@@ -9153,20 +9230,20 @@ window.Aura = (() => {
|
|
|
9153
9230
|
}
|
|
9154
9231
|
};
|
|
9155
9232
|
const inner = [
|
|
9156
|
-
/* @__PURE__ */
|
|
9157
|
-
it.ariaLabel ? /* @__PURE__ */
|
|
9158
|
-
/* @__PURE__ */
|
|
9159
|
-
suffix && !it.ariaLabel ? /* @__PURE__ */
|
|
9233
|
+
/* @__PURE__ */ React54.createElement("span", { key: "i", className: "aura-bottomnav__icon" }, /* @__PURE__ */ React54.createElement(Icon, { name: it.icon, size: "md" }), count ? /* @__PURE__ */ React54.createElement("span", { className: "aura-bottomnav__count", "aria-hidden": "true" }, count) : it.badge ? /* @__PURE__ */ React54.createElement("span", { className: "aura-bottomnav__dot", "aria-hidden": "true" }) : null),
|
|
9234
|
+
it.ariaLabel ? /* @__PURE__ */ React54.createElement("span", { key: "n", className: "aura-sr-only" }, it.ariaLabel + suffix) : null,
|
|
9235
|
+
/* @__PURE__ */ React54.createElement("span", { key: "l", className: "aura-bottomnav__label", "aria-hidden": it.ariaLabel ? true : void 0 }, it.label),
|
|
9236
|
+
suffix && !it.ariaLabel ? /* @__PURE__ */ React54.createElement("span", { key: "s", className: "aura-sr-only" }, suffix) : null
|
|
9160
9237
|
];
|
|
9161
|
-
return /* @__PURE__ */
|
|
9238
|
+
return /* @__PURE__ */ React54.createElement("li", { key: it.id, className: "aura-bottomnav__cell" }, it.href ? /* @__PURE__ */ React54.createElement(Link, { href: it.href, ...common }, inner) : /* @__PURE__ */ React54.createElement("button", { type: "button", ...common }, inner));
|
|
9162
9239
|
}))
|
|
9163
9240
|
));
|
|
9164
9241
|
});
|
|
9165
9242
|
|
|
9166
9243
|
// src/Surface.tsx
|
|
9167
|
-
var
|
|
9168
|
-
var h11 =
|
|
9169
|
-
var Surface =
|
|
9244
|
+
var React55 = __toESM(require_react(), 1);
|
|
9245
|
+
var h11 = React55.createElement;
|
|
9246
|
+
var Surface = React55.forwardRef(function Surface2(props, ref) {
|
|
9170
9247
|
const t = props.texture || "mesh";
|
|
9171
9248
|
const rest = omit(props, ["texture", "className", "children", "as"]);
|
|
9172
9249
|
return h11(
|
|
@@ -9187,14 +9264,14 @@ window.Aura = (() => {
|
|
|
9187
9264
|
});
|
|
9188
9265
|
|
|
9189
9266
|
// src/Stat.tsx
|
|
9190
|
-
var
|
|
9191
|
-
var Stat =
|
|
9267
|
+
var React56 = __toESM(require_react(), 1);
|
|
9268
|
+
var Stat = React56.forwardRef(function Stat2(props, ref) {
|
|
9192
9269
|
const Link = useLinkComponent(props.linkComponent);
|
|
9193
9270
|
return statElement(props, ref, Link);
|
|
9194
9271
|
});
|
|
9195
9272
|
|
|
9196
9273
|
// src/TimePicker.tsx
|
|
9197
|
-
var
|
|
9274
|
+
var React57 = __toESM(require_react(), 1);
|
|
9198
9275
|
var import_react_dom12 = __toESM(require_react_dom(), 1);
|
|
9199
9276
|
|
|
9200
9277
|
// src/text.ts
|
|
@@ -9236,7 +9313,7 @@ window.Aura = (() => {
|
|
|
9236
9313
|
function fromMin(n3) {
|
|
9237
9314
|
return pad3(Math.floor(n3 / 60)) + ":" + pad3(n3 % 60);
|
|
9238
9315
|
}
|
|
9239
|
-
var TimePicker =
|
|
9316
|
+
var TimePicker = React57.forwardRef(function TimePicker2(props, ref) {
|
|
9240
9317
|
const t = useStrings();
|
|
9241
9318
|
const auto = uid(), id = props.id || auto, listId = id + "-list";
|
|
9242
9319
|
const st = useMaybeControlled(
|
|
@@ -9246,7 +9323,7 @@ window.Aura = (() => {
|
|
|
9246
9323
|
);
|
|
9247
9324
|
const value = st[0];
|
|
9248
9325
|
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;
|
|
9249
|
-
const slots =
|
|
9326
|
+
const slots = React57.useMemo(
|
|
9250
9327
|
function() {
|
|
9251
9328
|
const out = [];
|
|
9252
9329
|
for (let m = lo; m <= hi; m += step) out.push(fromMin(m));
|
|
@@ -9258,12 +9335,12 @@ window.Aura = (() => {
|
|
|
9258
9335
|
const n3 = toMin(v);
|
|
9259
9336
|
return n3 == null || n3 < lo || n3 > hi || props.isTimeDisabled && props.isTimeDisabled(v);
|
|
9260
9337
|
}
|
|
9261
|
-
const openState =
|
|
9262
|
-
const editState =
|
|
9263
|
-
const aState =
|
|
9264
|
-
const errState =
|
|
9265
|
-
const pos =
|
|
9266
|
-
const boxRef =
|
|
9338
|
+
const openState = React57.useState(false), open = openState[0], setOpen = openState[1];
|
|
9339
|
+
const editState = React57.useState(null), editing = editState[0], setEditing = editState[1];
|
|
9340
|
+
const aState = React57.useState(0), active = aState[0], setActive = aState[1];
|
|
9341
|
+
const errState = React57.useState(null);
|
|
9342
|
+
const pos = React57.useState(null);
|
|
9343
|
+
const boxRef = React57.useRef(null), inputRef = React57.useRef(null), listRef = React57.useRef(null), inputMerged = useMergedRef(ref, inputRef);
|
|
9267
9344
|
const mounted = useMounted();
|
|
9268
9345
|
function nearest(v) {
|
|
9269
9346
|
const n3 = toMin(v);
|
|
@@ -9291,7 +9368,7 @@ window.Aura = (() => {
|
|
|
9291
9368
|
},
|
|
9292
9369
|
[open]
|
|
9293
9370
|
);
|
|
9294
|
-
|
|
9371
|
+
React57.useEffect(
|
|
9295
9372
|
function() {
|
|
9296
9373
|
if (!open) return;
|
|
9297
9374
|
function outside(e) {
|
|
@@ -9313,7 +9390,7 @@ window.Aura = (() => {
|
|
|
9313
9390
|
},
|
|
9314
9391
|
[open]
|
|
9315
9392
|
);
|
|
9316
|
-
|
|
9393
|
+
React57.useEffect(
|
|
9317
9394
|
function() {
|
|
9318
9395
|
if (!open || !listRef.current) return;
|
|
9319
9396
|
const el = listRef.current.querySelector('[data-idx="' + active + '"]');
|
|
@@ -9412,9 +9489,9 @@ window.Aura = (() => {
|
|
|
9412
9489
|
}
|
|
9413
9490
|
const error = errState[0] || props.error;
|
|
9414
9491
|
const list = open && mounted && pos[0] ? (0, import_react_dom12.createPortal)(
|
|
9415
|
-
/* @__PURE__ */
|
|
9492
|
+
/* @__PURE__ */ React57.createElement("div", { ref: listRef, className: "aura-combo__popover aura-time__popover", style: pos[0] }, /* @__PURE__ */ React57.createElement("ul", { id: listId, role: "listbox", "aria-label": props.label, className: "aura-combo__list" }, slots.map(function(s, i) {
|
|
9416
9493
|
const dis = blocked(s), sel = s === value;
|
|
9417
|
-
return /* @__PURE__ */
|
|
9494
|
+
return /* @__PURE__ */ React57.createElement(
|
|
9418
9495
|
"li",
|
|
9419
9496
|
{
|
|
9420
9497
|
key: s,
|
|
@@ -9439,13 +9516,13 @@ window.Aura = (() => {
|
|
|
9439
9516
|
if (active !== i) setActive(i);
|
|
9440
9517
|
}
|
|
9441
9518
|
},
|
|
9442
|
-
/* @__PURE__ */
|
|
9443
|
-
sel ? /* @__PURE__ */
|
|
9519
|
+
/* @__PURE__ */ React57.createElement("span", { className: "aura-combo__label" }, s),
|
|
9520
|
+
sel ? /* @__PURE__ */ React57.createElement(Icon, { name: /* @__PURE__ */ React57.createElement(IconCheck, null), className: "aura-combo__check" }) : null
|
|
9444
9521
|
);
|
|
9445
9522
|
}))),
|
|
9446
9523
|
document.body
|
|
9447
9524
|
) : null;
|
|
9448
|
-
return /* @__PURE__ */
|
|
9525
|
+
return /* @__PURE__ */ React57.createElement(
|
|
9449
9526
|
Field,
|
|
9450
9527
|
{
|
|
9451
9528
|
id,
|
|
@@ -9457,7 +9534,7 @@ window.Aura = (() => {
|
|
|
9457
9534
|
disabled: props.disabled,
|
|
9458
9535
|
className: cx(touchClass(props.touchHeight), props.className)
|
|
9459
9536
|
},
|
|
9460
|
-
/* @__PURE__ */
|
|
9537
|
+
/* @__PURE__ */ React57.createElement("div", { ref: boxRef, className: cx("aura-input aura-combo aura-time has-icon", open && "is-open") }, /* @__PURE__ */ React57.createElement(Icon, { name: /* @__PURE__ */ React57.createElement(IconClock, null), className: "aura-input__icon" }), /* @__PURE__ */ React57.createElement(
|
|
9461
9538
|
"input",
|
|
9462
9539
|
{
|
|
9463
9540
|
ref: inputMerged,
|
|
@@ -9497,7 +9574,7 @@ window.Aura = (() => {
|
|
|
9497
9574
|
}, 0);
|
|
9498
9575
|
}
|
|
9499
9576
|
}
|
|
9500
|
-
), props.clearable !== false && value != null && !props.disabled ? /* @__PURE__ */
|
|
9577
|
+
), props.clearable !== false && value != null && !props.disabled ? /* @__PURE__ */ React57.createElement(
|
|
9501
9578
|
"button",
|
|
9502
9579
|
{
|
|
9503
9580
|
type: "button",
|
|
@@ -9510,8 +9587,8 @@ window.Aura = (() => {
|
|
|
9510
9587
|
if (inputRef.current) inputRef.current.focus();
|
|
9511
9588
|
}
|
|
9512
9589
|
},
|
|
9513
|
-
/* @__PURE__ */
|
|
9514
|
-
) : null, /* @__PURE__ */
|
|
9590
|
+
/* @__PURE__ */ React57.createElement(Icon, { name: /* @__PURE__ */ React57.createElement(IconX, null) })
|
|
9591
|
+
) : null, /* @__PURE__ */ React57.createElement(
|
|
9515
9592
|
"button",
|
|
9516
9593
|
{
|
|
9517
9594
|
type: "button",
|
|
@@ -9529,14 +9606,14 @@ window.Aura = (() => {
|
|
|
9529
9606
|
}
|
|
9530
9607
|
}
|
|
9531
9608
|
},
|
|
9532
|
-
/* @__PURE__ */
|
|
9609
|
+
/* @__PURE__ */ React57.createElement(Icon, { name: /* @__PURE__ */ React57.createElement(IconChevronDown, null) })
|
|
9533
9610
|
)),
|
|
9534
9611
|
list
|
|
9535
9612
|
);
|
|
9536
9613
|
});
|
|
9537
9614
|
|
|
9538
9615
|
// src/FileUpload.tsx
|
|
9539
|
-
var
|
|
9616
|
+
var React58 = __toESM(require_react(), 1);
|
|
9540
9617
|
function matches(file, accept) {
|
|
9541
9618
|
if (!accept) return true;
|
|
9542
9619
|
const name = (file.name || "").toLowerCase(), type = (file.type || "").toLowerCase();
|
|
@@ -9560,24 +9637,24 @@ window.Aura = (() => {
|
|
|
9560
9637
|
}).join(", ");
|
|
9561
9638
|
}
|
|
9562
9639
|
var seq = 0;
|
|
9563
|
-
var FileUpload =
|
|
9640
|
+
var FileUpload = React58.forwardRef(function FileUpload2(props, ref) {
|
|
9564
9641
|
const t = useStrings();
|
|
9565
9642
|
const auto = uid(), id = props.id || auto;
|
|
9566
9643
|
const st = useMaybeControlled(props.value, props.defaultValue || [], props.onChange);
|
|
9567
9644
|
const items2 = st[0] || [];
|
|
9568
|
-
const dragState =
|
|
9569
|
-
const inputRef =
|
|
9570
|
-
const urls =
|
|
9645
|
+
const dragState = React58.useState(false), over = dragState[0];
|
|
9646
|
+
const inputRef = React58.useRef(null), inputMerged = useMergedRef(ref, inputRef);
|
|
9647
|
+
const urls = React58.useRef({});
|
|
9571
9648
|
const maxFiles = props.multiple ? props.maxFiles : 1;
|
|
9572
9649
|
const note = t.accepts(describeAccept(props.accept, t), props.maxSize ? formatBytes(props.maxSize) : "");
|
|
9573
|
-
|
|
9650
|
+
React58.useEffect(function() {
|
|
9574
9651
|
return function() {
|
|
9575
9652
|
Object.keys(urls.current).forEach(function(k) {
|
|
9576
9653
|
URL.revokeObjectURL(urls.current[k]);
|
|
9577
9654
|
});
|
|
9578
9655
|
};
|
|
9579
9656
|
}, []);
|
|
9580
|
-
|
|
9657
|
+
React58.useEffect(
|
|
9581
9658
|
function() {
|
|
9582
9659
|
const el = inputRef.current;
|
|
9583
9660
|
if (!el || !props.name || typeof DataTransfer === "undefined") return;
|
|
@@ -9637,7 +9714,7 @@ window.Aura = (() => {
|
|
|
9637
9714
|
if (inputRef.current) inputRef.current.focus();
|
|
9638
9715
|
}
|
|
9639
9716
|
const error = props.error;
|
|
9640
|
-
return /* @__PURE__ */
|
|
9717
|
+
return /* @__PURE__ */ React58.createElement(
|
|
9641
9718
|
Field,
|
|
9642
9719
|
{
|
|
9643
9720
|
id,
|
|
@@ -9649,7 +9726,7 @@ window.Aura = (() => {
|
|
|
9649
9726
|
disabled: props.disabled,
|
|
9650
9727
|
className: props.className
|
|
9651
9728
|
},
|
|
9652
|
-
/* @__PURE__ */
|
|
9729
|
+
/* @__PURE__ */ React58.createElement(
|
|
9653
9730
|
"div",
|
|
9654
9731
|
{
|
|
9655
9732
|
className: cx("aura-upload", over && "is-over", props.disabled && "is-disabled", error && "is-invalid"),
|
|
@@ -9670,9 +9747,9 @@ window.Aura = (() => {
|
|
|
9670
9747
|
add(e.dataTransfer && e.dataTransfer.files);
|
|
9671
9748
|
}
|
|
9672
9749
|
},
|
|
9673
|
-
/* @__PURE__ */
|
|
9674
|
-
/* @__PURE__ */
|
|
9675
|
-
/* @__PURE__ */
|
|
9750
|
+
/* @__PURE__ */ React58.createElement(Icon, { name: /* @__PURE__ */ React58.createElement(IconCloudUpload, null), size: "lg", className: "aura-upload__icon" }),
|
|
9751
|
+
/* @__PURE__ */ React58.createElement("span", { className: "aura-upload__text" }, t.dropFiles, " "),
|
|
9752
|
+
/* @__PURE__ */ React58.createElement(
|
|
9676
9753
|
"input",
|
|
9677
9754
|
{
|
|
9678
9755
|
ref: inputMerged,
|
|
@@ -9694,12 +9771,12 @@ window.Aura = (() => {
|
|
|
9694
9771
|
}
|
|
9695
9772
|
}
|
|
9696
9773
|
),
|
|
9697
|
-
/* @__PURE__ */
|
|
9698
|
-
note ? /* @__PURE__ */
|
|
9774
|
+
/* @__PURE__ */ React58.createElement("span", { className: "aura-upload__browse", "aria-hidden": true }, props.multiple ? t.browse : t.browseOne),
|
|
9775
|
+
note ? /* @__PURE__ */ React58.createElement("span", { className: "aura-upload__note", id: id + "-note" }, note) : null
|
|
9699
9776
|
),
|
|
9700
|
-
items2.length ? /* @__PURE__ */
|
|
9777
|
+
items2.length ? /* @__PURE__ */ React58.createElement("ul", { className: "aura-upload__list", "aria-live": "polite" }, items2.map(function(it) {
|
|
9701
9778
|
const src = thumb(it);
|
|
9702
|
-
return /* @__PURE__ */
|
|
9779
|
+
return /* @__PURE__ */ React58.createElement("li", { key: it.id, className: cx("aura-upload__item", it.error && "is-error") }, src ? /* @__PURE__ */ React58.createElement("img", { className: "aura-upload__thumb", src, alt: "" }) : /* @__PURE__ */ React58.createElement("span", { className: "aura-upload__thumb is-icon", "aria-hidden": true }, /* @__PURE__ */ React58.createElement(Icon, { name: /^image\//.test(it.type || "") ? /* @__PURE__ */ React58.createElement(IconImage, null) : /* @__PURE__ */ React58.createElement(IconFile, null), size: "md" })), /* @__PURE__ */ React58.createElement("span", { className: "aura-upload__meta" }, it.url && !it.error ? /* @__PURE__ */ React58.createElement("a", { className: "aura-upload__name", href: it.url, target: "_blank", rel: "noreferrer" }, it.name) : /* @__PURE__ */ React58.createElement("span", { className: "aura-upload__name" }, it.name), /* @__PURE__ */ React58.createElement("span", { className: "aura-upload__sub" }, it.error ? /* @__PURE__ */ React58.createElement(React58.Fragment, null, /* @__PURE__ */ React58.createElement(Icon, { name: /* @__PURE__ */ React58.createElement(IconCircleAlert, null), size: 12 }), it.error) : it.status === "uploading" ? t.uploading + (it.progress != null ? " " + Math.round(it.progress) + "%" : "") : it.status === "done" ? /* @__PURE__ */ React58.createElement(React58.Fragment, null, /* @__PURE__ */ React58.createElement(Icon, { name: /* @__PURE__ */ React58.createElement(IconCircleCheck, null), size: 12 }), formatBytes(it.size)) : formatBytes(it.size)), it.status === "uploading" ? /* @__PURE__ */ React58.createElement(
|
|
9703
9780
|
"span",
|
|
9704
9781
|
{
|
|
9705
9782
|
className: "aura-upload__bar",
|
|
@@ -9709,11 +9786,11 @@ window.Aura = (() => {
|
|
|
9709
9786
|
"aria-valuemax": 100,
|
|
9710
9787
|
"aria-valuenow": it.progress != null ? Math.round(it.progress) : void 0
|
|
9711
9788
|
},
|
|
9712
|
-
/* @__PURE__ */
|
|
9713
|
-
) : null), /* @__PURE__ */
|
|
9789
|
+
/* @__PURE__ */ React58.createElement("span", { style: { width: (it.progress || 0) + "%" } })
|
|
9790
|
+
) : null), /* @__PURE__ */ React58.createElement(
|
|
9714
9791
|
IconButton,
|
|
9715
9792
|
{
|
|
9716
|
-
icon: /* @__PURE__ */
|
|
9793
|
+
icon: /* @__PURE__ */ React58.createElement(IconX, null),
|
|
9717
9794
|
label: t.remove(it.name),
|
|
9718
9795
|
onClick: function() {
|
|
9719
9796
|
remove(it);
|
|
@@ -10029,9 +10106,9 @@ window.Aura = (() => {
|
|
|
10029
10106
|
}
|
|
10030
10107
|
|
|
10031
10108
|
// src/ThemeStyle.tsx
|
|
10032
|
-
var
|
|
10109
|
+
var React59 = __toESM(require_react(), 1);
|
|
10033
10110
|
function ThemeStyle(props) {
|
|
10034
|
-
const css =
|
|
10111
|
+
const css = React59.useMemo(
|
|
10035
10112
|
function() {
|
|
10036
10113
|
try {
|
|
10037
10114
|
return createTheme({
|
|
@@ -10048,11 +10125,11 @@ window.Aura = (() => {
|
|
|
10048
10125
|
[props.brand, props.signal, props.primary, props.name, props.selector]
|
|
10049
10126
|
);
|
|
10050
10127
|
if (css === null) return null;
|
|
10051
|
-
return /* @__PURE__ */
|
|
10128
|
+
return /* @__PURE__ */ React59.createElement("style", { "data-aura-theme": props.name || props.brand, dangerouslySetInnerHTML: { __html: css } });
|
|
10052
10129
|
}
|
|
10053
10130
|
|
|
10054
10131
|
// src/colorScheme.tsx
|
|
10055
|
-
var
|
|
10132
|
+
var React60 = __toESM(require_react(), 1);
|
|
10056
10133
|
|
|
10057
10134
|
// src/colorSchemeScript.ts
|
|
10058
10135
|
var DEFAULT_KEY = "aura-color-scheme";
|
|
@@ -10069,7 +10146,7 @@ window.Aura = (() => {
|
|
|
10069
10146
|
|
|
10070
10147
|
// src/colorScheme.tsx
|
|
10071
10148
|
function ColorSchemeScript(props) {
|
|
10072
|
-
return /* @__PURE__ */
|
|
10149
|
+
return /* @__PURE__ */ React60.createElement(
|
|
10073
10150
|
"script",
|
|
10074
10151
|
{
|
|
10075
10152
|
"data-aura-color-scheme": "",
|
|
@@ -10094,7 +10171,7 @@ window.Aura = (() => {
|
|
|
10094
10171
|
function useColorScheme(options) {
|
|
10095
10172
|
const key = options && options.storageKey || DEFAULT_KEY;
|
|
10096
10173
|
const fallback = options && options.defaultScheme || "system";
|
|
10097
|
-
const subscribe2 =
|
|
10174
|
+
const subscribe2 = React60.useCallback(
|
|
10098
10175
|
function(cb) {
|
|
10099
10176
|
const mq = window.matchMedia ? window.matchMedia("(prefers-color-scheme: dark)") : null;
|
|
10100
10177
|
function onSystem() {
|
|
@@ -10116,7 +10193,7 @@ window.Aura = (() => {
|
|
|
10116
10193
|
},
|
|
10117
10194
|
[fallback, key]
|
|
10118
10195
|
);
|
|
10119
|
-
const snapshot =
|
|
10196
|
+
const snapshot = React60.useSyncExternalStore(
|
|
10120
10197
|
subscribe2,
|
|
10121
10198
|
function() {
|
|
10122
10199
|
const s = readScheme(fallback);
|
|
@@ -10127,7 +10204,7 @@ window.Aura = (() => {
|
|
|
10127
10204
|
}
|
|
10128
10205
|
);
|
|
10129
10206
|
const parts = snapshot.split("|");
|
|
10130
|
-
const setScheme =
|
|
10207
|
+
const setScheme = React60.useCallback(
|
|
10131
10208
|
function(next) {
|
|
10132
10209
|
if (!valid(next)) return;
|
|
10133
10210
|
try {
|
|
@@ -10146,14 +10223,14 @@ window.Aura = (() => {
|
|
|
10146
10223
|
const cs = useColorScheme(props);
|
|
10147
10224
|
const names = { light: t.schemeLight, dark: t.schemeDark, system: t.schemeSystem };
|
|
10148
10225
|
const label = props.label || t.colorScheme;
|
|
10149
|
-
return /* @__PURE__ */
|
|
10226
|
+
return /* @__PURE__ */ React60.createElement(
|
|
10150
10227
|
DropdownMenu,
|
|
10151
10228
|
{
|
|
10152
10229
|
label,
|
|
10153
|
-
trigger: /* @__PURE__ */
|
|
10230
|
+
trigger: /* @__PURE__ */ React60.createElement(
|
|
10154
10231
|
IconButton,
|
|
10155
10232
|
{
|
|
10156
|
-
icon: cs.resolved === "dark" ? /* @__PURE__ */
|
|
10233
|
+
icon: cs.resolved === "dark" ? /* @__PURE__ */ React60.createElement(IconMoon, null) : /* @__PURE__ */ React60.createElement(IconSun, null),
|
|
10157
10234
|
label: label + ": " + names[cs.scheme]
|
|
10158
10235
|
}
|
|
10159
10236
|
),
|
|
@@ -10171,14 +10248,14 @@ window.Aura = (() => {
|
|
|
10171
10248
|
}
|
|
10172
10249
|
|
|
10173
10250
|
// src/Badge.tsx
|
|
10174
|
-
var
|
|
10175
|
-
var Badge =
|
|
10251
|
+
var React61 = __toESM(require_react(), 1);
|
|
10252
|
+
var Badge = React61.forwardRef(function Badge2(props, ref) {
|
|
10176
10253
|
return badgeElement(props, ref);
|
|
10177
10254
|
});
|
|
10178
10255
|
|
|
10179
10256
|
// src/Progress.tsx
|
|
10180
|
-
var
|
|
10181
|
-
var Progress =
|
|
10257
|
+
var React62 = __toESM(require_react(), 1);
|
|
10258
|
+
var Progress = React62.forwardRef(function Progress2(props, ref) {
|
|
10182
10259
|
const t = useStrings();
|
|
10183
10260
|
const auto = uid(), id = props.id || auto;
|
|
10184
10261
|
const max = props.max || 100, det = props.value != null;
|
|
@@ -10188,7 +10265,7 @@ window.Aura = (() => {
|
|
|
10188
10265
|
const keyed = !!props.legend && spct > 0;
|
|
10189
10266
|
const valueText = props.valueText != null ? props.valueText : keyed ? t.progressReserved(props.value, sec, max) : props.valueLabel != null ? String(props.valueLabel) : sec ? t.progressReserved(props.value, sec, max) : void 0;
|
|
10190
10267
|
const shown = props.valueLabel != null ? props.valueLabel : det ? Math.round(pct) + "%" : null;
|
|
10191
|
-
return /* @__PURE__ */
|
|
10268
|
+
return /* @__PURE__ */ React62.createElement(
|
|
10192
10269
|
"div",
|
|
10193
10270
|
{
|
|
10194
10271
|
ref,
|
|
@@ -10199,8 +10276,8 @@ window.Aura = (() => {
|
|
|
10199
10276
|
props.className
|
|
10200
10277
|
)
|
|
10201
10278
|
},
|
|
10202
|
-
props.label || props.showValue && shown ? /* @__PURE__ */
|
|
10203
|
-
/* @__PURE__ */
|
|
10279
|
+
props.label || props.showValue && shown ? /* @__PURE__ */ React62.createElement("div", { className: "aura-progress__head" }, props.label ? /* @__PURE__ */ React62.createElement("span", { className: "aura-progress__label", id: id + "-label" }, props.label) : /* @__PURE__ */ React62.createElement("span", null), props.showValue && shown ? /* @__PURE__ */ React62.createElement("span", { className: "aura-progress__value" }, shown) : null) : null,
|
|
10280
|
+
/* @__PURE__ */ React62.createElement(
|
|
10204
10281
|
"div",
|
|
10205
10282
|
{
|
|
10206
10283
|
className: cx("aura-progress__track", !det && "is-indeterminate"),
|
|
@@ -10212,8 +10289,8 @@ window.Aura = (() => {
|
|
|
10212
10289
|
"aria-valuenow": det ? props.value : void 0,
|
|
10213
10290
|
"aria-valuetext": det ? valueText : void 0
|
|
10214
10291
|
},
|
|
10215
|
-
/* @__PURE__ */
|
|
10216
|
-
sec ? /* @__PURE__ */
|
|
10292
|
+
/* @__PURE__ */ React62.createElement("span", { className: "aura-progress__bar", style: det ? { width: pct + "%" } : void 0 }),
|
|
10293
|
+
sec ? /* @__PURE__ */ React62.createElement(
|
|
10217
10294
|
"span",
|
|
10218
10295
|
{
|
|
10219
10296
|
className: "aura-progress__bar aura-progress__bar--reserved",
|
|
@@ -10221,20 +10298,20 @@ window.Aura = (() => {
|
|
|
10221
10298
|
}
|
|
10222
10299
|
) : null
|
|
10223
10300
|
),
|
|
10224
|
-
keyed ? /* @__PURE__ */
|
|
10225
|
-
props.hint ? /* @__PURE__ */
|
|
10301
|
+
keyed ? /* @__PURE__ */ React62.createElement("div", { className: "aura-progress__legend", "aria-hidden": "true" }, props.legend.value != null && props.legend.value !== false ? /* @__PURE__ */ React62.createElement("span", { className: "aura-progress__key" }, /* @__PURE__ */ React62.createElement("span", { className: "aura-progress__swatch" }), props.legend.value) : null, /* @__PURE__ */ React62.createElement("span", { className: "aura-progress__key" }, /* @__PURE__ */ React62.createElement("span", { className: "aura-progress__swatch aura-progress__swatch--reserved" }), props.legend.secondary)) : null,
|
|
10302
|
+
props.hint ? /* @__PURE__ */ React62.createElement("p", { className: "aura-progress__hint" }, props.hint) : null
|
|
10226
10303
|
);
|
|
10227
10304
|
});
|
|
10228
10305
|
|
|
10229
10306
|
// src/Skeleton.tsx
|
|
10230
|
-
var
|
|
10231
|
-
var Skeleton =
|
|
10307
|
+
var React63 = __toESM(require_react(), 1);
|
|
10308
|
+
var Skeleton = React63.forwardRef(function Skeleton2(props, ref) {
|
|
10232
10309
|
const v = props.variant || "text";
|
|
10233
10310
|
if (v === "text" && (props.lines || 1) > 1) {
|
|
10234
10311
|
const n3 = props.lines, rows = [];
|
|
10235
10312
|
for (let i = 0; i < n3; i++)
|
|
10236
|
-
rows.push(/* @__PURE__ */
|
|
10237
|
-
return /* @__PURE__ */
|
|
10313
|
+
rows.push(/* @__PURE__ */ React63.createElement("span", { key: i, className: "aura-skel aura-skel--text", style: { width: i === n3 - 1 ? "60%" : "100%" } }));
|
|
10314
|
+
return /* @__PURE__ */ React63.createElement(
|
|
10238
10315
|
"span",
|
|
10239
10316
|
{
|
|
10240
10317
|
ref,
|
|
@@ -10252,17 +10329,17 @@ window.Aura = (() => {
|
|
|
10252
10329
|
if (v === "circle") {
|
|
10253
10330
|
style.width = style.height = props.size || props.width || 40;
|
|
10254
10331
|
}
|
|
10255
|
-
return /* @__PURE__ */
|
|
10332
|
+
return /* @__PURE__ */ React63.createElement("span", { ref, "aria-hidden": true, className: cx("aura-skel", "aura-skel--" + v, props.className), style });
|
|
10256
10333
|
});
|
|
10257
10334
|
|
|
10258
10335
|
// src/EmptyState.tsx
|
|
10259
|
-
var
|
|
10260
|
-
var EmptyState =
|
|
10336
|
+
var React64 = __toESM(require_react(), 1);
|
|
10337
|
+
var EmptyState = React64.forwardRef(function EmptyState2(props, ref) {
|
|
10261
10338
|
return emptyStateElement(props, ref);
|
|
10262
10339
|
});
|
|
10263
10340
|
|
|
10264
10341
|
// src/Pagination.tsx
|
|
10265
|
-
var
|
|
10342
|
+
var React65 = __toESM(require_react(), 1);
|
|
10266
10343
|
function pageList(page, count, sib) {
|
|
10267
10344
|
let out = [], lo = Math.max(2, page - sib), hi = Math.min(count - 1, page + sib);
|
|
10268
10345
|
if (page - sib <= 3) {
|
|
@@ -10282,7 +10359,7 @@ window.Aura = (() => {
|
|
|
10282
10359
|
if (count > 1) out.push(count);
|
|
10283
10360
|
return out;
|
|
10284
10361
|
}
|
|
10285
|
-
var Pagination =
|
|
10362
|
+
var Pagination = React65.forwardRef(function Pagination2(props, ref) {
|
|
10286
10363
|
const t = useStrings();
|
|
10287
10364
|
useAutoTip();
|
|
10288
10365
|
const count = Math.max(1, props.pageCount || 1);
|
|
@@ -10302,7 +10379,7 @@ window.Aura = (() => {
|
|
|
10302
10379
|
},
|
|
10303
10380
|
extra
|
|
10304
10381
|
);
|
|
10305
|
-
return link ? /* @__PURE__ */
|
|
10382
|
+
return link ? /* @__PURE__ */ React65.createElement(
|
|
10306
10383
|
Link,
|
|
10307
10384
|
{
|
|
10308
10385
|
href: link(p),
|
|
@@ -10315,7 +10392,7 @@ window.Aura = (() => {
|
|
|
10315
10392
|
...common
|
|
10316
10393
|
},
|
|
10317
10394
|
label
|
|
10318
|
-
) : /* @__PURE__ */
|
|
10395
|
+
) : /* @__PURE__ */ React65.createElement(
|
|
10319
10396
|
"button",
|
|
10320
10397
|
{
|
|
10321
10398
|
type: "button",
|
|
@@ -10329,7 +10406,7 @@ window.Aura = (() => {
|
|
|
10329
10406
|
}
|
|
10330
10407
|
function arrow(p, icon, label, rel, disabled) {
|
|
10331
10408
|
if (!link || disabled)
|
|
10332
|
-
return /* @__PURE__ */
|
|
10409
|
+
return /* @__PURE__ */ React65.createElement(
|
|
10333
10410
|
IconButton,
|
|
10334
10411
|
{
|
|
10335
10412
|
icon,
|
|
@@ -10340,7 +10417,7 @@ window.Aura = (() => {
|
|
|
10340
10417
|
}
|
|
10341
10418
|
}
|
|
10342
10419
|
);
|
|
10343
|
-
return /* @__PURE__ */
|
|
10420
|
+
return /* @__PURE__ */ React65.createElement(
|
|
10344
10421
|
Link,
|
|
10345
10422
|
{
|
|
10346
10423
|
href: link(p),
|
|
@@ -10355,17 +10432,17 @@ window.Aura = (() => {
|
|
|
10355
10432
|
}
|
|
10356
10433
|
}
|
|
10357
10434
|
},
|
|
10358
|
-
/* @__PURE__ */
|
|
10435
|
+
/* @__PURE__ */ React65.createElement(Icon, { name: icon, size: "sm" })
|
|
10359
10436
|
);
|
|
10360
10437
|
}
|
|
10361
|
-
return /* @__PURE__ */
|
|
10362
|
-
return typeof p === "number" ? /* @__PURE__ */
|
|
10363
|
-
})), /* @__PURE__ */
|
|
10438
|
+
return /* @__PURE__ */ React65.createElement("nav", { ref, className: cx("aura-pagination", props.className), "aria-label": props.label || t.pagination }, arrow(page - 1, /* @__PURE__ */ React65.createElement(IconChevronLeft, null), t.prevPage, "prev", page <= 1), /* @__PURE__ */ React65.createElement("ol", { className: "aura-pagination__list" }, pageList(page, count, props.siblingCount == null ? 1 : props.siblingCount).map(function(p) {
|
|
10439
|
+
return typeof p === "number" ? /* @__PURE__ */ React65.createElement("li", { key: p }, item(p, p)) : /* @__PURE__ */ React65.createElement("li", { key: p, className: "aura-pagination__gap", "aria-hidden": true }, "\u2026");
|
|
10440
|
+
})), /* @__PURE__ */ React65.createElement("span", { className: "aura-pagination__compact", "aria-hidden": true }, t.page(page, count)), arrow(page + 1, /* @__PURE__ */ React65.createElement(IconChevronRight, null), t.nextPage, "next", page >= count));
|
|
10364
10441
|
});
|
|
10365
10442
|
|
|
10366
10443
|
// src/Accordion.tsx
|
|
10367
|
-
var
|
|
10368
|
-
var Accordion =
|
|
10444
|
+
var React66 = __toESM(require_react(), 1);
|
|
10445
|
+
var Accordion = React66.forwardRef(function Accordion2(props, ref) {
|
|
10369
10446
|
const auto = uid(), base = props.id || auto;
|
|
10370
10447
|
const multiple = props.type === "multiple";
|
|
10371
10448
|
const st = useMaybeControlled(
|
|
@@ -10403,9 +10480,9 @@ window.Aura = (() => {
|
|
|
10403
10480
|
n3.focus();
|
|
10404
10481
|
}
|
|
10405
10482
|
}
|
|
10406
|
-
return /* @__PURE__ */
|
|
10483
|
+
return /* @__PURE__ */ React66.createElement("div", { ref, className: cx("aura-accordion", props.className), onKeyDown: onKey }, items2.map(function(it) {
|
|
10407
10484
|
const on = open.indexOf(it.id) >= 0, bid = base + "-btn-" + it.id, pid = base + "-panel-" + it.id;
|
|
10408
|
-
return /* @__PURE__ */
|
|
10485
|
+
return /* @__PURE__ */ React66.createElement("div", { key: it.id, className: cx("aura-accordion__item", on && "is-open") }, /* @__PURE__ */ React66.createElement(HT, { className: "aura-accordion__heading" }, /* @__PURE__ */ React66.createElement(
|
|
10409
10486
|
"button",
|
|
10410
10487
|
{
|
|
10411
10488
|
type: "button",
|
|
@@ -10418,10 +10495,10 @@ window.Aura = (() => {
|
|
|
10418
10495
|
toggle(it.id);
|
|
10419
10496
|
}
|
|
10420
10497
|
},
|
|
10421
|
-
it.icon ? /* @__PURE__ */
|
|
10422
|
-
/* @__PURE__ */
|
|
10423
|
-
/* @__PURE__ */
|
|
10424
|
-
)), /* @__PURE__ */
|
|
10498
|
+
it.icon ? /* @__PURE__ */ React66.createElement(Icon, { name: it.icon, className: "aura-accordion__lead" }) : null,
|
|
10499
|
+
/* @__PURE__ */ React66.createElement("span", { className: "aura-accordion__title" }, /* @__PURE__ */ React66.createElement("span", { id: it.description ? bid + "-title" : void 0 }, it.title), it.description ? /* @__PURE__ */ React66.createElement("span", { className: "aura-accordion__desc", id: bid + "-desc", "aria-hidden": true }, it.description) : null),
|
|
10500
|
+
/* @__PURE__ */ React66.createElement(Icon, { name: /* @__PURE__ */ React66.createElement(IconChevronDown, null), className: "aura-accordion__chevron" })
|
|
10501
|
+
)), /* @__PURE__ */ React66.createElement(
|
|
10425
10502
|
"div",
|
|
10426
10503
|
{
|
|
10427
10504
|
id: pid,
|
|
@@ -10436,7 +10513,7 @@ window.Aura = (() => {
|
|
|
10436
10513
|
});
|
|
10437
10514
|
|
|
10438
10515
|
// src/Popover.tsx
|
|
10439
|
-
var
|
|
10516
|
+
var React67 = __toESM(require_react(), 1);
|
|
10440
10517
|
var import_react_dom13 = __toESM(require_react_dom(), 1);
|
|
10441
10518
|
function position(anchor, pop, placement) {
|
|
10442
10519
|
const r2 = anchor.getBoundingClientRect(), pw = pop.offsetWidth, ph = pop.scrollHeight, vw = window.innerWidth, vh = window.innerHeight, gap = 6;
|
|
@@ -10454,15 +10531,15 @@ window.Aura = (() => {
|
|
|
10454
10531
|
const left = align === "end" ? r2.right - pw : align === "center" ? r2.left + r2.width / 2 - pw / 2 : r2.left;
|
|
10455
10532
|
return { top: Math.max(8, top), left: Math.max(8, Math.min(left, vw - pw - 8)), side, maxHeight };
|
|
10456
10533
|
}
|
|
10457
|
-
var Popover =
|
|
10534
|
+
var Popover = React67.forwardRef(function Popover2(props, ref) {
|
|
10458
10535
|
const t = useStrings();
|
|
10459
10536
|
const density = useDensity();
|
|
10460
10537
|
const auto = uid(), id = props.id || auto;
|
|
10461
10538
|
const st = useMaybeControlled(props.open, !!props.defaultOpen, props.onOpenChange);
|
|
10462
10539
|
const open = !!st[0];
|
|
10463
|
-
const wrap =
|
|
10464
|
-
const pos =
|
|
10465
|
-
const inTree =
|
|
10540
|
+
const wrap = React67.useRef(null), pop = React67.useRef(null), popMerged = useMergedRef(ref, pop);
|
|
10541
|
+
const pos = React67.useState(null), mounted = useMounted();
|
|
10542
|
+
const inTree = React67.useRef(false);
|
|
10466
10543
|
function trigger() {
|
|
10467
10544
|
return wrap.current && (wrap.current.querySelector('button, [role="button"], a, input') || wrap.current.firstElementChild);
|
|
10468
10545
|
}
|
|
@@ -10489,7 +10566,7 @@ window.Aura = (() => {
|
|
|
10489
10566
|
},
|
|
10490
10567
|
[open, mounted, props.placement]
|
|
10491
10568
|
);
|
|
10492
|
-
|
|
10569
|
+
React67.useEffect(
|
|
10493
10570
|
function() {
|
|
10494
10571
|
if (!open || !mounted) return;
|
|
10495
10572
|
if (props.autoFocus !== false && pop.current) {
|
|
@@ -10521,9 +10598,9 @@ window.Aura = (() => {
|
|
|
10521
10598
|
},
|
|
10522
10599
|
[open, mounted]
|
|
10523
10600
|
);
|
|
10524
|
-
const child =
|
|
10601
|
+
const child = React67.Children.only(props.trigger);
|
|
10525
10602
|
const panel = open && mounted ? (0, import_react_dom13.createPortal)(
|
|
10526
|
-
/* @__PURE__ */
|
|
10603
|
+
/* @__PURE__ */ React67.createElement(
|
|
10527
10604
|
"div",
|
|
10528
10605
|
{
|
|
10529
10606
|
ref: popMerged,
|
|
@@ -10553,17 +10630,17 @@ window.Aura = (() => {
|
|
|
10553
10630
|
} else trapTab(e, pop.current);
|
|
10554
10631
|
}
|
|
10555
10632
|
},
|
|
10556
|
-
props.title ? /* @__PURE__ */
|
|
10633
|
+
props.title ? /* @__PURE__ */ React67.createElement("div", { className: "aura-popover__head" }, /* @__PURE__ */ React67.createElement("p", { className: "aura-popover__title", id: id + "-title" }, props.title), /* @__PURE__ */ React67.createElement(
|
|
10557
10634
|
IconButton,
|
|
10558
10635
|
{
|
|
10559
|
-
icon: /* @__PURE__ */
|
|
10636
|
+
icon: /* @__PURE__ */ React67.createElement(IconX, null),
|
|
10560
10637
|
label: t.close,
|
|
10561
10638
|
onClick: function() {
|
|
10562
10639
|
close(true);
|
|
10563
10640
|
}
|
|
10564
10641
|
}
|
|
10565
10642
|
)) : null,
|
|
10566
|
-
/* @__PURE__ */
|
|
10643
|
+
/* @__PURE__ */ React67.createElement("div", { className: "aura-popover__body" }, typeof props.children === "function" ? props.children({
|
|
10567
10644
|
close: function() {
|
|
10568
10645
|
close(true);
|
|
10569
10646
|
}
|
|
@@ -10571,7 +10648,7 @@ window.Aura = (() => {
|
|
|
10571
10648
|
),
|
|
10572
10649
|
document.body
|
|
10573
10650
|
) : null;
|
|
10574
|
-
return /* @__PURE__ */
|
|
10651
|
+
return /* @__PURE__ */ React67.createElement("span", { ref: wrap, className: "aura-popover-anchor" }, React67.cloneElement(child, {
|
|
10575
10652
|
onClick: function(e) {
|
|
10576
10653
|
if (child.props.onClick) child.props.onClick(e);
|
|
10577
10654
|
st[1](!open);
|
|
@@ -10583,7 +10660,7 @@ window.Aura = (() => {
|
|
|
10583
10660
|
});
|
|
10584
10661
|
|
|
10585
10662
|
// src/NumberField.tsx
|
|
10586
|
-
var
|
|
10663
|
+
var React68 = __toESM(require_react(), 1);
|
|
10587
10664
|
function decimalsOf(n3) {
|
|
10588
10665
|
const s = String(n3);
|
|
10589
10666
|
const i = s.indexOf(".");
|
|
@@ -10596,7 +10673,7 @@ window.Aura = (() => {
|
|
|
10596
10673
|
if (!/^-?(\d+\.?\d*|\.\d+)$/.test(s)) return NaN;
|
|
10597
10674
|
return Number(s);
|
|
10598
10675
|
}
|
|
10599
|
-
var NumberField =
|
|
10676
|
+
var NumberField = React68.forwardRef(function NumberField2(props, ref) {
|
|
10600
10677
|
const t = useStrings();
|
|
10601
10678
|
const auto = uid(), id = props.id || auto;
|
|
10602
10679
|
const step = props.step || 1;
|
|
@@ -10607,7 +10684,7 @@ window.Aura = (() => {
|
|
|
10607
10684
|
props.onChange
|
|
10608
10685
|
);
|
|
10609
10686
|
const value = st[0], setValue = st[1];
|
|
10610
|
-
const draftState =
|
|
10687
|
+
const draftState = React68.useState(null), draft = draftState[0], setDraft = draftState[1];
|
|
10611
10688
|
function fmt2(n3) {
|
|
10612
10689
|
if (n3 == null || isNaN(n3)) return "";
|
|
10613
10690
|
return n3.toLocaleString("en", { minimumFractionDigits: decimals, maximumFractionDigits: decimals });
|
|
@@ -10656,7 +10733,7 @@ window.Aura = (() => {
|
|
|
10656
10733
|
};
|
|
10657
10734
|
const valueText = value == null ? void 0 : [affixText(props.prefix), fmt2(value), affixText(props.suffix)].join(" ").trim();
|
|
10658
10735
|
const stepper = props.stepper !== false && !props.readOnly;
|
|
10659
|
-
return /* @__PURE__ */
|
|
10736
|
+
return /* @__PURE__ */ React68.createElement(
|
|
10660
10737
|
Field,
|
|
10661
10738
|
{
|
|
10662
10739
|
id,
|
|
@@ -10668,7 +10745,7 @@ window.Aura = (() => {
|
|
|
10668
10745
|
disabled: props.disabled,
|
|
10669
10746
|
className: cx(touchClass(props.touchHeight), props.className)
|
|
10670
10747
|
},
|
|
10671
|
-
/* @__PURE__ */
|
|
10748
|
+
/* @__PURE__ */ React68.createElement("div", { className: cx("aura-input aura-number", stepper && "has-stepper") }, props.prefix != null ? /* @__PURE__ */ React68.createElement("span", { className: "aura-number__affix", "aria-hidden": true }, props.prefix) : null, /* @__PURE__ */ React68.createElement(
|
|
10672
10749
|
"input",
|
|
10673
10750
|
{
|
|
10674
10751
|
ref,
|
|
@@ -10715,7 +10792,7 @@ window.Aura = (() => {
|
|
|
10715
10792
|
},
|
|
10716
10793
|
onKeyDown
|
|
10717
10794
|
}
|
|
10718
|
-
), props.suffix != null ? /* @__PURE__ */
|
|
10795
|
+
), props.suffix != null ? /* @__PURE__ */ React68.createElement("span", { className: "aura-number__affix", "aria-hidden": true }, props.suffix) : null, stepper ? /* @__PURE__ */ React68.createElement("span", { className: "aura-number__steps" }, /* @__PURE__ */ React68.createElement(
|
|
10719
10796
|
"button",
|
|
10720
10797
|
{
|
|
10721
10798
|
type: "button",
|
|
@@ -10731,8 +10808,8 @@ window.Aura = (() => {
|
|
|
10731
10808
|
nudge(-step);
|
|
10732
10809
|
}
|
|
10733
10810
|
},
|
|
10734
|
-
/* @__PURE__ */
|
|
10735
|
-
), /* @__PURE__ */
|
|
10811
|
+
/* @__PURE__ */ React68.createElement(Icon, { name: /* @__PURE__ */ React68.createElement(IconMinus, null) })
|
|
10812
|
+
), /* @__PURE__ */ React68.createElement(
|
|
10736
10813
|
"button",
|
|
10737
10814
|
{
|
|
10738
10815
|
type: "button",
|
|
@@ -10748,14 +10825,14 @@ window.Aura = (() => {
|
|
|
10748
10825
|
nudge(step);
|
|
10749
10826
|
}
|
|
10750
10827
|
},
|
|
10751
|
-
/* @__PURE__ */
|
|
10828
|
+
/* @__PURE__ */ React68.createElement(Icon, { name: /* @__PURE__ */ React68.createElement(IconPlus, null) })
|
|
10752
10829
|
)) : null)
|
|
10753
10830
|
);
|
|
10754
10831
|
});
|
|
10755
10832
|
|
|
10756
10833
|
// src/Stepper.tsx
|
|
10757
|
-
var
|
|
10758
|
-
var Stepper =
|
|
10834
|
+
var React69 = __toESM(require_react(), 1);
|
|
10835
|
+
var Stepper = React69.forwardRef(function Stepper2(props, ref) {
|
|
10759
10836
|
const t = useStrings();
|
|
10760
10837
|
const idBase = uid();
|
|
10761
10838
|
const steps = props.steps || [];
|
|
@@ -10766,22 +10843,22 @@ window.Aura = (() => {
|
|
|
10766
10843
|
if (at < 0) at = 0;
|
|
10767
10844
|
const vertical = props.orientation === "vertical";
|
|
10768
10845
|
const cur2 = steps[at];
|
|
10769
|
-
return /* @__PURE__ */
|
|
10846
|
+
return /* @__PURE__ */ React69.createElement(
|
|
10770
10847
|
"nav",
|
|
10771
10848
|
{
|
|
10772
10849
|
ref,
|
|
10773
10850
|
"aria-label": props.label,
|
|
10774
10851
|
className: cx("aura-stepper", vertical ? "aura-stepper--vertical" : "aura-stepper--horizontal", props.className)
|
|
10775
10852
|
},
|
|
10776
|
-
/* @__PURE__ */
|
|
10853
|
+
/* @__PURE__ */ React69.createElement("ol", { className: "aura-stepper__list" }, steps.map(function(s, i) {
|
|
10777
10854
|
const state = i < at ? "done" : i === at ? "current" : "upcoming";
|
|
10778
10855
|
const error = s.status === "error";
|
|
10779
|
-
const marker = /* @__PURE__ */
|
|
10856
|
+
const marker = /* @__PURE__ */ React69.createElement("span", { className: "aura-stepper__marker", "aria-hidden": true }, error ? /* @__PURE__ */ React69.createElement(Icon, { name: /* @__PURE__ */ React69.createElement(IconCircleAlert, null) }) : state === "done" ? /* @__PURE__ */ React69.createElement(Icon, { name: /* @__PURE__ */ React69.createElement(IconCheck, null) }) : i + 1);
|
|
10780
10857
|
const note = error ? t.stepError : state === "done" ? t.stepDone : "";
|
|
10781
10858
|
const clickable = state === "done" && !!props.onStepClick;
|
|
10782
10859
|
const named = clickable && (typeof s.label === "string" || typeof s.label === "number") && String(s.label).trim() !== "";
|
|
10783
10860
|
const descId = idBase + "-step-" + i;
|
|
10784
|
-
const text2 = /* @__PURE__ */
|
|
10861
|
+
const text2 = /* @__PURE__ */ React69.createElement("span", { className: "aura-stepper__text" }, named ? /* @__PURE__ */ React69.createElement("span", { className: "aura-sr-only" }, String(s.label) + (note ? ", " + note : "")) : null, /* @__PURE__ */ React69.createElement("span", { className: "aura-stepper__label", "aria-hidden": named ? true : void 0 }, s.label, note && !named ? /* @__PURE__ */ React69.createElement("span", { className: "aura-sr-only" }, ", " + note) : null), s.description ? /* @__PURE__ */ React69.createElement(
|
|
10785
10862
|
"span",
|
|
10786
10863
|
{
|
|
10787
10864
|
className: "aura-stepper__desc",
|
|
@@ -10790,14 +10867,14 @@ window.Aura = (() => {
|
|
|
10790
10867
|
},
|
|
10791
10868
|
s.description
|
|
10792
10869
|
) : null);
|
|
10793
|
-
return /* @__PURE__ */
|
|
10870
|
+
return /* @__PURE__ */ React69.createElement(
|
|
10794
10871
|
"li",
|
|
10795
10872
|
{
|
|
10796
10873
|
key: s.id,
|
|
10797
10874
|
className: cx("aura-stepper__item", "is-" + state, error && "is-error"),
|
|
10798
10875
|
"aria-current": state === "current" ? "step" : void 0
|
|
10799
10876
|
},
|
|
10800
|
-
clickable ? /* @__PURE__ */
|
|
10877
|
+
clickable ? /* @__PURE__ */ React69.createElement(
|
|
10801
10878
|
"button",
|
|
10802
10879
|
{
|
|
10803
10880
|
type: "button",
|
|
@@ -10809,19 +10886,19 @@ window.Aura = (() => {
|
|
|
10809
10886
|
},
|
|
10810
10887
|
marker,
|
|
10811
10888
|
text2
|
|
10812
|
-
) : /* @__PURE__ */
|
|
10889
|
+
) : /* @__PURE__ */ React69.createElement("span", { className: "aura-stepper__step" }, marker, text2)
|
|
10813
10890
|
);
|
|
10814
10891
|
})),
|
|
10815
|
-
!vertical && cur2 ? /* @__PURE__ */
|
|
10892
|
+
!vertical && cur2 ? /* @__PURE__ */ React69.createElement("p", { className: "aura-stepper__compact", "aria-hidden": true }, /* @__PURE__ */ React69.createElement("span", { className: "aura-stepper__count" }, t.stepOf(at + 1, steps.length), cur2.status === "error" ? /* @__PURE__ */ React69.createElement("span", { className: "aura-stepper__count-error" }, " \u2014 " + t.stepError) : null), /* @__PURE__ */ React69.createElement("span", { className: "aura-stepper__compact-label" }, cur2.label)) : null
|
|
10816
10893
|
);
|
|
10817
10894
|
});
|
|
10818
10895
|
|
|
10819
10896
|
// src/SegmentedControl.tsx
|
|
10820
|
-
var
|
|
10897
|
+
var React70 = __toESM(require_react(), 1);
|
|
10821
10898
|
function toOpt2(o) {
|
|
10822
10899
|
return typeof o === "object" ? o : { value: o, label: o };
|
|
10823
10900
|
}
|
|
10824
|
-
var SegmentedControl =
|
|
10901
|
+
var SegmentedControl = React70.forwardRef(
|
|
10825
10902
|
function SegmentedControl2(props, ref) {
|
|
10826
10903
|
const options = (props.options || []).map(toOpt2);
|
|
10827
10904
|
useAutoTip();
|
|
@@ -10835,7 +10912,7 @@ window.Aura = (() => {
|
|
|
10835
10912
|
);
|
|
10836
10913
|
const value = st[0], setValue = st[1];
|
|
10837
10914
|
const auto = uid(), id = props.id || auto;
|
|
10838
|
-
const refs =
|
|
10915
|
+
const refs = React70.useRef([]);
|
|
10839
10916
|
const selIdx = options.findIndex(function(o) {
|
|
10840
10917
|
return o.value === value;
|
|
10841
10918
|
});
|
|
@@ -10868,7 +10945,7 @@ window.Aura = (() => {
|
|
|
10868
10945
|
move(options.length, -1);
|
|
10869
10946
|
}
|
|
10870
10947
|
}
|
|
10871
|
-
return /* @__PURE__ */
|
|
10948
|
+
return /* @__PURE__ */ React70.createElement(
|
|
10872
10949
|
"div",
|
|
10873
10950
|
{
|
|
10874
10951
|
ref,
|
|
@@ -10888,7 +10965,7 @@ window.Aura = (() => {
|
|
|
10888
10965
|
options.map(function(o, i) {
|
|
10889
10966
|
const on = o.value === value;
|
|
10890
10967
|
const off = props.disabled || o.disabled;
|
|
10891
|
-
return /* @__PURE__ */
|
|
10968
|
+
return /* @__PURE__ */ React70.createElement(
|
|
10892
10969
|
"button",
|
|
10893
10970
|
{
|
|
10894
10971
|
key: o.value,
|
|
@@ -10910,8 +10987,8 @@ window.Aura = (() => {
|
|
|
10910
10987
|
onKeyDown(e, i);
|
|
10911
10988
|
}
|
|
10912
10989
|
},
|
|
10913
|
-
o.icon ? /* @__PURE__ */
|
|
10914
|
-
o.iconOnly ? null : /* @__PURE__ */
|
|
10990
|
+
o.icon ? /* @__PURE__ */ React70.createElement(Icon, { name: o.icon }) : null,
|
|
10991
|
+
o.iconOnly ? null : /* @__PURE__ */ React70.createElement("span", null, o.label)
|
|
10915
10992
|
);
|
|
10916
10993
|
})
|
|
10917
10994
|
);
|