asma-ui-core 3.124.0 → 3.126.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 (29) hide show
  1. package/dist/asma-ui-core.css +1 -1
  2. package/dist/components/data-display/interactive-chip/StyledInteractiveChip.js +6 -5
  3. package/dist/components/data-display/read-only-text/StyledReadOnlyText.js +56 -0
  4. package/dist/components/icons/index.js +1 -0
  5. package/dist/components/icons/location-filled-icon/LocationFilledIcon.js +17 -0
  6. package/dist/components/icons/location-filled-icon/index.js +1 -0
  7. package/dist/components/inputs/checkbox/base-ui/StyledCheckbox.module.js +12 -12
  8. package/dist/components/inputs/field-styles.js +1 -1
  9. package/dist/components/inputs/input-field/StyledInputField.js +226 -205
  10. package/dist/components/miscellaneous/StyledFormControlLabel.js +14 -14
  11. package/dist/datetime/components/date-picker/components/BaseDatePickerInput.js +81 -73
  12. package/dist/datetime/components/date-picker/components/DatePickerInputRangeCompact.js +28 -26
  13. package/dist/datetime/components/date-picker/components/DatePickerInputSingle.js +23 -21
  14. package/dist/datetime/components/time-picker/StyledTimePicker.js +25 -25
  15. package/dist/datetime/components/time-picker/TimePickerInput.js +41 -40
  16. package/dist/index.js +449 -445
  17. package/dist/src/components/data-display/read-only-text/StyledReadOnlyText.d.ts +38 -0
  18. package/dist/src/components/data-display/read-only-text/index.d.ts +1 -0
  19. package/dist/src/components/icons/index.d.ts +1 -0
  20. package/dist/src/components/icons/location-filled-icon/LocationFilledIcon.d.ts +12 -0
  21. package/dist/src/components/icons/location-filled-icon/index.d.ts +1 -0
  22. package/dist/src/components/inputs/field-styles.d.ts +3 -1
  23. package/dist/src/components/inputs/input-field/StyledInputField.d.ts +14 -1
  24. package/dist/src/datetime/components/date-picker/components/BaseDatePickerInput.d.ts +2 -0
  25. package/dist/src/datetime/components/date-picker/types.d.ts +7 -0
  26. package/dist/src/datetime/components/time-picker/types.d.ts +2 -0
  27. package/dist/src/index.d.ts +1 -0
  28. package/dist/table/shared-components/StyledCheckbox.module.js +11 -11
  29. package/package.json +1 -1
@@ -0,0 +1,38 @@
1
+ import { ReactNode } from 'react';
2
+ export interface IStyledReadOnlyText {
3
+ /** The label above the value; leave it out when the caller already renders its own title. */
4
+ title?: ReactNode;
5
+ /** The value. An empty value (undefined, null, '' or only spaces) shows `emptyText`. */
6
+ value?: ReactNode;
7
+ /** Shown for an empty value. Defaults to '-'. */
8
+ emptyText?: ReactNode;
9
+ /** Keeps the line breaks of a multi-line value. */
10
+ multiline?: boolean;
11
+ /** "Title: value" on one line instead of the value under the title. */
12
+ horizontal?: boolean;
13
+ /** A 24px icon before the title. */
14
+ titleIcon?: ReactNode;
15
+ /** A 20px icon after the title, for example an info icon with a tooltip. */
16
+ titleInfo?: ReactNode;
17
+ /** A 24px icon before the value. */
18
+ startIcon?: ReactNode;
19
+ /** A 24px icon after the value. */
20
+ endIcon?: ReactNode;
21
+ /** Helper text under the value. */
22
+ helperText?: ReactNode;
23
+ /** A 20px icon before the helper text. */
24
+ helperIcon?: ReactNode;
25
+ id?: string;
26
+ className?: string;
27
+ dataTest?: string;
28
+ }
29
+ /**
30
+ * @figmaNode wXrXt5uKNNzV2DnQCgyYZH#40253-187979
31
+ * Figma `Title + data`: a value that cannot be changed, shown as text (disabled-states DIS-6, a
32
+ * read-only view or a value nobody can change here). The title is Body Base Semibold 16/24 in
33
+ * `text-icon/title-label` (delta-800) with the value right under it, or after "Title:" when
34
+ * `horizontal`; the value is Body 16/24 in `text-icon/body` (delta-700) and the helper text is Helper
35
+ * 14/20 in `text-icon/helper` (delta-600). Icons sit 4px from the text. No field, fill, border,
36
+ * padding or reserved helper row. An empty value shows '-'.
37
+ */
38
+ export declare const StyledReadOnlyText: React.FC<IStyledReadOnlyText>;
@@ -0,0 +1 @@
1
+ export * from './StyledReadOnlyText';
@@ -84,6 +84,7 @@ export * from './handyman-icon';
84
84
  export * from './pin-icon';
85
85
  export * from './work-icon';
86
86
  export * from './location-icon';
87
+ export * from './location-filled-icon';
87
88
  export * from './form-icon';
88
89
  export * from './repeat-outline-icon';
89
90
  export * from './clock-outline-icon';
@@ -0,0 +1,12 @@
1
+ import { SVGProps } from 'react';
2
+ /**
3
+ * A solid map pin with the centre dot knocked out — the Design System's `location_on` component
4
+ * (component key `25d2c1be9a4da63e3237f2e4b395171a22c7aff2`).
5
+ *
6
+ * The path is that component's 24px SVG export, verbatim — only `fill` is swapped to
7
+ * `currentColor` so the glyph takes its colour from the surrounding text. The centre dot is a
8
+ * second subpath wound against the body, so the nonzero fill rule knocks it out.
9
+ *
10
+ * {@link LocationIcon} is the *outlined* variant of the same glyph — hollow body, solid dot.
11
+ */
12
+ export declare function LocationFilledIcon(props: SVGProps<SVGSVGElement>): JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './LocationFilledIcon';
@@ -29,9 +29,11 @@ export type FieldLabelPlacement = 'above' | 'floating';
29
29
  /**
30
30
  * The label above a field, as `StyledPhoneField` draws it. It wraps and is never truncated (TRUNC-4).
31
31
  * Put it on a wrapper around the `<label>`: apps in the shell ship `label { padding: 0 !important }`.
32
+ * `flush` drops the 4px gap for a read-only value, whose text sits right under its title (Figma Title + data).
32
33
  */
33
- export declare const fieldLabelAboveClass: ({ disabled }?: {
34
+ export declare const fieldLabelAboveClass: ({ disabled, flush }?: {
34
35
  disabled?: boolean;
36
+ flush?: boolean;
35
37
  }) => string;
36
38
  /**
37
39
  * Shared outlined-field styling so `StyledInputField`, `StyledInputLabel` (+ `StyledFormControl`)
@@ -55,6 +55,19 @@ export interface StyledInputFieldProps {
55
55
  disabled?: boolean;
56
56
  /** @figmaProp State = true→"Read only" */
57
57
  readOnly?: boolean;
58
+ /**
59
+ * @figmaProp State = set→"Locked". A field the user normally edits here whose editing is paused
60
+ * for now (disabled-states DIS-9): read-only, with a lock icon at the end, the default cursor and a
61
+ * focus ring. The reason opens on hover, focus and tap and is the field's description.
62
+ */
63
+ lockedReason?: ReactNode;
64
+ /**
65
+ * @figmaProp State = set→"Read only". A single value inside a form the user is editing that they
66
+ * cannot change here but can change elsewhere (disabled-states DIS-6): text-like, without border or
67
+ * fill, focusable and selectable with a focus ring and the default cursor. The reason says where it
68
+ * can be changed; it opens on hover, focus and tap and is the field's description. `lockedReason` wins.
69
+ */
70
+ readOnlyReason?: ReactNode;
58
71
  required?: boolean;
59
72
  allowClear?: boolean;
60
73
  onClear?: () => void;
@@ -109,5 +122,5 @@ export interface StyledInputFieldProps {
109
122
  * the visual gate. Multiline auto-grows between `minRows` and `maxRows` (a fixed `rows` pins the height)
110
123
  * and scrolls once the content exceeds the cap; `readOnly` ignores the cap and shows the whole value.
111
124
  */
112
- export declare const StyledInputField: ({ dataTest, label, labelPlacement, value, defaultValue, onChange, onBlur, onFocus, error, helperText, reserveHelperText, expandHelperText, maxLength, counter, locale, disabled, readOnly, required, allowClear, onClear, type, placeholder, name, id, autoComplete, autoFocus, multiline, rows, minRows, maxRows, size, width, fullWidth: _fullWidth, className, style, sx, inputRef, slotProps, InputProps, onKeyDown, onClick, variant: _variant, }: StyledInputFieldProps) => JSX.Element;
125
+ export declare const StyledInputField: ({ dataTest, label, labelPlacement, value, defaultValue, onChange, onBlur, onFocus, error, helperText, reserveHelperText, expandHelperText, maxLength, counter, locale, disabled, readOnly: readOnlyProp, lockedReason, readOnlyReason, required, allowClear, onClear, type, placeholder, name, id, autoComplete, autoFocus, multiline, rows, minRows, maxRows, size, width, fullWidth: _fullWidth, className, style, sx, inputRef, slotProps, InputProps, onKeyDown, onClick, variant: _variant, }: StyledInputFieldProps) => JSX.Element;
113
126
  export {};
@@ -6,6 +6,8 @@ export interface IBaseDatePickerInput {
6
6
  inputClassName?: string;
7
7
  disabled: boolean;
8
8
  readOnly?: boolean;
9
+ lockedReason?: React.ReactNode;
10
+ readOnlyReason?: React.ReactNode;
9
11
  onClick: (e: React.MouseEvent<HTMLDivElement | HTMLButtonElement>) => void;
10
12
  selected: Date | undefined;
11
13
  dateFormat?: string;
@@ -5,6 +5,13 @@ export type CalendarProps = React.ComponentProps<typeof DayPicker>;
5
5
  type CommonDatePickerProps = {
6
6
  dateFormat?: string;
7
7
  readOnly?: boolean;
8
+ /** A locked field (disabled-states DIS-9): read-only with a lock icon; the reason opens on hover, focus and tap. */
9
+ lockedReason?: React.ReactNode;
10
+ /**
11
+ * A read-only value the user can change elsewhere (disabled-states DIS-6): the date as text-like,
12
+ * focusable text with no calendar button; the reason says where it can be changed.
13
+ */
14
+ readOnlyReason?: React.ReactNode;
8
15
  className?: string;
9
16
  inputClassName?: string;
10
17
  disabledDays?: Matcher | Matcher[];
@@ -9,6 +9,8 @@ export interface StyledTimePickerProps {
9
9
  placeholder?: string;
10
10
  disabled?: boolean;
11
11
  readOnly?: boolean;
12
+ /** A locked field (disabled-states DIS-9): read-only with a lock icon; the reason opens on hover, focus and tap. */
13
+ lockedReason?: ReactNode;
12
14
  inputClassName?: string;
13
15
  dataTest: string;
14
16
  /** Field width pattern step; defaults to XS. A number (a fixed `px` width) is deprecated: use a step. */
@@ -7,6 +7,7 @@ export * from './components/data-display/virtualized-list';
7
7
  export * from './components/icons';
8
8
  export * from './components/data-display/typography';
9
9
  export * from './components/data-display/form-label';
10
+ export * from './components/data-display/read-only-text';
10
11
  export * from './components/data-display/ai-disclosure';
11
12
  export * from './components/feedback/dialog';
12
13
  export * from './components/feedback/empty-page/StyledEmptyPage';
@@ -1,16 +1,16 @@
1
- var e = "_CheckboxWrapper_b7zlc_1", _ = "_Checkbox_b7zlc_1", r = "_Indeterminate_b7zlc_30", a = "_ReadOnly_b7zlc_57", l = "_Indicator_b7zlc_66", c = "_HideWrapper_b7zlc_70", b = "_CheckboxHover_b7zlc_77", p = "_CheckboxRippleContainer_b7zlc_77", i = "_CheckboxRipple_b7zlc_77", o = "_ripple_b7zlc_1", z = {
1
+ var e = "_CheckboxWrapper_nxzpn_1", _ = "_Checkbox_nxzpn_1", n = "_Indeterminate_nxzpn_30", p = "_ReadOnly_nxzpn_57", r = "_Indicator_nxzpn_69", a = "_HideWrapper_nxzpn_73", x = "_CheckboxHover_nxzpn_80", i = "_CheckboxRippleContainer_nxzpn_80", o = "_CheckboxRipple_nxzpn_80", l = "_ripple_nxzpn_1", z = {
2
2
  CheckboxWrapper: e,
3
- "size-small": "_size-small_b7zlc_13",
4
- "size-medium": "_size-medium_b7zlc_17",
3
+ "size-small": "_size-small_nxzpn_13",
4
+ "size-medium": "_size-medium_nxzpn_17",
5
5
  Checkbox: _,
6
- Indeterminate: r,
7
- ReadOnly: a,
8
- Indicator: l,
9
- HideWrapper: c,
10
- CheckboxHover: b,
11
- CheckboxRippleContainer: p,
12
- CheckboxRipple: i,
13
- ripple: o
6
+ Indeterminate: n,
7
+ ReadOnly: p,
8
+ Indicator: r,
9
+ HideWrapper: a,
10
+ CheckboxHover: x,
11
+ CheckboxRippleContainer: i,
12
+ CheckboxRipple: o,
13
+ ripple: l
14
14
  };
15
15
  export {
16
16
  z as default
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "3.124.0",
6
+ "version": "3.126.0",
7
7
  "type": "module",
8
8
  "sideEffects": [
9
9
  "**/*.css",