@khsura/sui 1.19.0 → 1.21.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 (180) hide show
  1. package/@types/components/avatar/index.d.ts +2 -0
  2. package/@types/components/avatar/sAvatar.vue.d.ts +13 -0
  3. package/@types/components/avatar/sAvatarGroup.vue.d.ts +16 -0
  4. package/@types/components/cards/sCardText.vue.d.ts +2 -2
  5. package/@types/components/datePicker/sDatePickerSwitch.vue.d.ts +2 -0
  6. package/@types/components/form/index.d.ts +2 -0
  7. package/@types/components/form/radio/sRadio.vue.d.ts +3 -0
  8. package/@types/components/form/sFormRow.vue.d.ts +18 -0
  9. package/@types/components/form/sInput.vue.d.ts +1 -0
  10. package/@types/components/form/sNumberInput.vue.d.ts +29 -0
  11. package/@types/components/form/sSelect.vue.d.ts +10 -3
  12. package/@types/components/index.d.ts +5 -0
  13. package/@types/components/layout/sNavigationDrawer.vue.d.ts +6 -6
  14. package/@types/components/progress/sProgressCircular.vue.d.ts +1 -0
  15. package/@types/components/progress/sProgressLinear.vue.d.ts +1 -0
  16. package/@types/components/sAutocomplete.vue.d.ts +11 -1
  17. package/@types/components/sEmptyState.vue.d.ts +26 -0
  18. package/@types/components/sFileInput.vue.d.ts +35 -0
  19. package/@types/components/sPagination.vue.d.ts +21 -0
  20. package/@types/components/sSkeletonLoader.vue.d.ts +19 -0
  21. package/@types/components/slideGroup/sSlideGroup.vue.d.ts +4 -1
  22. package/@types/components/table/sTable.vue.d.ts +2 -0
  23. package/@types/components/tabs/sTabs.vue.d.ts +2 -2
  24. package/@types/components/toggleButtonGroup/sToggleButtonGroup.vue.d.ts +2 -0
  25. package/@types/configs/app.d.ts +4 -0
  26. package/@types/configs/fileInput.d.ts +5 -0
  27. package/@types/configs/i18n.d.ts +3 -0
  28. package/@types/configs/index.d.ts +2 -0
  29. package/@types/configs/provider.d.ts +2 -0
  30. package/@types/configs/skeletonLoader.d.ts +57 -0
  31. package/@types/constants/avatar.d.ts +3 -0
  32. package/@types/constants/color.d.ts +15 -0
  33. package/@types/constants/cssVariables.d.ts +4 -0
  34. package/@types/constants/datePicker.d.ts +7 -0
  35. package/@types/constants/fileInput.d.ts +31 -0
  36. package/@types/constants/i18n.d.ts +3 -0
  37. package/@types/constants/index.d.ts +8 -0
  38. package/@types/constants/keyboard.d.ts +12 -0
  39. package/@types/constants/layout.d.ts +2 -0
  40. package/@types/constants/listbox.d.ts +1 -0
  41. package/@types/constants/numberInput.d.ts +22 -0
  42. package/@types/constants/overlay.d.ts +5 -0
  43. package/@types/constants/pagination.d.ts +20 -0
  44. package/@types/constants/skeletonLoader.d.ts +33 -0
  45. package/@types/constants/tabs.d.ts +10 -0
  46. package/@types/definitions/props/core/propsLink.d.ts +2 -2
  47. package/@types/definitions/props/index.d.ts +7 -0
  48. package/@types/definitions/props/propsAutocomplete.d.ts +8 -0
  49. package/@types/definitions/props/propsAvatar.d.ts +13 -0
  50. package/@types/definitions/props/propsAvatarGroup.d.ts +8 -0
  51. package/@types/definitions/props/propsEmptyState.d.ts +17 -0
  52. package/@types/definitions/props/propsFileInput.d.ts +41 -0
  53. package/@types/definitions/props/propsInput.d.ts +1 -0
  54. package/@types/definitions/props/propsLink.d.ts +2 -2
  55. package/@types/definitions/props/propsNumberInput.d.ts +46 -0
  56. package/@types/definitions/props/propsPagination.d.ts +32 -0
  57. package/@types/definitions/props/propsProgressCircular.d.ts +2 -0
  58. package/@types/definitions/props/propsProgressLinear.d.ts +2 -0
  59. package/@types/definitions/props/propsRow.d.ts +1 -0
  60. package/@types/definitions/props/propsSelect.d.ts +6 -0
  61. package/@types/definitions/props/propsSkeletonLoader.d.ts +18 -0
  62. package/@types/definitions/props/propsSlideGroup.d.ts +4 -0
  63. package/@types/definitions/props/propsTable.d.ts +1 -0
  64. package/@types/definitions/props/propsTabs.d.ts +4 -0
  65. package/@types/definitions/props/propsTextarea.d.ts +3 -0
  66. package/@types/helpers/colorHelpers.d.ts +1 -1
  67. package/@types/helpers/createAppStore.d.ts +4 -0
  68. package/@types/helpers/fileInputRules.d.ts +18 -0
  69. package/@types/helpers/index.d.ts +1 -0
  70. package/@types/lib/color.d.ts +21 -2
  71. package/@types/lib/escapeHtml.d.ts +2 -0
  72. package/@types/lib/flattenVNodes.d.ts +2 -0
  73. package/@types/lib/index.d.ts +7 -0
  74. package/@types/lib/linkLocation.d.ts +9 -0
  75. package/@types/lib/numberInput.d.ts +23 -0
  76. package/@types/lib/overlayPlacement.d.ts +11 -0
  77. package/@types/lib/revealInScroller.d.ts +25 -0
  78. package/@types/lib/safeArea.d.ts +3 -0
  79. package/@types/playwright.visual.config.d.ts +3 -0
  80. package/@types/services/appBarService.d.ts +14 -0
  81. package/@types/services/backgroundScrollService.d.ts +8 -2
  82. package/@types/services/core/layoutCoreService.d.ts +4 -0
  83. package/@types/services/datePicker/datePickerItemDateService.d.ts +1 -0
  84. package/@types/services/dialogService.d.ts +4 -8
  85. package/@types/services/fieldLayoutService.d.ts +19 -0
  86. package/@types/services/formInputService.d.ts +6 -0
  87. package/@types/services/index.d.ts +9 -0
  88. package/@types/services/layoutProviderService.d.ts +6 -0
  89. package/@types/services/layoutService.d.ts +4 -0
  90. package/@types/services/linkService.d.ts +11 -1
  91. package/@types/services/listboxNavigationService.d.ts +20 -0
  92. package/@types/services/menuService.d.ts +2 -0
  93. package/@types/services/overlayFocusService.d.ts +10 -0
  94. package/@types/services/paginationService.d.ts +39 -0
  95. package/@types/services/routerLinkService.d.ts +19 -0
  96. package/@types/services/scrollableFocusService.d.ts +10 -0
  97. package/@types/services/skeletonLoaderService.d.ts +22 -0
  98. package/@types/services/surfaceTextColorService.d.ts +8 -0
  99. package/@types/services/tabsService.d.ts +14 -0
  100. package/@types/store/index.d.ts +1 -0
  101. package/@types/store/scrollLockStore.d.ts +1 -0
  102. package/@types/tests/visual/constants/a11yAudit.d.ts +4 -0
  103. package/@types/tests/visual/constants/index.d.ts +4 -0
  104. package/@types/tests/visual/constants/resizeScroll.d.ts +10 -0
  105. package/@types/tests/visual/constants/storyRender.d.ts +5 -0
  106. package/@types/tests/visual/constants/visualMatrix.d.ts +20 -0
  107. package/@types/tests/visual/schemas/index.d.ts +1 -0
  108. package/@types/tests/visual/schemas/storyIndex.d.ts +17 -0
  109. package/@types/tests/visual/types/a11yAudit.d.ts +2 -0
  110. package/@types/tests/visual/types/index.d.ts +2 -0
  111. package/@types/tests/visual/types/visualStory.d.ts +8 -0
  112. package/@types/types/app.d.ts +2 -0
  113. package/@types/types/breadcrumbs.d.ts +2 -2
  114. package/@types/types/emits.d.ts +12 -0
  115. package/@types/types/fileInput.d.ts +28 -0
  116. package/@types/types/index.d.ts +6 -0
  117. package/@types/types/link.d.ts +20 -0
  118. package/@types/types/menu.d.ts +17 -0
  119. package/@types/types/numberInput.d.ts +12 -0
  120. package/@types/types/pagination.d.ts +17 -0
  121. package/@types/types/safeArea.d.ts +1 -0
  122. package/@types/types/skeletonLoader.d.ts +16 -0
  123. package/@types/vite.config.d.ts +1 -0
  124. package/README.md +12 -0
  125. package/dist/base.css.map +1 -1
  126. package/dist/s-ui.css +1 -1
  127. package/dist/s-ui.js +4792 -3038
  128. package/dist/s-ui.umd.cjs +1 -1
  129. package/dist/styles/components/avatar/_variables.scss +17 -0
  130. package/dist/styles/components/avatar/index.scss +1 -0
  131. package/dist/styles/components/button/mixins.scss +5 -0
  132. package/dist/styles/components/form/_variables.scss +11 -0
  133. package/dist/styles/components/form/index.scss +1 -0
  134. package/dist/styles/components/index.scss +2 -0
  135. package/dist/styles/mixins/_app.scss +7 -0
  136. package/dist/styles/tools/_safeArea.scss +8 -0
  137. package/dist/styles/tools/index.scss +1 -0
  138. package/dist/sui-api.json +1295 -212
  139. package/package.json +15 -4
  140. package/sui-plugin/.claude-plugin/plugin.json +1 -1
  141. package/sui-plugin/skills/sui-component/SKILL.md +21 -6
  142. package/sui-plugin/skills/sui-component/references/autocomplete.md +54 -46
  143. package/sui-plugin/skills/sui-component/references/avatar-group.md +66 -0
  144. package/sui-plugin/skills/sui-component/references/avatar.md +76 -0
  145. package/sui-plugin/skills/sui-component/references/badge.md +4 -4
  146. package/sui-plugin/skills/sui-component/references/breadcrumbs.md +3 -2
  147. package/sui-plugin/skills/sui-component/references/button.md +13 -13
  148. package/sui-plugin/skills/sui-component/references/calendar.md +1 -1
  149. package/sui-plugin/skills/sui-component/references/cards.md +12 -12
  150. package/sui-plugin/skills/sui-component/references/carousel.md +9 -9
  151. package/sui-plugin/skills/sui-component/references/chip.md +1 -1
  152. package/sui-plugin/skills/sui-component/references/date-picker.md +14 -13
  153. package/sui-plugin/skills/sui-component/references/dialog.md +11 -10
  154. package/sui-plugin/skills/sui-component/references/droppable.md +8 -8
  155. package/sui-plugin/skills/sui-component/references/empty-state.md +104 -0
  156. package/sui-plugin/skills/sui-component/references/expansion-panels.md +1 -1
  157. package/sui-plugin/skills/sui-component/references/file-input.md +106 -0
  158. package/sui-plugin/skills/sui-component/references/form.md +155 -105
  159. package/sui-plugin/skills/sui-component/references/image.md +11 -10
  160. package/sui-plugin/skills/sui-component/references/layout.md +53 -49
  161. package/sui-plugin/skills/sui-component/references/list.md +6 -3
  162. package/sui-plugin/skills/sui-component/references/menu.md +12 -9
  163. package/sui-plugin/skills/sui-component/references/number-input.md +102 -0
  164. package/sui-plugin/skills/sui-component/references/pagination.md +83 -0
  165. package/sui-plugin/skills/sui-component/references/progress.md +20 -18
  166. package/sui-plugin/skills/sui-component/references/sheet.md +8 -8
  167. package/sui-plugin/skills/sui-component/references/skeleton-loader.md +75 -0
  168. package/sui-plugin/skills/sui-component/references/slide-group.md +14 -12
  169. package/sui-plugin/skills/sui-component/references/snackbar.md +7 -5
  170. package/sui-plugin/skills/sui-component/references/split-view.md +2 -2
  171. package/sui-plugin/skills/sui-component/references/table.md +10 -3
  172. package/sui-plugin/skills/sui-component/references/tabs.md +19 -13
  173. package/sui-plugin/skills/sui-component/references/toggle-button-group.md +5 -4
  174. package/sui-plugin/skills/sui-component/references/toolbar.md +5 -5
  175. package/sui-plugin/skills/sui-component/references/tooltip.md +10 -9
  176. package/sui-plugin/skills/sui-component/references/window.md +6 -1
  177. package/sui-plugin/skills/sui-form/SKILL.md +25 -17
  178. package/sui-plugin/skills/sui-getting-started/SKILL.md +32 -7
  179. package/sui-plugin/skills/sui-layout/SKILL.md +3 -1
  180. package/sui-plugin/skills/sui-utilities/docs/classes.md +1 -1
@@ -0,0 +1,31 @@
1
+ /** How SFileInput shows the files it holds. */
2
+ export declare enum FileInputDisplay {
3
+ /** The file names, comma-separated and truncated with an ellipsis. */
4
+ names = "names",
5
+ /** One chip per file. */
6
+ chips = "chips",
7
+ /** The number of files, such as `3 files`; a single file still shows its name. */
8
+ count = "count"
9
+ }
10
+ /** The look of SFileInput. */
11
+ export declare enum FileInputVariant {
12
+ /** A text-field box, like SInput. */
13
+ input = "input",
14
+ /** A large dashed area that also takes files dragged onto it. */
15
+ dropzone = "dropzone"
16
+ }
17
+ /** Bytes in one kilobyte, megabyte step and so on: file sizes use binary units, as file managers do. */
18
+ export declare const fileSizeUnitStep = 1024;
19
+ export declare const fileSizeUnits: string[];
20
+ /** Decimals shown for a size of 1 KB or more: `1.5 MB`. */
21
+ export declare const fileSizeFractionDigits = 1;
22
+ /** Separates the entries of an `accept` string: `.csv,.xlsx,image/*`. */
23
+ export declare const fileAcceptSeparator = ",";
24
+ /** The suffix of an `accept` entry that matches a whole MIME family: `image/*`. */
25
+ export declare const fileAcceptWildcardSuffix = "/*";
26
+ /** Starts an `accept` entry that is a file extension: `.csv`. */
27
+ export declare const fileAcceptExtensionPrefix = ".";
28
+ /** Separates the selected file names in the `names` display. */
29
+ export declare const fileInputNameSeparator = ", ";
30
+ /** The loading spinner's diameter in pixels, the size SAutocomplete's spinner uses. */
31
+ export declare const fileInputLoaderSize = 20;
@@ -3,6 +3,7 @@ export declare const i18nMessages: {
3
3
  table: {
4
4
  itemsPerPage: string;
5
5
  noData: string;
6
+ loading: string;
6
7
  };
7
8
  formRules: {
8
9
  required: string;
@@ -25,6 +26,7 @@ export declare const i18nMessages: {
25
26
  table: {
26
27
  itemsPerPage: string;
27
28
  noData: string;
29
+ loading: string;
28
30
  };
29
31
  formRules: {
30
32
  required: string;
@@ -47,6 +49,7 @@ export declare const i18nMessages: {
47
49
  table: {
48
50
  itemsPerPage: string;
49
51
  noData: string;
52
+ loading: string;
50
53
  };
51
54
  formRules: {
52
55
  required: string;
@@ -18,3 +18,11 @@ export * from './position';
18
18
  export * from './cssVariables';
19
19
  export * from './button';
20
20
  export * from './navigationDrawer';
21
+ export * from './keyboard';
22
+ export * from './listbox';
23
+ export * from './tabs';
24
+ export * from './avatar';
25
+ export * from './pagination';
26
+ export * from './numberInput';
27
+ export * from './skeletonLoader';
28
+ export * from './fileInput';
@@ -0,0 +1,12 @@
1
+ export declare const keyboardKey: {
2
+ readonly arrowDown: "ArrowDown";
3
+ readonly arrowUp: "ArrowUp";
4
+ readonly arrowLeft: "ArrowLeft";
5
+ readonly arrowRight: "ArrowRight";
6
+ readonly home: "Home";
7
+ readonly end: "End";
8
+ readonly enter: "Enter";
9
+ readonly space: " ";
10
+ readonly escape: "Escape";
11
+ readonly tab: "Tab";
12
+ };
@@ -7,4 +7,6 @@ export declare const defaultLayoutSizes: {
7
7
  appBarPosition: Position;
8
8
  appBarHeight: number;
9
9
  footerHeight: number;
10
+ hasLeftSafeArea: boolean;
11
+ hasRightSafeArea: boolean;
10
12
  };
@@ -0,0 +1 @@
1
+ export declare const listboxNoActiveIndex = -1;
@@ -0,0 +1,22 @@
1
+ /** How SNumberInput lays out its increment and decrement buttons. */
2
+ export declare const numberInputControlVariants: readonly ["stacked", "split"];
3
+ /** Layout of the controls when `controlVariant` is not set: both buttons stacked at the end of the field. */
4
+ export declare const numberInputDefaultControlVariant = "stacked";
5
+ /** Amount one increment, decrement or arrow key adds or removes when `step` is not set. */
6
+ export declare const numberInputDefaultStep = 1;
7
+ /** Decimal places kept when `precision` is not set: whole numbers only. */
8
+ export declare const numberInputDefaultPrecision = 0;
9
+ /** Default accessible name of the increment button. */
10
+ export declare const numberInputIncrementLabel = "Increase";
11
+ /** Default accessible name of the decrement button. */
12
+ export declare const numberInputDecrementLabel = "Decrease";
13
+ /** Icon of the increment button. */
14
+ export declare const numberInputIncrementIcon = "mdi-plus";
15
+ /** Icon of the decrement button. */
16
+ export declare const numberInputDecrementIcon = "mdi-minus";
17
+ /** Icon of the increment button when the buttons are stacked. */
18
+ export declare const numberInputStackedIncrementIcon = "mdi-chevron-up";
19
+ /** Icon of the decrement button when the buttons are stacked. */
20
+ export declare const numberInputStackedDecrementIcon = "mdi-chevron-down";
21
+ /** Most decimal places `Number.prototype.toFixed` accepts. */
22
+ export declare const numberInputMaxPrecision = 100;
@@ -1 +1,6 @@
1
1
  export declare const overlaysContainerId = "sAppOverlayContainer";
2
+ export declare const overlayScrollBlockedClassName = "s_overlay__scrollBlocked";
3
+ export declare const overlayViewportGutter = 8;
4
+ export declare const overlayFocusableSelector: string;
5
+ export declare const overlayCloseKey = "Escape";
6
+ export declare const overlayFocusKey = "Tab";
@@ -0,0 +1,20 @@
1
+ /** Marker for a gap in the page list that SPagination draws as "…". */
2
+ export declare const paginationEllipsis = "ellipsis";
3
+ /** Page slots (pages and ellipses together) SPagination shows when `totalVisible` is not set. */
4
+ export declare const paginationDefaultTotalVisible = 7;
5
+ /** Most page slots SPagination shows in compact mode. */
6
+ export declare const paginationCompactMaxVisible = 5;
7
+ /** Fewest slots that fit "first, …, current, …, last". Below it the list is a plain window of pages. */
8
+ export declare const paginationMinEllipsisSlots = 5;
9
+ /** Fewest pages an ellipsis may stand for. Hiding a single page behind "…" saves no space. */
10
+ export declare const paginationMinHiddenPages = 2;
11
+ /** Previous and next buttons, always shown. */
12
+ export declare const paginationStepButtonCount = 2;
13
+ /** First, previous, next and last buttons. */
14
+ export declare const paginationAllButtonCount = 4;
15
+ /** Page shown when no `modelValue` is given. */
16
+ export declare const paginationFirstPage = 1;
17
+ /** Rows per page STablePagination uses when `itemsPerPage` is not set. */
18
+ export declare const tablePaginationDefaultItemsPerPage = 10;
19
+ /** A page item inside SPagination, used to measure how many fit. */
20
+ export declare const paginationSlotSelector = ".s_pagination__slot";
@@ -0,0 +1,33 @@
1
+ /** The presets SSkeletonLoader's `type` string is made of. */
2
+ export declare enum SkeletonLoaderPreset {
3
+ text = "text",
4
+ heading = "heading",
5
+ avatar = "avatar",
6
+ button = "button",
7
+ image = "image",
8
+ card = "card",
9
+ listItem = "list-item",
10
+ listItemAvatar = "list-item-avatar",
11
+ tableRow = "table-row",
12
+ table = "table"
13
+ }
14
+ /** Separates the presets in a `type` string: `'avatar, text'`. */
15
+ export declare const skeletonLoaderTypeSeparator = ",";
16
+ /** Separates a preset from its repeat count: `'text@3'`. */
17
+ export declare const skeletonLoaderRepeatSeparator = "@";
18
+ /** Times a preset is drawn when the `type` string gives no `@N`, or an invalid one. */
19
+ export declare const skeletonLoaderDefaultRepeat = 1;
20
+ /** Most times one preset is drawn, so a typo such as `text@1000` cannot flood the DOM. */
21
+ export declare const skeletonLoaderMaxRepeat = 50;
22
+ /** `type` drawn when the prop resolves to nothing (for example a component default of `undefined`). */
23
+ export declare const skeletonLoaderDefaultType = "text";
24
+ /** Text lines in a `card` preset, under its heading. */
25
+ export declare const skeletonLoaderCardTextLines = 2;
26
+ /** Text lines beside the avatar of a `list-item-avatar` preset. */
27
+ export declare const skeletonLoaderListItemAvatarTextLines = 2;
28
+ /** Cells in a `table-row` preset. */
29
+ export declare const skeletonLoaderTableColumns = 4;
30
+ /** Rows in a `table` preset. */
31
+ export declare const skeletonLoaderTableRows = 5;
32
+ /** Levels SSkeletonLoader's template draws (table → row → cell). A preset must not nest deeper. */
33
+ export declare const skeletonLoaderMaxDepth = 3;
@@ -0,0 +1,10 @@
1
+ /** The element inside STabs that scrolls sideways when the tabs do not fit. */
2
+ export declare const tabsScrollerSelector = ".s_toggleButtonGroup__content";
3
+ /** The selected tab inside STabs. */
4
+ export declare const tabsSelectedTabSelector = ".s_toggleButton--selected";
5
+ /** Sub-pixel slack, in pixels, before STabs counts its row of tabs as scrolled away from an edge. */
6
+ export declare const tabsScrollEdgeTolerance = 1;
7
+ /** Media query under which the STabs scroll arrows (`showArrows`) jump instead of scrolling smoothly. */
8
+ export declare const tabsReducedMotionQuery = "(prefers-reduced-motion: reduce)";
9
+ /** Share of the visible width that one click on an STabs scroll arrow scrolls by. */
10
+ export declare const tabsScrollStepRatio = 0.8;
@@ -1,7 +1,7 @@
1
- import { type RouteLocationRaw } from 'vue-router';
1
+ import type { LinkLocation } from '../../../types';
2
2
  export type PropsLink = {
3
3
  href?: string | null | undefined;
4
4
  target?: '_blank' | '_self' | '_parent' | '_top';
5
5
  rel?: string | null | undefined;
6
- to?: RouteLocationRaw | null | undefined;
6
+ to?: LinkLocation | null | undefined;
7
7
  };
@@ -3,6 +3,8 @@ export * from './propsAlert';
3
3
  export * from './propsApp';
4
4
  export * from './propsAppBar';
5
5
  export * from './propsAutocomplete';
6
+ export * from './propsAvatar';
7
+ export * from './propsAvatarGroup';
6
8
  export * from './propsBadge';
7
9
  export * from './propsBottomNavigation';
8
10
  export * from './propsBreadcrumbs';
@@ -24,7 +26,9 @@ export * from './propsDatePickerItemTitle';
24
26
  export * from './propsDialog';
25
27
  export * from './propsDivider';
26
28
  export * from './propsDroppable';
29
+ export * from './propsEmptyState';
27
30
  export * from './propsExpansionPanels';
31
+ export * from './propsFileInput';
28
32
  export * from './propsFooter';
29
33
  export * from './propsFormInput';
30
34
  export * from './propsIcon';
@@ -39,7 +43,9 @@ export * from './propsListMediaItem';
39
43
  export * from './propsMain';
40
44
  export * from './propsMenu';
41
45
  export * from './propsNavigationDrawer';
46
+ export * from './propsNumberInput';
42
47
  export * from './propsOverlay';
48
+ export * from './propsPagination';
43
49
  export * from './propsProgressCircular';
44
50
  export * from './propsProgressLinear';
45
51
  export * from './propsRadioGroup';
@@ -51,6 +57,7 @@ export * from './propsSingleGroup';
51
57
  export * from './propsSingleGroupItem';
52
58
  export * from './propsSizePreset';
53
59
  export * from './propsSizeUnion';
60
+ export * from './propsSkeletonLoader';
54
61
  export * from './propsSlideGroup';
55
62
  export * from './propsSnackbar';
56
63
  export * from './propsSplitView';
@@ -9,11 +9,19 @@ export type PropsAutocomplete<T extends boolean = false> = {
9
9
  id?: string;
10
10
  /** @description Hides the label, as `hideDetails` does on SSelect. */
11
11
  hideDetails?: boolean;
12
+ /** @description Accessible name when there is no visible `label`; a hidden label is used otherwise. */
13
+ ariaLabel?: string | null;
14
+ /** @description Accessible name of the clear button. Defaults to `'Clear'`. */
15
+ clearAriaLabel?: string;
16
+ /** @description Accessible name of the loading spinner. Defaults to `'Loading'`. */
17
+ loadingAriaLabel?: string;
12
18
  items?: SelectItem[] | string[];
13
19
  filter?: (item: SelectItem, queryText: string) => boolean;
14
20
  /** @description by default, the filter mode is 'contains' */
15
21
  filterMode?: 'start' | 'contains' | 'exact' | 'none' | undefined;
16
22
  debounce?: number;
23
+ /** Message shown in the open menu when no item matches the query (and there is no "Add" option). Without it (and without the `noData` slot) the menu stays blank. Put an `SEmptyState` in the `noData` slot for an icon or an action. */
24
+ noDataText?: string | undefined;
17
25
  multiple?: T;
18
26
  chips?: boolean;
19
27
  closableChips?: boolean;
@@ -0,0 +1,13 @@
1
+ import { type PropsBorder, type PropsColor } from './core';
2
+ import { type PropsSizeUnion } from './propsSizeUnion';
3
+ import { type MaterialDesignIcon } from '../../types';
4
+ export type PropsAvatar = {
5
+ /** Image URL. When it is missing or fails to load, the avatar shows `text`, then `icon`. Do not put an `<img>` in the slot. */
6
+ image?: string | undefined;
7
+ /** Accessible name of the avatar, usually the person's name. Used as the image `alt` and as the `aria-label`. Leave it empty for a decorative avatar. */
8
+ alt?: string | undefined;
9
+ /** Initials shown when there is no image or it fails to load. Keep it to 1–3 characters, such as `JD`, not a full name. */
10
+ text?: string | undefined;
11
+ /** Material Design icon shown when there is neither an image nor text. Defaults to `mdi-account`. */
12
+ icon?: MaterialDesignIcon | undefined;
13
+ } & PropsColor & PropsSizeUnion & Pick<PropsBorder, 'borderRadius' | 'outlined'>;
@@ -0,0 +1,8 @@
1
+ import { type PropsColor } from './core';
2
+ import { type PropsSizeUnion } from './propsSizeUnion';
3
+ export type PropsAvatarGroup = {
4
+ /** The most avatars shown. The rest collapse into one "+N" avatar. Shows every avatar when unset. */
5
+ max?: number | undefined;
6
+ /** Accessible name of the "+N" avatar. `{count}` is replaced with the number of hidden avatars. Defaults to `{count} more`. */
7
+ moreLabel?: string | undefined;
8
+ } & PropsColor & PropsSizeUnion;
@@ -0,0 +1,17 @@
1
+ import { type PropsComponentTheme } from './core';
2
+ import { type PropsSizePreset } from './propsSizePreset';
3
+ import { type MaterialDesignIcon } from '../../types';
4
+ export type PropsEmptyState = {
5
+ /** Material Design icon shown above the title, such as `mdi-inbox-outline`. Ignored when `image` is set. Decorative: hidden from screen readers. */
6
+ icon?: MaterialDesignIcon | undefined;
7
+ /** Illustration URL shown above the title. Wins over `icon`. Decorative (`alt=""`): put the meaning in `title` and `text`. */
8
+ image?: string | undefined;
9
+ /** Short headline, such as `No orders yet`. Rendered as text, not as a heading element. */
10
+ title?: string | undefined;
11
+ /** Supporting sentence under the title that says why it is empty or what to do next. */
12
+ text?: string | undefined;
13
+ /** Label of the built-in action button. The button is shown only when this is set; clicking it emits `action`. */
14
+ actionText?: string | undefined;
15
+ /** Colour of the icon only (preset name or CSS colour), not a background: an empty state has no background of its own. */
16
+ color?: string | null | undefined;
17
+ } & PropsComponentTheme & PropsSizePreset;
@@ -0,0 +1,41 @@
1
+ import { type PropsFormInput } from './propsFormInput';
2
+ import { type PropsSizePreset } from './propsSizePreset';
3
+ import { type FileInputDisplayType, type FileInputVariantType } from '../../types';
4
+ export type PropsFileInput = {
5
+ /** Visible label above the field, tied to the file input. With `hideDetails` it is hidden and becomes the `aria-label`, as in SInput. */
6
+ label?: string | undefined;
7
+ /** Text shown in the field while no file is chosen. */
8
+ placeholder?: string | undefined;
9
+ /** Accessible name when there is no visible `label`; wins over `label`. */
10
+ ariaLabel?: string | undefined;
11
+ /** Id of the element that names the file input. */
12
+ ariaLabelledby?: string | undefined;
13
+ /** The native input's `name`, so a plain `<form>` submit sends the files. */
14
+ name?: string | undefined;
15
+ /** Allow several files. The model is always a `File[]` (or `null` when empty), even for one file. */
16
+ multiple?: boolean | undefined;
17
+ /** Allowed types in the native format: `.csv,.xlsx`, `image/*`, `application/pdf`. Dropped files that do not match are rejected (the `reject` event). */
18
+ accept?: string | undefined;
19
+ /** How the chosen files are shown: their names, one chip each, or a count such as `3 files`. */
20
+ display?: FileInputDisplayType | undefined;
21
+ /** `input`: a text-field box. `dropzone`: a large area that also takes dragged files. */
22
+ variant?: FileInputVariantType | undefined;
23
+ /** Show a button that clears the chosen files. */
24
+ clearable?: boolean | undefined;
25
+ /** Accessible name of the clear button. */
26
+ clearAriaLabel?: string | undefined;
27
+ /** Show each file's size next to its name. */
28
+ showSize?: boolean | undefined;
29
+ /** Show a spinner and block picking, e.g. while the chosen file uploads or is parsed. */
30
+ loading?: boolean | undefined;
31
+ /** Accessible name of the loading spinner. */
32
+ loadingAriaLabel?: string | undefined;
33
+ /** The `count` display text for several files; `{count}` is replaced by the number. */
34
+ countText?: string | undefined;
35
+ /** The `dropzone` variant's call to action. */
36
+ dropText?: string | undefined;
37
+ /** Material Design icon before the selection (`input`) or above the text (`dropzone`); `''` hides it. */
38
+ icon?: string | undefined;
39
+ /** Smaller paddings, as SInput's `dense`. */
40
+ dense?: boolean | undefined;
41
+ } & PropsSizePreset & PropsFormInput;
@@ -26,6 +26,7 @@ export type PropsInput = {
26
26
  tile?: boolean;
27
27
  minlength?: string | number | null;
28
28
  maxlength?: string | number | null;
29
+ ariaLabel?: string;
29
30
  ariaLabelledby?: string;
30
31
  name?: string;
31
32
  isPasteDisabled?: boolean;
@@ -1,7 +1,7 @@
1
- import type { RouteLocationRaw } from 'vue-router';
1
+ import type { LinkLocation } from '../../types';
2
2
  export type PropsLink = {
3
3
  href?: string;
4
4
  target?: '_blank' | '_self' | '_parent' | '_top';
5
5
  rel?: string;
6
- to?: RouteLocationRaw | null | undefined;
6
+ to?: LinkLocation | null | undefined;
7
7
  };
@@ -0,0 +1,46 @@
1
+ import { type PropsFormInput } from './propsFormInput';
2
+ import { type PropsSizePreset } from './propsSizePreset';
3
+ import { type NumberInputControlVariant } from '../../types';
4
+ export type PropsNumberInput = {
5
+ /** Text above the field. With `hideDetails` it is hidden and becomes the field's `aria-label`. */
6
+ label?: string | undefined | null;
7
+ /** Hint shown while the field is empty. */
8
+ placeholder?: string | undefined | null;
9
+ /** Lowest allowed value. A lower value is clamped up to it on blur, and the decrement button stops there. */
10
+ min?: number | string | undefined | null;
11
+ /** Highest allowed value. A higher value is clamped down to it on blur, and the increment button stops there. */
12
+ max?: number | string | undefined | null;
13
+ /** Amount the buttons and the ArrowUp / ArrowDown keys add or remove. Default `1`. */
14
+ step?: number | string | undefined | null;
15
+ /**
16
+ * Decimal places the value keeps. Default `0` (whole numbers; typing `.` is refused). Use `2` for money.
17
+ * `null` allows any number of decimals. The field shows exactly this many decimals once it loses focus.
18
+ */
19
+ precision?: number | null | undefined;
20
+ /** Layout of the buttons: `stacked` (both at the end of the field, default) or `split` (minus first, plus last). */
21
+ controlVariant?: NumberInputControlVariant | undefined | null;
22
+ /** Hides the increment and decrement buttons; the arrow keys still step the value. */
23
+ hideControls?: boolean | undefined | null;
24
+ /** Text inside the field before the number, such as a currency sign. */
25
+ prefix?: string | undefined | null;
26
+ /** Text inside the field after the number, such as `%` or a unit. */
27
+ suffix?: string | undefined | null;
28
+ /** Aligns the number to the right, as in a column of amounts. */
29
+ textRight?: boolean | undefined | null;
30
+ /** Focuses the field when it mounts. */
31
+ autofocus?: boolean | undefined | null;
32
+ /** Name submitted with a native form. */
33
+ name?: string | undefined;
34
+ /** Accessible name when the visible `label` is not enough (or absent); with `hideDetails` the label is used. */
35
+ ariaLabel?: string | undefined;
36
+ /** Id of the element that names the field, instead of `label`. */
37
+ ariaLabelledby?: string | undefined;
38
+ /** Accessible name of the increment button. Default `Increase`. */
39
+ incrementAriaLabel?: string | undefined;
40
+ /** Accessible name of the decrement button. Default `Decrease`. */
41
+ decrementAriaLabel?: string | undefined;
42
+ /** Smaller padding, as on SInput. */
43
+ dense?: boolean | undefined;
44
+ /** Removes the rounded corners. */
45
+ tile?: boolean | undefined;
46
+ } & PropsSizePreset & PropsFormInput;
@@ -0,0 +1,32 @@
1
+ import { type PropsColor, type PropsDisabled } from './core';
2
+ import { type PropsSizePreset } from './propsSizePreset';
3
+ export type PropsPagination = {
4
+ /** Current page, starting at 1. Use `v-model`. Values outside `1…length` are clamped. Defaults to `1`. */
5
+ modelValue?: number | undefined;
6
+ /** Number of pages (not the number of rows): `Math.ceil(totalItems / itemsPerPage)`. */
7
+ length: number;
8
+ /**
9
+ * Most slots to show, pages and ellipses together (not counting the arrow buttons). Hidden pages become "…",
10
+ * and the first and last page stay visible. Defaults to `7`.
11
+ */
12
+ totalVisible?: number | undefined;
13
+ /** Shows the first-page and last-page buttons beside the previous and next buttons. Hidden in compact mode. */
14
+ showFirstLastPage?: boolean | undefined;
15
+ /**
16
+ * Compact mode: no first/last buttons and at most 5 page slots. Leave it unset and SPagination switches to it
17
+ * by itself when the full list does not fit its width (on a phone, for example). `true` or `false` forces it.
18
+ */
19
+ compact?: boolean | undefined;
20
+ /** Accessible name of the `<nav>` landmark. Defaults to `'Pagination'`. */
21
+ ariaLabel?: string | undefined;
22
+ /** Accessible name of a page button, followed by its number: `'Page'` gives "Page 3". Defaults to `'Page'`. */
23
+ pageAriaLabel?: string | undefined;
24
+ /** Accessible name of the first-page button. Defaults to `'First page'`. */
25
+ firstAriaLabel?: string | undefined;
26
+ /** Accessible name of the previous-page button. Defaults to `'Previous page'`. */
27
+ prevAriaLabel?: string | undefined;
28
+ /** Accessible name of the next-page button. Defaults to `'Next page'`. */
29
+ nextAriaLabel?: string | undefined;
30
+ /** Accessible name of the last-page button. Defaults to `'Last page'`. */
31
+ lastAriaLabel?: string | undefined;
32
+ } & Pick<PropsDisabled, 'disabled'> & PropsColor & PropsSizePreset;
@@ -5,4 +5,6 @@ export type PropsProgressCircular = PropsTextColor & PropsComponentTheme & {
5
5
  rotate?: number;
6
6
  width?: number;
7
7
  value?: number;
8
+ /** Accessible name of the progress bar. Defaults to `'Loading'`; name what is loading when you can. */
9
+ ariaLabel?: string;
8
10
  };
@@ -6,4 +6,6 @@ export interface PropsProgressLinear extends PropsPosition {
6
6
  size?: string | number | null;
7
7
  indeterminate?: boolean;
8
8
  value?: number | string;
9
+ /** Accessible name of the progress bar. Defaults to `'Loading'`; name what is loading when you can. */
10
+ ariaLabel?: string;
9
11
  }
@@ -5,6 +5,7 @@ export type PropsRow = PropsContent & {
5
5
  align?: GridAlignPropertyType | null | undefined;
6
6
  justify?: GridJustifyPropertyType | null | undefined;
7
7
  fillHeight?: boolean | null | undefined;
8
+ /** Removes the row's own padding; columns keep theirs. Pair with `gap` to line the grid up with text beside it. */
8
9
  noOuterGutters?: boolean | null | undefined;
9
10
  dense?: boolean | null | undefined;
10
11
  gap?: number | string | null | undefined;
@@ -6,8 +6,14 @@ export type PropsSelect = {
6
6
  name?: string | null;
7
7
  items?: Array<SelectItem | string | undefined | null>;
8
8
  label?: string | null;
9
+ /** Text shown in the field while nothing is selected. The label is never repeated inside the field. */
10
+ placeholder?: string | null;
11
+ /** Accessible name when there is no visible `label` (otherwise the label names the field). */
12
+ ariaLabel?: string | null;
9
13
  dense?: boolean;
10
14
  grow?: boolean;
11
15
  text?: boolean;
12
16
  divided?: boolean;
17
+ /** Message shown in the open menu when `items` is empty. Without it (and without the `noData` slot) an empty menu stays blank. Put an `SEmptyState` in the `noData` slot for an icon or an action. */
18
+ noDataText?: string | undefined;
13
19
  } & PropsBorder & PropsMenu & PropsFormInput & PropsContent & PropsColor;
@@ -0,0 +1,18 @@
1
+ import { type PropsComponentTheme, type PropsMeasurableStyles } from './core';
2
+ export type PropsSkeletonLoader = {
3
+ /**
4
+ * What to draw: presets joined by commas, each with an optional `@N` repeat count. Presets: `text`, `heading`,
5
+ * `avatar`, `button`, `image`, `card`, `list-item`, `list-item-avatar`, `table-row`, `table`. Example:
6
+ * `'avatar, text@3'`. Unknown presets are ignored. Defaults to `'text'`.
7
+ */
8
+ type?: string | undefined;
9
+ /**
10
+ * Shows the skeleton while `true` and the default slot once `false`. Without a default slot the skeleton is always
11
+ * shown, so a standalone `<SSkeletonLoader type="card" />` needs no `loading`.
12
+ */
13
+ loading?: boolean | undefined;
14
+ /** Draws still bones, without the shimmer animation (the shimmer also stops for `prefers-reduced-motion`). */
15
+ boilerplate?: boolean | undefined;
16
+ /** Accessible name announced while the skeleton is shown. Defaults to `'Loading…'`. */
17
+ loadingText?: string | undefined;
18
+ } & PropsComponentTheme & PropsMeasurableStyles;
@@ -8,4 +8,8 @@ export type PropsSlideGroup = {
8
8
  activeClass?: string | null | undefined;
9
9
  slideStep?: number | null | undefined;
10
10
  scrollable?: boolean | null | undefined;
11
+ /** Accessible name of the previous arrow button. Defaults to `'Previous'`. */
12
+ prevAriaLabel?: string;
13
+ /** Accessible name of the next arrow button. Defaults to `'Next'`. */
14
+ nextAriaLabel?: string;
11
15
  } & PropsGroup & PropsContent;
@@ -55,4 +55,5 @@ export type PropsTable<T extends TableItem = TableItem, C extends string = keyof
55
55
  totalItems?: number | undefined;
56
56
  itemsPerPageLabel?: string | undefined;
57
57
  noDataText?: string | undefined;
58
+ loadingText?: string | undefined;
58
59
  };
@@ -9,4 +9,8 @@ export type PropsTabs = {
9
9
  bordered?: boolean;
10
10
  selectedTabColor?: string;
11
11
  shrink?: boolean;
12
+ /** Lay the tabs out on several rows when they do not fit, instead of one row that scrolls sideways. */
13
+ wrap?: boolean;
14
+ /** Show a scroll arrow at each end of the row that hides tabs (pointer only; the row still swipes). Ignored with `wrap`. */
15
+ showArrows?: boolean;
12
16
  } & PropsBorder;
@@ -15,6 +15,9 @@ export type PropsTextarea<T extends FormInputModelValue = string> = {
15
15
  simple?: boolean | undefined;
16
16
  minlength?: string | number | undefined;
17
17
  maxlength?: string | number | undefined;
18
+ /** Shows the character count (`12 / 200` with `maxlength`) at the right of the error line, right under the field. */
19
+ counter?: boolean | undefined;
20
+ ariaLabel?: string | undefined;
18
21
  ariaLabelledby?: string | undefined;
19
22
  name?: string | undefined;
20
23
  dense?: boolean | undefined;
@@ -1,3 +1,3 @@
1
1
  import { CssColor } from '../constants';
2
2
  export declare const getCssColor: (color: string) => CssColor | undefined;
3
- export declare const getCssColorHex: (color: string) => "#F0F8FF" | "#FAEBD7" | "#00FFFF" | "#7FFFD4" | "#F0FFFF" | "#F5F5DC" | "#FFE4C4" | "#000000" | "#FFEBCD" | "#0000FF" | "#8A2BE2" | "#A52A2A" | "#DEB887" | "#2196F3" | "#5F9EA0" | "#7FFF00" | "#CCCCCC" | "#D2691E" | "#FF7F50" | "#6495ED" | "#FFF8DC" | "#DC143C" | "#00008B" | "#008B8B" | "#B8860B" | "#A9A9A9" | "#006400" | "#BDB76B" | "#8B008B" | "#556B2F" | "#FF8C00" | "#9932CC" | "#8B0000" | "#E9967A" | "#8FBC8F" | "#483D8B" | "#2F4F4F" | "#00CED1" | "#9400D3" | "#FF1493" | "#00BFFF" | "#696969" | "#1E90FF" | "#B22222" | "#FFFAF0" | "#228B22" | "#FF00FF" | "#DCDCDC" | "#F8F8FF" | "#FFD700" | "#DAA520" | "#808080" | "#008000" | "#ADFF2F" | "#F0FFF0" | "#FF69B4" | "#CD5C5C" | "#4B0082" | "#FFFFF0" | "#F0E68C" | "#E6E6FA" | "#FFF0F5" | "#7CFC00" | "#FFFACD" | "#ADD8E6" | "#F08080" | "#E0FFFF" | "#FAFAD2" | "#D3D3D3" | "#90EE90" | "#FFB6C1" | "#FFA07A" | "#20B2AA" | "#87CEFA" | "#778899" | "#B0C4DE" | "#FFFFE0" | "#00FF00" | "#32CD32" | "#FAF0E6" | "#800000" | "#66CDAA" | "#0000CD" | "#BA55D3" | "#9370DB" | "#3CB371" | "#7B68EE" | "#00FA9A" | "#48D1CC" | "#C71585" | "#191970" | "#F5FFFA" | "#FFE4E1" | "#FFE4B5" | "#FFDEAD" | "#000080" | "#FDF5E6" | "#808000" | "#6B8E23" | "#FFA500" | "#FF4500" | "#DA70D6" | "#EEE8AA" | "#98FB98" | "#AFEEEE" | "#DB7093" | "#FFEFD5" | "#FFDAB9" | "#CD853F" | "#FFC0CB" | "#DDA0DD" | "#B0E0E6" | "#800080" | "#663399" | "#FF0000" | "#BC8F8F" | "#4169E1" | "#8B4513" | "#FA8072" | "#F4A460" | "#2E8B57" | "#FFF5EE" | "#A0522D" | "#C0C0C0" | "#87CEEB" | "#6A5ACD" | "#708090" | "#FFFAFA" | "#00FF7F" | "#4682B4" | "#D2B48C" | "#008080" | "#D8BFD8" | "#FF6347" | "#40E0D0" | "#EE82EE" | "#F5DEB3" | "#FFFFFF" | "#F5F5F5" | "#FFFF00" | "#9ACD32" | undefined;
3
+ export declare const getCssColorHex: (color: string) => "#000000" | "#F0F8FF" | "#FAEBD7" | "#00FFFF" | "#7FFFD4" | "#F0FFFF" | "#F5F5DC" | "#FFE4C4" | "#FFEBCD" | "#0000FF" | "#8A2BE2" | "#A52A2A" | "#DEB887" | "#2196F3" | "#5F9EA0" | "#7FFF00" | "#CCCCCC" | "#D2691E" | "#FF7F50" | "#6495ED" | "#FFF8DC" | "#DC143C" | "#00008B" | "#008B8B" | "#B8860B" | "#A9A9A9" | "#006400" | "#BDB76B" | "#8B008B" | "#556B2F" | "#FF8C00" | "#9932CC" | "#8B0000" | "#E9967A" | "#8FBC8F" | "#483D8B" | "#2F4F4F" | "#00CED1" | "#9400D3" | "#FF1493" | "#00BFFF" | "#696969" | "#1E90FF" | "#B22222" | "#FFFAF0" | "#228B22" | "#FF00FF" | "#DCDCDC" | "#F8F8FF" | "#FFD700" | "#DAA520" | "#808080" | "#008000" | "#ADFF2F" | "#F0FFF0" | "#FF69B4" | "#CD5C5C" | "#4B0082" | "#FFFFF0" | "#F0E68C" | "#E6E6FA" | "#FFF0F5" | "#7CFC00" | "#FFFACD" | "#ADD8E6" | "#F08080" | "#E0FFFF" | "#FAFAD2" | "#D3D3D3" | "#90EE90" | "#FFB6C1" | "#FFA07A" | "#20B2AA" | "#87CEFA" | "#778899" | "#B0C4DE" | "#FFFFE0" | "#00FF00" | "#32CD32" | "#FAF0E6" | "#800000" | "#66CDAA" | "#0000CD" | "#BA55D3" | "#9370DB" | "#3CB371" | "#7B68EE" | "#00FA9A" | "#48D1CC" | "#C71585" | "#191970" | "#F5FFFA" | "#FFE4E1" | "#FFE4B5" | "#FFDEAD" | "#000080" | "#FDF5E6" | "#808000" | "#6B8E23" | "#FFA500" | "#FF4500" | "#DA70D6" | "#EEE8AA" | "#98FB98" | "#AFEEEE" | "#DB7093" | "#FFEFD5" | "#FFDAB9" | "#CD853F" | "#FFC0CB" | "#DDA0DD" | "#B0E0E6" | "#800080" | "#663399" | "#FF0000" | "#BC8F8F" | "#4169E1" | "#8B4513" | "#FA8072" | "#F4A460" | "#2E8B57" | "#FFF5EE" | "#A0522D" | "#C0C0C0" | "#87CEEB" | "#6A5ACD" | "#708090" | "#FFFAFA" | "#00FF7F" | "#4682B4" | "#D2B48C" | "#008080" | "#D8BFD8" | "#FF6347" | "#40E0D0" | "#EE82EE" | "#F5DEB3" | "#FFFFFF" | "#F5F5F5" | "#FFFF00" | "#9ACD32" | undefined;
@@ -20,6 +20,8 @@ export declare const createAppStore: <T extends string = "sui">(name: T, config?
20
20
  title: string;
21
21
  text: string;
22
22
  textErrorHover: string;
23
+ textError: string;
24
+ focusRing: string;
23
25
  secondaryText: string;
24
26
  anchor: string;
25
27
  background: string;
@@ -49,6 +51,8 @@ export declare const createAppStore: <T extends string = "sui">(name: T, config?
49
51
  title: string;
50
52
  text: string;
51
53
  textErrorHover: string;
54
+ textError: string;
55
+ focusRing: string;
52
56
  secondaryText: string;
53
57
  anchor: string;
54
58
  background: string;
@@ -0,0 +1,18 @@
1
+ import type { FileInputRuleOptions, FormInputModelValue, FormInputModelValueRule } from '../types';
2
+ /** A byte count as a short text: `512 B`, `1.5 KB`, `5 MB`. */
3
+ export declare const formatFileSize: (bytes: number) => string;
4
+ /**
5
+ * Whether a file matches an `accept` string, the way the browser's picker filters: an extension (`.csv`), a MIME
6
+ * type (`application/pdf`) or a MIME family (`image/*`). An empty or missing `accept` accepts every file.
7
+ */
8
+ export declare const getIsFileAccepted: (file: File, accept?: string | null) => boolean;
9
+ /** The files held by a form value: SFileInput's `File[]`, or nothing for any other value. */
10
+ export declare const getFilesOfValue: (value?: FormInputModelValue | null) => File[];
11
+ /**
12
+ * Validation rules for SFileInput's `rules` prop: required, a size limit, an `accept` type check (a dropped file
13
+ * skips the picker's filter) and a file count limit. Pure: no i18n, pass `messages` to translate the texts.
14
+ * The texts that name a file are HTML-escaped, because the error line renders HTML and a file name is user input.
15
+ *
16
+ * @example <SFileInput v-model="files" accept=".csv,.xlsx" :rules="getFileInputRules({ maxSize: 5 * 1024 * 1024, accept: '.csv,.xlsx' })" />
17
+ */
18
+ export declare const getFileInputRules: (options: FileInputRuleOptions) => FormInputModelValueRule[];
@@ -4,3 +4,4 @@ export * from './themeHelpers';
4
4
  export * from './tableHelpers';
5
5
  export * from './autocompleteHelpers';
6
6
  export * from './selectItemHelpers';
7
+ export * from './fileInputRules';