@ngrok/mantle 0.0.1-alpha.1 → 0.0.1-alpha.11

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.
Files changed (76) hide show
  1. package/dist/assets/fonts/euclid-square/swisstypefaces-EULA.pdf +0 -0
  2. package/dist/dts/index.d.ts +15 -0
  3. package/dist/{input → dts/input}/index.d.ts +1 -1
  4. package/dist/{media-object → dts/media-object}/index.d.ts +4 -5
  5. package/dist/{core → dts}/tailwind.preset.d.ts +3 -2
  6. package/dist/{theme-provider → dts/theme-provider}/index.d.ts +10 -9
  7. package/dist/index.d.ts +256 -0
  8. package/dist/index.js +547 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/tailwind.preset.d.ts +309 -0
  11. package/dist/tailwind.preset.js +321 -0
  12. package/dist/tailwind.preset.js.map +1 -0
  13. package/package.json +20 -5
  14. package/dist/back-to-top-button/index.js +0 -22
  15. package/dist/button/index.js +0 -58
  16. package/dist/card/index.js +0 -33
  17. package/dist/core/tailwind.preset.js +0 -299
  18. package/dist/cx/index.js +0 -10
  19. package/dist/dropdown-menu/index.js +0 -32
  20. package/dist/hooks/use-matches-media-query.js +0 -21
  21. package/dist/hooks/use-prefers-reduced-motion.js +0 -28
  22. package/dist/input/index.js +0 -24
  23. package/dist/media-object/index.js +0 -27
  24. package/dist/portal/index.js +0 -3
  25. package/dist/select/index.js +0 -22
  26. package/dist/theme-provider/index.js +0 -143
  27. package/dist/tooltip/index.js +0 -10
  28. package/dist/types/as-child.js +0 -1
  29. package/dist/types/deep-non-nullable.js +0 -1
  30. package/dist/types/input.js +0 -1
  31. package/dist/types/variant-props.js +0 -1
  32. package/dist/types/with-style-props.js +0 -1
  33. /package/dist/{core → assets}/fonts/euclid-square/EuclidSquare-Bold-WebS.woff +0 -0
  34. /package/dist/{core → assets}/fonts/euclid-square/EuclidSquare-BoldItalic-WebS.woff +0 -0
  35. /package/dist/{core → assets}/fonts/euclid-square/EuclidSquare-Light-WebS.woff +0 -0
  36. /package/dist/{core → assets}/fonts/euclid-square/EuclidSquare-LightItalic-WebS.woff +0 -0
  37. /package/dist/{core → assets}/fonts/euclid-square/EuclidSquare-Medium-WebS.woff +0 -0
  38. /package/dist/{core → assets}/fonts/euclid-square/EuclidSquare-MediumItalic-WebS.woff +0 -0
  39. /package/dist/{core → assets}/fonts/euclid-square/EuclidSquare-Regular-WebS.woff +0 -0
  40. /package/dist/{core → assets}/fonts/euclid-square/EuclidSquare-RegularItalic-WebS.woff +0 -0
  41. /package/dist/{core → assets}/fonts/euclid-square/EuclidSquare-Semibold-WebS.woff +0 -0
  42. /package/dist/{core → assets}/fonts/euclid-square/EuclidSquare-SemiboldItalic-WebS.woff +0 -0
  43. /package/dist/{core → assets}/fonts/fonts.css +0 -0
  44. /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-Bold.woff +0 -0
  45. /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-BoldItalic.woff +0 -0
  46. /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-ExtraLight.woff +0 -0
  47. /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-ExtraLightItalic.woff +0 -0
  48. /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-Italic.woff +0 -0
  49. /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-Light.woff +0 -0
  50. /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-LightItalic.woff +0 -0
  51. /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-Medium.woff +0 -0
  52. /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-MediumItalic.woff +0 -0
  53. /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-Regular.woff +0 -0
  54. /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-SemiBold.woff +0 -0
  55. /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-SemiBoldItalic.woff +0 -0
  56. /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-Text.woff +0 -0
  57. /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-TextItalic.woff +0 -0
  58. /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-Thin.woff +0 -0
  59. /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-ThinItalic.woff +0 -0
  60. /package/dist/{core → assets}/fonts/ibm-plex-mono/license.txt +0 -0
  61. /package/dist/{core → assets}/mantle.css +0 -0
  62. /package/dist/{back-to-top-button → dts/back-to-top-button}/index.d.ts +0 -0
  63. /package/dist/{button → dts/button}/index.d.ts +0 -0
  64. /package/dist/{card → dts/card}/index.d.ts +0 -0
  65. /package/dist/{cx → dts/cx}/index.d.ts +0 -0
  66. /package/dist/{dropdown-menu → dts/dropdown-menu}/index.d.ts +0 -0
  67. /package/dist/{hooks → dts/hooks}/use-matches-media-query.d.ts +0 -0
  68. /package/dist/{hooks → dts/hooks}/use-prefers-reduced-motion.d.ts +0 -0
  69. /package/dist/{types/input.d.ts → dts/input/types.d.ts} +0 -0
  70. /package/dist/{portal → dts/portal}/index.d.ts +0 -0
  71. /package/dist/{select → dts/select}/index.d.ts +0 -0
  72. /package/dist/{tooltip → dts/tooltip}/index.d.ts +0 -0
  73. /package/dist/{types → dts/types}/as-child.d.ts +0 -0
  74. /package/dist/{types → dts/types}/deep-non-nullable.d.ts +0 -0
  75. /package/dist/{types → dts/types}/variant-props.d.ts +0 -0
  76. /package/dist/{types → dts/types}/with-style-props.d.ts +0 -0
package/dist/index.js ADDED
@@ -0,0 +1,547 @@
1
+ /**
2
+ * @ngrok/mantle v0.0.1-alpha.11
3
+ *
4
+ * Copyright (c) ngrok.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE.md file in the root directory of this source tree.
8
+ *
9
+ * @license MIT
10
+ */
11
+ import { jsx, jsxs } from 'react/jsx-runtime';
12
+ import { forwardRef, useState, useEffect, useMemo, useContext, createContext } from 'react';
13
+ import { Slot } from '@radix-ui/react-slot';
14
+ import { cva } from 'class-variance-authority';
15
+ import { clsx } from 'clsx';
16
+ import { twMerge } from 'tailwind-merge';
17
+ import { CaretSortIcon, CheckIcon } from '@radix-ui/react-icons';
18
+ import { Trigger, Content, Label, Item, Separator, Root, Group, Value, Icon, Portal, Viewport, ItemIndicator, ItemText } from '@radix-ui/react-select';
19
+ import invariant from 'tiny-invariant';
20
+ import { Content as Content$1, Provider, Root as Root$1, Trigger as Trigger$1 } from '@radix-ui/react-tooltip';
21
+
22
+ function _extends() {
23
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
24
+ for (var i = 1; i < arguments.length; i++) {
25
+ var source = arguments[i];
26
+ for (var key in source) {
27
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
28
+ target[key] = source[key];
29
+ }
30
+ }
31
+ }
32
+ return target;
33
+ };
34
+ return _extends.apply(this, arguments);
35
+ }
36
+ function _objectWithoutPropertiesLoose(source, excluded) {
37
+ if (source == null) return {};
38
+ var target = {};
39
+ var sourceKeys = Object.keys(source);
40
+ var key, i;
41
+ for (i = 0; i < sourceKeys.length; i++) {
42
+ key = sourceKeys[i];
43
+ if (excluded.indexOf(key) >= 0) continue;
44
+ target[key] = source[key];
45
+ }
46
+ return target;
47
+ }
48
+
49
+ /**
50
+ * Conditionally add Tailwind (and other) CSS classes.
51
+ *
52
+ * Allows for tailwind overrides in LTR-specificity-like order of applied classes.
53
+ */
54
+ function cx() {
55
+ for (var _len = arguments.length, inputs = new Array(_len), _key = 0; _key < _len; _key++) {
56
+ inputs[_key] = arguments[_key];
57
+ }
58
+ return twMerge(clsx(inputs));
59
+ }
60
+
61
+ var _excluded$4 = ["className", "priority", "size", "state", "asChild"];
62
+ var buttonVariants = cva("inline-flex items-center justify-center rounded-md font-medium border transition-colors focus-visible:outline-none focus-visible:ring-4 disabled:pointer-events-none disabled:opacity-50", {
63
+ variants: {
64
+ priority: {
65
+ default: "border-blue-500 text-blue-500 bg-white hover:bg-blue-50 active:bg-blue-100 focus-visible:ring-blue-600/25",
66
+ primary: "bg-blue-500 text-button hover:bg-blue-600 active:bg-blue-700 focus-visible:ring-blue-600/25",
67
+ secondary: "bg-blue-50 border-blue-200 text-blue-900 hover:bg-blue-100 active:bg-blue-200 focus-visible:ring-blue-600/25"
68
+ },
69
+ state: {
70
+ default: "",
71
+ danger: ""
72
+ },
73
+ size: {
74
+ default: "h-10 px-4 py-2",
75
+ sm: "h-9 rounded-md px-3 text-sm",
76
+ lg: "h-12 rounded-md px-6 text-lg"
77
+ }
78
+ },
79
+ defaultVariants: {
80
+ priority: "default",
81
+ size: "default"
82
+ },
83
+ compoundVariants: [{
84
+ priority: "default",
85
+ state: "danger",
86
+ class: "border-red-500 text-red-500 hover:bg-red-50 active:bg-red-100 focus-visible:ring-red-600/25"
87
+ }, {
88
+ priority: "primary",
89
+ state: "danger",
90
+ class: "bg-red-500 hover:bg-red-600 active:bg-red-700 focus-visible:ring-red-600/25"
91
+ }, {
92
+ priority: "secondary",
93
+ state: "danger",
94
+ class: "bg-red-50 border-red-200 text-red-900 hover:bg-red-100 active:bg-red-200 focus-visible:ring-red-600/25"
95
+ }]
96
+ });
97
+ /**
98
+ * Renders a button or a component that looks like a button, an interactive
99
+ * element activated by a user with a mouse, keyboard, finger, voice command, or
100
+ * other assistive technology. Once activated, it then performs an action, such
101
+ * as submitting a form or opening a dialog.
102
+ *
103
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button
104
+ */
105
+ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
106
+ var className = _ref.className,
107
+ _ref$priority = _ref.priority,
108
+ priority = _ref$priority === void 0 ? "default" : _ref$priority,
109
+ _ref$size = _ref.size,
110
+ size = _ref$size === void 0 ? "default" : _ref$size,
111
+ _ref$state = _ref.state,
112
+ state = _ref$state === void 0 ? "default" : _ref$state,
113
+ _ref$asChild = _ref.asChild,
114
+ asChild = _ref$asChild === void 0 ? false : _ref$asChild,
115
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$4);
116
+ var Comp = asChild ? Slot : "button";
117
+ return jsx(Comp, _extends({
118
+ className: cx(buttonVariants({
119
+ priority: priority,
120
+ size: size,
121
+ state: state,
122
+ className: className
123
+ })),
124
+ ref: ref
125
+ }, props));
126
+ });
127
+ Button.displayName = "Button";
128
+
129
+ var _excluded$3 = ["className", "children"],
130
+ _excluded2$1 = ["className", "children"],
131
+ _excluded3$1 = ["className", "children"],
132
+ _excluded4$1 = ["className", "children"],
133
+ _excluded5$1 = ["className", "asChild"];
134
+ /**
135
+ * A container that can be used to display content in a box resembling a playing
136
+ * card.
137
+ */
138
+ var Card = /*#__PURE__*/forwardRef(function (_ref, ref) {
139
+ var className = _ref.className,
140
+ children = _ref.children,
141
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$3);
142
+ return jsx("div", _extends({
143
+ ref: ref,
144
+ className: cx("relative rounded border bg-white", className)
145
+ }, rest, {
146
+ children: children
147
+ }));
148
+ });
149
+ Card.displayName = "Card";
150
+ /**
151
+ * The main content of a card. Usually composed as a direct child of a `Card` component.
152
+ */
153
+ var CardBody = /*#__PURE__*/forwardRef(function (_ref2, ref) {
154
+ var className = _ref2.className,
155
+ children = _ref2.children,
156
+ rest = _objectWithoutPropertiesLoose(_ref2, _excluded2$1);
157
+ return jsx("div", _extends({
158
+ ref: ref,
159
+ className: cx("p-6", className)
160
+ }, rest, {
161
+ children: children
162
+ }));
163
+ });
164
+ CardBody.displayName = "CardBody";
165
+ /**
166
+ * The footer container of a card. Usually composed as a direct child of a `Card` component.
167
+ */
168
+ var CardFooter = /*#__PURE__*/forwardRef(function (_ref3, ref) {
169
+ var className = _ref3.className,
170
+ children = _ref3.children,
171
+ rest = _objectWithoutPropertiesLoose(_ref3, _excluded3$1);
172
+ return jsx("div", _extends({
173
+ ref: ref,
174
+ className: cx("border-t px-6 py-3", className)
175
+ }, rest, {
176
+ children: children
177
+ }));
178
+ });
179
+ CardFooter.displayName = "CardFooter";
180
+ /**
181
+ * The header container of a card. Usually composed as a direct child of a `Card` component.
182
+ */
183
+ var CardHeader = /*#__PURE__*/forwardRef(function (_ref4, ref) {
184
+ var className = _ref4.className,
185
+ children = _ref4.children,
186
+ rest = _objectWithoutPropertiesLoose(_ref4, _excluded4$1);
187
+ return jsx("div", _extends({
188
+ ref: ref,
189
+ className: cx("border-b px-6 py-3", className)
190
+ }, rest, {
191
+ children: children
192
+ }));
193
+ });
194
+ CardHeader.displayName = "CardHeader";
195
+ /**
196
+ * The title of a card. Usually composed as a direct child of a `CardHeader` component.
197
+ */
198
+ var CardTitle = /*#__PURE__*/forwardRef(function (_ref5, ref) {
199
+ var className = _ref5.className,
200
+ asChild = _ref5.asChild,
201
+ props = _objectWithoutPropertiesLoose(_ref5, _excluded5$1);
202
+ var Comp = asChild ? Slot : "h3";
203
+ return jsx(Comp, _extends({
204
+ ref: ref,
205
+ className: cx("font-semibold leading-none tracking-tight", className)
206
+ }, props));
207
+ });
208
+ CardTitle.displayName = "CardTitle";
209
+
210
+ var _excluded$2 = ["className", "state", "type"];
211
+ var inputVariants = cva("flex h-10 w-full rounded-md border bg-white px-3 py-2 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-4 disabled:cursor-not-allowed disabled:opacity-50", {
212
+ variants: {
213
+ state: {
214
+ default: "text-gray-900 border-gray-300 placeholder:text-gray-400 focus:border-blue-500 focus-visible:ring-blue-600/25",
215
+ danger: "text-red-900 border-red-500 placeholder:text-red-400 focus:border-red-500 focus-visible:ring-red-600/25",
216
+ success: "text-green-900 border-green-500 placeholder:text-green-400 focus:border-green-500 focus-visible:ring-green-600/25"
217
+ }
218
+ },
219
+ defaultVariants: {
220
+ state: "default"
221
+ }
222
+ });
223
+ /**
224
+ * Used to create interactive controls for web-based forms in order to accept data from the user
225
+ */
226
+ var Input = /*#__PURE__*/forwardRef(function (_ref, ref) {
227
+ var className = _ref.className,
228
+ _ref$state = _ref.state,
229
+ state = _ref$state === void 0 ? "default" : _ref$state,
230
+ _ref$type = _ref.type,
231
+ type = _ref$type === void 0 ? "text" : _ref$type,
232
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
233
+ return jsx("input", _extends({
234
+ className: cx(inputVariants({
235
+ state: state
236
+ }), className),
237
+ ref: ref,
238
+ type: type
239
+ }, props));
240
+ });
241
+ Input.displayName = "Input";
242
+
243
+ /**
244
+ * The media object is an image/icon (media) to the left, with descriptive
245
+ * content (title and subtitle/description) to the right.
246
+ *
247
+ * Change the spacing between the media and content by passing a `gap-*` class.
248
+ * The default gap is `gap-4`.
249
+ *
250
+ * Use flexbox utilities to change the alignment of the media and content.
251
+ *
252
+ * Compose the media object with the `MediaObjectMedia` and `MediaObjectContent`
253
+ * components as direct children.
254
+ */
255
+ var MediaObject = /*#__PURE__*/forwardRef(function (_ref, ref) {
256
+ var className = _ref.className,
257
+ children = _ref.children,
258
+ style = _ref.style;
259
+ return jsx("div", {
260
+ ref: ref,
261
+ className: cx("flex gap-4", className),
262
+ style: style,
263
+ children: children
264
+ });
265
+ });
266
+ MediaObject.displayName = "MediaObject";
267
+ /**
268
+ * The container for an image or icon to display in the media slot of the media object.
269
+ */
270
+ var MediaObjectMedia = /*#__PURE__*/forwardRef(function (_ref2, ref) {
271
+ var className = _ref2.className,
272
+ children = _ref2.children,
273
+ style = _ref2.style;
274
+ return jsx("div", {
275
+ ref: ref,
276
+ className: cx("shrink-0 leading-none", className),
277
+ style: style,
278
+ children: children
279
+ });
280
+ });
281
+ MediaObjectMedia.displayName = "MediaObjectMedia";
282
+ /**
283
+ * The container for the content slot of a media object.
284
+ */
285
+ var MediaObjectContent = /*#__PURE__*/forwardRef(function (_ref3, ref) {
286
+ var className = _ref3.className,
287
+ children = _ref3.children,
288
+ style = _ref3.style;
289
+ return jsx("div", {
290
+ ref: ref,
291
+ className: cx("min-w-0 flex-1", className),
292
+ style: style,
293
+ children: children
294
+ });
295
+ });
296
+ MediaObjectContent.displayName = "MediaObjectContent";
297
+
298
+ var _excluded$1 = ["className", "children", "hideIcon"],
299
+ _excluded2 = ["className", "children", "position"],
300
+ _excluded3 = ["className"],
301
+ _excluded4 = ["className", "children"],
302
+ _excluded5 = ["className"];
303
+ var Select = Root;
304
+ var SelectGroup = Group;
305
+ var SelectValue = Value;
306
+ var SelectIcon = Icon;
307
+ var SelectTrigger = /*#__PURE__*/forwardRef(function (_ref, ref) {
308
+ var className = _ref.className,
309
+ children = _ref.children,
310
+ _ref$hideIcon = _ref.hideIcon,
311
+ hideIcon = _ref$hideIcon === void 0 ? false : _ref$hideIcon,
312
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
313
+ return jsxs(Trigger, _extends({
314
+ ref: ref,
315
+ className: cx("flex h-10 w-full items-center justify-between rounded-md border border-gray-500 bg-white px-3 py-2 placeholder:text-gray-300 focus:border-blue-500 focus:outline-none focus:ring-4 focus:ring-blue-600/25 disabled:cursor-not-allowed disabled:opacity-50", className)
316
+ }, props, {
317
+ children: [children, !hideIcon && jsx(Icon, {
318
+ asChild: true,
319
+ children: jsx(CaretSortIcon, {
320
+ className: "h-4 w-4 opacity-50"
321
+ })
322
+ })]
323
+ }));
324
+ });
325
+ SelectTrigger.displayName = Trigger.displayName;
326
+ var SelectContent = /*#__PURE__*/forwardRef(function (_ref2, ref) {
327
+ var className = _ref2.className,
328
+ children = _ref2.children,
329
+ _ref2$position = _ref2.position,
330
+ position = _ref2$position === void 0 ? "popper" : _ref2$position,
331
+ props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
332
+ return jsx(Portal, {
333
+ children: jsx(Content, _extends({
334
+ ref: ref,
335
+ className: cx("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-white text-gray-900 shadow-md 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", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className),
336
+ position: position
337
+ }, props, {
338
+ children: jsx(Viewport, {
339
+ className: cx("p-1", position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),
340
+ children: children
341
+ })
342
+ }))
343
+ });
344
+ });
345
+ SelectContent.displayName = Content.displayName;
346
+ var SelectLabel = /*#__PURE__*/forwardRef(function (_ref3, ref) {
347
+ var className = _ref3.className,
348
+ props = _objectWithoutPropertiesLoose(_ref3, _excluded3);
349
+ return jsx(Label, _extends({
350
+ ref: ref,
351
+ className: cx("px-2 py-1.5 text-sm font-semibold", className)
352
+ }, props));
353
+ });
354
+ SelectLabel.displayName = Label.displayName;
355
+ var SelectOption = /*#__PURE__*/forwardRef(function (_ref4, ref) {
356
+ var className = _ref4.className,
357
+ children = _ref4.children,
358
+ props = _objectWithoutPropertiesLoose(_ref4, _excluded4);
359
+ return jsxs(Item, _extends({
360
+ ref: ref,
361
+ className: cx("relative flex w-full cursor-pointer items-center rounded-sm py-1.5 pl-2 pr-2 text-sm outline-none focus:bg-blue-500 focus:text-button data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className)
362
+ }, props, {
363
+ children: [jsx("span", {
364
+ className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center",
365
+ children: jsx(ItemIndicator, {
366
+ children: jsx(CheckIcon, {
367
+ className: "h-4 w-4"
368
+ })
369
+ })
370
+ }), jsx(ItemText, {
371
+ children: children
372
+ })]
373
+ }));
374
+ });
375
+ SelectOption.displayName = Item.displayName;
376
+ var SelectSeparator = /*#__PURE__*/forwardRef(function (_ref5, ref) {
377
+ var className = _ref5.className,
378
+ props = _objectWithoutPropertiesLoose(_ref5, _excluded5);
379
+ return jsx(Separator, _extends({
380
+ ref: ref,
381
+ className: cx("-mx-1 my-1 h-px bg-muted", className)
382
+ }, props));
383
+ });
384
+ SelectSeparator.displayName = Separator.displayName;
385
+
386
+ /**
387
+ * prefersDarkModeMediaQuery is the media query used to detect if the user prefers dark mode.
388
+ */
389
+ var prefersDarkModeMediaQuery = "(prefers-color-scheme: dark)";
390
+ /**
391
+ * prefersHighContrastMediaQuery is the media query used to detect if the user prefers high contrast mode.
392
+ */
393
+ var prefersHighContrastMediaQuery = "(prefers-contrast: more)";
394
+ /**
395
+ * themes is a tuple of valid themes.
396
+ */
397
+ var themes = ["system", "light", "dark", "light-high-contrast", "dark-high-contrast"];
398
+ /**
399
+ * Type predicate that checks if a value is a valid theme.
400
+ */
401
+ function isTheme(value) {
402
+ if (typeof value !== "string") {
403
+ return false;
404
+ }
405
+ return themes.includes(value);
406
+ }
407
+ /**
408
+ * DEFAULT_STORAGE_KEY is the default key used to store the theme in localStorage.
409
+ */
410
+ var DEFAULT_STORAGE_KEY = "mantle-ui-theme";
411
+ /**
412
+ * Initial state for the ThemeProviderContext.
413
+ */
414
+ var initialState = ["system", function () {
415
+ return null;
416
+ }];
417
+ /**
418
+ * ThemeProviderContext is a React Context that provides the current theme and a function to set the theme.
419
+ */
420
+ var ThemeProviderContext = /*#__PURE__*/createContext(initialState);
421
+ /**
422
+ * isBrowser returns true if the code is running in a browser environment.
423
+ */
424
+ var isBrowser = function isBrowser() {
425
+ return typeof window !== "undefined";
426
+ };
427
+ /**
428
+ * determines the initial theme based on the default theme and the value stored in localStorage by the storageKey
429
+ */
430
+ function determineInitialTheme(defaultTheme, storageKey) {
431
+ var fallback = defaultTheme != null ? defaultTheme : "system";
432
+ if (isBrowser()) {
433
+ var _window$localStorage$;
434
+ return (_window$localStorage$ = window.localStorage.getItem(storageKey)) != null ? _window$localStorage$ : fallback;
435
+ }
436
+ return fallback;
437
+ }
438
+ /**
439
+ * ThemeProvider is a React Context Provider that provides the current theme and a function to set the theme.
440
+ */
441
+ function ThemeProvider(_ref) {
442
+ var children = _ref.children,
443
+ _ref$defaultTheme = _ref.defaultTheme,
444
+ defaultTheme = _ref$defaultTheme === void 0 ? "system" : _ref$defaultTheme,
445
+ _ref$storageKey = _ref.storageKey,
446
+ storageKey = _ref$storageKey === void 0 ? DEFAULT_STORAGE_KEY : _ref$storageKey;
447
+ var _useState = useState(function () {
448
+ var initialTheme = determineInitialTheme(defaultTheme, storageKey);
449
+ applyTheme(initialTheme);
450
+ return initialTheme;
451
+ }),
452
+ theme = _useState[0],
453
+ setTheme = _useState[1];
454
+ useEffect(function () {
455
+ var storedTheme = window.localStorage.getItem(storageKey);
456
+ if (isTheme(storedTheme)) {
457
+ setTheme(storedTheme);
458
+ applyTheme(storedTheme);
459
+ }
460
+ }, [storageKey]);
461
+ var value = useMemo(function () {
462
+ return [theme, function (theme) {
463
+ window.localStorage.setItem(storageKey, theme);
464
+ setTheme(theme);
465
+ applyTheme(theme);
466
+ }];
467
+ }, [theme, storageKey]);
468
+ return jsx(ThemeProviderContext.Provider, {
469
+ value: value,
470
+ children: children
471
+ });
472
+ }
473
+ /**
474
+ * useTheme returns the current theme and a function to set the theme.
475
+ *
476
+ * @note This function will throw an error if used outside of a ThemeProvider context tree.
477
+ */
478
+ function useTheme() {
479
+ var context = useContext(ThemeProviderContext);
480
+ !context ? process.env.NODE_ENV !== "production" ? invariant(false, "useTheme must be used within a ThemeProvider") : invariant(false) : void 0;
481
+ return context;
482
+ }
483
+ /**
484
+ * Applies the given theme to the <html> element.
485
+ */
486
+ function applyTheme(theme) {
487
+ var _htmlElement$classLis;
488
+ if (!isBrowser()) {
489
+ return;
490
+ }
491
+ var htmlElement = window.document.documentElement;
492
+ (_htmlElement$classLis = htmlElement.classList).remove.apply(_htmlElement$classLis, themes);
493
+ var prefersDarkMode = window.matchMedia(prefersDarkModeMediaQuery).matches;
494
+ var prefersContrastMore = window.matchMedia(prefersHighContrastMediaQuery).matches;
495
+ var newTheme = theme === "system" ? determineThemeFromMediaQuery({
496
+ prefersDarkMode: prefersDarkMode,
497
+ prefersContrastMore: prefersContrastMore
498
+ }) : theme;
499
+ htmlElement.classList.add(newTheme);
500
+ htmlElement.dataset.theme = newTheme;
501
+ }
502
+ /**
503
+ * determineThemeFromMediaQuery returns the theme that should be used based on the user's media query preferences.
504
+ */
505
+ function determineThemeFromMediaQuery(_ref2) {
506
+ var prefersDarkMode = _ref2.prefersDarkMode,
507
+ prefersContrastMore = _ref2.prefersContrastMore;
508
+ if (prefersContrastMore) {
509
+ return prefersDarkMode ? "dark-high-contrast" : "light-high-contrast";
510
+ }
511
+ return prefersDarkMode ? "dark" : "light";
512
+ }
513
+ /**
514
+ * PreventWrongThemeFlash is a React component that prevents the wrong theme from flashing on initial page load.
515
+ * Render as high as possible in the DOM, preferably in the <head> element.
516
+ */
517
+ var PreventWrongThemeFlash = function PreventWrongThemeFlash(_ref3) {
518
+ var _ref3$defaultTheme = _ref3.defaultTheme,
519
+ defaultTheme = _ref3$defaultTheme === void 0 ? "system" : _ref3$defaultTheme,
520
+ _ref3$storageKey = _ref3.storageKey,
521
+ storageKey = _ref3$storageKey === void 0 ? DEFAULT_STORAGE_KEY : _ref3$storageKey;
522
+ return jsx("script", {
523
+ dangerouslySetInnerHTML: {
524
+ __html: ("\n(function() {\n\tconst themes = " + JSON.stringify(themes) + ";\n\tconst isTheme = (value) => typeof value === \"string\" && themes.includes(value);\n\tconst fallbackTheme = \"" + defaultTheme + "\" ?? \"system\";\n\tconst maybeStoredTheme = window.localStorage.getItem(\"" + storageKey + "\");\n\tconst themePreference = isTheme(maybeStoredTheme) ? maybeStoredTheme : fallbackTheme;\n\tconst prefersDarkMode = window.matchMedia(\"" + prefersDarkModeMediaQuery + "\").matches;\n\tconst prefersContrastMore = window.matchMedia(\"" + prefersHighContrastMediaQuery + "\").matches;\n\tlet initialTheme = themePreference;\n\tif (initialTheme === \"system\") {\n\t\tif (prefersContrastMore) {\n\t\t\tinitialTheme = prefersDarkMode ? \"dark-high-contrast\" : \"light-high-contrast\";\n\t\t} else {\n\t\t\tinitialTheme = prefersDarkMode ? \"dark\" : \"light\";\n\t\t}\n\t}\n\tconst htmlElement = document.documentElement;\n\thtmlElement.classList.remove(...themes);\n\thtmlElement.classList.add(initialTheme);\n\thtmlElement.dataset.theme = initialTheme;\n})();\n").trim()
525
+ }
526
+ });
527
+ };
528
+
529
+ var _excluded = ["className", "sideOffset"];
530
+ var TooltipProvider = Provider;
531
+ var Tooltip = Root$1;
532
+ var TooltipTrigger = Trigger$1;
533
+ var TooltipContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
534
+ var className = _ref.className,
535
+ _ref$sideOffset = _ref.sideOffset,
536
+ sideOffset = _ref$sideOffset === void 0 ? 4 : _ref$sideOffset,
537
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
538
+ return jsx(Content$1, _extends({
539
+ ref: ref,
540
+ sideOffset: sideOffset,
541
+ className: cx("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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", className)
542
+ }, props));
543
+ });
544
+ TooltipContent.displayName = Content$1.displayName;
545
+
546
+ export { Button, Card, CardBody, CardFooter, CardHeader, CardTitle, Input, MediaObject, MediaObjectContent, MediaObjectMedia, PreventWrongThemeFlash, Select, SelectContent, SelectGroup, SelectIcon, SelectLabel, SelectOption, SelectSeparator, SelectTrigger, SelectValue, ThemeProvider, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, cx, isTheme, useTheme };
547
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../components/cx/index.ts","../components/button/index.tsx","../components/card/index.tsx","../components/input/index.tsx","../components/media-object/index.tsx","../components/select/index.tsx","../components/theme-provider/index.tsx","../components/tooltip/index.tsx"],"sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Conditionally add Tailwind (and other) CSS classes.\n *\n * Allows for tailwind overrides in LTR-specificity-like order of applied classes.\n */\nexport function cx(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","import { type ButtonHTMLAttributes, forwardRef } from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva } from \"class-variance-authority\";\n\nimport { cx } from \"../cx\";\nimport type { WithAsChild } from \"../types/as-child\";\nimport type { VariantProps } from \"../types/variant-props\";\n\nconst buttonVariants = cva(\n\t\"inline-flex items-center justify-center rounded-md font-medium border transition-colors focus-visible:outline-none focus-visible:ring-4 disabled:pointer-events-none disabled:opacity-50\",\n\t{\n\t\tvariants: {\n\t\t\tpriority: {\n\t\t\t\tdefault:\n\t\t\t\t\t\"border-blue-500 text-blue-500 bg-white hover:bg-blue-50 active:bg-blue-100 focus-visible:ring-blue-600/25\",\n\t\t\t\tprimary: \"bg-blue-500 text-button hover:bg-blue-600 active:bg-blue-700 focus-visible:ring-blue-600/25\",\n\t\t\t\tsecondary:\n\t\t\t\t\t\"bg-blue-50 border-blue-200 text-blue-900 hover:bg-blue-100 active:bg-blue-200 focus-visible:ring-blue-600/25\",\n\t\t\t},\n\t\t\tstate: {\n\t\t\t\tdefault: \"\",\n\t\t\t\tdanger: \"\",\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tdefault: \"h-10 px-4 py-2\",\n\t\t\t\tsm: \"h-9 rounded-md px-3 text-sm\",\n\t\t\t\tlg: \"h-12 rounded-md px-6 text-lg\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tpriority: \"default\",\n\t\t\tsize: \"default\",\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t{\n\t\t\t\tpriority: \"default\",\n\t\t\t\tstate: \"danger\",\n\t\t\t\tclass: \"border-red-500 text-red-500 hover:bg-red-50 active:bg-red-100 focus-visible:ring-red-600/25\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tpriority: \"primary\",\n\t\t\t\tstate: \"danger\",\n\t\t\t\tclass: \"bg-red-500 hover:bg-red-600 active:bg-red-700 focus-visible:ring-red-600/25\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tpriority: \"secondary\",\n\t\t\t\tstate: \"danger\",\n\t\t\t\tclass: \"bg-red-50 border-red-200 text-red-900 hover:bg-red-100 active:bg-red-200 focus-visible:ring-red-600/25\",\n\t\t\t},\n\t\t],\n\t},\n);\n\ntype ButtonVariants = VariantProps<typeof buttonVariants>;\n\n/**\n * The props for the `Button` component.\n */\nexport type ButtonProps = WithAsChild & ButtonHTMLAttributes<HTMLButtonElement> & ButtonVariants;\n\n/**\n * Renders a button or a component that looks like a button, an interactive\n * element activated by a user with a mouse, keyboard, finger, voice command, or\n * other assistive technology. Once activated, it then performs an action, such\n * as submitting a form or opening a dialog.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button\n */\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>(\n\t({ className, priority = \"default\", size = \"default\", state = \"default\", asChild = false, ...props }, ref) => {\n\t\tconst Comp = asChild ? Slot : \"button\";\n\n\t\treturn <Comp className={cx(buttonVariants({ priority, size, state, className }))} ref={ref} {...props} />;\n\t},\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import type { HTMLAttributes } from \"react\";\nimport { forwardRef } from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\nimport { cx } from \"../cx\";\nimport type { WithAsChild } from \"../types/as-child\";\n\nexport type CardProps = HTMLAttributes<HTMLDivElement>;\n\n/**\n * A container that can be used to display content in a box resembling a playing\n * card.\n */\nexport const Card = forwardRef<HTMLDivElement, CardProps>(({ className, children, ...rest }, ref) => (\n\t<div ref={ref} className={cx(\"relative rounded border bg-white\", className)} {...rest}>\n\t\t{children}\n\t</div>\n));\nCard.displayName = \"Card\";\n\n/**\n * The main content of a card. Usually composed as a direct child of a `Card` component.\n */\nexport const CardBody = forwardRef<HTMLDivElement, CardProps>(({ className, children, ...rest }, ref) => (\n\t<div ref={ref} className={cx(\"p-6\", className)} {...rest}>\n\t\t{children}\n\t</div>\n));\nCardBody.displayName = \"CardBody\";\n\n/**\n * The footer container of a card. Usually composed as a direct child of a `Card` component.\n */\nexport const CardFooter = forwardRef<HTMLDivElement, CardProps>(({ className, children, ...rest }, ref) => (\n\t<div ref={ref} className={cx(\"border-t px-6 py-3\", className)} {...rest}>\n\t\t{children}\n\t</div>\n));\nCardFooter.displayName = \"CardFooter\";\n\n/**\n * The header container of a card. Usually composed as a direct child of a `Card` component.\n */\nexport const CardHeader = forwardRef<HTMLDivElement, CardProps>(({ className, children, ...rest }, ref) => (\n\t<div ref={ref} className={cx(\"border-b px-6 py-3\", className)} {...rest}>\n\t\t{children}\n\t</div>\n));\nCardHeader.displayName = \"CardHeader\";\n\nexport type CardTitleProps = HTMLAttributes<HTMLHeadingElement> & WithAsChild;\n\n/**\n * The title of a card. Usually composed as a direct child of a `CardHeader` component.\n */\nexport const CardTitle = forwardRef<HTMLParagraphElement, CardTitleProps>(({ className, asChild, ...props }, ref) => {\n\tconst Comp = asChild ? Slot : \"h3\";\n\treturn <Comp ref={ref} className={cx(\"font-semibold leading-none tracking-tight\", className)} {...props} />;\n});\nCardTitle.displayName = \"CardTitle\";\n","import type { InputHTMLAttributes } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cva } from \"class-variance-authority\";\n\nimport { cx } from \"../cx\";\nimport type { VariantProps } from \"../types/variant-props\";\nimport type { AutoComplete, InputType } from \"./types\";\n\nconst inputVariants = cva(\n\t\"flex h-10 w-full rounded-md border bg-white px-3 py-2 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-4 disabled:cursor-not-allowed disabled:opacity-50\",\n\t{\n\t\tvariants: {\n\t\t\tstate: {\n\t\t\t\tdefault:\n\t\t\t\t\t\"text-gray-900 border-gray-300 placeholder:text-gray-400 focus:border-blue-500 focus-visible:ring-blue-600/25\",\n\t\t\t\tdanger:\n\t\t\t\t\t\"text-red-900 border-red-500 placeholder:text-red-400 focus:border-red-500 focus-visible:ring-red-600/25\",\n\t\t\t\tsuccess:\n\t\t\t\t\t\"text-green-900 border-green-500 placeholder:text-green-400 focus:border-green-500 focus-visible:ring-green-600/25\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tstate: \"default\",\n\t\t},\n\t},\n);\n\ntype InputVariants = VariantProps<typeof inputVariants>;\n\n/**\n * The props for the `Input` component.\n */\nexport type InputProps = InputVariants &\n\tOmit<InputHTMLAttributes<HTMLInputElement>, \"autoComplete\" | \"type\"> & {\n\t\tautoComplete?: AutoComplete;\n\t\ttype?: InputType;\n\t};\n\n/**\n * Used to create interactive controls for web-based forms in order to accept data from the user\n */\nconst Input = forwardRef<HTMLInputElement, InputProps>(\n\t({ className, state = \"default\", type = \"text\", ...props }, ref) => {\n\t\treturn <input className={cx(inputVariants({ state }), className)} ref={ref} type={type} {...props} />;\n\t},\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n","import { forwardRef } from \"react\";\nimport type { HTMLAttributes } from \"react\";\n\nimport { cx } from \"../cx\";\n\n/**\n * The media object is an image/icon (media) to the left, with descriptive\n * content (title and subtitle/description) to the right.\n *\n * Change the spacing between the media and content by passing a `gap-*` class.\n * The default gap is `gap-4`.\n *\n * Use flexbox utilities to change the alignment of the media and content.\n *\n * Compose the media object with the `MediaObjectMedia` and `MediaObjectContent`\n * components as direct children.\n */\nconst MediaObject = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n\t({ className, children, style }, ref) => (\n\t\t<div ref={ref} className={cx(\"flex gap-4\", className)} style={style}>\n\t\t\t{children}\n\t\t</div>\n\t),\n);\nMediaObject.displayName = \"MediaObject\";\n\n/**\n * The container for an image or icon to display in the media slot of the media object.\n */\nconst MediaObjectMedia = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n\t({ className, children, style }, ref) => (\n\t\t<div ref={ref} className={cx(\"shrink-0 leading-none\", className)} style={style}>\n\t\t\t{children}\n\t\t</div>\n\t),\n);\nMediaObjectMedia.displayName = \"MediaObjectMedia\";\n\n/**\n * The container for the content slot of a media object.\n */\nconst MediaObjectContent = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n\t({ className, children, style }, ref) => (\n\t\t<div ref={ref} className={cx(\"min-w-0 flex-1\", className)} style={style}>\n\t\t\t{children}\n\t\t</div>\n\t),\n);\nMediaObjectContent.displayName = \"MediaObjectContent\";\n\nexport { MediaObject, MediaObjectMedia, MediaObjectContent };\n","import { CaretSortIcon, CheckIcon } from \"@radix-ui/react-icons\";\nimport {\n\tRoot,\n\tGroup,\n\tValue,\n\tTrigger,\n\tIcon,\n\tContent,\n\tPortal,\n\tViewport,\n\tLabel,\n\tItem,\n\tItemIndicator,\n\tItemText,\n\tSeparator,\n} from \"@radix-ui/react-select\";\n\nimport type { ComponentPropsWithoutRef, ElementRef } from \"react\";\nimport { forwardRef } from \"react\";\n\nimport { cx } from \"../cx\";\n\nconst Select = Root;\n\nconst SelectGroup = Group;\n\nconst SelectValue = Value;\n\nconst SelectIcon = Icon;\n\nconst SelectTrigger = forwardRef<\n\tElementRef<typeof Trigger>,\n\tComponentPropsWithoutRef<typeof Trigger> & { hideIcon?: boolean }\n>(({ className, children, hideIcon = false, ...props }, ref) => (\n\t<Trigger\n\t\tref={ref}\n\t\tclassName={cx(\n\t\t\t\"flex h-10 w-full items-center justify-between rounded-md border border-gray-500 bg-white px-3 py-2 placeholder:text-gray-300 focus:border-blue-500 focus:outline-none focus:ring-4 focus:ring-blue-600/25 disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t{children}\n\t\t{!hideIcon && (\n\t\t\t<Icon asChild>\n\t\t\t\t<CaretSortIcon className=\"h-4 w-4 opacity-50\" />\n\t\t\t</Icon>\n\t\t)}\n\t</Trigger>\n));\nSelectTrigger.displayName = Trigger.displayName;\n\nconst SelectContent = forwardRef<ElementRef<typeof Content>, ComponentPropsWithoutRef<typeof Content>>(\n\t({ className, children, position = \"popper\", ...props }, ref) => (\n\t\t<Portal>\n\t\t\t<Content\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cx(\n\t\t\t\t\t\"relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-white text-gray-900 shadow-md 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\",\n\t\t\t\t\tposition === \"popper\" &&\n\t\t\t\t\t\t\"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tposition={position}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<Viewport\n\t\t\t\t\tclassName={cx(\n\t\t\t\t\t\t\"p-1\",\n\t\t\t\t\t\tposition === \"popper\" &&\n\t\t\t\t\t\t\t\"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\",\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</Viewport>\n\t\t\t</Content>\n\t\t</Portal>\n\t),\n);\nSelectContent.displayName = Content.displayName;\n\nconst SelectLabel = forwardRef<ElementRef<typeof Label>, ComponentPropsWithoutRef<typeof Label>>(\n\t({ className, ...props }, ref) => (\n\t\t<Label ref={ref} className={cx(\"px-2 py-1.5 text-sm font-semibold\", className)} {...props} />\n\t),\n);\nSelectLabel.displayName = Label.displayName;\n\nconst SelectOption = forwardRef<ElementRef<typeof Item>, ComponentPropsWithoutRef<typeof Item>>(\n\t({ className, children, ...props }, ref) => (\n\t\t<Item\n\t\t\tref={ref}\n\t\t\tclassName={cx(\n\t\t\t\t\"relative flex w-full cursor-pointer items-center rounded-sm py-1.5 pl-2 pr-2 text-sm outline-none focus:bg-blue-500 focus:text-button data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className=\"absolute right-2 flex h-3.5 w-3.5 items-center justify-center\">\n\t\t\t\t<ItemIndicator>\n\t\t\t\t\t<CheckIcon className=\"h-4 w-4\" />\n\t\t\t\t</ItemIndicator>\n\t\t\t</span>\n\t\t\t<ItemText>{children}</ItemText>\n\t\t</Item>\n\t),\n);\nSelectOption.displayName = Item.displayName;\n\nconst SelectSeparator = forwardRef<ElementRef<typeof Separator>, ComponentPropsWithoutRef<typeof Separator>>(\n\t({ className, ...props }, ref) => (\n\t\t<Separator ref={ref} className={cx(\"-mx-1 my-1 h-px bg-muted\", className)} {...props} />\n\t),\n);\nSelectSeparator.displayName = Separator.displayName;\n\nexport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectIcon,\n\tSelectLabel,\n\tSelectOption,\n\tSelectSeparator,\n\tSelectTrigger,\n\tSelectValue,\n};\n","import type { PropsWithChildren } from \"react\";\nimport { createContext, useContext, useEffect, useMemo, useState } from \"react\";\nimport invariant from \"tiny-invariant\";\n\n/**\n * prefersDarkModeMediaQuery is the media query used to detect if the user prefers dark mode.\n */\nconst prefersDarkModeMediaQuery = \"(prefers-color-scheme: dark)\" as const;\n\n/**\n * prefersHighContrastMediaQuery is the media query used to detect if the user prefers high contrast mode.\n */\nconst prefersHighContrastMediaQuery = \"(prefers-contrast: more)\" as const;\n\n/**\n * themes is a tuple of valid themes.\n */\nconst themes = [\"system\", \"light\", \"dark\", \"light-high-contrast\", \"dark-high-contrast\"] as const;\n\n/**\n * Theme is a string literal type that represents a valid theme.\n */\ntype Theme = (typeof themes)[number];\n\n/**\n * theme is a helper which translates the Theme type into a string literal type.\n */\nexport const theme = (value: Theme) => value;\n\n/**\n * Type predicate that checks if a value is a valid theme.\n */\nfunction isTheme(value: unknown): value is Theme {\n\tif (typeof value !== \"string\") {\n\t\treturn false;\n\t}\n\n\treturn themes.includes(value as Theme);\n}\n\n/**\n * DEFAULT_STORAGE_KEY is the default key used to store the theme in localStorage.\n */\nconst DEFAULT_STORAGE_KEY = \"mantle-ui-theme\" as const;\n\n/**\n * ThemeProviderState is the shape of the state returned by the ThemeProviderContext.\n */\ntype ThemeProviderState = [theme: Theme, setTheme: (theme: Theme) => void];\n\n/**\n * Initial state for the ThemeProviderContext.\n */\nconst initialState: ThemeProviderState = [\"system\", () => null];\n\n/**\n * ThemeProviderContext is a React Context that provides the current theme and a function to set the theme.\n */\nconst ThemeProviderContext = createContext<ThemeProviderState>(initialState);\n\n/**\n * isBrowser returns true if the code is running in a browser environment.\n */\nconst isBrowser = () => typeof window !== \"undefined\";\n\n/**\n * determines the initial theme based on the default theme and the value stored in localStorage by the storageKey\n */\nfunction determineInitialTheme(defaultTheme: Theme, storageKey: string) {\n\tconst fallback = defaultTheme ?? \"system\";\n\tif (isBrowser()) {\n\t\treturn (window.localStorage.getItem(storageKey) as Theme | null) ?? fallback;\n\t}\n\treturn fallback;\n}\n\ntype ThemeProviderProps = PropsWithChildren & {\n\tdefaultTheme?: Theme;\n\tstorageKey?: string;\n};\n\n/**\n * ThemeProvider is a React Context Provider that provides the current theme and a function to set the theme.\n */\nfunction ThemeProvider({ children, defaultTheme = \"system\", storageKey = DEFAULT_STORAGE_KEY }: ThemeProviderProps) {\n\tconst [theme, setTheme] = useState<Theme>(() => {\n\t\tconst initialTheme = determineInitialTheme(defaultTheme, storageKey);\n\t\tapplyTheme(initialTheme);\n\t\treturn initialTheme;\n\t});\n\n\tuseEffect(() => {\n\t\tconst storedTheme = window.localStorage.getItem(storageKey) as Theme | null;\n\t\tif (isTheme(storedTheme)) {\n\t\t\tsetTheme(storedTheme);\n\t\t\tapplyTheme(storedTheme);\n\t\t}\n\t}, [storageKey]);\n\n\tconst value: ThemeProviderState = useMemo(\n\t\t() => [\n\t\t\ttheme,\n\t\t\t(theme: Theme) => {\n\t\t\t\twindow.localStorage.setItem(storageKey, theme);\n\t\t\t\tsetTheme(theme);\n\t\t\t\tapplyTheme(theme);\n\t\t\t},\n\t\t],\n\t\t[theme, storageKey],\n\t);\n\n\treturn <ThemeProviderContext.Provider value={value}>{children}</ThemeProviderContext.Provider>;\n}\n\n/**\n * useTheme returns the current theme and a function to set the theme.\n *\n * @note This function will throw an error if used outside of a ThemeProvider context tree.\n */\nfunction useTheme() {\n\tconst context = useContext(ThemeProviderContext);\n\n\tinvariant(context, \"useTheme must be used within a ThemeProvider\");\n\n\treturn context;\n}\n\n/**\n * Applies the given theme to the <html> element.\n */\nfunction applyTheme(theme: Theme) {\n\tif (!isBrowser()) {\n\t\treturn;\n\t}\n\n\tconst htmlElement = window.document.documentElement;\n\thtmlElement.classList.remove(...themes);\n\tconst prefersDarkMode = window.matchMedia(prefersDarkModeMediaQuery).matches;\n\tconst prefersContrastMore = window.matchMedia(prefersHighContrastMediaQuery).matches;\n\tconst newTheme = theme === \"system\" ? determineThemeFromMediaQuery({ prefersDarkMode, prefersContrastMore }) : theme;\n\thtmlElement.classList.add(newTheme);\n\thtmlElement.dataset.theme = newTheme;\n}\n\n/**\n * determineThemeFromMediaQuery returns the theme that should be used based on the user's media query preferences.\n */\nexport function determineThemeFromMediaQuery({\n\tprefersDarkMode,\n\tprefersContrastMore,\n}: {\n\tprefersDarkMode: boolean;\n\tprefersContrastMore: boolean;\n}) {\n\tif (prefersContrastMore) {\n\t\treturn prefersDarkMode ? \"dark-high-contrast\" : \"light-high-contrast\";\n\t}\n\n\treturn prefersDarkMode ? \"dark\" : \"light\";\n}\n\n/**\n * PreventWrongThemeFlash is a React component that prevents the wrong theme from flashing on initial page load.\n * Render as high as possible in the DOM, preferably in the <head> element.\n */\nconst PreventWrongThemeFlash = ({\n\tdefaultTheme = \"system\",\n\tstorageKey = DEFAULT_STORAGE_KEY,\n}: {\n\tdefaultTheme?: Theme;\n\tstorageKey?: string;\n}) => (\n\t<script\n\t\tdangerouslySetInnerHTML={{\n\t\t\t__html: `\n(function() {\n\tconst themes = ${JSON.stringify(themes)};\n\tconst isTheme = (value) => typeof value === \"string\" && themes.includes(value);\n\tconst fallbackTheme = \"${defaultTheme}\" ?? \"system\";\n\tconst maybeStoredTheme = window.localStorage.getItem(\"${storageKey}\");\n\tconst themePreference = isTheme(maybeStoredTheme) ? maybeStoredTheme : fallbackTheme;\n\tconst prefersDarkMode = window.matchMedia(\"${prefersDarkModeMediaQuery}\").matches;\n\tconst prefersContrastMore = window.matchMedia(\"${prefersHighContrastMediaQuery}\").matches;\n\tlet initialTheme = themePreference;\n\tif (initialTheme === \"system\") {\n\t\tif (prefersContrastMore) {\n\t\t\tinitialTheme = prefersDarkMode ? \"dark-high-contrast\" : \"light-high-contrast\";\n\t\t} else {\n\t\t\tinitialTheme = prefersDarkMode ? \"dark\" : \"light\";\n\t\t}\n\t}\n\tconst htmlElement = document.documentElement;\n\thtmlElement.classList.remove(...themes);\n\thtmlElement.classList.add(initialTheme);\n\thtmlElement.dataset.theme = initialTheme;\n})();\n`.trim(),\n\t\t}}\n\t/>\n);\n\nexport type { Theme, ThemeProviderProps };\nexport { ThemeProvider, PreventWrongThemeFlash, isTheme, useTheme };\n","import { Provider, Root, Trigger, Content } from \"@radix-ui/react-tooltip\";\n\nimport { cx } from \"../cx\";\nimport { ComponentPropsWithoutRef, ElementRef, forwardRef } from \"react\";\n\nconst TooltipProvider = Provider;\n\nconst Tooltip = Root;\n\nconst TooltipTrigger = Trigger;\n\nconst TooltipContent = forwardRef<ElementRef<typeof Content>, ComponentPropsWithoutRef<typeof Content>>(\n\t({ className, sideOffset = 4, ...props }, ref) => (\n\t\t<Content\n\t\t\tref={ref}\n\t\t\tsideOffset={sideOffset}\n\t\t\tclassName={cx(\n\t\t\t\t\"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t),\n);\nTooltipContent.displayName = Content.displayName;\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };\n"],"names":["cx","_len","arguments","length","inputs","Array","_key","twMerge","clsx","buttonVariants","cva","variants","priority","default","primary","secondary","state","danger","size","sm","lg","defaultVariants","compoundVariants","class","Button","forwardRef","_ref","ref","className","_ref$priority","_ref$size","_ref$state","_ref$asChild","asChild","props","_objectWithoutPropertiesLoose","_excluded","Comp","Slot","_jsx","_extends","displayName","Card","children","rest","CardBody","_ref2","_excluded2","CardFooter","_ref3","_excluded3","CardHeader","_ref4","_excluded4","CardTitle","_ref5","_excluded5","inputVariants","success","Input","_ref$type","type","MediaObject","style","MediaObjectMedia","MediaObjectContent","Select","Root","SelectGroup","Group","SelectValue","Value","SelectIcon","Icon","SelectTrigger","_ref$hideIcon","hideIcon","_jsxs","Trigger","CaretSortIcon","SelectContent","_ref2$position","position","Portal","Content","Viewport","SelectLabel","Label","SelectOption","Item","ItemIndicator","CheckIcon","ItemText","SelectSeparator","Separator","prefersDarkModeMediaQuery","prefersHighContrastMediaQuery","themes","isTheme","value","includes","DEFAULT_STORAGE_KEY","initialState","ThemeProviderContext","createContext","isBrowser","window","determineInitialTheme","defaultTheme","storageKey","fallback","_window$localStorage$","localStorage","getItem","ThemeProvider","_ref$defaultTheme","_ref$storageKey","_useState","useState","initialTheme","applyTheme","theme","setTheme","useEffect","storedTheme","useMemo","setItem","Provider","useTheme","context","useContext","process","env","NODE_ENV","invariant","_htmlElement$classLis","htmlElement","document","documentElement","classList","remove","apply","prefersDarkMode","matchMedia","matches","prefersContrastMore","newTheme","determineThemeFromMediaQuery","add","dataset","PreventWrongThemeFlash","_ref3$defaultTheme","_ref3$storageKey","dangerouslySetInnerHTML","__html","JSON","stringify","trim","TooltipProvider","Tooltip","TooltipTrigger","TooltipContent","_ref$sideOffset","sideOffset"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;;;;AAIG;AACa,SAAAA,EAAEA,GAAwB;AAAA,EAAA,KAAA,IAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAApBC,MAAoB,GAAAC,IAAAA,KAAA,CAAAJ,IAAA,GAAAK,IAAA,GAAA,CAAA,EAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA,EAAA,EAAA;AAApBF,IAAAA,MAAoB,CAAAE,IAAA,CAAAJ,GAAAA,SAAA,CAAAI,IAAA,CAAA,CAAA;AAAA,GAAA;AACzC,EAAA,OAAOC,OAAO,CAACC,IAAI,CAACJ,MAAM,CAAC,CAAC,CAAA;AAC7B;;;ACFA,IAAMK,cAAc,GAAGC,GAAG,CACzB,0LAA0L,EAC1L;AACCC,EAAAA,QAAQ,EAAE;AACTC,IAAAA,QAAQ,EAAE;AACTC,MAAAA,OAAO,EACN,2GAA2G;AAC5GC,MAAAA,OAAO,EAAE,6FAA6F;AACtGC,MAAAA,SAAS,EACR,8GAAA;KACD;AACDC,IAAAA,KAAK,EAAE;AACNH,MAAAA,OAAO,EAAE,EAAE;AACXI,MAAAA,MAAM,EAAE,EAAA;KACR;AACDC,IAAAA,IAAI,EAAE;AACLL,MAAAA,OAAO,EAAE,gBAAgB;AACzBM,MAAAA,EAAE,EAAE,6BAA6B;AACjCC,MAAAA,EAAE,EAAE,8BAAA;AACJ,KAAA;GACD;AACDC,EAAAA,eAAe,EAAE;AAChBT,IAAAA,QAAQ,EAAE,SAAS;AACnBM,IAAAA,IAAI,EAAE,SAAA;GACN;AACDI,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