@una-ui/preset 0.10.1-beta.1 → 0.12.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/README.md +8 -0
- package/dist/prefixes.cjs +1 -1
- package/dist/prefixes.mjs +1 -1
- package/dist/shortcuts.cjs +72 -3
- package/dist/shortcuts.mjs +72 -3
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -14,6 +14,14 @@
|
|
|
14
14
|
|
|
15
15
|
Visit https://www.unaui.com for full documentation.
|
|
16
16
|
|
|
17
|
+
## 🌠 Star History
|
|
18
|
+
|
|
19
|
+
<picture>
|
|
20
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=una-ui/una-ui&type=Date&theme=dark" />
|
|
21
|
+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=una-ui/una-ui&type=Date" />
|
|
22
|
+
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=una-ui/una-ui&type=Date" />
|
|
23
|
+
</picture>
|
|
24
|
+
|
|
17
25
|
## 🌻 Sponsors
|
|
18
26
|
|
|
19
27
|
<p align="center">
|
package/dist/prefixes.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const prefixes = ["accordion", "alert", "avatar", "avatar-group", "badge", "button", "icon", "indicator", "kbd", "link", "progress", "separator", "skeleton", "
|
|
3
|
+
const prefixes = ["theme-switcher", "accordion", "alert", "avatar", "avatar-group", "badge", "button", "icon", "indicator", "kbd", "link", "progress", "separator", "skeleton", "checkbox", "form-group", "input", "radio", "slider", "switch", "nav-link", "nav-link-group", "card", "card-about", "card-content", "card-description", "card-footer", "card-header", "card-title", "tabs", "tabs-content", "tabs-list", "tabs-root", "tabs-trigger", "select", "select-content", "select-group", "select-item", "select-item-indicator", "select-item-text", "select-label", "select-root", "select-scroll-down-button", "select-scroll-up-button", "select-separator", "select-trigger", "select-value", "table", "table-body", "table-caption", "table-cell", "table-empty", "table-footer", "table-head", "table-header", "table-loading", "table-root", "table-row", "resize", "size", "btn"];
|
|
4
4
|
|
|
5
5
|
module.exports = prefixes;
|
package/dist/prefixes.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const prefixes = ["accordion", "alert", "avatar", "avatar-group", "badge", "button", "icon", "indicator", "kbd", "link", "progress", "separator", "skeleton", "
|
|
1
|
+
const prefixes = ["theme-switcher", "accordion", "alert", "avatar", "avatar-group", "badge", "button", "icon", "indicator", "kbd", "link", "progress", "separator", "skeleton", "checkbox", "form-group", "input", "radio", "slider", "switch", "nav-link", "nav-link-group", "card", "card-about", "card-content", "card-description", "card-footer", "card-header", "card-title", "tabs", "tabs-content", "tabs-list", "tabs-root", "tabs-trigger", "select", "select-content", "select-group", "select-item", "select-item-indicator", "select-item-text", "select-label", "select-root", "select-scroll-down-button", "select-scroll-up-button", "select-separator", "select-trigger", "select-value", "table", "table-body", "table-caption", "table-cell", "table-empty", "table-footer", "table-head", "table-header", "table-loading", "table-root", "table-row", "resize", "size", "btn"];
|
|
2
2
|
|
|
3
3
|
export { prefixes as default };
|
package/dist/shortcuts.cjs
CHANGED
|
@@ -521,7 +521,8 @@ const staticProgress = {
|
|
|
521
521
|
"progress": "progress-primary",
|
|
522
522
|
// components
|
|
523
523
|
"progress-root": "progress relative h-0.5em w-full overflow-hidden rounded-full bg-muted",
|
|
524
|
-
"progress-indicator": "h-full w-full flex-1 bg-brand transition-all"
|
|
524
|
+
"progress-indicator": "h-full w-full flex-1 bg-brand transition-all",
|
|
525
|
+
"progress-indeterminate": "absolute bg-brand h-full"
|
|
525
526
|
};
|
|
526
527
|
const dynamicProgress = [
|
|
527
528
|
[/^progress-(.*)$/, ([, body], { theme }) => {
|
|
@@ -573,7 +574,7 @@ const tabs = [
|
|
|
573
574
|
const staticSelect = {
|
|
574
575
|
// configurations
|
|
575
576
|
"select": "",
|
|
576
|
-
"select-default-variant": "btn-
|
|
577
|
+
"select-default-variant": "btn-solid-white",
|
|
577
578
|
"select-disabled": "n-disabled",
|
|
578
579
|
"select-scroll": "flex cursor-default items-center justify-center py-1",
|
|
579
580
|
"select-trigger-info-icon": "i-info",
|
|
@@ -645,6 +646,72 @@ const separator = [
|
|
|
645
646
|
staticSeparator
|
|
646
647
|
];
|
|
647
648
|
|
|
649
|
+
const staticCard = {
|
|
650
|
+
// base
|
|
651
|
+
"card": "relative flex flex-col rounded-lg overflow-hidden shadow-sm",
|
|
652
|
+
"card-default-variant": "card-outline-gray",
|
|
653
|
+
// components
|
|
654
|
+
"card-header": "",
|
|
655
|
+
"card-title": "text-2xl font-semibold leading-none tracking-tight",
|
|
656
|
+
"card-description": "text-sm text-muted",
|
|
657
|
+
"card-content": "px-4 py-5 pt-0 sm:p-6 sm:pt-0",
|
|
658
|
+
"card-footer": "flex items-center p-6 pt-0",
|
|
659
|
+
"card-about": "flex flex-col gap-y-1.5 px-4 py-5 sm:p-6",
|
|
660
|
+
// static variants
|
|
661
|
+
"card-soft-gray": "bg-muted border border-base",
|
|
662
|
+
"card-outline-gray": "bg-base border border-base"
|
|
663
|
+
};
|
|
664
|
+
const dynamicCard = [
|
|
665
|
+
// dynamic variants
|
|
666
|
+
[/^card-soft(-(\S+))?$/, ([, , c = "gray"]) => `bg-${c}-50 dark:bg-${c}-900 border-${c}-200 dark:border-${c}-700/58`],
|
|
667
|
+
[/^card-outline(-(\S+))?$/, ([, , c = "gray"]) => `border border-${c}-200 dark:border-${c}-700/58`]
|
|
668
|
+
];
|
|
669
|
+
const card = [
|
|
670
|
+
...dynamicCard,
|
|
671
|
+
staticCard
|
|
672
|
+
];
|
|
673
|
+
|
|
674
|
+
const staticTable = {
|
|
675
|
+
// config
|
|
676
|
+
"table-default-variant": "table-solid-gray",
|
|
677
|
+
"table": "",
|
|
678
|
+
// table-root
|
|
679
|
+
"table-root": "w-full caption-bottom text-sm",
|
|
680
|
+
"table-root-wrapper": "relative w-full overflow-x-auto overflow-y-hidden border border-base rounded-md",
|
|
681
|
+
"table-body": "[&_tr:last-child]:border-0 border-base",
|
|
682
|
+
"table-caption": "mt-4 text-sm text-muted",
|
|
683
|
+
// table-head
|
|
684
|
+
"table-head": "h-12 px-4 text-left align-middle font-medium text-muted [&:has([role=checkbox])]:pr-0",
|
|
685
|
+
"table-head-pinned": "sticky bg-base",
|
|
686
|
+
"table-head-pinned-left": "left-0",
|
|
687
|
+
"table-head-pinned-right": "right-0",
|
|
688
|
+
// table-header
|
|
689
|
+
"table-header": "[&_tr]:border-b border-base relative",
|
|
690
|
+
// table-row
|
|
691
|
+
"table-row": "border-b border-base hover:bg-muted data-[filter=true]:hover:bg-base data-[state=selected]:bg-muted",
|
|
692
|
+
// table-cell
|
|
693
|
+
"table-cell": "p-4 align-middle [&:has([role=checkbox])]:pr-0",
|
|
694
|
+
"table-cell-pinned": "sticky z-10 bg-base",
|
|
695
|
+
"table-cell-pinned-left": "left-0",
|
|
696
|
+
"table-cell-pinned-right": "right-0",
|
|
697
|
+
// table-empty
|
|
698
|
+
"table-empty-row": "",
|
|
699
|
+
"table-empty-cell": "p-4 whitespace-nowrap align-middle text-sm text-muted hover:bg-base",
|
|
700
|
+
"table-empty": "flex items-center justify-center py-10",
|
|
701
|
+
// table-loading
|
|
702
|
+
"table-loading-icon": "i-lucide-refresh-ccw animate-spin text-lg",
|
|
703
|
+
"table-loading-row": "data-[loading=true]:border-0",
|
|
704
|
+
"table-loading-cell": "",
|
|
705
|
+
"table-loading": "absolute inset-x-0 overflow-hidden p-0",
|
|
706
|
+
// table-footer
|
|
707
|
+
"table-footer": "border-t border-base bg-muted font-medium [&>tr]:last:border-b-0"
|
|
708
|
+
};
|
|
709
|
+
const dynamicTable = [];
|
|
710
|
+
const table = [
|
|
711
|
+
...dynamicTable,
|
|
712
|
+
staticTable
|
|
713
|
+
];
|
|
714
|
+
|
|
648
715
|
const shortcuts = [
|
|
649
716
|
...general,
|
|
650
717
|
...accordion,
|
|
@@ -669,7 +736,9 @@ const shortcuts = [
|
|
|
669
736
|
...skeleton,
|
|
670
737
|
...tabs,
|
|
671
738
|
...select,
|
|
672
|
-
...separator
|
|
739
|
+
...separator,
|
|
740
|
+
...card,
|
|
741
|
+
...table
|
|
673
742
|
];
|
|
674
743
|
|
|
675
744
|
exports.shortcuts = shortcuts;
|
package/dist/shortcuts.mjs
CHANGED
|
@@ -519,7 +519,8 @@ const staticProgress = {
|
|
|
519
519
|
"progress": "progress-primary",
|
|
520
520
|
// components
|
|
521
521
|
"progress-root": "progress relative h-0.5em w-full overflow-hidden rounded-full bg-muted",
|
|
522
|
-
"progress-indicator": "h-full w-full flex-1 bg-brand transition-all"
|
|
522
|
+
"progress-indicator": "h-full w-full flex-1 bg-brand transition-all",
|
|
523
|
+
"progress-indeterminate": "absolute bg-brand h-full"
|
|
523
524
|
};
|
|
524
525
|
const dynamicProgress = [
|
|
525
526
|
[/^progress-(.*)$/, ([, body], { theme }) => {
|
|
@@ -571,7 +572,7 @@ const tabs = [
|
|
|
571
572
|
const staticSelect = {
|
|
572
573
|
// configurations
|
|
573
574
|
"select": "",
|
|
574
|
-
"select-default-variant": "btn-
|
|
575
|
+
"select-default-variant": "btn-solid-white",
|
|
575
576
|
"select-disabled": "n-disabled",
|
|
576
577
|
"select-scroll": "flex cursor-default items-center justify-center py-1",
|
|
577
578
|
"select-trigger-info-icon": "i-info",
|
|
@@ -643,6 +644,72 @@ const separator = [
|
|
|
643
644
|
staticSeparator
|
|
644
645
|
];
|
|
645
646
|
|
|
647
|
+
const staticCard = {
|
|
648
|
+
// base
|
|
649
|
+
"card": "relative flex flex-col rounded-lg overflow-hidden shadow-sm",
|
|
650
|
+
"card-default-variant": "card-outline-gray",
|
|
651
|
+
// components
|
|
652
|
+
"card-header": "",
|
|
653
|
+
"card-title": "text-2xl font-semibold leading-none tracking-tight",
|
|
654
|
+
"card-description": "text-sm text-muted",
|
|
655
|
+
"card-content": "px-4 py-5 pt-0 sm:p-6 sm:pt-0",
|
|
656
|
+
"card-footer": "flex items-center p-6 pt-0",
|
|
657
|
+
"card-about": "flex flex-col gap-y-1.5 px-4 py-5 sm:p-6",
|
|
658
|
+
// static variants
|
|
659
|
+
"card-soft-gray": "bg-muted border border-base",
|
|
660
|
+
"card-outline-gray": "bg-base border border-base"
|
|
661
|
+
};
|
|
662
|
+
const dynamicCard = [
|
|
663
|
+
// dynamic variants
|
|
664
|
+
[/^card-soft(-(\S+))?$/, ([, , c = "gray"]) => `bg-${c}-50 dark:bg-${c}-900 border-${c}-200 dark:border-${c}-700/58`],
|
|
665
|
+
[/^card-outline(-(\S+))?$/, ([, , c = "gray"]) => `border border-${c}-200 dark:border-${c}-700/58`]
|
|
666
|
+
];
|
|
667
|
+
const card = [
|
|
668
|
+
...dynamicCard,
|
|
669
|
+
staticCard
|
|
670
|
+
];
|
|
671
|
+
|
|
672
|
+
const staticTable = {
|
|
673
|
+
// config
|
|
674
|
+
"table-default-variant": "table-solid-gray",
|
|
675
|
+
"table": "",
|
|
676
|
+
// table-root
|
|
677
|
+
"table-root": "w-full caption-bottom text-sm",
|
|
678
|
+
"table-root-wrapper": "relative w-full overflow-x-auto overflow-y-hidden border border-base rounded-md",
|
|
679
|
+
"table-body": "[&_tr:last-child]:border-0 border-base",
|
|
680
|
+
"table-caption": "mt-4 text-sm text-muted",
|
|
681
|
+
// table-head
|
|
682
|
+
"table-head": "h-12 px-4 text-left align-middle font-medium text-muted [&:has([role=checkbox])]:pr-0",
|
|
683
|
+
"table-head-pinned": "sticky bg-base",
|
|
684
|
+
"table-head-pinned-left": "left-0",
|
|
685
|
+
"table-head-pinned-right": "right-0",
|
|
686
|
+
// table-header
|
|
687
|
+
"table-header": "[&_tr]:border-b border-base relative",
|
|
688
|
+
// table-row
|
|
689
|
+
"table-row": "border-b border-base hover:bg-muted data-[filter=true]:hover:bg-base data-[state=selected]:bg-muted",
|
|
690
|
+
// table-cell
|
|
691
|
+
"table-cell": "p-4 align-middle [&:has([role=checkbox])]:pr-0",
|
|
692
|
+
"table-cell-pinned": "sticky z-10 bg-base",
|
|
693
|
+
"table-cell-pinned-left": "left-0",
|
|
694
|
+
"table-cell-pinned-right": "right-0",
|
|
695
|
+
// table-empty
|
|
696
|
+
"table-empty-row": "",
|
|
697
|
+
"table-empty-cell": "p-4 whitespace-nowrap align-middle text-sm text-muted hover:bg-base",
|
|
698
|
+
"table-empty": "flex items-center justify-center py-10",
|
|
699
|
+
// table-loading
|
|
700
|
+
"table-loading-icon": "i-lucide-refresh-ccw animate-spin text-lg",
|
|
701
|
+
"table-loading-row": "data-[loading=true]:border-0",
|
|
702
|
+
"table-loading-cell": "",
|
|
703
|
+
"table-loading": "absolute inset-x-0 overflow-hidden p-0",
|
|
704
|
+
// table-footer
|
|
705
|
+
"table-footer": "border-t border-base bg-muted font-medium [&>tr]:last:border-b-0"
|
|
706
|
+
};
|
|
707
|
+
const dynamicTable = [];
|
|
708
|
+
const table = [
|
|
709
|
+
...dynamicTable,
|
|
710
|
+
staticTable
|
|
711
|
+
];
|
|
712
|
+
|
|
646
713
|
const shortcuts = [
|
|
647
714
|
...general,
|
|
648
715
|
...accordion,
|
|
@@ -667,7 +734,9 @@ const shortcuts = [
|
|
|
667
734
|
...skeleton,
|
|
668
735
|
...tabs,
|
|
669
736
|
...select,
|
|
670
|
-
...separator
|
|
737
|
+
...separator,
|
|
738
|
+
...card,
|
|
739
|
+
...table
|
|
671
740
|
];
|
|
672
741
|
|
|
673
742
|
export { shortcuts };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@una-ui/preset",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.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.61.
|
|
53
|
-
"@unocss/preset-mini": "^0.61.
|
|
54
|
-
"unocss": "^0.61.
|
|
52
|
+
"@unocss/core": "^0.61.9",
|
|
53
|
+
"@unocss/preset-mini": "^0.61.9",
|
|
54
|
+
"unocss": "^0.61.9"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"build": "unbuild",
|