atlas-react-kit 1.2.4 → 1.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/COMPONENTS.md CHANGED
@@ -74,7 +74,7 @@ theme from `next-themes`, so toast consumers install that too.
74
74
  | `table` | Table, header, body, footer, row, head, cell, caption; root scroller is `min-w-0 overflow-x-auto` with a fade cue; cells are `px-2` below `sm` |
75
75
  | `table-body-skeleton` | `TableBodySkeleton`; `columns`, optional `rows` (default 5) |
76
76
  | `tabs` | `Tabs`, `TabsList`, `TabsTrigger`, `TabsContent`, `TabsNav`, `TabsNavLink`, `tabsListVariants`, `tabsTriggerVariants`; list `variant` is `default` or `line`; `TabsNavLink` is the link inside `TabsNav` (required `active`, `asChild` for a router link); `TabsNav` / `TabsList` scroll horizontally only (`overflow-y` hidden, `p-1` counted in the scroller height, edge fade, active item into view, mouse drag scrolls the row) — do not wrap them in `overflow-x-auto` |
77
- | `toast` | `Toaster`, `toast`; mount one `Toaster` (`position`, `closeButton` (default on), `expand`, `visibleToasts`, `duration`), then `toast(message, options)`. The stack expands on hover and while keyboard focus is inside it; collapsed toasts behind the front one are hidden, `.success`, `.info`, `.warning`, `.error`, `.loading`, `.dismiss(id?)`. Options: `id` (replaces that toast), `description`, `duration`, `action` / `cancel` as `{ label, onClick }`. Kit-owned API: no toast library is exposed |
77
+ | `toast` | `Toaster`, `toast`; mount one `Toaster` (`position`, `closeButton` (default on), `expand`, `visibleToasts`, `duration`), then `toast(message, options)`. The stack expands on hover and while keyboard focus is inside it; collapsed toasts behind the front one are hidden, `.success`, `.info`, `.warning`, `.error`, `.loading`, `.dismiss(id?)`. Options: `id` (replaces that toast), `description`, `duration`, `action` / `cancel` as `{ label, onClick }`. The toaster list is clamped to `calc(100vw - 2rem)` so it stays inside a narrow viewport. Kit-owned API: no toast library is exposed |
78
78
  | `toggle` | `Toggle`, `toggleVariants`; `variant`, `size`. `selectedToggleChrome` is deprecated: `toggleVariants()` already includes it. Pressed state is the selected wash, text, and border via `data-state=on`, `aria-pressed`, and `aria-checked` |
79
79
  | `toggle-group` | `ToggleGroup`, `ToggleGroupItem`; `variant`, `size`. Items share `toggleVariants`, so single (radio) and multiple selections match a pressed `Toggle`. In a single group the arrow keys select as they move focus, like radios; Tab and clicks do not. A multiple group only moves focus |
80
80
  | `theme-provider` | `ThemeProvider`, `useTheme`; optional `storageKey` (default `atlas-theme`), `enableShortcut` for the `d` toggle |
package/dist/checkbox.js CHANGED
@@ -6,6 +6,6 @@ import { choiceHitArea, disabledState, focusRing, invalidState, } from "./intern
6
6
  import { cn } from "./utils.js";
7
7
  import { CheckIcon } from "lucide-react";
8
8
  function Checkbox({ className, ...props }) {
9
- return (_jsx(CheckboxPrimitive.Root, { "data-slot": "checkbox", className: cn(focusRing, invalidState, disabledState, choiceHitArea, "peer relative flex size-4.5 shrink-0 items-center justify-center rounded-none border border-input bg-transparent transition-shadow group-has-disabled/field:opacity-50 aria-invalid:aria-checked:border-primary data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary", className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "grid place-content-center text-current transition-none [&>svg]:size-3.5", children: _jsx(CheckIcon, {}) }) }));
9
+ return (_jsx(CheckboxPrimitive.Root, { "data-slot": "checkbox", className: cn(focusRing, invalidState, disabledState, choiceHitArea, "peer relative flex size-4.5 shrink-0 items-center justify-center rounded-none border border-input bg-transparent transition-shadow group-has-disabled/field:opacity-50 aria-invalid:aria-checked:border-primary data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground", className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "grid place-content-center text-current transition-none [&>svg]:size-3.5", children: _jsx(CheckIcon, {}) }) }));
10
10
  }
11
11
  export { Checkbox };
package/dist/combobox.js CHANGED
@@ -6,6 +6,7 @@ import { Button } from "./button.js";
6
6
  import { Input } from "./input.js";
7
7
  import { formControlTriggerClassName } from "./internal/form-control.js";
8
8
  import { handleListboxKey } from "./internal/listbox-navigation.js";
9
+ import { clamp } from "./internal/math.js";
9
10
  import { Listbox, ListboxEmptyStatus, listboxInputAria, PickerOption, } from "./internal/listbox-option.js";
10
11
  import { createSearchIndex, filterSearchIndex, foldSearchText, normalizeSearchQuery, } from "./internal/search.js";
11
12
  import { emptyValueText } from "./internal/styles.js";
@@ -53,7 +54,7 @@ function resolveCreateValue(query, existingValues, normalize) {
53
54
  export function Combobox({ options, value, onValueChange, placeholder = "Select", searchPlaceholder = "Search", emptyText, disabled, id, className, listClassName, contentClassName, "aria-invalid": ariaInvalid, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, creatable = false, normalizeCreateValue = defaultNormalizeCreateValue, createLabel = defaultCreateLabel, ...props }) {
54
55
  const [open, setOpen] = React.useState(false);
55
56
  const [query, setQuery] = React.useState("");
56
- const [highlight, setHighlight] = React.useState(0);
57
+ const [highlightIndex, setHighlight] = React.useState(0);
57
58
  const listId = React.useId();
58
59
  const generatedId = React.useId();
59
60
  const triggerId = id ?? generatedId;
@@ -84,6 +85,7 @@ export function Combobox({ options, value, onValueChange, placeholder = "Select"
84
85
  : null;
85
86
  }, [creatable, query, existingValues, normalizeCreateValue, createLabel]);
86
87
  const list = createOption ? [...filtered, createOption] : filtered;
88
+ const highlight = clamp(highlightIndex, 0, Math.max(0, list.length - 1));
87
89
  const onOpenChange = (next) => {
88
90
  setOpen(next);
89
91
  if (!next) {
@@ -10,9 +10,7 @@ type ErrorFallbackProps = {
10
10
  className?: string;
11
11
  };
12
12
  /**
13
- * Presentational recovery UI used by `ErrorBoundary`: a large `EmptyPanel`
14
- * with the message and recovery buttons. Exported so the markup can be
15
- * tested without throwing during render.
13
+ * Recovery UI used by `ErrorBoundary`: a large `EmptyPanel` with recovery buttons.
16
14
  */
17
15
  export declare function ErrorFallback({ message, onRetry, onReload, className, }: ErrorFallbackProps): import("react").JSX.Element;
18
16
  type ErrorBoundaryProps = {
@@ -24,15 +22,14 @@ type ErrorBoundaryProps = {
24
22
  onError?: (error: Error, info: ErrorInfo) => void;
25
23
  };
26
24
  type ErrorBoundaryState = {
27
- error: Error | null;
25
+ hasError: boolean;
28
26
  };
29
27
  /**
30
28
  * Generic React error boundary with retry (reset) and full-page reload.
31
- * Not tied to any data library.
32
29
  */
33
30
  export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
34
31
  state: ErrorBoundaryState;
35
- static getDerivedStateFromError(error: Error): ErrorBoundaryState;
32
+ static getDerivedStateFromError(): ErrorBoundaryState;
36
33
  componentDidCatch(error: Error, info: ErrorInfo): void;
37
34
  retry: () => void;
38
35
  reload: () => void;
@@ -5,9 +5,7 @@ import { Button } from "./button.js";
5
5
  import { EmptyPanel } from "./empty-panel.js";
6
6
  import { cn } from "./utils.js";
7
7
  /**
8
- * Presentational recovery UI used by `ErrorBoundary`: a large `EmptyPanel`
9
- * with the message and recovery buttons. Exported so the markup can be
10
- * tested without throwing during render.
8
+ * Recovery UI used by `ErrorBoundary`: a large `EmptyPanel` with recovery buttons.
11
9
  */
12
10
  export function ErrorFallback({ message = "Something went wrong.", onRetry, onReload, className, }) {
13
11
  return (_jsxs(EmptyPanel, { role: "alert", "data-slot": "error-boundary", size: "lg",
@@ -16,24 +14,23 @@ export function ErrorFallback({ message = "Something went wrong.", onRetry, onRe
16
14
  }
17
15
  /**
18
16
  * Generic React error boundary with retry (reset) and full-page reload.
19
- * Not tied to any data library.
20
17
  */
21
18
  export class ErrorBoundary extends Component {
22
- state = { error: null };
23
- static getDerivedStateFromError(error) {
24
- return { error };
19
+ state = { hasError: false };
20
+ static getDerivedStateFromError() {
21
+ return { hasError: true };
25
22
  }
26
23
  componentDidCatch(error, info) {
27
24
  this.props.onError?.(error, info);
28
25
  }
29
26
  retry = () => {
30
- this.setState({ error: null });
27
+ this.setState({ hasError: false });
31
28
  };
32
29
  reload = () => {
33
30
  window.location.reload();
34
31
  };
35
32
  render() {
36
- if (!this.state.error)
33
+ if (!this.state.hasError)
37
34
  return this.props.children;
38
35
  return (_jsx(ErrorFallback, { message: this.props.message, onRetry: this.retry, onReload: this.reload }));
39
36
  }
package/dist/field.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useMemo } from "react";
4
4
  import { cva } from "class-variance-authority";
5
- import { errorText, labelText } from "./internal/styles.js";
5
+ import { errorText, labelText, selectedState } from "./internal/styles.js";
6
6
  import { cn } from "./utils.js";
7
7
  import { Label } from "./label.js";
8
8
  import { Separator } from "./separator.js";
@@ -47,7 +47,7 @@ function FieldContent({ className, ...props }) {
47
47
  return (_jsx("div", { "data-slot": "field-content", className: cn("group/field-content flex flex-1 flex-col gap-1 leading-snug", className), ...props }));
48
48
  }
49
49
  function FieldLabel({ className, ...props }) {
50
- return (_jsx(Label, { "data-slot": "field-label", className: cn("group/field-label peer/field-label flex w-fit gap-2 leading-relaxed group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-selected has-[>[data-slot=field]]:rounded-none has-[>[data-slot=field]]:border *:data-[slot=field]:p-4 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-selected", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col", className), ...props }));
50
+ return (_jsx(Label, { "data-slot": "field-label", className: cn("group/field-label peer/field-label flex w-fit gap-2 leading-relaxed group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-none has-[>[data-slot=field]]:border *:data-[slot=field]:p-4", selectedState.checkedWithin, "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col", className), ...props }));
51
51
  }
52
52
  function FieldTitle({ className, ...props }) {
53
53
  return (_jsx("div", { "data-slot": "field-label", className: cn(labelText, "flex w-fit items-center gap-2 group-data-[disabled=true]/field:opacity-50 in-data-[slot=field-label]:font-semibold", className), ...props }));
@@ -25,6 +25,7 @@ export declare const fieldSurface = "w-full min-w-0 rounded-none border border-i
25
25
  * the wash alone is 1.2:1 against the page. One string per state attribute.
26
26
  */
27
27
  export declare const selectedState: {
28
+ checkedWithin: string;
28
29
  /**
29
30
  * Toggle and ToggleGroupItem. Radix Toggle sets `data-state=on` and
30
31
  * `aria-pressed`; group items always set `data-state=on`, add
@@ -25,6 +25,7 @@ export const fieldSurface = "w-full min-w-0 rounded-none border border-input bg-
25
25
  * the wash alone is 1.2:1 against the page. One string per state attribute.
26
26
  */
27
27
  export const selectedState = {
28
+ checkedWithin: "has-data-checked:border-selected-foreground has-data-checked:bg-selected has-data-checked:text-selected-foreground",
28
29
  /**
29
30
  * Toggle and ToggleGroupItem. Radix Toggle sets `data-state=on` and
30
31
  * `aria-pressed`; group items always set `data-state=on`, add
@@ -60,10 +60,14 @@ const tabsTriggerVariants = cva([
60
60
  // flex-none + px-4: every trigger and TabsNav link keeps the same
61
61
  // horizontal padding. flex-1 used to grow short labels and make the
62
62
  // longest (e.g. Apple Reminders) look tighter. No last-child padding.
63
- 'relative inline-flex h-full min-w-max flex-none items-center justify-center gap-2 border border-transparent px-4 py-1.5 text-xs font-semibold tracking-wider whitespace-nowrap text-foreground/60 uppercase transition-all group-data-[orientation="vertical"]/tabs:w-full group-data-[orientation="vertical"]/tabs:justify-start group-data-[orientation="vertical"]/tabs:px-4 group-data-[orientation="vertical"]/tabs:py-2 hover:text-foreground has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5 dark:text-muted-foreground dark:hover:text-foreground',
63
+ // py-0: h-full already fills the h-7 row. py-1.5 plus the 16px line
64
+ // and 1px border needed ~32px, so the 28px list overflowed on y.
65
+ 'relative inline-flex h-full min-w-max flex-none items-center justify-center gap-2 border border-transparent px-4 py-0 text-xs font-semibold tracking-wider whitespace-nowrap text-foreground/60 uppercase transition-all group-data-[orientation="vertical"]/tabs:w-full group-data-[orientation="vertical"]/tabs:justify-start group-data-[orientation="vertical"]/tabs:px-4 group-data-[orientation="vertical"]/tabs:py-2 hover:text-foreground has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5 dark:text-muted-foreground dark:hover:text-foreground',
64
66
  inlineIcon.default,
65
67
  'group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state="active"]:border-transparent group-data-[variant=line]/tabs-list:data-[state="active"]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state="active"]:bg-transparent',
66
68
  selectedState.active,
67
- 'after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation="horizontal"]/tabs:after:inset-x-0 group-data-[orientation="horizontal"]/tabs:after:bottom-[-5px] group-data-[orientation="horizontal"]/tabs:after:h-0.5 group-data-[orientation="vertical"]/tabs:after:inset-y-0 group-data-[orientation="vertical"]/tabs:after:-right-1 group-data-[orientation="vertical"]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state="active"]:after:opacity-100',
69
+ // The line-variant bar stays inside the trigger. Hanging it at
70
+ // bottom-[-5px] made the 28px list's scrollHeight 32 even with py-0.
71
+ 'after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation="horizontal"]/tabs:after:inset-x-0 group-data-[orientation="horizontal"]/tabs:after:bottom-0 group-data-[orientation="horizontal"]/tabs:after:h-0.5 group-data-[orientation="vertical"]/tabs:after:inset-y-0 group-data-[orientation="vertical"]/tabs:after:right-0 group-data-[orientation="vertical"]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state="active"]:after:opacity-100',
68
72
  ]);
69
73
  export { tabsListVariants, tabsScrollerVariants, tabsTriggerVariants };
package/dist/kanban.js CHANGED
@@ -7,7 +7,7 @@ import { CheckCircle2, ChevronLeft, ChevronRight, GripVertical, Trash2, } from "
7
7
  import { Button } from "./button.js";
8
8
  import { KANBAN_COMPLETE_ID, KANBAN_DELETE_ID, buildKanbanGroups, kanbanOverflowEdges, kanbanScrollBy, resolveKanbanDrop, } from "./internal/kanban-layout.js";
9
9
  import { configureCardSortablePlugins, configureKanbanPlugins, } from "./internal/kanban-plugins.js";
10
- import { focusRingWithin } from "./internal/styles.js";
10
+ import { focusRing } from "./internal/styles.js";
11
11
  import { revealInline } from "./internal/use-horizontal-overflow.js";
12
12
  import { Skeleton } from "./skeleton.js";
13
13
  import { cn } from "./utils.js";
@@ -134,6 +134,7 @@ function KanbanColumnView({ column, count, emptyLabel, loading, className, child
134
134
  }
135
135
  const cardChrome = cn("flex border border-border bg-card text-card-foreground");
136
136
  const handleChrome = cn("flex shrink-0 items-center self-stretch border-r border-border", "bg-muted/30 px-1.5 text-muted-foreground");
137
+ const stopFocus = cn(focusRing, "relative focus-visible:z-10");
137
138
  function stopClick(event) {
138
139
  event.stopPropagation();
139
140
  }
@@ -150,9 +151,7 @@ function KanbanCardViewImpl({ item, index, column, onCardClick, className, rende
150
151
  });
151
152
  return (_jsxs("div", { ref: ref, "data-slot": "kanban-card", "data-dragging": isDragging || undefined, className: cn(cardChrome, "shadow-sm transition-[box-shadow,opacity,border-color]",
152
153
  // The overlay moves; the source keeps its slot.
153
- "data-dragging:pointer-events-none data-dragging:invisible",
154
- // One ring on the card for the grip and the body alike.
155
- focusRingWithin, onCardClick && "hover:border-foreground/15", className), children: [_jsx("button", { type: "button", ref: handleRef, "data-slot": "kanban-card-handle", "aria-label": "Drag to move", onClick: stopClick, className: cn(handleChrome, "cursor-grab outline-none hover:bg-muted/50 active:cursor-grabbing"), children: _jsx(GripVertical, { className: "size-4", "aria-hidden": true }) }), onCardClick ? (_jsx("button", { type: "button", "data-slot": "kanban-card-body", onClick: () => onCardClick(item), className: "min-w-0 flex-1 cursor-pointer p-3 text-left outline-none hover:bg-muted/20", children: children })) : (_jsx("div", { "data-slot": "kanban-card-body", className: "min-w-0 flex-1 p-3", children: children }))] }));
154
+ "data-dragging:pointer-events-none data-dragging:invisible", onCardClick && "hover:border-foreground/15", className), children: [_jsx("button", { type: "button", ref: handleRef, "data-slot": "kanban-card-handle", "aria-label": "Drag to move", onClick: stopClick, className: cn(handleChrome, stopFocus, "cursor-grab hover:bg-muted/50 active:cursor-grabbing"), children: _jsx(GripVertical, { className: "size-4", "aria-hidden": true }) }), onCardClick ? (_jsx("button", { type: "button", "data-slot": "kanban-card-body", onClick: () => onCardClick(item), className: cn("min-w-0 flex-1 cursor-pointer p-3 text-left hover:bg-muted/20", stopFocus), children: children })) : (_jsx("div", { "data-slot": "kanban-card-body", className: "min-w-0 flex-1 p-3", children: children }))] }));
156
155
  }
157
156
  /**
158
157
  * Memoized so a board update re-renders only the cards whose item, index or
package/dist/markdown.js CHANGED
@@ -35,7 +35,7 @@ const markdownComponents = {
35
35
  h3: ({ children }) => (_jsx("h3", { className: headingClass("text-base"), children: children })),
36
36
  p: ({ children }) => _jsx("p", { className: "text-sm leading-relaxed", children: children }),
37
37
  ul: ({ children }) => (_jsx("ul", { className: "list-disc space-y-1 pl-5 text-sm", children: children })),
38
- ol: ({ children }) => (_jsx("ol", { className: "list-decimal space-y-1 pl-5 text-sm", children: children })),
38
+ ol: ({ children, start }) => (_jsx("ol", { start: start, className: "list-decimal space-y-1 pl-5 text-sm", children: children })),
39
39
  li: ({ children }) => _jsx("li", { className: "leading-relaxed", children: children }),
40
40
  blockquote: ({ children }) => (_jsx("blockquote", { className: "border-l-2 border-input pl-3 text-sm text-muted-foreground", children: children })),
41
41
  a: ({ href, children }) => href ? (_jsx("a", { href: href, className: "text-selected-foreground underline underline-offset-2", ...(href.startsWith("http")
@@ -4,6 +4,7 @@ import * as React from "react";
4
4
  import { Input } from "./input.js";
5
5
  import { Label } from "./label.js";
6
6
  import { handleListboxKey } from "./internal/listbox-navigation.js";
7
+ import { clamp } from "./internal/math.js";
7
8
  import { Listbox, ListboxEmptyStatus, listboxInputAria, PickerOption, } from "./internal/listbox-option.js";
8
9
  import { createSearchIndex, filterSearchIndex, foldSearchText, normalizeSearchQuery, } from "./internal/search.js";
9
10
  import { cn, onInputChange } from "./utils.js";
@@ -42,10 +43,9 @@ function SearchPicker({ items, getValue, getLabel, filter = defaultSearchFilter,
42
43
  return index >= 0 ? index : 0;
43
44
  }, [filtered, getValue, value]);
44
45
  const rows = React.useMemo(() => filtered.map((item) => ({ item, value: getValue(item) })), [filtered, getValue]);
45
- const [highlight, setHighlight] = React.useState(selectedIndex);
46
- // Reset the highlight while rendering, not in an effect, when the query or
47
- // the selected row changes: an effect commits every keystroke twice, once
48
- // with the stale highlight and again with the reset.
46
+ const [highlightIndex, setHighlight] = React.useState(selectedIndex);
47
+ const highlight = clamp(highlightIndex, 0, Math.max(0, filtered.length - 1));
48
+ // Reset during render so a query or selection change commits only once.
49
49
  const [highlightFor, setHighlightFor] = React.useState({
50
50
  query,
51
51
  selectedIndex,
package/dist/switch.js CHANGED
@@ -10,6 +10,6 @@ import { cn } from "./utils.js";
10
10
  * primitives; checked uses the primary fill, as `Checkbox` does.
11
11
  */
12
12
  function Switch({ className, ...props }) {
13
- return (_jsx(SwitchPrimitive.Root, { "data-slot": "switch", className: cn(focusRing, invalidState, disabledState, choiceHitArea, "peer relative inline-flex h-5 w-9 shrink-0 items-center rounded-none border border-transparent bg-input p-0.5 shadow-xs transition-colors data-checked:bg-primary dark:data-checked:bg-primary", className), ...props, children: _jsx(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: "pointer-events-none block size-3.5 rounded-none bg-background shadow-sm ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground" }) }));
13
+ return (_jsx(SwitchPrimitive.Root, { "data-slot": "switch", className: cn(focusRing, invalidState, disabledState, choiceHitArea, "peer relative inline-flex h-5 w-9 shrink-0 items-center rounded-none border border-transparent bg-input p-0.5 shadow-xs transition-colors data-checked:bg-primary", className), ...props, children: _jsx(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: "pointer-events-none block size-3.5 rounded-none bg-background shadow-sm ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground" }) }));
14
14
  }
15
15
  export { Switch };
package/dist/toast.js CHANGED
@@ -56,7 +56,7 @@ const toast = Object.assign(show(sonnerToast), {
56
56
  * so the status icon and copy read as one unit.
57
57
  */
58
58
  const classNames = {
59
- toast: cn(focusRing, "relative flex w-max max-w-[min(356px,calc(100vw-2rem))] flex-wrap items-center justify-end gap-x-2.5 gap-y-2 overflow-visible rounded-none border border-border bg-popover py-3 pl-4 pr-10 text-sm text-popover-foreground shadow-md focus-visible:!shadow-[var(--tw-ring-offset-shadow),var(--tw-ring-shadow)] data-[visible=false]:invisible data-[expanded=false]:data-[front=false]:*:invisible"),
59
+ toast: cn(focusRing, "relative flex w-max max-w-[min(356px,calc(100vw-2rem))] max-[600px]:!w-full flex-wrap items-center justify-end gap-x-2.5 gap-y-2 overflow-visible rounded-none border border-border bg-popover py-3 pl-4 pr-10 text-sm text-popover-foreground shadow-md focus-visible:!shadow-[var(--tw-ring-offset-shadow),var(--tw-ring-shadow)] data-[visible=false]:invisible data-[expanded=false]:data-[front=false]:*:invisible"),
60
60
  // Fills the row beside the icon, so action buttons wrap to their own row
61
61
  // (aligned right by the toast's justify-end). Without an icon the basis
62
62
  // falls back to the title's width, so a one-word toast stays compact.
@@ -95,6 +95,9 @@ const Toaster = ({ position, closeButton = true, expand, visibleToasts, duration
95
95
  setFocusWithin(false);
96
96
  }
97
97
  };
98
- return (_jsx("div", { "data-slot": "toaster", className: "contents", onFocus: () => setFocusWithin(true), onBlur: onBlur, children: _jsx(Sonner, { theme: theme, className: "toaster group overflow-visible", style: { fontFamily: "var(--font-sans)" }, position: position, closeButton: closeButton, expand: expand || focusWithin, visibleToasts: visibleToasts, duration: duration, icons: icons, toastOptions: { unstyled: true, classNames } }) }));
98
+ return (_jsx("div", { "data-slot": "toaster", className: "contents", onFocus: () => setFocusWithin(true), onBlur: onBlur, children: _jsx(Sonner, { theme: theme, className: "toaster group overflow-visible", style: {
99
+ fontFamily: "var(--font-sans)",
100
+ maxWidth: "calc(100vw - 2rem)",
101
+ }, position: position, closeButton: closeButton, expand: expand || focusWithin, visibleToasts: visibleToasts, duration: duration, icons: icons, toastOptions: { unstyled: true, classNames } }) }));
99
102
  };
100
103
  export { Toaster, toast };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atlas-react-kit",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "description": "Shared React components and Tailwind theme for Atlas",
5
5
  "type": "module",
6
6
  "license": "MIT",