@machinemetrics/mm-react-components 0.2.3-18 → 0.2.3-19

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.
@@ -3499,6 +3499,8 @@ function Button$1({
3499
3499
  Comp,
3500
3500
  {
3501
3501
  "data-slot": "button",
3502
+ "data-variant": variant,
3503
+ "data-size": size2,
3502
3504
  className: cn$1(buttonVariants({ variant, size: size2, className })),
3503
3505
  ...props
3504
3506
  }
@@ -5220,9 +5222,9 @@ const badgeVariants = cva(
5220
5222
  {
5221
5223
  variants: {
5222
5224
  variant: {
5223
- default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
5225
+ default: "border-transparent bg-[var(--indigo-200)] text-[var(--grey-700)] dark:bg-[var(--indigo-700)] dark:text-[var(--grey-00)] [a&]:hover:bg-[var(--indigo-300)] dark:[a&]:hover:bg-[var(--indigo-600)]",
5224
5226
  secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
5225
- destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
5227
+ destructive: "border-transparent bg-[var(--red-200)] text-[var(--grey-700)] dark:bg-[var(--red-700)] dark:text-[var(--grey-00)] [a&]:hover:bg-[var(--red-300)] dark:[a&]:hover:bg-[var(--red-600)] focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
5226
5228
  outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
5227
5229
  }
5228
5230
  },
@@ -12508,9 +12510,17 @@ var Sub2 = DropdownMenuSub$1;
12508
12510
  var SubTrigger2 = DropdownMenuSubTrigger$1;
12509
12511
  var SubContent2 = DropdownMenuSubContent$1;
12510
12512
  function DropdownMenu({
12513
+ onOpenChange,
12511
12514
  ...props
12512
12515
  }) {
12513
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Root2$3, { "data-slot": "dropdown-menu", ...props });
12516
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
12517
+ Root2$3,
12518
+ {
12519
+ "data-slot": "dropdown-menu",
12520
+ onOpenChange,
12521
+ ...props
12522
+ }
12523
+ );
12514
12524
  }
12515
12525
  function DropdownMenuPortal({
12516
12526
  ...props
@@ -16872,7 +16882,7 @@ function TableHead$1({ className, ...props }) {
16872
16882
  {
16873
16883
  "data-slot": "table-head",
16874
16884
  className: cn$1(
16875
- "text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
16885
+ "text-foreground h-10 px-2 text-left align-middle text-xs font-semibold whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] [&_button]:text-xs [&_button]:font-semibold [&_[data-slot='button']]:text-xs [&_[data-slot='button']]:font-semibold",
16876
16886
  className
16877
16887
  ),
16878
16888
  ...props
@@ -16885,7 +16895,7 @@ function TableCell({ className, ...props }) {
16885
16895
  {
16886
16896
  "data-slot": "table-cell",
16887
16897
  className: cn$1(
16888
- "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
16898
+ "p-2 align-middle whitespace-nowrap text-xs font-normal [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
16889
16899
  className
16890
16900
  ),
16891
16901
  ...props
@@ -19888,6 +19898,369 @@ function CalendarDayButton({
19888
19898
  }
19889
19899
  );
19890
19900
  }
19901
+ var POPOVER_NAME = "Popover";
19902
+ var [createPopoverContext] = createContextScope(POPOVER_NAME, [
19903
+ createPopperScope
19904
+ ]);
19905
+ var usePopperScope = createPopperScope();
19906
+ var [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);
19907
+ var Popover$1 = (props) => {
19908
+ const {
19909
+ __scopePopover,
19910
+ children,
19911
+ open: openProp,
19912
+ defaultOpen,
19913
+ onOpenChange,
19914
+ modal = false
19915
+ } = props;
19916
+ const popperScope = usePopperScope(__scopePopover);
19917
+ const triggerRef = React.useRef(null);
19918
+ const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);
19919
+ const [open, setOpen] = useControllableState$1({
19920
+ prop: openProp,
19921
+ defaultProp: defaultOpen ?? false,
19922
+ onChange: onOpenChange,
19923
+ caller: POPOVER_NAME
19924
+ });
19925
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Root2$6, { ...popperScope, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
19926
+ PopoverProvider,
19927
+ {
19928
+ scope: __scopePopover,
19929
+ contentId: useId(),
19930
+ triggerRef,
19931
+ open,
19932
+ onOpenChange: setOpen,
19933
+ onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
19934
+ hasCustomAnchor,
19935
+ onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),
19936
+ onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),
19937
+ modal,
19938
+ children
19939
+ }
19940
+ ) });
19941
+ };
19942
+ Popover$1.displayName = POPOVER_NAME;
19943
+ var ANCHOR_NAME = "PopoverAnchor";
19944
+ var PopoverAnchor = React.forwardRef(
19945
+ (props, forwardedRef) => {
19946
+ const { __scopePopover, ...anchorProps } = props;
19947
+ const context = usePopoverContext(ANCHOR_NAME, __scopePopover);
19948
+ const popperScope = usePopperScope(__scopePopover);
19949
+ const { onCustomAnchorAdd, onCustomAnchorRemove } = context;
19950
+ React.useEffect(() => {
19951
+ onCustomAnchorAdd();
19952
+ return () => onCustomAnchorRemove();
19953
+ }, [onCustomAnchorAdd, onCustomAnchorRemove]);
19954
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });
19955
+ }
19956
+ );
19957
+ PopoverAnchor.displayName = ANCHOR_NAME;
19958
+ var TRIGGER_NAME$3 = "PopoverTrigger";
19959
+ var PopoverTrigger$1 = React.forwardRef(
19960
+ (props, forwardedRef) => {
19961
+ const { __scopePopover, ...triggerProps } = props;
19962
+ const context = usePopoverContext(TRIGGER_NAME$3, __scopePopover);
19963
+ const popperScope = usePopperScope(__scopePopover);
19964
+ const composedTriggerRef = useComposedRefs$1(forwardedRef, context.triggerRef);
19965
+ const trigger = /* @__PURE__ */ jsxRuntimeExports.jsx(
19966
+ Primitive.button,
19967
+ {
19968
+ type: "button",
19969
+ "aria-haspopup": "dialog",
19970
+ "aria-expanded": context.open,
19971
+ "aria-controls": context.contentId,
19972
+ "data-state": getState$2(context.open),
19973
+ ...triggerProps,
19974
+ ref: composedTriggerRef,
19975
+ onClick: composeEventHandlers$1(props.onClick, context.onOpenToggle)
19976
+ }
19977
+ );
19978
+ return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsxRuntimeExports.jsx(Anchor, { asChild: true, ...popperScope, children: trigger });
19979
+ }
19980
+ );
19981
+ PopoverTrigger$1.displayName = TRIGGER_NAME$3;
19982
+ var PORTAL_NAME$1 = "PopoverPortal";
19983
+ var [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME$1, {
19984
+ forceMount: void 0
19985
+ });
19986
+ var PopoverPortal = (props) => {
19987
+ const { __scopePopover, forceMount, children, container } = props;
19988
+ const context = usePopoverContext(PORTAL_NAME$1, __scopePopover);
19989
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Portal$6, { asChild: true, container, children }) }) });
19990
+ };
19991
+ PopoverPortal.displayName = PORTAL_NAME$1;
19992
+ var CONTENT_NAME$3 = "PopoverContent";
19993
+ var PopoverContent$1 = React.forwardRef(
19994
+ (props, forwardedRef) => {
19995
+ const portalContext = usePortalContext(CONTENT_NAME$3, props.__scopePopover);
19996
+ const { forceMount = portalContext.forceMount, ...contentProps } = props;
19997
+ const context = usePopoverContext(CONTENT_NAME$3, props.__scopePopover);
19998
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsxRuntimeExports.jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsxRuntimeExports.jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });
19999
+ }
20000
+ );
20001
+ PopoverContent$1.displayName = CONTENT_NAME$3;
20002
+ var Slot = /* @__PURE__ */ createSlot("PopoverContent.RemoveScroll");
20003
+ var PopoverContentModal = React.forwardRef(
20004
+ (props, forwardedRef) => {
20005
+ const context = usePopoverContext(CONTENT_NAME$3, props.__scopePopover);
20006
+ const contentRef = React.useRef(null);
20007
+ const composedRefs = useComposedRefs$1(forwardedRef, contentRef);
20008
+ const isRightClickOutsideRef = React.useRef(false);
20009
+ React.useEffect(() => {
20010
+ const content = contentRef.current;
20011
+ if (content) return hideOthers(content);
20012
+ }, []);
20013
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ReactRemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
20014
+ PopoverContentImpl,
20015
+ {
20016
+ ...props,
20017
+ ref: composedRefs,
20018
+ trapFocus: context.open,
20019
+ disableOutsidePointerEvents: true,
20020
+ onCloseAutoFocus: composeEventHandlers$1(props.onCloseAutoFocus, (event) => {
20021
+ event.preventDefault();
20022
+ if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();
20023
+ }),
20024
+ onPointerDownOutside: composeEventHandlers$1(
20025
+ props.onPointerDownOutside,
20026
+ (event) => {
20027
+ const originalEvent = event.detail.originalEvent;
20028
+ const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
20029
+ const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
20030
+ isRightClickOutsideRef.current = isRightClick;
20031
+ },
20032
+ { checkForDefaultPrevented: false }
20033
+ ),
20034
+ onFocusOutside: composeEventHandlers$1(
20035
+ props.onFocusOutside,
20036
+ (event) => event.preventDefault(),
20037
+ { checkForDefaultPrevented: false }
20038
+ )
20039
+ }
20040
+ ) });
20041
+ }
20042
+ );
20043
+ var PopoverContentNonModal = React.forwardRef(
20044
+ (props, forwardedRef) => {
20045
+ const context = usePopoverContext(CONTENT_NAME$3, props.__scopePopover);
20046
+ const hasInteractedOutsideRef = React.useRef(false);
20047
+ const hasPointerDownOutsideRef = React.useRef(false);
20048
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
20049
+ PopoverContentImpl,
20050
+ {
20051
+ ...props,
20052
+ ref: forwardedRef,
20053
+ trapFocus: false,
20054
+ disableOutsidePointerEvents: false,
20055
+ onCloseAutoFocus: (event) => {
20056
+ props.onCloseAutoFocus?.(event);
20057
+ if (!event.defaultPrevented) {
20058
+ if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();
20059
+ event.preventDefault();
20060
+ }
20061
+ hasInteractedOutsideRef.current = false;
20062
+ hasPointerDownOutsideRef.current = false;
20063
+ },
20064
+ onInteractOutside: (event) => {
20065
+ props.onInteractOutside?.(event);
20066
+ if (!event.defaultPrevented) {
20067
+ hasInteractedOutsideRef.current = true;
20068
+ if (event.detail.originalEvent.type === "pointerdown") {
20069
+ hasPointerDownOutsideRef.current = true;
20070
+ }
20071
+ }
20072
+ const target = event.target;
20073
+ const targetIsTrigger = context.triggerRef.current?.contains(target);
20074
+ if (targetIsTrigger) event.preventDefault();
20075
+ if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
20076
+ event.preventDefault();
20077
+ }
20078
+ }
20079
+ }
20080
+ );
20081
+ }
20082
+ );
20083
+ var PopoverContentImpl = React.forwardRef(
20084
+ (props, forwardedRef) => {
20085
+ const {
20086
+ __scopePopover,
20087
+ trapFocus,
20088
+ onOpenAutoFocus,
20089
+ onCloseAutoFocus,
20090
+ disableOutsidePointerEvents,
20091
+ onEscapeKeyDown,
20092
+ onPointerDownOutside,
20093
+ onFocusOutside,
20094
+ onInteractOutside,
20095
+ ...contentProps
20096
+ } = props;
20097
+ const context = usePopoverContext(CONTENT_NAME$3, __scopePopover);
20098
+ const popperScope = usePopperScope(__scopePopover);
20099
+ useFocusGuards();
20100
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
20101
+ FocusScope,
20102
+ {
20103
+ asChild: true,
20104
+ loop: true,
20105
+ trapped: trapFocus,
20106
+ onMountAutoFocus: onOpenAutoFocus,
20107
+ onUnmountAutoFocus: onCloseAutoFocus,
20108
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
20109
+ DismissableLayer,
20110
+ {
20111
+ asChild: true,
20112
+ disableOutsidePointerEvents,
20113
+ onInteractOutside,
20114
+ onEscapeKeyDown,
20115
+ onPointerDownOutside,
20116
+ onFocusOutside,
20117
+ onDismiss: () => context.onOpenChange(false),
20118
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
20119
+ Content$4,
20120
+ {
20121
+ "data-state": getState$2(context.open),
20122
+ role: "dialog",
20123
+ id: context.contentId,
20124
+ ...popperScope,
20125
+ ...contentProps,
20126
+ ref: forwardedRef,
20127
+ style: {
20128
+ ...contentProps.style,
20129
+ // re-namespace exposed content custom properties
20130
+ ...{
20131
+ "--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)",
20132
+ "--radix-popover-content-available-width": "var(--radix-popper-available-width)",
20133
+ "--radix-popover-content-available-height": "var(--radix-popper-available-height)",
20134
+ "--radix-popover-trigger-width": "var(--radix-popper-anchor-width)",
20135
+ "--radix-popover-trigger-height": "var(--radix-popper-anchor-height)"
20136
+ }
20137
+ }
20138
+ }
20139
+ )
20140
+ }
20141
+ )
20142
+ }
20143
+ );
20144
+ }
20145
+ );
20146
+ var CLOSE_NAME = "PopoverClose";
20147
+ var PopoverClose = React.forwardRef(
20148
+ (props, forwardedRef) => {
20149
+ const { __scopePopover, ...closeProps } = props;
20150
+ const context = usePopoverContext(CLOSE_NAME, __scopePopover);
20151
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
20152
+ Primitive.button,
20153
+ {
20154
+ type: "button",
20155
+ ...closeProps,
20156
+ ref: forwardedRef,
20157
+ onClick: composeEventHandlers$1(props.onClick, () => context.onOpenChange(false))
20158
+ }
20159
+ );
20160
+ }
20161
+ );
20162
+ PopoverClose.displayName = CLOSE_NAME;
20163
+ var ARROW_NAME = "PopoverArrow";
20164
+ var PopoverArrow = React.forwardRef(
20165
+ (props, forwardedRef) => {
20166
+ const { __scopePopover, ...arrowProps } = props;
20167
+ const popperScope = usePopperScope(__scopePopover);
20168
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });
20169
+ }
20170
+ );
20171
+ PopoverArrow.displayName = ARROW_NAME;
20172
+ function getState$2(open) {
20173
+ return open ? "open" : "closed";
20174
+ }
20175
+ var Root2$2 = Popover$1;
20176
+ var Trigger$1 = PopoverTrigger$1;
20177
+ var Portal = PopoverPortal;
20178
+ var Content2$2 = PopoverContent$1;
20179
+ function Popover({
20180
+ ...props
20181
+ }) {
20182
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Root2$2, { "data-slot": "popover", ...props });
20183
+ }
20184
+ function PopoverTrigger({
20185
+ ...props
20186
+ }) {
20187
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Trigger$1, { "data-slot": "popover-trigger", ...props });
20188
+ }
20189
+ function PopoverContent({
20190
+ className,
20191
+ align = "center",
20192
+ sideOffset = 4,
20193
+ ...props
20194
+ }) {
20195
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Portal, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
20196
+ Content2$2,
20197
+ {
20198
+ "data-slot": "popover-content",
20199
+ align,
20200
+ sideOffset,
20201
+ className: cn$1(
20202
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-none",
20203
+ className
20204
+ ),
20205
+ ...props
20206
+ }
20207
+ ) });
20208
+ }
20209
+ function DatePicker({
20210
+ label,
20211
+ placeholder = "Select date",
20212
+ value,
20213
+ onValueChange,
20214
+ disabled = false,
20215
+ className,
20216
+ id,
20217
+ showDropdowns = false
20218
+ }) {
20219
+ const [open, setOpen] = React.useState(false);
20220
+ const handleDateSelect = (date) => {
20221
+ onValueChange?.(date);
20222
+ setOpen(false);
20223
+ };
20224
+ const formatDate = (date) => {
20225
+ if (!date) return placeholder;
20226
+ return date.toLocaleDateString();
20227
+ };
20228
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
20229
+ "div",
20230
+ {
20231
+ className: `flex flex-col gap-3 ${className || ""}`,
20232
+ "data-slot": "date-picker",
20233
+ children: [
20234
+ label && /* @__PURE__ */ jsxRuntimeExports.jsx(Label$2, { htmlFor: id, className: "px-1", children: label }),
20235
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Popover, { open, onOpenChange: setOpen, children: [
20236
+ /* @__PURE__ */ jsxRuntimeExports.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
20237
+ Button$1,
20238
+ {
20239
+ variant: "outline",
20240
+ id,
20241
+ disabled,
20242
+ className: "w-48 justify-between font-normal",
20243
+ "data-slot": "date-picker-trigger",
20244
+ children: [
20245
+ formatDate(value),
20246
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { className: "size-4" })
20247
+ ]
20248
+ }
20249
+ ) }),
20250
+ /* @__PURE__ */ jsxRuntimeExports.jsx(PopoverContent, { className: "w-auto overflow-hidden p-0", align: "start", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
20251
+ Calendar,
20252
+ {
20253
+ mode: "single",
20254
+ selected: value,
20255
+ captionLayout: showDropdowns ? "dropdown" : "label",
20256
+ onSelect: handleDateSelect
20257
+ }
20258
+ ) })
20259
+ ] })
20260
+ ]
20261
+ }
20262
+ );
20263
+ }
19891
20264
  var COLLAPSIBLE_NAME = "Collapsible";
19892
20265
  var [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);
19893
20266
  var [CollapsibleProvider, useCollapsibleContext] = createCollapsibleContext(COLLAPSIBLE_NAME);
@@ -19918,7 +20291,7 @@ var Collapsible$1 = React.forwardRef(
19918
20291
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
19919
20292
  Primitive.div,
19920
20293
  {
19921
- "data-state": getState$2(open),
20294
+ "data-state": getState$1(open),
19922
20295
  "data-disabled": disabled ? "" : void 0,
19923
20296
  ...collapsibleProps,
19924
20297
  ref: forwardedRef
@@ -19929,18 +20302,18 @@ var Collapsible$1 = React.forwardRef(
19929
20302
  }
19930
20303
  );
19931
20304
  Collapsible$1.displayName = COLLAPSIBLE_NAME;
19932
- var TRIGGER_NAME$3 = "CollapsibleTrigger";
20305
+ var TRIGGER_NAME$2 = "CollapsibleTrigger";
19933
20306
  var CollapsibleTrigger$1 = React.forwardRef(
19934
20307
  (props, forwardedRef) => {
19935
20308
  const { __scopeCollapsible, ...triggerProps } = props;
19936
- const context = useCollapsibleContext(TRIGGER_NAME$3, __scopeCollapsible);
20309
+ const context = useCollapsibleContext(TRIGGER_NAME$2, __scopeCollapsible);
19937
20310
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
19938
20311
  Primitive.button,
19939
20312
  {
19940
20313
  type: "button",
19941
20314
  "aria-controls": context.contentId,
19942
20315
  "aria-expanded": context.open || false,
19943
- "data-state": getState$2(context.open),
20316
+ "data-state": getState$1(context.open),
19944
20317
  "data-disabled": context.disabled ? "" : void 0,
19945
20318
  disabled: context.disabled,
19946
20319
  ...triggerProps,
@@ -19950,19 +20323,19 @@ var CollapsibleTrigger$1 = React.forwardRef(
19950
20323
  );
19951
20324
  }
19952
20325
  );
19953
- CollapsibleTrigger$1.displayName = TRIGGER_NAME$3;
19954
- var CONTENT_NAME$3 = "CollapsibleContent";
20326
+ CollapsibleTrigger$1.displayName = TRIGGER_NAME$2;
20327
+ var CONTENT_NAME$2 = "CollapsibleContent";
19955
20328
  var CollapsibleContent$1 = React.forwardRef(
19956
20329
  (props, forwardedRef) => {
19957
20330
  const { forceMount, ...contentProps } = props;
19958
- const context = useCollapsibleContext(CONTENT_NAME$3, props.__scopeCollapsible);
20331
+ const context = useCollapsibleContext(CONTENT_NAME$2, props.__scopeCollapsible);
19959
20332
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Presence, { present: forceMount || context.open, children: ({ present }) => /* @__PURE__ */ jsxRuntimeExports.jsx(CollapsibleContentImpl, { ...contentProps, ref: forwardedRef, present }) });
19960
20333
  }
19961
20334
  );
19962
- CollapsibleContent$1.displayName = CONTENT_NAME$3;
20335
+ CollapsibleContent$1.displayName = CONTENT_NAME$2;
19963
20336
  var CollapsibleContentImpl = React.forwardRef((props, forwardedRef) => {
19964
20337
  const { __scopeCollapsible, present, children, ...contentProps } = props;
19965
- const context = useCollapsibleContext(CONTENT_NAME$3, __scopeCollapsible);
20338
+ const context = useCollapsibleContext(CONTENT_NAME$2, __scopeCollapsible);
19966
20339
  const [isPresent, setIsPresent] = React.useState(present);
19967
20340
  const ref = React.useRef(null);
19968
20341
  const composedRefs = useComposedRefs$1(forwardedRef, ref);
@@ -19999,7 +20372,7 @@ var CollapsibleContentImpl = React.forwardRef((props, forwardedRef) => {
19999
20372
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
20000
20373
  Primitive.div,
20001
20374
  {
20002
- "data-state": getState$2(context.open),
20375
+ "data-state": getState$1(context.open),
20003
20376
  "data-disabled": context.disabled ? "" : void 0,
20004
20377
  id: context.contentId,
20005
20378
  hidden: !isOpen,
@@ -20014,11 +20387,11 @@ var CollapsibleContentImpl = React.forwardRef((props, forwardedRef) => {
20014
20387
  }
20015
20388
  );
20016
20389
  });
20017
- function getState$2(open) {
20390
+ function getState$1(open) {
20018
20391
  return open ? "open" : "closed";
20019
20392
  }
20020
20393
  var Root$3 = Collapsible$1;
20021
- var Trigger$1 = CollapsibleTrigger$1;
20394
+ var Trigger = CollapsibleTrigger$1;
20022
20395
  var Content = CollapsibleContent$1;
20023
20396
  function Collapsible({
20024
20397
  ...props
@@ -25048,7 +25421,7 @@ var AccordionItem$1 = React__default.forwardRef(
25048
25421
  Root$3,
25049
25422
  {
25050
25423
  "data-orientation": accordionContext.orientation,
25051
- "data-state": getState$1(open),
25424
+ "data-state": getState(open),
25052
25425
  ...collapsibleScope,
25053
25426
  ...accordionItemProps,
25054
25427
  ref: forwardedRef,
@@ -25078,7 +25451,7 @@ var AccordionHeader = React__default.forwardRef(
25078
25451
  Primitive.h3,
25079
25452
  {
25080
25453
  "data-orientation": accordionContext.orientation,
25081
- "data-state": getState$1(itemContext.open),
25454
+ "data-state": getState(itemContext.open),
25082
25455
  "data-disabled": itemContext.disabled ? "" : void 0,
25083
25456
  ...headerProps,
25084
25457
  ref: forwardedRef
@@ -25087,16 +25460,16 @@ var AccordionHeader = React__default.forwardRef(
25087
25460
  }
25088
25461
  );
25089
25462
  AccordionHeader.displayName = HEADER_NAME;
25090
- var TRIGGER_NAME$2 = "AccordionTrigger";
25463
+ var TRIGGER_NAME$1 = "AccordionTrigger";
25091
25464
  var AccordionTrigger$1 = React__default.forwardRef(
25092
25465
  (props, forwardedRef) => {
25093
25466
  const { __scopeAccordion, ...triggerProps } = props;
25094
25467
  const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
25095
- const itemContext = useAccordionItemContext(TRIGGER_NAME$2, __scopeAccordion);
25096
- const collapsibleContext = useAccordionCollapsibleContext(TRIGGER_NAME$2, __scopeAccordion);
25468
+ const itemContext = useAccordionItemContext(TRIGGER_NAME$1, __scopeAccordion);
25469
+ const collapsibleContext = useAccordionCollapsibleContext(TRIGGER_NAME$1, __scopeAccordion);
25097
25470
  const collapsibleScope = useCollapsibleScope(__scopeAccordion);
25098
25471
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Collection.ItemSlot, { scope: __scopeAccordion, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
25099
- Trigger$1,
25472
+ Trigger,
25100
25473
  {
25101
25474
  "aria-disabled": itemContext.open && !collapsibleContext.collapsible || void 0,
25102
25475
  "data-orientation": accordionContext.orientation,
@@ -25108,13 +25481,13 @@ var AccordionTrigger$1 = React__default.forwardRef(
25108
25481
  ) });
25109
25482
  }
25110
25483
  );
25111
- AccordionTrigger$1.displayName = TRIGGER_NAME$2;
25112
- var CONTENT_NAME$2 = "AccordionContent";
25484
+ AccordionTrigger$1.displayName = TRIGGER_NAME$1;
25485
+ var CONTENT_NAME$1 = "AccordionContent";
25113
25486
  var AccordionContent$1 = React__default.forwardRef(
25114
25487
  (props, forwardedRef) => {
25115
25488
  const { __scopeAccordion, ...contentProps } = props;
25116
25489
  const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
25117
- const itemContext = useAccordionItemContext(CONTENT_NAME$2, __scopeAccordion);
25490
+ const itemContext = useAccordionItemContext(CONTENT_NAME$1, __scopeAccordion);
25118
25491
  const collapsibleScope = useCollapsibleScope(__scopeAccordion);
25119
25492
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
25120
25493
  Content,
@@ -25134,21 +25507,21 @@ var AccordionContent$1 = React__default.forwardRef(
25134
25507
  );
25135
25508
  }
25136
25509
  );
25137
- AccordionContent$1.displayName = CONTENT_NAME$2;
25138
- function getState$1(open) {
25510
+ AccordionContent$1.displayName = CONTENT_NAME$1;
25511
+ function getState(open) {
25139
25512
  return open ? "open" : "closed";
25140
25513
  }
25141
- var Root2$2 = Accordion$1;
25514
+ var Root2$1 = Accordion$1;
25142
25515
  var Item = AccordionItem$1;
25143
25516
  var Header = AccordionHeader;
25144
25517
  var Trigger2$1 = AccordionTrigger$1;
25145
- var Content2$2 = AccordionContent$1;
25518
+ var Content2$1 = AccordionContent$1;
25146
25519
  function Accordion({
25147
25520
  className,
25148
25521
  ...props
25149
25522
  }) {
25150
25523
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
25151
- Root2$2,
25524
+ Root2$1,
25152
25525
  {
25153
25526
  "data-slot": "accordion",
25154
25527
  className: cn$1(className),
@@ -25205,7 +25578,7 @@ function AccordionContent({
25205
25578
  ...props
25206
25579
  }) {
25207
25580
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
25208
- Content2$2,
25581
+ Content2$1,
25209
25582
  {
25210
25583
  "data-slot": "accordion-content",
25211
25584
  className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
@@ -25342,314 +25715,6 @@ function FilterMenu({
25342
25715
  ] })
25343
25716
  ] });
25344
25717
  }
25345
- var POPOVER_NAME = "Popover";
25346
- var [createPopoverContext] = createContextScope(POPOVER_NAME, [
25347
- createPopperScope
25348
- ]);
25349
- var usePopperScope = createPopperScope();
25350
- var [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);
25351
- var Popover$1 = (props) => {
25352
- const {
25353
- __scopePopover,
25354
- children,
25355
- open: openProp,
25356
- defaultOpen,
25357
- onOpenChange,
25358
- modal = false
25359
- } = props;
25360
- const popperScope = usePopperScope(__scopePopover);
25361
- const triggerRef = React.useRef(null);
25362
- const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);
25363
- const [open, setOpen] = useControllableState$1({
25364
- prop: openProp,
25365
- defaultProp: defaultOpen ?? false,
25366
- onChange: onOpenChange,
25367
- caller: POPOVER_NAME
25368
- });
25369
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Root2$6, { ...popperScope, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
25370
- PopoverProvider,
25371
- {
25372
- scope: __scopePopover,
25373
- contentId: useId(),
25374
- triggerRef,
25375
- open,
25376
- onOpenChange: setOpen,
25377
- onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
25378
- hasCustomAnchor,
25379
- onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),
25380
- onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),
25381
- modal,
25382
- children
25383
- }
25384
- ) });
25385
- };
25386
- Popover$1.displayName = POPOVER_NAME;
25387
- var ANCHOR_NAME = "PopoverAnchor";
25388
- var PopoverAnchor = React.forwardRef(
25389
- (props, forwardedRef) => {
25390
- const { __scopePopover, ...anchorProps } = props;
25391
- const context = usePopoverContext(ANCHOR_NAME, __scopePopover);
25392
- const popperScope = usePopperScope(__scopePopover);
25393
- const { onCustomAnchorAdd, onCustomAnchorRemove } = context;
25394
- React.useEffect(() => {
25395
- onCustomAnchorAdd();
25396
- return () => onCustomAnchorRemove();
25397
- }, [onCustomAnchorAdd, onCustomAnchorRemove]);
25398
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });
25399
- }
25400
- );
25401
- PopoverAnchor.displayName = ANCHOR_NAME;
25402
- var TRIGGER_NAME$1 = "PopoverTrigger";
25403
- var PopoverTrigger$1 = React.forwardRef(
25404
- (props, forwardedRef) => {
25405
- const { __scopePopover, ...triggerProps } = props;
25406
- const context = usePopoverContext(TRIGGER_NAME$1, __scopePopover);
25407
- const popperScope = usePopperScope(__scopePopover);
25408
- const composedTriggerRef = useComposedRefs$1(forwardedRef, context.triggerRef);
25409
- const trigger = /* @__PURE__ */ jsxRuntimeExports.jsx(
25410
- Primitive.button,
25411
- {
25412
- type: "button",
25413
- "aria-haspopup": "dialog",
25414
- "aria-expanded": context.open,
25415
- "aria-controls": context.contentId,
25416
- "data-state": getState(context.open),
25417
- ...triggerProps,
25418
- ref: composedTriggerRef,
25419
- onClick: composeEventHandlers$1(props.onClick, context.onOpenToggle)
25420
- }
25421
- );
25422
- return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsxRuntimeExports.jsx(Anchor, { asChild: true, ...popperScope, children: trigger });
25423
- }
25424
- );
25425
- PopoverTrigger$1.displayName = TRIGGER_NAME$1;
25426
- var PORTAL_NAME$1 = "PopoverPortal";
25427
- var [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME$1, {
25428
- forceMount: void 0
25429
- });
25430
- var PopoverPortal = (props) => {
25431
- const { __scopePopover, forceMount, children, container } = props;
25432
- const context = usePopoverContext(PORTAL_NAME$1, __scopePopover);
25433
- return /* @__PURE__ */ jsxRuntimeExports.jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Portal$6, { asChild: true, container, children }) }) });
25434
- };
25435
- PopoverPortal.displayName = PORTAL_NAME$1;
25436
- var CONTENT_NAME$1 = "PopoverContent";
25437
- var PopoverContent$1 = React.forwardRef(
25438
- (props, forwardedRef) => {
25439
- const portalContext = usePortalContext(CONTENT_NAME$1, props.__scopePopover);
25440
- const { forceMount = portalContext.forceMount, ...contentProps } = props;
25441
- const context = usePopoverContext(CONTENT_NAME$1, props.__scopePopover);
25442
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsxRuntimeExports.jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsxRuntimeExports.jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });
25443
- }
25444
- );
25445
- PopoverContent$1.displayName = CONTENT_NAME$1;
25446
- var Slot = /* @__PURE__ */ createSlot("PopoverContent.RemoveScroll");
25447
- var PopoverContentModal = React.forwardRef(
25448
- (props, forwardedRef) => {
25449
- const context = usePopoverContext(CONTENT_NAME$1, props.__scopePopover);
25450
- const contentRef = React.useRef(null);
25451
- const composedRefs = useComposedRefs$1(forwardedRef, contentRef);
25452
- const isRightClickOutsideRef = React.useRef(false);
25453
- React.useEffect(() => {
25454
- const content = contentRef.current;
25455
- if (content) return hideOthers(content);
25456
- }, []);
25457
- return /* @__PURE__ */ jsxRuntimeExports.jsx(ReactRemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
25458
- PopoverContentImpl,
25459
- {
25460
- ...props,
25461
- ref: composedRefs,
25462
- trapFocus: context.open,
25463
- disableOutsidePointerEvents: true,
25464
- onCloseAutoFocus: composeEventHandlers$1(props.onCloseAutoFocus, (event) => {
25465
- event.preventDefault();
25466
- if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();
25467
- }),
25468
- onPointerDownOutside: composeEventHandlers$1(
25469
- props.onPointerDownOutside,
25470
- (event) => {
25471
- const originalEvent = event.detail.originalEvent;
25472
- const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
25473
- const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
25474
- isRightClickOutsideRef.current = isRightClick;
25475
- },
25476
- { checkForDefaultPrevented: false }
25477
- ),
25478
- onFocusOutside: composeEventHandlers$1(
25479
- props.onFocusOutside,
25480
- (event) => event.preventDefault(),
25481
- { checkForDefaultPrevented: false }
25482
- )
25483
- }
25484
- ) });
25485
- }
25486
- );
25487
- var PopoverContentNonModal = React.forwardRef(
25488
- (props, forwardedRef) => {
25489
- const context = usePopoverContext(CONTENT_NAME$1, props.__scopePopover);
25490
- const hasInteractedOutsideRef = React.useRef(false);
25491
- const hasPointerDownOutsideRef = React.useRef(false);
25492
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
25493
- PopoverContentImpl,
25494
- {
25495
- ...props,
25496
- ref: forwardedRef,
25497
- trapFocus: false,
25498
- disableOutsidePointerEvents: false,
25499
- onCloseAutoFocus: (event) => {
25500
- props.onCloseAutoFocus?.(event);
25501
- if (!event.defaultPrevented) {
25502
- if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();
25503
- event.preventDefault();
25504
- }
25505
- hasInteractedOutsideRef.current = false;
25506
- hasPointerDownOutsideRef.current = false;
25507
- },
25508
- onInteractOutside: (event) => {
25509
- props.onInteractOutside?.(event);
25510
- if (!event.defaultPrevented) {
25511
- hasInteractedOutsideRef.current = true;
25512
- if (event.detail.originalEvent.type === "pointerdown") {
25513
- hasPointerDownOutsideRef.current = true;
25514
- }
25515
- }
25516
- const target = event.target;
25517
- const targetIsTrigger = context.triggerRef.current?.contains(target);
25518
- if (targetIsTrigger) event.preventDefault();
25519
- if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
25520
- event.preventDefault();
25521
- }
25522
- }
25523
- }
25524
- );
25525
- }
25526
- );
25527
- var PopoverContentImpl = React.forwardRef(
25528
- (props, forwardedRef) => {
25529
- const {
25530
- __scopePopover,
25531
- trapFocus,
25532
- onOpenAutoFocus,
25533
- onCloseAutoFocus,
25534
- disableOutsidePointerEvents,
25535
- onEscapeKeyDown,
25536
- onPointerDownOutside,
25537
- onFocusOutside,
25538
- onInteractOutside,
25539
- ...contentProps
25540
- } = props;
25541
- const context = usePopoverContext(CONTENT_NAME$1, __scopePopover);
25542
- const popperScope = usePopperScope(__scopePopover);
25543
- useFocusGuards();
25544
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
25545
- FocusScope,
25546
- {
25547
- asChild: true,
25548
- loop: true,
25549
- trapped: trapFocus,
25550
- onMountAutoFocus: onOpenAutoFocus,
25551
- onUnmountAutoFocus: onCloseAutoFocus,
25552
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
25553
- DismissableLayer,
25554
- {
25555
- asChild: true,
25556
- disableOutsidePointerEvents,
25557
- onInteractOutside,
25558
- onEscapeKeyDown,
25559
- onPointerDownOutside,
25560
- onFocusOutside,
25561
- onDismiss: () => context.onOpenChange(false),
25562
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
25563
- Content$4,
25564
- {
25565
- "data-state": getState(context.open),
25566
- role: "dialog",
25567
- id: context.contentId,
25568
- ...popperScope,
25569
- ...contentProps,
25570
- ref: forwardedRef,
25571
- style: {
25572
- ...contentProps.style,
25573
- // re-namespace exposed content custom properties
25574
- ...{
25575
- "--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)",
25576
- "--radix-popover-content-available-width": "var(--radix-popper-available-width)",
25577
- "--radix-popover-content-available-height": "var(--radix-popper-available-height)",
25578
- "--radix-popover-trigger-width": "var(--radix-popper-anchor-width)",
25579
- "--radix-popover-trigger-height": "var(--radix-popper-anchor-height)"
25580
- }
25581
- }
25582
- }
25583
- )
25584
- }
25585
- )
25586
- }
25587
- );
25588
- }
25589
- );
25590
- var CLOSE_NAME = "PopoverClose";
25591
- var PopoverClose = React.forwardRef(
25592
- (props, forwardedRef) => {
25593
- const { __scopePopover, ...closeProps } = props;
25594
- const context = usePopoverContext(CLOSE_NAME, __scopePopover);
25595
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
25596
- Primitive.button,
25597
- {
25598
- type: "button",
25599
- ...closeProps,
25600
- ref: forwardedRef,
25601
- onClick: composeEventHandlers$1(props.onClick, () => context.onOpenChange(false))
25602
- }
25603
- );
25604
- }
25605
- );
25606
- PopoverClose.displayName = CLOSE_NAME;
25607
- var ARROW_NAME = "PopoverArrow";
25608
- var PopoverArrow = React.forwardRef(
25609
- (props, forwardedRef) => {
25610
- const { __scopePopover, ...arrowProps } = props;
25611
- const popperScope = usePopperScope(__scopePopover);
25612
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });
25613
- }
25614
- );
25615
- PopoverArrow.displayName = ARROW_NAME;
25616
- function getState(open) {
25617
- return open ? "open" : "closed";
25618
- }
25619
- var Root2$1 = Popover$1;
25620
- var Trigger = PopoverTrigger$1;
25621
- var Portal = PopoverPortal;
25622
- var Content2$1 = PopoverContent$1;
25623
- function Popover({
25624
- ...props
25625
- }) {
25626
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Root2$1, { "data-slot": "popover", ...props });
25627
- }
25628
- function PopoverTrigger({
25629
- ...props
25630
- }) {
25631
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Trigger, { "data-slot": "popover-trigger", ...props });
25632
- }
25633
- function PopoverContent({
25634
- className,
25635
- align = "center",
25636
- sideOffset = 4,
25637
- ...props
25638
- }) {
25639
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Portal, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
25640
- Content2$1,
25641
- {
25642
- "data-slot": "popover-content",
25643
- align,
25644
- sideOffset,
25645
- className: cn$1(
25646
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-none",
25647
- className
25648
- ),
25649
- ...props
25650
- }
25651
- ) });
25652
- }
25653
25718
  const DISPLAY_FORMAT = "MMM d, yyyy";
25654
25719
  const STORAGE_FORMAT = "yyyy-MM-dd";
25655
25720
  function normalizeRange(start, end) {
@@ -29676,7 +29741,7 @@ function TableBody({
29676
29741
  "td",
29677
29742
  {
29678
29743
  className: cn$1(
29679
- "px-4 py-2.5 align-middle transition-all duration-300 ease-[cubic-bezier(0.23,1,0.32,1)] will-change-transform",
29744
+ "px-4 py-2.5 align-middle text-xs font-normal transition-all duration-300 ease-[cubic-bezier(0.23,1,0.32,1)] will-change-transform",
29680
29745
  getAlignmentClass(column.meta?.align)
29681
29746
  ),
29682
29747
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-6 w-full" })
@@ -29697,7 +29762,7 @@ function TableBody({
29697
29762
  "td",
29698
29763
  {
29699
29764
  className: cn$1(
29700
- "px-4 py-2.5 align-middle",
29765
+ "px-4 py-2.5 align-middle text-xs font-normal",
29701
29766
  cell.column.id === "select" ? "p-0" : "[&:has([role=checkbox])]:pr-0",
29702
29767
  cell.column.id === "actions" ? "py-1.5" : void 0,
29703
29768
  getAlignmentClass(
@@ -30544,14 +30609,31 @@ function RowCard({
30544
30609
  if (id === selectionId) return false;
30545
30610
  return !["title", "subtitle", "badge"].includes(role);
30546
30611
  });
30612
+ const actionsDescriptor = descriptors.find(
30613
+ (item) => getDescriptorId(item) === "actions"
30614
+ );
30615
+ const rowActionsFn = actionsDescriptor ? actionsDescriptor.columnDef.meta?.rowActions ?? void 0 : void 0;
30616
+ const actionItems = rowActionsFn ? rowActionsFn(row) : [];
30617
+ const hasActions = actionItems.length > 0;
30618
+ const [showActions, setShowActions] = React.useState(false);
30619
+ function handleCardClick(event) {
30620
+ if (!hasActions) return;
30621
+ const target = event.target;
30622
+ if (!target) return;
30623
+ const interactive = target.closest(
30624
+ 'a,button,input,select,textarea,label,[role=checkbox],[data-slot="table-action-trigger"]'
30625
+ );
30626
+ if (interactive) return;
30627
+ setShowActions((prev) => !prev);
30628
+ }
30547
30629
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
30548
- "article",
30630
+ "div",
30549
30631
  {
30550
30632
  className: cn$1(
30551
30633
  "mmc-row-card rounded-lg border border-border bg-card text-card-foreground shadow-sm p-4 space-y-3",
30552
30634
  className
30553
30635
  ),
30554
- role: "group",
30636
+ role: hasActions ? "button" : "group",
30555
30637
  "aria-label": (() => {
30556
30638
  const parts = [];
30557
30639
  if (title) {
@@ -30567,6 +30649,15 @@ function RowCard({
30567
30649
  return parts.join(" — ") || "Row";
30568
30650
  })(),
30569
30651
  "data-slot": "row-card",
30652
+ tabIndex: hasActions ? 0 : void 0,
30653
+ onClick: hasActions ? handleCardClick : void 0,
30654
+ onKeyDown: hasActions ? (e) => {
30655
+ if (e.key === "Enter" || e.key === " ") {
30656
+ e.preventDefault();
30657
+ setShowActions((prev) => !prev);
30658
+ }
30659
+ } : void 0,
30660
+ "aria-expanded": hasActions ? showActions : void 0,
30570
30661
  children: [
30571
30662
  /* @__PURE__ */ jsxRuntimeExports.jsxs("header", { className: "mmc-row-card__header flex items-start justify-between gap-3", children: [
30572
30663
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mmc-row-card__header-left flex items-start gap-3", children: [
@@ -30598,16 +30689,52 @@ function RowCard({
30598
30689
  }
30599
30690
  )
30600
30691
  ] }),
30601
- /* @__PURE__ */ jsxRuntimeExports.jsx("dl", { className: "mmc-row-card__details grid grid-cols-2 gap-3 text-sm sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4", children: remaining.map((item) => {
30692
+ hasActions && showActions ? /* @__PURE__ */ jsxRuntimeExports.jsx(
30693
+ "div",
30694
+ {
30695
+ className: "mmc-row-card__actions rounded-md border p-1",
30696
+ role: "menu",
30697
+ "aria-label": "Row actions",
30698
+ children: actionItems.map((item, index2) => /* @__PURE__ */ jsxRuntimeExports.jsx(
30699
+ "button",
30700
+ {
30701
+ type: "button",
30702
+ className: cn$1(
30703
+ "relative flex w-full items-center gap-2 rounded-sm px-2 py-2 text-sm text-left outline-hidden select-none hover:bg-accent",
30704
+ item.variant === "destructive" ? "text-destructive" : void 0
30705
+ ),
30706
+ onClick: (e) => {
30707
+ e.stopPropagation();
30708
+ try {
30709
+ item.onSelect(row);
30710
+ } finally {
30711
+ setShowActions(false);
30712
+ }
30713
+ },
30714
+ role: "menuitem",
30715
+ "data-variant": item.variant ?? "default",
30716
+ children: item.label
30717
+ },
30718
+ item.key ?? index2
30719
+ ))
30720
+ }
30721
+ ) : /* @__PURE__ */ jsxRuntimeExports.jsx("dl", { className: "mmc-row-card__details grid grid-cols-2 gap-3 text-sm sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4", children: remaining.map((item) => {
30602
30722
  const id = getDescriptorId(item);
30603
30723
  const cell = cellMap.get(id);
30604
30724
  if (!cell) return null;
30605
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mmc-row-card__detail flex flex-col gap-1", children: [
30606
- /* @__PURE__ */ jsxRuntimeExports.jsx("dt", { className: "mmc-row-card__label text-xs text-muted-foreground", children: getDisplayLabel(item) }),
30607
- /* @__PURE__ */ jsxRuntimeExports.jsx("dd", { className: "mmc-row-card__value m-0 w-full text-left flex items-center justify-start", children: normalizeAlignment(
30608
- renderCellValue(cell)
30609
- ) })
30610
- ] }, id);
30725
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
30726
+ "div",
30727
+ {
30728
+ className: "mmc-row-card__detail flex flex-col gap-1",
30729
+ children: [
30730
+ /* @__PURE__ */ jsxRuntimeExports.jsx("dt", { className: "mmc-row-card__label text-xs text-muted-foreground", children: getDisplayLabel(item) }),
30731
+ /* @__PURE__ */ jsxRuntimeExports.jsx("dd", { className: "mmc-row-card__value m-0 w-full text-left flex items-center justify-start", children: normalizeAlignment(
30732
+ renderCellValue(cell)
30733
+ ) })
30734
+ ]
30735
+ },
30736
+ id
30737
+ );
30611
30738
  }) })
30612
30739
  ]
30613
30740
  }
@@ -31448,9 +31575,9 @@ const TableHead = React.forwardRef(({ className, ...props }, ref) => /* @__PURE_
31448
31575
  ref,
31449
31576
  "data-slot": "table-head",
31450
31577
  className: cn$1(
31451
- "h-10 px-4 text-left align-middle font-medium text-xs bg-[var(--tablehead-bg)] text-[var(--tablehead-fg)] border-b border-[var(--tablehead-border)] [&:has([role=checkbox])]:pr-0 [&:has([role=checkbox])]:pl-0",
31452
- // Enforce header button/controls to 12px/500
31453
- "[&_button]:text-xs [&_button]:font-medium [&_[data-slot='button']]:text-xs [&_[data-slot='button']]:font-medium",
31578
+ "h-10 px-4 text-left align-middle text-xs font-semibold bg-[var(--tablehead-bg)] text-[var(--tablehead-fg)] border-b border-[var(--tablehead-border)] [&:has([role=checkbox])]:pr-0 [&:has([role=checkbox])]:pl-0",
31579
+ // Enforce header button/controls to 12px/600
31580
+ "[&_button]:text-xs [&_button]:font-semibold [&_[data-slot='button']]:text-xs [&_[data-slot='button']]:font-semibold",
31454
31581
  className
31455
31582
  ),
31456
31583
  ...props
@@ -44281,6 +44408,46 @@ function Spinner({ className, ...props }) {
44281
44408
  }
44282
44409
  );
44283
44410
  }
44411
+ function SpinnerCarbide({ className, ...props }) {
44412
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
44413
+ "svg",
44414
+ {
44415
+ viewBox: "0 0 24 24",
44416
+ role: "status",
44417
+ "aria-label": "Loading",
44418
+ "data-slot": "spinner",
44419
+ className: cn$1("size-4 animate-spin", className),
44420
+ ...props,
44421
+ children: [
44422
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
44423
+ "circle",
44424
+ {
44425
+ cx: "12",
44426
+ cy: "12",
44427
+ r: "10",
44428
+ fill: "none",
44429
+ stroke: "var(--spinner-background)",
44430
+ strokeWidth: "2"
44431
+ }
44432
+ ),
44433
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
44434
+ "circle",
44435
+ {
44436
+ cx: "12",
44437
+ cy: "12",
44438
+ r: "10",
44439
+ fill: "none",
44440
+ stroke: "var(--spinner-foreground)",
44441
+ strokeWidth: "2",
44442
+ strokeLinecap: "round",
44443
+ strokeDasharray: "60",
44444
+ strokeDashoffset: "20"
44445
+ }
44446
+ )
44447
+ ]
44448
+ }
44449
+ );
44450
+ }
44284
44451
  var U = 1, Y$1 = 0.9, H = 0.8, J = 0.17, p = 0.1, u = 0.999, $ = 0.9999;
44285
44452
  var k$1 = 0.99, m = /[\\\/_+.#"@\[\(\{&]/, B$1 = /[\\\/_+.#"@\[\(\{&]/g, K$1 = /[\s-]/, X = /[\s-]/g;
44286
44453
  function G(_, C, h, P2, A, f, O) {
@@ -44656,6 +44823,7 @@ export {
44656
44823
  DataTable,
44657
44824
  DataTablePagination,
44658
44825
  DataTableToolbar,
44826
+ DatePicker,
44659
44827
  DateRangePicker,
44660
44828
  Dialog,
44661
44829
  DialogClose,
@@ -44747,6 +44915,7 @@ export {
44747
44915
  Skeleton,
44748
44916
  Slider,
44749
44917
  Spinner,
44918
+ SpinnerCarbide,
44750
44919
  Switch,
44751
44920
  TABLE_TOKENS,
44752
44921
  Table,