@mrpelz/uikit-ish 7.10.0 → 7.12.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 (177) hide show
  1. package/dist/components/action-sheet/main.d.ts.map +1 -1
  2. package/dist/components/action-sheet/main.js +2 -1
  3. package/dist/components/action-sheet/main.js.map +1 -1
  4. package/dist/components/action-sheet/style.css +6 -0
  5. package/dist/components/activity-view/main.d.ts.map +1 -1
  6. package/dist/components/activity-view/main.js +5 -0
  7. package/dist/components/activity-view/main.js.map +1 -1
  8. package/dist/components/activity-view/style.css +8 -0
  9. package/dist/components/alert/main.d.ts.map +1 -1
  10. package/dist/components/alert/main.js +2 -1
  11. package/dist/components/alert/main.js.map +1 -1
  12. package/dist/components/color-picker/color.d.ts +23 -0
  13. package/dist/components/color-picker/color.d.ts.map +1 -0
  14. package/dist/components/color-picker/color.js +150 -0
  15. package/dist/components/color-picker/color.js.map +1 -0
  16. package/dist/components/color-picker/main.d.ts +16 -6
  17. package/dist/components/color-picker/main.d.ts.map +1 -1
  18. package/dist/components/color-picker/main.js +472 -99
  19. package/dist/components/color-picker/main.js.map +1 -1
  20. package/dist/components/color-picker/named-colors.d.ts +3 -0
  21. package/dist/components/color-picker/named-colors.d.ts.map +1 -0
  22. package/dist/components/color-picker/named-colors.js +152 -0
  23. package/dist/components/color-picker/named-colors.js.map +1 -0
  24. package/dist/components/color-picker/props.d.ts +60 -12
  25. package/dist/components/color-picker/props.d.ts.map +1 -1
  26. package/dist/components/color-picker/style.css +211 -28
  27. package/dist/components/contextual-menu/main.d.ts +2 -2
  28. package/dist/components/contextual-menu/main.d.ts.map +1 -1
  29. package/dist/components/contextual-menu/main.js +19 -7
  30. package/dist/components/contextual-menu/main.js.map +1 -1
  31. package/dist/components/contextual-menu/props.d.ts +10 -1
  32. package/dist/components/contextual-menu/props.d.ts.map +1 -1
  33. package/dist/components/drawer/main.d.ts.map +1 -1
  34. package/dist/components/drawer/main.js +2 -1
  35. package/dist/components/drawer/main.js.map +1 -1
  36. package/dist/components/edit-menu/main.d.ts.map +1 -1
  37. package/dist/components/edit-menu/main.js +10 -8
  38. package/dist/components/edit-menu/main.js.map +1 -1
  39. package/dist/components/edit-menu/style.css +24 -2
  40. package/dist/components/glass/style.css +20 -1
  41. package/dist/components/index.d.ts +7 -5
  42. package/dist/components/index.d.ts.map +1 -1
  43. package/dist/components/index.js +3 -1
  44. package/dist/components/index.js.map +1 -1
  45. package/dist/components/island/main.d.ts +27 -0
  46. package/dist/components/island/main.d.ts.map +1 -0
  47. package/dist/components/island/main.js +409 -0
  48. package/dist/components/island/main.js.map +1 -0
  49. package/dist/components/island/props.d.ts +54 -0
  50. package/dist/components/island/props.d.ts.map +1 -0
  51. package/dist/components/island/props.js +2 -0
  52. package/dist/components/island/props.js.map +1 -0
  53. package/dist/components/island/style.css +404 -0
  54. package/dist/components/layout/props.d.ts +4 -3
  55. package/dist/components/layout/props.d.ts.map +1 -1
  56. package/dist/components/layout/style.css +37 -0
  57. package/dist/components/list/main.d.ts.map +1 -1
  58. package/dist/components/list/main.js +89 -17
  59. package/dist/components/list/main.js.map +1 -1
  60. package/dist/components/list/props.d.ts +4 -1
  61. package/dist/components/list/props.d.ts.map +1 -1
  62. package/dist/components/list/reorder.d.ts.map +1 -1
  63. package/dist/components/list/reorder.js +24 -0
  64. package/dist/components/list/reorder.js.map +1 -1
  65. package/dist/components/list/style.css +22 -3
  66. package/dist/components/menu/main.d.ts +13 -2
  67. package/dist/components/menu/main.d.ts.map +1 -1
  68. package/dist/components/menu/main.js +239 -9
  69. package/dist/components/menu/main.js.map +1 -1
  70. package/dist/components/menu/style.css +21 -6
  71. package/dist/components/navigation/main.d.ts +4 -2
  72. package/dist/components/navigation/main.d.ts.map +1 -1
  73. package/dist/components/navigation/main.js +115 -11
  74. package/dist/components/navigation/main.js.map +1 -1
  75. package/dist/components/navigation/props.d.ts +12 -1
  76. package/dist/components/navigation/props.d.ts.map +1 -1
  77. package/dist/components/navigation/style.css +25 -0
  78. package/dist/components/page/main.d.ts.map +1 -1
  79. package/dist/components/page/main.js +10 -5
  80. package/dist/components/page/main.js.map +1 -1
  81. package/dist/components/page/props.d.ts +8 -0
  82. package/dist/components/page/props.d.ts.map +1 -1
  83. package/dist/components/page/style.css +17 -0
  84. package/dist/components/popover/main.d.ts +5 -5
  85. package/dist/components/popover/main.d.ts.map +1 -1
  86. package/dist/components/popover/main.js +85 -27
  87. package/dist/components/popover/main.js.map +1 -1
  88. package/dist/components/popover/props.d.ts +26 -0
  89. package/dist/components/popover/props.d.ts.map +1 -1
  90. package/dist/components/popover/style.css +67 -3
  91. package/dist/components/progress/main.d.ts.map +1 -1
  92. package/dist/components/progress/main.js +47 -6
  93. package/dist/components/progress/main.js.map +1 -1
  94. package/dist/components/progress/style.css +4 -7
  95. package/dist/components/roll/main.d.ts.map +1 -1
  96. package/dist/components/roll/main.js +1 -1
  97. package/dist/components/roll/main.js.map +1 -1
  98. package/dist/components/roll/style.css +5 -0
  99. package/dist/components/segmented/main.d.ts.map +1 -1
  100. package/dist/components/segmented/main.js +149 -14
  101. package/dist/components/segmented/main.js.map +1 -1
  102. package/dist/components/segmented/props.d.ts +7 -0
  103. package/dist/components/segmented/props.d.ts.map +1 -1
  104. package/dist/components/segmented/style.css +135 -6
  105. package/dist/components/settings/main.d.ts +21 -0
  106. package/dist/components/settings/main.d.ts.map +1 -0
  107. package/dist/components/settings/main.js +182 -0
  108. package/dist/components/settings/main.js.map +1 -0
  109. package/dist/components/settings/props.d.ts +44 -0
  110. package/dist/components/settings/props.d.ts.map +1 -0
  111. package/dist/components/settings/props.js +2 -0
  112. package/dist/components/settings/props.js.map +1 -0
  113. package/dist/components/settings/style.css +8 -0
  114. package/dist/components/sheet/main.d.ts +11 -5
  115. package/dist/components/sheet/main.d.ts.map +1 -1
  116. package/dist/components/sheet/main.js +378 -20
  117. package/dist/components/sheet/main.js.map +1 -1
  118. package/dist/components/sheet/props.d.ts +56 -2
  119. package/dist/components/sheet/props.d.ts.map +1 -1
  120. package/dist/components/sheet/snap.d.ts +21 -0
  121. package/dist/components/sheet/snap.d.ts.map +1 -0
  122. package/dist/components/sheet/snap.js +363 -0
  123. package/dist/components/sheet/snap.js.map +1 -0
  124. package/dist/components/sheet/style.css +491 -33
  125. package/dist/components/sidebar/main.d.ts.map +1 -1
  126. package/dist/components/sidebar/main.js +6 -4
  127. package/dist/components/sidebar/main.js.map +1 -1
  128. package/dist/components/sidebar/style.css +17 -35
  129. package/dist/components/switch/style.css +2 -2
  130. package/dist/components/tab-bar/main.d.ts.map +1 -1
  131. package/dist/components/tab-bar/main.js +15 -8
  132. package/dist/components/tab-bar/main.js.map +1 -1
  133. package/dist/components/tab-bar/props.d.ts +2 -1
  134. package/dist/components/tab-bar/props.d.ts.map +1 -1
  135. package/dist/components/text-field/main.d.ts +2 -2
  136. package/dist/components/text-field/main.d.ts.map +1 -1
  137. package/dist/components/text-field/main.js +30 -10
  138. package/dist/components/text-field/main.js.map +1 -1
  139. package/dist/components/text-field/props.d.ts +5 -5
  140. package/dist/components/text-field/props.d.ts.map +1 -1
  141. package/dist/components/text-field/style.css +49 -20
  142. package/dist/components/tooltip/main.d.ts +1 -1
  143. package/dist/components/tooltip/main.d.ts.map +1 -1
  144. package/dist/components/tooltip/main.js +123 -8
  145. package/dist/components/tooltip/main.js.map +1 -1
  146. package/dist/components/utils/main.d.ts +12 -5
  147. package/dist/components/utils/main.d.ts.map +1 -1
  148. package/dist/components/utils/main.js +13 -4
  149. package/dist/components/utils/main.js.map +1 -1
  150. package/dist/components/viewport/edge-effect.d.ts.map +1 -1
  151. package/dist/components/viewport/edge-effect.js +128 -2
  152. package/dist/components/viewport/edge-effect.js.map +1 -1
  153. package/dist/components/viewport/edge.d.ts +1 -1
  154. package/dist/components/viewport/edge.d.ts.map +1 -1
  155. package/dist/components/viewport/edge.js +3 -3
  156. package/dist/components/viewport/edge.js.map +1 -1
  157. package/dist/components/viewport/input.d.ts +3 -1
  158. package/dist/components/viewport/input.d.ts.map +1 -1
  159. package/dist/components/viewport/input.js +57 -9
  160. package/dist/components/viewport/input.js.map +1 -1
  161. package/dist/components/viewport/ios27.d.ts +14 -0
  162. package/dist/components/viewport/ios27.d.ts.map +1 -0
  163. package/dist/components/viewport/ios27.js +28 -0
  164. package/dist/components/viewport/ios27.js.map +1 -0
  165. package/dist/components/viewport/main.d.ts +4 -2
  166. package/dist/components/viewport/main.d.ts.map +1 -1
  167. package/dist/components/viewport/main.js +206 -36
  168. package/dist/components/viewport/main.js.map +1 -1
  169. package/dist/components/viewport/padding.d.ts +12 -0
  170. package/dist/components/viewport/padding.d.ts.map +1 -1
  171. package/dist/components/viewport/padding.js +75 -15
  172. package/dist/components/viewport/padding.js.map +1 -1
  173. package/dist/components/viewport/props.d.ts +12 -1
  174. package/dist/components/viewport/props.d.ts.map +1 -1
  175. package/dist/components/viewport/style.css +63 -7
  176. package/dist/styles.css +56 -0
  177. package/package.json +7 -4
@@ -81,7 +81,8 @@
81
81
  /* A critically damped spring; swiped,
82
82
  following the finger (a transform: Base UI's own while it's swiped,
83
83
  overriding this one). */
84
- transform: translateY(
84
+ transform: translate(
85
+ var(--drawer-swipe-movement-x, 0),
85
86
  calc(
86
87
  var(--drawer-snap-point-offset, 0px) +
87
88
  var(--drawer-swipe-movement-y, 0px)
@@ -94,6 +95,22 @@
94
95
  transform: translateY(100%);
95
96
  }
96
97
 
98
+ /* Swiped away another way (`swipeDirection`): on from the flick, out
99
+ through that edge (a screen's length past it, wherever it is). */
100
+ &[data-ending-style][data-swipe-dismiss] {
101
+ &[data-swipe-direction='up'] {
102
+ transform: translateY(-100lvh);
103
+ }
104
+
105
+ &[data-swipe-direction='left'] {
106
+ transform: translateX(-100lvw);
107
+ }
108
+
109
+ &[data-swipe-direction='right'] {
110
+ transform: translateX(100lvw);
111
+ }
112
+ }
113
+
97
114
  /* Let go (swiped): as fast as it was flung. */
98
115
  &[data-ending-style] {
99
116
  transition-duration: calc(var(--drawer-swipe-strength, 1) * 500ms);
@@ -115,13 +132,14 @@
115
132
  /* The screen's bottom inset, for its content (see below). */
116
133
  --uikit-sheet-inset-bottom: var(--uikit-safe-area-inset-bottom, 0px);
117
134
 
118
- /* Medium (6px from the bottom edge, over the home indicator):
119
- what's left of it; a form sheet: none. */
135
+ /* Floating (medium, a card): 8px from the screen's edges, the bottom
136
+ too, the home indicator over its bottom margin (as iOS 26's, its
137
+ content not kept clear of it further). */
138
+ --uikit-sheet-gap: 8px;
139
+
140
+ /* Medium (floating, see below): none left; a form sheet: none. */
120
141
  &[data-detent='medium'] > * {
121
- --uikit-safe-area-inset-bottom: max(
122
- 0px,
123
- var(--uikit-sheet-inset-bottom) - 6px
124
- );
142
+ --uikit-safe-area-inset-bottom: 0px;
125
143
  }
126
144
 
127
145
  &:not([data-compact]) > * {
@@ -133,9 +151,19 @@
133
151
  --uikit-safe-area-inset-bottom: 0px;
134
152
  }
135
153
 
154
+ /* (Its background, for its header's edge effect: see Viewport.) */
155
+ --uikit-viewport-edge-background: var(--color-ui-system-background);
156
+
157
+ /* A heavier veil than a page's (a secondary scroller): its content
158
+ hidden under more of its bars, the header's (see the content) and
159
+ those in it (e.g. a navigation's). */
160
+ --uikit-viewport-edge-veil: 0.75;
161
+
136
162
  &[data-detent='large'] {
163
+ --uikit-sheet-background: var(--color-ui-system-background);
164
+
137
165
  border-radius: 38px 38px 0 0;
138
- background-color: var(--color-ui-system-background);
166
+ background-color: var(--uikit-sheet-background);
139
167
  box-shadow: 0 15px 75px rgb(0 0 0 / 18%);
140
168
  inset: calc(10px + var(--uikit-safe-area-inset-top, 0px)) 0 0;
141
169
  }
@@ -144,17 +172,116 @@
144
172
  without its own (which would end with it, the sheet's around it). */
145
173
  &[data-detent='large'][data-background='grouped'] {
146
174
  --uikit-list-container-background: transparent;
175
+ --uikit-viewport-edge-background: var(
176
+ --color-ui-system-grouped-background
177
+ );
178
+ --uikit-sheet-background: var(--color-ui-system-grouped-background);
147
179
 
148
- background-color: var(--color-ui-system-grouped-background);
180
+ background-color: var(--uikit-sheet-background);
149
181
  }
150
182
 
183
+ /* 8px from the screen's sides and bottom (the home indicator over its
184
+ bottom margin, see above), its corners 42px (as iOS 26's medium
185
+ sheets, measured). */
151
186
  &[data-detent='medium'] {
152
- right: 6px;
153
- bottom: 6px;
154
- left: 6px;
155
- max-height: calc(100% - 64px);
156
- border-radius: 34px;
187
+ right: var(--uikit-sheet-gap);
188
+ bottom: var(--uikit-sheet-gap);
189
+ left: var(--uikit-sheet-gap);
190
+
191
+ /* Up to the screen but 64px, nor into the top inset (below it as a
192
+ large one, at most). */
193
+ max-height: min(
194
+ 100% - 64px,
195
+ 100% - var(--uikit-sheet-gap) - var(--uikit-safe-area-inset-top, 0px) -
196
+ 10px
197
+ );
198
+
199
+ /* Its corners (snapping, following what's shown: see below). */
200
+ --uikit-sheet-radius-max: 42px;
201
+ --uikit-sheet-radius: var(--uikit-sheet-radius-max);
202
+
203
+ border-radius: var(--uikit-sheet-radius);
157
204
  color: var(--uikit-glass-content);
205
+
206
+ /* (None: its glass translucent, painted over itself again it'd
207
+ lighten; its content fading out under its header instead, see the
208
+ content.) */
209
+ --uikit-viewport-edge-background: transparent;
210
+
211
+ /* Nor a blur (its backdrop the glass's tint, blurred over it: the
212
+ tint twice). */
213
+ & .uikit-sheet-panel > .uikit-viewport-edge-effect[data-edge-effect='soft']::before {
214
+ backdrop-filter: none;
215
+ }
216
+ }
217
+
218
+ /* Snapping by its groups (see snap.ts): a scroller (its bars hidden)
219
+ snapping to its stops' markers, from the bottom: a medium one's up to
220
+ the screen but 64px (as high as it may be), its look its panel's
221
+ (scrolled up out of its spacer), not its own. */
222
+ &&[data-snap] {
223
+ display: block;
224
+ overflow: hidden auto;
225
+ max-height: none;
226
+ background-color: transparent;
227
+ box-shadow: none;
228
+
229
+ /* Never bounced itself (past its top stop, its panel lifted off its
230
+ edge; past its start, nothing to show): its content bounces
231
+ instead (pulled down a stop, see snap.ts). */
232
+ overscroll-behavior: none;
233
+ scroll-snap-type: y mandatory;
234
+ scrollbar-width: none;
235
+
236
+ &::-webkit-scrollbar {
237
+ display: none;
238
+ }
239
+ }
240
+
241
+ &&[data-snap][data-detent='medium'] {
242
+ top: max(
243
+ 64px - var(--uikit-sheet-gap),
244
+ var(--uikit-safe-area-inset-top, 0px) + 10px
245
+ );
246
+ }
247
+
248
+ /* A card (regular, `regular` `card`, see main.tsx): from the bottom at
249
+ the leading edge, as a regular Island (375px wide, 10px in; 8px from
250
+ the bottom, floating, see above), up to 64px below the top (10px
251
+ below the top inset, at least), all its corners round; its detent's
252
+ look (medium: as high as its content; large: as high as it may be).
253
+ Floating: none of the bottom inset left for its content. */
254
+ &&[data-card] {
255
+ --uikit-sheet-card-top: max(
256
+ 64px,
257
+ var(--uikit-safe-area-inset-top, 0px) + 10px
258
+ );
259
+
260
+ width: min(375px, 100% - 20px);
261
+ inset-inline: 10px auto;
262
+
263
+ & > * {
264
+ --uikit-safe-area-inset-bottom: 0px;
265
+ }
266
+
267
+ &[data-detent='medium'] {
268
+ max-height: calc(
269
+ 100% - var(--uikit-sheet-gap) - var(--uikit-sheet-card-top)
270
+ );
271
+ }
272
+
273
+ /* (Snapping, its corners following what's shown: see below.) */
274
+ &[data-detent='large'] {
275
+ --uikit-sheet-radius-max: 38px;
276
+ --uikit-sheet-radius: var(--uikit-sheet-radius-max);
277
+
278
+ border-radius: var(--uikit-sheet-radius);
279
+ inset-block: var(--uikit-sheet-card-top) var(--uikit-sheet-gap);
280
+ }
281
+
282
+ &[data-snap] {
283
+ top: var(--uikit-sheet-card-top);
284
+ }
158
285
  }
159
286
 
160
287
  /* A form sheet (not compact: a regular width, see main.tsx). */
@@ -168,8 +295,13 @@
168
295
  inset: 50% auto auto 50%;
169
296
  translate: -50% -50%;
170
297
 
298
+ --uikit-viewport-edge-background: var(--color-ui-system-background);
299
+
171
300
  &[data-background='grouped'] {
172
301
  --uikit-list-container-background: transparent;
302
+ --uikit-viewport-edge-background: var(
303
+ --color-ui-system-grouped-background
304
+ );
173
305
 
174
306
  background-color: var(--color-ui-system-grouped-background);
175
307
  }
@@ -181,33 +313,44 @@
181
313
  }
182
314
  }
183
315
 
316
+ /* Over the content, which scrolls under it (a bar of the sheet's, its
317
+ edge effect the content's, beneath it: see main.tsx), its content
318
+ making room for it (its `Viewport.Padding`). Composited itself: the
319
+ content scrolls (iOS composites it), and Safari otherwise relies on its
320
+ overlap testing to draw the header after it, which misses it far down a
321
+ scrolled document (e.g. an inline demo), leaving it hidden (until
322
+ something recomposites, e.g. a button's press). Its spacing in its
323
+ content box (as its size, measured: see `Viewport.Anchor`). */
184
324
  .uikit-sheet-header {
325
+ position: absolute;
326
+ z-index: 10;
185
327
  display: flex;
186
- flex: none;
187
328
  flex-direction: column;
188
329
  align-items: stretch;
189
- padding-block-end: 10px;
330
+ inset: 0 0 auto;
190
331
  -webkit-user-select: none;
191
332
  user-select: none;
333
+ will-change: transform;
334
+
335
+ /* 10px below its content. */
336
+ &::after {
337
+ height: 10px;
338
+ flex: none;
339
+ content: '';
340
+ }
192
341
 
193
342
  /* Without a grabber: its content where it'd be with one (16px down). */
194
- &:not(:has(> .uikit-sheet-grabber)) {
195
- padding-block-start: 16px;
196
- }
197
-
198
- /* Only a grabber: over the content (its own bars below it). Composited
199
- itself: the content scrolls (iOS composites it), and Safari otherwise
200
- relies on its overlap testing to draw the header after it, which
201
- misses it far down a scrolled document (e.g. an inline demo), leaving
202
- the grabber hidden (until something recomposites, e.g. a button's
203
- press). */
204
- &:has(> .uikit-sheet-grabber:only-child) {
205
- position: absolute;
206
- z-index: 1;
207
- inset: 0 0 auto;
208
- padding-block-end: 0;
209
- will-change: transform;
343
+ &:not(:has(> .uikit-sheet-grabber))::before {
344
+ height: 16px;
345
+ flex: none;
346
+ content: '';
347
+ }
348
+
349
+ /* Only a grabber: no bar (the content's own bars below it). */
350
+ &:has(> .uikit-sheet-grabber:only-child)::after {
351
+ display: none;
210
352
  }
353
+
211
354
  }
212
355
 
213
356
  /* The grabber, its cursor's area around it (12px wide, 5px and 6px
@@ -238,22 +381,329 @@
238
381
  }
239
382
  }
240
383
 
384
+ /* Its panel (see Popup): no box of its own, its children the popup's;
385
+ snapping (see snap.ts), the sheet's look and box, as high as the popup
386
+ (scrolled up into it), its corners the sheet's (a capsule's at its top,
387
+ its bottom ones the popup's clip), its content's edge effects fixed to
388
+ it. */
389
+ .uikit-sheet-panel {
390
+ display: contents;
391
+ border-radius: inherit;
392
+
393
+ .uikit-sheet-popup[data-snap] > & {
394
+ position: relative;
395
+ display: flex;
396
+ height: 100%;
397
+ box-sizing: border-box;
398
+ flex-direction: column;
399
+ contain: layout;
400
+ scroll-snap-align: none;
401
+ }
402
+
403
+ /* A capsule's glass (by class), its content in the glass's color; its
404
+ rim its top and sides alone (below), its bottom and corners stuck to
405
+ the popup's bottom (its own, below or on it, would show a second
406
+ pair of corners through its clip). */
407
+ .uikit-sheet-popup[data-snap='capsule'] > & {
408
+ /* (Held up as it's swiped out, see the capsule below.) */
409
+ animation: uikit-sheet-capsule-hold linear both;
410
+ animation-range: 0 var(--uikit-sheet-lowest-stop, 0);
411
+ animation-timeline: scroll(nearest block);
412
+ box-shadow: none;
413
+ color: var(--uikit-glass-content);
414
+ }
415
+
416
+ /* (A large one's opaque background.) */
417
+ .uikit-sheet-popup[data-snap='sheet'] > & {
418
+ background-color: var(--uikit-sheet-background);
419
+ box-shadow: 0 15px 75px rgb(0 0 0 / 18%);
420
+ }
421
+ }
422
+
423
+ /* The room it's scrolled up out of (snapping), else none. */
424
+ .uikit-sheet-spacer {
425
+ display: none;
426
+
427
+ /* Its stops in one cell, each down by its own (within it: `cqh`); in
428
+ whole pixels, its scroll's range too (its end, its top stop's, not
429
+ rounded past by Safari). */
430
+ .uikit-sheet-popup[data-snap] > & {
431
+ display: grid;
432
+ height: round(down, 100%, 1px);
433
+ container-type: size;
434
+ }
435
+ }
436
+
437
+ /* Its stops (snapping): where it snaps, scrolled by as much (by their
438
+ start; 1px high: iOS snaps to no area without a height). */
439
+ .uikit-sheet-stop {
440
+ height: 1px;
441
+ align-self: start;
442
+ grid-area: 1 / 1;
443
+ pointer-events: none;
444
+ scroll-snap-align: start;
445
+
446
+ /* Flung, one at a time (not past it). */
447
+ scroll-snap-stop: always;
448
+ }
449
+
450
+ /* Its content's edge effects (see Sheet.Content: beside it, the panel's
451
+ children), within its corners: rounded as the popup's at their edge,
452
+ as browsers don't all clip a backdrop filter to its rounded overflow
453
+ (WebKit). */
454
+ .uikit-sheet-panel > .uikit-viewport-edge-effect {
455
+ &[data-edge='block-start'] {
456
+ border-start-end-radius: inherit;
457
+ border-start-start-radius: inherit;
458
+ }
459
+
460
+ &[data-edge='block-end'] {
461
+ border-end-end-radius: inherit;
462
+ border-end-start-radius: inherit;
463
+ }
464
+
465
+ &::before,
466
+ &::after {
467
+ border-radius: inherit;
468
+ }
469
+
470
+ }
471
+
472
+ /* A capsule's rim (snapping, see its panel): its top and sides on its
473
+ panel, its bottom and corners stuck to the popup's bottom. */
474
+ .uikit-sheet-popup[data-snap='capsule'] > .uikit-sheet-panel::before {
475
+ position: absolute;
476
+ z-index: -1;
477
+ box-sizing: border-box;
478
+ border: 1px solid var(--glass-ui-panel-rim);
479
+ border-radius: inherit;
480
+ border-bottom: 0;
481
+ border-end-end-radius: 0;
482
+ border-end-start-radius: 0;
483
+ content: '';
484
+ inset: 0;
485
+ pointer-events: none;
486
+ }
487
+
488
+ /* Its rim's bottom and corners: stuck to the popup's bottom (above
489
+ the panel's, below it), within the panel (not past its top, as
490
+ it's dismissed); over its content, in its flow, taking no room. */
491
+ .uikit-sheet-popup[data-snap='capsule'] > .uikit-sheet-panel::after {
492
+ position: sticky;
493
+ z-index: 1;
494
+ bottom: 0;
495
+ display: block;
496
+ height: var(--uikit-sheet-radius);
497
+ box-sizing: border-box;
498
+ flex: none;
499
+ border: 1px solid var(--glass-ui-panel-rim);
500
+ border-radius: 0 0 var(--uikit-sheet-radius) var(--uikit-sheet-radius);
501
+ border-top: 0;
502
+ margin-top: calc(-1 * var(--uikit-sheet-radius));
503
+
504
+ /* Kept at the popup's bottom as the panel's held up (swiped out,
505
+ below its lowest stop: see the capsule). */
506
+ animation: uikit-sheet-capsule-rim linear both;
507
+ animation-range: 0 var(--uikit-sheet-lowest-stop, 0);
508
+ animation-timeline: scroll(nearest block);
509
+ content: '';
510
+
511
+ /* Its sides' start faded in by as much as the popup's clip cuts
512
+ off the panel's straight rim there (42px − √(42² − d²) at d px
513
+ down its arc), the two never drawn over each other. */
514
+ mask-image: linear-gradient(
515
+ transparent,
516
+ rgb(0 0 0 / 5%) 2px,
517
+ rgb(0 0 0 / 19%) 4px,
518
+ rgb(0 0 0 / 43%) 6px,
519
+ rgb(0 0 0 / 77%) 8px,
520
+ rgb(0 0 0 / 98%) 9px,
521
+ #000 9.1px
522
+ );
523
+ pointer-events: none;
524
+ }
525
+
526
+ /* A capsule swiped below its lowest stop (`--uikit-sheet-lowest-stop`,
527
+ see main.tsx): moved out whole, its corners and rim with it, past the
528
+ screen's bottom (not collapsing into its bottom: the popup's clip), as
529
+ a sheet without stops is swiped away. The popup moved down by as much
530
+ as it's scrolled below its lowest stop (and its gap to the screen's
531
+ edge), its panel held up by as much in it (the finger's 1:1, at its
532
+ lowest stop's height in it); collapsing is only from stop to stop. */
533
+
534
+ /* Its corners (snapping, a capsule or a card: corners at its bottom
535
+ too), following what's shown (as it's scrolled): shown shorter than
536
+ both (e.g. its header alone), a capsule, half as tall (its top
537
+ corners, its panel's, and its bottom ones, its clip and rim, meeting,
538
+ not overlapping). A capsule's shown, below its lowest stop, its
539
+ lowest's (held, swiped out: see below). */
540
+ .uikit-sheet-popup[data-snap='capsule'] {
541
+ --uikit-sheet-radius-start: var(--uikit-sheet-lowest-stop, 0px);
542
+
543
+ animation:
544
+ uikit-sheet-capsule-out linear both,
545
+ uikit-sheet-corners linear both;
546
+ animation-range:
547
+ 0 var(--uikit-sheet-lowest-stop, 0),
548
+ var(--uikit-sheet-lowest-stop, 0)
549
+ calc(2 * var(--uikit-sheet-radius-max));
550
+ animation-timeline: scroll(self block), scroll(self block);
551
+ }
552
+
553
+ .uikit-sheet-popup[data-snap='sheet'][data-card] {
554
+ --uikit-sheet-radius-start: 0px;
555
+
556
+ animation: uikit-sheet-corners linear both;
557
+ animation-range: 0 calc(2 * var(--uikit-sheet-radius-max));
558
+ animation-timeline: scroll(self block);
559
+ }
560
+
561
+ /* None as it opens or closes: Base UI waits for its animations to
562
+ finish (unmounting it closed), and a scroll-driven one at its start
563
+ (swiped out) never does, left mounted, scrolled away as it's opened
564
+ again. Swiped out, it's out of view already (the panel then below the
565
+ popup's clip). */
566
+ .uikit-sheet-popup[data-snap]:is([data-starting-style], [data-ending-style]),
567
+ .uikit-sheet-popup[data-snap]:is([data-starting-style], [data-ending-style])
568
+ > .uikit-sheet-panel {
569
+ animation: none;
570
+ }
571
+
572
+ @keyframes uikit-sheet-corners {
573
+ from {
574
+ --uikit-sheet-radius: min(
575
+ var(--uikit-sheet-radius-max),
576
+ var(--uikit-sheet-radius-start) / 2
577
+ );
578
+ }
579
+
580
+ to {
581
+ --uikit-sheet-radius: var(--uikit-sheet-radius-max);
582
+ }
583
+ }
584
+
585
+ @keyframes uikit-sheet-capsule-out {
586
+ from {
587
+ translate: 0
588
+ calc(
589
+ var(--uikit-sheet-lowest-stop, 0px) + var(--uikit-sheet-gap)
590
+ );
591
+ }
592
+
593
+ to {
594
+ translate: 0 0;
595
+ }
596
+ }
597
+
598
+ @keyframes uikit-sheet-capsule-hold {
599
+ from {
600
+ translate: 0 calc(var(--uikit-sheet-lowest-stop, 0px) * -1);
601
+ }
602
+
603
+ to {
604
+ translate: 0 0;
605
+ }
606
+ }
607
+
608
+ @keyframes uikit-sheet-capsule-rim {
609
+ from {
610
+ translate: 0 var(--uikit-sheet-lowest-stop, 0);
611
+ }
612
+
613
+ to {
614
+ translate: 0 0;
615
+ }
616
+ }
617
+
618
+ /* Its snap groups (see SnapGroup) spaced as list sections are: the gap
619
+ the next one's (its start), so a stop ends with its group's content;
620
+ after an empty one (its header alone), none. */
621
+ .uikit-sheet-snap-group:not(:empty) + .uikit-sheet-snap-group {
622
+ padding-block-start: var(--uikit-list-section-spacing, 35px);
623
+ }
624
+
625
+ /* Its corners' radius (following its scroll, see the property) kept
626
+ off what's in it: inherited, everything in it would be restyled on
627
+ each frame of a scroll (costly; iOS 26's WebKit keeps much of that
628
+ memory). Its readers keep it (its panel, its rim, its content's clip),
629
+ not their children. (Not `inherits: false`: iOS 26's WebKit then
630
+ doesn't follow its animation where it's read. See the guide's
631
+ iOS Quirks page.) */
632
+ /* stylelint-disable no-descending-specificity -- a custom property only
633
+ the readers' children have (no rule above sets it) */
634
+ .uikit-sheet-panel > :not(.uikit-sheet-content, :has(.uikit-sheet-content)),
635
+ :where(.uikit-sheet-content) > * {
636
+ --uikit-sheet-radius: initial;
637
+ }
638
+ /* stylelint-enable no-descending-specificity */
639
+
241
640
  .uikit-sheet-content {
242
641
  overflow: auto;
243
642
  min-height: 0;
244
643
  flex: 1 1 auto;
245
644
  overscroll-behavior: contain;
246
645
 
646
+ /* Clipped round itself, as its sheet's corners (WebKit draws a
647
+ composited scroller past its parent's rounded clip): a medium one's
648
+ all round, a large one's at its top, a form sheet's all round. */
649
+ :where(.uikit-sheet-popup[data-compact][data-detent='medium']) & {
650
+ clip-path: inset(0 round var(--uikit-sheet-radius));
651
+ }
652
+
653
+ :where(.uikit-sheet-popup[data-compact][data-detent='large']) & {
654
+ clip-path: inset(0 round 38px 38px 0 0);
655
+ }
656
+
657
+ :where(.uikit-sheet-popup[data-card][data-detent='large']) & {
658
+ clip-path: inset(0 round var(--uikit-sheet-radius));
659
+ }
660
+
661
+ :where(.uikit-sheet-popup:not([data-compact])) & {
662
+ clip-path: inset(0 round 38px);
663
+ }
664
+
665
+ /* Snapping (see the popup): at its start, handing a pull down back to
666
+ the popup; below its top stop, not scrolling. */
667
+ :where(.uikit-sheet-popup[data-snap] > .uikit-sheet-panel) > & {
668
+ overscroll-behavior: auto;
669
+ }
670
+
671
+ /* (Pulled down a stop: until it's bounced back, see snap.ts.) */
672
+ :where(.uikit-sheet-popup[data-snap]:not([data-snap-top]) > .uikit-sheet-panel)
673
+ > &:not([data-pulled]) {
674
+ overflow: hidden;
675
+ }
676
+
247
677
  /* Its end clear of the home indicator (its background to the edge;
248
678
  none left for what's in it, see the popup); the gap to its content
249
679
  is its `Viewport.Padding`'s (a list's ends are its container's, see
250
680
  List). */
251
681
  padding-block-end: var(--uikit-safe-area-inset-bottom, 0);
252
682
 
683
+ /* Under its header (a bar, not only a grabber), fading out: hidden
684
+ under the share of it the veil is (`--uikit-viewport-edge-veil`),
685
+ showing past it and its soft effect's reach (16px), whatever the
686
+ sheet's background (its glass too, not lightened by a veil's). As
687
+ its edge effect, only as content scrolls under it (its progress,
688
+ `--uikit-viewport-edge-start-progress`): at the top, all shown. */
689
+ .uikit-sheet-panel:has(
690
+ > .uikit-sheet-header > :not(.uikit-sheet-grabber)
691
+ )
692
+ > & {
693
+ mask-image: linear-gradient(
694
+ rgb(0 0 0 / calc(1 - var(--uikit-viewport-edge-start-progress, 1)))
695
+ calc(
696
+ var(--uikit-viewport-padding-block-start, 0px) *
697
+ var(--uikit-viewport-edge-veil, 0.75)
698
+ ),
699
+ #000 calc(var(--uikit-viewport-padding-block-start, 0px) + 16px)
700
+ );
701
+ }
702
+
253
703
  /* Its header only a grabber (its content's own bars, e.g. a
254
704
  navigation's): over the content, which starts at the sheet's top
255
705
  (nothing of those bars clipped), its bars below the grabber. */
256
- .uikit-sheet-popup:has(
706
+ .uikit-sheet-panel:has(
257
707
  > .uikit-sheet-header > .uikit-sheet-grabber:only-child
258
708
  )
259
709
  > & {
@@ -261,3 +711,11 @@
261
711
  }
262
712
  }
263
713
  }
714
+
715
+ /* A floating sheet's corners' radius (see the popup): a length, so it's
716
+ animated (following its scroll). */
717
+ @property --uikit-sheet-radius {
718
+ inherits: true;
719
+ initial-value: 42px;
720
+ syntax: '<length>';
721
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar/main.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AAWrB,YAAY,EACV,gBAAgB,EAChB,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AA4DpB,eAAO,MAAM,OAAO;;;;;;;;;;CAInB,CAAC"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar/main.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AAWrB,YAAY,EACV,gBAAgB,EAChB,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AAiEpB,eAAO,MAAM,OAAO;;;;;;;;;;CAInB,CAAC"}
@@ -7,7 +7,7 @@ import { cn } from '../utils/main.js';
7
7
  // its top, 16px from its sides, 10px from its bottom; its content e.g. a
8
8
  // toolbar (borderless buttons, Body, symbols 510, the
9
9
  // trailing ones 24px apart; 20px above what follows), a search field
10
- // (`TextField.Search`: 44px high, on the secondary fill) and a list
10
+ // (`TextField.Frame`: 44px high, on the secondary fill) and a list
11
11
  // (`List.Root` of style `sidebar`: capsule rows, sections without a shape of
12
12
  // their own), scrolling inside it. Put it in a `Layout` column (`floating`:
13
13
  // over the other columns; compact: a drawer, swiped in), which places and sizes
@@ -15,14 +15,16 @@ import { cn } from '../utils/main.js';
15
15
  //
16
16
  // Also:
17
17
  // - The glass is the menus' (`glassMedium`: a fill and a soft glow, without
18
- // blend modes), 8px from the column's edges; in dark mode, a light rim and a glow outside it (the
18
+ // blend modes), 10px from the column's sides, 8px below the top inset,
19
+ // 5px into the bottom one (10px from the edge at least; iPadOS 26's,
20
+ // measured); in dark mode, a light rim and a glow outside it (the
19
21
  // glass' inner shadow would look inset).
20
22
  /**
21
23
  * A sidebar: a floating glass panel, its
22
- * content (e.g. a `TextField.Search`, a `List.Root` of style `sidebar`)
24
+ * content (e.g. a `TextField.Frame`, a `List.Root` of style `sidebar`)
23
25
  * scrolling inside it; in a `Layout` column (see there).
24
26
  */
25
- const Root = forwardRef(({ className, ...props }, ref) => (_jsx("nav", { ref: ref, "data-sidebar-part": "root", ...props, className: cn('uikit-sidebar-root uikit-glass-medium', className) })));
27
+ const Root = forwardRef(({ className, ...props }, ref) => (_jsx("nav", { ref: ref, "data-sidebar-part": "root", ...props, className: cn('uikit-sidebar-root uikit-glass-medium uikit-glass-panel', className) })));
26
28
  // Its toolbar: its parts at its ends, their content at the sidebar's (16px
27
29
  // in); 54px from the panel's top to what follows. Its buttons' shapes
28
30
  // (highlights) evenly 8px from the panel's top and sides, as nested shapes
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/sidebar/main.tsx"],"names":[],"mappings":";AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAatC,oEAAoE;AACpE,yEAAyE;AACzE,sDAAsD;AACtD,qEAAqE;AACrE,oEAAoE;AACpE,6EAA6E;AAC7E,4EAA4E;AAC5E,gFAAgF;AAChF,MAAM;AACN,EAAE;AACF,QAAQ;AACR,4EAA4E;AAC5E,oGAAoG;AACpG,2CAA2C;AAE3C;;;;GAIG;AACH,MAAM,IAAI,GAAG,UAAU,CACrB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,cACE,GAAG,EAAE,GAAG,uBACU,MAAM,KACpB,KAAK,EACT,SAAS,EAAE,EAAE,CAAC,uCAAuC,EAAE,SAAS,CAAC,GACjE,CACH,CACF,CAAC;AAEF,2EAA2E;AAC3E,sEAAsE;AACtE,2EAA2E;AAC3E,iDAAiD;AACjD,MAAM,OAAO,GAAG,UAAU,CACxB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,uBAAuB,EAAE,SAAS,CAAC,uBAC/B,SAAS,KACvB,KAAK,GACT,CACH,CACF,CAAC;AAEF,mDAAmD;AACnD,MAAM,YAAY,GAAG,UAAU,CAC7B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,6BAA6B,EAAE,SAAS,CAAC,uBACrC,eAAe,KAC7B,KAAK,GACT,CACH,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,IAAI;IACJ,OAAO;IACP,YAAY;CACb,CAAC"}
1
+ {"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/sidebar/main.tsx"],"names":[],"mappings":";AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAatC,oEAAoE;AACpE,yEAAyE;AACzE,sDAAsD;AACtD,qEAAqE;AACrE,mEAAmE;AACnE,6EAA6E;AAC7E,4EAA4E;AAC5E,gFAAgF;AAChF,MAAM;AACN,EAAE;AACF,QAAQ;AACR,4EAA4E;AAC5E,yEAAyE;AACzE,uEAAuE;AACvE,oEAAoE;AACpE,2CAA2C;AAE3C;;;;GAIG;AACH,MAAM,IAAI,GAAG,UAAU,CACrB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,cACE,GAAG,EAAE,GAAG,uBACU,MAAM,KACpB,KAAK,EACT,SAAS,EAAE,EAAE,CACX,yDAAyD,EACzD,SAAS,CACV,GACD,CACH,CACF,CAAC;AAEF,2EAA2E;AAC3E,sEAAsE;AACtE,2EAA2E;AAC3E,iDAAiD;AACjD,MAAM,OAAO,GAAG,UAAU,CACxB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,uBAAuB,EAAE,SAAS,CAAC,uBAC/B,SAAS,KACvB,KAAK,GACT,CACH,CACF,CAAC;AAEF,mDAAmD;AACnD,MAAM,YAAY,GAAG,UAAU,CAC7B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,6BAA6B,EAAE,SAAS,CAAC,uBACrC,eAAe,KAC7B,KAAK,GACT,CACH,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,IAAI;IACJ,OAAO;IACP,YAAY;CACb,CAAC"}