mediacube-ui 0.1.347 → 0.1.349

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.
Files changed (107) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/mediacube-ui.common.js +384 -0
  3. package/package.json +11 -4
  4. package/src/elements/McAvatar/McAvatar.vue +276 -0
  5. package/src/elements/McBadge/McBadge.vue +153 -0
  6. package/src/elements/McButton/McButton.vue +850 -0
  7. package/src/elements/McChip/McChip.vue +305 -0
  8. package/src/elements/McCropper/McCropper.vue +135 -0
  9. package/src/elements/McDate/McDate.vue +107 -0
  10. package/src/elements/McDatePicker/McDatePicker.vue +910 -0
  11. package/src/elements/McField/McFieldCheckbox/McFieldCheckbox.vue +339 -0
  12. package/src/elements/McField/McFieldRadio/McFieldRadioButton/McFieldRadioButton.vue +207 -0
  13. package/src/elements/McField/McFieldRadio/McFieldRadioGroup/McFieldRadioGroup.vue +198 -0
  14. package/src/elements/McField/McFieldSelect/McFieldSelect.vue +1088 -0
  15. package/src/elements/McField/McFieldText/McFieldText.vue +977 -0
  16. package/src/elements/McField/McFieldToggle/McFieldToggle.vue +273 -0
  17. package/src/elements/McInfinityLoadingIndicator/McInfinityLoadingIndicator.vue +97 -0
  18. package/src/elements/McNotification/McNotification.vue +215 -0
  19. package/src/elements/McProgress/McProgress.vue +223 -0
  20. package/src/elements/McRangeSlider/McRangeSlider.vue +199 -0
  21. package/src/elements/McSeparator/McSeparator.vue +143 -0
  22. package/src/elements/McSlideUpDown/McSlideUpDown.vue +157 -0
  23. package/src/elements/McSvgIcon/McSvgIcon.vue +128 -0
  24. package/src/elements/McTabs/McTab/McTab.vue +189 -0
  25. package/src/elements/McTabs/McTabs/McTabs.vue +538 -0
  26. package/src/elements/McTitle/McTitle.vue +370 -0
  27. package/src/elements/McTooltip/McTooltip.vue +339 -0
  28. package/src/helpers/consts.js +3 -0
  29. package/src/helpers/delayedAction.js +26 -0
  30. package/src/helpers/storybookFunctions.js +19 -0
  31. package/src/helpers/storybookVariables.js +24 -0
  32. package/src/mixins/equalFieldHeight.js +59 -0
  33. package/src/mixins/fieldErrors.js +28 -0
  34. package/src/patterns/McAccordion/McAccordion.vue +53 -0
  35. package/src/patterns/McCells/McCell/McCell.vue +102 -0
  36. package/src/patterns/McChat/McChat.vue +306 -0
  37. package/src/patterns/McChat/McChatComment/McChatComment.vue +268 -0
  38. package/src/patterns/McChat/McChatForm/McChatForm.vue +150 -0
  39. package/src/patterns/McCollapse/McCollapse.vue +282 -0
  40. package/src/patterns/McDrawer/McDrawer.vue +150 -0
  41. package/src/patterns/McDropdown/McDropdown.vue +249 -0
  42. package/src/patterns/McDropdown/McDropdownPanel/McDropdownPanel.vue +44 -0
  43. package/src/patterns/McFakeScroll/McFakeScroll.vue +279 -0
  44. package/src/patterns/McFilter/McFilter.vue +847 -0
  45. package/src/patterns/McFilter/McFilterChip/McFilterChip.vue +85 -0
  46. package/src/patterns/McFilter/McFilterTags/McFilterTags.vue +376 -0
  47. package/src/patterns/McFilter/McFilterTypeDate/McFilterTypeDate.vue +70 -0
  48. package/src/patterns/McFilter/McFilterTypeRange/McFilterTypeRange.vue +133 -0
  49. package/src/patterns/McFilter/McFilterTypeRelation/McFilterTypeRelation.vue +224 -0
  50. package/src/patterns/McFilter/McFilterTypeSimple/McFilterTypeSimple.vue +164 -0
  51. package/src/patterns/McFilter/McFilterTypeText/McFilterTypeText.vue +62 -0
  52. package/src/patterns/McGrid/McGridCol/McGridCol.vue +166 -0
  53. package/src/patterns/McGrid/McGridRow/McGridRow.vue +158 -0
  54. package/src/patterns/McModal/McModal.vue +686 -0
  55. package/src/patterns/McOverlay/McOverlay.vue +79 -0
  56. package/src/patterns/McPreview/McPreview.vue +119 -0
  57. package/src/patterns/McSideBar/McSideBar/McSideBar.vue +389 -0
  58. package/src/patterns/McSideBar/McSideBarBottom/McSideBarBottom.vue +126 -0
  59. package/src/patterns/McSideBar/McSideBarButton/McSideBarButton.vue +257 -0
  60. package/src/patterns/McSideBar/McSideBarCenter/McSideBarCenter.vue +369 -0
  61. package/src/patterns/McSideBar/McSideBarTop/McSideBarTop.vue +243 -0
  62. package/src/patterns/McStack/McStack.vue +163 -0
  63. package/src/patterns/McTable/McTable/McTable.vue +860 -0
  64. package/src/patterns/McTable/McTableCol/McTableCol.vue +299 -0
  65. package/src/patterns/McTableCard/McTableCard.vue +138 -0
  66. package/src/patterns/McTableCard/McTableCardHeader/McTableCardHeader.vue +76 -0
  67. package/src/patterns/McTopBar/McTopBar.vue +155 -0
  68. package/src/patterns/McWrapScroll/McWrapScroll.vue +293 -0
  69. package/src/styles/_functions.scss +189 -0
  70. package/src/styles/_mixins.scss +619 -0
  71. package/src/styles/_spacing.scss +33 -0
  72. package/src/styles/_variables.scss +23 -0
  73. package/src/styles/global.scss +311 -0
  74. package/src/styles/main.scss +4 -0
  75. package/src/styles/table.scss +12 -0
  76. package/src/styles/toast.scss +59 -0
  77. package/src/templates/layouts/McContentFixed/McContentFixed.vue +60 -0
  78. package/src/templates/layouts/McMain/McMain.vue +115 -0
  79. package/src/templates/layouts/McRoot/McRoot.vue +45 -0
  80. package/src/tokens/animations.scss +9 -0
  81. package/src/tokens/border-radius.scss +26 -0
  82. package/src/tokens/box-shadows.scss +28 -0
  83. package/src/tokens/colors.scss +82 -0
  84. package/src/tokens/durations.scss +7 -0
  85. package/src/tokens/easings.scss +6 -0
  86. package/src/tokens/font-families.scss +8 -0
  87. package/src/tokens/font-sizes.scss +23 -0
  88. package/src/tokens/font-weights.scss +9 -0
  89. package/src/tokens/gradients.scss +19 -0
  90. package/src/tokens/letter-spacings.scss +6 -0
  91. package/src/tokens/line-heights.scss +22 -0
  92. package/src/tokens/media-queries.scss +32 -0
  93. package/src/tokens/opacities.scss +8 -0
  94. package/src/tokens/sizes.scss +47 -0
  95. package/src/tokens/spacings.scss +38 -0
  96. package/src/tokens/z-indexes.scss +14 -0
  97. package/src/utils/dayjs.js +19 -0
  98. package/src/utils/filters.js +11 -0
  99. package/src/utils/getTokens.js +41 -0
  100. package/src/utils/load-icons.js +3 -0
  101. package/src/utils/treeSearch.js +30 -0
  102. package/src/utils/webFontLoader.js +12 -0
  103. package/dist/0.mediacube-ui.umd.js +0 -50
  104. package/dist/assets/img/icons.3b7d59b2f49c67a2a3a4566b8ab233fd.svg +0 -1
  105. package/dist/assets/img/no_table_data.236cd56f46cfb71fc363b008d4ca70d5.png +0 -0
  106. package/dist/assets/img/no_user.e0030d6e54e2400e1181fd22b83cf8ae.png +0 -0
  107. package/dist/mediacube-ui.umd.js +0 -1
@@ -0,0 +1,82 @@
1
+ /**
2
+ * @tokens Colors
3
+ * @presenter Color
4
+ */
5
+ //neutral colors
6
+ $color-black: #202427; /* Цвет основного текста */
7
+ $color-dark-gray: #5C6670; /* Иконки, доп.текст, менее активные эл-ты */
8
+ $color-gray: #8F99A3; /* Для плашек, хорошо держит форму */
9
+ $color-outline-gray: #C7CCD1; /* Для обводок */
10
+ $color-outline-light: #DEE0E2; /* Для обводок */
11
+ $color-light-gray: #F3F5F7; /* Для бэкграунда картинок */
12
+ $color-hover-gray: #EDF0F3; /* Ховеры и неактивные эл-ты */
13
+ $color-bg-gray: #F5F6Fa; /* Бэкграунд */
14
+ $color-white: #FFFFFF; /* Основной фон */
15
+ //main colors
16
+ $color-hover-purple: #7238FF; /* Кнопки, ссылки, выделение активных элементов */
17
+ $color-purple: #8756FF; /* Кнопки, ссылки, выделение активных элементов и иконки */
18
+ $color-light-purple: #CBB7FF; /* Текст на accent purple */
19
+ $color-lighter-purple: #EEE8FF; /* Выбранные элементы */
20
+ $color-bg-purple: #9673ED; /* Цвет для бэкграунда */
21
+ $color-primary-bg: #F5F6Fa; /* Цвет основного фона */
22
+ //additional colors
23
+ $color-hover-blue: #0A54C2; /* Альтернатива – Кнопки, ссылки, выделение активных элементов */
24
+ $color-blue: #2578F4; /* Альтернатива – Кнопки, ссылки, выделение активных элементов и иконки */
25
+ $color-light-blue: #92BBFA; /* Альтернатива – Текст на accent blue */
26
+ $color-lighter-blue: #E1EDFF; /* Альтернатива – Выбранные элементы */
27
+
28
+ $color-dark-orange: #BD8400; /* Кнопки, статус данных */
29
+ $color-orange: #FCB100; /* Кнопки, статус данных */
30
+ $color-yellow: #FFC60A;
31
+ $color-dark-red: #D5260B; /* Красные кнопки отмены */
32
+ $color-bright-pink: #e8178a; /* Promo color */
33
+ $color-red: #F5563D; /* Красные кнопки отмены */
34
+ $color-pale-pink: #FC9283;
35
+ $color-dark-green: #218321; /* Цифры и положительные действия */
36
+ $color-green: #4DCB4D; /* Зелёные кнопки */
37
+ $color-toxic: #E8F443; /* Кнопки, статус данных */
38
+
39
+ $color-ultraviolet: #C41CFD; /* Статус данных */
40
+ $color-pinkish: #F073B1; /* Статус данных */
41
+ $color-azure: #0A85C2; /* Статус данных */
42
+
43
+ $color-turquoise: #4EA9A2; /* Нотификации вверху страницы */
44
+ $color-darken-turquoise: #2F8C99; /* Кастомные тултипы */
45
+
46
+ $color-transparent: transparent; /* Прозрачный фон */
47
+
48
+ $token-colors: (
49
+ "purple": $color-purple,
50
+ "hover-purple": $color-hover-purple,
51
+ "light-purple": $color-light-purple,
52
+ "bg-purple": $color-bg-purple,
53
+ "lighter-purple": $color-lighter-purple,
54
+ "black": $color-black,
55
+ "outline-light": $color-outline-light,
56
+ "dark-gray": $color-dark-gray,
57
+ "gray": $color-gray,
58
+ "outline-gray": $color-outline-gray,
59
+ "hover-gray": $color-hover-gray,
60
+ "bg-gray": $color-bg-gray,
61
+ "white": $color-white,
62
+ "hover-blue": $color-hover-blue,
63
+ "blue": $color-blue,
64
+ "light-blue": $color-light-blue,
65
+ "lighter-blue": $color-lighter-blue,
66
+ "dark-orange": $color-dark-orange,
67
+ "orange": $color-orange,
68
+ "yellow": $color-yellow,
69
+ "dark-red": $color-dark-red,
70
+ "red": $color-red,
71
+ "bright-pink": $color-bright-pink,
72
+ "pale-pink": $color-pale-pink,
73
+ "dark-green": $color-dark-green,
74
+ "green": $color-green,
75
+ "toxic": $color-toxic,
76
+ "ultraviolet": $color-ultraviolet,
77
+ "pinkish": $color-pinkish,
78
+ "azure": $color-azure,
79
+ "turquoise": $color-turquoise,
80
+ "darken-turquoise": $color-darken-turquoise,
81
+ "transparent": $color-transparent,
82
+ );
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @tokens Durations
3
+ */
4
+
5
+ $duration-s: 150ms;
6
+ $duration-m: 300ms;
7
+ $duration-l: 500ms;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @tokens Easings
3
+ * @presenter Easing
4
+ */
5
+
6
+ $easing-swift: cubic-bezier(0.55, 0, 0.1, 1);
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @tokens Font Families
3
+ * @presenter FontFamily
4
+ */
5
+
6
+ $font-family-main: 'Inter', sans-serif;
7
+ $font-family-additional: 'Source Serif Pro', serif;
8
+
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @tokens Font Sizes
3
+ * @presenter FontSize
4
+ */
5
+
6
+ $font-size-100: 10px;
7
+ $font-size-200: 13px;
8
+ $font-size-300: 16px;
9
+ $font-size-400: 20px;
10
+ $font-size-500: 28px;
11
+ $font-size-600: 32px;
12
+ $font-size-700: 48px;
13
+
14
+ $token-font-sizes: (
15
+ "100": $font-size-100,
16
+ "200": $font-size-200,
17
+ "300": $font-size-300,
18
+ "400": $font-size-400,
19
+ "500": $font-size-500,
20
+ "600": $font-size-600,
21
+ "700": $font-size-700,
22
+ );
23
+
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @tokens Font Weights
3
+ * @presenter FontWeight
4
+ */
5
+
6
+ $font-weight-normal: 400;
7
+ $font-weight-medium: 500;
8
+ $font-weight-semi-bold: 600;
9
+ $font-weight-bold: 700;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @tokens Gradients
3
+ * @presenter Gradient
4
+ */
5
+ $gradient-pink: linear-gradient(180deg, #F5576C 0%, #F093FB 100%); /* Фирменный цвет личного кабинета */
6
+ $gradient-violet: linear-gradient(180deg, #E41AFE 0%, #8035F8 100%); /* Столбики в графике 5 порядка */
7
+ $gradient-blue: linear-gradient(180deg, #1ADBFE 0%, #3580F8 100%); /* Нотификации и столбики в графике 4 порядка */
8
+ $gradient-yellow: linear-gradient(180deg, #FEE41A 0%, #F89B35 100%); /* Столбики в графике 3 порядка */
9
+ $gradient-green: linear-gradient(180deg, #C9DD4C 0%, #63BE7E 100%); /* Столбики в графике 2 порядка */
10
+ $gradient-red: linear-gradient(180deg, #F26567 0%, #F79440 100%); /* Столбики в графике 1 порядка */
11
+ $gradient-purple: linear-gradient(270deg, #9a47ed 0%, #8446ff 100%); /* Основной градиент для MCPay */
12
+ $gradient-purple-pink: linear-gradient(90deg, #722eff 2%, #fe6ffc 100%); /*Градиент промоакции*/
13
+ $gradient-blue-purple: linear-gradient(90deg, #18bfe3 20%, #8756ff 70%); /*Градиент промоакции*/
14
+ $gradient-dark-blue: linear-gradient(90deg, #5550EF 0%, #7F4EFF 100%); /*Градиент автоплатежей*/
15
+ $gradient-light-blue: linear-gradient(277.29deg, #d6e8ff 5.67%, #efe9ff 94.33%); /*Градиент новых криптовалют*/
16
+ $gradient-purple-blue: linear-gradient(272.54deg, #18bfe3 17.19%, #8756ff 70.31%); /*Градиент баннера для криптовалют*/
17
+
18
+ $gradient-primary-radial: radial-gradient(rgb(179, 211, 255), rgb(62, 132, 244)); /* Radial gradient example */
19
+
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @tokens Letter Spacing
3
+ * @presenter Spacing
4
+ */
5
+ $letter-spacing-m: 0.4px;
6
+ $letter-spacing-l: 1px;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @tokens Line Heights
3
+ * @presenter LineHeight
4
+ */
5
+
6
+ $line-height-150: 12px; /* Additional token */
7
+ $line-height-200: 16px;
8
+ $line-height-250: 20px; /* Additional token */
9
+ $line-height-300: 24px;
10
+ $line-height-400: 32px;
11
+ $line-height-500: 40px;
12
+ $line-height-600: 48px;
13
+
14
+ $token-line-heights: (
15
+ 150: $line-height-150,
16
+ 200: $line-height-200,
17
+ 250: $line-height-250,
18
+ 300: $line-height-300,
19
+ 400: $line-height-400,
20
+ 500: $line-height-500,
21
+ 600: $line-height-600,
22
+ );
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @tokens Media Queries
3
+ * @presenter Spacing
4
+ */
5
+
6
+ $media-query-xs: "(min-width: 375px)";
7
+ $media-query-s: "(min-width: 480px)";
8
+ $media-query-m: "(min-width: 768px)";
9
+ $media-query-l: "(min-width: 1024px)";
10
+ $media-query-xl: "(min-width: 1440px)";
11
+
12
+ $media-query-xs-down: "(max-width: 374px)";
13
+ $media-query-s-down: "(max-width: 479px)";
14
+ $media-query-m-down: "(max-width: 767px)";
15
+ $media-query-l-down: "(max-width: 1023px)";
16
+ $media-query-xl-down: "(max-width: 1439px)";
17
+
18
+ $media-desktop: "(hover: hover) and (pointer: fine)";
19
+ $media-mobile: "(hover: none) and (pointer: coarse)";
20
+
21
+ $token-media-queries: (
22
+ "xs": $media-query-xs,
23
+ "s": $media-query-s,
24
+ "m": $media-query-m,
25
+ "l": $media-query-l,
26
+ "xl": $media-query-xl,
27
+ "xs-down": $media-query-xs-down,
28
+ "s-down": $media-query-s-down,
29
+ "m-down": $media-query-m-down,
30
+ "l-down": $media-query-l-down,
31
+ "xl-down": $media-query-xl-down,
32
+ );
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @tokens Opacities
3
+ * @presenter Opacity
4
+ */
5
+ $opacity-disabled: 0.6;
6
+ $opacity-active: 0.7;
7
+ $opacity-hover: 0.8;
8
+
@@ -0,0 +1,47 @@
1
+ /**
2
+ * @tokens Sizes
3
+ * @presenter Spacing
4
+ */
5
+
6
+ $size-50: 4px; /* Additional token */
7
+ $size-100: 8px;
8
+ $size-150: 12px; /* Additional token */
9
+ $size-200: 16px;
10
+ $size-250: 20px; /* Additional token */
11
+ $size-300: 24px;
12
+ $size-400: 32px;
13
+ $size-500: 40px;
14
+ $size-550: 44px; /* Additional token */
15
+ $size-600: 48px;
16
+ $size-700: 56px;
17
+ $size-800: 64px;
18
+ $size-900: 72px;
19
+ $size-1000: 80px;
20
+
21
+ $token-avatar-sizes: (
22
+ 300: $size-300,
23
+ 400: $size-400,
24
+ 500: $size-500,
25
+ 600: $size-600,
26
+ 700: $size-700,
27
+ 800: $size-800,
28
+ 900: $size-900,
29
+ 1000: $size-1000,
30
+ );
31
+
32
+ $token-icon-sizes: (
33
+ 50: $size-50,
34
+ 100: $size-100,
35
+ 150: $size-150,
36
+ 200: $size-200,
37
+ 250: $size-250,
38
+ 300: $size-300,
39
+ 400: $size-400,
40
+ 500: $size-500,
41
+ 550: $size-550,
42
+ 600: $size-600,
43
+ 700: $size-700,
44
+ 800: $size-800,
45
+ 900: $size-900,
46
+ 1000: $size-1000,
47
+ );
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @tokens Spacings
3
+ * @presenter Spacing
4
+ */
5
+
6
+ $space-zero: 0;
7
+ $space-50: 4px; /* Additional token */
8
+ $space-100: 8px;
9
+ $space-150: 12px; /* Additional token */
10
+ $space-200: 16px;
11
+ $space-250: 20px; /* Additional token */
12
+ $space-300: 24px;
13
+ $space-350: 28px; /* Additional token */
14
+ $space-400: 32px;
15
+ $space-450: 36px; /* Additional token */
16
+ $space-500: 40px;
17
+ $space-600: 48px;
18
+ $space-700: 56px;
19
+ $space-800: 64px;
20
+ $space-900: 72px;
21
+ $space-1000: 80px;
22
+
23
+ $token-spaces: (
24
+ 50: $space-50, /* Additional token */
25
+ 100: $space-100,
26
+ 150: $space-150, /* Additional token */
27
+ 200: $space-200,
28
+ 250: $space-250, /* Additional token */
29
+ 300: $space-300,
30
+ 400: $space-400,
31
+ 450: $space-450, /* Additional token */
32
+ 500: $space-500,
33
+ 600: $space-600,
34
+ 700: $space-700,
35
+ 800: $space-800,
36
+ 900: $space-900,
37
+ 1000: $space-1000,
38
+ );
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @tokens Z-Index
3
+ */
4
+
5
+ $z-index-sticky-tabs: 49;
6
+ $z-index-dropdown: 100;
7
+ $z-index-sticky: 100;
8
+ $z-index-overlay-page: 7000;
9
+ $z-index-modal: 8000;
10
+ $z-index-top-line: 8000;
11
+ $z-index-header: 10000;
12
+ $z-index-notification: 10001;
13
+ $z-index-overlay: 10002;
14
+ $z-index-toasted: 10003;
@@ -0,0 +1,19 @@
1
+ import dayjs from 'dayjs'
2
+ import timezone from 'dayjs/plugin/timezone'
3
+ import utc from 'dayjs/plugin/utc'
4
+ import 'dayjs/locale/en'
5
+
6
+ // EN have direct import
7
+ const dayjsLocales = {
8
+ en: () => Promise.resolve(),
9
+ es: () => import('dayjs/locale/es'),
10
+ pt: () => import('dayjs/locale/pt'),
11
+ th: () => import('dayjs/locale/th'),
12
+ ru: () => import('dayjs/locale/ru'),
13
+ vi: () => import('dayjs/locale/vi'),
14
+ }
15
+
16
+ dayjs.extend(timezone)
17
+ dayjs.extend(utc)
18
+
19
+ export { dayjs, dayjsLocales }
@@ -0,0 +1,11 @@
1
+ import numeral from 'numeral'
2
+
3
+ export const number = (value, decimals = 2) => {
4
+ if (value == null) return null
5
+
6
+ let deciamlsString = ''.padStart(decimals, '0')
7
+
8
+ return numeral(value)
9
+ .format('0,0.' + deciamlsString)
10
+ .replace(/,/g, ' ')
11
+ }
@@ -0,0 +1,41 @@
1
+ import tokens from '../assets/tokens/tokens.json'
2
+
3
+ const getTokenValue = name => {
4
+ const tokenData = tokens.variables.find(v => v.name === name)
5
+ return tokenData.value
6
+ }
7
+
8
+ const getTokensByType = type => {
9
+ const filteredTokens = tokens.variables.filter(v => {
10
+ const regExp = new RegExp(`^\\$${type}-`)
11
+ return regExp.test(v.name)
12
+ })
13
+ const tokenList = {}
14
+ filteredTokens.forEach(t => {
15
+ const key = t.name.replace(`$${type}-`, '')
16
+ tokenList[key] = key
17
+ })
18
+ return tokenList
19
+ }
20
+
21
+ const getTokenGroup = name => {
22
+ const dataTokens = tokens.variables.find(v => v.name === `$token-${name}`)
23
+ let tokenList = {}
24
+ if (!dataTokens) return tokenList
25
+
26
+ if ('mapValue' in dataTokens) {
27
+ dataTokens.mapValue.forEach(t => (tokenList[t.name] = t.name))
28
+ return tokenList
29
+ }
30
+
31
+ const valueArr = dataTokens.value.replace(/\/\*.+\*\/\s/, '').split(' ')
32
+ valueArr.forEach(i => {
33
+ if (i.match(/.+:$/)) {
34
+ const key = i.slice(0, i.length - 1)
35
+ tokenList[key] = key
36
+ }
37
+ })
38
+ return tokenList
39
+ }
40
+
41
+ export { getTokensByType, getTokenGroup, getTokenValue }
@@ -0,0 +1,3 @@
1
+ const svgIconsReq = require.context('!!raw-loader!../assets/icons', true, /.\.svg$/)
2
+ const svgIcons = svgIconsReq.keys().map(name => ({ name, content: svgIconsReq(name).default }))
3
+ export default svgIcons
@@ -0,0 +1,30 @@
1
+ export const findParentComponent = ($component, name) => {
2
+ let $parent = null
3
+ do {
4
+ if (!$component) {
5
+ return null
6
+ }
7
+ let $componentParent = $component.$parent
8
+ if ($componentParent && $componentParent.$options.name === name) {
9
+ $parent = $componentParent
10
+ } else {
11
+ $component = $componentParent
12
+ }
13
+ } while ($parent == null)
14
+ return $parent
15
+ }
16
+
17
+ export const findChildrenComponents = ($component, name) => {
18
+ if ($component.$children == null || $component.$children.length === 0) return []
19
+
20
+ let $collapses = []
21
+ $component.$children.forEach($child => {
22
+ if ($child.$options.name === name) {
23
+ $collapses = [...$collapses, $child]
24
+ } else {
25
+ $collapses = [...$collapses, ...findChildrenComponents($child, name)]
26
+ }
27
+ })
28
+
29
+ return $collapses
30
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Web Font Loader takes care of Vue Design System’s font loading.
3
+ * For full documentation, see: https://github.com/typekit/webfontloader
4
+ */
5
+ import WebFont from 'webfontloader'
6
+
7
+ WebFont.load({
8
+ custom: {
9
+ families: ['Font Awesome 5 Icons:400,900', 'Font Awesome 5 Brands:400'],
10
+ urls: ['https://maxst.icons8.com/vue-static/landings/line-awesome/line-awesome/1.3.0/css/line-awesome.min.css'],
11
+ },
12
+ })