mediacube-ui 0.1.10 → 0.1.11
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/dist/img/logo.b58e4e05.png +0 -0
- package/package.json +3 -1
- package/.browserslistrc +0 -3
- package/.eslintrc.js +0 -34
- package/.prettierrc.js +0 -9
- package/.storybook/components.js +0 -6
- package/.storybook/decorators.js +0 -5
- package/.storybook/main.js +0 -51
- package/.storybook/plugins.js +0 -28
- package/.storybook/preview-body.html +0 -9
- package/.storybook/preview.js +0 -59
- package/babel.config.js +0 -3
- package/jest.config.js +0 -4
- package/public/img/mc_dashboard.svg +0 -11
- package/public/img/preview.png +0 -0
- package/src/App.vue +0 -30
- package/src/elements/McAvatar/McAvatar.stories.js +0 -122
- package/src/elements/McAvatar/McAvatar.vue +0 -325
- package/src/elements/McBadge/McBadge.stories.js +0 -80
- package/src/elements/McBadge/McBadge.vue +0 -120
- package/src/elements/McButton/McButton.stories.js +0 -205
- package/src/elements/McButton/McButton.vue +0 -877
- package/src/elements/McChip/McChip.stories.js +0 -140
- package/src/elements/McChip/McChip.vue +0 -246
- package/src/elements/McCropper/McCropper.stories.js +0 -47
- package/src/elements/McCropper/McCropper.vue +0 -131
- package/src/elements/McDate/McDate.stories.js +0 -105
- package/src/elements/McDate/McDate.vue +0 -102
- package/src/elements/McDatePicker/McDatePicker.stories.js +0 -205
- package/src/elements/McDatePicker/McDatePicker.vue +0 -793
- package/src/elements/McField/McFieldCheckbox/McFieldCheckbox.vue +0 -334
- package/src/elements/McField/McFieldCheckbox/McFieldCheckox.stories.js +0 -130
- package/src/elements/McField/McFieldRadio/McFieldRadioButton/McFieldRadioButton.stories.js +0 -115
- package/src/elements/McField/McFieldRadio/McFieldRadioButton/McFieldRadioButton.vue +0 -185
- package/src/elements/McField/McFieldRadio/McFieldRadioGroup/McFieldRadioGroup.stories.js +0 -162
- package/src/elements/McField/McFieldRadio/McFieldRadioGroup/McFieldRadioGroup.vue +0 -194
- package/src/elements/McField/McFieldSelect/McFieldSelect.stories.js +0 -271
- package/src/elements/McField/McFieldSelect/McFieldSelect.vue +0 -900
- package/src/elements/McField/McFieldText/McFieldText.stories.js +0 -232
- package/src/elements/McField/McFieldText/McFieldText.vue +0 -856
- package/src/elements/McField/McFieldToggle/McFieldToggle.stories.js +0 -82
- package/src/elements/McField/McFieldToggle/McFieldToggle.vue +0 -262
- package/src/elements/McInfinityLoadingIndicator/McInfinityLoadingIndicator.stories.js +0 -52
- package/src/elements/McInfinityLoadingIndicator/McInfinityLoadingIndicator.vue +0 -97
- package/src/elements/McNotification/McNotification.stories.js +0 -125
- package/src/elements/McNotification/McNotification.vue +0 -203
- package/src/elements/McProgress/McProgress.stories.js +0 -76
- package/src/elements/McProgress/McProgress.vue +0 -229
- package/src/elements/McRangeSlider/McRangeSlider.stories.js +0 -129
- package/src/elements/McRangeSlider/McRangeSlider.vue +0 -196
- package/src/elements/McSeparator/McSeparator.stories.js +0 -84
- package/src/elements/McSeparator/McSeparator.vue +0 -158
- package/src/elements/McSlideUpDown/McSlideUpDown.stories.js +0 -77
- package/src/elements/McSlideUpDown/McSlideUpDown.vue +0 -157
- package/src/elements/McSvgIcon/McSvgIcon.stories.js +0 -44
- package/src/elements/McSvgIcon/McSvgIcon.vue +0 -176
- package/src/elements/McTabs/McTab/McTab.stories.js +0 -20
- package/src/elements/McTabs/McTab/McTab.vue +0 -192
- package/src/elements/McTabs/McTabs/McTabs.stories.js +0 -112
- package/src/elements/McTabs/McTabs/McTabs.vue +0 -493
- package/src/elements/McTitle/McTitle.stories.js +0 -130
- package/src/elements/McTitle/McTitle.vue +0 -462
- package/src/elements/McTooltip/McTooltip.stories.js +0 -130
- package/src/elements/McTooltip/McTooltip.vue +0 -288
- package/src/examples/Welcome.js +0 -131
- package/src/examples/Welcome.stories.js +0 -18
- package/src/examples/elements/MyElButton/MyElButton.js +0 -36
- package/src/examples/elements/MyElButton/MyElButton.stories.js +0 -52
- package/src/examples/elements/MyElTask/MyElTask.stories.js +0 -61
- package/src/examples/elements/MyElTask/MyElTask.vue +0 -113
- package/src/examples/elements/MyElToast/MyElToast.stories.js +0 -106
- package/src/examples/elements/MyElToast/MyElToast.vue +0 -19
- package/src/examples/patterns/MyPtTaskList/MyPtTaskList.stories.js +0 -69
- package/src/examples/patterns/MyPtTaskList/MyPtTaskList.vue +0 -121
- package/src/examples/templates/TmDrawerWrapper/TmDrawerWrapper.vue +0 -77
- package/src/helpers/delayedAction.js +0 -26
- package/src/main.js +0 -14
- package/src/mocks/authUser.js +0 -163
- package/src/mocks/categories.js +0 -107
- package/src/mocks/chatComments.js +0 -113
- package/src/mocks/filterMocks.js +0 -115
- package/src/mocks/menuApps.js +0 -40
- package/src/mocks/menuLangs.js +0 -18
- package/src/mocks/menuMain.js +0 -53
- package/src/mocks/tableInfusersBody.js +0 -8317
- package/src/patterns/McAccordion/McAccordion.stories.js +0 -37
- package/src/patterns/McAccordion/McAccordion.vue +0 -53
- package/src/patterns/McCells/McCell/McCell.stories.js +0 -78
- package/src/patterns/McCells/McCell/McCell.vue +0 -100
- package/src/patterns/McChat/McChat.stories.js +0 -135
- package/src/patterns/McChat/McChat.vue +0 -304
- package/src/patterns/McChat/McChatComment/McChatComment.stories.js +0 -74
- package/src/patterns/McChat/McChatComment/McChatComment.vue +0 -240
- package/src/patterns/McChat/McChatForm/McChatForm.stories.js +0 -65
- package/src/patterns/McChat/McChatForm/McChatForm.vue +0 -146
- package/src/patterns/McCollapse/McCollapse.stories.js +0 -114
- package/src/patterns/McCollapse/McCollapse.vue +0 -280
- package/src/patterns/McDrawer/McDrawer.stories.js +0 -105
- package/src/patterns/McDrawer/McDrawer.vue +0 -143
- package/src/patterns/McDropdown/McDropdown.stories.js +0 -102
- package/src/patterns/McDropdown/McDropdown.vue +0 -210
- package/src/patterns/McDropdown/McDropdownPanel/McDropdownPanel.stories.js +0 -44
- package/src/patterns/McDropdown/McDropdownPanel/McDropdownPanel.vue +0 -38
- package/src/patterns/McFakeScroll/McFakeScroll.stories.js +0 -47
- package/src/patterns/McFakeScroll/McFakeScroll.vue +0 -276
- package/src/patterns/McFilter/McFilter.stories.js +0 -114
- package/src/patterns/McFilter/McFilter.vue +0 -800
- package/src/patterns/McFilter/McFilterChip/McFilterChip.stories.js +0 -59
- package/src/patterns/McFilter/McFilterChip/McFilterChip.vue +0 -83
- package/src/patterns/McFilter/McFilterTags/McFilterTags.stories.js +0 -83
- package/src/patterns/McFilter/McFilterTags/McFilterTags.vue +0 -356
- package/src/patterns/McFilter/McFilterTypeDate/McFilterTypeDate.stories.js +0 -50
- package/src/patterns/McFilter/McFilterTypeDate/McFilterTypeDate.vue +0 -66
- package/src/patterns/McFilter/McFilterTypeRange/McFilterTypeRange.stories.js +0 -51
- package/src/patterns/McFilter/McFilterTypeRange/McFilterTypeRange.vue +0 -131
- package/src/patterns/McFilter/McFilterTypeRelation/McFilterTypeRelation.stories.js +0 -53
- package/src/patterns/McFilter/McFilterTypeRelation/McFilterTypeRelation.vue +0 -204
- package/src/patterns/McFilter/McFilterTypeText/McFilterTypeText.stories.js +0 -51
- package/src/patterns/McFilter/McFilterTypeText/McFilterTypeText.vue +0 -62
- package/src/patterns/McGrid/McGridCol/McGridCol.stories.js +0 -20
- package/src/patterns/McGrid/McGridCol/McGridCol.vue +0 -165
- package/src/patterns/McGrid/McGridRow/McGridRow.stories.js +0 -151
- package/src/patterns/McGrid/McGridRow/McGridRow.vue +0 -150
- package/src/patterns/McModal/McModal.stories.js +0 -53
- package/src/patterns/McModal/McModal.vue +0 -530
- package/src/patterns/McPreview/McPreview.stories.js +0 -51
- package/src/patterns/McPreview/McPreview.vue +0 -181
- package/src/patterns/McSideBar/McSideBar/McSideBar.stories.js +0 -143
- package/src/patterns/McSideBar/McSideBar/McSideBar.vue +0 -395
- package/src/patterns/McSideBar/McSideBarBottom/McSideBarBottom.stories.js +0 -65
- package/src/patterns/McSideBar/McSideBarBottom/McSideBarBottom.vue +0 -124
- package/src/patterns/McSideBar/McSideBarButton/McSideBarButton.stories.js +0 -89
- package/src/patterns/McSideBar/McSideBarButton/McSideBarButton.vue +0 -277
- package/src/patterns/McSideBar/McSideBarCenter/McSideBarCenter.stories.js +0 -88
- package/src/patterns/McSideBar/McSideBarCenter/McSideBarCenter.vue +0 -337
- package/src/patterns/McSideBar/McSideBarTop/McSideBarTop.stories.js +0 -63
- package/src/patterns/McSideBar/McSideBarTop/McSideBarTop.vue +0 -236
- package/src/patterns/McStack/McStack.stories.js +0 -88
- package/src/patterns/McStack/McStack.vue +0 -119
- package/src/patterns/McTable/McTable/McTable.stories.js +0 -309
- package/src/patterns/McTable/McTable/McTable.vue +0 -826
- package/src/patterns/McTable/McTableCol/McTableCol.stories.js +0 -20
- package/src/patterns/McTable/McTableCol/McTableCol.vue +0 -282
- package/src/patterns/McTableCard/McTableCard.stories.js +0 -108
- package/src/patterns/McTableCard/McTableCard.vue +0 -134
- package/src/patterns/McTableCard/McTableCardHeader/McTableCardHeader.stories.js +0 -70
- package/src/patterns/McTableCard/McTableCardHeader/McTableCardHeader.vue +0 -72
- package/src/patterns/McTopBar/McTopBar.stories.js +0 -60
- package/src/patterns/McTopBar/McTopBar.vue +0 -152
- package/src/service/GlobalStyles/GlobalStyles.stories.js +0 -27
- package/src/service/GlobalStyles/GlobalStyles.vue +0 -21
- package/src/service/HelloWorld.vue +0 -102
- package/src/templates/layouts/McContentFixed/McContentFixed.vue +0 -59
- package/src/templates/layouts/McMain/McMain.stories.js +0 -136
- package/src/templates/layouts/McMain/McMain.vue +0 -114
- package/src/templates/layouts/McRoot/McRoot.stories.js +0 -31
- package/src/templates/layouts/McRoot/McRoot.vue +0 -44
- package/src/tokens/animations.scss +0 -50
- package/src/tokens/border-radius.scss +0 -26
- package/src/tokens/box-shadows.scss +0 -31
- package/src/tokens/colors.scss +0 -72
- package/src/tokens/durations.scss +0 -7
- package/src/tokens/easings.scss +0 -6
- package/src/tokens/font-families.scss +0 -8
- package/src/tokens/font-sizes.scss +0 -23
- package/src/tokens/font-weights.scss +0 -9
- package/src/tokens/gradients.scss +0 -15
- package/src/tokens/letter-spacings.scss +0 -6
- package/src/tokens/line-heights.scss +0 -22
- package/src/tokens/media-queries.scss +0 -32
- package/src/tokens/opacities.scss +0 -8
- package/src/tokens/sizes.scss +0 -44
- package/src/tokens/spacings.scss +0 -36
- package/src/tokens/z-indexes.scss +0 -12
- package/src/utils/filters.js +0 -11
- package/src/utils/getTokens.js +0 -41
- package/src/utils/load-icons.js +0 -3
- package/src/utils/treeSearch.js +0 -30
- package/src/utils/webFontLoader.js +0 -12
- package/tests/unit/TaskList.spec.js +0 -14
- package/tests/unit/__snapshots__/storybook.spec.js.snap +0 -930
- package/tests/unit/storybook.spec.js +0 -3
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mediacube-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "Design system for MediaCube services",
|
|
5
5
|
"author": "MediaCube",
|
|
6
6
|
"private": false,
|
|
7
7
|
"homepage": "https://mediacube.co",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"main": "dist/mediacube-ui.common.js",
|
|
10
|
+
"files": ["dist/*", "src/styles/*", "src/assets/*"],
|
|
10
11
|
"scripts": {
|
|
11
12
|
"start": "yarn scss-export && start-storybook -p 6006 -s public",
|
|
12
13
|
"build-storybook": "build-storybook",
|
|
14
|
+
"build-library" : "yarn scss-export && vue-cli-service build --target lib --name mediacube-ui ./src/install.js",
|
|
13
15
|
"serve": "yarn scss-export && vue-cli-service serve",
|
|
14
16
|
"build": "yarn scss-export && vue-cli-service build --target lib --inline-vue",
|
|
15
17
|
"test:unit": "vue-cli-service test:unit",
|
package/.browserslistrc
DELETED
package/.eslintrc.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
root: true,
|
|
3
|
-
env: {
|
|
4
|
-
node: true,
|
|
5
|
-
browser: true
|
|
6
|
-
},
|
|
7
|
-
extends: [
|
|
8
|
-
"plugin:vue/recommended",
|
|
9
|
-
"eslint:recommended",
|
|
10
|
-
"prettier/vue",
|
|
11
|
-
"plugin:prettier/recommended"
|
|
12
|
-
],
|
|
13
|
-
rules: {
|
|
14
|
-
"vue/component-name-in-template-casing": ["error", "kebab-case"],
|
|
15
|
-
"no-console": "off",
|
|
16
|
-
"no-debugger": "off",
|
|
17
|
-
"no-undef": "off",
|
|
18
|
-
"vue/no-v-html": "off",
|
|
19
|
-
'semi': [2, 'never'],
|
|
20
|
-
'vue/max-attributes-per-line': 'off',
|
|
21
|
-
'prettier/prettier': ['error', { 'semi': false }],
|
|
22
|
-
'vue/require-default-prop': "off",
|
|
23
|
-
"vue/require-valid-default-prop": "off",
|
|
24
|
-
},
|
|
25
|
-
plugins: [
|
|
26
|
-
'vue'
|
|
27
|
-
],
|
|
28
|
-
globals: {
|
|
29
|
-
$nuxt: true
|
|
30
|
-
},
|
|
31
|
-
parserOptions: {
|
|
32
|
-
parser: "babel-eslint"
|
|
33
|
-
}
|
|
34
|
-
};
|
package/.prettierrc.js
DELETED
package/.storybook/components.js
DELETED
package/.storybook/decorators.js
DELETED
package/.storybook/main.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
const path = require('path')
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
stories: ['../src/**/*.stories.js'],
|
|
5
|
-
addons: [
|
|
6
|
-
'@storybook/addon-actions',
|
|
7
|
-
'@storybook/addon-links',
|
|
8
|
-
'storybook-design-token',
|
|
9
|
-
'@storybook/addon-knobs/register',
|
|
10
|
-
'@storybook/addon-storysource',
|
|
11
|
-
'@storybook/addon-docs',
|
|
12
|
-
'@storybook/addon-viewport/register',
|
|
13
|
-
'@storybook/addon-backgrounds/register',
|
|
14
|
-
'storybook-addon-designs',
|
|
15
|
-
'@storybook/addon-a11y/register',
|
|
16
|
-
],
|
|
17
|
-
webpackFinal: async (config, { configType }) => {
|
|
18
|
-
config.module.rules.push({
|
|
19
|
-
test: /\.scss$/,
|
|
20
|
-
use: ['style-loader', 'css-loader', 'sass-loader',
|
|
21
|
-
{
|
|
22
|
-
loader: 'sass-resources-loader',
|
|
23
|
-
options: {
|
|
24
|
-
resources: './src/styles/main.scss',
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
],
|
|
28
|
-
include: path.resolve(__dirname, '../'),
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
config.module.rules.push({
|
|
32
|
-
test: /\.stories\.jsx?$/,
|
|
33
|
-
loaders: [
|
|
34
|
-
{
|
|
35
|
-
loader: require.resolve('@storybook/source-loader'),
|
|
36
|
-
options: {
|
|
37
|
-
prettierConfig: {
|
|
38
|
-
printWidth: 100,
|
|
39
|
-
singleQuote: false,
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
enforce: 'pre',
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
config.resolve.alias["scss-loader"] = "sass-loader"
|
|
48
|
-
|
|
49
|
-
return config;
|
|
50
|
-
},
|
|
51
|
-
};
|
package/.storybook/plugins.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import Vue from "vue"
|
|
2
|
-
import VueLazyload from 'vue-lazyload'
|
|
3
|
-
import "xe-utils"
|
|
4
|
-
import VXETable from "vxe-table"
|
|
5
|
-
import VueSlideoutPanel from 'vue2-slideout-panel'
|
|
6
|
-
import VueBus from 'vue-bus'
|
|
7
|
-
import VueMoment from "vue-moment"
|
|
8
|
-
import Toasted from 'vue-toasted'
|
|
9
|
-
import PortalVue from 'portal-vue'
|
|
10
|
-
import VueJSModal from "vue-js-modal";
|
|
11
|
-
// for fix error: `Property or method "toJSON" is not defined on the instance but referenced during render`
|
|
12
|
-
Vue.prototype.toJSON = function () {
|
|
13
|
-
return this
|
|
14
|
-
}
|
|
15
|
-
Vue.use(VueLazyload)
|
|
16
|
-
Vue.use(VXETable)
|
|
17
|
-
Vue.use(VueJSModal)
|
|
18
|
-
Vue.use(VueSlideoutPanel)
|
|
19
|
-
Vue.use(VueBus)
|
|
20
|
-
Vue.use(VueMoment)
|
|
21
|
-
Vue.use(Toasted, {
|
|
22
|
-
theme: 'toasted-primary',
|
|
23
|
-
position: 'bottom-center',
|
|
24
|
-
duration : 3000,
|
|
25
|
-
className : ['mc-toast', 'mc-toast--primary'],
|
|
26
|
-
keepOnHover : true,
|
|
27
|
-
})
|
|
28
|
-
Vue.use(PortalVue)
|
package/.storybook/preview.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import WebFontLoader from "../src/utils/webFontLoader"
|
|
2
|
-
import "normalize.css/normalize.css"
|
|
3
|
-
import '../src/styles/main.scss'
|
|
4
|
-
|
|
5
|
-
import "./plugins"
|
|
6
|
-
import "./components"
|
|
7
|
-
|
|
8
|
-
import { addDecorator, addParameters } from '@storybook/vue';
|
|
9
|
-
import { withA11y } from '@storybook/addon-a11y';
|
|
10
|
-
import { PaddingDecorator } from './decorators';
|
|
11
|
-
import { withKnobs } from '@storybook/addon-knobs';
|
|
12
|
-
import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport';
|
|
13
|
-
import { setConsoleOptions } from '@storybook/addon-console';
|
|
14
|
-
|
|
15
|
-
const cssReq = require.context('!!raw-loader!../src', true, /.\.css$/);
|
|
16
|
-
const cssTokenFiles = cssReq
|
|
17
|
-
.keys()
|
|
18
|
-
.map(filename => ({ filename, content: cssReq(filename).default }));
|
|
19
|
-
|
|
20
|
-
const scssReq = require.context('!!raw-loader!../src', true, /.\.scss$/);
|
|
21
|
-
const scssTokenFiles = scssReq
|
|
22
|
-
.keys()
|
|
23
|
-
.map(filename => ({ filename, content: scssReq(filename).default }));
|
|
24
|
-
|
|
25
|
-
const svgIconsReq = require.context('!!raw-loader!../src', true, /.\.svg$/);
|
|
26
|
-
const svgIconTokenFiles = svgIconsReq
|
|
27
|
-
.keys()
|
|
28
|
-
.map(filename => ({ filename, content: svgIconsReq(filename).default }));
|
|
29
|
-
|
|
30
|
-
addDecorator(withKnobs);
|
|
31
|
-
addDecorator(withA11y);
|
|
32
|
-
addDecorator(PaddingDecorator);
|
|
33
|
-
|
|
34
|
-
const panelExclude = setConsoleOptions({}).panelExclude;
|
|
35
|
-
setConsoleOptions({
|
|
36
|
-
panelExclude: [...panelExclude, /deprecated/],
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
addParameters({
|
|
40
|
-
designToken: {
|
|
41
|
-
files: {
|
|
42
|
-
css: cssTokenFiles,
|
|
43
|
-
scss: scssTokenFiles,
|
|
44
|
-
svgIcons: svgIconTokenFiles
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
options: {
|
|
48
|
-
panelPosition: 'right',
|
|
49
|
-
},
|
|
50
|
-
viewport: {
|
|
51
|
-
viewports: INITIAL_VIEWPORTS,
|
|
52
|
-
},
|
|
53
|
-
backgrounds: [
|
|
54
|
-
{ name: 'white', value: '#ffffff', default: true },
|
|
55
|
-
{ name: 'gray', value: '#cccccc' },
|
|
56
|
-
{ name: 'twitter', value: '#00aced' },
|
|
57
|
-
{ name: 'facebook', value: '#3b5998' },
|
|
58
|
-
],
|
|
59
|
-
});
|
package/babel.config.js
DELETED
package/jest.config.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M13.5942 2H10.4058C5.76813 2 2 5.76813 2 10.4058V20.7163C2 21.4202 2.5797 22 3.28363 22H13.5942C18.2319 22 22 18.2319 22 13.5942V10.4058C22 5.76813 18.2733 2 13.5942 2Z" fill="url(#paint0_linear)"/>
|
|
3
|
-
<path d="M12 7C12 6.44772 12.4477 6 13 6H15.5C16.0523 6 16.5 6.44772 16.5 7V17C16.5 17.5523 16.0523 18 15.5 18H12V7Z" fill="white"/>
|
|
4
|
-
<path d="M6 12C6 11.4477 6.44772 11 7 11H10.5V18H7C6.44772 18 6 17.5523 6 17V12Z" fill="white"/>
|
|
5
|
-
<defs>
|
|
6
|
-
<linearGradient id="paint0_linear" x1="12" y1="2" x2="12" y2="22" gradientUnits="userSpaceOnUse">
|
|
7
|
-
<stop stop-color="#FF3231"/>
|
|
8
|
-
<stop offset="1" stop-color="#E3004C"/>
|
|
9
|
-
</linearGradient>
|
|
10
|
-
</defs>
|
|
11
|
-
</svg>
|
package/public/img/preview.png
DELETED
|
Binary file
|
package/src/App.vue
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div id="app">
|
|
3
|
-
<img alt="MediaCube logo" src="./assets/logo.png" />
|
|
4
|
-
<hello-world msg="Welcome to Your Vue.js App" />
|
|
5
|
-
</div>
|
|
6
|
-
</template>
|
|
7
|
-
|
|
8
|
-
<script>
|
|
9
|
-
import HelloWorld from './service/HelloWorld.vue'
|
|
10
|
-
|
|
11
|
-
export default {
|
|
12
|
-
name: 'App',
|
|
13
|
-
components: {
|
|
14
|
-
HelloWorld,
|
|
15
|
-
},
|
|
16
|
-
}
|
|
17
|
-
</script>
|
|
18
|
-
|
|
19
|
-
<style>
|
|
20
|
-
body,
|
|
21
|
-
html {
|
|
22
|
-
height: 100%;
|
|
23
|
-
margin: 0;
|
|
24
|
-
padding: 0;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
#app {
|
|
28
|
-
height: 100%;
|
|
29
|
-
}
|
|
30
|
-
</style>
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { text, select, boolean } from '@storybook/addon-knobs'
|
|
2
|
-
import { withDesign } from 'storybook-addon-designs'
|
|
3
|
-
|
|
4
|
-
import McAvatar from './McAvatar'
|
|
5
|
-
import {getTokenGroup, getTokensByType} from "../../utils/getTokens"
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
title: 'Elements/McAvatar',
|
|
9
|
-
component: McAvatar,
|
|
10
|
-
decorators: [withDesign],
|
|
11
|
-
parameters: {
|
|
12
|
-
componentSubtitle: 'Status: Ready',
|
|
13
|
-
design: {
|
|
14
|
-
type: 'figma',
|
|
15
|
-
url: 'https://www.figma.com/file/LXNkU1vlAYmydEiC0l0gDa/MC-Design-System?node-id=127%3A1390',
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const avatarSizes = getTokenGroup('avatar-sizes')
|
|
21
|
-
const colors = getTokensByType('color')
|
|
22
|
-
|
|
23
|
-
const getUniqueProps = key => {
|
|
24
|
-
return {
|
|
25
|
-
src: {
|
|
26
|
-
default: text('src', 'https://avatars3.githubusercontent.com/u/43079603?s=460&v=4', key),
|
|
27
|
-
},
|
|
28
|
-
alt: {
|
|
29
|
-
default: text('alt', 'alt text', key),
|
|
30
|
-
},
|
|
31
|
-
size: {
|
|
32
|
-
default: select('size', avatarSizes, '600', key)
|
|
33
|
-
},
|
|
34
|
-
shadow: {
|
|
35
|
-
default: boolean('shadow', true, key)
|
|
36
|
-
},
|
|
37
|
-
draggable: {
|
|
38
|
-
default: boolean('draggable', true, key)
|
|
39
|
-
},
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const getCommonTags = ctx => {
|
|
44
|
-
return {
|
|
45
|
-
src: ctx.src,
|
|
46
|
-
alt: ctx.alt,
|
|
47
|
-
size: ctx.size,
|
|
48
|
-
rounded: ctx.rounded,
|
|
49
|
-
lazy: ctx.lazy,
|
|
50
|
-
shadow: ctx.shadow,
|
|
51
|
-
draggable: ctx.draggable,
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
export const Default = () => ({
|
|
57
|
-
components: { McAvatar },
|
|
58
|
-
computed: {
|
|
59
|
-
tagBind() {
|
|
60
|
-
return getCommonTags(this)
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
props: {
|
|
64
|
-
...getUniqueProps('default'),
|
|
65
|
-
rounded: {
|
|
66
|
-
default: boolean('rounded', false, 'default')
|
|
67
|
-
},
|
|
68
|
-
lazy: {
|
|
69
|
-
default: boolean('lazy', false, 'default')
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
template: '<mc-avatar v-bind="tagBind" />',
|
|
73
|
-
})
|
|
74
|
-
|
|
75
|
-
export const Lazy = () => ({
|
|
76
|
-
components: { McAvatar },
|
|
77
|
-
computed: {
|
|
78
|
-
tagBind() {
|
|
79
|
-
return getCommonTags(this)
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
props: {
|
|
83
|
-
...getUniqueProps('lazy'),
|
|
84
|
-
rounded: {
|
|
85
|
-
default: boolean('rounded', true, 'lazy')
|
|
86
|
-
},
|
|
87
|
-
lazy: {
|
|
88
|
-
default: boolean('lazy', true, 'lazy')
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
template: `<div>
|
|
92
|
-
<div style="height: 2000px">⬇ ⬇ ⬇ Scroll to bottom ⬇ ⬇ ⬇</div>
|
|
93
|
-
<mc-avatar v-bind="tagBind" />
|
|
94
|
-
</div>`,
|
|
95
|
-
})
|
|
96
|
-
|
|
97
|
-
export const Status = () => ({
|
|
98
|
-
components: { McAvatar },
|
|
99
|
-
computed: {
|
|
100
|
-
tagBind() {
|
|
101
|
-
return {
|
|
102
|
-
...getCommonTags(this),
|
|
103
|
-
'border-color': this.borderColor,
|
|
104
|
-
'dot-color': this.dotColor,
|
|
105
|
-
rounded: true,
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
props: {
|
|
110
|
-
...getUniqueProps('status'),
|
|
111
|
-
lazy: {
|
|
112
|
-
default: boolean('lazy', true, 'status'),
|
|
113
|
-
},
|
|
114
|
-
borderColor: {
|
|
115
|
-
default: select('borderColor', colors, 'light-green', 'status')
|
|
116
|
-
},
|
|
117
|
-
dotColor: {
|
|
118
|
-
default: select('dotColor', colors, 'orange', 'status')
|
|
119
|
-
},
|
|
120
|
-
},
|
|
121
|
-
template: `<mc-avatar v-bind="tagBind" />`,
|
|
122
|
-
})
|