@timmbr/ui 1.4.2 → 1.5.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/components/Accordion/Accordion.js +1 -1
- package/dist/components/Accordion/Accordion.styles.d.ts.map +1 -1
- package/dist/components/Accordion/Accordion.styles.js +3 -3
- package/dist/components/Alert/Alert.js +2 -2
- package/dist/components/Alert/Alert.styles.js +4 -4
- package/dist/components/AlertDialog/AlertDialog.styles.js +4 -4
- package/dist/components/AuthModal/AuthModal.d.ts +4 -0
- package/dist/components/AuthModal/AuthModal.d.ts.map +1 -0
- package/dist/components/AuthModal/AuthModal.js +89 -0
- package/dist/components/AuthModal/AuthModal.labels.d.ts +6 -0
- package/dist/components/AuthModal/AuthModal.labels.d.ts.map +1 -0
- package/dist/components/AuthModal/AuthModal.labels.js +52 -0
- package/dist/components/AuthModal/AuthModal.styles.d.ts +12 -0
- package/dist/components/AuthModal/AuthModal.styles.d.ts.map +1 -0
- package/dist/components/AuthModal/AuthModal.styles.js +38 -0
- package/dist/components/AuthModal/AuthModal.types.d.ts +158 -0
- package/dist/components/AuthModal/AuthModal.types.d.ts.map +1 -0
- package/dist/components/AuthModal/index.d.ts +6 -0
- package/dist/components/AuthModal/index.d.ts.map +1 -0
- package/dist/components/AuthModal/subcomponents/AuthModalBanner.d.ts +11 -0
- package/dist/components/AuthModal/subcomponents/AuthModalBanner.d.ts.map +1 -0
- package/dist/components/AuthModal/subcomponents/AuthModalBanner.js +58 -0
- package/dist/components/AuthModal/subcomponents/AuthModalIdentifierForm.d.ts +11 -0
- package/dist/components/AuthModal/subcomponents/AuthModalIdentifierForm.d.ts.map +1 -0
- package/dist/components/AuthModal/subcomponents/AuthModalIdentifierForm.js +62 -0
- package/dist/components/AuthModal/subcomponents/AuthModalOAuth.d.ts +11 -0
- package/dist/components/AuthModal/subcomponents/AuthModalOAuth.d.ts.map +1 -0
- package/dist/components/AuthModal/subcomponents/AuthModalOAuth.js +19 -0
- package/dist/components/AuthModal/subcomponents/AuthModalOtpForm.d.ts +10 -0
- package/dist/components/AuthModal/subcomponents/AuthModalOtpForm.d.ts.map +1 -0
- package/dist/components/AuthModal/subcomponents/AuthModalOtpForm.js +62 -0
- package/dist/components/AuthModal/subcomponents/AuthModalParts.d.ts +44 -0
- package/dist/components/AuthModal/subcomponents/AuthModalParts.d.ts.map +1 -0
- package/dist/components/AuthModal/subcomponents/AuthModalParts.js +134 -0
- package/dist/components/AuthModal/subcomponents/AuthModalPasswordForm.d.ts +10 -0
- package/dist/components/AuthModal/subcomponents/AuthModalPasswordForm.d.ts.map +1 -0
- package/dist/components/AuthModal/subcomponents/AuthModalPasswordForm.js +54 -0
- package/dist/components/AuthModal/subcomponents/AuthModalSetPasswordForm.d.ts +10 -0
- package/dist/components/AuthModal/subcomponents/AuthModalSetPasswordForm.d.ts.map +1 -0
- package/dist/components/AuthModal/subcomponents/AuthModalSetPasswordForm.js +79 -0
- package/dist/components/AuthModal/subcomponents/AuthModalSuccess.d.ts +10 -0
- package/dist/components/AuthModal/subcomponents/AuthModalSuccess.d.ts.map +1 -0
- package/dist/components/AuthModal/subcomponents/AuthModalSuccess.js +26 -0
- package/dist/components/AuthModal/subcomponents/OAuthButton.d.ts +12 -0
- package/dist/components/AuthModal/subcomponents/OAuthButton.d.ts.map +1 -0
- package/dist/components/AuthModal/subcomponents/OAuthButton.js +38 -0
- package/dist/components/AuthModal/subcomponents/index.d.ts +9 -0
- package/dist/components/AuthModal/subcomponents/index.d.ts.map +1 -0
- package/dist/components/Avatar/Avatar.styles.js +11 -11
- package/dist/components/Badge/Badge.styles.js +8 -8
- package/dist/components/Button/Button.styles.js +7 -7
- package/dist/components/Card/Card.styles.d.ts.map +1 -1
- package/dist/components/Card/Card.styles.js +5 -5
- package/dist/components/Checkbox/Checkbox.js +4 -4
- package/dist/components/Checkbox/Checkbox.styles.js +1 -1
- package/dist/components/Chip/Chip.js +1 -1
- package/dist/components/Chip/Chip.styles.js +5 -5
- package/dist/components/DataList/DataList.styles.js +3 -3
- package/dist/components/Dialog/Dialog.styles.js +6 -6
- package/dist/components/Divider/Divider.js +1 -1
- package/dist/components/Drawer/Drawer.styles.js +2 -2
- package/dist/components/Dropdown/Dropdown.js +2 -2
- package/dist/components/Dropdown/Dropdown.styles.js +2 -2
- package/dist/components/EmptyState/EmptyState.js +2 -2
- package/dist/components/EmptyState/EmptyState.styles.js +3 -3
- package/dist/components/FormField/FormField.js +1 -1
- package/dist/components/Heading/Heading.styles.d.ts.map +1 -1
- package/dist/components/Heading/Heading.styles.js +12 -10
- package/dist/components/Icon/Icon.styles.js +6 -6
- package/dist/components/ImageUpload/ImageUpload.js +6 -6
- package/dist/components/ImageUpload/subcomponents/ImageUploadDropzone.js +10 -10
- package/dist/components/ImageUpload/subcomponents/ImageUploadModal.js +8 -8
- package/dist/components/ImageUpload/subcomponents/ImageUploadSinglePreview.js +7 -7
- package/dist/components/ImageUpload/subcomponents/ImageUploadThumbnailCard.js +10 -10
- package/dist/components/Input/Input.js +4 -4
- package/dist/components/Input/Input.styles.js +6 -6
- package/dist/components/Label/Label.styles.js +4 -4
- package/dist/components/LinkButton/LinkButton.styles.js +6 -6
- package/dist/components/List/List.js +1 -1
- package/dist/components/List/List.styles.js +3 -3
- package/dist/components/NavFooter/NavFooter.styles.js +9 -9
- package/dist/components/NavFooter/subcomponents/FooterBrand.js +3 -3
- package/dist/components/NavFooter/subcomponents/FooterLegalBar.js +1 -1
- package/dist/components/NavFooter/subcomponents/FooterNavSection.js +4 -4
- package/dist/components/NavFooter/subcomponents/FooterNewsletter.js +7 -7
- package/dist/components/NavFooter/subcomponents/FooterOffice.js +5 -5
- package/dist/components/NavFooter/subcomponents/FooterSocial.js +3 -3
- package/dist/components/NavHeader/NavHeader.d.ts.map +1 -1
- package/dist/components/NavHeader/NavHeader.js +11 -3
- package/dist/components/NavHeader/NavHeader.styles.js +16 -16
- package/dist/components/NavHeader/NavHeader.types.d.ts +19 -0
- package/dist/components/NavHeader/NavHeader.types.d.ts.map +1 -1
- package/dist/components/NavHeader/subcomponents/NavActionLabelSkeleton.d.ts +4 -0
- package/dist/components/NavHeader/subcomponents/NavActionLabelSkeleton.d.ts.map +1 -0
- package/dist/components/NavHeader/subcomponents/NavActionLabelSkeleton.js +16 -0
- package/dist/components/NavHeader/subcomponents/NavActionOverflow.d.ts.map +1 -1
- package/dist/components/NavHeader/subcomponents/NavActionOverflow.js +6 -5
- package/dist/components/NavHeader/subcomponents/NavActions.d.ts +9 -0
- package/dist/components/NavHeader/subcomponents/NavActions.d.ts.map +1 -1
- package/dist/components/NavHeader/subcomponents/NavActions.js +51 -15
- package/dist/components/NavHeader/subcomponents/NavBrand.d.ts.map +1 -1
- package/dist/components/NavHeader/subcomponents/NavBrand.js +14 -15
- package/dist/components/NavHeader/subcomponents/NavItems.js +3 -3
- package/dist/components/NavHeader/subcomponents/NavItemsOverflow.js +7 -7
- package/dist/components/NavHeader/subcomponents/NavMobileSearchDrawer.js +5 -5
- package/dist/components/NavHeader/subcomponents/NavMobileTabSlider.js +2 -2
- package/dist/components/NavHeader/subcomponents/NavSearch.js +5 -5
- package/dist/components/NavHeader/subcomponents/OfferBanner.js +1 -1
- package/dist/components/OtpInput/OtpInput.d.ts +4 -0
- package/dist/components/OtpInput/OtpInput.d.ts.map +1 -0
- package/dist/components/OtpInput/OtpInput.js +114 -0
- package/dist/components/OtpInput/OtpInput.styles.d.ts +10 -0
- package/dist/components/OtpInput/OtpInput.styles.d.ts.map +1 -0
- package/dist/components/OtpInput/OtpInput.styles.js +49 -0
- package/dist/components/OtpInput/OtpInput.types.d.ts +40 -0
- package/dist/components/OtpInput/OtpInput.types.d.ts.map +1 -0
- package/dist/components/OtpInput/index.d.ts +4 -0
- package/dist/components/OtpInput/index.d.ts.map +1 -0
- package/dist/components/Pagination/Pagination.styles.js +3 -3
- package/dist/components/Popover/Popover.styles.js +1 -1
- package/dist/components/Progress/Progress.js +2 -2
- package/dist/components/Radio/Radio.js +4 -4
- package/dist/components/Radio/Radio.styles.js +1 -1
- package/dist/components/RangeSlider/RangeSlider.js +3 -3
- package/dist/components/RangeSlider/RangeSlider.styles.js +1 -1
- package/dist/components/Select/Select.js +2 -2
- package/dist/components/Select/Select.styles.js +8 -8
- package/dist/components/SideBarNavigation/SideBarNavigation.styles.js +8 -8
- package/dist/components/SideBarNavigation/subcomponents/SidebarBranding.js +3 -3
- package/dist/components/SideBarNavigation/subcomponents/SidebarFooter.js +1 -1
- package/dist/components/SideBarNavigation/subcomponents/SidebarPopoverMenu.js +4 -4
- package/dist/components/SideBarNavigation/subcomponents/SidebarProfile.js +9 -9
- package/dist/components/SideBarNavigation/subcomponents/SidebarSubItem.js +2 -2
- package/dist/components/Skeleton/Skeleton.styles.js +1 -1
- package/dist/components/Spinner/Spinner.d.ts.map +1 -1
- package/dist/components/Spinner/Spinner.js +9 -7
- package/dist/components/Spinner/Spinner.styles.d.ts +8 -2
- package/dist/components/Spinner/Spinner.styles.d.ts.map +1 -1
- package/dist/components/Spinner/Spinner.styles.js +27 -24
- package/dist/components/Spinner/Spinner.types.d.ts +9 -0
- package/dist/components/Spinner/Spinner.types.d.ts.map +1 -1
- package/dist/components/Stat/Stat.styles.js +4 -4
- package/dist/components/Switch/Switch.js +2 -2
- package/dist/components/Switch/Switch.styles.js +1 -1
- package/dist/components/Table/Table.js +1 -1
- package/dist/components/Table/Table.styles.js +5 -5
- package/dist/components/Table/TablePagination.js +4 -4
- package/dist/components/Tabs/Tabs.js +2 -2
- package/dist/components/Tabs/Tabs.styles.js +8 -8
- package/dist/components/Text/Text.styles.d.ts.map +1 -1
- package/dist/components/Text/Text.styles.js +17 -15
- package/dist/components/Textarea/Textarea.js +4 -4
- package/dist/components/Textarea/Textarea.styles.js +6 -6
- package/dist/components/Toast/Toast.js +3 -3
- package/dist/components/Toast/Toast.styles.js +5 -5
- package/dist/components/Toast/ToastContainer.js +1 -1
- package/dist/components/Tooltip/Tooltip.styles.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -1
- package/package.json +7 -6
- package/dist/components/CrossZoneLink/CrossZoneLink.d.ts +0 -10
- package/dist/components/CrossZoneLink/CrossZoneLink.d.ts.map +0 -1
- package/dist/components/CrossZoneLink/CrossZoneLink.js +0 -111
- package/dist/components/CrossZoneLink/CrossZoneLink.styles.d.ts +0 -8
- package/dist/components/CrossZoneLink/CrossZoneLink.styles.d.ts.map +0 -1
- package/dist/components/CrossZoneLink/CrossZoneLink.styles.js +0 -33
- package/dist/components/CrossZoneLink/CrossZoneLink.types.d.ts +0 -31
- package/dist/components/CrossZoneLink/CrossZoneLink.types.d.ts.map +0 -1
- package/dist/components/CrossZoneLink/index.d.ts +0 -4
- package/dist/components/CrossZoneLink/index.d.ts.map +0 -1
|
@@ -15,7 +15,7 @@ const SidebarProfile = ({
|
|
|
15
15
|
const { shouldAnimate } = useSidebarContext();
|
|
16
16
|
if (!profile) return null;
|
|
17
17
|
const fallbackInitials = profile.fallback || profile.name.split(" ").map((part) => part[0]).join("").slice(0, 2).toUpperCase();
|
|
18
|
-
const avatarElement = profile.avatar ? /* @__PURE__ */ jsx("div", { className: "size-8 rounded-full overflow-hidden shrink-0 flex items-center justify-center", children: profile.avatar }) : /* @__PURE__ */ jsx("div", { className: "size-8 rounded-full bg-grey-200 border border-grey-300 flex items-center justify-center shrink-0 font-medium text-
|
|
18
|
+
const avatarElement = profile.avatar ? /* @__PURE__ */ jsx("div", { className: "size-8 rounded-full overflow-hidden shrink-0 flex items-center justify-center", children: profile.avatar }) : /* @__PURE__ */ jsx("div", { className: "size-8 rounded-full bg-grey-200 border border-grey-300 flex items-center justify-center shrink-0 font-medium text-body-3 text-grey-700", children: fallbackInitials });
|
|
19
19
|
const hasItems = Boolean(profile.items && profile.items.length > 0);
|
|
20
20
|
const menuContent = hasItems && /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
21
21
|
DropdownMenuPrimitive.Content,
|
|
@@ -24,13 +24,13 @@ const SidebarProfile = ({
|
|
|
24
24
|
align: collapsed ? "end" : "center",
|
|
25
25
|
sideOffset: collapsed ? 12 : 8,
|
|
26
26
|
className: cn(
|
|
27
|
-
"z-50 min-w-56 rounded-lg bg-
|
|
27
|
+
"z-50 min-w-56 rounded-lg bg-grey-50 p-1.5 text-grey-900 shadow-md border border-grey-200 outline-none animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
28
28
|
!shouldAnimate && "animate-none transition-none"
|
|
29
29
|
),
|
|
30
30
|
children: [
|
|
31
31
|
/* @__PURE__ */ jsxs("div", { className: "px-2.5 py-2 border-b border-grey-100 mb-1", children: [
|
|
32
|
-
/* @__PURE__ */ jsx("p", { className: "font-semibold text-
|
|
33
|
-
profile.email && /* @__PURE__ */ jsx("p", { className: "text-
|
|
32
|
+
/* @__PURE__ */ jsx("p", { className: "font-semibold text-body-3 text-grey-900 truncate", children: profile.name }),
|
|
33
|
+
profile.email && /* @__PURE__ */ jsx("p", { className: "text-caption-lg text-grey-500 truncate mt-0.5", children: profile.email })
|
|
34
34
|
] }),
|
|
35
35
|
/* @__PURE__ */ jsx("div", { className: "space-y-0.5", children: profile.items?.map((item) => {
|
|
36
36
|
const itemContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -38,8 +38,8 @@ const SidebarProfile = ({
|
|
|
38
38
|
/* @__PURE__ */ jsx("span", { className: "truncate", children: item.label })
|
|
39
39
|
] });
|
|
40
40
|
const itemClass = cn(
|
|
41
|
-
"flex items-center gap-2.5 w-full rounded-md px-2.5 py-1.5 text-
|
|
42
|
-
item.destructive ? "text-
|
|
41
|
+
"flex items-center gap-2.5 w-full rounded-md px-2.5 py-1.5 text-body-3 transition-colors duration-150 select-none cursor-pointer outline-none focus-visible:bg-grey-100",
|
|
42
|
+
item.destructive ? "text-destructive hover:bg-destructive/10 hover:text-destructive/80" : "text-grey-700 hover:bg-grey-100 hover:text-grey-900",
|
|
43
43
|
item.disabled && "opacity-50 pointer-events-none"
|
|
44
44
|
);
|
|
45
45
|
if (item.href) {
|
|
@@ -98,8 +98,8 @@ const SidebarProfile = ({
|
|
|
98
98
|
className: "flex items-center min-w-0 flex-1 overflow-hidden",
|
|
99
99
|
children: [
|
|
100
100
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col min-w-0 flex-1 overflow-hidden", children: [
|
|
101
|
-
/* @__PURE__ */ jsx("span", { className: "font-semibold text-
|
|
102
|
-
profile.email && /* @__PURE__ */ jsx("span", { className: "text-
|
|
101
|
+
/* @__PURE__ */ jsx("span", { className: "font-semibold text-body-3 text-grey-900 truncate", children: profile.name }),
|
|
102
|
+
profile.email && /* @__PURE__ */ jsx("span", { className: "text-caption-lg text-grey-500 truncate block", children: profile.email })
|
|
103
103
|
] }),
|
|
104
104
|
hasItems && /* @__PURE__ */ jsx(ChevronsUpDown, { className: "size-4 text-grey-400 shrink-0 ml-auto" })
|
|
105
105
|
]
|
|
@@ -109,7 +109,7 @@ const SidebarProfile = ({
|
|
|
109
109
|
]
|
|
110
110
|
}
|
|
111
111
|
);
|
|
112
|
-
return /* @__PURE__ */ jsx("div", { className: "p-3 border-t border-grey-200 bg-
|
|
112
|
+
return /* @__PURE__ */ jsx("div", { className: "p-3 border-t border-grey-200 bg-grey-50 shrink-0 overflow-hidden", children: hasItems ? /* @__PURE__ */ jsxs(DropdownMenuPrimitive.Root, { children: [
|
|
113
113
|
/* @__PURE__ */ jsx(DropdownMenuPrimitive.Trigger, { asChild: true, children: expandedTrigger }),
|
|
114
114
|
menuContent
|
|
115
115
|
] }) : expandedTrigger });
|
|
@@ -17,8 +17,8 @@ const SidebarSubItem = ({
|
|
|
17
17
|
"span",
|
|
18
18
|
{
|
|
19
19
|
className: cn(
|
|
20
|
-
"ml-auto inline-flex items-center justify-center rounded-full px-1.5 py-0.2 text-
|
|
21
|
-
item.badgeVariant === "destructive" ? "bg-
|
|
20
|
+
"ml-auto inline-flex items-center justify-center rounded-full px-1.5 py-0.2 text-caption font-semibold",
|
|
21
|
+
item.badgeVariant === "destructive" ? "bg-destructive text-grey-50" : "bg-grey-200 text-grey-800"
|
|
22
22
|
),
|
|
23
23
|
children: item.badge
|
|
24
24
|
}
|
|
@@ -12,7 +12,7 @@ const skeletonVariants = cva(
|
|
|
12
12
|
},
|
|
13
13
|
animation: {
|
|
14
14
|
pulse: "animate-pulse",
|
|
15
|
-
wave: "relative overflow-hidden before:absolute before:inset-0 before:content-[''] before:animate-shimmer before:bg-gradient-to-r before:from-transparent before:via-
|
|
15
|
+
wave: "relative overflow-hidden before:absolute before:inset-0 before:content-[''] before:animate-shimmer before:bg-gradient-to-r before:from-transparent before:via-grey-50/60 dark:before:via-grey-50/15 before:to-transparent",
|
|
16
16
|
none: ""
|
|
17
17
|
}
|
|
18
18
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../../src/components/Spinner/Spinner.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../../src/components/Spinner/Spinner.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,eAAO,MAAM,OAAO,sFAqCnB,CAAC"}
|
|
@@ -3,14 +3,16 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { cn } from '@timmbr/utils';
|
|
5
5
|
import { Loader2 } from '@timmbr/icons';
|
|
6
|
-
import { spinnerVariants } from './Spinner.styles.js';
|
|
6
|
+
import { spinnerIconVariants, spinnerVariants } from './Spinner.styles.js';
|
|
7
7
|
|
|
8
8
|
const Spinner = React.forwardRef(
|
|
9
9
|
({
|
|
10
10
|
className,
|
|
11
|
+
iconClassName,
|
|
11
12
|
size = "md",
|
|
12
13
|
variant = "default",
|
|
13
14
|
label = "Loading...",
|
|
15
|
+
decorative = false,
|
|
14
16
|
children,
|
|
15
17
|
...props
|
|
16
18
|
}, ref) => {
|
|
@@ -18,22 +20,22 @@ const Spinner = React.forwardRef(
|
|
|
18
20
|
"span",
|
|
19
21
|
{
|
|
20
22
|
ref,
|
|
21
|
-
role: "status",
|
|
22
|
-
"aria-
|
|
23
|
+
role: decorative ? void 0 : "status",
|
|
24
|
+
"aria-hidden": decorative || void 0,
|
|
23
25
|
"data-slot": "spinner-container",
|
|
24
|
-
className: cn(
|
|
26
|
+
className: cn(spinnerVariants({ variant }), className),
|
|
25
27
|
...props,
|
|
26
28
|
children: [
|
|
27
29
|
/* @__PURE__ */ jsx(
|
|
28
30
|
Loader2,
|
|
29
31
|
{
|
|
30
|
-
className:
|
|
32
|
+
className: cn(spinnerIconVariants({ size }), iconClassName),
|
|
31
33
|
"aria-hidden": "true",
|
|
32
34
|
"data-slot": "spinner"
|
|
33
35
|
}
|
|
34
36
|
),
|
|
35
|
-
children && /* @__PURE__ */ jsx("span", { className: "text-
|
|
36
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: label })
|
|
37
|
+
children && /* @__PURE__ */ jsx("span", { className: "text-body-3 font-medium select-none", "data-slot": "spinner-label", children }),
|
|
38
|
+
!decorative && /* @__PURE__ */ jsx("span", { className: "sr-only", children: label })
|
|
37
39
|
]
|
|
38
40
|
}
|
|
39
41
|
);
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
/**
|
|
3
|
+
* Colour lives on the wrapper and the icon inherits it (`currentColor`), so a
|
|
4
|
+
* consumer `className="text-grey-50"` reliably recolours the spinner.
|
|
5
|
+
*/
|
|
2
6
|
export declare const spinnerVariants: (props?: ({
|
|
3
|
-
size?: "sm" | "lg" | "md" | "xl" | "xs" | null | undefined;
|
|
4
7
|
variant?: "default" | "white" | "primary" | "secondary" | "muted" | null | undefined;
|
|
5
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
-
export
|
|
9
|
+
export declare const spinnerIconVariants: (props?: ({
|
|
10
|
+
size?: "sm" | "lg" | "md" | "xl" | "xs" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
+
export type SpinnerVariants = VariantProps<typeof spinnerVariants> & VariantProps<typeof spinnerIconVariants>;
|
|
7
13
|
//# sourceMappingURL=Spinner.styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Spinner/Spinner.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"Spinner.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Spinner/Spinner.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE;;;GAGG;AACH,eAAO,MAAM,eAAe;;8EAa1B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;8EAa9B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,eAAe,CAAC,GAChE,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -1,29 +1,32 @@
|
|
|
1
1
|
import { cva } from 'class-variance-authority';
|
|
2
2
|
|
|
3
|
-
const spinnerVariants = cva(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
lg: "size-7",
|
|
12
|
-
xl: "size-10"
|
|
13
|
-
},
|
|
14
|
-
variant: {
|
|
15
|
-
default: "text-primary",
|
|
16
|
-
primary: "text-primary",
|
|
17
|
-
secondary: "text-secondary-foreground",
|
|
18
|
-
white: "text-white",
|
|
19
|
-
muted: "text-muted-foreground"
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
defaultVariants: {
|
|
23
|
-
size: "md",
|
|
24
|
-
variant: "default"
|
|
3
|
+
const spinnerVariants = cva("inline-flex items-center gap-2", {
|
|
4
|
+
variants: {
|
|
5
|
+
variant: {
|
|
6
|
+
default: "text-primary",
|
|
7
|
+
primary: "text-primary",
|
|
8
|
+
secondary: "text-primary-1000",
|
|
9
|
+
white: "text-grey-50",
|
|
10
|
+
muted: "text-grey-500"
|
|
25
11
|
}
|
|
12
|
+
},
|
|
13
|
+
defaultVariants: {
|
|
14
|
+
variant: "default"
|
|
26
15
|
}
|
|
27
|
-
);
|
|
16
|
+
});
|
|
17
|
+
const spinnerIconVariants = cva("shrink-0 animate-spin", {
|
|
18
|
+
variants: {
|
|
19
|
+
size: {
|
|
20
|
+
xs: "size-3",
|
|
21
|
+
sm: "size-4",
|
|
22
|
+
md: "size-5",
|
|
23
|
+
lg: "size-7",
|
|
24
|
+
xl: "size-10"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
defaultVariants: {
|
|
28
|
+
size: "md"
|
|
29
|
+
}
|
|
30
|
+
});
|
|
28
31
|
|
|
29
|
-
export { spinnerVariants };
|
|
32
|
+
export { spinnerIconVariants, spinnerVariants };
|
|
@@ -9,5 +9,14 @@ export interface SpinnerProps extends React.HTMLAttributes<HTMLSpanElement>, Spi
|
|
|
9
9
|
* Visible companion text rendered next to the spinner.
|
|
10
10
|
*/
|
|
11
11
|
children?: React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Extra classes for the icon itself (the wrapper gets `className`).
|
|
14
|
+
*/
|
|
15
|
+
iconClassName?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Purely visual: no status role or label. Use inside a control that already
|
|
18
|
+
* communicates its busy state (e.g. a button with `aria-busy`).
|
|
19
|
+
*/
|
|
20
|
+
decorative?: boolean;
|
|
12
21
|
}
|
|
13
22
|
//# sourceMappingURL=Spinner.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.types.d.ts","sourceRoot":"","sources":["../../../src/components/Spinner/Spinner.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,MAAM,WAAW,YACf,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EAC3C,eAAe;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Spinner.types.d.ts","sourceRoot":"","sources":["../../../src/components/Spinner/Spinner.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,MAAM,WAAW,YACf,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EAC3C,eAAe;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
|
|
@@ -16,16 +16,16 @@ const statVariants = cva(
|
|
|
16
16
|
}
|
|
17
17
|
);
|
|
18
18
|
const statLabelVariants = cva(
|
|
19
|
-
"text-
|
|
19
|
+
"text-body-3 font-semibold text-muted-foreground uppercase tracking-wider select-none"
|
|
20
20
|
);
|
|
21
21
|
const statValueVariants = cva(
|
|
22
|
-
"text-
|
|
22
|
+
"text-h3 font-semibold text-foreground tracking-tight"
|
|
23
23
|
);
|
|
24
24
|
const statHelpTextVariants = cva(
|
|
25
|
-
"flex items-center gap-1.5 text-
|
|
25
|
+
"flex items-center gap-1.5 text-body-3 text-muted-foreground mt-1"
|
|
26
26
|
);
|
|
27
27
|
const statIndicatorVariants = cva(
|
|
28
|
-
"inline-flex items-center gap-1 font-semibold text-
|
|
28
|
+
"inline-flex items-center gap-1 font-semibold text-body-3",
|
|
29
29
|
{
|
|
30
30
|
variants: {
|
|
31
31
|
type: {
|
|
@@ -51,13 +51,13 @@ const Switch = React.forwardRef(
|
|
|
51
51
|
{
|
|
52
52
|
htmlFor: id,
|
|
53
53
|
className: cn(
|
|
54
|
-
"text-
|
|
54
|
+
"text-body-2 font-medium text-foreground cursor-pointer select-none leading-snug",
|
|
55
55
|
disabled && "cursor-not-allowed"
|
|
56
56
|
),
|
|
57
57
|
children: label
|
|
58
58
|
}
|
|
59
59
|
),
|
|
60
|
-
description && /* @__PURE__ */ jsx("p", { className: "text-
|
|
60
|
+
description && /* @__PURE__ */ jsx("p", { className: "text-body-3 text-muted leading-normal mt-0.5", children: description })
|
|
61
61
|
] }),
|
|
62
62
|
/* @__PURE__ */ jsx("div", { className: "shrink-0 pt-0.5", children: switchElement })
|
|
63
63
|
]
|
|
@@ -17,7 +17,7 @@ const switchVariants = cva(
|
|
|
17
17
|
}
|
|
18
18
|
);
|
|
19
19
|
const switchThumbVariants = cva(
|
|
20
|
-
"pointer-events-none block rounded-full bg-
|
|
20
|
+
"pointer-events-none block rounded-full bg-grey-50 shadow-md ring-0 transition-transform data-[state=unchecked]:translate-x-0",
|
|
21
21
|
{
|
|
22
22
|
variants: {
|
|
23
23
|
size: {
|
|
@@ -15,7 +15,7 @@ const tableContainerVariants = cva(
|
|
|
15
15
|
}
|
|
16
16
|
);
|
|
17
17
|
const tableVariants = cva(
|
|
18
|
-
"w-full caption-bottom text-
|
|
18
|
+
"w-full caption-bottom text-body-2 border-collapse text-left",
|
|
19
19
|
{
|
|
20
20
|
variants: {
|
|
21
21
|
variant: {
|
|
@@ -24,8 +24,8 @@ const tableVariants = cva(
|
|
|
24
24
|
bordered: "border-collapse border border-grey-200 dark:border-grey-800"
|
|
25
25
|
},
|
|
26
26
|
size: {
|
|
27
|
-
sm: "[&_td]:py-2 [&_td]:px-3 [&_th]:py-2 [&_th]:px-3 text-
|
|
28
|
-
default: "[&_td]:py-3.5 [&_td]:px-4 [&_th]:py-3 [&_th]:px-4 text-
|
|
27
|
+
sm: "[&_td]:py-2 [&_td]:px-3 [&_th]:py-2 [&_th]:px-3 text-body-3",
|
|
28
|
+
default: "[&_td]:py-3.5 [&_td]:px-4 [&_th]:py-3 [&_th]:px-4 text-body-2"
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
defaultVariants: {
|
|
@@ -38,7 +38,7 @@ const tableRowVariants = cva(
|
|
|
38
38
|
"border-b border-grey-200 dark:border-grey-800 transition-colors data-[state=selected]:bg-primary/5 hover:bg-grey-50/80 dark:hover:bg-grey-900/60"
|
|
39
39
|
);
|
|
40
40
|
const tableHeadVariants = cva(
|
|
41
|
-
"h-10 text-left align-middle font-semibold text-muted-foreground text-
|
|
41
|
+
"h-10 text-left align-middle font-semibold text-muted-foreground text-body-3 uppercase tracking-wider select-none bg-grey-100/50 dark:bg-grey-900/30 [&:has([role=checkbox])]:pr-0"
|
|
42
42
|
);
|
|
43
43
|
const tableCellVariants = cva(
|
|
44
44
|
"align-middle [&:has([role=checkbox])]:pr-0"
|
|
@@ -47,7 +47,7 @@ const tableFooterVariants = cva(
|
|
|
47
47
|
"border-t border-grey-200 dark:border-grey-800 bg-grey-50/50 dark:bg-grey-900/50 font-medium [&>tr]:last:border-b-0"
|
|
48
48
|
);
|
|
49
49
|
const tablePaginationVariants = cva(
|
|
50
|
-
"flex flex-col sm:flex-row items-center justify-between gap-3 px-4 py-3 border-t border-grey-200 dark:border-grey-800 text-
|
|
50
|
+
"flex flex-col sm:flex-row items-center justify-between gap-3 px-4 py-3 border-t border-grey-200 dark:border-grey-800 text-body-3 text-grey-600 dark:text-grey-400"
|
|
51
51
|
);
|
|
52
52
|
|
|
53
53
|
export { tableCellVariants, tableContainerVariants, tableFooterVariants, tableHeadVariants, tablePaginationVariants, tableRowVariants, tableVariants };
|
|
@@ -56,7 +56,7 @@ const TablePagination = React.forwardRef(
|
|
|
56
56
|
"aria-label": "Rows per page",
|
|
57
57
|
value: pageSize,
|
|
58
58
|
onChange: (e) => onPageSizeChange(Number(e.target.value)),
|
|
59
|
-
className: "h-7 rounded-[2px] border border-grey-200 dark:border-grey-700 bg-
|
|
59
|
+
className: "h-7 rounded-[2px] border border-grey-200 dark:border-grey-700 bg-grey-50 dark:bg-grey-900 px-2 py-0 text-body-3 font-medium text-foreground focus:outline-none focus:ring-1 focus:ring-primary",
|
|
60
60
|
children: pageSizeOptions.map((opt) => /* @__PURE__ */ jsx("option", { value: opt, children: opt }, opt))
|
|
61
61
|
}
|
|
62
62
|
)
|
|
@@ -70,14 +70,14 @@ const TablePagination = React.forwardRef(
|
|
|
70
70
|
"aria-label": "Previous page",
|
|
71
71
|
disabled: page <= 1,
|
|
72
72
|
onClick: () => onPageChange?.(page - 1),
|
|
73
|
-
className: "inline-flex items-center gap-1 h-8 px-2.5 rounded-[2px] border border-grey-200 dark:border-grey-700 bg-
|
|
73
|
+
className: "inline-flex items-center gap-1 h-8 px-2.5 rounded-[2px] border border-grey-200 dark:border-grey-700 bg-grey-50 dark:bg-grey-800 text-body-3 font-medium text-foreground hover:bg-grey-100 dark:hover:bg-grey-700 disabled:opacity-40 disabled:pointer-events-none transition-colors cursor-pointer",
|
|
74
74
|
children: [
|
|
75
75
|
/* @__PURE__ */ jsx(ChevronLeft, { className: "size-3.5" }),
|
|
76
76
|
/* @__PURE__ */ jsx("span", { children: "Previous" })
|
|
77
77
|
]
|
|
78
78
|
}
|
|
79
79
|
),
|
|
80
|
-
/* @__PURE__ */ jsxs("span", { className: "px-2 text-
|
|
80
|
+
/* @__PURE__ */ jsxs("span", { className: "px-2 text-body-3 font-medium text-muted-foreground", children: [
|
|
81
81
|
page,
|
|
82
82
|
" / ",
|
|
83
83
|
computedTotalPages
|
|
@@ -89,7 +89,7 @@ const TablePagination = React.forwardRef(
|
|
|
89
89
|
"aria-label": "Next page",
|
|
90
90
|
disabled: page >= computedTotalPages,
|
|
91
91
|
onClick: () => onPageChange?.(page + 1),
|
|
92
|
-
className: "inline-flex items-center gap-1 h-8 px-2.5 rounded-[2px] border border-grey-200 dark:border-grey-700 bg-
|
|
92
|
+
className: "inline-flex items-center gap-1 h-8 px-2.5 rounded-[2px] border border-grey-200 dark:border-grey-700 bg-grey-50 dark:bg-grey-800 text-body-3 font-medium text-foreground hover:bg-grey-100 dark:hover:bg-grey-700 disabled:opacity-40 disabled:pointer-events-none transition-colors cursor-pointer",
|
|
93
93
|
children: [
|
|
94
94
|
/* @__PURE__ */ jsx("span", { children: "Next" }),
|
|
95
95
|
/* @__PURE__ */ jsx(ChevronRight, { className: "size-3.5" })
|
|
@@ -122,11 +122,11 @@ const TabsTrigger = React.forwardRef(
|
|
|
122
122
|
tabsTriggerVariants({ variant, size }),
|
|
123
123
|
!shouldAnimate && "transition-none active:scale-100",
|
|
124
124
|
// Static active styles when animation is disabled
|
|
125
|
-
!shouldAnimate && isActive && variant === "pills" && "bg-primary text-
|
|
125
|
+
!shouldAnimate && isActive && variant === "pills" && "bg-primary text-grey-50 shadow-sm",
|
|
126
126
|
!shouldAnimate && isActive && variant === "underline" && "border-b-2 border-primary text-primary font-semibold",
|
|
127
127
|
!shouldAnimate && isActive && variant === "outline" && "bg-grey-200 dark:bg-grey-700 text-foreground",
|
|
128
128
|
// Text styling when active with animation
|
|
129
|
-
shouldAnimate && isActive && variant === "pills" && "text-
|
|
129
|
+
shouldAnimate && isActive && variant === "pills" && "text-grey-50",
|
|
130
130
|
shouldAnimate && isActive && variant === "underline" && "text-primary font-semibold",
|
|
131
131
|
shouldAnimate && isActive && variant === "outline" && "text-foreground",
|
|
132
132
|
motionClass,
|
|
@@ -10,10 +10,10 @@ const tabsListVariants = cva(
|
|
|
10
10
|
outline: "rounded-md border border-grey-200 dark:border-grey-700 bg-transparent p-1 gap-1"
|
|
11
11
|
},
|
|
12
12
|
size: {
|
|
13
|
-
sm: "h-8 text-
|
|
14
|
-
default: "h-10 text-
|
|
15
|
-
md: "h-10 text-
|
|
16
|
-
lg: "h-12 text-
|
|
13
|
+
sm: "h-8 text-body-3",
|
|
14
|
+
default: "h-10 text-body-2",
|
|
15
|
+
md: "h-10 text-body-2",
|
|
16
|
+
lg: "h-12 text-body-1"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
defaultVariants: {
|
|
@@ -32,10 +32,10 @@ const tabsTriggerVariants = cva(
|
|
|
32
32
|
outline: "rounded-sm px-3 py-1.5 data-[state=inactive]:text-muted-foreground hover:text-foreground"
|
|
33
33
|
},
|
|
34
34
|
size: {
|
|
35
|
-
sm: "px-2.5 py-1 text-
|
|
36
|
-
default: "px-3 py-1.5 text-
|
|
37
|
-
md: "px-3 py-1.5 text-
|
|
38
|
-
lg: "px-4 py-2 text-
|
|
35
|
+
sm: "px-2.5 py-1 text-body-3",
|
|
36
|
+
default: "px-3 py-1.5 text-body-2",
|
|
37
|
+
md: "px-3 py-1.5 text-body-2",
|
|
38
|
+
lg: "px-4 py-2 text-body-1"
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
defaultVariants: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Text/Text.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,YAAY;;;;;;
|
|
1
|
+
{"version":3,"file":"Text.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Text/Text.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,YAAY;;;;;;8EAgDvB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { cva } from 'class-variance-authority';
|
|
2
2
|
|
|
3
|
-
const textVariants = cva("
|
|
3
|
+
const textVariants = cva("transition-colors", {
|
|
4
4
|
variants: {
|
|
5
5
|
variant: {
|
|
6
|
-
|
|
7
|
-
"body-
|
|
8
|
-
"body-2
|
|
9
|
-
"body-2-
|
|
10
|
-
"body-2-
|
|
11
|
-
"body-
|
|
12
|
-
"body-3
|
|
13
|
-
"
|
|
14
|
-
"subtitle-
|
|
15
|
-
|
|
6
|
+
// Each variant is the matching @timmbr/theme text style (size, line-height, weight, font).
|
|
7
|
+
"body-1": "text-body-1",
|
|
8
|
+
"body-2": "text-body-2",
|
|
9
|
+
"body-2-medium": "text-body-2-medium",
|
|
10
|
+
"body-2-semibold": "text-body-2-semibold",
|
|
11
|
+
"body-2-light": "text-body-2-light",
|
|
12
|
+
"body-3": "text-body-3",
|
|
13
|
+
"body-3-light": "text-body-3-light",
|
|
14
|
+
"subtitle-1": "text-subtitle-1",
|
|
15
|
+
"subtitle-2": "text-subtitle-2",
|
|
16
|
+
caption: "text-caption-lg tracking-wide"
|
|
16
17
|
},
|
|
17
18
|
foreground: {
|
|
18
19
|
default: "text-foreground",
|
|
@@ -21,13 +22,14 @@ const textVariants = cva("font-sans transition-colors leading-[1.3]", {
|
|
|
21
22
|
primary: "text-primary",
|
|
22
23
|
secondary: "text-secondary-foreground",
|
|
23
24
|
destructive: "text-destructive",
|
|
24
|
-
white: "text-
|
|
25
|
+
white: "text-grey-50",
|
|
25
26
|
inherit: "text-inherit"
|
|
26
27
|
},
|
|
27
28
|
font: {
|
|
28
|
-
sans
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
// Text styles already use the sans font; other families override it.
|
|
30
|
+
sans: "",
|
|
31
|
+
display: "font-display!",
|
|
32
|
+
title: "font-title!"
|
|
31
33
|
},
|
|
32
34
|
weight: {
|
|
33
35
|
light: "font-light",
|
|
@@ -84,7 +84,7 @@ const Textarea = React.forwardRef(
|
|
|
84
84
|
"label",
|
|
85
85
|
{
|
|
86
86
|
htmlFor: id,
|
|
87
|
-
className: "text-
|
|
87
|
+
className: "text-body-3 font-semibold text-foreground tracking-wide select-none text-left",
|
|
88
88
|
children: label
|
|
89
89
|
}
|
|
90
90
|
),
|
|
@@ -95,7 +95,7 @@ const Textarea = React.forwardRef(
|
|
|
95
95
|
htmlFor: id,
|
|
96
96
|
className: cn(
|
|
97
97
|
"absolute pointer-events-none transition-all duration-200 select-none z-10 truncate max-w-[calc(100%-24px)]",
|
|
98
|
-
isFloatingActive ? "-top-2.5 left-2.5 px-1 bg-
|
|
98
|
+
isFloatingActive ? "-top-2.5 left-2.5 px-1 bg-grey-50 dark:bg-grey-900 text-caption-lg font-semibold leading-none rounded-xs" : "top-3 left-3 text-body-2 text-muted-foreground leading-none"
|
|
99
99
|
),
|
|
100
100
|
style: {
|
|
101
101
|
color: isFloatingActive ? isError ? "var(--color-destructive)" : "var(--color-primary)" : void 0
|
|
@@ -145,7 +145,7 @@ const Textarea = React.forwardRef(
|
|
|
145
145
|
{
|
|
146
146
|
id: `${id}-desc`,
|
|
147
147
|
className: cn(
|
|
148
|
-
"text-
|
|
148
|
+
"text-body-3 mt-1 flex items-center gap-1.5 flex-1",
|
|
149
149
|
isError ? "text-destructive font-medium" : "text-muted"
|
|
150
150
|
),
|
|
151
151
|
children: [
|
|
@@ -154,7 +154,7 @@ const Textarea = React.forwardRef(
|
|
|
154
154
|
]
|
|
155
155
|
}
|
|
156
156
|
) : /* @__PURE__ */ jsx("span", {}),
|
|
157
|
-
showCount && maxLength && /* @__PURE__ */ jsxs("span", { className: "text-
|
|
157
|
+
showCount && maxLength && /* @__PURE__ */ jsxs("span", { className: "text-caption-lg tabular-nums text-muted shrink-0 select-none", children: [
|
|
158
158
|
currentValue.length,
|
|
159
159
|
"/",
|
|
160
160
|
maxLength
|
|
@@ -5,15 +5,15 @@ const textareaVariants = cva(
|
|
|
5
5
|
{
|
|
6
6
|
variants: {
|
|
7
7
|
variant: {
|
|
8
|
-
outline: "border-grey-300 dark:border-grey-700 bg-
|
|
9
|
-
filled: "border-transparent bg-grey-100 dark:bg-grey-800 focus:bg-
|
|
8
|
+
outline: "border-grey-300 dark:border-grey-700 bg-grey-50 dark:bg-grey-900 focus:border-primary focus:ring-1 focus:ring-primary",
|
|
9
|
+
filled: "border-transparent bg-grey-100 dark:bg-grey-800 focus:bg-grey-50 dark:focus:bg-grey-900 focus:border-primary focus:ring-1 focus:ring-primary",
|
|
10
10
|
subtle: "border-grey-200 dark:border-grey-800 bg-grey-50 dark:bg-grey-900/50 focus:border-primary focus:ring-1 focus:ring-primary"
|
|
11
11
|
},
|
|
12
12
|
size: {
|
|
13
|
-
sm: "p-2 text-
|
|
14
|
-
default: "p-3 text-
|
|
15
|
-
md: "p-3 text-
|
|
16
|
-
lg: "p-4 text-
|
|
13
|
+
sm: "p-2 text-body-3 min-h-[72px]",
|
|
14
|
+
default: "p-3 text-body-2 min-h-[96px]",
|
|
15
|
+
md: "p-3 text-body-2 min-h-[96px]",
|
|
16
|
+
lg: "p-4 text-body-1 min-h-[120px]"
|
|
17
17
|
},
|
|
18
18
|
resize: {
|
|
19
19
|
none: "resize-none",
|
|
@@ -70,7 +70,7 @@ const ToastAction = React.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
70
70
|
ref,
|
|
71
71
|
"data-slot": "toast-action",
|
|
72
72
|
className: cn(
|
|
73
|
-
"inline-flex h-8 shrink-0 items-center justify-center rounded-[2px] border bg-transparent px-3 text-
|
|
73
|
+
"inline-flex h-8 shrink-0 items-center justify-center rounded-[2px] border bg-transparent px-3 text-body-3 font-semibold ring-offset-background transition-colors hover:bg-grey-100 dark:hover:bg-grey-800 focus:outline-none focus:ring-2 focus:ring-primary disabled:pointer-events-none disabled:opacity-50 cursor-pointer",
|
|
74
74
|
className
|
|
75
75
|
),
|
|
76
76
|
...props
|
|
@@ -97,7 +97,7 @@ const ToastTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
97
97
|
{
|
|
98
98
|
ref,
|
|
99
99
|
"data-slot": "toast-title",
|
|
100
|
-
className: cn("text-
|
|
100
|
+
className: cn("text-body-2 font-semibold leading-none", className),
|
|
101
101
|
...props
|
|
102
102
|
}
|
|
103
103
|
));
|
|
@@ -107,7 +107,7 @@ const ToastDescription = React.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
107
107
|
{
|
|
108
108
|
ref,
|
|
109
109
|
"data-slot": "toast-description",
|
|
110
|
-
className: cn("text-
|
|
110
|
+
className: cn("text-body-3 text-muted-foreground mt-1 leading-relaxed", className),
|
|
111
111
|
...props
|
|
112
112
|
}
|
|
113
113
|
));
|
|
@@ -5,11 +5,11 @@ const toastVariants = cva(
|
|
|
5
5
|
{
|
|
6
6
|
variants: {
|
|
7
7
|
variant: {
|
|
8
|
-
default: "border-grey-200 dark:border-grey-800 bg-
|
|
9
|
-
destructive: "destructive group border-destructive bg-destructive text-
|
|
10
|
-
success: "border-success bg-
|
|
11
|
-
warning: "border-warning bg-
|
|
12
|
-
info: "border-info bg-
|
|
8
|
+
default: "border-grey-200 dark:border-grey-800 bg-grey-50 dark:bg-grey-900 text-foreground",
|
|
9
|
+
destructive: "destructive group border-destructive bg-destructive text-grey-50",
|
|
10
|
+
success: "border-success bg-grey-50 dark:bg-grey-900 text-foreground border-l-4 border-l-success",
|
|
11
|
+
warning: "border-warning bg-grey-50 dark:bg-grey-900 text-foreground border-l-4 border-l-warning",
|
|
12
|
+
info: "border-info bg-grey-50 dark:bg-grey-900 text-foreground border-l-4 border-l-info"
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
defaultVariants: {
|
|
@@ -82,7 +82,7 @@ const ToastContainer = ({ config }) => {
|
|
|
82
82
|
/* @__PURE__ */ jsx(
|
|
83
83
|
Icon,
|
|
84
84
|
{
|
|
85
|
-
className: `size-4.5 shrink-0 mt-0.5 ${isDestructive ? "text-
|
|
85
|
+
className: `size-4.5 shrink-0 mt-0.5 ${isDestructive ? "text-grey-50" : "text-current opacity-90"}`
|
|
86
86
|
}
|
|
87
87
|
),
|
|
88
88
|
/* @__PURE__ */ jsxs(Stack, { gap: "2xs", className: "flex-1 min-w-0", children: [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cva } from 'class-variance-authority';
|
|
2
2
|
|
|
3
3
|
const tooltipContentVariants = cva(
|
|
4
|
-
"z-50 overflow-hidden rounded-md bg-grey-900 dark:bg-grey-100 px-3 py-1.5 text-
|
|
4
|
+
"z-50 overflow-hidden rounded-md bg-grey-900 dark:bg-grey-100 px-3 py-1.5 text-body-3 text-grey-50 dark:text-grey-900 shadow-md transition-all duration-150 data-[state=delayed-open]:animate-scale-in data-[state=closed]:animate-scale-out"
|
|
5
5
|
);
|
|
6
6
|
|
|
7
7
|
export { tooltipContentVariants };
|
package/dist/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export * from './components/RangeSlider';
|
|
|
15
15
|
export * from './components/Label';
|
|
16
16
|
export * from './components/FormField';
|
|
17
17
|
export * from './components/ImageUpload';
|
|
18
|
+
export * from './components/OtpInput';
|
|
18
19
|
export * from './components/AlertDialog';
|
|
19
20
|
export * from './components/Dialog';
|
|
20
21
|
export * from './components/Drawer';
|
|
@@ -26,6 +27,7 @@ export * from './components/Tabs';
|
|
|
26
27
|
export * from './components/SideBarNavigation';
|
|
27
28
|
export * from './components/NavHeader';
|
|
28
29
|
export * from './components/NavFooter';
|
|
30
|
+
export * from './components/AuthModal';
|
|
29
31
|
export * from './components/Button';
|
|
30
32
|
export * from './components/LinkButton';
|
|
31
33
|
export * from './components/Accordion';
|