@leta-io/components 0.2.0 → 0.3.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 +36 -0
- package/dist/index.d.ts +170 -2
- package/dist/index.js +971 -595
- package/package.json +11 -5
package/dist/index.js
CHANGED
|
@@ -218,8 +218,11 @@ var Checkbox = /* @__PURE__ */ React3.forwardRef(
|
|
|
218
218
|
alignItems: "center",
|
|
219
219
|
justifyContent: "center",
|
|
220
220
|
boxSizing: "border-box",
|
|
221
|
-
|
|
222
|
-
|
|
221
|
+
// 32×32 = a 20px glyph in 6px padding (Figma 2026-09-25: the glyph
|
|
222
|
+
// grew 18→20; the padding is unchanged). The box is the hit area,
|
|
223
|
+
// deliberately larger than the mark it draws.
|
|
224
|
+
width: 32,
|
|
225
|
+
height: 32,
|
|
223
226
|
padding: "var(--padding-6px)",
|
|
224
227
|
cursor: disabled ? "not-allowed" : "pointer",
|
|
225
228
|
opacity: disabled ? "var(--opacity-60)" : 1
|
|
@@ -250,7 +253,7 @@ var Checkbox = /* @__PURE__ */ React3.forwardRef(
|
|
|
250
253
|
...rest
|
|
251
254
|
}
|
|
252
255
|
),
|
|
253
|
-
/* @__PURE__ */ jsx3("svg", { width:
|
|
256
|
+
/* @__PURE__ */ jsx3("svg", { width: 20, height: 20, viewBox: "0 -960 960 960", fill, "aria-hidden": "true", children: /* @__PURE__ */ jsx3("path", { d: path }) })
|
|
254
257
|
]
|
|
255
258
|
}
|
|
256
259
|
);
|
|
@@ -288,8 +291,11 @@ var RadioButton = /* @__PURE__ */ React4.forwardRef(
|
|
|
288
291
|
alignItems: "center",
|
|
289
292
|
justifyContent: "center",
|
|
290
293
|
boxSizing: "border-box",
|
|
291
|
-
|
|
292
|
-
|
|
294
|
+
// 32×32 = a 20px glyph in 6px padding (Figma 2026-09-25: the glyph
|
|
295
|
+
// grew 18→20; the padding is unchanged). The box is the hit area,
|
|
296
|
+
// deliberately larger than the mark it draws.
|
|
297
|
+
width: 32,
|
|
298
|
+
height: 32,
|
|
293
299
|
padding: "var(--padding-6px)",
|
|
294
300
|
cursor: disabled ? "not-allowed" : "pointer",
|
|
295
301
|
opacity: disabled ? "var(--opacity-60)" : 1
|
|
@@ -320,7 +326,7 @@ var RadioButton = /* @__PURE__ */ React4.forwardRef(
|
|
|
320
326
|
...rest
|
|
321
327
|
}
|
|
322
328
|
),
|
|
323
|
-
/* @__PURE__ */ jsx4("svg", { width:
|
|
329
|
+
/* @__PURE__ */ jsx4("svg", { width: 20, height: 20, viewBox: "0 -960 960 960", fill, "aria-hidden": "true", children: /* @__PURE__ */ jsx4("path", { d: path }) })
|
|
324
330
|
]
|
|
325
331
|
}
|
|
326
332
|
);
|
|
@@ -1234,12 +1240,17 @@ var Badge = /* @__PURE__ */ React9.forwardRef(
|
|
|
1234
1240
|
import * as React10 from "react";
|
|
1235
1241
|
import { Icon as Icon5 } from "@leta-io/icons";
|
|
1236
1242
|
import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1243
|
+
var TEXT_TOKEN = {
|
|
1244
|
+
information: "var(--text-information-label)",
|
|
1245
|
+
neutral: "var(--text-default-label)"
|
|
1246
|
+
};
|
|
1237
1247
|
var Tag = /* @__PURE__ */ React10.forwardRef(
|
|
1238
|
-
function Tag2({ label, onRemove, removeLabel = "Remove", className, style, ...rest }, ref) {
|
|
1248
|
+
function Tag2({ label, onRemove, removeLabel = "Remove", color = "information", className, style, ...rest }, ref) {
|
|
1239
1249
|
const [hovered, setHovered] = React10.useState(false);
|
|
1240
1250
|
const [pressed, setPressed] = React10.useState(false);
|
|
1241
|
-
const
|
|
1242
|
-
const
|
|
1251
|
+
const state = pressed ? "-pressed" : hovered ? "-hover" : "";
|
|
1252
|
+
const bg = `var(--surface-${color}-desktop-badge${state})`;
|
|
1253
|
+
const border = `var(--border-${color}-desktop-badge${state})`;
|
|
1243
1254
|
return /* @__PURE__ */ jsxs7(
|
|
1244
1255
|
"span",
|
|
1245
1256
|
{
|
|
@@ -1255,7 +1266,7 @@ var Tag = /* @__PURE__ */ React10.forwardRef(
|
|
|
1255
1266
|
paddingRight: onRemove ? "var(--padding-4px)" : "var(--padding-6px)",
|
|
1256
1267
|
borderRadius: "var(--rounding-md)",
|
|
1257
1268
|
backgroundColor: bg,
|
|
1258
|
-
color:
|
|
1269
|
+
color: TEXT_TOKEN[color],
|
|
1259
1270
|
boxShadow: `inset 0 0 0 var(--stroke-xs) ${border}`,
|
|
1260
1271
|
whiteSpace: "nowrap",
|
|
1261
1272
|
boxSizing: "border-box",
|
|
@@ -2613,7 +2624,7 @@ var MapZoomControl = /* @__PURE__ */ React27.forwardRef(
|
|
|
2613
2624
|
className: "leta-map-zoom-btn",
|
|
2614
2625
|
onClick: onZoomIn,
|
|
2615
2626
|
disabled: disableZoomIn,
|
|
2616
|
-
"aria-label": "Zoom
|
|
2627
|
+
"aria-label": "Zoom In",
|
|
2617
2628
|
style: {
|
|
2618
2629
|
display: "flex",
|
|
2619
2630
|
alignItems: "center",
|
|
@@ -2652,7 +2663,7 @@ var MapZoomControl = /* @__PURE__ */ React27.forwardRef(
|
|
|
2652
2663
|
className: "leta-map-zoom-btn",
|
|
2653
2664
|
onClick: onZoomOut,
|
|
2654
2665
|
disabled: disableZoomOut,
|
|
2655
|
-
"aria-label": "Zoom
|
|
2666
|
+
"aria-label": "Zoom Out",
|
|
2656
2667
|
style: {
|
|
2657
2668
|
display: "flex",
|
|
2658
2669
|
alignItems: "center",
|
|
@@ -3182,7 +3193,7 @@ var SearchField = /* @__PURE__ */ React31.forwardRef(function SearchField2({
|
|
|
3182
3193
|
{
|
|
3183
3194
|
type: "button",
|
|
3184
3195
|
onClick: handleClear,
|
|
3185
|
-
"aria-label": "Clear
|
|
3196
|
+
"aria-label": "Clear Search",
|
|
3186
3197
|
style: { flexShrink: 0, display: "flex", alignItems: "center", justifyContent: "center", border: 0, background: "transparent", padding: 0, cursor: "pointer", color: "var(--icons-neutral-default)" },
|
|
3187
3198
|
children: /* @__PURE__ */ jsx31(Icon16, { name: "Cancel", size: 16 })
|
|
3188
3199
|
}
|
|
@@ -3496,8 +3507,10 @@ var SIZE = {
|
|
|
3496
3507
|
"dropdown-basic": { width: "100%", minHeight: 40 },
|
|
3497
3508
|
"dropdown-advanced": { width: "100%", minHeight: 68 },
|
|
3498
3509
|
"dropdown-destructive": { width: "100%", minHeight: 40 },
|
|
3499
|
-
|
|
3500
|
-
|
|
3510
|
+
// 52 = the row's 10px vertical padding around the 32px control (Figma
|
|
3511
|
+
// 2026-09-25 — follows the Checkbox/Radio glyph growing 18→20).
|
|
3512
|
+
"checkbox-selection": { width: "100%", minHeight: 52 },
|
|
3513
|
+
"radio-selection": { width: "100%", minHeight: 52 },
|
|
3501
3514
|
"day-cell": { width: 32, height: 32 },
|
|
3502
3515
|
"time-picker": { width: 77, height: 32 },
|
|
3503
3516
|
"filter-group": { width: "100%", minHeight: 40 },
|
|
@@ -4278,12 +4291,12 @@ var SideBar = /* @__PURE__ */ React38.forwardRef(function SideBar2({
|
|
|
4278
4291
|
padding: "var(--padding-12px)",
|
|
4279
4292
|
borderBottom: "var(--stroke-xs) solid var(--border-neutral-default)"
|
|
4280
4293
|
},
|
|
4281
|
-
children: collapsed ? /* @__PURE__ */ jsx38(HoverTip, { label: "Open
|
|
4294
|
+
children: collapsed ? /* @__PURE__ */ jsx38(HoverTip, { label: "Open Sidebar", placement: "right", children: /* @__PURE__ */ jsx38(CollapsedSidebarLogo, { "aria-label": "Open Sidebar", onClick: toggle }) }) : /* @__PURE__ */ jsxs27(Fragment5, { children: [
|
|
4282
4295
|
/* @__PURE__ */ jsxs27("span", { style: { display: "flex", alignItems: "center", gap: "var(--spacing-8px)" }, children: [
|
|
4283
4296
|
/* @__PURE__ */ jsx38(LetaLogo, { type: "symbol" }),
|
|
4284
4297
|
/* @__PURE__ */ jsx38(LetaLogo, { type: "wordmark" })
|
|
4285
4298
|
] }),
|
|
4286
|
-
/* @__PURE__ */ jsx38(HoverTip, { label: "Close
|
|
4299
|
+
/* @__PURE__ */ jsx38(HoverTip, { label: "Close Sidebar", children: /* @__PURE__ */ jsx38(Button, { variant: "ghost", size: "medium", prominent: true, iconOnly: "Sidebar", "aria-label": "Close Sidebar", onClick: toggle }) })
|
|
4287
4300
|
] })
|
|
4288
4301
|
}
|
|
4289
4302
|
),
|
|
@@ -4388,11 +4401,11 @@ var Breadcrumbs = /* @__PURE__ */ React39.forwardRef(
|
|
|
4388
4401
|
// which the chevron only hints at. The tip says it outright.
|
|
4389
4402
|
//
|
|
4390
4403
|
// Default `small` variant and `auto` placement, matching the SideBar's
|
|
4391
|
-
// "Open
|
|
4404
|
+
// "Open Sidebar"/"Close Sidebar" — the precedent for tooltips on chrome
|
|
4392
4405
|
// controls, which live inside the design-system component rather than the
|
|
4393
4406
|
// consuming shell. `HoverTip` already dismisses on `pointerdown`, so the
|
|
4394
4407
|
// tip is gone before the switcher panel paints over the same spot.
|
|
4395
|
-
/* @__PURE__ */ jsx39(HoverTip, { label: "Switch
|
|
4408
|
+
/* @__PURE__ */ jsx39(HoverTip, { label: "Switch Company", children: /* @__PURE__ */ jsx39(
|
|
4396
4409
|
Button,
|
|
4397
4410
|
{
|
|
4398
4411
|
variant: "plain",
|
|
@@ -5898,7 +5911,7 @@ var Cell = /* @__PURE__ */ React52.forwardRef(function Cell2({
|
|
|
5898
5911
|
break;
|
|
5899
5912
|
}
|
|
5900
5913
|
case "actions":
|
|
5901
|
-
inner = actions ?? /* @__PURE__ */ jsx52(Button, { variant: "ghost", size: "small", iconOnly: "More", "aria-label": "More
|
|
5914
|
+
inner = actions ?? /* @__PURE__ */ jsx52(Button, { variant: "ghost", size: "small", iconOnly: "More", "aria-label": "More Actions" });
|
|
5902
5915
|
break;
|
|
5903
5916
|
case "preview-chips":
|
|
5904
5917
|
inner = chips.map((c, i) => /* @__PURE__ */ jsx52(Chip, { label: c }, i));
|
|
@@ -5955,7 +5968,7 @@ var Cell = /* @__PURE__ */ React52.forwardRef(function Cell2({
|
|
|
5955
5968
|
inner = slotContent ?? /* @__PURE__ */ jsxs38("div", { style: { display: "flex", flexDirection: "column", gap: "var(--spacing-4px)", minWidth: 0, width: "100%" }, children: [
|
|
5956
5969
|
/* @__PURE__ */ jsx52(TruncatedIdText, { id: orderId, className: "text-label-m-medium", color: "var(--text-default-heading)" }),
|
|
5957
5970
|
/* @__PURE__ */ jsxs38("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "var(--spacing-8px)" }, children: [
|
|
5958
|
-
/* @__PURE__ */ jsx52(HoverTip, { label: copyTooltip, children: /* @__PURE__ */ jsx52(Button, { variant: "secondary", size: "extra-small", iconOnly: "Copy", iconOutlined: true, copyIcon: "Check-Circle", "aria-label": "Copy
|
|
5971
|
+
/* @__PURE__ */ jsx52(HoverTip, { label: copyTooltip, children: /* @__PURE__ */ jsx52(Button, { variant: "secondary", size: "extra-small", iconOnly: "Copy", iconOutlined: true, copyIcon: "Check-Circle", "aria-label": "Copy Order ID", onClick: onCopyOrderId }) }),
|
|
5959
5972
|
/* @__PURE__ */ jsx52(HoverTip, { label: sourceTooltip ?? (manual ? "Created manually" : "Created via integration"), children: sourceIcon }),
|
|
5960
5973
|
showScheduledIcon && (scheduledTooltip ? /* @__PURE__ */ jsx52(HoverTip, { label: scheduledTooltip, children: calendarIcon }) : calendarIcon),
|
|
5961
5974
|
showBroadcastIcon && /* @__PURE__ */ jsx52(HoverTip, { label: broadcastTooltip, children: broadcastIcon })
|
|
@@ -5969,8 +5982,8 @@ var Cell = /* @__PURE__ */ React52.forwardRef(function Cell2({
|
|
|
5969
5982
|
showDriverActions ? /* @__PURE__ */ jsxs38("div", { style: { display: "flex", flexDirection: "column", gap: "var(--spacing-4px)", minWidth: 0 }, children: [
|
|
5970
5983
|
/* @__PURE__ */ jsx52(Truncate, { className: "text-label-m-medium", color: "var(--text-default-heading)", children: name }),
|
|
5971
5984
|
/* @__PURE__ */ jsxs38("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "var(--spacing-8px)" }, children: [
|
|
5972
|
-
showSwapDriver && /* @__PURE__ */ jsx52(HoverTip, { label: swapTooltip, children: /* @__PURE__ */ jsx52(Button, { variant: "secondary", size: "extra-small", iconOnly: "Swap", "aria-label": "Change
|
|
5973
|
-
/* @__PURE__ */ jsx52(HoverTip, { label: callTooltip, children: /* @__PURE__ */ jsx52(Button, { variant: "secondary", size: "extra-small", iconOnly: "Phone", iconOutlined: true, "aria-label": "Call
|
|
5985
|
+
showSwapDriver && /* @__PURE__ */ jsx52(HoverTip, { label: swapTooltip, children: /* @__PURE__ */ jsx52(Button, { variant: "secondary", size: "extra-small", iconOnly: "Swap", "aria-label": "Change Driver", onClick: onSwapDriver }) }),
|
|
5986
|
+
/* @__PURE__ */ jsx52(HoverTip, { label: callTooltip, children: /* @__PURE__ */ jsx52(Button, { variant: "secondary", size: "extra-small", iconOnly: "Phone", iconOutlined: true, "aria-label": "Call Driver", onClick: onCallDriver }) })
|
|
5974
5987
|
] })
|
|
5975
5988
|
] }) : (
|
|
5976
5989
|
// Finished orders — name only, centered against the avatar (no actions).
|
|
@@ -6350,7 +6363,7 @@ var Pagination = /* @__PURE__ */ React54.forwardRef(function Pagination2({
|
|
|
6350
6363
|
variant: "secondary",
|
|
6351
6364
|
size: "small",
|
|
6352
6365
|
iconRight: "Chevron-Down",
|
|
6353
|
-
"aria-label": "Rows per
|
|
6366
|
+
"aria-label": "Rows per Page",
|
|
6354
6367
|
onClick: () => onRowsPerPageClick?.(),
|
|
6355
6368
|
children: rowsPerPage
|
|
6356
6369
|
}
|
|
@@ -7016,7 +7029,7 @@ var TopFilter = /* @__PURE__ */ React56.forwardRef(
|
|
|
7016
7029
|
const [pressed, setPressed] = React56.useState(false);
|
|
7017
7030
|
const bg = pressed ? "var(--surface-neutral-top-filter-tab-pressed)" : hovered ? "var(--surface-neutral-top-filter-tab-hover)" : selected ? "var(--surface-neutral-top-filter-tab-active)" : "var(--surface-neutral-top-filter-tab-idle)";
|
|
7018
7031
|
const border = selected ? "var(--border-secondary-top-filter-tab-active)" : pressed ? "var(--border-neutral-top-filter-tab-pressed)" : hovered ? "var(--border-neutral-top-filter-tab-hover)" : "var(--border-neutral-top-filter-tab-idle)";
|
|
7019
|
-
return /* @__PURE__ */
|
|
7032
|
+
return /* @__PURE__ */ jsx56(
|
|
7020
7033
|
"button",
|
|
7021
7034
|
{
|
|
7022
7035
|
ref,
|
|
@@ -7026,7 +7039,6 @@ var TopFilter = /* @__PURE__ */ React56.forwardRef(
|
|
|
7026
7039
|
style: {
|
|
7027
7040
|
display: "inline-flex",
|
|
7028
7041
|
alignItems: "center",
|
|
7029
|
-
gap: "var(--spacing-8px)",
|
|
7030
7042
|
height: 40,
|
|
7031
7043
|
paddingTop: "var(--padding-8px)",
|
|
7032
7044
|
paddingBottom: "var(--padding-8px)",
|
|
@@ -7036,7 +7048,10 @@ var TopFilter = /* @__PURE__ */ React56.forwardRef(
|
|
|
7036
7048
|
borderRadius: "var(--rounding-lg)",
|
|
7037
7049
|
backgroundColor: bg,
|
|
7038
7050
|
color: "var(--text-default-label)",
|
|
7039
|
-
|
|
7051
|
+
// 1px unselected, 1.5px selected — the weight is part of how a
|
|
7052
|
+
// selected filter reads, not decoration (Figma 2026-09-25: all six
|
|
7053
|
+
// unselected variants are 1, all six selected are 1.5).
|
|
7054
|
+
boxShadow: `inset 0 0 0 ${selected ? "var(--stroke-sm)" : "var(--stroke-xs)"} ${border}`,
|
|
7040
7055
|
border: "none",
|
|
7041
7056
|
cursor: "pointer",
|
|
7042
7057
|
userSelect: "none",
|
|
@@ -7062,11 +7077,22 @@ var TopFilter = /* @__PURE__ */ React56.forwardRef(
|
|
|
7062
7077
|
onMouseUp?.(e);
|
|
7063
7078
|
},
|
|
7064
7079
|
...rest,
|
|
7065
|
-
children:
|
|
7066
|
-
|
|
7067
|
-
|
|
7068
|
-
|
|
7069
|
-
|
|
7080
|
+
children: /* @__PURE__ */ jsxs41(
|
|
7081
|
+
"span",
|
|
7082
|
+
{
|
|
7083
|
+
style: {
|
|
7084
|
+
display: "inline-flex",
|
|
7085
|
+
alignItems: "center",
|
|
7086
|
+
gap: "var(--spacing-8px)",
|
|
7087
|
+
padding: "var(--padding-4px) var(--padding-6px)"
|
|
7088
|
+
},
|
|
7089
|
+
children: [
|
|
7090
|
+
label,
|
|
7091
|
+
advanced && selected && badge,
|
|
7092
|
+
advanced && /* @__PURE__ */ jsx56(Icon30, { name: "Chevron-Down", size: 16, color: "var(--icons-neutral-button)" })
|
|
7093
|
+
]
|
|
7094
|
+
}
|
|
7095
|
+
)
|
|
7070
7096
|
}
|
|
7071
7097
|
);
|
|
7072
7098
|
}
|
|
@@ -8772,7 +8798,15 @@ function useScrollEdges(containerRef) {
|
|
|
8772
8798
|
mo?.disconnect();
|
|
8773
8799
|
};
|
|
8774
8800
|
});
|
|
8775
|
-
React71.useEffect(
|
|
8801
|
+
React71.useEffect(
|
|
8802
|
+
() => () => {
|
|
8803
|
+
detachRef.current();
|
|
8804
|
+
detachRef.current = () => {
|
|
8805
|
+
};
|
|
8806
|
+
attachedRef.current = null;
|
|
8807
|
+
},
|
|
8808
|
+
[]
|
|
8809
|
+
);
|
|
8776
8810
|
return edges;
|
|
8777
8811
|
}
|
|
8778
8812
|
|
|
@@ -8880,7 +8914,7 @@ var ModalHeaders = /* @__PURE__ */ React73.forwardRef(
|
|
|
8880
8914
|
{
|
|
8881
8915
|
type: "button",
|
|
8882
8916
|
onClick: onNavBack,
|
|
8883
|
-
"aria-label": "Go
|
|
8917
|
+
"aria-label": "Go Back",
|
|
8884
8918
|
className: "leta-modal-nav-arrow",
|
|
8885
8919
|
children: /* @__PURE__ */ jsx71(Icon35, { name: "Arrow-Left", size: "xl", "aria-hidden": true })
|
|
8886
8920
|
}
|
|
@@ -9127,10 +9161,393 @@ var ModalShell = /* @__PURE__ */ React76.forwardRef(
|
|
|
9127
9161
|
}
|
|
9128
9162
|
);
|
|
9129
9163
|
|
|
9130
|
-
// src/
|
|
9164
|
+
// src/Popover/Popover.tsx
|
|
9165
|
+
import * as React78 from "react";
|
|
9166
|
+
import { createPortal as createPortal2 } from "react-dom";
|
|
9167
|
+
|
|
9168
|
+
// src/utils/useRovingFocus.ts
|
|
9131
9169
|
import * as React77 from "react";
|
|
9170
|
+
function useRovingFocus(ref) {
|
|
9171
|
+
React77.useEffect(() => {
|
|
9172
|
+
const el = ref.current;
|
|
9173
|
+
if (!el) return;
|
|
9174
|
+
if (el.contains(document.activeElement)) return;
|
|
9175
|
+
if (!el.hasAttribute("tabindex")) el.setAttribute("tabindex", "-1");
|
|
9176
|
+
el.focus({ preventScroll: true });
|
|
9177
|
+
}, []);
|
|
9178
|
+
React77.useEffect(() => {
|
|
9179
|
+
const el = ref.current;
|
|
9180
|
+
if (!el) return;
|
|
9181
|
+
const items = () => {
|
|
9182
|
+
const rows = [...el.querySelectorAll('.leta-dmo[tabindex="0"]')];
|
|
9183
|
+
if (rows.length > 0) return rows.filter(isVisible);
|
|
9184
|
+
return [...el.querySelectorAll(".leta-dmo input, .leta-dmo button")].filter(isVisible);
|
|
9185
|
+
};
|
|
9186
|
+
const onKeyDown = (e) => {
|
|
9187
|
+
const isArrow = e.key === "ArrowDown" || e.key === "ArrowUp";
|
|
9188
|
+
const isEdge = e.key === "Home" || e.key === "End";
|
|
9189
|
+
if (!isArrow && !isEdge) return;
|
|
9190
|
+
if (isEdge && isTextEntry(e.target)) return;
|
|
9191
|
+
const list = items();
|
|
9192
|
+
if (list.length === 0) return;
|
|
9193
|
+
const active = document.activeElement;
|
|
9194
|
+
const at = active ? list.indexOf(active) : -1;
|
|
9195
|
+
let next;
|
|
9196
|
+
if (e.key === "Home") next = 0;
|
|
9197
|
+
else if (e.key === "End") next = list.length - 1;
|
|
9198
|
+
else if (at === -1) next = e.key === "ArrowDown" ? 0 : list.length - 1;
|
|
9199
|
+
else next = (at + (e.key === "ArrowDown" ? 1 : -1) + list.length) % list.length;
|
|
9200
|
+
e.preventDefault();
|
|
9201
|
+
list[next]?.focus();
|
|
9202
|
+
list[next]?.scrollIntoView({ block: "nearest" });
|
|
9203
|
+
};
|
|
9204
|
+
el.addEventListener("keydown", onKeyDown);
|
|
9205
|
+
return () => el.removeEventListener("keydown", onKeyDown);
|
|
9206
|
+
});
|
|
9207
|
+
}
|
|
9208
|
+
function isVisible(el) {
|
|
9209
|
+
return el.offsetParent !== null || el.getClientRects().length > 0;
|
|
9210
|
+
}
|
|
9211
|
+
function isTextEntry(target) {
|
|
9212
|
+
const el = target;
|
|
9213
|
+
if (!el) return false;
|
|
9214
|
+
const tag = el.tagName;
|
|
9215
|
+
return tag === "INPUT" || tag === "TEXTAREA" || el.isContentEditable;
|
|
9216
|
+
}
|
|
9217
|
+
|
|
9218
|
+
// src/Popover/Popover.tsx
|
|
9219
|
+
import { Fragment as Fragment15, jsx as jsx73, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
9220
|
+
var POPOVER_STYLE_ID = "leta-popover-motion";
|
|
9221
|
+
var POPOVER_CSS = `
|
|
9222
|
+
@keyframes leta-popover-in {
|
|
9223
|
+
from { opacity: 0; transform: translateY(-6px) scale(0.98); }
|
|
9224
|
+
to { opacity: 1; transform: translateY(0) scale(1); }
|
|
9225
|
+
}
|
|
9226
|
+
@keyframes leta-popover-out {
|
|
9227
|
+
from { opacity: 1; transform: translateY(0) scale(1); }
|
|
9228
|
+
to { opacity: 0; transform: translateY(-4px) scale(0.98); }
|
|
9229
|
+
}
|
|
9230
|
+
.leta-popover-panel { animation: leta-popover-in 140ms cubic-bezier(0.16, 1, 0.3, 1); will-change: transform, opacity; }
|
|
9231
|
+
.leta-popover-panel.exiting { animation: leta-popover-out 100ms cubic-bezier(0.4, 0, 1, 1) forwards; }
|
|
9232
|
+
@media (prefers-reduced-motion: reduce) { .leta-popover-panel, .leta-popover-panel.exiting { animation: none; } }
|
|
9233
|
+
/* Scrollable dropdown lists show NO scrollbar chrome \u2014 the scroll affordance is the
|
|
9234
|
+
list height instead: it's sized so the last visible option is partially cut off. */
|
|
9235
|
+
.leta-popover-list { scrollbar-width: none; -ms-overflow-style: none; }
|
|
9236
|
+
.leta-popover-list::-webkit-scrollbar { display: none; width: 0; height: 0; }
|
|
9237
|
+
`;
|
|
9238
|
+
function ensurePopoverStyles() {
|
|
9239
|
+
if (typeof document === "undefined" || document.getElementById(POPOVER_STYLE_ID)) return;
|
|
9240
|
+
const el = document.createElement("style");
|
|
9241
|
+
el.id = POPOVER_STYLE_ID;
|
|
9242
|
+
el.textContent = POPOVER_CSS;
|
|
9243
|
+
document.head.appendChild(el);
|
|
9244
|
+
}
|
|
9245
|
+
var currentOwner = null;
|
|
9246
|
+
var currentForceClose = null;
|
|
9247
|
+
function Popover({
|
|
9248
|
+
anchorRect,
|
|
9249
|
+
onClose,
|
|
9250
|
+
placement = "bottom-start",
|
|
9251
|
+
flip = true,
|
|
9252
|
+
offset = 4,
|
|
9253
|
+
children
|
|
9254
|
+
}) {
|
|
9255
|
+
const panelRef = React78.useRef(null);
|
|
9256
|
+
const [pos, setPos] = React78.useState(null);
|
|
9257
|
+
const [exiting, setExiting] = React78.useState(false);
|
|
9258
|
+
const exitTimerRef = React78.useRef(null);
|
|
9259
|
+
ensurePopoverStyles();
|
|
9260
|
+
const onCloseRef = React78.useRef(onClose);
|
|
9261
|
+
onCloseRef.current = onClose;
|
|
9262
|
+
const handleClose = React78.useCallback(() => {
|
|
9263
|
+
if (exiting) return;
|
|
9264
|
+
setExiting(true);
|
|
9265
|
+
exitTimerRef.current = setTimeout(() => {
|
|
9266
|
+
onClose();
|
|
9267
|
+
}, 110);
|
|
9268
|
+
}, [exiting, onClose]);
|
|
9269
|
+
React78.useEffect(() => () => {
|
|
9270
|
+
if (exitTimerRef.current) clearTimeout(exitTimerRef.current);
|
|
9271
|
+
}, []);
|
|
9272
|
+
React78.useEffect(() => {
|
|
9273
|
+
if (exitTimerRef.current) {
|
|
9274
|
+
clearTimeout(exitTimerRef.current);
|
|
9275
|
+
exitTimerRef.current = null;
|
|
9276
|
+
}
|
|
9277
|
+
setExiting(false);
|
|
9278
|
+
}, [anchorRect]);
|
|
9279
|
+
useEscapeLayer(!exiting, handleClose);
|
|
9280
|
+
React78.useEffect(() => {
|
|
9281
|
+
const id = /* @__PURE__ */ Symbol("popover");
|
|
9282
|
+
const triggerEl = document.activeElement;
|
|
9283
|
+
if (currentOwner !== null && currentForceClose) currentForceClose();
|
|
9284
|
+
currentOwner = id;
|
|
9285
|
+
currentForceClose = () => onCloseRef.current();
|
|
9286
|
+
return () => {
|
|
9287
|
+
if (currentOwner === id) {
|
|
9288
|
+
currentOwner = null;
|
|
9289
|
+
currentForceClose = null;
|
|
9290
|
+
}
|
|
9291
|
+
triggerEl?.focus?.();
|
|
9292
|
+
};
|
|
9293
|
+
}, []);
|
|
9294
|
+
const reposition = React78.useCallback(() => {
|
|
9295
|
+
if (!anchorRect || !panelRef.current) return;
|
|
9296
|
+
const panel = panelRef.current.getBoundingClientRect();
|
|
9297
|
+
const vw = window.innerWidth;
|
|
9298
|
+
const vh = window.innerHeight;
|
|
9299
|
+
const margin = 8;
|
|
9300
|
+
const isEnd = placement === "bottom-end" || placement === "top-end";
|
|
9301
|
+
const above = placement === "top-start" || placement === "top-end";
|
|
9302
|
+
const aboveOffset = offset + 8;
|
|
9303
|
+
const horizontal = isEnd ? { right: Math.max(margin, vw - anchorRect.right) } : { left: Math.max(margin, Math.min(anchorRect.left, vw - panel.width - margin)) };
|
|
9304
|
+
if (above) {
|
|
9305
|
+
const bottom = Math.max(margin, vh - anchorRect.top + aboveOffset);
|
|
9306
|
+
setPos({ ...horizontal, bottom });
|
|
9307
|
+
return;
|
|
9308
|
+
}
|
|
9309
|
+
let top = anchorRect.bottom + offset;
|
|
9310
|
+
if (!flip) {
|
|
9311
|
+
setPos({ ...horizontal, top });
|
|
9312
|
+
return;
|
|
9313
|
+
}
|
|
9314
|
+
if (top + panel.height > vh - margin && anchorRect.top - aboveOffset - panel.height > margin) {
|
|
9315
|
+
top = anchorRect.top - aboveOffset - panel.height;
|
|
9316
|
+
}
|
|
9317
|
+
top = Math.max(margin, Math.min(top, vh - panel.height - margin));
|
|
9318
|
+
setPos({ ...horizontal, top });
|
|
9319
|
+
}, [anchorRect, placement, flip, offset]);
|
|
9320
|
+
React78.useLayoutEffect(() => {
|
|
9321
|
+
reposition();
|
|
9322
|
+
}, [reposition]);
|
|
9323
|
+
React78.useEffect(() => {
|
|
9324
|
+
const el = panelRef.current;
|
|
9325
|
+
if (!el || typeof ResizeObserver === "undefined") return;
|
|
9326
|
+
const ro = new ResizeObserver(() => reposition());
|
|
9327
|
+
ro.observe(el);
|
|
9328
|
+
return () => ro.disconnect();
|
|
9329
|
+
}, [reposition]);
|
|
9330
|
+
if (!anchorRect) return null;
|
|
9331
|
+
return createPortal2(
|
|
9332
|
+
/* @__PURE__ */ jsxs53(Fragment15, { children: [
|
|
9333
|
+
/* @__PURE__ */ jsx73(
|
|
9334
|
+
"div",
|
|
9335
|
+
{
|
|
9336
|
+
"aria-hidden": true,
|
|
9337
|
+
onClick: (e) => {
|
|
9338
|
+
e.stopPropagation();
|
|
9339
|
+
handleClose();
|
|
9340
|
+
},
|
|
9341
|
+
style: {
|
|
9342
|
+
position: "fixed",
|
|
9343
|
+
inset: 0,
|
|
9344
|
+
zIndex: 1999,
|
|
9345
|
+
// Inert from the instant the close is REQUESTED, not when the timer
|
|
9346
|
+
// fires. This is what makes a frozen exit timer cost a stale node
|
|
9347
|
+
// instead of a page that has stopped responding to clicks.
|
|
9348
|
+
pointerEvents: exiting ? "none" : "auto"
|
|
9349
|
+
}
|
|
9350
|
+
}
|
|
9351
|
+
),
|
|
9352
|
+
/* @__PURE__ */ jsx73(
|
|
9353
|
+
"div",
|
|
9354
|
+
{
|
|
9355
|
+
ref: panelRef,
|
|
9356
|
+
className: pos ? `leta-popover-panel${exiting ? " exiting" : ""}` : void 0,
|
|
9357
|
+
onClick: (e) => e.stopPropagation(),
|
|
9358
|
+
style: {
|
|
9359
|
+
position: "fixed",
|
|
9360
|
+
// Exactly one horizontal anchor: `right` for end-aligned placements (see
|
|
9361
|
+
// `reposition`), `left` otherwise. Setting both would stretch the panel.
|
|
9362
|
+
...pos?.right != null ? { right: pos.right } : { left: pos?.left ?? anchorRect.left },
|
|
9363
|
+
...pos?.bottom != null ? { bottom: pos.bottom } : { top: pos?.top ?? anchorRect.bottom + offset },
|
|
9364
|
+
zIndex: 2e3,
|
|
9365
|
+
transformOrigin: `${placement.startsWith("top") ? "bottom" : "top"} ${placement.endsWith("end") ? "right" : "left"}`,
|
|
9366
|
+
// Hide until measured to avoid a one-frame jump.
|
|
9367
|
+
visibility: pos ? "visible" : "hidden"
|
|
9368
|
+
},
|
|
9369
|
+
children
|
|
9370
|
+
}
|
|
9371
|
+
)
|
|
9372
|
+
] }),
|
|
9373
|
+
document.body
|
|
9374
|
+
);
|
|
9375
|
+
}
|
|
9376
|
+
function MenuPanel({
|
|
9377
|
+
width = 220,
|
|
9378
|
+
children
|
|
9379
|
+
}) {
|
|
9380
|
+
const panelRef = React78.useRef(null);
|
|
9381
|
+
useRovingFocus(panelRef);
|
|
9382
|
+
return /* @__PURE__ */ jsx73(
|
|
9383
|
+
"div",
|
|
9384
|
+
{
|
|
9385
|
+
ref: panelRef,
|
|
9386
|
+
role: "menu",
|
|
9387
|
+
style: {
|
|
9388
|
+
width,
|
|
9389
|
+
boxSizing: "border-box",
|
|
9390
|
+
display: "flex",
|
|
9391
|
+
flexDirection: "column",
|
|
9392
|
+
gap: "var(--spacing-4px)",
|
|
9393
|
+
padding: "var(--padding-8px)",
|
|
9394
|
+
backgroundColor: "var(--surface-neutral-bg-default)",
|
|
9395
|
+
border: "var(--stroke-xs) solid var(--border-neutral-default)",
|
|
9396
|
+
borderRadius: "var(--rounding-xl)",
|
|
9397
|
+
boxShadow: "var(--shadow-neutral-3)"
|
|
9398
|
+
},
|
|
9399
|
+
children
|
|
9400
|
+
}
|
|
9401
|
+
);
|
|
9402
|
+
}
|
|
9403
|
+
function MenuDivider({ inset = false } = {}) {
|
|
9404
|
+
return /* @__PURE__ */ jsx73(
|
|
9405
|
+
"div",
|
|
9406
|
+
{
|
|
9407
|
+
"aria-hidden": true,
|
|
9408
|
+
style: {
|
|
9409
|
+
height: "var(--stroke-xs)",
|
|
9410
|
+
backgroundColor: "var(--border-neutral-default)",
|
|
9411
|
+
marginTop: "var(--spacing-4px)",
|
|
9412
|
+
marginBottom: "var(--spacing-4px)",
|
|
9413
|
+
...inset ? null : {
|
|
9414
|
+
marginLeft: "calc(-1 * var(--padding-8px))",
|
|
9415
|
+
marginRight: "calc(-1 * var(--padding-8px))"
|
|
9416
|
+
}
|
|
9417
|
+
}
|
|
9418
|
+
}
|
|
9419
|
+
);
|
|
9420
|
+
}
|
|
9421
|
+
function MenuFlyout({
|
|
9422
|
+
rowRect,
|
|
9423
|
+
prefer = "right",
|
|
9424
|
+
children
|
|
9425
|
+
}) {
|
|
9426
|
+
const ref = React78.useRef(null);
|
|
9427
|
+
const [pos, setPos] = React78.useState(null);
|
|
9428
|
+
React78.useLayoutEffect(() => {
|
|
9429
|
+
const el = ref.current;
|
|
9430
|
+
if (!el) return;
|
|
9431
|
+
const gap = 8;
|
|
9432
|
+
const w = el.offsetWidth;
|
|
9433
|
+
const h = el.offsetHeight;
|
|
9434
|
+
const rightOf = rowRect.right + gap;
|
|
9435
|
+
const leftOf = rowRect.left - w - gap;
|
|
9436
|
+
let left = prefer === "right" ? rightOf : leftOf;
|
|
9437
|
+
if (prefer === "right" ? left + w > window.innerWidth - 8 : left < 8) {
|
|
9438
|
+
left = prefer === "right" ? leftOf : rightOf;
|
|
9439
|
+
}
|
|
9440
|
+
left = Math.max(8, Math.min(left, window.innerWidth - w - 8));
|
|
9441
|
+
let top = rowRect.top - 8;
|
|
9442
|
+
top = Math.max(8, Math.min(top, window.innerHeight - h - 8));
|
|
9443
|
+
setPos({ left, top });
|
|
9444
|
+
}, [rowRect, prefer]);
|
|
9445
|
+
return createPortal2(
|
|
9446
|
+
/* @__PURE__ */ jsx73(
|
|
9447
|
+
"div",
|
|
9448
|
+
{
|
|
9449
|
+
ref,
|
|
9450
|
+
onClick: (e) => e.stopPropagation(),
|
|
9451
|
+
style: {
|
|
9452
|
+
position: "fixed",
|
|
9453
|
+
left: pos?.left ?? rowRect.left,
|
|
9454
|
+
top: pos?.top ?? rowRect.top,
|
|
9455
|
+
zIndex: 2001,
|
|
9456
|
+
// Hidden until measured, so it never paints at the fallback position first.
|
|
9457
|
+
visibility: pos ? "visible" : "hidden"
|
|
9458
|
+
},
|
|
9459
|
+
children
|
|
9460
|
+
}
|
|
9461
|
+
),
|
|
9462
|
+
document.body
|
|
9463
|
+
);
|
|
9464
|
+
}
|
|
9465
|
+
|
|
9466
|
+
// src/DialogOverlay/DialogOverlay.tsx
|
|
9467
|
+
import * as React79 from "react";
|
|
9468
|
+
import { createPortal as createPortal3 } from "react-dom";
|
|
9469
|
+
import { Fragment as Fragment16, jsx as jsx74, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
9470
|
+
var DIALOG_OVERLAY_DEFAULT_TIER = 1600;
|
|
9471
|
+
var EXIT_MS = 160;
|
|
9472
|
+
var stylesInjected = false;
|
|
9473
|
+
function ensureStyles21() {
|
|
9474
|
+
if (stylesInjected || typeof document === "undefined") return;
|
|
9475
|
+
stylesInjected = true;
|
|
9476
|
+
const el = document.createElement("style");
|
|
9477
|
+
el.setAttribute("data-leta", "dialog-overlay");
|
|
9478
|
+
el.textContent = `
|
|
9479
|
+
.leta-dialog-scrim { opacity: 0; transition: opacity 220ms ease-out; }
|
|
9480
|
+
.leta-dialog-scrim.open { opacity: 1; }
|
|
9481
|
+
.leta-dialog-scrim.closing { transition: opacity ${EXIT_MS}ms ease-in; opacity: 0; }
|
|
9482
|
+
.leta-dialog-panel { opacity: 0; transform: translate(-50%, -50%) scale(0.96); transition: opacity 220ms cubic-bezier(0.2, 0, 0, 1), transform 220ms cubic-bezier(0.2, 0, 0, 1); }
|
|
9483
|
+
.leta-dialog-panel.open { opacity: 1; transform: translate(-50%, -50%) scale(1); }
|
|
9484
|
+
.leta-dialog-panel.closing { transition: opacity ${EXIT_MS}ms ease-in, transform ${EXIT_MS}ms ease-in; opacity: 0; transform: translate(-50%, -50%) scale(0.96); }
|
|
9485
|
+
@media (prefers-reduced-motion: reduce) {
|
|
9486
|
+
.leta-dialog-scrim, .leta-dialog-scrim.open, .leta-dialog-scrim.closing,
|
|
9487
|
+
.leta-dialog-panel, .leta-dialog-panel.open, .leta-dialog-panel.closing { transition: none; }
|
|
9488
|
+
}`;
|
|
9489
|
+
document.head.appendChild(el);
|
|
9490
|
+
}
|
|
9491
|
+
function DialogOverlay({
|
|
9492
|
+
onClose,
|
|
9493
|
+
children,
|
|
9494
|
+
extra,
|
|
9495
|
+
tier = DIALOG_OVERLAY_DEFAULT_TIER
|
|
9496
|
+
}) {
|
|
9497
|
+
ensureStyles21();
|
|
9498
|
+
const [closing, setClosing] = React79.useState(false);
|
|
9499
|
+
const [entered, setEntered] = React79.useState(false);
|
|
9500
|
+
React79.useEffect(() => {
|
|
9501
|
+
let raf2 = 0;
|
|
9502
|
+
const raf1 = requestAnimationFrame(() => {
|
|
9503
|
+
raf2 = requestAnimationFrame(() => setEntered(true));
|
|
9504
|
+
});
|
|
9505
|
+
return () => {
|
|
9506
|
+
cancelAnimationFrame(raf1);
|
|
9507
|
+
cancelAnimationFrame(raf2);
|
|
9508
|
+
};
|
|
9509
|
+
}, []);
|
|
9510
|
+
const exitTimerRef = React79.useRef(null);
|
|
9511
|
+
React79.useEffect(() => () => {
|
|
9512
|
+
if (exitTimerRef.current) clearTimeout(exitTimerRef.current);
|
|
9513
|
+
}, []);
|
|
9514
|
+
const closeAnd = (fn) => {
|
|
9515
|
+
if (closing) return;
|
|
9516
|
+
setClosing(true);
|
|
9517
|
+
exitTimerRef.current = setTimeout(fn, EXIT_MS);
|
|
9518
|
+
};
|
|
9519
|
+
const close = () => closeAnd(onClose);
|
|
9520
|
+
const stateClass = closing ? "closing" : entered ? "open" : "";
|
|
9521
|
+
return createPortal3(
|
|
9522
|
+
/* @__PURE__ */ jsxs54(Fragment16, { children: [
|
|
9523
|
+
/* @__PURE__ */ jsx74(
|
|
9524
|
+
"div",
|
|
9525
|
+
{
|
|
9526
|
+
"aria-hidden": true,
|
|
9527
|
+
onClick: close,
|
|
9528
|
+
className: `leta-dialog-scrim ${stateClass}`,
|
|
9529
|
+
style: {
|
|
9530
|
+
position: "fixed",
|
|
9531
|
+
inset: 0,
|
|
9532
|
+
background: "var(--leta-overlay-scrim, rgba(16,16,16,0.4))",
|
|
9533
|
+
zIndex: tier,
|
|
9534
|
+
// Inert from the close REQUEST — a frozen exit timer must never leave a
|
|
9535
|
+
// click-blocking surface behind.
|
|
9536
|
+
pointerEvents: closing ? "none" : "auto"
|
|
9537
|
+
}
|
|
9538
|
+
}
|
|
9539
|
+
),
|
|
9540
|
+
/* @__PURE__ */ jsx74("div", { className: `leta-dialog-panel ${stateClass}`, style: { position: "fixed", top: "50%", left: "50%", zIndex: tier + 1 }, children: children({ close, closeAnd }) }),
|
|
9541
|
+
extra
|
|
9542
|
+
] }),
|
|
9543
|
+
document.body
|
|
9544
|
+
);
|
|
9545
|
+
}
|
|
9546
|
+
|
|
9547
|
+
// src/DesktopMetricCard/DesktopMetricCard.tsx
|
|
9548
|
+
import * as React80 from "react";
|
|
9132
9549
|
import { Icon as Icon36 } from "@leta-io/icons";
|
|
9133
|
-
import { jsx as
|
|
9550
|
+
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
9134
9551
|
var VARIANCE_BADGE = {
|
|
9135
9552
|
neutral: { color: "neutral" },
|
|
9136
9553
|
positive: { color: "success", icon: "Up-Arrow" },
|
|
@@ -9143,7 +9560,7 @@ var STYLES16 = `
|
|
|
9143
9560
|
outline-offset: 4px;
|
|
9144
9561
|
}
|
|
9145
9562
|
`;
|
|
9146
|
-
function
|
|
9563
|
+
function ensureStyles22() {
|
|
9147
9564
|
if (typeof document === "undefined") return;
|
|
9148
9565
|
if (document.getElementById(STYLE_ID25)) return;
|
|
9149
9566
|
const el = document.createElement("style");
|
|
@@ -9175,7 +9592,7 @@ var STATE_STYLE = {
|
|
|
9175
9592
|
ring: true
|
|
9176
9593
|
}
|
|
9177
9594
|
};
|
|
9178
|
-
var DesktopMetricCard = /* @__PURE__ */
|
|
9595
|
+
var DesktopMetricCard = /* @__PURE__ */ React80.forwardRef(
|
|
9179
9596
|
function DesktopMetricCard2({
|
|
9180
9597
|
metric = "10",
|
|
9181
9598
|
eyebrowText = "This week",
|
|
@@ -9196,9 +9613,9 @@ var DesktopMetricCard = /* @__PURE__ */ React77.forwardRef(
|
|
|
9196
9613
|
onMouseUp,
|
|
9197
9614
|
...rest
|
|
9198
9615
|
}, ref) {
|
|
9199
|
-
|
|
9200
|
-
const [hovered, setHovered] =
|
|
9201
|
-
const [pressed, setPressed] =
|
|
9616
|
+
ensureStyles22();
|
|
9617
|
+
const [hovered, setHovered] = React80.useState(false);
|
|
9618
|
+
const [pressed, setPressed] = React80.useState(false);
|
|
9202
9619
|
const state = forcedState ?? (pressed ? "pressed" : hovered ? "hover" : "default");
|
|
9203
9620
|
const hasVariance = variance !== "none";
|
|
9204
9621
|
const varianceBadge = hasVariance ? VARIANCE_BADGE[variance] : void 0;
|
|
@@ -9231,8 +9648,8 @@ var DesktopMetricCard = /* @__PURE__ */ React77.forwardRef(
|
|
|
9231
9648
|
...ringStyle,
|
|
9232
9649
|
...style
|
|
9233
9650
|
};
|
|
9234
|
-
const trailing = trailingContent === void 0 ? /* @__PURE__ */
|
|
9235
|
-
return /* @__PURE__ */
|
|
9651
|
+
const trailing = trailingContent === void 0 ? /* @__PURE__ */ jsx75(Icon36, { name: "Proceed", size: 20 }) : trailingContent;
|
|
9652
|
+
return /* @__PURE__ */ jsx75(
|
|
9236
9653
|
"button",
|
|
9237
9654
|
{
|
|
9238
9655
|
ref,
|
|
@@ -9257,7 +9674,7 @@ var DesktopMetricCard = /* @__PURE__ */ React77.forwardRef(
|
|
|
9257
9674
|
onMouseUp?.(e);
|
|
9258
9675
|
},
|
|
9259
9676
|
...rest,
|
|
9260
|
-
children: /* @__PURE__ */
|
|
9677
|
+
children: /* @__PURE__ */ jsx75(
|
|
9261
9678
|
ContentPrimitives,
|
|
9262
9679
|
{
|
|
9263
9680
|
type: "metrics",
|
|
@@ -9284,8 +9701,8 @@ var DesktopMetricCard = /* @__PURE__ */ React77.forwardRef(
|
|
|
9284
9701
|
);
|
|
9285
9702
|
|
|
9286
9703
|
// src/OptionCard/OptionCard.tsx
|
|
9287
|
-
import * as
|
|
9288
|
-
import { jsx as
|
|
9704
|
+
import * as React81 from "react";
|
|
9705
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
9289
9706
|
var STYLE_ID26 = "leta-option-card-styles";
|
|
9290
9707
|
var STYLES17 = `
|
|
9291
9708
|
/* The focusable element is the nested radio <input>; draw the focus ring
|
|
@@ -9295,7 +9712,7 @@ var STYLES17 = `
|
|
|
9295
9712
|
outline-offset: 4px;
|
|
9296
9713
|
}
|
|
9297
9714
|
`;
|
|
9298
|
-
function
|
|
9715
|
+
function ensureStyles23() {
|
|
9299
9716
|
if (typeof document === "undefined") return;
|
|
9300
9717
|
if (document.getElementById(STYLE_ID26)) return;
|
|
9301
9718
|
const el = document.createElement("style");
|
|
@@ -9324,7 +9741,7 @@ var SHADOW = {
|
|
|
9324
9741
|
active: null,
|
|
9325
9742
|
focus: null
|
|
9326
9743
|
};
|
|
9327
|
-
var OptionCard = /* @__PURE__ */
|
|
9744
|
+
var OptionCard = /* @__PURE__ */ React81.forwardRef(
|
|
9328
9745
|
function OptionCard2({
|
|
9329
9746
|
title,
|
|
9330
9747
|
description = "Enter description here",
|
|
@@ -9344,9 +9761,9 @@ var OptionCard = /* @__PURE__ */ React78.forwardRef(
|
|
|
9344
9761
|
onMouseUp,
|
|
9345
9762
|
...rest
|
|
9346
9763
|
}, ref) {
|
|
9347
|
-
|
|
9348
|
-
const [hovered, setHovered] =
|
|
9349
|
-
const [pressed, setPressed] =
|
|
9764
|
+
ensureStyles23();
|
|
9765
|
+
const [hovered, setHovered] = React81.useState(false);
|
|
9766
|
+
const [pressed, setPressed] = React81.useState(false);
|
|
9350
9767
|
const state = forcedState ?? (selected ? "active" : pressed ? "pressed" : hovered ? "hover" : "idle");
|
|
9351
9768
|
const rootStyle = {
|
|
9352
9769
|
display: "flex",
|
|
@@ -9369,7 +9786,7 @@ var OptionCard = /* @__PURE__ */ React78.forwardRef(
|
|
|
9369
9786
|
} : {},
|
|
9370
9787
|
...style
|
|
9371
9788
|
};
|
|
9372
|
-
return /* @__PURE__ */
|
|
9789
|
+
return /* @__PURE__ */ jsx76(
|
|
9373
9790
|
"label",
|
|
9374
9791
|
{
|
|
9375
9792
|
ref,
|
|
@@ -9393,7 +9810,7 @@ var OptionCard = /* @__PURE__ */ React78.forwardRef(
|
|
|
9393
9810
|
onMouseUp?.(e);
|
|
9394
9811
|
},
|
|
9395
9812
|
...rest,
|
|
9396
|
-
children: /* @__PURE__ */
|
|
9813
|
+
children: /* @__PURE__ */ jsx76(
|
|
9397
9814
|
ContentPrimitives,
|
|
9398
9815
|
{
|
|
9399
9816
|
type: "utility",
|
|
@@ -9404,7 +9821,7 @@ var OptionCard = /* @__PURE__ */ React78.forwardRef(
|
|
|
9404
9821
|
showPassiveElements: false,
|
|
9405
9822
|
showInteractiveElements: showTrailing,
|
|
9406
9823
|
contentAlign: "top",
|
|
9407
|
-
interactiveElements: showTrailing ? trailing ?? /* @__PURE__ */
|
|
9824
|
+
interactiveElements: showTrailing ? trailing ?? /* @__PURE__ */ jsx76(
|
|
9408
9825
|
RadioButton,
|
|
9409
9826
|
{
|
|
9410
9827
|
checked: selected,
|
|
@@ -9423,10 +9840,10 @@ var OptionCard = /* @__PURE__ */ React78.forwardRef(
|
|
|
9423
9840
|
);
|
|
9424
9841
|
|
|
9425
9842
|
// src/ContentCard/ContentCard.tsx
|
|
9426
|
-
import * as
|
|
9427
|
-
import { jsx as
|
|
9428
|
-
var ContentCard = /* @__PURE__ */
|
|
9429
|
-
return /* @__PURE__ */
|
|
9843
|
+
import * as React82 from "react";
|
|
9844
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
9845
|
+
var ContentCard = /* @__PURE__ */ React82.forwardRef(function ContentCard2({ children, style, ...rest }, ref) {
|
|
9846
|
+
return /* @__PURE__ */ jsx77(
|
|
9430
9847
|
"div",
|
|
9431
9848
|
{
|
|
9432
9849
|
ref,
|
|
@@ -9438,12 +9855,17 @@ var ContentCard = /* @__PURE__ */ React79.forwardRef(function ContentCard2({ chi
|
|
|
9438
9855
|
gap: "var(--spacing-16px)",
|
|
9439
9856
|
padding: "var(--padding-20px)",
|
|
9440
9857
|
borderRadius: "var(--rounding-xl)",
|
|
9441
|
-
border
|
|
9858
|
+
// Painted as an inset shadow, not a `border` — Figma strokes this card
|
|
9859
|
+
// INSIDE, which adds nothing to its size. A real 1px border in a
|
|
9860
|
+
// `border-box` card with no fixed height adds 2px, so every Content Card
|
|
9861
|
+
// measured 2px taller than designed (86 against the Broadcasting Status
|
|
9862
|
+
// Card's 84). The repo's own convention for strokes, applied late here.
|
|
9863
|
+
boxShadow: "inset 0 0 0 var(--stroke-xs) var(--border-neutral-default)",
|
|
9442
9864
|
backgroundColor: "var(--surface-neutral-bg-default)",
|
|
9443
9865
|
...style
|
|
9444
9866
|
},
|
|
9445
9867
|
...rest,
|
|
9446
|
-
children: children ?? /* @__PURE__ */
|
|
9868
|
+
children: children ?? /* @__PURE__ */ jsx77(
|
|
9447
9869
|
ContentPrimitives,
|
|
9448
9870
|
{
|
|
9449
9871
|
type: "utility",
|
|
@@ -9451,7 +9873,7 @@ var ContentCard = /* @__PURE__ */ React79.forwardRef(function ContentCard2({ chi
|
|
|
9451
9873
|
subtext: "Enter description here",
|
|
9452
9874
|
showVisualAnchor: false,
|
|
9453
9875
|
showInteractiveElements: true,
|
|
9454
|
-
interactiveElements: /* @__PURE__ */
|
|
9876
|
+
interactiveElements: /* @__PURE__ */ jsx77(Button, { variant: "secondary", size: "medium", children: "Dispatch" })
|
|
9455
9877
|
}
|
|
9456
9878
|
)
|
|
9457
9879
|
}
|
|
@@ -9459,10 +9881,10 @@ var ContentCard = /* @__PURE__ */ React79.forwardRef(function ContentCard2({ chi
|
|
|
9459
9881
|
});
|
|
9460
9882
|
|
|
9461
9883
|
// src/ContentCard/StackedCards.tsx
|
|
9462
|
-
import * as
|
|
9463
|
-
import { Fragment as
|
|
9464
|
-
var StackedCards = /* @__PURE__ */
|
|
9465
|
-
return /* @__PURE__ */
|
|
9884
|
+
import * as React83 from "react";
|
|
9885
|
+
import { Fragment as Fragment17, jsx as jsx78, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
9886
|
+
var StackedCards = /* @__PURE__ */ React83.forwardRef(function StackedCards2({ children, style, ...rest }, ref) {
|
|
9887
|
+
return /* @__PURE__ */ jsx78(
|
|
9466
9888
|
"div",
|
|
9467
9889
|
{
|
|
9468
9890
|
ref,
|
|
@@ -9476,20 +9898,20 @@ var StackedCards = /* @__PURE__ */ React80.forwardRef(function StackedCards2({ c
|
|
|
9476
9898
|
...style
|
|
9477
9899
|
},
|
|
9478
9900
|
...rest,
|
|
9479
|
-
children: children ?? /* @__PURE__ */
|
|
9480
|
-
/* @__PURE__ */
|
|
9481
|
-
/* @__PURE__ */
|
|
9901
|
+
children: children ?? /* @__PURE__ */ jsxs55(Fragment17, { children: [
|
|
9902
|
+
/* @__PURE__ */ jsx78(ContentCard, {}),
|
|
9903
|
+
/* @__PURE__ */ jsx78(ContentCard, {})
|
|
9482
9904
|
] })
|
|
9483
9905
|
}
|
|
9484
9906
|
);
|
|
9485
9907
|
});
|
|
9486
9908
|
|
|
9487
9909
|
// src/InputSection/InputSection.tsx
|
|
9488
|
-
import * as
|
|
9489
|
-
import { jsx as
|
|
9910
|
+
import * as React84 from "react";
|
|
9911
|
+
import { jsx as jsx79, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
9490
9912
|
var DASHED = "var(--stroke-xs) dashed var(--border-neutral-default)";
|
|
9491
9913
|
function FormDemarcator({ style, ...rest }) {
|
|
9492
|
-
return /* @__PURE__ */
|
|
9914
|
+
return /* @__PURE__ */ jsx79("div", { role: "separator", "aria-orientation": "horizontal", style: { width: "100%", height: 0, borderTop: DASHED, ...style }, ...rest });
|
|
9493
9915
|
}
|
|
9494
9916
|
var DEFAULT_FIELDS = Array.from({ length: 8 }, () => ({
|
|
9495
9917
|
variant: "basic",
|
|
@@ -9497,15 +9919,15 @@ var DEFAULT_FIELDS = Array.from({ length: 8 }, () => ({
|
|
|
9497
9919
|
placeholder: "Field Text",
|
|
9498
9920
|
showHelper: false
|
|
9499
9921
|
}));
|
|
9500
|
-
var InputGroup = /* @__PURE__ */
|
|
9501
|
-
return /* @__PURE__ */
|
|
9922
|
+
var InputGroup = /* @__PURE__ */ React84.forwardRef(function InputGroup2({ title = "Group Name", description = "Provide details for this group", fields = DEFAULT_FIELDS, headerTrailing, header, children, style, ...rest }, ref) {
|
|
9923
|
+
return /* @__PURE__ */ jsxs56(
|
|
9502
9924
|
"div",
|
|
9503
9925
|
{
|
|
9504
9926
|
ref,
|
|
9505
9927
|
style: { display: "flex", flexDirection: "column", gap: "var(--spacing-20px)", width: "100%", boxSizing: "border-box", ...style },
|
|
9506
9928
|
...rest,
|
|
9507
9929
|
children: [
|
|
9508
|
-
header ?? /* @__PURE__ */
|
|
9930
|
+
header ?? /* @__PURE__ */ jsx79(
|
|
9509
9931
|
ContentPrimitives,
|
|
9510
9932
|
{
|
|
9511
9933
|
type: "group-header",
|
|
@@ -9518,21 +9940,21 @@ var InputGroup = /* @__PURE__ */ React81.forwardRef(function InputGroup2({ title
|
|
|
9518
9940
|
interactiveElements: headerTrailing
|
|
9519
9941
|
}
|
|
9520
9942
|
),
|
|
9521
|
-
children ?? /* @__PURE__ */
|
|
9943
|
+
children ?? /* @__PURE__ */ jsx79("div", { style: { display: "flex", flexWrap: "wrap", columnGap: "var(--spacing-32px)", rowGap: "var(--spacing-20px)", width: "100%" }, children: fields.map((f, i) => /* @__PURE__ */ jsx79("div", { style: { flex: "1 1 calc(50% - (var(--spacing-32px) / 2))", minWidth: 240 }, children: /* @__PURE__ */ jsx79(InputField, { ...f, style: { width: "100%", ...f.style } }) }, i)) })
|
|
9522
9944
|
]
|
|
9523
9945
|
}
|
|
9524
9946
|
);
|
|
9525
9947
|
});
|
|
9526
|
-
var InputSection = /* @__PURE__ */
|
|
9527
|
-
const [open, setOpen] =
|
|
9948
|
+
var InputSection = /* @__PURE__ */ React84.forwardRef(function InputSection2({ title = "Text", description = "Enter description here", showChevron = true, defaultOpen = true, onToggle, header, children, style, ...rest }, ref) {
|
|
9949
|
+
const [open, setOpen] = React84.useState(defaultOpen);
|
|
9528
9950
|
const toggle = () => onToggle ? onToggle() : setOpen((o) => !o);
|
|
9529
|
-
const items =
|
|
9951
|
+
const items = React84.Children.toArray(children ?? [/* @__PURE__ */ jsx79(InputGroup, {}, "g1"), /* @__PURE__ */ jsx79(InputGroup, {}, "g2")]);
|
|
9530
9952
|
const body = [];
|
|
9531
9953
|
items.forEach((child, i) => {
|
|
9532
|
-
if (i > 0) body.push(/* @__PURE__ */
|
|
9954
|
+
if (i > 0) body.push(/* @__PURE__ */ jsx79(FormDemarcator, {}, `d${i}`));
|
|
9533
9955
|
body.push(child);
|
|
9534
9956
|
});
|
|
9535
|
-
return /* @__PURE__ */
|
|
9957
|
+
return /* @__PURE__ */ jsxs56(
|
|
9536
9958
|
"div",
|
|
9537
9959
|
{
|
|
9538
9960
|
ref,
|
|
@@ -9540,7 +9962,7 @@ var InputSection = /* @__PURE__ */ React81.forwardRef(function InputSection2({ t
|
|
|
9540
9962
|
style: { display: "flex", flexDirection: "column", gap: 0, width: "100%", boxSizing: "border-box", backgroundColor: "var(--surface-neutral-bg-default)", ...style },
|
|
9541
9963
|
...rest,
|
|
9542
9964
|
children: [
|
|
9543
|
-
header ?? (showChevron ? /* @__PURE__ */
|
|
9965
|
+
header ?? (showChevron ? /* @__PURE__ */ jsx79(AccordionHeader, { open, onToggle: toggle, children: /* @__PURE__ */ jsx79(
|
|
9544
9966
|
ContentPrimitives,
|
|
9545
9967
|
{
|
|
9546
9968
|
type: "section-heading",
|
|
@@ -9548,10 +9970,10 @@ var InputSection = /* @__PURE__ */ React81.forwardRef(function InputSection2({ t
|
|
|
9548
9970
|
subtext: description,
|
|
9549
9971
|
showTrailingContent: true,
|
|
9550
9972
|
showInteractiveElements: true,
|
|
9551
|
-
interactiveElements: /* @__PURE__ */
|
|
9973
|
+
interactiveElements: /* @__PURE__ */ jsx79(AccordionChevron, { open, onToggle: toggle }),
|
|
9552
9974
|
showPassiveElements: false
|
|
9553
9975
|
}
|
|
9554
|
-
) }) : /* @__PURE__ */
|
|
9976
|
+
) }) : /* @__PURE__ */ jsx79(
|
|
9555
9977
|
ContentPrimitives,
|
|
9556
9978
|
{
|
|
9557
9979
|
type: "section-heading",
|
|
@@ -9562,22 +9984,22 @@ var InputSection = /* @__PURE__ */ React81.forwardRef(function InputSection2({ t
|
|
|
9562
9984
|
showPassiveElements: false
|
|
9563
9985
|
}
|
|
9564
9986
|
)),
|
|
9565
|
-
/* @__PURE__ */
|
|
9987
|
+
/* @__PURE__ */ jsx79(AccordionContent, { open: showChevron ? open : true, gap: "var(--spacing-24px)", children: body })
|
|
9566
9988
|
]
|
|
9567
9989
|
}
|
|
9568
9990
|
);
|
|
9569
9991
|
});
|
|
9570
9992
|
|
|
9571
9993
|
// src/Toast/Toast.tsx
|
|
9572
|
-
import * as
|
|
9994
|
+
import * as React85 from "react";
|
|
9573
9995
|
import { Icon as Icon37 } from "@leta-io/icons";
|
|
9574
|
-
import { jsx as
|
|
9996
|
+
import { jsx as jsx80, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
9575
9997
|
var TYPE_CONFIG2 = {
|
|
9576
9998
|
success: { icon: "Check-Circle", iconColor: "var(--icons-success-default)" },
|
|
9577
9999
|
warning: { icon: "Warning", iconColor: "var(--icons-warning-default)" },
|
|
9578
10000
|
error: { icon: "Cancel-Circle", iconColor: "var(--icons-error-default)" }
|
|
9579
10001
|
};
|
|
9580
|
-
var Toast = /* @__PURE__ */
|
|
10002
|
+
var Toast = /* @__PURE__ */ React85.forwardRef(function Toast2({
|
|
9581
10003
|
type = "success",
|
|
9582
10004
|
title = "Toast Title",
|
|
9583
10005
|
showTitle = true,
|
|
@@ -9592,7 +10014,7 @@ var Toast = /* @__PURE__ */ React82.forwardRef(function Toast2({
|
|
|
9592
10014
|
}, ref) {
|
|
9593
10015
|
const config = TYPE_CONFIG2[type];
|
|
9594
10016
|
const isDestructive = type === "error";
|
|
9595
|
-
|
|
10017
|
+
React85.useEffect(() => {
|
|
9596
10018
|
if (!duration || !onDismiss) return;
|
|
9597
10019
|
const t = setTimeout(onDismiss, duration);
|
|
9598
10020
|
return () => clearTimeout(t);
|
|
@@ -9612,7 +10034,7 @@ var Toast = /* @__PURE__ */ React82.forwardRef(function Toast2({
|
|
|
9612
10034
|
boxShadow: "inset 0 0 0 var(--stroke-xs) var(--border-neutral-default), var(--shadow-neutral-2)",
|
|
9613
10035
|
...style
|
|
9614
10036
|
};
|
|
9615
|
-
return /* @__PURE__ */
|
|
10037
|
+
return /* @__PURE__ */ jsxs57(
|
|
9616
10038
|
"div",
|
|
9617
10039
|
{
|
|
9618
10040
|
ref,
|
|
@@ -9621,16 +10043,16 @@ var Toast = /* @__PURE__ */ React82.forwardRef(function Toast2({
|
|
|
9621
10043
|
style: rootStyle,
|
|
9622
10044
|
...rest,
|
|
9623
10045
|
children: [
|
|
9624
|
-
/* @__PURE__ */
|
|
9625
|
-
/* @__PURE__ */
|
|
9626
|
-
/* @__PURE__ */
|
|
9627
|
-
showTitle && title && /* @__PURE__ */
|
|
9628
|
-
showSubtitle && subtitle && /* @__PURE__ */
|
|
10046
|
+
/* @__PURE__ */ jsxs57("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "var(--spacing-12px)", minWidth: 0 }, children: [
|
|
10047
|
+
/* @__PURE__ */ jsx80("div", { style: { flexShrink: 0, width: 24, height: 24, color: config.iconColor }, children: /* @__PURE__ */ jsx80(Icon37, { name: config.icon, outlined: false, size: 24 }) }),
|
|
10048
|
+
/* @__PURE__ */ jsxs57("div", { style: { display: "flex", flexDirection: "column", gap: "var(--spacing-2px)", minWidth: 0 }, children: [
|
|
10049
|
+
showTitle && title && /* @__PURE__ */ jsx80("span", { className: "text-body-l-medium", style: { color: "var(--text-default-heading)" }, children: title }),
|
|
10050
|
+
showSubtitle && subtitle && /* @__PURE__ */ jsx80("span", { className: "text-body-m-regular", style: { color: "var(--text-default-sub-body)" }, children: subtitle })
|
|
9629
10051
|
] })
|
|
9630
10052
|
] }),
|
|
9631
|
-
/* @__PURE__ */
|
|
10053
|
+
/* @__PURE__ */ jsxs57("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "var(--spacing-8px)", flexShrink: 0 }, children: [
|
|
9632
10054
|
showCTA && children,
|
|
9633
|
-
onDismiss && /* @__PURE__ */
|
|
10055
|
+
onDismiss && /* @__PURE__ */ jsx80(
|
|
9634
10056
|
Button,
|
|
9635
10057
|
{
|
|
9636
10058
|
variant: "ghost",
|
|
@@ -9648,24 +10070,24 @@ var Toast = /* @__PURE__ */ React82.forwardRef(function Toast2({
|
|
|
9648
10070
|
});
|
|
9649
10071
|
|
|
9650
10072
|
// src/DateTimePicker/DateTimePicker.tsx
|
|
9651
|
-
import * as
|
|
10073
|
+
import * as React88 from "react";
|
|
9652
10074
|
import { Icon as Icon40 } from "@leta-io/icons";
|
|
9653
10075
|
|
|
9654
10076
|
// src/DateTimePicker/Calendar.tsx
|
|
9655
|
-
import * as
|
|
10077
|
+
import * as React87 from "react";
|
|
9656
10078
|
import "@leta-io/icons";
|
|
9657
10079
|
|
|
9658
10080
|
// src/MobileMenuOptions/MobileMenuOptions.tsx
|
|
9659
|
-
import * as
|
|
10081
|
+
import * as React86 from "react";
|
|
9660
10082
|
import { Icon as Icon38 } from "@leta-io/icons";
|
|
9661
|
-
import { Fragment as
|
|
10083
|
+
import { Fragment as Fragment18, jsx as jsx81, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
9662
10084
|
var STYLE_ID27 = "leta-mmo-styles";
|
|
9663
10085
|
var STYLES18 = `
|
|
9664
10086
|
.leta-mmo { cursor: pointer; }
|
|
9665
10087
|
.leta-mmo[aria-disabled="true"] { cursor: not-allowed; }
|
|
9666
10088
|
.leta-mmo:focus-visible { outline: var(--stroke-sm) solid var(--border-secondary-component-focus); outline-offset: 2px; }
|
|
9667
10089
|
`;
|
|
9668
|
-
function
|
|
10090
|
+
function ensureStyles24() {
|
|
9669
10091
|
if (typeof document === "undefined") return;
|
|
9670
10092
|
if (document.getElementById(STYLE_ID27)) return;
|
|
9671
10093
|
const el = document.createElement("style");
|
|
@@ -9707,9 +10129,9 @@ function borderVar3(type, press, active, disabled) {
|
|
|
9707
10129
|
return null;
|
|
9708
10130
|
}
|
|
9709
10131
|
}
|
|
9710
|
-
var MobileMenuOptions = /* @__PURE__ */
|
|
9711
|
-
|
|
9712
|
-
const [press, setPress] =
|
|
10132
|
+
var MobileMenuOptions = /* @__PURE__ */ React86.forwardRef(function MobileMenuOptions2({ type = "combobox", label = "Insert Text", leadingIcon, showLeadingIcon = false, active = false, selected = false, disabled = false, state, onSelect, className, style, role, ...rest }, ref) {
|
|
10133
|
+
ensureStyles24();
|
|
10134
|
+
const [press, setPress] = React86.useState(false);
|
|
9713
10135
|
const isCell = type === "mobile-day-cell";
|
|
9714
10136
|
const isSel = type === "checkbox-selection" || type === "radio-selection";
|
|
9715
10137
|
const forced = state != null;
|
|
@@ -9724,7 +10146,7 @@ var MobileMenuOptions = /* @__PURE__ */ React83.forwardRef(function MobileMenuOp
|
|
|
9724
10146
|
};
|
|
9725
10147
|
let inner;
|
|
9726
10148
|
if (isSel) {
|
|
9727
|
-
inner = /* @__PURE__ */
|
|
10149
|
+
inner = /* @__PURE__ */ jsx81(
|
|
9728
10150
|
SelectionControl,
|
|
9729
10151
|
{
|
|
9730
10152
|
variant: type === "checkbox-selection" ? "checkbox" : "radio",
|
|
@@ -9735,17 +10157,17 @@ var MobileMenuOptions = /* @__PURE__ */ React83.forwardRef(function MobileMenuOp
|
|
|
9735
10157
|
}
|
|
9736
10158
|
);
|
|
9737
10159
|
} else if (isCell) {
|
|
9738
|
-
inner = /* @__PURE__ */
|
|
10160
|
+
inner = /* @__PURE__ */ jsx81("span", { className: "text-label-m-regular", style: { color: textColor }, children: label });
|
|
9739
10161
|
} else {
|
|
9740
|
-
inner = /* @__PURE__ */
|
|
9741
|
-
/* @__PURE__ */
|
|
9742
|
-
showLeadingIcon && /* @__PURE__ */
|
|
9743
|
-
/* @__PURE__ */
|
|
10162
|
+
inner = /* @__PURE__ */ jsxs58(Fragment18, { children: [
|
|
10163
|
+
/* @__PURE__ */ jsxs58("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "var(--spacing-8px)", flex: 1, minWidth: 0 }, children: [
|
|
10164
|
+
showLeadingIcon && /* @__PURE__ */ jsx81("span", { style: { flexShrink: 0, display: "flex", color: "var(--icons-neutral-default)" }, children: /* @__PURE__ */ jsx81(Icon38, { name: leadingIcon ?? "Question", outlined: true, size: 16 }) }),
|
|
10165
|
+
/* @__PURE__ */ jsx81("span", { className: "text-label-m-regular", style: { color: textColor, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: label })
|
|
9744
10166
|
] }),
|
|
9745
|
-
active && !disabled && /* @__PURE__ */
|
|
10167
|
+
active && !disabled && /* @__PURE__ */ jsx81("span", { style: { flexShrink: 0, display: "flex", color: "var(--icons-neutral-default)" }, children: /* @__PURE__ */ jsx81(Icon38, { name: "Check", size: 16 }) })
|
|
9746
10168
|
] });
|
|
9747
10169
|
}
|
|
9748
|
-
return /* @__PURE__ */
|
|
10170
|
+
return /* @__PURE__ */ jsx81(
|
|
9749
10171
|
"div",
|
|
9750
10172
|
{
|
|
9751
10173
|
ref,
|
|
@@ -9884,21 +10306,21 @@ function timeOptions(stepMinutes = 30) {
|
|
|
9884
10306
|
}
|
|
9885
10307
|
|
|
9886
10308
|
// src/DateTimePicker/Calendar.tsx
|
|
9887
|
-
import { jsx as
|
|
10309
|
+
import { jsx as jsx82, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
9888
10310
|
var RANGE_BG = "var(--surface-neutral-bg-muted)";
|
|
9889
|
-
var Calendar = /* @__PURE__ */
|
|
10311
|
+
var Calendar = /* @__PURE__ */ React87.forwardRef(function Calendar2({ year, month, platform = "desktop", selected, rangeStart, rangeEnd, minDate, onSelectDay, onPrevMonth, onNextMonth, onPrevYear, onNextYear, style }, ref) {
|
|
9890
10312
|
const isMobile = platform === "mobile";
|
|
9891
10313
|
const weeks = monthMatrix(year, month);
|
|
9892
10314
|
const minDay = minDate ? stripTime(minDate) : null;
|
|
9893
10315
|
const isPast = (d) => minDay != null && stripTime(d) < minDay;
|
|
9894
|
-
const navBtn = (icon, onClick, label) => isMobile ? /* @__PURE__ */
|
|
9895
|
-
const header = /* @__PURE__ */
|
|
9896
|
-
isMobile ? navBtn("Chevron-Left", onPrevMonth, "Previous month") : /* @__PURE__ */
|
|
10316
|
+
const navBtn = (icon, onClick, label) => isMobile ? /* @__PURE__ */ jsx82(Button, { variant: "secondary", size: "small", platform: "mobile", iconOnly: icon, "aria-label": label ?? icon, onClick }) : /* @__PURE__ */ jsx82(Button, { variant: "secondary", size: "small", iconOnly: icon, "aria-label": label ?? icon, onClick });
|
|
10317
|
+
const header = /* @__PURE__ */ jsxs59("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "space-between", gap: "var(--spacing-8px)", width: "100%" }, children: [
|
|
10318
|
+
isMobile ? navBtn("Chevron-Left", onPrevMonth, "Previous month") : /* @__PURE__ */ jsxs59("div", { style: { display: "flex", gap: "var(--spacing-8px)" }, children: [
|
|
9897
10319
|
navBtn("Backward", onPrevYear, "Previous year"),
|
|
9898
10320
|
navBtn("Chevron-Left", onPrevMonth, "Previous month")
|
|
9899
10321
|
] }),
|
|
9900
|
-
/* @__PURE__ */
|
|
9901
|
-
isMobile ? navBtn("Chevron-Right", onNextMonth, "Next month") : /* @__PURE__ */
|
|
10322
|
+
/* @__PURE__ */ jsx82("span", { className: "text-label-l-semibold", style: { color: "var(--text-default-heading)", whiteSpace: "nowrap" }, children: formatMonthYear(year, month, !isMobile) }),
|
|
10323
|
+
isMobile ? navBtn("Chevron-Right", onNextMonth, "Next month") : /* @__PURE__ */ jsxs59("div", { style: { display: "flex", gap: "var(--spacing-8px)" }, children: [
|
|
9902
10324
|
navBtn("Chevron-Right", onNextMonth, "Next month"),
|
|
9903
10325
|
navBtn("Forward", onNextYear, "Next year")
|
|
9904
10326
|
] })
|
|
@@ -9906,7 +10328,7 @@ var Calendar = /* @__PURE__ */ React84.forwardRef(function Calendar2({ year, mon
|
|
|
9906
10328
|
const CELL2 = 32;
|
|
9907
10329
|
const ROW = { display: "flex", flexDirection: "row", gap: "var(--spacing-8px)", alignItems: "center" };
|
|
9908
10330
|
const mobileCol = { flex: 1, minWidth: 0, display: "flex", alignItems: "center", justifyContent: "center" };
|
|
9909
|
-
const weekdayRow = isMobile ? /* @__PURE__ */
|
|
10331
|
+
const weekdayRow = isMobile ? /* @__PURE__ */ jsx82("div", { style: { display: "flex", width: "100%" }, children: WEEKDAYS.map((d) => /* @__PURE__ */ jsx82("div", { style: mobileCol, children: /* @__PURE__ */ jsx82("span", { className: "text-label-s-regular", style: { color: "var(--text-default-sub-body)" }, children: d }) }, d)) }) : /* @__PURE__ */ jsx82("div", { style: { ...ROW, padding: "var(--padding-8px) 0" }, children: WEEKDAYS.map((d) => /* @__PURE__ */ jsx82("span", { className: "text-label-s-regular", style: { width: CELL2, flexShrink: 0, textAlign: "center", color: "var(--text-default-sub-body)" }, children: d }, d)) });
|
|
9910
10332
|
const isActive = (d) => isSameDay(d, selected) || isSameDay(d, rangeStart) || isSameDay(d, rangeEnd);
|
|
9911
10333
|
const stripped = (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate()).getTime();
|
|
9912
10334
|
const lo = rangeStart && rangeEnd ? Math.min(stripped(rangeStart), stripped(rangeEnd)) : null;
|
|
@@ -9915,12 +10337,12 @@ var Calendar = /* @__PURE__ */ React84.forwardRef(function Calendar2({ year, mon
|
|
|
9915
10337
|
const dayCell = (date, inMonth) => {
|
|
9916
10338
|
const day = date.getDate();
|
|
9917
10339
|
if (!inMonth) {
|
|
9918
|
-
return /* @__PURE__ */
|
|
10340
|
+
return /* @__PURE__ */ jsx82("span", { "aria-hidden": "true", style: { width: CELL2, height: CELL2, flexShrink: 0 } });
|
|
9919
10341
|
}
|
|
9920
10342
|
const disabled = isPast(date);
|
|
9921
|
-
return isMobile ? /* @__PURE__ */
|
|
10343
|
+
return isMobile ? /* @__PURE__ */ jsx82(MobileMenuOptions, { type: "mobile-day-cell", label: String(day), active: isActive(date), disabled, onSelect: () => onSelectDay?.(date) }) : /* @__PURE__ */ jsx82(DesktopMenuOptions, { type: "day-cell", label: String(day), active: isActive(date), disabled, onSelect: () => onSelectDay?.(date) });
|
|
9922
10344
|
};
|
|
9923
|
-
const middleCell = (date) => /* @__PURE__ */
|
|
10345
|
+
const middleCell = (date) => /* @__PURE__ */ jsx82(
|
|
9924
10346
|
"button",
|
|
9925
10347
|
{
|
|
9926
10348
|
type: "button",
|
|
@@ -9930,13 +10352,13 @@ var Calendar = /* @__PURE__ */ React84.forwardRef(function Calendar2({ year, mon
|
|
|
9930
10352
|
children: date.getDate()
|
|
9931
10353
|
}
|
|
9932
10354
|
);
|
|
9933
|
-
const renderWeekMobile = (week, wi) => /* @__PURE__ */
|
|
10355
|
+
const renderWeekMobile = (week, wi) => /* @__PURE__ */ jsx82("div", { style: { display: "flex", width: "100%" }, children: week.map((cell, j) => {
|
|
9934
10356
|
const inR = cell.inMonth && inRangeIncl(cell.date);
|
|
9935
10357
|
const isStart = isSameDay(cell.date, rangeStart);
|
|
9936
10358
|
const isEnd = isSameDay(cell.date, rangeEnd);
|
|
9937
10359
|
const single = isStart && isEnd;
|
|
9938
|
-
return /* @__PURE__ */
|
|
9939
|
-
inR && !single && /* @__PURE__ */
|
|
10360
|
+
return /* @__PURE__ */ jsxs59("div", { style: { ...mobileCol, position: "relative" }, children: [
|
|
10361
|
+
inR && !single && /* @__PURE__ */ jsx82("div", { style: {
|
|
9940
10362
|
position: "absolute",
|
|
9941
10363
|
top: 0,
|
|
9942
10364
|
bottom: 0,
|
|
@@ -9948,7 +10370,7 @@ var Calendar = /* @__PURE__ */ React84.forwardRef(function Calendar2({ year, mon
|
|
|
9948
10370
|
borderTopRightRadius: isEnd ? 8 : 0,
|
|
9949
10371
|
borderBottomRightRadius: isEnd ? 8 : 0
|
|
9950
10372
|
} }),
|
|
9951
|
-
/* @__PURE__ */
|
|
10373
|
+
/* @__PURE__ */ jsx82("div", { style: { position: "relative" }, children: inR && !isStart && !isEnd ? middleCell(cell.date) : dayCell(cell.date, cell.inMonth) })
|
|
9952
10374
|
] }, j);
|
|
9953
10375
|
}) }, wi);
|
|
9954
10376
|
const renderWeek = (week, wi) => {
|
|
@@ -9958,7 +10380,7 @@ var Calendar = /* @__PURE__ */ React84.forwardRef(function Calendar2({ year, mon
|
|
|
9958
10380
|
while (i < week.length) {
|
|
9959
10381
|
const cell = week[i];
|
|
9960
10382
|
if (!(cell.inMonth && inRangeIncl(cell.date))) {
|
|
9961
|
-
items.push(/* @__PURE__ */
|
|
10383
|
+
items.push(/* @__PURE__ */ jsx82(React87.Fragment, { children: dayCell(cell.date, cell.inMonth) }, i));
|
|
9962
10384
|
i++;
|
|
9963
10385
|
continue;
|
|
9964
10386
|
}
|
|
@@ -9969,23 +10391,23 @@ var Calendar = /* @__PURE__ */ React84.forwardRef(function Calendar2({ year, mon
|
|
|
9969
10391
|
}
|
|
9970
10392
|
const containsEndpoint = seg.some((c) => isSameDay(c.date, rangeStart) || isSameDay(c.date, rangeEnd));
|
|
9971
10393
|
items.push(
|
|
9972
|
-
/* @__PURE__ */
|
|
10394
|
+
/* @__PURE__ */ jsx82("div", { style: { display: "flex", flexDirection: "row", flexShrink: 0, gap: "var(--spacing-8px)", backgroundColor: RANGE_BG, borderRadius: containsEndpoint ? 8 : 0 }, children: seg.map((c, j) => {
|
|
9973
10395
|
const ep = isSameDay(c.date, rangeStart) || isSameDay(c.date, rangeEnd);
|
|
9974
|
-
return /* @__PURE__ */
|
|
10396
|
+
return /* @__PURE__ */ jsx82(React87.Fragment, { children: ep ? dayCell(c.date, true) : middleCell(c.date) }, j);
|
|
9975
10397
|
}) }, `band-${i}`)
|
|
9976
10398
|
);
|
|
9977
10399
|
}
|
|
9978
|
-
return /* @__PURE__ */
|
|
10400
|
+
return /* @__PURE__ */ jsx82("div", { style: ROW, children: items }, wi);
|
|
9979
10401
|
};
|
|
9980
|
-
return /* @__PURE__ */
|
|
10402
|
+
return /* @__PURE__ */ jsxs59("div", { ref, style: { display: "flex", flexDirection: "column", gap: isMobile ? "var(--spacing-16px)" : "var(--spacing-8px)", width: "100%", boxSizing: "border-box", ...style }, children: [
|
|
9981
10403
|
header,
|
|
9982
10404
|
weekdayRow,
|
|
9983
|
-
/* @__PURE__ */
|
|
10405
|
+
/* @__PURE__ */ jsx82("div", { style: { display: "flex", flexDirection: "column", gap: isMobile ? "var(--spacing-12px)" : "var(--spacing-8px)" }, children: weeks.map((week, wi) => renderWeek(week, wi)) })
|
|
9984
10406
|
] });
|
|
9985
10407
|
});
|
|
9986
10408
|
|
|
9987
10409
|
// src/DateTimePicker/DateTimePicker.tsx
|
|
9988
|
-
import { Fragment as
|
|
10410
|
+
import { Fragment as Fragment20, jsx as jsx83, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
9989
10411
|
var RANGE_PRESETS = ["Today", "Yesterday", "Last 7 Days", "Last 30 Days", "Custom"];
|
|
9990
10412
|
function startOfToday() {
|
|
9991
10413
|
const d = /* @__PURE__ */ new Date();
|
|
@@ -10034,7 +10456,7 @@ function ensureDateTimePickerStyles() {
|
|
|
10034
10456
|
el.textContent = DTP_CSS;
|
|
10035
10457
|
document.head.appendChild(el);
|
|
10036
10458
|
}
|
|
10037
|
-
var Demarcator = ({ vertical }) => vertical ? /* @__PURE__ */
|
|
10459
|
+
var Demarcator = ({ vertical }) => vertical ? /* @__PURE__ */ jsx83("div", { style: { width: "var(--stroke-xs)", alignSelf: "stretch", backgroundColor: "var(--border-neutral-default)", flexShrink: 0 } }) : /* @__PURE__ */ jsx83("div", { style: { height: "var(--stroke-xs)", width: "100%", backgroundColor: "var(--border-neutral-default)" } });
|
|
10038
10460
|
function nearestTimeOption(d, step) {
|
|
10039
10461
|
const total = d.getHours() * 60 + d.getMinutes();
|
|
10040
10462
|
const snapped = Math.min(Math.round(total / step) * step, 24 * 60 - step);
|
|
@@ -10050,14 +10472,14 @@ var WHEEL_PERIODS = ["AM", "PM"];
|
|
|
10050
10472
|
var WHEEL_H = 151;
|
|
10051
10473
|
var WHEEL_ROW = 40;
|
|
10052
10474
|
function WheelColumn({ values, value, onChange }) {
|
|
10053
|
-
const ref =
|
|
10475
|
+
const ref = React88.useRef(null);
|
|
10054
10476
|
const idx = Math.max(0, values.indexOf(value));
|
|
10055
|
-
|
|
10477
|
+
React88.useEffect(() => {
|
|
10056
10478
|
if (ref.current) ref.current.scrollTop = idx * WHEEL_ROW;
|
|
10057
10479
|
}, [idx]);
|
|
10058
|
-
return /* @__PURE__ */
|
|
10059
|
-
/* @__PURE__ */
|
|
10060
|
-
/* @__PURE__ */
|
|
10480
|
+
return /* @__PURE__ */ jsxs60("div", { style: { position: "relative", flex: 1, minWidth: 0, height: WHEEL_H, overflow: "hidden" }, children: [
|
|
10481
|
+
/* @__PURE__ */ jsx83("div", { style: { position: "absolute", left: 8, right: 8, top: "50%", transform: "translateY(-50%)", height: WHEEL_ROW, border: "var(--stroke-xs) solid var(--border-neutral-default)", borderRadius: "var(--rounding-lg)", pointerEvents: "none" } }),
|
|
10482
|
+
/* @__PURE__ */ jsx83("div", { ref, style: { height: "100%", overflowY: "auto", overscrollBehavior: "none", scrollSnapType: "y mandatory", padding: `${(WHEEL_H - WHEEL_ROW) / 2}px 0` }, children: values.map((v) => /* @__PURE__ */ jsx83(
|
|
10061
10483
|
"button",
|
|
10062
10484
|
{
|
|
10063
10485
|
type: "button",
|
|
@@ -10070,34 +10492,34 @@ function WheelColumn({ values, value, onChange }) {
|
|
|
10070
10492
|
)) })
|
|
10071
10493
|
] });
|
|
10072
10494
|
}
|
|
10073
|
-
var DateTimePicker = /* @__PURE__ */
|
|
10495
|
+
var DateTimePicker = /* @__PURE__ */ React88.forwardRef(function DateTimePicker2({ type = "simple", platform = "desktop", defaultMonth, defaultDate, defaultRange, defaultPreset, minDate, title = "Select Date", subtitle = "Pick a date", onApply, onCancel, style, ...rest }, ref) {
|
|
10074
10496
|
ensureDateTimePickerStyles();
|
|
10075
10497
|
const isMobile = platform === "mobile";
|
|
10076
10498
|
const TIME_STEP = 30;
|
|
10077
10499
|
const seedTime = defaultDate && type === "date-time" ? nearestTimeOption(defaultDate, TIME_STEP) : null;
|
|
10078
10500
|
const seedMonthFrom = defaultRange?.start ?? defaultRange?.end ?? defaultDate ?? null;
|
|
10079
10501
|
const init = defaultMonth ?? (seedMonthFrom ? { year: seedMonthFrom.getFullYear(), month: seedMonthFrom.getMonth() } : { year: (/* @__PURE__ */ new Date()).getFullYear(), month: (/* @__PURE__ */ new Date()).getMonth() });
|
|
10080
|
-
const [view, setView] =
|
|
10081
|
-
const [selected, setSelected] =
|
|
10082
|
-
const [range, setRange] =
|
|
10502
|
+
const [view, setView] = React88.useState(init);
|
|
10503
|
+
const [selected, setSelected] = React88.useState(defaultDate ?? null);
|
|
10504
|
+
const [range, setRange] = React88.useState({
|
|
10083
10505
|
start: defaultRange?.start ?? null,
|
|
10084
10506
|
end: defaultRange?.end ?? null
|
|
10085
10507
|
});
|
|
10086
|
-
const [preset, setPreset] =
|
|
10508
|
+
const [preset, setPreset] = React88.useState(
|
|
10087
10509
|
RANGE_PRESETS.includes(defaultPreset ?? "") ? defaultPreset : "Custom"
|
|
10088
10510
|
);
|
|
10089
|
-
const [time, setTime] =
|
|
10511
|
+
const [time, setTime] = React88.useState(seedTime);
|
|
10090
10512
|
const seedWheel = seedTime ? /^(\d{2}):(\d{2}) (AM|PM)$/.exec(seedTime) : null;
|
|
10091
|
-
const [tH, setTH] =
|
|
10092
|
-
const [tM, setTM] =
|
|
10093
|
-
const [tPer, setTPer] =
|
|
10513
|
+
const [tH, setTH] = React88.useState(seedWheel ? String(Number(seedWheel[1])) : "1");
|
|
10514
|
+
const [tM, setTM] = React88.useState(seedWheel ? seedWheel[2] : "00");
|
|
10515
|
+
const [tPer, setTPer] = React88.useState(seedWheel ? seedWheel[3] : "AM");
|
|
10094
10516
|
const composeTime = (h, m, p) => `${h}:${m} ${p}`;
|
|
10095
|
-
const [startText, setStartText] =
|
|
10096
|
-
const [endText, setEndText] =
|
|
10097
|
-
|
|
10517
|
+
const [startText, setStartText] = React88.useState("");
|
|
10518
|
+
const [endText, setEndText] = React88.useState("");
|
|
10519
|
+
React88.useEffect(() => {
|
|
10098
10520
|
setStartText(fmt(range.start));
|
|
10099
10521
|
}, [range.start]);
|
|
10100
|
-
|
|
10522
|
+
React88.useEffect(() => {
|
|
10101
10523
|
setEndText(fmt(range.end));
|
|
10102
10524
|
}, [range.end]);
|
|
10103
10525
|
const commitStart = () => {
|
|
@@ -10157,20 +10579,20 @@ var DateTimePicker = /* @__PURE__ */ React85.forwardRef(function DateTimePicker2
|
|
|
10157
10579
|
const daysCount = diffDaysInclusive(range.start, range.end);
|
|
10158
10580
|
const hasRange = !!(range.start && range.end);
|
|
10159
10581
|
const formatDateTime = (d, t) => `${MONTHS_ABBR[d.getMonth()]} ${d.getDate()} ${d.getFullYear()}, ${t}`;
|
|
10160
|
-
const cardFooter = (message, bannerIcon, applyEnabled, onClear) => /* @__PURE__ */
|
|
10582
|
+
const cardFooter = (message, bannerIcon, applyEnabled, onClear) => /* @__PURE__ */ jsx83("div", { style: { boxShadow: "inset 0 var(--stroke-xs) 0 var(--border-neutral-default)", padding: "var(--padding-16px)" }, children: /* @__PURE__ */ jsxs60(
|
|
10161
10583
|
FooterFrame,
|
|
10162
10584
|
{
|
|
10163
10585
|
variant: "card",
|
|
10164
|
-
leading: /* @__PURE__ */
|
|
10586
|
+
leading: /* @__PURE__ */ jsx83(NotificationBanner, { type: "neutral", variant: "subtle", icon: bannerIcon, description: message, showContentButtons: false }),
|
|
10165
10587
|
children: [
|
|
10166
|
-
/* @__PURE__ */
|
|
10167
|
-
/* @__PURE__ */
|
|
10588
|
+
/* @__PURE__ */ jsx83(Button, { variant: "secondary", size: "medium", onClick: onClear, children: "Clear" }),
|
|
10589
|
+
/* @__PURE__ */ jsx83(Button, { variant: "primary", size: "medium", disabled: !applyEnabled, onClick: () => onApply?.({ date: selected, start: range.start, end: range.end, time, preset, explicit: true }), children: "Apply" })
|
|
10168
10590
|
]
|
|
10169
10591
|
}
|
|
10170
10592
|
) });
|
|
10171
10593
|
const minTimeMinutes = minDate && selected && isSameDay(selected, minDate) ? minDate.getHours() * 60 + minDate.getMinutes() : null;
|
|
10172
|
-
const times =
|
|
10173
|
-
const timeDisabled =
|
|
10594
|
+
const times = React88.useMemo(() => timeOptions(TIME_STEP), []);
|
|
10595
|
+
const timeDisabled = React88.useCallback(
|
|
10174
10596
|
(t) => {
|
|
10175
10597
|
if (minTimeMinutes == null) return false;
|
|
10176
10598
|
const { h, m } = parseTimeOption(t);
|
|
@@ -10178,15 +10600,15 @@ var DateTimePicker = /* @__PURE__ */ React85.forwardRef(function DateTimePicker2
|
|
|
10178
10600
|
},
|
|
10179
10601
|
[minTimeMinutes]
|
|
10180
10602
|
);
|
|
10181
|
-
const firstEnabledIdx =
|
|
10603
|
+
const firstEnabledIdx = React88.useMemo(() => {
|
|
10182
10604
|
if (minTimeMinutes == null) return 0;
|
|
10183
10605
|
const i = times.findIndex((t) => !timeDisabled(t));
|
|
10184
10606
|
return i < 0 ? 0 : i;
|
|
10185
10607
|
}, [times, minTimeMinutes, timeDisabled]);
|
|
10186
|
-
const timeListRef =
|
|
10187
|
-
const didPlaceTimeList =
|
|
10188
|
-
const seedTimeIdx =
|
|
10189
|
-
|
|
10608
|
+
const timeListRef = React88.useRef(null);
|
|
10609
|
+
const didPlaceTimeList = React88.useRef(false);
|
|
10610
|
+
const seedTimeIdx = React88.useMemo(() => seedTime ? times.indexOf(seedTime) : -1, [times, seedTime]);
|
|
10611
|
+
React88.useLayoutEffect(() => {
|
|
10190
10612
|
const el = timeListRef.current;
|
|
10191
10613
|
if (!el) return;
|
|
10192
10614
|
const idx = !didPlaceTimeList.current && seedTimeIdx > 0 ? seedTimeIdx : firstEnabledIdx;
|
|
@@ -10204,9 +10626,9 @@ var DateTimePicker = /* @__PURE__ */ React85.forwardRef(function DateTimePicker2
|
|
|
10204
10626
|
}
|
|
10205
10627
|
return animateScrollTop(el, target);
|
|
10206
10628
|
}, [firstEnabledIdx, seedTimeIdx]);
|
|
10207
|
-
const timeColumn = /* @__PURE__ */
|
|
10208
|
-
/* @__PURE__ */
|
|
10209
|
-
/* @__PURE__ */
|
|
10629
|
+
const timeColumn = /* @__PURE__ */ jsxs60("div", { style: { display: "flex", flexDirection: "column", gap: "var(--spacing-8px)", flex: 1, minWidth: 0, alignSelf: "stretch", minHeight: 0 }, children: [
|
|
10630
|
+
/* @__PURE__ */ jsx83("span", { className: "text-label-l-semibold", style: { color: "var(--text-default-heading)", textAlign: "center", whiteSpace: "nowrap" }, children: "Time of Day" }),
|
|
10631
|
+
/* @__PURE__ */ jsx83("div", { style: { position: "relative", flex: 1, minHeight: 0 }, children: /* @__PURE__ */ jsx83("div", { ref: timeListRef, className: "leta-dtp-noscrollbar", style: { position: "absolute", inset: 0, margin: "-4px -4px 0", boxSizing: "border-box", padding: "4px 4px 0", scrollPaddingBlock: 4, display: "flex", flexDirection: "column", gap: "var(--spacing-8px)", overflowY: "auto", overscrollBehavior: "contain" }, children: times.map((t) => /* @__PURE__ */ jsx83(DesktopMenuOptions, { type: "time-picker", label: t, active: time === t, disabled: timeDisabled(t), onSelect: () => setTime(t), style: { width: "100%" } }, t)) }) })
|
|
10210
10632
|
] });
|
|
10211
10633
|
const cardBase = {
|
|
10212
10634
|
boxSizing: "border-box",
|
|
@@ -10215,7 +10637,7 @@ var DateTimePicker = /* @__PURE__ */ React85.forwardRef(function DateTimePicker2
|
|
|
10215
10637
|
flexDirection: "column"
|
|
10216
10638
|
};
|
|
10217
10639
|
if (isMobile) {
|
|
10218
|
-
const calendar = /* @__PURE__ */
|
|
10640
|
+
const calendar = /* @__PURE__ */ jsx83(
|
|
10219
10641
|
Calendar,
|
|
10220
10642
|
{
|
|
10221
10643
|
platform: "mobile",
|
|
@@ -10231,67 +10653,67 @@ var DateTimePicker = /* @__PURE__ */ React85.forwardRef(function DateTimePicker2
|
|
|
10231
10653
|
}
|
|
10232
10654
|
);
|
|
10233
10655
|
const mobileHeight = { simple: 500, "date-range": 568, "date-time": 632 }[type];
|
|
10234
|
-
const sectionHeading = (t) => /* @__PURE__ */
|
|
10235
|
-
return /* @__PURE__ */
|
|
10236
|
-
/* @__PURE__ */
|
|
10237
|
-
/* @__PURE__ */
|
|
10238
|
-
/* @__PURE__ */
|
|
10239
|
-
subtitle ? /* @__PURE__ */
|
|
10656
|
+
const sectionHeading = (t) => /* @__PURE__ */ jsx83("span", { className: "text-label-l-semibold", style: { color: "var(--text-default-heading)" }, children: t });
|
|
10657
|
+
return /* @__PURE__ */ jsxs60("div", { ref, style: { ...cardBase, width: 360, height: mobileHeight, borderRadius: "var(--rounding-xxl)", overflow: "hidden", border: "var(--stroke-xs) solid var(--border-neutral-default)", ...style }, ...rest, children: [
|
|
10658
|
+
/* @__PURE__ */ jsxs60("div", { style: { flexShrink: 0, display: "flex", flexDirection: "row", alignItems: "center", gap: "var(--spacing-8px)", padding: "var(--padding-24px) var(--padding-16px) var(--padding-16px)", borderBottom: "var(--stroke-xs) solid var(--border-neutral-default)" }, children: [
|
|
10659
|
+
/* @__PURE__ */ jsxs60("div", { style: { display: "flex", flexDirection: "column", gap: "var(--spacing-4px)", flex: 1, minWidth: 0 }, children: [
|
|
10660
|
+
/* @__PURE__ */ jsx83("span", { className: "text-heading-s-semibold", style: { color: "var(--text-default-heading)" }, children: title }),
|
|
10661
|
+
subtitle ? /* @__PURE__ */ jsx83("span", { className: "text-body-m-regular", style: { color: "var(--text-default-sub-body)" }, children: subtitle }) : null
|
|
10240
10662
|
] }),
|
|
10241
|
-
/* @__PURE__ */
|
|
10663
|
+
/* @__PURE__ */ jsx83("button", { type: "button", "aria-label": "Close", onClick: onCancel, style: { flexShrink: 0, width: 40, height: 40, display: "flex", alignItems: "center", justifyContent: "center", borderRadius: "var(--rounding-round)", border: "none", background: "var(--surface-neutral-bg-muted)", cursor: "pointer", padding: 0 }, children: /* @__PURE__ */ jsx83(Icon40, { name: "Cancel", size: 16, style: { color: "var(--icons-neutral-default)" } }) })
|
|
10242
10664
|
] }),
|
|
10243
|
-
/* @__PURE__ */
|
|
10244
|
-
type === "date-range" && /* @__PURE__ */
|
|
10665
|
+
/* @__PURE__ */ jsxs60("div", { style: { flex: 1, minHeight: 0, overflowY: "auto", overscrollBehavior: "contain", display: "flex", flexDirection: "column", gap: "var(--spacing-20px)", padding: "var(--padding-16px) var(--padding-16px) var(--padding-40px)" }, children: [
|
|
10666
|
+
type === "date-range" && /* @__PURE__ */ jsx83(
|
|
10245
10667
|
GroupedInput,
|
|
10246
10668
|
{
|
|
10247
10669
|
variant: "range-input",
|
|
10248
|
-
from: /* @__PURE__ */
|
|
10249
|
-
to: /* @__PURE__ */
|
|
10670
|
+
from: /* @__PURE__ */ jsx83(InputField, { placeholder: "dd/mm/yyyy", showLabel: false, showHelper: false, ...editableField(startText, setStartText, commitStart), style: { width: "100%" } }),
|
|
10671
|
+
to: /* @__PURE__ */ jsx83(InputField, { placeholder: "dd/mm/yyyy", showLabel: false, showHelper: false, ...editableField(endText, setEndText, commitEnd), style: { width: "100%" } })
|
|
10250
10672
|
}
|
|
10251
10673
|
),
|
|
10252
10674
|
type === "date-time" && sectionHeading("Date"),
|
|
10253
10675
|
calendar,
|
|
10254
|
-
type === "date-time" && /* @__PURE__ */
|
|
10255
|
-
/* @__PURE__ */
|
|
10676
|
+
type === "date-time" && /* @__PURE__ */ jsxs60(Fragment20, { children: [
|
|
10677
|
+
/* @__PURE__ */ jsx83(Demarcator, {}),
|
|
10256
10678
|
sectionHeading("Time"),
|
|
10257
|
-
/* @__PURE__ */
|
|
10258
|
-
/* @__PURE__ */
|
|
10679
|
+
/* @__PURE__ */ jsxs60("div", { style: { display: "flex", gap: "var(--spacing-8px)" }, children: [
|
|
10680
|
+
/* @__PURE__ */ jsx83(WheelColumn, { values: WHEEL_HOURS, value: tH, onChange: (v) => {
|
|
10259
10681
|
setTH(v);
|
|
10260
10682
|
setTime(composeTime(v, tM, tPer));
|
|
10261
10683
|
} }),
|
|
10262
|
-
/* @__PURE__ */
|
|
10684
|
+
/* @__PURE__ */ jsx83(WheelColumn, { values: WHEEL_MINUTES, value: tM, onChange: (v) => {
|
|
10263
10685
|
setTM(v);
|
|
10264
10686
|
setTime(composeTime(tH, v, tPer));
|
|
10265
10687
|
} }),
|
|
10266
|
-
/* @__PURE__ */
|
|
10688
|
+
/* @__PURE__ */ jsx83(WheelColumn, { values: WHEEL_PERIODS, value: tPer, onChange: (v) => {
|
|
10267
10689
|
setTPer(v);
|
|
10268
10690
|
setTime(composeTime(tH, tM, v));
|
|
10269
10691
|
} })
|
|
10270
10692
|
] })
|
|
10271
10693
|
] })
|
|
10272
10694
|
] }),
|
|
10273
|
-
/* @__PURE__ */
|
|
10274
|
-
/* @__PURE__ */
|
|
10275
|
-
type !== "simple" && /* @__PURE__ */
|
|
10695
|
+
/* @__PURE__ */ jsxs60("div", { style: { flexShrink: 0, display: "flex", flexDirection: "column", gap: "var(--spacing-20px)", padding: "var(--padding-16px) var(--padding-16px) 0", borderTop: "var(--stroke-xs) solid var(--border-neutral-default)" }, children: [
|
|
10696
|
+
/* @__PURE__ */ jsxs60("div", { style: { display: "flex", gap: "var(--spacing-16px)" }, children: [
|
|
10697
|
+
type !== "simple" && /* @__PURE__ */ jsx83(Button, { variant: "secondary", size: "medium", style: { flex: 1, borderRadius: "var(--rounding-round)" }, onClick: () => {
|
|
10276
10698
|
setSelected(null);
|
|
10277
10699
|
setRange({ start: null, end: null });
|
|
10278
10700
|
setTime(null);
|
|
10279
10701
|
}, children: "Clear" }),
|
|
10280
|
-
/* @__PURE__ */
|
|
10702
|
+
/* @__PURE__ */ jsx83(Button, { variant: "primary", size: "medium", style: { flex: 1, borderRadius: "var(--rounding-round)" }, disabled: type === "date-range" ? !hasRange : type === "date-time" ? !(selected && time) : !selected, onClick: () => onApply?.({ date: selected, start: range.start, end: range.end, time }), children: "Apply" })
|
|
10281
10703
|
] }),
|
|
10282
|
-
/* @__PURE__ */
|
|
10704
|
+
/* @__PURE__ */ jsx83("div", { style: { height: 24, display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 }, children: /* @__PURE__ */ jsx83("div", { style: { width: 108, height: 4, borderRadius: "var(--rounding-round)", backgroundColor: "var(--icons-neutral-default)" } }) })
|
|
10283
10705
|
] })
|
|
10284
10706
|
] });
|
|
10285
10707
|
}
|
|
10286
10708
|
const desktopCard = { ...cardBase, borderRadius: "var(--rounding-xxl)", overflow: "hidden", boxShadow: "0 0 0 var(--stroke-xs) var(--border-neutral-default), var(--shadow-neutral-3)", ...style };
|
|
10287
10709
|
if (type === "simple") {
|
|
10288
|
-
return /* @__PURE__ */
|
|
10710
|
+
return /* @__PURE__ */ jsx83("div", { ref, style: { ...desktopCard, width: 304 }, ...rest, children: /* @__PURE__ */ jsx83("div", { style: { padding: "var(--padding-16px)" }, children: /* @__PURE__ */ jsx83(Calendar, { year: view.year, month: view.month, selected, minDate, onSelectDay: setSelected, onPrevMonth: prevMonth, onNextMonth: nextMonth, onPrevYear: prevYear, onNextYear: nextYear }) }) });
|
|
10289
10711
|
}
|
|
10290
10712
|
if (type === "date-time") {
|
|
10291
|
-
return /* @__PURE__ */
|
|
10292
|
-
/* @__PURE__ */
|
|
10293
|
-
/* @__PURE__ */
|
|
10294
|
-
/* @__PURE__ */
|
|
10713
|
+
return /* @__PURE__ */ jsxs60("div", { ref, style: { ...desktopCard, width: 418 }, ...rest, children: [
|
|
10714
|
+
/* @__PURE__ */ jsxs60("div", { style: { display: "flex", flexDirection: "row", gap: "var(--spacing-12px)", minHeight: 304, boxSizing: "border-box", padding: "var(--padding-16px) var(--padding-16px) 0" }, children: [
|
|
10715
|
+
/* @__PURE__ */ jsx83("div", { style: { width: 272, flexShrink: 0, paddingBottom: "var(--padding-16px)" }, children: /* @__PURE__ */ jsx83(Calendar, { year: view.year, month: view.month, selected, minDate, onSelectDay: setSelected, onPrevMonth: prevMonth, onNextMonth: nextMonth, onPrevYear: prevYear, onNextYear: nextYear }) }),
|
|
10716
|
+
/* @__PURE__ */ jsx83(Demarcator, { vertical: true }),
|
|
10295
10717
|
timeColumn
|
|
10296
10718
|
] }),
|
|
10297
10719
|
cardFooter(selected && time ? formatDateTime(selected, time) : "Select date & time", selected && time ? "Calendar" : void 0, !!(selected && time), () => {
|
|
@@ -10301,17 +10723,17 @@ var DateTimePicker = /* @__PURE__ */ React85.forwardRef(function DateTimePicker2
|
|
|
10301
10723
|
] });
|
|
10302
10724
|
}
|
|
10303
10725
|
const isCustom = preset === "Custom";
|
|
10304
|
-
const rangeCalendars = /* @__PURE__ */
|
|
10305
|
-
/* @__PURE__ */
|
|
10306
|
-
/* @__PURE__ */
|
|
10307
|
-
/* @__PURE__ */
|
|
10726
|
+
const rangeCalendars = /* @__PURE__ */ jsxs60("div", { style: { display: "flex", flexDirection: "row", gap: "var(--spacing-12px)", padding: isCustom ? "0 var(--padding-16px) var(--padding-16px)" : "var(--padding-16px)" }, children: [
|
|
10727
|
+
/* @__PURE__ */ jsx83("div", { style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ jsx83(Calendar, { year: view.year, month: view.month, rangeStart: range.start, rangeEnd: range.end, minDate, onSelectDay: pickRangeDay, onPrevMonth: prevMonth, onNextMonth: nextMonth, onPrevYear: prevYear, onNextYear: nextYear }) }),
|
|
10728
|
+
/* @__PURE__ */ jsx83(Demarcator, { vertical: true }),
|
|
10729
|
+
/* @__PURE__ */ jsx83("div", { style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ jsx83(Calendar, { year: next.year, month: next.month, rangeStart: range.start, rangeEnd: range.end, minDate, onSelectDay: pickRangeDay, onPrevMonth: prevMonth, onNextMonth: nextMonth, onPrevYear: prevYear, onNextYear: nextYear }) })
|
|
10308
10730
|
] });
|
|
10309
|
-
return /* @__PURE__ */
|
|
10310
|
-
/* @__PURE__ */
|
|
10311
|
-
/* @__PURE__ */
|
|
10312
|
-
isCustom && /* @__PURE__ */
|
|
10313
|
-
/* @__PURE__ */
|
|
10314
|
-
/* @__PURE__ */
|
|
10731
|
+
return /* @__PURE__ */ jsx83("div", { ref, style: { ...desktopCard, width: 764 }, ...rest, children: /* @__PURE__ */ jsxs60("div", { style: { display: "flex", flexDirection: "row", alignItems: "stretch" }, children: [
|
|
10732
|
+
/* @__PURE__ */ jsx83("div", { style: { display: "flex", flexDirection: "column", gap: "var(--spacing-8px)", padding: "var(--padding-8px)", width: 164, flexShrink: 0, borderRight: "var(--stroke-xs) solid var(--border-neutral-default)" }, children: RANGE_PRESETS.map((p) => /* @__PURE__ */ jsx83(DesktopMenuOptions, { type: "combobox", label: p, active: preset === p, onSelect: () => applyPreset(p), style: { width: "100%" } }, p)) }),
|
|
10733
|
+
/* @__PURE__ */ jsxs60("div", { style: { display: "flex", flexDirection: "column", flex: 1, minWidth: 0 }, children: [
|
|
10734
|
+
isCustom && /* @__PURE__ */ jsxs60("div", { style: { display: "flex", flexDirection: "row", gap: "var(--spacing-16px)", padding: "var(--padding-16px)" }, children: [
|
|
10735
|
+
/* @__PURE__ */ jsx83("div", { style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ jsx83(InputField, { label: "Start", placeholder: "dd/mm/yyyy", showHelper: false, ...editableField(startText, setStartText, commitStart), style: { width: "100%" } }) }),
|
|
10736
|
+
/* @__PURE__ */ jsx83("div", { style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ jsx83(InputField, { label: "End", placeholder: "dd/mm/yyyy", showHelper: false, ...editableField(endText, setEndText, commitEnd), style: { width: "100%" } }) })
|
|
10315
10737
|
] }),
|
|
10316
10738
|
rangeCalendars,
|
|
10317
10739
|
isCustom && cardFooter(`${daysCount} day${daysCount === 1 ? "" : "s"} selected`, "Calendar", hasRange, () => {
|
|
@@ -10323,7 +10745,7 @@ var DateTimePicker = /* @__PURE__ */ React85.forwardRef(function DateTimePicker2
|
|
|
10323
10745
|
});
|
|
10324
10746
|
|
|
10325
10747
|
// src/TextArea/TextArea.tsx
|
|
10326
|
-
import * as
|
|
10748
|
+
import * as React89 from "react";
|
|
10327
10749
|
import { Icon as Icon41 } from "@leta-io/icons";
|
|
10328
10750
|
|
|
10329
10751
|
// src/TextArea/sanitizeRichText.ts
|
|
@@ -10618,7 +11040,7 @@ function cleanStickyMarker(marker) {
|
|
|
10618
11040
|
}
|
|
10619
11041
|
|
|
10620
11042
|
// src/TextArea/TextArea.tsx
|
|
10621
|
-
import { Fragment as
|
|
11043
|
+
import { Fragment as Fragment21, jsx as jsx84, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
10622
11044
|
var STYLE_ID28 = "leta-textarea-styles";
|
|
10623
11045
|
var STYLES19 = `
|
|
10624
11046
|
.leta-textarea__input {
|
|
@@ -10643,7 +11065,7 @@ var STYLES19 = `
|
|
|
10643
11065
|
}
|
|
10644
11066
|
.leta-textarea__rich-input:empty::before { content: ''; }
|
|
10645
11067
|
`;
|
|
10646
|
-
function
|
|
11068
|
+
function ensureStyles25() {
|
|
10647
11069
|
if (typeof document === "undefined") return;
|
|
10648
11070
|
if (document.getElementById(STYLE_ID28)) return;
|
|
10649
11071
|
const el = document.createElement("style");
|
|
@@ -10658,15 +11080,15 @@ function LabelSection({
|
|
|
10658
11080
|
tag,
|
|
10659
11081
|
labelToggle
|
|
10660
11082
|
}) {
|
|
10661
|
-
return /* @__PURE__ */
|
|
10662
|
-
/* @__PURE__ */
|
|
10663
|
-
/* @__PURE__ */
|
|
10664
|
-
/* @__PURE__ */
|
|
10665
|
-
showLabelIcon && /* @__PURE__ */
|
|
11083
|
+
return /* @__PURE__ */ jsxs61("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "var(--spacing-4px)", minHeight: 20 }, children: [
|
|
11084
|
+
/* @__PURE__ */ jsxs61("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "var(--spacing-4px)", flex: 1, minWidth: 0 }, children: [
|
|
11085
|
+
/* @__PURE__ */ jsxs61("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "var(--spacing-8px)" }, children: [
|
|
11086
|
+
/* @__PURE__ */ jsx84("span", { className: "text-label-m-medium", style: { color: "var(--text-default-label-idle)" }, children: label }),
|
|
11087
|
+
showLabelIcon && /* @__PURE__ */ jsx84("span", { style: { display: "flex", color: "var(--icons-neutral-idle)", flexShrink: 0 }, children: /* @__PURE__ */ jsx84(Icon41, { name: labelIcon ?? "Info", outlined: true, size: 18 }) })
|
|
10666
11088
|
] }),
|
|
10667
|
-
tag !== "none" && /* @__PURE__ */
|
|
11089
|
+
tag !== "none" && /* @__PURE__ */ jsx84("span", { className: "text-label-m-regular", style: { color: "var(--text-default-label-idle)" }, children: tag === "optional" ? "(Optional)" : "(Required)" })
|
|
10668
11090
|
] }),
|
|
10669
|
-
labelToggle && /* @__PURE__ */
|
|
11091
|
+
labelToggle && /* @__PURE__ */ jsx84("div", { style: { flexShrink: 0 }, children: labelToggle })
|
|
10670
11092
|
] });
|
|
10671
11093
|
}
|
|
10672
11094
|
function Message({
|
|
@@ -10680,15 +11102,15 @@ function Message({
|
|
|
10680
11102
|
if (!message) return null;
|
|
10681
11103
|
const messageColor = error ? "var(--text-error-label)" : warning ? "var(--text-warning-label)" : disabled ? "var(--text-disabled-helper-disabled)" : "var(--text-default-helper)";
|
|
10682
11104
|
const messageIcon = error ? "Error" : warning ? "Warning" : null;
|
|
10683
|
-
return /* @__PURE__ */
|
|
10684
|
-
messageIcon && /* @__PURE__ */
|
|
10685
|
-
/* @__PURE__ */
|
|
11105
|
+
return /* @__PURE__ */ jsxs61("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "var(--spacing-4px)", minHeight: 16 }, children: [
|
|
11106
|
+
messageIcon && /* @__PURE__ */ jsx84("span", { style: { display: "flex", flexShrink: 0, color: error ? "var(--icons-error-default)" : "var(--icons-warning-default)" }, children: /* @__PURE__ */ jsx84(Icon41, { name: messageIcon, outlined: false, size: 16 }) }),
|
|
11107
|
+
/* @__PURE__ */ jsx84("span", { className: "text-label-s-regular", style: { color: messageColor }, children: message })
|
|
10686
11108
|
] });
|
|
10687
11109
|
}
|
|
10688
11110
|
function borderColorFor(disabled, error, focused) {
|
|
10689
11111
|
return disabled ? "var(--border-disabled-default)" : error ? "var(--border-error-default)" : focused ? "var(--border-secondary-component-focus)" : "var(--border-neutral-default)";
|
|
10690
11112
|
}
|
|
10691
|
-
var BasicField = /* @__PURE__ */
|
|
11113
|
+
var BasicField = /* @__PURE__ */ React89.forwardRef(function BasicField2({ props, borderColor, onFocusChange }, ref) {
|
|
10692
11114
|
const {
|
|
10693
11115
|
rows = 4,
|
|
10694
11116
|
placeholder = "Some descriptive text here would be very nice to see",
|
|
@@ -10723,9 +11145,9 @@ var BasicField = /* @__PURE__ */ React86.forwardRef(function BasicField2({ props
|
|
|
10723
11145
|
style: _style,
|
|
10724
11146
|
...textareaProps
|
|
10725
11147
|
} = props;
|
|
10726
|
-
const [count, setCount] =
|
|
11148
|
+
const [count, setCount] = React89.useState(String(value ?? defaultValue ?? "").length);
|
|
10727
11149
|
const len = value !== void 0 ? String(value).length : count;
|
|
10728
|
-
return /* @__PURE__ */
|
|
11150
|
+
return /* @__PURE__ */ jsxs61(
|
|
10729
11151
|
"div",
|
|
10730
11152
|
{
|
|
10731
11153
|
style: {
|
|
@@ -10741,7 +11163,7 @@ var BasicField = /* @__PURE__ */ React86.forwardRef(function BasicField2({ props
|
|
|
10741
11163
|
boxShadow: `inset 0 0 0 var(--stroke-xs) ${borderColor}`
|
|
10742
11164
|
},
|
|
10743
11165
|
children: [
|
|
10744
|
-
/* @__PURE__ */
|
|
11166
|
+
/* @__PURE__ */ jsx84(
|
|
10745
11167
|
"textarea",
|
|
10746
11168
|
{
|
|
10747
11169
|
ref,
|
|
@@ -10768,7 +11190,7 @@ var BasicField = /* @__PURE__ */ React86.forwardRef(function BasicField2({ props
|
|
|
10768
11190
|
...textareaProps
|
|
10769
11191
|
}
|
|
10770
11192
|
),
|
|
10771
|
-
showCounter && /* @__PURE__ */
|
|
11193
|
+
showCounter && /* @__PURE__ */ jsxs61("span", { className: "text-label-s-regular", style: { color: "var(--text-default-placeholder)", alignSelf: "flex-end", flexShrink: 0 }, children: [
|
|
10772
11194
|
len,
|
|
10773
11195
|
maxLength != null ? `/${maxLength}` : ""
|
|
10774
11196
|
] })
|
|
@@ -10777,7 +11199,7 @@ var BasicField = /* @__PURE__ */ React86.forwardRef(function BasicField2({ props
|
|
|
10777
11199
|
);
|
|
10778
11200
|
});
|
|
10779
11201
|
var ALL_FORMATS = ["bold", "italic", "underline"];
|
|
10780
|
-
var RichField = /* @__PURE__ */
|
|
11202
|
+
var RichField = /* @__PURE__ */ React89.forwardRef(function RichField2({ props, borderColor, onFocusChange }, ref) {
|
|
10781
11203
|
const {
|
|
10782
11204
|
placeholder = "Some descriptive text here would be very nice to see",
|
|
10783
11205
|
disabled = false,
|
|
@@ -10797,15 +11219,15 @@ var RichField = /* @__PURE__ */ React86.forwardRef(function RichField2({ props,
|
|
|
10797
11219
|
onFocus,
|
|
10798
11220
|
onBlur
|
|
10799
11221
|
} = props;
|
|
10800
|
-
const editableRef =
|
|
10801
|
-
|
|
10802
|
-
const stickyMarkerRef =
|
|
10803
|
-
const pendingFormatsRef =
|
|
10804
|
-
const lastEmittedRef =
|
|
10805
|
-
const [activeFormats, setActiveFormats] =
|
|
10806
|
-
const [hasContent, setHasContent] =
|
|
10807
|
-
const [plainLength, setPlainLength] =
|
|
10808
|
-
|
|
11222
|
+
const editableRef = React89.useRef(null);
|
|
11223
|
+
React89.useImperativeHandle(ref, () => editableRef.current, []);
|
|
11224
|
+
const stickyMarkerRef = React89.useRef(null);
|
|
11225
|
+
const pendingFormatsRef = React89.useRef(/* @__PURE__ */ new Set());
|
|
11226
|
+
const lastEmittedRef = React89.useRef(void 0);
|
|
11227
|
+
const [activeFormats, setActiveFormats] = React89.useState(/* @__PURE__ */ new Set());
|
|
11228
|
+
const [hasContent, setHasContent] = React89.useState(() => htmlToPlainText(value ?? defaultValue ?? "").length > 0);
|
|
11229
|
+
const [plainLength, setPlainLength] = React89.useState(() => htmlToPlainText(value ?? defaultValue ?? "").length);
|
|
11230
|
+
React89.useEffect(() => {
|
|
10809
11231
|
const el = editableRef.current;
|
|
10810
11232
|
if (!el) return;
|
|
10811
11233
|
const initial = sanitizeRichText(value ?? defaultValue ?? "");
|
|
@@ -10821,7 +11243,7 @@ var RichField = /* @__PURE__ */ React86.forwardRef(function RichField2({ props,
|
|
|
10821
11243
|
sel?.addRange(range);
|
|
10822
11244
|
}
|
|
10823
11245
|
}, []);
|
|
10824
|
-
|
|
11246
|
+
React89.useEffect(() => {
|
|
10825
11247
|
if (value === void 0) return;
|
|
10826
11248
|
const el = editableRef.current;
|
|
10827
11249
|
if (!el || value === lastEmittedRef.current) return;
|
|
@@ -10835,7 +11257,7 @@ var RichField = /* @__PURE__ */ React86.forwardRef(function RichField2({ props,
|
|
|
10835
11257
|
pendingFormatsRef.current = /* @__PURE__ */ new Set();
|
|
10836
11258
|
setActiveFormats(/* @__PURE__ */ new Set());
|
|
10837
11259
|
}, [value]);
|
|
10838
|
-
const notifyChange =
|
|
11260
|
+
const notifyChange = React89.useCallback(() => {
|
|
10839
11261
|
const el = editableRef.current;
|
|
10840
11262
|
if (!el) return;
|
|
10841
11263
|
const clean = sanitizeRichText(el.innerHTML);
|
|
@@ -10845,7 +11267,7 @@ var RichField = /* @__PURE__ */ React86.forwardRef(function RichField2({ props,
|
|
|
10845
11267
|
setHasContent(plain.length > 0);
|
|
10846
11268
|
setPlainLength(plain.length);
|
|
10847
11269
|
}, [onChange]);
|
|
10848
|
-
const recomputeActiveFormats =
|
|
11270
|
+
const recomputeActiveFormats = React89.useCallback(() => {
|
|
10849
11271
|
const el = editableRef.current;
|
|
10850
11272
|
if (!el) return;
|
|
10851
11273
|
const sel = getSelectionIn(el);
|
|
@@ -10854,7 +11276,7 @@ var RichField = /* @__PURE__ */ React86.forwardRef(function RichField2({ props,
|
|
|
10854
11276
|
const next = range.collapsed ? stickyMarkerRef.current ? new Set(pendingFormatsRef.current) : getFormatsAt(sel.anchorNode, el) : new Set(ALL_FORMATS.filter((f) => isRangeFullyFormatted(range, el, f)));
|
|
10855
11277
|
setActiveFormats(next);
|
|
10856
11278
|
}, []);
|
|
10857
|
-
|
|
11279
|
+
React89.useEffect(() => {
|
|
10858
11280
|
function handleSelectionChange() {
|
|
10859
11281
|
const el = editableRef.current;
|
|
10860
11282
|
if (!el) return;
|
|
@@ -10873,7 +11295,7 @@ var RichField = /* @__PURE__ */ React86.forwardRef(function RichField2({ props,
|
|
|
10873
11295
|
document.addEventListener("selectionchange", handleSelectionChange);
|
|
10874
11296
|
return () => document.removeEventListener("selectionchange", handleSelectionChange);
|
|
10875
11297
|
}, [recomputeActiveFormats]);
|
|
10876
|
-
const handleToggleFormat =
|
|
11298
|
+
const handleToggleFormat = React89.useCallback((format) => {
|
|
10877
11299
|
const el = editableRef.current;
|
|
10878
11300
|
if (!el || disabled) return;
|
|
10879
11301
|
if (!getSelectionIn(el)) {
|
|
@@ -10915,7 +11337,7 @@ var RichField = /* @__PURE__ */ React86.forwardRef(function RichField2({ props,
|
|
|
10915
11337
|
if (format === "italic") onItalic?.(nextActive);
|
|
10916
11338
|
if (format === "underline") onUnderline?.(nextActive);
|
|
10917
11339
|
}, [disabled, onBold, onItalic, onUnderline, recomputeActiveFormats, notifyChange]);
|
|
10918
|
-
const handleInput =
|
|
11340
|
+
const handleInput = React89.useCallback(() => {
|
|
10919
11341
|
const marker = stickyMarkerRef.current;
|
|
10920
11342
|
if (marker && marker.textContent && marker.textContent !== ZWSP) {
|
|
10921
11343
|
cleanStickyMarker(marker);
|
|
@@ -10925,7 +11347,7 @@ var RichField = /* @__PURE__ */ React86.forwardRef(function RichField2({ props,
|
|
|
10925
11347
|
notifyChange();
|
|
10926
11348
|
recomputeActiveFormats();
|
|
10927
11349
|
}, [notifyChange, recomputeActiveFormats]);
|
|
10928
|
-
const handleBeforeInput =
|
|
11350
|
+
const handleBeforeInput = React89.useCallback((e) => {
|
|
10929
11351
|
if (maxLength == null) return;
|
|
10930
11352
|
const native = e.nativeEvent;
|
|
10931
11353
|
const insertingTypes = /* @__PURE__ */ new Set(["insertText", "insertCompositionText", "insertFromPaste", "insertLineBreak"]);
|
|
@@ -10936,7 +11358,7 @@ var RichField = /* @__PURE__ */ React86.forwardRef(function RichField2({ props,
|
|
|
10936
11358
|
const insertLen = native.data?.length ?? 1;
|
|
10937
11359
|
if (currentLen + insertLen > maxLength) e.preventDefault();
|
|
10938
11360
|
}, [maxLength]);
|
|
10939
|
-
const handleKeyDown2 =
|
|
11361
|
+
const handleKeyDown2 = React89.useCallback((e) => {
|
|
10940
11362
|
if (e.key !== "Enter") return;
|
|
10941
11363
|
e.preventDefault();
|
|
10942
11364
|
const el = editableRef.current;
|
|
@@ -10944,7 +11366,7 @@ var RichField = /* @__PURE__ */ React86.forwardRef(function RichField2({ props,
|
|
|
10944
11366
|
insertLineBreak(el);
|
|
10945
11367
|
notifyChange();
|
|
10946
11368
|
}, [notifyChange]);
|
|
10947
|
-
const handlePaste =
|
|
11369
|
+
const handlePaste = React89.useCallback((e) => {
|
|
10948
11370
|
e.preventDefault();
|
|
10949
11371
|
const el = editableRef.current;
|
|
10950
11372
|
if (!el) return;
|
|
@@ -10954,8 +11376,8 @@ var RichField = /* @__PURE__ */ React86.forwardRef(function RichField2({ props,
|
|
|
10954
11376
|
else if (text) insertPlainText(el, text);
|
|
10955
11377
|
notifyChange();
|
|
10956
11378
|
}, [notifyChange]);
|
|
10957
|
-
return /* @__PURE__ */
|
|
10958
|
-
/* @__PURE__ */
|
|
11379
|
+
return /* @__PURE__ */ jsxs61("div", { style: { display: "flex", flexDirection: "column", width: "100%", boxSizing: "border-box" }, children: [
|
|
11380
|
+
/* @__PURE__ */ jsxs61(
|
|
10959
11381
|
"div",
|
|
10960
11382
|
{
|
|
10961
11383
|
style: {
|
|
@@ -10976,8 +11398,8 @@ var RichField = /* @__PURE__ */ React86.forwardRef(function RichField2({ props,
|
|
|
10976
11398
|
borderTopRightRadius: "var(--rounding-lg)"
|
|
10977
11399
|
},
|
|
10978
11400
|
children: [
|
|
10979
|
-
/* @__PURE__ */
|
|
10980
|
-
/* @__PURE__ */
|
|
11401
|
+
/* @__PURE__ */ jsxs61("div", { style: { position: "relative", flex: 1, display: "flex", flexDirection: "column", minHeight: 0 }, children: [
|
|
11402
|
+
/* @__PURE__ */ jsx84(
|
|
10981
11403
|
"div",
|
|
10982
11404
|
{
|
|
10983
11405
|
ref: editableRef,
|
|
@@ -11010,7 +11432,7 @@ var RichField = /* @__PURE__ */ React86.forwardRef(function RichField2({ props,
|
|
|
11010
11432
|
}
|
|
11011
11433
|
}
|
|
11012
11434
|
),
|
|
11013
|
-
!hasContent && /* @__PURE__ */
|
|
11435
|
+
!hasContent && /* @__PURE__ */ jsx84(
|
|
11014
11436
|
"span",
|
|
11015
11437
|
{
|
|
11016
11438
|
"aria-hidden": true,
|
|
@@ -11020,14 +11442,14 @@ var RichField = /* @__PURE__ */ React86.forwardRef(function RichField2({ props,
|
|
|
11020
11442
|
}
|
|
11021
11443
|
)
|
|
11022
11444
|
] }),
|
|
11023
|
-
showCounter && /* @__PURE__ */
|
|
11445
|
+
showCounter && /* @__PURE__ */ jsxs61("span", { className: "text-label-s-regular", style: { color: "var(--text-default-placeholder)", alignSelf: "flex-end", flexShrink: 0 }, children: [
|
|
11024
11446
|
plainLength,
|
|
11025
11447
|
maxLength != null ? `/${maxLength}` : ""
|
|
11026
11448
|
] })
|
|
11027
11449
|
]
|
|
11028
11450
|
}
|
|
11029
11451
|
),
|
|
11030
|
-
/* @__PURE__ */
|
|
11452
|
+
/* @__PURE__ */ jsxs61(
|
|
11031
11453
|
"div",
|
|
11032
11454
|
{
|
|
11033
11455
|
style: {
|
|
@@ -11044,8 +11466,8 @@ var RichField = /* @__PURE__ */ React86.forwardRef(function RichField2({ props,
|
|
|
11044
11466
|
backgroundColor: "var(--surface-neutral-bg-default)"
|
|
11045
11467
|
},
|
|
11046
11468
|
children: [
|
|
11047
|
-
/* @__PURE__ */
|
|
11048
|
-
/* @__PURE__ */
|
|
11469
|
+
/* @__PURE__ */ jsxs61("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "var(--spacing-8px)" }, children: [
|
|
11470
|
+
/* @__PURE__ */ jsx84(
|
|
11049
11471
|
ToggleButton,
|
|
11050
11472
|
{
|
|
11051
11473
|
icon: "Format-Bold",
|
|
@@ -11056,7 +11478,7 @@ var RichField = /* @__PURE__ */ React86.forwardRef(function RichField2({ props,
|
|
|
11056
11478
|
disabled
|
|
11057
11479
|
}
|
|
11058
11480
|
),
|
|
11059
|
-
/* @__PURE__ */
|
|
11481
|
+
/* @__PURE__ */ jsx84(
|
|
11060
11482
|
ToggleButton,
|
|
11061
11483
|
{
|
|
11062
11484
|
icon: "Format-Italics",
|
|
@@ -11067,7 +11489,7 @@ var RichField = /* @__PURE__ */ React86.forwardRef(function RichField2({ props,
|
|
|
11067
11489
|
disabled
|
|
11068
11490
|
}
|
|
11069
11491
|
),
|
|
11070
|
-
/* @__PURE__ */
|
|
11492
|
+
/* @__PURE__ */ jsx84(
|
|
11071
11493
|
ToggleButton,
|
|
11072
11494
|
{
|
|
11073
11495
|
icon: "Format-Underline",
|
|
@@ -11082,39 +11504,39 @@ var RichField = /* @__PURE__ */ React86.forwardRef(function RichField2({ props,
|
|
|
11082
11504
|
trailing !== null && /* `leta-textarea__trailing` is a stable hook so a host can animate or
|
|
11083
11505
|
restyle this region without having to re-implement the default
|
|
11084
11506
|
Cancel/Save pair just to wrap it in an element of its own. */
|
|
11085
|
-
/* @__PURE__ */
|
|
11086
|
-
/* @__PURE__ */
|
|
11087
|
-
/* @__PURE__ */
|
|
11507
|
+
/* @__PURE__ */ jsx84("div", { className: "leta-textarea__trailing", style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "var(--spacing-8px)" }, children: trailing ?? /* @__PURE__ */ jsxs61(Fragment21, { children: [
|
|
11508
|
+
/* @__PURE__ */ jsx84(Button, { variant: "secondary", size: "small", onClick: onCancel, disabled, children: "Cancel" }),
|
|
11509
|
+
/* @__PURE__ */ jsx84(Button, { variant: "primary", size: "small", onClick: onSave, disabled: disabled || saveDisabled, children: "Save" })
|
|
11088
11510
|
] }) })
|
|
11089
11511
|
]
|
|
11090
11512
|
}
|
|
11091
11513
|
)
|
|
11092
11514
|
] });
|
|
11093
11515
|
});
|
|
11094
|
-
var TextArea = /* @__PURE__ */
|
|
11095
|
-
|
|
11096
|
-
const [focused, setFocused] =
|
|
11516
|
+
var TextArea = /* @__PURE__ */ React89.forwardRef(function TextArea2(props, ref) {
|
|
11517
|
+
ensureStyles25();
|
|
11518
|
+
const [focused, setFocused] = React89.useState(false);
|
|
11097
11519
|
const borderColor = borderColorFor(props.disabled, props.error, focused);
|
|
11098
|
-
return /* @__PURE__ */
|
|
11520
|
+
return /* @__PURE__ */ jsxs61(
|
|
11099
11521
|
"div",
|
|
11100
11522
|
{
|
|
11101
11523
|
className: props.className,
|
|
11102
11524
|
style: { display: "flex", flexDirection: "column", alignItems: "stretch", gap: "var(--spacing-8px)", width: 350, boxSizing: "border-box", ...props.style },
|
|
11103
11525
|
children: [
|
|
11104
|
-
(props.showLabel ?? true) && /* @__PURE__ */
|
|
11105
|
-
props.variant === "rich" ? /* @__PURE__ */
|
|
11106
|
-
/* @__PURE__ */
|
|
11526
|
+
(props.showLabel ?? true) && /* @__PURE__ */ jsx84(LabelSection, { label: props.label ?? "Label Text", showLabelIcon: props.showLabelIcon, labelIcon: props.labelIcon, tag: props.tag ?? "none", labelToggle: props.labelToggle }),
|
|
11527
|
+
props.variant === "rich" ? /* @__PURE__ */ jsx84(RichField, { ref, props, borderColor, onFocusChange: setFocused }) : /* @__PURE__ */ jsx84(BasicField, { ref, props, borderColor, onFocusChange: setFocused }),
|
|
11528
|
+
/* @__PURE__ */ jsx84(Message, { error: props.error, warning: props.warning, disabled: props.disabled, helperText: props.helperText ?? "Helper text goes here", showHelper: props.showHelper ?? true })
|
|
11107
11529
|
]
|
|
11108
11530
|
}
|
|
11109
11531
|
);
|
|
11110
11532
|
});
|
|
11111
11533
|
|
|
11112
11534
|
// src/MobileSearchInput/MobileSearchInput.tsx
|
|
11113
|
-
import * as
|
|
11535
|
+
import * as React90 from "react";
|
|
11114
11536
|
import "@leta-io/icons";
|
|
11115
|
-
import { jsx as
|
|
11116
|
-
var MobileSearchInput = /* @__PURE__ */
|
|
11117
|
-
const field = /* @__PURE__ */
|
|
11537
|
+
import { jsx as jsx85, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
11538
|
+
var MobileSearchInput = /* @__PURE__ */ React90.forwardRef(function MobileSearchInput2({ placeholder = "Search here...", icon = "Search", label, helperText, onClear, disabled = false, value, defaultValue, onChange, className, style, ...inputProps }, ref) {
|
|
11539
|
+
const field = /* @__PURE__ */ jsx85(
|
|
11118
11540
|
SearchField,
|
|
11119
11541
|
{
|
|
11120
11542
|
ref,
|
|
@@ -11131,23 +11553,23 @@ var MobileSearchInput = /* @__PURE__ */ React87.forwardRef(function MobileSearch
|
|
|
11131
11553
|
}
|
|
11132
11554
|
);
|
|
11133
11555
|
if (!label && !helperText) {
|
|
11134
|
-
return /* @__PURE__ */
|
|
11556
|
+
return /* @__PURE__ */ jsx85("div", { className, style: { width: 350, boxSizing: "border-box", ...style }, children: field });
|
|
11135
11557
|
}
|
|
11136
|
-
return /* @__PURE__ */
|
|
11137
|
-
label && /* @__PURE__ */
|
|
11558
|
+
return /* @__PURE__ */ jsxs62("div", { className, style: { display: "flex", flexDirection: "column", alignItems: "stretch", gap: "var(--spacing-8px)", width: 350, boxSizing: "border-box", ...style }, children: [
|
|
11559
|
+
label && /* @__PURE__ */ jsx85("span", { className: "text-label-m-medium", style: { color: "var(--text-default-label-idle)" }, children: label }),
|
|
11138
11560
|
field,
|
|
11139
|
-
helperText && /* @__PURE__ */
|
|
11561
|
+
helperText && /* @__PURE__ */ jsx85("span", { className: "text-label-s-regular", style: { color: "var(--text-default-helper)" }, children: helperText })
|
|
11140
11562
|
] });
|
|
11141
11563
|
});
|
|
11142
11564
|
|
|
11143
11565
|
// src/MapSearchInput/MapSearchInput.tsx
|
|
11144
|
-
import * as
|
|
11566
|
+
import * as React91 from "react";
|
|
11145
11567
|
import "@leta-io/icons";
|
|
11146
|
-
import { jsx as
|
|
11568
|
+
import { jsx as jsx86, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
11147
11569
|
var PANEL_PAD = "var(--padding-16px)";
|
|
11148
11570
|
var RESULTS_PANEL_HEIGHT = 400;
|
|
11149
|
-
var ResultsDivider = () => /* @__PURE__ */
|
|
11150
|
-
var MapSearchInput = /* @__PURE__ */
|
|
11571
|
+
var ResultsDivider = () => /* @__PURE__ */ jsx86("div", { "aria-hidden": true, style: { height: 0, borderTop: "var(--stroke-xs) solid var(--border-neutral-default)" } });
|
|
11572
|
+
var MapSearchInput = /* @__PURE__ */ React91.forwardRef(function MapSearchInput2({
|
|
11151
11573
|
state = "active-results",
|
|
11152
11574
|
placeholder = "Search here...",
|
|
11153
11575
|
icon = "Search",
|
|
@@ -11169,7 +11591,7 @@ var MapSearchInput = /* @__PURE__ */ React88.forwardRef(function MapSearchInput2
|
|
|
11169
11591
|
...inputProps
|
|
11170
11592
|
}, ref) {
|
|
11171
11593
|
const open = state !== "idle";
|
|
11172
|
-
const field = /* @__PURE__ */
|
|
11594
|
+
const field = /* @__PURE__ */ jsx86(
|
|
11173
11595
|
SearchField,
|
|
11174
11596
|
{
|
|
11175
11597
|
ref,
|
|
@@ -11189,7 +11611,7 @@ var MapSearchInput = /* @__PURE__ */ React88.forwardRef(function MapSearchInput2
|
|
|
11189
11611
|
}
|
|
11190
11612
|
);
|
|
11191
11613
|
if (!open) {
|
|
11192
|
-
return /* @__PURE__ */
|
|
11614
|
+
return /* @__PURE__ */ jsx86(
|
|
11193
11615
|
"div",
|
|
11194
11616
|
{
|
|
11195
11617
|
className,
|
|
@@ -11198,9 +11620,9 @@ var MapSearchInput = /* @__PURE__ */ React88.forwardRef(function MapSearchInput2
|
|
|
11198
11620
|
}
|
|
11199
11621
|
);
|
|
11200
11622
|
}
|
|
11201
|
-
const topSection = /* @__PURE__ */
|
|
11202
|
-
/* @__PURE__ */
|
|
11203
|
-
/* @__PURE__ */
|
|
11623
|
+
const topSection = /* @__PURE__ */ jsxs63("div", { style: { display: "flex", flexDirection: "column", gap: "var(--spacing-20px)", padding: `${PANEL_PAD} ${PANEL_PAD} 0 ${PANEL_PAD}` }, children: [
|
|
11624
|
+
/* @__PURE__ */ jsx86("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "var(--spacing-8px)", flexWrap: "wrap" }, children: filters.map((f, i) => /* @__PURE__ */ jsx86(Chip, { label: f, active: i === activeFilter }, i)) }),
|
|
11625
|
+
/* @__PURE__ */ jsxs63("span", { className: "text-heading-s-semibold", style: { color: "var(--text-default-heading)" }, children: [
|
|
11204
11626
|
"Results (",
|
|
11205
11627
|
resultsCount,
|
|
11206
11628
|
")"
|
|
@@ -11208,31 +11630,31 @@ var MapSearchInput = /* @__PURE__ */ React88.forwardRef(function MapSearchInput2
|
|
|
11208
11630
|
] });
|
|
11209
11631
|
let panel;
|
|
11210
11632
|
if (state === "no-history") {
|
|
11211
|
-
panel = /* @__PURE__ */
|
|
11633
|
+
panel = /* @__PURE__ */ jsx86("div", { style: { padding: PANEL_PAD }, children: /* @__PURE__ */ jsx86("span", { className: "text-label-m-regular", style: { color: "var(--text-default-helper)" }, children: noHistoryText }) });
|
|
11212
11634
|
} else if (state === "active-history") {
|
|
11213
|
-
panel = /* @__PURE__ */
|
|
11214
|
-
/* @__PURE__ */
|
|
11215
|
-
/* @__PURE__ */
|
|
11216
|
-
/* @__PURE__ */
|
|
11635
|
+
panel = /* @__PURE__ */ jsxs63("div", { style: { display: "flex", flexDirection: "column", gap: "var(--spacing-20px)", padding: PANEL_PAD }, children: [
|
|
11636
|
+
/* @__PURE__ */ jsxs63("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "space-between", gap: "var(--spacing-8px)" }, children: [
|
|
11637
|
+
/* @__PURE__ */ jsx86("span", { className: "text-heading-s-semibold", style: { color: "var(--text-default-heading)" }, children: recentTitle }),
|
|
11638
|
+
/* @__PURE__ */ jsx86(Button, { variant: "plain", size: "small", onClick: onClearHistory, children: "Clear All" })
|
|
11217
11639
|
] }),
|
|
11218
|
-
children ?? /* @__PURE__ */
|
|
11640
|
+
children ?? /* @__PURE__ */ jsx86("div", { style: { display: "flex", flexDirection: "column", gap: "var(--spacing-4px)" }, children: ["LTA-ID-001", "LTA-ID-002", "Michael", "Kitisuru"].map((l) => /* @__PURE__ */ jsx86(DesktopMenuOptions, { type: "dropdown-basic", label: l, showChevron: false }, l)) })
|
|
11219
11641
|
] });
|
|
11220
11642
|
} else if (state === "empty-results") {
|
|
11221
|
-
panel = /* @__PURE__ */
|
|
11643
|
+
panel = /* @__PURE__ */ jsxs63("div", { style: { display: "flex", flexDirection: "column", gap: "var(--spacing-20px)", height: RESULTS_PANEL_HEIGHT, boxSizing: "border-box" }, children: [
|
|
11222
11644
|
topSection,
|
|
11223
|
-
/* @__PURE__ */
|
|
11645
|
+
/* @__PURE__ */ jsx86("div", { style: { flex: 1, minHeight: 0, display: "flex", alignItems: "center", justifyContent: "center", padding: PANEL_PAD }, children: /* @__PURE__ */ jsx86(EmptyState, { type: "no-results", size: "mobile", description: noResultsText }) })
|
|
11224
11646
|
] });
|
|
11225
11647
|
} else {
|
|
11226
11648
|
const rows = ["1", "2", "3", "4"];
|
|
11227
|
-
panel = /* @__PURE__ */
|
|
11649
|
+
panel = /* @__PURE__ */ jsxs63("div", { style: { display: "flex", flexDirection: "column", gap: "var(--spacing-20px)", height: RESULTS_PANEL_HEIGHT, boxSizing: "border-box" }, children: [
|
|
11228
11650
|
topSection,
|
|
11229
|
-
/* @__PURE__ */
|
|
11230
|
-
/* @__PURE__ */
|
|
11231
|
-
i < rows.length - 1 && /* @__PURE__ */
|
|
11651
|
+
/* @__PURE__ */ jsx86("div", { style: { flex: 1, minHeight: 0, overflow: "auto", overscrollBehavior: "contain", padding: `0 var(--padding-10px) var(--padding-40px) var(--padding-10px)` }, children: children ?? /* @__PURE__ */ jsx86("div", { style: { display: "flex", flexDirection: "column", gap: "var(--spacing-8px)" }, children: rows.map((id, i) => /* @__PURE__ */ jsxs63(React91.Fragment, { children: [
|
|
11652
|
+
/* @__PURE__ */ jsx86(DesktopMenuOptions, { type: "dropdown-advanced", label: "Title", subtext: "Enter description here" }),
|
|
11653
|
+
i < rows.length - 1 && /* @__PURE__ */ jsx86(ResultsDivider, {})
|
|
11232
11654
|
] }, id)) }) })
|
|
11233
11655
|
] });
|
|
11234
11656
|
}
|
|
11235
|
-
return /* @__PURE__ */
|
|
11657
|
+
return /* @__PURE__ */ jsxs63(
|
|
11236
11658
|
"div",
|
|
11237
11659
|
{
|
|
11238
11660
|
className,
|
|
@@ -11257,15 +11679,15 @@ var MapSearchInput = /* @__PURE__ */ React88.forwardRef(function MapSearchInput2
|
|
|
11257
11679
|
});
|
|
11258
11680
|
|
|
11259
11681
|
// src/MobileMapSearchInput/MobileMapSearchInput.tsx
|
|
11260
|
-
import * as
|
|
11682
|
+
import * as React93 from "react";
|
|
11261
11683
|
import "@leta-io/icons";
|
|
11262
11684
|
|
|
11263
11685
|
// src/MobileDropdown/MobileDropdown.tsx
|
|
11264
|
-
import * as
|
|
11686
|
+
import * as React92 from "react";
|
|
11265
11687
|
import "@leta-io/icons";
|
|
11266
|
-
import { jsx as
|
|
11267
|
-
var MobileDropdown = /* @__PURE__ */
|
|
11268
|
-
return /* @__PURE__ */
|
|
11688
|
+
import { jsx as jsx87 } from "react/jsx-runtime";
|
|
11689
|
+
var MobileDropdown = /* @__PURE__ */ React92.forwardRef(function MobileDropdown2({ options, children, maxHeight = 248, style, ...rest }, ref) {
|
|
11690
|
+
return /* @__PURE__ */ jsx87(
|
|
11269
11691
|
"div",
|
|
11270
11692
|
{
|
|
11271
11693
|
ref,
|
|
@@ -11282,7 +11704,7 @@ var MobileDropdown = /* @__PURE__ */ React89.forwardRef(function MobileDropdown2
|
|
|
11282
11704
|
...style
|
|
11283
11705
|
},
|
|
11284
11706
|
...rest,
|
|
11285
|
-
children: /* @__PURE__ */
|
|
11707
|
+
children: /* @__PURE__ */ jsx87("div", { style: { display: "flex", flexDirection: "column", gap: "var(--spacing-4px)", paddingBottom: 8 }, children: children ?? options?.map((o, i) => /* @__PURE__ */ jsx87(
|
|
11286
11708
|
MobileMenuOptions,
|
|
11287
11709
|
{
|
|
11288
11710
|
type: o.type,
|
|
@@ -11301,8 +11723,8 @@ var MobileDropdown = /* @__PURE__ */ React89.forwardRef(function MobileDropdown2
|
|
|
11301
11723
|
});
|
|
11302
11724
|
|
|
11303
11725
|
// src/MobileMapSearchInput/MobileMapSearchInput.tsx
|
|
11304
|
-
import { jsx as
|
|
11305
|
-
var MobileMapSearchInput = /* @__PURE__ */
|
|
11726
|
+
import { jsx as jsx88, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
11727
|
+
var MobileMapSearchInput = /* @__PURE__ */ React93.forwardRef(function MobileMapSearchInput2({
|
|
11306
11728
|
placeholder = "Search here...",
|
|
11307
11729
|
icon = "Search",
|
|
11308
11730
|
open = true,
|
|
@@ -11316,8 +11738,8 @@ var MobileMapSearchInput = /* @__PURE__ */ React90.forwardRef(function MobileMap
|
|
|
11316
11738
|
style,
|
|
11317
11739
|
...inputProps
|
|
11318
11740
|
}, ref) {
|
|
11319
|
-
return /* @__PURE__ */
|
|
11320
|
-
/* @__PURE__ */
|
|
11741
|
+
return /* @__PURE__ */ jsxs64("div", { className, style: { display: "flex", flexDirection: "column", alignItems: "stretch", gap: "var(--spacing-8px)", width: 350, boxSizing: "border-box", ...style }, children: [
|
|
11742
|
+
/* @__PURE__ */ jsx88("div", { style: { borderRadius: "var(--rounding-round)", boxShadow: "var(--shadow-neutral-1)" }, children: /* @__PURE__ */ jsx88(
|
|
11321
11743
|
SearchField,
|
|
11322
11744
|
{
|
|
11323
11745
|
ref,
|
|
@@ -11334,7 +11756,7 @@ var MobileMapSearchInput = /* @__PURE__ */ React90.forwardRef(function MobileMap
|
|
|
11334
11756
|
...inputProps
|
|
11335
11757
|
}
|
|
11336
11758
|
) }),
|
|
11337
|
-
open && /* @__PURE__ */
|
|
11759
|
+
open && /* @__PURE__ */ jsx88(
|
|
11338
11760
|
MobileDropdown,
|
|
11339
11761
|
{
|
|
11340
11762
|
maxHeight: 248,
|
|
@@ -11351,10 +11773,10 @@ var MobileMapSearchInput = /* @__PURE__ */ React90.forwardRef(function MobileMap
|
|
|
11351
11773
|
});
|
|
11352
11774
|
|
|
11353
11775
|
// src/FileUpload/FileUpload.tsx
|
|
11354
|
-
import * as
|
|
11776
|
+
import * as React94 from "react";
|
|
11355
11777
|
import { Icon as Icon42 } from "@leta-io/icons";
|
|
11356
|
-
import { jsx as
|
|
11357
|
-
var FileUpload = /* @__PURE__ */
|
|
11778
|
+
import { jsx as jsx89, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
11779
|
+
var FileUpload = /* @__PURE__ */ React94.forwardRef(function FileUpload2({
|
|
11358
11780
|
label = "Attach an image",
|
|
11359
11781
|
showLabel = true,
|
|
11360
11782
|
showLabelIcon = false,
|
|
@@ -11370,27 +11792,27 @@ var FileUpload = /* @__PURE__ */ React91.forwardRef(function FileUpload2({
|
|
|
11370
11792
|
style,
|
|
11371
11793
|
...rest
|
|
11372
11794
|
}, ref) {
|
|
11373
|
-
const inputRef =
|
|
11374
|
-
const [dragOver, setDragOver] =
|
|
11795
|
+
const inputRef = React94.useRef(null);
|
|
11796
|
+
const [dragOver, setDragOver] = React94.useState(false);
|
|
11375
11797
|
const handleFiles = (files) => {
|
|
11376
11798
|
if (files && files.length) onFiles?.(files);
|
|
11377
11799
|
};
|
|
11378
|
-
return /* @__PURE__ */
|
|
11800
|
+
return /* @__PURE__ */ jsxs65(
|
|
11379
11801
|
"div",
|
|
11380
11802
|
{
|
|
11381
11803
|
ref,
|
|
11382
11804
|
style: { display: "flex", flexDirection: "column", alignItems: "stretch", gap: "var(--spacing-20px)", width: 350, boxSizing: "border-box", ...style },
|
|
11383
11805
|
...rest,
|
|
11384
11806
|
children: [
|
|
11385
|
-
/* @__PURE__ */
|
|
11386
|
-
showLabel && /* @__PURE__ */
|
|
11387
|
-
/* @__PURE__ */
|
|
11388
|
-
/* @__PURE__ */
|
|
11389
|
-
showLabelIcon && /* @__PURE__ */
|
|
11807
|
+
/* @__PURE__ */ jsxs65("div", { style: { display: "flex", flexDirection: "column", alignItems: "stretch", gap: "var(--spacing-8px)" }, children: [
|
|
11808
|
+
showLabel && /* @__PURE__ */ jsxs65("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "var(--spacing-4px)", minHeight: 20 }, children: [
|
|
11809
|
+
/* @__PURE__ */ jsxs65("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "var(--spacing-8px)" }, children: [
|
|
11810
|
+
/* @__PURE__ */ jsx89("span", { className: "text-label-m-medium", style: { color: "var(--text-default-label-idle)" }, children: label }),
|
|
11811
|
+
showLabelIcon && /* @__PURE__ */ jsx89("span", { style: { display: "flex", color: "var(--icons-neutral-idle)", flexShrink: 0 }, children: /* @__PURE__ */ jsx89(Icon42, { name: labelIcon, outlined: true, size: 18 }) })
|
|
11390
11812
|
] }),
|
|
11391
|
-
tag !== "none" && /* @__PURE__ */
|
|
11813
|
+
tag !== "none" && /* @__PURE__ */ jsx89("span", { className: "text-label-m-regular", style: { color: "var(--text-default-label-idle)" }, children: tag === "optional" ? "(Optional)" : "(Required)" })
|
|
11392
11814
|
] }),
|
|
11393
|
-
/* @__PURE__ */
|
|
11815
|
+
/* @__PURE__ */ jsxs65(
|
|
11394
11816
|
"div",
|
|
11395
11817
|
{
|
|
11396
11818
|
onDragOver: (e) => {
|
|
@@ -11418,10 +11840,10 @@ var FileUpload = /* @__PURE__ */ React91.forwardRef(function FileUpload2({
|
|
|
11418
11840
|
backgroundColor: "var(--surface-neutral-input-field)"
|
|
11419
11841
|
},
|
|
11420
11842
|
children: [
|
|
11421
|
-
/* @__PURE__ */
|
|
11422
|
-
/* @__PURE__ */
|
|
11423
|
-
/* @__PURE__ */
|
|
11424
|
-
/* @__PURE__ */
|
|
11843
|
+
/* @__PURE__ */ jsx89("span", { className: "text-label-m-regular", style: { color: "var(--text-default-label)", textAlign: "center" }, children: promptText }),
|
|
11844
|
+
/* @__PURE__ */ jsx89(Button, { variant: "secondary", size: "small", onClick: () => inputRef.current?.click(), children: browseLabel }),
|
|
11845
|
+
/* @__PURE__ */ jsx89("span", { className: "text-label-s-regular", style: { color: "var(--text-default-label-idle)", textAlign: "center" }, children: maxSizeText }),
|
|
11846
|
+
/* @__PURE__ */ jsx89(
|
|
11425
11847
|
"input",
|
|
11426
11848
|
{
|
|
11427
11849
|
ref: inputRef,
|
|
@@ -11443,11 +11865,11 @@ var FileUpload = /* @__PURE__ */ React91.forwardRef(function FileUpload2({
|
|
|
11443
11865
|
});
|
|
11444
11866
|
|
|
11445
11867
|
// src/FileUpload/FileUploadCard.tsx
|
|
11446
|
-
import * as
|
|
11868
|
+
import * as React95 from "react";
|
|
11447
11869
|
import { Icon as Icon43 } from "@leta-io/icons";
|
|
11448
|
-
import { jsx as
|
|
11449
|
-
var FileUploadCard = /* @__PURE__ */
|
|
11450
|
-
return /* @__PURE__ */
|
|
11870
|
+
import { jsx as jsx90, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
11871
|
+
var FileUploadCard = /* @__PURE__ */ React95.forwardRef(function FileUploadCard2({ status = "uploading", filename, size, progress = 0, onRemove, style, ...rest }, ref) {
|
|
11872
|
+
return /* @__PURE__ */ jsxs66(
|
|
11451
11873
|
"div",
|
|
11452
11874
|
{
|
|
11453
11875
|
ref,
|
|
@@ -11464,26 +11886,26 @@ var FileUploadCard = /* @__PURE__ */ React92.forwardRef(function FileUploadCard2
|
|
|
11464
11886
|
},
|
|
11465
11887
|
...rest,
|
|
11466
11888
|
children: [
|
|
11467
|
-
/* @__PURE__ */
|
|
11468
|
-
/* @__PURE__ */
|
|
11469
|
-
/* @__PURE__ */
|
|
11470
|
-
/* @__PURE__ */
|
|
11471
|
-
/* @__PURE__ */
|
|
11472
|
-
size && /* @__PURE__ */
|
|
11889
|
+
/* @__PURE__ */ jsxs66("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "space-between", gap: "var(--spacing-20px)" }, children: [
|
|
11890
|
+
/* @__PURE__ */ jsxs66("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "var(--spacing-8px)", flex: 1, minWidth: 0 }, children: [
|
|
11891
|
+
/* @__PURE__ */ jsx90("span", { style: { flexShrink: 0, display: "flex", color: "var(--icons-neutral-default)" }, children: /* @__PURE__ */ jsx90(Icon43, { name: status === "uploaded" ? "Check-Circle" : "Loading", outlined: true, size: 20 }) }),
|
|
11892
|
+
/* @__PURE__ */ jsxs66("div", { style: { display: "flex", flexDirection: "column", gap: "var(--spacing-4px)", flex: 1, minWidth: 0 }, children: [
|
|
11893
|
+
/* @__PURE__ */ jsx90("span", { className: "text-label-m-semibold", style: { color: "var(--text-default-heading)", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: filename }),
|
|
11894
|
+
size && /* @__PURE__ */ jsx90("span", { className: "text-label-s-regular", style: { color: "var(--text-default-sub-body)" }, children: size })
|
|
11473
11895
|
] })
|
|
11474
11896
|
] }),
|
|
11475
|
-
/* @__PURE__ */
|
|
11897
|
+
/* @__PURE__ */ jsx90(Button, { variant: "ghost", size: "small", iconOnly: "Cancel", "aria-label": "Remove File", onClick: onRemove })
|
|
11476
11898
|
] }),
|
|
11477
|
-
status === "uploading" && /* @__PURE__ */
|
|
11899
|
+
status === "uploading" && /* @__PURE__ */ jsx90(DesktopProgressIndicator, { variant: "upload", value: progress })
|
|
11478
11900
|
]
|
|
11479
11901
|
}
|
|
11480
11902
|
);
|
|
11481
11903
|
});
|
|
11482
11904
|
|
|
11483
11905
|
// src/MobileFileUpload/MobileFileUpload.tsx
|
|
11484
|
-
import * as
|
|
11906
|
+
import * as React96 from "react";
|
|
11485
11907
|
import { Icon as Icon44 } from "@leta-io/icons";
|
|
11486
|
-
import { jsx as
|
|
11908
|
+
import { jsx as jsx91, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
11487
11909
|
var STYLE_ID29 = "leta-mobile-file-upload-styles";
|
|
11488
11910
|
var STYLES20 = `
|
|
11489
11911
|
.leta-mfu__add, .leta-mfu__delete { cursor: pointer; }
|
|
@@ -11492,7 +11914,7 @@ var STYLES20 = `
|
|
|
11492
11914
|
outline-offset: 4px;
|
|
11493
11915
|
}
|
|
11494
11916
|
`;
|
|
11495
|
-
function
|
|
11917
|
+
function ensureStyles26() {
|
|
11496
11918
|
if (typeof document === "undefined") return;
|
|
11497
11919
|
if (document.getElementById(STYLE_ID29)) return;
|
|
11498
11920
|
const el = document.createElement("style");
|
|
@@ -11501,7 +11923,7 @@ function ensureStyles25() {
|
|
|
11501
11923
|
document.head.appendChild(el);
|
|
11502
11924
|
}
|
|
11503
11925
|
var TILE = { width: 111, height: 104, flexShrink: 0, borderRadius: "var(--rounding-lg)", boxSizing: "border-box" };
|
|
11504
|
-
var MobileFileUpload = /* @__PURE__ */
|
|
11926
|
+
var MobileFileUpload = /* @__PURE__ */ React96.forwardRef(function MobileFileUpload2({
|
|
11505
11927
|
label = "Attach an image",
|
|
11506
11928
|
showLabel = true,
|
|
11507
11929
|
showLabelIcon = false,
|
|
@@ -11515,25 +11937,25 @@ var MobileFileUpload = /* @__PURE__ */ React93.forwardRef(function MobileFileUpl
|
|
|
11515
11937
|
style,
|
|
11516
11938
|
...rest
|
|
11517
11939
|
}, ref) {
|
|
11518
|
-
|
|
11940
|
+
ensureStyles26();
|
|
11519
11941
|
const adds = addTiles ?? (images.length === 0 ? 3 : 0);
|
|
11520
|
-
return /* @__PURE__ */
|
|
11942
|
+
return /* @__PURE__ */ jsxs67(
|
|
11521
11943
|
"div",
|
|
11522
11944
|
{
|
|
11523
11945
|
ref,
|
|
11524
11946
|
style: { display: "flex", flexDirection: "column", alignItems: "stretch", gap: "var(--spacing-8px)", width: 350, boxSizing: "border-box", ...style },
|
|
11525
11947
|
...rest,
|
|
11526
11948
|
children: [
|
|
11527
|
-
showLabel && /* @__PURE__ */
|
|
11528
|
-
/* @__PURE__ */
|
|
11529
|
-
/* @__PURE__ */
|
|
11530
|
-
showLabelIcon && /* @__PURE__ */
|
|
11949
|
+
showLabel && /* @__PURE__ */ jsxs67("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "var(--spacing-4px)", minHeight: 20 }, children: [
|
|
11950
|
+
/* @__PURE__ */ jsxs67("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "var(--spacing-8px)" }, children: [
|
|
11951
|
+
/* @__PURE__ */ jsx91("span", { className: "text-label-m-medium", style: { color: "var(--text-default-label-idle)" }, children: label }),
|
|
11952
|
+
showLabelIcon && /* @__PURE__ */ jsx91("span", { style: { display: "flex", color: "var(--icons-neutral-idle)", flexShrink: 0 }, children: /* @__PURE__ */ jsx91(Icon44, { name: labelIcon, outlined: true, size: 18 }) })
|
|
11531
11953
|
] }),
|
|
11532
|
-
tag !== "none" && /* @__PURE__ */
|
|
11954
|
+
tag !== "none" && /* @__PURE__ */ jsx91("span", { className: "text-label-m-regular", style: { color: "var(--text-default-label-idle)" }, children: tag === "optional" ? "(Optional)" : "(Required)" })
|
|
11533
11955
|
] }),
|
|
11534
|
-
/* @__PURE__ */
|
|
11535
|
-
images.map((img, i) => /* @__PURE__ */
|
|
11536
|
-
/* @__PURE__ */
|
|
11956
|
+
/* @__PURE__ */ jsxs67("div", { style: { display: "flex", flexDirection: "row", flexWrap: "wrap", gap: "var(--spacing-8px)" }, children: [
|
|
11957
|
+
images.map((img, i) => /* @__PURE__ */ jsxs67("div", { style: { ...TILE, position: "relative", overflow: "visible" }, children: [
|
|
11958
|
+
/* @__PURE__ */ jsx91(
|
|
11537
11959
|
"img",
|
|
11538
11960
|
{
|
|
11539
11961
|
src: img.src,
|
|
@@ -11541,12 +11963,12 @@ var MobileFileUpload = /* @__PURE__ */ React93.forwardRef(function MobileFileUpl
|
|
|
11541
11963
|
style: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "var(--rounding-lg)", display: "block" }
|
|
11542
11964
|
}
|
|
11543
11965
|
),
|
|
11544
|
-
/* @__PURE__ */
|
|
11966
|
+
/* @__PURE__ */ jsx91(
|
|
11545
11967
|
"button",
|
|
11546
11968
|
{
|
|
11547
11969
|
type: "button",
|
|
11548
11970
|
className: "leta-mfu__delete",
|
|
11549
|
-
"aria-label": "Remove
|
|
11971
|
+
"aria-label": "Remove Image",
|
|
11550
11972
|
onClick: () => onRemove?.(i),
|
|
11551
11973
|
style: {
|
|
11552
11974
|
position: "absolute",
|
|
@@ -11563,11 +11985,11 @@ var MobileFileUpload = /* @__PURE__ */ React93.forwardRef(function MobileFileUpl
|
|
|
11563
11985
|
backgroundColor: "var(--surface-neutral-bg-default)",
|
|
11564
11986
|
color: "var(--icons-error-default)"
|
|
11565
11987
|
},
|
|
11566
|
-
children: /* @__PURE__ */
|
|
11988
|
+
children: /* @__PURE__ */ jsx91(Icon44, { name: "Delete", outlined: true, size: 16 })
|
|
11567
11989
|
}
|
|
11568
11990
|
)
|
|
11569
11991
|
] }, `img-${i}`)),
|
|
11570
|
-
Array.from({ length: adds }).map((_, i) => /* @__PURE__ */
|
|
11992
|
+
Array.from({ length: adds }).map((_, i) => /* @__PURE__ */ jsxs67(
|
|
11571
11993
|
"button",
|
|
11572
11994
|
{
|
|
11573
11995
|
type: "button",
|
|
@@ -11584,8 +12006,8 @@ var MobileFileUpload = /* @__PURE__ */ React93.forwardRef(function MobileFileUpl
|
|
|
11584
12006
|
backgroundColor: "var(--surface-neutral-input-field)"
|
|
11585
12007
|
},
|
|
11586
12008
|
children: [
|
|
11587
|
-
/* @__PURE__ */
|
|
11588
|
-
/* @__PURE__ */
|
|
12009
|
+
/* @__PURE__ */ jsx91("span", { style: { display: "flex", color: "var(--icons-neutral-idle)" }, children: /* @__PURE__ */ jsx91(Icon44, { name: "Image-Upload", outlined: false, size: 40 }) }),
|
|
12010
|
+
/* @__PURE__ */ jsx91("span", { className: "text-label-s-regular", style: { color: "var(--text-default-label-idle)" }, children: addLabel })
|
|
11589
12011
|
]
|
|
11590
12012
|
},
|
|
11591
12013
|
`add-${i}`
|
|
@@ -11597,10 +12019,10 @@ var MobileFileUpload = /* @__PURE__ */ React93.forwardRef(function MobileFileUpl
|
|
|
11597
12019
|
});
|
|
11598
12020
|
|
|
11599
12021
|
// src/Placeholder/Placeholder.tsx
|
|
11600
|
-
import * as
|
|
11601
|
-
import { jsx as
|
|
11602
|
-
var Placeholder = /* @__PURE__ */
|
|
11603
|
-
return /* @__PURE__ */
|
|
12022
|
+
import * as React97 from "react";
|
|
12023
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
12024
|
+
var Placeholder = /* @__PURE__ */ React97.forwardRef(function Placeholder2({ label = "Placeholder", minHeight = 120, style, ...rest }, ref) {
|
|
12025
|
+
return /* @__PURE__ */ jsx92(
|
|
11604
12026
|
"div",
|
|
11605
12027
|
{
|
|
11606
12028
|
ref,
|
|
@@ -11618,67 +12040,15 @@ var Placeholder = /* @__PURE__ */ React94.forwardRef(function Placeholder2({ lab
|
|
|
11618
12040
|
...style
|
|
11619
12041
|
},
|
|
11620
12042
|
...rest,
|
|
11621
|
-
children: /* @__PURE__ */
|
|
12043
|
+
children: /* @__PURE__ */ jsx92("span", { className: "text-label-m-regular", style: { color: "var(--text-default-label-idle)", textAlign: "center" }, children: label })
|
|
11622
12044
|
}
|
|
11623
12045
|
);
|
|
11624
12046
|
});
|
|
11625
12047
|
|
|
11626
12048
|
// src/DesktopDropdowns/DesktopDropdowns.tsx
|
|
11627
|
-
import * as
|
|
12049
|
+
import * as React98 from "react";
|
|
11628
12050
|
import "@leta-io/icons";
|
|
11629
|
-
|
|
11630
|
-
// src/utils/useRovingFocus.ts
|
|
11631
|
-
import * as React95 from "react";
|
|
11632
|
-
function useRovingFocus(ref) {
|
|
11633
|
-
React95.useEffect(() => {
|
|
11634
|
-
const el = ref.current;
|
|
11635
|
-
if (!el) return;
|
|
11636
|
-
if (el.contains(document.activeElement)) return;
|
|
11637
|
-
if (!el.hasAttribute("tabindex")) el.setAttribute("tabindex", "-1");
|
|
11638
|
-
el.focus({ preventScroll: true });
|
|
11639
|
-
}, []);
|
|
11640
|
-
React95.useEffect(() => {
|
|
11641
|
-
const el = ref.current;
|
|
11642
|
-
if (!el) return;
|
|
11643
|
-
const items = () => {
|
|
11644
|
-
const rows = [...el.querySelectorAll('.leta-dmo[tabindex="0"]')];
|
|
11645
|
-
if (rows.length > 0) return rows.filter(isVisible);
|
|
11646
|
-
return [...el.querySelectorAll(".leta-dmo input, .leta-dmo button")].filter(isVisible);
|
|
11647
|
-
};
|
|
11648
|
-
const onKeyDown = (e) => {
|
|
11649
|
-
const isArrow = e.key === "ArrowDown" || e.key === "ArrowUp";
|
|
11650
|
-
const isEdge = e.key === "Home" || e.key === "End";
|
|
11651
|
-
if (!isArrow && !isEdge) return;
|
|
11652
|
-
if (isEdge && isTextEntry(e.target)) return;
|
|
11653
|
-
const list = items();
|
|
11654
|
-
if (list.length === 0) return;
|
|
11655
|
-
const active = document.activeElement;
|
|
11656
|
-
const at = active ? list.indexOf(active) : -1;
|
|
11657
|
-
let next;
|
|
11658
|
-
if (e.key === "Home") next = 0;
|
|
11659
|
-
else if (e.key === "End") next = list.length - 1;
|
|
11660
|
-
else if (at === -1) next = e.key === "ArrowDown" ? 0 : list.length - 1;
|
|
11661
|
-
else next = (at + (e.key === "ArrowDown" ? 1 : -1) + list.length) % list.length;
|
|
11662
|
-
e.preventDefault();
|
|
11663
|
-
list[next]?.focus();
|
|
11664
|
-
list[next]?.scrollIntoView({ block: "nearest" });
|
|
11665
|
-
};
|
|
11666
|
-
el.addEventListener("keydown", onKeyDown);
|
|
11667
|
-
return () => el.removeEventListener("keydown", onKeyDown);
|
|
11668
|
-
});
|
|
11669
|
-
}
|
|
11670
|
-
function isVisible(el) {
|
|
11671
|
-
return el.offsetParent !== null || el.getClientRects().length > 0;
|
|
11672
|
-
}
|
|
11673
|
-
function isTextEntry(target) {
|
|
11674
|
-
const el = target;
|
|
11675
|
-
if (!el) return false;
|
|
11676
|
-
const tag = el.tagName;
|
|
11677
|
-
return tag === "INPUT" || tag === "TEXTAREA" || el.isContentEditable;
|
|
11678
|
-
}
|
|
11679
|
-
|
|
11680
|
-
// src/DesktopDropdowns/DesktopDropdowns.tsx
|
|
11681
|
-
import { Fragment as Fragment22, jsx as jsx91, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
12051
|
+
import { Fragment as Fragment24, jsx as jsx93, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
11682
12052
|
var WIDTH = {
|
|
11683
12053
|
combobox: 350,
|
|
11684
12054
|
"combobox-empty": 350,
|
|
@@ -11755,18 +12125,18 @@ var USER_MENU_GROUPS = [
|
|
|
11755
12125
|
];
|
|
11756
12126
|
var col4 = { display: "flex", flexDirection: "column", gap: "var(--spacing-4px)" };
|
|
11757
12127
|
function List({ children }) {
|
|
11758
|
-
return /* @__PURE__ */
|
|
12128
|
+
return /* @__PURE__ */ jsx93("div", { style: { ...col4, padding: "var(--padding-8px)" }, children });
|
|
11759
12129
|
}
|
|
11760
12130
|
function ScrollList({ height, flushBottom, children }) {
|
|
11761
|
-
return /* @__PURE__ */
|
|
12131
|
+
return /* @__PURE__ */ jsx93("div", { style: { ...col4, padding: `var(--padding-8px) var(--padding-8px) ${flushBottom ? "0px" : "var(--padding-8px)"}`, maxHeight: height, overflowY: "auto", overscrollBehavior: "contain" }, children });
|
|
11762
12132
|
}
|
|
11763
12133
|
function Divider3() {
|
|
11764
|
-
return /* @__PURE__ */
|
|
12134
|
+
return /* @__PURE__ */ jsx93("div", { style: { height: "var(--stroke-xs)", backgroundColor: "var(--border-neutral-default)", width: "100%", flexShrink: 0 } });
|
|
11765
12135
|
}
|
|
11766
12136
|
function ResultsLabel({ text }) {
|
|
11767
12137
|
const m = text.match(/^(\d[\d,]*)(.*)$/);
|
|
11768
|
-
return /* @__PURE__ */
|
|
11769
|
-
/* @__PURE__ */
|
|
12138
|
+
return /* @__PURE__ */ jsx93("span", { className: "text-body-l-regular", style: { color: "var(--text-default-body)", whiteSpace: "nowrap" }, children: m ? /* @__PURE__ */ jsxs68(Fragment24, { children: [
|
|
12139
|
+
/* @__PURE__ */ jsx93("span", { className: "text-body-l-semibold", children: m[1] }),
|
|
11770
12140
|
m[2]
|
|
11771
12141
|
] }) : text });
|
|
11772
12142
|
}
|
|
@@ -11779,21 +12149,21 @@ function FilterFooter({
|
|
|
11779
12149
|
onSecondaryClick,
|
|
11780
12150
|
onPrimaryClick
|
|
11781
12151
|
}) {
|
|
11782
|
-
return /* @__PURE__ */
|
|
12152
|
+
return /* @__PURE__ */ jsxs68(
|
|
11783
12153
|
FooterFrame,
|
|
11784
12154
|
{
|
|
11785
12155
|
variant: showLeading ? "data-summary" : "default",
|
|
11786
|
-
leading: showLeading ? /* @__PURE__ */
|
|
12156
|
+
leading: showLeading ? /* @__PURE__ */ jsx93(ResultsLabel, { text: resultsText }) : void 0,
|
|
11787
12157
|
scrollShadow: true,
|
|
11788
12158
|
style: { flexShrink: 0 },
|
|
11789
12159
|
children: [
|
|
11790
|
-
/* @__PURE__ */
|
|
11791
|
-
/* @__PURE__ */
|
|
12160
|
+
/* @__PURE__ */ jsx93(Button, { variant: "secondary", size: "medium", disabled: secondaryDisabled, onClick: onSecondaryClick, children: secondaryLabel }),
|
|
12161
|
+
/* @__PURE__ */ jsx93(Button, { variant: "primary", size: "medium", disabled: primaryDisabled, onClick: onPrimaryClick, children: "Show Results" })
|
|
11792
12162
|
]
|
|
11793
12163
|
}
|
|
11794
12164
|
);
|
|
11795
12165
|
}
|
|
11796
|
-
var DesktopDropdowns = /* @__PURE__ */
|
|
12166
|
+
var DesktopDropdowns = /* @__PURE__ */ React98.forwardRef(function DesktopDropdowns2({
|
|
11797
12167
|
variant = "combobox",
|
|
11798
12168
|
options,
|
|
11799
12169
|
activeIndex = 0,
|
|
@@ -11823,12 +12193,12 @@ var DesktopDropdowns = /* @__PURE__ */ React96.forwardRef(function DesktopDropdo
|
|
|
11823
12193
|
const filterOpts = options ?? DEFAULT_FILTER_OPTIONS;
|
|
11824
12194
|
const dims = groups ?? DEFAULT_FILTER_GROUPS;
|
|
11825
12195
|
const fixedHeight = variant === "filter-group" || variant === "filter-group-empty" ? 360 : variant === "basic-filter" || variant === "basic-filter-search" || variant === "basic-filter-search-empty" ? 328 : void 0;
|
|
11826
|
-
const [active, setActive] =
|
|
11827
|
-
const [checked, setChecked] =
|
|
11828
|
-
const [sortField, setSortField] =
|
|
11829
|
-
const [activeGroup, setActiveGroup] =
|
|
11830
|
-
const [groupSearch, setGroupSearch] =
|
|
11831
|
-
const [groupChecked, setGroupChecked] =
|
|
12196
|
+
const [active, setActive] = React98.useState(activeIndex);
|
|
12197
|
+
const [checked, setChecked] = React98.useState(() => /* @__PURE__ */ new Set());
|
|
12198
|
+
const [sortField, setSortField] = React98.useState(sortIndex);
|
|
12199
|
+
const [activeGroup, setActiveGroup] = React98.useState(0);
|
|
12200
|
+
const [groupSearch, setGroupSearch] = React98.useState(variant === "filter-group-empty" ? "Xyzzy" : "");
|
|
12201
|
+
const [groupChecked, setGroupChecked] = React98.useState(
|
|
11832
12202
|
() => dims.map((_, i) => initialGroupSelections?.[i] ?? [])
|
|
11833
12203
|
);
|
|
11834
12204
|
const toggleGroupChecked = (groupIdx, value) => {
|
|
@@ -11847,7 +12217,7 @@ var DesktopDropdowns = /* @__PURE__ */ React96.forwardRef(function DesktopDropdo
|
|
|
11847
12217
|
onGroupSelectionChange?.(next);
|
|
11848
12218
|
onReset?.();
|
|
11849
12219
|
};
|
|
11850
|
-
const [sortDir, setSortDir] =
|
|
12220
|
+
const [sortDir, setSortDir] = React98.useState(sortDirection === "asc" ? 0 : 1);
|
|
11851
12221
|
const toggleChecked = (i) => {
|
|
11852
12222
|
const next = new Set(checked);
|
|
11853
12223
|
if (next.has(i)) next.delete(i);
|
|
@@ -11865,55 +12235,55 @@ var DesktopDropdowns = /* @__PURE__ */ React96.forwardRef(function DesktopDropdo
|
|
|
11865
12235
|
} else {
|
|
11866
12236
|
switch (variant) {
|
|
11867
12237
|
case "combobox":
|
|
11868
|
-
body = /* @__PURE__ */
|
|
12238
|
+
body = /* @__PURE__ */ jsx93(ScrollList, { height: 240, children: opts.map((l, i) => /* @__PURE__ */ jsx93(DesktopMenuOptions, { type: "combobox", label: l, active: i === active, onSelect: () => setActive(i) }, i)) });
|
|
11869
12239
|
break;
|
|
11870
12240
|
case "combobox-empty":
|
|
11871
|
-
body = /* @__PURE__ */
|
|
12241
|
+
body = /* @__PURE__ */ jsx93("div", { style: { height: 248, boxSizing: "border-box", display: "flex", alignItems: "center", justifyContent: "center", padding: "var(--padding-8px)" }, children: /* @__PURE__ */ jsx93(EmptyState, { type: "no-results", size: "desktop", showIcon: false, description: emptyDescription }) });
|
|
11872
12242
|
break;
|
|
11873
12243
|
case "combobox-search":
|
|
11874
|
-
body = /* @__PURE__ */
|
|
11875
|
-
/* @__PURE__ */
|
|
11876
|
-
/* @__PURE__ */
|
|
12244
|
+
body = /* @__PURE__ */ jsxs68(Fragment24, { children: [
|
|
12245
|
+
/* @__PURE__ */ jsx93("div", { style: { padding: "var(--padding-8px)", borderBottom: "var(--stroke-xs) solid var(--border-neutral-default)" }, children: /* @__PURE__ */ jsx93(SearchInput, { placeholder: "Search here...", style: { width: "100%" } }) }),
|
|
12246
|
+
/* @__PURE__ */ jsx93(ScrollList, { height: 240, children: opts.map((l, i) => /* @__PURE__ */ jsx93(DesktopMenuOptions, { type: "combobox", label: l, active: i === active, onSelect: () => setActive(i) }, i)) })
|
|
11877
12247
|
] });
|
|
11878
12248
|
break;
|
|
11879
12249
|
case "combobox-search-empty":
|
|
11880
|
-
body = /* @__PURE__ */
|
|
11881
|
-
/* @__PURE__ */
|
|
12250
|
+
body = /* @__PURE__ */ jsxs68(Fragment24, { children: [
|
|
12251
|
+
/* @__PURE__ */ jsx93("div", { style: { padding: "var(--padding-8px)", borderBottom: "var(--stroke-xs) solid var(--border-neutral-default)" }, children: /* @__PURE__ */ jsx93(SearchInput, { defaultValue: "Xyzzy", onClear: () => {
|
|
11882
12252
|
}, style: { width: "100%" } }) }),
|
|
11883
|
-
/* @__PURE__ */
|
|
12253
|
+
/* @__PURE__ */ jsx93("div", { style: { height: 248, display: "flex", alignItems: "center", justifyContent: "center", padding: "var(--padding-16px)" }, children: /* @__PURE__ */ jsx93(EmptyState, { type: "no-results", size: "desktop", showIcon: false, description: emptyDescription }) })
|
|
11884
12254
|
] });
|
|
11885
12255
|
break;
|
|
11886
12256
|
case "combobox-create":
|
|
11887
|
-
body = /* @__PURE__ */
|
|
11888
|
-
/* @__PURE__ */
|
|
11889
|
-
/* @__PURE__ */
|
|
12257
|
+
body = /* @__PURE__ */ jsxs68(Fragment24, { children: [
|
|
12258
|
+
/* @__PURE__ */ jsx93(ScrollList, { height: 240, flushBottom: true, children: opts.map((l, i) => /* @__PURE__ */ jsx93(DesktopMenuOptions, { type: "combobox", label: l, active: i === active, onSelect: () => setActive(i) }, i)) }),
|
|
12259
|
+
/* @__PURE__ */ jsx93("div", { style: { padding: "var(--padding-8px)", borderTop: "var(--stroke-xs) solid var(--border-neutral-default)", flexShrink: 0 }, children: /* @__PURE__ */ jsx93(Button, { variant: "ghost", size: "medium", iconLeft: "Add", style: { width: "100%", justifyContent: "flex-start" }, children: createLabel }) })
|
|
11890
12260
|
] });
|
|
11891
12261
|
break;
|
|
11892
12262
|
case "combobox-create-empty":
|
|
11893
|
-
body = /* @__PURE__ */
|
|
11894
|
-
/* @__PURE__ */
|
|
11895
|
-
/* @__PURE__ */
|
|
12263
|
+
body = /* @__PURE__ */ jsxs68(Fragment24, { children: [
|
|
12264
|
+
/* @__PURE__ */ jsx93("div", { style: { padding: "var(--padding-16px)" }, children: /* @__PURE__ */ jsx93(NotificationBanner, { type: "info", variant: "subtle", description: "Can\u2019t find a match? Try adding it instead." }) }),
|
|
12265
|
+
/* @__PURE__ */ jsx93("div", { style: { padding: "var(--padding-8px)", borderTop: "var(--stroke-xs) solid var(--border-neutral-default)", flexShrink: 0 }, children: /* @__PURE__ */ jsx93(Button, { variant: "ghost", size: "medium", iconLeft: "Add", style: { width: "100%", justifyContent: "flex-start" }, children: createLabel }) })
|
|
11896
12266
|
] });
|
|
11897
12267
|
break;
|
|
11898
12268
|
case "actions":
|
|
11899
|
-
body = /* @__PURE__ */
|
|
11900
|
-
/* @__PURE__ */
|
|
11901
|
-
/* @__PURE__ */
|
|
11902
|
-
/* @__PURE__ */
|
|
12269
|
+
body = /* @__PURE__ */ jsxs68(Fragment24, { children: [
|
|
12270
|
+
/* @__PURE__ */ jsx93(List, { children: opts.map((l, i) => /* @__PURE__ */ jsx93(DesktopMenuOptions, { type: "dropdown-basic", label: l, showLeadingIcon: true, showChevron: false }, i)) }),
|
|
12271
|
+
/* @__PURE__ */ jsx93(Divider3, {}),
|
|
12272
|
+
/* @__PURE__ */ jsx93("div", { style: { padding: "var(--padding-8px)" }, children: /* @__PURE__ */ jsx93(DesktopMenuOptions, { type: "dropdown-destructive", label: "Delete", showLeadingIcon: true, leadingIcon: "Delete" }) })
|
|
11903
12273
|
] });
|
|
11904
12274
|
break;
|
|
11905
12275
|
case "user-menu":
|
|
11906
|
-
body = /* @__PURE__ */
|
|
11907
|
-
/* @__PURE__ */
|
|
11908
|
-
/* @__PURE__ */
|
|
11909
|
-
/* @__PURE__ */
|
|
11910
|
-
/* @__PURE__ */
|
|
11911
|
-
/* @__PURE__ */
|
|
12276
|
+
body = /* @__PURE__ */ jsxs68(Fragment24, { children: [
|
|
12277
|
+
/* @__PURE__ */ jsx93("div", { style: { padding: "var(--padding-8px)" }, children: /* @__PURE__ */ jsxs68("div", { style: { display: "flex", alignItems: "center", gap: "var(--spacing-8px)", padding: "var(--padding-10px)" }, children: [
|
|
12278
|
+
/* @__PURE__ */ jsx93(Avatar, { name: userName, src: userAvatarSrc, size: "small", tone: userTone }),
|
|
12279
|
+
/* @__PURE__ */ jsxs68("div", { style: { display: "flex", flexDirection: "column", gap: "var(--spacing-4px)", minWidth: 0 }, children: [
|
|
12280
|
+
/* @__PURE__ */ jsx93("span", { className: "text-label-l-semibold", style: { color: "var(--text-default-heading)", whiteSpace: "nowrap" }, children: userName }),
|
|
12281
|
+
/* @__PURE__ */ jsx93("span", { className: "text-label-s-regular", style: { color: "var(--text-default-sub-body)", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: userEmail })
|
|
11912
12282
|
] })
|
|
11913
12283
|
] }) }),
|
|
11914
|
-
USER_MENU_GROUPS.map((group, gi) => /* @__PURE__ */
|
|
11915
|
-
/* @__PURE__ */
|
|
11916
|
-
/* @__PURE__ */
|
|
12284
|
+
USER_MENU_GROUPS.map((group, gi) => /* @__PURE__ */ jsxs68(React98.Fragment, { children: [
|
|
12285
|
+
/* @__PURE__ */ jsx93(Divider3, {}),
|
|
12286
|
+
/* @__PURE__ */ jsx93(List, { children: group.map((item) => /* @__PURE__ */ jsx93(
|
|
11917
12287
|
DesktopMenuOptions,
|
|
11918
12288
|
{
|
|
11919
12289
|
type: "dropdown-basic",
|
|
@@ -11939,12 +12309,12 @@ var DesktopDropdowns = /* @__PURE__ */ React96.forwardRef(function DesktopDropdo
|
|
|
11939
12309
|
setSortDir(d);
|
|
11940
12310
|
onSortChange?.({ index: sortField, label: sel?.label ?? "", direction: d === 0 ? "asc" : "desc" });
|
|
11941
12311
|
};
|
|
11942
|
-
body = /* @__PURE__ */
|
|
11943
|
-
/* @__PURE__ */
|
|
11944
|
-
/* @__PURE__ */
|
|
11945
|
-
/* @__PURE__ */
|
|
11946
|
-
/* @__PURE__ */
|
|
11947
|
-
/* @__PURE__ */
|
|
12312
|
+
body = /* @__PURE__ */ jsxs68(Fragment24, { children: [
|
|
12313
|
+
/* @__PURE__ */ jsx93(List, { children: sortOptions.map((o, i) => /* @__PURE__ */ jsx93(DesktopMenuOptions, { type: "radio-selection", label: o.label, selected: i === sortField, onSelect: () => pickField(i) }, `${o.label}-${i}`)) }),
|
|
12314
|
+
/* @__PURE__ */ jsx93(Divider3, {}),
|
|
12315
|
+
/* @__PURE__ */ jsxs68(List, { children: [
|
|
12316
|
+
/* @__PURE__ */ jsx93(DesktopMenuOptions, { type: "combobox", label: ascLabel, showLeadingIcon: true, leadingIcon: "Up-Arrow", active: sortDir === 0, onSelect: () => pickDir(0) }),
|
|
12317
|
+
/* @__PURE__ */ jsx93(DesktopMenuOptions, { type: "combobox", label: descLabel, showLeadingIcon: true, leadingIcon: "Down-Arrow", active: sortDir === 1, onSelect: () => pickDir(1) })
|
|
11948
12318
|
] })
|
|
11949
12319
|
] });
|
|
11950
12320
|
break;
|
|
@@ -11954,15 +12324,15 @@ var DesktopDropdowns = /* @__PURE__ */ React96.forwardRef(function DesktopDropdo
|
|
|
11954
12324
|
case "basic-filter-search-empty": {
|
|
11955
12325
|
const search = variant !== "basic-filter";
|
|
11956
12326
|
const searchEmpty = variant === "basic-filter-search-empty";
|
|
11957
|
-
body = /* @__PURE__ */
|
|
12327
|
+
body = /* @__PURE__ */ jsxs68(Fragment24, { children: [
|
|
11958
12328
|
search && // Figma "Search" frame: pad 8 + a 1px bottom outline separating it from the list.
|
|
11959
|
-
/* @__PURE__ */
|
|
12329
|
+
/* @__PURE__ */ jsx93("div", { style: { padding: "var(--padding-8px)", borderBottom: "var(--stroke-xs) solid var(--border-neutral-default)", flexShrink: 0 }, children: /* @__PURE__ */ jsx93(SearchInput, { ...searchEmpty ? { defaultValue: "Xyzzy", onClear: () => {
|
|
11960
12330
|
} } : { placeholder: "Search here..." }, style: { width: "100%" } }) }),
|
|
11961
|
-
searchEmpty ? /* @__PURE__ */
|
|
12331
|
+
searchEmpty ? /* @__PURE__ */ jsx93("div", { style: { flex: 1, minHeight: 0, display: "flex", alignItems: "center", justifyContent: "center", padding: "var(--padding-8px)" }, children: /* @__PURE__ */ jsx93(EmptyState, { type: "no-results", size: "desktop", showIcon: false, style: { maxWidth: "100%" } }) }) : (
|
|
11962
12332
|
// Flex-fill the fixed 328 card (Figma): list scrolls under the footer.
|
|
11963
|
-
/* @__PURE__ */
|
|
12333
|
+
/* @__PURE__ */ jsx93("div", { style: { ...col4, flex: 1, minHeight: 0, padding: "var(--padding-8px)", overflowY: "auto", overscrollBehavior: "contain" }, children: filterOpts.map((l, i) => /* @__PURE__ */ jsx93(DesktopMenuOptions, { type: "checkbox-selection", label: l, selected: checked.has(i), onSelect: () => toggleChecked(i) }, i)) })
|
|
11964
12334
|
),
|
|
11965
|
-
/* @__PURE__ */
|
|
12335
|
+
/* @__PURE__ */ jsx93(FilterFooter, { resultsText, secondaryLabel: "Reset", primaryDisabled: searchEmpty })
|
|
11966
12336
|
] });
|
|
11967
12337
|
break;
|
|
11968
12338
|
}
|
|
@@ -11972,9 +12342,9 @@ var DesktopDropdowns = /* @__PURE__ */ React96.forwardRef(function DesktopDropdo
|
|
|
11972
12342
|
const q = groupSearch.trim().toLowerCase();
|
|
11973
12343
|
const visibleOptions = activeDim ? activeDim.options.filter((o) => o.toLowerCase().includes(q)) : [];
|
|
11974
12344
|
const noMatch = visibleOptions.length === 0;
|
|
11975
|
-
body = /* @__PURE__ */
|
|
11976
|
-
/* @__PURE__ */
|
|
11977
|
-
/* @__PURE__ */
|
|
12345
|
+
body = /* @__PURE__ */ jsxs68(Fragment24, { children: [
|
|
12346
|
+
/* @__PURE__ */ jsxs68("div", { style: { display: "flex", flexDirection: "row", flex: 1, minHeight: 0, justifyContent: "space-between" }, children: [
|
|
12347
|
+
/* @__PURE__ */ jsx93("div", { style: { width: 196, flexShrink: 0, boxSizing: "border-box", display: "flex", flexDirection: "column", gap: "var(--spacing-12px)", padding: "16px 16px 0 16px", borderRight: "var(--stroke-xs) solid var(--border-neutral-default)", overflowY: "auto", overscrollBehavior: "contain" }, children: dims.map((d, i) => /* @__PURE__ */ jsx93(
|
|
11978
12348
|
DesktopMenuOptions,
|
|
11979
12349
|
{
|
|
11980
12350
|
type: "filter-group",
|
|
@@ -11990,9 +12360,9 @@ var DesktopDropdowns = /* @__PURE__ */ React96.forwardRef(function DesktopDropdo
|
|
|
11990
12360
|
},
|
|
11991
12361
|
d.label
|
|
11992
12362
|
)) }),
|
|
11993
|
-
/* @__PURE__ */
|
|
11994
|
-
/* @__PURE__ */
|
|
11995
|
-
noMatch ? /* @__PURE__ */
|
|
12363
|
+
/* @__PURE__ */ jsxs68("div", { style: { flex: 1, minWidth: 0, minHeight: 0, boxSizing: "border-box", display: "flex", flexDirection: "column", gap: "var(--spacing-12px)", padding: "16px 16px 0 16px" }, children: [
|
|
12364
|
+
/* @__PURE__ */ jsx93(SearchInput, { placeholder: "Search here...", value: groupSearch, onChange: (e) => setGroupSearch(e.target.value), onClear: () => setGroupSearch(""), style: { width: "100%" } }),
|
|
12365
|
+
noMatch ? /* @__PURE__ */ jsx93("div", { style: { flex: 1, minWidth: 0, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsx93(
|
|
11996
12366
|
EmptyState,
|
|
11997
12367
|
{
|
|
11998
12368
|
type: "no-results",
|
|
@@ -12001,10 +12371,10 @@ var DesktopDropdowns = /* @__PURE__ */ React96.forwardRef(function DesktopDropdo
|
|
|
12001
12371
|
description: activeDim ? `All ${pluralizeDimension(activeDim.label)} will be displayed here.` : void 0,
|
|
12002
12372
|
style: { maxWidth: "100%" }
|
|
12003
12373
|
}
|
|
12004
|
-
) }) : /* @__PURE__ */
|
|
12374
|
+
) }) : /* @__PURE__ */ jsx93("div", { style: { flex: 1, minHeight: 0, overflowY: "auto", overscrollBehavior: "contain", ...col4 }, children: visibleOptions.map((l) => /* @__PURE__ */ jsx93(DesktopMenuOptions, { type: "checkbox-selection", label: l, selected: groupChecked[activeGroup]?.includes(l) ?? false, onSelect: () => toggleGroupChecked(activeGroup, l) }, l)) })
|
|
12005
12375
|
] })
|
|
12006
12376
|
] }),
|
|
12007
|
-
/* @__PURE__ */
|
|
12377
|
+
/* @__PURE__ */ jsx93(
|
|
12008
12378
|
FilterFooter,
|
|
12009
12379
|
{
|
|
12010
12380
|
resultsText,
|
|
@@ -12019,19 +12389,19 @@ var DesktopDropdowns = /* @__PURE__ */ React96.forwardRef(function DesktopDropdo
|
|
|
12019
12389
|
break;
|
|
12020
12390
|
}
|
|
12021
12391
|
case "timepicker":
|
|
12022
|
-
body = /* @__PURE__ */
|
|
12392
|
+
body = /* @__PURE__ */ jsx93(ScrollList, { height: 232, children: TIMES.map((t, i) => /* @__PURE__ */ jsx93(DesktopMenuOptions, { type: "combobox", label: t, active: i === active, onSelect: () => setActive(i) }, t)) });
|
|
12023
12393
|
break;
|
|
12024
12394
|
case "stacked-list":
|
|
12025
|
-
body = /* @__PURE__ */
|
|
12026
|
-
/* @__PURE__ */
|
|
12027
|
-
i < arr.length - 1 && /* @__PURE__ */
|
|
12395
|
+
body = /* @__PURE__ */ jsx93("div", { style: { display: "flex", flexDirection: "column", gap: "var(--spacing-8px)", padding: "var(--padding-8px)" }, children: (options ?? ["a", "b", "c", "d"]).map((_, i, arr) => /* @__PURE__ */ jsxs68(React98.Fragment, { children: [
|
|
12396
|
+
/* @__PURE__ */ jsx93(DesktopMenuOptions, { type: "dropdown-advanced", label: "Title", subtext: "Enter description here" }),
|
|
12397
|
+
i < arr.length - 1 && /* @__PURE__ */ jsx93(Divider3, {})
|
|
12028
12398
|
] }, i)) });
|
|
12029
12399
|
break;
|
|
12030
12400
|
}
|
|
12031
12401
|
}
|
|
12032
|
-
const cardRef =
|
|
12402
|
+
const cardRef = React98.useRef(null);
|
|
12033
12403
|
useRovingFocus(cardRef);
|
|
12034
|
-
return /* @__PURE__ */
|
|
12404
|
+
return /* @__PURE__ */ jsx93(
|
|
12035
12405
|
"div",
|
|
12036
12406
|
{
|
|
12037
12407
|
ref: (node) => {
|
|
@@ -12158,21 +12528,21 @@ var LAST_UPDATED_COLUMN = { label: "Last Updated", role: "utility", width: 120 }
|
|
|
12158
12528
|
var CREATED_BY_COLUMN = { label: "Created By", role: "primary", flex: 0.5, minWidth: 200 };
|
|
12159
12529
|
|
|
12160
12530
|
// src/BulkActionsToolbar/BulkActionsToolbar.tsx
|
|
12161
|
-
import * as
|
|
12162
|
-
import { Fragment as
|
|
12163
|
-
var DefaultActions = () => /* @__PURE__ */
|
|
12164
|
-
/* @__PURE__ */
|
|
12165
|
-
/* @__PURE__ */
|
|
12166
|
-
/* @__PURE__ */
|
|
12531
|
+
import * as React99 from "react";
|
|
12532
|
+
import { Fragment as Fragment26, jsx as jsx94, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
12533
|
+
var DefaultActions = () => /* @__PURE__ */ jsxs69(Fragment26, { children: [
|
|
12534
|
+
/* @__PURE__ */ jsx94(Button, { variant: "ghost", size: "medium", iconLeft: "Proceed", iconOutlined: true, children: "Action" }),
|
|
12535
|
+
/* @__PURE__ */ jsx94(Button, { variant: "ghost", size: "medium", iconLeft: "Proceed", iconOutlined: true, children: "Action" }),
|
|
12536
|
+
/* @__PURE__ */ jsx94(Button, { variant: "ghost-error", size: "medium", iconLeft: "Proceed", iconOutlined: true, children: "Action" })
|
|
12167
12537
|
] });
|
|
12168
|
-
var Divider4 = () => /* @__PURE__ */
|
|
12538
|
+
var Divider4 = () => /* @__PURE__ */ jsx94(
|
|
12169
12539
|
"div",
|
|
12170
12540
|
{
|
|
12171
12541
|
"aria-hidden": true,
|
|
12172
12542
|
style: { alignSelf: "center", width: "var(--stroke-xs)", height: 32, backgroundColor: "var(--border-neutral-default)", flexShrink: 0 }
|
|
12173
12543
|
}
|
|
12174
12544
|
);
|
|
12175
|
-
var BulkActionsToolbar = /* @__PURE__ */
|
|
12545
|
+
var BulkActionsToolbar = /* @__PURE__ */ React99.forwardRef(
|
|
12176
12546
|
function BulkActionsToolbar2({
|
|
12177
12547
|
selectionLabel = "10 selected",
|
|
12178
12548
|
onSelectionClick,
|
|
@@ -12186,12 +12556,12 @@ var BulkActionsToolbar = /* @__PURE__ */ React97.forwardRef(
|
|
|
12186
12556
|
style,
|
|
12187
12557
|
...rest
|
|
12188
12558
|
}, ref) {
|
|
12189
|
-
return /* @__PURE__ */
|
|
12559
|
+
return /* @__PURE__ */ jsxs69(
|
|
12190
12560
|
"div",
|
|
12191
12561
|
{
|
|
12192
12562
|
ref,
|
|
12193
12563
|
role: "toolbar",
|
|
12194
|
-
"aria-label": "Bulk
|
|
12564
|
+
"aria-label": "Bulk Actions",
|
|
12195
12565
|
className: ["leta-bulk-actions-toolbar", className].filter(Boolean).join(" "),
|
|
12196
12566
|
style: {
|
|
12197
12567
|
boxSizing: "border-box",
|
|
@@ -12210,24 +12580,24 @@ var BulkActionsToolbar = /* @__PURE__ */ React97.forwardRef(
|
|
|
12210
12580
|
},
|
|
12211
12581
|
...rest,
|
|
12212
12582
|
children: [
|
|
12213
|
-
/* @__PURE__ */
|
|
12214
|
-
/* @__PURE__ */
|
|
12215
|
-
summaryItems && summaryItems.length > 0 && /* @__PURE__ */
|
|
12216
|
-
i > 0 && /* @__PURE__ */
|
|
12217
|
-
/* @__PURE__ */
|
|
12218
|
-
/* @__PURE__ */
|
|
12583
|
+
/* @__PURE__ */ jsxs69("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "var(--spacing-12px)" }, children: [
|
|
12584
|
+
/* @__PURE__ */ jsx94(Button, { variant: "ghost", size: "medium", iconRight: "Chevron-Down", onClick: onSelectionClick, children: selectionLabel }),
|
|
12585
|
+
summaryItems && summaryItems.length > 0 && /* @__PURE__ */ jsx94("span", { style: { color: "var(--text-default-label)", whiteSpace: "nowrap" }, children: summaryItems.map((item, i) => /* @__PURE__ */ jsxs69(React99.Fragment, { children: [
|
|
12586
|
+
i > 0 && /* @__PURE__ */ jsx94("span", { className: "text-label-m-regular", children: " \xB7 " }),
|
|
12587
|
+
/* @__PURE__ */ jsx94("span", { className: "text-label-m-semibold", children: item.value }),
|
|
12588
|
+
/* @__PURE__ */ jsxs69("span", { className: "text-label-m-regular", children: [
|
|
12219
12589
|
" ",
|
|
12220
12590
|
item.unit
|
|
12221
12591
|
] })
|
|
12222
12592
|
] }, i)) })
|
|
12223
12593
|
] }),
|
|
12224
|
-
/* @__PURE__ */
|
|
12225
|
-
/* @__PURE__ */
|
|
12226
|
-
actions ?? /* @__PURE__ */
|
|
12227
|
-
showOverflow && /* @__PURE__ */
|
|
12594
|
+
/* @__PURE__ */ jsx94(Divider4, {}),
|
|
12595
|
+
/* @__PURE__ */ jsxs69("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "var(--spacing-12px)" }, children: [
|
|
12596
|
+
actions ?? /* @__PURE__ */ jsx94(DefaultActions, {}),
|
|
12597
|
+
showOverflow && /* @__PURE__ */ jsx94(HoverTip, { label: "More Actions", children: /* @__PURE__ */ jsx94(Button, { variant: "ghost", size: "medium", prominent: true, iconOnly: "More", "aria-label": "More Actions", onClick: onOverflowClick }) })
|
|
12228
12598
|
] }),
|
|
12229
|
-
/* @__PURE__ */
|
|
12230
|
-
/* @__PURE__ */
|
|
12599
|
+
/* @__PURE__ */ jsx94(Divider4, {}),
|
|
12600
|
+
/* @__PURE__ */ jsx94(HoverTip, { label: "Clear Selections", children: /* @__PURE__ */ jsx94(Button, { variant: "ghost", size: "medium", prominent: true, iconOnly: "Cancel", "aria-label": "Clear Selections", onClick: onClose }) })
|
|
12231
12601
|
]
|
|
12232
12602
|
}
|
|
12233
12603
|
);
|
|
@@ -12235,11 +12605,11 @@ var BulkActionsToolbar = /* @__PURE__ */ React97.forwardRef(
|
|
|
12235
12605
|
);
|
|
12236
12606
|
|
|
12237
12607
|
// src/ListSection/ListSection.tsx
|
|
12238
|
-
import * as
|
|
12239
|
-
import { jsx as
|
|
12608
|
+
import * as React100 from "react";
|
|
12609
|
+
import { jsx as jsx95, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
12240
12610
|
var DASHED2 = "var(--stroke-xs) dashed var(--border-neutral-default)";
|
|
12241
12611
|
function ListDemarcator() {
|
|
12242
|
-
return /* @__PURE__ */
|
|
12612
|
+
return /* @__PURE__ */ jsx95(
|
|
12243
12613
|
"div",
|
|
12244
12614
|
{
|
|
12245
12615
|
role: "separator",
|
|
@@ -12252,20 +12622,20 @@ var DEFAULT_ITEMS = Array.from({ length: 6 }, () => ({
|
|
|
12252
12622
|
label: "Text",
|
|
12253
12623
|
value: "Enter Description here"
|
|
12254
12624
|
}));
|
|
12255
|
-
var ListGroup = /* @__PURE__ */
|
|
12625
|
+
var ListGroup = /* @__PURE__ */ React100.forwardRef(
|
|
12256
12626
|
function ListGroup2({ title = "Group Name", description = "Enter description here", items = DEFAULT_ITEMS, children, style, ...rest }, ref) {
|
|
12257
12627
|
const rows = [];
|
|
12258
12628
|
for (let i = 0; i < items.length; i += 2) {
|
|
12259
12629
|
rows.push(items.slice(i, i + 2));
|
|
12260
12630
|
}
|
|
12261
|
-
return /* @__PURE__ */
|
|
12631
|
+
return /* @__PURE__ */ jsxs70(
|
|
12262
12632
|
"div",
|
|
12263
12633
|
{
|
|
12264
12634
|
ref,
|
|
12265
12635
|
style: { display: "flex", flexDirection: "column", gap: "var(--spacing-20px)", width: "100%", ...style },
|
|
12266
12636
|
...rest,
|
|
12267
12637
|
children: [
|
|
12268
|
-
/* @__PURE__ */
|
|
12638
|
+
/* @__PURE__ */ jsx95(
|
|
12269
12639
|
ContentPrimitives,
|
|
12270
12640
|
{
|
|
12271
12641
|
type: "group-header",
|
|
@@ -12278,7 +12648,7 @@ var ListGroup = /* @__PURE__ */ React98.forwardRef(
|
|
|
12278
12648
|
showInteractiveElements: false
|
|
12279
12649
|
}
|
|
12280
12650
|
),
|
|
12281
|
-
children ?? /* @__PURE__ */
|
|
12651
|
+
children ?? /* @__PURE__ */ jsx95("div", { style: { display: "flex", flexDirection: "column", gap: "var(--spacing-20px)", width: "100%" }, children: rows.map((pair, rowIdx) => /* @__PURE__ */ jsx95("div", { style: { display: "flex", gap: "var(--spacing-16px)", width: "100%" }, children: pair.map((item, colIdx) => /* @__PURE__ */ jsx95(
|
|
12282
12652
|
ContentPrimitives,
|
|
12283
12653
|
{
|
|
12284
12654
|
type: "vertical-list-row",
|
|
@@ -12297,16 +12667,16 @@ var ListGroup = /* @__PURE__ */ React98.forwardRef(
|
|
|
12297
12667
|
);
|
|
12298
12668
|
}
|
|
12299
12669
|
);
|
|
12300
|
-
var ListSection = /* @__PURE__ */
|
|
12670
|
+
var ListSection = /* @__PURE__ */ React100.forwardRef(
|
|
12301
12671
|
function ListSection2({ title = "Title", subtext = "Enter description here", children, defaultOpen = true, style, ...rest }, ref) {
|
|
12302
12672
|
const { open, toggle } = useAccordion(defaultOpen);
|
|
12303
|
-
const items =
|
|
12673
|
+
const items = React100.Children.toArray(children ?? [/* @__PURE__ */ jsx95(ListGroup, {}, "g1"), /* @__PURE__ */ jsx95(ListGroup, {}, "g2")]);
|
|
12304
12674
|
const body = [];
|
|
12305
12675
|
items.forEach((child, i) => {
|
|
12306
|
-
if (i > 0) body.push(/* @__PURE__ */
|
|
12676
|
+
if (i > 0) body.push(/* @__PURE__ */ jsx95(ListDemarcator, {}, `d${i}`));
|
|
12307
12677
|
body.push(child);
|
|
12308
12678
|
});
|
|
12309
|
-
return /* @__PURE__ */
|
|
12679
|
+
return /* @__PURE__ */ jsxs70(
|
|
12310
12680
|
"div",
|
|
12311
12681
|
{
|
|
12312
12682
|
ref,
|
|
@@ -12325,7 +12695,7 @@ var ListSection = /* @__PURE__ */ React98.forwardRef(
|
|
|
12325
12695
|
},
|
|
12326
12696
|
...rest,
|
|
12327
12697
|
children: [
|
|
12328
|
-
/* @__PURE__ */
|
|
12698
|
+
/* @__PURE__ */ jsx95(AccordionHeader, { open, onToggle: toggle, children: /* @__PURE__ */ jsx95(
|
|
12329
12699
|
ContentPrimitives,
|
|
12330
12700
|
{
|
|
12331
12701
|
type: "section-heading",
|
|
@@ -12333,11 +12703,11 @@ var ListSection = /* @__PURE__ */ React98.forwardRef(
|
|
|
12333
12703
|
subtext,
|
|
12334
12704
|
showTrailingContent: true,
|
|
12335
12705
|
showInteractiveElements: true,
|
|
12336
|
-
interactiveElements: /* @__PURE__ */
|
|
12706
|
+
interactiveElements: /* @__PURE__ */ jsx95(AccordionChevron, { open, onToggle: toggle }),
|
|
12337
12707
|
showPassiveElements: false
|
|
12338
12708
|
}
|
|
12339
12709
|
) }),
|
|
12340
|
-
/* @__PURE__ */
|
|
12710
|
+
/* @__PURE__ */ jsx95(AccordionContent, { open, gap: "var(--spacing-24px)", children: body })
|
|
12341
12711
|
]
|
|
12342
12712
|
}
|
|
12343
12713
|
);
|
|
@@ -12345,9 +12715,9 @@ var ListSection = /* @__PURE__ */ React98.forwardRef(
|
|
|
12345
12715
|
);
|
|
12346
12716
|
|
|
12347
12717
|
// src/TableSection/TableSection.tsx
|
|
12348
|
-
import * as
|
|
12349
|
-
import { jsx as
|
|
12350
|
-
var TableSection = /* @__PURE__ */
|
|
12718
|
+
import * as React101 from "react";
|
|
12719
|
+
import { jsx as jsx96, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
12720
|
+
var TableSection = /* @__PURE__ */ React101.forwardRef(
|
|
12351
12721
|
function TableSection2({
|
|
12352
12722
|
title = "Title",
|
|
12353
12723
|
subtext = "Enter description here",
|
|
@@ -12358,7 +12728,7 @@ var TableSection = /* @__PURE__ */ React99.forwardRef(
|
|
|
12358
12728
|
...rest
|
|
12359
12729
|
}, ref) {
|
|
12360
12730
|
const { open, toggle } = useAccordion(defaultOpen);
|
|
12361
|
-
return /* @__PURE__ */
|
|
12731
|
+
return /* @__PURE__ */ jsxs71(
|
|
12362
12732
|
"div",
|
|
12363
12733
|
{
|
|
12364
12734
|
ref,
|
|
@@ -12373,7 +12743,7 @@ var TableSection = /* @__PURE__ */ React99.forwardRef(
|
|
|
12373
12743
|
},
|
|
12374
12744
|
...rest,
|
|
12375
12745
|
children: [
|
|
12376
|
-
/* @__PURE__ */
|
|
12746
|
+
/* @__PURE__ */ jsx96(AccordionHeader, { open, onToggle: toggle, children: /* @__PURE__ */ jsx96(
|
|
12377
12747
|
ContentPrimitives,
|
|
12378
12748
|
{
|
|
12379
12749
|
type: "section-heading",
|
|
@@ -12381,14 +12751,14 @@ var TableSection = /* @__PURE__ */ React99.forwardRef(
|
|
|
12381
12751
|
subtext,
|
|
12382
12752
|
showTrailingContent: true,
|
|
12383
12753
|
showInteractiveElements: true,
|
|
12384
|
-
interactiveElements: /* @__PURE__ */
|
|
12754
|
+
interactiveElements: /* @__PURE__ */ jsx96(AccordionChevron, { open, onToggle: toggle }),
|
|
12385
12755
|
showPassiveElements: false
|
|
12386
12756
|
}
|
|
12387
12757
|
) }),
|
|
12388
|
-
/* @__PURE__ */
|
|
12758
|
+
/* @__PURE__ */ jsx96(AccordionContent, { open, gap: "var(--spacing-24px)", children: children ?? /* @__PURE__ */ jsx96(
|
|
12389
12759
|
TableContainer,
|
|
12390
12760
|
{
|
|
12391
|
-
controls: /* @__PURE__ */
|
|
12761
|
+
controls: /* @__PURE__ */ jsx96(TableDataControl, { variant: "search-column", showColumnControl: false, filterCount })
|
|
12392
12762
|
}
|
|
12393
12763
|
) })
|
|
12394
12764
|
]
|
|
@@ -12398,9 +12768,9 @@ var TableSection = /* @__PURE__ */ React99.forwardRef(
|
|
|
12398
12768
|
);
|
|
12399
12769
|
|
|
12400
12770
|
// src/AlertDialog/AlertDialog.tsx
|
|
12401
|
-
import * as
|
|
12402
|
-
import { jsx as
|
|
12403
|
-
var AlertDialog = /* @__PURE__ */
|
|
12771
|
+
import * as React102 from "react";
|
|
12772
|
+
import { jsx as jsx97, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
12773
|
+
var AlertDialog = /* @__PURE__ */ React102.forwardRef(
|
|
12404
12774
|
function AlertDialog2({
|
|
12405
12775
|
variant = "basic",
|
|
12406
12776
|
title = "Title",
|
|
@@ -12416,7 +12786,7 @@ var AlertDialog = /* @__PURE__ */ React100.forwardRef(
|
|
|
12416
12786
|
onClose,
|
|
12417
12787
|
...rest
|
|
12418
12788
|
}, ref) {
|
|
12419
|
-
return /* @__PURE__ */
|
|
12789
|
+
return /* @__PURE__ */ jsxs72(
|
|
12420
12790
|
ModalShell,
|
|
12421
12791
|
{
|
|
12422
12792
|
ref,
|
|
@@ -12425,7 +12795,7 @@ var AlertDialog = /* @__PURE__ */ React100.forwardRef(
|
|
|
12425
12795
|
role: "alertdialog",
|
|
12426
12796
|
"aria-label": title,
|
|
12427
12797
|
onEscape: onClose ?? onCancel,
|
|
12428
|
-
header: /* @__PURE__ */
|
|
12798
|
+
header: /* @__PURE__ */ jsx97(
|
|
12429
12799
|
ModalHeaders,
|
|
12430
12800
|
{
|
|
12431
12801
|
variant: "default",
|
|
@@ -12437,14 +12807,14 @@ var AlertDialog = /* @__PURE__ */ React100.forwardRef(
|
|
|
12437
12807
|
leadingIconColor: variant === "warning" ? "var(--icons-warning-default)" : void 0
|
|
12438
12808
|
}
|
|
12439
12809
|
),
|
|
12440
|
-
footer: /* @__PURE__ */
|
|
12810
|
+
footer: /* @__PURE__ */ jsxs72(
|
|
12441
12811
|
FooterFrame,
|
|
12442
12812
|
{
|
|
12443
12813
|
variant: footerLeading ? "tertiary-action" : "default",
|
|
12444
12814
|
leading: footerLeading,
|
|
12445
12815
|
children: [
|
|
12446
|
-
/* @__PURE__ */
|
|
12447
|
-
/* @__PURE__ */
|
|
12816
|
+
/* @__PURE__ */ jsx97(Button, { variant: "secondary", size: "medium", onClick: onCancel, children: cancelLabel }),
|
|
12817
|
+
/* @__PURE__ */ jsx97(Button, { variant: destructive ? "destructive" : "primary", size: "medium", onClick: onConfirm, children: confirmLabel })
|
|
12448
12818
|
]
|
|
12449
12819
|
}
|
|
12450
12820
|
),
|
|
@@ -12452,7 +12822,7 @@ var AlertDialog = /* @__PURE__ */ React100.forwardRef(
|
|
|
12452
12822
|
...rest,
|
|
12453
12823
|
children: [
|
|
12454
12824
|
banner,
|
|
12455
|
-
children ?? /* @__PURE__ */
|
|
12825
|
+
children ?? /* @__PURE__ */ jsx97(
|
|
12456
12826
|
"span",
|
|
12457
12827
|
{
|
|
12458
12828
|
className: "text-body-l-regular",
|
|
@@ -12467,7 +12837,7 @@ var AlertDialog = /* @__PURE__ */ React100.forwardRef(
|
|
|
12467
12837
|
);
|
|
12468
12838
|
|
|
12469
12839
|
// src/ModalDialog/ModalDialog.tsx
|
|
12470
|
-
import * as
|
|
12840
|
+
import * as React103 from "react";
|
|
12471
12841
|
|
|
12472
12842
|
// src/utils/downloadFile.ts
|
|
12473
12843
|
async function downloadFile(url, filename) {
|
|
@@ -12495,7 +12865,7 @@ var SIGNATURE_IMAGE = new URL("./assets/signature.png", import.meta.url).href;
|
|
|
12495
12865
|
var DOORSTEP_DELIVERY_IMAGE = new URL("./assets/doorstep-delivery.png", import.meta.url).href;
|
|
12496
12866
|
|
|
12497
12867
|
// src/ModalDialog/ModalDialog.tsx
|
|
12498
|
-
import { Fragment as
|
|
12868
|
+
import { Fragment as Fragment27, jsx as jsx98, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
12499
12869
|
var IMAGE_VARIANTS = /* @__PURE__ */ new Set(["signature", "image"]);
|
|
12500
12870
|
var DEFAULT_DOWNLOAD_FILENAME = {
|
|
12501
12871
|
signature: "signature.png",
|
|
@@ -12526,7 +12896,7 @@ var RECT = {
|
|
|
12526
12896
|
function defaultBody(variant, imageSrc, signatureSrc) {
|
|
12527
12897
|
switch (variant) {
|
|
12528
12898
|
case "comment":
|
|
12529
|
-
return /* @__PURE__ */
|
|
12899
|
+
return /* @__PURE__ */ jsx98(
|
|
12530
12900
|
TextArea,
|
|
12531
12901
|
{
|
|
12532
12902
|
showLabel: false,
|
|
@@ -12537,12 +12907,12 @@ function defaultBody(variant, imageSrc, signatureSrc) {
|
|
|
12537
12907
|
}
|
|
12538
12908
|
);
|
|
12539
12909
|
case "form":
|
|
12540
|
-
return /* @__PURE__ */
|
|
12541
|
-
/* @__PURE__ */
|
|
12542
|
-
/* @__PURE__ */
|
|
12910
|
+
return /* @__PURE__ */ jsxs73("div", { style: { display: "flex", flexDirection: "row", gap: 32, width: "100%" }, children: [
|
|
12911
|
+
/* @__PURE__ */ jsx98(InputField, { label: "Label Text", showHelper: false, placeholder: "Field Text", style: { flex: 1 } }),
|
|
12912
|
+
/* @__PURE__ */ jsx98(InputField, { label: "Label Text", showHelper: false, placeholder: "Field Text", style: { flex: 1 } })
|
|
12543
12913
|
] });
|
|
12544
12914
|
case "signature":
|
|
12545
|
-
return /* @__PURE__ */
|
|
12915
|
+
return /* @__PURE__ */ jsx98(
|
|
12546
12916
|
"div",
|
|
12547
12917
|
{
|
|
12548
12918
|
role: "img",
|
|
@@ -12555,7 +12925,7 @@ function defaultBody(variant, imageSrc, signatureSrc) {
|
|
|
12555
12925
|
}
|
|
12556
12926
|
);
|
|
12557
12927
|
case "image":
|
|
12558
|
-
return /* @__PURE__ */
|
|
12928
|
+
return /* @__PURE__ */ jsx98(
|
|
12559
12929
|
"div",
|
|
12560
12930
|
{
|
|
12561
12931
|
role: "img",
|
|
@@ -12571,10 +12941,10 @@ function defaultBody(variant, imageSrc, signatureSrc) {
|
|
|
12571
12941
|
}
|
|
12572
12942
|
);
|
|
12573
12943
|
case "multi-choice":
|
|
12574
|
-
return /* @__PURE__ */
|
|
12944
|
+
return /* @__PURE__ */ jsx98("div", { style: { display: "flex", flexDirection: "column", gap: 16, width: "100%" }, children: Array.from({ length: 7 }).map((_, i) => /* @__PURE__ */ jsx98(OptionCard, { title: "Text", description: "Enter description here", showTrailing: false }, i)) });
|
|
12575
12945
|
}
|
|
12576
12946
|
}
|
|
12577
|
-
var ModalDialog = /* @__PURE__ */
|
|
12947
|
+
var ModalDialog = /* @__PURE__ */ React103.forwardRef(
|
|
12578
12948
|
function ModalDialog2({
|
|
12579
12949
|
variant = "comment",
|
|
12580
12950
|
title = "Title",
|
|
@@ -12604,7 +12974,7 @@ var ModalDialog = /* @__PURE__ */ React101.forwardRef(
|
|
|
12604
12974
|
const filename = downloadFileName ?? DEFAULT_DOWNLOAD_FILENAME[variant === "signature" ? "signature" : "image"];
|
|
12605
12975
|
void downloadFile(src, filename);
|
|
12606
12976
|
});
|
|
12607
|
-
return /* @__PURE__ */
|
|
12977
|
+
return /* @__PURE__ */ jsx98(
|
|
12608
12978
|
ModalShell,
|
|
12609
12979
|
{
|
|
12610
12980
|
ref,
|
|
@@ -12613,10 +12983,10 @@ var ModalDialog = /* @__PURE__ */ React101.forwardRef(
|
|
|
12613
12983
|
role: "dialog",
|
|
12614
12984
|
"aria-label": title,
|
|
12615
12985
|
onEscape: onClose ?? onCancel,
|
|
12616
|
-
header: /* @__PURE__ */
|
|
12617
|
-
footer: /* @__PURE__ */
|
|
12618
|
-
/* @__PURE__ */
|
|
12619
|
-
showConfirm && /* @__PURE__ */
|
|
12986
|
+
header: /* @__PURE__ */ jsx98(ModalHeaders, { variant: "default", title, onClose: onClose ?? onCancel, showSecondaryContent: false }),
|
|
12987
|
+
footer: /* @__PURE__ */ jsx98(FooterFrame, { variant: "default", children: isImageVariant && showDownloadResolved ? /* @__PURE__ */ jsx98(Button, { variant: "secondary", size: "medium", iconLeft: "Download", onClick: handleDownload, children: "Download Image" }) : /* @__PURE__ */ jsxs73(Fragment27, { children: [
|
|
12988
|
+
/* @__PURE__ */ jsx98(Button, { variant: "secondary", size: "medium", onClick: onCancel, children: cancelLabel }),
|
|
12989
|
+
showConfirm && /* @__PURE__ */ jsx98(
|
|
12620
12990
|
Button,
|
|
12621
12991
|
{
|
|
12622
12992
|
variant: confirmVariant ?? (destructive ? "destructive" : "primary"),
|
|
@@ -12639,11 +13009,11 @@ var ModalDialog = /* @__PURE__ */ React101.forwardRef(
|
|
|
12639
13009
|
);
|
|
12640
13010
|
|
|
12641
13011
|
// src/LargeModal/LargeModal.tsx
|
|
12642
|
-
import * as
|
|
12643
|
-
import { jsx as
|
|
13012
|
+
import * as React104 from "react";
|
|
13013
|
+
import { jsx as jsx99, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
12644
13014
|
function DefaultTabs() {
|
|
12645
|
-
const [active, setActive] =
|
|
12646
|
-
return /* @__PURE__ */
|
|
13015
|
+
const [active, setActive] = React104.useState(0);
|
|
13016
|
+
return /* @__PURE__ */ jsx99(
|
|
12647
13017
|
PageTabsControl,
|
|
12648
13018
|
{
|
|
12649
13019
|
tabs: [{ label: "Default" }, { label: "Default" }, { label: "Default" }],
|
|
@@ -12655,26 +13025,26 @@ function DefaultTabs() {
|
|
|
12655
13025
|
function defaultBody2(variant, filterCount) {
|
|
12656
13026
|
switch (variant) {
|
|
12657
13027
|
case "single-column-form":
|
|
12658
|
-
return /* @__PURE__ */
|
|
12659
|
-
/* @__PURE__ */
|
|
12660
|
-
/* @__PURE__ */
|
|
12661
|
-
/* @__PURE__ */
|
|
13028
|
+
return /* @__PURE__ */ jsxs74("div", { style: { display: "flex", flexDirection: "column", gap: 32, paddingBottom: 100, width: "100%" }, children: [
|
|
13029
|
+
/* @__PURE__ */ jsx99(InputSection, {}),
|
|
13030
|
+
/* @__PURE__ */ jsx99(InputSection, {}),
|
|
13031
|
+
/* @__PURE__ */ jsx99(InputSection, {})
|
|
12662
13032
|
] });
|
|
12663
13033
|
case "dual-column-form":
|
|
12664
|
-
return /* @__PURE__ */
|
|
12665
|
-
/* @__PURE__ */
|
|
12666
|
-
/* @__PURE__ */
|
|
12667
|
-
/* @__PURE__ */
|
|
13034
|
+
return /* @__PURE__ */ jsxs74("div", { style: { display: "flex", flexDirection: "row", gap: 20, width: "100%", alignItems: "stretch", flex: "1 0 auto", minHeight: 0 }, children: [
|
|
13035
|
+
/* @__PURE__ */ jsx99("div", { style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column", gap: 32, paddingBottom: 100 }, children: /* @__PURE__ */ jsx99(InputSection, {}) }),
|
|
13036
|
+
/* @__PURE__ */ jsx99("div", { style: { width: 0, flexShrink: 0, borderLeft: "var(--stroke-xs) solid var(--border-neutral-default)" } }),
|
|
13037
|
+
/* @__PURE__ */ jsx99("div", { style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column", gap: 32, paddingBottom: 100 }, children: /* @__PURE__ */ jsx99(InputSection, {}) })
|
|
12668
13038
|
] });
|
|
12669
13039
|
case "drawer-read":
|
|
12670
|
-
return /* @__PURE__ */
|
|
12671
|
-
/* @__PURE__ */
|
|
12672
|
-
/* @__PURE__ */
|
|
12673
|
-
/* @__PURE__ */
|
|
13040
|
+
return /* @__PURE__ */ jsxs74("div", { style: { display: "flex", flexDirection: "column", gap: 20, paddingBottom: 100, width: "100%" }, children: [
|
|
13041
|
+
/* @__PURE__ */ jsx99(ListSection, { defaultOpen: true }),
|
|
13042
|
+
/* @__PURE__ */ jsx99(ListSection, { defaultOpen: true }),
|
|
13043
|
+
/* @__PURE__ */ jsx99(ListSection, { defaultOpen: true })
|
|
12674
13044
|
] });
|
|
12675
13045
|
case "centered":
|
|
12676
|
-
return /* @__PURE__ */
|
|
12677
|
-
/* @__PURE__ */
|
|
13046
|
+
return /* @__PURE__ */ jsxs74("div", { style: { display: "flex", flexDirection: "column", gap: 32, paddingBottom: 100, width: "100%" }, children: [
|
|
13047
|
+
/* @__PURE__ */ jsx99(InputSection, { title: "Text", children: /* @__PURE__ */ jsx99(
|
|
12678
13048
|
InputGroup,
|
|
12679
13049
|
{
|
|
12680
13050
|
fields: [
|
|
@@ -12683,12 +13053,12 @@ function defaultBody2(variant, filterCount) {
|
|
|
12683
13053
|
]
|
|
12684
13054
|
}
|
|
12685
13055
|
) }),
|
|
12686
|
-
/* @__PURE__ */
|
|
12687
|
-
/* @__PURE__ */
|
|
13056
|
+
/* @__PURE__ */ jsx99(FormDemarcator, {}),
|
|
13057
|
+
/* @__PURE__ */ jsx99(TableSection, { defaultOpen: true, filterCount })
|
|
12688
13058
|
] });
|
|
12689
13059
|
}
|
|
12690
13060
|
}
|
|
12691
|
-
var LargeModal = /* @__PURE__ */
|
|
13061
|
+
var LargeModal = /* @__PURE__ */ React104.forwardRef(
|
|
12692
13062
|
function LargeModal2({
|
|
12693
13063
|
variant = "centered",
|
|
12694
13064
|
title = "Title",
|
|
@@ -12708,8 +13078,8 @@ var LargeModal = /* @__PURE__ */ React102.forwardRef(
|
|
|
12708
13078
|
const bodyHeight = isDrawer ? void 0 : 768 - 80 - 80;
|
|
12709
13079
|
const resolvedCancel = cancelLabel ?? (isCentered ? "Close" : "Cancel");
|
|
12710
13080
|
const resolvedConfirm = confirmLabel ?? (isCentered ? "Confirm" : "Save");
|
|
12711
|
-
const resolvedLeading = footerLeading ?? (isCentered ? /* @__PURE__ */
|
|
12712
|
-
return /* @__PURE__ */
|
|
13081
|
+
const resolvedLeading = footerLeading ?? (isCentered ? /* @__PURE__ */ jsx99(SelectionControl, { variant: "checkbox", label: "Don't show this again" }) : void 0);
|
|
13082
|
+
return /* @__PURE__ */ jsx99(
|
|
12713
13083
|
ModalShell,
|
|
12714
13084
|
{
|
|
12715
13085
|
ref,
|
|
@@ -12718,19 +13088,19 @@ var LargeModal = /* @__PURE__ */ React102.forwardRef(
|
|
|
12718
13088
|
role: "dialog",
|
|
12719
13089
|
"aria-label": title,
|
|
12720
13090
|
onEscape: onClose ?? onCancel,
|
|
12721
|
-
header: /* @__PURE__ */
|
|
13091
|
+
header: /* @__PURE__ */ jsx99(
|
|
12722
13092
|
ModalHeaders,
|
|
12723
13093
|
{
|
|
12724
13094
|
variant: isDrawer ? "with-tabs" : "default",
|
|
12725
13095
|
title,
|
|
12726
13096
|
onClose: onClose ?? onCancel,
|
|
12727
13097
|
showSecondaryContent: false,
|
|
12728
|
-
tabs: isDrawer ? tabs ?? /* @__PURE__ */
|
|
13098
|
+
tabs: isDrawer ? tabs ?? /* @__PURE__ */ jsx99(DefaultTabs, {}) : void 0
|
|
12729
13099
|
}
|
|
12730
13100
|
),
|
|
12731
|
-
footer: /* @__PURE__ */
|
|
12732
|
-
/* @__PURE__ */
|
|
12733
|
-
/* @__PURE__ */
|
|
13101
|
+
footer: /* @__PURE__ */ jsxs74(FooterFrame, { variant: "preference", leading: resolvedLeading, children: [
|
|
13102
|
+
/* @__PURE__ */ jsx99(Button, { variant: "secondary", size: "medium", onClick: onCancel, children: resolvedCancel }),
|
|
13103
|
+
/* @__PURE__ */ jsx99(Button, { variant: "primary", size: "medium", onClick: onConfirm, children: resolvedConfirm })
|
|
12734
13104
|
] }),
|
|
12735
13105
|
bodyHeight,
|
|
12736
13106
|
fillHeight: isDrawer,
|
|
@@ -12743,19 +13113,19 @@ var LargeModal = /* @__PURE__ */ React102.forwardRef(
|
|
|
12743
13113
|
);
|
|
12744
13114
|
|
|
12745
13115
|
// src/ExtraLargeModal/ExtraLargeModal.tsx
|
|
12746
|
-
import * as
|
|
12747
|
-
import { Fragment as
|
|
13116
|
+
import * as React105 from "react";
|
|
13117
|
+
import { Fragment as Fragment28, jsx as jsx100, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
12748
13118
|
var COLUMNS = Array.from({ length: 6 }, () => ({ label: "Label", width: 120 }));
|
|
12749
13119
|
var ROW_CELLS = Array.from({ length: 6 }, () => ({ type: "sample" }));
|
|
12750
13120
|
var ROWS = Array.from({ length: 12 }, () => ({ cells: ROW_CELLS }));
|
|
12751
13121
|
function TableToolbar() {
|
|
12752
|
-
return /* @__PURE__ */
|
|
12753
|
-
/* @__PURE__ */
|
|
12754
|
-
/* @__PURE__ */
|
|
12755
|
-
/* @__PURE__ */
|
|
13122
|
+
return /* @__PURE__ */ jsxs75("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "var(--spacing-8px)", width: "100%" }, children: [
|
|
13123
|
+
/* @__PURE__ */ jsx100(SearchInput, { placeholder: "Search here...", style: { flex: 1, minWidth: 0 } }),
|
|
13124
|
+
/* @__PURE__ */ jsx100(Button, { variant: "secondary", size: "medium", iconOnly: "Filter", "aria-label": "Filter" }),
|
|
13125
|
+
/* @__PURE__ */ jsx100(Button, { variant: "secondary", size: "medium", iconOnly: "Sort", "aria-label": "Sort" })
|
|
12756
13126
|
] });
|
|
12757
13127
|
}
|
|
12758
|
-
var ExtraLargeModal = /* @__PURE__ */
|
|
13128
|
+
var ExtraLargeModal = /* @__PURE__ */ React105.forwardRef(
|
|
12759
13129
|
function ExtraLargeModal2({
|
|
12760
13130
|
title = "Title",
|
|
12761
13131
|
tableContent,
|
|
@@ -12768,7 +13138,7 @@ var ExtraLargeModal = /* @__PURE__ */ React103.forwardRef(
|
|
|
12768
13138
|
onClose,
|
|
12769
13139
|
...rest
|
|
12770
13140
|
}, ref) {
|
|
12771
|
-
return /* @__PURE__ */
|
|
13141
|
+
return /* @__PURE__ */ jsxs75(
|
|
12772
13142
|
ModalShell,
|
|
12773
13143
|
{
|
|
12774
13144
|
ref,
|
|
@@ -12777,15 +13147,15 @@ var ExtraLargeModal = /* @__PURE__ */ React103.forwardRef(
|
|
|
12777
13147
|
role: "dialog",
|
|
12778
13148
|
"aria-label": title,
|
|
12779
13149
|
onEscape: onClose ?? onCancel,
|
|
12780
|
-
header: /* @__PURE__ */
|
|
12781
|
-
footer: /* @__PURE__ */
|
|
12782
|
-
/* @__PURE__ */
|
|
12783
|
-
/* @__PURE__ */
|
|
13150
|
+
header: /* @__PURE__ */ jsx100(ModalHeaders, { variant: "default", title, onClose: onClose ?? onCancel, showSecondaryContent: false }),
|
|
13151
|
+
footer: /* @__PURE__ */ jsxs75(FooterFrame, { variant: "default", children: [
|
|
13152
|
+
/* @__PURE__ */ jsx100(Button, { variant: "secondary", size: "medium", onClick: onCancel, children: cancelLabel }),
|
|
13153
|
+
/* @__PURE__ */ jsx100(Button, { variant: "primary", size: "medium", onClick: onConfirm, children: confirmLabel })
|
|
12784
13154
|
] }),
|
|
12785
13155
|
bodyHeight: 608,
|
|
12786
13156
|
bodyStyle: { flexDirection: "row", padding: 0, gap: 0, overflow: "hidden" },
|
|
12787
13157
|
children: [
|
|
12788
|
-
/* @__PURE__ */
|
|
13158
|
+
/* @__PURE__ */ jsxs75(
|
|
12789
13159
|
"div",
|
|
12790
13160
|
{
|
|
12791
13161
|
style: {
|
|
@@ -12800,7 +13170,7 @@ var ExtraLargeModal = /* @__PURE__ */ React103.forwardRef(
|
|
|
12800
13170
|
overflow: "hidden"
|
|
12801
13171
|
},
|
|
12802
13172
|
children: [
|
|
12803
|
-
/* @__PURE__ */
|
|
13173
|
+
/* @__PURE__ */ jsx100(
|
|
12804
13174
|
ContentPrimitives,
|
|
12805
13175
|
{
|
|
12806
13176
|
type: "section-heading",
|
|
@@ -12809,9 +13179,9 @@ var ExtraLargeModal = /* @__PURE__ */ React103.forwardRef(
|
|
|
12809
13179
|
showTrailingContent: false
|
|
12810
13180
|
}
|
|
12811
13181
|
),
|
|
12812
|
-
tableContent ?? /* @__PURE__ */
|
|
12813
|
-
/* @__PURE__ */
|
|
12814
|
-
/* @__PURE__ */
|
|
13182
|
+
tableContent ?? /* @__PURE__ */ jsxs75(Fragment28, { children: [
|
|
13183
|
+
/* @__PURE__ */ jsx100(TableToolbar, {}),
|
|
13184
|
+
/* @__PURE__ */ jsx100("div", { style: { flex: 1, minHeight: 0, display: "flex" }, children: /* @__PURE__ */ jsx100(
|
|
12815
13185
|
Table,
|
|
12816
13186
|
{
|
|
12817
13187
|
columns: COLUMNS,
|
|
@@ -12826,7 +13196,7 @@ var ExtraLargeModal = /* @__PURE__ */ React103.forwardRef(
|
|
|
12826
13196
|
]
|
|
12827
13197
|
}
|
|
12828
13198
|
),
|
|
12829
|
-
/* @__PURE__ */
|
|
13199
|
+
/* @__PURE__ */ jsx100("div", { style: { position: "relative", flex: 1, minWidth: 0, overflow: "hidden" }, children: mapContent ?? /* @__PURE__ */ jsx100(MapView, { center: mapCenter }) })
|
|
12830
13200
|
]
|
|
12831
13201
|
}
|
|
12832
13202
|
);
|
|
@@ -12857,6 +13227,7 @@ export {
|
|
|
12857
13227
|
ConfigurationCardRow,
|
|
12858
13228
|
ContentCard,
|
|
12859
13229
|
ContentPrimitives,
|
|
13230
|
+
DIALOG_OVERLAY_DEFAULT_TIER,
|
|
12860
13231
|
DOORSTEP_DELIVERY_IMAGE,
|
|
12861
13232
|
DataRows,
|
|
12862
13233
|
DateTimePicker,
|
|
@@ -12865,6 +13236,7 @@ export {
|
|
|
12865
13236
|
DesktopMetricCard,
|
|
12866
13237
|
DesktopProgressIndicator,
|
|
12867
13238
|
DesktopSegmentControl,
|
|
13239
|
+
DialogOverlay,
|
|
12868
13240
|
DurationLabel,
|
|
12869
13241
|
EmptyState,
|
|
12870
13242
|
ExtraLargeModal,
|
|
@@ -12893,6 +13265,9 @@ export {
|
|
|
12893
13265
|
MapSearchInput,
|
|
12894
13266
|
MapView,
|
|
12895
13267
|
MapZoomControl,
|
|
13268
|
+
MenuDivider,
|
|
13269
|
+
MenuFlyout,
|
|
13270
|
+
MenuPanel,
|
|
12896
13271
|
MobileBadge,
|
|
12897
13272
|
MobileChip,
|
|
12898
13273
|
MobileDropdown,
|
|
@@ -12915,6 +13290,7 @@ export {
|
|
|
12915
13290
|
PageTabsControl,
|
|
12916
13291
|
Pagination,
|
|
12917
13292
|
Placeholder,
|
|
13293
|
+
Popover,
|
|
12918
13294
|
ProgressTracker,
|
|
12919
13295
|
RadioButton,
|
|
12920
13296
|
SCHEDULED_ORDER_COLUMNS,
|