@preply/ds-web-lib 0.4.3-beta.33
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/README.md +51 -0
- package/dist/components/Avatar/Avatar.d.ts +9 -0
- package/dist/components/Avatar/Avatar.js +17 -0
- package/dist/components/Avatar/constants.d.ts +3 -0
- package/dist/components/Avatar/constants.js +5 -0
- package/dist/components/Avatar/style/index.module.less +9 -0
- package/dist/components/Avatar/style/index.module.less.js +9 -0
- package/dist/components/Avatar/style/mixins.less +34 -0
- package/dist/components/Avatar/style/mixins.less.js +8 -0
- package/dist/components/Avatar/types.d.ts +1 -0
- package/dist/components/Avatar/types.js +2 -0
- package/dist/components/Button/Button.d.ts +19 -0
- package/dist/components/Button/Button.js +50 -0
- package/dist/components/Button/constants.d.ts +3 -0
- package/dist/components/Button/constants.js +5 -0
- package/dist/components/Button/style/index.module.less +13 -0
- package/dist/components/Button/style/index.module.less.js +9 -0
- package/dist/components/Button/style/mixins.less +80 -0
- package/dist/components/Button/style/mixins.less.js +8 -0
- package/dist/components/Button/types.d.ts +2 -0
- package/dist/components/Button/types.js +2 -0
- package/dist/components/Heading/Heading.d.ts +8 -0
- package/dist/components/Heading/Heading.js +16 -0
- package/dist/components/Heading/style/index.module.less +8 -0
- package/dist/components/Heading/style/index.module.less.js +9 -0
- package/dist/components/Heading/style/mixins.less +12 -0
- package/dist/components/Heading/style/mixins.less.js +8 -0
- package/dist/components/Icon/Icon.d.ts +9 -0
- package/dist/components/Icon/Icon.js +25 -0
- package/dist/components/Icon/constants.d.ts +2 -0
- package/dist/components/Icon/constants.js +4 -0
- package/dist/components/Icon/style/index.module.less +9 -0
- package/dist/components/Icon/style/index.module.less.js +9 -0
- package/dist/components/Icon/style/mixins.less +44 -0
- package/dist/components/Icon/style/mixins.less.js +8 -0
- package/dist/components/Icon/types.d.ts +5 -0
- package/dist/components/Icon/types.js +2 -0
- package/dist/components/LayoutFlex/LayoutFlex.d.ts +4 -0
- package/dist/components/LayoutFlex/LayoutFlex.js +10 -0
- package/dist/components/LayoutGrid/LayoutGrid.d.ts +4 -0
- package/dist/components/LayoutGrid/LayoutGrid.js +11 -0
- package/dist/components/Link/Link.d.ts +9 -0
- package/dist/components/Link/Link.js +24 -0
- package/dist/components/Link/style/index.module.less +6 -0
- package/dist/components/Link/style/index.module.less.js +9 -0
- package/dist/components/Link/style/mixins.less +28 -0
- package/dist/components/Link/style/mixins.less.js +8 -0
- package/dist/components/Link/types.d.ts +1 -0
- package/dist/components/Link/types.js +2 -0
- package/dist/components/Panel/Panel.d.ts +8 -0
- package/dist/components/Panel/Panel.js +18 -0
- package/dist/components/Panel/constants.d.ts +2 -0
- package/dist/components/Panel/constants.js +4 -0
- package/dist/components/Panel/private/PanelBody.d.ts +4 -0
- package/dist/components/Panel/private/PanelBody.js +16 -0
- package/dist/components/Panel/private/PanelFooter.d.ts +4 -0
- package/dist/components/Panel/private/PanelFooter.js +16 -0
- package/dist/components/Panel/private/PanelHeader.d.ts +4 -0
- package/dist/components/Panel/private/PanelHeader.js +16 -0
- package/dist/components/Panel/private/PanelSection.d.ts +4 -0
- package/dist/components/Panel/private/PanelSection.js +16 -0
- package/dist/components/Panel/style/index.module.less +35 -0
- package/dist/components/Panel/style/index.module.less.js +9 -0
- package/dist/components/Panel/style/mixins.less +22 -0
- package/dist/components/Panel/style/mixins.less.js +8 -0
- package/dist/components/Panel/types.d.ts +1 -0
- package/dist/components/Panel/types.js +2 -0
- package/dist/components/Text/Text.d.ts +9 -0
- package/dist/components/Text/Text.js +20 -0
- package/dist/components/Text/style/index.module.less +9 -0
- package/dist/components/Text/style/index.module.less.js +9 -0
- package/dist/components/Text/style/mixins.less +12 -0
- package/dist/components/Text/style/mixins.less.js +8 -0
- package/dist/components/TextInline/TextInline.d.ts +8 -0
- package/dist/components/TextInline/TextInline.js +16 -0
- package/dist/components/TextInline/style/index.module.less +7 -0
- package/dist/components/TextInline/style/index.module.less.js +9 -0
- package/dist/components/TextInline/style/mixins.less +11 -0
- package/dist/components/TextInline/style/mixins.less.js +8 -0
- package/dist/components/index.d.ts +14 -0
- package/dist/components/index.js +15 -0
- package/dist/external/style-inject/dist/style-inject.es.js +29 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +16 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/package.json +42 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
function styleInject(css, ref) {
|
|
2
|
+
if ( ref === void 0 ) ref = {};
|
|
3
|
+
var insertAt = ref.insertAt;
|
|
4
|
+
|
|
5
|
+
if (!css || typeof document === 'undefined') { return; }
|
|
6
|
+
|
|
7
|
+
var head = document.head || document.getElementsByTagName('head')[0];
|
|
8
|
+
var style = document.createElement('style');
|
|
9
|
+
style.type = 'text/css';
|
|
10
|
+
|
|
11
|
+
if (insertAt === 'top') {
|
|
12
|
+
if (head.firstChild) {
|
|
13
|
+
head.insertBefore(style, head.firstChild);
|
|
14
|
+
} else {
|
|
15
|
+
head.appendChild(style);
|
|
16
|
+
}
|
|
17
|
+
} else {
|
|
18
|
+
head.appendChild(style);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if (style.styleSheet) {
|
|
22
|
+
style.styleSheet.cssText = css;
|
|
23
|
+
} else {
|
|
24
|
+
style.appendChild(document.createTextNode(css));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { styleInject as default };
|
|
29
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3R5bGUtaW5qZWN0LmVzLmpzIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9ub2RlX21vZHVsZXMvc3R5bGUtaW5qZWN0L2Rpc3Qvc3R5bGUtaW5qZWN0LmVzLmpzIl0sInNvdXJjZXNDb250ZW50IjpbImZ1bmN0aW9uIHN0eWxlSW5qZWN0KGNzcywgcmVmKSB7XG4gIGlmICggcmVmID09PSB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d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { VERSION } from './version.js';
|
|
2
|
+
export { Avatar } from './components/Avatar/Avatar.js';
|
|
3
|
+
export { Button } from './components/Button/Button.js';
|
|
4
|
+
export { Heading } from './components/Heading/Heading.js';
|
|
5
|
+
export { Icon } from './components/Icon/Icon.js';
|
|
6
|
+
export { LayoutFlex } from './components/LayoutFlex/LayoutFlex.js';
|
|
7
|
+
export { LayoutGrid } from './components/LayoutGrid/LayoutGrid.js';
|
|
8
|
+
export { Link } from './components/Link/Link.js';
|
|
9
|
+
export { Panel } from './components/Panel/Panel.js';
|
|
10
|
+
export { PanelHeader } from './components/Panel/private/PanelHeader.js';
|
|
11
|
+
export { PanelBody } from './components/Panel/private/PanelBody.js';
|
|
12
|
+
export { PanelSection } from './components/Panel/private/PanelSection.js';
|
|
13
|
+
export { PanelFooter } from './components/Panel/private/PanelFooter.js';
|
|
14
|
+
export { Text } from './components/Text/Text.js';
|
|
15
|
+
export { TextInline } from './components/TextInline/TextInline.js';
|
|
16
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7OzsifQ==
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const VERSION: string;
|
package/dist/version.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const VERSION = `DS-WEB-CORE-${process.env.VERSION}`;
|
|
2
|
+
|
|
3
|
+
export { VERSION };
|
|
4
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZXMiOlsiLi4vc3JjL3ZlcnNpb24udHMiXSwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGNvbnN0IFZFUlNJT04gPSBgRFMtV0VCLUNPUkUtJHtwcm9jZXNzLmVudi5WRVJTSU9OfWA7XG4iXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ik1BQWEsT0FBTyxHQUFHLGVBQWUsT0FBTyxDQUFDLEdBQUcsQ0FBQyxPQUFPOzs7OyJ9
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@preply/ds-web-lib",
|
|
3
|
+
"version": "0.4.3-beta.33+a69fa3c",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist/"
|
|
10
|
+
],
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"browserslist": "last 2 versions",
|
|
13
|
+
"scripts": {
|
|
14
|
+
"clean": "rm -rf dist",
|
|
15
|
+
"lint": "run --top-level eslint --ext .js,.ts,.tsx,.mdx *.config.js src/",
|
|
16
|
+
"test": "run --top-level jest --coverage",
|
|
17
|
+
"build": "NODE_ENV=production && run build:rollup",
|
|
18
|
+
"build:rollup": "run --top-level rollup -c rollup.config.js",
|
|
19
|
+
"dev": "run build && run build:rollup -w"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@preply/ds-core": "^0.4.3-beta.33+a69fa3c",
|
|
23
|
+
"@preply/ds-web-core": "^0.4.3-beta.33+a69fa3c",
|
|
24
|
+
"@preply/ds-web-root": "^0.4.3-beta.33+a69fa3c"
|
|
25
|
+
},
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"@preply/ds-core": "0.0.0",
|
|
28
|
+
"@preply/ds-web-core": "0.0.0",
|
|
29
|
+
"@preply/ds-web-root": "0.0.0",
|
|
30
|
+
"react": "^16.8.3",
|
|
31
|
+
"react-dom": "^16.8.3"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@preply/ds-docs-toolkit": "^0.4.3-beta.33+a69fa3c",
|
|
35
|
+
"@preply/ds-media-icons": "^0.4.3-beta.33+a69fa3c",
|
|
36
|
+
"@preply/ds-theme-base-ui": "^0.4.3-beta.33+a69fa3c",
|
|
37
|
+
"@storybook/addon-docs": "6.3.12",
|
|
38
|
+
"@storybook/react": "6.3.12",
|
|
39
|
+
"@testing-library/react": "11.2.7"
|
|
40
|
+
},
|
|
41
|
+
"gitHead": "a69fa3c6173e20ebac8bedcb407596605ae8f00d"
|
|
42
|
+
}
|