@nextui-org/theme 0.0.0-dev-v2-20230414001416 → 0.0.0-dev-v2-20230415023901

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.
@@ -0,0 +1,139 @@
1
+ import {
2
+ ringClasses
3
+ } from "./chunk-INZK6TTL.mjs";
4
+
5
+ // src/components/modal.ts
6
+ import { tv } from "tailwind-variants";
7
+ var modal = tv({
8
+ slots: {
9
+ wrapper: [
10
+ "flex",
11
+ "w-screen",
12
+ "h-screen",
13
+ "fixed",
14
+ "inset-0",
15
+ "z-50",
16
+ "overflow-x-auto",
17
+ "overflow-y-hidden",
18
+ "justify-center",
19
+ "items-center"
20
+ ],
21
+ base: [
22
+ "flex",
23
+ "flex-col",
24
+ "relative",
25
+ "bg-white",
26
+ "z-50",
27
+ "w-full",
28
+ "shadow-lg",
29
+ "box-border",
30
+ "dark:bg-content1",
31
+ "border border-neutral-100",
32
+ "outline-none"
33
+ ],
34
+ trigger: [],
35
+ backdrop: ["hidden"],
36
+ header: "flex py-4 px-6 flex-initial text-lg font-semibold",
37
+ body: "flex flex-1 flex-col gap-3 px-6 py-2",
38
+ footer: "flex flex-row gap-2 px-6 py-4 justify-end",
39
+ closeButton: [
40
+ "absolute",
41
+ "appearance-none",
42
+ "outline-none",
43
+ "select-none",
44
+ "top-1",
45
+ "right-1",
46
+ "p-2",
47
+ "text-neutral-500",
48
+ "rounded-full",
49
+ "hover:bg-neutral-100",
50
+ "active:bg-neutral-200"
51
+ ]
52
+ },
53
+ variants: {
54
+ size: {
55
+ xs: {
56
+ base: "max-w-xs"
57
+ },
58
+ sm: {
59
+ base: "max-w-sm"
60
+ },
61
+ md: {
62
+ base: "max-w-md"
63
+ },
64
+ lg: {
65
+ base: "max-w-lg"
66
+ },
67
+ xl: {
68
+ base: "max-w-xl"
69
+ },
70
+ "2xl": {
71
+ base: "max-w-2xl"
72
+ },
73
+ "3xl": {
74
+ base: "max-w-3xl"
75
+ },
76
+ "4xl": {
77
+ base: "max-w-4xl"
78
+ },
79
+ "5xl": {
80
+ base: "max-w-5xl"
81
+ },
82
+ full: {
83
+ base: "max-w-full rounded-none min-h-screen"
84
+ }
85
+ },
86
+ radius: {
87
+ none: { base: "rounded-none" },
88
+ base: { base: "rounded" },
89
+ sm: { base: "rounded-sm" },
90
+ md: { base: "rounded-md" },
91
+ lg: { base: "rounded-lg" },
92
+ xl: { base: "rounded-xl" },
93
+ "2xl": { base: "rounded-2xl" },
94
+ "3xl": { base: "rounded-3xl" }
95
+ },
96
+ backdropVariant: {
97
+ transparent: {},
98
+ opaque: {
99
+ backdrop: "bg-black/30 backdrop-opacity-50"
100
+ },
101
+ blur: {
102
+ backdrop: "backdrop-blur-sm backdrop-saturate-150 bg-black/20"
103
+ }
104
+ },
105
+ scrollBehavior: {
106
+ inside: {
107
+ base: "max-h-[calc(100%_-_7.5rem)]",
108
+ body: "overflow-y-auto"
109
+ },
110
+ outside: {
111
+ wrapper: "items-start overflow-y-auto",
112
+ base: "my-16"
113
+ }
114
+ },
115
+ isCloseButtonFocusVisible: {
116
+ true: {
117
+ closeButton: [...ringClasses]
118
+ }
119
+ }
120
+ },
121
+ defaultVariants: {
122
+ size: "md",
123
+ radius: "lg",
124
+ backdropVariant: "blur",
125
+ scrollBehavior: "inside"
126
+ },
127
+ compoundVariants: [
128
+ {
129
+ backdropVariant: ["opaque", "blur"],
130
+ class: {
131
+ backdrop: "block w-full h-full fixed inset-0 z-0"
132
+ }
133
+ }
134
+ ]
135
+ });
136
+
137
+ export {
138
+ modal
139
+ };
@@ -28,5 +28,6 @@ export { DropdownItemSlots, DropdownItemVariantProps, dropdownItem } from './dro
28
28
  export { DropdownSectionSlots, DropdownSectionVariantProps, dropdownSection } from './dropdown-section.js';
29
29
  export { dropdownMenu } from './dropdown-menu.js';
30
30
  export { ImageSlots, ImageVariantProps, image } from './image.js';
31
+ export { ModalSlots, ModalVariantProps, modal } from './modal.js';
31
32
  import 'tailwind-variants';
32
33
  import 'tailwind-variants/dist/config';
@@ -41,6 +41,7 @@ __export(components_exports, {
41
41
  image: () => image,
42
42
  input: () => input,
43
43
  link: () => link,
44
+ modal: () => modal,
44
45
  pagination: () => pagination,
45
46
  popover: () => popover,
46
47
  progress: () => progress,
@@ -5062,6 +5063,138 @@ var image = (0, import_tailwind_variants30.tv)({
5062
5063
  }
5063
5064
  ]
5064
5065
  });
5066
+
5067
+ // src/components/modal.ts
5068
+ var import_tailwind_variants31 = require("tailwind-variants");
5069
+ var modal = (0, import_tailwind_variants31.tv)({
5070
+ slots: {
5071
+ wrapper: [
5072
+ "flex",
5073
+ "w-screen",
5074
+ "h-screen",
5075
+ "fixed",
5076
+ "inset-0",
5077
+ "z-50",
5078
+ "overflow-x-auto",
5079
+ "overflow-y-hidden",
5080
+ "justify-center",
5081
+ "items-center"
5082
+ ],
5083
+ base: [
5084
+ "flex",
5085
+ "flex-col",
5086
+ "relative",
5087
+ "bg-white",
5088
+ "z-50",
5089
+ "w-full",
5090
+ "shadow-lg",
5091
+ "box-border",
5092
+ "dark:bg-content1",
5093
+ "border border-neutral-100",
5094
+ "outline-none"
5095
+ ],
5096
+ trigger: [],
5097
+ backdrop: ["hidden"],
5098
+ header: "flex py-4 px-6 flex-initial text-lg font-semibold",
5099
+ body: "flex flex-1 flex-col gap-3 px-6 py-2",
5100
+ footer: "flex flex-row gap-2 px-6 py-4 justify-end",
5101
+ closeButton: [
5102
+ "absolute",
5103
+ "appearance-none",
5104
+ "outline-none",
5105
+ "select-none",
5106
+ "top-1",
5107
+ "right-1",
5108
+ "p-2",
5109
+ "text-neutral-500",
5110
+ "rounded-full",
5111
+ "hover:bg-neutral-100",
5112
+ "active:bg-neutral-200"
5113
+ ]
5114
+ },
5115
+ variants: {
5116
+ size: {
5117
+ xs: {
5118
+ base: "max-w-xs"
5119
+ },
5120
+ sm: {
5121
+ base: "max-w-sm"
5122
+ },
5123
+ md: {
5124
+ base: "max-w-md"
5125
+ },
5126
+ lg: {
5127
+ base: "max-w-lg"
5128
+ },
5129
+ xl: {
5130
+ base: "max-w-xl"
5131
+ },
5132
+ "2xl": {
5133
+ base: "max-w-2xl"
5134
+ },
5135
+ "3xl": {
5136
+ base: "max-w-3xl"
5137
+ },
5138
+ "4xl": {
5139
+ base: "max-w-4xl"
5140
+ },
5141
+ "5xl": {
5142
+ base: "max-w-5xl"
5143
+ },
5144
+ full: {
5145
+ base: "max-w-full rounded-none min-h-screen"
5146
+ }
5147
+ },
5148
+ radius: {
5149
+ none: { base: "rounded-none" },
5150
+ base: { base: "rounded" },
5151
+ sm: { base: "rounded-sm" },
5152
+ md: { base: "rounded-md" },
5153
+ lg: { base: "rounded-lg" },
5154
+ xl: { base: "rounded-xl" },
5155
+ "2xl": { base: "rounded-2xl" },
5156
+ "3xl": { base: "rounded-3xl" }
5157
+ },
5158
+ backdropVariant: {
5159
+ transparent: {},
5160
+ opaque: {
5161
+ backdrop: "bg-black/30 backdrop-opacity-50"
5162
+ },
5163
+ blur: {
5164
+ backdrop: "backdrop-blur-sm backdrop-saturate-150 bg-black/20"
5165
+ }
5166
+ },
5167
+ scrollBehavior: {
5168
+ inside: {
5169
+ base: "max-h-[calc(100%_-_7.5rem)]",
5170
+ body: "overflow-y-auto"
5171
+ },
5172
+ outside: {
5173
+ wrapper: "items-start overflow-y-auto",
5174
+ base: "my-16"
5175
+ }
5176
+ },
5177
+ isCloseButtonFocusVisible: {
5178
+ true: {
5179
+ closeButton: [...ringClasses]
5180
+ }
5181
+ }
5182
+ },
5183
+ defaultVariants: {
5184
+ size: "md",
5185
+ radius: "lg",
5186
+ backdropVariant: "blur",
5187
+ scrollBehavior: "inside"
5188
+ },
5189
+ compoundVariants: [
5190
+ {
5191
+ backdropVariant: ["opaque", "blur"],
5192
+ class: {
5193
+ backdrop: "block w-full h-full fixed inset-0 z-0"
5194
+ }
5195
+ }
5196
+ ]
5197
+ });
5065
5198
  // Annotate the CommonJS export names for ESM import in node:
5066
5199
  0 && (module.exports = {
5067
5200
  accordion,
@@ -5085,6 +5218,7 @@ var image = (0, import_tailwind_variants30.tv)({
5085
5218
  image,
5086
5219
  input,
5087
5220
  link,
5221
+ modal,
5088
5222
  pagination,
5089
5223
  popover,
5090
5224
  progress,
@@ -1,7 +1,4 @@
1
- import "../chunk-PRWEADY4.mjs";
2
- import {
3
- radioGroup
4
- } from "../chunk-HHWXPWYN.mjs";
1
+ import "../chunk-XUHE5FW2.mjs";
5
2
  import {
6
3
  radio
7
4
  } from "../chunk-WYZNUYAJ.mjs";
@@ -17,18 +14,15 @@ import {
17
14
  import {
18
15
  user
19
16
  } from "../chunk-6KZCW2WL.mjs";
20
- import {
21
- dropdown
22
- } from "../chunk-UNMHV7HH.mjs";
23
- import {
24
- image
25
- } from "../chunk-6GGRJ6I7.mjs";
26
17
  import {
27
18
  input
28
19
  } from "../chunk-PC5X557I.mjs";
29
20
  import {
30
21
  link
31
22
  } from "../chunk-4FNCWRTA.mjs";
23
+ import {
24
+ modal
25
+ } from "../chunk-53YQ75PY.mjs";
32
26
  import {
33
27
  pagination
34
28
  } from "../chunk-TSETU4MR.mjs";
@@ -39,11 +33,8 @@ import {
39
33
  progress
40
34
  } from "../chunk-I7DM7NL7.mjs";
41
35
  import {
42
- checkbox
43
- } from "../chunk-W3CNTVG5.mjs";
44
- import {
45
- chip
46
- } from "../chunk-QRMWQXOX.mjs";
36
+ radioGroup
37
+ } from "../chunk-HHWXPWYN.mjs";
47
38
  import {
48
39
  circularProgress
49
40
  } from "../chunk-FK5GDC67.mjs";
@@ -63,11 +54,11 @@ import {
63
54
  dropdownSection
64
55
  } from "../chunk-AVGEHFT4.mjs";
65
56
  import {
66
- accordion
67
- } from "../chunk-YYBLBQIV.mjs";
57
+ dropdown
58
+ } from "../chunk-UNMHV7HH.mjs";
68
59
  import {
69
- avatarGroup
70
- } from "../chunk-MLH3XSY7.mjs";
60
+ image
61
+ } from "../chunk-6GGRJ6I7.mjs";
71
62
  import {
72
63
  avatar
73
64
  } from "../chunk-TEP7IDHT.mjs";
@@ -86,12 +77,24 @@ import {
86
77
  import {
87
78
  checkboxGroup
88
79
  } from "../chunk-U77YMEWM.mjs";
80
+ import {
81
+ checkbox
82
+ } from "../chunk-W3CNTVG5.mjs";
83
+ import {
84
+ chip
85
+ } from "../chunk-QRMWQXOX.mjs";
89
86
  import {
90
87
  accordionItem
91
88
  } from "../chunk-IB25MFRG.mjs";
92
89
  import "../chunk-CMYR6AOY.mjs";
93
90
  import "../chunk-K7LK7NCE.mjs";
94
91
  import "../chunk-LGGZKBOO.mjs";
92
+ import {
93
+ accordion
94
+ } from "../chunk-YYBLBQIV.mjs";
95
+ import {
96
+ avatarGroup
97
+ } from "../chunk-MLH3XSY7.mjs";
95
98
  import "../chunk-INZK6TTL.mjs";
96
99
  export {
97
100
  accordion,
@@ -115,6 +118,7 @@ export {
115
118
  image,
116
119
  input,
117
120
  link,
121
+ modal,
118
122
  pagination,
119
123
  popover,
120
124
  progress,
@@ -0,0 +1,202 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import { VariantProps } from 'tailwind-variants';
3
+ import * as tailwind_variants_dist_config from 'tailwind-variants/dist/config';
4
+
5
+ /**
6
+ * Card **Tailwind Variants** component
7
+ *
8
+ * @example
9
+ * ```js
10
+ * const {base, trigger, backdrop, header, body, footer} = modal({...})
11
+ *
12
+ * <div>
13
+ * <button className={trigger()}>Open Modal</button>
14
+ * <div className={backdrop()}/>
15
+ * <div className={base()}>
16
+ * <div className={header()}>Header</div>
17
+ * <div className={body()}>Body</div>
18
+ * <div className={footer()}>Footer</div>
19
+ * </div>
20
+ * </div>
21
+ * ```
22
+ */
23
+ declare const modal: tailwind_variants.TVReturnType<{
24
+ size: {
25
+ xs: {
26
+ base: string;
27
+ };
28
+ sm: {
29
+ base: string;
30
+ };
31
+ md: {
32
+ base: string;
33
+ };
34
+ lg: {
35
+ base: string;
36
+ };
37
+ xl: {
38
+ base: string;
39
+ };
40
+ "2xl": {
41
+ base: string;
42
+ };
43
+ "3xl": {
44
+ base: string;
45
+ };
46
+ "4xl": {
47
+ base: string;
48
+ };
49
+ "5xl": {
50
+ base: string;
51
+ };
52
+ full: {
53
+ base: string;
54
+ };
55
+ };
56
+ radius: {
57
+ none: {
58
+ base: string;
59
+ };
60
+ base: {
61
+ base: string;
62
+ };
63
+ sm: {
64
+ base: string;
65
+ };
66
+ md: {
67
+ base: string;
68
+ };
69
+ lg: {
70
+ base: string;
71
+ };
72
+ xl: {
73
+ base: string;
74
+ };
75
+ "2xl": {
76
+ base: string;
77
+ };
78
+ "3xl": {
79
+ base: string;
80
+ };
81
+ };
82
+ backdropVariant: {
83
+ transparent: {};
84
+ opaque: {
85
+ backdrop: string;
86
+ };
87
+ blur: {
88
+ backdrop: string;
89
+ };
90
+ };
91
+ scrollBehavior: {
92
+ inside: {
93
+ base: string;
94
+ body: string;
95
+ };
96
+ outside: {
97
+ wrapper: string;
98
+ base: string;
99
+ };
100
+ };
101
+ isCloseButtonFocusVisible: {
102
+ true: {
103
+ closeButton: string[];
104
+ };
105
+ };
106
+ }, unknown, {
107
+ wrapper: string[];
108
+ base: string[];
109
+ trigger: never[];
110
+ backdrop: string[];
111
+ header: string;
112
+ body: string;
113
+ footer: string;
114
+ closeButton: string[];
115
+ }, undefined, undefined, tailwind_variants_dist_config.TVConfig<{
116
+ size: {
117
+ xs: {
118
+ base: string;
119
+ };
120
+ sm: {
121
+ base: string;
122
+ };
123
+ md: {
124
+ base: string;
125
+ };
126
+ lg: {
127
+ base: string;
128
+ };
129
+ xl: {
130
+ base: string;
131
+ };
132
+ "2xl": {
133
+ base: string;
134
+ };
135
+ "3xl": {
136
+ base: string;
137
+ };
138
+ "4xl": {
139
+ base: string;
140
+ };
141
+ "5xl": {
142
+ base: string;
143
+ };
144
+ full: {
145
+ base: string;
146
+ };
147
+ };
148
+ radius: {
149
+ none: {
150
+ base: string;
151
+ };
152
+ base: {
153
+ base: string;
154
+ };
155
+ sm: {
156
+ base: string;
157
+ };
158
+ md: {
159
+ base: string;
160
+ };
161
+ lg: {
162
+ base: string;
163
+ };
164
+ xl: {
165
+ base: string;
166
+ };
167
+ "2xl": {
168
+ base: string;
169
+ };
170
+ "3xl": {
171
+ base: string;
172
+ };
173
+ };
174
+ backdropVariant: {
175
+ transparent: {};
176
+ opaque: {
177
+ backdrop: string;
178
+ };
179
+ blur: {
180
+ backdrop: string;
181
+ };
182
+ };
183
+ scrollBehavior: {
184
+ inside: {
185
+ base: string;
186
+ body: string;
187
+ };
188
+ outside: {
189
+ wrapper: string;
190
+ base: string;
191
+ };
192
+ };
193
+ isCloseButtonFocusVisible: {
194
+ true: {
195
+ closeButton: string[];
196
+ };
197
+ };
198
+ }, unknown>>;
199
+ type ModalVariantProps = VariantProps<typeof modal>;
200
+ type ModalSlots = keyof ReturnType<typeof modal>;
201
+
202
+ export { ModalSlots, ModalVariantProps, modal };
@@ -0,0 +1,171 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/components/modal.ts
21
+ var modal_exports = {};
22
+ __export(modal_exports, {
23
+ modal: () => modal
24
+ });
25
+ module.exports = __toCommonJS(modal_exports);
26
+ var import_tailwind_variants = require("tailwind-variants");
27
+
28
+ // src/utils/classes.ts
29
+ var ringClasses = [
30
+ "outline-none",
31
+ "ring-2",
32
+ "!ring-primary",
33
+ "ring-offset-2",
34
+ "ring-offset-background",
35
+ "dark:ring-offset-background-dark"
36
+ ];
37
+
38
+ // src/components/modal.ts
39
+ var modal = (0, import_tailwind_variants.tv)({
40
+ slots: {
41
+ wrapper: [
42
+ "flex",
43
+ "w-screen",
44
+ "h-screen",
45
+ "fixed",
46
+ "inset-0",
47
+ "z-50",
48
+ "overflow-x-auto",
49
+ "overflow-y-hidden",
50
+ "justify-center",
51
+ "items-center"
52
+ ],
53
+ base: [
54
+ "flex",
55
+ "flex-col",
56
+ "relative",
57
+ "bg-white",
58
+ "z-50",
59
+ "w-full",
60
+ "shadow-lg",
61
+ "box-border",
62
+ "dark:bg-content1",
63
+ "border border-neutral-100",
64
+ "outline-none"
65
+ ],
66
+ trigger: [],
67
+ backdrop: ["hidden"],
68
+ header: "flex py-4 px-6 flex-initial text-lg font-semibold",
69
+ body: "flex flex-1 flex-col gap-3 px-6 py-2",
70
+ footer: "flex flex-row gap-2 px-6 py-4 justify-end",
71
+ closeButton: [
72
+ "absolute",
73
+ "appearance-none",
74
+ "outline-none",
75
+ "select-none",
76
+ "top-1",
77
+ "right-1",
78
+ "p-2",
79
+ "text-neutral-500",
80
+ "rounded-full",
81
+ "hover:bg-neutral-100",
82
+ "active:bg-neutral-200"
83
+ ]
84
+ },
85
+ variants: {
86
+ size: {
87
+ xs: {
88
+ base: "max-w-xs"
89
+ },
90
+ sm: {
91
+ base: "max-w-sm"
92
+ },
93
+ md: {
94
+ base: "max-w-md"
95
+ },
96
+ lg: {
97
+ base: "max-w-lg"
98
+ },
99
+ xl: {
100
+ base: "max-w-xl"
101
+ },
102
+ "2xl": {
103
+ base: "max-w-2xl"
104
+ },
105
+ "3xl": {
106
+ base: "max-w-3xl"
107
+ },
108
+ "4xl": {
109
+ base: "max-w-4xl"
110
+ },
111
+ "5xl": {
112
+ base: "max-w-5xl"
113
+ },
114
+ full: {
115
+ base: "max-w-full rounded-none min-h-screen"
116
+ }
117
+ },
118
+ radius: {
119
+ none: { base: "rounded-none" },
120
+ base: { base: "rounded" },
121
+ sm: { base: "rounded-sm" },
122
+ md: { base: "rounded-md" },
123
+ lg: { base: "rounded-lg" },
124
+ xl: { base: "rounded-xl" },
125
+ "2xl": { base: "rounded-2xl" },
126
+ "3xl": { base: "rounded-3xl" }
127
+ },
128
+ backdropVariant: {
129
+ transparent: {},
130
+ opaque: {
131
+ backdrop: "bg-black/30 backdrop-opacity-50"
132
+ },
133
+ blur: {
134
+ backdrop: "backdrop-blur-sm backdrop-saturate-150 bg-black/20"
135
+ }
136
+ },
137
+ scrollBehavior: {
138
+ inside: {
139
+ base: "max-h-[calc(100%_-_7.5rem)]",
140
+ body: "overflow-y-auto"
141
+ },
142
+ outside: {
143
+ wrapper: "items-start overflow-y-auto",
144
+ base: "my-16"
145
+ }
146
+ },
147
+ isCloseButtonFocusVisible: {
148
+ true: {
149
+ closeButton: [...ringClasses]
150
+ }
151
+ }
152
+ },
153
+ defaultVariants: {
154
+ size: "md",
155
+ radius: "lg",
156
+ backdropVariant: "blur",
157
+ scrollBehavior: "inside"
158
+ },
159
+ compoundVariants: [
160
+ {
161
+ backdropVariant: ["opaque", "blur"],
162
+ class: {
163
+ backdrop: "block w-full h-full fixed inset-0 z-0"
164
+ }
165
+ }
166
+ ]
167
+ });
168
+ // Annotate the CommonJS export names for ESM import in node:
169
+ 0 && (module.exports = {
170
+ modal
171
+ });
@@ -0,0 +1,10 @@
1
+ import {
2
+ modal
3
+ } from "../chunk-53YQ75PY.mjs";
4
+ import "../chunk-CMYR6AOY.mjs";
5
+ import "../chunk-K7LK7NCE.mjs";
6
+ import "../chunk-LGGZKBOO.mjs";
7
+ import "../chunk-INZK6TTL.mjs";
8
+ export {
9
+ modal
10
+ };
package/dist/index.d.ts CHANGED
@@ -28,6 +28,7 @@ export { DropdownItemSlots, DropdownItemVariantProps, dropdownItem } from './com
28
28
  export { DropdownSectionSlots, DropdownSectionVariantProps, dropdownSection } from './components/dropdown-section.js';
29
29
  export { dropdownMenu } from './components/dropdown-menu.js';
30
30
  export { ImageSlots, ImageVariantProps, image } from './components/image.js';
31
+ export { ModalSlots, ModalVariantProps, modal } from './components/modal.js';
31
32
  export { absoluteFullClasses, baseStyles, focusVisibleClasses, ringClasses, translateCenterClasses } from './utils/classes.js';
32
33
  export { SlotsToClasses } from './utils/types.js';
33
34
  export { colorVariants } from './utils/variants.js';
package/dist/index.js CHANGED
@@ -54,6 +54,7 @@ __export(src_exports, {
54
54
  image: () => image,
55
55
  input: () => input,
56
56
  link: () => link,
57
+ modal: () => modal,
57
58
  nextui: () => nextui,
58
59
  pagination: () => pagination,
59
60
  popover: () => popover,
@@ -66,7 +67,7 @@ __export(src_exports, {
66
67
  spinner: () => spinner,
67
68
  toggle: () => toggle,
68
69
  translateCenterClasses: () => translateCenterClasses,
69
- tv: () => import_tailwind_variants32.tv,
70
+ tv: () => import_tailwind_variants33.tv,
70
71
  user: () => user
71
72
  });
72
73
  module.exports = __toCommonJS(src_exports);
@@ -5086,6 +5087,138 @@ var image = (0, import_tailwind_variants30.tv)({
5086
5087
  ]
5087
5088
  });
5088
5089
 
5090
+ // src/components/modal.ts
5091
+ var import_tailwind_variants31 = require("tailwind-variants");
5092
+ var modal = (0, import_tailwind_variants31.tv)({
5093
+ slots: {
5094
+ wrapper: [
5095
+ "flex",
5096
+ "w-screen",
5097
+ "h-screen",
5098
+ "fixed",
5099
+ "inset-0",
5100
+ "z-50",
5101
+ "overflow-x-auto",
5102
+ "overflow-y-hidden",
5103
+ "justify-center",
5104
+ "items-center"
5105
+ ],
5106
+ base: [
5107
+ "flex",
5108
+ "flex-col",
5109
+ "relative",
5110
+ "bg-white",
5111
+ "z-50",
5112
+ "w-full",
5113
+ "shadow-lg",
5114
+ "box-border",
5115
+ "dark:bg-content1",
5116
+ "border border-neutral-100",
5117
+ "outline-none"
5118
+ ],
5119
+ trigger: [],
5120
+ backdrop: ["hidden"],
5121
+ header: "flex py-4 px-6 flex-initial text-lg font-semibold",
5122
+ body: "flex flex-1 flex-col gap-3 px-6 py-2",
5123
+ footer: "flex flex-row gap-2 px-6 py-4 justify-end",
5124
+ closeButton: [
5125
+ "absolute",
5126
+ "appearance-none",
5127
+ "outline-none",
5128
+ "select-none",
5129
+ "top-1",
5130
+ "right-1",
5131
+ "p-2",
5132
+ "text-neutral-500",
5133
+ "rounded-full",
5134
+ "hover:bg-neutral-100",
5135
+ "active:bg-neutral-200"
5136
+ ]
5137
+ },
5138
+ variants: {
5139
+ size: {
5140
+ xs: {
5141
+ base: "max-w-xs"
5142
+ },
5143
+ sm: {
5144
+ base: "max-w-sm"
5145
+ },
5146
+ md: {
5147
+ base: "max-w-md"
5148
+ },
5149
+ lg: {
5150
+ base: "max-w-lg"
5151
+ },
5152
+ xl: {
5153
+ base: "max-w-xl"
5154
+ },
5155
+ "2xl": {
5156
+ base: "max-w-2xl"
5157
+ },
5158
+ "3xl": {
5159
+ base: "max-w-3xl"
5160
+ },
5161
+ "4xl": {
5162
+ base: "max-w-4xl"
5163
+ },
5164
+ "5xl": {
5165
+ base: "max-w-5xl"
5166
+ },
5167
+ full: {
5168
+ base: "max-w-full rounded-none min-h-screen"
5169
+ }
5170
+ },
5171
+ radius: {
5172
+ none: { base: "rounded-none" },
5173
+ base: { base: "rounded" },
5174
+ sm: { base: "rounded-sm" },
5175
+ md: { base: "rounded-md" },
5176
+ lg: { base: "rounded-lg" },
5177
+ xl: { base: "rounded-xl" },
5178
+ "2xl": { base: "rounded-2xl" },
5179
+ "3xl": { base: "rounded-3xl" }
5180
+ },
5181
+ backdropVariant: {
5182
+ transparent: {},
5183
+ opaque: {
5184
+ backdrop: "bg-black/30 backdrop-opacity-50"
5185
+ },
5186
+ blur: {
5187
+ backdrop: "backdrop-blur-sm backdrop-saturate-150 bg-black/20"
5188
+ }
5189
+ },
5190
+ scrollBehavior: {
5191
+ inside: {
5192
+ base: "max-h-[calc(100%_-_7.5rem)]",
5193
+ body: "overflow-y-auto"
5194
+ },
5195
+ outside: {
5196
+ wrapper: "items-start overflow-y-auto",
5197
+ base: "my-16"
5198
+ }
5199
+ },
5200
+ isCloseButtonFocusVisible: {
5201
+ true: {
5202
+ closeButton: [...ringClasses]
5203
+ }
5204
+ }
5205
+ },
5206
+ defaultVariants: {
5207
+ size: "md",
5208
+ radius: "lg",
5209
+ backdropVariant: "blur",
5210
+ scrollBehavior: "inside"
5211
+ },
5212
+ compoundVariants: [
5213
+ {
5214
+ backdropVariant: ["opaque", "blur"],
5215
+ class: {
5216
+ backdrop: "block w-full h-full fixed inset-0 z-0"
5217
+ }
5218
+ }
5219
+ ]
5220
+ });
5221
+
5089
5222
  // src/colors/blue.ts
5090
5223
  var blue = {
5091
5224
  50: "#e6f1fe",
@@ -5642,9 +5775,9 @@ var nextui = (config = {}) => {
5642
5775
  };
5643
5776
 
5644
5777
  // src/index.ts
5645
- var import_tailwind_variants31 = require("tailwind-variants");
5646
5778
  var import_tailwind_variants32 = require("tailwind-variants");
5647
- var cn = (...classes) => (0, import_tailwind_variants31.cn)(classes)();
5779
+ var import_tailwind_variants33 = require("tailwind-variants");
5780
+ var cn = (...classes) => (0, import_tailwind_variants32.cn)(classes)();
5648
5781
  // Annotate the CommonJS export names for ESM import in node:
5649
5782
  0 && (module.exports = {
5650
5783
  absoluteFullClasses,
@@ -5675,6 +5808,7 @@ var cn = (...classes) => (0, import_tailwind_variants31.cn)(classes)();
5675
5808
  image,
5676
5809
  input,
5677
5810
  link,
5811
+ modal,
5678
5812
  nextui,
5679
5813
  pagination,
5680
5814
  popover,
package/dist/index.mjs CHANGED
@@ -1,7 +1,4 @@
1
- import "./chunk-PRWEADY4.mjs";
2
- import {
3
- radioGroup
4
- } from "./chunk-HHWXPWYN.mjs";
1
+ import "./chunk-XUHE5FW2.mjs";
5
2
  import {
6
3
  radio
7
4
  } from "./chunk-WYZNUYAJ.mjs";
@@ -17,18 +14,15 @@ import {
17
14
  import {
18
15
  user
19
16
  } from "./chunk-6KZCW2WL.mjs";
20
- import {
21
- dropdown
22
- } from "./chunk-UNMHV7HH.mjs";
23
- import {
24
- image
25
- } from "./chunk-6GGRJ6I7.mjs";
26
17
  import {
27
18
  input
28
19
  } from "./chunk-PC5X557I.mjs";
29
20
  import {
30
21
  link
31
22
  } from "./chunk-4FNCWRTA.mjs";
23
+ import {
24
+ modal
25
+ } from "./chunk-53YQ75PY.mjs";
32
26
  import {
33
27
  pagination
34
28
  } from "./chunk-TSETU4MR.mjs";
@@ -39,11 +33,8 @@ import {
39
33
  progress
40
34
  } from "./chunk-I7DM7NL7.mjs";
41
35
  import {
42
- checkbox
43
- } from "./chunk-W3CNTVG5.mjs";
44
- import {
45
- chip
46
- } from "./chunk-QRMWQXOX.mjs";
36
+ radioGroup
37
+ } from "./chunk-HHWXPWYN.mjs";
47
38
  import {
48
39
  circularProgress
49
40
  } from "./chunk-FK5GDC67.mjs";
@@ -63,11 +54,11 @@ import {
63
54
  dropdownSection
64
55
  } from "./chunk-AVGEHFT4.mjs";
65
56
  import {
66
- accordion
67
- } from "./chunk-YYBLBQIV.mjs";
57
+ dropdown
58
+ } from "./chunk-UNMHV7HH.mjs";
68
59
  import {
69
- avatarGroup
70
- } from "./chunk-MLH3XSY7.mjs";
60
+ image
61
+ } from "./chunk-6GGRJ6I7.mjs";
71
62
  import {
72
63
  avatar
73
64
  } from "./chunk-TEP7IDHT.mjs";
@@ -86,6 +77,12 @@ import {
86
77
  import {
87
78
  checkboxGroup
88
79
  } from "./chunk-U77YMEWM.mjs";
80
+ import {
81
+ checkbox
82
+ } from "./chunk-W3CNTVG5.mjs";
83
+ import {
84
+ chip
85
+ } from "./chunk-QRMWQXOX.mjs";
89
86
  import {
90
87
  accordionItem
91
88
  } from "./chunk-IB25MFRG.mjs";
@@ -94,10 +91,15 @@ import "./chunk-K7LK7NCE.mjs";
94
91
  import {
95
92
  colorVariants
96
93
  } from "./chunk-LGGZKBOO.mjs";
94
+ import {
95
+ accordion
96
+ } from "./chunk-YYBLBQIV.mjs";
97
+ import {
98
+ avatarGroup
99
+ } from "./chunk-MLH3XSY7.mjs";
97
100
  import {
98
101
  nextui
99
- } from "./chunk-XSFNJVJG.mjs";
100
- import "./chunk-XLATS5QU.mjs";
102
+ } from "./chunk-WS27WNYH.mjs";
101
103
  import {
102
104
  absoluteFullClasses,
103
105
  baseStyles,
@@ -105,6 +107,7 @@ import {
105
107
  ringClasses,
106
108
  translateCenterClasses
107
109
  } from "./chunk-INZK6TTL.mjs";
110
+ import "./chunk-XLATS5QU.mjs";
108
111
  import "./chunk-WQEDQHKX.mjs";
109
112
  import {
110
113
  colors
@@ -159,6 +162,7 @@ export {
159
162
  image,
160
163
  input,
161
164
  link,
165
+ modal,
162
166
  nextui,
163
167
  pagination,
164
168
  popover,
package/dist/plugin.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  nextui
3
- } from "./chunk-XSFNJVJG.mjs";
4
- import "./chunk-XLATS5QU.mjs";
3
+ } from "./chunk-WS27WNYH.mjs";
5
4
  import "./chunk-INZK6TTL.mjs";
5
+ import "./chunk-XLATS5QU.mjs";
6
6
  import "./chunk-WQEDQHKX.mjs";
7
7
  import "./chunk-7MQD7UA2.mjs";
8
8
  import "./chunk-Y52EXP4A.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextui-org/theme",
3
- "version": "0.0.0-dev-v2-20230414001416",
3
+ "version": "0.0.0-dev-v2-20230415023901",
4
4
  "description": "The default theme for NextUI components",
5
5
  "keywords": [
6
6
  "theme",
@@ -1,9 +1,9 @@
1
- import {
2
- utilities
3
- } from "./chunk-XLATS5QU.mjs";
4
1
  import {
5
2
  baseStyles
6
3
  } from "./chunk-INZK6TTL.mjs";
4
+ import {
5
+ utilities
6
+ } from "./chunk-XLATS5QU.mjs";
7
7
  import {
8
8
  semanticColors
9
9
  } from "./chunk-Y52EXP4A.mjs";
File without changes