@gitlab/ui 32.43.2 → 32.43.3

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 (21) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +6 -1
  3. package/dist/components/base/form/form_textarea/form_textarea.documentation.js +1 -20
  4. package/dist/components/base/form/form_textarea/form_textarea.js +8 -0
  5. package/documentation/documented_stories.js +1 -0
  6. package/package.json +3 -3
  7. package/src/components/base/form/form_textarea/form_textarea.documentation.js +0 -25
  8. package/src/components/base/form/form_textarea/form_textarea.stories.js +31 -30
  9. package/src/components/base/form/form_textarea/form_textarea.vue +8 -0
  10. package/dist/components/base/form/form_textarea/examples/form_textarea.basic.example.js +0 -47
  11. package/dist/components/base/form/form_textarea/examples/form_textarea.invalid.example.js +0 -47
  12. package/dist/components/base/form/form_textarea/examples/form_textarea.plaintext.example.js +0 -47
  13. package/dist/components/base/form/form_textarea/examples/form_textarea.readonly.example.js +0 -45
  14. package/dist/components/base/form/form_textarea/examples/form_textarea.submit.example.js +0 -47
  15. package/dist/components/base/form/form_textarea/examples/index.js +0 -37
  16. package/src/components/base/form/form_textarea/examples/form_textarea.basic.example.vue +0 -11
  17. package/src/components/base/form/form_textarea/examples/form_textarea.invalid.example.vue +0 -11
  18. package/src/components/base/form/form_textarea/examples/form_textarea.plaintext.example.vue +0 -13
  19. package/src/components/base/form/form_textarea/examples/form_textarea.readonly.example.vue +0 -9
  20. package/src/components/base/form/form_textarea/examples/form_textarea.submit.example.vue +0 -11
  21. package/src/components/base/form/form_textarea/examples/index.js +0 -43
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [32.43.3](https://gitlab.com/gitlab-org/gitlab-ui/compare/v32.43.2...v32.43.3) (2021-12-08)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deps:** update dependency dompurify to ^2.3.4 ([6798e4f](https://gitlab.com/gitlab-org/gitlab-ui/commit/6798e4f3e4fdd2b12b1b6e4cf8e0ac3d575cf43f))
7
+
1
8
  ## [32.43.2](https://gitlab.com/gitlab-org/gitlab-ui/compare/v32.43.1...v32.43.2) (2021-12-07)
2
9
 
3
10
 
package/README.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # GitLab UI
2
2
 
3
- GitLab UI is a UI component library written in [Vue.js](https://vuejs.org).
3
+ GitLab UI is a UI component library that implements [Pajamas](https://design.gitlab.com/), our
4
+ design system. GitLab UI is written in [Vue.js](https://vuejs.org) and its objectives are to:
5
+
6
+ - Create reusable UI components to accelerate frontend development.
7
+ - Create UI consistency for all components within GitLab.
8
+
4
9
  See <https://gitlab-org.gitlab.io/gitlab-ui/> for documentation.
5
10
 
6
11
  ## Usage
@@ -1,26 +1,7 @@
1
- import examples from './examples';
2
-
3
1
  var description = "**Note:** This needs a `v-model` property to work correctly.\nSee [this issue](https://github.com/bootstrap-vue/bootstrap-vue/issues/1915) on Bootstrap Vue for\nmore information.\n";
4
2
 
5
3
  var form_textarea_documentation = {
6
- description,
7
- examples,
8
- bootstrapComponent: 'b-form-textarea',
9
- events: [{
10
- event: 'input',
11
- args: [{
12
- arg: 'value',
13
- description: '(String)'
14
- }],
15
- description: 'Emitted to update the v-model'
16
- }, {
17
- event: 'update',
18
- args: [{
19
- arg: 'value',
20
- description: '(String)'
21
- }],
22
- description: `Triggered by user interaction. Emitted after any formatting (not including 'trim' or 'number' props). Useful for getting the currently entered value when the 'debounce' or 'lazy' props are set.`
23
- }]
4
+ description
24
5
  };
25
6
 
26
7
  export default form_textarea_documentation;
@@ -36,9 +36,17 @@ var script = {
36
36
  // Swap purpose of input and update events from underlying BFormTextarea.
37
37
  // See https://gitlab.com/gitlab-org/gitlab-ui/-/issues/631.
38
38
  input: (...args) => {
39
+ /**
40
+ * Emitted to update the v-model
41
+ */
39
42
  this.$emit('update', ...args);
40
43
  },
41
44
  update: (...args) => {
45
+ /**
46
+ * Triggered by user interaction.
47
+ * Emitted after any formatting (not including 'trim' or 'number' props).
48
+ * Useful for getting the currently entered value when the 'debounce' or 'lazy' props are set.
49
+ */
42
50
  this.$emit(model.event, ...args);
43
51
  }
44
52
  };
@@ -94,6 +94,7 @@ export const setupStorybookReadme = () =>
94
94
  'GlMarkdown',
95
95
  'GlTokenSelector',
96
96
  'GlTooltip',
97
+ 'GlFormTextarea',
97
98
  ],
98
99
  components: {
99
100
  GlComponentDocumentation,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "32.43.2",
3
+ "version": "32.43.3",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -60,7 +60,7 @@
60
60
  "@babel/standalone": "^7.0.0",
61
61
  "bootstrap-vue": "2.20.1",
62
62
  "copy-to-clipboard": "^3.0.8",
63
- "dompurify": "^2.3.3",
63
+ "dompurify": "^2.3.4",
64
64
  "echarts": "^5.2.1",
65
65
  "highlight.js": "^10.6.0",
66
66
  "js-beautify": "^1.8.8",
@@ -84,7 +84,7 @@
84
84
  "@babel/preset-env": "^7.10.2",
85
85
  "@gitlab/eslint-plugin": "10.0.0",
86
86
  "@gitlab/stylelint-config": "2.6.0",
87
- "@gitlab/svgs": "1.225.0",
87
+ "@gitlab/svgs": "1.226.0",
88
88
  "@rollup/plugin-commonjs": "^11.1.0",
89
89
  "@rollup/plugin-node-resolve": "^7.1.3",
90
90
  "@rollup/plugin-replace": "^2.3.2",
@@ -1,30 +1,5 @@
1
- import examples from './examples';
2
1
  import description from './form_textarea.md';
3
2
 
4
3
  export default {
5
4
  description,
6
- examples,
7
- bootstrapComponent: 'b-form-textarea',
8
- events: [
9
- {
10
- event: 'input',
11
- args: [
12
- {
13
- arg: 'value',
14
- description: '(String)',
15
- },
16
- ],
17
- description: 'Emitted to update the v-model',
18
- },
19
- {
20
- event: 'update',
21
- args: [
22
- {
23
- arg: 'value',
24
- description: '(String)',
25
- },
26
- ],
27
- description: `Triggered by user interaction. Emitted after any formatting (not including 'trim' or 'number' props). Useful for getting the currently entered value when the 'debounce' or 'lazy' props are set.`,
28
- },
29
- ],
30
5
  };
@@ -1,12 +1,6 @@
1
- import { withKnobs, boolean } from '@storybook/addon-knobs';
2
- import { documentedStoriesOf } from '../../../../../documentation/documented_stories';
3
1
  import { GlFormTextarea } from '../../../../../index';
4
2
  import readme from './form_textarea.md';
5
3
 
6
- const components = {
7
- GlFormTextarea,
8
- };
9
-
10
4
  const template = `
11
5
  <gl-form-textarea
12
6
  v-model="model"
@@ -16,28 +10,35 @@ const template = `
16
10
  />
17
11
  `;
18
12
 
19
- function generateProps({ noResize = GlFormTextarea.props.noResize.default } = {}) {
20
- return {
21
- model: {
22
- type: String,
23
- default:
24
- 'We take inspiration from other companies, and we always go for the boring solutions. Just like the rest of our work, we continually adjust our values and strive always to make them better. We used to have more values, but it was difficult to remember them all, so we condensed them and gave sub-values and created an acronym. Everyone is welcome to suggest improvements.',
25
- },
26
- placeholder: {
27
- type: String,
28
- default: 'hello',
29
- },
30
- noResize: {
31
- type: Boolean,
32
- default: boolean('no-resize', noResize),
33
- },
34
- };
35
- }
13
+ const generateProps = ({
14
+ model = 'We take inspiration from other companies, and we always go for the boring solutions. Just like the rest of our work, we continually adjust our values and strive always to make them better. We used to have more values, but it was difficult to remember them all, so we condensed them and gave sub-values and created an acronym. Everyone is welcome to suggest improvements.',
15
+ placeholder = 'hello',
16
+ noResize = GlFormTextarea.props.noResize.default,
17
+ } = {}) => ({
18
+ model,
19
+ placeholder,
20
+ noResize,
21
+ });
36
22
 
37
- documentedStoriesOf('base/form/form-textarea', readme)
38
- .addDecorator(withKnobs)
39
- .add('default', () => ({
40
- components,
41
- props: generateProps(),
42
- template,
43
- }));
23
+ const Template = (args) => ({
24
+ components: { GlFormTextarea },
25
+ props: Object.keys(args),
26
+ template,
27
+ });
28
+
29
+ export const Default = Template.bind({});
30
+ Default.args = generateProps();
31
+
32
+ export default {
33
+ title: 'base/form/form-textarea',
34
+ component: GlFormTextarea,
35
+ parameters: {
36
+ bootstrapComponent: 'b-form-textarea',
37
+ knobs: { disable: true },
38
+ docs: {
39
+ description: {
40
+ component: readme,
41
+ },
42
+ },
43
+ },
44
+ };
@@ -38,9 +38,17 @@ export default {
38
38
  // Swap purpose of input and update events from underlying BFormTextarea.
39
39
  // See https://gitlab.com/gitlab-org/gitlab-ui/-/issues/631.
40
40
  input: (...args) => {
41
+ /**
42
+ * Emitted to update the v-model
43
+ */
41
44
  this.$emit('update', ...args);
42
45
  },
43
46
  update: (...args) => {
47
+ /**
48
+ * Triggered by user interaction.
49
+ * Emitted after any formatting (not including 'trim' or 'number' props).
50
+ * Useful for getting the currently entered value when the 'debounce' or 'lazy' props are set.
51
+ */
44
52
  this.$emit(model.event, ...args);
45
53
  },
46
54
  };
@@ -1,47 +0,0 @@
1
- import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
2
-
3
- var script = {
4
- // We need this because without a v-model this input will reset on every keystroke
5
- // https://github.com/bootstrap-vue/bootstrap-vue/issues/1915
6
- data: () => ({
7
- text: ''
8
- })
9
- };
10
-
11
- /* script */
12
- const __vue_script__ = script;
13
-
14
- /* template */
15
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-form-textarea',{attrs:{"placeholder":"Enter something"},model:{value:(_vm.text),callback:function ($$v) {_vm.text=$$v;},expression:"text"}})};
16
- var __vue_staticRenderFns__ = [];
17
-
18
- /* style */
19
- const __vue_inject_styles__ = undefined;
20
- /* scoped */
21
- const __vue_scope_id__ = undefined;
22
- /* module identifier */
23
- const __vue_module_identifier__ = undefined;
24
- /* functional template */
25
- const __vue_is_functional_template__ = false;
26
- /* style inject */
27
-
28
- /* style inject SSR */
29
-
30
- /* style inject shadow dom */
31
-
32
-
33
-
34
- const __vue_component__ = __vue_normalize__(
35
- { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
36
- __vue_inject_styles__,
37
- __vue_script__,
38
- __vue_scope_id__,
39
- __vue_is_functional_template__,
40
- __vue_module_identifier__,
41
- false,
42
- undefined,
43
- undefined,
44
- undefined
45
- );
46
-
47
- export default __vue_component__;
@@ -1,47 +0,0 @@
1
- import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
2
-
3
- var script = {
4
- // We need this because without a v-model this input will reset on every keystroke
5
- // https://github.com/bootstrap-vue/bootstrap-vue/issues/1915
6
- data: () => ({
7
- text: 'This is invalid'
8
- })
9
- };
10
-
11
- /* script */
12
- const __vue_script__ = script;
13
-
14
- /* template */
15
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-form-textarea',{attrs:{"placeholder":"Enter something","state":false},model:{value:(_vm.text),callback:function ($$v) {_vm.text=$$v;},expression:"text"}})};
16
- var __vue_staticRenderFns__ = [];
17
-
18
- /* style */
19
- const __vue_inject_styles__ = undefined;
20
- /* scoped */
21
- const __vue_scope_id__ = undefined;
22
- /* module identifier */
23
- const __vue_module_identifier__ = undefined;
24
- /* functional template */
25
- const __vue_is_functional_template__ = false;
26
- /* style inject */
27
-
28
- /* style inject SSR */
29
-
30
- /* style inject shadow dom */
31
-
32
-
33
-
34
- const __vue_component__ = __vue_normalize__(
35
- { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
36
- __vue_inject_styles__,
37
- __vue_script__,
38
- __vue_scope_id__,
39
- __vue_is_functional_template__,
40
- __vue_module_identifier__,
41
- false,
42
- undefined,
43
- undefined,
44
- undefined
45
- );
46
-
47
- export default __vue_component__;
@@ -1,47 +0,0 @@
1
- import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
2
-
3
- var script = {
4
- // We need this because without a v-model this input will reset on every keystroke
5
- // https://github.com/bootstrap-vue/bootstrap-vue/issues/1915
6
- data: () => ({
7
- text: "This is some plain text.\nIt is read only and doesn't look like an input."
8
- })
9
- };
10
-
11
- /* script */
12
- const __vue_script__ = script;
13
-
14
- /* template */
15
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-form-textarea',{attrs:{"plaintext":""},model:{value:(_vm.text),callback:function ($$v) {_vm.text=$$v;},expression:"text"}})};
16
- var __vue_staticRenderFns__ = [];
17
-
18
- /* style */
19
- const __vue_inject_styles__ = undefined;
20
- /* scoped */
21
- const __vue_scope_id__ = undefined;
22
- /* module identifier */
23
- const __vue_module_identifier__ = undefined;
24
- /* functional template */
25
- const __vue_is_functional_template__ = false;
26
- /* style inject */
27
-
28
- /* style inject SSR */
29
-
30
- /* style inject shadow dom */
31
-
32
-
33
-
34
- const __vue_component__ = __vue_normalize__(
35
- { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
36
- __vue_inject_styles__,
37
- __vue_script__,
38
- __vue_scope_id__,
39
- __vue_is_functional_template__,
40
- __vue_module_identifier__,
41
- false,
42
- undefined,
43
- undefined,
44
- undefined
45
- );
46
-
47
- export default __vue_component__;
@@ -1,45 +0,0 @@
1
- import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
2
-
3
- var script = {
4
- data: () => ({
5
- text: 'This is some readonly text.'
6
- })
7
- };
8
-
9
- /* script */
10
- const __vue_script__ = script;
11
-
12
- /* template */
13
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-form-textarea',{attrs:{"readonly":""},model:{value:(_vm.text),callback:function ($$v) {_vm.text=$$v;},expression:"text"}})};
14
- var __vue_staticRenderFns__ = [];
15
-
16
- /* style */
17
- const __vue_inject_styles__ = undefined;
18
- /* scoped */
19
- const __vue_scope_id__ = undefined;
20
- /* module identifier */
21
- const __vue_module_identifier__ = undefined;
22
- /* functional template */
23
- const __vue_is_functional_template__ = false;
24
- /* style inject */
25
-
26
- /* style inject SSR */
27
-
28
- /* style inject shadow dom */
29
-
30
-
31
-
32
- const __vue_component__ = __vue_normalize__(
33
- { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
34
- __vue_inject_styles__,
35
- __vue_script__,
36
- __vue_scope_id__,
37
- __vue_is_functional_template__,
38
- __vue_module_identifier__,
39
- false,
40
- undefined,
41
- undefined,
42
- undefined
43
- );
44
-
45
- export default __vue_component__;
@@ -1,47 +0,0 @@
1
- import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
2
-
3
- var script = {
4
- // We need this because without a v-model this input will reset on every keystroke
5
- // https://github.com/bootstrap-vue/bootstrap-vue/issues/1915
6
- data: () => ({
7
- text: ''
8
- })
9
- };
10
-
11
- /* script */
12
- const __vue_script__ = script;
13
-
14
- /* template */
15
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-form-textarea',{attrs:{"placeholder":"Enter something","submit-on-enter":""},model:{value:(_vm.text),callback:function ($$v) {_vm.text=$$v;},expression:"text"}})};
16
- var __vue_staticRenderFns__ = [];
17
-
18
- /* style */
19
- const __vue_inject_styles__ = undefined;
20
- /* scoped */
21
- const __vue_scope_id__ = undefined;
22
- /* module identifier */
23
- const __vue_module_identifier__ = undefined;
24
- /* functional template */
25
- const __vue_is_functional_template__ = false;
26
- /* style inject */
27
-
28
- /* style inject SSR */
29
-
30
- /* style inject shadow dom */
31
-
32
-
33
-
34
- const __vue_component__ = __vue_normalize__(
35
- { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
36
- __vue_inject_styles__,
37
- __vue_script__,
38
- __vue_scope_id__,
39
- __vue_is_functional_template__,
40
- __vue_module_identifier__,
41
- false,
42
- undefined,
43
- undefined,
44
- undefined
45
- );
46
-
47
- export default __vue_component__;
@@ -1,37 +0,0 @@
1
- import FormTextAreaBasic from './form_textarea.basic.example';
2
- import FormTextAreaInvalid from './form_textarea.invalid.example';
3
- import FormTextAreaPlaintext from './form_textarea.plaintext.example';
4
- import FormTextReadOnlytext from './form_textarea.readonly.example';
5
- import FormTextSubmitOnEnter from './form_textarea.submit.example';
6
-
7
- var index = [{
8
- name: 'Basic',
9
- items: [{
10
- id: 'form-textarea-basic',
11
- name: 'Basic',
12
- description: 'Basic Form Textarea',
13
- component: FormTextAreaBasic
14
- }, {
15
- id: 'form-textarea-invalid',
16
- name: 'Invalid',
17
- description: 'Invalid Form Textarea',
18
- component: FormTextAreaInvalid
19
- }, {
20
- id: 'form-textarea-plaintext',
21
- name: 'Plaintext',
22
- description: 'Plaintext Form Textarea',
23
- component: FormTextAreaPlaintext
24
- }, {
25
- id: 'form-textarea-readonly',
26
- name: 'Read Only',
27
- description: 'Read Only Form Textarea',
28
- component: FormTextReadOnlytext
29
- }, {
30
- id: 'form-textarea-submit-on-enter',
31
- name: 'Submit On Enter',
32
- description: 'Submit On Enter Form Textarea',
33
- component: FormTextSubmitOnEnter
34
- }]
35
- }];
36
-
37
- export default index;
@@ -1,11 +0,0 @@
1
- <script>
2
- export default {
3
- // We need this because without a v-model this input will reset on every keystroke
4
- // https://github.com/bootstrap-vue/bootstrap-vue/issues/1915
5
- data: () => ({ text: '' }),
6
- };
7
- </script>
8
-
9
- <template>
10
- <gl-form-textarea v-model="text" placeholder="Enter something" />
11
- </template>
@@ -1,11 +0,0 @@
1
- <script>
2
- export default {
3
- // We need this because without a v-model this input will reset on every keystroke
4
- // https://github.com/bootstrap-vue/bootstrap-vue/issues/1915
5
- data: () => ({ text: 'This is invalid' }),
6
- };
7
- </script>
8
-
9
- <template>
10
- <gl-form-textarea v-model="text" placeholder="Enter something" :state="false" />
11
- </template>
@@ -1,13 +0,0 @@
1
- <script>
2
- export default {
3
- // We need this because without a v-model this input will reset on every keystroke
4
- // https://github.com/bootstrap-vue/bootstrap-vue/issues/1915
5
- data: () => ({
6
- text: "This is some plain text.\nIt is read only and doesn't look like an input.",
7
- }),
8
- };
9
- </script>
10
-
11
- <template>
12
- <gl-form-textarea v-model="text" plaintext />
13
- </template>
@@ -1,9 +0,0 @@
1
- <script>
2
- export default {
3
- data: () => ({ text: 'This is some readonly text.' }),
4
- };
5
- </script>
6
-
7
- <template>
8
- <gl-form-textarea v-model="text" readonly />
9
- </template>
@@ -1,11 +0,0 @@
1
- <script>
2
- export default {
3
- // We need this because without a v-model this input will reset on every keystroke
4
- // https://github.com/bootstrap-vue/bootstrap-vue/issues/1915
5
- data: () => ({ text: '' }),
6
- };
7
- </script>
8
-
9
- <template>
10
- <gl-form-textarea v-model="text" placeholder="Enter something" submit-on-enter />
11
- </template>
@@ -1,43 +0,0 @@
1
- import FormTextAreaBasic from './form_textarea.basic.example.vue';
2
- import FormTextAreaInvalid from './form_textarea.invalid.example.vue';
3
- import FormTextAreaPlaintext from './form_textarea.plaintext.example.vue';
4
- import FormTextReadOnlytext from './form_textarea.readonly.example.vue';
5
- import FormTextSubmitOnEnter from './form_textarea.submit.example.vue';
6
-
7
- export default [
8
- {
9
- name: 'Basic',
10
- items: [
11
- {
12
- id: 'form-textarea-basic',
13
- name: 'Basic',
14
- description: 'Basic Form Textarea',
15
- component: FormTextAreaBasic,
16
- },
17
- {
18
- id: 'form-textarea-invalid',
19
- name: 'Invalid',
20
- description: 'Invalid Form Textarea',
21
- component: FormTextAreaInvalid,
22
- },
23
- {
24
- id: 'form-textarea-plaintext',
25
- name: 'Plaintext',
26
- description: 'Plaintext Form Textarea',
27
- component: FormTextAreaPlaintext,
28
- },
29
- {
30
- id: 'form-textarea-readonly',
31
- name: 'Read Only',
32
- description: 'Read Only Form Textarea',
33
- component: FormTextReadOnlytext,
34
- },
35
- {
36
- id: 'form-textarea-submit-on-enter',
37
- name: 'Submit On Enter',
38
- description: 'Submit On Enter Form Textarea',
39
- component: FormTextSubmitOnEnter,
40
- },
41
- ],
42
- },
43
- ];