@you-agent-factory/components 0.0.0 → 0.0.2

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 (182) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +38 -7
  3. package/dist/category-paths.d.ts +3 -0
  4. package/dist/charts/chart-state-panel.d.ts +11 -0
  5. package/dist/charts/chart.d.ts +35 -0
  6. package/dist/charts/index.d.ts +5 -0
  7. package/dist/charts/index.js +287 -0
  8. package/dist/chunks/action-row.js +39 -0
  9. package/dist/chunks/alert-panel.js +182 -0
  10. package/dist/chunks/button.js +193 -0
  11. package/dist/chunks/cn.js +6 -0
  12. package/dist/chunks/factory-emulator-controls.js +123 -0
  13. package/dist/chunks/package-form-field.js +546 -0
  14. package/dist/chunks/scroll-area.js +261 -0
  15. package/dist/chunks/surface-panel.js +73 -0
  16. package/dist/chunks/table-layout.js +292 -0
  17. package/dist/chunks/typography-roles.js +26 -0
  18. package/dist/chunks/typography.js +129 -0
  19. package/dist/chunks/widget-frame.js +344 -0
  20. package/dist/data-display/code-panel.d.ts +12 -0
  21. package/dist/data-display/data-table.d.ts +27 -0
  22. package/dist/data-display/description-list.d.ts +4 -0
  23. package/{src/data-display/index.ts → dist/data-display/index.d.ts} +4 -26
  24. package/dist/data-display/index.js +20 -0
  25. package/dist/data-display/table-layout.d.ts +8 -0
  26. package/dist/data-display/table.d.ts +14 -0
  27. package/dist/factory-emulator/factory-emulator-controls.d.ts +23 -0
  28. package/dist/factory-emulator/index.d.ts +6 -0
  29. package/dist/factory-emulator/index.js +6 -0
  30. package/dist/feedback/alert-panel-semantics.d.ts +11 -0
  31. package/dist/feedback/alert-panel.d.ts +29 -0
  32. package/dist/feedback/index.d.ts +6 -0
  33. package/dist/feedback/index.js +10 -0
  34. package/dist/feedback/skeleton.d.ts +2 -0
  35. package/dist/forms/index.d.ts +19 -0
  36. package/dist/forms/index.js +37 -0
  37. package/dist/forms/package-checkbox.d.ts +3 -0
  38. package/dist/forms/package-enum-select.d.ts +42 -0
  39. package/dist/forms/package-file-input.d.ts +3 -0
  40. package/dist/forms/package-form-field.d.ts +49 -0
  41. package/dist/forms/package-input.d.ts +6 -0
  42. package/dist/forms/package-native-select.d.ts +3 -0
  43. package/dist/forms/package-select.d.ts +32 -0
  44. package/dist/forms/package-textarea.d.ts +10 -0
  45. package/dist/forms/select-icons.d.ts +3 -0
  46. package/dist/graphs/graph-edge-path.d.ts +18 -0
  47. package/dist/graphs/graph-edge.d.ts +15 -0
  48. package/dist/graphs/graph-node-button.d.ts +11 -0
  49. package/dist/graphs/graph-node-handle-badge.d.ts +5 -0
  50. package/dist/graphs/graph-node-handle.d.ts +18 -0
  51. package/dist/graphs/graph-node-shell.d.ts +13 -0
  52. package/dist/graphs/graph-node-state-indicator.d.ts +6 -0
  53. package/dist/graphs/graph-node-state.d.ts +23 -0
  54. package/dist/graphs/graph-viewport-surface.d.ts +5 -0
  55. package/dist/graphs/index.d.ts +13 -0
  56. package/dist/graphs/index.js +614 -0
  57. package/{src/icons/index.ts → dist/icons/index.d.ts} +1 -2
  58. package/dist/icons/index.js +4 -0
  59. package/dist/index.d.ts +26 -0
  60. package/dist/index.js +145 -0
  61. package/dist/layout/action-row.d.ts +8 -0
  62. package/{src/layout/index.ts → dist/layout/index.d.ts} +1 -3
  63. package/dist/layout/index.js +9 -0
  64. package/dist/layout/surface-panel.d.ts +15 -0
  65. package/{src/navigation/index.ts → dist/navigation/index.d.ts} +1 -2
  66. package/dist/navigation/index.js +4 -0
  67. package/dist/overlays/collapsible.d.ts +5 -0
  68. package/dist/overlays/dialog.d.ts +16 -0
  69. package/dist/overlays/index.d.ts +10 -0
  70. package/dist/overlays/index.js +27 -0
  71. package/dist/overlays/overlay-layout.d.ts +6 -0
  72. package/dist/overlays/popover.d.ts +6 -0
  73. package/dist/overlays/scroll-area.d.ts +9 -0
  74. package/dist/primitives/button-link.d.ts +5 -0
  75. package/dist/primitives/button.d.ts +9 -0
  76. package/dist/primitives/icon-button-shell.d.ts +10 -0
  77. package/{src/primitives/index.ts → dist/primitives/index.d.ts} +2 -19
  78. package/dist/primitives/index.js +49 -0
  79. package/dist/primitives/package-text.d.ts +6 -0
  80. package/dist/primitives/typography-roles.d.ts +12 -0
  81. package/dist/primitives/typography.d.ts +36 -0
  82. package/dist/recipes/index.d.ts +14 -0
  83. package/dist/recipes/index.js +32 -0
  84. package/dist/recipes/widget-frame-content.d.ts +24 -0
  85. package/dist/recipes/widget-frame-disclosure.d.ts +33 -0
  86. package/dist/recipes/widget-frame-layout.d.ts +12 -0
  87. package/dist/recipes/widget-frame-skeleton.d.ts +2 -0
  88. package/dist/recipes/widget-frame-states.d.ts +15 -0
  89. package/dist/recipes/widget-frame-typography.d.ts +10 -0
  90. package/dist/recipes/widget-frame.d.ts +12 -0
  91. package/{src → dist}/styles.css +36 -0
  92. package/dist/testing/index.d.ts +4 -0
  93. package/dist/testing/index.js +16 -0
  94. package/dist/testing/render.d.ts +5 -0
  95. package/{src/tokens/index.ts → dist/tokens/index.d.ts} +1 -2
  96. package/dist/tokens/index.js +4 -0
  97. package/dist/utilities/cn.d.ts +1 -0
  98. package/{src/utilities/index.ts → dist/utilities/index.d.ts} +1 -3
  99. package/dist/utilities/index.js +6 -0
  100. package/package.json +65 -64
  101. package/docs/README.md +0 -83
  102. package/docs/button.md +0 -119
  103. package/docs/charts.md +0 -325
  104. package/docs/data-display-code-panel.md +0 -120
  105. package/docs/feedback-alert-panel.md +0 -117
  106. package/docs/feedback-skeleton.md +0 -54
  107. package/docs/forms-form-field.md +0 -490
  108. package/docs/forms-input-primitives.md +0 -311
  109. package/docs/forms-select-primitives.md +0 -362
  110. package/docs/graphs.md +0 -250
  111. package/docs/layout-display-primitives.md +0 -211
  112. package/docs/overlays.md +0 -414
  113. package/docs/table-data-table.md +0 -331
  114. package/docs/typography-roles.md +0 -182
  115. package/docs/widget-frame-recipes.md +0 -273
  116. package/src/category-paths.ts +0 -20
  117. package/src/charts/chart-state-panel.tsx +0 -103
  118. package/src/charts/chart.tsx +0 -287
  119. package/src/charts/index.ts +0 -21
  120. package/src/data-display/code-panel.tsx +0 -67
  121. package/src/data-display/data-table.tsx +0 -180
  122. package/src/data-display/description-list.tsx +0 -24
  123. package/src/data-display/table-layout.ts +0 -12
  124. package/src/data-display/table.tsx +0 -131
  125. package/src/feedback/alert-panel-semantics.ts +0 -75
  126. package/src/feedback/alert-panel.tsx +0 -187
  127. package/src/feedback/index.ts +0 -21
  128. package/src/feedback/skeleton.tsx +0 -16
  129. package/src/forms/index.ts +0 -73
  130. package/src/forms/package-checkbox.tsx +0 -50
  131. package/src/forms/package-enum-select.tsx +0 -185
  132. package/src/forms/package-file-input.tsx +0 -25
  133. package/src/forms/package-form-field.tsx +0 -202
  134. package/src/forms/package-input.tsx +0 -25
  135. package/src/forms/package-native-select.tsx +0 -25
  136. package/src/forms/package-select.tsx +0 -209
  137. package/src/forms/package-textarea.tsx +0 -35
  138. package/src/forms/select-icons.tsx +0 -35
  139. package/src/graphs/graph-edge-path.ts +0 -241
  140. package/src/graphs/graph-edge.tsx +0 -130
  141. package/src/graphs/graph-interactive-example.tsx +0 -187
  142. package/src/graphs/graph-node-button.tsx +0 -51
  143. package/src/graphs/graph-node-handle-badge.tsx +0 -108
  144. package/src/graphs/graph-node-handle.ts +0 -28
  145. package/src/graphs/graph-node-shell.tsx +0 -111
  146. package/src/graphs/graph-node-state-indicator.tsx +0 -47
  147. package/src/graphs/graph-node-state.ts +0 -111
  148. package/src/graphs/graph-viewport-surface.tsx +0 -27
  149. package/src/graphs/index.ts +0 -41
  150. package/src/index.ts +0 -209
  151. package/src/layout/action-row.tsx +0 -53
  152. package/src/layout/surface-panel.tsx +0 -91
  153. package/src/overlays/collapsible.tsx +0 -22
  154. package/src/overlays/dialog.tsx +0 -148
  155. package/src/overlays/index.ts +0 -31
  156. package/src/overlays/overlay-layout.ts +0 -9
  157. package/src/overlays/popover.tsx +0 -29
  158. package/src/overlays/scroll-area.tsx +0 -78
  159. package/src/primitives/button-link.tsx +0 -22
  160. package/src/primitives/button.tsx +0 -258
  161. package/src/primitives/icon-button-shell.tsx +0 -49
  162. package/src/primitives/package-text.tsx +0 -29
  163. package/src/primitives/typography-roles.ts +0 -12
  164. package/src/primitives/typography.tsx +0 -165
  165. package/src/recipes/index.ts +0 -61
  166. package/src/recipes/widget-frame-content.tsx +0 -114
  167. package/src/recipes/widget-frame-disclosure.tsx +0 -161
  168. package/src/recipes/widget-frame-layout.ts +0 -40
  169. package/src/recipes/widget-frame-skeleton.tsx +0 -16
  170. package/src/recipes/widget-frame-states.tsx +0 -99
  171. package/src/recipes/widget-frame-typography.ts +0 -19
  172. package/src/recipes/widget-frame.tsx +0 -84
  173. package/src/testing/index.ts +0 -13
  174. package/src/testing/render.tsx +0 -16
  175. package/src/utilities/cn.ts +0 -5
  176. /package/{src → dist}/styles/color-palette-presets.css +0 -0
  177. /package/{src → dist}/styles/color-role-tokens.css +0 -0
  178. /package/{src → dist}/styles/layout-role-tokens.css +0 -0
  179. /package/{src → dist}/styles/text-color-role-tokens.css +0 -0
  180. /package/{src → dist}/styles/typography-role-tokens.css +0 -0
  181. /package/{src → dist}/styles/typography-role-utilities.css +0 -0
  182. /package/{src → dist}/styles/typography-roles.css +0 -0
@@ -1,41 +0,0 @@
1
- /** Stable category path for `@you-agent-factory/components/graphs`. */
2
- export const COMPONENTS_CATEGORY = "graphs" as const;
3
-
4
- export type ComponentsCategory = typeof COMPONENTS_CATEGORY;
5
-
6
- export {
7
- GRAPH_NODE_BUTTON_BASE_CLASS,
8
- GraphNodeButton,
9
- type GraphNodeButtonProps,
10
- } from "./graph-node-button";
11
- export {
12
- GraphViewportSurface,
13
- type GraphViewportSurfaceProps,
14
- } from "./graph-viewport-surface";
15
- export type { GraphNodeHandle, GraphNodeHandleTone } from "./graph-node-handle";
16
- export {
17
- GraphNodeHandleBadge,
18
- type GraphNodeHandleBadgeProps,
19
- } from "./graph-node-handle-badge";
20
- export { GraphNodeShell, type GraphNodeShellProps } from "./graph-node-shell";
21
- export {
22
- defaultGraphNodeStateLabel,
23
- GRAPH_NODE_CONTENT_MIN_HEIGHT_CLASS,
24
- GRAPH_NODE_STATE_INDICATOR_HEIGHT_CLASS,
25
- graphNodeButtonIsDisabled,
26
- graphNodeButtonStateAttributes,
27
- graphNodeButtonStateClassName,
28
- graphNodeShellStateAttributes,
29
- graphNodeShellStateClassName,
30
- type GraphNodeState,
31
- } from "./graph-node-state";
32
- export {
33
- GraphNodeStateIndicator,
34
- type GraphNodeStateIndicatorProps,
35
- } from "./graph-node-state-indicator";
36
- export {
37
- buildGraphEdgePathThroughWaypoints,
38
- type GraphEdgeWaypoint,
39
- } from "./graph-edge-path";
40
- export type { GraphEdgeData, GraphEdgeProps } from "./graph-edge";
41
- export { GRAPH_EDGE_TYPES, GraphEdge } from "./graph-edge";
package/src/index.ts DELETED
@@ -1,209 +0,0 @@
1
- /** Stable package identifier for `@you-agent-factory/components` consumers. */
2
- export const COMPONENTS_PACKAGE_NAME = "@you-agent-factory/components" as const;
3
-
4
- export type ComponentsPackageName = typeof COMPONENTS_PACKAGE_NAME;
5
-
6
- export {
7
- COMPONENT_CATEGORY_EXPORT_PATHS,
8
- type ComponentCategoryExportPath,
9
- } from "./category-paths";
10
-
11
- export { Button, ButtonLink, buttonVariants, IconButtonShell } from "./primitives";
12
- export type {
13
- ButtonLinkProps,
14
- ButtonProps,
15
- IconButtonShellProps,
16
- } from "./primitives";
17
- export { DescriptionList } from "./data-display/description-list";
18
- export type { DescriptionListProps } from "./data-display/description-list";
19
-
20
- export {
21
- AlertPanel,
22
- AlertPanelStatusLabel,
23
- AlertPanelText,
24
- AlertPanelTitle,
25
- Skeleton,
26
- } from "./feedback";
27
- export type {
28
- AlertPanelProps,
29
- AlertPanelSemanticVariant,
30
- AlertPanelStatusLabelProps,
31
- AlertPanelTextProps,
32
- AlertPanelTitleProps,
33
- AlertPanelTone,
34
- AlertPanelVariant,
35
- } from "./feedback";
36
- export {
37
- CodePanel,
38
- DataTable,
39
- Table,
40
- TableBody,
41
- TableCaption,
42
- TableCell,
43
- TableHead,
44
- TableHeader,
45
- TableRow,
46
- codePanelVariants,
47
- tableCellTruncateClassName,
48
- tableCellWrapClassName,
49
- tableMinWidthWideClassName,
50
- tableNarrowContainerClassName,
51
- } from "./data-display";
52
- export type {
53
- CodePanelProps,
54
- DataTableColumn,
55
- DataTableProps,
56
- DataTableState,
57
- TableProps,
58
- TableSize,
59
- } from "./data-display";
60
- export {
61
- WidgetDetailCopy,
62
- WidgetEmptyState,
63
- WidgetEmptyStateText,
64
- WidgetEmptyStateTitle,
65
- WidgetErrorState,
66
- WidgetFrame,
67
- WidgetFrameDisclosure,
68
- WidgetFrameDisclosureIcon,
69
- WidgetFrameDisclosurePanel,
70
- WidgetFrameDisclosureTrigger,
71
- WidgetFrameSkeleton,
72
- WidgetLoadingState,
73
- WidgetSubtitle,
74
- WidgetSuccessState,
75
- WIDGET_FRAME_BODY_TEXT_CLASS,
76
- WIDGET_FRAME_MIN_WIDTH_CLASS,
77
- WIDGET_FRAME_OVERFLOW_TOLERANCE_PX,
78
- WIDGET_FRAME_RESPONSIVE_SHELL_CLASS,
79
- WIDGET_FRAME_SECTION_HEADING_CLASS,
80
- WIDGET_FRAME_STORY_SHELL_DATA_ATTR,
81
- WIDGET_FRAME_SUBTITLE_CLASS,
82
- WIDGET_FRAME_SUPPORTING_LABEL_CLASS,
83
- WIDGET_FRAME_SUPPORTING_LABELS_CLASS,
84
- WIDGET_FRAME_WIDE_BODY_CLASS,
85
- widgetFrameDetailCardClass,
86
- widgetFrameHasNoHorizontalOverflow,
87
- widgetFrameStoryShellStyle,
88
- } from "./recipes";
89
- export type {
90
- WidgetDetailCopyProps,
91
- WidgetEmptyStateProps,
92
- WidgetEmptyStateTextProps,
93
- WidgetEmptyStateTitleProps,
94
- WidgetErrorStateProps,
95
- WidgetFrameDisclosureIconProps,
96
- WidgetFrameDisclosurePanelProps,
97
- WidgetFrameDisclosureProps,
98
- WidgetFrameDisclosureTriggerProps,
99
- WidgetFrameProps,
100
- WidgetLoadingStateProps,
101
- WidgetSubtitleProps,
102
- WidgetSuccessStateProps,
103
- } from "./recipes";
104
- export {
105
- buildFormFieldAriaDescribedBy,
106
- EnumSelect,
107
- ENUM_SELECT_EMPTY_VALUE,
108
- FormDescription,
109
- FormError,
110
- FormField,
111
- FormFieldGroup,
112
- FormFieldGroupLabel,
113
- FormHelperText,
114
- FormLabel,
115
- FormSuccess,
116
- FormWarning,
117
- NativeSelect,
118
- OptionalEnumSelect,
119
- PackageCheckbox,
120
- PackageFileInput,
121
- PackageInput,
122
- PackageTextarea,
123
- ResetEnumSelect,
124
- Select,
125
- SELECT_EMPTY_STATE_VALUE,
126
- SelectContent,
127
- SelectEmpty,
128
- SelectField,
129
- SelectGroup,
130
- SelectItem,
131
- SelectLabel,
132
- SelectSeparator,
133
- SelectTrigger,
134
- SelectValue,
135
- inputVariants,
136
- textareaVariants,
137
- } from "./forms";
138
- export type {
139
- EnumSelectOption,
140
- EnumSelectProps,
141
- FormDescriptionProps,
142
- FormErrorProps,
143
- FormFieldGroupLabelProps,
144
- FormFieldGroupProps,
145
- FormFieldMessageIds,
146
- FormFieldProps,
147
- FormHelperTextProps,
148
- FormLabelProps,
149
- FormSuccessProps,
150
- FormWarningProps,
151
- NativeSelectProps,
152
- OptionalEnumSelectProps,
153
- PackageCheckboxProps,
154
- PackageFileInputProps,
155
- PackageInputProps,
156
- PackageTextareaProps,
157
- ResetEnumSelectProps,
158
- SelectContentProps,
159
- SelectEmptyProps,
160
- SelectFieldProps,
161
- SelectItemProps,
162
- SelectLabelProps,
163
- SelectSeparatorProps,
164
- SelectTriggerProps,
165
- } from "./forms";
166
-
167
- export { ActionRow } from "./layout/action-row";
168
- export type { ActionRowProps } from "./layout/action-row";
169
- export { SurfacePanel, surfacePanelVariants } from "./layout/surface-panel";
170
- export type { SurfacePanelProps } from "./layout/surface-panel";
171
-
172
- export { Code, Heading, Label, Text } from "./primitives/typography";
173
- export type {
174
- CodeProps,
175
- HeadingProps,
176
- LabelProps,
177
- TextProps,
178
- TextVariant,
179
- } from "./primitives/typography";
180
- export {
181
- Collapsible,
182
- CollapsibleContent,
183
- CollapsibleTrigger,
184
- Dialog,
185
- DialogClose,
186
- DialogContent,
187
- DialogDescription,
188
- DialogFooter,
189
- DialogHeader,
190
- DialogOverlay,
191
- DialogPortal,
192
- DialogTitle,
193
- DialogTrigger,
194
- OVERLAY_DIALOG_BODY_CLASS,
195
- OVERLAY_DIALOG_CONTENT_SHELL_CLASS,
196
- OVERLAY_FORM_GROUP_CLASS,
197
- Popover,
198
- PopoverAnchor,
199
- PopoverContent,
200
- PopoverTrigger,
201
- ScrollArea,
202
- ScrollBar,
203
- } from "./overlays";
204
- export type {
205
- DialogContentProps,
206
- ScrollAreaProps,
207
- ScrollBarProps,
208
- } from "./overlays";
209
-
@@ -1,53 +0,0 @@
1
- import type { HTMLAttributes, ReactNode } from "react";
2
-
3
- import { cn } from "../utilities/cn";
4
-
5
- const ACTION_ROW_CLASS =
6
- "flex min-w-0 flex-wrap items-center gap-2 max-md:justify-start";
7
- const ACTION_ROW_SECTION_CLASS =
8
- "flex min-w-0 flex-wrap items-center gap-2";
9
-
10
- export interface ActionRowProps
11
- extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
12
- actions?: ReactNode;
13
- actionsClassName?: string;
14
- statuses?: ReactNode;
15
- statusesClassName?: string;
16
- }
17
-
18
- export function ActionRow({
19
- actions,
20
- actionsClassName,
21
- className,
22
- statuses,
23
- statusesClassName,
24
- ...props
25
- }: ActionRowProps) {
26
- const hasStatuses = statuses !== undefined && statuses !== null;
27
- const hasActions = actions !== undefined && actions !== null;
28
-
29
- if (!hasStatuses && !hasActions) {
30
- return null;
31
- }
32
-
33
- return (
34
- <div className={cn(ACTION_ROW_CLASS, className)} {...props}>
35
- {hasStatuses ? (
36
- <div
37
- className={cn(ACTION_ROW_SECTION_CLASS, statusesClassName)}
38
- data-action-row-section="statuses"
39
- >
40
- {statuses}
41
- </div>
42
- ) : null}
43
- {hasActions ? (
44
- <div
45
- className={cn(ACTION_ROW_SECTION_CLASS, actionsClassName)}
46
- data-action-row-section="actions"
47
- >
48
- {actions}
49
- </div>
50
- ) : null}
51
- </div>
52
- );
53
- }
@@ -1,91 +0,0 @@
1
- import { Slot } from "@radix-ui/react-slot";
2
- import { forwardRef, type HTMLAttributes } from "react";
3
-
4
- import { cn } from "../utilities/cn";
5
-
6
- type SurfacePanelPadding = "compact" | "default" | "none";
7
- type SurfacePanelRadius = "lg" | "xl" | "2xl" | "3xl" | "full";
8
- type SurfacePanelSurface = "high" | "low";
9
- type SurfacePanelTone = "default" | "accent" | "selected";
10
-
11
- export interface SurfacePanelProps extends HTMLAttributes<HTMLDivElement> {
12
- asChild?: boolean;
13
- padding?: SurfacePanelPadding;
14
- radius?: SurfacePanelRadius;
15
- surface?: SurfacePanelSurface;
16
- tone?: SurfacePanelTone;
17
- }
18
-
19
- const SURFACE_PANEL_BASE_CLASS = "border border-outline";
20
- const SURFACE_PANEL_PADDING_CLASS: Record<SurfacePanelPadding, string> = {
21
- compact: "p-2",
22
- default: "p-3",
23
- none: "",
24
- };
25
- const SURFACE_PANEL_RADIUS_CLASS: Record<SurfacePanelRadius, string> = {
26
- lg: "rounded-lg",
27
- xl: "rounded-xl",
28
- "2xl": "rounded-2xl",
29
- "3xl": "rounded-3xl",
30
- full: "rounded-full",
31
- };
32
- const SURFACE_PANEL_SURFACE_CLASS: Record<SurfacePanelSurface, string> = {
33
- high: "bg-surface-container-high",
34
- low: "bg-surface-container-low",
35
- };
36
- const SURFACE_PANEL_TONE_CLASS: Record<SurfacePanelTone, string> = {
37
- default: "",
38
- accent: "border-primary text-on-surface",
39
- selected: "border-primary bg-primary-container text-on-primary-container",
40
- };
41
-
42
- export function surfacePanelVariants({
43
- className,
44
- padding = "default",
45
- radius = "xl",
46
- surface = "high",
47
- tone = "default",
48
- }: Pick<
49
- SurfacePanelProps,
50
- "className" | "padding" | "radius" | "surface" | "tone"
51
- >) {
52
- return cn(
53
- SURFACE_PANEL_BASE_CLASS,
54
- SURFACE_PANEL_PADDING_CLASS[padding],
55
- SURFACE_PANEL_RADIUS_CLASS[radius],
56
- SURFACE_PANEL_SURFACE_CLASS[surface],
57
- SURFACE_PANEL_TONE_CLASS[tone],
58
- className,
59
- );
60
- }
61
-
62
- export const SurfacePanel = forwardRef<HTMLDivElement, SurfacePanelProps>(
63
- function SurfacePanel(
64
- {
65
- asChild = false,
66
- className,
67
- padding = "default",
68
- radius = "xl",
69
- surface = "high",
70
- tone = "default",
71
- ...props
72
- },
73
- ref,
74
- ) {
75
- const Component = asChild ? Slot : "div";
76
-
77
- return (
78
- <Component
79
- className={surfacePanelVariants({
80
- className,
81
- padding,
82
- radius,
83
- surface,
84
- tone,
85
- })}
86
- ref={ref}
87
- {...props}
88
- />
89
- );
90
- },
91
- );
@@ -1,22 +0,0 @@
1
- import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
2
- import type { ComponentProps } from "react";
3
-
4
- import { cn } from "../utilities/cn";
5
-
6
- export const Collapsible = CollapsiblePrimitive.Root;
7
- export const CollapsibleTrigger = CollapsiblePrimitive.Trigger;
8
-
9
- export function CollapsibleContent({
10
- className,
11
- ...props
12
- }: ComponentProps<typeof CollapsiblePrimitive.Content>) {
13
- return (
14
- <CollapsiblePrimitive.Content
15
- className={cn(
16
- "overflow-hidden data-[state=closed]:animate-[overlay-collapsible-up_160ms_ease-out] data-[state=open]:animate-[overlay-collapsible-down_200ms_ease-out]",
17
- className,
18
- )}
19
- {...props}
20
- />
21
- );
22
- }
@@ -1,148 +0,0 @@
1
- import * as DialogPrimitive from "@radix-ui/react-dialog";
2
- import type { ComponentProps, HTMLAttributes } from "react";
3
-
4
- import { cn } from "../utilities/cn";
5
- import {
6
- OVERLAY_DIALOG_CONTENT_SHELL_CLASS,
7
- OVERLAY_FORM_GROUP_CLASS,
8
- } from "./overlay-layout";
9
-
10
- const DIALOG_CLOSE_BUTTON_CLASS =
11
- "absolute right-4 top-4 inline-flex min-h-9 w-9 items-center justify-center rounded-full border border-outline bg-transparent p-0 text-on-surface transition-colors hover:bg-surface-container-low disabled:pointer-events-none disabled:opacity-50";
12
-
13
- function DialogCloseIcon() {
14
- return (
15
- <svg
16
- aria-hidden="true"
17
- fill="none"
18
- height="18"
19
- viewBox="0 0 24 24"
20
- width="18"
21
- >
22
- <path
23
- d="M6 6l12 12M18 6L6 18"
24
- stroke="currentColor"
25
- strokeLinecap="round"
26
- strokeLinejoin="round"
27
- strokeWidth="1.8"
28
- />
29
- </svg>
30
- );
31
- }
32
-
33
- export const Dialog = DialogPrimitive.Root;
34
- export const DialogTrigger = DialogPrimitive.Trigger;
35
- export const DialogPortal = DialogPrimitive.Portal;
36
- export const DialogClose = DialogPrimitive.Close;
37
-
38
- export function DialogOverlay({
39
- className,
40
- ...props
41
- }: ComponentProps<typeof DialogPrimitive.Overlay>) {
42
- return (
43
- <DialogPrimitive.Overlay
44
- className={cn(
45
- "fixed inset-0 z-50 bg-black/70 backdrop-blur-sm data-[state=closed]:animate-out data-[state=open]:animate-in",
46
- className,
47
- )}
48
- {...props}
49
- />
50
- );
51
- }
52
-
53
- export type DialogContentProps = ComponentProps<typeof DialogPrimitive.Content> & {
54
- closeDisabled?: boolean;
55
- closeLabel?: string;
56
- };
57
-
58
- export function DialogContent({
59
- children,
60
- className,
61
- closeDisabled = false,
62
- closeLabel = "Close",
63
- ...props
64
- }: DialogContentProps) {
65
- return (
66
- <DialogPortal>
67
- <DialogOverlay />
68
- <DialogPrimitive.Content
69
- className={cn(
70
- "fixed inset-x-4 top-1/2 z-50 mx-auto max-h-dvh max-w-2xl -translate-y-1/2 overflow-y-auto rounded-2xl border border-outline bg-surface-container-high text-on-surface shadow-xl",
71
- OVERLAY_DIALOG_CONTENT_SHELL_CLASS,
72
- className,
73
- )}
74
- {...props}
75
- >
76
- {children}
77
- {closeDisabled ? (
78
- <button
79
- aria-label={closeLabel}
80
- className={DIALOG_CLOSE_BUTTON_CLASS}
81
- disabled
82
- type="button"
83
- >
84
- <DialogCloseIcon />
85
- </button>
86
- ) : (
87
- <DialogPrimitive.Close
88
- aria-label={closeLabel}
89
- className={DIALOG_CLOSE_BUTTON_CLASS}
90
- >
91
- <DialogCloseIcon />
92
- </DialogPrimitive.Close>
93
- )}
94
- </DialogPrimitive.Content>
95
- </DialogPortal>
96
- );
97
- }
98
-
99
- export function DialogHeader({
100
- className,
101
- ...props
102
- }: HTMLAttributes<HTMLDivElement>) {
103
- return (
104
- <div
105
- className={cn(OVERLAY_FORM_GROUP_CLASS, "text-left", className)}
106
- {...props}
107
- />
108
- );
109
- }
110
-
111
- export function DialogFooter({
112
- className,
113
- ...props
114
- }: HTMLAttributes<HTMLDivElement>) {
115
- return (
116
- <div
117
- className={cn("flex flex-wrap justify-end gap-layout-element", className)}
118
- {...props}
119
- />
120
- );
121
- }
122
-
123
- export function DialogTitle({
124
- className,
125
- ...props
126
- }: ComponentProps<typeof DialogPrimitive.Title>) {
127
- return (
128
- <DialogPrimitive.Title
129
- className={cn(
130
- "font-display text-2xl leading-tight tracking-[-0.03em] text-on-surface",
131
- className,
132
- )}
133
- {...props}
134
- />
135
- );
136
- }
137
-
138
- export function DialogDescription({
139
- className,
140
- ...props
141
- }: ComponentProps<typeof DialogPrimitive.Description>) {
142
- return (
143
- <DialogPrimitive.Description
144
- className={cn("text-sm leading-6 text-on-surface-variant", className)}
145
- {...props}
146
- />
147
- );
148
- }
@@ -1,31 +0,0 @@
1
- /** Stable category path for `@you-agent-factory/components/overlays`. */
2
- export const COMPONENTS_CATEGORY = "overlays" as const;
3
-
4
- export type ComponentsCategory = typeof COMPONENTS_CATEGORY;
5
-
6
- export {
7
- Collapsible,
8
- CollapsibleContent,
9
- CollapsibleTrigger,
10
- } from "./collapsible";
11
- export {
12
- Dialog,
13
- DialogClose,
14
- DialogContent,
15
- DialogDescription,
16
- DialogFooter,
17
- DialogHeader,
18
- DialogOverlay,
19
- DialogPortal,
20
- DialogTitle,
21
- DialogTrigger,
22
- } from "./dialog";
23
- export type { DialogContentProps } from "./dialog";
24
- export {
25
- OVERLAY_DIALOG_BODY_CLASS,
26
- OVERLAY_DIALOG_CONTENT_SHELL_CLASS,
27
- OVERLAY_FORM_GROUP_CLASS,
28
- } from "./overlay-layout";
29
- export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from "./popover";
30
- export { ScrollArea, ScrollBar } from "./scroll-area";
31
- export type { ScrollAreaProps, ScrollBarProps } from "./scroll-area";
@@ -1,9 +0,0 @@
1
- /** Interior stack for dialog header, body, and footer regions. */
2
- export const OVERLAY_FORM_GROUP_CLASS = "grid gap-layout-tight";
3
-
4
- /** Dialog and modal body regions between header and footer. */
5
- export const OVERLAY_DIALOG_BODY_CLASS = "grid gap-layout-group";
6
-
7
- /** Radix dialog content shell spacing for package-owned dialogs. */
8
- export const OVERLAY_DIALOG_CONTENT_SHELL_CLASS =
9
- "grid gap-layout-group p-layout-inset-dialog";
@@ -1,29 +0,0 @@
1
- import * as PopoverPrimitive from "@radix-ui/react-popover";
2
- import type { ComponentProps } from "react";
3
-
4
- import { cn } from "../utilities/cn";
5
-
6
- export const Popover = PopoverPrimitive.Root;
7
- export const PopoverTrigger = PopoverPrimitive.Trigger;
8
- export const PopoverAnchor = PopoverPrimitive.Anchor;
9
-
10
- export function PopoverContent({
11
- align = "center",
12
- className,
13
- sideOffset = 10,
14
- ...props
15
- }: ComponentProps<typeof PopoverPrimitive.Content>) {
16
- return (
17
- <PopoverPrimitive.Portal>
18
- <PopoverPrimitive.Content
19
- align={align}
20
- className={cn(
21
- "z-50 w-72 rounded-2xl border border-outline bg-surface-container-high p-3 text-on-surface shadow-xl outline-none data-[state=closed]:animate-out data-[state=open]:animate-in sm:w-80",
22
- className,
23
- )}
24
- sideOffset={sideOffset}
25
- {...props}
26
- />
27
- </PopoverPrimitive.Portal>
28
- );
29
- }