@marwes-ui/core 0.0.3 → 0.0.4
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.d.ts +601 -258
- package/dist/index.js +280 -6
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
package/dist/index.d.ts
CHANGED
|
@@ -162,6 +162,589 @@ declare function switchMode(currentSystem: System, newMode: ThemeMode): System;
|
|
|
162
162
|
|
|
163
163
|
type CssVars = Record<`--mw-${string}`, string>;
|
|
164
164
|
|
|
165
|
+
/**
|
|
166
|
+
* IconName - Enum-like constant for all available icons
|
|
167
|
+
*
|
|
168
|
+
* @generated This file is auto-generated by scripts/generate-icon-names.ts
|
|
169
|
+
* Do not edit manually. Run `pnpm generate:icons` to regenerate.
|
|
170
|
+
*
|
|
171
|
+
* Usage:
|
|
172
|
+
* ```tsx
|
|
173
|
+
* import { IconName } from "@marwes-ui/core"
|
|
174
|
+
*
|
|
175
|
+
* <Icon name={IconName.AlertCircle} />
|
|
176
|
+
* <Button iconRight={IconName.Minus}>Delete</Button>
|
|
177
|
+
* ```
|
|
178
|
+
*/
|
|
179
|
+
declare const IconName: {
|
|
180
|
+
readonly Airplay: "airplay";
|
|
181
|
+
readonly AlertCircle: "alertCircle";
|
|
182
|
+
readonly AlertOctagon: "alertOctagon";
|
|
183
|
+
readonly AlertTriangle: "alertTriangle";
|
|
184
|
+
readonly AlignCenter: "alignCenter";
|
|
185
|
+
readonly AlignJustify: "alignJustify";
|
|
186
|
+
readonly AlignLeft: "alignLeft";
|
|
187
|
+
readonly AlignRight: "alignRight";
|
|
188
|
+
readonly ArrowDown: "arrowDown";
|
|
189
|
+
readonly ArrowDownCircle: "arrowDownCircle";
|
|
190
|
+
readonly ArrowDownLeft: "arrowDownLeft";
|
|
191
|
+
readonly ArrowDownRight: "arrowDownRight";
|
|
192
|
+
readonly ArrowIn: "arrowIn";
|
|
193
|
+
readonly ArrowInCircle: "arrowInCircle";
|
|
194
|
+
readonly ArrowInSquare: "arrowInSquare";
|
|
195
|
+
readonly ArrowLeft: "arrowLeft";
|
|
196
|
+
readonly ArrowLeftCircle: "arrowLeftCircle";
|
|
197
|
+
readonly ArrowOut: "arrowOut";
|
|
198
|
+
readonly ArrowOutCircle: "arrowOutCircle";
|
|
199
|
+
readonly ArrowOutSquare: "arrowOutSquare";
|
|
200
|
+
readonly ArrowRight: "arrowRight";
|
|
201
|
+
readonly ArrowRightCircle: "arrowRightCircle";
|
|
202
|
+
readonly ArrowUp: "arrowUp";
|
|
203
|
+
readonly ArrowUpCircle: "arrowUpCircle";
|
|
204
|
+
readonly ArrowUpLeft: "arrowUpLeft";
|
|
205
|
+
readonly ArrowUpRight: "arrowUpRight";
|
|
206
|
+
readonly AtSign: "atSign";
|
|
207
|
+
readonly BarChart: "barChart";
|
|
208
|
+
readonly BarChart2: "barChart2";
|
|
209
|
+
readonly BarChart3: "barChart3";
|
|
210
|
+
readonly BarChart4: "barChart4";
|
|
211
|
+
readonly Bell: "bell";
|
|
212
|
+
readonly Bluetooth: "bluetooth";
|
|
213
|
+
readonly Bold: "bold";
|
|
214
|
+
readonly Bookmark: "bookmark";
|
|
215
|
+
readonly Calendar: "calendar";
|
|
216
|
+
readonly Camera: "camera";
|
|
217
|
+
readonly Cast: "cast";
|
|
218
|
+
readonly Check: "check";
|
|
219
|
+
readonly CheckCircle: "checkCircle";
|
|
220
|
+
readonly CheckSquare: "checkSquare";
|
|
221
|
+
readonly ChevronDown: "chevronDown";
|
|
222
|
+
readonly ChevronLeft: "chevronLeft";
|
|
223
|
+
readonly ChevronRight: "chevronRight";
|
|
224
|
+
readonly ChevronUp: "chevronUp";
|
|
225
|
+
readonly ChevronsDown: "chevronsDown";
|
|
226
|
+
readonly ChevronsLeft: "chevronsLeft";
|
|
227
|
+
readonly ChevronsRight: "chevronsRight";
|
|
228
|
+
readonly ChevronsUp: "chevronsUp";
|
|
229
|
+
readonly Circle: "circle";
|
|
230
|
+
readonly Clipboard: "clipboard";
|
|
231
|
+
readonly Clock: "clock";
|
|
232
|
+
readonly Code: "code";
|
|
233
|
+
readonly Command: "command";
|
|
234
|
+
readonly Compass: "compass";
|
|
235
|
+
readonly Copy: "copy";
|
|
236
|
+
readonly CornerDownLeft: "cornerDownLeft";
|
|
237
|
+
readonly CornerDownRight: "cornerDownRight";
|
|
238
|
+
readonly CornerLeftDown: "cornerLeftDown";
|
|
239
|
+
readonly CornerLeftUp: "cornerLeftUp";
|
|
240
|
+
readonly CornerRightDown: "cornerRightDown";
|
|
241
|
+
readonly CornerRightUp: "cornerRightUp";
|
|
242
|
+
readonly CornerUpLeft: "cornerUpLeft";
|
|
243
|
+
readonly CornerUpRight: "cornerUpRight";
|
|
244
|
+
readonly Cpu: "cpu";
|
|
245
|
+
readonly CreditCard: "creditCard";
|
|
246
|
+
readonly Database: "database";
|
|
247
|
+
readonly Delete: "delete";
|
|
248
|
+
readonly Disc: "disc";
|
|
249
|
+
readonly DollarSign: "dollarSign";
|
|
250
|
+
readonly Download: "download";
|
|
251
|
+
readonly DownloadCloud: "downloadCloud";
|
|
252
|
+
readonly Edit: "edit";
|
|
253
|
+
readonly Edit2: "edit2";
|
|
254
|
+
readonly Edit3: "edit3";
|
|
255
|
+
readonly Expand: "expand";
|
|
256
|
+
readonly ExternalLink: "externalLink";
|
|
257
|
+
readonly Eye: "eye";
|
|
258
|
+
readonly EyeOff: "eyeOff";
|
|
259
|
+
readonly Facebook: "facebook";
|
|
260
|
+
readonly FastForward: "fastForward";
|
|
261
|
+
readonly File: "file";
|
|
262
|
+
readonly FileMinus: "fileMinus";
|
|
263
|
+
readonly FileMinus2: "fileMinus2";
|
|
264
|
+
readonly FilePlus: "filePlus";
|
|
265
|
+
readonly FilePlus2: "filePlus2";
|
|
266
|
+
readonly FileText: "fileText";
|
|
267
|
+
readonly FileX: "fileX";
|
|
268
|
+
readonly FileX2: "fileX2";
|
|
269
|
+
readonly Film: "film";
|
|
270
|
+
readonly Flag: "flag";
|
|
271
|
+
readonly Folder: "folder";
|
|
272
|
+
readonly FolderMinus: "folderMinus";
|
|
273
|
+
readonly FolderMinus2: "folderMinus2";
|
|
274
|
+
readonly FolderPlus: "folderPlus";
|
|
275
|
+
readonly FolderPlus2: "folderPlus2";
|
|
276
|
+
readonly FolderX: "folderX";
|
|
277
|
+
readonly FolderX2: "folderX2";
|
|
278
|
+
readonly Grid: "grid";
|
|
279
|
+
readonly HardDrive: "hardDrive";
|
|
280
|
+
readonly Hash: "hash";
|
|
281
|
+
readonly Headphones: "headphones";
|
|
282
|
+
readonly Heart: "heart";
|
|
283
|
+
readonly HelpCircle: "helpCircle";
|
|
284
|
+
readonly Hexagon: "hexagon";
|
|
285
|
+
readonly Home: "home";
|
|
286
|
+
readonly Home2: "home2";
|
|
287
|
+
readonly Image: "image";
|
|
288
|
+
readonly Inbox: "inbox";
|
|
289
|
+
readonly Info: "info";
|
|
290
|
+
readonly Italic: "italic";
|
|
291
|
+
readonly Layout: "layout";
|
|
292
|
+
readonly Layout2: "layout2";
|
|
293
|
+
readonly Layout3: "layout3";
|
|
294
|
+
readonly Layout4: "layout4";
|
|
295
|
+
readonly Layout5: "layout5";
|
|
296
|
+
readonly Layout6: "layout6";
|
|
297
|
+
readonly LineChart: "lineChart";
|
|
298
|
+
readonly LineChart2: "lineChart2";
|
|
299
|
+
readonly Link: "link";
|
|
300
|
+
readonly List: "list";
|
|
301
|
+
readonly Loader: "loader";
|
|
302
|
+
readonly Lock: "lock";
|
|
303
|
+
readonly Mail: "mail";
|
|
304
|
+
readonly MapMarker1: "mapMarker1";
|
|
305
|
+
readonly MapMarker2: "mapMarker2";
|
|
306
|
+
readonly MapMarker3: "mapMarker3";
|
|
307
|
+
readonly Maximize: "maximize";
|
|
308
|
+
readonly Maximize2: "maximize2";
|
|
309
|
+
readonly Menu: "menu";
|
|
310
|
+
readonly MessageCircle: "messageCircle";
|
|
311
|
+
readonly MessageSquare: "messageSquare";
|
|
312
|
+
readonly Mic: "mic";
|
|
313
|
+
readonly Minimize: "minimize";
|
|
314
|
+
readonly Minimize3: "minimize3";
|
|
315
|
+
readonly Minus: "minus";
|
|
316
|
+
readonly MinusCircle: "minusCircle";
|
|
317
|
+
readonly MinusSquare: "minusSquare";
|
|
318
|
+
readonly Monitor: "monitor";
|
|
319
|
+
readonly Moon: "moon";
|
|
320
|
+
readonly MoreHorizontal: "moreHorizontal";
|
|
321
|
+
readonly MoreVertical: "moreVertical";
|
|
322
|
+
readonly Move: "move";
|
|
323
|
+
readonly Music: "music";
|
|
324
|
+
readonly Octagon: "octagon";
|
|
325
|
+
readonly Paperclip: "paperclip";
|
|
326
|
+
readonly Pause: "pause";
|
|
327
|
+
readonly PauseCircle: "pauseCircle";
|
|
328
|
+
readonly Percent: "percent";
|
|
329
|
+
readonly Phone: "phone";
|
|
330
|
+
readonly PieChart: "pieChart";
|
|
331
|
+
readonly PieChart2: "pieChart2";
|
|
332
|
+
readonly PieChart3: "pieChart3";
|
|
333
|
+
readonly PieChart4: "pieChart4";
|
|
334
|
+
readonly PieChart5: "pieChart5";
|
|
335
|
+
readonly Play: "play";
|
|
336
|
+
readonly PlayCircle: "playCircle";
|
|
337
|
+
readonly Plus: "plus";
|
|
338
|
+
readonly PlusCircle: "plusCircle";
|
|
339
|
+
readonly PlusSquare: "plusSquare";
|
|
340
|
+
readonly Power: "power";
|
|
341
|
+
readonly Printer: "printer";
|
|
342
|
+
readonly Radio: "radio";
|
|
343
|
+
readonly RefreshCcw: "refreshCcw";
|
|
344
|
+
readonly RefreshCw: "refreshCw";
|
|
345
|
+
readonly Repeat: "repeat";
|
|
346
|
+
readonly Rewind: "rewind";
|
|
347
|
+
readonly RotateLeft: "rotateLeft";
|
|
348
|
+
readonly RotateRight: "rotateRight";
|
|
349
|
+
readonly Rss: "rss";
|
|
350
|
+
readonly Save: "save";
|
|
351
|
+
readonly Scissors: "scissors";
|
|
352
|
+
readonly Search: "search";
|
|
353
|
+
readonly Server: "server";
|
|
354
|
+
readonly Settings: "settings";
|
|
355
|
+
readonly Share: "share";
|
|
356
|
+
readonly ShoppingBag: "shoppingBag";
|
|
357
|
+
readonly ShoppingCart: "shoppingCart";
|
|
358
|
+
readonly Shuffle: "shuffle";
|
|
359
|
+
readonly SkipBack: "skipBack";
|
|
360
|
+
readonly SkipForward: "skipForward";
|
|
361
|
+
readonly Slash: "slash";
|
|
362
|
+
readonly Sliders: "sliders";
|
|
363
|
+
readonly Smartphone: "smartphone";
|
|
364
|
+
readonly Speaker: "speaker";
|
|
365
|
+
readonly Square: "square";
|
|
366
|
+
readonly Star: "star";
|
|
367
|
+
readonly StopCircle: "stopCircle";
|
|
368
|
+
readonly Strikethrough: "strikethrough";
|
|
369
|
+
readonly Sun: "sun";
|
|
370
|
+
readonly Table: "table";
|
|
371
|
+
readonly Table2: "table2";
|
|
372
|
+
readonly Tablet: "tablet";
|
|
373
|
+
readonly Tag: "tag";
|
|
374
|
+
readonly ThumbsDown: "thumbsDown";
|
|
375
|
+
readonly ThumbsUp: "thumbsUp";
|
|
376
|
+
readonly Trash: "trash";
|
|
377
|
+
readonly TrendingDown: "trendingDown";
|
|
378
|
+
readonly TrendingUp: "trendingUp";
|
|
379
|
+
readonly Triangle: "triangle";
|
|
380
|
+
readonly Tv: "tv";
|
|
381
|
+
readonly Twitter: "twitter";
|
|
382
|
+
readonly Type: "type";
|
|
383
|
+
readonly Underline: "underline";
|
|
384
|
+
readonly Unlock: "unlock";
|
|
385
|
+
readonly Upload: "upload";
|
|
386
|
+
readonly UploadCloud: "uploadCloud";
|
|
387
|
+
readonly User: "user";
|
|
388
|
+
readonly UserCheck: "userCheck";
|
|
389
|
+
readonly UserCircle: "userCircle";
|
|
390
|
+
readonly UserMinus: "userMinus";
|
|
391
|
+
readonly UserPlus: "userPlus";
|
|
392
|
+
readonly UserX: "userX";
|
|
393
|
+
readonly Users: "users";
|
|
394
|
+
readonly Video: "video";
|
|
395
|
+
readonly VideoOff: "videoOff";
|
|
396
|
+
readonly Volume: "volume";
|
|
397
|
+
readonly Volume1: "volume1";
|
|
398
|
+
readonly Volume2: "volume2";
|
|
399
|
+
readonly VolumeX: "volumeX";
|
|
400
|
+
readonly Watch: "watch";
|
|
401
|
+
readonly Wifi: "wifi";
|
|
402
|
+
readonly X: "x";
|
|
403
|
+
readonly XCircle: "xCircle";
|
|
404
|
+
readonly XSquare: "xSquare";
|
|
405
|
+
readonly ZoomIn: "zoomIn";
|
|
406
|
+
readonly ZoomOut: "zoomOut";
|
|
407
|
+
};
|
|
408
|
+
type IconName = (typeof IconName)[keyof typeof IconName];
|
|
409
|
+
/**
|
|
410
|
+
* Runtime list of all icon names (useful for docs, search, etc.)
|
|
411
|
+
*/
|
|
412
|
+
declare const iconNamesList: ("airplay" | "alertCircle" | "alertOctagon" | "alertTriangle" | "alignCenter" | "alignJustify" | "alignLeft" | "alignRight" | "arrowDown" | "arrowDownCircle" | "arrowDownLeft" | "arrowDownRight" | "arrowIn" | "arrowInCircle" | "arrowInSquare" | "arrowLeft" | "arrowLeftCircle" | "arrowOut" | "arrowOutCircle" | "arrowOutSquare" | "arrowRight" | "arrowRightCircle" | "arrowUp" | "arrowUpCircle" | "arrowUpLeft" | "arrowUpRight" | "atSign" | "barChart" | "barChart2" | "barChart3" | "barChart4" | "bell" | "bluetooth" | "bold" | "bookmark" | "calendar" | "camera" | "cast" | "check" | "checkCircle" | "checkSquare" | "chevronDown" | "chevronLeft" | "chevronRight" | "chevronUp" | "chevronsDown" | "chevronsLeft" | "chevronsRight" | "chevronsUp" | "circle" | "clipboard" | "clock" | "code" | "command" | "compass" | "copy" | "cornerDownLeft" | "cornerDownRight" | "cornerLeftDown" | "cornerLeftUp" | "cornerRightDown" | "cornerRightUp" | "cornerUpLeft" | "cornerUpRight" | "cpu" | "creditCard" | "database" | "delete" | "disc" | "dollarSign" | "download" | "downloadCloud" | "edit" | "edit2" | "edit3" | "expand" | "externalLink" | "eye" | "eyeOff" | "facebook" | "fastForward" | "file" | "fileMinus" | "fileMinus2" | "filePlus" | "filePlus2" | "fileText" | "fileX" | "fileX2" | "film" | "flag" | "folder" | "folderMinus" | "folderMinus2" | "folderPlus" | "folderPlus2" | "folderX" | "folderX2" | "grid" | "hardDrive" | "hash" | "headphones" | "heart" | "helpCircle" | "hexagon" | "home" | "home2" | "image" | "inbox" | "info" | "italic" | "layout" | "layout2" | "layout3" | "layout4" | "layout5" | "layout6" | "lineChart" | "lineChart2" | "link" | "list" | "loader" | "lock" | "mail" | "mapMarker1" | "mapMarker2" | "mapMarker3" | "maximize" | "maximize2" | "menu" | "messageCircle" | "messageSquare" | "mic" | "minimize" | "minimize3" | "minus" | "minusCircle" | "minusSquare" | "monitor" | "moon" | "moreHorizontal" | "moreVertical" | "move" | "music" | "octagon" | "paperclip" | "pause" | "pauseCircle" | "percent" | "phone" | "pieChart" | "pieChart2" | "pieChart3" | "pieChart4" | "pieChart5" | "play" | "playCircle" | "plus" | "plusCircle" | "plusSquare" | "power" | "printer" | "radio" | "refreshCcw" | "refreshCw" | "repeat" | "rewind" | "rotateLeft" | "rotateRight" | "rss" | "save" | "scissors" | "search" | "server" | "settings" | "share" | "shoppingBag" | "shoppingCart" | "shuffle" | "skipBack" | "skipForward" | "slash" | "sliders" | "smartphone" | "speaker" | "square" | "star" | "stopCircle" | "strikethrough" | "sun" | "table" | "table2" | "tablet" | "tag" | "thumbsDown" | "thumbsUp" | "trash" | "trendingDown" | "trendingUp" | "triangle" | "tv" | "twitter" | "type" | "underline" | "unlock" | "upload" | "uploadCloud" | "user" | "userCheck" | "userCircle" | "userMinus" | "userPlus" | "userX" | "users" | "video" | "videoOff" | "volume" | "volume1" | "volume2" | "volumeX" | "watch" | "wifi" | "x" | "xCircle" | "xSquare" | "zoomIn" | "zoomOut")[];
|
|
413
|
+
|
|
414
|
+
type IconSize = "xs" | "sm" | "md" | "lg";
|
|
415
|
+
type IconStrokeWidth = "xs" | "sm" | "md" | "lg";
|
|
416
|
+
type IconColor = "currentColor" | "primary" | "secondary" | "muted";
|
|
417
|
+
/**
|
|
418
|
+
* @deprecated Use `iconNamesList` instead
|
|
419
|
+
*/
|
|
420
|
+
declare const iconNames: ("airplay" | "alertCircle" | "alertOctagon" | "alertTriangle" | "alignCenter" | "alignJustify" | "alignLeft" | "alignRight" | "arrowDown" | "arrowDownCircle" | "arrowDownLeft" | "arrowDownRight" | "arrowIn" | "arrowInCircle" | "arrowInSquare" | "arrowLeft" | "arrowLeftCircle" | "arrowOut" | "arrowOutCircle" | "arrowOutSquare" | "arrowRight" | "arrowRightCircle" | "arrowUp" | "arrowUpCircle" | "arrowUpLeft" | "arrowUpRight" | "atSign" | "barChart" | "barChart2" | "barChart3" | "barChart4" | "bell" | "bluetooth" | "bold" | "bookmark" | "calendar" | "camera" | "cast" | "check" | "checkCircle" | "checkSquare" | "chevronDown" | "chevronLeft" | "chevronRight" | "chevronUp" | "chevronsDown" | "chevronsLeft" | "chevronsRight" | "chevronsUp" | "circle" | "clipboard" | "clock" | "code" | "command" | "compass" | "copy" | "cornerDownLeft" | "cornerDownRight" | "cornerLeftDown" | "cornerLeftUp" | "cornerRightDown" | "cornerRightUp" | "cornerUpLeft" | "cornerUpRight" | "cpu" | "creditCard" | "database" | "delete" | "disc" | "dollarSign" | "download" | "downloadCloud" | "edit" | "edit2" | "edit3" | "expand" | "externalLink" | "eye" | "eyeOff" | "facebook" | "fastForward" | "file" | "fileMinus" | "fileMinus2" | "filePlus" | "filePlus2" | "fileText" | "fileX" | "fileX2" | "film" | "flag" | "folder" | "folderMinus" | "folderMinus2" | "folderPlus" | "folderPlus2" | "folderX" | "folderX2" | "grid" | "hardDrive" | "hash" | "headphones" | "heart" | "helpCircle" | "hexagon" | "home" | "home2" | "image" | "inbox" | "info" | "italic" | "layout" | "layout2" | "layout3" | "layout4" | "layout5" | "layout6" | "lineChart" | "lineChart2" | "link" | "list" | "loader" | "lock" | "mail" | "mapMarker1" | "mapMarker2" | "mapMarker3" | "maximize" | "maximize2" | "menu" | "messageCircle" | "messageSquare" | "mic" | "minimize" | "minimize3" | "minus" | "minusCircle" | "minusSquare" | "monitor" | "moon" | "moreHorizontal" | "moreVertical" | "move" | "music" | "octagon" | "paperclip" | "pause" | "pauseCircle" | "percent" | "phone" | "pieChart" | "pieChart2" | "pieChart3" | "pieChart4" | "pieChart5" | "play" | "playCircle" | "plus" | "plusCircle" | "plusSquare" | "power" | "printer" | "radio" | "refreshCcw" | "refreshCw" | "repeat" | "rewind" | "rotateLeft" | "rotateRight" | "rss" | "save" | "scissors" | "search" | "server" | "settings" | "share" | "shoppingBag" | "shoppingCart" | "shuffle" | "skipBack" | "skipForward" | "slash" | "sliders" | "smartphone" | "speaker" | "square" | "star" | "stopCircle" | "strikethrough" | "sun" | "table" | "table2" | "tablet" | "tag" | "thumbsDown" | "thumbsUp" | "trash" | "trendingDown" | "trendingUp" | "triangle" | "tv" | "twitter" | "type" | "underline" | "unlock" | "upload" | "uploadCloud" | "user" | "userCheck" | "userCircle" | "userMinus" | "userPlus" | "userX" | "users" | "video" | "videoOff" | "volume" | "volume1" | "volume2" | "volumeX" | "watch" | "wifi" | "x" | "xCircle" | "xSquare" | "zoomIn" | "zoomOut")[];
|
|
421
|
+
type IconOptions = {
|
|
422
|
+
name: IconName;
|
|
423
|
+
size?: IconSize;
|
|
424
|
+
strokeWidth?: IconStrokeWidth;
|
|
425
|
+
color?: IconColor;
|
|
426
|
+
ariaLabel?: string;
|
|
427
|
+
ariaHidden?: boolean;
|
|
428
|
+
decorative?: boolean;
|
|
429
|
+
};
|
|
430
|
+
type IconA11yProps = {
|
|
431
|
+
ariaLabel?: string;
|
|
432
|
+
ariaHidden?: boolean;
|
|
433
|
+
role?: "img";
|
|
434
|
+
};
|
|
435
|
+
/**
|
|
436
|
+
* Valid SVG element types used in icon definitions.
|
|
437
|
+
* This ensures type safety when rendering icon nodes.
|
|
438
|
+
*/
|
|
439
|
+
type SvgElementType = "path" | "circle" | "line" | "polygon" | "polyline" | "rect" | "ellipse";
|
|
440
|
+
type SvgNode = {
|
|
441
|
+
tag: SvgElementType;
|
|
442
|
+
attrs: Record<string, string>;
|
|
443
|
+
};
|
|
444
|
+
type IconRenderKit = {
|
|
445
|
+
tag: "svg";
|
|
446
|
+
className: string;
|
|
447
|
+
vars: CssVars;
|
|
448
|
+
a11y: IconA11yProps;
|
|
449
|
+
svg: {
|
|
450
|
+
viewBox: string;
|
|
451
|
+
nodes: readonly SvgNode[];
|
|
452
|
+
width: number;
|
|
453
|
+
height: number;
|
|
454
|
+
type: "stroke";
|
|
455
|
+
};
|
|
456
|
+
};
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Button size options.
|
|
460
|
+
* Use `ButtonSize.md` for type-safe access.
|
|
461
|
+
*/
|
|
462
|
+
declare const ButtonSize: {
|
|
463
|
+
readonly xs: "xs";
|
|
464
|
+
readonly sm: "sm";
|
|
465
|
+
readonly md: "md";
|
|
466
|
+
readonly lg: "lg";
|
|
467
|
+
};
|
|
468
|
+
type ButtonSize = (typeof ButtonSize)[keyof typeof ButtonSize];
|
|
469
|
+
/**
|
|
470
|
+
* Button visual variant.
|
|
471
|
+
* Use `ButtonVariant.primary` for type-safe access.
|
|
472
|
+
*
|
|
473
|
+
* @property primary - High-emphasis buttons for primary actions (e.g., "Save", "Submit", "Create").
|
|
474
|
+
* Use sparingly - typically one primary action per view.
|
|
475
|
+
* @property secondary - Medium-emphasis buttons for secondary actions (e.g., "Cancel", "Back").
|
|
476
|
+
* Good for actions that complement the primary action.
|
|
477
|
+
* @property text - Low-emphasis buttons for tertiary actions or inline text-like buttons.
|
|
478
|
+
* Minimal visual weight, ideal for less important actions.
|
|
479
|
+
*
|
|
480
|
+
* @example
|
|
481
|
+
* ```tsx
|
|
482
|
+
* import { ButtonVariant } from "@marwes-ui/core"
|
|
483
|
+
*
|
|
484
|
+
* <Button variant={ButtonVariant.primary}>Save</Button>
|
|
485
|
+
* <Button variant={ButtonVariant.secondary}>Cancel</Button>
|
|
486
|
+
* ```
|
|
487
|
+
*/
|
|
488
|
+
declare const ButtonVariant: {
|
|
489
|
+
readonly primary: "primary";
|
|
490
|
+
readonly secondary: "secondary";
|
|
491
|
+
readonly text: "text";
|
|
492
|
+
};
|
|
493
|
+
type ButtonVariant = (typeof ButtonVariant)[keyof typeof ButtonVariant];
|
|
494
|
+
/**
|
|
495
|
+
* Button semantic action for AI-friendly context.
|
|
496
|
+
* Prefer using semantic components (CancelButton, SubmitButton, etc.) which set this automatically.
|
|
497
|
+
* Use `ButtonAction.submit` directly only for advanced/dynamic cases.
|
|
498
|
+
*
|
|
499
|
+
* These values are used to:
|
|
500
|
+
* - Set appropriate `data-action` attributes for AI parsing
|
|
501
|
+
* - Provide semantic context for accessibility tools
|
|
502
|
+
* - Enable smart defaults in semantic button variants
|
|
503
|
+
*
|
|
504
|
+
* @property submit - Form submissions. Automatically sets `type="submit"`. Recommended icon: `IconName.Check`
|
|
505
|
+
* @property reset - Form resets. Recommended icon: `IconName.RotateLeft`
|
|
506
|
+
* @property button - Generic button action (default for `<button>` elements)
|
|
507
|
+
* @property navigate - Navigation/routing actions. Used with `<a>` elements. Recommended icon: `IconName.ArrowRight`
|
|
508
|
+
* @property delete - Destructive operations (delete, remove). Should trigger confirmation. Recommended icon: `IconName.Trash` or `IconName.Minus`
|
|
509
|
+
* @property create - Creation actions (add, new). Recommended icon: `IconName.Plus`
|
|
510
|
+
* @property edit - Edit/modify actions. Recommended icon: `IconName.Edit`
|
|
511
|
+
* @property cancel - Cancel/dismiss actions. Recommended icon: `IconName.X`
|
|
512
|
+
*
|
|
513
|
+
* @example
|
|
514
|
+
* ```tsx
|
|
515
|
+
* import { ButtonAction, IconName } from "@marwes-ui/core"
|
|
516
|
+
*
|
|
517
|
+
* // For advanced/dynamic use cases:
|
|
518
|
+
* <Button action={ButtonAction.delete} iconRight={IconName.Trash}>Delete</Button>
|
|
519
|
+
*
|
|
520
|
+
* // Prefer semantic variants when possible:
|
|
521
|
+
* <DangerButton>Delete Project</DangerButton> // Sets action="delete" automatically
|
|
522
|
+
* ```
|
|
523
|
+
*/
|
|
524
|
+
declare const ButtonAction: {
|
|
525
|
+
readonly submit: "submit";
|
|
526
|
+
readonly reset: "reset";
|
|
527
|
+
readonly button: "button";
|
|
528
|
+
readonly navigate: "navigate";
|
|
529
|
+
readonly delete: "delete";
|
|
530
|
+
readonly create: "create";
|
|
531
|
+
readonly edit: "edit";
|
|
532
|
+
readonly cancel: "cancel";
|
|
533
|
+
};
|
|
534
|
+
type ButtonAction = (typeof ButtonAction)[keyof typeof ButtonAction];
|
|
535
|
+
type ButtonOptions = {
|
|
536
|
+
as?: "button" | "a";
|
|
537
|
+
href?: string;
|
|
538
|
+
size?: ButtonSize;
|
|
539
|
+
variant?: ButtonVariant;
|
|
540
|
+
disabled?: boolean;
|
|
541
|
+
loading?: boolean;
|
|
542
|
+
error?: boolean;
|
|
543
|
+
toggle?: boolean;
|
|
544
|
+
pressed?: boolean;
|
|
545
|
+
ariaLabel?: string;
|
|
546
|
+
hasVisibleText?: boolean;
|
|
547
|
+
ariaExpanded?: boolean;
|
|
548
|
+
ariaControls?: string;
|
|
549
|
+
iconLeft?: IconName;
|
|
550
|
+
iconRight?: IconName;
|
|
551
|
+
iconOnly?: boolean;
|
|
552
|
+
action?: ButtonAction;
|
|
553
|
+
tooltip?: string;
|
|
554
|
+
confirmation?: boolean;
|
|
555
|
+
dataAttributes?: Record<string, string | boolean | undefined>;
|
|
556
|
+
};
|
|
557
|
+
type ButtonA11yProps = {
|
|
558
|
+
ariaLabel?: string;
|
|
559
|
+
ariaBusy?: boolean;
|
|
560
|
+
ariaDisabled?: boolean;
|
|
561
|
+
ariaPressed?: boolean;
|
|
562
|
+
ariaExpanded?: boolean;
|
|
563
|
+
ariaControls?: string;
|
|
564
|
+
title?: string | undefined;
|
|
565
|
+
disabled?: boolean;
|
|
566
|
+
type?: "button";
|
|
567
|
+
href?: string;
|
|
568
|
+
role?: "button";
|
|
569
|
+
tabIndex?: 0 | -1;
|
|
570
|
+
};
|
|
571
|
+
type ButtonRenderKit = {
|
|
572
|
+
tag: "button" | "a";
|
|
573
|
+
className: string;
|
|
574
|
+
vars: CssVars;
|
|
575
|
+
a11y: ButtonA11yProps;
|
|
576
|
+
blockClick: boolean;
|
|
577
|
+
dataAttributes?: Record<string, string | boolean | undefined>;
|
|
578
|
+
};
|
|
579
|
+
|
|
580
|
+
declare function createButtonRecipe(theme: Theme, opts: ButtonOptions): ButtonRenderKit;
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
* Core types for Checkbox.
|
|
584
|
+
* - Core never renders; it returns a render kit consumed by adapters (React/Vue).
|
|
585
|
+
* - `indeterminate` is a DOM property (not an HTML attribute) and must be applied by the adapter.
|
|
586
|
+
*/
|
|
587
|
+
|
|
588
|
+
/** Checkbox state model used by core. */
|
|
589
|
+
type CheckboxState = "checked" | "unchecked" | "mixed";
|
|
590
|
+
/** Public props the adapter can pass into core. */
|
|
591
|
+
type CheckboxProps = {
|
|
592
|
+
/**
|
|
593
|
+
* Visual variant hooks (mapped to class modifiers in recipe).
|
|
594
|
+
* Keep minimal; presets decide styling.
|
|
595
|
+
*/
|
|
596
|
+
size?: "sm" | "md" | "lg";
|
|
597
|
+
/**
|
|
598
|
+
* Controlled state.
|
|
599
|
+
* If omitted, adapter can use defaultChecked or uncontrolled behavior.
|
|
600
|
+
*/
|
|
601
|
+
checked?: boolean;
|
|
602
|
+
/** Uncontrolled initial state. */
|
|
603
|
+
defaultChecked?: boolean;
|
|
604
|
+
/** Indeterminate / mixed state. */
|
|
605
|
+
indeterminate?: boolean;
|
|
606
|
+
disabled?: boolean;
|
|
607
|
+
required?: boolean;
|
|
608
|
+
invalid?: boolean;
|
|
609
|
+
id?: string;
|
|
610
|
+
name?: string;
|
|
611
|
+
value?: string;
|
|
612
|
+
/** Connects to external label/description elements. */
|
|
613
|
+
ariaLabel?: string;
|
|
614
|
+
ariaLabelledBy?: string;
|
|
615
|
+
ariaDescribedBy?: string;
|
|
616
|
+
};
|
|
617
|
+
/** Strict a11y output (no loose attr maps). */
|
|
618
|
+
type CheckboxA11y = {
|
|
619
|
+
/** Always "checkbox". */
|
|
620
|
+
type: "checkbox";
|
|
621
|
+
/** Standard form attrs. */
|
|
622
|
+
id?: string;
|
|
623
|
+
name?: string;
|
|
624
|
+
value?: string;
|
|
625
|
+
disabled?: true;
|
|
626
|
+
required?: true;
|
|
627
|
+
/** ARIA wiring. */
|
|
628
|
+
ariaLabel?: string;
|
|
629
|
+
ariaLabelledBy?: string;
|
|
630
|
+
ariaDescribedBy?: string;
|
|
631
|
+
/**
|
|
632
|
+
* Only set when needed. For mixed state we set "mixed".
|
|
633
|
+
* For checked/unchecked we omit and rely on native input semantics.
|
|
634
|
+
*/
|
|
635
|
+
ariaChecked?: "mixed";
|
|
636
|
+
/**
|
|
637
|
+
* Only set when invalid. Using aria-invalid is broadly supported.
|
|
638
|
+
* (Preset/adapters can also add data attrs if desired later.)
|
|
639
|
+
*/
|
|
640
|
+
ariaInvalid?: true;
|
|
641
|
+
};
|
|
642
|
+
/** Render kit returned from core recipe. */
|
|
643
|
+
type CheckboxRenderKit = {
|
|
644
|
+
tag: "input";
|
|
645
|
+
className: string;
|
|
646
|
+
vars: CssVars;
|
|
647
|
+
a11y: CheckboxA11y;
|
|
648
|
+
/**
|
|
649
|
+
* Adapter must set: el.indeterminate = true/false
|
|
650
|
+
* (No corresponding HTML attribute.)
|
|
651
|
+
*/
|
|
652
|
+
indeterminate: boolean;
|
|
653
|
+
/**
|
|
654
|
+
* For adapters: if both are set, controlled should win.
|
|
655
|
+
* Core exposes both so adapters can wire either pattern.
|
|
656
|
+
*/
|
|
657
|
+
checked?: boolean;
|
|
658
|
+
defaultChecked?: boolean;
|
|
659
|
+
};
|
|
660
|
+
|
|
661
|
+
/**
|
|
662
|
+
* Builds strict a11y output for Checkbox.
|
|
663
|
+
* - Avoid assigning `undefined` to optional fields (exactOptionalPropertyTypes).
|
|
664
|
+
*/
|
|
665
|
+
|
|
666
|
+
declare function buildCheckboxA11y(props: CheckboxProps): CheckboxA11y;
|
|
667
|
+
|
|
668
|
+
/**
|
|
669
|
+
* Checkbox core recipe:
|
|
670
|
+
* - returns a render kit for adapters
|
|
671
|
+
* - stable classnames, modifier classes, css vars, strict a11y
|
|
672
|
+
*/
|
|
673
|
+
|
|
674
|
+
declare function checkboxRecipe({ theme, disabled, invalid, ...props }: CheckboxProps & {
|
|
675
|
+
theme: Theme;
|
|
676
|
+
}): CheckboxRenderKit;
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* Core types for Divider component.
|
|
680
|
+
* - Core returns a render kit consumed by adapters (React/Vue).
|
|
681
|
+
* - Supports 7 size variants: xxs/xs/sm/md/lg/xl/xxl (maps to 1px-80px).
|
|
682
|
+
* - Supports horizontal and vertical orientation.
|
|
683
|
+
* - Figma reference: node-id=1-932
|
|
684
|
+
*/
|
|
685
|
+
|
|
686
|
+
/** Size variants for divider thickness/height. */
|
|
687
|
+
type DividerSize = "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
|
|
688
|
+
/** Orientation of the divider. */
|
|
689
|
+
type DividerOrientation = "horizontal" | "vertical";
|
|
690
|
+
/** Public props the adapter can pass into core. */
|
|
691
|
+
type DividerOptions = {
|
|
692
|
+
/**
|
|
693
|
+
* Size variant for the divider.
|
|
694
|
+
* - xxs: 1px
|
|
695
|
+
* - xs: 8px
|
|
696
|
+
* - sm: 16px
|
|
697
|
+
* - md: 32px (default)
|
|
698
|
+
* - lg: 48px
|
|
699
|
+
* - xl: 64px
|
|
700
|
+
* - xxl: 80px
|
|
701
|
+
*/
|
|
702
|
+
size?: DividerSize;
|
|
703
|
+
/**
|
|
704
|
+
* Orientation of the divider.
|
|
705
|
+
* Default: "horizontal"
|
|
706
|
+
*/
|
|
707
|
+
orientation?: DividerOrientation;
|
|
708
|
+
/**
|
|
709
|
+
* Optional ID.
|
|
710
|
+
*/
|
|
711
|
+
id?: string;
|
|
712
|
+
};
|
|
713
|
+
/** Strict a11y output for dividers. */
|
|
714
|
+
type DividerA11y = {
|
|
715
|
+
id?: string;
|
|
716
|
+
role: "separator";
|
|
717
|
+
"aria-orientation": "horizontal" | "vertical";
|
|
718
|
+
};
|
|
719
|
+
/** Data attributes for divider. */
|
|
720
|
+
type DividerDataAttributes = {
|
|
721
|
+
"data-orientation": "horizontal" | "vertical";
|
|
722
|
+
"data-size": DividerSize;
|
|
723
|
+
};
|
|
724
|
+
/** Render kit output. */
|
|
725
|
+
type DividerRenderKit = {
|
|
726
|
+
/** Always <hr> tag for semantic separators. */
|
|
727
|
+
tag: "hr";
|
|
728
|
+
/** CSS class names. */
|
|
729
|
+
className: string;
|
|
730
|
+
/** CSS variables for theming. */
|
|
731
|
+
vars: CssVars;
|
|
732
|
+
/** Accessibility props. */
|
|
733
|
+
a11y: DividerA11y;
|
|
734
|
+
/** Data attributes for styling hooks. */
|
|
735
|
+
dataAttributes: DividerDataAttributes;
|
|
736
|
+
};
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* Divider recipe: theme + options → render kit.
|
|
740
|
+
* - Supports 7 size variants: xxs/xs/sm/md/lg/xl/xxl (maps to 1px-80px).
|
|
741
|
+
* - Supports horizontal and vertical orientation.
|
|
742
|
+
* - Built-in spacing based on divider size.
|
|
743
|
+
* - Figma reference: node-id=1-932
|
|
744
|
+
*/
|
|
745
|
+
|
|
746
|
+
declare function createDividerRecipe(theme: Theme, opts?: DividerOptions): DividerRenderKit;
|
|
747
|
+
|
|
165
748
|
declare const iconRegistry: {
|
|
166
749
|
readonly airplay: {
|
|
167
750
|
readonly viewBox: "0 0 24 24";
|
|
@@ -1290,6 +1873,23 @@ declare const iconRegistry: {
|
|
|
1290
1873
|
};
|
|
1291
1874
|
}];
|
|
1292
1875
|
};
|
|
1876
|
+
readonly eyeOff: {
|
|
1877
|
+
readonly viewBox: "0 0 24 24";
|
|
1878
|
+
readonly nodes: readonly [{
|
|
1879
|
+
readonly tag: "path";
|
|
1880
|
+
readonly attrs: {
|
|
1881
|
+
readonly d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24";
|
|
1882
|
+
};
|
|
1883
|
+
}, {
|
|
1884
|
+
readonly tag: "line";
|
|
1885
|
+
readonly attrs: {
|
|
1886
|
+
readonly x1: "1";
|
|
1887
|
+
readonly y1: "1";
|
|
1888
|
+
readonly x2: "23";
|
|
1889
|
+
readonly y2: "23";
|
|
1890
|
+
};
|
|
1891
|
+
}];
|
|
1892
|
+
};
|
|
1293
1893
|
readonly facebook: {
|
|
1294
1894
|
readonly viewBox: "0 0 24 24";
|
|
1295
1895
|
readonly nodes: readonly [{
|
|
@@ -4005,263 +4605,6 @@ declare const iconRegistry: {
|
|
|
4005
4605
|
};
|
|
4006
4606
|
};
|
|
4007
4607
|
|
|
4008
|
-
type IconSize = "xs" | "sm" | "md" | "lg";
|
|
4009
|
-
type IconStrokeWidth = "xs" | "sm" | "md" | "lg";
|
|
4010
|
-
type IconColor = "currentColor" | "primary" | "secondary" | "muted";
|
|
4011
|
-
type IconName = keyof typeof iconRegistry;
|
|
4012
|
-
declare const iconNames: IconName[];
|
|
4013
|
-
type IconOptions = {
|
|
4014
|
-
name: IconName;
|
|
4015
|
-
size?: IconSize;
|
|
4016
|
-
strokeWidth?: IconStrokeWidth;
|
|
4017
|
-
color?: IconColor;
|
|
4018
|
-
ariaLabel?: string;
|
|
4019
|
-
ariaHidden?: boolean;
|
|
4020
|
-
decorative?: boolean;
|
|
4021
|
-
};
|
|
4022
|
-
type IconA11yProps = {
|
|
4023
|
-
ariaLabel?: string;
|
|
4024
|
-
ariaHidden?: boolean;
|
|
4025
|
-
role?: "img";
|
|
4026
|
-
};
|
|
4027
|
-
/**
|
|
4028
|
-
* Valid SVG element types used in icon definitions.
|
|
4029
|
-
* This ensures type safety when rendering icon nodes.
|
|
4030
|
-
*/
|
|
4031
|
-
type SvgElementType = "path" | "circle" | "line" | "polygon" | "polyline" | "rect" | "ellipse";
|
|
4032
|
-
type SvgNode = {
|
|
4033
|
-
tag: SvgElementType;
|
|
4034
|
-
attrs: Record<string, string>;
|
|
4035
|
-
};
|
|
4036
|
-
type IconRenderKit = {
|
|
4037
|
-
tag: "svg";
|
|
4038
|
-
className: string;
|
|
4039
|
-
vars: CssVars;
|
|
4040
|
-
a11y: IconA11yProps;
|
|
4041
|
-
svg: {
|
|
4042
|
-
viewBox: string;
|
|
4043
|
-
nodes: readonly SvgNode[];
|
|
4044
|
-
width: number;
|
|
4045
|
-
height: number;
|
|
4046
|
-
type: "stroke";
|
|
4047
|
-
};
|
|
4048
|
-
};
|
|
4049
|
-
|
|
4050
|
-
type ButtonSize = "xs" | "sm" | "md" | "lg";
|
|
4051
|
-
type ButtonTone = "primary" | "secondary" | "text";
|
|
4052
|
-
type ButtonOptions = {
|
|
4053
|
-
as?: "button" | "a";
|
|
4054
|
-
href?: string;
|
|
4055
|
-
size?: ButtonSize;
|
|
4056
|
-
tone?: ButtonTone;
|
|
4057
|
-
disabled?: boolean;
|
|
4058
|
-
loading?: boolean;
|
|
4059
|
-
error?: boolean;
|
|
4060
|
-
toggle?: boolean;
|
|
4061
|
-
pressed?: boolean;
|
|
4062
|
-
ariaLabel?: string;
|
|
4063
|
-
hasVisibleText?: boolean;
|
|
4064
|
-
ariaExpanded?: boolean;
|
|
4065
|
-
ariaControls?: string;
|
|
4066
|
-
iconLeft?: IconName;
|
|
4067
|
-
iconRight?: IconName;
|
|
4068
|
-
iconOnly?: boolean;
|
|
4069
|
-
action?: "submit" | "reset" | "button" | "navigate" | "delete" | "create" | "edit" | "cancel";
|
|
4070
|
-
tooltip?: string;
|
|
4071
|
-
confirmation?: boolean;
|
|
4072
|
-
dataAttributes?: Record<string, string | boolean | undefined>;
|
|
4073
|
-
};
|
|
4074
|
-
type ButtonA11yProps = {
|
|
4075
|
-
ariaLabel?: string;
|
|
4076
|
-
ariaBusy?: boolean;
|
|
4077
|
-
ariaDisabled?: boolean;
|
|
4078
|
-
ariaPressed?: boolean;
|
|
4079
|
-
ariaExpanded?: boolean;
|
|
4080
|
-
ariaControls?: string;
|
|
4081
|
-
title?: string | undefined;
|
|
4082
|
-
disabled?: boolean;
|
|
4083
|
-
type?: "button";
|
|
4084
|
-
href?: string;
|
|
4085
|
-
role?: "button";
|
|
4086
|
-
tabIndex?: 0 | -1;
|
|
4087
|
-
};
|
|
4088
|
-
type ButtonRenderKit = {
|
|
4089
|
-
tag: "button" | "a";
|
|
4090
|
-
className: string;
|
|
4091
|
-
vars: CssVars;
|
|
4092
|
-
a11y: ButtonA11yProps;
|
|
4093
|
-
blockClick: boolean;
|
|
4094
|
-
dataAttributes?: Record<string, string | boolean | undefined>;
|
|
4095
|
-
};
|
|
4096
|
-
|
|
4097
|
-
declare function createButtonRecipe(theme: Theme, opts: ButtonOptions): ButtonRenderKit;
|
|
4098
|
-
|
|
4099
|
-
/**
|
|
4100
|
-
* Core types for Checkbox.
|
|
4101
|
-
* - Core never renders; it returns a render kit consumed by adapters (React/Vue).
|
|
4102
|
-
* - `indeterminate` is a DOM property (not an HTML attribute) and must be applied by the adapter.
|
|
4103
|
-
*/
|
|
4104
|
-
|
|
4105
|
-
/** Checkbox state model used by core. */
|
|
4106
|
-
type CheckboxState = "checked" | "unchecked" | "mixed";
|
|
4107
|
-
/** Public props the adapter can pass into core. */
|
|
4108
|
-
type CheckboxProps = {
|
|
4109
|
-
/**
|
|
4110
|
-
* Visual variant hooks (mapped to class modifiers in recipe).
|
|
4111
|
-
* Keep minimal; presets decide styling.
|
|
4112
|
-
*/
|
|
4113
|
-
size?: "sm" | "md" | "lg";
|
|
4114
|
-
/**
|
|
4115
|
-
* Controlled state.
|
|
4116
|
-
* If omitted, adapter can use defaultChecked or uncontrolled behavior.
|
|
4117
|
-
*/
|
|
4118
|
-
checked?: boolean;
|
|
4119
|
-
/** Uncontrolled initial state. */
|
|
4120
|
-
defaultChecked?: boolean;
|
|
4121
|
-
/** Indeterminate / mixed state. */
|
|
4122
|
-
indeterminate?: boolean;
|
|
4123
|
-
disabled?: boolean;
|
|
4124
|
-
required?: boolean;
|
|
4125
|
-
invalid?: boolean;
|
|
4126
|
-
id?: string;
|
|
4127
|
-
name?: string;
|
|
4128
|
-
value?: string;
|
|
4129
|
-
/** Connects to external label/description elements. */
|
|
4130
|
-
ariaLabel?: string;
|
|
4131
|
-
ariaLabelledBy?: string;
|
|
4132
|
-
ariaDescribedBy?: string;
|
|
4133
|
-
};
|
|
4134
|
-
/** Strict a11y output (no loose attr maps). */
|
|
4135
|
-
type CheckboxA11y = {
|
|
4136
|
-
/** Always "checkbox". */
|
|
4137
|
-
type: "checkbox";
|
|
4138
|
-
/** Standard form attrs. */
|
|
4139
|
-
id?: string;
|
|
4140
|
-
name?: string;
|
|
4141
|
-
value?: string;
|
|
4142
|
-
disabled?: true;
|
|
4143
|
-
required?: true;
|
|
4144
|
-
/** ARIA wiring. */
|
|
4145
|
-
ariaLabel?: string;
|
|
4146
|
-
ariaLabelledBy?: string;
|
|
4147
|
-
ariaDescribedBy?: string;
|
|
4148
|
-
/**
|
|
4149
|
-
* Only set when needed. For mixed state we set "mixed".
|
|
4150
|
-
* For checked/unchecked we omit and rely on native input semantics.
|
|
4151
|
-
*/
|
|
4152
|
-
ariaChecked?: "mixed";
|
|
4153
|
-
/**
|
|
4154
|
-
* Only set when invalid. Using aria-invalid is broadly supported.
|
|
4155
|
-
* (Preset/adapters can also add data attrs if desired later.)
|
|
4156
|
-
*/
|
|
4157
|
-
ariaInvalid?: true;
|
|
4158
|
-
};
|
|
4159
|
-
/** Render kit returned from core recipe. */
|
|
4160
|
-
type CheckboxRenderKit = {
|
|
4161
|
-
tag: "input";
|
|
4162
|
-
className: string;
|
|
4163
|
-
vars: CssVars;
|
|
4164
|
-
a11y: CheckboxA11y;
|
|
4165
|
-
/**
|
|
4166
|
-
* Adapter must set: el.indeterminate = true/false
|
|
4167
|
-
* (No corresponding HTML attribute.)
|
|
4168
|
-
*/
|
|
4169
|
-
indeterminate: boolean;
|
|
4170
|
-
/**
|
|
4171
|
-
* For adapters: if both are set, controlled should win.
|
|
4172
|
-
* Core exposes both so adapters can wire either pattern.
|
|
4173
|
-
*/
|
|
4174
|
-
checked?: boolean;
|
|
4175
|
-
defaultChecked?: boolean;
|
|
4176
|
-
};
|
|
4177
|
-
|
|
4178
|
-
/**
|
|
4179
|
-
* Builds strict a11y output for Checkbox.
|
|
4180
|
-
* - Avoid assigning `undefined` to optional fields (exactOptionalPropertyTypes).
|
|
4181
|
-
*/
|
|
4182
|
-
|
|
4183
|
-
declare function buildCheckboxA11y(props: CheckboxProps): CheckboxA11y;
|
|
4184
|
-
|
|
4185
|
-
/**
|
|
4186
|
-
* Checkbox core recipe:
|
|
4187
|
-
* - returns a render kit for adapters
|
|
4188
|
-
* - stable classnames, modifier classes, css vars, strict a11y
|
|
4189
|
-
*/
|
|
4190
|
-
|
|
4191
|
-
declare function checkboxRecipe({ theme, disabled, invalid, ...props }: CheckboxProps & {
|
|
4192
|
-
theme: Theme;
|
|
4193
|
-
}): CheckboxRenderKit;
|
|
4194
|
-
|
|
4195
|
-
/**
|
|
4196
|
-
* Core types for Divider component.
|
|
4197
|
-
* - Core returns a render kit consumed by adapters (React/Vue).
|
|
4198
|
-
* - Supports 7 size variants: xxs/xs/sm/md/lg/xl/xxl (maps to 1px-80px).
|
|
4199
|
-
* - Supports horizontal and vertical orientation.
|
|
4200
|
-
* - Figma reference: node-id=1-932
|
|
4201
|
-
*/
|
|
4202
|
-
|
|
4203
|
-
/** Size variants for divider thickness/height. */
|
|
4204
|
-
type DividerSize = "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
|
|
4205
|
-
/** Orientation of the divider. */
|
|
4206
|
-
type DividerOrientation = "horizontal" | "vertical";
|
|
4207
|
-
/** Public props the adapter can pass into core. */
|
|
4208
|
-
type DividerOptions = {
|
|
4209
|
-
/**
|
|
4210
|
-
* Size variant for the divider.
|
|
4211
|
-
* - xxs: 1px
|
|
4212
|
-
* - xs: 8px
|
|
4213
|
-
* - sm: 16px
|
|
4214
|
-
* - md: 32px (default)
|
|
4215
|
-
* - lg: 48px
|
|
4216
|
-
* - xl: 64px
|
|
4217
|
-
* - xxl: 80px
|
|
4218
|
-
*/
|
|
4219
|
-
size?: DividerSize;
|
|
4220
|
-
/**
|
|
4221
|
-
* Orientation of the divider.
|
|
4222
|
-
* Default: "horizontal"
|
|
4223
|
-
*/
|
|
4224
|
-
orientation?: DividerOrientation;
|
|
4225
|
-
/**
|
|
4226
|
-
* Optional ID.
|
|
4227
|
-
*/
|
|
4228
|
-
id?: string;
|
|
4229
|
-
};
|
|
4230
|
-
/** Strict a11y output for dividers. */
|
|
4231
|
-
type DividerA11y = {
|
|
4232
|
-
id?: string;
|
|
4233
|
-
role: "separator";
|
|
4234
|
-
"aria-orientation": "horizontal" | "vertical";
|
|
4235
|
-
};
|
|
4236
|
-
/** Data attributes for divider. */
|
|
4237
|
-
type DividerDataAttributes = {
|
|
4238
|
-
"data-orientation": "horizontal" | "vertical";
|
|
4239
|
-
"data-size": DividerSize;
|
|
4240
|
-
};
|
|
4241
|
-
/** Render kit output. */
|
|
4242
|
-
type DividerRenderKit = {
|
|
4243
|
-
/** Always <hr> tag for semantic separators. */
|
|
4244
|
-
tag: "hr";
|
|
4245
|
-
/** CSS class names. */
|
|
4246
|
-
className: string;
|
|
4247
|
-
/** CSS variables for theming. */
|
|
4248
|
-
vars: CssVars;
|
|
4249
|
-
/** Accessibility props. */
|
|
4250
|
-
a11y: DividerA11y;
|
|
4251
|
-
/** Data attributes for styling hooks. */
|
|
4252
|
-
dataAttributes: DividerDataAttributes;
|
|
4253
|
-
};
|
|
4254
|
-
|
|
4255
|
-
/**
|
|
4256
|
-
* Divider recipe: theme + options → render kit.
|
|
4257
|
-
* - Supports 7 size variants: xxs/xs/sm/md/lg/xl/xxl (maps to 1px-80px).
|
|
4258
|
-
* - Supports horizontal and vertical orientation.
|
|
4259
|
-
* - Built-in spacing based on divider size.
|
|
4260
|
-
* - Figma reference: node-id=1-932
|
|
4261
|
-
*/
|
|
4262
|
-
|
|
4263
|
-
declare function createDividerRecipe(theme: Theme, opts?: DividerOptions): DividerRenderKit;
|
|
4264
|
-
|
|
4265
4608
|
declare const iconSizeScale: {
|
|
4266
4609
|
readonly xs: 16;
|
|
4267
4610
|
readonly sm: 24;
|
|
@@ -4432,4 +4775,4 @@ type ParagraphRenderKit = {
|
|
|
4432
4775
|
|
|
4433
4776
|
declare function paragraphRecipe(opts: ParagraphOptions, theme: Theme): ParagraphRenderKit;
|
|
4434
4777
|
|
|
4435
|
-
export { type ButtonA11yProps, type ButtonOptions, type ButtonRenderKit,
|
|
4778
|
+
export { type ButtonA11yProps, ButtonAction, type ButtonOptions, type ButtonRenderKit, ButtonSize, ButtonVariant, type CheckboxA11y, type CheckboxProps, type CheckboxRenderKit, type CheckboxState, type CssVars, type DividerA11y, type DividerDataAttributes, type DividerOptions, type DividerOrientation, type DividerRenderKit, type DividerSize, type HeadingA11y, type HeadingLevel, type HeadingOptions, type HeadingRenderKit, type HeadingSize, type IconA11yProps, type IconColor, IconName, IconName as IconNameType, type IconOptions, type IconPreset, type IconRenderKit, type IconSize, type IconSizeKey, type IconStrokeWidth, type IconStrokeWidthKey, type InputA11yProps, type InputOptions, type InputRenderKit, type InputTone, type ParagraphA11y, type ParagraphOptions, type ParagraphRenderKit, type ParagraphSize, type Preset, type SvgElementType, type SvgNode, type System, type Theme, type ThemeMode, type ThemeOverrides, buildCheckboxA11y, buildHeadingA11y, checkboxRecipe, createButtonRecipe, createDividerRecipe, createIconRecipe, createInputRecipe, createSystem, darkThemeDefaults, defaultTheme, headingRecipe, iconNames, iconNamesList, iconRegistry, iconSizeScale, iconStrokeWidthScale, lightThemeDefaults, mergeTheme, normalizeTheme, paragraphRecipe, resolveIconSize, resolveIconStrokeWidth, switchMode };
|