@almadar/ui 5.76.6 → 5.77.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 +265 -440
- package/dist/avl/index.js +266 -441
- package/dist/components/index.cjs +138 -135
- package/dist/components/index.js +138 -135
- package/dist/providers/index.cjs +265 -440
- package/dist/providers/index.js +266 -441
- package/dist/runtime/index.cjs +265 -440
- package/dist/runtime/index.js +266 -441
- package/package.json +2 -2
package/dist/components/index.js
CHANGED
|
@@ -3993,7 +3993,11 @@ var init_Switch = __esm({
|
|
|
3993
3993
|
disabled,
|
|
3994
3994
|
onClick: handleClick,
|
|
3995
3995
|
className: cn(
|
|
3996
|
-
|
|
3996
|
+
// Fixed rem sizes instead of spacing tokens: themes like atelier
|
|
3997
|
+
// redefine --space-11 to 68px, which makes w-11 enormous and leaves
|
|
3998
|
+
// the thumb stuck near the left edge. The switch geometry must stay
|
|
3999
|
+
// proportional regardless of a theme's density scale.
|
|
4000
|
+
"relative inline-flex h-[1.5rem] w-[2.75rem] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors",
|
|
3997
4001
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
3998
4002
|
isChecked ? "bg-primary" : "bg-muted",
|
|
3999
4003
|
disabled && "cursor-not-allowed opacity-50"
|
|
@@ -4002,8 +4006,8 @@ var init_Switch = __esm({
|
|
|
4002
4006
|
"span",
|
|
4003
4007
|
{
|
|
4004
4008
|
className: cn(
|
|
4005
|
-
"pointer-events-none block h-
|
|
4006
|
-
isChecked ? "translate-x-
|
|
4009
|
+
"pointer-events-none block h-[1.25rem] w-[1.25rem] rounded-full bg-background shadow-lg ring-0 transition-transform",
|
|
4010
|
+
isChecked ? "translate-x-[1.25rem]" : "translate-x-0"
|
|
4007
4011
|
)
|
|
4008
4012
|
}
|
|
4009
4013
|
)
|
|
@@ -16995,129 +16999,6 @@ var init_BuilderBoard = __esm({
|
|
|
16995
16999
|
BuilderBoard.displayName = "BuilderBoard";
|
|
16996
17000
|
}
|
|
16997
17001
|
});
|
|
16998
|
-
function useSafeEventBus2() {
|
|
16999
|
-
try {
|
|
17000
|
-
return useEventBus();
|
|
17001
|
-
} catch {
|
|
17002
|
-
return { emit: () => {
|
|
17003
|
-
}, on: () => () => {
|
|
17004
|
-
}, once: () => {
|
|
17005
|
-
} };
|
|
17006
|
-
}
|
|
17007
|
-
}
|
|
17008
|
-
var log6, lookStyles4, ButtonGroup;
|
|
17009
|
-
var init_ButtonGroup = __esm({
|
|
17010
|
-
"components/core/molecules/ButtonGroup.tsx"() {
|
|
17011
|
-
"use client";
|
|
17012
|
-
init_cn();
|
|
17013
|
-
init_atoms();
|
|
17014
|
-
init_useEventBus();
|
|
17015
|
-
log6 = createLogger("almadar:ui:button-group");
|
|
17016
|
-
lookStyles4 = {
|
|
17017
|
-
"right-aligned-buttons": "",
|
|
17018
|
-
"floating-bar": "fixed bottom-section left-1/2 -translate-x-1/2 shadow-elevation-toast bg-card p-card-sm rounded-container",
|
|
17019
|
-
"inline-row": "gap-2 inline-flex",
|
|
17020
|
-
"dropdown-menu": "[&>button:not(:first-child)]:hidden",
|
|
17021
|
-
"command-palette-trigger": "[&>button:not(:first-child)]:hidden"
|
|
17022
|
-
};
|
|
17023
|
-
ButtonGroup = ({
|
|
17024
|
-
children,
|
|
17025
|
-
primary,
|
|
17026
|
-
secondary,
|
|
17027
|
-
variant = "default",
|
|
17028
|
-
orientation = "horizontal",
|
|
17029
|
-
className,
|
|
17030
|
-
// Filter-group pattern props (entity and filters are used for schema-driven filtering)
|
|
17031
|
-
entity: _entity,
|
|
17032
|
-
filters,
|
|
17033
|
-
look = "right-aligned-buttons"
|
|
17034
|
-
}) => {
|
|
17035
|
-
const eventBus = useSafeEventBus2();
|
|
17036
|
-
const variantClasses2 = {
|
|
17037
|
-
default: "gap-0",
|
|
17038
|
-
segmented: "gap-0 [&>button]:rounded-none [&>button:first-child]:rounded-l-lg [&>button:last-child]:rounded-r-lg [&>button:not(:first-child)]:border-l-0",
|
|
17039
|
-
toggle: "gap-0 [&>button]:rounded-none [&>button:first-child]:rounded-l-lg [&>button:last-child]:rounded-r-lg [&>button:not(:first-child)]:border-l-0"
|
|
17040
|
-
};
|
|
17041
|
-
const orientationClasses = {
|
|
17042
|
-
horizontal: "flex-row",
|
|
17043
|
-
vertical: "flex-col [&>button:first-child]:rounded-t-lg [&>button:last-child]:rounded-b-lg [&>button:not(:first-child)]:border-t-0 [&>button:not(:first-child)]:border-l"
|
|
17044
|
-
};
|
|
17045
|
-
const handleActionClick = (action) => {
|
|
17046
|
-
if (action.event) {
|
|
17047
|
-
eventBus.emit("UI:DISPATCH", { event: action.event });
|
|
17048
|
-
}
|
|
17049
|
-
if (action.navigatesTo) {
|
|
17050
|
-
eventBus.emit("UI:NAVIGATE", { url: action.navigatesTo });
|
|
17051
|
-
}
|
|
17052
|
-
};
|
|
17053
|
-
const renderFormActions = () => {
|
|
17054
|
-
const buttons = [];
|
|
17055
|
-
if (secondary) {
|
|
17056
|
-
secondary.forEach((action, index) => {
|
|
17057
|
-
buttons.push(
|
|
17058
|
-
/* @__PURE__ */ jsx(
|
|
17059
|
-
Button,
|
|
17060
|
-
{
|
|
17061
|
-
type: action.actionType === "submit" ? "submit" : "button",
|
|
17062
|
-
variant: action.variant || "ghost",
|
|
17063
|
-
onClick: () => handleActionClick(action),
|
|
17064
|
-
children: action.label
|
|
17065
|
-
},
|
|
17066
|
-
`secondary-${index}`
|
|
17067
|
-
)
|
|
17068
|
-
);
|
|
17069
|
-
});
|
|
17070
|
-
}
|
|
17071
|
-
if (primary) {
|
|
17072
|
-
const isSubmit = primary.actionType === "submit";
|
|
17073
|
-
buttons.push(
|
|
17074
|
-
/* @__PURE__ */ jsx(
|
|
17075
|
-
Button,
|
|
17076
|
-
{
|
|
17077
|
-
type: isSubmit ? "submit" : "button",
|
|
17078
|
-
variant: primary.variant || "primary",
|
|
17079
|
-
onClick: () => handleActionClick(primary),
|
|
17080
|
-
"data-testid": isSubmit ? "form-submit" : void 0,
|
|
17081
|
-
children: primary.label
|
|
17082
|
-
},
|
|
17083
|
-
"primary"
|
|
17084
|
-
)
|
|
17085
|
-
);
|
|
17086
|
-
}
|
|
17087
|
-
return buttons;
|
|
17088
|
-
};
|
|
17089
|
-
const renderFilters = () => {
|
|
17090
|
-
if (!filters || filters.length === 0) return null;
|
|
17091
|
-
return filters.map((filter, index) => /* @__PURE__ */ jsx(
|
|
17092
|
-
Button,
|
|
17093
|
-
{
|
|
17094
|
-
variant: "ghost",
|
|
17095
|
-
onClick: () => {
|
|
17096
|
-
log6.debug("Filter clicked", { field: filter.field });
|
|
17097
|
-
},
|
|
17098
|
-
children: filter.label
|
|
17099
|
-
},
|
|
17100
|
-
`filter-${filter.field}-${index}`
|
|
17101
|
-
));
|
|
17102
|
-
};
|
|
17103
|
-
return /* @__PURE__ */ jsx(
|
|
17104
|
-
"div",
|
|
17105
|
-
{
|
|
17106
|
-
className: cn(
|
|
17107
|
-
"inline-flex gap-2",
|
|
17108
|
-
variantClasses2[variant],
|
|
17109
|
-
orientationClasses[orientation],
|
|
17110
|
-
lookStyles4[look],
|
|
17111
|
-
className
|
|
17112
|
-
),
|
|
17113
|
-
role: "group",
|
|
17114
|
-
children: children || renderFilters() || renderFormActions()
|
|
17115
|
-
}
|
|
17116
|
-
);
|
|
17117
|
-
};
|
|
17118
|
-
ButtonGroup.displayName = "ButtonGroup";
|
|
17119
|
-
}
|
|
17120
|
-
});
|
|
17121
17002
|
function useSwipeGesture(callbacks, options = {}) {
|
|
17122
17003
|
const { threshold = 50, velocityThreshold = 0.3, preventDefault = false } = options;
|
|
17123
17004
|
const startX = useRef(0);
|
|
@@ -19544,7 +19425,7 @@ var init_CardGrid = __esm({
|
|
|
19544
19425
|
CardGrid.displayName = "CardGrid";
|
|
19545
19426
|
}
|
|
19546
19427
|
});
|
|
19547
|
-
function
|
|
19428
|
+
function useSafeEventBus2() {
|
|
19548
19429
|
try {
|
|
19549
19430
|
return useEventBus();
|
|
19550
19431
|
} catch {
|
|
@@ -19580,7 +19461,7 @@ var init_Carousel = __esm({
|
|
|
19580
19461
|
const [activeIndex, setActiveIndex] = useState(0);
|
|
19581
19462
|
const scrollRef = useRef(null);
|
|
19582
19463
|
const autoPlayRef = useRef(null);
|
|
19583
|
-
const eventBus =
|
|
19464
|
+
const eventBus = useSafeEventBus2();
|
|
19584
19465
|
const { t } = useTranslate();
|
|
19585
19466
|
const safeItems = items ?? [];
|
|
19586
19467
|
const totalSlides = safeItems.length;
|
|
@@ -24205,7 +24086,7 @@ function DataGrid({
|
|
|
24205
24086
|
/* @__PURE__ */ jsx(
|
|
24206
24087
|
Box,
|
|
24207
24088
|
{
|
|
24208
|
-
className: cn("grid", gapStyles5[gap], scrollX ? "grid-flow-col overflow-x-auto" : colsClass,
|
|
24089
|
+
className: cn("grid", gapStyles5[gap], scrollX ? "grid-flow-col overflow-x-auto" : colsClass, lookStyles4[look], className),
|
|
24209
24090
|
style: scrollX ? { gridAutoFlow: "column", gridAutoColumns: `minmax(${minCardWidth}px, 1fr)` } : gridTemplateColumns ? { gridTemplateColumns } : void 0,
|
|
24210
24091
|
children: data.map((item, index) => {
|
|
24211
24092
|
const itemData = item;
|
|
@@ -24400,7 +24281,7 @@ function DataGrid({
|
|
|
24400
24281
|
] })
|
|
24401
24282
|
);
|
|
24402
24283
|
}
|
|
24403
|
-
var dataGridLog, BADGE_VARIANTS, gapStyles5,
|
|
24284
|
+
var dataGridLog, BADGE_VARIANTS, gapStyles5, lookStyles4;
|
|
24404
24285
|
var init_DataGrid = __esm({
|
|
24405
24286
|
"components/core/molecules/DataGrid.tsx"() {
|
|
24406
24287
|
"use client";
|
|
@@ -24435,7 +24316,7 @@ var init_DataGrid = __esm({
|
|
|
24435
24316
|
lg: "gap-6",
|
|
24436
24317
|
xl: "gap-8"
|
|
24437
24318
|
};
|
|
24438
|
-
|
|
24319
|
+
lookStyles4 = {
|
|
24439
24320
|
dense: "gap-2 [&>*]:p-card-sm",
|
|
24440
24321
|
spacious: "gap-8 [&>*]:p-card-lg",
|
|
24441
24322
|
striped: "[&>*:nth-child(even)]:bg-muted/30",
|
|
@@ -25979,6 +25860,129 @@ var init_FormField = __esm({
|
|
|
25979
25860
|
FormField.displayName = "FormField";
|
|
25980
25861
|
}
|
|
25981
25862
|
});
|
|
25863
|
+
function useSafeEventBus3() {
|
|
25864
|
+
try {
|
|
25865
|
+
return useEventBus();
|
|
25866
|
+
} catch {
|
|
25867
|
+
return { emit: () => {
|
|
25868
|
+
}, on: () => () => {
|
|
25869
|
+
}, once: () => {
|
|
25870
|
+
} };
|
|
25871
|
+
}
|
|
25872
|
+
}
|
|
25873
|
+
var log6, lookStyles5, ButtonGroup;
|
|
25874
|
+
var init_ButtonGroup = __esm({
|
|
25875
|
+
"components/core/molecules/ButtonGroup.tsx"() {
|
|
25876
|
+
"use client";
|
|
25877
|
+
init_cn();
|
|
25878
|
+
init_atoms();
|
|
25879
|
+
init_useEventBus();
|
|
25880
|
+
log6 = createLogger("almadar:ui:button-group");
|
|
25881
|
+
lookStyles5 = {
|
|
25882
|
+
"right-aligned-buttons": "",
|
|
25883
|
+
"floating-bar": "fixed bottom-section left-1/2 -translate-x-1/2 shadow-elevation-toast bg-card p-card-sm rounded-container",
|
|
25884
|
+
"inline-row": "gap-2 inline-flex",
|
|
25885
|
+
"dropdown-menu": "[&>button:not(:first-child)]:hidden",
|
|
25886
|
+
"command-palette-trigger": "[&>button:not(:first-child)]:hidden"
|
|
25887
|
+
};
|
|
25888
|
+
ButtonGroup = ({
|
|
25889
|
+
children,
|
|
25890
|
+
primary,
|
|
25891
|
+
secondary,
|
|
25892
|
+
variant = "default",
|
|
25893
|
+
orientation = "horizontal",
|
|
25894
|
+
className,
|
|
25895
|
+
// Filter-group pattern props (entity and filters are used for schema-driven filtering)
|
|
25896
|
+
entity: _entity,
|
|
25897
|
+
filters,
|
|
25898
|
+
look = "right-aligned-buttons"
|
|
25899
|
+
}) => {
|
|
25900
|
+
const eventBus = useSafeEventBus3();
|
|
25901
|
+
const variantClasses2 = {
|
|
25902
|
+
default: "gap-0",
|
|
25903
|
+
segmented: "gap-0 [&>button]:rounded-none [&>button:first-child]:rounded-l-lg [&>button:last-child]:rounded-r-lg [&>button:not(:first-child)]:border-l-0",
|
|
25904
|
+
toggle: "gap-0 [&>button]:rounded-none [&>button:first-child]:rounded-l-lg [&>button:last-child]:rounded-r-lg [&>button:not(:first-child)]:border-l-0"
|
|
25905
|
+
};
|
|
25906
|
+
const orientationClasses = {
|
|
25907
|
+
horizontal: "flex-row",
|
|
25908
|
+
vertical: "flex-col [&>button:first-child]:rounded-t-lg [&>button:last-child]:rounded-b-lg [&>button:not(:first-child)]:border-t-0 [&>button:not(:first-child)]:border-l"
|
|
25909
|
+
};
|
|
25910
|
+
const handleActionClick = (action) => {
|
|
25911
|
+
if (action.event) {
|
|
25912
|
+
eventBus.emit("UI:DISPATCH", { event: action.event });
|
|
25913
|
+
}
|
|
25914
|
+
if (action.navigatesTo) {
|
|
25915
|
+
eventBus.emit("UI:NAVIGATE", { url: action.navigatesTo });
|
|
25916
|
+
}
|
|
25917
|
+
};
|
|
25918
|
+
const renderFormActions = () => {
|
|
25919
|
+
const buttons = [];
|
|
25920
|
+
if (secondary) {
|
|
25921
|
+
secondary.forEach((action, index) => {
|
|
25922
|
+
buttons.push(
|
|
25923
|
+
/* @__PURE__ */ jsx(
|
|
25924
|
+
Button,
|
|
25925
|
+
{
|
|
25926
|
+
type: action.actionType === "submit" ? "submit" : "button",
|
|
25927
|
+
variant: action.variant || "ghost",
|
|
25928
|
+
onClick: () => handleActionClick(action),
|
|
25929
|
+
children: action.label
|
|
25930
|
+
},
|
|
25931
|
+
`secondary-${index}`
|
|
25932
|
+
)
|
|
25933
|
+
);
|
|
25934
|
+
});
|
|
25935
|
+
}
|
|
25936
|
+
if (primary) {
|
|
25937
|
+
const isSubmit = primary.actionType === "submit";
|
|
25938
|
+
buttons.push(
|
|
25939
|
+
/* @__PURE__ */ jsx(
|
|
25940
|
+
Button,
|
|
25941
|
+
{
|
|
25942
|
+
type: isSubmit ? "submit" : "button",
|
|
25943
|
+
variant: primary.variant || "primary",
|
|
25944
|
+
onClick: () => handleActionClick(primary),
|
|
25945
|
+
"data-testid": isSubmit ? "form-submit" : void 0,
|
|
25946
|
+
children: primary.label
|
|
25947
|
+
},
|
|
25948
|
+
"primary"
|
|
25949
|
+
)
|
|
25950
|
+
);
|
|
25951
|
+
}
|
|
25952
|
+
return buttons;
|
|
25953
|
+
};
|
|
25954
|
+
const renderFilters = () => {
|
|
25955
|
+
if (!filters || filters.length === 0) return null;
|
|
25956
|
+
return filters.map((filter, index) => /* @__PURE__ */ jsx(
|
|
25957
|
+
Button,
|
|
25958
|
+
{
|
|
25959
|
+
variant: "ghost",
|
|
25960
|
+
onClick: () => {
|
|
25961
|
+
log6.debug("Filter clicked", { field: filter.field });
|
|
25962
|
+
},
|
|
25963
|
+
children: filter.label
|
|
25964
|
+
},
|
|
25965
|
+
`filter-${filter.field}-${index}`
|
|
25966
|
+
));
|
|
25967
|
+
};
|
|
25968
|
+
return /* @__PURE__ */ jsx(
|
|
25969
|
+
"div",
|
|
25970
|
+
{
|
|
25971
|
+
className: cn(
|
|
25972
|
+
"inline-flex gap-2",
|
|
25973
|
+
variantClasses2[variant],
|
|
25974
|
+
orientationClasses[orientation],
|
|
25975
|
+
lookStyles5[look],
|
|
25976
|
+
className
|
|
25977
|
+
),
|
|
25978
|
+
role: "group",
|
|
25979
|
+
children: children || renderFilters() || renderFormActions()
|
|
25980
|
+
}
|
|
25981
|
+
);
|
|
25982
|
+
};
|
|
25983
|
+
ButtonGroup.displayName = "ButtonGroup";
|
|
25984
|
+
}
|
|
25985
|
+
});
|
|
25982
25986
|
function getOrCreateStore(query) {
|
|
25983
25987
|
if (!queryStores.has(query)) {
|
|
25984
25988
|
queryStores.set(query, {
|
|
@@ -52775,7 +52779,6 @@ var init_component_registry_generated = __esm({
|
|
|
52775
52779
|
init_BranchingLogicBuilder();
|
|
52776
52780
|
init_Breadcrumb();
|
|
52777
52781
|
init_BuilderBoard();
|
|
52778
|
-
init_ButtonGroup();
|
|
52779
52782
|
init_CTABanner();
|
|
52780
52783
|
init_CalendarGrid();
|
|
52781
52784
|
init_Canvas2D();
|
|
@@ -52852,9 +52855,9 @@ var init_component_registry_generated = __esm({
|
|
|
52852
52855
|
init_FlipContainer();
|
|
52853
52856
|
init_FloatingActionButton();
|
|
52854
52857
|
init_Form();
|
|
52858
|
+
init_FormSection();
|
|
52855
52859
|
init_FormField();
|
|
52856
52860
|
init_FormSectionHeader();
|
|
52857
|
-
init_GameAudioProvider();
|
|
52858
52861
|
init_GameAudioToggle();
|
|
52859
52862
|
init_GameCard();
|
|
52860
52863
|
init_GameHud();
|
|
@@ -53103,7 +53106,6 @@ var init_component_registry_generated = __esm({
|
|
|
53103
53106
|
"Breadcrumb": Breadcrumb,
|
|
53104
53107
|
"BuilderBoard": BuilderBoard,
|
|
53105
53108
|
"Button": ButtonPattern,
|
|
53106
|
-
"ButtonGroup": ButtonGroup,
|
|
53107
53109
|
"ButtonPattern": ButtonPattern,
|
|
53108
53110
|
"CTABanner": CTABanner,
|
|
53109
53111
|
"CalendarGrid": CalendarGrid,
|
|
@@ -53183,9 +53185,10 @@ var init_component_registry_generated = __esm({
|
|
|
53183
53185
|
"FlipContainer": FlipContainer,
|
|
53184
53186
|
"FloatingActionButton": FloatingActionButton,
|
|
53185
53187
|
"Form": Form,
|
|
53188
|
+
"FormActions": FormActions,
|
|
53186
53189
|
"FormField": FormField,
|
|
53190
|
+
"FormLayout": FormLayout,
|
|
53187
53191
|
"FormSectionHeader": FormSectionHeader,
|
|
53188
|
-
"GameAudioProvider": GameAudioProvider,
|
|
53189
53192
|
"GameAudioToggle": GameAudioToggle,
|
|
53190
53193
|
"GameBoard3D": GameBoard3D,
|
|
53191
53194
|
"GameCanvas3D": GameCanvas3D,
|