@mehdashti/ui 0.1.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.
Files changed (84) hide show
  1. package/README.md +228 -0
  2. package/dist/components/__tests__/button.test.d.ts +2 -0
  3. package/dist/components/__tests__/button.test.d.ts.map +1 -0
  4. package/dist/components/__tests__/button.test.js +105 -0
  5. package/dist/components/__tests__/button.test.js.map +1 -0
  6. package/dist/components/__tests__/input.test.d.ts +2 -0
  7. package/dist/components/__tests__/input.test.d.ts.map +1 -0
  8. package/dist/components/__tests__/input.test.js +270 -0
  9. package/dist/components/__tests__/input.test.js.map +1 -0
  10. package/dist/components/__tests__/label.test.d.ts +2 -0
  11. package/dist/components/__tests__/label.test.d.ts.map +1 -0
  12. package/dist/components/__tests__/label.test.js +181 -0
  13. package/dist/components/__tests__/label.test.js.map +1 -0
  14. package/dist/components/button.d.ts +28 -0
  15. package/dist/components/button.d.ts.map +1 -0
  16. package/dist/components/button.js +45 -0
  17. package/dist/components/button.js.map +1 -0
  18. package/dist/components/button.stories.js +103 -0
  19. package/dist/components/button.stories.js.map +1 -0
  20. package/dist/components/dialog.d.ts +20 -0
  21. package/dist/components/dialog.d.ts.map +1 -0
  22. package/dist/components/dialog.js +22 -0
  23. package/dist/components/dialog.js.map +1 -0
  24. package/dist/components/dialog.stories.d.ts +44 -0
  25. package/dist/components/dialog.stories.d.ts.map +1 -0
  26. package/dist/components/dialog.stories.js +64 -0
  27. package/dist/components/dialog.stories.js.map +1 -0
  28. package/dist/components/input.d.ts +14 -0
  29. package/dist/components/input.d.ts.map +1 -0
  30. package/dist/components/input.js +17 -0
  31. package/dist/components/input.js.map +1 -0
  32. package/dist/components/input.stories.d.ts +80 -0
  33. package/dist/components/input.stories.d.ts.map +1 -0
  34. package/dist/components/input.stories.js +142 -0
  35. package/dist/components/input.stories.js.map +1 -0
  36. package/dist/components/label.d.ts +6 -0
  37. package/dist/components/label.d.ts.map +1 -0
  38. package/dist/components/label.js +10 -0
  39. package/dist/components/label.js.map +1 -0
  40. package/dist/components/label.stories.d.ts +52 -0
  41. package/dist/components/label.stories.d.ts.map +1 -0
  42. package/dist/components/label.stories.js +74 -0
  43. package/dist/components/label.stories.js.map +1 -0
  44. package/dist/components/select.d.ts +14 -0
  45. package/dist/components/select.d.ts.map +1 -0
  46. package/dist/components/select.js +26 -0
  47. package/dist/components/select.js.map +1 -0
  48. package/dist/components/select.stories.d.ts +48 -0
  49. package/dist/components/select.stories.d.ts.map +1 -0
  50. package/dist/components/select.stories.js +67 -0
  51. package/dist/components/select.stories.js.map +1 -0
  52. package/dist/components/table.d.ts +11 -0
  53. package/dist/components/table.d.ts.map +1 -0
  54. package/dist/components/table.js +21 -0
  55. package/dist/components/table.js.map +1 -0
  56. package/dist/components/tabs.d.ts +8 -0
  57. package/dist/components/tabs.d.ts.map +1 -0
  58. package/dist/components/tabs.js +13 -0
  59. package/dist/components/tabs.js.map +1 -0
  60. package/dist/components/tabs.stories.d.ts +40 -0
  61. package/dist/components/tabs.stories.d.ts.map +1 -0
  62. package/dist/components/tabs.stories.js +100 -0
  63. package/dist/components/tabs.stories.js.map +1 -0
  64. package/dist/components/toast.d.ts +16 -0
  65. package/dist/components/toast.d.ts.map +1 -0
  66. package/dist/components/toast.js +34 -0
  67. package/dist/components/toast.js.map +1 -0
  68. package/dist/components/toast.stories.d.ts +371 -0
  69. package/dist/components/toast.stories.d.ts.map +1 -0
  70. package/dist/components/toast.stories.js +228 -0
  71. package/dist/components/toast.stories.js.map +1 -0
  72. package/dist/hooks/use-toast.d.ts +45 -0
  73. package/dist/hooks/use-toast.d.ts.map +1 -0
  74. package/dist/hooks/use-toast.js +125 -0
  75. package/dist/hooks/use-toast.js.map +1 -0
  76. package/dist/index.d.ts +16 -0
  77. package/dist/index.d.ts.map +1 -0
  78. package/dist/index.js +19 -0
  79. package/dist/index.js.map +1 -0
  80. package/dist/lib/utils.d.ts +7 -0
  81. package/dist/lib/utils.d.ts.map +1 -0
  82. package/dist/lib/utils.js +10 -0
  83. package/dist/lib/utils.js.map +1 -0
  84. package/package.json +115 -0
@@ -0,0 +1,181 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { describe, it, expect, vi } from 'vitest';
3
+ import { render, screen } from '@testing-library/react';
4
+ import { Label } from '../label';
5
+ import { Input } from '../input';
6
+ describe('Label', () => {
7
+ describe('Rendering', () => {
8
+ it('renders label text', () => {
9
+ render(_jsx(Label, { children: "Email Address" }));
10
+ expect(screen.getByText('Email Address')).toBeInTheDocument();
11
+ });
12
+ it('renders with children', () => {
13
+ render(_jsxs(Label, { children: ["Username ", _jsx("span", { className: "required", children: "*" })] }));
14
+ expect(screen.getByText('Username')).toBeInTheDocument();
15
+ expect(screen.getByText('*')).toBeInTheDocument();
16
+ });
17
+ it('applies custom className', () => {
18
+ render(_jsx(Label, { className: "custom-class", children: "Label" }));
19
+ const label = screen.getByText('Label');
20
+ expect(label).toHaveClass('custom-class');
21
+ });
22
+ it('has data-slot attribute', () => {
23
+ render(_jsx(Label, { "data-testid": "label", children: "Label" }));
24
+ const label = screen.getByTestId('label');
25
+ expect(label).toHaveAttribute('data-slot', 'label');
26
+ });
27
+ });
28
+ describe('HTML Attributes', () => {
29
+ it('accepts htmlFor attribute', () => {
30
+ render(_jsx(Label, { htmlFor: "input-id", children: "Label" }));
31
+ const label = screen.getByText('Label');
32
+ expect(label).toHaveAttribute('for', 'input-id');
33
+ });
34
+ it('connects to input via htmlFor', () => {
35
+ render(_jsxs(_Fragment, { children: [_jsx(Label, { htmlFor: "test-input", children: "Email" }), _jsx(Input, { id: "test-input", type: "email" })] }));
36
+ const input = screen.getByLabelText('Email');
37
+ expect(input).toBeInTheDocument();
38
+ expect(input).toHaveAttribute('type', 'email');
39
+ });
40
+ it('accepts id attribute', () => {
41
+ render(_jsx(Label, { id: "label-id", children: "Label" }));
42
+ const label = screen.getByText('Label');
43
+ expect(label).toHaveAttribute('id', 'label-id');
44
+ });
45
+ it('accepts custom data attributes', () => {
46
+ render(_jsx(Label, { "data-custom": "value", children: "Label" }));
47
+ const label = screen.getByText('Label');
48
+ expect(label).toHaveAttribute('data-custom', 'value');
49
+ });
50
+ });
51
+ describe('Accessibility', () => {
52
+ it('renders as label element', () => {
53
+ render(_jsx(Label, { children: "Accessible Label" }));
54
+ const label = screen.getByText('Accessible Label');
55
+ expect(label.tagName).toBe('LABEL');
56
+ });
57
+ it('associates with input via htmlFor and id', () => {
58
+ render(_jsxs("div", { children: [_jsx(Label, { htmlFor: "username", children: "Username" }), _jsx(Input, { id: "username" })] }));
59
+ const label = screen.getByText('Username');
60
+ const input = screen.getByLabelText('Username');
61
+ expect(label).toHaveAttribute('for', 'username');
62
+ expect(input).toHaveAttribute('id', 'username');
63
+ });
64
+ it('can be clicked to focus associated input', async () => {
65
+ const user = await import('@testing-library/user-event').then((m) => m.default.setup());
66
+ render(_jsxs(_Fragment, { children: [_jsx(Label, { htmlFor: "clickable-input", children: "Click me" }), _jsx(Input, { id: "clickable-input" })] }));
67
+ const label = screen.getByText('Click me');
68
+ const input = screen.getByLabelText('Click me');
69
+ await user.click(label);
70
+ expect(input).toHaveFocus();
71
+ });
72
+ });
73
+ describe('Styling', () => {
74
+ it('has base label styles', () => {
75
+ render(_jsx(Label, { "data-testid": "label", children: "Label" }));
76
+ const label = screen.getByTestId('label');
77
+ expect(label.className).toContain('text-sm');
78
+ expect(label.className).toContain('font-medium');
79
+ expect(label.className).toContain('leading-none');
80
+ });
81
+ it('has peer-disabled styles', () => {
82
+ render(_jsx(Label, { "data-testid": "label", children: "Label" }));
83
+ const label = screen.getByTestId('label');
84
+ expect(label.className).toContain('peer-disabled:cursor-not-allowed');
85
+ expect(label.className).toContain('peer-disabled:opacity-70');
86
+ });
87
+ it('preserves custom className alongside base styles', () => {
88
+ render(_jsx(Label, { className: "text-red-500", "data-testid": "label", children: "Label" }));
89
+ const label = screen.getByTestId('label');
90
+ expect(label).toHaveClass('text-sm'); // Base style
91
+ expect(label).toHaveClass('text-red-500'); // Custom style
92
+ });
93
+ });
94
+ describe('Form Integration', () => {
95
+ it('works in a form context', () => {
96
+ render(_jsxs("form", { "data-testid": "form", children: [_jsx(Label, { htmlFor: "email-input", children: "Email" }), _jsx(Input, { id: "email-input", type: "email", name: "email" })] }));
97
+ const form = screen.getByTestId('form');
98
+ const label = screen.getByText('Email');
99
+ const input = screen.getByLabelText('Email');
100
+ expect(form).toContainElement(label);
101
+ expect(form).toContainElement(input);
102
+ });
103
+ it('supports required field indicator', () => {
104
+ render(_jsxs(Label, { htmlFor: "required-field", children: ["Email ", _jsx("span", { className: "text-destructive", children: "*" })] }));
105
+ expect(screen.getByText('Email')).toBeInTheDocument();
106
+ expect(screen.getByText('*')).toBeInTheDocument();
107
+ });
108
+ it('can be used with multiple inputs', () => {
109
+ render(_jsxs(_Fragment, { children: [_jsx(Label, { htmlFor: "first-name", children: "First Name" }), _jsx(Input, { id: "first-name" }), _jsx(Label, { htmlFor: "last-name", children: "Last Name" }), _jsx(Input, { id: "last-name" })] }));
110
+ expect(screen.getByLabelText('First Name')).toBeInTheDocument();
111
+ expect(screen.getByLabelText('Last Name')).toBeInTheDocument();
112
+ });
113
+ });
114
+ describe('Event Handling', () => {
115
+ it('handles onClick events', () => {
116
+ const onClick = vi.fn();
117
+ render(_jsx(Label, { onClick: onClick, children: "Clickable Label" }));
118
+ const label = screen.getByText('Clickable Label');
119
+ label.click();
120
+ expect(onClick).toHaveBeenCalledTimes(1);
121
+ });
122
+ });
123
+ describe('Ref Forwarding', () => {
124
+ it('forwards ref correctly', () => {
125
+ const ref = vi.fn();
126
+ render(_jsx(Label, { ref: ref, children: "Label" }));
127
+ expect(ref).toHaveBeenCalledWith(expect.any(HTMLLabelElement));
128
+ });
129
+ it('allows ref to be used for DOM access', () => {
130
+ let labelRef = null;
131
+ render(_jsx(Label, { ref: (el) => (labelRef = el), children: "Test Label" }));
132
+ expect(labelRef).toBeInstanceOf(HTMLLabelElement);
133
+ expect(labelRef?.textContent).toBe('Test Label');
134
+ });
135
+ });
136
+ describe('With Different Input Types', () => {
137
+ it('works with text input', () => {
138
+ render(_jsxs(_Fragment, { children: [_jsx(Label, { htmlFor: "text-input", children: "Name" }), _jsx(Input, { id: "text-input", type: "text" })] }));
139
+ const input = screen.getByLabelText('Name');
140
+ expect(input).toHaveAttribute('type', 'text');
141
+ });
142
+ it('works with email input', () => {
143
+ render(_jsxs(_Fragment, { children: [_jsx(Label, { htmlFor: "email-input", children: "Email" }), _jsx(Input, { id: "email-input", type: "email" })] }));
144
+ const input = screen.getByLabelText('Email');
145
+ expect(input).toHaveAttribute('type', 'email');
146
+ });
147
+ it('works with password input', () => {
148
+ render(_jsxs(_Fragment, { children: [_jsx(Label, { htmlFor: "password-input", children: "Password" }), _jsx(Input, { id: "password-input", type: "password" })] }));
149
+ const input = screen.getByLabelText('Password');
150
+ expect(input).toHaveAttribute('type', 'password');
151
+ });
152
+ it('works with checkbox input', () => {
153
+ render(_jsxs(_Fragment, { children: [_jsx(Label, { htmlFor: "checkbox-input", children: "Accept terms" }), _jsx("input", { id: "checkbox-input", type: "checkbox" })] }));
154
+ const input = screen.getByLabelText('Accept terms');
155
+ expect(input).toHaveAttribute('type', 'checkbox');
156
+ });
157
+ it('works with radio input', () => {
158
+ render(_jsxs(_Fragment, { children: [_jsx(Label, { htmlFor: "radio-input", children: "Option A" }), _jsx("input", { id: "radio-input", type: "radio" })] }));
159
+ const input = screen.getByLabelText('Option A');
160
+ expect(input).toHaveAttribute('type', 'radio');
161
+ });
162
+ });
163
+ describe('Complex Content', () => {
164
+ it('renders with nested elements', () => {
165
+ render(_jsxs(Label, { children: [_jsx("span", { className: "icon", children: "\uD83D\uDCE7" }), _jsx("span", { className: "text", children: "Email Address" })] }));
166
+ expect(screen.getByText('📧')).toBeInTheDocument();
167
+ expect(screen.getByText('Email Address')).toBeInTheDocument();
168
+ });
169
+ it('renders with React fragments', () => {
170
+ render(_jsx(Label, { children: _jsxs(_Fragment, { children: ["Email ", _jsx("em", { children: "(required)" })] }) }));
171
+ expect(screen.getByText('Email')).toBeInTheDocument();
172
+ expect(screen.getByText('(required)')).toBeInTheDocument();
173
+ });
174
+ it('preserves text formatting', () => {
175
+ render(_jsxs(Label, { children: [_jsx("strong", { children: "Important:" }), " This field is required"] }));
176
+ const strong = screen.getByText('Important:');
177
+ expect(strong.tagName).toBe('STRONG');
178
+ });
179
+ });
180
+ });
181
+ //# sourceMappingURL=label.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label.test.js","sourceRoot":"","sources":["../../../src/components/__tests__/label.test.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAEhC,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE;IACrB,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;QACzB,EAAE,CAAC,oBAAoB,EAAE,GAAG,EAAE;YAC5B,MAAM,CAAC,KAAC,KAAK,gCAAsB,CAAC,CAAA;YACpC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAA;QAC/D,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,uBAAuB,EAAE,GAAG,EAAE;YAC/B,MAAM,CACJ,MAAC,KAAK,4BACK,eAAM,SAAS,EAAC,UAAU,kBAAS,IACtC,CACT,CAAA;YACD,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAA;YACxD,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,iBAAiB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C,CAAC,CAAC,iBAAiB,EAAE,CAAA;YACrD,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAA;QAC5D,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,2BAA2B,EAAE,GAAG,EAAE;YACnC,MAAM,CACJ,MAAC,KAAK,eACJ,0CAA2B,+BACrB,CACT,CAAA;YAED,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,YAAY,CAAC,CAAA;YAC7C,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QACvC,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -0,0 +1,28 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
5
+ size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
+ /**
9
+ * Render as a child component (for composition with links, etc.)
10
+ */
11
+ asChild?: boolean;
12
+ }
13
+ /**
14
+ * Button component with multiple variants and sizes
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * <Button variant="default" size="default">
19
+ * Click me
20
+ * </Button>
21
+ * ```
22
+ */
23
+ declare function Button({ className, variant, size, asChild, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
24
+ declare namespace Button {
25
+ var displayName: string;
26
+ }
27
+ export { Button, buttonVariants };
28
+ //# sourceMappingURL=button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,cAAc;;;8EA8BnB,CAAC;AAEF,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;GASG;AACH,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,OAAe,EACf,GAAG,KAAK,EACT,EAAE,WAAW,2CAYb;kBAlBQ,MAAM;;;AAsBf,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Slot } from "@radix-ui/react-slot";
3
+ import { cva } from "class-variance-authority";
4
+ import { cn } from "../lib/utils.js";
5
+ const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive [border-radius:var(--radius-md)]", {
6
+ variants: {
7
+ variant: {
8
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
9
+ destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
10
+ outline: "border border-border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
11
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
12
+ ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
13
+ link: "text-primary underline-offset-4 hover:underline",
14
+ },
15
+ size: {
16
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
17
+ sm: "h-8 gap-1.5 px-3 has-[>svg]:px-2.5",
18
+ lg: "h-10 px-6 has-[>svg]:px-4",
19
+ icon: "size-9",
20
+ "icon-sm": "size-8",
21
+ "icon-lg": "size-10",
22
+ },
23
+ },
24
+ defaultVariants: {
25
+ variant: "default",
26
+ size: "default",
27
+ },
28
+ });
29
+ /**
30
+ * Button component with multiple variants and sizes
31
+ *
32
+ * @example
33
+ * ```tsx
34
+ * <Button variant="default" size="default">
35
+ * Click me
36
+ * </Button>
37
+ * ```
38
+ */
39
+ function Button({ className, variant = "default", size = "default", asChild = false, ...props }) {
40
+ const Comp = asChild ? Slot : "button";
41
+ return (_jsx(Comp, { "data-slot": "button", "data-variant": variant, "data-size": size, className: cn(buttonVariants({ variant, size, className })), ...props }));
42
+ }
43
+ Button.displayName = "Button";
44
+ export { Button, buttonVariants };
45
+ //# sourceMappingURL=button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,MAAM,cAAc,GAAG,GAAG,CACxB,mdAAmd,EACnd;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,wDAAwD;YACjE,WAAW,EACT,mJAAmJ;YACrJ,OAAO,EACL,qJAAqJ;YACvJ,SAAS,EACP,8DAA8D;YAChE,KAAK,EACH,sEAAsE;YACxE,IAAI,EAAE,iDAAiD;SACxD;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,+BAA+B;YACxC,EAAE,EAAE,oCAAoC;YACxC,EAAE,EAAE,2BAA2B;YAC/B,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,QAAQ;YACnB,SAAS,EAAE,SAAS;SACrB;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,SAAS;KAChB;CACF,CACF,CAAC;AAWF;;;;;;;;;GASG;AACH,SAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAO,GAAG,SAAS,EACnB,IAAI,GAAG,SAAS,EAChB,OAAO,GAAG,KAAK,EACf,GAAG,KAAK,EACI;IACZ,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC;IAEvC,OAAO,CACL,KAAC,IAAI,iBACO,QAAQ,kBACJ,OAAO,eACV,IAAI,EACf,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,KACvD,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC;AAE9B,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,103 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { fn } from '@storybook/test';
3
+ import { Button } from './button';
4
+ const meta = {
5
+ title: 'Components/Button',
6
+ component: Button,
7
+ parameters: {
8
+ layout: 'centered',
9
+ },
10
+ tags: ['autodocs'],
11
+ argTypes: {
12
+ variant: {
13
+ control: 'select',
14
+ options: ['default', 'destructive', 'outline', 'secondary', 'ghost', 'link'],
15
+ },
16
+ size: {
17
+ control: 'select',
18
+ options: ['default', 'sm', 'lg', 'icon', 'icon-sm', 'icon-lg'],
19
+ },
20
+ asChild: {
21
+ control: 'boolean',
22
+ },
23
+ disabled: {
24
+ control: 'boolean',
25
+ },
26
+ },
27
+ args: {
28
+ onClick: fn(),
29
+ },
30
+ };
31
+ export default meta;
32
+ export const Default = {
33
+ args: {
34
+ variant: 'default',
35
+ children: 'Button',
36
+ },
37
+ };
38
+ export const Destructive = {
39
+ args: {
40
+ variant: 'destructive',
41
+ children: 'Delete',
42
+ },
43
+ };
44
+ export const Outline = {
45
+ args: {
46
+ variant: 'outline',
47
+ children: 'Outline',
48
+ },
49
+ };
50
+ export const Secondary = {
51
+ args: {
52
+ variant: 'secondary',
53
+ children: 'Secondary',
54
+ },
55
+ };
56
+ export const Ghost = {
57
+ args: {
58
+ variant: 'ghost',
59
+ children: 'Ghost',
60
+ },
61
+ };
62
+ export const Link = {
63
+ args: {
64
+ variant: 'link',
65
+ children: 'Link',
66
+ },
67
+ };
68
+ export const Small = {
69
+ args: {
70
+ size: 'sm',
71
+ children: 'Small Button',
72
+ },
73
+ };
74
+ export const Large = {
75
+ args: {
76
+ size: 'lg',
77
+ children: 'Large Button',
78
+ },
79
+ };
80
+ export const Disabled = {
81
+ args: {
82
+ disabled: true,
83
+ children: 'Disabled',
84
+ },
85
+ };
86
+ export const WithIcon = {
87
+ args: {
88
+ children: (_jsxs(_Fragment, { children: [_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { d: "M5 12h14" }), _jsx("path", { d: "m12 5 7 7-7 7" })] }), "With Icon"] })),
89
+ },
90
+ };
91
+ export const IconOnly = {
92
+ args: {
93
+ size: 'icon',
94
+ children: (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { d: "M5 12h14" }), _jsx("path", { d: "m12 5 7 7-7 7" })] })),
95
+ },
96
+ };
97
+ export const AllVariants = {
98
+ render: () => (_jsxs("div", { style: { display: 'flex', gap: '1rem', flexWrap: 'wrap' }, children: [_jsx(Button, { variant: "default", children: "Default" }), _jsx(Button, { variant: "destructive", children: "Destructive" }), _jsx(Button, { variant: "outline", children: "Outline" }), _jsx(Button, { variant: "secondary", children: "Secondary" }), _jsx(Button, { variant: "ghost", children: "Ghost" }), _jsx(Button, { variant: "link", children: "Link" })] })),
99
+ };
100
+ export const AllSizes = {
101
+ render: () => (_jsxs("div", { style: { display: 'flex', gap: '1rem', alignItems: 'center', flexWrap: 'wrap' }, children: [_jsx(Button, { size: "sm", children: "Small" }), _jsx(Button, { size: "default", children: "Default" }), _jsx(Button, { size: "lg", children: "Large" })] })),
102
+ };
103
+ //# sourceMappingURL=button.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.stories.js","sourceRoot":"","sources":["../../src/components/button.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAA;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,MAAM;IACjB,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE,CAAC,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,CAAC;SAC7E;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,CAAC;SAC/D;QACD,OAAO,EAAE;YACP,OAAO,EAAE,SAAS;SACnB;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,SAAS;SACnB;KACF;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,EAAE,EAAE;KACd;CAC4B,CAAA;AAE/B,eAAe,IAAI,CAAA;AAGnB,MA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,CAAC,CACZ,eAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,aAClF,KAAC,MAAM,IAAC,IAAI,EAAC,IAAI,sBAAe,EAChC,KAAC,MAAM,IAAC,IAAI,EAAC,SAAS,wBAAiB,EACvC,KAAC,MAAM,IAAC,IAAI,EAAC,IAAI,sBAAe,IAC5B,CACP;CACF,CAAA"}
@@ -0,0 +1,20 @@
1
+ import * as React from "react";
2
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
3
+ declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
4
+ declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
6
+ declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
7
+ declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
+ declare const DialogHeader: {
10
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
11
+ displayName: string;
12
+ };
13
+ declare const DialogFooter: {
14
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
15
+ displayName: string;
16
+ };
17
+ declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
18
+ declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
19
+ export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
20
+ //# sourceMappingURL=dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/components/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAI1D,QAAA,MAAM,MAAM,uCAAuB,CAAC;AAEpC,QAAA,MAAM,aAAa,8GAA0B,CAAC;AAE9C,QAAA,MAAM,YAAY,6CAAyB,CAAC;AAE5C,QAAA,MAAM,WAAW,4GAAwB,CAAC;AAE1C,QAAA,MAAM,aAAa,8JAYjB,CAAC;AAGH,QAAA,MAAM,aAAa,8JAqCjB,CAAC;AAGH,QAAA,MAAM,YAAY;8BAGf,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAQtC,CAAC;AAGF,QAAA,MAAM,YAAY;8BAGf,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAQtC,CAAC;AAGF,QAAA,MAAM,WAAW,oKAYf,CAAC;AAGH,QAAA,MAAM,iBAAiB,8KASrB,CAAC;AAGH,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
4
+ import { cn } from "../lib/utils.js";
5
+ const Dialog = DialogPrimitive.Root;
6
+ const DialogTrigger = DialogPrimitive.Trigger;
7
+ const DialogPortal = DialogPrimitive.Portal;
8
+ const DialogClose = DialogPrimitive.Close;
9
+ const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Overlay, { ref: ref, className: cn("fixed inset-0 z-[var(--z-overlay)] bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className), ...props })));
10
+ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
11
+ const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { ref: ref, "data-slot": "dialog-content", className: cn("fixed left-[50%] top-[50%] z-[var(--z-modal)] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-background p-6 shadow-lg duration-200 [border-radius:var(--radius-lg)]", "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]", "sm:rounded-lg", className), ...props, children: [children, _jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { d: "M18 6 6 18" }), _jsx("path", { d: "m6 6 12 12" })] }), _jsx("span", { className: "sr-only", children: "Close" })] })] })] })));
12
+ DialogContent.displayName = DialogPrimitive.Content.displayName;
13
+ const DialogHeader = ({ className, ...props }) => (_jsx("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props }));
14
+ DialogHeader.displayName = "DialogHeader";
15
+ const DialogFooter = ({ className, ...props }) => (_jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props }));
16
+ DialogFooter.displayName = "DialogFooter";
17
+ const DialogTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Title, { ref: ref, className: cn("text-lg font-semibold leading-none tracking-tight", className), ...props })));
18
+ DialogTitle.displayName = DialogPrimitive.Title.displayName;
19
+ const DialogDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Description, { ref: ref, className: cn("text-sm text-muted-foreground", className), ...props })));
20
+ DialogDescription.displayName = DialogPrimitive.Description.displayName;
21
+ export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
22
+ //# sourceMappingURL=dialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/components/dialog.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC;AAEpC,MAAM,aAAa,GAAG,eAAe,CAAC,OAAO,CAAC;AAE9C,MAAM,YAAY,GAAG,eAAe,CAAC,MAAM,CAAC;AAE5C,MAAM,WAAW,GAAG,eAAe,CAAC,KAAK,CAAC;AAE1C,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAGpC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,eAAe,CAAC,OAAO,IACtB,GAAG,EAAE,GAAG,EACR,SAA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B,SAAS,EACT,GAAG,KAAK,EAC6B,EAAE,EAAE,CAAC,CAC1C,cACE,SAAS,EAAE,EAAE,CACX,+DAA+D,EAC/D,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACF,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC;AAE1C,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAGlC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,eAAe,CAAC,KAAK,IACpB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,mDAAmD,EACnD,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC,CAAC;AACH,WAAW,CAAC,WAAW,GAAG,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC;AAE5D,MAAM,iBAAiB,GAAG,KAAK,CAAC,UAAU,CAGxC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,eAAe,CAAC,WAAW,IAC1B,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,KACrD,KAAK,GACT,CACH,CAAC,CAAC;AACH,iBAAiB,CAAC,WAAW,GAAG,eAAe,CAAC,WAAW,CAAC,WAAW,CAAC;AAExE,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAC"}
@@ -0,0 +1,44 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: import("react").FC<import("@radix-ui/react-dialog").DialogProps>;
5
+ parameters: {
6
+ layout: string;
7
+ };
8
+ tags: string[];
9
+ };
10
+ export default meta;
11
+ type Story = StoryObj<typeof meta>;
12
+ /**
13
+ * Basic dialog with trigger button
14
+ */
15
+ export declare const Default: Story;
16
+ /**
17
+ * Dialog with form fields
18
+ */
19
+ export declare const WithForm: Story;
20
+ /**
21
+ * Destructive action dialog (e.g., delete confirmation)
22
+ */
23
+ export declare const Destructive: Story;
24
+ /**
25
+ * Dialog without description
26
+ */
27
+ export declare const WithoutDescription: Story;
28
+ /**
29
+ * Dialog with long scrollable content
30
+ */
31
+ export declare const WithLongContent: Story;
32
+ /**
33
+ * Simple confirmation dialog
34
+ */
35
+ export declare const Confirmation: Story;
36
+ /**
37
+ * Dialog with custom actions
38
+ */
39
+ export declare const CustomActions: Story;
40
+ /**
41
+ * Dialog showcase with different variants
42
+ */
43
+ export declare const Showcase: Story;
44
+ //# sourceMappingURL=dialog.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.stories.d.ts","sourceRoot":"","sources":["../../src/components/dialog.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAgBtD,QAAA,MAAM,IAAI;;;;;;;CAOqB,CAAA;AAE/B,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,KA2BrB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,KAoCtB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAyBzB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAqBhC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,KA+E7B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAoB1B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,KA+B3B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,KA8DtB,CAAA"}
@@ -0,0 +1,64 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { fn } from '@storybook/test';
3
+ import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DialogClose, } from './dialog';
4
+ import { Button } from './button';
5
+ import { Input } from './input';
6
+ import { Label } from './label';
7
+ const meta = {
8
+ title: 'Components/Dialog',
9
+ component: Dialog,
10
+ parameters: {
11
+ layout: 'centered',
12
+ },
13
+ tags: ['autodocs'],
14
+ };
15
+ export default meta;
16
+ /**
17
+ * Basic dialog with trigger button
18
+ */
19
+ export const Default = {
20
+ render: () => (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Open Dialog" }) }), _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Dialog Title" }), _jsx(DialogDescription, { children: "This is a dialog description. It provides additional context about the dialog content." })] }), _jsx("div", { className: "py-4", children: _jsx("p", { className: "text-sm text-foreground", children: "Dialog content goes here. You can add any content you like." }) }), _jsxs(DialogFooter, { children: [_jsx(DialogClose, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Cancel" }) }), _jsx(Button, { onClick: fn(), children: "Confirm" })] })] })] })),
21
+ };
22
+ /**
23
+ * Dialog with form fields
24
+ */
25
+ export const WithForm = {
26
+ render: () => (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { children: "Edit Profile" }) }), _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Edit Profile" }), _jsx(DialogDescription, { children: "Make changes to your profile here. Click save when you're done." })] }), _jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '1rem', paddingTop: '1rem' }, children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '0.5rem' }, children: [_jsx(Label, { htmlFor: "name", children: "Name" }), _jsx(Input, { id: "name", defaultValue: "John Doe" })] }), _jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '0.5rem' }, children: [_jsx(Label, { htmlFor: "email", children: "Email" }), _jsx(Input, { id: "email", type: "email", defaultValue: "john@example.com" })] }), _jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '0.5rem' }, children: [_jsx(Label, { htmlFor: "bio", children: "Bio" }), _jsx(Input, { id: "bio", defaultValue: "Software developer" })] })] }), _jsxs(DialogFooter, { children: [_jsx(DialogClose, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Cancel" }) }), _jsx(Button, { onClick: fn(), children: "Save Changes" })] })] })] })),
27
+ };
28
+ /**
29
+ * Destructive action dialog (e.g., delete confirmation)
30
+ */
31
+ export const Destructive = {
32
+ render: () => (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { variant: "destructive", children: "Delete Account" }) }), _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Are you absolutely sure?" }), _jsx(DialogDescription, { children: "This action cannot be undone. This will permanently delete your account and remove your data from our servers." })] }), _jsxs(DialogFooter, { children: [_jsx(DialogClose, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Cancel" }) }), _jsx(Button, { variant: "destructive", onClick: fn(), children: "Delete Account" })] })] })] })),
33
+ };
34
+ /**
35
+ * Dialog without description
36
+ */
37
+ export const WithoutDescription = {
38
+ render: () => (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Open" }) }), _jsxs(DialogContent, { children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: "Notification Settings" }) }), _jsx("div", { className: "py-4", children: _jsx("p", { className: "text-sm text-foreground", children: "Configure how you want to receive notifications." }) }), _jsx(DialogFooter, { children: _jsx(Button, { onClick: fn(), children: "Save" }) })] })] })),
39
+ };
40
+ /**
41
+ * Dialog with long scrollable content
42
+ */
43
+ export const WithLongContent = {
44
+ render: () => (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", children: "View Terms" }) }), _jsxs(DialogContent, { className: "max-h-[80vh] overflow-y-auto", children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Terms and Conditions" }), _jsx(DialogDescription, { children: "Please read these terms and conditions carefully before using our service." })] }), _jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '1rem', paddingTop: '1rem' }, children: [_jsxs("section", { children: [_jsx("h3", { style: { fontSize: '1rem', fontWeight: '600', marginBottom: '0.5rem' }, children: "1. Introduction" }), _jsx("p", { style: { fontSize: '0.875rem', lineHeight: '1.5' }, children: "Welcome to our service. By accessing or using our service, you agree to be bound by these terms and conditions. If you disagree with any part of these terms, you may not access the service." })] }), _jsxs("section", { children: [_jsx("h3", { style: { fontSize: '1rem', fontWeight: '600', marginBottom: '0.5rem' }, children: "2. Use License" }), _jsx("p", { style: { fontSize: '0.875rem', lineHeight: '1.5' }, children: "Permission is granted to temporarily download one copy of the materials on our service for personal, non-commercial transitory viewing only. This is the grant of a license, not a transfer of title." })] }), _jsxs("section", { children: [_jsx("h3", { style: { fontSize: '1rem', fontWeight: '600', marginBottom: '0.5rem' }, children: "3. Disclaimer" }), _jsx("p", { style: { fontSize: '0.875rem', lineHeight: '1.5' }, children: "The materials on our service are provided on an 'as is' basis. We make no warranties, expressed or implied, and hereby disclaim and negate all other warranties including, without limitation, implied warranties or conditions of merchantability, fitness for a particular purpose, or non-infringement of intellectual property." })] }), _jsxs("section", { children: [_jsx("h3", { style: { fontSize: '1rem', fontWeight: '600', marginBottom: '0.5rem' }, children: "4. Limitations" }), _jsx("p", { style: { fontSize: '0.875rem', lineHeight: '1.5' }, children: "In no event shall we or our suppliers be liable for any damages (including, without limitation, damages for loss of data or profit, or due to business interruption) arising out of the use or inability to use the materials on our service." })] }), _jsxs("section", { children: [_jsx("h3", { style: { fontSize: '1rem', fontWeight: '600', marginBottom: '0.5rem' }, children: "5. Revisions" }), _jsx("p", { style: { fontSize: '0.875rem', lineHeight: '1.5' }, children: "The materials appearing on our service could include technical, typographical, or photographic errors. We do not warrant that any of the materials on our service are accurate, complete, or current." })] })] }), _jsxs(DialogFooter, { children: [_jsx(DialogClose, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Decline" }) }), _jsx(Button, { onClick: fn(), children: "Accept" })] })] })] })),
45
+ };
46
+ /**
47
+ * Simple confirmation dialog
48
+ */
49
+ export const Confirmation = {
50
+ render: () => (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Logout" }) }), _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Confirm Logout" }), _jsx(DialogDescription, { children: "Are you sure you want to logout?" })] }), _jsxs(DialogFooter, { children: [_jsx(DialogClose, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Cancel" }) }), _jsx(Button, { onClick: fn(), children: "Logout" })] })] })] })),
51
+ };
52
+ /**
53
+ * Dialog with custom actions
54
+ */
55
+ export const CustomActions = {
56
+ render: () => (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Share Document" }) }), _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Share Document" }), _jsx(DialogDescription, { children: "Choose who can view this document and what permissions they have." })] }), _jsx("div", { style: { display: 'flex', flexDirection: 'column', gap: '1rem', paddingTop: '1rem' }, children: _jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '0.5rem' }, children: [_jsx(Label, { htmlFor: "share-email", children: "Email" }), _jsx(Input, { id: "share-email", type: "email", placeholder: "colleague@example.com" })] }) }), _jsxs(DialogFooter, { style: { gap: '0.5rem' }, children: [_jsx(DialogClose, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Cancel" }) }), _jsx(Button, { variant: "secondary", onClick: fn(), children: "Copy Link" }), _jsx(Button, { onClick: fn(), children: "Send Invite" })] })] })] })),
57
+ };
58
+ /**
59
+ * Dialog showcase with different variants
60
+ */
61
+ export const Showcase = {
62
+ render: () => (_jsxs("div", { style: { display: 'flex', flexWrap: 'wrap', gap: '1rem' }, children: [_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Basic Dialog" }) }), _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Basic Dialog" }), _jsx(DialogDescription, { children: "A simple dialog with minimal content." })] }), _jsx(DialogFooter, { children: _jsx(DialogClose, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Close" }) }) })] })] }), _jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { children: "With Form" }) }), _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Form Dialog" }), _jsx(DialogDescription, { children: "Dialog containing form fields." })] }), _jsxs("div", { style: { paddingTop: '1rem' }, children: [_jsx(Label, { htmlFor: "showcase-input", children: "Name" }), _jsx(Input, { id: "showcase-input", placeholder: "Enter name" })] }), _jsx(DialogFooter, { children: _jsx(Button, { onClick: fn(), children: "Submit" }) })] })] }), _jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { variant: "destructive", children: "Delete" }) }), _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Delete Item" }), _jsx(DialogDescription, { children: "Are you sure? This action cannot be undone." })] }), _jsxs(DialogFooter, { children: [_jsx(DialogClose, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Cancel" }) }), _jsx(Button, { variant: "destructive", onClick: fn(), children: "Delete" })] })] })] })] })),
63
+ };
64
+ //# sourceMappingURL=dialog.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.stories.js","sourceRoot":"","sources":["../../src/components/dialog.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAA;AACpC,OAAO,EACL,MAAM,EACN,aAAa,EACb,iBAA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OAAO,EAAC,aAAa,uBAAgB,GAC/B,EAChB,MAAC,aAAa,eACZ,MAAC,YAAY,eACX,KAAC,WAAW,8BAA0B,EACtC,KAAC,iBAAiB,8DAEE,IACP,EACf,MAAC,YAAY,eACX,KAAC,WAAW,IAAC,OAAO,kBAClB,KAAC,MAAM,IAAC,OAAO,EAAC,SAAS,uBAAgB,GAC7B,EACd,KAAC,MAAM,IAAC,OAAO,EAAC,aAAa,EAAC,OAAO,EAAE,EAAE,EAAE,uBAElC,IACI,IACD,IACT,IACL,CACP;CACF,CAAA"}
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
3
+ }
4
+ /**
5
+ * Input component for text, email, password, etc.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * <Input type="email" placeholder="Enter email" />
10
+ * ```
11
+ */
12
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
13
+ export { Input };
14
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/components/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC;CAAG;AAExD;;;;;;;GAOG;AACH,QAAA,MAAM,KAAK,qFAiBV,CAAC;AAIF,OAAO,EAAE,KAAK,EAAE,CAAC"}