@razorpay/blade 11.8.2 → 11.9.1
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/build/lib/native/components/Checkbox/Checkbox.js +4 -3
- package/build/lib/native/components/Checkbox/Checkbox.js.map +1 -1
- package/build/lib/native/components/Checkbox/CheckboxGroup/CheckboxGroup.js +1 -1
- package/build/lib/native/components/Checkbox/CheckboxGroup/CheckboxGroup.js.map +1 -1
- package/build/lib/native/components/Checkbox/CheckboxIcon/CheckboxIcon.js +1 -1
- package/build/lib/native/components/Checkbox/CheckboxIcon/CheckboxIcon.js.map +1 -1
- package/build/lib/native/components/Checkbox/checkboxTokens.js +1 -1
- package/build/lib/native/components/Checkbox/checkboxTokens.js.map +1 -1
- package/build/lib/native/components/Form/CharacterCounter/CharacterCounter.js +2 -1
- package/build/lib/native/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
- package/build/lib/native/components/Form/FormHint.js +2 -1
- package/build/lib/native/components/Form/FormHint.js.map +1 -1
- package/build/lib/native/components/Form/FormLabel.js +3 -1
- package/build/lib/native/components/Form/FormLabel.js.map +1 -1
- package/build/lib/native/components/Form/Selector/SelectorSupportText.js +1 -1
- package/build/lib/native/components/Form/Selector/SelectorSupportText.js.map +1 -1
- package/build/lib/native/components/Form/Selector/SelectorTitle.js.map +1 -1
- package/build/lib/native/components/Form/formTokens.js +8 -0
- package/build/lib/native/components/Form/formTokens.js.map +1 -0
- package/build/lib/native/components/Input/BaseInput/AnimatedBaseInputWrapper.native.js +5 -3
- package/build/lib/native/components/Input/BaseInput/AnimatedBaseInputWrapper.native.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInput.js +8 -2
- package/build/lib/native/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputTagSlot.native.js +2 -2
- package/build/lib/native/components/Input/BaseInput/BaseInputTagSlot.native.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js +4 -2
- package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputWrapper.js +2 -3
- package/build/lib/native/components/Input/BaseInput/BaseInputWrapper.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js +2 -1
- package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputStyles.js +6 -3
- package/build/lib/native/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputTokens.js +8 -0
- package/build/lib/native/components/Input/BaseInput/baseInputTokens.js.map +1 -0
- package/build/lib/native/components/Input/BaseInput/getBaseInputBorderStyles.native.js +4 -0
- package/build/lib/native/components/Input/BaseInput/getBaseInputBorderStyles.native.js.map +1 -0
- package/build/lib/native/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +1 -1
- package/build/lib/native/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
- package/build/lib/native/components/Input/OTPInput/OTPInput.js +1 -1
- package/build/lib/native/components/Input/OTPInput/OTPInput.js.map +1 -1
- package/build/lib/native/components/Input/PasswordInput/PasswordInput.js +1 -1
- package/build/lib/native/components/Input/PasswordInput/PasswordInput.js.map +1 -1
- package/build/lib/native/components/Input/TextArea/TextArea.js +2 -1
- package/build/lib/native/components/Input/TextArea/TextArea.js.map +1 -1
- package/build/lib/native/components/Input/TextInput/TextInput.js +2 -1
- package/build/lib/native/components/Input/TextInput/TextInput.js.map +1 -1
- package/build/lib/native/components/Radio/Radio.js +4 -3
- package/build/lib/native/components/Radio/Radio.js.map +1 -1
- package/build/lib/native/components/Radio/RadioGroup/RadioGroup.js +1 -1
- package/build/lib/native/components/Radio/RadioGroup/RadioGroup.js.map +1 -1
- package/build/lib/native/components/Radio/radioTokens.js +1 -1
- package/build/lib/native/components/Radio/radioTokens.js.map +1 -1
- package/build/lib/native/components/Tag/Tag.js +1 -1
- package/build/lib/native/components/Tag/Tag.js.map +1 -1
- package/build/lib/native/components/Tag/getTagsGroup.js +1 -1
- package/build/lib/native/components/Tag/getTagsGroup.js.map +1 -1
- package/build/lib/native/components/Typography/Heading/Heading.js +2 -2
- package/build/lib/native/components/Typography/Heading/Heading.js.map +1 -1
- package/build/lib/native/components/Typography/Heading/getHeadingStyles.js +7 -0
- package/build/lib/native/components/Typography/Heading/getHeadingStyles.js.map +1 -0
- package/build/lib/native/components/Typography/Text/Text.js +1 -1
- package/build/lib/native/components/Typography/Text/Text.js.map +1 -1
- package/build/lib/native/components/index.js +1 -1
- package/build/lib/native/tokens/global/size.js +1 -1
- package/build/lib/native/tokens/global/size.js.map +1 -1
- package/build/lib/native/utils/getFocusRingStyles/getFocusRingStyles.native.js.map +1 -1
- package/build/lib/web/development/components/Checkbox/Checkbox.js +17 -3
- package/build/lib/web/development/components/Checkbox/Checkbox.js.map +1 -1
- package/build/lib/web/development/components/Checkbox/CheckboxGroup/CheckboxGroup.js +2 -0
- package/build/lib/web/development/components/Checkbox/CheckboxGroup/CheckboxGroup.js.map +1 -1
- package/build/lib/web/development/components/Checkbox/CheckboxIcon/CheckboxIcon.js +4 -0
- package/build/lib/web/development/components/Checkbox/CheckboxIcon/CheckboxIcon.js.map +1 -1
- package/build/lib/web/development/components/Checkbox/checkboxTokens.js +12 -4
- package/build/lib/web/development/components/Checkbox/checkboxTokens.js.map +1 -1
- package/build/lib/web/development/components/Form/CharacterCounter/CharacterCounter.js +5 -1
- package/build/lib/web/development/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
- package/build/lib/web/development/components/Form/FormHint.js +34 -17
- package/build/lib/web/development/components/Form/FormHint.js.map +1 -1
- package/build/lib/web/development/components/Form/FormLabel.js +10 -7
- package/build/lib/web/development/components/Form/FormLabel.js.map +1 -1
- package/build/lib/web/development/components/Form/Selector/SelectorSupportText.js +8 -2
- package/build/lib/web/development/components/Form/Selector/SelectorSupportText.js.map +1 -1
- package/build/lib/web/development/components/Form/Selector/SelectorTitle.js.map +1 -1
- package/build/lib/web/development/components/Form/formTokens.js +53 -0
- package/build/lib/web/development/components/Form/formTokens.js.map +1 -0
- package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +23 -37
- package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js +200 -155
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputTagSlot.web.js +4 -3
- package/build/lib/web/development/components/Input/BaseInput/BaseInputTagSlot.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js +101 -34
- package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputWrapper.js +3 -7
- package/build/lib/web/development/components/Input/BaseInput/BaseInputWrapper.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/StyledBaseInput.web.js +14 -5
- package/build/lib/web/development/components/Input/BaseInput/StyledBaseInput.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js +119 -67
- package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/baseInputTokens.js +88 -0
- package/build/lib/web/development/components/Input/BaseInput/baseInputTokens.js.map +1 -0
- package/build/lib/web/development/components/Input/BaseInput/getBaseInputBorderStyles.web.js +23 -0
- package/build/lib/web/development/components/Input/BaseInput/getBaseInputBorderStyles.web.js.map +1 -0
- package/build/lib/web/development/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +11 -6
- package/build/lib/web/development/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
- package/build/lib/web/development/components/Input/OTPInput/OTPInput.js +9 -3
- package/build/lib/web/development/components/Input/OTPInput/OTPInput.js.map +1 -1
- package/build/lib/web/development/components/Input/PasswordInput/PasswordInput.js +5 -2
- package/build/lib/web/development/components/Input/PasswordInput/PasswordInput.js.map +1 -1
- package/build/lib/web/development/components/Input/TextArea/TextArea.js +7 -3
- package/build/lib/web/development/components/Input/TextArea/TextArea.js.map +1 -1
- package/build/lib/web/development/components/Input/TextInput/TextInput.js +17 -6
- package/build/lib/web/development/components/Input/TextInput/TextInput.js.map +1 -1
- package/build/lib/web/development/components/Radio/Radio.js +10 -3
- package/build/lib/web/development/components/Radio/Radio.js.map +1 -1
- package/build/lib/web/development/components/Radio/RadioGroup/RadioGroup.js +2 -0
- package/build/lib/web/development/components/Radio/RadioGroup/RadioGroup.js.map +1 -1
- package/build/lib/web/development/components/Radio/radioTokens.js +13 -4
- package/build/lib/web/development/components/Radio/radioTokens.js.map +1 -1
- package/build/lib/web/development/components/Table/TableBody.web.js +3 -0
- package/build/lib/web/development/components/Table/TableBody.web.js.map +1 -1
- package/build/lib/web/development/components/Tag/AnimatedTag.web.js +4 -1
- package/build/lib/web/development/components/Tag/AnimatedTag.web.js.map +1 -1
- package/build/lib/web/development/components/Tag/Tag.js +2 -2
- package/build/lib/web/development/components/Tag/Tag.js.map +1 -1
- package/build/lib/web/development/components/Tag/getTagsGroup.js +4 -1
- package/build/lib/web/development/components/Tag/getTagsGroup.js.map +1 -1
- package/build/lib/web/development/components/Typography/Heading/Heading.js +3 -3
- package/build/lib/web/development/components/Typography/Heading/Heading.js.map +1 -1
- package/build/lib/web/development/components/Typography/Heading/getHeadingStyles.js +22 -0
- package/build/lib/web/development/components/Typography/Heading/getHeadingStyles.js.map +1 -0
- package/build/lib/web/development/components/Typography/Heading/index.js +1 -1
- package/build/lib/web/development/components/Typography/Text/Text.js +8 -3
- package/build/lib/web/development/components/Typography/Text/Text.js.map +1 -1
- package/build/lib/web/development/components/index.js +1 -1
- package/build/lib/web/development/tokens/global/size.js +2 -0
- package/build/lib/web/development/tokens/global/size.js.map +1 -1
- package/build/lib/web/development/utils/getFocusRingStyles/getFocusRingStyles.web.js +1 -0
- package/build/lib/web/development/utils/getFocusRingStyles/getFocusRingStyles.web.js.map +1 -1
- package/build/lib/web/production/components/Checkbox/Checkbox.js +17 -3
- package/build/lib/web/production/components/Checkbox/Checkbox.js.map +1 -1
- package/build/lib/web/production/components/Checkbox/CheckboxGroup/CheckboxGroup.js +2 -0
- package/build/lib/web/production/components/Checkbox/CheckboxGroup/CheckboxGroup.js.map +1 -1
- package/build/lib/web/production/components/Checkbox/CheckboxIcon/CheckboxIcon.js +4 -0
- package/build/lib/web/production/components/Checkbox/CheckboxIcon/CheckboxIcon.js.map +1 -1
- package/build/lib/web/production/components/Checkbox/checkboxTokens.js +12 -4
- package/build/lib/web/production/components/Checkbox/checkboxTokens.js.map +1 -1
- package/build/lib/web/production/components/Form/CharacterCounter/CharacterCounter.js +5 -1
- package/build/lib/web/production/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
- package/build/lib/web/production/components/Form/FormHint.js +34 -17
- package/build/lib/web/production/components/Form/FormHint.js.map +1 -1
- package/build/lib/web/production/components/Form/FormLabel.js +10 -7
- package/build/lib/web/production/components/Form/FormLabel.js.map +1 -1
- package/build/lib/web/production/components/Form/Selector/SelectorSupportText.js +8 -2
- package/build/lib/web/production/components/Form/Selector/SelectorSupportText.js.map +1 -1
- package/build/lib/web/production/components/Form/Selector/SelectorTitle.js.map +1 -1
- package/build/lib/web/production/components/Form/formTokens.js +53 -0
- package/build/lib/web/production/components/Form/formTokens.js.map +1 -0
- package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +23 -37
- package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js +200 -155
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputTagSlot.web.js +4 -3
- package/build/lib/web/production/components/Input/BaseInput/BaseInputTagSlot.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js +101 -34
- package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputWrapper.js +3 -7
- package/build/lib/web/production/components/Input/BaseInput/BaseInputWrapper.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/StyledBaseInput.web.js +14 -5
- package/build/lib/web/production/components/Input/BaseInput/StyledBaseInput.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js +119 -67
- package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/baseInputTokens.js +88 -0
- package/build/lib/web/production/components/Input/BaseInput/baseInputTokens.js.map +1 -0
- package/build/lib/web/production/components/Input/BaseInput/getBaseInputBorderStyles.web.js +23 -0
- package/build/lib/web/production/components/Input/BaseInput/getBaseInputBorderStyles.web.js.map +1 -0
- package/build/lib/web/production/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +11 -6
- package/build/lib/web/production/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
- package/build/lib/web/production/components/Input/OTPInput/OTPInput.js +9 -3
- package/build/lib/web/production/components/Input/OTPInput/OTPInput.js.map +1 -1
- package/build/lib/web/production/components/Input/PasswordInput/PasswordInput.js +5 -2
- package/build/lib/web/production/components/Input/PasswordInput/PasswordInput.js.map +1 -1
- package/build/lib/web/production/components/Input/TextArea/TextArea.js +7 -3
- package/build/lib/web/production/components/Input/TextArea/TextArea.js.map +1 -1
- package/build/lib/web/production/components/Input/TextInput/TextInput.js +17 -6
- package/build/lib/web/production/components/Input/TextInput/TextInput.js.map +1 -1
- package/build/lib/web/production/components/Radio/Radio.js +10 -3
- package/build/lib/web/production/components/Radio/Radio.js.map +1 -1
- package/build/lib/web/production/components/Radio/RadioGroup/RadioGroup.js +2 -0
- package/build/lib/web/production/components/Radio/RadioGroup/RadioGroup.js.map +1 -1
- package/build/lib/web/production/components/Radio/radioTokens.js +13 -4
- package/build/lib/web/production/components/Radio/radioTokens.js.map +1 -1
- package/build/lib/web/production/components/Table/TableBody.web.js +3 -0
- package/build/lib/web/production/components/Table/TableBody.web.js.map +1 -1
- package/build/lib/web/production/components/Tag/AnimatedTag.web.js +4 -1
- package/build/lib/web/production/components/Tag/AnimatedTag.web.js.map +1 -1
- package/build/lib/web/production/components/Tag/Tag.js +2 -2
- package/build/lib/web/production/components/Tag/Tag.js.map +1 -1
- package/build/lib/web/production/components/Tag/getTagsGroup.js +4 -1
- package/build/lib/web/production/components/Tag/getTagsGroup.js.map +1 -1
- package/build/lib/web/production/components/Typography/Heading/Heading.js +3 -3
- package/build/lib/web/production/components/Typography/Heading/Heading.js.map +1 -1
- package/build/lib/web/production/components/Typography/Heading/getHeadingStyles.js +22 -0
- package/build/lib/web/production/components/Typography/Heading/getHeadingStyles.js.map +1 -0
- package/build/lib/web/production/components/Typography/Heading/index.js +1 -1
- package/build/lib/web/production/components/Typography/Text/Text.js +8 -3
- package/build/lib/web/production/components/Typography/Text/Text.js.map +1 -1
- package/build/lib/web/production/components/index.js +1 -1
- package/build/lib/web/production/tokens/global/size.js +2 -0
- package/build/lib/web/production/tokens/global/size.js.map +1 -1
- package/build/lib/web/production/utils/getFocusRingStyles/getFocusRingStyles.web.js +1 -0
- package/build/lib/web/production/utils/getFocusRingStyles/getFocusRingStyles.web.js.map +1 -1
- package/build/types/components/index.d.ts +36 -15
- package/build/types/components/index.native.d.ts +36 -15
- package/build/types/tokens/index.d.ts +2 -0
- package/build/types/tokens/index.native.d.ts +2 -0
- package/package.json +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputAnimatedBorder.native.js +0 -16
- package/build/lib/native/components/Input/BaseInput/BaseInputAnimatedBorder.native.js.map +0 -1
- package/build/lib/native/components/Input/BaseInput/baseInputConfig.js +0 -8
- package/build/lib/native/components/Input/BaseInput/baseInputConfig.js.map +0 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputAnimatedBorder.web.js +0 -43
- package/build/lib/web/development/components/Input/BaseInput/BaseInputAnimatedBorder.web.js.map +0 -1
- package/build/lib/web/development/components/Input/BaseInput/baseInputConfig.js +0 -26
- package/build/lib/web/development/components/Input/BaseInput/baseInputConfig.js.map +0 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputAnimatedBorder.web.js +0 -43
- package/build/lib/web/production/components/Input/BaseInput/BaseInputAnimatedBorder.web.js.map +0 -1
- package/build/lib/web/production/components/Input/BaseInput/baseInputConfig.js +0 -26
- package/build/lib/web/production/components/Input/BaseInput/baseInputConfig.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxIcon.js","sources":["../../../../../../../src/components/Checkbox/CheckboxIcon/CheckboxIcon.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\nimport React from 'react';\nimport { CheckboxIconWrapper } from './CheckboxIconWrapper';\nimport { Fade } from './Fade';\nimport getIn from '~utils/lodashButBetter/get';\nimport { useTheme } from '~components/BladeProvider';\nimport Svg, { Path } from '~components/Icons/_Svg';\nimport { makeSpace } from '~utils/makeSpace';\nimport { metaAttribute } from '~utils/metaAttribute';\nimport { size } from '~tokens/global';\n\nconst svgSize = {\n small: {\n width: size[8],\n height: size[8],\n },\n medium: {\n width: size[12],\n height: size[12],\n },\n};\n\nconst CheckedIcon = ({ color, size }: { color: string; size: 'small' | 'medium' }) => {\n const width = makeSpace(svgSize[size].width);\n const height = makeSpace(svgSize[size].height);\n\n return (\n <Svg width={width} height={height} viewBox=\"0 0 8 8\" fill=\"none\">\n <Path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M6.90237 1.76413C7.03254 1.89431 7.03254 2.10536 6.90237 2.23554L3.2357 5.90221C3.10553 6.03238 2.89447 6.03238 2.7643 5.90221L1.09763 4.23554C0.967456 4.10536 0.967456 3.89431 1.09763 3.76414C1.22781 3.63396 1.43886 3.63396 1.56904 3.76414L3 5.1951L6.43096 1.76413C6.56114 1.63396 6.77219 1.63396 6.90237 1.76413Z\"\n fill={color}\n stroke={color}\n strokeWidth=\"0.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </Svg>\n );\n};\n\nconst IndeterminateIcon = ({
|
|
1
|
+
{"version":3,"file":"CheckboxIcon.js","sources":["../../../../../../../src/components/Checkbox/CheckboxIcon/CheckboxIcon.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\nimport React from 'react';\nimport { CheckboxIconWrapper } from './CheckboxIconWrapper';\nimport { Fade } from './Fade';\nimport getIn from '~utils/lodashButBetter/get';\nimport { useTheme } from '~components/BladeProvider';\nimport Svg, { Path } from '~components/Icons/_Svg';\nimport { makeSpace } from '~utils/makeSpace';\nimport { metaAttribute } from '~utils/metaAttribute';\nimport { size } from '~tokens/global';\n\nconst svgSize = {\n small: {\n width: size[8],\n height: size[8],\n },\n medium: {\n width: size[12],\n height: size[12],\n },\n large: {\n width: size[16],\n height: size[16],\n },\n};\n\nconst CheckedIcon = ({ color, size }: { color: string; size: 'small' | 'medium' | 'large' }) => {\n const width = makeSpace(svgSize[size].width);\n const height = makeSpace(svgSize[size].height);\n\n return (\n <Svg width={width} height={height} viewBox=\"0 0 8 8\" fill=\"none\">\n <Path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M6.90237 1.76413C7.03254 1.89431 7.03254 2.10536 6.90237 2.23554L3.2357 5.90221C3.10553 6.03238 2.89447 6.03238 2.7643 5.90221L1.09763 4.23554C0.967456 4.10536 0.967456 3.89431 1.09763 3.76414C1.22781 3.63396 1.43886 3.63396 1.56904 3.76414L3 5.1951L6.43096 1.76413C6.56114 1.63396 6.77219 1.63396 6.90237 1.76413Z\"\n fill={color}\n stroke={color}\n strokeWidth=\"0.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </Svg>\n );\n};\n\nconst IndeterminateIcon = ({\n color,\n size,\n}: {\n color: string;\n size: 'small' | 'medium' | 'large';\n}) => {\n const width = makeSpace(svgSize[size].width);\n const height = makeSpace(svgSize[size].height);\n\n return (\n <Svg width={width} height={height} viewBox=\"0 0 8 8\" fill=\"none\">\n <Path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M1.3335 3.99984C1.3335 3.81574 1.48273 3.6665 1.66683 3.6665H6.3335C6.51759 3.6665 6.66683 3.81574 6.66683 3.99984C6.66683 4.18393 6.51759 4.33317 6.3335 4.33317H1.66683C1.48273 4.33317 1.3335 4.18393 1.3335 3.99984Z\"\n fill={color}\n stroke={color}\n strokeWidth=\"0.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </Svg>\n );\n};\n\nexport type CheckboxIconProps = {\n isDisabled?: boolean;\n isNegative?: boolean;\n isChecked?: boolean;\n isIndeterminate?: boolean;\n size: 'small' | 'medium' | 'large';\n};\n\nconst CheckboxIcon = ({\n isChecked,\n isIndeterminate,\n isDisabled,\n isNegative,\n size,\n}: CheckboxIconProps) => {\n const { theme } = useTheme();\n const iconColor = getIn(theme, 'colors.interactive.icon.onPrimary.normal');\n return (\n <CheckboxIconWrapper\n size={size}\n isIndeterminate={isIndeterminate}\n isDisabled={isDisabled}\n isNegative={isNegative}\n isChecked={!!(isChecked || isIndeterminate)}\n {...metaAttribute({ name: 'checkbox-icon-wrapper' })}\n >\n <Fade show={isIndeterminate} styles={{ position: 'absolute', display: 'flex' }}>\n <IndeterminateIcon size={size} color={iconColor} />\n </Fade>\n <Fade\n show={Boolean(isChecked) && !isIndeterminate}\n styles={{ position: 'absolute', display: 'flex' }}\n >\n {isChecked ? <CheckedIcon size={size} color={iconColor} /> : null}\n </Fade>\n </CheckboxIconWrapper>\n );\n};\n\nexport { CheckboxIcon };\n"],"names":["svgSize","small","width","size","height","medium","large","CheckedIcon","_ref","color","makeSpace","_jsx","Svg","viewBox","fill","children","Path","fillRule","clipRule","d","stroke","strokeWidth","strokeLinecap","strokeLinejoin","IndeterminateIcon","_ref2","CheckboxIcon","_ref3","isChecked","isIndeterminate","isDisabled","isNegative","_useTheme","useTheme","theme","iconColor","getIn","_jsxs","CheckboxIconWrapper","_objectSpread","metaAttribute","name","Fade","show","styles","position","display","Boolean"],"mappings":";;;;;;;;;;;;;;;;;;;;AAaA,IAAMA,OAAO,GAAG;AACdC,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAEC,IAAI,CAAC,CAAC,CAAC;IACdC,MAAM,EAAED,IAAI,CAAC,CAAC,CAAA;GACf;AACDE,EAAAA,MAAM,EAAE;AACNH,IAAAA,KAAK,EAAEC,IAAI,CAAC,EAAE,CAAC;IACfC,MAAM,EAAED,IAAI,CAAC,EAAE,CAAA;GAChB;AACDG,EAAAA,KAAK,EAAE;AACLJ,IAAAA,KAAK,EAAEC,IAAI,CAAC,EAAE,CAAC;IACfC,MAAM,EAAED,IAAI,CAAC,EAAE,CAAA;AACjB,GAAA;AACF,CAAC,CAAA;AAED,IAAMI,WAAW,GAAG,SAAdA,WAAWA,CAAAC,IAAA,EAA+E;AAAA,EAAA,IAAzEC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEN,IAAI,GAAAK,IAAA,CAAJL,IAAI,CAAA;EAChC,IAAMD,KAAK,GAAGQ,SAAS,CAACV,OAAO,CAACG,IAAI,CAAC,CAACD,KAAK,CAAC,CAAA;EAC5C,IAAME,MAAM,GAAGM,SAAS,CAACV,OAAO,CAACG,IAAI,CAAC,CAACC,MAAM,CAAC,CAAA;EAE9C,oBACEO,GAAA,CAACC,GAAG,EAAA;AAACV,IAAAA,KAAK,EAAEA,KAAM;AAACE,IAAAA,MAAM,EAAEA,MAAO;AAACS,IAAAA,OAA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+B,IAAI,EAAA;AACHC,MAAAA,IAAI,EAAEI,OAAO,CAACnB,SAAS,CAAC,IAAI,CAACC,eAAgB;AAC7Ce,MAAAA,MAAM,EAAE;AAAEC,QAAAA,QAAQ,EAAE,UAAU;AAAEC,QAAAA,OAAO,EAAE,MAAA;OAAS;AAAA/B,MAAAA,QAAA,EAEjDa,SAAS,gBAAGjB,GAAA,CAACJ,WAAW,EAAA;AAACJ,QAAAA,IAAI,EAAEA,IAAK;AAACM,QAAAA,KAAK,EAAE0B,SAAAA;AAAU,OAAE,CAAC,GAAG,IAAA;AAAI,KAC7D,CAAC,CAAA;AAAA,GAAA,CACY,CAAC,CAAA;AAE1B;;;;"}
|
|
@@ -5,12 +5,16 @@ var checkboxSizes = {
|
|
|
5
5
|
group: {
|
|
6
6
|
gap: {
|
|
7
7
|
small: {
|
|
8
|
-
mobile: 'spacing.2',
|
|
9
|
-
desktop: 'spacing.0'
|
|
10
|
-
},
|
|
11
|
-
medium: {
|
|
12
8
|
mobile: 'spacing.3',
|
|
13
9
|
desktop: 'spacing.2'
|
|
10
|
+
},
|
|
11
|
+
medium: {
|
|
12
|
+
mobile: 'spacing.4',
|
|
13
|
+
desktop: 'spacing.3'
|
|
14
|
+
},
|
|
15
|
+
large: {
|
|
16
|
+
mobile: 'spacing.5',
|
|
17
|
+
desktop: 'spacing.4'
|
|
14
18
|
}
|
|
15
19
|
}
|
|
16
20
|
},
|
|
@@ -22,6 +26,10 @@ var checkboxSizes = {
|
|
|
22
26
|
medium: {
|
|
23
27
|
width: size[16],
|
|
24
28
|
height: size[16]
|
|
29
|
+
},
|
|
30
|
+
large: {
|
|
31
|
+
width: size[20],
|
|
32
|
+
height: size[20]
|
|
25
33
|
}
|
|
26
34
|
}
|
|
27
35
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkboxTokens.js","sources":["../../../../../../src/components/Checkbox/checkboxTokens.ts"],"sourcesContent":["import type { DotNotationToken } from '../../utils/lodashButBetter/get';\nimport type { Theme } from '~components/BladeProvider';\nimport type { SelectorInputHoverTokens } from '~components/Form/Selector/types';\nimport { size } from '~tokens/global';\n\nconst checkboxSizes = {\n group: {\n gap: {\n small: {\n mobile: 'spacing.
|
|
1
|
+
{"version":3,"file":"checkboxTokens.js","sources":["../../../../../../src/components/Checkbox/checkboxTokens.ts"],"sourcesContent":["import type { DotNotationToken } from '../../utils/lodashButBetter/get';\nimport type { Theme } from '~components/BladeProvider';\nimport type { SelectorInputHoverTokens } from '~components/Form/Selector/types';\nimport { size } from '~tokens/global';\n\nconst checkboxSizes = {\n group: {\n gap: {\n small: {\n mobile: 'spacing.3',\n desktop: 'spacing.2',\n },\n medium: {\n mobile: 'spacing.4',\n desktop: 'spacing.3',\n },\n large: {\n mobile: 'spacing.5',\n desktop: 'spacing.4',\n },\n },\n },\n icon: {\n small: {\n width: size[12],\n height: size[12],\n },\n medium: {\n width: size[16],\n height: size[16],\n },\n large: {\n width: size[20],\n height: size[20],\n },\n },\n} as const;\n\ntype ColorTokens = `colors.${DotNotationToken<Theme['colors']>}`;\ntype Variant = {\n border: {\n checked: ColorTokens;\n unchecked: ColorTokens;\n };\n background: {\n checked: ColorTokens;\n unchecked: ColorTokens;\n };\n};\n\ntype CheckboxIconColors = {\n variants: {\n default: Variant;\n disabled: Variant;\n negative: Variant;\n };\n};\n\nconst checkboxIconColors: CheckboxIconColors = {\n variants: {\n default: {\n border: {\n checked: 'colors.interactive.border.primary.default',\n unchecked: 'colors.interactive.border.gray.default',\n },\n background: {\n checked: 'colors.interactive.background.primary.default',\n unchecked: 'colors.transparent',\n },\n },\n disabled: {\n border: {\n checked: 'colors.interactive.border.primary.disabled',\n unchecked: 'colors.interactive.border.gray.disabled',\n },\n background: {\n checked: 'colors.interactive.background.primary.disabled',\n unchecked: 'colors.transparent',\n },\n },\n negative: {\n border: {\n checked: 'colors.interactive.border.negative.default',\n unchecked: 'colors.interactive.border.negative.default',\n },\n background: {\n checked: 'colors.interactive.background.negative.default',\n unchecked: 'colors.transparent',\n },\n },\n },\n} as const;\n\nconst checkboxHoverTokens: SelectorInputHoverTokens = {\n default: {\n background: {\n checked: 'colors.interactive.background.primary.highlighted',\n unchecked: 'colors.interactive.background.gray.faded',\n },\n border: {\n checked: 'colors.interactive.background.primary.highlighted', // Intentionally not using border tokens here since we want to match the background color\n unchecked: 'colors.interactive.border.gray.default',\n },\n },\n};\n\nexport { checkboxSizes, checkboxIconColors, checkboxHoverTokens };\n"],"names":["checkboxSizes","group","gap","small","mobile","desktop","medium","large","icon","width","size","height","checkboxIconColors","variants","border","checked","unchecked","background","disabled","negative","checkboxHoverTokens"],"mappings":";;;AAKA,IAAMA,aAAa,GAAG;AACpBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,GAAG,EAAE;AACHC,MAAAA,KAAK,EAAE;AACLC,QAAAA,MAAM,EAAE,WAAW;AACnBC,QAAAA,OAAO,EAAE,WAAA;OACV;AACDC,MAAAA,MAAM,EAAE;AACNF,QAAAA,MAAM,EAAE,WAAW;AACnBC,QAAAA,OAAO,EAAE,WAAA;OACV;AACDE,MAAAA,KAAK,EAAE;AACLH,QAAAA,MAAM,EAAE,WAAW;AACnBC,QAAAA,OAAO,EAAE,WAAA;AACX,OAAA;AACF,KAAA;GACD;AACDG,EAAAA,IAAI,EAAE;AACJL,IAAAA,KAAK,EAAE;AACLM,MAAAA,KAAK,EAAEC,IAAI,CAAC,EAAE,CAAC;MACfC,MAAM,EAAED,IAAI,CAAC,EAAE,CAAA;KAChB;AACDJ,IAAAA,MAAM,EAAE;AACNG,MAAAA,KAAK,EAAEC,IAAI,CAAC,EAAE,CAAC;MACfC,MAAM,EAAED,IAAI,CAAC,EAAE,CAAA;KAChB;AACDH,IAAAA,KAAK,EAAE;AACLE,MAAAA,KAAK,EAAEC,IAAI,CAAC,EAAE,CAAC;MACfC,MAAM,EAAED,IAAI,CAAC,EAAE,CAAA;AACjB,KAAA;AACF,GAAA;AACF,EAAU;AAsBV,IAAME,kBAAsC,GAAG;AAC7CC,EAAAA,QAAQ,EAAE;IACR,SAAS,EAAA;AACPC,MAAAA,MAAM,EAAE;AACNC,QAAAA,OAAO,EAAE,2CAA2C;AACpDC,QAAAA,SAAS,EAAE,wCAAA;OACZ;AACDC,MAAAA,UAAU,EAAE;AACVF,QAAAA,OAAO,EAAE,+CAA+C;AACxDC,QAAAA,SAAS,EAAE,oBAAA;AACb,OAAA;KACD;AACDE,IAAAA,QAAQ,EAAE;AACRJ,MAAAA,MAAM,EAAE;AACNC,QAAAA,OAAO,EAAE,4CAA4C;AACrDC,QAAAA,SAAS,EAAE,yCAAA;OACZ;AACDC,MAAAA,UAAU,EAAE;AACVF,QAAAA,OAAO,EAAE,gDAAgD;AACzDC,QAAAA,SAAS,EAAE,oBAAA;AACb,OAAA;KACD;AACDG,IAAAA,QAAQ,EAAE;AACRL,MAAAA,MAAM,EAAE;AACNC,QAAAA,OAAO,EAAE,4CAA4C;AACrDC,QAAAA,SAAS,EAAE,4CAAA;OACZ;AACDC,MAAAA,UAAU,EAAE;AACVF,QAAAA,OAAO,EAAE,gDAAgD;AACzDC,QAAAA,SAAS,EAAE,oBAAA;AACb,OAAA;AACF,KAAA;AACF,GAAA;AACF,EAAU;AAEV,IAAMI,mBAA6C,GAAG;EACpD,SAAS,EAAA;AACPH,IAAAA,UAAU,EAAE;AACVF,MAAAA,OAAO,EAAE,mDAAmD;AAC5DC,MAAAA,SAAS,EAAE,0CAAA;KACZ;AACDF,IAAAA,MAAM,EAAE;AACNC,MAAAA,OAAO,EAAE,mDAAmD;AAAE;AAC9DC,MAAAA,SAAS,EAAE,wCAAA;AACb,KAAA;AACF,GAAA;AACF;;;;"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
+
import { hintTextSize } from '../formTokens.js';
|
|
1
2
|
import '../../Typography/index.js';
|
|
2
3
|
import { jsxs } from 'react/jsx-runtime';
|
|
3
4
|
import { Text } from '../../Typography/Text/Text.js';
|
|
4
5
|
|
|
5
6
|
var CharacterCounter = function CharacterCounter(_ref) {
|
|
6
7
|
var currentCount = _ref.currentCount,
|
|
7
|
-
maxCount = _ref.maxCount
|
|
8
|
+
maxCount = _ref.maxCount,
|
|
9
|
+
_ref$size = _ref.size,
|
|
10
|
+
size = _ref$size === void 0 ? 'medium' : _ref$size;
|
|
8
11
|
return /*#__PURE__*/jsxs(Text, {
|
|
9
12
|
variant: "caption",
|
|
13
|
+
size: hintTextSize[size],
|
|
10
14
|
weight: "regular",
|
|
11
15
|
color: "surface.text.gray.muted",
|
|
12
16
|
children: [currentCount, "/", maxCount]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CharacterCounter.js","sources":["../../../../../../../src/components/Form/CharacterCounter/CharacterCounter.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { Text } from '~components/Typography';\n\ntype CharacterCounterProps = {\n currentCount: number;\n maxCount: number;\n};\n\nexport const CharacterCounter = ({\n currentCount,\n maxCount,\n}: CharacterCounterProps): ReactElement => (\n <Text
|
|
1
|
+
{"version":3,"file":"CharacterCounter.js","sources":["../../../../../../../src/components/Form/CharacterCounter/CharacterCounter.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { hintTextSize } from '../formTokens';\nimport { Text } from '~components/Typography';\n\ntype CharacterCounterProps = {\n currentCount: number;\n maxCount: number;\n size?: 'medium' | 'large';\n};\n\nexport const CharacterCounter = ({\n currentCount,\n maxCount,\n size = 'medium',\n}: CharacterCounterProps): ReactElement => (\n <Text\n variant=\"caption\"\n size={hintTextSize[size]}\n weight=\"regular\"\n color=\"surface.text.gray.muted\"\n >\n {currentCount}/{maxCount}\n </Text>\n);\n"],"names":["CharacterCounter","_ref","currentCount","maxCount","_ref$size","size","_jsxs","Text","variant","hintTextSize","weight","color","children"],"mappings":";;;;;IAUaA,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAC3BC,YAAY,GAAAD,IAAA,CAAZC,YAAY;IACZC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAAC,SAAA,GAAAH,IAAA,CACRI,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,SAAA,CAAA;EAAA,oBAEfE,IAAA,CAACC,IAAI,EAAA;AACHC,IAAAA,OAAO,EAAC,SAAS;AACjBH,IAAAA,IAAI,EAAEI,YAAY,CAACJ,IAAI,CAAE;AACzBK,IAAAA,MAAM,EAAC,SAAS;AAChBC,IAAAA,KAAK,EAAC,yBAAyB;AAAAC,IAAAA,QAAA,EAE9BV,CAAAA,YAAY,EAAC,GAAC,EAACC,QAAQ,CAAA;AAAA,GACpB,CAAC,CAAA;AAAA;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import { FormHintWrapper } from './FormHintWrapper.web.js';
|
|
3
|
+
import { hintMarginTop, hintTextSize, hintIconSize } from './formTokens.js';
|
|
3
4
|
import '../Typography/Text/index.js';
|
|
4
5
|
import '../Box/BaseBox/index.js';
|
|
5
6
|
import '../Icons/index.js';
|
|
@@ -17,16 +18,17 @@ var HintText = function HintText(_ref) {
|
|
|
17
18
|
var Icon = _ref.icon,
|
|
18
19
|
children = _ref.children,
|
|
19
20
|
id = _ref.id,
|
|
20
|
-
color = _ref.color
|
|
21
|
+
color = _ref.color,
|
|
22
|
+
size = _ref.size;
|
|
21
23
|
var isReactNative = getPlatformType() === 'react-native';
|
|
22
24
|
return /*#__PURE__*/jsx(BaseBox, {
|
|
23
|
-
marginTop:
|
|
25
|
+
marginTop: hintMarginTop[size],
|
|
24
26
|
id: id,
|
|
25
27
|
children: /*#__PURE__*/jsxs(FormHintWrapper, {
|
|
26
28
|
children: [Icon ? /*#__PURE__*/jsx(Icon, {}) : null, /*#__PURE__*/jsx(Text, {
|
|
27
29
|
as: isReactNative ? undefined : 'span',
|
|
28
30
|
color: color,
|
|
29
|
-
size:
|
|
31
|
+
size: hintTextSize[size],
|
|
30
32
|
variant: "caption",
|
|
31
33
|
children: children
|
|
32
34
|
})]
|
|
@@ -34,35 +36,39 @@ var HintText = function HintText(_ref) {
|
|
|
34
36
|
});
|
|
35
37
|
};
|
|
36
38
|
var Icons = {
|
|
37
|
-
error: function error() {
|
|
39
|
+
error: function error(_ref2) {
|
|
40
|
+
var size = _ref2.size;
|
|
38
41
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
39
42
|
children: [/*#__PURE__*/jsx(InfoIcon, {
|
|
40
43
|
color: "feedback.icon.negative.intense",
|
|
41
|
-
size:
|
|
44
|
+
size: hintIconSize[size]
|
|
42
45
|
}), /*#__PURE__*/jsx(BaseBox, {
|
|
43
46
|
marginRight: "spacing.2"
|
|
44
47
|
})]
|
|
45
48
|
});
|
|
46
49
|
},
|
|
47
|
-
success: function success() {
|
|
50
|
+
success: function success(_ref3) {
|
|
51
|
+
var size = _ref3.size;
|
|
48
52
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
49
53
|
children: [/*#__PURE__*/jsx(CheckIcon, {
|
|
50
54
|
color: "feedback.icon.positive.intense",
|
|
51
|
-
size:
|
|
55
|
+
size: hintIconSize[size]
|
|
52
56
|
}), /*#__PURE__*/jsx(BaseBox, {
|
|
53
57
|
marginRight: "spacing.2"
|
|
54
58
|
})]
|
|
55
59
|
});
|
|
56
60
|
}
|
|
57
61
|
};
|
|
58
|
-
var FormHint = function FormHint(
|
|
59
|
-
var type =
|
|
60
|
-
helpText =
|
|
61
|
-
errorText =
|
|
62
|
-
successText =
|
|
63
|
-
helpTextId =
|
|
64
|
-
errorTextId =
|
|
65
|
-
successTextId =
|
|
62
|
+
var FormHint = function FormHint(_ref4) {
|
|
63
|
+
var type = _ref4.type,
|
|
64
|
+
helpText = _ref4.helpText,
|
|
65
|
+
errorText = _ref4.errorText,
|
|
66
|
+
successText = _ref4.successText,
|
|
67
|
+
helpTextId = _ref4.helpTextId,
|
|
68
|
+
errorTextId = _ref4.errorTextId,
|
|
69
|
+
successTextId = _ref4.successTextId,
|
|
70
|
+
_ref4$size = _ref4.size,
|
|
71
|
+
size = _ref4$size === void 0 ? 'medium' : _ref4$size;
|
|
66
72
|
var colors = {
|
|
67
73
|
help: 'surface.text.gray.muted',
|
|
68
74
|
error: 'feedback.text.negative.intense',
|
|
@@ -73,17 +79,28 @@ var FormHint = function FormHint(_ref2) {
|
|
|
73
79
|
var showHelp = !showError && !showSuccess && helpText;
|
|
74
80
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
75
81
|
children: [showHelp && /*#__PURE__*/jsx(HintText, {
|
|
82
|
+
size: size,
|
|
76
83
|
id: helpTextId,
|
|
77
84
|
color: colors.help,
|
|
78
85
|
children: helpText
|
|
79
86
|
}), showError && /*#__PURE__*/jsx(HintText, {
|
|
87
|
+
size: size,
|
|
80
88
|
id: errorTextId,
|
|
81
|
-
icon:
|
|
89
|
+
icon: function icon() {
|
|
90
|
+
return Icons.error({
|
|
91
|
+
size: size
|
|
92
|
+
});
|
|
93
|
+
},
|
|
82
94
|
color: colors.error,
|
|
83
95
|
children: errorText
|
|
84
96
|
}), showSuccess && /*#__PURE__*/jsx(HintText, {
|
|
97
|
+
size: size,
|
|
85
98
|
id: successTextId,
|
|
86
|
-
icon:
|
|
99
|
+
icon: function icon() {
|
|
100
|
+
return Icons.success({
|
|
101
|
+
size: size
|
|
102
|
+
});
|
|
103
|
+
},
|
|
87
104
|
color: colors.success,
|
|
88
105
|
children: successText
|
|
89
106
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormHint.js","sources":["../../../../../../src/components/Form/FormHint.tsx"],"sourcesContent":["/* eslint-disable react/display-name */\nimport type { ReactElement } from 'react';\nimport React from 'react';\nimport { FormHintWrapper } from './FormHintWrapper';\nimport type { TextProps } from '~components/Typography/Text';\nimport { Text } from '~components/Typography/Text';\nimport BaseBox from '~components/Box/BaseBox';\nimport { CheckIcon, InfoIcon } from '~components/Icons';\nimport { getPlatformType } from '~utils/getPlatformType';\n\ntype HintTextProps = {\n icon?: React.ElementType;\n children: string;\n id?: string;\n color: TextProps<{ variant: 'caption' }>['color'];\n};\n\nconst HintText = ({ icon: Icon, children, id, color }: HintTextProps): ReactElement => {\n const isReactNative = getPlatformType() === 'react-native';\n\n return (\n <BaseBox marginTop
|
|
1
|
+
{"version":3,"file":"FormHint.js","sources":["../../../../../../src/components/Form/FormHint.tsx"],"sourcesContent":["/* eslint-disable react/display-name */\nimport type { ReactElement } from 'react';\nimport React from 'react';\nimport { FormHintWrapper } from './FormHintWrapper';\nimport { hintIconSize, hintMarginTop, hintTextSize } from './formTokens';\nimport type { TextProps } from '~components/Typography/Text';\nimport { Text } from '~components/Typography/Text';\nimport BaseBox from '~components/Box/BaseBox';\nimport { CheckIcon, InfoIcon } from '~components/Icons';\nimport { getPlatformType } from '~utils/getPlatformType';\n\ntype HintTextProps = {\n icon?: React.ElementType;\n children: string;\n id?: string;\n color: TextProps<{ variant: 'caption' }>['color'];\n size: 'small' | 'medium' | 'large';\n};\n\nconst HintText = ({ icon: Icon, children, id, color, size }: HintTextProps): ReactElement => {\n const isReactNative = getPlatformType() === 'react-native';\n\n return (\n <BaseBox marginTop={hintMarginTop[size]} id={id}>\n <FormHintWrapper>\n {Icon ? <Icon /> : null}\n <Text\n as={isReactNative ? undefined : 'span'}\n color={color}\n size={hintTextSize[size]}\n variant=\"caption\"\n >\n {children}\n </Text>\n </FormHintWrapper>\n </BaseBox>\n );\n};\n\nexport type FormHintProps = {\n type: 'help' | 'error' | 'success';\n /**\n * Help text for the group\n */\n helpText?: string;\n /**\n * Error text for the group\n *\n * Renders when `state` is set to 'error'\n */\n errorText?: string;\n /**\n * Success text for the group\n *\n * Renders when `state` is set to 'success'\n */\n successText?: string;\n /**\n * Sets the id on errorText.\n * Needed for accessibility reasons.\n */\n errorTextId?: string;\n /**\n * Sets the id on helpText.\n * Needed for accessibility reasons.\n */\n helpTextId?: string;\n /**\n * Sets the id on successText.\n * Needed for accessibility reasons.\n */\n successTextId?: string;\n /**\n * Sets the size of the hint\n * @default medium\n */\n size?: 'small' | 'medium' | 'large';\n};\n\nconst Icons = {\n error: ({ size }: { size: 'small' | 'medium' | 'large' }): ReactElement => (\n <>\n <InfoIcon color=\"feedback.icon.negative.intense\" size={hintIconSize[size]} />\n <BaseBox marginRight=\"spacing.2\" />\n </>\n ),\n success: ({ size }: { size: 'small' | 'medium' | 'large' }): ReactElement => (\n <>\n <CheckIcon color=\"feedback.icon.positive.intense\" size={hintIconSize[size]} />\n <BaseBox marginRight=\"spacing.2\" />\n </>\n ),\n};\n\nconst FormHint = ({\n type,\n helpText,\n errorText,\n successText,\n helpTextId,\n errorTextId,\n successTextId,\n size = 'medium',\n}: FormHintProps): React.ReactElement => {\n const colors: Record<string, TextProps<{ variant: 'caption' }>['color']> = {\n help: 'surface.text.gray.muted',\n error: 'feedback.text.negative.intense',\n success: 'feedback.text.positive.intense',\n };\n\n const showError = type === 'error' && errorText;\n const showSuccess = type === 'success' && successText;\n const showHelp = !showError && !showSuccess && helpText;\n\n return (\n <>\n {showHelp && (\n <HintText size={size} id={helpTextId} color={colors.help}>\n {helpText}\n </HintText>\n )}\n\n {showError && (\n <HintText\n size={size}\n id={errorTextId}\n icon={() => Icons.error({ size })}\n color={colors.error}\n >\n {errorText}\n </HintText>\n )}\n\n {showSuccess && (\n <HintText\n size={size}\n id={successTextId}\n icon={() => Icons.success({ size })}\n color={colors.success}\n >\n {successText}\n </HintText>\n )}\n </>\n );\n};\n\nexport { FormHint };\n"],"names":["HintText","_ref","Icon","icon","children","id","color","size","isReactNative","getPlatformType","_jsx","BaseBox","marginTop","hintMarginTop","_jsxs","FormHintWrapper","Text","as","undefined","hintTextSize","variant","Icons","error","_ref2","_Fragment","InfoIcon","hintIconSize","marginRight","success","_ref3","CheckIcon","FormHint","_ref4","type","helpText","errorText","successText","helpTextId","errorTextId","successTextId","_ref4$size","colors","help","showError","showSuccess","showHelp"],"mappings":";;;;;;;;;;;;;;AAAA;;AAmBA,IAAMA,Q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1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import 'react';
|
|
3
|
+
import { labelOptionalIndicatorTextSize, labelTextSize, labelWidth, labelLeftMarginRight, labelMarginBottom } from './formTokens.js';
|
|
3
4
|
import '../VisuallyHidden/index.web.js';
|
|
4
5
|
import '../Typography/index.js';
|
|
5
6
|
import '../../utils/index.js';
|
|
@@ -7,8 +8,8 @@ import '../../utils/metaAttribute/index.js';
|
|
|
7
8
|
import '../Box/BaseBox/index.js';
|
|
8
9
|
import '../BladeProvider/index.js';
|
|
9
10
|
import '../../utils/makeSpace/index.js';
|
|
10
|
-
import '../../utils/makeSize/index.js';
|
|
11
11
|
import '../../tokens/global/index.js';
|
|
12
|
+
import getIn from '../../utils/lodashButBetter/get.js';
|
|
12
13
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
13
14
|
import useTheme from '../BladeProvider/useTheme.js';
|
|
14
15
|
import { useBreakpoint } from '../../utils/useBreakpoint/useBreakpoint.js';
|
|
@@ -34,7 +35,9 @@ var FormLabel = function FormLabel(_ref) {
|
|
|
34
35
|
accessibilityText = _ref.accessibilityText,
|
|
35
36
|
children = _ref.children,
|
|
36
37
|
id = _ref.id,
|
|
37
|
-
htmlFor = _ref.htmlFor
|
|
38
|
+
htmlFor = _ref.htmlFor,
|
|
39
|
+
_ref$size = _ref.size,
|
|
40
|
+
size$1 = _ref$size === void 0 ? 'medium' : _ref$size;
|
|
38
41
|
var _useTheme = useTheme(),
|
|
39
42
|
theme = _useTheme.theme;
|
|
40
43
|
var _useBreakpoint = useBreakpoint({
|
|
@@ -48,7 +51,7 @@ var FormLabel = function FormLabel(_ref) {
|
|
|
48
51
|
if (necessityIndicator === 'optional') {
|
|
49
52
|
necessityLabel = /*#__PURE__*/jsx(Text, {
|
|
50
53
|
variant: "caption",
|
|
51
|
-
size:
|
|
54
|
+
size: labelOptionalIndicatorTextSize[size$1],
|
|
52
55
|
color: "surface.text.gray.muted",
|
|
53
56
|
children: "(optional)"
|
|
54
57
|
});
|
|
@@ -77,7 +80,7 @@ var FormLabel = function FormLabel(_ref) {
|
|
|
77
80
|
maxHeight: makeSpace(size[36]),
|
|
78
81
|
children: [/*#__PURE__*/jsx(Text, {
|
|
79
82
|
variant: "body",
|
|
80
|
-
size: isLabelLeftPositioned ? '
|
|
83
|
+
size: labelTextSize[isLabelLeftPositioned ? 'left' : 'top'][size$1],
|
|
81
84
|
color: "surface.text.gray.subtle",
|
|
82
85
|
truncateAfterLines: 2,
|
|
83
86
|
weight: "semibold",
|
|
@@ -96,20 +99,20 @@ var FormLabel = function FormLabel(_ref) {
|
|
|
96
99
|
}
|
|
97
100
|
var Component = as;
|
|
98
101
|
// only set 120px label when device is desktop
|
|
99
|
-
var width = isLabelLeftPositioned && isDesktop ? makeSize(size
|
|
102
|
+
var width = isLabelLeftPositioned && isDesktop ? makeSize(labelWidth[size$1]) : 'auto';
|
|
100
103
|
return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({
|
|
101
104
|
htmlFor: htmlFor,
|
|
102
105
|
style: {
|
|
103
106
|
width: width,
|
|
104
107
|
flexShrink: 0,
|
|
105
|
-
marginRight: makeSpace(theme
|
|
108
|
+
marginRight: isLabelLeftPositioned ? makeSpace(getIn(theme, labelLeftMarginRight[size$1])) : makeSpace(getIn(theme, 'spacing.0'))
|
|
106
109
|
},
|
|
107
110
|
id: id
|
|
108
111
|
}, metaAttribute({
|
|
109
112
|
name: MetaConstants.FormLabel
|
|
110
113
|
})), {}, {
|
|
111
114
|
children: /*#__PURE__*/jsx(BaseBox, {
|
|
112
|
-
marginBottom: isLabelLeftPositioned ? 'spacing.0' :
|
|
115
|
+
marginBottom: isLabelLeftPositioned ? 'spacing.0' : labelMarginBottom[size$1],
|
|
113
116
|
children: textNode
|
|
114
117
|
})
|
|
115
118
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormLabel.js","sources":["../../../../../../src/components/Form/FormLabel.tsx"],"sourcesContent":["import React from 'react';\nimport { VisuallyHidden } from '~components/VisuallyHidden';\nimport { Text } from '~components/Typography';\nimport { getPlatformType, useBreakpoint } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport BaseBox from '~components/Box/BaseBox';\nimport { useTheme } from '~components/BladeProvider';\nimport { makeSpace } from '~utils/makeSpace';\nimport {
|
|
1
|
+
{"version":3,"file":"FormLabel.js","sources":["../../../../../../src/components/Form/FormLabel.tsx"],"sourcesContent":["import React from 'react';\nimport {\n labelLeftMarginRight,\n labelMarginBottom,\n labelOptionalIndicatorTextSize,\n labelTextSize,\n labelWidth,\n} from './formTokens';\nimport { VisuallyHidden } from '~components/VisuallyHidden';\nimport { Text } from '~components/Typography';\nimport { getPlatformType, makeSize, useBreakpoint } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport BaseBox from '~components/Box/BaseBox';\nimport { useTheme } from '~components/BladeProvider';\nimport { makeSpace } from '~utils/makeSpace';\nimport { size as sizeToken } from '~tokens/global';\nimport getIn from '~utils/lodashButBetter/get';\n\ntype CommonProps = {\n as: 'span' | 'label';\n position?: 'top' | 'left';\n necessityIndicator?: 'required' | 'optional' | 'none';\n accessibilityText?: string;\n children: string | undefined;\n id?: string;\n /**\n * Sets the size of the label\n * @default medium\n */\n size?: 'small' | 'medium' | 'large';\n};\n\ntype LabelProps = CommonProps & {\n htmlFor: string;\n as: 'label';\n};\n\ntype SpanProps = CommonProps & {\n as: 'span';\n htmlFor?: undefined;\n};\n\ntype FormLabelProps = LabelProps | SpanProps;\n\nexport type FormInputLabelProps = {\n /**\n * Label to be shown for the input field\n */\n label?: string;\n /**\n * Desktop only prop. Default value on mobile will be `top`\n */\n labelPosition?: 'left' | 'top';\n /**\n * Displays `(optional)` when `optional` is passed or `*` when `required` is passed\n */\n necessityIndicator?: 'required' | 'optional' | 'none';\n};\n\nconst FormLabel = ({\n as = 'span',\n position = 'top',\n necessityIndicator = 'none',\n accessibilityText,\n children,\n id,\n htmlFor,\n size = 'medium',\n}: FormLabelProps): React.ReactElement => {\n const { theme } = useTheme();\n const { matchedDeviceType } = useBreakpoint({ breakpoints: theme.breakpoints });\n const isDesktop = matchedDeviceType === 'desktop';\n const isReactNative = getPlatformType() === 'react-native';\n\n let necessityLabel: React.ReactNode = null;\n\n const isLabelLeftPositioned = position === 'left' && isDesktop;\n\n if (necessityIndicator === 'optional') {\n necessityLabel = (\n <Text\n variant=\"caption\"\n size={labelOptionalIndicatorTextSize[size]}\n color=\"surface.text.gray.muted\"\n >\n (optional)\n </Text>\n );\n }\n if (necessityIndicator === 'required') {\n necessityLabel = (\n <Text\n variant=\"body\"\n size={isLabelLeftPositioned ? 'medium' : 'small'}\n color=\"feedback.text.negative.intense\"\n >\n *\n </Text>\n );\n }\n\n const computedAccessibilityNode = (\n <VisuallyHidden>\n {necessityIndicator !== 'none' && <Text>{necessityIndicator}</Text>}\n <Text>{accessibilityText}</Text>\n </VisuallyHidden>\n );\n\n const textNode = (\n <BaseBox\n gap={necessityIndicator === 'optional' ? 'spacing.2' : 'spacing.0'}\n display=\"flex\"\n flexDirection=\"row\"\n alignItems=\"center\"\n flexWrap=\"wrap\"\n maxHeight={makeSpace(sizeToken[36])}\n >\n <Text\n variant=\"body\"\n size={labelTextSize[isLabelLeftPositioned ? 'left' : 'top'][size]}\n color=\"surface.text.gray.subtle\"\n truncateAfterLines={2}\n weight=\"semibold\"\n wordBreak={isLabelLeftPositioned ? 'break-word' : undefined}\n >\n {children}\n </Text>\n {computedAccessibilityNode}\n {/* TODO: Hide from screen readers to prevent double announcement */}\n {necessityLabel}\n </BaseBox>\n );\n\n // What harm can it do?\n if (isReactNative) {\n return (\n <BaseBox marginRight=\"spacing.5\" marginBottom=\"spacing.2\">\n {textNode}\n </BaseBox>\n );\n }\n\n const Component = as;\n // only set 120px label when device is desktop\n const width = isLabelLeftPositioned && isDesktop ? makeSize(labelWidth[size]) : 'auto';\n\n return (\n <Component\n htmlFor={htmlFor}\n style={{\n width,\n flexShrink: 0,\n marginRight: isLabelLeftPositioned\n ? makeSpace(getIn(theme, labelLeftMarginRight[size]))\n : makeSpace(getIn(theme, 'spacing.0')),\n }}\n id={id}\n {...metaAttribute({ name: MetaConstants.FormLabel })}\n >\n <BaseBox marginBottom={isLabelLeftPositioned ? 'spacing.0' : labelMarginBottom[size]}>\n {textNode}\n </BaseBox>\n </Component>\n );\n};\n\nexport { FormLabel };\n"],"names":["FormLabel","_ref","_ref$as","as","_ref$position","position","_ref$necessityIndicat","necessityIndicator","accessibilityText","children","id","htmlFor","_ref$size","size","_useTheme","useTheme","theme","_useBreakpoint","useBreakpoint","breakpoints","matchedDeviceType","isDesktop","isReactNative","getPlatformType","necessityLabel","isLabelLeftPositioned","_jsx","Text","variant","labelOptionalIndicatorTextSize","color","computedAccessibilityNode","_jsxs","VisuallyHidden","textNode","BaseBox","gap","display","flexDirection","alignItems","flexWrap","maxHeight","makeSpace","sizeToken","labelTextSize","truncateAfterLines","weight","wordBreak","undefined","marginRight","marginBottom","Component","width","makeSize","labelWidth","_objectSpread","style","flexShrink","getIn","labelLeftMarginRight","metaAttribute","name","MetaConstants","labelMarginBottom"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA2DA,IAAMA,SAAS,GAAG,SAAZA,SAASA,CAAAC,IAAA,EAS2B;AAAA,EAAA,IAAAC,OAAA,GAAAD,IAAA,CARxCE,EAAE;AAAFA,IAAAA,EAAE,GAAAD,OAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,OAAA;IAAAE,aAAA,GAAAH,IAAA,CACXI,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,aAAA;IAAAE,qBAAA,GAAAL,IAAA,CAChBM,kBAAkB;AAAlBA,IAAAA,kBAAkB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,qBAAA;IAC3BE,iBAAiB,GAAAP,IAAA,CAAjBO,iBA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AAA,WAAW,EAAC,WAAW;AAACC,MAAAA,YAAY,EAAC,WAAW;AAAAzC,MAAAA,QAAA,EACtDyB,QAAAA;AAAQ,KACF,CAAC,CAAA;AAEd,GAAA;EAEA,IAAMiB,SAAS,GAAGhD,EAAE,CAAA;AACpB;AACA,EAAA,IAAMiD,KAAK,GAAG3B,qBAAqB,IAAIJ,SAAS,GAAGgC,QAAQ,CAACC,UAAU,CAACzC,MAAI,CAAC,CAAC,GAAG,MAAM,CAAA;AAEtF,EAAA,oBACEa,GAAA,CAACyB,SAAS,EAAAI,aAAA,CAAAA,aAAA,CAAA;AACR5C,IAAAA,OAAO,EAAEA,OAAQ;AACjB6C,IAAAA,KAAK,EAAE;AACLJ,MAAAA,KAAK,EAALA,KAAK;AACLK,MAAAA,UAAU,EAAE,CAAC;MACbR,WAAW,EAAExB,qBAAqB,GAC9BiB,SAAS,CAACgB,KAAK,CAAC1C,KAAK,EAAE2C,oBAAoB,CAAC9C,MAAI,CAAC,CAAC,CAAC,GACnD6B,SAAS,CAACgB,KAAK,CAAC1C,KAAK,EAAE,WAAW,CAAC,CAAA;KACvC;AACFN,IAAAA,EAAE,EAAEA,EAAAA;AAAG,GAAA,EACHkD,aAAa,CAAC;IAAEC,IAAI,EAAEC,aAAa,CAAC9D,SAAAA;AAAU,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;IAAAS,QAAA,eAEpDiB,GAAA,CAACS,OAAO,EAAA;MAACe,YAAY,EAAEzB,qBAAqB,GAAG,WAAW,GAAGsC,iBAAiB,CAAClD,MAAI,CAAE;AAAAJ,MAAAA,QAAA,EAClFyB,QAAAA;KACM,CAAA;AAAC,GAAA,CACD,CAAC,CAAA;AAEhB;;;;"}
|
|
@@ -10,14 +10,20 @@ import { Text } from '../../Typography/Text/Text.js';
|
|
|
10
10
|
var SelectorSupportText = function SelectorSupportText(_ref) {
|
|
11
11
|
var children = _ref.children,
|
|
12
12
|
id = _ref.id,
|
|
13
|
-
isNegative = _ref.isNegative
|
|
13
|
+
isNegative = _ref.isNegative,
|
|
14
|
+
size = _ref.size;
|
|
14
15
|
var isReactNative = getPlatformType() === 'react-native';
|
|
16
|
+
var sizeMapping = {
|
|
17
|
+
small: 'small',
|
|
18
|
+
medium: 'small',
|
|
19
|
+
large: 'medium'
|
|
20
|
+
};
|
|
15
21
|
return /*#__PURE__*/jsx(Box, {
|
|
16
22
|
id: id,
|
|
17
23
|
display: isReactNative ? undefined : castWebType('contents'),
|
|
18
24
|
children: /*#__PURE__*/jsx(Text, {
|
|
19
25
|
variant: "caption",
|
|
20
|
-
size:
|
|
26
|
+
size: sizeMapping[size],
|
|
21
27
|
as: isReactNative ? undefined : 'span',
|
|
22
28
|
color: isNegative ? 'feedback.text.negative.intense' : 'surface.text.gray.muted',
|
|
23
29
|
children: children
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectorSupportText.js","sources":["../../../../../../../src/components/Form/Selector/SelectorSupportText.tsx"],"sourcesContent":["import { Box } from '~components/Box';\nimport { Text } from '~components/Typography/Text';\nimport { castWebType, getPlatformType } from '~utils';\n\nconst SelectorSupportText = ({\n children,\n id,\n isNegative,\n}: {\n children: React.ReactNode;\n id?: string;\n isNegative?: boolean;\n}): React.ReactElement => {\n const isReactNative = getPlatformType() === 'react-native';\n\n return (\n <Box id={id} display={isReactNative ? undefined : castWebType('contents')}>\n <Text\n variant=\"caption\"\n size
|
|
1
|
+
{"version":3,"file":"SelectorSupportText.js","sources":["../../../../../../../src/components/Form/Selector/SelectorSupportText.tsx"],"sourcesContent":["import { Box } from '~components/Box';\nimport { Text } from '~components/Typography/Text';\nimport { castWebType, getPlatformType } from '~utils';\n\nconst SelectorSupportText = ({\n children,\n id,\n isNegative,\n size,\n}: {\n children: React.ReactNode;\n id?: string;\n isNegative?: boolean;\n size: 'small' | 'medium' | 'large';\n}): React.ReactElement => {\n const isReactNative = getPlatformType() === 'react-native';\n const sizeMapping = {\n small: 'small',\n medium: 'small',\n large: 'medium',\n } as const;\n\n return (\n <Box id={id} display={isReactNative ? undefined : castWebType('contents')}>\n <Text\n variant=\"caption\"\n size={sizeMapping[size]}\n as={isReactNative ? undefined : 'span'}\n color={isNegative ? 'feedback.text.negative.intense' : 'surface.text.gray.muted'}\n >\n {children}\n </Text>\n </Box>\n );\n};\n\nexport { SelectorSupportText };\n"],"names":["SelectorSupportText","_ref","children","id","isNegative","size","isReactNative","getPlatformType","sizeMapping","small","medium","large","_jsx","Box","display","undefined","castWebType","Text","variant","as","color"],"mappings":";;;;;;;;;AAIA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAAC,IAAA,EAUC;AAAA,EAAA,IATxBC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,EAAE,GAAAF,IAAA,CAAFE,EAAE;IACFC,UAAU,GAAAH,IAAA,CAAVG,UAAU;IACVC,IAAI,GAAAJ,IAAA,CAAJI,IAAI,CAAA;AAOJ,EAAA,IAAMC,aAAa,GAAGC,eAAe,EAAE,KAAK,cAAc,CAAA;AAC1D,EAAA,IAAMC,WAAW,GAAG;AAClBC,IAAAA,KAAK,EAAE,OAAO;AACdC,IAAAA,MAAM,EAAE,OAAO;AACfC,IAAAA,KAAK,EAAE,QAAA;GACC,CAAA;EAEV,oBACEC,GAAA,CAACC,GAAG,EAAA;AAACV,IAAAA,EAAE,EAAEA,EAAG;IAACW,OAAO,EAAER,aAAa,GAAGS,SAAS,GAAGC,WAAW,CAAC,UAAU,CAAE;IAAAd,QAAA,eACxEU,GAAA,CAACK,IAAI,EAAA;AACHC,MAAAA,OAAO,EAAC,SAAS;AACjBb,MAAAA,IAAI,EAAEG,WAAW,CAACH,IAAI,CAAE;AACxBc,MAAAA,EAAE,EAAEb,aAAa,GAAGS,SAAS,GAAG,MAAO;AACvCK,MAAAA,KAAK,EAAEhB,UAAU,GAAG,gCAAgC,GAAG,yBAA0B;AAAAF,MAAAA,QAAA,EAEhFA,QAAAA;KACG,CAAA;AAAC,GACJ,CAAC,CAAA;AAEV;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectorTitle.js","sources":["../../../../../../../src/components/Form/Selector/SelectorTitle.tsx"],"sourcesContent":["import BaseBox from '~components/Box/BaseBox';\nimport { Text } from '~components/Typography/Text';\n\nconst SelectorTitle = ({\n children,\n isDisabled,\n size = 'medium',\n}: {\n children: React.ReactNode;\n isDisabled?: boolean;\n size: 'small' | 'medium';\n}): React.ReactElement => {\n return (\n <>\n <BaseBox marginLeft=\"spacing.2\" />\n <Text\n size={size}\n color={isDisabled ? 'surface.text.gray.disabled' : 'surface.text.gray.subtle'}\n >\n {children}\n </Text>\n </>\n );\n};\n\nexport { SelectorTitle };\n"],"names":["SelectorTitle","_ref","children","isDisabled","_ref$size","size","_jsxs","_Fragment","_jsx","BaseBox","marginLeft","Text","color"],"mappings":";;;;;;AAGA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAAC,IAAA,EAQO;AAAA,EAAA,IAPxBC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,UAAU,GAAAF,IAAA,CAAVE,UAAU;IAAAC,SAAA,GAAAH,IAAA,CACVI,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,SAAA,CAAA;EAMf,oBACEE,IAAA,CAAAC,QAAA,EAAA;IAAAL,QAAA,EAAA,cACEM,GAAA,CAACC,OAAO,EAAA;AAACC,MAAAA,UAAU,EAAC,WAAA;AAAW,KAAE,CAAC,eAClCF,GAAA,CAACG,IAAI,EAAA;AACHN,MAAAA,IAAI,EAAEA,IAAK;AACXO,MAAAA,KAAK,EAAET,UAAU,GAAG,4BAA4B,GAAG,0BAA2B;AAAAD,MAAAA,QAAA,EAE7EA,QAAAA;AAAQ,KACL,CAAC,CAAA;AAAA,GACP,CAAC,CAAA;AAEP;;;;"}
|
|
1
|
+
{"version":3,"file":"SelectorTitle.js","sources":["../../../../../../../src/components/Form/Selector/SelectorTitle.tsx"],"sourcesContent":["import BaseBox from '~components/Box/BaseBox';\nimport { Text } from '~components/Typography/Text';\n\nconst SelectorTitle = ({\n children,\n isDisabled,\n size = 'medium',\n}: {\n children: React.ReactNode;\n isDisabled?: boolean;\n size: 'small' | 'medium' | 'large';\n}): React.ReactElement => {\n return (\n <>\n <BaseBox marginLeft=\"spacing.2\" />\n <Text\n size={size}\n color={isDisabled ? 'surface.text.gray.disabled' : 'surface.text.gray.subtle'}\n >\n {children}\n </Text>\n </>\n );\n};\n\nexport { SelectorTitle };\n"],"names":["SelectorTitle","_ref","children","isDisabled","_ref$size","size","_jsxs","_Fragment","_jsx","BaseBox","marginLeft","Text","color"],"mappings":";;;;;;AAGA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAAC,IAAA,EAQO;AAAA,EAAA,IAPxBC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,UAAU,GAAAF,IAAA,CAAVE,UAAU;IAAAC,SAAA,GAAAH,IAAA,CACVI,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,SAAA,CAAA;EAMf,oBACEE,IAAA,CAAAC,QAAA,EAAA;IAAAL,QAAA,EAAA,cACEM,GAAA,CAACC,OAAO,EAAA;AAACC,MAAAA,UAAU,EAAC,WAAA;AAAW,KAAE,CAAC,eAClCF,GAAA,CAACG,IAAI,EAAA;AACHN,MAAAA,IAAI,EAAEA,IAAK;AACXO,MAAAA,KAAK,EAAET,UAAU,GAAG,4BAA4B,GAAG,0BAA2B;AAAAD,MAAAA,QAAA,EAE7EA,QAAAA;AAAQ,KACL,CAAC,CAAA;AAAA,GACP,CAAC,CAAA;AAEP;;;;"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import '../../tokens/global/index.js';
|
|
2
|
+
import { size } from '../../tokens/global/size.js';
|
|
3
|
+
|
|
4
|
+
var labelTextSize = {
|
|
5
|
+
top: {
|
|
6
|
+
small: 'small',
|
|
7
|
+
medium: 'small',
|
|
8
|
+
large: 'medium'
|
|
9
|
+
},
|
|
10
|
+
left: {
|
|
11
|
+
small: 'small',
|
|
12
|
+
medium: 'medium',
|
|
13
|
+
large: 'large'
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
var labelOptionalIndicatorTextSize = {
|
|
17
|
+
small: 'small',
|
|
18
|
+
medium: 'small',
|
|
19
|
+
large: 'medium'
|
|
20
|
+
};
|
|
21
|
+
var hintTextSize = {
|
|
22
|
+
small: 'small',
|
|
23
|
+
medium: 'small',
|
|
24
|
+
large: 'medium'
|
|
25
|
+
};
|
|
26
|
+
var hintIconSize = {
|
|
27
|
+
small: 'small',
|
|
28
|
+
medium: 'small',
|
|
29
|
+
large: 'medium'
|
|
30
|
+
};
|
|
31
|
+
var hintMarginTop = {
|
|
32
|
+
small: 'spacing.2',
|
|
33
|
+
medium: 'spacing.2',
|
|
34
|
+
large: 'spacing.3'
|
|
35
|
+
};
|
|
36
|
+
var labelMarginBottom = {
|
|
37
|
+
small: 'spacing.2',
|
|
38
|
+
medium: 'spacing.2',
|
|
39
|
+
large: 'spacing.3'
|
|
40
|
+
};
|
|
41
|
+
var labelWidth = {
|
|
42
|
+
small: size[120],
|
|
43
|
+
medium: size[120],
|
|
44
|
+
large: size[176]
|
|
45
|
+
};
|
|
46
|
+
var labelLeftMarginRight = {
|
|
47
|
+
small: 'spacing.3',
|
|
48
|
+
medium: 'spacing.4',
|
|
49
|
+
large: 'spacing.5'
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export { hintIconSize, hintMarginTop, hintTextSize, labelLeftMarginRight, labelMarginBottom, labelOptionalIndicatorTextSize, labelTextSize, labelWidth };
|
|
53
|
+
//# sourceMappingURL=formTokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formTokens.js","sources":["../../../../../../src/components/Form/formTokens.ts"],"sourcesContent":["import { size } from '~tokens/global';\n\nconst labelTextSize = {\n top: {\n small: 'small',\n medium: 'small',\n large: 'medium',\n },\n left: {\n small: 'small',\n medium: 'medium',\n large: 'large',\n },\n} as const;\n\nconst labelOptionalIndicatorTextSize = {\n small: 'small',\n medium: 'small',\n large: 'medium',\n} as const;\n\nconst hintTextSize = {\n small: 'small',\n medium: 'small',\n large: 'medium',\n} as const;\n\nconst hintIconSize = {\n small: 'small',\n medium: 'small',\n large: 'medium',\n} as const;\n\nconst hintMarginTop = {\n small: 'spacing.2',\n medium: 'spacing.2',\n large: 'spacing.3',\n} as const;\n\nconst labelMarginBottom = {\n small: 'spacing.2',\n medium: 'spacing.2',\n large: 'spacing.3',\n} as const;\n\nconst labelWidth = {\n small: size[120],\n medium: size[120],\n large: size[176],\n} as const;\n\nconst labelLeftMarginRight = {\n small: 'spacing.3',\n medium: 'spacing.4',\n large: 'spacing.5',\n} as const;\n\nexport {\n labelTextSize,\n labelOptionalIndicatorTextSize,\n hintTextSize,\n hintIconSize,\n hintMarginTop,\n labelMarginBottom,\n labelWidth,\n labelLeftMarginRight,\n};\n"],"names":["labelTextSize","top","small","medium","large","left","labelOptionalIndicatorTextSize","hintTextSize","hintIconSize","hintMarginTop","labelMarginBottom","labelWidth","size","labelLeftMarginRight"],"mappings":";;;AAEA,IAAMA,aAAa,GAAG;AACpBC,EAAAA,GAAG,EAAE;AACHC,IAAAA,KAAK,EAAE,OAAO;AACdC,IAAAA,MAAM,EAAE,OAAO;AACfC,IAAAA,KAAK,EAAE,QAAA;GACR;AACDC,EAAAA,IAAI,EAAE;AACJH,IAAAA,KAAK,EAAE,OAAO;AACdC,IAAAA,MAAM,EAAE,QAAQ;AAChBC,IAAAA,KAAK,EAAE,OAAA;AACT,GAAA;AACF,EAAU;AAEV,IAAME,8BAA8B,GAAG;AACrCJ,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,MAAM,EAAE,OAAO;AACfC,EAAAA,KAAK,EAAE,QAAA;AACT,EAAU;AAEV,IAAMG,YAAY,GAAG;AACnBL,EAAAA,KAAK,E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