@chekinapp/ui 0.0.58 → 0.0.59
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/index.cjs +51 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -7
- package/dist/index.d.ts +25 -7
- package/dist/index.js +54 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -9612,12 +9612,12 @@ var Tabs = TabsPrimitive2.Root;
|
|
|
9612
9612
|
var tabsListVariants = (0, import_class_variance_authority13.cva)("inline-flex items-center", {
|
|
9613
9613
|
variants: {
|
|
9614
9614
|
variant: {
|
|
9615
|
-
|
|
9616
|
-
underlined: "gap-6 border-b border-[var(--chekin-color-gray-3)]"
|
|
9615
|
+
button: 'tab-list h-[42px] justify-center gap-[7px] rounded-md border border-[var(--chekin-color-gray-3)] bg-[var(--chekin-color-surface-input-empty)] p-[3px] [&>*:not(:last-child)]:after:content-[""] [&>*:not(:last-child)]:after:absolute [&>*:not(:last-child)]:after:right-[-4px] [&>*:not(:last-child)]:after:h-6 [&>*:not(:last-child)]:after:w-px [&>*:not(:last-child)]:after:bg-[var(--chekin-color-gray-3)]',
|
|
9616
|
+
underlined: "tab-list mb-8 flex-wrap gap-x-6 gap-y-3 border-b border-[var(--chekin-color-gray-3)]"
|
|
9617
9617
|
}
|
|
9618
9618
|
},
|
|
9619
9619
|
defaultVariants: {
|
|
9620
|
-
variant: "
|
|
9620
|
+
variant: "button"
|
|
9621
9621
|
}
|
|
9622
9622
|
});
|
|
9623
9623
|
var TabsList = (0, import_react73.forwardRef)(
|
|
@@ -9632,29 +9632,68 @@ var TabsList = (0, import_react73.forwardRef)(
|
|
|
9632
9632
|
);
|
|
9633
9633
|
TabsList.displayName = TabsPrimitive2.List.displayName;
|
|
9634
9634
|
var tabsTriggerVariants = (0, import_class_variance_authority13.cva)(
|
|
9635
|
-
"inline-flex items-center justify-center whitespace-nowrap transition-all focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",
|
|
9635
|
+
"inline-flex items-center justify-center whitespace-nowrap transition-all focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 cursor-pointer select-none",
|
|
9636
9636
|
{
|
|
9637
9637
|
variants: {
|
|
9638
9638
|
variant: {
|
|
9639
|
-
|
|
9640
|
-
underlined: "-
|
|
9639
|
+
button: "h-full flex-1 rounded-md px-4 text-center text-[15px] font-medium relative text-[var(--chekin-color-gray-1)] hover:bg-[var(--chekin-color-brand-blue)] hover:text-white data-[state=active]:bg-[var(--chekin-color-brand-blue)] data-[state=active]:font-bold data-[state=active]:text-white data-[state=active]:shadow-sm [&.active]:bg-[var(--chekin-color-brand-blue)] [&.active]:font-bold [&.active]:text-white [&.active]:shadow-sm",
|
|
9640
|
+
underlined: "h-full relative top-px pb-[15px] text-base font-medium leading-5 text-[var(--chekin-color-gray-1)] border-b-2 border-transparent -mb-px data-[state=active]:text-[var(--chekin-color-brand-blue)] data-[state=active]:border-[var(--chekin-color-brand-blue)] hover:border-[var(--chekin-color-brand-blue)]/30 [&.active]:border-[var(--chekin-color-brand-blue)]"
|
|
9641
9641
|
}
|
|
9642
9642
|
},
|
|
9643
9643
|
defaultVariants: {
|
|
9644
|
-
variant: "
|
|
9644
|
+
variant: "button"
|
|
9645
9645
|
}
|
|
9646
9646
|
}
|
|
9647
9647
|
);
|
|
9648
|
-
var TabsTrigger = (0, import_react73.forwardRef)(({ className, variant, ...props }, ref) =>
|
|
9649
|
-
|
|
9648
|
+
var TabsTrigger = (0, import_react73.forwardRef)(({ className, variant = "button", hidden, ...props }, ref) => {
|
|
9649
|
+
if (hidden) {
|
|
9650
|
+
return null;
|
|
9651
|
+
}
|
|
9652
|
+
if (props.asLink) {
|
|
9653
|
+
const { asLink: Link2, value, end, onClick: onClick2, children: children2, ...linkProps } = props;
|
|
9654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
9655
|
+
Link2,
|
|
9656
|
+
{
|
|
9657
|
+
relative: "route",
|
|
9658
|
+
end,
|
|
9659
|
+
to: value,
|
|
9660
|
+
onClick: (event) => onClick2?.(event, value),
|
|
9661
|
+
className: cn(
|
|
9662
|
+
tabsTriggerVariants({ variant }),
|
|
9663
|
+
variant === "button" ? "tabs__btn-item tabs__btn-item_link" : "tabs__item tabs__item_link",
|
|
9664
|
+
className
|
|
9665
|
+
),
|
|
9666
|
+
...linkProps,
|
|
9667
|
+
children: children2
|
|
9668
|
+
}
|
|
9669
|
+
);
|
|
9670
|
+
}
|
|
9671
|
+
const { children, onClick, end: _end, ...triggerProps } = props;
|
|
9672
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
9673
|
+
TabsPrimitive2.Trigger,
|
|
9674
|
+
{
|
|
9675
|
+
ref,
|
|
9676
|
+
className: cn(
|
|
9677
|
+
tabsTriggerVariants({ variant }),
|
|
9678
|
+
variant === "button" ? "tabs__btn-item" : "tabs__item",
|
|
9679
|
+
className
|
|
9680
|
+
),
|
|
9681
|
+
onClick,
|
|
9682
|
+
...triggerProps,
|
|
9683
|
+
children
|
|
9684
|
+
}
|
|
9685
|
+
);
|
|
9686
|
+
});
|
|
9687
|
+
TabsTrigger.displayName = TabsPrimitive2.Trigger.displayName;
|
|
9688
|
+
var TabsContent = (0, import_react73.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
9689
|
+
TabsPrimitive2.Content,
|
|
9650
9690
|
{
|
|
9651
9691
|
ref,
|
|
9652
|
-
className: cn(
|
|
9692
|
+
className: cn("tabs__header-item", className),
|
|
9693
|
+
tabIndex: -1,
|
|
9653
9694
|
...props
|
|
9654
9695
|
}
|
|
9655
9696
|
));
|
|
9656
|
-
TabsTrigger.displayName = TabsPrimitive2.Trigger.displayName;
|
|
9657
|
-
var TabsContent = (0, import_react73.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(TabsPrimitive2.Content, { ref, className, tabIndex: -1, ...props }));
|
|
9658
9697
|
TabsContent.displayName = TabsPrimitive2.Content.displayName;
|
|
9659
9698
|
|
|
9660
9699
|
// src/tabbed-section/TabbedSection.tsx
|