@metamask-previews/design-system-shared 0.45.0-preview.12867efa → 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.
Files changed (29) hide show
  1. package/CHANGELOG.md +10 -1
  2. package/dist/types/BoxColumn/BoxColumn.types.cjs.map +1 -1
  3. package/dist/types/BoxColumn/BoxColumn.types.d.cts +2 -0
  4. package/dist/types/BoxColumn/BoxColumn.types.d.cts.map +1 -1
  5. package/dist/types/BoxColumn/BoxColumn.types.d.mts +2 -0
  6. package/dist/types/BoxColumn/BoxColumn.types.d.mts.map +1 -1
  7. package/dist/types/BoxColumn/BoxColumn.types.mjs.map +1 -1
  8. package/dist/types/BoxRow/BoxRow.types.cjs.map +1 -1
  9. package/dist/types/BoxRow/BoxRow.types.d.cts +2 -0
  10. package/dist/types/BoxRow/BoxRow.types.d.cts.map +1 -1
  11. package/dist/types/BoxRow/BoxRow.types.d.mts +2 -0
  12. package/dist/types/BoxRow/BoxRow.types.d.mts.map +1 -1
  13. package/dist/types/BoxRow/BoxRow.types.mjs.map +1 -1
  14. package/dist/types/KeyValueSelect/KeyValueSelect.types.cjs.map +1 -1
  15. package/dist/types/KeyValueSelect/KeyValueSelect.types.d.cts +2 -2
  16. package/dist/types/KeyValueSelect/KeyValueSelect.types.d.mts +2 -2
  17. package/dist/types/KeyValueSelect/KeyValueSelect.types.mjs.map +1 -1
  18. package/dist/types/SelectButton/SelectButton.types.cjs.map +1 -1
  19. package/dist/types/SelectButton/SelectButton.types.d.cts +3 -3
  20. package/dist/types/SelectButton/SelectButton.types.d.cts.map +1 -1
  21. package/dist/types/SelectButton/SelectButton.types.d.mts +3 -3
  22. package/dist/types/SelectButton/SelectButton.types.d.mts.map +1 -1
  23. package/dist/types/SelectButton/SelectButton.types.mjs.map +1 -1
  24. package/dist/utils/caip-address.cjs +5 -6
  25. package/dist/utils/caip-address.cjs.map +1 -1
  26. package/dist/utils/caip-address.mjs.map +1 -1
  27. package/dist/utils/merge-tw-class-name.d.cts.map +1 -1
  28. package/dist/utils/merge-tw-class-name.d.mts.map +1 -1
  29. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.45.1]
11
+
12
+ ### Fixed
13
+
14
+ - Fixed the `MusdFilled` icon artwork to use the Phosphor `currency-circle-dollar` fill, so its dollar sign matches `Musd` ([#1677](https://github.com/MetaMask/metamask-design-system/pull/1677))
15
+ - The vertical stroke sits above and below the S, not through it
16
+ - `IconName.MusdFilled` is unchanged
17
+
10
18
  ## [0.45.0]
11
19
 
12
20
  ### Added
@@ -437,7 +445,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
437
445
  - **Initial release** - MetaMask Design System Shared
438
446
  - Adding CAIP-10 address utilities ([#817](https://github.com/MetaMask/metamask-design-system/pull/817))
439
447
 
440
- [Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-shared@0.45.0...HEAD
448
+ [Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-shared@0.45.1...HEAD
449
+ [0.45.1]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-shared@0.45.0...@metamask/design-system-shared@0.45.1
441
450
  [0.45.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-shared@0.44.0...@metamask/design-system-shared@0.45.0
442
451
  [0.44.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-shared@0.43.0...@metamask/design-system-shared@0.44.0
443
452
  [0.43.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-shared@0.42.0...@metamask/design-system-shared@0.43.0
@@ -1 +1 @@
1
- {"version":3,"file":"BoxColumn.types.cjs","sourceRoot":"","sources":["../../../src/types/BoxColumn/BoxColumn.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from 'react';\n\nimport type { TextOrChildrenPropsShared } from '../TextOrChildren';\n\n/**\n * BoxColumn component shared props (ADR-0004)\n * Platform-independent properties shared across React and React Native.\n */\nexport type BoxColumnPropsShared = TextOrChildrenPropsShared & {\n /**\n * Optional node rendered above the text/children.\n */\n topAccessory?: ReactNode;\n /**\n * Optional node rendered below the text/children.\n */\n bottomAccessory?: ReactNode;\n};\n"]}
1
+ {"version":3,"file":"BoxColumn.types.cjs","sourceRoot":"","sources":["../../../src/types/BoxColumn/BoxColumn.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from 'react';\n\nimport type { TextOrChildrenPropsShared } from '../TextOrChildren';\n\n/**\n * BoxColumn component shared props (ADR-0004)\n * Platform-independent properties shared across React and React Native.\n *\n * @deprecated `BoxColumn` is deprecated in favor of `Box`. This type will be removed in a future major version.\n */\nexport type BoxColumnPropsShared = TextOrChildrenPropsShared & {\n /**\n * Optional node rendered above the text/children.\n */\n topAccessory?: ReactNode;\n /**\n * Optional node rendered below the text/children.\n */\n bottomAccessory?: ReactNode;\n};\n"]}
@@ -3,6 +3,8 @@ import type { TextOrChildrenPropsShared } from "../TextOrChildren/index.cjs";
3
3
  /**
4
4
  * BoxColumn component shared props (ADR-0004)
5
5
  * Platform-independent properties shared across React and React Native.
6
+ *
7
+ * @deprecated `BoxColumn` is deprecated in favor of `Box`. This type will be removed in a future major version.
6
8
  */
7
9
  export type BoxColumnPropsShared = TextOrChildrenPropsShared & {
8
10
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"BoxColumn.types.d.cts","sourceRoot":"","sources":["../../../src/types/BoxColumn/BoxColumn.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AAEvC,OAAO,KAAK,EAAE,yBAAyB,EAAE,oCAA0B;AAEnE;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,yBAAyB,GAAG;IAC7D;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;OAEG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC;CAC7B,CAAC"}
1
+ {"version":3,"file":"BoxColumn.types.d.cts","sourceRoot":"","sources":["../../../src/types/BoxColumn/BoxColumn.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AAEvC,OAAO,KAAK,EAAE,yBAAyB,EAAE,oCAA0B;AAEnE;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,yBAAyB,GAAG;IAC7D;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;OAEG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC;CAC7B,CAAC"}
@@ -3,6 +3,8 @@ import type { TextOrChildrenPropsShared } from "../TextOrChildren/index.mjs";
3
3
  /**
4
4
  * BoxColumn component shared props (ADR-0004)
5
5
  * Platform-independent properties shared across React and React Native.
6
+ *
7
+ * @deprecated `BoxColumn` is deprecated in favor of `Box`. This type will be removed in a future major version.
6
8
  */
7
9
  export type BoxColumnPropsShared = TextOrChildrenPropsShared & {
8
10
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"BoxColumn.types.d.mts","sourceRoot":"","sources":["../../../src/types/BoxColumn/BoxColumn.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AAEvC,OAAO,KAAK,EAAE,yBAAyB,EAAE,oCAA0B;AAEnE;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,yBAAyB,GAAG;IAC7D;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;OAEG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC;CAC7B,CAAC"}
1
+ {"version":3,"file":"BoxColumn.types.d.mts","sourceRoot":"","sources":["../../../src/types/BoxColumn/BoxColumn.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AAEvC,OAAO,KAAK,EAAE,yBAAyB,EAAE,oCAA0B;AAEnE;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,yBAAyB,GAAG;IAC7D;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;OAEG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC;CAC7B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"BoxColumn.types.mjs","sourceRoot":"","sources":["../../../src/types/BoxColumn/BoxColumn.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from 'react';\n\nimport type { TextOrChildrenPropsShared } from '../TextOrChildren';\n\n/**\n * BoxColumn component shared props (ADR-0004)\n * Platform-independent properties shared across React and React Native.\n */\nexport type BoxColumnPropsShared = TextOrChildrenPropsShared & {\n /**\n * Optional node rendered above the text/children.\n */\n topAccessory?: ReactNode;\n /**\n * Optional node rendered below the text/children.\n */\n bottomAccessory?: ReactNode;\n};\n"]}
1
+ {"version":3,"file":"BoxColumn.types.mjs","sourceRoot":"","sources":["../../../src/types/BoxColumn/BoxColumn.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from 'react';\n\nimport type { TextOrChildrenPropsShared } from '../TextOrChildren';\n\n/**\n * BoxColumn component shared props (ADR-0004)\n * Platform-independent properties shared across React and React Native.\n *\n * @deprecated `BoxColumn` is deprecated in favor of `Box`. This type will be removed in a future major version.\n */\nexport type BoxColumnPropsShared = TextOrChildrenPropsShared & {\n /**\n * Optional node rendered above the text/children.\n */\n topAccessory?: ReactNode;\n /**\n * Optional node rendered below the text/children.\n */\n bottomAccessory?: ReactNode;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"BoxRow.types.cjs","sourceRoot":"","sources":["../../../src/types/BoxRow/BoxRow.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from 'react';\n\nimport type { TextOrChildrenPropsShared } from '../TextOrChildren';\n\n/**\n * BoxRow component shared props (ADR-0004)\n * Platform-independent properties shared across React and React Native.\n */\nexport type BoxRowPropsShared = TextOrChildrenPropsShared & {\n /**\n * Optional node rendered before the text/children (e.g. icon, avatar).\n */\n startAccessory?: ReactNode;\n /**\n * Optional node rendered after the text/children (e.g. icon, badge).\n */\n endAccessory?: ReactNode;\n};\n"]}
1
+ {"version":3,"file":"BoxRow.types.cjs","sourceRoot":"","sources":["../../../src/types/BoxRow/BoxRow.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from 'react';\n\nimport type { TextOrChildrenPropsShared } from '../TextOrChildren';\n\n/**\n * BoxRow component shared props (ADR-0004)\n * Platform-independent properties shared across React and React Native.\n *\n * @deprecated `BoxRow` is deprecated in favor of `Box`. This type will be removed in a future major version.\n */\nexport type BoxRowPropsShared = TextOrChildrenPropsShared & {\n /**\n * Optional node rendered before the text/children (e.g. icon, avatar).\n */\n startAccessory?: ReactNode;\n /**\n * Optional node rendered after the text/children (e.g. icon, badge).\n */\n endAccessory?: ReactNode;\n};\n"]}
@@ -3,6 +3,8 @@ import type { TextOrChildrenPropsShared } from "../TextOrChildren/index.cjs";
3
3
  /**
4
4
  * BoxRow component shared props (ADR-0004)
5
5
  * Platform-independent properties shared across React and React Native.
6
+ *
7
+ * @deprecated `BoxRow` is deprecated in favor of `Box`. This type will be removed in a future major version.
6
8
  */
7
9
  export type BoxRowPropsShared = TextOrChildrenPropsShared & {
8
10
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"BoxRow.types.d.cts","sourceRoot":"","sources":["../../../src/types/BoxRow/BoxRow.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AAEvC,OAAO,KAAK,EAAE,yBAAyB,EAAE,oCAA0B;AAEnE;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,yBAAyB,GAAG;IAC1D;;OAEG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;CAC1B,CAAC"}
1
+ {"version":3,"file":"BoxRow.types.d.cts","sourceRoot":"","sources":["../../../src/types/BoxRow/BoxRow.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AAEvC,OAAO,KAAK,EAAE,yBAAyB,EAAE,oCAA0B;AAEnE;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,yBAAyB,GAAG;IAC1D;;OAEG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;CAC1B,CAAC"}
@@ -3,6 +3,8 @@ import type { TextOrChildrenPropsShared } from "../TextOrChildren/index.mjs";
3
3
  /**
4
4
  * BoxRow component shared props (ADR-0004)
5
5
  * Platform-independent properties shared across React and React Native.
6
+ *
7
+ * @deprecated `BoxRow` is deprecated in favor of `Box`. This type will be removed in a future major version.
6
8
  */
7
9
  export type BoxRowPropsShared = TextOrChildrenPropsShared & {
8
10
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"BoxRow.types.d.mts","sourceRoot":"","sources":["../../../src/types/BoxRow/BoxRow.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AAEvC,OAAO,KAAK,EAAE,yBAAyB,EAAE,oCAA0B;AAEnE;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,yBAAyB,GAAG;IAC1D;;OAEG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;CAC1B,CAAC"}
1
+ {"version":3,"file":"BoxRow.types.d.mts","sourceRoot":"","sources":["../../../src/types/BoxRow/BoxRow.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AAEvC,OAAO,KAAK,EAAE,yBAAyB,EAAE,oCAA0B;AAEnE;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,yBAAyB,GAAG;IAC1D;;OAEG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;CAC1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"BoxRow.types.mjs","sourceRoot":"","sources":["../../../src/types/BoxRow/BoxRow.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from 'react';\n\nimport type { TextOrChildrenPropsShared } from '../TextOrChildren';\n\n/**\n * BoxRow component shared props (ADR-0004)\n * Platform-independent properties shared across React and React Native.\n */\nexport type BoxRowPropsShared = TextOrChildrenPropsShared & {\n /**\n * Optional node rendered before the text/children (e.g. icon, avatar).\n */\n startAccessory?: ReactNode;\n /**\n * Optional node rendered after the text/children (e.g. icon, badge).\n */\n endAccessory?: ReactNode;\n};\n"]}
1
+ {"version":3,"file":"BoxRow.types.mjs","sourceRoot":"","sources":["../../../src/types/BoxRow/BoxRow.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from 'react';\n\nimport type { TextOrChildrenPropsShared } from '../TextOrChildren';\n\n/**\n * BoxRow component shared props (ADR-0004)\n * Platform-independent properties shared across React and React Native.\n *\n * @deprecated `BoxRow` is deprecated in favor of `Box`. This type will be removed in a future major version.\n */\nexport type BoxRowPropsShared = TextOrChildrenPropsShared & {\n /**\n * Optional node rendered before the text/children (e.g. icon, avatar).\n */\n startAccessory?: ReactNode;\n /**\n * Optional node rendered after the text/children (e.g. icon, badge).\n */\n endAccessory?: ReactNode;\n};\n"]}
@@ -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"]}
@@ -1,6 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generateIconSeed = exports.isEthereumAddress = exports.generateSeedNonEthereum = exports.generateSeedEthereum = exports.extractAccountAddress = void 0;
3
+ exports.extractAccountAddress = extractAccountAddress;
4
+ exports.generateSeedEthereum = generateSeedEthereum;
5
+ exports.generateSeedNonEthereum = generateSeedNonEthereum;
6
+ exports.isEthereumAddress = isEthereumAddress;
7
+ exports.generateIconSeed = generateIconSeed;
4
8
  const utils_1 = require("@metamask/utils");
5
9
  /**
6
10
  * Extracts the account address from a CAIP-10 formatted address string.
@@ -40,7 +44,6 @@ function extractAccountAddress(address) {
40
44
  // Return the address as-is if it's not CAIP-10 format
41
45
  return address;
42
46
  }
43
- exports.extractAccountAddress = extractAccountAddress;
44
47
  /**
45
48
  * Generates a numeric seed for Ethereum (eip155) addresses.
46
49
  *
@@ -52,7 +55,6 @@ function generateSeedEthereum(address) {
52
55
  const addr = address.slice(2, 10);
53
56
  return parseInt(addr, 16);
54
57
  }
55
- exports.generateSeedEthereum = generateSeedEthereum;
56
58
  /**
57
59
  * Generates a byte-array seed for non-Ethereum addresses (Solana, Bitcoin, etc.).
58
60
  *
@@ -62,7 +64,6 @@ exports.generateSeedEthereum = generateSeedEthereum;
62
64
  function generateSeedNonEthereum(address) {
63
65
  return Array.from((0, utils_1.stringToBytes)(address.normalize('NFKC').toLowerCase()));
64
66
  }
65
- exports.generateSeedNonEthereum = generateSeedNonEthereum;
66
67
  /**
67
68
  * Determines if an address is Ethereum format (starts with 0x).
68
69
  *
@@ -72,7 +73,6 @@ exports.generateSeedNonEthereum = generateSeedNonEthereum;
72
73
  function isEthereumAddress(address) {
73
74
  return address.startsWith('0x');
74
75
  }
75
- exports.isEthereumAddress = isEthereumAddress;
76
76
  /**
77
77
  * Generates an appropriate seed for icon generation based on address format.
78
78
  * Ethereum addresses (0x prefix) use hex parsing, others use byte array.
@@ -85,5 +85,4 @@ function generateIconSeed(address) {
85
85
  ? generateSeedEthereum(address)
86
86
  : generateSeedNonEthereum(address);
87
87
  }
88
- exports.generateIconSeed = generateIconSeed;
89
88
  //# sourceMappingURL=caip-address.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"caip-address.cjs","sourceRoot":"","sources":["../../src/utils/caip-address.ts"],"names":[],"mappings":";;;AAAA,2CAIyB;AAEzB;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,SAAgB,qBAAqB,CAAC,OAAe;IACnD,IAAI;QACF,gCAAgC;QAChC,IAAI,IAAA,uBAAe,EAAC,OAAO,CAAC,EAAE;YAC5B,MAAM,MAAM,GAAG,IAAA,0BAAkB,EAAC,OAAO,CAAC,CAAC;YAC3C,OAAO,MAAM,CAAC,OAAO,CAAC;SACvB;KACF;IAAC,MAAM;QACN,4DAA4D;KAC7D;IAED,sDAAsD;IACtD,OAAO,OAAO,CAAC;AACjB,CAAC;AAbD,sDAaC;AAED;;;;;GAKG;AACH,SAAgB,oBAAoB,CAAC,OAAe;IAClD,oDAAoD;IACpD,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAClC,OAAO,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AAC5B,CAAC;AAJD,oDAIC;AAED;;;;;GAKG;AACH,SAAgB,uBAAuB,CAAC,OAAe;IACrD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAA,qBAAa,EAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;AAC5E,CAAC;AAFD,0DAEC;AAED;;;;;GAKG;AACH,SAAgB,iBAAiB,CAAC,OAAe;IAC/C,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AAFD,8CAEC;AAED;;;;;;GAMG;AACH,SAAgB,gBAAgB,CAAC,OAAe;IAC9C,OAAO,iBAAiB,CAAC,OAAO,CAAC;QAC/B,CAAC,CAAC,oBAAoB,CAAC,OAAO,CAAC;QAC/B,CAAC,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;AACvC,CAAC;AAJD,4CAIC","sourcesContent":["import {\n parseCaipAccountId,\n isCaipAccountId,\n stringToBytes,\n} from '@metamask/utils';\n\n/**\n * Extracts the account address from a CAIP-10 formatted address string.\n *\n * For CAIP-10 addresses like \"eip155:1:0x9Cbf7c41B7787F6c621115010D3B044029FE2Ce8\",\n * this returns just the address part: \"0x9Cbf7c41B7787F6c621115010D3B044029FE2Ce8\".\n *\n * This ensures that both legacy addresses and CAIP-10 addresses generate\n * the same icon, regardless of network specification.\n *\n * @param address - The address string (either legacy format or CAIP-10)\n * @returns The extracted account address\n *\n * @example\n * extractAccountAddress('0x9Cbf7c41B7787F6c621115010D3B044029FE2Ce8')\n * Returns: '0x9Cbf7c41B7787F6c621115010D3B044029FE2Ce8'\n *\n * @example\n * extractAccountAddress('eip155:1:0x9Cbf7c41B7787F6c621115010D3B044029FE2Ce8')\n * Returns: '0x9Cbf7c41B7787F6c621115010D3B044029FE2Ce8'\n *\n * @example\n * extractAccountAddress('solana:mainnet:4Nd1m3NnENa8h8Xte1Xr7s9jcvKqqm21z3FvY9hKg4s7')\n * Returns: '4Nd1m3NnENa8h8Xte1Xr7s9jcvKqqm21z3FvY9hKg4s7'\n */\nexport function extractAccountAddress(address: string): string {\n try {\n // Try to parse as CAIP-10 first\n if (isCaipAccountId(address)) {\n const parsed = parseCaipAccountId(address);\n return parsed.address;\n }\n } catch {\n // If parsing fails, fall through to return original address\n }\n\n // Return the address as-is if it's not CAIP-10 format\n return address;\n}\n\n/**\n * Generates a numeric seed for Ethereum (eip155) addresses.\n *\n * @param address - The Ethereum address to generate a seed from\n * @returns A numeric seed for icon generation\n */\nexport function generateSeedEthereum(address: string): number {\n // Parse the first 8 chars of the address after '0x'\n const addr = address.slice(2, 10);\n return parseInt(addr, 16);\n}\n\n/**\n * Generates a byte-array seed for non-Ethereum addresses (Solana, Bitcoin, etc.).\n *\n * @param address - The address to generate a byte array seed from\n * @returns An array of numbers representing the bytes of the address\n */\nexport function generateSeedNonEthereum(address: string): number[] {\n return Array.from(stringToBytes(address.normalize('NFKC').toLowerCase()));\n}\n\n/**\n * Determines if an address is Ethereum format (starts with 0x).\n *\n * @param address - The address to check\n * @returns True if Ethereum format, false otherwise\n */\nexport function isEthereumAddress(address: string): boolean {\n return address.startsWith('0x');\n}\n\n/**\n * Generates an appropriate seed for icon generation based on address format.\n * Ethereum addresses (0x prefix) use hex parsing, others use byte array.\n *\n * @param address - The address to generate a seed from (should be extracted first)\n * @returns A seed for icon generation (number for Ethereum, number[] for others)\n */\nexport function generateIconSeed(address: string): number | number[] {\n return isEthereumAddress(address)\n ? generateSeedEthereum(address)\n : generateSeedNonEthereum(address);\n}\n"]}
1
+ {"version":3,"file":"caip-address.cjs","sourceRoot":"","sources":["../../src/utils/caip-address.ts"],"names":[],"mappings":";;AA8BA,sDAaC;AAQD,oDAIC;AAQD,0DAEC;AAQD,8CAEC;AASD,4CAIC;AAxFD,2CAIyB;AAEzB;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,SAAgB,qBAAqB,CAAC,OAAe;IACnD,IAAI,CAAC;QACH,gCAAgC;QAChC,IAAI,IAAA,uBAAe,EAAC,OAAO,CAAC,EAAE,CAAC;YAC7B,MAAM,MAAM,GAAG,IAAA,0BAAkB,EAAC,OAAO,CAAC,CAAC;YAC3C,OAAO,MAAM,CAAC,OAAO,CAAC;QACxB,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,4DAA4D;IAC9D,CAAC;IAED,sDAAsD;IACtD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;GAKG;AACH,SAAgB,oBAAoB,CAAC,OAAe;IAClD,oDAAoD;IACpD,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAClC,OAAO,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AAC5B,CAAC;AAED;;;;;GAKG;AACH,SAAgB,uBAAuB,CAAC,OAAe;IACrD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAA,qBAAa,EAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;AAC5E,CAAC;AAED;;;;;GAKG;AACH,SAAgB,iBAAiB,CAAC,OAAe;IAC/C,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,gBAAgB,CAAC,OAAe;IAC9C,OAAO,iBAAiB,CAAC,OAAO,CAAC;QAC/B,CAAC,CAAC,oBAAoB,CAAC,OAAO,CAAC;QAC/B,CAAC,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;AACvC,CAAC","sourcesContent":["import {\n parseCaipAccountId,\n isCaipAccountId,\n stringToBytes,\n} from '@metamask/utils';\n\n/**\n * Extracts the account address from a CAIP-10 formatted address string.\n *\n * For CAIP-10 addresses like \"eip155:1:0x9Cbf7c41B7787F6c621115010D3B044029FE2Ce8\",\n * this returns just the address part: \"0x9Cbf7c41B7787F6c621115010D3B044029FE2Ce8\".\n *\n * This ensures that both legacy addresses and CAIP-10 addresses generate\n * the same icon, regardless of network specification.\n *\n * @param address - The address string (either legacy format or CAIP-10)\n * @returns The extracted account address\n *\n * @example\n * extractAccountAddress('0x9Cbf7c41B7787F6c621115010D3B044029FE2Ce8')\n * Returns: '0x9Cbf7c41B7787F6c621115010D3B044029FE2Ce8'\n *\n * @example\n * extractAccountAddress('eip155:1:0x9Cbf7c41B7787F6c621115010D3B044029FE2Ce8')\n * Returns: '0x9Cbf7c41B7787F6c621115010D3B044029FE2Ce8'\n *\n * @example\n * extractAccountAddress('solana:mainnet:4Nd1m3NnENa8h8Xte1Xr7s9jcvKqqm21z3FvY9hKg4s7')\n * Returns: '4Nd1m3NnENa8h8Xte1Xr7s9jcvKqqm21z3FvY9hKg4s7'\n */\nexport function extractAccountAddress(address: string): string {\n try {\n // Try to parse as CAIP-10 first\n if (isCaipAccountId(address)) {\n const parsed = parseCaipAccountId(address);\n return parsed.address;\n }\n } catch {\n // If parsing fails, fall through to return original address\n }\n\n // Return the address as-is if it's not CAIP-10 format\n return address;\n}\n\n/**\n * Generates a numeric seed for Ethereum (eip155) addresses.\n *\n * @param address - The Ethereum address to generate a seed from\n * @returns A numeric seed for icon generation\n */\nexport function generateSeedEthereum(address: string): number {\n // Parse the first 8 chars of the address after '0x'\n const addr = address.slice(2, 10);\n return parseInt(addr, 16);\n}\n\n/**\n * Generates a byte-array seed for non-Ethereum addresses (Solana, Bitcoin, etc.).\n *\n * @param address - The address to generate a byte array seed from\n * @returns An array of numbers representing the bytes of the address\n */\nexport function generateSeedNonEthereum(address: string): number[] {\n return Array.from(stringToBytes(address.normalize('NFKC').toLowerCase()));\n}\n\n/**\n * Determines if an address is Ethereum format (starts with 0x).\n *\n * @param address - The address to check\n * @returns True if Ethereum format, false otherwise\n */\nexport function isEthereumAddress(address: string): boolean {\n return address.startsWith('0x');\n}\n\n/**\n * Generates an appropriate seed for icon generation based on address format.\n * Ethereum addresses (0x prefix) use hex parsing, others use byte array.\n *\n * @param address - The address to generate a seed from (should be extracted first)\n * @returns A seed for icon generation (number for Ethereum, number[] for others)\n */\nexport function generateIconSeed(address: string): number | number[] {\n return isEthereumAddress(address)\n ? generateSeedEthereum(address)\n : generateSeedNonEthereum(address);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"caip-address.mjs","sourceRoot":"","sources":["../../src/utils/caip-address.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,aAAa,EACd,wBAAwB;AAEzB;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,qBAAqB,CAAC,OAAe;IACnD,IAAI;QACF,gCAAgC;QAChC,IAAI,eAAe,CAAC,OAAO,CAAC,EAAE;YAC5B,MAAM,MAAM,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;YAC3C,OAAO,MAAM,CAAC,OAAO,CAAC;SACvB;KACF;IAAC,MAAM;QACN,4DAA4D;KAC7D;IAED,sDAAsD;IACtD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAe;IAClD,oDAAoD;IACpD,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAClC,OAAO,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AAC5B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CAAC,OAAe;IACrD,OAAO,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;AAC5E,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAe;IAC/C,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAe;IAC9C,OAAO,iBAAiB,CAAC,OAAO,CAAC;QAC/B,CAAC,CAAC,oBAAoB,CAAC,OAAO,CAAC;QAC/B,CAAC,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;AACvC,CAAC","sourcesContent":["import {\n parseCaipAccountId,\n isCaipAccountId,\n stringToBytes,\n} from '@metamask/utils';\n\n/**\n * Extracts the account address from a CAIP-10 formatted address string.\n *\n * For CAIP-10 addresses like \"eip155:1:0x9Cbf7c41B7787F6c621115010D3B044029FE2Ce8\",\n * this returns just the address part: \"0x9Cbf7c41B7787F6c621115010D3B044029FE2Ce8\".\n *\n * This ensures that both legacy addresses and CAIP-10 addresses generate\n * the same icon, regardless of network specification.\n *\n * @param address - The address string (either legacy format or CAIP-10)\n * @returns The extracted account address\n *\n * @example\n * extractAccountAddress('0x9Cbf7c41B7787F6c621115010D3B044029FE2Ce8')\n * Returns: '0x9Cbf7c41B7787F6c621115010D3B044029FE2Ce8'\n *\n * @example\n * extractAccountAddress('eip155:1:0x9Cbf7c41B7787F6c621115010D3B044029FE2Ce8')\n * Returns: '0x9Cbf7c41B7787F6c621115010D3B044029FE2Ce8'\n *\n * @example\n * extractAccountAddress('solana:mainnet:4Nd1m3NnENa8h8Xte1Xr7s9jcvKqqm21z3FvY9hKg4s7')\n * Returns: '4Nd1m3NnENa8h8Xte1Xr7s9jcvKqqm21z3FvY9hKg4s7'\n */\nexport function extractAccountAddress(address: string): string {\n try {\n // Try to parse as CAIP-10 first\n if (isCaipAccountId(address)) {\n const parsed = parseCaipAccountId(address);\n return parsed.address;\n }\n } catch {\n // If parsing fails, fall through to return original address\n }\n\n // Return the address as-is if it's not CAIP-10 format\n return address;\n}\n\n/**\n * Generates a numeric seed for Ethereum (eip155) addresses.\n *\n * @param address - The Ethereum address to generate a seed from\n * @returns A numeric seed for icon generation\n */\nexport function generateSeedEthereum(address: string): number {\n // Parse the first 8 chars of the address after '0x'\n const addr = address.slice(2, 10);\n return parseInt(addr, 16);\n}\n\n/**\n * Generates a byte-array seed for non-Ethereum addresses (Solana, Bitcoin, etc.).\n *\n * @param address - The address to generate a byte array seed from\n * @returns An array of numbers representing the bytes of the address\n */\nexport function generateSeedNonEthereum(address: string): number[] {\n return Array.from(stringToBytes(address.normalize('NFKC').toLowerCase()));\n}\n\n/**\n * Determines if an address is Ethereum format (starts with 0x).\n *\n * @param address - The address to check\n * @returns True if Ethereum format, false otherwise\n */\nexport function isEthereumAddress(address: string): boolean {\n return address.startsWith('0x');\n}\n\n/**\n * Generates an appropriate seed for icon generation based on address format.\n * Ethereum addresses (0x prefix) use hex parsing, others use byte array.\n *\n * @param address - The address to generate a seed from (should be extracted first)\n * @returns A seed for icon generation (number for Ethereum, number[] for others)\n */\nexport function generateIconSeed(address: string): number | number[] {\n return isEthereumAddress(address)\n ? generateSeedEthereum(address)\n : generateSeedNonEthereum(address);\n}\n"]}
1
+ {"version":3,"file":"caip-address.mjs","sourceRoot":"","sources":["../../src/utils/caip-address.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,aAAa,EACd,wBAAwB;AAEzB;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,qBAAqB,CAAC,OAAe;IACnD,IAAI,CAAC;QACH,gCAAgC;QAChC,IAAI,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC;YAC7B,MAAM,MAAM,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;YAC3C,OAAO,MAAM,CAAC,OAAO,CAAC;QACxB,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,4DAA4D;IAC9D,CAAC;IAED,sDAAsD;IACtD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAe;IAClD,oDAAoD;IACpD,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAClC,OAAO,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AAC5B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CAAC,OAAe;IACrD,OAAO,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;AAC5E,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAe;IAC/C,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAe;IAC9C,OAAO,iBAAiB,CAAC,OAAO,CAAC;QAC/B,CAAC,CAAC,oBAAoB,CAAC,OAAO,CAAC;QAC/B,CAAC,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;AACvC,CAAC","sourcesContent":["import {\n parseCaipAccountId,\n isCaipAccountId,\n stringToBytes,\n} from '@metamask/utils';\n\n/**\n * Extracts the account address from a CAIP-10 formatted address string.\n *\n * For CAIP-10 addresses like \"eip155:1:0x9Cbf7c41B7787F6c621115010D3B044029FE2Ce8\",\n * this returns just the address part: \"0x9Cbf7c41B7787F6c621115010D3B044029FE2Ce8\".\n *\n * This ensures that both legacy addresses and CAIP-10 addresses generate\n * the same icon, regardless of network specification.\n *\n * @param address - The address string (either legacy format or CAIP-10)\n * @returns The extracted account address\n *\n * @example\n * extractAccountAddress('0x9Cbf7c41B7787F6c621115010D3B044029FE2Ce8')\n * Returns: '0x9Cbf7c41B7787F6c621115010D3B044029FE2Ce8'\n *\n * @example\n * extractAccountAddress('eip155:1:0x9Cbf7c41B7787F6c621115010D3B044029FE2Ce8')\n * Returns: '0x9Cbf7c41B7787F6c621115010D3B044029FE2Ce8'\n *\n * @example\n * extractAccountAddress('solana:mainnet:4Nd1m3NnENa8h8Xte1Xr7s9jcvKqqm21z3FvY9hKg4s7')\n * Returns: '4Nd1m3NnENa8h8Xte1Xr7s9jcvKqqm21z3FvY9hKg4s7'\n */\nexport function extractAccountAddress(address: string): string {\n try {\n // Try to parse as CAIP-10 first\n if (isCaipAccountId(address)) {\n const parsed = parseCaipAccountId(address);\n return parsed.address;\n }\n } catch {\n // If parsing fails, fall through to return original address\n }\n\n // Return the address as-is if it's not CAIP-10 format\n return address;\n}\n\n/**\n * Generates a numeric seed for Ethereum (eip155) addresses.\n *\n * @param address - The Ethereum address to generate a seed from\n * @returns A numeric seed for icon generation\n */\nexport function generateSeedEthereum(address: string): number {\n // Parse the first 8 chars of the address after '0x'\n const addr = address.slice(2, 10);\n return parseInt(addr, 16);\n}\n\n/**\n * Generates a byte-array seed for non-Ethereum addresses (Solana, Bitcoin, etc.).\n *\n * @param address - The address to generate a byte array seed from\n * @returns An array of numbers representing the bytes of the address\n */\nexport function generateSeedNonEthereum(address: string): number[] {\n return Array.from(stringToBytes(address.normalize('NFKC').toLowerCase()));\n}\n\n/**\n * Determines if an address is Ethereum format (starts with 0x).\n *\n * @param address - The address to check\n * @returns True if Ethereum format, false otherwise\n */\nexport function isEthereumAddress(address: string): boolean {\n return address.startsWith('0x');\n}\n\n/**\n * Generates an appropriate seed for icon generation based on address format.\n * Ethereum addresses (0x prefix) use hex parsing, others use byte array.\n *\n * @param address - The address to generate a seed from (should be extracted first)\n * @returns A seed for icon generation (number for Ethereum, number[] for others)\n */\nexport function generateIconSeed(address: string): number | number[] {\n return isEthereumAddress(address)\n ? generateSeedEthereum(address)\n : generateSeedNonEthereum(address);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"merge-tw-class-name.d.cts","sourceRoot":"","sources":["../../src/utils/merge-tw-class-name.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,gBAAgB,SAAU,MAAM,UAAU,MAAM,KAAG,MAC7B,CAAC"}
1
+ {"version":3,"file":"merge-tw-class-name.d.cts","sourceRoot":"","sources":["../../src/utils/merge-tw-class-name.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,EAAE,QAAQ,MAAM,KAAG,MAC7B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"merge-tw-class-name.d.mts","sourceRoot":"","sources":["../../src/utils/merge-tw-class-name.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,gBAAgB,SAAU,MAAM,UAAU,MAAM,KAAG,MAC7B,CAAC"}
1
+ {"version":3,"file":"merge-tw-class-name.d.mts","sourceRoot":"","sources":["../../src/utils/merge-tw-class-name.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,EAAE,QAAQ,MAAM,KAAG,MAC7B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/design-system-shared",
3
- "version": "0.45.0-preview.12867efa",
3
+ "version": "0.45.1-preview-91ce2ce2",
4
4
  "description": "Shared types for design system libraries",
5
5
  "keywords": [
6
6
  "MetaMask",
@@ -64,7 +64,7 @@
64
64
  "react-test-renderer": "19.2.3",
65
65
  "ts-jest": "^29.2.5",
66
66
  "tsx": "^4.23.15",
67
- "typescript": "~5.2.2"
67
+ "typescript": "~5.9.3"
68
68
  },
69
69
  "peerDependencies": {
70
70
  "react": "^17.0.0 || ^18.0.0 || ^19.0.0"