@k2b/ui 0.47.0 → 0.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/dist/browser/actions/CopyButton.js +26 -18
  2. package/dist/browser/actions/CopyButton.js.map +1 -1
  3. package/dist/browser/chat/ChatComposer.js +244 -193
  4. package/dist/browser/chat/ChatComposer.js.map +1 -1
  5. package/dist/browser/chat/chat-messages.js +6 -0
  6. package/dist/browser/chat/chat-messages.js.map +1 -1
  7. package/dist/browser/chat/types.js.map +1 -1
  8. package/dist/browser/content/Calendar.js +40 -5
  9. package/dist/browser/content/Calendar.js.map +1 -1
  10. package/dist/browser/content/calendar-event-detail.js +328 -0
  11. package/dist/browser/content/calendar-event-detail.js.map +1 -0
  12. package/dist/browser/content/calendar-messages.js +34 -2
  13. package/dist/browser/content/calendar-messages.js.map +1 -1
  14. package/dist/browser/content/calendar-shared.js +189 -82
  15. package/dist/browser/content/calendar-shared.js.map +1 -1
  16. package/dist/browser/content/calendar-time-view.js +101 -96
  17. package/dist/browser/content/calendar-time-view.js.map +1 -1
  18. package/dist/browser/content/index.js.map +1 -1
  19. package/dist/browser/feedback/prompt-confirm.js +7 -4
  20. package/dist/browser/feedback/prompt-confirm.js.map +1 -1
  21. package/dist/browser/feedback/prompts.js +3 -3
  22. package/dist/browser/feedback/prompts.js.map +1 -1
  23. package/dist/browser/inputs/NumberInput.js +17 -5
  24. package/dist/browser/inputs/NumberInput.js.map +1 -1
  25. package/dist/browser/inputs/dictation/Dictation.js +114 -108
  26. package/dist/browser/inputs/dictation/Dictation.js.map +1 -1
  27. package/dist/browser/inputs/dictation/dictation-messages.js +2 -0
  28. package/dist/browser/inputs/dictation/dictation-messages.js.map +1 -1
  29. package/dist/browser/layout/AppWorkspace.js +574 -522
  30. package/dist/browser/layout/AppWorkspace.js.map +1 -1
  31. package/dist/browser/layout/MobileShell.js +26 -0
  32. package/dist/browser/layout/MobileShell.js.map +1 -1
  33. package/dist/browser/layout/index.js +1 -0
  34. package/dist/browser/layout/index.js.map +1 -1
  35. package/dist/browser/layout/sheet-handle.js +155 -0
  36. package/dist/browser/layout/sheet-handle.js.map +1 -0
  37. package/dist/browser/surfaces/NoticeCard.js +48 -29
  38. package/dist/browser/surfaces/NoticeCard.js.map +1 -1
  39. package/dist/ssr/actions/CopyButton.js +13 -8
  40. package/dist/ssr/actions/CopyButton.js.map +1 -1
  41. package/dist/ssr/chat/ChatComposer.js +53 -30
  42. package/dist/ssr/chat/ChatComposer.js.map +1 -1
  43. package/dist/ssr/chat/chat-messages.js +6 -0
  44. package/dist/ssr/chat/chat-messages.js.map +1 -1
  45. package/dist/ssr/chat/types.js.map +1 -1
  46. package/dist/ssr/content/Calendar.js +36 -4
  47. package/dist/ssr/content/Calendar.js.map +1 -1
  48. package/dist/ssr/content/calendar-event-detail.js +212 -0
  49. package/dist/ssr/content/calendar-event-detail.js.map +1 -0
  50. package/dist/ssr/content/calendar-messages.js +34 -2
  51. package/dist/ssr/content/calendar-messages.js.map +1 -1
  52. package/dist/ssr/content/calendar-shared.js +117 -36
  53. package/dist/ssr/content/calendar-shared.js.map +1 -1
  54. package/dist/ssr/content/calendar-time-view.js +6 -4
  55. package/dist/ssr/content/calendar-time-view.js.map +1 -1
  56. package/dist/ssr/content/index.js.map +1 -1
  57. package/dist/ssr/feedback/prompt-confirm.js +7 -4
  58. package/dist/ssr/feedback/prompt-confirm.js.map +1 -1
  59. package/dist/ssr/feedback/prompts.js +3 -3
  60. package/dist/ssr/feedback/prompts.js.map +1 -1
  61. package/dist/ssr/inputs/NumberInput.js +17 -5
  62. package/dist/ssr/inputs/NumberInput.js.map +1 -1
  63. package/dist/ssr/inputs/dictation/Dictation.js +3 -1
  64. package/dist/ssr/inputs/dictation/Dictation.js.map +1 -1
  65. package/dist/ssr/inputs/dictation/dictation-messages.js +2 -0
  66. package/dist/ssr/inputs/dictation/dictation-messages.js.map +1 -1
  67. package/dist/ssr/layout/AppWorkspace.js +152 -114
  68. package/dist/ssr/layout/AppWorkspace.js.map +1 -1
  69. package/dist/ssr/layout/MobileShell.js +26 -0
  70. package/dist/ssr/layout/MobileShell.js.map +1 -1
  71. package/dist/ssr/layout/index.js +1 -0
  72. package/dist/ssr/layout/index.js.map +1 -1
  73. package/dist/ssr/layout/sheet-handle.js +155 -0
  74. package/dist/ssr/layout/sheet-handle.js.map +1 -0
  75. package/dist/ssr/surfaces/NoticeCard.js +25 -10
  76. package/dist/ssr/surfaces/NoticeCard.js.map +1 -1
  77. package/dist/styles.css +1 -1
  78. package/dist/types/chat/chat-messages.d.ts +3 -0
  79. package/dist/types/chat/types.d.ts +5 -0
  80. package/dist/types/content/Calendar.d.ts +29 -5
  81. package/dist/types/content/calendar-event-detail.d.ts +21 -0
  82. package/dist/types/content/calendar-messages.d.ts +16 -0
  83. package/dist/types/content/calendar-shared.d.ts +16 -1
  84. package/dist/types/content/calendar-time-view.d.ts +1 -1
  85. package/dist/types/content/index.d.ts +1 -1
  86. package/dist/types/feedback/prompt-confirm.d.ts +3 -1
  87. package/dist/types/feedback/prompts.d.ts +2 -2
  88. package/dist/types/inputs/NumberInput.d.ts +1 -1
  89. package/dist/types/inputs/dictation/dictation-messages.d.ts +1 -0
  90. package/dist/types/layout/AppWorkspace.d.ts +16 -1
  91. package/dist/types/layout/MobileShell.d.ts +5 -0
  92. package/dist/types/layout/index.d.ts +2 -1
  93. package/dist/types/layout/sheet-handle.d.ts +21 -0
  94. package/dist/types/surfaces/NoticeCard.d.ts +5 -2
  95. package/package.json +1 -1
@@ -134,6 +134,9 @@ export declare const chatMessages: import("@k2b/stdlib").Catalog<{
134
134
  openInNewTab: ({ name }: {
135
135
  name: string;
136
136
  }) => string;
137
+ uploading: ({ name }: {
138
+ name: string;
139
+ }) => string;
137
140
  retryOlderMessages: string;
138
141
  sendMessage: string;
139
142
  startConversation: string;
@@ -88,6 +88,11 @@ export type ChatAttachment = {
88
88
  data?: unknown;
89
89
  /** Optional application-owned action presented below the attachment label. */
90
90
  action?: ChatAction;
91
+ /**
92
+ * Upload progress in percent while the attachment uploads, such as a draft that saves its files before sending. The
93
+ * line below the label shows a ring and the percentage instead of `action`.
94
+ */
95
+ progress?: number;
91
96
  };
92
97
  export type ChatUsage = {
93
98
  input?: number;
@@ -13,12 +13,23 @@ export type CalendarEvent = {
13
13
  color?: CalendarEventColor;
14
14
  colorHex?: string;
15
15
  href?: string;
16
- dataSpaceItemId?: string;
16
+ /**
17
+ * Host data for the entry's element: each key becomes a `data-*` attribute, `spaceItemId` as `data-space-item-id`.
18
+ * Keys must be camelCase letters and digits; keys that start with `calendar` belong to the calendar and are left out.
19
+ */
20
+ data?: Record<string, string>;
21
+ /** A Tabler icon class such as `"ti ti-truck"`, drawn before the title in the color of the entry's edge. */
22
+ icon?: string;
23
+ /**
24
+ * Links that belong to the entry, such as an order or a video room. They show in the entry's detail, and week, day,
25
+ * and the day list show how many there are; an entry never nests them, since it is a link or button itself.
26
+ */
27
+ links?: CalendarEventLink[];
17
28
  meta?: string;
18
29
  description?: string;
19
30
  /**
20
- * `marker` draws a point in time, such as a deadline, as a colored marker
21
- * beside its title instead of a filled band.
31
+ * `marker` draws a point in time, such as a deadline, with a dashed edge in
32
+ * its color instead of a filled band.
22
33
  */
23
34
  display?: "event" | "background" | "marker";
24
35
  /**
@@ -27,20 +38,33 @@ export type CalendarEvent = {
27
38
  */
28
39
  accessibleDetail?: string;
29
40
  /**
30
- * Day and week views with `dayHours`: the state of the entry's checkbox, such as a to-do's. Leave it out for entries
31
- * without one. With `onEventCheck` the reader can change it.
41
+ * The state of a to-do or deadline, such as a task's. Leave it out for entries without one. `true` strikes the title
42
+ * through in every view; `false` turns the entry red once it lies in the past. The day and week views with
43
+ * `dayHours` draw a checkbox, and with `onEventCheck` the reader can change it.
32
44
  */
33
45
  checked?: boolean;
34
46
  location?: string;
35
47
  calendarName?: string;
48
+ /**
49
+ * The people of the entry. Week and day show up to three faces and then "+n", the day list one, and the compact
50
+ * month none; the detail lists them all. Without `src` a face shows initials.
51
+ */
36
52
  attendees?: CalendarAttendee[];
37
53
  resources?: CalendarResource[];
38
54
  recurrence?: CalendarRecurrence;
39
55
  };
40
56
  export type CalendarAttendee = {
41
57
  name: string;
58
+ /** A picture of the person; without it the face shows initials. */
59
+ src?: string;
42
60
  status?: "accepted" | "declined" | "tentative" | "needs-action";
43
61
  };
62
+ export type CalendarEventLink = {
63
+ label: string;
64
+ href: string;
65
+ /** A Tabler icon class before the label; a link icon by default. */
66
+ icon?: string;
67
+ };
44
68
  export type CalendarResource = {
45
69
  name: string;
46
70
  kind?: "room" | "equipment" | "link" | "other";
@@ -0,0 +1,21 @@
1
+ import type { JSX } from "solid-js";
2
+ import type { CalendarEvent } from "./Calendar";
3
+ import { type CalendarOwner } from "./calendar-shared";
4
+ /** The entry the calendar's own detail shows, and the element that opened it, where the focus returns. */
5
+ export type CalendarDetailState = {
6
+ event: CalendarEvent & {
7
+ sourceStartDate?: Date;
8
+ sourceEndDate?: Date;
9
+ };
10
+ anchor: HTMLElement;
11
+ };
12
+ /**
13
+ * The calendar's own detail of an entry, for hosts without `onEventActivate`: its time, place, people, and links, and
14
+ * "Open" for its `href`. It lies beside the entry, and on a phone it rises from the bottom. Escape and a click outside
15
+ * close it, and the focus goes back to the entry.
16
+ */
17
+ export declare const CalendarEventDetail: (props: {
18
+ owner: CalendarOwner;
19
+ state: CalendarDetailState | null;
20
+ onClose: () => void;
21
+ }) => JSX.Element;
@@ -151,6 +151,22 @@ declare const calendarMessages: import("@k2b/stdlib").Catalog<{
151
151
  calendarGoToHint: string;
152
152
  calendarGoToUnknown: string;
153
153
  calendarGoToGo: string;
154
+ calendarStateDone: string;
155
+ calendarStateOverdue: string;
156
+ calendarOverdue: string;
157
+ calendarDoneState: string;
158
+ calendarPeopleCount: ({ count }: {
159
+ count: number;
160
+ }) => string;
161
+ calendarLinkCount: ({ count }: {
162
+ count: number;
163
+ }) => string;
164
+ calendarPeople: string;
165
+ calendarLinks: string;
166
+ calendarOpenEvent: string;
167
+ calendarEventDetail: ({ title }: {
168
+ title: string;
169
+ }) => string;
154
170
  }>;
155
171
  export type CalendarMessages = ReturnType<(typeof calendarMessages)["resolve"]>["t"];
156
172
  /** Resolved from the inherited render locale, like the rest of @k2b/ui. */
@@ -16,7 +16,18 @@ export type CalendarStop = {
16
16
  minute: number;
17
17
  };
18
18
  /** What the built-in views read from the props: they only ever link to built-in views. */
19
- export type CalendarOwner = Omit<CalendarProps, "view" | "customViews" | "children">;
19
+ export type CalendarOwner = Omit<CalendarProps, "view" | "customViews" | "children"> & {
20
+ /** The calendar's clock, which ticks every minute; an open entry in the past is overdue. */
21
+ calendarNow?: () => Date;
22
+ /** Without `onEventActivate`: opens the calendar's own detail of an entry beside the element that opened it. */
23
+ openEventDetail?: (event: CalendarEvent, anchor: HTMLElement) => void;
24
+ };
25
+ export declare const eventDataAttributes: (data: CalendarEvent["data"]) => Record<string, string>;
26
+ /** An open to-do or deadline whose time has passed. */
27
+ export declare const isOverdue: (event: CalendarEvent & {
28
+ sourceStartDate?: Date;
29
+ sourceEndDate?: Date;
30
+ }, now: Date | undefined) => boolean;
20
31
  export declare const ownerDateConfig: (owner: CalendarOwner) => DateContext;
21
32
  export declare const parseDate: (value: Date | string, context?: DateContext) => Date;
22
33
  export declare const validDate: (value: Date) => boolean;
@@ -64,6 +75,10 @@ export declare const EventChip: (props: {
64
75
  /** Day and week views: Space on the chip checks the box the calendar draws beside it, as on the box itself. */
65
76
  onCheck?: () => void;
66
77
  onMovePointerDown?: (event: PointerEvent, onActivate: () => void) => void;
78
+ /** How many faces of the attendees fit: up to three in a band, one in the day list, none by default. */
79
+ faces?: number;
80
+ /** Shows how many links the entry has, where there is room beside the title or time. */
81
+ linkCount?: boolean;
67
82
  }) => JSX.Element;
68
83
  /** The width of a text in a font, from a canvas, so a bar can tell whether its title leaves room for a date hint. */
69
84
  export declare const textWidth: (text: string, font: string) => number;
@@ -156,7 +156,7 @@ export declare const compactGermanDate: (text: string, locale: string | undefine
156
156
  export declare const shortDay: (view: TimeView, key: string, withMonth?: boolean) => string;
157
157
  /** A long day such as "Friday, October 9", with the year when it is not this year's. */
158
158
  export declare const longDay: (view: TimeView, key: string) => string;
159
- /** A to-do's checkbox: it draws its check, and the title beside it strikes through. */
159
+ /** A to-do's check: a small ring in the entry's color before its title that fills when done; the title strikes through. */
160
160
  export declare const TimeCheck: (props: {
161
161
  view: TimeView;
162
162
  event: CalendarEvent;
@@ -1,4 +1,4 @@
1
- export type { CalendarAttendee, CalendarCommand, CalendarController, CalendarCustomView, CalendarDayBadge, CalendarEvent, CalendarEventColor, CalendarEventRenderContext, CalendarEventTimeChange, CalendarExternalDrag, CalendarLabels, CalendarProps, CalendarQuickCreateControls, CalendarRange, CalendarRecurrence, CalendarResource, CalendarSelectionControls, CalendarView, } from "./Calendar";
1
+ export type { CalendarAttendee, CalendarCommand, CalendarController, CalendarCustomView, CalendarDayBadge, CalendarEvent, CalendarEventColor, CalendarEventLink, CalendarEventRenderContext, CalendarEventTimeChange, CalendarExternalDrag, CalendarLabels, CalendarProps, CalendarQuickCreateControls, CalendarRange, CalendarRecurrence, CalendarResource, CalendarSelectionControls, CalendarView, } from "./Calendar";
2
2
  export { default as Calendar } from "./Calendar";
3
3
  export type { ChartKind, ChartLabels, ChartProps, ChartRenderOptions } from "./Chart";
4
4
  export { default as Chart } from "./Chart";
@@ -2,8 +2,10 @@ import { type JSX } from "solid-js";
2
2
  import { type DialogTone } from "./dialog-tone";
3
3
  import type { ConfirmOptions, DialogOptions } from "./prompts";
4
4
  export type PromptContent = string | HTMLElement | JSX.Element;
5
- /** A prompt's `variant` is its tone too: a success or danger prompt carries the dialog tone of that name. */
5
+ /** A prompt's `variant` is its tone too: a success, warning or danger prompt carries the dialog tone of that name. */
6
6
  export declare const promptTone: (variant: DialogOptions["variant"]) => DialogTone | undefined;
7
+ /** A warning asks for care, not for a destructive act: its confirm button stays primary. */
8
+ export declare const promptButtonVariant: (variant: DialogOptions["variant"]) => "danger" | "primary" | "success";
7
9
  export declare const DialogHeader: (props: {
8
10
  close: () => void;
9
11
  title?: string;
@@ -9,7 +9,7 @@ export interface DialogOptions {
9
9
  icon?: string;
10
10
  confirmText?: string;
11
11
  cancelText?: string | false;
12
- variant?: "danger" | "primary" | "success";
12
+ variant?: "danger" | "primary" | "success" | "warning";
13
13
  /** `full` fills the available viewport and becomes edge-to-edge on narrow screens. */
14
14
  size?: "small" | "medium" | "large" | "wide" | "full";
15
15
  surface?: "default" | "bare";
@@ -143,7 +143,7 @@ type PromptFormOptions<T extends Record<string, FieldSchema>> = {
143
143
  fields: T;
144
144
  confirmText?: string;
145
145
  cancelText?: string | false;
146
- variant?: "danger" | "primary" | "success";
146
+ variant?: "danger" | "primary" | "success" | "warning";
147
147
  size?: DialogOptions["size"];
148
148
  cancelBehavior?: DialogOptions["cancelBehavior"];
149
149
  };
@@ -6,7 +6,7 @@ export type NumberInputProps = Omit<JSX.InputHTMLAttributes<HTMLInputElement>, "
6
6
  min?: number;
7
7
  /** Stepper increment and commit grid; defaults to `1`. A fractional step also sets the default `decimalPlaces`. */
8
8
  step?: number;
9
- /** Accepted fraction digits. Defaults to the fraction digits of `step` (`0.01` → `2`, `1` → `0`); an explicit value wins. */
9
+ /** Accepted and displayed fraction digits. Defaults to the fraction digits of `step` (`0.01` → `2`, `1` → `0`); an explicit value wins. */
10
10
  decimalPlaces?: number;
11
11
  allowNegative?: boolean;
12
12
  clearable?: boolean;
@@ -31,6 +31,7 @@ export declare const dictationMessages: import("@k2b/stdlib").Catalog<{
31
31
  blockedBody: string;
32
32
  blockedStep1: string;
33
33
  blockedStep2: string;
34
+ blockedApp: string;
34
35
  retry: string;
35
36
  quotaTitle: string;
36
37
  quotaBody: ({ time }: {
@@ -2,6 +2,7 @@ import { type AppWorkspaceSidebarItemStatusProps } from "./AppWorkspaceSidebarIt
2
2
  export type { AppWorkspaceSidebarItemStatusProps } from "./AppWorkspaceSidebarItemStatus";
3
3
  import { type LinkNavigateEvent, type NavigationScrollMode } from "@k2b/ssr/nav";
4
4
  import { type JSX } from "solid-js";
5
+ import { type DropdownItem, type DropdownSearch } from "../actions/Dropdown";
5
6
  import { type AppWorkspaceLayoutState } from "./app-workspace-state";
6
7
  import { type AppWorkspaceWidthShare } from "./app-workspace-width";
7
8
  import type { ScrollAreaProps } from "./ScrollArea";
@@ -118,6 +119,12 @@ export type AppWorkspaceMainPaneProps = {
118
119
  };
119
120
  /** Controls at the end of the level head. */
120
121
  actions?: JSX.Element;
122
+ /**
123
+ * Levels mode: the title opens a menu of places to switch to, such as the person's work and each Space; on a phone
124
+ * it opens as a sheet. The title stays the level's heading and gains a chevron; the server HTML already says that
125
+ * it opens a menu.
126
+ */
127
+ switcher?: AppWorkspaceLevelSwitcher;
121
128
  /**
122
129
  * Levels mode: `"page"` marks the level that holds the page itself, such as a settings form or the list of an
123
130
  * area, rather than a column that leads there or a detail beside it. Its title takes the page step of the type
@@ -141,6 +148,13 @@ export type AppWorkspaceMainPaneProps = {
141
148
  scrollFade?: boolean;
142
149
  children: JSX.Element;
143
150
  };
151
+ /** The places a level title switches between; `label` names the menu, such as "Switch Space". */
152
+ export type AppWorkspaceLevelSwitcher = {
153
+ label: string;
154
+ items: readonly DropdownItem[];
155
+ /** A search field above the places, for a long list. */
156
+ search?: DropdownSearch;
157
+ };
144
158
  export type AppWorkspaceDetailWidth = "sm" | "md" | "lg" | "xl";
145
159
  export type AppWorkspaceDetailProps = {
146
160
  children: JSX.Element;
@@ -295,7 +309,8 @@ export type AppWorkspaceSidebarItemProps = {
295
309
  /**
296
310
  * Marks the current page (`aria-current="page"`). On a page deeper than the
297
311
  * sidebar lists, pass `"ancestor"` for the item that contains it: it keeps
298
- * the highlight, and the page keeps its back link.
312
+ * the highlight and, while the sidebar shows, is the way up, so the head
313
+ * drops its back link as beside the current page.
299
314
  */
300
315
  active?: boolean | "ancestor";
301
316
  activeClass?: string;
@@ -43,6 +43,11 @@ export type MobileShellHeaderProps = {
43
43
  /** Controls after the title, such as a menu. */
44
44
  actions?: JSX.Element;
45
45
  };
46
+ /**
47
+ * The height the on-screen keyboard covers at the bottom of the layout viewport, from the visual viewport; zero
48
+ * without a keyboard or without `visualViewport`.
49
+ */
50
+ export declare const keyboardInset: (view: Pick<Window, "innerHeight" | "visualViewport">) => number;
46
51
  /**
47
52
  * Marks the shell around `from` as showing a screen of its own, or not, after the first paint; the server renders
48
53
  * the first state with the `screen` prop. Does nothing outside a shell.
@@ -1,7 +1,7 @@
1
1
  export { AnchoredPopover, type AnchoredPopoverProps } from "./AnchoredPopover";
2
2
  export type { AppOverviewCardsProps, AppOverviewEmptyStateProps, AppOverviewPanelProps, AppOverviewProps, } from "./AppOverview";
3
3
  export { default as AppOverview } from "./AppOverview";
4
- export type { AppWorkspaceBottomDrawerHeight, AppWorkspaceBottomDrawerProps, AppWorkspaceContentProps, AppWorkspaceDetailProps, AppWorkspaceDetailWidth, AppWorkspaceHeadProps, AppWorkspaceMainPaneProps, AppWorkspaceMainProps, AppWorkspaceNavTreeItemProps, AppWorkspaceNavTreeMove, AppWorkspaceNavTreeProps, AppWorkspaceProps, AppWorkspaceSidebarAccessoryVisibility, AppWorkspaceSidebarBodyProps, AppWorkspaceSidebarIconActionProps, AppWorkspaceSidebarIconActionTone, AppWorkspaceSidebarIconGridProps, AppWorkspaceSidebarItemActionProps, AppWorkspaceSidebarItemActionsProps, AppWorkspaceSidebarItemIconProps, AppWorkspaceSidebarItemLabelProps, AppWorkspaceSidebarItemMetaProps, AppWorkspaceSidebarItemProps, AppWorkspaceSidebarItemStatusProps, AppWorkspaceSidebarItemTone, AppWorkspaceSidebarProps, AppWorkspaceSidebarSectionProps, AppWorkspaceSidebarVisibility, AppWorkspaceWidthShare, } from "./AppWorkspace";
4
+ export type { AppWorkspaceBottomDrawerHeight, AppWorkspaceBottomDrawerProps, AppWorkspaceContentProps, AppWorkspaceDetailProps, AppWorkspaceDetailWidth, AppWorkspaceHeadProps, AppWorkspaceLevelSwitcher, AppWorkspaceMainPaneProps, AppWorkspaceMainProps, AppWorkspaceNavTreeItemProps, AppWorkspaceNavTreeMove, AppWorkspaceNavTreeProps, AppWorkspaceProps, AppWorkspaceSidebarAccessoryVisibility, AppWorkspaceSidebarBodyProps, AppWorkspaceSidebarIconActionProps, AppWorkspaceSidebarIconActionTone, AppWorkspaceSidebarIconGridProps, AppWorkspaceSidebarItemActionProps, AppWorkspaceSidebarItemActionsProps, AppWorkspaceSidebarItemIconProps, AppWorkspaceSidebarItemLabelProps, AppWorkspaceSidebarItemMetaProps, AppWorkspaceSidebarItemProps, AppWorkspaceSidebarItemStatusProps, AppWorkspaceSidebarItemTone, AppWorkspaceSidebarProps, AppWorkspaceSidebarSectionProps, AppWorkspaceSidebarVisibility, AppWorkspaceWidthShare, } from "./AppWorkspace";
5
5
  export { appWorkspaceDetailElementId, default as AppWorkspace } from "./AppWorkspace";
6
6
  export { AppWorkspaceSidebarItemStatus } from "./AppWorkspaceSidebarItemStatus";
7
7
  export { watchAppHostWidth } from "./app-host-width";
@@ -50,6 +50,7 @@ export type { SettingsModalFooterProps, SettingsModalGroupProps, SettingsModalPr
50
50
  export { default as SettingsModal } from "./SettingsModal";
51
51
  export { APP_WORKSPACE_SWITCHER_SEARCH_FROM, type AppWorkspaceSidebarSwitcherProps, type AppWorkspaceSwitcherAction, type AppWorkspaceSwitcherOption, } from "./SidebarSwitcher";
52
52
  export { measureScrollFade } from "./scroll-fade";
53
+ export { attachSheetHandle, type SheetHandleOptions } from "./sheet-handle";
53
54
  export type { TabBarItem, TabBarProps } from "./TabBar";
54
55
  export { default as TabBar } from "./TabBar";
55
56
  export type { TableOfContentsItem, TableOfContentsProps } from "./TableOfContents";
@@ -0,0 +1,21 @@
1
+ export type SheetHandleOptions = {
2
+ /** The sheet the handle sits on. It carries the current detent in `data-sheet-detent`. */
3
+ sheet: HTMLElement;
4
+ /** The detents' names, lowest first. The stylesheet gives each `[data-sheet-detent="…"]` its height. */
5
+ detents: readonly string[];
6
+ /** The detent the stylesheet draws while the sheet has no `data-sheet-detent`, such as in the server's markup. */
7
+ initial: string;
8
+ /** After a drag or a press moved the sheet to another detent, for example to rename the handle. */
9
+ onChange?: (detent: string) => void;
10
+ /** Without it, a drag stops at the lowest detent; with it, a drag well below that detent asks to close. */
11
+ onDismiss?: () => void;
12
+ };
13
+ /**
14
+ * Lets a sheet's handle drag it between detents. The handle stays a button: a press, by pointer, Enter or Space,
15
+ * moves the sheet to the next detent up, and from the highest back to the lowest. A drag follows the pointer with an
16
+ * inline height and, on release, snaps to the detent nearest to where the pointer's speed would carry it. The snap
17
+ * animates with the sheet's own height transition, so reduced motion makes it instant. The stylesheet owns every
18
+ * resting height, which keeps the server's first frame and a rotation correct without script; the handle measures
19
+ * them when a drag starts.
20
+ */
21
+ export declare function attachSheetHandle(handle: HTMLElement, options: SheetHandleOptions): () => void;
@@ -14,8 +14,11 @@ type NoticeCardContentProps = {
14
14
  };
15
15
  export type NoticeCardProps = Omit<JSX.HTMLAttributes<HTMLElement>, "children" | "class" | "title"> & NoticeCardContentProps & {
16
16
  tone?: NoticeTone;
17
- /** A Tabler icon class. Turns the notice into a compact status line whose icon and text take the tone colour. */
18
- icon?: string;
17
+ /**
18
+ * A Tabler icon class. Turns the notice into a compact status line whose icon and text take the tone colour. `true`
19
+ * takes the tone's own icon, the one a toned dialog shows, and names the tone for screen readers.
20
+ */
21
+ icon?: string | true;
19
22
  class?: string;
20
23
  bodyClass?: string;
21
24
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k2b/ui",
3
- "version": "0.47.0",
3
+ "version": "0.49.0",
4
4
  "description": "Production-ready components for SolidJS applications.",
5
5
  "repository": {
6
6
  "type": "git",