@jztack/ui 0.0.0-stage → 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 (143) hide show
  1. package/README.md +82 -2
  2. package/dist/components/alert.d.ts +25 -0
  3. package/dist/components/alert.d.ts.map +1 -0
  4. package/dist/components/alert.js +40 -0
  5. package/dist/components/alert.js.map +1 -0
  6. package/dist/components/app-shell.d.ts +64 -0
  7. package/dist/components/app-shell.d.ts.map +1 -0
  8. package/dist/components/app-shell.js +33 -0
  9. package/dist/components/app-shell.js.map +1 -0
  10. package/dist/components/avatar.d.ts +12 -0
  11. package/dist/components/avatar.d.ts.map +1 -0
  12. package/dist/components/avatar.js +23 -0
  13. package/dist/components/avatar.js.map +1 -0
  14. package/dist/components/badge.d.ts +42 -0
  15. package/dist/components/badge.d.ts.map +1 -0
  16. package/dist/components/badge.js +113 -0
  17. package/dist/components/badge.js.map +1 -0
  18. package/dist/components/button.d.ts +30 -0
  19. package/dist/components/button.d.ts.map +1 -0
  20. package/dist/components/button.js +57 -0
  21. package/dist/components/button.js.map +1 -0
  22. package/dist/components/card.d.ts +28 -0
  23. package/dist/components/card.d.ts.map +1 -0
  24. package/dist/components/card.js +54 -0
  25. package/dist/components/card.js.map +1 -0
  26. package/dist/components/checkbox.d.ts +5 -0
  27. package/dist/components/checkbox.d.ts.map +1 -0
  28. package/dist/components/checkbox.js +10 -0
  29. package/dist/components/checkbox.js.map +1 -0
  30. package/dist/components/confirm-action-modal.d.ts +49 -0
  31. package/dist/components/confirm-action-modal.d.ts.map +1 -0
  32. package/dist/components/confirm-action-modal.js +88 -0
  33. package/dist/components/confirm-action-modal.js.map +1 -0
  34. package/dist/components/delete-button.d.ts +26 -0
  35. package/dist/components/delete-button.d.ts.map +1 -0
  36. package/dist/components/delete-button.js +36 -0
  37. package/dist/components/delete-button.js.map +1 -0
  38. package/dist/components/dialog.d.ts +22 -0
  39. package/dist/components/dialog.d.ts.map +1 -0
  40. package/dist/components/dialog.js +38 -0
  41. package/dist/components/dialog.js.map +1 -0
  42. package/dist/components/dropdown-menu.d.ts +30 -0
  43. package/dist/components/dropdown-menu.d.ts.map +1 -0
  44. package/dist/components/dropdown-menu.js +88 -0
  45. package/dist/components/dropdown-menu.js.map +1 -0
  46. package/dist/components/empty-state.d.ts +20 -0
  47. package/dist/components/empty-state.d.ts.map +1 -0
  48. package/dist/components/empty-state.js +8 -0
  49. package/dist/components/empty-state.js.map +1 -0
  50. package/dist/components/error-boundary.d.ts +39 -0
  51. package/dist/components/error-boundary.d.ts.map +1 -0
  52. package/dist/components/error-boundary.js +57 -0
  53. package/dist/components/error-boundary.js.map +1 -0
  54. package/dist/components/form-field.d.ts +78 -0
  55. package/dist/components/form-field.d.ts.map +1 -0
  56. package/dist/components/form-field.js +56 -0
  57. package/dist/components/form-field.js.map +1 -0
  58. package/dist/components/input.d.ts +9 -0
  59. package/dist/components/input.d.ts.map +1 -0
  60. package/dist/components/input.js +12 -0
  61. package/dist/components/input.js.map +1 -0
  62. package/dist/components/label.d.ts +5 -0
  63. package/dist/components/label.d.ts.map +1 -0
  64. package/dist/components/label.js +8 -0
  65. package/dist/components/label.js.map +1 -0
  66. package/dist/components/page-header.d.ts +23 -0
  67. package/dist/components/page-header.d.ts.map +1 -0
  68. package/dist/components/page-header.js +10 -0
  69. package/dist/components/page-header.js.map +1 -0
  70. package/dist/components/progress.d.ts +5 -0
  71. package/dist/components/progress.d.ts.map +1 -0
  72. package/dist/components/progress.js +13 -0
  73. package/dist/components/progress.js.map +1 -0
  74. package/dist/components/radio-group.d.ts +6 -0
  75. package/dist/components/radio-group.d.ts.map +1 -0
  76. package/dist/components/radio-group.js +11 -0
  77. package/dist/components/radio-group.js.map +1 -0
  78. package/dist/components/scroll-area.d.ts +6 -0
  79. package/dist/components/scroll-area.d.ts.map +1 -0
  80. package/dist/components/scroll-area.js +11 -0
  81. package/dist/components/scroll-area.js.map +1 -0
  82. package/dist/components/select.d.ts +16 -0
  83. package/dist/components/select.d.ts.map +1 -0
  84. package/dist/components/select.js +44 -0
  85. package/dist/components/select.js.map +1 -0
  86. package/dist/components/separator.d.ts +5 -0
  87. package/dist/components/separator.d.ts.map +1 -0
  88. package/dist/components/separator.js +9 -0
  89. package/dist/components/separator.js.map +1 -0
  90. package/dist/components/sheet.d.ts +46 -0
  91. package/dist/components/sheet.d.ts.map +1 -0
  92. package/dist/components/sheet.js +58 -0
  93. package/dist/components/sheet.js.map +1 -0
  94. package/dist/components/skeleton.d.ts +3 -0
  95. package/dist/components/skeleton.d.ts.map +1 -0
  96. package/dist/components/skeleton.js +7 -0
  97. package/dist/components/skeleton.js.map +1 -0
  98. package/dist/components/sonner.d.ts +29 -0
  99. package/dist/components/sonner.d.ts.map +1 -0
  100. package/dist/components/sonner.js +28 -0
  101. package/dist/components/sonner.js.map +1 -0
  102. package/dist/components/switch.d.ts +20 -0
  103. package/dist/components/switch.d.ts.map +1 -0
  104. package/dist/components/switch.js +15 -0
  105. package/dist/components/switch.js.map +1 -0
  106. package/dist/components/table.d.ts +11 -0
  107. package/dist/components/table.d.ts.map +1 -0
  108. package/dist/components/table.js +28 -0
  109. package/dist/components/table.js.map +1 -0
  110. package/dist/components/textarea.d.ts +4 -0
  111. package/dist/components/textarea.d.ts.map +1 -0
  112. package/dist/components/textarea.js +7 -0
  113. package/dist/components/textarea.js.map +1 -0
  114. package/dist/components/toggle-group.d.ts +11 -0
  115. package/dist/components/toggle-group.d.ts.map +1 -0
  116. package/dist/components/toggle-group.js +24 -0
  117. package/dist/components/toggle-group.js.map +1 -0
  118. package/dist/components/toggle.d.ts +15 -0
  119. package/dist/components/toggle.d.ts.map +1 -0
  120. package/dist/components/toggle.js +30 -0
  121. package/dist/components/toggle.js.map +1 -0
  122. package/dist/components/tooltip.d.ts +8 -0
  123. package/dist/components/tooltip.d.ts.map +1 -0
  124. package/dist/components/tooltip.js +17 -0
  125. package/dist/components/tooltip.js.map +1 -0
  126. package/dist/haptics.d.ts +38 -0
  127. package/dist/haptics.d.ts.map +1 -0
  128. package/dist/haptics.js +64 -0
  129. package/dist/haptics.js.map +1 -0
  130. package/dist/hooks/useClickOpenDisclosure.d.ts +19 -0
  131. package/dist/hooks/useClickOpenDisclosure.d.ts.map +1 -0
  132. package/dist/hooks/useClickOpenDisclosure.js +77 -0
  133. package/dist/hooks/useClickOpenDisclosure.js.map +1 -0
  134. package/dist/index.d.ts +56 -0
  135. package/dist/index.d.ts.map +1 -0
  136. package/dist/index.js +45 -0
  137. package/dist/index.js.map +1 -0
  138. package/dist/lib/utils.d.ts +7 -0
  139. package/dist/lib/utils.d.ts.map +1 -0
  140. package/dist/lib/utils.js +15 -0
  141. package/dist/lib/utils.js.map +1 -0
  142. package/dist/styles.css +157 -0
  143. package/package.json +56 -3
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from '../lib/utils.js';
3
+ import { Card } from './card.js';
4
+ function EmptyState({ icon: Icon, title, description, action, className }) {
5
+ return (_jsxs(Card, { "data-slot": "empty-state", variant: "raised", className: cn('items-center p-6 text-center', className), children: [Icon ? (_jsx("div", { className: "flex h-12 w-12 items-center justify-center rounded-xl bg-accent-bg text-primary ring-1 ring-accent-border", children: _jsx(Icon, { className: "h-6 w-6", "aria-hidden": true }) })) : null, _jsxs("div", { className: "space-y-1", children: [_jsx("h2", { className: "text-title font-semibold", children: title }), description ? (_jsx("p", { className: "mx-auto max-w-md text-sm leading-relaxed text-muted-foreground", children: description })) : null] }), action ? _jsx("div", { className: "mt-2", children: action }) : null] }));
6
+ }
7
+ export { EmptyState };
8
+ //# sourceMappingURL=empty-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty-state.js","sourceRoot":"","sources":["../../src/components/empty-state.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAkBjC,SAAS,UAAU,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAmB;IACxF,OAAO,CACL,MAAC,IAAI,iBACO,aAAa,EACvB,OAAO,EAAC,QAAQ,EAChB,SAAS,EAAE,EAAE,CAAC,8BAA8B,EAAE,SAAS,CAAC,aAEvD,IAAI,CAAC,CAAC,CAAC,CACN,cAAK,SAAS,EAAC,2GAA2G,YACxH,KAAC,IAAI,IAAC,SAAS,EAAC,SAAS,wBAAe,GACpC,CACP,CAAC,CAAC,CAAC,IAAI,EACR,eAAK,SAAS,EAAC,WAAW,aACxB,aAAI,SAAS,EAAC,0BAA0B,YAAE,KAAK,GAAM,EACpD,WAAW,CAAC,CAAC,CAAC,CACb,YAAG,SAAS,EAAC,gEAAgE,YAC1E,WAAW,GACV,CACL,CAAC,CAAC,CAAC,IAAI,IACJ,EACL,MAAM,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,MAAM,YAAE,MAAM,GAAO,CAAC,CAAC,CAAC,IAAI,IAChD,CACR,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -0,0 +1,39 @@
1
+ import type { ErrorInfo, ReactNode } from 'react';
2
+ import { Component } from 'react';
3
+ /**
4
+ * ErrorBoundary (DESIGN.md §3.6) — Tabbie's `shared/ErrorBoundary.tsx`
5
+ * with its app coupling removed: Tabbie read its env config for the
6
+ * dev-details toggle and hard-coded its copy; here the copy is props
7
+ * (with Tabbie's English strings as documented defaults), the details
8
+ * toggle is the app's `showDetails`, and reporting goes through
9
+ * `onError` instead of console-only.
10
+ */
11
+ export interface ErrorBoundaryProps {
12
+ children: ReactNode;
13
+ /** Full fallback override, as in Tabbie. */
14
+ fallback?: ReactNode;
15
+ title?: string;
16
+ description?: string;
17
+ homeLabel?: string;
18
+ refreshLabel?: string;
19
+ onHome?: () => void;
20
+ onRefresh?: () => void;
21
+ /** Show the error message + stack (the app decides — its env check). */
22
+ showDetails?: boolean;
23
+ onError?: (error: Error, info: ErrorInfo) => void;
24
+ }
25
+ interface ErrorBoundaryState {
26
+ hasError: boolean;
27
+ error: Error | null;
28
+ }
29
+ declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
30
+ state: ErrorBoundaryState;
31
+ static getDerivedStateFromError(error: Error): ErrorBoundaryState;
32
+ componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
33
+ handleReload: () => void;
34
+ handleGoHome: () => void;
35
+ render(): ReactNode;
36
+ }
37
+ export { ErrorBoundary };
38
+ export default ErrorBoundary;
39
+ //# sourceMappingURL=error-boundary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-boundary.d.ts","sourceRoot":"","sources":["../../src/components/error-boundary.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,SAAS,CAAC;IACpB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,wEAAwE;IACxE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;CACnD;AAED,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB;AAED,cAAM,aAAc,SAAQ,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAClE,KAAK,EAAE,kBAAkB,CAGhC;IAEF,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG,kBAAkB,CAEhE;IAEQ,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,GAAG,IAAI,CAMnE;IAED,YAAY,QAAO,IAAI,CAMrB;IAEF,YAAY,QAAO,IAAI,CAMrB;IAEO,MAAM,IAAI,SAAS,CA+D3B;CACF;AAED,OAAO,EAAE,aAAa,EAAE,CAAC;eACV,aAAa"}
@@ -0,0 +1,57 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { TriangleAlert } from 'lucide-react';
3
+ import { Component } from 'react';
4
+ import { Button } from './button.js';
5
+ import { Card } from './card.js';
6
+ class ErrorBoundary extends Component {
7
+ state = {
8
+ hasError: false,
9
+ error: null,
10
+ };
11
+ static getDerivedStateFromError(error) {
12
+ return { hasError: true, error };
13
+ }
14
+ componentDidCatch(error, errorInfo) {
15
+ if (this.props.onError) {
16
+ this.props.onError(error, errorInfo);
17
+ }
18
+ else {
19
+ console.error('Unhandled application error:', error, errorInfo);
20
+ }
21
+ }
22
+ handleReload = () => {
23
+ if (this.props.onRefresh) {
24
+ this.props.onRefresh();
25
+ }
26
+ else {
27
+ window.location.reload();
28
+ }
29
+ };
30
+ handleGoHome = () => {
31
+ if (this.props.onHome) {
32
+ this.props.onHome();
33
+ }
34
+ else {
35
+ window.location.href = '/';
36
+ }
37
+ };
38
+ render() {
39
+ const { fallback, title = 'Something went wrong', description = 'An unexpected error occurred while loading this page. You can try refreshing or returning to the home screen.', homeLabel = 'Go to Home', refreshLabel = 'Refresh page', showDetails = false, } = this.props;
40
+ if (this.state.hasError) {
41
+ if (fallback) {
42
+ return fallback;
43
+ }
44
+ const errorMessage = this.state.error?.message || 'Unknown error';
45
+ const errorStack = this.state.error?.stack;
46
+ return (_jsx("main", { className: "flex min-h-screen flex-col items-center justify-center gap-6 p-6 text-center", children: _jsxs(Card, { variant: "glass",
47
+ // role="alert" lives on the card, not <main> — axe's
48
+ // aria-allowed-role rejects alert on the main landmark
49
+ // (Tabbie's source put it on <main>; fixed here).
50
+ role: "alert", className: "w-full max-w-md items-center gap-4 p-8 shadow-xl", children: [_jsx("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-danger-bg text-danger-foreground", children: _jsx(TriangleAlert, { className: "h-6 w-6", "aria-hidden": true }) }), _jsx("h1", { className: "text-xl font-bold", children: title }), _jsx("p", { className: "text-sm text-muted-foreground", children: description }), showDetails && (_jsxs("details", { className: "mt-2 w-full text-left", children: [_jsx("summary", { className: "cursor-pointer text-xs text-danger-foreground hover:underline", children: "Error details" }), _jsxs("pre", { className: "mt-2 max-h-40 overflow-auto rounded-lg bg-background-secondary p-2 text-xs text-danger-foreground", children: [errorMessage, errorStack ? `\n${errorStack}` : ''] })] })), _jsxs("div", { className: "mt-2 flex w-full flex-col gap-2 sm:flex-row", children: [_jsx(Button, { type: "button", variant: "outline", className: "flex-1", onClick: this.handleGoHome, children: homeLabel }), _jsx(Button, { type: "button", className: "flex-1", onClick: this.handleReload, children: refreshLabel })] })] }) }));
51
+ }
52
+ return this.props.children;
53
+ }
54
+ }
55
+ export { ErrorBoundary };
56
+ export default ErrorBoundary;
57
+ //# sourceMappingURL=error-boundary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-boundary.js","sourceRoot":"","sources":["../../src/components/error-boundary.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AA8BjC,MAAM,aAAc,SAAQ,SAAiD;IAClE,KAAK,GAAuB;QACnC,QAAQ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"}
@@ -0,0 +1,78 @@
1
+ import * as React from 'react';
2
+ import { Input } from './input.js';
3
+ import { Textarea } from './textarea.js';
4
+ /**
5
+ * The FormField family (DESIGN.md §3.4) — absorbs Wedding Ops' forms.tsx
6
+ * (the richest source), CommonBoard's inputClass/labelClass, and
7
+ * RentProof's Field. The three apps' input recipes (three different focus
8
+ * treatments) converge on the primitives: border-input + a visible ring
9
+ * on focus-visible, everywhere, no exceptions.
10
+ *
11
+ * `Field` does the aria wiring none of the three sources does: label ↔
12
+ * control id, hint/error via aria-describedby, aria-invalid on error.
13
+ * (P3 — a Field `warning` state — is parked past v1 by decision.)
14
+ */
15
+ export interface FieldProps {
16
+ label: string;
17
+ /** Control id; auto-generated when omitted. */
18
+ htmlFor?: string;
19
+ /** Helper text under the control. Replaced visually by `error`. */
20
+ hint?: string;
21
+ /** Error text: replaces the hint, sets aria-invalid on the control,
22
+ * and renders with role="alert". */
23
+ error?: string;
24
+ required?: boolean;
25
+ className?: string;
26
+ /** Exactly one control (Input / Select / Textarea / Checkbox / Switch). */
27
+ children: React.ReactNode;
28
+ }
29
+ declare function Field({ label, htmlFor, hint, error, required, className, children }: FieldProps): React.JSX.Element;
30
+ type FieldOwnProps = Pick<FieldProps, 'label' | 'hint' | 'error' | 'required'>;
31
+ export type TextFieldProps = FieldOwnProps & React.ComponentProps<typeof Input>;
32
+ declare function TextField({ label, hint, error, required, id, ...props }: TextFieldProps): React.JSX.Element;
33
+ export type TextAreaFieldProps = FieldOwnProps & React.ComponentProps<typeof Textarea>;
34
+ declare function TextAreaField({ label, hint, error, required, id, ...props }: TextAreaFieldProps): React.JSX.Element;
35
+ /**
36
+ * Native-select field (Wedding Ops' SelectField, ported as-is in kind):
37
+ * form contexts get the platform select, styled to the Input primitive's
38
+ * recipe. The Radix Select primitive is the rich-dropdown counterpart for
39
+ * non-form surfaces.
40
+ */
41
+ export type SelectFieldProps = FieldOwnProps & React.SelectHTMLAttributes<HTMLSelectElement> & {
42
+ children: React.ReactNode;
43
+ };
44
+ declare function SelectField({ label, hint, error, required, id, className, children, ...props }: SelectFieldProps): React.JSX.Element;
45
+ export interface CheckboxFieldProps {
46
+ label: string;
47
+ hint?: string;
48
+ error?: string;
49
+ checked?: boolean;
50
+ onCheckedChange?: (checked: boolean) => void;
51
+ disabled?: boolean;
52
+ id?: string;
53
+ className?: string;
54
+ }
55
+ /** 48px row; the row is the tap target (solves Checkbox's small hit area). */
56
+ declare function CheckboxField({ label, hint, error, checked, onCheckedChange, disabled, id, className, }: CheckboxFieldProps): React.JSX.Element;
57
+ /** Form-level error (Wedding Ops' FormError), rebuilt on Alert tone=danger. */
58
+ declare function FormError({ message }: {
59
+ message: string | null;
60
+ }): React.JSX.Element | null;
61
+ /** Card + heading + spaced stack (Wedding Ops' FormPanel). */
62
+ declare function FormPanel({ title, children, className, }: {
63
+ title: string;
64
+ children: React.ReactNode;
65
+ className?: string;
66
+ }): React.JSX.Element;
67
+ export interface FormActionsProps {
68
+ saving: boolean;
69
+ onCancel: () => void;
70
+ saveLabel: string;
71
+ cancelLabel: string;
72
+ /** Shown while saving; falls back to saveLabel. */
73
+ savingLabel?: string;
74
+ className?: string;
75
+ }
76
+ declare function FormActions({ saving, onCancel, saveLabel, cancelLabel, savingLabel, className, }: FormActionsProps): React.JSX.Element;
77
+ export { CheckboxField, Field, FormActions, FormError, FormPanel, SelectField, TextAreaField, TextField, };
78
+ //# sourceMappingURL=form-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-field.d.ts","sourceRoot":"","sources":["../../src/components/form-field.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC;;;;;;;;;;GAUG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,OAAO,CAA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AO,EACL,aAAa,EACb,KAAK,EACL,WAAW,EACX,SAAS,EACT,SAAS,EACT,WAAW,EACX,aAAa,EACb,SAAS,GACV,CAAC"}
@@ -0,0 +1,56 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { cn } from '../lib/utils.js';
4
+ import { Alert } from './alert.js';
5
+ import { Button } from './button.js';
6
+ import { Card, CardContent, CardHeader } from './card.js';
7
+ import { Checkbox } from './checkbox.js';
8
+ import { Input } from './input.js';
9
+ import { Label } from './label.js';
10
+ import { Textarea } from './textarea.js';
11
+ function Field({ label, htmlFor, hint, error, required, className, children }) {
12
+ const generatedId = React.useId();
13
+ const controlId = htmlFor ?? generatedId;
14
+ const hintId = hint && !error ? `${controlId}-hint` : undefined;
15
+ const errorId = error ? `${controlId}-error` : undefined;
16
+ const describedBy = [hintId, errorId].filter(Boolean).join(' ') || undefined;
17
+ const child = React.Children.only(children);
18
+ const enhanced = React.isValidElement(child)
19
+ ? React.cloneElement(child, {
20
+ id: controlId,
21
+ 'aria-describedby': describedBy,
22
+ ...(error ? { 'aria-invalid': true } : {}),
23
+ })
24
+ : child;
25
+ return (_jsxs("div", { "data-slot": "field", className: cn('flex flex-col gap-1.5', className), children: [_jsxs(Label, { htmlFor: controlId, children: [label, required ? (_jsx("span", { "aria-hidden": true, className: "text-destructive", children: "*" })) : null] }), enhanced, error ? (_jsx("p", { id: errorId, role: "alert", className: "text-sm text-destructive", children: error })) : hint ? (_jsx("p", { id: hintId, className: "text-sm text-muted-foreground", children: hint })) : null] }));
26
+ }
27
+ function TextField({ label, hint, error, required, id, ...props }) {
28
+ return (_jsx(Field, { label: label, hint: hint, error: error, required: required, htmlFor: id, children: _jsx(Input, { id: id, ...props }) }));
29
+ }
30
+ function TextAreaField({ label, hint, error, required, id, ...props }) {
31
+ return (_jsx(Field, { label: label, hint: hint, error: error, required: required, htmlFor: id, children: _jsx(Textarea, { id: id, ...props }) }));
32
+ }
33
+ function SelectField({ label, hint, error, required, id, className, children, ...props }) {
34
+ return (_jsx(Field, { label: label, hint: hint, error: error, required: required, htmlFor: id, children: _jsx("select", { id: id, "data-slot": "select-field", className: cn('min-h-12 w-full rounded-lg border border-input bg-transparent px-3 text-base outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:bg-input/30', className), ...props, children: children }) }));
35
+ }
36
+ /** 48px row; the row is the tap target (solves Checkbox's small hit area). */
37
+ function CheckboxField({ label, hint, error, checked, onCheckedChange, disabled, id, className, }) {
38
+ const generatedId = React.useId();
39
+ const controlId = id ?? generatedId;
40
+ return (_jsxs("div", { "data-slot": "checkbox-field", className: className, children: [_jsxs("label", { htmlFor: controlId, className: cn('flex min-h-12 cursor-pointer items-center gap-3', disabled && 'cursor-not-allowed opacity-50'), children: [_jsx(Checkbox, { id: controlId, checked: checked, onCheckedChange: onCheckedChange, disabled: disabled, "aria-invalid": error ? true : undefined }), _jsxs("span", { children: [_jsx("span", { className: "block text-sm font-medium", children: label }), hint ? _jsx("span", { className: "block text-xs text-muted-foreground", children: hint }) : null] })] }), error ? (_jsx("p", { role: "alert", className: "mt-1 text-sm text-destructive", children: error })) : null] }));
41
+ }
42
+ /** Form-level error (Wedding Ops' FormError), rebuilt on Alert tone=danger. */
43
+ function FormError({ message }) {
44
+ if (!message)
45
+ return null;
46
+ return (_jsx(Alert, { tone: "danger", "data-slot": "form-error", children: message }));
47
+ }
48
+ /** Card + heading + spaced stack (Wedding Ops' FormPanel). */
49
+ function FormPanel({ title, children, className, }) {
50
+ return (_jsxs(Card, { "data-slot": "form-panel", className: className, children: [_jsx(CardHeader, { children: _jsx("h2", { className: "text-title font-semibold", children: title }) }), _jsx(CardContent, { className: "flex flex-col gap-3", children: children })] }));
51
+ }
52
+ function FormActions({ saving, onCancel, saveLabel, cancelLabel, savingLabel, className, }) {
53
+ return (_jsxs("div", { "data-slot": "form-actions", className: cn('flex gap-3 pt-1', className), children: [_jsx(Button, { type: "submit", disabled: saving, "aria-busy": saving, className: "flex-1", children: saving ? (savingLabel ?? saveLabel) : saveLabel }), _jsx(Button, { type: "button", variant: "outline", onClick: onCancel, children: cancelLabel })] }));
54
+ }
55
+ export { CheckboxField, Field, FormActions, FormError, FormPanel, SelectField, TextAreaField, TextField, };
56
+ //# sourceMappingURL=form-field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-field.js","sourceRoot":"","sources":["../../src/components/form-field.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AA4BzC,SAAS,KAAK,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAc;IACvF,MAAM,WAAW,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC;IAClC,MAAM,SAAS,GAAG,OAAO,IAAI,WAAW,CAAC;IACzC,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,SAAS,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;IAChE,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,SAAS,QAAQ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SAAS,WAAW,CAAC,EACnB,MAAM,EACN,QAAQ,EACR,SAAS,EACT,WAAW,EACX,WAAW,EACX,SAAS,GACQ;IACjB,OAAO,CACL,4BAAe,cAAc,EAAC,SAAS,EAAE,EAAE,CAAC,iBAAiB,EAAE,SAAS,CAAC,aACvE,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,QAAQ,EAAE,MAAM,eAAa,MAAM,EAAE,SAAS,EAAC,QAAQ,YAC1E,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,GACzC,EACT,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAC,SAAS,EAAC,OAAO,EAAE,QAAQ,YACtD,WAAW,GACL,IACL,CACP,CAAC;AACJ,CAAC;AAED,OAAO,EACL,aAAa,EACb,KAAK,EACL,WAAW,EACX,SAAS,EACT,SAAS,EACT,WAAW,EACX,aAAa,EACb,SAAS,GACV,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type * as React from 'react';
2
+ /**
3
+ * Height reconciled to the standard (DESIGN.md §2.2): Tabbie's h-8 (32px)
4
+ * becomes min-h-12 (48px) with text-base (16px, no iOS focus zoom) — the
5
+ * fleet's recipe. One height in v1; there is no size prop.
6
+ */
7
+ declare function Input({ className, type, ...props }: React.ComponentProps<'input'>): React.JSX.Element;
8
+ export { Input };
9
+ //# 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,KAAK,MAAM,OAAO,CAAC;AAIpC;;;;GAIG;AACH,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBAY1E;AAED,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from '../lib/utils.js';
3
+ /**
4
+ * Height reconciled to the standard (DESIGN.md §2.2): Tabbie's h-8 (32px)
5
+ * becomes min-h-12 (48px) with text-base (16px, no iOS focus zoom) — the
6
+ * fleet's recipe. One height in v1; there is no size prop.
7
+ */
8
+ function Input({ className, type, ...props }) {
9
+ return (_jsx("input", { type: type, "data-slot": "input", className: cn('min-h-12 w-full min-w-0 rounded-lg border border-input bg-transparent px-3 py-2 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40', className), ...props }));
10
+ }
11
+ export { Input };
12
+ //# sourceMappingURL=input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.js","sourceRoot":"","sources":["../../src/components/input.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC;;;;GAIG;AACH,SAAS,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAiC;IACzE,OAAO,CACL,gBACE,IAAI,EAAE,IAAI,eACA,OAAO,EACjB,SAAS,EAAE,EAAE,CACX,qoBAAqoB,EACroB,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { Label as LabelPrimitive } from 'radix-ui';
2
+ import type * as React from 'react';
3
+ declare function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): React.JSX.Element;
4
+ export { Label };
5
+ //# sourceMappingURL=label.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../src/components/label.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,qBAWvF;AAED,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Label as LabelPrimitive } from 'radix-ui';
3
+ import { cn } from '../lib/utils.js';
4
+ function Label({ className, ...props }) {
5
+ return (_jsx(LabelPrimitive.Root, { "data-slot": "label", className: cn('flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50', className), ...props }));
6
+ }
7
+ export { Label };
8
+ //# sourceMappingURL=label.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label.js","sourceRoot":"","sources":["../../src/components/label.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,UAAU,CAAC;AAGnD,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,SAAS,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAoD;IACtF,OAAO,CACL,KAAC,cAAc,CAAC,IAAI,iBACR,OAAO,EACjB,SAAS,EAAE,EAAE,CACX,qNAAqN,EACrN,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type * as React from 'react';
2
+ /**
3
+ * PageHeader / SectionHeading (DESIGN.md §3.5) — absorbs CommonBoard's,
4
+ * the only fleet app that had them; Wedding Ops and RentProof hand-rolled
5
+ * headings per page. Type roles come from the tokens contract (`header`,
6
+ * `title`), replacing CommonBoard's arbitrary 22px/17px values.
7
+ */
8
+ export interface PageHeaderProps {
9
+ /** The page's single h1. */
10
+ title: string;
11
+ /** CommonBoard's `sub`, in the body-secondary role. */
12
+ description?: string;
13
+ /** Right-aligned action cluster (e.g. an Add button). */
14
+ actions?: React.ReactNode;
15
+ className?: string;
16
+ }
17
+ declare function PageHeader({ title, description, actions, className }: PageHeaderProps): React.JSX.Element;
18
+ declare function SectionHeading({ children, className, }: {
19
+ children: React.ReactNode;
20
+ className?: string;
21
+ }): React.JSX.Element;
22
+ export { PageHeader, SectionHeading };
23
+ //# sourceMappingURL=page-header.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-header.d.ts","sourceRoot":"","sources":["../../src/components/page-header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yDAAyD;IACzD,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,iBAAS,UAAU,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,eAAe,qBAiB9E;AAED,iBAAS,cAAc,CAAC,EACtB,QAAQ,EACR,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,qBASA;AAED,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from '../lib/utils.js';
3
+ function PageHeader({ title, description, actions, className }) {
4
+ return (_jsxs("div", { "data-slot": "page-header", className: cn('flex items-start justify-between gap-4', className), children: [_jsxs("div", { children: [_jsx("h1", { className: "text-header leading-tight font-bold tracking-tight", children: title }), description ? (_jsx("p", { className: "mt-1 text-body-secondary leading-relaxed text-foreground-secondary", children: description })) : null] }), actions ? _jsx("div", { className: "flex shrink-0 items-center gap-2", children: actions }) : null] }));
5
+ }
6
+ function SectionHeading({ children, className, }) {
7
+ return (_jsx("h2", { "data-slot": "section-heading", className: cn('text-title font-semibold tracking-tight', className), children: children }));
8
+ }
9
+ export { PageHeader, SectionHeading };
10
+ //# sourceMappingURL=page-header.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-header.js","sourceRoot":"","sources":["../../src/components/page-header.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAkBrC,SAAS,UAAU,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAmB;IAC7E,OAAO,CACL,4BACY,aAAa,EACvB,SAAS,EAAE,EAAE,CAAC,wCAAwC,EAAE,SAAS,CAAC,aAElE,0BACE,aAAI,SAAS,EAAC,oDAAoD,YAAE,KAAK,GAAM,EAC9E,WAAW,CAAC,CAAC,CAAC,CACb,YAAG,SAAS,EAAC,oEAAoE,YAC9E,WAAW,GACV,CACL,CAAC,CAAC,CAAC,IAAI,IACJ,EACL,OAAO,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,kCAAkC,YAAE,OAAO,GAAO,CAAC,CAAC,CAAC,IAAI,IAC/E,CACP,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAC,EACtB,QAAQ,EACR,SAAS,GAIV;IACC,OAAO,CACL,0BACY,iBAAiB,EAC3B,SAAS,EAAE,EAAE,CAAC,yCAAyC,EAAE,SAAS,CAAC,YAElE,QAAQ,GACN,CACN,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { Progress as ProgressPrimitive } from 'radix-ui';
2
+ import type * as React from 'react';
3
+ declare function Progress({ className, value, ...props }: React.ComponentProps<typeof ProgressPrimitive.Root>): React.JSX.Element;
4
+ export { Progress };
5
+ //# sourceMappingURL=progress.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/components/progress.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC,qBAqBrD;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,13 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Progress as ProgressPrimitive } from 'radix-ui';
4
+ import { cn } from '../lib/utils.js';
5
+ function Progress({ className, value, ...props }) {
6
+ return (_jsx(ProgressPrimitive.Root, { "data-slot": "progress",
7
+ // Forward `value` to the Root (Tabbie's source consumed it only for
8
+ // the indicator transform, leaving the progressbar without an
9
+ // accessible value — fixed here per the library's a11y standard).
10
+ value: value, className: cn('relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted', className), ...props, children: _jsx(ProgressPrimitive.Indicator, { "data-slot": "progress-indicator", className: "size-full flex-1 bg-primary transition-all", style: { transform: `translateX(-${100 - (value || 0)}%)` } }) }));
11
+ }
12
+ export { Progress };
13
+ //# sourceMappingURL=progress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"progress.js","sourceRoot":"","sources":["../../src/components/progress.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAGzD,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,SAAS,QAAQ,CAAC,EAChB,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EAC4C;IACpD,OAAO,CACL,KAAC,iBAAiB,CAAC,IAAI,iBACX,UAAU;QACpB,oEAAoE;QACpE,8DAA8D;QAC9D,kEAAkE;QAClE,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,EAAE,CACX,+EAA+E,EAC/E,SAAS,CACV,KACG,KAAK,YAET,KAAC,iBAAiB,CAAC,SAAS,iBAChB,oBAAoB,EAC9B,SAAS,EAAC,4CAA4C,EACtD,KAAK,EAAE,EAAE,SAAS,EAAE,eAAe,GAAG,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,EAAE,GAC3D,GACqB,CAC1B,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { RadioGroup as RadioGroupPrimitive } from 'radix-ui';
2
+ import type * as React from 'react';
3
+ declare function RadioGroup({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Root>): React.JSX.Element;
4
+ declare function RadioGroupItem({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Item>): React.JSX.Element;
5
+ export { RadioGroup, RadioGroupItem };
6
+ //# sourceMappingURL=radio-group.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../src/components/radio-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,qBAQvD;AAED,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,qBAkBvD;AAED,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { RadioGroup as RadioGroupPrimitive } from 'radix-ui';
3
+ import { cn } from '../lib/utils.js';
4
+ function RadioGroup({ className, ...props }) {
5
+ return (_jsx(RadioGroupPrimitive.Root, { "data-slot": "radio-group", className: cn('grid w-full gap-2', className), ...props }));
6
+ }
7
+ function RadioGroupItem({ className, ...props }) {
8
+ return (_jsx(RadioGroupPrimitive.Item, { "data-slot": "radio-group-item", className: cn('group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary', className), ...props, children: _jsx(RadioGroupPrimitive.Indicator, { "data-slot": "radio-group-indicator", className: "flex size-4 items-center justify-center", children: _jsx("span", { className: "absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground" }) }) }));
9
+ }
10
+ export { RadioGroup, RadioGroupItem };
11
+ //# sourceMappingURL=radio-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio-group.js","sourceRoot":"","sources":["../../src/components/radio-group.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAG7D,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,SAAS,UAAU,CAAC,EAClB,SAAS,EACT,GAAG,KAAK,EAC8C;IACtD,OAAO,CACL,KAAC,mBAAmB,CAAC,IAAI,iBACb,aAAa,EACvB,SAAS,EAAE,EAAE,CAAC,mBAAmB,EAAE,SAAS,CAAC,KACzC,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAC,EACtB,SAAS,EACT,GAAG,KAAK,EAC8C;IACtD,OAAO,CACL,KAAC,mBAAmB,CAAC,IAAI,iBACb,kBAAkB,EAC5B,SAAS,EAAE,EAAE,CACX,2yBAA2yB,EAC3yB,SAAS,CACV,KACG,KAAK,YAET,KAAC,mBAAmB,CAAC,SAAS,iBAClB,uBAAuB,EACjC,SAAS,EAAC,yCAAyC,YAEnD,eAAM,SAAS,EAAC,uGAAuG,GAAG,GAC5F,GACP,CAC5B,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { ScrollArea as ScrollAreaPrimitive } from 'radix-ui';
2
+ import type * as React from 'react';
3
+ declare function ScrollArea({ className, children, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>): React.JSX.Element;
4
+ declare function ScrollBar({ className, orientation, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): React.JSX.Element;
5
+ export { ScrollArea, ScrollBar };
6
+ //# sourceMappingURL=scroll-area.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scroll-area.d.ts","sourceRoot":"","sources":["../../src/components/scroll-area.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,qBAiBvD;AAED,iBAAS,SAAS,CAAC,EACjB,SAAS,EACT,WAAwB,EACxB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,mBAAmB,CAAC,qBAkBtE;AAED,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ScrollArea as ScrollAreaPrimitive } from 'radix-ui';
3
+ import { cn } from '../lib/utils.js';
4
+ function ScrollArea({ className, children, ...props }) {
5
+ return (_jsxs(ScrollAreaPrimitive.Root, { "data-slot": "scroll-area", className: cn('relative', className), ...props, children: [_jsx(ScrollAreaPrimitive.Viewport, { "data-slot": "scroll-area-viewport", className: "size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1", children: children }), _jsx(ScrollBar, {}), _jsx(ScrollAreaPrimitive.Corner, {})] }));
6
+ }
7
+ function ScrollBar({ className, orientation = 'vertical', ...props }) {
8
+ return (_jsx(ScrollAreaPrimitive.ScrollAreaScrollbar, { "data-slot": "scroll-area-scrollbar", "data-orientation": orientation, orientation: orientation, className: cn('flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent', className), ...props, children: _jsx(ScrollAreaPrimitive.ScrollAreaThumb, { "data-slot": "scroll-area-thumb", className: "relative flex-1 rounded-full bg-border" }) }));
9
+ }
10
+ export { ScrollArea, ScrollBar };
11
+ //# sourceMappingURL=scroll-area.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scroll-area.js","sourceRoot":"","sources":["../../src/components/scroll-area.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAG7D,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,SAAS,UAAU,CAAC,EAClB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EAC8C;IACtD,OAAO,CACL,MAAC,mBAAmB,CAAC,IAAI,iBACb,aAAa,EACvB,SAAS,EAAE,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,KAChC,KAAK,aAET,KAAC,mBAAmB,CAAC,QAAQ,iBACjB,sBAAsB,EAChC,SAAS,EAAC,oJAAoJ,YAE7J,QAAQ,GACoB,EAC/B,KAAC,SAAS,KAAG,EACb,KAAC,mBAAmB,CAAC,MAAM,KAAG,IACL,CAC5B,CAAC;AACJ,CAAC;AAED,SAAS,SAAS,CAAC,EACjB,SAAS,EACT,WAAW,GAAG,UAAU,EACxB,GAAG,KAAK,EAC6D;IACrE,OAAO,CACL,KAAC,mBAAmB,CAAC,mBAAmB,iBAC5B,uBAAuB,sBACf,WAAW,EAC7B,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,EAAE,CACX,oQAAoQ,EACpQ,SAAS,CACV,KACG,KAAK,YAET,KAAC,mBAAmB,CAAC,eAAe,iBACxB,mBAAmB,EAC7B,SAAS,EAAC,wCAAwC,GAClD,GACsC,CAC3C,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { Select as SelectPrimitive } from 'radix-ui';
2
+ import type * as React from 'react';
3
+ declare function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>): React.JSX.Element;
4
+ declare function SelectGroup({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Group>): React.JSX.Element;
5
+ declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>): React.JSX.Element;
6
+ declare function SelectTrigger({ className, size, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
7
+ size?: 'sm' | 'default';
8
+ }): React.JSX.Element;
9
+ declare function SelectContent({ className, children, position, align, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>): React.JSX.Element;
10
+ declare function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>): React.JSX.Element;
11
+ declare function SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>): React.JSX.Element;
12
+ declare function SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>): React.JSX.Element;
13
+ declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): React.JSX.Element;
14
+ declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): React.JSX.Element;
15
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
16
+ //# sourceMappingURL=select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/components/select.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,iBAAS,MAAM,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,qBAE9E;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,qBAQ/F;AAED,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc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+1,44 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ /**
4
+ * Tabbie's Select with the 48px / 16px reconciliation (DESIGN.md §2.2):
5
+ * the default trigger is min-h-12 + text-base (Tabbie's h-8 + text-sm was
6
+ * an iOS-zoom hazard on a form control); `sm` is 36px, dense-only, same
7
+ * restriction as Button `sm`. Items are min-h-10 + text-base.
8
+ */
9
+ import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react';
10
+ import { Select as SelectPrimitive } from 'radix-ui';
11
+ import { cn } from '../lib/utils.js';
12
+ function Select({ ...props }) {
13
+ return _jsx(SelectPrimitive.Root, { "data-slot": "select", ...props });
14
+ }
15
+ function SelectGroup({ className, ...props }) {
16
+ return (_jsx(SelectPrimitive.Group, { "data-slot": "select-group", className: cn('scroll-my-1 p-1', className), ...props }));
17
+ }
18
+ function SelectValue({ ...props }) {
19
+ return _jsx(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
20
+ }
21
+ function SelectTrigger({ className, size = 'default', children, ...props }) {
22
+ return (_jsxs(SelectPrimitive.Trigger, { "data-slot": "select-trigger", "data-size": size, className: cn("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-3 text-base whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:min-h-12 data-[size=sm]:h-9 data-[size=sm]:text-sm data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" }) })] }));
23
+ }
24
+ function SelectContent({ className, children, position = 'item-aligned', align = 'center', ...props }) {
25
+ return (_jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, { "data-slot": "select-content", "data-align-trigger": position === 'item-aligned', className: cn('relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95', position === 'popper' &&
26
+ 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1', className), position: position, align: align, ...props, children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.Viewport, { "data-position": position, className: cn('data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)', position === 'popper' && ''), children: children }), _jsx(SelectScrollDownButton, {})] }) }));
27
+ }
28
+ function SelectLabel({ className, ...props }) {
29
+ return (_jsx(SelectPrimitive.Label, { "data-slot": "select-label", className: cn('px-1.5 py-1 text-xs text-muted-foreground', className), ...props }));
30
+ }
31
+ function SelectItem({ className, children, ...props }) {
32
+ return (_jsxs(SelectPrimitive.Item, { "data-slot": "select-item", className: cn("relative flex min-h-10 w-full cursor-default items-center gap-1.5 rounded-md py-2 pr-8 pl-2 text-base outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className), ...props, children: [_jsx("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center", children: _jsx(SelectPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "pointer-events-none" }) }) }), _jsx(SelectPrimitive.ItemText, { children: children })] }));
33
+ }
34
+ function SelectSeparator({ className, ...props }) {
35
+ return (_jsx(SelectPrimitive.Separator, { "data-slot": "select-separator", className: cn('pointer-events-none -mx-1 my-1 h-px bg-border', className), ...props }));
36
+ }
37
+ function SelectScrollUpButton({ className, ...props }) {
38
+ return (_jsx(SelectPrimitive.ScrollUpButton, { "data-slot": "select-scroll-up-button", className: cn("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: _jsx(ChevronUpIcon, {}) }));
39
+ }
40
+ function SelectScrollDownButton({ className, ...props }) {
41
+ return (_jsx(SelectPrimitive.ScrollDownButton, { "data-slot": "select-scroll-down-button", className: cn("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: _jsx(ChevronDownIcon, {}) }));
42
+ }
43
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
44
+ //# sourceMappingURL=select.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.js","sourceRoot":"","sources":["../../src/components/select.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb;;;;;GAKG;AACH,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,UAAU,CAAC;AAErD,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,SA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,CACV,KACG,KAAK,YAET,KAAC,aAAa,KAAG,GACc,CAClC,CAAC;AACJ,CAAC;AAED,SAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACsD;IAC9D,OAAO,CACL,KAAC,eAAe,CAAC,gBAAgB,iBACrB,2BAA2B,EACrC,SAAS,EAAE,EAAE,CACX,2GAA2G,EAC3G,SAAS,CACV,KACG,KAAK,YAET,KAAC,eAAe,KAAG,GACc,CACpC,CAAC;AACJ,CAAC;AAED,OAAO,EACL,MAAM,EACN,aAAa,EACb,WAAW,EACX,UAAU,EACV,WAAW,EACX,sBAAsB,EACtB,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,WAAW,GACZ,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { Separator as SeparatorPrimitive } from 'radix-ui';
2
+ import type * as React from 'react';
3
+ declare function Separator({ className, orientation, decorative, ...props }: React.ComponentProps<typeof SeparatorPrimitive.Root>): React.JSX.Element;
4
+ export { Separator };
5
+ //# sourceMappingURL=separator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"separator.d.ts","sourceRoot":"","sources":["../../src/components/separator.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,iBAAS,SAAS,CAAC,EACjB,SAAS,EACT,WAA0B,EAC1B,UAAiB,EACjB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,qBAatD;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -0,0 +1,9 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Separator as SeparatorPrimitive } from 'radix-ui';
4
+ import { cn } from '../lib/utils.js';
5
+ function Separator({ className, orientation = 'horizontal', decorative = true, ...props }) {
6
+ return (_jsx(SeparatorPrimitive.Root, { "data-slot": "separator", decorative: decorative, orientation: orientation, className: cn('shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch', className), ...props }));
7
+ }
8
+ export { Separator };
9
+ //# sourceMappingURL=separator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"separator.js","sourceRoot":"","sources":["../../src/components/separator.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAG3D,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,SAAS,SAAS,CAAC,EACjB,SAAS,EACT,WAAW,GAAG,YAAY,EAC1B,UAAU,GAAG,IAAI,EACjB,GAAG,KAAK,EAC6C;IACrD,OAAO,CACL,KAAC,kBAAkB,CAAC,IAAI,iBACZ,WAAW,EACrB,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,EAAE,CACX,8GAA8G,EAC9G,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}