@economic/taco 2.21.1 → 2.21.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -46,22 +46,13 @@ const InputWithoutDeprecatedFeatures = /*#__PURE__*/forwardRef(function InputWit
46
46
  'pl-8': !!prefix,
47
47
  'pr-8': !!postfix
48
48
  }, attributes.className);
49
- const typeAttributes = {
50
- type
51
- };
52
- // https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/
53
- if (type === 'number') {
54
- typeAttributes.type = 'text';
55
- typeAttributes.inputMode = 'numeric';
56
- typeAttributes.pattern = '[0-9]*';
57
- }
58
49
  return /*#__PURE__*/createElement("div", {
59
50
  className: "relative inline-flex w-full",
60
51
  "data-taco": "input-container",
61
52
  style: {
62
53
  opacity: 0.999
63
54
  }
64
- }, /*#__PURE__*/createElement("input", Object.assign({}, attributes, typeAttributes, {
55
+ }, /*#__PURE__*/createElement("input", Object.assign({}, attributes, {
65
56
  className: className,
66
57
  "data-taco": "input",
67
58
  onKeyDown: handleKeyDown,
@@ -71,7 +62,8 @@ const InputWithoutDeprecatedFeatures = /*#__PURE__*/forwardRef(function InputWit
71
62
  style: {
72
63
  paddingLeft: prefixRect ? `${prefixRect.width - 1}px` : undefined,
73
64
  paddingRight: postfixRect ? `${postfixRect.width - 1}px` : undefined
74
- }
65
+ },
66
+ type: type
75
67
  })), prefix ? /*#__PURE__*/createElement(Affix, {
76
68
  type: "prefix",
77
69
  children: prefix,
@@ -1 +1 @@
1
- {"version":3,"file":"Input.js","sources":["../../../../../../../src/components/Input/Input.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'clsx';\nimport { Icon, IconName } from '../Icon/Icon';\nimport { getButtonStateClasses, getInputClasses } from './util';\nimport { useBoundingClientRectListener } from '../../hooks/useBoundingClientRectListener';\nimport { useMergedRef } from '../../hooks/useMergedRef';\nimport { isPressingMetaKey } from '../../utils/keyboard';\n\nexport type InputWithoutDeprecatedFeaturesProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'prefix'> & {\n /** Draws attention to the input by changing its style and making it visually prominent */\n highlighted?: boolean;\n /* Whether the input is in an invalid state */\n invalid?: boolean;\n postfix?: string | JSX.Element;\n prefix?: string | JSX.Element;\n};\n\nconst validSetSelectionRangeTypes = ['text', 'search', 'url', 'tel', 'password'];\n\nconst InputWithoutDeprecatedFeatures = React.forwardRef(function InputWithoutDeprecatedFeatures(\n props: InputWithoutDeprecatedFeaturesProps,\n ref: React.Ref<HTMLInputElement>\n) {\n const { highlighted, invalid, onKeyDown, postfix, prefix, type = 'text', ...attributes } = props;\n const internalRef = useMergedRef<HTMLInputElement>(ref);\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n // prevent any external keyboard shortcuts from executing while typing single characters in input\n if (event.key.length === 1 && !isPressingMetaKey(event)) {\n event.stopPropagation();\n }\n\n // home and end keys only navigate to the start/end of input value if the input container does not scroll\n // if it has scroll height then the browser reverts to native scrolling behaviour only\n // so we manually override it to ensure _our_ desired behaviour remains intact\n // only the 'text', 'search', 'url', 'tel', 'password' input types support setSelectionRange\n if (validSetSelectionRangeTypes.includes(type)) {\n if (!event.shiftKey && (event.key === 'Home' || event.key === 'End')) {\n event.preventDefault();\n const position = event.key === 'End' ? event.currentTarget.value.length : 0;\n event.currentTarget.setSelectionRange(position, position);\n }\n }\n\n if (typeof onKeyDown === 'function') {\n onKeyDown(event);\n }\n };\n\n const prefixRef = React.useRef<HTMLDivElement>(null);\n const prefixRect = useBoundingClientRectListener(prefixRef);\n const postfixRef = React.useRef<HTMLDivElement>(null);\n const postfixRect = useBoundingClientRectListener(postfixRef, [postfix]);\n\n const className = cn(\n getInputClasses(props),\n {\n 'pl-8': !!prefix,\n 'pr-8': !!postfix,\n },\n attributes.className\n );\n\n const typeAttributes: Partial<React.InputHTMLAttributes<HTMLInputElement>> = {\n type,\n };\n\n // https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/\n if (type === 'number') {\n typeAttributes.type = 'text';\n typeAttributes.inputMode = 'numeric';\n typeAttributes.pattern = '[0-9]*';\n }\n\n return (\n <div className=\"relative inline-flex w-full\" data-taco=\"input-container\" style={{ opacity: 0.999 }}>\n <input\n {...attributes}\n {...typeAttributes}\n className={className}\n data-taco=\"input\"\n onKeyDown={handleKeyDown}\n aria-invalid={invalid}\n data-highlighted={highlighted}\n ref={internalRef}\n style={{\n paddingLeft: prefixRect ? `${prefixRect.width - 1}px` : undefined,\n paddingRight: postfixRect ? `${postfixRect.width - 1}px` : undefined,\n }}\n />\n {prefix ? <Affix type=\"prefix\" children={prefix} disabled={attributes.disabled} ref={prefixRef} /> : null}\n {postfix ? <Affix type=\"postfix\" children={postfix} disabled={attributes.disabled} ref={postfixRef} /> : null}\n </div>\n );\n});\n\ntype AffixProps = {\n children: string | JSX.Element;\n disabled?: boolean;\n type: 'prefix' | 'postfix';\n};\nconst Affix = React.memo(\n React.forwardRef(function Affix(props: AffixProps, ref: React.Ref<HTMLDivElement>) {\n const { children, disabled, type } = props;\n\n return (\n <div\n className={cn(\n 'group absolute top-0 flex h-full items-center justify-center px-2',\n // icon\n '[&_[data-taco=\"icon\"]]:!h-5 [&_[data-taco=\"icon\"]]:!w-5',\n {\n 'text-grey-300': disabled,\n 'text-grey-700': !disabled,\n 'left-0 [&>button]:!-ml-2': type === 'prefix',\n 'right-0 [&>button]:!-mr-2': type === 'postfix',\n }\n )}\n data-affix-type={type}\n ref={ref}>\n {children}\n </div>\n );\n })\n);\n\nexport type InputProps = InputWithoutDeprecatedFeaturesProps & {\n /** Shows a button within the input field */\n button?: React.ReactElement;\n /** Shows an icon within the input field */\n icon?: IconName | JSX.Element;\n};\n\nexport const Input = React.forwardRef(function LegacyInput(props: InputProps, ref: React.Ref<HTMLInputElement>) {\n const { button, icon, ...attributes } = props;\n\n let postfix;\n\n if (button) {\n const disabled = button.props.disabled || attributes.disabled;\n const buttonClassName = cn(\n 'items-center focus:z-10 flex justify-center rounded-l-none rounded-r h-full focus:rounded focus:outline-none',\n getButtonStateClasses(attributes.invalid, disabled),\n button.props.className\n );\n postfix = React.cloneElement(button, {\n className: buttonClassName,\n disabled,\n });\n } else if (icon) {\n postfix = typeof icon === 'string' ? <Icon name={icon} /> : icon;\n }\n\n return <InputWithoutDeprecatedFeatures {...attributes} postfix={attributes.postfix ?? postfix} ref={ref} />;\n});\n"],"names":["validSetSelectionRangeTypes","InputWithoutDeprecatedFeatures","React","props","ref","highlighted","invalid","onKeyDown","postfix","prefix","type","attributes","internalRef","useMergedRef","handleKeyDown","event","key","length","isPressingMetaKey","stopPropagation","includes","shiftKey","preventDefault","position","currentTarget","value","setSelectionRange","prefixRef","prefixRect","useBoundingClientRectListener","postfixRef","postfixRect","className","cn","getInputClasses","typeAttributes","inputMode","pattern","style","opacity","paddingLeft","width","undefined","paddingRight","Affix","children","disabled","Input","LegacyInput","button","icon","buttonClassName","getButtonStateClasses","Icon","name","_attributes$postfix"],"mappings":";;;;;;;;AAiBA,MAAMA,2BAA2B,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,CAAC;AAEhF,MAAMC,8BAA8B,gBAAGC,UAAgB,CAAC,SAASD,8BAA8BA,CAC3FE,KAA0C,EAC1CC,GAAgC;EAEhC,MAAM;IAAEC,WAAW;IAAEC,OAAO;IAAEC,SAAS;IAAEC,OAAO;IAAEC,MAAM;IAAEC,IAAI,GAAG,MAAM;IAAE,GAAGC;GAAY,GAAGR,KAAK;EAChG,MAAMS,WAAW,GAAGC,YAAY,CAAmBT,GAAG,CAAC;EAEvD,MAAMU,aAAa,GAAIC,KAA4C;;IAE/D,IAAIA,KAAK,CAACC,GAAG,CAACC,MAAM,KAAK,CAAC,IAAI,CAACC,iBAAiB,CAACH,KAAK,CAAC,EAAE;MACrDA,KAAK,CAACI,eAAe,EAAE;;;;;;IAO3B,IAAInB,2BAA2B,CAACoB,QAAQ,CAACV,IAAI,CAAC,EAAE;MAC5C,IAAI,CAACK,K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EAE7C,IAAIK,OAAO;EAEX,IAAIyC,MAAM,EAAE;IACR,MAAMH,QAAQ,GAAGG,MAAM,CAAC9C,KAAK,CAAC2C,QAAQ,IAAInC,UAAU,CAACmC,QAAQ;IAC7D,MAAMK,eAAe,GAAGlB,EAAE,CACtB,8GAA8G,EAC9GmB,qBAAqB,CAACzC,UAAU,CAACL,OAAO,EAAEwC,QAAQ,CAAC,EACnDG,MAAM,CAAC9C,KAAK,CAAC6B,SAAS,CACzB;IACDxB,OAAO,gBAAGN,YAAkB,CAAC+C,MAAM,EAAE;MACjCjB,SAAS,EAAEmB,eAAe;MAC1BL;KACH,CAAC;GACL,MAAM,IAAII,IAAI,EAAE;IACb1C,OAAO,GAAG,OAAO0C,IAAI,KAAK,QAAQ,gBAAGhD,cAACmD,IAAI;MAACC,IAAI,EAAEJ;MAAQ,GAAGA,IAAI;;EAGpE,oBAAOhD,cAACD,8BAA8B,oBAAKU,UAAU;IAAEH,OAAO,GAAA+C,mBAAA,GAAE5C,UAAU,CAACH,OAAO,cAAA+C,mBAAA,cAAAA,mBAAA,GAAI/C,OAAO;IAAEJ,GAAG,EAAEA;KAAO;AAC/G,CAAC;;;;"}
1
+ {"version":3,"file":"Input.js","sources":["../../../../../../../src/components/Input/Input.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'clsx';\nimport { Icon, IconName } from '../Icon/Icon';\nimport { getButtonStateClasses, getInputClasses } from './util';\nimport { useBoundingClientRectListener } from '../../hooks/useBoundingClientRectListener';\nimport { useMergedRef } from '../../hooks/useMergedRef';\nimport { isPressingMetaKey } from '../../utils/keyboard';\n\nexport type InputWithoutDeprecatedFeaturesProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'prefix'> & {\n /** Draws attention to the input by changing its style and making it visually prominent */\n highlighted?: boolean;\n /* Whether the input is in an invalid state */\n invalid?: boolean;\n postfix?: string | JSX.Element;\n prefix?: string | JSX.Element;\n};\n\nconst validSetSelectionRangeTypes = ['text', 'search', 'url', 'tel', 'password'];\n\nconst InputWithoutDeprecatedFeatures = React.forwardRef(function InputWithoutDeprecatedFeatures(\n props: InputWithoutDeprecatedFeaturesProps,\n ref: React.Ref<HTMLInputElement>\n) {\n const { highlighted, invalid, onKeyDown, postfix, prefix, type = 'text', ...attributes } = props;\n const internalRef = useMergedRef<HTMLInputElement>(ref);\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n // prevent any external keyboard shortcuts from executing while typing single characters in input\n if (event.key.length === 1 && !isPressingMetaKey(event)) {\n event.stopPropagation();\n }\n\n // home and end keys only navigate to the start/end of input value if the input container does not scroll\n // if it has scroll height then the browser reverts to native scrolling behaviour only\n // so we manually override it to ensure _our_ desired behaviour remains intact\n // only the 'text', 'search', 'url', 'tel', 'password' input types support setSelectionRange\n if (validSetSelectionRangeTypes.includes(type)) {\n if (!event.shiftKey && (event.key === 'Home' || event.key === 'End')) {\n event.preventDefault();\n const position = event.key === 'End' ? event.currentTarget.value.length : 0;\n event.currentTarget.setSelectionRange(position, position);\n }\n }\n\n if (typeof onKeyDown === 'function') {\n onKeyDown(event);\n }\n };\n\n const prefixRef = React.useRef<HTMLDivElement>(null);\n const prefixRect = useBoundingClientRectListener(prefixRef);\n const postfixRef = React.useRef<HTMLDivElement>(null);\n const postfixRect = useBoundingClientRectListener(postfixRef, [postfix]);\n\n const className = cn(\n getInputClasses(props),\n {\n 'pl-8': !!prefix,\n 'pr-8': !!postfix,\n },\n attributes.className\n );\n\n return (\n <div className=\"relative inline-flex w-full\" data-taco=\"input-container\" style={{ opacity: 0.999 }}>\n <input\n {...attributes}\n className={className}\n data-taco=\"input\"\n onKeyDown={handleKeyDown}\n aria-invalid={invalid}\n data-highlighted={highlighted}\n ref={internalRef}\n style={{\n paddingLeft: prefixRect ? `${prefixRect.width - 1}px` : undefined,\n paddingRight: postfixRect ? `${postfixRect.width - 1}px` : undefined,\n }}\n type={type}\n />\n {prefix ? <Affix type=\"prefix\" children={prefix} disabled={attributes.disabled} ref={prefixRef} /> : null}\n {postfix ? <Affix type=\"postfix\" children={postfix} disabled={attributes.disabled} ref={postfixRef} /> : null}\n </div>\n );\n});\n\ntype AffixProps = {\n children: string | JSX.Element;\n disabled?: boolean;\n type: 'prefix' | 'postfix';\n};\nconst Affix = React.memo(\n React.forwardRef(function Affix(props: AffixProps, ref: React.Ref<HTMLDivElement>) {\n const { children, disabled, type } = props;\n\n return (\n <div\n className={cn(\n 'group absolute top-0 flex h-full items-center justify-center px-2',\n // icon\n '[&_[data-taco=\"icon\"]]:!h-5 [&_[data-taco=\"icon\"]]:!w-5',\n {\n 'text-grey-300': disabled,\n 'text-grey-700': !disabled,\n 'left-0 [&>button]:!-ml-2': type === 'prefix',\n 'right-0 [&>button]:!-mr-2': type === 'postfix',\n }\n )}\n data-affix-type={type}\n ref={ref}>\n {children}\n </div>\n );\n })\n);\n\nexport type InputProps = InputWithoutDeprecatedFeaturesProps & {\n /** Shows a button within the input field */\n button?: React.ReactElement;\n /** Shows an icon within the input field */\n icon?: IconName | JSX.Element;\n};\n\nexport const Input = React.forwardRef(function LegacyInput(props: InputProps, ref: React.Ref<HTMLInputElement>) {\n const { button, icon, ...attributes } = props;\n\n let postfix;\n\n if (button) {\n const disabled = button.props.disabled || attributes.disabled;\n const buttonClassName = cn(\n 'items-center focus:z-10 flex justify-center rounded-l-none rounded-r h-full focus:rounded focus:outline-none',\n getButtonStateClasses(attributes.invalid, disabled),\n button.props.className\n );\n postfix = React.cloneElement(button, {\n className: buttonClassName,\n disabled,\n });\n } else if (icon) {\n postfix = typeof icon === 'string' ? <Icon name={icon} /> : icon;\n }\n\n return <InputWithoutDeprecatedFeatures {...attributes} postfix={attributes.postfix ?? postfix} ref={ref} />;\n});\n"],"names":["validSetSelectionRangeTypes","InputWithoutDeprecatedFeatures","React","props","ref","highlighted","invalid","onKeyDown","postfix","prefix","type","attributes","internalRef","useMergedRef","handleKeyDown","event","key","length","isPressingMetaKey","stopPropagation","includes","shiftKey","preventDefault","position","currentTarget","value","setSelectionRange","prefixRef","prefixRect","useBoundingClientRectListener","postfixRef","postfixRect","className","cn","getInputClasses","style","opacity","paddingLeft","width","undefined","paddingRight","Affix","children","disabled","Input","LegacyInput","button","icon","buttonClassName","getButtonStateClasses","Icon","name","_attributes$postfix"],"mappings":";;;;;;;;AAiBA,MAAMA,2BAA2B,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,CAAC;AAEhF,MAAMC,8BAA8B,gBAAGC,UAAgB,CAAC,SAASD,8BAA8BA,CAC3FE,KAA0C,EAC1CC,GAAgC;EAEhC,MAAM;IAAEC,WAAW;IAAEC,OAAO;IAAEC,SAAS;IAAEC,OAAO;IAAEC,MAAM;IAAEC,IAAI,GAAG,MAAM;IAAE,GAAGC;GAAY,GAAGR,KAAK;EAChG,MAAMS,WAAW,GAAGC,YAAY,CAAmBT,GAAG,CAAC;EAEvD,MAAMU,aAAa,GAAIC,KAA4C;;IAE/D,IAAIA,KAAK,CAACC,GAAG,CAACC,MAAM,KAAK,CAAC,IAAI,CAACC,iBAAiB,CAACH,KAAK,CAAC,EAAE;MACrDA,KAAK,CAACI,eAAe,EAAE;;;;;;IAO3B,IAAInB,2BAA2B,CAACoB,QAAQ,CAACV,IAAI,CAAC,EAAE;MAC5C,IAAI,CAACK,KAAK,CAACM,QAAQ,KAAKN,KAAK,CAACC,GAAG,KAAK,MAAM,IAAID,KAAK,CAACC,GAAG,KAAK,KAAK,CAAC,EAAE;QAClED,KAAK,CAACO,cAAc,EAAE;QACtB,MAAMC,QAAQ,GAAGR,KAAK,CAACC,GAAG,KAAK,KAAK,GAAGD,KAAK,CAACS,aAAa,CAACC,KAAK,CAACR,MAAM,GAAG,CAAC;QAC3EF,KAAK,CAACS,aAAa,CAACE,iBAAiB,CAACH,QAAQ,EAAEA,QAAQ,CAAC;;;IAIjE,IAAI,OAAOhB,SAAS,KAAK,UAAU,EAAE;MACjCA,SAAS,CAACQ,KAAK,CAAC;;GA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AAA,GAAEzC,UAAU,CAACH,OAAO,cAAA4C,mBAAA,cAAAA,mBAAA,GAAI5C,OAAO;IAAEJ,GAAG,EAAEA;KAAO;AAC/G,CAAC;;;;"}
@@ -4992,22 +4992,13 @@ const InputWithoutDeprecatedFeatures = /*#__PURE__*/React.forwardRef(function In
4992
4992
  'pl-8': !!prefix,
4993
4993
  'pr-8': !!postfix
4994
4994
  }, attributes.className);
4995
- const typeAttributes = {
4996
- type
4997
- };
4998
- // https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/
4999
- if (type === 'number') {
5000
- typeAttributes.type = 'text';
5001
- typeAttributes.inputMode = 'numeric';
5002
- typeAttributes.pattern = '[0-9]*';
5003
- }
5004
4995
  return /*#__PURE__*/React.createElement("div", {
5005
4996
  className: "relative inline-flex w-full",
5006
4997
  "data-taco": "input-container",
5007
4998
  style: {
5008
4999
  opacity: 0.999
5009
5000
  }
5010
- }, /*#__PURE__*/React.createElement("input", Object.assign({}, attributes, typeAttributes, {
5001
+ }, /*#__PURE__*/React.createElement("input", Object.assign({}, attributes, {
5011
5002
  className: className,
5012
5003
  "data-taco": "input",
5013
5004
  onKeyDown: handleKeyDown,
@@ -5017,7 +5008,8 @@ const InputWithoutDeprecatedFeatures = /*#__PURE__*/React.forwardRef(function In
5017
5008
  style: {
5018
5009
  paddingLeft: prefixRect ? `${prefixRect.width - 1}px` : undefined,
5019
5010
  paddingRight: postfixRect ? `${postfixRect.width - 1}px` : undefined
5020
- }
5011
+ },
5012
+ type: type
5021
5013
  })), prefix ? /*#__PURE__*/React.createElement(Affix, {
5022
5014
  type: "prefix",
5023
5015
  children: prefix,