@timmbr/ui 1.0.0-beta → 1.2.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/README.md +20 -16
- package/dist/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/Alert/Alert.types.d.ts +2 -4
- package/dist/components/Alert/Alert.types.d.ts.map +1 -1
- package/dist/components/AlertDialog/AlertDialog.d.ts +16 -0
- package/dist/components/AlertDialog/AlertDialog.d.ts.map +1 -0
- package/dist/components/AlertDialog/AlertDialog.js +94 -0
- package/dist/components/AlertDialog/AlertDialog.styles.d.ts +8 -0
- package/dist/components/AlertDialog/AlertDialog.styles.d.ts.map +1 -0
- package/dist/components/AlertDialog/AlertDialog.styles.js +25 -0
- package/dist/components/AlertDialog/AlertDialog.types.d.ts +16 -0
- package/dist/components/AlertDialog/AlertDialog.types.d.ts.map +1 -0
- package/dist/components/AlertDialog/index.d.ts +4 -0
- package/dist/components/AlertDialog/index.d.ts.map +1 -0
- package/dist/components/Avatar/Avatar.styles.d.ts +2 -2
- package/dist/components/Badge/Badge.styles.d.ts +1 -1
- package/dist/components/Button/Button.styles.d.ts +2 -2
- package/dist/components/Chip/Chip.styles.d.ts +1 -1
- package/dist/components/CrossZoneLink/CrossZoneLink.d.ts +10 -0
- package/dist/components/CrossZoneLink/CrossZoneLink.d.ts.map +1 -0
- package/dist/components/CrossZoneLink/CrossZoneLink.js +111 -0
- package/dist/components/CrossZoneLink/CrossZoneLink.styles.d.ts +8 -0
- package/dist/components/CrossZoneLink/CrossZoneLink.styles.d.ts.map +1 -0
- package/dist/components/CrossZoneLink/CrossZoneLink.styles.js +33 -0
- package/dist/components/CrossZoneLink/CrossZoneLink.types.d.ts +31 -0
- package/dist/components/CrossZoneLink/CrossZoneLink.types.d.ts.map +1 -0
- package/dist/components/CrossZoneLink/index.d.ts +4 -0
- package/dist/components/CrossZoneLink/index.d.ts.map +1 -0
- package/dist/components/Dialog/Dialog.d.ts +2 -1
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.js +8 -6
- package/dist/components/Dialog/Dialog.styles.d.ts +1 -0
- package/dist/components/Dialog/Dialog.styles.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.styles.js +7 -4
- package/dist/components/Dialog/Dialog.types.d.ts +4 -6
- package/dist/components/Dialog/Dialog.types.d.ts.map +1 -1
- package/dist/components/Divider/Divider.styles.d.ts +1 -1
- package/dist/components/Drawer/Drawer.types.d.ts +3 -6
- package/dist/components/Drawer/Drawer.types.d.ts.map +1 -1
- package/dist/components/Dropdown/Dropdown.types.d.ts +1 -2
- package/dist/components/Dropdown/Dropdown.types.d.ts.map +1 -1
- package/dist/components/FormField/FormField.js +2 -2
- package/dist/components/Heading/Heading.styles.d.ts +2 -2
- package/dist/components/Icon/Icon.styles.d.ts +1 -1
- package/dist/components/ImageUpload/ImageUpload.d.ts +4 -0
- package/dist/components/ImageUpload/ImageUpload.d.ts.map +1 -0
- package/dist/components/ImageUpload/ImageUpload.helpers.d.ts +30 -0
- package/dist/components/ImageUpload/ImageUpload.helpers.d.ts.map +1 -0
- package/dist/components/ImageUpload/ImageUpload.helpers.js +95 -0
- package/dist/components/ImageUpload/ImageUpload.js +365 -0
- package/dist/components/ImageUpload/ImageUpload.styles.d.ts +17 -0
- package/dist/components/ImageUpload/ImageUpload.styles.d.ts.map +1 -0
- package/dist/components/ImageUpload/ImageUpload.styles.js +72 -0
- package/dist/components/ImageUpload/ImageUpload.types.d.ts +112 -0
- package/dist/components/ImageUpload/ImageUpload.types.d.ts.map +1 -0
- package/dist/components/ImageUpload/index.d.ts +6 -0
- package/dist/components/ImageUpload/index.d.ts.map +1 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadDropzone.d.ts +25 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadDropzone.d.ts.map +1 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadDropzone.js +106 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadIcons.d.ts +6 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadIcons.d.ts.map +1 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadIcons.js +61 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadModal.d.ts +12 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadModal.d.ts.map +1 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadModal.js +137 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadSinglePreview.d.ts +14 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadSinglePreview.d.ts.map +1 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadSinglePreview.js +142 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadThumbnailCard.d.ts +23 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadThumbnailCard.d.ts.map +1 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadThumbnailCard.js +139 -0
- package/dist/components/ImageUpload/subcomponents/index.d.ts +6 -0
- package/dist/components/ImageUpload/subcomponents/index.d.ts.map +1 -0
- package/dist/components/Inline/Inline.styles.d.ts +2 -2
- package/dist/components/Input/Input.js +2 -2
- package/dist/components/Input/Input.styles.d.ts +1 -1
- package/dist/components/Input/Input.styles.js +1 -1
- package/dist/components/Input/Input.types.d.ts +1 -1
- package/dist/components/Input/Input.types.d.ts.map +1 -1
- package/dist/components/LinkButton/LinkButton.d.ts +13 -0
- package/dist/components/LinkButton/LinkButton.d.ts.map +1 -0
- package/dist/components/LinkButton/LinkButton.js +179 -0
- package/dist/components/LinkButton/LinkButton.styles.d.ts +8 -0
- package/dist/components/LinkButton/LinkButton.styles.d.ts.map +1 -0
- package/dist/components/LinkButton/LinkButton.styles.js +61 -0
- package/dist/components/LinkButton/LinkButton.types.d.ts +60 -0
- package/dist/components/LinkButton/LinkButton.types.d.ts.map +1 -0
- package/dist/components/LinkButton/index.d.ts +4 -0
- package/dist/components/LinkButton/index.d.ts.map +1 -0
- package/dist/components/List/List.types.d.ts +2 -4
- package/dist/components/List/List.types.d.ts.map +1 -1
- package/dist/components/Popover/Popover.types.d.ts +1 -2
- package/dist/components/Popover/Popover.types.d.ts.map +1 -1
- package/dist/components/Progress/Progress.styles.d.ts +1 -1
- package/dist/components/Radio/Radio.js +2 -2
- package/dist/components/Select/Select.js +2 -2
- package/dist/components/Select/Select.styles.d.ts +1 -1
- package/dist/components/SideBarNavigation/SideBarNavigation.context.d.ts +15 -0
- package/dist/components/SideBarNavigation/SideBarNavigation.context.d.ts.map +1 -0
- package/dist/components/SideBarNavigation/SideBarNavigation.context.js +10 -0
- package/dist/components/SideBarNavigation/SideBarNavigation.d.ts +4 -0
- package/dist/components/SideBarNavigation/SideBarNavigation.d.ts.map +1 -0
- package/dist/components/SideBarNavigation/SideBarNavigation.helpers.d.ts +19 -0
- package/dist/components/SideBarNavigation/SideBarNavigation.helpers.d.ts.map +1 -0
- package/dist/components/SideBarNavigation/SideBarNavigation.helpers.js +48 -0
- package/dist/components/SideBarNavigation/SideBarNavigation.js +132 -0
- package/dist/components/SideBarNavigation/SideBarNavigation.styles.d.ts +18 -0
- package/dist/components/SideBarNavigation/SideBarNavigation.styles.d.ts.map +1 -0
- package/dist/components/SideBarNavigation/SideBarNavigation.styles.js +85 -0
- package/dist/components/SideBarNavigation/SideBarNavigation.types.d.ts +69 -0
- package/dist/components/SideBarNavigation/SideBarNavigation.types.d.ts.map +1 -0
- package/dist/components/SideBarNavigation/index.d.ts +13 -0
- package/dist/components/SideBarNavigation/index.d.ts.map +1 -0
- package/dist/components/SideBarNavigation/subcomponents/SidebarBranding.d.ts +13 -0
- package/dist/components/SideBarNavigation/subcomponents/SidebarBranding.d.ts.map +1 -0
- package/dist/components/SideBarNavigation/subcomponents/SidebarBranding.js +58 -0
- package/dist/components/SideBarNavigation/subcomponents/SidebarFooter.d.ts +10 -0
- package/dist/components/SideBarNavigation/subcomponents/SidebarFooter.d.ts.map +1 -0
- package/dist/components/SideBarNavigation/subcomponents/SidebarFooter.js +27 -0
- package/dist/components/SideBarNavigation/subcomponents/SidebarNavItem.d.ts +14 -0
- package/dist/components/SideBarNavigation/subcomponents/SidebarNavItem.d.ts.map +1 -0
- package/dist/components/SideBarNavigation/subcomponents/SidebarNavItem.js +147 -0
- package/dist/components/SideBarNavigation/subcomponents/SidebarPopoverMenu.d.ts +13 -0
- package/dist/components/SideBarNavigation/subcomponents/SidebarPopoverMenu.d.ts.map +1 -0
- package/dist/components/SideBarNavigation/subcomponents/SidebarPopoverMenu.js +106 -0
- package/dist/components/SideBarNavigation/subcomponents/SidebarProfile.d.ts +13 -0
- package/dist/components/SideBarNavigation/subcomponents/SidebarProfile.d.ts.map +1 -0
- package/dist/components/SideBarNavigation/subcomponents/SidebarProfile.js +118 -0
- package/dist/components/SideBarNavigation/subcomponents/SidebarSubItem.d.ts +13 -0
- package/dist/components/SideBarNavigation/subcomponents/SidebarSubItem.d.ts.map +1 -0
- package/dist/components/SideBarNavigation/subcomponents/SidebarSubItem.js +34 -0
- package/dist/components/SideBarNavigation/subcomponents/SidebarToggle.d.ts +8 -0
- package/dist/components/SideBarNavigation/subcomponents/SidebarToggle.d.ts.map +1 -0
- package/dist/components/SideBarNavigation/subcomponents/SidebarToggle.js +40 -0
- package/dist/components/Stack/Stack.styles.d.ts +2 -2
- package/dist/components/Stat/Stat.types.d.ts +3 -6
- package/dist/components/Stat/Stat.types.d.ts.map +1 -1
- package/dist/components/Table/Table.types.d.ts +7 -14
- package/dist/components/Table/Table.types.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.styles.d.ts +2 -2
- package/dist/components/Text/Text.styles.d.ts +2 -2
- package/dist/components/Textarea/Textarea.js +2 -2
- package/dist/components/Textarea/Textarea.styles.d.ts +1 -1
- package/dist/components/Toast/Toast.d.ts.map +1 -1
- package/dist/components/Toast/Toast.js +13 -4
- package/dist/components/Toast/Toast.types.d.ts +35 -2
- package/dist/components/Toast/Toast.types.d.ts.map +1 -1
- package/dist/components/Toast/ToastContainer.d.ts +7 -0
- package/dist/components/Toast/ToastContainer.d.ts.map +1 -0
- package/dist/components/Toast/ToastContainer.js +104 -0
- package/dist/components/Toast/index.d.ts +2 -0
- package/dist/components/Toast/index.d.ts.map +1 -1
- package/dist/components/Toast/toastStore.d.ts +31 -0
- package/dist/components/Toast/toastStore.d.ts.map +1 -0
- package/dist/components/Toast/toastStore.js +104 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +28 -3
- package/dist/providers/TimmbrConfigProvider.d.ts +20 -2
- package/dist/providers/TimmbrConfigProvider.d.ts.map +1 -1
- package/dist/providers/TimmbrConfigProvider.js +38 -3
- package/package.json +15 -6
package/README.md
CHANGED
|
@@ -67,12 +67,12 @@ export default function RootLayout({ children }: { children: React.ReactNode })
|
|
|
67
67
|
|
|
68
68
|
| Category | Components | Description |
|
|
69
69
|
| :--- | :--- | :--- |
|
|
70
|
-
| **Actions** | `Button` | Accessible
|
|
70
|
+
| **Actions** | `Button`, `LinkButton` | Accessible buttons and anchor links with `next/link` default SPA routing, adornment icons, loading spinners, and cross-zone delegation. |
|
|
71
71
|
| **Typography** | `Text`, `Heading` | Typography primitives restricted to semantic elements (`<p>`, `<span>`, `<h1>`–`<h6>`) with design token scaling. |
|
|
72
72
|
| **Surfaces** | `Card`, `Avatar`, `Badge`, `Chip`, `Divider` | Display primitives including user avatars, status pills, elevated cards, interactive chips, and separators. |
|
|
73
73
|
| **Layout** | `Container`, `Stack`, `Inline`, `Grid`, `Center` | Responsive breakpoint containers, flex distribution, responsive CSS grid, and centered wrappers. |
|
|
74
74
|
| **Form Controls** | `Input`, `Textarea`, `Select`, `Checkbox`, `Radio`, `Switch`, `RangeSlider`, `FormField`, `Label` | Comprehensive form primitives with labels, helper text, validation error states, and dual-thumb sliders. |
|
|
75
|
-
| **Navigation** | `Tabs`, `Pagination` |
|
|
75
|
+
| **Navigation** | `Tabs`, `Pagination`, `SideBarNavigation` | Accessible tabs, multi-page pagination, and responsive collapsable sidebar navigation. |
|
|
76
76
|
| **Feedback** | `Alert`, `Progress`, `Skeleton`, `Spinner`, `Toast` | Status banners, determinate/indeterminate progress, shimmer loaders, and card-deck multi-toasts with hover-spread. |
|
|
77
77
|
| **Overlays** | `Dialog`, `Drawer`, `Dropdown`, `Popover`, `Tooltip` | Centered dialogs, off-canvas sliding drawers, contextual dropdowns, interactive popovers, and accessible tooltips. |
|
|
78
78
|
| **Data Display** | `Table`, `DataList`, `Stat`, `EmptyState` | Structured data tables with pagination, key-value data lists, KPI metrics, and empty state placeholders. |
|
|
@@ -82,24 +82,28 @@ export default function RootLayout({ children }: { children: React.ReactNode })
|
|
|
82
82
|
## Component Usage
|
|
83
83
|
|
|
84
84
|
|
|
85
|
-
### Button
|
|
85
|
+
### Button & LinkButton
|
|
86
86
|
|
|
87
87
|
```tsx
|
|
88
|
-
import { Button } from '@timmbr/ui';
|
|
89
|
-
import Link from 'next/link';
|
|
88
|
+
import { Button, LinkButton } from '@timmbr/ui';
|
|
90
89
|
|
|
91
|
-
export function
|
|
90
|
+
export function NavigationExample() {
|
|
92
91
|
return (
|
|
93
|
-
<div className="flex gap-4">
|
|
94
|
-
{/*
|
|
95
|
-
<
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
{/*
|
|
100
|
-
<
|
|
101
|
-
|
|
102
|
-
</
|
|
92
|
+
<div className="flex gap-4 items-center">
|
|
93
|
+
{/* 1. Internal same-zone navigation: uses next/link by default, styled as a link */}
|
|
94
|
+
<LinkButton href="/dashboard">
|
|
95
|
+
Go to Dashboard
|
|
96
|
+
</LinkButton>
|
|
97
|
+
|
|
98
|
+
{/* 2. Button visual appearance if desired */}
|
|
99
|
+
<LinkButton href="/signup" variant="primary">
|
|
100
|
+
Sign Up
|
|
101
|
+
</LinkButton>
|
|
102
|
+
|
|
103
|
+
{/* 3. Cross-zone boundary: NEVER use next/link across zones. Always use crossZone */}
|
|
104
|
+
<LinkButton href="/docs" crossZone>
|
|
105
|
+
Documentation (Cross-Zone)
|
|
106
|
+
</LinkButton>
|
|
103
107
|
</div>
|
|
104
108
|
);
|
|
105
109
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../../src/components/Accordion/Accordion.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAShE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../../src/components/Accordion/Accordion.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAShE,OAAO,KAAK,EAGV,qBAAqB,EACtB,MAAM,mBAAmB,CAAC;AAE3B,eAAO,MAAM,SAAS,8JAA0B,CAAC;AAEjD,eAAO,MAAM,aAAa,iKASxB,CAAC;AAGH,eAAO,MAAM,gBAAgB,0KAc3B,CAAC;AAGH,eAAO,MAAM,gBAAgB,8FAoB3B,CAAC"}
|
|
@@ -23,8 +23,6 @@ export interface AlertProps extends Omit<React.HTMLAttributes<HTMLDivElement>, '
|
|
|
23
23
|
*/
|
|
24
24
|
motion?: MotionProp;
|
|
25
25
|
}
|
|
26
|
-
export
|
|
27
|
-
|
|
28
|
-
export interface AlertDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {
|
|
29
|
-
}
|
|
26
|
+
export type AlertTitleProps = React.HTMLAttributes<HTMLHeadingElement>;
|
|
27
|
+
export type AlertDescriptionProps = React.HTMLAttributes<HTMLParagraphElement>;
|
|
30
28
|
//# sourceMappingURL=Alert.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.types.d.ts","sourceRoot":"","sources":["../../../src/components/Alert/Alert.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC,EACzD,aAAa;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AAED,MAAM,
|
|
1
|
+
{"version":3,"file":"Alert.types.d.ts","sourceRoot":"","sources":["../../../src/components/Alert/Alert.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC,EACzD,aAAa;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AAED,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC;AAEvE,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
3
|
+
import type { AlertDialogProps, AlertDialogContentProps, AlertDialogHeaderProps, AlertDialogBodyProps, AlertDialogFooterProps } from './AlertDialog.types';
|
|
4
|
+
export declare const AlertDialog: React.FC<AlertDialogProps>;
|
|
5
|
+
export declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
export declare const AlertDialogPortal: React.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
|
|
7
|
+
export declare const AlertDialogOverlay: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export declare const AlertDialogContent: React.ForwardRefExoticComponent<AlertDialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export declare const AlertDialogHeader: React.FC<AlertDialogHeaderProps>;
|
|
10
|
+
export declare const AlertDialogBody: React.FC<AlertDialogBodyProps>;
|
|
11
|
+
export declare const AlertDialogFooter: React.FC<AlertDialogFooterProps>;
|
|
12
|
+
export declare const AlertDialogTitle: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
13
|
+
export declare const AlertDialogDescription: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
14
|
+
export declare const AlertDialogAction: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
15
|
+
export declare const AlertDialogCancel: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
16
|
+
//# sourceMappingURL=AlertDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertDialog.d.ts","sourceRoot":"","sources":["../../../src/components/AlertDialog/AlertDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAC;AAarE,OAAO,KAAK,EACV,gBAAgB,EAChB,uBAAuB,EACvB,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EAGvB,MAAM,qBAAqB,CAAC;AAE7B,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAA6B,CAAC;AACjF,eAAO,MAAM,kBAAkB,wHAA+B,CAAC;AAC/D,eAAO,MAAM,iBAAiB,uDAA8B,CAAC;AAE7D,eAAO,MAAM,kBAAkB,wKAU7B,CAAC;AAGH,eAAO,MAAM,kBAAkB,gGA4B7B,CAAC;AAGH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAE9D,CAAC;AAGF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAE1D,CAAC;AAGF,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAE9D,CAAC;AAGF,eAAO,MAAM,gBAAgB,8KAU3B,CAAC;AAGH,eAAO,MAAM,sBAAsB,wLAUjC,CAAC;AAGH,eAAO,MAAM,iBAAiB,6KAU5B,CAAC;AAGH,eAAO,MAAM,iBAAiB,6KAU5B,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
5
|
+
import { cn } from '@timmbr/utils';
|
|
6
|
+
import { resolveMotion } from '../../types/motion.js';
|
|
7
|
+
import { alertDialogBodyVariants, alertDialogContentVariants, alertDialogDescriptionVariants, alertDialogFooterVariants, alertDialogHeaderVariants, alertDialogOverlayVariants, alertDialogTitleVariants } from './AlertDialog.styles.js';
|
|
8
|
+
import { useGlobalAnimation } from '../../providers/AnimationProvider.js';
|
|
9
|
+
|
|
10
|
+
const AlertDialog = AlertDialogPrimitive.Root;
|
|
11
|
+
const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
12
|
+
const AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
13
|
+
const AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
14
|
+
AlertDialogPrimitive.Overlay,
|
|
15
|
+
{
|
|
16
|
+
ref,
|
|
17
|
+
"data-slot": "alert-dialog-overlay",
|
|
18
|
+
className: cn(alertDialogOverlayVariants(), className),
|
|
19
|
+
...props
|
|
20
|
+
}
|
|
21
|
+
));
|
|
22
|
+
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
23
|
+
const AlertDialogContent = React.forwardRef(({ className, children, motion, ...props }, ref) => {
|
|
24
|
+
const globalMotion = useGlobalAnimation();
|
|
25
|
+
const { shouldAnimate, motionClass } = resolveMotion(motion, globalMotion);
|
|
26
|
+
return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
|
|
27
|
+
/* @__PURE__ */ jsx(AlertDialogOverlay, {}),
|
|
28
|
+
/* @__PURE__ */ jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4 pointer-events-none", children: /* @__PURE__ */ jsx(
|
|
29
|
+
AlertDialogPrimitive.Content,
|
|
30
|
+
{
|
|
31
|
+
ref,
|
|
32
|
+
"data-slot": "alert-dialog-content",
|
|
33
|
+
role: "alertdialog",
|
|
34
|
+
className: cn(
|
|
35
|
+
alertDialogContentVariants(),
|
|
36
|
+
!shouldAnimate && "transition-none animate-none",
|
|
37
|
+
motionClass,
|
|
38
|
+
className
|
|
39
|
+
),
|
|
40
|
+
...props,
|
|
41
|
+
children
|
|
42
|
+
}
|
|
43
|
+
) })
|
|
44
|
+
] });
|
|
45
|
+
});
|
|
46
|
+
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
|
|
47
|
+
const AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { "data-slot": "alert-dialog-header", className: cn(alertDialogHeaderVariants(), className), ...props });
|
|
48
|
+
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
49
|
+
const AlertDialogBody = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { "data-slot": "alert-dialog-body", className: cn(alertDialogBodyVariants(), className), ...props });
|
|
50
|
+
AlertDialogBody.displayName = "AlertDialogBody";
|
|
51
|
+
const AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { "data-slot": "alert-dialog-footer", className: cn(alertDialogFooterVariants(), className), ...props });
|
|
52
|
+
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
53
|
+
const AlertDialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
54
|
+
AlertDialogPrimitive.Title,
|
|
55
|
+
{
|
|
56
|
+
ref,
|
|
57
|
+
"data-slot": "alert-dialog-title",
|
|
58
|
+
className: cn(alertDialogTitleVariants(), className),
|
|
59
|
+
...props
|
|
60
|
+
}
|
|
61
|
+
));
|
|
62
|
+
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
63
|
+
const AlertDialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
64
|
+
AlertDialogPrimitive.Description,
|
|
65
|
+
{
|
|
66
|
+
ref,
|
|
67
|
+
"data-slot": "alert-dialog-description",
|
|
68
|
+
className: cn(alertDialogDescriptionVariants(), className),
|
|
69
|
+
...props
|
|
70
|
+
}
|
|
71
|
+
));
|
|
72
|
+
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
73
|
+
const AlertDialogAction = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
74
|
+
AlertDialogPrimitive.Action,
|
|
75
|
+
{
|
|
76
|
+
ref,
|
|
77
|
+
"data-slot": "alert-dialog-action",
|
|
78
|
+
className: cn(className),
|
|
79
|
+
...props
|
|
80
|
+
}
|
|
81
|
+
));
|
|
82
|
+
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
83
|
+
const AlertDialogCancel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
84
|
+
AlertDialogPrimitive.Cancel,
|
|
85
|
+
{
|
|
86
|
+
ref,
|
|
87
|
+
"data-slot": "alert-dialog-cancel",
|
|
88
|
+
className: cn(className),
|
|
89
|
+
...props
|
|
90
|
+
}
|
|
91
|
+
));
|
|
92
|
+
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
93
|
+
|
|
94
|
+
export { AlertDialog, AlertDialogAction, AlertDialogBody, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const alertDialogOverlayVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
2
|
+
export declare const alertDialogContentVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
3
|
+
export declare const alertDialogHeaderVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
4
|
+
export declare const alertDialogBodyVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
5
|
+
export declare const alertDialogFooterVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
6
|
+
export declare const alertDialogTitleVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
7
|
+
export declare const alertDialogDescriptionVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
8
|
+
//# sourceMappingURL=AlertDialog.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertDialog.styles.d.ts","sourceRoot":"","sources":["../../../src/components/AlertDialog/AlertDialog.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,0BAA0B,oFAEtC,CAAC;AAEF,eAAO,MAAM,0BAA0B,oFAEtC,CAAC;AAEF,eAAO,MAAM,yBAAyB,oFAErC,CAAC;AAEF,eAAO,MAAM,uBAAuB,oFAEnC,CAAC;AAEF,eAAO,MAAM,yBAAyB,oFAErC,CAAC;AAEF,eAAO,MAAM,wBAAwB,oFAEpC,CAAC;AAEF,eAAO,MAAM,8BAA8B,oFAE1C,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
|
2
|
+
|
|
3
|
+
const alertDialogOverlayVariants = cva(
|
|
4
|
+
"fixed inset-0 z-50 bg-black/60 backdrop-blur-xs transition-opacity duration-200 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out"
|
|
5
|
+
);
|
|
6
|
+
const alertDialogContentVariants = cva(
|
|
7
|
+
"relative pointer-events-auto flex flex-col w-full max-w-lg rounded-xl border border-grey-200 dark:border-grey-800 bg-white dark:bg-grey-900 shadow-xl font-sans text-foreground overflow-hidden p-6 gap-4 data-[state=open]:animate-dialog-scale-in data-[state=closed]:animate-dialog-scale-out"
|
|
8
|
+
);
|
|
9
|
+
const alertDialogHeaderVariants = cva(
|
|
10
|
+
"flex flex-col space-y-1.5 text-left"
|
|
11
|
+
);
|
|
12
|
+
const alertDialogBodyVariants = cva(
|
|
13
|
+
"flex flex-col space-y-3 min-h-0"
|
|
14
|
+
);
|
|
15
|
+
const alertDialogFooterVariants = cva(
|
|
16
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end gap-2.5 pt-2"
|
|
17
|
+
);
|
|
18
|
+
const alertDialogTitleVariants = cva(
|
|
19
|
+
"text-lg font-display font-semibold leading-none tracking-tight text-foreground"
|
|
20
|
+
);
|
|
21
|
+
const alertDialogDescriptionVariants = cva(
|
|
22
|
+
"text-sm text-muted-foreground font-sans leading-relaxed"
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
export { alertDialogBodyVariants, alertDialogContentVariants, alertDialogDescriptionVariants, alertDialogFooterVariants, alertDialogHeaderVariants, alertDialogOverlayVariants, alertDialogTitleVariants };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
3
|
+
import type { MotionProp } from '../../types/motion';
|
|
4
|
+
export type AlertDialogProps = AlertDialogPrimitive.AlertDialogProps;
|
|
5
|
+
export interface AlertDialogContentProps extends React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content> {
|
|
6
|
+
/**
|
|
7
|
+
* Motion transition control.
|
|
8
|
+
*/
|
|
9
|
+
motion?: MotionProp;
|
|
10
|
+
}
|
|
11
|
+
export type AlertDialogHeaderProps = React.HTMLAttributes<HTMLDivElement>;
|
|
12
|
+
export type AlertDialogBodyProps = React.HTMLAttributes<HTMLDivElement>;
|
|
13
|
+
export type AlertDialogFooterProps = React.HTMLAttributes<HTMLDivElement>;
|
|
14
|
+
export type AlertDialogActionProps = React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>;
|
|
15
|
+
export type AlertDialogCancelProps = React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>;
|
|
16
|
+
//# sourceMappingURL=AlertDialog.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertDialog.types.d.ts","sourceRoot":"","sources":["../../../src/components/AlertDialog/AlertDialog.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,KAAK,oBAAoB,MAAM,8BAA8B,CAAC;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,CAAC,gBAAgB,CAAC;AAErE,MAAM,WAAW,uBACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,oBAAoB,CAAC,OAAO,CAAC;IAC3E;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AAED,MAAM,MAAM,sBAAsB,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AAC1E,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AACxE,MAAM,MAAM,sBAAsB,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AAE1E,MAAM,MAAM,sBAAsB,GAChC,KAAK,CAAC,wBAAwB,CAAC,OAAO,oBAAoB,CAAC,MAAM,CAAC,CAAC;AAErE,MAAM,MAAM,sBAAsB,GAChC,KAAK,CAAC,wBAAwB,CAAC,OAAO,oBAAoB,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AlertDialog/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
export declare const avatarRootVariants: (props?: ({
|
|
3
3
|
size?: "sm" | "lg" | "md" | "xl" | "2xl" | "xs" | null | undefined;
|
|
4
|
-
variant?: "
|
|
4
|
+
variant?: "grey" | "outline" | "subtle" | "primary" | "secondary" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
export declare const avatarStatusVariants: (props?: ({
|
|
7
|
-
status?: "
|
|
7
|
+
status?: "offline" | "online" | "busy" | "away" | null | undefined;
|
|
8
8
|
size?: "sm" | "lg" | "md" | "xl" | "2xl" | "xs" | null | undefined;
|
|
9
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
10
|
export type AvatarVariants = VariantProps<typeof avatarRootVariants>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
export declare const badgeVariants: (props?: ({
|
|
3
|
-
variant?: "default" | "
|
|
3
|
+
variant?: "default" | "destructive" | "success" | "outline" | "subtle" | "primary" | "secondary" | "brand" | null | undefined;
|
|
4
4
|
size?: "sm" | "lg" | "md" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
export type BadgeVariants = VariantProps<typeof badgeVariants>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
export declare const buttonVariants: (props?: ({
|
|
3
|
-
variant?: "link" | "default" | "
|
|
4
|
-
size?: "default" | "
|
|
3
|
+
variant?: "link" | "default" | "destructive" | "outline" | "ghost" | "primary" | "secondary" | null | undefined;
|
|
4
|
+
size?: "default" | "icon" | "sm" | "lg" | "md" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
export type ButtonVariants = VariantProps<typeof buttonVariants>;
|
|
7
7
|
//# sourceMappingURL=Button.styles.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
export declare const chipVariants: (props?: ({
|
|
3
3
|
variant?: "filled" | "subtle" | "outlined" | null | undefined;
|
|
4
|
-
color?: "default" | "
|
|
4
|
+
color?: "default" | "destructive" | "success" | "warning" | "primary" | null | undefined;
|
|
5
5
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
6
6
|
clickable?: boolean | null | undefined;
|
|
7
7
|
selected?: boolean | null | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { CrossZoneLinkProps } from './CrossZoneLink.types';
|
|
3
|
+
/**
|
|
4
|
+
* CrossZoneLink forces hard browser-level navigation across Next.js multi-zone / microfrontend boundaries.
|
|
5
|
+
*
|
|
6
|
+
* ARCHITECTURAL RULE:
|
|
7
|
+
* NEVER use `next/link` for navigation across zone boundaries. Always use `CrossZoneLink` from `@timmbr/ui`.
|
|
8
|
+
*/
|
|
9
|
+
export declare const CrossZoneLink: React.ForwardRefExoticComponent<CrossZoneLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
10
|
+
//# sourceMappingURL=CrossZoneLink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CrossZoneLink.d.ts","sourceRoot":"","sources":["../../../src/components/CrossZoneLink/CrossZoneLink.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE;;;;;GAKG;AACH,eAAO,MAAM,aAAa,8FA4GzB,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
5
|
+
import { cn } from '@timmbr/utils';
|
|
6
|
+
import { crossZoneLinkVariants } from './CrossZoneLink.styles.js';
|
|
7
|
+
import { useTimmbrConfig, resolveZoneHref } from '../../providers/TimmbrConfigProvider.js';
|
|
8
|
+
|
|
9
|
+
const CrossZoneLink = React.forwardRef(
|
|
10
|
+
({
|
|
11
|
+
className,
|
|
12
|
+
style,
|
|
13
|
+
variant,
|
|
14
|
+
size,
|
|
15
|
+
asChild = false,
|
|
16
|
+
href,
|
|
17
|
+
zone,
|
|
18
|
+
disabled = false,
|
|
19
|
+
leftIcon,
|
|
20
|
+
rightIcon,
|
|
21
|
+
target,
|
|
22
|
+
rel,
|
|
23
|
+
onClick,
|
|
24
|
+
children,
|
|
25
|
+
...props
|
|
26
|
+
}, ref) => {
|
|
27
|
+
const config = useTimmbrConfig();
|
|
28
|
+
const resolvedHref = resolveZoneHref(href, zone, config.zones?.zones);
|
|
29
|
+
const isExternal = resolvedHref.startsWith("http://") || resolvedHref.startsWith("https://") || target === "_blank";
|
|
30
|
+
const resolvedRel = rel ?? (isExternal ? "noopener noreferrer" : void 0);
|
|
31
|
+
const handleClick = (e) => {
|
|
32
|
+
if (disabled) {
|
|
33
|
+
e.preventDefault();
|
|
34
|
+
e.stopPropagation();
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
onClick?.(e);
|
|
38
|
+
};
|
|
39
|
+
if (asChild) {
|
|
40
|
+
return /* @__PURE__ */ jsx(
|
|
41
|
+
Slot,
|
|
42
|
+
{
|
|
43
|
+
ref,
|
|
44
|
+
"data-slot": "cross-zone-link",
|
|
45
|
+
"data-cross-zone": "true",
|
|
46
|
+
"aria-disabled": disabled ? "true" : void 0,
|
|
47
|
+
tabIndex: disabled ? -1 : props.tabIndex,
|
|
48
|
+
className: cn(
|
|
49
|
+
crossZoneLinkVariants({
|
|
50
|
+
variant,
|
|
51
|
+
size,
|
|
52
|
+
disabled,
|
|
53
|
+
className
|
|
54
|
+
})
|
|
55
|
+
),
|
|
56
|
+
style,
|
|
57
|
+
onClick: handleClick,
|
|
58
|
+
...props,
|
|
59
|
+
children
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
return /* @__PURE__ */ jsxs(
|
|
64
|
+
"a",
|
|
65
|
+
{
|
|
66
|
+
ref,
|
|
67
|
+
href: disabled ? void 0 : resolvedHref,
|
|
68
|
+
target,
|
|
69
|
+
rel: resolvedRel,
|
|
70
|
+
"data-slot": "cross-zone-link",
|
|
71
|
+
"data-cross-zone": "true",
|
|
72
|
+
"data-testid": "timmbr-cross-zone-link",
|
|
73
|
+
"aria-disabled": disabled ? "true" : void 0,
|
|
74
|
+
tabIndex: disabled ? -1 : props.tabIndex,
|
|
75
|
+
style,
|
|
76
|
+
onClick: handleClick,
|
|
77
|
+
className: cn(
|
|
78
|
+
crossZoneLinkVariants({
|
|
79
|
+
variant,
|
|
80
|
+
size,
|
|
81
|
+
disabled,
|
|
82
|
+
className
|
|
83
|
+
})
|
|
84
|
+
),
|
|
85
|
+
...props,
|
|
86
|
+
children: [
|
|
87
|
+
leftIcon && /* @__PURE__ */ jsx(
|
|
88
|
+
"span",
|
|
89
|
+
{
|
|
90
|
+
className: "inline-flex shrink-0 items-center justify-center pointer-events-none",
|
|
91
|
+
"data-slot": "cross-zone-link-left-icon",
|
|
92
|
+
children: leftIcon
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
children && /* @__PURE__ */ jsx("span", { children }),
|
|
96
|
+
rightIcon && /* @__PURE__ */ jsx(
|
|
97
|
+
"span",
|
|
98
|
+
{
|
|
99
|
+
className: "inline-flex shrink-0 items-center justify-center pointer-events-none",
|
|
100
|
+
"data-slot": "cross-zone-link-right-icon",
|
|
101
|
+
children: rightIcon
|
|
102
|
+
}
|
|
103
|
+
)
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
CrossZoneLink.displayName = "CrossZoneLink";
|
|
110
|
+
|
|
111
|
+
export { CrossZoneLink };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
export declare const crossZoneLinkVariants: (props?: ({
|
|
3
|
+
variant?: "default" | "inline" | "subtle" | "primary" | "secondary" | "muted" | null | undefined;
|
|
4
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
5
|
+
disabled?: boolean | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export type CrossZoneLinkVariants = VariantProps<typeof crossZoneLinkVariants>;
|
|
8
|
+
//# sourceMappingURL=CrossZoneLink.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CrossZoneLink.styles.d.ts","sourceRoot":"","sources":["../../../src/components/CrossZoneLink/CrossZoneLink.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,qBAAqB;;;;8EA4BjC,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,YAAY,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
|
2
|
+
|
|
3
|
+
const crossZoneLinkVariants = cva(
|
|
4
|
+
"inline-flex items-center no-underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 rounded-[2px] transition-all duration-150 select-none",
|
|
5
|
+
{
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default: "text-primary hover:underline underline-offset-4 font-medium",
|
|
9
|
+
primary: "text-primary font-semibold hover:brightness-110 active:brightness-95",
|
|
10
|
+
secondary: "text-secondary-foreground hover:text-foreground font-medium",
|
|
11
|
+
muted: "text-grey-600 dark:text-grey-400 hover:text-foreground font-normal",
|
|
12
|
+
subtle: "text-foreground/80 hover:text-foreground font-normal",
|
|
13
|
+
inline: "text-primary underline underline-offset-4 hover:opacity-80 inline font-medium"
|
|
14
|
+
},
|
|
15
|
+
size: {
|
|
16
|
+
sm: "text-xs gap-1",
|
|
17
|
+
default: "text-sm gap-1.5",
|
|
18
|
+
lg: "text-base gap-2"
|
|
19
|
+
},
|
|
20
|
+
disabled: {
|
|
21
|
+
true: "pointer-events-none opacity-50 cursor-not-allowed",
|
|
22
|
+
false: "cursor-pointer"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
defaultVariants: {
|
|
26
|
+
variant: "default",
|
|
27
|
+
size: "default",
|
|
28
|
+
disabled: false
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
export { crossZoneLinkVariants };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import type { crossZoneLinkVariants } from './CrossZoneLink.styles';
|
|
4
|
+
export interface CrossZoneLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement>, VariantProps<typeof crossZoneLinkVariants> {
|
|
5
|
+
/**
|
|
6
|
+
* The destination URL or relative path.
|
|
7
|
+
*/
|
|
8
|
+
href: string;
|
|
9
|
+
/**
|
|
10
|
+
* Optional zone key corresponding to configured zones in TimmbrConfigProvider.
|
|
11
|
+
* If provided and configured, resolves against the zone's base URL.
|
|
12
|
+
*/
|
|
13
|
+
zone?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Merges props onto an immediate child element using Radix UI Slot.
|
|
16
|
+
*/
|
|
17
|
+
asChild?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Leading icon element rendered before link text.
|
|
20
|
+
*/
|
|
21
|
+
leftIcon?: React.ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* Trailing icon element rendered after link text.
|
|
24
|
+
*/
|
|
25
|
+
rightIcon?: React.ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* Disables user interaction and navigation.
|
|
28
|
+
*/
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=CrossZoneLink.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CrossZoneLink.types.d.ts","sourceRoot":"","sources":["../../../src/components/CrossZoneLink/CrossZoneLink.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAEpE,MAAM,WAAW,kBACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,qBAAqB,CAAC;IAC5C;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CrossZoneLink/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,KAAK,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC3F,YAAY,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
3
|
-
import type { DialogProps, DialogContentProps, DialogHeaderProps, DialogFooterProps } from './Dialog.types';
|
|
3
|
+
import type { DialogProps, DialogContentProps, DialogHeaderProps, DialogBodyProps, DialogFooterProps } from './Dialog.types';
|
|
4
4
|
export declare const Dialog: React.FC<DialogProps>;
|
|
5
5
|
export declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
6
|
export declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
@@ -8,6 +8,7 @@ export declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitiv
|
|
|
8
8
|
export declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
9
|
export declare const DialogContent: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
10
|
export declare const DialogHeader: React.FC<DialogHeaderProps>;
|
|
11
|
+
export declare const DialogBody: React.FC<DialogBodyProps>;
|
|
11
12
|
export declare const DialogFooter: React.FC<DialogFooterProps>;
|
|
12
13
|
export declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
13
14
|
export declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAc1D,OAAO,KAAK,EACV,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AAExB,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAAwB,CAAC;AAClE,eAAO,MAAM,aAAa,8GAA0B,CAAC;AACrD,eAAO,MAAM,YAAY,6CAAyB,CAAC;AACnD,eAAO,MAAM,WAAW,4GAAwB,CAAC;AAEjD,eAAO,MAAM,aAAa,8JAUxB,CAAC;AAGH,eAAO,MAAM,aAAa,2FAkCxB,CAAC;AAGH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAEpD,CAAC;AAGF,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAEhD,CAAC;AAGF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAEpD,CAAC;AAGF,eAAO,MAAM,WAAW,oKAUtB,CAAC;AAGH,eAAO,MAAM,iBAAiB,8KAU5B,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
5
5
|
import { cn } from '@timmbr/utils';
|
|
6
6
|
import { X } from '@timmbr/icons';
|
|
7
7
|
import { resolveMotion } from '../../types/motion.js';
|
|
8
|
-
import { dialogContentVariants, dialogDescriptionVariants, dialogFooterVariants, dialogHeaderVariants, dialogOverlayVariants, dialogTitleVariants } from './Dialog.styles.js';
|
|
8
|
+
import { dialogBodyVariants, dialogContentVariants, dialogDescriptionVariants, dialogFooterVariants, dialogHeaderVariants, dialogOverlayVariants, dialogTitleVariants } from './Dialog.styles.js';
|
|
9
9
|
import { useGlobalAnimation } from '../../providers/AnimationProvider.js';
|
|
10
10
|
|
|
11
11
|
const Dialog = DialogPrimitive.Root;
|
|
@@ -45,7 +45,7 @@ const DialogContent = React.forwardRef(({ className, children, motion, ...props
|
|
|
45
45
|
DialogPrimitive.Close,
|
|
46
46
|
{
|
|
47
47
|
"data-slot": "dialog-close",
|
|
48
|
-
className: "absolute right-4 top-4 rounded-sm p-1 text-muted hover:text-foreground opacity-70 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-primary cursor-pointer",
|
|
48
|
+
className: "absolute right-4 top-4 z-20 rounded-sm p-1 text-muted hover:text-foreground opacity-70 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-primary cursor-pointer",
|
|
49
49
|
children: [
|
|
50
50
|
/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
|
|
51
51
|
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
@@ -58,9 +58,11 @@ const DialogContent = React.forwardRef(({ className, children, motion, ...props
|
|
|
58
58
|
] });
|
|
59
59
|
});
|
|
60
60
|
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
61
|
-
const DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(dialogHeaderVariants(), className), ...props });
|
|
61
|
+
const DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { "data-slot": "dialog-header", className: cn(dialogHeaderVariants(), className), ...props });
|
|
62
62
|
DialogHeader.displayName = "DialogHeader";
|
|
63
|
-
const
|
|
63
|
+
const DialogBody = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { "data-slot": "dialog-body", className: cn(dialogBodyVariants(), className), ...props });
|
|
64
|
+
DialogBody.displayName = "DialogBody";
|
|
65
|
+
const DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { "data-slot": "dialog-footer", className: cn(dialogFooterVariants(), className), ...props });
|
|
64
66
|
DialogFooter.displayName = "DialogFooter";
|
|
65
67
|
const DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
66
68
|
DialogPrimitive.Title,
|
|
@@ -83,4 +85,4 @@ const DialogDescription = React.forwardRef(({ className, ...props }, ref) => /*
|
|
|
83
85
|
));
|
|
84
86
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
85
87
|
|
|
86
|
-
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
88
|
+
export { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const dialogOverlayVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
2
2
|
export declare const dialogContentVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
3
3
|
export declare const dialogHeaderVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
4
|
+
export declare const dialogBodyVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
4
5
|
export declare const dialogFooterVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
5
6
|
export declare const dialogTitleVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
6
7
|
export declare const dialogDescriptionVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|