@razorpay/blade 12.35.0 → 12.37.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.
Files changed (82) hide show
  1. package/build/lib/native/components/Box/BaseBox/types/propsTypes.js.map +1 -1
  2. package/build/lib/native/components/Box/styledProps/getStyledProps.js +1 -1
  3. package/build/lib/native/components/Box/styledProps/getStyledProps.js.map +1 -1
  4. package/build/lib/native/components/Card/Card.js +3 -1
  5. package/build/lib/native/components/Card/Card.js.map +1 -1
  6. package/build/lib/native/components/Checkbox/CheckboxGroup/CheckboxGroup.js +1 -1
  7. package/build/lib/native/components/Checkbox/CheckboxGroup/CheckboxGroup.js.map +1 -1
  8. package/build/lib/native/components/Radio/RadioGroup/RadioGroup.js +1 -1
  9. package/build/lib/native/components/Radio/RadioGroup/RadioGroup.js.map +1 -1
  10. package/build/lib/native/components/Typography/BaseText/BaseText.native.js +1 -1
  11. package/build/lib/native/components/Typography/BaseText/BaseText.native.js.map +1 -1
  12. package/build/lib/native/components/Typography/BaseText/getBaseTextStyles.js +1 -1
  13. package/build/lib/native/components/Typography/BaseText/getBaseTextStyles.js.map +1 -1
  14. package/build/lib/native/components/Typography/Code/Code.js +1 -1
  15. package/build/lib/native/components/Typography/Code/Code.js.map +1 -1
  16. package/build/lib/native/components/Typography/Display/Display.js +1 -1
  17. package/build/lib/native/components/Typography/Display/Display.js.map +1 -1
  18. package/build/lib/native/components/Typography/Heading/Heading.js +1 -1
  19. package/build/lib/native/components/Typography/Heading/Heading.js.map +1 -1
  20. package/build/lib/native/components/Typography/Text/Text.js +1 -1
  21. package/build/lib/native/components/Typography/Text/Text.js.map +1 -1
  22. package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js +7 -2
  23. package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js.map +1 -1
  24. package/build/lib/web/development/components/Box/BaseBox/types/propsTypes.js.map +1 -1
  25. package/build/lib/web/development/components/Box/styledProps/getStyledProps.js +2 -1
  26. package/build/lib/web/development/components/Box/styledProps/getStyledProps.js.map +1 -1
  27. package/build/lib/web/development/components/Card/Card.js +13 -1
  28. package/build/lib/web/development/components/Card/Card.js.map +1 -1
  29. package/build/lib/web/development/components/Card/CardRoot.web.js +9 -2
  30. package/build/lib/web/development/components/Card/CardRoot.web.js.map +1 -1
  31. package/build/lib/web/development/components/Checkbox/CheckboxGroup/CheckboxGroup.js +4 -1
  32. package/build/lib/web/development/components/Checkbox/CheckboxGroup/CheckboxGroup.js.map +1 -1
  33. package/build/lib/web/development/components/Radio/RadioGroup/RadioGroup.js +4 -1
  34. package/build/lib/web/development/components/Radio/RadioGroup/RadioGroup.js.map +1 -1
  35. package/build/lib/web/development/components/Table/TableEditableCell.web.js +3 -1
  36. package/build/lib/web/development/components/Table/TableEditableCell.web.js.map +1 -1
  37. package/build/lib/web/development/components/Tooltip/Tooltip.web.js +2 -2
  38. package/build/lib/web/development/components/Tooltip/Tooltip.web.js.map +1 -1
  39. package/build/lib/web/development/components/Typography/BaseText/BaseText.web.js +7 -3
  40. package/build/lib/web/development/components/Typography/BaseText/BaseText.web.js.map +1 -1
  41. package/build/lib/web/development/components/Typography/BaseText/getBaseTextStyles.js +4 -2
  42. package/build/lib/web/development/components/Typography/BaseText/getBaseTextStyles.js.map +1 -1
  43. package/build/lib/web/development/components/Typography/Code/Code.js +3 -1
  44. package/build/lib/web/development/components/Typography/Code/Code.js.map +1 -1
  45. package/build/lib/web/development/components/Typography/Display/Display.js +4 -2
  46. package/build/lib/web/development/components/Typography/Display/Display.js.map +1 -1
  47. package/build/lib/web/development/components/Typography/Heading/Heading.js +3 -1
  48. package/build/lib/web/development/components/Typography/Heading/Heading.js.map +1 -1
  49. package/build/lib/web/development/components/Typography/Text/Text.js +4 -2
  50. package/build/lib/web/development/components/Typography/Text/Text.js.map +1 -1
  51. package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js +7 -2
  52. package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js.map +1 -1
  53. package/build/lib/web/production/components/Box/BaseBox/types/propsTypes.js.map +1 -1
  54. package/build/lib/web/production/components/Box/styledProps/getStyledProps.js +2 -1
  55. package/build/lib/web/production/components/Box/styledProps/getStyledProps.js.map +1 -1
  56. package/build/lib/web/production/components/Card/Card.js +13 -1
  57. package/build/lib/web/production/components/Card/Card.js.map +1 -1
  58. package/build/lib/web/production/components/Card/CardRoot.web.js +9 -2
  59. package/build/lib/web/production/components/Card/CardRoot.web.js.map +1 -1
  60. package/build/lib/web/production/components/Checkbox/CheckboxGroup/CheckboxGroup.js +4 -1
  61. package/build/lib/web/production/components/Checkbox/CheckboxGroup/CheckboxGroup.js.map +1 -1
  62. package/build/lib/web/production/components/Radio/RadioGroup/RadioGroup.js +4 -1
  63. package/build/lib/web/production/components/Radio/RadioGroup/RadioGroup.js.map +1 -1
  64. package/build/lib/web/production/components/Table/TableEditableCell.web.js +3 -1
  65. package/build/lib/web/production/components/Table/TableEditableCell.web.js.map +1 -1
  66. package/build/lib/web/production/components/Tooltip/Tooltip.web.js +2 -2
  67. package/build/lib/web/production/components/Tooltip/Tooltip.web.js.map +1 -1
  68. package/build/lib/web/production/components/Typography/BaseText/BaseText.web.js +7 -3
  69. package/build/lib/web/production/components/Typography/BaseText/BaseText.web.js.map +1 -1
  70. package/build/lib/web/production/components/Typography/BaseText/getBaseTextStyles.js +4 -2
  71. package/build/lib/web/production/components/Typography/BaseText/getBaseTextStyles.js.map +1 -1
  72. package/build/lib/web/production/components/Typography/Code/Code.js +3 -1
  73. package/build/lib/web/production/components/Typography/Code/Code.js.map +1 -1
  74. package/build/lib/web/production/components/Typography/Display/Display.js +4 -2
  75. package/build/lib/web/production/components/Typography/Display/Display.js.map +1 -1
  76. package/build/lib/web/production/components/Typography/Heading/Heading.js +3 -1
  77. package/build/lib/web/production/components/Typography/Heading/Heading.js.map +1 -1
  78. package/build/lib/web/production/components/Typography/Text/Text.js +4 -2
  79. package/build/lib/web/production/components/Typography/Text/Text.js.map +1 -1
  80. package/build/types/components/index.d.ts +42 -35
  81. package/build/types/components/index.native.d.ts +31 -24
  82. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxGroup.js","sources":["../../../../../../../src/components/Checkbox/CheckboxGroup/CheckboxGroup.tsx"],"sourcesContent":["import React from 'react';\nimport { checkboxSizes } from '../checkboxTokens';\nimport { CheckboxGroupProvider } from './CheckboxGroupContext';\nimport { useCheckboxGroup } from './useCheckboxGroup';\nimport { FormLabel, FormHint } from '~components/Form';\nimport BaseBox from '~components/Box/BaseBox';\nimport { SelectorGroupField } from '~components/Form/Selector/SelectorGroupField';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { useBreakpoint } from '~utils';\n\nimport { useTheme } from '~components/BladeProvider';\nimport type { DataAnalyticsAttribute, TestID } from '~utils/types';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype CheckboxGroupProps = {\n /**\n * Accepts multiple checkboxes as children\n */\n children: React.ReactNode;\n /**\n * Help text of the checkbox group\n */\n helpText?: string;\n /**\n * Error text of the checkbox group\n * Renders when `validationState` is set to 'error'\n *\n * Overrides helpText\n */\n errorText?: string;\n /**\n * Sets the error state of the CheckboxGroup\n * If set to `error` it will render the `errorText` of the group,\n * and propagate `invalid` prop to every checkbox\n */\n validationState?: 'error' | 'none';\n /**\n * Renders a necessity indicator after CheckboxGroup label\n *\n * If set to `undefined` it renders nothing.\n */\n necessityIndicator?: 'required' | 'optional' | 'none';\n /**\n * Sets the disabled state of the CheckboxGroup\n * If set to `true` it propagate down to all the checkboxes\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Sets the required state of the CheckboxGroup\n * @default false\n */\n isRequired?: boolean;\n /**\n * Renders the label of the checkbox group\n */\n label?: string;\n /**\n * Sets the position of the label\n *\n * @default 'top'\n */\n labelPosition?: 'top' | 'left';\n /**\n * Initial value of the checkbox group\n */\n defaultValue?: string[];\n /**\n * value of the checkbox group\n *\n * Use `onChange` to update its value\n */\n value?: string[];\n /**\n * The callback invoked when any of the checkbox's state changes\n */\n onChange?: ({ name, values }: { name: string; values: string[] }) => void;\n /**\n * The name of the input field in a checkbox\n * (Useful for form submission).\n */\n name?: string;\n /**\n * Size of the checkbox\n *\n * @default \"medium\"\n */\n size?: 'small' | 'medium' | 'large';\n /**\n * Orientation of the checkbox group\n *\n * @default \"vertical\"\n */\n orientation?: 'vertical' | 'horizontal';\n} & TestID &\n DataAnalyticsAttribute &\n StyledPropsBlade;\n\nconst CheckboxGroup = ({\n children,\n label,\n helpText,\n isDisabled = false,\n isRequired = false,\n necessityIndicator = 'none',\n labelPosition = 'top',\n validationState,\n errorText,\n name,\n defaultValue,\n onChange,\n value,\n size = 'medium',\n testID,\n orientation = 'vertical',\n ...rest\n}: CheckboxGroupProps): React.ReactElement => {\n const { contextValue, ids } = useCheckboxGroup({\n defaultValue,\n onChange,\n value,\n isDisabled,\n necessityIndicator,\n isRequired,\n name,\n labelPosition,\n validationState,\n size,\n });\n\n const { theme } = useTheme();\n const showError = validationState === 'error' && errorText;\n const showHelpText = !showError && helpText;\n const accessibilityText = `,${showError ? errorText : ''} ${showHelpText ? helpText : ''}`;\n const { matchedDeviceType } = useBreakpoint({ breakpoints: theme.breakpoints });\n const gap = checkboxSizes.group.gap[size][matchedDeviceType];\n\n return (\n <CheckboxGroupProvider value={contextValue}>\n <BaseBox {...getStyledProps(rest)}>\n <SelectorGroupField\n position={labelPosition}\n labelledBy={ids.labelId}\n componentName=\"checkbox-group\"\n testID={testID}\n {...makeAnalyticsAttribute(rest)}\n >\n {label ? (\n <FormLabel\n as=\"span\"\n necessityIndicator={necessityIndicator}\n position={labelPosition}\n id={ids.labelId}\n accessibilityText={accessibilityText}\n size={size}\n >\n {label}\n </FormLabel>\n ) : null}\n <BaseBox>\n <BaseBox\n display=\"flex\"\n flexDirection={orientation === 'horizontal' ? 'row' : 'column'}\n gap={gap}\n >\n {React.Children.map(children, (child, index) => {\n return <BaseBox key={index}>{child}</BaseBox>;\n })}\n </BaseBox>\n <FormHint\n size={size}\n errorText={errorText}\n helpText={helpText}\n type={validationState === 'error' ? 'error' : 'help'}\n />\n </BaseBox>\n </SelectorGroupField>\n </BaseBox>\n </CheckboxGroupProvider>\n );\n};\n\nexport type { CheckboxGroupProps };\nexport { CheckboxGroup };\n"],"names":["CheckboxGroup","_ref","children","label","helpText","_ref$isDisabled","isDisabled","_ref$isRequired","isRequired","_ref$necessityIndicat","necessityIndicator","_ref$labelPosition","labelPosition","validationState","errorText","name","defaultValue","onChange","value","_ref$size","size","testID","_ref$orientation","orientation","rest","_objectWithoutProperties","_excluded","_useCheckboxGroup","useCheckboxGroup","contextValue","ids","_useTheme","useTheme","theme","showError","showHelpText","accessibilityText","concat","_useBreakpoint","useBreakpoint","breakpoints","matchedDeviceType","gap","checkboxSizes","group","_jsx","CheckboxGroupProvider","BaseBox","_objectSpread","getStyledProps","_jsxs","SelectorGroupField","position","labelledBy","labelId","componentName","makeAnalyticsAttribute","FormLabel","as","id","display","flexDirection","React","Children","map","child","index","FormHint","type"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAoGA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAAC,IAAA,EAkB2B;AAAA,EAAA,IAjB5CC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IAAAC,eAAA,GAAAJ,IAAA,CACRK,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,eAAA;IAAAE,eAAA,GAAAN,IAAA,CAClBO,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,eAAA;IAAAE,qBAAA,GAAAR,IAAA,CAClBS,kBAAkB;AAAlBA,IAAAA,kBAAkB,GAAAD,qBAAA,KAAG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":["import React from 'react';\nimport { checkboxSizes } from '../checkboxTokens';\nimport { CheckboxGroupProvider } from './CheckboxGroupContext';\nimport { useCheckboxGroup } from './useCheckboxGroup';\nimport { FormLabel, FormHint } from '~components/Form';\nimport BaseBox from '~components/Box/BaseBox';\nimport { SelectorGroupField } from '~components/Form/Selector/SelectorGroupField';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { useBreakpoint } from '~utils';\n\nimport { useTheme } from '~components/BladeProvider';\nimport type { DataAnalyticsAttribute, TestID } from '~utils/types';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype CheckboxGroupProps = {\n /**\n * Accepts multiple checkboxes as children\n */\n children: React.ReactNode;\n /**\n * Help text of the checkbox group\n */\n helpText?: string;\n /**\n * Error text of the checkbox group\n * Renders when `validationState` is set to 'error'\n *\n * Overrides helpText\n */\n errorText?: string;\n /**\n * Sets the error state of the CheckboxGroup\n * If set to `error` it will render the `errorText` of the group,\n * and propagate `invalid` prop to every checkbox\n */\n validationState?: 'error' | 'none';\n /**\n * Renders a necessity indicator after CheckboxGroup label\n *\n * If set to `undefined` it renders nothing.\n */\n necessityIndicator?: 'required' | 'optional' | 'none';\n /**\n * Sets the disabled state of the CheckboxGroup\n * If set to `true` it propagate down to all the checkboxes\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Sets the required state of the CheckboxGroup\n * @default false\n */\n isRequired?: boolean;\n /**\n * Renders the label of the checkbox group\n */\n label?: string;\n /**\n * Sets the position of the label\n *\n * @default 'top'\n */\n labelPosition?: 'top' | 'left';\n /**\n * Initial value of the checkbox group\n */\n defaultValue?: string[];\n /**\n * value of the checkbox group\n *\n * Use `onChange` to update its value\n */\n value?: string[];\n /**\n * The callback invoked when any of the checkbox's state changes\n */\n onChange?: ({ name, values }: { name: string; values: string[] }) => void;\n /**\n * The name of the input field in a checkbox\n * (Useful for form submission).\n */\n name?: string;\n /**\n * Size of the checkbox\n *\n * @default \"medium\"\n */\n size?: 'small' | 'medium' | 'large';\n /**\n * Orientation of the checkbox group\n *\n * @default \"vertical\"\n */\n orientation?: 'vertical' | 'horizontal';\n} & TestID &\n DataAnalyticsAttribute &\n StyledPropsBlade;\n\nconst CheckboxGroup = ({\n children,\n label,\n helpText,\n isDisabled = false,\n isRequired = false,\n necessityIndicator = 'none',\n labelPosition = 'top',\n validationState,\n errorText,\n name,\n defaultValue,\n onChange,\n value,\n size = 'medium',\n testID,\n orientation = 'vertical',\n flexWrap = 'nowrap',\n ...rest\n}: CheckboxGroupProps): React.ReactElement => {\n const { contextValue, ids } = useCheckboxGroup({\n defaultValue,\n onChange,\n value,\n isDisabled,\n necessityIndicator,\n isRequired,\n name,\n labelPosition,\n validationState,\n size,\n });\n\n const { theme } = useTheme();\n const showError = validationState === 'error' && errorText;\n const showHelpText = !showError && helpText;\n const accessibilityText = `,${showError ? errorText : ''} ${showHelpText ? helpText : ''}`;\n const { matchedDeviceType } = useBreakpoint({ breakpoints: theme.breakpoints });\n const gap = checkboxSizes.group.gap[size][matchedDeviceType];\n\n return (\n <CheckboxGroupProvider value={contextValue}>\n <BaseBox {...getStyledProps(rest)}>\n <SelectorGroupField\n position={labelPosition}\n labelledBy={ids.labelId}\n componentName=\"checkbox-group\"\n testID={testID}\n {...makeAnalyticsAttribute(rest)}\n >\n {label ? (\n <FormLabel\n as=\"span\"\n necessityIndicator={necessityIndicator}\n position={labelPosition}\n id={ids.labelId}\n accessibilityText={accessibilityText}\n size={size}\n >\n {label}\n </FormLabel>\n ) : null}\n <BaseBox>\n <BaseBox\n display=\"flex\"\n flexDirection={orientation === 'horizontal' ? 'row' : 'column'}\n gap={gap}\n flexWrap={flexWrap}\n >\n {React.Children.map(children, (child, index) => {\n return <BaseBox key={index}>{child}</BaseBox>;\n })}\n </BaseBox>\n <FormHint\n size={size}\n errorText={errorText}\n helpText={helpText}\n type={validationState === 'error' ? 'error' : 'help'}\n />\n </BaseBox>\n </SelectorGroupField>\n </BaseBox>\n </CheckboxGroupProvider>\n );\n};\n\nexport type { CheckboxGroupProps };\nexport { CheckboxGroup };\n"],"names":["CheckboxGroup","_ref","children","label","helpText","_ref$isDisabled","isDisabled","_ref$isRequired","isRequired","_ref$necessityIndicat","necessityIndicator","_ref$labelPosition","labelPosition","validationState","errorText","name","defaultValue","onChange","value","_ref$size","size","testID","_ref$orientation","orientation","_ref$flexWrap","flexWrap","rest","_objectWithoutProperties","_excluded","_useCheckboxGroup","useCheckboxGroup","contextValue","ids","_useTheme","useTheme","theme","showError","showHelpText","accessibilityText","concat","_useBreakpoint","useBreakpoint","breakpoints","matchedDeviceType","gap","checkboxSizes","group","_jsx","CheckboxGroupProvider","BaseBox","_objectSpread","getStyledProps","_jsxs","SelectorGroupField","position","labelledBy","labelId","componentName","makeAnalyticsAttribute","FormLabel","as","id","display","flexDirection","React","Children","map","child","index","FormHint","type"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAoGA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAAC,IAAA,EAmB2B;AAAA,EAAA,IAlB5CC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IAAAC,eAAA,GAAAJ,IAAA,CACRK,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,eAAA;IAAAE,eAAA,GAAAN,IAAA,CAClBO,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,eAAA;IAAAE,qBAAA,GAAAR,IAAA,CAClBS,kBAAkB;AAAlBA,IAAAA,kBAAkB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,qBAAA;IAAAE,kBAAA,GAAAV,IAAA,CAC3BW,aAAa;AAAbA,IAAAA,aAAa,GAAAD,kBAAA,KA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yticsAttribute/ma
20
20
  import { FormLabel } from '../../Form/FormLabel.js';
21
21
  import { FormHint } from '../../Form/FormHint.js';
22
22
 
23
- var _excluded = ["children", "label", "helpText", "isDisabled", "isRequired", "necessityIndicator", "labelPosition", "validationState", "errorText", "name", "defaultValue", "onChange", "value", "size", "orientation", "testID"];
23
+ var _excluded = ["children", "label", "helpText", "isDisabled", "isRequired", "necessityIndicator", "labelPosition", "validationState", "errorText", "name", "defaultValue", "onChange", "value", "size", "orientation", "testID", "flexWrap"];
24
24
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
25
25
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
26
26
  var RadioGroup = function RadioGroup(_ref) {
@@ -47,6 +47,8 @@ var RadioGroup = function RadioGroup(_ref) {
47
47
  _ref$orientation = _ref.orientation,
48
48
  orientation = _ref$orientation === void 0 ? 'vertical' : _ref$orientation,
49
49
  testID = _ref.testID,
50
+ _ref$flexWrap = _ref.flexWrap,
51
+ flexWrap = _ref$flexWrap === void 0 ? 'nowrap' : _ref$flexWrap,
50
52
  rest = _objectWithoutProperties(_ref, _excluded);
51
53
  var _useRadioGroup = useRadioGroup({
52
54
  defaultValue: defaultValue,
@@ -95,6 +97,7 @@ var RadioGroup = function RadioGroup(_ref) {
95
97
  display: "flex",
96
98
  flexDirection: orientation === 'vertical' ? 'column' : 'row',
97
99
  gap: gap,
100
+ flexWrap: flexWrap,
98
101
  children: React__default.Children.map(children, function (child, index) {
99
102
  return /*#__PURE__*/jsx(BaseBox, {
100
103
  children: child
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.js","sources":["../../../../../../../src/components/Radio/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import React from 'react';\nimport { radioSizes } from '../radioTokens';\nimport { RadioGroupProvider } from './RadioContext';\nimport { useRadioGroup } from './useRadioGroup';\nimport BaseBox from '~components/Box/BaseBox';\nimport { FormHint, FormLabel } from '~components/Form';\nimport { SelectorGroupField } from '~components/Form/Selector/SelectorGroupField';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { useBreakpoint } from '~utils';\nimport { useTheme } from '~components/BladeProvider';\nimport type { DataAnalyticsAttribute, TestID } from '~utils/types';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype RadioGroupProps = {\n /**\n * Accepts multiple radios as children\n */\n children: React.ReactNode;\n /**\n * Help text of the radio group\n */\n helpText?: string;\n /**\n * Error text of the radio group\n * Renders when `validationState` is set to 'error'\n *\n * Overrides helpText\n */\n errorText?: string;\n /**\n * Sets the error state of the radioGroup\n * If set to `error` it will render the `errorText` of the group,\n * and propagate `invalid` prop to every radio\n */\n validationState?: 'error' | 'none';\n /**\n * Renders a necessity indicator after radioGroup label\n *\n * If set to `undefined` it renders nothing.\n */\n necessityIndicator?: 'required' | 'optional' | 'none';\n /**\n * Sets the disabled state of the radioGroup\n * If set to `true` it propagate down to all the radios\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Sets the required state of the radioGroup\n * @default false\n */\n isRequired?: boolean;\n /**\n * Renders the label of the radio group\n */\n label?: string;\n /**\n * Sets the position of the label\n *\n * @default 'top'\n */\n labelPosition?: 'top' | 'left';\n /**\n * Initial value of the radio group\n */\n defaultValue?: string;\n /**\n * value of the radio group\n *\n * Use `onChange` to update its value\n */\n value?: string;\n /**\n * The callback invoked when any of the radio's state changes\n */\n onChange?: ({\n name,\n value,\n event,\n }: {\n name: string | undefined;\n value: string;\n event: React.ChangeEvent<HTMLInputElement>;\n }) => void;\n /**\n * The name of the input field in a radio\n * (Useful for form submission).\n */\n name?: string;\n /**\n * Size of the radios\n *\n * @default \"medium\"\n */\n size?: 'small' | 'medium' | 'large';\n\n /**\n * Orientation of the radio group\n *\n * @default 'vertical'\n */\n orientation?: 'vertical' | 'horizontal';\n} & TestID &\n DataAnalyticsAttribute &\n StyledPropsBlade;\n\nconst RadioGroup = ({\n children,\n label,\n helpText,\n isDisabled = false,\n isRequired = false,\n necessityIndicator = 'none',\n labelPosition = 'top',\n validationState = 'none',\n errorText,\n name,\n defaultValue,\n onChange,\n value,\n size = 'medium',\n orientation = 'vertical',\n testID,\n ...rest\n}: RadioGroupProps): React.ReactElement => {\n const { contextValue, ids } = useRadioGroup({\n defaultValue,\n isDisabled,\n isRequired,\n labelPosition,\n name,\n necessityIndicator,\n onChange,\n validationState,\n value,\n size,\n });\n\n const { theme } = useTheme();\n const { matchedDeviceType } = useBreakpoint({ breakpoints: theme.breakpoints });\n const showError = validationState === 'error' && errorText;\n const showHelpText = !showError && helpText;\n const accessibilityText = `${showError ? errorText : ''} ${showHelpText ? helpText : ''}`.trim();\n const gap = radioSizes.group.gap[size][matchedDeviceType];\n\n return (\n <RadioGroupProvider value={contextValue}>\n <BaseBox {...getStyledProps(rest)}>\n <SelectorGroupField\n position={labelPosition}\n labelledBy={ids.labelId}\n accessibilityRole=\"radiogroup\"\n componentName=\"radio-group\"\n testID={testID}\n {...makeAnalyticsAttribute(rest)}\n >\n {label ? (\n <FormLabel\n as=\"span\"\n necessityIndicator={necessityIndicator}\n position={labelPosition}\n id={ids.labelId}\n accessibilityText={accessibilityText && `,${accessibilityText}`}\n size={size}\n >\n {label}\n </FormLabel>\n ) : null}\n <BaseBox>\n <BaseBox\n display=\"flex\"\n flexDirection={orientation === 'vertical' ? 'column' : 'row'}\n gap={gap}\n >\n {React.Children.map(children, (child, index) => {\n return <BaseBox key={index}>{child}</BaseBox>;\n })}\n </BaseBox>\n <FormHint\n size={size}\n type={validationState === 'error' ? 'error' : 'help'}\n errorText={errorText}\n helpText={helpText}\n />\n </BaseBox>\n </SelectorGroupField>\n </BaseBox>\n </RadioGroupProvider>\n );\n};\n\nexport type { RadioGroupProps };\nexport { RadioGroup };\n"],"names":["RadioGroup","_ref","children","label","helpText","_ref$isDisabled","isDisabled","_ref$isRequired","isRequired","_ref$necessityIndicat","necessityIndicator","_ref$labelPosition","labelPosition","_ref$validationState","validationState","errorText","name","defaultValue","onChange","value","_ref$size","size","_ref$orientation","orientation","testID","rest","_objectWithoutProperties","_excluded","_useRadioGroup","useRadioGroup","contextValue","ids","_useTheme","useTheme","theme","_useBreakpoint","useBreakpoint","breakpoints","matchedDeviceType","showError","showHelpText","accessibilityText","concat","trim","gap","radioSizes","group","_jsx","RadioGroupProvider","BaseBox","_objectSpread","getStyledProps","_jsxs","SelectorGroupField","position","labelledBy","labelId","accessibilityRole","componentName","makeAnalyticsAttribute","FormLabel","as","id","display","flexDirection","React","Children","map","child","index","FormHint","type"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA4GA,IAAMA,UAAU,GAAG,SAAbA,UAAUA,CAAAC,IAAA,EAkB2B;AAAA,EAAA,IAjBzCC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IAAAC,eAAA,GAAAJ,IAAA,CACRK,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,eAAA;IAAAE,eAAA,GAAAN,IAAA,CAClBO,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,eAAA;IAAAE,qBAAA,GAAAR,IAAA,CAClBS,kBAAkB;AAAlBA,IAAAA,kBAAkB,GAAAD,qBAAA,KAAG,KAAA,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A;KACb,CAAA,CAAA;AAAC,GACQ,CAAC,CAAA;AAEzB;;;;"}
1
+ {"version":3,"file":"RadioGroup.js","sources":["../../../../../../../src/components/Radio/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import React from 'react';\nimport { radioSizes } from '../radioTokens';\nimport { RadioGroupProvider } from './RadioContext';\nimport { useRadioGroup } from './useRadioGroup';\nimport BaseBox from '~components/Box/BaseBox';\nimport { FormHint, FormLabel } from '~components/Form';\nimport { SelectorGroupField } from '~components/Form/Selector/SelectorGroupField';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { useBreakpoint } from '~utils';\nimport { useTheme } from '~components/BladeProvider';\nimport type { DataAnalyticsAttribute, TestID } from '~utils/types';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype RadioGroupProps = {\n /**\n * Accepts multiple radios as children\n */\n children: React.ReactNode;\n /**\n * Help text of the radio group\n */\n helpText?: string;\n /**\n * Error text of the radio group\n * Renders when `validationState` is set to 'error'\n *\n * Overrides helpText\n */\n errorText?: string;\n /**\n * Sets the error state of the radioGroup\n * If set to `error` it will render the `errorText` of the group,\n * and propagate `invalid` prop to every radio\n */\n validationState?: 'error' | 'none';\n /**\n * Renders a necessity indicator after radioGroup label\n *\n * If set to `undefined` it renders nothing.\n */\n necessityIndicator?: 'required' | 'optional' | 'none';\n /**\n * Sets the disabled state of the radioGroup\n * If set to `true` it propagate down to all the radios\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Sets the required state of the radioGroup\n * @default false\n */\n isRequired?: boolean;\n /**\n * Renders the label of the radio group\n */\n label?: string;\n /**\n * Sets the position of the label\n *\n * @default 'top'\n */\n labelPosition?: 'top' | 'left';\n /**\n * Initial value of the radio group\n */\n defaultValue?: string;\n /**\n * value of the radio group\n *\n * Use `onChange` to update its value\n */\n value?: string;\n /**\n * The callback invoked when any of the radio's state changes\n */\n onChange?: ({\n name,\n value,\n event,\n }: {\n name: string | undefined;\n value: string;\n event: React.ChangeEvent<HTMLInputElement>;\n }) => void;\n /**\n * The name of the input field in a radio\n * (Useful for form submission).\n */\n name?: string;\n /**\n * Size of the radios\n *\n * @default \"medium\"\n */\n size?: 'small' | 'medium' | 'large';\n\n /**\n * Orientation of the radio group\n *\n * @default 'vertical'\n */\n orientation?: 'vertical' | 'horizontal';\n} & TestID &\n DataAnalyticsAttribute &\n StyledPropsBlade;\n\nconst RadioGroup = ({\n children,\n label,\n helpText,\n isDisabled = false,\n isRequired = false,\n necessityIndicator = 'none',\n labelPosition = 'top',\n validationState = 'none',\n errorText,\n name,\n defaultValue,\n onChange,\n value,\n size = 'medium',\n orientation = 'vertical',\n testID,\n flexWrap = 'nowrap',\n ...rest\n}: RadioGroupProps): React.ReactElement => {\n const { contextValue, ids } = useRadioGroup({\n defaultValue,\n isDisabled,\n isRequired,\n labelPosition,\n name,\n necessityIndicator,\n onChange,\n validationState,\n value,\n size,\n });\n\n const { theme } = useTheme();\n const { matchedDeviceType } = useBreakpoint({ breakpoints: theme.breakpoints });\n const showError = validationState === 'error' && errorText;\n const showHelpText = !showError && helpText;\n const accessibilityText = `${showError ? errorText : ''} ${showHelpText ? helpText : ''}`.trim();\n const gap = radioSizes.group.gap[size][matchedDeviceType];\n\n return (\n <RadioGroupProvider value={contextValue}>\n <BaseBox {...getStyledProps(rest)}>\n <SelectorGroupField\n position={labelPosition}\n labelledBy={ids.labelId}\n accessibilityRole=\"radiogroup\"\n componentName=\"radio-group\"\n testID={testID}\n {...makeAnalyticsAttribute(rest)}\n >\n {label ? (\n <FormLabel\n as=\"span\"\n necessityIndicator={necessityIndicator}\n position={labelPosition}\n id={ids.labelId}\n accessibilityText={accessibilityText && `,${accessibilityText}`}\n size={size}\n >\n {label}\n </FormLabel>\n ) : null}\n <BaseBox>\n <BaseBox\n display=\"flex\"\n flexDirection={orientation === 'vertical' ? 'column' : 'row'}\n gap={gap}\n flexWrap={flexWrap}\n >\n {React.Children.map(children, (child, index) => {\n return <BaseBox key={index}>{child}</BaseBox>;\n })}\n </BaseBox>\n <FormHint\n size={size}\n type={validationState === 'error' ? 'error' : 'help'}\n errorText={errorText}\n helpText={helpText}\n />\n </BaseBox>\n </SelectorGroupField>\n </BaseBox>\n </RadioGroupProvider>\n );\n};\n\nexport type { RadioGroupProps };\nexport { RadioGroup };\n"],"names":["RadioGroup","_ref","children","label","helpText","_ref$isDisabled","isDisabled","_ref$isRequired","isRequired","_ref$necessityIndicat","necessityIndicator","_ref$labelPosition","labelPosition","_ref$validationState","validationState","errorText","name","defaultValue","onChange","value","_ref$size","size","_ref$orientation","orientation","testID","_ref$flexWrap","flexWrap","rest","_objectWithoutProperties","_excluded","_useRadioGroup","useRadioGroup","contextValue","ids","_useTheme","useTheme","theme","_useBreakpoint","useBreakpoint","breakpoints","matchedDeviceType","showError","showHelpText","accessibilityText","concat","trim","gap","radioSizes","group","_jsx","RadioGroupProvider","BaseBox","_objectSpread","getStyledProps","_jsxs","SelectorGroupField","position","labelledBy","labelId","accessibilityRole","componentName","makeAnalyticsAttribute","FormLabel","as","id","display","flexDirection","React","Children","map","child","index","FormHint","type"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA4GA,IAAMA,UAAU,GAAG,SAAbA,UAAUA,CAAAC,IAAA,EAmB2B;AAAA,EAAA,IAlBzCC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IAAAC,eAAA,GAAAJ,IAAA,CACRK,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,eAAA;IAAAE,eAAA,GAAAN,IAAA,CAClBO,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,eAAA;IAAAE,qBAAA,GAAAR,IAAA,CAClBS,kBAAkB;AAAlBA,I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XoD,YAAAA,IAAI,EAAE3D,eAAe,KAAK,OAAO,GAAG,OAAO,GAAG,MAAO;AACrDC,YAAAA,SAAS,EAAEA,SAAU;AACrBX,YAAAA,QAAQ,EAAEA,QAAAA;AAAS,WACpB,CAAC,CAAA;AAAA,SACK,CAAC,CAAA;OACQ,CAAA,CAAA;KACb,CAAA,CAAA;AAAC,GACQ,CAAC,CAAA;AAEzB;;;;"}
@@ -179,7 +179,9 @@ var TableEditableDropdownCell = function TableEditableDropdownCell(dropdownProps
179
179
  hasPadding: false,
180
180
  children: /*#__PURE__*/jsx(Dropdown, _objectSpread({
181
181
  _width: "calc(100% - 8px)",
182
- margin: "spacing.2"
182
+ margin: getEditableInputMargin({
183
+ rowDensity: rowDensity
184
+ })
183
185
  }, dropdownProps))
184
186
  })
185
187
  })
@@ -1 +1 @@
1
- {"version":3,"file":"TableEditableCell.web.js","sources":["../../../../../../src/components/Table/TableEditableCell.web.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { CellWrapper, StyledCell } from './TableBody';\nimport { useTableContext } from './TableContext';\nimport type { TableEditableCellProps, TableEditableDropdownCellProps, TableProps } from './types';\nimport {\n rowDensityToIsTableInputCellMapping,\n tableEditableCellRowDensityToInputSizeMap,\n validationStateToInputTrailingIconMap,\n} from './tokens';\nimport { ComponentIds } from './componentIds';\nimport { TableEditableCellContext } from './TableEditableCellContext';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\nimport type { MarginProps } from '~components/Box/BaseBox/types/spacingTypes';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Box } from '~components/Box';\nimport { BaseInput } from '~components/Input/BaseInput';\nimport { castWebType } from '~utils';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { Dropdown } from '~components/Dropdown';\n\nconst StyledEditableCell = styled(StyledCell)<{\n $rowDensity: NonNullable<TableProps<unknown>['rowDensity']>;\n}>(({ theme, $rowDensity }) => ({\n '&&&': {\n '&:focus-visible': { outline: '1px solid' },\n '&:focus-within': {\n ...($rowDensity !== 'comfortable' ? getFocusRingStyles({ theme, negativeOffset: true }) : {}),\n },\n },\n}));\n\nconst getEditableInputMargin = ({\n rowDensity,\n}: {\n rowDensity: NonNullable<TableProps<unknown>['rowDensity']>;\n}): MarginProps['margin'] => {\n if (rowDensity === 'comfortable') {\n return ['spacing.4', 'spacing.4'];\n }\n\n return 'spacing.2';\n};\n\nconst _TableEditableCell = ({\n validationState = 'none',\n accessibilityLabel,\n autoCapitalize,\n autoCompleteSuggestionType,\n autoFocus,\n defaultValue,\n isDisabled,\n isRequired,\n keyboardReturnKeyType,\n leadingIcon,\n maxCharacters,\n name,\n onBlur,\n onChange,\n onClick,\n onFocus,\n onSubmit,\n placeholder,\n prefix,\n suffix,\n value,\n testID,\n trailingButton,\n errorText,\n successText,\n}: TableEditableCellProps): React.ReactElement => {\n const { rowDensity, showStripedRows, backgroundColor } = useTableContext();\n\n return (\n <StyledEditableCell\n role=\"cell\"\n $backgroundColor={backgroundColor}\n $rowDensity={rowDensity}\n {...metaAttribute({ name: MetaConstants.TableCell })}\n >\n <BaseBox className=\"cell-wrapper-base\" display=\"flex\" alignItems=\"center\" height=\"100%\">\n <CellWrapper\n className=\"cell-wrapper\"\n $rowDensity={rowDensity}\n showStripedRows={showStripedRows}\n display=\"flex\"\n alignItems=\"center\"\n flex={1}\n hasPadding={false}\n >\n <Box margin={getEditableInputMargin({ rowDensity })} width=\"100%\">\n <BaseInput\n isTableInputCell={rowDensityToIsTableInputCellMapping[rowDensity]}\n validationState={validationState}\n id=\"table-editable-cell-input\"\n type=\"text\"\n size={tableEditableCellRowDensityToInputSizeMap[rowDensity]}\n trailingIcon={validationStateToInputTrailingIconMap[validationState]}\n accessibilityLabel={accessibilityLabel}\n autoCapitalize={autoCapitalize}\n autoCompleteSuggestionType={autoCompleteSuggestionType}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n defaultValue={defaultValue}\n isDisabled={isDisabled}\n isRequired={isRequired}\n keyboardReturnKeyType={keyboardReturnKeyType}\n leadingIcon={leadingIcon}\n maxCharacters={maxCharacters}\n name={name}\n onBlur={onBlur}\n onChange={onChange}\n onClick={onClick}\n onFocus={onFocus}\n onSubmit={castWebType(onSubmit)}\n placeholder={placeholder}\n prefix={prefix}\n suffix={suffix}\n value={value}\n testID={testID}\n trailingButton={trailingButton}\n errorText={errorText}\n successText={successText}\n showHintsAsTooltip={true}\n />\n </Box>\n </CellWrapper>\n </BaseBox>\n </StyledEditableCell>\n );\n};\n\nconst TableEditableDropdownCell = (\n dropdownProps: TableEditableDropdownCellProps,\n): React.ReactElement => {\n const { rowDensity, showStripedRows, backgroundColor } = useTableContext();\n\n return (\n <TableEditableCellContext.Provider value={{ isInsideTableEditableCell: true }}>\n <StyledEditableCell\n role=\"cell\"\n $backgroundColor={backgroundColor}\n $rowDensity={rowDensity}\n {...metaAttribute({ name: MetaConstants.TableCell })}\n >\n <BaseBox\n className=\"cell-wrapper-base\"\n display=\"flex\"\n alignItems=\"center\"\n height=\"100%\"\n width=\"100%\"\n >\n <CellWrapper\n className=\"cell-wrapper\"\n $rowDensity={rowDensity}\n showStripedRows={showStripedRows}\n display=\"flex\"\n alignItems=\"center\"\n flex={1}\n hasPadding={false}\n >\n <Dropdown _width=\"calc(100% - 8px)\" margin=\"spacing.2\" {...dropdownProps} />\n </CellWrapper>\n </BaseBox>\n </StyledEditableCell>\n </TableEditableCellContext.Provider>\n );\n};\n\nconst TableEditableCell = assignWithoutSideEffects(_TableEditableCell, {\n componentId: ComponentIds.TableEditableCell,\n});\n\nexport { TableEditableCell, TableEditableDropdownCell };\n"],"names":["StyledEditableCell","styled","StyledCell","withConfig","displayName","componentId","_ref","theme","$rowDensity","outline","_objectSpread","getFocusRingStyles","negativeOffset","getEditableInputMargin","_ref2","rowDensity","_TableEditableCell","_ref3","_ref3$validationState","validationState","accessibilityLabel","autoCapitalize","autoCompleteSuggestionType","autoFocus","defaultValue","isDisabled","isRequired","keyboardReturnKeyType","leadingIcon","maxCharacters","name","onBlur","onChange","onClick","onFocus","onSubmit","placeholder","prefix","suffix","value","testID","trailingButton","errorText","successText","_useTableContext","useTableContext","showStripedRows","backgroundColor","_jsx","role","$backgroundColor","metaAttribute","MetaConstants","TableCell","children","BaseBox","className","display","alignItems","height","CellWrapper","flex","hasPadding","Box","margin","width","BaseInput","isTableInputCell","rowDensityToIsTableInputCellMapping","id","type","size","tableEditableCellRowDensityToInputSizeMap","trailingIcon","validationStateToInputTrailingIconMap","castWebType","showHintsAsTooltip","TableEditableDropdownCell","dropdownProps","_useTableContext2","TableEditableCellContext","Provider","isInsideTableEditableCell","Dropdown","_width","TableEditableCell","assignWithoutSideEffects","ComponentIds"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,IAAMA,kBAAkB,gBAAGC,MAAM,CAACC,UAAU,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,0CAAA;EAAAC,WAAA,EAAA,UAAA;AAAA,CAAA,CAAA,CAE1C,UAAAC,IAAA,EAAA;AAAA,EAAA,IAAGC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,WAAW,GAAAF,IAAA,CAAXE,WAAW,CAAA;EAAA,OAAQ;AAC9B,IAAA,KAAK,EAAE;AACL,MAAA,iBAAiB,EAAE;AAAEC,QAAAA,OAAO,EAAE,WAAA;OAAa;MAC3C,gBAAgB,EAAAC,aAAA,CACVF,EAAAA,EAAAA,WAAW,KAAK,aAAa,GAAGG,kBAAkB,CAAC;AAAEJ,QAAAA,KAAK,EAALA,KAAK;AAAEK,QAAAA,cAAc,EAAE,IAAA;OAAM,CAAC,GAAG,EAAE,CAAA;AAEhG,KAAA;GACD,CAAA;AAAA,CAAC,CAAC,CAAA;AAEH,IAAMC,sBAAsB,GAAG,SAAzBA,sBAAsBA,CAAAC,KAAA,EAIC;AAAA,EAAA,IAH3BC,UAAU,GAAAD,KAAA,CAAVC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AAAA,QAAA,eAElBN,GAAA,CAACmC,QAAQ,EAAAzE,aAAA,CAAA;AAAC0E,YAAAA,MAAM,EAAC,kBAAkB;AAACpB,YAAAA,MAAM,EAAC,WAAA;AAAW,WAAA,EAAKc,aAAa,CAAG,CAAA;SAChE,CAAA;OACN,CAAA;KACS,CAAA,CAAA;AAAC,GACY,CAAC,CAAA;AAExC,EAAC;AAED,IAAMO,iBAAiB,gBAAGC,wBAAwB,CAACtE,kBAAkB,EAAE;EACrEX,WAAW,EAAEkF,YAAY,CAACF,iBAAAA;AAC5B,CAAC;;;;"}
1
+ {"version":3,"file":"TableEditableCell.web.js","sources":["../../../../../../src/components/Table/TableEditableCell.web.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { CellWrapper, StyledCell } from './TableBody';\nimport { useTableContext } from './TableContext';\nimport type { TableEditableCellProps, TableEditableDropdownCellProps, TableProps } from './types';\nimport {\n rowDensityToIsTableInputCellMapping,\n tableEditableCellRowDensityToInputSizeMap,\n validationStateToInputTrailingIconMap,\n} from './tokens';\nimport { ComponentIds } from './componentIds';\nimport { TableEditableCellContext } from './TableEditableCellContext';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\nimport type { MarginProps } from '~components/Box/BaseBox/types/spacingTypes';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Box } from '~components/Box';\nimport { BaseInput } from '~components/Input/BaseInput';\nimport { castWebType } from '~utils';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { Dropdown } from '~components/Dropdown';\n\nconst StyledEditableCell = styled(StyledCell)<{\n $rowDensity: NonNullable<TableProps<unknown>['rowDensity']>;\n}>(({ theme, $rowDensity }) => ({\n '&&&': {\n '&:focus-visible': { outline: '1px solid' },\n '&:focus-within': {\n ...($rowDensity !== 'comfortable' ? getFocusRingStyles({ theme, negativeOffset: true }) : {}),\n },\n },\n}));\n\nconst getEditableInputMargin = ({\n rowDensity,\n}: {\n rowDensity: NonNullable<TableProps<unknown>['rowDensity']>;\n}): MarginProps['margin'] => {\n if (rowDensity === 'comfortable') {\n return ['spacing.4', 'spacing.4'];\n }\n\n return 'spacing.2';\n};\n\nconst _TableEditableCell = ({\n validationState = 'none',\n accessibilityLabel,\n autoCapitalize,\n autoCompleteSuggestionType,\n autoFocus,\n defaultValue,\n isDisabled,\n isRequired,\n keyboardReturnKeyType,\n leadingIcon,\n maxCharacters,\n name,\n onBlur,\n onChange,\n onClick,\n onFocus,\n onSubmit,\n placeholder,\n prefix,\n suffix,\n value,\n testID,\n trailingButton,\n errorText,\n successText,\n}: TableEditableCellProps): React.ReactElement => {\n const { rowDensity, showStripedRows, backgroundColor } = useTableContext();\n\n return (\n <StyledEditableCell\n role=\"cell\"\n $backgroundColor={backgroundColor}\n $rowDensity={rowDensity}\n {...metaAttribute({ name: MetaConstants.TableCell })}\n >\n <BaseBox className=\"cell-wrapper-base\" display=\"flex\" alignItems=\"center\" height=\"100%\">\n <CellWrapper\n className=\"cell-wrapper\"\n $rowDensity={rowDensity}\n showStripedRows={showStripedRows}\n display=\"flex\"\n alignItems=\"center\"\n flex={1}\n hasPadding={false}\n >\n <Box margin={getEditableInputMargin({ rowDensity })} width=\"100%\">\n <BaseInput\n isTableInputCell={rowDensityToIsTableInputCellMapping[rowDensity]}\n validationState={validationState}\n id=\"table-editable-cell-input\"\n type=\"text\"\n size={tableEditableCellRowDensityToInputSizeMap[rowDensity]}\n trailingIcon={validationStateToInputTrailingIconMap[validationState]}\n accessibilityLabel={accessibilityLabel}\n autoCapitalize={autoCapitalize}\n autoCompleteSuggestionType={autoCompleteSuggestionType}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n defaultValue={defaultValue}\n isDisabled={isDisabled}\n isRequired={isRequired}\n keyboardReturnKeyType={keyboardReturnKeyType}\n leadingIcon={leadingIcon}\n maxCharacters={maxCharacters}\n name={name}\n onBlur={onBlur}\n onChange={onChange}\n onClick={onClick}\n onFocus={onFocus}\n onSubmit={castWebType(onSubmit)}\n placeholder={placeholder}\n prefix={prefix}\n suffix={suffix}\n value={value}\n testID={testID}\n trailingButton={trailingButton}\n errorText={errorText}\n successText={successText}\n showHintsAsTooltip={true}\n />\n </Box>\n </CellWrapper>\n </BaseBox>\n </StyledEditableCell>\n );\n};\n\nconst TableEditableDropdownCell = (\n dropdownProps: TableEditableDropdownCellProps,\n): React.ReactElement => {\n const { rowDensity, showStripedRows, backgroundColor } = useTableContext();\n\n return (\n <TableEditableCellContext.Provider value={{ isInsideTableEditableCell: true }}>\n <StyledEditableCell\n role=\"cell\"\n $backgroundColor={backgroundColor}\n $rowDensity={rowDensity}\n {...metaAttribute({ name: MetaConstants.TableCell })}\n >\n <BaseBox\n className=\"cell-wrapper-base\"\n display=\"flex\"\n alignItems=\"center\"\n height=\"100%\"\n width=\"100%\"\n >\n <CellWrapper\n className=\"cell-wrapper\"\n $rowDensity={rowDensity}\n showStripedRows={showStripedRows}\n display=\"flex\"\n alignItems=\"center\"\n flex={1}\n hasPadding={false}\n >\n <Dropdown\n _width=\"calc(100% - 8px)\"\n margin={getEditableInputMargin({ rowDensity })}\n {...dropdownProps}\n />\n </CellWrapper>\n </BaseBox>\n </StyledEditableCell>\n </TableEditableCellContext.Provider>\n );\n};\n\nconst TableEditableCell = assignWithoutSideEffects(_TableEditableCell, {\n componentId: ComponentIds.TableEditableCell,\n});\n\nexport { TableEditableCell, TableEditableDropdownCell };\n"],"names":["StyledEditableCell","styled","StyledCell","withConfig","displayName","componentId","_ref","theme","$rowDensity","outline","_objectSpread","getFocusRingStyles","negativeOffset","getEditableInputMargin","_ref2","rowDensity","_TableEditableCell","_ref3","_ref3$validationState","validationState","accessibilityLabel","autoCapitalize","autoCompleteSuggestionType","autoFocus","defaultValue","isDisabled","isRequired","keyboardReturnKeyType","leadingIcon","maxCharacters","name","onBlur","onChange","onClick","onFocus","onSubmit","placeholder","prefix","suffix","value","testID","trailingButton","errorText","successText","_useTableContext","useTableContext","showStripedRows","backgroundColor","_jsx","role","$backgroundColor","metaAttribute","MetaConstants","TableCell","children","BaseBox","className","display","alignItems","height","CellWrapper","flex","hasPadding","Box","margin","width","BaseInput","isTableInputCell","rowDensityToIsTableInputCellMapping","id","type","size","tableEditableCellRowDensityToInputSizeMap","trailingIcon","validationStateToInputTrailingIconMap","castWebType","showHintsAsTooltip","TableEditableDropdownCell","dropdownProps","_useTableContext2","TableEditableCellContext","Provider","isInsideTableEditableCell","Dropdown","_width","TableEditableCell","assignWithoutSideEffects","ComponentIds"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,IAAMA,kBAAkB,gBAAGC,MAAM,CAACC,UAAU,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,0CAAA;EAAAC,WAAA,EAAA,UAAA;AAAA,CAAA,CAAA,CAE1C,UAAAC,IAAA,EAAA;AAAA,EAAA,IAAGC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,WAAW,GAAAF,IAAA,CAAXE,WAAW,CAAA;EAAA,OAAQ;AAC9B,IAAA,KAAK,EAAE;AACL,MAAA,iBAAiB,EAAE;AAAEC,QAAAA,OAAO,EAAE,WAAA;OAAa;MAC3C,gBAAgB,EAAAC,aAAA,CACVF,EAAAA,EAAAA,WAAW,KAAK,aAAa,GAAGG,kBAAkB,CAAC;AAAEJ,QAAAA,KAAK,EAALA,KAAK;AAAEK,QAAAA,cAAc,EAAE,IAAA;OAAM,CAAC,GAAG,EAAE,CAAA;AAEhG,KAAA;GACD,CAAA;AAAA,CAAC,CAAC,CAAA;AAEH,IAAMC,sBAAsB,GAAG,SAAzBA,sBAAsBA,CAAAC,KAAA,EAIC;AAAA,EAAA,IAH3BC,UAAU,GAAAD,KAAA,CAAVC,UAAU,CAAA;EAIV,IAAIA,UAAU,KAAK,aAAa,EAAE;AAChC,IAAA,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;AACnC,GAAA;AAEA,EAAA,OAA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AAAEE,cAAAA,UAAU,EAAVA,UAAAA;aAAY,CAAA;AAAE,WAAA,EAC3C+D,aAAa,CAClB,CAAA;SACU,CAAA;OACN,CAAA;KACS,CAAA,CAAA;AAAC,GACY,CAAC,CAAA;AAExC,EAAC;AAED,IAAMO,iBAAiB,gBAAGC,wBAAwB,CAACtE,kBAAkB,EAAE;EACrEX,WAAW,EAAEkF,YAAY,CAACF,iBAAAA;AAC5B,CAAC;;;;"}
@@ -19,7 +19,7 @@ import { getFloatingPlacementParts } from '../../utils/getFloatingPlacementParts
19
19
  import { componentZIndices } from '../../utils/componentZIndices.js';
20
20
  import '../../utils/makeAnalyticsAttribute/index.js';
21
21
  import '../../utils/assignWithoutSideEffects/index.js';
22
- import { mergeRefs } from '../../utils/useMergeRefs.js';
22
+ import { useMergeRefs } from '../../utils/useMergeRefs.js';
23
23
  import { jsxs, jsx } from 'react/jsx-runtime';
24
24
  import useTheme from '../BladeProvider/useTheme.js';
25
25
  import { size } from '../../tokens/global/size.js';
@@ -112,7 +112,7 @@ var _Tooltip = function _Tooltip(_ref) {
112
112
  value: true,
113
113
  children: [/*#__PURE__*/React__default.cloneElement(children, _objectSpread(_objectSpread({
114
114
  // @ts-expect-error: ref does exist on children prop
115
- ref: mergeRefs(refs.setReference, children.ref)
115
+ ref: useMergeRefs(refs.setReference, children.ref)
116
116
  }, makeAccessible({
117
117
  label: content
118
118
  })), mergeProps(children.props, getReferenceProps()))), isMounted && /*#__PURE__*/jsx(FloatingPortal, {
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.web.js","sources":["../../../../../../src/components/Tooltip/Tooltip.web.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/restrict-plus-operands */\nimport {\n shift,\n FloatingPortal,\n arrow,\n flip,\n offset,\n useDelayGroup,\n useDelayGroupContext,\n useFloating,\n useFocus,\n useHover,\n useInteractions,\n useRole,\n useTransitionStyles,\n autoUpdate,\n} from '@floating-ui/react';\nimport React from 'react';\nimport type { TooltipProps } from './types';\nimport { TooltipContent } from './TooltipContent';\nimport { ARROW_HEIGHT, ARROW_WIDTH } from './constants';\nimport { TooltipContext } from './TooltipContext';\nimport { componentIds } from './componentIds';\nimport { useTheme } from '~components/BladeProvider';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { size } from '~tokens/global';\nimport { useId } from '~utils/useId';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { mergeProps } from '~utils/mergeProps';\nimport { PopupArrow } from '~components/PopupArrow';\nimport { getFloatingPlacementParts } from '~utils/getFloatingPlacementParts';\nimport { componentZIndices } from '~utils/componentZIndices';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { mergeRefs } from '~utils/useMergeRefs';\n\nconst _Tooltip = ({\n title,\n content,\n children,\n placement = 'top',\n onOpenChange,\n zIndex = componentZIndices.tooltip,\n ...rest\n}: TooltipProps): React.ReactElement => {\n const { theme } = useTheme();\n const id = useId();\n const [isOpen, setIsOpen] = React.useState(false);\n const arrowRef = React.useRef<SVGSVGElement>(null);\n\n const GAP = theme.spacing[2];\n const [side] = getFloatingPlacementParts(placement);\n const isHorizontal = side === 'left' || side === 'right';\n const isOppositeAxis = side === 'right' || side === 'bottom';\n\n const { refs, floatingStyles, context } = useFloating({\n placement,\n open: isOpen,\n strategy: 'fixed',\n onOpenChange: (open) => {\n setIsOpen(open);\n onOpenChange?.({ isOpen: open });\n },\n middleware: [\n shift({ crossAxis: false, padding: GAP }),\n flip({ padding: GAP }),\n offset(GAP + ARROW_HEIGHT),\n arrow({\n element: arrowRef,\n padding: isHorizontal ? 0 : ARROW_WIDTH,\n }),\n ],\n whileElementsMounted: autoUpdate,\n });\n\n const animationOffset = isOppositeAxis ? -size[4] : size[4];\n const { isMounted, styles } = useTransitionStyles(context, {\n duration: theme.motion.duration.quick,\n initial: {\n opacity: 0,\n transform: `translate${isHorizontal ? 'X' : 'Y'}(${animationOffset}px)`,\n },\n });\n\n useDelayGroup(context, { id });\n const { delay } = useDelayGroupContext();\n const hover = useHover(context, {\n delay,\n move: false,\n });\n const focus = useFocus(context);\n const role = useRole(context, { role: 'tooltip' });\n const { getReferenceProps, getFloatingProps } = useInteractions([role, hover, focus]);\n\n return (\n <TooltipContext.Provider value={true}>\n {React.cloneElement(children, {\n // @ts-expect-error: ref does exist on children prop\n ref: mergeRefs(refs.setReference, children.ref),\n ...makeAccessible({ label: content }),\n ...mergeProps(children.props, getReferenceProps()),\n })}\n {isMounted && (\n <FloatingPortal>\n <BaseBox\n ref={refs.setFloating}\n style={floatingStyles}\n pointerEvents=\"none\"\n zIndex={zIndex}\n {...getFloatingProps()}\n {...metaAttribute({ name: MetaConstants.Tooltip })}\n {...makeAnalyticsAttribute(rest)}\n >\n <TooltipContent\n title={title}\n style={styles}\n arrow={\n <PopupArrow\n ref={arrowRef}\n context={context}\n width={ARROW_WIDTH}\n height={ARROW_HEIGHT}\n fillColor={theme.colors.popup.background.intense}\n strokeColor={theme.colors.popup.border.intense}\n />\n }\n >\n {content}\n </TooltipContent>\n </BaseBox>\n </FloatingPortal>\n )}\n </TooltipContext.Provider>\n );\n};\n\nconst Tooltip = assignWithoutSideEffects(_Tooltip, {\n componentId: componentIds.Tooltip,\n});\n\nexport { Tooltip };\n"],"names":["_Tooltip","_ref","title","content","children","_ref$placement","placement","onOpenChange","_ref$zIndex","zIndex","componentZIndices","tooltip","rest","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","id","useId","_React$useState","React","useState","_React$useState2","_slicedToArray","isOpen","setIsOpen","arrowRef","useRef","GAP","spacing","_getFloatingPlacement","getFloatingPlacementParts","_getFloatingPlacement2","side","isHorizontal","isOppositeAxis","_useFloating","useFloating","open","strategy","middleware","shift","crossAxis","padding","flip","offset","ARROW_HEIGHT","arrow","element","ARROW_WIDTH","whileElementsMounted","autoUpdate","refs","floatingStyles","context","animationOffset","size","_useTransitionStyles","useTransitionStyles","duration","motion","quick","initial","opacity","transform","concat","isMounted","styles","useDelayGroup","_useDelayGroupContext","useDelayGroupContext","delay","hover","useHover","move","focus","useFocus","role","useRole","_useInteractions","useInteractions","getReferenceProps","getFloatingProps","_jsxs","TooltipContext","Provider","value","cloneElement","_objectSpread","ref","mergeRefs","setReference","makeAccessible","label","mergeProps","props","_jsx","FloatingPortal","BaseBox","setFloating","style","pointerEvents","metaAttribute","name","MetaConstants","Tooltip","makeAnalyticsAttribute","TooltipContent","PopupArrow","width","height","fillColor","colors","popup","background","intense","strokeColor","border","assignWithoutSideEffects","componentId","componentIds"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,IAAMA,QAAQ,GAAG,SAAXA,QAAQA,CAAAC,IAAA,EAQ0B;AAAA,EAAA,IAPtCC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,OAAO,GAAAF,IAAA,CAAPE,OAAO;IACPC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IAAAC,cAAA,GAAAJ,IAAA,CACRK,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,cAAA;IACjBE,aAAY,GAAAN,IAAA,CAAZM,YAAY;IAAAC,WAAA,GAAAP,IAAA,CACZQ,MAAM;AAANA,IAAAA,MAAM,GAAAD,WAAA,KAAA,KAAA,CAAA,GAAGE,iBAAiB,CAACC,OAAO,GAAAH,WAAA;AAC/BI,IAAAA,IAAI,GAAAC,wBAAA,CAAAZ,IAAA,EAAAa,SAAA,CAAA,CAAA;AAEP,EAAA,IAAAC,SAAA,GAAkBC,QAAQ,EAAE;IAApBC,KAAK,GAAAF,SAAA,CAALE,KAAK,CAAA;AACb,EAAA,IAAMC,EAAE,GAAGC,KAAK,EAAE,CAAA;AAClB,EAAA,IAAAC,eAAA,GAA4BC,cAAK,CAACC,QAAQ,CAAC,KAAK,CAAC;IAAAC,gBAAA,GAAAC,cAAA,CAAAJ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EAAEC,aAAa,CAACC,OAAAA;AAAQ,OAAC,CAAC,CAAA,EAC9CC,sBAAsB,CAAC/F,IAAI,CAAC,CAAA,EAAA,EAAA,EAAA;QAAAR,QAAA,eAEhC6F,GAAA,CAACW,cAAc,EAAA;AACb1G,UAAAA,KAAK,EAAEA,KAAM;AACbmG,UAAAA,KAAK,EAAEjC,MAAO;UACdpB,KAAK,eACHiD,GAAA,CAACY,UAAU,EAAA;AACTnB,YAAAA,GAAG,EAAE/D,QAAS;AACd4B,YAAAA,OAAO,EAAEA,OAAQ;AACjBuD,YAAAA,KAAK,EAAE5D,WAAY;AACnB6D,YAAAA,MAAM,EAAEhE,YAAa;YACrBiE,SAAS,EAAE/F,KAAK,CAACgG,MAAM,CAACC,KAAK,CAACC,UAAU,CAACC,OAAQ;YACjDC,WAAW,EAAEpG,KAAK,CAACgG,MAAM,CAACC,KAAK,CAACI,MAAM,CAACF,OAAAA;AAAQ,WAChD,CACF;AAAAhH,UAAAA,QAAA,EAEAD,OAAAA;SACa,CAAA;OACT,CAAA,CAAA;AAAC,KACI,CACjB,CAAA;AAAA,GACsB,CAAC,CAAA;AAE9B,CAAC,CAAA;AAED,IAAMuG,OAAO,gBAAGa,wBAAwB,CAACvH,QAAQ,EAAE;EACjDwH,WAAW,EAAEC,YAAY,CAACf,OAAAA;AAC5B,CAAC;;;;"}
1
+ {"version":3,"file":"Tooltip.web.js","sources":["../../../../../../src/components/Tooltip/Tooltip.web.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/restrict-plus-operands */\nimport {\n shift,\n FloatingPortal,\n arrow,\n flip,\n offset,\n useDelayGroup,\n useDelayGroupContext,\n useFloating,\n useFocus,\n useHover,\n useInteractions,\n useRole,\n useTransitionStyles,\n autoUpdate,\n} from '@floating-ui/react';\nimport React from 'react';\nimport type { TooltipProps } from './types';\nimport { TooltipContent } from './TooltipContent';\nimport { ARROW_HEIGHT, ARROW_WIDTH } from './constants';\nimport { TooltipContext } from './TooltipContext';\nimport { componentIds } from './componentIds';\nimport { useTheme } from '~components/BladeProvider';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { size } from '~tokens/global';\nimport { useId } from '~utils/useId';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { mergeProps } from '~utils/mergeProps';\nimport { PopupArrow } from '~components/PopupArrow';\nimport { getFloatingPlacementParts } from '~utils/getFloatingPlacementParts';\nimport { componentZIndices } from '~utils/componentZIndices';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { useMergeRefs } from '~utils/useMergeRefs';\n\nconst _Tooltip = ({\n title,\n content,\n children,\n placement = 'top',\n onOpenChange,\n zIndex = componentZIndices.tooltip,\n ...rest\n}: TooltipProps): React.ReactElement => {\n const { theme } = useTheme();\n const id = useId();\n const [isOpen, setIsOpen] = React.useState(false);\n const arrowRef = React.useRef<SVGSVGElement>(null);\n\n const GAP = theme.spacing[2];\n const [side] = getFloatingPlacementParts(placement);\n const isHorizontal = side === 'left' || side === 'right';\n const isOppositeAxis = side === 'right' || side === 'bottom';\n\n const { refs, floatingStyles, context } = useFloating({\n placement,\n open: isOpen,\n strategy: 'fixed',\n onOpenChange: (open) => {\n setIsOpen(open);\n onOpenChange?.({ isOpen: open });\n },\n middleware: [\n shift({ crossAxis: false, padding: GAP }),\n flip({ padding: GAP }),\n offset(GAP + ARROW_HEIGHT),\n arrow({\n element: arrowRef,\n padding: isHorizontal ? 0 : ARROW_WIDTH,\n }),\n ],\n whileElementsMounted: autoUpdate,\n });\n\n const animationOffset = isOppositeAxis ? -size[4] : size[4];\n const { isMounted, styles } = useTransitionStyles(context, {\n duration: theme.motion.duration.quick,\n initial: {\n opacity: 0,\n transform: `translate${isHorizontal ? 'X' : 'Y'}(${animationOffset}px)`,\n },\n });\n\n useDelayGroup(context, { id });\n const { delay } = useDelayGroupContext();\n const hover = useHover(context, {\n delay,\n move: false,\n });\n const focus = useFocus(context);\n const role = useRole(context, { role: 'tooltip' });\n const { getReferenceProps, getFloatingProps } = useInteractions([role, hover, focus]);\n\n return (\n <TooltipContext.Provider value={true}>\n {React.cloneElement(children, {\n // @ts-expect-error: ref does exist on children prop\n ref: useMergeRefs(refs.setReference, children.ref),\n ...makeAccessible({ label: content }),\n ...mergeProps(children.props, getReferenceProps()),\n })}\n {isMounted && (\n <FloatingPortal>\n <BaseBox\n ref={refs.setFloating}\n style={floatingStyles}\n pointerEvents=\"none\"\n zIndex={zIndex}\n {...getFloatingProps()}\n {...metaAttribute({ name: MetaConstants.Tooltip })}\n {...makeAnalyticsAttribute(rest)}\n >\n <TooltipContent\n title={title}\n style={styles}\n arrow={\n <PopupArrow\n ref={arrowRef}\n context={context}\n width={ARROW_WIDTH}\n height={ARROW_HEIGHT}\n fillColor={theme.colors.popup.background.intense}\n strokeColor={theme.colors.popup.border.intense}\n />\n }\n >\n {content}\n </TooltipContent>\n </BaseBox>\n </FloatingPortal>\n )}\n </TooltipContext.Provider>\n );\n};\n\nconst Tooltip = assignWithoutSideEffects(_Tooltip, {\n componentId: componentIds.Tooltip,\n});\n\nexport { Tooltip };\n"],"names":["_Tooltip","_ref","title","content","children","_ref$placement","placement","onOpenChange","_ref$zIndex","zIndex","componentZIndices","tooltip","rest","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","id","useId","_React$useState","React","useState","_React$useState2","_slicedToArray","isOpen","setIsOpen","arrowRef","useRef","GAP","spacing","_getFloatingPlacement","getFloatingPlacementParts","_getFloatingPlacement2","side","isHorizontal","isOppositeAxis","_useFloating","useFloating","open","strategy","middleware","shift","crossAxis","padding","flip","offset","ARROW_HEIGHT","arrow","element","ARROW_WIDTH","whileElementsMounted","autoUpdate","refs","floatingStyles","context","animationOffset","size","_useTransitionStyles","useTransitionStyles","duration","motion","quick","initial","opacity","transform","concat","isMounted","styles","useDelayGroup","_useDelayGroupContext","useDelayGroupContext","delay","hover","useHover","move","focus","useFocus","role","useRole","_useInteractions","useInteractions","getReferenceProps","getFloatingProps","_jsxs","TooltipContext","Provider","value","cloneElement","_objectSpread","ref","useMergeRefs","setReference","makeAccessible","label","mergeProps","props","_jsx","FloatingPortal","BaseBox","setFloating","style","pointerEvents","metaAttribute","name","MetaConstants","Tooltip","makeAnalyticsAttribute","TooltipContent","PopupArrow","width","height","fillColor","colors","popup","background","intense","strokeColor","border","assignWithoutSideEffects","componentId","componentIds"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,IAAMA,QAAQ,GAAG,SAAXA,QAAQA,CAAAC,IAAA,EAQ0B;AAAA,EAAA,IAPtCC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,OAAO,GAAAF,IAAA,CAAPE,OAAO;IACPC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IAAAC,cAAA,GAAAJ,IAAA,CACRK,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,cAAA;IACjBE,aAAY,GAAAN,IAAA,CAAZM,YAAY;IAAAC,WAAA,GAAAP,IAAA,CACZQ,MAAM;AAANA,IAAAA,MAAM,GAAAD,WAAA,KAAA,KAAA,CAAA,GAAGE,iBAAiB,CAACC,OAAO,GAAAH,WAAA;AAC/BI,IAAAA,IAAI,GAAAC,wBAAA,CAAAZ,IAAA,EAAAa,SAAA,CAAA,CAAA;AAEP,EAAA,IAAAC,SAAA,GAAkBC,QAAQ,EAAE;IAApBC,KAAK,GAAAF,SAAA,CAALE,KAAK,CAAA;AACb,EAAA,IAAMC,EAAE,GAAGC,KAAK,EAAE,CAAA;AAClB,EAAA,IAAAC,eAAA,GAA4BC,cAAK,CAACC,QAAQ,CAAC,KAAK,CAAC;IAAAC,gBAAA,GAAAC,cAAA,CAAAJ,eAAA,EAAA,CAAA,CAAA;AAA1CK,IAAAA,MAAM,GAAAF,gBAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,S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AAA,EAAA,EAAA;QAAAR,QAAA,eAEhC6F,GAAA,CAACW,cAAc,EAAA;AACb1G,UAAAA,KAAK,EAAEA,KAAM;AACbmG,UAAAA,KAAK,EAAEjC,MAAO;UACdpB,KAAK,eACHiD,GAAA,CAACY,UAAU,EAAA;AACTnB,YAAAA,GAAG,EAAE/D,QAAS;AACd4B,YAAAA,OAAO,EAAEA,OAAQ;AACjBuD,YAAAA,KAAK,EAAE5D,WAAY;AACnB6D,YAAAA,MAAM,EAAEhE,YAAa;YACrBiE,SAAS,EAAE/F,KAAK,CAACgG,MAAM,CAACC,KAAK,CAACC,UAAU,CAACC,OAAQ;YACjDC,WAAW,EAAEpG,KAAK,CAACgG,MAAM,CAACC,KAAK,CAACI,MAAM,CAACF,OAAAA;AAAQ,WAChD,CACF;AAAAhH,UAAAA,QAAA,EAEAD,OAAAA;SACa,CAAA;OACT,CAAA,CAAA;AAAC,KACI,CACjB,CAAA;AAAA,GACsB,CAAC,CAAA;AAE9B,CAAC,CAAA;AAED,IAAMuG,OAAO,gBAAGa,wBAAwB,CAACvH,QAAQ,EAAE;EACjDwH,WAAW,EAAEC,YAAY,CAACf,OAAAA;AAC5B,CAAC;;;;"}
@@ -14,8 +14,8 @@ import { getStyledProps } from '../../Box/styledProps/getStyledProps.js';
14
14
  import { makeAccessible } from '../../../utils/makeAccessible/makeAccessible.web.js';
15
15
  import { metaAttribute } from '../../../utils/metaAttribute/metaAttribute.web.js';
16
16
 
17
- var _excluded = ["color", "fontFamily", "fontSize", "fontWeight", "fontStyle", "textDecorationLine", "numberOfLines", "lineHeight", "letterSpacing", "textAlign", "wordBreak", "opacity"],
18
- _excluded2 = ["id", "color", "fontFamily", "fontSize", "fontWeight", "fontStyle", "textDecorationLine", "lineHeight", "letterSpacing", "as", "textAlign", "children", "truncateAfterLines", "wordBreak", "opacity", "className", "style", "accessibilityProps", "componentName", "testID"];
17
+ var _excluded = ["color", "fontFamily", "fontSize", "fontWeight", "fontStyle", "textDecorationLine", "numberOfLines", "lineHeight", "letterSpacing", "textAlign", "wordBreak", "opacity", "textTransform"],
18
+ _excluded2 = ["id", "color", "fontFamily", "fontSize", "fontWeight", "fontStyle", "textDecorationLine", "lineHeight", "letterSpacing", "as", "textAlign", "children", "truncateAfterLines", "wordBreak", "opacity", "className", "textTransform", "style", "accessibilityProps", "componentName", "testID"];
19
19
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
20
20
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
21
21
  var StyledBaseText = /*#__PURE__*/styled.div.withConfig({
@@ -34,6 +34,7 @@ var StyledBaseText = /*#__PURE__*/styled.div.withConfig({
34
34
  textAlign = _ref.textAlign,
35
35
  wordBreak = _ref.wordBreak,
36
36
  opacity = _ref.opacity,
37
+ textTransform = _ref.textTransform,
37
38
  props = _objectWithoutProperties(_ref, _excluded);
38
39
  var styledPropsCSSObject = useStyledProps(props);
39
40
  return _objectSpread(_objectSpread({}, getBaseTextStyles({
@@ -49,6 +50,7 @@ var StyledBaseText = /*#__PURE__*/styled.div.withConfig({
49
50
  textAlign: textAlign,
50
51
  wordBreak: wordBreak,
51
52
  opacity: opacity,
53
+ textTransform: textTransform,
52
54
  theme: props.theme
53
55
  })), styledPropsCSSObject);
54
56
  });
@@ -69,6 +71,7 @@ var _BaseText = function _BaseText(_ref2, ref) {
69
71
  wordBreak = _ref2.wordBreak,
70
72
  opacity = _ref2.opacity,
71
73
  className = _ref2.className,
74
+ textTransform = _ref2.textTransform,
72
75
  style = _ref2.style,
73
76
  _ref2$accessibilityPr = _ref2.accessibilityProps,
74
77
  accessibilityProps = _ref2$accessibilityPr === void 0 ? {} : _ref2$accessibilityPr,
@@ -94,7 +97,8 @@ var _BaseText = function _BaseText(_ref2, ref) {
94
97
  opacity: opacity,
95
98
  className: className,
96
99
  style: style,
97
- id: id
100
+ id: id,
101
+ textTransform: textTransform
98
102
  }, makeAccessible(accessibilityProps)), metaAttribute({
99
103
  name: componentName,
100
104
  testID: testID
@@ -1 +1 @@
1
- {"version":3,"file":"BaseText.web.js","sources":["../../../../../../../src/components/Typography/BaseText/BaseText.web.tsx"],"sourcesContent":["import React from 'react';\nimport type { ReactElement } from 'react';\nimport styled from 'styled-components';\nimport getBaseTextStyles from './getBaseTextStyles';\nimport type { BaseTextProps, StyledBaseTextProps } from './types';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps, useStyledProps } from '~components/Box/styledProps';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { omitPropsFromHTML } from '~utils/omitPropsFromHTML';\nimport type { BladeElementRef } from '~utils/types';\n\nconst StyledBaseText = styled.div.withConfig({\n shouldForwardProp: omitPropsFromHTML,\n displayName: 'StyledBaseText',\n})<StyledBaseTextProps>(\n ({\n color,\n fontFamily,\n fontSize,\n fontWeight,\n fontStyle,\n textDecorationLine,\n numberOfLines,\n lineHeight,\n letterSpacing,\n textAlign,\n wordBreak,\n opacity,\n ...props\n }) => {\n const styledPropsCSSObject = useStyledProps(props);\n return {\n ...getBaseTextStyles({\n color,\n fontFamily,\n fontSize,\n fontWeight,\n fontStyle,\n textDecorationLine,\n numberOfLines,\n lineHeight,\n letterSpacing,\n textAlign,\n wordBreak,\n opacity,\n theme: props.theme,\n }),\n ...styledPropsCSSObject,\n };\n },\n);\n\nconst _BaseText: React.ForwardRefRenderFunction<BladeElementRef, BaseTextProps> = (\n {\n id,\n color,\n fontFamily,\n fontSize,\n fontWeight,\n fontStyle,\n textDecorationLine,\n lineHeight,\n letterSpacing,\n as,\n textAlign,\n children,\n truncateAfterLines,\n wordBreak,\n opacity,\n className,\n style,\n accessibilityProps = {},\n componentName = MetaConstants.BaseText,\n testID,\n ...styledProps\n },\n ref,\n): ReactElement => {\n return (\n <StyledBaseText\n ref={ref as never}\n {...getStyledProps(styledProps)}\n color={color}\n fontFamily={fontFamily}\n fontSize={fontSize}\n fontWeight={fontWeight}\n fontStyle={fontStyle}\n textDecorationLine={textDecorationLine}\n lineHeight={lineHeight}\n letterSpacing={letterSpacing}\n as={as}\n textAlign={textAlign}\n numberOfLines={truncateAfterLines}\n wordBreak={wordBreak}\n opacity={opacity}\n className={className}\n style={style}\n id={id}\n {...makeAccessible(accessibilityProps)}\n {...metaAttribute({ name: componentName, testID })}\n >\n {children}\n </StyledBaseText>\n );\n};\n\nconst BaseText = React.forwardRef(_BaseText);\nexport { BaseText };\n"],"names":["StyledBaseText","styled","div","withConfig","shouldForwardProp","omitPropsFromHTML","displayName","_ref","color","fontFamily","fontSize","fontWeight","fontStyle","textDecorationLine","numberOfLines","lineHeight","letterSpacing","textAlign","wordBreak","opacity","props","_objectWithoutProperties","_excluded","styledPropsCSSObject","useStyledProps","_objectSpread","getBaseTextStyles","theme","_BaseText","_ref2","ref","id","as","children","truncateAfterLines","className","style","_ref2$accessibilityPr","accessibilityProps","_ref2$componentName","componentName","MetaConstants","BaseText","testID","styledProps","_excluded2","_jsx","getStyledProps","makeAccessible","metaAttribute","name","React","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;AAWA,IAAMA,cAAc,gBAAGC,MAAM,CAACC,GAAG,CAACC,UAAU,CAAC;AAC3CC,EAAAA,iBAAiB,EAAEC,iBAAiB;AACpCC,EAAAA,WAAW,EAAE,gBAAA;AACf,CAAC,CAAC,CACA,UAAAC,IAAA,EAcM;AAAA,EAAA,IAbJC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,UAAU,GAAAF,IAAA,CAAVE,U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KAAK,EAAEA,KAAM;AACbC,IAAAA,UAAU,EAAEA,UAAW;AACvBC,IAAAA,QAAQ,EAAEA,QAAS;AACnBC,IAAAA,UAAU,EAAEA,UAAW;AACvBC,IAAAA,SAAS,EAAEA,SAAU;AACrBC,IAAAA,kBAAkB,EAAEA,kBAAmB;AACvCE,IAAAA,UAAU,EAAEA,UAAW;AACvBC,IAAAA,aAAa,EAAEA,aAAc;AAC7BgB,IAAAA,EAAE,EAAEA,EAAG;AACPf,IAAAA,SAAS,EAAEA,SAAU;AACrBH,IAAAA,aAAa,EAAEoB,kBAAmB;AAClChB,IAAAA,SAAS,EAAEA,SAAU;AACrBC,IAAAA,OAAO,EAAEA,OAAQ;AACjBgB,IAAAA,SAAS,EAAEA,SAAU;AACrBC,IAAAA,KAAK,EAAEA,KAAM;AACbL,IAAAA,EAAE,EAAEA,EAAAA;AAAG,GAAA,EACHiB,cAAc,CAACV,kBAAkB,CAAC,CAAA,EAClCW,aAAa,CAAC;AAAEC,IAAAA,IAAI,EAAEV,aAAa;AAAEG,IAAAA,MAAM,EAANA,MAAAA;AAAO,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AAAAV,IAAAA,QAAA,EAEjDA,QAAAA;AAAQ,GAAA,CACK,CAAC,CAAA;AAErB,CAAC,CAAA;AAED,IAAMS,QAAQ,gBAAGS,cAAK,CAACC,UAAU,CAACxB,SAAS;;;;"}
1
+ {"version":3,"file":"BaseText.web.js","sources":["../../../../../../../src/components/Typography/BaseText/BaseText.web.tsx"],"sourcesContent":["import React from 'react';\nimport type { ReactElement } from 'react';\nimport styled from 'styled-components';\nimport getBaseTextStyles from './getBaseTextStyles';\nimport type { BaseTextProps, StyledBaseTextProps } from './types';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps, useStyledProps } from '~components/Box/styledProps';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { omitPropsFromHTML } from '~utils/omitPropsFromHTML';\nimport type { BladeElementRef } from '~utils/types';\n\nconst StyledBaseText = styled.div.withConfig({\n shouldForwardProp: omitPropsFromHTML,\n displayName: 'StyledBaseText',\n})<StyledBaseTextProps>(\n ({\n color,\n fontFamily,\n fontSize,\n fontWeight,\n fontStyle,\n textDecorationLine,\n numberOfLines,\n lineHeight,\n letterSpacing,\n textAlign,\n wordBreak,\n opacity,\n textTransform,\n ...props\n }) => {\n const styledPropsCSSObject = useStyledProps(props);\n return {\n ...getBaseTextStyles({\n color,\n fontFamily,\n fontSize,\n fontWeight,\n fontStyle,\n textDecorationLine,\n numberOfLines,\n lineHeight,\n letterSpacing,\n textAlign,\n wordBreak,\n opacity,\n textTransform,\n theme: props.theme,\n }),\n ...styledPropsCSSObject,\n };\n },\n);\n\nconst _BaseText: React.ForwardRefRenderFunction<BladeElementRef, BaseTextProps> = (\n {\n id,\n color,\n fontFamily,\n fontSize,\n fontWeight,\n fontStyle,\n textDecorationLine,\n lineHeight,\n letterSpacing,\n as,\n textAlign,\n children,\n truncateAfterLines,\n wordBreak,\n opacity,\n className,\n textTransform,\n style,\n accessibilityProps = {},\n componentName = MetaConstants.BaseText,\n testID,\n ...styledProps\n },\n ref,\n): ReactElement => {\n return (\n <StyledBaseText\n ref={ref as never}\n {...getStyledProps(styledProps)}\n color={color}\n fontFamily={fontFamily}\n fontSize={fontSize}\n fontWeight={fontWeight}\n fontStyle={fontStyle}\n textDecorationLine={textDecorationLine}\n lineHeight={lineHeight}\n letterSpacing={letterSpacing}\n as={as}\n textAlign={textAlign}\n numberOfLines={truncateAfterLines}\n wordBreak={wordBreak}\n opacity={opacity}\n className={className}\n style={style}\n id={id}\n textTransform={textTransform}\n {...makeAccessible(accessibilityProps)}\n {...metaAttribute({ name: componentName, testID })}\n >\n {children}\n </StyledBaseText>\n );\n};\n\nconst BaseText = React.forwardRef(_BaseText);\nexport { BaseText };\n"],"names":["StyledBaseText","styled","div","withConfig","shouldForwardProp","omitPropsFromHTML","displayName","_ref","color","fontFamily","fontSize","fontWeight","fontStyle","textDecorationLine","numberOfLines","lineHeight","letterSpacing","textAlign","wordBreak","opacity","textTransform","props","_objectWithoutProperties","_excluded","styledPropsCSSObject","useStyledProps","_objectSpread","getBaseTextStyles","theme","_BaseText","_ref2","ref","id","as","children","truncateAfterLines","className","style","_ref2$accessibilityPr","accessibilityProps","_ref2$componentName","componentName","MetaConstants","BaseText","testID","styledProps","_excluded2","_jsx","getStyledProps","makeAccessible","metaAttribute","name","React","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;AAWA,IAAMA,cAAc,gBAAGC,MAAM,CAACC,GAAG,CAACC,UAAU,CAAC;AAC3CC,EAAAA,iBAAiB,EAAEC,iBAAiB;AACpCC,EAAAA,WAAW,EAAE,gBAAA;AACf,CAAC,CAAC,CACA,UAAAC,IAAA,EAeM;AAAA,EAAA,IAdJC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,UAAU,GAAAF,IAAA,CAAVE,UAAU;IACVC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IACRC,UAAU,GAAAJ,IAAA,CAAVI,UAAU;IACVC,SAAS,GAAAL,IAAA,CAATK,SAAS;IACTC,kBAAkB,GAAAN,IAAA,CAAlBM,kBAAkB;IAClBC,aAAa,GAAAP,IAAA,CAAbO,aAAa;IACbC,UAAU,GAAAR,IAAA,CAAVQ,UAAU;IACVC,aAAa,GAAAT,IAAA,CAAbS,aAAa;IACbC,SAAS,GAAAV,IAAA,CAATU,SAAS;IACTC,SAAS,GAAAX,IAAA,CAATW,SAAS;IACTC,OAAO,GAAAZ,IAAA,CAAPY,OAAO;IACPC,aAAa,GAAAb,IAAA,CAAba,aAAa;AACVC,IAAAA,KAAK,GAAAC,wBAAA,CAAAf,IAAA,EAAAgB,SAAA,CAAA,CAAA;AAER,EAAA,IAAMC,oBAAoB,GAAGC,cAAc,CAACJ,KAAK,CAAC,CAAA;AAClD,EAAA,OAAAK,aAAA,CAAAA,aAAA,CAAA,EAAA,EACKC,iBAAiB,CAAC;AACnBnB,IAAAA,K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A,aAAa,EAAEA,aAAAA;AAAc,GAAA,EACzB6B,cAAc,CAACV,kBAAkB,CAAC,CAAA,EAClCW,aAAa,CAAC;AAAEC,IAAAA,IAAI,EAAEV,aAAa;AAAEG,IAAAA,MAAM,EAANA,MAAAA;AAAO,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AAAAV,IAAAA,QAAA,EAEjDA,QAAAA;AAAQ,GAAA,CACK,CAAC,CAAA;AAErB,CAAC,CAAA;AAED,IAAMS,QAAQ,gBAAGS,cAAK,CAACC,UAAU,CAACxB,SAAS;;;;"}
@@ -30,7 +30,8 @@ var getBaseTextStyles = function getBaseTextStyles(_ref) {
30
30
  letterSpacing = _ref$letterSpacing === void 0 ? 100 : _ref$letterSpacing,
31
31
  textAlign = _ref.textAlign,
32
32
  opacity = _ref.opacity,
33
- theme = _ref.theme;
33
+ theme = _ref.theme,
34
+ textTransform = _ref.textTransform;
34
35
  var textColor = color === 'currentColor' ? 'currentColor' : getIn(theme.colors, color);
35
36
  var themeFontFamily = theme.typography.fonts.family[fontFamily];
36
37
  var themeFontSize = makeTypographySize(theme.typography.fonts.size[fontSize]);
@@ -77,7 +78,8 @@ var getBaseTextStyles = function getBaseTextStyles(_ref) {
77
78
  textAlign: textAlign,
78
79
  margin: 0,
79
80
  padding: 0,
80
- opacity: opacity
81
+ opacity: opacity,
82
+ textTransform: textTransform
81
83
  }, truncateStyles), wordBreakStyles);
82
84
  };
83
85
 
@@ -1 +1 @@
1
- {"version":3,"file":"getBaseTextStyles.js","sources":["../../../../../../../src/components/Typography/BaseText/getBaseTextStyles.ts"],"sourcesContent":["import type { CSSObject } from 'styled-components';\nimport type { StyledBaseTextProps } from './types';\nimport getIn from '~utils/lodashButBetter/get';\nimport { makeTypographySize } from '~utils/makeTypographySize';\nimport { isReactNative } from '~utils';\nimport { makeLetterSpacing } from '~utils/makeLetterSpacing';\n\nconst getBaseTextStyles = ({\n color = 'surface.text.gray.normal',\n fontFamily = 'text',\n fontSize = 200,\n fontWeight = 'regular',\n fontStyle = 'normal',\n textDecorationLine = 'none',\n numberOfLines,\n wordBreak,\n lineHeight = 100,\n letterSpacing = 100,\n textAlign,\n opacity,\n theme,\n}: StyledBaseTextProps): CSSObject => {\n const textColor = color === 'currentColor' ? 'currentColor' : getIn(theme.colors, color);\n const themeFontFamily = theme.typography.fonts.family[fontFamily];\n const themeFontSize = makeTypographySize(theme.typography.fonts.size[fontSize]);\n const themeFontWeight = theme.typography.fonts.weight[fontWeight];\n const themeLineHeight = makeTypographySize(theme.typography.lineHeights[lineHeight]);\n const themeLetterSpacing = makeLetterSpacing(\n theme.typography.letterSpacings[letterSpacing],\n theme.typography.fonts.size[fontSize],\n );\n let truncateStyles: CSSObject = {};\n let wordBreakStyles: CSSObject = {};\n if (numberOfLines !== undefined) {\n if (isReactNative()) {\n truncateStyles = {};\n } else {\n truncateStyles = {\n overflow: 'hidden',\n display: '-webkit-box',\n 'line-clamp': `${numberOfLines}`,\n '-webkit-line-clamp': `${numberOfLines}`,\n '-webkit-box-orient': 'vertical',\n overflowWrap: 'break-word',\n };\n }\n }\n if (wordBreak !== undefined) {\n if (isReactNative()) {\n wordBreakStyles = {};\n } else {\n wordBreakStyles = {\n wordBreak,\n };\n }\n }\n\n return {\n color: textColor,\n fontFamily: themeFontFamily,\n fontSize: themeFontSize,\n fontWeight: themeFontWeight,\n fontStyle,\n textDecorationLine,\n ...(textDecorationLine !== 'none' && {\n textDecorationColor: textColor,\n }),\n lineHeight: themeLineHeight,\n letterSpacing: themeLetterSpacing,\n textAlign,\n margin: 0,\n padding: 0,\n opacity,\n ...truncateStyles,\n ...wordBreakStyles,\n };\n};\n\nexport default getBaseTextStyles;\n"],"names":["getBaseTextStyles","_ref","_ref$color","color","_ref$fontFamily","fontFamily","_ref$fontSize","fontSize","_ref$fontWeight","fontWeight","_ref$fontStyle","fontStyle","_ref$textDecorationLi","textDecorationLine","numberOfLines","wordBreak","_ref$lineHeight","lineHeight","_ref$letterSpacing","letterSpacing","textAlign","opacity","theme","textColor","getIn","colors","themeFontFamily","typography","fonts","family","themeFontSize","makeTypographySize","size","themeFontWeight","weight","themeLineHeight","lineHeights","themeLetterSpacing","makeLetterSpacing","letterSpacings","truncateStyles","wordBreakStyles","undefined","isReactNative","overflow","display","concat","overflowWrap","_objectSpread","textDecorationColor","margin","padding"],"mappings":";;;;;;;;;;;AAOA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAce;AAAA,EAAA,IAAAC,UAAA,GAAAD,IAAA,CAbpCE,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,0BAA0B,GAAAA,UAAA;IAAAE,eAAA,GAAAH,IAAA,CAClCI,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,eAAA;IAAAE,aAAA,GAAAL,IAAA,CACnBM,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,GAAG,GAAAA,aAAA;IAAAE,eAAA,GAAAP,IAAA,CACdQ,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,SAAS,GAAAA,eAAA;IAAAE,cAAA,GAAAT,IAAA,CACtBU,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,cAAA;IAAAE,qBAAA,GAAAX,IAAA,CACpBY,kBAAkB;AAAlBA,IAAAA,kBAAkB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,qBAAA;IAC3BE,aAAa,GAAAb,IAAA,CAAba,aAAa;IACbC,SAAS,GAAAd,IAAA,CAATc,SAAS;IAAAC,eAAA,GAAAf,IAAA,CACTgB,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,GAAG,GAAAA,eAAA;IAAAE,kBAAA,GAAAjB,IA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AAO,EAAE,aAAa;AACtB,QAAA,YAAY,EAAAC,EAAAA,CAAAA,MAAA,CAAKhC,aAAa,CAAE;AAChC,QAAA,oBAAoB,EAAAgC,EAAAA,CAAAA,MAAA,CAAKhC,aAAa,CAAE;AACxC,QAAA,oBAAoB,EAAE,UAAU;AAChCiC,QAAAA,YAAY,EAAE,YAAA;OACf,CAAA;AACH,KAAA;AACF,GAAA;EACA,IAAIhC,SAAS,KAAK2B,SAAS,EAAE;IAC3B,IAAIC,aAAa,EAAE,EAAE;MACnBF,eAAe,GAAG,EAAE,CAAA;AACtB,KAAC,MAAM;AACLA,MAAAA,eAAe,GAAG;AAChB1B,QAAAA,SAAS,EAATA,SAAAA;OACD,CAAA;AACH,KAAA;AACF,GAAA;AAEA,EAAA,OAAAiC,aAAA,CAAAA,aAAA,CAAAA,aAAA,CAAA;AACE7C,IAAAA,KAAK,EAAEoB,SAAS;AAChBlB,IAAAA,UAAU,EAAEqB,eAAe;AAC3BnB,IAAAA,QAAQ,EAAEuB,aAAa;AACvBrB,IAAAA,UAAU,EAAEwB,eAAe;AAC3BtB,IAAAA,SAAS,EAATA,SAAS;AACTE,IAAAA,kBAAkB,EAAlBA,kBAAAA;GACIA,EAAAA,kBAAkB,KAAK,MAAM,IAAI;AACnCoC,IAAAA,mBAAmB,EAAE1B,SAAAA;GACtB,CAAA,EAAA,EAAA,EAAA;AACDN,IAAAA,UAAU,EAAEkB,eAAe;AAC3BhB,IAAAA,aAAa,EAAEkB,kBAAkB;AACjCjB,IAAAA,SAAS,EAATA,SAAS;AACT8B,IAAAA,MAAM,EAAE,CAAC;AACTC,IAAAA,OAAO,EAAE,CAAC;AACV9B,IAAAA,OAAO,EAAPA,OAAAA;GACGmB,EAAAA,cAAc,GACdC,eAAe,CAAA,CAAA;AAEtB;;;;"}
1
+ {"version":3,"file":"getBaseTextStyles.js","sources":["../../../../../../../src/components/Typography/BaseText/getBaseTextStyles.ts"],"sourcesContent":["import type { CSSObject } from 'styled-components';\nimport type { StyledBaseTextProps } from './types';\nimport getIn from '~utils/lodashButBetter/get';\nimport { makeTypographySize } from '~utils/makeTypographySize';\nimport { isReactNative } from '~utils';\nimport { makeLetterSpacing } from '~utils/makeLetterSpacing';\n\nconst getBaseTextStyles = ({\n color = 'surface.text.gray.normal',\n fontFamily = 'text',\n fontSize = 200,\n fontWeight = 'regular',\n fontStyle = 'normal',\n textDecorationLine = 'none',\n numberOfLines,\n wordBreak,\n lineHeight = 100,\n letterSpacing = 100,\n textAlign,\n opacity,\n theme,\n textTransform,\n}: StyledBaseTextProps): CSSObject => {\n const textColor = color === 'currentColor' ? 'currentColor' : getIn(theme.colors, color);\n const themeFontFamily = theme.typography.fonts.family[fontFamily];\n const themeFontSize = makeTypographySize(theme.typography.fonts.size[fontSize]);\n const themeFontWeight = theme.typography.fonts.weight[fontWeight];\n const themeLineHeight = makeTypographySize(theme.typography.lineHeights[lineHeight]);\n const themeLetterSpacing = makeLetterSpacing(\n theme.typography.letterSpacings[letterSpacing],\n theme.typography.fonts.size[fontSize],\n );\n let truncateStyles: CSSObject = {};\n let wordBreakStyles: CSSObject = {};\n if (numberOfLines !== undefined) {\n if (isReactNative()) {\n truncateStyles = {};\n } else {\n truncateStyles = {\n overflow: 'hidden',\n display: '-webkit-box',\n 'line-clamp': `${numberOfLines}`,\n '-webkit-line-clamp': `${numberOfLines}`,\n '-webkit-box-orient': 'vertical',\n overflowWrap: 'break-word',\n };\n }\n }\n if (wordBreak !== undefined) {\n if (isReactNative()) {\n wordBreakStyles = {};\n } else {\n wordBreakStyles = {\n wordBreak,\n };\n }\n }\n\n return {\n color: textColor,\n fontFamily: themeFontFamily,\n fontSize: themeFontSize,\n fontWeight: themeFontWeight,\n fontStyle,\n textDecorationLine,\n ...(textDecorationLine !== 'none' && {\n textDecorationColor: textColor,\n }),\n lineHeight: themeLineHeight,\n letterSpacing: themeLetterSpacing,\n textAlign,\n margin: 0,\n padding: 0,\n opacity,\n textTransform,\n ...truncateStyles,\n ...wordBreakStyles,\n };\n};\n\nexport default getBaseTextStyles;\n"],"names":["getBaseTextStyles","_ref","_ref$color","color","_ref$fontFamily","fontFamily","_ref$fontSize","fontSize","_ref$fontWeight","fontWeight","_ref$fontStyle","fontStyle","_ref$textDecorationLi","textDecorationLine","numberOfLines","wordBreak","_ref$lineHeight","lineHeight","_ref$letterSpacing","letterSpacing","textAlign","opacity","theme","textTransform","textColor","getIn","colors","themeFontFamily","typography","fonts","family","themeFontSize","makeTypographySize","size","themeFontWeight","weight","themeLineHeight","lineHeights","themeLetterSpacing","makeLetterSpacing","letterSpacings","truncateStyles","wordBreakStyles","undefined","isReactNative","overflow","display","concat","overflowWrap","_objectSpread","textDecorationColor","margin","padding"],"mappings":";;;;;;;;;;;AAOA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAee;AAAA,EAAA,IAAAC,UAAA,GAAAD,IAAA,CAdpCE,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,0BAA0B,GAAAA,UAAA;IAAAE,eAAA,GAAAH,IAAA,CAClCI,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,eAAA;IAAAE,aAAA,GAAAL,IAAA,CACnBM,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,GAAG,GAAAA,aAAA;IAAAE,eAAA,GAAAP,IAAA,CACdQ,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,SAAS,GAAAA,eAAA;IAAAE,cAAA,GAAAT,IAAA,CACtBU,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,cAAA;IAAAE,qBAAA,GAAAX,IAAA,CACpBY,kBAAkB;AAAlBA,IAAAA,kBAAkB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,MAAM,G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AS;AACT+B,IAAAA,MAAM,EAAE,CAAC;AACTC,IAAAA,OAAO,EAAE,CAAC;AACV/B,IAAAA,OAAO,EAAPA,OAAO;AACPE,IAAAA,aAAa,EAAbA,aAAAA;GACGkB,EAAAA,cAAc,GACdC,eAAe,CAAA,CAAA;AAEtB;;;;"}
@@ -21,7 +21,7 @@ import { MetaConstants } from '../../../utils/metaAttribute/metaConstants.js';
21
21
  import { getStyledProps } from '../../Box/styledProps/getStyledProps.js';
22
22
  import { BaseText } from '../BaseText/BaseText.web.js';
23
23
 
24
- var _excluded = ["children", "size", "weight", "isHighlighted", "color", "testID"];
24
+ var _excluded = ["children", "size", "weight", "isHighlighted", "color", "testID", "textTransform"];
25
25
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
26
26
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
27
27
  var platformType = getPlatformType();
@@ -92,6 +92,7 @@ var _Code = function _Code(_ref2, ref) {
92
92
  isHighlighted = _ref2$isHighlighted === void 0 ? true : _ref2$isHighlighted,
93
93
  color = _ref2.color,
94
94
  testID = _ref2.testID,
95
+ textTransform = _ref2.textTransform,
95
96
  styledProps = _objectWithoutProperties(_ref2, _excluded);
96
97
  var _ref3 = getCodeFontSizeAndLineHeight(size),
97
98
  fontSize = _ref3.fontSize,
@@ -118,6 +119,7 @@ var _Code = function _Code(_ref2, ref) {
118
119
  fontWeight: weight,
119
120
  as: isPlatformWeb ? 'code' : undefined,
120
121
  lineHeight: lineHeight,
122
+ textTransform: textTransform,
121
123
  children: children
122
124
  })
123
125
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"Code.js","sources":["../../../../../../../src/components/Typography/Code/Code.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport { BaseText } from '../BaseText';\nimport type { BaseTextProps, BaseTextSizes } from '../BaseText/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { getPlatformType } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { FontSize, Typography } from '~tokens/global';\nimport type { BladeElementRef, StringChildrenType, TestID } from '~utils/types';\nimport { makeSpace } from '~utils/makeSpace';\nimport { makeTypographySize } from '~utils/makeTypographySize';\nimport { throwBladeError } from '~utils/logger';\n\ntype CodeCommonProps = {\n /**\n * Sets the color of the Heading component.\n */\n children: StringChildrenType;\n /**\n * Decides the fontSize and padding of Code\n *\n * @default small\n */\n size?: Extract<BaseTextSizes, 'small' | 'medium'>;\n weight?: Extract<BaseTextProps['fontWeight'], 'regular' | 'bold'>;\n isHighlighted?: boolean;\n color?: BaseTextProps['color'];\n} & TestID &\n StyledPropsBlade;\n\ntype CodeHighlightedProps = CodeCommonProps & {\n /**\n * Adds background color to highlight the text\n *\n * @default true\n */\n isHighlighted?: true;\n /**\n * color prop can only be added when `isHighlighted` is set to `false`\n */\n color?: undefined;\n};\n\ntype CodeNonHighlightedProps = CodeCommonProps & {\n /**\n * Adds background color to highlight the text\n *\n * @default true\n */\n isHighlighted: false;\n /**\n * color prop to set color of text when `isHighlighted` is set to false\n */\n color?: BaseTextProps['color'];\n};\n\nexport type CodeProps = CodeHighlightedProps | CodeNonHighlightedProps;\n\ntype CodeContainerProps = {\n size: CodeProps['size'];\n isHighlighted: CodeProps['isHighlighted'];\n};\n\nconst platformType = getPlatformType();\nconst isPlatformWeb = platformType === 'browser' || platformType === 'node';\n\nconst getCodeFontSizeAndLineHeight = (\n size: CodeProps['size'],\n): { fontSize: keyof FontSize; lineHeight: keyof Typography['lineHeights'] } | undefined => {\n switch (size) {\n case 'medium':\n return { fontSize: 75, lineHeight: 75 };\n case 'small':\n return { fontSize: 25, lineHeight: 25 };\n default:\n if (__DEV__) {\n throwBladeError({\n moduleName: 'Code',\n message: `Unexpected size: ${size}`,\n });\n }\n return undefined;\n }\n};\n\nconst CodeContainer = styled(BaseBox)<CodeContainerProps>((props) => {\n const padding = `${makeSpace(props.theme.spacing[0])} ${makeSpace(props.theme.spacing[2])}`;\n return {\n padding,\n backgroundColor: props.isHighlighted\n ? props.theme.colors.feedback.background.neutral.subtle\n : undefined,\n borderRadius: props.theme.border.radius.medium,\n display: isPlatformWeb ? 'inline-block' : 'flex',\n alignSelf: isPlatformWeb ? undefined : 'center',\n verticalAlign: 'middle',\n lineHeight: makeTypographySize(props.theme.typography.lineHeights[0]),\n };\n});\n\nconst getCodeColor = ({\n isHighlighted,\n color,\n}: Pick<CodeProps, 'isHighlighted' | 'color'>): CodeProps['color'] => {\n if (isHighlighted) {\n if (__DEV__) {\n if (color) {\n throwBladeError({\n moduleName: 'Code',\n message: '`color` prop cannot be used without `isHighlighted={false}`',\n });\n }\n }\n\n return 'surface.text.gray.subtle';\n }\n\n if (color) {\n return color;\n }\n\n return 'surface.text.gray.normal';\n};\n\nconst _Code = (\n {\n children,\n size = 'small',\n weight = 'regular',\n isHighlighted = true,\n color,\n testID,\n ...styledProps\n }: CodeProps,\n ref: React.Ref<BladeElementRef>,\n): React.ReactElement => {\n const { fontSize, lineHeight } = getCodeFontSizeAndLineHeight(size)!;\n const codeTextColor = React.useMemo<CodeProps['color']>(\n () => getCodeColor({ isHighlighted, color }),\n [isHighlighted, color],\n );\n\n return (\n <CodeContainer\n ref={ref as never}\n size={size}\n isHighlighted={isHighlighted}\n as={isPlatformWeb ? 'span' : undefined}\n {...metaAttribute({ name: MetaConstants.Code, testID })}\n {...getStyledProps(styledProps)}\n >\n <BaseText\n color={codeTextColor}\n fontFamily=\"code\"\n fontSize={fontSize}\n fontWeight={weight}\n as={isPlatformWeb ? 'code' : undefined}\n lineHeight={lineHeight}\n >\n {children}\n </BaseText>\n </CodeContainer>\n );\n};\n\n/**\n * Code component can be used for displaying token, variable names, or inlined code snippets.\n *\n * ## Usage\n *\n * ### In Web\n * In web, you can use it inside `Text` component or individually. The component is set to display `inline-block`\n *\n * ```tsx\n * <Text>\n * Lorem ipsum <Code>SENTRY_TOKEN</Code> normal text\n * </Text>\n * ```\n *\n * ### In React Native\n *\n * In React Native, you would have to align it using flex to make sure the Code and the surrounding text is correctly aligned\n *\n * ```tsx\n * <Box flexWrap=\"wrap\" flexDirection=\"row\" alignItems=\"flex-start\">\n * <Text>Lorem ipsum </Text>\n * <Code>SENTRY_TOKEN</Code>\n * <Text> normal text</Text>\n * </Box>\n * ```\n */\nconst Code = React.forwardRef(_Code);\n\nexport { Code };\n"],"names":["platformType","getPlatformType","isPlatformWeb","getCodeFontSizeAndLineHeight","size","fontSize","lineHeight","throwBladeError","moduleName","message","concat","undefined","CodeContainer","styled","BaseBox","withConfig","displayName","componentId","props","padding","makeSpace","theme","spacing","backgroundColor","isHighlighted","colors","feedback","background","neutral","subtle","borderRadius","border","radius","medium","display","alignSelf","verticalAlign","makeTypographySize","typography","lineHeights","getCodeColor","_ref","color","_Code","_ref2","ref","children","_ref2$size","_ref2$weight","weight","_ref2$isHighlighted","testID","styledProps","_objectWithoutProperties","_excluded","_ref3","codeTextColor","React","useMemo","_jsx","_objectSpread","as","metaAttribute","name","MetaConstants","Code","getStyledProps","BaseText","fontFamily","fontWeight","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAiEA,IAAMA,YAAY,GAAGC,eAAe,EAAE,CAAA;AACtC,IAAMC,aAAa,GAAGF,YAAY,KAAK,SAAS,IAAIA,YAAY,KAAK,MAAM,CAAA;AAE3E,IAAMG,4BAA4B,GAAG,SAA/B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;AACnBgE,MAAAA,UAAU,EAAEpB,MAAO;AACnBY,MAAAA,EAAE,EAAE3D,aAAa,GAAG,MAAM,GAAGS,SAAU;AACvCL,MAAAA,UAAU,EAAEA,UAAW;AAAAwC,MAAAA,QAAA,EAEtBA,QAAAA;KACO,CAAA;AAAC,GAAA,CACE,CAAC,CAAA;AAEpB,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMmB,IAAI,gBAAGR,cAAK,CAACa,UAAU,CAAC3B,KAAK;;;;"}
1
+ {"version":3,"file":"Code.js","sources":["../../../../../../../src/components/Typography/Code/Code.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport { BaseText } from '../BaseText';\nimport type { BaseTextProps, BaseTextSizes } from '../BaseText/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { getPlatformType } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { FontSize, Typography } from '~tokens/global';\nimport type { BladeElementRef, StringChildrenType, TestID } from '~utils/types';\nimport { makeSpace } from '~utils/makeSpace';\nimport { makeTypographySize } from '~utils/makeTypographySize';\nimport { throwBladeError } from '~utils/logger';\n\ntype CodeCommonProps = {\n /**\n * Sets the color of the Heading component.\n */\n children: StringChildrenType;\n /**\n * Decides the fontSize and padding of Code\n *\n * @default small\n */\n size?: Extract<BaseTextSizes, 'small' | 'medium'>;\n weight?: Extract<BaseTextProps['fontWeight'], 'regular' | 'bold'>;\n isHighlighted?: boolean;\n textTransform?: BaseTextProps['textTransform'];\n color?: BaseTextProps['color'];\n} & TestID &\n StyledPropsBlade;\n\ntype CodeHighlightedProps = CodeCommonProps & {\n /**\n * Adds background color to highlight the text\n *\n * @default true\n */\n isHighlighted?: true;\n /**\n * color prop can only be added when `isHighlighted` is set to `false`\n */\n color?: undefined;\n};\n\ntype CodeNonHighlightedProps = CodeCommonProps & {\n /**\n * Adds background color to highlight the text\n *\n * @default true\n */\n isHighlighted: false;\n /**\n * color prop to set color of text when `isHighlighted` is set to false\n */\n color?: BaseTextProps['color'];\n};\n\nexport type CodeProps = CodeHighlightedProps | CodeNonHighlightedProps;\n\ntype CodeContainerProps = {\n size: CodeProps['size'];\n isHighlighted: CodeProps['isHighlighted'];\n};\n\nconst platformType = getPlatformType();\nconst isPlatformWeb = platformType === 'browser' || platformType === 'node';\n\nconst getCodeFontSizeAndLineHeight = (\n size: CodeProps['size'],\n): { fontSize: keyof FontSize; lineHeight: keyof Typography['lineHeights'] } | undefined => {\n switch (size) {\n case 'medium':\n return { fontSize: 75, lineHeight: 75 };\n case 'small':\n return { fontSize: 25, lineHeight: 25 };\n default:\n if (__DEV__) {\n throwBladeError({\n moduleName: 'Code',\n message: `Unexpected size: ${size}`,\n });\n }\n return undefined;\n }\n};\n\nconst CodeContainer = styled(BaseBox)<CodeContainerProps>((props) => {\n const padding = `${makeSpace(props.theme.spacing[0])} ${makeSpace(props.theme.spacing[2])}`;\n return {\n padding,\n backgroundColor: props.isHighlighted\n ? props.theme.colors.feedback.background.neutral.subtle\n : undefined,\n borderRadius: props.theme.border.radius.medium,\n display: isPlatformWeb ? 'inline-block' : 'flex',\n alignSelf: isPlatformWeb ? undefined : 'center',\n verticalAlign: 'middle',\n lineHeight: makeTypographySize(props.theme.typography.lineHeights[0]),\n };\n});\n\nconst getCodeColor = ({\n isHighlighted,\n color,\n}: Pick<CodeProps, 'isHighlighted' | 'color'>): CodeProps['color'] => {\n if (isHighlighted) {\n if (__DEV__) {\n if (color) {\n throwBladeError({\n moduleName: 'Code',\n message: '`color` prop cannot be used without `isHighlighted={false}`',\n });\n }\n }\n\n return 'surface.text.gray.subtle';\n }\n\n if (color) {\n return color;\n }\n\n return 'surface.text.gray.normal';\n};\n\nconst _Code = (\n {\n children,\n size = 'small',\n weight = 'regular',\n isHighlighted = true,\n color,\n testID,\n textTransform,\n ...styledProps\n }: CodeProps,\n ref: React.Ref<BladeElementRef>,\n): React.ReactElement => {\n const { fontSize, lineHeight } = getCodeFontSizeAndLineHeight(size)!;\n const codeTextColor = React.useMemo<CodeProps['color']>(\n () => getCodeColor({ isHighlighted, color }),\n [isHighlighted, color],\n );\n\n return (\n <CodeContainer\n ref={ref as never}\n size={size}\n isHighlighted={isHighlighted}\n as={isPlatformWeb ? 'span' : undefined}\n {...metaAttribute({ name: MetaConstants.Code, testID })}\n {...getStyledProps(styledProps)}\n >\n <BaseText\n color={codeTextColor}\n fontFamily=\"code\"\n fontSize={fontSize}\n fontWeight={weight}\n as={isPlatformWeb ? 'code' : undefined}\n lineHeight={lineHeight}\n textTransform={textTransform}\n >\n {children}\n </BaseText>\n </CodeContainer>\n );\n};\n\n/**\n * Code component can be used for displaying token, variable names, or inlined code snippets.\n *\n * ## Usage\n *\n * ### In Web\n * In web, you can use it inside `Text` component or individually. The component is set to display `inline-block`\n *\n * ```tsx\n * <Text>\n * Lorem ipsum <Code>SENTRY_TOKEN</Code> normal text\n * </Text>\n * ```\n *\n * ### In React Native\n *\n * In React Native, you would have to align it using flex to make sure the Code and the surrounding text is correctly aligned\n *\n * ```tsx\n * <Box flexWrap=\"wrap\" flexDirection=\"row\" alignItems=\"flex-start\">\n * <Text>Lorem ipsum </Text>\n * <Code>SENTRY_TOKEN</Code>\n * <Text> normal text</Text>\n * </Box>\n * ```\n */\nconst Code = React.forwardRef(_Code);\n\nexport { Code };\n"],"names":["platformType","getPlatformType","isPlatformWeb","getCodeFontSizeAndLineHeight","size","fontSize","lineHeight","throwBladeError","moduleName","message","concat","undefined","CodeContainer","styled","BaseBox","withConfig","displayName","componentId","props","padding","makeSpace","theme","spacing","backgroundColor","isHighlighted","colors","feedback","background","neutral","subtle","borderRadius","border","radius","medium","display","alignSelf","verticalAlign","makeTypographySize","typography","lineHeights","getCodeColor","_ref","color","_Code","_ref2","ref","children","_ref2$size","_ref2$weight","weight","_ref2$isHighlighted","testID","textTransform","styledProps","_objectWithoutProperties","_excluded","_ref3","codeTextColor","React","useMemo","_jsx","_objectSpread","as","metaAttribute","name","MetaConstants","Code","getStyledProps","BaseText","fontFamily","fontWeight","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAkEA,IAAMA,YAAY,GAAGC,eAAe,EAAE,CAAA;AACtC,IAAMC,aAAa,GAAGF,YAAY,KAAK,SAAS,IAAIA,YAAY,KAAK,MAAM,CAAA;AAE3E,IAAMG,4BAA4B,GAAG,SAA/BA,4BAA4BA,CAChCC,IAAuB,EACmE;AAC1F,EAAA,QAAQA,IAAI;AACV,IAAA,KAAK,QAAQ;MACX,OAAO;AAAEC,QAAAA,QAAQ,EAAE,EAAE;AAAEC,QAAAA,UAAU,EAAE,EAAA;OAAI,CAAA;AACzC,IAAA,KAAK,OAAO;MACV,OAAO;AAAED,QAAAA,QAAQ,EAAE,EAAE;AAAEC,QAAAA,UAAU,EAAE,EAAA;OAAI,CAAA;AACzC,IAAA;AACE,MAAA,IAAI,KAAO,EAAE;AACXC,QAAAA,eAAe,CAAC;AACdC,UAAAA,UAAU,EAAE,MAAM;UAClBC,OAAO,EAAA,mBAAA,CAAAC,MAAA,CAAsBN,IAAI,CAAA;AACnC,SAAC,CAAC,CAAA;AACJ,OAAA;AACA,MAAA,OAAOO,SAAS,CAAA;AACpB,GAAA;AACF,CAAC,CAAA;AAED,IAAMC,aAAa,gBAAGC,MAAM,CAACC,OAAO,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,qBAAA;EAAAC,WAAA,EAAA,UAAA;AAAA,CAAqB,CAAA,CAAA,UAACC,KAAK,EAAK;AACnE,EAAA,IAAMC,OAAO,GAAA,EAAA,CAAAT,MAAA,CAAMU,SAAS,CAACF,KAAK,CAACG,KAAK,CAACC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAA,GAAA,CA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;AACXoB,IAAAA,aAAa,EAAEA,aAAc;AAC7BsC,IAAAA,EAAE,EAAE5D,aAAa,GAAG,MAAM,GAAGS,SAAAA;AAAU,GAAA,EACnCoD,aAAa,CAAC;IAAEC,IAAI,EAAEC,aAAa,CAACC,IAAI;AAAEf,IAAAA,MAAM,EAANA,MAAAA;AAAO,GAAC,CAAC,CAAA,EACnDgB,cAAc,CAACd,WAAW,CAAC,CAAA,EAAA,EAAA,EAAA;IAAAP,QAAA,eAE/Bc,GAAA,CAACQ,QAAQ,EAAA;AACP1B,MAAAA,KAAK,EAAEe,aAAc;AACrBY,MAAAA,UAAU,EAAC,MAAM;AACjBhE,MAAAA,QAAQ,EAAEA,QAAS;AACnBiE,MAAAA,UAAU,EAAErB,MAAO;AACnBa,MAAAA,EAAE,EAAE5D,aAAa,GAAG,MAAM,GAAGS,SAAU;AACvCL,MAAAA,UAAU,EAAEA,UAAW;AACvB8C,MAAAA,aAAa,EAAEA,aAAc;AAAAN,MAAAA,QAAA,EAE5BA,QAAAA;KACO,CAAA;AAAC,GAAA,CACE,CAAC,CAAA;AAEpB,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMoB,IAAI,gBAAGR,cAAK,CAACa,UAAU,CAAC5B,KAAK;;;;"}
@@ -10,7 +10,7 @@ import { getPlatformType } from '../../../utils/getPlatformType/getPlatformType.
10
10
  import { BaseText } from '../BaseText/BaseText.web.js';
11
11
  import { getStyledProps } from '../../Box/styledProps/getStyledProps.js';
12
12
 
13
- var _excluded = ["as", "size", "weight", "color", "children", "testID", "textAlign", "textDecorationLine"];
13
+ var _excluded = ["as", "size", "weight", "color", "children", "testID", "textAlign", "textDecorationLine", "textTransform"];
14
14
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
15
15
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
16
16
  var validAsValues = ['span', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
@@ -66,6 +66,7 @@ var _Display = function _Display(_ref2, ref) {
66
66
  testID = _ref2.testID,
67
67
  textAlign = _ref2.textAlign,
68
68
  textDecorationLine = _ref2.textDecorationLine,
69
+ textTransform = _ref2.textTransform,
69
70
  styledProps = _objectWithoutProperties(_ref2, _excluded);
70
71
  useValidateAsProp({
71
72
  componentName: 'Display',
@@ -83,7 +84,8 @@ var _Display = function _Display(_ref2, ref) {
83
84
  ref: ref
84
85
  }, props), {}, {
85
86
  textAlign: textAlign,
86
- textDecorationLine: textDecorationLine
87
+ textDecorationLine: textDecorationLine,
88
+ textTransform: textTransform
87
89
  }, getStyledProps(styledProps)), {}, {
88
90
  children: children
89
91
  }));