@aleph-alpha/ui-library 5.8.0 → 5.10.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.
- package/README.md +8 -7
- package/config.js +157 -4
- package/dist/system/__tests__/test-utils.d.ts +24 -0
- package/dist/system/components/UiAutocomplete/UiAutocomplete.vue.d.ts +8 -4
- package/dist/system/components/UiAutocomplete/types.d.ts +11 -0
- package/dist/system/components/UiFadeMask/UiFadeMask.vue.d.ts +21 -0
- package/dist/system/components/UiFadeMask/index.d.ts +2 -0
- package/dist/system/components/UiFadeMask/types.d.ts +33 -0
- package/dist/system/components/UiFileItem/UiFileItem.vue.d.ts +3 -1
- package/dist/system/components/UiFileType/types.d.ts +2 -1
- package/dist/system/components/UiListbox/UiListboxVirtualizer.vue.d.ts +21 -0
- package/dist/system/components/UiListbox/index.d.ts +1 -0
- package/dist/system/components/UiListbox/types.d.ts +36 -0
- package/dist/system/components/UiSelect/UiSelectVirtualizer.vue.d.ts +21 -0
- package/dist/system/components/UiSelect/index.d.ts +1 -0
- package/dist/system/components/UiSelect/types.d.ts +36 -0
- package/dist/system/components/UiSwitch/UiSwitch.vue.d.ts +1 -0
- package/dist/system/components/UiSwitch/types.d.ts +12 -0
- package/dist/system/components/core/native-select/NativeSelectOptGroup.vue.d.ts +2 -2
- package/dist/system/components/core/native-select/NativeSelectOption.vue.d.ts +2 -2
- package/dist/system/components/core/switch/Switch.vue.d.ts +2 -0
- package/dist/system/components/core/switch/index.d.ts +8 -0
- package/dist/system/components/index.d.ts +1 -0
- package/dist/system/index.d.ts +1 -0
- package/dist/system/lib/scrollbar.d.ts +37 -0
- package/dist/system/lib/useAnchorFloat.d.ts +0 -2
- package/dist/system/lib/useIsTruncated.d.ts +15 -0
- package/dist/system/lib.js +22660 -21292
- package/dist/system/mobile-device-frame.png +0 -0
- package/dist/system/patterns/UiFloatActions/types.d.ts +2 -2
- package/dist/system/patterns/UiProfileCard/index.d.ts +7 -0
- package/dist/system/patterns/UiTopBar/UiTopBar.vue.d.ts +23 -0
- package/dist/system/patterns/UiTopBar/index.d.ts +2 -0
- package/dist/system/patterns/UiTopBar/types.d.ts +28 -0
- package/dist/system/patterns/index.d.ts +2 -0
- package/dist/system/story-sidebar-icons.json +7 -1
- package/docs/public-docs/foundations.md +17 -15
- package/package.json +4 -3
- package/src/__tests__/test-utils.ts +74 -0
- package/src/components/UiAutocomplete/UiAutocomplete.stories.ts +94 -0
- package/src/components/UiAutocomplete/UiAutocomplete.vue +164 -44
- package/src/components/UiAutocomplete/__tests__/UiAutocompleteVirtualized.test.ts +107 -0
- package/src/components/UiAutocomplete/types.ts +11 -0
- package/src/components/UiCodeBlock/UiCodeBlock.stories.ts +54 -0
- package/src/components/UiCodeBlock/UiCodeBlock.vue +84 -32
- package/src/components/UiCodeBlock/__tests__/UiCodeBlock.test.ts +65 -21
- package/src/components/UiDropdownMenu/UiDropdownMenu.stories.ts +760 -0
- package/src/components/UiFadeMask/UiFadeMask.stories.ts +563 -0
- package/src/components/UiFadeMask/UiFadeMask.vue +86 -0
- package/src/components/UiFadeMask/__tests__/UiFadeMask.test.ts +52 -0
- package/src/components/UiFadeMask/index.ts +6 -0
- package/src/components/UiFadeMask/types.ts +35 -0
- package/src/components/UiFileItem/UiFileItem.vue +17 -4
- package/src/components/UiFileItem/__tests__/UiFileItem.test.ts +49 -90
- package/src/components/UiFileType/UiFileType.stories.ts +13 -2
- package/src/components/UiFileType/UiFileType.vue +8 -0
- package/src/components/UiFileType/__tests__/UiFileType.test.ts +10 -0
- package/src/components/UiFileType/types.ts +3 -1
- package/src/components/UiListbox/UiListbox.stories.ts +121 -0
- package/src/components/UiListbox/UiListboxVirtualizer.vue +42 -0
- package/src/components/UiListbox/__tests__/UiListboxVirtualizer.test.ts +96 -0
- package/src/components/UiListbox/index.ts +1 -0
- package/src/components/UiListbox/types.ts +42 -0
- package/src/components/UiSelect/UiSelect.stories.ts +109 -1
- package/src/components/UiSelect/UiSelectVirtualizer.vue +373 -0
- package/src/components/UiSelect/__tests__/UiSelectVirtualizer.test.ts +185 -0
- package/src/components/UiSelect/index.ts +1 -0
- package/src/components/UiSelect/types.ts +38 -0
- package/src/components/UiSnackbar/UiSnackbar.stories.ts +4 -5
- package/src/components/UiSwitch/UiSwitch.stories.ts +658 -7
- package/src/components/UiSwitch/UiSwitch.vue +1 -0
- package/src/components/UiSwitch/__tests__/UiSwitch.test.ts +48 -0
- package/src/components/UiSwitch/types.ts +13 -0
- package/src/components/UiToggleGroup/UiToggleGroup.vue +1 -1
- package/src/components/core/dropdown-menu/DropdownMenuCheckboxItem.vue +8 -2
- package/src/components/core/dropdown-menu/DropdownMenuItem.vue +1 -1
- package/src/components/core/dropdown-menu/DropdownMenuRadioItem.vue +8 -2
- package/src/components/core/dropdown-menu/DropdownMenuSubTrigger.vue +1 -1
- package/src/components/core/field/FieldLabel.vue +1 -1
- package/src/components/core/label/Label.vue +1 -1
- package/src/components/core/listbox/ListboxItem.vue +1 -1
- package/src/components/core/switch/Switch.vue +23 -17
- package/src/components/core/switch/index.ts +36 -0
- package/src/components/index.ts +1 -0
- package/src/index.ts +3 -0
- package/src/lib/scrollbar.ts +295 -0
- package/src/lib/useAnchorFloat.ts +0 -2
- package/src/lib/useIsTruncated.test.ts +174 -0
- package/src/lib/useIsTruncated.ts +75 -0
- package/src/patterns/UiFileUpload/UiFileItem.stories.ts +1162 -0
- package/src/patterns/UiFileUpload/UiFileUpload.stories.ts +552 -1
- package/src/patterns/UiFileUpload/__tests__/UiFileUpload.test.ts +5 -21
- package/src/patterns/UiFloatActions/UiFloatActionItems.vue +0 -1
- package/src/patterns/UiFloatActions/UiFloatActions.stories.ts +4 -6
- package/src/patterns/UiFloatActions/UiFloatActions.vue +23 -12
- package/src/patterns/UiFloatActions/__tests__/UiFloatActions.test.ts +23 -0
- package/src/patterns/UiFloatActions/types.ts +2 -2
- package/src/patterns/UiProfileCard/UiProfileCard.stories.ts +1079 -0
- package/src/patterns/UiProfileCard/index.ts +7 -0
- package/src/patterns/UiTopBar/UiTopBar.stories.ts +1121 -0
- package/src/patterns/UiTopBar/UiTopBar.vue +166 -0
- package/src/patterns/UiTopBar/__tests__/UiTopBar.test.ts +245 -0
- package/src/patterns/UiTopBar/index.ts +2 -0
- package/src/patterns/UiTopBar/types.ts +29 -0
- package/src/patterns/index.ts +2 -0
- package/src/theme/Background.stories.ts +27 -1
- package/src/theme/BorderRadius.stories.ts +5 -0
- package/src/theme/Overlay.stories.ts +12 -1
- package/src/theme/Scrollbar.stories.ts +260 -0
- package/tokens.json +224 -2
- package/src/components/UiFileItem/UiFileItem.stories.ts +0 -442
package/README.md
CHANGED
|
@@ -232,7 +232,7 @@ For Cursor, add `--cursor` flag. Then restart your IDE.
|
|
|
232
232
|
- [Architecture](./docs/ARCHITECTURE.md) — Component structure and design decisions
|
|
233
233
|
- [Contribution Guidelines](./docs/CONTRIBUTION_GUIDELINES.md) — Accessibility requirements and patterns
|
|
234
234
|
- [Storybook Guidelines](./docs/STORYBOOK.md) — Story patterns and guidelines
|
|
235
|
-
- [Testing Strategy](./docs/TESTING.md) — What we test and where
|
|
235
|
+
- [Testing Strategy](./docs/TESTING.md) — What we test and where, including the automated tests every component must ship
|
|
236
236
|
|
|
237
237
|
## Getting Started
|
|
238
238
|
|
|
@@ -301,13 +301,14 @@ Please refer to [CONTRIBUTION_GUIDELINES.md](./docs/CONTRIBUTION_GUIDELINES.md)
|
|
|
301
301
|
|
|
302
302
|
## Testing
|
|
303
303
|
|
|
304
|
-
| Command
|
|
305
|
-
|
|
|
306
|
-
| `pnpm test`
|
|
307
|
-
| `pnpm test:storybook`
|
|
308
|
-
| `pnpm
|
|
304
|
+
| Command | Purpose |
|
|
305
|
+
| --------------------------- | -------------------------------------------------------------- |
|
|
306
|
+
| `pnpm test` | Run unit tests |
|
|
307
|
+
| `pnpm test:storybook` | Run automated tests (`play` functions + a11y) against a build |
|
|
308
|
+
| `pnpm test:storybook:local` | Build Storybook, then run the automated tests |
|
|
309
|
+
| `pnpm lint` | Run linting including a11y rules |
|
|
309
310
|
|
|
310
|
-
See [Testing Strategy](./docs/TESTING.md)
|
|
311
|
+
Every component must ship both layers: unit tests and automated tests (`play` functions covering interaction, keyboard, zoom, screen reader, and mobile). See [Testing Strategy](./docs/TESTING.md#required-coverage--all-five-categories-every-component).
|
|
311
312
|
|
|
312
313
|
## Pre-commit Workflow
|
|
313
314
|
|
package/config.js
CHANGED
|
@@ -407,6 +407,7 @@ const buildShadcnVarsFromModeSet = (modeSetName, options = {}) => {
|
|
|
407
407
|
|
|
408
408
|
// Modal overlay
|
|
409
409
|
const modalOverlay = resolve('overlay.surface.modal-overlay');
|
|
410
|
+
const modalOverlayInverse = resolve('overlay.surface.modal-overlay-inverse');
|
|
410
411
|
|
|
411
412
|
// Inverse surfaces (for tooltips)
|
|
412
413
|
const inverse = resolve('background.surface.inverse');
|
|
@@ -457,6 +458,7 @@ const buildShadcnVarsFromModeSet = (modeSetName, options = {}) => {
|
|
|
457
458
|
'overlay-hover-subtle': overlayHoverSubtle,
|
|
458
459
|
'overlay-hover-strong': overlayHoverStrong,
|
|
459
460
|
'modal-overlay': modalOverlay,
|
|
461
|
+
'modal-overlay-inverse': modalOverlayInverse,
|
|
460
462
|
inverse,
|
|
461
463
|
'inverse-foreground': inverseForeground,
|
|
462
464
|
'secondary-content': secondaryContent,
|
|
@@ -646,9 +648,6 @@ const getBorderRadiusExactUtilityRules = () => {
|
|
|
646
648
|
const className = key === 'DEFAULT' ? 'rounded' : `rounded-${key}`;
|
|
647
649
|
entries.push([className, { 'border-radius': value }]);
|
|
648
650
|
}
|
|
649
|
-
// Manual intermediate radius between the `xl` and `2xl` tokens; not sourced
|
|
650
|
-
// from Figma, so it's declared here rather than in tokens.json.
|
|
651
|
-
entries.push(['rounded-xl-2xl', { 'border-radius': '1.375rem' }]);
|
|
652
651
|
return entriesToRules(entries);
|
|
653
652
|
};
|
|
654
653
|
|
|
@@ -910,6 +909,7 @@ export const presetUiLibraryThemeFromTokens = (options = {}) => {
|
|
|
910
909
|
'overlay-hover-subtle': 'oklch(var(--overlay-hover-subtle))',
|
|
911
910
|
'overlay-hover-strong': 'oklch(var(--overlay-hover-strong))',
|
|
912
911
|
'modal-overlay': 'oklch(var(--modal-overlay))',
|
|
912
|
+
'modal-overlay-inverse': 'oklch(var(--modal-overlay-inverse))',
|
|
913
913
|
inverse: 'oklch(var(--inverse))',
|
|
914
914
|
'inverse-foreground': 'oklch(var(--inverse-foreground))',
|
|
915
915
|
'secondary-content': 'oklch(var(--secondary-content))',
|
|
@@ -1187,6 +1187,143 @@ const vHoverOverlayCSS = `
|
|
|
1187
1187
|
}
|
|
1188
1188
|
`.trim();
|
|
1189
1189
|
|
|
1190
|
+
/**
|
|
1191
|
+
* Painted width of the thumb, and the full width of the lane it sits in. The
|
|
1192
|
+
* lane is deliberately no wider than the thumb: a wider lane stacks on top of
|
|
1193
|
+
* whatever padding a scroll container already has instead of sitting inside it,
|
|
1194
|
+
* which pushed content away from the edge everywhere in the library.
|
|
1195
|
+
*/
|
|
1196
|
+
const SCROLLBAR_THUMB_WIDTH_PX = 4;
|
|
1197
|
+
/**
|
|
1198
|
+
* Corner radius asked for by the design. A rounded rectangle can never curve by
|
|
1199
|
+
* more than half its own width, so at a 4px thumb this resolves to 2px and the
|
|
1200
|
+
* thumb reads as a pill. Raising the thumb width lets more of it through.
|
|
1201
|
+
*/
|
|
1202
|
+
const SCROLLBAR_THUMB_RADIUS_PX = Math.min(12, SCROLLBAR_THUMB_WIDTH_PX / 2);
|
|
1203
|
+
|
|
1204
|
+
const SCROLLBAR_THUMB_SIZE = `${SCROLLBAR_THUMB_WIDTH_PX}px`;
|
|
1205
|
+
const SCROLLBAR_LANE_SIZE = SCROLLBAR_THUMB_SIZE;
|
|
1206
|
+
const SCROLLBAR_THUMB_RADIUS = `${SCROLLBAR_THUMB_RADIUS_PX}px`;
|
|
1207
|
+
/** Shortest the thumb may get on very long content, so it stays grabbable. */
|
|
1208
|
+
const SCROLLBAR_MIN_THUMB_LENGTH = '32px';
|
|
1209
|
+
const SCROLLBAR_THUMB_COLOR = 'oklch(var(--background-surface-muted-default))';
|
|
1210
|
+
const SCROLLBAR_FADE_IN_DURATION = '100ms';
|
|
1211
|
+
const SCROLLBAR_FADE_OUT_DURATION = '200ms';
|
|
1212
|
+
|
|
1213
|
+
const scrollbarCSS = `
|
|
1214
|
+
/* Scrollbar — global default for every scroll container.
|
|
1215
|
+
|
|
1216
|
+
Anatomy:
|
|
1217
|
+
- Thumb: the ${SCROLLBAR_THUMB_SIZE} bar the user drags. The only part anyone sees.
|
|
1218
|
+
- Track: the channel the thumb runs in. Always invisible.
|
|
1219
|
+
- Lane: the strip of layout the scrollbar occupies, exactly as wide as the
|
|
1220
|
+
thumb. The gap between content and thumb is whatever padding the scroll
|
|
1221
|
+
container already has, so the lane sits inside that padding rather than
|
|
1222
|
+
adding a second gap on top of it.
|
|
1223
|
+
|
|
1224
|
+
The lane is not reserved by default. Reserving it on every element padded out
|
|
1225
|
+
every scroll container in the library by a full lane width, including ones
|
|
1226
|
+
that never scroll. Containers that must not shift when their scrollbar
|
|
1227
|
+
appears can opt in with "ui-scrollbar-stable".
|
|
1228
|
+
|
|
1229
|
+
Auto-hide (thumb visible only while scrolling, hovering the lane, or dragging)
|
|
1230
|
+
needs timers, so it is opt-in through "installScrollbarBehavior()", which adds
|
|
1231
|
+
the "ui-scrollbar-autohide" class to <html>. Without it the thumb stays
|
|
1232
|
+
visible, which is the safe fallback when the runtime is not installed.
|
|
1233
|
+
|
|
1234
|
+
Escape hatches:
|
|
1235
|
+
- "ui-scrollbar-none" no scrollbar at all.
|
|
1236
|
+
- "ui-scrollbar-always" thumb always visible, opting out of auto-hide.
|
|
1237
|
+
- "ui-scrollbar-stable" reserve the lane so content never shifts. */
|
|
1238
|
+
.ui-scrollbar-stable {
|
|
1239
|
+
scrollbar-gutter: stable;
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
/* Engines without ::-webkit-scrollbar (Firefox). "thin" is the closest match to
|
|
1243
|
+
the 4px thumb; the gap and the corner radius are not controllable there.
|
|
1244
|
+
Chromium ignores ::-webkit-scrollbar as soon as scrollbar-width or
|
|
1245
|
+
scrollbar-color is set, so these are guarded rather than declared alongside. */
|
|
1246
|
+
@supports not selector(::-webkit-scrollbar) {
|
|
1247
|
+
* {
|
|
1248
|
+
scrollbar-width: thin;
|
|
1249
|
+
scrollbar-color: ${SCROLLBAR_THUMB_COLOR} transparent;
|
|
1250
|
+
}
|
|
1251
|
+
html.ui-scrollbar-autohide,
|
|
1252
|
+
html.ui-scrollbar-autohide * {
|
|
1253
|
+
scrollbar-color: transparent transparent;
|
|
1254
|
+
}
|
|
1255
|
+
html.ui-scrollbar-autohide[data-ui-scrollbar='visible'],
|
|
1256
|
+
html.ui-scrollbar-autohide [data-ui-scrollbar='visible'],
|
|
1257
|
+
html.ui-scrollbar-autohide.ui-scrollbar-always,
|
|
1258
|
+
html.ui-scrollbar-autohide .ui-scrollbar-always {
|
|
1259
|
+
scrollbar-color: ${SCROLLBAR_THUMB_COLOR} transparent;
|
|
1260
|
+
}
|
|
1261
|
+
.ui-scrollbar-none {
|
|
1262
|
+
scrollbar-width: none;
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
@supports selector(::-webkit-scrollbar) {
|
|
1267
|
+
::-webkit-scrollbar {
|
|
1268
|
+
width: ${SCROLLBAR_LANE_SIZE};
|
|
1269
|
+
height: ${SCROLLBAR_LANE_SIZE};
|
|
1270
|
+
background-color: transparent;
|
|
1271
|
+
}
|
|
1272
|
+
::-webkit-scrollbar-track,
|
|
1273
|
+
::-webkit-scrollbar-track-piece,
|
|
1274
|
+
::-webkit-scrollbar-corner {
|
|
1275
|
+
background-color: transparent;
|
|
1276
|
+
}
|
|
1277
|
+
::-webkit-scrollbar-button {
|
|
1278
|
+
display: none;
|
|
1279
|
+
width: 0;
|
|
1280
|
+
height: 0;
|
|
1281
|
+
}
|
|
1282
|
+
::-webkit-scrollbar-thumb {
|
|
1283
|
+
background-color: ${SCROLLBAR_THUMB_COLOR};
|
|
1284
|
+
border-radius: ${SCROLLBAR_THUMB_RADIUS};
|
|
1285
|
+
}
|
|
1286
|
+
::-webkit-scrollbar-thumb:vertical {
|
|
1287
|
+
min-height: ${SCROLLBAR_MIN_THUMB_LENGTH};
|
|
1288
|
+
}
|
|
1289
|
+
::-webkit-scrollbar-thumb:horizontal {
|
|
1290
|
+
min-width: ${SCROLLBAR_MIN_THUMB_LENGTH};
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
html.ui-scrollbar-autohide::-webkit-scrollbar-thumb,
|
|
1294
|
+
html.ui-scrollbar-autohide ::-webkit-scrollbar-thumb {
|
|
1295
|
+
background-color: transparent;
|
|
1296
|
+
transition: background-color ${SCROLLBAR_FADE_OUT_DURATION} ease;
|
|
1297
|
+
}
|
|
1298
|
+
html.ui-scrollbar-autohide[data-ui-scrollbar='visible']::-webkit-scrollbar-thumb,
|
|
1299
|
+
html.ui-scrollbar-autohide [data-ui-scrollbar='visible']::-webkit-scrollbar-thumb,
|
|
1300
|
+
html.ui-scrollbar-autohide.ui-scrollbar-always::-webkit-scrollbar-thumb,
|
|
1301
|
+
html.ui-scrollbar-autohide .ui-scrollbar-always::-webkit-scrollbar-thumb {
|
|
1302
|
+
background-color: ${SCROLLBAR_THUMB_COLOR};
|
|
1303
|
+
transition-duration: ${SCROLLBAR_FADE_IN_DURATION};
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
.ui-scrollbar-none::-webkit-scrollbar {
|
|
1307
|
+
display: none;
|
|
1308
|
+
width: 0;
|
|
1309
|
+
height: 0;
|
|
1310
|
+
}
|
|
1311
|
+
.ui-scrollbar-none {
|
|
1312
|
+
scrollbar-gutter: auto;
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1317
|
+
@supports selector(::-webkit-scrollbar) {
|
|
1318
|
+
::-webkit-scrollbar-thumb,
|
|
1319
|
+
html.ui-scrollbar-autohide::-webkit-scrollbar-thumb,
|
|
1320
|
+
html.ui-scrollbar-autohide ::-webkit-scrollbar-thumb {
|
|
1321
|
+
transition: none;
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
`.trim();
|
|
1326
|
+
|
|
1190
1327
|
/**
|
|
1191
1328
|
* UnoCSS preset with utility rules and preflight classes required by the UI
|
|
1192
1329
|
* library's components.
|
|
@@ -1215,6 +1352,19 @@ const vHoverOverlayCSS = `
|
|
|
1215
1352
|
* `focus-ring` would be parsed by UnoCSS as the `focus:` variant of the `ring`
|
|
1216
1353
|
* utility and emit an unintended `.focus-ring:focus` rule.
|
|
1217
1354
|
*
|
|
1355
|
+
* ## Scrollbars
|
|
1356
|
+
*
|
|
1357
|
+
* Every scroll container gets the library scrollbar by default: a 4px thumb on
|
|
1358
|
+
* an invisible track, in a lane no wider than the thumb so it sits inside the
|
|
1359
|
+
* container's own padding rather than adding space beside it. No class needed.
|
|
1360
|
+
* Import `installScrollbarBehavior` from the library to additionally auto-hide
|
|
1361
|
+
* the thumb when the user is idle. Three modifiers:
|
|
1362
|
+
*
|
|
1363
|
+
* - `ui-scrollbar-none` — no scrollbar at all.
|
|
1364
|
+
* - `ui-scrollbar-always` — thumb always visible, ignoring auto-hide.
|
|
1365
|
+
* - `ui-scrollbar-stable` — reserve the lane so content never shifts when the
|
|
1366
|
+
* scrollbar appears.
|
|
1367
|
+
*
|
|
1218
1368
|
* @example
|
|
1219
1369
|
* ```html
|
|
1220
1370
|
* <button class="ui-focus-ring border border-transparent">Save</button>
|
|
@@ -1227,7 +1377,10 @@ const vHoverOverlayCSS = `
|
|
|
1227
1377
|
export const presetUiLibraryUtils = () =>
|
|
1228
1378
|
definePreset(() => ({
|
|
1229
1379
|
name: '@aleph-alpha/ui-library-utils',
|
|
1230
|
-
preflights: [
|
|
1380
|
+
preflights: [
|
|
1381
|
+
{ getCSS: () => vHoverOverlayCSS },
|
|
1382
|
+
{ getCSS: () => scrollbarCSS },
|
|
1383
|
+
],
|
|
1231
1384
|
rules: [
|
|
1232
1385
|
[/^w-\(--(.+)\)$/, ([, name]) => ({ width: `var(--${name})` })],
|
|
1233
1386
|
[/^max-w-\(--(.+)\)$/, ([, name]) => ({ 'max-width': `var(--${name})` })],
|
|
@@ -35,3 +35,27 @@ export declare function createMockIcon(testId?: string): Component;
|
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
37
|
export declare const MockIcon: Component;
|
|
38
|
+
/**
|
|
39
|
+
* Stubs the layout and scrolling that jsdom leaves unimplemented, so that a
|
|
40
|
+
* virtualized list can measure its scroll container and move through it.
|
|
41
|
+
*
|
|
42
|
+
* Heights come from the stub rather than from layout, and the scrolled height
|
|
43
|
+
* is read off the spacer every virtualizer renders as its first child.
|
|
44
|
+
* @param viewportHeight - The visible height every element reports
|
|
45
|
+
* @returns A teardown restoring the stubbed properties
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* import { stubScrollLayout } from '@/__tests__/test-utils';
|
|
49
|
+
*
|
|
50
|
+
* let restoreScrollLayout: () => void;
|
|
51
|
+
*
|
|
52
|
+
* beforeAll(() => {
|
|
53
|
+
* restoreScrollLayout = stubScrollLayout();
|
|
54
|
+
* });
|
|
55
|
+
*
|
|
56
|
+
* afterAll(() => {
|
|
57
|
+
* restoreScrollLayout();
|
|
58
|
+
* });
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
export declare function stubScrollLayout(viewportHeight?: number): () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UiAutocompleteProps } from './types';
|
|
1
|
+
import { UiAutocompleteOption, UiAutocompleteProps } from './types';
|
|
2
2
|
declare function setOpen(value: boolean): void;
|
|
3
3
|
declare function setInputValue(value: string): void;
|
|
4
4
|
declare function isSelected(value: string): boolean;
|
|
@@ -11,7 +11,7 @@ declare function __VLS_template(): {
|
|
|
11
11
|
ariaLabel: string;
|
|
12
12
|
disabled: boolean;
|
|
13
13
|
selectedValues: string[];
|
|
14
|
-
selectedOptions:
|
|
14
|
+
selectedOptions: UiAutocompleteOption[];
|
|
15
15
|
displayText: string;
|
|
16
16
|
showSelectionDisplay: boolean;
|
|
17
17
|
open: boolean;
|
|
@@ -19,7 +19,7 @@ declare function __VLS_template(): {
|
|
|
19
19
|
setOpen: typeof setOpen;
|
|
20
20
|
}): any;
|
|
21
21
|
item?(_: {
|
|
22
|
-
option:
|
|
22
|
+
option: UiAutocompleteOption;
|
|
23
23
|
selected: boolean;
|
|
24
24
|
disabled: boolean;
|
|
25
25
|
}): any;
|
|
@@ -27,7 +27,7 @@ declare function __VLS_template(): {
|
|
|
27
27
|
default?(_: {
|
|
28
28
|
inputValue: string;
|
|
29
29
|
selectedValues: string[];
|
|
30
|
-
selectedOptions:
|
|
30
|
+
selectedOptions: UiAutocompleteOption[];
|
|
31
31
|
isSelected: typeof isSelected;
|
|
32
32
|
setOpen: typeof setOpen;
|
|
33
33
|
}): any;
|
|
@@ -35,6 +35,7 @@ declare function __VLS_template(): {
|
|
|
35
35
|
refs: {
|
|
36
36
|
rootEl: HTMLDivElement;
|
|
37
37
|
inputEl: HTMLInputElement;
|
|
38
|
+
listboxEl: HTMLDivElement;
|
|
38
39
|
};
|
|
39
40
|
rootEl: HTMLDivElement;
|
|
40
41
|
};
|
|
@@ -74,9 +75,12 @@ declare const __VLS_component: import('vue').DefineComponent<UiAutocompleteProps
|
|
|
74
75
|
defaultInputValue: string;
|
|
75
76
|
emptyText: string;
|
|
76
77
|
showIndicator: boolean;
|
|
78
|
+
virtualized: boolean;
|
|
79
|
+
estimateSize: number;
|
|
77
80
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
78
81
|
rootEl: HTMLDivElement;
|
|
79
82
|
inputEl: HTMLInputElement;
|
|
83
|
+
listboxEl: HTMLDivElement;
|
|
80
84
|
}, HTMLDivElement>;
|
|
81
85
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
82
86
|
export default _default;
|
|
@@ -53,6 +53,17 @@ export type UiAutocompleteProps = {
|
|
|
53
53
|
startIcon?: UiIconProps['name'];
|
|
54
54
|
/** Whether to show the default right-side selected indicator. */
|
|
55
55
|
showIndicator?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Whether to mount only the options in view, for lists too long to render at
|
|
58
|
+
* once. Applies to `options` only, not to items provided through the slot.
|
|
59
|
+
*/
|
|
60
|
+
virtualized?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* The expected height of an option in pixels while virtualizing, used to size
|
|
63
|
+
* the scrollbar before the options are measured. Raise it for taller custom
|
|
64
|
+
* items.
|
|
65
|
+
*/
|
|
66
|
+
estimateSize?: number;
|
|
56
67
|
};
|
|
57
68
|
export type UiAutocompleteEmits = {
|
|
58
69
|
/** Emitted when the selected value changes. */
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { UiFadeMaskProps } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: {
|
|
5
|
+
default?(_: {}): any;
|
|
6
|
+
};
|
|
7
|
+
refs: {};
|
|
8
|
+
rootEl: any;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
+
declare const __VLS_component: import('vue').DefineComponent<UiFadeMaskProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<UiFadeMaskProps> & Readonly<{}>, {
|
|
12
|
+
position: import('./types').UiFadeMaskPosition;
|
|
13
|
+
background: import('./types').UiFadeMaskBackground;
|
|
14
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type UiFadeMaskBackground = 'primary' | 'secondary';
|
|
2
|
+
export type UiFadeMaskPosition = 'top' | 'bottom';
|
|
3
|
+
/**
|
|
4
|
+
* Wraps content and lays a gradient band over one of its edges, so scrolling or
|
|
5
|
+
* clipped content dissolves into the surface instead of ending on a hard cut.
|
|
6
|
+
* Put a scroll container in the slot and the band stays pinned to the wrapper's
|
|
7
|
+
* top or bottom edge.
|
|
8
|
+
*
|
|
9
|
+
* The band is decorative and lets pointer events through, so the wrapped
|
|
10
|
+
* content stays scrollable and clickable underneath it. Its height defaults to
|
|
11
|
+
* 4rem on mobile and 6rem from the medium breakpoint up, and can be retuned per
|
|
12
|
+
* usage with the `--ui-fade-mask-height` custom property.
|
|
13
|
+
* @category Layout
|
|
14
|
+
* @useCases scroll fade, overflow hint, clipped text fade, scroll edge indicator, sticky header backdrop
|
|
15
|
+
* @keywords fade, mask, gradient, scrim, overlay, scroll, overflow, edge
|
|
16
|
+
* @related UiSeparator, UiSheet
|
|
17
|
+
*/
|
|
18
|
+
export interface UiFadeMaskProps {
|
|
19
|
+
/**
|
|
20
|
+
* Surface the gradient fades into. Match it to the background the wrapped
|
|
21
|
+
* content sits on, otherwise the fade ends on a visible edge.
|
|
22
|
+
* @default 'secondary'
|
|
23
|
+
*/
|
|
24
|
+
background?: UiFadeMaskBackground;
|
|
25
|
+
/**
|
|
26
|
+
* Edge the band is pinned to. `top` is opaque at the top and fades downwards,
|
|
27
|
+
* `bottom` is opaque at the bottom and fades upwards. The bottom fade ramps
|
|
28
|
+
* across the whole band on desktop and turns opaque near the top edge on
|
|
29
|
+
* mobile, so it reads the same at both band heights.
|
|
30
|
+
* @default 'top'
|
|
31
|
+
*/
|
|
32
|
+
position?: UiFadeMaskPosition;
|
|
33
|
+
}
|
|
@@ -15,5 +15,7 @@ declare const _default: import('vue').DefineComponent<UiFileItemProps, {}, {}, {
|
|
|
15
15
|
progressLabel: string;
|
|
16
16
|
mediaTone: import('./types').UiFileItemMediaTone;
|
|
17
17
|
mediaIcon: string;
|
|
18
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
18
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
19
|
+
titleRef: HTMLSpanElement;
|
|
20
|
+
}, HTMLDivElement>;
|
|
19
21
|
export default _default;
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* - `Type=Text` (`pdf` / `doc` / `docx` / `txt` / `rtf`) → `accent-pink` + `file`
|
|
7
7
|
* - `Type=Markdown` (`html` / `htm` / `md` / `mdx`) → `accent-soft` + `code-xml`
|
|
8
8
|
* - `Type=Tabular` (`csv` / `tsv` / `xls` / `xlsx`) → `accent-yellow` + `table-2`
|
|
9
|
+
* - `Type=Media` (`mp4` / `mov` / `webm` / `mkv` / …) → `accent-orange` + `image-play`
|
|
9
10
|
* - everything else → `default` + `file`
|
|
10
11
|
* @see {@link https://www.figma.com/design/SrZQ19QVN1sQkuAMnMC746/AA26--WIP-?node-id=26438-42144}
|
|
11
12
|
* @category Data Display
|
|
@@ -13,7 +14,7 @@
|
|
|
13
14
|
* @keywords file, badge, attachment, filetype, icon
|
|
14
15
|
* @related UiFileItem, UiFileUploadBox
|
|
15
16
|
*/
|
|
16
|
-
export type UiFileTypeTone = 'default' | 'accent-pink' | 'accent-soft' | 'accent-yellow';
|
|
17
|
+
export type UiFileTypeTone = 'default' | 'accent-pink' | 'accent-soft' | 'accent-yellow' | 'accent-orange';
|
|
17
18
|
export interface UiFileTypeProps {
|
|
18
19
|
/**
|
|
19
20
|
* File name used to auto-derive the tone + icon from its extension. Pass
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AcceptableValue } from 'reka-ui';
|
|
2
|
+
import { UiListboxVirtualizerProps, UiListboxVirtualizerSlotProps } from './types';
|
|
3
|
+
declare const _default: <T extends AcceptableValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & UiListboxVirtualizerProps<T> & Partial<{}>> & import('vue').PublicProps;
|
|
5
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
6
|
+
attrs: any;
|
|
7
|
+
slots: Readonly<{
|
|
8
|
+
/** A single option, which has to render exactly one `UiListboxItem`. */
|
|
9
|
+
default(props: UiListboxVirtualizerSlotProps<T>): unknown;
|
|
10
|
+
}> & {
|
|
11
|
+
/** A single option, which has to render exactly one `UiListboxItem`. */
|
|
12
|
+
default(props: UiListboxVirtualizerSlotProps<T>): unknown;
|
|
13
|
+
};
|
|
14
|
+
emit: {};
|
|
15
|
+
}>) => import('vue').VNode & {
|
|
16
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
17
|
+
};
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_PrettifyLocal<T> = {
|
|
20
|
+
[K in keyof T]: T[K];
|
|
21
|
+
} & {};
|
|
@@ -3,6 +3,7 @@ export { default as UiListboxContent } from './UiListboxContent.vue';
|
|
|
3
3
|
export { default as UiListboxFilter } from './UiListboxFilter.vue';
|
|
4
4
|
export { default as UiListboxItem } from './UiListboxItem.vue';
|
|
5
5
|
export { default as UiListboxItemIndicator } from './UiListboxItemIndicator.vue';
|
|
6
|
+
export { default as UiListboxVirtualizer } from './UiListboxVirtualizer.vue';
|
|
6
7
|
export { default as UiListboxGroup } from './UiListboxGroup.vue';
|
|
7
8
|
export { default as UiListboxGroupLabel } from './UiListboxGroupLabel.vue';
|
|
8
9
|
export type * from './types';
|
|
@@ -85,6 +85,42 @@ export interface UiListboxItemProps {
|
|
|
85
85
|
*/
|
|
86
86
|
disabled?: boolean;
|
|
87
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* Props for the UiListboxVirtualizer component.
|
|
90
|
+
* Renders only the options in view, for lists too long to mount at once.
|
|
91
|
+
*/
|
|
92
|
+
export interface UiListboxVirtualizerProps<T extends AcceptableValue = AcceptableValue> {
|
|
93
|
+
/**
|
|
94
|
+
* The full list of options to virtualize.
|
|
95
|
+
*/
|
|
96
|
+
options: T[];
|
|
97
|
+
/**
|
|
98
|
+
* How many options to render outside the visible area, as a scroll buffer.
|
|
99
|
+
* @default 12
|
|
100
|
+
*/
|
|
101
|
+
overscan?: number;
|
|
102
|
+
/**
|
|
103
|
+
* The expected height of an option in pixels, used to size the scrollbar
|
|
104
|
+
* before the options are measured.
|
|
105
|
+
* @default 28
|
|
106
|
+
*/
|
|
107
|
+
estimateSize?: number | ((index: number) => number);
|
|
108
|
+
/**
|
|
109
|
+
* The text of an option, used for type-ahead. Required for object options,
|
|
110
|
+
* which have no meaningful string form.
|
|
111
|
+
*/
|
|
112
|
+
textContent?: (option: T) => string;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Slot props for the UiListboxVirtualizer default slot.
|
|
116
|
+
* Describes the option to render.
|
|
117
|
+
*/
|
|
118
|
+
export interface UiListboxVirtualizerSlotProps<T extends AcceptableValue = AcceptableValue> {
|
|
119
|
+
/** The option to render. */
|
|
120
|
+
option: T;
|
|
121
|
+
/** The position of the option in the full list, starting at 0. */
|
|
122
|
+
index: number;
|
|
123
|
+
}
|
|
88
124
|
/**
|
|
89
125
|
* Props for the UiListboxItemIndicator component.
|
|
90
126
|
* Displays a visual indicator when the item is selected.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
import { UiSelectVirtualizerProps, UiSelectVirtualizerSlotProps } from './types';
|
|
3
|
+
declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & UiSelectVirtualizerProps<T> & Partial<{}>> & import('vue').PublicProps;
|
|
5
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
6
|
+
attrs: any;
|
|
7
|
+
slots: Readonly<{
|
|
8
|
+
/** A single option, which has to render exactly one `UiSelectItem`. */
|
|
9
|
+
default(props: UiSelectVirtualizerSlotProps<T>): VNode[];
|
|
10
|
+
}> & {
|
|
11
|
+
/** A single option, which has to render exactly one `UiSelectItem`. */
|
|
12
|
+
default(props: UiSelectVirtualizerSlotProps<T>): VNode[];
|
|
13
|
+
};
|
|
14
|
+
emit: {};
|
|
15
|
+
}>) => import('vue').VNode & {
|
|
16
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
17
|
+
};
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_PrettifyLocal<T> = {
|
|
20
|
+
[K in keyof T]: T[K];
|
|
21
|
+
} & {};
|
|
@@ -2,6 +2,7 @@ export { default as UiSelect } from './UiSelect.vue';
|
|
|
2
2
|
export { default as UiSelectTrigger } from './UiSelectTrigger.vue';
|
|
3
3
|
export { default as UiSelectContent } from './UiSelectContent.vue';
|
|
4
4
|
export { default as UiSelectItem } from './UiSelectItem.vue';
|
|
5
|
+
export { default as UiSelectVirtualizer } from './UiSelectVirtualizer.vue';
|
|
5
6
|
export { default as UiSelectValue } from './UiSelectValue.vue';
|
|
6
7
|
export { default as UiSelectLabel } from './UiSelectLabel.vue';
|
|
7
8
|
export { default as UiSelectGroup } from './UiSelectGroup.vue';
|
|
@@ -121,6 +121,42 @@ export type UiSelectItemProps = {
|
|
|
121
121
|
/** Text for typeahead purposes. */
|
|
122
122
|
textValue?: string;
|
|
123
123
|
};
|
|
124
|
+
/**
|
|
125
|
+
* Props for the UiSelectVirtualizer component.
|
|
126
|
+
* Renders only the options in view, for lists too long to mount at once.
|
|
127
|
+
*/
|
|
128
|
+
export type UiSelectVirtualizerProps<T> = {
|
|
129
|
+
/** The full list of options to virtualize. */
|
|
130
|
+
options: T[];
|
|
131
|
+
/**
|
|
132
|
+
* The value of an option, matched against the select's own value to open on
|
|
133
|
+
* the current selection. Defaults to the option itself as a string.
|
|
134
|
+
*/
|
|
135
|
+
optionValue?: (option: T) => string;
|
|
136
|
+
/**
|
|
137
|
+
* The text of an option, used for type-ahead. Required for object options,
|
|
138
|
+
* which have no meaningful string form.
|
|
139
|
+
*/
|
|
140
|
+
textContent?: (option: T) => string;
|
|
141
|
+
/**
|
|
142
|
+
* The expected height of an option in pixels, used to size the scrollbar
|
|
143
|
+
* before the options are measured.
|
|
144
|
+
*/
|
|
145
|
+
estimateSize?: number;
|
|
146
|
+
/** How many options to render outside the visible area, as a scroll buffer. */
|
|
147
|
+
overscan?: number;
|
|
148
|
+
/** Additional classes for the scroll container, such as its height. */
|
|
149
|
+
class?: HTMLAttributes['class'];
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* Slot props for the UiSelectVirtualizer default slot.
|
|
153
|
+
*/
|
|
154
|
+
export type UiSelectVirtualizerSlotProps<T> = {
|
|
155
|
+
/** The option to render. */
|
|
156
|
+
option: T;
|
|
157
|
+
/** The position of the option in the full list, starting at 0. */
|
|
158
|
+
index: number;
|
|
159
|
+
};
|
|
124
160
|
/**
|
|
125
161
|
* Props for the UiSelectValue component.
|
|
126
162
|
*/
|
|
@@ -9,6 +9,7 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
9
9
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
10
10
|
}>, {
|
|
11
11
|
disabled: boolean;
|
|
12
|
+
size: import('./types').UiSwitchSize;
|
|
12
13
|
required: boolean;
|
|
13
14
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
14
15
|
export default _default;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Size options for the UiSwitch component.
|
|
3
|
+
* - `default`: 36×20px track with a 16px thumb
|
|
4
|
+
* - `sm`: 28×16px track with a 12px thumb, for dense rows and table cells
|
|
5
|
+
*/
|
|
6
|
+
export type UiSwitchSize = 'default' | 'sm';
|
|
1
7
|
/**
|
|
2
8
|
* A toggle switch for on/off states. Use for settings, preferences,
|
|
3
9
|
* or any binary choice that takes effect immediately.
|
|
@@ -21,4 +27,10 @@ export type UiSwitchProps = {
|
|
|
21
27
|
* @default false
|
|
22
28
|
*/
|
|
23
29
|
required?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Track and thumb scale. Neither size reaches the 24px minimum target height,
|
|
32
|
+
* so pair the switch with a label that extends the target (WCAG 2.5.8).
|
|
33
|
+
* @default 'default'
|
|
34
|
+
*/
|
|
35
|
+
size?: UiSwitchSize;
|
|
24
36
|
};
|
|
@@ -14,7 +14,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
|
14
14
|
innerHTML?: string | undefined | undefined;
|
|
15
15
|
style?: import('vue').StyleValue;
|
|
16
16
|
accesskey?: string | undefined | undefined;
|
|
17
|
-
contenteditable?: (boolean | "true" | "false") | "
|
|
17
|
+
contenteditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
18
18
|
contextmenu?: string | undefined | undefined;
|
|
19
19
|
dir?: string | undefined | undefined;
|
|
20
20
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -208,7 +208,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
|
208
208
|
innerHTML?: string | undefined | undefined;
|
|
209
209
|
style?: import('vue').StyleValue;
|
|
210
210
|
accesskey?: string | undefined | undefined;
|
|
211
|
-
contenteditable?: (boolean | "true" | "false") | "
|
|
211
|
+
contenteditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
212
212
|
contextmenu?: string | undefined | undefined;
|
|
213
213
|
dir?: string | undefined | undefined;
|
|
214
214
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -16,7 +16,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
|
16
16
|
innerHTML?: string | undefined | undefined;
|
|
17
17
|
style?: import('vue').StyleValue;
|
|
18
18
|
accesskey?: string | undefined | undefined;
|
|
19
|
-
contenteditable?: (boolean | "true" | "false") | "
|
|
19
|
+
contenteditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
20
20
|
contextmenu?: string | undefined | undefined;
|
|
21
21
|
dir?: string | undefined | undefined;
|
|
22
22
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -212,7 +212,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
|
212
212
|
innerHTML?: string | undefined | undefined;
|
|
213
213
|
style?: import('vue').StyleValue;
|
|
214
214
|
accesskey?: string | undefined | undefined;
|
|
215
|
-
contenteditable?: (boolean | "true" | "false") | "
|
|
215
|
+
contenteditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
216
216
|
contextmenu?: string | undefined | undefined;
|
|
217
217
|
dir?: string | undefined | undefined;
|
|
218
218
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { SwitchRootProps } from 'reka-ui';
|
|
2
2
|
import { HTMLAttributes } from 'vue';
|
|
3
|
+
import { SwitchVariants } from '.';
|
|
3
4
|
type __VLS_Props = SwitchRootProps & {
|
|
4
5
|
class?: HTMLAttributes['class'];
|
|
6
|
+
size?: SwitchVariants['size'];
|
|
5
7
|
};
|
|
6
8
|
declare function __VLS_template(): {
|
|
7
9
|
attrs: Partial<{}>;
|