@metamask-previews/design-system-shared 0.45.1-preview-473aecb → 0.45.1-preview-91ce2ce2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"KeyValueSelect.types.cjs","sourceRoot":"","sources":["../../../src/types/KeyValueSelect/KeyValueSelect.types.ts"],"names":[],"mappings":";;;AAAA,4EAAsE;AAItE;;;GAGG;AACU,QAAA,qBAAqB,GAAG,sCAAkB,CAAC","sourcesContent":["import { KeyValueRowVariant } from '../KeyValueRow/KeyValueRow.types';\nimport type { KeyValueRowPropsShared } from '../KeyValueRow/KeyValueRow.types';\nimport type { SelectButtonPropsShared } from '../SelectButton/SelectButton.types';\n\n/**\n * KeyValueSelect row height variant (ADR-0003).\n * Alias to KeyValueRowVariant to keep values in sync.\n */\nexport const KeyValueSelectVariant = KeyValueRowVariant;\nexport type KeyValueSelectVariant = KeyValueRowVariant;\n\n/**\n * SelectButton-only props exposed on KeyValueSelect via `selectButtonProps`.\n * Size is always Md and variant is always Secondary.\n */\nexport type KeyValueSelectSelectButtonPropsShared = Pick<\n SelectButtonPropsShared,\n 'placeholder' | 'endArrowDirection' | 'hideEndArrow'\n>;\n\n/**\n * KeyValueSelect shared props (ADR-0004).\n * Keeps KeyValueRow key/value naming; SelectButton-only options live on `selectButtonProps`.\n * `value` is narrowed to a select label (`string | null`) rather than KeyValueRow's ReactNode.\n * `variant` uses the component-scoped `KeyValueSelectVariant` alias.\n */\nexport type KeyValueSelectPropsShared = Omit<\n KeyValueRowPropsShared,\n 'value' | 'variant'\n> & {\n /**\n * Selected select label. When `undefined` or `null`, `selectButtonProps.placeholder` is shown.\n */\n value?: string | null;\n /**\n * Row height variant.\n *\n * @default KeyValueSelectVariant.Summary\n */\n variant?: KeyValueSelectVariant;\n /**\n * SelectButton-only props (placeholder and caret controls).\n */\n selectButtonProps: KeyValueSelectSelectButtonPropsShared;\n /**\n * When true, disables the row press and SelectButton presentation.\n *\n * @default false\n */\n isDisabled?: boolean;\n};\n"]}
1
+ {"version":3,"file":"KeyValueSelect.types.cjs","sourceRoot":"","sources":["../../../src/types/KeyValueSelect/KeyValueSelect.types.ts"],"names":[],"mappings":";;;AAAA,4EAAsE;AAItE;;;GAGG;AACU,QAAA,qBAAqB,GAAG,sCAAkB,CAAC","sourcesContent":["import { KeyValueRowVariant } from '../KeyValueRow/KeyValueRow.types';\nimport type { KeyValueRowPropsShared } from '../KeyValueRow/KeyValueRow.types';\nimport type { SelectButtonPropsShared } from '../SelectButton/SelectButton.types';\n\n/**\n * KeyValueSelect row height variant (ADR-0003).\n * Alias to KeyValueRowVariant to keep values in sync.\n */\nexport const KeyValueSelectVariant = KeyValueRowVariant;\nexport type KeyValueSelectVariant = KeyValueRowVariant;\n\n/**\n * SelectButton-only props exposed on KeyValueSelect via `selectButtonProps`.\n * Size is always Md and variant is always Secondary.\n */\nexport type KeyValueSelectSelectButtonPropsShared = Pick<\n SelectButtonPropsShared,\n 'placeholder' | 'endArrowDirection' | 'hideEndArrow'\n>;\n\n/**\n * KeyValueSelect shared props (ADR-0004).\n * Keeps KeyValueRow key/value naming; SelectButton-only options live on `selectButtonProps`.\n * `value` is narrowed to a select label (`string | null`) rather than KeyValueRow's ReactNode.\n * `variant` uses the component-scoped `KeyValueSelectVariant` alias.\n */\nexport type KeyValueSelectPropsShared = Omit<\n KeyValueRowPropsShared,\n 'value' | 'variant'\n> & {\n /**\n * Selected select label. When `undefined` or `null`, `selectButtonProps.placeholder` is shown instead. When the resolved label is `undefined`, `null`, or an empty string, no label is rendered.\n */\n value?: string | null;\n /**\n * Row height variant.\n *\n * @default KeyValueSelectVariant.Summary\n */\n variant?: KeyValueSelectVariant;\n /**\n * SelectButton-only props (placeholder and caret controls). `placeholder` is optional; when the resolved label is empty, no label is rendered.\n */\n selectButtonProps: KeyValueSelectSelectButtonPropsShared;\n /**\n * When true, disables the row press and SelectButton presentation.\n *\n * @default false\n */\n isDisabled?: boolean;\n};\n"]}
@@ -23,7 +23,7 @@ export type KeyValueSelectSelectButtonPropsShared = Pick<SelectButtonPropsShared
23
23
  */
24
24
  export type KeyValueSelectPropsShared = Omit<KeyValueRowPropsShared, 'value' | 'variant'> & {
25
25
  /**
26
- * Selected select label. When `undefined` or `null`, `selectButtonProps.placeholder` is shown.
26
+ * Selected select label. When `undefined` or `null`, `selectButtonProps.placeholder` is shown instead. When the resolved label is `undefined`, `null`, or an empty string, no label is rendered.
27
27
  */
28
28
  value?: string | null;
29
29
  /**
@@ -33,7 +33,7 @@ export type KeyValueSelectPropsShared = Omit<KeyValueRowPropsShared, 'value' | '
33
33
  */
34
34
  variant?: KeyValueSelectVariant;
35
35
  /**
36
- * SelectButton-only props (placeholder and caret controls).
36
+ * SelectButton-only props (placeholder and caret controls). `placeholder` is optional; when the resolved label is empty, no label is rendered.
37
37
  */
38
38
  selectButtonProps: KeyValueSelectSelectButtonPropsShared;
39
39
  /**
@@ -23,7 +23,7 @@ export type KeyValueSelectSelectButtonPropsShared = Pick<SelectButtonPropsShared
23
23
  */
24
24
  export type KeyValueSelectPropsShared = Omit<KeyValueRowPropsShared, 'value' | 'variant'> & {
25
25
  /**
26
- * Selected select label. When `undefined` or `null`, `selectButtonProps.placeholder` is shown.
26
+ * Selected select label. When `undefined` or `null`, `selectButtonProps.placeholder` is shown instead. When the resolved label is `undefined`, `null`, or an empty string, no label is rendered.
27
27
  */
28
28
  value?: string | null;
29
29
  /**
@@ -33,7 +33,7 @@ export type KeyValueSelectPropsShared = Omit<KeyValueRowPropsShared, 'value' | '
33
33
  */
34
34
  variant?: KeyValueSelectVariant;
35
35
  /**
36
- * SelectButton-only props (placeholder and caret controls).
36
+ * SelectButton-only props (placeholder and caret controls). `placeholder` is optional; when the resolved label is empty, no label is rendered.
37
37
  */
38
38
  selectButtonProps: KeyValueSelectSelectButtonPropsShared;
39
39
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"KeyValueSelect.types.mjs","sourceRoot":"","sources":["../../../src/types/KeyValueSelect/KeyValueSelect.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,6CAAyC;AAItE;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,kBAAkB,CAAC","sourcesContent":["import { KeyValueRowVariant } from '../KeyValueRow/KeyValueRow.types';\nimport type { KeyValueRowPropsShared } from '../KeyValueRow/KeyValueRow.types';\nimport type { SelectButtonPropsShared } from '../SelectButton/SelectButton.types';\n\n/**\n * KeyValueSelect row height variant (ADR-0003).\n * Alias to KeyValueRowVariant to keep values in sync.\n */\nexport const KeyValueSelectVariant = KeyValueRowVariant;\nexport type KeyValueSelectVariant = KeyValueRowVariant;\n\n/**\n * SelectButton-only props exposed on KeyValueSelect via `selectButtonProps`.\n * Size is always Md and variant is always Secondary.\n */\nexport type KeyValueSelectSelectButtonPropsShared = Pick<\n SelectButtonPropsShared,\n 'placeholder' | 'endArrowDirection' | 'hideEndArrow'\n>;\n\n/**\n * KeyValueSelect shared props (ADR-0004).\n * Keeps KeyValueRow key/value naming; SelectButton-only options live on `selectButtonProps`.\n * `value` is narrowed to a select label (`string | null`) rather than KeyValueRow's ReactNode.\n * `variant` uses the component-scoped `KeyValueSelectVariant` alias.\n */\nexport type KeyValueSelectPropsShared = Omit<\n KeyValueRowPropsShared,\n 'value' | 'variant'\n> & {\n /**\n * Selected select label. When `undefined` or `null`, `selectButtonProps.placeholder` is shown.\n */\n value?: string | null;\n /**\n * Row height variant.\n *\n * @default KeyValueSelectVariant.Summary\n */\n variant?: KeyValueSelectVariant;\n /**\n * SelectButton-only props (placeholder and caret controls).\n */\n selectButtonProps: KeyValueSelectSelectButtonPropsShared;\n /**\n * When true, disables the row press and SelectButton presentation.\n *\n * @default false\n */\n isDisabled?: boolean;\n};\n"]}
1
+ {"version":3,"file":"KeyValueSelect.types.mjs","sourceRoot":"","sources":["../../../src/types/KeyValueSelect/KeyValueSelect.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,6CAAyC;AAItE;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,kBAAkB,CAAC","sourcesContent":["import { KeyValueRowVariant } from '../KeyValueRow/KeyValueRow.types';\nimport type { KeyValueRowPropsShared } from '../KeyValueRow/KeyValueRow.types';\nimport type { SelectButtonPropsShared } from '../SelectButton/SelectButton.types';\n\n/**\n * KeyValueSelect row height variant (ADR-0003).\n * Alias to KeyValueRowVariant to keep values in sync.\n */\nexport const KeyValueSelectVariant = KeyValueRowVariant;\nexport type KeyValueSelectVariant = KeyValueRowVariant;\n\n/**\n * SelectButton-only props exposed on KeyValueSelect via `selectButtonProps`.\n * Size is always Md and variant is always Secondary.\n */\nexport type KeyValueSelectSelectButtonPropsShared = Pick<\n SelectButtonPropsShared,\n 'placeholder' | 'endArrowDirection' | 'hideEndArrow'\n>;\n\n/**\n * KeyValueSelect shared props (ADR-0004).\n * Keeps KeyValueRow key/value naming; SelectButton-only options live on `selectButtonProps`.\n * `value` is narrowed to a select label (`string | null`) rather than KeyValueRow's ReactNode.\n * `variant` uses the component-scoped `KeyValueSelectVariant` alias.\n */\nexport type KeyValueSelectPropsShared = Omit<\n KeyValueRowPropsShared,\n 'value' | 'variant'\n> & {\n /**\n * Selected select label. When `undefined` or `null`, `selectButtonProps.placeholder` is shown instead. When the resolved label is `undefined`, `null`, or an empty string, no label is rendered.\n */\n value?: string | null;\n /**\n * Row height variant.\n *\n * @default KeyValueSelectVariant.Summary\n */\n variant?: KeyValueSelectVariant;\n /**\n * SelectButton-only props (placeholder and caret controls). `placeholder` is optional; when the resolved label is empty, no label is rendered.\n */\n selectButtonProps: KeyValueSelectSelectButtonPropsShared;\n /**\n * When true, disables the row press and SelectButton presentation.\n *\n * @default false\n */\n isDisabled?: boolean;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"SelectButton.types.cjs","sourceRoot":"","sources":["../../../src/types/SelectButton/SelectButton.types.ts"],"names":[],"mappings":";;;AAEA,yEAAgE;AAEhE;;;GAGG;AACU,QAAA,gBAAgB,GAAG,iCAAc,CAAC;AAG/C;;;GAGG;AACU,QAAA,oBAAoB,GAAG;IAClC,EAAE,EAAE,IAAI;IACR,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;CACN,CAAC;AAIX;;;GAGG;AACU,QAAA,mBAAmB,GAAG;IACjC,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;CACZ,CAAC","sourcesContent":["import type { ReactNode } from 'react';\n\nimport { ButtonBaseSize } from '../ButtonBase/ButtonBase.types';\n\n/**\n * SelectButton size options (ADR-0003).\n * Alias to ButtonBaseSize to keep values in sync.\n */\nexport const SelectButtonSize = ButtonBaseSize;\nexport type SelectButtonSize = ButtonBaseSize;\n\n/**\n * SelectButton — trailing arrow direction (maps to platform arrow icons).\n * Convert from enum to const object (ADR-0003).\n */\nexport const SelectButtonEndArrow = {\n Up: 'up',\n Down: 'down',\n Left: 'left',\n Right: 'right',\n} as const;\nexport type SelectButtonEndArrow =\n (typeof SelectButtonEndArrow)[keyof typeof SelectButtonEndArrow];\n\n/**\n * SelectButton visual variant (ADR-0003).\n * `primary` matches ButtonSecondary; `secondary` and `tertiary` match ButtonTertiary container styling.\n */\nexport const SelectButtonVariant = {\n Primary: 'primary',\n Secondary: 'secondary',\n Tertiary: 'tertiary',\n} as const;\nexport type SelectButtonVariant =\n (typeof SelectButtonVariant)[keyof typeof SelectButtonVariant];\n\n/**\n * SelectButton component shared props (ADR-0004).\n */\nexport type SelectButtonPropsShared = {\n /**\n * Label shown when `value` is `undefined` or `null`. Only those two are treated as “no selection”; other falsy values (for example `””`) still render as `value`.\n */\n placeholder: string;\n /**\n * Height size of the button. Maps 1:1 to ButtonBaseSize values.\n *\n * @default Sm\n */\n size?: SelectButtonSize;\n /**\n * Selected label text. When `undefined` or `null`, `placeholder` is rendered instead.\n */\n value?: string | null;\n /**\n * Visual variant: `primary` matches ButtonSecondary; `secondary` and `tertiary` match ButtonTertiary row styling; `tertiary` uses alternative text and trailing arrow icon color.\n *\n * @default primary\n */\n variant?: SelectButtonVariant;\n /**\n * Optional node rendered before the label (for example an icon).\n */\n startAccessory?: ReactNode;\n /**\n * Maps to the trailing arrow `Icon` at the end of the row.\n * Defaults to `down` when neither `hideEndArrow` nor `endAccessory` is used.\n * When `endAccessory` is passed and this prop is omitted, `endAccessory` is shown instead of the arrow.\n * When both are passed, `endArrowDirection` takes precedence and `endAccessory` is ignored.\n *\n * @default down (when no `endAccessory`)\n */\n endArrowDirection?: SelectButtonEndArrow;\n /**\n * When `true`, the trailing arrow is not rendered (`endAccessory` may still render).\n *\n * @default false\n */\n hideEndArrow?: boolean;\n /**\n * Optional node at the end of the row when no trailing arrow is shown (for example a custom icon or badge).\n */\n endAccessory?: ReactNode;\n /**\n * When true, disables the root control and applies disabled presentation.\n *\n * @default false\n */\n isDisabled?: boolean;\n};\n"]}
1
+ {"version":3,"file":"SelectButton.types.cjs","sourceRoot":"","sources":["../../../src/types/SelectButton/SelectButton.types.ts"],"names":[],"mappings":";;;AAEA,yEAAgE;AAEhE;;;GAGG;AACU,QAAA,gBAAgB,GAAG,iCAAc,CAAC;AAG/C;;;GAGG;AACU,QAAA,oBAAoB,GAAG;IAClC,EAAE,EAAE,IAAI;IACR,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;CACN,CAAC;AAIX;;;GAGG;AACU,QAAA,mBAAmB,GAAG;IACjC,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;CACZ,CAAC","sourcesContent":["import type { ReactNode } from 'react';\n\nimport { ButtonBaseSize } from '../ButtonBase/ButtonBase.types';\n\n/**\n * SelectButton size options (ADR-0003).\n * Alias to ButtonBaseSize to keep values in sync.\n */\nexport const SelectButtonSize = ButtonBaseSize;\nexport type SelectButtonSize = ButtonBaseSize;\n\n/**\n * SelectButton — trailing arrow direction (maps to platform arrow icons).\n * Convert from enum to const object (ADR-0003).\n */\nexport const SelectButtonEndArrow = {\n Up: 'up',\n Down: 'down',\n Left: 'left',\n Right: 'right',\n} as const;\nexport type SelectButtonEndArrow =\n (typeof SelectButtonEndArrow)[keyof typeof SelectButtonEndArrow];\n\n/**\n * SelectButton visual variant (ADR-0003).\n * `primary` matches ButtonSecondary; `secondary` and `tertiary` match ButtonTertiary container styling.\n */\nexport const SelectButtonVariant = {\n Primary: 'primary',\n Secondary: 'secondary',\n Tertiary: 'tertiary',\n} as const;\nexport type SelectButtonVariant =\n (typeof SelectButtonVariant)[keyof typeof SelectButtonVariant];\n\n/**\n * SelectButton component shared props (ADR-0004).\n */\nexport type SelectButtonPropsShared = {\n /**\n * Label shown when `value` is `undefined` or `null`. Optional: when neither `value` nor `placeholder` resolves to a non-empty string, no label is rendered and the control needs an accessible name (`aria-label` on web, `accessibilityLabel` on React Native).\n */\n placeholder?: string;\n /**\n * Height size of the button. Maps 1:1 to ButtonBaseSize values.\n *\n * @default Sm\n */\n size?: SelectButtonSize;\n /**\n * Selected label text. When `undefined` or `null`, `placeholder` is rendered instead. When the resolved label is `undefined`, `null`, or an empty string, no label is rendered.\n */\n value?: string | null;\n /**\n * Visual variant: `primary` matches ButtonSecondary; `secondary` and `tertiary` match ButtonTertiary row styling; `tertiary` uses alternative text and trailing arrow icon color.\n *\n * @default primary\n */\n variant?: SelectButtonVariant;\n /**\n * Optional node rendered before the label (for example an icon).\n */\n startAccessory?: ReactNode;\n /**\n * Maps to the trailing arrow `Icon` at the end of the row.\n * Defaults to `down` when neither `hideEndArrow` nor `endAccessory` is used.\n * When `endAccessory` is passed and this prop is omitted, `endAccessory` is shown instead of the arrow.\n * When both are passed, `endArrowDirection` takes precedence and `endAccessory` is ignored.\n *\n * @default down (when no `endAccessory`)\n */\n endArrowDirection?: SelectButtonEndArrow;\n /**\n * When `true`, the trailing arrow is not rendered (`endAccessory` may still render).\n *\n * @default false\n */\n hideEndArrow?: boolean;\n /**\n * Optional node at the end of the row when no trailing arrow is shown (for example a custom icon or badge).\n */\n endAccessory?: ReactNode;\n /**\n * When true, disables the root control and applies disabled presentation.\n *\n * @default false\n */\n isDisabled?: boolean;\n};\n"]}
@@ -36,9 +36,9 @@ export type SelectButtonVariant = (typeof SelectButtonVariant)[keyof typeof Sele
36
36
  */
37
37
  export type SelectButtonPropsShared = {
38
38
  /**
39
- * Label shown when `value` is `undefined` or `null`. Only those two are treated as “no selection”; other falsy values (for example `””`) still render as `value`.
39
+ * Label shown when `value` is `undefined` or `null`. Optional: when neither `value` nor `placeholder` resolves to a non-empty string, no label is rendered and the control needs an accessible name (`aria-label` on web, `accessibilityLabel` on React Native).
40
40
  */
41
- placeholder: string;
41
+ placeholder?: string;
42
42
  /**
43
43
  * Height size of the button. Maps 1:1 to ButtonBaseSize values.
44
44
  *
@@ -46,7 +46,7 @@ export type SelectButtonPropsShared = {
46
46
  */
47
47
  size?: SelectButtonSize;
48
48
  /**
49
- * Selected label text. When `undefined` or `null`, `placeholder` is rendered instead.
49
+ * Selected label text. When `undefined` or `null`, `placeholder` is rendered instead. When the resolved label is `undefined`, `null`, or an empty string, no label is rendered.
50
50
  */
51
51
  value?: string | null;
52
52
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"SelectButton.types.d.cts","sourceRoot":"","sources":["../../../src/types/SelectButton/SelectButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AAEvC,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAEhE;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;CAAiB,CAAC;AAC/C,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC;AAE9C;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;CAKvB,CAAC;AACX,MAAM,MAAM,oBAAoB,GAC9B,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AAEnE;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;CAItB,CAAC;AACX,MAAM,MAAM,mBAAmB,GAC7B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;;;OAIG;IACH,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B;;OAEG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,oBAAoB,CAAC;IACzC;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC"}
1
+ {"version":3,"file":"SelectButton.types.d.cts","sourceRoot":"","sources":["../../../src/types/SelectButton/SelectButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AAEvC,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAEhE;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;CAAiB,CAAC;AAC/C,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC;AAE9C;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;CAKvB,CAAC;AACX,MAAM,MAAM,oBAAoB,GAC9B,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AAEnE;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;CAItB,CAAC;AACX,MAAM,MAAM,mBAAmB,GAC7B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;;;OAIG;IACH,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B;;OAEG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,oBAAoB,CAAC;IACzC;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC"}
@@ -36,9 +36,9 @@ export type SelectButtonVariant = (typeof SelectButtonVariant)[keyof typeof Sele
36
36
  */
37
37
  export type SelectButtonPropsShared = {
38
38
  /**
39
- * Label shown when `value` is `undefined` or `null`. Only those two are treated as “no selection”; other falsy values (for example `””`) still render as `value`.
39
+ * Label shown when `value` is `undefined` or `null`. Optional: when neither `value` nor `placeholder` resolves to a non-empty string, no label is rendered and the control needs an accessible name (`aria-label` on web, `accessibilityLabel` on React Native).
40
40
  */
41
- placeholder: string;
41
+ placeholder?: string;
42
42
  /**
43
43
  * Height size of the button. Maps 1:1 to ButtonBaseSize values.
44
44
  *
@@ -46,7 +46,7 @@ export type SelectButtonPropsShared = {
46
46
  */
47
47
  size?: SelectButtonSize;
48
48
  /**
49
- * Selected label text. When `undefined` or `null`, `placeholder` is rendered instead.
49
+ * Selected label text. When `undefined` or `null`, `placeholder` is rendered instead. When the resolved label is `undefined`, `null`, or an empty string, no label is rendered.
50
50
  */
51
51
  value?: string | null;
52
52
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"SelectButton.types.d.mts","sourceRoot":"","sources":["../../../src/types/SelectButton/SelectButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AAEvC,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAEhE;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;CAAiB,CAAC;AAC/C,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC;AAE9C;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;CAKvB,CAAC;AACX,MAAM,MAAM,oBAAoB,GAC9B,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AAEnE;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;CAItB,CAAC;AACX,MAAM,MAAM,mBAAmB,GAC7B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;;;OAIG;IACH,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B;;OAEG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,oBAAoB,CAAC;IACzC;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC"}
1
+ {"version":3,"file":"SelectButton.types.d.mts","sourceRoot":"","sources":["../../../src/types/SelectButton/SelectButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AAEvC,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAEhE;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;CAAiB,CAAC;AAC/C,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC;AAE9C;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;CAKvB,CAAC;AACX,MAAM,MAAM,oBAAoB,GAC9B,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AAEnE;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;CAItB,CAAC;AACX,MAAM,MAAM,mBAAmB,GAC7B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;;;OAIG;IACH,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B;;OAEG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,oBAAoB,CAAC;IACzC;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SelectButton.types.mjs","sourceRoot":"","sources":["../../../src/types/SelectButton/SelectButton.types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAEhE;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,cAAc,CAAC;AAG/C;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,EAAE,EAAE,IAAI;IACR,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;CACN,CAAC;AAIX;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;CACZ,CAAC","sourcesContent":["import type { ReactNode } from 'react';\n\nimport { ButtonBaseSize } from '../ButtonBase/ButtonBase.types';\n\n/**\n * SelectButton size options (ADR-0003).\n * Alias to ButtonBaseSize to keep values in sync.\n */\nexport const SelectButtonSize = ButtonBaseSize;\nexport type SelectButtonSize = ButtonBaseSize;\n\n/**\n * SelectButton — trailing arrow direction (maps to platform arrow icons).\n * Convert from enum to const object (ADR-0003).\n */\nexport const SelectButtonEndArrow = {\n Up: 'up',\n Down: 'down',\n Left: 'left',\n Right: 'right',\n} as const;\nexport type SelectButtonEndArrow =\n (typeof SelectButtonEndArrow)[keyof typeof SelectButtonEndArrow];\n\n/**\n * SelectButton visual variant (ADR-0003).\n * `primary` matches ButtonSecondary; `secondary` and `tertiary` match ButtonTertiary container styling.\n */\nexport const SelectButtonVariant = {\n Primary: 'primary',\n Secondary: 'secondary',\n Tertiary: 'tertiary',\n} as const;\nexport type SelectButtonVariant =\n (typeof SelectButtonVariant)[keyof typeof SelectButtonVariant];\n\n/**\n * SelectButton component shared props (ADR-0004).\n */\nexport type SelectButtonPropsShared = {\n /**\n * Label shown when `value` is `undefined` or `null`. Only those two are treated as “no selection”; other falsy values (for example `””`) still render as `value`.\n */\n placeholder: string;\n /**\n * Height size of the button. Maps 1:1 to ButtonBaseSize values.\n *\n * @default Sm\n */\n size?: SelectButtonSize;\n /**\n * Selected label text. When `undefined` or `null`, `placeholder` is rendered instead.\n */\n value?: string | null;\n /**\n * Visual variant: `primary` matches ButtonSecondary; `secondary` and `tertiary` match ButtonTertiary row styling; `tertiary` uses alternative text and trailing arrow icon color.\n *\n * @default primary\n */\n variant?: SelectButtonVariant;\n /**\n * Optional node rendered before the label (for example an icon).\n */\n startAccessory?: ReactNode;\n /**\n * Maps to the trailing arrow `Icon` at the end of the row.\n * Defaults to `down` when neither `hideEndArrow` nor `endAccessory` is used.\n * When `endAccessory` is passed and this prop is omitted, `endAccessory` is shown instead of the arrow.\n * When both are passed, `endArrowDirection` takes precedence and `endAccessory` is ignored.\n *\n * @default down (when no `endAccessory`)\n */\n endArrowDirection?: SelectButtonEndArrow;\n /**\n * When `true`, the trailing arrow is not rendered (`endAccessory` may still render).\n *\n * @default false\n */\n hideEndArrow?: boolean;\n /**\n * Optional node at the end of the row when no trailing arrow is shown (for example a custom icon or badge).\n */\n endAccessory?: ReactNode;\n /**\n * When true, disables the root control and applies disabled presentation.\n *\n * @default false\n */\n isDisabled?: boolean;\n};\n"]}
1
+ {"version":3,"file":"SelectButton.types.mjs","sourceRoot":"","sources":["../../../src/types/SelectButton/SelectButton.types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAEhE;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,cAAc,CAAC;AAG/C;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,EAAE,EAAE,IAAI;IACR,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;CACN,CAAC;AAIX;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;CACZ,CAAC","sourcesContent":["import type { ReactNode } from 'react';\n\nimport { ButtonBaseSize } from '../ButtonBase/ButtonBase.types';\n\n/**\n * SelectButton size options (ADR-0003).\n * Alias to ButtonBaseSize to keep values in sync.\n */\nexport const SelectButtonSize = ButtonBaseSize;\nexport type SelectButtonSize = ButtonBaseSize;\n\n/**\n * SelectButton — trailing arrow direction (maps to platform arrow icons).\n * Convert from enum to const object (ADR-0003).\n */\nexport const SelectButtonEndArrow = {\n Up: 'up',\n Down: 'down',\n Left: 'left',\n Right: 'right',\n} as const;\nexport type SelectButtonEndArrow =\n (typeof SelectButtonEndArrow)[keyof typeof SelectButtonEndArrow];\n\n/**\n * SelectButton visual variant (ADR-0003).\n * `primary` matches ButtonSecondary; `secondary` and `tertiary` match ButtonTertiary container styling.\n */\nexport const SelectButtonVariant = {\n Primary: 'primary',\n Secondary: 'secondary',\n Tertiary: 'tertiary',\n} as const;\nexport type SelectButtonVariant =\n (typeof SelectButtonVariant)[keyof typeof SelectButtonVariant];\n\n/**\n * SelectButton component shared props (ADR-0004).\n */\nexport type SelectButtonPropsShared = {\n /**\n * Label shown when `value` is `undefined` or `null`. Optional: when neither `value` nor `placeholder` resolves to a non-empty string, no label is rendered and the control needs an accessible name (`aria-label` on web, `accessibilityLabel` on React Native).\n */\n placeholder?: string;\n /**\n * Height size of the button. Maps 1:1 to ButtonBaseSize values.\n *\n * @default Sm\n */\n size?: SelectButtonSize;\n /**\n * Selected label text. When `undefined` or `null`, `placeholder` is rendered instead. When the resolved label is `undefined`, `null`, or an empty string, no label is rendered.\n */\n value?: string | null;\n /**\n * Visual variant: `primary` matches ButtonSecondary; `secondary` and `tertiary` match ButtonTertiary row styling; `tertiary` uses alternative text and trailing arrow icon color.\n *\n * @default primary\n */\n variant?: SelectButtonVariant;\n /**\n * Optional node rendered before the label (for example an icon).\n */\n startAccessory?: ReactNode;\n /**\n * Maps to the trailing arrow `Icon` at the end of the row.\n * Defaults to `down` when neither `hideEndArrow` nor `endAccessory` is used.\n * When `endAccessory` is passed and this prop is omitted, `endAccessory` is shown instead of the arrow.\n * When both are passed, `endArrowDirection` takes precedence and `endAccessory` is ignored.\n *\n * @default down (when no `endAccessory`)\n */\n endArrowDirection?: SelectButtonEndArrow;\n /**\n * When `true`, the trailing arrow is not rendered (`endAccessory` may still render).\n *\n * @default false\n */\n hideEndArrow?: boolean;\n /**\n * Optional node at the end of the row when no trailing arrow is shown (for example a custom icon or badge).\n */\n endAccessory?: ReactNode;\n /**\n * When true, disables the root control and applies disabled presentation.\n *\n * @default false\n */\n isDisabled?: boolean;\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/design-system-shared",
3
- "version": "0.45.1-preview-473aecb",
3
+ "version": "0.45.1-preview-91ce2ce2",
4
4
  "description": "Shared types for design system libraries",
5
5
  "keywords": [
6
6
  "MetaMask",