jenosize-ui 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +183 -63
- package/THIRD-PARTY-NOTICES.md +15 -0
- package/dist/GradientPicker-CQm3GT7F.d.ts +144 -0
- package/dist/{PaymentInput-Dn5WVQVy.d.ts → PaymentInput-Cz5jFB3p.d.ts} +1 -1
- package/dist/{Select-Dt5ARIH8.d.ts → Select-CXOAMlk7.d.ts} +15 -1
- package/dist/{TagInput-BaBeve6L.d.ts → TagInput-CzIrONr-.d.ts} +1 -1
- package/dist/area-chart.d.ts +2 -2
- package/dist/area-chart.js +7 -6
- package/dist/at-least-one-BZ2dsck-.d.ts +18 -0
- package/dist/avatar.d.ts +1 -1
- package/dist/avatar.js +12 -11
- package/dist/badge.d.ts +1 -1
- package/dist/badge.js +6 -6
- package/dist/bar-chart.d.ts +2 -2
- package/dist/bar-chart.js +7 -6
- package/dist/breadcrumb.d.ts +1 -1
- package/dist/breadcrumb.js +4 -4
- package/dist/button.d.ts +1 -1
- package/dist/button.js +11 -10
- package/dist/calendar.d.ts +1 -1
- package/dist/calendar.js +16 -15
- package/dist/callout.d.ts +4 -2
- package/dist/callout.js +12 -11
- package/dist/card.d.ts +59 -3
- package/dist/card.js +4 -4
- package/dist/carousel.d.ts +169 -0
- package/dist/carousel.js +9 -0
- package/dist/catalog.json +11180 -0
- package/dist/checkbox.js +8 -7
- package/dist/{chunk-MVG5MABV.js → chunk-26XQU3TC.js} +8 -8
- package/dist/{chunk-X2X7Q7NW.js → chunk-2R3QWWOT.js} +3 -3
- package/dist/{chunk-AIARANKE.js → chunk-3JQKVC2K.js} +4 -4
- package/dist/chunk-3P3QZPHV.js +109 -0
- package/dist/{chunk-GLKFFA7N.js → chunk-44AWXIQK.js} +5 -5
- package/dist/{chunk-FWRHBMWT.js → chunk-4Y32RIC7.js} +5 -19
- package/dist/{chunk-5XPMY2LF.js → chunk-5ECTNYKU.js} +5 -5
- package/dist/{chunk-6B6BWTXC.js → chunk-5GBA6X6A.js} +5 -5
- package/dist/{chunk-UGKELBNC.js → chunk-5SGF47TZ.js} +9 -9
- package/dist/{chunk-POQTE7JI.js → chunk-5XSR757T.js} +7 -7
- package/dist/{chunk-GZMDZF2V.js → chunk-6FGLABYH.js} +3 -3
- package/dist/{chunk-MCQG4H6T.js → chunk-6T3QAO5K.js} +12 -4
- package/dist/{chunk-SKRR3ZMP.js → chunk-737A4YNC.js} +3 -3
- package/dist/{chunk-AFYXSZGW.js → chunk-7LSUUEAF.js} +7 -5
- package/dist/{chunk-7VLYQR4D.js → chunk-7OFGPDYJ.js} +3 -3
- package/dist/{chunk-54SIZR63.js → chunk-7UCKFULR.js} +7 -7
- package/dist/{chunk-LQURV7HQ.js → chunk-7ZA3QZRP.js} +4 -4
- package/dist/{chunk-X2VMIBK5.js → chunk-A4YPUS6C.js} +4 -4
- package/dist/{chunk-5ZEUTSCV.js → chunk-B4OVIE2X.js} +6 -6
- package/dist/{chunk-P6CON2R2.js → chunk-BH32X25C.js} +3 -3
- package/dist/{chunk-667ZHY3T.js → chunk-BJHLW25G.js} +85 -538
- package/dist/{chunk-ULGCGKOE.js → chunk-BKBINQJZ.js} +4 -4
- package/dist/{chunk-CFFWYXDW.js → chunk-BXQFBFT7.js} +5 -5
- package/dist/{chunk-I6WMNXC7.js → chunk-CQGMOPLG.js} +6 -6
- package/dist/{chunk-FNQJJO63.js → chunk-CUONE6LA.js} +4 -4
- package/dist/{chunk-FFMTYQXE.js → chunk-CVCS5G3E.js} +43 -21
- package/dist/{chunk-33TOK7ES.js → chunk-DCKVNHV5.js} +5 -5
- package/dist/{chunk-A323V6AI.js → chunk-DYRGHXT5.js} +3 -3
- package/dist/{chunk-T4ZFZTY6.js → chunk-EHML2DLR.js} +4 -4
- package/dist/{chunk-N3RVMBPX.js → chunk-EJKQGUUM.js} +4 -4
- package/dist/{chunk-E2YZ7IMT.js → chunk-ESDSTS5N.js} +6 -6
- package/dist/{chunk-LCG34A5T.js → chunk-EVINS473.js} +5 -3
- package/dist/chunk-EXRVOGJ5.js +325 -0
- package/dist/{chunk-YHBI52P2.js → chunk-GDW6NFYN.js} +3 -3
- package/dist/chunk-GOCO45FF.js +619 -0
- package/dist/{chunk-7ZM7SNCZ.js → chunk-GPHGPY6T.js} +3 -3
- package/dist/{chunk-PO2TYK3C.js → chunk-GWYDOZGQ.js} +3 -3
- package/dist/{chunk-LO22VQL5.js → chunk-HNNNJP3A.js} +4 -4
- package/dist/{chunk-ZZSNTCCL.js → chunk-IESEBPYA.js} +4 -4
- package/dist/{chunk-3H444OJA.js → chunk-JZ4HGFWK.js} +3 -3
- package/dist/chunk-KBQJIVUB.js +33 -0
- package/dist/{chunk-CKMWBVRR.js → chunk-KCM4KEZ2.js} +4 -4
- package/dist/{chunk-3QXLIZIX.js → chunk-KNGJ3CSB.js} +3 -3
- package/dist/{chunk-FH7Z7SGQ.js → chunk-KNW3IUWX.js} +12 -11
- package/dist/{chunk-KZP6B6B3.js → chunk-KTWTYK5U.js} +16 -5
- package/dist/{chunk-LYXPJERB.js → chunk-L7Z6XGBU.js} +5 -5
- package/dist/{chunk-ZHAT2XZ4.js → chunk-LLUWBQK6.js} +10 -10
- package/dist/{chunk-QHH6AUR3.js → chunk-MDKVYC6R.js} +7 -7
- package/dist/{chunk-22M75A3N.js → chunk-MS6DY4CE.js} +14 -11
- package/dist/{chunk-LLPWQDF7.js → chunk-MTOTPAYZ.js} +3 -3
- package/dist/{chunk-AZ7DKRBY.js → chunk-MVF7FA4D.js} +5 -5
- package/dist/{chunk-AIGYMTCU.js → chunk-MVUNB43J.js} +3 -3
- package/dist/{chunk-ZMFY7WAY.js → chunk-O24HHIQG.js} +41 -39
- package/dist/{chunk-NKG4N6HA.js → chunk-O5EHNNPS.js} +4 -4
- package/dist/{chunk-5DP7W5HX.js → chunk-OIPFTJS6.js} +3 -3
- package/dist/{chunk-U4WSJAYK.js → chunk-OXNIEIOY.js} +20 -20
- package/dist/chunk-P2BGR77C.js +344 -0
- package/dist/{chunk-CGHYXWTT.js → chunk-PFAFTLN3.js} +4 -4
- package/dist/{chunk-4RBIWI2Q.js → chunk-Q2KR7PSX.js} +3 -3
- package/dist/{chunk-7GUPNTAH.js → chunk-QSOLK2I2.js} +7 -7
- package/dist/chunk-QTWRR7IS.js +1129 -0
- package/dist/{chunk-OLLD2BZN.js → chunk-QZHAL4BL.js} +3 -3
- package/dist/{chunk-OACWA4TC.js → chunk-R25NHHYT.js} +6 -6
- package/dist/{chunk-QDKETK7D.js → chunk-S55JKMG7.js} +5 -5
- package/dist/{chunk-S5TEWPWW.js → chunk-S5LLA36K.js} +10 -10
- package/dist/{chunk-QDYE5LVT.js → chunk-SF3HCW4G.js} +45 -4
- package/dist/{chunk-KHGW72BM.js → chunk-SGMVB7HD.js} +3 -3
- package/dist/{chunk-FKVPAEJ6.js → chunk-SKJC2KYD.js} +4 -3
- package/dist/chunk-SKPKL47Y.js +5671 -0
- package/dist/{chunk-6MMBQVRO.js → chunk-TCTTZHUS.js} +9 -9
- package/dist/chunk-U5X3MLM5.js +67 -0
- package/dist/chunk-UHSGD4CD.js +364 -0
- package/dist/chunk-UJ4WEQHR.js +525 -0
- package/dist/{chunk-6H4LNWQ7.js → chunk-VDFWWWLL.js} +9 -4
- package/dist/{chunk-5KSD4WKN.js → chunk-VIKV25VP.js} +5 -5
- package/dist/chunk-WJB5GWAZ.js +20 -0
- package/dist/{chunk-HHYEAFCL.js → chunk-XAQQ4LYL.js} +11 -11
- package/dist/{chunk-4VGEJG4M.js → chunk-XCFFM2C7.js} +9 -9
- package/dist/chunk-XKTD3X6Z.js +183 -0
- package/dist/{chunk-GQRSABRN.js → chunk-XWXXKEG6.js} +4 -4
- package/dist/chunk-YGFTNICV.js +110 -0
- package/dist/{chunk-T5574MXM.js → chunk-YGJL7QS7.js} +8 -8
- package/dist/{chunk-SB3DG572.js → chunk-YKPTUANT.js} +6 -6
- package/dist/{chunk-YQYVGWIC.js → chunk-YQAYAJ2T.js} +33 -11
- package/dist/chunk-YXYZW6WU.js +998 -0
- package/dist/{chunk-IQNVSQRK.js → chunk-Z6NSOC6T.js} +5 -5
- package/dist/{chunk-BBKE4W3B.js → chunk-ZAWGG4H2.js} +7 -7
- package/dist/{chunk-BFVJHH7S.js → chunk-ZF362B2X.js} +5 -5
- package/dist/{chunk-RJTVCA62.js → chunk-ZJIY642R.js} +3 -3
- package/dist/color-input.d.ts +93 -0
- package/dist/color-input.js +35 -0
- package/dist/color-picker.d.ts +268 -0
- package/dist/color-picker.js +28 -0
- package/dist/color-value-DYzChVOW.d.ts +129 -0
- package/dist/combobox.d.ts +1 -1
- package/dist/combobox.js +13 -12
- package/dist/date-calendar.d.ts +49 -0
- package/dist/date-calendar.js +12 -0
- package/dist/date-input.d.ts +1 -1
- package/dist/date-input.js +11 -10
- package/dist/date-picker.d.ts +15 -131
- package/dist/date-picker.js +26 -22
- package/dist/date-types-DrDdF6WJ.d.ts +100 -0
- package/dist/dialog.d.ts +1 -1
- package/dist/dialog.js +10 -10
- package/dist/drawer.d.ts +1 -1
- package/dist/drawer.js +9 -9
- package/dist/dropdown-menu.d.ts +1 -1
- package/dist/dropdown-menu.js +6 -6
- package/dist/dropzone.d.ts +3 -3
- package/dist/dropzone.js +17 -16
- package/dist/form.d.ts +15 -5
- package/dist/form.js +75 -36
- package/dist/header-navigation.d.ts +2 -2
- package/dist/header-navigation.js +21 -20
- package/dist/helper.d.ts +1 -1
- package/dist/index.d.ts +25 -11
- package/dist/index.js +92 -79
- package/dist/indicator.js +4 -4
- package/dist/inline-banner.d.ts +68 -0
- package/dist/inline-banner.js +20 -0
- package/dist/input.d.ts +1 -1
- package/dist/input.js +10 -9
- package/dist/kanban-board.d.ts +2 -2
- package/dist/kanban-board.js +16 -15
- package/dist/labels-C992bt7G.d.ts +1160 -0
- package/dist/line-chart.d.ts +2 -2
- package/dist/line-chart.js +7 -6
- package/dist/mcp.js +231 -0
- package/dist/number-input.d.ts +1 -1
- package/dist/number-input.js +10 -9
- package/dist/pagination.d.ts +1 -1
- package/dist/pagination.js +14 -13
- package/dist/{card-D56VxyAe.d.ts → panel-CUGm_Mxy.d.ts} +9 -57
- package/dist/payment-input.d.ts +3 -3
- package/dist/payment-input.js +10 -9
- package/dist/picker-draft-BPV3MUPY.d.ts +9 -0
- package/dist/pie-chart.d.ts +2 -2
- package/dist/pie-chart.js +7 -6
- package/dist/popover.d.ts +65 -4
- package/dist/popover.js +9 -9
- package/dist/progress-steps.js +4 -4
- package/dist/progress.js +3 -3
- package/dist/provider.d.ts +1 -1
- package/dist/provider.js +3 -3
- package/dist/qr-code.d.ts +227 -0
- package/dist/qr-code.js +19 -0
- package/dist/radar-chart.d.ts +2 -2
- package/dist/radar-chart.js +7 -6
- package/dist/radial-chart.d.ts +2 -2
- package/dist/radial-chart.js +7 -6
- package/dist/radio.js +8 -7
- package/dist/rich-text-editor.d.ts +624 -0
- package/dist/rich-text-editor.js +51 -0
- package/dist/rich-text-highlight.d.ts +11 -0
- package/dist/rich-text-highlight.js +65 -0
- package/dist/rich-text-sanitize.d.ts +17 -0
- package/dist/rich-text-sanitize.js +176 -0
- package/dist/scroll-area.js +2 -2
- package/dist/select.d.ts +2 -2
- package/dist/select.js +17 -16
- package/dist/separator.js +2 -2
- package/dist/shared-CGf2D8ZX.d.ts +20 -0
- package/dist/sidebar-navigation.d.ts +76 -27
- package/dist/sidebar-navigation.js +16 -15
- package/dist/sidebar-state.d.ts +76 -0
- package/dist/sidebar-state.js +27 -0
- package/dist/skeleton.js +2 -2
- package/dist/slider.d.ts +321 -0
- package/dist/slider.js +13 -0
- package/dist/styles.css +1 -1
- package/dist/switch.d.ts +1 -1
- package/dist/switch.js +2 -2
- package/dist/table.d.ts +3 -19
- package/dist/table.js +34 -33
- package/dist/tabs.js +2 -2
- package/dist/tag-input.d.ts +3 -3
- package/dist/tag-input.js +13 -12
- package/dist/tag.d.ts +1 -1
- package/dist/tag.js +4 -4
- package/dist/textarea.js +8 -7
- package/dist/theme.css +965 -0
- package/dist/theme.js +12 -11
- package/dist/toast.d.ts +1 -1
- package/dist/toast.js +12 -11
- package/dist/tooltip.js +4 -3
- package/dist/tree.d.ts +1 -1
- package/dist/tree.js +6 -6
- package/dist/{types-DR9rAEy1.d.ts → types-DYFl0CEB.d.ts} +1 -1
- package/dist/{use-uploads-KaPqDklo.d.ts → use-uploads-2E7n0PWT.d.ts} +1 -1
- package/dist/verification-code-input.js +10 -9
- package/package.json +92 -8
- package/dist/chunk-BLIZ3CL3.js +0 -49
- package/dist/labels-DPrh0se9.d.ts +0 -627
- package/dist/panel-El4oI68p.d.ts +0 -9
- package/dist/shared-BYXJPnsN.d.ts +0 -11
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { usePickerDraft } from './chunk-KBQJIVUB.js';
|
|
2
|
+
import { useControllable } from './chunk-WJB5GWAZ.js';
|
|
3
|
+
import { COLOR_PICKER_LABELS, swatchPaint, SWATCH_INNER, ColorPicker } from './chunk-QTWRR7IS.js';
|
|
4
|
+
import { toCss, toHex, parseColor } from './chunk-UHSGD4CD.js';
|
|
5
|
+
import { Popover } from './chunk-YQAYAJ2T.js';
|
|
6
|
+
import { Button } from './chunk-R25NHHYT.js';
|
|
7
|
+
import { FieldShell } from './chunk-A4YPUS6C.js';
|
|
8
|
+
import { useFieldValidity, FieldFrame } from './chunk-VIKV25VP.js';
|
|
9
|
+
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
10
|
+
import { useLabels, usePublishedLabels, LabelsContext } from './chunk-ZJIY642R.js';
|
|
11
|
+
import { Field } from '@base-ui/react/field';
|
|
12
|
+
import * as React from 'react';
|
|
13
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
14
|
+
|
|
15
|
+
var TRIGGER_CLASS = cn(
|
|
16
|
+
"flex min-w-0 flex-1 cursor-pointer items-center gap-2 self-stretch bg-transparent text-left outline-none",
|
|
17
|
+
"disabled:cursor-not-allowed"
|
|
18
|
+
);
|
|
19
|
+
var DEFAULT_VALUE = { kind: "solid", color: "#000000" };
|
|
20
|
+
function ColorApplyRow({ onCancel, onApply, labels }) {
|
|
21
|
+
const t = useLabels("colorPicker", COLOR_PICKER_LABELS, labels);
|
|
22
|
+
return (
|
|
23
|
+
// The footer node owns its own gutter, on the same 16px as the panel's rows — `padding="none"`
|
|
24
|
+
// hands ALL spacing to the caller, and that is what gives the seam above it no overhang.
|
|
25
|
+
/* @__PURE__ */ jsxs("div", { className: "flex w-full items-center justify-end gap-3 px-4 py-3", children: [
|
|
26
|
+
/* @__PURE__ */ jsx(Button, { type: "button", variant: "secondary", color: "neutral", size: "sm", onClick: onCancel, children: t.cancel }),
|
|
27
|
+
/* @__PURE__ */ jsx(Button, { type: "button", size: "sm", onClick: onApply, children: t.apply })
|
|
28
|
+
] })
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
function ColorInput(props) {
|
|
32
|
+
const {
|
|
33
|
+
value,
|
|
34
|
+
defaultValue = DEFAULT_VALUE,
|
|
35
|
+
onValueChange,
|
|
36
|
+
commit = "instant",
|
|
37
|
+
placeholder: placeholderProp,
|
|
38
|
+
side = "bottom",
|
|
39
|
+
align = "start",
|
|
40
|
+
formats,
|
|
41
|
+
alpha,
|
|
42
|
+
modes,
|
|
43
|
+
eyedropper,
|
|
44
|
+
swatches,
|
|
45
|
+
onAddSwatch,
|
|
46
|
+
gradientSwatches,
|
|
47
|
+
onAddGradientSwatch,
|
|
48
|
+
label,
|
|
49
|
+
tooltip,
|
|
50
|
+
tooltipDescription,
|
|
51
|
+
hint,
|
|
52
|
+
required = false,
|
|
53
|
+
hideRequiredIndicator = false,
|
|
54
|
+
invalid = false,
|
|
55
|
+
error,
|
|
56
|
+
disabled = false,
|
|
57
|
+
fullWidth = true,
|
|
58
|
+
leading,
|
|
59
|
+
trailing,
|
|
60
|
+
leadingAddon,
|
|
61
|
+
trailingAddon,
|
|
62
|
+
size = "md",
|
|
63
|
+
name,
|
|
64
|
+
id,
|
|
65
|
+
labels,
|
|
66
|
+
className
|
|
67
|
+
} = props;
|
|
68
|
+
const t = useLabels("colorPicker", COLOR_PICKER_LABELS, labels);
|
|
69
|
+
const publishedLabels = usePublishedLabels("colorPicker", labels);
|
|
70
|
+
const placeholder = placeholderProp ?? t.placeholder;
|
|
71
|
+
const [committed, setCommitted] = useControllable(value, defaultValue, onValueChange);
|
|
72
|
+
const { isInvalid, showError } = useFieldValidity(invalid, error);
|
|
73
|
+
const reactId = React.useId();
|
|
74
|
+
const base = id ?? reactId;
|
|
75
|
+
const labelId = label == null ? void 0 : `${base}-label`;
|
|
76
|
+
const valueId = `${base}-value`;
|
|
77
|
+
const requiredId = `${base}-required`;
|
|
78
|
+
const hintId = `${base}-hint`;
|
|
79
|
+
const errorId = `${base}-error`;
|
|
80
|
+
const describedBy = showError ? errorId : hint != null && hint !== "" ? hintId : void 0;
|
|
81
|
+
const picker = usePickerDraft(committed, commit, setCommitted);
|
|
82
|
+
const css = toCss(committed);
|
|
83
|
+
const printed = committed.kind === "solid" ? toHex(parseColor(committed.color, { quiet: true }) ?? { r: 0, g: 0, b: 0, a: 1 }) : css;
|
|
84
|
+
const empty = committed.kind === "solid" && committed.color === "";
|
|
85
|
+
const trigger = /* @__PURE__ */ jsxs(
|
|
86
|
+
"button",
|
|
87
|
+
{
|
|
88
|
+
type: "button",
|
|
89
|
+
disabled,
|
|
90
|
+
"aria-labelledby": labelId == null ? void 0 : [labelId, valueId, required && !hideRequiredIndicator ? requiredId : null].filter(Boolean).join(" "),
|
|
91
|
+
"aria-describedby": describedBy,
|
|
92
|
+
"aria-invalid": isInvalid || void 0,
|
|
93
|
+
className: TRIGGER_CLASS,
|
|
94
|
+
children: [
|
|
95
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: cn(SWATCH_INNER, "size-4 shrink-0"), style: { background: swatchPaint(css) } }),
|
|
96
|
+
/* @__PURE__ */ jsx("span", { id: valueId, className: cn("truncate", empty ? "text-quaternary" : "font-medium"), children: empty ? placeholder : printed }),
|
|
97
|
+
required && !hideRequiredIndicator ? /* @__PURE__ */ jsx("span", { id: requiredId, className: "sr-only", children: t.required }) : null
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
return /* @__PURE__ */ jsx(LabelsContext.Provider, { value: publishedLabels, children: /* @__PURE__ */ jsx(
|
|
102
|
+
FieldFrame,
|
|
103
|
+
{
|
|
104
|
+
label,
|
|
105
|
+
labelId,
|
|
106
|
+
messageId: { hint: hintId, error: errorId },
|
|
107
|
+
tooltip,
|
|
108
|
+
tooltipDescription,
|
|
109
|
+
hint,
|
|
110
|
+
error,
|
|
111
|
+
isInvalid,
|
|
112
|
+
showError,
|
|
113
|
+
required,
|
|
114
|
+
hideRequiredIndicator,
|
|
115
|
+
size,
|
|
116
|
+
disabled,
|
|
117
|
+
fullWidth,
|
|
118
|
+
className,
|
|
119
|
+
children: /* @__PURE__ */ jsxs(
|
|
120
|
+
FieldShell,
|
|
121
|
+
{
|
|
122
|
+
size,
|
|
123
|
+
invalid: isInvalid,
|
|
124
|
+
disabled,
|
|
125
|
+
leading,
|
|
126
|
+
trailing,
|
|
127
|
+
leadingAddon,
|
|
128
|
+
trailingAddon,
|
|
129
|
+
className: cn(
|
|
130
|
+
// The open state lives on the TRIGGER (Base UI puts `data-popup-open` there), so the shell
|
|
131
|
+
// reads it with `has-*` rather than owning a variant it can never match.
|
|
132
|
+
"has-[[data-popup-open]]:outline-2 has-[[data-popup-open]]:-outline-offset-2",
|
|
133
|
+
isInvalid ? "has-[[data-popup-open]]:outline-focus-ring-error" : "has-[[data-popup-open]]:outline-focus-ring"
|
|
134
|
+
),
|
|
135
|
+
onMouseDown: (event) => {
|
|
136
|
+
if (event.target !== event.currentTarget) return;
|
|
137
|
+
event.preventDefault();
|
|
138
|
+
event.currentTarget.querySelector("button")?.click();
|
|
139
|
+
},
|
|
140
|
+
children: [
|
|
141
|
+
/* @__PURE__ */ jsx(
|
|
142
|
+
Popover,
|
|
143
|
+
{
|
|
144
|
+
open: picker.open,
|
|
145
|
+
onOpenChange: picker.onOpenChange,
|
|
146
|
+
trigger,
|
|
147
|
+
side,
|
|
148
|
+
align,
|
|
149
|
+
padding: "none",
|
|
150
|
+
size: "panel",
|
|
151
|
+
dividers: commit === "confirm" ? "line" : "none",
|
|
152
|
+
"aria-label": label ?? t.openPicker,
|
|
153
|
+
footer: commit === "confirm" ? () => /* @__PURE__ */ jsx(ColorApplyRow, { onCancel: picker.close, onApply: picker.apply, labels }) : void 0,
|
|
154
|
+
children: /* @__PURE__ */ jsx(
|
|
155
|
+
ColorPicker,
|
|
156
|
+
{
|
|
157
|
+
value: picker.draft,
|
|
158
|
+
onValueChange: picker.setDraft,
|
|
159
|
+
formats,
|
|
160
|
+
alpha,
|
|
161
|
+
modes,
|
|
162
|
+
eyedropper,
|
|
163
|
+
swatches,
|
|
164
|
+
onAddSwatch,
|
|
165
|
+
gradientSwatches,
|
|
166
|
+
onAddGradientSwatch,
|
|
167
|
+
labels
|
|
168
|
+
}
|
|
169
|
+
)
|
|
170
|
+
}
|
|
171
|
+
),
|
|
172
|
+
/* @__PURE__ */ jsx(Field.Control, { type: "hidden", name, required, value: empty ? "" : css, readOnly: true })
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
)
|
|
176
|
+
}
|
|
177
|
+
) });
|
|
178
|
+
}
|
|
179
|
+
ColorInput.displayName = "ColorInput";
|
|
180
|
+
|
|
181
|
+
export { ColorInput };
|
|
182
|
+
//# sourceMappingURL=chunk-XKTD3X6Z.js.map
|
|
183
|
+
//# sourceMappingURL=chunk-XKTD3X6Z.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useControlScrollFade } from './chunk-7EUAMHMU.js';
|
|
2
2
|
import { useIsomorphicLayoutEffect } from './chunk-EDSK6FEH.js';
|
|
3
|
-
import { CONTROL_TEXT, CONTROL_RADIUS, useFieldValidity, FieldFrame } from './chunk-
|
|
3
|
+
import { CONTROL_TEXT, CONTROL_RADIUS, useFieldValidity, FieldFrame } from './chunk-VIKV25VP.js';
|
|
4
4
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
5
|
-
import { warnNeedsName, warnPositiveInt, devWarn } from './chunk-
|
|
5
|
+
import { warnNeedsName, warnPositiveInt, devWarn } from './chunk-SF3HCW4G.js';
|
|
6
6
|
import { Field } from '@base-ui/react/field';
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -169,5 +169,5 @@ function Textarea(props) {
|
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
export { Textarea };
|
|
172
|
-
//# sourceMappingURL=chunk-
|
|
173
|
-
//# sourceMappingURL=chunk-
|
|
172
|
+
//# sourceMappingURL=chunk-XWXXKEG6.js.map
|
|
173
|
+
//# sourceMappingURL=chunk-XWXXKEG6.js.map
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { AlignCenter, AlignJustify, AlignLeft, AlignRight, AlignVerticalJustifyCenter, AlignVerticalJustifyEnd, AlignVerticalJustifyStart, ArrowDown, ArrowLeft, ArrowLeftRight, ArrowRight, ArrowUp, Asterisk, Baseline, Bell, BetweenHorizontalEnd, BetweenHorizontalStart, BetweenVerticalEnd, BetweenVerticalStart, Bold, Calendar, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, ChevronsLeft, ChevronsLeftRight, ChevronsRight, ChevronsRightLeft, ChevronsUpDown, CircleAlert, CircleCheck, CircleHelp, Circle, CircleX, Code, Columns3, Download, Ellipsis, EllipsisVertical, ExternalLink, Eye, EyeOff, File, GripVertical, Heading1, Heading2, Heading3, Highlighter, Image, Inbox, IndentDecrease, IndentIncrease, Info, Italic, Link, List, ListOrdered, ListTodo, LoaderCircle, Maximize, Megaphone, Menu, Minimize, Minus, Moon, MoveHorizontal, Move, Paintbrush, Palette, PanelLeft, PanelTop, Pause, Pencil, Pilcrow, Pipette, Play, Plus, Quote, Redo2, RemoveFormatting, RotateCw, Rows3, Search, Slash, SquareCode, Strikethrough, Subscript, Sun, Superscript, TableCellsMerge, TableCellsSplit, Table, TableRowsSplit, Trash2, TriangleAlert, Underline, Undo2, Unlink2, UploadCloud, User, X } from 'lucide-react';
|
|
2
|
+
|
|
3
|
+
// src/components/icons/core/index.ts
|
|
4
|
+
var AlignCenterIcon = AlignCenter;
|
|
5
|
+
var AlignJustifyIcon = AlignJustify;
|
|
6
|
+
var AlignLeftIcon = AlignLeft;
|
|
7
|
+
var AlignRightIcon = AlignRight;
|
|
8
|
+
var AlignVerticalJustifyCenterIcon = AlignVerticalJustifyCenter;
|
|
9
|
+
var AlignVerticalJustifyEndIcon = AlignVerticalJustifyEnd;
|
|
10
|
+
var AlignVerticalJustifyStartIcon = AlignVerticalJustifyStart;
|
|
11
|
+
var ArrowDownIcon = ArrowDown;
|
|
12
|
+
var ArrowLeftIcon = ArrowLeft;
|
|
13
|
+
var ArrowLeftRightIcon = ArrowLeftRight;
|
|
14
|
+
var ArrowRightIcon = ArrowRight;
|
|
15
|
+
var ArrowUpIcon = ArrowUp;
|
|
16
|
+
var AsteriskIcon = Asterisk;
|
|
17
|
+
var BaselineIcon = Baseline;
|
|
18
|
+
var BellIcon = Bell;
|
|
19
|
+
var BetweenHorizontalEndIcon = BetweenHorizontalEnd;
|
|
20
|
+
var BetweenHorizontalStartIcon = BetweenHorizontalStart;
|
|
21
|
+
var BetweenVerticalEndIcon = BetweenVerticalEnd;
|
|
22
|
+
var BetweenVerticalStartIcon = BetweenVerticalStart;
|
|
23
|
+
var BoldIcon = Bold;
|
|
24
|
+
var CalendarIcon = Calendar;
|
|
25
|
+
var CheckIcon = Check;
|
|
26
|
+
var ChevronDownIcon = ChevronDown;
|
|
27
|
+
var ChevronLeftIcon = ChevronLeft;
|
|
28
|
+
var ChevronRightIcon = ChevronRight;
|
|
29
|
+
var ChevronsLeftIcon = ChevronsLeft;
|
|
30
|
+
var ChevronsLeftRightIcon = ChevronsLeftRight;
|
|
31
|
+
var ChevronsRightIcon = ChevronsRight;
|
|
32
|
+
var ChevronsRightLeftIcon = ChevronsRightLeft;
|
|
33
|
+
var ChevronsUpDownIcon = ChevronsUpDown;
|
|
34
|
+
var ChevronUpIcon = ChevronUp;
|
|
35
|
+
var CircleIcon = Circle;
|
|
36
|
+
var CircleAlertIcon = CircleAlert;
|
|
37
|
+
var CircleCheckIcon = CircleCheck;
|
|
38
|
+
var CircleHelpIcon = CircleHelp;
|
|
39
|
+
var CircleXIcon = CircleX;
|
|
40
|
+
var CodeIcon = Code;
|
|
41
|
+
var Columns3Icon = Columns3;
|
|
42
|
+
var DownloadIcon = Download;
|
|
43
|
+
var EllipsisIcon = Ellipsis;
|
|
44
|
+
var EllipsisVerticalIcon = EllipsisVertical;
|
|
45
|
+
var ExternalLinkIcon = ExternalLink;
|
|
46
|
+
var EyeIcon = Eye;
|
|
47
|
+
var EyeOffIcon = EyeOff;
|
|
48
|
+
var FileIcon = File;
|
|
49
|
+
var GripVerticalIcon = GripVertical;
|
|
50
|
+
var Heading1Icon = Heading1;
|
|
51
|
+
var Heading2Icon = Heading2;
|
|
52
|
+
var Heading3Icon = Heading3;
|
|
53
|
+
var HighlighterIcon = Highlighter;
|
|
54
|
+
var ImageIcon = Image;
|
|
55
|
+
var InboxIcon = Inbox;
|
|
56
|
+
var IndentDecreaseIcon = IndentDecrease;
|
|
57
|
+
var IndentIncreaseIcon = IndentIncrease;
|
|
58
|
+
var InfoIcon = Info;
|
|
59
|
+
var ItalicIcon = Italic;
|
|
60
|
+
var LinkIcon = Link;
|
|
61
|
+
var ListIcon = List;
|
|
62
|
+
var ListOrderedIcon = ListOrdered;
|
|
63
|
+
var ListTodoIcon = ListTodo;
|
|
64
|
+
var LoaderCircleIcon = LoaderCircle;
|
|
65
|
+
var MaximizeIcon = Maximize;
|
|
66
|
+
var MegaphoneIcon = Megaphone;
|
|
67
|
+
var MenuIcon = Menu;
|
|
68
|
+
var MinimizeIcon = Minimize;
|
|
69
|
+
var MinusIcon = Minus;
|
|
70
|
+
var MoonIcon = Moon;
|
|
71
|
+
var MoveIcon = Move;
|
|
72
|
+
var MoveHorizontalIcon = MoveHorizontal;
|
|
73
|
+
var PaintbrushIcon = Paintbrush;
|
|
74
|
+
var PaletteIcon = Palette;
|
|
75
|
+
var PanelLeftIcon = PanelLeft;
|
|
76
|
+
var PanelTopIcon = PanelTop;
|
|
77
|
+
var PauseIcon = Pause;
|
|
78
|
+
var PencilIcon = Pencil;
|
|
79
|
+
var PilcrowIcon = Pilcrow;
|
|
80
|
+
var PipetteIcon = Pipette;
|
|
81
|
+
var PlayIcon = Play;
|
|
82
|
+
var PlusIcon = Plus;
|
|
83
|
+
var QuoteIcon = Quote;
|
|
84
|
+
var Redo2Icon = Redo2;
|
|
85
|
+
var RemoveFormattingIcon = RemoveFormatting;
|
|
86
|
+
var RotateCwIcon = RotateCw;
|
|
87
|
+
var Rows3Icon = Rows3;
|
|
88
|
+
var SearchIcon = Search;
|
|
89
|
+
var SlashIcon = Slash;
|
|
90
|
+
var SquareCodeIcon = SquareCode;
|
|
91
|
+
var StrikethroughIcon = Strikethrough;
|
|
92
|
+
var SubscriptIcon = Subscript;
|
|
93
|
+
var SunIcon = Sun;
|
|
94
|
+
var SuperscriptIcon = Superscript;
|
|
95
|
+
var TableIcon = Table;
|
|
96
|
+
var TableCellsMergeIcon = TableCellsMerge;
|
|
97
|
+
var TableCellsSplitIcon = TableCellsSplit;
|
|
98
|
+
var TableRowsSplitIcon = TableRowsSplit;
|
|
99
|
+
var Trash2Icon = Trash2;
|
|
100
|
+
var TriangleAlertIcon = TriangleAlert;
|
|
101
|
+
var UnderlineIcon = Underline;
|
|
102
|
+
var Undo2Icon = Undo2;
|
|
103
|
+
var Unlink2Icon = Unlink2;
|
|
104
|
+
var UploadCloudIcon = UploadCloud;
|
|
105
|
+
var UserIcon = User;
|
|
106
|
+
var XIcon = X;
|
|
107
|
+
|
|
108
|
+
export { AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, AlignVerticalJustifyCenterIcon, AlignVerticalJustifyEndIcon, AlignVerticalJustifyStartIcon, ArrowDownIcon, ArrowLeftIcon, ArrowLeftRightIcon, ArrowRightIcon, ArrowUpIcon, AsteriskIcon, BaselineIcon, BellIcon, BetweenHorizontalEndIcon, BetweenHorizontalStartIcon, BetweenVerticalEndIcon, BetweenVerticalStartIcon, BoldIcon, CalendarIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsLeftIcon, ChevronsLeftRightIcon, ChevronsRightIcon, ChevronsRightLeftIcon, ChevronsUpDownIcon, CircleAlertIcon, CircleCheckIcon, CircleHelpIcon, CircleIcon, CircleXIcon, CodeIcon, Columns3Icon, DownloadIcon, EllipsisIcon, EllipsisVerticalIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FileIcon, GripVerticalIcon, Heading1Icon, Heading2Icon, Heading3Icon, HighlighterIcon, ImageIcon, InboxIcon, IndentDecreaseIcon, IndentIncreaseIcon, InfoIcon, ItalicIcon, LinkIcon, ListIcon, ListOrderedIcon, ListTodoIcon, LoaderCircleIcon, MaximizeIcon, MegaphoneIcon, MenuIcon, MinimizeIcon, MinusIcon, MoonIcon, MoveHorizontalIcon, MoveIcon, PaintbrushIcon, PaletteIcon, PanelLeftIcon, PanelTopIcon, PauseIcon, PencilIcon, PilcrowIcon, PipetteIcon, PlayIcon, PlusIcon, QuoteIcon, Redo2Icon, RemoveFormattingIcon, RotateCwIcon, Rows3Icon, SearchIcon, SlashIcon, SquareCodeIcon, StrikethroughIcon, SubscriptIcon, SunIcon, SuperscriptIcon, TableCellsMergeIcon, TableCellsSplitIcon, TableIcon, TableRowsSplitIcon, Trash2Icon, TriangleAlertIcon, UnderlineIcon, Undo2Icon, Unlink2Icon, UploadCloudIcon, UserIcon, XIcon };
|
|
109
|
+
//# sourceMappingURL=chunk-YGFTNICV.js.map
|
|
110
|
+
//# sourceMappingURL=chunk-YGFTNICV.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useLinkResolver, LinkOrButton } from './chunk-5AZKP4KZ.js';
|
|
2
|
-
import { Button } from './chunk-
|
|
3
|
-
import { WASH, FILL } from './chunk-
|
|
2
|
+
import { Button } from './chunk-R25NHHYT.js';
|
|
3
|
+
import { WASH, WASH_RING, FILL } from './chunk-6T3QAO5K.js';
|
|
4
4
|
import { Slot } from './chunk-52IFGFTL.js';
|
|
5
|
-
import { XIcon, CircleXIcon, TriangleAlertIcon, CircleCheckIcon, InfoIcon, BellIcon } from './chunk-
|
|
5
|
+
import { XIcon, CircleXIcon, TriangleAlertIcon, CircleCheckIcon, InfoIcon, BellIcon } from './chunk-YGFTNICV.js';
|
|
6
6
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
7
|
-
import { usePublishedLabels, LabelsContext, useLabels } from './chunk-
|
|
8
|
-
import { devWarn, warnPositiveInt } from './chunk-
|
|
7
|
+
import { usePublishedLabels, LabelsContext, useLabels } from './chunk-ZJIY642R.js';
|
|
8
|
+
import { devWarn, warnPositiveInt } from './chunk-SF3HCW4G.js';
|
|
9
9
|
import { Toast } from '@base-ui/react/toast';
|
|
10
10
|
import * as React from 'react';
|
|
11
11
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -383,7 +383,7 @@ function ToastList({ position, stacked, countdown }) {
|
|
|
383
383
|
const runFor = countdown && item.timeout ? item.timeout : 0;
|
|
384
384
|
return /* @__PURE__ */ jsxs(Toast.Root, { toast: item, swipeDirection, "data-slot": "toast", className: cn("group/toast", rootClassName), children: [
|
|
385
385
|
/* @__PURE__ */ jsxs(Toast.Content, { className: cn(CONTENT, compact ? CONTENT_ALIGN.compact : CONTENT_ALIGN.tall, stacked && CONTENT_STACKED), children: [
|
|
386
|
-
leading === void 0 ? /* @__PURE__ */ jsx("span", { className: cn(ICON_CIRCLE, WASH[TYPE_COLOR[type]]), "aria-hidden": "true", children: /* @__PURE__ */ jsx(TypeIcon, { type }) }) : /* @__PURE__ */ jsx(Slot, { className: LEADING_SLOT, children: leading }),
|
|
386
|
+
leading === void 0 ? /* @__PURE__ */ jsx("span", { className: cn(ICON_CIRCLE, WASH[TYPE_COLOR[type]], TYPE_COLOR[type] === "neutral" && WASH_RING.neutral), "aria-hidden": "true", children: /* @__PURE__ */ jsx(TypeIcon, { type }) }) : /* @__PURE__ */ jsx(Slot, { className: LEADING_SLOT, children: leading }),
|
|
387
387
|
/* @__PURE__ */ jsxs("div", { className: TEXT, children: [
|
|
388
388
|
meta === void 0 && trailing === void 0 ? /* @__PURE__ */ jsx(Toast.Title, { className: TITLE }) : /* @__PURE__ */ jsxs("div", { className: TITLE_ROW, children: [
|
|
389
389
|
/* @__PURE__ */ jsx(Toast.Title, { className: TITLE }),
|
|
@@ -487,5 +487,5 @@ function ToastProvider(props) {
|
|
|
487
487
|
}
|
|
488
488
|
|
|
489
489
|
export { ToastProvider, toast };
|
|
490
|
-
//# sourceMappingURL=chunk-
|
|
491
|
-
//# sourceMappingURL=chunk-
|
|
490
|
+
//# sourceMappingURL=chunk-YGJL7QS7.js.map
|
|
491
|
+
//# sourceMappingURL=chunk-YGJL7QS7.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useControlScrollFade } from './chunk-7EUAMHMU.js';
|
|
2
|
-
import { FieldShell } from './chunk-
|
|
3
|
-
import { useFieldValidity, FieldFrame } from './chunk-
|
|
2
|
+
import { FieldShell } from './chunk-A4YPUS6C.js';
|
|
3
|
+
import { useFieldValidity, FieldFrame } from './chunk-VIKV25VP.js';
|
|
4
4
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
5
|
-
import { useLabels } from './chunk-
|
|
6
|
-
import { warnPositiveInt } from './chunk-
|
|
5
|
+
import { useLabels } from './chunk-ZJIY642R.js';
|
|
6
|
+
import { warnPositiveInt } from './chunk-SF3HCW4G.js';
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import { Field } from '@base-ui/react/field';
|
|
9
9
|
import * as React from 'react';
|
|
@@ -390,5 +390,5 @@ function PaymentInput(props) {
|
|
|
390
390
|
}
|
|
391
391
|
|
|
392
392
|
export { CARD_ICON, DEFAULT_MAX_DIGITS, PaymentInput, applyCardNumberEdit, detectCardType, formatCardNumber, hasChecksumError, isCompleteCardNumber, isLengthSettled, luhnValid, onlyDigits };
|
|
393
|
-
//# sourceMappingURL=chunk-
|
|
394
|
-
//# sourceMappingURL=chunk-
|
|
393
|
+
//# sourceMappingURL=chunk-YKPTUANT.js.map
|
|
394
|
+
//# sourceMappingURL=chunk-YKPTUANT.js.map
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { useControllableOpen } from './chunk-
|
|
2
|
-
import { PanelChrome } from './chunk-
|
|
1
|
+
import { useControllableOpen } from './chunk-KCM4KEZ2.js';
|
|
2
|
+
import { PanelChrome } from './chunk-HNNNJP3A.js';
|
|
3
3
|
import { EXPLICIT_CLOSE, NO_RETURN_FOCUS } from './chunk-S7NNXWIN.js';
|
|
4
|
-
import { CloseButton } from './chunk-
|
|
4
|
+
import { CloseButton } from './chunk-PFAFTLN3.js';
|
|
5
5
|
import { POPUP_MOTION } from './chunk-O4GRKO3I.js';
|
|
6
6
|
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
7
|
+
import { devWarn } from './chunk-SF3HCW4G.js';
|
|
7
8
|
import { Popover as Popover$1 } from '@base-ui/react/popover';
|
|
8
9
|
import * as React2 from 'react';
|
|
9
10
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -11,17 +12,26 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
11
12
|
var POPOVER_SIZE = {
|
|
12
13
|
sm: "max-w-64",
|
|
13
14
|
md: "max-w-80",
|
|
14
|
-
lg: "max-w-96"
|
|
15
|
+
lg: "max-w-96",
|
|
16
|
+
panel: "max-w-[var(--available-width)]"
|
|
15
17
|
};
|
|
16
18
|
var POPUP_SURFACE = cn("rounded-lg bg-primary shadow-lg ring-1 ring-secondary_alt ring-inset", "text-primary");
|
|
17
|
-
var POPUP_MAX_H =
|
|
19
|
+
var POPUP_MAX_H = {
|
|
20
|
+
sm: "max-h-[min(var(--available-height),24rem)]",
|
|
21
|
+
md: "max-h-[min(var(--available-height),24rem)]",
|
|
22
|
+
lg: "max-h-[min(var(--available-height),24rem)]",
|
|
23
|
+
panel: "max-h-[var(--available-height)]"
|
|
24
|
+
};
|
|
18
25
|
function PopoverSurface(props) {
|
|
19
26
|
const {
|
|
20
27
|
size,
|
|
21
28
|
side,
|
|
22
29
|
align,
|
|
30
|
+
anchor,
|
|
23
31
|
sideOffset,
|
|
24
32
|
alignOffset,
|
|
33
|
+
padding,
|
|
34
|
+
autoFocus,
|
|
25
35
|
showClose,
|
|
26
36
|
dividers,
|
|
27
37
|
keepMounted,
|
|
@@ -36,18 +46,19 @@ function PopoverSurface(props) {
|
|
|
36
46
|
closeReasonRef
|
|
37
47
|
} = props;
|
|
38
48
|
const ariaLabel = props["aria-label"];
|
|
39
|
-
return /* @__PURE__ */ jsx(Popover$1.Portal, { keepMounted, children: /* @__PURE__ */ jsx(Popover$1.Positioner, { side, align, sideOffset, alignOffset, className: "z-50 outline-none", children: /* @__PURE__ */ jsx(
|
|
49
|
+
return /* @__PURE__ */ jsx(Popover$1.Portal, { keepMounted, children: /* @__PURE__ */ jsx(Popover$1.Positioner, { anchor, side, align, sideOffset, alignOffset, className: "z-50 outline-none", children: /* @__PURE__ */ jsx(
|
|
40
50
|
PanelChrome,
|
|
41
51
|
{
|
|
42
52
|
render: /* @__PURE__ */ jsx(
|
|
43
53
|
Popover$1.Popup,
|
|
44
54
|
{
|
|
45
55
|
"aria-label": ariaLabel,
|
|
46
|
-
|
|
56
|
+
initialFocus: autoFocus ? void 0 : false,
|
|
57
|
+
finalFocus: () => autoFocus && !NO_RETURN_FOCUS.has(closeReasonRef.current ?? "none")
|
|
47
58
|
}
|
|
48
59
|
),
|
|
49
|
-
className: cn("relative w-max outline-none", POPUP_MAX_H, POPUP_SURFACE, POPUP_MOTION, POPOVER_SIZE[size], className),
|
|
50
|
-
padding
|
|
60
|
+
className: cn("relative w-max outline-none", POPUP_MAX_H[size], POPUP_SURFACE, POPUP_MOTION, POPOVER_SIZE[size], className),
|
|
61
|
+
padding,
|
|
51
62
|
titleScale: "md",
|
|
52
63
|
footerAlign: "end",
|
|
53
64
|
scrollBody: true,
|
|
@@ -70,16 +81,19 @@ function Popover(props) {
|
|
|
70
81
|
open,
|
|
71
82
|
defaultOpen = false,
|
|
72
83
|
onOpenChange,
|
|
84
|
+
anchor,
|
|
73
85
|
side = "bottom",
|
|
74
86
|
align = "center",
|
|
75
87
|
sideOffset = 8,
|
|
76
88
|
alignOffset = 0,
|
|
77
89
|
size = "md",
|
|
90
|
+
padding = "md",
|
|
78
91
|
showClose = false,
|
|
79
92
|
dividers = "none",
|
|
80
93
|
modal = false,
|
|
81
94
|
keepMounted = false,
|
|
82
95
|
dismissible = true,
|
|
96
|
+
autoFocus = true,
|
|
83
97
|
title,
|
|
84
98
|
description,
|
|
85
99
|
leading,
|
|
@@ -92,6 +106,11 @@ function Popover(props) {
|
|
|
92
106
|
const [value, setOpen] = useControllableOpen(open, defaultOpen, onOpenChange);
|
|
93
107
|
const close = React2.useCallback(() => setOpen(false), [setOpen]);
|
|
94
108
|
const closeReasonRef = React2.useRef(void 0);
|
|
109
|
+
if (padding === "none" && showClose) {
|
|
110
|
+
devWarn(
|
|
111
|
+
'<Popover> has `padding="none"` and `showClose`, which puts the \u2715 hard against the corner with no inset \u2014 `padding="none"` hands ALL spacing to the caller, that one included. Draw your own close control in a padded row, or use a padded surface.'
|
|
112
|
+
);
|
|
113
|
+
}
|
|
95
114
|
return /* @__PURE__ */ jsxs(
|
|
96
115
|
Popover$1.Root,
|
|
97
116
|
{
|
|
@@ -111,8 +130,11 @@ function Popover(props) {
|
|
|
111
130
|
PopoverSurface,
|
|
112
131
|
{
|
|
113
132
|
size,
|
|
133
|
+
padding,
|
|
134
|
+
autoFocus,
|
|
114
135
|
side,
|
|
115
136
|
align,
|
|
137
|
+
anchor: trigger ? void 0 : anchor,
|
|
116
138
|
sideOffset,
|
|
117
139
|
alignOffset,
|
|
118
140
|
showClose,
|
|
@@ -137,5 +159,5 @@ function Popover(props) {
|
|
|
137
159
|
Popover.displayName = "Popover";
|
|
138
160
|
|
|
139
161
|
export { Popover };
|
|
140
|
-
//# sourceMappingURL=chunk-
|
|
141
|
-
//# sourceMappingURL=chunk-
|
|
162
|
+
//# sourceMappingURL=chunk-YQAYAJ2T.js.map
|
|
163
|
+
//# sourceMappingURL=chunk-YQAYAJ2T.js.map
|