asma-ui-core 3.127.1 → 3.128.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/asma-ui-core.css +1 -1
- package/dist/components/custom/widget/widget/StyledWidget.js +41 -37
- package/dist/components/custom/widget/widget/StyledWidget.module.js +9 -8
- package/dist/components/inputs/emoji-choice/StyledEmojiChoice.js +259 -0
- package/dist/components/inputs/emoji-choice/StyledEmojiChoice.module.js +27 -0
- package/dist/components/inputs/radio-button/base-ui/StyledRadio.js +15 -15
- package/dist/components/inputs/select-autocomplete/StyledSelectAutocomplete.js +84 -84
- package/dist/index.js +162 -160
- package/dist/src/components/custom/widget/widget/StyledWidget.d.ts +3 -2
- package/dist/src/components/custom/widget/widget/StyledWidget.test.d.ts +1 -0
- package/dist/src/components/inputs/emoji-choice/StyledEmojiChoice.d.ts +37 -0
- package/dist/src/components/inputs/emoji-choice/index.d.ts +1 -0
- package/dist/src/components/inputs/select-autocomplete/StyledSelectAutocomplete.d.ts +3 -1
- package/dist/src/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { UiCoreLocale } from '../../../helpers/uiCoreLocale';
|
|
3
|
+
export interface EmojiChoiceOption {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
/** An emoji character. */
|
|
7
|
+
emoji?: string;
|
|
8
|
+
/** An uploaded emoji image, used when there is no `emoji`. */
|
|
9
|
+
emojiImageSrc?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface StyledEmojiChoiceProps {
|
|
12
|
+
/** @figmaProp none — test hook */
|
|
13
|
+
dataTest: string;
|
|
14
|
+
/** @figmaProp none — up to 5 options show as a radio list, more as a dropdown with the same rows */
|
|
15
|
+
options: readonly EmojiChoiceOption[];
|
|
16
|
+
value?: string | null;
|
|
17
|
+
onValueChange?: (value: string, option: EmojiChoiceOption) => void;
|
|
18
|
+
/** The question text. Shown above the options unless `aria-labelledby` points at a heading you render. */
|
|
19
|
+
question: string;
|
|
20
|
+
'aria-labelledby'?: string;
|
|
21
|
+
/** @figmaProp Property 1 = "Read-only" | "Read-only(no answer)" */
|
|
22
|
+
readOnly?: boolean;
|
|
23
|
+
name?: string;
|
|
24
|
+
error?: boolean;
|
|
25
|
+
helperText?: ReactNode;
|
|
26
|
+
placeholder?: string;
|
|
27
|
+
locale?: UiCoreLocale;
|
|
28
|
+
className?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @figmaNode FtKQn5GurXgl2c7r4F9KFa#14961-181796
|
|
32
|
+
* Figma "emodji + text" (Questionnaires): radio, an 88px emoji in a 100px slot and 16/24 text in one
|
|
33
|
+
* card per option. Property 1 Default/Hover/Focus/Selected/Hover-selected ← native hover, keyboard
|
|
34
|
+
* focus and the chosen `value`; Read-only/Read-only(no answer) ← `readOnly`. Up to 5 options are a
|
|
35
|
+
* radio list; more are the Figma dropdown (an autocomplete field whose list holds the same cards).
|
|
36
|
+
*/
|
|
37
|
+
export declare const StyledEmojiChoice: (props: StyledEmojiChoiceProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './StyledEmojiChoice';
|
|
@@ -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 {};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -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';
|