@una-ui/preset 0.4.0-beta.5 → 0.6.0-beta.1
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.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/prefixes.cjs +1 -1
- package/dist/prefixes.mjs +1 -1
- package/dist/shortcuts.cjs +50 -3
- package/dist/shortcuts.d.cts +2 -3
- package/dist/shortcuts.d.mts +2 -3
- package/dist/shortcuts.d.ts +2 -3
- package/dist/shortcuts.mjs +50 -3
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
package/dist/index.mjs
CHANGED
package/dist/prefixes.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const prefixes = ["accordion", "alert", "avatar-group", "avatar", "badge", "btn", "checkbox", "form-group", "general", "icon", "indicator", "input", "kbd", "link", "nav-link-group", "nav-link", "radio", "switch", "resize", "size", "nav-link-active", "nav-link-inactive"];
|
|
3
|
+
const prefixes = ["accordion", "alert", "avatar-group", "avatar", "badge", "btn", "checkbox", "form-group", "general", "icon", "indicator", "input", "kbd", "link", "nav-link-group", "nav-link", "progress", "radio", "slider", "switch", "resize", "size", "nav-link-active", "nav-link-inactive"];
|
|
4
4
|
|
|
5
5
|
module.exports = prefixes;
|
package/dist/prefixes.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const prefixes = ["accordion", "alert", "avatar-group", "avatar", "badge", "btn", "checkbox", "form-group", "general", "icon", "indicator", "input", "kbd", "link", "nav-link-group", "nav-link", "radio", "switch", "resize", "size", "nav-link-active", "nav-link-inactive"];
|
|
1
|
+
const prefixes = ["accordion", "alert", "avatar-group", "avatar", "badge", "btn", "checkbox", "form-group", "general", "icon", "indicator", "input", "kbd", "link", "nav-link-group", "nav-link", "progress", "radio", "slider", "switch", "resize", "size", "nav-link-active", "nav-link-inactive"];
|
|
2
2
|
|
|
3
3
|
export { prefixes as default };
|
package/dist/shortcuts.cjs
CHANGED
|
@@ -203,8 +203,8 @@ const input = [
|
|
|
203
203
|
|
|
204
204
|
const staticGeneral = {
|
|
205
205
|
// text-size
|
|
206
|
-
"text-md": "text-
|
|
207
|
-
"size-md": "text-
|
|
206
|
+
"text-md": "text-1rem leading-1.5rem",
|
|
207
|
+
"size-md": "text-md",
|
|
208
208
|
// text color
|
|
209
209
|
"text-base": "text-$c-foreground",
|
|
210
210
|
"text-inverted": "text-$c-background",
|
|
@@ -479,6 +479,51 @@ const checkbox = [
|
|
|
479
479
|
staticCheckbox
|
|
480
480
|
];
|
|
481
481
|
|
|
482
|
+
const staticSlider = {
|
|
483
|
+
// configurations
|
|
484
|
+
"slider": "slider-primary size-base",
|
|
485
|
+
"slider-disabled": "n-disabled",
|
|
486
|
+
"slider-root-vertical": "flex-col w-1em h-full",
|
|
487
|
+
"slider-track-vertical": "w-0.5em h-full",
|
|
488
|
+
"slider-range-vertical": "w-full",
|
|
489
|
+
"slider-thumb-vertical": "w-1.25em h-1.25em",
|
|
490
|
+
// components
|
|
491
|
+
"slider-root": "slider relative flex w-full touch-none select-none items-center",
|
|
492
|
+
"slider-track": "h-0.5em relative w-full grow overflow-hidden rounded-full bg-muted",
|
|
493
|
+
"slider-range": "absolute h-full bg-brand",
|
|
494
|
+
"slider-thumb": "w-1.25em h-1.25em block border-2 border-brand rounded-full bg-base focus-visible:ring-base ring-offset-base transition-colors disabled:pointer-events-none disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2"
|
|
495
|
+
};
|
|
496
|
+
const dynamicSlider = [
|
|
497
|
+
[/^slider-(.*)$/, ([, body], { theme }) => {
|
|
498
|
+
const color = utils.parseColor(body, theme);
|
|
499
|
+
if ((color?.cssColor?.type === "rgb" || color?.cssColor?.type === "rgba") && color.cssColor.components)
|
|
500
|
+
return `n-${body}-600 dark:n-${body}-500`;
|
|
501
|
+
}]
|
|
502
|
+
];
|
|
503
|
+
const slider = [
|
|
504
|
+
...dynamicSlider,
|
|
505
|
+
staticSlider
|
|
506
|
+
];
|
|
507
|
+
|
|
508
|
+
const staticProgress = {
|
|
509
|
+
// configurations
|
|
510
|
+
"progress": "progress-primary",
|
|
511
|
+
// components
|
|
512
|
+
"progress-root": "progress relative h-0.5em w-full overflow-hidden rounded-full bg-muted",
|
|
513
|
+
"progress-indicator": "h-full w-full flex-1 bg-brand transition-all"
|
|
514
|
+
};
|
|
515
|
+
const dynamicProgress = [
|
|
516
|
+
[/^progress-(.*)$/, ([, body], { theme }) => {
|
|
517
|
+
const color = utils.parseColor(body, theme);
|
|
518
|
+
if ((color?.cssColor?.type === "rgb" || color?.cssColor?.type === "rgba") && color.cssColor.components)
|
|
519
|
+
return `n-${body}-600 dark:n-${body}-500`;
|
|
520
|
+
}]
|
|
521
|
+
];
|
|
522
|
+
const progress = [
|
|
523
|
+
...dynamicProgress,
|
|
524
|
+
staticProgress
|
|
525
|
+
];
|
|
526
|
+
|
|
482
527
|
const shortcuts = [
|
|
483
528
|
...general,
|
|
484
529
|
...accordion,
|
|
@@ -497,7 +542,9 @@ const shortcuts = [
|
|
|
497
542
|
...navLinkGroup,
|
|
498
543
|
...link,
|
|
499
544
|
...radio,
|
|
500
|
-
...checkbox
|
|
545
|
+
...checkbox,
|
|
546
|
+
...slider,
|
|
547
|
+
...progress
|
|
501
548
|
];
|
|
502
549
|
|
|
503
550
|
exports.shortcuts = shortcuts;
|
package/dist/shortcuts.d.cts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { StaticShortcutMap } from '@unocss/core';
|
|
1
|
+
import { Preset, StaticShortcutMap } from '@unocss/core';
|
|
3
2
|
|
|
4
|
-
declare const shortcuts:
|
|
3
|
+
declare const shortcuts: Exclude<Preset["shortcuts"], undefined | StaticShortcutMap>;
|
|
5
4
|
|
|
6
5
|
export { shortcuts };
|
package/dist/shortcuts.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { StaticShortcutMap } from '@unocss/core';
|
|
1
|
+
import { Preset, StaticShortcutMap } from '@unocss/core';
|
|
3
2
|
|
|
4
|
-
declare const shortcuts:
|
|
3
|
+
declare const shortcuts: Exclude<Preset["shortcuts"], undefined | StaticShortcutMap>;
|
|
5
4
|
|
|
6
5
|
export { shortcuts };
|
package/dist/shortcuts.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { StaticShortcutMap } from '@unocss/core';
|
|
1
|
+
import { Preset, StaticShortcutMap } from '@unocss/core';
|
|
3
2
|
|
|
4
|
-
declare const shortcuts:
|
|
3
|
+
declare const shortcuts: Exclude<Preset["shortcuts"], undefined | StaticShortcutMap>;
|
|
5
4
|
|
|
6
5
|
export { shortcuts };
|
package/dist/shortcuts.mjs
CHANGED
|
@@ -201,8 +201,8 @@ const input = [
|
|
|
201
201
|
|
|
202
202
|
const staticGeneral = {
|
|
203
203
|
// text-size
|
|
204
|
-
"text-md": "text-
|
|
205
|
-
"size-md": "text-
|
|
204
|
+
"text-md": "text-1rem leading-1.5rem",
|
|
205
|
+
"size-md": "text-md",
|
|
206
206
|
// text color
|
|
207
207
|
"text-base": "text-$c-foreground",
|
|
208
208
|
"text-inverted": "text-$c-background",
|
|
@@ -477,6 +477,51 @@ const checkbox = [
|
|
|
477
477
|
staticCheckbox
|
|
478
478
|
];
|
|
479
479
|
|
|
480
|
+
const staticSlider = {
|
|
481
|
+
// configurations
|
|
482
|
+
"slider": "slider-primary size-base",
|
|
483
|
+
"slider-disabled": "n-disabled",
|
|
484
|
+
"slider-root-vertical": "flex-col w-1em h-full",
|
|
485
|
+
"slider-track-vertical": "w-0.5em h-full",
|
|
486
|
+
"slider-range-vertical": "w-full",
|
|
487
|
+
"slider-thumb-vertical": "w-1.25em h-1.25em",
|
|
488
|
+
// components
|
|
489
|
+
"slider-root": "slider relative flex w-full touch-none select-none items-center",
|
|
490
|
+
"slider-track": "h-0.5em relative w-full grow overflow-hidden rounded-full bg-muted",
|
|
491
|
+
"slider-range": "absolute h-full bg-brand",
|
|
492
|
+
"slider-thumb": "w-1.25em h-1.25em block border-2 border-brand rounded-full bg-base focus-visible:ring-base ring-offset-base transition-colors disabled:pointer-events-none disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2"
|
|
493
|
+
};
|
|
494
|
+
const dynamicSlider = [
|
|
495
|
+
[/^slider-(.*)$/, ([, body], { theme }) => {
|
|
496
|
+
const color = parseColor(body, theme);
|
|
497
|
+
if ((color?.cssColor?.type === "rgb" || color?.cssColor?.type === "rgba") && color.cssColor.components)
|
|
498
|
+
return `n-${body}-600 dark:n-${body}-500`;
|
|
499
|
+
}]
|
|
500
|
+
];
|
|
501
|
+
const slider = [
|
|
502
|
+
...dynamicSlider,
|
|
503
|
+
staticSlider
|
|
504
|
+
];
|
|
505
|
+
|
|
506
|
+
const staticProgress = {
|
|
507
|
+
// configurations
|
|
508
|
+
"progress": "progress-primary",
|
|
509
|
+
// components
|
|
510
|
+
"progress-root": "progress relative h-0.5em w-full overflow-hidden rounded-full bg-muted",
|
|
511
|
+
"progress-indicator": "h-full w-full flex-1 bg-brand transition-all"
|
|
512
|
+
};
|
|
513
|
+
const dynamicProgress = [
|
|
514
|
+
[/^progress-(.*)$/, ([, body], { theme }) => {
|
|
515
|
+
const color = parseColor(body, theme);
|
|
516
|
+
if ((color?.cssColor?.type === "rgb" || color?.cssColor?.type === "rgba") && color.cssColor.components)
|
|
517
|
+
return `n-${body}-600 dark:n-${body}-500`;
|
|
518
|
+
}]
|
|
519
|
+
];
|
|
520
|
+
const progress = [
|
|
521
|
+
...dynamicProgress,
|
|
522
|
+
staticProgress
|
|
523
|
+
];
|
|
524
|
+
|
|
480
525
|
const shortcuts = [
|
|
481
526
|
...general,
|
|
482
527
|
...accordion,
|
|
@@ -495,7 +540,9 @@ const shortcuts = [
|
|
|
495
540
|
...navLinkGroup,
|
|
496
541
|
...link,
|
|
497
542
|
...radio,
|
|
498
|
-
...checkbox
|
|
543
|
+
...checkbox,
|
|
544
|
+
...slider,
|
|
545
|
+
...progress
|
|
499
546
|
];
|
|
500
547
|
|
|
501
548
|
export { shortcuts };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@una-ui/preset",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0-beta.1",
|
|
4
4
|
"description": "The default preset for @una-ui",
|
|
5
5
|
"author": "Phojie Rengel <phojrengel@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@unocss/core": "^0.
|
|
53
|
-
"@unocss/preset-mini": "^0.
|
|
54
|
-
"unocss": "^0.
|
|
52
|
+
"@unocss/core": "^0.61.5",
|
|
53
|
+
"@unocss/preset-mini": "^0.61.5",
|
|
54
|
+
"unocss": "^0.61.5"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"build": "unbuild",
|