@gitlab/ui 115.9.0 → 115.9.2

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 (93) hide show
  1. package/dist/components/base/avatar_link/avatar_link.js +1 -1
  2. package/dist/components/base/avatars_inline/avatars_inline.js +1 -1
  3. package/dist/index.css +1 -1
  4. package/dist/index.css.map +1 -1
  5. package/dist/tailwind.css +1 -1
  6. package/dist/tailwind.css.map +1 -1
  7. package/dist/tokens/build/js/tokens.dark.js +1 -1
  8. package/dist/tokens/build/js/tokens.js +1 -1
  9. package/dist/tokens/css/tokens.css +1 -1
  10. package/dist/tokens/css/tokens.dark.css +1 -1
  11. package/dist/tokens/figma/contextual.tokens.json +1 -1
  12. package/dist/tokens/js/tokens.dark.js +1 -1
  13. package/dist/tokens/js/tokens.js +1 -1
  14. package/dist/tokens/json/tokens.dark.json +2 -2
  15. package/dist/tokens/json/tokens.json +2 -2
  16. package/dist/tokens/scss/_tokens.dark.scss +1 -1
  17. package/dist/tokens/scss/_tokens.scss +1 -1
  18. package/package.json +10 -10
  19. package/src/components/base/avatar_link/avatar_link.vue +1 -1
  20. package/src/components/base/avatars_inline/avatars_inline.vue +1 -1
  21. package/src/components/base/markdown/markdown_typescale_demo.html +41 -71
  22. package/src/scss/variables.scss +1 -1
  23. package/src/tokens/build/css/tokens.css +1 -1
  24. package/src/tokens/build/css/tokens.dark.css +1 -1
  25. package/src/tokens/build/figma/contextual.tokens.json +1 -1
  26. package/src/tokens/build/js/tokens.dark.js +1 -1
  27. package/src/tokens/build/js/tokens.js +1 -1
  28. package/src/tokens/build/json/tokens.dark.json +2 -2
  29. package/src/tokens/build/json/tokens.json +2 -2
  30. package/src/tokens/build/scss/_tokens.dark.scss +1 -1
  31. package/src/tokens/build/scss/_tokens.scss +1 -1
  32. package/src/tokens/contextual/table.tokens.json +1 -1
  33. package/src/components/base/accordion/accordion.md +0 -3
  34. package/src/components/base/accordion/accordion_item.md +0 -3
  35. package/src/components/base/alert/alert.md +0 -35
  36. package/src/components/base/animated_icon/animated_icon.md +0 -4
  37. package/src/components/base/avatar/avatar.md +0 -1
  38. package/src/components/base/avatar_labeled/avatar_labeled.md +0 -20
  39. package/src/components/base/avatar_link/avatar_link.md +0 -33
  40. package/src/components/base/avatars_inline/avatars_inline.md +0 -38
  41. package/src/components/base/badge/badge.md +0 -30
  42. package/src/components/base/banner/banner.md +0 -35
  43. package/src/components/base/breadcrumb/breadcrumb.md +0 -52
  44. package/src/components/base/broadcast_message/broadcast_message.md +0 -25
  45. package/src/components/base/button/button.md +0 -119
  46. package/src/components/base/button_group/button_group.md +0 -44
  47. package/src/components/base/card/card.md +0 -4
  48. package/src/components/base/collapse/collapse.md +0 -64
  49. package/src/components/base/datepicker/datepicker.md +0 -8
  50. package/src/components/base/daterange_picker/daterange_picker.md +0 -32
  51. package/src/components/base/drawer/drawer.md +0 -17
  52. package/src/components/base/dropdown/dropdown.md +0 -72
  53. package/src/components/base/dropdown/dropdown_item.md +0 -2
  54. package/src/components/base/dropdown/dropdown_section_header.md +0 -7
  55. package/src/components/base/dropdown/dropdown_text.md +0 -7
  56. package/src/components/base/filtered_search/filtered_search.md +0 -76
  57. package/src/components/base/filtered_search/filtered_search_suggestion.md +0 -15
  58. package/src/components/base/filtered_search/filtered_search_suggestion_list.md +0 -13
  59. package/src/components/base/filtered_search/filtered_search_term.md +0 -7
  60. package/src/components/base/filtered_search/filtered_search_token.md +0 -23
  61. package/src/components/base/filtered_search/filtered_search_token_segment.md +0 -14
  62. package/src/components/base/form/form_checkbox/form_checkbox.md +0 -6
  63. package/src/components/base/form/form_input/form_input.md +0 -306
  64. package/src/components/base/form/form_radio/form_radio.md +0 -23
  65. package/src/components/base/form/form_radio_group/form_radio_group.md +0 -63
  66. package/src/components/base/form/form_select/form_select.md +0 -1
  67. package/src/components/base/form/form_textarea/form_textarea.md +0 -3
  68. package/src/components/base/icon/icon.md +0 -27
  69. package/src/components/base/infinite_scroll/infinite_scroll.md +0 -104
  70. package/src/components/base/keyset_pagination/keyset_pagination.md +0 -49
  71. package/src/components/base/label/label.md +0 -15
  72. package/src/components/base/link/link.md +0 -187
  73. package/src/components/base/loading_icon/loading_icon.md +0 -3
  74. package/src/components/base/modal/modal.md +0 -30
  75. package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown.md +0 -184
  76. package/src/components/base/new_dropdowns/listbox/listbox.md +0 -195
  77. package/src/components/base/pagination/pagination.md +0 -45
  78. package/src/components/base/path/path.md +0 -41
  79. package/src/components/base/progress_bar/progress_bar.md +0 -25
  80. package/src/components/base/search_box_by_click/search_box_by_click.md +0 -1
  81. package/src/components/base/search_box_by_type/search_box_by_type.md +0 -1
  82. package/src/components/base/segmented_control/segmented_control.md +0 -26
  83. package/src/components/base/skeleton_loader/skeleton_loader.md +0 -70
  84. package/src/components/base/sorting/sorting.md +0 -80
  85. package/src/components/base/table/table.md +0 -71
  86. package/src/components/base/table_lite/table_lite.md +0 -68
  87. package/src/components/base/tabs/tabs/tabs.md +0 -80
  88. package/src/components/base/toast/toast.md +0 -48
  89. package/src/components/base/toggle/toggle.md +0 -4
  90. package/src/components/base/token/token.md +0 -12
  91. package/src/components/base/tooltip/tooltip.md +0 -52
  92. package/src/scss/typescale/typeface_demo.html +0 -70
  93. package/src/scss/typescale/typescale.md +0 -81
@@ -21052,7 +21052,7 @@
21052
21052
  "color": {
21053
21053
  "hover": {
21054
21054
  "key": "{table.row.background.color.hover}",
21055
- "$value": "#fbfafd",
21055
+ "$value": "#e9f3fc",
21056
21056
  "$type": "color",
21057
21057
  "$description": "Used for the background of a table row in hover state.",
21058
21058
  "$extensions": {
@@ -21064,7 +21064,7 @@
21064
21064
  "filePath": "src/tokens/contextual/table.tokens.json",
21065
21065
  "isSource": true,
21066
21066
  "original": {
21067
- "$value": "{background.color.subtle}",
21067
+ "$value": "{highlight.target.background.color}",
21068
21068
  "$type": "color",
21069
21069
  "$description": "Used for the background of a table row in hover state.",
21070
21070
  "$extensions": {
@@ -950,7 +950,7 @@ $gl-progress-bar-indicator-color-default: $gl-status-info-icon-color; // Used fo
950
950
  $gl-progress-bar-indicator-color-success: $gl-status-success-icon-color; // Used for the indicator color for the success progress-bar variant.
951
951
  $gl-progress-bar-indicator-color-warning: $gl-status-warning-icon-color; // Used for the indicator color for the warning progress-bar variant.
952
952
  $gl-progress-bar-indicator-color-danger: $gl-status-danger-icon-color; // Used for the indicator color for the danger progress-bar variant.
953
- $gl-table-row-background-color-hover: $gl-background-color-subtle; // Used for the background of a table row in hover state.
953
+ $gl-table-row-background-color-hover: $gl-highlight-target-background-color; // Used for the background of a table row in hover state.
954
954
  $gl-table-sorting-icon-color: $gl-text-color-heading; // Used for the color of the sorting icons in the column headers.
955
955
  $gl-toggle-switch-icon-color-unchecked-default: $gl-action-strong-neutral-background-color-default; // Used for the icon color of an unchecked toggle switch in the default state.
956
956
  $gl-toggle-switch-icon-color-unchecked-hover: $gl-action-strong-neutral-background-color-hover; // Used for the icon color of an unchecked toggle switch in the hover state.
@@ -950,7 +950,7 @@ $gl-progress-bar-indicator-color-default: $gl-status-info-icon-color; // Used fo
950
950
  $gl-progress-bar-indicator-color-success: $gl-status-success-icon-color; // Used for the indicator color for the success progress-bar variant.
951
951
  $gl-progress-bar-indicator-color-warning: $gl-status-warning-icon-color; // Used for the indicator color for the warning progress-bar variant.
952
952
  $gl-progress-bar-indicator-color-danger: $gl-status-danger-icon-color; // Used for the indicator color for the danger progress-bar variant.
953
- $gl-table-row-background-color-hover: $gl-background-color-subtle; // Used for the background of a table row in hover state.
953
+ $gl-table-row-background-color-hover: $gl-highlight-target-background-color; // Used for the background of a table row in hover state.
954
954
  $gl-table-sorting-icon-color: $gl-text-color-heading; // Used for the color of the sorting icons in the column headers.
955
955
  $gl-toggle-switch-icon-color-unchecked-default: $gl-action-strong-neutral-background-color-default; // Used for the icon color of an unchecked toggle switch in the default state.
956
956
  $gl-toggle-switch-icon-color-unchecked-hover: $gl-action-strong-neutral-background-color-hover; // Used for the icon color of an unchecked toggle switch in the hover state.
@@ -4,7 +4,7 @@
4
4
  "background": {
5
5
  "color": {
6
6
  "hover": {
7
- "$value": "{background.color.subtle}",
7
+ "$value": "{highlight.target.background.color}",
8
8
  "$type": "color",
9
9
  "$description": "Used for the background of a table row in hover state.",
10
10
  "$extensions": {
@@ -1,3 +0,0 @@
1
- Accordions are used to group similar content and hide or show it depending on user needs or
2
- preferences. Accordions give users more granular control over the interface and help digest content
3
- in stages, rather than all at once.
@@ -1,3 +0,0 @@
1
- ## Usage
2
-
3
- Use `GlAccordionItem` to place the accordion item within your accordion.
@@ -1,35 +0,0 @@
1
- Alerts allow the application to pass along relevant system information to the
2
- user without impeding their journey. Alerts are system generated and may or may
3
- not be derived by a user’s action.
4
-
5
- ## Dismissible alerts
6
-
7
- Alerts don't handle their own visibility, so it's the parent component's
8
- responsbility to listen for the `dismiss` event and hide the alert in some way.
9
- For example:
10
-
11
- ```html
12
- <script>
13
- ...
14
- computed: {
15
- shouldShowAlert() {
16
- return !this.isAlertDismissed && this.someOtherCondition();
17
- },
18
- },
19
- ...
20
- </script>
21
-
22
- <template>
23
- ...
24
- <gl-alert v-if="shouldShowAlert" @dismiss="isAlertDismissed = true">
25
- An important message
26
- </gl-alert>
27
- ...
28
- </template>
29
- ```
30
-
31
- ## Sticky alerts
32
-
33
- Any alert can use `position: sticky`, however it should be limited to critical alerts where keeping
34
- the alert visually in context is necessary or when alerts are injected into a page and might
35
- otherwise go unnoticed.
@@ -1,4 +0,0 @@
1
- ## Usage
2
-
3
- The `GlAnimatedIcon` component can be used to render animated SVG
4
- with any other interactive Pajamas component that can switch `GlAnimatedIcon` state.
@@ -1 +0,0 @@
1
- Avatars are used to represent a unique entity, be it a person, a group, or a project.
@@ -1,20 +0,0 @@
1
- ## Usage
2
-
3
- Avatars may also be adjacent to a text alternative, such as a user or project name. In these cases,
4
- a null `alt` text should be used so that they can be ignored by assistive technologies.
5
-
6
- Use the `avatar-labeled` component in those scenarios. It will set a null `alt` text by default.
7
- It allows to display a `label` and/or a `sub-label` next to the avatar image. It accepts the same
8
- properties as the avatar component to modify the avatar’s shape and size.
9
-
10
- ## Using the component
11
-
12
- ```js
13
- <gl-avatar-labeled
14
- :shape="shape"
15
- :size="size"
16
- :src="src"
17
- :label="label"
18
- :sub-label="subLabel"
19
- />
20
- ```
@@ -1,33 +0,0 @@
1
- `<gl-avatar-link>` decorates `<gl-avatar>` with hyperlink functionality. It accepts the same
2
- properties as the `<gl-link>` component and it works in the same way too. The main purpose of this
3
- component is to apply visual enhancements that makes evident that the user can interact with the
4
- avatar.
5
-
6
- ## Using the component
7
-
8
- When wrapping an `<gl-avatar>` component, `<gl-avatar-link>` darkens
9
- the border that surrounds the avatar image or fallback text when hovering over it.
10
-
11
- ```vue
12
- <gl-avatar-link target="blank" href="https://gitlab.com/gitlab-org/gitlab">
13
- <gl-avatar
14
- :size="32"
15
- :src="avatarUrl"
16
- />
17
- </gl-avatar-link>
18
- ```
19
-
20
- When wrapping an `<avatar-labeled>` component, `<avatar-link>` underlines
21
- the label and sub-label text when hovering over the avatar. It also applies the
22
- same effects described in the first example.
23
-
24
- ```vue
25
- <gl-avatar-link target="blank" href="https://gitlab.com/gitlab-org/gitlab">
26
- <gl-avatar-labeled
27
- :size="32"
28
- entity-name="GitLab"
29
- label="GitLab User"
30
- sub-label="@gitlab"
31
- />
32
- </gl-avatar-link>
33
- ```
@@ -1,38 +0,0 @@
1
- Use `<avatars-inline />` to display multiple avatars organized in a single row.
2
-
3
- ### Basic usage
4
-
5
- The `avatars` property accepts an array of objects that contains the avatar properties. By default,
6
- `<avatars-inline />` expects each object contained in the array to have the same shape as the
7
- properties of the `<avatar />` component. You can customize the display of each avatar by
8
- overriding the default slot:
9
-
10
- ```html
11
- <gl-avatars-inline :avatars="avatars">
12
- <template #avatar="{ avatar }">
13
- <gl-avatar-link v-gl-tooltip target="blank" :href="avatar.href" :title="avatar.tooltip">
14
- <gl-avatar :src="avatar.src" :size="32" />
15
- </gl-avatar-link>
16
- </template>
17
- </gl-avatars-inline>
18
- ```
19
-
20
- In the example above, the avatars displayed inside `<avatars-inline />` are links pointing to a URL
21
- stored in each avatar object. Each avatar also displays a tooltip. If you override
22
- `<inline-avatars />` default display, you can pass an array of objects with any desired shape to
23
- the `avatars` property.
24
-
25
- ### Collapsing
26
-
27
- When the `collapse` property value is `true` and the `maxVisible` property value is a number less
28
- than the length of the `avatars` property array, `<avatars-inline>` will hide the overflown avatars
29
- and display a badge instead.
30
-
31
- ### Badge description in screen readers
32
-
33
- The `badgeSrOnlyText` property provides a meaningful description of the badge that appears
34
- when avatars are collapsed for screen reader users.
35
-
36
- ### Supported sizes
37
-
38
- `<avatars-inline>` supports avatars with `16`, `24`, or `32` size.
@@ -1,30 +0,0 @@
1
- Badges highlight metadata of objects, the kind of information that always needs
2
- some context and isn’t useful on its own. For example, they can be used to
3
- indicate an issue’s status, a member’s role, or if a branch is protected.
4
-
5
- ## Usage
6
-
7
- ```html
8
- <gl-badge>Hello, world!</gl-badge>
9
- ```
10
-
11
- > Note: Native support for icons in badges will be added in a future version.
12
-
13
- ### Using icon-only badges
14
-
15
- When a badge only has an icon and no slot content, be sure to set the `aria-label` attribute of the
16
- badge for best accessibility.
17
-
18
- ```html
19
- <!-- bad -->
20
- <gl-badge icon="eye" />
21
-
22
- <!-- good -->
23
- <gl-badge icon="eye" aria-label="Mark as confidential" />
24
- ```
25
-
26
- ## Link badges
27
-
28
- Badges can be made actionable and turn into links by providing the `href` prop,
29
- which can be used in combination with the props `rel`, `target`, `active`, and `disabled`.
30
- The prop `tag` will be ignored and the `BLink` component will be used instead.
@@ -1,35 +0,0 @@
1
- ## Dismiss
2
-
3
- Users are able to permanently dismiss banners by default.
4
- Banners may also be dismissed temporarily, depending on the use case.
5
-
6
- ### Permanent dismissal
7
-
8
- The dismiss action is always represented by the `Close` icon and anchored
9
- to the top right of the banner.
10
-
11
- Banner dismissal should work as follows:
12
-
13
- * Banner dismissal must be associated with the user in the system database.
14
- Dismissal must persist, even across version upgrades and clients.
15
- * Banners do not reappear by default. In rare circumstances, you may present the
16
- banner again to a user after some time has passed.
17
- * Banners should only be shown to users who are logged in.
18
-
19
- **Implementation Notes:**
20
-
21
- * The dismissal of the banner is achieved using the `UserCallout` model on the backend and the
22
- `PersistentUserCallout` JS file on the frontend. If both parameters are implemented correctly, the
23
- banner will adhere to the dismissal guidelines above.
24
-
25
- ### Temporary dismissal
26
-
27
- To introduce temporary dismissal, include a secondary or tertiary button placed alongside
28
- the primary action button. Follow the [button](https://design.gitlab.com/components/button#alignment)
29
- alignment and order guidelines.
30
-
31
- Temporary dismissals should work as follows:
32
-
33
- * Banners dismissed temporarily will reappear after **7 days**.
34
- * After a banner is dismissed temporarily, use a [toast](?path=/story/base-toast--default) message
35
- to let the user know they will see the banner again in 7 days.
@@ -1,52 +0,0 @@
1
- ## Usage
2
-
3
- The `GlBreadcrumb` component comes with a smart auto-resize feature. When there is not enough space
4
- to show all breadcrumb `items` in a single row, the component moves items into an ellipsis dropdown,
5
- starting with the first one. The last breadcrumb item (which represents the current page) stays
6
- always visible.
7
-
8
- ### Auto-resize
9
-
10
- **Important:** For the auto-resize to function correctly it is necessary that the `GlBreadcrumb`
11
- component itself takes all the horizontal space it can get. How to do this depends on the
12
- CSS `display` mode (block, flex, grid) of its parent element.
13
-
14
- **Example:** In a flexbox layout, allow the component to `flex-grow`:
15
-
16
- ```js
17
- <gl-breadcrumb class="gl-grow" :items="items" />
18
- ```
19
-
20
- ### `items` prop
21
-
22
- This component also allows for optional avatars on each item.
23
-
24
- `avatarPath` should passed along with `text` and `href` in `items`.
25
- Here is an example of how an item with an avatar should look:
26
-
27
- **note:** the component supports passing the property `to` in the list items to enable navigation
28
- through `vue-router`
29
-
30
- #### Example
31
-
32
- ```js
33
- items = [
34
- {
35
- text: 'First item',
36
- href: '#',
37
- avatarPath: '/avatar.png',
38
- },
39
- ];
40
-
41
- <gl-breadcrumb :items="items" />
42
- ```
43
-
44
- ### `size` prop
45
-
46
- The size prop determines the size of the breadcrumb component. It accepts the following values:
47
-
48
- "sm" (default): Small size
49
- "md": Medium size
50
-
51
- Using the default 'sm' size for all page breadcrumbs is considered a best practice
52
- to ensure consistency across the application.
@@ -1,25 +0,0 @@
1
- Broadcast messages provide an efficient and prominent way to deliver critical messages at the
2
- instance level to all users. For example, a broadcast message can be used when an admin wants to
3
- announce that their platform will experience downtime during a specific period.
4
-
5
- In comparison with an alert, broadcast messages are created by an admin and not triggered by the
6
- system.
7
-
8
- Please refer to [Pajamas' documentation](https://design.gitlab.com/components/broadcast-message)
9
- for more information on when to use this component.
10
-
11
- ## Dismiss a broadcast message
12
-
13
- The `GlBroadcastMessage` component deals with users dismissal the same way `GlAlert` does, meaning
14
- it does not handle its own visibility but emits a `dismiss` event that the parent component should
15
- listen to in order to hide the message. Example:
16
-
17
- ```html
18
- <template>
19
- ...
20
- <gl-broadcast-message v-if="!dismissed" @dismiss="dismissed = true">
21
- An important message
22
- </gl-broadcast-message>
23
- ...
24
- </template>
25
- ```
@@ -1,119 +0,0 @@
1
- Buttons execute an action, either in the background or foreground of an experience. Different button
2
- categories help guide users through certain actions. Buttons express what action will occur when the
3
- user clicks or touches it either by text, icon, or both. Additional meaning can be derived from the
4
- button variant.
5
-
6
- ## Button link
7
-
8
- A button link is a link that is styled to look like a button, semantically speaking it's a `<a>` tag
9
- with the necessary classes added to make it look like a button, it shares the same functionality as
10
- [<gl-link>](?path=/docs/base-link--docs)
11
-
12
- > Note: Setting a `target` attribute without a `href` attribute, will not create any side effects.
13
- > Without the presence of a `href` attribute, this component will render a `<button>`.
14
-
15
- ## Icon-only button
16
-
17
- Icon-only buttons must have an accessible name.
18
- You can provide one with the `aria-label` attribute, which is read out by screen readers.
19
-
20
- ```html
21
- <gl-button icon="close" aria-label="Close" />
22
- ```
23
-
24
- ## Type
25
-
26
- You can specify the button's type by setting the prop `type` to `button`, `submit` or `reset`.
27
- The default type is `button`.
28
-
29
- Note the `type` prop has no effect when either `href` or `to` props are set.
30
-
31
- ## Sizing
32
-
33
- Specify `small` or `medium` via the `size` prop. Defaults to `medium`.
34
-
35
- ```html
36
- <gl-button size="small">Small Button</gl-button>
37
- <gl-button>Default Button (medium)</gl-button>
38
- <gl-button size="medium">Medium Button</gl-button>
39
- ```
40
-
41
- ## Categories
42
-
43
- Use the `category` prop to set the button category to `primary`, `secondary`, or `tertiary`.
44
- Defaults to `primary`.
45
-
46
- ## Variants
47
-
48
- Use the `variant` prop to set the button variant to `default`, `confirm`, `danger`, `dashed`, or `link`.
49
- Defaults to `default`.
50
-
51
- ## Block level buttons
52
-
53
- Create block level buttons, those that span the full width of a parent, by setting the `block`
54
- prop.
55
-
56
- ```html
57
- <gl-button block>Block Level Button</gl-button>
58
- ```
59
-
60
- ## Disabled state
61
-
62
- Set the `disabled` prop to disable button default functionality. `disabled` also works with buttons
63
- rendered as `<a>` elements and `<router-link>` (i.e. with the `href` or `to` prop set).
64
-
65
- ```html
66
- <gl-button disabled>Disabled</gl-button>
67
- ```
68
-
69
- ## Router link support
70
-
71
- Refer to the [Router support](?path=/docs/base-link--docs#router-links) reference docs for
72
- the various supported `<router-link>` related props.
73
-
74
- ## Accessibility
75
-
76
- When the `href` prop is set to `'#'`, `<gl-button>` will render a link (`<a>`) element with attribute
77
- `role="button"` set and appropriate keydown listeners (<kbd>Enter</kbd> and <kbd>Space</kbd>) so
78
- that the link acts like a native HTML `<button>` for screen reader and keyboard-only users. When
79
- disabled, the `aria-disabled="true"` attribute will be set on the `<a>` element.
80
-
81
- When the `href` is set to any other value (or the `to` prop is used), `role="button"` will not be
82
- added, nor will the keyboard event listeners be enabled.
83
-
84
- ## Label button
85
-
86
- A label button renders a non-interactive `span` styled as a button. This can be especially useful
87
- when used in a button group to render text-only labels along with actionable buttons. To improve
88
- accessibility, and when applicable, consider using [`aria-describedby`] to establish a
89
- relationship between the label button and the associated button.
90
-
91
- [`aria-describedby`]: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute
92
-
93
- ## Security
94
-
95
- This component implements a few security measures to make it as safe as possible by default.
96
- See [SafeLinkDirective docs] for more details.
97
-
98
- ### Linking to an unsafe URL
99
-
100
- If you're trying to link to a location considered unsafe by the `SafeLink` directive (when rendering
101
- a download link with a [Data URL] for example), you'll need to bypass the `href` attribute's
102
- sanitization. This component exposes the `is-unsafe-link` prop for that purpose.
103
-
104
- > **Warning:** Only disable URL sanitization when absolutely necessary.
105
-
106
- ```html
107
- <gl-button
108
- is-unsafe-link
109
- download="file.txt"
110
- href="data:text/plain;charset=utf-8,GitLab%20is%20awesome">Download</gl-button>
111
- ```
112
-
113
- [SafeLinkDirective docs]: https://design.gitlab.com/storybook?path=/docs/directives-safe-link-directive--default
114
- [Data URL]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs
115
-
116
- ## vue-bootstrap component
117
-
118
- This component uses [`BButton`](https://bootstrap-vue.org/docs/components/button) from vue-bootstrap
119
- internally. So please take a look also there at their extensive documentation.
@@ -1,44 +0,0 @@
1
- Button groups are an easy way to group a series of buttons together.
2
-
3
- ```html
4
- <gl-button-group>
5
- <gl-button>Download</b-button>
6
- <gl-button>Browse</b-button>
7
- <gl-button variant="danger">Delete</b-button>
8
- </gl-button-group>
9
- ```
10
-
11
- ## Split dropdowns
12
-
13
- Both `GlCollapsibleListbox` and `GlDisclosureDropdown` can be added as the last
14
- child of a button group to produce a "split" dropdown.
15
-
16
- For the correct styling, the dropdown component must render a caret _only_.
17
- This means no icon, and no visible text. For accessbility, ensure the
18
- dropdown's `toggle-text` _and_ `text-sr-only` props are set.
19
-
20
- ```html
21
- <gl-button-group>
22
- <gl-button>Split listbox</gl-button>
23
-
24
- <gl-collapsible-listbox
25
- v-model="foo"
26
- :items="items"
27
- toggle-text="Choose button action"
28
- text-sr-only
29
- />
30
- </gl-button-group>
31
- ```
32
-
33
- ## Vertical variation
34
-
35
- Make a set of buttons appear vertically stacked rather than horizontally by setting the `vertical` prop.
36
- Split button dropdowns are not supported here.
37
-
38
- ```html
39
- <gl-button-group vertical>
40
- <gl-button>Top</b-button>
41
- <gl-button>Middle</b-button>
42
- <gl-button>Bottom</b-button>
43
- </gl-button-group>
44
- ```
@@ -1,4 +0,0 @@
1
- Cards are a flexible component used to display content and actions in a variety of contexts.
2
- They are generally restricted to a single topic and it should be easy for users to scan relevant and
3
- actionable information. Content, such as images and text, should be positioned within them in a
4
- manner that demonstrates their intended hierarchy.
@@ -1,64 +0,0 @@
1
- Collapse is used to keep pages focused on the overview of what the user can do. Details and
2
- additional actions are hidden in the fold, and can be opened if the user wants to interact with
3
- those elements.
4
-
5
- ## `v-model` support
6
-
7
- The component's collapsed (visible) state can be set with `v-model` which binds internally to
8
- the `visible` prop.
9
-
10
- Note that when using `v-model` to control `<gl-collapse>`, the `aria-*` attributes are not
11
- automatically placed on the trigger button. Specifically, you should add `aria-expanded` to
12
- reflect the state of the target `<gl-collapse>` component, and `aria-controls` should be set
13
- to the ID(s) of the target `<gl-collapse>` component(s).
14
-
15
- ```html
16
- <template>
17
- <div>
18
- <gl-button
19
- :class="visible ? null : 'collapsed'"
20
- :aria-expanded="visible ? 'true' : 'false'"
21
- aria-controls="collapse-4"
22
- @click="visible = !visible"
23
- >
24
- Toggle Collapse
25
- </gl-button>
26
- <gl-collapse id="collapse-4" v-model="visible">
27
- <span>Surprise! But I am just a span</span>
28
- </gl-collapse>
29
- </div>
30
- </template>
31
-
32
- <script>
33
- export default {
34
- data() {
35
- return {
36
- visible: true
37
- }
38
- }
39
- }
40
- </script>
41
- ```
42
-
43
- ## Troubleshooting
44
-
45
- When collapsing the container, padding on the collapse component causes
46
- complications with the height calculations.
47
- The result is a bit of jumpiness at the end of the collapse animation.
48
-
49
- The quick solution is to bring the padding into an inner container, which
50
- simplifies the height calculations and removes the jumpiness.
51
-
52
- ```html
53
- <!-- bad -->
54
- <gl-collapse class="gl-p-3">
55
- <!-- content -->
56
- </gl-collapse>
57
-
58
- <!-- good -->
59
- <gl-collapse>
60
- <div class="gl-p-3">
61
- <!-- content -->
62
- </div>
63
- </gl-collapse>
64
- ```
@@ -1,8 +0,0 @@
1
- Date picker allows users to choose and input a date by manually typing the date into the input field
2
- or by using a calendar-like dropdown.
3
-
4
- ### Warning
5
-
6
- Be careful when binding a date value using `value` prop. `value` is a watched property and Date
7
- picker will emit `input` event on _initial load_. Alternatively, use `defaultDate` to set the
8
- initial date then receive updated date values through `input` events.
@@ -1,32 +0,0 @@
1
- ## Usage
2
-
3
- Daterange picker allows users to choose a date range by manually typing the start/end date
4
- into the input fields or by using a calendar-like dropdown.
5
-
6
- A `maxDateRange` can be specified in order to limit the maximum number of days the component
7
- will allow to be selected i.e. if the start date is `2020-08-01` and `maxDateRange` is set to `10`,
8
- the highest selectable end date would be `2020-08-11`. This value will be offset by `1` if
9
- `sameDaySelection` is set to `true`. A `defaultMaxDate` will need to be
10
- provided when making use of the `maxDateRange`.
11
-
12
- By default, the component does not allow selection of the same start and end date.
13
- In a scenario where this is required, the `sameDaySelection` property can be configured.
14
- This is specifically useful when a single day selection is being defined as `2020-01-01 00:00:00`
15
- to `2020-01-01 23:59:59` instead of `2020-01-01 00:00:00` to `2020-01-02 00:00:00`.
16
-
17
- When `maxDateRange` is set it's a good idea to set the `tooltip` specifying the date range limit
18
- and to indicate the number of days currently selected using the default slot. For example:
19
-
20
- ```vue
21
- <template #default="{ daysSelected }">
22
- <span v-if="daysSelected > -1">{{ daysSelected }} days selected</span>
23
- <span v-else>No days selected</span>
24
- </template>
25
- ```
26
-
27
- The `daysSelected` slot prop is the effective date range, thus the value is increased by one when
28
- `sameDaySelection` is set to `true`. When no date range has been selected the value is `-1`.
29
-
30
- ### Note
31
-
32
- If specifying a maxDateRange, it is good practice to include a date range indicator and toolip.
@@ -1,17 +0,0 @@
1
- The drawer is used to show more information about a certain resource in the UI and potentially
2
- handle actions on the information.
3
-
4
- ### By default
5
-
6
- ```html
7
- <gl-drawer :open="open" @close="close" @opened="opened">
8
- <template #header>Your Title</template>
9
- <template>
10
- ...children
11
- </template>
12
- </gl-drawer>
13
- ```
14
-
15
- - `v-bind:open` will be a boolean you will pass to `gl-drawer` and `@close` is a listener that will
16
- be a function that will toggle open to `false`.
17
- - The component emits an `opened` event after the opening animation has finished.