asma-ui-core 3.127.2 → 3.128.1

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.
@@ -107,6 +107,8 @@ export interface StyledSelectAutocompleteProps<T, Multiple extends boolean | und
107
107
  /** @figmaProp popup indicator — defaults to `+` (PlusIconCircle) when multiple, else chevron */
108
108
  popupIcon?: ReactNode;
109
109
  autoHeight?: boolean;
110
+ /** Cap on the attached list's height in px (it still shrinks to the room left in the viewport). Defaults to 320. */
111
+ maxListHeight?: number;
110
112
  /** @figmaProp Filled shape — true renders Tag chips + `+` indicator (Figma "multiple select") */
111
113
  multiple?: Multiple;
112
114
  allowSelectAll?: boolean;
@@ -157,5 +159,5 @@ export interface StyledSelectAutocompleteProps<T, Multiple extends boolean | und
157
159
  * ponytail: `freeSolo` is accepted (arbitrary input is emitted via onInputChange) but not turned
158
160
  * into option values; exact keyboard-parity edge cases are Chromatic/axe-gated.
159
161
  */
160
- export declare function StyledSelectAutocomplete<T, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false>({ dataTest, options, renderInput, value, onChange, getOptionLabel, getOptionKey, isOptionEqualToValue, renderOption, renderValue, filterOptions, loading, loadingText, noOptionsText, disabled, readOnly, error, helperText, size, rowSize, disableClearable, disableCloseOnSelect, popupIcon, autoHeight, multiple, allowSelectAll, selectAllLabel, width, fullWidth: _fullWidth, classes, inputValue: controlledInput, onInputChange, open: controlledOpen, onOpen, onClose, className, wrapperClassName, getOptionDisabled, slotProps, pickerTitle, pickerText, locale, disableFullScreenPicker, }: StyledSelectAutocompleteProps<T, Multiple, DisableClearable, FreeSolo>): JSX.Element;
162
+ export declare function StyledSelectAutocomplete<T, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false>({ dataTest, options, renderInput, value, onChange, getOptionLabel, getOptionKey, isOptionEqualToValue, renderOption, renderValue, filterOptions, loading, loadingText, noOptionsText, disabled, readOnly, error, helperText, size, rowSize, disableClearable, disableCloseOnSelect, popupIcon, autoHeight, maxListHeight, multiple, allowSelectAll, selectAllLabel, width, fullWidth: _fullWidth, classes, inputValue: controlledInput, onInputChange, open: controlledOpen, onOpen, onClose, className, wrapperClassName, getOptionDisabled, slotProps, pickerTitle, pickerText, locale, disableFullScreenPicker, }: StyledSelectAutocompleteProps<T, Multiple, DisableClearable, FreeSolo>): JSX.Element;
161
163
  export {};
@@ -1,4 +1,5 @@
1
1
  import { ReactNode, RefObject } from 'react';
2
+ import { UiCoreLocale } from '../../../helpers/uiCoreLocale';
2
3
  import { PopoverSlot } from '../popover/PopoverSheet';
3
4
  export type BottomSheetCloseReason = 'closeButton' | 'scrim' | 'escape' | 'drag' | 'viewResults' | 'action';
4
5
  /** @figmaNode 9Q7C7JYPgnUSsrX1L8v40t#5354-169163 (Ad-Voca-concept · "_bottom sheet") */
@@ -37,8 +38,10 @@ export interface StyledBottomSheetProps {
37
38
  * @figmaProp none — behavioral
38
39
  */
39
40
  resultCount?: number | null;
40
- /** @figmaProp none — a11y: accessible name of the close control */
41
+ /** @figmaProp none — a11y: accessible name of the close control; defaults to "Close" in `locale` */
41
42
  closeLabel?: string;
43
+ /** Language of the default result and close labels; defaults to English. */
44
+ locale?: UiCoreLocale;
42
45
  /** @figmaProp none — style escape hatch, applied to the sheet container */
43
46
  className?: string;
44
47
  /** Set `false` when a wrapper already owns the Back-close registration. */
@@ -60,4 +63,4 @@ export interface StyledBottomSheetProps {
60
63
  * Focus moves to the sheet on open (so the title is announced first) and back to the trigger on
61
64
  * close. `PopoverSheet` with `variant='action'` renders this automatically below 744px.
62
65
  */
63
- export declare const StyledBottomSheet: ({ dataTest, id, open, onClose, title, ariaLabel, children, viewResultsAction, resetAction, footerActions, resultCount, closeLabel, className, registerBackClose, ownerRef, }: StyledBottomSheetProps) => JSX.Element | null;
66
+ export declare const StyledBottomSheet: ({ dataTest, id, open, onClose, title, ariaLabel, children, viewResultsAction, resetAction, footerActions, resultCount, locale, closeLabel, className, registerBackClose, ownerRef, }: StyledBottomSheetProps) => JSX.Element | null;
@@ -1,3 +1,4 @@
1
+ import { UiCoreLocale } from '../../../helpers/uiCoreLocale';
1
2
  /**
2
3
  * The label of the "Vis resultater (N)" dismiss control — one system-wide pattern, not per-screen copy.
3
4
  *
@@ -5,5 +6,7 @@
5
6
  * - `0` → `Ingen treff` (stays enabled — it is the way out of the sheet)
6
7
  * - above 9999 → `Vis resultater (9999+)`, so the label keeps a fixed shape and never wraps
7
8
  * - otherwise → `Vis resultater (N)`, parenthesised even for 1 to sidestep resultat/resultater
9
+ *
10
+ * English (`locale='en'`) reads `Show results (N)` and `No matches`.
8
11
  */
9
- export declare const formatResultsLabel: (count: number | null | undefined) => string;
12
+ export declare const formatResultsLabel: (count: number | null | undefined, locale?: UiCoreLocale) => string;
@@ -0,0 +1,11 @@
1
+ import { UiCoreLocale } from '../../../helpers/uiCoreLocale';
2
+ /**
3
+ * Default strings of `PopoverSheet` and `StyledBottomSheet`. English is the meaning column of the spec's copy table.
4
+ *
5
+ * @see asma-modules/_docs/ux/specs/spec-design-system-bottom-sheet.md:116 — Copy and label guidelines
6
+ */
7
+ export declare const SHEET_TEXT: Record<UiCoreLocale, {
8
+ close: string;
9
+ showResults: string;
10
+ noMatches: string;
11
+ }>;
@@ -1,4 +1,5 @@
1
1
  import { MouseEvent, ReactNode } from 'react';
2
+ import { UiCoreLocale } from '../../../helpers/uiCoreLocale';
2
3
  /** Spread on the trigger element. The ref is handed over separately — `StyledButton` takes `refLink`. */
3
4
  export interface PopoverTriggerProps {
4
5
  onClick: (event: MouseEvent<HTMLElement>) => void;
@@ -52,8 +53,10 @@ export interface PopoverSheetProps {
52
53
  * @figmaProp none — behavioral
53
54
  */
54
55
  resultCount?: number | null;
55
- /** @figmaProp none — a11y: accessible name of the close control */
56
+ /** @figmaProp none — a11y: accessible name of the close control; defaults to "Close" in `locale` */
56
57
  closeLabel?: string;
58
+ /** Language of the default result and close labels; defaults to English. */
59
+ locale?: UiCoreLocale;
57
60
  /** @figmaProp none — a11y: required when `variant='action'` and no `title` is given, so the dialog has a name */
58
61
  ariaLabel?: string;
59
62
  /** @figmaProp none — behavioral */
@@ -95,4 +98,4 @@ export interface PopoverSheetProps {
95
98
  * Separate from {@link StyledPopover}, which stays as the MUI-parity positioning primitive its eight
96
99
  * internal consumers still depend on; those migrate here gradually.
97
100
  */
98
- export declare const PopoverSheet: ({ dataTest, renderTrigger, variant, title, children, viewResultsAction, resetAction, footerActions, resultCount, closeLabel, ariaLabel, onOpenChange, className, align, ignoreOutside, }: PopoverSheetProps) => JSX.Element;
101
+ export declare const PopoverSheet: ({ dataTest, renderTrigger, variant, title, children, viewResultsAction, resetAction, footerActions, resultCount, locale, closeLabel, ariaLabel, onOpenChange, className, align, ignoreOutside, }: PopoverSheetProps) => JSX.Element;
@@ -28,6 +28,7 @@ export * from './components/inputs/switch';
28
28
  export * from './components/inputs/radio-button';
29
29
  export * from './components/inputs/label';
30
30
  export * from './components/inputs/dynamic-select';
31
+ export * from './components/inputs/emoji-choice';
31
32
  export * from './components/inputs/phone-field';
32
33
  export * from './components/inputs/form-layout';
33
34
  export * from './datetime/components/date-picker';
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "3.127.2",
6
+ "version": "3.128.1",
7
7
  "type": "module",
8
8
  "sideEffects": [
9
9
  "**/*.css",