@handijitcom/ui 3.3.1 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/README.md +247 -0
  2. package/build/chat.css +1 -1
  3. package/build/components/AppShell/Nav.cjs +1 -1
  4. package/build/components/AppShell/Nav.cjs.map +1 -1
  5. package/build/components/AppShell/Nav.d.cts +8 -1
  6. package/build/components/AppShell/Nav.d.ts +8 -1
  7. package/build/components/AppShell/Nav.js +127 -112
  8. package/build/components/AppShell/Nav.js.map +1 -1
  9. package/build/components/AppShell/style.css +1 -1
  10. package/build/components/AppliedFilters/index.cjs +2 -0
  11. package/build/components/AppliedFilters/index.cjs.map +1 -0
  12. package/build/components/AppliedFilters/index.d.cts +33 -0
  13. package/build/components/AppliedFilters/index.d.ts +33 -0
  14. package/build/components/AppliedFilters/index.js +85 -0
  15. package/build/components/AppliedFilters/index.js.map +1 -0
  16. package/build/components/AppliedFilters/style.css +1 -0
  17. package/build/components/BrandLockup/index.cjs +2 -0
  18. package/build/components/BrandLockup/index.cjs.map +1 -0
  19. package/build/components/BrandLockup/index.d.cts +29 -0
  20. package/build/components/BrandLockup/index.d.ts +29 -0
  21. package/build/components/BrandLockup/index.js +41 -0
  22. package/build/components/BrandLockup/index.js.map +1 -0
  23. package/build/components/BrandLockup/style.css +1 -0
  24. package/build/components/Carousel/index.cjs +1 -1
  25. package/build/components/Carousel/index.cjs.map +1 -1
  26. package/build/components/Carousel/index.d.cts +9 -0
  27. package/build/components/Carousel/index.d.ts +9 -0
  28. package/build/components/Carousel/index.js +65 -60
  29. package/build/components/Carousel/index.js.map +1 -1
  30. package/build/components/Carousel/style.css +1 -1
  31. package/build/components/CodeText/CodeTextCopy.cjs +2 -0
  32. package/build/components/CodeText/CodeTextCopy.cjs.map +1 -0
  33. package/build/components/CodeText/CodeTextCopy.d.cts +11 -0
  34. package/build/components/CodeText/CodeTextCopy.d.ts +11 -0
  35. package/build/components/CodeText/CodeTextCopy.js +41 -0
  36. package/build/components/CodeText/CodeTextCopy.js.map +1 -0
  37. package/build/components/CodeText/index.cjs +2 -0
  38. package/build/components/CodeText/index.cjs.map +1 -0
  39. package/build/components/CodeText/index.d.cts +26 -0
  40. package/build/components/CodeText/index.d.ts +26 -0
  41. package/build/components/CodeText/index.js +39 -0
  42. package/build/components/CodeText/index.js.map +1 -0
  43. package/build/components/CodeText/style.css +1 -0
  44. package/build/components/Combobox/index.cjs +1 -1
  45. package/build/components/Combobox/index.cjs.map +1 -1
  46. package/build/components/Combobox/index.js +147 -146
  47. package/build/components/Combobox/index.js.map +1 -1
  48. package/build/components/Combobox/style.css +1 -1
  49. package/build/components/CompareTray/index.cjs +2 -0
  50. package/build/components/CompareTray/index.cjs.map +1 -0
  51. package/build/components/CompareTray/index.d.cts +44 -0
  52. package/build/components/CompareTray/index.d.ts +44 -0
  53. package/build/components/CompareTray/index.js +94 -0
  54. package/build/components/CompareTray/index.js.map +1 -0
  55. package/build/components/CompareTray/style.css +1 -0
  56. package/build/components/DataTable/index.cjs +1 -1
  57. package/build/components/DataTable/index.cjs.map +1 -1
  58. package/build/components/DataTable/index.d.cts +12 -0
  59. package/build/components/DataTable/index.d.ts +12 -0
  60. package/build/components/DataTable/index.js +120 -122
  61. package/build/components/DataTable/index.js.map +1 -1
  62. package/build/components/DataTable/style.css +1 -1
  63. package/build/components/Eyebrow/style.css +1 -1
  64. package/build/components/FacetSection/index.cjs +2 -0
  65. package/build/components/FacetSection/index.cjs.map +1 -0
  66. package/build/components/FacetSection/index.d.cts +75 -0
  67. package/build/components/FacetSection/index.d.ts +75 -0
  68. package/build/components/FacetSection/index.js +199 -0
  69. package/build/components/FacetSection/index.js.map +1 -0
  70. package/build/components/FacetSection/style.css +1 -0
  71. package/build/components/FacetSidebar/index.cjs +2 -0
  72. package/build/components/FacetSidebar/index.cjs.map +1 -0
  73. package/build/components/FacetSidebar/index.d.cts +35 -0
  74. package/build/components/FacetSidebar/index.d.ts +35 -0
  75. package/build/components/FacetSidebar/index.js +110 -0
  76. package/build/components/FacetSidebar/index.js.map +1 -0
  77. package/build/components/FacetSidebar/style.css +1 -0
  78. package/build/components/FilterToolbar/index.cjs +2 -0
  79. package/build/components/FilterToolbar/index.cjs.map +1 -0
  80. package/build/components/FilterToolbar/index.d.cts +55 -0
  81. package/build/components/FilterToolbar/index.d.ts +55 -0
  82. package/build/components/FilterToolbar/index.js +149 -0
  83. package/build/components/FilterToolbar/index.js.map +1 -0
  84. package/build/components/FilterToolbar/style.css +1 -0
  85. package/build/components/Gallery/index.cjs +1 -1
  86. package/build/components/Gallery/index.cjs.map +1 -1
  87. package/build/components/Gallery/index.d.cts +8 -1
  88. package/build/components/Gallery/index.d.ts +8 -1
  89. package/build/components/Gallery/index.js +146 -138
  90. package/build/components/Gallery/index.js.map +1 -1
  91. package/build/components/Gallery/style.css +1 -1
  92. package/build/components/MegaMenu/index.cjs +2 -0
  93. package/build/components/MegaMenu/index.cjs.map +1 -0
  94. package/build/components/MegaMenu/index.d.cts +67 -0
  95. package/build/components/MegaMenu/index.d.ts +67 -0
  96. package/build/components/MegaMenu/index.js +220 -0
  97. package/build/components/MegaMenu/index.js.map +1 -0
  98. package/build/components/MegaMenu/style.css +1 -0
  99. package/build/components/MoneyInput/index.cjs +1 -1
  100. package/build/components/MoneyInput/index.cjs.map +1 -1
  101. package/build/components/MoneyInput/index.js +10 -10
  102. package/build/components/MoneyInput/index.js.map +1 -1
  103. package/build/components/NotificationCenter/style.css +1 -1
  104. package/build/components/PageHeader/style.css +1 -1
  105. package/build/components/Popover/style.css +1 -1
  106. package/build/components/ProductCarousel/index.cjs +2 -0
  107. package/build/components/ProductCarousel/index.cjs.map +1 -0
  108. package/build/components/ProductCarousel/index.d.cts +35 -0
  109. package/build/components/ProductCarousel/index.d.ts +35 -0
  110. package/build/components/ProductCarousel/index.js +86 -0
  111. package/build/components/ProductCarousel/index.js.map +1 -0
  112. package/build/components/ProductCarousel/style.css +1 -0
  113. package/build/components/Radio/index.cjs +1 -1
  114. package/build/components/Radio/index.cjs.map +1 -1
  115. package/build/components/Radio/index.js +10 -10
  116. package/build/components/Radio/index.js.map +1 -1
  117. package/build/components/SectionHeader/index.cjs +1 -1
  118. package/build/components/SectionHeader/index.cjs.map +1 -1
  119. package/build/components/SectionHeader/index.js +4 -4
  120. package/build/components/SectionHeader/index.js.map +1 -1
  121. package/build/components/SectionHeader/style.css +1 -1
  122. package/build/components/SegmentedControl/index.cjs +1 -1
  123. package/build/components/SegmentedControl/index.cjs.map +1 -1
  124. package/build/components/SegmentedControl/index.js +23 -23
  125. package/build/components/SegmentedControl/index.js.map +1 -1
  126. package/build/components/Select/index.cjs +1 -1
  127. package/build/components/Select/index.cjs.map +1 -1
  128. package/build/components/Select/index.js +37 -37
  129. package/build/components/Select/index.js.map +1 -1
  130. package/build/components/Select/style.css +1 -1
  131. package/build/components/Skeleton/index.cjs +1 -1
  132. package/build/components/Skeleton/index.cjs.map +1 -1
  133. package/build/components/Skeleton/index.js +16 -16
  134. package/build/components/Skeleton/index.js.map +1 -1
  135. package/build/components/SortableList/index.cjs +2 -0
  136. package/build/components/SortableList/index.cjs.map +1 -0
  137. package/build/components/SortableList/index.d.cts +37 -0
  138. package/build/components/SortableList/index.d.ts +37 -0
  139. package/build/components/SortableList/index.js +159 -0
  140. package/build/components/SortableList/index.js.map +1 -0
  141. package/build/components/SortableList/style.css +1 -0
  142. package/build/components/Steps/index.cjs +1 -1
  143. package/build/components/Steps/index.cjs.map +1 -1
  144. package/build/components/Steps/index.d.cts +6 -0
  145. package/build/components/Steps/index.d.ts +6 -0
  146. package/build/components/Steps/index.js +37 -35
  147. package/build/components/Steps/index.js.map +1 -1
  148. package/build/components/Steps/style.css +1 -1
  149. package/build/components/StickyActionBar/index.cjs +2 -0
  150. package/build/components/StickyActionBar/index.cjs.map +1 -0
  151. package/build/components/StickyActionBar/index.d.cts +29 -0
  152. package/build/components/StickyActionBar/index.d.ts +29 -0
  153. package/build/components/StickyActionBar/index.js +57 -0
  154. package/build/components/StickyActionBar/index.js.map +1 -0
  155. package/build/components/StickyActionBar/style.css +1 -0
  156. package/build/components/Table/index.cjs +1 -1
  157. package/build/components/Table/index.cjs.map +1 -1
  158. package/build/components/Table/index.d.cts +6 -0
  159. package/build/components/Table/index.d.ts +6 -0
  160. package/build/components/Table/index.js +34 -32
  161. package/build/components/Table/index.js.map +1 -1
  162. package/build/components/Table/style.css +1 -1
  163. package/build/helpers/carousel.helper.cjs +2 -0
  164. package/build/helpers/carousel.helper.cjs.map +1 -0
  165. package/build/helpers/carousel.helper.d.cts +11 -0
  166. package/build/helpers/carousel.helper.d.ts +11 -0
  167. package/build/helpers/carousel.helper.js +10 -0
  168. package/build/helpers/carousel.helper.js.map +1 -0
  169. package/build/helpers/facet.helper.cjs +2 -0
  170. package/build/helpers/facet.helper.cjs.map +1 -0
  171. package/build/helpers/facet.helper.d.cts +6 -0
  172. package/build/helpers/facet.helper.d.ts +6 -0
  173. package/build/helpers/facet.helper.js +5 -0
  174. package/build/helpers/facet.helper.js.map +1 -0
  175. package/build/helpers/focus.helper.cjs +1 -1
  176. package/build/helpers/focus.helper.cjs.map +1 -1
  177. package/build/helpers/focus.helper.d.cts +2 -0
  178. package/build/helpers/focus.helper.d.ts +2 -0
  179. package/build/helpers/focus.helper.js +1 -0
  180. package/build/helpers/focus.helper.js.map +1 -1
  181. package/build/helpers/sortable.helper.cjs +2 -0
  182. package/build/helpers/sortable.helper.cjs.map +1 -0
  183. package/build/helpers/sortable.helper.d.cts +19 -0
  184. package/build/helpers/sortable.helper.d.ts +19 -0
  185. package/build/helpers/sortable.helper.js +20 -0
  186. package/build/helpers/sortable.helper.js.map +1 -0
  187. package/build/helpers/sticky-bar.helper.cjs +2 -0
  188. package/build/helpers/sticky-bar.helper.cjs.map +1 -0
  189. package/build/helpers/sticky-bar.helper.d.cts +6 -0
  190. package/build/helpers/sticky-bar.helper.d.ts +6 -0
  191. package/build/helpers/sticky-bar.helper.js +8 -0
  192. package/build/helpers/sticky-bar.helper.js.map +1 -0
  193. package/build/hooks/useRemovalFocus.cjs +2 -0
  194. package/build/hooks/useRemovalFocus.cjs.map +1 -0
  195. package/build/hooks/useRemovalFocus.d.cts +13 -0
  196. package/build/hooks/useRemovalFocus.d.ts +13 -0
  197. package/build/hooks/useRemovalFocus.js +21 -0
  198. package/build/hooks/useRemovalFocus.js.map +1 -0
  199. package/build/index.cjs +1 -1
  200. package/build/index.d.cts +13 -2
  201. package/build/index.d.ts +13 -2
  202. package/build/index.js +115 -93
  203. package/build/index.js.map +1 -1
  204. package/build/scss/_mixins.scss +3 -1
  205. package/build/styles.css +38 -14
  206. package/build/types/sortable.type.d.cts +12 -0
  207. package/build/types/sortable.type.d.ts +12 -0
  208. package/build/types/theme.type.d.cts +95 -0
  209. package/build/types/theme.type.d.ts +95 -0
  210. package/build/types/types/theme.type.d.cts +95 -0
  211. package/build/types/types/theme.type.d.ts +95 -0
  212. package/package.json +111 -1
package/README.md CHANGED
@@ -237,6 +237,8 @@ Besides the design tokens, a few components read custom properties of their own
237
237
  | `Tabs` | `--ui-tab-weight` |
238
238
  | `RadioCard` | `--ui-radio-card-line` · `-radius` |
239
239
  | sticky parts | `--ui-header-height` (see below) |
240
+ | overlines | `--ui-overline-font` (3.4): the family of every overline — `Eyebrow`, section and filter leads, sticky table heads |
241
+ | bottom bars | `--ui-sticky-bar-height` (3.4): written by `StickyActionBar` while shown; `CompareTray` sits above it, a page can pad with it |
240
242
 
241
243
  ```css
242
244
  :root {
@@ -245,6 +247,7 @@ Besides the design tokens, a few components read custom properties of their own
245
247
  --ui-chip-radius: var(--hd-radius-pill);
246
248
  --ui-badge-font: var(--hd-font-mono);
247
249
  --ui-badge-transform: uppercase;
250
+ --ui-overline-font: var(--hd-font-mono);
248
251
  }
249
252
  ```
250
253
 
@@ -347,6 +350,59 @@ either. Labels are given **once**, on the provider:
347
350
  more: count => `+${count} daha`,
348
351
  moved: (title, when) => `${title} taşındı: ${when}`,
349
352
  },
353
+ facets: {
354
+ title: 'Filtreler',
355
+ clearAll: 'Tümünü temizle',
356
+ clear: 'Temizle',
357
+ apply: 'Sonuçları göster',
358
+ applyRange: 'Uygula',
359
+ showMore: count => `${count} seçenek daha`,
360
+ showLess: 'Daha az göster',
361
+ search: title => `${title} içinde ara`,
362
+ noMatch: term => `“${term}” için sonuç yok`,
363
+ selected: count => `${count} seçili`,
364
+ },
365
+ appliedFilters: {
366
+ title: 'Uygulanan filtreler',
367
+ remove: (group, value) => `${group}: ${value} filtresini kaldır`,
368
+ clearAll: 'Tümünü temizle',
369
+ more: count => `+${count} filtre daha`,
370
+ },
371
+ filterToolbar: {
372
+ filter: 'Filtrele',
373
+ activeFilters: count => `${count} filtre uygulandı`,
374
+ sort: 'Sırala',
375
+ view: 'Görünüm',
376
+ viewTable: 'Tablo',
377
+ viewCards: 'Kartlar',
378
+ density: 'Yoğunluk',
379
+ densityComfortable: 'Rahat',
380
+ densityCompact: 'Sıkı',
381
+ pageSize: 'Sayfa başına',
382
+ perPage: size => `${size} / sayfa`,
383
+ },
384
+ sortableList: {
385
+ instructions: 'Boşluk ile tutun, oklarla taşıyın, Boşluk ile bırakın, Escape ile vazgeçin.',
386
+ handle: item => `${item} öğesini taşı`,
387
+ grabbed: (item, position, total) => `${item} tutuldu, sıra ${position} / ${total}`,
388
+ moved: (item, position, total) => `${item}: sıra ${position} / ${total}`,
389
+ dropped: (item, position, total) => `${item} bırakıldı, sıra ${position} / ${total}`,
390
+ cancelled: item => `${item} taşınmadı`,
391
+ },
392
+ compareTray: {
393
+ title: 'Karşılaştırma listesi',
394
+ count: (count, max) => `${count}/${max}`,
395
+ remove: item => `${item} ürününü karşılaştırmadan çıkar`,
396
+ clear: 'Temizle',
397
+ compare: count => `Karşılaştır (${count})`,
398
+ needMore: min => `En az ${min} ürün seçin`,
399
+ },
400
+ productCarousel: {
401
+ previous: title => `${title}: önceki ürünler`,
402
+ next: title => `${title}: sonraki ürünler`,
403
+ seeAll: 'Tümünü gör',
404
+ },
405
+ megaMenu: { navigation: 'Kategoriler', menu: 'Menü', seeAll: label => `Tüm ${label}` },
350
406
  rating: {
351
407
  srLabel: (value, count) => `5 üzerinden ${value}${count ? `, ${count} değerlendirme` : ''}`,
352
408
  starCount: star => `${star} yıldız`,
@@ -442,6 +498,7 @@ and changes when an announcement strip appears.
442
498
  | Shell (3.2) | `AppShell` (+ `AppShellNav`, `AppShellNavGroup`, `AppShellNavItem`) · `UserMenu` |
443
499
  | Modal | `Modal` · `Drawer` · `BottomSheet` · `ConfirmDialog` · `PromptDialog` · `CommandPalette` |
444
500
  | Data | `Table` (+ `TableScroller`) · `DataTable` (+ `DataTableRow`, `DataTableColumnMenu`) · `FilterBar` (+ `FilterBarField`) · `Pagination` · `Timeline` |
501
+ | Commerce (3.4) | `FacetSidebar` · `FacetSection` · `AppliedFilters` · `FilterToolbar` · `SortableList` · `CodeText` · `BrandLockup` · `StickyActionBar` · `CompareTray` · `ProductCarousel` · `MegaMenu` |
445
502
  | Theme and hooks | `UiProvider` · `UiThemeScript` · `useUi` · `useUiTheme` · `useUiTokens` · `useAnnounce` · `useStickToBottom` · `usePositioning` · `useVirtualList` · `useListboxNavigation` · `hasOpenSurface` |
446
503
  | Chat, `/chat` | `ChatThread` · `ChatMessage` · `PromptInput` · `PromptSuggestions` · `Prose` · `CodeBlock` · `ReasoningBlock` (+ `ReasoningText`) · `ToolCall` (+ `ToolCallSection`) · `TerminalOutput` · `SourceList` · `Citation` · `MessageActions` · `AppBar` · `ActionList` (+ `ActionListItem`) · `SegmentBar` · `Legend` · `DescriptionList` |
447
504
  | Charts, `/charts` | `LineChart` · `AreaChart` · `BarChart` · `ComposedChart` · `PieChart` · `ScatterPlot` · `Heatmap` · `BoxPlot` · `Histogram` · `RadarChart` |
@@ -852,6 +909,196 @@ and one flag.
852
909
  rule. Give its `Price` a larger `size` for more weight; usually one row has it.
853
910
  - A row never breaks across two printed pages.
854
911
 
912
+ ### Commerce building blocks (3.4)
913
+
914
+ A storefront's catalogue, product page and header. Each component has its own
915
+ subpath (`/facet-sidebar`, `/facet-section`, `/applied-filters`,
916
+ `/filter-toolbar`, `/sortable-list`, `/code-text`, `/brand-lockup`,
917
+ `/sticky-action-bar`, `/compare-tray`, `/product-carousel`, `/mega-menu`); a
918
+ page pays for what it imports. None of them reads the URL: the app holds the
919
+ filter state (usually in the query string) and passes values and callbacks.
920
+ Links go through the provider's `linkComponent`, texts through `labels`.
921
+
922
+ **Filters: `FacetSidebar` + `FacetSection`.** The column sticks below the
923
+ header (`--ui-header-height`) and scrolls inside itself; at tablet width and
924
+ below it is hidden and the same sections open in a `Drawer` with clear and
925
+ apply buttons. A section is a plain `Disclosure` with a selection badge; it
926
+ opens by itself while it holds a selection.
927
+
928
+ ```tsx
929
+ <FacetSidebar
930
+ activeCount={active}
931
+ onClearAll={clearAll}
932
+ isDrawerOpen={isFiltersOpen}
933
+ onDrawerClose={closeFilters}
934
+ applyLabel={`${formatNumber(total)} ürünü göster`}
935
+ >
936
+ <FacetSection title="Kategori" mode="link" options={categories} selected={[category]} />
937
+ <FacetSection title="Marka" options={brands} selected={brandIds} onChange={setBrands} onClear={clearBrands} />
938
+ <FacetSection title="Kalite" mode="radio" options={qualities} selected={[quality]} onChange={([q]) => setQuality(q)} />
939
+ <FacetSection title="Fiyat" mode="range" currency="TL" range={price} onRangeChange={setPrice} onClear={clearPrice} />
940
+ <FacetSection title="Aracım" selectedCount={vehicle ? 1 : 0}>
941
+ <VehiclePicker />
942
+ </FacetSection>
943
+ </FacetSidebar>
944
+ ```
945
+
946
+ - **Modes.** `checkbox` (many values, the default), `radio` (one), `link` (a
947
+ category tree: the current one is `aria-current="page"`), `range` (two
948
+ `MoneyInput`s in minor units, applied by the button or Enter, never per
949
+ keystroke), or your own `children`.
950
+ - **Long lists.** After `visibleCount` options (6) a "show more" button
951
+ unfolds the rest; a selected option is never folded away. Above
952
+ `searchThreshold` options (10) a search field filters the list without case
953
+ or accents. An option with `count: 0` that is not selected is disabled: it
954
+ leads to an empty page.
955
+
956
+ **`AppliedFilters`.** One removable chip per applied value, "Marka: Bosch",
957
+ each named "Marka: Bosch filtresini kaldır"; `extraCount` names the filters a
958
+ chip cannot ("+2 filtre daha"). Draws nothing when nothing is applied. After a
959
+ removal, focus moves to the chip that took its place, so a keyboard user can
960
+ keep removing.
961
+
962
+ ```tsx
963
+ <AppliedFilters
964
+ filters={applied.map(filter => ({ key: filter.key, group: filter.group, label: filter.label, onRemove: () => remove(filter.key) }))}
965
+ onClearAll={clearAll}
966
+ />
967
+ ```
968
+
969
+ **`FilterToolbar`.** The bar above a result list. Each control appears when
970
+ its props are given: the narrow-screen "filter" button with its badge
971
+ (`onFilterClick`, `activeFilterCount`), the count (`count`, a skeleton while
972
+ `isCountLoading`, never a misleading "0"), the view switch (`view`: `table` /
973
+ `cards`), density (`comfortable` / `compact`, which matches
974
+ `DataTable.density`), page size and sort. `children` adds your own controls;
975
+ `isSticky` keeps it below the header.
976
+
977
+ ```tsx
978
+ <FilterToolbar
979
+ count={<><strong>{formatNumber(total)}</strong> ürün</>}
980
+ onFilterClick={openFilters}
981
+ activeFilterCount={active}
982
+ sortOptions={SORT_OPTIONS}
983
+ sortValue={sort}
984
+ onSortChange={setSort}
985
+ view={view}
986
+ onViewChange={setView}
987
+ pageSizeOptions={[24, 48, 96]}
988
+ pageSize={size}
989
+ onPageSizeChange={setSize}
990
+ />
991
+ ```
992
+
993
+ **`SortableList`.** Reordering by pointer drag or keyboard, with no library:
994
+ each item gets a handle (`renderItem`'s `handle`); Space grabs, the arrows (and
995
+ Home/End) move, Space drops, Escape puts the order back, and every step is
996
+ announced. `onReorder` receives the new order once, on the drop. `moveTo(0)`
997
+ moves an item at once, which is how an image becomes the cover. `layout="grid"`
998
+ lays tiles in a wrapping grid (`--ui-sortable-tile`, 120px).
999
+
1000
+ ```tsx
1001
+ <SortableList
1002
+ label="Ürün görselleri"
1003
+ layout="grid"
1004
+ items={images}
1005
+ getKey={image => image.id}
1006
+ getLabel={image => image.alt}
1007
+ onReorder={setImages}
1008
+ renderItem={(image, { handle, index, moveTo }) => (
1009
+ <Card>
1010
+ <CardMedia src={image.url} alt={image.alt} />
1011
+ <CardFooter>
1012
+ {handle}
1013
+ {index === 0 ? <Badge tone="info">Kapak</Badge> : <Button variant={UIVariant.GHOST} size={UISize.SMALL} onClick={() => moveTo(0)}>Kapak yap</Button>}
1014
+ </CardFooter>
1015
+ </Card>
1016
+ )}
1017
+ />
1018
+ ```
1019
+
1020
+ **`CodeText`.** A calm inline code for a part, OEM or order number: the mono
1021
+ family a step below the text around it, tabular figures, no surface (the heavy
1022
+ ink badge is `CodeBadge`). One click selects the whole code; `isCopyable`
1023
+ adds a copy button with `labels.copyField`'s texts. Without `isCopyable` it is
1024
+ a server component.
1025
+
1026
+ ```tsx
1027
+ <p>OEM: <CodeText code="1K0 615 301 AA" isMuted isCopyable /></p>
1028
+ ```
1029
+
1030
+ **`BrandLockup`.** A client's mark for an app's header or footer: the logo
1031
+ (decorative, the name is written next to it) or a cobalt tile with the
1032
+ initial, the name, an optional tagline, `size` `sm` / `md` / `lg`. With `href`
1033
+ it is the home link.
1034
+
1035
+ ```tsx
1036
+ <BrandLockup name="Yıldız Oto" tagline="Yedek parça" href="/" logo={<img src="/logo.svg" alt="" />} />
1037
+ ```
1038
+
1039
+ **`StickyActionBar`.** Keeps the page's main action in reach: an
1040
+ edge-to-edge bar on a phone, a docked bar centred at the bottom on a wider
1041
+ screen. It appears once its target (`targetRef` or `targetId`, the buy box) has
1042
+ been scrolled **past**, not while it is still below the fold, and is inert and
1043
+ hidden from screen readers otherwise. An `IntersectionObserver` watches the
1044
+ target; on the server or without one the bar stays hidden (`isVisible`
1045
+ controls it by hand). While shown it writes its height to
1046
+ `--ui-sticky-bar-height`.
1047
+
1048
+ ```tsx
1049
+ <StickyActionBar label="Sepete ekle" targetRef={buyBoxRef} info={<><strong>{name}</strong><Price value={price} size="sm" /></>}>
1050
+ <Button variant={UIVariant.ACCENT} onClick={addToCart}>Sepete ekle</Button>
1051
+ </StickyActionBar>
1052
+ ```
1053
+
1054
+ **`CompareTray`.** The items picked for comparison, fixed to the bottom edge
1055
+ (above the sticky bar when it is shown): removable name chips, "2/4", clear,
1056
+ and compare as a link (`compareHref`) or an action (`onCompare`). Below
1057
+ `minItems` (2) the button is disabled and says why. Draws nothing when empty.
1058
+
1059
+ ```tsx
1060
+ <CompareTray max={4} items={picked} onRemove={unpick} onClear={clear} compareHref={`/karsilastir?urunler=${ids}`} />
1061
+ ```
1062
+
1063
+ **`ProductCarousel`.** A showcase rail ("Çok satanlar") on `Carousel`: a
1064
+ section heading with "see all", arrows that page the rail, snap, responsive
1065
+ card counts (`itemsPerView`, default `{ base: 1.5, sm: 2.5, md: 3, lg: 4, xl: 5 }`
1066
+ — the fraction lets the next card peek), and ←/→/Home/End moving focus from
1067
+ card to card. Draws nothing without cards. `Carousel` itself gained the two
1068
+ options it needed: `itemsPerView` and `header`.
1069
+
1070
+ ```tsx
1071
+ <ProductCarousel title="Çok satanlar" description="Son 30 gün" seeAllHref="/arama?siralama=cok-satan">
1072
+ {products.map(product => <ProductCard key={product.id} product={product} />)}
1073
+ </ProductCarousel>
1074
+ ```
1075
+
1076
+ **`MegaMenu`.** The header's category navigation: top-level categories, and
1077
+ under each a panel of sub-category columns (icons or thumbnails, a
1078
+ description line, a `feature` slot for a campaign card, "Tüm …" to the
1079
+ category page). It is a disclosure navigation, not an ARIA menu: the links are
1080
+ links and Tab walks them; ←/→/Home/End move along the bar, ↓ opens a panel and
1081
+ enters it, Escape closes it back on its button, and a resting mouse pointer
1082
+ opens it (touch does not). At tablet width and below the bar is hidden and the
1083
+ app's menu button opens a `Drawer` (`isDrawerOpen`) where each category is a
1084
+ section that opens in place.
1085
+
1086
+ ```tsx
1087
+ <MegaMenu items={categories} isDrawerOpen={isMenuOpen} onDrawerClose={closeMenu} />
1088
+ ```
1089
+
1090
+ **Smaller additions.**
1091
+
1092
+ | Component | 3.4 option |
1093
+ | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1094
+ | `DataTable` | `DataTableColumn.align` (`start` / `end` / `center`) and `isNumeric` (end-aligned, tabular figures, no wrap); the header's sort button follows the alignment |
1095
+ | `Gallery` | `placeholder` (drawn in the image's place when there is no image; an empty gallery drew nothing) and `hasCounter` ("2 / 5" on the main image) |
1096
+ | `Steps` | `mobileLayout="row"`: a checkout's steps stay on one line on a phone, only the current label written (the others are still read) |
1097
+ | `Table` | `variant="spec"`: technical specifications — `th scope="row"` keys in the secondary colour, values in mono tabular figures |
1098
+ | `AppShellNav` | `onClick` on an item without `href`: an action row ("Çıkış yap") with the link rows' metrics, for an account sidebar |
1099
+ | `Carousel` | `itemsPerView` and `header` (see `ProductCarousel`) |
1100
+ | overlines | `--ui-overline-font` sets the family of every overline at once |
1101
+
855
1102
  ### Printing (3.3.0)
856
1103
 
857
1104
  The paper holds the page, not the screen's controls. Nothing to call: the
package/build/chat.css CHANGED
@@ -1 +1 @@
1
- @layer ui{.ui-thread-R1LCJ{position:relative;display:grid;grid-template-rows:minmax(0,1fr) auto;height:100%;min-height:0}.ui-thread__scroll-37EaI{position:relative;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--hd-border-strong) transparent}.ui-thread__scroll-37EaI::-webkit-scrollbar{width:8px;height:8px}.ui-thread__scroll-37EaI::-webkit-scrollbar-track{background:transparent}.ui-thread__scroll-37EaI::-webkit-scrollbar-thumb{background-color:var(--hd-border-strong);border-radius:var(--hd-radius-pill);border:2px solid transparent;background-clip:content-box}.ui-thread__scroll-37EaI::-webkit-scrollbar-thumb:hover{background-color:var(--hd-text-3)}.ui-thread__scroll-37EaI:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--hd-focus));outline-offset:var(--ui-ring-offset, -2px)}.ui-thread__column-57FQh{display:flex;flex-direction:column;gap:var(--hd-space-6);width:100%;max-width:768px;margin-inline:auto;padding:var(--hd-space-6) var(--hd-space-5)}@media (max-width: 640px){.ui-thread__column-57FQh{padding:var(--hd-space-5) var(--hd-space-4)}}.ui-thread__dock-y0Tt9 .ui-thread__column-57FQh{gap:var(--hd-space-2);padding-block:0 calc(var(--hd-space-4) + env(safe-area-inset-bottom,0px))}.ui-thread__dock-y0Tt9{position:relative;padding-top:var(--hd-space-3);background:linear-gradient(to bottom,transparent,var(--hd-bg-page) var(--hd-space-5))}.ui-thread__latest-ZNmqY{position:absolute;inset-block-start:calc(-1 * var(--hd-space-12));inset-inline:0;margin-inline:auto;box-shadow:var(--hd-shadow-2);background-color:var(--hd-bg-surface)}}@layer ui{.ui-message-z5uVx{display:flex;gap:var(--hd-space-3);width:100%}.ui-message--user-Mq6gb{justify-content:flex-end}.ui-message__avatar-QzWck{flex-shrink:0;margin-top:2px}.ui-message__main-1rh-A{display:flex;flex-direction:column;gap:var(--hd-space-2);min-width:0}.ui-message--assistant-ndkmH .ui-message__main-1rh-A{flex:1}.ui-message--user-Mq6gb .ui-message__main-1rh-A{align-items:flex-end;max-width:min(85%,640px)}.ui-message__body-Ngiqq{min-width:0}.ui-message--user-Mq6gb .ui-message__body-Ngiqq{padding:var(--hd-space-3) var(--hd-space-4);border-radius:var(--hd-radius-lg);border-end-end-radius:var(--hd-radius-xs);background-color:var(--hd-bg-raised);color:var(--hd-text);font-size:var(--hd-type-lead-size);line-height:var(--hd-type-body-line-height);white-space:pre-wrap;overflow-wrap:anywhere}.ui-message__actions-dQ0Fn{color:var(--hd-text-3);transition:color var(--hd-duration-fast) var(--hd-ease-standard)}.ui-message-z5uVx:hover .ui-message__actions-dQ0Fn,.ui-message-z5uVx:focus-within .ui-message__actions-dQ0Fn{color:var(--hd-text-2)}@media (prefers-reduced-motion: reduce){.ui-message__actions-dQ0Fn{transition:none}}}@layer ui{.ui-prompt-qHV1e{display:flex;flex-direction:column;gap:var(--hd-space-2);width:100%}.ui-prompt__box-sUQDu{display:flex;align-items:flex-end;gap:var(--hd-space-2);padding:var(--hd-space-2) var(--hd-space-2) var(--hd-space-2) var(--hd-space-4);border:1px solid var(--hd-border-control);border-radius:var(--hd-radius-lg);background-color:var(--hd-bg-surface);box-shadow:var(--hd-shadow-1);transition:border-color var(--hd-duration-fast) var(--hd-ease-standard),box-shadow var(--hd-duration-fast) var(--hd-ease-standard)}.ui-prompt__box-sUQDu:focus-within{border-color:var(--ui-ring-color, var(--hd-focus));box-shadow:0 0 0 3px color-mix(in srgb,var(--hd-focus) 32%,transparent)}.ui-prompt__box--disabled-xu-Yk{background-color:var(--hd-bg-raised);border-color:var(--hd-border);cursor:not-allowed;color:var(--hd-text-3)}@media (forced-colors: active){.ui-prompt__box--disabled-xu-Yk{color:GrayText;border-color:GrayText}}.ui-prompt__box--disabled-xu-Yk{box-shadow:none}@media (prefers-reduced-motion: reduce){.ui-prompt__box-sUQDu{transition:none}}.ui-prompt__field-EmvTZ{flex:1;min-width:0;padding-block:9px}.ui-prompt__start-2tqre,.ui-prompt__end-Zp7fi{display:flex;align-items:center;gap:var(--hd-space-1);flex-shrink:0;min-height:40px}.ui-prompt__hint-4TpeC{text-align:center;font-size:var(--hd-type-caption-size);color:var(--hd-text-3)}}@layer ui{.ui-grid-4EfQ-{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(220px,100%),1fr));gap:var(--hd-space-2);width:100%}.ui-card-KTt0-{display:flex;flex-direction:column;gap:2px;min-height:44px;padding:var(--hd-space-3) var(--hd-space-4);border:1px solid var(--hd-border);border-radius:var(--hd-radius-md);color:var(--hd-text);font:inherit;text-align:start;cursor:pointer;background-color:var(--hd-bg-surface);transition:background-color var(--hd-duration-fast) var(--hd-ease-standard),translate var(--hd-duration-fast) var(--hd-ease-standard)}.ui-card-KTt0-:hover:not(:disabled):not([aria-disabled=true]){background-color:var(--hd-bg-raised)}.ui-card-KTt0-:active:not(:disabled):not([aria-disabled=true]){background-color:var(--hd-bg-inset);translate:0 1px}@media (prefers-reduced-motion: reduce){.ui-card-KTt0-{transition:none}.ui-card-KTt0-:active:not(:disabled):not([aria-disabled=true]){translate:none}}.ui-card-KTt0-:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--hd-focus));outline-offset:var(--ui-ring-offset, 2px)}.ui-card__label-LNLTF{font-size:var(--hd-type-small-size);font-weight:var(--hd-font-weight-medium)}.ui-card__description-eIx-0{font-size:var(--hd-type-caption-size);color:var(--hd-text-2)}}@layer ui{.ui-prose-kAp6f{font-size:var(--hd-type-lead-size);line-height:var(--hd-type-body-line-height);color:var(--hd-text);overflow-wrap:break-word}.ui-prose-kAp6f>:first-child{margin-top:0}.ui-prose-kAp6f>:last-child{margin-bottom:0}.ui-prose-kAp6f h1,.ui-prose-kAp6f h2,.ui-prose-kAp6f h3,.ui-prose-kAp6f h4{margin:1.4em 0 .5em;font-family:var(--hd-font-display);font-weight:var(--hd-font-weight-semibold);line-height:var(--hd-type-h4-line-height);color:var(--hd-text)}.ui-prose-kAp6f h1{font-size:var(--hd-type-h3-size);letter-spacing:var(--hd-type-h4-letter-spacing)}.ui-prose-kAp6f h2{font-size:var(--hd-type-h4-size)}.ui-prose-kAp6f h3,.ui-prose-kAp6f h4{font-size:var(--hd-type-body-size)}.ui-prose-kAp6f p{margin:.65em 0}.ui-prose-kAp6f ul,.ui-prose-kAp6f ol{margin:.65em 0;padding-inline-start:1.4em}.ui-prose-kAp6f li+li{margin-top:.25em}.ui-prose-kAp6f a{color:var(--hd-primary-text);text-decoration:underline;text-underline-offset:2px}.ui-prose-kAp6f a:hover{color:var(--hd-primary-text)}.ui-prose-kAp6f a:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--hd-focus));outline-offset:var(--ui-ring-offset, 2px)}.ui-prose-kAp6f blockquote{margin:.9em 0;padding-inline-start:var(--hd-space-4);border-inline-start:3px solid var(--hd-border-strong);color:var(--hd-text-2)}.ui-prose-kAp6f hr{margin:1.4em 0;border:0;border-top:1px solid var(--hd-border)}.ui-prose-kAp6f :not(pre)>code{font-family:var(--hd-font-mono);font-size:.88em;letter-spacing:.02em;font-variant-numeric:tabular-nums;padding:1px 5px;border:1px solid var(--hd-border);border-radius:var(--hd-radius-xs);background-color:var(--hd-bg-raised)}.ui-prose-kAp6f table{display:block;max-width:100%;margin:.9em 0;position:relative;overflow-x:auto;border-collapse:collapse;font-size:var(--hd-type-small-size)}.ui-prose-kAp6f th,.ui-prose-kAp6f td{padding:var(--hd-space-2) var(--hd-space-3);border:1px solid var(--hd-border);text-align:start;vertical-align:top}.ui-prose-kAp6f th{background-color:var(--hd-bg-raised);font-weight:var(--hd-font-weight-semibold)}.ui-prose-kAp6f .katex-display{margin:.9em 0;position:relative;overflow-x:auto;overflow-y:hidden}}@layer ui{.ui-block-M1yL9{margin:.9em 0;border:1px solid var(--hd-border);border-radius:var(--hd-radius-md);background-color:var(--hd-bg-inset);overflow:hidden}.ui-block__header-F2iBP{display:flex;align-items:center;justify-content:space-between;gap:var(--hd-space-2);min-height:36px;padding-inline:var(--hd-space-3) var(--hd-space-1);border-bottom:1px solid var(--hd-border);background-color:var(--hd-bg-raised)}.ui-block__language-lmdS9{font-family:var(--hd-font-mono);font-size:var(--hd-type-caption-size);letter-spacing:.02em;font-variant-numeric:tabular-nums;color:var(--hd-text-2);text-transform:lowercase}.ui-block__body-wDCJ2{position:relative;overflow:auto;scrollbar-width:thin;scrollbar-color:var(--hd-border-strong) transparent}.ui-block__body-wDCJ2::-webkit-scrollbar{width:8px;height:8px}.ui-block__body-wDCJ2::-webkit-scrollbar-track{background:transparent}.ui-block__body-wDCJ2::-webkit-scrollbar-thumb{background-color:var(--hd-border-strong);border-radius:var(--hd-radius-pill);border:2px solid transparent;background-clip:content-box}.ui-block__body-wDCJ2::-webkit-scrollbar-thumb:hover{background-color:var(--hd-text-3)}.ui-block__body-wDCJ2:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--hd-primary-text);outline-offset:var(--ui-ring-offset, -2px)}.ui-block__pre--EERi,.ui-block__highlighted-JK1Yj pre{margin:0;padding:var(--hd-space-3) var(--hd-space-4);background:transparent!important;font-family:var(--hd-font-mono);font-size:var(--hd-type-caption-size);line-height:var(--hd-type-body-line-height);white-space:pre;-moz-tab-size:2;tab-size:2}.ui-block__highlighted-JK1Yj span{color:var(--shiki-light);color:light-dark(var(--shiki-light),var(--shiki-dark))}.ui-block__token--comment-eFTyh{color:var(--hd-text-2);font-style:italic}.ui-block__token--keyword-qQpj9{color:var(--hd-primary-text)}.ui-block__token--string-4onwX,.ui-block__token--number-DThtL{color:var(--hd-accent-text)}.ui-block__token--name-283C9{color:var(--hd-text)}.ui-block__token--type-cNUbM{color:var(--hd-text);font-weight:var(--hd-font-weight-medium)}.ui-block__token--punctuation-Te2u8{color:var(--hd-text-2)}.ui-block__token--inserted-sUKnQ{color:var(--hd-primary-text)}.ui-block__token--deleted-s74a-{color:var(--hd-danger-fg)}}@layer ui{.ui-block-zqPjp summary{padding:var(--hd-space-1) var(--hd-space-2);margin-inline-start:calc(-1 * var(--hd-space-2));border-radius:var(--hd-radius-sm);font-weight:var(--hd-font-weight-medium);color:var(--hd-text-2)}.ui-block__summary-Kkp-X{display:inline-flex;align-items:center;gap:var(--hd-space-2)}.ui-block__indicator-GuJMa{display:inline-flex;color:var(--hd-text-2)}.ui-block__body-mDvrV{display:flex;flex-direction:column;gap:var(--hd-space-3);margin-top:var(--hd-space-2);padding-inline-start:var(--hd-space-4);border-inline-start:2px solid var(--hd-border);color:var(--hd-text-2)}}@layer ui{.ui-text-WKVxU{font-size:var(--hd-type-small-size);line-height:var(--hd-type-body-line-height);color:var(--hd-text-2)}.ui-text__body--uP0k{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}}@layer ui{.ui-call-tV2P8{border-radius:var(--hd-radius-sm);font-size:var(--hd-type-small-size)}.ui-call-tV2P8 summary{padding:var(--hd-space-2) var(--hd-space-3);font-weight:var(--hd-font-weight-regular)}.ui-call--static-Nldru{display:flex;align-items:center;gap:var(--hd-space-3);padding:var(--hd-space-2) var(--hd-space-3);border:1px solid var(--hd-border);background-color:var(--hd-bg-surface)}.ui-call__header-8Tw7m{display:flex;align-items:center;gap:var(--hd-space-2);min-width:0}.ui-call__icon-TLzwf{display:inline-flex;flex-shrink:0;font-size:16px;color:var(--hd-text-3)}.ui-call__icon--running-Mx1XK{color:var(--hd-text)}.ui-call__name-EHz6G{flex-shrink:0;font-weight:var(--hd-font-weight-semibold);color:var(--hd-text)}.ui-call__summary-M4sLU{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--hd-font-mono);font-size:var(--hd-type-caption-size);letter-spacing:.02em;font-variant-numeric:tabular-nums;flex:1;min-width:0;color:var(--hd-text-2)}.ui-call__meta-bvpp7{flex-shrink:0;margin-inline-start:auto;font-size:var(--hd-type-caption-size);color:var(--hd-text-3);font-variant-numeric:tabular-nums}.ui-call__body-nFK-C{display:flex;flex-direction:column;gap:var(--hd-space-3)}.ui-section-TjSGF{display:flex;flex-direction:column;gap:var(--hd-space-1);min-width:0}.ui-section__label-UrgqM{font-family:var(--hd-font-body);font-size:var(--hd-type-caption-size);font-weight:var(--hd-font-weight-semibold);letter-spacing:.045em;text-transform:uppercase;color:var(--hd-text-2);margin:0}.ui-section__body-Dy1PX{min-width:0;color:var(--hd-text)}}@layer ui{.ui-terminal-D4Bz8{margin:0;padding:var(--hd-space-3) var(--hd-space-4);border:1px solid var(--hd-ink-700);border-radius:var(--hd-radius-sm);background-color:var(--hd-ink-900);color:var(--hd-ink-50);font-family:var(--hd-font-mono);font-size:var(--hd-type-caption-size);line-height:var(--hd-type-body-line-height);white-space:pre-wrap;overflow-wrap:anywhere;position:relative;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--hd-border-strong) transparent}.ui-terminal-D4Bz8::-webkit-scrollbar{width:8px;height:8px}.ui-terminal-D4Bz8::-webkit-scrollbar-track{background:transparent}.ui-terminal-D4Bz8::-webkit-scrollbar-thumb{background-color:var(--hd-border-strong);border-radius:var(--hd-radius-pill);border:2px solid transparent;background-clip:content-box}.ui-terminal-D4Bz8::-webkit-scrollbar-thumb:hover{background-color:var(--hd-text-3)}.ui-terminal-D4Bz8:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--hd-ink-50);outline-offset:var(--ui-ring-offset, -2px)}.ui-terminal__command-A7PG2{color:var(--hd-ink-50);font-weight:var(--hd-font-weight-semibold)}.ui-terminal__prompt-9N1g2{color:var(--hd-ink-300)}.ui-terminal__stderr-qCNFe{color:var(--hd-danger-300)}.ui-terminal__srOnly-2pmQA{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}}@layer ui{.ui-list-GC4NK{display:flex;flex-direction:column;gap:var(--hd-space-2);margin:0;padding:0;list-style:none;font-size:var(--hd-type-small-size)}.ui-list__item-N8DAn{display:flex;align-items:baseline;gap:var(--hd-space-2)}.ui-list__index-VrSMs{font-family:var(--hd-font-mono);font-size:var(--hd-type-caption-size);letter-spacing:.02em;font-variant-numeric:tabular-nums;flex-shrink:0;min-width:18px;padding:1px 4px;border:1px solid var(--hd-border);border-radius:var(--hd-radius-xs);text-align:center;color:var(--hd-text-2)}.ui-list__text-4tll-{display:flex;flex-direction:column;min-width:0}.ui-list__title-seHfJ{padding:0;border:0;background:none;color:var(--hd-primary-text);font:inherit;text-align:start;text-decoration:underline;text-underline-offset:2px;overflow-wrap:anywhere;cursor:pointer}.ui-list__title-seHfJ:hover{color:var(--hd-primary-text)}.ui-list__title-seHfJ:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--hd-focus));outline-offset:var(--ui-ring-offset, 2px)}.ui-list__plain-ZcCvx{color:var(--hd-text);overflow-wrap:anywhere}.ui-list__domain-sJLI7{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:var(--hd-type-caption-size);color:var(--hd-text-3)}}@layer ui{.ui-citation-XrGMb{position:relative}.ui-citation-XrGMb:after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:max(100%,44px);height:max(100%,44px)}.ui-citation-XrGMb{font-family:var(--hd-font-mono);font-size:var(--hd-type-caption-size);letter-spacing:.02em;font-variant-numeric:tabular-nums;display:inline-flex;align-items:center;justify-content:center;min-width:18px;margin-inline:2px;padding:0 4px;border:1px solid var(--hd-border);border-radius:var(--hd-radius-xs);background-color:var(--hd-bg-raised);color:var(--hd-primary-text);line-height:1.5;vertical-align:super;text-decoration:none;cursor:pointer}.ui-citation-XrGMb:hover{background-color:var(--hd-bg-inset)}.ui-citation-XrGMb:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--hd-focus));outline-offset:var(--ui-ring-offset, 2px)}.ui-citation__srOnly-GnMQp{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.ui-citation--static-8gXHs{color:var(--hd-text-2);cursor:default}.ui-citation--static-8gXHs:hover{background-color:var(--hd-bg-raised)}}@layer ui{.ui-actions-c8XlJ{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hd-space-1);color:var(--hd-text-3);font-size:var(--hd-type-caption-size)}.ui-actions__meta-j-X3I{margin-inline-start:var(--hd-space-2);font-variant-numeric:tabular-nums}}@layer ui{.ui-bar-UJGDL{position:sticky;top:0;z-index:var(--hd-z-sticky);display:flex;align-items:center;gap:var(--hd-space-3);min-height:56px;padding:var(--hd-space-2) var(--hd-space-5);border-bottom:1px solid var(--hd-border);background-color:var(--hd-bg-surface);color:var(--hd-text)}@media (max-width: 640px){.ui-bar-UJGDL{flex-wrap:wrap;padding:var(--hd-space-2) var(--hd-space-4)}}.ui-bar__brand-ZUcIw{display:inline-flex;align-items:center;gap:var(--hd-space-2);flex-shrink:0;font-family:var(--hd-font-display);font-size:var(--hd-type-body-size);font-weight:var(--hd-font-weight-semibold);letter-spacing:var(--hd-type-h4-letter-spacing)}.ui-bar__start-nvmHH{display:flex;align-items:center;gap:var(--hd-space-2);flex:1;min-width:0}.ui-bar__end-NNQve{display:flex;align-items:center;gap:var(--hd-space-1);flex-shrink:0;margin-inline-start:auto}}@layer ui{.ui-list-e54gu{margin:0;padding:0;list-style:none;border:1px solid var(--hd-border);border-radius:var(--hd-radius-md);background-color:var(--hd-bg-surface);position:relative;overflow:hidden}.ui-list--virtual-zxqy5{overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--hd-border-strong) transparent}.ui-list--virtual-zxqy5::-webkit-scrollbar{width:8px;height:8px}.ui-list--virtual-zxqy5::-webkit-scrollbar-track{background:transparent}.ui-list--virtual-zxqy5::-webkit-scrollbar-thumb{background-color:var(--hd-border-strong);border-radius:var(--hd-radius-pill);border:2px solid transparent;background-clip:content-box}.ui-list--virtual-zxqy5::-webkit-scrollbar-thumb:hover{background-color:var(--hd-text-3)}.ui-list__window-ESrZX{margin:0;padding-inline:0;padding-block-end:0;list-style:none}.ui-list__slot-DxSnX{border-bottom:1px solid var(--hd-border)}.ui-list__slot-DxSnX:last-child{border-bottom:0}.ui-list--virtual-zxqy5 .ui-list__slot-DxSnX{block-size:var(--ui-row-height);overflow:hidden}.ui-item-DKEGh{display:flex;align-items:baseline;gap:var(--hd-space-3);width:100%;height:100%;min-height:44px;padding:var(--hd-space-2) var(--hd-space-4);border:0;color:var(--hd-text);font:inherit;font-size:var(--hd-type-small-size);text-align:start;text-decoration:none;cursor:pointer;background-color:transparent;transition:background-color var(--hd-duration-fast) var(--hd-ease-standard),translate var(--hd-duration-fast) var(--hd-ease-standard)}.ui-item-DKEGh:hover:not(:disabled):not([aria-disabled=true]){background-color:color-mix(in srgb,var(--hd-text) 8%,transparent)}.ui-item-DKEGh:active:not(:disabled):not([aria-disabled=true]){background-color:color-mix(in srgb,var(--hd-text) 14%,transparent);translate:0 1px}@media (prefers-reduced-motion: reduce){.ui-item-DKEGh{transition:none}.ui-item-DKEGh:active:not(:disabled):not([aria-disabled=true]){translate:none}}.ui-item-DKEGh:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--hd-focus));outline-offset:var(--ui-ring-offset, -2px)}.ui-item--selected-AMl3I{background-color:var(--hd-primary-soft);box-shadow:inset 3px 0 0 var(--hd-primary-line)}.ui-item--muted-XBeA3{color:var(--hd-text-3)}.ui-item__start-Yb3xf{font-family:var(--hd-font-mono);font-size:var(--hd-type-caption-size);letter-spacing:.02em;font-variant-numeric:tabular-nums;flex-shrink:0;color:var(--hd-text-2)}.ui-item--muted-XBeA3 .ui-item__start-Yb3xf{color:var(--hd-text-3)}.ui-item__body-kD4Qk{flex:1;min-width:0;overflow-wrap:anywhere}.ui-item__end-3SCT-{flex-shrink:0;font-size:var(--hd-type-caption-size);color:var(--hd-text-3);font-variant-numeric:tabular-nums}}@layer ui{.ui-bar-OZjXz{position:relative;height:10px;border-radius:var(--hd-radius-pill);background-color:var(--hd-bg-raised);overflow:hidden}@media (forced-colors: active){.ui-bar-OZjXz{border:1px solid CanvasText}}.ui-bar__segment-hexbp{position:absolute;inset-block:0;box-shadow:inset -2px 0 0 var(--hd-bg-surface)}@media (forced-colors: active){.ui-bar__segment-hexbp{background-color:CanvasText!important}}.ui-bar__marker-E0FeF{position:absolute;inset-block:-2px;width:2px;margin-inline-start:-1px;background-color:var(--hd-text)}.ui-bar__marker--danger-245FK{background-color:var(--hd-danger-fg)}}@layer ui{.ui-legend-zryov{display:flex;flex-wrap:wrap;gap:var(--hd-space-1) var(--hd-space-4);margin:0;padding:0;list-style:none}.ui-legend__item-GGrR-{display:inline-flex;align-items:center;gap:var(--hd-space-2);font-size:var(--hd-type-caption-size);color:var(--hd-text-2)}.ui-legend__swatch-2MkAR{flex-shrink:0;width:10px;height:10px;border-radius:var(--hd-radius-xs)}@media (forced-colors: active){.ui-legend__swatch-2MkAR{border:1px solid CanvasText}}}@layer ui{.ui-list-KSLu5{display:grid;grid-template-columns:minmax(96px,max-content) minmax(0,1fr);gap:var(--hd-space-2) var(--hd-space-4);margin:0;font-size:var(--hd-type-small-size)}@media (max-width: 640px){.ui-list-KSLu5{grid-template-columns:minmax(0,1fr);gap:var(--hd-space-1)}}.ui-list__row-k7aHp{display:contents}.ui-list__term-vsD5B{color:var(--hd-text-2)}@media (max-width: 640px){.ui-list__term-vsD5B{margin-top:var(--hd-space-2)}}.ui-list__value-6GY6z{margin:0;color:var(--hd-text);min-width:0}.ui-list__value--technical-I-UYE{font-family:var(--hd-font-mono);font-size:var(--hd-type-caption-size);letter-spacing:.02em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}}
1
+ @layer ui{.ui-thread-R1LCJ{position:relative;display:grid;grid-template-rows:minmax(0,1fr) auto;height:100%;min-height:0}.ui-thread__scroll-37EaI{position:relative;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--hd-border-strong) transparent}.ui-thread__scroll-37EaI::-webkit-scrollbar{width:8px;height:8px}.ui-thread__scroll-37EaI::-webkit-scrollbar-track{background:transparent}.ui-thread__scroll-37EaI::-webkit-scrollbar-thumb{background-color:var(--hd-border-strong);border-radius:var(--hd-radius-pill);border:2px solid transparent;background-clip:content-box}.ui-thread__scroll-37EaI::-webkit-scrollbar-thumb:hover{background-color:var(--hd-text-3)}.ui-thread__scroll-37EaI:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--hd-focus));outline-offset:var(--ui-ring-offset, -2px)}.ui-thread__column-57FQh{display:flex;flex-direction:column;gap:var(--hd-space-6);width:100%;max-width:768px;margin-inline:auto;padding:var(--hd-space-6) var(--hd-space-5)}@media (max-width: 640px){.ui-thread__column-57FQh{padding:var(--hd-space-5) var(--hd-space-4)}}.ui-thread__dock-y0Tt9 .ui-thread__column-57FQh{gap:var(--hd-space-2);padding-block:0 calc(var(--hd-space-4) + env(safe-area-inset-bottom,0px))}.ui-thread__dock-y0Tt9{position:relative;padding-top:var(--hd-space-3);background:linear-gradient(to bottom,transparent,var(--hd-bg-page) var(--hd-space-5))}.ui-thread__latest-ZNmqY{position:absolute;inset-block-start:calc(-1 * var(--hd-space-12));inset-inline:0;margin-inline:auto;box-shadow:var(--hd-shadow-2);background-color:var(--hd-bg-surface)}}@layer ui{.ui-message-z5uVx{display:flex;gap:var(--hd-space-3);width:100%}.ui-message--user-Mq6gb{justify-content:flex-end}.ui-message__avatar-QzWck{flex-shrink:0;margin-top:2px}.ui-message__main-1rh-A{display:flex;flex-direction:column;gap:var(--hd-space-2);min-width:0}.ui-message--assistant-ndkmH .ui-message__main-1rh-A{flex:1}.ui-message--user-Mq6gb .ui-message__main-1rh-A{align-items:flex-end;max-width:min(85%,640px)}.ui-message__body-Ngiqq{min-width:0}.ui-message--user-Mq6gb .ui-message__body-Ngiqq{padding:var(--hd-space-3) var(--hd-space-4);border-radius:var(--hd-radius-lg);border-end-end-radius:var(--hd-radius-xs);background-color:var(--hd-bg-raised);color:var(--hd-text);font-size:var(--hd-type-lead-size);line-height:var(--hd-type-body-line-height);white-space:pre-wrap;overflow-wrap:anywhere}.ui-message__actions-dQ0Fn{color:var(--hd-text-3);transition:color var(--hd-duration-fast) var(--hd-ease-standard)}.ui-message-z5uVx:hover .ui-message__actions-dQ0Fn,.ui-message-z5uVx:focus-within .ui-message__actions-dQ0Fn{color:var(--hd-text-2)}@media (prefers-reduced-motion: reduce){.ui-message__actions-dQ0Fn{transition:none}}}@layer ui{.ui-prompt-qHV1e{display:flex;flex-direction:column;gap:var(--hd-space-2);width:100%}.ui-prompt__box-sUQDu{display:flex;align-items:flex-end;gap:var(--hd-space-2);padding:var(--hd-space-2) var(--hd-space-2) var(--hd-space-2) var(--hd-space-4);border:1px solid var(--hd-border-control);border-radius:var(--hd-radius-lg);background-color:var(--hd-bg-surface);box-shadow:var(--hd-shadow-1);transition:border-color var(--hd-duration-fast) var(--hd-ease-standard),box-shadow var(--hd-duration-fast) var(--hd-ease-standard)}.ui-prompt__box-sUQDu:focus-within{border-color:var(--ui-ring-color, var(--hd-focus));box-shadow:0 0 0 3px color-mix(in srgb,var(--hd-focus) 32%,transparent)}.ui-prompt__box--disabled-xu-Yk{background-color:var(--hd-bg-raised);border-color:var(--hd-border);cursor:not-allowed;color:var(--hd-text-3)}@media (forced-colors: active){.ui-prompt__box--disabled-xu-Yk{color:GrayText;border-color:GrayText}}.ui-prompt__box--disabled-xu-Yk{box-shadow:none}@media (prefers-reduced-motion: reduce){.ui-prompt__box-sUQDu{transition:none}}.ui-prompt__field-EmvTZ{flex:1;min-width:0;padding-block:9px}.ui-prompt__start-2tqre,.ui-prompt__end-Zp7fi{display:flex;align-items:center;gap:var(--hd-space-1);flex-shrink:0;min-height:40px}.ui-prompt__hint-4TpeC{text-align:center;font-size:var(--hd-type-caption-size);color:var(--hd-text-3)}}@layer ui{.ui-grid-4EfQ-{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(220px,100%),1fr));gap:var(--hd-space-2);width:100%}.ui-card-KTt0-{display:flex;flex-direction:column;gap:2px;min-height:44px;padding:var(--hd-space-3) var(--hd-space-4);border:1px solid var(--hd-border);border-radius:var(--hd-radius-md);color:var(--hd-text);font:inherit;text-align:start;cursor:pointer;background-color:var(--hd-bg-surface);transition:background-color var(--hd-duration-fast) var(--hd-ease-standard),translate var(--hd-duration-fast) var(--hd-ease-standard)}.ui-card-KTt0-:hover:not(:disabled):not([aria-disabled=true]){background-color:var(--hd-bg-raised)}.ui-card-KTt0-:active:not(:disabled):not([aria-disabled=true]){background-color:var(--hd-bg-inset);translate:0 1px}@media (prefers-reduced-motion: reduce){.ui-card-KTt0-{transition:none}.ui-card-KTt0-:active:not(:disabled):not([aria-disabled=true]){translate:none}}.ui-card-KTt0-:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--hd-focus));outline-offset:var(--ui-ring-offset, 2px)}.ui-card__label-LNLTF{font-size:var(--hd-type-small-size);font-weight:var(--hd-font-weight-medium)}.ui-card__description-eIx-0{font-size:var(--hd-type-caption-size);color:var(--hd-text-2)}}@layer ui{.ui-prose-kAp6f{font-size:var(--hd-type-lead-size);line-height:var(--hd-type-body-line-height);color:var(--hd-text);overflow-wrap:break-word}.ui-prose-kAp6f>:first-child{margin-top:0}.ui-prose-kAp6f>:last-child{margin-bottom:0}.ui-prose-kAp6f h1,.ui-prose-kAp6f h2,.ui-prose-kAp6f h3,.ui-prose-kAp6f h4{margin:1.4em 0 .5em;font-family:var(--hd-font-display);font-weight:var(--hd-font-weight-semibold);line-height:var(--hd-type-h4-line-height);color:var(--hd-text)}.ui-prose-kAp6f h1{font-size:var(--hd-type-h3-size);letter-spacing:var(--hd-type-h4-letter-spacing)}.ui-prose-kAp6f h2{font-size:var(--hd-type-h4-size)}.ui-prose-kAp6f h3,.ui-prose-kAp6f h4{font-size:var(--hd-type-body-size)}.ui-prose-kAp6f p{margin:.65em 0}.ui-prose-kAp6f ul,.ui-prose-kAp6f ol{margin:.65em 0;padding-inline-start:1.4em}.ui-prose-kAp6f li+li{margin-top:.25em}.ui-prose-kAp6f a{color:var(--hd-primary-text);text-decoration:underline;text-underline-offset:2px}.ui-prose-kAp6f a:hover{color:var(--hd-primary-text)}.ui-prose-kAp6f a:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--hd-focus));outline-offset:var(--ui-ring-offset, 2px)}.ui-prose-kAp6f blockquote{margin:.9em 0;padding-inline-start:var(--hd-space-4);border-inline-start:3px solid var(--hd-border-strong);color:var(--hd-text-2)}.ui-prose-kAp6f hr{margin:1.4em 0;border:0;border-top:1px solid var(--hd-border)}.ui-prose-kAp6f :not(pre)>code{font-family:var(--hd-font-mono);font-size:.88em;letter-spacing:.02em;font-variant-numeric:tabular-nums;padding:1px 5px;border:1px solid var(--hd-border);border-radius:var(--hd-radius-xs);background-color:var(--hd-bg-raised)}.ui-prose-kAp6f table{display:block;max-width:100%;margin:.9em 0;position:relative;overflow-x:auto;border-collapse:collapse;font-size:var(--hd-type-small-size)}.ui-prose-kAp6f th,.ui-prose-kAp6f td{padding:var(--hd-space-2) var(--hd-space-3);border:1px solid var(--hd-border);text-align:start;vertical-align:top}.ui-prose-kAp6f th{background-color:var(--hd-bg-raised);font-weight:var(--hd-font-weight-semibold)}.ui-prose-kAp6f .katex-display{margin:.9em 0;position:relative;overflow-x:auto;overflow-y:hidden}}@layer ui{.ui-block-M1yL9{margin:.9em 0;border:1px solid var(--hd-border);border-radius:var(--hd-radius-md);background-color:var(--hd-bg-inset);overflow:hidden}.ui-block__header-F2iBP{display:flex;align-items:center;justify-content:space-between;gap:var(--hd-space-2);min-height:36px;padding-inline:var(--hd-space-3) var(--hd-space-1);border-bottom:1px solid var(--hd-border);background-color:var(--hd-bg-raised)}.ui-block__language-lmdS9{font-family:var(--hd-font-mono);font-size:var(--hd-type-caption-size);letter-spacing:.02em;font-variant-numeric:tabular-nums;color:var(--hd-text-2);text-transform:lowercase}.ui-block__body-wDCJ2{position:relative;overflow:auto;scrollbar-width:thin;scrollbar-color:var(--hd-border-strong) transparent}.ui-block__body-wDCJ2::-webkit-scrollbar{width:8px;height:8px}.ui-block__body-wDCJ2::-webkit-scrollbar-track{background:transparent}.ui-block__body-wDCJ2::-webkit-scrollbar-thumb{background-color:var(--hd-border-strong);border-radius:var(--hd-radius-pill);border:2px solid transparent;background-clip:content-box}.ui-block__body-wDCJ2::-webkit-scrollbar-thumb:hover{background-color:var(--hd-text-3)}.ui-block__body-wDCJ2:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--hd-primary-text);outline-offset:var(--ui-ring-offset, -2px)}.ui-block__pre--EERi,.ui-block__highlighted-JK1Yj pre{margin:0;padding:var(--hd-space-3) var(--hd-space-4);background:transparent!important;font-family:var(--hd-font-mono);font-size:var(--hd-type-caption-size);line-height:var(--hd-type-body-line-height);white-space:pre;-moz-tab-size:2;tab-size:2}.ui-block__highlighted-JK1Yj span{color:var(--shiki-light);color:light-dark(var(--shiki-light),var(--shiki-dark))}.ui-block__token--comment-eFTyh{color:var(--hd-text-2);font-style:italic}.ui-block__token--keyword-qQpj9{color:var(--hd-primary-text)}.ui-block__token--string-4onwX,.ui-block__token--number-DThtL{color:var(--hd-accent-text)}.ui-block__token--name-283C9{color:var(--hd-text)}.ui-block__token--type-cNUbM{color:var(--hd-text);font-weight:var(--hd-font-weight-medium)}.ui-block__token--punctuation-Te2u8{color:var(--hd-text-2)}.ui-block__token--inserted-sUKnQ{color:var(--hd-primary-text)}.ui-block__token--deleted-s74a-{color:var(--hd-danger-fg)}}@layer ui{.ui-block-zqPjp summary{padding:var(--hd-space-1) var(--hd-space-2);margin-inline-start:calc(-1 * var(--hd-space-2));border-radius:var(--hd-radius-sm);font-weight:var(--hd-font-weight-medium);color:var(--hd-text-2)}.ui-block__summary-Kkp-X{display:inline-flex;align-items:center;gap:var(--hd-space-2)}.ui-block__indicator-GuJMa{display:inline-flex;color:var(--hd-text-2)}.ui-block__body-mDvrV{display:flex;flex-direction:column;gap:var(--hd-space-3);margin-top:var(--hd-space-2);padding-inline-start:var(--hd-space-4);border-inline-start:2px solid var(--hd-border);color:var(--hd-text-2)}}@layer ui{.ui-text-WKVxU{font-size:var(--hd-type-small-size);line-height:var(--hd-type-body-line-height);color:var(--hd-text-2)}.ui-text__body--uP0k{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}}@layer ui{.ui-call-tV2P8{border-radius:var(--hd-radius-sm);font-size:var(--hd-type-small-size)}.ui-call-tV2P8 summary{padding:var(--hd-space-2) var(--hd-space-3);font-weight:var(--hd-font-weight-regular)}.ui-call--static-Nldru{display:flex;align-items:center;gap:var(--hd-space-3);padding:var(--hd-space-2) var(--hd-space-3);border:1px solid var(--hd-border);background-color:var(--hd-bg-surface)}.ui-call__header-8Tw7m{display:flex;align-items:center;gap:var(--hd-space-2);min-width:0}.ui-call__icon-TLzwf{display:inline-flex;flex-shrink:0;font-size:16px;color:var(--hd-text-3)}.ui-call__icon--running-Mx1XK{color:var(--hd-text)}.ui-call__name-EHz6G{flex-shrink:0;font-weight:var(--hd-font-weight-semibold);color:var(--hd-text)}.ui-call__summary-M4sLU{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--hd-font-mono);font-size:var(--hd-type-caption-size);letter-spacing:.02em;font-variant-numeric:tabular-nums;flex:1;min-width:0;color:var(--hd-text-2)}.ui-call__meta-bvpp7{flex-shrink:0;margin-inline-start:auto;font-size:var(--hd-type-caption-size);color:var(--hd-text-3);font-variant-numeric:tabular-nums}.ui-call__body-nFK-C{display:flex;flex-direction:column;gap:var(--hd-space-3)}.ui-section-TjSGF{display:flex;flex-direction:column;gap:var(--hd-space-1);min-width:0}.ui-section__label-UrgqM{font-family:var(--ui-overline-font, var(--hd-font-body));font-size:var(--hd-type-caption-size);font-weight:var(--hd-font-weight-semibold);letter-spacing:.045em;text-transform:uppercase;color:var(--hd-text-2);margin:0}.ui-section__body-Dy1PX{min-width:0;color:var(--hd-text)}}@layer ui{.ui-terminal-D4Bz8{margin:0;padding:var(--hd-space-3) var(--hd-space-4);border:1px solid var(--hd-ink-700);border-radius:var(--hd-radius-sm);background-color:var(--hd-ink-900);color:var(--hd-ink-50);font-family:var(--hd-font-mono);font-size:var(--hd-type-caption-size);line-height:var(--hd-type-body-line-height);white-space:pre-wrap;overflow-wrap:anywhere;position:relative;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--hd-border-strong) transparent}.ui-terminal-D4Bz8::-webkit-scrollbar{width:8px;height:8px}.ui-terminal-D4Bz8::-webkit-scrollbar-track{background:transparent}.ui-terminal-D4Bz8::-webkit-scrollbar-thumb{background-color:var(--hd-border-strong);border-radius:var(--hd-radius-pill);border:2px solid transparent;background-clip:content-box}.ui-terminal-D4Bz8::-webkit-scrollbar-thumb:hover{background-color:var(--hd-text-3)}.ui-terminal-D4Bz8:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--hd-ink-50);outline-offset:var(--ui-ring-offset, -2px)}.ui-terminal__command-A7PG2{color:var(--hd-ink-50);font-weight:var(--hd-font-weight-semibold)}.ui-terminal__prompt-9N1g2{color:var(--hd-ink-300)}.ui-terminal__stderr-qCNFe{color:var(--hd-danger-300)}.ui-terminal__srOnly-2pmQA{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}}@layer ui{.ui-list-GC4NK{display:flex;flex-direction:column;gap:var(--hd-space-2);margin:0;padding:0;list-style:none;font-size:var(--hd-type-small-size)}.ui-list__item-N8DAn{display:flex;align-items:baseline;gap:var(--hd-space-2)}.ui-list__index-VrSMs{font-family:var(--hd-font-mono);font-size:var(--hd-type-caption-size);letter-spacing:.02em;font-variant-numeric:tabular-nums;flex-shrink:0;min-width:18px;padding:1px 4px;border:1px solid var(--hd-border);border-radius:var(--hd-radius-xs);text-align:center;color:var(--hd-text-2)}.ui-list__text-4tll-{display:flex;flex-direction:column;min-width:0}.ui-list__title-seHfJ{padding:0;border:0;background:none;color:var(--hd-primary-text);font:inherit;text-align:start;text-decoration:underline;text-underline-offset:2px;overflow-wrap:anywhere;cursor:pointer}.ui-list__title-seHfJ:hover{color:var(--hd-primary-text)}.ui-list__title-seHfJ:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--hd-focus));outline-offset:var(--ui-ring-offset, 2px)}.ui-list__plain-ZcCvx{color:var(--hd-text);overflow-wrap:anywhere}.ui-list__domain-sJLI7{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:var(--hd-type-caption-size);color:var(--hd-text-3)}}@layer ui{.ui-citation-XrGMb{position:relative}.ui-citation-XrGMb:after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:max(100%,44px);height:max(100%,44px)}.ui-citation-XrGMb{font-family:var(--hd-font-mono);font-size:var(--hd-type-caption-size);letter-spacing:.02em;font-variant-numeric:tabular-nums;display:inline-flex;align-items:center;justify-content:center;min-width:18px;margin-inline:2px;padding:0 4px;border:1px solid var(--hd-border);border-radius:var(--hd-radius-xs);background-color:var(--hd-bg-raised);color:var(--hd-primary-text);line-height:1.5;vertical-align:super;text-decoration:none;cursor:pointer}.ui-citation-XrGMb:hover{background-color:var(--hd-bg-inset)}.ui-citation-XrGMb:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--hd-focus));outline-offset:var(--ui-ring-offset, 2px)}.ui-citation__srOnly-GnMQp{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.ui-citation--static-8gXHs{color:var(--hd-text-2);cursor:default}.ui-citation--static-8gXHs:hover{background-color:var(--hd-bg-raised)}}@layer ui{.ui-actions-c8XlJ{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hd-space-1);color:var(--hd-text-3);font-size:var(--hd-type-caption-size)}.ui-actions__meta-j-X3I{margin-inline-start:var(--hd-space-2);font-variant-numeric:tabular-nums}}@layer ui{.ui-bar-UJGDL{position:sticky;top:0;z-index:var(--hd-z-sticky);display:flex;align-items:center;gap:var(--hd-space-3);min-height:56px;padding:var(--hd-space-2) var(--hd-space-5);border-bottom:1px solid var(--hd-border);background-color:var(--hd-bg-surface);color:var(--hd-text)}@media (max-width: 640px){.ui-bar-UJGDL{flex-wrap:wrap;padding:var(--hd-space-2) var(--hd-space-4)}}.ui-bar__brand-ZUcIw{display:inline-flex;align-items:center;gap:var(--hd-space-2);flex-shrink:0;font-family:var(--hd-font-display);font-size:var(--hd-type-body-size);font-weight:var(--hd-font-weight-semibold);letter-spacing:var(--hd-type-h4-letter-spacing)}.ui-bar__start-nvmHH{display:flex;align-items:center;gap:var(--hd-space-2);flex:1;min-width:0}.ui-bar__end-NNQve{display:flex;align-items:center;gap:var(--hd-space-1);flex-shrink:0;margin-inline-start:auto}}@layer ui{.ui-list-e54gu{margin:0;padding:0;list-style:none;border:1px solid var(--hd-border);border-radius:var(--hd-radius-md);background-color:var(--hd-bg-surface);position:relative;overflow:hidden}.ui-list--virtual-zxqy5{overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--hd-border-strong) transparent}.ui-list--virtual-zxqy5::-webkit-scrollbar{width:8px;height:8px}.ui-list--virtual-zxqy5::-webkit-scrollbar-track{background:transparent}.ui-list--virtual-zxqy5::-webkit-scrollbar-thumb{background-color:var(--hd-border-strong);border-radius:var(--hd-radius-pill);border:2px solid transparent;background-clip:content-box}.ui-list--virtual-zxqy5::-webkit-scrollbar-thumb:hover{background-color:var(--hd-text-3)}.ui-list__window-ESrZX{margin:0;padding-inline:0;padding-block-end:0;list-style:none}.ui-list__slot-DxSnX{border-bottom:1px solid var(--hd-border)}.ui-list__slot-DxSnX:last-child{border-bottom:0}.ui-list--virtual-zxqy5 .ui-list__slot-DxSnX{block-size:var(--ui-row-height);overflow:hidden}.ui-item-DKEGh{display:flex;align-items:baseline;gap:var(--hd-space-3);width:100%;height:100%;min-height:44px;padding:var(--hd-space-2) var(--hd-space-4);border:0;color:var(--hd-text);font:inherit;font-size:var(--hd-type-small-size);text-align:start;text-decoration:none;cursor:pointer;background-color:transparent;transition:background-color var(--hd-duration-fast) var(--hd-ease-standard),translate var(--hd-duration-fast) var(--hd-ease-standard)}.ui-item-DKEGh:hover:not(:disabled):not([aria-disabled=true]){background-color:color-mix(in srgb,var(--hd-text) 8%,transparent)}.ui-item-DKEGh:active:not(:disabled):not([aria-disabled=true]){background-color:color-mix(in srgb,var(--hd-text) 14%,transparent);translate:0 1px}@media (prefers-reduced-motion: reduce){.ui-item-DKEGh{transition:none}.ui-item-DKEGh:active:not(:disabled):not([aria-disabled=true]){translate:none}}.ui-item-DKEGh:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--hd-focus));outline-offset:var(--ui-ring-offset, -2px)}.ui-item--selected-AMl3I{background-color:var(--hd-primary-soft);box-shadow:inset 3px 0 0 var(--hd-primary-line)}.ui-item--muted-XBeA3{color:var(--hd-text-3)}.ui-item__start-Yb3xf{font-family:var(--hd-font-mono);font-size:var(--hd-type-caption-size);letter-spacing:.02em;font-variant-numeric:tabular-nums;flex-shrink:0;color:var(--hd-text-2)}.ui-item--muted-XBeA3 .ui-item__start-Yb3xf{color:var(--hd-text-3)}.ui-item__body-kD4Qk{flex:1;min-width:0;overflow-wrap:anywhere}.ui-item__end-3SCT-{flex-shrink:0;font-size:var(--hd-type-caption-size);color:var(--hd-text-3);font-variant-numeric:tabular-nums}}@layer ui{.ui-bar-OZjXz{position:relative;height:10px;border-radius:var(--hd-radius-pill);background-color:var(--hd-bg-raised);overflow:hidden}@media (forced-colors: active){.ui-bar-OZjXz{border:1px solid CanvasText}}.ui-bar__segment-hexbp{position:absolute;inset-block:0;box-shadow:inset -2px 0 0 var(--hd-bg-surface)}@media (forced-colors: active){.ui-bar__segment-hexbp{background-color:CanvasText!important}}.ui-bar__marker-E0FeF{position:absolute;inset-block:-2px;width:2px;margin-inline-start:-1px;background-color:var(--hd-text)}.ui-bar__marker--danger-245FK{background-color:var(--hd-danger-fg)}}@layer ui{.ui-legend-zryov{display:flex;flex-wrap:wrap;gap:var(--hd-space-1) var(--hd-space-4);margin:0;padding:0;list-style:none}.ui-legend__item-GGrR-{display:inline-flex;align-items:center;gap:var(--hd-space-2);font-size:var(--hd-type-caption-size);color:var(--hd-text-2)}.ui-legend__swatch-2MkAR{flex-shrink:0;width:10px;height:10px;border-radius:var(--hd-radius-xs)}@media (forced-colors: active){.ui-legend__swatch-2MkAR{border:1px solid CanvasText}}}@layer ui{.ui-list-KSLu5{display:grid;grid-template-columns:minmax(96px,max-content) minmax(0,1fr);gap:var(--hd-space-2) var(--hd-space-4);margin:0;font-size:var(--hd-type-small-size)}@media (max-width: 640px){.ui-list-KSLu5{grid-template-columns:minmax(0,1fr);gap:var(--hd-space-1)}}.ui-list__row-k7aHp{display:contents}.ui-list__term-vsD5B{color:var(--hd-text-2)}@media (max-width: 640px){.ui-list__term-vsD5B{margin-top:var(--hd-space-2)}}.ui-list__value-6GY6z{margin:0;color:var(--hd-text);min-width:0}.ui-list__value--technical-I-UYE{font-family:var(--hd-font-mono);font-size:var(--hd-type-caption-size);letter-spacing:.02em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}}
@@ -1,2 +1,2 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),v=require("react"),B=require("react-bootstrap-icons"),y=require("../../helpers/app-shell.helper.cjs"),f=require("../../helpers/class-name.helper.cjs"),b=require("../../helpers/component.helper.cjs"),A=require("../../helpers/label.helper.cjs"),G=require("../Link/index.cjs"),x=require("./context.cjs"),s={default:{"shell":"ui-shell-DdJz9","shell--collapsed":"ui-shell--collapsed-mBfej","srOnly":"ui-srOnly--wftu","shell__skip":"ui-shell__skip-hqzkw","shell__sidebar":"ui-shell__sidebar-59ryl","shell__sidebar-inner":"ui-shell__sidebar-inner-iIXhF","shell__brand":"ui-shell__brand-Mph-k","shell__navigation":"ui-shell__navigation-quAVK","shell__footer":"ui-shell__footer-gGr9S","shell__toggle":"ui-shell__toggle--vukn","shell__frame":"ui-shell__frame-4Cwe2","shell__topbar":"ui-shell__topbar-HH2s0","shell__menu-button":"ui-shell__menu-button-8CeT4","shell__title":"ui-shell__title--Z5jA","shell__search":"ui-shell__search-4Tij9","shell__actions":"ui-shell__actions-RU34x","shell__content":"ui-shell__content-nbbhQ","shell__drawer-brand":"ui-shell__drawer-brand-3MgNr","nav":"ui-nav-3I7Ws","nav__section-label":"ui-nav__section-label-0CMnM","nav__list":"ui-nav__list-Wotlu","nav__sublist":"ui-nav__sublist-8ut6O","nav__item":"ui-nav__item-RvDle","nav__item--active":"ui-nav__item--active-Lg028","nav__item--disabled":"ui-nav__item--disabled-CcOTO","nav__icon":"ui-nav__icon-NVN6X","nav__label":"ui-nav__label-nlEMg","nav__badge":"ui-nav__badge-aR8RE","nav__chevron":"ui-nav__chevron-ZrqW9","nav__chevron--open":"ui-nav__chevron--open-56sZo","nav__section":"ui-nav__section-hkG3J"}},j=99,S=({count:l})=>{const t=x.useAppShellLabels();return a.jsxs(a.Fragment,{children:[a.jsx("span",{"aria-hidden":!0,className:s.default.nav__badge,children:l>j?`${j}+`:l}),a.jsxs("span",{className:s.default.srOnly,children:[", ",A.resolveFormatter("AppShell.labels.badge",t.badge,l)]})]})},M=({label:l,href:t,icon:u,badge:d,isActive:m=!1,isDisabled:_=!1,linkProps:n,className:r,testId:p})=>{const{isCollapsed:h,onNavigate:c}=x.useAppShell(),i=a.jsxs(a.Fragment,{children:[u&&a.jsx("span",{"aria-hidden":!0,className:s.default.nav__icon,children:u}),a.jsx("span",{className:s.default.nav__label,children:l}),d!==void 0&&d>0&&a.jsx(S,{count:d})]}),e=h?l:void 0;if(t===void 0||_)return a.jsx("li",{className:r,"data-testid":p,children:a.jsx("span",{className:f.cx(s.default.nav__item,s.default["nav__item--disabled"]),"aria-disabled":"true",title:e,children:i})});const o=I=>{var N;(N=n==null?void 0:n.onClick)==null||N.call(n,I),c==null||c()};return a.jsx("li",{className:r,"data-testid":p,children:a.jsx(G.default,{...n,href:t,className:f.cx(s.default.nav__item,m&&s.default["nav__item--active"]),"aria-current":m?"page":void 0,title:e,onClick:o,children:i})})},g=v.memo(b.named(M,"AppShellNavItem")),D=({label:l,icon:t,badge:u,hasActiveItem:d=!1,children:m,className:_,testId:n})=>{const{isCollapsed:r,onExpandSidebar:p}=x.useAppShell(),h=v.useId(),[c,i]=v.useState(d);v.useEffect(()=>{d&&i(!0)},[d]);const e=c&&!r,o=()=>{if(r){i(!0),p==null||p();return}i(!c)};return a.jsxs("li",{className:_,"data-testid":n,children:[a.jsxs("button",{type:"button",className:f.cx(s.default.nav__item,s.default["nav__item--group"],d&&r&&s.default["nav__item--active"]),"aria-expanded":e,"aria-controls":h,title:r?l:void 0,onClick:o,children:[t&&a.jsx("span",{"aria-hidden":!0,className:s.default.nav__icon,children:t}),a.jsx("span",{className:s.default.nav__label,children:l}),u!==void 0&&u>0&&a.jsx(S,{count:u}),a.jsx(B.ChevronDown,{"aria-hidden":!0,className:f.cx(s.default.nav__chevron,e&&s.default["nav__chevron--open"])})]}),a.jsx("ul",{id:h,className:s.default.nav__sublist,hidden:!e,children:m})]})},q=v.memo(b.named(D,"AppShellNavGroup")),C=l=>l.flatMap(t=>[...t.href!==void 0&&t.isActive===void 0?[t.href]:[],...C(t.items??[])]),L=({sections:l=[],currentPath:t,label:u,children:d,className:m,testId:_})=>{const n=x.useAppShellLabels(),r=v.useId(),p=v.useMemo(()=>y.findActiveHref(C(l.flatMap(e=>e.items)),t),[l,t]),h=e=>e.isActive??(e.href!==void 0&&e.href===p),c=e=>(e.items??[]).some(o=>h(o)||c(o)),i=e=>e.items&&e.items.length>0?a.jsx(q,{label:e.label,icon:e.icon,badge:e.badge,hasActiveItem:c(e),children:e.items.map(i)},e.id):a.jsx(g,{label:e.label,href:e.href,icon:e.icon,badge:e.badge,isActive:h(e),isDisabled:e.isDisabled,linkProps:e.linkProps},e.id);return a.jsxs("nav",{"aria-label":A.resolveLabel("AppShellNav.label",u,n.navigation),className:f.cx(s.default.nav,m),"data-testid":_,children:[l.map(e=>{const o=`${r}-${e.id}`;return a.jsxs("div",{className:s.default.nav__section,role:e.label?"group":void 0,"aria-labelledby":e.label?o:void 0,children:[e.label&&a.jsx("p",{id:o,className:s.default["nav__section-label"],children:e.label}),a.jsx("ul",{className:s.default.nav__list,children:e.items.map(i)})]},e.id)}),d&&a.jsx("ul",{className:s.default.nav__list,children:d})]})},E=v.memo(b.named(L,"AppShellNav"));exports.AppShellNav=E;exports.AppShellNavGroup=q;exports.AppShellNavItem=g;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),p=require("react"),B=require("react-bootstrap-icons"),G=require("../../helpers/app-shell.helper.cjs"),f=require("../../helpers/class-name.helper.cjs"),b=require("../../helpers/component.helper.cjs"),A=require("../../helpers/label.helper.cjs"),M=require("../Link/index.cjs"),x=require("./context.cjs"),s={default:{"shell":"ui-shell-DdJz9","shell--collapsed":"ui-shell--collapsed-mBfej","srOnly":"ui-srOnly--wftu","shell__skip":"ui-shell__skip-hqzkw","shell__sidebar":"ui-shell__sidebar-59ryl","shell__sidebar-inner":"ui-shell__sidebar-inner-iIXhF","shell__brand":"ui-shell__brand-Mph-k","shell__navigation":"ui-shell__navigation-quAVK","shell__footer":"ui-shell__footer-gGr9S","shell__toggle":"ui-shell__toggle--vukn","shell__frame":"ui-shell__frame-4Cwe2","shell__topbar":"ui-shell__topbar-HH2s0","shell__menu-button":"ui-shell__menu-button-8CeT4","shell__title":"ui-shell__title--Z5jA","shell__search":"ui-shell__search-4Tij9","shell__actions":"ui-shell__actions-RU34x","shell__content":"ui-shell__content-nbbhQ","shell__drawer-brand":"ui-shell__drawer-brand-3MgNr","nav":"ui-nav-3I7Ws","nav__section-label":"ui-nav__section-label-0CMnM","nav__list":"ui-nav__list-Wotlu","nav__sublist":"ui-nav__sublist-8ut6O","nav__item":"ui-nav__item-RvDle","nav__item--active":"ui-nav__item--active-Lg028","nav__item--disabled":"ui-nav__item--disabled-CcOTO","nav__icon":"ui-nav__icon-NVN6X","nav__label":"ui-nav__label-nlEMg","nav__badge":"ui-nav__badge-aR8RE","nav__chevron":"ui-nav__chevron-ZrqW9","nav__chevron--open":"ui-nav__chevron--open-56sZo","nav__section":"ui-nav__section-hkG3J"}},N=99,S=({count:t})=>{const l=x.useAppShellLabels();return a.jsxs(a.Fragment,{children:[a.jsx("span",{"aria-hidden":!0,className:s.default.nav__badge,children:t>N?`${N}+`:t}),a.jsxs("span",{className:s.default.srOnly,children:[", ",A.resolveFormatter("AppShell.labels.badge",l.badge,t)]})]})},L=({label:t,href:l,icon:u,badge:r,isActive:h=!1,isDisabled:m=!1,onClick:_,linkProps:d,className:i,testId:o})=>{const{isCollapsed:v,onNavigate:n}=x.useAppShell(),e=a.jsxs(a.Fragment,{children:[u&&a.jsx("span",{"aria-hidden":!0,className:s.default.nav__icon,children:u}),a.jsx("span",{className:s.default.nav__label,children:t}),r!==void 0&&r>0&&a.jsx(S,{count:r})]}),c=v?t:void 0;if(l===void 0&&_&&!m)return a.jsx("li",{className:i,"data-testid":o,children:a.jsx("button",{type:"button",className:s.default.nav__item,title:c,onClick:()=>{_(),n==null||n()},children:e})});if(l===void 0||m)return a.jsx("li",{className:i,"data-testid":o,children:a.jsx("span",{className:f.cx(s.default.nav__item,s.default["nav__item--disabled"]),"aria-disabled":"true",title:c,children:e})});const I=y=>{var j;(j=d==null?void 0:d.onClick)==null||j.call(d,y),n==null||n()};return a.jsx("li",{className:i,"data-testid":o,children:a.jsx(M.default,{...d,href:l,className:f.cx(s.default.nav__item,h&&s.default["nav__item--active"]),"aria-current":h?"page":void 0,title:c,onClick:I,children:e})})},g=p.memo(b.named(L,"AppShellNavItem")),D=({label:t,icon:l,badge:u,hasActiveItem:r=!1,children:h,className:m,testId:_})=>{const{isCollapsed:d,onExpandSidebar:i}=x.useAppShell(),o=p.useId(),[v,n]=p.useState(r);p.useEffect(()=>{r&&n(!0)},[r]);const e=v&&!d,c=()=>{if(d){n(!0),i==null||i();return}n(!v)};return a.jsxs("li",{className:m,"data-testid":_,children:[a.jsxs("button",{type:"button",className:f.cx(s.default.nav__item,s.default["nav__item--group"],r&&d&&s.default["nav__item--active"]),"aria-expanded":e,"aria-controls":o,title:d?t:void 0,onClick:c,children:[l&&a.jsx("span",{"aria-hidden":!0,className:s.default.nav__icon,children:l}),a.jsx("span",{className:s.default.nav__label,children:t}),u!==void 0&&u>0&&a.jsx(S,{count:u}),a.jsx(B.ChevronDown,{"aria-hidden":!0,className:f.cx(s.default.nav__chevron,e&&s.default["nav__chevron--open"])})]}),a.jsx("ul",{id:o,className:s.default.nav__sublist,hidden:!e,children:h})]})},C=p.memo(b.named(D,"AppShellNavGroup")),q=t=>t.flatMap(l=>[...l.href!==void 0&&l.isActive===void 0?[l.href]:[],...q(l.items??[])]),E=({sections:t=[],currentPath:l,label:u,children:r,className:h,testId:m})=>{const _=x.useAppShellLabels(),d=p.useId(),i=p.useMemo(()=>G.findActiveHref(q(t.flatMap(e=>e.items)),l),[t,l]),o=e=>e.isActive??(e.href!==void 0&&e.href===i),v=e=>(e.items??[]).some(c=>o(c)||v(c)),n=e=>e.items&&e.items.length>0?a.jsx(C,{label:e.label,icon:e.icon,badge:e.badge,hasActiveItem:v(e),children:e.items.map(n)},e.id):a.jsx(g,{label:e.label,href:e.href,icon:e.icon,badge:e.badge,isActive:o(e),isDisabled:e.isDisabled,onClick:e.onClick,linkProps:e.linkProps},e.id);return a.jsxs("nav",{"aria-label":A.resolveLabel("AppShellNav.label",u,_.navigation),className:f.cx(s.default.nav,h),"data-testid":m,children:[t.map(e=>{const c=`${d}-${e.id}`;return a.jsxs("div",{className:s.default.nav__section,role:e.label?"group":void 0,"aria-labelledby":e.label?c:void 0,children:[e.label&&a.jsx("p",{id:c,className:s.default["nav__section-label"],children:e.label}),a.jsx("ul",{className:s.default.nav__list,children:e.items.map(n)})]},e.id)}),r&&a.jsx("ul",{className:s.default.nav__list,children:r})]})},F=p.memo(b.named(E,"AppShellNav"));exports.AppShellNav=F;exports.AppShellNavGroup=C;exports.AppShellNavItem=g;
2
2
  //# sourceMappingURL=Nav.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Nav.cjs","sources":["../../../src/components/AppShell/Nav.tsx"],"sourcesContent":["'use client';\n\nimport { type MouseEvent, type ReactNode, memo, useEffect, useId, useMemo, useState } from 'react';\n\nimport { ChevronDown } from 'react-bootstrap-icons';\n\nimport { findActiveHref } from '../../helpers/app-shell.helper';\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\nimport { resolveFormatter, resolveLabel } from '../../helpers/label.helper';\nimport type { UiLinkExtraProps } from '../../types/link.type';\nimport UiLink from '../Link';\nimport { useAppShell, useAppShellLabels } from './context';\n\nimport styles from './index.module.scss';\n\n/** One entry of `AppShellNav`'s data: a link, or a collapsible group when it has `items`. */\nexport type AppShellNavLink = {\n id: string;\n label: string;\n /** Without it the entry is a passive row (a screen that is not there yet). */\n href?: string;\n icon?: ReactNode;\n /** A count drawn at the end of the row (and at the icon's corner on the icon rail). */\n badge?: number;\n /** Overrides the `currentPath` match for this entry. */\n isActive?: boolean;\n isDisabled?: boolean;\n /** Nested links: the entry becomes a group that opens and closes. */\n items?: AppShellNavLink[];\n /** Extra props for the router's link component. */\n linkProps?: UiLinkExtraProps;\n};\n\n/** A titled block of entries (\"Satış\", \"Raporlar\"). */\nexport type AppShellNavSection = {\n id: string;\n /** Shown above the entries; read as the group's name. */\n label?: string;\n items: AppShellNavLink[];\n};\n\n/* Above this the badge reads \"99+\": a wider badge pushes the label out. */\nconst BADGE_MAX = 99;\n\nconst CountBadge = ({ count }: { count: number }) => {\n const labels = useAppShellLabels();\n\n return (\n <>\n <span aria-hidden className={styles.nav__badge}>\n {count > BADGE_MAX ? `${BADGE_MAX}+` : count}\n </span>\n <span className={styles.srOnly}>\n {', '}\n {resolveFormatter('AppShell.labels.badge', labels.badge, count)}\n </span>\n </>\n );\n};\n\nexport type AppShellNavItemProps = {\n label: string;\n /** Without it (or with `isDisabled`) the row is passive. */\n href?: string;\n icon?: ReactNode;\n badge?: number;\n /** The current page: drawn as selected and read as `aria-current=\"page\"`. */\n isActive?: boolean;\n isDisabled?: boolean;\n linkProps?: UiLinkExtraProps;\n className?: string;\n testId?: string;\n};\n\n/** One navigation row: icon, label, count. Rendered through the provider's link component. */\nconst AppShellNavItemBase = ({\n label,\n href,\n icon,\n badge,\n isActive = false,\n isDisabled = false,\n linkProps,\n className,\n testId,\n}: AppShellNavItemProps) => {\n const { isCollapsed, onNavigate } = useAppShell();\n\n const content = (\n <>\n {icon && (\n <span aria-hidden className={styles.nav__icon}>\n {icon}\n </span>\n )}\n <span className={styles.nav__label}>{label}</span>\n {badge !== undefined && badge > 0 && <CountBadge count={badge} />}\n </>\n );\n\n /* On the icon rail the label is hidden: the native tooltip names the icon for the pointer. */\n const title = isCollapsed ? label : undefined;\n\n if (href === undefined || isDisabled)\n return (\n <li className={className} data-testid={testId}>\n <span\n className={cx(styles.nav__item, styles['nav__item--disabled'])}\n aria-disabled=\"true\"\n title={title}\n >\n {content}\n </span>\n </li>\n );\n\n const handleClick = (event: MouseEvent<HTMLAnchorElement>) => {\n (linkProps?.onClick as ((event: MouseEvent<HTMLAnchorElement>) => void) | undefined)?.(event);\n onNavigate?.();\n };\n\n return (\n <li className={className} data-testid={testId}>\n <UiLink\n {...linkProps}\n href={href}\n className={cx(styles.nav__item, isActive && styles['nav__item--active'])}\n aria-current={isActive ? 'page' : undefined}\n title={title}\n onClick={handleClick}\n >\n {content}\n </UiLink>\n </li>\n );\n};\n\nexport const AppShellNavItem = /*#__PURE__*/ memo(\n /*#__PURE__*/ named(AppShellNavItemBase, 'AppShellNavItem'),\n) as typeof AppShellNavItemBase;\n\nexport type AppShellNavGroupProps = {\n label: string;\n icon?: ReactNode;\n badge?: number;\n /**\n * The current page is one of its links: the group opens (at first, and whenever this turns true)\n * and its row is marked on the icon rail.\n */\n hasActiveItem?: boolean;\n /** `AppShellNavItem`s (or nested groups). */\n children: ReactNode;\n className?: string;\n testId?: string;\n};\n\n/** A row that opens and closes a nested list of links. */\nconst AppShellNavGroupBase = ({\n label,\n icon,\n badge,\n hasActiveItem = false,\n children,\n className,\n testId,\n}: AppShellNavGroupProps) => {\n const { isCollapsed, onExpandSidebar } = useAppShell();\n const listId = useId();\n const [isExpanded, setIsExpanded] = useState(hasActiveItem);\n\n /* The page moved into the group (a link elsewhere, the browser's back button): show it. */\n useEffect(() => {\n if (hasActiveItem) setIsExpanded(true);\n }, [hasActiveItem]);\n\n /* The icon rail has no room for nested links: the list is closed there whatever the state. */\n const isOpen = isExpanded && !isCollapsed;\n\n const handleClick = () => {\n if (isCollapsed) {\n setIsExpanded(true);\n onExpandSidebar?.();\n return;\n }\n setIsExpanded(!isExpanded);\n };\n\n return (\n <li className={className} data-testid={testId}>\n <button\n type=\"button\"\n className={cx(\n styles.nav__item,\n styles['nav__item--group'],\n hasActiveItem && isCollapsed && styles['nav__item--active'],\n )}\n aria-expanded={isOpen}\n aria-controls={listId}\n title={isCollapsed ? label : undefined}\n onClick={handleClick}\n >\n {icon && (\n <span aria-hidden className={styles.nav__icon}>\n {icon}\n </span>\n )}\n <span className={styles.nav__label}>{label}</span>\n {badge !== undefined && badge > 0 && <CountBadge count={badge} />}\n <ChevronDown\n aria-hidden\n className={cx(styles.nav__chevron, isOpen && styles['nav__chevron--open'])}\n />\n </button>\n <ul id={listId} className={styles.nav__sublist} hidden={!isOpen}>\n {children}\n </ul>\n </li>\n );\n};\n\nexport const AppShellNavGroup = /*#__PURE__*/ memo(\n /*#__PURE__*/ named(AppShellNavGroupBase, 'AppShellNavGroup'),\n) as typeof AppShellNavGroupBase;\n\nconst linkHrefs = (links: readonly AppShellNavLink[]): string[] =>\n links.flatMap(link => [\n ...(link.href !== undefined && link.isActive === undefined ? [link.href] : []),\n ...linkHrefs(link.items ?? []),\n ]);\n\nexport type AppShellNavProps = {\n /** Titled blocks of links. */\n sections?: AppShellNavSection[];\n /** The router's current path: the longest matching `href` is the current page. */\n currentPath?: string;\n /** The landmark's name; `labels.appShell.navigation` by default. */\n label?: string;\n /** Your own `AppShellNavItem` / `AppShellNavGroup` rows, after the sections. */\n children?: ReactNode;\n className?: string;\n testId?: string;\n};\n\n/** The sidebar's `<nav>`: sections of links with icons, counts and nested groups. */\nconst AppShellNavBase = ({\n sections = [],\n currentPath,\n label,\n children,\n className,\n testId,\n}: AppShellNavProps) => {\n const labels = useAppShellLabels();\n const baseId = useId();\n\n const activeHref = useMemo(\n () => findActiveHref(linkHrefs(sections.flatMap(section => section.items)), currentPath),\n [sections, currentPath],\n );\n\n const isActive = (link: AppShellNavLink): boolean =>\n link.isActive ?? (link.href !== undefined && link.href === activeHref);\n\n const containsActive = (link: AppShellNavLink): boolean =>\n (link.items ?? []).some(child => isActive(child) || containsActive(child));\n\n const renderLink = (link: AppShellNavLink): ReactNode =>\n link.items && link.items.length > 0 ? (\n <AppShellNavGroup\n key={link.id}\n label={link.label}\n icon={link.icon}\n badge={link.badge}\n hasActiveItem={containsActive(link)}\n >\n {link.items.map(renderLink)}\n </AppShellNavGroup>\n ) : (\n <AppShellNavItem\n key={link.id}\n label={link.label}\n href={link.href}\n icon={link.icon}\n badge={link.badge}\n isActive={isActive(link)}\n isDisabled={link.isDisabled}\n linkProps={link.linkProps}\n />\n );\n\n return (\n <nav\n aria-label={resolveLabel('AppShellNav.label', label, labels.navigation)}\n className={cx(styles.nav, className)}\n data-testid={testId}\n >\n {sections.map(section => {\n const headingId = `${baseId}-${section.id}`;\n\n return (\n <div\n key={section.id}\n className={styles.nav__section}\n role={section.label ? 'group' : undefined}\n aria-labelledby={section.label ? headingId : undefined}\n >\n {section.label && (\n <p id={headingId} className={styles['nav__section-label']}>\n {section.label}\n </p>\n )}\n <ul className={styles.nav__list}>{section.items.map(renderLink)}</ul>\n </div>\n );\n })}\n {children && <ul className={styles.nav__list}>{children}</ul>}\n </nav>\n );\n};\n\nexport const AppShellNav = /*#__PURE__*/ memo(\n /*#__PURE__*/ named(AppShellNavBase, 'AppShellNav'),\n) as typeof AppShellNavBase;\n"],"names":["BADGE_MAX","CountBadge","count","labels","useAppShellLabels","jsxs","Fragment","jsx","styles","resolveFormatter","AppShellNavItemBase","label","href","icon","badge","isActive","isDisabled","linkProps","className","testId","isCollapsed","onNavigate","useAppShell","content","title","cx","handleClick","event","_a","UiLink","AppShellNavItem","memo","named","AppShellNavGroupBase","hasActiveItem","children","onExpandSidebar","listId","useId","isExpanded","setIsExpanded","useState","useEffect","isOpen","ChevronDown","AppShellNavGroup","linkHrefs","links","link","AppShellNavBase","sections","currentPath","baseId","activeHref","useMemo","findActiveHref","section","containsActive","child","renderLink","resolveLabel","headingId","AppShellNav"],"mappings":"odA0CMA,EAAY,GAEZC,EAAa,CAAC,CAAE,MAAAC,KAA+B,CACnD,MAAMC,EAASC,EAAAA,kBAAA,EAEf,OACEC,EAAAA,KAAAC,WAAA,CACE,SAAA,CAAAC,EAAAA,IAAC,OAAA,CAAK,cAAW,GAAC,UAAWC,EAAAA,QAAO,WACjC,SAAAN,EAAQF,EAAY,GAAGA,CAAS,IAAME,EACzC,EACAG,EAAAA,KAAC,OAAA,CAAK,UAAWG,EAAAA,QAAO,OACrB,SAAA,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,EAAA,CAEC,MAAOkB,EAAK,MACZ,KAAMA,EAAK,KACX,KAAMA,EAAK,KACX,MAAOA,EAAK,MACZ,SAAUjC,EAASiC,CAAI,EACvB,WAAYA,EAAK,WACjB,UAAWA,EAAK,SAAA,EAPXA,EAAK,EAAA,EAWhB,OACE3C,EAAAA,KAAC,MAAA,CACC,aAAYuD,EAAAA,aAAa,oBAAqBjD,EAAOR,EAAO,UAAU,EACtE,UAAWsB,EAAAA,GAAGjB,UAAO,IAAKU,CAAS,EACnC,cAAaC,EAEZ,SAAA,CAAA+B,EAAS,IAAIM,GAAW,CACvB,MAAMK,EAAY,GAAGT,CAAM,IAAII,EAAQ,EAAE,GAEzC,OACEnD,EAAAA,KAAC,MAAA,CAEC,UAAWG,EAAAA,QAAO,aAClB,KAAMgD,EAAQ,MAAQ,QAAU,OAChC,kBAAiBA,EAAQ,MAAQK,EAAY,OAE5C,SAAA,CAAAL,EAAQ,OACPjD,EAAAA,IAAC,IAAA,CAAE,GAAIsD,EAAW,UAAWrD,EAAAA,QAAO,oBAAoB,EACrD,SAAAgD,EAAQ,KAAA,CACX,EAEFjD,EAAAA,IAAC,MAAG,UAAWC,UAAO,UAAY,SAAAgD,EAAQ,MAAM,IAAIG,CAAU,CAAA,CAAE,CAAA,CAAA,EAV3DH,EAAQ,EAAA,CAanB,CAAC,EACArB,GAAY5B,EAAAA,IAAC,KAAA,CAAG,UAAWC,EAAAA,QAAO,UAAY,SAAA2B,CAAA,CAAS,CAAA,CAAA,CAAA,CAG9D,EAEa2B,EAA4B/B,EAAAA,KACzBC,EAAAA,MAAMiB,EAAiB,aAAa,CACpD"}
1
+ {"version":3,"file":"Nav.cjs","sources":["../../../src/components/AppShell/Nav.tsx"],"sourcesContent":["'use client';\n\nimport { type MouseEvent, type ReactNode, memo, useEffect, useId, useMemo, useState } from 'react';\n\nimport { ChevronDown } from 'react-bootstrap-icons';\n\nimport { findActiveHref } from '../../helpers/app-shell.helper';\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\nimport { resolveFormatter, resolveLabel } from '../../helpers/label.helper';\nimport type { UiLinkExtraProps } from '../../types/link.type';\nimport UiLink from '../Link';\nimport { useAppShell, useAppShellLabels } from './context';\n\nimport styles from './index.module.scss';\n\n/** One entry of `AppShellNav`'s data: a link, or a collapsible group when it has `items`. */\nexport type AppShellNavLink = {\n id: string;\n label: string;\n /** Without it the entry is a passive row (a screen that is not there yet). */\n href?: string;\n icon?: ReactNode;\n /** A count drawn at the end of the row (and at the icon's corner on the icon rail). */\n badge?: number;\n /** Overrides the `currentPath` match for this entry. */\n isActive?: boolean;\n isDisabled?: boolean;\n /** Nested links: the entry becomes a group that opens and closes. */\n items?: AppShellNavLink[];\n /** An action row without `href` (\"Çıkış yap\"), 3.4: a button with the link rows' metrics. */\n onClick?: () => void;\n /** Extra props for the router's link component. */\n linkProps?: UiLinkExtraProps;\n};\n\n/** A titled block of entries (\"Satış\", \"Raporlar\"). */\nexport type AppShellNavSection = {\n id: string;\n /** Shown above the entries; read as the group's name. */\n label?: string;\n items: AppShellNavLink[];\n};\n\n/* Above this the badge reads \"99+\": a wider badge pushes the label out. */\nconst BADGE_MAX = 99;\n\nconst CountBadge = ({ count }: { count: number }) => {\n const labels = useAppShellLabels();\n\n return (\n <>\n <span aria-hidden className={styles.nav__badge}>\n {count > BADGE_MAX ? `${BADGE_MAX}+` : count}\n </span>\n <span className={styles.srOnly}>\n {', '}\n {resolveFormatter('AppShell.labels.badge', labels.badge, count)}\n </span>\n </>\n );\n};\n\nexport type AppShellNavItemProps = {\n label: string;\n /** Without it (or with `isDisabled`) the row is passive. */\n href?: string;\n icon?: ReactNode;\n badge?: number;\n /** The current page: drawn as selected and read as `aria-current=\"page\"`. */\n isActive?: boolean;\n isDisabled?: boolean;\n /**\n * An action instead of a page (3.4) — \"Çıkış yap\" at the end of an account menu: without `href`\n * the row is a `<button>` that shares the link rows' size, icon column and hover.\n */\n onClick?: () => void;\n linkProps?: UiLinkExtraProps;\n className?: string;\n testId?: string;\n};\n\n/** One navigation row: icon, label, count. Rendered through the provider's link component. */\nconst AppShellNavItemBase = ({\n label,\n href,\n icon,\n badge,\n isActive = false,\n isDisabled = false,\n onClick,\n linkProps,\n className,\n testId,\n}: AppShellNavItemProps) => {\n const { isCollapsed, onNavigate } = useAppShell();\n\n const content = (\n <>\n {icon && (\n <span aria-hidden className={styles.nav__icon}>\n {icon}\n </span>\n )}\n <span className={styles.nav__label}>{label}</span>\n {badge !== undefined && badge > 0 && <CountBadge count={badge} />}\n </>\n );\n\n /* On the icon rail the label is hidden: the native tooltip names the icon for the pointer. */\n const title = isCollapsed ? label : undefined;\n\n if (href === undefined && onClick && !isDisabled)\n return (\n <li className={className} data-testid={testId}>\n <button\n type=\"button\"\n className={styles.nav__item}\n title={title}\n onClick={() => {\n onClick();\n onNavigate?.();\n }}\n >\n {content}\n </button>\n </li>\n );\n\n if (href === undefined || isDisabled)\n return (\n <li className={className} data-testid={testId}>\n <span\n className={cx(styles.nav__item, styles['nav__item--disabled'])}\n aria-disabled=\"true\"\n title={title}\n >\n {content}\n </span>\n </li>\n );\n\n const handleClick = (event: MouseEvent<HTMLAnchorElement>) => {\n (linkProps?.onClick as ((event: MouseEvent<HTMLAnchorElement>) => void) | undefined)?.(event);\n onNavigate?.();\n };\n\n return (\n <li className={className} data-testid={testId}>\n <UiLink\n {...linkProps}\n href={href}\n className={cx(styles.nav__item, isActive && styles['nav__item--active'])}\n aria-current={isActive ? 'page' : undefined}\n title={title}\n onClick={handleClick}\n >\n {content}\n </UiLink>\n </li>\n );\n};\n\nexport const AppShellNavItem = /*#__PURE__*/ memo(\n /*#__PURE__*/ named(AppShellNavItemBase, 'AppShellNavItem'),\n) as typeof AppShellNavItemBase;\n\nexport type AppShellNavGroupProps = {\n label: string;\n icon?: ReactNode;\n badge?: number;\n /**\n * The current page is one of its links: the group opens (at first, and whenever this turns true)\n * and its row is marked on the icon rail.\n */\n hasActiveItem?: boolean;\n /** `AppShellNavItem`s (or nested groups). */\n children: ReactNode;\n className?: string;\n testId?: string;\n};\n\n/** A row that opens and closes a nested list of links. */\nconst AppShellNavGroupBase = ({\n label,\n icon,\n badge,\n hasActiveItem = false,\n children,\n className,\n testId,\n}: AppShellNavGroupProps) => {\n const { isCollapsed, onExpandSidebar } = useAppShell();\n const listId = useId();\n const [isExpanded, setIsExpanded] = useState(hasActiveItem);\n\n /* The page moved into the group (a link elsewhere, the browser's back button): show it. */\n useEffect(() => {\n if (hasActiveItem) setIsExpanded(true);\n }, [hasActiveItem]);\n\n /* The icon rail has no room for nested links: the list is closed there whatever the state. */\n const isOpen = isExpanded && !isCollapsed;\n\n const handleClick = () => {\n if (isCollapsed) {\n setIsExpanded(true);\n onExpandSidebar?.();\n return;\n }\n setIsExpanded(!isExpanded);\n };\n\n return (\n <li className={className} data-testid={testId}>\n <button\n type=\"button\"\n className={cx(\n styles.nav__item,\n styles['nav__item--group'],\n hasActiveItem && isCollapsed && styles['nav__item--active'],\n )}\n aria-expanded={isOpen}\n aria-controls={listId}\n title={isCollapsed ? label : undefined}\n onClick={handleClick}\n >\n {icon && (\n <span aria-hidden className={styles.nav__icon}>\n {icon}\n </span>\n )}\n <span className={styles.nav__label}>{label}</span>\n {badge !== undefined && badge > 0 && <CountBadge count={badge} />}\n <ChevronDown\n aria-hidden\n className={cx(styles.nav__chevron, isOpen && styles['nav__chevron--open'])}\n />\n </button>\n <ul id={listId} className={styles.nav__sublist} hidden={!isOpen}>\n {children}\n </ul>\n </li>\n );\n};\n\nexport const AppShellNavGroup = /*#__PURE__*/ memo(\n /*#__PURE__*/ named(AppShellNavGroupBase, 'AppShellNavGroup'),\n) as typeof AppShellNavGroupBase;\n\nconst linkHrefs = (links: readonly AppShellNavLink[]): string[] =>\n links.flatMap(link => [\n ...(link.href !== undefined && link.isActive === undefined ? [link.href] : []),\n ...linkHrefs(link.items ?? []),\n ]);\n\nexport type AppShellNavProps = {\n /** Titled blocks of links. */\n sections?: AppShellNavSection[];\n /** The router's current path: the longest matching `href` is the current page. */\n currentPath?: string;\n /** The landmark's name; `labels.appShell.navigation` by default. */\n label?: string;\n /** Your own `AppShellNavItem` / `AppShellNavGroup` rows, after the sections. */\n children?: ReactNode;\n className?: string;\n testId?: string;\n};\n\n/** The sidebar's `<nav>`: sections of links with icons, counts and nested groups. */\nconst AppShellNavBase = ({\n sections = [],\n currentPath,\n label,\n children,\n className,\n testId,\n}: AppShellNavProps) => {\n const labels = useAppShellLabels();\n const baseId = useId();\n\n const activeHref = useMemo(\n () => findActiveHref(linkHrefs(sections.flatMap(section => section.items)), currentPath),\n [sections, currentPath],\n );\n\n const isActive = (link: AppShellNavLink): boolean =>\n link.isActive ?? (link.href !== undefined && link.href === activeHref);\n\n const containsActive = (link: AppShellNavLink): boolean =>\n (link.items ?? []).some(child => isActive(child) || containsActive(child));\n\n const renderLink = (link: AppShellNavLink): ReactNode =>\n link.items && link.items.length > 0 ? (\n <AppShellNavGroup\n key={link.id}\n label={link.label}\n icon={link.icon}\n badge={link.badge}\n hasActiveItem={containsActive(link)}\n >\n {link.items.map(renderLink)}\n </AppShellNavGroup>\n ) : (\n <AppShellNavItem\n key={link.id}\n label={link.label}\n href={link.href}\n icon={link.icon}\n badge={link.badge}\n isActive={isActive(link)}\n isDisabled={link.isDisabled}\n onClick={link.onClick}\n linkProps={link.linkProps}\n />\n );\n\n return (\n <nav\n aria-label={resolveLabel('AppShellNav.label', label, labels.navigation)}\n className={cx(styles.nav, className)}\n data-testid={testId}\n >\n {sections.map(section => {\n const headingId = `${baseId}-${section.id}`;\n\n return (\n <div\n key={section.id}\n className={styles.nav__section}\n role={section.label ? 'group' : undefined}\n aria-labelledby={section.label ? headingId : undefined}\n >\n {section.label && (\n <p id={headingId} className={styles['nav__section-label']}>\n {section.label}\n </p>\n )}\n <ul className={styles.nav__list}>{section.items.map(renderLink)}</ul>\n </div>\n );\n })}\n {children && <ul className={styles.nav__list}>{children}</ul>}\n </nav>\n );\n};\n\nexport const AppShellNav = /*#__PURE__*/ memo(\n /*#__PURE__*/ named(AppShellNavBase, 'AppShellNav'),\n) as typeof AppShellNavBase;\n"],"names":["BADGE_MAX","CountBadge","count","labels","useAppShellLabels","jsxs","Fragment","jsx","styles","resolveFormatter","AppShellNavItemBase","label","href","icon","badge","isActive","isDisabled","onClick","linkProps","className","testId","isCollapsed","onNavigate","useAppShell","content","title","cx","handleClick","event","_a","UiLink","AppShellNavItem","memo","named","AppShellNavGroupBase","hasActiveItem","children","onExpandSidebar","listId","useId","isExpanded","setIsExpanded","useState","useEffect","isOpen","ChevronDown","AppShellNavGroup","linkHrefs","links","link","AppShellNavBase","sections","currentPath","baseId","activeHref","useMemo","findActiveHref","section","containsActive","child","renderLink","resolveLabel","headingId","AppShellNav"],"mappings":"odA4CMA,EAAY,GAEZC,EAAa,CAAC,CAAE,MAAAC,KAA+B,CACnD,MAAMC,EAASC,EAAAA,kBAAA,EAEf,OACEC,EAAAA,KAAAC,WAAA,CACE,SAAA,CAAAC,EAAAA,IAAC,OAAA,CAAK,cAAW,GAAC,UAAWC,EAAAA,QAAO,WACjC,SAAAN,EAAQF,EAAY,GAAGA,CAAS,IAAME,EACzC,EACAG,EAAAA,KAAC,OAAA,CAAK,UAAWG,EAAAA,QAAO,OACrB,SAAA,CAAA,KACAC,EAAAA,iBAAiB,wBAAyBN,EAAO,MAAOD,CAAK,CAAA,CAAA,CAChE,CAAA,EACF,CAEJ,EAsBMQ,EAAsB,CAAC,CAC3B,MAAAC,EACA,KAAAC,EACA,KAAAC,EACA,MAAAC,EACA,SAAAC,EAAW,GACX,WAAAC,EAAa,GACb,QAAAC,EACA,UAAAC,EACA,UAAAC,EACA,OAAAC,CACF,IAA4B,CAC1B,KAAM,CAAE,YAAAC,EAAa,WAAAC,CAAA,EAAeC,cAAA,EAE9BC,EACJnB,EAAAA,KAAAC,EAAAA,SAAA,CACG,SAAA,CAAAO,SACE,OAAA,CAAK,cAAW,GAAC,UAAWL,UAAO,UACjC,SAAAK,CAAA,CAC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AAA,EARXA,EAAK,EAAA,EAYhB,OACE5C,EAAAA,KAAC,MAAA,CACC,aAAYwD,EAAAA,aAAa,oBAAqBlD,EAAOR,EAAO,UAAU,EACtE,UAAWuB,EAAAA,GAAGlB,UAAO,IAAKW,CAAS,EACnC,cAAaC,EAEZ,SAAA,CAAA+B,EAAS,IAAIM,GAAW,CACvB,MAAMK,EAAY,GAAGT,CAAM,IAAII,EAAQ,EAAE,GAEzC,OACEpD,EAAAA,KAAC,MAAA,CAEC,UAAWG,EAAAA,QAAO,aAClB,KAAMiD,EAAQ,MAAQ,QAAU,OAChC,kBAAiBA,EAAQ,MAAQK,EAAY,OAE5C,SAAA,CAAAL,EAAQ,OACPlD,EAAAA,IAAC,IAAA,CAAE,GAAIuD,EAAW,UAAWtD,EAAAA,QAAO,oBAAoB,EACrD,SAAAiD,EAAQ,KAAA,CACX,EAEFlD,EAAAA,IAAC,MAAG,UAAWC,UAAO,UAAY,SAAAiD,EAAQ,MAAM,IAAIG,CAAU,CAAA,CAAE,CAAA,CAAA,EAV3DH,EAAQ,EAAA,CAanB,CAAC,EACArB,GAAY7B,EAAAA,IAAC,KAAA,CAAG,UAAWC,EAAAA,QAAO,UAAY,SAAA4B,CAAA,CAAS,CAAA,CAAA,CAAA,CAG9D,EAEa2B,EAA4B/B,EAAAA,KACzBC,EAAAA,MAAMiB,EAAiB,aAAa,CACpD"}
@@ -14,6 +14,8 @@ export type AppShellNavLink = {
14
14
  isDisabled?: boolean;
15
15
  /** Nested links: the entry becomes a group that opens and closes. */
16
16
  items?: AppShellNavLink[];
17
+ /** An action row without `href` ("Çıkış yap"), 3.4: a button with the link rows' metrics. */
18
+ onClick?: () => void;
17
19
  /** Extra props for the router's link component. */
18
20
  linkProps?: UiLinkExtraProps;
19
21
  };
@@ -33,12 +35,17 @@ export type AppShellNavItemProps = {
33
35
  /** The current page: drawn as selected and read as `aria-current="page"`. */
34
36
  isActive?: boolean;
35
37
  isDisabled?: boolean;
38
+ /**
39
+ * An action instead of a page (3.4) — "Çıkış yap" at the end of an account menu: without `href`
40
+ * the row is a `<button>` that shares the link rows' size, icon column and hover.
41
+ */
42
+ onClick?: () => void;
36
43
  linkProps?: UiLinkExtraProps;
37
44
  className?: string;
38
45
  testId?: string;
39
46
  };
40
47
  /** One navigation row: icon, label, count. Rendered through the provider's link component. */
41
- declare const AppShellNavItemBase: ({ label, href, icon, badge, isActive, isDisabled, linkProps, className, testId, }: AppShellNavItemProps) => import("react").JSX.Element;
48
+ declare const AppShellNavItemBase: ({ label, href, icon, badge, isActive, isDisabled, onClick, linkProps, className, testId, }: AppShellNavItemProps) => import("react").JSX.Element;
42
49
  export declare const AppShellNavItem: typeof AppShellNavItemBase;
43
50
  export type AppShellNavGroupProps = {
44
51
  label: string;
@@ -14,6 +14,8 @@ export type AppShellNavLink = {
14
14
  isDisabled?: boolean;
15
15
  /** Nested links: the entry becomes a group that opens and closes. */
16
16
  items?: AppShellNavLink[];
17
+ /** An action row without `href` ("Çıkış yap"), 3.4: a button with the link rows' metrics. */
18
+ onClick?: () => void;
17
19
  /** Extra props for the router's link component. */
18
20
  linkProps?: UiLinkExtraProps;
19
21
  };
@@ -33,12 +35,17 @@ export type AppShellNavItemProps = {
33
35
  /** The current page: drawn as selected and read as `aria-current="page"`. */
34
36
  isActive?: boolean;
35
37
  isDisabled?: boolean;
38
+ /**
39
+ * An action instead of a page (3.4) — "Çıkış yap" at the end of an account menu: without `href`
40
+ * the row is a `<button>` that shares the link rows' size, icon column and hover.
41
+ */
42
+ onClick?: () => void;
36
43
  linkProps?: UiLinkExtraProps;
37
44
  className?: string;
38
45
  testId?: string;
39
46
  };
40
47
  /** One navigation row: icon, label, count. Rendered through the provider's link component. */
41
- declare const AppShellNavItemBase: ({ label, href, icon, badge, isActive, isDisabled, linkProps, className, testId, }: AppShellNavItemProps) => import("react").JSX.Element;
48
+ declare const AppShellNavItemBase: ({ label, href, icon, badge, isActive, isDisabled, onClick, linkProps, className, testId, }: AppShellNavItemProps) => import("react").JSX.Element;
42
49
  export declare const AppShellNavItem: typeof AppShellNavItemBase;
43
50
  export type AppShellNavGroupProps = {
44
51
  label: string;