{"_id":"@9oelm/styled-system-typescript","_rev":"3-fea56498db5806fc378b98cd17f9a4e7","name":"@9oelm/styled-system-typescript","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@9oelm/styled-system-typescript","version":"0.1.0","main":"index.ts","repository":{"type":"git","url":"https://github.com/9oelM/styled-system-ts.git"},"author":{"name":"9oelM","email":"hj923@hotmail.com"},"license":"MIT","dependencies":{"styled-components":"^5.2.0"},"devDependencies":{"@types/react":"^16.9.53","@types/styled-components":"^5.1.4","react":"^17.0.1","typescript":"^4.0.3"},"description":"Typescript-only styled system solution","licenseText":"MIT License\n\nCopyright (c) 2020 Joel M\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@9oelm/styled-system-typescript@0.1.0","dist":{"shasum":"0e2bc7e806a59648abdd4479ff8c2e151e33f883","integrity":"sha512-3MCQBvfIIqRiqRNnsZu81DztODDk/51dIPD0aUhc9LrwrlvnX/2zEm8DV8xtBKqgYK9vjqbZPPd4yC2nMpM2qA==","tarball":"https://registry.npmjs.org/@9oelm/styled-system-typescript/-/styled-system-typescript-0.1.0.tgz","fileCount":7,"unpackedSize":10810,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJflArVCRA9TVsSAnZWagAA6HkP/1MGX9PeCAOszCPar4o+\nY+AqbS58ddj8rNVDLrlbof1oNk42JcyPeJ1lyvVusEXf7qTnw92MEQ6evgDg\nMSj2+qTMEtXHlw1Xf6B0ddKWDO64PIeREwhufeAIJ5ejKrs0Es5IIZ7Q86Ge\nXIPPv6I9JVDPBd4hIapXFZd+C/gC/K/065GlXbAGDk0m66j6MT96bpEYGvzT\nz1T+YG7h0HWkXPIU2vyNZhfeKXFasC/v6i6FPqHgrQ62E4RWskRQh0vcMjUM\nzNW47sXF5nGtbBqICT5I+Jy3MpjXG1ShByHjpCze1P91Z4U7J1vhO+42xWHH\nuN4TBKVOUwqyV+ulERycp9fVIXTDdKiPLIkRUu60pGIM6rv2mdIdC0n8B6pM\no0cKfYWhNgnS7IPAGRHfi+b3TPYjFOz+sSJ0jAJn3bnAH4jEpzZ9zstFnBgj\nQz8CeZ5a0Ezc3yTjISPs26olPE9RsthhBhht62eaq/R58NZHeAJMTzE++7j2\nVGhNzSJ7YlcrtE6xxEMoBlk50JwEK1QK3ZJ48oa5SeDFpvH0ha/WgKdwzsMJ\nBNkZbQI3GWNSkaWGjBlltenClqRTctmT+I5s8AEVOh6u1KhF+Yq9HQNuaVHA\nOnXPwH6C16pa5InaHn1JGbeESZGWWNPZ4DjnXJD/zfm0/cRhyunxbNx7VTf7\nvNV1\r\n=75W8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFtcCD0DG0BpMUnENC/Znmo/k3kfjV7gSWSeeJRovKQaAiBI7pEJp/1KotuesjkCs41VF6NHUrzhZqW9V4NjbeXAtg=="}]},"maintainers":[{"name":"9oelm","email":"whymemememe@gmail.com"}],"_npmUser":{"name":"9oelm","email":"whymemememe@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/styled-system-typescript_0.1.0_1603537621265_0.796598297439596"},"_hasShrinkwrap":false},"0.1.1":{"name":"@9oelm/styled-system-typescript","version":"0.1.1","main":"index.ts","repository":{"type":"git","url":"https://github.com/9oelM/styled-system-typescript.git"},"author":{"name":"9oelM","email":"hj923@hotmail.com"},"license":"MIT","dependencies":{"styled-components":"^5.2.0"},"devDependencies":{"@types/react":"^16.9.53","@types/styled-components":"^5.1.4","react":"^17.0.1","typescript":"^4.0.3"},"description":"Typescript-only styled system solution","licenseText":"MIT License\n\nCopyright (c) 2020 Joel M\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@9oelm/styled-system-typescript@0.1.1","dist":{"shasum":"72a696315489934062e8725a31098ff2a4a50447","integrity":"sha512-xh9gU8sJl5MI8tBRHgsYJWX383D5ZezD8+KGwlWz6NzE59aaSKEpMVtmNr5HcZrTnSN5rf5kXbOLcXTCXXxZxw==","tarball":"https://registry.npmjs.org/@9oelm/styled-system-typescript/-/styled-system-typescript-0.1.1.tgz","fileCount":7,"unpackedSize":11759,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJflA0jCRA9TVsSAnZWagAA2XUQAKEvmgn2XeXwC6wY+gTq\nfBMwFXUarT7RnzyAGAz39VklcZ/Ldwn4JJbKz9lX0QmnXJsBCERLSwT04YTK\nElzjIWd0UyjGqr0W2jY/sHPlpecdyt3FpTkbzEBI3wW7y/YfPHWy2tHIXWiq\nZLpY8G8dWdc5a4dTHrE8dgEWEvHcVA/pGF63mKANhOTiwLXoHlIq7BSIpmF4\nrrC08yq5jhk4K9iW1JxArQ8DjaPckphkbw3EQnfE5sOQ6SN4CcUkohN9m037\nn20/+a5THoi9X3E4Y2O/S6QSRqLCysr4RNDo/ID6jZpfVH5ssk6IiiSrc281\neZNkovJ9uNlH1+uOxKM3/vNFmox/sdrYzuNjUUl8qgBZYMU8w171WrWFywDg\nJOjwX9/sCh0femTD6QsS1FEBcfQxEYRI6pKtrlseBGEWTUIvc8dwUXgkxC57\neBmFx4Ak6Til1mtIkOicK5Y+Yzx+VuXq3IMDJgGIExtwIMLQlwVnRu/N1b5Y\nRcyx3Fl6n1xSxzfuk4ZCfyXX97hpY0+cI9yKw7Y3ue2mJIYanMex7wbuYCI8\nTQdpgMZ0EE0sGhxXWdRFH0cafg8SWSIN2J9+raXvmv/N3L2p7GtA5ggWS0bu\nzbfMQRfTqmcSh6r+VBRvFYEdhf6kr6Oh7MGKhvAm5iJ3v/U0LnrqmeyWRQ9U\ncuoN\r\n=2xeg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDrnDE/HrRevlrE2bXKcWlD8JoA3PVwNCXfZ7ZuNOtoCAIgYfh6ww3OeyyAOQc2eCVsDL+1Tc9rSL0Z2MRJFS1r3mo="}]},"maintainers":[{"name":"9oelm","email":"whymemememe@gmail.com"}],"_npmUser":{"name":"9oelm","email":"whymemememe@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/styled-system-typescript_0.1.1_1603538210847_0.3031325052114362"},"_hasShrinkwrap":false},"0.1.2":{"name":"@9oelm/styled-system-typescript","version":"0.1.2","main":"index.ts","repository":{"type":"git","url":"https://github.com/9oelM/styled-system-typescript.git"},"author":{"name":"9oelM","email":"hj923@hotmail.com"},"license":"MIT","dependencies":{"styled-components":"^5.2.0"},"devDependencies":{"@types/react":"^16.9.53","@types/styled-components":"^5.1.4","react":"^17.0.1","typescript":"^4.0.3"},"description":"Typescript-only styled system solution","licenseText":"MIT License\n\nCopyright (c) 2020 Joel M\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@9oelm/styled-system-typescript@0.1.2","dist":{"shasum":"98cd7f11028b8a2da628e45ffb4172449264da9d","integrity":"sha512-O8lZW5zVC6xhDDOKSGAHvx/tiAkqaBpk4HwclZg+71LQYpR6L0YP2le7eq1UT7LajAsqdjvMhVbB1TpPvdE0JA==","tarball":"https://registry.npmjs.org/@9oelm/styled-system-typescript/-/styled-system-typescript-0.1.2.tgz","fileCount":7,"unpackedSize":10908,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJflLSMCRA9TVsSAnZWagAAcJsP/2AjowVZRTDsrGLIGyuE\n8XB8KB1uVb2FC5cGkmejlkXsgQ3u26m77J8L+V7xwy7GrFRtG/dB74TECl55\n1qzjoFaU5Ay/I0AWLqnHSTE/AbZarva8iqrrjDlf12A8BAZOLWmQ/lJ3SowS\nFpJcL870neqA1ORSDAUNEWJQgZL84D1dpxeoyH5fPvY2oNOkVyxjvoRBBcFw\n0H+iB0LD20XYsjgaMZ5C2zXZoDUP3CGmHl/MIOj7pBixKDPcA8zg7BWWOJcT\n76NdR83IU8jRcBv9VmXjSCCSf5CEW+bEbz/xlkGlSKXYQVyAiLzz/Qzr0kTp\nTFFEUEVu/wMcVwbrs/rWHhXMEmZ2EFg6sWQvA22qZWjuDMHeurRfSEGYUBxi\nnrMeosz0eX7zjExLv8tCtQOh37vRFBRZek/SbtwwG5+EMyNT0XG3gCpLWY78\nDYPceAnbabP1XhpYT7lBG87DmZYUovBRT8N0Xss+XaXc5m+n4xhagWkL8BqH\nX2KI/xcAgf1C5jL1TEwwdNrFMr6YANsq+DO0dO2zMRh4q1smhN346rVVaSAV\nMWfhGOh84rJJTH3Eb114wF3fweyZ6V4KKZ6HDtLRmSLBytvicVbR+F8+hX3j\nzqRwMbR7txC52iTYDCfndngWeJbZhC/oYiVL/E33V1XwDcLRG52zTlLKr6Co\n9GU+\r\n=30J0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDLrt/+/jscdv5e8EdOab32GKlqMkDSgQbbbvs1K7oZvQIhAOrey8kaHfVl+KwFIT15I2307GnDtIPh6kd+hUadDaE8"}]},"maintainers":[{"name":"9oelm","email":"whymemememe@gmail.com"}],"_npmUser":{"name":"9oelm","email":"whymemememe@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/styled-system-typescript_0.1.2_1603581068210_0.3500620586439773"},"_hasShrinkwrap":false}},"time":{"created":"2020-10-24T11:07:01.218Z","0.1.0":"2020-10-24T11:07:01.497Z","modified":"2022-04-04T10:51:17.124Z","0.1.1":"2020-10-24T11:16:50.959Z","0.1.2":"2020-10-24T23:11:08.349Z"},"maintainers":[{"name":"9oelm","email":"whymemememe@gmail.com"}],"description":"Typescript-only styled system solution","repository":{"type":"git","url":"https://github.com/9oelM/styled-system-typescript.git"},"author":{"name":"9oelM","email":"hj923@hotmail.com"},"license":"MIT","readme":"# @9oelm/styled-system-typescript\nTypescript-only styled system solution\n\n```\nnpm i @9oelm/styled-system-typescript\n\nyarn add @9oelm/styled-system-typescript\n```\n\n## Example\n\n```ts\nimport styled from 'styled-components'\nimport { WithSpecifiedStyles } from '@9oelm/styled-system-typescript'\n \nconst Box = styled.div(\n  {\n    backgroundColor: \"#333333\",\n    height: 20,\n  },\n  (styles: PickStyles<\"margin\" | \"height\" | \"width\">) => styles\n)\n\nconst MyComponent = () => {\n  <Box margin={10} height={60} width={10}>\n    Hi\n  </Box>\n}\n```\n\n## Rationale\nSometimes you want to dynamically adjust styles of a component made from `styled-component` by injecting custom styles. If you are using typescript, this would help you achieve that without any additional javascript. It is only done with typescript.\n\n## API\n\n`Identity` and `identity`: \n```typescript\ntype Identity<Self = any> = (x: Self) => Self;\n\nconst withSpecifiedStyles: <Self>() => Identity<Self> = () => (x) => x;\n```\n\n`WithSpecifiedStyles`: \n```typescript\ntype WithSpecifiedStyles<\n  Styles extends keyof CSSProperties = keyof CSSProperties\n> = Identity<{ [K in Styles]?: string | number }>;\n```\n\n`PickStyles`:\n```typescript\ntype PickStyles<Styles extends keyof CSSProperties = keyof CSSProperties> = {\n  [K in Styles]?: string | number;\n};\n```\n\n`GetStylesFrom`:\n```typescript\ntype GetStylesFrom<\n  WithSpecifiedStyleFn extends WithSpecifiedStyles\n> = ReturnType<WithSpecifiedStyleFn>;\n```\n\n","readmeFilename":"README.md"}