@una-ui/preset 0.7.0-beta.2 → 0.9.0-beta.2

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/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", "progress", "radio", "skeleton", "slider", "switch", "resize", "size", "nav-link-active", "nav-link-inactive"];
3
+ const prefixes = ["theme-switcher", "checkbox", "form-group", "input", "radio", "slider", "switch", "accordion", "alert", "avatar", "avatar-group", "badge", "button", "icon", "indicator", "kbd", "link", "progress", "separator", "skeleton", "nav-link", "nav-link-group", "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", "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-group", "avatar", "badge", "btn", "checkbox", "form-group", "general", "icon", "indicator", "input", "kbd", "link", "nav-link-group", "nav-link", "progress", "radio", "skeleton", "slider", "switch", "resize", "size", "nav-link-active", "nav-link-inactive"];
1
+ const prefixes = ["theme-switcher", "checkbox", "form-group", "input", "radio", "slider", "switch", "accordion", "alert", "avatar", "avatar-group", "badge", "button", "icon", "indicator", "kbd", "link", "progress", "separator", "skeleton", "nav-link", "nav-link-group", "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", "resize", "size", "btn"];
2
2
 
3
3
  export { prefixes as default };
@@ -96,7 +96,7 @@ const staticBtn = {
96
96
  "btn-default-variant": "btn-solid",
97
97
  "btn-loading-icon": "i-loading",
98
98
  // base
99
- "btn": "bg-transparent text-0.875em leading-5 gap-0.42857142857142855em btn-rectangle rounded-md inline-flex justify-center items-center btn-disabled font-semibold cursor-pointer",
99
+ "btn": "bg-transparent text-0.875em leading-5 gap-0.42857142857142855em btn-rectangle rounded-md inline-flex justify-center items-center btn-disabled font-medium cursor-pointer",
100
100
  "btn-disabled": "disabled:n-disabled",
101
101
  "btn-label": "",
102
102
  "btn-icon-label": "text-1.191em",
@@ -111,14 +111,17 @@ const staticBtn = {
111
111
  // variants
112
112
  "btn-solid-white": "bg-base text-base ring-1 ring-base ring-inset shadow-sm btn-focus hover:bg-muted",
113
113
  "btn-ghost-white": "text-base btn-focus hover:bg-$c-gray-50",
114
+ "btn-outline-white": "bg-transparent text-base ring-1 ring-base ring-inset btn-focus",
114
115
  "btn-solid-gray": "bg-$c-gray-50 text-$c-gray-800 ring-1 ring-base ring-inset shadow-sm btn-focus hover:bg-$c-gray-100",
115
116
  "btn-ghost-gray": "text-$c-gray-600 btn-focus hover:bg-$c-gray-100",
116
117
  "btn-soft-gray": "text-$c-gray-600 bg-$c-gray-50 btn-focus hover:bg-$c-gray-100",
117
- "btn-link-gray": "text-$c-gray-500 btn-focus hover:text-$c-gray-950 hover:underline underline-offset-4",
118
- "btn-solid-black": "bg-$c-gray-950 text-inverted shadow-sm btn-focus hover:bg-$c-gray-900",
119
- "btn-link-black": "text-$c-gray-950 btn-focus hover:underline underline-offset-4",
120
- "btn-text-black": "text-$c-gray-950 btn-focus hover:text-$c-gray-900",
121
- "btn-text-gray": "text-$c-gray-600 btn-focus hover:text-$c-gray-900"
118
+ "btn-outline-gray": "bg-transparent text-muted ring-1 ring-base ring-inset btn-focus",
119
+ "btn-link-gray": "text-muted btn-focus hover:text-base hover:underline underline-offset-4",
120
+ "btn-text-gray": "text-$c-gray-600 btn-focus hover:text-$c-gray-900",
121
+ "btn-solid-black": "bg-inverted text-inverted shadow-sm btn-focus",
122
+ "btn-link-black": "text-base btn-focus hover:underline underline-offset-4",
123
+ "btn-text-black": "text-base btn-focus hover:text-muted",
124
+ "btn-soft-black": "text-base bg-base btn-focus shadow-sm"
122
125
  };
123
126
  const dynamicBtn = [
124
127
  // base
@@ -209,6 +212,10 @@ const staticGeneral = {
209
212
  "text-base": "text-$c-foreground",
210
213
  "text-inverted": "text-$c-background",
211
214
  "text-muted": "text-$c-muted-foreground",
215
+ "text-accent": "text-$c-accent-foreground",
216
+ "text-accent-forground": "text-$c-accent",
217
+ "text-popover": "text-$c-popover-foreground",
218
+ "text-popover-foreground": "text-$c-popover",
212
219
  "text-info": "text-info-500 dark:text-info-400",
213
220
  "text-error": "text-error-500 dark:text-error-400",
214
221
  "text-success": "text-success-500 dark:text-success-400",
@@ -226,6 +233,10 @@ const staticGeneral = {
226
233
  "bg-base": "bg-$c-background",
227
234
  "bg-inverted": "bg-$c-foreground",
228
235
  "bg-muted": "bg-$c-muted",
236
+ "bg-accent": "bg-$c-accent",
237
+ "bg-accent-foreground": "bg-$c-accent-foreground",
238
+ "bg-popover": "bg-$c-popover",
239
+ "bg-popover-foreground": "bg-$c-popover-foreground",
229
240
  // icon
230
241
  "i-loading": "i-tabler-loader-2",
231
242
  "i-warning": "i-heroicons-exclamation-triangle-20-solid",
@@ -234,7 +245,7 @@ const staticGeneral = {
234
245
  "i-info": "i-heroicons-information-circle-20-solid",
235
246
  "i-close": "i-heroicons-x-mark-20-solid",
236
247
  "i-dot": "i-tabler-circle-filled",
237
- "i-check": "i-tabler-check",
248
+ "i-check": "i-lucide-check",
238
249
  // transition
239
250
  "transition-base": "transition-all duration-100 ease-out"
240
251
  };
@@ -415,9 +426,9 @@ const staticKbd = {
415
426
  };
416
427
  const dynamicKbd = [
417
428
  // modifiers
418
- [/^kbd-ring(-(\S+))?$/, ([, , c = "gray"]) => `ring ring-inset ring-${c}-200 dark:ring-${c}-700`],
429
+ [/^kbd-ring(-(\S+))?$/, ([, , c = "gray"]) => `ring-1 ring-inset ring-${c}-200 dark:ring-${c}-700`],
419
430
  // variants
420
- [/^kbd-solid(-(\S+))?$/, ([, , c = "gray"]) => `kbd-ring-${c} bg-${c}-50 text-${c}-500 dark:bg-${c}-950 dark:text-${c}-400`],
431
+ [/^kbd-solid(-(\S+))?$/, ([, , c = "gray"]) => `kbd-ring-${c} bg-${c}-50 text-${c}-500 dark:bg-${c}-900 dark:text-${c}-400`],
421
432
  [/^kbd-outline(-(\S+))?$/, ([, , c = "gray"]) => `kbd-ring-${c} bg-transparent text-${c}-500 dark:text-${c}-400`]
422
433
  ];
423
434
  const kbd = [
@@ -454,7 +465,7 @@ const radio = [
454
465
 
455
466
  const staticCheckbox = {
456
467
  // base
457
- "checkbox": "text-md checkbox-primary flex items-center transition-base w-1em h-1em border border-$c-ring rounded n-checked:border-brand n-checked:bg-brand",
468
+ "checkbox": "text-md checkbox-primary flex items-center transition-base w-1em h-1em border border-brand rounded n-checked:border-brand n-checked:bg-brand",
458
469
  "checkbox-disabled": "n-disabled",
459
470
  "checkbox-label": "block text-sm font-medium leading-6",
460
471
  "checkbox-input": "absolute w-full opacity-0",
@@ -540,6 +551,84 @@ const skeleton = [
540
551
  staticSkeleton
541
552
  ];
542
553
 
554
+ const staticSelect = {
555
+ // configurations
556
+ "select": "",
557
+ "select-disabled": "n-disabled",
558
+ "select-scroll": "flex cursor-default items-center justify-center py-1",
559
+ "select-trigger-info-icon": "i-info",
560
+ "select-trigger-error-icon": "i-error",
561
+ "select-trigger-success-icon": "i-success",
562
+ "select-trigger-warning-icon": "i-warning",
563
+ // components
564
+ "select-root": "",
565
+ "select-trigger": "min-h-2.5em w-full",
566
+ // [&>span]:line-clamp-1
567
+ "select-trigger-trailing-icon": "i-lucide-chevrons-up-down !text-1.042em",
568
+ "select-trigger-trailing": "ml-auto",
569
+ "select-trigger-leading": "",
570
+ "select-value": "h-1.5em",
571
+ "select-content": "relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border border-base bg-popover text-popover shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
572
+ "select-content-popper": "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
573
+ "select-group": "p-1 w-full",
574
+ "select-separator": "-mx-1 my-1 h-px bg-muted",
575
+ "select-item": "select-item-gray relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-1em outline-none data-[disabled]:pointer-events-none data-[disabled]:n-disabled",
576
+ "select-item-indicator": "absolute left-2 h-0.75em w-0.75em flex items-center justify-center",
577
+ "select-item-indicator-icon": "i-check",
578
+ "select-viewport": "p-1",
579
+ "select-viewport-popper": "h-[--radix-select-trigger-height] w-full min-w-[--radix-select-trigger-width]",
580
+ "select-scroll-up-button": "select-scroll",
581
+ "select-scroll-down-button": "select-scroll",
582
+ "select-scroll-up-button-icon": "i-lucide-chevron-up",
583
+ "select-scroll-down-button-icon": "i-lucide-chevron-down",
584
+ "select-label": "py-1.5 pl-8 pr-2 text-1em font-semibold",
585
+ // ⚠️ for overriding purposes only
586
+ "select-item-selectItem": ""
587
+ };
588
+ const dynamicSelect = [
589
+ [/^select-(.*)$/, ([, body], { theme }) => {
590
+ const color = utils.parseColor(body, theme);
591
+ if ((color?.cssColor?.type === "rgb" || color?.cssColor?.type === "rgba") && color.cssColor.components)
592
+ return `n-${body}-600 dark:n-${body}-500`;
593
+ }],
594
+ [/^select-item(-(\S+))?$/, ([, , c = "gray"]) => `focus:bg-${c}-100 focus:text-${c}-800 dark:focus:bg-${c}-800 dark:focus:text-${c}-100`]
595
+ ];
596
+ const select = [
597
+ ...dynamicSelect,
598
+ staticSelect
599
+ ];
600
+
601
+ const staticSeparator = {
602
+ // base
603
+ "separator": "text-md shrink-0 relative",
604
+ "separator-default-variant": "separator-solid-gray",
605
+ "separator-content": "text-0.75em text-muted bg-base absolute flex justify-center items-center",
606
+ // orientation states
607
+ "separator-horizontal": "h-px my-4 w-full border-t-0.0625em",
608
+ "separator-vertical": "w-px mx-4 h-full border-l-0.0625em",
609
+ "separator-content-horizontal": "h-1px py-1 px-2",
610
+ "separator-content-vertical": "w-1px px-1 py-2",
611
+ // horizontal positions
612
+ "separator-position-left": "left-6 top-1/2 -translate-y-1/2",
613
+ "separator-position-right": "right-6 top-1/2 -translate-y-1/2",
614
+ "separator-position-center": "left-1/2 top-1/2 -translate-y-1/2 -translate-x-1/2",
615
+ // vertical positions
616
+ "separator-position-bottom": "bottom-4 left-1/2 -translate-x-1/2",
617
+ "separator-position-top": "top-4 left-1/2 -translate-x-1/2",
618
+ // static variants
619
+ "separator-solid-gray": "border-base"
620
+ };
621
+ const dynamicSeparator = [
622
+ // dynamic variants
623
+ [/^seperator-solid(-(\S+))?$/, ([, , c = "gray"]) => `border-solid border-${c}-200 dark:border-${c}-700/58`],
624
+ [/^separator-dashed(-(\S+))?$/, ([, , c = "gray"]) => `border-dashed border-${c}-200 dark:border-${c}-700/58`],
625
+ [/^separator-dotted(-(\S+))?$/, ([, , c = "gray"]) => `border-dotted border-${c}-200 dark:border-${c}-700/58`]
626
+ ];
627
+ const separator = [
628
+ ...dynamicSeparator,
629
+ staticSeparator
630
+ ];
631
+
543
632
  const shortcuts = [
544
633
  ...general,
545
634
  ...accordion,
@@ -561,7 +650,9 @@ const shortcuts = [
561
650
  ...checkbox,
562
651
  ...slider,
563
652
  ...progress,
564
- ...skeleton
653
+ ...skeleton,
654
+ ...select,
655
+ ...separator
565
656
  ];
566
657
 
567
658
  exports.shortcuts = shortcuts;
@@ -94,7 +94,7 @@ const staticBtn = {
94
94
  "btn-default-variant": "btn-solid",
95
95
  "btn-loading-icon": "i-loading",
96
96
  // base
97
- "btn": "bg-transparent text-0.875em leading-5 gap-0.42857142857142855em btn-rectangle rounded-md inline-flex justify-center items-center btn-disabled font-semibold cursor-pointer",
97
+ "btn": "bg-transparent text-0.875em leading-5 gap-0.42857142857142855em btn-rectangle rounded-md inline-flex justify-center items-center btn-disabled font-medium cursor-pointer",
98
98
  "btn-disabled": "disabled:n-disabled",
99
99
  "btn-label": "",
100
100
  "btn-icon-label": "text-1.191em",
@@ -109,14 +109,17 @@ const staticBtn = {
109
109
  // variants
110
110
  "btn-solid-white": "bg-base text-base ring-1 ring-base ring-inset shadow-sm btn-focus hover:bg-muted",
111
111
  "btn-ghost-white": "text-base btn-focus hover:bg-$c-gray-50",
112
+ "btn-outline-white": "bg-transparent text-base ring-1 ring-base ring-inset btn-focus",
112
113
  "btn-solid-gray": "bg-$c-gray-50 text-$c-gray-800 ring-1 ring-base ring-inset shadow-sm btn-focus hover:bg-$c-gray-100",
113
114
  "btn-ghost-gray": "text-$c-gray-600 btn-focus hover:bg-$c-gray-100",
114
115
  "btn-soft-gray": "text-$c-gray-600 bg-$c-gray-50 btn-focus hover:bg-$c-gray-100",
115
- "btn-link-gray": "text-$c-gray-500 btn-focus hover:text-$c-gray-950 hover:underline underline-offset-4",
116
- "btn-solid-black": "bg-$c-gray-950 text-inverted shadow-sm btn-focus hover:bg-$c-gray-900",
117
- "btn-link-black": "text-$c-gray-950 btn-focus hover:underline underline-offset-4",
118
- "btn-text-black": "text-$c-gray-950 btn-focus hover:text-$c-gray-900",
119
- "btn-text-gray": "text-$c-gray-600 btn-focus hover:text-$c-gray-900"
116
+ "btn-outline-gray": "bg-transparent text-muted ring-1 ring-base ring-inset btn-focus",
117
+ "btn-link-gray": "text-muted btn-focus hover:text-base hover:underline underline-offset-4",
118
+ "btn-text-gray": "text-$c-gray-600 btn-focus hover:text-$c-gray-900",
119
+ "btn-solid-black": "bg-inverted text-inverted shadow-sm btn-focus",
120
+ "btn-link-black": "text-base btn-focus hover:underline underline-offset-4",
121
+ "btn-text-black": "text-base btn-focus hover:text-muted",
122
+ "btn-soft-black": "text-base bg-base btn-focus shadow-sm"
120
123
  };
121
124
  const dynamicBtn = [
122
125
  // base
@@ -207,6 +210,10 @@ const staticGeneral = {
207
210
  "text-base": "text-$c-foreground",
208
211
  "text-inverted": "text-$c-background",
209
212
  "text-muted": "text-$c-muted-foreground",
213
+ "text-accent": "text-$c-accent-foreground",
214
+ "text-accent-forground": "text-$c-accent",
215
+ "text-popover": "text-$c-popover-foreground",
216
+ "text-popover-foreground": "text-$c-popover",
210
217
  "text-info": "text-info-500 dark:text-info-400",
211
218
  "text-error": "text-error-500 dark:text-error-400",
212
219
  "text-success": "text-success-500 dark:text-success-400",
@@ -224,6 +231,10 @@ const staticGeneral = {
224
231
  "bg-base": "bg-$c-background",
225
232
  "bg-inverted": "bg-$c-foreground",
226
233
  "bg-muted": "bg-$c-muted",
234
+ "bg-accent": "bg-$c-accent",
235
+ "bg-accent-foreground": "bg-$c-accent-foreground",
236
+ "bg-popover": "bg-$c-popover",
237
+ "bg-popover-foreground": "bg-$c-popover-foreground",
227
238
  // icon
228
239
  "i-loading": "i-tabler-loader-2",
229
240
  "i-warning": "i-heroicons-exclamation-triangle-20-solid",
@@ -232,7 +243,7 @@ const staticGeneral = {
232
243
  "i-info": "i-heroicons-information-circle-20-solid",
233
244
  "i-close": "i-heroicons-x-mark-20-solid",
234
245
  "i-dot": "i-tabler-circle-filled",
235
- "i-check": "i-tabler-check",
246
+ "i-check": "i-lucide-check",
236
247
  // transition
237
248
  "transition-base": "transition-all duration-100 ease-out"
238
249
  };
@@ -413,9 +424,9 @@ const staticKbd = {
413
424
  };
414
425
  const dynamicKbd = [
415
426
  // modifiers
416
- [/^kbd-ring(-(\S+))?$/, ([, , c = "gray"]) => `ring ring-inset ring-${c}-200 dark:ring-${c}-700`],
427
+ [/^kbd-ring(-(\S+))?$/, ([, , c = "gray"]) => `ring-1 ring-inset ring-${c}-200 dark:ring-${c}-700`],
417
428
  // variants
418
- [/^kbd-solid(-(\S+))?$/, ([, , c = "gray"]) => `kbd-ring-${c} bg-${c}-50 text-${c}-500 dark:bg-${c}-950 dark:text-${c}-400`],
429
+ [/^kbd-solid(-(\S+))?$/, ([, , c = "gray"]) => `kbd-ring-${c} bg-${c}-50 text-${c}-500 dark:bg-${c}-900 dark:text-${c}-400`],
419
430
  [/^kbd-outline(-(\S+))?$/, ([, , c = "gray"]) => `kbd-ring-${c} bg-transparent text-${c}-500 dark:text-${c}-400`]
420
431
  ];
421
432
  const kbd = [
@@ -452,7 +463,7 @@ const radio = [
452
463
 
453
464
  const staticCheckbox = {
454
465
  // base
455
- "checkbox": "text-md checkbox-primary flex items-center transition-base w-1em h-1em border border-$c-ring rounded n-checked:border-brand n-checked:bg-brand",
466
+ "checkbox": "text-md checkbox-primary flex items-center transition-base w-1em h-1em border border-brand rounded n-checked:border-brand n-checked:bg-brand",
456
467
  "checkbox-disabled": "n-disabled",
457
468
  "checkbox-label": "block text-sm font-medium leading-6",
458
469
  "checkbox-input": "absolute w-full opacity-0",
@@ -538,6 +549,84 @@ const skeleton = [
538
549
  staticSkeleton
539
550
  ];
540
551
 
552
+ const staticSelect = {
553
+ // configurations
554
+ "select": "",
555
+ "select-disabled": "n-disabled",
556
+ "select-scroll": "flex cursor-default items-center justify-center py-1",
557
+ "select-trigger-info-icon": "i-info",
558
+ "select-trigger-error-icon": "i-error",
559
+ "select-trigger-success-icon": "i-success",
560
+ "select-trigger-warning-icon": "i-warning",
561
+ // components
562
+ "select-root": "",
563
+ "select-trigger": "min-h-2.5em w-full",
564
+ // [&>span]:line-clamp-1
565
+ "select-trigger-trailing-icon": "i-lucide-chevrons-up-down !text-1.042em",
566
+ "select-trigger-trailing": "ml-auto",
567
+ "select-trigger-leading": "",
568
+ "select-value": "h-1.5em",
569
+ "select-content": "relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border border-base bg-popover text-popover shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
570
+ "select-content-popper": "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
571
+ "select-group": "p-1 w-full",
572
+ "select-separator": "-mx-1 my-1 h-px bg-muted",
573
+ "select-item": "select-item-gray relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-1em outline-none data-[disabled]:pointer-events-none data-[disabled]:n-disabled",
574
+ "select-item-indicator": "absolute left-2 h-0.75em w-0.75em flex items-center justify-center",
575
+ "select-item-indicator-icon": "i-check",
576
+ "select-viewport": "p-1",
577
+ "select-viewport-popper": "h-[--radix-select-trigger-height] w-full min-w-[--radix-select-trigger-width]",
578
+ "select-scroll-up-button": "select-scroll",
579
+ "select-scroll-down-button": "select-scroll",
580
+ "select-scroll-up-button-icon": "i-lucide-chevron-up",
581
+ "select-scroll-down-button-icon": "i-lucide-chevron-down",
582
+ "select-label": "py-1.5 pl-8 pr-2 text-1em font-semibold",
583
+ // ⚠️ for overriding purposes only
584
+ "select-item-selectItem": ""
585
+ };
586
+ const dynamicSelect = [
587
+ [/^select-(.*)$/, ([, body], { theme }) => {
588
+ const color = parseColor(body, theme);
589
+ if ((color?.cssColor?.type === "rgb" || color?.cssColor?.type === "rgba") && color.cssColor.components)
590
+ return `n-${body}-600 dark:n-${body}-500`;
591
+ }],
592
+ [/^select-item(-(\S+))?$/, ([, , c = "gray"]) => `focus:bg-${c}-100 focus:text-${c}-800 dark:focus:bg-${c}-800 dark:focus:text-${c}-100`]
593
+ ];
594
+ const select = [
595
+ ...dynamicSelect,
596
+ staticSelect
597
+ ];
598
+
599
+ const staticSeparator = {
600
+ // base
601
+ "separator": "text-md shrink-0 relative",
602
+ "separator-default-variant": "separator-solid-gray",
603
+ "separator-content": "text-0.75em text-muted bg-base absolute flex justify-center items-center",
604
+ // orientation states
605
+ "separator-horizontal": "h-px my-4 w-full border-t-0.0625em",
606
+ "separator-vertical": "w-px mx-4 h-full border-l-0.0625em",
607
+ "separator-content-horizontal": "h-1px py-1 px-2",
608
+ "separator-content-vertical": "w-1px px-1 py-2",
609
+ // horizontal positions
610
+ "separator-position-left": "left-6 top-1/2 -translate-y-1/2",
611
+ "separator-position-right": "right-6 top-1/2 -translate-y-1/2",
612
+ "separator-position-center": "left-1/2 top-1/2 -translate-y-1/2 -translate-x-1/2",
613
+ // vertical positions
614
+ "separator-position-bottom": "bottom-4 left-1/2 -translate-x-1/2",
615
+ "separator-position-top": "top-4 left-1/2 -translate-x-1/2",
616
+ // static variants
617
+ "separator-solid-gray": "border-base"
618
+ };
619
+ const dynamicSeparator = [
620
+ // dynamic variants
621
+ [/^seperator-solid(-(\S+))?$/, ([, , c = "gray"]) => `border-solid border-${c}-200 dark:border-${c}-700/58`],
622
+ [/^separator-dashed(-(\S+))?$/, ([, , c = "gray"]) => `border-dashed border-${c}-200 dark:border-${c}-700/58`],
623
+ [/^separator-dotted(-(\S+))?$/, ([, , c = "gray"]) => `border-dotted border-${c}-200 dark:border-${c}-700/58`]
624
+ ];
625
+ const separator = [
626
+ ...dynamicSeparator,
627
+ staticSeparator
628
+ ];
629
+
541
630
  const shortcuts = [
542
631
  ...general,
543
632
  ...accordion,
@@ -559,7 +648,9 @@ const shortcuts = [
559
648
  ...checkbox,
560
649
  ...slider,
561
650
  ...progress,
562
- ...skeleton
651
+ ...skeleton,
652
+ ...select,
653
+ ...separator
563
654
  ];
564
655
 
565
656
  export { shortcuts };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@una-ui/preset",
3
- "version": "0.7.0-beta.2",
3
+ "version": "0.9.0-beta.2",
4
4
  "description": "The default preset for @una-ui",
5
5
  "author": "Phojie Rengel <phojrengel@gmail.com>",
6
6
  "license": "MIT",
package/una.css CHANGED
@@ -1 +1 @@
1
- @import"@unocss/reset/tailwind-compat.css";:root{--una-primary-hex: #ca8a04;--una-primary-50: 254, 252, 232;--una-primary-100: 254, 249, 195;--una-primary-200: 254, 240, 138;--una-primary-300: 253, 224, 71;--una-primary-400: 250, 204, 21;--una-primary-500: 234, 179, 8;--una-primary-600: 202, 138, 4;--una-primary-700: 161, 98, 7;--una-primary-800: 133, 77, 14;--una-primary-900: 113, 63, 18;--una-primary-950: 66, 32, 6;--una-gray-hex: #57534e;--una-gray-50: 250, 250, 249;--una-gray-100: 245, 245, 244;--una-gray-200: 231, 229, 228;--una-gray-300: 214, 211, 209;--una-gray-400: 168, 162, 158;--una-gray-500: 120, 113, 108;--una-gray-600: 87, 83, 78;--una-gray-700: 68, 64, 60;--una-gray-800: 41, 37, 36;--una-gray-900: 28, 25, 23;--una-gray-950: 12, 10, 9}:root{--c-gray-0: rgb(255 255 255);--c-gray-50: rgb(var(--una-gray-50));--c-gray-100: rgb(var(--una-gray-100));--c-gray-200: rgb(var(--una-gray-200));--c-gray-300: rgb(var(--una-gray-300));--c-gray-400: rgb(var(--una-gray-400));--c-gray-500: rgb(var(--una-gray-500));--c-gray-600: rgb(var(--una-gray-600));--c-gray-700: rgb(var(--una-gray-700));--c-gray-800: rgb(var(--una-gray-800));--c-gray-900: rgb(var(--una-gray-900));--c-gray-950: rgb(var(--una-gray-950))}.dark{--c-gray-0: rgb(var(--una-gray-950));--c-gray-50: rgb(var(--una-gray-900));--c-gray-100: rgb(var(--una-gray-800));--c-gray-200: rgb(var(--una-gray-700));--c-gray-300: rgb(var(--una-gray-600));--c-gray-400: rgb(var(--una-gray-500));--c-gray-500: rgb(var(--una-gray-400));--c-gray-600: rgb(var(--una-gray-300));--c-gray-700: rgb(var(--una-gray-200));--c-gray-800: rgb(var(--una-gray-100));--c-gray-900: rgb(var(--una-gray-50));--c-gray-950: rgb(255 255 255)}:root{--una-primary: var(--una-primary-600);--una-primary-active: var(--una-primary-500);--una-gray: var(--una-gray-600);--una-gray-active: var(--una-gray-500);--c-brand: rgb(var(--una-primary-600));--c-background: rgb(255 255 255);--c-foreground: rgb(var(--una-gray-950));--c-muted: rgb(var(--una-gray-50));--c-muted-foreground: rgb(var(--una-gray-900));--c-bg-selection: rgba(var(--una-primary-600), 0.2);--c-border: rgb(var(--una-gray-200));--c-ring: rgb(var(--una-gray-200));--c-divider: rgb(var(--una-gray-200))}.dark{--una-primary: var(--una-primary-500);--una-primary-active: var(--una-primary-400);--una-gray: var(--una-gray-500);--una-gray-active: var(--una-gray-400);--c-brand: rgb(var(--una-primary-500));--c-background: rgb(var(--una-gray-950));--c-foreground: rgb(255 255 255);--c-muted: rgb(var(--una-gray-900));--c-muted-foreground: rgb(var(--una-gray-50));--c-bg-selection: rgba(var(--una-primary-500), 0.2);--c-border: rgba(var(--una-gray-700), .68);--c-ring: rgba(var(--una-gray-700), .68);--c-divider: rgba(var(--una-gray-700), .68)}html{font-size:var(--font-size, 16px);background-color:var(--c-background);color:var(--c-foreground);height:100dvh}html.dark{color-scheme:dark}::-moz-selection{background:var(--c-bg-selection)}::selection{background:var(--c-bg-selection)}*{-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}
1
+ @import"@unocss/reset/tailwind-compat.css";:root{--una-primary-hex: #ca8a04;--una-primary-50: 254, 252, 232;--una-primary-100: 254, 249, 195;--una-primary-200: 254, 240, 138;--una-primary-300: 253, 224, 71;--una-primary-400: 250, 204, 21;--una-primary-500: 234, 179, 8;--una-primary-600: 202, 138, 4;--una-primary-700: 161, 98, 7;--una-primary-800: 133, 77, 14;--una-primary-900: 113, 63, 18;--una-primary-950: 66, 32, 6;--una-gray-hex: #57534e;--una-gray-50: 250, 250, 249;--una-gray-100: 245, 245, 244;--una-gray-200: 231, 229, 228;--una-gray-300: 214, 211, 209;--una-gray-400: 168, 162, 158;--una-gray-500: 120, 113, 108;--una-gray-600: 87, 83, 78;--una-gray-700: 68, 64, 60;--una-gray-800: 41, 37, 36;--una-gray-900: 28, 25, 23;--una-gray-950: 12, 10, 9}:root{--c-gray-0: rgb(255 255 255);--c-gray-50: rgb(var(--una-gray-50));--c-gray-100: rgb(var(--una-gray-100));--c-gray-200: rgb(var(--una-gray-200));--c-gray-300: rgb(var(--una-gray-300));--c-gray-400: rgb(var(--una-gray-400));--c-gray-500: rgb(var(--una-gray-500));--c-gray-600: rgb(var(--una-gray-600));--c-gray-700: rgb(var(--una-gray-700));--c-gray-800: rgb(var(--una-gray-800));--c-gray-900: rgb(var(--una-gray-900));--c-gray-950: rgb(var(--una-gray-950))}.dark{--c-gray-0: rgb(var(--una-gray-950));--c-gray-50: rgb(var(--una-gray-900));--c-gray-100: rgb(var(--una-gray-800));--c-gray-200: rgb(var(--una-gray-700));--c-gray-300: rgb(var(--una-gray-600));--c-gray-400: rgb(var(--una-gray-500));--c-gray-500: rgb(var(--una-gray-400));--c-gray-600: rgb(var(--una-gray-300));--c-gray-700: rgb(var(--una-gray-200));--c-gray-800: rgb(var(--una-gray-100));--c-gray-900: rgb(var(--una-gray-50));--c-gray-950: rgb(255 255 255)}:root{--c-brand: rgb(var(--una-primary-600));--una-primary: var(--una-primary-600);--una-primary-active: var(--una-primary-500);--una-gray: var(--una-gray-600);--una-gray-active: var(--una-gray-500);--c-background: rgb(255 255 255);--c-foreground: rgb(var(--una-gray-950));--c-muted: rgb(var(--una-gray-50));--c-muted-foreground: rgb(var(--una-gray-500));--c-accent: rgb(var(--una-gray-100));--c-accent-foreground: rgb(var(--una-gray-800));--c-popover: rgb(255 255 255);--c-popover-foreground: rgb(var(--una-gray-950));--c-border: rgb(var(--una-gray-200));--c-ring: rgb(var(--una-gray-200));--c-divider: rgb(var(--una-gray-200));--c-bg-selection: rgba(var(--una-primary-600), 0.2);--radius: 0.95rem}.dark{--c-brand: rgb(var(--una-primary-500));--una-primary: var(--una-primary-500);--una-primary-active: var(--una-primary-400);--una-gray: var(--una-gray-500);--una-gray-active: var(--una-gray-400);--c-background: rgb(var(--una-gray-950));--c-foreground: rgb(255 255 255);--c-muted: rgb(var(--una-gray-900));--c-muted-foreground: rgb(var(--una-gray-400));--c-accent: rgb(var(--una-gray-800));--c-accent-foreground: rgb(var(--una-gray-100));--c-popover: rgb(var(--una-gray-950));--c-popover-foreground: rgb(255 255 255);--c-border: rgba(var(--una-gray-700), .58);--c-ring: rgba(var(--una-gray-700), .58);--c-divider: rgba(var(--una-gray-700), .58);--c-bg-selection: rgba(var(--una-primary-500), 0.2)}html{font-size:var(--font-size, 16px);background-color:var(--c-background);color:var(--c-foreground);height:100dvh}html.dark{color-scheme:dark}::-moz-selection{background:var(--c-bg-selection)}::selection{background:var(--c-bg-selection)}*{-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}*{scrollbar-color:rgba(136,136,136,.3333333333) var(--c-border)}::-webkit-scrollbar{width:.5rem}::-webkit-scrollbar:horizontal{height:.5rem}::-webkit-scrollbar-track{background:var(--c-border);border-radius:var(--radius)}::-webkit-scrollbar-thumb{background:var(--muted-foreground);border-radius:calc(var(--radius) - 4px)}::-webkit-scrollbar-thumb:hover{background:var(--muted) !important}