@almadar/ui 5.130.0 → 5.131.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/dist/avl/index.cjs +36 -36
- package/dist/avl/index.js +36 -36
- package/dist/components/index.cjs +38 -38
- package/dist/components/index.js +38 -38
- package/dist/marketing/index.cjs +2 -2
- package/dist/marketing/index.js +2 -2
- package/dist/providers/index.cjs +36 -36
- package/dist/providers/index.js +36 -36
- package/dist/runtime/index.cjs +36 -36
- package/dist/runtime/index.js +36 -36
- package/package.json +1 -1
package/dist/runtime/index.cjs
CHANGED
|
@@ -1651,7 +1651,7 @@ var init_Button = __esm({
|
|
|
1651
1651
|
"cursor-pointer",
|
|
1652
1652
|
"chrome-button",
|
|
1653
1653
|
"transition-all duration-normal",
|
|
1654
|
-
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-offset-[length:var(--focus-ring-offset)]",
|
|
1654
|
+
"focus:outline-none focus-visible:ring-[length:var(--focus-ring-width)] focus-visible:ring-ring focus-visible:ring-offset-[length:var(--focus-ring-offset)]",
|
|
1655
1655
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1656
1656
|
variantStyles[variant],
|
|
1657
1657
|
sizeStyles[size],
|
|
@@ -2398,7 +2398,7 @@ var init_Badge = __esm({
|
|
|
2398
2398
|
},
|
|
2399
2399
|
className: cn(
|
|
2400
2400
|
"inline-flex items-center justify-center rounded-sm",
|
|
2401
|
-
"hover:bg-foreground/10 focus:outline-none focus:ring-1 focus:ring-ring",
|
|
2401
|
+
"hover:bg-foreground/10 focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
2402
2402
|
"transition-colors",
|
|
2403
2403
|
size === "sm" ? "w-4 h-4 ml-0.5" : size === "md" ? "w-5 h-5 ml-1" : "w-6 h-6 ml-1"
|
|
2404
2404
|
),
|
|
@@ -3756,7 +3756,7 @@ function NativeSelect({
|
|
|
3756
3756
|
"block w-full border-[length:var(--border-width)] shadow-sm appearance-none",
|
|
3757
3757
|
"px-3 py-2 pr-10 text-sm text-foreground font-medium",
|
|
3758
3758
|
"bg-card",
|
|
3759
|
-
"focus:outline-none focus:ring-2 focus:ring-offset-0 focus:ring-ring",
|
|
3759
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-ring",
|
|
3760
3760
|
"disabled:bg-muted disabled:text-muted-foreground disabled:cursor-not-allowed",
|
|
3761
3761
|
error ? "border-error focus:border-error" : "border-border focus:border-primary",
|
|
3762
3762
|
className
|
|
@@ -3863,7 +3863,7 @@ function RichSelect({
|
|
|
3863
3863
|
"block w-full border-[length:var(--border-width)] shadow-sm",
|
|
3864
3864
|
"px-3 py-2 pr-10 text-sm text-start font-medium",
|
|
3865
3865
|
"bg-card rounded-sm",
|
|
3866
|
-
"focus:outline-none focus:ring-2 focus:ring-offset-0 focus:ring-ring",
|
|
3866
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-ring",
|
|
3867
3867
|
"disabled:bg-muted disabled:text-muted-foreground disabled:cursor-not-allowed",
|
|
3868
3868
|
error ? "border-error focus:border-error" : "border-border focus:border-primary",
|
|
3869
3869
|
!hasValue && "text-muted-foreground"
|
|
@@ -4786,9 +4786,9 @@ var init_Radio = __esm({
|
|
|
4786
4786
|
"flex items-center justify-center",
|
|
4787
4787
|
"border-[length:var(--border-width)] transition-all cursor-pointer",
|
|
4788
4788
|
sizeClasses4[size],
|
|
4789
|
-
hasError ? "border-error peer-focus:ring-error/20" : "border-border peer-focus:ring-ring/20",
|
|
4789
|
+
hasError ? "border-error peer-focus-visible:ring-error/20" : "border-border peer-focus-visible:ring-ring/20",
|
|
4790
4790
|
isChecked2 ? hasError ? "border-error" : "border-primary bg-primary" : "",
|
|
4791
|
-
"peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-offset-2",
|
|
4791
|
+
"peer-focus:outline-none peer-focus-visible:ring-2 peer-focus-visible:ring-offset-2",
|
|
4792
4792
|
disabled && "opacity-50 cursor-not-allowed",
|
|
4793
4793
|
!disabled && "hover:border-[var(--color-border-hover)]"
|
|
4794
4794
|
),
|
|
@@ -5259,7 +5259,7 @@ var init_ThemeToggle = __esm({
|
|
|
5259
5259
|
"inline-flex items-center justify-center gap-2",
|
|
5260
5260
|
"text-foreground",
|
|
5261
5261
|
"hover:bg-muted border-[length:var(--border-width)] border-transparent hover:border-border",
|
|
5262
|
-
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
5262
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
5263
5263
|
"transition-colors duration-fast",
|
|
5264
5264
|
sizeClasses5[size],
|
|
5265
5265
|
className
|
|
@@ -11504,10 +11504,12 @@ var init_Container = __esm({
|
|
|
11504
11504
|
};
|
|
11505
11505
|
paddingStyles3 = {
|
|
11506
11506
|
none: "px-0",
|
|
11507
|
-
|
|
11508
|
-
|
|
11509
|
-
|
|
11510
|
-
|
|
11507
|
+
// Mobile-tighter, desktop-identical: fixed px-6 on a 360px phone eats ~13% of
|
|
11508
|
+
// the viewport, so each token steps down below the sm breakpoint.
|
|
11509
|
+
sm: "px-3 sm:px-4",
|
|
11510
|
+
md: "px-4 sm:px-6",
|
|
11511
|
+
lg: "px-4 sm:px-6 md:px-8",
|
|
11512
|
+
xl: "px-4 sm:px-8 md:px-12"
|
|
11511
11513
|
};
|
|
11512
11514
|
Container = ({
|
|
11513
11515
|
size,
|
|
@@ -12206,7 +12208,7 @@ var init_Accordion = __esm({
|
|
|
12206
12208
|
"bg-card",
|
|
12207
12209
|
"hover:bg-muted",
|
|
12208
12210
|
"transition-colors duration-fast",
|
|
12209
|
-
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-inset",
|
|
12211
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",
|
|
12210
12212
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
12211
12213
|
isOpen && "bg-muted font-bold"
|
|
12212
12214
|
),
|
|
@@ -18361,7 +18363,7 @@ var init_Breadcrumb = __esm({
|
|
|
18361
18363
|
},
|
|
18362
18364
|
className: cn(
|
|
18363
18365
|
"flex items-center gap-1.5 transition-colors",
|
|
18364
|
-
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
18366
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
18365
18367
|
isLast ? "text-foreground font-bold cursor-default" : "text-muted-foreground hover:text-foreground"
|
|
18366
18368
|
),
|
|
18367
18369
|
"aria-current": isLast ? "page" : void 0,
|
|
@@ -22915,7 +22917,7 @@ function DataGrid({
|
|
|
22915
22917
|
] }, field.name);
|
|
22916
22918
|
}) })
|
|
22917
22919
|
] }),
|
|
22918
|
-
dangerActions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(HStack, { gap: "xs", className: "flex-shrink-0", children: dangerActions.map((action, idx) => /* @__PURE__ */ jsxRuntime.
|
|
22920
|
+
dangerActions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(HStack, { gap: "xs", className: "flex-shrink-0", children: dangerActions.map((action, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
22919
22921
|
Button,
|
|
22920
22922
|
{
|
|
22921
22923
|
variant: "ghost",
|
|
@@ -22923,11 +22925,10 @@ function DataGrid({
|
|
|
22923
22925
|
onClick: handleActionClick(action, itemData),
|
|
22924
22926
|
"data-testid": `action-${action.event}`,
|
|
22925
22927
|
"data-row-id": String(itemData.id),
|
|
22928
|
+
"aria-label": action.label,
|
|
22929
|
+
title: action.label,
|
|
22926
22930
|
className: "text-error hover:text-error hover:bg-error/10 px-2",
|
|
22927
|
-
children:
|
|
22928
|
-
action.icon && renderIconInput(action.icon, { size: "xs" }),
|
|
22929
|
-
action.label
|
|
22930
|
-
]
|
|
22931
|
+
children: action.icon ? renderIconInput(action.icon, { size: "xs" }) : action.label
|
|
22931
22932
|
},
|
|
22932
22933
|
idx
|
|
22933
22934
|
)) })
|
|
@@ -23729,10 +23730,7 @@ var init_FileTree = __esm({
|
|
|
23729
23730
|
className,
|
|
23730
23731
|
indent = 16
|
|
23731
23732
|
}) => {
|
|
23732
|
-
|
|
23733
|
-
if (tree.length === 0) {
|
|
23734
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: `p-4 ${className ?? ""}`, children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", color: "muted", children: t("fileTree.noFiles") }) });
|
|
23735
|
-
}
|
|
23733
|
+
if (tree.length === 0) return null;
|
|
23736
23734
|
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: `py-1 overflow-y-auto ${className ?? ""}`, role: "tree", children: tree.map((node) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
23737
23735
|
TreeNodeItem,
|
|
23738
23736
|
{
|
|
@@ -27171,7 +27169,7 @@ var init_NumberStepper = __esm({
|
|
|
27171
27169
|
"active:bg-muted",
|
|
27172
27170
|
"transition-colors duration-instant",
|
|
27173
27171
|
"disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",
|
|
27174
|
-
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
27172
|
+
"focus:outline-none focus-visible:ring-[length:var(--focus-ring-width)] focus-visible:ring-ring focus-visible:ring-inset",
|
|
27175
27173
|
styles.button
|
|
27176
27174
|
),
|
|
27177
27175
|
"aria-label": t("aria.decrease"),
|
|
@@ -27212,7 +27210,7 @@ var init_NumberStepper = __esm({
|
|
|
27212
27210
|
"active:bg-muted",
|
|
27213
27211
|
"transition-colors duration-instant",
|
|
27214
27212
|
"disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",
|
|
27215
|
-
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
27213
|
+
"focus:outline-none focus-visible:ring-[length:var(--focus-ring-width)] focus-visible:ring-ring focus-visible:ring-inset",
|
|
27216
27214
|
styles.button
|
|
27217
27215
|
),
|
|
27218
27216
|
"aria-label": t("aria.increase"),
|
|
@@ -27668,7 +27666,7 @@ var init_Lightbox = __esm({
|
|
|
27668
27666
|
"p-2 rounded-full",
|
|
27669
27667
|
"text-[var(--color-foreground)] bg-[var(--color-card)]",
|
|
27670
27668
|
"hover:bg-opacity-70 transition-opacity",
|
|
27671
|
-
"focus:outline-none focus:ring-2 focus:ring-ring"
|
|
27669
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
27672
27670
|
),
|
|
27673
27671
|
"aria-label": t("aria.closeModal"),
|
|
27674
27672
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "x", className: "w-6 h-6" })
|
|
@@ -27687,7 +27685,7 @@ var init_Lightbox = __esm({
|
|
|
27687
27685
|
"p-2 rounded-full",
|
|
27688
27686
|
"text-[var(--color-foreground)] bg-[var(--color-card)]",
|
|
27689
27687
|
"hover:bg-opacity-70 transition-opacity",
|
|
27690
|
-
"focus:outline-none focus:ring-2 focus:ring-ring"
|
|
27688
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
27691
27689
|
),
|
|
27692
27690
|
"aria-label": t("aria.previousImage"),
|
|
27693
27691
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron-left", className: "w-8 h-8" })
|
|
@@ -27724,7 +27722,7 @@ var init_Lightbox = __esm({
|
|
|
27724
27722
|
"p-2 rounded-full",
|
|
27725
27723
|
"text-[var(--color-foreground)] bg-[var(--color-card)]",
|
|
27726
27724
|
"hover:bg-opacity-70 transition-opacity",
|
|
27727
|
-
"focus:outline-none focus:ring-2 focus:ring-ring"
|
|
27725
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
27728
27726
|
),
|
|
27729
27727
|
"aria-label": t("aria.nextImage"),
|
|
27730
27728
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron-right", className: "w-8 h-8" })
|
|
@@ -27904,7 +27902,8 @@ function TableView({
|
|
|
27904
27902
|
const cell = formatCell(asFieldValue(getNestedValue(row, col.field ?? col.key)), col.format);
|
|
27905
27903
|
return Math.max(widest, cell.length);
|
|
27906
27904
|
}, columnLabel(col).length);
|
|
27907
|
-
|
|
27905
|
+
const chrome = col.format === "badge" ? BADGE_CHROME_CH : 0;
|
|
27906
|
+
return Math.min(longest + chrome, MAX_MEASURED_COL_CH);
|
|
27908
27907
|
}),
|
|
27909
27908
|
[colDefs, data]
|
|
27910
27909
|
);
|
|
@@ -27994,7 +27993,7 @@ function TableView({
|
|
|
27994
27993
|
col.className
|
|
27995
27994
|
);
|
|
27996
27995
|
if (col.format === "badge" && raw != null && raw !== "") {
|
|
27997
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Box, { role: "cell", className: cellBase, children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: statusVariant4(String(raw)), size: "sm", children: String(raw) }) }, col.key);
|
|
27996
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box, { role: "cell", className: cellBase, children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: statusVariant4(String(raw)), size: "sm", className: "whitespace-nowrap", children: String(raw) }) }, col.key);
|
|
27998
27997
|
}
|
|
27999
27998
|
return /* @__PURE__ */ jsxRuntime.jsx(Box, { role: "cell", className: cellBase, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: formatCell(raw, col.format) }) }, col.key);
|
|
28000
27999
|
}),
|
|
@@ -28077,7 +28076,7 @@ function TableView({
|
|
|
28077
28076
|
}
|
|
28078
28077
|
);
|
|
28079
28078
|
}
|
|
28080
|
-
var MAX_MEASURED_COL_CH, alignClass, weightClass, LOOKS;
|
|
28079
|
+
var MAX_MEASURED_COL_CH, BADGE_CHROME_CH, alignClass, weightClass, LOOKS;
|
|
28081
28080
|
var init_TableView = __esm({
|
|
28082
28081
|
"components/core/molecules/TableView.tsx"() {
|
|
28083
28082
|
"use client";
|
|
@@ -28096,6 +28095,7 @@ var init_TableView = __esm({
|
|
|
28096
28095
|
init_useDataDnd();
|
|
28097
28096
|
logger.createLogger("almadar:ui:table-view");
|
|
28098
28097
|
MAX_MEASURED_COL_CH = 32;
|
|
28098
|
+
BADGE_CHROME_CH = 4;
|
|
28099
28099
|
alignClass = {
|
|
28100
28100
|
left: "justify-start text-left",
|
|
28101
28101
|
center: "justify-center text-center",
|
|
@@ -30193,7 +30193,7 @@ var init_VoteStack = __esm({
|
|
|
30193
30193
|
"active:bg-muted",
|
|
30194
30194
|
"transition-colors duration-instant",
|
|
30195
30195
|
"disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",
|
|
30196
|
-
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
30196
|
+
"focus:outline-none focus-visible:ring-[length:var(--focus-ring-width)] focus-visible:ring-ring focus-visible:ring-inset",
|
|
30197
30197
|
styles.button
|
|
30198
30198
|
),
|
|
30199
30199
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron-up", className: styles.icon })
|
|
@@ -30230,7 +30230,7 @@ var init_VoteStack = __esm({
|
|
|
30230
30230
|
"active:bg-muted",
|
|
30231
30231
|
"transition-colors duration-instant",
|
|
30232
30232
|
"disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",
|
|
30233
|
-
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
30233
|
+
"focus:outline-none focus-visible:ring-[length:var(--focus-ring-width)] focus-visible:ring-ring focus-visible:ring-inset",
|
|
30234
30234
|
styles.button
|
|
30235
30235
|
),
|
|
30236
30236
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron-down", className: styles.icon })
|
|
@@ -30751,7 +30751,7 @@ var init_QrScanner = __esm({
|
|
|
30751
30751
|
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
30752
30752
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
30753
30753
|
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
30754
|
-
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
30754
|
+
"hover:bg-opacity-80 focus:outline-none focus-visible:ring-2 focus-visible:ring-white"
|
|
30755
30755
|
),
|
|
30756
30756
|
"aria-label": isPaused ? t("qrScanner.resumeScanning") : t("qrScanner.pauseScanning"),
|
|
30757
30757
|
children: isPaused ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "play", className: "h-4 w-4" }) : /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "pause", className: "h-4 w-4" })
|
|
@@ -30766,7 +30766,7 @@ var init_QrScanner = __esm({
|
|
|
30766
30766
|
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
30767
30767
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
30768
30768
|
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
30769
|
-
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
30769
|
+
"hover:bg-opacity-80 focus:outline-none focus-visible:ring-2 focus-visible:ring-white"
|
|
30770
30770
|
),
|
|
30771
30771
|
"aria-label": currentFacing === "environment" ? t("qrScanner.switchToFrontCamera") : t("qrScanner.switchToRearCamera"),
|
|
30772
30772
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "refresh-cw", className: "h-4 w-4" })
|
|
@@ -30781,7 +30781,7 @@ var init_QrScanner = __esm({
|
|
|
30781
30781
|
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
30782
30782
|
"rounded-full bg-black bg-opacity-60 px-3 py-2 text-xs text-white",
|
|
30783
30783
|
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
30784
|
-
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
30784
|
+
"hover:bg-opacity-80 focus:outline-none focus-visible:ring-2 focus-visible:ring-white"
|
|
30785
30785
|
),
|
|
30786
30786
|
"aria-label": t("aria.mockScanDev"),
|
|
30787
30787
|
children: t("qrScanner.mockScan")
|
|
@@ -42618,7 +42618,7 @@ var init_TabbedContainer = __esm({
|
|
|
42618
42618
|
onClick: () => !isDisabled && handleTabChange(tab.id),
|
|
42619
42619
|
className: cn(
|
|
42620
42620
|
"flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors",
|
|
42621
|
-
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
42621
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
42622
42622
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
42623
42623
|
isActive ? "bg-primary text-primary-foreground" : "bg-card text-foreground hover:bg-muted",
|
|
42624
42624
|
isVertical ? "justify-start" : "justify-center"
|
package/dist/runtime/index.js
CHANGED
|
@@ -1577,7 +1577,7 @@ var init_Button = __esm({
|
|
|
1577
1577
|
"cursor-pointer",
|
|
1578
1578
|
"chrome-button",
|
|
1579
1579
|
"transition-all duration-normal",
|
|
1580
|
-
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-offset-[length:var(--focus-ring-offset)]",
|
|
1580
|
+
"focus:outline-none focus-visible:ring-[length:var(--focus-ring-width)] focus-visible:ring-ring focus-visible:ring-offset-[length:var(--focus-ring-offset)]",
|
|
1581
1581
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1582
1582
|
variantStyles[variant],
|
|
1583
1583
|
sizeStyles[size],
|
|
@@ -2324,7 +2324,7 @@ var init_Badge = __esm({
|
|
|
2324
2324
|
},
|
|
2325
2325
|
className: cn(
|
|
2326
2326
|
"inline-flex items-center justify-center rounded-sm",
|
|
2327
|
-
"hover:bg-foreground/10 focus:outline-none focus:ring-1 focus:ring-ring",
|
|
2327
|
+
"hover:bg-foreground/10 focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
2328
2328
|
"transition-colors",
|
|
2329
2329
|
size === "sm" ? "w-4 h-4 ml-0.5" : size === "md" ? "w-5 h-5 ml-1" : "w-6 h-6 ml-1"
|
|
2330
2330
|
),
|
|
@@ -3682,7 +3682,7 @@ function NativeSelect({
|
|
|
3682
3682
|
"block w-full border-[length:var(--border-width)] shadow-sm appearance-none",
|
|
3683
3683
|
"px-3 py-2 pr-10 text-sm text-foreground font-medium",
|
|
3684
3684
|
"bg-card",
|
|
3685
|
-
"focus:outline-none focus:ring-2 focus:ring-offset-0 focus:ring-ring",
|
|
3685
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-ring",
|
|
3686
3686
|
"disabled:bg-muted disabled:text-muted-foreground disabled:cursor-not-allowed",
|
|
3687
3687
|
error ? "border-error focus:border-error" : "border-border focus:border-primary",
|
|
3688
3688
|
className
|
|
@@ -3789,7 +3789,7 @@ function RichSelect({
|
|
|
3789
3789
|
"block w-full border-[length:var(--border-width)] shadow-sm",
|
|
3790
3790
|
"px-3 py-2 pr-10 text-sm text-start font-medium",
|
|
3791
3791
|
"bg-card rounded-sm",
|
|
3792
|
-
"focus:outline-none focus:ring-2 focus:ring-offset-0 focus:ring-ring",
|
|
3792
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-ring",
|
|
3793
3793
|
"disabled:bg-muted disabled:text-muted-foreground disabled:cursor-not-allowed",
|
|
3794
3794
|
error ? "border-error focus:border-error" : "border-border focus:border-primary",
|
|
3795
3795
|
!hasValue && "text-muted-foreground"
|
|
@@ -4712,9 +4712,9 @@ var init_Radio = __esm({
|
|
|
4712
4712
|
"flex items-center justify-center",
|
|
4713
4713
|
"border-[length:var(--border-width)] transition-all cursor-pointer",
|
|
4714
4714
|
sizeClasses4[size],
|
|
4715
|
-
hasError ? "border-error peer-focus:ring-error/20" : "border-border peer-focus:ring-ring/20",
|
|
4715
|
+
hasError ? "border-error peer-focus-visible:ring-error/20" : "border-border peer-focus-visible:ring-ring/20",
|
|
4716
4716
|
isChecked2 ? hasError ? "border-error" : "border-primary bg-primary" : "",
|
|
4717
|
-
"peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-offset-2",
|
|
4717
|
+
"peer-focus:outline-none peer-focus-visible:ring-2 peer-focus-visible:ring-offset-2",
|
|
4718
4718
|
disabled && "opacity-50 cursor-not-allowed",
|
|
4719
4719
|
!disabled && "hover:border-[var(--color-border-hover)]"
|
|
4720
4720
|
),
|
|
@@ -5185,7 +5185,7 @@ var init_ThemeToggle = __esm({
|
|
|
5185
5185
|
"inline-flex items-center justify-center gap-2",
|
|
5186
5186
|
"text-foreground",
|
|
5187
5187
|
"hover:bg-muted border-[length:var(--border-width)] border-transparent hover:border-border",
|
|
5188
|
-
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
5188
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
5189
5189
|
"transition-colors duration-fast",
|
|
5190
5190
|
sizeClasses5[size],
|
|
5191
5191
|
className
|
|
@@ -11430,10 +11430,12 @@ var init_Container = __esm({
|
|
|
11430
11430
|
};
|
|
11431
11431
|
paddingStyles3 = {
|
|
11432
11432
|
none: "px-0",
|
|
11433
|
-
|
|
11434
|
-
|
|
11435
|
-
|
|
11436
|
-
|
|
11433
|
+
// Mobile-tighter, desktop-identical: fixed px-6 on a 360px phone eats ~13% of
|
|
11434
|
+
// the viewport, so each token steps down below the sm breakpoint.
|
|
11435
|
+
sm: "px-3 sm:px-4",
|
|
11436
|
+
md: "px-4 sm:px-6",
|
|
11437
|
+
lg: "px-4 sm:px-6 md:px-8",
|
|
11438
|
+
xl: "px-4 sm:px-8 md:px-12"
|
|
11437
11439
|
};
|
|
11438
11440
|
Container = ({
|
|
11439
11441
|
size,
|
|
@@ -12132,7 +12134,7 @@ var init_Accordion = __esm({
|
|
|
12132
12134
|
"bg-card",
|
|
12133
12135
|
"hover:bg-muted",
|
|
12134
12136
|
"transition-colors duration-fast",
|
|
12135
|
-
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-inset",
|
|
12137
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",
|
|
12136
12138
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
12137
12139
|
isOpen && "bg-muted font-bold"
|
|
12138
12140
|
),
|
|
@@ -18287,7 +18289,7 @@ var init_Breadcrumb = __esm({
|
|
|
18287
18289
|
},
|
|
18288
18290
|
className: cn(
|
|
18289
18291
|
"flex items-center gap-1.5 transition-colors",
|
|
18290
|
-
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
18292
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
18291
18293
|
isLast ? "text-foreground font-bold cursor-default" : "text-muted-foreground hover:text-foreground"
|
|
18292
18294
|
),
|
|
18293
18295
|
"aria-current": isLast ? "page" : void 0,
|
|
@@ -22841,7 +22843,7 @@ function DataGrid({
|
|
|
22841
22843
|
] }, field.name);
|
|
22842
22844
|
}) })
|
|
22843
22845
|
] }),
|
|
22844
|
-
dangerActions.length > 0 && /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-shrink-0", children: dangerActions.map((action, idx) => /* @__PURE__ */
|
|
22846
|
+
dangerActions.length > 0 && /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-shrink-0", children: dangerActions.map((action, idx) => /* @__PURE__ */ jsx(
|
|
22845
22847
|
Button,
|
|
22846
22848
|
{
|
|
22847
22849
|
variant: "ghost",
|
|
@@ -22849,11 +22851,10 @@ function DataGrid({
|
|
|
22849
22851
|
onClick: handleActionClick(action, itemData),
|
|
22850
22852
|
"data-testid": `action-${action.event}`,
|
|
22851
22853
|
"data-row-id": String(itemData.id),
|
|
22854
|
+
"aria-label": action.label,
|
|
22855
|
+
title: action.label,
|
|
22852
22856
|
className: "text-error hover:text-error hover:bg-error/10 px-2",
|
|
22853
|
-
children:
|
|
22854
|
-
action.icon && renderIconInput(action.icon, { size: "xs" }),
|
|
22855
|
-
action.label
|
|
22856
|
-
]
|
|
22857
|
+
children: action.icon ? renderIconInput(action.icon, { size: "xs" }) : action.label
|
|
22857
22858
|
},
|
|
22858
22859
|
idx
|
|
22859
22860
|
)) })
|
|
@@ -23655,10 +23656,7 @@ var init_FileTree = __esm({
|
|
|
23655
23656
|
className,
|
|
23656
23657
|
indent = 16
|
|
23657
23658
|
}) => {
|
|
23658
|
-
|
|
23659
|
-
if (tree.length === 0) {
|
|
23660
|
-
return /* @__PURE__ */ jsx(Box, { className: `p-4 ${className ?? ""}`, children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: t("fileTree.noFiles") }) });
|
|
23661
|
-
}
|
|
23659
|
+
if (tree.length === 0) return null;
|
|
23662
23660
|
return /* @__PURE__ */ jsx(Box, { className: `py-1 overflow-y-auto ${className ?? ""}`, role: "tree", children: tree.map((node) => /* @__PURE__ */ jsx(
|
|
23663
23661
|
TreeNodeItem,
|
|
23664
23662
|
{
|
|
@@ -27097,7 +27095,7 @@ var init_NumberStepper = __esm({
|
|
|
27097
27095
|
"active:bg-muted",
|
|
27098
27096
|
"transition-colors duration-instant",
|
|
27099
27097
|
"disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",
|
|
27100
|
-
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
27098
|
+
"focus:outline-none focus-visible:ring-[length:var(--focus-ring-width)] focus-visible:ring-ring focus-visible:ring-inset",
|
|
27101
27099
|
styles.button
|
|
27102
27100
|
),
|
|
27103
27101
|
"aria-label": t("aria.decrease"),
|
|
@@ -27138,7 +27136,7 @@ var init_NumberStepper = __esm({
|
|
|
27138
27136
|
"active:bg-muted",
|
|
27139
27137
|
"transition-colors duration-instant",
|
|
27140
27138
|
"disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",
|
|
27141
|
-
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
27139
|
+
"focus:outline-none focus-visible:ring-[length:var(--focus-ring-width)] focus-visible:ring-ring focus-visible:ring-inset",
|
|
27142
27140
|
styles.button
|
|
27143
27141
|
),
|
|
27144
27142
|
"aria-label": t("aria.increase"),
|
|
@@ -27594,7 +27592,7 @@ var init_Lightbox = __esm({
|
|
|
27594
27592
|
"p-2 rounded-full",
|
|
27595
27593
|
"text-[var(--color-foreground)] bg-[var(--color-card)]",
|
|
27596
27594
|
"hover:bg-opacity-70 transition-opacity",
|
|
27597
|
-
"focus:outline-none focus:ring-2 focus:ring-ring"
|
|
27595
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
27598
27596
|
),
|
|
27599
27597
|
"aria-label": t("aria.closeModal"),
|
|
27600
27598
|
children: /* @__PURE__ */ jsx(Icon, { name: "x", className: "w-6 h-6" })
|
|
@@ -27613,7 +27611,7 @@ var init_Lightbox = __esm({
|
|
|
27613
27611
|
"p-2 rounded-full",
|
|
27614
27612
|
"text-[var(--color-foreground)] bg-[var(--color-card)]",
|
|
27615
27613
|
"hover:bg-opacity-70 transition-opacity",
|
|
27616
|
-
"focus:outline-none focus:ring-2 focus:ring-ring"
|
|
27614
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
27617
27615
|
),
|
|
27618
27616
|
"aria-label": t("aria.previousImage"),
|
|
27619
27617
|
children: /* @__PURE__ */ jsx(Icon, { name: "chevron-left", className: "w-8 h-8" })
|
|
@@ -27650,7 +27648,7 @@ var init_Lightbox = __esm({
|
|
|
27650
27648
|
"p-2 rounded-full",
|
|
27651
27649
|
"text-[var(--color-foreground)] bg-[var(--color-card)]",
|
|
27652
27650
|
"hover:bg-opacity-70 transition-opacity",
|
|
27653
|
-
"focus:outline-none focus:ring-2 focus:ring-ring"
|
|
27651
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
27654
27652
|
),
|
|
27655
27653
|
"aria-label": t("aria.nextImage"),
|
|
27656
27654
|
children: /* @__PURE__ */ jsx(Icon, { name: "chevron-right", className: "w-8 h-8" })
|
|
@@ -27830,7 +27828,8 @@ function TableView({
|
|
|
27830
27828
|
const cell = formatCell(asFieldValue(getNestedValue(row, col.field ?? col.key)), col.format);
|
|
27831
27829
|
return Math.max(widest, cell.length);
|
|
27832
27830
|
}, columnLabel(col).length);
|
|
27833
|
-
|
|
27831
|
+
const chrome = col.format === "badge" ? BADGE_CHROME_CH : 0;
|
|
27832
|
+
return Math.min(longest + chrome, MAX_MEASURED_COL_CH);
|
|
27834
27833
|
}),
|
|
27835
27834
|
[colDefs, data]
|
|
27836
27835
|
);
|
|
@@ -27920,7 +27919,7 @@ function TableView({
|
|
|
27920
27919
|
col.className
|
|
27921
27920
|
);
|
|
27922
27921
|
if (col.format === "badge" && raw != null && raw !== "") {
|
|
27923
|
-
return /* @__PURE__ */ jsx(Box, { role: "cell", className: cellBase, children: /* @__PURE__ */ jsx(Badge, { variant: statusVariant4(String(raw)), size: "sm", children: String(raw) }) }, col.key);
|
|
27922
|
+
return /* @__PURE__ */ jsx(Box, { role: "cell", className: cellBase, children: /* @__PURE__ */ jsx(Badge, { variant: statusVariant4(String(raw)), size: "sm", className: "whitespace-nowrap", children: String(raw) }) }, col.key);
|
|
27924
27923
|
}
|
|
27925
27924
|
return /* @__PURE__ */ jsx(Box, { role: "cell", className: cellBase, children: /* @__PURE__ */ jsx("span", { className: "truncate", children: formatCell(raw, col.format) }) }, col.key);
|
|
27926
27925
|
}),
|
|
@@ -28003,7 +28002,7 @@ function TableView({
|
|
|
28003
28002
|
}
|
|
28004
28003
|
);
|
|
28005
28004
|
}
|
|
28006
|
-
var MAX_MEASURED_COL_CH, alignClass, weightClass, LOOKS;
|
|
28005
|
+
var MAX_MEASURED_COL_CH, BADGE_CHROME_CH, alignClass, weightClass, LOOKS;
|
|
28007
28006
|
var init_TableView = __esm({
|
|
28008
28007
|
"components/core/molecules/TableView.tsx"() {
|
|
28009
28008
|
"use client";
|
|
@@ -28022,6 +28021,7 @@ var init_TableView = __esm({
|
|
|
28022
28021
|
init_useDataDnd();
|
|
28023
28022
|
createLogger("almadar:ui:table-view");
|
|
28024
28023
|
MAX_MEASURED_COL_CH = 32;
|
|
28024
|
+
BADGE_CHROME_CH = 4;
|
|
28025
28025
|
alignClass = {
|
|
28026
28026
|
left: "justify-start text-left",
|
|
28027
28027
|
center: "justify-center text-center",
|
|
@@ -30119,7 +30119,7 @@ var init_VoteStack = __esm({
|
|
|
30119
30119
|
"active:bg-muted",
|
|
30120
30120
|
"transition-colors duration-instant",
|
|
30121
30121
|
"disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",
|
|
30122
|
-
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
30122
|
+
"focus:outline-none focus-visible:ring-[length:var(--focus-ring-width)] focus-visible:ring-ring focus-visible:ring-inset",
|
|
30123
30123
|
styles.button
|
|
30124
30124
|
),
|
|
30125
30125
|
children: /* @__PURE__ */ jsx(Icon, { name: "chevron-up", className: styles.icon })
|
|
@@ -30156,7 +30156,7 @@ var init_VoteStack = __esm({
|
|
|
30156
30156
|
"active:bg-muted",
|
|
30157
30157
|
"transition-colors duration-instant",
|
|
30158
30158
|
"disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",
|
|
30159
|
-
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
30159
|
+
"focus:outline-none focus-visible:ring-[length:var(--focus-ring-width)] focus-visible:ring-ring focus-visible:ring-inset",
|
|
30160
30160
|
styles.button
|
|
30161
30161
|
),
|
|
30162
30162
|
children: /* @__PURE__ */ jsx(Icon, { name: "chevron-down", className: styles.icon })
|
|
@@ -30677,7 +30677,7 @@ var init_QrScanner = __esm({
|
|
|
30677
30677
|
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
30678
30678
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
30679
30679
|
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
30680
|
-
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
30680
|
+
"hover:bg-opacity-80 focus:outline-none focus-visible:ring-2 focus-visible:ring-white"
|
|
30681
30681
|
),
|
|
30682
30682
|
"aria-label": isPaused ? t("qrScanner.resumeScanning") : t("qrScanner.pauseScanning"),
|
|
30683
30683
|
children: isPaused ? /* @__PURE__ */ jsx(Icon, { name: "play", className: "h-4 w-4" }) : /* @__PURE__ */ jsx(Icon, { name: "pause", className: "h-4 w-4" })
|
|
@@ -30692,7 +30692,7 @@ var init_QrScanner = __esm({
|
|
|
30692
30692
|
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
30693
30693
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
30694
30694
|
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
30695
|
-
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
30695
|
+
"hover:bg-opacity-80 focus:outline-none focus-visible:ring-2 focus-visible:ring-white"
|
|
30696
30696
|
),
|
|
30697
30697
|
"aria-label": currentFacing === "environment" ? t("qrScanner.switchToFrontCamera") : t("qrScanner.switchToRearCamera"),
|
|
30698
30698
|
children: /* @__PURE__ */ jsx(Icon, { name: "refresh-cw", className: "h-4 w-4" })
|
|
@@ -30707,7 +30707,7 @@ var init_QrScanner = __esm({
|
|
|
30707
30707
|
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
30708
30708
|
"rounded-full bg-black bg-opacity-60 px-3 py-2 text-xs text-white",
|
|
30709
30709
|
// eslint-disable-next-line almadar/no-hardcoded-colors -- media overlay: always over a dark scrim
|
|
30710
|
-
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
30710
|
+
"hover:bg-opacity-80 focus:outline-none focus-visible:ring-2 focus-visible:ring-white"
|
|
30711
30711
|
),
|
|
30712
30712
|
"aria-label": t("aria.mockScanDev"),
|
|
30713
30713
|
children: t("qrScanner.mockScan")
|
|
@@ -42544,7 +42544,7 @@ var init_TabbedContainer = __esm({
|
|
|
42544
42544
|
onClick: () => !isDisabled && handleTabChange(tab.id),
|
|
42545
42545
|
className: cn(
|
|
42546
42546
|
"flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors",
|
|
42547
|
-
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
42547
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
42548
42548
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
42549
42549
|
isActive ? "bg-primary text-primary-foreground" : "bg-card text-foreground hover:bg-muted",
|
|
42550
42550
|
isVertical ? "justify-start" : "justify-center"
|