@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.
- package/AGENTS.md +10 -0
- package/CHANGELOG.md +268 -0
- package/CONTRIBUTING.md +60 -0
- package/DESIGN.md +51 -0
- package/LICENSE +21 -0
- package/README.md +155 -2
- package/TESTING.md +83 -0
- package/baseline-policy.json +16 -0
- package/bin/mortar.mjs +258 -0
- package/catalog.json +9900 -0
- package/cli/audit.mjs +943 -0
- package/cli/data.mjs +176 -0
- package/cli/mcp.mjs +216 -0
- package/cli/migrations.mjs +128 -0
- package/cli/packet.mjs +267 -0
- package/cli/search.mjs +246 -0
- package/cli/tools.mjs +229 -0
- package/design-principles.json +30 -0
- package/dist/agent-data.json +1 -0
- package/dist/application.d.ts +340 -0
- package/dist/application.js +240 -0
- package/dist/auth.d.ts +121 -0
- package/dist/auth.js +97 -0
- package/dist/brand.d.ts +69 -0
- package/dist/brand.js +266 -0
- package/dist/calendar.d.ts +75 -0
- package/dist/calendar.js +310 -0
- package/dist/choice.d.ts +36 -0
- package/dist/choice.js +36 -0
- package/dist/composer.d.ts +28 -0
- package/dist/composer.js +47 -0
- package/dist/display.d.ts +136 -0
- package/dist/display.js +75 -0
- package/dist/docs.d.ts +145 -0
- package/dist/docs.js +141 -0
- package/dist/ecommerce.d.ts +261 -0
- package/dist/ecommerce.js +177 -0
- package/dist/feedback.d.ts +80 -0
- package/dist/feedback.js +98 -0
- package/dist/foundation.d.ts +42 -0
- package/dist/foundation.js +121 -0
- package/dist/heading.d.ts +5 -0
- package/dist/heading.js +9 -0
- package/dist/icons.d.ts +50 -0
- package/dist/icons.js +70 -0
- package/dist/illustration.d.ts +47 -0
- package/dist/illustration.js +47 -0
- package/dist/index.d.ts +36 -0
- package/dist/index.js +18 -0
- package/dist/inspection.d.ts +24 -0
- package/dist/inspection.js +14 -0
- package/dist/internal.d.ts +514 -0
- package/dist/internal.js +332 -0
- package/dist/layout.d.ts +107 -0
- package/dist/layout.js +66 -0
- package/dist/marketing-sections.d.ts +161 -0
- package/dist/marketing-sections.js +58 -0
- package/dist/marketing.d.ts +277 -0
- package/dist/marketing.js +163 -0
- package/dist/navigation.d.ts +35 -0
- package/dist/navigation.js +44 -0
- package/dist/primitives.d.ts +258 -0
- package/dist/primitives.js +244 -0
- package/dist/showcase.d.ts +29 -0
- package/dist/showcase.js +10 -0
- package/dist/workspace.d.ts +80 -0
- package/dist/workspace.js +48 -0
- package/docs/agents.md +127 -0
- package/docs/auth-flows.md +71 -0
- package/docs/migrating-to-0.6.md +94 -0
- package/docs/theming.md +170 -0
- package/package.json +94 -4
- package/skills/mortar/SKILL.md +36 -0
- package/src/application.css +1487 -0
- package/src/application.tsx +1413 -0
- package/src/auth.tsx +452 -0
- package/src/brand.ts +335 -0
- package/src/calendar.css +468 -0
- package/src/calendar.tsx +868 -0
- package/src/choice.tsx +240 -0
- package/src/composer.tsx +158 -0
- package/src/data.css +690 -0
- package/src/display.tsx +452 -0
- package/src/docs.css +704 -0
- package/src/docs.tsx +737 -0
- package/src/ecommerce.css +810 -0
- package/src/ecommerce.tsx +1033 -0
- package/src/feedback.tsx +388 -0
- package/src/foundation.css +1867 -0
- package/src/foundation.tsx +227 -0
- package/src/heading.ts +13 -0
- package/src/icons.tsx +237 -0
- package/src/illustration.tsx +169 -0
- package/src/index.ts +233 -0
- package/src/inspection.tsx +91 -0
- package/src/internal.tsx +700 -0
- package/src/layout.tsx +342 -0
- package/src/marketing-sections.tsx +621 -0
- package/src/marketing.css +2579 -0
- package/src/marketing.tsx +1235 -0
- package/src/navigation.tsx +118 -0
- package/src/overlays.css +350 -0
- package/src/primitives.tsx +1135 -0
- package/src/showcase.tsx +120 -0
- package/src/tokens.css +449 -0
- package/src/workspace.tsx +333 -0
- 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
|
+
}
|