@exxatdesignux/ui 0.5.3 → 0.5.4
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/CHANGELOG.md +9 -0
- package/README.md +1 -1
- package/consumer-extras/cursor-rules/exxat-accessibility.mdc +1 -1
- package/consumer-extras/cursor-rules/exxat-drawer-vs-dialog.mdc +4 -4
- package/consumer-extras/cursor-rules/exxat-ds-agents.mdc +5 -1
- package/consumer-extras/cursor-rules/exxat-no-vaul.mdc +25 -0
- package/consumer-extras/cursor-rules/exxat-page-header-actions.mdc +31 -0
- package/consumer-extras/cursor-rules/exxat-table-row-preview.mdc +24 -0
- package/consumer-extras/cursor-rules/exxat-tabs-chrome.mdc +31 -0
- package/consumer-extras/cursor-skills/exxat-drawer-vs-dialog/SKILL.md +5 -5
- package/consumer-extras/cursor-skills/exxat-ds-skill/SKILL.md +2 -2
- package/consumer-extras/cursor-skills/exxat-ds-skill/references/accessibility.md +1 -1
- package/consumer-extras/cursor-skills/exxat-token-economy/SKILL.md +4 -2
- package/consumer-extras/patterns/consumer-upgrade-checklist.md +14 -1
- package/consumer-extras/patterns/drawer-vs-dialog-pattern.md +50 -0
- package/dist/index.d.ts +0 -2
- package/dist/index.js +1 -114
- package/dist/index.js.map +1 -1
- package/package.json +1 -2
- package/src/index.ts +0 -1
- package/template/.cursor/rules/exxat-accessibility.mdc +1 -1
- package/template/AGENTS.md +2 -2
- package/template/components/site-header.tsx +1 -1
- package/template/docs/HANDBOOK.md +1 -1
- package/template/docs/component-selection-guide.md +1 -1
- package/template/docs/consumer-upgrade-checklist.md +51 -0
- package/template/docs/drawer-vs-dialog-pattern.md +8 -8
- package/template/lib/motion-ui.ts +2 -2
- package/template/package.json +0 -1
- package/tokens/hooks-index.json +2 -2
- package/dist/components/ui/drawer.d.ts +0 -16
- package/dist/components/ui/drawer.js +0 -125
- package/dist/components/ui/drawer.js.map +0 -1
- package/src/components/ui/drawer.tsx +0 -134
- package/template/components/ui/drawer.tsx +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exxatdesignux/ui",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "Exxat shared design system (components, hooks, tokens). Monorepo setup: clone repo then pnpm bootstrap at workspace root — see github.com/ExxatDesign/Exxat-DS-Workspace README.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Exxat Design",
|
|
@@ -121,7 +121,6 @@
|
|
|
121
121
|
"tailwind-merge": "^3.5.0",
|
|
122
122
|
"tw-animate-css": "^1.4.0",
|
|
123
123
|
"use-mask-input": "^3.9.0",
|
|
124
|
-
"vaul": "^1.1.2",
|
|
125
124
|
"zod": "^4.3.6"
|
|
126
125
|
},
|
|
127
126
|
"devDependencies": {
|
package/src/index.ts
CHANGED
|
@@ -69,7 +69,6 @@ export * from "./components/ui/context-menu"
|
|
|
69
69
|
export * from "./components/ui/date-picker-field"
|
|
70
70
|
export * from "./components/ui/dialog"
|
|
71
71
|
export * from "./components/ui/drag-handle-grip"
|
|
72
|
-
export * from "./components/ui/drawer"
|
|
73
72
|
export * from "./components/ui/dropdown-menu"
|
|
74
73
|
export * from "./components/ui/export-drawer"
|
|
75
74
|
export * from "./components/ui/hover-card"
|
|
@@ -17,7 +17,7 @@ alwaysApply: true
|
|
|
17
17
|
4. **Touch targets (2.5.8):** **≥ 24×24 CSS px** or **24px** spacing — **`min-h-6 min-w-6` / `size-6`** for icon-only; avoid **`size-4`** as sole target.
|
|
18
18
|
5. **Contrast:** normal text **≥ 4.5:1**; UI / focus **≥ 3:1** where required; muted on tinted surfaces use correct surface tokens.
|
|
19
19
|
6. **Minimum text size:** visible product copy **≥ 11px** — **`text-xs`** or larger (**`AGENTS.md` §8.3**, **`app/globals.css`** `--text-xs`).
|
|
20
|
-
7. **Dialogs / sheets
|
|
20
|
+
7. **Dialogs / sheets:** must have a **Title** (`DialogTitle` / `SheetTitle`); **`sr-only`** if hidden.
|
|
21
21
|
8. **Format hints persistent, not placeholders (SC 3.3.2, 1.3.1).** Fields with required formats — **date, time, phone, currency, GPA, IDs, URLs, unit-bearing numbers** — MUST render the format via **`FormDescription`** (or equivalent `aria-describedby` helper text). Placeholders disappear on focus and **MUST NOT** be the sole carrier. Prefer picker primitives (e.g. `DatePickerField`) over free-text where available.
|
|
22
22
|
9. **Every icon that communicates information MUST have a text alternative** — not just icon-only buttons. Three cases (SC 1.1.1, 3.3.2, 2.4.6):
|
|
23
23
|
|
package/template/AGENTS.md
CHANGED
|
@@ -366,9 +366,9 @@ Follow root **`.cursor/rules/exxat-kbd-shortcuts.mdc`**. Summary:
|
|
|
366
366
|
- **UI components** (borders, focus rings where required): **≥ 3:1**.
|
|
367
367
|
- **Muted text on tinted surfaces** (e.g. sidebar): use tokens mixed against the **correct surface** (e.g. **`--sidebar`** / `--sidebar-section-label-foreground`), not only `--background`.
|
|
368
368
|
|
|
369
|
-
### 8.4 Overlays (Dialog / Sheet
|
|
369
|
+
### 8.4 Overlays (Dialog / Sheet)
|
|
370
370
|
|
|
371
|
-
**MUST:** Provide an accessible **title** — `DialogTitle` / `SheetTitle
|
|
371
|
+
**MUST:** Provide an accessible **title** — `DialogTitle` / `SheetTitle`; use **`className="sr-only"`** when the title is visually hidden (align with shadcn patterns in this repo). Product side panels use **`Sheet`** only (Export, Properties, invite — not a separate Vaul drawer primitive).
|
|
372
372
|
|
|
373
373
|
### 8.5 Verification
|
|
374
374
|
|
|
@@ -64,7 +64,7 @@ export function SiteHeader({
|
|
|
64
64
|
<div
|
|
65
65
|
className={cn(
|
|
66
66
|
// Sticky page chrome sits BELOW every Radix overlay (DropdownMenu /
|
|
67
|
-
// Popover / Select / Dialog / Sheet / Tooltip
|
|
67
|
+
// Popover / Select / Dialog / Sheet / Tooltip all render at
|
|
68
68
|
// z-50). Previously `z-60` here caused the school/product switcher
|
|
69
69
|
// dropdown to open behind the breadcrumb. `z-30` keeps the header
|
|
70
70
|
// above page content (charts, tables, scrolled rows) but below
|
|
@@ -133,7 +133,7 @@ These are the ones you'll use on >90% of screens. If a screen needs something el
|
|
|
133
133
|
| KPI strip / band | `KeyMetrics` (`variant="flat"` on hubs) | `packages/ui` |
|
|
134
134
|
| Status chip + icon | `ListHubStatusBadge` + `lib/list-status-badges.ts` | `apps/web/components/` |
|
|
135
135
|
| Board / kanban card | `ListPageBoardCard` + primitives | `packages/ui` |
|
|
136
|
-
| Side overlay | `Sheet`
|
|
136
|
+
| Side overlay | `Sheet` floating panels (NOT toast — `exxat-no-toast.mdc`) | `packages/ui` |
|
|
137
137
|
| Persistent banner | `LocalBanner` / `SystemBanner` | `packages/ui` |
|
|
138
138
|
| Inline status / format hint | `FormDescription`, inline `<small>` | `packages/ui` |
|
|
139
139
|
| Tooltip | `Tip` / `Tooltip` | `packages/ui` |
|
|
@@ -117,7 +117,7 @@ Always ask: **does the user need the hub visible behind them?**
|
|
|
117
117
|
│ │
|
|
118
118
|
┌─ YES ┴ NO ──┐ │
|
|
119
119
|
▼ ▼ ▼
|
|
120
|
-
Dialog
|
|
120
|
+
Dialog Sheet panel Page route
|
|
121
121
|
(AlertDialog, (TablePropertiesDrawer, (full create/edit
|
|
122
122
|
delete confirm) ExportDrawer, wizard, deep detail)
|
|
123
123
|
InviteCollaboratorsDrawer)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Upgrading `@exxatdesignux/ui` (human + AI checklist)
|
|
2
|
+
|
|
3
|
+
Use this after **`npm install @exxatdesignux/ui@…`** / **`pnpm add @exxatdesignux/ui@…`**. It is copied into **`docs/exxat-ds/`** when you run **`exxat-ui sync-extras`**, so Cursor and other tools can find it beside other DS pattern docs.
|
|
4
|
+
|
|
5
|
+
## 1. See what changed
|
|
6
|
+
|
|
7
|
+
| Source | Purpose |
|
|
8
|
+
|--------|---------|
|
|
9
|
+
| **`node_modules/@exxatdesignux/ui/CHANGELOG.md`** | Release notes for the installed version (and peers). |
|
|
10
|
+
| **`npx --package=@exxatdesignux/ui@latest exxat-ui changelog`** | Print the changelog from the package on disk / npx extract. |
|
|
11
|
+
|
|
12
|
+
## 2. Refresh AI / pattern docs (optional but recommended)
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npx --package=@exxatdesignux/ui@latest exxat-ui sync-extras
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Overwrites only **`.cursor/skills/exxat-*`** and **`docs/exxat-ds/*.md`** (including this file). Does **not** change your app routes or product code.
|
|
19
|
+
|
|
20
|
+
## 3. Align app code with the reference template
|
|
21
|
+
|
|
22
|
+
The npm package includes a full Next.js reference under:
|
|
23
|
+
|
|
24
|
+
**`node_modules/@exxatdesignux/ui/template/`**
|
|
25
|
+
|
|
26
|
+
Use it when you need to know **what files exist**, **how shims re-export** `@exxatdesignux/ui`, or **what AGENTS / layout** patterns look like for the current release. Porting is manual: diff template vs your repo and apply intentional changes (imports, new components, CSS entrypoints).
|
|
27
|
+
|
|
28
|
+
## 4. Dependency and Node
|
|
29
|
+
|
|
30
|
+
- Keep **`@exxatdesignux/ui`** on the same semver your team tested; prefer explicit **`^x.y.z`** or pinned **`x.y.z`**.
|
|
31
|
+
- Match **`engines.node`** in your app to the value declared in **`node_modules/@exxatdesignux/ui/package.json`** (see CHANGELOG if it changed).
|
|
32
|
+
- **≥ 0.5.3:** Remove **`vaul`** from your app `package.json` and delete any `components/ui/drawer.tsx` shim — side panels use **`Sheet`** only (**`.cursor/rules/exxat-no-vaul.mdc`**).
|
|
33
|
+
|
|
34
|
+
## 5. Consumer UI audit (after sync-extras)
|
|
35
|
+
|
|
36
|
+
If the app was built before current agent rules, verify:
|
|
37
|
+
|
|
38
|
+
| Symptom | Fix |
|
|
39
|
+
|---------|-----|
|
|
40
|
+
| Full-width tab bar on list hub | Use **`ListPageTemplate`** view toolbar — **`exxat-tabs-chrome.mdc`** |
|
|
41
|
+
| Full-width Overview / Academics tabs | **`TabsList`** must stay **`w-fit`** — no `w-full` / `flex-1` stretch |
|
|
42
|
+
| Grey custom header buttons | **`PageHeader`** + **`Button`** variants — **`exxat-page-header-actions.mdc`** |
|
|
43
|
+
| Bespoke student popover in table | **`HoverCard`** + shared cells/badges — **`exxat-table-row-preview.mdc`** |
|
|
44
|
+
| Custom hub table / trimmed Add view | **`HubTable`** + **`FULL_HUB_SUPPORTED_VIEWS`** — **`exxat-hub-supported-views.mdc`** |
|
|
45
|
+
|
|
46
|
+
## 6. Still stuck?
|
|
47
|
+
|
|
48
|
+
- **`npx --package=@exxatdesignux/ui@latest exxat-ui doctor`** — compares local CLI version vs npm **`latest`**.
|
|
49
|
+
- **`npx --package=@exxatdesignux/ui@latest exxat-ui update`** — install commands and reminders.
|
|
50
|
+
|
|
51
|
+
Maintainers publish from the design-system monorepo with git tags **`ui-v<version>`**; registry **`latest`** follows those tags.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Sheet panel vs dialog vs route
|
|
2
2
|
|
|
3
|
-
> **Related:** `docs/data-views-pattern.md` (Page vs drawer), **`AGENTS.md` §6.4**, **`.cursor/rules/exxat-page-vs-drawer.mdc`**. **This doc** splits **
|
|
3
|
+
> **Related:** `docs/data-views-pattern.md` (Page vs drawer), **`AGENTS.md` §6.4**, **`.cursor/rules/exxat-page-vs-drawer.mdc`**. **This doc** splits **floating `Sheet` panels** vs **modal dialog** when both stay on the same route.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Sheet (side panel — product “drawers”)
|
|
6
6
|
|
|
7
7
|
**Use when:**
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
- The flow is **medium length** — export options, table/column properties, invite collaborators, filters that mirror the grid.
|
|
11
11
|
- **Width** helps — tables of options, multi-field forms that would feel cramped in a narrow dialog.
|
|
12
12
|
|
|
13
|
-
**
|
|
13
|
+
**Implementation:** **`Sheet`** from `@exxatdesignux/ui/components/sheet` with the floating inset pattern (`showOverlay={false}`, `getFloatingSheetInsetProps`) — see `ExportDrawer`, `TablePropertiesDrawer`, `InviteCollaboratorsDrawer`, `LibraryNewFolderSheet`.
|
|
14
14
|
|
|
15
15
|
**Avoid when:** The task is the **only** thing the user should focus on and the parent would distract (prefer **dialog** for a sharp confirm, or **route** for a full wizard).
|
|
16
16
|
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
**Examples:** `AlertDialog`, confirm-before-remove, “Save changes?” when navigating away.
|
|
26
26
|
|
|
27
|
-
**Avoid when:** Users need to **reference** the grid or copy values from the page while the panel is open — use a **
|
|
27
|
+
**Avoid when:** Users need to **reference** the grid or copy values from the page while the panel is open — use a **sheet panel** or **inline** pattern instead.
|
|
28
28
|
|
|
29
29
|
## Route (new page)
|
|
30
30
|
|
|
@@ -32,7 +32,7 @@ Use when the work is **primary**, **long**, **multi-step**, or deserves its **ow
|
|
|
32
32
|
|
|
33
33
|
## Quick matrix
|
|
34
34
|
|
|
35
|
-
| Need |
|
|
35
|
+
| Need | Sheet panel | Dialog | Route |
|
|
36
36
|
| --- | --- | --- | --- |
|
|
37
37
|
| Keep hub visible | Yes | No (blocks) | No |
|
|
38
38
|
| Short confirm / alert | Rare | Yes | Overkill |
|
|
@@ -41,8 +41,8 @@ Use when the work is **primary**, **long**, **multi-step**, or deserves its **ow
|
|
|
41
41
|
|
|
42
42
|
## Accessibility
|
|
43
43
|
|
|
44
|
-
- **Dialog /
|
|
45
|
-
- **Focus trap** is expected in dialogs;
|
|
44
|
+
- **Dialog / sheet:** Must expose a **title** (`DialogTitle`, `SheetTitle`) — use `sr-only` if visually hidden.
|
|
45
|
+
- **Focus trap** is expected in dialogs; sheet panels should still **restore focus** on close to the invoking control.
|
|
46
46
|
|
|
47
47
|
## See also
|
|
48
48
|
|
|
@@ -11,7 +11,7 @@ export const motionHeaderEnter = {
|
|
|
11
11
|
} as const
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
* (`duration-300 ease-out
|
|
14
|
+
* Floating sheet panel timing — implemented in `@exxatdesignux/ui` `Sheet`
|
|
15
|
+
* (`duration-300 ease-out`) so Export, Properties, and invite panels animate consistently.
|
|
16
16
|
*/
|
|
17
17
|
export const motionSheetMs = 300
|
package/template/package.json
CHANGED
package/tokens/hooks-index.json
CHANGED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { Drawer as Drawer$1 } from 'vaul';
|
|
4
|
-
|
|
5
|
-
declare function Drawer({ ...props }: React.ComponentProps<typeof Drawer$1.Root>): react_jsx_runtime.JSX.Element;
|
|
6
|
-
declare function DrawerTrigger({ ...props }: React.ComponentProps<typeof Drawer$1.Trigger>): react_jsx_runtime.JSX.Element;
|
|
7
|
-
declare function DrawerPortal({ ...props }: React.ComponentProps<typeof Drawer$1.Portal>): react_jsx_runtime.JSX.Element;
|
|
8
|
-
declare function DrawerClose({ ...props }: React.ComponentProps<typeof Drawer$1.Close>): react_jsx_runtime.JSX.Element;
|
|
9
|
-
declare function DrawerOverlay({ className, ...props }: React.ComponentProps<typeof Drawer$1.Overlay>): react_jsx_runtime.JSX.Element;
|
|
10
|
-
declare function DrawerContent({ className, children, ...props }: React.ComponentProps<typeof Drawer$1.Content>): react_jsx_runtime.JSX.Element;
|
|
11
|
-
declare function DrawerHeader({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
12
|
-
declare function DrawerFooter({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
13
|
-
declare function DrawerTitle({ className, ...props }: React.ComponentProps<typeof Drawer$1.Title>): react_jsx_runtime.JSX.Element;
|
|
14
|
-
declare function DrawerDescription({ className, ...props }: React.ComponentProps<typeof Drawer$1.Description>): react_jsx_runtime.JSX.Element;
|
|
15
|
-
|
|
16
|
-
export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger };
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { Drawer as Drawer$1 } from 'vaul';
|
|
3
|
-
import { clsx } from 'clsx';
|
|
4
|
-
import { twMerge } from 'tailwind-merge';
|
|
5
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
function cn(...inputs) {
|
|
8
|
-
return twMerge(clsx(inputs));
|
|
9
|
-
}
|
|
10
|
-
function Drawer({
|
|
11
|
-
...props
|
|
12
|
-
}) {
|
|
13
|
-
return /* @__PURE__ */ jsx(Drawer$1.Root, { "data-slot": "drawer", ...props });
|
|
14
|
-
}
|
|
15
|
-
function DrawerTrigger({
|
|
16
|
-
...props
|
|
17
|
-
}) {
|
|
18
|
-
return /* @__PURE__ */ jsx(Drawer$1.Trigger, { "data-slot": "drawer-trigger", ...props });
|
|
19
|
-
}
|
|
20
|
-
function DrawerPortal({
|
|
21
|
-
...props
|
|
22
|
-
}) {
|
|
23
|
-
return /* @__PURE__ */ jsx(Drawer$1.Portal, { "data-slot": "drawer-portal", ...props });
|
|
24
|
-
}
|
|
25
|
-
function DrawerClose({
|
|
26
|
-
...props
|
|
27
|
-
}) {
|
|
28
|
-
return /* @__PURE__ */ jsx(Drawer$1.Close, { "data-slot": "drawer-close", ...props });
|
|
29
|
-
}
|
|
30
|
-
function DrawerOverlay({
|
|
31
|
-
className,
|
|
32
|
-
...props
|
|
33
|
-
}) {
|
|
34
|
-
return /* @__PURE__ */ jsx(
|
|
35
|
-
Drawer$1.Overlay,
|
|
36
|
-
{
|
|
37
|
-
"data-slot": "drawer-overlay",
|
|
38
|
-
className: cn(
|
|
39
|
-
"fixed inset-0 z-50 bg-overlay duration-300 ease-out supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
40
|
-
className
|
|
41
|
-
),
|
|
42
|
-
...props
|
|
43
|
-
}
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
function DrawerContent({
|
|
47
|
-
className,
|
|
48
|
-
children,
|
|
49
|
-
...props
|
|
50
|
-
}) {
|
|
51
|
-
return /* @__PURE__ */ jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [
|
|
52
|
-
/* @__PURE__ */ jsx(DrawerOverlay, {}),
|
|
53
|
-
/* @__PURE__ */ jsxs(
|
|
54
|
-
Drawer$1.Content,
|
|
55
|
-
{
|
|
56
|
-
"data-slot": "drawer-content",
|
|
57
|
-
className: cn(
|
|
58
|
-
"group/drawer-content fixed z-50 flex h-auto flex-col bg-background text-sm duration-300 ease-out outline-none data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-xl data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:start-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:rounded-e-xl data-[vaul-drawer-direction=left]:border-e data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:end-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:rounded-s-xl data-[vaul-drawer-direction=right]:border-s data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-xl data-[vaul-drawer-direction=top]:border-b data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm",
|
|
59
|
-
className
|
|
60
|
-
),
|
|
61
|
-
...props,
|
|
62
|
-
children: [
|
|
63
|
-
/* @__PURE__ */ jsx("div", { className: "mx-auto mt-4 hidden h-1 w-[100px] shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
|
|
64
|
-
children
|
|
65
|
-
]
|
|
66
|
-
}
|
|
67
|
-
)
|
|
68
|
-
] });
|
|
69
|
-
}
|
|
70
|
-
function DrawerHeader({ className, ...props }) {
|
|
71
|
-
return /* @__PURE__ */ jsx(
|
|
72
|
-
"div",
|
|
73
|
-
{
|
|
74
|
-
"data-slot": "drawer-header",
|
|
75
|
-
className: cn(
|
|
76
|
-
"flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-0.5 md:text-start",
|
|
77
|
-
className
|
|
78
|
-
),
|
|
79
|
-
...props
|
|
80
|
-
}
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
function DrawerFooter({ className, ...props }) {
|
|
84
|
-
return /* @__PURE__ */ jsx(
|
|
85
|
-
"div",
|
|
86
|
-
{
|
|
87
|
-
"data-slot": "drawer-footer",
|
|
88
|
-
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
89
|
-
...props
|
|
90
|
-
}
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
function DrawerTitle({
|
|
94
|
-
className,
|
|
95
|
-
...props
|
|
96
|
-
}) {
|
|
97
|
-
return /* @__PURE__ */ jsx(
|
|
98
|
-
Drawer$1.Title,
|
|
99
|
-
{
|
|
100
|
-
"data-slot": "drawer-title",
|
|
101
|
-
className: cn(
|
|
102
|
-
"font-heading text-base font-medium text-foreground",
|
|
103
|
-
className
|
|
104
|
-
),
|
|
105
|
-
...props
|
|
106
|
-
}
|
|
107
|
-
);
|
|
108
|
-
}
|
|
109
|
-
function DrawerDescription({
|
|
110
|
-
className,
|
|
111
|
-
...props
|
|
112
|
-
}) {
|
|
113
|
-
return /* @__PURE__ */ jsx(
|
|
114
|
-
Drawer$1.Description,
|
|
115
|
-
{
|
|
116
|
-
"data-slot": "drawer-description",
|
|
117
|
-
className: cn("text-sm text-muted-foreground", className),
|
|
118
|
-
...props
|
|
119
|
-
}
|
|
120
|
-
);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger };
|
|
124
|
-
//# sourceMappingURL=drawer.js.map
|
|
125
|
-
//# sourceMappingURL=drawer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/utils.ts","../../../src/components/ui/drawer.tsx"],"names":["DrawerPrimitive"],"mappings":"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","file":"drawer.js","sourcesContent":["import { clsx, type ClassValue } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport { Drawer as DrawerPrimitive } from \"vaul\"\n\nimport { cn } from \"../../lib/utils\"\n\nfunction Drawer({\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root>) {\n return <DrawerPrimitive.Root data-slot=\"drawer\" {...props} />\n}\n\nfunction DrawerTrigger({\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />\n}\n\nfunction DrawerPortal({\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Portal>) {\n return <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props} />\n}\n\nfunction DrawerClose({\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Close>) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />\n}\n\nfunction DrawerOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {\n return (\n <DrawerPrimitive.Overlay\n data-slot=\"drawer-overlay\"\n className={cn(\n \"fixed inset-0 z-50 bg-overlay duration-300 ease-out supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DrawerContent({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Content>) {\n return (\n <DrawerPortal data-slot=\"drawer-portal\">\n <DrawerOverlay />\n <DrawerPrimitive.Content\n data-slot=\"drawer-content\"\n className={cn(\n \"group/drawer-content fixed z-50 flex h-auto flex-col bg-background text-sm duration-300 ease-out outline-none data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-xl data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:start-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:rounded-e-xl data-[vaul-drawer-direction=left]:border-e data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:end-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:rounded-s-xl data-[vaul-drawer-direction=right]:border-s data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-xl data-[vaul-drawer-direction=top]:border-b data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm\",\n className\n )}\n {...props}\n >\n <div className=\"mx-auto mt-4 hidden h-1 w-[100px] shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n )\n}\n\nfunction DrawerHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"drawer-header\"\n className={cn(\n \"flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-0.5 md:text-start\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DrawerFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"drawer-footer\"\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\n {...props}\n />\n )\n}\n\nfunction DrawerTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Title>) {\n return (\n <DrawerPrimitive.Title\n data-slot=\"drawer-title\"\n className={cn(\n \"font-heading text-base font-medium text-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DrawerDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Description>) {\n return (\n <DrawerPrimitive.Description\n data-slot=\"drawer-description\"\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n}\n"]}
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import { Drawer as DrawerPrimitive } from "vaul"
|
|
5
|
-
|
|
6
|
-
import { cn } from "../../lib/utils"
|
|
7
|
-
|
|
8
|
-
function Drawer({
|
|
9
|
-
...props
|
|
10
|
-
}: React.ComponentProps<typeof DrawerPrimitive.Root>) {
|
|
11
|
-
return <DrawerPrimitive.Root data-slot="drawer" {...props} />
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function DrawerTrigger({
|
|
15
|
-
...props
|
|
16
|
-
}: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {
|
|
17
|
-
return <DrawerPrimitive.Trigger data-slot="drawer-trigger" {...props} />
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function DrawerPortal({
|
|
21
|
-
...props
|
|
22
|
-
}: React.ComponentProps<typeof DrawerPrimitive.Portal>) {
|
|
23
|
-
return <DrawerPrimitive.Portal data-slot="drawer-portal" {...props} />
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function DrawerClose({
|
|
27
|
-
...props
|
|
28
|
-
}: React.ComponentProps<typeof DrawerPrimitive.Close>) {
|
|
29
|
-
return <DrawerPrimitive.Close data-slot="drawer-close" {...props} />
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function DrawerOverlay({
|
|
33
|
-
className,
|
|
34
|
-
...props
|
|
35
|
-
}: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {
|
|
36
|
-
return (
|
|
37
|
-
<DrawerPrimitive.Overlay
|
|
38
|
-
data-slot="drawer-overlay"
|
|
39
|
-
className={cn(
|
|
40
|
-
"fixed inset-0 z-50 bg-overlay duration-300 ease-out supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
41
|
-
className
|
|
42
|
-
)}
|
|
43
|
-
{...props}
|
|
44
|
-
/>
|
|
45
|
-
)
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function DrawerContent({
|
|
49
|
-
className,
|
|
50
|
-
children,
|
|
51
|
-
...props
|
|
52
|
-
}: React.ComponentProps<typeof DrawerPrimitive.Content>) {
|
|
53
|
-
return (
|
|
54
|
-
<DrawerPortal data-slot="drawer-portal">
|
|
55
|
-
<DrawerOverlay />
|
|
56
|
-
<DrawerPrimitive.Content
|
|
57
|
-
data-slot="drawer-content"
|
|
58
|
-
className={cn(
|
|
59
|
-
"group/drawer-content fixed z-50 flex h-auto flex-col bg-background text-sm duration-300 ease-out outline-none data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-xl data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:start-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:rounded-e-xl data-[vaul-drawer-direction=left]:border-e data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:end-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:rounded-s-xl data-[vaul-drawer-direction=right]:border-s data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-xl data-[vaul-drawer-direction=top]:border-b data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm",
|
|
60
|
-
className
|
|
61
|
-
)}
|
|
62
|
-
{...props}
|
|
63
|
-
>
|
|
64
|
-
<div className="mx-auto mt-4 hidden h-1 w-[100px] shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block" />
|
|
65
|
-
{children}
|
|
66
|
-
</DrawerPrimitive.Content>
|
|
67
|
-
</DrawerPortal>
|
|
68
|
-
)
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function DrawerHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
72
|
-
return (
|
|
73
|
-
<div
|
|
74
|
-
data-slot="drawer-header"
|
|
75
|
-
className={cn(
|
|
76
|
-
"flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-0.5 md:text-start",
|
|
77
|
-
className
|
|
78
|
-
)}
|
|
79
|
-
{...props}
|
|
80
|
-
/>
|
|
81
|
-
)
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function DrawerFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
85
|
-
return (
|
|
86
|
-
<div
|
|
87
|
-
data-slot="drawer-footer"
|
|
88
|
-
className={cn("mt-auto flex flex-col gap-2 p-4", className)}
|
|
89
|
-
{...props}
|
|
90
|
-
/>
|
|
91
|
-
)
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function DrawerTitle({
|
|
95
|
-
className,
|
|
96
|
-
...props
|
|
97
|
-
}: React.ComponentProps<typeof DrawerPrimitive.Title>) {
|
|
98
|
-
return (
|
|
99
|
-
<DrawerPrimitive.Title
|
|
100
|
-
data-slot="drawer-title"
|
|
101
|
-
className={cn(
|
|
102
|
-
"font-heading text-base font-medium text-foreground",
|
|
103
|
-
className
|
|
104
|
-
)}
|
|
105
|
-
{...props}
|
|
106
|
-
/>
|
|
107
|
-
)
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
function DrawerDescription({
|
|
111
|
-
className,
|
|
112
|
-
...props
|
|
113
|
-
}: React.ComponentProps<typeof DrawerPrimitive.Description>) {
|
|
114
|
-
return (
|
|
115
|
-
<DrawerPrimitive.Description
|
|
116
|
-
data-slot="drawer-description"
|
|
117
|
-
className={cn("text-sm text-muted-foreground", className)}
|
|
118
|
-
{...props}
|
|
119
|
-
/>
|
|
120
|
-
)
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
export {
|
|
124
|
-
Drawer,
|
|
125
|
-
DrawerPortal,
|
|
126
|
-
DrawerOverlay,
|
|
127
|
-
DrawerTrigger,
|
|
128
|
-
DrawerClose,
|
|
129
|
-
DrawerContent,
|
|
130
|
-
DrawerHeader,
|
|
131
|
-
DrawerFooter,
|
|
132
|
-
DrawerTitle,
|
|
133
|
-
DrawerDescription,
|
|
134
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@exxatdesignux/ui/components/drawer"
|