@metamask-previews/design-system-react 0.0.0-preview.ff8ed96 → 0.2.0-preview.a7d80d5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.cjs +1 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.cjs.map +1 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.mjs +1 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.mjs.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.cjs +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.cjs.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.mjs +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.mjs.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.cjs +1 -1
- package/dist/components/AvatarToken/AvatarToken.cjs.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.mjs +1 -1
- package/dist/components/AvatarToken/AvatarToken.mjs.map +1 -1
- package/dist/components/BadgeIcon/BadgeIcon.cjs +1 -1
- package/dist/components/BadgeIcon/BadgeIcon.cjs.map +1 -1
- package/dist/components/BadgeIcon/BadgeIcon.mjs +1 -1
- package/dist/components/BadgeIcon/BadgeIcon.mjs.map +1 -1
- package/dist/components/Box/Box.cjs +16 -2
- package/dist/components/Box/Box.cjs.map +1 -1
- package/dist/components/Box/Box.constants.cjs +218 -1
- package/dist/components/Box/Box.constants.cjs.map +1 -1
- package/dist/components/Box/Box.constants.d.cts +16 -1
- package/dist/components/Box/Box.constants.d.cts.map +1 -1
- package/dist/components/Box/Box.constants.d.mts +16 -1
- package/dist/components/Box/Box.constants.d.mts.map +1 -1
- package/dist/components/Box/Box.constants.mjs +217 -0
- package/dist/components/Box/Box.constants.mjs.map +1 -1
- package/dist/components/Box/Box.d.cts +1 -1
- package/dist/components/Box/Box.d.cts.map +1 -1
- package/dist/components/Box/Box.d.mts +1 -1
- package/dist/components/Box/Box.d.mts.map +1 -1
- package/dist/components/Box/Box.mjs +17 -3
- package/dist/components/Box/Box.mjs.map +1 -1
- package/dist/components/Box/Box.types.cjs.map +1 -1
- package/dist/components/Box/Box.types.d.cts +84 -1
- package/dist/components/Box/Box.types.d.cts.map +1 -1
- package/dist/components/Box/Box.types.d.mts +84 -1
- package/dist/components/Box/Box.types.d.mts.map +1 -1
- package/dist/components/Box/Box.types.mjs.map +1 -1
- package/dist/components/Box/index.cjs +3 -1
- package/dist/components/Box/index.cjs.map +1 -1
- package/dist/components/Box/index.d.cts +1 -1
- package/dist/components/Box/index.d.cts.map +1 -1
- package/dist/components/Box/index.d.mts +1 -1
- package/dist/components/Box/index.d.mts.map +1 -1
- package/dist/components/Box/index.mjs +1 -1
- package/dist/components/Box/index.mjs.map +1 -1
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.cjs +8 -6
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.cjs.map +1 -1
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.d.cts.map +1 -1
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.d.mts.map +1 -1
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.mjs +8 -6
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.mjs.map +1 -1
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.cjs +12 -12
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.cjs.map +1 -1
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.d.cts.map +1 -1
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.d.mts.map +1 -1
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.mjs +12 -12
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.mjs.map +1 -1
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.cjs +3 -1
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.cjs.map +1 -1
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.d.cts.map +1 -1
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.d.mts.map +1 -1
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.mjs +3 -1
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.mjs.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.cjs +20 -12
- package/dist/components/ButtonBase/ButtonBase.cjs.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.constants.cjs +2 -2
- package/dist/components/ButtonBase/ButtonBase.constants.cjs.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.constants.d.cts +1 -1
- package/dist/components/ButtonBase/ButtonBase.constants.d.cts.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.constants.d.mts +1 -1
- package/dist/components/ButtonBase/ButtonBase.constants.d.mts.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.constants.mjs +1 -1
- package/dist/components/ButtonBase/ButtonBase.constants.mjs.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.d.cts.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.d.mts.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.mjs +21 -13
- package/dist/components/ButtonBase/ButtonBase.mjs.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.types.cjs.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.types.d.cts +35 -0
- package/dist/components/ButtonBase/ButtonBase.types.d.cts.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.types.d.mts +35 -0
- package/dist/components/ButtonBase/ButtonBase.types.d.mts.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.types.mjs.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.cjs +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.cjs.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.mjs +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.mjs.map +1 -1
- package/dist/components/Checkbox/Checkbox.cjs +2 -2
- package/dist/components/Checkbox/Checkbox.cjs.map +1 -1
- package/dist/components/Checkbox/Checkbox.mjs +2 -2
- package/dist/components/Checkbox/Checkbox.mjs.map +1 -1
- package/dist/components/Icon/Icon.cjs +1 -1
- package/dist/components/Icon/Icon.cjs.map +1 -1
- package/dist/components/Icon/Icon.constants.cjs +2 -2
- package/dist/components/Icon/Icon.constants.cjs.map +1 -1
- package/dist/components/Icon/Icon.constants.d.cts +1 -1
- package/dist/components/Icon/Icon.constants.d.cts.map +1 -1
- package/dist/components/Icon/Icon.constants.d.mts +1 -1
- package/dist/components/Icon/Icon.constants.d.mts.map +1 -1
- package/dist/components/Icon/Icon.constants.mjs +1 -1
- package/dist/components/Icon/Icon.constants.mjs.map +1 -1
- package/dist/components/Icon/Icon.mjs +2 -2
- package/dist/components/Icon/Icon.mjs.map +1 -1
- package/dist/components/Text/Text.constants.cjs +15 -0
- package/dist/components/Text/Text.constants.cjs.map +1 -1
- package/dist/components/Text/Text.constants.d.cts.map +1 -1
- package/dist/components/Text/Text.constants.d.mts.map +1 -1
- package/dist/components/Text/Text.constants.mjs +15 -0
- package/dist/components/Text/Text.constants.mjs.map +1 -1
- package/dist/components/Text/Text.types.cjs.map +1 -1
- package/dist/components/Text/Text.types.d.cts +1 -1
- package/dist/components/Text/Text.types.d.mts +1 -1
- package/dist/components/Text/Text.types.mjs.map +1 -1
- package/dist/components/TextButton/TextButton.cjs +1 -1
- package/dist/components/TextButton/TextButton.cjs.map +1 -1
- package/dist/components/TextButton/TextButton.mjs +1 -1
- package/dist/components/TextButton/TextButton.mjs.map +1 -1
- package/dist/components/index.cjs +4 -2
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +1 -1
- package/dist/components/index.d.cts.map +1 -1
- package/dist/components/index.d.mts +1 -1
- package/dist/components/index.d.mts.map +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/components/index.mjs.map +1 -1
- package/dist/components/temp-components/Jazzicon/Jazzicon.cjs +5 -2
- package/dist/components/temp-components/Jazzicon/Jazzicon.cjs.map +1 -1
- package/dist/components/temp-components/Jazzicon/Jazzicon.d.cts.map +1 -1
- package/dist/components/temp-components/Jazzicon/Jazzicon.d.mts.map +1 -1
- package/dist/components/temp-components/Jazzicon/Jazzicon.mjs +5 -2
- package/dist/components/temp-components/Jazzicon/Jazzicon.mjs.map +1 -1
- package/dist/components/temp-components/Jazzicon/Jazzicon.utilities.cjs +6 -3
- package/dist/components/temp-components/Jazzicon/Jazzicon.utilities.cjs.map +1 -1
- package/dist/components/temp-components/Jazzicon/Jazzicon.utilities.d.cts +6 -3
- package/dist/components/temp-components/Jazzicon/Jazzicon.utilities.d.cts.map +1 -1
- package/dist/components/temp-components/Jazzicon/Jazzicon.utilities.d.mts +6 -3
- package/dist/components/temp-components/Jazzicon/Jazzicon.utilities.d.mts.map +1 -1
- package/dist/components/temp-components/Jazzicon/Jazzicon.utilities.mjs +6 -3
- package/dist/components/temp-components/Jazzicon/Jazzicon.utilities.mjs.map +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -0
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.cjs +143 -1
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.cts +138 -1
- package/dist/types/index.d.cts.map +1 -1
- package/dist/types/index.d.mts +138 -1
- package/dist/types/index.d.mts.map +1 -1
- package/dist/types/index.mjs +142 -0
- package/dist/types/index.mjs.map +1 -1
- package/dist/utils/index.cjs +6 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.d.cts +2 -0
- package/dist/utils/index.d.cts.map +1 -0
- package/dist/utils/index.d.mts +2 -0
- package/dist/utils/index.d.mts.map +1 -0
- package/dist/utils/index.mjs +2 -0
- package/dist/utils/index.mjs.map +1 -0
- package/dist/utils/tw-merge.cjs +1 -5
- package/dist/utils/tw-merge.cjs.map +1 -1
- package/dist/utils/tw-merge.d.cts.map +1 -1
- package/dist/utils/tw-merge.d.mts.map +1 -1
- package/dist/utils/tw-merge.mjs +1 -5
- package/dist/utils/tw-merge.mjs.map +1 -1
- package/package.json +9 -9
|
@@ -12,6 +12,11 @@ exports.CLASSMAP_TEXT_VARIANT_FONTSTYLE = {
|
|
|
12
12
|
[types_1.TextVariant.BodyMd]: 'text-s-body-md leading-s-body-md tracking-s-body-md md:text-l-body-md md:leading-l-body-md md:tracking-l-body-md',
|
|
13
13
|
[types_1.TextVariant.BodySm]: 'text-s-body-sm leading-s-body-sm tracking-s-body-sm md:text-l-body-sm md:leading-l-body-sm md:tracking-l-body-sm',
|
|
14
14
|
[types_1.TextVariant.BodyXs]: 'text-s-body-xs leading-s-body-xs tracking-s-body-xs md:text-l-body-xs md:leading-l-body-xs md:tracking-l-body-xs',
|
|
15
|
+
[types_1.TextVariant.PageHeading]: 'text-s-page-heading leading-s-page-heading tracking-s-page-heading md:text-l-page-heading md:leading-l-page-heading md:tracking-l-page-heading',
|
|
16
|
+
[types_1.TextVariant.SectionHeading]: 'text-s-section-heading leading-s-section-heading tracking-s-section-heading md:text-l-section-heading md:leading-l-section-heading md:tracking-l-section-heading',
|
|
17
|
+
[types_1.TextVariant.ButtonLabelMd]: 'text-s-button-label-md leading-s-button-label-md tracking-s-button-label-md md:text-l-button-label-md md:leading-l-button-label-md md:tracking-l-button-label-md',
|
|
18
|
+
[types_1.TextVariant.ButtonLabelLg]: 'text-s-button-label-lg leading-s-button-label-lg tracking-s-button-label-lg md:text-l-button-label-lg md:leading-l-button-label-lg md:tracking-l-button-label-lg',
|
|
19
|
+
[types_1.TextVariant.AmountDisplayLg]: 'text-s-amount-display-lg leading-s-amount-display-lg tracking-s-amount-display-lg md:text-l-amount-display-lg md:leading-l-amount-display-lg md:tracking-l-amount-display-lg',
|
|
15
20
|
};
|
|
16
21
|
exports.CLASSMAP_TEXT_VARIANT_FONTWEIGHT = {
|
|
17
22
|
[types_1.TextVariant.DisplayLg]: 'font-bold md:font-medium',
|
|
@@ -23,6 +28,11 @@ exports.CLASSMAP_TEXT_VARIANT_FONTWEIGHT = {
|
|
|
23
28
|
[types_1.TextVariant.BodyMd]: 'font-regular',
|
|
24
29
|
[types_1.TextVariant.BodySm]: 'font-regular',
|
|
25
30
|
[types_1.TextVariant.BodyXs]: 'font-regular',
|
|
31
|
+
[types_1.TextVariant.PageHeading]: 'font-s-page-heading md:font-l-page-heading',
|
|
32
|
+
[types_1.TextVariant.SectionHeading]: 'font-s-section-heading md:font-l-section-heading',
|
|
33
|
+
[types_1.TextVariant.ButtonLabelMd]: 'font-s-button-label-md md:font-l-button-label-md',
|
|
34
|
+
[types_1.TextVariant.ButtonLabelLg]: 'font-s-button-label-lg md:font-l-button-label-lg',
|
|
35
|
+
[types_1.TextVariant.AmountDisplayLg]: 'font-s-amount-display-lg md:font-l-amount-display-lg',
|
|
26
36
|
};
|
|
27
37
|
exports.MAP_TEXT_VARIANT_TAG = {
|
|
28
38
|
[types_1.TextVariant.DisplayLg]: 'h1',
|
|
@@ -34,5 +44,10 @@ exports.MAP_TEXT_VARIANT_TAG = {
|
|
|
34
44
|
[types_1.TextVariant.BodyMd]: 'p',
|
|
35
45
|
[types_1.TextVariant.BodySm]: 'p',
|
|
36
46
|
[types_1.TextVariant.BodyXs]: 'p',
|
|
47
|
+
[types_1.TextVariant.PageHeading]: 'h1',
|
|
48
|
+
[types_1.TextVariant.SectionHeading]: 'h2',
|
|
49
|
+
[types_1.TextVariant.ButtonLabelMd]: 'span',
|
|
50
|
+
[types_1.TextVariant.ButtonLabelLg]: 'span',
|
|
51
|
+
[types_1.TextVariant.AmountDisplayLg]: 'span',
|
|
37
52
|
};
|
|
38
53
|
//# sourceMappingURL=Text.constants.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.constants.cjs","sourceRoot":"","sources":["../../../src/components/Text/Text.constants.ts"],"names":[],"mappings":";;;AAAA,iDAA0C;AAE7B,QAAA,+BAA+B,GAAgC;IAC1E,CAAC,mBAAW,CAAC,SAAS,CAAC,EACrB,oIAAoI;IACtI,CAAC,mBAAW,CAAC,SAAS,CAAC,EACrB,oIAAoI;IACtI,CAAC,mBAAW,CAAC,SAAS,CAAC,EACrB,oIAAoI;IACtI,CAAC,mBAAW,CAAC,SAAS,CAAC,EACrB,oIAAoI;IACtI,CAAC,mBAAW,CAAC,SAAS,CAAC,EACrB,oIAAoI;IACtI,CAAC,mBAAW,CAAC,MAAM,CAAC,EAClB,kHAAkH;IACpH,CAAC,mBAAW,CAAC,MAAM,CAAC,EAClB,kHAAkH;IACpH,CAAC,mBAAW,CAAC,MAAM,CAAC,EAClB,kHAAkH;IACpH,CAAC,mBAAW,CAAC,MAAM,CAAC,EAClB,kHAAkH;
|
|
1
|
+
{"version":3,"file":"Text.constants.cjs","sourceRoot":"","sources":["../../../src/components/Text/Text.constants.ts"],"names":[],"mappings":";;;AAAA,iDAA0C;AAE7B,QAAA,+BAA+B,GAAgC;IAC1E,CAAC,mBAAW,CAAC,SAAS,CAAC,EACrB,oIAAoI;IACtI,CAAC,mBAAW,CAAC,SAAS,CAAC,EACrB,oIAAoI;IACtI,CAAC,mBAAW,CAAC,SAAS,CAAC,EACrB,oIAAoI;IACtI,CAAC,mBAAW,CAAC,SAAS,CAAC,EACrB,oIAAoI;IACtI,CAAC,mBAAW,CAAC,SAAS,CAAC,EACrB,oIAAoI;IACtI,CAAC,mBAAW,CAAC,MAAM,CAAC,EAClB,kHAAkH;IACpH,CAAC,mBAAW,CAAC,MAAM,CAAC,EAClB,kHAAkH;IACpH,CAAC,mBAAW,CAAC,MAAM,CAAC,EAClB,kHAAkH;IACpH,CAAC,mBAAW,CAAC,MAAM,CAAC,EAClB,kHAAkH;IACpH,CAAC,mBAAW,CAAC,WAAW,CAAC,EACvB,gJAAgJ;IAClJ,CAAC,mBAAW,CAAC,cAAc,CAAC,EAC1B,kKAAkK;IACp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EAAE,GAAG;IACzB,CAAC,mBAAW,CAAC,MAAM,CAAC,EAAE,GAAG;IACzB,CAAC,mBAAW,CAAC,MAAM,CAAC,EAAE,GAAG;IACzB,CAAC,mBAAW,CAAC,MAAM,CAAC,EAAE,GAAG;IACzB,CAAC,mBAAW,CAAC,WAAW,CAAC,EAAE,IAAI;IAC/B,CAAC,mBAAW,CAAC,cAAc,CAAC,EAAE,IAAI;IAClC,CAAC,mBAAW,CAAC,aAAa,CAAC,EAAE,MAAM;IACnC,CAAC,mBAAW,CAAC,aAAa,CAAC,EAAE,MAAM;IACnC,CAAC,mBAAW,CAAC,eAAe,CAAC,EAAE,MAAM;CACtC,CAAC","sourcesContent":["import { TextVariant } from '../../types';\n\nexport const CLASSMAP_TEXT_VARIANT_FONTSTYLE: Record<TextVariant, string> = {\n [TextVariant.DisplayLg]:\n 'text-s-display-lg leading-s-display-lg tracking-s-display-lg md:text-l-display-lg md:leading-l-display-lg md:tracking-l-display-lg',\n [TextVariant.DisplayMd]:\n 'text-s-display-md leading-s-display-md tracking-s-display-md md:text-l-display-md md:leading-l-display-md md:tracking-l-display-md',\n [TextVariant.HeadingLg]:\n 'text-s-heading-lg leading-s-heading-lg tracking-s-heading-lg md:text-l-heading-lg md:leading-l-heading-lg md:tracking-l-heading-lg',\n [TextVariant.HeadingMd]:\n 'text-s-heading-md leading-s-heading-md tracking-s-heading-md md:text-l-heading-md md:leading-l-heading-md md:tracking-l-heading-md',\n [TextVariant.HeadingSm]:\n 'text-s-heading-sm leading-s-heading-sm tracking-s-heading-sm md:text-l-heading-sm md:leading-l-heading-sm md:tracking-l-heading-sm',\n [TextVariant.BodyLg]:\n 'text-s-body-lg leading-s-body-lg tracking-s-body-lg md:text-l-body-lg md:leading-l-body-lg md:tracking-l-body-lg',\n [TextVariant.BodyMd]:\n 'text-s-body-md leading-s-body-md tracking-s-body-md md:text-l-body-md md:leading-l-body-md md:tracking-l-body-md',\n [TextVariant.BodySm]:\n 'text-s-body-sm leading-s-body-sm tracking-s-body-sm md:text-l-body-sm md:leading-l-body-sm md:tracking-l-body-sm',\n [TextVariant.BodyXs]:\n 'text-s-body-xs leading-s-body-xs tracking-s-body-xs md:text-l-body-xs md:leading-l-body-xs md:tracking-l-body-xs',\n [TextVariant.PageHeading]:\n 'text-s-page-heading leading-s-page-heading tracking-s-page-heading md:text-l-page-heading md:leading-l-page-heading md:tracking-l-page-heading',\n [TextVariant.SectionHeading]:\n 'text-s-section-heading leading-s-section-heading tracking-s-section-heading md:text-l-section-heading md:leading-l-section-heading md:tracking-l-section-heading',\n [TextVariant.ButtonLabelMd]:\n 'text-s-button-label-md leading-s-button-label-md tracking-s-button-label-md md:text-l-button-label-md md:leading-l-button-label-md md:tracking-l-button-label-md',\n [TextVariant.ButtonLabelLg]:\n 'text-s-button-label-lg leading-s-button-label-lg tracking-s-button-label-lg md:text-l-button-label-lg md:leading-l-button-label-lg md:tracking-l-button-label-lg',\n [TextVariant.AmountDisplayLg]:\n 'text-s-amount-display-lg leading-s-amount-display-lg tracking-s-amount-display-lg md:text-l-amount-display-lg md:leading-l-amount-display-lg md:tracking-l-amount-display-lg',\n};\n\nexport const CLASSMAP_TEXT_VARIANT_FONTWEIGHT: Record<TextVariant, string> = {\n [TextVariant.DisplayLg]: 'font-bold md:font-medium',\n [TextVariant.DisplayMd]: 'font-bold md:font-medium',\n [TextVariant.HeadingLg]: 'font-bold',\n [TextVariant.HeadingMd]: 'font-bold',\n [TextVariant.HeadingSm]: 'font-bold',\n [TextVariant.BodyLg]: 'font-medium',\n [TextVariant.BodyMd]: 'font-regular',\n [TextVariant.BodySm]: 'font-regular',\n [TextVariant.BodyXs]: 'font-regular',\n [TextVariant.PageHeading]: 'font-s-page-heading md:font-l-page-heading',\n [TextVariant.SectionHeading]:\n 'font-s-section-heading md:font-l-section-heading',\n [TextVariant.ButtonLabelMd]:\n 'font-s-button-label-md md:font-l-button-label-md',\n [TextVariant.ButtonLabelLg]:\n 'font-s-button-label-lg md:font-l-button-label-lg',\n [TextVariant.AmountDisplayLg]:\n 'font-s-amount-display-lg md:font-l-amount-display-lg',\n};\n\nexport const MAP_TEXT_VARIANT_TAG: Record<\n TextVariant,\n keyof JSX.IntrinsicElements\n> = {\n [TextVariant.DisplayLg]: 'h1',\n [TextVariant.DisplayMd]: 'h1',\n [TextVariant.HeadingLg]: 'h2',\n [TextVariant.HeadingMd]: 'h3',\n [TextVariant.HeadingSm]: 'h4',\n [TextVariant.BodyLg]: 'p',\n [TextVariant.BodyMd]: 'p',\n [TextVariant.BodySm]: 'p',\n [TextVariant.BodyXs]: 'p',\n [TextVariant.PageHeading]: 'h1',\n [TextVariant.SectionHeading]: 'h2',\n [TextVariant.ButtonLabelMd]: 'span',\n [TextVariant.ButtonLabelLg]: 'span',\n [TextVariant.AmountDisplayLg]: 'span',\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.constants.d.cts","sourceRoot":"","sources":["../../../src/components/Text/Text.constants.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,8BAAoB;AAE1C,eAAO,MAAM,+BAA+B,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Text.constants.d.cts","sourceRoot":"","sources":["../../../src/components/Text/Text.constants.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,8BAAoB;AAE1C,eAAO,MAAM,+BAA+B,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CA6BvE,CAAC;AAEF,eAAO,MAAM,gCAAgC,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAmBxE,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,MAAM,CACvC,WAAW,EACX,MAAM,GAAG,CAAC,iBAAiB,CAgB5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.constants.d.mts","sourceRoot":"","sources":["../../../src/components/Text/Text.constants.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,8BAAoB;AAE1C,eAAO,MAAM,+BAA+B,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Text.constants.d.mts","sourceRoot":"","sources":["../../../src/components/Text/Text.constants.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,8BAAoB;AAE1C,eAAO,MAAM,+BAA+B,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CA6BvE,CAAC;AAEF,eAAO,MAAM,gCAAgC,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAmBxE,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,MAAM,CACvC,WAAW,EACX,MAAM,GAAG,CAAC,iBAAiB,CAgB5B,CAAC"}
|
|
@@ -9,6 +9,11 @@ export const CLASSMAP_TEXT_VARIANT_FONTSTYLE = {
|
|
|
9
9
|
[TextVariant.BodyMd]: 'text-s-body-md leading-s-body-md tracking-s-body-md md:text-l-body-md md:leading-l-body-md md:tracking-l-body-md',
|
|
10
10
|
[TextVariant.BodySm]: 'text-s-body-sm leading-s-body-sm tracking-s-body-sm md:text-l-body-sm md:leading-l-body-sm md:tracking-l-body-sm',
|
|
11
11
|
[TextVariant.BodyXs]: 'text-s-body-xs leading-s-body-xs tracking-s-body-xs md:text-l-body-xs md:leading-l-body-xs md:tracking-l-body-xs',
|
|
12
|
+
[TextVariant.PageHeading]: 'text-s-page-heading leading-s-page-heading tracking-s-page-heading md:text-l-page-heading md:leading-l-page-heading md:tracking-l-page-heading',
|
|
13
|
+
[TextVariant.SectionHeading]: 'text-s-section-heading leading-s-section-heading tracking-s-section-heading md:text-l-section-heading md:leading-l-section-heading md:tracking-l-section-heading',
|
|
14
|
+
[TextVariant.ButtonLabelMd]: 'text-s-button-label-md leading-s-button-label-md tracking-s-button-label-md md:text-l-button-label-md md:leading-l-button-label-md md:tracking-l-button-label-md',
|
|
15
|
+
[TextVariant.ButtonLabelLg]: 'text-s-button-label-lg leading-s-button-label-lg tracking-s-button-label-lg md:text-l-button-label-lg md:leading-l-button-label-lg md:tracking-l-button-label-lg',
|
|
16
|
+
[TextVariant.AmountDisplayLg]: 'text-s-amount-display-lg leading-s-amount-display-lg tracking-s-amount-display-lg md:text-l-amount-display-lg md:leading-l-amount-display-lg md:tracking-l-amount-display-lg',
|
|
12
17
|
};
|
|
13
18
|
export const CLASSMAP_TEXT_VARIANT_FONTWEIGHT = {
|
|
14
19
|
[TextVariant.DisplayLg]: 'font-bold md:font-medium',
|
|
@@ -20,6 +25,11 @@ export const CLASSMAP_TEXT_VARIANT_FONTWEIGHT = {
|
|
|
20
25
|
[TextVariant.BodyMd]: 'font-regular',
|
|
21
26
|
[TextVariant.BodySm]: 'font-regular',
|
|
22
27
|
[TextVariant.BodyXs]: 'font-regular',
|
|
28
|
+
[TextVariant.PageHeading]: 'font-s-page-heading md:font-l-page-heading',
|
|
29
|
+
[TextVariant.SectionHeading]: 'font-s-section-heading md:font-l-section-heading',
|
|
30
|
+
[TextVariant.ButtonLabelMd]: 'font-s-button-label-md md:font-l-button-label-md',
|
|
31
|
+
[TextVariant.ButtonLabelLg]: 'font-s-button-label-lg md:font-l-button-label-lg',
|
|
32
|
+
[TextVariant.AmountDisplayLg]: 'font-s-amount-display-lg md:font-l-amount-display-lg',
|
|
23
33
|
};
|
|
24
34
|
export const MAP_TEXT_VARIANT_TAG = {
|
|
25
35
|
[TextVariant.DisplayLg]: 'h1',
|
|
@@ -31,5 +41,10 @@ export const MAP_TEXT_VARIANT_TAG = {
|
|
|
31
41
|
[TextVariant.BodyMd]: 'p',
|
|
32
42
|
[TextVariant.BodySm]: 'p',
|
|
33
43
|
[TextVariant.BodyXs]: 'p',
|
|
44
|
+
[TextVariant.PageHeading]: 'h1',
|
|
45
|
+
[TextVariant.SectionHeading]: 'h2',
|
|
46
|
+
[TextVariant.ButtonLabelMd]: 'span',
|
|
47
|
+
[TextVariant.ButtonLabelLg]: 'span',
|
|
48
|
+
[TextVariant.AmountDisplayLg]: 'span',
|
|
34
49
|
};
|
|
35
50
|
//# sourceMappingURL=Text.constants.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.constants.mjs","sourceRoot":"","sources":["../../../src/components/Text/Text.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,8BAAoB;AAE1C,MAAM,CAAC,MAAM,+BAA+B,GAAgC;IAC1E,CAAC,WAAW,CAAC,SAAS,CAAC,EACrB,oIAAoI;IACtI,CAAC,WAAW,CAAC,SAAS,CAAC,EACrB,oIAAoI;IACtI,CAAC,WAAW,CAAC,SAAS,CAAC,EACrB,oIAAoI;IACtI,CAAC,WAAW,CAAC,SAAS,CAAC,EACrB,oIAAoI;IACtI,CAAC,WAAW,CAAC,SAAS,CAAC,EACrB,oIAAoI;IACtI,CAAC,WAAW,CAAC,MAAM,CAAC,EAClB,kHAAkH;IACpH,CAAC,WAAW,CAAC,MAAM,CAAC,EAClB,kHAAkH;IACpH,CAAC,WAAW,CAAC,MAAM,CAAC,EAClB,kHAAkH;IACpH,CAAC,WAAW,CAAC,MAAM,CAAC,EAClB,kHAAkH;
|
|
1
|
+
{"version":3,"file":"Text.constants.mjs","sourceRoot":"","sources":["../../../src/components/Text/Text.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,8BAAoB;AAE1C,MAAM,CAAC,MAAM,+BAA+B,GAAgC;IAC1E,CAAC,WAAW,CAAC,SAAS,CAAC,EACrB,oIAAoI;IACtI,CAAC,WAAW,CAAC,SAAS,CAAC,EACrB,oIAAoI;IACtI,CAAC,WAAW,CAAC,SAAS,CAAC,EACrB,oIAAoI;IACtI,CAAC,WAAW,CAAC,SAAS,CAAC,EACrB,oIAAoI;IACtI,CAAC,WAAW,CAAC,SAAS,CAAC,EACrB,oIAAoI;IACtI,CAAC,WAAW,CAAC,MAAM,CAAC,EAClB,kHAAkH;IACpH,CAAC,WAAW,CAAC,MAAM,CAAC,EAClB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CAAC,SAAS,CAAC,EAAE,IAAI;IAC7B,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,IAAI;IAC7B,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,IAAI;IAC7B,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,IAAI;IAC7B,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,GAAG;IACzB,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,GAAG;IACzB,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,GAAG;IACzB,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,GAAG;IACzB,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE,IAAI;IAC/B,CAAC,WAAW,CAAC,cAAc,CAAC,EAAE,IAAI;IAClC,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE,MAAM;IACnC,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE,MAAM;IACnC,CAAC,WAAW,CAAC,eAAe,CAAC,EAAE,MAAM;CACtC,CAAC","sourcesContent":["import { TextVariant } from '../../types';\n\nexport const CLASSMAP_TEXT_VARIANT_FONTSTYLE: Record<TextVariant, string> = {\n [TextVariant.DisplayLg]:\n 'text-s-display-lg leading-s-display-lg tracking-s-display-lg md:text-l-display-lg md:leading-l-display-lg md:tracking-l-display-lg',\n [TextVariant.DisplayMd]:\n 'text-s-display-md leading-s-display-md tracking-s-display-md md:text-l-display-md md:leading-l-display-md md:tracking-l-display-md',\n [TextVariant.HeadingLg]:\n 'text-s-heading-lg leading-s-heading-lg tracking-s-heading-lg md:text-l-heading-lg md:leading-l-heading-lg md:tracking-l-heading-lg',\n [TextVariant.HeadingMd]:\n 'text-s-heading-md leading-s-heading-md tracking-s-heading-md md:text-l-heading-md md:leading-l-heading-md md:tracking-l-heading-md',\n [TextVariant.HeadingSm]:\n 'text-s-heading-sm leading-s-heading-sm tracking-s-heading-sm md:text-l-heading-sm md:leading-l-heading-sm md:tracking-l-heading-sm',\n [TextVariant.BodyLg]:\n 'text-s-body-lg leading-s-body-lg tracking-s-body-lg md:text-l-body-lg md:leading-l-body-lg md:tracking-l-body-lg',\n [TextVariant.BodyMd]:\n 'text-s-body-md leading-s-body-md tracking-s-body-md md:text-l-body-md md:leading-l-body-md md:tracking-l-body-md',\n [TextVariant.BodySm]:\n 'text-s-body-sm leading-s-body-sm tracking-s-body-sm md:text-l-body-sm md:leading-l-body-sm md:tracking-l-body-sm',\n [TextVariant.BodyXs]:\n 'text-s-body-xs leading-s-body-xs tracking-s-body-xs md:text-l-body-xs md:leading-l-body-xs md:tracking-l-body-xs',\n [TextVariant.PageHeading]:\n 'text-s-page-heading leading-s-page-heading tracking-s-page-heading md:text-l-page-heading md:leading-l-page-heading md:tracking-l-page-heading',\n [TextVariant.SectionHeading]:\n 'text-s-section-heading leading-s-section-heading tracking-s-section-heading md:text-l-section-heading md:leading-l-section-heading md:tracking-l-section-heading',\n [TextVariant.ButtonLabelMd]:\n 'text-s-button-label-md leading-s-button-label-md tracking-s-button-label-md md:text-l-button-label-md md:leading-l-button-label-md md:tracking-l-button-label-md',\n [TextVariant.ButtonLabelLg]:\n 'text-s-button-label-lg leading-s-button-label-lg tracking-s-button-label-lg md:text-l-button-label-lg md:leading-l-button-label-lg md:tracking-l-button-label-lg',\n [TextVariant.AmountDisplayLg]:\n 'text-s-amount-display-lg leading-s-amount-display-lg tracking-s-amount-display-lg md:text-l-amount-display-lg md:leading-l-amount-display-lg md:tracking-l-amount-display-lg',\n};\n\nexport const CLASSMAP_TEXT_VARIANT_FONTWEIGHT: Record<TextVariant, string> = {\n [TextVariant.DisplayLg]: 'font-bold md:font-medium',\n [TextVariant.DisplayMd]: 'font-bold md:font-medium',\n [TextVariant.HeadingLg]: 'font-bold',\n [TextVariant.HeadingMd]: 'font-bold',\n [TextVariant.HeadingSm]: 'font-bold',\n [TextVariant.BodyLg]: 'font-medium',\n [TextVariant.BodyMd]: 'font-regular',\n [TextVariant.BodySm]: 'font-regular',\n [TextVariant.BodyXs]: 'font-regular',\n [TextVariant.PageHeading]: 'font-s-page-heading md:font-l-page-heading',\n [TextVariant.SectionHeading]:\n 'font-s-section-heading md:font-l-section-heading',\n [TextVariant.ButtonLabelMd]:\n 'font-s-button-label-md md:font-l-button-label-md',\n [TextVariant.ButtonLabelLg]:\n 'font-s-button-label-lg md:font-l-button-label-lg',\n [TextVariant.AmountDisplayLg]:\n 'font-s-amount-display-lg md:font-l-amount-display-lg',\n};\n\nexport const MAP_TEXT_VARIANT_TAG: Record<\n TextVariant,\n keyof JSX.IntrinsicElements\n> = {\n [TextVariant.DisplayLg]: 'h1',\n [TextVariant.DisplayMd]: 'h1',\n [TextVariant.HeadingLg]: 'h2',\n [TextVariant.HeadingMd]: 'h3',\n [TextVariant.HeadingSm]: 'h4',\n [TextVariant.BodyLg]: 'p',\n [TextVariant.BodyMd]: 'p',\n [TextVariant.BodySm]: 'p',\n [TextVariant.BodyXs]: 'p',\n [TextVariant.PageHeading]: 'h1',\n [TextVariant.SectionHeading]: 'h2',\n [TextVariant.ButtonLabelMd]: 'span',\n [TextVariant.ButtonLabelLg]: 'span',\n [TextVariant.AmountDisplayLg]: 'span',\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.types.cjs","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n FontFamily,\n FontStyle,\n FontWeight,\n OverflowWrap,\n TextAlign,\n TextVariant,\n TextTransform,\n TextColor,\n} from '../../types';\n\nexport type TextProps = {\n /**\n * Optional prop for inline styles\n */\n style?: React.CSSProperties;\n /**\n * Optional prop to change the font size of the component. The Text component uses responsive font sizes.\n * Different variants map to specific HTML elements by default.\n *\n * @default TextVariant.BodyMd\n */\n variant?: TextVariant;\n /**\n * The text content or elements to be rendered within the component.\n */\n children: React.ReactNode;\n /**\n * Optional prop for additional CSS classes to be applied to the Text component.\n */\n className?: string;\n /**\n * Optional prop to control the font weight of the text.\n * Regular: 400\n * Medium: 500\n * Bold: 700\n */\n fontWeight?: FontWeight;\n /**\n * Optional prop to adjust the font family.\n * Default:
|
|
1
|
+
{"version":3,"file":"Text.types.cjs","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n FontFamily,\n FontStyle,\n FontWeight,\n OverflowWrap,\n TextAlign,\n TextVariant,\n TextTransform,\n TextColor,\n} from '../../types';\n\nexport type TextProps = {\n /**\n * Optional prop for inline styles\n */\n style?: React.CSSProperties;\n /**\n * Optional prop to change the font size of the component. The Text component uses responsive font sizes.\n * Different variants map to specific HTML elements by default.\n *\n * @default TextVariant.BodyMd\n */\n variant?: TextVariant;\n /**\n * The text content or elements to be rendered within the component.\n */\n children: React.ReactNode;\n /**\n * Optional prop for additional CSS classes to be applied to the Text component.\n */\n className?: string;\n /**\n * Optional prop to control the font weight of the text.\n * Regular: 400\n * Medium: 500\n * Bold: 700\n */\n fontWeight?: FontWeight;\n /**\n * Optional prop to adjust the font family.\n * Default: Geist\n * Accent: MMSans\n * Hero: MMPoly\n */\n fontFamily?: FontFamily;\n /**\n * Optional prop to control the font style of the text.\n * Options: Normal, Italic\n */\n fontStyle?: FontStyle;\n /**\n * Optional prop to apply text transformation to the content.\n * Options: Uppercase, Lowercase, Capitalize, Normal\n */\n textTransform?: TextTransform;\n /**\n * Optional prop to control the text alignment within its container.\n * Options: Left, Center, Right, Justify\n */\n textAlign?: TextAlign;\n /**\n * Optional prop to determine how text should wrap when it reaches the edge of its container.\n * Options: BreakWord, Anywhere, Normal\n */\n overflowWrap?: OverflowWrap;\n /**\n * Optional prop that when true, adds an ellipsis (...) when text overflows its container.\n *\n * @default false\n */\n ellipsis?: boolean;\n /**\n * Optional boolean that determines if the component should merge its props onto its immediate child\n * instead of rendering a default DOM element.\n *\n * @default false\n */\n asChild?: boolean;\n /**\n * Optional prop that sets the color of the text using predefined theme colors.\n *\n * @default TextColor.TextDefault\n */\n color?: TextColor;\n /**\n * Optional prop for testing purposes\n */\n 'data-testid'?: string;\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.types.mjs","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n FontFamily,\n FontStyle,\n FontWeight,\n OverflowWrap,\n TextAlign,\n TextVariant,\n TextTransform,\n TextColor,\n} from '../../types';\n\nexport type TextProps = {\n /**\n * Optional prop for inline styles\n */\n style?: React.CSSProperties;\n /**\n * Optional prop to change the font size of the component. The Text component uses responsive font sizes.\n * Different variants map to specific HTML elements by default.\n *\n * @default TextVariant.BodyMd\n */\n variant?: TextVariant;\n /**\n * The text content or elements to be rendered within the component.\n */\n children: React.ReactNode;\n /**\n * Optional prop for additional CSS classes to be applied to the Text component.\n */\n className?: string;\n /**\n * Optional prop to control the font weight of the text.\n * Regular: 400\n * Medium: 500\n * Bold: 700\n */\n fontWeight?: FontWeight;\n /**\n * Optional prop to adjust the font family.\n * Default:
|
|
1
|
+
{"version":3,"file":"Text.types.mjs","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n FontFamily,\n FontStyle,\n FontWeight,\n OverflowWrap,\n TextAlign,\n TextVariant,\n TextTransform,\n TextColor,\n} from '../../types';\n\nexport type TextProps = {\n /**\n * Optional prop for inline styles\n */\n style?: React.CSSProperties;\n /**\n * Optional prop to change the font size of the component. The Text component uses responsive font sizes.\n * Different variants map to specific HTML elements by default.\n *\n * @default TextVariant.BodyMd\n */\n variant?: TextVariant;\n /**\n * The text content or elements to be rendered within the component.\n */\n children: React.ReactNode;\n /**\n * Optional prop for additional CSS classes to be applied to the Text component.\n */\n className?: string;\n /**\n * Optional prop to control the font weight of the text.\n * Regular: 400\n * Medium: 500\n * Bold: 700\n */\n fontWeight?: FontWeight;\n /**\n * Optional prop to adjust the font family.\n * Default: Geist\n * Accent: MMSans\n * Hero: MMPoly\n */\n fontFamily?: FontFamily;\n /**\n * Optional prop to control the font style of the text.\n * Options: Normal, Italic\n */\n fontStyle?: FontStyle;\n /**\n * Optional prop to apply text transformation to the content.\n * Options: Uppercase, Lowercase, Capitalize, Normal\n */\n textTransform?: TextTransform;\n /**\n * Optional prop to control the text alignment within its container.\n * Options: Left, Center, Right, Justify\n */\n textAlign?: TextAlign;\n /**\n * Optional prop to determine how text should wrap when it reaches the edge of its container.\n * Options: BreakWord, Anywhere, Normal\n */\n overflowWrap?: OverflowWrap;\n /**\n * Optional prop that when true, adds an ellipsis (...) when text overflows its container.\n *\n * @default false\n */\n ellipsis?: boolean;\n /**\n * Optional boolean that determines if the component should merge its props onto its immediate child\n * instead of rendering a default DOM element.\n *\n * @default false\n */\n asChild?: boolean;\n /**\n * Optional prop that sets the color of the text using predefined theme colors.\n *\n * @default TextColor.TextDefault\n */\n color?: TextColor;\n /**\n * Optional prop for testing purposes\n */\n 'data-testid'?: string;\n};\n"]}
|
|
@@ -32,7 +32,7 @@ const TextButton_constants_1 = require("./TextButton.constants.cjs");
|
|
|
32
32
|
exports.TextButton = (0, react_1.forwardRef)(({ className, isInverse, isDisabled, size = types_1.TextButtonSize.BodyMd, textProps, ...props }, ref) => {
|
|
33
33
|
const mergedClassName = (0, tw_merge_1.twMerge)(
|
|
34
34
|
// Reset padding, height and animations
|
|
35
|
-
'
|
|
35
|
+
'h-auto rounded-none bg-transparent px-0', 'transform-none transition-none active:scale-100',
|
|
36
36
|
// Default text button styles
|
|
37
37
|
!isInverse && 'text-primary-default',
|
|
38
38
|
// Inverse styles
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextButton.cjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0C;AAE1C,iDAA6C;AAC7C,uDAA+C;AAC/C,wDAA2C;AAE3C,qEAAyE;AAG5D,QAAA,UAAU,GAAG,IAAA,kBAAU,EAClC,CACE,EACE,SAAS,EACT,SAAS,EACT,UAAU,EACV,IAAI,GAAG,sBAAc,CAAC,MAAM,EAC5B,SAAS,EACT,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,eAAe,GAAG,IAAA,kBAAO;IAC7B,uCAAuC;IACvC,yCAAyC,EACzC,iDAAiD;IACjD,6BAA6B;IAC7B,CAAC,SAAS,IAAI,sBAAsB;IACpC,iBAAiB;IACjB,SAAS,IAAI,sBAAsB;IACnC,sDAAsD;IACtD,CAAC,UAAU,IAAI;QACb,CAAC,SAAS,IAAI;YACZ,oJAAoJ;YACpJ,iGAAiG;SAClG;QACD,SAAS,IAAI;YACX,wIAAwI;YACxI,iFAAiF;SAClF;KACF;IACD,kBAAkB;IAClB,UAAU,IAAI,CAAC,YAAY,EAAE,oBAAoB,CAAC,EAClD,SAAS,CACV,CAAC;IAEF,OAAO,CACL,8BAAC,uBAAU,IACT,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,eAAe,EAC1B,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE;YACT,OAAO,EAAE,sDAA+B,CAAC,IAAI,CAAC;YAC9C,GAAG,SAAS;SACb,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,kBAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { TextButtonSize } from '../../types';\nimport { twMerge } from '../../utils/tw-merge';\nimport { ButtonBase } from '../ButtonBase';\n\nimport { MAP_TEXTBUTTON_SIZE_TEXTVARIANT } from './TextButton.constants';\nimport type { TextButtonProps } from './TextButton.types';\n\nexport const TextButton = forwardRef<HTMLButtonElement, TextButtonProps>(\n (\n {\n className,\n isInverse,\n isDisabled,\n size = TextButtonSize.BodyMd,\n textProps,\n ...props\n },\n ref,\n ) => {\n const mergedClassName = twMerge(\n // Reset padding, height and animations\n '
|
|
1
|
+
{"version":3,"file":"TextButton.cjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0C;AAE1C,iDAA6C;AAC7C,uDAA+C;AAC/C,wDAA2C;AAE3C,qEAAyE;AAG5D,QAAA,UAAU,GAAG,IAAA,kBAAU,EAClC,CACE,EACE,SAAS,EACT,SAAS,EACT,UAAU,EACV,IAAI,GAAG,sBAAc,CAAC,MAAM,EAC5B,SAAS,EACT,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,eAAe,GAAG,IAAA,kBAAO;IAC7B,uCAAuC;IACvC,yCAAyC,EACzC,iDAAiD;IACjD,6BAA6B;IAC7B,CAAC,SAAS,IAAI,sBAAsB;IACpC,iBAAiB;IACjB,SAAS,IAAI,sBAAsB;IACnC,sDAAsD;IACtD,CAAC,UAAU,IAAI;QACb,CAAC,SAAS,IAAI;YACZ,oJAAoJ;YACpJ,iGAAiG;SAClG;QACD,SAAS,IAAI;YACX,wIAAwI;YACxI,iFAAiF;SAClF;KACF;IACD,kBAAkB;IAClB,UAAU,IAAI,CAAC,YAAY,EAAE,oBAAoB,CAAC,EAClD,SAAS,CACV,CAAC;IAEF,OAAO,CACL,8BAAC,uBAAU,IACT,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,eAAe,EAC1B,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE;YACT,OAAO,EAAE,sDAA+B,CAAC,IAAI,CAAC;YAC9C,GAAG,SAAS;SACb,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,kBAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { TextButtonSize } from '../../types';\nimport { twMerge } from '../../utils/tw-merge';\nimport { ButtonBase } from '../ButtonBase';\n\nimport { MAP_TEXTBUTTON_SIZE_TEXTVARIANT } from './TextButton.constants';\nimport type { TextButtonProps } from './TextButton.types';\n\nexport const TextButton = forwardRef<HTMLButtonElement, TextButtonProps>(\n (\n {\n className,\n isInverse,\n isDisabled,\n size = TextButtonSize.BodyMd,\n textProps,\n ...props\n },\n ref,\n ) => {\n const mergedClassName = twMerge(\n // Reset padding, height and animations\n 'h-auto rounded-none bg-transparent px-0',\n 'transform-none transition-none active:scale-100',\n // Default text button styles\n !isInverse && 'text-primary-default',\n // Inverse styles\n isInverse && 'text-primary-inverse',\n // Hover/Active states - only applied when interactive\n !isDisabled && [\n !isInverse && [\n 'hover:bg-hover hover:text-primary-default-hover hover:underline hover:decoration-primary-default-hover hover:decoration-2 hover:underline-offset-4',\n 'active:bg-pressed active:text-primary-default-pressed active:decoration-primary-default-pressed',\n ],\n isInverse && [\n 'hover:bg-hover hover:text-primary-inverse hover:underline hover:decoration-primary-inverse hover:decoration-2 hover:underline-offset-4',\n 'active:bg-pressed active:text-primary-inverse active:decoration-primary-inverse',\n ],\n ],\n // Disabled styles\n isDisabled && ['opacity-50', 'cursor-not-allowed'],\n className,\n );\n\n return (\n <ButtonBase\n ref={ref}\n className={mergedClassName}\n isDisabled={isDisabled}\n textProps={{\n variant: MAP_TEXTBUTTON_SIZE_TEXTVARIANT[size],\n ...textProps,\n }}\n {...props}\n />\n );\n },\n);\n\nTextButton.displayName = 'TextButton';\n"]}
|
|
@@ -13,7 +13,7 @@ import { MAP_TEXTBUTTON_SIZE_TEXTVARIANT } from "./TextButton.constants.mjs";
|
|
|
13
13
|
export const TextButton = forwardRef(({ className, isInverse, isDisabled, size = TextButtonSize.BodyMd, textProps, ...props }, ref) => {
|
|
14
14
|
const mergedClassName = twMerge(
|
|
15
15
|
// Reset padding, height and animations
|
|
16
|
-
'
|
|
16
|
+
'h-auto rounded-none bg-transparent px-0', 'transform-none transition-none active:scale-100',
|
|
17
17
|
// Default text button styles
|
|
18
18
|
!isInverse && 'text-primary-default',
|
|
19
19
|
// Inverse styles
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextButton.mjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,QAAO,EAAE,UAAU,EAAE,cAAc;;AAE1C,OAAO,EAAE,cAAc,EAAE,8BAAoB;AAC7C,OAAO,EAAE,OAAO,EAAE,iCAA6B;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAE3C,OAAO,EAAE,+BAA+B,EAAE,mCAA+B;AAGzE,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAClC,CACE,EACE,SAAS,EACT,SAAS,EACT,UAAU,EACV,IAAI,GAAG,cAAc,CAAC,MAAM,EAC5B,SAAS,EACT,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,eAAe,GAAG,OAAO;IAC7B,uCAAuC;IACvC,yCAAyC,EACzC,iDAAiD;IACjD,6BAA6B;IAC7B,CAAC,SAAS,IAAI,sBAAsB;IACpC,iBAAiB;IACjB,SAAS,IAAI,sBAAsB;IACnC,sDAAsD;IACtD,CAAC,UAAU,IAAI;QACb,CAAC,SAAS,IAAI;YACZ,oJAAoJ;YACpJ,iGAAiG;SAClG;QACD,SAAS,IAAI;YACX,wIAAwI;YACxI,iFAAiF;SAClF;KACF;IACD,kBAAkB;IAClB,UAAU,IAAI,CAAC,YAAY,EAAE,oBAAoB,CAAC,EAClD,SAAS,CACV,CAAC;IAEF,OAAO,CACL,oBAAC,UAAU,IACT,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,eAAe,EAC1B,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE;YACT,OAAO,EAAE,+BAA+B,CAAC,IAAI,CAAC;YAC9C,GAAG,SAAS;SACb,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { TextButtonSize } from '../../types';\nimport { twMerge } from '../../utils/tw-merge';\nimport { ButtonBase } from '../ButtonBase';\n\nimport { MAP_TEXTBUTTON_SIZE_TEXTVARIANT } from './TextButton.constants';\nimport type { TextButtonProps } from './TextButton.types';\n\nexport const TextButton = forwardRef<HTMLButtonElement, TextButtonProps>(\n (\n {\n className,\n isInverse,\n isDisabled,\n size = TextButtonSize.BodyMd,\n textProps,\n ...props\n },\n ref,\n ) => {\n const mergedClassName = twMerge(\n // Reset padding, height and animations\n '
|
|
1
|
+
{"version":3,"file":"TextButton.mjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,QAAO,EAAE,UAAU,EAAE,cAAc;;AAE1C,OAAO,EAAE,cAAc,EAAE,8BAAoB;AAC7C,OAAO,EAAE,OAAO,EAAE,iCAA6B;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAE3C,OAAO,EAAE,+BAA+B,EAAE,mCAA+B;AAGzE,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAClC,CACE,EACE,SAAS,EACT,SAAS,EACT,UAAU,EACV,IAAI,GAAG,cAAc,CAAC,MAAM,EAC5B,SAAS,EACT,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,eAAe,GAAG,OAAO;IAC7B,uCAAuC;IACvC,yCAAyC,EACzC,iDAAiD;IACjD,6BAA6B;IAC7B,CAAC,SAAS,IAAI,sBAAsB;IACpC,iBAAiB;IACjB,SAAS,IAAI,sBAAsB;IACnC,sDAAsD;IACtD,CAAC,UAAU,IAAI;QACb,CAAC,SAAS,IAAI;YACZ,oJAAoJ;YACpJ,iGAAiG;SAClG;QACD,SAAS,IAAI;YACX,wIAAwI;YACxI,iFAAiF;SAClF;KACF;IACD,kBAAkB;IAClB,UAAU,IAAI,CAAC,YAAY,EAAE,oBAAoB,CAAC,EAClD,SAAS,CACV,CAAC;IAEF,OAAO,CACL,oBAAC,UAAU,IACT,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,eAAe,EAC1B,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE;YACT,OAAO,EAAE,+BAA+B,CAAC,IAAI,CAAC;YAC9C,GAAG,SAAS;SACb,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { TextButtonSize } from '../../types';\nimport { twMerge } from '../../utils/tw-merge';\nimport { ButtonBase } from '../ButtonBase';\n\nimport { MAP_TEXTBUTTON_SIZE_TEXTVARIANT } from './TextButton.constants';\nimport type { TextButtonProps } from './TextButton.types';\n\nexport const TextButton = forwardRef<HTMLButtonElement, TextButtonProps>(\n (\n {\n className,\n isInverse,\n isDisabled,\n size = TextButtonSize.BodyMd,\n textProps,\n ...props\n },\n ref,\n ) => {\n const mergedClassName = twMerge(\n // Reset padding, height and animations\n 'h-auto rounded-none bg-transparent px-0',\n 'transform-none transition-none active:scale-100',\n // Default text button styles\n !isInverse && 'text-primary-default',\n // Inverse styles\n isInverse && 'text-primary-inverse',\n // Hover/Active states - only applied when interactive\n !isDisabled && [\n !isInverse && [\n 'hover:bg-hover hover:text-primary-default-hover hover:underline hover:decoration-primary-default-hover hover:decoration-2 hover:underline-offset-4',\n 'active:bg-pressed active:text-primary-default-pressed active:decoration-primary-default-pressed',\n ],\n isInverse && [\n 'hover:bg-hover hover:text-primary-inverse hover:underline hover:decoration-primary-inverse hover:decoration-2 hover:underline-offset-4',\n 'active:bg-pressed active:text-primary-inverse active:decoration-primary-inverse',\n ],\n ],\n // Disabled styles\n isDisabled && ['opacity-50', 'cursor-not-allowed'],\n className,\n );\n\n return (\n <ButtonBase\n ref={ref}\n className={mergedClassName}\n isDisabled={isDisabled}\n textProps={{\n variant: MAP_TEXTBUTTON_SIZE_TEXTVARIANT[size],\n ...textProps,\n }}\n {...props}\n />\n );\n },\n);\n\nTextButton.displayName = 'TextButton';\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.TextButtonSize = exports.TextButton = exports.OverflowWrap = exports.TextTransform = exports.FontStyle = exports.FontFamily = exports.FontWeight = exports.TextAlign = exports.TextColor = void 0;
|
|
3
|
+
exports.Maskicon = exports.Jazzicon = exports.IconColor = exports.IconSize = exports.IconName = exports.Icon = exports.Checkbox = exports.ButtonIconSize = exports.ButtonIcon = exports.ButtonBaseSize = exports.ButtonBase = exports.ButtonVariant = exports.ButtonSize = exports.Button = exports.Box = exports.BoxBorderColor = exports.BoxBackgroundColor = exports.BoxJustifyContent = exports.BoxAlignItems = exports.BoxFlexWrap = exports.BoxFlexDirection = exports.Blockies = exports.BadgeWrapperPositionAnchorShape = exports.BadgeWrapperPosition = exports.BadgeWrapper = exports.BadgeStatusSize = exports.BadgeStatusStatus = exports.BadgeStatus = exports.BadgeNetwork = exports.BadgeIcon = exports.BadgeCountSize = exports.BadgeCount = exports.AvatarTokenSize = exports.AvatarToken = exports.AvatarNetworkSize = exports.AvatarNetwork = exports.AvatarIconSeverity = exports.AvatarIconSize = exports.AvatarIcon = exports.AvatarGroupVariant = exports.AvatarGroupSize = exports.AvatarGroup = exports.AvatarFaviconSize = exports.AvatarFavicon = exports.AvatarBaseShape = exports.AvatarBaseSize = exports.AvatarBase = exports.AvatarAccountVariant = exports.AvatarAccountSize = exports.AvatarAccount = void 0;
|
|
4
|
+
exports.TextButtonSize = exports.TextButton = exports.OverflowWrap = exports.TextTransform = exports.FontStyle = exports.FontFamily = exports.FontWeight = exports.TextAlign = exports.TextColor = exports.TextVariant = exports.Text = void 0;
|
|
5
5
|
var AvatarAccount_1 = require("./AvatarAccount/index.cjs");
|
|
6
6
|
Object.defineProperty(exports, "AvatarAccount", { enumerable: true, get: function () { return AvatarAccount_1.AvatarAccount; } });
|
|
7
7
|
Object.defineProperty(exports, "AvatarAccountSize", { enumerable: true, get: function () { return AvatarAccount_1.AvatarAccountSize; } });
|
|
@@ -52,6 +52,8 @@ Object.defineProperty(exports, "BoxFlexDirection", { enumerable: true, get: func
|
|
|
52
52
|
Object.defineProperty(exports, "BoxFlexWrap", { enumerable: true, get: function () { return Box_1.BoxFlexWrap; } });
|
|
53
53
|
Object.defineProperty(exports, "BoxAlignItems", { enumerable: true, get: function () { return Box_1.BoxAlignItems; } });
|
|
54
54
|
Object.defineProperty(exports, "BoxJustifyContent", { enumerable: true, get: function () { return Box_1.BoxJustifyContent; } });
|
|
55
|
+
Object.defineProperty(exports, "BoxBackgroundColor", { enumerable: true, get: function () { return Box_1.BoxBackgroundColor; } });
|
|
56
|
+
Object.defineProperty(exports, "BoxBorderColor", { enumerable: true, get: function () { return Box_1.BoxBorderColor; } });
|
|
55
57
|
Object.defineProperty(exports, "Box", { enumerable: true, get: function () { return Box_1.Box; } });
|
|
56
58
|
var Button_1 = require("./Button/index.cjs");
|
|
57
59
|
Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return Button_1.Button; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":";;;;AAAA,2DAIyB;AAHvB,8GAAA,aAAa,OAAA;AACb,kHAAA,iBAAiB,OAAA;AACjB,qHAAA,oBAAoB,OAAA;AAItB,qDAA2E;AAAlE,wGAAA,UAAU,OAAA;AAAE,4GAAA,cAAc,OAAA;AAAE,6GAAA,eAAe,OAAA;AAGpD,2DAAmE;AAA1D,8GAAA,aAAa,OAAA;AAAE,kHAAA,iBAAiB,OAAA;AAGzC,uDAIuB;AAHrB,0GAAA,WAAW,OAAA;AACX,8GAAA,eAAe,OAAA;AACf,iHAAA,kBAAkB,OAAA;AAIpB,qDAA8E;AAArE,wGAAA,UAAU,OAAA;AAAE,4GAAA,cAAc,OAAA;AAAE,gHAAA,kBAAkB,OAAA;AAGvD,2DAAmE;AAA1D,8GAAA,aAAa,OAAA;AAAE,kHAAA,iBAAiB,OAAA;AAGzC,uDAA6D;AAApD,0GAAA,WAAW,OAAA;AAAE,8GAAA,eAAe,OAA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A,YAAY,OAAA;AAId,qDAA0D;AAAjD,wGAAA,UAAU,OAAA;AAAE,4GAAA,cAAc,OAAA","sourcesContent":["export {\n AvatarAccount,\n AvatarAccountSize,\n AvatarAccountVariant,\n} from './AvatarAccount';\nexport type { AvatarAccountProps } from './AvatarAccount';\n\nexport { AvatarBase, AvatarBaseSize, AvatarBaseShape } from './AvatarBase';\nexport type { AvatarBaseProps } from './AvatarBase';\n\nexport { AvatarFavicon, AvatarFaviconSize } from './AvatarFavicon';\nexport type { AvatarFaviconProps } from './AvatarFavicon';\n\nexport {\n AvatarGroup,\n AvatarGroupSize,\n AvatarGroupVariant,\n} from './AvatarGroup';\nexport type { AvatarGroupProps } from './AvatarGroup';\n\nexport { AvatarIcon, AvatarIconSize, AvatarIconSeverity } from './AvatarIcon';\nexport type { AvatarIconProps } from './AvatarIcon';\n\nexport { AvatarNetwork, AvatarNetworkSize } from './AvatarNetwork';\nexport type { AvatarNetworkProps } from './AvatarNetwork';\n\nexport { AvatarToken, AvatarTokenSize } from './AvatarToken';\nexport type { AvatarTokenProps } from './AvatarToken';\n\nexport { BadgeCount } from './BadgeCount';\nexport type { BadgeCountProps } from './BadgeCount';\nexport { BadgeCountSize } from './BadgeCount';\n\nexport { BadgeIcon } from './BadgeIcon';\nexport type { BadgeIconProps } from './BadgeIcon';\n\nexport { BadgeNetwork } from './BadgeNetwork';\nexport type { BadgeNetworkProps } from './BadgeNetwork';\n\nexport { BadgeStatus } from './BadgeStatus';\nexport type { BadgeStatusProps } from './BadgeStatus';\nexport { BadgeStatusStatus, BadgeStatusSize } from './BadgeStatus';\n\nexport { BadgeWrapper } from './BadgeWrapper';\nexport type { BadgeWrapperProps } from './BadgeWrapper';\nexport {\n BadgeWrapperPosition,\n BadgeWrapperPositionAnchorShape,\n} from './BadgeWrapper';\nexport type { BadgeWrapperCustomPosition } from './BadgeWrapper';\n\nexport { Blockies } from './temp-components/Blockies';\nexport type { BlockiesProps } from './temp-components/Blockies';\n\nexport {\n BoxFlexDirection,\n BoxFlexWrap,\n BoxAlignItems,\n BoxJustifyContent,\n BoxBackgroundColor,\n BoxBorderColor,\n Box,\n} from './Box';\nexport type { BoxSpacing, BoxProps } from './Box';\n\nexport { Button, ButtonSize, ButtonVariant } from './Button';\nexport type { ButtonProps } from './Button';\n\nexport { ButtonBase } from './ButtonBase';\nexport type { ButtonBaseProps } from './ButtonBase';\nexport { ButtonBaseSize } from './ButtonBase';\n\nexport { ButtonIcon, ButtonIconSize } from './ButtonIcon';\nexport type { ButtonIconProps } from './ButtonIcon';\n\nexport { Checkbox } from './Checkbox';\nexport type { CheckboxProps } from './Checkbox';\n\nexport { Icon } from './Icon';\nexport { IconName, IconSize, IconColor } from './Icon';\nexport type { IconProps } from './Icon';\n\nexport { Jazzicon } from './temp-components/Jazzicon';\nexport type { JazziconProps } from './temp-components/Jazzicon';\n\nexport { Maskicon } from './temp-components/Maskicon';\nexport type { MaskiconProps } from './temp-components/Maskicon';\n\nexport { Text } from './Text';\nexport {\n TextVariant,\n TextColor,\n TextAlign,\n FontWeight,\n FontFamily,\n FontStyle,\n TextTransform,\n OverflowWrap,\n} from './Text';\nexport type { TextProps } from './Text';\n\nexport { TextButton, TextButtonSize } from './TextButton';\nexport type { TextButtonProps } from './TextButton';\n"]}
|
|
@@ -28,7 +28,7 @@ export { BadgeWrapperPosition, BadgeWrapperPositionAnchorShape, } from "./BadgeW
|
|
|
28
28
|
export type { BadgeWrapperCustomPosition } from "./BadgeWrapper/index.cjs";
|
|
29
29
|
export { Blockies } from "./temp-components/Blockies/index.cjs";
|
|
30
30
|
export type { BlockiesProps } from "./temp-components/Blockies/index.cjs";
|
|
31
|
-
export { BoxFlexDirection, BoxFlexWrap, BoxAlignItems, BoxJustifyContent, Box, } from "./Box/index.cjs";
|
|
31
|
+
export { BoxFlexDirection, BoxFlexWrap, BoxAlignItems, BoxJustifyContent, BoxBackgroundColor, BoxBorderColor, Box, } from "./Box/index.cjs";
|
|
32
32
|
export type { BoxSpacing, BoxProps } from "./Box/index.cjs";
|
|
33
33
|
export { Button, ButtonSize, ButtonVariant } from "./Button/index.cjs";
|
|
34
34
|
export type { ButtonProps } from "./Button/index.cjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,oBAAoB,GACrB,kCAAwB;AACzB,YAAY,EAAE,kBAAkB,EAAE,kCAAwB;AAE1D,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,eAAe,EAAE,+BAAqB;AAC3E,YAAY,EAAE,eAAe,EAAE,+BAAqB;AAEpD,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,kCAAwB;AACnE,YAAY,EAAE,kBAAkB,EAAE,kCAAwB;AAE1D,OAAO,EACL,WAAW,EACX,eAAe,EACf,kBAAkB,GACnB,gCAAsB;AACvB,YAAY,EAAE,gBAAgB,EAAE,gCAAsB;AAEtD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,kBAAkB,EAAE,+BAAqB;AAC9E,YAAY,EAAE,eAAe,EAAE,+BAAqB;AAEpD,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,kCAAwB;AACnE,YAAY,EAAE,kBAAkB,EAAE,kCAAwB;AAE1D,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,gCAAsB;AAC7D,YAAY,EAAE,gBAAgB,EAAE,gCAAsB;AAEtD,OAAO,EAAE,UAAU,EAAE,+BAAqB;AAC1C,YAAY,EAAE,eAAe,EAAE,+BAAqB;AACpD,OAAO,EAAE,cAAc,EAAE,+BAAqB;AAE9C,OAAO,EAAE,SAAS,EAAE,8BAAoB;AACxC,YAAY,EAAE,cAAc,EAAE,8BAAoB;AAElD,OAAO,EAAE,YAAY,EAAE,iCAAuB;AAC9C,YAAY,EAAE,iBAAiB,EAAE,iCAAuB;AAExD,OAAO,EAAE,WAAW,EAAE,gCAAsB;AAC5C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EAAE,6CAAmC;AACtD,YAAY,EAAE,aAAa,EAAE,6CAAmC;AAEhE,OAAO,EAAE,IAAI,EAAE,yBAAe;AAC9B,OAAO,EACL,WAAW,EACX,SAAS,EACT,SAAS,EACT,UAAU,EACV,UAAU,EACV,SAAS,EACT,aAAa,EACb,YAAY,GACb,yBAAe;AAChB,YAAY,EAAE,SAAS,EAAE,yBAAe;AAExC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,+BAAqB;AAC1D,YAAY,EAAE,eAAe,EAAE,+BAAqB"}
|
|
@@ -28,7 +28,7 @@ export { BadgeWrapperPosition, BadgeWrapperPositionAnchorShape, } from "./BadgeW
|
|
|
28
28
|
export type { BadgeWrapperCustomPosition } from "./BadgeWrapper/index.mjs";
|
|
29
29
|
export { Blockies } from "./temp-components/Blockies/index.mjs";
|
|
30
30
|
export type { BlockiesProps } from "./temp-components/Blockies/index.mjs";
|
|
31
|
-
export { BoxFlexDirection, BoxFlexWrap, BoxAlignItems, BoxJustifyContent, Box, } from "./Box/index.mjs";
|
|
31
|
+
export { BoxFlexDirection, BoxFlexWrap, BoxAlignItems, BoxJustifyContent, BoxBackgroundColor, BoxBorderColor, Box, } from "./Box/index.mjs";
|
|
32
32
|
export type { BoxSpacing, BoxProps } from "./Box/index.mjs";
|
|
33
33
|
export { Button, ButtonSize, ButtonVariant } from "./Button/index.mjs";
|
|
34
34
|
export type { ButtonProps } from "./Button/index.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,oBAAoB,GACrB,kCAAwB;AACzB,YAAY,EAAE,kBAAkB,EAAE,kCAAwB;AAE1D,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,eAAe,EAAE,+BAAqB;AAC3E,YAAY,EAAE,eAAe,EAAE,+BAAqB;AAEpD,OAAO,EAAE,aAAa,EAAE,iBAAi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";
|
|
15
15
|
export { BadgeWrapperPosition, BadgeWrapperPositionAnchorShape } from "./BadgeWrapper/index.mjs";
|
|
16
16
|
export { Blockies } from "./temp-components/Blockies/index.mjs";
|
|
17
|
-
export { BoxFlexDirection, BoxFlexWrap, BoxAlignItems, BoxJustifyContent, Box } from "./Box/index.mjs";
|
|
17
|
+
export { BoxFlexDirection, BoxFlexWrap, BoxAlignItems, BoxJustifyContent, BoxBackgroundColor, BoxBorderColor, Box } from "./Box/index.mjs";
|
|
18
18
|
export { Button, ButtonSize, ButtonVariant } from "./Button/index.mjs";
|
|
19
19
|
export { ButtonBase } from "./ButtonBase/index.mjs";
|
|
20
20
|
export { ButtonBaseSize } from "./ButtonBase/index.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACrB,kCAAwB;AAGzB,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,eAAe,EAAE,+BAAqB;AAG3E,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,kCAAwB;AAGnE,OAAO,EACL,WAAW,EACX,eAAe,EACf,kBAAkB,EACnB,gCAAsB;AAGvB,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,kBAAkB,EAAE,+BAAqB;AAG9E,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,kCAAwB;AAGnE,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,gCAAsB;AAG7D,OAAO,EAAE,UAAU,EAAE,+BAAqB;AAE1C,OAAO,EAAE,cAAc,EAAE,+BAAqB;AAE9C,OAAO,EAAE,SAAS,EAAE,8BAAoB;AAGxC,OAAO,EAAE,YAAY,EAAE,iCAAuB;AAG9C,OAAO,EAAE,WAAW,EAAE,gCAAsB;AAE5C,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,gCAAsB;AAEnE,OAAO,EAAE,YAAY,EAAE,iCAAuB;AAE9C,OAAO,EACL,oBAAoB,EACpB,+BAA+B,EAChC,iCAAuB;AAGxB,OAAO,EAAE,QAAQ,EAAE,6CAAmC;AAGtD,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,GAAG,EACJ,wBAAc;AAGf,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,2BAAiB;AAG7D,OAAO,EAAE,UAAU,EAAE,+BAAqB;AAE1C,OAAO,EAAE,cAAc,EAAE,+BAAqB;AAE9C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,+BAAqB;AAG1D,OAAO,EAAE,QAAQ,EAAE,6BAAmB;AAGtC,OAAO,EAAE,IAAI,EAAE,yBAAe;AAC9B,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,yBAAe;AAGvD,OAAO,EAAE,QAAQ,EAAE,6CAAmC;AAGtD,OAAO,EAAE,QAAQ,EAAE,6CAAmC;AAGtD,OAAO,EAAE,IAAI,EAAE,yBAAe;AAC9B,OAAO,EACL,WAAW,EACX,SAAS,EACT,SAAS,EACT,UAAU,EACV,UAAU,EACV,SAAS,EACT,aAAa,EACb,YAAY,EACb,yBAAe;AAGhB,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,+BAAqB","sourcesContent":["export {\n AvatarAccount,\n AvatarAccountSize,\n AvatarAccountVariant,\n} from './AvatarAccount';\nexport type { AvatarAccountProps } from './AvatarAccount';\n\nexport { AvatarBase, AvatarBaseSize, AvatarBaseShape } from './AvatarBase';\nexport type { AvatarBaseProps } from './AvatarBase';\n\nexport { AvatarFavicon, AvatarFaviconSize } from './AvatarFavicon';\nexport type { AvatarFaviconProps } from './AvatarFavicon';\n\nexport {\n AvatarGroup,\n AvatarGroupSize,\n AvatarGroupVariant,\n} from './AvatarGroup';\nexport type { AvatarGroupProps } from './AvatarGroup';\n\nexport { AvatarIcon, AvatarIconSize, AvatarIconSeverity } from './AvatarIcon';\nexport type { AvatarIconProps } from './AvatarIcon';\n\nexport { AvatarNetwork, AvatarNetworkSize } from './AvatarNetwork';\nexport type { AvatarNetworkProps } from './AvatarNetwork';\n\nexport { AvatarToken, AvatarTokenSize } from './AvatarToken';\nexport type { AvatarTokenProps } from './AvatarToken';\n\nexport { BadgeCount } from './BadgeCount';\nexport type { BadgeCountProps } from './BadgeCount';\nexport { BadgeCountSize } from './BadgeCount';\n\nexport { BadgeIcon } from './BadgeIcon';\nexport type { BadgeIconProps } from './BadgeIcon';\n\nexport { BadgeNetwork } from './BadgeNetwork';\nexport type { BadgeNetworkProps } from './BadgeNetwork';\n\nexport { BadgeStatus } from './BadgeStatus';\nexport type { BadgeStatusProps } from './BadgeStatus';\nexport { BadgeStatusStatus, BadgeStatusSize } from './BadgeStatus';\n\nexport { BadgeWrapper } from './BadgeWrapper';\nexport type { BadgeWrapperProps } from './BadgeWrapper';\nexport {\n BadgeWrapperPosition,\n BadgeWrapperPositionAnchorShape,\n} from './BadgeWrapper';\nexport type { BadgeWrapperCustomPosition } from './BadgeWrapper';\n\nexport { Blockies } from './temp-components/Blockies';\nexport type { BlockiesProps } from './temp-components/Blockies';\n\nexport {\n BoxFlexDirection,\n BoxFlexWrap,\n BoxAlignItems,\n BoxJustifyContent,\n Box,\n} from './Box';\nexport type { BoxSpacing, BoxProps } from './Box';\n\nexport { Button, ButtonSize, ButtonVariant } from './Button';\nexport type { ButtonProps } from './Button';\n\nexport { ButtonBase } from './ButtonBase';\nexport type { ButtonBaseProps } from './ButtonBase';\nexport { ButtonBaseSize } from './ButtonBase';\n\nexport { ButtonIcon, ButtonIconSize } from './ButtonIcon';\nexport type { ButtonIconProps } from './ButtonIcon';\n\nexport { Checkbox } from './Checkbox';\nexport type { CheckboxProps } from './Checkbox';\n\nexport { Icon } from './Icon';\nexport { IconName, IconSize, IconColor } from './Icon';\nexport type { IconProps } from './Icon';\n\nexport { Jazzicon } from './temp-components/Jazzicon';\nexport type { JazziconProps } from './temp-components/Jazzicon';\n\nexport { Maskicon } from './temp-components/Maskicon';\nexport type { MaskiconProps } from './temp-components/Maskicon';\n\nexport { Text } from './Text';\nexport {\n TextVariant,\n TextColor,\n TextAlign,\n FontWeight,\n FontFamily,\n FontStyle,\n TextTransform,\n OverflowWrap,\n} from './Text';\nexport type { TextProps } from './Text';\n\nexport { TextButton, TextButtonSize } from './TextButton';\nexport type { TextButtonProps } from './TextButton';\n"]}
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACrB,kCAAwB;AAGzB,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,eAAe,EAAE,+BAAqB;AAG3E,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,kCAAwB;AAGnE,OAAO,EACL,WAAW,EACX,eAAe,EACf,kBAAkB,EACnB,gCAAsB;AAGvB,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,kBAAkB,EAAE,+BAAqB;AAG9E,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,kCAAwB;AAGnE,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,gCAAsB;AAG7D,OAAO,EAAE,UAAU,EAAE,+BAAqB;AAE1C,OAAO,EAAE,cAAc,EAAE,+BAAqB;AAE9C,OAAO,EAAE,SAAS,EAAE,8BAAoB;AAGxC,OAAO,EAAE,YAAY,EAAE,iCAAuB;AAG9C,OAAO,EAAE,WAAW,EAAE,gCAAsB;AAE5C,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,gCAAsB;AAEnE,OAAO,EAAE,YAAY,EAAE,iCAAuB;AAE9C,OAAO,EACL,oBAAoB,EACpB,+BAA+B,EAChC,iCAAuB;AAGxB,OAAO,EAAE,QAAQ,EAAE,6CAAmC;AAGtD,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,GAAG,EACJ,wBAAc;AAGf,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,2BAAiB;AAG7D,OAAO,EAAE,UAAU,EAAE,+BAAqB;AAE1C,OAAO,EAAE,cAAc,EAAE,+BAAqB;AAE9C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,+BAAqB;AAG1D,OAAO,EAAE,QAAQ,EAAE,6BAAmB;AAGtC,OAAO,EAAE,IAAI,EAAE,yBAAe;AAC9B,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,yBAAe;AAGvD,OAAO,EAAE,QAAQ,EAAE,6CAAmC;AAGtD,OAAO,EAAE,QAAQ,EAAE,6CAAmC;AAGtD,OAAO,EAAE,IAAI,EAAE,yBAAe;AAC9B,OAAO,EACL,WAAW,EACX,SAAS,EACT,SAAS,EACT,UAAU,EACV,UAAU,EACV,SAAS,EACT,aAAa,EACb,YAAY,EACb,yBAAe;AAGhB,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,+BAAqB","sourcesContent":["export {\n AvatarAccount,\n AvatarAccountSize,\n AvatarAccountVariant,\n} from './AvatarAccount';\nexport type { AvatarAccountProps } from './AvatarAccount';\n\nexport { AvatarBase, AvatarBaseSize, AvatarBaseShape } from './AvatarBase';\nexport type { AvatarBaseProps } from './AvatarBase';\n\nexport { AvatarFavicon, AvatarFaviconSize } from './AvatarFavicon';\nexport type { AvatarFaviconProps } from './AvatarFavicon';\n\nexport {\n AvatarGroup,\n AvatarGroupSize,\n AvatarGroupVariant,\n} from './AvatarGroup';\nexport type { AvatarGroupProps } from './AvatarGroup';\n\nexport { AvatarIcon, AvatarIconSize, AvatarIconSeverity } from './AvatarIcon';\nexport type { AvatarIconProps } from './AvatarIcon';\n\nexport { AvatarNetwork, AvatarNetworkSize } from './AvatarNetwork';\nexport type { AvatarNetworkProps } from './AvatarNetwork';\n\nexport { AvatarToken, AvatarTokenSize } from './AvatarToken';\nexport type { AvatarTokenProps } from './AvatarToken';\n\nexport { BadgeCount } from './BadgeCount';\nexport type { BadgeCountProps } from './BadgeCount';\nexport { BadgeCountSize } from './BadgeCount';\n\nexport { BadgeIcon } from './BadgeIcon';\nexport type { BadgeIconProps } from './BadgeIcon';\n\nexport { BadgeNetwork } from './BadgeNetwork';\nexport type { BadgeNetworkProps } from './BadgeNetwork';\n\nexport { BadgeStatus } from './BadgeStatus';\nexport type { BadgeStatusProps } from './BadgeStatus';\nexport { BadgeStatusStatus, BadgeStatusSize } from './BadgeStatus';\n\nexport { BadgeWrapper } from './BadgeWrapper';\nexport type { BadgeWrapperProps } from './BadgeWrapper';\nexport {\n BadgeWrapperPosition,\n BadgeWrapperPositionAnchorShape,\n} from './BadgeWrapper';\nexport type { BadgeWrapperCustomPosition } from './BadgeWrapper';\n\nexport { Blockies } from './temp-components/Blockies';\nexport type { BlockiesProps } from './temp-components/Blockies';\n\nexport {\n BoxFlexDirection,\n BoxFlexWrap,\n BoxAlignItems,\n BoxJustifyContent,\n BoxBackgroundColor,\n BoxBorderColor,\n Box,\n} from './Box';\nexport type { BoxSpacing, BoxProps } from './Box';\n\nexport { Button, ButtonSize, ButtonVariant } from './Button';\nexport type { ButtonProps } from './Button';\n\nexport { ButtonBase } from './ButtonBase';\nexport type { ButtonBaseProps } from './ButtonBase';\nexport { ButtonBaseSize } from './ButtonBase';\n\nexport { ButtonIcon, ButtonIconSize } from './ButtonIcon';\nexport type { ButtonIconProps } from './ButtonIcon';\n\nexport { Checkbox } from './Checkbox';\nexport type { CheckboxProps } from './Checkbox';\n\nexport { Icon } from './Icon';\nexport { IconName, IconSize, IconColor } from './Icon';\nexport type { IconProps } from './Icon';\n\nexport { Jazzicon } from './temp-components/Jazzicon';\nexport type { JazziconProps } from './temp-components/Jazzicon';\n\nexport { Maskicon } from './temp-components/Maskicon';\nexport type { MaskiconProps } from './temp-components/Maskicon';\n\nexport { Text } from './Text';\nexport {\n TextVariant,\n TextColor,\n TextAlign,\n FontWeight,\n FontFamily,\n FontStyle,\n TextTransform,\n OverflowWrap,\n} from './Text';\nexport type { TextProps } from './Text';\n\nexport { TextButton, TextButtonSize } from './TextButton';\nexport type { TextButtonProps } from './TextButton';\n"]}
|
|
@@ -41,7 +41,7 @@ const Jazzicon = ({ address, size = 32, className, ...props }) => {
|
|
|
41
41
|
const containerRef = (0, react_1.useRef)(null);
|
|
42
42
|
(0, react_1.useEffect)(() => {
|
|
43
43
|
let isCancelled = false;
|
|
44
|
-
|
|
44
|
+
const generateJazzicon = async () => {
|
|
45
45
|
if (!containerRef.current) {
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
@@ -80,7 +80,10 @@ const Jazzicon = ({ address, size = 32, className, ...props }) => {
|
|
|
80
80
|
if (!isCancelled && containerRef.current) {
|
|
81
81
|
containerRef.current.appendChild(newIcon.cloneNode(true));
|
|
82
82
|
}
|
|
83
|
-
}
|
|
83
|
+
};
|
|
84
|
+
generateJazzicon().catch(() => {
|
|
85
|
+
// Silently ignore errors during async generation
|
|
86
|
+
});
|
|
84
87
|
// Cleanup
|
|
85
88
|
return () => {
|
|
86
89
|
isCancelled = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Jazzicon.cjs","sourceRoot":"","sources":["../../../../src/components/temp-components/Jazzicon/Jazzicon.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kEAA0C;AAC1C,2CAAqD;AACrD,+CAAiD;AAEjD,0DAAkD;AAGlD,iEAI8B;AAE9B;;;GAGG;AACH,MAAM,SAAS,GAAmC,EAAE,CAAC;AAE9C,MAAM,QAAQ,GAAG,CAAC,EACvB,OAAO,EACP,IAAI,GAAG,EAAE,EACT,SAAS,EACT,GAAG,KAAK,EACM,EAAE,EAAE;IAClB,MAAM,YAAY,GAAG,IAAA,cAAM,EAAiB,IAAI,CAAC,CAAC;IAElD,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,WAAW,GAAG,KAAK,CA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C","sourcesContent":["import jazzicon from '@metamask/jazzicon';\nimport { KnownCaipNamespace } from '@metamask/utils';\nimport React, { useEffect, useRef } from 'react';\n\nimport { twMerge } from '../../../utils/tw-merge';\n\nimport type { JazziconProps } from './Jazzicon.types';\nimport {\n generateSeedEthereum,\n generateSeedNonEthereum,\n getCaipNamespaceFromAddress,\n} from './Jazzicon.utilities';\n\n/**\n * Cache for storing generated SVG elements by `address:diameter` so\n * we don't regenerate them repeatedly.\n */\nconst iconCache: Record<string, HTMLDivElement> = {};\n\nexport const Jazzicon = ({\n address,\n size = 32,\n className,\n ...props\n}: JazziconProps) => {\n const containerRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n let isCancelled = false;\n\n const generateJazzicon = async () => {\n if (!containerRef.current) {\n return;\n }\n // Clear any existing content\n while (containerRef.current.firstChild) {\n containerRef.current.removeChild(containerRef.current.firstChild);\n }\n\n // Check the cache\n const cacheKey = `${address.toLowerCase()}:${size}`;\n if (iconCache[cacheKey]) {\n // If cached, just append a clone\n if (!isCancelled) {\n const clone = iconCache[cacheKey].cloneNode(true) as HTMLDivElement;\n containerRef.current.appendChild(clone);\n }\n return;\n }\n\n // Determine the CAIP namespace\n const namespace = await getCaipNamespaceFromAddress(address);\n if (isCancelled) {\n return;\n }\n\n // Pick seeding strategy based on namespace\n let seed: number | number[];\n if (namespace === KnownCaipNamespace.Eip155) {\n seed = generateSeedEthereum(address);\n } else {\n seed = generateSeedNonEthereum(address);\n }\n\n // Create Jazzicon\n const newIcon = jazzicon(size, seed) as HTMLDivElement;\n\n // Cache it\n iconCache[cacheKey] = newIcon as HTMLDivElement;\n\n // Append a fresh clone\n if (!isCancelled && containerRef.current) {\n containerRef.current.appendChild(newIcon.cloneNode(true));\n }\n };\n\n generateJazzicon().catch(() => {\n // Silently ignore errors during async generation\n });\n\n // Cleanup\n return () => {\n isCancelled = true;\n if (containerRef.current) {\n while (containerRef.current.firstChild) {\n containerRef.current.removeChild(containerRef.current.firstChild);\n }\n }\n };\n }, [address, size]);\n\n return (\n <div ref={containerRef} className={twMerge('flex', className)} {...props} />\n );\n};\n\nJazzicon.displayName = 'Jazzicon';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Jazzicon.d.cts","sourceRoot":"","sources":["../../../../src/components/temp-components/Jazzicon/Jazzicon.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,cAAc;AAIjD,OAAO,KAAK,EAAE,aAAa,EAAE,6BAAyB;AAatD,eAAO,MAAM,QAAQ;6CAKlB,aAAa;;
|
|
1
|
+
{"version":3,"file":"Jazzicon.d.cts","sourceRoot":"","sources":["../../../../src/components/temp-components/Jazzicon/Jazzicon.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,cAAc;AAIjD,OAAO,KAAK,EAAE,aAAa,EAAE,6BAAyB;AAatD,eAAO,MAAM,QAAQ;6CAKlB,aAAa;;CAsEf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Jazzicon.d.mts","sourceRoot":"","sources":["../../../../src/components/temp-components/Jazzicon/Jazzicon.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,cAAc;AAIjD,OAAO,KAAK,EAAE,aAAa,EAAE,6BAAyB;AAatD,eAAO,MAAM,QAAQ;6CAKlB,aAAa;;
|
|
1
|
+
{"version":3,"file":"Jazzicon.d.mts","sourceRoot":"","sources":["../../../../src/components/temp-components/Jazzicon/Jazzicon.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,cAAc;AAIjD,OAAO,KAAK,EAAE,aAAa,EAAE,6BAAyB;AAatD,eAAO,MAAM,QAAQ;6CAKlB,aAAa;;CAsEf,CAAC"}
|
|
@@ -20,7 +20,7 @@ export const Jazzicon = ({ address, size = 32, className, ...props }) => {
|
|
|
20
20
|
const containerRef = useRef(null);
|
|
21
21
|
useEffect(() => {
|
|
22
22
|
let isCancelled = false;
|
|
23
|
-
|
|
23
|
+
const generateJazzicon = async () => {
|
|
24
24
|
if (!containerRef.current) {
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
@@ -59,7 +59,10 @@ export const Jazzicon = ({ address, size = 32, className, ...props }) => {
|
|
|
59
59
|
if (!isCancelled && containerRef.current) {
|
|
60
60
|
containerRef.current.appendChild(newIcon.cloneNode(true));
|
|
61
61
|
}
|
|
62
|
-
}
|
|
62
|
+
};
|
|
63
|
+
generateJazzicon().catch(() => {
|
|
64
|
+
// Silently ignore errors during async generation
|
|
65
|
+
});
|
|
63
66
|
// Cleanup
|
|
64
67
|
return () => {
|
|
65
68
|
isCancelled = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Jazzicon.mjs","sourceRoot":"","sources":["../../../../src/components/temp-components/Jazzicon/Jazzicon.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,SAAQ,2BAA2B;;AAC1C,OAAO,EAAE,kBAAkB,EAAE,wBAAwB;AACrD,OAAO,QAAO,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc;;AAEjD,OAAO,EAAE,OAAO,EAAE,oCAAgC;AAGlD,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,2BAA2B,EAC5B,iCAA6B;AAE9B;;;GAGG;AACH,MAAM,SAAS,GAAmC,EAAE,CAAC;AAErD,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EACvB,OAAO,EACP,IAAI,GAAG,EAAE,EACT,SAAS,EACT,GAAG,KAAK,EACM,EAAE,EAAE;IAClB,MAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAElD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,WAAW,GAAG,KAAK,CAAC;QAExB,
|
|
1
|
+
{"version":3,"file":"Jazzicon.mjs","sourceRoot":"","sources":["../../../../src/components/temp-components/Jazzicon/Jazzicon.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,SAAQ,2BAA2B;;AAC1C,OAAO,EAAE,kBAAkB,EAAE,wBAAwB;AACrD,OAAO,Q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I,SAAS,KAAK,kBAAkB,CAAC,MAAM,EAAE;gBAC3C,IAAI,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;aACtC;iBAAM;gBACL,IAAI,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAC;aACzC;YAED,kBAAkB;YAClB,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAmB,CAAC;YAEvD,WAAW;YACX,SAAS,CAAC,QAAQ,CAAC,GAAG,OAAyB,CAAC;YAEhD,uBAAuB;YACvB,IAAI,CAAC,WAAW,IAAI,YAAY,CAAC,OAAO,EAAE;gBACxC,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;aAC3D;QACH,CAAC,CAAC;QAEF,gBAAgB,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE;YAC5B,iDAAiD;QACnD,CAAC,CAAC,CAAC;QAEH,UAAU;QACV,OAAO,GAAG,EAAE;YACV,WAAW,GAAG,IAAI,CAAC;YACnB,IAAI,YAAY,CAAC,OAAO,EAAE;gBACxB,OAAO,YAAY,CAAC,OAAO,CAAC,UAAU,EAAE;oBACtC,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;iBACnE;aACF;QACH,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;IAEpB,OAAO,CACL,6BAAK,GAAG,EAAE,YAAY,EAAE,SAAS,EAAE,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAC7E,CAAC;AACJ,CAAC,CAAC;AAEF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC","sourcesContent":["import jazzicon from '@metamask/jazzicon';\nimport { KnownCaipNamespace } from '@metamask/utils';\nimport React, { useEffect, useRef } from 'react';\n\nimport { twMerge } from '../../../utils/tw-merge';\n\nimport type { JazziconProps } from './Jazzicon.types';\nimport {\n generateSeedEthereum,\n generateSeedNonEthereum,\n getCaipNamespaceFromAddress,\n} from './Jazzicon.utilities';\n\n/**\n * Cache for storing generated SVG elements by `address:diameter` so\n * we don't regenerate them repeatedly.\n */\nconst iconCache: Record<string, HTMLDivElement> = {};\n\nexport const Jazzicon = ({\n address,\n size = 32,\n className,\n ...props\n}: JazziconProps) => {\n const containerRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n let isCancelled = false;\n\n const generateJazzicon = async () => {\n if (!containerRef.current) {\n return;\n }\n // Clear any existing content\n while (containerRef.current.firstChild) {\n containerRef.current.removeChild(containerRef.current.firstChild);\n }\n\n // Check the cache\n const cacheKey = `${address.toLowerCase()}:${size}`;\n if (iconCache[cacheKey]) {\n // If cached, just append a clone\n if (!isCancelled) {\n const clone = iconCache[cacheKey].cloneNode(true) as HTMLDivElement;\n containerRef.current.appendChild(clone);\n }\n return;\n }\n\n // Determine the CAIP namespace\n const namespace = await getCaipNamespaceFromAddress(address);\n if (isCancelled) {\n return;\n }\n\n // Pick seeding strategy based on namespace\n let seed: number | number[];\n if (namespace === KnownCaipNamespace.Eip155) {\n seed = generateSeedEthereum(address);\n } else {\n seed = generateSeedNonEthereum(address);\n }\n\n // Create Jazzicon\n const newIcon = jazzicon(size, seed) as HTMLDivElement;\n\n // Cache it\n iconCache[cacheKey] = newIcon as HTMLDivElement;\n\n // Append a fresh clone\n if (!isCancelled && containerRef.current) {\n containerRef.current.appendChild(newIcon.cloneNode(true));\n }\n };\n\n generateJazzicon().catch(() => {\n // Silently ignore errors during async generation\n });\n\n // Cleanup\n return () => {\n isCancelled = true;\n if (containerRef.current) {\n while (containerRef.current.firstChild) {\n containerRef.current.removeChild(containerRef.current.firstChild);\n }\n }\n };\n }, [address, size]);\n\n return (\n <div ref={containerRef} className={twMerge('flex', className)} {...props} />\n );\n};\n\nJazzicon.displayName = 'Jazzicon';\n"]}
|
|
@@ -6,7 +6,8 @@ const addresses_1 = require("@solana/addresses");
|
|
|
6
6
|
/**
|
|
7
7
|
* Generates a numeric seed for Ethereum (eip155) addresses.
|
|
8
8
|
*
|
|
9
|
-
* @param address
|
|
9
|
+
* @param address - The Ethereum address to generate a seed from
|
|
10
|
+
* @returns A numeric seed for jazzicon generation
|
|
10
11
|
*/
|
|
11
12
|
function generateSeedEthereum(address) {
|
|
12
13
|
// Example: parse the first 8 chars of the address after '0x'
|
|
@@ -17,7 +18,8 @@ exports.generateSeedEthereum = generateSeedEthereum;
|
|
|
17
18
|
/**
|
|
18
19
|
* Generates a byte-array seed for non-Ethereum addresses (Solana, Bitcoin, etc.).
|
|
19
20
|
*
|
|
20
|
-
* @param address
|
|
21
|
+
* @param address - The address to generate a byte array seed from
|
|
22
|
+
* @returns An array of numbers representing the bytes of the address
|
|
21
23
|
*/
|
|
22
24
|
function generateSeedNonEthereum(address) {
|
|
23
25
|
return Array.from((0, utils_1.stringToBytes)(address.normalize('NFKC').toLowerCase()));
|
|
@@ -27,7 +29,8 @@ exports.generateSeedNonEthereum = generateSeedNonEthereum;
|
|
|
27
29
|
* Dynamically checks if the address is Bitcoin or Solana; otherwise default to Ethereum.
|
|
28
30
|
* Returns a Promise that resolves to one of the known CAIP-2 namespaces.
|
|
29
31
|
*
|
|
30
|
-
* @param address
|
|
32
|
+
* @param address - The address to determine the CAIP namespace for
|
|
33
|
+
* @returns A Promise that resolves to a KnownCaipNamespace
|
|
31
34
|
*/
|
|
32
35
|
async function getCaipNamespaceFromAddress(address) {
|
|
33
36
|
// Check for CAIP-10 formatted addresses
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Jazzicon.utilities.cjs","sourceRoot":"","sources":["../../../../src/components/temp-components/Jazzicon/Jazzicon.utilities.ts"],"names":[],"mappings":";;;AAAA,2CAAoE;AACpE,iDAAiE;AAEjE
|
|
1
|
+
{"version":3,"file":"Jazzicon.utilities.cjs","sourceRoot":"","sources":["../../../../src/components/temp-components/Jazzicon/Jazzicon.utilities.ts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,CAAC;SAClC;KACF;IAAC,MAAM;QACN,mEAAmE;KACpE;IAED,IAAI,IAAA,qBAAe,EAAC,OAAO,CAAC,EAAE;QAC5B,OAAO,0BAAkB,CAAC,MAAM,CAAC;KAClC;IAED,sBAAsB;IACtB,OAAO,0BAAkB,CAAC,MAAM,CAAC;AACnC,CAAC;AApCD,kEAoCC","sourcesContent":["import { stringToBytes, KnownCaipNamespace } from '@metamask/utils';\nimport { isAddress as isSolanaAddress } from '@solana/addresses';\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 jazzicon generation\n */\nexport function generateSeedEthereum(address: string): number {\n // Example: 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 * Dynamically checks if the address is Bitcoin or Solana; otherwise default to Ethereum.\n * Returns a Promise that resolves to one of the known CAIP-2 namespaces.\n *\n * @param address - The address to determine the CAIP namespace for\n * @returns A Promise that resolves to a KnownCaipNamespace\n */\nexport async function getCaipNamespaceFromAddress(\n address: string,\n): Promise<KnownCaipNamespace> {\n // Check for CAIP-10 formatted addresses\n if (address.includes(':')) {\n const [namespace] = address.split(':');\n if (namespace.toLowerCase() === 'bip122') {\n return KnownCaipNamespace.Bip122;\n }\n if (namespace.toLowerCase() === 'solana') {\n return KnownCaipNamespace.Solana;\n }\n if (namespace.toLowerCase() === 'eip155') {\n return KnownCaipNamespace.Eip155;\n }\n // Add other namespaces as needed.\n }\n\n try {\n const { validate, Network } = await import('bitcoin-address-validation');\n if (\n validate(address, Network.mainnet) ||\n validate(address, Network.testnet)\n ) {\n return KnownCaipNamespace.Bip122;\n }\n } catch {\n // If the import fails or 'validate' is not available, fall through\n }\n\n if (isSolanaAddress(address)) {\n return KnownCaipNamespace.Solana;\n }\n\n // Default to Ethereum\n return KnownCaipNamespace.Eip155;\n}\n"]}
|
|
@@ -2,20 +2,23 @@ import { KnownCaipNamespace } from "@metamask/utils";
|
|
|
2
2
|
/**
|
|
3
3
|
* Generates a numeric seed for Ethereum (eip155) addresses.
|
|
4
4
|
*
|
|
5
|
-
* @param address
|
|
5
|
+
* @param address - The Ethereum address to generate a seed from
|
|
6
|
+
* @returns A numeric seed for jazzicon generation
|
|
6
7
|
*/
|
|
7
8
|
export declare function generateSeedEthereum(address: string): number;
|
|
8
9
|
/**
|
|
9
10
|
* Generates a byte-array seed for non-Ethereum addresses (Solana, Bitcoin, etc.).
|
|
10
11
|
*
|
|
11
|
-
* @param address
|
|
12
|
+
* @param address - The address to generate a byte array seed from
|
|
13
|
+
* @returns An array of numbers representing the bytes of the address
|
|
12
14
|
*/
|
|
13
15
|
export declare function generateSeedNonEthereum(address: string): number[];
|
|
14
16
|
/**
|
|
15
17
|
* Dynamically checks if the address is Bitcoin or Solana; otherwise default to Ethereum.
|
|
16
18
|
* Returns a Promise that resolves to one of the known CAIP-2 namespaces.
|
|
17
19
|
*
|
|
18
|
-
* @param address
|
|
20
|
+
* @param address - The address to determine the CAIP namespace for
|
|
21
|
+
* @returns A Promise that resolves to a KnownCaipNamespace
|
|
19
22
|
*/
|
|
20
23
|
export declare function getCaipNamespaceFromAddress(address: string): Promise<KnownCaipNamespace>;
|
|
21
24
|
//# sourceMappingURL=Jazzicon.utilities.d.cts.map
|