@una-ui/preset 0.27.0-beta.1 → 0.28.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 CHANGED
@@ -15,6 +15,10 @@ function presetUna(options = {
15
15
  options,
16
16
  shortcuts: shortcuts.shortcuts,
17
17
  theme: unocss.mergeDeep(presetMini.theme, {
18
+ container: {
19
+ center: true,
20
+ padding: "2rem"
21
+ },
18
22
  colors: {
19
23
  brand: "rgba(var(--c-brand),%alpha)",
20
24
  primary: {
@@ -57,6 +61,20 @@ function presetUna(options = {
57
61
  lg: "var(--una-radius)",
58
62
  md: "calc(var(--una-radius) - 2px)",
59
63
  sm: "calc(var(--una-radius) - 4px)"
64
+ },
65
+ animation: {
66
+ keyframes: {
67
+ "collapsible-down": "{from{height: 0}to{height:var(--radix-collapsible-content-height)}}",
68
+ "collapsible-up": "{from{height:var(--radix-collapsible-content-height)}to{height: 0}}"
69
+ },
70
+ durations: {
71
+ "collapsible-down": "0.2s",
72
+ "collapsible-up": "0.2s"
73
+ },
74
+ timingFns: {
75
+ "collapsible-down": "ease-in-out",
76
+ "collapsible-up": "ease-in-out"
77
+ }
60
78
  }
61
79
  }),
62
80
  rules: [
package/dist/index.mjs CHANGED
@@ -13,6 +13,10 @@ function presetUna(options = {
13
13
  options,
14
14
  shortcuts,
15
15
  theme: mergeDeep(theme, {
16
+ container: {
17
+ center: true,
18
+ padding: "2rem"
19
+ },
16
20
  colors: {
17
21
  brand: "rgba(var(--c-brand),%alpha)",
18
22
  primary: {
@@ -55,6 +59,20 @@ function presetUna(options = {
55
59
  lg: "var(--una-radius)",
56
60
  md: "calc(var(--una-radius) - 2px)",
57
61
  sm: "calc(var(--una-radius) - 4px)"
62
+ },
63
+ animation: {
64
+ keyframes: {
65
+ "collapsible-down": "{from{height: 0}to{height:var(--radix-collapsible-content-height)}}",
66
+ "collapsible-up": "{from{height:var(--radix-collapsible-content-height)}to{height: 0}}"
67
+ },
68
+ durations: {
69
+ "collapsible-down": "0.2s",
70
+ "collapsible-up": "0.2s"
71
+ },
72
+ timingFns: {
73
+ "collapsible-down": "ease-in-out",
74
+ "collapsible-up": "ease-in-out"
75
+ }
58
76
  }
59
77
  }),
60
78
  rules: [
package/dist/prefixes.cjs CHANGED
@@ -25,6 +25,9 @@ const prefixes = [
25
25
  "card-header",
26
26
  "card-title",
27
27
  "checkbox",
28
+ "collapsible",
29
+ "collapsible-content",
30
+ "collapsible-trigger",
28
31
  "dialog",
29
32
  "dialog-close",
30
33
  "dialog-content",
package/dist/prefixes.mjs CHANGED
@@ -23,6 +23,9 @@ const prefixes = [
23
23
  "card-header",
24
24
  "card-title",
25
25
  "checkbox",
26
+ "collapsible",
27
+ "collapsible-content",
28
+ "collapsible-trigger",
26
29
  "dialog",
27
30
  "dialog-close",
28
31
  "dialog-content",
@@ -179,11 +179,11 @@ const staticBtn = {
179
179
  // variants
180
180
  "btn-solid-white": "bg-base text-base ring-1 ring-base ring-inset shadow-sm btn-focus hover:bg-muted",
181
181
  "btn-ghost-white": "text-base btn-focus hover:bg-$c-gray-50",
182
- "btn-outline-white": "text-base ring-1 ring-base ring-inset btn-focus",
182
+ "btn-outline-white": "text-base ring-1 ring-base ring-inset btn-focus hover:bg-$c-gray-50",
183
183
  "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",
184
184
  "btn-ghost-gray": "text-$c-gray-600 btn-focus hover:bg-$c-gray-100",
185
185
  "btn-soft-gray": "text-$c-gray-600 bg-$c-gray-50 btn-focus hover:bg-$c-gray-100",
186
- "btn-outline-gray": "text-muted ring-1 ring-base ring-inset btn-focus",
186
+ "btn-outline-gray": "text-muted hover:text-$c-gray-600 ring-1 ring-base ring-inset btn-focus hover:bg-$c-gray-50",
187
187
  "btn-link-gray": "text-muted btn-focus hover:text-base hover:underline underline-offset-4",
188
188
  "btn-text-gray": "text-$c-gray-600 btn-focus hover:text-$c-gray-900",
189
189
  "btn-solid-black": "bg-inverted text-inverted shadow-sm btn-focus",
@@ -193,7 +193,9 @@ const staticBtn = {
193
193
  "btn-text-muted": "text-muted btn-focus hover:text-accent",
194
194
  "btn-link-muted": "text-muted btn-focus hover:underline underline-offset-4",
195
195
  "btn-ghost-muted": "text-accent hover:text-muted btn-focus hover:bg-muted",
196
- "btn-soft-accent": "text-accent bg-accent btn-focus"
196
+ "btn-soft-accent": "text-accent bg-accent btn-focus",
197
+ "btn-text-accent": "text-accent btn-focus",
198
+ "btn-link-accent": "text-accent btn-focus hover:underline underline-offset-4"
197
199
  };
198
200
  const dynamicBtn = [
199
201
  // base
@@ -262,6 +264,17 @@ const checkbox = [
262
264
  staticCheckbox
263
265
  ];
264
266
 
267
+ const staticCollapsible = {
268
+ "collapsible-content": "overflow-hidden transition-all data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down"
269
+ };
270
+ const dynamicCollapsible = [
271
+ // dynamic preset
272
+ ];
273
+ const collapsible = [
274
+ ...dynamicCollapsible,
275
+ staticCollapsible
276
+ ];
277
+
265
278
  const staticDialog = {
266
279
  // base
267
280
  "dialog": "",
@@ -951,7 +964,8 @@ const shortcuts = [
951
964
  ...popover,
952
965
  ...tooltip,
953
966
  ...pagination,
954
- ...toggle
967
+ ...toggle,
968
+ ...collapsible
955
969
  ];
956
970
 
957
971
  exports.shortcuts = shortcuts;
@@ -177,11 +177,11 @@ const staticBtn = {
177
177
  // variants
178
178
  "btn-solid-white": "bg-base text-base ring-1 ring-base ring-inset shadow-sm btn-focus hover:bg-muted",
179
179
  "btn-ghost-white": "text-base btn-focus hover:bg-$c-gray-50",
180
- "btn-outline-white": "text-base ring-1 ring-base ring-inset btn-focus",
180
+ "btn-outline-white": "text-base ring-1 ring-base ring-inset btn-focus hover:bg-$c-gray-50",
181
181
  "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",
182
182
  "btn-ghost-gray": "text-$c-gray-600 btn-focus hover:bg-$c-gray-100",
183
183
  "btn-soft-gray": "text-$c-gray-600 bg-$c-gray-50 btn-focus hover:bg-$c-gray-100",
184
- "btn-outline-gray": "text-muted ring-1 ring-base ring-inset btn-focus",
184
+ "btn-outline-gray": "text-muted hover:text-$c-gray-600 ring-1 ring-base ring-inset btn-focus hover:bg-$c-gray-50",
185
185
  "btn-link-gray": "text-muted btn-focus hover:text-base hover:underline underline-offset-4",
186
186
  "btn-text-gray": "text-$c-gray-600 btn-focus hover:text-$c-gray-900",
187
187
  "btn-solid-black": "bg-inverted text-inverted shadow-sm btn-focus",
@@ -191,7 +191,9 @@ const staticBtn = {
191
191
  "btn-text-muted": "text-muted btn-focus hover:text-accent",
192
192
  "btn-link-muted": "text-muted btn-focus hover:underline underline-offset-4",
193
193
  "btn-ghost-muted": "text-accent hover:text-muted btn-focus hover:bg-muted",
194
- "btn-soft-accent": "text-accent bg-accent btn-focus"
194
+ "btn-soft-accent": "text-accent bg-accent btn-focus",
195
+ "btn-text-accent": "text-accent btn-focus",
196
+ "btn-link-accent": "text-accent btn-focus hover:underline underline-offset-4"
195
197
  };
196
198
  const dynamicBtn = [
197
199
  // base
@@ -260,6 +262,17 @@ const checkbox = [
260
262
  staticCheckbox
261
263
  ];
262
264
 
265
+ const staticCollapsible = {
266
+ "collapsible-content": "overflow-hidden transition-all data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down"
267
+ };
268
+ const dynamicCollapsible = [
269
+ // dynamic preset
270
+ ];
271
+ const collapsible = [
272
+ ...dynamicCollapsible,
273
+ staticCollapsible
274
+ ];
275
+
263
276
  const staticDialog = {
264
277
  // base
265
278
  "dialog": "",
@@ -949,7 +962,8 @@ const shortcuts = [
949
962
  ...popover,
950
963
  ...tooltip,
951
964
  ...pagination,
952
- ...toggle
965
+ ...toggle,
966
+ ...collapsible
953
967
  ];
954
968
 
955
969
  export { shortcuts };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@una-ui/preset",
3
- "version": "0.27.0-beta.1",
3
+ "version": "0.28.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.3",
53
- "@unocss/preset-mini": "^0.63.3",
54
- "unocss": "^0.63.3"
52
+ "@unocss/core": "^0.63.4",
53
+ "@unocss/preset-mini": "^0.63.4",
54
+ "unocss": "^0.63.4"
55
55
  },
56
56
  "scripts": {
57
57
  "build": "unbuild",
package/una.css CHANGED
@@ -77,6 +77,7 @@
77
77
  --c-ring: rgb(var(--una-gray-200));
78
78
  --c-divider: rgb(var(--una-gray-200));
79
79
  --c-bg-selection: rgba(var(--una-primary-600), 0.2);
80
+ --un-default-border-color: var(--c-border);
80
81
  }
81
82
 
82
83
  .dark {
@@ -141,7 +142,7 @@ html.dark {
141
142
  }
142
143
 
143
144
  ::-webkit-scrollbar-thumb {
144
- background: var(--muted-foreground);
145
+ background: var(--c-muted-foreground);
145
146
  border-radius: calc(var(--una-radius) - 4px);
146
147
  }
147
148