@looker/run-it 0.9.39 → 0.9.40
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +12 -0
- package/lib/components/MethodBadge/MethodBadge.d.ts +1 -1
- package/lib/components/MethodBadge/MethodBadge.js +1 -0
- package/lib/components/MethodBadge/MethodBadge.js.map +1 -1
- package/lib/esm/components/MethodBadge/MethodBadge.js +1 -0
- package/lib/esm/components/MethodBadge/MethodBadge.js.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
### [0.9.40](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.39...run-it-v0.9.40) (2022-10-17)
|
4
|
+
|
5
|
+
|
6
|
+
### Dependencies
|
7
|
+
|
8
|
+
* The following workspace dependencies were updated
|
9
|
+
* dependencies
|
10
|
+
* @looker/code-editor bumped from ^0.1.24 to ^0.1.25
|
11
|
+
* @looker/extension-utils bumped from ^0.1.16 to ^0.1.17
|
12
|
+
* @looker/sdk bumped from ^22.16.0 to ^22.18.0
|
13
|
+
* @looker/sdk-codegen bumped from ^21.7.1 to ^21.7.2
|
14
|
+
|
3
15
|
### [0.9.39](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.38...run-it-v0.9.39) (2022-09-21)
|
4
16
|
|
5
17
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { CompatibleHTMLProps, TypographyProps } from '@looker/design-tokens';
|
2
2
|
import type { HttpMethod } from '@looker/sdk-rtl';
|
3
|
-
declare type MethodStatus = 'beta' | 'stable' | 'experimental' | 'deprecated' | 'inform' | 'undocumented';
|
3
|
+
declare type MethodStatus = 'alpha' | 'beta' | 'stable' | 'experimental' | 'deprecated' | 'inform' | 'undocumented';
|
4
4
|
interface MethodBadgeProps extends CompatibleHTMLProps<HTMLDivElement>, TypographyProps {
|
5
5
|
type: HttpMethod | MethodStatus | string;
|
6
6
|
compact?: boolean;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/MethodBadge/MethodBadge.tsx"],"names":["pickBadgeIntent","type","cssForIntent","intent","css","theme","colors","MethodBadge","styled","div","attrs","fontSize","fontWeight","minWidth","typography","titleStatus","ui1","radii","medium","compact","space","xxsmall","none","xsmall"],"mappings":";;;;;;;AA8BA;;AAMA;;;;;;
|
1
|
+
{"version":3,"sources":["../../../src/components/MethodBadge/MethodBadge.tsx"],"names":["pickBadgeIntent","type","cssForIntent","intent","css","theme","colors","MethodBadge","styled","div","attrs","fontSize","fontWeight","minWidth","typography","titleStatus","ui1","radii","medium","compact","space","xxsmall","none","xsmall"],"mappings":";;;;;;;AA8BA;;AAMA;;;;;;AAmCO,IAAMA,eAAe,GAAIC,IAAD,IAA8C;AAC3E,UAAQA,IAAR;AACE,SAAK,OAAL;AACA,SAAK,QAAL;AACA,SAAK,YAAL;AACE,aAAO,UAAP;;AACF,SAAK,MAAL;AACE,aAAO,SAAP;;AACF,SAAK,OAAL;AACA,SAAK,OAAL;AACA,SAAK,cAAL;AACA,SAAK,cAAL;AACE,aAAO,MAAP;;AACF,SAAK,MAAL;AACA,SAAK,QAAL;AACE,aAAO,UAAP;;AACF,SAAK,KAAL;AACA,SAAK,MAAL;AACE,aAAO,KAAP;;AACF,SAAK,KAAL;AACA;AACE,aAAO,QAAP;AApBJ;AAsBD,CAvBM;;;;AAyBA,IAAMC,YAAY,GAAIC,MAAD,QAC1BC,qBAD0B,mCAEV,iCAAcD,MAAd,EAAsB,CAAtB,CAFU,EAGf;AAAA,MAAC;AAAEE,IAAAA;AAAF,GAAD;AAAA,SAAe,mCAAgBA,KAAK,CAACC,MAAN,CAAaH,MAAb,CAAhB,CAAf;AAAA,CAHe,CAArB;;;;AAMA,IAAMI,WAAW,GAAGC,0BAAOC,GAAP,CAAWC,KAAX,CACzB;AAAA,MAAC;AACCC,IAAAA,QAAQ,GAAG,QADZ;AAECC,IAAAA,UAAU,GAAG,UAFd;AAGCC,IAAAA,QAAQ,GAAG;AAHZ,GAAD;AAAA,SAIyB;AACvBF,IAAAA,QADuB;AAEvBC,IAAAA,UAFuB;AAGvBC,IAAAA;AAHuB,GAJzB;AAAA,CADyB,CAAH;AAAA;AAAA;AAAA,oHAWpBC,wBAXoB,EAapB;AAAA,MAAC;AAAEb,IAAAA;AAAF,GAAD;AAAA,SAAcC,YAAY,CAACF,eAAe,CAACC,IAAD,CAAhB,CAA1B;AAAA,CAboB,EAeR;AAAA,MAAC;AAAEA,IAAAA,IAAF;AAAQc,IAAAA,WAAR;AAAqBV,IAAAA,KAAK,EAAE;AAAEC,MAAAA;AAAF;AAA5B,GAAD;AAAA,SACZS,WAAW,GAAGT,MAAM,CAACU,GAAV,GAAgB,iCAAchB,eAAe,CAACC,IAAD,CAA7B,EAAqC,CAArC,CADf;AAAA,CAfQ,EAkBL;AAAA,MAAC;AAAEI,IAAAA,KAAK,EAAE;AAAEY,MAAAA;AAAF;AAAT,GAAD;AAAA,SAA0BA,KAAK,CAACC,MAAhC;AAAA,CAlBK,EAqBpB;AAAA,MAAC;AAAEC,IAAAA;AAAF,GAAD;AAAA,SAAiBA,OAAO,qBAAxB;AAAA,CArBoB,EAuBT;AAAA,MAAC;AAAEN,IAAAA;AAAF,GAAD;AAAA,SAAkBA,QAAlB;AAAA,CAvBS,EAwBX;AAAA,MAAC;AAAEM,IAAAA,OAAF;AAAWd,IAAAA,KAAK,EAAE;AAAEe,MAAAA;AAAF;AAAlB,GAAD;AAAA,mBACNA,KAAK,CAACC,OADA,cACWF,OAAO,GAAGC,KAAK,CAACE,IAAT,GAAgBF,KAAK,CAACG,MADxC;AAAA,CAxBW,CAAjB","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type {\n CompatibleHTMLProps,\n TypographyProps,\n} from '@looker/design-tokens'\nimport {\n generatePressed,\n intentUIBlend,\n typography,\n} from '@looker/design-tokens'\nimport type { HttpMethod } from '@looker/sdk-rtl'\nimport styled, { css } from 'styled-components'\n\n/**\n * Status of endpoint method.\n */\ntype MethodStatus =\n | 'alpha'\n | 'beta'\n | 'stable'\n | 'experimental'\n | 'deprecated'\n | 'inform'\n | 'undocumented'\n\ninterface MethodBadgeProps\n extends CompatibleHTMLProps<HTMLDivElement>,\n TypographyProps {\n /** Determines background color */\n type: HttpMethod | MethodStatus | string\n compact?: boolean\n minWidth?: string\n titleStatus?: boolean\n}\n\n/**\n * Intent names to display the correct color for the badge based on the HTTP method or method status.\n */\ntype ApixIntentNames =\n | 'critical'\n | 'inform'\n | 'key'\n | 'neutral'\n | 'positive'\n | 'warn'\n\nexport const pickBadgeIntent = (type: HttpMethod | MethodStatus | string) => {\n switch (type) {\n case 'alpha':\n case 'DELETE':\n case 'deprecated':\n return 'critical'\n case 'HEAD':\n return 'neutral'\n case 'PATCH':\n case 'TRACE':\n case 'experimental':\n case 'undocumented':\n return 'warn'\n case 'POST':\n case 'stable':\n return 'positive'\n case 'PUT':\n case 'beta':\n return 'key'\n case 'GET':\n default:\n return 'inform'\n }\n}\n\nexport const cssForIntent = (intent: ApixIntentNames) =>\n css`\n background: ${intentUIBlend(intent, 1)};\n color: ${({ theme }) => generatePressed(theme.colors[intent])};\n `\n\nexport const MethodBadge = styled.div.attrs(\n ({\n fontSize = 'xsmall',\n fontWeight = 'semiBold',\n minWidth = '2.5rem',\n }: MethodBadgeProps) => ({\n fontSize,\n fontWeight,\n minWidth,\n })\n)<MethodBadgeProps>`\n ${typography}\n\n ${({ type }) => cssForIntent(pickBadgeIntent(type))};\n\n background: ${({ type, titleStatus, theme: { colors } }) =>\n titleStatus ? colors.ui1 : intentUIBlend(pickBadgeIntent(type), 1)};\n border: 1px solid transparent;\n border-radius: ${({ theme: { radii } }) => radii.medium};\n\n /** NOTE: This is below minimum accessibility threshold font-size */\n ${({ compact }) => compact && `font-size: 9px;`}\n\n min-width: ${({ minWidth }) => minWidth};\n padding: ${({ compact, theme: { space } }) =>\n `${space.xxsmall} ${compact ? space.none : space.xsmall}`};\n`\n"],"file":"MethodBadge.js"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/MethodBadge/MethodBadge.tsx"],"names":["generatePressed","intentUIBlend","typography","styled","css","pickBadgeIntent","type","cssForIntent","intent","theme","colors","MethodBadge","div","attrs","fontSize","fontWeight","minWidth","titleStatus","ui1","radii","medium","compact","space","xxsmall","none","xsmall"],"mappings":"AA8BA,SACEA,eADF,EAEEC,aAFF,EAGEC,UAHF,QAIO,uBAJP;AAMA,OAAOC,MAAP,IAAiBC,GAAjB,QAA4B,mBAA5B;
|
1
|
+
{"version":3,"sources":["../../../../src/components/MethodBadge/MethodBadge.tsx"],"names":["generatePressed","intentUIBlend","typography","styled","css","pickBadgeIntent","type","cssForIntent","intent","theme","colors","MethodBadge","div","attrs","fontSize","fontWeight","minWidth","titleStatus","ui1","radii","medium","compact","space","xxsmall","none","xsmall"],"mappings":"AA8BA,SACEA,eADF,EAEEC,aAFF,EAGEC,UAHF,QAIO,u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AAE;AAAEC,MAAAA;AAAF;AAA5B,GAAD;AAAA,SACZO,WAAW,GAAGP,MAAM,CAACQ,GAAV,GAAgBjB,aAAa,CAACI,eAAe,CAACC,IAAD,CAAhB,EAAwB,CAAxB,CAD5B;AAAA,CAfQ,EAkBL;AAAA,MAAC;AAAEG,IAAAA,KAAK,EAAE;AAAEU,MAAAA;AAAF;AAAT,GAAD;AAAA,SAA0BA,KAAK,CAACC,MAAhC;AAAA,CAlBK,EAqBpB;AAAA,MAAC;AAAEC,IAAAA;AAAF,GAAD;AAAA,SAAiBA,OAAO,qBAAxB;AAAA,CArBoB,EAuBT;AAAA,MAAC;AAAEL,IAAAA;AAAF,GAAD;AAAA,SAAkBA,QAAlB;AAAA,CAvBS,EAwBX;AAAA,MAAC;AAAEK,IAAAA,OAAF;AAAWZ,IAAAA,KAAK,EAAE;AAAEa,MAAAA;AAAF;AAAlB,GAAD;AAAA,mBACNA,KAAK,CAACC,OADA,cACWF,OAAO,GAAGC,KAAK,CAACE,IAAT,GAAgBF,KAAK,CAACG,MADxC;AAAA,CAxBW,CAAjB","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type {\n CompatibleHTMLProps,\n TypographyProps,\n} from '@looker/design-tokens'\nimport {\n generatePressed,\n intentUIBlend,\n typography,\n} from '@looker/design-tokens'\nimport type { HttpMethod } from '@looker/sdk-rtl'\nimport styled, { css } from 'styled-components'\n\n/**\n * Status of endpoint method.\n */\ntype MethodStatus =\n | 'alpha'\n | 'beta'\n | 'stable'\n | 'experimental'\n | 'deprecated'\n | 'inform'\n | 'undocumented'\n\ninterface MethodBadgeProps\n extends CompatibleHTMLProps<HTMLDivElement>,\n TypographyProps {\n /** Determines background color */\n type: HttpMethod | MethodStatus | string\n compact?: boolean\n minWidth?: string\n titleStatus?: boolean\n}\n\n/**\n * Intent names to display the correct color for the badge based on the HTTP method or method status.\n */\ntype ApixIntentNames =\n | 'critical'\n | 'inform'\n | 'key'\n | 'neutral'\n | 'positive'\n | 'warn'\n\nexport const pickBadgeIntent = (type: HttpMethod | MethodStatus | string) => {\n switch (type) {\n case 'alpha':\n case 'DELETE':\n case 'deprecated':\n return 'critical'\n case 'HEAD':\n return 'neutral'\n case 'PATCH':\n case 'TRACE':\n case 'experimental':\n case 'undocumented':\n return 'warn'\n case 'POST':\n case 'stable':\n return 'positive'\n case 'PUT':\n case 'beta':\n return 'key'\n case 'GET':\n default:\n return 'inform'\n }\n}\n\nexport const cssForIntent = (intent: ApixIntentNames) =>\n css`\n background: ${intentUIBlend(intent, 1)};\n color: ${({ theme }) => generatePressed(theme.colors[intent])};\n `\n\nexport const MethodBadge = styled.div.attrs(\n ({\n fontSize = 'xsmall',\n fontWeight = 'semiBold',\n minWidth = '2.5rem',\n }: MethodBadgeProps) => ({\n fontSize,\n fontWeight,\n minWidth,\n })\n)<MethodBadgeProps>`\n ${typography}\n\n ${({ type }) => cssForIntent(pickBadgeIntent(type))};\n\n background: ${({ type, titleStatus, theme: { colors } }) =>\n titleStatus ? colors.ui1 : intentUIBlend(pickBadgeIntent(type), 1)};\n border: 1px solid transparent;\n border-radius: ${({ theme: { radii } }) => radii.medium};\n\n /** NOTE: This is below minimum accessibility threshold font-size */\n ${({ compact }) => compact && `font-size: 9px;`}\n\n min-width: ${({ minWidth }) => minWidth};\n padding: ${({ compact, theme: { space } }) =>\n `${space.xxsmall} ${compact ? space.none : space.xsmall}`};\n`\n"],"file":"MethodBadge.js"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@looker/run-it",
|
3
|
-
"version": "0.9.
|
3
|
+
"version": "0.9.40",
|
4
4
|
"description": "A dynamic REST request input form and response visualizer",
|
5
5
|
"main": "lib/index.js",
|
6
6
|
"module": "lib/esm/index.js",
|
@@ -51,13 +51,13 @@
|
|
51
51
|
"webpack-dev-server": "^3.11.2"
|
52
52
|
},
|
53
53
|
"dependencies": {
|
54
|
-
"@looker/code-editor": "^0.1.
|
54
|
+
"@looker/code-editor": "^0.1.25",
|
55
55
|
"@looker/components": "^3.0.8",
|
56
56
|
"@looker/design-tokens": "^2.7.21",
|
57
|
-
"@looker/extension-utils": "^0.1.
|
57
|
+
"@looker/extension-utils": "^0.1.17",
|
58
58
|
"@looker/icons": "^1.5.3",
|
59
|
-
"@looker/sdk": "^22.
|
60
|
-
"@looker/sdk-codegen": "^21.7.
|
59
|
+
"@looker/sdk": "^22.18.0",
|
60
|
+
"@looker/sdk-codegen": "^21.7.2",
|
61
61
|
"@looker/sdk-codegen-utils": "^21.0.11",
|
62
62
|
"@looker/sdk-rtl": "^21.4.0",
|
63
63
|
"@styled-icons/material": "^10.28.0",
|
@@ -72,5 +72,5 @@
|
|
72
72
|
"react-is": "^16.13.1",
|
73
73
|
"styled-components": "^5.2.1"
|
74
74
|
},
|
75
|
-
"gitHead": "
|
75
|
+
"gitHead": "051cf862cf3b422bf9bc0a38dcf2d7606f7500d1"
|
76
76
|
}
|