@shuriken-ui/tailwind 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
package/dist/preset.cjs CHANGED
@@ -15,38 +15,150 @@ const typography__default = /*#__PURE__*/_interopDefaultCompat(typography);
15
15
  const aspectRatio__default = /*#__PURE__*/_interopDefaultCompat(aspectRatio);
16
16
  const plugin__default = /*#__PURE__*/_interopDefaultCompat(plugin);
17
17
 
18
+ const shurikenUIBase = plugin__default(function({ addBase }) {
19
+ addBase({
20
+ ".dark": { colorScheme: "dark" }
21
+ });
22
+ });
23
+
18
24
  const defaultPluginOptions = {
19
25
  prefix: "nui"
20
26
  };
21
- const shurikenUIComponents = plugin__default.withOptions(
27
+
28
+ const defaultDropdownDividerConfig = {
29
+ space: "2",
30
+ border: "muted-200",
31
+ borderDark: "muted-600"
32
+ };
33
+ const dropdown = plugin__default.withOptions(
22
34
  function(options) {
23
35
  const { prefix } = defu.defu(options, defaultPluginOptions);
24
- return function({ addComponents }) {
36
+ return function({ addComponents, theme }) {
37
+ const config = theme(
38
+ "shurikenUi.dropdownDivider"
39
+ );
25
40
  addComponents({
26
- [`.${prefix}-placeload`]: {
27
- position: "relative",
28
- background: "linear-gradient( to right, rgb(0 0 0 / 7%) 8% ,rgb(0 0 0 / 15%) 18%, rgb(0 0 0 / 7%) 33%)",
29
- backgroundSize: "1200px 104px"
30
- },
31
- [`.dark .${prefix}-placeload`]: {
32
- position: "relative",
33
- background: "linear-gradient(to right, rgb(255 255 255 / 15%) 8%, rgb(255 255 255 / 24%) 18%, rgb(255 255 255 / 15%) 33%)",
34
- backgroundSize: "1200px 104px"
41
+ [`.${prefix}-dropdown-divider`]: {
42
+ [`@apply my-${config.space} block h-px w-full border-t border-${config.border} dark:border-${config.borderDark}`]: {}
35
43
  }
36
44
  });
45
+ };
46
+ },
47
+ function() {
48
+ return {
49
+ theme: {
50
+ shurikenUi: {
51
+ dropdownDivider: defaultDropdownDividerConfig
52
+ }
53
+ }
54
+ };
55
+ }
56
+ );
57
+
58
+ const defaultFocusConfig = {
59
+ offset: "2",
60
+ width: "1",
61
+ style: "dashed",
62
+ color: "muted-300",
63
+ colorDark: "muted-600"
64
+ };
65
+ const focus = plugin__default.withOptions(
66
+ function(options) {
67
+ const { prefix } = defu.defu(options, defaultPluginOptions);
68
+ return function({ addComponents, theme }) {
69
+ const config = theme(
70
+ "shurikenUi.focus"
71
+ );
37
72
  addComponents({
38
73
  [`.${prefix}-focus`]: {
39
- "@apply outline-1 outline-dashed outline-offset-2": {},
74
+ [`@apply outline-${config.width} outline-${config.style} outline-offset-${config.offset}`]: {},
40
75
  "@apply outline-transparent": {},
41
76
  "&:focus-within": {
42
- "@apply outline-muted-300 dark:outline-muted-600": {},
43
- "@apply outline-dashed ring-0": {}
77
+ [`@apply outline-${config.color} dark:outline-${config.colorDark}`]: {},
78
+ [`@apply outline-${config.style} ring-0`]: {}
44
79
  },
45
80
  "&:focus-visible": {
46
- "@apply outline-2": {}
81
+ [`@apply outline-${config.width}`]: {}
47
82
  }
48
83
  }
49
84
  });
85
+ };
86
+ },
87
+ function() {
88
+ return {
89
+ theme: {
90
+ shurikenUi: {
91
+ focus: defaultFocusConfig
92
+ }
93
+ }
94
+ };
95
+ }
96
+ );
97
+
98
+ const defaultLabelConfig = {
99
+ font: "alt",
100
+ text: "muted-400",
101
+ textDark: "muted-400/80"
102
+ };
103
+ const label = plugin__default.withOptions(
104
+ function(options) {
105
+ const { prefix } = defu.defu(options, defaultPluginOptions);
106
+ return function({ addComponents, theme }) {
107
+ const config = theme(
108
+ "shurikenUi.label"
109
+ );
110
+ addComponents({
111
+ [`.${prefix}-label`]: {
112
+ [`@apply inline-block font-${config.font} leading-none text-${config.text} dark:text-${config.textDark}`]: {}
113
+ }
114
+ });
115
+ };
116
+ },
117
+ function() {
118
+ return {
119
+ theme: {
120
+ shurikenUi: {
121
+ label: defaultLabelConfig
122
+ }
123
+ }
124
+ };
125
+ }
126
+ );
127
+
128
+ const defaultMarkConfig = {
129
+ bg: "primary-100",
130
+ bgDark: "primary-800",
131
+ text: "primary-800",
132
+ textDark: "primary-200"
133
+ };
134
+ const mark = plugin__default.withOptions(
135
+ function(options) {
136
+ const { prefix } = defu.defu(options, defaultPluginOptions);
137
+ return function({ addComponents, theme }) {
138
+ const config = theme("shurikenUi.mark");
139
+ addComponents({
140
+ [`.${prefix}-mark`]: {
141
+ [`@apply bg-${config.bg} dark:bg-${config.bgDark}`]: {},
142
+ [`@apply text-${config.text} dark:text-${config.textDark}`]: {}
143
+ }
144
+ });
145
+ };
146
+ },
147
+ function() {
148
+ return {
149
+ theme: {
150
+ shurikenUi: {
151
+ mark: defaultMarkConfig
152
+ }
153
+ }
154
+ };
155
+ }
156
+ );
157
+
158
+ const mask = plugin__default.withOptions(
159
+ function(options) {
160
+ const { prefix } = defu.defu(options, defaultPluginOptions);
161
+ return function({ addComponents }) {
50
162
  addComponents({
51
163
  [`.${prefix}-mask`]: {
52
164
  "mask-size": "contain",
@@ -69,50 +181,329 @@ const shurikenUIComponents = plugin__default.withOptions(
69
181
  "mask-image": "url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTAwIDBsMTAwIDEwMC0xMDAgMTAwTDAgMTAweiIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+')"
70
182
  }
71
183
  });
184
+ };
185
+ },
186
+ function() {
187
+ return {};
188
+ }
189
+ );
190
+
191
+ const placeload = plugin__default.withOptions(
192
+ function(options) {
193
+ const { prefix } = defu.defu(options, defaultPluginOptions);
194
+ return function({ addComponents }) {
72
195
  addComponents({
73
- [`.${prefix}-text-white`]: {
74
- "@apply text-white dark:text-black": {}
75
- },
76
- [`.${prefix}-text-50`]: {
77
- "@apply text-muted-50 dark:text-muted-900": {}
78
- },
79
- [`.${prefix}-text-100`]: {
80
- "@apply text-muted-100 dark:text-muted-900": {}
81
- },
82
- [`.${prefix}-text-200`]: {
83
- "@apply text-muted-200 dark:text-muted-800": {}
84
- },
85
- [`.${prefix}-text-300`]: {
86
- "@apply text-muted-300 dark:text-muted-700": {}
87
- },
88
- [`.${prefix}-text-400`]: {
89
- "@apply text-muted-400 dark:text-muted-600": {}
90
- },
91
- [`.${prefix}-text-500`]: {
92
- "@apply text-muted-500 dark:text-muted-500": {}
196
+ [`.${prefix}-placeload`]: {
197
+ position: "relative",
198
+ background: "linear-gradient( to right, rgb(0 0 0 / 7%) 8% ,rgb(0 0 0 / 15%) 18%, rgb(0 0 0 / 7%) 33%)",
199
+ backgroundSize: "1200px 104px"
93
200
  },
94
- [`.${prefix}-text-600`]: {
95
- "@apply text-muted-600 dark:text-muted-400": {}
201
+ [`.dark .${prefix}-placeload`]: {
202
+ position: "relative",
203
+ background: "linear-gradient(to right, rgb(255 255 255 / 15%) 8%, rgb(255 255 255 / 24%) 18%, rgb(255 255 255 / 15%) 33%)",
204
+ backgroundSize: "1200px 104px"
205
+ }
206
+ });
207
+ };
208
+ },
209
+ function(options) {
210
+ const { prefix } = defu.defu(options, defaultPluginOptions);
211
+ return {
212
+ theme: {
213
+ keyframes: {
214
+ [`${prefix}-placeload`]: {
215
+ "0%": { "background-position": "-468px 0" },
216
+ "100%": { "background-position": "468px 0" }
217
+ }
96
218
  },
97
- [`.${prefix}-text-700`]: {
98
- "@apply text-muted-700 dark:text-muted-300": {}
219
+ animation: {
220
+ [`${prefix}-placeload`]: `${prefix}-placeload 1s linear infinite forwards`
221
+ }
222
+ }
223
+ };
224
+ }
225
+ );
226
+
227
+ const defaultSlimscrollConfig = {
228
+ width: "[6px]",
229
+ bg: "black/5",
230
+ bgDark: "white/5",
231
+ bgHover: "black/20",
232
+ bgHoverDark: "white/20"
233
+ };
234
+ const slimscroll = plugin__default.withOptions(
235
+ function(options) {
236
+ const { prefix } = defu.defu(options, defaultPluginOptions);
237
+ return function({ addComponents, theme }) {
238
+ const config = theme(
239
+ "shurikenUi.slimscroll"
240
+ );
241
+ addComponents({
242
+ [`.${prefix}-slimscroll::-webkit-scrollbar, .${prefix}-slimscroll-opaque::-webkit-scrollbar`]: {
243
+ scrollBehavior: "smooth",
244
+ scrollbarGutter: "stable",
245
+ [`@apply w-${config.width}`]: {}
99
246
  },
100
- [`.${prefix}-text-800`]: {
101
- "@apply text-muted-800 dark:text-muted-200": {}
247
+ [`.${prefix}-slimscroll::-webkit-scrollbar-thumb`]: {
248
+ [`@apply rounded-lg bg-${config.bg} dark:bg-${config.bgDark} duration-300 transition-all`]: {}
102
249
  },
103
- [`.${prefix}-text-900`]: {
104
- "@apply text-muted-900 dark:text-muted-100": {}
250
+ [`.${prefix}-slimscroll-opaque::-webkit-scrollbar-thumb`]: {
251
+ [`@apply rounded-lg bg-transparent duration-300 transition-all`]: {}
105
252
  },
106
- [`.${prefix}-text-black`]: {
107
- "@apply text-black dark:text-white": {}
253
+ [`.${prefix}-slimscroll:hover::-webkit-scrollbar-thumb, .${prefix}-slimscroll-opaque:hover::-webkit-scrollbar-thumb`]: {
254
+ [`@apply bg-${config.bgHover} dark:bg-${config.bgHoverDark}`]: {}
108
255
  }
109
256
  });
257
+ };
258
+ },
259
+ function() {
260
+ return {
261
+ theme: {
262
+ shurikenUi: {
263
+ slimscroll: defaultSlimscrollConfig
264
+ }
265
+ }
266
+ };
267
+ }
268
+ );
269
+
270
+ const defaultTooltipConfig = {
271
+ font: "sans",
272
+ bg: "[#1e293b]",
273
+ bgDark: "[#ec4899]",
274
+ text: "[#fff]",
275
+ textDark: "[#fff]",
276
+ minWidth: "3rem",
277
+ maxWidth: "21rem"
278
+ };
279
+ const tooltip = plugin__default.withOptions(
280
+ function(options) {
281
+ const { prefix } = defu.defu(options, defaultPluginOptions);
282
+ return function({ addComponents, theme }) {
283
+ const config = theme(
284
+ "shurikenUi.tooltip"
285
+ );
286
+ const tooltip = `data-${prefix}-tooltip`;
287
+ const position = `data-${prefix}-tooltip-position`;
110
288
  addComponents({
289
+ [`[${tooltip}]`]: {
290
+ position: "relative"
291
+ },
292
+ [`[${tooltip}]::before, [${tooltip}]::after`]: {
293
+ textTransform: "none",
294
+ fontSize: "0.9em",
295
+ lineHeight: "1",
296
+ userSelect: "none",
297
+ pointerEvents: "none",
298
+ position: "absolute",
299
+ display: "none",
300
+ opacity: "0"
301
+ },
302
+ [`[${tooltip}]::before`]: {
303
+ content: "''",
304
+ border: "5px solid transparent",
305
+ zIndex: "1001"
306
+ },
307
+ [`[${tooltip}]::after`]: {
308
+ content: `attr(${tooltip})`,
309
+ textAlign: "center",
310
+ minWidth: config.minWidth,
311
+ maxWidth: config.maxWidth,
312
+ whiteSpace: "pre",
313
+ overflow: "hidden",
314
+ padding: "1ch 1.5ch",
315
+ borderRadius: "0.5ch",
316
+ zIndex: "1000",
317
+ [`@apply font-${config.font} text-xs shadow-lg`]: {},
318
+ [`@apply text-${config.text}`]: {},
319
+ [`@apply bg-${config.bg}`]: {}
320
+ },
321
+ [`.dark [${tooltip}]::after`]: {
322
+ [`@apply text-${config.textDark}`]: {},
323
+ [`@apply bg-${config.bgDark}`]: {}
324
+ },
325
+ [`[${tooltip}]:hover::before, [${tooltip}]:hover::after, [${tooltip}]:focus-visible::before, [${tooltip}]:focus-visible::after`]: {
326
+ display: "block"
327
+ },
328
+ [`[${tooltip}='']::before, [${tooltip}='']::after`]: {
329
+ display: "none !important"
330
+ },
331
+ /* position up (default) */
332
+ [`[${tooltip}]:not([${position}])::before, [${tooltip}][${position}^='up']::before`]: {
333
+ bottom: "calc(100% + 8px)",
334
+ borderBottomWidth: "0",
335
+ borderTopColor: "currentColor",
336
+ [`@apply text-${config.bg}`]: {}
337
+ },
338
+ [`.dark [${tooltip}]:not([${position}])::before, .dark [${tooltip}][${position}^='up']::before`]: {
339
+ [`@apply text-${config.bgDark}`]: {}
340
+ },
341
+ [`[${tooltip}]:not([${position}])::after, [${tooltip}][${position}^='up']::after`]: {
342
+ bottom: "calc(100% + 13px)"
343
+ },
344
+ [`[${tooltip}]:not([${position}])::before, [${tooltip}][${position}^='up']::before, [${tooltip}]:not([${position}])::after, [${tooltip}][${position}^='up']::after`]: {
345
+ left: "50%",
346
+ // insetInlineStart
347
+ transform: "translate(-50%, -0.5em)"
348
+ },
349
+ /* position down */
350
+ [`[${tooltip}][${position}^='down']::before`]: {
351
+ top: "100%",
352
+ borderTopWidth: "0",
353
+ borderBottomColor: "currentColor",
354
+ [`@apply text-${config.bg}`]: {}
355
+ },
356
+ [`.dark [${tooltip}][${position}^='down']::before`]: {
357
+ [`@apply text-${config.bgDark}`]: {}
358
+ },
359
+ [`[${tooltip}][${position}^='down']::after`]: {
360
+ top: "calc(100% + 5px)"
361
+ },
362
+ [`[${tooltip}][${position}^='down']::before, [${tooltip}][${position}^='down']::after`]: {
363
+ left: "50%",
364
+ // insetInlineStart
365
+ transform: "translate(-50%, 0.5em)"
366
+ },
367
+ /* position start (left) */
368
+ [`[${tooltip}][${position}^='start']::before, [${tooltip}][${position}^='left']::before`]: {
369
+ top: "50%",
370
+ borderEndWidth: "0",
371
+ borderStartColor: "currentColor",
372
+ insetInlineStart: "calc(0em - 5px)",
373
+ transform: "translate(-0.5em, -50%)",
374
+ [`@apply text-${config.bg}`]: {}
375
+ },
376
+ [`[${tooltip}][${position}^='start']::before, [${tooltip}][${position}^='left']::before`]: {
377
+ [`@apply text-${config.bgDark}`]: {}
378
+ },
379
+ [`[${tooltip}][${position}^='start']::after, [${tooltip}][${position}^='left']::after`]: {
380
+ top: "50%",
381
+ insetInlineEnd: "calc(100% + 5px)",
382
+ transform: "translate(-0.5em, -50%)"
383
+ },
384
+ /* position end (right) */
385
+ [`[${tooltip}][${position}^='end']::before, [${tooltip}][${position}^='right']::before`]: {
386
+ top: "50%",
387
+ borderStartWidth: "0",
388
+ borderEndColor: "currentColor",
389
+ insetInlineEnd: "calc(0em - 5px)",
390
+ transform: "translate(0.5em, -50%)",
391
+ [`@apply text-${config.bg}`]: {}
392
+ },
393
+ [`[${tooltip}][${position}^='end']::before, [${tooltip}][${position}^='right']::before`]: {
394
+ [`@apply text-${config.bgDark}`]: {}
395
+ },
396
+ [`[${tooltip}][${position}^='end']::after, [${tooltip}][${position}^='right']::after`]: {
397
+ top: "50%",
398
+ insetInlineStart: "calc(100% + 5px)",
399
+ transform: "translate(0.5em, -50%)"
400
+ },
401
+ [`${[
402
+ `[${tooltip}]:not([${position}]):hover::before`,
403
+ `[${tooltip}]:not([${position}]):hover::after`,
404
+ `[${tooltip}][${position}^='up']:hover::before`,
405
+ `[${tooltip}][${position}^='up']:hover::after`,
406
+ `[${tooltip}][${position}^='down']:hover::before`,
407
+ `[${tooltip}][${position}^='down']:hover::after`,
408
+ `[${tooltip}]:not([${position}]):focus-visible::before`,
409
+ `[${tooltip}]:not([${position}]):focus-visible::after`,
410
+ `[${tooltip}][${position}^='up']:focus-visible::before`,
411
+ `[${tooltip}][${position}^='up']:focus-visible::after`,
412
+ `[${tooltip}][${position}^='down']:focus-visible::before`,
413
+ `[${tooltip}][${position}^='down']:focus-visible::after`
414
+ ].join(",")}`]: {
415
+ [`@apply animate-${prefix}-tooltip-x`]: {}
416
+ },
417
+ [`${[
418
+ `[${tooltip}][${position}^='left']:hover::before`,
419
+ `[${tooltip}][${position}^='left']:hover::after`,
420
+ `[${tooltip}][${position}^='right']:hover::before`,
421
+ `[${tooltip}][${position}^='right']:hover::after`,
422
+ `[${tooltip}][${position}^='start']:hover::before`,
423
+ `[${tooltip}][${position}^='start']:hover::after`,
424
+ `[${tooltip}][${position}^='end']:hover::before`,
425
+ `[${tooltip}][${position}^='end']:hover::after`,
426
+ `[${tooltip}][${position}^='left']:focus-visible::before`,
427
+ `[${tooltip}][${position}^='left']:focus-visible::after`,
428
+ `[${tooltip}][${position}^='right']:focus-visible::before`,
429
+ `[${tooltip}][${position}^='right']:focus-visible::after`,
430
+ `[${tooltip}][${position}^='start']:focus-visible::before`,
431
+ `[${tooltip}][${position}^='start']:focus-visible::after`,
432
+ `[${tooltip}][${position}^='end']:focus-visible::before`,
433
+ `[${tooltip}][${position}^='end']:focus-visible::after`
434
+ ].join(",")}`]: {
435
+ [`@apply animate-${prefix}-tooltip-y`]: {}
436
+ }
437
+ });
438
+ };
439
+ },
440
+ function(options) {
441
+ const { prefix } = defu.defu(options, defaultPluginOptions);
442
+ return {
443
+ theme: {
444
+ keyframes: {
445
+ [`${prefix}-tooltip-x`]: {
446
+ to: {
447
+ opacity: "1",
448
+ transform: "translate(-50%, 0)"
449
+ }
450
+ },
451
+ [`${prefix}-tooltip-y`]: {
452
+ to: {
453
+ opacity: "1",
454
+ transform: "translate(0, -50%)"
455
+ }
456
+ }
457
+ },
458
+ animation: {
459
+ [`${prefix}-tooltip-x`]: `${prefix}-tooltip-x 300ms ease-out forwards`,
460
+ [`${prefix}-tooltip-y`]: `${prefix}-tooltip-y 300ms ease-out forwards`
461
+ },
462
+ shurikenUi: {
463
+ tooltip: defaultTooltipConfig
464
+ }
465
+ }
466
+ };
467
+ }
468
+ );
469
+
470
+ const components = [
471
+ dropdown,
472
+ focus,
473
+ label,
474
+ mark,
475
+ mask,
476
+ placeload,
477
+ slimscroll,
478
+ tooltip
479
+ ];
480
+ const shurikenUIComponents = plugin__default.withOptions(
481
+ function(options) {
482
+ return function(api) {
483
+ for (const component of components) {
484
+ component(options).handler(api);
485
+ }
486
+ };
487
+ },
488
+ function(options) {
489
+ let config = {};
490
+ for (const component of components) {
491
+ config = defu.defu(config, component(options).config);
492
+ }
493
+ return config;
494
+ }
495
+ );
496
+
497
+ const bg = plugin__default.withOptions(
498
+ function(options) {
499
+ const { prefix } = defu.defu(options, defaultPluginOptions);
500
+ return function({ addUtilities }) {
501
+ addUtilities({
111
502
  [`.${prefix}-bg-white`]: {
112
503
  "@apply bg-white dark:bg-muted-900": {}
113
504
  },
114
505
  [`.${prefix}-bg-50`]: {
115
- "@apply bg-muted-50 dark:bg-muted-900": {}
506
+ "@apply bg-muted-50 dark:bg-muted-950": {}
116
507
  },
117
508
  [`.${prefix}-bg-100`]: {
118
509
  "@apply bg-muted-100 dark:bg-muted-900": {}
@@ -141,36 +532,100 @@ const shurikenUIComponents = plugin__default.withOptions(
141
532
  [`.${prefix}-bg-900`]: {
142
533
  "@apply bg-muted-900 dark:bg-muted-100": {}
143
534
  },
535
+ [`.${prefix}-bg-950`]: {
536
+ "@apply bg-muted-950 dark:bg-muted-50": {}
537
+ },
144
538
  [`.${prefix}-bg-black`]: {
145
539
  "@apply bg-muted-900 dark:bg-white": {}
146
540
  }
147
541
  });
148
- addComponents({
149
- [`.${prefix}-label`]: {
150
- "@apply inline-block font-alt leading-none text-muted-400 dark:text-muted-400/80": {}
151
- }
152
- });
153
- addComponents({
154
- [`.${prefix}-dropdown-divider`]: {
155
- "@apply my-2 block h-px w-full border-t border-muted-200 dark:border-muted-600": {}
156
- }
157
- });
158
- addComponents({
159
- [`.${prefix}-mark`]: {
160
- "@apply bg-primary-100 text-primary-800 dark:bg-primary-800 dark:text-primary-200": {}
542
+ };
543
+ },
544
+ function(options) {
545
+ return {};
546
+ }
547
+ );
548
+
549
+ const text = plugin__default.withOptions(
550
+ function(options) {
551
+ const { prefix } = defu.defu(options, defaultPluginOptions);
552
+ return function({ addUtilities }) {
553
+ addUtilities({
554
+ [`.${prefix}-text-white`]: {
555
+ "@apply text-white dark:text-black": {}
556
+ },
557
+ [`.${prefix}-text-50`]: {
558
+ "@apply text-muted-50 dark:text-muted-950": {}
559
+ },
560
+ [`.${prefix}-text-100`]: {
561
+ "@apply text-muted-100 dark:text-muted-900": {}
562
+ },
563
+ [`.${prefix}-text-200`]: {
564
+ "@apply text-muted-200 dark:text-muted-800": {}
565
+ },
566
+ [`.${prefix}-text-300`]: {
567
+ "@apply text-muted-300 dark:text-muted-700": {}
568
+ },
569
+ [`.${prefix}-text-400`]: {
570
+ "@apply text-muted-400 dark:text-muted-600": {}
571
+ },
572
+ [`.${prefix}-text-500`]: {
573
+ "@apply text-muted-500 dark:text-muted-500": {}
574
+ },
575
+ [`.${prefix}-text-600`]: {
576
+ "@apply text-muted-600 dark:text-muted-400": {}
577
+ },
578
+ [`.${prefix}-text-700`]: {
579
+ "@apply text-muted-700 dark:text-muted-300": {}
580
+ },
581
+ [`.${prefix}-text-800`]: {
582
+ "@apply text-muted-800 dark:text-muted-200": {}
583
+ },
584
+ [`.${prefix}-text-900`]: {
585
+ "@apply text-muted-900 dark:text-muted-100": {}
586
+ },
587
+ [`.${prefix}-text-950`]: {
588
+ "@apply text-muted-950 dark:text-muted-50": {}
589
+ },
590
+ [`.${prefix}-text-black`]: {
591
+ "@apply text-black dark:text-white": {}
161
592
  }
162
593
  });
163
594
  };
164
595
  },
165
- function(options) {
596
+ function() {
166
597
  return {};
167
598
  }
168
599
  );
169
600
 
601
+ const utilities = [bg, text];
602
+ const shurikenUIUtilities = plugin__default.withOptions(
603
+ function(options) {
604
+ return function(api) {
605
+ for (const utility of utilities) {
606
+ utility(options).handler(api);
607
+ }
608
+ };
609
+ },
610
+ function(options) {
611
+ let config = {};
612
+ for (const utility of utilities) {
613
+ config = defu.defu(config, utility(options).config);
614
+ }
615
+ return config;
616
+ }
617
+ );
618
+
170
619
  const shurikenUIPreset = {
171
620
  darkMode: "class",
172
621
  content: [],
173
- plugins: [typography__default, aspectRatio__default, shurikenUIComponents],
622
+ plugins: [
623
+ typography__default,
624
+ aspectRatio__default,
625
+ shurikenUIBase,
626
+ shurikenUIComponents,
627
+ shurikenUIUtilities
628
+ ],
174
629
  theme: {
175
630
  fontFamily: {
176
631
  sans: defaultTheme__default.fontFamily.sans,
@@ -280,15 +735,10 @@ const shurikenUIPreset = {
280
735
  "nui-indeterminate": {
281
736
  "0%": { "margin-left": "-10%" },
282
737
  "100%": { "margin-left": "100%" }
283
- },
284
- "nui-placeload": {
285
- "0%": { "background-position": "-468px 0" },
286
- "100%": { "background-position": "468px 0" }
287
738
  }
288
739
  },
289
740
  animation: {
290
- "nui-indeterminate": "nui-indeterminate 1s cubic-bezier(0.4, 0, 0.2, 1) infinite",
291
- "nui-placeload": "nui-placeload 1s linear infinite forwards"
741
+ "nui-indeterminate": "nui-indeterminate 1s cubic-bezier(0.4, 0, 0.2, 1) infinite"
292
742
  }
293
743
  }
294
744
  }
package/dist/preset.d.ts CHANGED
@@ -1,5 +1,5 @@
1
+ import { P as PluginOption } from './options-cff79ff9.js';
1
2
  import * as tailwindcss_types_config from 'tailwindcss/types/config';
2
- import { P as PluginOption } from './components-cff79ff9.js';
3
3
  import { Config } from 'tailwindcss';
4
4
  import _tailwindcss_typography__default from '@tailwindcss/typography';
5
5
 
@@ -8,6 +8,9 @@ declare const _default: {
8
8
  content: never[];
9
9
  plugins: (typeof _tailwindcss_typography__default | {
10
10
  handler: () => void;
11
+ } | {
12
+ handler: tailwindcss_types_config.PluginCreator;
13
+ config?: Partial<Config> | undefined;
11
14
  } | {
12
15
  (options: PluginOption): {
13
16
  handler: tailwindcss_types_config.PluginCreator;
@@ -203,18 +206,9 @@ declare const _default: {
203
206
  'margin-left': string;
204
207
  };
205
208
  };
206
- 'nui-placeload': {
207
- '0%': {
208
- 'background-position': string;
209
- };
210
- '100%': {
211
- 'background-position': string;
212
- };
213
- };
214
209
  };
215
210
  animation: {
216
211
  'nui-indeterminate': string;
217
- 'nui-placeload': string;
218
212
  };
219
213
  };
220
214
  };