@gitlab/ui 32.45.0 → 32.48.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.
Files changed (139) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/config.js +15 -3
  3. package/dist/components/base/avatar_labeled/avatar_labeled.documentation.js +2 -9
  4. package/dist/components/base/avatars_inline/avatars_inline.documentation.js +2 -5
  5. package/dist/components/base/form/form_combobox/form_combobox.documentation.js +2 -9
  6. package/dist/components/base/form/form_combobox/form_combobox.js +5 -0
  7. package/dist/components/base/form/form_group/form_group.js +11 -1
  8. package/dist/components/base/form/input_group_text/input_group_text.documentation.js +1 -5
  9. package/dist/components/base/label/label.documentation.js +2 -9
  10. package/dist/components/base/label/label.js +23 -1
  11. package/dist/components/base/skeleton_loader/skeleton_loader.documentation.js +2 -28
  12. package/dist/components/base/skeleton_loader/skeleton_loader.js +30 -0
  13. package/dist/components/charts/discrete_scatter/discrete_scatter.documentation.js +1 -7
  14. package/dist/components/charts/gauge/gauge.documentation.js +2 -6
  15. package/dist/components/charts/stacked_column/stacked_column.documentation.js +2 -5
  16. package/dist/components/charts/tooltip/tooltip.documentation.js +1 -5
  17. package/dist/components/utilities/intersperse/intersperse.documentation.js +2 -5
  18. package/dist/config.js +15 -3
  19. package/dist/index.css +1 -1
  20. package/dist/index.css.map +1 -1
  21. package/documentation/documented_stories.js +11 -0
  22. package/package.json +1 -1
  23. package/src/components/base/avatar_labeled/avatar_labeled.documentation.js +0 -9
  24. package/src/components/base/avatar_labeled/avatar_labeled.md +2 -5
  25. package/src/components/base/avatar_labeled/avatar_labeled.stories.js +68 -62
  26. package/src/components/base/avatar_labeled/avatar_labeled.vue +1 -0
  27. package/src/components/base/avatars_inline/avatars_inline.documentation.js +0 -2
  28. package/src/components/base/avatars_inline/avatars_inline.md +1 -3
  29. package/src/components/base/avatars_inline/avatars_inline.stories.js +49 -44
  30. package/src/components/base/form/form_combobox/form_combobox.documentation.js +0 -8
  31. package/src/components/base/form/form_combobox/form_combobox.md +0 -2
  32. package/src/components/base/form/form_combobox/form_combobox.stories.js +30 -30
  33. package/src/components/base/form/form_combobox/form_combobox.vue +4 -0
  34. package/src/components/base/form/form_group/form_group.scss +4 -0
  35. package/src/components/base/form/form_group/form_group.spec.js +66 -64
  36. package/src/components/base/form/form_group/form_group.stories.js +36 -13
  37. package/src/components/base/form/form_group/form_group.vue +15 -2
  38. package/src/components/base/form/input_group_text/input_group_text.documentation.js +0 -3
  39. package/src/components/base/form/input_group_text/input_group_text.stories.js +24 -18
  40. package/src/components/base/label/label.documentation.js +2 -12
  41. package/src/components/base/label/label.md +2 -7
  42. package/src/components/base/label/label.stories.js +66 -92
  43. package/src/components/base/label/label.vue +22 -2
  44. package/src/components/base/skeleton_loader/skeleton_loader.documentation.js +0 -27
  45. package/src/components/base/skeleton_loader/skeleton_loader.md +0 -2
  46. package/src/components/base/skeleton_loader/skeleton_loader.stories.js +23 -9
  47. package/src/components/base/skeleton_loader/skeleton_loader.vue +24 -0
  48. package/src/components/charts/discrete_scatter/discrete_scatter.documentation.js +0 -5
  49. package/src/components/charts/discrete_scatter/discrete_scatter.stories.js +34 -46
  50. package/src/components/charts/gauge/gauge.documentation.js +0 -3
  51. package/src/components/charts/gauge/gauge.md +0 -2
  52. package/src/components/charts/gauge/gauge.stories.js +70 -86
  53. package/src/components/charts/stacked_column/stacked_column.documentation.js +0 -2
  54. package/src/components/charts/stacked_column/stacked_column.md +0 -2
  55. package/src/components/charts/stacked_column/stacked_column.stories.js +74 -99
  56. package/src/components/charts/tooltip/tooltip.documentation.js +0 -3
  57. package/src/components/charts/tooltip/tooltip.stories.js +59 -44
  58. package/src/components/utilities/intersperse/intersperse.documentation.js +0 -2
  59. package/src/components/utilities/intersperse/intersperse.md +0 -2
  60. package/src/components/utilities/intersperse/intersperse.stories.js +38 -38
  61. package/dist/components/base/avatar_labeled/examples/avatar.labeled.example.js +0 -38
  62. package/dist/components/base/avatar_labeled/examples/avatar.labeled_badges.example.js +0 -38
  63. package/dist/components/base/avatar_labeled/examples/avatar.labeled_links.example.js +0 -38
  64. package/dist/components/base/avatar_labeled/examples/avatar.labeled_tooltip.example.js +0 -38
  65. package/dist/components/base/avatar_labeled/examples/index.js +0 -31
  66. package/dist/components/base/avatars_inline/examples/avatars.inline.example.js +0 -58
  67. package/dist/components/base/avatars_inline/examples/avatars.inline_large.example.js +0 -58
  68. package/dist/components/base/avatars_inline/examples/avatars.inline_links_and_tooltips.example.js +0 -70
  69. package/dist/components/base/avatars_inline/examples/avatars.inline_links_and_tooltips_badge.example.js +0 -70
  70. package/dist/components/base/avatars_inline/examples/index.js +0 -31
  71. package/dist/components/base/form/form_combobox/examples/form_combobox.basic.example.js +0 -50
  72. package/dist/components/base/form/form_combobox/examples/index.js +0 -13
  73. package/dist/components/base/form/input_group_text/examples/index.js +0 -13
  74. package/dist/components/base/form/input_group_text/examples/input_group_text.basic.example.js +0 -38
  75. package/dist/components/base/label/examples/index.js +0 -19
  76. package/dist/components/base/label/examples/label.basic.example.js +0 -38
  77. package/dist/components/base/label/examples/label.scoped.example.js +0 -38
  78. package/dist/components/base/skeleton_loader/examples/ci_header_skeleton.basic.example.js +0 -38
  79. package/dist/components/base/skeleton_loader/examples/default_skeleton.basic.example.js +0 -38
  80. package/dist/components/base/skeleton_loader/examples/default_skeleton_custom_props.basic.example.js +0 -38
  81. package/dist/components/base/skeleton_loader/examples/index.js +0 -37
  82. package/dist/components/base/skeleton_loader/examples/issue_card_skeleton.basic.example.js +0 -38
  83. package/dist/components/base/skeleton_loader/examples/job_log_skeleton.basic.example.js +0 -38
  84. package/dist/components/charts/discrete_scatter/examples/discrete_scatter.basic.example.js +0 -51
  85. package/dist/components/charts/discrete_scatter/examples/index.js +0 -13
  86. package/dist/components/charts/gauge/examples/gauge.basic.example.js +0 -38
  87. package/dist/components/charts/gauge/examples/gauge.no_thresholds.example.js +0 -38
  88. package/dist/components/charts/gauge/examples/gauge.no_value.example.js +0 -38
  89. package/dist/components/charts/gauge/examples/gauge.with_text.example.js +0 -38
  90. package/dist/components/charts/gauge/examples/index.js +0 -31
  91. package/dist/components/charts/stacked_column/examples/index.js +0 -13
  92. package/dist/components/charts/stacked_column/examples/stacked_column.basic.example.js +0 -46
  93. package/dist/components/charts/tooltip/examples/chart_tooltip.basic.example.js +0 -54
  94. package/dist/components/charts/tooltip/examples/index.js +0 -13
  95. package/dist/components/utilities/intersperse/examples/index.js +0 -31
  96. package/dist/components/utilities/intersperse/examples/intersperse.custom_last_separator.example.js +0 -38
  97. package/dist/components/utilities/intersperse/examples/intersperse.custom_last_separator_two_items.example.js +0 -38
  98. package/dist/components/utilities/intersperse/examples/intersperse.custom_separator.example.js +0 -38
  99. package/dist/components/utilities/intersperse/examples/intersperse.default.example.js +0 -38
  100. package/src/components/base/avatar_labeled/examples/avatar.labeled.example.vue +0 -8
  101. package/src/components/base/avatar_labeled/examples/avatar.labeled_badges.example.vue +0 -17
  102. package/src/components/base/avatar_labeled/examples/avatar.labeled_links.example.vue +0 -10
  103. package/src/components/base/avatar_labeled/examples/avatar.labeled_tooltip.example.vue +0 -10
  104. package/src/components/base/avatar_labeled/examples/index.js +0 -36
  105. package/src/components/base/avatars_inline/examples/avatars.inline.example.vue +0 -18
  106. package/src/components/base/avatars_inline/examples/avatars.inline_large.example.vue +0 -18
  107. package/src/components/base/avatars_inline/examples/avatars.inline_links_and_tooltips.example.vue +0 -24
  108. package/src/components/base/avatars_inline/examples/avatars.inline_links_and_tooltips_badge.example.vue +0 -31
  109. package/src/components/base/avatars_inline/examples/index.js +0 -36
  110. package/src/components/base/form/form_combobox/examples/form_combobox.basic.example.vue +0 -31
  111. package/src/components/base/form/form_combobox/examples/index.js +0 -15
  112. package/src/components/base/form/input_group_text/examples/index.js +0 -15
  113. package/src/components/base/form/input_group_text/examples/input_group_text.basic.example.vue +0 -3
  114. package/src/components/base/label/examples/index.js +0 -22
  115. package/src/components/base/label/examples/label.basic.example.vue +0 -3
  116. package/src/components/base/label/examples/label.scoped.example.vue +0 -3
  117. package/src/components/base/skeleton_loader/examples/ci_header_skeleton.basic.example.vue +0 -10
  118. package/src/components/base/skeleton_loader/examples/default_skeleton.basic.example.vue +0 -3
  119. package/src/components/base/skeleton_loader/examples/default_skeleton_custom_props.basic.example.vue +0 -9
  120. package/src/components/base/skeleton_loader/examples/index.js +0 -44
  121. package/src/components/base/skeleton_loader/examples/issue_card_skeleton.basic.example.vue +0 -26
  122. package/src/components/base/skeleton_loader/examples/job_log_skeleton.basic.example.vue +0 -13
  123. package/src/components/charts/discrete_scatter/discrete_scatter.md +0 -1
  124. package/src/components/charts/discrete_scatter/examples/discrete_scatter.basic.example.vue +0 -31
  125. package/src/components/charts/discrete_scatter/examples/index.js +0 -15
  126. package/src/components/charts/gauge/examples/gauge.basic.example.vue +0 -5
  127. package/src/components/charts/gauge/examples/gauge.no_thresholds.example.vue +0 -5
  128. package/src/components/charts/gauge/examples/gauge.no_value.example.vue +0 -5
  129. package/src/components/charts/gauge/examples/gauge.with_text.example.vue +0 -12
  130. package/src/components/charts/gauge/examples/index.js +0 -36
  131. package/src/components/charts/stacked_column/examples/index.js +0 -15
  132. package/src/components/charts/stacked_column/examples/stacked_column.basic.example.vue +0 -18
  133. package/src/components/charts/tooltip/examples/chart_tooltip.basic.example.vue +0 -32
  134. package/src/components/charts/tooltip/examples/index.js +0 -15
  135. package/src/components/utilities/intersperse/examples/index.js +0 -36
  136. package/src/components/utilities/intersperse/examples/intersperse.custom_last_separator.example.vue +0 -7
  137. package/src/components/utilities/intersperse/examples/intersperse.custom_last_separator_two_items.example.vue +0 -6
  138. package/src/components/utilities/intersperse/examples/intersperse.custom_separator.example.vue +0 -7
  139. package/src/components/utilities/intersperse/examples/intersperse.default.example.vue +0 -7
package/CHANGELOG.md CHANGED
@@ -1,3 +1,31 @@
1
+ # [32.48.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v32.47.0...v32.48.0) (2021-12-13)
2
+
3
+
4
+ ### Features
5
+
6
+ * **GlAvatarsInline:** Migrate storybook story ([0720510](https://gitlab.com/gitlab-org/gitlab-ui/commit/07205105cb98e8493cfe3f8b70191707175ca8a9))
7
+
8
+ # [32.47.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v32.46.0...v32.47.0) (2021-12-13)
9
+
10
+
11
+ ### Features
12
+
13
+ * **GlInputGroupText:** Migrate storybook story ([3fb2328](https://gitlab.com/gitlab-org/gitlab-ui/commit/3fb2328829b002480149bf5654c6026ff26fd670))
14
+
15
+ # [32.46.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v32.45.1...v32.46.0) (2021-12-13)
16
+
17
+
18
+ ### Features
19
+
20
+ * **GlFormGroup:** Add optional prop to form_group ([25f8f64](https://gitlab.com/gitlab-org/gitlab-ui/commit/25f8f647261d1b3a8572602e84b1978541b1406f))
21
+
22
+ ## [32.45.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v32.45.0...v32.45.1) (2021-12-10)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * Guard against nonexistent localStorage ([248f7b7](https://gitlab.com/gitlab-org/gitlab-ui/commit/248f7b7c662a8011c27c05dc14a6aaca4d752e33))
28
+
1
29
  # [32.45.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v32.44.0...v32.45.0) (2021-12-10)
2
30
 
3
31
 
package/config.js CHANGED
@@ -11,10 +11,22 @@ const tooltipGlobalConfig = {
11
11
  delay: tooltipDelay,
12
12
  };
13
13
 
14
- const glTooltipDelay = localStorage.getItem('gl-tooltip-delay');
14
+ /**
15
+ * Guard against nonexistent localStorage,
16
+ * or corrupted localStorage
17
+ *
18
+ * localStorage access is not possible in certain environments like
19
+ * - in iframe usage in Chrome if embedded on another domain
20
+ * - tests / node
21
+ */
22
+ try {
23
+ const glTooltipDelay = localStorage.getItem('gl-tooltip-delay');
15
24
 
16
- if (glTooltipDelay) {
17
- tooltipGlobalConfig.delay = JSON.parse(glTooltipDelay);
25
+ if (glTooltipDelay) {
26
+ tooltipGlobalConfig.delay = JSON.parse(glTooltipDelay);
27
+ }
28
+ } catch (e) {
29
+ // localStorage doesn't exist (or the value is not properly formatted)
18
30
  }
19
31
 
20
32
  const setConfigs = () => {
@@ -1,15 +1,8 @@
1
- import examples from './examples';
2
-
3
- var description = "# Avatar labeled\n\n<!-- STORY -->\n## Usage\n\nAvatars may also be adjacent to a text alternative, such as a user or project name. In these cases,\na null `alt` text should be used so that they can be ignored by assistive technologies.\n\nUse the `avatar-labeled` component in those scenarios. It will set a null `alt` text by default.\nIt allows to display a `label` and/or a `sub-label` next to the avatar image. It accepts the same\nproperties as the avatar component to modify the avatar’s shape and size.\n\n## Using the component\n\n~~~js\n<gl-avatar-labeled\n :shape=\"shape\"\n :size=\"size\"\n :src=\"src\"\n :label=\"label\"\n :sub-label=\"subLabel\"\n/>\n~~~\n";
1
+ var description = "## Usage\n\nAvatars may also be adjacent to a text alternative, such as a user or project name. In these cases,\na null `alt` text should be used so that they can be ignored by assistive technologies.\n\nUse the `avatar-labeled` component in those scenarios. It will set a null `alt` text by default.\nIt allows to display a `label` and/or a `sub-label` next to the avatar image. It accepts the same\nproperties as the avatar component to modify the avatar’s shape and size.\n\n## Using the component\n\n```js\n<gl-avatar-labeled\n :shape=\"shape\"\n :size=\"size\"\n :src=\"src\"\n :label=\"label\"\n :sub-label=\"subLabel\"\n/>\n```\n";
4
2
 
5
3
  var avatar_labeled_documentation = {
6
4
  followsDesignSystem: true,
7
- description,
8
- examples,
9
- slots: [{
10
- name: 'meta',
11
- description: 'Meta data to add to the avatar. Generally used for badges or user status emoji.'
12
- }]
5
+ description
13
6
  };
14
7
 
15
8
  export default avatar_labeled_documentation;
@@ -1,6 +1,4 @@
1
- import examples from './examples';
2
-
3
- var avatars_inline = "## Avatars inline\n\nUse `<avatars-inline />` to display multiple avatars organized in a single row.\n\n### Basic usage\n\nThe `avatars` property accepts an array of objects that contains the avatar properties. By default,\n`<avatars-inline />` expects each object contained in the array to have the same shape as the\nproperties of the `<avatar />` component. You can customize the display of each avatar by\noverriding the default slot:\n\n```html\n<gl-avatars-inline :avatars=\"avatars\">\n <template #avatar=\"{ avatar }\">\n <gl-avatar-link v-gl-tooltip target=\"blank\" :href=\"avatar.href\" :title=\"avatar.tooltip\">\n <gl-avatar :src=\"avatar.src\" :size=\"32\" />\n </gl-avatar-link>\n </template>\n</gl-avatars-inline>\n```\n\nIn the example above, the avatars displayed inside `<avatars-inline />` are links pointing to a URL\nstored in each avatar object. Each avatar also displays a tooltip. If you override\n`<inline-avatars />` default display, you can pass an array of objects with any desired shape to\nthe `avatars` property.\n\n### Collapsing\n\nWhen the `collapse` property value is `true` and the `maxVisible` property value is a number less\nthan the length of the `avatars` property array, `<avatars-inline>` will hide the overflown avatars\nand display a badge instead.\n\n### Supported sizes\n\n`<avatars-inline>` only supports avatars with `24` or `32` size.\n";
1
+ var avatars_inline = "Use `<avatars-inline />` to display multiple avatars organized in a single row.\n\n### Basic usage\n\nThe `avatars` property accepts an array of objects that contains the avatar properties. By default,\n`<avatars-inline />` expects each object contained in the array to have the same shape as the\nproperties of the `<avatar />` component. You can customize the display of each avatar by\noverriding the default slot:\n\n```html\n<gl-avatars-inline :avatars=\"avatars\">\n <template #avatar=\"{ avatar }\">\n <gl-avatar-link v-gl-tooltip target=\"blank\" :href=\"avatar.href\" :title=\"avatar.tooltip\">\n <gl-avatar :src=\"avatar.src\" :size=\"32\" />\n </gl-avatar-link>\n </template>\n</gl-avatars-inline>\n```\n\nIn the example above, the avatars displayed inside `<avatars-inline />` are links pointing to a URL\nstored in each avatar object. Each avatar also displays a tooltip. If you override\n`<inline-avatars />` default display, you can pass an array of objects with any desired shape to\nthe `avatars` property.\n\n### Collapsing\n\nWhen the `collapse` property value is `true` and the `maxVisible` property value is a number less\nthan the length of the `avatars` property array, `<avatars-inline>` will hide the overflown avatars\nand display a badge instead.\n\n### Supported sizes\n\n`<avatars-inline>` only supports avatars with `24` or `32` size.\n";
4
2
 
5
3
  var description = /*#__PURE__*/Object.freeze({
6
4
  __proto__: null,
@@ -9,8 +7,7 @@ var description = /*#__PURE__*/Object.freeze({
9
7
 
10
8
  var avatars_inline_documentation = {
11
9
  followsDesignSystem: true,
12
- description,
13
- examples
10
+ description
14
11
  };
15
12
 
16
13
  export default avatars_inline_documentation;
@@ -1,6 +1,4 @@
1
- import examples from './examples';
2
-
3
- var form_combobox = "# GlFormCombobox\n\nUse this component to add a [`FormInput`](/?path=/story/base-form-form-input--default) component\nwith synchronous autocomplete dropdown. It behaves as follows:\n\n- Typing matches tokens; dropdown disappears when there is no match \n- Up and down arrows navigate the dropdown \n- Enter selects keyboard-highlighted item; clicking overrides this \n- Esc closes dropdown when it is open, clears field when it is not \n- Browser/native autocomplete dropdown hidden when ours is open, shows when it is not \n- Tab selects current entered text and moves to next field \n\nThis behavior based on\n[this w3c pattern](https://www.w3.org/TR/wai-aria-practices/examples/combobox/aria1.1pattern/listbox-combo.html)\nand [this accessible combobox example](https://alligator.io/vuejs/vue-a11y-autocomplete/).\n\n## Usage\n\nThe combobox accepts an array of string tokens, a `v-model`, and label text. Internally, it generates\nunique element IDs so multiple can be used on one page without clashing.\n\nOn selection it sets the input value to the selected string and emits a `value-selected` event for\nconsumption by parent components.\n\n```html\n<gl-form-combobox\n v-model=\"inputVal\"\n :token-list=\"tokens\"\n label-text=\"Combobox Label\"\n/>\n```\n\nIt does not have a loading state nor does it accept tokens other than strings. It allows for one\nselected value.\n\n### What if I need to load the options asynchronously?\n\nYou may want to look at [`GlSearchBoxByType`] or [`GlSearchBoxByClick`].\n\n### What if I need multiple options?\n\nThe [`GlTokenSelector`] may be what you need. Alternately, [`GlFilteredSearch`] will let you search\nand include tokens.\n\n## Edge cases\n\nThe algorithm to match tokens with the input is very naive. If you need to use the component with a\nvery large list of matches, you may want to update the implementation or use one of the search\ninputs, like [`GlSearchBoxByType`], [`GlSearchBoxByClick`], or [`GlFilteredSearch`].\n\n[`GlSearchBoxByType`]: https://gitlab-org.gitlab.io/gitlab-ui/?path=/story/base-search-box-by-type--default\n[`GlSearchBoxByClick`]: https://gitlab-org.gitlab.io/gitlab-ui/?path=/story/base-search-box-by-click--default\n[`GlTokenSelector`]: https://gitlab-org.gitlab.io/gitlab-ui/?path=/story/base-token-selector--default\n[`GlFilteredSearch`]: https://gitlab-org.gitlab.io/gitlab-ui/?path=/story/base-filtered-search--default\n";
1
+ var form_combobox = "Use this component to add a [`FormInput`](/?path=/story/base-form-form-input--default) component\nwith synchronous autocomplete dropdown. It behaves as follows:\n\n- Typing matches tokens; dropdown disappears when there is no match \n- Up and down arrows navigate the dropdown \n- Enter selects keyboard-highlighted item; clicking overrides this \n- Esc closes dropdown when it is open, clears field when it is not \n- Browser/native autocomplete dropdown hidden when ours is open, shows when it is not \n- Tab selects current entered text and moves to next field \n\nThis behavior based on\n[this w3c pattern](https://www.w3.org/TR/wai-aria-practices/examples/combobox/aria1.1pattern/listbox-combo.html)\nand [this accessible combobox example](https://alligator.io/vuejs/vue-a11y-autocomplete/).\n\n## Usage\n\nThe combobox accepts an array of string tokens, a `v-model`, and label text. Internally, it generates\nunique element IDs so multiple can be used on one page without clashing.\n\nOn selection it sets the input value to the selected string and emits a `value-selected` event for\nconsumption by parent components.\n\n```html\n<gl-form-combobox\n v-model=\"inputVal\"\n :token-list=\"tokens\"\n label-text=\"Combobox Label\"\n/>\n```\n\nIt does not have a loading state nor does it accept tokens other than strings. It allows for one\nselected value.\n\n### What if I need to load the options asynchronously?\n\nYou may want to look at [`GlSearchBoxByType`] or [`GlSearchBoxByClick`].\n\n### What if I need multiple options?\n\nThe [`GlTokenSelector`] may be what you need. Alternately, [`GlFilteredSearch`] will let you search\nand include tokens.\n\n## Edge cases\n\nThe algorithm to match tokens with the input is very naive. If you need to use the component with a\nvery large list of matches, you may want to update the implementation or use one of the search\ninputs, like [`GlSearchBoxByType`], [`GlSearchBoxByClick`], or [`GlFilteredSearch`].\n\n[`GlSearchBoxByType`]: https://gitlab-org.gitlab.io/gitlab-ui/?path=/story/base-search-box-by-type--default\n[`GlSearchBoxByClick`]: https://gitlab-org.gitlab.io/gitlab-ui/?path=/story/base-search-box-by-click--default\n[`GlTokenSelector`]: https://gitlab-org.gitlab.io/gitlab-ui/?path=/story/base-token-selector--default\n[`GlFilteredSearch`]: https://gitlab-org.gitlab.io/gitlab-ui/?path=/story/base-filtered-search--default\n";
4
2
 
5
3
  var description = /*#__PURE__*/Object.freeze({
6
4
  __proto__: null,
@@ -9,12 +7,7 @@ var description = /*#__PURE__*/Object.freeze({
9
7
 
10
8
  var form_combobox_documentation = {
11
9
  followsDesignSystem: true,
12
- description,
13
- examples,
14
- events: [{
15
- event: 'value-selected',
16
- description: 'Emitted when a value is selected.'
17
- }]
10
+ description
18
11
  };
19
12
 
20
13
  export default form_combobox_documentation;
@@ -141,6 +141,11 @@ var script = {
141
141
  selectToken(value) {
142
142
  this.$emit('input', value);
143
143
  this.closeSuggestions();
144
+ /**
145
+ * Emitted when a value is selected.
146
+ * @event value-selected
147
+ */
148
+
144
149
  this.$emit('value-selected', value);
145
150
  }
146
151
 
@@ -21,6 +21,16 @@ var script = {
21
21
  type: String,
22
22
  required: false,
23
23
  default: ''
24
+ },
25
+ optional: {
26
+ type: Boolean,
27
+ required: false,
28
+ default: false
29
+ },
30
+ optionalText: {
31
+ type: String,
32
+ required: false,
33
+ default: '(optional)'
24
34
  }
25
35
  },
26
36
  computed: {
@@ -58,7 +68,7 @@ var script = {
58
68
  const __vue_script__ = script;
59
69
 
60
70
  /* template */
61
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-form-group',_vm._b({staticClass:"gl-form-group",attrs:{"label-class":_vm.actualLabelClass},scopedSlots:_vm._u([(_vm.hasLabelDescription)?{key:"label",fn:function(){return [_vm._t("label",[_vm._v("\n "+_vm._s(_vm.$attrs.label)+"\n ")]),_vm._v(" "),_c('gl-form-text',{attrs:{"data-testid":"label-description"}},[_vm._t("label-description",[_vm._v(_vm._s(_vm.labelDescription))])],2)]},proxy:true}:null,_vm._l((Object.keys(_vm.$slots)),function(slot){return {key:slot,fn:function(){return [_vm._t(slot)]},proxy:true}})],null,true)},'b-form-group',_vm.$attrs,false))};
71
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-form-group',_vm._b({staticClass:"gl-form-group",attrs:{"label-class":_vm.actualLabelClass},scopedSlots:_vm._u([{key:"label",fn:function(){return [_vm._t("label",[_vm._v("\n "+_vm._s(_vm.$attrs.label)+"\n "),(_vm.optional)?_c('span',{staticClass:"optional-label",attrs:{"data-testid":"optional-label"}},[_vm._v(_vm._s(_vm.optionalText))]):_vm._e()]),_vm._v(" "),(_vm.hasLabelDescription)?_c('gl-form-text',{attrs:{"data-testid":"label-description"}},[_vm._t("label-description",[_vm._v(_vm._s(_vm.labelDescription))])],2):_vm._e()]},proxy:true},_vm._l((Object.keys(_vm.$slots)),function(slot){return {key:slot,fn:function(){return [_vm._t(slot)]},proxy:true}})],null,true)},'b-form-group',_vm.$attrs,false))};
62
72
  var __vue_staticRenderFns__ = [];
63
73
 
64
74
  /* style */
@@ -1,5 +1,3 @@
1
- import examples from './examples';
2
-
3
1
  var input_group_text = "### Under the hood\n\nUses [`BInputGroupText`](https://bootstrap-vue.org/docs/components/input-group#comp-ref-b-input-group-text)\nfrom Vue Boostrap\n";
4
2
 
5
3
  var description = /*#__PURE__*/Object.freeze({
@@ -8,9 +6,7 @@ var description = /*#__PURE__*/Object.freeze({
8
6
  });
9
7
 
10
8
  var input_group_text_documentation = {
11
- description,
12
- examples,
13
- propsInfo: {}
9
+ description
14
10
  };
15
11
 
16
12
  export default input_group_text_documentation;
@@ -1,15 +1,8 @@
1
- import examples from './examples';
1
+ import description from './label';
2
2
 
3
3
  var label_documentation = {
4
4
  followsDesignSystem: true,
5
- examples,
6
- events: [{
7
- event: 'click',
8
- description: 'Emitted when label is clicked'
9
- }, {
10
- event: 'close',
11
- description: 'Emitted when x is clicked'
12
- }]
5
+ description
13
6
  };
14
7
 
15
8
  export default label_documentation;
@@ -101,6 +101,28 @@ var script = {
101
101
  this.splitScopedLabelIndex = this.title.lastIndexOf('::');
102
102
  }
103
103
 
104
+ },
105
+ methods: {
106
+ onClick(e) {
107
+ /**
108
+ * Emitted when label is clicked
109
+ *
110
+ * @event click
111
+ * @type {object}
112
+ */
113
+ this.$emit('click', e);
114
+ },
115
+
116
+ onClose(e) {
117
+ /**
118
+ * Emitted when x is clicked
119
+ *
120
+ * @event close
121
+ * @type {object}
122
+ */
123
+ this.$emit('close', e);
124
+ }
125
+
104
126
  }
105
127
  };
106
128
 
@@ -108,7 +130,7 @@ var script = {
108
130
  const __vue_script__ = script;
109
131
 
110
132
  /* template */
111
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',_vm._b({ref:"labelTitle",staticClass:"gl-label",class:_vm.cssClasses,style:(_vm.cssVariables),on:{"click":function($event){return _vm.$emit('click', $event)}}},'span',_vm.$attrs,false),[_c('gl-link',{staticClass:"gl-label-link",attrs:{"href":_vm.target}},[_c('span',{staticClass:"gl-label-text"},[_vm._v("\n "+_vm._s(_vm.scopedKey)+"\n ")]),_vm._v(" "),(_vm.scoped && _vm.scopedValue)?_c('span',{staticClass:"gl-label-text-scoped"},[_vm._v("\n "+_vm._s(_vm.scopedValue)+"\n ")]):_vm._e()]),_vm._v(" "),(_vm.showCloseButton)?_c('close-button',{staticClass:"gl-label-close gl-p-0!",attrs:{"label":"Remove label","variant":"reset","disabled":_vm.disabled},on:{"click":function($event){return _vm.$emit('close', $event)}}}):_vm._e(),_vm._v(" "),(_vm.description)?_c('gl-tooltip',{attrs:{"target":function () { return _vm.$refs.labelTitle; },"placement":_vm.tooltipPlacement,"boundary":"viewport"}},[(_vm.scoped)?_c('span',{staticClass:"gl-label-tooltip-title"},[_vm._v("Scoped label")]):_vm._e(),_vm._v("\n "+_vm._s(_vm.description)+"\n ")]):_vm._e()],1)};
133
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',_vm._b({ref:"labelTitle",staticClass:"gl-label",class:_vm.cssClasses,style:(_vm.cssVariables),on:{"click":_vm.onClick}},'span',_vm.$attrs,false),[_c('gl-link',{staticClass:"gl-label-link",attrs:{"href":_vm.target}},[_c('span',{staticClass:"gl-label-text"},[_vm._v("\n "+_vm._s(_vm.scopedKey)+"\n ")]),_vm._v(" "),(_vm.scoped && _vm.scopedValue)?_c('span',{staticClass:"gl-label-text-scoped"},[_vm._v("\n "+_vm._s(_vm.scopedValue)+"\n ")]):_vm._e()]),_vm._v(" "),(_vm.showCloseButton)?_c('close-button',{staticClass:"gl-label-close gl-p-0!",attrs:{"label":"Remove label","variant":"reset","disabled":_vm.disabled},on:{"click":_vm.onClose}}):_vm._e(),_vm._v(" "),(_vm.description)?_c('gl-tooltip',{attrs:{"target":function () { return _vm.$refs.labelTitle; },"placement":_vm.tooltipPlacement,"boundary":"viewport"}},[(_vm.scoped)?_c('span',{staticClass:"gl-label-tooltip-title"},[_vm._v("Scoped label")]):_vm._e(),_vm._v("\n "+_vm._s(_vm.description)+"\n ")]):_vm._e()],1)};
112
134
  var __vue_staticRenderFns__ = [];
113
135
 
114
136
  /* style */
@@ -1,6 +1,4 @@
1
- import examples from './examples';
2
-
3
- var skeleton_loader = "## Usage\n\nSkeleton loaders are to be used when pages or sections can be progressively populated with content,\nsuch as text and images, as they become available. Generally speaking the first batch of content\nwill be the lightest to load and is followed by secondary and tertiary content batches. Each loading\nstep will add in more detail to the page until no skeleton loaders are present anymore. Content\nshould replace skeleton objects immediately when the data is available.\n\nThe skeleton loader component accepts shapes which in return will create a skeleton state with a\nloading animation. Any skeleton state components should be created with\n`<gl-skeleton-loader></gl-skeleton-loader>`. If no shape is passed via the slot the default skeleton\nwill be used. See \"Default\" and \"Default With Custom Props\" examples.\n\n## Progressive Loading\n\nDetermine if progressive loading is available, if it is break apart the skeleton to load data as it\nbecomes readily available. If progessive loading is not available, replace the entire skeleton when\nthe data is available.\n\n## Under the hood\n\nSkeleton Loader is a port of [vue-content-loader](https://github.com/egoist/vue-content-loader).\nSome changes have been made to the code to better suit our codebase, such as removing props and\nrefactoring into a SFC. Please take a look at their documentation and a useful [UI tool](http://danilowoz.com/create-vue-content-loader/)\nfor seeing the code output for `svg` shapes.\n";
1
+ var skeleton_loader = "Skeleton loaders are to be used when pages or sections can be progressively populated with content,\nsuch as text and images, as they become available. Generally speaking the first batch of content\nwill be the lightest to load and is followed by secondary and tertiary content batches. Each loading\nstep will add in more detail to the page until no skeleton loaders are present anymore. Content\nshould replace skeleton objects immediately when the data is available.\n\nThe skeleton loader component accepts shapes which in return will create a skeleton state with a\nloading animation. Any skeleton state components should be created with\n`<gl-skeleton-loader></gl-skeleton-loader>`. If no shape is passed via the slot the default skeleton\nwill be used. See \"Default\" and \"Default With Custom Props\" examples.\n\n## Progressive Loading\n\nDetermine if progressive loading is available, if it is break apart the skeleton to load data as it\nbecomes readily available. If progessive loading is not available, replace the entire skeleton when\nthe data is available.\n\n## Under the hood\n\nSkeleton Loader is a port of [vue-content-loader](https://github.com/egoist/vue-content-loader).\nSome changes have been made to the code to better suit our codebase, such as removing props and\nrefactoring into a SFC. Please take a look at their documentation and a useful [UI tool](http://danilowoz.com/create-vue-content-loader/)\nfor seeing the code output for `svg` shapes.\n";
4
2
 
5
3
  var description = /*#__PURE__*/Object.freeze({
6
4
  __proto__: null,
@@ -9,31 +7,7 @@ var description = /*#__PURE__*/Object.freeze({
9
7
 
10
8
  var skeleton_loader_documentation = {
11
9
  followsDesignSystem: true,
12
- description,
13
- examples,
14
- propsInfo: {
15
- width: {
16
- additionalInfo: 'It will be set in the viewbox attr in the <svg />. Defaults to 400 when skeleton is passed via the slot. Defaults to 235 when default skeleton is used'
17
- },
18
- height: {
19
- additionalInfo: 'It will be set in the viewbox attr in the <svg />. Defaults to 130 when skeleton is passed via the slot. Defaults to the combined height of the lines when default skeleton is used'
20
- },
21
- uniqueKey: {
22
- additionalInfo: 'Defaults to unique id'
23
- },
24
- preserveAspectRatio: {
25
- additionalInfo: 'Aspect ratio option of <svg/>'
26
- },
27
- baseUrl: {
28
- additionalInfo: `Required if you're using <base url="/" /> in your <head />. Defaults to an empty string. This prop is common used as: <gl-skeleton-loader :base-url="$route.fullPath" /> which will fill the SVG attribute with the relative path.`
29
- },
30
- lines: {
31
- additionalInfo: 'Number of lines to show when using the default skeleton'
32
- },
33
- equalWidthLines: {
34
- additionalInfo: 'If the default skeleton lines should all be the same width'
35
- }
36
- }
10
+ description
37
11
  };
38
12
 
39
13
  export default skeleton_loader_documentation;
@@ -12,36 +12,66 @@ var script = {
12
12
  name: 'GlSkeletonLoader',
13
13
  functional: true,
14
14
  props: {
15
+ /**
16
+ * It will be set in the viewbox attr in the <svg />.
17
+ * Defaults to 400 when skeleton is passed via the slot. Defaults to 235 when default skeleton is used
18
+ */
15
19
  width: {
16
20
  type: Number,
17
21
  default: null,
18
22
  required: false
19
23
  },
24
+
25
+ /**
26
+ * It will be set in the viewbox attr in the <svg />. Defaults to 130 when skeleton is passed via the slot.
27
+ * Defaults to the combined height of the lines when default skeleton is used
28
+ */
20
29
  height: {
21
30
  type: Number,
22
31
  default: null,
23
32
  required: false
24
33
  },
34
+
35
+ /**
36
+ * Aspect ratio option of <svg/>
37
+ */
25
38
  preserveAspectRatio: {
26
39
  type: String,
27
40
  default: 'xMidYMid meet',
28
41
  required: false
29
42
  },
43
+
44
+ /**
45
+ * Required if you're using <base url="/" /> in your <head />. Defaults to an empty string.
46
+ * This prop is common used as: <gl-skeleton-loader :base-url="$route.fullPath" /> which will fill the SVG attribute with the relative path.
47
+ */
30
48
  baseUrl: {
31
49
  type: String,
32
50
  default: '',
33
51
  required: false
34
52
  },
53
+
54
+ /**
55
+ * Defaults to unique id
56
+ */
35
57
  uniqueKey: {
36
58
  type: String,
37
59
  default: () => uid(),
38
60
  required: false
39
61
  },
62
+
63
+ /**
64
+ * Number of lines to show when using the default skeleton
65
+ */
40
66
  lines: {
41
67
  type: Number,
42
68
  default: 3,
43
69
  required: false
44
70
  },
71
+
72
+ /**
73
+ * If the default skeleton lines should all be the same width
74
+ */
45
75
  equalWidthLines: {
46
76
  type: Boolean,
47
77
  default: false,
@@ -1,11 +1,5 @@
1
- import examples from './examples';
2
-
3
- var description = "### Scatter Chart\n";
4
-
5
1
  var discrete_scatter_documentation = {
6
- followsDesignSystem: true,
7
- description,
8
- examples
2
+ followsDesignSystem: true
9
3
  };
10
4
 
11
5
  export default discrete_scatter_documentation;
@@ -1,6 +1,4 @@
1
- import examples from './examples';
2
-
3
- var gauge = "### Gauge Chart\n\nSome layout problems can be encountered with this component. Specifically, when the gauge chart's\naxis labels or detail text have larger widths, they can overlap with the chart elements.\n\nAlso, when the containing element of the gauge chart has either of a small calculated `width` and\n`height`, its axis width could become bulkier in relation to other chart elements. This is because\nat this time [eCharts only allows for setting the axis line width in absolute units](https://echarts.apache.org/en/option.html#series-gauge.axisLine.lineStyle.width).\n\nThis issue is to be addressed by [https://gitlab.com/gitlab-org/gitlab-ui/-/issues/916](https://gitlab.com/gitlab-org/gitlab-ui/-/issues/916).\n";
1
+ var gauge = "Some layout problems can be encountered with this component. Specifically, when the gauge chart's\naxis labels or detail text have larger widths, they can overlap with the chart elements.\n\nAlso, when the containing element of the gauge chart has either of a small calculated `width` and\n`height`, its axis width could become bulkier in relation to other chart elements. This is because\nat this time [eCharts only allows for setting the axis line width in absolute units](https://echarts.apache.org/en/option.html#series-gauge.axisLine.lineStyle.width).\n\nThis issue is to be addressed by [https://gitlab.com/gitlab-org/gitlab-ui/-/issues/916](https://gitlab.com/gitlab-org/gitlab-ui/-/issues/916).\n";
4
2
 
5
3
  var description = /*#__PURE__*/Object.freeze({
6
4
  __proto__: null,
@@ -8,9 +6,7 @@ var description = /*#__PURE__*/Object.freeze({
8
6
  });
9
7
 
10
8
  var gauge_documentation = {
11
- description,
12
- examples,
13
- propsInfo: {}
9
+ description
14
10
  };
15
11
 
16
12
  export default gauge_documentation;
@@ -1,11 +1,8 @@
1
- import examples from './examples';
2
-
3
- var description = "# Stacked Column Chart\n\nThe `presentation` property allows you to change between a stacked and tiled presentation style. It\nis only setup to accept `stacked` or `tiled` as values, the default value is `tiled`.\n\nThe `stacked` presentation allows to view multiple series of the same stack as a single column,\nwhile `tiled` presents the information in multiple columns for each series of a stack.\n\n`groupBy` is a property that defines how the data is going to be grouped by for each of the series\nthat the `data` property provides. For example if the `data` property has a total of 3 series, with\n7 elements each, `groupBy` could use a 7 element array to show 7 stacked bars or 7 groups of bars\ndepending on the preference set by the `presentation` property.\n";
1
+ var description = "The `presentation` property allows you to change between a stacked and tiled presentation style. It\nis only setup to accept `stacked` or `tiled` as values, the default value is `tiled`.\n\nThe `stacked` presentation allows to view multiple series of the same stack as a single column,\nwhile `tiled` presents the information in multiple columns for each series of a stack.\n\n`groupBy` is a property that defines how the data is going to be grouped by for each of the series\nthat the `data` property provides. For example if the `data` property has a total of 3 series, with\n7 elements each, `groupBy` could use a 7 element array to show 7 stacked bars or 7 groups of bars\ndepending on the preference set by the `presentation` property.\n";
4
2
 
5
3
  var stacked_column_documentation = {
6
4
  followsDesignSystem: false,
7
- description,
8
- examples
5
+ description
9
6
  };
10
7
 
11
8
  export default stacked_column_documentation;
@@ -1,12 +1,8 @@
1
- import examples from './examples';
2
-
3
1
  var description = "### ECharts custom tooltip\n\nUses GitLab UI's `popover` component in lieu of echart's tooltip.\n";
4
2
 
5
3
  var tooltip_documentation = {
6
4
  followsDesignSystem: false,
7
- description,
8
- examples,
9
- bootstrapComponent: 'b-popover'
5
+ description
10
6
  };
11
7
 
12
8
  export default tooltip_documentation;
@@ -1,11 +1,8 @@
1
- import examples from './examples';
2
-
3
- var description = "## Intersperse\n\nThe intersperse component separates a list of elements\nby a given character (the default is `, `).\n\nIt takes all direct descendants of its default slot and inserts\nthe given separator between each item:\n\n`item 1, item 2, item 3`\n\nOptionally the character used for separating each item and the last separator can be set\nindependently:\n\n* `separator=\"/\"` renders `item 1/item 2/item 3`\n* `lastSeparator=\" and \"` will render `item 1, item 2, and item 3`\n* `lastSeparator=\" and \"` and given two items will render `item 1 and item 2`\n\n**Note**:\n\nThe component provides an inline context since the result is wrapped in a `span`.\n\nAlso, whitespace elements that are direct children of the default-slot get removed to ensure\nconsistent formatting.\n\n## Usage\n\n### Default\n\n```html\n<gl-intersperse>\n <span>Item 1</span>\n <span>Item 2</span>\n <span>Item 3</span>\n</gl-intersperse>\n```\n\nThis renders to the following HTML:\n\n```html\n<span><span>Item 1</span>, <span>Item 2</span>, <span>Item 3</span></span>\n```\n\n### Custom Separator\n\nA custom separator can be defined via the `separator` prop:\n\n```html\n<gl-intersperse separator=\"/\">\n <span>Item 1</span>\n <span>Item 2</span>\n <span>Item 3</span>\n</gl-intersperse>\n```\n\nThis renders to the following HTML:\n\n```html\n<span><span>Item 1</span>/<span>Item 2</span>/<span>Item 3</span></span>\n```\n\n### Custom Last Separator\n\nA custom last separator can be defined via the `lastSeparator` prop:\n\n```html\n<gl-intersperse last-separator=\" and \">\n <span>Item 1</span>\n <span>Item 2</span>\n <span>Item 3</span>\n</gl-intersperse>\n```\n\nThis renders to the following HTML:\n\n```html\n<span><span>Item 1</span>, <span>Item 2</span>, and <span>Item 3</span></span>\n```\n\nA custom last separator used on two items will only place `lastSeparator` between them:\n\n```html\n<gl-intersperse last-separator=\" and \">\n <span>Item 1</span>\n <span>Item 2</span>\n</gl-intersperse>\n```\n\nThis renders to the following HTML:\n\n```html\n<span><span>Item 1</span> and <span>Item 2</span></span>\n```\n";
1
+ var description = "The intersperse component separates a list of elements\nby a given character (the default is `, `).\n\nIt takes all direct descendants of its default slot and inserts\nthe given separator between each item:\n\n`item 1, item 2, item 3`\n\nOptionally the character used for separating each item and the last separator can be set\nindependently:\n\n* `separator=\"/\"` renders `item 1/item 2/item 3`\n* `lastSeparator=\" and \"` will render `item 1, item 2, and item 3`\n* `lastSeparator=\" and \"` and given two items will render `item 1 and item 2`\n\n**Note**:\n\nThe component provides an inline context since the result is wrapped in a `span`.\n\nAlso, whitespace elements that are direct children of the default-slot get removed to ensure\nconsistent formatting.\n\n## Usage\n\n### Default\n\n```html\n<gl-intersperse>\n <span>Item 1</span>\n <span>Item 2</span>\n <span>Item 3</span>\n</gl-intersperse>\n```\n\nThis renders to the following HTML:\n\n```html\n<span><span>Item 1</span>, <span>Item 2</span>, <span>Item 3</span></span>\n```\n\n### Custom Separator\n\nA custom separator can be defined via the `separator` prop:\n\n```html\n<gl-intersperse separator=\"/\">\n <span>Item 1</span>\n <span>Item 2</span>\n <span>Item 3</span>\n</gl-intersperse>\n```\n\nThis renders to the following HTML:\n\n```html\n<span><span>Item 1</span>/<span>Item 2</span>/<span>Item 3</span></span>\n```\n\n### Custom Last Separator\n\nA custom last separator can be defined via the `lastSeparator` prop:\n\n```html\n<gl-intersperse last-separator=\" and \">\n <span>Item 1</span>\n <span>Item 2</span>\n <span>Item 3</span>\n</gl-intersperse>\n```\n\nThis renders to the following HTML:\n\n```html\n<span><span>Item 1</span>, <span>Item 2</span>, and <span>Item 3</span></span>\n```\n\nA custom last separator used on two items will only place `lastSeparator` between them:\n\n```html\n<gl-intersperse last-separator=\" and \">\n <span>Item 1</span>\n <span>Item 2</span>\n</gl-intersperse>\n```\n\nThis renders to the following HTML:\n\n```html\n<span><span>Item 1</span> and <span>Item 2</span></span>\n```\n";
4
2
 
5
3
  var intersperse_documentation = {
6
4
  followsDesignSystem: false,
7
- description,
8
- examples
5
+ description
9
6
  };
10
7
 
11
8
  export default intersperse_documentation;
package/dist/config.js CHANGED
@@ -9,10 +9,22 @@ const tooltipGlobalConfig = {
9
9
  customClass: 'gl-tooltip',
10
10
  delay: tooltipDelay
11
11
  };
12
- const glTooltipDelay = localStorage.getItem('gl-tooltip-delay');
12
+ /**
13
+ * Guard against nonexistent localStorage,
14
+ * or corrupted localStorage
15
+ *
16
+ * localStorage access is not possible in certain environments like
17
+ * - in iframe usage in Chrome if embedded on another domain
18
+ * - tests / node
19
+ */
13
20
 
14
- if (glTooltipDelay) {
15
- tooltipGlobalConfig.delay = JSON.parse(glTooltipDelay);
21
+ try {
22
+ const glTooltipDelay = localStorage.getItem('gl-tooltip-delay');
23
+
24
+ if (glTooltipDelay) {
25
+ tooltipGlobalConfig.delay = JSON.parse(glTooltipDelay);
26
+ }
27
+ } catch (e) {// localStorage doesn't exist (or the value is not properly formatted)
16
28
  }
17
29
 
18
30
  const setConfigs = () => {