@atom-learning/components 2.54.1 → 2.54.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,9 +1,9 @@
1
- ## [2.54.1](https://github.com/Atom-Learning/components/compare/v2.54.0...v2.54.1) (2023-05-09)
1
+ ## [2.54.2](https://github.com/Atom-Learning/components/compare/v2.54.1...v2.54.2) (2023-05-10)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
- * positioning of tick icon on Checkbox ([6d42a51](https://github.com/Atom-Learning/components/commit/6d42a5127c5b6c4b6a16c49f6136c8af54b981a7))
6
+ * added line height to input for md and sm sizes, updated lots of snapshots ([297e29b](https://github.com/Atom-Learning/components/commit/297e29bc5e8e3ce07bc4ad0f18230f13c9101345))
7
7
 
8
8
  # [1.4.0](https://github.com/Atom-Learning/components/compare/v1.3.0...v1.4.0) (2022-04-11)
9
9
 
@@ -1,2 +1,2 @@
1
- import*as o from"react";import{styled as l}from"../../stitches.js";const n=l("input",{appearance:"none",border:"1px solid $tonal400",borderRadius:"$0",boxShadow:"none",boxSizing:"border-box",color:"$tonal600",cursor:"text",display:"block",fontFamily:"$body",px:"$3",transition:"all 100ms ease-out",width:"100%","&:focus":{borderColor:"$primary",outline:"none"},"&[disabled]":{backgroundColor:"$tonal100",color:"$tonal400",cursor:"not-allowed"},"&::placeholder":{color:"$tonal300",opacity:1},variants:{size:{sm:{height:"$3",fontSize:"$sm"},md:{height:"$4",fontSize:"$md"}},state:{error:{border:"1px solid $danger"}}}}),i=o.forwardRef(({type:e="text",size:t="md",...r},a)=>e==="number"?o.createElement(n,{type:"text",inputMode:"numeric",pattern:"[0-9]*",size:t,...r,ref:a}):o.createElement(n,{type:e,size:t,...r,ref:a}));i.displayName="Input";export{i as Input};
1
+ import*as e from"react";import{styled as l}from"../../stitches.js";const i=l("input",{appearance:"none",border:"1px solid $tonal400",borderRadius:"$0",boxShadow:"none",boxSizing:"border-box",color:"$tonal600",cursor:"text",display:"block",fontFamily:"$body",px:"$3",transition:"all 100ms ease-out",width:"100%","&:focus":{borderColor:"$primary",outline:"none"},"&[disabled]":{backgroundColor:"$tonal100",color:"$tonal400",cursor:"not-allowed"},"&::placeholder":{color:"$tonal300",opacity:1},variants:{size:{sm:{height:"$3",fontSize:"$sm",lineHeight:1.7},md:{height:"$4",fontSize:"$md",lineHeight:2}},state:{error:{border:"1px solid $danger"}}}}),a=e.forwardRef(({type:o="text",size:t="md",...r},n)=>o==="number"?e.createElement(i,{type:"text",inputMode:"numeric",pattern:"[0-9]*",size:t,...r,ref:n}):e.createElement(i,{type:o,size:t,...r,ref:n}));a.displayName="Input";export{a as Input};
2
2
  //# sourceMappingURL=Input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input.js","sources":["../../../src/components/input/Input.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/stitches'\nimport { Override } from '~/utilities/types'\n\nconst StyledInput = styled('input', {\n appearance: 'none',\n border: '1px solid $tonal400',\n borderRadius: '$0',\n boxShadow: 'none', // prevent default iOS default styling\n boxSizing: 'border-box',\n color: '$tonal600',\n cursor: 'text',\n display: 'block',\n fontFamily: '$body',\n px: '$3',\n transition: 'all 100ms ease-out',\n width: '100%',\n '&:focus': {\n borderColor: '$primary',\n outline: 'none'\n },\n '&[disabled]': {\n backgroundColor: '$tonal100',\n color: '$tonal400',\n cursor: 'not-allowed'\n },\n '&::placeholder': {\n color: '$tonal300',\n opacity: 1\n },\n variants: {\n size: {\n sm: {\n height: '$3',\n fontSize: '$sm'\n },\n md: {\n height: '$4',\n fontSize: '$md'\n }\n },\n state: {\n error: {\n border: '1px solid $danger'\n }\n }\n }\n})\n\n// override default 'type' property to prevent Input from being used to render\n// checkboxes, radios etc — we have dedicated components for them\nexport type InputProps = Override<\n React.ComponentProps<typeof StyledInput>,\n {\n name: string\n as?: never\n type?: 'text' | 'number' | 'email' | 'password' | 'tel' | 'url' | 'search'\n }\n>\n\nexport const Input: React.FC<InputProps> = React.forwardRef(\n ({ type = 'text', size = 'md', ...rest }, ref) => {\n if (type === 'number') {\n return (\n <StyledInput\n type=\"text\"\n inputMode=\"numeric\"\n pattern=\"[0-9]*\"\n size={size}\n {...rest}\n ref={ref}\n />\n )\n }\n\n return <StyledInput type={type} size={size} {...rest} ref={ref} />\n }\n)\n\nInput.displayName = 'Input'\n"],"names":["StyledInput","styled","Input","React","type","size","rest","ref"],"mappings":"mEAKA,MAAMA,EAAcC,EAAO,QAAS,CAClC,WAAY,OACZ,OAAQ,sBACR,aAAc,KACd,UAAW,OACX,UAAW,aACX,MAAO,YACP,OAAQ,OACR,QAAS,QACT,WAAY,QACZ,GAAI,KACJ,WAAY,qBACZ,MAAO,OACP,UAAW,CACT,YAAa,WACb,QAAS,MACX,EACA,cAAe,CACb,gBAAiB,YACjB,MAAO,YACP,OAAQ,aACV,EACA,iBAAkB,CAChB,MAAO,YACP,QAAS,CACX,EACA,SAAU,CACR,KAAM,CACJ,GAAI,CACF,OAAQ,KACR,SAAU,KACZ,EACA,GAAI,CACF,OAAQ,KACR,SAAU,KACZ,CACF,EACA,MAAO,CACL,MAAO,CACL,OAAQ,mBACV,CACF,CACF,CACF,CAAC,EAaYC,EAA8BC,EAAM,WAC/C,CAAC,CAAE,KAAAC,EAAO,OAAQ,KAAAC,EAAO,QAASC,CAAK,EAAGC,IACpCH,IAAS,SAETD,EAAA,cAACH,EAAA,CACC,KAAK,OACL,UAAU,UACV,QAAQ,SACR,KAAMK,EACL,GAAGC,EACJ,IAAKC,CAAAA,CACP,EAIGJ,EAAA,cAACH,EAAA,CAAY,KAAMI,EAAM,KAAMC,EAAO,GAAGC,EAAM,IAAKC,CAAAA,CAAK,CAEpE,EAEAL,EAAM,YAAc"}
1
+ {"version":3,"file":"Input.js","sources":["../../../src/components/input/Input.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/stitches'\nimport { Override } from '~/utilities/types'\n\nconst StyledInput = styled('input', {\n appearance: 'none',\n border: '1px solid $tonal400',\n borderRadius: '$0',\n boxShadow: 'none', // prevent default iOS default styling\n boxSizing: 'border-box',\n color: '$tonal600',\n cursor: 'text',\n display: 'block',\n fontFamily: '$body',\n px: '$3',\n transition: 'all 100ms ease-out',\n width: '100%',\n '&:focus': {\n borderColor: '$primary',\n outline: 'none'\n },\n '&[disabled]': {\n backgroundColor: '$tonal100',\n color: '$tonal400',\n cursor: 'not-allowed'\n },\n '&::placeholder': {\n color: '$tonal300',\n opacity: 1\n },\n variants: {\n size: {\n sm: {\n height: '$3',\n fontSize: '$sm',\n lineHeight: 1.7\n },\n md: {\n height: '$4',\n fontSize: '$md',\n lineHeight: 2\n }\n },\n state: {\n error: {\n border: '1px solid $danger'\n }\n }\n }\n})\n\n// override default 'type' property to prevent Input from being used to render\n// checkboxes, radios etc — we have dedicated components for them\nexport type InputProps = Override<\n React.ComponentProps<typeof StyledInput>,\n {\n name: string\n as?: never\n type?: 'text' | 'number' | 'email' | 'password' | 'tel' | 'url' | 'search'\n }\n>\n\nexport const Input: React.FC<InputProps> = React.forwardRef(\n ({ type = 'text', size = 'md', ...rest }, ref) => {\n if (type === 'number') {\n return (\n <StyledInput\n type=\"text\"\n inputMode=\"numeric\"\n pattern=\"[0-9]*\"\n size={size}\n {...rest}\n ref={ref}\n />\n )\n }\n\n return <StyledInput type={type} size={size} {...rest} ref={ref} />\n }\n)\n\nInput.displayName = 'Input'\n"],"names":["StyledInput","styled","Input","React","type","size","rest","ref"],"mappings":"mEAKA,MAAMA,EAAcC,EAAO,QAAS,CAClC,WAAY,OACZ,OAAQ,sBACR,aAAc,KACd,UAAW,OACX,UAAW,aACX,MAAO,YACP,OAAQ,OACR,QAAS,QACT,WAAY,QACZ,GAAI,KACJ,WAAY,qBACZ,MAAO,OACP,UAAW,CACT,YAAa,WACb,QAAS,MACX,EACA,cAAe,CACb,gBAAiB,YACjB,MAAO,YACP,OAAQ,aACV,EACA,iBAAkB,CAChB,MAAO,YACP,QAAS,CACX,EACA,SAAU,CACR,KAAM,CACJ,GAAI,CACF,OAAQ,KACR,SAAU,MACV,WAAY,GACd,EACA,GAAI,CACF,OAAQ,KACR,SAAU,MACV,WAAY,CACd,CACF,EACA,MAAO,CACL,MAAO,CACL,OAAQ,mBACV,CACF,CACF,CACF,CAAC,EAaYC,EAA8BC,EAAM,WAC/C,CAAC,CAAE,KAAAC,EAAO,OAAQ,KAAAC,EAAO,QAASC,CAAK,EAAGC,IACpCH,IAAS,SAETD,EAAA,cAACH,EAAA,CACC,KAAK,OACL,UAAU,UACV,QAAQ,SACR,KAAMK,EACL,GAAGC,EACJ,IAAKC,CACP,CAAA,EAIGJ,EAAA,cAACH,EAAA,CAAY,KAAMI,EAAM,KAAMC,EAAO,GAAGC,EAAM,IAAKC,CAAAA,CAAK,CAEpE,EAEAL,EAAM,YAAc"}