@nextui-org/theme 0.0.0-dev-v2-20230405205125 → 0.0.0-dev-v2-20230407131834

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.
@@ -1,10 +1,13 @@
1
1
  import {
2
2
  colorVariants
3
3
  } from "./chunk-LGGZKBOO.mjs";
4
+ import {
5
+ ringClasses
6
+ } from "./chunk-IJCHUO4J.mjs";
4
7
 
5
- // src/components/tooltip.ts
8
+ // src/components/popover.ts
6
9
  import { tv } from "tailwind-variants";
7
- var tooltip = tv({
10
+ var popover = tv({
8
11
  slots: {
9
12
  base: [
10
13
  "z-10",
@@ -16,8 +19,10 @@ var tooltip = tv({
16
19
  "subpixel-antialiased",
17
20
  "px-4",
18
21
  "py-1",
19
- "text-base"
22
+ "text-base",
23
+ "!outline-none"
20
24
  ],
25
+ trigger: [],
21
26
  arrow: [
22
27
  "-z-10",
23
28
  "absolute",
@@ -82,14 +87,27 @@ var tooltip = tv({
82
87
  xl: { base: "rounded-xl" },
83
88
  full: { base: "rounded-full" }
84
89
  },
90
+ isFocusVisible: {
91
+ true: {
92
+ base: [...ringClasses]
93
+ }
94
+ },
85
95
  disableAnimation: {
86
96
  true: { base: "animate-none" }
97
+ },
98
+ isTriggerForeground: {
99
+ true: {},
100
+ false: {
101
+ trigger: ["aria-expanded:scale-95", "aria-expanded:opacity-70", "subpixel-antialiased"]
102
+ }
87
103
  }
88
104
  },
89
105
  defaultVariants: {
90
106
  variant: "solid",
91
107
  color: "neutral",
92
- radius: "lg"
108
+ radius: "lg",
109
+ disableAnimation: false,
110
+ isTriggerForeground: false
93
111
  },
94
112
  compoundVariants: [
95
113
  {
@@ -273,5 +291,5 @@ var tooltip = tv({
273
291
  });
274
292
 
275
293
  export {
276
- tooltip
294
+ popover
277
295
  };
@@ -8,7 +8,7 @@ export { ButtonGroupVariantProps, buttonGroup } from './button-group.js';
8
8
  export { drip } from './drip.js';
9
9
  export { SpinnerSlots, SpinnerVariantProps, spinner } from './spinner.js';
10
10
  export { CodeVariantProps, code } from './code.js';
11
- export { TooltipSlots, TooltipVariantProps, tooltip } from './tooltip.js';
11
+ export { PopoverSlots, PopoverVariantProps, popover } from './popover.js';
12
12
  export { SnippetSlots, SnippetVariantProps, snippet } from './snippet.js';
13
13
  export { ChipSlots, ChipVariantProps, chip } from './chip.js';
14
14
  export { BadgeSlots, BadgeVariantProps, badge } from './badge.js';
@@ -37,13 +37,13 @@ __export(components_exports, {
37
37
  input: () => input,
38
38
  link: () => link,
39
39
  pagination: () => pagination,
40
+ popover: () => popover,
40
41
  progress: () => progress,
41
42
  radio: () => radio,
42
43
  radioGroup: () => radioGroup,
43
44
  snippet: () => snippet,
44
45
  spinner: () => spinner,
45
46
  toggle: () => toggle,
46
- tooltip: () => tooltip,
47
47
  user: () => user
48
48
  });
49
49
  module.exports = __toCommonJS(components_exports);
@@ -1155,9 +1155,9 @@ var code = (0, import_tailwind_variants10.tv)({
1155
1155
  }
1156
1156
  });
1157
1157
 
1158
- // src/components/tooltip.ts
1158
+ // src/components/popover.ts
1159
1159
  var import_tailwind_variants11 = require("tailwind-variants");
1160
- var tooltip = (0, import_tailwind_variants11.tv)({
1160
+ var popover = (0, import_tailwind_variants11.tv)({
1161
1161
  slots: {
1162
1162
  base: [
1163
1163
  "z-10",
@@ -1169,8 +1169,10 @@ var tooltip = (0, import_tailwind_variants11.tv)({
1169
1169
  "subpixel-antialiased",
1170
1170
  "px-4",
1171
1171
  "py-1",
1172
- "text-base"
1172
+ "text-base",
1173
+ "!outline-none"
1173
1174
  ],
1175
+ trigger: [],
1174
1176
  arrow: [
1175
1177
  "-z-10",
1176
1178
  "absolute",
@@ -1235,14 +1237,27 @@ var tooltip = (0, import_tailwind_variants11.tv)({
1235
1237
  xl: { base: "rounded-xl" },
1236
1238
  full: { base: "rounded-full" }
1237
1239
  },
1240
+ isFocusVisible: {
1241
+ true: {
1242
+ base: [...ringClasses]
1243
+ }
1244
+ },
1238
1245
  disableAnimation: {
1239
1246
  true: { base: "animate-none" }
1247
+ },
1248
+ isTriggerForeground: {
1249
+ true: {},
1250
+ false: {
1251
+ trigger: ["aria-expanded:scale-95", "aria-expanded:opacity-70", "subpixel-antialiased"]
1252
+ }
1240
1253
  }
1241
1254
  },
1242
1255
  defaultVariants: {
1243
1256
  variant: "solid",
1244
1257
  color: "neutral",
1245
- radius: "lg"
1258
+ radius: "lg",
1259
+ disableAnimation: false,
1260
+ isTriggerForeground: false
1246
1261
  },
1247
1262
  compoundVariants: [
1248
1263
  {
@@ -4475,12 +4490,12 @@ var input = (0, import_tailwind_variants25.tv)({
4475
4490
  input,
4476
4491
  link,
4477
4492
  pagination,
4493
+ popover,
4478
4494
  progress,
4479
4495
  radio,
4480
4496
  radioGroup,
4481
4497
  snippet,
4482
4498
  spinner,
4483
4499
  toggle,
4484
- tooltip,
4485
4500
  user
4486
4501
  });
@@ -5,6 +5,9 @@ import {
5
5
  import {
6
6
  pagination
7
7
  } from "../chunk-7BYRB2YS.mjs";
8
+ import {
9
+ popover
10
+ } from "../chunk-O6WKKOLY.mjs";
8
11
  import {
9
12
  progress
10
13
  } from "../chunk-I7DM7NL7.mjs";
@@ -23,9 +26,6 @@ import {
23
26
  import {
24
27
  toggle
25
28
  } from "../chunk-GJCSKHK6.mjs";
26
- import {
27
- tooltip
28
- } from "../chunk-QIC7EALL.mjs";
29
29
  import {
30
30
  checkbox
31
31
  } from "../chunk-NJQP2VWT.mjs";
@@ -96,12 +96,12 @@ export {
96
96
  input,
97
97
  link,
98
98
  pagination,
99
+ popover,
99
100
  progress,
100
101
  radio,
101
102
  radioGroup,
102
103
  snippet,
103
104
  spinner,
104
105
  toggle,
105
- tooltip,
106
106
  user
107
107
  };
@@ -3,20 +3,20 @@ import { VariantProps } from 'tailwind-variants';
3
3
  import * as tailwind_variants_dist_config from 'tailwind-variants/dist/config';
4
4
 
5
5
  /**
6
- * Tooltip wrapper **Tailwind Variants** component
6
+ * Popover wrapper **Tailwind Variants** component
7
7
  *
8
- * const { base, arrow } = tooltip({...})
8
+ * const { base, trigger, arrow } = popover({...})
9
9
  *
10
10
  * @example
11
11
  * <div>
12
- * <button>your trigger</button>
13
- * <div role="tooltip" className={base()}>
14
- * // tooltip content
12
+ * <button className={trigger()} aria-expanded="true/false">your trigger</button>
13
+ * <div className={base()}>
14
+ * // popover content
15
15
  * <span className={arrow()} data-placement="top/bottom/left/right..." /> // arrow
16
16
  * </div>
17
17
  * </div>
18
18
  */
19
- declare const tooltip: tailwind_variants.TVReturnType<{
19
+ declare const popover: tailwind_variants.TVReturnType<{
20
20
  variant: {
21
21
  solid: {
22
22
  base: string;
@@ -86,13 +86,25 @@ declare const tooltip: tailwind_variants.TVReturnType<{
86
86
  base: string;
87
87
  };
88
88
  };
89
+ isFocusVisible: {
90
+ true: {
91
+ base: string[];
92
+ };
93
+ };
89
94
  disableAnimation: {
90
95
  true: {
91
96
  base: string;
92
97
  };
93
98
  };
99
+ isTriggerForeground: {
100
+ true: {};
101
+ false: {
102
+ trigger: string[];
103
+ };
104
+ };
94
105
  }, unknown, {
95
106
  base: string[];
107
+ trigger: never[];
96
108
  arrow: string[];
97
109
  }, undefined, undefined, tailwind_variants_dist_config.TVConfig<{
98
110
  variant: {
@@ -164,13 +176,24 @@ declare const tooltip: tailwind_variants.TVReturnType<{
164
176
  base: string;
165
177
  };
166
178
  };
179
+ isFocusVisible: {
180
+ true: {
181
+ base: string[];
182
+ };
183
+ };
167
184
  disableAnimation: {
168
185
  true: {
169
186
  base: string;
170
187
  };
171
188
  };
189
+ isTriggerForeground: {
190
+ true: {};
191
+ false: {
192
+ trigger: string[];
193
+ };
194
+ };
172
195
  }, unknown>>;
173
- type TooltipVariantProps = VariantProps<typeof tooltip>;
174
- type TooltipSlots = keyof ReturnType<typeof tooltip>;
196
+ type PopoverVariantProps = VariantProps<typeof popover>;
197
+ type PopoverSlots = keyof ReturnType<typeof popover>;
175
198
 
176
- export { TooltipSlots, TooltipVariantProps, tooltip };
199
+ export { PopoverSlots, PopoverVariantProps, popover };
@@ -17,14 +17,24 @@ var __copyProps = (to, from, except, desc) => {
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
 
20
- // src/components/tooltip.ts
21
- var tooltip_exports = {};
22
- __export(tooltip_exports, {
23
- tooltip: () => tooltip
20
+ // src/components/popover.ts
21
+ var popover_exports = {};
22
+ __export(popover_exports, {
23
+ popover: () => popover
24
24
  });
25
- module.exports = __toCommonJS(tooltip_exports);
25
+ module.exports = __toCommonJS(popover_exports);
26
26
  var import_tailwind_variants = require("tailwind-variants");
27
27
 
28
+ // src/utils/styles.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
+
28
38
  // src/utils/variants.ts
29
39
  var solid = {
30
40
  neutral: "bg-neutral text-neutral-contrastText",
@@ -99,8 +109,8 @@ var colorVariants = {
99
109
  ghost
100
110
  };
101
111
 
102
- // src/components/tooltip.ts
103
- var tooltip = (0, import_tailwind_variants.tv)({
112
+ // src/components/popover.ts
113
+ var popover = (0, import_tailwind_variants.tv)({
104
114
  slots: {
105
115
  base: [
106
116
  "z-10",
@@ -112,8 +122,10 @@ var tooltip = (0, import_tailwind_variants.tv)({
112
122
  "subpixel-antialiased",
113
123
  "px-4",
114
124
  "py-1",
115
- "text-base"
125
+ "text-base",
126
+ "!outline-none"
116
127
  ],
128
+ trigger: [],
117
129
  arrow: [
118
130
  "-z-10",
119
131
  "absolute",
@@ -178,14 +190,27 @@ var tooltip = (0, import_tailwind_variants.tv)({
178
190
  xl: { base: "rounded-xl" },
179
191
  full: { base: "rounded-full" }
180
192
  },
193
+ isFocusVisible: {
194
+ true: {
195
+ base: [...ringClasses]
196
+ }
197
+ },
181
198
  disableAnimation: {
182
199
  true: { base: "animate-none" }
200
+ },
201
+ isTriggerForeground: {
202
+ true: {},
203
+ false: {
204
+ trigger: ["aria-expanded:scale-95", "aria-expanded:opacity-70", "subpixel-antialiased"]
205
+ }
183
206
  }
184
207
  },
185
208
  defaultVariants: {
186
209
  variant: "solid",
187
210
  color: "neutral",
188
- radius: "lg"
211
+ radius: "lg",
212
+ disableAnimation: false,
213
+ isTriggerForeground: false
189
214
  },
190
215
  compoundVariants: [
191
216
  {
@@ -369,5 +394,5 @@ var tooltip = (0, import_tailwind_variants.tv)({
369
394
  });
370
395
  // Annotate the CommonJS export names for ESM import in node:
371
396
  0 && (module.exports = {
372
- tooltip
397
+ popover
373
398
  });
@@ -1,10 +1,10 @@
1
1
  import {
2
- tooltip
3
- } from "../chunk-QIC7EALL.mjs";
2
+ popover
3
+ } from "../chunk-O6WKKOLY.mjs";
4
4
  import "../chunk-CMYR6AOY.mjs";
5
5
  import "../chunk-K7LK7NCE.mjs";
6
6
  import "../chunk-LGGZKBOO.mjs";
7
7
  import "../chunk-IJCHUO4J.mjs";
8
8
  export {
9
- tooltip
9
+ popover
10
10
  };
package/dist/index.d.ts CHANGED
@@ -8,7 +8,7 @@ export { ButtonGroupVariantProps, buttonGroup } from './components/button-group.
8
8
  export { drip } from './components/drip.js';
9
9
  export { SpinnerSlots, SpinnerVariantProps, spinner } from './components/spinner.js';
10
10
  export { CodeVariantProps, code } from './components/code.js';
11
- export { TooltipSlots, TooltipVariantProps, tooltip } from './components/tooltip.js';
11
+ export { PopoverSlots, PopoverVariantProps, popover } from './components/popover.js';
12
12
  export { SnippetSlots, SnippetVariantProps, snippet } from './components/snippet.js';
13
13
  export { ChipSlots, ChipVariantProps, chip } from './components/chip.js';
14
14
  export { BadgeSlots, BadgeVariantProps, badge } from './components/badge.js';
package/dist/index.js CHANGED
@@ -51,6 +51,7 @@ __export(src_exports, {
51
51
  link: () => link,
52
52
  nextui: () => nextui,
53
53
  pagination: () => pagination,
54
+ popover: () => popover,
54
55
  progress: () => progress,
55
56
  radio: () => radio,
56
57
  radioGroup: () => radioGroup,
@@ -59,7 +60,6 @@ __export(src_exports, {
59
60
  snippet: () => snippet,
60
61
  spinner: () => spinner,
61
62
  toggle: () => toggle,
62
- tooltip: () => tooltip,
63
63
  translateCenterClasses: () => translateCenterClasses,
64
64
  tv: () => import_tailwind_variants27.tv,
65
65
  user: () => user
@@ -1178,9 +1178,9 @@ var code = (0, import_tailwind_variants10.tv)({
1178
1178
  }
1179
1179
  });
1180
1180
 
1181
- // src/components/tooltip.ts
1181
+ // src/components/popover.ts
1182
1182
  var import_tailwind_variants11 = require("tailwind-variants");
1183
- var tooltip = (0, import_tailwind_variants11.tv)({
1183
+ var popover = (0, import_tailwind_variants11.tv)({
1184
1184
  slots: {
1185
1185
  base: [
1186
1186
  "z-10",
@@ -1192,8 +1192,10 @@ var tooltip = (0, import_tailwind_variants11.tv)({
1192
1192
  "subpixel-antialiased",
1193
1193
  "px-4",
1194
1194
  "py-1",
1195
- "text-base"
1195
+ "text-base",
1196
+ "!outline-none"
1196
1197
  ],
1198
+ trigger: [],
1197
1199
  arrow: [
1198
1200
  "-z-10",
1199
1201
  "absolute",
@@ -1258,14 +1260,27 @@ var tooltip = (0, import_tailwind_variants11.tv)({
1258
1260
  xl: { base: "rounded-xl" },
1259
1261
  full: { base: "rounded-full" }
1260
1262
  },
1263
+ isFocusVisible: {
1264
+ true: {
1265
+ base: [...ringClasses]
1266
+ }
1267
+ },
1261
1268
  disableAnimation: {
1262
1269
  true: { base: "animate-none" }
1270
+ },
1271
+ isTriggerForeground: {
1272
+ true: {},
1273
+ false: {
1274
+ trigger: ["aria-expanded:scale-95", "aria-expanded:opacity-70", "subpixel-antialiased"]
1275
+ }
1263
1276
  }
1264
1277
  },
1265
1278
  defaultVariants: {
1266
1279
  variant: "solid",
1267
1280
  color: "neutral",
1268
- radius: "lg"
1281
+ radius: "lg",
1282
+ disableAnimation: false,
1283
+ isTriggerForeground: false
1269
1284
  },
1270
1285
  compoundVariants: [
1271
1286
  {
@@ -5061,6 +5076,7 @@ var cn = (...classes) => (0, import_tailwind_variants26.cn)(classes)();
5061
5076
  link,
5062
5077
  nextui,
5063
5078
  pagination,
5079
+ popover,
5064
5080
  progress,
5065
5081
  radio,
5066
5082
  radioGroup,
@@ -5069,7 +5085,6 @@ var cn = (...classes) => (0, import_tailwind_variants26.cn)(classes)();
5069
5085
  snippet,
5070
5086
  spinner,
5071
5087
  toggle,
5072
- tooltip,
5073
5088
  translateCenterClasses,
5074
5089
  tv,
5075
5090
  user
package/dist/index.mjs CHANGED
@@ -5,6 +5,9 @@ import {
5
5
  import {
6
6
  pagination
7
7
  } from "./chunk-7BYRB2YS.mjs";
8
+ import {
9
+ popover
10
+ } from "./chunk-O6WKKOLY.mjs";
8
11
  import {
9
12
  progress
10
13
  } from "./chunk-I7DM7NL7.mjs";
@@ -23,9 +26,6 @@ import {
23
26
  import {
24
27
  toggle
25
28
  } from "./chunk-GJCSKHK6.mjs";
26
- import {
27
- tooltip
28
- } from "./chunk-QIC7EALL.mjs";
29
29
  import {
30
30
  checkbox
31
31
  } from "./chunk-NJQP2VWT.mjs";
@@ -141,6 +141,7 @@ export {
141
141
  link,
142
142
  nextui,
143
143
  pagination,
144
+ popover,
144
145
  progress,
145
146
  radio,
146
147
  radioGroup,
@@ -149,7 +150,6 @@ export {
149
150
  snippet,
150
151
  spinner,
151
152
  toggle,
152
- tooltip,
153
153
  translateCenterClasses,
154
154
  tv,
155
155
  user
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextui-org/theme",
3
- "version": "0.0.0-dev-v2-20230405205125",
3
+ "version": "0.0.0-dev-v2-20230407131834",
4
4
  "description": "The default theme for NextUI components",
5
5
  "keywords": [
6
6
  "theme",