@una-ui/preset 0.25.0-beta.1 → 0.26.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
@@ -25,6 +25,15 @@ const prefixes = [
25
25
  "card-header",
26
26
  "card-title",
27
27
  "checkbox",
28
+ "dialog",
29
+ "dialog-close",
30
+ "dialog-content",
31
+ "dialog-description",
32
+ "dialog-footer",
33
+ "dialog-header",
34
+ "dialog-overlay",
35
+ "dialog-scroll-content",
36
+ "dialog-title",
28
37
  "dropdown-menu",
29
38
  "dropdown-menu-content",
30
39
  "dropdown-menu-group",
package/dist/prefixes.mjs CHANGED
@@ -23,6 +23,15 @@ const prefixes = [
23
23
  "card-header",
24
24
  "card-title",
25
25
  "checkbox",
26
+ "dialog",
27
+ "dialog-close",
28
+ "dialog-content",
29
+ "dialog-description",
30
+ "dialog-footer",
31
+ "dialog-header",
32
+ "dialog-overlay",
33
+ "dialog-scroll-content",
34
+ "dialog-title",
26
35
  "dropdown-menu",
27
36
  "dropdown-menu-content",
28
37
  "dropdown-menu-group",
@@ -190,7 +190,8 @@ const staticBtn = {
190
190
  "btn-link-black": "text-base btn-focus hover:underline underline-offset-4",
191
191
  "btn-text-black": "text-base btn-focus",
192
192
  "btn-soft-black": "text-base bg-base btn-focus shadow-sm",
193
- "btn-text-muted": "text-muted btn-focus hover:text-accent"
193
+ "btn-text-muted": "text-muted btn-focus hover:text-accent",
194
+ "btn-link-muted": "text-muted btn-focus hover:underline underline-offset-4"
194
195
  };
195
196
  const dynamicBtn = [
196
197
  // base
@@ -259,6 +260,28 @@ const checkbox = [
259
260
  staticCheckbox
260
261
  ];
261
262
 
263
+ const staticDialog = {
264
+ // base
265
+ "dialog": "",
266
+ // sub-components
267
+ "dialog-overlay": "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
268
+ "dialog-content": "fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border border-base bg-base p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-48% data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-48% sm:rounded-lg",
269
+ "dialog-scroll-overlay": "fixed inset-0 z-50 grid place-items-center overflow-y-auto bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
270
+ "dialog-scroll-content": "relative z-50 grid w-full max-w-lg my-8 gap-4 border border-base bg-base p-6 shadow-lg duration-200 sm:rounded-lg md:w-full",
271
+ "dialog-header": "flex flex-col gap-y-1.5 text-center sm:text-left",
272
+ "dialog-title": "text-lg font-semibold leading-none tracking-tight",
273
+ "dialog-description": "text-sm text-muted",
274
+ "dialog-close": "absolute right-4 top-4",
275
+ "dialog-footer": "flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-x-2"
276
+ };
277
+ const dynamicDialog = [
278
+ // dynamic preset
279
+ ];
280
+ const dialog = [
281
+ ...dynamicDialog,
282
+ staticDialog
283
+ ];
284
+
262
285
  const staticDropdownMenu = {
263
286
  // configurations
264
287
  "dropdown-menu": "",
@@ -580,7 +603,7 @@ const pagination = [
580
603
  ];
581
604
 
582
605
  const staticPopover = {
583
- "popover-content": "w-72 rounded-md border border-base bg-popover p-4 text-popover shadow-md outline-none 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"
606
+ "popover-content": "z-50 w-72 rounded-md border border-base bg-popover p-4 text-popover shadow-md outline-none 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"
584
607
  };
585
608
  const dynamicPopover = [
586
609
  // dynamic preset
@@ -876,6 +899,7 @@ const shortcuts = [
876
899
  ...breadcrumb,
877
900
  ...accordion,
878
901
  ...btn,
902
+ ...dialog,
879
903
  ...formGroup,
880
904
  ...input,
881
905
  ...icon,
@@ -188,7 +188,8 @@ const staticBtn = {
188
188
  "btn-link-black": "text-base btn-focus hover:underline underline-offset-4",
189
189
  "btn-text-black": "text-base btn-focus",
190
190
  "btn-soft-black": "text-base bg-base btn-focus shadow-sm",
191
- "btn-text-muted": "text-muted btn-focus hover:text-accent"
191
+ "btn-text-muted": "text-muted btn-focus hover:text-accent",
192
+ "btn-link-muted": "text-muted btn-focus hover:underline underline-offset-4"
192
193
  };
193
194
  const dynamicBtn = [
194
195
  // base
@@ -257,6 +258,28 @@ const checkbox = [
257
258
  staticCheckbox
258
259
  ];
259
260
 
261
+ const staticDialog = {
262
+ // base
263
+ "dialog": "",
264
+ // sub-components
265
+ "dialog-overlay": "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
266
+ "dialog-content": "fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border border-base bg-base p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-48% data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-48% sm:rounded-lg",
267
+ "dialog-scroll-overlay": "fixed inset-0 z-50 grid place-items-center overflow-y-auto bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
268
+ "dialog-scroll-content": "relative z-50 grid w-full max-w-lg my-8 gap-4 border border-base bg-base p-6 shadow-lg duration-200 sm:rounded-lg md:w-full",
269
+ "dialog-header": "flex flex-col gap-y-1.5 text-center sm:text-left",
270
+ "dialog-title": "text-lg font-semibold leading-none tracking-tight",
271
+ "dialog-description": "text-sm text-muted",
272
+ "dialog-close": "absolute right-4 top-4",
273
+ "dialog-footer": "flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-x-2"
274
+ };
275
+ const dynamicDialog = [
276
+ // dynamic preset
277
+ ];
278
+ const dialog = [
279
+ ...dynamicDialog,
280
+ staticDialog
281
+ ];
282
+
260
283
  const staticDropdownMenu = {
261
284
  // configurations
262
285
  "dropdown-menu": "",
@@ -578,7 +601,7 @@ const pagination = [
578
601
  ];
579
602
 
580
603
  const staticPopover = {
581
- "popover-content": "w-72 rounded-md border border-base bg-popover p-4 text-popover shadow-md outline-none 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"
604
+ "popover-content": "z-50 w-72 rounded-md border border-base bg-popover p-4 text-popover shadow-md outline-none 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"
582
605
  };
583
606
  const dynamicPopover = [
584
607
  // dynamic preset
@@ -874,6 +897,7 @@ const shortcuts = [
874
897
  ...breadcrumb,
875
898
  ...accordion,
876
899
  ...btn,
900
+ ...dialog,
877
901
  ...formGroup,
878
902
  ...input,
879
903
  ...icon,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@una-ui/preset",
3
- "version": "0.25.0-beta.1",
3
+ "version": "0.26.0-beta.2",
4
4
  "description": "The default preset for @una-ui",
5
5
  "author": "Phojie Rengel <phojrengel@gmail.com>",
6
6
  "license": "MIT",