@assure-one/design-system 1.43.0 → 1.43.1

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.
@@ -1,4 +1,4 @@
1
- import { slot, badgeAnatomy, stateAttributes, useDsMessages, deprecate, paginationAnatomy, Select, microInteractions, useFieldsetContext, useFieldControl, useControllableState, useMergedRefs, switchAnatomy, CONTROL_LABEL_TEXT, tableAnatomy, Pressable, FormBridge, CONTROL_SIZE_CLASSES, FileUpload, FileChip, Button, Tooltip, TooltipTrigger, TooltipContent, Avatar, Input, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuSeparator, DropdownMenuLabel, dataTableAnatomy, Checkbox, DocumentDetailPanel, DocumentDetailHeader, DocumentDetailTitle, DocumentDetailRequester, DocumentDetailMetaRow, DocumentDetailActions, DropdownMenuItem, DocumentList, DocumentRow, DocumentListSection, Textarea, DropdownMenuCheckboxItem, Popover, PopoverTrigger, PopoverContent, PopoverClose, DropdownMenuShortcut, useId as useId$1 } from './chunk-XJKCKBHI.js';
1
+ import { slot, badgeAnatomy, stateAttributes, useDsMessages, deprecate, paginationAnatomy, Select, microInteractions, useFieldsetContext, useFieldControl, useControllableState, useFormReset2, useMergedRefs, switchAnatomy, CONTROL_LABEL_TEXT, tableAnatomy, Pressable, FormBridge, CONTROL_SIZE_CLASSES, FileUpload, FileChip, Button, Tooltip, TooltipTrigger, TooltipContent, Avatar, Input, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuSeparator, DropdownMenuLabel, dataTableAnatomy, Checkbox, DocumentDetailPanel, DocumentDetailHeader, DocumentDetailTitle, DocumentDetailRequester, DocumentDetailMetaRow, DocumentDetailActions, DropdownMenuItem, DocumentList, DocumentRow, DocumentListSection, Textarea, DropdownMenuCheckboxItem, Popover, PopoverTrigger, PopoverContent, PopoverClose, DropdownMenuShortcut, useId as useId$1 } from './chunk-VK6SW34V.js';
2
2
  import { cn, ShieldIcon, UploadIcon, SendIcon, ChevronLeftIcon, MoreHorizontalIcon, ChevronRightIcon, ChevronUpIcon, ChevronDownIcon, ChevronsUpDownIcon, LockIcon, TrashIcon, HelpCircleIcon, ArrowRightIcon, CheckIcon, EyeIcon, FileTextIcon, CloseIcon, SparklesIcon, PlusIcon, SearchIcon, AlertTriangleIcon, FolderClosedIcon, CalendarIcon, PencilIcon, LockOpenIcon, FlagIcon, CheckCircleSolidIcon, DownloadIcon, XCircleSolidIcon, MessageCircleIcon, BellIcon, PaperclipIcon, UsersIcon, ClockIcon, PlayIcon, PauseIcon, StopIcon, SettingsIcon, Trash2Icon, FileIcon, SparkleIcon, MailIcon } from './chunk-TBDTXAFH.js';
3
3
  import { clsx } from 'clsx';
4
4
  import * as React2 from 'react';
@@ -906,19 +906,6 @@ var StatusPill = forwardRef(function StatusPill2({ status, dot = true, children,
906
906
  return /* @__PURE__ */ jsx(Badge, { ref, variant, dot, ...props, children: children ?? label });
907
907
  });
908
908
  StatusPill.displayName = "StatusPill";
909
- function useFormReset(elementRef, onReset, form) {
910
- const latest = useRef(onReset);
911
- latest.current = onReset;
912
- useEffect(() => {
913
- const element = elementRef.current;
914
- if (!element) return;
915
- const owner = form ? element.ownerDocument.getElementById(form) : element.closest("form");
916
- if (!owner) return;
917
- const handle = () => latest.current?.();
918
- owner.addEventListener("reset", handle);
919
- return () => owner.removeEventListener("reset", handle);
920
- }, [elementRef, form]);
921
- }
922
909
  var switchVariants = cva(
923
910
  [
924
911
  "ds:peer ds:inline-flex ds:shrink-0 ds:cursor-pointer ds:items-center ds:rounded-full ds:border ds:border-transparent",
@@ -997,7 +984,7 @@ var Switch = React2.forwardRef(
997
984
  });
998
985
  const initialChecked = React2.useRef(checkedProp ?? defaultChecked ?? false);
999
986
  const rootRef = React2.useRef(null);
1000
- useFormReset(rootRef, () => setChecked(initialChecked.current), form);
987
+ useFormReset2(rootRef, () => setChecked(initialChecked.current), form);
1001
988
  const mergedRef = useMergedRefs(ref, rootRef);
1002
989
  const root = /* @__PURE__ */ jsx(
1003
990
  SwitchPrimitive.Root,
@@ -3583,9 +3570,10 @@ var DataTable = forwardRef(function DataTable2({ withToolbar, className, childre
3583
3570
  className: cn(
3584
3571
  // Outer frame on the whole component: a single visible border +
3585
3572
  // quiet shadow wrapping the toolbar (if any) and the table as one
3586
- // card. overflow-hidden clips the header/cell backgrounds to the
3587
- // rounded corners.
3588
- "ds:w-full ds:overflow-hidden ds:rounded-card ds:border ds:border-rule-strong ds:bg-surface ds:shadow-quiet",
3573
+ // card. The overflow clips the header/cell backgrounds to the
3574
+ // rounded corners; a table wider than the card scrolls sideways
3575
+ // inside it instead of being cut off (the toolbar stays put).
3576
+ "ds:w-full ds:overflow-x-auto ds:overflow-y-hidden ds:rounded-card ds:border ds:border-rule-strong ds:bg-surface ds:shadow-quiet",
3589
3577
  "ds:[&_table]:bg-surface ds:[&_table]:w-full ds:[&_table]:border-collapse",
3590
3578
  className
3591
3579
  ),
@@ -3605,6 +3593,8 @@ var DataTableToolbar = forwardRef(
3605
3593
  className: cn(
3606
3594
  "ds:flex ds:flex-wrap ds:items-center ds:gap-2 ds:px-3 ds:py-2.5",
3607
3595
  "ds:border-rule ds:bg-surface ds:border-b",
3596
+ // Pinned to the card's left edge while a wide table scrolls.
3597
+ "ds:sticky ds:left-0",
3608
3598
  className
3609
3599
  ),
3610
3600
  ...props
@@ -3625,7 +3615,8 @@ var DataTableSearch = forwardRef(
3625
3615
  inputSize: "sm",
3626
3616
  placeholder,
3627
3617
  prefixIcon: /* @__PURE__ */ jsx(SearchIcon, { "aria-hidden": "true" }),
3628
- className: cn("ds:w-[280px]", className),
3618
+ rootClassName: "ds:w-auto ds:min-w-0 ds:max-w-full ds:shrink",
3619
+ className: cn("ds:w-[280px] ds:max-w-full", className),
3629
3620
  ...props
3630
3621
  }
3631
3622
  );
@@ -3792,7 +3783,10 @@ var DataTableCellId = forwardRef(
3792
3783
  ref,
3793
3784
  ...slot(dataTableAnatomy, "cell"),
3794
3785
  ...stateAttributes({ variant: "id" }),
3795
- className: cn("ds:font-sans ds:text-fg-4 ds:text-xs ds:tabular-nums", className),
3786
+ className: cn(
3787
+ "ds:font-sans ds:text-fg-4 ds:text-xs ds:whitespace-nowrap ds:tabular-nums",
3788
+ className
3789
+ ),
3796
3790
  ...props
3797
3791
  }
3798
3792
  );
@@ -3818,7 +3812,7 @@ var DataTableCellDue = forwardRef(
3818
3812
  "data-due-state": ariaState,
3819
3813
  ...slot(dataTableAnatomy, "cell"),
3820
3814
  ...stateAttributes({ variant: "due" }),
3821
- className: cn("ds:font-sans ds:tabular-nums", tone, className),
3815
+ className: cn("ds:font-sans ds:whitespace-nowrap ds:tabular-nums", tone, className),
3822
3816
  ...props,
3823
3817
  children: children ?? dueDateFormatter.format(value)
3824
3818
  }
@@ -4895,6 +4889,7 @@ function useStopwatch() {
4895
4889
  }, [setPhase]);
4896
4890
  return { phase, elapsedMs, isRunning: phase === "running", start, pause, resume, stop, reset };
4897
4891
  }
4892
+ var FOCUSED_INPUT_ROW = "ds:transition-colors ds:duration-[var(--duration-fast)] ds:ease-[var(--ease-out-quart)] ds:motion-reduce:transition-none ds:has-[input:focus-visible:not([readonly])]:bg-surface-2";
4898
4893
  var TimeLogger = forwardRef(function TimeLogger2({ className, orientation = "vertical", children, ...props }, ref) {
4899
4894
  return /* @__PURE__ */ jsx(
4900
4895
  "div",
@@ -5020,6 +5015,9 @@ var TimeLoggerTimer = forwardRef(
5020
5015
  ref,
5021
5016
  className: cn(
5022
5017
  "ds:border-rule-soft ds:flex ds:items-center ds:gap-2.5 ds:border-t ds:px-4 ds:py-4",
5018
+ // The bare input has no chrome of its own; tint its row while it
5019
+ // has keyboard focus so the focus is visible beyond the caret.
5020
+ FOCUSED_INPUT_ROW,
5023
5021
  // In a horizontal bar this segment is usually the `flex-1` grower;
5024
5022
  // min-w-0 lets the clock shrink instead of pushing the trailing
5025
5023
  // segment off the edge.
@@ -5129,32 +5127,41 @@ var TimeLoggerField = forwardRef(
5129
5127
  TimeLoggerField.displayName = "TimeLoggerField";
5130
5128
  var TimeLoggerNotes = forwardRef(
5131
5129
  function TimeLoggerNotes2({ value, onValueChange, icon, placeholder = "Add notes", className, ...props }, ref) {
5132
- return /* @__PURE__ */ jsxs("div", { className: "ds:border-rule-soft ds:flex ds:items-center ds:gap-3 ds:border-t ds:px-4 ds:py-3", children: [
5133
- /* @__PURE__ */ jsx(
5134
- "span",
5135
- {
5136
- className: "ds:text-fg-4 ds:flex ds:size-[17px] ds:shrink-0 ds:items-center ds:justify-center ds:[&_svg]:size-[17px]",
5137
- "aria-hidden": "true",
5138
- children: icon ?? /* @__PURE__ */ jsx(FileTextIcon, {})
5139
- }
5140
- ),
5141
- /* @__PURE__ */ jsx(
5142
- "input",
5143
- {
5144
- ref,
5145
- type: "text",
5146
- value: value ?? "",
5147
- onChange: (event) => onValueChange?.(event.target.value),
5148
- placeholder,
5149
- "aria-label": "Notes",
5150
- className: cn(
5151
- "ds:text-fg ds:placeholder:text-fg-4 ds:min-w-0 ds:flex-1 ds:border-0 ds:bg-transparent ds:text-sm ds:outline-none",
5152
- className
5130
+ return /* @__PURE__ */ jsxs(
5131
+ "div",
5132
+ {
5133
+ className: cn(
5134
+ "ds:border-rule-soft ds:flex ds:items-center ds:gap-3 ds:border-t ds:px-4 ds:py-3",
5135
+ FOCUSED_INPUT_ROW
5136
+ ),
5137
+ children: [
5138
+ /* @__PURE__ */ jsx(
5139
+ "span",
5140
+ {
5141
+ className: "ds:text-fg-4 ds:flex ds:size-[17px] ds:shrink-0 ds:items-center ds:justify-center ds:[&_svg]:size-[17px]",
5142
+ "aria-hidden": "true",
5143
+ children: icon ?? /* @__PURE__ */ jsx(FileTextIcon, {})
5144
+ }
5153
5145
  ),
5154
- ...props
5155
- }
5156
- )
5157
- ] });
5146
+ /* @__PURE__ */ jsx(
5147
+ "input",
5148
+ {
5149
+ ref,
5150
+ type: "text",
5151
+ value: value ?? "",
5152
+ onChange: (event) => onValueChange?.(event.target.value),
5153
+ placeholder,
5154
+ "aria-label": "Notes",
5155
+ className: cn(
5156
+ "ds:text-fg ds:placeholder:text-fg-4 ds:min-w-0 ds:flex-1 ds:border-0 ds:bg-transparent ds:text-sm ds:outline-none",
5157
+ className
5158
+ ),
5159
+ ...props
5160
+ }
5161
+ )
5162
+ ]
5163
+ }
5164
+ );
5158
5165
  }
5159
5166
  );
5160
5167
  TimeLoggerNotes.displayName = "TimeLoggerNotes";
@@ -5629,6 +5636,6 @@ function SignatureEditor({
5629
5636
  }
5630
5637
  SignatureEditor.displayName = "SignatureEditor";
5631
5638
 
5632
- export { AIReceiptPanel, AiDraftCard, Assignee, AttentionItem, Badge, Blockquote, BottomNav, CategoryDivider, CategoryTag, ChannelTabs, ClientRailGroupHeader, ClientRailItem, Dash, DashGrid, DataTable, DataTableBody, DataTableCell, DataTableCellDue, DataTableCellId, DataTableCellMono, DataTableCellName, DataTableCheckbox, DataTableHead, DataTableHeader, DataTablePagination, DataTableResultsCount, DataTableRow, DataTableSearch, DataTableSpacer, DataTableToolbar, DataTableView, DocumentChecklist, DocumentFileCard, DocumentFileLine, DocumentFileRow, DocumentRequestCard, DocumentRequestDetail, DocumentRequestField, DocumentRequestUpload, DocumentSourceFilter, DocumentSourceTag, DocumentsWorkspaceLayout, EmailMessageCard, EmptyValue, EngagementCard, EngagementTimeline, EngagementTimelineStep, IntentBadge, MissingDocumentsPanel, MoneyCell, NewMenu, PROGRESS_LEGACY_TO_INTENT, Pagination, ProgressBar, ProgressRing, SERVICE_TONES, STATUS_DOT_TONE_TO_INTENT, Section, SectionHead, SectionHeader, SegmentedProgress, SignatureEditor, Skeleton, SkeletonCircle, SkeletonText, StagePill, Stat, StatusDot, StatusPill, SuggestionPills, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagsCell, TeamMemberSelect, TimeLogger, TimeLoggerActions, TimeLoggerBillable, TimeLoggerContextRow, TimeLoggerEntry, TimeLoggerEntryList, TimeLoggerField, TimeLoggerFooter, TimeLoggerHeader, TimeLoggerNotes, TimeLoggerTimer, ToggleGroup, ToggleGroupItem, badgeVariants, compareSortValues, formatClock, formatCurrency, formatDuration, nextSortDirection, parseDuration, progressBarVariants, progressRingVariants, resolveBadgeAppearance, serviceToneLabel, serviceToneStyle, statusDotVariants, useDataTable, useFormReset, useStopwatch };
5633
- //# sourceMappingURL=chunk-LUWPEBXZ.js.map
5634
- //# sourceMappingURL=chunk-LUWPEBXZ.js.map
5639
+ export { AIReceiptPanel, AiDraftCard, Assignee, AttentionItem, Badge, Blockquote, BottomNav, CategoryDivider, CategoryTag, ChannelTabs, ClientRailGroupHeader, ClientRailItem, Dash, DashGrid, DataTable, DataTableBody, DataTableCell, DataTableCellDue, DataTableCellId, DataTableCellMono, DataTableCellName, DataTableCheckbox, DataTableHead, DataTableHeader, DataTablePagination, DataTableResultsCount, DataTableRow, DataTableSearch, DataTableSpacer, DataTableToolbar, DataTableView, DocumentChecklist, DocumentFileCard, DocumentFileLine, DocumentFileRow, DocumentRequestCard, DocumentRequestDetail, DocumentRequestField, DocumentRequestUpload, DocumentSourceFilter, DocumentSourceTag, DocumentsWorkspaceLayout, EmailMessageCard, EmptyValue, EngagementCard, EngagementTimeline, EngagementTimelineStep, IntentBadge, MissingDocumentsPanel, MoneyCell, NewMenu, PROGRESS_LEGACY_TO_INTENT, Pagination, ProgressBar, ProgressRing, SERVICE_TONES, STATUS_DOT_TONE_TO_INTENT, Section, SectionHead, SectionHeader, SegmentedProgress, SignatureEditor, Skeleton, SkeletonCircle, SkeletonText, StagePill, Stat, StatusDot, StatusPill, SuggestionPills, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagsCell, TeamMemberSelect, TimeLogger, TimeLoggerActions, TimeLoggerBillable, TimeLoggerContextRow, TimeLoggerEntry, TimeLoggerEntryList, TimeLoggerField, TimeLoggerFooter, TimeLoggerHeader, TimeLoggerNotes, TimeLoggerTimer, ToggleGroup, ToggleGroupItem, badgeVariants, compareSortValues, formatClock, formatCurrency, formatDuration, nextSortDirection, parseDuration, progressBarVariants, progressRingVariants, resolveBadgeAppearance, serviceToneLabel, serviceToneStyle, statusDotVariants, useDataTable, useStopwatch };
5640
+ //# sourceMappingURL=chunk-5AL4W32Z.js.map
5641
+ //# sourceMappingURL=chunk-5AL4W32Z.js.map