@gitlab/ui 123.0.0 → 123.2.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.
- package/dist/components/base/popover/popover.js +18 -3
- package/dist/components/dashboards/dashboard_panel/dashboard_panel.js +2 -2
- package/dist/components/experimental/experiment_badge/experiment_badge.js +1 -1
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/tokens/build/js/tokens.dark.js +53 -2
- package/dist/tokens/build/js/tokens.js +53 -2
- package/dist/tokens/css/tokens.css +4 -1
- package/dist/tokens/css/tokens.dark.css +4 -1
- package/dist/tokens/docs/tokens-tailwind-docs.dark.json +201 -0
- package/dist/tokens/docs/tokens-tailwind-docs.json +201 -0
- package/dist/tokens/figma/constants.tokens.json +85 -0
- package/dist/tokens/js/tokens.dark.js +63 -1
- package/dist/tokens/js/tokens.js +63 -1
- package/dist/tokens/json/tokens.dark.json +234 -38
- package/dist/tokens/json/tokens.json +234 -38
- package/dist/tokens/scss/_tokens.dark.scss +4 -1
- package/dist/tokens/scss/_tokens.scss +4 -1
- package/dist/tokens/scss/_tokens_custom_properties.scss +4 -1
- package/dist/tokens/tailwind/tokens.cjs +2 -0
- package/package.json +3 -3
- package/src/components/base/popover/popover.vue +21 -3
- package/src/components/dashboards/dashboard_panel/dashboard_panel.vue +2 -2
- package/src/components/experimental/experiment_badge/experiment_badge.vue +1 -1
- package/src/tokens/build/css/tokens.css +4 -1
- package/src/tokens/build/css/tokens.dark.css +4 -1
- package/src/tokens/build/docs/tokens-tailwind-docs.dark.json +201 -0
- package/src/tokens/build/docs/tokens-tailwind-docs.json +201 -0
- package/src/tokens/build/figma/constants.tokens.json +85 -0
- package/src/tokens/build/js/tokens.dark.js +63 -1
- package/src/tokens/build/js/tokens.js +63 -1
- package/src/tokens/build/json/tokens.dark.json +234 -38
- package/src/tokens/build/json/tokens.json +234 -38
- package/src/tokens/build/scss/_tokens.dark.scss +4 -1
- package/src/tokens/build/scss/_tokens.scss +4 -1
- package/src/tokens/build/scss/_tokens_custom_properties.scss +4 -1
- package/src/tokens/build/tailwind/tokens.cjs +6 -0
- package/src/tokens/constant/shadow.tokens.json +87 -0
- package/tailwind.defaults.js +3 -5
|
@@ -17,9 +17,9 @@ var script = {
|
|
|
17
17
|
inheritAttrs: false,
|
|
18
18
|
props: {
|
|
19
19
|
cssClasses: {
|
|
20
|
-
type: Array,
|
|
20
|
+
type: [Array, String, Object],
|
|
21
21
|
required: false,
|
|
22
|
-
default:
|
|
22
|
+
default: ''
|
|
23
23
|
},
|
|
24
24
|
/**
|
|
25
25
|
* Space-separated triggers for the popover.
|
|
@@ -57,13 +57,28 @@ var script = {
|
|
|
57
57
|
return this.$scopedSlots.title || this.title;
|
|
58
58
|
},
|
|
59
59
|
customClass() {
|
|
60
|
-
return ['gl-popover', this.hasTitle && 'has-title', this.showCloseButton && 'has-close-button', ...this.cssClasses].filter(Boolean).join(' ');
|
|
60
|
+
return ['gl-popover', this.hasTitle && 'has-title', this.showCloseButton && 'has-close-button', ...this.normalizedCssClasses(this.cssClasses)].filter(Boolean).join(' ');
|
|
61
61
|
},
|
|
62
62
|
shouldShowTitle() {
|
|
63
63
|
return this.hasTitle || this.showCloseButton;
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
methods: {
|
|
67
|
+
/**
|
|
68
|
+
* `cssClasses can be a string, an array, or an object. This method normalizes it to an array
|
|
69
|
+
*/
|
|
70
|
+
normalizedCssClasses(cssClasses) {
|
|
71
|
+
if (Array.isArray(cssClasses)) {
|
|
72
|
+
return cssClasses;
|
|
73
|
+
}
|
|
74
|
+
if (typeof cssClasses === 'string') {
|
|
75
|
+
return cssClasses.trim() ? cssClasses.trim().split(/\s+/) : [];
|
|
76
|
+
}
|
|
77
|
+
if (cssClasses && typeof cssClasses === 'object') {
|
|
78
|
+
return Object.keys(cssClasses).filter(key => cssClasses[key]);
|
|
79
|
+
}
|
|
80
|
+
return [];
|
|
81
|
+
},
|
|
67
82
|
close(e) {
|
|
68
83
|
this.$refs[popoverRefName].doClose();
|
|
69
84
|
/**
|
|
@@ -90,9 +90,9 @@ var script = {
|
|
|
90
90
|
* CSS classes to apply to the title popover (gets passed to the `css-classes` prop of the `GlPopover` component).
|
|
91
91
|
*/
|
|
92
92
|
titlePopoverClasses: {
|
|
93
|
-
type: Array,
|
|
93
|
+
type: [Array, String, Object],
|
|
94
94
|
required: false,
|
|
95
|
-
default:
|
|
95
|
+
default: ''
|
|
96
96
|
},
|
|
97
97
|
/**
|
|
98
98
|
* Set to `true` to show the loading state.
|
|
@@ -63,7 +63,7 @@ var script = {
|
|
|
63
63
|
const __vue_script__ = script;
|
|
64
64
|
|
|
65
65
|
/* template */
|
|
66
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-badge',{ref:"badge",staticClass:"gl-mx-4 hover:gl-cursor-pointer",attrs:{"id":_vm.triggerId,"href":"#","variant":"neutral"}},[_c('span',[_vm._v(_vm._s(_vm.activeType.BADGE))]),_vm._v(" "),_c('gl-popover',{attrs:{"triggers":"hover focus click","show-close-button":"","placement":_vm.popoverPlacement,"target":_vm.triggerId,"css-classes":
|
|
66
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-badge',{ref:"badge",staticClass:"gl-mx-4 hover:gl-cursor-pointer",attrs:{"id":_vm.triggerId,"href":"#","variant":"neutral"}},[_c('span',[_vm._v(_vm._s(_vm.activeType.BADGE))]),_vm._v(" "),_c('gl-popover',{attrs:{"triggers":"hover focus click","show-close-button":"","placement":_vm.popoverPlacement,"target":_vm.triggerId,"css-classes":"!gl-z-9999","title":_vm.activeType.POPOVER_TITLE}},[_c('gl-sprintf',{attrs:{"message":_vm.activeType.POPOVER_CONTENT},scopedSlots:_vm._u([{key:"link",fn:function(ref){
|
|
67
67
|
var content = ref.content;
|
|
68
68
|
return [_c('gl-link',{staticClass:"!gl-text-sm",attrs:{"href":_vm.activeType.HELP_PAGE_URL,"target":"_blank"}},[_vm._v("\n "+_vm._s(content))])]}},{key:"bullets",fn:function(){return [_c('ul',{staticClass:"gl-mb-0 gl-pl-5"},_vm._l((_vm.activeType.POPOVER_BULLETS),function(item,i){return _c('li',{key:("li-" + i)},[_vm._v("\n "+_vm._s(item)+"\n ")])}),0)]},proxy:true},{key:"line-break",fn:function(ref){
|
|
69
69
|
var content = ref.content;
|