pixelize-design-library 2.4.2-beta.58 → 2.4.2-beta.60

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 (244) hide show
  1. package/CHANGELOG.md +149 -5
  2. package/COMPONENT-GOTCHAS.md +205 -18
  3. package/DESIGN-GUIDE.md +43 -9
  4. package/dist/Components/AppSwitcher/AppSwitcher.js +5 -1
  5. package/dist/Components/AppSwitcher/AppSwitcherProps.d.ts +2 -0
  6. package/dist/Components/AppSwitcher/AppSwitcherProps.js +7 -4
  7. package/dist/Components/AudioRecorder/AudioRecorder.d.ts +8 -0
  8. package/dist/Components/AudioRecorder/AudioRecorder.js +169 -0
  9. package/dist/Components/AudioRecorder/AudioRecorderProps.d.ts +20 -0
  10. package/dist/Components/AudioRecorder/AudioRecorderProps.js +2 -0
  11. package/dist/Components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
  12. package/dist/Components/Breadcrumbs/Breadcrumbs.js +33 -10
  13. package/dist/Components/Breadcrumbs/BreadcrumbsProps.d.ts +16 -2
  14. package/dist/Components/BulkSelectionBar/BulkSelectionBar.d.ts +3 -0
  15. package/dist/Components/BulkSelectionBar/BulkSelectionBar.js +43 -0
  16. package/dist/Components/BulkSelectionBar/BulkSelectionBarProps.d.ts +35 -0
  17. package/dist/Components/BulkSelectionBar/BulkSelectionBarProps.js +2 -0
  18. package/dist/Components/BulkSelectionBar/index.d.ts +2 -0
  19. package/dist/Components/BulkSelectionBar/index.js +8 -0
  20. package/dist/Components/CalendarGrid/CalendarGrid.d.ts +3 -0
  21. package/dist/Components/CalendarGrid/CalendarGrid.js +173 -0
  22. package/dist/Components/CalendarGrid/CalendarGridProps.d.ts +54 -0
  23. package/dist/Components/CalendarGrid/CalendarGridProps.js +2 -0
  24. package/dist/Components/CalendarGrid/calendarMath.d.ts +49 -0
  25. package/dist/Components/CalendarGrid/calendarMath.js +178 -0
  26. package/dist/Components/Card/Card.d.ts +3 -1
  27. package/dist/Components/Card/Card.js +12 -2
  28. package/dist/Components/Card/CardProps.d.ts +5 -1
  29. package/dist/Components/CircularProgress/CircularProgress.d.ts +4 -0
  30. package/dist/Components/CircularProgress/CircularProgress.js +39 -0
  31. package/dist/Components/CircularProgress/CircularProgressProps.d.ts +22 -0
  32. package/dist/Components/CircularProgress/CircularProgressProps.js +2 -0
  33. package/dist/Components/CircularProgress/arc.d.ts +12 -0
  34. package/dist/Components/CircularProgress/arc.js +16 -0
  35. package/dist/Components/Common/fieldStyles.d.ts +1 -0
  36. package/dist/Components/Common/fieldStyles.js +2 -1
  37. package/dist/Components/Drawer/Drawer.d.ts +1 -1
  38. package/dist/Components/Drawer/Drawer.js +4 -2
  39. package/dist/Components/Drawer/DrawerProps.d.ts +3 -1
  40. package/dist/Components/Editor/Editor.js +50 -2
  41. package/dist/Components/Editor/EditorFieldBar.d.ts +15 -0
  42. package/dist/Components/Editor/EditorFieldBar.js +19 -0
  43. package/dist/Components/Editor/EditorProps.d.ts +74 -1
  44. package/dist/Components/Editor/MakeDynamicDialog.d.ts +12 -0
  45. package/dist/Components/Editor/MakeDynamicDialog.js +59 -0
  46. package/dist/Components/Editor/editorLabels.d.ts +4 -0
  47. package/dist/Components/Editor/editorLabels.js +24 -0
  48. package/dist/Components/Editor/editorTokenStyles.d.ts +28 -0
  49. package/dist/Components/Editor/editorTokenStyles.js +30 -0
  50. package/dist/Components/Editor/editorTokens.d.ts +26 -0
  51. package/dist/Components/Editor/editorTokens.js +134 -0
  52. package/dist/Components/Editor/useEditorBridge.d.ts +40 -0
  53. package/dist/Components/Editor/useEditorBridge.js +141 -0
  54. package/dist/Components/EmptyState/EmptyState.js +2 -1
  55. package/dist/Components/EmptyState/EmptyStateProps.d.ts +2 -2
  56. package/dist/Components/FormDrawer/FormDrawer.d.ts +2 -0
  57. package/dist/Components/FormDrawer/FormDrawer.js +97 -0
  58. package/dist/Components/FormDrawer/FormDrawerProps.d.ts +55 -0
  59. package/dist/Components/FormDrawer/FormDrawerProps.js +2 -0
  60. package/dist/Components/Kbd/Kbd.d.ts +6 -0
  61. package/dist/Components/Kbd/Kbd.js +33 -0
  62. package/dist/Components/Kbd/KbdProps.d.ts +17 -0
  63. package/dist/Components/Kbd/KbdProps.js +2 -0
  64. package/dist/Components/LauncherTrigger/LauncherTrigger.d.ts +4 -0
  65. package/dist/Components/LauncherTrigger/LauncherTrigger.js +48 -0
  66. package/dist/Components/LauncherTrigger/LauncherTriggerProps.d.ts +18 -0
  67. package/dist/Components/LauncherTrigger/LauncherTriggerProps.js +2 -0
  68. package/dist/Components/Modal/Modal.d.ts +1 -1
  69. package/dist/Components/Modal/Modal.js +4 -2
  70. package/dist/Components/Modal/ModalProps.d.ts +3 -1
  71. package/dist/Components/Modal/warnDroppedSlotChildren.d.ts +2 -0
  72. package/dist/Components/Modal/warnDroppedSlotChildren.js +45 -0
  73. package/dist/Components/NavLauncher/NavLauncher.d.ts +3 -0
  74. package/dist/Components/NavLauncher/NavLauncher.js +452 -0
  75. package/dist/Components/NavLauncher/NavLauncherProps.d.ts +187 -0
  76. package/dist/Components/NavLauncher/NavLauncherProps.js +2 -0
  77. package/dist/Components/NavLauncher/NewTabLink.d.ts +3 -0
  78. package/dist/Components/NavLauncher/NewTabLink.js +14 -0
  79. package/dist/Components/NavLauncher/PinToggle.d.ts +3 -0
  80. package/dist/Components/NavLauncher/PinToggle.js +21 -0
  81. package/dist/Components/NavLauncher/launcherParts.d.ts +152 -0
  82. package/dist/Components/NavLauncher/launcherParts.js +212 -0
  83. package/dist/Components/NavLauncher/match.d.ts +53 -0
  84. package/dist/Components/NavLauncher/match.js +178 -0
  85. package/dist/Components/NavLauncher/revealStyles.d.ts +4 -0
  86. package/dist/Components/NavLauncher/revealStyles.js +19 -0
  87. package/dist/Components/NavigationBar/NavigationBar.d.ts +1 -1
  88. package/dist/Components/NavigationBar/NavigationBar.js +2 -2
  89. package/dist/Components/NavigationBar/NavigationBarProps.d.ts +2 -0
  90. package/dist/Components/PageHeader/PageHeader.d.ts +1 -1
  91. package/dist/Components/PageHeader/PageHeader.js +9 -2
  92. package/dist/Components/PageHeader/PageHeaderProps.d.ts +8 -0
  93. package/dist/Components/PdfViewer/PdfViewer.d.ts +21 -4
  94. package/dist/Components/PdfViewer/PdfViewer.js +124 -3
  95. package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +5 -0
  96. package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewerProps.d.ts +1 -1
  97. package/dist/Components/QueryState/QueryStateBoundary.d.ts +2 -2
  98. package/dist/Components/QueryState/QueryStateBoundary.js +9 -3
  99. package/dist/Components/QueryState/QueryStateProps.d.ts +19 -2
  100. package/dist/Components/Search/Search.js +2 -1
  101. package/dist/Components/SectionRail/SectionRail.d.ts +3 -0
  102. package/dist/Components/SectionRail/SectionRail.js +49 -0
  103. package/dist/Components/SectionRail/SectionRailProps.d.ts +23 -0
  104. package/dist/Components/SectionRail/SectionRailProps.js +2 -0
  105. package/dist/Components/SectionRail/index.d.ts +2 -0
  106. package/dist/Components/SectionRail/index.js +8 -0
  107. package/dist/Components/SegmentedControl/SegmentedControl.js +9 -14
  108. package/dist/Components/SegmentedControl/segmentedInk.d.ts +0 -2
  109. package/dist/Components/SegmentedControl/segmentedInk.js +1 -5
  110. package/dist/Components/SideBar/SecondaryBar.js +4 -3
  111. package/dist/Components/SideBar/SideBar.d.ts +1 -1
  112. package/dist/Components/SideBar/SideBar.js +30 -9
  113. package/dist/Components/SideBar/SideBarProps.d.ts +32 -0
  114. package/dist/Components/SideBar/components/MenuItemBox.d.ts +6 -0
  115. package/dist/Components/SideBar/components/MenuItemBox.js +8 -4
  116. package/dist/Components/SideBar/components/MenuPopoverContent.js +3 -2
  117. package/dist/Components/SideBar/components/OtherApps.js +2 -1
  118. package/dist/Components/SideBar/components/PinnedSection.d.ts +17 -0
  119. package/dist/Components/SideBar/components/PinnedSection.js +98 -0
  120. package/dist/Components/SideBar/sidebarFocus.d.ts +23 -0
  121. package/dist/Components/SideBar/sidebarFocus.js +20 -0
  122. package/dist/Components/StageProgress/StageProgress.js +2 -2
  123. package/dist/Components/StageProgress/StageProgressProps.d.ts +2 -0
  124. package/dist/Components/StageProgress/StepperStage.js +5 -2
  125. package/dist/Components/StatCard/StatCard.d.ts +1 -1
  126. package/dist/Components/StatCard/StatCard.js +6 -2
  127. package/dist/Components/StatCard/StatCardProps.d.ts +3 -0
  128. package/dist/Components/StatusTag/StatusTag.d.ts +4 -0
  129. package/dist/Components/StatusTag/StatusTag.js +24 -0
  130. package/dist/Components/StatusTag/StatusTagProps.d.ts +20 -0
  131. package/dist/Components/StatusTag/StatusTagProps.js +2 -0
  132. package/dist/Components/Table/Table.d.ts +1 -1
  133. package/dist/Components/Table/Table.js +6 -2
  134. package/dist/Components/Table/TableProps.d.ts +20 -0
  135. package/dist/Components/Table/components/TableBody.d.ts +1 -1
  136. package/dist/Components/Table/components/TableBody.js +43 -18
  137. package/dist/Components/Table/components/TableHeader.d.ts +1 -1
  138. package/dist/Components/Table/components/TableHeader.js +7 -5
  139. package/dist/Components/Table/components/rowDetail.d.ts +32 -0
  140. package/dist/Components/Table/components/rowDetail.js +20 -0
  141. package/dist/Components/Table/hooks/useRowExpansion.d.ts +7 -0
  142. package/dist/Components/Table/hooks/useRowExpansion.js +27 -0
  143. package/dist/Components/Tabs/Tabs.d.ts +1 -1
  144. package/dist/Components/Tabs/Tabs.js +15 -2
  145. package/dist/Components/Tabs/TabsProps.d.ts +6 -2
  146. package/dist/Components/Tabs/components/Tab.js +4 -33
  147. package/dist/Components/Tabs/components/TabLinkList.d.ts +7 -0
  148. package/dist/Components/Tabs/components/TabLinkList.js +34 -0
  149. package/dist/Components/Tabs/useTabAppearance.d.ts +17 -0
  150. package/dist/Components/Tabs/useTabAppearance.js +67 -0
  151. package/dist/Components/Tag/Tag.js +11 -1
  152. package/dist/Components/Tag/TagProps.d.ts +4 -0
  153. package/dist/Components/Tag/tagDot.d.ts +3 -0
  154. package/dist/Components/Tag/tagDot.js +21 -0
  155. package/dist/Components/WizardDialog/WizardDialog.d.ts +9 -0
  156. package/dist/Components/WizardDialog/WizardDialog.js +102 -0
  157. package/dist/Components/WizardDialog/WizardDialogProps.d.ts +48 -0
  158. package/dist/Components/WizardDialog/WizardDialogProps.js +2 -0
  159. package/dist/Components/WizardDialog/useWizardFlow.d.ts +22 -0
  160. package/dist/Components/WizardDialog/useWizardFlow.js +47 -0
  161. package/dist/Components/WizardDialog/wizardSteps.d.ts +31 -0
  162. package/dist/Components/WizardDialog/wizardSteps.js +40 -0
  163. package/dist/esm/Components/AppSwitcher/AppSwitcher.js +2 -1
  164. package/dist/esm/Components/AppSwitcher/AppSwitcherProps.js +5 -3
  165. package/dist/esm/Components/AudioRecorder/AudioRecorder.js +161 -0
  166. package/dist/esm/Components/AudioRecorder/AudioRecorderProps.js +1 -0
  167. package/dist/esm/Components/Breadcrumbs/Breadcrumbs.js +35 -12
  168. package/dist/esm/Components/BulkSelectionBar/BulkSelectionBar.js +38 -0
  169. package/dist/esm/Components/BulkSelectionBar/BulkSelectionBarProps.js +1 -0
  170. package/dist/esm/Components/BulkSelectionBar/index.js +1 -0
  171. package/dist/esm/Components/CalendarGrid/CalendarGrid.js +168 -0
  172. package/dist/esm/Components/CalendarGrid/CalendarGridProps.js +1 -0
  173. package/dist/esm/Components/CalendarGrid/calendarMath.js +155 -0
  174. package/dist/esm/Components/Card/Card.js +12 -2
  175. package/dist/esm/Components/CircularProgress/CircularProgress.js +37 -0
  176. package/dist/esm/Components/CircularProgress/CircularProgressProps.js +1 -0
  177. package/dist/esm/Components/CircularProgress/arc.js +11 -0
  178. package/dist/esm/Components/Common/fieldStyles.js +2 -1
  179. package/dist/esm/Components/Drawer/Drawer.js +4 -2
  180. package/dist/esm/Components/Editor/Editor.js +48 -3
  181. package/dist/esm/Components/Editor/EditorFieldBar.js +13 -0
  182. package/dist/esm/Components/Editor/MakeDynamicDialog.js +20 -0
  183. package/dist/esm/Components/Editor/editorLabels.js +20 -0
  184. package/dist/esm/Components/Editor/editorTokenStyles.js +25 -0
  185. package/dist/esm/Components/Editor/editorTokens.js +121 -0
  186. package/dist/esm/Components/Editor/useEditorBridge.js +138 -0
  187. package/dist/esm/Components/EmptyState/EmptyState.js +2 -1
  188. package/dist/esm/Components/FormDrawer/FormDrawer.js +58 -0
  189. package/dist/esm/Components/FormDrawer/FormDrawerProps.js +1 -0
  190. package/dist/esm/Components/Kbd/Kbd.js +28 -0
  191. package/dist/esm/Components/Kbd/KbdProps.js +1 -0
  192. package/dist/esm/Components/LauncherTrigger/LauncherTrigger.js +41 -0
  193. package/dist/esm/Components/LauncherTrigger/LauncherTriggerProps.js +1 -0
  194. package/dist/esm/Components/Modal/Modal.js +4 -2
  195. package/dist/esm/Components/Modal/warnDroppedSlotChildren.js +38 -0
  196. package/dist/esm/Components/NavLauncher/NavLauncher.js +413 -0
  197. package/dist/esm/Components/NavLauncher/NavLauncherProps.js +1 -0
  198. package/dist/esm/Components/NavLauncher/NewTabLink.js +11 -0
  199. package/dist/esm/Components/NavLauncher/PinToggle.js +18 -0
  200. package/dist/esm/Components/NavLauncher/launcherParts.js +187 -0
  201. package/dist/esm/Components/NavLauncher/match.js +172 -0
  202. package/dist/esm/Components/NavLauncher/revealStyles.js +15 -0
  203. package/dist/esm/Components/NavigationBar/NavigationBar.js +3 -3
  204. package/dist/esm/Components/PageHeader/PageHeader.js +9 -2
  205. package/dist/esm/Components/PdfViewer/PdfViewer.js +123 -2
  206. package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +5 -0
  207. package/dist/esm/Components/QueryState/QueryStateBoundary.js +10 -4
  208. package/dist/esm/Components/Search/Search.js +3 -2
  209. package/dist/esm/Components/SectionRail/SectionRail.js +44 -0
  210. package/dist/esm/Components/SectionRail/SectionRailProps.js +1 -0
  211. package/dist/esm/Components/SectionRail/index.js +1 -0
  212. package/dist/esm/Components/SegmentedControl/SegmentedControl.js +11 -16
  213. package/dist/esm/Components/SegmentedControl/segmentedInk.js +0 -3
  214. package/dist/esm/Components/SideBar/SecondaryBar.js +4 -3
  215. package/dist/esm/Components/SideBar/SideBar.js +31 -10
  216. package/dist/esm/Components/SideBar/components/MenuItemBox.js +4 -2
  217. package/dist/esm/Components/SideBar/components/MenuPopoverContent.js +3 -2
  218. package/dist/esm/Components/SideBar/components/OtherApps.js +2 -1
  219. package/dist/esm/Components/SideBar/components/PinnedSection.js +92 -0
  220. package/dist/esm/Components/SideBar/sidebarFocus.js +15 -0
  221. package/dist/esm/Components/StageProgress/StageProgress.js +2 -2
  222. package/dist/esm/Components/StageProgress/StepperStage.js +5 -2
  223. package/dist/esm/Components/StatCard/StatCard.js +6 -2
  224. package/dist/esm/Components/StatusTag/StatusTag.js +19 -0
  225. package/dist/esm/Components/StatusTag/StatusTagProps.js +1 -0
  226. package/dist/esm/Components/Table/Table.js +7 -3
  227. package/dist/esm/Components/Table/components/TableBody.js +43 -18
  228. package/dist/esm/Components/Table/components/TableHeader.js +7 -5
  229. package/dist/esm/Components/Table/components/rowDetail.js +14 -0
  230. package/dist/esm/Components/Table/hooks/useRowExpansion.js +23 -0
  231. package/dist/esm/Components/Tabs/Tabs.js +15 -2
  232. package/dist/esm/Components/Tabs/components/Tab.js +4 -33
  233. package/dist/esm/Components/Tabs/components/TabLinkList.js +29 -0
  234. package/dist/esm/Components/Tabs/useTabAppearance.js +63 -0
  235. package/dist/esm/Components/Tag/Tag.js +12 -2
  236. package/dist/esm/Components/Tag/tagDot.js +17 -0
  237. package/dist/esm/Components/WizardDialog/WizardDialog.js +58 -0
  238. package/dist/esm/Components/WizardDialog/WizardDialogProps.js +1 -0
  239. package/dist/esm/Components/WizardDialog/useWizardFlow.js +44 -0
  240. package/dist/esm/Components/WizardDialog/wizardSteps.js +35 -0
  241. package/dist/esm/index.js +14 -0
  242. package/dist/index.d.ts +35 -6
  243. package/dist/index.js +38 -4
  244. package/package.json +1 -1
@@ -0,0 +1,187 @@
1
+ import type { ElementType, KeyboardEvent, MouseEvent } from "react";
2
+ import type { AppOption } from "../AppSwitcher/AppSwitcherProps";
3
+ /** Rendered as `<Icon size={16} aria-hidden />`, so any lucide-compatible component works. */
4
+ export type LauncherIcon = ElementType;
5
+ /** One destination the launcher can open; screens are what pins, Frequent and Recent refer to. */
6
+ export type LauncherScreen = {
7
+ id: string;
8
+ label: string;
9
+ href: string;
10
+ icon?: LauncherIcon;
11
+ badge?: number | string;
12
+ keywords?: readonly string[];
13
+ /** Listed on the module's second line (first `keyScreenLimit` of them). */
14
+ isKey?: boolean;
15
+ };
16
+ /** A group of screens shown as one row in the browse view. */
17
+ export type LauncherModule = {
18
+ id: string;
19
+ label: string;
20
+ /** Normally its first visible screen's href. */
21
+ href: string;
22
+ icon?: LauncherIcon;
23
+ badge?: number | string;
24
+ /** Shows a small "New" tag after the name. */
25
+ isNew?: boolean;
26
+ keywords?: readonly string[];
27
+ /** Pinning the module pins `screens[0]`; a module with no screens is not rendered. */
28
+ screens: readonly LauncherScreen[];
29
+ };
30
+ /** A labelled run of modules; a section with no renderable module is dropped. */
31
+ export type LauncherSection = {
32
+ id: string;
33
+ label: string;
34
+ modules: readonly LauncherModule[];
35
+ };
36
+ /** A search row that is not a screen: an action (`run`) or an entity result (`href`). */
37
+ export type LauncherSearchItem = {
38
+ id: string;
39
+ label: string;
40
+ /** Second line, e.g. the module a result belongs to. */
41
+ context?: string;
42
+ icon?: LauncherIcon;
43
+ /** Extra terms the query may match; never rendered. */
44
+ keywords?: string;
45
+ hint?: string;
46
+ href?: string;
47
+ run?: () => void;
48
+ };
49
+ /** A titled batch of remote results, rendered after Screens in the order given. */
50
+ export type LauncherResultGroup = {
51
+ id: string;
52
+ label: string;
53
+ items: readonly LauncherSearchItem[];
54
+ };
55
+ /** Every visible string and accessible name; pass any subset, the rest fall back to English. */
56
+ export type LauncherLabels = {
57
+ title: string;
58
+ searchPlaceholder: string;
59
+ clearSearch: string;
60
+ close: string;
61
+ pinned: string;
62
+ pinnedEmpty: string;
63
+ frequent: string;
64
+ recent: string;
65
+ screensGroup: string;
66
+ actionsGroup: string;
67
+ pin: (label: string) => string;
68
+ unpin: (label: string) => string;
69
+ openInNewTab: (label: string) => string;
70
+ noResults: (query: string) => string;
71
+ noResultsHint: string;
72
+ searching: string;
73
+ /** Accessible name of the skeleton region while `isLoading`. */
74
+ loading: string;
75
+ /** Heading of the empty state shown when `sections` has nothing to render. */
76
+ empty: string;
77
+ /** Footer hint after the four arrow key caps. */
78
+ hintMove: string;
79
+ /** Footer hint after the ENTER key cap. */
80
+ hintOpen: string;
81
+ /** Footer hint after the mod + ENTER key caps. */
82
+ hintNewTab: string;
83
+ /** Footer hint after the P key cap. */
84
+ hintPin: string;
85
+ /** Footer hint after the ESC key cap. */
86
+ hintClose: string;
87
+ /** Footer hint after `openShortcutHint`; only rendered when that prop is set. */
88
+ hintOpenMenu: string;
89
+ /** Heading and list name of the apps section. */
90
+ apps: string;
91
+ /** Per-section count shown while searching, e.g. "3 found". */
92
+ found: (count: number) => string;
93
+ /** Accessible name of the right-hand quick access rail. */
94
+ quickAccess: string;
95
+ /** Tag after a module marked `isNew`. */
96
+ newBadge: string;
97
+ /** Noun used in a module's key-screens group name, e.g. "Leave screens". */
98
+ screens: string;
99
+ /** Text on the Pin button of Frequently visited rows. */
100
+ pinShort: string;
101
+ /** Right-hand footer note. */
102
+ footerNote: string;
103
+ /** Line above the suggestion chips of the no-results state. */
104
+ suggestionsHint: string;
105
+ /** Tooltip on an unpinned star. */
106
+ pinTip: string;
107
+ /** Tooltip on a pinned star. */
108
+ unpinTip: string;
109
+ };
110
+ /** Passed to `onNavigate`; `newTab` is true for mod+Enter. */
111
+ export type LauncherNavigateOptions = {
112
+ newTab: boolean;
113
+ };
114
+ /** Full-height navigation launcher: browse every screen, search, pins, Frequent, Recent and optionally the suite's apps. */
115
+ export interface NavLauncherProps {
116
+ isOpen: boolean;
117
+ onClose: () => void;
118
+ /** Already permission-filtered by the app. Empty sections/modules are dropped, never rendered as gaps. */
119
+ sections: readonly LauncherSection[];
120
+ /** Screen ids in display order; ids not in `sections` are ignored silently. */
121
+ pinnedIds: readonly string[];
122
+ frequentIds: readonly string[];
123
+ recentIds: readonly string[];
124
+ /** Omit to hide every pin toggle (read-only launcher). */
125
+ onTogglePin?: (screenId: string) => void;
126
+ /** Keyboard opens only (Enter / mod+Enter); pointer clicks follow the rendered links natively. */
127
+ onNavigate: (href: string, options: LauncherNavigateOptions) => void;
128
+ /** Anchor-like component receiving `href`, `target`, `rel`, `onClick`, `ref`. Defaults to `"a"`. */
129
+ linkAs?: ElementType;
130
+ actions?: readonly LauncherSearchItem[];
131
+ /** Remote results, already filtered by the app; rendered after Screens in the given order. */
132
+ extraResults?: readonly LauncherResultGroup[];
133
+ /** Controlled query; omit for uncontrolled. Reset to "" on close either way. */
134
+ query?: string;
135
+ /** Fires on every change, including the reset on close. */
136
+ onQueryChange?: (query: string) => void;
137
+ /** Remote search in flight: shows the searching state when nothing local matched. */
138
+ isSearching?: boolean;
139
+ /** Sections not known yet (access loading): skeleton browse view. */
140
+ isLoading?: boolean;
141
+ /** Defaults to 3. */
142
+ keyScreenLimit?: number;
143
+ /** Most Frequently visited rows shown (pinned ones are skipped); defaults to 4. */
144
+ frequentLimit?: number;
145
+ /** Query chips offered by the no-results state; clicking one sets the query. */
146
+ suggestions?: readonly string[];
147
+ /** Key cap shown at the end of the search field, e.g. "/" when the app opens the launcher with it. */
148
+ searchHint?: string;
149
+ /** Chord that opens the launcher in the host app, e.g. "⌘K or /"; shown as the first footer hint. Omit when the app does not own one. */
150
+ openShortcutHint?: string;
151
+ /** Replaces the modifier cap of the mod+Enter hint; defaults to "⌘" on Apple platforms, "Ctrl" elsewhere. */
152
+ modKeyLabel?: string;
153
+ /** Panel width at `lg`+; always full width below `lg`. Defaults to "1080px". */
154
+ maxWidth?: string;
155
+ labels?: Partial<LauncherLabels>;
156
+ /** Other Pixelize apps, shown as an "Apps" section at the bottom of the right rail. Same shape as AppSwitcher. */
157
+ apps?: AppOption[];
158
+ /** The app this UI runs inside: its row is marked and never a link. */
159
+ currentAppId?: string;
160
+ /** Same contract as AppSwitcher.onSelect; preventDefault keeps the app's own routing. */
161
+ onAppSelect?: (app: AppOption, event: MouseEvent | KeyboardEvent) => void;
162
+ /** Default "apps-on-compact": the section shows only below `md`, where the 9-dot is usually hidden. */
163
+ appsVisibility?: "always" | "apps-on-compact";
164
+ "data-testid"?: string;
165
+ }
166
+ /** Props for the star pin toggle used on launcher rows and reusable on a landing page; shows only while its row is hovered or focused. */
167
+ export interface PinToggleProps {
168
+ isPinned: boolean;
169
+ /** Accessible name and tooltip, e.g. "Pin Leave". */
170
+ label: string;
171
+ onToggle: () => void;
172
+ /** Tooltip text; defaults to `label`. */
173
+ title?: string;
174
+ /** Star size in px; defaults to 13. */
175
+ size?: number;
176
+ /** Pass -1 where the row itself is the tab stop. */
177
+ tabIndex?: number;
178
+ }
179
+ /** Props for the small "open in new tab" anchor beside a launcher row. */
180
+ export interface NewTabLinkProps {
181
+ href: string;
182
+ /** Accessible name and tooltip, e.g. "Open Leave in a new tab". */
183
+ label: string;
184
+ /** Anchor-like component receiving `href`, `target`, `rel`; defaults to `"a"`. */
185
+ linkAs?: ElementType;
186
+ tabIndex?: number;
187
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import type { NewTabLinkProps } from "./NavLauncherProps";
2
+ /** "Open in a new tab" anchor; visible on row hover, focus-within or its own focus only. */
3
+ export default function NewTabLink({ href, label, linkAs, tabIndex }: NewTabLinkProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = NewTabLink;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("@chakra-ui/react");
6
+ const lucide_react_1 = require("lucide-react");
7
+ const motion_1 = require("../../Theme/tokens/primitives/motion");
8
+ const useCustomTheme_1 = require("../../Theme/useCustomTheme");
9
+ const revealStyles_1 = require("./revealStyles");
10
+ /** "Open in a new tab" anchor; visible on row hover, focus-within or its own focus only. */
11
+ function NewTabLink({ href, label, linkAs = "a", tabIndex }) {
12
+ const { colors } = (0, useCustomTheme_1.useCustomTheme)();
13
+ return ((0, jsx_runtime_1.jsx)(react_1.Box, { as: linkAs, href: href, target: "_blank", rel: "noopener noreferrer", "aria-label": label, title: label, tabIndex: tabIndex, display: "inline-flex", alignItems: "center", justifyContent: "center", w: "22px", h: "22px", flexShrink: 0, borderRadius: "md", color: colors.textMuted, opacity: 0, transition: (0, motion_1.transitionFor)(["opacity", "background-color"]), sx: (0, revealStyles_1.revealStyles)(colors), _hover: { bg: colors.backgroundColor.subtle }, children: (0, jsx_runtime_1.jsx)(lucide_react_1.ArrowUpRight, { size: 13, "aria-hidden": true }) }));
14
+ }
@@ -0,0 +1,3 @@
1
+ import type { PinToggleProps } from "./NavLauncherProps";
2
+ /** Star toggle: outline when unpinned, filled in the accent when pinned; appears on row hover or focus and never follows the row link. */
3
+ export default function PinToggle({ isPinned, label, onToggle, title, size, tabIndex }: PinToggleProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = PinToggle;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("@chakra-ui/react");
6
+ const motion_1 = require("../../Theme/tokens/primitives/motion");
7
+ const useCustomTheme_1 = require("../../Theme/useCustomTheme");
8
+ const revealStyles_1 = require("./revealStyles");
9
+ const STAR = "M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01z";
10
+ function Star({ filled, size }) {
11
+ return ((0, jsx_runtime_1.jsx)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: filled ? "currentColor" : "none", stroke: "currentColor", strokeWidth: 1.7, strokeLinejoin: "round", "aria-hidden": true, children: (0, jsx_runtime_1.jsx)("path", { d: STAR }) }));
12
+ }
13
+ /** Star toggle: outline when unpinned, filled in the accent when pinned; appears on row hover or focus and never follows the row link. */
14
+ function PinToggle({ isPinned, label, onToggle, title, size = 13, tabIndex }) {
15
+ const { colors } = (0, useCustomTheme_1.useCustomTheme)();
16
+ return ((0, jsx_runtime_1.jsx)(react_1.IconButton, { "aria-label": label, "aria-pressed": isPinned, title: title !== null && title !== void 0 ? title : label, icon: (0, jsx_runtime_1.jsx)(Star, { filled: isPinned, size: size }), variant: "ghost", minW: "22px", w: "22px", h: "22px", borderRadius: "md", tabIndex: tabIndex, color: isPinned ? colors.accentText : colors.textMuted, opacity: 0, transition: (0, motion_1.transitionFor)(["opacity", "background-color"]), sx: (0, revealStyles_1.revealStyles)(colors), onClick: (event) => {
17
+ event.preventDefault();
18
+ event.stopPropagation();
19
+ onToggle();
20
+ } }));
21
+ }
@@ -0,0 +1,152 @@
1
+ import { type ElementType, type FocusEvent, type KeyboardEvent, type MouseEvent, type ReactNode } from "react";
2
+ import type { PaletteProps } from "../../Theme/tokens/types";
3
+ import type { AppOption } from "../AppSwitcher/AppSwitcherProps";
4
+ import type { LauncherLabels, LauncherModule, LauncherScreen } from "./NavLauncherProps";
5
+ export declare const ITEM_SELECTOR = "[data-launcher-item]";
6
+ export declare const isPlainClick: (event: MouseEvent) => boolean;
7
+ export type LinkCtx = {
8
+ linkAs: ElementType;
9
+ onPlainClick: (event: MouseEvent) => void;
10
+ };
11
+ export declare const WIDE_ROW = "@container launcher-row (min-width: 300px)";
12
+ export declare const ROW_CONTAINER: {
13
+ containerType: string;
14
+ containerName: string;
15
+ };
16
+ export declare const activeRowStyle: (colors: PaletteProps) => {
17
+ edge: string;
18
+ fill: string;
19
+ };
20
+ export declare const activeRowSurface: (colors: PaletteProps) => {
21
+ backgroundColor: string;
22
+ boxShadow: string;
23
+ outline: string;
24
+ outlineOffset: string;
25
+ };
26
+ export declare const titleInset: (base: number, open: number, chip?: number) => {
27
+ "@container launcher-row (max-width: 219px)": {
28
+ "[data-group]:hover &, [data-group]:focus-within &, [data-group][data-reveal=true] &": {
29
+ "--row-pr": string;
30
+ };
31
+ };
32
+ "@container launcher-row (min-width: 300px)"?: {
33
+ "[data-group][data-reveal=true] &": {
34
+ "--row-pr": string;
35
+ };
36
+ } | undefined;
37
+ paddingRight: string;
38
+ "--row-pr": string;
39
+ "[data-group]:hover &, [data-group]:focus-within &, [data-group][data-reveal=true] &": {
40
+ "--row-pr": string;
41
+ };
42
+ };
43
+ export declare const useRowFocus: (isBordered?: boolean) => {
44
+ sx: {
45
+ "&[data-row-focus]": {
46
+ backgroundColor: string;
47
+ boxShadow: string;
48
+ outline: string;
49
+ outlineOffset: string;
50
+ } | {
51
+ backgroundColor: string;
52
+ borderColor: string;
53
+ };
54
+ };
55
+ primary: {
56
+ onFocus: (event: FocusEvent<HTMLElement>) => boolean | undefined;
57
+ onBlur: (event: FocusEvent<HTMLElement>) => boolean | undefined;
58
+ };
59
+ };
60
+ export declare const stretchedLink: (radius: string) => {
61
+ outline: string;
62
+ _after: {
63
+ content: string;
64
+ position: string;
65
+ inset: number;
66
+ borderRadius: string;
67
+ };
68
+ };
69
+ export declare const useRowHover: () => {
70
+ bg: string;
71
+ _hover: {
72
+ bg: string;
73
+ };
74
+ _focusWithin: {
75
+ bg: string;
76
+ };
77
+ };
78
+ type BadgeProps = {
79
+ value?: number | string;
80
+ size?: "row" | "tile";
81
+ };
82
+ export declare function CountBadge({ value, size }: BadgeProps): import("react/jsx-runtime").JSX.Element | null;
83
+ export declare function NewTag({ label }: {
84
+ label: string;
85
+ }): import("react/jsx-runtime").JSX.Element;
86
+ type SectionHeaderProps = {
87
+ label: string;
88
+ meta?: string;
89
+ isDecorative?: boolean;
90
+ isRail?: boolean;
91
+ hasCount?: boolean;
92
+ };
93
+ export declare function SectionHeader({ label, meta, isDecorative, isRail, hasCount, }: SectionHeaderProps): import("react/jsx-runtime").JSX.Element;
94
+ type RowIconProps = {
95
+ icon?: ElementType;
96
+ size: number;
97
+ stroke?: number;
98
+ mt?: string;
99
+ };
100
+ export declare function RowIcon({ icon: Icon, size, stroke, mt }: RowIconProps): import("react/jsx-runtime").JSX.Element | null;
101
+ export declare function Highlight({ text, query }: {
102
+ text: string;
103
+ query: string;
104
+ }): import("react/jsx-runtime").JSX.Element;
105
+ export declare function RowActions({ children }: {
106
+ children: ReactNode;
107
+ }): import("react/jsx-runtime").JSX.Element;
108
+ export declare function RowTip({ text }: {
109
+ text: string;
110
+ }): import("react/jsx-runtime").JSX.Element;
111
+ type ModuleRowProps = {
112
+ module: LauncherModule;
113
+ keyScreens: LauncherScreen[];
114
+ isPinned: boolean;
115
+ onTogglePin?: () => void;
116
+ pinId: string;
117
+ labels: LauncherLabels;
118
+ link: LinkCtx;
119
+ };
120
+ export declare function ModuleRow({ module, keyScreens, isPinned, onTogglePin, pinId, labels, link, }: ModuleRowProps): import("react/jsx-runtime").JSX.Element;
121
+ type RailRowProps = {
122
+ screen: LauncherScreen;
123
+ module: LauncherModule;
124
+ link: LinkCtx;
125
+ isStrong?: boolean;
126
+ trailing?: ReactNode;
127
+ pinId?: string;
128
+ };
129
+ export declare function RailRow({ screen, module, link, isStrong, trailing, pinId, }: RailRowProps): import("react/jsx-runtime").JSX.Element;
130
+ type PinTextButtonProps = {
131
+ label: string;
132
+ text: string;
133
+ onToggle: () => void;
134
+ };
135
+ export declare function PinTextButton({ label, text, onToggle }: PinTextButtonProps): import("react/jsx-runtime").JSX.Element;
136
+ type PinnedTileProps = {
137
+ screen: LauncherScreen;
138
+ module: LauncherModule;
139
+ link: LinkCtx;
140
+ labels: LauncherLabels;
141
+ onTogglePin?: () => void;
142
+ };
143
+ export declare function PinnedTile({ screen, module, link, labels, onTogglePin, }: PinnedTileProps): import("react/jsx-runtime").JSX.Element;
144
+ type AppsSectionProps = {
145
+ apps: readonly AppOption[];
146
+ hues: readonly string[];
147
+ currentAppId?: string;
148
+ heading: string;
149
+ onSelect: (app: AppOption, event: MouseEvent | KeyboardEvent) => void;
150
+ };
151
+ export declare function AppsSection({ apps, hues, currentAppId, heading, onSelect, }: AppsSectionProps): import("react/jsx-runtime").JSX.Element;
152
+ export {};
@@ -0,0 +1,212 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.useRowHover = exports.stretchedLink = exports.useRowFocus = exports.titleInset = exports.activeRowSurface = exports.activeRowStyle = exports.ROW_CONTAINER = exports.WIDE_ROW = exports.isPlainClick = exports.ITEM_SELECTOR = void 0;
7
+ exports.CountBadge = CountBadge;
8
+ exports.NewTag = NewTag;
9
+ exports.SectionHeader = SectionHeader;
10
+ exports.RowIcon = RowIcon;
11
+ exports.Highlight = Highlight;
12
+ exports.RowActions = RowActions;
13
+ exports.RowTip = RowTip;
14
+ exports.ModuleRow = ModuleRow;
15
+ exports.RailRow = RailRow;
16
+ exports.PinTextButton = PinTextButton;
17
+ exports.PinnedTile = PinnedTile;
18
+ exports.AppsSection = AppsSection;
19
+ const jsx_runtime_1 = require("react/jsx-runtime");
20
+ const react_1 = require("@chakra-ui/react");
21
+ const lucide_react_1 = require("lucide-react");
22
+ const react_2 = require("react");
23
+ const focusRing_styles_1 = require("../../Theme/chakra/focusRing.styles");
24
+ const filledSurface_1 = require("../../Theme/tokens/builders/filledSurface");
25
+ const outlineRung_1 = require("../../Theme/tokens/builders/outlineRung");
26
+ const rowStates_1 = require("../../Theme/tokens/builders/rowStates");
27
+ const motion_1 = require("../../Theme/tokens/primitives/motion");
28
+ const useCustomTheme_1 = require("../../Theme/useCustomTheme");
29
+ const OverflowToolTip_1 = __importDefault(require("../ToolTip/OverflowToolTip"));
30
+ const AppMark_1 = __importDefault(require("../AppSwitcher/AppMark"));
31
+ const match_1 = require("./match");
32
+ const NewTabLink_1 = __importDefault(require("./NewTabLink"));
33
+ const PinToggle_1 = __importDefault(require("./PinToggle"));
34
+ const revealStyles_1 = require("./revealStyles");
35
+ exports.ITEM_SELECTOR = "[data-launcher-item]";
36
+ const isPlainClick = (event) => event.button === 0 &&
37
+ !event.metaKey &&
38
+ !event.ctrlKey &&
39
+ !event.shiftKey &&
40
+ !event.altKey;
41
+ exports.isPlainClick = isPlainClick;
42
+ const ROW_FOCUS = "data-row-focus";
43
+ const ROW_PR = "--row-pr";
44
+ const REVEALED = "[data-group]:hover &, [data-group]:focus-within &, [data-group][data-reveal=true] &";
45
+ const NARROW_ROW = "@container launcher-row (max-width: 219px)";
46
+ exports.WIDE_ROW = "@container launcher-row (min-width: 300px)";
47
+ exports.ROW_CONTAINER = {
48
+ containerType: "inline-size",
49
+ containerName: "launcher-row",
50
+ };
51
+ const activeRowStyle = (colors) => {
52
+ const fill = (0, rowStates_1.listRowBackgrounds)(colors).active;
53
+ const edge = (0, outlineRung_1.liftToContrast)((0, outlineRung_1.liftToContrast)(colors.primary[500], fill, outlineRung_1.AA_NON_TEXT), colors.surfaceRaised, outlineRung_1.AA_NON_TEXT);
54
+ return { edge, fill };
55
+ };
56
+ exports.activeRowStyle = activeRowStyle;
57
+ const activeRowSurface = (colors) => {
58
+ const { edge, fill } = (0, exports.activeRowStyle)(colors);
59
+ return {
60
+ backgroundColor: fill,
61
+ boxShadow: `inset 0 0 0 1px ${edge}`,
62
+ outline: "2px solid transparent",
63
+ outlineOffset: "-2px",
64
+ };
65
+ };
66
+ exports.activeRowSurface = activeRowSurface;
67
+ const titleInset = (base, open, chip = 0) => ({
68
+ paddingRight: `var(${ROW_PR})`,
69
+ [ROW_PR]: `${base}px`,
70
+ [REVEALED]: { [ROW_PR]: `${open}px` },
71
+ ...(chip
72
+ ? {
73
+ [exports.WIDE_ROW]: {
74
+ "[data-group][data-reveal=true] &": { [ROW_PR]: `${open + chip}px` },
75
+ },
76
+ }
77
+ : {}),
78
+ [NARROW_ROW]: { [REVEALED]: { [ROW_PR]: `${base}px` } },
79
+ });
80
+ exports.titleInset = titleInset;
81
+ const markRowFocus = (event, isOn) => { var _a; return (_a = event.currentTarget.closest("[data-group]")) === null || _a === void 0 ? void 0 : _a.toggleAttribute(ROW_FOCUS, isOn); };
82
+ const useRowFocus = (isBordered = false) => {
83
+ const { colors } = (0, useCustomTheme_1.useCustomTheme)();
84
+ const { edge, fill } = (0, exports.activeRowStyle)(colors);
85
+ const lit = isBordered
86
+ ? { backgroundColor: fill, borderColor: edge }
87
+ : (0, exports.activeRowSurface)(colors);
88
+ return {
89
+ sx: { [`&[${ROW_FOCUS}]`]: lit },
90
+ primary: {
91
+ onFocus: (event) => markRowFocus(event, event.currentTarget.matches(":focus-visible")),
92
+ onBlur: (event) => markRowFocus(event, false),
93
+ },
94
+ };
95
+ };
96
+ exports.useRowFocus = useRowFocus;
97
+ const stretchedLink = (radius) => ({
98
+ outline: "none",
99
+ _after: {
100
+ content: '""',
101
+ position: "absolute",
102
+ inset: 0,
103
+ borderRadius: radius,
104
+ },
105
+ });
106
+ exports.stretchedLink = stretchedLink;
107
+ const useRowHover = () => {
108
+ const { colors } = (0, useCustomTheme_1.useCustomTheme)();
109
+ const hover = (0, rowStates_1.listRowBackgrounds)(colors).active;
110
+ return { bg: hover, _hover: { bg: hover }, _focusWithin: { bg: hover } };
111
+ };
112
+ exports.useRowHover = useRowHover;
113
+ function CountBadge({ value, size = "row" }) {
114
+ const { colors } = (0, useCustomTheme_1.useCustomTheme)();
115
+ if (value === undefined || value === 0 || value === "")
116
+ return null;
117
+ const fill = (0, filledSurface_1.resolveFilledSurface)(colors.primary, colors);
118
+ const isRow = size === "row";
119
+ return ((0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", flexShrink: 0, minW: isRow ? "20px" : undefined, h: isRow ? "18px" : "17px", px: "6px", mr: isRow ? "2px" : 0, borderRadius: "full", bg: fill.fill, color: fill.color, fontSize: isRow ? "10.5px" : "10px", fontWeight: 700, display: "inline-flex", alignItems: "center", justifyContent: "center", sx: { fontVariantNumeric: "tabular-nums" }, children: value }));
120
+ }
121
+ function NewTag({ label }) {
122
+ const { colors } = (0, useCustomTheme_1.useCustomTheme)();
123
+ return ((0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", flexShrink: 0, fontSize: "10px", fontWeight: 600, letterSpacing: "0.02em", color: colors.accentText, opacity: 0.85, children: label }));
124
+ }
125
+ function SectionHeader({ label, meta, isDecorative = false, isRail = false, hasCount = true, }) {
126
+ const { colors } = (0, useCustomTheme_1.useCustomTheme)();
127
+ return ((0, jsx_runtime_1.jsxs)(react_1.Flex, { align: "baseline", gap: "6px", px: isRail ? "4px" : "8px", pb: "5px", mb: hasCount ? 0 : "2px", borderBottomWidth: "1px", borderColor: colors.boxborder[200], "aria-hidden": isDecorative || undefined, children: [(0, jsx_runtime_1.jsx)(react_1.Heading, { as: isDecorative ? "div" : "h2", m: 0, fontSize: "12.5px", fontWeight: 600, letterSpacing: "-0.003em", color: colors.text[900], children: label }), meta ? ((0, jsx_runtime_1.jsx)(react_1.Text, { as: "span", fontSize: "11.5px", color: colors.textMuted, sx: { fontVariantNumeric: "tabular-nums" }, children: meta })) : null] }));
128
+ }
129
+ function RowIcon({ icon: Icon, size, stroke = 1.75, mt }) {
130
+ const { colors } = (0, useCustomTheme_1.useCustomTheme)();
131
+ if (!Icon)
132
+ return null;
133
+ return ((0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", color: colors.textMuted, display: "inline-flex", flexShrink: 0, mt: mt, transition: (0, motion_1.transitionFor)(["color"]), _groupHover: { color: colors.accentText }, _groupFocusWithin: { color: colors.accentText }, sx: { "[data-reveal=true] &": { color: colors.accentText } }, children: (0, jsx_runtime_1.jsx)(Icon, { size: size, strokeWidth: stroke, "aria-hidden": true }) }));
134
+ }
135
+ function Highlight({ text, query }) {
136
+ const { colors } = (0, useCustomTheme_1.useCustomTheme)();
137
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, match_1.highlightSegments)(text, query).map((segment, i) => segment.isMatch ? ((0, jsx_runtime_1.jsx)(react_1.Box, { as: "mark", bg: "transparent", color: "inherit", fontWeight: 650, textDecoration: "underline", textDecorationColor: colors.primary.opacity[48], textDecorationThickness: "1.5px", textUnderlineOffset: "2px", children: segment.text }, i)) : ((0, jsx_runtime_1.jsx)(react_2.Fragment, { children: segment.text }, i))) }));
138
+ }
139
+ function RowActions({ children }) {
140
+ const { colors } = (0, useCustomTheme_1.useCustomTheme)();
141
+ const revealed = REVEALED.replace(/ &/g, " > &");
142
+ return ((0, jsx_runtime_1.jsx)(react_1.Flex, { sx: {
143
+ [NARROW_ROW]: {
144
+ [revealed]: {
145
+ backgroundColor: (0, exports.activeRowStyle)(colors).fill,
146
+ borderRadius: "6px",
147
+ },
148
+ },
149
+ }, position: "absolute", top: "7px", right: "4px", h: "19px", align: "center", gap: "2px", zIndex: 1, children: children }));
150
+ }
151
+ function RowTip({ text }) {
152
+ const { colors } = (0, useCustomTheme_1.useCustomTheme)();
153
+ return ((0, jsx_runtime_1.jsx)(react_1.Box, { role: "tooltip", position: "absolute", right: "20px", top: "-26px", zIndex: 2, px: "8px", py: "3px", borderRadius: "6px", fontSize: "11px", fontWeight: 600, whiteSpace: "nowrap", bg: colors.text[900], color: colors.surfaceRaised, visibility: "hidden", pointerEvents: "none", _groupHover: { visibility: "visible" }, children: text }));
154
+ }
155
+ function ModuleRow({ module, keyScreens, isPinned, onTogglePin, pinId, labels, link, }) {
156
+ const { colors } = (0, useCustomTheme_1.useCustomTheme)();
157
+ const hover = (0, exports.useRowHover)();
158
+ const focus = (0, exports.useRowFocus)();
159
+ const ring = (0, focusRing_styles_1.focusVisibleStyles)(colors);
160
+ const base = typeof module.badge === "number" || module.badge ? 24 : 0;
161
+ const open = base + (onTogglePin ? 46 : 24);
162
+ return ((0, jsx_runtime_1.jsxs)(react_1.Flex, { "data-group": true, "data-nav-cell": true, position: "relative", align: "flex-start", gap: "10px", minH: "34px", pl: "8px", pr: "4px", pt: "7px", pb: "5px", borderRadius: "8px", transition: (0, motion_1.transitionFor)(["background-color"]), _hover: hover._hover, _focusWithin: hover._focusWithin, sx: { ...focus.sx, ...exports.ROW_CONTAINER }, children: [(0, jsx_runtime_1.jsx)(RowIcon, { icon: module.icon, size: 16, mt: "2px" }), (0, jsx_runtime_1.jsxs)(react_1.Flex, { direction: "column", flex: 1, minW: 0, children: [(0, jsx_runtime_1.jsxs)(react_1.Flex, { align: "center", gap: "6px", h: "19px", minW: 0, sx: (0, exports.titleInset)(base, open), children: [(0, jsx_runtime_1.jsx)(OverflowToolTip_1.default, { label: module.label, placement: "top-start", children: (0, jsx_runtime_1.jsx)(react_1.Box, { as: link.linkAs, href: module.href, "data-launcher-item": true, ...focus.primary, "data-pin-id": onTogglePin ? pinId : undefined, onClick: link.onPlainClick, minW: 0, fontSize: "13.5px", fontWeight: 500, color: colors.text[900], noOfLines: 1, borderRadius: "sm", sx: (0, exports.stretchedLink)("8px"), children: module.label }) }), module.isNew ? (0, jsx_runtime_1.jsx)(NewTag, { label: labels.newBadge }) : null] }), keyScreens.length ? ((0, jsx_runtime_1.jsx)(OverflowToolTip_1.default, { label: keyScreens.map((screen) => screen.label).join(" · "), placement: "bottom-start", children: (0, jsx_runtime_1.jsx)(react_1.Box, { role: "group", "aria-label": `${module.label} ${labels.screens}`, position: "relative", zIndex: 1, w: "fit-content", maxW: "100%", fontSize: "11.5px", lineHeight: "15px", color: colors.textMuted, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", children: keyScreens.map((screen, i) => ((0, jsx_runtime_1.jsxs)(react_2.Fragment, { children: [i > 0 ? ((0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", "aria-hidden": true, mx: "5px", opacity: 0.7, children: "\u00B7" })) : null, (0, jsx_runtime_1.jsx)(react_1.Box, { as: link.linkAs, href: screen.href, "data-launcher-item": true, onClick: link.onPlainClick, color: "inherit", borderRadius: "sm", position: "relative", zIndex: 1, _hover: {
163
+ textDecoration: "underline",
164
+ textUnderlineOffset: "2px",
165
+ }, sx: ring, children: screen.label })] }, screen.id))) }) })) : null] }), (0, jsx_runtime_1.jsxs)(RowActions, { children: [(0, jsx_runtime_1.jsx)(CountBadge, { value: module.badge }), onTogglePin ? ((0, jsx_runtime_1.jsx)(PinToggle_1.default, { isPinned: isPinned, label: isPinned ? labels.unpin(module.label) : labels.pin(module.label), title: "", onToggle: onTogglePin })) : null, (0, jsx_runtime_1.jsx)(NewTabLink_1.default, { href: module.href, label: labels.openInNewTab(module.label), linkAs: link.linkAs })] }), onTogglePin ? ((0, jsx_runtime_1.jsx)(RowTip, { text: isPinned ? labels.unpinTip : labels.pinTip })) : null] }));
166
+ }
167
+ function RailRow({ screen, module, link, isStrong = false, trailing, pinId, }) {
168
+ var _a;
169
+ const { colors } = (0, useCustomTheme_1.useCustomTheme)();
170
+ const hover = (0, exports.useRowHover)();
171
+ const focus = (0, exports.useRowFocus)();
172
+ return ((0, jsx_runtime_1.jsxs)(react_1.Flex, { "data-group": true, position: "relative", align: "center", gap: "10px", h: "32px", pl: "8px", pr: "4px", borderRadius: "8px", transition: (0, motion_1.transitionFor)(["background-color"]), _hover: hover._hover, _focusWithin: hover._focusWithin, sx: focus.sx, children: [(0, jsx_runtime_1.jsx)(RowIcon, { icon: (_a = screen.icon) !== null && _a !== void 0 ? _a : module.icon, size: 15 }), (0, jsx_runtime_1.jsx)(OverflowToolTip_1.default, { label: screen.label, placement: "top-start", children: (0, jsx_runtime_1.jsx)(react_1.Box, { as: link.linkAs, href: screen.href, "data-launcher-item": true, ...focus.primary, "data-pin-id": pinId, onClick: link.onPlainClick, flex: 1, minW: 0, fontSize: "13px", fontWeight: isStrong ? 500 : 400, color: colors.text[900], noOfLines: 1, borderRadius: "sm", sx: (0, exports.stretchedLink)("8px"), children: screen.label }) }), (0, jsx_runtime_1.jsx)(react_1.Flex, { position: "relative", zIndex: 1, align: "center", gap: "2px", children: trailing })] }));
173
+ }
174
+ function PinTextButton({ label, text, onToggle }) {
175
+ const { colors } = (0, useCustomTheme_1.useCustomTheme)();
176
+ return ((0, jsx_runtime_1.jsxs)(react_1.Box, { as: "button", type: "button", "aria-label": label, flexShrink: 0, h: "22px", px: "7px", display: "inline-flex", alignItems: "center", gap: "4px", borderRadius: "6px", borderWidth: "1px", borderColor: colors.boxborder[200], bg: colors.surfaceRaised, color: colors.text[700], fontSize: "11px", fontWeight: 600, cursor: "pointer", opacity: 0, transition: (0, motion_1.transitionFor)(["opacity", "background-color"]), sx: { ...(0, revealStyles_1.revealStyles)(colors), "@media (hover: none)": { opacity: 1 } }, onClick: (event) => {
177
+ event.preventDefault();
178
+ event.stopPropagation();
179
+ onToggle();
180
+ }, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Star, { size: 11, strokeWidth: 2, "aria-hidden": true }), text] }));
181
+ }
182
+ function PinnedTile({ screen, module, link, labels, onTogglePin, }) {
183
+ var _a;
184
+ const { colors } = (0, useCustomTheme_1.useCustomTheme)();
185
+ const Icon = (_a = screen.icon) !== null && _a !== void 0 ? _a : module.icon;
186
+ const focus = (0, exports.useRowFocus)(true);
187
+ return ((0, jsx_runtime_1.jsxs)(react_1.Flex, { "data-group": true, "data-nav-cell": true, position: "relative", align: "center", gap: "8px", h: "36px", pl: "9px", pr: "4px", borderRadius: "9px", borderWidth: "1px", borderColor: colors.boxborder[200], bg: colors.surfaceRaised, transition: (0, motion_1.transitionFor)(["border-color", "background-color"]), _hover: { borderColor: colors.gray[300] }, sx: focus.sx, children: [Icon ? ((0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", display: "inline-flex", flexShrink: 0, color: colors.accentText, children: (0, jsx_runtime_1.jsx)(Icon, { size: 15, strokeWidth: 1.8, "aria-hidden": true }) })) : null, (0, jsx_runtime_1.jsx)(OverflowToolTip_1.default, { label: screen.label, placement: "top-start", children: (0, jsx_runtime_1.jsx)(react_1.Box, { as: link.linkAs, href: screen.href, "data-launcher-item": true, ...focus.primary, "data-pin-id": onTogglePin ? screen.id : undefined, onClick: link.onPlainClick, flex: 1, minW: 0, fontSize: "13px", fontWeight: 500, color: colors.text[900], noOfLines: 1, borderRadius: "sm", sx: (0, exports.stretchedLink)("9px"), children: screen.label }) }), (0, jsx_runtime_1.jsx)(CountBadge, { value: screen.badge, size: "tile" }), onTogglePin ? ((0, jsx_runtime_1.jsx)(react_1.Box, { position: "relative", zIndex: 1, flexShrink: 0, w: "0", overflow: "hidden", transition: (0, motion_1.transitionFor)(["width"]), _groupHover: { w: "22px" }, _groupFocusWithin: { w: "22px" }, children: (0, jsx_runtime_1.jsx)(PinToggle_1.default, { isPinned: true, size: 12, label: labels.unpin(screen.label), title: labels.unpinTip, onToggle: onTogglePin }) })) : null] }));
188
+ }
189
+ function AppsSection({ apps, hues, currentAppId, heading, onSelect, }) {
190
+ const { colors } = (0, useCustomTheme_1.useCustomTheme)();
191
+ const rows = (0, rowStates_1.listRowBackgrounds)(colors);
192
+ const rowRing = (0, exports.activeRowSurface)(colors);
193
+ return ((0, jsx_runtime_1.jsxs)(react_1.Box, { children: [(0, jsx_runtime_1.jsx)(SectionHeader, { label: heading, isRail: true, hasCount: false }), (0, jsx_runtime_1.jsx)(react_1.Box, { as: "ul", listStyleType: "none", m: 0, p: 0, "aria-label": heading, children: apps.map((app, index) => {
194
+ var _a;
195
+ const isCurrent = app.id === currentAppId;
196
+ const interactive = !isCurrent && !app.locked;
197
+ return ((0, jsx_runtime_1.jsx)(react_1.Box, { as: "li", children: (0, jsx_runtime_1.jsxs)(react_1.Flex, { as: interactive ? "a" : "div", ...(interactive
198
+ ? {
199
+ href: app.url,
200
+ target: "_blank",
201
+ rel: "noopener noreferrer",
202
+ "data-launcher-item": true,
203
+ onClick: (event) => onSelect(app, event),
204
+ }
205
+ : {}), "aria-current": isCurrent ? "true" : undefined, title: app.locked
206
+ ? ((_a = app.lockedReason) !== null && _a !== void 0 ? _a : `${app.name} is not available on your plan`)
207
+ : undefined, "data-app-locked": app.locked ? "true" : undefined, "aria-disabled": app.locked ? "true" : undefined, align: "center", gap: 3, minH: "44px", px: 2, py: 1, borderRadius: "8px", textDecoration: "none", cursor: interactive ? "pointer" : "default", bg: isCurrent ? rows.selected : "transparent", transition: (0, motion_1.transitionFor)(["background-color"]), _hover: interactive ? { bg: rows.active } : undefined, sx: {
208
+ _focusVisible: rowRing,
209
+ [focusRing_styles_1.FOCUS_VISIBLE_OVER_STATE]: rowRing,
210
+ }, children: [(0, jsx_runtime_1.jsx)(AppMark_1.default, { app: app, hue: hues[index], boxSize: "28px", iconSize: 15, muted: app.locked }), (0, jsx_runtime_1.jsx)(OverflowToolTip_1.default, { label: app.name, placement: "top-start", children: (0, jsx_runtime_1.jsx)(react_1.Text, { flex: 1, minW: 0, fontSize: "sm", fontWeight: "medium", noOfLines: 1, color: app.locked ? colors.textMuted : colors.text[900], children: app.name }) }), app.locked ? ((0, jsx_runtime_1.jsx)(react_1.Box, { as: lucide_react_1.Lock, size: 14, color: colors.textMuted, flexShrink: 0, "aria-hidden": true })) : null] }) }, app.id || app.name));
211
+ }) })] }));
212
+ }