@gitlab/ui 80.2.0 → 80.4.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/CHANGELOG.md +19 -0
- package/README.md +24 -0
- package/dist/components/base/search_box_by_click/search_box_by_click.js +5 -14
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/tokens/css/tokens.css +1 -1
- package/dist/tokens/css/tokens.dark.css +1 -1
- package/dist/tokens/js/tokens.dark.js +1 -1
- package/dist/tokens/js/tokens.js +1 -1
- package/dist/tokens/scss/_tokens.dark.scss +1 -1
- package/dist/tokens/scss/_tokens.scss +1 -1
- package/package.json +2 -2
- package/src/components/base/filtered_search/filtered_search.stories.js +2 -4
- package/src/components/base/search_box_by_click/search_box_by_click.scss +10 -53
- package/src/components/base/search_box_by_click/search_box_by_click.spec.js +7 -11
- package/src/components/base/search_box_by_click/search_box_by_click.vue +42 -48
- package/src/components/base/toggle/toggle.stories.js +11 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
# [80.4.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v80.3.0...v80.4.0) (2024-05-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* linting errors ([52938a5](https://gitlab.com/gitlab-org/gitlab-ui/commit/52938a58ec1b51a0544c44633c9f13949da0fc35))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **README:** Add design tokens mention ([3ff1f07](https://gitlab.com/gitlab-org/gitlab-ui/commit/3ff1f0702af61ba1efc3592e5759c95e6111f110))
|
|
12
|
+
|
|
13
|
+
# [80.3.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v80.2.0...v80.3.0) (2024-05-06)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* **GlSearchBoxByClick:** Migrate dropdown ([51de3bc](https://gitlab.com/gitlab-org/gitlab-ui/commit/51de3bcc652017d7218839673c9579e6a22d1446))
|
|
19
|
+
|
|
1
20
|
# [80.2.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v80.1.0...v80.2.0) (2024-05-03)
|
|
2
21
|
|
|
3
22
|
|
package/README.md
CHANGED
|
@@ -159,6 +159,30 @@ You have two options to include those stylesheets:
|
|
|
159
159
|
@import '@gitlab/ui/dist/utility_classes.css';
|
|
160
160
|
```
|
|
161
161
|
|
|
162
|
+
### Design tokens
|
|
163
|
+
|
|
164
|
+
GitLab UI uses design tokens to maintain a single source of truth that, through automation,
|
|
165
|
+
can be formatted for different uses.
|
|
166
|
+
|
|
167
|
+
- See [Pajamas](https://design.gitlab.com/product-foundations/design-tokens) for an overview
|
|
168
|
+
on design tokens.
|
|
169
|
+
- See [GitLab Docs](https://docs.gitlab.com/ee/development/fe_guide/design_tokens.html) for
|
|
170
|
+
in-depth guides on creating and using design tokens.
|
|
171
|
+
|
|
172
|
+
Example design token inheritance and automation:
|
|
173
|
+
|
|
174
|
+
```mermaid
|
|
175
|
+
flowchart TD
|
|
176
|
+
A[#1f1e24] -->|Constant token| B[color.neutral.950]
|
|
177
|
+
B -->|Semantic token| C[text.color.default]
|
|
178
|
+
C --> D{Automation}
|
|
179
|
+
D -->|Figma| E[text/color/default]
|
|
180
|
+
D -->|CSS| F[--gl-text-color-default]
|
|
181
|
+
D -->|SCSS| G[$gl-text-color-default]
|
|
182
|
+
D -->|JavaScript| H[GL_TEXT_COLOR_DEFAULT]
|
|
183
|
+
D -->|Tailwind| I[gl-text-default]
|
|
184
|
+
```
|
|
185
|
+
|
|
162
186
|
## Releases
|
|
163
187
|
|
|
164
188
|
See [Updating GitLab UI Packages](doc/updating-gitlab-ui-packages.md) for information on how the
|
|
@@ -1,26 +1,20 @@
|
|
|
1
1
|
import { GlTooltipDirective } from '../../../directives/tooltip';
|
|
2
2
|
import GlClearIconButton from '../../shared_components/clear_icon_button/clear_icon_button';
|
|
3
3
|
import GlButton from '../button/button';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import GlDropdownItem from '../dropdown/dropdown_item';
|
|
7
|
-
import GlDropdownText from '../dropdown/dropdown_text';
|
|
4
|
+
import GlDisclosureDropdown from '../new_dropdowns/disclosure/disclosure_dropdown';
|
|
5
|
+
import GlDisclosureDropdownItem from '../new_dropdowns/disclosure/disclosure_dropdown_item';
|
|
8
6
|
import GlFormInput from '../form/form_input/form_input';
|
|
9
7
|
import GlFormInputGroup from '../form/form_input_group/form_input_group';
|
|
10
|
-
import GlIcon from '../icon/icon';
|
|
11
8
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
12
9
|
|
|
13
10
|
var script = {
|
|
14
11
|
name: 'GlSearchboxByClick',
|
|
15
12
|
components: {
|
|
16
13
|
GlClearIconButton,
|
|
17
|
-
GlIcon,
|
|
18
14
|
GlButton,
|
|
19
15
|
GlFormInput,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
GlDropdownItem,
|
|
23
|
-
GlDropdownDivider,
|
|
16
|
+
GlDisclosureDropdown,
|
|
17
|
+
GlDisclosureDropdownItem,
|
|
24
18
|
GlFormInputGroup
|
|
25
19
|
},
|
|
26
20
|
directives: {
|
|
@@ -166,9 +160,6 @@ var script = {
|
|
|
166
160
|
}
|
|
167
161
|
},
|
|
168
162
|
methods: {
|
|
169
|
-
closeHistoryDropdown() {
|
|
170
|
-
this.$refs.historyDropdown.hide();
|
|
171
|
-
},
|
|
172
163
|
search(value) {
|
|
173
164
|
/**
|
|
174
165
|
* Emitted when search is submitted
|
|
@@ -211,7 +202,7 @@ var script = {
|
|
|
211
202
|
const __vue_script__ = script;
|
|
212
203
|
|
|
213
204
|
/* template */
|
|
214
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-form-input-group',{staticClass:"gl-search-box-by-click",class:{ 'gl-search-box-by-click-with-search-button': _vm.showSearchButton },scopedSlots:_vm._u([(_vm.historyItems)?{key:"prepend",fn:function(){return [_c('gl-dropdown',{ref:"historyDropdown",staticClass:"gl-search-box-by-click-history",attrs:{"
|
|
205
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-form-input-group',{staticClass:"gl-search-box-by-click",class:{ 'gl-search-box-by-click-with-search-button': _vm.showSearchButton },scopedSlots:_vm._u([(_vm.historyItems)?{key:"prepend",fn:function(){return [_c('gl-disclosure-dropdown',{ref:"historyDropdown",staticClass:"gl-search-box-by-click-history",attrs:{"icon":"history","toggle-text":"Toggle history","text-sr-only":"","fluid-width":"","disabled":_vm.disabled},scopedSlots:_vm._u([{key:"header",fn:function(){return [_c('div',{staticClass:"gl-search-box-by-click-history-header gl-display-flex gl-align-items-center gl-p-4! gl-min-h-8 gl-border-b-1 gl-border-b-solid gl-border-b-gray-200 gl-flex-grow-1 gl-font-weight-bold gl-font-sm"},[_vm._v("\n "+_vm._s(_vm.recentSearchesHeader)+"\n ")])]},proxy:true},(_vm.historyItems.length)?{key:"footer",fn:function(){return [_c('div',{staticClass:"gl-border-t-solid gl-border-t-1 gl-border-t-gray-200 gl-display-flex gl-flex-direction-column gl-p-2"},[_c('gl-button',{ref:"clearHistory",staticClass:"gl-justify-content-start!",attrs:{"category":"tertiary"},on:{"click":_vm.emitClearHistory}},[_vm._v("\n "+_vm._s(_vm.clearRecentSearchesText)+"\n ")])],1)]},proxy:true}:null],null,true)},[_vm._v(" "),(_vm.historyItems.length)?_vm._l((_vm.historyItems),function(item,idx){return _c('gl-disclosure-dropdown-item',{key:idx,staticClass:"gl-search-box-by-click-history-item",on:{"action":function($event){return _vm.selectHistoryItem(item)}},scopedSlots:_vm._u([{key:"list-item",fn:function(){return [_vm._t("history-item",function(){return [_vm._v(_vm._s(item))]},{"historyItem":item})]},proxy:true}],null,true)})}):_c('div',{staticClass:"gl-font-sm gl-text-secondary gl-py-2 gl-px-4"},[_vm._v("\n "+_vm._s(_vm.noRecentSearchesText)+"\n ")])],2)]},proxy:true}:null,(_vm.showSearchButton)?{key:"append",fn:function(){return [_c('gl-button',_vm._b({ref:"searchButton",staticClass:"gl-search-box-by-click-search-button",attrs:{"icon":"search","disabled":_vm.disabled,"aria-label":"Search","data-testid":"search-button"},on:{"click":function($event){return _vm.search(_vm.currentValue)}}},'gl-button',_vm.searchButtonAttributes,false))]},proxy:true}:null],null,true)},[_vm._v(" "),_vm._t("input",function(){return [_c('gl-form-input',_vm._b({ref:"input",staticClass:"gl-search-box-by-click-input",class:{ 'gl-rounded-base!': !_vm.showSearchButton },attrs:{"disabled":_vm.disabled},on:{"focus":function($event){_vm.isFocused = true;},"blur":function($event){_vm.isFocused = false;}},nativeOn:{"keydown":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }return _vm.search(_vm.currentValue)}},model:{value:(_vm.currentValue),callback:function ($$v) {_vm.currentValue=$$v;},expression:"currentValue"}},'gl-form-input',_vm.inputAttributes,false))]}),_vm._v(" "),(_vm.clearable && _vm.hasValue && !_vm.disabled)?_c('gl-clear-icon-button',{staticClass:"gl-search-box-by-click-icon-button gl-search-box-by-click-clear-button gl-clear-icon-button",attrs:{"title":_vm.clearButtonTitle,"tooltip-container":_vm.tooltipContainer,"data-testid":"filtered-search-clear-button"},on:{"click":_vm.clearInput}}):_vm._e()],2)};
|
|
215
206
|
var __vue_staticRenderFns__ = [];
|
|
216
207
|
|
|
217
208
|
/* style */
|