@aleph-alpha/ui-library 7.2.1 → 7.3.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 (32) hide show
  1. package/config.js +6 -0
  2. package/dist/system/components/UiFileUploadBox/UiFileUploadBox.vue.d.ts +2 -2
  3. package/dist/system/components/UiSpinner/UiSpinner.vue.d.ts +1 -3
  4. package/dist/system/components/UiSpinner/index.d.ts +1 -1
  5. package/dist/system/components/UiSpinner/types.d.ts +19 -6
  6. package/dist/system/components/core/native-select/NativeSelectOptGroup.vue.d.ts +2 -2
  7. package/dist/system/components/core/native-select/NativeSelectOption.vue.d.ts +2 -2
  8. package/dist/system/icons/story-sidebar-icons.json +2 -0
  9. package/dist/system/lib.js +7081 -6851
  10. package/dist/system/patterns/UiFileUpload/UiFileUpload.vue.d.ts +2 -2
  11. package/dist/system/patterns/UiHeadline/UiHeadline.vue.d.ts +204 -0
  12. package/dist/system/patterns/UiHeadline/index.d.ts +2 -0
  13. package/dist/system/patterns/UiHeadline/types.d.ts +64 -0
  14. package/dist/system/patterns/index.d.ts +1 -0
  15. package/dist/system/story-sidebar-icons.json +2 -0
  16. package/package.json +1 -1
  17. package/src/components/UiField/UiField.stories.ts +302 -0
  18. package/src/components/UiSpinner/UiSpinner.stories.ts +579 -6
  19. package/src/components/UiSpinner/UiSpinner.vue +76 -4
  20. package/src/components/UiSpinner/__tests__/UiSpinner.test.ts +79 -0
  21. package/src/components/UiSpinner/index.ts +1 -1
  22. package/src/components/UiSpinner/types.ts +21 -6
  23. package/src/components/core/input/Input.vue +1 -1
  24. package/src/components/core/input-group/InputGroupInput.vue +1 -1
  25. package/src/components/core/native-select/NativeSelect.vue +1 -1
  26. package/src/patterns/UiHeadline/UiHeadline.guidance.md +53 -0
  27. package/src/patterns/UiHeadline/UiHeadline.stories.ts +915 -0
  28. package/src/patterns/UiHeadline/UiHeadline.vue +203 -0
  29. package/src/patterns/UiHeadline/__tests__/UiHeadline.test.ts +204 -0
  30. package/src/patterns/UiHeadline/index.ts +2 -0
  31. package/src/patterns/UiHeadline/types.ts +73 -0
  32. package/src/patterns/index.ts +1 -0
package/config.js CHANGED
@@ -1263,6 +1263,12 @@ const vHoverOverlayCSS = `
1263
1263
  transition: none;
1264
1264
  }
1265
1265
  }
1266
+ /* Selected text in every text field. Only the background changes, so the
1267
+ text keeps its own color (default, placeholder or error). */
1268
+ input::selection,
1269
+ textarea::selection {
1270
+ background-color: oklch(var(--background-surface-muted-default));
1271
+ }
1266
1272
  `.trim();
1267
1273
 
1268
1274
  /**
@@ -14,11 +14,11 @@ declare function __VLS_template(): {
14
14
  };
15
15
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
16
  declare const __VLS_component: import('vue').DefineComponent<UiFileUploadBoxProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
17
+ error: (payload: import('./types').UiFileUploadBoxErrorPayload) => any;
17
18
  click: (event: MouseEvent) => any;
18
19
  focus: (event: FocusEvent) => any;
19
20
  blur: (event: FocusEvent) => any;
20
21
  keydown: (event: KeyboardEvent) => any;
21
- error: (payload: import('./types').UiFileUploadBoxErrorPayload) => any;
22
22
  change: (event: Event) => any;
23
23
  dragenter: (event: DragEvent) => any;
24
24
  dragleave: (event: DragEvent) => any;
@@ -27,11 +27,11 @@ declare const __VLS_component: import('vue').DefineComponent<UiFileUploadBoxProp
27
27
  "update:files": (files: File[]) => any;
28
28
  pickerOpen: () => any;
29
29
  }, string, import('vue').PublicProps, Readonly<UiFileUploadBoxProps> & Readonly<{
30
+ onError?: ((payload: import('./types').UiFileUploadBoxErrorPayload) => any) | undefined;
30
31
  onClick?: ((event: MouseEvent) => any) | undefined;
31
32
  onFocus?: ((event: FocusEvent) => any) | undefined;
32
33
  onBlur?: ((event: FocusEvent) => any) | undefined;
33
34
  onKeydown?: ((event: KeyboardEvent) => any) | undefined;
34
- onError?: ((payload: import('./types').UiFileUploadBoxErrorPayload) => any) | undefined;
35
35
  onChange?: ((event: Event) => any) | undefined;
36
36
  onDragenter?: ((event: DragEvent) => any) | undefined;
37
37
  onDragleave?: ((event: DragEvent) => any) | undefined;
@@ -1,5 +1,3 @@
1
1
  import { UiSpinnerProps } from './types';
2
- declare const _default: import('vue').DefineComponent<UiSpinnerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<UiSpinnerProps> & Readonly<{}>, {
3
- ariaLabel: string;
4
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
2
+ declare const _default: import('vue').DefineComponent<UiSpinnerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<UiSpinnerProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
5
3
  export default _default;
@@ -1,2 +1,2 @@
1
1
  export { default as UiSpinner } from './UiSpinner.vue';
2
- export type { UiSpinnerProps } from './types';
2
+ export type { UiSpinnerProps, UiSpinnerStatus } from './types';
@@ -1,14 +1,27 @@
1
1
  /**
2
- * An animated loading indicator. Use while content is loading
3
- * or an action is processing.
2
+ * An animated loading indicator, and the outcome that follows a wait.
3
+ * Use the compact spinner while content is loading or an action is
4
+ * processing. Set `status` for the 24px indicator inside a field: it shows
5
+ * the spinner while saving, then fades to a circle icon for the outcome.
4
6
  * @category Feedback
5
- * @useCases loading state, processing, waiting, fetching data
6
- * @keywords spinner, loading, loader, wait, progress, animation
7
- * @related UiProgress
7
+ * @useCases loading state, processing, waiting, fetching data, inline save, save confirmation, save warning, save failure
8
+ * @keywords spinner, loading, loader, wait, progress, animation, success, warning, error, save
9
+ * @related UiProgress, UiInput, UiField
8
10
  */
11
+ export type UiSpinnerStatus = 'loading' | 'success' | 'warning' | 'error';
9
12
  export interface UiSpinnerProps {
10
13
  /**
11
- * Accessible label for the spinner.
14
+ * Outcome shown by the 24px field indicator.
15
+ * `loading` is the spinner. `success`, `warning`, and `error` are circle
16
+ * icons. Changing status fades from one to the next.
17
+ * Omit it for the compact spinner used in buttons and beside text.
18
+ */
19
+ status?: UiSpinnerStatus;
20
+ /**
21
+ * Accessible name announced for the spinner.
22
+ * Defaults to "Loading", or to "Success", "Warning", or "Error" when
23
+ * `status` is one of those. Update it when the status changes so the
24
+ * announcement matches the outcome.
12
25
  * @default 'Loading'
13
26
  */
14
27
  ariaLabel?: string;
@@ -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?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
17
+ contenteditable?: (boolean | "true" | "false") | "inherit" | "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?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
211
+ contenteditable?: (boolean | "true" | "false") | "inherit" | "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?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
19
+ contenteditable?: (boolean | "true" | "false") | "inherit" | "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?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
215
+ contenteditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
216
216
  contextmenu?: string | undefined | undefined;
217
217
  dir?: string | undefined | undefined;
218
218
  draggable?: (boolean | "true" | "false") | undefined;
@@ -102,6 +102,8 @@
102
102
  "patterns-uifileupload-uifileupload--design-notes": "palette",
103
103
  "patterns-uifileupload-uifileupload--accessibility": "accessibility",
104
104
  "patterns-uifloatactions--accessibility": "accessibility",
105
+ "patterns-uiheadline--design-notes": "palette",
106
+ "patterns-uiheadline--accessibility": "accessibility",
105
107
  "patterns-uilayout-content--accessibility": "accessibility",
106
108
  "patterns-uilayout-mobile--design-notes": "palette",
107
109
  "patterns-uiprofilecard--accessibility": "accessibility",