infinity-ui-elements 1.9.10 → 1.9.12
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/components/TabItem/TabItem.d.ts +2 -2
- package/dist/components/TabItem/TabItem.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts +1 -1
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.stories.d.ts +4 -0
- package/dist/components/Tabs/Tabs.stories.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.esm.js +47 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +47 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4809,7 +4809,7 @@ const switchVariants = classVarianceAuthority.cva("relative inline-flex items-ce
|
|
|
4809
4809
|
false: "",
|
|
4810
4810
|
},
|
|
4811
4811
|
isDisabled: {
|
|
4812
|
-
true: "cursor-not-allowed
|
|
4812
|
+
true: "cursor-not-allowed bg-surface-fill-neutral-moderate",
|
|
4813
4813
|
false: "",
|
|
4814
4814
|
},
|
|
4815
4815
|
isFocused: {
|
|
@@ -5245,11 +5245,12 @@ function AvatarCell({ name, initials, avatar, subtitle, color = "a1", className,
|
|
|
5245
5245
|
return (jsxRuntime.jsxs("div", { className: cn("flex items-center gap-3", className), children: [avatar ? (jsxRuntime.jsx("img", { src: avatar, alt: name, className: "w-10 h-10 rounded-full object-cover" })) : (jsxRuntime.jsx("div", { className: cn("w-10 h-10 rounded-full flex items-center justify-center text-body-medium-medium", `bg-${color}`), children: initials || name.charAt(0).toUpperCase() })), jsxRuntime.jsxs("div", { className: "flex flex-col", children: [jsxRuntime.jsx("div", { className: "text-body-medium-medium text-surface-ink-neutral-normal", children: name }), subtitle && (jsxRuntime.jsx("div", { className: "text-body-small-regular text-surface-ink-neutral-muted", children: subtitle }))] })] }));
|
|
5246
5246
|
}
|
|
5247
5247
|
|
|
5248
|
-
const tabItemVariants = classVarianceAuthority.cva(`inline-flex items-center justify-center gap-3 whitespace-nowrap transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 relative cursor-pointer
|
|
5248
|
+
const tabItemVariants = classVarianceAuthority.cva(`inline-flex items-center justify-center gap-3 whitespace-nowrap transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 relative cursor-pointer`, {
|
|
5249
5249
|
variants: {
|
|
5250
5250
|
variant: {
|
|
5251
|
-
bordered: "border-b-[1.5px]",
|
|
5252
|
-
borderless: "border-b-[1.5px]",
|
|
5251
|
+
bordered: "border-b-[1.5px] -mb-[1.5px]",
|
|
5252
|
+
borderless: "border-b-[1.5px] -mb-[1.5px]",
|
|
5253
|
+
segmented: "rounded-lg",
|
|
5253
5254
|
},
|
|
5254
5255
|
size: {
|
|
5255
5256
|
small: "px-2 py-3 h-9",
|
|
@@ -5322,6 +5323,44 @@ const tabItemVariants = classVarianceAuthority.cva(`inline-flex items-center jus
|
|
|
5322
5323
|
isDisabled: true,
|
|
5323
5324
|
class: "text-text-body-disabled border-b-transparent",
|
|
5324
5325
|
},
|
|
5326
|
+
// Segmented variant - not selected
|
|
5327
|
+
{
|
|
5328
|
+
variant: "segmented",
|
|
5329
|
+
isSelected: false,
|
|
5330
|
+
isDisabled: false,
|
|
5331
|
+
class: `text-action-ink-neutral-muted
|
|
5332
|
+
hover:text-action-ink-neutral-subtle
|
|
5333
|
+
hover:bg-action-fill-neutral-faded-hover`,
|
|
5334
|
+
},
|
|
5335
|
+
// Segmented variant - selected
|
|
5336
|
+
{
|
|
5337
|
+
variant: "segmented",
|
|
5338
|
+
isSelected: true,
|
|
5339
|
+
isDisabled: false,
|
|
5340
|
+
class: "bg-action-fill-primary-faded text-action-ink-primary-subtle hover:text-action-ink-primary-normal",
|
|
5341
|
+
},
|
|
5342
|
+
// Segmented variant - disabled
|
|
5343
|
+
{
|
|
5344
|
+
variant: "segmented",
|
|
5345
|
+
isDisabled: true,
|
|
5346
|
+
class: "text-text-body-disabled bg-transparent",
|
|
5347
|
+
},
|
|
5348
|
+
// Segmented variant - size overrides (more compact)
|
|
5349
|
+
{
|
|
5350
|
+
variant: "segmented",
|
|
5351
|
+
size: "small",
|
|
5352
|
+
class: "px-3 py-1.5 h-8",
|
|
5353
|
+
},
|
|
5354
|
+
{
|
|
5355
|
+
variant: "segmented",
|
|
5356
|
+
size: "medium",
|
|
5357
|
+
class: "px-4 py-2 h-9",
|
|
5358
|
+
},
|
|
5359
|
+
{
|
|
5360
|
+
variant: "segmented",
|
|
5361
|
+
size: "large",
|
|
5362
|
+
class: "px-4 py-2.5 h-10",
|
|
5363
|
+
},
|
|
5325
5364
|
],
|
|
5326
5365
|
defaultVariants: {
|
|
5327
5366
|
variant: "bordered",
|
|
@@ -5357,9 +5396,11 @@ const Tabs = React__namespace.forwardRef(({ tabs, selectedTabId, defaultSelected
|
|
|
5357
5396
|
};
|
|
5358
5397
|
// Get the active tab content
|
|
5359
5398
|
const activeTab = tabs.find((tab) => tab.id === activeTabId);
|
|
5360
|
-
return (jsxRuntime.jsxs("div", { ref: ref, className: cn("w-full", className), ...props, children: [jsxRuntime.jsx("div", { role: "tablist", className: cn("inline-flex items-center
|
|
5399
|
+
return (jsxRuntime.jsxs("div", { ref: ref, className: cn("w-full", className), ...props, children: [jsxRuntime.jsx("div", { role: "tablist", className: cn("inline-flex items-center", {
|
|
5361
5400
|
"w-full": isFullWidth,
|
|
5362
|
-
"
|
|
5401
|
+
"gap-4": variant === "bordered" || variant === "borderless",
|
|
5402
|
+
"border-b-[1.5px] border-surface-outline-neutral-muted": variant === "bordered",
|
|
5403
|
+
"gap-1 p-1 rounded-xl bg-surface-background-neutral-faded-default": variant === "segmented",
|
|
5363
5404
|
}, tabListClassName), children: tabs.map((tab) => (jsxRuntime.jsx(TabItem, { id: String(tab.id), leadingComponent: tab.leadingComponent, title: tab.title, trailingComponent: tab.trailingComponent, isSelected: tab.id === activeTabId, isDisabled: tab.isDisabled, variant: variant, size: size, isFullWidth: isFullWidth, onClick: () => !tab.isDisabled && handleTabClick(tab.id) }, tab.id))) }), renderContent && activeTab?.content && (jsxRuntime.jsx("div", { role: "tabpanel", className: cn("mt-4", contentClassName), "aria-labelledby": String(activeTabId), children: activeTab.content }))] }));
|
|
5364
5405
|
});
|
|
5365
5406
|
Tabs.displayName = "Tabs";
|