@gitlab/ui 93.4.0 → 94.0.1

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 (47) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/dist/components/base/table/table.js +22 -1
  3. package/dist/index.css +2 -4
  4. package/dist/index.css.map +1 -1
  5. package/dist/index.js +9 -0
  6. package/package.json +3 -3
  7. package/src/components/base/alert/alert.scss +2 -2
  8. package/src/components/base/avatar/avatar.scss +1 -1
  9. package/src/components/base/breadcrumb/breadcrumb.scss +1 -1
  10. package/src/components/base/button/button.scss +16 -16
  11. package/src/components/base/datepicker/datepicker.scss +1 -1
  12. package/src/components/base/dropdown/dropdown.scss +1 -1
  13. package/src/components/base/dropdown/dropdown_item.scss +10 -10
  14. package/src/components/base/dropdown/dropdown_section_header.scss +2 -2
  15. package/src/components/base/filtered_search/filtered_search.scss +1 -1
  16. package/src/components/base/filtered_search/filtered_search_suggestion.scss +2 -2
  17. package/src/components/base/filtered_search/filtered_search_token.scss +6 -6
  18. package/src/components/base/form/form_select/form_select.scss +1 -1
  19. package/src/components/base/infinite_scroll/infinite_scroll.scss +2 -2
  20. package/src/components/base/label/label.scss +1 -1
  21. package/src/components/base/loading_icon/loading_icon.scss +2 -2
  22. package/src/components/base/markdown/markdown.scss +9 -9
  23. package/src/components/base/markdown/markdown_typescale_demo.html +2 -2
  24. package/src/components/base/modal/modal.scss +1 -1
  25. package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown.scss +1 -1
  26. package/src/components/base/new_dropdowns/dropdown.scss +1 -1
  27. package/src/components/base/new_dropdowns/dropdown_item.scss +11 -11
  28. package/src/components/base/new_dropdowns/listbox/listbox.scss +2 -2
  29. package/src/components/base/pagination/pagination.scss +8 -8
  30. package/src/components/base/path/path.scss +1 -1
  31. package/src/components/base/search_box_by_type/search_box_by_type.scss +3 -3
  32. package/src/components/base/segmented_control/segmented_control.scss +8 -8
  33. package/src/components/base/table/table.md +17 -0
  34. package/src/components/base/table/table.scss +12 -11
  35. package/src/components/base/table/table.vue +18 -2
  36. package/src/components/base/toast/toast.scss +1 -1
  37. package/src/components/base/toggle/toggle.scss +9 -9
  38. package/src/components/base/token/token.scss +3 -3
  39. package/src/components/base/token_selector/token_selector.scss +1 -1
  40. package/src/components/charts/legend/legend.scss +1 -1
  41. package/src/components/charts/single_stat/single_stat.scss +1 -1
  42. package/src/components/experimental/duo/chat/components/duo_chat_loader/duo_chat_loader.scss +1 -1
  43. package/src/components/experimental/duo/chat/components/duo_chat_message/duo_chat_message.scss +2 -2
  44. package/src/components/experimental/duo/chat/duo_chat.scss +2 -2
  45. package/src/components/shared_components/clear_icon_button/clear_icon_button.scss +2 -2
  46. package/src/index.js +9 -0
  47. package/src/scss/typescale/_index.scss +3 -3
package/CHANGELOG.md CHANGED
@@ -1,3 +1,52 @@
1
+ ## [94.0.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v94.0.0...v94.0.1) (2024-09-24)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add animated icons to src/index.js ([f73e078](https://gitlab.com/gitlab-org/gitlab-ui/commit/f73e078b65e1e49be6d85c4df9f73be30e1276e7))
7
+
8
+ # [94.0.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v93.4.0...v94.0.0) (2024-09-20)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **GlTable:** do not override CSS utils styling ([9c3ce10](https://gitlab.com/gitlab-org/gitlab-ui/commit/9c3ce1079e76a547dea0f78c981631cd4d15fdfc))
14
+
15
+
16
+ ### BREAKING CHANGES
17
+
18
+ * **GlTable:** This rewrites how `GlTable`'s `TH` elements text
19
+ alignment is applied. If you were previously passing `gl-text-right` to
20
+ a table's `thClass` field option, you should migrate to the
21
+ `thAlignRight` option instead. Not migrating could cause rendering
22
+ issues in right-aligned sortable columns.
23
+
24
+ Before:
25
+
26
+ ```js
27
+ const fields = [
28
+ {
29
+ key: "column_one",
30
+ label: __("First column"),
31
+ sortable: true,
32
+ thClass: 'gl-text-right',
33
+ },
34
+ ];
35
+ ```
36
+
37
+ After:
38
+
39
+ ```js
40
+ const fields = [
41
+ {
42
+ key: "column_one",
43
+ label: __("First column"),
44
+ sortable: true,
45
+ thAlignRight: true,
46
+ },
47
+ ];
48
+ ```
49
+
1
50
  # [93.4.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v93.3.0...v93.4.0) (2024-09-20)
2
51
 
3
52
 
@@ -58,6 +58,27 @@ var script = {
58
58
  },
59
59
  headSlots() {
60
60
  return ['head()', ...Object.keys(this.$scopedSlots).filter(slotName => slotName.startsWith('head('))];
61
+ },
62
+ computedFields() {
63
+ var _this$fields;
64
+ return (_this$fields = this.fields) === null || _this$fields === void 0 ? void 0 : _this$fields.map(field => {
65
+ if (typeof field === 'string') {
66
+ return field;
67
+ }
68
+ const {
69
+ thAlignRight,
70
+ thClass = '',
71
+ ...rest
72
+ } = field;
73
+ const computedThClass = Array.isArray(thClass) ? thClass : thClass.split(' ');
74
+ if (thAlignRight) {
75
+ computedThClass.push('gl-table-th-align-right');
76
+ }
77
+ return {
78
+ ...rest,
79
+ thClass: computedThClass
80
+ };
81
+ });
61
82
  }
62
83
  },
63
84
  mounted() {
@@ -104,7 +125,7 @@ var script = {
104
125
  const __vue_script__ = script;
105
126
 
106
127
  /* template */
107
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-table',_vm._g(_vm._b({attrs:{"table-class":_vm.localTableClass,"fields":_vm.fields,"sort-by":_vm.localSortBy,"sort-desc":_vm.localSortDesc,"no-sort-reset":""},on:{"update:sortBy":function($event){_vm.localSortBy=$event;},"update:sort-by":function($event){_vm.localSortBy=$event;},"update:sortDesc":function($event){_vm.localSortDesc=$event;},"update:sort-desc":function($event){_vm.localSortDesc=$event;}},scopedSlots:_vm._u([_vm._l((Object.keys(_vm.$scopedSlots)),function(slotName){return {key:slotName,fn:function(scope){return [_vm._t(slotName,null,null,scope)]}}}),_vm._l((_vm.headSlots),function(headSlotName){return {key:headSlotName,fn:function(scope){return [_c('div',{key:headSlotName,staticClass:"gl-flex"},[_vm._t(headSlotName,function(){return [_c('span',[_vm._v(_vm._s(scope.label))])]},null,scope),(_vm.isSortable(scope))?[_c('div',{staticClass:"gl-ml-2 gl-flex gl-w-5 gl-justify-center"},[_c('span',{class:{ 'gl-hidden': !_vm.activeSortingColumn(scope) },attrs:{"name":"sort-icon","data-testid":"sort-icon"}},[_vm._v("\n "+_vm._s(_vm.getSortingIcon(scope))+"\n ")])])]:_vm._e()],2)]}}})],null,true)},'b-table',_vm.$attrs,false),_vm.$listeners))};
128
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-table',_vm._g(_vm._b({attrs:{"table-class":_vm.localTableClass,"fields":_vm.computedFields,"sort-by":_vm.localSortBy,"sort-desc":_vm.localSortDesc,"no-sort-reset":""},on:{"update:sortBy":function($event){_vm.localSortBy=$event;},"update:sort-by":function($event){_vm.localSortBy=$event;},"update:sortDesc":function($event){_vm.localSortDesc=$event;},"update:sort-desc":function($event){_vm.localSortDesc=$event;}},scopedSlots:_vm._u([_vm._l((Object.keys(_vm.$scopedSlots)),function(slotName){return {key:slotName,fn:function(scope){return [_vm._t(slotName,null,null,scope)]}}}),_vm._l((_vm.headSlots),function(headSlotName){return {key:headSlotName,fn:function(scope){return [_c('div',{key:headSlotName,staticClass:"gl-flex"},[_vm._t(headSlotName,function(){return [_c('span',[_vm._v(_vm._s(scope.label))])]},null,scope),(_vm.isSortable(scope))?[_c('div',{staticClass:"gl-table-th-sort-icon-wrapper gl-flex gl-w-5 gl-justify-center"},[_c('span',{class:{ 'gl-hidden': !_vm.activeSortingColumn(scope) },attrs:{"name":"sort-icon","data-testid":"sort-icon"}},[_vm._v("\n "+_vm._s(_vm.getSortingIcon(scope))+"\n ")])])]:_vm._e()],2)]}}})],null,true)},'b-table',_vm.$attrs,false),_vm.$listeners))};
108
129
  var __vue_staticRenderFns__ = [];
109
130
 
110
131
  /* style */