@marwes-ui/react 0.0.3

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/dist/index.js ADDED
@@ -0,0 +1,422 @@
1
+ import { createDividerRecipe, createSystem, switchMode, resolveIconSize, resolveIconStrokeWidth, iconRegistry, createButtonRecipe, createInputRecipe, checkboxRecipe, headingRecipe, paragraphRecipe } from '@marwes-ui/core';
2
+ import { firstEdition } from '@marwes-ui/presets';
3
+ import * as React2 from 'react';
4
+ import { useEffect } from 'react';
5
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
6
+
7
+ // src/provider/marwes-provider.tsx
8
+ var MarwesContext = React2.createContext(null);
9
+ function MarwesProvider({
10
+ preset = firstEdition,
11
+ theme,
12
+ mode = "light",
13
+ onModeChange,
14
+ children
15
+ }) {
16
+ const initialSystem = React2.useMemo(() => {
17
+ return createSystem({
18
+ preset,
19
+ theme: theme ? { ...theme, mode } : { mode }
20
+ });
21
+ }, [preset, theme, mode]);
22
+ const system = React2.useMemo(() => {
23
+ if (mode === initialSystem.theme.mode) {
24
+ return initialSystem;
25
+ }
26
+ return switchMode(initialSystem, mode);
27
+ }, [initialSystem, mode]);
28
+ const themeClass = `mw-theme--${system.theme.mode}`;
29
+ return /* @__PURE__ */ jsx(MarwesContext.Provider, { value: { system, onModeChange }, children: /* @__PURE__ */ jsx("div", { className: themeClass, children }) });
30
+ }
31
+ function useSystem() {
32
+ const ctx = React2.useContext(MarwesContext);
33
+ if (!ctx) {
34
+ throw new Error("MarwesProvider is missing. Wrap your app in <MarwesProvider />.");
35
+ }
36
+ return ctx.system;
37
+ }
38
+
39
+ // src/provider/use-theme.ts
40
+ function useTheme() {
41
+ return useSystem().theme;
42
+ }
43
+ var RENDERKIT_EVENT = "marwes/renderkit/renderkit-update";
44
+ function useRenderKitDebug(renderKit, componentName) {
45
+ useEffect(() => {
46
+ if (typeof window !== "undefined") {
47
+ console.log(`[RenderKit Debug] ${componentName}:`, renderKit);
48
+ const event = new CustomEvent(RENDERKIT_EVENT, {
49
+ detail: {
50
+ ...renderKit,
51
+ _meta: { component: componentName }
52
+ }
53
+ });
54
+ window.dispatchEvent(event);
55
+ }
56
+ }, [renderKit, componentName]);
57
+ }
58
+ function Icon({
59
+ name,
60
+ size,
61
+ strokeWidth,
62
+ className,
63
+ "aria-label": ariaLabel,
64
+ decorative
65
+ }) {
66
+ const theme = useTheme();
67
+ const themeIcon = theme.icon;
68
+ const px = resolveIconSize(size ?? themeIcon.size);
69
+ const sw = resolveIconStrokeWidth(strokeWidth ?? themeIcon.strokeWidth);
70
+ const def = iconRegistry[name];
71
+ const isDecorative = decorative || !ariaLabel;
72
+ return /* @__PURE__ */ jsx(
73
+ "svg",
74
+ {
75
+ width: px,
76
+ height: px,
77
+ viewBox: def.viewBox,
78
+ fill: "none",
79
+ stroke: "currentColor",
80
+ strokeWidth: sw,
81
+ strokeLinecap: "round",
82
+ strokeLinejoin: "round",
83
+ className,
84
+ "aria-hidden": isDecorative ? "true" : void 0,
85
+ "aria-label": ariaLabel,
86
+ role: isDecorative ? void 0 : "img",
87
+ focusable: "false",
88
+ children: def.nodes.map((iconNode, nodeIndex) => {
89
+ const TagName = iconNode.tag;
90
+ return /* @__PURE__ */ jsx(TagName, { ...iconNode.attrs }, nodeIndex);
91
+ })
92
+ }
93
+ );
94
+ }
95
+ function Button(props) {
96
+ const theme = useTheme();
97
+ const kit = createButtonRecipe(theme, props);
98
+ useRenderKitDebug(kit, "Button");
99
+ const style = kit.vars;
100
+ const className = props.className ? `${kit.className} ${props.className}` : kit.className;
101
+ const content = /* @__PURE__ */ jsxs(Fragment, { children: [
102
+ props.iconLeft && /* @__PURE__ */ jsx(Icon, { name: props.iconLeft, size: "xs", decorative: true }),
103
+ props.children,
104
+ props.iconRight && /* @__PURE__ */ jsx(Icon, { name: props.iconRight, size: "xs", decorative: true })
105
+ ] });
106
+ if (kit.tag === "button") {
107
+ return /* @__PURE__ */ jsx(
108
+ "button",
109
+ {
110
+ type: kit.a11y.type,
111
+ disabled: kit.a11y.disabled,
112
+ "aria-label": kit.a11y.ariaLabel,
113
+ "aria-busy": kit.a11y.ariaBusy,
114
+ "aria-disabled": kit.a11y.ariaDisabled,
115
+ "aria-pressed": kit.a11y.ariaPressed,
116
+ "aria-expanded": kit.a11y.ariaExpanded,
117
+ "aria-controls": kit.a11y.ariaControls,
118
+ title: kit.a11y.title,
119
+ className,
120
+ style,
121
+ onClick: (e) => props.onClick?.(e),
122
+ ...kit.dataAttributes,
123
+ children: content
124
+ }
125
+ );
126
+ }
127
+ return /* @__PURE__ */ jsx(
128
+ "a",
129
+ {
130
+ href: kit.a11y.href,
131
+ role: kit.a11y.role,
132
+ tabIndex: kit.a11y.tabIndex,
133
+ "aria-label": kit.a11y.ariaLabel,
134
+ "aria-busy": kit.a11y.ariaBusy,
135
+ "aria-disabled": kit.a11y.ariaDisabled,
136
+ "aria-pressed": kit.a11y.ariaPressed,
137
+ "aria-expanded": kit.a11y.ariaExpanded,
138
+ "aria-controls": kit.a11y.ariaControls,
139
+ title: kit.a11y.title,
140
+ className,
141
+ style,
142
+ onClick: (e) => {
143
+ if (kit.blockClick) {
144
+ e.preventDefault();
145
+ return;
146
+ }
147
+ props.onClick?.(e);
148
+ },
149
+ ...kit.dataAttributes,
150
+ children: content
151
+ }
152
+ );
153
+ }
154
+ function DangerButton(props) {
155
+ const { confirmation = true, ...restProps } = props;
156
+ return /* @__PURE__ */ jsx(
157
+ Button,
158
+ {
159
+ ...restProps,
160
+ tone: "primary",
161
+ action: "delete",
162
+ confirmation,
163
+ dataAttributes: {
164
+ ...props.dataAttributes,
165
+ "data-destructive": "true",
166
+ "data-confirmation-required": confirmation ? "true" : "false"
167
+ }
168
+ }
169
+ );
170
+ }
171
+ function CreateButton(props) {
172
+ return /* @__PURE__ */ jsx(
173
+ Button,
174
+ {
175
+ ...props,
176
+ action: "create",
177
+ tone: props.tone ?? "primary",
178
+ dataAttributes: {
179
+ ...props.dataAttributes,
180
+ "data-creative": "true"
181
+ }
182
+ }
183
+ );
184
+ }
185
+ function SubmitButton(props) {
186
+ return /* @__PURE__ */ jsx(
187
+ Button,
188
+ {
189
+ ...props,
190
+ as: "button",
191
+ action: "submit",
192
+ dataAttributes: {
193
+ "data-context": "form-submit",
194
+ ...props.dataAttributes
195
+ }
196
+ }
197
+ );
198
+ }
199
+ function CancelButton(props) {
200
+ return /* @__PURE__ */ jsx(
201
+ Button,
202
+ {
203
+ ...props,
204
+ action: "cancel",
205
+ tone: props.tone ?? "secondary",
206
+ dataAttributes: {
207
+ ...props.dataAttributes,
208
+ "data-cancel": "true"
209
+ }
210
+ }
211
+ );
212
+ }
213
+ function LinkButton(props) {
214
+ return /* @__PURE__ */ jsx(
215
+ Button,
216
+ {
217
+ ...props,
218
+ as: "a",
219
+ action: "navigate",
220
+ dataAttributes: {
221
+ ...props.dataAttributes,
222
+ "data-navigation": "true"
223
+ }
224
+ }
225
+ );
226
+ }
227
+ function PrimaryButton(props) {
228
+ return /* @__PURE__ */ jsx(Button, { ...props, tone: "primary", as: "button" });
229
+ }
230
+ function SecondaryButton(props) {
231
+ return /* @__PURE__ */ jsx(Button, { ...props, tone: "secondary", as: "button" });
232
+ }
233
+ function TextButton(props) {
234
+ return /* @__PURE__ */ jsx(Button, { ...props, tone: "text", as: "button" });
235
+ }
236
+ function Input(props) {
237
+ const theme = useTheme();
238
+ const kit = createInputRecipe(theme, props);
239
+ useRenderKitDebug(kit, "Input");
240
+ const style = kit.vars;
241
+ const className = props.className ? `${kit.className} ${props.className}` : kit.className;
242
+ const handleChange = (e) => {
243
+ props.onValueChange?.(e.target.value);
244
+ };
245
+ return /* @__PURE__ */ jsx(
246
+ "input",
247
+ {
248
+ className,
249
+ style,
250
+ id: kit.a11y.id,
251
+ name: kit.a11y.name,
252
+ type: kit.a11y.type,
253
+ inputMode: kit.a11y.inputMode,
254
+ autoComplete: kit.a11y.autoComplete,
255
+ placeholder: kit.a11y.placeholder,
256
+ disabled: kit.a11y.disabled,
257
+ readOnly: kit.a11y.readOnly,
258
+ required: kit.a11y.required,
259
+ "aria-label": kit.a11y.ariaLabel,
260
+ "aria-invalid": kit.a11y.ariaInvalid,
261
+ "aria-describedby": kit.a11y.ariaDescribedBy,
262
+ value: props.value,
263
+ defaultValue: props.defaultValue,
264
+ onChange: handleChange
265
+ }
266
+ );
267
+ }
268
+ function Checkbox(props) {
269
+ const { onCheckedChange, onChange, ...coreProps } = props;
270
+ const theme = useTheme();
271
+ const kit = checkboxRecipe({ ...coreProps, theme });
272
+ const inputRef = React2.useRef(null);
273
+ React2.useLayoutEffect(() => {
274
+ const el = inputRef.current;
275
+ if (!el) return;
276
+ el.indeterminate = kit.indeterminate;
277
+ }, [kit.indeterminate]);
278
+ const handleChange = (e) => {
279
+ onChange?.(e);
280
+ onCheckedChange?.(e.currentTarget.checked);
281
+ };
282
+ const { a11y } = kit;
283
+ return /* @__PURE__ */ jsx(
284
+ "input",
285
+ {
286
+ ref: inputRef,
287
+ type: "checkbox",
288
+ className: kit.className,
289
+ style: kit.vars,
290
+ id: a11y.id,
291
+ name: a11y.name,
292
+ value: a11y.value,
293
+ disabled: a11y.disabled === true,
294
+ required: a11y.required === true,
295
+ "aria-label": a11y.ariaLabel,
296
+ "aria-labelledby": a11y.ariaLabelledBy,
297
+ "aria-describedby": a11y.ariaDescribedBy,
298
+ "aria-checked": a11y.ariaChecked,
299
+ "aria-invalid": a11y.ariaInvalid === true ? true : void 0,
300
+ checked: kit.checked,
301
+ defaultChecked: kit.defaultChecked,
302
+ onChange: handleChange
303
+ }
304
+ );
305
+ }
306
+ var Divider = React2.forwardRef((props, ref) => {
307
+ const { className: customClassName, style: customStyle, ...opts } = props;
308
+ const theme = useTheme();
309
+ const kit = createDividerRecipe(theme, opts);
310
+ const style = { ...kit.vars, ...customStyle };
311
+ const className = customClassName ? `${kit.className} ${customClassName}` : kit.className;
312
+ return /* @__PURE__ */ jsx("hr", { ref, ...kit.a11y, ...kit.dataAttributes, className, style });
313
+ });
314
+ Divider.displayName = "Divider";
315
+ function H1(props) {
316
+ const { children, className: customClassName, style: customStyle, ...opts } = props;
317
+ const theme = useTheme();
318
+ const kit = headingRecipe({ ...opts, level: 1 }, theme);
319
+ const style = { ...kit.vars, ...customStyle };
320
+ const className = customClassName ? `${kit.className} ${customClassName}` : kit.className;
321
+ return /* @__PURE__ */ jsx("h1", { id: kit.a11y.id, "aria-label": kit.a11y.ariaLabel, className, style, children });
322
+ }
323
+ function H2(props) {
324
+ const { children, className: customClassName, style: customStyle, ...opts } = props;
325
+ const theme = useTheme();
326
+ const kit = headingRecipe({ ...opts, level: 2 }, theme);
327
+ const style = { ...kit.vars, ...customStyle };
328
+ const className = customClassName ? `${kit.className} ${customClassName}` : kit.className;
329
+ return /* @__PURE__ */ jsx("h2", { id: kit.a11y.id, "aria-label": kit.a11y.ariaLabel, className, style, children });
330
+ }
331
+ function H3(props) {
332
+ const { children, className: customClassName, style: customStyle, ...opts } = props;
333
+ const theme = useTheme();
334
+ const kit = headingRecipe({ ...opts, level: 3 }, theme);
335
+ const style = { ...kit.vars, ...customStyle };
336
+ const className = customClassName ? `${kit.className} ${customClassName}` : kit.className;
337
+ return /* @__PURE__ */ jsx("h3", { id: kit.a11y.id, "aria-label": kit.a11y.ariaLabel, className, style, children });
338
+ }
339
+ function Paragraph(props) {
340
+ const { children, className: customClassName, style: customStyle, ...opts } = props;
341
+ const theme = useTheme();
342
+ const kit = paragraphRecipe(opts, theme);
343
+ const style = { ...kit.vars, ...customStyle };
344
+ const className = customClassName ? `${kit.className} ${customClassName}` : kit.className;
345
+ return /* @__PURE__ */ jsx("p", { id: kit.a11y.id, className, style, children });
346
+ }
347
+ function cx(...parts) {
348
+ return parts.filter(Boolean).join(" ");
349
+ }
350
+ function CheckboxField(props) {
351
+ const reactId = React2.useId();
352
+ const id = props.id ?? `mw-checkbox-${reactId}`;
353
+ const hasDescription = props.description !== void 0;
354
+ const hasError = props.error !== void 0;
355
+ const descId = hasDescription ? `${id}-desc` : void 0;
356
+ const errorId = hasError ? `${id}-error` : void 0;
357
+ const describedByParts = [props.ariaDescribedBy, descId, errorId].filter(Boolean);
358
+ const mergedDescribedBy = describedByParts.length > 0 ? describedByParts.join(" ") : void 0;
359
+ const disabled = props.checkbox.disabled || false;
360
+ const invalid = hasError || props.checkbox.invalid || false;
361
+ const wrapperClass = cx(
362
+ "mw-checkbox-field",
363
+ disabled && "mw-checkbox-field--disabled",
364
+ invalid && "mw-checkbox-field--invalid"
365
+ );
366
+ const checkboxProps = {
367
+ ...props.checkbox,
368
+ id,
369
+ invalid
370
+ };
371
+ if (mergedDescribedBy) {
372
+ checkboxProps.ariaDescribedBy = mergedDescribedBy;
373
+ }
374
+ return /* @__PURE__ */ jsxs("div", { className: wrapperClass, children: [
375
+ /* @__PURE__ */ jsxs("div", { className: "mw-checkbox-field__row", children: [
376
+ /* @__PURE__ */ jsx(Checkbox, { ...checkboxProps }),
377
+ /* @__PURE__ */ jsx("label", { className: "mw-checkbox-field__label", htmlFor: id, children: /* @__PURE__ */ jsx(Paragraph, { size: "md", children: props.label }) })
378
+ ] }),
379
+ hasDescription && /* @__PURE__ */ jsx("div", { className: "mw-checkbox-field__description", id: descId, children: /* @__PURE__ */ jsx(Paragraph, { size: "sm", children: props.description }) }),
380
+ hasError && /* @__PURE__ */ jsx("div", { className: "mw-checkbox-field__error", id: errorId, "aria-live": "polite", children: /* @__PURE__ */ jsx(Paragraph, { size: "sm", children: props.error }) })
381
+ ] });
382
+ }
383
+ function cx2(...parts) {
384
+ return parts.filter(Boolean).join(" ");
385
+ }
386
+ function InputField(props) {
387
+ const reactId = React2.useId();
388
+ const id = props.id ?? `mw-input-${reactId}`;
389
+ const hasHelperText = props.helperText !== void 0;
390
+ const hasError = props.error !== void 0;
391
+ const helperTextId = hasHelperText ? `${id}-helper` : void 0;
392
+ const errorId = hasError ? `${id}-error` : void 0;
393
+ const describedByParts = [props.ariaDescribedBy, helperTextId, errorId].filter(Boolean);
394
+ const mergedDescribedBy = describedByParts.length > 0 ? describedByParts.join(" ") : void 0;
395
+ const disabled = props.input.disabled || false;
396
+ const readOnly = props.input.readOnly || false;
397
+ const invalid = hasError || props.input.invalid || false;
398
+ const wrapperClass = cx2(
399
+ "mw-input-field",
400
+ disabled && "mw-input-field--disabled",
401
+ invalid && "mw-input-field--invalid",
402
+ readOnly && "mw-input-field--readonly"
403
+ );
404
+ const inputProps = {
405
+ ...props.input,
406
+ id,
407
+ invalid
408
+ };
409
+ if (mergedDescribedBy) {
410
+ inputProps.describedBy = mergedDescribedBy;
411
+ }
412
+ return /* @__PURE__ */ jsxs("div", { className: wrapperClass, children: [
413
+ /* @__PURE__ */ jsx("label", { className: "mw-input-field__label", htmlFor: id, children: /* @__PURE__ */ jsx(Paragraph, { size: "md", children: props.label }) }),
414
+ /* @__PURE__ */ jsx(Input, { ...inputProps }),
415
+ hasHelperText && !hasError && /* @__PURE__ */ jsx("div", { className: "mw-input-field__helper", id: helperTextId, children: /* @__PURE__ */ jsx(Paragraph, { size: "sm", children: props.helperText }) }),
416
+ hasError && /* @__PURE__ */ jsx("div", { className: "mw-input-field__error", id: errorId, "aria-live": "polite", children: /* @__PURE__ */ jsx(Paragraph, { size: "sm", children: props.error }) })
417
+ ] });
418
+ }
419
+
420
+ export { Button, CancelButton, Checkbox, CheckboxField, CreateButton, DangerButton, Divider, H1, H2, H3, Icon, Input, InputField, LinkButton, MarwesProvider, Paragraph, PrimaryButton, SecondaryButton, SubmitButton, TextButton, useRenderKitDebug, useSystem, useTheme };
421
+ //# sourceMappingURL=index.js.map
422
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/provider/marwes-context.ts","../src/provider/marwes-provider.tsx","../src/provider/use-system.ts","../src/provider/use-theme.ts","../src/hooks/use-renderkit-debug.ts","../src/components/icon/icon.tsx","../src/components/button.tsx","../src/components/button-variants.tsx","../src/components/input.tsx","../src/components/checkbox/checkbox.tsx","../src/components/divider.tsx","../src/components/heading/h1.tsx","../src/components/heading/h2.tsx","../src/components/heading/h3.tsx","../src/components/paragraph/paragraph.tsx","../src/components/checkbox/checkbox-field.tsx","../src/components/input-field.tsx"],"names":["React","React3","jsx","React4","React5","headingRecipe","React6","jsxs","cx","React7"],"mappings":";;;;;;;AAQO,IAAM,aAAA,GAAsBA,qBAAyC,IAAI,CAAA;AC4BzE,SAAS,cAAA,CAAe;AAAA,EAC7B,MAAA,GAAS,YAAA;AAAA,EACT,KAAA;AAAA,EACA,IAAA,GAAO,OAAA;AAAA,EACP,YAAA;AAAA,EACA;AACF,CAAA,EAAwB;AAEtB,EAAA,MAAM,aAAA,GAAsB,eAAQ,MAAM;AACxC,IAAA,OAAO,YAAA,CAAa;AAAA,MAClB,MAAA;AAAA,MACA,KAAA,EAAO,QAAQ,EAAE,GAAG,OAAO,IAAA,EAAK,GAAI,EAAE,IAAA;AAAK,KAC5C,CAAA;AAAA,EACH,CAAA,EAAG,CAAC,MAAA,EAAQ,KAAA,EAAO,IAAI,CAAC,CAAA;AAGxB,EAAA,MAAM,MAAA,GAAuB,eAAQ,MAAM;AACzC,IAAA,IAAI,IAAA,KAAS,aAAA,CAAc,KAAA,CAAM,IAAA,EAAM;AACrC,MAAA,OAAO,aAAA;AAAA,IACT;AACA,IAAA,OAAO,UAAA,CAAW,eAAe,IAAI,CAAA;AAAA,EACvC,CAAA,EAAG,CAAC,aAAA,EAAe,IAAI,CAAC,CAAA;AAGxB,EAAA,MAAM,UAAA,GAAa,CAAA,UAAA,EAAa,MAAA,CAAO,KAAA,CAAM,IAAI,CAAA,CAAA;AAEjD,EAAA,uBACE,GAAA,CAAC,aAAA,CAAc,QAAA,EAAd,EAAuB,OAAO,EAAE,MAAA,EAAQ,YAAA,EAAa,EACpD,QAAA,kBAAA,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,UAAA,EAAa,UAAS,CAAA,EACxC,CAAA;AAEJ;AC/DO,SAAS,SAAA,GAAoB;AAClC,EAAA,MA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,IAAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,YAAA,EACd,QAAA,EAAA;AAAA,oBAAAL,GAAAA,CAAC,OAAA,EAAA,EAAM,SAAA,EAAU,uBAAA,EAAwB,OAAA,EAAS,EAAA,EAChD,QAAA,kBAAAA,GAAAA,CAAC,SAAA,EAAA,EAAU,IAAA,EAAK,IAAA,EAAM,QAAA,EAAA,KAAA,CAAM,OAAM,CAAA,EACpC,CAAA;AAAA,oBAEAA,GAAAA,CAAC,KAAA,EAAA,EAAO,GAAG,UAAA,EAAY,CAAA;AAAA,IAEtB,iBAAiB,CAAC,QAAA,oBACjBA,GAAAA,CAAC,SAAI,SAAA,EAAU,wBAAA,EAAyB,EAAA,EAAI,YAAA,EAC1C,0BAAAA,GAAAA,CAAC,SAAA,EAAA,EAAU,MAAK,IAAA,EAAM,QAAA,EAAA,KAAA,CAAM,YAAW,CAAA,EACzC,CAAA;AAAA,IAGD,4BACCA,GAAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,yBAAwB,EAAA,EAAI,OAAA,EAAS,WAAA,EAAU,QAAA,EAC5D,0BAAAA,GAAAA,CAAC,SAAA,EAAA,EAAU,MAAK,IAAA,EAAM,QAAA,EAAA,KAAA,CAAM,OAAM,CAAA,EACpC;AAAA,GAAA,EAEJ,CAAA;AAEJ","file":"index.js","sourcesContent":["import type { System, ThemeMode } from \"@marwes-ui/core\"\nimport * as React from \"react\"\n\nexport type MarwesContextValue = {\n system: System\n onModeChange: ((mode: ThemeMode) => void) | undefined\n}\n\nexport const MarwesContext = React.createContext<MarwesContextValue | null>(null)\n","import type { Preset, System, ThemeMode, ThemeOverrides } from \"@marwes-ui/core\"\nimport { createSystem, switchMode } from \"@marwes-ui/core\"\nimport { firstEdition } from \"@marwes-ui/presets\"\nimport * as React from \"react\"\nimport { MarwesContext } from \"./marwes-context\"\n\nexport type MarwesProviderProps = {\n preset?: Preset\n theme?: ThemeOverrides\n /**\n * Current theme mode. Determines light or dark color palette.\n * When changed, efficiently switches theme colors without recreating the entire system.\n */\n mode?: ThemeMode\n /**\n * Callback fired when mode should change.\n * Users are responsible for managing mode state and persistence (e.g., localStorage).\n *\n * Example with persistence:\n * ```tsx\n * const [mode, setMode] = useState<ThemeMode>(\n * () => (localStorage.getItem('theme-mode') as ThemeMode) ?? 'light'\n * );\n *\n * const handleModeChange = (newMode: ThemeMode) => {\n * setMode(newMode);\n * localStorage.setItem('theme-mode', newMode);\n * };\n *\n * <MarwesProvider mode={mode} onModeChange={handleModeChange}>\n * ```\n */\n onModeChange?: (mode: ThemeMode) => void\n children: React.ReactNode\n}\n\nexport function MarwesProvider({\n preset = firstEdition,\n theme,\n mode = \"light\",\n onModeChange,\n children,\n}: MarwesProviderProps) {\n // Create initial system\n const initialSystem = React.useMemo(() => {\n return createSystem({\n preset,\n theme: theme ? { ...theme, mode } : { mode },\n })\n }, [preset, theme, mode])\n\n // Optimize mode switching using switchMode() instead of recreating system\n const system: System = React.useMemo(() => {\n if (mode === initialSystem.theme.mode) {\n return initialSystem\n }\n return switchMode(initialSystem, mode)\n }, [initialSystem, mode])\n\n // Apply theme class to container for CSS-based dark mode overrides\n const themeClass = `mw-theme--${system.theme.mode}`\n\n return (\n <MarwesContext.Provider value={{ system, onModeChange }}>\n <div className={themeClass}>{children}</div>\n </MarwesContext.Provider>\n )\n}\n","import type { System } from \"@marwes-ui/core\"\nimport * as React from \"react\"\nimport { MarwesContext } from \"./marwes-context\"\n\nexport function useSystem(): System {\n const ctx = React.useContext(MarwesContext)\n if (!ctx) {\n throw new Error(\"MarwesProvider is missing. Wrap your app in <MarwesProvider />.\")\n }\n return ctx.system\n}\n","import type { Theme } from \"@marwes-ui/core\"\nimport { useSystem } from \"./use-system\"\n\nexport function useTheme(): Theme {\n return useSystem().theme\n}\n","import { useEffect } from \"react\"\n\nconst RENDERKIT_EVENT = \"marwes/renderkit/renderkit-update\"\n\nexport function useRenderKitDebug(renderKit: unknown, componentName: string) {\n useEffect(() => {\n if (typeof window !== \"undefined\") {\n console.log(`[RenderKit Debug] ${componentName}:`, renderKit)\n const event = new CustomEvent(RENDERKIT_EVENT, {\n detail: {\n ...(renderKit as Record<string, unknown>),\n _meta: { component: componentName },\n },\n })\n window.dispatchEvent(event)\n }\n }, [renderKit, componentName])\n}\n","import {\n type IconSize,\n type IconStrokeWidth,\n iconRegistry,\n resolveIconSize,\n resolveIconStrokeWidth,\n} from \"@marwes-ui/core\"\nimport type * as React from \"react\"\nimport { useTheme } from \"../../provider/use-theme\"\n\ntype IconName = keyof typeof iconRegistry\n\nexport type IconProps = {\n name: IconName\n\n /**\n * Token (\"xs\"|\"sm\"|\"md\"|\"lg\") or a raw px number.\n * Defaults to system.theme.icon.size\n */\n size?: IconSize | number\n\n /**\n * Token (\"xs\"|\"sm\"|\"md\"|\"lg\") or a raw number.\n * Defaults to system.theme.icon.strokeWidth\n */\n strokeWidth?: IconStrokeWidth | number\n\n /**\n * Common props\n */\n className?: string\n \"aria-label\"?: string\n decorative?: boolean\n}\n\nexport function Icon({\n name,\n size,\n strokeWidth,\n className,\n \"aria-label\": ariaLabel,\n decorative,\n}: IconProps) {\n const theme = useTheme()\n const themeIcon = theme.icon\n\n const px = resolveIconSize(size ?? themeIcon.size)\n const sw = resolveIconStrokeWidth(strokeWidth ?? themeIcon.strokeWidth)\n\n const def = iconRegistry[name]\n\n // If no aria-label => decorative\n const isDecorative = decorative || !ariaLabel\n\n return (\n <svg\n width={px}\n height={px}\n viewBox={def.viewBox}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={sw}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={className}\n aria-hidden={isDecorative ? \"true\" : undefined}\n aria-label={ariaLabel}\n role={isDecorative ? undefined : \"img\"}\n focusable=\"false\"\n >\n {def.nodes.map((iconNode, nodeIndex) => {\n const TagName = iconNode.tag\n // biome-ignore lint/suspicious/noArrayIndexKey: Icon nodes are static and never reordered\n return <TagName key={nodeIndex} {...(iconNode.attrs as React.SVGAttributes<SVGElement>)} />\n })}\n </svg>\n )\n}\n","import type { ButtonOptions, CssVars } from \"@marwes-ui/core\"\nimport { createButtonRecipe } from \"@marwes-ui/core\"\nimport type * as React from \"react\"\nimport { useRenderKitDebug } from \"../hooks/use-renderkit-debug\"\nimport { useTheme } from \"../provider/use-theme\"\nimport { Icon } from \"./icon\"\n\ntype StyleWithVars = React.CSSProperties & CssVars\n\nexport type ButtonProps = ButtonOptions & {\n children?: React.ReactNode\n onClick?: (e: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void\n className?: string\n}\n\nexport function Button(props: ButtonProps) {\n const theme = useTheme()\n const kit = createButtonRecipe(theme, props)\n\n // Debug hook for Storybook RenderKit addon\n useRenderKitDebug(kit, \"Button\")\n\n const style = kit.vars as StyleWithVars\n const className = props.className ? `${kit.className} ${props.className}` : kit.className\n\n const content = (\n <>\n {props.iconLeft && <Icon name={props.iconLeft} size=\"xs\" decorative />}\n {props.children}\n {props.iconRight && <Icon name={props.iconRight} size=\"xs\" decorative />}\n </>\n )\n\n if (kit.tag === \"button\") {\n return (\n <button\n type={kit.a11y.type}\n disabled={kit.a11y.disabled}\n aria-label={kit.a11y.ariaLabel}\n aria-busy={kit.a11y.ariaBusy}\n aria-disabled={kit.a11y.ariaDisabled}\n aria-pressed={kit.a11y.ariaPressed}\n aria-expanded={kit.a11y.ariaExpanded}\n aria-controls={kit.a11y.ariaControls}\n title={kit.a11y.title}\n className={className}\n style={style}\n onClick={(e) => props.onClick?.(e)}\n {...kit.dataAttributes}\n >\n {content}\n </button>\n )\n }\n\n return (\n <a\n href={kit.a11y.href}\n role={kit.a11y.role}\n tabIndex={kit.a11y.tabIndex}\n aria-label={kit.a11y.ariaLabel}\n aria-busy={kit.a11y.ariaBusy}\n aria-disabled={kit.a11y.ariaDisabled}\n aria-pressed={kit.a11y.ariaPressed}\n aria-expanded={kit.a11y.ariaExpanded}\n aria-controls={kit.a11y.ariaControls}\n title={kit.a11y.title}\n className={className}\n style={style}\n onClick={(e) => {\n if (kit.blockClick) {\n e.preventDefault()\n return\n }\n props.onClick?.(e)\n }}\n {...kit.dataAttributes}\n >\n {content}\n </a>\n )\n}\n","import { Button, type ButtonProps } from \"./button\"\n\n/**\n * Semantic Button Variants - AI-Friendly Components\n *\n * These variants encode best practices and automatically set AI-friendly\n * metadata, making it easier for both developers and AI tools to understand\n * the purpose and behavior of each button.\n */\n\n// ============================================================================\n// DANGER BUTTON - Destructive Actions\n// ============================================================================\n\nexport type DangerButtonProps = Omit<ButtonProps, \"tone\" | \"action\"> & {\n /**\n * Override automatic confirmation requirement.\n * Defaults to `true` for destructive actions.\n */\n confirmation?: boolean\n}\n\n/**\n * DangerButton - For destructive actions like delete, remove, or irreversible operations.\n *\n * **AI Context:**\n * - Sets `tone=\"danger\"` for visual warning\n * - Sets `action=\"delete\"` to indicate destructive behavior\n * - Enables confirmation by default\n * - Adds `data-destructive=\"true\"` for AI parsing\n *\n * @example\n * ```tsx\n * import { DangerButton } from \"@marwes-ui/react\";\n *\n * export function Example() {\n * return <DangerButton onClick={deleteProject}>Delete Project</DangerButton>;\n * }\n * ```\n */\nexport function DangerButton(props: DangerButtonProps) {\n const { confirmation = true, ...restProps } = props\n\n return (\n <Button\n {...restProps}\n tone=\"primary\"\n action=\"delete\"\n confirmation={confirmation}\n dataAttributes={{\n ...props.dataAttributes,\n \"data-destructive\": \"true\",\n \"data-confirmation-required\": confirmation ? \"true\" : \"false\",\n }}\n />\n )\n}\n\n// ============================================================================\n// CREATE BUTTON - Creation Actions\n// ============================================================================\n\nexport type CreateButtonProps = Omit<ButtonProps, \"action\">\n\n/**\n * CreateButton - For creation actions like adding new items or entities.\n *\n * **AI Context:**\n * - Sets `action=\"create\"` to indicate creation behavior\n * - Uses primary tone by default\n * - Adds `data-creative=\"true\"` for AI parsing\n *\n * @example\n * ```tsx\n * <CreateButton onClick={createProject}>\n * New Project\n * </CreateButton>\n * ```\n */\nexport function CreateButton(props: CreateButtonProps) {\n return (\n <Button\n {...props}\n action=\"create\"\n tone={props.tone ?? \"primary\"}\n dataAttributes={{\n ...props.dataAttributes,\n \"data-creative\": \"true\",\n }}\n />\n )\n}\n\n// ============================================================================\n// SUBMIT BUTTON - Form Submissions\n// ============================================================================\n\nexport type SubmitButtonProps = Omit<ButtonProps, \"action\" | \"as\">\n\n/**\n * SubmitButton - For form submissions.\n *\n * **AI Context:**\n * - Sets `action=\"submit\"` and `type=\"submit\"`\n * - Adds `data-context=\"form-submit\"` for AI parsing\n * - Automatically uses button element (not anchor)\n *\n * @example\n * ```tsx\n * <SubmitButton>Submit</SubmitButton>\n * ```\n */\nexport function SubmitButton(props: SubmitButtonProps) {\n return (\n <Button\n {...props}\n as=\"button\"\n action=\"submit\"\n dataAttributes={{\n \"data-context\": \"form-submit\",\n ...props.dataAttributes,\n }}\n />\n )\n}\n\n// ============================================================================\n// CANCEL BUTTON - Cancel/Reset Actions\n// ============================================================================\n\nexport type CancelButtonProps = Omit<ButtonProps, \"action\" | \"variant\">\n\n/**\n * CancelButton - For cancel or reset actions.\n *\n * **AI Context:**\n * - Sets `action=\"cancel\"` to indicate cancellation\n * - Uses ghost variant and secondary tone by default\n * - Adds `data-cancel=\"true\"` for AI parsing\n *\n * @example\n * ```tsx\n * <CancelButton onClick={handleCancel}>\n * Cancel\n * </CancelButton>\n * ```\n */\nexport function CancelButton(props: CancelButtonProps) {\n return (\n <Button\n {...props}\n action=\"cancel\"\n tone={props.tone ?? \"secondary\"}\n dataAttributes={{\n ...props.dataAttributes,\n \"data-cancel\": \"true\",\n }}\n />\n )\n}\n\n// ============================================================================\n// LINK BUTTON - Navigation Actions\n// ============================================================================\n\nexport type LinkButtonProps = Omit<ButtonProps, \"action\" | \"as\"> & {\n /**\n * The URL to navigate to. Required for LinkButton.\n */\n href: string\n}\n\n/**\n * LinkButton - For navigation actions that look like buttons.\n *\n * **AI Context:**\n * - Sets `action=\"navigate\"` to indicate navigation\n * - Uses anchor element with button styling\n * - Adds `data-navigation=\"true\"` for AI parsing\n *\n * @example\n * ```tsx\n * <LinkButton href=\"/dashboard\">\n * Go to Dashboard\n * </LinkButton>\n * ```\n */\nexport function LinkButton(props: LinkButtonProps) {\n return (\n <Button\n {...props}\n as=\"a\"\n action=\"navigate\"\n dataAttributes={{\n ...props.dataAttributes,\n \"data-navigation\": \"true\",\n }}\n />\n )\n}\n\n// ============================================================================\n// PRIMARY BUTTON - General Actions\n// ============================================================================\n\nexport type PrimaryButtonProps = Omit<ButtonProps, \"tone\" | \"as\"> & {}\n\n/**\n * PrimaryButton - For general use when no specific semantic variant fits.\n *\n * @example\n * ```tsx\n * <PrimaryButton onClick={handlePrimaryAction}>\n * Do something important\n * </PrimaryButton>\n * ```\n */\nexport function PrimaryButton(props: PrimaryButtonProps) {\n return <Button {...props} tone=\"primary\" as=\"button\" />\n}\n\n// ============================================================================\n// SECONDARY BUTTON - General Actions\n// ============================================================================\n\nexport type SecondaryButtonProps = Omit<ButtonProps, \"tone\" | \"as\"> & {}\n\n/**\n * SecondaryButton - For general use when no specific semantic variant fits.\n *\n * @example\n * ```tsx\n * <SecondaryButton onClick={handleSecondaryAction}>\n * Do something important\n * </SecondaryButton>\n * ```\n */\nexport function SecondaryButton(props: SecondaryButtonProps) {\n return <Button {...props} tone=\"secondary\" as=\"button\" />\n}\n\n// ============================================================================\n// TEXT BUTTON - General Actions\n// ============================================================================\n\nexport type TextButtonProps = Omit<ButtonProps, \"tone\" | \"as\"> & {}\n\n/**\n * TextButton - For general use when no specific semantic variant fits.\n *\n * @example\n * ```tsx\n * <TextButton onClick={handleTextAction}>\n * Do something important\n * </TextButton>\n * ```\n */\nexport function TextButton(props: TextButtonProps) {\n return <Button {...props} tone=\"text\" as=\"button\" />\n}\n","import type { CssVars, InputOptions } from \"@marwes-ui/core\"\nimport { createInputRecipe } from \"@marwes-ui/core\"\nimport type * as React from \"react\"\nimport { useRenderKitDebug } from \"../hooks/use-renderkit-debug\"\nimport { useTheme } from \"../provider/use-theme\"\n\ntype StyleWithVars = React.CSSProperties & CssVars\n\nexport type InputProps = InputOptions & {\n onValueChange?: (value: string) => void\n className?: string\n}\n\nexport function Input(props: InputProps) {\n const theme = useTheme()\n const kit = createInputRecipe(theme, props)\n\n // Debug hook for Storybook RenderKit addon\n useRenderKitDebug(kit, \"Input\")\n\n const style = kit.vars as StyleWithVars\n const className = props.className ? `${kit.className} ${props.className}` : kit.className\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n props.onValueChange?.(e.target.value)\n }\n\n return (\n <input\n className={className}\n style={style}\n id={kit.a11y.id}\n name={kit.a11y.name}\n type={kit.a11y.type}\n inputMode={kit.a11y.inputMode}\n autoComplete={kit.a11y.autoComplete}\n placeholder={kit.a11y.placeholder}\n disabled={kit.a11y.disabled}\n readOnly={kit.a11y.readOnly}\n required={kit.a11y.required}\n aria-label={kit.a11y.ariaLabel}\n aria-invalid={kit.a11y.ariaInvalid}\n aria-describedby={kit.a11y.ariaDescribedBy}\n value={props.value}\n defaultValue={props.defaultValue}\n onChange={handleChange}\n />\n )\n}\n","/**\n * React adapter for Marwes Checkbox.\n * - Renders a native <input type=\"checkbox\"> using the core render kit.\n * - Applies strict a11y fields and CSS vars.\n * - Sets `indeterminate` via DOM property (not an HTML attribute).\n */\n\nimport { checkboxRecipe } from \"@marwes-ui/core\"\nimport type { CheckboxProps as CoreCheckboxProps } from \"@marwes-ui/core\"\nimport * as React from \"react\"\nimport { useTheme } from \"../../provider/use-theme\"\n\nexport type CheckboxProps = CoreCheckboxProps & {\n /**\n * Called with the next checked value when the user toggles the checkbox.\n * For indeterminate state: browser toggling typically results in `checked=true` and `indeterminate=false`\n * unless you keep controlling it.\n */\n onCheckedChange?: (checked: boolean) => void\n\n /**\n * Escape hatch for consumers that want raw event access.\n * (Optional – keep if you want parity with other components.)\n */\n onChange?: React.ChangeEventHandler<HTMLInputElement>\n}\n\n/**\n * Checkbox (Atom)\n *\n * Low-level checkbox control built on a native `<input type=\"checkbox\">`.\n * Use this when you need custom layout or when the label/description is handled\n * elsewhere (e.g. inside a list item, table row, or custom field wrapper).\n *\n * For most forms, prefer `CheckboxField`, which composes `Checkbox` with\n * label/description/error wiring and consistent spacing.\n *\n * Accessibility\n * - Provide **either** `ariaLabel` **or** `ariaLabelledBy` (or use `CheckboxField` which wires a `<label>`).\n * - Use `ariaDescribedBy` to connect supporting text (help/error).\n * - `indeterminate` is applied via a DOM property, not an HTML attribute.\n *\n * @example Basic (uncontrolled)\n * ```tsx\n * <Checkbox ariaLabel=\"Subscribe to updates\" defaultChecked />\n * ```\n *\n * @example Controlled\n * ```tsx\n * const [checked, setChecked] = React.useState(false);\n *\n * <Checkbox\n * ariaLabel=\"Accept terms\"\n * checked={checked}\n * onCheckedChange={setChecked}\n * />\n * ```\n *\n * @example Indeterminate (mixed)\n * ```tsx\n * const [checked, setChecked] = React.useState(false);\n * const [mixed, setMixed] = React.useState(true);\n *\n * <Checkbox\n * ariaLabel=\"Select all\"\n * checked={checked}\n * indeterminate={mixed}\n * onCheckedChange={(next) => {\n * setMixed(false); // first interaction clears mixed state\n * setChecked(next);\n * }}\n * />\n * ```\n *\n * @example With external label + description\n * ```tsx\n * const id = \"terms\";\n * const descId = \"terms-desc\";\n *\n * <>\n * <div style={{ display: \"flex\", alignItems: \"center\", gap: 10 }}>\n * <Checkbox id={id} ariaDescribedBy={descId} />\n * <label htmlFor={id}>I accept the terms</label>\n * </div>\n * <div id={descId}>Required to continue.</div>\n * </>\n * ```\n */\n\nexport function Checkbox(props: CheckboxProps): React.ReactElement {\n const { onCheckedChange, onChange, ...coreProps } = props\n\n const theme = useTheme()\n\n const kit = checkboxRecipe({ ...coreProps, theme })\n\n const inputRef = React.useRef<HTMLInputElement | null>(null)\n\n // Keep DOM property in sync.\n React.useLayoutEffect(() => {\n const el = inputRef.current\n if (!el) return\n el.indeterminate = kit.indeterminate\n }, [kit.indeterminate])\n\n const handleChange: React.ChangeEventHandler<HTMLInputElement> = (e) => {\n onChange?.(e)\n onCheckedChange?.(e.currentTarget.checked)\n }\n\n const { a11y } = kit\n\n return (\n <input\n ref={inputRef}\n type=\"checkbox\"\n className={kit.className}\n style={kit.vars}\n id={a11y.id}\n name={a11y.name}\n value={a11y.value}\n disabled={a11y.disabled === true}\n required={a11y.required === true}\n aria-label={a11y.ariaLabel}\n aria-labelledby={a11y.ariaLabelledBy}\n aria-describedby={a11y.ariaDescribedBy}\n aria-checked={a11y.ariaChecked}\n aria-invalid={a11y.ariaInvalid === true ? true : undefined}\n checked={kit.checked}\n defaultChecked={kit.defaultChecked}\n onChange={handleChange}\n />\n )\n}\n","/**\n * React adapter for Marwes Divider component.\n * - Renders semantic <hr> using the core divider recipe.\n * - Supports 7 size variants: xxs/xs/sm/md/lg/xl/xxl.\n * - Supports horizontal and vertical orientation.\n * - Figma reference: node-id=1-932\n */\n\nimport { createDividerRecipe } from \"@marwes-ui/core\"\nimport type { DividerOptions, DividerOrientation, DividerSize } from \"@marwes-ui/core\"\nimport type { CssVars } from \"@marwes-ui/core\"\nimport * as React from \"react\"\nimport { useTheme } from \"../provider/use-theme\"\n\ntype StyleWithVars = React.CSSProperties & CssVars\n\nexport type DividerProps = DividerOptions &\n Omit<React.HTMLAttributes<HTMLHRElement>, \"children\"> & {\n /**\n * Size variant for the divider.\n * Maps to pixel values: xxs=1px, xs=8px, sm=16px, md=32px, lg=48px, xl=64px, xxl=80px\n * @default \"md\"\n */\n size?: DividerSize\n\n /**\n * Orientation of the divider.\n * @default \"horizontal\"\n */\n orientation?: DividerOrientation\n\n /**\n * Additional CSS class names.\n */\n className?: string\n\n /**\n * Inline styles.\n */\n style?: React.CSSProperties\n }\n\n/**\n * Divider\n *\n * Semantic separator rendered as `<hr>`.\n * Supports size variants and both horizontal and vertical orientations.\n *\n * @example Basic usage (horizontal, medium size)\n * ```tsx\n * <Divider />\n * ```\n *\n * @example Different sizes\n * ```tsx\n * <Divider size=\"xxs\" /> // 1px hairline\n * <Divider size=\"sm\" /> // 16px\n * <Divider size=\"lg\" /> // 48px\n * ```\n *\n * @example Vertical divider\n * ```tsx\n * <div style={{ display: 'flex', alignItems: 'center', gap: '1rem' }}>\n * <span>Left content</span>\n * <Divider orientation=\"vertical\" size=\"sm\" />\n * <span>Right content</span>\n * </div>\n * ```\n *\n * @example With custom ID\n * ```tsx\n * <Divider id=\"section-break\" />\n * ```\n */\n\nexport const Divider = React.forwardRef<HTMLHRElement, DividerProps>((props, ref) => {\n const { className: customClassName, style: customStyle, ...opts } = props\n\n const theme = useTheme()\n\n const kit = createDividerRecipe(theme, opts)\n\n const style = { ...(kit.vars as StyleWithVars), ...customStyle }\n const className = customClassName ? `${kit.className} ${customClassName}` : kit.className\n\n return <hr ref={ref} {...kit.a11y} {...kit.dataAttributes} className={className} style={style} />\n})\n\nDivider.displayName = \"Divider\"\n","/**\n * React adapter for Marwes H1 component.\n * - Renders semantic <h1> using the core heading recipe.\n * - Supports size override for visual/semantic mismatch.\n */\n\nimport { headingRecipe } from \"@marwes-ui/core\"\nimport type { HeadingOptions, HeadingSize } from \"@marwes-ui/core\"\nimport type { CssVars } from \"@marwes-ui/core\"\nimport type * as React from \"react\"\nimport { useTheme } from \"../../provider/use-theme\"\n\ntype StyleWithVars = React.CSSProperties & CssVars\n\nexport type H1Props = Omit<HeadingOptions, \"level\"> & {\n /**\n * Visual size override.\n * Allows using h1 semantics with different visual styling.\n * @default \"h1\"\n */\n size?: HeadingSize\n\n /**\n * Content of the heading.\n */\n children?: React.ReactNode\n\n /**\n * Additional CSS class names.\n */\n className?: string\n\n /**\n * Inline styles.\n */\n style?: React.CSSProperties\n}\n\n/**\n * H1 (Heading Level 1)\n *\n * Semantic top-level heading rendered as `<h1>`.\n * Supports visual size override for cases where semantic and visual hierarchy differ.\n *\n * @example Basic usage\n * ```tsx\n * <H1>Page Title</H1>\n * ```\n *\n * @example With size override\n * ```tsx\n * <H1 size=\"h2\">Visually smaller but semantically h1</H1>\n * ```\n *\n * @example With ID for anchor linking\n * ```tsx\n * <H1 id=\"introduction\">Introduction</H1>\n * ```\n */\nexport function H1(props: H1Props): React.ReactElement {\n const { children, className: customClassName, style: customStyle, ...opts } = props\n const theme = useTheme()\n\n const kit = headingRecipe({ ...opts, level: 1 }, theme)\n\n const style = { ...(kit.vars as StyleWithVars), ...customStyle }\n const className = customClassName ? `${kit.className} ${customClassName}` : kit.className\n\n return (\n <h1 id={kit.a11y.id} aria-label={kit.a11y.ariaLabel} className={className} style={style}>\n {children}\n </h1>\n )\n}\n","/**\n * React adapter for Marwes H2 component.\n * - Renders semantic <h2> using the core heading recipe.\n * - Supports size override for visual/semantic mismatch.\n */\n\nimport { headingRecipe } from \"@marwes-ui/core\"\nimport type { HeadingOptions, HeadingSize } from \"@marwes-ui/core\"\nimport type { CssVars } from \"@marwes-ui/core\"\nimport type * as React from \"react\"\nimport { useTheme } from \"../../provider/use-theme\"\n\ntype StyleWithVars = React.CSSProperties & CssVars\n\nexport type H2Props = Omit<HeadingOptions, \"level\"> & {\n /**\n * Visual size override.\n * Allows using h2 semantics with different visual styling.\n * @default \"h2\"\n */\n size?: HeadingSize\n\n /**\n * Content of the heading.\n */\n children?: React.ReactNode\n\n /**\n * Additional CSS class names.\n */\n className?: string\n\n /**\n * Inline styles.\n */\n style?: React.CSSProperties\n}\n\n/**\n * H2 (Heading Level 2)\n *\n * Semantic section heading rendered as `<h2>`.\n * Supports visual size override for cases where semantic and visual hierarchy differ.\n *\n * @example Basic usage\n * ```tsx\n * <H2>Section Title</H2>\n * ```\n *\n * @example With size override\n * ```tsx\n * <H2 size=\"h1\">Visually larger but semantically h2</H2>\n * ```\n */\nexport function H2(props: H2Props): React.ReactElement {\n const { children, className: customClassName, style: customStyle, ...opts } = props\n const theme = useTheme()\n\n const kit = headingRecipe({ ...opts, level: 2 }, theme)\n\n const style = { ...(kit.vars as StyleWithVars), ...customStyle }\n const className = customClassName ? `${kit.className} ${customClassName}` : kit.className\n\n return (\n <h2 id={kit.a11y.id} aria-label={kit.a11y.ariaLabel} className={className} style={style}>\n {children}\n </h2>\n )\n}\n","/**\n * React adapter for Marwes H3 component.\n * - Renders semantic <h3> using the core heading recipe.\n * - Supports size override for visual/semantic mismatch.\n */\n\nimport { headingRecipe } from \"@marwes-ui/core\"\nimport type { HeadingOptions, HeadingSize } from \"@marwes-ui/core\"\nimport type { CssVars } from \"@marwes-ui/core\"\nimport type * as React from \"react\"\nimport { useTheme } from \"../../provider/use-theme\"\n\ntype StyleWithVars = React.CSSProperties & CssVars\n\nexport type H3Props = Omit<HeadingOptions, \"level\"> & {\n /**\n * Visual size override.\n * Allows using h3 semantics with different visual styling.\n * @default \"h3\"\n */\n size?: HeadingSize\n\n /**\n * Content of the heading.\n */\n children?: React.ReactNode\n\n /**\n * Additional CSS class names.\n */\n className?: string\n\n /**\n * Inline styles.\n */\n style?: React.CSSProperties\n}\n\n/**\n * H3 (Heading Level 3)\n *\n * Semantic subsection heading rendered as `<h3>`.\n * Supports visual size override for cases where semantic and visual hierarchy differ.\n *\n * @example Basic usage\n * ```tsx\n * <H3>Subsection Title</H3>\n * ```\n *\n * @example With size override\n * ```tsx\n * <H3 size=\"h2\">Visually larger but semantically h3</H3>\n * ```\n */\nexport function H3(props: H3Props): React.ReactElement {\n const { children, className: customClassName, style: customStyle, ...opts } = props\n const theme = useTheme()\n\n const kit = headingRecipe({ ...opts, level: 3 }, theme)\n\n const style = { ...(kit.vars as StyleWithVars), ...customStyle }\n const className = customClassName ? `${kit.className} ${customClassName}` : kit.className\n\n return (\n <h3 id={kit.a11y.id} aria-label={kit.a11y.ariaLabel} className={className} style={style}>\n {children}\n </h3>\n )\n}\n","/**\n * React adapter for Marwes Paragraph component.\n * - Renders semantic <p> using the core paragraph recipe.\n * - Supports size variants: sm/md/lg.\n */\n\nimport { paragraphRecipe } from \"@marwes-ui/core\"\nimport type { ParagraphOptions, ParagraphSize } from \"@marwes-ui/core\"\nimport type { CssVars } from \"@marwes-ui/core\"\nimport type * as React from \"react\"\nimport { useTheme } from \"../../provider/use-theme\"\n\ntype StyleWithVars = React.CSSProperties & CssVars\n\nexport type ParagraphProps = ParagraphOptions & {\n /**\n * Size variant.\n * @default \"md\"\n */\n size?: ParagraphSize\n\n /**\n * Content of the paragraph.\n */\n children?: React.ReactNode\n\n /**\n * Additional CSS class names.\n */\n className?: string\n\n /**\n * Inline styles.\n */\n style?: React.CSSProperties\n}\n\n/**\n * Paragraph\n *\n * Semantic text block rendered as `<p>`.\n * Supports size variants for different text contexts.\n *\n * @example Basic usage\n * ```tsx\n * <Paragraph>This is a standard paragraph.</Paragraph>\n * ```\n *\n * @example With size variant\n * ```tsx\n * <Paragraph size=\"sm\">Small text for disclaimers.</Paragraph>\n * <Paragraph size=\"lg\">Emphasized lead paragraph.</Paragraph>\n * ```\n *\n * @example With ID\n * ```tsx\n * <Paragraph id=\"intro\">Introduction text.</Paragraph>\n * ```\n */\nexport function Paragraph(props: ParagraphProps): React.ReactElement {\n const { children, className: customClassName, style: customStyle, ...opts } = props\n const theme = useTheme()\n\n const kit = paragraphRecipe(opts, theme)\n\n const style = { ...(kit.vars as StyleWithVars), ...customStyle }\n const className = customClassName ? `${kit.className} ${customClassName}` : kit.className\n\n return (\n <p id={kit.a11y.id} className={className} style={style}>\n {children}\n </p>\n )\n}\n","import * as React from \"react\"\nimport { Checkbox } from \".\"\nimport type { CheckboxProps } from \".\"\nimport { Paragraph } from \"../paragraph\"\n\nexport type CheckboxFieldProps = {\n /** Optional: if omitted, we generate one via useId(). */\n id?: string\n\n /** Field content (rendered by adapter). */\n label: React.ReactNode\n description?: React.ReactNode\n error?: React.ReactNode\n\n /** Props forwarded to the Checkbox atom. */\n checkbox: CheckboxProps\n\n /** Additional aria-describedby IDs to merge with internal description/error IDs. */\n ariaDescribedBy?: string\n}\n\nfunction cx(...parts: Array<string | false>): string {\n return parts.filter(Boolean).join(\" \")\n}\n\n/**\n * CheckboxField (Molecule) — Recommended\n *\n * A convenient, accessible wrapper around `Checkbox` that provides:\n * - a clickable `<label>` wired via `htmlFor`/`id`\n * - optional `description` and `error` regions\n * - automatic `aria-describedby` wiring (description + error + any external ids)\n * - automatic invalid state when `error` is present\n *\n * Use `CheckboxField` for most forms. Use `Checkbox` directly only when you need\n * a highly custom layout (tables, list rows, compound list items, etc.).\n *\n * Accessibility\n * - Generates a stable `id` via `useId()` when `id` is not provided.\n * - Always renders a real `<label>` element connected to the checkbox control.\n * - When `description` and/or `error` are present, it sets `aria-describedby`\n * on the checkbox to reference their ids.\n * - When `error` is present, the checkbox is marked invalid (aria-invalid via core).\n *\n * @example Minimal (recommended)\n * ```tsx\n * <CheckboxField\n * label=\"Subscribe to updates\"\n * checkbox={{ defaultChecked: true }}\n * />\n * ```\n *\n * @example With description\n * ```tsx\n * <CheckboxField\n * label=\"Subscribe to updates\"\n * description=\"We'll only email you about important product changes.\"\n * checkbox={{}}\n * />\n * ```\n *\n * @example With error (invalid state)\n * ```tsx\n * <CheckboxField\n * label=\"Accept terms\"\n * error=\"You must accept the terms to continue.\"\n * checkbox={{ required: true }}\n * />\n * ```\n *\n * @example Controlled\n * ```tsx\n * const [checked, setChecked] = React.useState(false);\n *\n * <CheckboxField\n * label=\"Accept terms\"\n * checkbox={{\n * checked,\n * onCheckedChange: setChecked,\n * }}\n * />\n * ```\n *\n * @example Indeterminate (mixed)\n * ```tsx\n * const [checked, setChecked] = React.useState(false);\n * const [mixed, setMixed] = React.useState(true);\n *\n * <CheckboxField\n * label=\"Select all\"\n * description=\"Applies to all items in the current view.\"\n * checkbox={{\n * checked,\n * indeterminate: mixed,\n * onCheckedChange: (next) => {\n * setMixed(false);\n * setChecked(next);\n * },\n * }}\n * />\n * ```\n *\n * @example Custom describedBy (merge with internal description/error)\n * ```tsx\n * <CheckboxField\n * ariaDescribedBy=\"my-extra-help\"\n * label=\"Enable telemetry\"\n * description=\"Helps us improve the product.\"\n * checkbox={{}}\n * />\n *\n * <div id=\"my-extra-help\">This setting can be changed later.</div>\n * ```\n */\n\nexport function CheckboxField(props: CheckboxFieldProps): React.ReactElement {\n const reactId = React.useId()\n const id = props.id ?? `mw-checkbox-${reactId}`\n\n const hasDescription = props.description !== undefined\n const hasError = props.error !== undefined\n\n const descId = hasDescription ? `${id}-desc` : undefined\n const errorId = hasError ? `${id}-error` : undefined\n\n // Merge aria-describedby from multiple sources\n const describedByParts = [props.ariaDescribedBy, descId, errorId].filter(Boolean)\n const mergedDescribedBy = describedByParts.length > 0 ? describedByParts.join(\" \") : undefined\n\n const disabled = props.checkbox.disabled || false\n const invalid = hasError || props.checkbox.invalid || false\n\n const wrapperClass = cx(\n \"mw-checkbox-field\",\n disabled && \"mw-checkbox-field--disabled\",\n invalid && \"mw-checkbox-field--invalid\",\n )\n\n // Prepare checkbox props with proper ariaDescribedBy merging\n const checkboxProps: CheckboxProps = {\n ...props.checkbox,\n id,\n invalid,\n }\n\n if (mergedDescribedBy) {\n checkboxProps.ariaDescribedBy = mergedDescribedBy\n }\n\n return (\n <div className={wrapperClass}>\n <div className=\"mw-checkbox-field__row\">\n <Checkbox {...checkboxProps} />\n\n <label className=\"mw-checkbox-field__label\" htmlFor={id}>\n <Paragraph size=\"md\">{props.label}</Paragraph>\n </label>\n </div>\n\n {hasDescription && (\n <div className=\"mw-checkbox-field__description\" id={descId}>\n <Paragraph size=\"sm\">{props.description}</Paragraph>\n </div>\n )}\n\n {hasError && (\n <div className=\"mw-checkbox-field__error\" id={errorId} aria-live=\"polite\">\n <Paragraph size=\"sm\">{props.error}</Paragraph>\n </div>\n )}\n </div>\n )\n}\n","import * as React from \"react\"\nimport { Input } from \"./input\"\nimport type { InputProps } from \"./input\"\nimport { Paragraph } from \"./paragraph\"\n\nexport type InputFieldProps = {\n /** Optional: if omitted, we generate one via useId(). */\n id?: string\n\n /** Field label (required for accessibility). */\n label: React.ReactNode\n\n /** Optional helper text shown below the input. */\n helperText?: React.ReactNode\n\n /** Optional error message. When present, input is marked invalid. */\n error?: React.ReactNode\n\n /** Props forwarded to the Input atom. */\n input: InputProps\n\n /** Additional aria-describedby IDs to merge with internal helper/error IDs. */\n ariaDescribedBy?: string\n}\n\nfunction cx(...parts: Array<string | false>): string {\n return parts.filter(Boolean).join(\" \")\n}\n\n/**\n * InputField (Molecule) — Recommended\n *\n * A convenient, accessible wrapper around `Input` that provides:\n * - a visible `<label>` wired via `htmlFor`/`id`\n * - optional `helperText` and `error` regions\n * - automatic `aria-describedby` wiring (helperText + error + any external ids)\n * - automatic invalid state when `error` is present\n *\n * Use `InputField` for most forms. Use `Input` directly only when you need\n * a highly custom layout or composite inputs.\n *\n * Accessibility\n * - Generates a stable `id` via `useId()` when `id` is not provided.\n * - Always renders a visible `<label>` element connected to the input control.\n * - When `helperText` and/or `error` are present, it sets `aria-describedby`\n * on the input to reference their ids.\n * - When `error` is present, the input is marked invalid (aria-invalid).\n * - Error region has `aria-live=\"polite\"` for screen reader announcements.\n *\n * @example Minimal (recommended)\n * ```tsx\n * <InputField\n * label=\"Email address\"\n * input={{ type: \"email\", placeholder: \"you@example.com\" }}\n * />\n * ```\n *\n * @example With helper text\n * ```tsx\n * <InputField\n * label=\"Username\"\n * helperText=\"Choose a unique username between 3-20 characters.\"\n * input={{ type: \"text\", placeholder: \"johnsmith\" }}\n * />\n * ```\n *\n * @example With error (invalid state)\n * ```tsx\n * <InputField\n * label=\"Password\"\n * error=\"Password must be at least 8 characters.\"\n * input={{ type: \"password\", required: true }}\n * />\n * ```\n *\n * @example Controlled\n * ```tsx\n * const [email, setEmail] = React.useState(\"\");\n *\n * <InputField\n * label=\"Email\"\n * input={{\n * type: \"email\",\n * value: email,\n * onValueChange: setEmail,\n * }}\n * />\n * ```\n *\n * @example Disabled\n * ```tsx\n * <InputField\n * label=\"Account ID\"\n * helperText=\"This value cannot be changed.\"\n * input={{ value: \"ACC-12345\", disabled: true }}\n * />\n * ```\n *\n * @example Read-only\n * ```tsx\n * <InputField\n * label=\"Account created\"\n * input={{ value: \"January 15, 2026\", readOnly: true }}\n * />\n * ```\n *\n * @example Custom describedBy (merge with internal helper/error)\n * ```tsx\n * <InputField\n * ariaDescribedBy=\"my-extra-help\"\n * label=\"API Key\"\n * helperText=\"Your key is stored securely.\"\n * input={{ type: \"password\" }}\n * />\n *\n * <div id=\"my-extra-help\">This can be regenerated from your settings.</div>\n * ```\n */\nexport function InputField(props: InputFieldProps): React.ReactElement {\n const reactId = React.useId()\n const id = props.id ?? `mw-input-${reactId}`\n\n const hasHelperText = props.helperText !== undefined\n const hasError = props.error !== undefined\n\n const helperTextId = hasHelperText ? `${id}-helper` : undefined\n const errorId = hasError ? `${id}-error` : undefined\n\n // Merge aria-describedby from multiple sources\n const describedByParts = [props.ariaDescribedBy, helperTextId, errorId].filter(Boolean)\n const mergedDescribedBy = describedByParts.length > 0 ? describedByParts.join(\" \") : undefined\n\n const disabled = props.input.disabled || false\n const readOnly = props.input.readOnly || false\n const invalid = hasError || props.input.invalid || false\n\n const wrapperClass = cx(\n \"mw-input-field\",\n disabled && \"mw-input-field--disabled\",\n invalid && \"mw-input-field--invalid\",\n readOnly && \"mw-input-field--readonly\",\n )\n\n // Prepare input props with proper describedBy merging\n const inputProps: InputProps = {\n ...props.input,\n id,\n invalid,\n }\n\n if (mergedDescribedBy) {\n inputProps.describedBy = mergedDescribedBy\n }\n\n return (\n <div className={wrapperClass}>\n <label className=\"mw-input-field__label\" htmlFor={id}>\n <Paragraph size=\"md\">{props.label}</Paragraph>\n </label>\n\n <Input {...inputProps} />\n\n {hasHelperText && !hasError && (\n <div className=\"mw-input-field__helper\" id={helperTextId}>\n <Paragraph size=\"sm\">{props.helperText}</Paragraph>\n </div>\n )}\n\n {hasError && (\n <div className=\"mw-input-field__error\" id={errorId} aria-live=\"polite\">\n <Paragraph size=\"sm\">{props.error}</Paragraph>\n </div>\n )}\n </div>\n )\n}\n"]}
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@marwes-ui/react",
3
+ "version": "0.0.3",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "private": false,
8
+ "type": "module",
9
+ "sideEffects": false,
10
+ "main": "./dist/index.js",
11
+ "types": "./dist/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "default": "./dist/index.js"
16
+ }
17
+ },
18
+ "files": [
19
+ "dist"
20
+ ],
21
+ "dependencies": {
22
+ "@marwes-ui/core": "0.0.3",
23
+ "@marwes-ui/presets": "0.0.3"
24
+ },
25
+ "peerDependencies": {
26
+ "react": ">=18",
27
+ "react-dom": ">=18"
28
+ },
29
+ "devDependencies": {
30
+ "@types/react": "^18.0.0",
31
+ "@types/react-dom": "^18.0.0",
32
+ "react": "^18.0.0",
33
+ "react-dom": "^18.0.0",
34
+ "rimraf": "^6.0.0",
35
+ "tsup": "^8.0.0",
36
+ "typescript": "^5.4.0"
37
+ },
38
+ "scripts": {
39
+ "dev": "tsup --watch",
40
+ "build": "tsup",
41
+ "typecheck": "tsc -p tsconfig.json --noEmit",
42
+ "test": "echo \"No tests in @marwes-ui/react\"",
43
+ "clean": "rimraf dist",
44
+ "lint": "biome lint .",
45
+ "format": "biome format --write ."
46
+ }
47
+ }