@metamask/design-system-react 0.23.1 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -1
- package/dist/components/AvatarBase/AvatarBase.cjs +1 -1
- package/dist/components/AvatarBase/AvatarBase.cjs.map +1 -1
- package/dist/components/AvatarBase/AvatarBase.mjs +1 -1
- package/dist/components/AvatarBase/AvatarBase.mjs.map +1 -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 +2 -2
- package/dist/components/AvatarToken/AvatarToken.cjs.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.mjs +2 -2
- package/dist/components/AvatarToken/AvatarToken.mjs.map +1 -1
- package/dist/components/BannerAlert/BannerAlert.d.cts +58 -30
- package/dist/components/BannerAlert/BannerAlert.d.cts.map +1 -1
- package/dist/components/BannerAlert/BannerAlert.d.mts +58 -30
- package/dist/components/BannerAlert/BannerAlert.d.mts.map +1 -1
- package/dist/components/BannerBase/BannerBase.d.cts +58 -30
- package/dist/components/BannerBase/BannerBase.d.cts.map +1 -1
- package/dist/components/BannerBase/BannerBase.d.mts +58 -30
- package/dist/components/BannerBase/BannerBase.d.mts.map +1 -1
- package/dist/components/FormTextField/FormTextField.cjs +38 -0
- package/dist/components/FormTextField/FormTextField.cjs.map +1 -0
- package/dist/components/FormTextField/FormTextField.d.cts +4 -0
- package/dist/components/FormTextField/FormTextField.d.cts.map +1 -0
- package/dist/components/FormTextField/FormTextField.d.mts +4 -0
- package/dist/components/FormTextField/FormTextField.d.mts.map +1 -0
- package/dist/components/FormTextField/FormTextField.mjs +19 -0
- package/dist/components/FormTextField/FormTextField.mjs.map +1 -0
- package/dist/components/FormTextField/FormTextField.types.cjs +3 -0
- package/dist/components/FormTextField/FormTextField.types.cjs.map +1 -0
- package/dist/components/FormTextField/FormTextField.types.d.cts +50 -0
- package/dist/components/FormTextField/FormTextField.types.d.cts.map +1 -0
- package/dist/components/FormTextField/FormTextField.types.d.mts +50 -0
- package/dist/components/FormTextField/FormTextField.types.d.mts.map +1 -0
- package/dist/components/FormTextField/FormTextField.types.mjs +2 -0
- package/dist/components/FormTextField/FormTextField.types.mjs.map +1 -0
- package/dist/components/FormTextField/index.cjs +6 -0
- package/dist/components/FormTextField/index.cjs.map +1 -0
- package/dist/components/FormTextField/index.d.cts +3 -0
- package/dist/components/FormTextField/index.d.cts.map +1 -0
- package/dist/components/FormTextField/index.d.mts +3 -0
- package/dist/components/FormTextField/index.d.mts.map +1 -0
- package/dist/components/FormTextField/index.mjs +2 -0
- package/dist/components/FormTextField/index.mjs.map +1 -0
- package/dist/components/Icon/icons/FlashFilled.cjs +32 -0
- package/dist/components/Icon/icons/FlashFilled.cjs.map +1 -0
- package/dist/components/Icon/icons/FlashFilled.d.cts +4 -0
- package/dist/components/Icon/icons/FlashFilled.d.cts.map +1 -0
- package/dist/components/Icon/icons/FlashFilled.d.mts +4 -0
- package/dist/components/Icon/icons/FlashFilled.d.mts.map +1 -0
- package/dist/components/Icon/icons/FlashFilled.mjs +7 -0
- package/dist/components/Icon/icons/FlashFilled.mjs.map +1 -0
- package/dist/components/Icon/icons/index.cjs +2 -0
- package/dist/components/Icon/icons/index.cjs.map +1 -1
- package/dist/components/Icon/icons/index.d.cts +1 -0
- package/dist/components/Icon/icons/index.d.cts.map +1 -1
- package/dist/components/Icon/icons/index.d.mts +1 -0
- package/dist/components/Icon/icons/index.d.mts.map +1 -1
- package/dist/components/Icon/icons/index.mjs +2 -0
- package/dist/components/Icon/icons/index.mjs.map +1 -1
- package/dist/components/Modal/Modal.types.cjs.map +1 -1
- package/dist/components/Modal/Modal.types.d.cts +2 -2
- package/dist/components/Modal/Modal.types.d.cts.map +1 -1
- package/dist/components/Modal/Modal.types.d.mts +2 -2
- package/dist/components/Modal/Modal.types.d.mts.map +1 -1
- package/dist/components/Modal/Modal.types.mjs.map +1 -1
- package/dist/components/ModalFocus/ModalFocus.types.cjs.map +1 -1
- package/dist/components/ModalFocus/ModalFocus.types.d.cts +2 -2
- package/dist/components/ModalFocus/ModalFocus.types.d.cts.map +1 -1
- package/dist/components/ModalFocus/ModalFocus.types.d.mts +2 -2
- package/dist/components/ModalFocus/ModalFocus.types.d.mts.map +1 -1
- package/dist/components/ModalFocus/ModalFocus.types.mjs.map +1 -1
- package/dist/components/Popover/Popover.cjs +129 -0
- package/dist/components/Popover/Popover.cjs.map +1 -0
- package/dist/components/Popover/Popover.constants.cjs +28 -0
- package/dist/components/Popover/Popover.constants.cjs.map +1 -0
- package/dist/components/Popover/Popover.constants.d.cts +12 -0
- package/dist/components/Popover/Popover.constants.d.cts.map +1 -0
- package/dist/components/Popover/Popover.constants.d.mts +12 -0
- package/dist/components/Popover/Popover.constants.d.mts.map +1 -0
- package/dist/components/Popover/Popover.constants.mjs +25 -0
- package/dist/components/Popover/Popover.constants.mjs.map +1 -0
- package/dist/components/Popover/Popover.d.cts +4 -0
- package/dist/components/Popover/Popover.d.cts.map +1 -0
- package/dist/components/Popover/Popover.d.mts +4 -0
- package/dist/components/Popover/Popover.d.mts.map +1 -0
- package/dist/components/Popover/Popover.mjs +110 -0
- package/dist/components/Popover/Popover.mjs.map +1 -0
- package/dist/components/Popover/Popover.types.cjs +33 -0
- package/dist/components/Popover/Popover.types.cjs.map +1 -0
- package/dist/components/Popover/Popover.types.d.cts +128 -0
- package/dist/components/Popover/Popover.types.d.cts.map +1 -0
- package/dist/components/Popover/Popover.types.d.mts +128 -0
- package/dist/components/Popover/Popover.types.d.mts.map +1 -0
- package/dist/components/Popover/Popover.types.mjs +30 -0
- package/dist/components/Popover/Popover.types.mjs.map +1 -0
- package/dist/components/Popover/index.cjs +9 -0
- package/dist/components/Popover/index.cjs.map +1 -0
- package/dist/components/Popover/index.d.cts +4 -0
- package/dist/components/Popover/index.d.cts.map +1 -0
- package/dist/components/Popover/index.d.mts +4 -0
- package/dist/components/Popover/index.d.mts.map +1 -0
- package/dist/components/Popover/index.mjs +3 -0
- package/dist/components/Popover/index.mjs.map +1 -0
- package/dist/components/Text/Text.cjs +3 -1
- package/dist/components/Text/Text.cjs.map +1 -1
- package/dist/components/Text/Text.constants.cjs.map +1 -1
- package/dist/components/Text/Text.constants.d.cts +1 -1
- package/dist/components/Text/Text.constants.d.cts.map +1 -1
- package/dist/components/Text/Text.constants.d.mts +1 -1
- package/dist/components/Text/Text.constants.d.mts.map +1 -1
- package/dist/components/Text/Text.constants.mjs.map +1 -1
- package/dist/components/Text/Text.d.cts.map +1 -1
- package/dist/components/Text/Text.d.mts.map +1 -1
- package/dist/components/Text/Text.mjs +3 -1
- package/dist/components/Text/Text.mjs.map +1 -1
- package/dist/components/Text/Text.types.cjs.map +1 -1
- package/dist/components/Text/Text.types.d.cts +2 -2
- package/dist/components/Text/Text.types.d.cts.map +1 -1
- package/dist/components/Text/Text.types.d.mts +2 -2
- package/dist/components/Text/Text.types.d.mts.map +1 -1
- package/dist/components/Text/Text.types.mjs.map +1 -1
- package/dist/components/TextArea/TextArea.cjs +37 -0
- package/dist/components/TextArea/TextArea.cjs.map +1 -0
- package/dist/components/TextArea/TextArea.constants.cjs +35 -0
- package/dist/components/TextArea/TextArea.constants.cjs.map +1 -0
- package/dist/components/TextArea/TextArea.constants.d.cts +28 -0
- package/dist/components/TextArea/TextArea.constants.d.cts.map +1 -0
- package/dist/components/TextArea/TextArea.constants.d.mts +28 -0
- package/dist/components/TextArea/TextArea.constants.d.mts.map +1 -0
- package/dist/components/TextArea/TextArea.constants.mjs +32 -0
- package/dist/components/TextArea/TextArea.constants.mjs.map +1 -0
- package/dist/components/TextArea/TextArea.d.cts +9 -0
- package/dist/components/TextArea/TextArea.d.cts.map +1 -0
- package/dist/components/TextArea/TextArea.d.mts +9 -0
- package/dist/components/TextArea/TextArea.d.mts.map +1 -0
- package/dist/components/TextArea/TextArea.mjs +18 -0
- package/dist/components/TextArea/TextArea.mjs.map +1 -0
- package/dist/components/TextArea/TextArea.types.cjs +3 -0
- package/dist/components/TextArea/TextArea.types.cjs.map +1 -0
- package/dist/components/TextArea/TextArea.types.d.cts +33 -0
- package/dist/components/TextArea/TextArea.types.d.cts.map +1 -0
- package/dist/components/TextArea/TextArea.types.d.mts +33 -0
- package/dist/components/TextArea/TextArea.types.d.mts.map +1 -0
- package/dist/components/TextArea/TextArea.types.mjs +2 -0
- package/dist/components/TextArea/TextArea.types.mjs.map +1 -0
- package/dist/components/TextArea/index.cjs +8 -0
- package/dist/components/TextArea/index.cjs.map +1 -0
- package/dist/components/TextArea/index.d.cts +4 -0
- package/dist/components/TextArea/index.d.cts.map +1 -0
- package/dist/components/TextArea/index.d.mts +4 -0
- package/dist/components/TextArea/index.d.mts.map +1 -0
- package/dist/components/TextArea/index.mjs +3 -0
- package/dist/components/TextArea/index.mjs.map +1 -0
- package/dist/components/TextField/TextField.cjs +77 -0
- package/dist/components/TextField/TextField.cjs.map +1 -0
- package/dist/components/TextField/TextField.d.cts +324 -0
- package/dist/components/TextField/TextField.d.cts.map +1 -0
- package/dist/components/TextField/TextField.d.mts +324 -0
- package/dist/components/TextField/TextField.d.mts.map +1 -0
- package/dist/components/TextField/TextField.mjs +58 -0
- package/dist/components/TextField/TextField.mjs.map +1 -0
- package/dist/components/TextField/TextField.types.cjs +26 -0
- package/dist/components/TextField/TextField.types.cjs.map +1 -0
- package/dist/components/TextField/TextField.types.d.cts +102 -0
- package/dist/components/TextField/TextField.types.d.cts.map +1 -0
- package/dist/components/TextField/TextField.types.d.mts +102 -0
- package/dist/components/TextField/TextField.types.d.mts.map +1 -0
- package/dist/components/TextField/TextField.types.mjs +23 -0
- package/dist/components/TextField/TextField.types.mjs.map +1 -0
- package/dist/components/TextField/index.cjs +9 -0
- package/dist/components/TextField/index.cjs.map +1 -0
- package/dist/components/TextField/index.d.cts +4 -0
- package/dist/components/TextField/index.d.cts.map +1 -0
- package/dist/components/TextField/index.d.mts +4 -0
- package/dist/components/TextField/index.d.mts.map +1 -0
- package/dist/components/TextField/index.mjs +3 -0
- package/dist/components/TextField/index.mjs.map +1 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.cjs +40 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.cjs.map +1 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.d.cts +6 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.d.cts.map +1 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.d.mts +6 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.d.mts.map +1 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.mjs +21 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.mjs.map +1 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.types.cjs +3 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.types.cjs.map +1 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.types.d.cts +17 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.types.d.cts.map +1 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.types.d.mts +17 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.types.d.mts.map +1 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.types.mjs +2 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.types.mjs.map +1 -0
- package/dist/components/TextFieldSearch/index.cjs +6 -0
- package/dist/components/TextFieldSearch/index.cjs.map +1 -0
- package/dist/components/TextFieldSearch/index.d.cts +3 -0
- package/dist/components/TextFieldSearch/index.d.cts.map +1 -0
- package/dist/components/TextFieldSearch/index.d.mts +3 -0
- package/dist/components/TextFieldSearch/index.d.mts.map +1 -0
- package/dist/components/TextFieldSearch/index.mjs +2 -0
- package/dist/components/TextFieldSearch/index.mjs.map +1 -0
- package/dist/components/index.cjs +16 -1
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +10 -0
- package/dist/components/index.d.cts.map +1 -1
- package/dist/components/index.d.mts +10 -0
- package/dist/components/index.d.mts.map +1 -1
- package/dist/components/index.mjs +5 -0
- package/dist/components/index.mjs.map +1 -1
- package/package.json +11 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.constants.mjs","sourceRoot":"","sources":["../../../src/components/Text/Text.constants.ts"],"names":[],"mappings":"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","sourcesContent":["import {\n FontFamily,\n FontStyle,\n FontWeight,\n TextVariant,\n} from '@metamask/design-system-shared';\n\nexport const TWCLASSMAP_TEXT_FONTWEIGHT: Record<FontWeight, string> = {\n [FontWeight.Bold]: 'font-bold',\n [FontWeight.Medium]: 'font-medium',\n [FontWeight.Regular]: 'font-regular',\n};\n\nexport const TWCLASSMAP_TEXT_FONTFAMILY: Record<FontFamily, string> = {\n [FontFamily.Default]: 'font-default',\n [FontFamily.Accent]: 'font-accent',\n [FontFamily.Hero]: 'font-hero',\n};\n\nexport const TWCLASSMAP_TEXT_FONTSTYLE: Record<FontStyle, string> = {\n [FontStyle.Italic]: 'italic',\n [FontStyle.Normal]: 'not-italic',\n};\n\nexport const TWCLASSMAP_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 TWCLASSMAP_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-bold',\n [TextVariant.SectionHeading]: 'font-bold',\n [TextVariant.ButtonLabelMd]: 'font-medium',\n [TextVariant.ButtonLabelLg]: 'font-medium',\n [TextVariant.AmountDisplayLg]: 'font-bold md:font-medium',\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
|
+
{"version":3,"file":"Text.constants.mjs","sourceRoot":"","sources":["../../../src/components/Text/Text.constants.ts"],"names":[],"mappings":"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","sourcesContent":["import {\n FontFamily,\n FontStyle,\n FontWeight,\n TextVariant,\n} from '@metamask/design-system-shared';\n\nexport const TWCLASSMAP_TEXT_FONTWEIGHT: Record<FontWeight, string> = {\n [FontWeight.Bold]: 'font-bold',\n [FontWeight.Medium]: 'font-medium',\n [FontWeight.Regular]: 'font-regular',\n};\n\nexport const TWCLASSMAP_TEXT_FONTFAMILY: Record<FontFamily, string> = {\n [FontFamily.Default]: 'font-default',\n [FontFamily.Accent]: 'font-accent',\n [FontFamily.Hero]: 'font-hero',\n};\n\nexport const TWCLASSMAP_TEXT_FONTSTYLE: Record<FontStyle, string> = {\n [FontStyle.Italic]: 'italic',\n [FontStyle.Normal]: 'not-italic',\n};\n\nexport const TWCLASSMAP_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 TWCLASSMAP_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-bold',\n [TextVariant.SectionHeading]: 'font-bold',\n [TextVariant.ButtonLabelMd]: 'font-medium',\n [TextVariant.ButtonLabelLg]: 'font-medium',\n [TextVariant.AmountDisplayLg]: 'font-bold md:font-medium',\n};\n\nexport const MAP_TEXT_VARIANT_TAG: Record<\n TextVariant,\n keyof React.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.d.cts","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,cAAc;AAY1B,OAAO,KAAK,EAAE,SAAS,EAAE,yBAAqB;AAE9C,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"Text.d.cts","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,cAAc;AAY1B,OAAO,KAAK,EAAE,SAAS,EAAE,yBAAqB;AAE9C,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CA0CpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.d.mts","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,cAAc;AAY1B,OAAO,KAAK,EAAE,SAAS,EAAE,yBAAqB;AAE9C,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"Text.d.mts","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,cAAc;AAY1B,OAAO,KAAK,EAAE,SAAS,EAAE,yBAAqB;AAE9C,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CA0CpC,CAAC"}
|
|
@@ -13,7 +13,9 @@ import { TWCLASSMAP_TEXT_VARIANT_FONTSTYLE, TWCLASSMAP_TEXT_VARIANT_FONTWEIGHT,
|
|
|
13
13
|
export const Text = ({ variant = TextVariant.BodyMd, children, className, fontWeight, fontFamily = FontFamily.Default, fontStyle, textTransform, textAlign, overflowWrap, ellipsis, asChild, color = TextColor.TextDefault, style, ...props }) => {
|
|
14
14
|
// When asChild is true, use Radix Slot to merge props onto the child component.
|
|
15
15
|
// Otherwise, render the semantic HTML element mapped to this variant (e.g. h1-h4, p).
|
|
16
|
-
const Component = asChild
|
|
16
|
+
const Component = asChild
|
|
17
|
+
? Slot
|
|
18
|
+
: MAP_TEXT_VARIANT_TAG[variant];
|
|
17
19
|
const mergedClassName = `${twMerge(color, TWCLASSMAP_TEXT_VARIANT_FONTSTYLE[variant], fontWeight
|
|
18
20
|
? TWCLASSMAP_TEXT_FONTWEIGHT[fontWeight]
|
|
19
21
|
: TWCLASSMAP_TEXT_VARIANT_FONTWEIGHT[variant], fontStyle ? TWCLASSMAP_TEXT_FONTSTYLE[fontStyle] : undefined, TWCLASSMAP_TEXT_FONTFAMILY[fontFamily], textTransform, textAlign, overflowWrap, ellipsis && 'truncate', className)}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.mjs","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,UAAU,EACV,SAAS,EACT,WAAW,EACZ,uCAAuC;AACxC,OAAO,EAAE,IAAI,EAAE,6BAA6B;AAC5C,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,OAAO,EAAE,iCAA6B;AAE/C,OAAO,EACL,iCAAiC,EACjC,kCAAkC,EAClC,0BAA0B,EAC1B,yBAAyB,EACzB,0BAA0B,EAC1B,oBAAoB,EACrB,6BAAyB;AAG1B,MAAM,CAAC,MAAM,IAAI,GAAwB,CAAC,EACxC,OAAO,GAAG,WAAW,CAAC,MAAM,EAC5B,QAAQ,EACR,SAAS,EACT,UAAU,EACV,UAAU,GAAG,UAAU,CAAC,OAAO,EAC/B,SAAS,EACT,aAAa,EACb,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,OAAO,EACP,KAAK,GAAG,SAAS,CAAC,WAAW,EAC7B,KAAK,EACL,GAAG,KAAK,EACT,EAAE,EAAE;IACH,gFAAgF;IAChF,sFAAsF;IACtF,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"Text.mjs","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,UAAU,EACV,SAAS,EACT,WAAW,EACZ,uCAAuC;AACxC,OAAO,EAAE,IAAI,EAAE,6BAA6B;AAC5C,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,OAAO,EAAE,iCAA6B;AAE/C,OAAO,EACL,iCAAiC,EACjC,kCAAkC,EAClC,0BAA0B,EAC1B,yBAAyB,EACzB,0BAA0B,EAC1B,oBAAoB,EACrB,6BAAyB;AAG1B,MAAM,CAAC,MAAM,IAAI,GAAwB,CAAC,EACxC,OAAO,GAAG,WAAW,CAAC,MAAM,EAC5B,QAAQ,EACR,SAAS,EACT,UAAU,EACV,UAAU,GAAG,UAAU,CAAC,OAAO,EAC/B,SAAS,EACT,aAAa,EACb,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,OAAO,EACP,KAAK,GAAG,SAAS,CAAC,WAAW,EAC7B,KAAK,EACL,GAAG,KAAK,EACT,EAAE,EAAE;IACH,gFAAgF;IAChF,sFAAsF;IACtF,MAAM,SAAS,GAAsB,OAAO;QAC1C,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAElC,MAAM,eAAe,GAAG,GAAG,OAAO,CAChC,KAAK,EACL,iCAAiC,CAAC,OAAO,CAAC,EAC1C,UAAU;QACR,CAAC,CAAC,0BAA0B,CAAC,UAAU,CAAC;QACxC,CAAC,CAAC,kCAAkC,CAAC,OAAO,CAAC,EAC/C,SAAS,CAAC,CAAC,CAAC,yBAAyB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,EAC5D,0BAA0B,CAAC,UAAU,CAAC,EACtC,aAAa,EACb,SAAS,EACT,YAAY,EACZ,QAAQ,IAAI,UAAU,EACtB,SAAS,CACV,EAAE,CAAC;IAEJ,OAAO,CACL,oBAAC,SAAS,IAAC,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,KAAM,KAAK,IAC3D,QAAQ,CACC,CACb,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {\n FontFamily,\n TextColor,\n TextVariant,\n} from '@metamask/design-system-shared';\nimport { Slot } from '@radix-ui/react-slot';\nimport React from 'react';\n\nimport { twMerge } from '../../utils/tw-merge';\n\nimport {\n TWCLASSMAP_TEXT_VARIANT_FONTSTYLE,\n TWCLASSMAP_TEXT_VARIANT_FONTWEIGHT,\n TWCLASSMAP_TEXT_FONTFAMILY,\n TWCLASSMAP_TEXT_FONTSTYLE,\n TWCLASSMAP_TEXT_FONTWEIGHT,\n MAP_TEXT_VARIANT_TAG,\n} from './Text.constants';\nimport type { TextProps } from './Text.types';\n\nexport const Text: React.FC<TextProps> = ({\n variant = TextVariant.BodyMd,\n children,\n className,\n fontWeight,\n fontFamily = FontFamily.Default,\n fontStyle,\n textTransform,\n textAlign,\n overflowWrap,\n ellipsis,\n asChild,\n color = TextColor.TextDefault,\n style,\n ...props\n}) => {\n // When asChild is true, use Radix Slot to merge props onto the child component.\n // Otherwise, render the semantic HTML element mapped to this variant (e.g. h1-h4, p).\n const Component: React.ElementType = asChild\n ? Slot\n : MAP_TEXT_VARIANT_TAG[variant];\n\n const mergedClassName = `${twMerge(\n color,\n TWCLASSMAP_TEXT_VARIANT_FONTSTYLE[variant],\n fontWeight\n ? TWCLASSMAP_TEXT_FONTWEIGHT[fontWeight]\n : TWCLASSMAP_TEXT_VARIANT_FONTWEIGHT[variant],\n fontStyle ? TWCLASSMAP_TEXT_FONTSTYLE[fontStyle] : undefined,\n TWCLASSMAP_TEXT_FONTFAMILY[fontFamily],\n textTransform,\n textAlign,\n overflowWrap,\n ellipsis && 'truncate',\n className,\n )}`;\n\n return (\n <Component className={mergedClassName} style={style} {...props}>\n {children}\n </Component>\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.types.cjs","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextPropsShared } from '@metamask/design-system-shared';\n\nimport type { OverflowWrap, TextAlign, TextTransform } from '../../types';\n\nexport type TextProps = TextPropsShared & {\n /**\n * Optional prop for inline styles\n */\n style?:
|
|
1
|
+
{"version":3,"file":"Text.types.cjs","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextPropsShared } from '@metamask/design-system-shared';\nimport type { CSSProperties } from 'react';\n\nimport type { OverflowWrap, TextAlign, TextTransform } from '../../types';\n\nexport type TextProps = TextPropsShared & {\n /**\n * Optional prop for inline styles\n */\n style?: CSSProperties;\n /**\n * Optional prop for additional CSS classes to be applied to the Text component.\n */\n className?: string;\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 boolean that 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 for testing purposes\n */\n 'data-testid'?: string;\n};\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { TextPropsShared } from "@metamask/design-system-shared";
|
|
2
|
+
import type { CSSProperties } from "react";
|
|
3
3
|
import type { OverflowWrap, TextAlign, TextTransform } from "../../types/index.cjs";
|
|
4
4
|
export type TextProps = TextPropsShared & {
|
|
5
5
|
/**
|
|
6
6
|
* Optional prop for inline styles
|
|
7
7
|
*/
|
|
8
|
-
style?:
|
|
8
|
+
style?: CSSProperties;
|
|
9
9
|
/**
|
|
10
10
|
* Optional prop for additional CSS classes to be applied to the Text component.
|
|
11
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.types.d.cts","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Text.types.d.cts","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,uCAAuC;AACtE,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc;AAE3C,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,8BAAoB;AAE1E,MAAM,MAAM,SAAS,GAAG,eAAe,GAAG;IACxC;;OAEG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { TextPropsShared } from "@metamask/design-system-shared";
|
|
2
|
+
import type { CSSProperties } from "react";
|
|
3
3
|
import type { OverflowWrap, TextAlign, TextTransform } from "../../types/index.mjs";
|
|
4
4
|
export type TextProps = TextPropsShared & {
|
|
5
5
|
/**
|
|
6
6
|
* Optional prop for inline styles
|
|
7
7
|
*/
|
|
8
|
-
style?:
|
|
8
|
+
style?: CSSProperties;
|
|
9
9
|
/**
|
|
10
10
|
* Optional prop for additional CSS classes to be applied to the Text component.
|
|
11
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.types.d.mts","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Text.types.d.mts","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,uCAAuC;AACtE,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc;AAE3C,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,8BAAoB;AAE1E,MAAM,MAAM,SAAS,GAAG,eAAe,GAAG;IACxC;;OAEG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.types.mjs","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextPropsShared } from '@metamask/design-system-shared';\n\nimport type { OverflowWrap, TextAlign, TextTransform } from '../../types';\n\nexport type TextProps = TextPropsShared & {\n /**\n * Optional prop for inline styles\n */\n style?:
|
|
1
|
+
{"version":3,"file":"Text.types.mjs","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextPropsShared } from '@metamask/design-system-shared';\nimport type { CSSProperties } from 'react';\n\nimport type { OverflowWrap, TextAlign, TextTransform } from '../../types';\n\nexport type TextProps = TextPropsShared & {\n /**\n * Optional prop for inline styles\n */\n style?: CSSProperties;\n /**\n * Optional prop for additional CSS classes to be applied to the Text component.\n */\n className?: string;\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 boolean that 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 for testing purposes\n */\n 'data-testid'?: string;\n};\n"]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.TextArea = void 0;
|
|
27
|
+
const react_1 = __importStar(require("react"));
|
|
28
|
+
const tw_merge_1 = require("../../utils/tw-merge.cjs");
|
|
29
|
+
const TextArea_constants_1 = require("./TextArea.constants.cjs");
|
|
30
|
+
exports.TextArea = (0, react_1.forwardRef)(({ value, placeholder, autoFocus = false, isDisabled = false, isReadOnly = false, isError = false, onBlur, onChange, onFocus, resize = TextArea_constants_1.TextAreaResize.None, className, ...props }, ref) => {
|
|
31
|
+
const textAreaClassName = (0, tw_merge_1.twMerge)('m-0 block min-h-24 w-full rounded-lg border bg-muted px-4 py-3 text-default outline-none transition-colors', 'text-s-body-md font-regular leading-s-body-md tracking-s-body-md md:text-l-body-md md:leading-l-body-md md:tracking-l-body-md', 'placeholder:text-alternative', TextArea_constants_1.CLASSMAP_TEXTAREA_RESIZE[resize], 'border-muted', isDisabled && 'cursor-not-allowed border-muted opacity-50', !isDisabled && isError && 'border-error-default', !isDisabled &&
|
|
32
|
+
!isError &&
|
|
33
|
+
'focus:border-default read-only:focus:border-muted', className);
|
|
34
|
+
return (react_1.default.createElement("textarea", { ...props, ref: ref, value: value, placeholder: placeholder, className: textAreaClassName, disabled: isDisabled, readOnly: isReadOnly, autoFocus: autoFocus, "aria-invalid": isError || undefined, onChange: onChange, onFocus: onFocus, onBlur: onBlur }));
|
|
35
|
+
});
|
|
36
|
+
exports.TextArea.displayName = 'TextArea';
|
|
37
|
+
//# sourceMappingURL=TextArea.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.cjs","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0C;AAE1C,uDAA+C;AAE/C,iEAAgF;AAGnE,QAAA,QAAQ,GAAG,IAAA,kBAAU,EAChC,CACE,EACE,KAAK,EACL,WAAW,EACX,SAAS,GAAG,KAAK,EACjB,UAAU,GAAG,KAAK,EAClB,UAAU,GAAG,KAAK,EAClB,OAAO,GAAG,KAAK,EACf,MAAM,EACN,QAAQ,EACR,OAAO,EACP,MAAM,GAAG,mCAAc,CAAC,IAAI,EAC5B,SAAS,EACT,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,iBAAiB,GAAG,IAAA,kBAAO,EAC/B,4GAA4G,EAC5G,+HAA+H,EAC/H,8BAA8B,EAC9B,6CAAwB,CAAC,MAAM,CAAC,EAChC,cAAc,EACd,UAAU,IAAI,4CAA4C,EAC1D,CAAC,UAAU,IAAI,OAAO,IAAI,sBAAsB,EAChD,CAAC,UAAU;QACT,CAAC,OAAO;QACR,mDAAmD,EACrD,SAAS,CACV,CAAC;IAEF,OAAO,CACL,+CACM,KAAK,EACT,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,iBAAiB,EAC5B,QAAQ,EAAE,UAAU,EACpB,QAAQ,EAAE,UAAU,EACpB,SAAS,EAAE,SAAS,kBACN,OAAO,IAAI,SAAS,EAClC,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,GACd,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAQ,CAAC,WAAW,GAAG,UAAU,CAAC","sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { twMerge } from '../../utils/tw-merge';\n\nimport { CLASSMAP_TEXTAREA_RESIZE, TextAreaResize } from './TextArea.constants';\nimport type { TextAreaProps } from './TextArea.types';\n\nexport const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n (\n {\n value,\n placeholder,\n autoFocus = false,\n isDisabled = false,\n isReadOnly = false,\n isError = false,\n onBlur,\n onChange,\n onFocus,\n resize = TextAreaResize.None,\n className,\n ...props\n },\n ref,\n ) => {\n const textAreaClassName = twMerge(\n 'm-0 block min-h-24 w-full rounded-lg border bg-muted px-4 py-3 text-default outline-none transition-colors',\n 'text-s-body-md font-regular leading-s-body-md tracking-s-body-md md:text-l-body-md md:leading-l-body-md md:tracking-l-body-md',\n 'placeholder:text-alternative',\n CLASSMAP_TEXTAREA_RESIZE[resize],\n 'border-muted',\n isDisabled && 'cursor-not-allowed border-muted opacity-50',\n !isDisabled && isError && 'border-error-default',\n !isDisabled &&\n !isError &&\n 'focus:border-default read-only:focus:border-muted',\n className,\n );\n\n return (\n <textarea\n {...props}\n ref={ref}\n value={value}\n placeholder={placeholder}\n className={textAreaClassName}\n disabled={isDisabled}\n readOnly={isReadOnly}\n autoFocus={autoFocus}\n aria-invalid={isError || undefined}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={onBlur}\n />\n );\n },\n);\n\nTextArea.displayName = 'TextArea';\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CLASSMAP_TEXTAREA_RESIZE = exports.TextAreaResize = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* TextAreaResize - resize
|
|
6
|
+
* Controls the resize behavior of the textarea element.
|
|
7
|
+
*/
|
|
8
|
+
exports.TextAreaResize = {
|
|
9
|
+
/**
|
|
10
|
+
* The textarea cannot be resized.
|
|
11
|
+
*/
|
|
12
|
+
None: 'none',
|
|
13
|
+
/**
|
|
14
|
+
* The textarea can be resized both horizontally and vertically.
|
|
15
|
+
*/
|
|
16
|
+
Both: 'both',
|
|
17
|
+
/**
|
|
18
|
+
* The textarea can only be resized horizontally.
|
|
19
|
+
*/
|
|
20
|
+
Horizontal: 'horizontal',
|
|
21
|
+
/**
|
|
22
|
+
* The textarea can only be resized vertically.
|
|
23
|
+
*/
|
|
24
|
+
Vertical: 'vertical',
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Maps TextAreaResize values to Tailwind CSS resize classes.
|
|
28
|
+
*/
|
|
29
|
+
exports.CLASSMAP_TEXTAREA_RESIZE = {
|
|
30
|
+
[exports.TextAreaResize.None]: 'resize-none',
|
|
31
|
+
[exports.TextAreaResize.Both]: 'resize',
|
|
32
|
+
[exports.TextAreaResize.Horizontal]: 'resize-x',
|
|
33
|
+
[exports.TextAreaResize.Vertical]: 'resize-y',
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=TextArea.constants.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.constants.cjs","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.constants.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACU,QAAA,cAAc,GAAG;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM;IACZ;;OAEG;IACH,IAAI,EAAE,MAAM;IACZ;;OAEG;IACH,UAAU,EAAE,YAAY;IACxB;;OAEG;IACH,QAAQ,EAAE,UAAU;CACZ,CAAC;AAIX;;GAEG;AACU,QAAA,wBAAwB,GAAmC;IACtE,CAAC,sBAAc,CAAC,IAAI,CAAC,EAAE,aAAa;IACpC,CAAC,sBAAc,CAAC,IAAI,CAAC,EAAE,QAAQ;IAC/B,CAAC,sBAAc,CAAC,UAAU,CAAC,EAAE,UAAU;IACvC,CAAC,sBAAc,CAAC,QAAQ,CAAC,EAAE,UAAU;CACtC,CAAC","sourcesContent":["/**\n * TextAreaResize - resize\n * Controls the resize behavior of the textarea element.\n */\nexport const TextAreaResize = {\n /**\n * The textarea cannot be resized.\n */\n None: 'none',\n /**\n * The textarea can be resized both horizontally and vertically.\n */\n Both: 'both',\n /**\n * The textarea can only be resized horizontally.\n */\n Horizontal: 'horizontal',\n /**\n * The textarea can only be resized vertically.\n */\n Vertical: 'vertical',\n} as const;\nexport type TextAreaResize =\n (typeof TextAreaResize)[keyof typeof TextAreaResize];\n\n/**\n * Maps TextAreaResize values to Tailwind CSS resize classes.\n */\nexport const CLASSMAP_TEXTAREA_RESIZE: Record<TextAreaResize, string> = {\n [TextAreaResize.None]: 'resize-none',\n [TextAreaResize.Both]: 'resize',\n [TextAreaResize.Horizontal]: 'resize-x',\n [TextAreaResize.Vertical]: 'resize-y',\n};\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TextAreaResize - resize
|
|
3
|
+
* Controls the resize behavior of the textarea element.
|
|
4
|
+
*/
|
|
5
|
+
export declare const TextAreaResize: {
|
|
6
|
+
/**
|
|
7
|
+
* The textarea cannot be resized.
|
|
8
|
+
*/
|
|
9
|
+
readonly None: "none";
|
|
10
|
+
/**
|
|
11
|
+
* The textarea can be resized both horizontally and vertically.
|
|
12
|
+
*/
|
|
13
|
+
readonly Both: "both";
|
|
14
|
+
/**
|
|
15
|
+
* The textarea can only be resized horizontally.
|
|
16
|
+
*/
|
|
17
|
+
readonly Horizontal: "horizontal";
|
|
18
|
+
/**
|
|
19
|
+
* The textarea can only be resized vertically.
|
|
20
|
+
*/
|
|
21
|
+
readonly Vertical: "vertical";
|
|
22
|
+
};
|
|
23
|
+
export type TextAreaResize = (typeof TextAreaResize)[keyof typeof TextAreaResize];
|
|
24
|
+
/**
|
|
25
|
+
* Maps TextAreaResize values to Tailwind CSS resize classes.
|
|
26
|
+
*/
|
|
27
|
+
export declare const CLASSMAP_TEXTAREA_RESIZE: Record<TextAreaResize, string>;
|
|
28
|
+
//# sourceMappingURL=TextArea.constants.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.constants.d.cts","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,cAAc;IACzB;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;CAEK,CAAC;AACX,MAAM,MAAM,cAAc,GACxB,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAKnE,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TextAreaResize - resize
|
|
3
|
+
* Controls the resize behavior of the textarea element.
|
|
4
|
+
*/
|
|
5
|
+
export declare const TextAreaResize: {
|
|
6
|
+
/**
|
|
7
|
+
* The textarea cannot be resized.
|
|
8
|
+
*/
|
|
9
|
+
readonly None: "none";
|
|
10
|
+
/**
|
|
11
|
+
* The textarea can be resized both horizontally and vertically.
|
|
12
|
+
*/
|
|
13
|
+
readonly Both: "both";
|
|
14
|
+
/**
|
|
15
|
+
* The textarea can only be resized horizontally.
|
|
16
|
+
*/
|
|
17
|
+
readonly Horizontal: "horizontal";
|
|
18
|
+
/**
|
|
19
|
+
* The textarea can only be resized vertically.
|
|
20
|
+
*/
|
|
21
|
+
readonly Vertical: "vertical";
|
|
22
|
+
};
|
|
23
|
+
export type TextAreaResize = (typeof TextAreaResize)[keyof typeof TextAreaResize];
|
|
24
|
+
/**
|
|
25
|
+
* Maps TextAreaResize values to Tailwind CSS resize classes.
|
|
26
|
+
*/
|
|
27
|
+
export declare const CLASSMAP_TEXTAREA_RESIZE: Record<TextAreaResize, string>;
|
|
28
|
+
//# sourceMappingURL=TextArea.constants.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.constants.d.mts","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,cAAc;IACzB;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;CAEK,CAAC;AACX,MAAM,MAAM,cAAc,GACxB,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAKnE,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TextAreaResize - resize
|
|
3
|
+
* Controls the resize behavior of the textarea element.
|
|
4
|
+
*/
|
|
5
|
+
export const TextAreaResize = {
|
|
6
|
+
/**
|
|
7
|
+
* The textarea cannot be resized.
|
|
8
|
+
*/
|
|
9
|
+
None: 'none',
|
|
10
|
+
/**
|
|
11
|
+
* The textarea can be resized both horizontally and vertically.
|
|
12
|
+
*/
|
|
13
|
+
Both: 'both',
|
|
14
|
+
/**
|
|
15
|
+
* The textarea can only be resized horizontally.
|
|
16
|
+
*/
|
|
17
|
+
Horizontal: 'horizontal',
|
|
18
|
+
/**
|
|
19
|
+
* The textarea can only be resized vertically.
|
|
20
|
+
*/
|
|
21
|
+
Vertical: 'vertical',
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Maps TextAreaResize values to Tailwind CSS resize classes.
|
|
25
|
+
*/
|
|
26
|
+
export const CLASSMAP_TEXTAREA_RESIZE = {
|
|
27
|
+
[TextAreaResize.None]: 'resize-none',
|
|
28
|
+
[TextAreaResize.Both]: 'resize',
|
|
29
|
+
[TextAreaResize.Horizontal]: 'resize-x',
|
|
30
|
+
[TextAreaResize.Vertical]: 'resize-y',
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=TextArea.constants.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.constants.mjs","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM;IACZ;;OAEG;IACH,IAAI,EAAE,MAAM;IACZ;;OAEG;IACH,UAAU,EAAE,YAAY;IACxB;;OAEG;IACH,QAAQ,EAAE,UAAU;CACZ,CAAC;AAIX;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAmC;IACtE,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,aAAa;IACpC,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,QAAQ;IAC/B,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE,UAAU;IACvC,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,UAAU;CACtC,CAAC","sourcesContent":["/**\n * TextAreaResize - resize\n * Controls the resize behavior of the textarea element.\n */\nexport const TextAreaResize = {\n /**\n * The textarea cannot be resized.\n */\n None: 'none',\n /**\n * The textarea can be resized both horizontally and vertically.\n */\n Both: 'both',\n /**\n * The textarea can only be resized horizontally.\n */\n Horizontal: 'horizontal',\n /**\n * The textarea can only be resized vertically.\n */\n Vertical: 'vertical',\n} as const;\nexport type TextAreaResize =\n (typeof TextAreaResize)[keyof typeof TextAreaResize];\n\n/**\n * Maps TextAreaResize values to Tailwind CSS resize classes.\n */\nexport const CLASSMAP_TEXTAREA_RESIZE: Record<TextAreaResize, string> = {\n [TextAreaResize.None]: 'resize-none',\n [TextAreaResize.Both]: 'resize',\n [TextAreaResize.Horizontal]: 'resize-x',\n [TextAreaResize.Vertical]: 'resize-y',\n};\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TextAreaResize } from "./TextArea.constants.cjs";
|
|
3
|
+
export declare const TextArea: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref">, "value" | "disabled" | "placeholder" | "readOnly" | "defaultValue" | "autoFocus" | "onFocus" | "onBlur" | "onChange"> & Omit<import("@metamask/design-system-shared").TextAreaPropsShared, "textVariant"> & {
|
|
4
|
+
resize?: TextAreaResize | undefined;
|
|
5
|
+
onChange?: ((event: React.ChangeEvent<HTMLTextAreaElement, Element>) => void) | undefined;
|
|
6
|
+
onFocus?: ((event: React.FocusEvent<HTMLTextAreaElement, Element>) => void) | undefined;
|
|
7
|
+
onBlur?: ((event: React.FocusEvent<HTMLTextAreaElement, Element>) => void) | undefined;
|
|
8
|
+
} & React.RefAttributes<HTMLTextAreaElement>>;
|
|
9
|
+
//# sourceMappingURL=TextArea.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.d.cts","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,cAAc;AAI1C,OAAO,EAA4B,cAAc,EAAE,iCAA6B;AAGhF,eAAO,MAAM,QAAQ;;;;;6CAiDpB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TextAreaResize } from "./TextArea.constants.mjs";
|
|
3
|
+
export declare const TextArea: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref">, "value" | "disabled" | "placeholder" | "readOnly" | "defaultValue" | "autoFocus" | "onFocus" | "onBlur" | "onChange"> & Omit<import("@metamask/design-system-shared").TextAreaPropsShared, "textVariant"> & {
|
|
4
|
+
resize?: TextAreaResize | undefined;
|
|
5
|
+
onChange?: ((event: React.ChangeEvent<HTMLTextAreaElement, Element>) => void) | undefined;
|
|
6
|
+
onFocus?: ((event: React.FocusEvent<HTMLTextAreaElement, Element>) => void) | undefined;
|
|
7
|
+
onBlur?: ((event: React.FocusEvent<HTMLTextAreaElement, Element>) => void) | undefined;
|
|
8
|
+
} & React.RefAttributes<HTMLTextAreaElement>>;
|
|
9
|
+
//# sourceMappingURL=TextArea.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.d.mts","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,cAAc;AAI1C,OAAO,EAA4B,cAAc,EAAE,iCAA6B;AAGhF,eAAO,MAAM,QAAQ;;;;;6CAiDpB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
function $importDefault(module) {
|
|
2
|
+
if (module?.__esModule) {
|
|
3
|
+
return module.default;
|
|
4
|
+
}
|
|
5
|
+
return module;
|
|
6
|
+
}
|
|
7
|
+
import $React, { forwardRef } from "react";
|
|
8
|
+
const React = $importDefault($React);
|
|
9
|
+
import { twMerge } from "../../utils/tw-merge.mjs";
|
|
10
|
+
import { CLASSMAP_TEXTAREA_RESIZE, TextAreaResize } from "./TextArea.constants.mjs";
|
|
11
|
+
export const TextArea = forwardRef(({ value, placeholder, autoFocus = false, isDisabled = false, isReadOnly = false, isError = false, onBlur, onChange, onFocus, resize = TextAreaResize.None, className, ...props }, ref) => {
|
|
12
|
+
const textAreaClassName = twMerge('m-0 block min-h-24 w-full rounded-lg border bg-muted px-4 py-3 text-default outline-none transition-colors', 'text-s-body-md font-regular leading-s-body-md tracking-s-body-md md:text-l-body-md md:leading-l-body-md md:tracking-l-body-md', 'placeholder:text-alternative', CLASSMAP_TEXTAREA_RESIZE[resize], 'border-muted', isDisabled && 'cursor-not-allowed border-muted opacity-50', !isDisabled && isError && 'border-error-default', !isDisabled &&
|
|
13
|
+
!isError &&
|
|
14
|
+
'focus:border-default read-only:focus:border-muted', className);
|
|
15
|
+
return (React.createElement("textarea", { ...props, ref: ref, value: value, placeholder: placeholder, className: textAreaClassName, disabled: isDisabled, readOnly: isReadOnly, autoFocus: autoFocus, "aria-invalid": isError || undefined, onChange: onChange, onFocus: onFocus, onBlur: onBlur }));
|
|
16
|
+
});
|
|
17
|
+
TextArea.displayName = 'TextArea';
|
|
18
|
+
//# sourceMappingURL=TextArea.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.mjs","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,QAAO,EAAE,UAAU,EAAE,cAAc;;AAE1C,OAAO,EAAE,OAAO,EAAE,iCAA6B;AAE/C,OAAO,EAAE,wBAAwB,EAAE,cAAc,EAAE,iCAA6B;AAGhF,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAChC,CACE,EACE,KAAK,EACL,WAAW,EACX,SAAS,GAAG,KAAK,EACjB,UAAU,GAAG,KAAK,EAClB,UAAU,GAAG,KAAK,EAClB,OAAO,GAAG,KAAK,EACf,MAAM,EACN,QAAQ,EACR,OAAO,EACP,MAAM,GAAG,cAAc,CAAC,IAAI,EAC5B,SAAS,EACT,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,iBAAiB,GAAG,OAAO,CAC/B,4GAA4G,EAC5G,+HAA+H,EAC/H,8BAA8B,EAC9B,wBAAwB,CAAC,MAAM,CAAC,EAChC,cAAc,EACd,UAAU,IAAI,4CAA4C,EAC1D,CAAC,UAAU,IAAI,OAAO,IAAI,sBAAsB,EAChD,CAAC,UAAU;QACT,CAAC,OAAO;QACR,mDAAmD,EACrD,SAAS,CACV,CAAC;IAEF,OAAO,CACL,qCACM,KAAK,EACT,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,iBAAiB,EAC5B,QAAQ,EAAE,UAAU,EACpB,QAAQ,EAAE,UAAU,EACpB,SAAS,EAAE,SAAS,kBACN,OAAO,IAAI,SAAS,EAClC,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,GACd,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC","sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { twMerge } from '../../utils/tw-merge';\n\nimport { CLASSMAP_TEXTAREA_RESIZE, TextAreaResize } from './TextArea.constants';\nimport type { TextAreaProps } from './TextArea.types';\n\nexport const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n (\n {\n value,\n placeholder,\n autoFocus = false,\n isDisabled = false,\n isReadOnly = false,\n isError = false,\n onBlur,\n onChange,\n onFocus,\n resize = TextAreaResize.None,\n className,\n ...props\n },\n ref,\n ) => {\n const textAreaClassName = twMerge(\n 'm-0 block min-h-24 w-full rounded-lg border bg-muted px-4 py-3 text-default outline-none transition-colors',\n 'text-s-body-md font-regular leading-s-body-md tracking-s-body-md md:text-l-body-md md:leading-l-body-md md:tracking-l-body-md',\n 'placeholder:text-alternative',\n CLASSMAP_TEXTAREA_RESIZE[resize],\n 'border-muted',\n isDisabled && 'cursor-not-allowed border-muted opacity-50',\n !isDisabled && isError && 'border-error-default',\n !isDisabled &&\n !isError &&\n 'focus:border-default read-only:focus:border-muted',\n className,\n );\n\n return (\n <textarea\n {...props}\n ref={ref}\n value={value}\n placeholder={placeholder}\n className={textAreaClassName}\n disabled={isDisabled}\n readOnly={isReadOnly}\n autoFocus={autoFocus}\n aria-invalid={isError || undefined}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={onBlur}\n />\n );\n },\n);\n\nTextArea.displayName = 'TextArea';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.types.cjs","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextAreaPropsShared } from '@metamask/design-system-shared';\nimport type { ChangeEvent, ComponentPropsWithoutRef, FocusEvent } from 'react';\n\nimport type { TextAreaResize } from './TextArea.constants';\n\n/**\n * TextArea component props (React platform-specific)\n * Extends shared props from @metamask/design-system-shared with React-specific platform concerns\n */\nexport type TextAreaProps = Omit<\n ComponentPropsWithoutRef<'textarea'>,\n | 'autoFocus'\n | 'defaultValue'\n | 'disabled'\n | 'onBlur'\n | 'onChange'\n | 'onFocus'\n | 'placeholder'\n | 'readOnly'\n | 'value'\n> &\n Omit<TextAreaPropsShared, 'textVariant'> & {\n /**\n * Optional prop to control the resize behavior of the textarea.\n * Possible values:\n * - TextAreaResize.None\n * - TextAreaResize.Both\n * - TextAreaResize.Horizontal\n * - TextAreaResize.Vertical\n *\n * @default TextAreaResize.None\n */\n resize?: TextAreaResize;\n /**\n * Called when the textarea value changes.\n */\n onChange?: (event: ChangeEvent<HTMLTextAreaElement>) => void;\n /**\n * Called when the textarea receives focus.\n */\n onFocus?: (event: FocusEvent<HTMLTextAreaElement>) => void;\n /**\n * Called when the textarea loses focus.\n */\n onBlur?: (event: FocusEvent<HTMLTextAreaElement>) => void;\n };\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { TextAreaPropsShared } from "@metamask/design-system-shared";
|
|
2
|
+
import type { ChangeEvent, ComponentPropsWithoutRef, FocusEvent } from "react";
|
|
3
|
+
import type { TextAreaResize } from "./TextArea.constants.cjs";
|
|
4
|
+
/**
|
|
5
|
+
* TextArea component props (React platform-specific)
|
|
6
|
+
* Extends shared props from @metamask/design-system-shared with React-specific platform concerns
|
|
7
|
+
*/
|
|
8
|
+
export type TextAreaProps = Omit<ComponentPropsWithoutRef<'textarea'>, 'autoFocus' | 'defaultValue' | 'disabled' | 'onBlur' | 'onChange' | 'onFocus' | 'placeholder' | 'readOnly' | 'value'> & Omit<TextAreaPropsShared, 'textVariant'> & {
|
|
9
|
+
/**
|
|
10
|
+
* Optional prop to control the resize behavior of the textarea.
|
|
11
|
+
* Possible values:
|
|
12
|
+
* - TextAreaResize.None
|
|
13
|
+
* - TextAreaResize.Both
|
|
14
|
+
* - TextAreaResize.Horizontal
|
|
15
|
+
* - TextAreaResize.Vertical
|
|
16
|
+
*
|
|
17
|
+
* @default TextAreaResize.None
|
|
18
|
+
*/
|
|
19
|
+
resize?: TextAreaResize;
|
|
20
|
+
/**
|
|
21
|
+
* Called when the textarea value changes.
|
|
22
|
+
*/
|
|
23
|
+
onChange?: (event: ChangeEvent<HTMLTextAreaElement>) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Called when the textarea receives focus.
|
|
26
|
+
*/
|
|
27
|
+
onFocus?: (event: FocusEvent<HTMLTextAreaElement>) => void;
|
|
28
|
+
/**
|
|
29
|
+
* Called when the textarea loses focus.
|
|
30
|
+
*/
|
|
31
|
+
onBlur?: (event: FocusEvent<HTMLTextAreaElement>) => void;
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=TextArea.types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.types.d.cts","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,uCAAuC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,wBAAwB,EAAE,UAAU,EAAE,cAAc;AAE/E,OAAO,KAAK,EAAE,cAAc,EAAE,iCAA6B;AAE3D;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,IAAI,CAC9B,wBAAwB,CAAC,UAAU,CAAC,EAClC,WAAW,GACX,cAAc,GACd,UAAU,GACV,QAAQ,GACR,UAAU,GACV,SAAS,GACT,aAAa,GACb,UAAU,GACV,OAAO,CACV,GACC,IAAI,CAAC,mBAAmB,EAAE,aAAa,CAAC,GAAG;IACzC;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;IAC7D;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;IAC3D;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;CAC3D,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { TextAreaPropsShared } from "@metamask/design-system-shared";
|
|
2
|
+
import type { ChangeEvent, ComponentPropsWithoutRef, FocusEvent } from "react";
|
|
3
|
+
import type { TextAreaResize } from "./TextArea.constants.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* TextArea component props (React platform-specific)
|
|
6
|
+
* Extends shared props from @metamask/design-system-shared with React-specific platform concerns
|
|
7
|
+
*/
|
|
8
|
+
export type TextAreaProps = Omit<ComponentPropsWithoutRef<'textarea'>, 'autoFocus' | 'defaultValue' | 'disabled' | 'onBlur' | 'onChange' | 'onFocus' | 'placeholder' | 'readOnly' | 'value'> & Omit<TextAreaPropsShared, 'textVariant'> & {
|
|
9
|
+
/**
|
|
10
|
+
* Optional prop to control the resize behavior of the textarea.
|
|
11
|
+
* Possible values:
|
|
12
|
+
* - TextAreaResize.None
|
|
13
|
+
* - TextAreaResize.Both
|
|
14
|
+
* - TextAreaResize.Horizontal
|
|
15
|
+
* - TextAreaResize.Vertical
|
|
16
|
+
*
|
|
17
|
+
* @default TextAreaResize.None
|
|
18
|
+
*/
|
|
19
|
+
resize?: TextAreaResize;
|
|
20
|
+
/**
|
|
21
|
+
* Called when the textarea value changes.
|
|
22
|
+
*/
|
|
23
|
+
onChange?: (event: ChangeEvent<HTMLTextAreaElement>) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Called when the textarea receives focus.
|
|
26
|
+
*/
|
|
27
|
+
onFocus?: (event: FocusEvent<HTMLTextAreaElement>) => void;
|
|
28
|
+
/**
|
|
29
|
+
* Called when the textarea loses focus.
|
|
30
|
+
*/
|
|
31
|
+
onBlur?: (event: FocusEvent<HTMLTextAreaElement>) => void;
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=TextArea.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.types.d.mts","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,uCAAuC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,wBAAwB,EAAE,UAAU,EAAE,cAAc;AAE/E,OAAO,KAAK,EAAE,cAAc,EAAE,iCAA6B;AAE3D;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,IAAI,CAC9B,wBAAwB,CAAC,UAAU,CAAC,EAClC,WAAW,GACX,cAAc,GACd,UAAU,GACV,QAAQ,GACR,UAAU,GACV,SAAS,GACT,aAAa,GACb,UAAU,GACV,OAAO,CACV,GACC,IAAI,CAAC,mBAAmB,EAAE,aAAa,CAAC,GAAG;IACzC;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;IAC7D;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;IAC3D;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;CAC3D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.types.mjs","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextAreaPropsShared } from '@metamask/design-system-shared';\nimport type { ChangeEvent, ComponentPropsWithoutRef, FocusEvent } from 'react';\n\nimport type { TextAreaResize } from './TextArea.constants';\n\n/**\n * TextArea component props (React platform-specific)\n * Extends shared props from @metamask/design-system-shared with React-specific platform concerns\n */\nexport type TextAreaProps = Omit<\n ComponentPropsWithoutRef<'textarea'>,\n | 'autoFocus'\n | 'defaultValue'\n | 'disabled'\n | 'onBlur'\n | 'onChange'\n | 'onFocus'\n | 'placeholder'\n | 'readOnly'\n | 'value'\n> &\n Omit<TextAreaPropsShared, 'textVariant'> & {\n /**\n * Optional prop to control the resize behavior of the textarea.\n * Possible values:\n * - TextAreaResize.None\n * - TextAreaResize.Both\n * - TextAreaResize.Horizontal\n * - TextAreaResize.Vertical\n *\n * @default TextAreaResize.None\n */\n resize?: TextAreaResize;\n /**\n * Called when the textarea value changes.\n */\n onChange?: (event: ChangeEvent<HTMLTextAreaElement>) => void;\n /**\n * Called when the textarea receives focus.\n */\n onFocus?: (event: FocusEvent<HTMLTextAreaElement>) => void;\n /**\n * Called when the textarea loses focus.\n */\n onBlur?: (event: FocusEvent<HTMLTextAreaElement>) => void;\n };\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TextArea = exports.TextAreaResize = void 0;
|
|
4
|
+
var TextArea_constants_1 = require("./TextArea.constants.cjs");
|
|
5
|
+
Object.defineProperty(exports, "TextAreaResize", { enumerable: true, get: function () { return TextArea_constants_1.TextAreaResize; } });
|
|
6
|
+
var TextArea_1 = require("./TextArea.cjs");
|
|
7
|
+
Object.defineProperty(exports, "TextArea", { enumerable: true, get: function () { return TextArea_1.TextArea; } });
|
|
8
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/TextArea/index.ts"],"names":[],"mappings":";;;AAAA,+DAAsD;AAA7C,oHAAA,cAAc,OAAA;AACvB,2CAAsC;AAA7B,oGAAA,QAAQ,OAAA","sourcesContent":["export { TextAreaResize } from './TextArea.constants';\nexport { TextArea } from './TextArea';\nexport type { TextAreaProps } from './TextArea.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/TextArea/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iCAA6B;AACtD,OAAO,EAAE,QAAQ,EAAE,uBAAmB;AACtC,YAAY,EAAE,aAAa,EAAE,6BAAyB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/TextArea/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iCAA6B;AACtD,OAAO,EAAE,QAAQ,EAAE,uBAAmB;AACtC,YAAY,EAAE,aAAa,EAAE,6BAAyB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/TextArea/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iCAA6B;AACtD,OAAO,EAAE,QAAQ,EAAE,uBAAmB","sourcesContent":["export { TextAreaResize } from './TextArea.constants';\nexport { TextArea } from './TextArea';\nexport type { TextAreaProps } from './TextArea.types';\n"]}
|