@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.js
CHANGED
|
@@ -311,6 +311,29 @@ function switchMode(currentSystem, newMode) {
|
|
|
311
311
|
};
|
|
312
312
|
}
|
|
313
313
|
|
|
314
|
+
// src/components/atoms/button/button-types.ts
|
|
315
|
+
var ButtonSize = {
|
|
316
|
+
xs: "xs",
|
|
317
|
+
sm: "sm",
|
|
318
|
+
md: "md",
|
|
319
|
+
lg: "lg"
|
|
320
|
+
};
|
|
321
|
+
var ButtonVariant = {
|
|
322
|
+
primary: "primary",
|
|
323
|
+
secondary: "secondary",
|
|
324
|
+
text: "text"
|
|
325
|
+
};
|
|
326
|
+
var ButtonAction = {
|
|
327
|
+
submit: "submit",
|
|
328
|
+
reset: "reset",
|
|
329
|
+
button: "button",
|
|
330
|
+
navigate: "navigate",
|
|
331
|
+
delete: "delete",
|
|
332
|
+
create: "create",
|
|
333
|
+
edit: "edit",
|
|
334
|
+
cancel: "cancel"
|
|
335
|
+
};
|
|
336
|
+
|
|
314
337
|
// src/components/atoms/button/button-a11y.ts
|
|
315
338
|
function isDev() {
|
|
316
339
|
const p = globalThis.process;
|
|
@@ -356,7 +379,7 @@ function resolveButtonA11y(opts) {
|
|
|
356
379
|
function createButtonRecipe(theme, opts) {
|
|
357
380
|
const { tag, a11y, blockClick } = resolveButtonA11y(opts);
|
|
358
381
|
const size = opts.size ?? "md";
|
|
359
|
-
const
|
|
382
|
+
const variant = opts.variant ?? "primary";
|
|
360
383
|
const action = opts.action ?? (tag === "button" ? "button" : "navigate");
|
|
361
384
|
return {
|
|
362
385
|
tag,
|
|
@@ -367,15 +390,14 @@ function createButtonRecipe(theme, opts) {
|
|
|
367
390
|
},
|
|
368
391
|
className: [
|
|
369
392
|
"mw-btn",
|
|
370
|
-
// `mw-btn--${variant}`, --- Example left for later use ---
|
|
371
393
|
`mw-btn--${size}`,
|
|
372
|
-
`mw-btn--${
|
|
394
|
+
`mw-btn--${variant}`,
|
|
373
395
|
opts.error ? "mw-btn--error" : ""
|
|
374
396
|
].filter(Boolean).join(" "),
|
|
375
397
|
dataAttributes: {
|
|
376
398
|
"data-component": "button",
|
|
377
399
|
"data-action": action,
|
|
378
|
-
"data-
|
|
400
|
+
"data-variant": variant,
|
|
379
401
|
"data-size": size,
|
|
380
402
|
"data-error": opts.error ? "true" : void 0,
|
|
381
403
|
...opts.dataAttributes
|
|
@@ -1850,6 +1872,26 @@ var iconRegistry = {
|
|
|
1850
1872
|
}
|
|
1851
1873
|
]
|
|
1852
1874
|
},
|
|
1875
|
+
eyeOff: {
|
|
1876
|
+
viewBox: "0 0 24 24",
|
|
1877
|
+
nodes: [
|
|
1878
|
+
{
|
|
1879
|
+
tag: "path",
|
|
1880
|
+
attrs: {
|
|
1881
|
+
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
|
+
{
|
|
1885
|
+
tag: "line",
|
|
1886
|
+
attrs: {
|
|
1887
|
+
x1: "1",
|
|
1888
|
+
y1: "1",
|
|
1889
|
+
x2: "23",
|
|
1890
|
+
y2: "23"
|
|
1891
|
+
}
|
|
1892
|
+
}
|
|
1893
|
+
]
|
|
1894
|
+
},
|
|
1853
1895
|
facebook: {
|
|
1854
1896
|
viewBox: "0 0 24 24",
|
|
1855
1897
|
nodes: [
|
|
@@ -5039,6 +5081,238 @@ var iconRegistry = {
|
|
|
5039
5081
|
}
|
|
5040
5082
|
};
|
|
5041
5083
|
|
|
5084
|
+
// src/components/atoms/icon/icon-names.ts
|
|
5085
|
+
var IconName = {
|
|
5086
|
+
Airplay: "airplay",
|
|
5087
|
+
AlertCircle: "alertCircle",
|
|
5088
|
+
AlertOctagon: "alertOctagon",
|
|
5089
|
+
AlertTriangle: "alertTriangle",
|
|
5090
|
+
AlignCenter: "alignCenter",
|
|
5091
|
+
AlignJustify: "alignJustify",
|
|
5092
|
+
AlignLeft: "alignLeft",
|
|
5093
|
+
AlignRight: "alignRight",
|
|
5094
|
+
ArrowDown: "arrowDown",
|
|
5095
|
+
ArrowDownCircle: "arrowDownCircle",
|
|
5096
|
+
ArrowDownLeft: "arrowDownLeft",
|
|
5097
|
+
ArrowDownRight: "arrowDownRight",
|
|
5098
|
+
ArrowIn: "arrowIn",
|
|
5099
|
+
ArrowInCircle: "arrowInCircle",
|
|
5100
|
+
ArrowInSquare: "arrowInSquare",
|
|
5101
|
+
ArrowLeft: "arrowLeft",
|
|
5102
|
+
ArrowLeftCircle: "arrowLeftCircle",
|
|
5103
|
+
ArrowOut: "arrowOut",
|
|
5104
|
+
ArrowOutCircle: "arrowOutCircle",
|
|
5105
|
+
ArrowOutSquare: "arrowOutSquare",
|
|
5106
|
+
ArrowRight: "arrowRight",
|
|
5107
|
+
ArrowRightCircle: "arrowRightCircle",
|
|
5108
|
+
ArrowUp: "arrowUp",
|
|
5109
|
+
ArrowUpCircle: "arrowUpCircle",
|
|
5110
|
+
ArrowUpLeft: "arrowUpLeft",
|
|
5111
|
+
ArrowUpRight: "arrowUpRight",
|
|
5112
|
+
AtSign: "atSign",
|
|
5113
|
+
BarChart: "barChart",
|
|
5114
|
+
BarChart2: "barChart2",
|
|
5115
|
+
BarChart3: "barChart3",
|
|
5116
|
+
BarChart4: "barChart4",
|
|
5117
|
+
Bell: "bell",
|
|
5118
|
+
Bluetooth: "bluetooth",
|
|
5119
|
+
Bold: "bold",
|
|
5120
|
+
Bookmark: "bookmark",
|
|
5121
|
+
Calendar: "calendar",
|
|
5122
|
+
Camera: "camera",
|
|
5123
|
+
Cast: "cast",
|
|
5124
|
+
Check: "check",
|
|
5125
|
+
CheckCircle: "checkCircle",
|
|
5126
|
+
CheckSquare: "checkSquare",
|
|
5127
|
+
ChevronDown: "chevronDown",
|
|
5128
|
+
ChevronLeft: "chevronLeft",
|
|
5129
|
+
ChevronRight: "chevronRight",
|
|
5130
|
+
ChevronUp: "chevronUp",
|
|
5131
|
+
ChevronsDown: "chevronsDown",
|
|
5132
|
+
ChevronsLeft: "chevronsLeft",
|
|
5133
|
+
ChevronsRight: "chevronsRight",
|
|
5134
|
+
ChevronsUp: "chevronsUp",
|
|
5135
|
+
Circle: "circle",
|
|
5136
|
+
Clipboard: "clipboard",
|
|
5137
|
+
Clock: "clock",
|
|
5138
|
+
Code: "code",
|
|
5139
|
+
Command: "command",
|
|
5140
|
+
Compass: "compass",
|
|
5141
|
+
Copy: "copy",
|
|
5142
|
+
CornerDownLeft: "cornerDownLeft",
|
|
5143
|
+
CornerDownRight: "cornerDownRight",
|
|
5144
|
+
CornerLeftDown: "cornerLeftDown",
|
|
5145
|
+
CornerLeftUp: "cornerLeftUp",
|
|
5146
|
+
CornerRightDown: "cornerRightDown",
|
|
5147
|
+
CornerRightUp: "cornerRightUp",
|
|
5148
|
+
CornerUpLeft: "cornerUpLeft",
|
|
5149
|
+
CornerUpRight: "cornerUpRight",
|
|
5150
|
+
Cpu: "cpu",
|
|
5151
|
+
CreditCard: "creditCard",
|
|
5152
|
+
Database: "database",
|
|
5153
|
+
Delete: "delete",
|
|
5154
|
+
Disc: "disc",
|
|
5155
|
+
DollarSign: "dollarSign",
|
|
5156
|
+
Download: "download",
|
|
5157
|
+
DownloadCloud: "downloadCloud",
|
|
5158
|
+
Edit: "edit",
|
|
5159
|
+
Edit2: "edit2",
|
|
5160
|
+
Edit3: "edit3",
|
|
5161
|
+
Expand: "expand",
|
|
5162
|
+
ExternalLink: "externalLink",
|
|
5163
|
+
Eye: "eye",
|
|
5164
|
+
EyeOff: "eyeOff",
|
|
5165
|
+
Facebook: "facebook",
|
|
5166
|
+
FastForward: "fastForward",
|
|
5167
|
+
File: "file",
|
|
5168
|
+
FileMinus: "fileMinus",
|
|
5169
|
+
FileMinus2: "fileMinus2",
|
|
5170
|
+
FilePlus: "filePlus",
|
|
5171
|
+
FilePlus2: "filePlus2",
|
|
5172
|
+
FileText: "fileText",
|
|
5173
|
+
FileX: "fileX",
|
|
5174
|
+
FileX2: "fileX2",
|
|
5175
|
+
Film: "film",
|
|
5176
|
+
Flag: "flag",
|
|
5177
|
+
Folder: "folder",
|
|
5178
|
+
FolderMinus: "folderMinus",
|
|
5179
|
+
FolderMinus2: "folderMinus2",
|
|
5180
|
+
FolderPlus: "folderPlus",
|
|
5181
|
+
FolderPlus2: "folderPlus2",
|
|
5182
|
+
FolderX: "folderX",
|
|
5183
|
+
FolderX2: "folderX2",
|
|
5184
|
+
Grid: "grid",
|
|
5185
|
+
HardDrive: "hardDrive",
|
|
5186
|
+
Hash: "hash",
|
|
5187
|
+
Headphones: "headphones",
|
|
5188
|
+
Heart: "heart",
|
|
5189
|
+
HelpCircle: "helpCircle",
|
|
5190
|
+
Hexagon: "hexagon",
|
|
5191
|
+
Home: "home",
|
|
5192
|
+
Home2: "home2",
|
|
5193
|
+
Image: "image",
|
|
5194
|
+
Inbox: "inbox",
|
|
5195
|
+
Info: "info",
|
|
5196
|
+
Italic: "italic",
|
|
5197
|
+
Layout: "layout",
|
|
5198
|
+
Layout2: "layout2",
|
|
5199
|
+
Layout3: "layout3",
|
|
5200
|
+
Layout4: "layout4",
|
|
5201
|
+
Layout5: "layout5",
|
|
5202
|
+
Layout6: "layout6",
|
|
5203
|
+
LineChart: "lineChart",
|
|
5204
|
+
LineChart2: "lineChart2",
|
|
5205
|
+
Link: "link",
|
|
5206
|
+
List: "list",
|
|
5207
|
+
Loader: "loader",
|
|
5208
|
+
Lock: "lock",
|
|
5209
|
+
Mail: "mail",
|
|
5210
|
+
MapMarker1: "mapMarker1",
|
|
5211
|
+
MapMarker2: "mapMarker2",
|
|
5212
|
+
MapMarker3: "mapMarker3",
|
|
5213
|
+
Maximize: "maximize",
|
|
5214
|
+
Maximize2: "maximize2",
|
|
5215
|
+
Menu: "menu",
|
|
5216
|
+
MessageCircle: "messageCircle",
|
|
5217
|
+
MessageSquare: "messageSquare",
|
|
5218
|
+
Mic: "mic",
|
|
5219
|
+
Minimize: "minimize",
|
|
5220
|
+
Minimize3: "minimize3",
|
|
5221
|
+
Minus: "minus",
|
|
5222
|
+
MinusCircle: "minusCircle",
|
|
5223
|
+
MinusSquare: "minusSquare",
|
|
5224
|
+
Monitor: "monitor",
|
|
5225
|
+
Moon: "moon",
|
|
5226
|
+
MoreHorizontal: "moreHorizontal",
|
|
5227
|
+
MoreVertical: "moreVertical",
|
|
5228
|
+
Move: "move",
|
|
5229
|
+
Music: "music",
|
|
5230
|
+
Octagon: "octagon",
|
|
5231
|
+
Paperclip: "paperclip",
|
|
5232
|
+
Pause: "pause",
|
|
5233
|
+
PauseCircle: "pauseCircle",
|
|
5234
|
+
Percent: "percent",
|
|
5235
|
+
Phone: "phone",
|
|
5236
|
+
PieChart: "pieChart",
|
|
5237
|
+
PieChart2: "pieChart2",
|
|
5238
|
+
PieChart3: "pieChart3",
|
|
5239
|
+
PieChart4: "pieChart4",
|
|
5240
|
+
PieChart5: "pieChart5",
|
|
5241
|
+
Play: "play",
|
|
5242
|
+
PlayCircle: "playCircle",
|
|
5243
|
+
Plus: "plus",
|
|
5244
|
+
PlusCircle: "plusCircle",
|
|
5245
|
+
PlusSquare: "plusSquare",
|
|
5246
|
+
Power: "power",
|
|
5247
|
+
Printer: "printer",
|
|
5248
|
+
Radio: "radio",
|
|
5249
|
+
RefreshCcw: "refreshCcw",
|
|
5250
|
+
RefreshCw: "refreshCw",
|
|
5251
|
+
Repeat: "repeat",
|
|
5252
|
+
Rewind: "rewind",
|
|
5253
|
+
RotateLeft: "rotateLeft",
|
|
5254
|
+
RotateRight: "rotateRight",
|
|
5255
|
+
Rss: "rss",
|
|
5256
|
+
Save: "save",
|
|
5257
|
+
Scissors: "scissors",
|
|
5258
|
+
Search: "search",
|
|
5259
|
+
Server: "server",
|
|
5260
|
+
Settings: "settings",
|
|
5261
|
+
Share: "share",
|
|
5262
|
+
ShoppingBag: "shoppingBag",
|
|
5263
|
+
ShoppingCart: "shoppingCart",
|
|
5264
|
+
Shuffle: "shuffle",
|
|
5265
|
+
SkipBack: "skipBack",
|
|
5266
|
+
SkipForward: "skipForward",
|
|
5267
|
+
Slash: "slash",
|
|
5268
|
+
Sliders: "sliders",
|
|
5269
|
+
Smartphone: "smartphone",
|
|
5270
|
+
Speaker: "speaker",
|
|
5271
|
+
Square: "square",
|
|
5272
|
+
Star: "star",
|
|
5273
|
+
StopCircle: "stopCircle",
|
|
5274
|
+
Strikethrough: "strikethrough",
|
|
5275
|
+
Sun: "sun",
|
|
5276
|
+
Table: "table",
|
|
5277
|
+
Table2: "table2",
|
|
5278
|
+
Tablet: "tablet",
|
|
5279
|
+
Tag: "tag",
|
|
5280
|
+
ThumbsDown: "thumbsDown",
|
|
5281
|
+
ThumbsUp: "thumbsUp",
|
|
5282
|
+
Trash: "trash",
|
|
5283
|
+
TrendingDown: "trendingDown",
|
|
5284
|
+
TrendingUp: "trendingUp",
|
|
5285
|
+
Triangle: "triangle",
|
|
5286
|
+
Tv: "tv",
|
|
5287
|
+
Twitter: "twitter",
|
|
5288
|
+
Type: "type",
|
|
5289
|
+
Underline: "underline",
|
|
5290
|
+
Unlock: "unlock",
|
|
5291
|
+
Upload: "upload",
|
|
5292
|
+
UploadCloud: "uploadCloud",
|
|
5293
|
+
User: "user",
|
|
5294
|
+
UserCheck: "userCheck",
|
|
5295
|
+
UserCircle: "userCircle",
|
|
5296
|
+
UserMinus: "userMinus",
|
|
5297
|
+
UserPlus: "userPlus",
|
|
5298
|
+
UserX: "userX",
|
|
5299
|
+
Users: "users",
|
|
5300
|
+
Video: "video",
|
|
5301
|
+
VideoOff: "videoOff",
|
|
5302
|
+
Volume: "volume",
|
|
5303
|
+
Volume1: "volume1",
|
|
5304
|
+
Volume2: "volume2",
|
|
5305
|
+
VolumeX: "volumeX",
|
|
5306
|
+
Watch: "watch",
|
|
5307
|
+
Wifi: "wifi",
|
|
5308
|
+
X: "x",
|
|
5309
|
+
XCircle: "xCircle",
|
|
5310
|
+
XSquare: "xSquare",
|
|
5311
|
+
ZoomIn: "zoomIn",
|
|
5312
|
+
ZoomOut: "zoomOut"
|
|
5313
|
+
};
|
|
5314
|
+
var iconNamesList = Object.values(IconName);
|
|
5315
|
+
|
|
5042
5316
|
// src/components/atoms/icon/icon-scales.ts
|
|
5043
5317
|
var iconSizeScale = {
|
|
5044
5318
|
xs: 16,
|
|
@@ -5062,7 +5336,7 @@ function resolveIconStrokeWidth(input) {
|
|
|
5062
5336
|
}
|
|
5063
5337
|
|
|
5064
5338
|
// src/components/atoms/icon/icon-types.ts
|
|
5065
|
-
var iconNames =
|
|
5339
|
+
var iconNames = iconNamesList;
|
|
5066
5340
|
|
|
5067
5341
|
// src/components/atoms/icon/icon-recipe.ts
|
|
5068
5342
|
function resolveIconA11y(opts) {
|
|
@@ -5192,6 +5466,6 @@ function paragraphRecipe(opts, theme) {
|
|
|
5192
5466
|
};
|
|
5193
5467
|
}
|
|
5194
5468
|
|
|
5195
|
-
export { buildCheckboxA11y, buildHeadingA11y, checkboxRecipe, createButtonRecipe, createDividerRecipe, createIconRecipe, createInputRecipe, createSystem, darkThemeDefaults, defaultTheme, headingRecipe, iconNames, iconRegistry, iconSizeScale, iconStrokeWidthScale, lightThemeDefaults, mergeTheme, normalizeTheme, paragraphRecipe, resolveIconSize, resolveIconStrokeWidth, switchMode };
|
|
5469
|
+
export { ButtonAction, ButtonSize, ButtonVariant, IconName, buildCheckboxA11y, buildHeadingA11y, checkboxRecipe, createButtonRecipe, createDividerRecipe, createIconRecipe, createInputRecipe, createSystem, darkThemeDefaults, defaultTheme, headingRecipe, iconNames, iconNamesList, iconRegistry, iconSizeScale, iconStrokeWidthScale, lightThemeDefaults, mergeTheme, normalizeTheme, paragraphRecipe, resolveIconSize, resolveIconStrokeWidth, switchMode };
|
|
5196
5470
|
//# sourceMappingURL=index.js.map
|
|
5197
5471
|
//# sourceMappingURL=index.js.map
|