@tutti-os/ui-system 0.0.164 → 0.0.166

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.
@@ -15,7 +15,7 @@ import {
15
15
  SuccessFilledIcon,
16
16
  WarningFilledIcon,
17
17
  WarningLinedIcon
18
- } from "./chunk-A3EZ2O7X.js";
18
+ } from "./chunk-LD3MNTUQ.js";
19
19
  import {
20
20
  cn
21
21
  } from "./chunk-DGPY4WP3.js";
@@ -2919,9 +2919,442 @@ function Spinner({
2919
2919
  );
2920
2920
  }
2921
2921
 
2922
+ // src/components/sortable/sortable.tsx
2923
+ import {
2924
+ closestCenter,
2925
+ closestCorners,
2926
+ DndContext,
2927
+ DragOverlay,
2928
+ defaultDropAnimationSideEffects,
2929
+ KeyboardSensor,
2930
+ MouseSensor,
2931
+ TouchSensor,
2932
+ useSensor,
2933
+ useSensors
2934
+ } from "@dnd-kit/core";
2935
+ import {
2936
+ restrictToHorizontalAxis,
2937
+ restrictToParentElement,
2938
+ restrictToVerticalAxis
2939
+ } from "@dnd-kit/modifiers";
2940
+ import {
2941
+ arrayMove,
2942
+ horizontalListSortingStrategy,
2943
+ SortableContext,
2944
+ sortableKeyboardCoordinates,
2945
+ useSortable,
2946
+ verticalListSortingStrategy
2947
+ } from "@dnd-kit/sortable";
2948
+ import { CSS } from "@dnd-kit/utilities";
2949
+ import { Slot as SlotPrimitive } from "radix-ui";
2950
+ import * as React10 from "react";
2951
+ import * as ReactDOM from "react-dom";
2952
+
2953
+ // src/lib/compose-refs.ts
2954
+ import * as React9 from "react";
2955
+ function setRef(ref, value) {
2956
+ if (typeof ref === "function") {
2957
+ return ref(value);
2958
+ }
2959
+ if (ref !== null && ref !== void 0) {
2960
+ ref.current = value;
2961
+ }
2962
+ }
2963
+ function composeRefs(...refs) {
2964
+ return (node) => {
2965
+ let hasCleanup = false;
2966
+ const cleanups = refs.map((ref) => {
2967
+ const cleanup = setRef(ref, node);
2968
+ if (!hasCleanup && typeof cleanup === "function") {
2969
+ hasCleanup = true;
2970
+ }
2971
+ return cleanup;
2972
+ });
2973
+ if (hasCleanup) {
2974
+ return () => {
2975
+ for (let i = 0; i < cleanups.length; i++) {
2976
+ const cleanup = cleanups[i];
2977
+ if (typeof cleanup === "function") {
2978
+ cleanup();
2979
+ } else {
2980
+ setRef(refs[i], null);
2981
+ }
2982
+ }
2983
+ };
2984
+ }
2985
+ };
2986
+ }
2987
+ function useComposedRefs(...refs) {
2988
+ return React9.useCallback(composeRefs(...refs), refs);
2989
+ }
2990
+
2991
+ // src/components/sortable/sortable.tsx
2992
+ import { jsx as jsx27 } from "react/jsx-runtime";
2993
+ var orientationConfig = {
2994
+ vertical: {
2995
+ modifiers: [restrictToVerticalAxis, restrictToParentElement],
2996
+ strategy: verticalListSortingStrategy,
2997
+ collisionDetection: closestCenter
2998
+ },
2999
+ horizontal: {
3000
+ modifiers: [restrictToHorizontalAxis, restrictToParentElement],
3001
+ strategy: horizontalListSortingStrategy,
3002
+ collisionDetection: closestCenter
3003
+ },
3004
+ mixed: {
3005
+ modifiers: [restrictToParentElement],
3006
+ strategy: void 0,
3007
+ collisionDetection: closestCorners
3008
+ }
3009
+ };
3010
+ var ROOT_NAME = "Sortable";
3011
+ var CONTENT_NAME = "SortableContent";
3012
+ var ITEM_NAME = "SortableItem";
3013
+ var ITEM_HANDLE_NAME = "SortableItemHandle";
3014
+ var OVERLAY_NAME = "SortableOverlay";
3015
+ var SortableRootContext = React10.createContext(null);
3016
+ function useSortableContext(consumerName) {
3017
+ const context = React10.useContext(SortableRootContext);
3018
+ if (!context) {
3019
+ throw new Error(`\`${consumerName}\` must be used within \`${ROOT_NAME}\``);
3020
+ }
3021
+ return context;
3022
+ }
3023
+ function Sortable(props) {
3024
+ const {
3025
+ value,
3026
+ onValueChange,
3027
+ collisionDetection,
3028
+ modifiers,
3029
+ strategy,
3030
+ onMove,
3031
+ orientation = "vertical",
3032
+ flatCursor = false,
3033
+ getItemValue: getItemValueProp,
3034
+ accessibility,
3035
+ ...sortableProps
3036
+ } = props;
3037
+ const id = React10.useId();
3038
+ const [activeId, setActiveId] = React10.useState(null);
3039
+ const sensors = useSensors(
3040
+ useSensor(MouseSensor, {
3041
+ activationConstraint: { distance: 6 }
3042
+ }),
3043
+ useSensor(TouchSensor, {
3044
+ activationConstraint: { delay: 180, tolerance: 5 }
3045
+ }),
3046
+ useSensor(KeyboardSensor, {
3047
+ coordinateGetter: sortableKeyboardCoordinates
3048
+ })
3049
+ );
3050
+ const config = React10.useMemo(
3051
+ () => orientationConfig[orientation],
3052
+ [orientation]
3053
+ );
3054
+ const getItemValue = React10.useCallback(
3055
+ (item) => {
3056
+ if (typeof item === "object" && !getItemValueProp) {
3057
+ throw new Error(
3058
+ "`getItemValue` is required when using array of objects"
3059
+ );
3060
+ }
3061
+ return getItemValueProp ? getItemValueProp(item) : item;
3062
+ },
3063
+ [getItemValueProp]
3064
+ );
3065
+ const items = React10.useMemo(() => {
3066
+ return value.map((item) => getItemValue(item));
3067
+ }, [value, getItemValue]);
3068
+ const onDragStart = React10.useCallback(
3069
+ (event) => {
3070
+ sortableProps.onDragStart?.(event);
3071
+ setActiveId(event.active.id);
3072
+ },
3073
+ [sortableProps.onDragStart]
3074
+ );
3075
+ const onDragEnd = React10.useCallback(
3076
+ (event) => {
3077
+ sortableProps.onDragEnd?.(event);
3078
+ const { active, over } = event;
3079
+ if (over && active.id !== over?.id) {
3080
+ const activeIndex = value.findIndex(
3081
+ (item) => getItemValue(item) === active.id
3082
+ );
3083
+ const overIndex = value.findIndex(
3084
+ (item) => getItemValue(item) === over.id
3085
+ );
3086
+ if (activeIndex < 0 || overIndex < 0) {
3087
+ setActiveId(null);
3088
+ return;
3089
+ }
3090
+ if (onMove) {
3091
+ onMove({ ...event, activeIndex, overIndex });
3092
+ } else {
3093
+ onValueChange?.(arrayMove(value, activeIndex, overIndex));
3094
+ }
3095
+ }
3096
+ setActiveId(null);
3097
+ },
3098
+ [value, onValueChange, onMove, getItemValue, sortableProps.onDragEnd]
3099
+ );
3100
+ const onDragCancel = React10.useCallback(
3101
+ (event) => {
3102
+ sortableProps.onDragCancel?.(event);
3103
+ setActiveId(null);
3104
+ },
3105
+ [sortableProps.onDragCancel]
3106
+ );
3107
+ const contextValue = React10.useMemo(
3108
+ () => ({
3109
+ id,
3110
+ items,
3111
+ modifiers: modifiers ?? config.modifiers,
3112
+ strategy: strategy ?? config.strategy,
3113
+ activeId,
3114
+ setActiveId,
3115
+ getItemValue,
3116
+ flatCursor
3117
+ }),
3118
+ [
3119
+ id,
3120
+ items,
3121
+ modifiers,
3122
+ strategy,
3123
+ config.modifiers,
3124
+ config.strategy,
3125
+ activeId,
3126
+ getItemValue,
3127
+ flatCursor
3128
+ ]
3129
+ );
3130
+ return /* @__PURE__ */ jsx27(
3131
+ SortableRootContext.Provider,
3132
+ {
3133
+ value: contextValue,
3134
+ children: /* @__PURE__ */ jsx27(
3135
+ DndContext,
3136
+ {
3137
+ collisionDetection: collisionDetection ?? config.collisionDetection,
3138
+ modifiers: modifiers ?? config.modifiers,
3139
+ sensors,
3140
+ ...sortableProps,
3141
+ id,
3142
+ onDragStart,
3143
+ onDragEnd,
3144
+ onDragCancel,
3145
+ accessibility
3146
+ }
3147
+ )
3148
+ }
3149
+ );
3150
+ }
3151
+ var SortableContentContext = React10.createContext(false);
3152
+ function SortableContent(props) {
3153
+ const {
3154
+ strategy: strategyProp,
3155
+ asChild,
3156
+ withoutSlot,
3157
+ children,
3158
+ ref,
3159
+ ...contentProps
3160
+ } = props;
3161
+ const context = useSortableContext(CONTENT_NAME);
3162
+ const ContentPrimitive = asChild ? SlotPrimitive.Slot : "div";
3163
+ return /* @__PURE__ */ jsx27(SortableContentContext.Provider, { value: true, children: /* @__PURE__ */ jsx27(
3164
+ SortableContext,
3165
+ {
3166
+ items: context.items,
3167
+ strategy: strategyProp ?? context.strategy,
3168
+ children: withoutSlot ? children : /* @__PURE__ */ jsx27(
3169
+ ContentPrimitive,
3170
+ {
3171
+ "data-slot": "sortable-content",
3172
+ ...contentProps,
3173
+ ref,
3174
+ children
3175
+ }
3176
+ )
3177
+ }
3178
+ ) });
3179
+ }
3180
+ var SortableItemContext = React10.createContext(null);
3181
+ function useSortableItemContext(consumerName) {
3182
+ const context = React10.useContext(SortableItemContext);
3183
+ if (!context) {
3184
+ throw new Error(`\`${consumerName}\` must be used within \`${ITEM_NAME}\``);
3185
+ }
3186
+ return context;
3187
+ }
3188
+ function SortableItem(props) {
3189
+ const {
3190
+ value,
3191
+ style,
3192
+ asHandle,
3193
+ asChild,
3194
+ disabled,
3195
+ className,
3196
+ ref,
3197
+ ...itemProps
3198
+ } = props;
3199
+ const inSortableContent = React10.useContext(SortableContentContext);
3200
+ const inSortableOverlay = React10.useContext(SortableOverlayContext);
3201
+ if (!inSortableContent && !inSortableOverlay) {
3202
+ throw new Error(
3203
+ `\`${ITEM_NAME}\` must be used within \`${CONTENT_NAME}\` or \`${OVERLAY_NAME}\``
3204
+ );
3205
+ }
3206
+ if (value === "") {
3207
+ throw new Error(`\`${ITEM_NAME}\` value cannot be an empty string`);
3208
+ }
3209
+ const context = useSortableContext(ITEM_NAME);
3210
+ const id = React10.useId();
3211
+ const {
3212
+ attributes,
3213
+ listeners,
3214
+ setNodeRef,
3215
+ setActivatorNodeRef,
3216
+ transform,
3217
+ transition,
3218
+ isDragging
3219
+ } = useSortable({ id: value, disabled });
3220
+ const prefersReducedMotion = usePrefersReducedMotion();
3221
+ const composedRef = useComposedRefs(ref, (node) => {
3222
+ if (disabled) return;
3223
+ setNodeRef(node);
3224
+ if (asHandle) setActivatorNodeRef(node);
3225
+ });
3226
+ const composedStyle = React10.useMemo(() => {
3227
+ return {
3228
+ transform: CSS.Translate.toString(transform),
3229
+ transition: prefersReducedMotion ? void 0 : transition,
3230
+ ...style
3231
+ };
3232
+ }, [prefersReducedMotion, transform, transition, style]);
3233
+ const itemContext = React10.useMemo(
3234
+ () => ({
3235
+ id,
3236
+ attributes,
3237
+ listeners,
3238
+ setActivatorNodeRef,
3239
+ isDragging,
3240
+ disabled
3241
+ }),
3242
+ [id, attributes, listeners, setActivatorNodeRef, isDragging, disabled]
3243
+ );
3244
+ const ItemPrimitive = asChild ? SlotPrimitive.Slot : "div";
3245
+ return /* @__PURE__ */ jsx27(SortableItemContext.Provider, { value: itemContext, children: /* @__PURE__ */ jsx27(
3246
+ ItemPrimitive,
3247
+ {
3248
+ id,
3249
+ "data-disabled": disabled,
3250
+ "data-dragging": isDragging ? "" : void 0,
3251
+ "data-slot": "sortable-item",
3252
+ ...itemProps,
3253
+ ...asHandle && !disabled ? attributes : {},
3254
+ ...asHandle && !disabled ? listeners : {},
3255
+ ref: composedRef,
3256
+ style: composedStyle,
3257
+ className: cn(
3258
+ "focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1",
3259
+ {
3260
+ "touch-none select-none": asHandle,
3261
+ "cursor-default": context.flatCursor,
3262
+ "data-dragging:cursor-grabbing": !context.flatCursor,
3263
+ "cursor-grab": !isDragging && asHandle && !context.flatCursor,
3264
+ "opacity-50": isDragging,
3265
+ "pointer-events-none opacity-50": disabled
3266
+ },
3267
+ className
3268
+ )
3269
+ }
3270
+ ) });
3271
+ }
3272
+ function SortableItemHandle(props) {
3273
+ const { asChild, disabled, className, ref, ...itemHandleProps } = props;
3274
+ const context = useSortableContext(ITEM_HANDLE_NAME);
3275
+ const itemContext = useSortableItemContext(ITEM_HANDLE_NAME);
3276
+ const isDisabled = Boolean(itemContext.disabled || disabled);
3277
+ const composedRef = useComposedRefs(ref, (node) => {
3278
+ if (isDisabled) return;
3279
+ itemContext.setActivatorNodeRef(node);
3280
+ });
3281
+ const HandlePrimitive = asChild ? SlotPrimitive.Slot : "button";
3282
+ return /* @__PURE__ */ jsx27(
3283
+ HandlePrimitive,
3284
+ {
3285
+ type: "button",
3286
+ "aria-controls": itemContext.id,
3287
+ "data-disabled": isDisabled,
3288
+ "data-dragging": itemContext.isDragging ? "" : void 0,
3289
+ "data-slot": "sortable-item-handle",
3290
+ ...itemHandleProps,
3291
+ ...isDisabled ? {} : itemContext.attributes,
3292
+ ...isDisabled ? {} : itemContext.listeners,
3293
+ ref: composedRef,
3294
+ className: cn(
3295
+ "select-none disabled:pointer-events-none disabled:opacity-50",
3296
+ context.flatCursor ? "cursor-default" : "cursor-grab data-dragging:cursor-grabbing",
3297
+ className
3298
+ ),
3299
+ disabled: isDisabled
3300
+ }
3301
+ );
3302
+ }
3303
+ function usePrefersReducedMotion() {
3304
+ const [reduced, setReduced] = React10.useState(
3305
+ () => globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? false
3306
+ );
3307
+ React10.useEffect(() => {
3308
+ const query = globalThis.matchMedia?.("(prefers-reduced-motion: reduce)");
3309
+ if (!query) return;
3310
+ const update = () => setReduced(query.matches);
3311
+ update();
3312
+ query.addEventListener("change", update);
3313
+ return () => query.removeEventListener("change", update);
3314
+ }, []);
3315
+ return reduced;
3316
+ }
3317
+ var SortableOverlayContext = React10.createContext(false);
3318
+ var defaultDropAnimation = {
3319
+ sideEffects: defaultDropAnimationSideEffects({
3320
+ styles: {
3321
+ active: {
3322
+ opacity: "0.4"
3323
+ }
3324
+ }
3325
+ })
3326
+ };
3327
+ function SortableOverlay(props) {
3328
+ const {
3329
+ container: containerProp,
3330
+ children,
3331
+ dropAnimation: callerDropAnimation,
3332
+ ...overlayProps
3333
+ } = props;
3334
+ const context = useSortableContext(OVERLAY_NAME);
3335
+ const prefersReducedMotion = usePrefersReducedMotion();
3336
+ const [mounted, setMounted] = React10.useState(false);
3337
+ React10.useLayoutEffect(() => setMounted(true), []);
3338
+ const container = containerProp ?? (mounted ? globalThis.document?.body : null);
3339
+ if (!container) return null;
3340
+ return ReactDOM.createPortal(
3341
+ /* @__PURE__ */ jsx27(
3342
+ DragOverlay,
3343
+ {
3344
+ modifiers: context.modifiers,
3345
+ className: cn(!context.flatCursor && "cursor-grabbing"),
3346
+ ...overlayProps,
3347
+ dropAnimation: prefersReducedMotion ? null : callerDropAnimation === void 0 ? defaultDropAnimation : callerDropAnimation,
3348
+ children: /* @__PURE__ */ jsx27(SortableOverlayContext.Provider, { value: true, children: context.activeId ? typeof children === "function" ? children({ value: context.activeId }) : children : null })
3349
+ }
3350
+ ),
3351
+ container
3352
+ );
3353
+ }
3354
+
2922
3355
  // src/components/status-dot/status-dot.tsx
2923
3356
  import { cva as cva4 } from "class-variance-authority";
2924
- import { jsx as jsx27 } from "react/jsx-runtime";
3357
+ import { jsx as jsx28 } from "react/jsx-runtime";
2925
3358
  var statusDotVariants = cva4("inline-flex shrink-0 rounded-full", {
2926
3359
  variants: {
2927
3360
  tone: {
@@ -2955,7 +3388,7 @@ function StatusDot({
2955
3388
  title,
2956
3389
  className
2957
3390
  }) {
2958
- return /* @__PURE__ */ jsx27(
3391
+ return /* @__PURE__ */ jsx28(
2959
3392
  "span",
2960
3393
  {
2961
3394
  "aria-hidden": ariaLabel ? void 0 : true,
@@ -2973,7 +3406,7 @@ function StatusDot({
2973
3406
 
2974
3407
  // src/components/switch/switch.tsx
2975
3408
  import { Switch as SwitchPrimitive } from "radix-ui";
2976
- import { jsx as jsx28 } from "react/jsx-runtime";
3409
+ import { jsx as jsx29 } from "react/jsx-runtime";
2977
3410
  function Switch({
2978
3411
  className,
2979
3412
  disabled,
@@ -2981,7 +3414,7 @@ function Switch({
2981
3414
  size = "default",
2982
3415
  ...props
2983
3416
  }) {
2984
- return /* @__PURE__ */ jsx28(
3417
+ return /* @__PURE__ */ jsx29(
2985
3418
  SwitchPrimitive.Root,
2986
3419
  {
2987
3420
  "data-slot": "switch",
@@ -2994,12 +3427,12 @@ function Switch({
2994
3427
  className
2995
3428
  ),
2996
3429
  ...props,
2997
- children: /* @__PURE__ */ jsx28(
3430
+ children: /* @__PURE__ */ jsx29(
2998
3431
  SwitchPrimitive.Thumb,
2999
3432
  {
3000
3433
  "data-slot": "switch-thumb",
3001
3434
  className: "pointer-events-none inline-flex items-center justify-center rounded-full bg-[var(--white-stationary)] ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-[state=checked]:translate-x-[14px] group-data-[size=sm]/switch:data-[state=checked]:translate-x-[10px] group-data-[size=default]/switch:data-[state=unchecked]:translate-x-0 group-data-[size=sm]/switch:data-[state=unchecked]:translate-x-0",
3002
- children: loading ? /* @__PURE__ */ jsx28(
3435
+ children: loading ? /* @__PURE__ */ jsx29(
3003
3436
  LoadingIcon,
3004
3437
  {
3005
3438
  "aria-hidden": "true",
@@ -3013,9 +3446,9 @@ function Switch({
3013
3446
  }
3014
3447
 
3015
3448
  // src/components/textarea/textarea.tsx
3016
- import { jsx as jsx29 } from "react/jsx-runtime";
3449
+ import { jsx as jsx30 } from "react/jsx-runtime";
3017
3450
  function Textarea({ className, ...props }) {
3018
- return /* @__PURE__ */ jsx29(
3451
+ return /* @__PURE__ */ jsx30(
3019
3452
  "textarea",
3020
3453
  {
3021
3454
  "data-slot": "textarea",
@@ -3029,18 +3462,18 @@ function Textarea({ className, ...props }) {
3029
3462
  }
3030
3463
 
3031
3464
  // src/components/toast/toast.tsx
3032
- import * as React9 from "react";
3465
+ import * as React11 from "react";
3033
3466
  import { Toast as ToastPrimitive } from "radix-ui";
3034
3467
  import { cva as cva5 } from "class-variance-authority";
3035
- import { jsx as jsx30, jsxs as jsxs13 } from "react/jsx-runtime";
3468
+ import { jsx as jsx31, jsxs as jsxs13 } from "react/jsx-runtime";
3036
3469
  var toastDefaultDurationMs = 3e3;
3037
3470
  function ToastProvider({
3038
3471
  duration = toastDefaultDurationMs,
3039
3472
  ...props
3040
3473
  }) {
3041
- return /* @__PURE__ */ jsx30(ToastPrimitive.Provider, { duration, ...props });
3474
+ return /* @__PURE__ */ jsx31(ToastPrimitive.Provider, { duration, ...props });
3042
3475
  }
3043
- var ToastVisualContext = React9.createContext(null);
3476
+ var ToastVisualContext = React11.createContext(null);
3044
3477
  var toastStatusIconByVariant = {
3045
3478
  destructive: FailedFilledIcon,
3046
3479
  success: SuccessFilledIcon
@@ -3064,7 +3497,7 @@ function formatToastText(children) {
3064
3497
  if (typeof children === "string") {
3065
3498
  return stripToastTrailingSentencePunctuation(children);
3066
3499
  }
3067
- const flatChildren = React9.Children.toArray(children);
3500
+ const flatChildren = React11.Children.toArray(children);
3068
3501
  if (flatChildren.length === 1 && typeof flatChildren[0] === "string") {
3069
3502
  return stripToastTrailingSentencePunctuation(flatChildren[0]);
3070
3503
  }
@@ -3096,7 +3529,7 @@ function ToastRoot({
3096
3529
  ...props
3097
3530
  }) {
3098
3531
  const isDestructive = variant === "destructive";
3099
- return /* @__PURE__ */ jsx30(
3532
+ return /* @__PURE__ */ jsx31(
3100
3533
  ToastPrimitive.Root,
3101
3534
  {
3102
3535
  "aria-busy": busy,
@@ -3113,7 +3546,7 @@ function ToastRoot({
3113
3546
  ...style
3114
3547
  },
3115
3548
  ...props,
3116
- children: /* @__PURE__ */ jsx30(ToastVisualContext.Provider, { value: { busy, variant }, children: /* @__PURE__ */ jsx30("span", { className: "flex min-w-0 max-w-full flex-col items-center justify-center whitespace-normal break-words text-center", children }) })
3549
+ children: /* @__PURE__ */ jsx31(ToastVisualContext.Provider, { value: { busy, variant }, children: /* @__PURE__ */ jsx31("span", { className: "flex min-w-0 max-w-full flex-col items-center justify-center whitespace-normal break-words text-center", children }) })
3117
3550
  }
3118
3551
  );
3119
3552
  }
@@ -3122,7 +3555,7 @@ function ToastTitle({
3122
3555
  children,
3123
3556
  ...props
3124
3557
  }) {
3125
- const toastVisual = React9.useContext(ToastVisualContext);
3558
+ const toastVisual = React11.useContext(ToastVisualContext);
3126
3559
  const StatusIcon = toastVisual?.variant && hasToastStatusIcon(toastVisual.variant) ? toastStatusIconByVariant[toastVisual.variant] : null;
3127
3560
  return /* @__PURE__ */ jsxs13(
3128
3561
  ToastPrimitive.Title,
@@ -3134,7 +3567,7 @@ function ToastTitle({
3134
3567
  ),
3135
3568
  ...props,
3136
3569
  children: [
3137
- toastVisual?.busy ? /* @__PURE__ */ jsx30(
3570
+ toastVisual?.busy ? /* @__PURE__ */ jsx31(
3138
3571
  Spinner,
3139
3572
  {
3140
3573
  className: "shrink-0 text-current",
@@ -3142,8 +3575,8 @@ function ToastTitle({
3142
3575
  strokeWidth: 2,
3143
3576
  trackColor: "color-mix(in srgb, currentColor 28%, transparent)"
3144
3577
  }
3145
- ) : StatusIcon ? /* @__PURE__ */ jsx30(StatusIcon, { className: "size-4 shrink-0 text-current" }) : null,
3146
- /* @__PURE__ */ jsx30("span", { className: "min-w-0 break-words", children: formatToastText(children) })
3578
+ ) : StatusIcon ? /* @__PURE__ */ jsx31(StatusIcon, { className: "size-4 shrink-0 text-current" }) : null,
3579
+ /* @__PURE__ */ jsx31("span", { className: "min-w-0 break-words", children: formatToastText(children) })
3147
3580
  ]
3148
3581
  }
3149
3582
  );
@@ -3152,7 +3585,7 @@ function ToastDescription({
3152
3585
  className,
3153
3586
  ...props
3154
3587
  }) {
3155
- return /* @__PURE__ */ jsx30(
3588
+ return /* @__PURE__ */ jsx31(
3156
3589
  ToastPrimitive.Description,
3157
3590
  {
3158
3591
  "data-slot": "toast-description",
@@ -3168,7 +3601,7 @@ function ToastClose({
3168
3601
  className,
3169
3602
  ...props
3170
3603
  }) {
3171
- return /* @__PURE__ */ jsx30(
3604
+ return /* @__PURE__ */ jsx31(
3172
3605
  ToastPrimitive.Close,
3173
3606
  {
3174
3607
  "data-slot": "toast-close",
@@ -3177,7 +3610,7 @@ function ToastClose({
3177
3610
  className
3178
3611
  ),
3179
3612
  ...props,
3180
- children: /* @__PURE__ */ jsx30(CloseIcon, { className: "size-4" })
3613
+ children: /* @__PURE__ */ jsx31(CloseIcon, { className: "size-4" })
3181
3614
  }
3182
3615
  );
3183
3616
  }
@@ -3186,7 +3619,7 @@ function ToastViewport({
3186
3619
  style,
3187
3620
  ...props
3188
3621
  }) {
3189
- return /* @__PURE__ */ jsx30(
3622
+ return /* @__PURE__ */ jsx31(
3190
3623
  ToastPrimitive.Viewport,
3191
3624
  {
3192
3625
  "data-slot": "toast-viewport",
@@ -3201,8 +3634,8 @@ function ToastViewport({
3201
3634
  }
3202
3635
 
3203
3636
  // src/components/underline-tabs/underline-tabs.tsx
3204
- import { useEffect as useEffect5, useLayoutEffect as useLayoutEffect2, useRef as useRef4, useState as useState6 } from "react";
3205
- import { jsx as jsx31, jsxs as jsxs14 } from "react/jsx-runtime";
3637
+ import { useEffect as useEffect6, useLayoutEffect as useLayoutEffect3, useRef as useRef4, useState as useState7 } from "react";
3638
+ import { jsx as jsx32, jsxs as jsxs14 } from "react/jsx-runtime";
3206
3639
  function UnderlineTabs({
3207
3640
  tabs,
3208
3641
  value,
@@ -3220,12 +3653,12 @@ function UnderlineTabs({
3220
3653
  const viewportRef = useRef4(null);
3221
3654
  const rowRef = useRef4(null);
3222
3655
  const buttonRefs = useRef4({});
3223
- const [indicatorStyle, setIndicatorStyle] = useState6({ left: 0, width: 0 });
3224
- const [overflow, setOverflow] = useState6({
3656
+ const [indicatorStyle, setIndicatorStyle] = useState7({ left: 0, width: 0 });
3657
+ const [overflow, setOverflow] = useState7({
3225
3658
  canScrollLeft: false,
3226
3659
  canScrollRight: false
3227
3660
  });
3228
- useLayoutEffect2(() => {
3661
+ useLayoutEffect3(() => {
3229
3662
  const row = rowRef.current;
3230
3663
  const button = buttonRefs.current[value];
3231
3664
  if (!row || !button) {
@@ -3242,7 +3675,7 @@ function UnderlineTabs({
3242
3675
  (current) => current.left === nextStyle.left && current.width === nextStyle.width ? current : nextStyle
3243
3676
  );
3244
3677
  }, [tabs, value]);
3245
- useEffect5(() => {
3678
+ useEffect6(() => {
3246
3679
  const viewport = viewportRef.current;
3247
3680
  if (!viewport) {
3248
3681
  return;
@@ -3297,7 +3730,7 @@ function UnderlineTabs({
3297
3730
  "data-testid": testId,
3298
3731
  role: "tablist",
3299
3732
  children: [
3300
- /* @__PURE__ */ jsx31(
3733
+ /* @__PURE__ */ jsx32(
3301
3734
  "div",
3302
3735
  {
3303
3736
  ref: viewportRef,
@@ -3342,14 +3775,14 @@ function UnderlineTabs({
3342
3775
  onClick: () => onValueChange(tab.value),
3343
3776
  onMouseDown: preventMouseDownDefault ? (event) => event.preventDefault() : void 0,
3344
3777
  children: [
3345
- /* @__PURE__ */ jsx31("span", { children: tab.label }),
3346
- tab.count !== void 0 ? /* @__PURE__ */ jsx31("span", { className: "text-[11px] font-medium leading-6 text-[inherit]", children: tab.count }) : null
3778
+ /* @__PURE__ */ jsx32("span", { children: tab.label }),
3779
+ tab.count !== void 0 ? /* @__PURE__ */ jsx32("span", { className: "text-[11px] font-medium leading-6 text-[inherit]", children: tab.count }) : null
3347
3780
  ]
3348
3781
  },
3349
3782
  tab.value
3350
3783
  );
3351
3784
  }),
3352
- /* @__PURE__ */ jsx31(
3785
+ /* @__PURE__ */ jsx32(
3353
3786
  "div",
3354
3787
  {
3355
3788
  "aria-hidden": true,
@@ -3366,7 +3799,7 @@ function UnderlineTabs({
3366
3799
  )
3367
3800
  }
3368
3801
  ),
3369
- /* @__PURE__ */ jsx31(
3802
+ /* @__PURE__ */ jsx32(
3370
3803
  "button",
3371
3804
  {
3372
3805
  "aria-label": scrollLeftLabel,
@@ -3377,10 +3810,10 @@ function UnderlineTabs({
3377
3810
  disabled: !overflow.canScrollLeft,
3378
3811
  type: "button",
3379
3812
  onClick: () => scrollTabs("left"),
3380
- children: /* @__PURE__ */ jsx31(ArrowLeftIcon, { size: 16 })
3813
+ children: /* @__PURE__ */ jsx32(ArrowLeftIcon, { size: 16 })
3381
3814
  }
3382
3815
  ),
3383
- /* @__PURE__ */ jsx31(
3816
+ /* @__PURE__ */ jsx32(
3384
3817
  "button",
3385
3818
  {
3386
3819
  "aria-label": scrollRightLabel,
@@ -3391,7 +3824,7 @@ function UnderlineTabs({
3391
3824
  disabled: !overflow.canScrollRight,
3392
3825
  type: "button",
3393
3826
  onClick: () => scrollTabs("right"),
3394
- children: /* @__PURE__ */ jsx31(ArrowRightIcon, { size: 16 })
3827
+ children: /* @__PURE__ */ jsx32(ArrowRightIcon, { size: 16 })
3395
3828
  }
3396
3829
  )
3397
3830
  ]
@@ -3400,9 +3833,9 @@ function UnderlineTabs({
3400
3833
  }
3401
3834
 
3402
3835
  // src/components/viewport-menu-surface/viewport-menu-surface.tsx
3403
- import * as React10 from "react";
3404
- import { createPortal as createPortal2 } from "react-dom";
3405
- import { jsx as jsx32 } from "react/jsx-runtime";
3836
+ import * as React12 from "react";
3837
+ import { createPortal as createPortal3 } from "react-dom";
3838
+ import { jsx as jsx33 } from "react/jsx-runtime";
3406
3839
  var VIEWPORT_MENU_PADDING = 12;
3407
3840
  var MENU_BOUNDARY_PADDING = 8;
3408
3841
  function clampMenuCoordinate(origin, size, viewportExtent, padding) {
@@ -3514,7 +3947,7 @@ function assignRef(ref, value) {
3514
3947
  function callHandler(handler, event) {
3515
3948
  handler?.(event);
3516
3949
  }
3517
- var ViewportMenuSurface = React10.forwardRef(function ViewportMenuSurface2({
3950
+ var ViewportMenuSurface = React12.forwardRef(function ViewportMenuSurface2({
3518
3951
  open,
3519
3952
  placement,
3520
3953
  children,
@@ -3530,16 +3963,16 @@ var ViewportMenuSurface = React10.forwardRef(function ViewportMenuSurface2({
3530
3963
  className,
3531
3964
  ...rest
3532
3965
  }, forwardedRef) {
3533
- const surfaceRef = React10.useRef(null);
3534
- const [measuredSize, setMeasuredSize] = React10.useState(null);
3535
- const setRefs2 = React10.useCallback(
3966
+ const surfaceRef = React12.useRef(null);
3967
+ const [measuredSize, setMeasuredSize] = React12.useState(null);
3968
+ const setRefs2 = React12.useCallback(
3536
3969
  (node) => {
3537
3970
  surfaceRef.current = node;
3538
3971
  assignRef(forwardedRef, node);
3539
3972
  },
3540
3973
  [forwardedRef]
3541
3974
  );
3542
- React10.useLayoutEffect(() => {
3975
+ React12.useLayoutEffect(() => {
3543
3976
  if (!open) {
3544
3977
  setMeasuredSize(null);
3545
3978
  return;
@@ -3563,7 +3996,7 @@ var ViewportMenuSurface = React10.forwardRef(function ViewportMenuSurface2({
3563
3996
  observer.observe(element);
3564
3997
  return () => observer.disconnect();
3565
3998
  }, [open, placement]);
3566
- React10.useEffect(() => {
3999
+ React12.useEffect(() => {
3567
4000
  if (!open) {
3568
4001
  return;
3569
4002
  }
@@ -3620,7 +4053,7 @@ var ViewportMenuSurface = React10.forwardRef(function ViewportMenuSurface2({
3620
4053
  onDismiss,
3621
4054
  open
3622
4055
  ]);
3623
- const resolvedPlacement = React10.useMemo(() => {
4056
+ const resolvedPlacement = React12.useMemo(() => {
3624
4057
  if (placement.type === "absolute") {
3625
4058
  const boundary2 = resolveMenuBoundaryFromPoint(
3626
4059
  placement.boundaryPoint ?? {
@@ -3671,8 +4104,8 @@ var ViewportMenuSurface = React10.forwardRef(function ViewportMenuSurface2({
3671
4104
  return null;
3672
4105
  }
3673
4106
  const portalTarget = resolvedPlacement.portalTarget ?? document.body;
3674
- return createPortal2(
3675
- /* @__PURE__ */ jsx32(
4107
+ return createPortal3(
4108
+ /* @__PURE__ */ jsx33(
3676
4109
  MenuSurface,
3677
4110
  {
3678
4111
  ...rest,
@@ -3811,6 +4244,11 @@ export {
3811
4244
  toast,
3812
4245
  Toaster,
3813
4246
  Spinner,
4247
+ Sortable,
4248
+ SortableContent,
4249
+ SortableItem,
4250
+ SortableItemHandle,
4251
+ SortableOverlay,
3814
4252
  statusDotVariants,
3815
4253
  StatusDot,
3816
4254
  Switch,
@@ -3825,4 +4263,4 @@ export {
3825
4263
  UnderlineTabs,
3826
4264
  ViewportMenuSurface
3827
4265
  };
3828
- //# sourceMappingURL=chunk-ZMX4VTUF.js.map
4266
+ //# sourceMappingURL=chunk-7RACG2FX.js.map