@una-ui/preset 0.29.0-beta.1 → 0.31.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 CHANGED
@@ -5,10 +5,10 @@
5
5
 
6
6
  ## 🏗ïļ Release Status
7
7
 
8
- | Branch | Version | Status | Downloads |
9
- | --- | --- | --- | --- |
10
- | Main (Edge) | [![npm-edge][npm-edge-src]][npm-edge-href] | [![github-status][github-status-src-main]][github-status-href-main] | [![npm-edge-downloads][npm-edge-downloads-src]][npm-edge-downloads-href] |
11
- | Release | [![npm-version][npm-version-src]][npm-version-href] | [![github-status][github-status-src-release]][github-status-href-release] | [![npm-downloads][npm-downloads-src]][npm-downloads-href] |
8
+ | Branch | Version | Status | Downloads |
9
+ | ----------- | --------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
10
+ | Main (Edge) | [![npm-edge][npm-edge-src]][npm-edge-href] | [![github-status][github-status-src-main]][github-status-href-main] | [![npm-edge-downloads][npm-edge-downloads-src]][npm-edge-downloads-href] |
11
+ | Release | [![npm-version][npm-version-src]][npm-version-href] | [![github-status][github-status-src-release]][github-status-href-release] | [![npm-downloads][npm-downloads-src]][npm-downloads-href] |
12
12
 
13
13
  ## 📙 Documentation
14
14
 
@@ -32,7 +32,7 @@ Visit https://www.unaui.com for full documentation.
32
32
 
33
33
  ## ðŸŠī Project Activity
34
34
 
35
- ![Alt](https://repobeats.axiom.co/api/embed/49dee6a65be83113d1241c7bd38f23e211a0f189.svg "Repobeats analytics image")
35
+ ![Alt](https://repobeats.axiom.co/api/embed/49dee6a65be83113d1241c7bd38f23e211a0f189.svg 'Repobeats analytics image')
36
36
 
37
37
  ## ðŸ‘Ļ‍ðŸ’ŧ Contributors
38
38
 
package/dist/prefixes.cjs CHANGED
@@ -74,6 +74,8 @@ const prefixes = [
74
74
  "popover-content",
75
75
  "progress",
76
76
  "radio",
77
+ "radio-group",
78
+ "radio-group-item",
77
79
  "resize",
78
80
  "rounded",
79
81
  "select",
package/dist/prefixes.mjs CHANGED
@@ -72,6 +72,8 @@ const prefixes = [
72
72
  "popover-content",
73
73
  "progress",
74
74
  "radio",
75
+ "radio-group",
76
+ "radio-group-item",
75
77
  "resize",
76
78
  "rounded",
77
79
  "select",
@@ -5,7 +5,7 @@ const presetMini = require('@unocss/preset-mini');
5
5
 
6
6
  const staticAccordion = {
7
7
  // config
8
- "accordion-trailing-icon": "i-heroicons-chevron-up",
8
+ "accordion-trailing-icon": "i-lucide-chevron-up",
9
9
  "accordion-button-padding": "p-(x-3 y-4)",
10
10
  "accordion-button-default-variant": "btn-text",
11
11
  "accordion-divider": "divide-(y base)",
@@ -334,25 +334,25 @@ const dropdowMenu = [
334
334
 
335
335
  const staticFormGroup = {
336
336
  // base
337
- "form-group": "space-y-2 flex flex-col",
338
- "form-group-description": "text-sm leading-6 text-$c-gray-500",
339
- "form-group-hint": "text-sm leading-6 text-$c-gray-500",
340
- "form-group-message": "text-sm transition-all duration-1000 ease-in-out",
337
+ "form-group": "space-y-2",
338
+ "form-group-description": "text-0.8rem text-muted",
339
+ "form-group-hint": "text-sm text-muted",
340
+ "form-group-message": "text-0.8em transition-all duration-1000 ease-in-out",
341
341
  // wrappers
342
- "form-group-top-wrapper": "flex flex-col",
342
+ "form-group-top-wrapper": "flex flex-col space-y-1.5",
343
343
  "form-group-top-wrapper-inner": "flex justify-between items-end space-x-1.5",
344
344
  "form-group-bottom-wrapper": "flex space-x-1.5 justify-between items-start",
345
345
  "form-group-message-wrapper": "",
346
346
  // label
347
347
  "form-group-label-wrapper": "flex",
348
- "form-group-label": "block text-sm leading-6 font-medium text-$c-gray-900",
348
+ "form-group-label": "block label-base",
349
349
  "form-group-label-required": "after:content-['*'] after:ms-0.5 after:text-error",
350
350
  // counter
351
- "form-group-counter-wrapper": "text-sm",
351
+ "form-group-counter-wrapper": "text-0.8em",
352
352
  "form-group-counter-error": "text-error",
353
- "form-group-counter-current": "text-$c-gray-900",
354
- "form-group-counter-separator": "text-$c-gray-500",
355
- "form-group-counter-max": "text-$c-gray-500"
353
+ "form-group-counter-current": "text-accent",
354
+ "form-group-counter-separator": "text-muted",
355
+ "form-group-counter-max": "text-muted"
356
356
  };
357
357
  const formGroup = [
358
358
  staticFormGroup
@@ -676,6 +676,31 @@ const radio = [
676
676
  staticRadio
677
677
  ];
678
678
 
679
+ const staticRadioGroup = {
680
+ // configurations
681
+ "radio-group": "gap-2 flex flex-wrap",
682
+ "radio-group-orientation-vertical": "flex-col",
683
+ "radio-group-orientation-horizontal": "flex-row",
684
+ // components
685
+ "radio-group-item-wrapper": "flex items-center space-x-2",
686
+ "radio-group-item": "aspect-square rounded-full border border-brand text-brand shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-base disabled:n-disabled",
687
+ "radio-group-indicator": "flex items-center justify-center",
688
+ "radio-group-indicator-icon-base": "h-0.875em w-0.875em fill-brand",
689
+ "radio-group-indicator-icon": "i-dot",
690
+ "radio-group-item-label": ""
691
+ };
692
+ const dynamicRadioGroup = [
693
+ [/^radio-group-(.*)$/, ([, body], { theme }) => {
694
+ const color = utils.parseColor(body, theme);
695
+ if ((color?.cssColor?.type === "rgb" || color?.cssColor?.type === "rgba") && color.cssColor.components)
696
+ return `n-${body}-600 dark:n-${body}-500`;
697
+ }]
698
+ ];
699
+ const radioGroup = [
700
+ ...dynamicRadioGroup,
701
+ staticRadioGroup
702
+ ];
703
+
679
704
  const staticSelect = {
680
705
  // configurations
681
706
  "select": "",
@@ -967,7 +992,8 @@ const shortcuts = [
967
992
  ...tooltip,
968
993
  ...pagination,
969
994
  ...toggle,
970
- ...collapsible
995
+ ...collapsible,
996
+ ...radioGroup
971
997
  ];
972
998
 
973
999
  exports.shortcuts = shortcuts;
@@ -3,7 +3,7 @@ import { parseColor as parseColor$1 } from '@unocss/preset-mini';
3
3
 
4
4
  const staticAccordion = {
5
5
  // config
6
- "accordion-trailing-icon": "i-heroicons-chevron-up",
6
+ "accordion-trailing-icon": "i-lucide-chevron-up",
7
7
  "accordion-button-padding": "p-(x-3 y-4)",
8
8
  "accordion-button-default-variant": "btn-text",
9
9
  "accordion-divider": "divide-(y base)",
@@ -332,25 +332,25 @@ const dropdowMenu = [
332
332
 
333
333
  const staticFormGroup = {
334
334
  // base
335
- "form-group": "space-y-2 flex flex-col",
336
- "form-group-description": "text-sm leading-6 text-$c-gray-500",
337
- "form-group-hint": "text-sm leading-6 text-$c-gray-500",
338
- "form-group-message": "text-sm transition-all duration-1000 ease-in-out",
335
+ "form-group": "space-y-2",
336
+ "form-group-description": "text-0.8rem text-muted",
337
+ "form-group-hint": "text-sm text-muted",
338
+ "form-group-message": "text-0.8em transition-all duration-1000 ease-in-out",
339
339
  // wrappers
340
- "form-group-top-wrapper": "flex flex-col",
340
+ "form-group-top-wrapper": "flex flex-col space-y-1.5",
341
341
  "form-group-top-wrapper-inner": "flex justify-between items-end space-x-1.5",
342
342
  "form-group-bottom-wrapper": "flex space-x-1.5 justify-between items-start",
343
343
  "form-group-message-wrapper": "",
344
344
  // label
345
345
  "form-group-label-wrapper": "flex",
346
- "form-group-label": "block text-sm leading-6 font-medium text-$c-gray-900",
346
+ "form-group-label": "block label-base",
347
347
  "form-group-label-required": "after:content-['*'] after:ms-0.5 after:text-error",
348
348
  // counter
349
- "form-group-counter-wrapper": "text-sm",
349
+ "form-group-counter-wrapper": "text-0.8em",
350
350
  "form-group-counter-error": "text-error",
351
- "form-group-counter-current": "text-$c-gray-900",
352
- "form-group-counter-separator": "text-$c-gray-500",
353
- "form-group-counter-max": "text-$c-gray-500"
351
+ "form-group-counter-current": "text-accent",
352
+ "form-group-counter-separator": "text-muted",
353
+ "form-group-counter-max": "text-muted"
354
354
  };
355
355
  const formGroup = [
356
356
  staticFormGroup
@@ -674,6 +674,31 @@ const radio = [
674
674
  staticRadio
675
675
  ];
676
676
 
677
+ const staticRadioGroup = {
678
+ // configurations
679
+ "radio-group": "gap-2 flex flex-wrap",
680
+ "radio-group-orientation-vertical": "flex-col",
681
+ "radio-group-orientation-horizontal": "flex-row",
682
+ // components
683
+ "radio-group-item-wrapper": "flex items-center space-x-2",
684
+ "radio-group-item": "aspect-square rounded-full border border-brand text-brand shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-base disabled:n-disabled",
685
+ "radio-group-indicator": "flex items-center justify-center",
686
+ "radio-group-indicator-icon-base": "h-0.875em w-0.875em fill-brand",
687
+ "radio-group-indicator-icon": "i-dot",
688
+ "radio-group-item-label": ""
689
+ };
690
+ const dynamicRadioGroup = [
691
+ [/^radio-group-(.*)$/, ([, body], { theme }) => {
692
+ const color = parseColor(body, theme);
693
+ if ((color?.cssColor?.type === "rgb" || color?.cssColor?.type === "rgba") && color.cssColor.components)
694
+ return `n-${body}-600 dark:n-${body}-500`;
695
+ }]
696
+ ];
697
+ const radioGroup = [
698
+ ...dynamicRadioGroup,
699
+ staticRadioGroup
700
+ ];
701
+
677
702
  const staticSelect = {
678
703
  // configurations
679
704
  "select": "",
@@ -965,7 +990,8 @@ const shortcuts = [
965
990
  ...tooltip,
966
991
  ...pagination,
967
992
  ...toggle,
968
- ...collapsible
993
+ ...collapsible,
994
+ ...radioGroup
969
995
  ];
970
996
 
971
997
  export { shortcuts };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@una-ui/preset",
3
- "version": "0.29.0-beta.1",
3
+ "version": "0.31.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.63.6",
53
- "@unocss/preset-mini": "^0.63.6",
54
- "unocss": "^0.63.6"
52
+ "@unocss/core": "^0.64.1",
53
+ "@unocss/preset-mini": "^0.64.1",
54
+ "unocss": "^0.64.1"
55
55
  },
56
56
  "scripts": {
57
57
  "build": "unbuild",
package/una.css CHANGED
@@ -75,7 +75,7 @@
75
75
  --c-popover: rgb(255, 255, 255);
76
76
  --c-popover-foreground: rgb(var(--una-gray-950));
77
77
  --c-border: rgb(var(--una-gray-200));
78
- --c-border-foreground: rgba(var(--una-gray-700), .58);
78
+ --c-border-foreground: rgba(var(--una-gray-700), 0.58);
79
79
  --c-ring: rgb(var(--una-gray-200));
80
80
  --c-divider: rgb(var(--una-gray-200));
81
81
  --c-bg-selection: rgba(var(--una-primary-600), 0.2);
@@ -97,11 +97,11 @@
97
97
  --c-accent: rgb(var(--una-gray-800));
98
98
  --c-accent-foreground: rgb(var(--una-gray-100));
99
99
  --c-popover: rgb(var(--una-gray-950));
100
- --c-popover-foreground: rgb(255,255,255);
101
- --c-border: rgba(var(--una-gray-700), .58);
100
+ --c-popover-foreground: rgb(255, 255, 255);
101
+ --c-border: rgba(var(--una-gray-700), 0.58);
102
102
  --c-border-foreground: rgb(var(--una-gray-200));
103
- --c-ring: rgba(var(--una-gray-700), .58);
104
- --c-divider: rgba(var(--una-gray-700), .58);
103
+ --c-ring: rgba(var(--una-gray-700), 0.58);
104
+ --c-divider: rgba(var(--una-gray-700), 0.58);
105
105
  --c-bg-selection: rgba(var(--una-primary-500), 0.2);
106
106
  }
107
107