@gitlab/ui 117.1.0 → 118.1.0

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.
@@ -0,0 +1,80 @@
1
+ import illustrationsPath from '@gitlab/svgs/dist/illustrations.svg';
2
+ import illustrationsInfo from '@gitlab/svgs/dist/illustrations.json';
3
+ import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
4
+
5
+ //
6
+
7
+ const knownIllustrations = illustrationsInfo.icons;
8
+
9
+ /** This is a re-usable vue component for rendering a svg sprite icon
10
+ * @example
11
+ * <illustration
12
+ * name="status-success-sm"
13
+ * />
14
+ */
15
+ var script = {
16
+ name: 'GlIllustration',
17
+ props: {
18
+ /**
19
+ * One of the illustrations from https://gitlab-org.gitlab.io/gitlab-svgs/ project
20
+ */
21
+ name: {
22
+ type: String,
23
+ required: true,
24
+ validator: value => {
25
+ if (knownIllustrations.some(obj => obj.name === value)) {
26
+ return true;
27
+ }
28
+ // eslint-disable-next-line no-console
29
+ console.warn(`Illustration '${value}' is not a known illustration of @gitlab/svgs`);
30
+ return false;
31
+ }
32
+ }
33
+ },
34
+ computed: {
35
+ spriteHref() {
36
+ return `${illustrationsPath}#${this.name}`;
37
+ },
38
+ illustrationSize() {
39
+ return knownIllustrations.find(obj => obj.name === this.name).svg_size;
40
+ }
41
+ }
42
+ };
43
+
44
+ /* script */
45
+ const __vue_script__ = script;
46
+
47
+ /* template */
48
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('svg',_vm._g({key:_vm.spriteHref,attrs:{"data-testid":(_vm.name + "-illustration"),"aria-label":"","role":"presentation","width":_vm.illustrationSize,"height":_vm.illustrationSize}},_vm.$listeners),[_c('use',{attrs:{"href":_vm.spriteHref}})])};
49
+ var __vue_staticRenderFns__ = [];
50
+
51
+ /* style */
52
+ const __vue_inject_styles__ = undefined;
53
+ /* scoped */
54
+ const __vue_scope_id__ = undefined;
55
+ /* module identifier */
56
+ const __vue_module_identifier__ = undefined;
57
+ /* functional template */
58
+ const __vue_is_functional_template__ = false;
59
+ /* style inject */
60
+
61
+ /* style inject SSR */
62
+
63
+ /* style inject shadow dom */
64
+
65
+
66
+
67
+ const __vue_component__ = /*#__PURE__*/__vue_normalize__(
68
+ { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
69
+ __vue_inject_styles__,
70
+ __vue_script__,
71
+ __vue_scope_id__,
72
+ __vue_is_functional_template__,
73
+ __vue_module_identifier__,
74
+ false,
75
+ undefined,
76
+ undefined,
77
+ undefined
78
+ );
79
+
80
+ export { __vue_component__ as default };
@@ -7,6 +7,7 @@ export { default as GlTokenSelector } from './base/token_selector/token_selector
7
7
  export { default as GlMarkdown } from './base/markdown/markdown';
8
8
  export { default as GlDeprecatedLink, default as GlLink } from './base/link/link';
9
9
  export { default as GlIcon } from './base/icon/icon';
10
+ export { default as GlIllustration } from './base/illustration/illustration';
10
11
  export { default as GlAnimatedChevronRightDownIcon } from './base/animated_icon/animated_chevron_right_down_icon';
11
12
  export { default as GlAnimatedChevronLgRightDownIcon } from './base/animated_icon/animated_chevron_lg_right_down_icon';
12
13
  export { default as GlAnimatedChevronDownUpIcon } from './base/animated_icon/animated_chevron_down_up_icon';