asma-ui-core 3.73.0 → 3.74.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/inputs/dynamic-select/components/DynamicSelectAutocomplete.js +32 -32
- package/dist/components/inputs/field-styles.js +1 -1
- package/dist/components/inputs/input-field/StyledInputField.js +114 -122
- package/dist/components/inputs/radio-button/base-ui/StyledRadioGroup.js +30 -36
- package/dist/components/inputs/select/StyledSelect.js +90 -96
- package/dist/components/inputs/slider/StyledSlider.js +58 -64
- package/dist/components/inputs/textarea/StyledTextarea.js +44 -47
- package/dist/helpers/HelperRow.js +19 -0
- package/dist/helpers/useHelperSlot.js +12 -0
- package/dist/src/components/inputs/textarea/StyledTextarea.d.ts +1 -1
- package/dist/src/helpers/HelperRow.d.ts +16 -0
- package/dist/src/helpers/useHelperSlot.d.ts +11 -0
- package/package.json +1 -1
- package/src/styles/components-colors/inputVariables.css +4 -4
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useHelperAlertRole as u } from "./useHelperAlertRole.js";
|
|
2
|
+
import { warnMissingErrorMessage as s } from "./warnMissingErrorMessage.js";
|
|
3
|
+
function f(r, e, o, t, l) {
|
|
4
|
+
const n = l !== !0 && (t === !0 || o != null || !!e);
|
|
5
|
+
return s(r, e, o), {
|
|
6
|
+
show: n,
|
|
7
|
+
role: u(e)
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
f as useHelperSlot
|
|
12
|
+
};
|
|
@@ -51,7 +51,7 @@ type StyledTextAreaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement> & T
|
|
|
51
51
|
* Figma has no standalone "Text area" component — a multiline text control inherits the **Input
|
|
52
52
|
* field** outlined styling (shared with `StyledInputField`/`field-styles`): radius 4, field text
|
|
53
53
|
* **Body Base 16/lh24 delta-800**; border **enabled delta-500 #7a899e**, **hover gama-300 #60bdbd
|
|
54
|
-
* (2px)**, **focus gama-400 #1ca1a1 (
|
|
54
|
+
* (2px)**, **focus gama-400 #1ca1a1 (3px)**, **error error-500 #e10700**, **disabled delta-300**.
|
|
55
55
|
* Title = **Body Base SemiBold 16 delta-800**; description/helper = **Helper 14/lh20 delta-600**.
|
|
56
56
|
* State (Enabled/Hover/Focus/Error/Disabled) ← native + `error`/`disabled`; the `not_editable`/
|
|
57
57
|
* `view_only` variants are the read-only presentations. Colours live in the textarea-only
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
export interface HelperRowProps {
|
|
3
|
+
id: string;
|
|
4
|
+
role: 'alert' | 'status';
|
|
5
|
+
error?: boolean;
|
|
6
|
+
message?: ReactNode;
|
|
7
|
+
hideErrorIcon?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Shared helper-text row rendered beneath input components (Figma "Helper text" row,
|
|
13
|
+
* 24 px min-height, pt 4 px, gap 4 px). Renders error icon + message text with proper
|
|
14
|
+
* ARIA role. Consumers add layout tweaks (margin, alignment) via `className`.
|
|
15
|
+
*/
|
|
16
|
+
export declare const HelperRow: import('react').ForwardRefExoticComponent<HelperRowProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface UseHelperSlotResult {
|
|
3
|
+
show: boolean;
|
|
4
|
+
role: 'alert' | 'status';
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Shared logic for the helper-text row beneath input components.
|
|
8
|
+
* Returns `show` (whether the slot should render) and `role` (ARIA live-region role).
|
|
9
|
+
* Emits a dev-mode warning when `error` is set but `message` is empty.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useHelperSlot(component: string, error: boolean | undefined, message: ReactNode, reserveHelperText?: boolean, readOnly?: boolean): UseHelperSlotResult;
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
--colors-input-active-focus-text-color: var(--colors-delta-800);
|
|
15
15
|
--colors-input-active-disabled-text-color: var(--colors-delta-300);
|
|
16
16
|
/* Figma Input field (node 15561-37391): enabled border delta-500 #7a899e; hover border/hover
|
|
17
|
-
gama-300 #60bdbd (2px); focus border/focus gama-400 #1ca1a1 (
|
|
17
|
+
gama-300 #60bdbd (2px); focus border/focus gama-400 #1ca1a1 (3px); disabled delta-300. */
|
|
18
18
|
--colors-input-active-outline-color: var(--colors-delta-500);
|
|
19
19
|
--colors-input-active-hover-outline-color: var(--colors-gama-300);
|
|
20
20
|
--colors-input-active-active-outline-color: var(--colors-gama-400);
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
--input-active-disabled-cursor: default;
|
|
28
28
|
--input-active-outline-width: 1px;
|
|
29
29
|
--input-active-hover-outline-width: 2px;
|
|
30
|
-
--input-active-active-outline-width:
|
|
31
|
-
--input-active-focus-outline-width:
|
|
30
|
+
--input-active-active-outline-width: 3px;
|
|
31
|
+
--input-active-focus-outline-width: 3px;
|
|
32
32
|
--input-active-disabled-outline-width: 1px;
|
|
33
33
|
/* Input Error */
|
|
34
34
|
--colors-input-error-placeholder-color: var(--colors-error-500);
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
--input-error-outline-width: 1px;
|
|
56
56
|
--input-error-hover-outline-width: 1px;
|
|
57
57
|
--input-error-active-outline-width: 1px;
|
|
58
|
-
--input-error-focus-outline-width:
|
|
58
|
+
--input-error-focus-outline-width: 1px;
|
|
59
59
|
--input-error-disabled-outline-width: 1px;
|
|
60
60
|
/* input notEditable */
|
|
61
61
|
--colors-input-notEditable-placeholder-color: var(--colors-delta-800);
|