@gitlab/ui 107.0.1 → 107.1.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.
- package/CHANGELOG.md +14 -0
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_group.js +2 -2
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.js +25 -4
- package/dist/components/base/new_dropdowns/disclosure/mock_data.js +1 -1
- package/dist/components/base/new_dropdowns/listbox/listbox.js +2 -2
- package/dist/components/base/popover/popover.js +1 -1
- package/dist/components/base/search_box_by_click/search_box_by_click.js +1 -1
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/tailwind.css.map +1 -1
- package/dist/tokens/build/js/tokens.dark.js +7 -5
- package/dist/tokens/build/js/tokens.js +3 -1
- package/dist/tokens/css/tokens.css +4 -2
- package/dist/tokens/css/tokens.dark.css +7 -5
- package/dist/tokens/js/tokens.dark.js +6 -4
- package/dist/tokens/js/tokens.js +2 -0
- package/dist/tokens/json/tokens.dark.json +57 -22
- package/dist/tokens/json/tokens.json +53 -18
- package/dist/tokens/scss/_tokens.dark.scss +7 -5
- package/dist/tokens/scss/_tokens.scss +4 -2
- package/dist/tokens/scss/_tokens_custom_properties.scss +2 -0
- package/dist/tokens/tailwind/tokens.cjs +2 -1
- package/dist/utils/constants.js +5 -1
- package/package.json +3 -1
- package/src/components/base/dropdown/dropdown.scss +3 -3
- package/src/components/base/dropdown/dropdown_divider.scss +1 -1
- package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown_group.vue +2 -2
- package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.vue +27 -3
- package/src/components/base/new_dropdowns/disclosure/mock_data.js +1 -1
- package/src/components/base/new_dropdowns/dropdown_item.scss +29 -0
- package/src/components/base/new_dropdowns/listbox/listbox.scss +1 -0
- package/src/components/base/new_dropdowns/listbox/listbox.vue +12 -2
- package/src/components/base/popover/popover.vue +1 -1
- package/src/components/base/search_box_by_click/search_box_by_click.vue +2 -2
- package/src/tokens/build/css/tokens.css +4 -2
- package/src/tokens/build/css/tokens.dark.css +7 -5
- package/src/tokens/build/js/tokens.dark.js +6 -4
- package/src/tokens/build/js/tokens.js +2 -0
- package/src/tokens/build/json/tokens.dark.json +57 -22
- package/src/tokens/build/json/tokens.json +53 -18
- package/src/tokens/build/scss/_tokens.dark.scss +7 -5
- package/src/tokens/build/scss/_tokens.scss +4 -2
- package/src/tokens/build/scss/_tokens_custom_properties.scss +2 -0
- package/src/tokens/build/tailwind/tokens.cjs +2 -1
- package/src/tokens/contextual/dropdown.tokens.json +26 -18
- package/src/utils/constants.js +5 -0
|
@@ -628,15 +628,16 @@ export const GL_DATEPICKER_BACKGROUND_COLOR = '#28272d';
|
|
|
628
628
|
export const GL_DATEPICKER_DATE_TEXT_COLOR_SELECTED = '#18171d';
|
|
629
629
|
export const GL_DROPDOWN_BACKGROUND_COLOR = '#28272d';
|
|
630
630
|
export const GL_DROPDOWN_BORDER_COLOR = '#4c4b51';
|
|
631
|
+
export const GL_DROPDOWN_DIVIDER_COLOR = '#3a383f';
|
|
631
632
|
export const GL_DROPDOWN_OPTION_TEXT_COLOR_DEFAULT = '#ececef';
|
|
632
633
|
export const GL_DROPDOWN_OPTION_TEXT_COLOR_HOVER = '#ececef';
|
|
633
634
|
export const GL_DROPDOWN_OPTION_TEXT_COLOR_FOCUS = '#ececef';
|
|
634
635
|
export const GL_DROPDOWN_OPTION_TEXT_COLOR_ACTIVE = '#ececef';
|
|
635
636
|
export const GL_DROPDOWN_OPTION_TEXT_COLOR_DISABLED = '#737278';
|
|
636
|
-
export const GL_DROPDOWN_OPTION_INDICATOR_COLOR_SELECTED_DEFAULT = '#
|
|
637
|
-
export const GL_DROPDOWN_OPTION_INDICATOR_COLOR_SELECTED_HOVER = '#
|
|
638
|
-
export const GL_DROPDOWN_OPTION_INDICATOR_COLOR_SELECTED_FOCUS = '#
|
|
639
|
-
export const GL_DROPDOWN_OPTION_INDICATOR_COLOR_SELECTED_ACTIVE = '#
|
|
637
|
+
export const GL_DROPDOWN_OPTION_INDICATOR_COLOR_SELECTED_DEFAULT = '#63a6e9';
|
|
638
|
+
export const GL_DROPDOWN_OPTION_INDICATOR_COLOR_SELECTED_HOVER = '#9dc7f1';
|
|
639
|
+
export const GL_DROPDOWN_OPTION_INDICATOR_COLOR_SELECTED_FOCUS = '#9dc7f1';
|
|
640
|
+
export const GL_DROPDOWN_OPTION_INDICATOR_COLOR_SELECTED_ACTIVE = '#9dc7f1';
|
|
640
641
|
export const GL_DROPDOWN_OPTION_BACKGROUND_COLOR_UNSELECTED_DEFAULT = 'rgba(137, 136, 141, 0.0)';
|
|
641
642
|
export const GL_DROPDOWN_OPTION_BACKGROUND_COLOR_UNSELECTED_HOVER = 'rgba(137, 136, 141, 0.4)';
|
|
642
643
|
export const GL_DROPDOWN_OPTION_BACKGROUND_COLOR_UNSELECTED_FOCUS = 'rgba(137, 136, 141, 0.4)';
|
|
@@ -645,6 +646,7 @@ export const GL_DROPDOWN_OPTION_BACKGROUND_COLOR_SELECTED_DEFAULT = '#3a383f';
|
|
|
645
646
|
export const GL_DROPDOWN_OPTION_BACKGROUND_COLOR_SELECTED_HOVER = '#4c4b51';
|
|
646
647
|
export const GL_DROPDOWN_OPTION_BACKGROUND_COLOR_SELECTED_FOCUS = '#4c4b51';
|
|
647
648
|
export const GL_DROPDOWN_OPTION_BACKGROUND_COLOR_SELECTED_ACTIVE = '#28272d';
|
|
649
|
+
export const GL_DROPDOWN_SEARCH_BACKGROUND_COLOR = 'rgba(05, 05, 06, 0.24)';
|
|
648
650
|
export const GL_FILTERED_SEARCH_TOKEN_TYPE_BACKGROUND_COLOR_DEFAULT = '#28272d';
|
|
649
651
|
export const GL_FILTERED_SEARCH_TOKEN_TYPE_BACKGROUND_COLOR_HOVER = '#3a383f';
|
|
650
652
|
export const GL_FILTERED_SEARCH_TOKEN_DATA_BACKGROUND_COLOR_DEFAULT = '#3a383f';
|
package/dist/tokens/js/tokens.js
CHANGED
|
@@ -628,6 +628,7 @@ export const GL_DATEPICKER_BACKGROUND_COLOR = '#fff';
|
|
|
628
628
|
export const GL_DATEPICKER_DATE_TEXT_COLOR_SELECTED = '#fff';
|
|
629
629
|
export const GL_DROPDOWN_BACKGROUND_COLOR = '#fff';
|
|
630
630
|
export const GL_DROPDOWN_BORDER_COLOR = '#bfbfc3';
|
|
631
|
+
export const GL_DROPDOWN_DIVIDER_COLOR = '#dcdcde';
|
|
631
632
|
export const GL_DROPDOWN_OPTION_TEXT_COLOR_DEFAULT = '#28272d';
|
|
632
633
|
export const GL_DROPDOWN_OPTION_TEXT_COLOR_HOVER = '#28272d';
|
|
633
634
|
export const GL_DROPDOWN_OPTION_TEXT_COLOR_FOCUS = '#28272d';
|
|
@@ -645,6 +646,7 @@ export const GL_DROPDOWN_OPTION_BACKGROUND_COLOR_SELECTED_DEFAULT = '#ececef';
|
|
|
645
646
|
export const GL_DROPDOWN_OPTION_BACKGROUND_COLOR_SELECTED_HOVER = '#dcdcde';
|
|
646
647
|
export const GL_DROPDOWN_OPTION_BACKGROUND_COLOR_SELECTED_FOCUS = '#dcdcde';
|
|
647
648
|
export const GL_DROPDOWN_OPTION_BACKGROUND_COLOR_SELECTED_ACTIVE = '#bfbfc3';
|
|
649
|
+
export const GL_DROPDOWN_SEARCH_BACKGROUND_COLOR = 'rgba(05, 05, 06, 0.02)';
|
|
648
650
|
export const GL_FILTERED_SEARCH_TOKEN_TYPE_BACKGROUND_COLOR_DEFAULT = '#ececef';
|
|
649
651
|
export const GL_FILTERED_SEARCH_TOKEN_TYPE_BACKGROUND_COLOR_HOVER = '#dcdcde';
|
|
650
652
|
export const GL_FILTERED_SEARCH_TOKEN_DATA_BACKGROUND_COLOR_DEFAULT = '#dcdcde';
|
|
@@ -13797,8 +13797,8 @@
|
|
|
13797
13797
|
"isSource": true,
|
|
13798
13798
|
"original": {
|
|
13799
13799
|
"$value": {
|
|
13800
|
-
"default": "{color.
|
|
13801
|
-
"dark": "{color.
|
|
13800
|
+
"default": "{border.color.strong}",
|
|
13801
|
+
"dark": "{border.color.default}"
|
|
13802
13802
|
},
|
|
13803
13803
|
"$type": "color",
|
|
13804
13804
|
"$description": "Used for the border of a dropdown."
|
|
@@ -13812,6 +13812,26 @@
|
|
|
13812
13812
|
]
|
|
13813
13813
|
}
|
|
13814
13814
|
},
|
|
13815
|
+
"divider": {
|
|
13816
|
+
"color": {
|
|
13817
|
+
"$value": "#3a383f",
|
|
13818
|
+
"filePath": "src/tokens/contextual/dropdown.tokens.json",
|
|
13819
|
+
"isSource": true,
|
|
13820
|
+
"original": {
|
|
13821
|
+
"$value": {
|
|
13822
|
+
"default": "{border.color.default}",
|
|
13823
|
+
"dark": "{border.color.subtle}"
|
|
13824
|
+
}
|
|
13825
|
+
},
|
|
13826
|
+
"name": "DROPDOWN_DIVIDER_COLOR",
|
|
13827
|
+
"attributes": {},
|
|
13828
|
+
"path": [
|
|
13829
|
+
"dropdown",
|
|
13830
|
+
"divider",
|
|
13831
|
+
"color"
|
|
13832
|
+
]
|
|
13833
|
+
}
|
|
13834
|
+
},
|
|
13815
13835
|
"option": {
|
|
13816
13836
|
"text": {
|
|
13817
13837
|
"color": {
|
|
@@ -13926,16 +13946,13 @@
|
|
|
13926
13946
|
"color": {
|
|
13927
13947
|
"selected": {
|
|
13928
13948
|
"default": {
|
|
13929
|
-
"$value": "#
|
|
13949
|
+
"$value": "#63a6e9",
|
|
13930
13950
|
"$type": "color",
|
|
13931
13951
|
"$description": "Used for the dropdown selected option indicator in the default state.",
|
|
13932
13952
|
"filePath": "src/tokens/contextual/dropdown.tokens.json",
|
|
13933
13953
|
"isSource": true,
|
|
13934
13954
|
"original": {
|
|
13935
|
-
"$value": {
|
|
13936
|
-
"default": "{control.background.color.selected.default}",
|
|
13937
|
-
"dark": "{color.neutral.0}"
|
|
13938
|
-
},
|
|
13955
|
+
"$value": "{control.background.color.selected.default}",
|
|
13939
13956
|
"$type": "color",
|
|
13940
13957
|
"$description": "Used for the dropdown selected option indicator in the default state."
|
|
13941
13958
|
},
|
|
@@ -13951,16 +13968,13 @@
|
|
|
13951
13968
|
]
|
|
13952
13969
|
},
|
|
13953
13970
|
"hover": {
|
|
13954
|
-
"$value": "#
|
|
13971
|
+
"$value": "#9dc7f1",
|
|
13955
13972
|
"$type": "color",
|
|
13956
13973
|
"$description": "Used for the dropdown selected option indicator in the hover state.",
|
|
13957
13974
|
"filePath": "src/tokens/contextual/dropdown.tokens.json",
|
|
13958
13975
|
"isSource": true,
|
|
13959
13976
|
"original": {
|
|
13960
|
-
"$value": {
|
|
13961
|
-
"default": "{control.background.color.selected.hover}",
|
|
13962
|
-
"dark": "{color.neutral.0}"
|
|
13963
|
-
},
|
|
13977
|
+
"$value": "{control.background.color.selected.hover}",
|
|
13964
13978
|
"$type": "color",
|
|
13965
13979
|
"$description": "Used for the dropdown selected option indicator in the hover state."
|
|
13966
13980
|
},
|
|
@@ -13976,16 +13990,13 @@
|
|
|
13976
13990
|
]
|
|
13977
13991
|
},
|
|
13978
13992
|
"focus": {
|
|
13979
|
-
"$value": "#
|
|
13993
|
+
"$value": "#9dc7f1",
|
|
13980
13994
|
"$type": "color",
|
|
13981
13995
|
"$description": "Used for the dropdown selected option indicator in the focus state.",
|
|
13982
13996
|
"filePath": "src/tokens/contextual/dropdown.tokens.json",
|
|
13983
13997
|
"isSource": true,
|
|
13984
13998
|
"original": {
|
|
13985
|
-
"$value": {
|
|
13986
|
-
"default": "{control.background.color.selected.focus}",
|
|
13987
|
-
"dark": "{color.neutral.0}"
|
|
13988
|
-
},
|
|
13999
|
+
"$value": "{control.background.color.selected.focus}",
|
|
13989
14000
|
"$type": "color",
|
|
13990
14001
|
"$description": "Used for the dropdown selected option indicator in the focus state."
|
|
13991
14002
|
},
|
|
@@ -14001,16 +14012,13 @@
|
|
|
14001
14012
|
]
|
|
14002
14013
|
},
|
|
14003
14014
|
"active": {
|
|
14004
|
-
"$value": "#
|
|
14015
|
+
"$value": "#9dc7f1",
|
|
14005
14016
|
"$type": "color",
|
|
14006
14017
|
"$description": "Used for the dropdown selected option indicator in the active state.",
|
|
14007
14018
|
"filePath": "src/tokens/contextual/dropdown.tokens.json",
|
|
14008
14019
|
"isSource": true,
|
|
14009
14020
|
"original": {
|
|
14010
|
-
"$value": {
|
|
14011
|
-
"default": "{color.blue.700}",
|
|
14012
|
-
"dark": "{color.neutral.100}"
|
|
14013
|
-
},
|
|
14021
|
+
"$value": "{control.background.color.selected.focus}",
|
|
14014
14022
|
"$type": "color",
|
|
14015
14023
|
"$description": "Used for the dropdown selected option indicator in the active state."
|
|
14016
14024
|
},
|
|
@@ -14221,6 +14229,33 @@
|
|
|
14221
14229
|
}
|
|
14222
14230
|
}
|
|
14223
14231
|
}
|
|
14232
|
+
},
|
|
14233
|
+
"search": {
|
|
14234
|
+
"background": {
|
|
14235
|
+
"color": {
|
|
14236
|
+
"$value": "rgba(05, 05, 06, 0.24)",
|
|
14237
|
+
"$type": "color",
|
|
14238
|
+
"$description": "Used for the background of a search input in a dropdown listbox.",
|
|
14239
|
+
"filePath": "src/tokens/contextual/dropdown.tokens.json",
|
|
14240
|
+
"isSource": true,
|
|
14241
|
+
"original": {
|
|
14242
|
+
"$value": {
|
|
14243
|
+
"default": "{color.alpha.dark.2}",
|
|
14244
|
+
"dark": "{color.alpha.dark.24}"
|
|
14245
|
+
},
|
|
14246
|
+
"$type": "color",
|
|
14247
|
+
"$description": "Used for the background of a search input in a dropdown listbox."
|
|
14248
|
+
},
|
|
14249
|
+
"name": "DROPDOWN_SEARCH_BACKGROUND_COLOR",
|
|
14250
|
+
"attributes": {},
|
|
14251
|
+
"path": [
|
|
14252
|
+
"dropdown",
|
|
14253
|
+
"search",
|
|
14254
|
+
"background",
|
|
14255
|
+
"color"
|
|
14256
|
+
]
|
|
14257
|
+
}
|
|
14258
|
+
}
|
|
14224
14259
|
}
|
|
14225
14260
|
},
|
|
14226
14261
|
"filtered-search": {
|
|
@@ -13797,8 +13797,8 @@
|
|
|
13797
13797
|
"isSource": true,
|
|
13798
13798
|
"original": {
|
|
13799
13799
|
"$value": {
|
|
13800
|
-
"default": "{color.
|
|
13801
|
-
"dark": "{color.
|
|
13800
|
+
"default": "{border.color.strong}",
|
|
13801
|
+
"dark": "{border.color.default}"
|
|
13802
13802
|
},
|
|
13803
13803
|
"$type": "color",
|
|
13804
13804
|
"$description": "Used for the border of a dropdown."
|
|
@@ -13812,6 +13812,26 @@
|
|
|
13812
13812
|
]
|
|
13813
13813
|
}
|
|
13814
13814
|
},
|
|
13815
|
+
"divider": {
|
|
13816
|
+
"color": {
|
|
13817
|
+
"$value": "#dcdcde",
|
|
13818
|
+
"filePath": "src/tokens/contextual/dropdown.tokens.json",
|
|
13819
|
+
"isSource": true,
|
|
13820
|
+
"original": {
|
|
13821
|
+
"$value": {
|
|
13822
|
+
"default": "{border.color.default}",
|
|
13823
|
+
"dark": "{border.color.subtle}"
|
|
13824
|
+
}
|
|
13825
|
+
},
|
|
13826
|
+
"name": "DROPDOWN_DIVIDER_COLOR",
|
|
13827
|
+
"attributes": {},
|
|
13828
|
+
"path": [
|
|
13829
|
+
"dropdown",
|
|
13830
|
+
"divider",
|
|
13831
|
+
"color"
|
|
13832
|
+
]
|
|
13833
|
+
}
|
|
13834
|
+
},
|
|
13815
13835
|
"option": {
|
|
13816
13836
|
"text": {
|
|
13817
13837
|
"color": {
|
|
@@ -13932,10 +13952,7 @@
|
|
|
13932
13952
|
"filePath": "src/tokens/contextual/dropdown.tokens.json",
|
|
13933
13953
|
"isSource": true,
|
|
13934
13954
|
"original": {
|
|
13935
|
-
"$value": {
|
|
13936
|
-
"default": "{control.background.color.selected.default}",
|
|
13937
|
-
"dark": "{color.neutral.0}"
|
|
13938
|
-
},
|
|
13955
|
+
"$value": "{control.background.color.selected.default}",
|
|
13939
13956
|
"$type": "color",
|
|
13940
13957
|
"$description": "Used for the dropdown selected option indicator in the default state."
|
|
13941
13958
|
},
|
|
@@ -13957,10 +13974,7 @@
|
|
|
13957
13974
|
"filePath": "src/tokens/contextual/dropdown.tokens.json",
|
|
13958
13975
|
"isSource": true,
|
|
13959
13976
|
"original": {
|
|
13960
|
-
"$value": {
|
|
13961
|
-
"default": "{control.background.color.selected.hover}",
|
|
13962
|
-
"dark": "{color.neutral.0}"
|
|
13963
|
-
},
|
|
13977
|
+
"$value": "{control.background.color.selected.hover}",
|
|
13964
13978
|
"$type": "color",
|
|
13965
13979
|
"$description": "Used for the dropdown selected option indicator in the hover state."
|
|
13966
13980
|
},
|
|
@@ -13982,10 +13996,7 @@
|
|
|
13982
13996
|
"filePath": "src/tokens/contextual/dropdown.tokens.json",
|
|
13983
13997
|
"isSource": true,
|
|
13984
13998
|
"original": {
|
|
13985
|
-
"$value": {
|
|
13986
|
-
"default": "{control.background.color.selected.focus}",
|
|
13987
|
-
"dark": "{color.neutral.0}"
|
|
13988
|
-
},
|
|
13999
|
+
"$value": "{control.background.color.selected.focus}",
|
|
13989
14000
|
"$type": "color",
|
|
13990
14001
|
"$description": "Used for the dropdown selected option indicator in the focus state."
|
|
13991
14002
|
},
|
|
@@ -14007,10 +14018,7 @@
|
|
|
14007
14018
|
"filePath": "src/tokens/contextual/dropdown.tokens.json",
|
|
14008
14019
|
"isSource": true,
|
|
14009
14020
|
"original": {
|
|
14010
|
-
"$value": {
|
|
14011
|
-
"default": "{color.blue.700}",
|
|
14012
|
-
"dark": "{color.neutral.100}"
|
|
14013
|
-
},
|
|
14021
|
+
"$value": "{control.background.color.selected.focus}",
|
|
14014
14022
|
"$type": "color",
|
|
14015
14023
|
"$description": "Used for the dropdown selected option indicator in the active state."
|
|
14016
14024
|
},
|
|
@@ -14221,6 +14229,33 @@
|
|
|
14221
14229
|
}
|
|
14222
14230
|
}
|
|
14223
14231
|
}
|
|
14232
|
+
},
|
|
14233
|
+
"search": {
|
|
14234
|
+
"background": {
|
|
14235
|
+
"color": {
|
|
14236
|
+
"$value": "rgba(05, 05, 06, 0.02)",
|
|
14237
|
+
"$type": "color",
|
|
14238
|
+
"$description": "Used for the background of a search input in a dropdown listbox.",
|
|
14239
|
+
"filePath": "src/tokens/contextual/dropdown.tokens.json",
|
|
14240
|
+
"isSource": true,
|
|
14241
|
+
"original": {
|
|
14242
|
+
"$value": {
|
|
14243
|
+
"default": "{color.alpha.dark.2}",
|
|
14244
|
+
"dark": "{color.alpha.dark.24}"
|
|
14245
|
+
},
|
|
14246
|
+
"$type": "color",
|
|
14247
|
+
"$description": "Used for the background of a search input in a dropdown listbox."
|
|
14248
|
+
},
|
|
14249
|
+
"name": "DROPDOWN_SEARCH_BACKGROUND_COLOR",
|
|
14250
|
+
"attributes": {},
|
|
14251
|
+
"path": [
|
|
14252
|
+
"dropdown",
|
|
14253
|
+
"search",
|
|
14254
|
+
"background",
|
|
14255
|
+
"color"
|
|
14256
|
+
]
|
|
14257
|
+
}
|
|
14258
|
+
}
|
|
14224
14259
|
}
|
|
14225
14260
|
},
|
|
14226
14261
|
"filtered-search": {
|
|
@@ -693,14 +693,13 @@ $gl-button-disabled-foreground-color: $gl-color-neutral-400; // Used for the for
|
|
|
693
693
|
$gl-button-disabled-background-color: rgba(137, 136, 141, 0.16); // Used for the background of a disabled button.
|
|
694
694
|
$gl-button-disabled-border-color: $gl-color-alpha-0; // Used for the border of a disabled button.
|
|
695
695
|
$gl-datepicker-background-color: $gl-color-neutral-900; // Used for the background color of datepicker.
|
|
696
|
-
$gl-dropdown-border-color: $gl-color-neutral-700; // Used for the border of a dropdown.
|
|
697
|
-
$gl-dropdown-option-indicator-color-selected-active: $gl-color-neutral-100; // Used for the dropdown selected option indicator in the active state.
|
|
698
696
|
$gl-dropdown-option-background-color-unselected-default: $gl-action-neutral-background-color-default; // Used for the background of an unselected dropdown option in the default state.
|
|
699
697
|
$gl-dropdown-option-background-color-unselected-hover: $gl-action-neutral-background-color-hover; // Used for the background of an unselected dropdown option in the hover state.
|
|
700
698
|
$gl-dropdown-option-background-color-unselected-active: $gl-action-neutral-background-color-active; // Used for the background of an unselected dropdown option in the active state.
|
|
701
699
|
$gl-dropdown-option-background-color-selected-default: $gl-color-neutral-800; // Used for the background of a selected dropdown option in the default state.
|
|
702
700
|
$gl-dropdown-option-background-color-selected-hover: $gl-color-neutral-700; // Used for the background of a selected dropdown option in the hover state.
|
|
703
701
|
$gl-dropdown-option-background-color-selected-active: $gl-color-neutral-900; // Used for the background of a selected dropdown option in the active state.
|
|
702
|
+
$gl-dropdown-search-background-color: $gl-color-alpha-dark-24; // Used for the background of a search input in a dropdown listbox.
|
|
704
703
|
$gl-filtered-search-token-type-background-color-default: $gl-color-neutral-900; // Used for the filtered search type token background color in the default state.
|
|
705
704
|
$gl-filtered-search-token-type-background-color-hover: $gl-color-neutral-800; // Used for the filtered search type token background color in the hover state.
|
|
706
705
|
$gl-filtered-search-token-data-background-color-default: $gl-color-neutral-800; // Used for the filtered search data background color in the default state.
|
|
@@ -907,11 +906,14 @@ $gl-button-selected-background-color-active: $gl-button-default-primary-backgrou
|
|
|
907
906
|
$gl-button-selected-border-color-focus: $gl-button-selected-border-color-hover; // Used for the border of a selected button in the focus state.
|
|
908
907
|
$gl-datepicker-date-text-color-selected: $gl-control-indicator-color-selected; // Used for the datepicker date text color state indicators.
|
|
909
908
|
$gl-dropdown-background-color: $gl-background-color-overlap; // Used for the background of a dropdown.
|
|
909
|
+
$gl-dropdown-border-color: $gl-border-color-default; // Used for the border of a dropdown.
|
|
910
|
+
$gl-dropdown-divider-color: $gl-border-color-subtle;
|
|
910
911
|
$gl-dropdown-option-text-color-default: $gl-action-neutral-foreground-color-default; // Used for the text of a dropdown option in the default state.
|
|
911
912
|
$gl-dropdown-option-text-color-disabled: $gl-action-disabled-foreground-color; // Used for the text of a dropdown option in the disabled state.
|
|
912
|
-
$gl-dropdown-option-indicator-color-selected-default: $gl-color-
|
|
913
|
-
$gl-dropdown-option-indicator-color-selected-hover: $gl-color-
|
|
914
|
-
$gl-dropdown-option-indicator-color-selected-focus: $gl-color-
|
|
913
|
+
$gl-dropdown-option-indicator-color-selected-default: $gl-control-background-color-selected-default; // Used for the dropdown selected option indicator in the default state.
|
|
914
|
+
$gl-dropdown-option-indicator-color-selected-hover: $gl-control-background-color-selected-hover; // Used for the dropdown selected option indicator in the hover state.
|
|
915
|
+
$gl-dropdown-option-indicator-color-selected-focus: $gl-control-background-color-selected-focus; // Used for the dropdown selected option indicator in the focus state.
|
|
916
|
+
$gl-dropdown-option-indicator-color-selected-active: $gl-control-background-color-selected-focus; // Used for the dropdown selected option indicator in the active state.
|
|
915
917
|
$gl-dropdown-option-background-color-unselected-focus: $gl-action-neutral-background-color-focus; // Used for the background of an unselected dropdown option in the focus state.
|
|
916
918
|
$gl-dropdown-option-background-color-selected-focus: $gl-dropdown-option-background-color-selected-hover; // Used for the background of a selected dropdown option in the focus state.
|
|
917
919
|
$gl-progress-bar-indicator-color-default: $gl-status-info-icon-color; // Used for the indicator color for the primary progress-bar variant.
|
|
@@ -693,14 +693,13 @@ $gl-button-disabled-foreground-color: $gl-color-neutral-500; // Used for the for
|
|
|
693
693
|
$gl-button-disabled-background-color: $gl-color-neutral-10; // Used for the background of a disabled button.
|
|
694
694
|
$gl-button-disabled-border-color: $gl-color-neutral-100; // Used for the border of a disabled button.
|
|
695
695
|
$gl-datepicker-background-color: $gl-color-neutral-0; // Used for the background color of datepicker.
|
|
696
|
-
$gl-dropdown-border-color: $gl-color-neutral-200; // Used for the border of a dropdown.
|
|
697
|
-
$gl-dropdown-option-indicator-color-selected-active: $gl-color-blue-700; // Used for the dropdown selected option indicator in the active state.
|
|
698
696
|
$gl-dropdown-option-background-color-unselected-default: $gl-action-neutral-background-color-default; // Used for the background of an unselected dropdown option in the default state.
|
|
699
697
|
$gl-dropdown-option-background-color-unselected-hover: $gl-action-neutral-background-color-hover; // Used for the background of an unselected dropdown option in the hover state.
|
|
700
698
|
$gl-dropdown-option-background-color-unselected-active: $gl-action-neutral-background-color-active; // Used for the background of an unselected dropdown option in the active state.
|
|
701
699
|
$gl-dropdown-option-background-color-selected-default: $gl-color-neutral-50; // Used for the background of a selected dropdown option in the default state.
|
|
702
700
|
$gl-dropdown-option-background-color-selected-hover: $gl-color-neutral-100; // Used for the background of a selected dropdown option in the hover state.
|
|
703
701
|
$gl-dropdown-option-background-color-selected-active: $gl-color-neutral-200; // Used for the background of a selected dropdown option in the active state.
|
|
702
|
+
$gl-dropdown-search-background-color: $gl-color-alpha-dark-2; // Used for the background of a search input in a dropdown listbox.
|
|
704
703
|
$gl-filtered-search-token-type-background-color-default: $gl-color-neutral-50; // Used for the filtered search type token background color in the default state.
|
|
705
704
|
$gl-filtered-search-token-type-background-color-hover: $gl-color-neutral-100; // Used for the filtered search type token background color in the hover state.
|
|
706
705
|
$gl-filtered-search-token-data-background-color-default: $gl-color-neutral-100; // Used for the filtered search data background color in the default state.
|
|
@@ -907,11 +906,14 @@ $gl-button-selected-background-color-active: $gl-button-default-primary-backgrou
|
|
|
907
906
|
$gl-button-selected-border-color-focus: $gl-button-selected-border-color-hover; // Used for the border of a selected button in the focus state.
|
|
908
907
|
$gl-datepicker-date-text-color-selected: $gl-control-indicator-color-selected; // Used for the datepicker date text color state indicators.
|
|
909
908
|
$gl-dropdown-background-color: $gl-background-color-overlap; // Used for the background of a dropdown.
|
|
909
|
+
$gl-dropdown-border-color: $gl-border-color-strong; // Used for the border of a dropdown.
|
|
910
|
+
$gl-dropdown-divider-color: $gl-border-color-default;
|
|
910
911
|
$gl-dropdown-option-text-color-default: $gl-action-neutral-foreground-color-default; // Used for the text of a dropdown option in the default state.
|
|
911
912
|
$gl-dropdown-option-text-color-disabled: $gl-action-disabled-foreground-color; // Used for the text of a dropdown option in the disabled state.
|
|
912
913
|
$gl-dropdown-option-indicator-color-selected-default: $gl-control-background-color-selected-default; // Used for the dropdown selected option indicator in the default state.
|
|
913
914
|
$gl-dropdown-option-indicator-color-selected-hover: $gl-control-background-color-selected-hover; // Used for the dropdown selected option indicator in the hover state.
|
|
914
915
|
$gl-dropdown-option-indicator-color-selected-focus: $gl-control-background-color-selected-focus; // Used for the dropdown selected option indicator in the focus state.
|
|
916
|
+
$gl-dropdown-option-indicator-color-selected-active: $gl-control-background-color-selected-focus; // Used for the dropdown selected option indicator in the active state.
|
|
915
917
|
$gl-dropdown-option-background-color-unselected-focus: $gl-action-neutral-background-color-focus; // Used for the background of an unselected dropdown option in the focus state.
|
|
916
918
|
$gl-dropdown-option-background-color-selected-focus: $gl-dropdown-option-background-color-selected-hover; // Used for the background of a selected dropdown option in the focus state.
|
|
917
919
|
$gl-progress-bar-indicator-color-default: $gl-status-info-icon-color; // Used for the indicator color for the primary progress-bar variant.
|
|
@@ -628,6 +628,7 @@ $gl-datepicker-background-color: var(--gl-datepicker-background-color);
|
|
|
628
628
|
$gl-datepicker-date-text-color-selected: var(--gl-datepicker-date-text-color-selected);
|
|
629
629
|
$gl-dropdown-background-color: var(--gl-dropdown-background-color);
|
|
630
630
|
$gl-dropdown-border-color: var(--gl-dropdown-border-color);
|
|
631
|
+
$gl-dropdown-divider-color: var(--gl-dropdown-divider-color);
|
|
631
632
|
$gl-dropdown-option-text-color-default: var(--gl-dropdown-option-text-color-default);
|
|
632
633
|
$gl-dropdown-option-text-color-hover: var(--gl-dropdown-option-text-color-hover);
|
|
633
634
|
$gl-dropdown-option-text-color-focus: var(--gl-dropdown-option-text-color-focus);
|
|
@@ -645,6 +646,7 @@ $gl-dropdown-option-background-color-selected-default: var(--gl-dropdown-option-
|
|
|
645
646
|
$gl-dropdown-option-background-color-selected-hover: var(--gl-dropdown-option-background-color-selected-hover);
|
|
646
647
|
$gl-dropdown-option-background-color-selected-focus: var(--gl-dropdown-option-background-color-selected-focus);
|
|
647
648
|
$gl-dropdown-option-background-color-selected-active: var(--gl-dropdown-option-background-color-selected-active);
|
|
649
|
+
$gl-dropdown-search-background-color: var(--gl-dropdown-search-background-color);
|
|
648
650
|
$gl-filtered-search-token-type-background-color-default: var(--gl-filtered-search-token-type-background-color-default);
|
|
649
651
|
$gl-filtered-search-token-type-background-color-hover: var(--gl-filtered-search-token-type-background-color-hover);
|
|
650
652
|
$gl-filtered-search-token-data-background-color-default: var(--gl-filtered-search-token-data-background-color-default);
|
|
@@ -381,7 +381,8 @@ const backgroundColor = {
|
|
|
381
381
|
const borderColor = {
|
|
382
382
|
...colors,
|
|
383
383
|
...borderColors,
|
|
384
|
-
dropdown: 'var(--gl-dropdown-border-color, var(--gl-color-
|
|
384
|
+
dropdown: 'var(--gl-dropdown-border-color, var(--gl-border-color-strong, #bfbfc3))',
|
|
385
|
+
'dropdown-divider': 'var(--gl-dropdown-divider-color, var(--gl-border-color-default, #dcdcde))',
|
|
385
386
|
};
|
|
386
387
|
|
|
387
388
|
const outlineColor = {
|
package/dist/utils/constants.js
CHANGED
|
@@ -102,6 +102,10 @@ const dropdownVariantOptions = {
|
|
|
102
102
|
danger: 'danger',
|
|
103
103
|
link: 'link'
|
|
104
104
|
};
|
|
105
|
+
const dropdownItemVariantOptions = {
|
|
106
|
+
default: 'default',
|
|
107
|
+
danger: 'danger'
|
|
108
|
+
};
|
|
105
109
|
const dropdownPlacements = {
|
|
106
110
|
'right-start': 'right-start',
|
|
107
111
|
'bottom-start': 'bottom-start',
|
|
@@ -291,4 +295,4 @@ const loadingIconVariants = {
|
|
|
291
295
|
dots: 'dots'
|
|
292
296
|
};
|
|
293
297
|
|
|
294
|
-
export { COMMA, CONTRAST_LEVELS, HEX_REGEX, LEFT_MOUSE_BUTTON, alertVariantIconMap, alertVariantOptions, alignOptions, avatarShapeOptions, avatarSizeOptions, avatarsInlineSizeOptions, badgeForButtonOptions, badgeIconSizeOptions, badgeSizeOptions, badgeVariantOptions, bannerVariants, buttonCategoryOptions, buttonSizeOptions, buttonVariantOptions, colorThemes, columnOptions, datepickerWidthOptionsMap, defaultDateFormat, drawerVariants, dropdownAllowedAutoPlacements, dropdownPlacements, dropdownVariantOptions, focusableTags, formInputWidths, formStateOptions, iconSizeOptions, iconVariantOptions, keyboard, labelColorOptions, loadingIconSizes, loadingIconVariants, maxZIndex, modalButtonDefaults, modalSizeOptions, popoverPlacements, progressBarVariantOptions, resizeDebounceTime, tabsButtonDefaults, targetOptions, toggleLabelPosition, tokenVariants, tooltipActionEvents, tooltipDelay, tooltipPlacements, triggerVariantOptions, truncateOptions, variantCssColorMap, viewModeOptions };
|
|
298
|
+
export { COMMA, CONTRAST_LEVELS, HEX_REGEX, LEFT_MOUSE_BUTTON, alertVariantIconMap, alertVariantOptions, alignOptions, avatarShapeOptions, avatarSizeOptions, avatarsInlineSizeOptions, badgeForButtonOptions, badgeIconSizeOptions, badgeSizeOptions, badgeVariantOptions, bannerVariants, buttonCategoryOptions, buttonSizeOptions, buttonVariantOptions, colorThemes, columnOptions, datepickerWidthOptionsMap, defaultDateFormat, drawerVariants, dropdownAllowedAutoPlacements, dropdownItemVariantOptions, dropdownPlacements, dropdownVariantOptions, focusableTags, formInputWidths, formStateOptions, iconSizeOptions, iconVariantOptions, keyboard, labelColorOptions, loadingIconSizes, loadingIconVariants, maxZIndex, modalButtonDefaults, modalSizeOptions, popoverPlacements, progressBarVariantOptions, resizeDebounceTime, tabsButtonDefaults, targetOptions, toggleLabelPosition, tokenVariants, tooltipActionEvents, tooltipDelay, tooltipPlacements, triggerVariantOptions, truncateOptions, variantCssColorMap, viewModeOptions };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "107.
|
|
3
|
+
"version": "107.1.1",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"build": "NODE_ENV=production rollup -c",
|
|
33
33
|
"prebuild": "run-s build-tokens build-migration-script",
|
|
34
34
|
"prepare": "run-s build-tokens",
|
|
35
|
+
"postinstall": "patch-package --error-on-fail --error-on-warn",
|
|
35
36
|
"copy-fonts": "make copy-fonts",
|
|
36
37
|
"build-tokens": "node ./bin/build_tokens.mjs",
|
|
37
38
|
"build-migration-script": "esbuild --bundle --platform=node --target=esnext --outfile=bin/migrate_custom_utils_to_tw.bundled.mjs --format=esm --banner:js=\"import { createRequire as __gl__createRequire } from 'node:module'; const require = __gl__createRequire(import.meta.url);\" bin/migrate_custom_utils_to_tw.mjs",
|
|
@@ -169,6 +170,7 @@
|
|
|
169
170
|
"mockdate": "^2.0.5",
|
|
170
171
|
"module-alias": "^2.2.2",
|
|
171
172
|
"npm-run-all": "^4.1.5",
|
|
173
|
+
"patch-package": "^8.0.0",
|
|
172
174
|
"pikaday": "^1.8.0",
|
|
173
175
|
"playwright": "^1.49.1",
|
|
174
176
|
"playwright-core": "^1.49.1",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
.gl-dropdown-header-top {
|
|
41
|
-
@apply gl-border-1 gl-border-b-solid gl-border-dropdown;
|
|
41
|
+
@apply gl-border-1 gl-border-b-solid gl-border-dropdown-divider;
|
|
42
42
|
@apply gl-flex;
|
|
43
43
|
@apply gl-text-base;
|
|
44
44
|
@apply gl-text-strong;
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
.gl-dropdown-header {
|
|
55
|
-
@apply gl-border-b-1 gl-border-b-solid gl-border-b-dropdown;
|
|
55
|
+
@apply gl-border-b-1 gl-border-b-solid gl-border-b-dropdown-divider;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
.gl-dropdown-footer {
|
|
59
|
-
@apply gl-border-t-1 gl-border-t-solid gl-border-t-dropdown;
|
|
59
|
+
@apply gl-border-t-1 gl-border-t-solid gl-border-t-dropdown-divider;
|
|
60
60
|
@apply gl-py-3;
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
} from './constants';
|
|
9
9
|
|
|
10
10
|
export const BORDER_CLASSES = {
|
|
11
|
-
[borderPositions.top]: 'gl-border-t gl-border-t-dropdown gl-pt-2 gl-mt-2',
|
|
12
|
-
[borderPositions.bottom]: 'gl-border-b gl-border-b-dropdown gl-pb-2 gl-mb-2',
|
|
11
|
+
[borderPositions.top]: 'gl-border-t gl-border-t-dropdown-divider gl-pt-2 gl-mt-2',
|
|
12
|
+
[borderPositions.bottom]: 'gl-border-b gl-border-b-dropdown-divider gl-pb-2 gl-mb-2',
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
export default {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { BLink } from '../../../../vendor/bootstrap-vue/src/components/link/link';
|
|
3
3
|
import { ENTER, SPACE } from '../constants';
|
|
4
4
|
import { stopEvent } from '../../../../utils/utils';
|
|
5
|
+
import { dropdownItemVariantOptions } from '../../../../utils/constants';
|
|
5
6
|
import { isItem } from './utils';
|
|
6
7
|
import { DISCLOSURE_DROPDOWN_ITEM_NAME } from './constants';
|
|
7
8
|
|
|
@@ -18,6 +19,17 @@ export default {
|
|
|
18
19
|
default: null,
|
|
19
20
|
validator: isItem,
|
|
20
21
|
},
|
|
22
|
+
/**
|
|
23
|
+
* The variant of the dropdown item.
|
|
24
|
+
*/
|
|
25
|
+
variant: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: null,
|
|
28
|
+
validator(value) {
|
|
29
|
+
return dropdownItemVariantOptions[value] !== undefined;
|
|
30
|
+
},
|
|
31
|
+
required: false,
|
|
32
|
+
},
|
|
21
33
|
},
|
|
22
34
|
computed: {
|
|
23
35
|
isLink() {
|
|
@@ -62,8 +74,20 @@ export default {
|
|
|
62
74
|
componentIndex() {
|
|
63
75
|
return this.item?.extraAttrs?.disabled ? null : -1;
|
|
64
76
|
},
|
|
65
|
-
|
|
66
|
-
return this.item?.
|
|
77
|
+
itemVariant() {
|
|
78
|
+
return this.variant || this.item?.variant;
|
|
79
|
+
},
|
|
80
|
+
classes() {
|
|
81
|
+
return [
|
|
82
|
+
this.$options.ITEM_CLASS,
|
|
83
|
+
this.item?.wrapperClass ?? '',
|
|
84
|
+
// This isn't a Tailwind class, so this lint rule isn't relevant.
|
|
85
|
+
// It just so happens this class has the same prefix `gl-`.
|
|
86
|
+
this.itemVariant && this.itemVariant !== 'default'
|
|
87
|
+
? // eslint-disable-next-line @gitlab/tailwind-no-interpolation
|
|
88
|
+
`gl-new-dropdown-item-${this.itemVariant}`
|
|
89
|
+
: '',
|
|
90
|
+
];
|
|
67
91
|
},
|
|
68
92
|
wrapperListeners() {
|
|
69
93
|
const listeners = {
|
|
@@ -107,7 +131,7 @@ export default {
|
|
|
107
131
|
<template>
|
|
108
132
|
<li
|
|
109
133
|
:tabindex="listIndex"
|
|
110
|
-
:class="
|
|
134
|
+
:class="classes"
|
|
111
135
|
data-testid="disclosure-dropdown-item"
|
|
112
136
|
v-on="wrapperListeners"
|
|
113
137
|
>
|
|
@@ -25,12 +25,12 @@ export const mockItems = [
|
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
text: 'Close merge request',
|
|
28
|
+
variant: 'danger',
|
|
28
29
|
action: () => {
|
|
29
30
|
// eslint-disable-next-line no-console
|
|
30
31
|
console.log('CLOSED');
|
|
31
32
|
},
|
|
32
33
|
extraAttrs: {
|
|
33
|
-
class: '!gl-text-red-500',
|
|
34
34
|
rel: 'nofollow',
|
|
35
35
|
'data-method': 'put',
|
|
36
36
|
},
|
|
@@ -131,4 +131,33 @@
|
|
|
131
131
|
@apply gl-py-3;
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
+
|
|
135
|
+
&.gl-new-dropdown-item-danger {
|
|
136
|
+
.gl-new-dropdown-item-content {
|
|
137
|
+
color: var(--gl-action-danger-foreground-color-default);
|
|
138
|
+
background-color: var(--gl-action-danger-background-color-default);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&:hover {
|
|
142
|
+
.gl-new-dropdown-item-content {
|
|
143
|
+
color: var(--gl-action-danger-foreground-color-hover);
|
|
144
|
+
background-color: var(--gl-action-danger-background-color-hover);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&:focus {
|
|
149
|
+
.gl-new-dropdown-item-content {
|
|
150
|
+
color: var(--gl-action-danger-foreground-color-focus);
|
|
151
|
+
background-color: var(--gl-action-danger-background-color-focus);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&:active,
|
|
156
|
+
&:focus:active {
|
|
157
|
+
.gl-new-dropdown-item-content {
|
|
158
|
+
color: var(--gl-action-danger-foreground-color-active);
|
|
159
|
+
background-color: var(--gl-action-danger-background-color-active);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
134
163
|
}
|
|
@@ -33,8 +33,18 @@ import GlListboxGroup from './listbox_group.vue';
|
|
|
33
33
|
import { isOption, itemsValidator, flattenedOptions } from './utils';
|
|
34
34
|
|
|
35
35
|
export const ITEM_SELECTOR = '[role="option"]';
|
|
36
|
-
const HEADER_ITEMS_BORDER_CLASSES = [
|
|
37
|
-
|
|
36
|
+
const HEADER_ITEMS_BORDER_CLASSES = [
|
|
37
|
+
'gl-border-b-1',
|
|
38
|
+
'gl-border-b-solid',
|
|
39
|
+
'gl-border-b-dropdown-divider',
|
|
40
|
+
];
|
|
41
|
+
const GROUP_TOP_BORDER_CLASSES = [
|
|
42
|
+
'gl-border-t-1',
|
|
43
|
+
'gl-border-t-solid',
|
|
44
|
+
'gl-border-t-dropdown-divider',
|
|
45
|
+
'gl-pt-1',
|
|
46
|
+
'gl-mt-2',
|
|
47
|
+
];
|
|
38
48
|
export const SEARCH_INPUT_SELECTOR = '.gl-listbox-search-input';
|
|
39
49
|
|
|
40
50
|
export default {
|