@khsura/sui 1.19.0 → 1.20.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 (117) hide show
  1. package/@types/components/cards/sCardText.vue.d.ts +2 -2
  2. package/@types/components/datePicker/sDatePickerSwitch.vue.d.ts +2 -0
  3. package/@types/components/form/index.d.ts +1 -0
  4. package/@types/components/form/radio/sRadio.vue.d.ts +3 -0
  5. package/@types/components/form/sFormRow.vue.d.ts +18 -0
  6. package/@types/components/form/sInput.vue.d.ts +1 -0
  7. package/@types/components/form/sSelect.vue.d.ts +2 -0
  8. package/@types/components/layout/sNavigationDrawer.vue.d.ts +6 -6
  9. package/@types/components/progress/sProgressCircular.vue.d.ts +1 -0
  10. package/@types/components/progress/sProgressLinear.vue.d.ts +1 -0
  11. package/@types/components/sAutocomplete.vue.d.ts +3 -0
  12. package/@types/components/slideGroup/sSlideGroup.vue.d.ts +4 -1
  13. package/@types/components/table/sTable.vue.d.ts +2 -0
  14. package/@types/components/tabs/sTabs.vue.d.ts +2 -2
  15. package/@types/configs/app.d.ts +4 -0
  16. package/@types/configs/i18n.d.ts +3 -0
  17. package/@types/configs/provider.d.ts +1 -0
  18. package/@types/constants/color.d.ts +15 -0
  19. package/@types/constants/cssVariables.d.ts +4 -0
  20. package/@types/constants/datePicker.d.ts +7 -0
  21. package/@types/constants/i18n.d.ts +3 -0
  22. package/@types/constants/index.d.ts +3 -0
  23. package/@types/constants/keyboard.d.ts +12 -0
  24. package/@types/constants/listbox.d.ts +1 -0
  25. package/@types/constants/overlay.d.ts +5 -0
  26. package/@types/constants/tabs.d.ts +4 -0
  27. package/@types/definitions/props/core/propsLink.d.ts +2 -2
  28. package/@types/definitions/props/propsAutocomplete.d.ts +6 -0
  29. package/@types/definitions/props/propsInput.d.ts +1 -0
  30. package/@types/definitions/props/propsLink.d.ts +2 -2
  31. package/@types/definitions/props/propsProgressCircular.d.ts +2 -0
  32. package/@types/definitions/props/propsProgressLinear.d.ts +2 -0
  33. package/@types/definitions/props/propsSelect.d.ts +4 -0
  34. package/@types/definitions/props/propsSlideGroup.d.ts +4 -0
  35. package/@types/definitions/props/propsTable.d.ts +1 -0
  36. package/@types/definitions/props/propsTextarea.d.ts +3 -0
  37. package/@types/helpers/colorHelpers.d.ts +1 -1
  38. package/@types/helpers/createAppStore.d.ts +4 -0
  39. package/@types/lib/color.d.ts +21 -2
  40. package/@types/lib/index.d.ts +4 -0
  41. package/@types/lib/linkLocation.d.ts +9 -0
  42. package/@types/lib/overlayPlacement.d.ts +11 -0
  43. package/@types/lib/revealInScroller.d.ts +11 -0
  44. package/@types/lib/safeArea.d.ts +3 -0
  45. package/@types/playwright.visual.config.d.ts +3 -0
  46. package/@types/services/backgroundScrollService.d.ts +8 -2
  47. package/@types/services/datePicker/datePickerItemDateService.d.ts +1 -0
  48. package/@types/services/dialogService.d.ts +4 -8
  49. package/@types/services/fieldLayoutService.d.ts +19 -0
  50. package/@types/services/formInputService.d.ts +6 -0
  51. package/@types/services/index.d.ts +7 -0
  52. package/@types/services/linkService.d.ts +11 -1
  53. package/@types/services/listboxNavigationService.d.ts +20 -0
  54. package/@types/services/menuService.d.ts +2 -0
  55. package/@types/services/overlayFocusService.d.ts +10 -0
  56. package/@types/services/routerLinkService.d.ts +19 -0
  57. package/@types/services/scrollableFocusService.d.ts +10 -0
  58. package/@types/services/surfaceTextColorService.d.ts +8 -0
  59. package/@types/services/tabsService.d.ts +9 -0
  60. package/@types/store/index.d.ts +1 -0
  61. package/@types/store/scrollLockStore.d.ts +1 -0
  62. package/@types/tests/visual/constants/a11yAudit.d.ts +4 -0
  63. package/@types/tests/visual/constants/index.d.ts +4 -0
  64. package/@types/tests/visual/constants/resizeScroll.d.ts +10 -0
  65. package/@types/tests/visual/constants/storyRender.d.ts +5 -0
  66. package/@types/tests/visual/constants/visualMatrix.d.ts +20 -0
  67. package/@types/tests/visual/schemas/index.d.ts +1 -0
  68. package/@types/tests/visual/schemas/storyIndex.d.ts +17 -0
  69. package/@types/tests/visual/types/a11yAudit.d.ts +2 -0
  70. package/@types/tests/visual/types/index.d.ts +2 -0
  71. package/@types/tests/visual/types/visualStory.d.ts +8 -0
  72. package/@types/types/app.d.ts +2 -0
  73. package/@types/types/breadcrumbs.d.ts +2 -2
  74. package/@types/types/index.d.ts +2 -0
  75. package/@types/types/link.d.ts +20 -0
  76. package/@types/types/menu.d.ts +17 -0
  77. package/@types/types/safeArea.d.ts +1 -0
  78. package/@types/vite.config.d.ts +1 -0
  79. package/README.md +12 -0
  80. package/dist/base.css.map +1 -1
  81. package/dist/s-ui.css +1 -1
  82. package/dist/s-ui.js +3122 -2478
  83. package/dist/s-ui.umd.cjs +1 -1
  84. package/dist/styles/components/button/mixins.scss +5 -0
  85. package/dist/styles/components/form/_variables.scss +11 -0
  86. package/dist/styles/components/form/index.scss +1 -0
  87. package/dist/styles/components/index.scss +1 -0
  88. package/dist/styles/mixins/_app.scss +7 -0
  89. package/dist/styles/tools/_safeArea.scss +8 -0
  90. package/dist/styles/tools/index.scss +1 -0
  91. package/dist/sui-api.json +115 -5
  92. package/package.json +13 -3
  93. package/sui-plugin/.claude-plugin/plugin.json +1 -1
  94. package/sui-plugin/skills/sui-component/SKILL.md +11 -3
  95. package/sui-plugin/skills/sui-component/references/autocomplete.md +6 -1
  96. package/sui-plugin/skills/sui-component/references/breadcrumbs.md +3 -2
  97. package/sui-plugin/skills/sui-component/references/button.md +2 -2
  98. package/sui-plugin/skills/sui-component/references/cards.md +3 -3
  99. package/sui-plugin/skills/sui-component/references/date-picker.md +2 -1
  100. package/sui-plugin/skills/sui-component/references/dialog.md +3 -2
  101. package/sui-plugin/skills/sui-component/references/expansion-panels.md +1 -1
  102. package/sui-plugin/skills/sui-component/references/form.md +143 -95
  103. package/sui-plugin/skills/sui-component/references/image.md +3 -2
  104. package/sui-plugin/skills/sui-component/references/layout.md +7 -6
  105. package/sui-plugin/skills/sui-component/references/list.md +5 -2
  106. package/sui-plugin/skills/sui-component/references/menu.md +4 -1
  107. package/sui-plugin/skills/sui-component/references/progress.md +20 -18
  108. package/sui-plugin/skills/sui-component/references/slide-group.md +14 -12
  109. package/sui-plugin/skills/sui-component/references/snackbar.md +4 -2
  110. package/sui-plugin/skills/sui-component/references/table.md +8 -2
  111. package/sui-plugin/skills/sui-component/references/tabs.md +3 -0
  112. package/sui-plugin/skills/sui-component/references/tooltip.md +1 -0
  113. package/sui-plugin/skills/sui-component/references/window.md +5 -0
  114. package/sui-plugin/skills/sui-form/SKILL.md +20 -15
  115. package/sui-plugin/skills/sui-getting-started/SKILL.md +32 -7
  116. package/sui-plugin/skills/sui-layout/SKILL.md +3 -1
  117. package/sui-plugin/skills/sui-utilities/docs/classes.md +1 -1
@@ -1,8 +1,8 @@
1
1
  import { type PropsTag } from '../../definitions';
2
2
  type __VLS_Props = PropsTag;
3
- declare var __VLS_8: {};
3
+ declare var __VLS_9: {};
4
4
  type __VLS_Slots = {} & {
5
- default?: (props: typeof __VLS_8) => any;
5
+ default?: (props: typeof __VLS_9) => any;
6
6
  };
7
7
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
8
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -10,6 +10,8 @@ declare const __VLS_export: import("vue").DefineComponent<PropsDatePickerItemSwi
10
10
  }>, {
11
11
  nextIcon: import("../..").MaterialDesignIcon;
12
12
  prevIcon: import("../..").MaterialDesignIcon;
13
+ prevAriaLabel: string | null;
14
+ nextAriaLabel: string | null;
13
15
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
16
  declare const _default: typeof __VLS_export;
15
17
  export default _default;
@@ -2,6 +2,7 @@ export * from './common';
2
2
  export * from './radio';
3
3
  export { default as SCheckbox } from './sCheckbox.vue';
4
4
  export { default as SForm } from './sForm.vue';
5
+ export { default as SFormRow } from './sFormRow.vue';
5
6
  export { default as SInput } from './sInput.vue';
6
7
  export { default as SSelect } from './sSelect.vue';
7
8
  export { default as STextarea } from './sTextarea.vue';
@@ -4,6 +4,9 @@ type __VLS_Props = {
4
4
  id?: string;
5
5
  name?: string | null;
6
6
  label?: string | null;
7
+ /** Accessible name for a radio without a visible `label` (for example an icon-only option). */
8
+ ariaLabel?: string | null;
9
+ /** @deprecated The option is a native radio inside a label now; `type` has no effect. */
7
10
  type?: ButtonTypeType;
8
11
  } & PropsDisabled & PropsSingleGroupItem & PropsBorder;
9
12
  declare var __VLS_1: {
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Lines up text fields (`SInput`, `SSelect`, `SDatePickerInput`, `SAutocomplete`, `STextarea`) and the buttons
3
+ * next to them in one wrapping row. Each button's top and bottom match the field box, not the field's label or
4
+ * its error line, with or without a label and while an error shows.
5
+ */
6
+ type __VLS_Slots = {
7
+ /** The fields and buttons of the row. */
8
+ default?: () => unknown;
9
+ };
10
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
11
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
14
+ type __VLS_WithSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
@@ -24,6 +24,7 @@ declare const __VLS_export: <T extends string | number = string | number>(__VLS_
24
24
  tile?: boolean;
25
25
  minlength?: string | number | null;
26
26
  maxlength?: string | number | null;
27
+ ariaLabel?: string;
27
28
  ariaLabelledby?: string;
28
29
  name?: string;
29
30
  isPasteDisabled?: boolean;
@@ -4,6 +4,8 @@ declare const __VLS_export: <T extends string | number = string | number>(__VLS_
4
4
  name?: string | null;
5
5
  items?: Array<SelectItem | string | undefined | null>;
6
6
  label?: string | null;
7
+ placeholder?: string | null;
8
+ ariaLabel?: string | null;
7
9
  dense?: boolean;
8
10
  grow?: boolean;
9
11
  text?: boolean;
@@ -4,24 +4,24 @@ type __VLS_ModelProps = {
4
4
  modelValue?: boolean;
5
5
  };
6
6
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
7
- declare var __VLS_22: {
7
+ declare var __VLS_27: {
8
8
  class: string;
9
- }, __VLS_24: {
9
+ }, __VLS_29: {
10
10
  on: {
11
11
  click: () => void;
12
12
  transitionend: (e: Event) => void;
13
13
  mouseenter: () => void;
14
14
  mouseleave: () => void;
15
15
  };
16
- }, __VLS_26: {
16
+ }, __VLS_31: {
17
17
  class: string;
18
18
  };
19
19
  type __VLS_Slots = {} & {
20
- prepend?: (props: typeof __VLS_22) => any;
20
+ prepend?: (props: typeof __VLS_27) => any;
21
21
  } & {
22
- default?: (props: typeof __VLS_24) => any;
22
+ default?: (props: typeof __VLS_29) => any;
23
23
  } & {
24
- append?: (props: typeof __VLS_26) => any;
24
+ append?: (props: typeof __VLS_31) => any;
25
25
  };
26
26
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
27
27
  "update:modelValue": (value: boolean | undefined) => any;
@@ -7,6 +7,7 @@ declare const __VLS_base: import("vue").DefineComponent<PropsProgressCircular, {
7
7
  value: number;
8
8
  size: number | string;
9
9
  width: number;
10
+ ariaLabel: string;
10
11
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
12
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
12
13
  declare const _default: typeof __VLS_export;
@@ -6,6 +6,7 @@ type __VLS_Slots = {} & {
6
6
  declare const __VLS_base: import("vue").DefineComponent<PropsProgressLinear, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PropsProgressLinear> & Readonly<{}>, {
7
7
  value: number | string;
8
8
  color: string;
9
+ ariaLabel: string;
9
10
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
11
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
12
  declare const _default: typeof __VLS_export;
@@ -5,6 +5,9 @@ declare const __VLS_export: <T extends boolean = false>(__VLS_props: NonNullable
5
5
  label?: string | null;
6
6
  id?: string;
7
7
  hideDetails?: boolean;
8
+ ariaLabel?: string | null;
9
+ clearAriaLabel?: string;
10
+ loadingAriaLabel?: string;
8
11
  items?: import("../index.ts").SelectItem[] | string[];
9
12
  filter?: (item: import("../index.ts").SelectItem, queryText: string) => boolean;
10
13
  filterMode?: "start" | "contains" | "exact" | "none" | undefined;
@@ -31,7 +31,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
31
31
  "update:modelValue": (value: GroupItemValue[]) => any;
32
32
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
33
33
  "onUpdate:modelValue"?: ((value: GroupItemValue[]) => any) | undefined;
34
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
+ }>, {
35
+ prevAriaLabel: string;
36
+ nextAriaLabel: string;
37
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
35
38
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
36
39
  declare const _default: typeof __VLS_export;
37
40
  export default _default;
@@ -45,6 +45,8 @@ declare const __VLS_export: <T extends TableItem>(__VLS_props: NonNullable<Await
45
45
  }) => void;
46
46
  /** Shown instead of the rows when `items` is empty and not loading. */
47
47
  noData?: () => void;
48
+ /** Shown instead of the rows while `loading` is set and `items` is still empty. */
49
+ loadingData?: () => void;
48
50
  /** Label of the items-per-page selector in the pagination. */
49
51
  itemsPerPageLabel?: () => void;
50
52
  };
@@ -1,7 +1,7 @@
1
1
  import type { PropsTabs } from '../../definitions';
2
- declare var __VLS_8: {};
2
+ declare var __VLS_11: {};
3
3
  type __VLS_Slots = {} & {
4
- default?: (props: typeof __VLS_8) => any;
4
+ default?: (props: typeof __VLS_11) => any;
5
5
  };
6
6
  declare const __VLS_base: import("vue").DefineComponent<PropsTabs, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
7
  "update:modelValue": (value: string | number) => any;
@@ -20,6 +20,8 @@ export declare const defaultAppConfig: {
20
20
  text: string;
21
21
  anchor: string;
22
22
  textErrorHover: string;
23
+ textError: string;
24
+ focusRing: string;
23
25
  secondaryText: string;
24
26
  background: string;
25
27
  button: string;
@@ -47,6 +49,8 @@ export declare const defaultAppConfig: {
47
49
  anchor: string;
48
50
  title: string;
49
51
  textErrorHover: string;
52
+ textError: string;
53
+ focusRing: string;
50
54
  secondaryText: string;
51
55
  background: string;
52
56
  button: string;
@@ -7,6 +7,7 @@ export declare const i18nConfig: {
7
7
  table: {
8
8
  itemsPerPage: string;
9
9
  noData: string;
10
+ loading: string;
10
11
  };
11
12
  formRules: {
12
13
  required: string;
@@ -29,6 +30,7 @@ export declare const i18nConfig: {
29
30
  table: {
30
31
  itemsPerPage: string;
31
32
  noData: string;
33
+ loading: string;
32
34
  };
33
35
  formRules: {
34
36
  required: string;
@@ -51,6 +53,7 @@ export declare const i18nConfig: {
51
53
  table: {
52
54
  itemsPerPage: string;
53
55
  noData: string;
56
+ loading: string;
54
57
  };
55
58
  formRules: {
56
59
  required: string;
@@ -15,6 +15,7 @@ export declare const ProviderName: {
15
15
  readonly stepperUnregisterStepperStep: InjectionKey<(step: number) => void>;
16
16
  readonly stepperUpdateValue: InjectionKey<(value: number) => void>;
17
17
  readonly group: InjectionKey<GroupProvider>;
18
+ readonly radioGroupName: InjectionKey<ComputedRef<string>>;
18
19
  readonly singleGroup: InjectionKey<SingleGroupProvider>;
19
20
  readonly layout: InjectionKey<Ref<typeof defaultLayoutSizes>>;
20
21
  readonly expansionPanel: InjectionKey<{
@@ -164,6 +164,21 @@ export declare enum CssColor {
164
164
  yellowgreen = "yellowgreen"
165
165
  }
166
166
  export declare const colorThreshold = 55;
167
+ export declare const srgbChannelMax = 255;
168
+ export declare const srgbLinearThreshold = 0.03928;
169
+ export declare const srgbLinearDivisor = 12.92;
170
+ export declare const srgbGammaOffset = 0.055;
171
+ export declare const srgbGammaDivisor = 1.055;
172
+ export declare const srgbGamma = 2.4;
173
+ export declare const luminanceWeightRed = 0.2126;
174
+ export declare const luminanceWeightGreen = 0.7152;
175
+ export declare const luminanceWeightBlue = 0.0722;
176
+ export declare const contrastFlare = 0.05;
177
+ export declare const minimumTextContrast = 4.5;
178
+ export declare const minimumLargeTextContrast = 3;
179
+ export declare const readableTextMixStep = 0.05;
180
+ export declare const lightestTextColor = "#ffffff";
181
+ export declare const darkestTextColor = "#000000";
167
182
  export declare const cssColorToHex: {
168
183
  readonly aliceblue: "#F0F8FF";
169
184
  readonly antiquewhite: "#FAEBD7";
@@ -1,4 +1,8 @@
1
1
  export declare const cssVariables: {
2
2
  bodyScrollY: string;
3
3
  bodyScrollX: string;
4
+ dialogWidth: string;
5
+ dialogMaxWidth: string;
6
+ dialogHeight: string;
7
+ dialogMaxHeight: string;
4
8
  };
@@ -12,3 +12,10 @@ export declare const datePickerDefaultYearLimit = 100;
12
12
  /** Years before and after today that a date picker allows when `min` / `max` are not set. */
13
13
  export declare const datePickerDefaultRangeYears = 5;
14
14
  export declare const datePickerWidth = "100%";
15
+ /**
16
+ * Width, in `em`, that SDatePickerInput reserves per character of its placeholder.
17
+ * The format placeholder (`YYYY-MM-DD`) is all wide capital letters, wider than `1ch` (one digit) each
18
+ * in some fonts, such as the WebKit system font.
19
+ */
20
+ export declare const datePickerInputPlaceholderCharWidthEm = 0.7;
21
+ export declare const datePickerDayAriaLabelFormat = "dddd, MMMM D, YYYY";
@@ -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,6 @@ 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';
@@ -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
+ };
@@ -0,0 +1 @@
1
+ export declare const listboxNoActiveIndex = -1;
@@ -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,4 @@
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";
@@ -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
  };
@@ -9,6 +9,12 @@ 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' */
@@ -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
  };
@@ -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
  }
@@ -6,6 +6,10 @@ 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;
@@ -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
  };
@@ -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;
@@ -12,8 +12,27 @@ export declare const convertToRgb: (rgb: string | [number, number, number] | {
12
12
  g: number;
13
13
  b: number;
14
14
  } | null;
15
- export declare const isDarkColor: (rgb: string | [number, number, number] | {
15
+ type RgbInput = string | [number, number, number] | {
16
16
  r: number;
17
17
  g: number;
18
18
  b: number;
19
- } | null | undefined, threshold?: number) => boolean | null;
19
+ };
20
+ export declare const getRelativeLuminance: (rgb: RgbInput) => number | null;
21
+ export declare const getContrastRatio: (first: RgbInput, second: RgbInput) => number | null;
22
+ export declare const getReadableTextColor: <T extends string>(background: RgbInput, lightText: T, darkText: T) => T;
23
+ export declare const mixColors: (color: RgbInput, target: RgbInput, amount: number) => string | null;
24
+ /**
25
+ * `color` used as text: kept as is when it already reaches `minimumContrast` on every surface, otherwise mixed
26
+ * toward `towards` (the theme text colour) in `step` increments until it does. Returns `color` when it cannot parse.
27
+ */
28
+ export declare const getReadableTextVariant: (color: string, surfaces: string[], towards: string, options: {
29
+ minimumContrast: number;
30
+ step: number;
31
+ }) => string;
32
+ /**
33
+ * Whether `rgb` is dark enough to need light text.
34
+ * Without `threshold` it compares WCAG contrast: light text is chosen when it contrasts more than dark text.
35
+ * With an explicit `threshold` (0-100) it keeps the legacy YIQ brightness rule, so existing overrides behave the same.
36
+ */
37
+ export declare const isDarkColor: (rgb: RgbInput | null | undefined, threshold?: number) => boolean | null;
38
+ export {};
@@ -10,3 +10,7 @@ export * from './scroll';
10
10
  export * from './wait';
11
11
  export * from './htmlClass';
12
12
  export * from './retry';
13
+ export * from './overlayPlacement';
14
+ export * from './revealInScroller';
15
+ export * from './linkLocation';
16
+ export * from './safeArea';
@@ -0,0 +1,9 @@
1
+ import type { LinkLocation } from '../types';
2
+ /**
3
+ * The plain URL a `to` location points at, for apps without vue-router.
4
+ *
5
+ * A path string is already a URL. A location object resolves only when it
6
+ * names a `path`; a route addressed by `name` needs the router's route table,
7
+ * so it has no URL here and the result is `undefined`.
8
+ */
9
+ export declare const getLinkLocationHref: (location: LinkLocation) => string | undefined;
@@ -0,0 +1,11 @@
1
+ import type { OverlayPlacementInput } from '../types';
2
+ /**
3
+ * Keeps an overlay inside the viewport, `gutter` pixels from every edge.
4
+ *
5
+ * Vertically it first flips to the other side of the activator (keeping the same gap) when that side has room,
6
+ * otherwise it shifts the overlay until it fits. Horizontally it shifts. All values are viewport coordinates.
7
+ */
8
+ export declare const getOverlayPlacement: ({ content, activator, viewportWidth, viewportHeight, gutter, }: OverlayPlacementInput) => {
9
+ top: number;
10
+ left: number;
11
+ };
@@ -0,0 +1,11 @@
1
+ /** Horizontal edges of a box, in viewport pixels (a subset of DOMRect). */
2
+ export interface HorizontalEdges {
3
+ left: number;
4
+ right: number;
5
+ }
6
+ /**
7
+ * The scrollLeft that brings `item` fully into view inside a horizontal scroller, moving as little as
8
+ * possible. Returns the current scrollLeft when the item is already visible. An item wider than the
9
+ * scroller is aligned to its start.
10
+ */
11
+ export declare const getScrollLeftToReveal: (scroller: HorizontalEdges, item: HorizontalEdges, scrollLeft: number) => number;
@@ -0,0 +1,3 @@
1
+ import type { SafeAreaSide } from '../types';
2
+ export declare const getSafeAreaInset: (side: SafeAreaSide) => string;
3
+ export declare const getLengthWithSafeArea: (length: string | undefined, side: SafeAreaSide) => string;
@@ -0,0 +1,3 @@
1
+ import type { VisualOptions } from './tests/visual/types';
2
+ declare const _default: import("playwright/test").PlaywrightTestConfig<VisualOptions, {}>;
3
+ export default _default;
@@ -1,4 +1,10 @@
1
+ /**
2
+ * Blocks the page scroll behind a modal overlay. Each caller is one lock owner; the page stays pinned while any
3
+ * owner holds a lock and is released when the last one lets go. Both calls are idempotent and apply at once, so
4
+ * a drawer that turns mobile and closes in the same tick (a window resize across the md breakpoint) ends unlocked
5
+ * whatever order its watchers ran in. An owner created inside a component lets go when the component unmounts.
6
+ */
1
7
  export declare const useBackgroundScrollService: () => {
2
- enableBackgroundScroll: () => Promise<void>;
3
- disableBackgroundScroll: () => Promise<void>;
8
+ enableBackgroundScroll: () => void;
9
+ disableBackgroundScroll: () => void;
4
10
  };
@@ -7,6 +7,7 @@ export declare const useDatePickerItemDateService: (props: PropsDatePickerItem,
7
7
  isSelected: boolean;
8
8
  isCurrentMonth: boolean;
9
9
  title: string;
10
+ label: string;
10
11
  isDisabled: boolean;
11
12
  select: () => void;
12
13
  }[]>;
@@ -19,14 +19,10 @@ export declare const useDialogService: (props: PropsDialog, isDialogOpen: ModelR
19
19
  's_dialog__content--bottom': boolean;
20
20
  's_dialog__content--borderless': boolean | undefined;
21
21
  }>;
22
- contentStyles: import("vue").ComputedRef<{
23
- height?: string;
24
- width?: string;
25
- maxHeight?: string;
26
- maxWidth?: string;
27
- minHeight?: string;
28
- minWidth?: string;
29
- }>;
22
+ contentStyles: import("vue").ComputedRef<Partial<{
23
+ minHeight?: string | undefined;
24
+ minWidth?: string | undefined;
25
+ }>>;
30
26
  transitionName: import("vue").ComputedRef<STransition.appear | "s_transition__dialog--bottom">;
31
27
  onClickOutside: () => void;
32
28
  };
@@ -0,0 +1,19 @@
1
+ import { type ComputedRef } from 'vue';
2
+ export interface FieldLayoutState {
3
+ /** A label is rendered above the field box (a label is set and `hideDetails` is off). */
4
+ hasLabel: boolean;
5
+ /** The details line (error / counter) is reserved below the field box. */
6
+ hasDetails: boolean;
7
+ }
8
+ /**
9
+ * Marker classes on a text field's root, so `SFormRow` can line its buttons up with the field box:
10
+ * it offsets the other children by the label height when a field in the row shows a label.
11
+ * The classes carry no styles of their own, so a field outside `SFormRow` renders unchanged.
12
+ */
13
+ export declare const useFieldLayoutService: (state: ComputedRef<FieldLayoutState>) => {
14
+ classListField: ComputedRef<{
15
+ s_field: boolean;
16
+ 's_field--labelled': boolean;
17
+ 's_field--details': boolean;
18
+ }>;
19
+ };