@gitlab/ui 115.10.0 → 116.0.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.
Files changed (53) hide show
  1. package/dist/components/base/filtered_search/filtered_search_suggestion.js +11 -5
  2. package/dist/components/dashboards/dashboard_layout/grid_layout/grid_layout.js +2 -2
  3. package/dist/components/dashboards/dashboard_panel/dashboard_panel.js +45 -3
  4. package/dist/components/index.js +1 -1
  5. package/dist/index.css +1 -1
  6. package/dist/index.css.map +1 -1
  7. package/dist/tailwind.css +1 -1
  8. package/dist/tailwind.css.map +1 -1
  9. package/dist/tokens/common_story_options.js +1 -6
  10. package/dist/tokens/tokens_story.js +3 -16
  11. package/package.json +5 -5
  12. package/src/components/base/button/button.scss +8 -0
  13. package/src/components/base/filtered_search/filtered_search_suggestion.vue +32 -14
  14. package/src/components/dashboards/dashboard_layout/grid_layout/grid_layout.vue +2 -2
  15. package/src/components/dashboards/dashboard_panel/dashboard_panel.md +61 -13
  16. package/src/components/dashboards/dashboard_panel/dashboard_panel.vue +46 -3
  17. package/src/components/index.js +1 -1
  18. package/src/tokens/common_story_options.js +1 -9
  19. package/src/tokens/tokens_story.vue +2 -22
  20. package/src/components/base/form/form.md +0 -2
  21. package/src/components/base/form/form_character_count/form_character_count.md +0 -53
  22. package/src/components/base/form/form_combobox/form_combobox.md +0 -52
  23. package/src/components/base/form/form_date/form_date.md +0 -26
  24. package/src/components/base/form/form_fields/form_fields.md +0 -41
  25. package/src/components/base/form/form_group/form_group.md +0 -1
  26. package/src/components/base/form/form_input_group/form_input_group.md +0 -67
  27. package/src/components/base/form/input_group_text/input_group_text.md +0 -1
  28. package/src/components/charts/bar/bar.md +0 -3
  29. package/src/components/charts/chart/chart.md +0 -19
  30. package/src/components/charts/gauge/gauge.md +0 -8
  31. package/src/components/charts/heatmap/heatmap.md +0 -7
  32. package/src/components/charts/legend/legend.md +0 -16
  33. package/src/components/charts/line/line.md +0 -7
  34. package/src/components/charts/series_label/series_label.md +0 -1
  35. package/src/components/charts/shared/tooltip/tooltip.md +0 -3
  36. package/src/components/charts/single_stat/single_stat.md +0 -8
  37. package/src/components/charts/sparkline/sparkline.md +0 -8
  38. package/src/components/charts/stacked_column/stacked_column.md +0 -10
  39. package/src/components/regions/empty_state/empty_state.md +0 -4
  40. package/src/components/utilities/animated_number/animated_number.md +0 -6
  41. package/src/components/utilities/friendly_wrap/friendly_wrap.md +0 -66
  42. package/src/components/utilities/intersection_observer/intersection_observer.md +0 -16
  43. package/src/components/utilities/intersperse/intersperse.md +0 -90
  44. package/src/components/utilities/sprintf/sprintf.md +0 -243
  45. package/src/components/utilities/truncate/truncate.md +0 -14
  46. package/src/components/utilities/truncate_text/truncate_text.md +0 -26
  47. package/src/directives/hover_load/hover_load.md +0 -22
  48. package/src/directives/outside/outside.md +0 -140
  49. package/src/directives/resize_observer/resize_observer.md +0 -54
  50. package/src/directives/safe_html/safe_html.md +0 -58
  51. package/src/directives/safe_link/safe_link.md +0 -37
  52. package/src/internal/color_contrast/color_contrast.md +0 -8
  53. package/src/internal/color_contrast/color_contrast.vue +0 -52
@@ -1,10 +1,10 @@
1
- import GlDropdownItem from '../dropdown/dropdown_item';
1
+ import GlIcon from '../icon/icon';
2
2
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
3
3
 
4
4
  var script = {
5
5
  name: 'GlFilteredSearchSuggestion',
6
6
  components: {
7
- GlDropdownItem
7
+ GlIcon
8
8
  },
9
9
  inject: ['filteredSearchSuggestionListInstance'],
10
10
  inheritAttrs: false,
@@ -12,11 +12,17 @@ var script = {
12
12
  /**
13
13
  * Value that will be emitted if this suggestion is selected.
14
14
  */
15
+ iconName: {
16
+ type: String,
17
+ required: false,
18
+ default: ''
19
+ },
15
20
  value: {
16
21
  required: true,
17
22
  validator: () => true
18
23
  }
19
24
  },
25
+ emits: ['suggestion'],
20
26
  computed: {
21
27
  isActive() {
22
28
  return this.filteredSearchSuggestionListInstance.activeItem === this;
@@ -26,8 +32,8 @@ var script = {
26
32
  isActive(newValue) {
27
33
  if (newValue) {
28
34
  window.requestAnimationFrame(() => {
29
- var _this$$refs$item, _this$$refs$item$$el;
30
- (_this$$refs$item = this.$refs.item) === null || _this$$refs$item === void 0 ? void 0 : (_this$$refs$item$$el = _this$$refs$item.$el) === null || _this$$refs$item$$el === void 0 ? void 0 : _this$$refs$item$$el.scrollIntoView({
35
+ var _this$$el;
36
+ (_this$$el = this.$el) === null || _this$$el === void 0 ? void 0 : _this$$el.scrollIntoView({
31
37
  block: 'nearest',
32
38
  inline: 'end'
33
39
  });
@@ -54,7 +60,7 @@ var script = {
54
60
  const __vue_script__ = script;
55
61
 
56
62
  /* template */
57
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-dropdown-item',_vm._b({ref:"item",staticClass:"gl-filtered-search-suggestion",class:{ 'gl-filtered-search-suggestion-active': _vm.isActive },attrs:{"data-testid":"filtered-search-suggestion","tabindex":"-1","href":"#"},nativeOn:{"mousedown":function($event){$event.preventDefault();return _vm.emitValue.apply(null, arguments)}}},'gl-dropdown-item',_vm.$attrs,false),[_vm._t("default")],2)};
63
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('li',{staticClass:"gl-dropdown-item gl-filtered-search-suggestion",class:{ 'gl-filtered-search-suggestion-active': _vm.isActive },attrs:{"role":"presentation"}},[_c('button',{staticClass:"dropdown-item",attrs:{"data-testid":"filtered-search-suggestion","tabindex":"-1","role":"menuitem"},on:{"mousedown":function($event){$event.preventDefault();return _vm.emitValue.apply(null, arguments)}}},[(_vm.iconName)?_c('gl-icon',{staticClass:"gl-dropdown-item-icon gl-fill-icon-default",attrs:{"name":_vm.iconName}}):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-dropdown-item-text-wrapper"},[_c('p',{staticClass:"gl-dropdown-item-text-primary"},[_vm._t("default")],2)])],1)])};
58
64
  var __vue_staticRenderFns__ = [];
59
65
 
60
66
  /* style */
@@ -144,11 +144,11 @@ var script = {
144
144
  margin: '8px',
145
145
  // CSS Selector for finding the drag handle element
146
146
  handle: '.grid-stack-item-handle',
147
- /* Magic number 125px:
147
+ /* Magic number:
148
148
  * After allowing for padding, and the panel title row, this leaves us with minimum 48px height for the cell content.
149
149
  * This means text/content with our spacing scale can fit up to 49px without scrolling.
150
150
  */
151
- cellHeight: '125px',
151
+ cellHeight: '137px',
152
152
  // Setting 1 in minRow prevents the grid collapsing when all panels are removed
153
153
  minRow: 1,
154
154
  // Define the number of columns for anything below a set width, defaults to fill the available space
@@ -21,62 +21,104 @@ var script = {
21
21
  GlTruncate
22
22
  },
23
23
  props: {
24
+ /**
25
+ * CSS classes to apply to the panel container.
26
+ */
24
27
  containerClass: {
25
28
  type: String,
26
29
  required: false,
27
30
  default: ''
28
31
  },
32
+ /**
33
+ * Additional CSS classes to apply to the `#body` slot container.
34
+ */
29
35
  bodyContentClass: {
30
36
  type: String,
31
37
  required: false,
32
38
  default: ''
33
39
  },
40
+ /**
41
+ * Used to set the color of the panel border.
42
+ */
34
43
  borderColorClass: {
35
44
  type: String,
36
45
  required: false,
37
46
  default: ''
38
47
  },
48
+ /**
49
+ * The string to render as the panel title.
50
+ */
39
51
  title: {
40
52
  type: String,
41
53
  required: false,
42
54
  default: ''
43
55
  },
56
+ /**
57
+ * The name of the icon to render next to the panel title.
58
+ */
44
59
  titleIcon: {
45
60
  type: String,
46
61
  required: false,
47
62
  default: ''
48
63
  },
64
+ /**
65
+ * The CSS classes to apply to the title icon.
66
+ */
49
67
  titleIconClass: {
50
68
  type: String,
51
69
  required: false,
52
70
  default: ''
53
71
  },
72
+ /**
73
+ * Configuration object for the title popover. Expected structure:
74
+ *
75
+ * - `description`: The popover text content with interpolation placeholders.
76
+ * Uses `%{linkStart}` and `%{linkEnd}` as markers for where a link should be inserted.
77
+ *
78
+ * - `descriptionLink`: The optional URL that will be used for the link portion
79
+ * of the description text between the linkStart and linkEnd markers.
80
+ */
54
81
  titlePopover: {
55
82
  type: Object,
56
83
  required: false,
57
84
  default: () => ({})
58
85
  },
86
+ /**
87
+ * Set to `true` to show the loading state.
88
+ */
59
89
  loading: {
60
90
  type: Boolean,
61
91
  required: false,
62
92
  default: false
63
93
  },
94
+ /**
95
+ * Set to `true` for long-running operations.
96
+ */
64
97
  loadingDelayed: {
65
98
  type: Boolean,
66
99
  required: false,
67
100
  default: false
68
101
  },
102
+ /**
103
+ * The string to render while loading is delayed.
104
+ */
69
105
  loadingDelayedText: {
70
106
  type: String,
71
107
  required: false,
72
108
  default: ''
73
109
  },
110
+ /**
111
+ * Array of `GlDisclosureDropdown` items to display in the dropdown.
112
+ */
74
113
  actions: {
75
114
  type: Array,
76
115
  required: false,
77
116
  default: () => [],
78
117
  validator: actions => actions.every(a => isObject(a))
79
118
  },
119
+ /**
120
+ * The toggle text for the `GlDisclosureDropdown` dropdown.
121
+ */
80
122
  actionsToggleText: {
81
123
  type: String,
82
124
  required: false,
@@ -131,11 +173,11 @@ var script = {
131
173
  const __vue_script__ = script;
132
174
 
133
175
  /* template */
134
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-border gl-h-full !gl-overflow-visible gl-rounded-base gl-bg-white gl-p-4",class:_vm.containerClasses,attrs:{"id":_vm.panelId}},[_c('div',{staticClass:"gl-flex gl-h-full gl-flex-col"},[_c('div',{staticClass:"gl-flex gl-items-start gl-justify-between",attrs:{"data-testid":"panel-title"}},[_c('div',{staticClass:"gl-flex gl-items-center gl-overflow-hidden gl-pb-3"},[(_vm.hasTitleIcon)?_c('gl-icon',{staticClass:"gl-mr-1",class:_vm.titleIconClass,attrs:{"name":_vm.titleIcon,"data-testid":"panel-title-icon"}}):_vm._e(),_vm._v(" "),(_vm.hasTitle)?_c('gl-truncate',{staticClass:"gl-font-bold gl-text-default",attrs:{"text":_vm.title,"with-tooltip":""}}):_vm._e(),_vm._v(" "),(_vm.hasTitlePopover)?[_c('gl-icon',{staticClass:"gl-ml-2",attrs:{"id":_vm.titlePopoverId,"data-testid":"panel-title-popover-icon","name":"information-o","variant":"info"}}),_vm._v(" "),_c('gl-popover',{attrs:{"data-testid":"panel-title-popover","boundary":"viewport","target":_vm.titlePopoverId}},[(_vm.hasTitlePopoverLink)?_c('gl-sprintf',{attrs:{"message":_vm.titlePopover.description},scopedSlots:_vm._u([{key:"link",fn:function(ref){
176
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-border gl-h-full !gl-overflow-visible gl-rounded-lg gl-bg-white gl-p-5",class:_vm.containerClasses,attrs:{"id":_vm.panelId}},[_c('div',{staticClass:"gl-flex gl-h-full gl-flex-col"},[_c('div',{staticClass:"gl-flex gl-items-start gl-justify-between",attrs:{"data-testid":"panel-title"}},[_c('div',{staticClass:"gl-flex gl-items-center gl-overflow-hidden gl-pb-3"},[(_vm.hasTitleIcon)?_c('gl-icon',{staticClass:"gl-mr-2",class:_vm.titleIconClass,attrs:{"name":_vm.titleIcon,"data-testid":"panel-title-icon"}}):_vm._e(),_vm._v(" "),(_vm.hasTitle)?_c('gl-truncate',{staticClass:"gl-font-bold gl-text-default",attrs:{"text":_vm.title,"with-tooltip":""}}):_vm._e(),_vm._v(" "),(_vm.hasTitlePopover)?[_c('gl-icon',{staticClass:"gl-ml-2",attrs:{"id":_vm.titlePopoverId,"data-testid":"panel-title-popover-icon","name":"information-o","variant":"info"}}),_vm._v(" "),_c('gl-popover',{attrs:{"data-testid":"panel-title-popover","boundary":"viewport","target":_vm.titlePopoverId}},[(_vm.hasTitlePopoverLink)?_c('gl-sprintf',{attrs:{"message":_vm.titlePopover.description},scopedSlots:_vm._u([{key:"link",fn:function(ref){
135
177
  var content = ref.content;
136
- return [_c('gl-link',{staticClass:"gl-text-sm",attrs:{"href":_vm.titlePopover.descriptionLink}},[_vm._v(_vm._s(content))])]}}],null,false,3051540671)}):[_vm._v("\n "+_vm._s(_vm.titlePopover.description)+"\n ")]],2)]:_vm._e()],2),_vm._v(" "),(_vm.shouldShowActions || _vm.$scopedSlots.filters)?_c('div',{staticClass:"gl-flex gl-flex-col gl-items-end gl-gap-2",attrs:{"data-testid":"panel-actions-filters-container"}},[(_vm.shouldShowActions)?_c('gl-disclosure-dropdown',{attrs:{"items":_vm.actions,"icon":"ellipsis_v","toggle-text":_vm.actionsToggleText,"text-sr-only":"","no-caret":"","placement":"bottom-end","fluid-width":"","toggle-class":"gl-ml-1","category":"tertiary","positioning-strategy":"fixed"},on:{"shown":function($event){return _vm.$emit('dropdownOpen')},"hidden":function($event){return _vm.$emit('dropdownClosed')}},scopedSlots:_vm._u([{key:"list-item",fn:function(ref){
178
+ return [_c('gl-link',{staticClass:"gl-text-sm",attrs:{"href":_vm.titlePopover.descriptionLink}},[_vm._v(_vm._s(content))])]}}],null,false,3051540671)}):[_vm._v("\n "+_vm._s(_vm.titlePopover.description)+"\n ")]],2)]:_vm._e()],2),_vm._v(" "),(_vm.shouldShowActions || _vm.$scopedSlots.filters)?_c('div',{staticClass:"gl-flex gl-flex-col gl-items-end gl-gap-2",attrs:{"data-testid":"panel-actions-filters-container"}},[(_vm.shouldShowActions)?_c('gl-disclosure-dropdown',{attrs:{"items":_vm.actions,"icon":"ellipsis_v","toggle-text":_vm.actionsToggleText,"text-sr-only":"","no-caret":"","placement":"bottom-end","fluid-width":"","toggle-class":"gl-ml-1","category":"tertiary","positioning-strategy":"fixed","size":"small"},on:{"shown":function($event){return _vm.$emit('dropdownOpen')},"hidden":function($event){return _vm.$emit('dropdownClosed')}},scopedSlots:_vm._u([{key:"list-item",fn:function(ref){
137
179
  var item = ref.item;
138
- return [_c('span',[_c('gl-icon',{attrs:{"name":item.icon}}),_vm._v(" "+_vm._s(item.text))],1)]}}],null,false,3632670457)}):_vm._e(),_vm._v(" "),(_vm.$scopedSlots.filters)?_c('div',{staticClass:"gl-flex gl-items-center gl-justify-end gl-pb-2",attrs:{"data-testid":"panel-filters-container"}},[_vm._t("filters")],2):_vm._e()],1):_vm._e()]),_vm._v(" "),_c('div',{class:_vm.bodyClasses},[(_vm.loading)?[_c('gl-loading-icon',{staticClass:"gl-min-h-8 gl-w-full",attrs:{"size":"lg"}}),_vm._v(" "),(_vm.isLoadingDelayed)?_c('div',{staticClass:"gl-w-full gl-text-subtle",attrs:{"data-testId":"panel-loading-delayed-indicator"}},[_vm._v("\n "+_vm._s(_vm.loadingDelayedText)+"\n ")]):_vm._e()]:_vm._t("body")],2),_vm._v(" "),_vm._t("alert-message",null,{"panelId":_vm.panelId})],2)])};
180
+ return [_c('span',[_vm._v(_vm._s(item.text))])]}}],null,false,3418607560)}):_vm._e(),_vm._v(" "),(_vm.$scopedSlots.filters)?_c('div',{staticClass:"gl-flex gl-items-center gl-justify-end gl-pb-2",attrs:{"data-testid":"panel-filters-container"}},[_vm._t("filters")],2):_vm._e()],1):_vm._e()]),_vm._v(" "),_c('div',{class:_vm.bodyClasses},[(_vm.loading)?[_c('gl-loading-icon',{staticClass:"gl-min-h-8 gl-w-full",attrs:{"size":"lg"}}),_vm._v(" "),(_vm.isLoadingDelayed)?_c('div',{staticClass:"gl-w-full gl-text-subtle",attrs:{"data-testId":"panel-loading-delayed-indicator"}},[_vm._v("\n "+_vm._s(_vm.loadingDelayedText)+"\n ")]):_vm._e()]:_vm._t("body")],2),_vm._v(" "),_vm._t("alert-message",null,{"panelId":_vm.panelId})],2)])};
139
181
  var __vue_staticRenderFns__ = [];
140
182
 
141
183
  /* style */
@@ -8,7 +8,6 @@ export { default as GlNav } from './base/nav/nav';
8
8
  export { default as GlNavItem } from './base/nav/nav_item';
9
9
  export { default as GlFormCheckboxTree } from './base/form/form_checkbox_tree/form_checkbox_tree';
10
10
  export { default as GlMarkdown } from './base/markdown/markdown';
11
- export { default as GlIntersectionObserver } from './utilities/intersection_observer/intersection_observer';
12
11
  export { default as GlDeprecatedLink, default as GlLink } from './base/link/link';
13
12
  export { default as GlIcon } from './base/icon/icon';
14
13
  export { default as GlAnimatedChevronRightDownIcon } from './base/animated_icon/animated_chevron_right_down_icon';
@@ -99,6 +98,7 @@ export { default as GlDashboardPanel } from './dashboards/dashboard_panel/dashbo
99
98
  export { default as GlExperimentBadge } from './experimental/experiment_badge/experiment_badge';
100
99
  export { default as GlAnimatedNumber } from './utilities/animated_number/animated_number';
101
100
  export { default as GlFriendlyWrap } from './utilities/friendly_wrap/friendly_wrap';
101
+ export { default as GlIntersectionObserver } from './utilities/intersection_observer/intersection_observer';
102
102
  export { default as GlIntersperse } from './utilities/intersperse/intersperse';
103
103
  export { default as GlSprintf } from './utilities/sprintf/sprintf';
104
104
  export { default as GlTruncate } from './utilities/truncate/truncate';