@aircall/ds 0.40.0 → 0.41.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/dist/{data-table-DD7m3puW.js → data-table-Ciqcsotb.js} +110 -5
- package/dist/data-table.js +1 -1
- package/dist/globals.css +1 -1
- package/dist/index.d.ts +444 -188
- package/dist/index.js +1530 -819
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as Button, D as _objectWithoutProperties, E as _objectSpread2, O as cn, S as registerI18nNamespace, T as linkStyle, _ as ActionBarHeight, a as TableFooter, b as detectInitialLanguage, c as TableRow, d as Checkbox, f as Spinner, g as ActionBarContext, h as ActionBarButton, i as TableCell, l as useFetchMoreSentinel, m as ActionBar, n as Table, o as TableHead, p as spinnerVariants, r as TableBody, s as TableHeader, t as DataTable, u as Skeleton, v as useDsTranslation, w as buttonVariants, x as dsI18n, y as SUPPORTED_LANGUAGES } from "./data-table-
|
|
1
|
+
import { C as Button, D as _objectWithoutProperties, E as _objectSpread2, O as cn, S as registerI18nNamespace, T as linkStyle, _ as ActionBarHeight, a as TableFooter, b as detectInitialLanguage, c as TableRow, d as Checkbox, f as Spinner, g as ActionBarContext, h as ActionBarButton, i as TableCell, l as useFetchMoreSentinel, m as ActionBar, n as Table, o as TableHead, p as spinnerVariants, r as TableBody, s as TableHeader, t as DataTable, u as Skeleton, v as useDsTranslation, w as buttonVariants, x as dsI18n, y as SUPPORTED_LANGUAGES } from "./data-table-Ciqcsotb.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { createContext, useContext, useSyncExternalStore } from "react";
|
|
4
4
|
import { Accordion as Accordion$1 } from "@base-ui/react/accordion";
|
|
@@ -17,6 +17,10 @@ import { Select as Select$1 } from "@base-ui/react/select";
|
|
|
17
17
|
import useEmblaCarousel from "embla-carousel-react";
|
|
18
18
|
import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
|
|
19
19
|
import { Collapsible as Collapsible$1 } from "@base-ui/react/collapsible";
|
|
20
|
+
import { Popover as Popover$1 } from "@base-ui/react/popover";
|
|
21
|
+
import { Toggle as Toggle$1 } from "@base-ui/react/toggle";
|
|
22
|
+
import { ToggleGroup as ToggleGroup$1 } from "@base-ui/react/toggle-group";
|
|
23
|
+
import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
|
|
20
24
|
import { Combobox as Combobox$1 } from "@base-ui/react";
|
|
21
25
|
import { Command as Command$1 } from "cmdk";
|
|
22
26
|
import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
|
|
@@ -25,7 +29,6 @@ import { useControllableState } from "@aircall/hooks";
|
|
|
25
29
|
import { checkboxesFeature, hotkeysCoreFeature, selectionFeature, syncDataLoaderFeature } from "@headless-tree/core";
|
|
26
30
|
import { useTree } from "@headless-tree/react";
|
|
27
31
|
import { endOfDay, format, getDaysInMonth, startOfDay } from "date-fns";
|
|
28
|
-
import { Popover as Popover$1 } from "@base-ui/react/popover";
|
|
29
32
|
import { Drawer as DrawerPrimitive } from "@base-ui/react/drawer";
|
|
30
33
|
import { Radio } from "@base-ui/react/radio";
|
|
31
34
|
import { RadioGroup as RadioGroup$1 } from "@base-ui/react/radio-group";
|
|
@@ -55,18 +58,15 @@ import { Combobox as Combobox$2, ComboboxGroup as ComboboxGroup$1, ComboboxItem
|
|
|
55
58
|
import { useComboboxInput, useHTMLInputCursorState } from "@platejs/combobox/react";
|
|
56
59
|
import { flip, offset, shift, useFloatingToolbar, useFloatingToolbarState } from "@platejs/floating";
|
|
57
60
|
import { ListStyleType } from "@platejs/list";
|
|
58
|
-
import { Toggle as Toggle$1 } from "@base-ui/react/toggle";
|
|
59
|
-
import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
|
|
60
61
|
import { createPortal } from "react-dom";
|
|
61
62
|
import { Toaster as Toaster$1, toast } from "sonner";
|
|
62
63
|
import { Switch as Switch$1 } from "@base-ui/react/switch";
|
|
63
64
|
import { Tabs as Tabs$1 } from "@base-ui/react/tabs";
|
|
64
|
-
import { ToggleGroup as ToggleGroup$1 } from "@base-ui/react/toggle-group";
|
|
65
65
|
//#region src/components/accordion.tsx
|
|
66
|
-
const _excluded$
|
|
67
|
-
const _excluded2$
|
|
68
|
-
const _excluded3$
|
|
69
|
-
const _excluded4$
|
|
66
|
+
const _excluded$62 = ["className"];
|
|
67
|
+
const _excluded2$44 = ["className"];
|
|
68
|
+
const _excluded3$36 = ["className", "children"];
|
|
69
|
+
const _excluded4$31 = ["className", "children"];
|
|
70
70
|
/**
|
|
71
71
|
* Root container for an accordion, wrapping Base UI's `Accordion.Root`.
|
|
72
72
|
* Renders a `<div>` that lays out its `AccordionItem` children in a column.
|
|
@@ -82,7 +82,7 @@ const _excluded4$30 = ["className", "children"];
|
|
|
82
82
|
* ```
|
|
83
83
|
*/
|
|
84
84
|
const Accordion = React.forwardRef((componentProps, forwardRef) => {
|
|
85
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
85
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$62);
|
|
86
86
|
return /* @__PURE__ */ jsx(Accordion$1.Root, _objectSpread2({
|
|
87
87
|
ref: forwardRef,
|
|
88
88
|
"data-slot": "accordion",
|
|
@@ -95,7 +95,7 @@ Accordion.displayName = "Accordion";
|
|
|
95
95
|
* Renders a `<div>` grouping one `AccordionTrigger` and one `AccordionContent`.
|
|
96
96
|
*/
|
|
97
97
|
const AccordionItem = React.forwardRef((componentProps, forwardRef) => {
|
|
98
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
98
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$44);
|
|
99
99
|
return /* @__PURE__ */ jsx(Accordion$1.Item, _objectSpread2({
|
|
100
100
|
ref: forwardRef,
|
|
101
101
|
"data-slot": "accordion-item",
|
|
@@ -109,7 +109,7 @@ AccordionItem.displayName = "AccordionItem";
|
|
|
109
109
|
* heading element, with chevron up/down icons reflecting the expanded state.
|
|
110
110
|
*/
|
|
111
111
|
const AccordionTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
112
|
-
const { className, children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$
|
|
112
|
+
const { className, children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$36);
|
|
113
113
|
return /* @__PURE__ */ jsx(Accordion$1.Header, {
|
|
114
114
|
className: "flex",
|
|
115
115
|
children: /* @__PURE__ */ jsxs(Accordion$1.Trigger, _objectSpread2(_objectSpread2({
|
|
@@ -136,7 +136,7 @@ AccordionTrigger.displayName = "AccordionTrigger";
|
|
|
136
136
|
* `--accordion-panel-height`) that wraps its children in an inner padded `<div>`.
|
|
137
137
|
*/
|
|
138
138
|
const AccordionContent = React.forwardRef((componentProps, forwardRef) => {
|
|
139
|
-
const { className, children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$
|
|
139
|
+
const { className, children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$31);
|
|
140
140
|
return /* @__PURE__ */ jsx(Accordion$1.Panel, _objectSpread2(_objectSpread2({
|
|
141
141
|
ref: forwardRef,
|
|
142
142
|
"data-slot": "accordion-content",
|
|
@@ -175,32 +175,32 @@ function _asyncToGenerator(n) {
|
|
|
175
175
|
}
|
|
176
176
|
//#endregion
|
|
177
177
|
//#region src/components/audio-player.tsx
|
|
178
|
-
const _excluded$
|
|
178
|
+
const _excluded$61 = [
|
|
179
179
|
"src",
|
|
180
180
|
"defaultPlaybackRate",
|
|
181
181
|
"preload",
|
|
182
182
|
"crossOrigin",
|
|
183
183
|
"children"
|
|
184
184
|
];
|
|
185
|
-
const _excluded2$
|
|
185
|
+
const _excluded2$43 = [
|
|
186
186
|
"variant",
|
|
187
187
|
"className",
|
|
188
188
|
"children"
|
|
189
189
|
];
|
|
190
|
-
const _excluded3$
|
|
190
|
+
const _excluded3$35 = [
|
|
191
191
|
"variant",
|
|
192
192
|
"render",
|
|
193
193
|
"onClick"
|
|
194
194
|
];
|
|
195
|
-
const _excluded4$
|
|
195
|
+
const _excluded4$30 = [
|
|
196
196
|
"className",
|
|
197
197
|
"step",
|
|
198
198
|
"playheadHeight"
|
|
199
199
|
];
|
|
200
|
-
const _excluded5$
|
|
201
|
-
const _excluded6$
|
|
202
|
-
const _excluded7$
|
|
203
|
-
const _excluded8$
|
|
200
|
+
const _excluded5$24 = ["className"];
|
|
201
|
+
const _excluded6$20 = ["mode", "className"];
|
|
202
|
+
const _excluded7$12 = ["className"];
|
|
203
|
+
const _excluded8$11 = [
|
|
204
204
|
"speeds",
|
|
205
205
|
"variant",
|
|
206
206
|
"render",
|
|
@@ -303,7 +303,7 @@ function useAnimationFrameLoop(callback) {
|
|
|
303
303
|
* ```
|
|
304
304
|
*/
|
|
305
305
|
function Audio(_ref) {
|
|
306
|
-
let { src, defaultPlaybackRate = 1, preload = "metadata", crossOrigin, children } = _ref, divProps = _objectWithoutProperties(_ref, _excluded$
|
|
306
|
+
let { src, defaultPlaybackRate = 1, preload = "metadata", crossOrigin, children } = _ref, divProps = _objectWithoutProperties(_ref, _excluded$61);
|
|
307
307
|
const audioRef = React.useRef(null);
|
|
308
308
|
const playPromiseRef = React.useRef(null);
|
|
309
309
|
const managerCtx = React.useContext(AudioPlayerManagerContext);
|
|
@@ -497,7 +497,7 @@ function formatTime(seconds) {
|
|
|
497
497
|
return `${m}:${pad(s)}`;
|
|
498
498
|
}
|
|
499
499
|
function AudioPlayerRow(_ref5) {
|
|
500
|
-
let { variant = "default", className, children } = _ref5, props = _objectWithoutProperties(_ref5, _excluded2$
|
|
500
|
+
let { variant = "default", className, children } = _ref5, props = _objectWithoutProperties(_ref5, _excluded2$43);
|
|
501
501
|
return /* @__PURE__ */ jsx(AudioPlayerRowContext.Provider, {
|
|
502
502
|
value: { variant },
|
|
503
503
|
children: /* @__PURE__ */ jsx("div", _objectSpread2(_objectSpread2({
|
|
@@ -507,7 +507,7 @@ function AudioPlayerRow(_ref5) {
|
|
|
507
507
|
});
|
|
508
508
|
}
|
|
509
509
|
const AudioPlayerButton = React.forwardRef(function AudioPlayerButton(_ref6, forwardRef) {
|
|
510
|
-
let { variant, render, onClick } = _ref6, props = _objectWithoutProperties(_ref6, _excluded3$
|
|
510
|
+
let { variant, render, onClick } = _ref6, props = _objectWithoutProperties(_ref6, _excluded3$35);
|
|
511
511
|
const rowCtx = React.useContext(AudioPlayerRowContext);
|
|
512
512
|
const resolvedVariant = variant !== null && variant !== void 0 ? variant : rowCtx.variant;
|
|
513
513
|
const { isPlaying, isEnded, isBuffering, activeItem, seek, play, toggle } = useAudioPlayer();
|
|
@@ -546,7 +546,7 @@ const AudioPlayerButton = React.forwardRef(function AudioPlayerButton(_ref6, for
|
|
|
546
546
|
});
|
|
547
547
|
AudioPlayerButton.displayName = "AudioPlayerButton";
|
|
548
548
|
function AudioPlayerBar(_ref7) {
|
|
549
|
-
let { className, step = .25, playheadHeight } = _ref7, props = _objectWithoutProperties(_ref7, _excluded4$
|
|
549
|
+
let { className, step = .25, playheadHeight } = _ref7, props = _objectWithoutProperties(_ref7, _excluded4$30);
|
|
550
550
|
const { duration, seek, isPlaying, pause, play } = useAudioPlayer();
|
|
551
551
|
const currentTime = useAudioPlayerTime();
|
|
552
552
|
const wasPlayingRef = React.useRef(false);
|
|
@@ -629,7 +629,7 @@ function AudioPlayerBar(_ref7) {
|
|
|
629
629
|
* ```
|
|
630
630
|
*/
|
|
631
631
|
function AudioPlayerCurrentTime(_ref8) {
|
|
632
|
-
let { className } = _ref8, props = _objectWithoutProperties(_ref8, _excluded5$
|
|
632
|
+
let { className } = _ref8, props = _objectWithoutProperties(_ref8, _excluded5$24);
|
|
633
633
|
const elapsed = useAudioPlayerTime();
|
|
634
634
|
return /* @__PURE__ */ jsx("span", _objectSpread2(_objectSpread2({
|
|
635
635
|
"data-slot": "audio-player-current-time",
|
|
@@ -650,7 +650,7 @@ function AudioPlayerCurrentTime(_ref8) {
|
|
|
650
650
|
* ```
|
|
651
651
|
*/
|
|
652
652
|
function AudioPlayerTime(_ref9) {
|
|
653
|
-
let { mode = "compact", className } = _ref9, props = _objectWithoutProperties(_ref9, _excluded6$
|
|
653
|
+
let { mode = "compact", className } = _ref9, props = _objectWithoutProperties(_ref9, _excluded6$20);
|
|
654
654
|
const { isPlaying, duration } = useAudioPlayer();
|
|
655
655
|
const elapsed = useAudioPlayerTime();
|
|
656
656
|
if (mode === "full") return /* @__PURE__ */ jsxs("span", _objectSpread2(_objectSpread2({
|
|
@@ -679,7 +679,7 @@ function AudioPlayerTime(_ref9) {
|
|
|
679
679
|
* ```
|
|
680
680
|
*/
|
|
681
681
|
function AudioPlayerDuration(_ref10) {
|
|
682
|
-
let { className } = _ref10, props = _objectWithoutProperties(_ref10, _excluded7$
|
|
682
|
+
let { className } = _ref10, props = _objectWithoutProperties(_ref10, _excluded7$12);
|
|
683
683
|
const { duration } = useAudioPlayer();
|
|
684
684
|
return /* @__PURE__ */ jsx("span", _objectSpread2(_objectSpread2({
|
|
685
685
|
"data-slot": "audio-player-duration",
|
|
@@ -708,7 +708,7 @@ const DEFAULT_SPEEDS = [
|
|
|
708
708
|
.5
|
|
709
709
|
];
|
|
710
710
|
const AudioPlayerSpeed = React.forwardRef(function AudioPlayerSpeed(_ref11, forwardRef) {
|
|
711
|
-
let { speeds = DEFAULT_SPEEDS, variant, render, onClick, className } = _ref11, props = _objectWithoutProperties(_ref11, _excluded8$
|
|
711
|
+
let { speeds = DEFAULT_SPEEDS, variant, render, onClick, className } = _ref11, props = _objectWithoutProperties(_ref11, _excluded8$11);
|
|
712
712
|
const rowCtx = React.useContext(AudioPlayerRowContext);
|
|
713
713
|
const resolvedVariant = variant !== null && variant !== void 0 ? variant : rowCtx.variant;
|
|
714
714
|
const { playbackRate, setPlaybackRate } = useAudioPlayer();
|
|
@@ -827,14 +827,14 @@ function _extends() {
|
|
|
827
827
|
}
|
|
828
828
|
//#endregion
|
|
829
829
|
//#region src/components/alert-dialog.tsx
|
|
830
|
-
const _excluded$
|
|
831
|
-
const _excluded2$
|
|
832
|
-
const _excluded3$
|
|
833
|
-
const _excluded4$
|
|
834
|
-
const _excluded5$
|
|
835
|
-
const _excluded6$
|
|
836
|
-
const _excluded7$
|
|
837
|
-
const _excluded8$
|
|
830
|
+
const _excluded$60 = ["className"];
|
|
831
|
+
const _excluded2$42 = ["className", "size"];
|
|
832
|
+
const _excluded3$34 = ["className"];
|
|
833
|
+
const _excluded4$29 = ["className"];
|
|
834
|
+
const _excluded5$23 = ["className"];
|
|
835
|
+
const _excluded6$19 = ["className"];
|
|
836
|
+
const _excluded7$11 = ["className"];
|
|
837
|
+
const _excluded8$10 = ["className"];
|
|
838
838
|
const _excluded9$8 = [
|
|
839
839
|
"className",
|
|
840
840
|
"variant",
|
|
@@ -894,7 +894,7 @@ function AlertDialogPortal(componentProps) {
|
|
|
894
894
|
* `AlertDialogContent`.
|
|
895
895
|
*/
|
|
896
896
|
const AlertDialogOverlay = React.forwardRef((componentProps, forwardRef) => {
|
|
897
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
897
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$60);
|
|
898
898
|
return /* @__PURE__ */ jsx(AlertDialog$1.Backdrop, _objectSpread2({
|
|
899
899
|
ref: forwardRef,
|
|
900
900
|
"data-slot": "alert-dialog-overlay",
|
|
@@ -911,7 +911,7 @@ AlertDialogOverlay.displayName = "AlertDialogOverlay";
|
|
|
911
911
|
* `'default'` widens on larger screens. Default: `'default'`.
|
|
912
912
|
*/
|
|
913
913
|
const AlertDialogContent = React.forwardRef((componentProps, forwardRef) => {
|
|
914
|
-
const { className, size = "default" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
914
|
+
const { className, size = "default" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$42);
|
|
915
915
|
return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [/* @__PURE__ */ jsx(AlertDialogOverlay, {}), /* @__PURE__ */ jsx(AlertDialog$1.Popup, _objectSpread2({
|
|
916
916
|
ref: forwardRef,
|
|
917
917
|
"data-slot": "alert-dialog-content",
|
|
@@ -925,7 +925,7 @@ AlertDialogContent.displayName = "AlertDialogContent";
|
|
|
925
925
|
* Renders a `<div>` with a responsive grid layout.
|
|
926
926
|
*/
|
|
927
927
|
const AlertDialogHeader = React.forwardRef((componentProps, forwardRef) => {
|
|
928
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$
|
|
928
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$34);
|
|
929
929
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
930
930
|
ref: forwardRef,
|
|
931
931
|
"data-slot": "alert-dialog-header",
|
|
@@ -939,7 +939,7 @@ AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
|
939
939
|
* screens.
|
|
940
940
|
*/
|
|
941
941
|
const AlertDialogFooter = React.forwardRef((componentProps, forwardRef) => {
|
|
942
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$
|
|
942
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$29);
|
|
943
943
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
944
944
|
ref: forwardRef,
|
|
945
945
|
"data-slot": "alert-dialog-footer",
|
|
@@ -952,7 +952,7 @@ AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
|
952
952
|
* title in the header. Renders a `<div>` sized for a small icon.
|
|
953
953
|
*/
|
|
954
954
|
const AlertDialogMedia = React.forwardRef((componentProps, forwardRef) => {
|
|
955
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded5$
|
|
955
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded5$23);
|
|
956
956
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
957
957
|
ref: forwardRef,
|
|
958
958
|
"data-slot": "alert-dialog-media",
|
|
@@ -965,7 +965,7 @@ AlertDialogMedia.displayName = "AlertDialogMedia";
|
|
|
965
965
|
* announced to assistive technology when the dialog opens.
|
|
966
966
|
*/
|
|
967
967
|
const AlertDialogTitle = React.forwardRef((componentProps, forwardRef) => {
|
|
968
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$
|
|
968
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$19);
|
|
969
969
|
return /* @__PURE__ */ jsx(AlertDialog$1.Title, _objectSpread2({
|
|
970
970
|
ref: forwardRef,
|
|
971
971
|
"data-slot": "alert-dialog-title",
|
|
@@ -978,7 +978,7 @@ AlertDialogTitle.displayName = "AlertDialogTitle";
|
|
|
978
978
|
* `<p>` element linked to the dialog for assistive technology.
|
|
979
979
|
*/
|
|
980
980
|
const AlertDialogDescription = React.forwardRef((componentProps, forwardRef) => {
|
|
981
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded7$
|
|
981
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded7$11);
|
|
982
982
|
return /* @__PURE__ */ jsx(AlertDialog$1.Description, _objectSpread2({
|
|
983
983
|
ref: forwardRef,
|
|
984
984
|
"data-slot": "alert-dialog-description",
|
|
@@ -991,7 +991,7 @@ AlertDialogDescription.displayName = "AlertDialogDescription";
|
|
|
991
991
|
* the DS `Button` (a `<button>`); accepts all `Button` props.
|
|
992
992
|
*/
|
|
993
993
|
const AlertDialogAction = React.forwardRef((componentProps, forwardRef) => {
|
|
994
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded8$
|
|
994
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded8$10);
|
|
995
995
|
return /* @__PURE__ */ jsx(Button, _objectSpread2({
|
|
996
996
|
ref: forwardRef,
|
|
997
997
|
"data-slot": "alert-dialog-action",
|
|
@@ -1021,16 +1021,22 @@ const AlertDialogCancel = React.forwardRef((componentProps, forwardRef) => {
|
|
|
1021
1021
|
AlertDialogCancel.displayName = "AlertDialogCancel";
|
|
1022
1022
|
//#endregion
|
|
1023
1023
|
//#region src/components/alert.tsx
|
|
1024
|
-
const _excluded$
|
|
1025
|
-
const _excluded2$
|
|
1026
|
-
const _excluded3$
|
|
1027
|
-
const _excluded4$
|
|
1024
|
+
const _excluded$59 = ["className", "variant"];
|
|
1025
|
+
const _excluded2$41 = ["className"];
|
|
1026
|
+
const _excluded3$33 = ["className"];
|
|
1027
|
+
const _excluded4$28 = ["className"];
|
|
1028
1028
|
/**
|
|
1029
1029
|
* `class-variance-authority` config for the {@link Alert} container. The
|
|
1030
1030
|
* `variant` option (`default` | `info` | `success` | `warning` | `error`,
|
|
1031
1031
|
* default `default`) sets the background, border, and icon colour scheme.
|
|
1032
|
+
*
|
|
1033
|
+
* With an `AlertAction` but no `AlertDescription` the row is sized by the
|
|
1034
|
+
* button (32px) while the icon and title are only 24px tall, so `items-start`
|
|
1035
|
+
* would leave them 4px above the optical centre. The `my-1` / `py-1` band gives
|
|
1036
|
+
* both a 32px box, which centres single-line content on the button and keeps
|
|
1037
|
+
* the icon level with the first line when the title wraps.
|
|
1032
1038
|
*/
|
|
1033
|
-
const alertVariants = cva("relative grid w-full items-start gap-x-2 gap-y-0.5 rounded-3xl border px-4 py-4 text-card-foreground text-sm has-[>svg]:has-data-[slot=alert-action]:grid-cols-[calc(var(--spacing)*6)_1fr_auto] has-[>svg]:grid-cols-[calc(var(--spacing)*6)_1fr] has-data-[slot=alert-action]:grid-cols-[1fr_auto] has-[>svg]:gap-x-4 [&>svg]:size-6", {
|
|
1039
|
+
const alertVariants = cva("relative grid w-full items-start gap-x-2 gap-y-0.5 rounded-3xl border px-4 py-4 text-card-foreground text-sm has-[>svg]:has-data-[slot=alert-action]:grid-cols-[calc(var(--spacing)*6)_1fr_auto] has-[>svg]:grid-cols-[calc(var(--spacing)*6)_1fr] has-data-[slot=alert-action]:grid-cols-[1fr_auto] has-[>svg]:gap-x-4 [&>svg]:size-6 sm:has-data-[slot=alert-action]:not-has-data-[slot=alert-description]:[&>svg]:my-1 sm:has-data-[slot=alert-action]:not-has-data-[slot=alert-description]:[&>[data-slot=alert-title]]:py-1", {
|
|
1034
1040
|
defaultVariants: { variant: "default" },
|
|
1035
1041
|
variants: { variant: {
|
|
1036
1042
|
default: "bg-card border-border [&>svg]:text-muted-foreground",
|
|
@@ -1058,7 +1064,7 @@ const alertVariants = cva("relative grid w-full items-start gap-x-2 gap-y-0.5 ro
|
|
|
1058
1064
|
* ```
|
|
1059
1065
|
*/
|
|
1060
1066
|
const Alert = React.forwardRef((componentProps, forwardRef) => {
|
|
1061
|
-
const { className, variant } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
1067
|
+
const { className, variant } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$59);
|
|
1062
1068
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
1063
1069
|
ref: forwardRef,
|
|
1064
1070
|
className: cn(alertVariants({ variant }), className),
|
|
@@ -1076,7 +1082,7 @@ Alert.displayName = "Alert";
|
|
|
1076
1082
|
* ```
|
|
1077
1083
|
*/
|
|
1078
1084
|
const AlertTitle = React.forwardRef((componentProps, forwardRef) => {
|
|
1079
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
1085
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$41);
|
|
1080
1086
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
1081
1087
|
ref: forwardRef,
|
|
1082
1088
|
className: cn("font-medium leading-6 [svg~&]:col-start-2", className),
|
|
@@ -1094,7 +1100,7 @@ AlertTitle.displayName = "AlertTitle";
|
|
|
1094
1100
|
* ```
|
|
1095
1101
|
*/
|
|
1096
1102
|
const AlertDescription = React.forwardRef((componentProps, forwardRef) => {
|
|
1097
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$
|
|
1103
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$33);
|
|
1098
1104
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
1099
1105
|
ref: forwardRef,
|
|
1100
1106
|
className: cn("flex flex-col gap-2.5 text-muted-foreground [svg~&]:col-start-2", className),
|
|
@@ -1106,7 +1112,9 @@ AlertDescription.displayName = "AlertDescription";
|
|
|
1106
1112
|
* Container for action controls (e.g. buttons) inside an {@link Alert}.
|
|
1107
1113
|
*
|
|
1108
1114
|
* Renders a `<div>` positioned by the alert grid to the trailing side on wide
|
|
1109
|
-
* layouts and below the content on narrow ones.
|
|
1115
|
+
* layouts and below the content on narrow ones. It spans both content rows only
|
|
1116
|
+
* when an `AlertDescription` is present; otherwise there is no second row to
|
|
1117
|
+
* span and creating one would offset the icon and title.
|
|
1110
1118
|
*
|
|
1111
1119
|
* @example
|
|
1112
1120
|
* ```tsx
|
|
@@ -1116,34 +1124,34 @@ AlertDescription.displayName = "AlertDescription";
|
|
|
1116
1124
|
* ```
|
|
1117
1125
|
*/
|
|
1118
1126
|
const AlertAction = React.forwardRef((componentProps, forwardRef) => {
|
|
1119
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$
|
|
1127
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$28);
|
|
1120
1128
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
1121
1129
|
ref: forwardRef,
|
|
1122
|
-
className: cn("flex gap-1 max-sm:col-start-2 max-sm:mt-2 sm:row-start-1 sm:row-end-
|
|
1130
|
+
className: cn("flex gap-1 max-sm:col-start-2 max-sm:mt-2 sm:row-start-1 sm:row-end-2 sm:self-center sm:[[data-slot=alert-description]~&]:row-end-3 sm:[[data-slot=alert-description]~&]:col-start-2 sm:[[data-slot=alert-title]~&]:col-start-2 sm:[svg~&]:col-start-2 sm:[svg~[data-slot=alert-description]~&]:col-start-3 sm:[svg~[data-slot=alert-title]~&]:col-start-3", className),
|
|
1123
1131
|
"data-slot": "alert-action"
|
|
1124
1132
|
}, props));
|
|
1125
1133
|
});
|
|
1126
1134
|
AlertAction.displayName = "AlertAction";
|
|
1127
1135
|
//#endregion
|
|
1128
1136
|
//#region src/components/attachment.tsx
|
|
1129
|
-
const _excluded$
|
|
1137
|
+
const _excluded$58 = [
|
|
1130
1138
|
"className",
|
|
1131
1139
|
"state",
|
|
1132
1140
|
"size",
|
|
1133
1141
|
"orientation",
|
|
1134
1142
|
"block"
|
|
1135
1143
|
];
|
|
1136
|
-
const _excluded2$
|
|
1137
|
-
const _excluded3$
|
|
1138
|
-
const _excluded4$
|
|
1139
|
-
const _excluded5$
|
|
1140
|
-
const _excluded6$
|
|
1141
|
-
const _excluded7$
|
|
1144
|
+
const _excluded2$40 = ["className", "variant"];
|
|
1145
|
+
const _excluded3$32 = ["className"];
|
|
1146
|
+
const _excluded4$27 = ["className"];
|
|
1147
|
+
const _excluded5$22 = ["className"];
|
|
1148
|
+
const _excluded6$18 = ["className"];
|
|
1149
|
+
const _excluded7$10 = [
|
|
1142
1150
|
"className",
|
|
1143
1151
|
"variant",
|
|
1144
1152
|
"size"
|
|
1145
1153
|
];
|
|
1146
|
-
const _excluded8$
|
|
1154
|
+
const _excluded8$9 = [
|
|
1147
1155
|
"className",
|
|
1148
1156
|
"render",
|
|
1149
1157
|
"type"
|
|
@@ -1189,7 +1197,7 @@ const attachmentVariants = cva("group/attachment relative flex w-fit max-w-full
|
|
|
1189
1197
|
* ```
|
|
1190
1198
|
*/
|
|
1191
1199
|
const Attachment = React.forwardRef((componentProps, forwardRef) => {
|
|
1192
|
-
const { className, state = "done", size = "default", orientation = "horizontal", block = false } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
1200
|
+
const { className, state = "done", size = "default", orientation = "horizontal", block = false } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$58);
|
|
1193
1201
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
1194
1202
|
ref: forwardRef,
|
|
1195
1203
|
"data-slot": "attachment",
|
|
@@ -1216,7 +1224,7 @@ const attachmentMediaVariants = cva("relative flex aspect-square w-10 shrink-0 i
|
|
|
1216
1224
|
* or an image thumbnail (`variant="image"`). Renders a `<div>`.
|
|
1217
1225
|
*/
|
|
1218
1226
|
const AttachmentMedia = React.forwardRef((componentProps, forwardRef) => {
|
|
1219
|
-
const { className, variant = "icon" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
1227
|
+
const { className, variant = "icon" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$40);
|
|
1220
1228
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
1221
1229
|
ref: forwardRef,
|
|
1222
1230
|
"data-slot": "attachment-media",
|
|
@@ -1230,7 +1238,7 @@ AttachmentMedia.displayName = "AttachmentMedia";
|
|
|
1230
1238
|
* `AttachmentDescription`. Renders a `<div>`.
|
|
1231
1239
|
*/
|
|
1232
1240
|
const AttachmentContent = React.forwardRef((componentProps, forwardRef) => {
|
|
1233
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$
|
|
1241
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$32);
|
|
1234
1242
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
1235
1243
|
ref: forwardRef,
|
|
1236
1244
|
"data-slot": "attachment-content",
|
|
@@ -1243,7 +1251,7 @@ AttachmentContent.displayName = "AttachmentContent";
|
|
|
1243
1251
|
* `Attachment` is in the `uploading` or `processing` state.
|
|
1244
1252
|
*/
|
|
1245
1253
|
const AttachmentTitle = React.forwardRef((componentProps, forwardRef) => {
|
|
1246
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$
|
|
1254
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$27);
|
|
1247
1255
|
return /* @__PURE__ */ jsx("span", _objectSpread2({
|
|
1248
1256
|
ref: forwardRef,
|
|
1249
1257
|
"data-slot": "attachment-title",
|
|
@@ -1256,7 +1264,7 @@ AttachmentTitle.displayName = "AttachmentTitle";
|
|
|
1256
1264
|
* truncating `<span>`; turns destructive while the parent is in the `error` state.
|
|
1257
1265
|
*/
|
|
1258
1266
|
const AttachmentDescription = React.forwardRef((componentProps, forwardRef) => {
|
|
1259
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded5$
|
|
1267
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded5$22);
|
|
1260
1268
|
return /* @__PURE__ */ jsx("span", _objectSpread2({
|
|
1261
1269
|
ref: forwardRef,
|
|
1262
1270
|
"data-slot": "attachment-description",
|
|
@@ -1269,7 +1277,7 @@ AttachmentDescription.displayName = "AttachmentDescription";
|
|
|
1269
1277
|
* `orientation="vertical"` it floats to the top-right corner of the card.
|
|
1270
1278
|
*/
|
|
1271
1279
|
const AttachmentActions = React.forwardRef((componentProps, forwardRef) => {
|
|
1272
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$
|
|
1280
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$18);
|
|
1273
1281
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
1274
1282
|
ref: forwardRef,
|
|
1275
1283
|
"data-slot": "attachment-actions",
|
|
@@ -1283,7 +1291,7 @@ AttachmentActions.displayName = "AttachmentActions";
|
|
|
1283
1291
|
* Always provide an `aria-label` since it renders an icon-only button.
|
|
1284
1292
|
*/
|
|
1285
1293
|
const AttachmentAction = React.forwardRef((componentProps, forwardRef) => {
|
|
1286
|
-
const { className, variant, size = "icon-sm" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded7$
|
|
1294
|
+
const { className, variant, size = "icon-sm" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded7$10);
|
|
1287
1295
|
return /* @__PURE__ */ jsx(Button, _objectSpread2({
|
|
1288
1296
|
ref: forwardRef,
|
|
1289
1297
|
"data-slot": "attachment-action",
|
|
@@ -1305,7 +1313,7 @@ AttachmentAction.displayName = "AttachmentAction";
|
|
|
1305
1313
|
* ```
|
|
1306
1314
|
*/
|
|
1307
1315
|
const AttachmentTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
1308
|
-
const { className, render, type } = componentProps, props = _objectWithoutProperties(componentProps, _excluded8$
|
|
1316
|
+
const { className, render, type } = componentProps, props = _objectWithoutProperties(componentProps, _excluded8$9);
|
|
1309
1317
|
return useRender({
|
|
1310
1318
|
defaultTagName: "button",
|
|
1311
1319
|
props: mergeProps({
|
|
@@ -1341,12 +1349,12 @@ const AttachmentGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
|
1341
1349
|
AttachmentGroup.displayName = "AttachmentGroup";
|
|
1342
1350
|
//#endregion
|
|
1343
1351
|
//#region src/components/avatar.tsx
|
|
1344
|
-
const _excluded$
|
|
1345
|
-
const _excluded2$
|
|
1346
|
-
const _excluded3$
|
|
1347
|
-
const _excluded4$
|
|
1348
|
-
const _excluded5$
|
|
1349
|
-
const _excluded6$
|
|
1352
|
+
const _excluded$57 = ["className", "size"];
|
|
1353
|
+
const _excluded2$39 = ["className"];
|
|
1354
|
+
const _excluded3$31 = ["className"];
|
|
1355
|
+
const _excluded4$26 = ["className"];
|
|
1356
|
+
const _excluded5$21 = ["className"];
|
|
1357
|
+
const _excluded6$17 = ["className"];
|
|
1350
1358
|
/**
|
|
1351
1359
|
* Circular container that displays a user or entity image with a text/icon fallback.
|
|
1352
1360
|
* Renders the Base UI `Avatar.Root` element; place `AvatarImage`, `AvatarFallback`, and
|
|
@@ -1361,7 +1369,7 @@ const _excluded6$16 = ["className"];
|
|
|
1361
1369
|
* ```
|
|
1362
1370
|
*/
|
|
1363
1371
|
const Avatar = React.forwardRef((componentProps, forwardRef) => {
|
|
1364
|
-
const { className, size = "default" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
1372
|
+
const { className, size = "default" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$57);
|
|
1365
1373
|
return /* @__PURE__ */ jsx(Avatar$1.Root, _objectSpread2({
|
|
1366
1374
|
ref: forwardRef,
|
|
1367
1375
|
"data-slot": "avatar",
|
|
@@ -1375,7 +1383,7 @@ Avatar.displayName = "Avatar";
|
|
|
1375
1383
|
* automatically when the source fails to load, revealing the `AvatarFallback`.
|
|
1376
1384
|
*/
|
|
1377
1385
|
const AvatarImage = React.forwardRef((componentProps, forwardRef) => {
|
|
1378
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
1386
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$39);
|
|
1379
1387
|
return /* @__PURE__ */ jsx(Avatar$1.Image, _objectSpread2({
|
|
1380
1388
|
ref: forwardRef,
|
|
1381
1389
|
"data-slot": "avatar-image",
|
|
@@ -1388,7 +1396,7 @@ AvatarImage.displayName = "AvatarImage";
|
|
|
1388
1396
|
* Renders the Base UI `Avatar.Fallback` element.
|
|
1389
1397
|
*/
|
|
1390
1398
|
const AvatarFallback = React.forwardRef((componentProps, forwardRef) => {
|
|
1391
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$
|
|
1399
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$31);
|
|
1392
1400
|
return /* @__PURE__ */ jsx(Avatar$1.Fallback, _objectSpread2({
|
|
1393
1401
|
ref: forwardRef,
|
|
1394
1402
|
"data-slot": "avatar-fallback",
|
|
@@ -1401,7 +1409,7 @@ AvatarFallback.displayName = "AvatarFallback";
|
|
|
1401
1409
|
* Renders a `<span>`; its size and inner icon visibility scale with the parent avatar size.
|
|
1402
1410
|
*/
|
|
1403
1411
|
const AvatarBadge = React.forwardRef((componentProps, forwardRef) => {
|
|
1404
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$
|
|
1412
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$26);
|
|
1405
1413
|
return /* @__PURE__ */ jsx("span", _objectSpread2({
|
|
1406
1414
|
ref: forwardRef,
|
|
1407
1415
|
"data-slot": "avatar-badge",
|
|
@@ -1423,7 +1431,7 @@ AvatarBadge.displayName = "AvatarBadge";
|
|
|
1423
1431
|
* ```
|
|
1424
1432
|
*/
|
|
1425
1433
|
const AvatarGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
1426
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded5$
|
|
1434
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded5$21);
|
|
1427
1435
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
1428
1436
|
ref: forwardRef,
|
|
1429
1437
|
"data-slot": "avatar-group",
|
|
@@ -1436,7 +1444,7 @@ AvatarGroup.displayName = "AvatarGroup";
|
|
|
1436
1444
|
* Renders a circular `<div>` sized to match the group's avatars.
|
|
1437
1445
|
*/
|
|
1438
1446
|
const AvatarGroupCount = React.forwardRef((componentProps, forwardRef) => {
|
|
1439
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$
|
|
1447
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$17);
|
|
1440
1448
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
1441
1449
|
ref: forwardRef,
|
|
1442
1450
|
"data-slot": "avatar-group-count",
|
|
@@ -1446,7 +1454,7 @@ const AvatarGroupCount = React.forwardRef((componentProps, forwardRef) => {
|
|
|
1446
1454
|
AvatarGroupCount.displayName = "AvatarGroupCount";
|
|
1447
1455
|
//#endregion
|
|
1448
1456
|
//#region src/components/counter-badge.tsx
|
|
1449
|
-
const _excluded$
|
|
1457
|
+
const _excluded$56 = [
|
|
1450
1458
|
"className",
|
|
1451
1459
|
"variant",
|
|
1452
1460
|
"render"
|
|
@@ -1475,7 +1483,7 @@ const counterBadgeVariants = cva("group/counter-badge inline-flex h-5 min-w-5 sh
|
|
|
1475
1483
|
* ```
|
|
1476
1484
|
*/
|
|
1477
1485
|
const CounterBadge = React.forwardRef((componentProps, forwardRef) => {
|
|
1478
|
-
const { className, variant = "default", render } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
1486
|
+
const { className, variant = "default", render } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$56);
|
|
1479
1487
|
return useRender({
|
|
1480
1488
|
defaultTagName: "span",
|
|
1481
1489
|
props: mergeProps({
|
|
@@ -1492,22 +1500,54 @@ const CounterBadge = React.forwardRef((componentProps, forwardRef) => {
|
|
|
1492
1500
|
CounterBadge.displayName = "CounterBadge";
|
|
1493
1501
|
//#endregion
|
|
1494
1502
|
//#region src/components/badge.tsx
|
|
1495
|
-
const _excluded$
|
|
1503
|
+
const _excluded$55 = [
|
|
1496
1504
|
"className",
|
|
1497
1505
|
"size",
|
|
1498
1506
|
"color",
|
|
1499
1507
|
"tone",
|
|
1500
1508
|
"overflowMode",
|
|
1501
1509
|
"legacyColor",
|
|
1510
|
+
"customColor",
|
|
1502
1511
|
"render",
|
|
1503
1512
|
"children"
|
|
1504
1513
|
];
|
|
1505
|
-
const _excluded2$
|
|
1506
|
-
const _excluded3$
|
|
1514
|
+
const _excluded2$38 = ["className"];
|
|
1515
|
+
const _excluded3$30 = ["className", "size"];
|
|
1507
1516
|
const OVERLAY_DARK = "bg-[linear-gradient(0deg,var(--badge-film-10)_0%,var(--badge-film-10)_100%)]";
|
|
1508
1517
|
const OVERLAY_MEDIUM_DARK = "bg-[linear-gradient(0deg,var(--badge-film-40)_0%,var(--badge-film-40)_100%)]";
|
|
1509
1518
|
const OVERLAY_MEDIUM_LIGHT = "bg-[linear-gradient(0deg,var(--badge-film-60)_0%,var(--badge-film-60)_100%)]";
|
|
1510
1519
|
const OVERLAY_LIGHT = "bg-[linear-gradient(0deg,var(--badge-film-80)_0%,var(--badge-film-80)_100%)]";
|
|
1520
|
+
const CUSTOM_HEX_PATTERN = /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
1521
|
+
/** Parse a hex into 0-255 channels, or `null` when it is not a hex colour. */
|
|
1522
|
+
function parseHexChannels(input) {
|
|
1523
|
+
const match = CUSTOM_HEX_PATTERN.exec(input.trim());
|
|
1524
|
+
if (!match) return null;
|
|
1525
|
+
const digits = match[1];
|
|
1526
|
+
const full = digits.length === 3 ? digits.split("").map((digit) => digit + digit).join("") : digits;
|
|
1527
|
+
return [
|
|
1528
|
+
Number.parseInt(full.slice(0, 2), 16),
|
|
1529
|
+
Number.parseInt(full.slice(2, 4), 16),
|
|
1530
|
+
Number.parseInt(full.slice(4, 6), 16)
|
|
1531
|
+
];
|
|
1532
|
+
}
|
|
1533
|
+
/**
|
|
1534
|
+
* Foreground for an arbitrary fill, chosen by WCAG contrast rather than a guess.
|
|
1535
|
+
*
|
|
1536
|
+
* The break-even point between black and white text is a relative luminance of
|
|
1537
|
+
* ~0.179: above it black wins the contrast ratio, below it white does. Solving
|
|
1538
|
+
* `1.05 / (L + 0.05) = (L + 0.05) / 0.05` gives `L = 0.1791`.
|
|
1539
|
+
*
|
|
1540
|
+
* @internal Exported for `badge.test.ts`; not part of the package API.
|
|
1541
|
+
*/
|
|
1542
|
+
function contrastTextClass(hex) {
|
|
1543
|
+
const channels = parseHexChannels(hex);
|
|
1544
|
+
if (!channels) return "text-black";
|
|
1545
|
+
const [r, g, b] = channels.map((channel) => {
|
|
1546
|
+
const u = channel / 255;
|
|
1547
|
+
return u <= .03928 ? u / 12.92 : Math.pow((u + .055) / 1.055, 2.4);
|
|
1548
|
+
});
|
|
1549
|
+
return .2126 * r + .7152 * g + .0722 * b > .1791 ? "text-black" : "text-white";
|
|
1550
|
+
}
|
|
1511
1551
|
/** `cva` recipe for the Badge/Chip container — drives the `size`, `color`, and `tone` classes. */
|
|
1512
1552
|
const badgeVariants = cva("group/badge inline-flex w-fit shrink-0 items-center justify-center gap-1 rounded-md font-medium transition-all focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:shrink-0 [&>svg]:pointer-events-none", {
|
|
1513
1553
|
variants: {
|
|
@@ -1690,7 +1730,7 @@ const badgeVariants = cva("group/badge inline-flex w-fit shrink-0 items-center j
|
|
|
1690
1730
|
* removable token inside an input/combobox, use `Chip`.
|
|
1691
1731
|
*
|
|
1692
1732
|
* Pick a constrained DS `color` + `tone` (no freeform hex) — defaults to
|
|
1693
|
-
* `charcoal` / `light` — or pass
|
|
1733
|
+
* `charcoal` / `light` — or pass any stored hex via `customColor`. Icons are
|
|
1694
1734
|
* composed as children (auto-sized per `size`).
|
|
1695
1735
|
*
|
|
1696
1736
|
* `overflowMode` controls how content wider than the badge is handled:
|
|
@@ -1698,11 +1738,16 @@ const badgeVariants = cva("group/badge inline-flex w-fit shrink-0 items-center j
|
|
|
1698
1738
|
* width at `max-w-36` and ellipsizes text content.
|
|
1699
1739
|
*/
|
|
1700
1740
|
const Badge = React.forwardRef((componentProps, forwardRef) => {
|
|
1701
|
-
const { className, size = "default", color, tone, overflowMode = "none", legacyColor, render, children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
1741
|
+
const { className, size = "default", color, tone, overflowMode = "none", legacyColor, customColor, render, children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$55);
|
|
1702
1742
|
const resolved = legacyColor ? resolveTagColor(legacyColor) : {
|
|
1703
1743
|
color,
|
|
1704
1744
|
tone
|
|
1705
1745
|
};
|
|
1746
|
+
const customChannels = customColor ? parseHexChannels(customColor) : null;
|
|
1747
|
+
const customStyle = customChannels ? {
|
|
1748
|
+
backgroundColor: `rgb(${customChannels[0]}, ${customChannels[1]}, ${customChannels[2]})`,
|
|
1749
|
+
backgroundImage: "none"
|
|
1750
|
+
} : void 0;
|
|
1706
1751
|
const content = overflowMode === "truncate" ? React.Children.map(children, (child) => typeof child === "string" || typeof child === "number" ? /* @__PURE__ */ jsx("span", {
|
|
1707
1752
|
className: "min-w-0 truncate",
|
|
1708
1753
|
children: child
|
|
@@ -1715,7 +1760,8 @@ const Badge = React.forwardRef((componentProps, forwardRef) => {
|
|
|
1715
1760
|
color: resolved.color,
|
|
1716
1761
|
tone: resolved.tone,
|
|
1717
1762
|
overflowMode
|
|
1718
|
-
}), className),
|
|
1763
|
+
}), customChannels && contrastTextClass(customColor), className),
|
|
1764
|
+
style: customStyle,
|
|
1719
1765
|
ref: forwardRef,
|
|
1720
1766
|
children: content
|
|
1721
1767
|
}, props),
|
|
@@ -1732,7 +1778,7 @@ Badge.displayName = "Badge";
|
|
|
1732
1778
|
* (`flex flex-wrap`, `gap-2`); pair with `BadgeGroupCount` to show an overflow tally.
|
|
1733
1779
|
*/
|
|
1734
1780
|
const BadgeGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
1735
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
1781
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$38);
|
|
1736
1782
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
1737
1783
|
ref: forwardRef,
|
|
1738
1784
|
"data-slot": "badge-group",
|
|
@@ -1752,7 +1798,7 @@ const badgeGroupCountVariants = cva("rounded-md", {
|
|
|
1752
1798
|
* sized to match the group's badges (`size` mirrors `Badge`'s `default` / `lg`).
|
|
1753
1799
|
*/
|
|
1754
1800
|
const BadgeGroupCount = React.forwardRef((componentProps, forwardRef) => {
|
|
1755
|
-
const { className, size = "default" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$
|
|
1801
|
+
const { className, size = "default" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$30);
|
|
1756
1802
|
return /* @__PURE__ */ jsx(CounterBadge, _objectSpread2({
|
|
1757
1803
|
ref: forwardRef,
|
|
1758
1804
|
"data-slot": "badge-group-count",
|
|
@@ -1850,7 +1896,7 @@ function resolveTagColor(hex) {
|
|
|
1850
1896
|
}
|
|
1851
1897
|
//#endregion
|
|
1852
1898
|
//#region src/components/banner.tsx
|
|
1853
|
-
const _excluded$
|
|
1899
|
+
const _excluded$54 = [
|
|
1854
1900
|
"className",
|
|
1855
1901
|
"variant",
|
|
1856
1902
|
"borderDirection"
|
|
@@ -1897,7 +1943,7 @@ const bannerVariants = cva("relative grid w-full items-start gap-x-2 gap-y-0.5 p
|
|
|
1897
1943
|
* ```
|
|
1898
1944
|
*/
|
|
1899
1945
|
const Banner = React.forwardRef((componentProps, forwardRef) => {
|
|
1900
|
-
const { className, variant, borderDirection } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
1946
|
+
const { className, variant, borderDirection } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$54);
|
|
1901
1947
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
1902
1948
|
ref: forwardRef,
|
|
1903
1949
|
className: cn(bannerVariants({
|
|
@@ -2097,7 +2143,7 @@ const NotificationSlot = React.forwardRef((componentProps, forwardRef) => {
|
|
|
2097
2143
|
NotificationSlot.displayName = "NotificationSlot";
|
|
2098
2144
|
//#endregion
|
|
2099
2145
|
//#region src/components/separator.tsx
|
|
2100
|
-
const _excluded$
|
|
2146
|
+
const _excluded$53 = ["className", "orientation"];
|
|
2101
2147
|
/**
|
|
2102
2148
|
* Visual and semantic divider between content. Renders Base UI's `Separator`
|
|
2103
2149
|
* primitive as a `<div role="separator">` line.
|
|
@@ -2110,7 +2156,7 @@ const _excluded$52 = ["className", "orientation"];
|
|
|
2110
2156
|
* ```
|
|
2111
2157
|
*/
|
|
2112
2158
|
const Separator = React.forwardRef((componentProps, forwardRef) => {
|
|
2113
|
-
const { className, orientation = "horizontal" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
2159
|
+
const { className, orientation = "horizontal" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$53);
|
|
2114
2160
|
return /* @__PURE__ */ jsx(Separator$1, _objectSpread2({
|
|
2115
2161
|
ref: forwardRef,
|
|
2116
2162
|
"data-slot": "separator",
|
|
@@ -2122,9 +2168,9 @@ const Separator = React.forwardRef((componentProps, forwardRef) => {
|
|
|
2122
2168
|
Separator.displayName = "Separator";
|
|
2123
2169
|
//#endregion
|
|
2124
2170
|
//#region src/components/button-group.tsx
|
|
2125
|
-
const _excluded$
|
|
2126
|
-
const _excluded2$
|
|
2127
|
-
const _excluded3$
|
|
2171
|
+
const _excluded$52 = ["className", "orientation"];
|
|
2172
|
+
const _excluded2$37 = ["className", "render"];
|
|
2173
|
+
const _excluded3$29 = ["className", "orientation"];
|
|
2128
2174
|
/** `cva` variant definitions for {@link ButtonGroup} — resolves `orientation` (horizontal / vertical) into class names. */
|
|
2129
2175
|
const buttonGroupVariants = cva("flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1", {
|
|
2130
2176
|
variants: { orientation: {
|
|
@@ -2146,7 +2192,7 @@ const buttonGroupVariants = cva("flex w-fit items-stretch *:focus-visible:relati
|
|
|
2146
2192
|
* ```
|
|
2147
2193
|
*/
|
|
2148
2194
|
const ButtonGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
2149
|
-
const { className, orientation } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
2195
|
+
const { className, orientation } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$52);
|
|
2150
2196
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
2151
2197
|
ref: forwardRef,
|
|
2152
2198
|
role: "group",
|
|
@@ -2161,7 +2207,7 @@ ButtonGroup.displayName = "ButtonGroup";
|
|
|
2161
2207
|
* Renders a `<div>` by default (overridable via `render`), styled to match adjacent buttons.
|
|
2162
2208
|
*/
|
|
2163
2209
|
const ButtonGroupText = React.forwardRef((componentProps, forwardRef) => {
|
|
2164
|
-
const { className, render } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
2210
|
+
const { className, render } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$37);
|
|
2165
2211
|
return useRender({
|
|
2166
2212
|
defaultTagName: "div",
|
|
2167
2213
|
props: mergeProps({
|
|
@@ -2178,7 +2224,7 @@ ButtonGroupText.displayName = "ButtonGroupText";
|
|
|
2178
2224
|
* `orientation="vertical"`) sized to stretch across the group.
|
|
2179
2225
|
*/
|
|
2180
2226
|
const ButtonGroupSeparator = React.forwardRef((componentProps, forwardRef) => {
|
|
2181
|
-
const { className, orientation = "vertical" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$
|
|
2227
|
+
const { className, orientation = "vertical" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$29);
|
|
2182
2228
|
return /* @__PURE__ */ jsx(Separator, _objectSpread2({
|
|
2183
2229
|
ref: forwardRef,
|
|
2184
2230
|
"data-slot": "button-group-separator",
|
|
@@ -2189,14 +2235,14 @@ const ButtonGroupSeparator = React.forwardRef((componentProps, forwardRef) => {
|
|
|
2189
2235
|
ButtonGroupSeparator.displayName = "ButtonGroupSeparator";
|
|
2190
2236
|
//#endregion
|
|
2191
2237
|
//#region src/components/select.tsx
|
|
2192
|
-
const _excluded$
|
|
2193
|
-
const _excluded2$
|
|
2194
|
-
const _excluded3$
|
|
2238
|
+
const _excluded$51 = ["className"];
|
|
2239
|
+
const _excluded2$36 = ["className"];
|
|
2240
|
+
const _excluded3$28 = [
|
|
2195
2241
|
"className",
|
|
2196
2242
|
"size",
|
|
2197
2243
|
"children"
|
|
2198
2244
|
];
|
|
2199
|
-
const _excluded4$
|
|
2245
|
+
const _excluded4$25 = [
|
|
2200
2246
|
"className",
|
|
2201
2247
|
"children",
|
|
2202
2248
|
"side",
|
|
@@ -2205,10 +2251,10 @@ const _excluded4$24 = [
|
|
|
2205
2251
|
"alignOffset",
|
|
2206
2252
|
"alignItemWithTrigger"
|
|
2207
2253
|
];
|
|
2208
|
-
const _excluded5$
|
|
2209
|
-
const _excluded6$
|
|
2210
|
-
const _excluded7$
|
|
2211
|
-
const _excluded8$
|
|
2254
|
+
const _excluded5$20 = ["className"];
|
|
2255
|
+
const _excluded6$16 = ["className", "children"];
|
|
2256
|
+
const _excluded7$9 = ["className"];
|
|
2257
|
+
const _excluded8$8 = ["className"];
|
|
2212
2258
|
const _excluded9$6 = ["className"];
|
|
2213
2259
|
/** `class-variance-authority` variants for the select trigger; exposes the `size` variant. */
|
|
2214
2260
|
const selectTriggerVariants = cva("flex w-fit items-center justify-between rounded-md border border-input py-2 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive focus-visible:aria-invalid:ring-3 focus-visible:aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 bg-background dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:focus-visible:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
@@ -2241,7 +2287,7 @@ const Select = Select$1.Root;
|
|
|
2241
2287
|
* `<div role="group">`.
|
|
2242
2288
|
*/
|
|
2243
2289
|
const SelectGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
2244
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
2290
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$51);
|
|
2245
2291
|
return /* @__PURE__ */ jsx(Select$1.Group, _objectSpread2({
|
|
2246
2292
|
ref: forwardRef,
|
|
2247
2293
|
"data-slot": "select-group",
|
|
@@ -2254,7 +2300,7 @@ SelectGroup.displayName = "SelectGroup";
|
|
|
2254
2300
|
* UI's `Select.Value`. Renders no element of its own — it forwards its rendered content.
|
|
2255
2301
|
*/
|
|
2256
2302
|
function SelectValue(componentProps) {
|
|
2257
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
2303
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$36);
|
|
2258
2304
|
return /* @__PURE__ */ jsx(Select$1.Value, _objectSpread2({
|
|
2259
2305
|
"data-slot": "select-value",
|
|
2260
2306
|
className: cn("flex flex-1 text-left", className)
|
|
@@ -2266,7 +2312,7 @@ function SelectValue(componentProps) {
|
|
|
2266
2312
|
* (`'default' | 'sm'`) controls height and padding and defaults to `'default'`.
|
|
2267
2313
|
*/
|
|
2268
2314
|
const SelectTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
2269
|
-
const { className, size = "default", children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$
|
|
2315
|
+
const { className, size = "default", children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$28);
|
|
2270
2316
|
return /* @__PURE__ */ jsxs(Select$1.Trigger, _objectSpread2(_objectSpread2({
|
|
2271
2317
|
ref: forwardRef,
|
|
2272
2318
|
"data-slot": "select-trigger",
|
|
@@ -2282,7 +2328,7 @@ SelectTrigger.displayName = "SelectTrigger";
|
|
|
2282
2328
|
* `'start'`, `alignOffset` `0`, `alignItemWithTrigger` `false`.
|
|
2283
2329
|
*/
|
|
2284
2330
|
const SelectContent = React.forwardRef((componentProps, forwardRef) => {
|
|
2285
|
-
const { className, children, side = "bottom", sideOffset = 4, align = "start", alignOffset = 0, alignItemWithTrigger = false } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$
|
|
2331
|
+
const { className, children, side = "bottom", sideOffset = 4, align = "start", alignOffset = 0, alignItemWithTrigger = false } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$25);
|
|
2286
2332
|
return /* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsx(Select$1.Positioner, {
|
|
2287
2333
|
positionMethod: "fixed",
|
|
2288
2334
|
side,
|
|
@@ -2310,7 +2356,7 @@ SelectContent.displayName = "SelectContent";
|
|
|
2310
2356
|
* `<div>` in muted, small type.
|
|
2311
2357
|
*/
|
|
2312
2358
|
const SelectLabel = React.forwardRef((componentProps, forwardRef) => {
|
|
2313
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded5$
|
|
2359
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded5$20);
|
|
2314
2360
|
return /* @__PURE__ */ jsx(Select$1.GroupLabel, _objectSpread2({
|
|
2315
2361
|
ref: forwardRef,
|
|
2316
2362
|
"data-slot": "select-label",
|
|
@@ -2323,7 +2369,7 @@ SelectLabel.displayName = "SelectLabel";
|
|
|
2323
2369
|
* `<div role="option">` holding the item text plus a trailing check indicator shown when selected.
|
|
2324
2370
|
*/
|
|
2325
2371
|
const SelectItem = React.forwardRef((componentProps, forwardRef) => {
|
|
2326
|
-
const { className, children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$
|
|
2372
|
+
const { className, children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$16);
|
|
2327
2373
|
return /* @__PURE__ */ jsxs(Select$1.Item, _objectSpread2(_objectSpread2({
|
|
2328
2374
|
ref: forwardRef,
|
|
2329
2375
|
"data-slot": "select-item",
|
|
@@ -2343,7 +2389,7 @@ SelectItem.displayName = "SelectItem";
|
|
|
2343
2389
|
* `<div>` styled as a thin horizontal rule.
|
|
2344
2390
|
*/
|
|
2345
2391
|
const SelectSeparator = React.forwardRef((componentProps, forwardRef) => {
|
|
2346
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded7$
|
|
2392
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded7$9);
|
|
2347
2393
|
return /* @__PURE__ */ jsx(Select$1.Separator, _objectSpread2({
|
|
2348
2394
|
ref: forwardRef,
|
|
2349
2395
|
"data-slot": "select-separator",
|
|
@@ -2356,7 +2402,7 @@ SelectSeparator.displayName = "SelectSeparator";
|
|
|
2356
2402
|
* Base UI's `Select.ScrollUpArrow`. Renders a `<div>` containing an up-chevron icon.
|
|
2357
2403
|
*/
|
|
2358
2404
|
const SelectScrollUpButton = React.forwardRef((componentProps, forwardRef) => {
|
|
2359
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded8$
|
|
2405
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded8$8);
|
|
2360
2406
|
return /* @__PURE__ */ jsx(Select$1.ScrollUpArrow, _objectSpread2(_objectSpread2({
|
|
2361
2407
|
ref: forwardRef,
|
|
2362
2408
|
"data-slot": "select-scroll-up-button",
|
|
@@ -2379,7 +2425,7 @@ const SelectScrollDownButton = React.forwardRef((componentProps, forwardRef) =>
|
|
|
2379
2425
|
SelectScrollDownButton.displayName = "SelectScrollDownButton";
|
|
2380
2426
|
//#endregion
|
|
2381
2427
|
//#region src/components/calendar.tsx
|
|
2382
|
-
const _excluded$
|
|
2428
|
+
const _excluded$50 = [
|
|
2383
2429
|
"className",
|
|
2384
2430
|
"classNames",
|
|
2385
2431
|
"showOutsideDays",
|
|
@@ -2389,10 +2435,10 @@ const _excluded$49 = [
|
|
|
2389
2435
|
"formatters",
|
|
2390
2436
|
"components"
|
|
2391
2437
|
];
|
|
2392
|
-
const _excluded2$
|
|
2393
|
-
const _excluded3$
|
|
2394
|
-
const _excluded4$
|
|
2395
|
-
const _excluded5$
|
|
2438
|
+
const _excluded2$35 = ["className", "rootRef"];
|
|
2439
|
+
const _excluded3$27 = ["className", "orientation"];
|
|
2440
|
+
const _excluded4$24 = ["children"];
|
|
2441
|
+
const _excluded5$19 = [
|
|
2396
2442
|
"className",
|
|
2397
2443
|
"day",
|
|
2398
2444
|
"modifiers",
|
|
@@ -2515,7 +2561,7 @@ function isInsideCalendarDropdown(event) {
|
|
|
2515
2561
|
* ```
|
|
2516
2562
|
*/
|
|
2517
2563
|
function Calendar(_ref) {
|
|
2518
|
-
let { className, classNames, showOutsideDays = true, captionLayout = "label", buttonVariant = "ghost", locale, formatters, components } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
2564
|
+
let { className, classNames, showOutsideDays = true, captionLayout = "label", buttonVariant = "ghost", locale, formatters, components } = _ref, props = _objectWithoutProperties(_ref, _excluded$50);
|
|
2519
2565
|
const defaultClassNames = getDefaultClassNames();
|
|
2520
2566
|
return /* @__PURE__ */ jsx(DayPicker, _objectSpread2({
|
|
2521
2567
|
showOutsideDays,
|
|
@@ -2552,7 +2598,7 @@ function Calendar(_ref) {
|
|
|
2552
2598
|
}, classNames),
|
|
2553
2599
|
components: _objectSpread2({
|
|
2554
2600
|
Root: (_ref2) => {
|
|
2555
|
-
let { className: rootClassName, rootRef } = _ref2, rootProps = _objectWithoutProperties(_ref2, _excluded2$
|
|
2601
|
+
let { className: rootClassName, rootRef } = _ref2, rootProps = _objectWithoutProperties(_ref2, _excluded2$35);
|
|
2556
2602
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
2557
2603
|
"data-slot": "calendar",
|
|
2558
2604
|
ref: rootRef,
|
|
@@ -2560,7 +2606,7 @@ function Calendar(_ref) {
|
|
|
2560
2606
|
}, rootProps));
|
|
2561
2607
|
},
|
|
2562
2608
|
Chevron: (_ref3) => {
|
|
2563
|
-
let { className: chevronClassName, orientation } = _ref3, chevronProps = _objectWithoutProperties(_ref3, _excluded3$
|
|
2609
|
+
let { className: chevronClassName, orientation } = _ref3, chevronProps = _objectWithoutProperties(_ref3, _excluded3$27);
|
|
2564
2610
|
if (orientation === "left") return /* @__PURE__ */ jsx(ChevronLeftIcon, _objectSpread2({ className: cn("size-4", chevronClassName) }, chevronProps));
|
|
2565
2611
|
if (orientation === "right") return /* @__PURE__ */ jsx(ChevronRightIcon, _objectSpread2({ className: cn("size-4", chevronClassName) }, chevronProps));
|
|
2566
2612
|
return /* @__PURE__ */ jsx(ChevronDownIcon, _objectSpread2({ className: cn("size-4", chevronClassName) }, chevronProps));
|
|
@@ -2571,7 +2617,7 @@ function Calendar(_ref) {
|
|
|
2571
2617
|
return /* @__PURE__ */ jsx(CalendarDayButton, _objectSpread2({ locale }, dayButtonProps));
|
|
2572
2618
|
},
|
|
2573
2619
|
WeekNumber: (_ref5) => {
|
|
2574
|
-
let { children } = _ref5, weekNumberProps = _objectWithoutProperties(_ref5, _excluded4$
|
|
2620
|
+
let { children } = _ref5, weekNumberProps = _objectWithoutProperties(_ref5, _excluded4$24);
|
|
2575
2621
|
return /* @__PURE__ */ jsx("td", _objectSpread2(_objectSpread2({}, weekNumberProps), {}, { children: /* @__PURE__ */ jsx("div", {
|
|
2576
2622
|
className: "flex size-(--cell-size) items-center justify-center text-center",
|
|
2577
2623
|
children
|
|
@@ -2591,7 +2637,7 @@ function Calendar(_ref) {
|
|
|
2591
2637
|
* custom DayButton slot would otherwise drop.
|
|
2592
2638
|
*/
|
|
2593
2639
|
function CalendarDayButton(_ref6) {
|
|
2594
|
-
let { className: dayClassName, day, modifiers, locale } = _ref6, props = _objectWithoutProperties(_ref6, _excluded5$
|
|
2640
|
+
let { className: dayClassName, day, modifiers, locale } = _ref6, props = _objectWithoutProperties(_ref6, _excluded5$19);
|
|
2595
2641
|
const defaultClassNames = getDefaultClassNames();
|
|
2596
2642
|
const ref = React.useRef(null);
|
|
2597
2643
|
React.useEffect(() => {
|
|
@@ -2612,13 +2658,13 @@ function CalendarDayButton(_ref6) {
|
|
|
2612
2658
|
}
|
|
2613
2659
|
//#endregion
|
|
2614
2660
|
//#region src/components/card.tsx
|
|
2615
|
-
const _excluded$
|
|
2616
|
-
const _excluded2$
|
|
2617
|
-
const _excluded3$
|
|
2618
|
-
const _excluded4$
|
|
2619
|
-
const _excluded5$
|
|
2620
|
-
const _excluded6$
|
|
2621
|
-
const _excluded7$
|
|
2661
|
+
const _excluded$49 = ["className", "size"];
|
|
2662
|
+
const _excluded2$34 = ["className"];
|
|
2663
|
+
const _excluded3$26 = ["className"];
|
|
2664
|
+
const _excluded4$23 = ["className"];
|
|
2665
|
+
const _excluded5$18 = ["className"];
|
|
2666
|
+
const _excluded6$15 = ["className"];
|
|
2667
|
+
const _excluded7$8 = ["className"];
|
|
2622
2668
|
/**
|
|
2623
2669
|
* Root container for a card. Renders a `<div data-slot="card">` with border, background, and
|
|
2624
2670
|
* vertical spacing; child parts (`CardHeader`, `CardContent`, `CardFooter`, …) compose inside it.
|
|
@@ -2636,7 +2682,7 @@ const _excluded7$7 = ["className"];
|
|
|
2636
2682
|
* ```
|
|
2637
2683
|
*/
|
|
2638
2684
|
const Card = React.forwardRef((componentProps, forwardRef) => {
|
|
2639
|
-
const { className, size = "default" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
2685
|
+
const { className, size = "default" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$49);
|
|
2640
2686
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
2641
2687
|
ref: forwardRef,
|
|
2642
2688
|
"data-slot": "card",
|
|
@@ -2650,7 +2696,7 @@ Card.displayName = "Card";
|
|
|
2650
2696
|
* description, and an optional `CardAction` in a grid.
|
|
2651
2697
|
*/
|
|
2652
2698
|
const CardHeader = React.forwardRef((componentProps, forwardRef) => {
|
|
2653
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
2699
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$34);
|
|
2654
2700
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
2655
2701
|
ref: forwardRef,
|
|
2656
2702
|
"data-slot": "card-header",
|
|
@@ -2662,7 +2708,7 @@ CardHeader.displayName = "CardHeader";
|
|
|
2662
2708
|
* Card title. Renders a `<div data-slot="card-title">` with emphasized title typography.
|
|
2663
2709
|
*/
|
|
2664
2710
|
const CardTitle = React.forwardRef((componentProps, forwardRef) => {
|
|
2665
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$
|
|
2711
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$26);
|
|
2666
2712
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
2667
2713
|
ref: forwardRef,
|
|
2668
2714
|
"data-slot": "card-title",
|
|
@@ -2675,7 +2721,7 @@ CardTitle.displayName = "CardTitle";
|
|
|
2675
2721
|
* foreground color.
|
|
2676
2722
|
*/
|
|
2677
2723
|
const CardDescription = React.forwardRef((componentProps, forwardRef) => {
|
|
2678
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$
|
|
2724
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$23);
|
|
2679
2725
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
2680
2726
|
ref: forwardRef,
|
|
2681
2727
|
"data-slot": "card-description",
|
|
@@ -2688,7 +2734,7 @@ CardDescription.displayName = "CardDescription";
|
|
|
2688
2734
|
* `<div data-slot="card-action">` positioned in the header grid.
|
|
2689
2735
|
*/
|
|
2690
2736
|
const CardAction = React.forwardRef((componentProps, forwardRef) => {
|
|
2691
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded5$
|
|
2737
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded5$18);
|
|
2692
2738
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
2693
2739
|
ref: forwardRef,
|
|
2694
2740
|
"data-slot": "card-action",
|
|
@@ -2700,7 +2746,7 @@ CardAction.displayName = "CardAction";
|
|
|
2700
2746
|
* Main body region of a card. Renders a `<div data-slot="card-content">` with horizontal padding.
|
|
2701
2747
|
*/
|
|
2702
2748
|
const CardContent = React.forwardRef((componentProps, forwardRef) => {
|
|
2703
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$
|
|
2749
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$15);
|
|
2704
2750
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
2705
2751
|
ref: forwardRef,
|
|
2706
2752
|
"data-slot": "card-content",
|
|
@@ -2713,7 +2759,7 @@ CardContent.displayName = "CardContent";
|
|
|
2713
2759
|
* background.
|
|
2714
2760
|
*/
|
|
2715
2761
|
const CardFooter = React.forwardRef((componentProps, forwardRef) => {
|
|
2716
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded7$
|
|
2762
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded7$8);
|
|
2717
2763
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
2718
2764
|
ref: forwardRef,
|
|
2719
2765
|
"data-slot": "card-footer",
|
|
@@ -2723,7 +2769,7 @@ const CardFooter = React.forwardRef((componentProps, forwardRef) => {
|
|
|
2723
2769
|
CardFooter.displayName = "CardFooter";
|
|
2724
2770
|
//#endregion
|
|
2725
2771
|
//#region src/components/carousel.tsx
|
|
2726
|
-
const _excluded$
|
|
2772
|
+
const _excluded$48 = [
|
|
2727
2773
|
"orientation",
|
|
2728
2774
|
"opts",
|
|
2729
2775
|
"setApi",
|
|
@@ -2731,14 +2777,14 @@ const _excluded$47 = [
|
|
|
2731
2777
|
"className",
|
|
2732
2778
|
"children"
|
|
2733
2779
|
];
|
|
2734
|
-
const _excluded2$
|
|
2735
|
-
const _excluded3$
|
|
2736
|
-
const _excluded4$
|
|
2780
|
+
const _excluded2$33 = ["className"];
|
|
2781
|
+
const _excluded3$25 = ["className"];
|
|
2782
|
+
const _excluded4$22 = [
|
|
2737
2783
|
"className",
|
|
2738
2784
|
"variant",
|
|
2739
2785
|
"size"
|
|
2740
2786
|
];
|
|
2741
|
-
const _excluded5$
|
|
2787
|
+
const _excluded5$17 = [
|
|
2742
2788
|
"className",
|
|
2743
2789
|
"variant",
|
|
2744
2790
|
"size"
|
|
@@ -2766,7 +2812,7 @@ function useCarousel() {
|
|
|
2766
2812
|
* ```
|
|
2767
2813
|
*/
|
|
2768
2814
|
const Carousel = React.forwardRef((componentProps, forwardRef) => {
|
|
2769
|
-
const { orientation = "horizontal", opts, setApi, plugins, className, children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
2815
|
+
const { orientation = "horizontal", opts, setApi, plugins, className, children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$48);
|
|
2770
2816
|
const [carouselRef, api] = useEmblaCarousel(_objectSpread2(_objectSpread2({}, opts), {}, { axis: orientation === "horizontal" ? "x" : "y" }), plugins);
|
|
2771
2817
|
const [canScrollPrev, setCanScrollPrev] = React.useState(false);
|
|
2772
2818
|
const [canScrollNext, setCanScrollNext] = React.useState(false);
|
|
@@ -2830,7 +2876,7 @@ Carousel.displayName = "Carousel";
|
|
|
2830
2876
|
* (the Embla ref holder) containing a flex `<div>` that lays out the items.
|
|
2831
2877
|
*/
|
|
2832
2878
|
const CarouselContent = React.forwardRef((componentProps, forwardRef) => {
|
|
2833
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
2879
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$33);
|
|
2834
2880
|
const { carouselRef, orientation } = useCarousel();
|
|
2835
2881
|
return /* @__PURE__ */ jsx("div", {
|
|
2836
2882
|
ref: carouselRef,
|
|
@@ -2848,7 +2894,7 @@ CarouselContent.displayName = "CarouselContent";
|
|
|
2848
2894
|
* padding based on the carousel orientation.
|
|
2849
2895
|
*/
|
|
2850
2896
|
const CarouselItem = React.forwardRef((componentProps, forwardRef) => {
|
|
2851
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$
|
|
2897
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$25);
|
|
2852
2898
|
const { orientation } = useCarousel();
|
|
2853
2899
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
2854
2900
|
ref: forwardRef,
|
|
@@ -2864,7 +2910,7 @@ CarouselItem.displayName = "CarouselItem";
|
|
|
2864
2910
|
* Renders a rounded icon `Button` (`<button>`) positioned outside the viewport.
|
|
2865
2911
|
*/
|
|
2866
2912
|
const CarouselPrevious = React.forwardRef((componentProps, forwardRef) => {
|
|
2867
|
-
const { className, variant = "outline", size = "sm" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$
|
|
2913
|
+
const { className, variant = "outline", size = "sm" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$22);
|
|
2868
2914
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
2869
2915
|
return /* @__PURE__ */ jsxs(Button, _objectSpread2(_objectSpread2({
|
|
2870
2916
|
ref: forwardRef,
|
|
@@ -2885,7 +2931,7 @@ CarouselPrevious.displayName = "CarouselPrevious";
|
|
|
2885
2931
|
* Renders a rounded icon `Button` (`<button>`) positioned outside the viewport.
|
|
2886
2932
|
*/
|
|
2887
2933
|
const CarouselNext = React.forwardRef((componentProps, forwardRef) => {
|
|
2888
|
-
const { className, variant = "outline", size = "sm" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded5$
|
|
2934
|
+
const { className, variant = "outline", size = "sm" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded5$17);
|
|
2889
2935
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
2890
2936
|
return /* @__PURE__ */ jsxs(Button, _objectSpread2(_objectSpread2({
|
|
2891
2937
|
ref: forwardRef,
|
|
@@ -2903,8 +2949,8 @@ const CarouselNext = React.forwardRef((componentProps, forwardRef) => {
|
|
|
2903
2949
|
CarouselNext.displayName = "CarouselNext";
|
|
2904
2950
|
//#endregion
|
|
2905
2951
|
//#region src/components/chip.tsx
|
|
2906
|
-
const _excluded$
|
|
2907
|
-
const _excluded2$
|
|
2952
|
+
const _excluded$47 = ["className", "children"];
|
|
2953
|
+
const _excluded2$32 = [
|
|
2908
2954
|
"className",
|
|
2909
2955
|
"children",
|
|
2910
2956
|
"color",
|
|
@@ -2977,7 +3023,7 @@ const chipGlowVariants = cva("", {
|
|
|
2977
3023
|
* combobox can reuse the exact treatment for its Base-UI-bound chips.
|
|
2978
3024
|
*/
|
|
2979
3025
|
const ChipRemove = React.forwardRef((componentProps, forwardRef) => {
|
|
2980
|
-
const { className, children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
3026
|
+
const { className, children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$47);
|
|
2981
3027
|
return /* @__PURE__ */ jsx(Button, _objectSpread2(_objectSpread2({
|
|
2982
3028
|
ref: forwardRef,
|
|
2983
3029
|
type: "button",
|
|
@@ -2999,7 +3045,7 @@ ChipRemove.displayName = "ChipRemove";
|
|
|
2999
3045
|
* `'none'`) since chips sit in fixed-width input/combobox rows.
|
|
3000
3046
|
*/
|
|
3001
3047
|
const Chip = React.forwardRef((componentProps, forwardRef) => {
|
|
3002
|
-
const { className, children, color, tone = "medium-light", overflowMode = "truncate", legacyColor, glow } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
3048
|
+
const { className, children, color, tone = "medium-light", overflowMode = "truncate", legacyColor, glow } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$32);
|
|
3003
3049
|
const glowColor = legacyColor ? resolveTagColor(legacyColor).color : color;
|
|
3004
3050
|
return /* @__PURE__ */ jsx(Badge, _objectSpread2(_objectSpread2({
|
|
3005
3051
|
ref: forwardRef,
|
|
@@ -3064,7 +3110,7 @@ const CollapsibleContent = React.forwardRef((componentProps, forwardRef) => {
|
|
|
3064
3110
|
CollapsibleContent.displayName = "CollapsibleContent";
|
|
3065
3111
|
//#endregion
|
|
3066
3112
|
//#region src/components/input.tsx
|
|
3067
|
-
const _excluded$
|
|
3113
|
+
const _excluded$46 = [
|
|
3068
3114
|
"className",
|
|
3069
3115
|
"type",
|
|
3070
3116
|
"block"
|
|
@@ -3084,7 +3130,7 @@ const inputVariants = cva("text-foreground file:text-foreground placeholder:text
|
|
|
3084
3130
|
* ```
|
|
3085
3131
|
*/
|
|
3086
3132
|
const Input = React.forwardRef((componentProps, forwardRef) => {
|
|
3087
|
-
const { className, type, block } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
3133
|
+
const { className, type, block } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$46);
|
|
3088
3134
|
return /* @__PURE__ */ jsx("input", _objectSpread2(_objectSpread2({
|
|
3089
3135
|
type,
|
|
3090
3136
|
"data-slot": "input",
|
|
@@ -3096,114 +3142,1161 @@ const Input = React.forwardRef((componentProps, forwardRef) => {
|
|
|
3096
3142
|
});
|
|
3097
3143
|
Input.displayName = "Input";
|
|
3098
3144
|
//#endregion
|
|
3099
|
-
//#region src/components/
|
|
3100
|
-
const _excluded$
|
|
3145
|
+
//#region src/components/popover.tsx
|
|
3146
|
+
const _excluded$45 = [
|
|
3147
|
+
"className",
|
|
3148
|
+
"align",
|
|
3149
|
+
"alignOffset",
|
|
3150
|
+
"side",
|
|
3151
|
+
"sideOffset",
|
|
3152
|
+
"anchor"
|
|
3153
|
+
];
|
|
3154
|
+
const _excluded2$31 = ["className"];
|
|
3155
|
+
const _excluded3$24 = ["className"];
|
|
3156
|
+
const _excluded4$21 = ["className"];
|
|
3101
3157
|
/**
|
|
3102
|
-
*
|
|
3103
|
-
*
|
|
3104
|
-
*
|
|
3105
|
-
* (`field-sizing: content`) and shows focus-ring and `aria-invalid` error
|
|
3106
|
-
* styling.
|
|
3158
|
+
* Root container for a popover, wrapping Base UI's `Popover.Root`. Manages
|
|
3159
|
+
* open/close state and renders no DOM element — place `PopoverTrigger` and
|
|
3160
|
+
* `PopoverContent` inside it.
|
|
3107
3161
|
*
|
|
3108
3162
|
* @example
|
|
3109
3163
|
* ```tsx
|
|
3110
|
-
* <
|
|
3164
|
+
* <Popover>
|
|
3165
|
+
* <PopoverTrigger render={<Button variant="outline" />}>Open</PopoverTrigger>
|
|
3166
|
+
* <PopoverContent>Popover body</PopoverContent>
|
|
3167
|
+
* </Popover>
|
|
3111
3168
|
* ```
|
|
3112
3169
|
*/
|
|
3113
|
-
|
|
3114
|
-
const
|
|
3115
|
-
return /* @__PURE__ */ jsx(
|
|
3116
|
-
|
|
3117
|
-
"data-slot": "textarea",
|
|
3118
|
-
className: cn("border-input text-foreground placeholder:text-muted-foreground hover:aria-invalid:border-destructive focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3 aria-invalid:border-destructive focus-visible:aria-invalid:ring-destructive/20 focus-visible:aria-invalid:ring-3 dark:focus-visible:aria-invalid:ring-destructive/40 dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-background px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 dark:disabled:bg-input/80 md:text-sm", className)
|
|
3119
|
-
}, props));
|
|
3120
|
-
});
|
|
3121
|
-
Textarea.displayName = "Textarea";
|
|
3122
|
-
//#endregion
|
|
3123
|
-
//#region src/components/input-group.tsx
|
|
3124
|
-
const _excluded$43 = ["className"];
|
|
3125
|
-
const _excluded2$30 = ["className", "align"];
|
|
3126
|
-
const _excluded3$23 = [
|
|
3127
|
-
"className",
|
|
3128
|
-
"type",
|
|
3129
|
-
"variant",
|
|
3130
|
-
"size"
|
|
3131
|
-
];
|
|
3132
|
-
const _excluded4$20 = ["className"];
|
|
3133
|
-
const _excluded5$15 = ["className"];
|
|
3134
|
-
const _excluded6$13 = ["className"];
|
|
3170
|
+
function Popover(componentProps) {
|
|
3171
|
+
const props = _extends({}, (_objectDestructuringEmpty(componentProps), componentProps));
|
|
3172
|
+
return /* @__PURE__ */ jsx(Popover$1.Root, _objectSpread2({ "data-slot": "popover" }, props));
|
|
3173
|
+
}
|
|
3135
3174
|
/**
|
|
3136
|
-
* The
|
|
3137
|
-
*
|
|
3138
|
-
* affix-driven input padding adjustments. Exported so `NumericInput` renders an
|
|
3139
|
-
* identical container without nesting inside `InputGroup`.
|
|
3175
|
+
* The element that toggles the popover, wrapping `Popover.Trigger`.
|
|
3176
|
+
* Renders a `<button>` by default; use `render` to swap the element.
|
|
3140
3177
|
*/
|
|
3141
|
-
const
|
|
3178
|
+
const PopoverTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
3179
|
+
return /* @__PURE__ */ jsx(Popover$1.Trigger, _objectSpread2({
|
|
3180
|
+
"data-slot": "popover-trigger",
|
|
3181
|
+
ref: forwardRef
|
|
3182
|
+
}, componentProps));
|
|
3183
|
+
});
|
|
3184
|
+
PopoverTrigger.displayName = "PopoverTrigger";
|
|
3142
3185
|
/**
|
|
3143
|
-
*
|
|
3144
|
-
*
|
|
3145
|
-
*
|
|
3146
|
-
*
|
|
3147
|
-
* `InputGroupButton`, or `InputGroupText` children inside it.
|
|
3186
|
+
* A button that closes the enclosing popover.
|
|
3187
|
+
* Renders a `<button>` element. Required inside `<PopoverContent>` when
|
|
3188
|
+
* `modal='trap-focus'` is set on the `<Popover>` root so that Base UI
|
|
3189
|
+
* engages the focus trap (focusManagerModal = modal !== false && hasClosePart).
|
|
3148
3190
|
*
|
|
3149
3191
|
* @example
|
|
3150
3192
|
* ```tsx
|
|
3151
|
-
* <
|
|
3152
|
-
* <
|
|
3153
|
-
*
|
|
3154
|
-
*
|
|
3155
|
-
* <InputGroupInput placeholder="Search…" />
|
|
3156
|
-
* </InputGroup>
|
|
3193
|
+
* <PopoverContent>
|
|
3194
|
+
* <PopoverClose className="sr-only">Close</PopoverClose>
|
|
3195
|
+
* {children}
|
|
3196
|
+
* </PopoverContent>
|
|
3157
3197
|
* ```
|
|
3158
3198
|
*/
|
|
3159
|
-
const
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
ref: forwardRef
|
|
3163
|
-
|
|
3164
|
-
role: "group",
|
|
3165
|
-
className: cn(inputGroupShellClassName, className)
|
|
3166
|
-
}, props));
|
|
3199
|
+
const PopoverClose = React.forwardRef((componentProps, forwardRef) => {
|
|
3200
|
+
return /* @__PURE__ */ jsx(Popover$1.Close, _objectSpread2({
|
|
3201
|
+
"data-slot": "popover-close",
|
|
3202
|
+
ref: forwardRef
|
|
3203
|
+
}, componentProps));
|
|
3167
3204
|
});
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3205
|
+
PopoverClose.displayName = "PopoverClose";
|
|
3206
|
+
/**
|
|
3207
|
+
* The floating panel shown when the popover is open. Composes
|
|
3208
|
+
* `Popover.Portal → Popover.Positioner → Popover.Popup` into a single part and
|
|
3209
|
+
* renders a `<div>` popup. Positioning props (`side`, `sideOffset`, `align`,
|
|
3210
|
+
* `alignOffset`) are forwarded to the positioner; all other props go to the popup.
|
|
3211
|
+
*
|
|
3212
|
+
* @prop side - Which side of the trigger to place the popover. Default: `'bottom'`.
|
|
3213
|
+
* @prop sideOffset - Gap in pixels between the trigger and the popover. Default: `4`.
|
|
3214
|
+
* @prop align - Alignment along the trigger's cross-axis. Default: `'center'`.
|
|
3215
|
+
* @prop alignOffset - Offset in pixels along the cross-axis. Default: `0`.
|
|
3216
|
+
*/
|
|
3217
|
+
const PopoverContent = React.forwardRef((componentProps, forwardRef) => {
|
|
3218
|
+
const { className, align = "center", alignOffset = 0, side = "bottom", sideOffset = 4, anchor } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$45);
|
|
3219
|
+
return /* @__PURE__ */ jsx(Popover$1.Portal, { children: /* @__PURE__ */ jsx(Popover$1.Positioner, {
|
|
3220
|
+
positionMethod: "fixed",
|
|
3221
|
+
align,
|
|
3222
|
+
alignOffset,
|
|
3223
|
+
side,
|
|
3224
|
+
sideOffset,
|
|
3225
|
+
anchor,
|
|
3226
|
+
"data-slot": "popover-positioner",
|
|
3227
|
+
className: "isolate z-popup",
|
|
3228
|
+
children: /* @__PURE__ */ jsx(Popover$1.Popup, _objectSpread2({
|
|
3229
|
+
ref: forwardRef,
|
|
3230
|
+
"data-slot": "popover-content",
|
|
3231
|
+
className: cn("z-50 flex w-72 origin-(--transform-origin) flex-col gap-4 rounded-md bg-popover p-4 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className)
|
|
3232
|
+
}, props))
|
|
3233
|
+
}) });
|
|
3177
3234
|
});
|
|
3178
|
-
|
|
3179
|
-
|
|
3235
|
+
PopoverContent.displayName = "PopoverContent";
|
|
3236
|
+
/**
|
|
3237
|
+
* Optional header region grouping the popover's title and description.
|
|
3238
|
+
* Renders a `<div>`.
|
|
3239
|
+
*/
|
|
3240
|
+
const PopoverHeader = React.forwardRef((componentProps, forwardRef) => {
|
|
3241
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$31);
|
|
3180
3242
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
3181
3243
|
ref: forwardRef,
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
"data-align": align,
|
|
3185
|
-
className: cn(inputGroupAddonVariants({ align }), className),
|
|
3186
|
-
onClick: (e) => {
|
|
3187
|
-
var _e$currentTarget$pare;
|
|
3188
|
-
if (e.target.closest("button")) return;
|
|
3189
|
-
(_e$currentTarget$pare = e.currentTarget.parentElement) === null || _e$currentTarget$pare === void 0 || (_e$currentTarget$pare = _e$currentTarget$pare.querySelector("input, textarea, [data-slot=\"input-group-control\"]")) === null || _e$currentTarget$pare === void 0 || _e$currentTarget$pare.focus();
|
|
3190
|
-
}
|
|
3244
|
+
"data-slot": "popover-header",
|
|
3245
|
+
className: cn("flex flex-col gap-0.5 text-sm", className)
|
|
3191
3246
|
}, props));
|
|
3192
3247
|
});
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3248
|
+
PopoverHeader.displayName = "PopoverHeader";
|
|
3249
|
+
/**
|
|
3250
|
+
* Accessible title for the popover, wrapping `Popover.Title`.
|
|
3251
|
+
* Renders an `<h2>` and labels the popup for assistive technology.
|
|
3252
|
+
*/
|
|
3253
|
+
const PopoverTitle = React.forwardRef((componentProps, forwardRef) => {
|
|
3254
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$24);
|
|
3255
|
+
return /* @__PURE__ */ jsx(Popover$1.Title, _objectSpread2({
|
|
3197
3256
|
ref: forwardRef,
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
size,
|
|
3201
|
-
className
|
|
3257
|
+
"data-slot": "popover-title",
|
|
3258
|
+
className: cn("font-bold", className)
|
|
3202
3259
|
}, props));
|
|
3203
3260
|
});
|
|
3204
|
-
|
|
3261
|
+
PopoverTitle.displayName = "PopoverTitle";
|
|
3262
|
+
/**
|
|
3263
|
+
* Accessible supporting text for the popover, wrapping `Popover.Description`.
|
|
3264
|
+
* Renders a `<p>` and describes the popup for assistive technology.
|
|
3265
|
+
*/
|
|
3266
|
+
const PopoverDescription = React.forwardRef((componentProps, forwardRef) => {
|
|
3267
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$21);
|
|
3268
|
+
return /* @__PURE__ */ jsx(Popover$1.Description, _objectSpread2({
|
|
3269
|
+
ref: forwardRef,
|
|
3270
|
+
"data-slot": "popover-description",
|
|
3271
|
+
className: cn("text-muted-foreground", className)
|
|
3272
|
+
}, props));
|
|
3273
|
+
});
|
|
3274
|
+
PopoverDescription.displayName = "PopoverDescription";
|
|
3275
|
+
//#endregion
|
|
3276
|
+
//#region src/components/toggle.tsx
|
|
3277
|
+
const _excluded$44 = [
|
|
3278
|
+
"className",
|
|
3279
|
+
"variant",
|
|
3280
|
+
"size",
|
|
3281
|
+
"pressedColor"
|
|
3282
|
+
];
|
|
3283
|
+
/**
|
|
3284
|
+
* Class-variance-authority variants for {@link Toggle}: `variant` (`default` | `outline`)
|
|
3285
|
+
* and `size` (`default` | `sm` | `lg`).
|
|
3286
|
+
*/
|
|
3287
|
+
const toggleVariants = cva("group/toggle inline-flex items-center justify-center gap-1 rounded-md text-sm text-foreground font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 data-disabled:pointer-events-none data-disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
3288
|
+
variants: {
|
|
3289
|
+
variant: {
|
|
3290
|
+
default: "bg-transparent",
|
|
3291
|
+
outline: "border border-input bg-background"
|
|
3292
|
+
},
|
|
3293
|
+
size: {
|
|
3294
|
+
default: "h-8 min-w-8 px-2 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
|
|
3295
|
+
sm: "h-6 min-w-6 px-1.5 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 [&_svg:not([class*='size-'])]:size-3.5",
|
|
3296
|
+
lg: "h-10 min-w-10 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2"
|
|
3297
|
+
},
|
|
3298
|
+
pressedColor: {
|
|
3299
|
+
highContrast: "data-pressed:bg-secondary data-pressed:text-secondary-foreground data-pressed:hover:bg-secondary data-pressed:hover:text-secondary-foreground",
|
|
3300
|
+
lowContrast: "data-pressed:bg-muted data-pressed:text-foreground data-pressed:hover:bg-muted data-pressed:hover:text-foreground"
|
|
3301
|
+
}
|
|
3302
|
+
},
|
|
3303
|
+
defaultVariants: {
|
|
3304
|
+
variant: "default",
|
|
3305
|
+
size: "default",
|
|
3306
|
+
pressedColor: "highContrast"
|
|
3307
|
+
}
|
|
3308
|
+
});
|
|
3309
|
+
/**
|
|
3310
|
+
* A two-state button that can be pressed on or off, wrapping Base UI's `Toggle`.
|
|
3311
|
+
* Renders a `<button aria-pressed>` styled via {@link toggleVariants}.
|
|
3312
|
+
*
|
|
3313
|
+
* @example
|
|
3314
|
+
* ```tsx
|
|
3315
|
+
* <Toggle aria-label="Bold">B</Toggle>
|
|
3316
|
+
* ```
|
|
3317
|
+
*/
|
|
3318
|
+
const Toggle = React.forwardRef((componentProps, forwardRef) => {
|
|
3319
|
+
const { className, variant = "default", size = "default", pressedColor = "highContrast" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$44);
|
|
3320
|
+
return /* @__PURE__ */ jsx(Toggle$1, _objectSpread2({
|
|
3321
|
+
ref: forwardRef,
|
|
3322
|
+
"data-slot": "toggle",
|
|
3323
|
+
className: cn(toggleVariants({
|
|
3324
|
+
variant,
|
|
3325
|
+
size,
|
|
3326
|
+
pressedColor,
|
|
3327
|
+
className
|
|
3328
|
+
}))
|
|
3329
|
+
}, props));
|
|
3330
|
+
});
|
|
3331
|
+
Toggle.displayName = "Toggle";
|
|
3332
|
+
//#endregion
|
|
3333
|
+
//#region src/components/toggle-group.tsx
|
|
3334
|
+
const _excluded$43 = [
|
|
3335
|
+
"className",
|
|
3336
|
+
"variant",
|
|
3337
|
+
"size",
|
|
3338
|
+
"spacing",
|
|
3339
|
+
"orientation",
|
|
3340
|
+
"block",
|
|
3341
|
+
"children"
|
|
3342
|
+
];
|
|
3343
|
+
const _excluded2$30 = [
|
|
3344
|
+
"className",
|
|
3345
|
+
"children",
|
|
3346
|
+
"variant",
|
|
3347
|
+
"size",
|
|
3348
|
+
"pressedColor"
|
|
3349
|
+
];
|
|
3350
|
+
const ToggleGroupContext = React.createContext({
|
|
3351
|
+
size: "default",
|
|
3352
|
+
variant: "default",
|
|
3353
|
+
spacing: 0,
|
|
3354
|
+
orientation: "horizontal",
|
|
3355
|
+
block: false
|
|
3356
|
+
});
|
|
3357
|
+
/**
|
|
3358
|
+
* Root container grouping related toggle buttons, wrapping Base UI's `ToggleGroup`.
|
|
3359
|
+
* Renders a `<div role="group">` and shares `variant`, `size` and `spacing` with its
|
|
3360
|
+
* `ToggleGroupItem`s via context.
|
|
3361
|
+
*
|
|
3362
|
+
* @example
|
|
3363
|
+
* ```tsx
|
|
3364
|
+
* <ToggleGroup defaultValue={['left']}>
|
|
3365
|
+
* <ToggleGroupItem value="left">Left</ToggleGroupItem>
|
|
3366
|
+
* <ToggleGroupItem value="center">Center</ToggleGroupItem>
|
|
3367
|
+
* </ToggleGroup>
|
|
3368
|
+
* ```
|
|
3369
|
+
*/
|
|
3370
|
+
const ToggleGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
3371
|
+
const { className, variant, size, spacing = 0, orientation = "horizontal", block = false, children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$43);
|
|
3372
|
+
return /* @__PURE__ */ jsx(ToggleGroup$1, _objectSpread2(_objectSpread2({
|
|
3373
|
+
ref: forwardRef,
|
|
3374
|
+
"data-slot": "toggle-group",
|
|
3375
|
+
"data-variant": variant,
|
|
3376
|
+
"data-size": size,
|
|
3377
|
+
"data-spacing": spacing,
|
|
3378
|
+
"data-orientation": orientation,
|
|
3379
|
+
"data-block": block,
|
|
3380
|
+
style: { "--gap": spacing },
|
|
3381
|
+
className: cn("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-md data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch data-[block=true]:w-full", className)
|
|
3382
|
+
}, props), {}, { children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, {
|
|
3383
|
+
value: {
|
|
3384
|
+
variant,
|
|
3385
|
+
size,
|
|
3386
|
+
spacing,
|
|
3387
|
+
orientation,
|
|
3388
|
+
block
|
|
3389
|
+
},
|
|
3390
|
+
children
|
|
3391
|
+
}) }));
|
|
3392
|
+
});
|
|
3393
|
+
ToggleGroup.displayName = "ToggleGroup";
|
|
3394
|
+
/**
|
|
3395
|
+
* A single toggle button within a `ToggleGroup`, wrapping Base UI's `Toggle`.
|
|
3396
|
+
* Renders a `<button aria-pressed>` that inherits `variant` and `size` from the group context.
|
|
3397
|
+
*/
|
|
3398
|
+
const ToggleGroupItem = React.forwardRef((componentProps, forwardRef) => {
|
|
3399
|
+
const { className, children, variant = "default", size = "default", pressedColor } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$30);
|
|
3400
|
+
const context = React.useContext(ToggleGroupContext);
|
|
3401
|
+
return /* @__PURE__ */ jsx(Toggle$1, _objectSpread2(_objectSpread2({
|
|
3402
|
+
ref: forwardRef,
|
|
3403
|
+
"data-slot": "toggle-group-item",
|
|
3404
|
+
"data-variant": context.variant || variant,
|
|
3405
|
+
"data-size": context.size || size,
|
|
3406
|
+
"data-spacing": context.spacing,
|
|
3407
|
+
className: cn("shrink-0 text-foreground group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 group-data-[spacing=0]/toggle-group:shadow-none group-data-[spacing=0]/toggle-group:border group-data-[spacing=0]/toggle-group:border-input focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:first:rounded-l-md group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:first:rounded-t-md group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:last:rounded-r-md group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:last:rounded-b-md group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:border-l-0 group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:border-t-0 group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:first:border-l group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:first:border-t group-data-[block=true]/toggle-group:flex-1", toggleVariants({
|
|
3408
|
+
variant: context.variant || variant,
|
|
3409
|
+
size: context.size || size,
|
|
3410
|
+
pressedColor
|
|
3411
|
+
}), className)
|
|
3412
|
+
}, props), {}, { children }));
|
|
3413
|
+
});
|
|
3414
|
+
ToggleGroupItem.displayName = "ToggleGroupItem";
|
|
3415
|
+
//#endregion
|
|
3416
|
+
//#region src/components/tooltip.tsx
|
|
3417
|
+
const _excluded$42 = ["delay"];
|
|
3418
|
+
const _excluded2$29 = [
|
|
3419
|
+
"className",
|
|
3420
|
+
"side",
|
|
3421
|
+
"sideOffset",
|
|
3422
|
+
"align",
|
|
3423
|
+
"alignOffset",
|
|
3424
|
+
"children",
|
|
3425
|
+
"container"
|
|
3426
|
+
];
|
|
3427
|
+
/**
|
|
3428
|
+
* Shares delay timing across all tooltips nested inside it, so moving between
|
|
3429
|
+
* neighbouring triggers reuses the open state instead of re-triggering the delay.
|
|
3430
|
+
*
|
|
3431
|
+
* Renders no DOM element — wrap a subtree of `Tooltip` instances in it.
|
|
3432
|
+
*
|
|
3433
|
+
* @prop delay - Milliseconds to wait before showing a tooltip. Default: `0`.
|
|
3434
|
+
*
|
|
3435
|
+
* @example
|
|
3436
|
+
* ```tsx
|
|
3437
|
+
* <TooltipProvider delay={200}>
|
|
3438
|
+
* <Tooltip>…</Tooltip>
|
|
3439
|
+
* <Tooltip>…</Tooltip>
|
|
3440
|
+
* </TooltipProvider>
|
|
3441
|
+
* ```
|
|
3442
|
+
*/
|
|
3443
|
+
function TooltipProvider(componentProps) {
|
|
3444
|
+
const { delay = 0 } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$42);
|
|
3445
|
+
return /* @__PURE__ */ jsx(Tooltip$1.Provider, _objectSpread2({
|
|
3446
|
+
"data-slot": "tooltip-provider",
|
|
3447
|
+
delay
|
|
3448
|
+
}, props));
|
|
3449
|
+
}
|
|
3450
|
+
/**
|
|
3451
|
+
* Root of a single tooltip. Manages its open/close state and connects the
|
|
3452
|
+
* trigger to the content.
|
|
3453
|
+
*
|
|
3454
|
+
* Renders no DOM element — place `TooltipTrigger` and `TooltipContent` inside
|
|
3455
|
+
* it. Supports controlled (`open` + `onOpenChange`) and uncontrolled
|
|
3456
|
+
* (`defaultOpen`) modes.
|
|
3457
|
+
*
|
|
3458
|
+
* @example
|
|
3459
|
+
* ```tsx
|
|
3460
|
+
* <TooltipProvider>
|
|
3461
|
+
* <Tooltip>
|
|
3462
|
+
* <TooltipTrigger render={<Button />}>Hover me</TooltipTrigger>
|
|
3463
|
+
* <TooltipContent side="top">Helpful hint</TooltipContent>
|
|
3464
|
+
* </Tooltip>
|
|
3465
|
+
* </TooltipProvider>
|
|
3466
|
+
* ```
|
|
3467
|
+
*/
|
|
3468
|
+
function Tooltip(componentProps) {
|
|
3469
|
+
const props = _extends({}, (_objectDestructuringEmpty(componentProps), componentProps));
|
|
3470
|
+
return /* @__PURE__ */ jsx(Tooltip$1.Root, _objectSpread2({ "data-slot": "tooltip" }, props));
|
|
3471
|
+
}
|
|
3472
|
+
/**
|
|
3473
|
+
* The element that opens the tooltip on hover or focus.
|
|
3474
|
+
*
|
|
3475
|
+
* Renders a `<button>` by default; pass `render` to project the behaviour onto
|
|
3476
|
+
* another element or component.
|
|
3477
|
+
*
|
|
3478
|
+
* @example
|
|
3479
|
+
* ```tsx
|
|
3480
|
+
* <TooltipTrigger render={<Button variant="ghost" />}>Info</TooltipTrigger>
|
|
3481
|
+
* ```
|
|
3482
|
+
*/
|
|
3483
|
+
const TooltipTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
3484
|
+
const props = _extends({}, (_objectDestructuringEmpty(componentProps), componentProps));
|
|
3485
|
+
return /* @__PURE__ */ jsx(Tooltip$1.Trigger, _objectSpread2({
|
|
3486
|
+
ref: forwardRef,
|
|
3487
|
+
"data-slot": "tooltip-trigger"
|
|
3488
|
+
}, props));
|
|
3489
|
+
});
|
|
3490
|
+
TooltipTrigger.displayName = "TooltipTrigger";
|
|
3491
|
+
/**
|
|
3492
|
+
* The floating panel shown while the trigger is hovered or focused.
|
|
3493
|
+
*
|
|
3494
|
+
* Composes `Tooltip.Portal → Tooltip.Positioner → Tooltip.Popup` into a single
|
|
3495
|
+
* part and renders a `<div>` popup (with a small `Tooltip.Arrow`). Positioning
|
|
3496
|
+
* props (`side`, `sideOffset`, `align`, `alignOffset`) are forwarded to the
|
|
3497
|
+
* positioner; all other props (including `className`) go to the popup element.
|
|
3498
|
+
*
|
|
3499
|
+
* @prop side - Which side of the trigger to place the content. Default: `'top'`.
|
|
3500
|
+
* @prop sideOffset - Gap in pixels between the trigger and the content. Default: `4`.
|
|
3501
|
+
* @prop align - Alignment along the cross-axis. Default: `'center'`.
|
|
3502
|
+
* @prop alignOffset - Offset in pixels along the cross-axis. Default: `0`.
|
|
3503
|
+
* @prop container - Portal container the popup is rendered into.
|
|
3504
|
+
*
|
|
3505
|
+
* @example
|
|
3506
|
+
* ```tsx
|
|
3507
|
+
* <TooltipContent side="bottom" align="start">Helpful hint</TooltipContent>
|
|
3508
|
+
* ```
|
|
3509
|
+
*/
|
|
3510
|
+
const TooltipContent = React.forwardRef((componentProps, forwardRef) => {
|
|
3511
|
+
const { className, side = "top", sideOffset = 4, align = "center", alignOffset = 0, children, container } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$29);
|
|
3512
|
+
return /* @__PURE__ */ jsx(Tooltip$1.Portal, {
|
|
3513
|
+
container,
|
|
3514
|
+
children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, {
|
|
3515
|
+
positionMethod: "fixed",
|
|
3516
|
+
align,
|
|
3517
|
+
alignOffset,
|
|
3518
|
+
side,
|
|
3519
|
+
sideOffset,
|
|
3520
|
+
"data-slot": "tooltip-positioner",
|
|
3521
|
+
className: "isolate z-popup",
|
|
3522
|
+
children: /* @__PURE__ */ jsxs(Tooltip$1.Popup, _objectSpread2(_objectSpread2({
|
|
3523
|
+
ref: forwardRef,
|
|
3524
|
+
"data-slot": "tooltip-content",
|
|
3525
|
+
className: cn("z-50 inline-flex w-fit max-w-sm origin-(--transform-origin) items-center gap-2 rounded-md bg-accent-foreground p-2 text-sm font-medium text-primary-foreground has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className)
|
|
3526
|
+
}, props), {}, { children: [children, /* @__PURE__ */ jsx(Tooltip$1.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-accent-foreground fill-accent-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" })] }))
|
|
3527
|
+
})
|
|
3528
|
+
});
|
|
3529
|
+
});
|
|
3530
|
+
TooltipContent.displayName = "TooltipContent";
|
|
3531
|
+
//#endregion
|
|
3532
|
+
//#region src/components/color-picker.tsx
|
|
3533
|
+
const _excluded$41 = ["render", "children"];
|
|
3534
|
+
const _excluded2$28 = [
|
|
3535
|
+
"className",
|
|
3536
|
+
"align",
|
|
3537
|
+
"children"
|
|
3538
|
+
];
|
|
3539
|
+
const _excluded3$23 = ["className", "presets"];
|
|
3540
|
+
const _excluded4$20 = ["className"];
|
|
3541
|
+
const _excluded5$16 = ["className", "mode"];
|
|
3542
|
+
const _excluded6$14 = ["className"];
|
|
3543
|
+
const _excluded7$7 = ["className"];
|
|
3544
|
+
const _excluded8$7 = ["className"];
|
|
3545
|
+
const HEX_PATTERN = /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
3546
|
+
/** Fallback when a consumer passes no value, or an unparseable one - the picker always has a colour to show. */
|
|
3547
|
+
const FALLBACK_HEX = "#132c3b";
|
|
3548
|
+
/**
|
|
3549
|
+
* Parse any accepted hex spelling into the canonical `#rrggbb` lowercase form.
|
|
3550
|
+
* Accepts a leading `#` or not, and 3- or 6-digit forms. Returns `null` when
|
|
3551
|
+
* the input is not a hex colour, which is what lets `ColorPickerHexField`
|
|
3552
|
+
* reject a half-typed value without throwing.
|
|
3553
|
+
*
|
|
3554
|
+
* @internal Exported for `color-picker.test.ts`; not part of the package API.
|
|
3555
|
+
*/
|
|
3556
|
+
function normalizeHex(input) {
|
|
3557
|
+
const match = HEX_PATTERN.exec(input.trim());
|
|
3558
|
+
if (!match) return null;
|
|
3559
|
+
const digits = match[1];
|
|
3560
|
+
return `#${(digits.length === 3 ? digits.split("").map((digit) => digit + digit).join("") : digits).toLowerCase()}`;
|
|
3561
|
+
}
|
|
3562
|
+
/** @internal Exported for `color-picker.test.ts`; not part of the package API. */
|
|
3563
|
+
function hexToHsv(hex) {
|
|
3564
|
+
var _normalizeHex;
|
|
3565
|
+
const normalized = (_normalizeHex = normalizeHex(hex)) !== null && _normalizeHex !== void 0 ? _normalizeHex : FALLBACK_HEX;
|
|
3566
|
+
const r = Number.parseInt(normalized.slice(1, 3), 16) / 255;
|
|
3567
|
+
const g = Number.parseInt(normalized.slice(3, 5), 16) / 255;
|
|
3568
|
+
const b = Number.parseInt(normalized.slice(5, 7), 16) / 255;
|
|
3569
|
+
const max = Math.max(r, g, b);
|
|
3570
|
+
const delta = max - Math.min(r, g, b);
|
|
3571
|
+
let h = 0;
|
|
3572
|
+
if (delta !== 0) {
|
|
3573
|
+
if (max === r) h = (g - b) / delta % 6;
|
|
3574
|
+
else if (max === g) h = (b - r) / delta + 2;
|
|
3575
|
+
else h = (r - g) / delta + 4;
|
|
3576
|
+
h *= 60;
|
|
3577
|
+
if (h < 0) h += 360;
|
|
3578
|
+
}
|
|
3579
|
+
return {
|
|
3580
|
+
h,
|
|
3581
|
+
s: max === 0 ? 0 : delta / max,
|
|
3582
|
+
v: max
|
|
3583
|
+
};
|
|
3584
|
+
}
|
|
3585
|
+
/** @internal Exported for `color-picker.test.ts`; not part of the package API. */
|
|
3586
|
+
function hsvToHex({ h, s, v }) {
|
|
3587
|
+
const chroma = v * s;
|
|
3588
|
+
const second = chroma * (1 - Math.abs(h / 60 % 2 - 1));
|
|
3589
|
+
const offset = v - chroma;
|
|
3590
|
+
const [r, g, b] = h < 60 ? [
|
|
3591
|
+
chroma,
|
|
3592
|
+
second,
|
|
3593
|
+
0
|
|
3594
|
+
] : h < 120 ? [
|
|
3595
|
+
second,
|
|
3596
|
+
chroma,
|
|
3597
|
+
0
|
|
3598
|
+
] : h < 180 ? [
|
|
3599
|
+
0,
|
|
3600
|
+
chroma,
|
|
3601
|
+
second
|
|
3602
|
+
] : h < 240 ? [
|
|
3603
|
+
0,
|
|
3604
|
+
second,
|
|
3605
|
+
chroma
|
|
3606
|
+
] : h < 300 ? [
|
|
3607
|
+
second,
|
|
3608
|
+
0,
|
|
3609
|
+
chroma
|
|
3610
|
+
] : [
|
|
3611
|
+
chroma,
|
|
3612
|
+
0,
|
|
3613
|
+
second
|
|
3614
|
+
];
|
|
3615
|
+
const channel = (value) => Math.round((value + offset) * 255).toString(16).padStart(2, "0");
|
|
3616
|
+
return `#${channel(r)}${channel(g)}${channel(b)}`;
|
|
3617
|
+
}
|
|
3618
|
+
const clamp$1 = (value, min, max) => Math.min(max, Math.max(min, value));
|
|
3619
|
+
/** Figma's grid column order - `charcoal` is labelled "Navy" in the design. */
|
|
3620
|
+
const COLOR_ORDER = [
|
|
3621
|
+
"charcoal",
|
|
3622
|
+
"green",
|
|
3623
|
+
"blue",
|
|
3624
|
+
"purple",
|
|
3625
|
+
"pink",
|
|
3626
|
+
"red",
|
|
3627
|
+
"yellow"
|
|
3628
|
+
];
|
|
3629
|
+
/** Figma's grid row order, most saturated first. */
|
|
3630
|
+
const TONE_ORDER = [
|
|
3631
|
+
"dark",
|
|
3632
|
+
"medium-dark",
|
|
3633
|
+
"medium-light",
|
|
3634
|
+
"light"
|
|
3635
|
+
];
|
|
3636
|
+
/** Number of columns in the preset grid. Fixed by the design (220px popover = 7 x 24px + gaps). */
|
|
3637
|
+
const PRESET_COLUMNS = COLOR_ORDER.length;
|
|
3638
|
+
/**
|
|
3639
|
+
* Canonical `#rrggbb` lowercase form of a value, so comparisons never depend on how a
|
|
3640
|
+
* consumer stored it. Stored tag colours are mixed case (`OUTCOME_COLORS` is
|
|
3641
|
+
* uppercase), so comparing raw strings silently selected nothing. Falls back to
|
|
3642
|
+
* {@link FALLBACK_HEX} for anything that isn't a hex colour.
|
|
3643
|
+
*/
|
|
3644
|
+
function canonicalValue(value) {
|
|
3645
|
+
var _normalizeHex2;
|
|
3646
|
+
return (_normalizeHex2 = normalizeHex(value)) !== null && _normalizeHex2 !== void 0 ? _normalizeHex2 : FALLBACK_HEX;
|
|
3647
|
+
}
|
|
3648
|
+
/** The value a preset writes when picked. */
|
|
3649
|
+
function presetValue(preset) {
|
|
3650
|
+
var _normalizeHex3;
|
|
3651
|
+
return (_normalizeHex3 = normalizeHex(preset.hex)) !== null && _normalizeHex3 !== void 0 ? _normalizeHex3 : preset.hex;
|
|
3652
|
+
}
|
|
3653
|
+
/**
|
|
3654
|
+
* The 13 legacy tag colours - the palette `@dashboard/library`'s `TAGS_COLORS` and
|
|
3655
|
+
* campaign-extension's `OUTCOME_COLORS` already write. Literal colours, so they emit
|
|
3656
|
+
* their own hex and a consumer storing them needs no migration. Ordered by hue family
|
|
3657
|
+
* then tone, and labelled through the same design-approved equivalency table
|
|
3658
|
+
* `Badge`'s deprecated `legacyColor` uses.
|
|
3659
|
+
*
|
|
3660
|
+
* The only preset set shipped for now - the DS brand palette (28 cells painted by
|
|
3661
|
+
* `badgeVariants`) is deferred: it needs a beautified pass design hasn't drawn yet,
|
|
3662
|
+
* and shipping it as published API now would mean versioning or breaking it later.
|
|
3663
|
+
*/
|
|
3664
|
+
const LEGACY_COLOR_PRESETS = (() => {
|
|
3665
|
+
const byPair = /* @__PURE__ */ new Map();
|
|
3666
|
+
for (const [hex, { color, tone }] of Object.entries(LEGACY_TAG_COLOR_MAP)) byPair.set(`${color}/${tone}`, hex);
|
|
3667
|
+
return COLOR_ORDER.flatMap((color) => TONE_ORDER.flatMap((tone) => {
|
|
3668
|
+
const hex = byPair.get(`${color}/${tone}`);
|
|
3669
|
+
return hex ? [{
|
|
3670
|
+
hex,
|
|
3671
|
+
color,
|
|
3672
|
+
tone
|
|
3673
|
+
}] : [];
|
|
3674
|
+
}));
|
|
3675
|
+
})();
|
|
3676
|
+
/**
|
|
3677
|
+
* The fill for one swatch. Always paints inline, since Tailwind cannot emit a class
|
|
3678
|
+
* for an arbitrary hex - which also means a swatch and the `Badge` `customColor`
|
|
3679
|
+
* eventually paints from it always agree.
|
|
3680
|
+
*/
|
|
3681
|
+
function swatchFill(hex) {
|
|
3682
|
+
var _normalizeHex4;
|
|
3683
|
+
return {
|
|
3684
|
+
className: "size-5 rounded-[4px] ring-1 ring-foreground/10 ring-inset",
|
|
3685
|
+
style: { backgroundColor: (_normalizeHex4 = normalizeHex(hex)) !== null && _normalizeHex4 !== void 0 ? _normalizeHex4 : hex }
|
|
3686
|
+
};
|
|
3687
|
+
}
|
|
3688
|
+
/** Translation key per hue family. `charcoal` reads "Navy" in the design. */
|
|
3689
|
+
const COLOR_LABEL_KEY = {
|
|
3690
|
+
charcoal: "colorPicker.charcoal",
|
|
3691
|
+
green: "colorPicker.green",
|
|
3692
|
+
blue: "colorPicker.blue",
|
|
3693
|
+
purple: "colorPicker.purple",
|
|
3694
|
+
pink: "colorPicker.pink",
|
|
3695
|
+
red: "colorPicker.red",
|
|
3696
|
+
yellow: "colorPicker.yellow"
|
|
3697
|
+
};
|
|
3698
|
+
/**
|
|
3699
|
+
* Tone label patterns, from the Figma naming matrix (`35843:24340`):
|
|
3700
|
+
* `Dark {{colorName}}` / `{{colorName}}` / `Medium {{colorName}}` / `Light {{colorName}}`.
|
|
3701
|
+
* Split into 7 names x 4 patterns rather than 28 flat keys so translators get 11
|
|
3702
|
+
* strings and adjective order stays per-locale.
|
|
3703
|
+
*/
|
|
3704
|
+
const TONE_LABEL_KEY = {
|
|
3705
|
+
dark: "colorPicker.toneDark",
|
|
3706
|
+
"medium-dark": "colorPicker.toneMediumDark",
|
|
3707
|
+
"medium-light": "colorPicker.toneMediumLight",
|
|
3708
|
+
light: "colorPicker.toneLight"
|
|
3709
|
+
};
|
|
3710
|
+
function usePresetLabel() {
|
|
3711
|
+
const t = useDsTranslation("ds");
|
|
3712
|
+
return React.useCallback((preset) => {
|
|
3713
|
+
if (preset.label) return preset.label;
|
|
3714
|
+
if (preset.color && preset.tone) return t(TONE_LABEL_KEY[preset.tone], { color: t(COLOR_LABEL_KEY[preset.color]) });
|
|
3715
|
+
return preset.hex;
|
|
3716
|
+
}, [t]);
|
|
3717
|
+
}
|
|
3718
|
+
const ColorPickerContext = React.createContext(null);
|
|
3719
|
+
function useColorPickerContext() {
|
|
3720
|
+
const context = React.useContext(ColorPickerContext);
|
|
3721
|
+
if (!context) throw new Error("ColorPicker compound components must be used inside <ColorPicker>");
|
|
3722
|
+
return context;
|
|
3723
|
+
}
|
|
3724
|
+
/**
|
|
3725
|
+
* Root of the colour picker: owns the value, mirrors it as HSV for the free-form
|
|
3726
|
+
* surfaces, and manages open/close state. Renders the Base UI Popover root
|
|
3727
|
+
* (context only - no DOM element). Place `ColorPickerTrigger` and
|
|
3728
|
+
* `ColorPickerContent` inside it.
|
|
3729
|
+
*
|
|
3730
|
+
* The value is always a hex string - that is what consumers store and what
|
|
3731
|
+
* `Badge`'s `customColor` reads.
|
|
3732
|
+
*
|
|
3733
|
+
* @example
|
|
3734
|
+
* ```tsx
|
|
3735
|
+
* <ColorPicker value={color} onValueChange={setColor}>
|
|
3736
|
+
* <ColorPickerTrigger />
|
|
3737
|
+
* <ColorPickerContent align="start">
|
|
3738
|
+
* <ColorPickerPresets presets={LEGACY_COLOR_PRESETS} />
|
|
3739
|
+
* </ColorPickerContent>
|
|
3740
|
+
* </ColorPicker>
|
|
3741
|
+
* ```
|
|
3742
|
+
*/
|
|
3743
|
+
function ColorPicker(componentProps) {
|
|
3744
|
+
const { value, onValueChange, presets = LEGACY_COLOR_PRESETS, mode: modeProp, onModeChange, open, onOpenChange, children } = componentProps;
|
|
3745
|
+
const rawValue = canonicalValue(value !== null && value !== void 0 ? value : FALLBACK_HEX);
|
|
3746
|
+
const isPresetValue = React.useCallback((candidate) => presets.some((preset) => presetValue(preset) === candidate), [presets]);
|
|
3747
|
+
const seedHex = rawValue;
|
|
3748
|
+
const [state, setState] = React.useState(() => ({
|
|
3749
|
+
hex: seedHex,
|
|
3750
|
+
hsv: hexToHsv(seedHex)
|
|
3751
|
+
}));
|
|
3752
|
+
if (state.hex !== seedHex) setState({
|
|
3753
|
+
hex: seedHex,
|
|
3754
|
+
hsv: hexToHsv(seedHex)
|
|
3755
|
+
});
|
|
3756
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React.useState(false);
|
|
3757
|
+
const isOpen = open !== null && open !== void 0 ? open : uncontrolledOpen;
|
|
3758
|
+
const [uncontrolledMode, setUncontrolledMode] = React.useState(() => isPresetValue(rawValue) ? "presets" : "custom");
|
|
3759
|
+
const mode = modeProp !== null && modeProp !== void 0 ? modeProp : uncontrolledMode;
|
|
3760
|
+
const setMode = React.useCallback((next) => {
|
|
3761
|
+
if (modeProp === void 0) setUncontrolledMode(next);
|
|
3762
|
+
onModeChange === null || onModeChange === void 0 || onModeChange(next);
|
|
3763
|
+
}, [modeProp, onModeChange]);
|
|
3764
|
+
const setOpen = React.useCallback((next) => {
|
|
3765
|
+
if (next && modeProp === void 0) {
|
|
3766
|
+
const derived = isPresetValue(rawValue) ? "presets" : "custom";
|
|
3767
|
+
setUncontrolledMode(derived);
|
|
3768
|
+
onModeChange === null || onModeChange === void 0 || onModeChange(derived);
|
|
3769
|
+
}
|
|
3770
|
+
if (open === void 0) setUncontrolledOpen(next);
|
|
3771
|
+
onOpenChange === null || onOpenChange === void 0 || onOpenChange(next);
|
|
3772
|
+
}, [
|
|
3773
|
+
open,
|
|
3774
|
+
onOpenChange,
|
|
3775
|
+
modeProp,
|
|
3776
|
+
onModeChange,
|
|
3777
|
+
isPresetValue,
|
|
3778
|
+
rawValue
|
|
3779
|
+
]);
|
|
3780
|
+
const setHex = React.useCallback((next) => {
|
|
3781
|
+
const normalized = normalizeHex(next);
|
|
3782
|
+
if (!normalized) return;
|
|
3783
|
+
setState({
|
|
3784
|
+
hex: normalized,
|
|
3785
|
+
hsv: hexToHsv(normalized)
|
|
3786
|
+
});
|
|
3787
|
+
onValueChange === null || onValueChange === void 0 || onValueChange(normalized);
|
|
3788
|
+
}, [onValueChange]);
|
|
3789
|
+
const setHsv = React.useCallback((next) => {
|
|
3790
|
+
const hex = hsvToHex(next);
|
|
3791
|
+
setState({
|
|
3792
|
+
hex,
|
|
3793
|
+
hsv: next
|
|
3794
|
+
});
|
|
3795
|
+
onValueChange === null || onValueChange === void 0 || onValueChange(hex);
|
|
3796
|
+
}, [onValueChange]);
|
|
3797
|
+
const selectValue = React.useCallback((next) => {
|
|
3798
|
+
onValueChange === null || onValueChange === void 0 || onValueChange(next);
|
|
3799
|
+
setOpen(false);
|
|
3800
|
+
}, [onValueChange, setOpen]);
|
|
3801
|
+
const contextValue = React.useMemo(() => ({
|
|
3802
|
+
value: rawValue,
|
|
3803
|
+
hsv: state.hsv,
|
|
3804
|
+
presets,
|
|
3805
|
+
mode,
|
|
3806
|
+
setMode,
|
|
3807
|
+
setHex,
|
|
3808
|
+
setHsv,
|
|
3809
|
+
selectValue
|
|
3810
|
+
}), [
|
|
3811
|
+
rawValue,
|
|
3812
|
+
state.hsv,
|
|
3813
|
+
presets,
|
|
3814
|
+
mode,
|
|
3815
|
+
setMode,
|
|
3816
|
+
setHex,
|
|
3817
|
+
setHsv,
|
|
3818
|
+
selectValue
|
|
3819
|
+
]);
|
|
3820
|
+
return /* @__PURE__ */ jsx(ColorPickerContext.Provider, {
|
|
3821
|
+
value: contextValue,
|
|
3822
|
+
children: /* @__PURE__ */ jsx(Popover, {
|
|
3823
|
+
open: isOpen,
|
|
3824
|
+
onOpenChange: setOpen,
|
|
3825
|
+
children
|
|
3826
|
+
})
|
|
3827
|
+
});
|
|
3828
|
+
}
|
|
3829
|
+
/**
|
|
3830
|
+
* Trigger that opens the `ColorPicker`. Renders a Base UI `PopoverTrigger` as a
|
|
3831
|
+
* `<button>` - by default a 32px outline icon `Button` showing the current colour
|
|
3832
|
+
* as a rounded swatch. Override the element via `render` and the inner content via
|
|
3833
|
+
* `children`. Forwards `className`, `aria-invalid` and `disabled`, so it can join a
|
|
3834
|
+
* `ButtonGroup` and share an error border with a neighbouring `Input`.
|
|
3835
|
+
*
|
|
3836
|
+
* @example
|
|
3837
|
+
* ```tsx
|
|
3838
|
+
* <ColorPickerTrigger aria-invalid={hasError || undefined} />
|
|
3839
|
+
* ```
|
|
3840
|
+
*/
|
|
3841
|
+
const ColorPickerTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
3842
|
+
const { render, children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$41);
|
|
3843
|
+
const { value } = useColorPickerContext();
|
|
3844
|
+
const t = useDsTranslation("ds");
|
|
3845
|
+
const fill = swatchFill(value);
|
|
3846
|
+
return /* @__PURE__ */ jsx(PopoverTrigger, _objectSpread2(_objectSpread2({
|
|
3847
|
+
ref: forwardRef,
|
|
3848
|
+
"aria-label": t("colorPicker.trigger"),
|
|
3849
|
+
"data-slot": "color-picker-trigger",
|
|
3850
|
+
render: render !== null && render !== void 0 ? render : /* @__PURE__ */ jsx(Button, {
|
|
3851
|
+
variant: "outline",
|
|
3852
|
+
size: "icon"
|
|
3853
|
+
})
|
|
3854
|
+
}, props), {}, { children: children !== null && children !== void 0 ? children : /* @__PURE__ */ jsx("span", {
|
|
3855
|
+
"aria-hidden": "true",
|
|
3856
|
+
"data-slot": "color-picker-trigger-swatch",
|
|
3857
|
+
className: cn(fill.className, "size-4 shrink-0 rounded-sm"),
|
|
3858
|
+
style: fill.style
|
|
3859
|
+
}) }));
|
|
3860
|
+
});
|
|
3861
|
+
ColorPickerTrigger.displayName = "ColorPickerTrigger";
|
|
3862
|
+
/**
|
|
3863
|
+
* The floating panel of the `ColorPicker`. A `PopoverContent` sized to the design's
|
|
3864
|
+
* 220px grid, laid out as a column so preset and free-form parts stack.
|
|
3865
|
+
*
|
|
3866
|
+
* @example
|
|
3867
|
+
* ```tsx
|
|
3868
|
+
* <ColorPickerContent align="start">
|
|
3869
|
+
* <ColorPickerPresets />
|
|
3870
|
+
* </ColorPickerContent>
|
|
3871
|
+
* ```
|
|
3872
|
+
*/
|
|
3873
|
+
const ColorPickerContent = React.forwardRef((componentProps, forwardRef) => {
|
|
3874
|
+
const { className, align = "start", children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$28);
|
|
3875
|
+
const t = useDsTranslation("ds");
|
|
3876
|
+
return /* @__PURE__ */ jsx(PopoverContent, _objectSpread2(_objectSpread2({
|
|
3877
|
+
ref: forwardRef,
|
|
3878
|
+
align,
|
|
3879
|
+
"aria-label": t("colorPicker.choose"),
|
|
3880
|
+
"data-slot": "color-picker-content",
|
|
3881
|
+
className: cn("w-auto gap-3 p-2", className)
|
|
3882
|
+
}, props), {}, { children }));
|
|
3883
|
+
});
|
|
3884
|
+
ColorPickerContent.displayName = "ColorPickerContent";
|
|
3885
|
+
/**
|
|
3886
|
+
* The preset grid: a 7-column `radiogroup` of colour swatches, each with a tooltip
|
|
3887
|
+
* naming it. Picking a swatch sets the value and closes the popover.
|
|
3888
|
+
*
|
|
3889
|
+
* Arrow keys move focus without changing the value; `Enter` or `Space` picks the
|
|
3890
|
+
* focused swatch. (Selection deliberately does not follow focus - it would close
|
|
3891
|
+
* the popover on the first arrow press.)
|
|
3892
|
+
*
|
|
3893
|
+
* @example
|
|
3894
|
+
* ```tsx
|
|
3895
|
+
* <ColorPickerPresets presets={LEGACY_COLOR_PRESETS} />
|
|
3896
|
+
* ```
|
|
3897
|
+
*/
|
|
3898
|
+
const ColorPickerPresets = React.forwardRef((componentProps, forwardRef) => {
|
|
3899
|
+
const { className, presets: presetsProp } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$23);
|
|
3900
|
+
const { value, presets: contextPresets, selectValue } = useColorPickerContext();
|
|
3901
|
+
const presets = presetsProp !== null && presetsProp !== void 0 ? presetsProp : contextPresets;
|
|
3902
|
+
const t = useDsTranslation("ds");
|
|
3903
|
+
const labelOf = usePresetLabel();
|
|
3904
|
+
const containerRef = React.useRef(null);
|
|
3905
|
+
React.useImperativeHandle(forwardRef, () => containerRef.current);
|
|
3906
|
+
const selectedIndex = presets.findIndex((preset) => presetValue(preset) === value);
|
|
3907
|
+
const [focusedIndex, setFocusedIndex] = React.useState(null);
|
|
3908
|
+
const activeIndex = focusedIndex !== null && focusedIndex !== void 0 ? focusedIndex : selectedIndex >= 0 ? selectedIndex : 0;
|
|
3909
|
+
const moveFocus = (next) => {
|
|
3910
|
+
var _containerRef$current, _radios$clamped;
|
|
3911
|
+
const clamped = clamp$1(next, 0, presets.length - 1);
|
|
3912
|
+
setFocusedIndex(clamped);
|
|
3913
|
+
const radios = (_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.querySelectorAll("[role=\"radio\"]");
|
|
3914
|
+
radios === null || radios === void 0 || (_radios$clamped = radios[clamped]) === null || _radios$clamped === void 0 || _radios$clamped.focus();
|
|
3915
|
+
};
|
|
3916
|
+
const handleKeyDown = (event) => {
|
|
3917
|
+
const next = {
|
|
3918
|
+
ArrowRight: activeIndex + 1,
|
|
3919
|
+
ArrowLeft: activeIndex - 1,
|
|
3920
|
+
ArrowDown: activeIndex + PRESET_COLUMNS,
|
|
3921
|
+
ArrowUp: activeIndex - PRESET_COLUMNS,
|
|
3922
|
+
Home: 0,
|
|
3923
|
+
End: presets.length - 1
|
|
3924
|
+
}[event.key];
|
|
3925
|
+
if (next === void 0) return;
|
|
3926
|
+
event.preventDefault();
|
|
3927
|
+
moveFocus(next);
|
|
3928
|
+
};
|
|
3929
|
+
return /* @__PURE__ */ jsx(TooltipProvider, {
|
|
3930
|
+
delay: 300,
|
|
3931
|
+
children: /* @__PURE__ */ jsx("div", _objectSpread2(_objectSpread2({
|
|
3932
|
+
ref: containerRef,
|
|
3933
|
+
role: "radiogroup",
|
|
3934
|
+
"aria-label": t("colorPicker.presets"),
|
|
3935
|
+
"data-slot": "color-picker-presets",
|
|
3936
|
+
onKeyDown: handleKeyDown,
|
|
3937
|
+
className: cn("grid grid-cols-7 gap-1.5", className)
|
|
3938
|
+
}, props), {}, { children: presets.map((preset, index) => {
|
|
3939
|
+
const itemValue = presetValue(preset);
|
|
3940
|
+
const isSelected = itemValue === value;
|
|
3941
|
+
const label = labelOf(preset);
|
|
3942
|
+
const fill = swatchFill(preset.hex);
|
|
3943
|
+
return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, { render: /* @__PURE__ */ jsx("button", {
|
|
3944
|
+
type: "button",
|
|
3945
|
+
role: "radio",
|
|
3946
|
+
"aria-checked": isSelected,
|
|
3947
|
+
"aria-label": label,
|
|
3948
|
+
tabIndex: index === activeIndex ? 0 : -1,
|
|
3949
|
+
"data-slot": "color-picker-swatch",
|
|
3950
|
+
"data-color": itemValue,
|
|
3951
|
+
onFocus: () => setFocusedIndex(index),
|
|
3952
|
+
onClick: () => selectValue(itemValue),
|
|
3953
|
+
className: cn("flex size-6 items-center justify-center rounded-sm outline-none transition-colors", "hover:bg-accent", "focus-visible:bg-accent focus-visible:ring-3 focus-visible:ring-ring/50", isSelected && "ring-1 ring-ring ring-inset"),
|
|
3954
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
3955
|
+
"aria-hidden": "true",
|
|
3956
|
+
className: fill.className,
|
|
3957
|
+
style: fill.style
|
|
3958
|
+
})
|
|
3959
|
+
}) }), /* @__PURE__ */ jsx(TooltipContent, { children: label })] }, itemValue);
|
|
3960
|
+
}) }))
|
|
3961
|
+
});
|
|
3962
|
+
});
|
|
3963
|
+
ColorPickerPresets.displayName = "ColorPickerPresets";
|
|
3964
|
+
/**
|
|
3965
|
+
* Full-width, text-labelled two-state switch between the preset grid and the
|
|
3966
|
+
* free-form picker. Place it as the first child of `ColorPickerContent`; it forms its
|
|
3967
|
+
* own header row (`block` stretches the two labelled segments to fill the panel).
|
|
3968
|
+
*
|
|
3969
|
+
* @example
|
|
3970
|
+
* ```tsx
|
|
3971
|
+
* <ColorPickerContent>
|
|
3972
|
+
* <ColorPickerModeToggle />
|
|
3973
|
+
* <ColorPickerPanel mode="presets">...</ColorPickerPanel>
|
|
3974
|
+
* </ColorPickerContent>
|
|
3975
|
+
* ```
|
|
3976
|
+
*/
|
|
3977
|
+
const ColorPickerModeToggle = React.forwardRef((componentProps, forwardRef) => {
|
|
3978
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$20);
|
|
3979
|
+
const { mode, setMode } = useColorPickerContext();
|
|
3980
|
+
const t = useDsTranslation("ds");
|
|
3981
|
+
return /* @__PURE__ */ jsxs(ToggleGroup, _objectSpread2(_objectSpread2({
|
|
3982
|
+
ref: forwardRef,
|
|
3983
|
+
size: "sm",
|
|
3984
|
+
block: true,
|
|
3985
|
+
"aria-label": t("colorPicker.mode"),
|
|
3986
|
+
value: [mode],
|
|
3987
|
+
onValueChange: (value) => {
|
|
3988
|
+
const next = value[0];
|
|
3989
|
+
if (next) setMode(next);
|
|
3990
|
+
},
|
|
3991
|
+
"data-slot": "color-picker-mode-toggle",
|
|
3992
|
+
className
|
|
3993
|
+
}, props), {}, { children: [/* @__PURE__ */ jsx(ToggleGroupItem, {
|
|
3994
|
+
value: "presets",
|
|
3995
|
+
children: t("colorPicker.modePresets")
|
|
3996
|
+
}), /* @__PURE__ */ jsx(ToggleGroupItem, {
|
|
3997
|
+
value: "custom",
|
|
3998
|
+
children: t("colorPicker.modeCustom")
|
|
3999
|
+
})] }));
|
|
4000
|
+
});
|
|
4001
|
+
ColorPickerModeToggle.displayName = "ColorPickerModeToggle";
|
|
4002
|
+
/**
|
|
4003
|
+
* Shows its children only while `mode` is the active one. Mirrors `TabsContent`:
|
|
4004
|
+
* one panel per mode, both declared, one rendered.
|
|
4005
|
+
*
|
|
4006
|
+
* Only needed alongside a `ColorPickerModeToggle` - a picker that offers presets
|
|
4007
|
+
* alone puts `ColorPickerPresets` straight into `ColorPickerContent`.
|
|
4008
|
+
*
|
|
4009
|
+
* @example
|
|
4010
|
+
* ```tsx
|
|
4011
|
+
* <ColorPickerPanel mode="custom">
|
|
4012
|
+
* <ColorPickerArea />
|
|
4013
|
+
* <ColorPickerHue />
|
|
4014
|
+
* </ColorPickerPanel>
|
|
4015
|
+
* ```
|
|
4016
|
+
*/
|
|
4017
|
+
const ColorPickerPanel = React.forwardRef((componentProps, forwardRef) => {
|
|
4018
|
+
const { className, mode } = componentProps, props = _objectWithoutProperties(componentProps, _excluded5$16);
|
|
4019
|
+
const { mode: activeMode } = useColorPickerContext();
|
|
4020
|
+
if (mode !== activeMode) return null;
|
|
4021
|
+
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
4022
|
+
ref: forwardRef,
|
|
4023
|
+
"data-slot": "color-picker-panel",
|
|
4024
|
+
"data-mode": mode,
|
|
4025
|
+
className: cn("flex flex-col gap-3", className)
|
|
4026
|
+
}, props));
|
|
4027
|
+
});
|
|
4028
|
+
ColorPickerPanel.displayName = "ColorPickerPanel";
|
|
4029
|
+
/**
|
|
4030
|
+
* Two-dimensional saturation (x) and brightness (y) surface, tinted by the current
|
|
4031
|
+
* hue. Dragging updates the value continuously and does **not** close the popover.
|
|
4032
|
+
*
|
|
4033
|
+
* Keyboard: left/right adjust saturation, up/down adjust brightness, in 1% steps
|
|
4034
|
+
* (10% with `Shift`).
|
|
4035
|
+
*
|
|
4036
|
+
* @example
|
|
4037
|
+
* ```tsx
|
|
4038
|
+
* <ColorPickerArea />
|
|
4039
|
+
* ```
|
|
4040
|
+
*/
|
|
4041
|
+
const ColorPickerArea = React.forwardRef((componentProps, forwardRef) => {
|
|
4042
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$14);
|
|
4043
|
+
const { hsv, setHsv } = useColorPickerContext();
|
|
4044
|
+
const t = useDsTranslation("ds");
|
|
4045
|
+
const surfaceRef = React.useRef(null);
|
|
4046
|
+
React.useImperativeHandle(forwardRef, () => surfaceRef.current);
|
|
4047
|
+
const commitFromPointer = (event) => {
|
|
4048
|
+
var _surfaceRef$current;
|
|
4049
|
+
const rect = (_surfaceRef$current = surfaceRef.current) === null || _surfaceRef$current === void 0 ? void 0 : _surfaceRef$current.getBoundingClientRect();
|
|
4050
|
+
if (!rect || rect.width === 0 || rect.height === 0) return;
|
|
4051
|
+
setHsv({
|
|
4052
|
+
h: hsv.h,
|
|
4053
|
+
s: clamp$1((event.clientX - rect.left) / rect.width, 0, 1),
|
|
4054
|
+
v: 1 - clamp$1((event.clientY - rect.top) / rect.height, 0, 1)
|
|
4055
|
+
});
|
|
4056
|
+
};
|
|
4057
|
+
const handleKeyDown = (event) => {
|
|
4058
|
+
const step = event.shiftKey ? .1 : .01;
|
|
4059
|
+
const delta = {
|
|
4060
|
+
ArrowRight: { s: clamp$1(hsv.s + step, 0, 1) },
|
|
4061
|
+
ArrowLeft: { s: clamp$1(hsv.s - step, 0, 1) },
|
|
4062
|
+
ArrowUp: { v: clamp$1(hsv.v + step, 0, 1) },
|
|
4063
|
+
ArrowDown: { v: clamp$1(hsv.v - step, 0, 1) }
|
|
4064
|
+
}[event.key];
|
|
4065
|
+
if (!delta) return;
|
|
4066
|
+
event.preventDefault();
|
|
4067
|
+
setHsv(_objectSpread2(_objectSpread2({}, hsv), delta));
|
|
4068
|
+
};
|
|
4069
|
+
const saturationPercent = Math.round(hsv.s * 100);
|
|
4070
|
+
const brightnessPercent = Math.round(hsv.v * 100);
|
|
4071
|
+
return /* @__PURE__ */ jsx("div", _objectSpread2(_objectSpread2({
|
|
4072
|
+
ref: surfaceRef,
|
|
4073
|
+
role: "slider",
|
|
4074
|
+
tabIndex: 0,
|
|
4075
|
+
"aria-label": t("colorPicker.saturation"),
|
|
4076
|
+
"aria-valuemin": 0,
|
|
4077
|
+
"aria-valuemax": 100,
|
|
4078
|
+
"aria-valuenow": saturationPercent,
|
|
4079
|
+
"aria-valuetext": t("colorPicker.areaValue", {
|
|
4080
|
+
saturation: saturationPercent,
|
|
4081
|
+
brightness: brightnessPercent
|
|
4082
|
+
}),
|
|
4083
|
+
"data-slot": "color-picker-area",
|
|
4084
|
+
onPointerDown: (event) => {
|
|
4085
|
+
event.currentTarget.setPointerCapture(event.pointerId);
|
|
4086
|
+
commitFromPointer(event);
|
|
4087
|
+
},
|
|
4088
|
+
onPointerMove: (event) => {
|
|
4089
|
+
if (event.currentTarget.hasPointerCapture(event.pointerId)) commitFromPointer(event);
|
|
4090
|
+
},
|
|
4091
|
+
onKeyDown: handleKeyDown,
|
|
4092
|
+
className: cn("relative h-28 w-full touch-none rounded-sm ring-1 ring-foreground/10 ring-inset outline-none focus-visible:ring-3 focus-visible:ring-ring/50", className),
|
|
4093
|
+
style: {
|
|
4094
|
+
backgroundColor: hsvToHex({
|
|
4095
|
+
h: hsv.h,
|
|
4096
|
+
s: 1,
|
|
4097
|
+
v: 1
|
|
4098
|
+
}),
|
|
4099
|
+
backgroundImage: "linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, transparent)"
|
|
4100
|
+
}
|
|
4101
|
+
}, props), {}, { children: /* @__PURE__ */ jsx("span", {
|
|
4102
|
+
"aria-hidden": "true",
|
|
4103
|
+
className: "pointer-events-none absolute size-3 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-sm ring-1 ring-black/20",
|
|
4104
|
+
style: {
|
|
4105
|
+
left: `${hsv.s * 100}%`,
|
|
4106
|
+
top: `${(1 - hsv.v) * 100}%`
|
|
4107
|
+
}
|
|
4108
|
+
}) }));
|
|
4109
|
+
});
|
|
4110
|
+
ColorPickerArea.displayName = "ColorPickerArea";
|
|
4111
|
+
/**
|
|
4112
|
+
* Hue slider, 0-360, with a full-spectrum track. Built on the Base UI Slider
|
|
4113
|
+
* primitive rather than the DS `Slider` because the track paints a spectrum and
|
|
4114
|
+
* has no filled range. Dragging does **not** close the popover.
|
|
4115
|
+
*
|
|
4116
|
+
* @example
|
|
4117
|
+
* ```tsx
|
|
4118
|
+
* <ColorPickerHue />
|
|
4119
|
+
* ```
|
|
4120
|
+
*/
|
|
4121
|
+
const ColorPickerHue = React.forwardRef((componentProps, forwardRef) => {
|
|
4122
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded7$7);
|
|
4123
|
+
const { hsv, setHsv } = useColorPickerContext();
|
|
4124
|
+
const t = useDsTranslation("ds");
|
|
4125
|
+
return /* @__PURE__ */ jsx(Slider$1.Root, _objectSpread2(_objectSpread2({
|
|
4126
|
+
ref: forwardRef,
|
|
4127
|
+
value: Math.round(hsv.h),
|
|
4128
|
+
min: 0,
|
|
4129
|
+
max: 360,
|
|
4130
|
+
thumbAlignment: "edge",
|
|
4131
|
+
"data-slot": "color-picker-hue",
|
|
4132
|
+
onValueChange: (value) => {
|
|
4133
|
+
var _value$;
|
|
4134
|
+
setHsv(_objectSpread2(_objectSpread2({}, hsv), {}, { h: Array.isArray(value) ? (_value$ = value[0]) !== null && _value$ !== void 0 ? _value$ : 0 : value }));
|
|
4135
|
+
},
|
|
4136
|
+
className: cn("w-full", className)
|
|
4137
|
+
}, props), {}, { children: /* @__PURE__ */ jsx(Slider$1.Control, {
|
|
4138
|
+
className: "relative flex w-full touch-none items-center select-none",
|
|
4139
|
+
children: /* @__PURE__ */ jsx(Slider$1.Track, {
|
|
4140
|
+
className: "relative h-2 w-full grow rounded-full ring-1 ring-foreground/10 ring-inset",
|
|
4141
|
+
style: { backgroundImage: "linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%)" },
|
|
4142
|
+
children: /* @__PURE__ */ jsx(Slider$1.Thumb, {
|
|
4143
|
+
"aria-label": t("colorPicker.hue"),
|
|
4144
|
+
className: "block size-4 shrink-0 rounded-full border-2 border-white bg-transparent shadow-sm ring-1 ring-black/20 transition-[box-shadow] focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-hidden"
|
|
4145
|
+
})
|
|
4146
|
+
})
|
|
4147
|
+
}) }));
|
|
4148
|
+
});
|
|
4149
|
+
ColorPickerHue.displayName = "ColorPickerHue";
|
|
4150
|
+
/**
|
|
4151
|
+
* Hex text field. Accepts `#rgb` / `#rrggbb`, with or without the leading `#`, in any
|
|
4152
|
+
* case. Commits on `Enter` or blur; reverts to the current colour when the input is
|
|
4153
|
+
* not a valid hex, so a half-typed value never escapes as a colour change.
|
|
4154
|
+
*
|
|
4155
|
+
* @example
|
|
4156
|
+
* ```tsx
|
|
4157
|
+
* <ColorPickerHexField />
|
|
4158
|
+
* ```
|
|
4159
|
+
*/
|
|
4160
|
+
const ColorPickerHexField = React.forwardRef((componentProps, forwardRef) => {
|
|
4161
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded8$7);
|
|
4162
|
+
const { hsv, setHex } = useColorPickerContext();
|
|
4163
|
+
const t = useDsTranslation("ds");
|
|
4164
|
+
const hex = hsvToHex(hsv);
|
|
4165
|
+
const [draft, setDraft] = React.useState(null);
|
|
4166
|
+
const commit = () => {
|
|
4167
|
+
if (draft === null) return;
|
|
4168
|
+
const normalized = normalizeHex(draft);
|
|
4169
|
+
if (normalized) setHex(normalized);
|
|
4170
|
+
setDraft(null);
|
|
4171
|
+
};
|
|
4172
|
+
return /* @__PURE__ */ jsx(Input, _objectSpread2({
|
|
4173
|
+
ref: forwardRef,
|
|
4174
|
+
value: draft !== null && draft !== void 0 ? draft : hex,
|
|
4175
|
+
"aria-label": t("colorPicker.hex"),
|
|
4176
|
+
spellCheck: false,
|
|
4177
|
+
autoComplete: "off",
|
|
4178
|
+
"data-slot": "color-picker-hex-field",
|
|
4179
|
+
onChange: (event) => setDraft(event.target.value),
|
|
4180
|
+
onBlur: commit,
|
|
4181
|
+
onKeyDown: (event) => {
|
|
4182
|
+
if (event.key === "Enter") {
|
|
4183
|
+
event.preventDefault();
|
|
4184
|
+
commit();
|
|
4185
|
+
}
|
|
4186
|
+
},
|
|
4187
|
+
className: cn("font-mono uppercase", className)
|
|
4188
|
+
}, props));
|
|
4189
|
+
});
|
|
4190
|
+
ColorPickerHexField.displayName = "ColorPickerHexField";
|
|
4191
|
+
//#endregion
|
|
4192
|
+
//#region src/components/textarea.tsx
|
|
4193
|
+
const _excluded$40 = ["className"];
|
|
4194
|
+
/**
|
|
4195
|
+
* Multi-line text field styled to the design system.
|
|
4196
|
+
*
|
|
4197
|
+
* Renders a native `<textarea>` that auto-grows with its content
|
|
4198
|
+
* (`field-sizing: content`) and shows focus-ring and `aria-invalid` error
|
|
4199
|
+
* styling.
|
|
4200
|
+
*
|
|
4201
|
+
* @example
|
|
4202
|
+
* ```tsx
|
|
4203
|
+
* <Textarea placeholder="Leave a comment…" rows={4} />
|
|
4204
|
+
* ```
|
|
4205
|
+
*/
|
|
4206
|
+
const Textarea = React.forwardRef((componentProps, forwardRef) => {
|
|
4207
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$40);
|
|
4208
|
+
return /* @__PURE__ */ jsx("textarea", _objectSpread2({
|
|
4209
|
+
ref: forwardRef,
|
|
4210
|
+
"data-slot": "textarea",
|
|
4211
|
+
className: cn("border-input text-foreground placeholder:text-muted-foreground hover:aria-invalid:border-destructive focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3 aria-invalid:border-destructive focus-visible:aria-invalid:ring-destructive/20 focus-visible:aria-invalid:ring-3 dark:focus-visible:aria-invalid:ring-destructive/40 dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-background px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 dark:disabled:bg-input/80 md:text-sm", className)
|
|
4212
|
+
}, props));
|
|
4213
|
+
});
|
|
4214
|
+
Textarea.displayName = "Textarea";
|
|
4215
|
+
//#endregion
|
|
4216
|
+
//#region src/components/input-group.tsx
|
|
4217
|
+
const _excluded$39 = ["className"];
|
|
4218
|
+
const _excluded2$27 = ["className", "align"];
|
|
4219
|
+
const _excluded3$22 = [
|
|
4220
|
+
"className",
|
|
4221
|
+
"type",
|
|
4222
|
+
"variant",
|
|
4223
|
+
"size"
|
|
4224
|
+
];
|
|
4225
|
+
const _excluded4$19 = ["className"];
|
|
4226
|
+
const _excluded5$15 = ["className"];
|
|
4227
|
+
const _excluded6$13 = ["className"];
|
|
4228
|
+
/**
|
|
4229
|
+
* The bordered flex-row shell shared by `InputGroup` and `NumericInput`.
|
|
4230
|
+
* Owns the border, height, hover/focus ring, disabled fade, error halo, and the
|
|
4231
|
+
* affix-driven input padding adjustments. Exported so `NumericInput` renders an
|
|
4232
|
+
* identical container without nesting inside `InputGroup`.
|
|
4233
|
+
*/
|
|
4234
|
+
const inputGroupShellClassName = cn("group/input-group bg-background border-input dark:bg-input/30 relative flex h-10 w-full items-center rounded-md border transition-[color,box-shadow] outline-none has-[>textarea]:h-auto has-[>[data-multiline=true]]:h-auto", "has-[input:disabled]:bg-input/50 has-[textarea:disabled]:bg-input/50 has-[input:disabled]:opacity-50 has-[textarea:disabled]:opacity-50 dark:has-[input:disabled]:bg-input/80 dark:has-[textarea:disabled]:bg-input/80", "has-[[data-slot=input-group-control][aria-disabled=true]]:bg-input/50 has-[[data-slot=input-group-control][aria-disabled=true]]:opacity-50 dark:has-[[data-slot=input-group-control][aria-disabled=true]]:bg-input/80", "has-[>[data-align=inline-start]]:[&>input]:pl-2", "has-[>[data-align=inline-end]]:[&>input]:pr-2", "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3", "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3", "has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-3", "has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]:focus-visible]:ring-destructive/20 dark:has-[[data-slot][aria-invalid=true]:focus-visible]:ring-destructive/40", "data-[invalid]:border-destructive has-[input:focus-visible]:data-[invalid]:ring-3 has-[input:focus-visible]:data-[invalid]:ring-destructive/20 dark:has-[input:focus-visible]:data-[invalid]:ring-destructive/40");
|
|
4235
|
+
/**
|
|
4236
|
+
* Bordered flex-row container that groups an input with leading/trailing addons
|
|
4237
|
+
* (icons, buttons, text). Renders a `<div role="group">` and owns the shared
|
|
4238
|
+
* border, height, hover/focus ring, disabled fade, and error halo; place an
|
|
4239
|
+
* `InputGroupInput`/`InputGroupTextarea` control plus `InputGroupAddon`,
|
|
4240
|
+
* `InputGroupButton`, or `InputGroupText` children inside it.
|
|
4241
|
+
*
|
|
4242
|
+
* @example
|
|
4243
|
+
* ```tsx
|
|
4244
|
+
* <InputGroup>
|
|
4245
|
+
* <InputGroupAddon>
|
|
4246
|
+
* <SearchIcon />
|
|
4247
|
+
* </InputGroupAddon>
|
|
4248
|
+
* <InputGroupInput placeholder="Search…" />
|
|
4249
|
+
* </InputGroup>
|
|
4250
|
+
* ```
|
|
4251
|
+
*/
|
|
4252
|
+
const InputGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
4253
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$39);
|
|
4254
|
+
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
4255
|
+
ref: forwardRef,
|
|
4256
|
+
"data-slot": "input-group",
|
|
4257
|
+
role: "group",
|
|
4258
|
+
className: cn(inputGroupShellClassName, className)
|
|
4259
|
+
}, props));
|
|
4260
|
+
});
|
|
4261
|
+
InputGroup.displayName = "InputGroup";
|
|
4262
|
+
const inputGroupAddonVariants = cva("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50", {
|
|
4263
|
+
variants: { align: {
|
|
4264
|
+
"inline-start": "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
|
|
4265
|
+
"inline-end": "order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]",
|
|
4266
|
+
"block-start": "order-first w-full justify-start px-3 py-2 [.border-b]:pb-3",
|
|
4267
|
+
"block-end": "order-last w-full justify-start px-3 py-2 [.border-t]:pt-3"
|
|
4268
|
+
} },
|
|
4269
|
+
defaultVariants: { align: "inline-start" }
|
|
4270
|
+
});
|
|
4271
|
+
const InputGroupAddon = React.forwardRef((componentProps, forwardRef) => {
|
|
4272
|
+
const { className, align = "inline-start" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$27);
|
|
4273
|
+
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
4274
|
+
ref: forwardRef,
|
|
4275
|
+
role: "group",
|
|
4276
|
+
"data-slot": "input-group-addon",
|
|
4277
|
+
"data-align": align,
|
|
4278
|
+
className: cn(inputGroupAddonVariants({ align }), className),
|
|
4279
|
+
onClick: (e) => {
|
|
4280
|
+
var _e$currentTarget$pare;
|
|
4281
|
+
if (e.target.closest("button")) return;
|
|
4282
|
+
(_e$currentTarget$pare = e.currentTarget.parentElement) === null || _e$currentTarget$pare === void 0 || (_e$currentTarget$pare = _e$currentTarget$pare.querySelector("input, textarea, [data-slot=\"input-group-control\"]")) === null || _e$currentTarget$pare === void 0 || _e$currentTarget$pare.focus();
|
|
4283
|
+
}
|
|
4284
|
+
}, props));
|
|
4285
|
+
});
|
|
4286
|
+
InputGroupAddon.displayName = "InputGroupAddon";
|
|
4287
|
+
const InputGroupButton = React.forwardRef((componentProps, forwardRef) => {
|
|
4288
|
+
const { className, type = "button", variant = "ghost", size = "sm" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$22);
|
|
4289
|
+
return /* @__PURE__ */ jsx(Button, _objectSpread2({
|
|
4290
|
+
ref: forwardRef,
|
|
4291
|
+
type,
|
|
4292
|
+
variant,
|
|
4293
|
+
size,
|
|
4294
|
+
className
|
|
4295
|
+
}, props));
|
|
4296
|
+
});
|
|
4297
|
+
InputGroupButton.displayName = "InputGroupButton";
|
|
3205
4298
|
const InputGroupText = React.forwardRef((componentProps, forwardRef) => {
|
|
3206
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$
|
|
4299
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$19);
|
|
3207
4300
|
return /* @__PURE__ */ jsx("span", _objectSpread2({
|
|
3208
4301
|
ref: forwardRef,
|
|
3209
4302
|
className: cn("text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className)
|
|
@@ -3229,20 +4322,20 @@ const InputGroupTextarea = React.forwardRef((componentProps, forwardRef) => {
|
|
|
3229
4322
|
InputGroupTextarea.displayName = "InputGroupTextarea";
|
|
3230
4323
|
//#endregion
|
|
3231
4324
|
//#region src/components/combobox.tsx
|
|
3232
|
-
const _excluded$
|
|
4325
|
+
const _excluded$38 = [
|
|
3233
4326
|
"className",
|
|
3234
4327
|
"children",
|
|
3235
4328
|
"aria-label"
|
|
3236
4329
|
];
|
|
3237
|
-
const _excluded2$
|
|
3238
|
-
const _excluded3$
|
|
4330
|
+
const _excluded2$26 = ["className", "aria-label"];
|
|
4331
|
+
const _excluded3$21 = [
|
|
3239
4332
|
"className",
|
|
3240
4333
|
"children",
|
|
3241
4334
|
"disabled",
|
|
3242
4335
|
"showTrigger",
|
|
3243
4336
|
"showClear"
|
|
3244
4337
|
];
|
|
3245
|
-
const _excluded4$
|
|
4338
|
+
const _excluded4$18 = [
|
|
3246
4339
|
"className",
|
|
3247
4340
|
"side",
|
|
3248
4341
|
"sideOffset",
|
|
@@ -3267,7 +4360,8 @@ const _excluded12$3 = [
|
|
|
3267
4360
|
"showRemove",
|
|
3268
4361
|
"color",
|
|
3269
4362
|
"tone",
|
|
3270
|
-
"legacyColor"
|
|
4363
|
+
"legacyColor",
|
|
4364
|
+
"customColor"
|
|
3271
4365
|
];
|
|
3272
4366
|
const _excluded13$3 = ["className"];
|
|
3273
4367
|
/**
|
|
@@ -3300,7 +4394,7 @@ function ComboboxValue(componentProps) {
|
|
|
3300
4394
|
* trailing chevron icon.
|
|
3301
4395
|
*/
|
|
3302
4396
|
const ComboboxTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
3303
|
-
const { className, children, "aria-label": ariaLabel } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
4397
|
+
const { className, children, "aria-label": ariaLabel } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$38);
|
|
3304
4398
|
const t = useDsTranslation("ds");
|
|
3305
4399
|
const resolvedAriaLabel = ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : children == null ? t("combobox.toggleOptions") : void 0;
|
|
3306
4400
|
return /* @__PURE__ */ jsxs(Combobox$1.Trigger, _objectSpread2(_objectSpread2({
|
|
@@ -3316,7 +4410,7 @@ ComboboxTrigger.displayName = "ComboboxTrigger";
|
|
|
3316
4410
|
* `<button>` with an X icon.
|
|
3317
4411
|
*/
|
|
3318
4412
|
const ComboboxClear = React.forwardRef((componentProps, forwardRef) => {
|
|
3319
|
-
const { className, "aria-label": ariaLabel } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
4413
|
+
const { className, "aria-label": ariaLabel } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$26);
|
|
3320
4414
|
const t = useDsTranslation("ds");
|
|
3321
4415
|
return /* @__PURE__ */ jsx(Combobox$1.Clear, _objectSpread2(_objectSpread2({
|
|
3322
4416
|
ref: forwardRef,
|
|
@@ -3335,7 +4429,7 @@ ComboboxClear.displayName = "ComboboxClear";
|
|
|
3335
4429
|
* `<div>` `InputGroup` containing the input plus optional trigger and clear addon buttons.
|
|
3336
4430
|
*/
|
|
3337
4431
|
const ComboboxInput = React.forwardRef((componentProps, forwardRef) => {
|
|
3338
|
-
const { className, children, disabled = false, showTrigger = true, showClear = false } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$
|
|
4432
|
+
const { className, children, disabled = false, showTrigger = true, showClear = false } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$21);
|
|
3339
4433
|
const t = useDsTranslation("ds");
|
|
3340
4434
|
return /* @__PURE__ */ jsxs(Combobox$1.InputGroup, {
|
|
3341
4435
|
render: /* @__PURE__ */ jsx(InputGroup, {
|
|
@@ -3366,7 +4460,7 @@ ComboboxInput.displayName = "ComboboxInput";
|
|
|
3366
4460
|
* `Portal` and `Positioner`. Renders a positioned `<div>`.
|
|
3367
4461
|
*/
|
|
3368
4462
|
const ComboboxContent = React.forwardRef((componentProps, forwardRef) => {
|
|
3369
|
-
const { className, side = "bottom", sideOffset = 6, align = "start", alignOffset = 0, anchor } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$
|
|
4463
|
+
const { className, side = "bottom", sideOffset = 6, align = "start", alignOffset = 0, anchor } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$18);
|
|
3370
4464
|
return /* @__PURE__ */ jsx(Combobox$1.Portal, { children: /* @__PURE__ */ jsx(Combobox$1.Positioner, {
|
|
3371
4465
|
side,
|
|
3372
4466
|
sideOffset,
|
|
@@ -3506,14 +4600,15 @@ ComboboxChips.displayName = "ComboboxChips";
|
|
|
3506
4600
|
* Renders a `Chip` `<div>` with an optional remove button.
|
|
3507
4601
|
*/
|
|
3508
4602
|
const ComboboxChip = React.forwardRef(function ComboboxChip(componentProps, forwardRef) {
|
|
3509
|
-
const { className, children, showRemove = true, color, tone, legacyColor } = componentProps, props = _objectWithoutProperties(componentProps, _excluded12$3);
|
|
4603
|
+
const { className, children, showRemove = true, color, tone, legacyColor, customColor } = componentProps, props = _objectWithoutProperties(componentProps, _excluded12$3);
|
|
3510
4604
|
const t = useDsTranslation("ds");
|
|
3511
4605
|
return /* @__PURE__ */ jsxs(Combobox$1.Chip, _objectSpread2(_objectSpread2({
|
|
3512
4606
|
ref: forwardRef,
|
|
3513
4607
|
render: /* @__PURE__ */ jsx(Chip, {
|
|
3514
4608
|
color,
|
|
3515
4609
|
tone,
|
|
3516
|
-
legacyColor
|
|
4610
|
+
legacyColor,
|
|
4611
|
+
customColor
|
|
3517
4612
|
}),
|
|
3518
4613
|
className
|
|
3519
4614
|
}, props), {}, { children: [children, showRemove && /* @__PURE__ */ jsx(Combobox$1.ChipRemove, { render: /* @__PURE__ */ jsx(ChipRemove, { "aria-label": t("multiselect.remove") }) })] }));
|
|
@@ -3540,14 +4635,14 @@ function useComboboxAnchor() {
|
|
|
3540
4635
|
}
|
|
3541
4636
|
//#endregion
|
|
3542
4637
|
//#region src/components/dialog.tsx
|
|
3543
|
-
const _excluded$
|
|
3544
|
-
const _excluded2$
|
|
4638
|
+
const _excluded$37 = ["className"];
|
|
4639
|
+
const _excluded2$25 = [
|
|
3545
4640
|
"className",
|
|
3546
4641
|
"children",
|
|
3547
4642
|
"showCloseButton"
|
|
3548
4643
|
];
|
|
3549
|
-
const _excluded3$
|
|
3550
|
-
const _excluded4$
|
|
4644
|
+
const _excluded3$20 = ["className"];
|
|
4645
|
+
const _excluded4$17 = [
|
|
3551
4646
|
"className",
|
|
3552
4647
|
"showCloseButton",
|
|
3553
4648
|
"children"
|
|
@@ -3610,7 +4705,7 @@ DialogClose.displayName = "DialogClose";
|
|
|
3610
4705
|
* fixed, full-viewport `<div>`. Included automatically by `DialogContent`.
|
|
3611
4706
|
*/
|
|
3612
4707
|
const DialogOverlay = React.forwardRef((componentProps, forwardRef) => {
|
|
3613
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
4708
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$37);
|
|
3614
4709
|
return /* @__PURE__ */ jsx(Dialog$1.Backdrop, _objectSpread2({
|
|
3615
4710
|
ref: forwardRef,
|
|
3616
4711
|
"data-slot": "dialog-overlay",
|
|
@@ -3623,7 +4718,7 @@ DialogOverlay.displayName = "DialogOverlay";
|
|
|
3623
4718
|
* automatically includes its own `DialogPortal` and `DialogOverlay`.
|
|
3624
4719
|
*/
|
|
3625
4720
|
const DialogContent = React.forwardRef((componentProps, forwardRef) => {
|
|
3626
|
-
const { className, children, showCloseButton = true } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
4721
|
+
const { className, children, showCloseButton = true } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$25);
|
|
3627
4722
|
return /* @__PURE__ */ jsxs(DialogPortal, { children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(Dialog$1.Popup, _objectSpread2(_objectSpread2({
|
|
3628
4723
|
ref: forwardRef,
|
|
3629
4724
|
"data-slot": "dialog-content",
|
|
@@ -3647,7 +4742,7 @@ DialogContent.displayName = "DialogContent";
|
|
|
3647
4742
|
* `<div data-slot="dialog-header">` stacking its children vertically.
|
|
3648
4743
|
*/
|
|
3649
4744
|
const DialogHeader = React.forwardRef((componentProps, forwardRef) => {
|
|
3650
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$
|
|
4745
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$20);
|
|
3651
4746
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
3652
4747
|
ref: forwardRef,
|
|
3653
4748
|
"data-slot": "dialog-header",
|
|
@@ -3660,7 +4755,7 @@ DialogHeader.displayName = "DialogHeader";
|
|
|
3660
4755
|
* right-aligns its children on larger screens.
|
|
3661
4756
|
*/
|
|
3662
4757
|
const DialogFooter = React.forwardRef((componentProps, forwardRef) => {
|
|
3663
|
-
const { className, showCloseButton = false, children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$
|
|
4758
|
+
const { className, showCloseButton = false, children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$17);
|
|
3664
4759
|
return /* @__PURE__ */ jsxs("div", _objectSpread2(_objectSpread2({
|
|
3665
4760
|
ref: forwardRef,
|
|
3666
4761
|
"data-slot": "dialog-footer",
|
|
@@ -3699,14 +4794,14 @@ const DialogDescription = React.forwardRef((componentProps, forwardRef) => {
|
|
|
3699
4794
|
DialogDescription.displayName = "DialogDescription";
|
|
3700
4795
|
//#endregion
|
|
3701
4796
|
//#region src/components/command.tsx
|
|
3702
|
-
const _excluded$
|
|
3703
|
-
const _excluded2$
|
|
4797
|
+
const _excluded$36 = ["className"];
|
|
4798
|
+
const _excluded2$24 = [
|
|
3704
4799
|
"title",
|
|
3705
4800
|
"description",
|
|
3706
4801
|
"children"
|
|
3707
4802
|
];
|
|
3708
|
-
const _excluded3$
|
|
3709
|
-
const _excluded4$
|
|
4803
|
+
const _excluded3$19 = ["className"];
|
|
4804
|
+
const _excluded4$16 = ["className"];
|
|
3710
4805
|
const _excluded5$12 = ["className"];
|
|
3711
4806
|
const _excluded6$10 = ["className"];
|
|
3712
4807
|
const _excluded7$5 = ["className"];
|
|
@@ -3729,7 +4824,7 @@ const _excluded8$5 = ["className"];
|
|
|
3729
4824
|
* ```
|
|
3730
4825
|
*/
|
|
3731
4826
|
const Command = React.forwardRef((componentProps, forwardRef) => {
|
|
3732
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
4827
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$36);
|
|
3733
4828
|
return /* @__PURE__ */ jsx(Command$1, _objectSpread2({
|
|
3734
4829
|
ref: forwardRef,
|
|
3735
4830
|
"data-slot": "command",
|
|
@@ -3757,7 +4852,7 @@ Command.displayName = "Command";
|
|
|
3757
4852
|
* ```
|
|
3758
4853
|
*/
|
|
3759
4854
|
function CommandDialog(componentProps) {
|
|
3760
|
-
const { title = "Command Palette", description = "Search for a command to run...", children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
4855
|
+
const { title = "Command Palette", description = "Search for a command to run...", children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$24);
|
|
3761
4856
|
return /* @__PURE__ */ jsxs(Dialog, _objectSpread2(_objectSpread2({}, props), {}, { children: [/* @__PURE__ */ jsxs(DialogHeader, {
|
|
3762
4857
|
className: "sr-only",
|
|
3763
4858
|
children: [/* @__PURE__ */ jsx(DialogTitle, { children: title }), /* @__PURE__ */ jsx(DialogDescription, { children: description })]
|
|
@@ -3774,7 +4869,7 @@ function CommandDialog(componentProps) {
|
|
|
3774
4869
|
* `<input>` inside a `<div>` wrapper with a leading search icon.
|
|
3775
4870
|
*/
|
|
3776
4871
|
const CommandInput = React.forwardRef((componentProps, forwardRef) => {
|
|
3777
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$
|
|
4872
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$19);
|
|
3778
4873
|
return /* @__PURE__ */ jsxs("div", {
|
|
3779
4874
|
"data-slot": "command-input-wrapper",
|
|
3780
4875
|
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
@@ -3791,7 +4886,7 @@ CommandInput.displayName = "CommandInput";
|
|
|
3791
4886
|
* Renders a `<div>` that scrolls vertically when content overflows.
|
|
3792
4887
|
*/
|
|
3793
4888
|
const CommandList = React.forwardRef((componentProps, forwardRef) => {
|
|
3794
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$
|
|
4889
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$16);
|
|
3795
4890
|
return /* @__PURE__ */ jsx(Command$1.List, _objectSpread2({
|
|
3796
4891
|
ref: forwardRef,
|
|
3797
4892
|
"data-slot": "command-list",
|
|
@@ -3866,7 +4961,7 @@ const CommandShortcut = React.forwardRef((componentProps, forwardRef) => {
|
|
|
3866
4961
|
CommandShortcut.displayName = "CommandShortcut";
|
|
3867
4962
|
//#endregion
|
|
3868
4963
|
//#region src/components/country-flag.tsx
|
|
3869
|
-
const _excluded$
|
|
4964
|
+
const _excluded$35 = [
|
|
3870
4965
|
"countryIsoCode",
|
|
3871
4966
|
"size",
|
|
3872
4967
|
"className"
|
|
@@ -3891,7 +4986,7 @@ const sizeMap = {
|
|
|
3891
4986
|
*/
|
|
3892
4987
|
const CountryFlag = React.forwardRef((componentProps, forwardRef) => {
|
|
3893
4988
|
var _FLAGS$countryIsoCode;
|
|
3894
|
-
const { countryIsoCode, size = "xl", className } = componentProps, otherProps = _objectWithoutProperties(componentProps, _excluded$
|
|
4989
|
+
const { countryIsoCode, size = "xl", className } = componentProps, otherProps = _objectWithoutProperties(componentProps, _excluded$35);
|
|
3895
4990
|
const CurrentFlag = (_FLAGS$countryIsoCode = FLAGS[countryIsoCode.toLowerCase()]) !== null && _FLAGS$countryIsoCode !== void 0 ? _FLAGS$countryIsoCode : FlagUs;
|
|
3896
4991
|
return /* @__PURE__ */ jsx(CurrentFlag, _objectSpread2({
|
|
3897
4992
|
ref: forwardRef,
|
|
@@ -4319,6 +5414,7 @@ function DataCombobox(componentProps) {
|
|
|
4319
5414
|
const { items, getItemValue, getItemLabel, renderItem, renderChip, getGroupKey, getGroupLabel, selectionMode = "single", selectedKeys, defaultSelectedKeys, onSelectionChange, onOpenChange, open, selectedItems, disabledKeys, loadingState, skeletonCount, onSearch, onFetchMore, hasMore = false, emptyState, trigger, searchable = true, placeholder, disabled = false, className, contentClassName, anchor, "aria-label": ariaLabel, listAriaLabel, showClear = true, estimateRowHeight } = componentProps;
|
|
4320
5415
|
const multiple = selectionMode === "multiple";
|
|
4321
5416
|
const isSearchable = resolveSearchable(searchable, !!onSearch, items.length);
|
|
5417
|
+
const clientFilter = !isSearchable || onSearch || onFetchMore && hasMore ? null : void 0;
|
|
4322
5418
|
const autoVirtualizeLatch = React.useRef(false);
|
|
4323
5419
|
if (!autoVirtualizeLatch.current) autoVirtualizeLatch.current = shouldAutoVirtualize(!!onFetchMore, items.length);
|
|
4324
5420
|
const virtualizeRows = resolveVirtualizeRows(componentProps.virtualizeRows, autoVirtualizeLatch.current, !!getGroupKey);
|
|
@@ -4374,7 +5470,7 @@ function DataCombobox(componentProps) {
|
|
|
4374
5470
|
onItemHighlighted: (_item, details) => scrollHighlightedRowIntoView(scrollRowIntoViewRef, details.index, details.reason),
|
|
4375
5471
|
items: groups !== null && groups !== void 0 ? groups : items,
|
|
4376
5472
|
disabled,
|
|
4377
|
-
filter:
|
|
5473
|
+
filter: clientFilter,
|
|
4378
5474
|
value: selectedObjects,
|
|
4379
5475
|
onValueChange: commit,
|
|
4380
5476
|
itemToStringValue: getItemValue,
|
|
@@ -4403,7 +5499,7 @@ function DataCombobox(componentProps) {
|
|
|
4403
5499
|
onItemHighlighted: (_item, details) => scrollHighlightedRowIntoView(scrollRowIntoViewRef, details.index, details.reason),
|
|
4404
5500
|
items: groups !== null && groups !== void 0 ? groups : items,
|
|
4405
5501
|
disabled,
|
|
4406
|
-
filter:
|
|
5502
|
+
filter: clientFilter,
|
|
4407
5503
|
value: (_selectedObjects$ = selectedObjects[0]) !== null && _selectedObjects$ !== void 0 ? _selectedObjects$ : null,
|
|
4408
5504
|
onValueChange: (next, details) => commit(next == null ? [] : [next], details),
|
|
4409
5505
|
itemToStringValue: getItemValue,
|
|
@@ -4428,13 +5524,13 @@ function DataCombobox(componentProps) {
|
|
|
4428
5524
|
}
|
|
4429
5525
|
//#endregion
|
|
4430
5526
|
//#region src/components/tree.tsx
|
|
4431
|
-
const _excluded$
|
|
5527
|
+
const _excluded$34 = [
|
|
4432
5528
|
"indent",
|
|
4433
5529
|
"tree",
|
|
4434
5530
|
"className"
|
|
4435
5531
|
];
|
|
4436
|
-
const _excluded2$
|
|
4437
|
-
const _excluded3$
|
|
5532
|
+
const _excluded2$23 = ["style"];
|
|
5533
|
+
const _excluded3$18 = [
|
|
4438
5534
|
"item",
|
|
4439
5535
|
"className",
|
|
4440
5536
|
"children",
|
|
@@ -4443,7 +5539,7 @@ const _excluded3$19 = [
|
|
|
4443
5539
|
"onKeyDown",
|
|
4444
5540
|
"style"
|
|
4445
5541
|
];
|
|
4446
|
-
const _excluded4$
|
|
5542
|
+
const _excluded4$15 = ["style", "onClick"];
|
|
4447
5543
|
const _excluded5$11 = [
|
|
4448
5544
|
"item",
|
|
4449
5545
|
"children",
|
|
@@ -4477,10 +5573,10 @@ function useTreeContext() {
|
|
|
4477
5573
|
* ```
|
|
4478
5574
|
*/
|
|
4479
5575
|
function Tree(_ref) {
|
|
4480
|
-
let { indent = 20, tree, className } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
5576
|
+
let { indent = 20, tree, className } = _ref, props = _objectWithoutProperties(_ref, _excluded$34);
|
|
4481
5577
|
const containerProps = tree && typeof tree.getContainerProps === "function" ? tree.getContainerProps() : {};
|
|
4482
5578
|
const mergedProps = _objectSpread2(_objectSpread2({}, props), containerProps);
|
|
4483
|
-
const { style: propStyle } = mergedProps, otherProps = _objectWithoutProperties(mergedProps, _excluded2$
|
|
5579
|
+
const { style: propStyle } = mergedProps, otherProps = _objectWithoutProperties(mergedProps, _excluded2$23);
|
|
4484
5580
|
const mergedStyle = _objectSpread2(_objectSpread2({}, propStyle), {}, { "--tree-indent": `${indent}px` });
|
|
4485
5581
|
return /* @__PURE__ */ jsx(TreeContext.Provider, {
|
|
4486
5582
|
value: {
|
|
@@ -4505,9 +5601,9 @@ const ACTIVATION_KEYS = /* @__PURE__ */ new Set([
|
|
|
4505
5601
|
* highlight; drives activation for both mouse and keyboard.
|
|
4506
5602
|
*/
|
|
4507
5603
|
function TreeItem(_ref2) {
|
|
4508
|
-
let { item, className, children, onActivate, onClick: userOnClick, onKeyDown: userOnKeyDown, style: userStyle } = _ref2, props = _objectWithoutProperties(_ref2, _excluded3$
|
|
5604
|
+
let { item, className, children, onActivate, onClick: userOnClick, onKeyDown: userOnKeyDown, style: userStyle } = _ref2, props = _objectWithoutProperties(_ref2, _excluded3$18);
|
|
4509
5605
|
const { indent } = useTreeContext();
|
|
4510
|
-
const _ref3 = typeof item.getProps === "function" ? item.getProps() : {}, { style: itemStyle, onClick: _headlessOnClick } = _ref3, restItemProps = _objectWithoutProperties(_ref3, _excluded4$
|
|
5606
|
+
const _ref3 = typeof item.getProps === "function" ? item.getProps() : {}, { style: itemStyle, onClick: _headlessOnClick } = _ref3, restItemProps = _objectWithoutProperties(_ref3, _excluded4$15);
|
|
4511
5607
|
const activate = () => {
|
|
4512
5608
|
if (typeof item.setFocused === "function") item.setFocused();
|
|
4513
5609
|
if (onActivate) onActivate(item);
|
|
@@ -4745,7 +5841,7 @@ function DataTree(componentProps) {
|
|
|
4745
5841
|
}
|
|
4746
5842
|
//#endregion
|
|
4747
5843
|
//#region src/components/label.tsx
|
|
4748
|
-
const _excluded$
|
|
5844
|
+
const _excluded$33 = ["className"];
|
|
4749
5845
|
/**
|
|
4750
5846
|
* Caption for a form control. Renders a `<label>` element with design-system
|
|
4751
5847
|
* typography and disabled styling that reacts to peer/group `data-disabled`
|
|
@@ -4757,7 +5853,7 @@ const _excluded$37 = ["className"];
|
|
|
4757
5853
|
* ```
|
|
4758
5854
|
*/
|
|
4759
5855
|
const Label = React.forwardRef((componentProps, forwardRef) => {
|
|
4760
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
5856
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$33);
|
|
4761
5857
|
return /* @__PURE__ */ jsx("label", _objectSpread2({
|
|
4762
5858
|
ref: forwardRef,
|
|
4763
5859
|
"data-slot": "label",
|
|
@@ -4766,140 +5862,9 @@ const Label = React.forwardRef((componentProps, forwardRef) => {
|
|
|
4766
5862
|
});
|
|
4767
5863
|
Label.displayName = "Label";
|
|
4768
5864
|
//#endregion
|
|
4769
|
-
//#region src/components/popover.tsx
|
|
4770
|
-
const _excluded$36 = [
|
|
4771
|
-
"className",
|
|
4772
|
-
"align",
|
|
4773
|
-
"alignOffset",
|
|
4774
|
-
"side",
|
|
4775
|
-
"sideOffset",
|
|
4776
|
-
"anchor"
|
|
4777
|
-
];
|
|
4778
|
-
const _excluded2$25 = ["className"];
|
|
4779
|
-
const _excluded3$18 = ["className"];
|
|
4780
|
-
const _excluded4$15 = ["className"];
|
|
4781
|
-
/**
|
|
4782
|
-
* Root container for a popover, wrapping Base UI's `Popover.Root`. Manages
|
|
4783
|
-
* open/close state and renders no DOM element — place `PopoverTrigger` and
|
|
4784
|
-
* `PopoverContent` inside it.
|
|
4785
|
-
*
|
|
4786
|
-
* @example
|
|
4787
|
-
* ```tsx
|
|
4788
|
-
* <Popover>
|
|
4789
|
-
* <PopoverTrigger render={<Button variant="outline" />}>Open</PopoverTrigger>
|
|
4790
|
-
* <PopoverContent>Popover body</PopoverContent>
|
|
4791
|
-
* </Popover>
|
|
4792
|
-
* ```
|
|
4793
|
-
*/
|
|
4794
|
-
function Popover(componentProps) {
|
|
4795
|
-
const props = _extends({}, (_objectDestructuringEmpty(componentProps), componentProps));
|
|
4796
|
-
return /* @__PURE__ */ jsx(Popover$1.Root, _objectSpread2({ "data-slot": "popover" }, props));
|
|
4797
|
-
}
|
|
4798
|
-
/**
|
|
4799
|
-
* The element that toggles the popover, wrapping `Popover.Trigger`.
|
|
4800
|
-
* Renders a `<button>` by default; use `render` to swap the element.
|
|
4801
|
-
*/
|
|
4802
|
-
const PopoverTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
4803
|
-
return /* @__PURE__ */ jsx(Popover$1.Trigger, _objectSpread2({
|
|
4804
|
-
"data-slot": "popover-trigger",
|
|
4805
|
-
ref: forwardRef
|
|
4806
|
-
}, componentProps));
|
|
4807
|
-
});
|
|
4808
|
-
PopoverTrigger.displayName = "PopoverTrigger";
|
|
4809
|
-
/**
|
|
4810
|
-
* A button that closes the enclosing popover.
|
|
4811
|
-
* Renders a `<button>` element. Required inside `<PopoverContent>` when
|
|
4812
|
-
* `modal='trap-focus'` is set on the `<Popover>` root so that Base UI
|
|
4813
|
-
* engages the focus trap (focusManagerModal = modal !== false && hasClosePart).
|
|
4814
|
-
*
|
|
4815
|
-
* @example
|
|
4816
|
-
* ```tsx
|
|
4817
|
-
* <PopoverContent>
|
|
4818
|
-
* <PopoverClose className="sr-only">Close</PopoverClose>
|
|
4819
|
-
* {children}
|
|
4820
|
-
* </PopoverContent>
|
|
4821
|
-
* ```
|
|
4822
|
-
*/
|
|
4823
|
-
const PopoverClose = React.forwardRef((componentProps, forwardRef) => {
|
|
4824
|
-
return /* @__PURE__ */ jsx(Popover$1.Close, _objectSpread2({
|
|
4825
|
-
"data-slot": "popover-close",
|
|
4826
|
-
ref: forwardRef
|
|
4827
|
-
}, componentProps));
|
|
4828
|
-
});
|
|
4829
|
-
PopoverClose.displayName = "PopoverClose";
|
|
4830
|
-
/**
|
|
4831
|
-
* The floating panel shown when the popover is open. Composes
|
|
4832
|
-
* `Popover.Portal → Popover.Positioner → Popover.Popup` into a single part and
|
|
4833
|
-
* renders a `<div>` popup. Positioning props (`side`, `sideOffset`, `align`,
|
|
4834
|
-
* `alignOffset`) are forwarded to the positioner; all other props go to the popup.
|
|
4835
|
-
*
|
|
4836
|
-
* @prop side - Which side of the trigger to place the popover. Default: `'bottom'`.
|
|
4837
|
-
* @prop sideOffset - Gap in pixels between the trigger and the popover. Default: `4`.
|
|
4838
|
-
* @prop align - Alignment along the trigger's cross-axis. Default: `'center'`.
|
|
4839
|
-
* @prop alignOffset - Offset in pixels along the cross-axis. Default: `0`.
|
|
4840
|
-
*/
|
|
4841
|
-
const PopoverContent = React.forwardRef((componentProps, forwardRef) => {
|
|
4842
|
-
const { className, align = "center", alignOffset = 0, side = "bottom", sideOffset = 4, anchor } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$36);
|
|
4843
|
-
return /* @__PURE__ */ jsx(Popover$1.Portal, { children: /* @__PURE__ */ jsx(Popover$1.Positioner, {
|
|
4844
|
-
positionMethod: "fixed",
|
|
4845
|
-
align,
|
|
4846
|
-
alignOffset,
|
|
4847
|
-
side,
|
|
4848
|
-
sideOffset,
|
|
4849
|
-
anchor,
|
|
4850
|
-
"data-slot": "popover-positioner",
|
|
4851
|
-
className: "isolate z-popup",
|
|
4852
|
-
children: /* @__PURE__ */ jsx(Popover$1.Popup, _objectSpread2({
|
|
4853
|
-
ref: forwardRef,
|
|
4854
|
-
"data-slot": "popover-content",
|
|
4855
|
-
className: cn("z-50 flex w-72 origin-(--transform-origin) flex-col gap-4 rounded-md bg-popover p-4 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className)
|
|
4856
|
-
}, props))
|
|
4857
|
-
}) });
|
|
4858
|
-
});
|
|
4859
|
-
PopoverContent.displayName = "PopoverContent";
|
|
4860
|
-
/**
|
|
4861
|
-
* Optional header region grouping the popover's title and description.
|
|
4862
|
-
* Renders a `<div>`.
|
|
4863
|
-
*/
|
|
4864
|
-
const PopoverHeader = React.forwardRef((componentProps, forwardRef) => {
|
|
4865
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$25);
|
|
4866
|
-
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
4867
|
-
ref: forwardRef,
|
|
4868
|
-
"data-slot": "popover-header",
|
|
4869
|
-
className: cn("flex flex-col gap-0.5 text-sm", className)
|
|
4870
|
-
}, props));
|
|
4871
|
-
});
|
|
4872
|
-
PopoverHeader.displayName = "PopoverHeader";
|
|
4873
|
-
/**
|
|
4874
|
-
* Accessible title for the popover, wrapping `Popover.Title`.
|
|
4875
|
-
* Renders an `<h2>` and labels the popup for assistive technology.
|
|
4876
|
-
*/
|
|
4877
|
-
const PopoverTitle = React.forwardRef((componentProps, forwardRef) => {
|
|
4878
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$18);
|
|
4879
|
-
return /* @__PURE__ */ jsx(Popover$1.Title, _objectSpread2({
|
|
4880
|
-
ref: forwardRef,
|
|
4881
|
-
"data-slot": "popover-title",
|
|
4882
|
-
className: cn("font-bold", className)
|
|
4883
|
-
}, props));
|
|
4884
|
-
});
|
|
4885
|
-
PopoverTitle.displayName = "PopoverTitle";
|
|
4886
|
-
/**
|
|
4887
|
-
* Accessible supporting text for the popover, wrapping `Popover.Description`.
|
|
4888
|
-
* Renders a `<p>` and describes the popup for assistive technology.
|
|
4889
|
-
*/
|
|
4890
|
-
const PopoverDescription = React.forwardRef((componentProps, forwardRef) => {
|
|
4891
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$15);
|
|
4892
|
-
return /* @__PURE__ */ jsx(Popover$1.Description, _objectSpread2({
|
|
4893
|
-
ref: forwardRef,
|
|
4894
|
-
"data-slot": "popover-description",
|
|
4895
|
-
className: cn("text-muted-foreground", className)
|
|
4896
|
-
}, props));
|
|
4897
|
-
});
|
|
4898
|
-
PopoverDescription.displayName = "PopoverDescription";
|
|
4899
|
-
//#endregion
|
|
4900
5865
|
//#region src/components/field.tsx
|
|
4901
|
-
const _excluded$
|
|
4902
|
-
const _excluded2$
|
|
5866
|
+
const _excluded$32 = ["className"];
|
|
5867
|
+
const _excluded2$22 = ["className", "variant"];
|
|
4903
5868
|
const _excluded3$17 = ["className"];
|
|
4904
5869
|
const _excluded4$14 = ["className", "orientation"];
|
|
4905
5870
|
const _excluded5$10 = ["className"];
|
|
@@ -4928,7 +5893,7 @@ const _excluded13$2 = [
|
|
|
4928
5893
|
* vertical spacing between its children.
|
|
4929
5894
|
*/
|
|
4930
5895
|
const FieldSet = React.forwardRef((componentProps, forwardRef) => {
|
|
4931
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
5896
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$32);
|
|
4932
5897
|
return /* @__PURE__ */ jsx("fieldset", _objectSpread2({
|
|
4933
5898
|
ref: forwardRef,
|
|
4934
5899
|
"data-slot": "field-set",
|
|
@@ -4941,7 +5906,7 @@ FieldSet.displayName = "FieldSet";
|
|
|
4941
5906
|
* section-heading (`'legend'`) and label-sized (`'label'`) typography.
|
|
4942
5907
|
*/
|
|
4943
5908
|
const FieldLegend = React.forwardRef((componentProps, forwardRef) => {
|
|
4944
|
-
const { className, variant = "legend" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
5909
|
+
const { className, variant = "legend" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$22);
|
|
4945
5910
|
return /* @__PURE__ */ jsx("legend", _objectSpread2({
|
|
4946
5911
|
ref: forwardRef,
|
|
4947
5912
|
"data-slot": "field-legend",
|
|
@@ -6437,14 +7402,14 @@ function useDsLocale() {
|
|
|
6437
7402
|
}
|
|
6438
7403
|
//#endregion
|
|
6439
7404
|
//#region src/components/date-picker.tsx
|
|
6440
|
-
const _excluded$
|
|
7405
|
+
const _excluded$31 = [
|
|
6441
7406
|
"ref",
|
|
6442
7407
|
"value",
|
|
6443
7408
|
"placeholder",
|
|
6444
7409
|
"style",
|
|
6445
7410
|
"type"
|
|
6446
7411
|
];
|
|
6447
|
-
const _excluded2$
|
|
7412
|
+
const _excluded2$21 = [
|
|
6448
7413
|
"className",
|
|
6449
7414
|
"mode",
|
|
6450
7415
|
"locale",
|
|
@@ -6471,7 +7436,7 @@ const _excluded3$16 = [
|
|
|
6471
7436
|
"data-testid-to"
|
|
6472
7437
|
];
|
|
6473
7438
|
function DateInputSegment({ segmentProps, disabled, id }) {
|
|
6474
|
-
const { ref, value, placeholder, style, type: _segmentType } = segmentProps, rest = _objectWithoutProperties(segmentProps, _excluded$
|
|
7439
|
+
const { ref, value, placeholder, style, type: _segmentType } = segmentProps, rest = _objectWithoutProperties(segmentProps, _excluded$31);
|
|
6475
7440
|
return /* @__PURE__ */ jsx("input", _objectSpread2({
|
|
6476
7441
|
ref,
|
|
6477
7442
|
id,
|
|
@@ -6725,7 +7690,7 @@ const DatePicker = React.forwardRef((componentProps, forwardRef) => {
|
|
|
6725
7690
|
"use no memo";
|
|
6726
7691
|
var _locale$code, _fromSegmented$select, _toSegmented$selected, _singleSegmented$sele, _fromSegmented$select2, _toSegmented$selected2;
|
|
6727
7692
|
const { className, mode = "single", locale, disabled = false, invalid = false, disabledDates, minDate: minDateProp, maxDate: maxDateProp, captionLayout, open: openProp, onOpenChange, footer, triggerClassName, id, name, "data-testid": dataTestId = "date-picker-input", onValueChange, onRangeChange } = componentProps;
|
|
6728
|
-
const _ref = _objectWithoutProperties(componentProps, _excluded2$
|
|
7693
|
+
const _ref = _objectWithoutProperties(componentProps, _excluded2$21), { value: _v, defaultValue: _dv, predefinedRanges: _pr, "data-testid-to": dataTestIdTo = "date-picker-input-to" } = _ref, props = _objectWithoutProperties(_ref, _excluded3$16);
|
|
6729
7694
|
const dsLocale = useDsLocale();
|
|
6730
7695
|
const resolvedLocaleCode = resolveLocale((_locale$code = locale === null || locale === void 0 ? void 0 : locale.code) !== null && _locale$code !== void 0 ? _locale$code : void 0, dsLocale);
|
|
6731
7696
|
const mask = React.useMemo(() => deriveDateMask(resolvedLocaleCode), [resolvedLocaleCode]);
|
|
@@ -7215,13 +8180,13 @@ const DatePicker = React.forwardRef((componentProps, forwardRef) => {
|
|
|
7215
8180
|
DatePicker.displayName = "DatePicker";
|
|
7216
8181
|
//#endregion
|
|
7217
8182
|
//#region src/components/scroll-area.tsx
|
|
7218
|
-
const _excluded$
|
|
8183
|
+
const _excluded$30 = [
|
|
7219
8184
|
"className",
|
|
7220
8185
|
"children",
|
|
7221
8186
|
"scrollFade",
|
|
7222
8187
|
"scrollbarGutter"
|
|
7223
8188
|
];
|
|
7224
|
-
const _excluded2$
|
|
8189
|
+
const _excluded2$20 = ["className", "orientation"];
|
|
7225
8190
|
/**
|
|
7226
8191
|
* Custom-scrollbar container. Renders the Base UI `ScrollArea.Root` `<div>`
|
|
7227
8192
|
* (with `min-h-0` so it can shrink in flex layouts) wrapping a scrollable
|
|
@@ -7235,7 +8200,7 @@ const _excluded2$22 = ["className", "orientation"];
|
|
|
7235
8200
|
* ```
|
|
7236
8201
|
*/
|
|
7237
8202
|
const ScrollArea = React.forwardRef((componentProps, forwardRef) => {
|
|
7238
|
-
const { className, children, scrollFade = false, scrollbarGutter = false } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
8203
|
+
const { className, children, scrollFade = false, scrollbarGutter = false } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$30);
|
|
7239
8204
|
return /* @__PURE__ */ jsxs(ScrollAreaPrimitive.Root, _objectSpread2(_objectSpread2({
|
|
7240
8205
|
ref: forwardRef,
|
|
7241
8206
|
className: cn("size-full min-h-0", className)
|
|
@@ -7256,7 +8221,7 @@ ScrollArea.displayName = "ScrollArea";
|
|
|
7256
8221
|
* `ScrollArea.Scrollbar` `<div>` containing a rounded `Thumb`.
|
|
7257
8222
|
*/
|
|
7258
8223
|
const ScrollBar = React.forwardRef((componentProps, forwardRef) => {
|
|
7259
|
-
const { className, orientation = "vertical" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
8224
|
+
const { className, orientation = "vertical" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$20);
|
|
7260
8225
|
return /* @__PURE__ */ jsx(ScrollAreaPrimitive.Scrollbar, _objectSpread2(_objectSpread2({
|
|
7261
8226
|
ref: forwardRef,
|
|
7262
8227
|
className: cn("m-1 flex opacity-0 transition-opacity delay-300 data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:w-1.5 data-[orientation=horizontal]:flex-col data-hovering:opacity-100 data-scrolling:opacity-100 data-hovering:delay-0 data-scrolling:delay-0 data-hovering:duration-100 data-scrolling:duration-100", className),
|
|
@@ -7270,8 +8235,8 @@ const ScrollBar = React.forwardRef((componentProps, forwardRef) => {
|
|
|
7270
8235
|
ScrollBar.displayName = "ScrollBar";
|
|
7271
8236
|
//#endregion
|
|
7272
8237
|
//#region src/components/drawer.tsx
|
|
7273
|
-
const _excluded$
|
|
7274
|
-
const _excluded2$
|
|
8238
|
+
const _excluded$29 = ["swipeDirection", "position"];
|
|
8239
|
+
const _excluded2$19 = ["className", "position"];
|
|
7275
8240
|
const _excluded3$15 = ["className", "inContainer"];
|
|
7276
8241
|
const _excluded4$13 = [
|
|
7277
8242
|
"className",
|
|
@@ -7373,7 +8338,7 @@ const DrawerCreateHandle = DrawerPrimitive.createHandle;
|
|
|
7373
8338
|
* ```
|
|
7374
8339
|
*/
|
|
7375
8340
|
function Drawer(_ref) {
|
|
7376
|
-
let { swipeDirection, position = "bottom" } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
8341
|
+
let { swipeDirection, position = "bottom" } = _ref, props = _objectWithoutProperties(_ref, _excluded$29);
|
|
7377
8342
|
return /* @__PURE__ */ jsx(DrawerContext.Provider, {
|
|
7378
8343
|
value: { position },
|
|
7379
8344
|
children: /* @__PURE__ */ jsx(DrawerPrimitive.Root, _objectSpread2({ swipeDirection: swipeDirection !== null && swipeDirection !== void 0 ? swipeDirection : directionMap[position] }, props))
|
|
@@ -7412,7 +8377,7 @@ DrawerClose.displayName = "DrawerClose";
|
|
|
7412
8377
|
* matching `position`.
|
|
7413
8378
|
*/
|
|
7414
8379
|
const DrawerSwipeArea = React.forwardRef((componentProps, forwardRef) => {
|
|
7415
|
-
const { className, position: positionProp } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
8380
|
+
const { className, position: positionProp } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$19);
|
|
7416
8381
|
const { position: contextPosition } = useContext(DrawerContext);
|
|
7417
8382
|
const position = positionProp !== null && positionProp !== void 0 ? positionProp : contextPosition;
|
|
7418
8383
|
return /* @__PURE__ */ jsx(DrawerPrimitive.SwipeArea, _objectSpread2({
|
|
@@ -7797,7 +8762,7 @@ const DrawerMenuRadioItem = React.forwardRef((componentProps, forwardRef) => {
|
|
|
7797
8762
|
DrawerMenuRadioItem.displayName = "DrawerMenuRadioItem";
|
|
7798
8763
|
//#endregion
|
|
7799
8764
|
//#region src/components/dropdown-menu.tsx
|
|
7800
|
-
const _excluded$
|
|
8765
|
+
const _excluded$28 = [
|
|
7801
8766
|
"align",
|
|
7802
8767
|
"alignOffset",
|
|
7803
8768
|
"side",
|
|
@@ -7805,7 +8770,7 @@ const _excluded$31 = [
|
|
|
7805
8770
|
"className",
|
|
7806
8771
|
"container"
|
|
7807
8772
|
];
|
|
7808
|
-
const _excluded2$
|
|
8773
|
+
const _excluded2$18 = ["className", "inset"];
|
|
7809
8774
|
const _excluded3$14 = [
|
|
7810
8775
|
"className",
|
|
7811
8776
|
"inset",
|
|
@@ -7888,7 +8853,7 @@ DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
|
|
|
7888
8853
|
* @prop alignOffset - Offset in pixels along the cross-axis. Default: `0`.
|
|
7889
8854
|
*/
|
|
7890
8855
|
const DropdownMenuContent = React.forwardRef((componentProps, forwardRef) => {
|
|
7891
|
-
const { align = "start", alignOffset = 0, side = "bottom", sideOffset = 4, className, container } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
8856
|
+
const { align = "start", alignOffset = 0, side = "bottom", sideOffset = 4, className, container } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$28);
|
|
7892
8857
|
return /* @__PURE__ */ jsx(Menu.Portal, {
|
|
7893
8858
|
container,
|
|
7894
8859
|
children: /* @__PURE__ */ jsx(Menu.Positioner, {
|
|
@@ -7925,7 +8890,7 @@ DropdownMenuGroup.displayName = "DropdownMenuGroup";
|
|
|
7925
8890
|
* Renders a `<div>`.
|
|
7926
8891
|
*/
|
|
7927
8892
|
const DropdownMenuLabel = React.forwardRef((componentProps, forwardRef) => {
|
|
7928
|
-
const { className, inset } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
8893
|
+
const { className, inset } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$18);
|
|
7929
8894
|
return /* @__PURE__ */ jsx(Menu.GroupLabel, _objectSpread2({
|
|
7930
8895
|
ref: forwardRef,
|
|
7931
8896
|
"data-slot": "dropdown-menu-label",
|
|
@@ -8083,8 +9048,8 @@ const DropdownMenuAddon = React.forwardRef((componentProps, forwardRef) => {
|
|
|
8083
9048
|
DropdownMenuAddon.displayName = "DropdownMenuAddon";
|
|
8084
9049
|
//#endregion
|
|
8085
9050
|
//#region src/components/empty.tsx
|
|
8086
|
-
const _excluded$
|
|
8087
|
-
const _excluded2$
|
|
9051
|
+
const _excluded$27 = ["className"];
|
|
9052
|
+
const _excluded2$17 = ["className"];
|
|
8088
9053
|
const _excluded3$13 = ["className", "variant"];
|
|
8089
9054
|
const _excluded4$11 = ["className"];
|
|
8090
9055
|
const _excluded5$7 = ["className"];
|
|
@@ -8109,7 +9074,7 @@ const _excluded6$5 = ["className"];
|
|
|
8109
9074
|
* ```
|
|
8110
9075
|
*/
|
|
8111
9076
|
const Empty = React.forwardRef((componentProps, forwardRef) => {
|
|
8112
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
9077
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$27);
|
|
8113
9078
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
8114
9079
|
ref: forwardRef,
|
|
8115
9080
|
"data-slot": "empty",
|
|
@@ -8121,7 +9086,7 @@ Empty.displayName = "Empty";
|
|
|
8121
9086
|
* Groups the media, title, and description of an empty state. Renders a `<div>`.
|
|
8122
9087
|
*/
|
|
8123
9088
|
const EmptyHeader = React.forwardRef((componentProps, forwardRef) => {
|
|
8124
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
9089
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$17);
|
|
8125
9090
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
8126
9091
|
ref: forwardRef,
|
|
8127
9092
|
"data-slot": "empty-header",
|
|
@@ -8192,7 +9157,7 @@ const EmptyContent = React.forwardRef((componentProps, forwardRef) => {
|
|
|
8192
9157
|
EmptyContent.displayName = "EmptyContent";
|
|
8193
9158
|
//#endregion
|
|
8194
9159
|
//#region src/components/dropzone.tsx
|
|
8195
|
-
const _excluded$
|
|
9160
|
+
const _excluded$26 = [
|
|
8196
9161
|
"className",
|
|
8197
9162
|
"children",
|
|
8198
9163
|
"onFiles",
|
|
@@ -8209,7 +9174,7 @@ const _excluded$29 = [
|
|
|
8209
9174
|
"onDragLeave",
|
|
8210
9175
|
"onDragOver"
|
|
8211
9176
|
];
|
|
8212
|
-
const _excluded2$
|
|
9177
|
+
const _excluded2$16 = [
|
|
8213
9178
|
"className",
|
|
8214
9179
|
"error",
|
|
8215
9180
|
"onClick",
|
|
@@ -8300,7 +9265,7 @@ function validateFiles(files, options) {
|
|
|
8300
9265
|
* etc.) for file-drop on an arbitrary surface.
|
|
8301
9266
|
*/
|
|
8302
9267
|
const Dropzone = React.forwardRef((componentProps, forwardRef) => {
|
|
8303
|
-
const { className, children, onFiles, onError, accept, multiple = false, maxFiles, maxSize, minSize, disabled = false, hoverMessage = "Drop your file here to upload", dragRejectMessage, onDragEnter, onDragLeave, onDragOver } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
9268
|
+
const { className, children, onFiles, onError, accept, multiple = false, maxFiles, maxSize, minSize, disabled = false, hoverMessage = "Drop your file here to upload", dragRejectMessage, onDragEnter, onDragLeave, onDragOver } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$26);
|
|
8304
9269
|
const inputRef = React.useRef(null);
|
|
8305
9270
|
const [isDragging, setIsDragging] = React.useState(false);
|
|
8306
9271
|
const [isDragReject, setIsDragReject] = React.useState(false);
|
|
@@ -8417,7 +9382,7 @@ Dropzone.displayName = "Dropzone";
|
|
|
8417
9382
|
* when you want file-drop on an existing surface instead.
|
|
8418
9383
|
*/
|
|
8419
9384
|
const DropzoneContent = React.forwardRef((componentProps, forwardRef) => {
|
|
8420
|
-
const { className, error = false, onClick, onKeyDown } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
9385
|
+
const { className, error = false, onClick, onKeyDown } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$16);
|
|
8421
9386
|
const { open, disabled } = useDropzoneContext();
|
|
8422
9387
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
8423
9388
|
ref: forwardRef,
|
|
@@ -8516,7 +9481,7 @@ const DropzoneTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
|
8516
9481
|
DropzoneTrigger.displayName = "DropzoneTrigger";
|
|
8517
9482
|
//#endregion
|
|
8518
9483
|
//#region src/components/theme-provider.tsx
|
|
8519
|
-
const _excluded$
|
|
9484
|
+
const _excluded$25 = ["children"];
|
|
8520
9485
|
/**
|
|
8521
9486
|
* Provides theme context to the app. Wraps next-themes' `ThemeProvider` with DS defaults
|
|
8522
9487
|
* (`data-theme` attribute, `system` default, system detection, no transition flash).
|
|
@@ -8530,7 +9495,7 @@ const _excluded$28 = ["children"];
|
|
|
8530
9495
|
* ```
|
|
8531
9496
|
*/
|
|
8532
9497
|
function ThemeProvider(componentProps) {
|
|
8533
|
-
const { children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
9498
|
+
const { children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$25);
|
|
8534
9499
|
return /* @__PURE__ */ jsx(ThemeProvider$1, _objectSpread2(_objectSpread2({
|
|
8535
9500
|
attribute: "data-theme",
|
|
8536
9501
|
defaultTheme: "system",
|
|
@@ -8540,8 +9505,8 @@ function ThemeProvider(componentProps) {
|
|
|
8540
9505
|
}
|
|
8541
9506
|
//#endregion
|
|
8542
9507
|
//#region src/components/emoji-picker.tsx
|
|
8543
|
-
const _excluded$
|
|
8544
|
-
const _excluded2$
|
|
9508
|
+
const _excluded$24 = ["render", "children"];
|
|
9509
|
+
const _excluded2$15 = [
|
|
8545
9510
|
"className",
|
|
8546
9511
|
"align",
|
|
8547
9512
|
"searchPlaceholder",
|
|
@@ -8607,7 +9572,7 @@ function EmojiPicker({ onEmojiSelect, children }) {
|
|
|
8607
9572
|
* ```
|
|
8608
9573
|
*/
|
|
8609
9574
|
const EmojiPickerTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
8610
|
-
const { render, children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
9575
|
+
const { render, children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$24);
|
|
8611
9576
|
const t = useDsTranslation("ds");
|
|
8612
9577
|
return /* @__PURE__ */ jsx(PopoverTrigger, _objectSpread2(_objectSpread2({
|
|
8613
9578
|
ref: forwardRef,
|
|
@@ -8629,7 +9594,7 @@ EmojiPickerTrigger.displayName = "EmojiPickerTrigger";
|
|
|
8629
9594
|
* ```
|
|
8630
9595
|
*/
|
|
8631
9596
|
function EmojiPickerContent(_ref) {
|
|
8632
|
-
let { className, align = "start", searchPlaceholder, categories, width = 300, suggestedEmojisMode = SuggestionMode.RECENT } = _ref, props = _objectWithoutProperties(_ref, _excluded2$
|
|
9597
|
+
let { className, align = "start", searchPlaceholder, categories, width = 300, suggestedEmojisMode = SuggestionMode.RECENT } = _ref, props = _objectWithoutProperties(_ref, _excluded2$15);
|
|
8633
9598
|
const { onSelect } = useEmojiPickerContext();
|
|
8634
9599
|
const { resolvedTheme } = useTheme();
|
|
8635
9600
|
const t = useDsTranslation("ds");
|
|
@@ -8656,7 +9621,7 @@ function EmojiPickerContent(_ref) {
|
|
|
8656
9621
|
}
|
|
8657
9622
|
//#endregion
|
|
8658
9623
|
//#region src/components/fab.tsx
|
|
8659
|
-
const _excluded$
|
|
9624
|
+
const _excluded$23 = [
|
|
8660
9625
|
"className",
|
|
8661
9626
|
"variant",
|
|
8662
9627
|
"size"
|
|
@@ -8697,7 +9662,7 @@ const fabVariants = cva("group/fab inline-flex shrink-0 items-center justify-cen
|
|
|
8697
9662
|
* ```
|
|
8698
9663
|
*/
|
|
8699
9664
|
const FAB = React.forwardRef((componentProps, forwardRef) => {
|
|
8700
|
-
const { className, variant, size } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
9665
|
+
const { className, variant, size } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$23);
|
|
8701
9666
|
return /* @__PURE__ */ jsx(Button$1, _objectSpread2({
|
|
8702
9667
|
ref: forwardRef,
|
|
8703
9668
|
"data-slot": "fab",
|
|
@@ -8711,7 +9676,7 @@ const FAB = React.forwardRef((componentProps, forwardRef) => {
|
|
|
8711
9676
|
FAB.displayName = "FAB";
|
|
8712
9677
|
//#endregion
|
|
8713
9678
|
//#region src/components/gauge.tsx
|
|
8714
|
-
const _excluded$
|
|
9679
|
+
const _excluded$22 = ["className", "value"];
|
|
8715
9680
|
const GAUGES = 8;
|
|
8716
9681
|
function getSegmentState(index, value) {
|
|
8717
9682
|
if (index >= value) return "empty";
|
|
@@ -8732,7 +9697,7 @@ function getSegmentState(index, value) {
|
|
|
8732
9697
|
* ```
|
|
8733
9698
|
*/
|
|
8734
9699
|
const Gauge = React.forwardRef((componentProps, forwardRef) => {
|
|
8735
|
-
const { className, value } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
9700
|
+
const { className, value } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$22);
|
|
8736
9701
|
const clampedValue = Math.max(0, Math.min(value, GAUGES));
|
|
8737
9702
|
return /* @__PURE__ */ jsx("div", _objectSpread2(_objectSpread2({
|
|
8738
9703
|
ref: forwardRef,
|
|
@@ -8759,8 +9724,8 @@ const Gauge = React.forwardRef((componentProps, forwardRef) => {
|
|
|
8759
9724
|
Gauge.displayName = "Gauge";
|
|
8760
9725
|
//#endregion
|
|
8761
9726
|
//#region src/components/hover-card.tsx
|
|
8762
|
-
const _excluded$
|
|
8763
|
-
const _excluded2$
|
|
9727
|
+
const _excluded$21 = ["delay", "closeDelay"];
|
|
9728
|
+
const _excluded2$14 = [
|
|
8764
9729
|
"className",
|
|
8765
9730
|
"side",
|
|
8766
9731
|
"sideOffset",
|
|
@@ -8805,7 +9770,7 @@ function HoverCard(componentProps) {
|
|
|
8805
9770
|
* @prop render - Replace the default `<a>` with any element or component.
|
|
8806
9771
|
*/
|
|
8807
9772
|
const HoverCardTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
8808
|
-
const { delay = 400, closeDelay = 300 } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
9773
|
+
const { delay = 400, closeDelay = 300 } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$21);
|
|
8809
9774
|
return /* @__PURE__ */ jsx(PreviewCard.Trigger, _objectSpread2({
|
|
8810
9775
|
ref: forwardRef,
|
|
8811
9776
|
"data-slot": "hover-card-trigger",
|
|
@@ -8839,7 +9804,7 @@ HoverCardTrigger.displayName = "HoverCardTrigger";
|
|
|
8839
9804
|
* ```
|
|
8840
9805
|
*/
|
|
8841
9806
|
const HoverCardContent = React.forwardRef((componentProps, forwardRef) => {
|
|
8842
|
-
const { className, side = "bottom", sideOffset = 8, align = "center", alignOffset = 0 } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
9807
|
+
const { className, side = "bottom", sideOffset = 8, align = "center", alignOffset = 0 } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$14);
|
|
8843
9808
|
return /* @__PURE__ */ jsx(PreviewCard.Portal, { children: /* @__PURE__ */ jsx(PreviewCard.Positioner, {
|
|
8844
9809
|
positionMethod: "fixed",
|
|
8845
9810
|
side,
|
|
@@ -8942,7 +9907,7 @@ function useInlineEditCommit({ value, defaultValue, onValueChange, onValueCommit
|
|
|
8942
9907
|
}
|
|
8943
9908
|
//#endregion
|
|
8944
9909
|
//#region src/components/inline-edit-input.tsx
|
|
8945
|
-
const _excluded$
|
|
9910
|
+
const _excluded$20 = [
|
|
8946
9911
|
"prefix",
|
|
8947
9912
|
"readOnly",
|
|
8948
9913
|
"aria-invalid",
|
|
@@ -8982,7 +9947,7 @@ const _excluded$23 = [
|
|
|
8982
9947
|
* ```
|
|
8983
9948
|
*/
|
|
8984
9949
|
const InlineEditInput = React.forwardRef((componentProps, forwardRef) => {
|
|
8985
|
-
const { prefix, readOnly, "aria-invalid": ariaInvalid, className, value, defaultValue, onValueChange, onValueCommit, selectAllOnFocus, onBlur, onKeyDown, onFocus, placeholder } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
9950
|
+
const { prefix, readOnly, "aria-invalid": ariaInvalid, className, value, defaultValue, onValueChange, onValueCommit, selectAllOnFocus, onBlur, onKeyDown, onFocus, placeholder } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$20);
|
|
8986
9951
|
const { currentValue, handleChange, handleCommit, handleRevert } = useInlineEditCommit({
|
|
8987
9952
|
value,
|
|
8988
9953
|
defaultValue,
|
|
@@ -9030,15 +9995,16 @@ const InlineEditInput = React.forwardRef((componentProps, forwardRef) => {
|
|
|
9030
9995
|
InlineEditInput.displayName = "InlineEditInput";
|
|
9031
9996
|
//#endregion
|
|
9032
9997
|
//#region src/components/inline-edit-multi-combobox.tsx
|
|
9033
|
-
const _excluded$
|
|
9998
|
+
const _excluded$19 = [
|
|
9034
9999
|
"className",
|
|
9035
10000
|
"children",
|
|
9036
10001
|
"color",
|
|
9037
10002
|
"tone",
|
|
9038
10003
|
"legacyColor",
|
|
10004
|
+
"customColor",
|
|
9039
10005
|
"glow"
|
|
9040
10006
|
];
|
|
9041
|
-
const _excluded2$
|
|
10007
|
+
const _excluded2$13 = [
|
|
9042
10008
|
"className",
|
|
9043
10009
|
"searchPlaceholder",
|
|
9044
10010
|
"emptyMessage",
|
|
@@ -9158,7 +10124,7 @@ function InlineEditMultiComboboxValue(componentProps) {
|
|
|
9158
10124
|
* ```
|
|
9159
10125
|
*/
|
|
9160
10126
|
const InlineEditMultiComboboxChip = React.forwardRef((componentProps, forwardRef) => {
|
|
9161
|
-
const { className, children, color, tone, legacyColor, glow } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
10127
|
+
const { className, children, color, tone, legacyColor, customColor, glow } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$19);
|
|
9162
10128
|
const { readOnly } = React.useContext(InlineEditMultiComboboxContext);
|
|
9163
10129
|
const t = useDsTranslation("ds");
|
|
9164
10130
|
return /* @__PURE__ */ jsxs(Combobox$1.Chip, _objectSpread2(_objectSpread2({
|
|
@@ -9168,6 +10134,7 @@ const InlineEditMultiComboboxChip = React.forwardRef((componentProps, forwardRef
|
|
|
9168
10134
|
color,
|
|
9169
10135
|
tone,
|
|
9170
10136
|
legacyColor,
|
|
10137
|
+
customColor,
|
|
9171
10138
|
glow
|
|
9172
10139
|
}),
|
|
9173
10140
|
className
|
|
@@ -9224,7 +10191,7 @@ InlineEditMultiComboboxTrigger.displayName = "InlineEditMultiComboboxTrigger";
|
|
|
9224
10191
|
* ```
|
|
9225
10192
|
*/
|
|
9226
10193
|
const InlineEditMultiComboboxContent = React.forwardRef((componentProps, forwardRef) => {
|
|
9227
|
-
const { className, searchPlaceholder, emptyMessage, children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
10194
|
+
const { className, searchPlaceholder, emptyMessage, children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$13);
|
|
9228
10195
|
const t = useDsTranslation("ds");
|
|
9229
10196
|
return /* @__PURE__ */ jsxs(ComboboxContent, _objectSpread2(_objectSpread2({
|
|
9230
10197
|
ref: forwardRef,
|
|
@@ -9358,8 +10325,8 @@ function InlineEditMultiCombobox(componentProps) {
|
|
|
9358
10325
|
}
|
|
9359
10326
|
//#endregion
|
|
9360
10327
|
//#region src/components/inline-edit-select.tsx
|
|
9361
|
-
const _excluded$
|
|
9362
|
-
const _excluded2$
|
|
10328
|
+
const _excluded$18 = ["className"];
|
|
10329
|
+
const _excluded2$12 = [
|
|
9363
10330
|
"className",
|
|
9364
10331
|
"children",
|
|
9365
10332
|
"side",
|
|
@@ -9421,7 +10388,7 @@ InlineEditSelectTrigger.displayName = "InlineEditSelectTrigger";
|
|
|
9421
10388
|
* ```
|
|
9422
10389
|
*/
|
|
9423
10390
|
function InlineEditSelectValue(componentProps) {
|
|
9424
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
10391
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$18);
|
|
9425
10392
|
return /* @__PURE__ */ jsx(Select$1.Value, _objectSpread2({
|
|
9426
10393
|
"data-slot": "inline-edit-value",
|
|
9427
10394
|
className: cn("flex flex-1 min-w-0 truncate text-left", className)
|
|
@@ -9439,7 +10406,7 @@ function InlineEditSelectValue(componentProps) {
|
|
|
9439
10406
|
* ```
|
|
9440
10407
|
*/
|
|
9441
10408
|
const InlineEditSelectContent = React.forwardRef((componentProps, forwardRef) => {
|
|
9442
|
-
const { className, children, side = "bottom", sideOffset = 12, align = "start", alignOffset = 0, alignItemWithTrigger = false } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
10409
|
+
const { className, children, side = "bottom", sideOffset = 12, align = "start", alignOffset = 0, alignItemWithTrigger = false } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$12);
|
|
9443
10410
|
return /* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsx(Select$1.Positioner, {
|
|
9444
10411
|
positionMethod: "fixed",
|
|
9445
10412
|
side,
|
|
@@ -9560,7 +10527,7 @@ function InlineEditSelectCompound(props) {
|
|
|
9560
10527
|
}
|
|
9561
10528
|
//#endregion
|
|
9562
10529
|
//#region src/components/inline-edit-textarea.tsx
|
|
9563
|
-
const _excluded$
|
|
10530
|
+
const _excluded$17 = [
|
|
9564
10531
|
"prefix",
|
|
9565
10532
|
"readOnly",
|
|
9566
10533
|
"aria-invalid",
|
|
@@ -9602,7 +10569,7 @@ const _excluded$20 = [
|
|
|
9602
10569
|
* ```
|
|
9603
10570
|
*/
|
|
9604
10571
|
const InlineEditTextarea = React.forwardRef((componentProps, forwardRef) => {
|
|
9605
|
-
const { prefix, readOnly, "aria-invalid": ariaInvalid, className, value, defaultValue, onValueChange, onValueCommit, selectAllOnFocus, onBlur, onKeyDown, onFocus, placeholder, maxLength } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
10572
|
+
const { prefix, readOnly, "aria-invalid": ariaInvalid, className, value, defaultValue, onValueChange, onValueCommit, selectAllOnFocus, onBlur, onKeyDown, onFocus, placeholder, maxLength } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$17);
|
|
9606
10573
|
const { currentValue, handleChange, handleCommit, handleRevert } = useInlineEditCommit({
|
|
9607
10574
|
value,
|
|
9608
10575
|
defaultValue,
|
|
@@ -9676,7 +10643,7 @@ const InlineEditTextarea = React.forwardRef((componentProps, forwardRef) => {
|
|
|
9676
10643
|
InlineEditTextarea.displayName = "InlineEditTextarea";
|
|
9677
10644
|
//#endregion
|
|
9678
10645
|
//#region src/components/numeric-input.tsx
|
|
9679
|
-
const _excluded$
|
|
10646
|
+
const _excluded$16 = [
|
|
9680
10647
|
"className",
|
|
9681
10648
|
"children",
|
|
9682
10649
|
"prefix",
|
|
@@ -9689,7 +10656,7 @@ const _excluded$19 = [
|
|
|
9689
10656
|
"aria-describedby",
|
|
9690
10657
|
"aria-invalid"
|
|
9691
10658
|
];
|
|
9692
|
-
const _excluded2$
|
|
10659
|
+
const _excluded2$11 = ["className"];
|
|
9693
10660
|
const _excluded3$10 = ["className", "children"];
|
|
9694
10661
|
const _excluded4$9 = ["className", "children"];
|
|
9695
10662
|
/**
|
|
@@ -9714,7 +10681,7 @@ const _excluded4$9 = ["className", "children"];
|
|
|
9714
10681
|
* ```
|
|
9715
10682
|
*/
|
|
9716
10683
|
const NumericInput = React.forwardRef((componentProps, forwardRef) => {
|
|
9717
|
-
const { className, children, prefix, suffix, hideStepper = false, locale, format, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, "aria-invalid": ariaInvalid } = componentProps, rootProps = _objectWithoutProperties(componentProps, _excluded$
|
|
10684
|
+
const { className, children, prefix, suffix, hideStepper = false, locale, format, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, "aria-invalid": ariaInvalid } = componentProps, rootProps = _objectWithoutProperties(componentProps, _excluded$16);
|
|
9718
10685
|
const resolvedLocale = resolveLocale(locale, useDsLocale());
|
|
9719
10686
|
const resolvedFormat = resolveFormat(resolvedLocale, format);
|
|
9720
10687
|
const ariaForRoot = children != null ? {
|
|
@@ -9766,7 +10733,7 @@ NumericInput.displayName = "NumericInput";
|
|
|
9766
10733
|
* ```
|
|
9767
10734
|
*/
|
|
9768
10735
|
const NumericInputControl = React.forwardRef((componentProps, forwardRef) => {
|
|
9769
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
10736
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$11);
|
|
9770
10737
|
return /* @__PURE__ */ jsx(NumberField.Input, _objectSpread2({
|
|
9771
10738
|
ref: forwardRef,
|
|
9772
10739
|
"data-slot": "input-group-control",
|
|
@@ -9820,8 +10787,8 @@ const NumericInputDecrement = React.forwardRef((componentProps, forwardRef) => {
|
|
|
9820
10787
|
NumericInputDecrement.displayName = "NumericInputDecrement";
|
|
9821
10788
|
//#endregion
|
|
9822
10789
|
//#region src/components/input-otp.tsx
|
|
9823
|
-
const _excluded$
|
|
9824
|
-
const _excluded2$
|
|
10790
|
+
const _excluded$15 = ["className", "containerClassName"];
|
|
10791
|
+
const _excluded2$10 = ["className"];
|
|
9825
10792
|
const _excluded3$9 = ["index", "className"];
|
|
9826
10793
|
const _excluded4$8 = ["className"];
|
|
9827
10794
|
/**
|
|
@@ -9840,7 +10807,7 @@ const _excluded4$8 = ["className"];
|
|
|
9840
10807
|
* ```
|
|
9841
10808
|
*/
|
|
9842
10809
|
const InputOTP = React.forwardRef((componentProps, forwardRef) => {
|
|
9843
|
-
const { className, containerClassName } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
10810
|
+
const { className, containerClassName } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$15);
|
|
9844
10811
|
return /* @__PURE__ */ jsx(OTPInput, _objectSpread2({
|
|
9845
10812
|
ref: forwardRef,
|
|
9846
10813
|
"data-slot": "input-otp",
|
|
@@ -9853,7 +10820,7 @@ InputOTP.displayName = "InputOTP";
|
|
|
9853
10820
|
* Groups a run of `InputOTPSlot` cells. Renders a flex `<div>` container.
|
|
9854
10821
|
*/
|
|
9855
10822
|
const InputOTPGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
9856
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
10823
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$10);
|
|
9857
10824
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
9858
10825
|
ref: forwardRef,
|
|
9859
10826
|
"data-slot": "input-otp-group",
|
|
@@ -9897,8 +10864,8 @@ const InputOTPSeparator = React.forwardRef((componentProps, forwardRef) => {
|
|
|
9897
10864
|
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
9898
10865
|
//#endregion
|
|
9899
10866
|
//#region src/components/item.tsx
|
|
9900
|
-
const _excluded$
|
|
9901
|
-
const _excluded2$
|
|
10867
|
+
const _excluded$14 = ["className", "stackedItems"];
|
|
10868
|
+
const _excluded2$9 = ["className"];
|
|
9902
10869
|
const _excluded3$8 = [
|
|
9903
10870
|
"className",
|
|
9904
10871
|
"variant",
|
|
@@ -9917,7 +10884,7 @@ const _excluded10$1 = ["className"];
|
|
|
9917
10884
|
* collapse the items into a single bordered stack; otherwise items are spaced apart.
|
|
9918
10885
|
*/
|
|
9919
10886
|
const ItemGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
9920
|
-
const { className, stackedItems = false } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
10887
|
+
const { className, stackedItems = false } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$14);
|
|
9921
10888
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
9922
10889
|
ref: forwardRef,
|
|
9923
10890
|
role: "list",
|
|
@@ -9932,7 +10899,7 @@ ItemGroup.displayName = "ItemGroup";
|
|
|
9932
10899
|
* Renders a `<div role="separator">`.
|
|
9933
10900
|
*/
|
|
9934
10901
|
const ItemSeparator = React.forwardRef((componentProps, forwardRef) => {
|
|
9935
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
10902
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$9);
|
|
9936
10903
|
return /* @__PURE__ */ jsx(Separator, _objectSpread2({
|
|
9937
10904
|
ref: forwardRef,
|
|
9938
10905
|
"data-slot": "item-separator",
|
|
@@ -10094,7 +11061,7 @@ const ItemFooter = React.forwardRef((componentProps, forwardRef) => {
|
|
|
10094
11061
|
ItemFooter.displayName = "ItemFooter";
|
|
10095
11062
|
//#endregion
|
|
10096
11063
|
//#region src/components/anchor.tsx
|
|
10097
|
-
const _excluded$
|
|
11064
|
+
const _excluded$13 = ["className", "render"];
|
|
10098
11065
|
const anchorVariants = cn(linkStyle, "inline-flex cursor-pointer items-center gap-1.5 font-medium outline-none transition-colors hover:text-primary/80 focus-visible:ring-3 focus-visible:ring-ring/50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-[1em]");
|
|
10099
11066
|
/**
|
|
10100
11067
|
* Renders an `<a>` element styled as a text link. Use instead of
|
|
@@ -10116,7 +11083,7 @@ const anchorVariants = cn(linkStyle, "inline-flex cursor-pointer items-center ga
|
|
|
10116
11083
|
* ```
|
|
10117
11084
|
*/
|
|
10118
11085
|
const Anchor = React.forwardRef((componentProps, forwardRef) => {
|
|
10119
|
-
const { className, render } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
11086
|
+
const { className, render } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$13);
|
|
10120
11087
|
return useRender({
|
|
10121
11088
|
defaultTagName: "a",
|
|
10122
11089
|
props: mergeProps({
|
|
@@ -10130,8 +11097,8 @@ const Anchor = React.forwardRef((componentProps, forwardRef) => {
|
|
|
10130
11097
|
Anchor.displayName = "Anchor";
|
|
10131
11098
|
//#endregion
|
|
10132
11099
|
//#region src/components/list.tsx
|
|
10133
|
-
const _excluded$
|
|
10134
|
-
const _excluded2$
|
|
11100
|
+
const _excluded$12 = ["children", "className"];
|
|
11101
|
+
const _excluded2$8 = ["children", "className"];
|
|
10135
11102
|
const _excluded3$7 = [
|
|
10136
11103
|
"grow",
|
|
10137
11104
|
"wrap",
|
|
@@ -10153,7 +11120,7 @@ const _excluded3$7 = [
|
|
|
10153
11120
|
* ```
|
|
10154
11121
|
*/
|
|
10155
11122
|
const List = React.forwardRef((componentProps, forwardRef) => {
|
|
10156
|
-
const { children, className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
11123
|
+
const { children, className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$12);
|
|
10157
11124
|
return /* @__PURE__ */ jsx("div", _objectSpread2(_objectSpread2({
|
|
10158
11125
|
ref: forwardRef,
|
|
10159
11126
|
className: cn("flex flex-col", className)
|
|
@@ -10165,7 +11132,7 @@ List.displayName = "List";
|
|
|
10165
11132
|
* (`minmax(0,auto) 1fr`) to lay out its `ListCol` children.
|
|
10166
11133
|
*/
|
|
10167
11134
|
const ListRow = React.forwardRef((componentProps, forwardRef) => {
|
|
10168
|
-
const { children, className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
11135
|
+
const { children, className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$8);
|
|
10169
11136
|
return /* @__PURE__ */ jsx("div", _objectSpread2(_objectSpread2({
|
|
10170
11137
|
ref: forwardRef,
|
|
10171
11138
|
className: cn("grid grid-flow-col gap-x-2.5 gap-y-2 p-3 relative rounded-lg", "grid-cols-[minmax(0,auto)_1fr]", className)
|
|
@@ -10186,8 +11153,8 @@ const ListCol = React.forwardRef((componentProps, forwardRef) => {
|
|
|
10186
11153
|
ListCol.displayName = "ListCol";
|
|
10187
11154
|
//#endregion
|
|
10188
11155
|
//#region src/components/pagination.tsx
|
|
10189
|
-
const _excluded$
|
|
10190
|
-
const _excluded2$
|
|
11156
|
+
const _excluded$11 = ["className"];
|
|
11157
|
+
const _excluded2$7 = ["className"];
|
|
10191
11158
|
const _excluded3$6 = [
|
|
10192
11159
|
"className",
|
|
10193
11160
|
"isActive",
|
|
@@ -10221,7 +11188,7 @@ const _excluded6$2 = ["className"];
|
|
|
10221
11188
|
* ```
|
|
10222
11189
|
*/
|
|
10223
11190
|
const Pagination = React.forwardRef((componentProps, forwardRef) => {
|
|
10224
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
11191
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$11);
|
|
10225
11192
|
const t = useDsTranslation("ds");
|
|
10226
11193
|
return /* @__PURE__ */ jsx("nav", _objectSpread2({
|
|
10227
11194
|
ref: forwardRef,
|
|
@@ -10236,7 +11203,7 @@ Pagination.displayName = "Pagination";
|
|
|
10236
11203
|
* Ordered list wrapper for pagination items. Renders a `<ul>`.
|
|
10237
11204
|
*/
|
|
10238
11205
|
const PaginationContent = React.forwardRef((componentProps, forwardRef) => {
|
|
10239
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
11206
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$7);
|
|
10240
11207
|
return /* @__PURE__ */ jsx("ul", _objectSpread2({
|
|
10241
11208
|
ref: forwardRef,
|
|
10242
11209
|
"data-slot": "pagination-content",
|
|
@@ -10332,12 +11299,12 @@ const PaginationEllipsis = React.forwardRef((componentProps, forwardRef) => {
|
|
|
10332
11299
|
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
10333
11300
|
//#endregion
|
|
10334
11301
|
//#region src/components/progress.tsx
|
|
10335
|
-
const _excluded$
|
|
11302
|
+
const _excluded$10 = [
|
|
10336
11303
|
"className",
|
|
10337
11304
|
"children",
|
|
10338
11305
|
"value"
|
|
10339
11306
|
];
|
|
10340
|
-
const _excluded2$
|
|
11307
|
+
const _excluded2$6 = ["className"];
|
|
10341
11308
|
const _excluded3$5 = ["className"];
|
|
10342
11309
|
const _excluded4$5 = ["className"];
|
|
10343
11310
|
const _excluded5$3 = ["className"];
|
|
@@ -10354,7 +11321,7 @@ const _excluded5$3 = ["className"];
|
|
|
10354
11321
|
* ```
|
|
10355
11322
|
*/
|
|
10356
11323
|
const Progress = React.forwardRef((componentProps, forwardRef) => {
|
|
10357
|
-
const { className, children, value } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
11324
|
+
const { className, children, value } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$10);
|
|
10358
11325
|
return /* @__PURE__ */ jsxs(Progress$1.Root, _objectSpread2(_objectSpread2({
|
|
10359
11326
|
ref: forwardRef,
|
|
10360
11327
|
value,
|
|
@@ -10368,7 +11335,7 @@ Progress.displayName = "Progress";
|
|
|
10368
11335
|
* as a rounded muted `<div>`; place a `ProgressIndicator` inside it.
|
|
10369
11336
|
*/
|
|
10370
11337
|
const ProgressTrack = React.forwardRef((componentProps, forwardRef) => {
|
|
10371
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
11338
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$6);
|
|
10372
11339
|
return /* @__PURE__ */ jsx(Progress$1.Track, _objectSpread2({
|
|
10373
11340
|
ref: forwardRef,
|
|
10374
11341
|
className: cn("relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted", className),
|
|
@@ -10417,8 +11384,8 @@ const ProgressValue = React.forwardRef((componentProps, forwardRef) => {
|
|
|
10417
11384
|
ProgressValue.displayName = "ProgressValue";
|
|
10418
11385
|
//#endregion
|
|
10419
11386
|
//#region src/components/radio-group.tsx
|
|
10420
|
-
const _excluded$
|
|
10421
|
-
const _excluded2$
|
|
11387
|
+
const _excluded$9 = ["className"];
|
|
11388
|
+
const _excluded2$5 = ["className"];
|
|
10422
11389
|
/**
|
|
10423
11390
|
* Root container grouping mutually exclusive radio options, wrapping Base UI's `RadioGroup`.
|
|
10424
11391
|
* Renders a `<div role="radiogroup">` that lays out its `RadioGroupItem`s in a vertical grid.
|
|
@@ -10432,7 +11399,7 @@ const _excluded2$7 = ["className"];
|
|
|
10432
11399
|
* ```
|
|
10433
11400
|
*/
|
|
10434
11401
|
const RadioGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
10435
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
11402
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$9);
|
|
10436
11403
|
return /* @__PURE__ */ jsx(RadioGroup$1, _objectSpread2({
|
|
10437
11404
|
ref: forwardRef,
|
|
10438
11405
|
"data-slot": "radio-group",
|
|
@@ -10445,7 +11412,7 @@ RadioGroup.displayName = "RadioGroup";
|
|
|
10445
11412
|
* Renders a `<button role="radio">` with a filled dot indicator shown when selected.
|
|
10446
11413
|
*/
|
|
10447
11414
|
const RadioGroupItem = React.forwardRef((componentProps, forwardRef) => {
|
|
10448
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
11415
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$5);
|
|
10449
11416
|
return /* @__PURE__ */ jsx(Radio.Root, _objectSpread2(_objectSpread2({
|
|
10450
11417
|
ref: forwardRef,
|
|
10451
11418
|
"data-slot": "radio-group-item",
|
|
@@ -10459,8 +11426,8 @@ const RadioGroupItem = React.forwardRef((componentProps, forwardRef) => {
|
|
|
10459
11426
|
RadioGroupItem.displayName = "RadioGroupItem";
|
|
10460
11427
|
//#endregion
|
|
10461
11428
|
//#region src/components/rich-textarea-combobox.tsx
|
|
10462
|
-
const _excluded$
|
|
10463
|
-
const _excluded2$
|
|
11429
|
+
const _excluded$8 = ["className", "ref"];
|
|
11430
|
+
const _excluded2$4 = ["className"];
|
|
10464
11431
|
const _excluded3$4 = [
|
|
10465
11432
|
"className",
|
|
10466
11433
|
"focusEditor",
|
|
@@ -10613,7 +11580,7 @@ function wrapComboboxAtEnds(event, store) {
|
|
|
10613
11580
|
* Rendered on top of a visually hidden mirror span so it grows with its value.
|
|
10614
11581
|
*/
|
|
10615
11582
|
const InlineComboboxInput = (_ref) => {
|
|
10616
|
-
let { className, ref: propRef } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
11583
|
+
let { className, ref: propRef } = _ref, props = _objectWithoutProperties(_ref, _excluded$8);
|
|
10617
11584
|
const { handleEmptyEnter, inputProps, inputRef: contextRef, showTrigger, trigger } = React.useContext(InlineComboboxContext);
|
|
10618
11585
|
const store = useComboboxContext();
|
|
10619
11586
|
const value = useStoreState(store, "inputValue");
|
|
@@ -10648,7 +11615,7 @@ InlineComboboxInput.displayName = "InlineComboboxInput";
|
|
|
10648
11615
|
* receives the key events.
|
|
10649
11616
|
*/
|
|
10650
11617
|
const InlineComboboxContent = (_ref2) => {
|
|
10651
|
-
let { className } = _ref2, props = _objectWithoutProperties(_ref2, _excluded2$
|
|
11618
|
+
let { className } = _ref2, props = _objectWithoutProperties(_ref2, _excluded2$4);
|
|
10652
11619
|
return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(ComboboxPopover, _objectSpread2({
|
|
10653
11620
|
"data-slot": "inline-combobox-content",
|
|
10654
11621
|
className: cn("z-50 max-h-[288px] w-[300px] overflow-y-auto rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md", className)
|
|
@@ -10719,102 +11686,45 @@ const InlineComboboxSkeleton = ({ count = 5 }) => {
|
|
|
10719
11686
|
};
|
|
10720
11687
|
InlineComboboxSkeleton.displayName = "InlineComboboxSkeleton";
|
|
10721
11688
|
/**
|
|
10722
|
-
* A centered spinner row appended below the list while the next page is loading
|
|
10723
|
-
* (`loadingState="loadingMore"`), so infinite scroll shows progress in place.
|
|
10724
|
-
*/
|
|
10725
|
-
const InlineComboboxSpinnerRow = () => {
|
|
10726
|
-
return /* @__PURE__ */ jsx("div", {
|
|
10727
|
-
className: cn(comboboxItemVariants({ interactive: false }), "justify-center"),
|
|
10728
|
-
children: /* @__PURE__ */ jsx(Spinner, { className: "size-4" })
|
|
10729
|
-
});
|
|
10730
|
-
};
|
|
10731
|
-
InlineComboboxSpinnerRow.displayName = "InlineComboboxSpinnerRow";
|
|
10732
|
-
/**
|
|
10733
|
-
* Invisible sentinel placed at the bottom of the async list. When it scrolls into
|
|
10734
|
-
* view (within 200px) it calls `onFetchMore` once, re-arming whenever the result set's
|
|
10735
|
-
* content changes. Reuses the shared DS infinite-scroll hook so the inline menu paginates
|
|
10736
|
-
* like `DataCombobox`.
|
|
10737
|
-
*
|
|
10738
|
-
* `resetKey` is a CONTENT key (e.g. the joined item ids), not the item count or array
|
|
10739
|
-
* reference. Length alone stalls after a same-size new search; the array reference re-arms on
|
|
10740
|
-
* every render if a consumer rebuilds `items` (e.g. `data ?? []`), which would loop `onFetchMore`.
|
|
10741
|
-
* A content key changes only when the results actually change, and it is converted here into a
|
|
10742
|
-
* stable numeric version for the hook.
|
|
10743
|
-
*/
|
|
10744
|
-
const InlineComboboxFetchSentinel = ({ onFetchMore, resetKey }) => {
|
|
10745
|
-
const versionRef = React.useRef(0);
|
|
10746
|
-
const lastKeyRef = React.useRef(null);
|
|
10747
|
-
if (lastKeyRef.current !== resetKey) {
|
|
10748
|
-
lastKeyRef.current = resetKey;
|
|
10749
|
-
versionRef.current += 1;
|
|
10750
|
-
}
|
|
10751
|
-
const sentinelRef = useFetchMoreSentinel(onFetchMore, (node) => node.closest("[data-slot=\"inline-combobox-content\"]"), versionRef.current);
|
|
10752
|
-
return /* @__PURE__ */ jsx("div", {
|
|
10753
|
-
"aria-hidden": true,
|
|
10754
|
-
ref: sentinelRef
|
|
10755
|
-
});
|
|
10756
|
-
};
|
|
10757
|
-
InlineComboboxFetchSentinel.displayName = "InlineComboboxFetchSentinel";
|
|
10758
|
-
//#endregion
|
|
10759
|
-
//#region src/components/toggle.tsx
|
|
10760
|
-
const _excluded$10 = [
|
|
10761
|
-
"className",
|
|
10762
|
-
"variant",
|
|
10763
|
-
"size",
|
|
10764
|
-
"pressedColor"
|
|
10765
|
-
];
|
|
10766
|
-
/**
|
|
10767
|
-
* Class-variance-authority variants for {@link Toggle}: `variant` (`default` | `outline`)
|
|
10768
|
-
* and `size` (`default` | `sm` | `lg`).
|
|
10769
|
-
*/
|
|
10770
|
-
const toggleVariants = cva("group/toggle inline-flex items-center justify-center gap-1 rounded-md text-sm text-foreground font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 data-disabled:pointer-events-none data-disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
10771
|
-
variants: {
|
|
10772
|
-
variant: {
|
|
10773
|
-
default: "bg-transparent",
|
|
10774
|
-
outline: "border border-input bg-background"
|
|
10775
|
-
},
|
|
10776
|
-
size: {
|
|
10777
|
-
default: "h-8 min-w-8 px-2 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
|
|
10778
|
-
sm: "h-6 min-w-6 px-1.5 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 [&_svg:not([class*='size-'])]:size-3.5",
|
|
10779
|
-
lg: "h-10 min-w-10 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2"
|
|
10780
|
-
},
|
|
10781
|
-
pressedColor: {
|
|
10782
|
-
highContrast: "data-pressed:bg-secondary data-pressed:text-secondary-foreground data-pressed:hover:bg-secondary data-pressed:hover:text-secondary-foreground",
|
|
10783
|
-
lowContrast: "data-pressed:bg-muted data-pressed:text-foreground data-pressed:hover:bg-muted data-pressed:hover:text-foreground"
|
|
10784
|
-
}
|
|
10785
|
-
},
|
|
10786
|
-
defaultVariants: {
|
|
10787
|
-
variant: "default",
|
|
10788
|
-
size: "default",
|
|
10789
|
-
pressedColor: "highContrast"
|
|
10790
|
-
}
|
|
10791
|
-
});
|
|
10792
|
-
/**
|
|
10793
|
-
* A two-state button that can be pressed on or off, wrapping Base UI's `Toggle`.
|
|
10794
|
-
* Renders a `<button aria-pressed>` styled via {@link toggleVariants}.
|
|
11689
|
+
* A centered spinner row appended below the list while the next page is loading
|
|
11690
|
+
* (`loadingState="loadingMore"`), so infinite scroll shows progress in place.
|
|
11691
|
+
*/
|
|
11692
|
+
const InlineComboboxSpinnerRow = () => {
|
|
11693
|
+
return /* @__PURE__ */ jsx("div", {
|
|
11694
|
+
className: cn(comboboxItemVariants({ interactive: false }), "justify-center"),
|
|
11695
|
+
children: /* @__PURE__ */ jsx(Spinner, { className: "size-4" })
|
|
11696
|
+
});
|
|
11697
|
+
};
|
|
11698
|
+
InlineComboboxSpinnerRow.displayName = "InlineComboboxSpinnerRow";
|
|
11699
|
+
/**
|
|
11700
|
+
* Invisible sentinel placed at the bottom of the async list. When it scrolls into
|
|
11701
|
+
* view (within 200px) it calls `onFetchMore` once, re-arming whenever the result set's
|
|
11702
|
+
* content changes. Reuses the shared DS infinite-scroll hook so the inline menu paginates
|
|
11703
|
+
* like `DataCombobox`.
|
|
10795
11704
|
*
|
|
10796
|
-
*
|
|
10797
|
-
*
|
|
10798
|
-
*
|
|
10799
|
-
*
|
|
11705
|
+
* `resetKey` is a CONTENT key (e.g. the joined item ids), not the item count or array
|
|
11706
|
+
* reference. Length alone stalls after a same-size new search; the array reference re-arms on
|
|
11707
|
+
* every render if a consumer rebuilds `items` (e.g. `data ?? []`), which would loop `onFetchMore`.
|
|
11708
|
+
* A content key changes only when the results actually change, and it is converted here into a
|
|
11709
|
+
* stable numeric version for the hook.
|
|
10800
11710
|
*/
|
|
10801
|
-
const
|
|
10802
|
-
const
|
|
10803
|
-
|
|
10804
|
-
|
|
10805
|
-
|
|
10806
|
-
|
|
10807
|
-
|
|
10808
|
-
|
|
10809
|
-
|
|
10810
|
-
|
|
10811
|
-
|
|
10812
|
-
}
|
|
10813
|
-
}
|
|
10814
|
-
|
|
11711
|
+
const InlineComboboxFetchSentinel = ({ onFetchMore, resetKey }) => {
|
|
11712
|
+
const versionRef = React.useRef(0);
|
|
11713
|
+
const lastKeyRef = React.useRef(null);
|
|
11714
|
+
if (lastKeyRef.current !== resetKey) {
|
|
11715
|
+
lastKeyRef.current = resetKey;
|
|
11716
|
+
versionRef.current += 1;
|
|
11717
|
+
}
|
|
11718
|
+
const sentinelRef = useFetchMoreSentinel(onFetchMore, (node) => node.closest("[data-slot=\"inline-combobox-content\"]"), versionRef.current);
|
|
11719
|
+
return /* @__PURE__ */ jsx("div", {
|
|
11720
|
+
"aria-hidden": true,
|
|
11721
|
+
ref: sentinelRef
|
|
11722
|
+
});
|
|
11723
|
+
};
|
|
11724
|
+
InlineComboboxFetchSentinel.displayName = "InlineComboboxFetchSentinel";
|
|
10815
11725
|
//#endregion
|
|
10816
11726
|
//#region src/components/rich-textarea-toolbar.tsx
|
|
10817
|
-
const _excluded$
|
|
11727
|
+
const _excluded$7 = ["className"];
|
|
10818
11728
|
/**
|
|
10819
11729
|
* Presentational toggle shared by every toolbar control. Owns the read-only gating: a
|
|
10820
11730
|
* disabled editor renders the toggle `disabled` and drops its handlers so `editor.tf`
|
|
@@ -10945,7 +11855,7 @@ RichTextareaToolbarControls.displayName = "RichTextareaToolbarControls";
|
|
|
10945
11855
|
* ```
|
|
10946
11856
|
*/
|
|
10947
11857
|
const RichTextareaToolbar = React.forwardRef((componentProps, forwardRef) => {
|
|
10948
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
11858
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$7);
|
|
10949
11859
|
return /* @__PURE__ */ jsx("div", _objectSpread2(_objectSpread2({
|
|
10950
11860
|
ref: forwardRef,
|
|
10951
11861
|
"data-slot": "rich-textarea-toolbar",
|
|
@@ -11133,7 +12043,7 @@ function RichTextareaLinkToolbar() {
|
|
|
11133
12043
|
RichTextareaLinkToolbar.displayName = "RichTextareaLinkToolbar";
|
|
11134
12044
|
//#endregion
|
|
11135
12045
|
//#region src/components/rich-textarea.tsx
|
|
11136
|
-
const _excluded$
|
|
12046
|
+
const _excluded$6 = [
|
|
11137
12047
|
"bare",
|
|
11138
12048
|
"className",
|
|
11139
12049
|
"aria-label"
|
|
@@ -11846,7 +12756,7 @@ RichTextareaContent.displayName = "RichTextareaContent";
|
|
|
11846
12756
|
* ```
|
|
11847
12757
|
*/
|
|
11848
12758
|
const RichTextarea = React.forwardRef((componentProps, forwardRef) => {
|
|
11849
|
-
const { bare, className, "aria-label": ariaLabel } = componentProps, rootProps = _objectWithoutProperties(componentProps, _excluded$
|
|
12759
|
+
const { bare, className, "aria-label": ariaLabel } = componentProps, rootProps = _objectWithoutProperties(componentProps, _excluded$6);
|
|
11850
12760
|
return /* @__PURE__ */ jsx(RichTextareaRoot, _objectSpread2(_objectSpread2({}, rootProps), {}, { children: /* @__PURE__ */ jsx(RichTextareaContent, {
|
|
11851
12761
|
ref: forwardRef,
|
|
11852
12762
|
bare,
|
|
@@ -11880,8 +12790,8 @@ const InputGroupRichTextarea = React.forwardRef((componentProps, forwardRef) =>
|
|
|
11880
12790
|
InputGroupRichTextarea.displayName = "InputGroupRichTextarea";
|
|
11881
12791
|
//#endregion
|
|
11882
12792
|
//#region src/components/sheet.tsx
|
|
11883
|
-
const _excluded$
|
|
11884
|
-
const _excluded2$
|
|
12793
|
+
const _excluded$5 = ["className"];
|
|
12794
|
+
const _excluded2$3 = [
|
|
11885
12795
|
"className",
|
|
11886
12796
|
"children",
|
|
11887
12797
|
"side",
|
|
@@ -11940,7 +12850,7 @@ function SheetPortal(componentProps) {
|
|
|
11940
12850
|
return /* @__PURE__ */ jsx(Dialog$1.Portal, _objectSpread2({ "data-slot": "sheet-portal" }, componentProps));
|
|
11941
12851
|
}
|
|
11942
12852
|
const SheetOverlay = React.forwardRef((componentProps, forwardRef) => {
|
|
11943
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
12853
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$5);
|
|
11944
12854
|
return /* @__PURE__ */ jsx(Dialog$1.Backdrop, _objectSpread2(_objectSpread2({
|
|
11945
12855
|
"data-slot": "sheet-overlay",
|
|
11946
12856
|
className: cn("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs", className)
|
|
@@ -11953,7 +12863,7 @@ SheetOverlay.displayName = "SheetOverlay";
|
|
|
11953
12863
|
* `<div>` popup fixed to the chosen screen edge, optionally with a close button.
|
|
11954
12864
|
*/
|
|
11955
12865
|
const SheetContent = React.forwardRef((componentProps, forwardRef) => {
|
|
11956
|
-
const { className, children, side = "right", showCloseButton = true, container } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
12866
|
+
const { className, children, side = "right", showCloseButton = true, container } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$3);
|
|
11957
12867
|
return /* @__PURE__ */ jsxs(SheetPortal, {
|
|
11958
12868
|
container,
|
|
11959
12869
|
children: [/* @__PURE__ */ jsx(SheetOverlay, {}), /* @__PURE__ */ jsxs(Dialog$1.Popup, _objectSpread2(_objectSpread2({
|
|
@@ -12029,122 +12939,6 @@ const SheetDescription = React.forwardRef((componentProps, forwardRef) => {
|
|
|
12029
12939
|
});
|
|
12030
12940
|
SheetDescription.displayName = "SheetDescription";
|
|
12031
12941
|
//#endregion
|
|
12032
|
-
//#region src/components/tooltip.tsx
|
|
12033
|
-
const _excluded$6 = ["delay"];
|
|
12034
|
-
const _excluded2$4 = [
|
|
12035
|
-
"className",
|
|
12036
|
-
"side",
|
|
12037
|
-
"sideOffset",
|
|
12038
|
-
"align",
|
|
12039
|
-
"alignOffset",
|
|
12040
|
-
"children",
|
|
12041
|
-
"container"
|
|
12042
|
-
];
|
|
12043
|
-
/**
|
|
12044
|
-
* Shares delay timing across all tooltips nested inside it, so moving between
|
|
12045
|
-
* neighbouring triggers reuses the open state instead of re-triggering the delay.
|
|
12046
|
-
*
|
|
12047
|
-
* Renders no DOM element — wrap a subtree of `Tooltip` instances in it.
|
|
12048
|
-
*
|
|
12049
|
-
* @prop delay - Milliseconds to wait before showing a tooltip. Default: `0`.
|
|
12050
|
-
*
|
|
12051
|
-
* @example
|
|
12052
|
-
* ```tsx
|
|
12053
|
-
* <TooltipProvider delay={200}>
|
|
12054
|
-
* <Tooltip>…</Tooltip>
|
|
12055
|
-
* <Tooltip>…</Tooltip>
|
|
12056
|
-
* </TooltipProvider>
|
|
12057
|
-
* ```
|
|
12058
|
-
*/
|
|
12059
|
-
function TooltipProvider(componentProps) {
|
|
12060
|
-
const { delay = 0 } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$6);
|
|
12061
|
-
return /* @__PURE__ */ jsx(Tooltip$1.Provider, _objectSpread2({
|
|
12062
|
-
"data-slot": "tooltip-provider",
|
|
12063
|
-
delay
|
|
12064
|
-
}, props));
|
|
12065
|
-
}
|
|
12066
|
-
/**
|
|
12067
|
-
* Root of a single tooltip. Manages its open/close state and connects the
|
|
12068
|
-
* trigger to the content.
|
|
12069
|
-
*
|
|
12070
|
-
* Renders no DOM element — place `TooltipTrigger` and `TooltipContent` inside
|
|
12071
|
-
* it. Supports controlled (`open` + `onOpenChange`) and uncontrolled
|
|
12072
|
-
* (`defaultOpen`) modes.
|
|
12073
|
-
*
|
|
12074
|
-
* @example
|
|
12075
|
-
* ```tsx
|
|
12076
|
-
* <TooltipProvider>
|
|
12077
|
-
* <Tooltip>
|
|
12078
|
-
* <TooltipTrigger render={<Button />}>Hover me</TooltipTrigger>
|
|
12079
|
-
* <TooltipContent side="top">Helpful hint</TooltipContent>
|
|
12080
|
-
* </Tooltip>
|
|
12081
|
-
* </TooltipProvider>
|
|
12082
|
-
* ```
|
|
12083
|
-
*/
|
|
12084
|
-
function Tooltip(componentProps) {
|
|
12085
|
-
const props = _extends({}, (_objectDestructuringEmpty(componentProps), componentProps));
|
|
12086
|
-
return /* @__PURE__ */ jsx(Tooltip$1.Root, _objectSpread2({ "data-slot": "tooltip" }, props));
|
|
12087
|
-
}
|
|
12088
|
-
/**
|
|
12089
|
-
* The element that opens the tooltip on hover or focus.
|
|
12090
|
-
*
|
|
12091
|
-
* Renders a `<button>` by default; pass `render` to project the behaviour onto
|
|
12092
|
-
* another element or component.
|
|
12093
|
-
*
|
|
12094
|
-
* @example
|
|
12095
|
-
* ```tsx
|
|
12096
|
-
* <TooltipTrigger render={<Button variant="ghost" />}>Info</TooltipTrigger>
|
|
12097
|
-
* ```
|
|
12098
|
-
*/
|
|
12099
|
-
const TooltipTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
12100
|
-
const props = _extends({}, (_objectDestructuringEmpty(componentProps), componentProps));
|
|
12101
|
-
return /* @__PURE__ */ jsx(Tooltip$1.Trigger, _objectSpread2({
|
|
12102
|
-
ref: forwardRef,
|
|
12103
|
-
"data-slot": "tooltip-trigger"
|
|
12104
|
-
}, props));
|
|
12105
|
-
});
|
|
12106
|
-
TooltipTrigger.displayName = "TooltipTrigger";
|
|
12107
|
-
/**
|
|
12108
|
-
* The floating panel shown while the trigger is hovered or focused.
|
|
12109
|
-
*
|
|
12110
|
-
* Composes `Tooltip.Portal → Tooltip.Positioner → Tooltip.Popup` into a single
|
|
12111
|
-
* part and renders a `<div>` popup (with a small `Tooltip.Arrow`). Positioning
|
|
12112
|
-
* props (`side`, `sideOffset`, `align`, `alignOffset`) are forwarded to the
|
|
12113
|
-
* positioner; all other props (including `className`) go to the popup element.
|
|
12114
|
-
*
|
|
12115
|
-
* @prop side - Which side of the trigger to place the content. Default: `'top'`.
|
|
12116
|
-
* @prop sideOffset - Gap in pixels between the trigger and the content. Default: `4`.
|
|
12117
|
-
* @prop align - Alignment along the cross-axis. Default: `'center'`.
|
|
12118
|
-
* @prop alignOffset - Offset in pixels along the cross-axis. Default: `0`.
|
|
12119
|
-
* @prop container - Portal container the popup is rendered into.
|
|
12120
|
-
*
|
|
12121
|
-
* @example
|
|
12122
|
-
* ```tsx
|
|
12123
|
-
* <TooltipContent side="bottom" align="start">Helpful hint</TooltipContent>
|
|
12124
|
-
* ```
|
|
12125
|
-
*/
|
|
12126
|
-
const TooltipContent = React.forwardRef((componentProps, forwardRef) => {
|
|
12127
|
-
const { className, side = "top", sideOffset = 4, align = "center", alignOffset = 0, children, container } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$4);
|
|
12128
|
-
return /* @__PURE__ */ jsx(Tooltip$1.Portal, {
|
|
12129
|
-
container,
|
|
12130
|
-
children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, {
|
|
12131
|
-
positionMethod: "fixed",
|
|
12132
|
-
align,
|
|
12133
|
-
alignOffset,
|
|
12134
|
-
side,
|
|
12135
|
-
sideOffset,
|
|
12136
|
-
"data-slot": "tooltip-positioner",
|
|
12137
|
-
className: "isolate z-popup",
|
|
12138
|
-
children: /* @__PURE__ */ jsxs(Tooltip$1.Popup, _objectSpread2(_objectSpread2({
|
|
12139
|
-
ref: forwardRef,
|
|
12140
|
-
"data-slot": "tooltip-content",
|
|
12141
|
-
className: cn("z-50 inline-flex w-fit max-w-sm origin-(--transform-origin) items-center gap-2 rounded-md bg-accent-foreground p-2 text-sm font-medium text-primary-foreground has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className)
|
|
12142
|
-
}, props), {}, { children: [children, /* @__PURE__ */ jsx(Tooltip$1.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-accent-foreground fill-accent-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" })] }))
|
|
12143
|
-
})
|
|
12144
|
-
});
|
|
12145
|
-
});
|
|
12146
|
-
TooltipContent.displayName = "TooltipContent";
|
|
12147
|
-
//#endregion
|
|
12148
12942
|
//#region src/hooks/use-mobile.ts
|
|
12149
12943
|
const MOBILE_BREAKPOINT = 768;
|
|
12150
12944
|
function useIsMobile() {
|
|
@@ -12162,7 +12956,7 @@ function useIsMobile() {
|
|
|
12162
12956
|
}
|
|
12163
12957
|
//#endregion
|
|
12164
12958
|
//#region src/components/sidebar.tsx
|
|
12165
|
-
const _excluded$
|
|
12959
|
+
const _excluded$4 = [
|
|
12166
12960
|
"defaultOpen",
|
|
12167
12961
|
"open",
|
|
12168
12962
|
"onOpenChange",
|
|
@@ -12170,7 +12964,7 @@ const _excluded$5 = [
|
|
|
12170
12964
|
"style",
|
|
12171
12965
|
"children"
|
|
12172
12966
|
];
|
|
12173
|
-
const _excluded2$
|
|
12967
|
+
const _excluded2$2 = [
|
|
12174
12968
|
"side",
|
|
12175
12969
|
"variant",
|
|
12176
12970
|
"collapsible",
|
|
@@ -12264,7 +13058,7 @@ function useSidebar() {
|
|
|
12264
13058
|
* ```
|
|
12265
13059
|
*/
|
|
12266
13060
|
const SidebarProvider = React.forwardRef((componentProps, forwardRef) => {
|
|
12267
|
-
const { defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
13061
|
+
const { defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$4);
|
|
12268
13062
|
const isMobile = useIsMobile();
|
|
12269
13063
|
const [openMobile, setOpenMobile] = React.useState(false);
|
|
12270
13064
|
const [_open, _setOpen] = React.useState(defaultOpen);
|
|
@@ -12332,7 +13126,7 @@ SidebarProvider.displayName = "SidebarProvider";
|
|
|
12332
13126
|
* a `Sheet`; with `collapsible="none"` renders a plain static `<div>`.
|
|
12333
13127
|
*/
|
|
12334
13128
|
const Sidebar = React.forwardRef((componentProps, forwardRef) => {
|
|
12335
|
-
const { side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, dir } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
13129
|
+
const { side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, dir } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$2);
|
|
12336
13130
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
12337
13131
|
if (collapsible === "none") return /* @__PURE__ */ jsx("div", _objectSpread2(_objectSpread2({
|
|
12338
13132
|
ref: forwardRef,
|
|
@@ -12759,7 +13553,7 @@ const SidebarMenuSubButton = React.forwardRef((componentProps, forwardRef) => {
|
|
|
12759
13553
|
SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
12760
13554
|
//#endregion
|
|
12761
13555
|
//#region src/components/slider.tsx
|
|
12762
|
-
const _excluded$
|
|
13556
|
+
const _excluded$3 = [
|
|
12763
13557
|
"className",
|
|
12764
13558
|
"defaultValue",
|
|
12765
13559
|
"value",
|
|
@@ -12779,7 +13573,7 @@ const _excluded$4 = [
|
|
|
12779
13573
|
* ```
|
|
12780
13574
|
*/
|
|
12781
13575
|
const Slider = React.forwardRef((componentProps, forwardRef) => {
|
|
12782
|
-
const { className, defaultValue, value, min = 0, max = 100, orientation = "horizontal" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
13576
|
+
const { className, defaultValue, value, min = 0, max = 100, orientation = "horizontal" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$3);
|
|
12783
13577
|
const _values = React.useMemo(() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max], [
|
|
12784
13578
|
value,
|
|
12785
13579
|
defaultValue,
|
|
@@ -12868,7 +13662,7 @@ const Toaster = (componentProps) => {
|
|
|
12868
13662
|
};
|
|
12869
13663
|
//#endregion
|
|
12870
13664
|
//#region src/components/stepper.tsx
|
|
12871
|
-
const _excluded$
|
|
13665
|
+
const _excluded$2 = [
|
|
12872
13666
|
"steps",
|
|
12873
13667
|
"defaultValue",
|
|
12874
13668
|
"className",
|
|
@@ -12876,7 +13670,7 @@ const _excluded$3 = [
|
|
|
12876
13670
|
"value",
|
|
12877
13671
|
"onValueChange"
|
|
12878
13672
|
];
|
|
12879
|
-
const _excluded2$
|
|
13673
|
+
const _excluded2$1 = ["steps", "className"];
|
|
12880
13674
|
const _excluded3$1 = [
|
|
12881
13675
|
"steps",
|
|
12882
13676
|
"className",
|
|
@@ -12918,7 +13712,7 @@ function useStepper() {
|
|
|
12918
13712
|
*/
|
|
12919
13713
|
const Stepper = React.forwardRef((componentProps, forwardRef) => {
|
|
12920
13714
|
var _steps$;
|
|
12921
|
-
const { steps, defaultValue, className, children, value, onValueChange } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
13715
|
+
const { steps, defaultValue, className, children, value, onValueChange } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$2);
|
|
12922
13716
|
const [activeId = "", setActiveId] = useControllableState({
|
|
12923
13717
|
prop: value,
|
|
12924
13718
|
defaultProp: defaultValue !== null && defaultValue !== void 0 ? defaultValue : (_steps$ = steps[0]) === null || _steps$ === void 0 ? void 0 : _steps$.id,
|
|
@@ -12953,7 +13747,7 @@ Stepper.displayName = "Stepper";
|
|
|
12953
13747
|
* active / inactive relative to the active step.
|
|
12954
13748
|
*/
|
|
12955
13749
|
const StepperProgress = React.forwardRef((componentProps, forwardRef) => {
|
|
12956
|
-
const { steps: stepIds, className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$
|
|
13750
|
+
const { steps: stepIds, className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$1);
|
|
12957
13751
|
const { activeId, getIndex, steps } = useStepper();
|
|
12958
13752
|
const ids = stepIds !== null && stepIds !== void 0 ? stepIds : steps.map((s) => s.id);
|
|
12959
13753
|
const currentIndex = getIndex(activeId);
|
|
@@ -13029,7 +13823,7 @@ const StepperContent = React.forwardRef((componentProps, forwardRef) => {
|
|
|
13029
13823
|
StepperContent.displayName = "StepperContent";
|
|
13030
13824
|
//#endregion
|
|
13031
13825
|
//#region src/components/switch.tsx
|
|
13032
|
-
const _excluded$
|
|
13826
|
+
const _excluded$1 = ["className"];
|
|
13033
13827
|
/**
|
|
13034
13828
|
* A toggle switch for an on/off setting, wrapping Base UI's `Switch.Root`.
|
|
13035
13829
|
* Renders a `<button role="switch">` containing a sliding thumb.
|
|
@@ -13040,7 +13834,7 @@ const _excluded$2 = ["className"];
|
|
|
13040
13834
|
* ```
|
|
13041
13835
|
*/
|
|
13042
13836
|
const Switch = React.forwardRef((componentProps, forwardRef) => {
|
|
13043
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$
|
|
13837
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$1);
|
|
13044
13838
|
return /* @__PURE__ */ jsx(Switch$1.Root, _objectSpread2(_objectSpread2({
|
|
13045
13839
|
ref: forwardRef,
|
|
13046
13840
|
"data-slot": "switch",
|
|
@@ -13053,8 +13847,8 @@ const Switch = React.forwardRef((componentProps, forwardRef) => {
|
|
|
13053
13847
|
Switch.displayName = "Switch";
|
|
13054
13848
|
//#endregion
|
|
13055
13849
|
//#region src/components/tabs.tsx
|
|
13056
|
-
const _excluded
|
|
13057
|
-
const _excluded2
|
|
13850
|
+
const _excluded = ["className", "orientation"];
|
|
13851
|
+
const _excluded2 = ["className"];
|
|
13058
13852
|
const _excluded3 = ["className"];
|
|
13059
13853
|
const _excluded4 = ["className"];
|
|
13060
13854
|
/**
|
|
@@ -13074,7 +13868,7 @@ const _excluded4 = ["className"];
|
|
|
13074
13868
|
* ```
|
|
13075
13869
|
*/
|
|
13076
13870
|
const Tabs = React.forwardRef((componentProps, forwardRef) => {
|
|
13077
|
-
const { className, orientation = "horizontal" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded
|
|
13871
|
+
const { className, orientation = "horizontal" } = componentProps, props = _objectWithoutProperties(componentProps, _excluded);
|
|
13078
13872
|
return /* @__PURE__ */ jsx(Tabs$1.Root, _objectSpread2({
|
|
13079
13873
|
ref: forwardRef,
|
|
13080
13874
|
"data-slot": "tabs",
|
|
@@ -13089,7 +13883,7 @@ Tabs.displayName = "Tabs";
|
|
|
13089
13883
|
* when the parent `Tabs` is vertical).
|
|
13090
13884
|
*/
|
|
13091
13885
|
const TabsList = React.forwardRef((componentProps, forwardRef) => {
|
|
13092
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2
|
|
13886
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2);
|
|
13093
13887
|
return /* @__PURE__ */ jsx(Tabs$1.List, _objectSpread2({
|
|
13094
13888
|
ref: forwardRef,
|
|
13095
13889
|
"data-slot": "tabs-list",
|
|
@@ -13124,89 +13918,6 @@ const TabsContent = React.forwardRef((componentProps, forwardRef) => {
|
|
|
13124
13918
|
});
|
|
13125
13919
|
TabsContent.displayName = "TabsContent";
|
|
13126
13920
|
//#endregion
|
|
13127
|
-
//#region src/components/toggle-group.tsx
|
|
13128
|
-
const _excluded = [
|
|
13129
|
-
"className",
|
|
13130
|
-
"variant",
|
|
13131
|
-
"size",
|
|
13132
|
-
"spacing",
|
|
13133
|
-
"orientation",
|
|
13134
|
-
"block",
|
|
13135
|
-
"children"
|
|
13136
|
-
];
|
|
13137
|
-
const _excluded2 = [
|
|
13138
|
-
"className",
|
|
13139
|
-
"children",
|
|
13140
|
-
"variant",
|
|
13141
|
-
"size",
|
|
13142
|
-
"pressedColor"
|
|
13143
|
-
];
|
|
13144
|
-
const ToggleGroupContext = React.createContext({
|
|
13145
|
-
size: "default",
|
|
13146
|
-
variant: "default",
|
|
13147
|
-
spacing: 0,
|
|
13148
|
-
orientation: "horizontal",
|
|
13149
|
-
block: false
|
|
13150
|
-
});
|
|
13151
|
-
/**
|
|
13152
|
-
* Root container grouping related toggle buttons, wrapping Base UI's `ToggleGroup`.
|
|
13153
|
-
* Renders a `<div role="group">` and shares `variant`, `size` and `spacing` with its
|
|
13154
|
-
* `ToggleGroupItem`s via context.
|
|
13155
|
-
*
|
|
13156
|
-
* @example
|
|
13157
|
-
* ```tsx
|
|
13158
|
-
* <ToggleGroup defaultValue={['left']}>
|
|
13159
|
-
* <ToggleGroupItem value="left">Left</ToggleGroupItem>
|
|
13160
|
-
* <ToggleGroupItem value="center">Center</ToggleGroupItem>
|
|
13161
|
-
* </ToggleGroup>
|
|
13162
|
-
* ```
|
|
13163
|
-
*/
|
|
13164
|
-
const ToggleGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
13165
|
-
const { className, variant, size, spacing = 0, orientation = "horizontal", block = false, children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded);
|
|
13166
|
-
return /* @__PURE__ */ jsx(ToggleGroup$1, _objectSpread2(_objectSpread2({
|
|
13167
|
-
ref: forwardRef,
|
|
13168
|
-
"data-slot": "toggle-group",
|
|
13169
|
-
"data-variant": variant,
|
|
13170
|
-
"data-size": size,
|
|
13171
|
-
"data-spacing": spacing,
|
|
13172
|
-
"data-orientation": orientation,
|
|
13173
|
-
"data-block": block,
|
|
13174
|
-
style: { "--gap": spacing },
|
|
13175
|
-
className: cn("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-md data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch data-[block=true]:w-full", className)
|
|
13176
|
-
}, props), {}, { children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, {
|
|
13177
|
-
value: {
|
|
13178
|
-
variant,
|
|
13179
|
-
size,
|
|
13180
|
-
spacing,
|
|
13181
|
-
orientation,
|
|
13182
|
-
block
|
|
13183
|
-
},
|
|
13184
|
-
children
|
|
13185
|
-
}) }));
|
|
13186
|
-
});
|
|
13187
|
-
ToggleGroup.displayName = "ToggleGroup";
|
|
13188
|
-
/**
|
|
13189
|
-
* A single toggle button within a `ToggleGroup`, wrapping Base UI's `Toggle`.
|
|
13190
|
-
* Renders a `<button aria-pressed>` that inherits `variant` and `size` from the group context.
|
|
13191
|
-
*/
|
|
13192
|
-
const ToggleGroupItem = React.forwardRef((componentProps, forwardRef) => {
|
|
13193
|
-
const { className, children, variant = "default", size = "default", pressedColor } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2);
|
|
13194
|
-
const context = React.useContext(ToggleGroupContext);
|
|
13195
|
-
return /* @__PURE__ */ jsx(Toggle$1, _objectSpread2(_objectSpread2({
|
|
13196
|
-
ref: forwardRef,
|
|
13197
|
-
"data-slot": "toggle-group-item",
|
|
13198
|
-
"data-variant": context.variant || variant,
|
|
13199
|
-
"data-size": context.size || size,
|
|
13200
|
-
"data-spacing": context.spacing,
|
|
13201
|
-
className: cn("shrink-0 text-foreground group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 group-data-[spacing=0]/toggle-group:shadow-none group-data-[spacing=0]/toggle-group:border group-data-[spacing=0]/toggle-group:border-input focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:first:rounded-l-md group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:first:rounded-t-md group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:last:rounded-r-md group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:last:rounded-b-md group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:border-l-0 group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:border-t-0 group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:first:border-l group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:first:border-t group-data-[block=true]/toggle-group:flex-1", toggleVariants({
|
|
13202
|
-
variant: context.variant || variant,
|
|
13203
|
-
size: context.size || size,
|
|
13204
|
-
pressedColor
|
|
13205
|
-
}), className)
|
|
13206
|
-
}, props), {}, { children }));
|
|
13207
|
-
});
|
|
13208
|
-
ToggleGroupItem.displayName = "ToggleGroupItem";
|
|
13209
|
-
//#endregion
|
|
13210
13921
|
//#region src/components/ds-i18n-provider.tsx
|
|
13211
13922
|
/**
|
|
13212
13923
|
* Drives the language of the shared `dsI18n` singleton from React.
|
|
@@ -13320,4 +14031,4 @@ function useAudioGauge(options = {}) {
|
|
|
13320
14031
|
};
|
|
13321
14032
|
}
|
|
13322
14033
|
//#endregion
|
|
13323
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionBar, ActionBarButton, ActionBarContext, ActionBarHeight, Alert, AlertAction, AlertAction as BannerAction, AlertDescription, AlertDescription as BannerDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AlertTitle as BannerTitle, Anchor, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, Audio, AudioPlayerBar, AudioPlayerButton, AudioPlayerCurrentTime, AudioPlayerDuration, AudioPlayerManager, AudioPlayerRow, AudioPlayerSkip, AudioPlayerSpeed, AudioPlayerTime, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BadgeGroup, BadgeGroupCount, Banner, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, COMBOBOX_AUTO_SEARCH_THRESHOLD, COMBOBOX_AUTO_VIRTUALIZE_THRESHOLD, Calendar, CalendarDayButton, CalendarDropdown, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Chip, ChipRemove, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CounterBadge, CountryFlag, DataCombobox, DataTable, DataTree, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBackdrop, DrawerBar, DrawerClose, DrawerContent, DrawerCreateHandle, DrawerDescription, DrawerFooter, DrawerHeader, DrawerMenu, DrawerMenuCheckboxItem, DrawerMenuGroup, DrawerMenuGroupLabel, DrawerMenuItem, DrawerMenuRadioGroup, DrawerMenuRadioItem, DrawerMenuSeparator, DrawerMenuTrigger, DrawerPanel, DrawerPopup, DrawerPortal, DrawerPrimitive, DrawerSwipeArea, DrawerTitle, DrawerTrigger, DrawerViewport, DropdownMenu, DropdownMenuAddon, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneActions, DropzoneContent, DropzoneDescription, DropzoneIcon, DropzoneTitle, DropzoneTrigger, DsI18nProvider, EmojiPicker, EmojiPickerCategories, EmojiPickerContent, EmojiPickerTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FAB, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLabelAside, FieldLabelInfo, FieldLabelRow, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Gauge, HoverCard, HoverCardContent, HoverCardTrigger, InlineEditInput, InlineEditMultiCombobox, InlineEditMultiComboboxChip, InlineEditMultiComboboxChips, InlineEditMultiComboboxContent, InlineEditMultiComboboxItem, InlineEditMultiComboboxTrigger, InlineEditMultiComboboxValue, InlineEditSelect, InlineEditSelectContent, InlineEditSelectItem, InlineEditSelectTrigger, InlineEditSelectValue, InlineEditTextarea, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupRichTextarea, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Label, List, ListCol, ListRow, NotificationQueueProvider, NotificationSlot, NumericInput, NumericInputControl, NumericInputDecrement, NumericInputIncrement, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RadioGroup, RadioGroupItem, RichTextarea, RichTextareaContent, RichTextareaRoot, RichTextareaToolbar, SUPPORTED_LANGUAGES, ScrollArea, ScrollAreaPrimitive, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Stepper, StepperContent, StepperCounter, StepperPanel, StepperProgress, Switch, Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tree, TreeDragLine, TreeItem, TreeItemLabel, alertVariants, anchorVariants, bannerVariants, buttonGroupVariants, buttonVariants, cn, counterBadgeVariants, detectInitialLanguage, fabVariants, isInsideCalendarDropdown, registerI18nNamespace, selectTriggerVariants, spinnerVariants, syncDsLanguage, toast, toggleVariants, useAudioGauge, useAudioPlayer, useAudioPlayerTime, useComboboxAnchor, useDsLocale, useDsTranslation, useNotification, useNotificationQueue, useSidebar, useStepper, useTheme };
|
|
14034
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionBar, ActionBarButton, ActionBarContext, ActionBarHeight, Alert, AlertAction, AlertAction as BannerAction, AlertDescription, AlertDescription as BannerDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AlertTitle as BannerTitle, Anchor, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, Audio, AudioPlayerBar, AudioPlayerButton, AudioPlayerCurrentTime, AudioPlayerDuration, AudioPlayerManager, AudioPlayerRow, AudioPlayerSkip, AudioPlayerSpeed, AudioPlayerTime, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BadgeGroup, BadgeGroupCount, Banner, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, COMBOBOX_AUTO_SEARCH_THRESHOLD, COMBOBOX_AUTO_VIRTUALIZE_THRESHOLD, Calendar, CalendarDayButton, CalendarDropdown, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Chip, ChipRemove, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPicker, ColorPickerArea, ColorPickerContent, ColorPickerHexField, ColorPickerHue, ColorPickerModeToggle, ColorPickerPanel, ColorPickerPresets, ColorPickerTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CounterBadge, CountryFlag, DataCombobox, DataTable, DataTree, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBackdrop, DrawerBar, DrawerClose, DrawerContent, DrawerCreateHandle, DrawerDescription, DrawerFooter, DrawerHeader, DrawerMenu, DrawerMenuCheckboxItem, DrawerMenuGroup, DrawerMenuGroupLabel, DrawerMenuItem, DrawerMenuRadioGroup, DrawerMenuRadioItem, DrawerMenuSeparator, DrawerMenuTrigger, DrawerPanel, DrawerPopup, DrawerPortal, DrawerPrimitive, DrawerSwipeArea, DrawerTitle, DrawerTrigger, DrawerViewport, DropdownMenu, DropdownMenuAddon, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneActions, DropzoneContent, DropzoneDescription, DropzoneIcon, DropzoneTitle, DropzoneTrigger, DsI18nProvider, EmojiPicker, EmojiPickerCategories, EmojiPickerContent, EmojiPickerTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FAB, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLabelAside, FieldLabelInfo, FieldLabelRow, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Gauge, HoverCard, HoverCardContent, HoverCardTrigger, InlineEditInput, InlineEditMultiCombobox, InlineEditMultiComboboxChip, InlineEditMultiComboboxChips, InlineEditMultiComboboxContent, InlineEditMultiComboboxItem, InlineEditMultiComboboxTrigger, InlineEditMultiComboboxValue, InlineEditSelect, InlineEditSelectContent, InlineEditSelectItem, InlineEditSelectTrigger, InlineEditSelectValue, InlineEditTextarea, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupRichTextarea, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, LEGACY_COLOR_PRESETS, Label, List, ListCol, ListRow, NotificationQueueProvider, NotificationSlot, NumericInput, NumericInputControl, NumericInputDecrement, NumericInputIncrement, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RadioGroup, RadioGroupItem, RichTextarea, RichTextareaContent, RichTextareaRoot, RichTextareaToolbar, SUPPORTED_LANGUAGES, ScrollArea, ScrollAreaPrimitive, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Stepper, StepperContent, StepperCounter, StepperPanel, StepperProgress, Switch, Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tree, TreeDragLine, TreeItem, TreeItemLabel, alertVariants, anchorVariants, bannerVariants, buttonGroupVariants, buttonVariants, cn, counterBadgeVariants, detectInitialLanguage, fabVariants, isInsideCalendarDropdown, registerI18nNamespace, selectTriggerVariants, spinnerVariants, syncDsLanguage, toast, toggleVariants, useAudioGauge, useAudioPlayer, useAudioPlayerTime, useComboboxAnchor, useDsLocale, useDsTranslation, useNotification, useNotificationQueue, useSidebar, useStepper, useTheme };
|