@jirawatpyk/aura-react 5.66.0 → 5.68.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 +9 -0
- package/dist/aura.bundle.js +684 -598
- package/dist/cjs/index.cjs +683 -597
- package/dist/esm/CheckboxGroup.js +80 -0
- package/dist/esm/Field.js +9 -1
- package/dist/esm/RadioGroup.js +3 -4
- 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 +38 -0
- package/dist/index.d.ts +38 -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 +5 -0
- package/dist/styles.layer.css +5 -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
|
},
|
|
@@ -2077,12 +2081,19 @@ window.Aura = (() => {
|
|
|
2077
2081
|
) : null,
|
|
2078
2082
|
hasAddon(props.labelAddon) ? /* @__PURE__ */ React13.createElement("div", { className: "aura-field__addon", id: props.id + "-addon" }, props.labelAddon) : null,
|
|
2079
2083
|
props.children,
|
|
2080
|
-
|
|
2084
|
+
fieldNote(props.id, props.error, props.hint, props.errorLive)
|
|
2081
2085
|
);
|
|
2082
2086
|
});
|
|
2083
2087
|
function describedBy(id, p) {
|
|
2084
2088
|
return p.error ? id + "-error" : p.hint ? id + "-hint" : void 0;
|
|
2085
2089
|
}
|
|
2090
|
+
function fieldNote(id, error, hint, live) {
|
|
2091
|
+
const err = error ? /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(Icon, { name: /* @__PURE__ */ React13.createElement(IconCircleAlert, null), size: 14 }), error) : null;
|
|
2092
|
+
const hintLine = hint ? /* @__PURE__ */ React13.createElement("p", { className: "aura-field__hint", id: id + "-hint" }, hint) : null;
|
|
2093
|
+
if (!live)
|
|
2094
|
+
return err ? /* @__PURE__ */ React13.createElement("p", { className: "aura-field__error", id: id + "-error" }, err) : hintLine;
|
|
2095
|
+
return /* @__PURE__ */ React13.createElement(React13.Fragment, null, err ? null : hintLine, /* @__PURE__ */ React13.createElement("p", { className: "aura-field__error", id: id == null ? void 0 : id + "-error", "aria-live": "polite" }, err));
|
|
2096
|
+
}
|
|
2086
2097
|
function hasAddon(n3) {
|
|
2087
2098
|
return n3 != null && typeof n3 !== "boolean" && n3 !== "";
|
|
2088
2099
|
}
|
|
@@ -3868,6 +3879,7 @@ window.Aura = (() => {
|
|
|
3868
3879
|
className: cx(
|
|
3869
3880
|
"aura-field aura-radio-group",
|
|
3870
3881
|
props.error && "is-invalid",
|
|
3882
|
+
props.disabled && "is-disabled",
|
|
3871
3883
|
touchClass(props.touchHeight),
|
|
3872
3884
|
props.className
|
|
3873
3885
|
),
|
|
@@ -3897,19 +3909,93 @@ window.Aura = (() => {
|
|
|
3897
3909
|
}
|
|
3898
3910
|
), /* @__PURE__ */ React20.createElement("span", { className: "aura-choice__text" }, /* @__PURE__ */ React20.createElement("span", { className: "aura-choice__label", id: oid ? oid + "-label" : void 0 }, v.label), v.description ? /* @__PURE__ */ React20.createElement("span", { className: "aura-choice__desc", id: oid + "-desc" }, v.description) : null));
|
|
3899
3911
|
})),
|
|
3900
|
-
|
|
3912
|
+
fieldNote(id, props.error, props.hint, props.errorLive)
|
|
3901
3913
|
);
|
|
3902
3914
|
});
|
|
3903
3915
|
|
|
3904
|
-
// src/
|
|
3916
|
+
// src/CheckboxGroup.tsx
|
|
3905
3917
|
var React21 = __toESM(require_react(), 1);
|
|
3906
|
-
var
|
|
3918
|
+
var CheckboxGroup = React21.forwardRef(
|
|
3919
|
+
function CheckboxGroup2(props, ref) {
|
|
3920
|
+
const t = useStrings();
|
|
3921
|
+
const auto = uid(), id = props.id || auto;
|
|
3922
|
+
const st = useMaybeControlled(props.value, props.defaultValue || [], props.onChange);
|
|
3923
|
+
const picked = st[0] || [];
|
|
3924
|
+
const opts = (props.options || []).map(function(o) {
|
|
3925
|
+
return typeof o === "object" ? o : { value: o, label: o };
|
|
3926
|
+
});
|
|
3927
|
+
const name = props.name || id;
|
|
3928
|
+
const setRef = React21.useCallback(
|
|
3929
|
+
function(el) {
|
|
3930
|
+
if (el)
|
|
3931
|
+
el.focus = function(o) {
|
|
3932
|
+
const b = el.querySelector('input[type="checkbox"]:checked:not(:disabled)') || el.querySelector('input[type="checkbox"]:not(:disabled)');
|
|
3933
|
+
if (b) b.focus(o);
|
|
3934
|
+
};
|
|
3935
|
+
if (typeof ref === "function") ref(el);
|
|
3936
|
+
else if (ref) ref.current = el;
|
|
3937
|
+
},
|
|
3938
|
+
[ref]
|
|
3939
|
+
);
|
|
3940
|
+
return /* @__PURE__ */ React21.createElement(
|
|
3941
|
+
"fieldset",
|
|
3942
|
+
{
|
|
3943
|
+
ref: setRef,
|
|
3944
|
+
className: cx(
|
|
3945
|
+
"aura-field aura-radio-group aura-checkbox-group",
|
|
3946
|
+
props.error && "is-invalid",
|
|
3947
|
+
props.disabled && "is-disabled",
|
|
3948
|
+
touchClass(props.touchHeight),
|
|
3949
|
+
props.className
|
|
3950
|
+
),
|
|
3951
|
+
"aria-describedby": describedBy(id, props),
|
|
3952
|
+
disabled: props.disabled
|
|
3953
|
+
},
|
|
3954
|
+
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,
|
|
3955
|
+
/* @__PURE__ */ React21.createElement("div", { className: cx("aura-radio-group__list", props.orientation === "horizontal" && "is-horizontal") }, opts.map(function(v) {
|
|
3956
|
+
return /* @__PURE__ */ React21.createElement(
|
|
3957
|
+
Checkbox,
|
|
3958
|
+
{
|
|
3959
|
+
key: v.value,
|
|
3960
|
+
name,
|
|
3961
|
+
value: v.value,
|
|
3962
|
+
checked: picked.indexOf(v.value) >= 0,
|
|
3963
|
+
disabled: props.disabled || v.disabled,
|
|
3964
|
+
description: v.description,
|
|
3965
|
+
touchHeight: props.touchHeight,
|
|
3966
|
+
"aria-invalid": props.error ? true : void 0,
|
|
3967
|
+
"aria-describedby": props.error ? id + "-error" : void 0,
|
|
3968
|
+
onChange: function(on) {
|
|
3969
|
+
const known = opts.map(function(o) {
|
|
3970
|
+
return o.value;
|
|
3971
|
+
});
|
|
3972
|
+
const next = known.filter(function(val) {
|
|
3973
|
+
return val === v.value ? on : picked.indexOf(val) >= 0;
|
|
3974
|
+
}).concat(
|
|
3975
|
+
picked.filter(function(val) {
|
|
3976
|
+
return known.indexOf(val) < 0;
|
|
3977
|
+
})
|
|
3978
|
+
);
|
|
3979
|
+
st[1](next);
|
|
3980
|
+
}
|
|
3981
|
+
},
|
|
3982
|
+
v.label
|
|
3983
|
+
);
|
|
3984
|
+
})),
|
|
3985
|
+
fieldNote(id, props.error, props.hint, props.errorLive)
|
|
3986
|
+
);
|
|
3987
|
+
}
|
|
3988
|
+
);
|
|
3989
|
+
|
|
3990
|
+
// src/Switch.tsx
|
|
3991
|
+
var React22 = __toESM(require_react(), 1);
|
|
3992
|
+
var Switch = React22.forwardRef(function Switch2(props, ref) {
|
|
3907
3993
|
const auto = uid(), id = props.id || auto;
|
|
3908
3994
|
const st = useMaybeControlled(props.checked, !!props.defaultChecked, props.onChange);
|
|
3909
3995
|
const on = !!st[0];
|
|
3910
3996
|
const ro = !!props.readOnly && !props.disabled;
|
|
3911
3997
|
const described = [props.description ? id + "-desc" : "", props["aria-describedby"] || ""].filter(Boolean).join(" ");
|
|
3912
|
-
return /* @__PURE__ */
|
|
3998
|
+
return /* @__PURE__ */ React22.createElement(
|
|
3913
3999
|
"div",
|
|
3914
4000
|
{
|
|
3915
4001
|
className: cx("aura-switch-row", props.disabled && "is-disabled", ro && "is-readonly", props.className),
|
|
@@ -3919,7 +4005,7 @@ window.Aura = (() => {
|
|
|
3919
4005
|
st[1](!on);
|
|
3920
4006
|
}
|
|
3921
4007
|
},
|
|
3922
|
-
/* @__PURE__ */
|
|
4008
|
+
/* @__PURE__ */ React22.createElement(
|
|
3923
4009
|
"button",
|
|
3924
4010
|
{
|
|
3925
4011
|
ref,
|
|
@@ -3937,15 +4023,15 @@ window.Aura = (() => {
|
|
|
3937
4023
|
if (!ro) st[1](!on);
|
|
3938
4024
|
}
|
|
3939
4025
|
},
|
|
3940
|
-
/* @__PURE__ */
|
|
4026
|
+
/* @__PURE__ */ React22.createElement("span", { className: "aura-switch__thumb" })
|
|
3941
4027
|
),
|
|
3942
|
-
props.label ? /* @__PURE__ */
|
|
3943
|
-
props.icon ? /* @__PURE__ */
|
|
4028
|
+
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,
|
|
4029
|
+
props.icon ? /* @__PURE__ */ React22.createElement(Icon, { name: props.icon, className: "aura-switch-row__icon" }) : null
|
|
3944
4030
|
);
|
|
3945
4031
|
});
|
|
3946
4032
|
|
|
3947
4033
|
// src/Combobox.tsx
|
|
3948
|
-
var
|
|
4034
|
+
var React23 = __toESM(require_react(), 1);
|
|
3949
4035
|
var import_react_dom5 = __toESM(require_react_dom(), 1);
|
|
3950
4036
|
function norm(s) {
|
|
3951
4037
|
return String(s == null ? "" : s).normalize("NFC").toLocaleLowerCase("th");
|
|
@@ -3960,7 +4046,7 @@ window.Aura = (() => {
|
|
|
3960
4046
|
return norm(k).indexOf(q) >= 0;
|
|
3961
4047
|
});
|
|
3962
4048
|
}
|
|
3963
|
-
var Combobox =
|
|
4049
|
+
var Combobox = React23.forwardRef(
|
|
3964
4050
|
function Combobox2(all, ref) {
|
|
3965
4051
|
const props = all;
|
|
3966
4052
|
const multi = all.multiple === true;
|
|
@@ -4002,11 +4088,11 @@ window.Aura = (() => {
|
|
|
4002
4088
|
return o.value === v;
|
|
4003
4089
|
})[0];
|
|
4004
4090
|
}).filter(Boolean) : [];
|
|
4005
|
-
const openState =
|
|
4006
|
-
const qState =
|
|
4007
|
-
const aState =
|
|
4008
|
-
const posState =
|
|
4009
|
-
const inputRef =
|
|
4091
|
+
const openState = React23.useState(false), open = openState[0], setOpen = openState[1];
|
|
4092
|
+
const qState = React23.useState(null), query = qState[0], setQuery = qState[1];
|
|
4093
|
+
const aState = React23.useState(0), active = aState[0], setActive = aState[1];
|
|
4094
|
+
const posState = React23.useState(null);
|
|
4095
|
+
const inputRef = React23.useRef(null), inputMerged = useMergedRef(ref, inputRef), boxRef = React23.useRef(null), listRef = React23.useRef(null);
|
|
4010
4096
|
const mounted = useMounted();
|
|
4011
4097
|
const limit = props.limit || 200;
|
|
4012
4098
|
const filter = props.filter || defaultFilter;
|
|
@@ -4036,7 +4122,7 @@ window.Aura = (() => {
|
|
|
4036
4122
|
},
|
|
4037
4123
|
[open, shown.length, values.length]
|
|
4038
4124
|
);
|
|
4039
|
-
|
|
4125
|
+
React23.useEffect(
|
|
4040
4126
|
function() {
|
|
4041
4127
|
if (!open) return;
|
|
4042
4128
|
function outside(e) {
|
|
@@ -4059,7 +4145,7 @@ window.Aura = (() => {
|
|
|
4059
4145
|
},
|
|
4060
4146
|
[open]
|
|
4061
4147
|
);
|
|
4062
|
-
|
|
4148
|
+
React23.useEffect(
|
|
4063
4149
|
function() {
|
|
4064
4150
|
if (!open || !listRef.current) return;
|
|
4065
4151
|
const el = listRef.current.querySelector('[data-idx="' + activeIdx + '"]');
|
|
@@ -4079,8 +4165,8 @@ window.Aura = (() => {
|
|
|
4079
4165
|
setOpen(false);
|
|
4080
4166
|
setQuery(null);
|
|
4081
4167
|
}
|
|
4082
|
-
const committed =
|
|
4083
|
-
const commitRef =
|
|
4168
|
+
const committed = React23.useRef(false);
|
|
4169
|
+
const commitRef = React23.useRef(function() {
|
|
4084
4170
|
return false;
|
|
4085
4171
|
});
|
|
4086
4172
|
function commitTyped() {
|
|
@@ -4168,7 +4254,7 @@ window.Aura = (() => {
|
|
|
4168
4254
|
function renderOpt(o, i) {
|
|
4169
4255
|
const isSel = multi ? isPicked(o.value) : !!selected && o.value === selected.value;
|
|
4170
4256
|
const blocked = o.disabled || multi && full && !isSel;
|
|
4171
|
-
return /* @__PURE__ */
|
|
4257
|
+
return /* @__PURE__ */ React23.createElement(
|
|
4172
4258
|
"li",
|
|
4173
4259
|
{
|
|
4174
4260
|
key: o.value,
|
|
@@ -4194,9 +4280,9 @@ window.Aura = (() => {
|
|
|
4194
4280
|
if (activeIdx !== i) setActive(i);
|
|
4195
4281
|
}
|
|
4196
4282
|
},
|
|
4197
|
-
o.icon ? /* @__PURE__ */
|
|
4198
|
-
/* @__PURE__ */
|
|
4199
|
-
isSel ? /* @__PURE__ */
|
|
4283
|
+
o.icon ? /* @__PURE__ */ React23.createElement(Icon, { name: o.icon }) : null,
|
|
4284
|
+
/* @__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),
|
|
4285
|
+
isSel ? /* @__PURE__ */ React23.createElement(Icon, { name: /* @__PURE__ */ React23.createElement(IconCheck, null), className: "aura-combo__check" }) : null
|
|
4200
4286
|
);
|
|
4201
4287
|
}
|
|
4202
4288
|
function grouped(list2) {
|
|
@@ -4209,7 +4295,7 @@ window.Aura = (() => {
|
|
|
4209
4295
|
return out;
|
|
4210
4296
|
}
|
|
4211
4297
|
const list = open && mounted && posState[0] ? (0, import_react_dom5.createPortal)(
|
|
4212
|
-
/* @__PURE__ */
|
|
4298
|
+
/* @__PURE__ */ React23.createElement(
|
|
4213
4299
|
"div",
|
|
4214
4300
|
{
|
|
4215
4301
|
ref: listRef,
|
|
@@ -4220,7 +4306,7 @@ window.Aura = (() => {
|
|
|
4220
4306
|
e.preventDefault();
|
|
4221
4307
|
}
|
|
4222
4308
|
},
|
|
4223
|
-
live.length ? /* @__PURE__ */
|
|
4309
|
+
live.length ? /* @__PURE__ */ React23.createElement(
|
|
4224
4310
|
"ul",
|
|
4225
4311
|
{
|
|
4226
4312
|
id: listId,
|
|
@@ -4231,20 +4317,20 @@ window.Aura = (() => {
|
|
|
4231
4317
|
},
|
|
4232
4318
|
grouped(live).map(function(seg) {
|
|
4233
4319
|
if (seg.g == null)
|
|
4234
|
-
return /* @__PURE__ */
|
|
4320
|
+
return /* @__PURE__ */ React23.createElement(React23.Fragment, { key: "u" + seg.items[0][1] }, seg.items.map(function(p) {
|
|
4235
4321
|
return renderOpt(p[0], p[1]);
|
|
4236
4322
|
}));
|
|
4237
4323
|
const gid = id + "-group-" + seg.g + "-" + seg.items[0][1];
|
|
4238
|
-
return /* @__PURE__ */
|
|
4324
|
+
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
4325
|
return renderOpt(p[0], p[1]);
|
|
4240
4326
|
})));
|
|
4241
4327
|
})
|
|
4242
4328
|
) : null,
|
|
4243
|
-
props.loading || !live.length || more ? /* @__PURE__ */
|
|
4329
|
+
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
4330
|
),
|
|
4245
4331
|
document.body
|
|
4246
4332
|
) : null;
|
|
4247
|
-
return /* @__PURE__ */
|
|
4333
|
+
return /* @__PURE__ */ React23.createElement(
|
|
4248
4334
|
Field,
|
|
4249
4335
|
{
|
|
4250
4336
|
id,
|
|
@@ -4257,8 +4343,8 @@ window.Aura = (() => {
|
|
|
4257
4343
|
disabled: props.disabled,
|
|
4258
4344
|
className: cx(touchClass(props.touchHeight), props.className)
|
|
4259
4345
|
},
|
|
4260
|
-
/* @__PURE__ */
|
|
4261
|
-
return /* @__PURE__ */
|
|
4346
|
+
/* @__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) {
|
|
4347
|
+
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
4348
|
"button",
|
|
4263
4349
|
{
|
|
4264
4350
|
type: "button",
|
|
@@ -4277,13 +4363,13 @@ window.Aura = (() => {
|
|
|
4277
4363
|
if (inputRef.current) inputRef.current.focus();
|
|
4278
4364
|
}
|
|
4279
4365
|
},
|
|
4280
|
-
/* @__PURE__ */
|
|
4366
|
+
/* @__PURE__ */ React23.createElement(Icon, { name: /* @__PURE__ */ React23.createElement(IconX, null) })
|
|
4281
4367
|
));
|
|
4282
|
-
})) : null, multi ? /* @__PURE__ */
|
|
4368
|
+
})) : null, multi ? /* @__PURE__ */ React23.createElement("span", { id: summaryId, className: "aura-sr-only" }, picked.length ? t.selectedCount(picked.length) + ": " + picked.map(function(o) {
|
|
4283
4369
|
return o.label;
|
|
4284
4370
|
}).join(", ") : "") : null, props.name ? multi ? values.map(function(v) {
|
|
4285
|
-
return /* @__PURE__ */
|
|
4286
|
-
}) : /* @__PURE__ */
|
|
4371
|
+
return /* @__PURE__ */ React23.createElement("input", { key: v, type: "hidden", name: props.name, value: v });
|
|
4372
|
+
}) : /* @__PURE__ */ React23.createElement("input", { type: "hidden", name: props.name, value: value == null ? "" : value }) : null, /* @__PURE__ */ React23.createElement(
|
|
4287
4373
|
"input",
|
|
4288
4374
|
{
|
|
4289
4375
|
ref: inputMerged,
|
|
@@ -4332,7 +4418,7 @@ window.Aura = (() => {
|
|
|
4332
4418
|
}, 0);
|
|
4333
4419
|
}
|
|
4334
4420
|
}
|
|
4335
|
-
), props.clearable !== false && values.length && !props.disabled && !props.readOnly ? /* @__PURE__ */
|
|
4421
|
+
), props.clearable !== false && values.length && !props.disabled && !props.readOnly ? /* @__PURE__ */ React23.createElement(
|
|
4336
4422
|
"button",
|
|
4337
4423
|
{
|
|
4338
4424
|
type: "button",
|
|
@@ -4345,8 +4431,8 @@ window.Aura = (() => {
|
|
|
4345
4431
|
if (inputRef.current) inputRef.current.focus();
|
|
4346
4432
|
}
|
|
4347
4433
|
},
|
|
4348
|
-
/* @__PURE__ */
|
|
4349
|
-
) : null, /* @__PURE__ */
|
|
4434
|
+
/* @__PURE__ */ React23.createElement(Icon, { name: /* @__PURE__ */ React23.createElement(IconX, null) })
|
|
4435
|
+
) : null, /* @__PURE__ */ React23.createElement(
|
|
4350
4436
|
"button",
|
|
4351
4437
|
{
|
|
4352
4438
|
type: "button",
|
|
@@ -4364,7 +4450,7 @@ window.Aura = (() => {
|
|
|
4364
4450
|
}
|
|
4365
4451
|
}
|
|
4366
4452
|
},
|
|
4367
|
-
/* @__PURE__ */
|
|
4453
|
+
/* @__PURE__ */ React23.createElement(Icon, { name: /* @__PURE__ */ React23.createElement(IconChevronDown, null) })
|
|
4368
4454
|
)),
|
|
4369
4455
|
list
|
|
4370
4456
|
);
|
|
@@ -4372,20 +4458,20 @@ window.Aura = (() => {
|
|
|
4372
4458
|
);
|
|
4373
4459
|
|
|
4374
4460
|
// src/Alert.tsx
|
|
4375
|
-
var
|
|
4376
|
-
var Alert =
|
|
4461
|
+
var React24 = __toESM(require_react(), 1);
|
|
4462
|
+
var Alert = React24.forwardRef(function Alert2(props, ref) {
|
|
4377
4463
|
const t = useStrings();
|
|
4378
4464
|
const autoId = uid();
|
|
4379
4465
|
return alertElement(
|
|
4380
4466
|
props,
|
|
4381
4467
|
ref,
|
|
4382
|
-
props.onDismiss ? /* @__PURE__ */
|
|
4468
|
+
props.onDismiss ? /* @__PURE__ */ React24.createElement(IconButton, { icon: /* @__PURE__ */ React24.createElement(IconX, null), label: t.dismiss, className: "aura-alert__close", onClick: props.onDismiss }) : null,
|
|
4383
4469
|
autoId
|
|
4384
4470
|
);
|
|
4385
4471
|
});
|
|
4386
4472
|
|
|
4387
4473
|
// src/Toaster.tsx
|
|
4388
|
-
var
|
|
4474
|
+
var React25 = __toESM(require_react(), 1);
|
|
4389
4475
|
var import_react_dom6 = __toESM(require_react_dom(), 1);
|
|
4390
4476
|
var MAX_VISIBLE = 3;
|
|
4391
4477
|
var toastState = {
|
|
@@ -4461,8 +4547,8 @@ window.Aura = (() => {
|
|
|
4461
4547
|
function ToastItem(props) {
|
|
4462
4548
|
const str = useStrings();
|
|
4463
4549
|
const Link = useLinkComponent();
|
|
4464
|
-
const node =
|
|
4465
|
-
const origin =
|
|
4550
|
+
const node = React25.useRef(null);
|
|
4551
|
+
const origin = React25.useRef(null);
|
|
4466
4552
|
useIsoLayoutEffect(function() {
|
|
4467
4553
|
origin.current = outsideToaster(document.activeElement);
|
|
4468
4554
|
const el = node.current;
|
|
@@ -4478,8 +4564,8 @@ window.Aura = (() => {
|
|
|
4478
4564
|
}, 0);
|
|
4479
4565
|
};
|
|
4480
4566
|
}, []);
|
|
4481
|
-
const t = props.toast, timer2 =
|
|
4482
|
-
const hover =
|
|
4567
|
+
const t = props.toast, timer2 = React25.useRef(null), left = React25.useRef(t.duration || 5e3), since = React25.useRef(0);
|
|
4568
|
+
const hover = React25.useRef(false), focused = React25.useRef(false);
|
|
4483
4569
|
function syncFocus() {
|
|
4484
4570
|
if (focused.current && !(node.current && node.current.contains(document.activeElement))) focused.current = false;
|
|
4485
4571
|
}
|
|
@@ -4501,7 +4587,7 @@ window.Aura = (() => {
|
|
|
4501
4587
|
left.current -= Date.now() - since.current;
|
|
4502
4588
|
}
|
|
4503
4589
|
}
|
|
4504
|
-
|
|
4590
|
+
React25.useEffect(
|
|
4505
4591
|
function() {
|
|
4506
4592
|
if (timer2.current) clearTimeout(timer2.current);
|
|
4507
4593
|
timer2.current = null;
|
|
@@ -4520,7 +4606,7 @@ window.Aura = (() => {
|
|
|
4520
4606
|
if (a.onClick) a.onClick();
|
|
4521
4607
|
if (a.dismiss !== false) toast.dismiss(t.id);
|
|
4522
4608
|
}
|
|
4523
|
-
return /* @__PURE__ */
|
|
4609
|
+
return /* @__PURE__ */ React25.createElement(
|
|
4524
4610
|
"div",
|
|
4525
4611
|
{
|
|
4526
4612
|
ref: node,
|
|
@@ -4557,16 +4643,16 @@ window.Aura = (() => {
|
|
|
4557
4643
|
resume();
|
|
4558
4644
|
}
|
|
4559
4645
|
},
|
|
4560
|
-
/* @__PURE__ */
|
|
4646
|
+
/* @__PURE__ */ React25.createElement(
|
|
4561
4647
|
Icon,
|
|
4562
4648
|
{
|
|
4563
|
-
name: t.loading ? /* @__PURE__ */
|
|
4649
|
+
name: t.loading ? /* @__PURE__ */ React25.createElement(IconLoaderCircle, null) : React25.createElement(ALERT_ICON[t.tone] || IconInfo),
|
|
4564
4650
|
className: cx("aura-toast__icon", t.loading && "aura-spin")
|
|
4565
4651
|
}
|
|
4566
4652
|
),
|
|
4567
|
-
/* @__PURE__ */
|
|
4568
|
-
actions.length ? /* @__PURE__ */
|
|
4569
|
-
return a.href ? /* @__PURE__ */
|
|
4653
|
+
/* @__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),
|
|
4654
|
+
actions.length ? /* @__PURE__ */ React25.createElement("div", { className: "aura-toast__actions" }, actions.map(function(a, i) {
|
|
4655
|
+
return a.href ? /* @__PURE__ */ React25.createElement(
|
|
4570
4656
|
Link,
|
|
4571
4657
|
{
|
|
4572
4658
|
key: i,
|
|
@@ -4578,7 +4664,7 @@ window.Aura = (() => {
|
|
|
4578
4664
|
}
|
|
4579
4665
|
},
|
|
4580
4666
|
a.label
|
|
4581
|
-
) : /* @__PURE__ */
|
|
4667
|
+
) : /* @__PURE__ */ React25.createElement(
|
|
4582
4668
|
"button",
|
|
4583
4669
|
{
|
|
4584
4670
|
key: i,
|
|
@@ -4591,10 +4677,10 @@ window.Aura = (() => {
|
|
|
4591
4677
|
a.label
|
|
4592
4678
|
);
|
|
4593
4679
|
})) : null,
|
|
4594
|
-
/* @__PURE__ */
|
|
4680
|
+
/* @__PURE__ */ React25.createElement(
|
|
4595
4681
|
IconButton,
|
|
4596
4682
|
{
|
|
4597
|
-
icon: /* @__PURE__ */
|
|
4683
|
+
icon: /* @__PURE__ */ React25.createElement(IconX, null),
|
|
4598
4684
|
label: str.dismissToast,
|
|
4599
4685
|
className: "aura-toast__close",
|
|
4600
4686
|
onClick: function() {
|
|
@@ -4622,8 +4708,8 @@ window.Aura = (() => {
|
|
|
4622
4708
|
function Toaster(props = {}) {
|
|
4623
4709
|
const t = useStrings();
|
|
4624
4710
|
const mounted = useMounted();
|
|
4625
|
-
const s =
|
|
4626
|
-
|
|
4711
|
+
const s = React25.useState(toastState.list);
|
|
4712
|
+
React25.useEffect(function() {
|
|
4627
4713
|
toastState.subs.push(s[1]);
|
|
4628
4714
|
s[1](toastState.list.slice());
|
|
4629
4715
|
return function() {
|
|
@@ -4632,9 +4718,9 @@ window.Aura = (() => {
|
|
|
4632
4718
|
});
|
|
4633
4719
|
};
|
|
4634
4720
|
}, []);
|
|
4635
|
-
const region =
|
|
4721
|
+
const region = React25.useRef(null);
|
|
4636
4722
|
const hotkey = props.hotkey === void 0 ? "Alt+T" : props.hotkey;
|
|
4637
|
-
|
|
4723
|
+
React25.useEffect(
|
|
4638
4724
|
function() {
|
|
4639
4725
|
if (!hotkey) return;
|
|
4640
4726
|
const match = hotkeyMatcher(hotkey);
|
|
@@ -4665,7 +4751,7 @@ window.Aura = (() => {
|
|
|
4665
4751
|
const pos = props.position || "bottom";
|
|
4666
4752
|
const offset = props.offset;
|
|
4667
4753
|
return (0, import_react_dom6.createPortal)(
|
|
4668
|
-
/* @__PURE__ */
|
|
4754
|
+
/* @__PURE__ */ React25.createElement(
|
|
4669
4755
|
"div",
|
|
4670
4756
|
{
|
|
4671
4757
|
ref: region,
|
|
@@ -4677,7 +4763,7 @@ window.Aura = (() => {
|
|
|
4677
4763
|
"aria-keyshortcuts": hotkey || void 0
|
|
4678
4764
|
},
|
|
4679
4765
|
s[0].map(function(t2) {
|
|
4680
|
-
return /* @__PURE__ */
|
|
4766
|
+
return /* @__PURE__ */ React25.createElement(ToastItem, { key: t2.id, toast: t2 });
|
|
4681
4767
|
})
|
|
4682
4768
|
),
|
|
4683
4769
|
document.body
|
|
@@ -4685,12 +4771,12 @@ window.Aura = (() => {
|
|
|
4685
4771
|
}
|
|
4686
4772
|
|
|
4687
4773
|
// src/PasswordField.tsx
|
|
4688
|
-
var
|
|
4689
|
-
var PasswordField =
|
|
4774
|
+
var React26 = __toESM(require_react(), 1);
|
|
4775
|
+
var PasswordField = React26.forwardRef(function PasswordField2(props, ref) {
|
|
4690
4776
|
const t = useStrings();
|
|
4691
|
-
const shown =
|
|
4777
|
+
const shown = React26.useState(false);
|
|
4692
4778
|
const rest = omit(props, ["toggle", "className"]);
|
|
4693
|
-
return /* @__PURE__ */
|
|
4779
|
+
return /* @__PURE__ */ React26.createElement(
|
|
4694
4780
|
TextField,
|
|
4695
4781
|
{
|
|
4696
4782
|
autoComplete: "current-password",
|
|
@@ -4700,10 +4786,10 @@ window.Aura = (() => {
|
|
|
4700
4786
|
spellCheck: false,
|
|
4701
4787
|
autoCapitalize: "none",
|
|
4702
4788
|
className: cx("aura-password", props.className),
|
|
4703
|
-
suffix: props.toggle === false ? void 0 : /* @__PURE__ */
|
|
4789
|
+
suffix: props.toggle === false ? void 0 : /* @__PURE__ */ React26.createElement(
|
|
4704
4790
|
IconButton,
|
|
4705
4791
|
{
|
|
4706
|
-
icon: shown[0] ? /* @__PURE__ */
|
|
4792
|
+
icon: shown[0] ? /* @__PURE__ */ React26.createElement(IconEyeOff, null) : /* @__PURE__ */ React26.createElement(IconEye, null),
|
|
4707
4793
|
label: t.showPassword,
|
|
4708
4794
|
"aria-pressed": shown[0],
|
|
4709
4795
|
disabled: props.disabled,
|
|
@@ -4717,7 +4803,7 @@ window.Aura = (() => {
|
|
|
4717
4803
|
});
|
|
4718
4804
|
|
|
4719
4805
|
// src/FormErrorSummary.tsx
|
|
4720
|
-
var
|
|
4806
|
+
var React27 = __toESM(require_react(), 1);
|
|
4721
4807
|
function items(errors) {
|
|
4722
4808
|
if (Array.isArray(errors)) return errors;
|
|
4723
4809
|
const out = [];
|
|
@@ -4746,16 +4832,16 @@ window.Aura = (() => {
|
|
|
4746
4832
|
}
|
|
4747
4833
|
return named;
|
|
4748
4834
|
}
|
|
4749
|
-
var FormErrorSummary =
|
|
4835
|
+
var FormErrorSummary = React27.forwardRef(
|
|
4750
4836
|
function FormErrorSummary2(props, ref) {
|
|
4751
4837
|
const t = useStrings();
|
|
4752
4838
|
const auto = uid(), id = props.id || auto;
|
|
4753
4839
|
const list = items(props.errors);
|
|
4754
|
-
const box =
|
|
4840
|
+
const box = React27.useRef(null);
|
|
4755
4841
|
const keyed = props.focusKey !== void 0;
|
|
4756
|
-
const lastKey =
|
|
4842
|
+
const lastKey = React27.useRef(null), armed = React27.useRef(false), hadErrors = React27.useRef(false);
|
|
4757
4843
|
const has = list.length > 0;
|
|
4758
|
-
|
|
4844
|
+
React27.useEffect(
|
|
4759
4845
|
function() {
|
|
4760
4846
|
const appeared = has && !hadErrors.current;
|
|
4761
4847
|
hadErrors.current = has;
|
|
@@ -4779,7 +4865,7 @@ window.Aura = (() => {
|
|
|
4779
4865
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4780
4866
|
[has, props.focusKey, keyed]
|
|
4781
4867
|
);
|
|
4782
|
-
|
|
4868
|
+
React27.useEffect(
|
|
4783
4869
|
function() {
|
|
4784
4870
|
if (!keyed) return;
|
|
4785
4871
|
function disarm() {
|
|
@@ -4798,7 +4884,7 @@ window.Aura = (() => {
|
|
|
4798
4884
|
[keyed]
|
|
4799
4885
|
);
|
|
4800
4886
|
if (!list.length) return null;
|
|
4801
|
-
return /* @__PURE__ */
|
|
4887
|
+
return /* @__PURE__ */ React27.createElement(
|
|
4802
4888
|
"div",
|
|
4803
4889
|
{
|
|
4804
4890
|
ref: function(el) {
|
|
@@ -4812,9 +4898,9 @@ window.Aura = (() => {
|
|
|
4812
4898
|
"aria-labelledby": id + "-title",
|
|
4813
4899
|
className: cx("aura-alert aura-alert--danger aura-error-summary", props.className)
|
|
4814
4900
|
},
|
|
4815
|
-
/* @__PURE__ */
|
|
4816
|
-
/* @__PURE__ */
|
|
4817
|
-
return /* @__PURE__ */
|
|
4901
|
+
/* @__PURE__ */ React27.createElement(Icon, { name: /* @__PURE__ */ React27.createElement(IconCircleAlert, null), className: "aura-alert__icon" }),
|
|
4902
|
+
/* @__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) {
|
|
4903
|
+
return /* @__PURE__ */ React27.createElement("li", { key: e.field }, /* @__PURE__ */ React27.createElement(
|
|
4818
4904
|
"a",
|
|
4819
4905
|
{
|
|
4820
4906
|
href: "#" + e.field,
|
|
@@ -4839,14 +4925,14 @@ window.Aura = (() => {
|
|
|
4839
4925
|
);
|
|
4840
4926
|
|
|
4841
4927
|
// src/FilterBar.tsx
|
|
4842
|
-
var
|
|
4928
|
+
var React32 = __toESM(require_react(), 1);
|
|
4843
4929
|
|
|
4844
4930
|
// src/Dialog.tsx
|
|
4845
|
-
var
|
|
4931
|
+
var React29 = __toESM(require_react(), 1);
|
|
4846
4932
|
var import_react_dom7 = __toESM(require_react_dom(), 1);
|
|
4847
4933
|
|
|
4848
4934
|
// src/useModal.tsx
|
|
4849
|
-
var
|
|
4935
|
+
var React28 = __toESM(require_react(), 1);
|
|
4850
4936
|
var locks = 0;
|
|
4851
4937
|
var savedOverflow = "";
|
|
4852
4938
|
function lockScroll() {
|
|
@@ -4873,11 +4959,11 @@ window.Aura = (() => {
|
|
|
4873
4959
|
}
|
|
4874
4960
|
function useModal(open, ref, opts) {
|
|
4875
4961
|
const mounted = useMounted();
|
|
4876
|
-
const prev =
|
|
4962
|
+
const prev = React28.useRef(null);
|
|
4877
4963
|
const o = opts || {};
|
|
4878
|
-
const latest =
|
|
4964
|
+
const latest = React28.useRef(o);
|
|
4879
4965
|
latest.current = o;
|
|
4880
|
-
|
|
4966
|
+
React28.useEffect(
|
|
4881
4967
|
function() {
|
|
4882
4968
|
if (!open || !mounted) return;
|
|
4883
4969
|
prev.current = document.activeElement;
|
|
@@ -4932,15 +5018,15 @@ window.Aura = (() => {
|
|
|
4932
5018
|
}
|
|
4933
5019
|
|
|
4934
5020
|
// src/Dialog.tsx
|
|
4935
|
-
var DialogClose =
|
|
5021
|
+
var DialogClose = React29.createContext(null);
|
|
4936
5022
|
function useDialogClose() {
|
|
4937
|
-
return
|
|
5023
|
+
return React29.useContext(DialogClose) || function() {
|
|
4938
5024
|
};
|
|
4939
5025
|
}
|
|
4940
|
-
var Dialog =
|
|
5026
|
+
var Dialog = React29.forwardRef(function Dialog2(props, ref) {
|
|
4941
5027
|
const t = useStrings();
|
|
4942
5028
|
const density = useDensity();
|
|
4943
|
-
const own =
|
|
5029
|
+
const own = React29.useRef(null), merged = useMergedRef(ref, own), titleId = uid(), descId = uid();
|
|
4944
5030
|
const openState = useMaybeControlled(props.open, false, null), open = openState[0];
|
|
4945
5031
|
if (props.open === void 0 && !props.trigger)
|
|
4946
5032
|
devWarnOnce("dialog-no-open", "Dialog has neither `open` nor `trigger`, so it can never open. Pass one of them.");
|
|
@@ -4968,7 +5054,7 @@ window.Aura = (() => {
|
|
|
4968
5054
|
onCloseComplete: props.onCloseComplete
|
|
4969
5055
|
});
|
|
4970
5056
|
const trig = props.trigger;
|
|
4971
|
-
const trigger = trig &&
|
|
5057
|
+
const trigger = trig && React29.isValidElement(trig) ? React29.cloneElement(trig, {
|
|
4972
5058
|
"aria-haspopup": "dialog",
|
|
4973
5059
|
"aria-expanded": open,
|
|
4974
5060
|
"data-aura-trigger": trigId,
|
|
@@ -5003,7 +5089,7 @@ window.Aura = (() => {
|
|
|
5003
5089
|
"aria-modal"
|
|
5004
5090
|
]);
|
|
5005
5091
|
const panel = (0, import_react_dom7.createPortal)(
|
|
5006
|
-
/* @__PURE__ */
|
|
5092
|
+
/* @__PURE__ */ React29.createElement("div", { className: "aura-dialog-layer", "data-density": density, onKeyDown: modal.onKeyDown }, /* @__PURE__ */ React29.createElement(
|
|
5007
5093
|
"div",
|
|
5008
5094
|
{
|
|
5009
5095
|
className: "aura-scrim",
|
|
@@ -5013,7 +5099,7 @@ window.Aura = (() => {
|
|
|
5013
5099
|
},
|
|
5014
5100
|
"aria-hidden": true
|
|
5015
5101
|
}
|
|
5016
|
-
), /* @__PURE__ */
|
|
5102
|
+
), /* @__PURE__ */ React29.createElement(
|
|
5017
5103
|
"div",
|
|
5018
5104
|
{
|
|
5019
5105
|
...rest,
|
|
@@ -5025,18 +5111,18 @@ window.Aura = (() => {
|
|
|
5025
5111
|
tabIndex: -1,
|
|
5026
5112
|
className: cx("aura-dialog", "aura-dialog--" + (props.size || "md"), props.className)
|
|
5027
5113
|
},
|
|
5028
|
-
/* @__PURE__ */
|
|
5029
|
-
props.description ? /* @__PURE__ */
|
|
5030
|
-
/* @__PURE__ */
|
|
5114
|
+
/* @__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),
|
|
5115
|
+
props.description ? /* @__PURE__ */ React29.createElement("p", { className: "aura-dialog__desc", id: descId }, props.description) : null,
|
|
5116
|
+
/* @__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
5117
|
)),
|
|
5032
5118
|
document.body
|
|
5033
5119
|
);
|
|
5034
|
-
return trigger ? /* @__PURE__ */
|
|
5120
|
+
return trigger ? /* @__PURE__ */ React29.createElement(React29.Fragment, null, trigger, panel) : panel;
|
|
5035
5121
|
});
|
|
5036
|
-
var Drawer =
|
|
5122
|
+
var Drawer = React29.forwardRef(function Drawer2(props, ref) {
|
|
5037
5123
|
const t = useStrings();
|
|
5038
5124
|
const density = useDensity();
|
|
5039
|
-
const own =
|
|
5125
|
+
const own = React29.useRef(null), merged = useMergedRef(ref, own), titleId = uid(), descId = uid();
|
|
5040
5126
|
function close() {
|
|
5041
5127
|
if (props.dismissible !== false && props.onClose) props.onClose();
|
|
5042
5128
|
}
|
|
@@ -5073,7 +5159,7 @@ window.Aura = (() => {
|
|
|
5073
5159
|
]);
|
|
5074
5160
|
const drawerScrimCloses = props.dismissible !== false && props.dismissOnScrim !== false;
|
|
5075
5161
|
return (0, import_react_dom7.createPortal)(
|
|
5076
|
-
/* @__PURE__ */
|
|
5162
|
+
/* @__PURE__ */ React29.createElement("div", { className: "aura-dialog-layer aura-drawer-layer", "data-density": density, onKeyDown: modal.onKeyDown }, /* @__PURE__ */ React29.createElement(
|
|
5077
5163
|
"div",
|
|
5078
5164
|
{
|
|
5079
5165
|
className: "aura-scrim",
|
|
@@ -5083,7 +5169,7 @@ window.Aura = (() => {
|
|
|
5083
5169
|
} : void 0,
|
|
5084
5170
|
"aria-hidden": true
|
|
5085
5171
|
}
|
|
5086
|
-
), /* @__PURE__ */
|
|
5172
|
+
), /* @__PURE__ */ React29.createElement(
|
|
5087
5173
|
"div",
|
|
5088
5174
|
{
|
|
5089
5175
|
...rest,
|
|
@@ -5096,11 +5182,11 @@ window.Aura = (() => {
|
|
|
5096
5182
|
tabIndex: -1,
|
|
5097
5183
|
className: cx("aura-drawer", "aura-drawer--" + side, "aura-drawer--" + (props.size || "md"), props.className)
|
|
5098
5184
|
},
|
|
5099
|
-
props.title || props.dismissible !== false ? /* @__PURE__ */
|
|
5185
|
+
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
5186
|
IconButton,
|
|
5101
5187
|
{
|
|
5102
5188
|
...props.closeProps,
|
|
5103
|
-
icon: /* @__PURE__ */
|
|
5189
|
+
icon: /* @__PURE__ */ React29.createElement(IconX, null),
|
|
5104
5190
|
label: props.closeLabel || t.close,
|
|
5105
5191
|
onClick: function(e) {
|
|
5106
5192
|
const own2 = props.closeProps && props.closeProps.onClick;
|
|
@@ -5109,24 +5195,24 @@ window.Aura = (() => {
|
|
|
5109
5195
|
}
|
|
5110
5196
|
}
|
|
5111
5197
|
) : null) : null,
|
|
5112
|
-
props.description ? /* @__PURE__ */
|
|
5113
|
-
/* @__PURE__ */
|
|
5114
|
-
props.footer ? /* @__PURE__ */
|
|
5198
|
+
props.description ? /* @__PURE__ */ React29.createElement("p", { className: "aura-drawer__desc", id: descId }, props.description) : null,
|
|
5199
|
+
/* @__PURE__ */ React29.createElement("div", { className: "aura-drawer__body" }, props.children),
|
|
5200
|
+
props.footer ? /* @__PURE__ */ React29.createElement("div", { className: "aura-drawer__foot" }, props.footer) : null
|
|
5115
5201
|
)),
|
|
5116
5202
|
document.body
|
|
5117
5203
|
);
|
|
5118
5204
|
});
|
|
5119
5205
|
|
|
5120
5206
|
// src/Tag.tsx
|
|
5121
|
-
var
|
|
5207
|
+
var React31 = __toESM(require_react(), 1);
|
|
5122
5208
|
|
|
5123
5209
|
// src/Tooltip.tsx
|
|
5124
|
-
var
|
|
5210
|
+
var React30 = __toESM(require_react(), 1);
|
|
5125
5211
|
var import_react_dom8 = __toESM(require_react_dom(), 1);
|
|
5126
|
-
var Tooltip =
|
|
5127
|
-
const id = uid(), st =
|
|
5128
|
-
const anchor =
|
|
5129
|
-
const pos =
|
|
5212
|
+
var Tooltip = React30.forwardRef(function Tooltip2(props, ref) {
|
|
5213
|
+
const id = uid(), st = React30.useState(false), open = props.open !== void 0 ? props.open : st[0], set = st[1];
|
|
5214
|
+
const anchor = React30.useRef(null), anchorMerged = useMergedRef(ref, anchor), tip2 = React30.useRef(null), timer2 = React30.useRef(void 0);
|
|
5215
|
+
const pos = React30.useState(null), mounted = useMounted();
|
|
5130
5216
|
function show3(now) {
|
|
5131
5217
|
clearTimeout(timer2.current);
|
|
5132
5218
|
timer2.current = setTimeout(
|
|
@@ -5146,7 +5232,7 @@ window.Aura = (() => {
|
|
|
5146
5232
|
set(false);
|
|
5147
5233
|
}, 120);
|
|
5148
5234
|
}
|
|
5149
|
-
|
|
5235
|
+
React30.useEffect(function() {
|
|
5150
5236
|
return function() {
|
|
5151
5237
|
clearTimeout(timer2.current);
|
|
5152
5238
|
};
|
|
@@ -5190,7 +5276,7 @@ window.Aura = (() => {
|
|
|
5190
5276
|
},
|
|
5191
5277
|
[open, mounted]
|
|
5192
5278
|
);
|
|
5193
|
-
|
|
5279
|
+
React30.useEffect(
|
|
5194
5280
|
function() {
|
|
5195
5281
|
if (!open) return;
|
|
5196
5282
|
function esc(e) {
|
|
@@ -5203,8 +5289,8 @@ window.Aura = (() => {
|
|
|
5203
5289
|
},
|
|
5204
5290
|
[open]
|
|
5205
5291
|
);
|
|
5206
|
-
const child =
|
|
5207
|
-
const trigger = /* @__PURE__ */
|
|
5292
|
+
const child = React30.Children.only(props.children);
|
|
5293
|
+
const trigger = /* @__PURE__ */ React30.createElement(
|
|
5208
5294
|
"span",
|
|
5209
5295
|
{
|
|
5210
5296
|
ref: anchorMerged,
|
|
@@ -5218,10 +5304,10 @@ window.Aura = (() => {
|
|
|
5218
5304
|
},
|
|
5219
5305
|
onBlur: hide2
|
|
5220
5306
|
},
|
|
5221
|
-
|
|
5307
|
+
React30.cloneElement(child, { "aria-describedby": open ? id : child.props["aria-describedby"] })
|
|
5222
5308
|
);
|
|
5223
|
-
return /* @__PURE__ */
|
|
5224
|
-
/* @__PURE__ */
|
|
5309
|
+
return /* @__PURE__ */ React30.createElement(React30.Fragment, null, trigger, open && mounted ? (0, import_react_dom8.createPortal)(
|
|
5310
|
+
/* @__PURE__ */ React30.createElement(
|
|
5225
5311
|
"div",
|
|
5226
5312
|
{
|
|
5227
5313
|
ref: tip2,
|
|
@@ -5248,13 +5334,13 @@ window.Aura = (() => {
|
|
|
5248
5334
|
return node.map(function(n3) {
|
|
5249
5335
|
return textOf2(n3, all);
|
|
5250
5336
|
}).join("");
|
|
5251
|
-
if (
|
|
5337
|
+
if (React31.isValidElement(node)) {
|
|
5252
5338
|
const p = node.props;
|
|
5253
5339
|
return !all && (p["aria-hidden"] === true || p["aria-hidden"] === "true") ? "" : textOf2(p.children, all);
|
|
5254
5340
|
}
|
|
5255
5341
|
return "";
|
|
5256
5342
|
}
|
|
5257
|
-
var Tag =
|
|
5343
|
+
var Tag = React31.forwardRef(function Tag2(props, ref) {
|
|
5258
5344
|
const t = useStrings();
|
|
5259
5345
|
const selectable = props.onClick != null || props.selected != null;
|
|
5260
5346
|
const rest = omit(props, [
|
|
@@ -5267,10 +5353,10 @@ window.Aura = (() => {
|
|
|
5267
5353
|
"removeLabel",
|
|
5268
5354
|
"touchHeight"
|
|
5269
5355
|
]);
|
|
5270
|
-
const textRef =
|
|
5356
|
+
const textRef = React31.useRef(null);
|
|
5271
5357
|
useAutoTip();
|
|
5272
|
-
const cutState =
|
|
5273
|
-
const check =
|
|
5358
|
+
const cutState = React31.useState(false), isCut = cutState[0];
|
|
5359
|
+
const check = React31.useCallback(function() {
|
|
5274
5360
|
const el = textRef.current;
|
|
5275
5361
|
if (el) cutState[1](el.scrollWidth > el.clientWidth + 1);
|
|
5276
5362
|
}, []);
|
|
@@ -5289,11 +5375,11 @@ window.Aura = (() => {
|
|
|
5289
5375
|
);
|
|
5290
5376
|
const fullText = isCut ? textOf2(props.children, true).replace(/\s+/g, " ").trim() : "";
|
|
5291
5377
|
const inner = [
|
|
5292
|
-
props.icon ? /* @__PURE__ */
|
|
5293
|
-
/* @__PURE__ */
|
|
5378
|
+
props.icon ? /* @__PURE__ */ React31.createElement(Icon, { key: "i", name: props.icon, size: 14 }) : null,
|
|
5379
|
+
/* @__PURE__ */ React31.createElement("span", { key: "t", ref: textRef, className: "aura-tag__text", "data-aura-tip": fullText || void 0 }, props.children)
|
|
5294
5380
|
];
|
|
5295
5381
|
if (selectable) {
|
|
5296
|
-
return /* @__PURE__ */
|
|
5382
|
+
return /* @__PURE__ */ React31.createElement(
|
|
5297
5383
|
"button",
|
|
5298
5384
|
{
|
|
5299
5385
|
...rest,
|
|
@@ -5308,7 +5394,7 @@ window.Aura = (() => {
|
|
|
5308
5394
|
props.className
|
|
5309
5395
|
)
|
|
5310
5396
|
},
|
|
5311
|
-
props.selected ? /* @__PURE__ */
|
|
5397
|
+
props.selected ? /* @__PURE__ */ React31.createElement(Icon, { name: /* @__PURE__ */ React31.createElement(IconCheck, null), size: 14 }) : inner[0],
|
|
5312
5398
|
inner[1]
|
|
5313
5399
|
);
|
|
5314
5400
|
}
|
|
@@ -5318,8 +5404,8 @@ window.Aura = (() => {
|
|
|
5318
5404
|
"tag-remove-label",
|
|
5319
5405
|
'Tag: the remove button has no name \u2014 its children have no text. Pass removeLabel (e.g. "Remove Acme AB").'
|
|
5320
5406
|
);
|
|
5321
|
-
return /* @__PURE__ */
|
|
5322
|
-
const btn = /* @__PURE__ */
|
|
5407
|
+
return /* @__PURE__ */ React31.createElement("span", { ...rest, ref, className: cx("aura-tag", props.disabled && "is-disabled", props.className) }, inner, props.onRemove && !props.disabled ? function() {
|
|
5408
|
+
const btn = /* @__PURE__ */ React31.createElement(
|
|
5323
5409
|
"button",
|
|
5324
5410
|
{
|
|
5325
5411
|
type: "button",
|
|
@@ -5327,9 +5413,9 @@ window.Aura = (() => {
|
|
|
5327
5413
|
"aria-label": props.removeLabel || t.remove(name),
|
|
5328
5414
|
onClick: props.onRemove
|
|
5329
5415
|
},
|
|
5330
|
-
/* @__PURE__ */
|
|
5416
|
+
/* @__PURE__ */ React31.createElement(Icon, { name: /* @__PURE__ */ React31.createElement(IconX, null), size: 14 })
|
|
5331
5417
|
);
|
|
5332
|
-
return /* @__PURE__ */
|
|
5418
|
+
return /* @__PURE__ */ React31.createElement(Tooltip, { content: fullText, open: fullText ? void 0 : false }, btn);
|
|
5333
5419
|
}() : null);
|
|
5334
5420
|
});
|
|
5335
5421
|
|
|
@@ -5352,16 +5438,16 @@ window.Aura = (() => {
|
|
|
5352
5438
|
};
|
|
5353
5439
|
|
|
5354
5440
|
// src/FilterBar.tsx
|
|
5355
|
-
var FilterBar =
|
|
5441
|
+
var FilterBar = React32.forwardRef(function FilterBar2(props, ref) {
|
|
5356
5442
|
const t = useStrings();
|
|
5357
5443
|
const id = uid();
|
|
5358
5444
|
const hasSearch = !!props.onSearchChange;
|
|
5359
|
-
const draft =
|
|
5360
|
-
const timer2 =
|
|
5361
|
-
const sent =
|
|
5362
|
-
const onChange =
|
|
5445
|
+
const draft = React32.useState(props.search || "");
|
|
5446
|
+
const timer2 = React32.useRef(null);
|
|
5447
|
+
const sent = React32.useRef(props.search || "");
|
|
5448
|
+
const onChange = React32.useRef(props.onSearchChange);
|
|
5363
5449
|
onChange.current = props.onSearchChange;
|
|
5364
|
-
|
|
5450
|
+
React32.useEffect(
|
|
5365
5451
|
function() {
|
|
5366
5452
|
if ((props.search || "") !== sent.current) {
|
|
5367
5453
|
sent.current = props.search || "";
|
|
@@ -5370,7 +5456,7 @@ window.Aura = (() => {
|
|
|
5370
5456
|
},
|
|
5371
5457
|
[props.search]
|
|
5372
5458
|
);
|
|
5373
|
-
|
|
5459
|
+
React32.useEffect(function() {
|
|
5374
5460
|
return function() {
|
|
5375
5461
|
if (timer2.current) clearTimeout(timer2.current);
|
|
5376
5462
|
};
|
|
@@ -5393,14 +5479,14 @@ window.Aura = (() => {
|
|
|
5393
5479
|
);
|
|
5394
5480
|
}
|
|
5395
5481
|
const filters = props.filters || [];
|
|
5396
|
-
const hasChildren =
|
|
5482
|
+
const hasChildren = React32.Children.toArray(props.children).length > 0;
|
|
5397
5483
|
const collapse = props.collapseBelow && hasChildren ? props.collapseBelow : null;
|
|
5398
|
-
const sheet =
|
|
5484
|
+
const sheet = React32.useState(false), open = !!collapse && sheet[0];
|
|
5399
5485
|
const sheetId = id + "-filters";
|
|
5400
|
-
const doneRef =
|
|
5486
|
+
const doneRef = React32.useRef(null), moreRef = React32.useRef(null), own = React32.useRef(null), rootRef = useMergedRef(ref, own);
|
|
5401
5487
|
if (collapse)
|
|
5402
|
-
|
|
5403
|
-
if (!
|
|
5488
|
+
React32.Children.forEach(props.children, function(c) {
|
|
5489
|
+
if (!React32.isValidElement(c) || c.type === Button || c.type === IconButton) return;
|
|
5404
5490
|
const p = c.props;
|
|
5405
5491
|
if (p.defaultValue !== void 0 || p.defaultChecked !== void 0 || "label" in p && !("value" in p) && !("selected" in p) && !("checked" in p))
|
|
5406
5492
|
devWarnOnce(
|
|
@@ -5418,7 +5504,7 @@ window.Aura = (() => {
|
|
|
5418
5504
|
) || bar.querySelector(".aura-filterbar__search input");
|
|
5419
5505
|
}
|
|
5420
5506
|
const applied = props.filterCount != null ? props.filterCount : filters.length;
|
|
5421
|
-
|
|
5507
|
+
React32.useEffect(
|
|
5422
5508
|
function() {
|
|
5423
5509
|
if (!open || !collapse || typeof window.matchMedia !== "function") return;
|
|
5424
5510
|
const mq = window.matchMedia("(min-width: " + breakpoints[collapse] + "px)");
|
|
@@ -5443,7 +5529,7 @@ window.Aura = (() => {
|
|
|
5443
5529
|
}
|
|
5444
5530
|
const anything = filters.length > 0 || !!(props.search || draft[0]);
|
|
5445
5531
|
const count = props.resultCount == null ? null : typeof props.resultCount === "number" ? t.results(props.resultCount) : props.resultCount;
|
|
5446
|
-
const searchBox = hasSearch ? /* @__PURE__ */
|
|
5532
|
+
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
5533
|
"input",
|
|
5448
5534
|
{
|
|
5449
5535
|
id,
|
|
@@ -5464,10 +5550,10 @@ window.Aura = (() => {
|
|
|
5464
5550
|
}
|
|
5465
5551
|
}
|
|
5466
5552
|
}
|
|
5467
|
-
), draft[0] ? /* @__PURE__ */
|
|
5553
|
+
), draft[0] ? /* @__PURE__ */ React32.createElement(
|
|
5468
5554
|
IconButton,
|
|
5469
5555
|
{
|
|
5470
|
-
icon: /* @__PURE__ */
|
|
5556
|
+
icon: /* @__PURE__ */ React32.createElement(IconX, null),
|
|
5471
5557
|
label: t.clear((props.searchLabel || t.search).toLowerCase()),
|
|
5472
5558
|
className: "aura-filterbar__clear-search",
|
|
5473
5559
|
onClick: function() {
|
|
@@ -5476,12 +5562,12 @@ window.Aura = (() => {
|
|
|
5476
5562
|
}
|
|
5477
5563
|
}
|
|
5478
5564
|
) : null) : null;
|
|
5479
|
-
const more = collapse ? /* @__PURE__ */
|
|
5565
|
+
const more = collapse ? /* @__PURE__ */ React32.createElement(
|
|
5480
5566
|
Button,
|
|
5481
5567
|
{
|
|
5482
5568
|
ref: moreRef,
|
|
5483
5569
|
variant: "secondary",
|
|
5484
|
-
icon: /* @__PURE__ */
|
|
5570
|
+
icon: /* @__PURE__ */ React32.createElement(IconSlidersHorizontal, null),
|
|
5485
5571
|
className: "aura-filterbar__more",
|
|
5486
5572
|
"aria-haspopup": "dialog",
|
|
5487
5573
|
"aria-expanded": open,
|
|
@@ -5490,9 +5576,9 @@ window.Aura = (() => {
|
|
|
5490
5576
|
sheet[1](true);
|
|
5491
5577
|
}
|
|
5492
5578
|
},
|
|
5493
|
-
applied > 0 ? /* @__PURE__ */
|
|
5579
|
+
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
5580
|
) : null;
|
|
5495
|
-
return /* @__PURE__ */
|
|
5581
|
+
return /* @__PURE__ */ React32.createElement(
|
|
5496
5582
|
"div",
|
|
5497
5583
|
{
|
|
5498
5584
|
ref: rootRef,
|
|
@@ -5508,15 +5594,15 @@ window.Aura = (() => {
|
|
|
5508
5594
|
props.className
|
|
5509
5595
|
)
|
|
5510
5596
|
},
|
|
5511
|
-
/* @__PURE__ */
|
|
5597
|
+
/* @__PURE__ */ React32.createElement("div", { className: "aura-filterbar__row" }, collapse ? (
|
|
5512
5598
|
/* 5.42: the search and the Filters button share a row of their own below the breakpoint (count and actions
|
|
5513
5599
|
* 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__ */
|
|
5600
|
+
/* @__PURE__ */ React32.createElement("div", { className: cx("aura-filterbar__lead", !hasSearch && "is-alone") }, searchBox, more)
|
|
5601
|
+
) : 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),
|
|
5602
|
+
filters.length || props.onClearAll && anything ? /* @__PURE__ */ React32.createElement("div", { className: "aura-filterbar__chips" }, filters.map(function(f) {
|
|
5603
|
+
return /* @__PURE__ */ React32.createElement(Tag, { key: f.id, onRemove: f.onRemove }, f.label);
|
|
5604
|
+
}), props.onClearAll && anything ? /* @__PURE__ */ React32.createElement("button", { type: "button", className: "aura-filterbar__clear", onClick: clearAll }, t.clearFilters) : null) : null,
|
|
5605
|
+
collapse ? /* @__PURE__ */ React32.createElement(
|
|
5520
5606
|
Dialog,
|
|
5521
5607
|
{
|
|
5522
5608
|
open,
|
|
@@ -5528,7 +5614,7 @@ window.Aura = (() => {
|
|
|
5528
5614
|
title: t.filters,
|
|
5529
5615
|
size: "sm",
|
|
5530
5616
|
className: "aura-filterbar__sheet",
|
|
5531
|
-
footer: /* @__PURE__ */
|
|
5617
|
+
footer: /* @__PURE__ */ React32.createElement(React32.Fragment, null, props.onClearAll && filters.length ? /* @__PURE__ */ React32.createElement(
|
|
5532
5618
|
Button,
|
|
5533
5619
|
{
|
|
5534
5620
|
variant: "secondary",
|
|
@@ -5539,7 +5625,7 @@ window.Aura = (() => {
|
|
|
5539
5625
|
}
|
|
5540
5626
|
},
|
|
5541
5627
|
t.clearFilters
|
|
5542
|
-
) : null, /* @__PURE__ */
|
|
5628
|
+
) : null, /* @__PURE__ */ React32.createElement(
|
|
5543
5629
|
Button,
|
|
5544
5630
|
{
|
|
5545
5631
|
ref: doneRef,
|
|
@@ -5551,13 +5637,13 @@ window.Aura = (() => {
|
|
|
5551
5637
|
t.done
|
|
5552
5638
|
))
|
|
5553
5639
|
},
|
|
5554
|
-
/* @__PURE__ */
|
|
5640
|
+
/* @__PURE__ */ React32.createElement(FilterSheet.Provider, { value: true }, /* @__PURE__ */ React32.createElement("div", { className: "aura-filterbar aura-filterbar--sheet is-touch-always" }, props.children))
|
|
5555
5641
|
) : null
|
|
5556
5642
|
);
|
|
5557
5643
|
});
|
|
5558
5644
|
|
|
5559
5645
|
// src/Command.tsx
|
|
5560
|
-
var
|
|
5646
|
+
var React33 = __toESM(require_react(), 1);
|
|
5561
5647
|
var import_react_dom9 = __toESM(require_react_dom(), 1);
|
|
5562
5648
|
function isMac() {
|
|
5563
5649
|
return typeof navigator !== "undefined" && /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent);
|
|
@@ -5566,21 +5652,21 @@ window.Aura = (() => {
|
|
|
5566
5652
|
const t = useStrings();
|
|
5567
5653
|
const density = useDensity();
|
|
5568
5654
|
const id = uid(), listId = id + "-list";
|
|
5569
|
-
const box =
|
|
5570
|
-
const input =
|
|
5571
|
-
const qState =
|
|
5655
|
+
const box = React33.useRef(null);
|
|
5656
|
+
const input = React33.useRef(null);
|
|
5657
|
+
const qState = React33.useState(""), act = React33.useState(null);
|
|
5572
5658
|
const query = props.query !== void 0 ? props.query : qState[0];
|
|
5573
5659
|
function setQuery(v) {
|
|
5574
5660
|
if (props.query === void 0) qState[1](v);
|
|
5575
5661
|
if (props.onQueryChange) props.onQueryChange(v);
|
|
5576
5662
|
}
|
|
5577
|
-
const openRef =
|
|
5663
|
+
const openRef = React33.useRef(props.open);
|
|
5578
5664
|
openRef.current = props.open;
|
|
5579
5665
|
const close = function() {
|
|
5580
5666
|
props.onOpenChange(false);
|
|
5581
5667
|
};
|
|
5582
5668
|
const modal = useModal(props.open, box, { onEscape: close });
|
|
5583
|
-
|
|
5669
|
+
React33.useEffect(
|
|
5584
5670
|
function() {
|
|
5585
5671
|
if (props.hotkey === false) return;
|
|
5586
5672
|
function onKey2(e) {
|
|
@@ -5596,7 +5682,7 @@ window.Aura = (() => {
|
|
|
5596
5682
|
},
|
|
5597
5683
|
[props.hotkey, props.onOpenChange]
|
|
5598
5684
|
);
|
|
5599
|
-
|
|
5685
|
+
React33.useEffect(
|
|
5600
5686
|
function() {
|
|
5601
5687
|
if (!props.open) {
|
|
5602
5688
|
if (query) setQuery("");
|
|
@@ -5636,7 +5722,7 @@ window.Aura = (() => {
|
|
|
5636
5722
|
const optId = function(i2) {
|
|
5637
5723
|
return id + "-o" + i2;
|
|
5638
5724
|
};
|
|
5639
|
-
|
|
5725
|
+
React33.useEffect(
|
|
5640
5726
|
function() {
|
|
5641
5727
|
if (!box.current || active < 0) return;
|
|
5642
5728
|
const el = box.current.querySelector("#" + CSS.escape(optId(active)));
|
|
@@ -5681,7 +5767,7 @@ window.Aura = (() => {
|
|
|
5681
5767
|
if (!modal.ready) return null;
|
|
5682
5768
|
let i = -1;
|
|
5683
5769
|
return (0, import_react_dom9.createPortal)(
|
|
5684
|
-
/* @__PURE__ */
|
|
5770
|
+
/* @__PURE__ */ React33.createElement(
|
|
5685
5771
|
"div",
|
|
5686
5772
|
{
|
|
5687
5773
|
className: "aura-dialog-layer aura-command-layer",
|
|
@@ -5691,8 +5777,8 @@ window.Aura = (() => {
|
|
|
5691
5777
|
e.stopPropagation();
|
|
5692
5778
|
}
|
|
5693
5779
|
},
|
|
5694
|
-
/* @__PURE__ */
|
|
5695
|
-
/* @__PURE__ */
|
|
5780
|
+
/* @__PURE__ */ React33.createElement("div", { className: "aura-scrim", onClick: close, "aria-hidden": true }),
|
|
5781
|
+
/* @__PURE__ */ React33.createElement(
|
|
5696
5782
|
"div",
|
|
5697
5783
|
{
|
|
5698
5784
|
ref: box,
|
|
@@ -5702,7 +5788,7 @@ window.Aura = (() => {
|
|
|
5702
5788
|
tabIndex: -1,
|
|
5703
5789
|
className: cx("aura-command", props.className)
|
|
5704
5790
|
},
|
|
5705
|
-
/* @__PURE__ */
|
|
5791
|
+
/* @__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
5792
|
"input",
|
|
5707
5793
|
{
|
|
5708
5794
|
ref: input,
|
|
@@ -5725,8 +5811,8 @@ window.Aura = (() => {
|
|
|
5725
5811
|
},
|
|
5726
5812
|
onKeyDown: onKey
|
|
5727
5813
|
}
|
|
5728
|
-
), /* @__PURE__ */
|
|
5729
|
-
/* @__PURE__ */
|
|
5814
|
+
), /* @__PURE__ */ React33.createElement("kbd", { className: "aura-command__kbd" }, "Esc")),
|
|
5815
|
+
/* @__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
5816
|
"div",
|
|
5731
5817
|
{
|
|
5732
5818
|
id: listId,
|
|
@@ -5736,7 +5822,7 @@ window.Aura = (() => {
|
|
|
5736
5822
|
},
|
|
5737
5823
|
groups.map(function(g, gi) {
|
|
5738
5824
|
const gid = id + "-g" + gi;
|
|
5739
|
-
return /* @__PURE__ */
|
|
5825
|
+
return /* @__PURE__ */ React33.createElement(
|
|
5740
5826
|
"div",
|
|
5741
5827
|
{
|
|
5742
5828
|
key: g.name || gi,
|
|
@@ -5744,11 +5830,11 @@ window.Aura = (() => {
|
|
|
5744
5830
|
"aria-labelledby": g.name ? gid : void 0,
|
|
5745
5831
|
className: "aura-command__group"
|
|
5746
5832
|
},
|
|
5747
|
-
g.name ? /* @__PURE__ */
|
|
5833
|
+
g.name ? /* @__PURE__ */ React33.createElement("div", { className: "aura-command__heading", id: gid, role: "presentation" }, g.name) : null,
|
|
5748
5834
|
g.items.map(function(it) {
|
|
5749
5835
|
i++;
|
|
5750
5836
|
const n3 = i;
|
|
5751
|
-
return /* @__PURE__ */
|
|
5837
|
+
return /* @__PURE__ */ React33.createElement(
|
|
5752
5838
|
"div",
|
|
5753
5839
|
{
|
|
5754
5840
|
key: it.id,
|
|
@@ -5772,16 +5858,16 @@ window.Aura = (() => {
|
|
|
5772
5858
|
run(it);
|
|
5773
5859
|
}
|
|
5774
5860
|
},
|
|
5775
|
-
it.icon ? /* @__PURE__ */
|
|
5776
|
-
/* @__PURE__ */
|
|
5777
|
-
it.shortcut ? /* @__PURE__ */
|
|
5861
|
+
it.icon ? /* @__PURE__ */ React33.createElement(Icon, { name: it.icon }) : null,
|
|
5862
|
+
/* @__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),
|
|
5863
|
+
it.shortcut ? /* @__PURE__ */ React33.createElement("kbd", { className: "aura-command__kbd", id: it.description ? optId(n3) + "-kbd" : void 0 }, it.shortcut) : null
|
|
5778
5864
|
);
|
|
5779
5865
|
})
|
|
5780
5866
|
);
|
|
5781
5867
|
})
|
|
5782
5868
|
)),
|
|
5783
|
-
/* @__PURE__ */
|
|
5784
|
-
/* @__PURE__ */
|
|
5869
|
+
/* @__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) : ""),
|
|
5870
|
+
/* @__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
5871
|
)
|
|
5786
5872
|
),
|
|
5787
5873
|
document.body
|
|
@@ -5789,7 +5875,7 @@ window.Aura = (() => {
|
|
|
5789
5875
|
}
|
|
5790
5876
|
|
|
5791
5877
|
// src/DataTable.tsx
|
|
5792
|
-
var
|
|
5878
|
+
var React34 = __toESM(require_react(), 1);
|
|
5793
5879
|
var import_react_dom10 = __toESM(require_react_dom(), 1);
|
|
5794
5880
|
function ownRowAttrs(p) {
|
|
5795
5881
|
if (!p) return null;
|
|
@@ -5825,7 +5911,7 @@ window.Aura = (() => {
|
|
|
5825
5911
|
var ROW_H_DEFAULT = 48;
|
|
5826
5912
|
var OVERSCAN = 8;
|
|
5827
5913
|
var FLEX_MIN = 160;
|
|
5828
|
-
var DataTableImpl =
|
|
5914
|
+
var DataTableImpl = React34.forwardRef(function DataTable(props, ref) {
|
|
5829
5915
|
const t = useStrings();
|
|
5830
5916
|
const columns = props.columns || DEFAULT_COLUMNS;
|
|
5831
5917
|
const byKey = {};
|
|
@@ -5852,7 +5938,7 @@ window.Aura = (() => {
|
|
|
5852
5938
|
);
|
|
5853
5939
|
const sort = sortState[0], setSort = sortState[1];
|
|
5854
5940
|
const selState = useMaybeControlled(props.selected, props.defaultSelected || [], null);
|
|
5855
|
-
const onSel =
|
|
5941
|
+
const onSel = React34.useRef(props.onSelectionChange);
|
|
5856
5942
|
onSel.current = props.onSelectionChange;
|
|
5857
5943
|
const canSelect = function(r2) {
|
|
5858
5944
|
return !!r2 && (!props.isRowSelectable || !!props.isRowSelectable(r2));
|
|
@@ -5872,7 +5958,7 @@ window.Aura = (() => {
|
|
|
5872
5958
|
const droppedSig = selState[0].length === selected.length ? "" : "#" + selState[0].filter(function(k) {
|
|
5873
5959
|
return rejected[String(k)];
|
|
5874
5960
|
}).join("\0") + "#" + selected.join("\0");
|
|
5875
|
-
|
|
5961
|
+
React34.useEffect(
|
|
5876
5962
|
function() {
|
|
5877
5963
|
if (droppedSig !== "") setSelected(selected);
|
|
5878
5964
|
},
|
|
@@ -5909,19 +5995,19 @@ window.Aura = (() => {
|
|
|
5909
5995
|
}),
|
|
5910
5996
|
props.onPinnedColumnsChange
|
|
5911
5997
|
);
|
|
5912
|
-
const widthState =
|
|
5998
|
+
const widthState = React34.useState({});
|
|
5913
5999
|
const widths = widthState[0], setWidths = widthState[1];
|
|
5914
|
-
const activeState =
|
|
5915
|
-
const scrollState =
|
|
6000
|
+
const activeState = React34.useState({ r: 1, c: 0 });
|
|
6001
|
+
const scrollState = React34.useState(0);
|
|
5916
6002
|
const scrollTop = scrollState[0], setScrollTop = scrollState[1];
|
|
5917
|
-
const scrolledX =
|
|
5918
|
-
const menuState =
|
|
6003
|
+
const scrolledX = React34.useState(false);
|
|
6004
|
+
const menuState = React34.useState(null);
|
|
5919
6005
|
const menu = menuState[0], setMenu = menuState[1];
|
|
5920
|
-
const dragState =
|
|
6006
|
+
const dragState = React34.useState(null);
|
|
5921
6007
|
const drag = dragState[0], setDrag = dragState[1];
|
|
5922
|
-
const gridRef =
|
|
5923
|
-
const wrapRef =
|
|
5924
|
-
const boxWidth =
|
|
6008
|
+
const gridRef = React34.useRef(null);
|
|
6009
|
+
const wrapRef = React34.useRef(null), wrapMerged = useMergedRef(ref, wrapRef);
|
|
6010
|
+
const boxWidth = React34.useState(null);
|
|
5925
6011
|
const measure = !!props.stackBelow || columns.some(function(c) {
|
|
5926
6012
|
return c.hideBelow != null;
|
|
5927
6013
|
});
|
|
@@ -5931,7 +6017,7 @@ window.Aura = (() => {
|
|
|
5931
6017
|
return px != null && a.indexOf(px) === i;
|
|
5932
6018
|
}).length
|
|
5933
6019
|
);
|
|
5934
|
-
|
|
6020
|
+
React34.useEffect(
|
|
5935
6021
|
function() {
|
|
5936
6022
|
if (!measure || !wrapRef.current || typeof ResizeObserver === "undefined") return;
|
|
5937
6023
|
const ro = new ResizeObserver(function(en) {
|
|
@@ -5977,8 +6063,8 @@ window.Aura = (() => {
|
|
|
5977
6063
|
const px = hidePx(c);
|
|
5978
6064
|
return px != null && below(boxWidth[0], px);
|
|
5979
6065
|
}
|
|
5980
|
-
const scrollRef =
|
|
5981
|
-
const edgeState =
|
|
6066
|
+
const scrollRef = React34.useRef(null);
|
|
6067
|
+
const edgeState = React34.useState("");
|
|
5982
6068
|
const checkMoreX = function() {
|
|
5983
6069
|
const el = scrollRef.current;
|
|
5984
6070
|
if (!el) return;
|
|
@@ -5986,9 +6072,9 @@ window.Aura = (() => {
|
|
|
5986
6072
|
const next = more ? [el.offsetTop, el.clientHeight, el.offsetWidth - el.clientWidth].join(" ") : "";
|
|
5987
6073
|
if (next !== edgeState[0]) edgeState[1](next);
|
|
5988
6074
|
};
|
|
5989
|
-
const checkRef =
|
|
6075
|
+
const checkRef = React34.useRef(checkMoreX);
|
|
5990
6076
|
checkRef.current = checkMoreX;
|
|
5991
|
-
|
|
6077
|
+
React34.useEffect(function() {
|
|
5992
6078
|
const el = scrollRef.current;
|
|
5993
6079
|
if (!el || typeof ResizeObserver === "undefined") return;
|
|
5994
6080
|
const ro = new ResizeObserver(function() {
|
|
@@ -6000,7 +6086,7 @@ window.Aura = (() => {
|
|
|
6000
6086
|
ro.disconnect();
|
|
6001
6087
|
};
|
|
6002
6088
|
}, []);
|
|
6003
|
-
const tipState =
|
|
6089
|
+
const tipState = React34.useState(null), tip2 = tipState[0], setTip = tipState[1];
|
|
6004
6090
|
function showFull(e) {
|
|
6005
6091
|
const el = e.target.closest ? e.target.closest(".aura-table__td") : null;
|
|
6006
6092
|
if (!el || el.scrollWidth <= el.clientWidth + 1 || el.querySelector("button, input, .aura-pill"))
|
|
@@ -6012,7 +6098,7 @@ window.Aura = (() => {
|
|
|
6012
6098
|
setTip(null);
|
|
6013
6099
|
}
|
|
6014
6100
|
const tipEl = tip2 && typeof document !== "undefined" ? (0, import_react_dom10.createPortal)(
|
|
6015
|
-
/* @__PURE__ */
|
|
6101
|
+
/* @__PURE__ */ React34.createElement(
|
|
6016
6102
|
"div",
|
|
6017
6103
|
{
|
|
6018
6104
|
className: "aura-tooltip aura-tooltip--above",
|
|
@@ -6023,7 +6109,7 @@ window.Aura = (() => {
|
|
|
6023
6109
|
),
|
|
6024
6110
|
document.body
|
|
6025
6111
|
) : null;
|
|
6026
|
-
const rowH =
|
|
6112
|
+
const rowH = React34.useState(ROW_H_DEFAULT);
|
|
6027
6113
|
const ROW_H = rowH[0];
|
|
6028
6114
|
useIsoLayoutEffect(function() {
|
|
6029
6115
|
const el = wrapRef.current;
|
|
@@ -6031,8 +6117,8 @@ window.Aura = (() => {
|
|
|
6031
6117
|
const v = parseFloat(getComputedStyle(el).getPropertyValue("--aura-table-row-height"));
|
|
6032
6118
|
if (v > 0 && v !== rowH[0]) rowH[1](v);
|
|
6033
6119
|
});
|
|
6034
|
-
const pending =
|
|
6035
|
-
const resizing =
|
|
6120
|
+
const pending = React34.useRef(null);
|
|
6121
|
+
const resizing = React34.useRef(false);
|
|
6036
6122
|
useIsoLayoutEffect(function() {
|
|
6037
6123
|
if (!gridRef.current || tabMode) return;
|
|
6038
6124
|
const els = gridRef.current.querySelectorAll(
|
|
@@ -6155,7 +6241,7 @@ window.Aura = (() => {
|
|
|
6155
6241
|
return s;
|
|
6156
6242
|
}
|
|
6157
6243
|
const sortCol = sort && sort.key ? byKey[sort.key] : void 0;
|
|
6158
|
-
const view =
|
|
6244
|
+
const view = React34.useMemo(
|
|
6159
6245
|
function() {
|
|
6160
6246
|
if (manual || !sort || !sort.key || !byKey[sort.key]) return rows;
|
|
6161
6247
|
const col = byKey[sort.key];
|
|
@@ -6197,8 +6283,8 @@ window.Aura = (() => {
|
|
|
6197
6283
|
const pageRows = pageSize && !manual ? view.slice(first, first + pageSize) : view;
|
|
6198
6284
|
const canSortAny = !busy && (manual ? total > 1 : rows.length > 1);
|
|
6199
6285
|
const shownTotal = manual && props.totalRows == null ? first + rows.length : total;
|
|
6200
|
-
const prevCount =
|
|
6201
|
-
|
|
6286
|
+
const prevCount = React34.useRef(pageCount);
|
|
6287
|
+
React34.useEffect(
|
|
6202
6288
|
function() {
|
|
6203
6289
|
if (busy) return;
|
|
6204
6290
|
const before = prevCount.current;
|
|
@@ -6212,9 +6298,9 @@ window.Aura = (() => {
|
|
|
6212
6298
|
[pageState[0], page, busy, pageCount]
|
|
6213
6299
|
);
|
|
6214
6300
|
const linkPaging = !!props.getPageHref && !props.onPageChange && !oneCallback;
|
|
6215
|
-
const prevLink =
|
|
6216
|
-
const jumpState =
|
|
6217
|
-
|
|
6301
|
+
const prevLink = React34.useRef(null), nextLink = React34.useRef(null), jumpLink = React34.useRef(null);
|
|
6302
|
+
const jumpState = React34.useState(null);
|
|
6303
|
+
React34.useEffect(
|
|
6218
6304
|
function() {
|
|
6219
6305
|
if (jumpState[0] == null) return;
|
|
6220
6306
|
if (jumpLink.current) jumpLink.current.click();
|
|
@@ -6265,7 +6351,7 @@ window.Aura = (() => {
|
|
|
6265
6351
|
);
|
|
6266
6352
|
}
|
|
6267
6353
|
function rowLinkWrap(r2, content) {
|
|
6268
|
-
return rowHref ? /* @__PURE__ */
|
|
6354
|
+
return rowHref ? /* @__PURE__ */ React34.createElement(Link, { href: rowHref(r2), className: "aura-table__row-link" }, content) : content;
|
|
6269
6355
|
}
|
|
6270
6356
|
const height = props.height || 0;
|
|
6271
6357
|
const autoRows = props.rowHeight === "auto" && !height;
|
|
@@ -6309,8 +6395,8 @@ window.Aura = (() => {
|
|
|
6309
6395
|
const acShown = nearestShown(ac, 1, function(cc) {
|
|
6310
6396
|
return !cardHidden[cc];
|
|
6311
6397
|
});
|
|
6312
|
-
const lastFocus =
|
|
6313
|
-
|
|
6398
|
+
const lastFocus = React34.useRef(null);
|
|
6399
|
+
React34.useEffect(
|
|
6314
6400
|
function() {
|
|
6315
6401
|
const was = lastFocus.current, g = gridRef.current;
|
|
6316
6402
|
if (!stacked || !was || !g || !g.contains(was) || was.getClientRects().length > 0) return;
|
|
@@ -6325,7 +6411,7 @@ window.Aura = (() => {
|
|
|
6325
6411
|
if (!activeRendered) return r2 === 0 && c === ac ? 0 : -1;
|
|
6326
6412
|
return r2 === ar && c === acShown ? 0 : -1;
|
|
6327
6413
|
}
|
|
6328
|
-
|
|
6414
|
+
React34.useEffect(function() {
|
|
6329
6415
|
const p = pending.current;
|
|
6330
6416
|
if (!p || !gridRef.current) return;
|
|
6331
6417
|
let c = p.c;
|
|
@@ -6388,8 +6474,8 @@ window.Aura = (() => {
|
|
|
6388
6474
|
return selSet[String(k)];
|
|
6389
6475
|
}).length;
|
|
6390
6476
|
const all = nSel > 0 && nSel === pageKeys.length;
|
|
6391
|
-
const anchor =
|
|
6392
|
-
const shiftClick =
|
|
6477
|
+
const anchor = React34.useRef(null);
|
|
6478
|
+
const shiftClick = React34.useRef(false);
|
|
6393
6479
|
function toggle(k, on, how) {
|
|
6394
6480
|
const same2 = function(x) {
|
|
6395
6481
|
return String(x) === String(k);
|
|
@@ -6545,14 +6631,14 @@ window.Aura = (() => {
|
|
|
6545
6631
|
items2.push(
|
|
6546
6632
|
{
|
|
6547
6633
|
label: t.sortAsc,
|
|
6548
|
-
icon: /* @__PURE__ */
|
|
6634
|
+
icon: /* @__PURE__ */ React34.createElement(IconArrowUp, null),
|
|
6549
6635
|
onSelect: function() {
|
|
6550
6636
|
applySort({ key: c.key, dir: "asc" });
|
|
6551
6637
|
}
|
|
6552
6638
|
},
|
|
6553
6639
|
{
|
|
6554
6640
|
label: t.sortDesc,
|
|
6555
|
-
icon: /* @__PURE__ */
|
|
6641
|
+
icon: /* @__PURE__ */ React34.createElement(IconArrowDown, null),
|
|
6556
6642
|
onSelect: function() {
|
|
6557
6643
|
applySort({ key: c.key, dir: "desc" });
|
|
6558
6644
|
}
|
|
@@ -6562,7 +6648,7 @@ window.Aura = (() => {
|
|
|
6562
6648
|
if (c.width != null)
|
|
6563
6649
|
items2.push({
|
|
6564
6650
|
label: isPinned(c) ? t.unpin : t.pin,
|
|
6565
|
-
icon: isPinned(c) ? /* @__PURE__ */
|
|
6651
|
+
icon: isPinned(c) ? /* @__PURE__ */ React34.createElement(IconPinOff, null) : /* @__PURE__ */ React34.createElement(IconPin, null),
|
|
6566
6652
|
onSelect: function() {
|
|
6567
6653
|
togglePin(c.key);
|
|
6568
6654
|
}
|
|
@@ -6571,7 +6657,7 @@ window.Aura = (() => {
|
|
|
6571
6657
|
items2.push(
|
|
6572
6658
|
{
|
|
6573
6659
|
label: t.moveLeft,
|
|
6574
|
-
icon: /* @__PURE__ */
|
|
6660
|
+
icon: /* @__PURE__ */ React34.createElement(IconArrowLeft, null),
|
|
6575
6661
|
disabled: gi <= 0,
|
|
6576
6662
|
onSelect: function() {
|
|
6577
6663
|
moveCol(c.key, -1);
|
|
@@ -6579,7 +6665,7 @@ window.Aura = (() => {
|
|
|
6579
6665
|
},
|
|
6580
6666
|
{
|
|
6581
6667
|
label: t.moveRight,
|
|
6582
|
-
icon: /* @__PURE__ */
|
|
6668
|
+
icon: /* @__PURE__ */ React34.createElement(IconArrowRight, null),
|
|
6583
6669
|
disabled: gi >= group.length - 1,
|
|
6584
6670
|
onSelect: function() {
|
|
6585
6671
|
moveCol(c.key, 1);
|
|
@@ -6590,7 +6676,7 @@ window.Aura = (() => {
|
|
|
6590
6676
|
{ separator: true },
|
|
6591
6677
|
{
|
|
6592
6678
|
label: t.hideColumn,
|
|
6593
|
-
icon: /* @__PURE__ */
|
|
6679
|
+
icon: /* @__PURE__ */ React34.createElement(IconEyeOff, null),
|
|
6594
6680
|
disabled: shown.length <= 1,
|
|
6595
6681
|
onSelect: function() {
|
|
6596
6682
|
setHidden(c.key, true);
|
|
@@ -6611,7 +6697,7 @@ window.Aura = (() => {
|
|
|
6611
6697
|
setHidden(k, on);
|
|
6612
6698
|
}
|
|
6613
6699
|
};
|
|
6614
|
-
}).concat([{ separator: true }, { label: t.resetColumns, icon: /* @__PURE__ */
|
|
6700
|
+
}).concat([{ separator: true }, { label: t.resetColumns, icon: /* @__PURE__ */ React34.createElement(IconRotateCcw, null), onSelect: resetColumns }]);
|
|
6615
6701
|
}
|
|
6616
6702
|
function openMenu(kind, key, anchor2, rc) {
|
|
6617
6703
|
setMenu({ kind, key, anchor: anchor2, rc });
|
|
@@ -6688,10 +6774,10 @@ window.Aura = (() => {
|
|
|
6688
6774
|
e.stopPropagation();
|
|
6689
6775
|
}
|
|
6690
6776
|
}
|
|
6691
|
-
const head = [/* @__PURE__ */
|
|
6777
|
+
const head = [/* @__PURE__ */ React34.createElement("span", { key: "__gl", className: "aura-table__gutter", "aria-hidden": true })];
|
|
6692
6778
|
if (selectable)
|
|
6693
6779
|
head.push(
|
|
6694
|
-
/* @__PURE__ */
|
|
6780
|
+
/* @__PURE__ */ React34.createElement(
|
|
6695
6781
|
"span",
|
|
6696
6782
|
{
|
|
6697
6783
|
key: "__sel",
|
|
@@ -6705,7 +6791,7 @@ window.Aura = (() => {
|
|
|
6705
6791
|
activeState[1]({ r: 0, c: 0 });
|
|
6706
6792
|
}
|
|
6707
6793
|
},
|
|
6708
|
-
pageKeys.length ? /* @__PURE__ */
|
|
6794
|
+
pageKeys.length ? /* @__PURE__ */ React34.createElement(
|
|
6709
6795
|
Checkbox,
|
|
6710
6796
|
{
|
|
6711
6797
|
ref: props.selectAllRef,
|
|
@@ -6717,7 +6803,7 @@ window.Aura = (() => {
|
|
|
6717
6803
|
onChange: toggleAll
|
|
6718
6804
|
}
|
|
6719
6805
|
) : null,
|
|
6720
|
-
pageKeys.length ? /* @__PURE__ */
|
|
6806
|
+
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
6807
|
)
|
|
6722
6808
|
);
|
|
6723
6809
|
vis.forEach(function(c, i) {
|
|
@@ -6728,7 +6814,7 @@ window.Aura = (() => {
|
|
|
6728
6814
|
const ariaSort = sort && canSortAny ? isSorted && canSort ? sort.dir === "desc" ? "descending" : "ascending" : canSort ? "none" : void 0 : own || (canSort ? "none" : void 0);
|
|
6729
6815
|
const pin = isPinned(c), edge = pin && i === nPinned - 1;
|
|
6730
6816
|
head.push(
|
|
6731
|
-
/* @__PURE__ */
|
|
6817
|
+
/* @__PURE__ */ React34.createElement(
|
|
6732
6818
|
"span",
|
|
6733
6819
|
{
|
|
6734
6820
|
key: c.key,
|
|
@@ -6779,7 +6865,7 @@ window.Aura = (() => {
|
|
|
6779
6865
|
setDrag(null);
|
|
6780
6866
|
}
|
|
6781
6867
|
},
|
|
6782
|
-
/* @__PURE__ */
|
|
6868
|
+
/* @__PURE__ */ React34.createElement("span", { className: "aura-table__th-inner" }, canSort ? /* @__PURE__ */ React34.createElement(
|
|
6783
6869
|
"button",
|
|
6784
6870
|
{
|
|
6785
6871
|
type: "button",
|
|
@@ -6791,14 +6877,14 @@ window.Aura = (() => {
|
|
|
6791
6877
|
}
|
|
6792
6878
|
},
|
|
6793
6879
|
c.label,
|
|
6794
|
-
/* @__PURE__ */
|
|
6880
|
+
/* @__PURE__ */ React34.createElement(
|
|
6795
6881
|
Icon,
|
|
6796
6882
|
{
|
|
6797
|
-
name: isSorted ? sort.dir === "desc" ? /* @__PURE__ */
|
|
6883
|
+
name: isSorted ? sort.dir === "desc" ? /* @__PURE__ */ React34.createElement(IconArrowDown, null) : /* @__PURE__ */ React34.createElement(IconArrowUp, null) : /* @__PURE__ */ React34.createElement(IconArrowUpDown, null),
|
|
6798
6884
|
size: 12
|
|
6799
6885
|
}
|
|
6800
6886
|
)
|
|
6801
|
-
) : /* @__PURE__ */
|
|
6887
|
+
) : /* @__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
6888
|
"button",
|
|
6803
6889
|
{
|
|
6804
6890
|
type: "button",
|
|
@@ -6812,9 +6898,9 @@ window.Aura = (() => {
|
|
|
6812
6898
|
openMenu("col", c.key, e.currentTarget, { r: 0, c: ci });
|
|
6813
6899
|
}
|
|
6814
6900
|
},
|
|
6815
|
-
/* @__PURE__ */
|
|
6901
|
+
/* @__PURE__ */ React34.createElement(Icon, { name: /* @__PURE__ */ React34.createElement(IconEllipsis, null) })
|
|
6816
6902
|
) : null),
|
|
6817
|
-
canResize(c) ? /* @__PURE__ */
|
|
6903
|
+
canResize(c) ? /* @__PURE__ */ React34.createElement(
|
|
6818
6904
|
"span",
|
|
6819
6905
|
{
|
|
6820
6906
|
className: "aura-table__resize",
|
|
@@ -6836,7 +6922,7 @@ window.Aura = (() => {
|
|
|
6836
6922
|
);
|
|
6837
6923
|
});
|
|
6838
6924
|
head.push(
|
|
6839
|
-
/* @__PURE__ */
|
|
6925
|
+
/* @__PURE__ */ React34.createElement(
|
|
6840
6926
|
"span",
|
|
6841
6927
|
{
|
|
6842
6928
|
key: "__gr",
|
|
@@ -6847,15 +6933,15 @@ window.Aura = (() => {
|
|
|
6847
6933
|
);
|
|
6848
6934
|
function cellContent(c, r2) {
|
|
6849
6935
|
const v = r2[c.key];
|
|
6850
|
-
return c.render ? c.render(r2) : c.pill ? /* @__PURE__ */
|
|
6936
|
+
return c.render ? c.render(r2) : c.pill ? /* @__PURE__ */ React34.createElement(StatusPill, { ...{ tone: c.tones && c.tones[v] } }, v) : v;
|
|
6851
6937
|
}
|
|
6852
6938
|
function rowCells(r2, i, k, isSel) {
|
|
6853
6939
|
const ri = i + 1;
|
|
6854
6940
|
const selLabel = selectable && canSelect(r2) ? props.rowSelectLabel && props.rowSelectLabel(r2) || t.selectRow(k) : void 0;
|
|
6855
|
-
const cells = [/* @__PURE__ */
|
|
6941
|
+
const cells = [/* @__PURE__ */ React34.createElement("span", { key: "__gl", className: "aura-table__gutter", "aria-hidden": true })];
|
|
6856
6942
|
if (selectable)
|
|
6857
6943
|
cells.push(
|
|
6858
|
-
/* @__PURE__ */
|
|
6944
|
+
/* @__PURE__ */ React34.createElement(
|
|
6859
6945
|
"span",
|
|
6860
6946
|
{
|
|
6861
6947
|
key: "__sel",
|
|
@@ -6872,7 +6958,7 @@ window.Aura = (() => {
|
|
|
6872
6958
|
shiftClick.current = e.shiftKey;
|
|
6873
6959
|
}
|
|
6874
6960
|
},
|
|
6875
|
-
canSelect(r2) ? /* @__PURE__ */
|
|
6961
|
+
canSelect(r2) ? /* @__PURE__ */ React34.createElement(
|
|
6876
6962
|
Checkbox,
|
|
6877
6963
|
{
|
|
6878
6964
|
hideLabel: true,
|
|
@@ -6891,7 +6977,7 @@ window.Aura = (() => {
|
|
|
6891
6977
|
vis.forEach(function(c, j) {
|
|
6892
6978
|
const ci = j + (selectable ? 1 : 0), v = r2[c.key], pin = isPinned(c);
|
|
6893
6979
|
cells.push(
|
|
6894
|
-
/* @__PURE__ */
|
|
6980
|
+
/* @__PURE__ */ React34.createElement(
|
|
6895
6981
|
"span",
|
|
6896
6982
|
{
|
|
6897
6983
|
key: c.key,
|
|
@@ -6913,13 +6999,13 @@ window.Aura = (() => {
|
|
|
6913
6999
|
if (activeState[0].r !== ri || activeState[0].c !== ci) activeState[1]({ r: ri, c: ci });
|
|
6914
7000
|
}
|
|
6915
7001
|
},
|
|
6916
|
-
autoRows ? /* @__PURE__ */
|
|
7002
|
+
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
7003
|
)
|
|
6918
7004
|
);
|
|
6919
7005
|
});
|
|
6920
|
-
if (hasFields) cells.push(/* @__PURE__ */
|
|
7006
|
+
if (hasFields) cells.push(/* @__PURE__ */ React34.createElement("span", { key: "__br", className: "aura-table__break", "aria-hidden": true }));
|
|
6921
7007
|
cells.push(
|
|
6922
|
-
/* @__PURE__ */
|
|
7008
|
+
/* @__PURE__ */ React34.createElement(
|
|
6923
7009
|
"span",
|
|
6924
7010
|
{
|
|
6925
7011
|
key: "__gr",
|
|
@@ -6936,17 +7022,17 @@ window.Aura = (() => {
|
|
|
6936
7022
|
const n3 = pageSize || props.skeletonRows || 5;
|
|
6937
7023
|
const skRows = body = [];
|
|
6938
7024
|
for (let i = 0; i < n3; i++) {
|
|
6939
|
-
const sk = [/* @__PURE__ */
|
|
7025
|
+
const sk = [/* @__PURE__ */ React34.createElement("span", { key: "__gl", className: "aura-table__gutter" })];
|
|
6940
7026
|
if (selectable)
|
|
6941
7027
|
sk.push(
|
|
6942
|
-
/* @__PURE__ */
|
|
7028
|
+
/* @__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
7029
|
);
|
|
6944
7030
|
vis.forEach(function(c, j) {
|
|
6945
7031
|
const part = cardPart(c, j);
|
|
6946
7032
|
const action = part === "footer" || part === "actions";
|
|
6947
7033
|
const lines = c.pill ? 1 : Math.max(1, Math.min(10, Math.floor(Number(c.skeletonLines)) || 1));
|
|
6948
7034
|
const bar = function(n4) {
|
|
6949
|
-
return /* @__PURE__ */
|
|
7035
|
+
return /* @__PURE__ */ React34.createElement(
|
|
6950
7036
|
"span",
|
|
6951
7037
|
{
|
|
6952
7038
|
key: n4,
|
|
@@ -6958,7 +7044,7 @@ window.Aura = (() => {
|
|
|
6958
7044
|
const bars2 = [];
|
|
6959
7045
|
for (let b = 0; b < lines; b++) bars2.push(bar(b));
|
|
6960
7046
|
sk.push(
|
|
6961
|
-
/* @__PURE__ */
|
|
7047
|
+
/* @__PURE__ */ React34.createElement(
|
|
6962
7048
|
"span",
|
|
6963
7049
|
{
|
|
6964
7050
|
key: c.key,
|
|
@@ -6971,7 +7057,7 @@ window.Aura = (() => {
|
|
|
6971
7057
|
style: cellStyle(c, j),
|
|
6972
7058
|
...cardAttrs(c, j)
|
|
6973
7059
|
},
|
|
6974
|
-
action ? /* @__PURE__ */
|
|
7060
|
+
action ? /* @__PURE__ */ React34.createElement(
|
|
6975
7061
|
"span",
|
|
6976
7062
|
{
|
|
6977
7063
|
className: cx(
|
|
@@ -6980,16 +7066,16 @@ window.Aura = (() => {
|
|
|
6980
7066
|
c.skeletonTouch && "is-touch"
|
|
6981
7067
|
)
|
|
6982
7068
|
}
|
|
6983
|
-
) : lines > 1 ? /* @__PURE__ */
|
|
7069
|
+
) : lines > 1 ? /* @__PURE__ */ React34.createElement("span", { className: "aura-skel-lines" }, bars2) : bars2[0]
|
|
6984
7070
|
)
|
|
6985
7071
|
);
|
|
6986
7072
|
});
|
|
6987
|
-
if (hasFields) sk.push(/* @__PURE__ */
|
|
7073
|
+
if (hasFields) sk.push(/* @__PURE__ */ React34.createElement("span", { key: "__br", className: "aura-table__break" }));
|
|
6988
7074
|
sk.push(
|
|
6989
|
-
/* @__PURE__ */
|
|
7075
|
+
/* @__PURE__ */ React34.createElement("span", { key: "__gr", className: cx("aura-table__gutter aura-table__gutter--end", controls && "has-picker") })
|
|
6990
7076
|
);
|
|
6991
7077
|
skRows.push(
|
|
6992
|
-
/* @__PURE__ */
|
|
7078
|
+
/* @__PURE__ */ React34.createElement(
|
|
6993
7079
|
"div",
|
|
6994
7080
|
{
|
|
6995
7081
|
key: "sk" + i,
|
|
@@ -7003,18 +7089,18 @@ window.Aura = (() => {
|
|
|
7003
7089
|
}
|
|
7004
7090
|
} else if (!rows.length) {
|
|
7005
7091
|
const em = props.empty || {};
|
|
7006
|
-
body = /* @__PURE__ */
|
|
7092
|
+
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
7093
|
} else {
|
|
7008
7094
|
const bodyRows = body = [];
|
|
7009
7095
|
if (virtual && start > 0)
|
|
7010
7096
|
bodyRows.push(
|
|
7011
|
-
/* @__PURE__ */
|
|
7097
|
+
/* @__PURE__ */ React34.createElement("div", { key: "__top", className: "aura-table__spacer", style: { height: start * ROW_H + "px" }, "aria-hidden": true })
|
|
7012
7098
|
);
|
|
7013
7099
|
for (let ri = start; ri < end; ri++) {
|
|
7014
7100
|
(function(r2, i) {
|
|
7015
7101
|
const k = r2[rowKey], isSel = !!selSet[k];
|
|
7016
7102
|
bodyRows.push(
|
|
7017
|
-
/* @__PURE__ */
|
|
7103
|
+
/* @__PURE__ */ React34.createElement(
|
|
7018
7104
|
"div",
|
|
7019
7105
|
{
|
|
7020
7106
|
key: k,
|
|
@@ -7043,7 +7129,7 @@ window.Aura = (() => {
|
|
|
7043
7129
|
}
|
|
7044
7130
|
if (virtual && end < pageRows.length)
|
|
7045
7131
|
bodyRows.push(
|
|
7046
|
-
/* @__PURE__ */
|
|
7132
|
+
/* @__PURE__ */ React34.createElement(
|
|
7047
7133
|
"div",
|
|
7048
7134
|
{
|
|
7049
7135
|
key: "__bot",
|
|
@@ -7056,9 +7142,9 @@ window.Aura = (() => {
|
|
|
7056
7142
|
}
|
|
7057
7143
|
let foot = null;
|
|
7058
7144
|
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__ */
|
|
7145
|
+
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
7146
|
if (props.getPageHref && !off)
|
|
7061
|
-
return /* @__PURE__ */
|
|
7147
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7062
7148
|
Link,
|
|
7063
7149
|
{
|
|
7064
7150
|
ref: dir < 0 ? prevLink : nextLink,
|
|
@@ -7073,9 +7159,9 @@ window.Aura = (() => {
|
|
|
7073
7159
|
}
|
|
7074
7160
|
}
|
|
7075
7161
|
},
|
|
7076
|
-
/* @__PURE__ */
|
|
7162
|
+
/* @__PURE__ */ React34.createElement(Icon, { name: icon })
|
|
7077
7163
|
);
|
|
7078
|
-
return /* @__PURE__ */
|
|
7164
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7079
7165
|
IconButton,
|
|
7080
7166
|
{
|
|
7081
7167
|
icon,
|
|
@@ -7090,11 +7176,11 @@ window.Aura = (() => {
|
|
|
7090
7176
|
const openTotal = manual && props.totalRows == null && !!pageSize && rows.length >= pageSize;
|
|
7091
7177
|
if (pageSize && (rows.length || busy || page > 1)) {
|
|
7092
7178
|
const from = rows.length ? first + 1 : 0, to = manual ? first + rows.length : Math.min(first + pageSize, view.length);
|
|
7093
|
-
foot = /* @__PURE__ */
|
|
7179
|
+
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
7180
|
} else if (height && rows.length && !loading) {
|
|
7095
|
-
foot = /* @__PURE__ */
|
|
7181
|
+
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
7182
|
}
|
|
7097
|
-
const totalRow = props.footer && rows.length && !loading ? /* @__PURE__ */
|
|
7183
|
+
const totalRow = props.footer && rows.length && !loading ? /* @__PURE__ */ React34.createElement(
|
|
7098
7184
|
"div",
|
|
7099
7185
|
{
|
|
7100
7186
|
role: "row",
|
|
@@ -7103,8 +7189,8 @@ window.Aura = (() => {
|
|
|
7103
7189
|
className: cx("aura-table__row aura-table__total", props.stickyFooter && "is-sticky"),
|
|
7104
7190
|
style: rowStyle
|
|
7105
7191
|
},
|
|
7106
|
-
/* @__PURE__ */
|
|
7107
|
-
selectable ? /* @__PURE__ */
|
|
7192
|
+
/* @__PURE__ */ React34.createElement("span", { className: "aura-table__gutter", "aria-hidden": true }),
|
|
7193
|
+
selectable ? /* @__PURE__ */ React34.createElement(
|
|
7108
7194
|
"span",
|
|
7109
7195
|
{
|
|
7110
7196
|
role: "gridcell",
|
|
@@ -7119,7 +7205,7 @@ window.Aura = (() => {
|
|
|
7119
7205
|
) : null,
|
|
7120
7206
|
vis.map(function(c, j) {
|
|
7121
7207
|
const pin = isPinned(c), ci = j + (selectable ? 1 : 0);
|
|
7122
|
-
return /* @__PURE__ */
|
|
7208
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7123
7209
|
"span",
|
|
7124
7210
|
{
|
|
7125
7211
|
key: c.key,
|
|
@@ -7145,8 +7231,8 @@ window.Aura = (() => {
|
|
|
7145
7231
|
props.footer[c.key]
|
|
7146
7232
|
);
|
|
7147
7233
|
}),
|
|
7148
|
-
hasFields ? /* @__PURE__ */
|
|
7149
|
-
/* @__PURE__ */
|
|
7234
|
+
hasFields ? /* @__PURE__ */ React34.createElement("span", { className: "aura-table__break", "aria-hidden": true }) : null,
|
|
7235
|
+
/* @__PURE__ */ React34.createElement(
|
|
7150
7236
|
"span",
|
|
7151
7237
|
{
|
|
7152
7238
|
className: cx("aura-table__gutter aura-table__gutter--end", controls && "has-picker"),
|
|
@@ -7160,7 +7246,7 @@ window.Aura = (() => {
|
|
|
7160
7246
|
scrollPaddingBottom: stickyTotal ? ROW_H + "px" : void 0
|
|
7161
7247
|
};
|
|
7162
7248
|
if (height) scrollStyle["--aura-table-h"] = height + "px";
|
|
7163
|
-
const gridEl = /* @__PURE__ */
|
|
7249
|
+
const gridEl = /* @__PURE__ */ React34.createElement(
|
|
7164
7250
|
"div",
|
|
7165
7251
|
{
|
|
7166
7252
|
ref: levels.length ? wrapRef : wrapMerged,
|
|
@@ -7181,8 +7267,8 @@ window.Aura = (() => {
|
|
|
7181
7267
|
),
|
|
7182
7268
|
style: levels.length ? { ["--aura-q-back"]: String(levels[levels.length - 1].px / Q) } : void 0
|
|
7183
7269
|
},
|
|
7184
|
-
refreshing ? /* @__PURE__ */
|
|
7185
|
-
edgeState[0] && !stacked ? /* @__PURE__ */
|
|
7270
|
+
refreshing ? /* @__PURE__ */ React34.createElement("span", { className: "aura-table__busy-bar", "aria-hidden": true }) : null,
|
|
7271
|
+
edgeState[0] && !stacked ? /* @__PURE__ */ React34.createElement(
|
|
7186
7272
|
"span",
|
|
7187
7273
|
{
|
|
7188
7274
|
className: "aura-table__edge",
|
|
@@ -7194,7 +7280,7 @@ window.Aura = (() => {
|
|
|
7194
7280
|
}
|
|
7195
7281
|
}
|
|
7196
7282
|
) : null,
|
|
7197
|
-
/* @__PURE__ */
|
|
7283
|
+
/* @__PURE__ */ React34.createElement(
|
|
7198
7284
|
"div",
|
|
7199
7285
|
{
|
|
7200
7286
|
ref: function(el) {
|
|
@@ -7232,7 +7318,7 @@ window.Aura = (() => {
|
|
|
7232
7318
|
checkMoreX();
|
|
7233
7319
|
}
|
|
7234
7320
|
},
|
|
7235
|
-
/* @__PURE__ */
|
|
7321
|
+
/* @__PURE__ */ React34.createElement(
|
|
7236
7322
|
"div",
|
|
7237
7323
|
{
|
|
7238
7324
|
className: cx("aura-table__head", selectable && nRows > 0 && !busy && "has-select-all"),
|
|
@@ -7245,11 +7331,11 @@ window.Aura = (() => {
|
|
|
7245
7331
|
body,
|
|
7246
7332
|
totalRow
|
|
7247
7333
|
),
|
|
7248
|
-
busy ? /* @__PURE__ */
|
|
7249
|
-
controls ? /* @__PURE__ */
|
|
7334
|
+
busy ? /* @__PURE__ */ React34.createElement("span", { className: "aura-sr-only", role: "status" }, t.loadingRows) : null,
|
|
7335
|
+
controls ? /* @__PURE__ */ React34.createElement("div", { className: "aura-table__picker" }, /* @__PURE__ */ React34.createElement(
|
|
7250
7336
|
IconButton,
|
|
7251
7337
|
{
|
|
7252
|
-
icon: /* @__PURE__ */
|
|
7338
|
+
icon: /* @__PURE__ */ React34.createElement(IconColumns3, null),
|
|
7253
7339
|
label: t.showHideColumns,
|
|
7254
7340
|
"aria-haspopup": "menu",
|
|
7255
7341
|
onClick: function(e) {
|
|
@@ -7258,7 +7344,7 @@ window.Aura = (() => {
|
|
|
7258
7344
|
}
|
|
7259
7345
|
)) : null,
|
|
7260
7346
|
foot,
|
|
7261
|
-
menu ? /* @__PURE__ */
|
|
7347
|
+
menu ? /* @__PURE__ */ React34.createElement(
|
|
7262
7348
|
Menu,
|
|
7263
7349
|
{
|
|
7264
7350
|
anchor: menu.anchor,
|
|
@@ -7268,13 +7354,13 @@ window.Aura = (() => {
|
|
|
7268
7354
|
}
|
|
7269
7355
|
) : null,
|
|
7270
7356
|
tipEl,
|
|
7271
|
-
jumpState[0] != null && props.getPageHref ? /* @__PURE__ */
|
|
7357
|
+
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
7358
|
);
|
|
7273
7359
|
if (!levels.length) return gridEl;
|
|
7274
7360
|
let out = gridEl;
|
|
7275
7361
|
for (let i = levels.length - 1; i >= 0; i--) {
|
|
7276
7362
|
const prev = i === 0 ? Q : levels[i - 1].px;
|
|
7277
|
-
out = /* @__PURE__ */
|
|
7363
|
+
out = /* @__PURE__ */ React34.createElement(
|
|
7278
7364
|
"div",
|
|
7279
7365
|
{
|
|
7280
7366
|
className: cx("aura-table-q", "aura-table-q--" + levels[i].name),
|
|
@@ -7283,7 +7369,7 @@ window.Aura = (() => {
|
|
|
7283
7369
|
out
|
|
7284
7370
|
);
|
|
7285
7371
|
}
|
|
7286
|
-
return /* @__PURE__ */
|
|
7372
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7287
7373
|
"div",
|
|
7288
7374
|
{
|
|
7289
7375
|
ref,
|
|
@@ -7300,14 +7386,14 @@ window.Aura = (() => {
|
|
|
7300
7386
|
var DataTable2 = DataTableImpl;
|
|
7301
7387
|
|
|
7302
7388
|
// src/Card.tsx
|
|
7303
|
-
var
|
|
7304
|
-
var Card =
|
|
7389
|
+
var React35 = __toESM(require_react(), 1);
|
|
7390
|
+
var Card = React35.forwardRef(function Card2(props, ref) {
|
|
7305
7391
|
return cardElement(props, ref);
|
|
7306
7392
|
});
|
|
7307
7393
|
|
|
7308
7394
|
// src/Tabs.tsx
|
|
7309
|
-
var
|
|
7310
|
-
var Tabs =
|
|
7395
|
+
var React36 = __toESM(require_react(), 1);
|
|
7396
|
+
var Tabs = React36.forwardRef(function Tabs2(props, ref) {
|
|
7311
7397
|
const items2 = props.tabs || [], base = uid();
|
|
7312
7398
|
const asLinks = items2.length > 0 && items2.every(function(t) {
|
|
7313
7399
|
return !!t.href;
|
|
@@ -7321,7 +7407,7 @@ window.Aura = (() => {
|
|
|
7321
7407
|
props.onChange
|
|
7322
7408
|
);
|
|
7323
7409
|
const cur2 = asLinks && "value" in props ? props.value : st[0];
|
|
7324
|
-
const refs =
|
|
7410
|
+
const refs = React36.useRef({});
|
|
7325
7411
|
const current2 = items2.filter(function(t) {
|
|
7326
7412
|
return t.id === cur2;
|
|
7327
7413
|
})[0] || firstOn || items2[0];
|
|
@@ -7339,7 +7425,7 @@ window.Aura = (() => {
|
|
|
7339
7425
|
return cx("aura-tab", on && "is-active", seg && "aura-segmented__option", seg && on && "is-selected", extra);
|
|
7340
7426
|
};
|
|
7341
7427
|
const rootCls = cx("aura-tabs", seg && "aura-tabs--segmented", touchClass(props.touchHeight));
|
|
7342
|
-
const [focusId, setFocusId] =
|
|
7428
|
+
const [focusId, setFocusId] = React36.useState(null);
|
|
7343
7429
|
items2.forEach(function(t) {
|
|
7344
7430
|
const al = t.tabProps && t.tabProps["aria-label"];
|
|
7345
7431
|
if (al && al.toLowerCase().indexOf(String(t.label).toLowerCase()) !== 0)
|
|
@@ -7349,19 +7435,19 @@ window.Aura = (() => {
|
|
|
7349
7435
|
);
|
|
7350
7436
|
});
|
|
7351
7437
|
if (asLinks)
|
|
7352
|
-
return /* @__PURE__ */
|
|
7438
|
+
return /* @__PURE__ */ React36.createElement(
|
|
7353
7439
|
"nav",
|
|
7354
7440
|
{
|
|
7355
7441
|
ref,
|
|
7356
7442
|
"aria-label": props.label,
|
|
7357
7443
|
className: cx(rootCls, "aura-tabs--links", props.className)
|
|
7358
7444
|
},
|
|
7359
|
-
/* @__PURE__ */
|
|
7445
|
+
/* @__PURE__ */ React36.createElement("div", { className: listCls }, items2.map(function(t) {
|
|
7360
7446
|
const on = t.id === cur2;
|
|
7361
7447
|
const inner = [
|
|
7362
|
-
t.icon ? /* @__PURE__ */
|
|
7448
|
+
t.icon ? /* @__PURE__ */ React36.createElement(Icon, { key: "i", name: t.icon }) : null,
|
|
7363
7449
|
t.label,
|
|
7364
|
-
t.count != null ? /* @__PURE__ */
|
|
7450
|
+
t.count != null ? /* @__PURE__ */ React36.createElement("span", { key: "c", className: "aura-tab__count" }, t.count) : null
|
|
7365
7451
|
];
|
|
7366
7452
|
const own = omit(t.tabProps || {}, [
|
|
7367
7453
|
"type",
|
|
@@ -7375,7 +7461,7 @@ window.Aura = (() => {
|
|
|
7375
7461
|
"name",
|
|
7376
7462
|
"value"
|
|
7377
7463
|
]);
|
|
7378
|
-
return t.disabled ? /* @__PURE__ */
|
|
7464
|
+
return t.disabled ? /* @__PURE__ */ React36.createElement(
|
|
7379
7465
|
"span",
|
|
7380
7466
|
{
|
|
7381
7467
|
...omit(own, ["onClick"]),
|
|
@@ -7384,7 +7470,7 @@ window.Aura = (() => {
|
|
|
7384
7470
|
"aria-disabled": true
|
|
7385
7471
|
},
|
|
7386
7472
|
inner
|
|
7387
|
-
) : /* @__PURE__ */
|
|
7473
|
+
) : /* @__PURE__ */ React36.createElement(
|
|
7388
7474
|
Link,
|
|
7389
7475
|
{
|
|
7390
7476
|
...own,
|
|
@@ -7414,7 +7500,7 @@ window.Aura = (() => {
|
|
|
7414
7500
|
const stop2 = manual && focusId && items2.filter(function(t) {
|
|
7415
7501
|
return t.id === focusId && !t.disabled;
|
|
7416
7502
|
})[0] || current2;
|
|
7417
|
-
return /* @__PURE__ */
|
|
7503
|
+
return /* @__PURE__ */ React36.createElement("div", { ref, className: cx(rootCls, props.className) }, /* @__PURE__ */ React36.createElement(
|
|
7418
7504
|
"div",
|
|
7419
7505
|
{
|
|
7420
7506
|
role: "tablist",
|
|
@@ -7447,7 +7533,7 @@ window.Aura = (() => {
|
|
|
7447
7533
|
items2.map(function(t) {
|
|
7448
7534
|
const on = current2 && t.id === current2.id;
|
|
7449
7535
|
const own = t.tabProps || {};
|
|
7450
|
-
return /* @__PURE__ */
|
|
7536
|
+
return /* @__PURE__ */ React36.createElement(
|
|
7451
7537
|
"button",
|
|
7452
7538
|
{
|
|
7453
7539
|
...own,
|
|
@@ -7474,9 +7560,9 @@ window.Aura = (() => {
|
|
|
7474
7560
|
st[1](t.id);
|
|
7475
7561
|
}
|
|
7476
7562
|
},
|
|
7477
|
-
t.icon ? /* @__PURE__ */
|
|
7563
|
+
t.icon ? /* @__PURE__ */ React36.createElement(Icon, { name: t.icon }) : null,
|
|
7478
7564
|
t.label,
|
|
7479
|
-
t.count != null ? /* @__PURE__ */
|
|
7565
|
+
t.count != null ? /* @__PURE__ */ React36.createElement("span", { className: "aura-tab__count" }, t.count) : null
|
|
7480
7566
|
);
|
|
7481
7567
|
})
|
|
7482
7568
|
), props.keepMounted ? (
|
|
@@ -7484,7 +7570,7 @@ window.Aura = (() => {
|
|
|
7484
7570
|
items2.map(function(t) {
|
|
7485
7571
|
if (t.content === void 0) return null;
|
|
7486
7572
|
const on = current2 && t.id === current2.id;
|
|
7487
|
-
return /* @__PURE__ */
|
|
7573
|
+
return /* @__PURE__ */ React36.createElement(
|
|
7488
7574
|
"div",
|
|
7489
7575
|
{
|
|
7490
7576
|
key: t.id,
|
|
@@ -7498,7 +7584,7 @@ window.Aura = (() => {
|
|
|
7498
7584
|
t.content
|
|
7499
7585
|
);
|
|
7500
7586
|
})
|
|
7501
|
-
) : current2 && current2.content !== void 0 ? /* @__PURE__ */
|
|
7587
|
+
) : current2 && current2.content !== void 0 ? /* @__PURE__ */ React36.createElement(
|
|
7502
7588
|
"div",
|
|
7503
7589
|
{
|
|
7504
7590
|
role: "tabpanel",
|
|
@@ -7512,14 +7598,14 @@ window.Aura = (() => {
|
|
|
7512
7598
|
});
|
|
7513
7599
|
|
|
7514
7600
|
// src/SideNav.tsx
|
|
7515
|
-
var
|
|
7601
|
+
var React37 = __toESM(require_react(), 1);
|
|
7516
7602
|
var import_react_dom11 = __toESM(require_react_dom(), 1);
|
|
7517
7603
|
function contains(it, id) {
|
|
7518
7604
|
return !!id && !!it.children && it.children.some(function(c) {
|
|
7519
7605
|
return c.id === id || contains(c, id);
|
|
7520
7606
|
});
|
|
7521
7607
|
}
|
|
7522
|
-
var SideNav =
|
|
7608
|
+
var SideNav = React37.forwardRef(function SideNav2(props, ref) {
|
|
7523
7609
|
const t = useStrings();
|
|
7524
7610
|
const Link = useLinkComponent(props.linkComponent);
|
|
7525
7611
|
const base = uid();
|
|
@@ -7531,14 +7617,14 @@ window.Aura = (() => {
|
|
|
7531
7617
|
const active = st[0];
|
|
7532
7618
|
const col = useMaybeControlled(props.collapsed, !!props.defaultCollapsed, props.onCollapsedChange);
|
|
7533
7619
|
const collapsed = col[0];
|
|
7534
|
-
const tipState =
|
|
7535
|
-
|
|
7620
|
+
const tipState = React37.useState(null), tip2 = tipState[0], setTip = tipState[1];
|
|
7621
|
+
React37.useEffect(
|
|
7536
7622
|
function() {
|
|
7537
7623
|
if (!collapsed) setTip(null);
|
|
7538
7624
|
},
|
|
7539
7625
|
[collapsed]
|
|
7540
7626
|
);
|
|
7541
|
-
|
|
7627
|
+
React37.useEffect(
|
|
7542
7628
|
function() {
|
|
7543
7629
|
if (!tip2) return;
|
|
7544
7630
|
function esc(e) {
|
|
@@ -7563,12 +7649,12 @@ window.Aura = (() => {
|
|
|
7563
7649
|
return { onMouseEnter: show3, onFocus: show3, onMouseLeave: hide2, onBlur: hide2 };
|
|
7564
7650
|
}
|
|
7565
7651
|
const sections = props.sections || [{ items: props.items || [] }];
|
|
7566
|
-
const openState =
|
|
7652
|
+
const openState = React37.useState({}), toggled = openState[0], setToggled = openState[1];
|
|
7567
7653
|
function isOpen(it) {
|
|
7568
7654
|
if (toggled[it.id] != null) return toggled[it.id];
|
|
7569
7655
|
return !!it.defaultOpen || contains(it, active);
|
|
7570
7656
|
}
|
|
7571
|
-
|
|
7657
|
+
React37.useEffect(
|
|
7572
7658
|
function() {
|
|
7573
7659
|
if (!active) return;
|
|
7574
7660
|
const next = {};
|
|
@@ -7590,7 +7676,7 @@ window.Aura = (() => {
|
|
|
7590
7676
|
},
|
|
7591
7677
|
[active]
|
|
7592
7678
|
);
|
|
7593
|
-
const navRef =
|
|
7679
|
+
const navRef = React37.useRef(null);
|
|
7594
7680
|
function onKeyDown(e) {
|
|
7595
7681
|
const k = e.key;
|
|
7596
7682
|
if (k !== "ArrowDown" && k !== "ArrowUp" && k !== "Home" && k !== "End") return;
|
|
@@ -7609,12 +7695,12 @@ window.Aura = (() => {
|
|
|
7609
7695
|
function inner(it, group, open) {
|
|
7610
7696
|
const marked = it.count != null && it.count > 0 || it.badge != null;
|
|
7611
7697
|
return [
|
|
7612
|
-
it.icon ? /* @__PURE__ */
|
|
7613
|
-
collapsed && marked ? /* @__PURE__ */
|
|
7614
|
-
/* @__PURE__ */
|
|
7615
|
-
it.badge != null ? /* @__PURE__ */
|
|
7616
|
-
it.count != null ? /* @__PURE__ */
|
|
7617
|
-
group ? /* @__PURE__ */
|
|
7698
|
+
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,
|
|
7699
|
+
collapsed && marked ? /* @__PURE__ */ React37.createElement("span", { key: "d", className: "aura-nav__dot", "aria-hidden": "true" }) : null,
|
|
7700
|
+
/* @__PURE__ */ React37.createElement("span", { key: "l", className: "aura-nav__label" }, it.label),
|
|
7701
|
+
it.badge != null ? /* @__PURE__ */ React37.createElement("span", { key: "b", className: "aura-nav__badge" }, it.badge) : null,
|
|
7702
|
+
it.count != null ? /* @__PURE__ */ React37.createElement("span", { key: "c", className: "aura-nav__count" }, it.count) : null,
|
|
7703
|
+
group ? /* @__PURE__ */ React37.createElement(Icon, { key: "g", name: /* @__PURE__ */ React37.createElement(IconChevronDown, null), className: cx("aura-nav__chevron", open && "is-open") }) : null
|
|
7618
7704
|
];
|
|
7619
7705
|
}
|
|
7620
7706
|
function item(it, depth) {
|
|
@@ -7622,7 +7708,7 @@ window.Aura = (() => {
|
|
|
7622
7708
|
const open = !collapsed && isOpen(it);
|
|
7623
7709
|
const listId = base + "-" + it.id;
|
|
7624
7710
|
const holdsActive = contains(it, active);
|
|
7625
|
-
return /* @__PURE__ */
|
|
7711
|
+
return /* @__PURE__ */ React37.createElement("li", { key: it.id, className: "aura-nav__group" }, /* @__PURE__ */ React37.createElement(
|
|
7626
7712
|
"button",
|
|
7627
7713
|
{
|
|
7628
7714
|
type: "button",
|
|
@@ -7651,7 +7737,7 @@ window.Aura = (() => {
|
|
|
7651
7737
|
}
|
|
7652
7738
|
},
|
|
7653
7739
|
inner(it, true, open)
|
|
7654
|
-
), /* @__PURE__ */
|
|
7740
|
+
), /* @__PURE__ */ React37.createElement("ul", { id: listId, className: "aura-nav__list aura-nav__sub", hidden: !open }, it.children.map(function(c) {
|
|
7655
7741
|
return item(c, depth + 1);
|
|
7656
7742
|
})));
|
|
7657
7743
|
}
|
|
@@ -7670,9 +7756,9 @@ window.Aura = (() => {
|
|
|
7670
7756
|
if (action && props.onAction) props.onAction(it.id);
|
|
7671
7757
|
}
|
|
7672
7758
|
};
|
|
7673
|
-
return /* @__PURE__ */
|
|
7759
|
+
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
7760
|
}
|
|
7675
|
-
return /* @__PURE__ */
|
|
7761
|
+
return /* @__PURE__ */ React37.createElement(
|
|
7676
7762
|
"nav",
|
|
7677
7763
|
{
|
|
7678
7764
|
ref: function(el) {
|
|
@@ -7692,14 +7778,14 @@ window.Aura = (() => {
|
|
|
7692
7778
|
"aria-label": props.label || t.mainNav,
|
|
7693
7779
|
onKeyDown
|
|
7694
7780
|
},
|
|
7695
|
-
props.header ? /* @__PURE__ */
|
|
7696
|
-
/* @__PURE__ */
|
|
7697
|
-
return /* @__PURE__ */
|
|
7781
|
+
props.header ? /* @__PURE__ */ React37.createElement("div", { className: "aura-nav__header" }, props.header) : null,
|
|
7782
|
+
/* @__PURE__ */ React37.createElement("div", { className: "aura-nav__scroll" }, sections.map(function(s, i) {
|
|
7783
|
+
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
7784
|
return item(it, 0);
|
|
7699
7785
|
})));
|
|
7700
7786
|
})),
|
|
7701
|
-
props.footer ? /* @__PURE__ */
|
|
7702
|
-
props.collapsible && props.collapseToggle === "row" ? /* @__PURE__ */
|
|
7787
|
+
props.footer ? /* @__PURE__ */ React37.createElement("div", { className: "aura-nav__footer" }, props.footer) : null,
|
|
7788
|
+
props.collapsible && props.collapseToggle === "row" ? /* @__PURE__ */ React37.createElement("div", { className: "aura-nav__toggle aura-nav__toggle--row" }, /* @__PURE__ */ React37.createElement(
|
|
7703
7789
|
"button",
|
|
7704
7790
|
{
|
|
7705
7791
|
type: "button",
|
|
@@ -7710,12 +7796,12 @@ window.Aura = (() => {
|
|
|
7710
7796
|
col[1](!collapsed);
|
|
7711
7797
|
}
|
|
7712
7798
|
},
|
|
7713
|
-
/* @__PURE__ */
|
|
7714
|
-
/* @__PURE__ */
|
|
7715
|
-
)) : props.collapsible ? /* @__PURE__ */
|
|
7799
|
+
/* @__PURE__ */ React37.createElement(Icon, { name: collapsed ? /* @__PURE__ */ React37.createElement(IconPanelLeftOpen, null) : /* @__PURE__ */ React37.createElement(IconPanelLeftClose, null) }),
|
|
7800
|
+
/* @__PURE__ */ React37.createElement("span", { className: "aura-nav__label" }, collapsed ? t.expandNav : t.collapseNav)
|
|
7801
|
+
)) : props.collapsible ? /* @__PURE__ */ React37.createElement("div", { className: "aura-nav__toggle" }, /* @__PURE__ */ React37.createElement(
|
|
7716
7802
|
IconButton,
|
|
7717
7803
|
{
|
|
7718
|
-
icon: collapsed ? /* @__PURE__ */
|
|
7804
|
+
icon: collapsed ? /* @__PURE__ */ React37.createElement(IconPanelLeftOpen, null) : /* @__PURE__ */ React37.createElement(IconPanelLeftClose, null),
|
|
7719
7805
|
label: collapsed ? t.expandNav : t.collapseNav,
|
|
7720
7806
|
size: "md",
|
|
7721
7807
|
onClick: function() {
|
|
@@ -7725,7 +7811,7 @@ window.Aura = (() => {
|
|
|
7725
7811
|
}
|
|
7726
7812
|
)) : null,
|
|
7727
7813
|
tip2 && typeof document !== "undefined" ? (0, import_react_dom11.createPortal)(
|
|
7728
|
-
/* @__PURE__ */
|
|
7814
|
+
/* @__PURE__ */ React37.createElement(
|
|
7729
7815
|
"div",
|
|
7730
7816
|
{
|
|
7731
7817
|
className: "aura-tooltip aura-tooltip--right",
|
|
@@ -7740,8 +7826,8 @@ window.Aura = (() => {
|
|
|
7740
7826
|
});
|
|
7741
7827
|
|
|
7742
7828
|
// src/Breadcrumb.tsx
|
|
7743
|
-
var
|
|
7744
|
-
var Breadcrumb =
|
|
7829
|
+
var React38 = __toESM(require_react(), 1);
|
|
7830
|
+
var Breadcrumb = React38.forwardRef(function Breadcrumb2(props, ref) {
|
|
7745
7831
|
const t = useStrings();
|
|
7746
7832
|
const Link = useLinkComponent(props.linkComponent);
|
|
7747
7833
|
const items2 = props.items || [];
|
|
@@ -7749,12 +7835,12 @@ window.Aura = (() => {
|
|
|
7749
7835
|
const trail = items2.map(function(it) {
|
|
7750
7836
|
return it.label + "" + (it.href || "");
|
|
7751
7837
|
}).join("");
|
|
7752
|
-
const st =
|
|
7838
|
+
const st = React38.useState(null), expanded = st[0] === trail, setExpanded = function() {
|
|
7753
7839
|
st[1](trail);
|
|
7754
7840
|
};
|
|
7755
|
-
const listRef =
|
|
7756
|
-
const focusNext =
|
|
7757
|
-
|
|
7841
|
+
const listRef = React38.useRef(null);
|
|
7842
|
+
const focusNext = React38.useRef(false);
|
|
7843
|
+
React38.useEffect(
|
|
7758
7844
|
function() {
|
|
7759
7845
|
if (!expanded || !focusNext.current) return;
|
|
7760
7846
|
focusNext.current = false;
|
|
@@ -7769,8 +7855,8 @@ window.Aura = (() => {
|
|
|
7769
7855
|
},
|
|
7770
7856
|
[expanded]
|
|
7771
7857
|
);
|
|
7772
|
-
const sep = /* @__PURE__ */
|
|
7773
|
-
const more = collapsible && !expanded ? /* @__PURE__ */
|
|
7858
|
+
const sep = /* @__PURE__ */ React38.createElement(Icon, { name: /* @__PURE__ */ React38.createElement(IconChevronRight, null), size: 12, className: "aura-crumbs__sep" });
|
|
7859
|
+
const more = collapsible && !expanded ? /* @__PURE__ */ React38.createElement("li", { key: "more", className: "aura-crumbs__more" }, /* @__PURE__ */ React38.createElement(
|
|
7774
7860
|
"button",
|
|
7775
7861
|
{
|
|
7776
7862
|
type: "button",
|
|
@@ -7793,23 +7879,23 @@ window.Aura = (() => {
|
|
|
7793
7879
|
if (it.onClick) it.onClick();
|
|
7794
7880
|
} : void 0;
|
|
7795
7881
|
out.push(
|
|
7796
|
-
/* @__PURE__ */
|
|
7882
|
+
/* @__PURE__ */ React38.createElement(
|
|
7797
7883
|
"li",
|
|
7798
7884
|
{
|
|
7799
7885
|
key: i,
|
|
7800
7886
|
...it.itemProps,
|
|
7801
7887
|
className: cx(it.itemProps && it.itemProps.className, collapsible && !last && i > 0 && "aura-crumbs__middle") || void 0
|
|
7802
7888
|
},
|
|
7803
|
-
last ? /* @__PURE__ */
|
|
7889
|
+
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
7890
|
/* 5.7: a segment with no page and no action is text, not a button that does nothing. */
|
|
7805
|
-
/* @__PURE__ */
|
|
7891
|
+
/* @__PURE__ */ React38.createElement("span", { ...plain, className: cx("aura-crumbs__text", lp.className) }, it.label)
|
|
7806
7892
|
),
|
|
7807
7893
|
last ? null : sep
|
|
7808
7894
|
)
|
|
7809
7895
|
);
|
|
7810
7896
|
if (i === 0 && more) out.push(more);
|
|
7811
7897
|
});
|
|
7812
|
-
return /* @__PURE__ */
|
|
7898
|
+
return /* @__PURE__ */ React38.createElement(
|
|
7813
7899
|
"nav",
|
|
7814
7900
|
{
|
|
7815
7901
|
ref,
|
|
@@ -7820,27 +7906,27 @@ window.Aura = (() => {
|
|
|
7820
7906
|
props.className
|
|
7821
7907
|
)
|
|
7822
7908
|
},
|
|
7823
|
-
/* @__PURE__ */
|
|
7909
|
+
/* @__PURE__ */ React38.createElement("ol", { ref: listRef }, out)
|
|
7824
7910
|
);
|
|
7825
7911
|
});
|
|
7826
7912
|
|
|
7827
7913
|
// src/Avatar.tsx
|
|
7828
|
-
var
|
|
7829
|
-
var Avatar =
|
|
7830
|
-
const errState =
|
|
7914
|
+
var React39 = __toESM(require_react(), 1);
|
|
7915
|
+
var Avatar = React39.forwardRef(function Avatar2(props, ref) {
|
|
7916
|
+
const errState = React39.useState(null);
|
|
7831
7917
|
return avatarElement(props, ref, errState[0], function() {
|
|
7832
7918
|
errState[1](props.src || null);
|
|
7833
7919
|
});
|
|
7834
7920
|
});
|
|
7835
7921
|
|
|
7836
7922
|
// src/Stack.tsx
|
|
7837
|
-
var
|
|
7923
|
+
var React41 = __toESM(require_react(), 1);
|
|
7838
7924
|
|
|
7839
7925
|
// src/responsive.tsx
|
|
7840
|
-
var
|
|
7926
|
+
var React40 = __toESM(require_react(), 1);
|
|
7841
7927
|
var ORDER2 = ["base", "sm", "md", "lg", "xl"];
|
|
7842
7928
|
function useBreakpoint() {
|
|
7843
|
-
return
|
|
7929
|
+
return React40.useSyncExternalStore(subscribe, current, function() {
|
|
7844
7930
|
return "lg";
|
|
7845
7931
|
});
|
|
7846
7932
|
}
|
|
@@ -7866,8 +7952,8 @@ window.Aura = (() => {
|
|
|
7866
7952
|
}
|
|
7867
7953
|
|
|
7868
7954
|
// src/Stack.tsx
|
|
7869
|
-
var h5 =
|
|
7870
|
-
var Stack =
|
|
7955
|
+
var h5 = React41.createElement;
|
|
7956
|
+
var Stack = React41.forwardRef(function Stack2(props, ref) {
|
|
7871
7957
|
const style = Object.assign(
|
|
7872
7958
|
{},
|
|
7873
7959
|
respVars("aura-stack-dir", props.direction || "column"),
|
|
@@ -7881,9 +7967,9 @@ window.Aura = (() => {
|
|
|
7881
7967
|
});
|
|
7882
7968
|
|
|
7883
7969
|
// src/Grid.tsx
|
|
7884
|
-
var
|
|
7885
|
-
var h6 =
|
|
7886
|
-
var Grid =
|
|
7970
|
+
var React42 = __toESM(require_react(), 1);
|
|
7971
|
+
var h6 = React42.createElement;
|
|
7972
|
+
var Grid = React42.forwardRef(function Grid2(props, ref) {
|
|
7887
7973
|
const style = Object.assign(
|
|
7888
7974
|
{},
|
|
7889
7975
|
respVars("aura-grid-gap", props.gap == null ? 6 : props.gap, space),
|
|
@@ -7898,9 +7984,9 @@ window.Aura = (() => {
|
|
|
7898
7984
|
});
|
|
7899
7985
|
|
|
7900
7986
|
// src/Container.tsx
|
|
7901
|
-
var
|
|
7902
|
-
var h7 =
|
|
7903
|
-
var Container =
|
|
7987
|
+
var React43 = __toESM(require_react(), 1);
|
|
7988
|
+
var h7 = React43.createElement;
|
|
7989
|
+
var Container = React43.forwardRef(function Container2(props, ref) {
|
|
7904
7990
|
const attrs2 = {};
|
|
7905
7991
|
Object.keys(props).forEach(function(k) {
|
|
7906
7992
|
if (k === "id" || k === "lang" || k === "dir" || /^(aria|data)-/.test(k))
|
|
@@ -7923,11 +8009,11 @@ window.Aura = (() => {
|
|
|
7923
8009
|
});
|
|
7924
8010
|
|
|
7925
8011
|
// src/PageHeaderClient.tsx
|
|
7926
|
-
var
|
|
8012
|
+
var React45 = __toESM(require_react(), 1);
|
|
7927
8013
|
|
|
7928
8014
|
// src/PageHeader.tsx
|
|
7929
|
-
var
|
|
7930
|
-
var h8 =
|
|
8015
|
+
var React44 = __toESM(require_react(), 1);
|
|
8016
|
+
var h8 = React44.createElement;
|
|
7931
8017
|
var LAZY = Symbol.for("react.lazy");
|
|
7932
8018
|
function chipsOnly(node) {
|
|
7933
8019
|
let el = 0;
|
|
@@ -7946,8 +8032,8 @@ window.Aura = (() => {
|
|
|
7946
8032
|
}
|
|
7947
8033
|
return walk(value);
|
|
7948
8034
|
}
|
|
7949
|
-
if (
|
|
7950
|
-
if (n3.type ===
|
|
8035
|
+
if (React44.isValidElement(n3)) {
|
|
8036
|
+
if (n3.type === React44.Fragment) return walk(n3.props.children);
|
|
7951
8037
|
el++;
|
|
7952
8038
|
return true;
|
|
7953
8039
|
}
|
|
@@ -7955,7 +8041,7 @@ window.Aura = (() => {
|
|
|
7955
8041
|
};
|
|
7956
8042
|
return walk(node) && el > 0;
|
|
7957
8043
|
}
|
|
7958
|
-
var PageHeader =
|
|
8044
|
+
var PageHeader = React44.forwardRef(function PageHeader2(props, ref) {
|
|
7959
8045
|
const attrs2 = {};
|
|
7960
8046
|
Object.keys(props).forEach(function(k) {
|
|
7961
8047
|
if (k === "id" || k === "lang" || k === "dir" || k === "role" || /^(aria|data)-/.test(k))
|
|
@@ -8035,12 +8121,12 @@ window.Aura = (() => {
|
|
|
8035
8121
|
}
|
|
8036
8122
|
return false;
|
|
8037
8123
|
}
|
|
8038
|
-
var PageHeader3 =
|
|
8039
|
-
const own =
|
|
8124
|
+
var PageHeader3 = React45.forwardRef(function PageHeader4(props, ref) {
|
|
8125
|
+
const own = React45.useRef(null);
|
|
8040
8126
|
const merged = useMergedRef(ref, own);
|
|
8041
8127
|
const bar = props.actionsBarBelow;
|
|
8042
8128
|
const hasActions = props.actions != null && props.actions !== false;
|
|
8043
|
-
|
|
8129
|
+
React45.useEffect(
|
|
8044
8130
|
function() {
|
|
8045
8131
|
if (bar !== "sm" && bar !== "md" || !hasActions || !own.current) return;
|
|
8046
8132
|
const el = own.current.querySelector(":scope > .aura-page-header__actions");
|
|
@@ -8079,20 +8165,20 @@ window.Aura = (() => {
|
|
|
8079
8165
|
[bar, hasActions]
|
|
8080
8166
|
);
|
|
8081
8167
|
const focusTitle = !!props.focusTitleOnMount;
|
|
8082
|
-
|
|
8168
|
+
React45.useEffect(function() {
|
|
8083
8169
|
if (!focusTitle || !own.current) return;
|
|
8084
8170
|
const t = own.current.querySelector(".aura-page-header__title");
|
|
8085
8171
|
if (t) t.focus({ preventScroll: true });
|
|
8086
8172
|
}, []);
|
|
8087
|
-
return /* @__PURE__ */
|
|
8173
|
+
return /* @__PURE__ */ React45.createElement(PageHeader, { ...props, ref: merged });
|
|
8088
8174
|
});
|
|
8089
8175
|
|
|
8090
8176
|
// src/StatusTile.tsx
|
|
8091
|
-
var
|
|
8177
|
+
var React47 = __toESM(require_react(), 1);
|
|
8092
8178
|
|
|
8093
8179
|
// src/tiles.tsx
|
|
8094
|
-
var
|
|
8095
|
-
var h9 =
|
|
8180
|
+
var React46 = __toESM(require_react(), 1);
|
|
8181
|
+
var h9 = React46.createElement;
|
|
8096
8182
|
var STATUS_ICON = {
|
|
8097
8183
|
down: IconCircleAlert,
|
|
8098
8184
|
problem: IconTriangleAlert,
|
|
@@ -8184,7 +8270,7 @@ window.Aura = (() => {
|
|
|
8184
8270
|
) : null
|
|
8185
8271
|
);
|
|
8186
8272
|
}
|
|
8187
|
-
var TileGrid =
|
|
8273
|
+
var TileGrid = React46.forwardRef(function TileGrid2(props, ref) {
|
|
8188
8274
|
const style = Object.assign(
|
|
8189
8275
|
{},
|
|
8190
8276
|
respVars("aura-grid-cols", props.columns == null ? { base: 2, md: 3 } : props.columns),
|
|
@@ -8200,16 +8286,16 @@ window.Aura = (() => {
|
|
|
8200
8286
|
}),
|
|
8201
8287
|
/* toArray drops null and booleans and keys each element; a Fragment's children are items too. */
|
|
8202
8288
|
flat(props.children).map(function(c, i) {
|
|
8203
|
-
return h9("li", { key:
|
|
8289
|
+
return h9("li", { key: React46.isValidElement(c) && c.key != null ? c.key : i }, c);
|
|
8204
8290
|
})
|
|
8205
8291
|
);
|
|
8206
8292
|
});
|
|
8207
8293
|
function flat(children) {
|
|
8208
8294
|
const out = [];
|
|
8209
|
-
|
|
8210
|
-
if (
|
|
8295
|
+
React46.Children.toArray(children).forEach(function(c) {
|
|
8296
|
+
if (React46.isValidElement(c) && c.type === React46.Fragment)
|
|
8211
8297
|
flat(c.props.children).forEach(function(x) {
|
|
8212
|
-
out.push(
|
|
8298
|
+
out.push(React46.isValidElement(x) ? React46.cloneElement(x, { key: String(c.key) + "/" + String(x.key) }) : x);
|
|
8213
8299
|
});
|
|
8214
8300
|
else if (c !== "") out.push(c);
|
|
8215
8301
|
});
|
|
@@ -8223,7 +8309,7 @@ window.Aura = (() => {
|
|
|
8223
8309
|
function num(v) {
|
|
8224
8310
|
return typeof v === "number" && isFinite(v) ? v : null;
|
|
8225
8311
|
}
|
|
8226
|
-
var Sparkline =
|
|
8312
|
+
var Sparkline = React46.forwardRef(function Sparkline2(props, ref) {
|
|
8227
8313
|
const wh = SIZES2[props.size || "sm"] || SIZES2.sm;
|
|
8228
8314
|
const W = wh[0], H = wh[1];
|
|
8229
8315
|
const data = (props.data || []).map(num);
|
|
@@ -8297,8 +8383,8 @@ window.Aura = (() => {
|
|
|
8297
8383
|
});
|
|
8298
8384
|
|
|
8299
8385
|
// src/StatusTile.tsx
|
|
8300
|
-
var useIsoLayoutEffect2 = typeof window !== "undefined" ?
|
|
8301
|
-
var StatusTile =
|
|
8386
|
+
var useIsoLayoutEffect2 = typeof window !== "undefined" ? React47.useLayoutEffect : React47.useEffect;
|
|
8387
|
+
var StatusTile = React47.forwardRef(function StatusTile2(props, ref) {
|
|
8302
8388
|
const Link = useLinkComponent(props.linkComponent);
|
|
8303
8389
|
const t = useStrings();
|
|
8304
8390
|
useAutoTip();
|
|
@@ -8307,8 +8393,8 @@ window.Aura = (() => {
|
|
|
8307
8393
|
"status-tile-label",
|
|
8308
8394
|
"StatusTile `aria-label` needs `href`: without a link the tile is a plain box, where a name is not allowed."
|
|
8309
8395
|
);
|
|
8310
|
-
const titleRef =
|
|
8311
|
-
const check =
|
|
8396
|
+
const titleRef = React47.useRef(null);
|
|
8397
|
+
const check = React47.useCallback(function() {
|
|
8312
8398
|
const el = titleRef.current;
|
|
8313
8399
|
if (!el) return;
|
|
8314
8400
|
const cut = el.scrollHeight > el.clientHeight + 1;
|
|
@@ -8318,7 +8404,7 @@ window.Aura = (() => {
|
|
|
8318
8404
|
}, []);
|
|
8319
8405
|
useIsoLayoutEffect2(check, [props.title, check]);
|
|
8320
8406
|
const linked = !!props.href;
|
|
8321
|
-
|
|
8407
|
+
React47.useEffect(
|
|
8322
8408
|
function() {
|
|
8323
8409
|
const el = titleRef.current;
|
|
8324
8410
|
if (!el) return;
|
|
@@ -8343,14 +8429,14 @@ window.Aura = (() => {
|
|
|
8343
8429
|
});
|
|
8344
8430
|
|
|
8345
8431
|
// src/AppShell.tsx
|
|
8346
|
-
var
|
|
8432
|
+
var React49 = __toESM(require_react(), 1);
|
|
8347
8433
|
|
|
8348
8434
|
// src/scrollHide.ts
|
|
8349
|
-
var
|
|
8435
|
+
var React48 = __toESM(require_react(), 1);
|
|
8350
8436
|
var STEP = 8;
|
|
8351
8437
|
function useHideOnScroll(enabled, el, media, from) {
|
|
8352
|
-
const st =
|
|
8353
|
-
|
|
8438
|
+
const st = React48.useState(false), hidden = st[0], setHidden = st[1];
|
|
8439
|
+
React48.useEffect(
|
|
8354
8440
|
function() {
|
|
8355
8441
|
if (!enabled || typeof window === "undefined") {
|
|
8356
8442
|
setHidden(false);
|
|
@@ -8443,32 +8529,32 @@ window.Aura = (() => {
|
|
|
8443
8529
|
function pinned(bar) {
|
|
8444
8530
|
return getComputedStyle(bar).position !== "static";
|
|
8445
8531
|
}
|
|
8446
|
-
var AppShell =
|
|
8532
|
+
var AppShell = React49.forwardRef(function AppShell2(props, ref) {
|
|
8447
8533
|
const t = useStrings();
|
|
8448
8534
|
const bp = useBreakpoint();
|
|
8449
8535
|
const wide = bp === "lg" || bp === "xl";
|
|
8450
|
-
const st =
|
|
8451
|
-
|
|
8536
|
+
const st = React49.useState(false), open = st[0], setOpen = st[1];
|
|
8537
|
+
React49.useEffect(
|
|
8452
8538
|
function() {
|
|
8453
8539
|
if (wide) setOpen(false);
|
|
8454
8540
|
},
|
|
8455
8541
|
[wide]
|
|
8456
8542
|
);
|
|
8457
|
-
const navEl = props.nav &&
|
|
8543
|
+
const navEl = props.nav && React49.isValidElement(props.nav) ? props.nav : null;
|
|
8458
8544
|
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 =
|
|
8545
|
+
const navState = React49.useState(navEl ? navEl.props.defaultValue : void 0);
|
|
8460
8546
|
function onNav(id) {
|
|
8461
8547
|
if (shared) navState[1](id);
|
|
8462
8548
|
if (navEl && navEl.props.onChange) navEl.props.onChange(id);
|
|
8463
8549
|
}
|
|
8464
|
-
const rootRef =
|
|
8465
|
-
const barRef =
|
|
8466
|
-
const probeRef =
|
|
8550
|
+
const rootRef = React49.useRef(null);
|
|
8551
|
+
const barRef = React49.useRef(null);
|
|
8552
|
+
const probeRef = React49.useRef(null);
|
|
8467
8553
|
const mergedRef = useMergedRef(ref, rootRef);
|
|
8468
8554
|
const hasBar = !!(props.header || props.nav);
|
|
8469
|
-
const barH =
|
|
8555
|
+
const barH = React49.useState(null);
|
|
8470
8556
|
const away = useHideOnScroll(!!props.headerHideOnScroll && hasBar, barRef, "(max-width: 1023.98px)", barH[0] || 56);
|
|
8471
|
-
const awayRef =
|
|
8557
|
+
const awayRef = React49.useRef(away);
|
|
8472
8558
|
awayRef.current = away;
|
|
8473
8559
|
useIsoLayoutEffect(
|
|
8474
8560
|
function() {
|
|
@@ -8503,8 +8589,8 @@ window.Aura = (() => {
|
|
|
8503
8589
|
},
|
|
8504
8590
|
[hasBar]
|
|
8505
8591
|
);
|
|
8506
|
-
const deskNav = navEl && shared ?
|
|
8507
|
-
const drawerNav = navEl ?
|
|
8592
|
+
const deskNav = navEl && shared ? React49.cloneElement(navEl, { value: navState[0], onChange: onNav }) : props.nav;
|
|
8593
|
+
const drawerNav = navEl ? React49.cloneElement(navEl, {
|
|
8508
8594
|
value: shared ? navState[0] : navEl.props.value,
|
|
8509
8595
|
onChange: function(id) {
|
|
8510
8596
|
onNav(id);
|
|
@@ -8519,7 +8605,7 @@ window.Aura = (() => {
|
|
|
8519
8605
|
collapsed: false,
|
|
8520
8606
|
collapsible: false
|
|
8521
8607
|
}) : props.nav;
|
|
8522
|
-
return /* @__PURE__ */
|
|
8608
|
+
return /* @__PURE__ */ React49.createElement(
|
|
8523
8609
|
"div",
|
|
8524
8610
|
{
|
|
8525
8611
|
ref: mergedRef,
|
|
@@ -8534,8 +8620,8 @@ window.Aura = (() => {
|
|
|
8534
8620
|
props.className
|
|
8535
8621
|
)
|
|
8536
8622
|
},
|
|
8537
|
-
props.nav ? /* @__PURE__ */
|
|
8538
|
-
props.nav ? /* @__PURE__ */
|
|
8623
|
+
props.nav ? /* @__PURE__ */ React49.createElement("div", { className: "aura-shell__nav" }, deskNav) : null,
|
|
8624
|
+
props.nav ? /* @__PURE__ */ React49.createElement(
|
|
8539
8625
|
Drawer,
|
|
8540
8626
|
{
|
|
8541
8627
|
open,
|
|
@@ -8552,7 +8638,7 @@ window.Aura = (() => {
|
|
|
8552
8638
|
},
|
|
8553
8639
|
drawerNav
|
|
8554
8640
|
) : null,
|
|
8555
|
-
/* @__PURE__ */
|
|
8641
|
+
/* @__PURE__ */ React49.createElement("div", { className: "aura-shell__main" }, props.header || props.nav ? /* @__PURE__ */ React49.createElement(
|
|
8556
8642
|
"header",
|
|
8557
8643
|
{
|
|
8558
8644
|
ref: barRef,
|
|
@@ -8564,11 +8650,11 @@ window.Aura = (() => {
|
|
|
8564
8650
|
away && "is-away"
|
|
8565
8651
|
)
|
|
8566
8652
|
},
|
|
8567
|
-
props.nav ? /* @__PURE__ */
|
|
8653
|
+
props.nav ? /* @__PURE__ */ React49.createElement(
|
|
8568
8654
|
IconButton,
|
|
8569
8655
|
{
|
|
8570
8656
|
className: "aura-shell__menu",
|
|
8571
|
-
icon: /* @__PURE__ */
|
|
8657
|
+
icon: /* @__PURE__ */ React49.createElement(IconMenu, null),
|
|
8572
8658
|
label: props.menuLabel || t.openNav,
|
|
8573
8659
|
size: "md",
|
|
8574
8660
|
touchHeight: true,
|
|
@@ -8578,9 +8664,9 @@ window.Aura = (() => {
|
|
|
8578
8664
|
"aria-expanded": open
|
|
8579
8665
|
}
|
|
8580
8666
|
) : null,
|
|
8581
|
-
/* @__PURE__ */
|
|
8582
|
-
/* @__PURE__ */
|
|
8583
|
-
) : null, /* @__PURE__ */
|
|
8667
|
+
/* @__PURE__ */ React49.createElement("div", { className: "aura-shell__bar-content" }, props.header),
|
|
8668
|
+
/* @__PURE__ */ React49.createElement("span", { className: "aura-shell__probe", "aria-hidden": "true", ref: probeRef })
|
|
8669
|
+
) : null, /* @__PURE__ */ React49.createElement(
|
|
8584
8670
|
"main",
|
|
8585
8671
|
{
|
|
8586
8672
|
className: cx("aura-shell__content", props.contentPadding === false && "is-flush"),
|
|
@@ -8593,17 +8679,17 @@ window.Aura = (() => {
|
|
|
8593
8679
|
});
|
|
8594
8680
|
|
|
8595
8681
|
// src/ActionBar.tsx
|
|
8596
|
-
var
|
|
8597
|
-
var ActionBar =
|
|
8682
|
+
var React50 = __toESM(require_react(), 1);
|
|
8683
|
+
var ActionBar = React50.forwardRef(function ActionBar2(props, ref) {
|
|
8598
8684
|
const t = useStrings();
|
|
8599
8685
|
const bulk = props.selected != null;
|
|
8600
8686
|
const idle = bulk && !props.selected;
|
|
8601
8687
|
const count = bulk && props.selected ? t.selectedCount(props.selected) : null;
|
|
8602
|
-
const hasStart =
|
|
8688
|
+
const hasStart = React50.Children.toArray(props.start).some(function(c) {
|
|
8603
8689
|
return c !== "";
|
|
8604
8690
|
});
|
|
8605
|
-
const cameFrom =
|
|
8606
|
-
const own =
|
|
8691
|
+
const cameFrom = React50.useRef(null);
|
|
8692
|
+
const own = React50.useRef(null);
|
|
8607
8693
|
function clear() {
|
|
8608
8694
|
props.onClearSelection();
|
|
8609
8695
|
setTimeout(function() {
|
|
@@ -8612,7 +8698,7 @@ window.Aura = (() => {
|
|
|
8612
8698
|
if ((!a || a === document.body || !a.isConnected) && back && back.isConnected) back.focus();
|
|
8613
8699
|
}, 0);
|
|
8614
8700
|
}
|
|
8615
|
-
return /* @__PURE__ */
|
|
8701
|
+
return /* @__PURE__ */ React50.createElement(
|
|
8616
8702
|
"div",
|
|
8617
8703
|
{
|
|
8618
8704
|
ref: function(el) {
|
|
@@ -8634,16 +8720,16 @@ window.Aura = (() => {
|
|
|
8634
8720
|
props.className
|
|
8635
8721
|
)
|
|
8636
8722
|
},
|
|
8637
|
-
/* @__PURE__ */
|
|
8723
|
+
/* @__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
8724
|
);
|
|
8639
8725
|
});
|
|
8640
8726
|
|
|
8641
8727
|
// src/Separator.tsx
|
|
8642
|
-
var
|
|
8643
|
-
var Separator =
|
|
8728
|
+
var React51 = __toESM(require_react(), 1);
|
|
8729
|
+
var Separator = React51.forwardRef(function Separator2(props, ref) {
|
|
8644
8730
|
const vertical = props.orientation === "vertical";
|
|
8645
8731
|
const decorative = props.decorative !== false;
|
|
8646
|
-
return /* @__PURE__ */
|
|
8732
|
+
return /* @__PURE__ */ React51.createElement(
|
|
8647
8733
|
"div",
|
|
8648
8734
|
{
|
|
8649
8735
|
ref,
|
|
@@ -8656,13 +8742,13 @@ window.Aura = (() => {
|
|
|
8656
8742
|
});
|
|
8657
8743
|
|
|
8658
8744
|
// src/Table.tsx
|
|
8659
|
-
var
|
|
8745
|
+
var React53 = __toESM(require_react(), 1);
|
|
8660
8746
|
|
|
8661
8747
|
// src/TableSkeleton.tsx
|
|
8662
|
-
var
|
|
8663
|
-
var h10 =
|
|
8748
|
+
var React52 = __toESM(require_react(), 1);
|
|
8749
|
+
var h10 = React52.createElement;
|
|
8664
8750
|
function inertProps() {
|
|
8665
|
-
return { inert: parseInt(
|
|
8751
|
+
return { inert: parseInt(React52.version, 10) >= 19 ? true : "", "aria-hidden": true };
|
|
8666
8752
|
}
|
|
8667
8753
|
function widthOf(w) {
|
|
8668
8754
|
return w == null || w === "" ? void 0 : typeof w === "number" ? w + "px" : w;
|
|
@@ -8820,12 +8906,12 @@ window.Aura = (() => {
|
|
|
8820
8906
|
}
|
|
8821
8907
|
|
|
8822
8908
|
// src/Table.tsx
|
|
8823
|
-
var StackLabels =
|
|
8824
|
-
var ColumnIndex =
|
|
8909
|
+
var StackLabels = React53.createContext(null);
|
|
8910
|
+
var ColumnIndex = React53.createContext(-1);
|
|
8825
8911
|
function flat2(children) {
|
|
8826
8912
|
const out = [];
|
|
8827
|
-
|
|
8828
|
-
if (
|
|
8913
|
+
React53.Children.toArray(children).forEach(function(c) {
|
|
8914
|
+
if (React53.isValidElement(c) && c.type === React53.Fragment)
|
|
8829
8915
|
out.push.apply(out, flat2(c.props.children));
|
|
8830
8916
|
else out.push(c);
|
|
8831
8917
|
});
|
|
@@ -8839,7 +8925,7 @@ window.Aura = (() => {
|
|
|
8839
8925
|
});
|
|
8840
8926
|
return parts.length ? parts.join("") : void 0;
|
|
8841
8927
|
}
|
|
8842
|
-
if (
|
|
8928
|
+
if (React53.isValidElement(node)) {
|
|
8843
8929
|
const p = node.props;
|
|
8844
8930
|
if (p["aria-hidden"] === true || p["aria-hidden"] === "true") return void 0;
|
|
8845
8931
|
return text(p.children);
|
|
@@ -8849,13 +8935,13 @@ window.Aura = (() => {
|
|
|
8849
8935
|
function headerLabels(children) {
|
|
8850
8936
|
let out = [];
|
|
8851
8937
|
flat2(children).forEach(function(c) {
|
|
8852
|
-
if (out.length || !
|
|
8938
|
+
if (out.length || !React53.isValidElement(c) || c.type !== THead) return;
|
|
8853
8939
|
const row = flat2(c.props.children).find(function(r2) {
|
|
8854
|
-
return
|
|
8940
|
+
return React53.isValidElement(r2);
|
|
8855
8941
|
});
|
|
8856
8942
|
if (!row) return;
|
|
8857
8943
|
flat2(row.props.children).forEach(function(cell) {
|
|
8858
|
-
if (!
|
|
8944
|
+
if (!React53.isValidElement(cell)) return;
|
|
8859
8945
|
const p = cell.props;
|
|
8860
8946
|
const t = text(p.children);
|
|
8861
8947
|
const label = p.label != null ? p.label : t != null ? t.replace(/\s+/g, " ").trim() || void 0 : void 0;
|
|
@@ -8868,13 +8954,13 @@ window.Aura = (() => {
|
|
|
8868
8954
|
function headerColumns(children) {
|
|
8869
8955
|
const out = [];
|
|
8870
8956
|
flat2(children).forEach(function(c) {
|
|
8871
|
-
if (out.length || !
|
|
8957
|
+
if (out.length || !React53.isValidElement(c) || c.type !== THead) return;
|
|
8872
8958
|
const row = flat2(c.props.children).find(function(r2) {
|
|
8873
|
-
return
|
|
8959
|
+
return React53.isValidElement(r2);
|
|
8874
8960
|
});
|
|
8875
8961
|
if (!row) return;
|
|
8876
8962
|
flat2(row.props.children).forEach(function(cell) {
|
|
8877
|
-
if (!
|
|
8963
|
+
if (!React53.isValidElement(cell)) return;
|
|
8878
8964
|
const p = cell.props;
|
|
8879
8965
|
const t = text(p.children);
|
|
8880
8966
|
const style = p.style;
|
|
@@ -8892,7 +8978,7 @@ window.Aura = (() => {
|
|
|
8892
8978
|
});
|
|
8893
8979
|
return out;
|
|
8894
8980
|
}
|
|
8895
|
-
var Table =
|
|
8981
|
+
var Table = React53.forwardRef(function Table2(props, ref) {
|
|
8896
8982
|
const {
|
|
8897
8983
|
caption,
|
|
8898
8984
|
captionHidden,
|
|
@@ -8920,7 +9006,7 @@ window.Aura = (() => {
|
|
|
8920
9006
|
);
|
|
8921
9007
|
const shownChildren = skeletonCols ? [
|
|
8922
9008
|
flat2(children).filter(function(c) {
|
|
8923
|
-
return
|
|
9009
|
+
return React53.isValidElement(c) && c.type === THead;
|
|
8924
9010
|
}),
|
|
8925
9011
|
skeletonBody(skeletonCols, loadingRows != null ? Math.max(0, loadingRows) : 5, !!stackBelow)
|
|
8926
9012
|
] : children;
|
|
@@ -8936,12 +9022,12 @@ window.Aura = (() => {
|
|
|
8936
9022
|
"tbl-stack-labels",
|
|
8937
9023
|
"Table stackBelow: no THead > Tr > Th found among its children, so cells have no labels. Pass `label` on each Td."
|
|
8938
9024
|
);
|
|
8939
|
-
const outer =
|
|
9025
|
+
const outer = React53.useContext(StackLabels);
|
|
8940
9026
|
const pageDensity = useDensity();
|
|
8941
9027
|
const capId = uid();
|
|
8942
|
-
const wrap =
|
|
8943
|
-
const sc =
|
|
8944
|
-
const wide =
|
|
9028
|
+
const wrap = React53.useRef(null);
|
|
9029
|
+
const sc = React53.useState(false), scrolls = sc[0];
|
|
9030
|
+
const wide = React53.useState(false);
|
|
8945
9031
|
useIsoLayoutEffect(function() {
|
|
8946
9032
|
const el = wrap.current;
|
|
8947
9033
|
if (!el || typeof ResizeObserver === "undefined") return;
|
|
@@ -8958,7 +9044,7 @@ window.Aura = (() => {
|
|
|
8958
9044
|
ro.disconnect();
|
|
8959
9045
|
};
|
|
8960
9046
|
}, []);
|
|
8961
|
-
const table = /* @__PURE__ */
|
|
9047
|
+
const table = /* @__PURE__ */ React53.createElement(
|
|
8962
9048
|
"div",
|
|
8963
9049
|
{
|
|
8964
9050
|
ref: wrap,
|
|
@@ -8983,7 +9069,7 @@ window.Aura = (() => {
|
|
|
8983
9069
|
"aria-labelledby": scrolls && !loading ? caption != null ? capId : rest["aria-labelledby"] : void 0,
|
|
8984
9070
|
"aria-label": scrolls && !loading && caption == null ? rest["aria-label"] : void 0
|
|
8985
9071
|
},
|
|
8986
|
-
/* @__PURE__ */
|
|
9072
|
+
/* @__PURE__ */ React53.createElement(
|
|
8987
9073
|
"table",
|
|
8988
9074
|
{
|
|
8989
9075
|
ref,
|
|
@@ -9000,12 +9086,12 @@ window.Aura = (() => {
|
|
|
9000
9086
|
role: stackBelow ? "table" : void 0,
|
|
9001
9087
|
...rest
|
|
9002
9088
|
},
|
|
9003
|
-
caption != null ? /* @__PURE__ */
|
|
9089
|
+
caption != null ? /* @__PURE__ */ React53.createElement("caption", { id: capId, className: cx("aura-tbl__caption", captionHidden && "aura-sr-only") }, caption) : null,
|
|
9004
9090
|
skeletonCols ? skeletonColgroup(skeletonCols) : null,
|
|
9005
|
-
labels ? /* @__PURE__ */
|
|
9091
|
+
labels ? /* @__PURE__ */ React53.createElement(StackLabels.Provider, { value: labels }, shownChildren) : outer ? /* @__PURE__ */ React53.createElement(StackLabels.Provider, { value: null }, shownChildren) : shownChildren
|
|
9006
9092
|
)
|
|
9007
9093
|
);
|
|
9008
|
-
return cards ? /* @__PURE__ */
|
|
9094
|
+
return cards ? /* @__PURE__ */ React53.createElement(
|
|
9009
9095
|
"div",
|
|
9010
9096
|
{
|
|
9011
9097
|
className: cx(
|
|
@@ -9018,10 +9104,10 @@ window.Aura = (() => {
|
|
|
9018
9104
|
) : table;
|
|
9019
9105
|
});
|
|
9020
9106
|
function section(tag, cls) {
|
|
9021
|
-
const C =
|
|
9107
|
+
const C = React53.forwardRef(function TableSection(props, ref) {
|
|
9022
9108
|
const { className, ...rest } = props;
|
|
9023
|
-
const stacked =
|
|
9024
|
-
return
|
|
9109
|
+
const stacked = React53.useContext(StackLabels) != null;
|
|
9110
|
+
return React53.createElement(
|
|
9025
9111
|
tag,
|
|
9026
9112
|
Object.assign({ ref, className: cx(cls, className), role: stacked ? "rowgroup" : void 0 }, rest)
|
|
9027
9113
|
);
|
|
@@ -9034,14 +9120,14 @@ window.Aura = (() => {
|
|
|
9034
9120
|
TBody.displayName = "TBody";
|
|
9035
9121
|
var TFoot = section("tfoot", "aura-tbl__foot");
|
|
9036
9122
|
TFoot.displayName = "TFoot";
|
|
9037
|
-
var Tr =
|
|
9123
|
+
var Tr = React53.forwardRef(function Tr2(props, ref) {
|
|
9038
9124
|
const { className, children, ...rest } = props;
|
|
9039
|
-
const stacked =
|
|
9125
|
+
const stacked = React53.useContext(StackLabels) != null;
|
|
9040
9126
|
let col = 0;
|
|
9041
|
-
return /* @__PURE__ */
|
|
9127
|
+
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
9128
|
const at = col;
|
|
9043
|
-
if (
|
|
9044
|
-
return /* @__PURE__ */
|
|
9129
|
+
if (React53.isValidElement(c)) col += Math.max(1, Number(c.props.colSpan) || 1);
|
|
9130
|
+
return /* @__PURE__ */ React53.createElement(ColumnIndex.Provider, { key: React53.isValidElement(c) && c.key != null ? c.key : at, value: at }, c);
|
|
9045
9131
|
}) : children);
|
|
9046
9132
|
});
|
|
9047
9133
|
function cellClass(base, p) {
|
|
@@ -9058,10 +9144,10 @@ window.Aura = (() => {
|
|
|
9058
9144
|
p.className
|
|
9059
9145
|
);
|
|
9060
9146
|
}
|
|
9061
|
-
var Th =
|
|
9147
|
+
var Th = React53.forwardRef(function Th2(props, ref) {
|
|
9062
9148
|
const { align, numeric, mono, className, scope, label, card, skeleton, skeletonWidth, wrap, ...rest } = props;
|
|
9063
|
-
const stacked =
|
|
9064
|
-
return /* @__PURE__ */
|
|
9149
|
+
const stacked = React53.useContext(StackLabels) != null;
|
|
9150
|
+
return /* @__PURE__ */ React53.createElement(
|
|
9065
9151
|
"th",
|
|
9066
9152
|
{
|
|
9067
9153
|
ref,
|
|
@@ -9073,12 +9159,12 @@ window.Aura = (() => {
|
|
|
9073
9159
|
}
|
|
9074
9160
|
);
|
|
9075
9161
|
});
|
|
9076
|
-
var Td =
|
|
9162
|
+
var Td = React53.forwardRef(function Td2(props, ref) {
|
|
9077
9163
|
const { align, numeric, mono, className, scope, label, card, skeleton, skeletonWidth, wrap, ...rest } = props;
|
|
9078
|
-
const labels =
|
|
9164
|
+
const labels = React53.useContext(StackLabels), col = React53.useContext(ColumnIndex);
|
|
9079
9165
|
const slot = labels && (card === "title" || card === "action") ? card : void 0;
|
|
9080
9166
|
const shown = labels && !slot ? label != null ? label : col >= 0 ? labels[col] : void 0 : void 0;
|
|
9081
|
-
return /* @__PURE__ */
|
|
9167
|
+
return /* @__PURE__ */ React53.createElement(
|
|
9082
9168
|
"td",
|
|
9083
9169
|
{
|
|
9084
9170
|
ref,
|
|
@@ -9092,8 +9178,8 @@ window.Aura = (() => {
|
|
|
9092
9178
|
});
|
|
9093
9179
|
|
|
9094
9180
|
// src/BottomNav.tsx
|
|
9095
|
-
var
|
|
9096
|
-
var BottomNav =
|
|
9181
|
+
var React54 = __toESM(require_react(), 1);
|
|
9182
|
+
var BottomNav = React54.forwardRef(function BottomNav2(props, ref) {
|
|
9097
9183
|
const t = useStrings();
|
|
9098
9184
|
const Link = useLinkComponent(props.linkComponent);
|
|
9099
9185
|
const st = useMaybeControlled(
|
|
@@ -9103,7 +9189,7 @@ window.Aura = (() => {
|
|
|
9103
9189
|
);
|
|
9104
9190
|
const active = st[0];
|
|
9105
9191
|
const hide2 = props.hideFrom === false ? "always" : "below-" + (props.hideFrom || "lg");
|
|
9106
|
-
const own =
|
|
9192
|
+
const own = React54.useRef(null);
|
|
9107
9193
|
const hf = props.hideFrom === false ? null : props.hideFrom || "lg";
|
|
9108
9194
|
const away = useHideOnScroll(
|
|
9109
9195
|
!!props.hideOnScroll,
|
|
@@ -9111,7 +9197,7 @@ window.Aura = (() => {
|
|
|
9111
9197
|
hf ? "(max-width: " + (breakpoints[hf] - 0.02) + "px)" : "all",
|
|
9112
9198
|
64
|
|
9113
9199
|
);
|
|
9114
|
-
const setRef =
|
|
9200
|
+
const setRef = React54.useCallback(
|
|
9115
9201
|
function(el) {
|
|
9116
9202
|
own.current = el;
|
|
9117
9203
|
if (typeof ref === "function") ref(el);
|
|
@@ -9119,7 +9205,7 @@ window.Aura = (() => {
|
|
|
9119
9205
|
},
|
|
9120
9206
|
[ref]
|
|
9121
9207
|
);
|
|
9122
|
-
return /* @__PURE__ */
|
|
9208
|
+
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
9209
|
"nav",
|
|
9124
9210
|
{
|
|
9125
9211
|
ref: setRef,
|
|
@@ -9132,7 +9218,7 @@ window.Aura = (() => {
|
|
|
9132
9218
|
),
|
|
9133
9219
|
"aria-label": props.label || t.mainNav
|
|
9134
9220
|
},
|
|
9135
|
-
/* @__PURE__ */
|
|
9221
|
+
/* @__PURE__ */ React54.createElement("ul", { className: "aura-bottomnav__list" }, props.items.map(function(it) {
|
|
9136
9222
|
if (it.ariaLabel && typeof it.label === "string" && it.ariaLabel.toLowerCase().indexOf(it.label.toLowerCase()) < 0)
|
|
9137
9223
|
devWarnOnce(
|
|
9138
9224
|
"bottomnav-label-" + it.id,
|
|
@@ -9153,20 +9239,20 @@ window.Aura = (() => {
|
|
|
9153
9239
|
}
|
|
9154
9240
|
};
|
|
9155
9241
|
const inner = [
|
|
9156
|
-
/* @__PURE__ */
|
|
9157
|
-
it.ariaLabel ? /* @__PURE__ */
|
|
9158
|
-
/* @__PURE__ */
|
|
9159
|
-
suffix && !it.ariaLabel ? /* @__PURE__ */
|
|
9242
|
+
/* @__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),
|
|
9243
|
+
it.ariaLabel ? /* @__PURE__ */ React54.createElement("span", { key: "n", className: "aura-sr-only" }, it.ariaLabel + suffix) : null,
|
|
9244
|
+
/* @__PURE__ */ React54.createElement("span", { key: "l", className: "aura-bottomnav__label", "aria-hidden": it.ariaLabel ? true : void 0 }, it.label),
|
|
9245
|
+
suffix && !it.ariaLabel ? /* @__PURE__ */ React54.createElement("span", { key: "s", className: "aura-sr-only" }, suffix) : null
|
|
9160
9246
|
];
|
|
9161
|
-
return /* @__PURE__ */
|
|
9247
|
+
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
9248
|
}))
|
|
9163
9249
|
));
|
|
9164
9250
|
});
|
|
9165
9251
|
|
|
9166
9252
|
// src/Surface.tsx
|
|
9167
|
-
var
|
|
9168
|
-
var h11 =
|
|
9169
|
-
var Surface =
|
|
9253
|
+
var React55 = __toESM(require_react(), 1);
|
|
9254
|
+
var h11 = React55.createElement;
|
|
9255
|
+
var Surface = React55.forwardRef(function Surface2(props, ref) {
|
|
9170
9256
|
const t = props.texture || "mesh";
|
|
9171
9257
|
const rest = omit(props, ["texture", "className", "children", "as"]);
|
|
9172
9258
|
return h11(
|
|
@@ -9187,14 +9273,14 @@ window.Aura = (() => {
|
|
|
9187
9273
|
});
|
|
9188
9274
|
|
|
9189
9275
|
// src/Stat.tsx
|
|
9190
|
-
var
|
|
9191
|
-
var Stat =
|
|
9276
|
+
var React56 = __toESM(require_react(), 1);
|
|
9277
|
+
var Stat = React56.forwardRef(function Stat2(props, ref) {
|
|
9192
9278
|
const Link = useLinkComponent(props.linkComponent);
|
|
9193
9279
|
return statElement(props, ref, Link);
|
|
9194
9280
|
});
|
|
9195
9281
|
|
|
9196
9282
|
// src/TimePicker.tsx
|
|
9197
|
-
var
|
|
9283
|
+
var React57 = __toESM(require_react(), 1);
|
|
9198
9284
|
var import_react_dom12 = __toESM(require_react_dom(), 1);
|
|
9199
9285
|
|
|
9200
9286
|
// src/text.ts
|
|
@@ -9236,7 +9322,7 @@ window.Aura = (() => {
|
|
|
9236
9322
|
function fromMin(n3) {
|
|
9237
9323
|
return pad3(Math.floor(n3 / 60)) + ":" + pad3(n3 % 60);
|
|
9238
9324
|
}
|
|
9239
|
-
var TimePicker =
|
|
9325
|
+
var TimePicker = React57.forwardRef(function TimePicker2(props, ref) {
|
|
9240
9326
|
const t = useStrings();
|
|
9241
9327
|
const auto = uid(), id = props.id || auto, listId = id + "-list";
|
|
9242
9328
|
const st = useMaybeControlled(
|
|
@@ -9246,7 +9332,7 @@ window.Aura = (() => {
|
|
|
9246
9332
|
);
|
|
9247
9333
|
const value = st[0];
|
|
9248
9334
|
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 =
|
|
9335
|
+
const slots = React57.useMemo(
|
|
9250
9336
|
function() {
|
|
9251
9337
|
const out = [];
|
|
9252
9338
|
for (let m = lo; m <= hi; m += step) out.push(fromMin(m));
|
|
@@ -9258,12 +9344,12 @@ window.Aura = (() => {
|
|
|
9258
9344
|
const n3 = toMin(v);
|
|
9259
9345
|
return n3 == null || n3 < lo || n3 > hi || props.isTimeDisabled && props.isTimeDisabled(v);
|
|
9260
9346
|
}
|
|
9261
|
-
const openState =
|
|
9262
|
-
const editState =
|
|
9263
|
-
const aState =
|
|
9264
|
-
const errState =
|
|
9265
|
-
const pos =
|
|
9266
|
-
const boxRef =
|
|
9347
|
+
const openState = React57.useState(false), open = openState[0], setOpen = openState[1];
|
|
9348
|
+
const editState = React57.useState(null), editing = editState[0], setEditing = editState[1];
|
|
9349
|
+
const aState = React57.useState(0), active = aState[0], setActive = aState[1];
|
|
9350
|
+
const errState = React57.useState(null);
|
|
9351
|
+
const pos = React57.useState(null);
|
|
9352
|
+
const boxRef = React57.useRef(null), inputRef = React57.useRef(null), listRef = React57.useRef(null), inputMerged = useMergedRef(ref, inputRef);
|
|
9267
9353
|
const mounted = useMounted();
|
|
9268
9354
|
function nearest(v) {
|
|
9269
9355
|
const n3 = toMin(v);
|
|
@@ -9291,7 +9377,7 @@ window.Aura = (() => {
|
|
|
9291
9377
|
},
|
|
9292
9378
|
[open]
|
|
9293
9379
|
);
|
|
9294
|
-
|
|
9380
|
+
React57.useEffect(
|
|
9295
9381
|
function() {
|
|
9296
9382
|
if (!open) return;
|
|
9297
9383
|
function outside(e) {
|
|
@@ -9313,7 +9399,7 @@ window.Aura = (() => {
|
|
|
9313
9399
|
},
|
|
9314
9400
|
[open]
|
|
9315
9401
|
);
|
|
9316
|
-
|
|
9402
|
+
React57.useEffect(
|
|
9317
9403
|
function() {
|
|
9318
9404
|
if (!open || !listRef.current) return;
|
|
9319
9405
|
const el = listRef.current.querySelector('[data-idx="' + active + '"]');
|
|
@@ -9412,9 +9498,9 @@ window.Aura = (() => {
|
|
|
9412
9498
|
}
|
|
9413
9499
|
const error = errState[0] || props.error;
|
|
9414
9500
|
const list = open && mounted && pos[0] ? (0, import_react_dom12.createPortal)(
|
|
9415
|
-
/* @__PURE__ */
|
|
9501
|
+
/* @__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
9502
|
const dis = blocked(s), sel = s === value;
|
|
9417
|
-
return /* @__PURE__ */
|
|
9503
|
+
return /* @__PURE__ */ React57.createElement(
|
|
9418
9504
|
"li",
|
|
9419
9505
|
{
|
|
9420
9506
|
key: s,
|
|
@@ -9439,13 +9525,13 @@ window.Aura = (() => {
|
|
|
9439
9525
|
if (active !== i) setActive(i);
|
|
9440
9526
|
}
|
|
9441
9527
|
},
|
|
9442
|
-
/* @__PURE__ */
|
|
9443
|
-
sel ? /* @__PURE__ */
|
|
9528
|
+
/* @__PURE__ */ React57.createElement("span", { className: "aura-combo__label" }, s),
|
|
9529
|
+
sel ? /* @__PURE__ */ React57.createElement(Icon, { name: /* @__PURE__ */ React57.createElement(IconCheck, null), className: "aura-combo__check" }) : null
|
|
9444
9530
|
);
|
|
9445
9531
|
}))),
|
|
9446
9532
|
document.body
|
|
9447
9533
|
) : null;
|
|
9448
|
-
return /* @__PURE__ */
|
|
9534
|
+
return /* @__PURE__ */ React57.createElement(
|
|
9449
9535
|
Field,
|
|
9450
9536
|
{
|
|
9451
9537
|
id,
|
|
@@ -9457,7 +9543,7 @@ window.Aura = (() => {
|
|
|
9457
9543
|
disabled: props.disabled,
|
|
9458
9544
|
className: cx(touchClass(props.touchHeight), props.className)
|
|
9459
9545
|
},
|
|
9460
|
-
/* @__PURE__ */
|
|
9546
|
+
/* @__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
9547
|
"input",
|
|
9462
9548
|
{
|
|
9463
9549
|
ref: inputMerged,
|
|
@@ -9497,7 +9583,7 @@ window.Aura = (() => {
|
|
|
9497
9583
|
}, 0);
|
|
9498
9584
|
}
|
|
9499
9585
|
}
|
|
9500
|
-
), props.clearable !== false && value != null && !props.disabled ? /* @__PURE__ */
|
|
9586
|
+
), props.clearable !== false && value != null && !props.disabled ? /* @__PURE__ */ React57.createElement(
|
|
9501
9587
|
"button",
|
|
9502
9588
|
{
|
|
9503
9589
|
type: "button",
|
|
@@ -9510,8 +9596,8 @@ window.Aura = (() => {
|
|
|
9510
9596
|
if (inputRef.current) inputRef.current.focus();
|
|
9511
9597
|
}
|
|
9512
9598
|
},
|
|
9513
|
-
/* @__PURE__ */
|
|
9514
|
-
) : null, /* @__PURE__ */
|
|
9599
|
+
/* @__PURE__ */ React57.createElement(Icon, { name: /* @__PURE__ */ React57.createElement(IconX, null) })
|
|
9600
|
+
) : null, /* @__PURE__ */ React57.createElement(
|
|
9515
9601
|
"button",
|
|
9516
9602
|
{
|
|
9517
9603
|
type: "button",
|
|
@@ -9529,14 +9615,14 @@ window.Aura = (() => {
|
|
|
9529
9615
|
}
|
|
9530
9616
|
}
|
|
9531
9617
|
},
|
|
9532
|
-
/* @__PURE__ */
|
|
9618
|
+
/* @__PURE__ */ React57.createElement(Icon, { name: /* @__PURE__ */ React57.createElement(IconChevronDown, null) })
|
|
9533
9619
|
)),
|
|
9534
9620
|
list
|
|
9535
9621
|
);
|
|
9536
9622
|
});
|
|
9537
9623
|
|
|
9538
9624
|
// src/FileUpload.tsx
|
|
9539
|
-
var
|
|
9625
|
+
var React58 = __toESM(require_react(), 1);
|
|
9540
9626
|
function matches(file, accept) {
|
|
9541
9627
|
if (!accept) return true;
|
|
9542
9628
|
const name = (file.name || "").toLowerCase(), type = (file.type || "").toLowerCase();
|
|
@@ -9560,24 +9646,24 @@ window.Aura = (() => {
|
|
|
9560
9646
|
}).join(", ");
|
|
9561
9647
|
}
|
|
9562
9648
|
var seq = 0;
|
|
9563
|
-
var FileUpload =
|
|
9649
|
+
var FileUpload = React58.forwardRef(function FileUpload2(props, ref) {
|
|
9564
9650
|
const t = useStrings();
|
|
9565
9651
|
const auto = uid(), id = props.id || auto;
|
|
9566
9652
|
const st = useMaybeControlled(props.value, props.defaultValue || [], props.onChange);
|
|
9567
9653
|
const items2 = st[0] || [];
|
|
9568
|
-
const dragState =
|
|
9569
|
-
const inputRef =
|
|
9570
|
-
const urls =
|
|
9654
|
+
const dragState = React58.useState(false), over = dragState[0];
|
|
9655
|
+
const inputRef = React58.useRef(null), inputMerged = useMergedRef(ref, inputRef);
|
|
9656
|
+
const urls = React58.useRef({});
|
|
9571
9657
|
const maxFiles = props.multiple ? props.maxFiles : 1;
|
|
9572
9658
|
const note = t.accepts(describeAccept(props.accept, t), props.maxSize ? formatBytes(props.maxSize) : "");
|
|
9573
|
-
|
|
9659
|
+
React58.useEffect(function() {
|
|
9574
9660
|
return function() {
|
|
9575
9661
|
Object.keys(urls.current).forEach(function(k) {
|
|
9576
9662
|
URL.revokeObjectURL(urls.current[k]);
|
|
9577
9663
|
});
|
|
9578
9664
|
};
|
|
9579
9665
|
}, []);
|
|
9580
|
-
|
|
9666
|
+
React58.useEffect(
|
|
9581
9667
|
function() {
|
|
9582
9668
|
const el = inputRef.current;
|
|
9583
9669
|
if (!el || !props.name || typeof DataTransfer === "undefined") return;
|
|
@@ -9637,7 +9723,7 @@ window.Aura = (() => {
|
|
|
9637
9723
|
if (inputRef.current) inputRef.current.focus();
|
|
9638
9724
|
}
|
|
9639
9725
|
const error = props.error;
|
|
9640
|
-
return /* @__PURE__ */
|
|
9726
|
+
return /* @__PURE__ */ React58.createElement(
|
|
9641
9727
|
Field,
|
|
9642
9728
|
{
|
|
9643
9729
|
id,
|
|
@@ -9649,7 +9735,7 @@ window.Aura = (() => {
|
|
|
9649
9735
|
disabled: props.disabled,
|
|
9650
9736
|
className: props.className
|
|
9651
9737
|
},
|
|
9652
|
-
/* @__PURE__ */
|
|
9738
|
+
/* @__PURE__ */ React58.createElement(
|
|
9653
9739
|
"div",
|
|
9654
9740
|
{
|
|
9655
9741
|
className: cx("aura-upload", over && "is-over", props.disabled && "is-disabled", error && "is-invalid"),
|
|
@@ -9670,9 +9756,9 @@ window.Aura = (() => {
|
|
|
9670
9756
|
add(e.dataTransfer && e.dataTransfer.files);
|
|
9671
9757
|
}
|
|
9672
9758
|
},
|
|
9673
|
-
/* @__PURE__ */
|
|
9674
|
-
/* @__PURE__ */
|
|
9675
|
-
/* @__PURE__ */
|
|
9759
|
+
/* @__PURE__ */ React58.createElement(Icon, { name: /* @__PURE__ */ React58.createElement(IconCloudUpload, null), size: "lg", className: "aura-upload__icon" }),
|
|
9760
|
+
/* @__PURE__ */ React58.createElement("span", { className: "aura-upload__text" }, t.dropFiles, " "),
|
|
9761
|
+
/* @__PURE__ */ React58.createElement(
|
|
9676
9762
|
"input",
|
|
9677
9763
|
{
|
|
9678
9764
|
ref: inputMerged,
|
|
@@ -9694,12 +9780,12 @@ window.Aura = (() => {
|
|
|
9694
9780
|
}
|
|
9695
9781
|
}
|
|
9696
9782
|
),
|
|
9697
|
-
/* @__PURE__ */
|
|
9698
|
-
note ? /* @__PURE__ */
|
|
9783
|
+
/* @__PURE__ */ React58.createElement("span", { className: "aura-upload__browse", "aria-hidden": true }, props.multiple ? t.browse : t.browseOne),
|
|
9784
|
+
note ? /* @__PURE__ */ React58.createElement("span", { className: "aura-upload__note", id: id + "-note" }, note) : null
|
|
9699
9785
|
),
|
|
9700
|
-
items2.length ? /* @__PURE__ */
|
|
9786
|
+
items2.length ? /* @__PURE__ */ React58.createElement("ul", { className: "aura-upload__list", "aria-live": "polite" }, items2.map(function(it) {
|
|
9701
9787
|
const src = thumb(it);
|
|
9702
|
-
return /* @__PURE__ */
|
|
9788
|
+
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
9789
|
"span",
|
|
9704
9790
|
{
|
|
9705
9791
|
className: "aura-upload__bar",
|
|
@@ -9709,11 +9795,11 @@ window.Aura = (() => {
|
|
|
9709
9795
|
"aria-valuemax": 100,
|
|
9710
9796
|
"aria-valuenow": it.progress != null ? Math.round(it.progress) : void 0
|
|
9711
9797
|
},
|
|
9712
|
-
/* @__PURE__ */
|
|
9713
|
-
) : null), /* @__PURE__ */
|
|
9798
|
+
/* @__PURE__ */ React58.createElement("span", { style: { width: (it.progress || 0) + "%" } })
|
|
9799
|
+
) : null), /* @__PURE__ */ React58.createElement(
|
|
9714
9800
|
IconButton,
|
|
9715
9801
|
{
|
|
9716
|
-
icon: /* @__PURE__ */
|
|
9802
|
+
icon: /* @__PURE__ */ React58.createElement(IconX, null),
|
|
9717
9803
|
label: t.remove(it.name),
|
|
9718
9804
|
onClick: function() {
|
|
9719
9805
|
remove(it);
|
|
@@ -10029,9 +10115,9 @@ window.Aura = (() => {
|
|
|
10029
10115
|
}
|
|
10030
10116
|
|
|
10031
10117
|
// src/ThemeStyle.tsx
|
|
10032
|
-
var
|
|
10118
|
+
var React59 = __toESM(require_react(), 1);
|
|
10033
10119
|
function ThemeStyle(props) {
|
|
10034
|
-
const css =
|
|
10120
|
+
const css = React59.useMemo(
|
|
10035
10121
|
function() {
|
|
10036
10122
|
try {
|
|
10037
10123
|
return createTheme({
|
|
@@ -10048,11 +10134,11 @@ window.Aura = (() => {
|
|
|
10048
10134
|
[props.brand, props.signal, props.primary, props.name, props.selector]
|
|
10049
10135
|
);
|
|
10050
10136
|
if (css === null) return null;
|
|
10051
|
-
return /* @__PURE__ */
|
|
10137
|
+
return /* @__PURE__ */ React59.createElement("style", { "data-aura-theme": props.name || props.brand, dangerouslySetInnerHTML: { __html: css } });
|
|
10052
10138
|
}
|
|
10053
10139
|
|
|
10054
10140
|
// src/colorScheme.tsx
|
|
10055
|
-
var
|
|
10141
|
+
var React60 = __toESM(require_react(), 1);
|
|
10056
10142
|
|
|
10057
10143
|
// src/colorSchemeScript.ts
|
|
10058
10144
|
var DEFAULT_KEY = "aura-color-scheme";
|
|
@@ -10069,7 +10155,7 @@ window.Aura = (() => {
|
|
|
10069
10155
|
|
|
10070
10156
|
// src/colorScheme.tsx
|
|
10071
10157
|
function ColorSchemeScript(props) {
|
|
10072
|
-
return /* @__PURE__ */
|
|
10158
|
+
return /* @__PURE__ */ React60.createElement(
|
|
10073
10159
|
"script",
|
|
10074
10160
|
{
|
|
10075
10161
|
"data-aura-color-scheme": "",
|
|
@@ -10094,7 +10180,7 @@ window.Aura = (() => {
|
|
|
10094
10180
|
function useColorScheme(options) {
|
|
10095
10181
|
const key = options && options.storageKey || DEFAULT_KEY;
|
|
10096
10182
|
const fallback = options && options.defaultScheme || "system";
|
|
10097
|
-
const subscribe2 =
|
|
10183
|
+
const subscribe2 = React60.useCallback(
|
|
10098
10184
|
function(cb) {
|
|
10099
10185
|
const mq = window.matchMedia ? window.matchMedia("(prefers-color-scheme: dark)") : null;
|
|
10100
10186
|
function onSystem() {
|
|
@@ -10116,7 +10202,7 @@ window.Aura = (() => {
|
|
|
10116
10202
|
},
|
|
10117
10203
|
[fallback, key]
|
|
10118
10204
|
);
|
|
10119
|
-
const snapshot =
|
|
10205
|
+
const snapshot = React60.useSyncExternalStore(
|
|
10120
10206
|
subscribe2,
|
|
10121
10207
|
function() {
|
|
10122
10208
|
const s = readScheme(fallback);
|
|
@@ -10127,7 +10213,7 @@ window.Aura = (() => {
|
|
|
10127
10213
|
}
|
|
10128
10214
|
);
|
|
10129
10215
|
const parts = snapshot.split("|");
|
|
10130
|
-
const setScheme =
|
|
10216
|
+
const setScheme = React60.useCallback(
|
|
10131
10217
|
function(next) {
|
|
10132
10218
|
if (!valid(next)) return;
|
|
10133
10219
|
try {
|
|
@@ -10146,14 +10232,14 @@ window.Aura = (() => {
|
|
|
10146
10232
|
const cs = useColorScheme(props);
|
|
10147
10233
|
const names = { light: t.schemeLight, dark: t.schemeDark, system: t.schemeSystem };
|
|
10148
10234
|
const label = props.label || t.colorScheme;
|
|
10149
|
-
return /* @__PURE__ */
|
|
10235
|
+
return /* @__PURE__ */ React60.createElement(
|
|
10150
10236
|
DropdownMenu,
|
|
10151
10237
|
{
|
|
10152
10238
|
label,
|
|
10153
|
-
trigger: /* @__PURE__ */
|
|
10239
|
+
trigger: /* @__PURE__ */ React60.createElement(
|
|
10154
10240
|
IconButton,
|
|
10155
10241
|
{
|
|
10156
|
-
icon: cs.resolved === "dark" ? /* @__PURE__ */
|
|
10242
|
+
icon: cs.resolved === "dark" ? /* @__PURE__ */ React60.createElement(IconMoon, null) : /* @__PURE__ */ React60.createElement(IconSun, null),
|
|
10157
10243
|
label: label + ": " + names[cs.scheme]
|
|
10158
10244
|
}
|
|
10159
10245
|
),
|
|
@@ -10171,14 +10257,14 @@ window.Aura = (() => {
|
|
|
10171
10257
|
}
|
|
10172
10258
|
|
|
10173
10259
|
// src/Badge.tsx
|
|
10174
|
-
var
|
|
10175
|
-
var Badge =
|
|
10260
|
+
var React61 = __toESM(require_react(), 1);
|
|
10261
|
+
var Badge = React61.forwardRef(function Badge2(props, ref) {
|
|
10176
10262
|
return badgeElement(props, ref);
|
|
10177
10263
|
});
|
|
10178
10264
|
|
|
10179
10265
|
// src/Progress.tsx
|
|
10180
|
-
var
|
|
10181
|
-
var Progress =
|
|
10266
|
+
var React62 = __toESM(require_react(), 1);
|
|
10267
|
+
var Progress = React62.forwardRef(function Progress2(props, ref) {
|
|
10182
10268
|
const t = useStrings();
|
|
10183
10269
|
const auto = uid(), id = props.id || auto;
|
|
10184
10270
|
const max = props.max || 100, det = props.value != null;
|
|
@@ -10188,7 +10274,7 @@ window.Aura = (() => {
|
|
|
10188
10274
|
const keyed = !!props.legend && spct > 0;
|
|
10189
10275
|
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
10276
|
const shown = props.valueLabel != null ? props.valueLabel : det ? Math.round(pct) + "%" : null;
|
|
10191
|
-
return /* @__PURE__ */
|
|
10277
|
+
return /* @__PURE__ */ React62.createElement(
|
|
10192
10278
|
"div",
|
|
10193
10279
|
{
|
|
10194
10280
|
ref,
|
|
@@ -10199,8 +10285,8 @@ window.Aura = (() => {
|
|
|
10199
10285
|
props.className
|
|
10200
10286
|
)
|
|
10201
10287
|
},
|
|
10202
|
-
props.label || props.showValue && shown ? /* @__PURE__ */
|
|
10203
|
-
/* @__PURE__ */
|
|
10288
|
+
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,
|
|
10289
|
+
/* @__PURE__ */ React62.createElement(
|
|
10204
10290
|
"div",
|
|
10205
10291
|
{
|
|
10206
10292
|
className: cx("aura-progress__track", !det && "is-indeterminate"),
|
|
@@ -10212,8 +10298,8 @@ window.Aura = (() => {
|
|
|
10212
10298
|
"aria-valuenow": det ? props.value : void 0,
|
|
10213
10299
|
"aria-valuetext": det ? valueText : void 0
|
|
10214
10300
|
},
|
|
10215
|
-
/* @__PURE__ */
|
|
10216
|
-
sec ? /* @__PURE__ */
|
|
10301
|
+
/* @__PURE__ */ React62.createElement("span", { className: "aura-progress__bar", style: det ? { width: pct + "%" } : void 0 }),
|
|
10302
|
+
sec ? /* @__PURE__ */ React62.createElement(
|
|
10217
10303
|
"span",
|
|
10218
10304
|
{
|
|
10219
10305
|
className: "aura-progress__bar aura-progress__bar--reserved",
|
|
@@ -10221,20 +10307,20 @@ window.Aura = (() => {
|
|
|
10221
10307
|
}
|
|
10222
10308
|
) : null
|
|
10223
10309
|
),
|
|
10224
|
-
keyed ? /* @__PURE__ */
|
|
10225
|
-
props.hint ? /* @__PURE__ */
|
|
10310
|
+
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,
|
|
10311
|
+
props.hint ? /* @__PURE__ */ React62.createElement("p", { className: "aura-progress__hint" }, props.hint) : null
|
|
10226
10312
|
);
|
|
10227
10313
|
});
|
|
10228
10314
|
|
|
10229
10315
|
// src/Skeleton.tsx
|
|
10230
|
-
var
|
|
10231
|
-
var Skeleton =
|
|
10316
|
+
var React63 = __toESM(require_react(), 1);
|
|
10317
|
+
var Skeleton = React63.forwardRef(function Skeleton2(props, ref) {
|
|
10232
10318
|
const v = props.variant || "text";
|
|
10233
10319
|
if (v === "text" && (props.lines || 1) > 1) {
|
|
10234
10320
|
const n3 = props.lines, rows = [];
|
|
10235
10321
|
for (let i = 0; i < n3; i++)
|
|
10236
|
-
rows.push(/* @__PURE__ */
|
|
10237
|
-
return /* @__PURE__ */
|
|
10322
|
+
rows.push(/* @__PURE__ */ React63.createElement("span", { key: i, className: "aura-skel aura-skel--text", style: { width: i === n3 - 1 ? "60%" : "100%" } }));
|
|
10323
|
+
return /* @__PURE__ */ React63.createElement(
|
|
10238
10324
|
"span",
|
|
10239
10325
|
{
|
|
10240
10326
|
ref,
|
|
@@ -10252,17 +10338,17 @@ window.Aura = (() => {
|
|
|
10252
10338
|
if (v === "circle") {
|
|
10253
10339
|
style.width = style.height = props.size || props.width || 40;
|
|
10254
10340
|
}
|
|
10255
|
-
return /* @__PURE__ */
|
|
10341
|
+
return /* @__PURE__ */ React63.createElement("span", { ref, "aria-hidden": true, className: cx("aura-skel", "aura-skel--" + v, props.className), style });
|
|
10256
10342
|
});
|
|
10257
10343
|
|
|
10258
10344
|
// src/EmptyState.tsx
|
|
10259
|
-
var
|
|
10260
|
-
var EmptyState =
|
|
10345
|
+
var React64 = __toESM(require_react(), 1);
|
|
10346
|
+
var EmptyState = React64.forwardRef(function EmptyState2(props, ref) {
|
|
10261
10347
|
return emptyStateElement(props, ref);
|
|
10262
10348
|
});
|
|
10263
10349
|
|
|
10264
10350
|
// src/Pagination.tsx
|
|
10265
|
-
var
|
|
10351
|
+
var React65 = __toESM(require_react(), 1);
|
|
10266
10352
|
function pageList(page, count, sib) {
|
|
10267
10353
|
let out = [], lo = Math.max(2, page - sib), hi = Math.min(count - 1, page + sib);
|
|
10268
10354
|
if (page - sib <= 3) {
|
|
@@ -10282,7 +10368,7 @@ window.Aura = (() => {
|
|
|
10282
10368
|
if (count > 1) out.push(count);
|
|
10283
10369
|
return out;
|
|
10284
10370
|
}
|
|
10285
|
-
var Pagination =
|
|
10371
|
+
var Pagination = React65.forwardRef(function Pagination2(props, ref) {
|
|
10286
10372
|
const t = useStrings();
|
|
10287
10373
|
useAutoTip();
|
|
10288
10374
|
const count = Math.max(1, props.pageCount || 1);
|
|
@@ -10302,7 +10388,7 @@ window.Aura = (() => {
|
|
|
10302
10388
|
},
|
|
10303
10389
|
extra
|
|
10304
10390
|
);
|
|
10305
|
-
return link ? /* @__PURE__ */
|
|
10391
|
+
return link ? /* @__PURE__ */ React65.createElement(
|
|
10306
10392
|
Link,
|
|
10307
10393
|
{
|
|
10308
10394
|
href: link(p),
|
|
@@ -10315,7 +10401,7 @@ window.Aura = (() => {
|
|
|
10315
10401
|
...common
|
|
10316
10402
|
},
|
|
10317
10403
|
label
|
|
10318
|
-
) : /* @__PURE__ */
|
|
10404
|
+
) : /* @__PURE__ */ React65.createElement(
|
|
10319
10405
|
"button",
|
|
10320
10406
|
{
|
|
10321
10407
|
type: "button",
|
|
@@ -10329,7 +10415,7 @@ window.Aura = (() => {
|
|
|
10329
10415
|
}
|
|
10330
10416
|
function arrow(p, icon, label, rel, disabled) {
|
|
10331
10417
|
if (!link || disabled)
|
|
10332
|
-
return /* @__PURE__ */
|
|
10418
|
+
return /* @__PURE__ */ React65.createElement(
|
|
10333
10419
|
IconButton,
|
|
10334
10420
|
{
|
|
10335
10421
|
icon,
|
|
@@ -10340,7 +10426,7 @@ window.Aura = (() => {
|
|
|
10340
10426
|
}
|
|
10341
10427
|
}
|
|
10342
10428
|
);
|
|
10343
|
-
return /* @__PURE__ */
|
|
10429
|
+
return /* @__PURE__ */ React65.createElement(
|
|
10344
10430
|
Link,
|
|
10345
10431
|
{
|
|
10346
10432
|
href: link(p),
|
|
@@ -10355,17 +10441,17 @@ window.Aura = (() => {
|
|
|
10355
10441
|
}
|
|
10356
10442
|
}
|
|
10357
10443
|
},
|
|
10358
|
-
/* @__PURE__ */
|
|
10444
|
+
/* @__PURE__ */ React65.createElement(Icon, { name: icon, size: "sm" })
|
|
10359
10445
|
);
|
|
10360
10446
|
}
|
|
10361
|
-
return /* @__PURE__ */
|
|
10362
|
-
return typeof p === "number" ? /* @__PURE__ */
|
|
10363
|
-
})), /* @__PURE__ */
|
|
10447
|
+
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) {
|
|
10448
|
+
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");
|
|
10449
|
+
})), /* @__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
10450
|
});
|
|
10365
10451
|
|
|
10366
10452
|
// src/Accordion.tsx
|
|
10367
|
-
var
|
|
10368
|
-
var Accordion =
|
|
10453
|
+
var React66 = __toESM(require_react(), 1);
|
|
10454
|
+
var Accordion = React66.forwardRef(function Accordion2(props, ref) {
|
|
10369
10455
|
const auto = uid(), base = props.id || auto;
|
|
10370
10456
|
const multiple = props.type === "multiple";
|
|
10371
10457
|
const st = useMaybeControlled(
|
|
@@ -10403,9 +10489,9 @@ window.Aura = (() => {
|
|
|
10403
10489
|
n3.focus();
|
|
10404
10490
|
}
|
|
10405
10491
|
}
|
|
10406
|
-
return /* @__PURE__ */
|
|
10492
|
+
return /* @__PURE__ */ React66.createElement("div", { ref, className: cx("aura-accordion", props.className), onKeyDown: onKey }, items2.map(function(it) {
|
|
10407
10493
|
const on = open.indexOf(it.id) >= 0, bid = base + "-btn-" + it.id, pid = base + "-panel-" + it.id;
|
|
10408
|
-
return /* @__PURE__ */
|
|
10494
|
+
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
10495
|
"button",
|
|
10410
10496
|
{
|
|
10411
10497
|
type: "button",
|
|
@@ -10418,10 +10504,10 @@ window.Aura = (() => {
|
|
|
10418
10504
|
toggle(it.id);
|
|
10419
10505
|
}
|
|
10420
10506
|
},
|
|
10421
|
-
it.icon ? /* @__PURE__ */
|
|
10422
|
-
/* @__PURE__ */
|
|
10423
|
-
/* @__PURE__ */
|
|
10424
|
-
)), /* @__PURE__ */
|
|
10507
|
+
it.icon ? /* @__PURE__ */ React66.createElement(Icon, { name: it.icon, className: "aura-accordion__lead" }) : null,
|
|
10508
|
+
/* @__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),
|
|
10509
|
+
/* @__PURE__ */ React66.createElement(Icon, { name: /* @__PURE__ */ React66.createElement(IconChevronDown, null), className: "aura-accordion__chevron" })
|
|
10510
|
+
)), /* @__PURE__ */ React66.createElement(
|
|
10425
10511
|
"div",
|
|
10426
10512
|
{
|
|
10427
10513
|
id: pid,
|
|
@@ -10436,7 +10522,7 @@ window.Aura = (() => {
|
|
|
10436
10522
|
});
|
|
10437
10523
|
|
|
10438
10524
|
// src/Popover.tsx
|
|
10439
|
-
var
|
|
10525
|
+
var React67 = __toESM(require_react(), 1);
|
|
10440
10526
|
var import_react_dom13 = __toESM(require_react_dom(), 1);
|
|
10441
10527
|
function position(anchor, pop, placement) {
|
|
10442
10528
|
const r2 = anchor.getBoundingClientRect(), pw = pop.offsetWidth, ph = pop.scrollHeight, vw = window.innerWidth, vh = window.innerHeight, gap = 6;
|
|
@@ -10454,15 +10540,15 @@ window.Aura = (() => {
|
|
|
10454
10540
|
const left = align === "end" ? r2.right - pw : align === "center" ? r2.left + r2.width / 2 - pw / 2 : r2.left;
|
|
10455
10541
|
return { top: Math.max(8, top), left: Math.max(8, Math.min(left, vw - pw - 8)), side, maxHeight };
|
|
10456
10542
|
}
|
|
10457
|
-
var Popover =
|
|
10543
|
+
var Popover = React67.forwardRef(function Popover2(props, ref) {
|
|
10458
10544
|
const t = useStrings();
|
|
10459
10545
|
const density = useDensity();
|
|
10460
10546
|
const auto = uid(), id = props.id || auto;
|
|
10461
10547
|
const st = useMaybeControlled(props.open, !!props.defaultOpen, props.onOpenChange);
|
|
10462
10548
|
const open = !!st[0];
|
|
10463
|
-
const wrap =
|
|
10464
|
-
const pos =
|
|
10465
|
-
const inTree =
|
|
10549
|
+
const wrap = React67.useRef(null), pop = React67.useRef(null), popMerged = useMergedRef(ref, pop);
|
|
10550
|
+
const pos = React67.useState(null), mounted = useMounted();
|
|
10551
|
+
const inTree = React67.useRef(false);
|
|
10466
10552
|
function trigger() {
|
|
10467
10553
|
return wrap.current && (wrap.current.querySelector('button, [role="button"], a, input') || wrap.current.firstElementChild);
|
|
10468
10554
|
}
|
|
@@ -10489,7 +10575,7 @@ window.Aura = (() => {
|
|
|
10489
10575
|
},
|
|
10490
10576
|
[open, mounted, props.placement]
|
|
10491
10577
|
);
|
|
10492
|
-
|
|
10578
|
+
React67.useEffect(
|
|
10493
10579
|
function() {
|
|
10494
10580
|
if (!open || !mounted) return;
|
|
10495
10581
|
if (props.autoFocus !== false && pop.current) {
|
|
@@ -10521,9 +10607,9 @@ window.Aura = (() => {
|
|
|
10521
10607
|
},
|
|
10522
10608
|
[open, mounted]
|
|
10523
10609
|
);
|
|
10524
|
-
const child =
|
|
10610
|
+
const child = React67.Children.only(props.trigger);
|
|
10525
10611
|
const panel = open && mounted ? (0, import_react_dom13.createPortal)(
|
|
10526
|
-
/* @__PURE__ */
|
|
10612
|
+
/* @__PURE__ */ React67.createElement(
|
|
10527
10613
|
"div",
|
|
10528
10614
|
{
|
|
10529
10615
|
ref: popMerged,
|
|
@@ -10553,17 +10639,17 @@ window.Aura = (() => {
|
|
|
10553
10639
|
} else trapTab(e, pop.current);
|
|
10554
10640
|
}
|
|
10555
10641
|
},
|
|
10556
|
-
props.title ? /* @__PURE__ */
|
|
10642
|
+
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
10643
|
IconButton,
|
|
10558
10644
|
{
|
|
10559
|
-
icon: /* @__PURE__ */
|
|
10645
|
+
icon: /* @__PURE__ */ React67.createElement(IconX, null),
|
|
10560
10646
|
label: t.close,
|
|
10561
10647
|
onClick: function() {
|
|
10562
10648
|
close(true);
|
|
10563
10649
|
}
|
|
10564
10650
|
}
|
|
10565
10651
|
)) : null,
|
|
10566
|
-
/* @__PURE__ */
|
|
10652
|
+
/* @__PURE__ */ React67.createElement("div", { className: "aura-popover__body" }, typeof props.children === "function" ? props.children({
|
|
10567
10653
|
close: function() {
|
|
10568
10654
|
close(true);
|
|
10569
10655
|
}
|
|
@@ -10571,7 +10657,7 @@ window.Aura = (() => {
|
|
|
10571
10657
|
),
|
|
10572
10658
|
document.body
|
|
10573
10659
|
) : null;
|
|
10574
|
-
return /* @__PURE__ */
|
|
10660
|
+
return /* @__PURE__ */ React67.createElement("span", { ref: wrap, className: "aura-popover-anchor" }, React67.cloneElement(child, {
|
|
10575
10661
|
onClick: function(e) {
|
|
10576
10662
|
if (child.props.onClick) child.props.onClick(e);
|
|
10577
10663
|
st[1](!open);
|
|
@@ -10583,7 +10669,7 @@ window.Aura = (() => {
|
|
|
10583
10669
|
});
|
|
10584
10670
|
|
|
10585
10671
|
// src/NumberField.tsx
|
|
10586
|
-
var
|
|
10672
|
+
var React68 = __toESM(require_react(), 1);
|
|
10587
10673
|
function decimalsOf(n3) {
|
|
10588
10674
|
const s = String(n3);
|
|
10589
10675
|
const i = s.indexOf(".");
|
|
@@ -10596,7 +10682,7 @@ window.Aura = (() => {
|
|
|
10596
10682
|
if (!/^-?(\d+\.?\d*|\.\d+)$/.test(s)) return NaN;
|
|
10597
10683
|
return Number(s);
|
|
10598
10684
|
}
|
|
10599
|
-
var NumberField =
|
|
10685
|
+
var NumberField = React68.forwardRef(function NumberField2(props, ref) {
|
|
10600
10686
|
const t = useStrings();
|
|
10601
10687
|
const auto = uid(), id = props.id || auto;
|
|
10602
10688
|
const step = props.step || 1;
|
|
@@ -10607,7 +10693,7 @@ window.Aura = (() => {
|
|
|
10607
10693
|
props.onChange
|
|
10608
10694
|
);
|
|
10609
10695
|
const value = st[0], setValue = st[1];
|
|
10610
|
-
const draftState =
|
|
10696
|
+
const draftState = React68.useState(null), draft = draftState[0], setDraft = draftState[1];
|
|
10611
10697
|
function fmt2(n3) {
|
|
10612
10698
|
if (n3 == null || isNaN(n3)) return "";
|
|
10613
10699
|
return n3.toLocaleString("en", { minimumFractionDigits: decimals, maximumFractionDigits: decimals });
|
|
@@ -10656,7 +10742,7 @@ window.Aura = (() => {
|
|
|
10656
10742
|
};
|
|
10657
10743
|
const valueText = value == null ? void 0 : [affixText(props.prefix), fmt2(value), affixText(props.suffix)].join(" ").trim();
|
|
10658
10744
|
const stepper = props.stepper !== false && !props.readOnly;
|
|
10659
|
-
return /* @__PURE__ */
|
|
10745
|
+
return /* @__PURE__ */ React68.createElement(
|
|
10660
10746
|
Field,
|
|
10661
10747
|
{
|
|
10662
10748
|
id,
|
|
@@ -10668,7 +10754,7 @@ window.Aura = (() => {
|
|
|
10668
10754
|
disabled: props.disabled,
|
|
10669
10755
|
className: cx(touchClass(props.touchHeight), props.className)
|
|
10670
10756
|
},
|
|
10671
|
-
/* @__PURE__ */
|
|
10757
|
+
/* @__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
10758
|
"input",
|
|
10673
10759
|
{
|
|
10674
10760
|
ref,
|
|
@@ -10715,7 +10801,7 @@ window.Aura = (() => {
|
|
|
10715
10801
|
},
|
|
10716
10802
|
onKeyDown
|
|
10717
10803
|
}
|
|
10718
|
-
), props.suffix != null ? /* @__PURE__ */
|
|
10804
|
+
), 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
10805
|
"button",
|
|
10720
10806
|
{
|
|
10721
10807
|
type: "button",
|
|
@@ -10731,8 +10817,8 @@ window.Aura = (() => {
|
|
|
10731
10817
|
nudge(-step);
|
|
10732
10818
|
}
|
|
10733
10819
|
},
|
|
10734
|
-
/* @__PURE__ */
|
|
10735
|
-
), /* @__PURE__ */
|
|
10820
|
+
/* @__PURE__ */ React68.createElement(Icon, { name: /* @__PURE__ */ React68.createElement(IconMinus, null) })
|
|
10821
|
+
), /* @__PURE__ */ React68.createElement(
|
|
10736
10822
|
"button",
|
|
10737
10823
|
{
|
|
10738
10824
|
type: "button",
|
|
@@ -10748,14 +10834,14 @@ window.Aura = (() => {
|
|
|
10748
10834
|
nudge(step);
|
|
10749
10835
|
}
|
|
10750
10836
|
},
|
|
10751
|
-
/* @__PURE__ */
|
|
10837
|
+
/* @__PURE__ */ React68.createElement(Icon, { name: /* @__PURE__ */ React68.createElement(IconPlus, null) })
|
|
10752
10838
|
)) : null)
|
|
10753
10839
|
);
|
|
10754
10840
|
});
|
|
10755
10841
|
|
|
10756
10842
|
// src/Stepper.tsx
|
|
10757
|
-
var
|
|
10758
|
-
var Stepper =
|
|
10843
|
+
var React69 = __toESM(require_react(), 1);
|
|
10844
|
+
var Stepper = React69.forwardRef(function Stepper2(props, ref) {
|
|
10759
10845
|
const t = useStrings();
|
|
10760
10846
|
const idBase = uid();
|
|
10761
10847
|
const steps = props.steps || [];
|
|
@@ -10766,22 +10852,22 @@ window.Aura = (() => {
|
|
|
10766
10852
|
if (at < 0) at = 0;
|
|
10767
10853
|
const vertical = props.orientation === "vertical";
|
|
10768
10854
|
const cur2 = steps[at];
|
|
10769
|
-
return /* @__PURE__ */
|
|
10855
|
+
return /* @__PURE__ */ React69.createElement(
|
|
10770
10856
|
"nav",
|
|
10771
10857
|
{
|
|
10772
10858
|
ref,
|
|
10773
10859
|
"aria-label": props.label,
|
|
10774
10860
|
className: cx("aura-stepper", vertical ? "aura-stepper--vertical" : "aura-stepper--horizontal", props.className)
|
|
10775
10861
|
},
|
|
10776
|
-
/* @__PURE__ */
|
|
10862
|
+
/* @__PURE__ */ React69.createElement("ol", { className: "aura-stepper__list" }, steps.map(function(s, i) {
|
|
10777
10863
|
const state = i < at ? "done" : i === at ? "current" : "upcoming";
|
|
10778
10864
|
const error = s.status === "error";
|
|
10779
|
-
const marker = /* @__PURE__ */
|
|
10865
|
+
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
10866
|
const note = error ? t.stepError : state === "done" ? t.stepDone : "";
|
|
10781
10867
|
const clickable = state === "done" && !!props.onStepClick;
|
|
10782
10868
|
const named = clickable && (typeof s.label === "string" || typeof s.label === "number") && String(s.label).trim() !== "";
|
|
10783
10869
|
const descId = idBase + "-step-" + i;
|
|
10784
|
-
const text2 = /* @__PURE__ */
|
|
10870
|
+
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
10871
|
"span",
|
|
10786
10872
|
{
|
|
10787
10873
|
className: "aura-stepper__desc",
|
|
@@ -10790,14 +10876,14 @@ window.Aura = (() => {
|
|
|
10790
10876
|
},
|
|
10791
10877
|
s.description
|
|
10792
10878
|
) : null);
|
|
10793
|
-
return /* @__PURE__ */
|
|
10879
|
+
return /* @__PURE__ */ React69.createElement(
|
|
10794
10880
|
"li",
|
|
10795
10881
|
{
|
|
10796
10882
|
key: s.id,
|
|
10797
10883
|
className: cx("aura-stepper__item", "is-" + state, error && "is-error"),
|
|
10798
10884
|
"aria-current": state === "current" ? "step" : void 0
|
|
10799
10885
|
},
|
|
10800
|
-
clickable ? /* @__PURE__ */
|
|
10886
|
+
clickable ? /* @__PURE__ */ React69.createElement(
|
|
10801
10887
|
"button",
|
|
10802
10888
|
{
|
|
10803
10889
|
type: "button",
|
|
@@ -10809,19 +10895,19 @@ window.Aura = (() => {
|
|
|
10809
10895
|
},
|
|
10810
10896
|
marker,
|
|
10811
10897
|
text2
|
|
10812
|
-
) : /* @__PURE__ */
|
|
10898
|
+
) : /* @__PURE__ */ React69.createElement("span", { className: "aura-stepper__step" }, marker, text2)
|
|
10813
10899
|
);
|
|
10814
10900
|
})),
|
|
10815
|
-
!vertical && cur2 ? /* @__PURE__ */
|
|
10901
|
+
!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
10902
|
);
|
|
10817
10903
|
});
|
|
10818
10904
|
|
|
10819
10905
|
// src/SegmentedControl.tsx
|
|
10820
|
-
var
|
|
10906
|
+
var React70 = __toESM(require_react(), 1);
|
|
10821
10907
|
function toOpt2(o) {
|
|
10822
10908
|
return typeof o === "object" ? o : { value: o, label: o };
|
|
10823
10909
|
}
|
|
10824
|
-
var SegmentedControl =
|
|
10910
|
+
var SegmentedControl = React70.forwardRef(
|
|
10825
10911
|
function SegmentedControl2(props, ref) {
|
|
10826
10912
|
const options = (props.options || []).map(toOpt2);
|
|
10827
10913
|
useAutoTip();
|
|
@@ -10835,7 +10921,7 @@ window.Aura = (() => {
|
|
|
10835
10921
|
);
|
|
10836
10922
|
const value = st[0], setValue = st[1];
|
|
10837
10923
|
const auto = uid(), id = props.id || auto;
|
|
10838
|
-
const refs =
|
|
10924
|
+
const refs = React70.useRef([]);
|
|
10839
10925
|
const selIdx = options.findIndex(function(o) {
|
|
10840
10926
|
return o.value === value;
|
|
10841
10927
|
});
|
|
@@ -10868,7 +10954,7 @@ window.Aura = (() => {
|
|
|
10868
10954
|
move(options.length, -1);
|
|
10869
10955
|
}
|
|
10870
10956
|
}
|
|
10871
|
-
return /* @__PURE__ */
|
|
10957
|
+
return /* @__PURE__ */ React70.createElement(
|
|
10872
10958
|
"div",
|
|
10873
10959
|
{
|
|
10874
10960
|
ref,
|
|
@@ -10888,7 +10974,7 @@ window.Aura = (() => {
|
|
|
10888
10974
|
options.map(function(o, i) {
|
|
10889
10975
|
const on = o.value === value;
|
|
10890
10976
|
const off = props.disabled || o.disabled;
|
|
10891
|
-
return /* @__PURE__ */
|
|
10977
|
+
return /* @__PURE__ */ React70.createElement(
|
|
10892
10978
|
"button",
|
|
10893
10979
|
{
|
|
10894
10980
|
key: o.value,
|
|
@@ -10910,8 +10996,8 @@ window.Aura = (() => {
|
|
|
10910
10996
|
onKeyDown(e, i);
|
|
10911
10997
|
}
|
|
10912
10998
|
},
|
|
10913
|
-
o.icon ? /* @__PURE__ */
|
|
10914
|
-
o.iconOnly ? null : /* @__PURE__ */
|
|
10999
|
+
o.icon ? /* @__PURE__ */ React70.createElement(Icon, { name: o.icon }) : null,
|
|
11000
|
+
o.iconOnly ? null : /* @__PURE__ */ React70.createElement("span", null, o.label)
|
|
10915
11001
|
);
|
|
10916
11002
|
})
|
|
10917
11003
|
);
|