@mrpelz/uikit-ish 7.9.0 → 7.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. package/dist/components/action-sheet/main.d.ts +1 -2
  2. package/dist/components/action-sheet/main.d.ts.map +1 -1
  3. package/dist/components/action-sheet/main.js +12 -12
  4. package/dist/components/action-sheet/main.js.map +1 -1
  5. package/dist/components/action-sheet/props.d.ts +2 -2
  6. package/dist/components/action-sheet/props.d.ts.map +1 -1
  7. package/dist/components/action-sheet/style.css +10 -1
  8. package/dist/components/activity-view/main.d.ts +1 -1
  9. package/dist/components/activity-view/main.d.ts.map +1 -1
  10. package/dist/components/activity-view/main.js +9 -11
  11. package/dist/components/activity-view/main.js.map +1 -1
  12. package/dist/components/activity-view/style.css +21 -21
  13. package/dist/components/alert/main.d.ts +2 -3
  14. package/dist/components/alert/main.d.ts.map +1 -1
  15. package/dist/components/alert/main.js +12 -15
  16. package/dist/components/alert/main.js.map +1 -1
  17. package/dist/components/alert/props.d.ts +3 -3
  18. package/dist/components/alert/style.css +23 -23
  19. package/dist/components/avatar/main.d.ts.map +1 -1
  20. package/dist/components/avatar/main.js +7 -8
  21. package/dist/components/avatar/main.js.map +1 -1
  22. package/dist/components/avatar/style.css +1 -1
  23. package/dist/components/badge/main.d.ts +1 -1
  24. package/dist/components/badge/main.js +4 -4
  25. package/dist/components/badge/main.js.map +1 -1
  26. package/dist/components/badge/style.css +7 -2
  27. package/dist/components/button/main.d.ts.map +1 -1
  28. package/dist/components/button/main.js +9 -9
  29. package/dist/components/button/main.js.map +1 -1
  30. package/dist/components/button/props.d.ts +8 -8
  31. package/dist/components/button/props.d.ts.map +1 -1
  32. package/dist/components/button/style.css +27 -29
  33. package/dist/components/checkbox/main.d.ts.map +1 -1
  34. package/dist/components/checkbox/main.js +5 -7
  35. package/dist/components/checkbox/main.js.map +1 -1
  36. package/dist/components/checkbox/style.css +3 -3
  37. package/dist/components/color-picker/color.d.ts +23 -0
  38. package/dist/components/color-picker/color.d.ts.map +1 -0
  39. package/dist/components/color-picker/color.js +150 -0
  40. package/dist/components/color-picker/color.js.map +1 -0
  41. package/dist/components/color-picker/main.d.ts +41 -5
  42. package/dist/components/color-picker/main.d.ts.map +1 -1
  43. package/dist/components/color-picker/main.js +633 -99
  44. package/dist/components/color-picker/main.js.map +1 -1
  45. package/dist/components/color-picker/named-colors.d.ts +3 -0
  46. package/dist/components/color-picker/named-colors.d.ts.map +1 -0
  47. package/dist/components/color-picker/named-colors.js +152 -0
  48. package/dist/components/color-picker/named-colors.js.map +1 -0
  49. package/dist/components/color-picker/props.d.ts +97 -14
  50. package/dist/components/color-picker/props.d.ts.map +1 -1
  51. package/dist/components/color-picker/style.css +316 -50
  52. package/dist/components/contextual-menu/main.d.ts.map +1 -1
  53. package/dist/components/contextual-menu/main.js +189 -236
  54. package/dist/components/contextual-menu/main.js.map +1 -1
  55. package/dist/components/contextual-menu/props.d.ts +10 -33
  56. package/dist/components/contextual-menu/props.d.ts.map +1 -1
  57. package/dist/components/contextual-menu/style.css +60 -34
  58. package/dist/components/date-picker/main.d.ts.map +1 -1
  59. package/dist/components/date-picker/main.js +100 -66
  60. package/dist/components/date-picker/main.js.map +1 -1
  61. package/dist/components/date-picker/props.d.ts +10 -10
  62. package/dist/components/date-picker/props.d.ts.map +1 -1
  63. package/dist/components/date-picker/style.css +51 -47
  64. package/dist/components/drawer/main.d.ts.map +1 -1
  65. package/dist/components/drawer/main.js +52 -7
  66. package/dist/components/drawer/main.js.map +1 -1
  67. package/dist/components/drawer/style.css +1 -1
  68. package/dist/components/edit-menu/main.d.ts.map +1 -1
  69. package/dist/components/edit-menu/main.js +41 -30
  70. package/dist/components/edit-menu/main.js.map +1 -1
  71. package/dist/components/edit-menu/props.d.ts +4 -4
  72. package/dist/components/edit-menu/props.d.ts.map +1 -1
  73. package/dist/components/edit-menu/style.css +27 -1
  74. package/dist/components/form/main.js +3 -3
  75. package/dist/components/form/main.js.map +1 -1
  76. package/dist/components/glass/main.d.ts +1 -1
  77. package/dist/components/glass/main.js +4 -4
  78. package/dist/components/glass/main.js.map +1 -1
  79. package/dist/components/glass/props.d.ts +5 -5
  80. package/dist/components/glass/props.d.ts.map +1 -1
  81. package/dist/components/glass/style.css +157 -157
  82. package/dist/components/header/main.d.ts.map +1 -1
  83. package/dist/components/header/main.js +27 -26
  84. package/dist/components/header/main.js.map +1 -1
  85. package/dist/components/header/style.css +13 -52
  86. package/dist/components/index.d.ts +6 -6
  87. package/dist/components/index.d.ts.map +1 -1
  88. package/dist/components/index.js +2 -2
  89. package/dist/components/index.js.map +1 -1
  90. package/dist/components/layout/main.js +5 -5
  91. package/dist/components/layout/main.js.map +1 -1
  92. package/dist/components/layout/style.css +2 -2
  93. package/dist/components/list/main.d.ts +11 -3
  94. package/dist/components/list/main.d.ts.map +1 -1
  95. package/dist/components/list/main.js +296 -300
  96. package/dist/components/list/main.js.map +1 -1
  97. package/dist/components/list/props.d.ts +49 -16
  98. package/dist/components/list/props.d.ts.map +1 -1
  99. package/dist/components/list/reorder.d.ts +146 -0
  100. package/dist/components/list/reorder.d.ts.map +1 -0
  101. package/dist/components/list/reorder.js +819 -0
  102. package/dist/components/list/reorder.js.map +1 -0
  103. package/dist/components/list/select.d.ts +6 -0
  104. package/dist/components/list/select.d.ts.map +1 -0
  105. package/dist/components/list/select.js +141 -0
  106. package/dist/components/list/select.js.map +1 -0
  107. package/dist/components/list/style.css +206 -158
  108. package/dist/components/menu/main.d.ts +81 -30
  109. package/dist/components/menu/main.d.ts.map +1 -1
  110. package/dist/components/menu/main.js +568 -93
  111. package/dist/components/menu/main.js.map +1 -1
  112. package/dist/components/menu/props.d.ts +3 -4
  113. package/dist/components/menu/props.d.ts.map +1 -1
  114. package/dist/components/menu/style.css +30 -12
  115. package/dist/components/navigation/main.d.ts +5 -2
  116. package/dist/components/navigation/main.d.ts.map +1 -1
  117. package/dist/components/navigation/main.js +287 -57
  118. package/dist/components/navigation/main.js.map +1 -1
  119. package/dist/components/navigation/props.d.ts +37 -4
  120. package/dist/components/navigation/props.d.ts.map +1 -1
  121. package/dist/components/navigation/style.css +32 -2
  122. package/dist/components/page/main.d.ts.map +1 -1
  123. package/dist/components/page/main.js +12 -7
  124. package/dist/components/page/main.js.map +1 -1
  125. package/dist/components/page/props.d.ts +1 -1
  126. package/dist/components/page/style.css +3 -6
  127. package/dist/components/page-control/main.d.ts +1 -1
  128. package/dist/components/page-control/main.js +9 -9
  129. package/dist/components/page-control/main.js.map +1 -1
  130. package/dist/components/page-control/style.css +2 -2
  131. package/dist/components/popover/main.d.ts +1 -1
  132. package/dist/components/popover/main.d.ts.map +1 -1
  133. package/dist/components/popover/main.js +41 -17
  134. package/dist/components/popover/main.js.map +1 -1
  135. package/dist/components/popover/props.d.ts +2 -2
  136. package/dist/components/popover/style.css +10 -1
  137. package/dist/components/progress/main.d.ts +1 -2
  138. package/dist/components/progress/main.d.ts.map +1 -1
  139. package/dist/components/progress/main.js +45 -19
  140. package/dist/components/progress/main.js.map +1 -1
  141. package/dist/components/progress/props.d.ts +22 -8
  142. package/dist/components/progress/props.d.ts.map +1 -1
  143. package/dist/components/progress/style.css +15 -15
  144. package/dist/components/roll/main.js +10 -10
  145. package/dist/components/roll/main.js.map +1 -1
  146. package/dist/components/roll/props.d.ts +1 -1
  147. package/dist/components/roll/style.css +11 -11
  148. package/dist/components/segmented/main.d.ts.map +1 -1
  149. package/dist/components/segmented/main.js +183 -31
  150. package/dist/components/segmented/main.js.map +1 -1
  151. package/dist/components/segmented/props.d.ts +7 -0
  152. package/dist/components/segmented/props.d.ts.map +1 -1
  153. package/dist/components/segmented/style.css +148 -14
  154. package/dist/components/sheet/main.d.ts +6 -5
  155. package/dist/components/sheet/main.d.ts.map +1 -1
  156. package/dist/components/sheet/main.js +53 -27
  157. package/dist/components/sheet/main.js.map +1 -1
  158. package/dist/components/sheet/props.d.ts +29 -1
  159. package/dist/components/sheet/props.d.ts.map +1 -1
  160. package/dist/components/sheet/style.css +138 -33
  161. package/dist/components/sidebar/main.d.ts.map +1 -1
  162. package/dist/components/sidebar/main.js +9 -13
  163. package/dist/components/sidebar/main.js.map +1 -1
  164. package/dist/components/sidebar/style.css +8 -8
  165. package/dist/components/slider/main.d.ts.map +1 -1
  166. package/dist/components/slider/main.js +19 -19
  167. package/dist/components/slider/main.js.map +1 -1
  168. package/dist/components/slider/props.d.ts +1 -2
  169. package/dist/components/slider/props.d.ts.map +1 -1
  170. package/dist/components/slider/style.css +25 -25
  171. package/dist/components/stepper/main.d.ts.map +1 -1
  172. package/dist/components/stepper/main.js +13 -15
  173. package/dist/components/stepper/main.js.map +1 -1
  174. package/dist/components/stepper/style.css +8 -8
  175. package/dist/components/switch/main.d.ts.map +1 -1
  176. package/dist/components/switch/main.js +25 -18
  177. package/dist/components/switch/main.js.map +1 -1
  178. package/dist/components/switch/props.d.ts +5 -3
  179. package/dist/components/switch/props.d.ts.map +1 -1
  180. package/dist/components/switch/style.css +13 -17
  181. package/dist/components/symbol/main.d.ts +1 -1
  182. package/dist/components/symbol/main.d.ts.map +1 -1
  183. package/dist/components/symbol/main.js +6 -5
  184. package/dist/components/symbol/main.js.map +1 -1
  185. package/dist/components/symbol/props.d.ts +3 -3
  186. package/dist/components/symbol/style.css +1 -1
  187. package/dist/components/tab-bar/main.d.ts +2 -2
  188. package/dist/components/tab-bar/main.d.ts.map +1 -1
  189. package/dist/components/tab-bar/main.js +78 -59
  190. package/dist/components/tab-bar/main.js.map +1 -1
  191. package/dist/components/tab-bar/props.d.ts +3 -3
  192. package/dist/components/tab-bar/style.css +92 -56
  193. package/dist/components/text-field/main.d.ts +3 -2
  194. package/dist/components/text-field/main.d.ts.map +1 -1
  195. package/dist/components/text-field/main.js +26 -28
  196. package/dist/components/text-field/main.js.map +1 -1
  197. package/dist/components/text-field/props.d.ts +16 -1
  198. package/dist/components/text-field/props.d.ts.map +1 -1
  199. package/dist/components/text-field/style.css +105 -31
  200. package/dist/components/toolbar/main.d.ts.map +1 -1
  201. package/dist/components/toolbar/main.js +18 -20
  202. package/dist/components/toolbar/main.js.map +1 -1
  203. package/dist/components/toolbar/props.d.ts +10 -4
  204. package/dist/components/toolbar/props.d.ts.map +1 -1
  205. package/dist/components/toolbar/style.css +13 -13
  206. package/dist/components/tooltip/main.js +4 -4
  207. package/dist/components/tooltip/main.js.map +1 -1
  208. package/dist/components/tooltip/style.css +5 -5
  209. package/dist/components/typography/main.d.ts +2 -2
  210. package/dist/components/typography/main.d.ts.map +1 -1
  211. package/dist/components/typography/main.js +10 -12
  212. package/dist/components/typography/main.js.map +1 -1
  213. package/dist/components/typography/props.d.ts +9 -9
  214. package/dist/components/typography/props.d.ts.map +1 -1
  215. package/dist/components/typography/style.css +503 -503
  216. package/dist/components/utils/main.d.ts +52 -6
  217. package/dist/components/utils/main.d.ts.map +1 -1
  218. package/dist/components/utils/main.js +163 -6
  219. package/dist/components/utils/main.js.map +1 -1
  220. package/dist/components/utils/props.d.ts +24 -3
  221. package/dist/components/utils/props.d.ts.map +1 -1
  222. package/dist/components/utils/style.css +4 -4
  223. package/dist/components/viewport/edge-effect.d.ts +10 -0
  224. package/dist/components/viewport/edge-effect.d.ts.map +1 -0
  225. package/dist/components/viewport/edge-effect.js +100 -0
  226. package/dist/components/viewport/edge-effect.js.map +1 -0
  227. package/dist/components/viewport/edge.d.ts +39 -0
  228. package/dist/components/viewport/edge.d.ts.map +1 -0
  229. package/dist/components/viewport/edge.js +151 -0
  230. package/dist/components/viewport/edge.js.map +1 -0
  231. package/dist/components/viewport/input.d.ts +19 -3
  232. package/dist/components/viewport/input.d.ts.map +1 -1
  233. package/dist/components/viewport/input.js +197 -12
  234. package/dist/components/viewport/input.js.map +1 -1
  235. package/dist/components/viewport/main.d.ts +10 -5
  236. package/dist/components/viewport/main.d.ts.map +1 -1
  237. package/dist/components/viewport/main.js +327 -90
  238. package/dist/components/viewport/main.js.map +1 -1
  239. package/dist/components/viewport/padding.d.ts +31 -3
  240. package/dist/components/viewport/padding.d.ts.map +1 -1
  241. package/dist/components/viewport/padding.js +116 -17
  242. package/dist/components/viewport/padding.js.map +1 -1
  243. package/dist/components/viewport/props.d.ts +69 -8
  244. package/dist/components/viewport/props.d.ts.map +1 -1
  245. package/dist/components/viewport/style.css +230 -6
  246. package/dist/styles.css +285 -302
  247. package/package.json +4 -4
@@ -9,7 +9,7 @@
9
9
  opacity: calc(1 - var(--uikit-switch-pressed));
10
10
  place-items: center;
11
11
  pointer-events: none;
12
- transition: opacity var(--glass-ios-lens-duration);
12
+ transition: opacity var(--glass-ui-lens-duration);
13
13
 
14
14
  &::before {
15
15
  width: 1px;
@@ -30,13 +30,13 @@
30
30
  opacity: calc(1 - var(--uikit-switch-pressed));
31
31
  place-items: center;
32
32
  pointer-events: none;
33
- transition: opacity var(--glass-ios-lens-duration);
33
+ transition: opacity var(--glass-ui-lens-duration);
34
34
 
35
35
  &::before {
36
36
  width: 9px;
37
37
  height: 9px;
38
38
  box-sizing: border-box;
39
- border: 1px solid var(--color-ios-tertiary-label);
39
+ border: 1px solid var(--color-ui-tertiary-label);
40
40
  border-radius: 50%;
41
41
  content: '';
42
42
  }
@@ -49,8 +49,8 @@
49
49
  --uikit-switch-knob-width: 39px;
50
50
  --uikit-switch-knob-start: 2px;
51
51
  --uikit-switch-pressed: 0;
52
- --uikit-switch-on-color: var(--color-ios-system-green);
53
- --uikit-switch-off-color: var(--color-ios-system-fill);
52
+ --uikit-switch-on-color: var(--color-ui-system-green);
53
+ --uikit-switch-off-color: var(--color-ui-system-fill);
54
54
 
55
55
  position: relative;
56
56
  display: inline-block;
@@ -76,7 +76,7 @@
76
76
  content: '';
77
77
  inset: 0;
78
78
  transform: scale(calc(1 - 0.25 * var(--uikit-switch-pressed)));
79
- transition-duration: var(--glass-ios-lens-duration);
79
+ transition-duration: var(--glass-ui-lens-duration);
80
80
  }
81
81
 
82
82
  /* Mixed but checked (see below): the on color from its start, fading
@@ -91,7 +91,7 @@
91
91
  mask-image: linear-gradient(to right, #000 25%, transparent 50%);
92
92
  opacity: 0;
93
93
  transform: scale(calc(1 - 0.25 * var(--uikit-switch-pressed)));
94
- transition-duration: var(--glass-ios-lens-duration);
94
+ transition-duration: var(--glass-ui-lens-duration);
95
95
  transition-property: opacity, transform;
96
96
  }
97
97
 
@@ -109,10 +109,6 @@
109
109
  }
110
110
  }
111
111
 
112
- &:active {
113
- --uikit-switch-pressed: 1;
114
- }
115
-
116
112
  &[data-disabled],
117
113
  &[data-readonly] {
118
114
  --uikit-switch-pressed: 0;
@@ -160,12 +156,12 @@
160
156
  );
161
157
  inset-inline-start: var(--uikit-switch-knob-start);
162
158
  transform: scale(
163
- calc(1 + (var(--glass-ios-lens-scale) - 1) * var(--uikit-switch-pressed))
159
+ calc(1 + (var(--glass-ui-lens-scale) - 1) * var(--uikit-switch-pressed))
164
160
  );
165
161
  transform-origin: center;
166
162
  transition-duration:
167
- var(--uikit-switch-knob-move-duration, var(--glass-ios-lens-duration)),
168
- var(--glass-ios-lens-duration), var(--glass-ios-lens-duration);
163
+ var(--uikit-switch-knob-move-duration, var(--glass-ui-lens-duration)),
164
+ var(--glass-ui-lens-duration), var(--glass-ui-lens-duration);
169
165
  transition-property: inset-inline-start, background-color, transform;
170
166
 
171
167
  &::before {
@@ -179,17 +175,17 @@
179
175
  color-mix(in srgb, var(--uikit-switch-on-color) 75%, transparent);
180
176
  content: '';
181
177
  opacity: var(--uikit-switch-pressed);
182
- transition-duration: var(--glass-ios-lens-duration);
178
+ transition-duration: var(--glass-ui-lens-duration);
183
179
  }
184
180
 
185
181
  &::after {
186
182
  position: absolute;
187
183
  border-radius: inherit;
188
- box-shadow: var(--glass-ios-lens-shadow);
184
+ box-shadow: var(--glass-ui-lens-shadow);
189
185
  content: '';
190
186
  inset: 0;
191
187
  opacity: var(--uikit-switch-pressed);
192
- transition-duration: var(--glass-ios-lens-duration);
188
+ transition-duration: var(--glass-ui-lens-duration);
193
189
  }
194
190
  }
195
191
  }
@@ -1,7 +1,7 @@
1
1
  import './style.css';
2
2
  import type { SymbolProps } from './props.js';
3
3
  export type { SymbolIcon, SymbolProps } from './props.js';
4
- /** An icon (e.g. an SF Symbol), with e.g. a `Badge`. */
4
+ /** An icon's outlines (e.g. an SF Symbol's), with e.g. a `Badge`. */
5
5
  export declare const Symbol: import("preact").FunctionalComponent<import("react").PropsWithoutRef<SymbolProps> & {
6
6
  ref?: import("preact").Ref<HTMLSpanElement> | undefined;
7
7
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/symbol/main.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAKrB,OAAO,KAAK,EAAc,WAAW,EAAE,MAAM,YAAY,CAAC;AAE1D,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAyE1D,wDAAwD;AACxD,eAAO,MAAM,MAAM;;EAyClB,CAAC"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/symbol/main.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAKrB,OAAO,KAAK,EAAc,WAAW,EAAE,MAAM,YAAY,CAAC;AAE1D,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AA0E1D,qEAAqE;AACrE,eAAO,MAAM,MAAM;;EAyClB,CAAC"}
@@ -2,10 +2,11 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
2
2
  import './style.css';
3
3
  import { forwardRef } from 'react';
4
4
  import { cn, withStyle } from '../utils/main.js';
5
- // An SF Symbol, sized like the SF Pro glyph at the current font size, so it
6
- // can stand in for one (e.g. `􀋃` in Figma). Its outlines are filled as
7
- // given (SF Symbols': the Regular weight only, whatever its host's font
8
- // weight), its layers at their relative opacities.
5
+ // An icon's outlines (e.g. an SF Symbol's; the library ships none), sized
6
+ // like the SF Pro glyph at the current font size, so it can stand in for
7
+ // one. Its outlines are filled as given (SF Symbols': the Regular weight
8
+ // only, whatever its host's font weight), its layers at their relative
9
+ // opacities.
9
10
  //
10
11
  // Emphasized (e.g. a selected tab's), it shows its `emphasizedIcon` (e.g.
11
12
  // the filled variant) instead: both glyphs stacked, faded by
@@ -34,6 +35,6 @@ const Glyph = ({ icon, variant, }) => {
34
35
  const opacity = Math.max(...icon.svgPathData.map(({ fillOpacity = 1 }) => fillOpacity));
35
36
  return (_jsx("span", { className: "uikit-symbol-glyph", "data-symbol-part": "glyph", "data-variant": variant, children: _jsx("svg", { "aria-hidden": "true", fill: "currentcolor", height: `${String(height)}em`, viewBox: icon.viewBox, width: `${String(width)}em`, children: icon.svgPathData.map(({ d, fillOpacity = 1 }, index) => (_jsx("path", { d: d, fillOpacity: fillOpacity === opacity ? undefined : fillOpacity / opacity }, index))) }) }));
36
37
  };
37
- /** An icon (e.g. an SF Symbol), with e.g. a `Badge`. */
38
+ /** An icon's outlines (e.g. an SF Symbol's), with e.g. a `Badge`. */
38
39
  export const Symbol = forwardRef(({ baselineShift = 'optical', children, className, emphasizedIcon, icon, style, ...props }, ref) => (_jsxs("span", { ref: ref, "data-baseline-shift": baselineShift, "data-symbol": icon.sourceName, style: withStyle({ '--uikit-symbol-height': `${String(sizeOf(icon).height)}em` }, style), ...props, className: cn('uikit-symbol', className), children: [emphasizedIcon ? (_jsxs(_Fragment, { children: [_jsx(Glyph, { icon: icon, variant: "regular" }), _jsx(Glyph, { icon: emphasizedIcon, variant: "emphasized" })] })) : (_jsx(Glyph, { icon: icon })), children] })));
39
40
  //# sourceMappingURL=main.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/symbol/main.tsx"],"names":[],"mappings":";AAAA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAKjD,4EAA4E;AAC5E,wEAAwE;AACxE,w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AAG,MAAM,CAAC,KAAK,CAAC,IAAI,YAE1B,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,WAAW,GAAG,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,CACvD,eAEE,CAAC,EAAE,CAAC,EACJ,WAAW,EACT,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,GAAG,OAAO,IAHxD,KAAK,CAKV,CACH,CAAC,GACE,GACD,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,wDAAwD;AACxD,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAC9B,CACE,EACE,aAAa,GAAG,SAAS,EACzB,QAAQ,EACR,SAAS,EACT,cAAc,EACd,IAAI,EACJ,KAAK,EACL,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE,CAAC,CACH,gBACE,GAAG,EAAE,GAAG,yBACa,aAAa,iBACrB,IAAI,CAAC,UAAU,EAC5B,KAAK,EAAE,SAAS,CACd,EAAE,uBAAuB,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,EAC/D,KAAK,CACN,KACG,KAAK,EACT,SAAS,EAAE,EAAE,CAAC,cAAc,EAAE,SAAS,CAAC,aAEvC,cAAc,CAAC,CAAC,CAAC,CAChB,8BACE,KAAC,KAAK,IACJ,IAAI,EAAE,IAAI,EACV,OAAO,EAAC,SAAS,GACjB,EACF,KAAC,KAAK,IACJ,IAAI,EAAE,cAAc,EACpB,OAAO,EAAC,YAAY,GACpB,IACD,CACJ,CAAC,CAAC,CAAC,CACF,KAAC,KAAK,IAAC,IAAI,EAAE,IAAI,GAAI,CACtB,EACA,QAAQ,IACJ,CACR,CACF,CAAC"}
1
+ {"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/symbol/main.tsx"],"names":[],"mappings":";AAAA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,U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,IACJ,CACR,CACF,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import type { ComponentProps } from 'react';
2
2
  /**
3
- * An icon's outlines: filled paths in a view box, e.g. an SF Symbol from
4
- * `@bradleyhodges/sfsymbols` (`sfBell`; its icons have this shape, no
5
- * dependency needed; mind Apple's terms for SF Symbols).
3
+ * An icon's outlines: filled paths in a view box. The library ships no
4
+ * icons: e.g. an SF Symbol from `@bradleyhodges/sfsymbols` (`sfBell`) has
5
+ * this shape (Apple's, licensed for Apple platforms only; no dependency).
6
6
  */
7
7
  export type SymbolIcon = {
8
8
  /** Its name (e.g. `bell`), as its `data-symbol`. */
@@ -23,7 +23,7 @@
23
23
  display: inline-flex;
24
24
  mix-blend-mode: var(--uikit-symbol-blend, normal);
25
25
  scale: var(--uikit-symbol-scale, none);
26
- transition: scale var(--glass-ios-lens-duration, 0s);
26
+ transition: scale var(--glass-ui-lens-duration, 0s);
27
27
 
28
28
  & > svg {
29
29
  overflow: visible;
@@ -3,8 +3,8 @@ import './style.css';
3
3
  import type { CollapsedGroupSelection, TabBarAccessoryProps, TabBarGroupProps, TabBarListProps, TabBarRootProps, TabBarTabProps } from './props.js';
4
4
  export type { AccessoryVisibility, CollapsedContent, CollapsedGroupSelection, CollapsedPosition, TabBarAccessoryProps, TabBarGroupProps, TabBarListProps, TabBarRootProps, TabBarTabProps, } from './props.js';
5
5
  /**
6
- * A choice of what remains while collapsed (for `visibleWhenCollapsed`), as
7
- * iOS's: the active tab (by its value, among the groups' tab values) and its
6
+ * A choice of what remains while collapsed (for `visibleWhenCollapsed`): the
7
+ * active tab (by its value, among the groups' tab values) and its
8
8
  * group; without one, the first group's first tab. Every group's `tab` is
9
9
  * its active tab, or its first (for groups the app keeps, too).
10
10
  */
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/tab-bar/main.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AA2BrB,OAAO,KAAK,EAGV,uBAAuB,EAKvB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,cAAc,EACf,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,uBAAuB,EACvB,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,cAAc,GACf,MAAM,YAAY,CAAC;AA4OpB;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,KAAK,EACtC,QAAQ,SAAS,CAAC,SAAS,KAAK,EAAE,CAAC,EAAE,EACrC,OAAO,KAAK,GAAG,SAAS,KACvB,uBAAuB,EAQzB,CAAC;AA21CF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;CAUlB,CAAC"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/tab-bar/main.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AA6BrB,OAAO,KAAK,EAGV,uBAAuB,EAKvB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,cAAc,EACf,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,uBAAuB,EACvB,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,cAAc,GACf,MAAM,YAAY,CAAC;AAuOpB;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,KAAK,EACtC,QAAQ,SAAS,CAAC,SAAS,KAAK,EAAE,CAAC,EAAE,EACrC,OAAO,KAAK,GAAG,SAAS,KACvB,uBAAuB,EAQzB,CAAC;AAs4CF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;CAUlB,CAAC"}
@@ -4,11 +4,11 @@ import './style.css';
4
4
  import { Tabs as BaseTabs } from '@base-ui/react/tabs';
5
5
  import { createContext, forwardRef, useCallback, useContext, useId, useLayoutEffect, useMemo, useRef, useState, } from 'react';
6
6
  import { GlassBackground } from '../glass/main.js';
7
- import { cn, edgeScrollDelta, frameElapsed, useForwardedRef, usePointerDrag, useSecondaryClick, withStyle, } from '../utils/main.js';
8
- // Source: Apple iOS 26 Figma (“Tab Bar - iPhone”, BG Context Dim/Bright), with
9
- // the selected content color mapped to the app tint (`--color-ios-primary`,
10
- // i.e. `systemBlue`); glass materials, vibrant content and selection colors are
11
- // tokens in `styles.css`, used via `glass/main.tsx`. The selection's transition
7
+ import { cn, delayLens, edgeScrollDelta, frameElapsed, useForwardedRef, usePointerDrag, useSecondaryClick, withStyle, } from '../utils/main.js';
8
+ // The tab bar in dim and bright contexts, with the selected content color
9
+ // mapped to the app tint (`--color-ui-primary`, i.e. `systemBlue`); glass
10
+ // materials, vibrant content and selection colors are tokens in
11
+ // `styles.css`, used via `glass/main.tsx`. The selection's transition
12
12
  // duration comes from Framework7 `components/toolbar/toolbar-ios.less`
13
13
  // (`.tab-link-highlight`), disabled opacity from Framework7 `less/mixins.less`
14
14
  // (`.disabled()`).
@@ -17,49 +17,44 @@ import { cn, edgeScrollDelta, frameElapsed, useForwardedRef, usePointerDrag, use
17
17
  // (selected labels: 17px, bold); the compact size's (17/28px, 10/12px) are in
18
18
  // none.
19
19
  //
20
- // Deviations:
21
- // - The list's `size` (UIKit size class) switches between the iPhone and the
22
- // iPad tab bar, for all its groups; tabs hold a symbol, a label or both in
23
- // either: - `compact` (Figma “Tab Bar - iPhone”): content stacked, 54px high,
24
- // with a preferred (shrinkable, not fixed) width of 102px, down to a minimum
25
- // of 54px (Figma: 102px, or filling the bar with 4+ tabs); `width` is used as
26
- // `flex-basis` is ignored for the group's intrinsic size. A single tab next
27
- // to the search tab is 102px (Figma: 110px). Neighbors overlap. - `regular`
28
- // (Figma “Tab Bar - iPad”): content in a row, 36px high, hugging it (Figma:
29
- // stretching to the bar's width), with larger labels that grow when selected
30
- // and smaller symbols; white selected content on dim glass (iPhone: the
31
- // tint). The selection is the same token as the iPhone's (Figma: #EDEDED for
32
- // symbol tabs, rgb(118 118 128 / 12%) for text tabs in the bright context,
33
- // one or two levels apart). Symbol-only tabs are circles in the compact size
34
- // (Figma: iPhone search) and capsules hugging the symbol in the regular size
35
- // (Figma: iPad sidebar and search, 50×36), but circles alone in a group;
36
- // others capsules; a tab's (or its group's) `shape` overrides this (`circle`:
37
- // a circle in both sizes). Labels reserve their selected width, so selecting
38
- // a tab doesn't shift the tabs.
39
- // - The bar's inline padding is always 32px (Figma: 28px with up to 3 tabs).
40
- // - No padding below the groups (Figma: 32px, within the home indicator's
41
- // 34px): the safe area is its anchor's (a `Viewport.BlockEnd`), so it sits
42
- // right above it.
43
- // - In a bar wider than its groups, the space between them widens (Figma:
44
- // groups centered), the first at the bar's start, as when collapsed.
45
- // - Nothing isolates blending (Figma: each group), as that would cut the glass
46
- // blur off from the content behind the bar; glass, indicator and tabs stack
47
- // by document order instead.
20
+ // Also:
21
+ // - The list's `size` (a size class) switches between the phone and the
22
+ // tablet tab bar, for all its groups; tabs hold a symbol, a label or both in
23
+ // either: - `compact`: content stacked, 54px high, with a preferred
24
+ // (shrinkable, not fixed) width of 102px, down to a minimum of 54px;
25
+ // `width` is used as `flex-basis` is ignored for the group's intrinsic
26
+ // size. A single tab next to the search tab is 102px. Neighbors overlap.
27
+ // - `regular`: content in a row, 36px high, hugging it, with larger labels
28
+ // that grow when selected and smaller symbols; white selected content on
29
+ // dim glass (compact: the tint). The selection is the same token as the
30
+ // compact size's. Symbol-only tabs are circles in the compact size and
31
+ // capsules hugging the symbol in the regular size (50×36), but circles
32
+ // alone in a group; others capsules; a tab's (or its group's) `shape`
33
+ // overrides this (`circle`: a circle in both sizes). Labels reserve their
34
+ // selected width, so selecting a tab doesn't shift the tabs.
35
+ // - The bar's inline padding is always 32px.
36
+ // - No padding below the groups: the safe area is its anchor's (a
37
+ // `Viewport.BlockEnd`), so it sits right above it.
38
+ // - In a bar wider than its groups, the space between them widens, the first
39
+ // at the bar's start, as when collapsed.
40
+ // - Nothing isolates blending, as that would cut the glass blur off from the
41
+ // content behind the bar; glass, indicator and tabs stack by document order
42
+ // instead.
48
43
  // - Each group positions its own selection (the indicator) on its active tab.
49
44
  // When the active tab leaves a group, its selection fades out in place; a
50
45
  // group gaining the active tab fades its selection in, so the selection never
51
46
  // travels between groups.
52
- // - Figma's fill blend modes are applied as `mix-blend-mode` of separate layers
47
+ // - The fills' blend modes are applied as `mix-blend-mode` of separate layers
53
48
  // (blending with the blurred backdrop), each carrying the fill's opacity.
54
49
  // - The blur layer's own `filter: blur(10px)` and masking are omitted.
55
- // - Figma's glass effect (a layer effect, missing from the CSS export) is
56
- // emulated as in Framework7 `less/mixins.less` (`.ios-glass()`: backdrop
50
+ // - The glass effect (its rim and shading) is emulated as in Framework7 `less/mixins.less` (`.ios-glass()`: backdrop
57
51
  // `saturate(180%)` and `--f7-glass-shadow`, see `styles.css`).
58
52
  // - Pressing a tab turns the selection into a glass lens that follows the
59
53
  // pointer and activates the closest tab on release, as in Framework7
60
54
  // `components/toolbar/tabbar-highlight.js` and `toolbar-ios.less`
61
55
  // (`.tab-link-highlight-pressed`); unlike Framework7 for all pointer types,
62
- // not only touch. The lens belongs to the list, so it moves (and can be
56
+ // not only touch, and only once held a moment or dragged (a quick tap
57
+ // only selects, see `delayLens`). The lens belongs to the list, so it moves (and can be
63
58
  // dragged) between groups, and is drawn above the tabs, as it has to be above
64
59
  // the groups' glass. While dragging, it follows the pointer without a
65
60
  // transition (Framework7: 300ms ease-out).
@@ -179,7 +174,7 @@ const updateSelection = (group, { instant = false } = {}) => {
179
174
  instant: instant || !hadActive,
180
175
  });
181
176
  };
182
- // Collapsed (measured on iOS 26, iPhone): the bar is 48pt high instead of
177
+ // Collapsed: the bar is 48pt high instead of
183
178
  // 62pt around the same center line, 7pt further in from the edges. The
184
179
  // groups and tabs marked `visibleWhenCollapsed` remain (and only those: what
185
180
  // remains is the app's to decide, e.g. by `collapsedSelection`), the others
@@ -190,10 +185,10 @@ const updateSelection = (group, { instant = false } = {}) => {
190
185
  // (with several remaining tabs, on the active one, if it's among them): a
191
186
  // symbol in a 40pt circle, or a label (and symbol, side by side, in the
192
187
  // regular size's metrics) in a capsule. The bar keeps its size (see `List`).
193
- // The regular size (iPad doesn't minimize its tab bar) keeps its height.
188
+ // The regular size keeps its height (it's never minimized).
194
189
  /**
195
- * A choice of what remains while collapsed (for `visibleWhenCollapsed`), as
196
- * iOS's: the active tab (by its value, among the groups' tab values) and its
190
+ * A choice of what remains while collapsed (for `visibleWhenCollapsed`): the
191
+ * active tab (by its value, among the groups' tab values) and its
197
192
  * group; without one, the first group's first tab. Every group's `tab` is
198
193
  * its active tab, or its first (for groups the app keeps, too).
199
194
  */
@@ -454,8 +449,7 @@ const useMarks = () => {
454
449
  }, []);
455
450
  return [count, mark];
456
451
  };
457
- // The accessory (UIKit `bottomAccessory`, e.g. Music's mini player), from
458
- // iOS 26: expanded, a capsule as wide as the bar's groups, its glass 48pt
452
+ // The accessory (e.g. a music app's mini player): expanded, a capsule as wide as the bar's groups, its glass 48pt
459
453
  // high and 8pt above theirs; collapsed, it moves into their row, filling the
460
454
  // space after the remaining groups at the start (spaced as groups are), at
461
455
  // the height of their tabs. Sizes are of its box: the glass extends beyond
@@ -584,6 +578,10 @@ const morphAccessory = (list, isCollapsed) => {
584
578
  if (morph?.isCollapsed === isCollapsed)
585
579
  return;
586
580
  const accessory = accessories.get(list);
581
+ // Its state at once (not at the next frame's placing, see
582
+ // `placeAccessory`): shown in it as the list renders, e.g. its field
583
+ // focused right away.
584
+ accessory?.toggleAttribute('data-collapsed', isCollapsed);
587
585
  accessoryMorphs.set(list, {
588
586
  isCollapsed,
589
587
  // From where it is (also mid-morph); placed right away the first time.
@@ -756,7 +754,7 @@ const ListContext = createContext({
756
754
  * The tab bar, containing `TabBar.Group`s. Renders the glass lens shown
757
755
  * while a tab is pressed.
758
756
  */
759
- const List = forwardRef(({ className, children, collapsed = false, collapsedContent, collapsedPosition = 'inline-start', context: glassContext = 'auto', onClickCapture, onLostPointerCapture, onPointerCancel, onPointerDown, onPointerMove, onPointerUp, size = 'compact', style, ...props }, ref) => {
757
+ const List = forwardRef(({ className, children, collapsed = false, collapsedContent, collapsedPosition = 'inline-start', context: glassContext = 'auto', onClickCapture, onLostPointerCapture, onPointerCancel, onPointerDown, onPointerMove, onPointerUp, onTouchMove, size = 'compact', style, ...props }, ref) => {
760
758
  const listRef = useForwardedRef(ref);
761
759
  const root = useContext(RootContext);
762
760
  // For its accessory (see `Accessory`).
@@ -765,6 +763,12 @@ const List = forwardRef(({ className, children, collapsed = false, collapsedCont
765
763
  setList?.(listRef.current);
766
764
  return () => setList?.(null);
767
765
  }, [listRef, setList]);
766
+ // A single tab, in all its groups (see style.css: no selection), as
767
+ // rendered.
768
+ useLayoutEffect(() => {
769
+ const { current: list } = listRef;
770
+ list?.toggleAttribute('data-single-tab', list.querySelectorAll('[role="tab"]').length === 1);
771
+ });
768
772
  const expandedWidthRef = useRef(undefined);
769
773
  const resizingRef = useRef(collapsed);
770
774
  const wasCollapsedRef = useRef(collapsed);
@@ -967,6 +971,7 @@ const List = forwardRef(({ className, children, collapsed = false, collapsedCont
967
971
  }), [collapsed, collapsedPosition, markGroup, markedGroups]);
968
972
  const handlers = usePointerDrag({
969
973
  end: (list, state, isCancelled) => {
974
+ state.lens.cancel();
970
975
  dragRef.current = undefined;
971
976
  stopScrollingRef.current?.();
972
977
  if (isCancelled) {
@@ -986,25 +991,38 @@ const List = forwardRef(({ className, children, collapsed = false, collapsedCont
986
991
  reveal(state.tab);
987
992
  },
988
993
  move: (list, state, event) => {
994
+ state.clientX = event.clientX;
995
+ state.lens.move(event);
996
+ if (!state.lens.isShown())
997
+ return;
989
998
  state.tab = press(list, event.clientX);
990
999
  dragRef.current = { clientX: event.clientX, state };
991
1000
  },
992
1001
  start: (list, event) => {
993
1002
  if (!(event.target instanceof Element))
994
1003
  return undefined;
995
- if (!event.target.closest('[role="tab"]'))
1004
+ const tab = event.target.closest('[role="tab"]');
1005
+ if (!(tab instanceof HTMLElement))
996
1006
  return undefined;
997
- // Place (and size) the lens at the pointer without a transition,
998
- // then let it follow without delay; only opacity and scale animate.
999
- list.style.setProperty('--uikit-tab-bar-lens-move-duration', '0s');
1000
- list.style.setProperty('--uikit-tab-bar-lens-size-duration', '0s');
1001
- const tab = press(list, event.clientX);
1002
- list.getBoundingClientRect();
1003
- list.style.removeProperty('--uikit-tab-bar-lens-size-duration');
1004
- list.style.setProperty('--uikit-tab-bar-pressed', '1');
1005
- const state = { tab };
1006
- dragRef.current = { clientX: event.clientX, state };
1007
- stopScrollingRef.current = autoScroll(dragRef);
1007
+ // The press (the lens, its group grown) a moment later: a quick
1008
+ // tap only selects its tab (see `delayLens`).
1009
+ const state = {
1010
+ clientX: event.clientX,
1011
+ lens: delayLens(event, () => {
1012
+ // Place (and size) the lens at the pointer without a
1013
+ // transition, then let it follow without delay; only opacity
1014
+ // and scale animate.
1015
+ list.style.setProperty('--uikit-tab-bar-lens-move-duration', '0s');
1016
+ list.style.setProperty('--uikit-tab-bar-lens-size-duration', '0s');
1017
+ state.tab = press(list, state.clientX);
1018
+ list.getBoundingClientRect();
1019
+ list.style.removeProperty('--uikit-tab-bar-lens-size-duration');
1020
+ list.style.setProperty('--uikit-tab-bar-pressed', '1');
1021
+ dragRef.current = { clientX: state.clientX, state };
1022
+ stopScrollingRef.current = autoScroll(dragRef);
1023
+ }),
1024
+ tab,
1025
+ };
1008
1026
  return state;
1009
1027
  },
1010
1028
  }, {
@@ -1013,8 +1031,9 @@ const List = forwardRef(({ className, children, collapsed = false, collapsedCont
1013
1031
  onPointerDown,
1014
1032
  onPointerMove,
1015
1033
  onPointerUp,
1034
+ onTouchMove,
1016
1035
  });
1017
- return (_jsx(ListContext.Provider, { value: context, children: _jsxs(BaseTabs.List, { ref: listRef, "data-collapsed": collapsed ? '' : undefined, "data-collapsed-content": collapsed ? collapsedContent : undefined, "data-expanding": isExpanding ? '' : undefined, "data-glass-context": glassContext, "data-size": size, "data-spaced": markedGroups > 1 ? '' : undefined, "data-wide": isWide ? '' : undefined, style: withStyle({ 'anchor-name': root.anchor }, style), ...props, ...handlers, className: cn('uikit-tab-bar-list', className), "data-tab-bar-part": "list", onClickCapture: (event) => {
1036
+ return (_jsx(ListContext.Provider, { value: context, children: _jsxs(BaseTabs.List, { ref: listRef, "data-collapsed": collapsed ? '' : undefined, "data-collapsed-content": collapsed ? collapsedContent : undefined, "data-expanding": isExpanding ? '' : undefined, "data-glass-context": glassContext, "data-size": size, "data-spaced": markedGroups > 1 ? '' : undefined, "data-wide": isWide ? '' : undefined, style: withStyle({ 'anchor-name': root.anchor }, style), ...props, ...handlers, className: cn('uikit-tab-bar-list', className), "data-base-ui-swipe-ignore": "", "data-tab-bar-part": "list", onClickCapture: (event) => {
1018
1037
  onClickCapture?.(event);
1019
1038
  if (!event.isTrusted || !pressClickedRef.current)
1020
1039
  return;
@@ -1112,8 +1131,8 @@ const Tab = forwardRef((tabProps, ref) => {
1112
1131
  const Icon = forwardRef(({ className, ...props }, ref) => (_jsx("span", { ref: ref, "data-tab-bar-part": "icon", ...props, className: cn('uikit-tab-bar-icon', className) })));
1113
1132
  const Label = forwardRef(({ className, children, ...props }, ref) => (_jsxs("span", { ref: ref, "data-tab-bar-part": "label", ...props, className: cn('uikit-tab-bar-label', className), children: [_jsx("span", { className: "uikit-tab-bar-label-text", "data-tab-bar-part": "label-text", children: children }), _jsx("span", { "aria-hidden": "true", className: "uikit-tab-bar-label-reserve", "data-tab-bar-part": "label-reserve", children: children })] })));
1114
1133
  /**
1115
- * A glass capsule of arbitrary content attached to the bar (UIKit
1116
- * `bottomAccessory`, e.g. a mini player), to be rendered inside
1134
+ * A glass capsule of arbitrary content attached to the bar (e.g. a mini
1135
+ * player), to be rendered inside
1117
1136
  * `TabBar.Root`, after `TabBar.List`: above its groups, or, while the bar is
1118
1137
  * collapsed, between them. Positioned at the list, it doesn't take up space
1119
1138
  * in the layout.