@tonycodes-ui/mortar 0.0.0-stage → 0.12.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 (107) hide show
  1. package/AGENTS.md +10 -0
  2. package/CHANGELOG.md +268 -0
  3. package/CONTRIBUTING.md +60 -0
  4. package/DESIGN.md +51 -0
  5. package/LICENSE +21 -0
  6. package/README.md +155 -2
  7. package/TESTING.md +83 -0
  8. package/baseline-policy.json +16 -0
  9. package/bin/mortar.mjs +258 -0
  10. package/catalog.json +9900 -0
  11. package/cli/audit.mjs +943 -0
  12. package/cli/data.mjs +176 -0
  13. package/cli/mcp.mjs +216 -0
  14. package/cli/migrations.mjs +128 -0
  15. package/cli/packet.mjs +267 -0
  16. package/cli/search.mjs +246 -0
  17. package/cli/tools.mjs +229 -0
  18. package/design-principles.json +30 -0
  19. package/dist/agent-data.json +1 -0
  20. package/dist/application.d.ts +340 -0
  21. package/dist/application.js +240 -0
  22. package/dist/auth.d.ts +121 -0
  23. package/dist/auth.js +97 -0
  24. package/dist/brand.d.ts +69 -0
  25. package/dist/brand.js +266 -0
  26. package/dist/calendar.d.ts +75 -0
  27. package/dist/calendar.js +310 -0
  28. package/dist/choice.d.ts +36 -0
  29. package/dist/choice.js +36 -0
  30. package/dist/composer.d.ts +28 -0
  31. package/dist/composer.js +47 -0
  32. package/dist/display.d.ts +136 -0
  33. package/dist/display.js +75 -0
  34. package/dist/docs.d.ts +145 -0
  35. package/dist/docs.js +141 -0
  36. package/dist/ecommerce.d.ts +261 -0
  37. package/dist/ecommerce.js +177 -0
  38. package/dist/feedback.d.ts +80 -0
  39. package/dist/feedback.js +98 -0
  40. package/dist/foundation.d.ts +42 -0
  41. package/dist/foundation.js +121 -0
  42. package/dist/heading.d.ts +5 -0
  43. package/dist/heading.js +9 -0
  44. package/dist/icons.d.ts +50 -0
  45. package/dist/icons.js +70 -0
  46. package/dist/illustration.d.ts +47 -0
  47. package/dist/illustration.js +47 -0
  48. package/dist/index.d.ts +36 -0
  49. package/dist/index.js +18 -0
  50. package/dist/inspection.d.ts +24 -0
  51. package/dist/inspection.js +14 -0
  52. package/dist/internal.d.ts +514 -0
  53. package/dist/internal.js +332 -0
  54. package/dist/layout.d.ts +107 -0
  55. package/dist/layout.js +66 -0
  56. package/dist/marketing-sections.d.ts +161 -0
  57. package/dist/marketing-sections.js +58 -0
  58. package/dist/marketing.d.ts +277 -0
  59. package/dist/marketing.js +163 -0
  60. package/dist/navigation.d.ts +35 -0
  61. package/dist/navigation.js +44 -0
  62. package/dist/primitives.d.ts +258 -0
  63. package/dist/primitives.js +244 -0
  64. package/dist/showcase.d.ts +29 -0
  65. package/dist/showcase.js +10 -0
  66. package/dist/workspace.d.ts +80 -0
  67. package/dist/workspace.js +48 -0
  68. package/docs/agents.md +127 -0
  69. package/docs/auth-flows.md +71 -0
  70. package/docs/migrating-to-0.6.md +94 -0
  71. package/docs/theming.md +170 -0
  72. package/package.json +94 -4
  73. package/skills/mortar/SKILL.md +36 -0
  74. package/src/application.css +1487 -0
  75. package/src/application.tsx +1413 -0
  76. package/src/auth.tsx +452 -0
  77. package/src/brand.ts +335 -0
  78. package/src/calendar.css +468 -0
  79. package/src/calendar.tsx +868 -0
  80. package/src/choice.tsx +240 -0
  81. package/src/composer.tsx +158 -0
  82. package/src/data.css +690 -0
  83. package/src/display.tsx +452 -0
  84. package/src/docs.css +704 -0
  85. package/src/docs.tsx +737 -0
  86. package/src/ecommerce.css +810 -0
  87. package/src/ecommerce.tsx +1033 -0
  88. package/src/feedback.tsx +388 -0
  89. package/src/foundation.css +1867 -0
  90. package/src/foundation.tsx +227 -0
  91. package/src/heading.ts +13 -0
  92. package/src/icons.tsx +237 -0
  93. package/src/illustration.tsx +169 -0
  94. package/src/index.ts +233 -0
  95. package/src/inspection.tsx +91 -0
  96. package/src/internal.tsx +700 -0
  97. package/src/layout.tsx +342 -0
  98. package/src/marketing-sections.tsx +621 -0
  99. package/src/marketing.css +2579 -0
  100. package/src/marketing.tsx +1235 -0
  101. package/src/navigation.tsx +118 -0
  102. package/src/overlays.css +350 -0
  103. package/src/primitives.tsx +1135 -0
  104. package/src/showcase.tsx +120 -0
  105. package/src/tokens.css +449 -0
  106. package/src/workspace.tsx +333 -0
  107. package/styles.css +56 -0
package/src/index.ts ADDED
@@ -0,0 +1,233 @@
1
+ export { ThemeProvider, AppearanceControl } from "./foundation.js";
2
+ export type { BrandDefinition, BrandAppearanceTokens } from "./brand.js";
3
+ export type {
4
+ ThemeProviderProps,
5
+ Appearance,
6
+ Brand,
7
+ Density,
8
+ } from "./foundation.js";
9
+ export {
10
+ Button,
11
+ ButtonGroup,
12
+ ActionLink,
13
+ Input,
14
+ Select,
15
+ TextArea,
16
+ Checkbox,
17
+ Fieldset,
18
+ RadioGroup,
19
+ Switch,
20
+ Badge,
21
+ Tabs,
22
+ Modal,
23
+ Dropdown,
24
+ Notice,
25
+ EmptyState,
26
+ ErrorSummary,
27
+ } from "./primitives.js";
28
+ export type {
29
+ ButtonProps,
30
+ ButtonGroupItem,
31
+ DropdownItem,
32
+ ErrorSummaryItem,
33
+ InputProps,
34
+ LinkAction,
35
+ Tone,
36
+ } from "./primitives.js";
37
+ export {
38
+ AppShell,
39
+ PageHeading,
40
+ MetricGroup,
41
+ DataTable,
42
+ Table,
43
+ Pagination,
44
+ SettingsSection,
45
+ ActivityFeed,
46
+ SignInPanel,
47
+ Sidebar,
48
+ Navbar,
49
+ StackedShell,
50
+ Breadcrumbs,
51
+ ProgressSteps,
52
+ TabNav,
53
+ ActionPanel,
54
+ } from "./application.js";
55
+ export type {
56
+ AppShellProps,
57
+ NavigationItem,
58
+ DataTableProps,
59
+ DataTableColumn,
60
+ TableSort,
61
+ SortDirection,
62
+ SignInProvider,
63
+ SidebarProps,
64
+ BreadcrumbItem,
65
+ ProgressStep,
66
+ TabNavItem,
67
+ StackedShellProps,
68
+ NavbarProps,
69
+ BreadcrumbsProps,
70
+ TabNavProps,
71
+ ProgressStepsProps,
72
+ ActionPanelProps,
73
+ PageHeadingProps,
74
+ MetricGroupProps,
75
+ TableProps,
76
+ PaginationProps,
77
+ SettingsSectionProps,
78
+ ActivityFeedProps,
79
+ SignInPanelProps,
80
+ } from "./application.js";
81
+ export {
82
+ AuthLayout,
83
+ ProviderButtons,
84
+ PasswordInput,
85
+ CodeInput,
86
+ } from "./auth.js";
87
+ export type {
88
+ AuthLayoutProps,
89
+ ProviderButtonsProps,
90
+ PasswordInputProps,
91
+ PasswordRequirement,
92
+ PasswordStrength,
93
+ CodeInputProps,
94
+ } from "./auth.js";
95
+ export {
96
+ MarketingHeader,
97
+ MarketingPage,
98
+ Hero,
99
+ FeatureGrid,
100
+ FeatureSection,
101
+ ProcessSteps,
102
+ Testimonial,
103
+ LogoCloud,
104
+ Pricing,
105
+ FAQ,
106
+ CallToAction,
107
+ Footer,
108
+ HeaderSection,
109
+ ContentSection,
110
+ } from "./marketing.js";
111
+ export type {
112
+ PricingPlan,
113
+ PricingExtra,
114
+ HeaderLink,
115
+ FlyoutItem,
116
+ } from "./marketing.js";
117
+ export { SegmentedControl, CodeBlock, PreviewFrame } from "./inspection.js";
118
+ export {
119
+ Avatar,
120
+ AvatarGroup,
121
+ Kbd,
122
+ ProgressBar,
123
+ FilterChip,
124
+ CheckList,
125
+ DescriptionList,
126
+ GridList,
127
+ AttachmentList,
128
+ } from "./display.js";
129
+ export type {
130
+ GridListItem,
131
+ Attachment,
132
+ AvatarProps,
133
+ AvatarGroupProps,
134
+ KbdProps,
135
+ ProgressBarProps,
136
+ FilterChipProps,
137
+ CheckListProps,
138
+ DescriptionListProps,
139
+ GridListProps,
140
+ AttachmentListProps,
141
+ } from "./display.js";
142
+ export {
143
+ Stack,
144
+ Container,
145
+ Text,
146
+ Section,
147
+ Divider,
148
+ Card,
149
+ MediaObject,
150
+ SectionHeading,
151
+ Prose,
152
+ } from "./layout.js";
153
+ export type {
154
+ SectionTone,
155
+ StackProps,
156
+ ContainerProps,
157
+ TextProps,
158
+ SectionProps,
159
+ DividerProps,
160
+ CardProps,
161
+ MediaObjectProps,
162
+ SectionHeadingProps,
163
+ ProseProps,
164
+ } from "./layout.js";
165
+ export { MockWindow, ChatPreview } from "./showcase.js";
166
+ export type { ChatMessage } from "./showcase.js";
167
+ export { Toast, Toaster, ConfirmDialog, SaveBar, Banner } from "./feedback.js";
168
+ export type { ToastItem, ToastAction } from "./feedback.js";
169
+ export { SlideOver, CommandPalette, StackedList } from "./workspace.js";
170
+ export type {
171
+ CommandItem,
172
+ StackedListItem,
173
+ SlideOverProps,
174
+ CommandPaletteProps,
175
+ StackedListProps,
176
+ } from "./workspace.js";
177
+ export {
178
+ BentoGrid,
179
+ StatGroup,
180
+ TestimonialGrid,
181
+ PlanComparison,
182
+ PostList,
183
+ TeamGrid,
184
+ ContactSection,
185
+ Newsletter,
186
+ NotFound,
187
+ } from "./marketing-sections.js";
188
+ export {
189
+ DocsShell,
190
+ SearchTrigger,
191
+ SearchDialog,
192
+ Steps,
193
+ Callout,
194
+ FileTree,
195
+ CodeTabs,
196
+ Release,
197
+ ApiEndpoint,
198
+ PageFeedback,
199
+ PagerLinks,
200
+ LinkCards,
201
+ } from "./docs.js";
202
+ export type { DocsShellProps, FileNode } from "./docs.js";
203
+ export { Listbox, Combobox } from "./choice.js";
204
+ export type { ChoiceOption } from "./choice.js";
205
+ export { Calendar } from "./calendar.js";
206
+ export type { CalendarEvent, CalendarView, CalendarProps } from "./calendar.js";
207
+ export {
208
+ ProductList,
209
+ ProductOverview,
210
+ ShoppingCart,
211
+ OrderSummary,
212
+ ProductQuickView,
213
+ ProductFilters,
214
+ ProductReviews,
215
+ OrderHistory,
216
+ } from "./ecommerce.js";
217
+ export type {
218
+ ProductImage,
219
+ ProductCard,
220
+ ProductOption,
221
+ CartItem,
222
+ FilterFacet,
223
+ Review,
224
+ Order,
225
+ ProductListProps,
226
+ ProductOverviewProps,
227
+ ShoppingCartProps,
228
+ } from "./ecommerce.js";
229
+ export { CommentComposer } from "./composer.js";
230
+ export type { LinkItem, ItemGroup } from "./navigation.js";
231
+ export type { HeadingLevel } from "./heading.js";
232
+ export { NetworkIllustration } from "./illustration.js";
233
+ export type { NetworkNode, NetworkConnection } from "./illustration.js";
@@ -0,0 +1,91 @@
1
+ import { KitLink } from "./navigation.js";
2
+ import { componentRoot, cx, useComponentName } from "./internal.js";
3
+ export function SegmentedControl({
4
+ label,
5
+ value,
6
+ options,
7
+ onChange,
8
+ className,
9
+ }: {
10
+ label: string;
11
+ value: string;
12
+ options: { value: string; label: string }[];
13
+ onChange: (value: string) => void;
14
+ className?: string;
15
+ }) {
16
+ const name = useComponentName("SegmentedControl");
17
+ return (
18
+ <div
19
+ {...componentRoot(name)}
20
+ className={cx("m-segmented", className)}
21
+ role="group"
22
+ aria-label={label}
23
+ >
24
+ {options.map((option) => (
25
+ <button
26
+ key={option.value}
27
+ type="button"
28
+ aria-pressed={value === option.value}
29
+ onClick={() => onChange(option.value)}
30
+ >
31
+ {option.label}
32
+ </button>
33
+ ))}
34
+ </div>
35
+ );
36
+ }
37
+ /** A scrollable code sample in a figure; the caption names the figure. */
38
+ export function CodeBlock({
39
+ code,
40
+ label = "Code",
41
+ className,
42
+ }: {
43
+ code: string;
44
+ /** Visible caption, and the figure's accessible name. */
45
+ label?: string;
46
+ className?: string;
47
+ }) {
48
+ return (
49
+ <figure
50
+ {...componentRoot("CodeBlock")}
51
+ className={cx("m-code-block", className)}
52
+ >
53
+ <figcaption>{label}</figcaption>
54
+ {/* Focusable so keyboard users can scroll long samples. */}
55
+ <pre tabIndex={0}>
56
+ <code>{code}</code>
57
+ </pre>
58
+ </figure>
59
+ );
60
+ }
61
+ export function PreviewFrame({
62
+ label,
63
+ src,
64
+ id,
65
+ className,
66
+ }: {
67
+ /** Accessible name of the section and the frame. */
68
+ label: string;
69
+ src: string;
70
+ id?: string;
71
+ className?: string;
72
+ }) {
73
+ return (
74
+ <section
75
+ id={id}
76
+ {...componentRoot("PreviewFrame")}
77
+ className={cx("m-preview-frame", className)}
78
+ aria-label={label}
79
+ >
80
+ <KitLink href={src} target="_blank" rel="noopener noreferrer">
81
+ Open full preview
82
+ </KitLink>
83
+ <iframe
84
+ title={label}
85
+ src={src}
86
+ sandbox="allow-scripts"
87
+ referrerPolicy="no-referrer"
88
+ />
89
+ </section>
90
+ );
91
+ }