@almadar/ui 4.20.0 → 4.21.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 +5 -1
- package/dist/avl/index.js +5 -1
- package/dist/components/index.cjs +5 -1
- package/dist/components/index.js +5 -1
- package/dist/components/molecules/Tabs.d.ts +4 -2
- package/dist/providers/index.cjs +5 -1
- package/dist/providers/index.js +5 -1
- package/dist/runtime/index.cjs +5 -1
- package/dist/runtime/index.js +5 -1
- package/package.json +1 -1
package/dist/avl/index.cjs
CHANGED
|
@@ -20318,6 +20318,7 @@ var init_Tabs = __esm({
|
|
|
20318
20318
|
defaultActiveTab,
|
|
20319
20319
|
activeTab: controlledActiveTab,
|
|
20320
20320
|
onTabChange,
|
|
20321
|
+
tabChangeEvent,
|
|
20321
20322
|
variant = "default",
|
|
20322
20323
|
orientation = "horizontal",
|
|
20323
20324
|
className
|
|
@@ -20340,6 +20341,9 @@ var init_Tabs = __esm({
|
|
|
20340
20341
|
setInternalActiveTab(tabId);
|
|
20341
20342
|
}
|
|
20342
20343
|
onTabChange?.(tabId);
|
|
20344
|
+
if (tabChangeEvent) {
|
|
20345
|
+
eventBus.emit(`UI:${tabChangeEvent}`, { tabId });
|
|
20346
|
+
}
|
|
20343
20347
|
if (tabEvent) {
|
|
20344
20348
|
eventBus.emit(`UI:${tabEvent}`, { tabId });
|
|
20345
20349
|
}
|
|
@@ -20420,7 +20424,7 @@ var init_Tabs = __esm({
|
|
|
20420
20424
|
isActive ? variant === "pills" ? "text-primary-foreground font-bold" : "text-foreground font-bold" : "text-muted-foreground hover:text-foreground"
|
|
20421
20425
|
),
|
|
20422
20426
|
children: [
|
|
20423
|
-
item.icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: item.icon, size: "sm" }),
|
|
20427
|
+
item.icon && (typeof item.icon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: item.icon, size: "sm" }) : /* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: item.icon, size: "sm" })),
|
|
20424
20428
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: isActive ? "semibold" : "normal", className: "!text-inherit", children: item.label }),
|
|
20425
20429
|
item.badge !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "default", size: "sm", children: item.badge })
|
|
20426
20430
|
]
|
package/dist/avl/index.js
CHANGED
|
@@ -20272,6 +20272,7 @@ var init_Tabs = __esm({
|
|
|
20272
20272
|
defaultActiveTab,
|
|
20273
20273
|
activeTab: controlledActiveTab,
|
|
20274
20274
|
onTabChange,
|
|
20275
|
+
tabChangeEvent,
|
|
20275
20276
|
variant = "default",
|
|
20276
20277
|
orientation = "horizontal",
|
|
20277
20278
|
className
|
|
@@ -20294,6 +20295,9 @@ var init_Tabs = __esm({
|
|
|
20294
20295
|
setInternalActiveTab(tabId);
|
|
20295
20296
|
}
|
|
20296
20297
|
onTabChange?.(tabId);
|
|
20298
|
+
if (tabChangeEvent) {
|
|
20299
|
+
eventBus.emit(`UI:${tabChangeEvent}`, { tabId });
|
|
20300
|
+
}
|
|
20297
20301
|
if (tabEvent) {
|
|
20298
20302
|
eventBus.emit(`UI:${tabEvent}`, { tabId });
|
|
20299
20303
|
}
|
|
@@ -20374,7 +20378,7 @@ var init_Tabs = __esm({
|
|
|
20374
20378
|
isActive ? variant === "pills" ? "text-primary-foreground font-bold" : "text-foreground font-bold" : "text-muted-foreground hover:text-foreground"
|
|
20375
20379
|
),
|
|
20376
20380
|
children: [
|
|
20377
|
-
item.icon && /* @__PURE__ */ jsx(Icon, { icon: item.icon, size: "sm" }),
|
|
20381
|
+
item.icon && (typeof item.icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: item.icon, size: "sm" }) : /* @__PURE__ */ jsx(Icon, { icon: item.icon, size: "sm" })),
|
|
20378
20382
|
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: isActive ? "semibold" : "normal", className: "!text-inherit", children: item.label }),
|
|
20379
20383
|
item.badge !== void 0 && /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", children: item.badge })
|
|
20380
20384
|
]
|
|
@@ -15561,6 +15561,7 @@ var init_Tabs = __esm({
|
|
|
15561
15561
|
defaultActiveTab,
|
|
15562
15562
|
activeTab: controlledActiveTab,
|
|
15563
15563
|
onTabChange,
|
|
15564
|
+
tabChangeEvent,
|
|
15564
15565
|
variant = "default",
|
|
15565
15566
|
orientation = "horizontal",
|
|
15566
15567
|
className
|
|
@@ -15583,6 +15584,9 @@ var init_Tabs = __esm({
|
|
|
15583
15584
|
setInternalActiveTab(tabId);
|
|
15584
15585
|
}
|
|
15585
15586
|
onTabChange?.(tabId);
|
|
15587
|
+
if (tabChangeEvent) {
|
|
15588
|
+
eventBus.emit(`UI:${tabChangeEvent}`, { tabId });
|
|
15589
|
+
}
|
|
15586
15590
|
if (tabEvent) {
|
|
15587
15591
|
eventBus.emit(`UI:${tabEvent}`, { tabId });
|
|
15588
15592
|
}
|
|
@@ -15663,7 +15667,7 @@ var init_Tabs = __esm({
|
|
|
15663
15667
|
isActive ? variant === "pills" ? "text-primary-foreground font-bold" : "text-foreground font-bold" : "text-muted-foreground hover:text-foreground"
|
|
15664
15668
|
),
|
|
15665
15669
|
children: [
|
|
15666
|
-
item.icon && /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { icon: item.icon, size: "sm" }),
|
|
15670
|
+
item.icon && (typeof item.icon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: item.icon, size: "sm" }) : /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { icon: item.icon, size: "sm" })),
|
|
15667
15671
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: isActive ? "semibold" : "normal", className: "!text-inherit", children: item.label }),
|
|
15668
15672
|
item.badge !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "default", size: "sm", children: item.badge })
|
|
15669
15673
|
]
|
package/dist/components/index.js
CHANGED
|
@@ -15516,6 +15516,7 @@ var init_Tabs = __esm({
|
|
|
15516
15516
|
defaultActiveTab,
|
|
15517
15517
|
activeTab: controlledActiveTab,
|
|
15518
15518
|
onTabChange,
|
|
15519
|
+
tabChangeEvent,
|
|
15519
15520
|
variant = "default",
|
|
15520
15521
|
orientation = "horizontal",
|
|
15521
15522
|
className
|
|
@@ -15538,6 +15539,9 @@ var init_Tabs = __esm({
|
|
|
15538
15539
|
setInternalActiveTab(tabId);
|
|
15539
15540
|
}
|
|
15540
15541
|
onTabChange?.(tabId);
|
|
15542
|
+
if (tabChangeEvent) {
|
|
15543
|
+
eventBus.emit(`UI:${tabChangeEvent}`, { tabId });
|
|
15544
|
+
}
|
|
15541
15545
|
if (tabEvent) {
|
|
15542
15546
|
eventBus.emit(`UI:${tabEvent}`, { tabId });
|
|
15543
15547
|
}
|
|
@@ -15618,7 +15622,7 @@ var init_Tabs = __esm({
|
|
|
15618
15622
|
isActive ? variant === "pills" ? "text-primary-foreground font-bold" : "text-foreground font-bold" : "text-muted-foreground hover:text-foreground"
|
|
15619
15623
|
),
|
|
15620
15624
|
children: [
|
|
15621
|
-
item.icon && /* @__PURE__ */ jsx(Icon, { icon: item.icon, size: "sm" }),
|
|
15625
|
+
item.icon && (typeof item.icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: item.icon, size: "sm" }) : /* @__PURE__ */ jsx(Icon, { icon: item.icon, size: "sm" })),
|
|
15622
15626
|
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: isActive ? "semibold" : "normal", className: "!text-inherit", children: item.label }),
|
|
15623
15627
|
item.badge !== void 0 && /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", children: item.badge })
|
|
15624
15628
|
]
|
|
@@ -13,8 +13,8 @@ export interface TabItem {
|
|
|
13
13
|
label: string;
|
|
14
14
|
/** Tab content - optional for event-driven tabs */
|
|
15
15
|
content?: React.ReactNode;
|
|
16
|
-
/** Tab icon */
|
|
17
|
-
icon?: LucideIcon;
|
|
16
|
+
/** Tab icon — pass either a Lucide component or its registry name (e.g. "file-text") */
|
|
17
|
+
icon?: LucideIcon | string;
|
|
18
18
|
/** Tab badge */
|
|
19
19
|
badge?: string | number;
|
|
20
20
|
/** Disable tab */
|
|
@@ -35,6 +35,8 @@ export interface TabsProps {
|
|
|
35
35
|
activeTab?: string;
|
|
36
36
|
/** Callback when tab changes */
|
|
37
37
|
onTabChange?: (tabId: string) => void;
|
|
38
|
+
/** Declarative tab change event — emits UI:{tabChangeEvent} with { tabId } */
|
|
39
|
+
tabChangeEvent?: string;
|
|
38
40
|
/** Tab variant */
|
|
39
41
|
variant?: 'default' | 'pills' | 'underline';
|
|
40
42
|
/** Tab orientation */
|
package/dist/providers/index.cjs
CHANGED
|
@@ -17069,6 +17069,7 @@ var init_Tabs = __esm({
|
|
|
17069
17069
|
defaultActiveTab,
|
|
17070
17070
|
activeTab: controlledActiveTab,
|
|
17071
17071
|
onTabChange,
|
|
17072
|
+
tabChangeEvent,
|
|
17072
17073
|
variant = "default",
|
|
17073
17074
|
orientation = "horizontal",
|
|
17074
17075
|
className
|
|
@@ -17091,6 +17092,9 @@ var init_Tabs = __esm({
|
|
|
17091
17092
|
setInternalActiveTab(tabId);
|
|
17092
17093
|
}
|
|
17093
17094
|
onTabChange?.(tabId);
|
|
17095
|
+
if (tabChangeEvent) {
|
|
17096
|
+
eventBus.emit(`UI:${tabChangeEvent}`, { tabId });
|
|
17097
|
+
}
|
|
17094
17098
|
if (tabEvent) {
|
|
17095
17099
|
eventBus.emit(`UI:${tabEvent}`, { tabId });
|
|
17096
17100
|
}
|
|
@@ -17171,7 +17175,7 @@ var init_Tabs = __esm({
|
|
|
17171
17175
|
isActive ? variant === "pills" ? "text-primary-foreground font-bold" : "text-foreground font-bold" : "text-muted-foreground hover:text-foreground"
|
|
17172
17176
|
),
|
|
17173
17177
|
children: [
|
|
17174
|
-
item.icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: item.icon, size: "sm" }),
|
|
17178
|
+
item.icon && (typeof item.icon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: item.icon, size: "sm" }) : /* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: item.icon, size: "sm" })),
|
|
17175
17179
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: isActive ? "semibold" : "normal", className: "!text-inherit", children: item.label }),
|
|
17176
17180
|
item.badge !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "default", size: "sm", children: item.badge })
|
|
17177
17181
|
]
|
package/dist/providers/index.js
CHANGED
|
@@ -17024,6 +17024,7 @@ var init_Tabs = __esm({
|
|
|
17024
17024
|
defaultActiveTab,
|
|
17025
17025
|
activeTab: controlledActiveTab,
|
|
17026
17026
|
onTabChange,
|
|
17027
|
+
tabChangeEvent,
|
|
17027
17028
|
variant = "default",
|
|
17028
17029
|
orientation = "horizontal",
|
|
17029
17030
|
className
|
|
@@ -17046,6 +17047,9 @@ var init_Tabs = __esm({
|
|
|
17046
17047
|
setInternalActiveTab(tabId);
|
|
17047
17048
|
}
|
|
17048
17049
|
onTabChange?.(tabId);
|
|
17050
|
+
if (tabChangeEvent) {
|
|
17051
|
+
eventBus.emit(`UI:${tabChangeEvent}`, { tabId });
|
|
17052
|
+
}
|
|
17049
17053
|
if (tabEvent) {
|
|
17050
17054
|
eventBus.emit(`UI:${tabEvent}`, { tabId });
|
|
17051
17055
|
}
|
|
@@ -17126,7 +17130,7 @@ var init_Tabs = __esm({
|
|
|
17126
17130
|
isActive ? variant === "pills" ? "text-primary-foreground font-bold" : "text-foreground font-bold" : "text-muted-foreground hover:text-foreground"
|
|
17127
17131
|
),
|
|
17128
17132
|
children: [
|
|
17129
|
-
item.icon && /* @__PURE__ */ jsx(Icon, { icon: item.icon, size: "sm" }),
|
|
17133
|
+
item.icon && (typeof item.icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: item.icon, size: "sm" }) : /* @__PURE__ */ jsx(Icon, { icon: item.icon, size: "sm" })),
|
|
17130
17134
|
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: isActive ? "semibold" : "normal", className: "!text-inherit", children: item.label }),
|
|
17131
17135
|
item.badge !== void 0 && /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", children: item.badge })
|
|
17132
17136
|
]
|
package/dist/runtime/index.cjs
CHANGED
|
@@ -16859,6 +16859,7 @@ var init_Tabs = __esm({
|
|
|
16859
16859
|
defaultActiveTab,
|
|
16860
16860
|
activeTab: controlledActiveTab,
|
|
16861
16861
|
onTabChange,
|
|
16862
|
+
tabChangeEvent,
|
|
16862
16863
|
variant = "default",
|
|
16863
16864
|
orientation = "horizontal",
|
|
16864
16865
|
className
|
|
@@ -16881,6 +16882,9 @@ var init_Tabs = __esm({
|
|
|
16881
16882
|
setInternalActiveTab(tabId);
|
|
16882
16883
|
}
|
|
16883
16884
|
onTabChange?.(tabId);
|
|
16885
|
+
if (tabChangeEvent) {
|
|
16886
|
+
eventBus.emit(`UI:${tabChangeEvent}`, { tabId });
|
|
16887
|
+
}
|
|
16884
16888
|
if (tabEvent) {
|
|
16885
16889
|
eventBus.emit(`UI:${tabEvent}`, { tabId });
|
|
16886
16890
|
}
|
|
@@ -16961,7 +16965,7 @@ var init_Tabs = __esm({
|
|
|
16961
16965
|
isActive ? variant === "pills" ? "text-primary-foreground font-bold" : "text-foreground font-bold" : "text-muted-foreground hover:text-foreground"
|
|
16962
16966
|
),
|
|
16963
16967
|
children: [
|
|
16964
|
-
item.icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: item.icon, size: "sm" }),
|
|
16968
|
+
item.icon && (typeof item.icon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: item.icon, size: "sm" }) : /* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: item.icon, size: "sm" })),
|
|
16965
16969
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: isActive ? "semibold" : "normal", className: "!text-inherit", children: item.label }),
|
|
16966
16970
|
item.badge !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "default", size: "sm", children: item.badge })
|
|
16967
16971
|
]
|
package/dist/runtime/index.js
CHANGED
|
@@ -16814,6 +16814,7 @@ var init_Tabs = __esm({
|
|
|
16814
16814
|
defaultActiveTab,
|
|
16815
16815
|
activeTab: controlledActiveTab,
|
|
16816
16816
|
onTabChange,
|
|
16817
|
+
tabChangeEvent,
|
|
16817
16818
|
variant = "default",
|
|
16818
16819
|
orientation = "horizontal",
|
|
16819
16820
|
className
|
|
@@ -16836,6 +16837,9 @@ var init_Tabs = __esm({
|
|
|
16836
16837
|
setInternalActiveTab(tabId);
|
|
16837
16838
|
}
|
|
16838
16839
|
onTabChange?.(tabId);
|
|
16840
|
+
if (tabChangeEvent) {
|
|
16841
|
+
eventBus.emit(`UI:${tabChangeEvent}`, { tabId });
|
|
16842
|
+
}
|
|
16839
16843
|
if (tabEvent) {
|
|
16840
16844
|
eventBus.emit(`UI:${tabEvent}`, { tabId });
|
|
16841
16845
|
}
|
|
@@ -16916,7 +16920,7 @@ var init_Tabs = __esm({
|
|
|
16916
16920
|
isActive ? variant === "pills" ? "text-primary-foreground font-bold" : "text-foreground font-bold" : "text-muted-foreground hover:text-foreground"
|
|
16917
16921
|
),
|
|
16918
16922
|
children: [
|
|
16919
|
-
item.icon && /* @__PURE__ */ jsx(Icon, { icon: item.icon, size: "sm" }),
|
|
16923
|
+
item.icon && (typeof item.icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: item.icon, size: "sm" }) : /* @__PURE__ */ jsx(Icon, { icon: item.icon, size: "sm" })),
|
|
16920
16924
|
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: isActive ? "semibold" : "normal", className: "!text-inherit", children: item.label }),
|
|
16921
16925
|
item.badge !== void 0 && /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", children: item.badge })
|
|
16922
16926
|
]
|