pre-installations and preparations
This commit is contained in:
1 parent
3e5a0329cb
commit
201d621ac3
6977 files changed
+742826
No files matched your search
+2
@@ -0,0 +1,2 @@
|
||||
export * from '../types/base'
|
||||
export { default } from '../types/base'
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
export * from '../types'
|
||||
export { default } from '../types'
|
||||
+193
@@ -0,0 +1,193 @@
|
||||
// Definitions by: Junyoung Clare Jang <https://github.com/Ailrun>
|
||||
// TypeScript Version: 3.2
|
||||
|
||||
import * as React from 'react'
|
||||
import { ComponentSelector, Interpolation } from '@emotion/serialize'
|
||||
import { PropsOf, Theme } from '@emotion/react'
|
||||
|
||||
export {
|
||||
ArrayInterpolation,
|
||||
CSSObject,
|
||||
FunctionInterpolation
|
||||
} from '@emotion/serialize'
|
||||
|
||||
export { ComponentSelector, Interpolation }
|
||||
|
||||
/** Same as StyledOptions but shouldForwardProp must be a type guard */
|
||||
export interface FilteringStyledOptions<
|
||||
Props = Record<string, any>,
|
||||
ForwardedProps extends keyof Props & string = keyof Props & string
|
||||
> {
|
||||
label?: string
|
||||
shouldForwardProp?: (propName: string) => propName is ForwardedProps
|
||||
target?: string
|
||||
}
|
||||
|
||||
export interface StyledOptions<Props = Record<string, any>> {
|
||||
label?: string
|
||||
shouldForwardProp?: (propName: string) => boolean
|
||||
target?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* @typeparam ComponentProps Props which will be included when withComponent is called
|
||||
* @typeparam SpecificComponentProps Props which will *not* be included when withComponent is called
|
||||
*/
|
||||
export interface StyledComponent<
|
||||
ComponentProps extends {},
|
||||
SpecificComponentProps extends {} = {},
|
||||
JSXProps extends {} = {}
|
||||
> extends React.FC<ComponentProps & SpecificComponentProps & JSXProps>,
|
||||
ComponentSelector {
|
||||
withComponent<C extends React.ComponentClass<React.ComponentProps<C>>>(
|
||||
component: C
|
||||
): StyledComponent<
|
||||
ComponentProps & PropsOf<C>,
|
||||
{},
|
||||
{ ref?: React.Ref<InstanceType<C>> }
|
||||
>
|
||||
withComponent<C extends React.ComponentType<React.ComponentProps<C>>>(
|
||||
component: C
|
||||
): StyledComponent<ComponentProps & PropsOf<C>>
|
||||
withComponent<Tag extends keyof JSX.IntrinsicElements>(
|
||||
tag: Tag
|
||||
): StyledComponent<ComponentProps, JSX.IntrinsicElements[Tag]>
|
||||
}
|
||||
|
||||
/**
|
||||
* @typeparam ComponentProps Props which will be included when withComponent is called
|
||||
* @typeparam SpecificComponentProps Props which will *not* be included when withComponent is called
|
||||
*/
|
||||
export interface CreateStyledComponent<
|
||||
ComponentProps extends {},
|
||||
SpecificComponentProps extends {} = {},
|
||||
JSXProps extends {} = {}
|
||||
> {
|
||||
(
|
||||
template: TemplateStringsArray,
|
||||
...styles: Array<
|
||||
Interpolation<ComponentProps & SpecificComponentProps & { theme: Theme }>
|
||||
>
|
||||
): StyledComponent<ComponentProps, SpecificComponentProps, JSXProps>
|
||||
|
||||
/**
|
||||
* @typeparam AdditionalProps Additional props to add to your styled component
|
||||
*/
|
||||
<AdditionalProps extends {}>(
|
||||
template: TemplateStringsArray,
|
||||
...styles: Array<
|
||||
Interpolation<
|
||||
ComponentProps &
|
||||
SpecificComponentProps &
|
||||
AdditionalProps & { theme: Theme }
|
||||
>
|
||||
>
|
||||
): StyledComponent<
|
||||
ComponentProps & AdditionalProps,
|
||||
SpecificComponentProps,
|
||||
JSXProps
|
||||
>
|
||||
|
||||
/**
|
||||
* @typeparam AdditionalProps Additional props to add to your styled component
|
||||
*/
|
||||
<AdditionalProps extends {} = {}>(
|
||||
...styles: Array<
|
||||
Interpolation<
|
||||
ComponentProps &
|
||||
SpecificComponentProps &
|
||||
AdditionalProps & { theme: Theme }
|
||||
>
|
||||
>
|
||||
): StyledComponent<
|
||||
ComponentProps & AdditionalProps,
|
||||
SpecificComponentProps,
|
||||
JSXProps
|
||||
>
|
||||
}
|
||||
|
||||
/**
|
||||
* @desc
|
||||
* This function accepts a React component or tag ('div', 'a' etc).
|
||||
*
|
||||
* @example styled(MyComponent)({ width: 100 })
|
||||
* @example styled(MyComponent)(myComponentProps => ({ width: myComponentProps.width })
|
||||
* @example styled('div')({ width: 100 })
|
||||
* @example styled('div')<Props>(props => ({ width: props.width })
|
||||
*/
|
||||
export interface CreateStyled {
|
||||
<
|
||||
C extends React.ComponentClass<React.ComponentProps<C>>,
|
||||
ForwardedProps extends keyof React.ComponentProps<C> &
|
||||
string = keyof React.ComponentProps<C> & string
|
||||
>(
|
||||
component: C,
|
||||
options: FilteringStyledOptions<React.ComponentProps<C>, ForwardedProps>
|
||||
): CreateStyledComponent<
|
||||
Pick<PropsOf<C>, ForwardedProps> & {
|
||||
theme?: Theme
|
||||
},
|
||||
{},
|
||||
{
|
||||
ref?: React.Ref<InstanceType<C>>
|
||||
}
|
||||
>
|
||||
|
||||
<C extends React.ComponentClass<React.ComponentProps<C>>>(
|
||||
component: C,
|
||||
options?: StyledOptions<React.ComponentProps<C>>
|
||||
): CreateStyledComponent<
|
||||
PropsOf<C> & {
|
||||
theme?: Theme
|
||||
},
|
||||
{},
|
||||
{
|
||||
ref?: React.Ref<InstanceType<C>>
|
||||
}
|
||||
>
|
||||
|
||||
<
|
||||
C extends React.ComponentType<React.ComponentProps<C>>,
|
||||
ForwardedProps extends keyof React.ComponentProps<C> &
|
||||
string = keyof React.ComponentProps<C> & string
|
||||
>(
|
||||
component: C,
|
||||
options: FilteringStyledOptions<React.ComponentProps<C>, ForwardedProps>
|
||||
): CreateStyledComponent<
|
||||
Pick<PropsOf<C>, ForwardedProps> & {
|
||||
theme?: Theme
|
||||
}
|
||||
>
|
||||
|
||||
<C extends React.ComponentType<React.ComponentProps<C>>>(
|
||||
component: C,
|
||||
options?: StyledOptions<React.ComponentProps<C>>
|
||||
): CreateStyledComponent<
|
||||
PropsOf<C> & {
|
||||
theme?: Theme
|
||||
}
|
||||
>
|
||||
|
||||
<
|
||||
Tag extends keyof JSX.IntrinsicElements,
|
||||
ForwardedProps extends keyof JSX.IntrinsicElements[Tag] &
|
||||
string = keyof JSX.IntrinsicElements[Tag] & string
|
||||
>(
|
||||
tag: Tag,
|
||||
options: FilteringStyledOptions<JSX.IntrinsicElements[Tag], ForwardedProps>
|
||||
): CreateStyledComponent<
|
||||
{ theme?: Theme; as?: React.ElementType },
|
||||
Pick<JSX.IntrinsicElements[Tag], ForwardedProps>
|
||||
>
|
||||
|
||||
<Tag extends keyof JSX.IntrinsicElements>(
|
||||
tag: Tag,
|
||||
options?: StyledOptions<JSX.IntrinsicElements[Tag]>
|
||||
): CreateStyledComponent<
|
||||
{ theme?: Theme; as?: React.ElementType },
|
||||
JSX.IntrinsicElements[Tag]
|
||||
>
|
||||
}
|
||||
|
||||
declare const styled: CreateStyled
|
||||
export default styled
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
// Definitions by: Junyoung Clare Jang <https://github.com/Ailrun>
|
||||
// TypeScript Version: 3.2
|
||||
|
||||
import { Theme } from '@emotion/react'
|
||||
import { CreateStyled as BaseCreateStyled, CreateStyledComponent } from './base'
|
||||
|
||||
export {
|
||||
ArrayInterpolation,
|
||||
ComponentSelector,
|
||||
CSSObject,
|
||||
FunctionInterpolation,
|
||||
Interpolation,
|
||||
StyledComponent,
|
||||
StyledOptions,
|
||||
FilteringStyledOptions,
|
||||
CreateStyledComponent
|
||||
} from './base'
|
||||
|
||||
export type StyledTags = {
|
||||
[Tag in keyof JSX.IntrinsicElements]: CreateStyledComponent<
|
||||
{
|
||||
theme?: Theme
|
||||
as?: React.ElementType
|
||||
},
|
||||
JSX.IntrinsicElements[Tag]
|
||||
>
|
||||
}
|
||||
|
||||
export interface CreateStyled extends BaseCreateStyled, StyledTags {}
|
||||
|
||||
declare const styled: CreateStyled
|
||||
export default styled
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
import createStyled from '../base/dist/emotion-styled-base.browser.esm.js';
|
||||
import '@babel/runtime/helpers/extends';
|
||||
import 'react';
|
||||
import '@emotion/is-prop-valid';
|
||||
import '@emotion/react';
|
||||
import '@emotion/utils';
|
||||
import '@emotion/serialize';
|
||||
import '@emotion/use-insertion-effect-with-fallbacks';
|
||||
|
||||
var tags = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG
|
||||
'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];
|
||||
|
||||
var newStyled = createStyled.bind();
|
||||
tags.forEach(function (tagName) {
|
||||
// $FlowFixMe: we can ignore this because its exposed type is defined by the CreateStyled type
|
||||
newStyled[tagName] = newStyled(tagName);
|
||||
});
|
||||
|
||||
export { newStyled as default };
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
export * from "./declarations/src/index.js";
|
||||
export { _default as default } from "./emotion-styled.cjs.default.js";
|
||||
//# sourceMappingURL=emotion-styled.cjs.d.mts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"emotion-styled.cjs.d.mts","sourceRoot":"","sources":["./declarations/src/index.d.ts"],"names":[],"mappings":"AAAA"}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
export * from "./declarations/src/index";
|
||||
export { default } from "./declarations/src/index";
|
||||
//# sourceMappingURL=emotion-styled.cjs.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"emotion-styled.cjs.d.ts","sourceRoot":"","sources":["./declarations/src/index.d.ts"],"names":[],"mappings":"AAAA"}
|
||||
+1
@@ -0,0 +1 @@
|
||||
export { default as _default } from "./declarations/src/index.js"
|
||||
+1
@@ -0,0 +1 @@
|
||||
exports._default = require("./emotion-styled.cjs.js").default;
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var base_dist_emotionStyledBase = require('../base/dist/emotion-styled-base.cjs.dev.js');
|
||||
require('@babel/runtime/helpers/extends');
|
||||
require('react');
|
||||
require('@emotion/is-prop-valid');
|
||||
require('@emotion/react');
|
||||
require('@emotion/utils');
|
||||
require('@emotion/serialize');
|
||||
require('@emotion/use-insertion-effect-with-fallbacks');
|
||||
|
||||
var tags = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG
|
||||
'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];
|
||||
|
||||
var newStyled = base_dist_emotionStyledBase["default"].bind();
|
||||
tags.forEach(function (tagName) {
|
||||
// $FlowFixMe: we can ignore this because its exposed type is defined by the CreateStyled type
|
||||
newStyled[tagName] = newStyled(tagName);
|
||||
});
|
||||
|
||||
exports["default"] = newStyled;
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
if (process.env.NODE_ENV === "production") {
|
||||
module.exports = require("./emotion-styled.cjs.prod.js");
|
||||
} else {
|
||||
module.exports = require("./emotion-styled.cjs.dev.js");
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// @flow
|
||||
export * from "../src/index.js";
|
||||
export { default } from "../src/index.js";
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
export {
|
||||
|
||||
} from "./emotion-styled.cjs.js";
|
||||
export { _default as default } from "./emotion-styled.cjs.default.js";
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var base_dist_emotionStyledBase = require('../base/dist/emotion-styled-base.cjs.prod.js');
|
||||
require('@babel/runtime/helpers/extends');
|
||||
require('react');
|
||||
require('@emotion/is-prop-valid');
|
||||
require('@emotion/react');
|
||||
require('@emotion/utils');
|
||||
require('@emotion/serialize');
|
||||
require('@emotion/use-insertion-effect-with-fallbacks');
|
||||
|
||||
var tags = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG
|
||||
'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];
|
||||
|
||||
var newStyled = base_dist_emotionStyledBase["default"].bind();
|
||||
tags.forEach(function (tagName) {
|
||||
// $FlowFixMe: we can ignore this because its exposed type is defined by the CreateStyled type
|
||||
newStyled[tagName] = newStyled(tagName);
|
||||
});
|
||||
|
||||
exports["default"] = newStyled;
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
import createStyled from '../base/dist/emotion-styled-base.esm.js';
|
||||
import '@babel/runtime/helpers/extends';
|
||||
import 'react';
|
||||
import '@emotion/is-prop-valid';
|
||||
import '@emotion/react';
|
||||
import '@emotion/utils';
|
||||
import '@emotion/serialize';
|
||||
import '@emotion/use-insertion-effect-with-fallbacks';
|
||||
|
||||
var tags = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG
|
||||
'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];
|
||||
|
||||
var newStyled = createStyled.bind();
|
||||
tags.forEach(function (tagName) {
|
||||
// $FlowFixMe: we can ignore this because its exposed type is defined by the CreateStyled type
|
||||
newStyled[tagName] = newStyled(tagName);
|
||||
});
|
||||
|
||||
export { newStyled as default };
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react"),require("@emotion/react")):"function"==typeof define&&define.amd?define(["react","@emotion/react"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).emotionStyled=t(e.React,e.emotionReact)}(this,(function(e,t){"use strict";function r(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var n=r(e);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i.apply(this,arguments)}function o(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}var a=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][ALine truncated
|
||||
//# sourceMappingURL=emotion-styled.umd.min.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"emotion-styled.umd.min.js","sources":["../../../node_modules/@babel/runtime/helpers/esm/extends.js","../../memoize/src/index.js","../../is-prop-valid/src/index.js","../src/utils.js","../../utils/src/index.js","../../unitless/src/index.js","../../serialize/src/index.js","../../use-insertion-effect-with-fallbacks/src/index.js","../src/base.js","../src/index.js","../../hash/src/index.js","../src/tags.js"],"sourcesContent":["export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}","// @flow\n\nexport default function memoize<V>(fn: string => V): string => V {\n const cache = Object.create(null)\n\n return (arg: string) => {\n if (cache[arg] === undefined) cache[arg] = fn(arg)\n return cache[arg]\n }\n}\n","// @flow\nimport memoize from '@emotion/memoize'\n\ndeclare var codegen: { require: string => RegExp }\n\nconst reactPropsRegex = codegen.require('./props')\n\n// https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\nconst isPropValid = /* #__PURE__ */ memoize(\n prop =>\n reactPropsRegex.test(prop) ||\n (prop.charCodeAt(0) === 111 /* o */ &&\n prop.charCodeAt(1) === 110 /* n */ &&\n prop.charCodeAt(2) < 91) /* Z+1 */\n)\n\nexport default isPropValid\n","// @flow\nimport type {\n ElementType,\n StatelessFunctionalComponent,\n AbstractComponent\n} from 'react'\nimport isPropValid from '@emotion/is-prop-valid'\n\nexport type Interpolations = Array<any>\n\nexport type StyledElementType<Props> =\n | string\n | AbstractComponent<{ ...Props, className: string }, mixed>\n\nexport type StyledOptions = {\n label?: string,\n shouldForwardProp?: string => boolean,\n target?: string\n}\n\nexport type StyledComponent<Props> = StatelessFunctionalComponent<Props> & {\n defaultProps: any,\n toString: () => string,\n withComponent: (\n nextTag: StyledElementType<Props>,\n nextOptions?: StyledOptions\n ) => StyledComponent<Props>\n}\n\nexport type PrivateStyledComponent<Props> = StyledComponent<Props> & {\n __emotion_real: StyledComponent<Props>,\n __emotion_base: any,\n __emotion_styles: any,\n __emotion_forwardProp: any\n}\n\nconst testOmitPropsOnStringTag = isPropValid\nconst testOmitPropsOnComponent = (key: string) => key !== 'theme'\n\nexport const getDefaultShouldForwardProp = (tag: ElementType) =>\n typeof tag === 'string' &&\n // 96 is one less than the char code\n // for \"a\" so this is checking that\n // it's a lowercase character\n tag.charCodeAt(0) > 96\n ? testOmitPropsOnStringTag\n : testOmitPropsOnComponent\n\nexport const composeShouldForwardProps = (\n tag: PrivateStyledComponent<any>,\n options: StyledOptions | void,\n isReal: boolean\n) => {\n let shouldForwardProp\n if (options) {\n const optionsShouldForwardProp = options.shouldForwardProp\n shouldForwardProp =\n tag.__emotion_forwardProp && optionsShouldForwardProp\n ? (propName: string) =>\n tag.__emotion_forwardProp(propName) &&\n optionsShouldForwardProp(propName)\n : optionsShouldForwardProp\n }\n\n if (typeof shouldForwardProp !== 'function' && isReal) {\n shouldForwardProp = tag.__emotion_forwardProp\n }\n\n return shouldForwardProp\n}\n\nexport type CreateStyledComponent = <Props>(\n ...args: Interpolations\n) => StyledComponent<Props>\n\nexport type CreateStyled = {\n <Props>(\n tag: StyledElementType<Props>,\n options?: StyledOptions\n ): (...args: Interpolations) => StyledComponent<Props>,\n [key: string]: CreateStyledComponent,\n bind: () => CreateStyled\n}\n","// @flow\nimport type { RegisteredCache, EmotionCache, SerializedStyles } from './types'\n\nconst isBrowser = typeof document !== 'undefined'\n\nexport function getRegisteredStyles(\n registered: RegisteredCache,\n registeredStyles: string[],\n classNames: string\n) {\n let rawClassName = ''\n\n classNames.split(' ').forEach(className => {\n if (registered[className] !== undefined) {\n registeredStyles.push(`${registered[className]};`)\n } else {\n rawClassName += `${className} `\n }\n })\n return rawClassName\n}\n\nexport const registerStyles = (\n cache: EmotionCache,\n serialized: SerializedStyles,\n isStringTag: boolean\n) => {\n let className = `${cache.key}-${serialized.name}`\n if (\n // we only need to add the styles to the registered cache if the\n // class name could be used further down\n // the tree but if it's a string tag, we know it won't\n // so we don't have to add it to registered cache.\n // this improves memory usage since we can avoid storing the whole style string\n (isStringTag === false ||\n /Line truncated
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
import createStyled from '../base/dist/emotion-styled-base.worker.esm.js';
|
||||
import '@babel/runtime/helpers/extends';
|
||||
import 'react';
|
||||
import '@emotion/is-prop-valid';
|
||||
import '@emotion/react';
|
||||
import '@emotion/utils';
|
||||
import '@emotion/serialize';
|
||||
import '@emotion/use-insertion-effect-with-fallbacks';
|
||||
|
||||
var tags = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG
|
||||
'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];
|
||||
|
||||
var newStyled = createStyled.bind();
|
||||
tags.forEach(function (tagName) {
|
||||
// $FlowFixMe: we can ignore this because its exposed type is defined by the CreateStyled type
|
||||
newStyled[tagName] = newStyled(tagName);
|
||||
});
|
||||
|
||||
export { newStyled as default };
|
||||
Reference in new issue
Block a user