@gitlab/ui 115.6.1 → 115.8.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.
@@ -8724,6 +8724,160 @@
8724
8724
  "color"
8725
8725
  ],
8726
8726
  "cssWithValue": "var(--gl-dropdown-background-color, var(--gl-background-color-overlap, #fff))"
8727
+ },
8728
+ "control": {
8729
+ "default": {
8730
+ "key": "{control.background.color.default}",
8731
+ "$value": "#fff",
8732
+ "$type": "color",
8733
+ "$description": "Used for form control (input, radio button, checkbox, textarea) default background.",
8734
+ "$extensions": {
8735
+ "com.figma.scope": [
8736
+ "FRAME_FILL",
8737
+ "SHAPE_FILL"
8738
+ ]
8739
+ },
8740
+ "filePath": "src/tokens/semantic/control.tokens.json",
8741
+ "isSource": true,
8742
+ "original": {
8743
+ "$value": {
8744
+ "default": "{color.neutral.0}",
8745
+ "dark": "{color.alpha.dark.40}"
8746
+ },
8747
+ "$type": "color",
8748
+ "$description": "Used for form control (input, radio button, checkbox, textarea) default background.",
8749
+ "$extensions": {
8750
+ "com.figma.scope": [
8751
+ "FRAME_FILL",
8752
+ "SHAPE_FILL"
8753
+ ]
8754
+ },
8755
+ "key": "{control.background.color.default}"
8756
+ },
8757
+ "name": "CONTROL_BACKGROUND_COLOR_DEFAULT",
8758
+ "attributes": {},
8759
+ "path": [
8760
+ "control",
8761
+ "background",
8762
+ "color",
8763
+ "default"
8764
+ ],
8765
+ "cssWithValue": "var(--gl-control-background-color-default, var(--gl-color-neutral-0, #fff))"
8766
+ },
8767
+ "disabled": {
8768
+ "key": "{control.background.color.disabled}",
8769
+ "$value": "#fbfafd",
8770
+ "$type": "color",
8771
+ "$description": "Used for disabled form control (checkbox, input, radio button, textarea) background.",
8772
+ "$extensions": {
8773
+ "com.figma.scope": [
8774
+ "FRAME_FILL",
8775
+ "SHAPE_FILL"
8776
+ ]
8777
+ },
8778
+ "filePath": "src/tokens/semantic/control.tokens.json",
8779
+ "isSource": true,
8780
+ "original": {
8781
+ "$value": {
8782
+ "default": "{color.neutral.10}",
8783
+ "dark": "{color.alpha.light.4}"
8784
+ },
8785
+ "$type": "color",
8786
+ "$description": "Used for disabled form control (checkbox, input, radio button, textarea) background.",
8787
+ "$extensions": {
8788
+ "com.figma.scope": [
8789
+ "FRAME_FILL",
8790
+ "SHAPE_FILL"
8791
+ ]
8792
+ },
8793
+ "key": "{control.background.color.disabled}"
8794
+ },
8795
+ "name": "CONTROL_BACKGROUND_COLOR_DISABLED",
8796
+ "attributes": {},
8797
+ "path": [
8798
+ "control",
8799
+ "background",
8800
+ "color",
8801
+ "disabled"
8802
+ ],
8803
+ "cssWithValue": "var(--gl-control-background-color-disabled, var(--gl-color-neutral-10, #fbfafd))"
8804
+ },
8805
+ "concatenation": {
8806
+ "key": "{control.background.color.concatenation}",
8807
+ "$value": "#fbfafd",
8808
+ "$type": "color",
8809
+ "$description": "Used for the background of static content that prepends or appends a text input.",
8810
+ "$extensions": {
8811
+ "com.figma.scope": [
8812
+ "FRAME_FILL",
8813
+ "SHAPE_FILL"
8814
+ ]
8815
+ },
8816
+ "filePath": "src/tokens/semantic/control.tokens.json",
8817
+ "isSource": true,
8818
+ "original": {
8819
+ "$value": {
8820
+ "default": "{color.neutral.10}",
8821
+ "dark": "{color.alpha.light.4}"
8822
+ },
8823
+ "$type": "color",
8824
+ "$description": "Used for the background of static content that prepends or appends a text input.",
8825
+ "$extensions": {
8826
+ "com.figma.scope": [
8827
+ "FRAME_FILL",
8828
+ "SHAPE_FILL"
8829
+ ]
8830
+ },
8831
+ "key": "{control.background.color.concatenation}"
8832
+ },
8833
+ "name": "CONTROL_BACKGROUND_COLOR_CONCATENATION",
8834
+ "attributes": {},
8835
+ "path": [
8836
+ "control",
8837
+ "background",
8838
+ "color",
8839
+ "concatenation"
8840
+ ],
8841
+ "cssWithValue": "var(--gl-control-background-color-concatenation, var(--gl-color-neutral-10, #fbfafd))"
8842
+ },
8843
+ "readonly": {
8844
+ "key": "{control.background.color.readonly}",
8845
+ "$value": "rgba(05, 05, 06, 0.02)",
8846
+ "$type": "color",
8847
+ "$description": "Used for the background of static content that prepends or appends a text input.",
8848
+ "$extensions": {
8849
+ "com.figma.scope": [
8850
+ "FRAME_FILL",
8851
+ "SHAPE_FILL"
8852
+ ]
8853
+ },
8854
+ "filePath": "src/tokens/semantic/control.tokens.json",
8855
+ "isSource": true,
8856
+ "original": {
8857
+ "$value": {
8858
+ "default": "{color.alpha.dark.2}",
8859
+ "dark": "{color.alpha.light.8}"
8860
+ },
8861
+ "$type": "color",
8862
+ "$description": "Used for the background of static content that prepends or appends a text input.",
8863
+ "$extensions": {
8864
+ "com.figma.scope": [
8865
+ "FRAME_FILL",
8866
+ "SHAPE_FILL"
8867
+ ]
8868
+ },
8869
+ "key": "{control.background.color.readonly}"
8870
+ },
8871
+ "name": "CONTROL_BACKGROUND_COLOR_READONLY",
8872
+ "attributes": {},
8873
+ "path": [
8874
+ "control",
8875
+ "background",
8876
+ "color",
8877
+ "readonly"
8878
+ ],
8879
+ "cssWithValue": "var(--gl-control-background-color-readonly, var(--gl-color-alpha-dark-2, rgba(05, 05, 06, 0.02)))"
8880
+ }
8727
8881
  }
8728
8882
  },
8729
8883
  "border": {
@@ -16947,6 +17101,116 @@
16947
17101
  "color"
16948
17102
  ],
16949
17103
  "cssWithValue": "var(--gl-dropdown-divider-color, var(--gl-border-color-default, #dcdcde))"
17104
+ },
17105
+ "control": {
17106
+ "default": {
17107
+ "key": "{control.border.color.default}",
17108
+ "$value": "#89888d",
17109
+ "$type": "color",
17110
+ "$description": "Used for form control (input, radio button, checkbox, textarea) default border.",
17111
+ "$extensions": {
17112
+ "com.figma.scope": [
17113
+ "STROKE_COLOR"
17114
+ ]
17115
+ },
17116
+ "filePath": "src/tokens/semantic/control.tokens.json",
17117
+ "isSource": true,
17118
+ "original": {
17119
+ "$value": {
17120
+ "default": "{color.neutral.400}",
17121
+ "dark": "{color.neutral.500}"
17122
+ },
17123
+ "$type": "color",
17124
+ "$description": "Used for form control (input, radio button, checkbox, textarea) default border.",
17125
+ "$extensions": {
17126
+ "com.figma.scope": [
17127
+ "STROKE_COLOR"
17128
+ ]
17129
+ },
17130
+ "key": "{control.border.color.default}"
17131
+ },
17132
+ "name": "CONTROL_BORDER_COLOR_DEFAULT",
17133
+ "attributes": {},
17134
+ "path": [
17135
+ "control",
17136
+ "border",
17137
+ "color",
17138
+ "default"
17139
+ ],
17140
+ "cssWithValue": "var(--gl-control-border-color-default, var(--gl-color-neutral-400, #89888d))"
17141
+ },
17142
+ "disabled": {
17143
+ "key": "{control.border.color.disabled}",
17144
+ "$value": "#dcdcde",
17145
+ "$type": "color",
17146
+ "$description": "Used for disabled form control (input, radio button, checkbox, textarea) border.",
17147
+ "$extensions": {
17148
+ "com.figma.scope": [
17149
+ "STROKE_COLOR"
17150
+ ]
17151
+ },
17152
+ "filePath": "src/tokens/semantic/control.tokens.json",
17153
+ "isSource": true,
17154
+ "original": {
17155
+ "$value": {
17156
+ "default": "{color.neutral.100}",
17157
+ "dark": "{color.neutral.800}"
17158
+ },
17159
+ "$type": "color",
17160
+ "$description": "Used for disabled form control (input, radio button, checkbox, textarea) border.",
17161
+ "$extensions": {
17162
+ "com.figma.scope": [
17163
+ "STROKE_COLOR"
17164
+ ]
17165
+ },
17166
+ "key": "{control.border.color.disabled}"
17167
+ },
17168
+ "name": "CONTROL_BORDER_COLOR_DISABLED",
17169
+ "attributes": {},
17170
+ "path": [
17171
+ "control",
17172
+ "border",
17173
+ "color",
17174
+ "disabled"
17175
+ ],
17176
+ "cssWithValue": "var(--gl-control-border-color-disabled, var(--gl-color-neutral-100, #dcdcde))"
17177
+ },
17178
+ "error": {
17179
+ "key": "{control.border.color.error}",
17180
+ "$value": "#dd2b0e",
17181
+ "$type": "color",
17182
+ "$description": "Used for invalid form control (input, textarea) border.",
17183
+ "$extensions": {
17184
+ "com.figma.scope": [
17185
+ "STROKE_COLOR"
17186
+ ]
17187
+ },
17188
+ "filePath": "src/tokens/semantic/control.tokens.json",
17189
+ "isSource": true,
17190
+ "original": {
17191
+ "$value": {
17192
+ "default": "{color.red.500}",
17193
+ "dark": "{color.red.300}"
17194
+ },
17195
+ "$type": "color",
17196
+ "$description": "Used for invalid form control (input, textarea) border.",
17197
+ "$extensions": {
17198
+ "com.figma.scope": [
17199
+ "STROKE_COLOR"
17200
+ ]
17201
+ },
17202
+ "key": "{control.border.color.error}"
17203
+ },
17204
+ "name": "CONTROL_BORDER_COLOR_ERROR",
17205
+ "attributes": {},
17206
+ "path": [
17207
+ "control",
17208
+ "border",
17209
+ "color",
17210
+ "error"
17211
+ ],
17212
+ "cssWithValue": "var(--gl-control-border-color-error, var(--gl-color-red-500, #dd2b0e))"
17213
+ }
16950
17214
  }
16951
17215
  },
16952
17216
  "fill": {
@@ -34523,6 +34787,106 @@
34523
34787
  "tertiary"
34524
34788
  ],
34525
34789
  "cssWithValue": "var(--gl-text-tertiary, #89888d)"
34790
+ },
34791
+ "control": {
34792
+ "placeholder": {
34793
+ "key": "{control.placeholder.color}",
34794
+ "$value": "#89888d",
34795
+ "$type": "color",
34796
+ "$description": "Used for placeholder text within inputs.",
34797
+ "$extensions": {
34798
+ "com.figma.scope": [
34799
+ "TEXT_FILL"
34800
+ ]
34801
+ },
34802
+ "filePath": "src/tokens/semantic/control.tokens.json",
34803
+ "isSource": true,
34804
+ "original": {
34805
+ "$value": "{text.color.disabled}",
34806
+ "$type": "color",
34807
+ "$description": "Used for placeholder text within inputs.",
34808
+ "$extensions": {
34809
+ "com.figma.scope": [
34810
+ "TEXT_FILL"
34811
+ ]
34812
+ },
34813
+ "key": "{control.placeholder.color}"
34814
+ },
34815
+ "name": "CONTROL_PLACEHOLDER_COLOR",
34816
+ "attributes": {},
34817
+ "path": [
34818
+ "control",
34819
+ "placeholder",
34820
+ "color"
34821
+ ],
34822
+ "cssWithValue": "var(--gl-control-placeholder-color, var(--gl-text-color-disabled, #89888d))"
34823
+ },
34824
+ "error": {
34825
+ "key": "{control.text.color.error}",
34826
+ "$value": "#c02f12",
34827
+ "$type": "color",
34828
+ "$description": "Used for the helper text when the input is invalid.",
34829
+ "$extensions": {
34830
+ "com.figma.scope": [
34831
+ "TEXT_FILL"
34832
+ ]
34833
+ },
34834
+ "filePath": "src/tokens/semantic/control.tokens.json",
34835
+ "isSource": true,
34836
+ "original": {
34837
+ "$value": "{text.color.danger}",
34838
+ "$type": "color",
34839
+ "$description": "Used for the helper text when the input is invalid.",
34840
+ "$extensions": {
34841
+ "com.figma.scope": [
34842
+ "TEXT_FILL"
34843
+ ]
34844
+ },
34845
+ "key": "{control.text.color.error}"
34846
+ },
34847
+ "name": "CONTROL_TEXT_COLOR_ERROR",
34848
+ "attributes": {},
34849
+ "path": [
34850
+ "control",
34851
+ "text",
34852
+ "color",
34853
+ "error"
34854
+ ],
34855
+ "cssWithValue": "var(--gl-control-text-color-error, var(--gl-text-color-danger, #c02f12))"
34856
+ },
34857
+ "valid": {
34858
+ "key": "{control.text.color.valid}",
34859
+ "$value": "#2f7549",
34860
+ "$type": "color",
34861
+ "$description": "Used for the helper text when the input is valid.",
34862
+ "$extensions": {
34863
+ "com.figma.scope": [
34864
+ "TEXT_FILL"
34865
+ ]
34866
+ },
34867
+ "filePath": "src/tokens/semantic/control.tokens.json",
34868
+ "isSource": true,
34869
+ "original": {
34870
+ "$value": "{text.color.success}",
34871
+ "$type": "color",
34872
+ "$description": "Used for the helper text when the input is valid.",
34873
+ "$extensions": {
34874
+ "com.figma.scope": [
34875
+ "TEXT_FILL"
34876
+ ]
34877
+ },
34878
+ "key": "{control.text.color.valid}"
34879
+ },
34880
+ "name": "CONTROL_TEXT_COLOR_VALID",
34881
+ "attributes": {},
34882
+ "path": [
34883
+ "control",
34884
+ "text",
34885
+ "color",
34886
+ "valid"
34887
+ ],
34888
+ "cssWithValue": "var(--gl-control-text-color-valid, var(--gl-text-color-success, #2f7549))"
34889
+ }
34526
34890
  }
34527
34891
  },
34528
34892
  "outline": {
@@ -44,6 +44,12 @@
44
44
  ...statusBackgroundColors,
45
45
  ...feedbackBackgroundColors,
46
46
  dropdown: 'var(--gl-dropdown-background-color, var(--gl-background-color-overlap, #fff))',
47
+ control: {
48
+ default: 'var(--gl-control-background-color-default, var(--gl-color-neutral-0, #fff))',
49
+ disabled: 'var(--gl-control-background-color-disabled, var(--gl-color-neutral-10, #fbfafd))',
50
+ concatenation: 'var(--gl-control-background-color-concatenation, var(--gl-color-neutral-10, #fbfafd))',
51
+ readonly: 'var(--gl-control-background-color-readonly, var(--gl-color-alpha-dark-2, rgba(05, 05, 06, 0.02)))',
52
+ },
47
53
  };
48
54
 
49
55
  const borderColor = {
@@ -51,6 +57,11 @@
51
57
  ...borderColors,
52
58
  dropdown: 'var(--gl-dropdown-border-color, var(--gl-border-color-strong, #bfbfc3))',
53
59
  'dropdown-divider': 'var(--gl-dropdown-divider-color, var(--gl-border-color-default, #dcdcde))',
60
+ control: {
61
+ default: 'var(--gl-control-border-color-default, var(--gl-color-neutral-400, #89888d))',
62
+ disabled: 'var(--gl-control-border-color-disabled, var(--gl-color-neutral-100, #dcdcde))',
63
+ error: 'var(--gl-control-border-color-error, var(--gl-color-red-500, #dd2b0e))',
64
+ },
54
65
  };
55
66
 
56
67
  const outlineColor = {
@@ -74,6 +85,11 @@
74
85
  primary: 'var(--gl-text-primary, #28272d)',
75
86
  secondary: 'var(--gl-text-secondary, #737278)',
76
87
  tertiary: 'var(--gl-text-tertiary, #89888d)',
88
+ control: {
89
+ placeholder: 'var(--gl-control-placeholder-color, var(--gl-text-color-disabled, #89888d))',
90
+ error: 'var(--gl-control-text-color-error, var(--gl-text-color-danger, #c02f12))',
91
+ valid: 'var(--gl-control-text-color-valid, var(--gl-text-color-success, #2f7549))',
92
+ },
77
93
  };
78
94
 
79
95
  module.exports = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "115.6.1",
3
+ "version": "115.8.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -102,7 +102,7 @@
102
102
  "@babel/preset-react": "^7.27.1",
103
103
  "@cypress/grep": "^4.1.0",
104
104
  "@gitlab/fonts": "^1.3.0",
105
- "@gitlab/svgs": "3.136.0",
105
+ "@gitlab/svgs": "3.141.0",
106
106
  "@jest/test-sequencer": "30.0.4",
107
107
  "@rollup/plugin-commonjs": "^28.0.6",
108
108
  "@rollup/plugin-node-resolve": "^16.0.1",
@@ -134,11 +134,11 @@
134
134
  "autoprefixer": "10.4.21",
135
135
  "axe-playwright": "^2.1.0",
136
136
  "babel-loader": "^9.2.1",
137
- "cypress": "14.5.1",
137
+ "cypress": "14.5.2",
138
138
  "cypress-real-events": "^1.14.0",
139
139
  "dompurify": "^3.1.2",
140
140
  "emoji-regex": "^10.4.0",
141
- "esbuild": "^0.25.6",
141
+ "esbuild": "^0.25.7",
142
142
  "fuse.js": "^7.1.0",
143
143
  "gitlab-api-async-iterator": "^1.3.1",
144
144
  "glob": "11.0.3",
@@ -67,7 +67,7 @@ It's possible to close the disclosure dropdown programmatically by calling the `
67
67
  `close` methods on the disclosure dropdown via a template ref. For example:
68
68
 
69
69
  ```js
70
- this.$refs.disclosureDropdown.closeAndFocus()
70
+ this.$refs.disclosureDropdown.closeAndFocus();
71
71
  ```
72
72
 
73
73
  The `closeAndFocus` method is preferred in most cases, especially when triggering it from some action
@@ -79,7 +79,8 @@ some other element. For example, closing the disclosure dropdown to focus a newl
79
79
  ## Setting disclosure dropdown items
80
80
 
81
81
  Use the `items` prop to provide actions/links to the disclosure dropdown. Each
82
- item can be either an item or a group. For `Item`s, provide an `href` or `to` string to
82
+ item can be either an item or a group. For `Item`s, provide an `href` or `to` string or
83
+ [`to` location descriptor object](https://v3.router.vuejs.org/api/#to) to
83
84
  make them render as links. Otherwise, they will be buttons. Provide an `action`
84
85
  function to items to be called when they are pressed, or, listen for the
85
86
  `action` event on the top-level component. Both will receive the given item as
@@ -96,7 +97,8 @@ type Item = {
96
97
  // href link
97
98
  href?: string;
98
99
  // or, a Vue router link with `to`
99
- to?: string;
100
+ // See https://github.com/vuejs/vue-router/blob/v3.6.5/types/router.d.ts#L400-L408 for Location definition
101
+ to?: string | Location;
100
102
  // Item action
101
103
  action?: (item: Item) => void;
102
104
  // Set of extra attributes applied directly to the element
@@ -33,7 +33,7 @@ export default {
33
33
  },
34
34
  computed: {
35
35
  isLink() {
36
- return typeof this.item?.href === 'string' || typeof this.item?.to === 'string';
36
+ return typeof this.item?.href === 'string' || typeof this.item?.to !== 'undefined';
37
37
  },
38
38
  isCustomContent() {
39
39
  return Boolean(this.$scopedSlots.default);
@@ -23,6 +23,10 @@ export const mockItems = [
23
23
  'data-uuid': '1234',
24
24
  },
25
25
  },
26
+ {
27
+ text: 'Lock discussion',
28
+ to: { path: '/lock', query: { show: 1234 } },
29
+ },
26
30
  {
27
31
  text: 'Close merge request',
28
32
  variant: 'danger',