@gitlab/ui 121.0.1 → 122.0.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 (26) hide show
  1. package/bin/migrate_custom_utils_to_tw.bundled.mjs +1 -1
  2. package/dist/components/base/avatar_labeled/avatar_labeled.js +11 -1
  3. package/dist/index.css +1 -1
  4. package/dist/index.css.map +1 -1
  5. package/dist/vendor/bootstrap-vue/src/components/modal/helpers/modal-manager.js +1 -1
  6. package/dist/vendor/bootstrap-vue/src/components/tabs/tabs.js +25 -17
  7. package/dist/vendor/bootstrap-vue/src/constants/components.js +1 -3
  8. package/package.json +6 -6
  9. package/src/components/base/avatar_labeled/avatar_labeled.vue +11 -0
  10. package/src/vendor/bootstrap/scss/_card.scss +0 -110
  11. package/src/vendor/bootstrap/scss/_dropdown.scss +7 -13
  12. package/src/vendor/bootstrap/scss/_list-group.scss +0 -41
  13. package/src/vendor/bootstrap/scss/_variables.scss +0 -14
  14. package/src/vendor/bootstrap/scss/bootstrap.scss +0 -1
  15. package/src/vendor/bootstrap-vue/src/components/modal/helpers/modal-manager.js +1 -1
  16. package/src/vendor/bootstrap-vue/src/components/tabs/tabs.js +27 -15
  17. package/src/vendor/bootstrap-vue/src/constants/components.js +0 -2
  18. package/dist/vendor/bootstrap-vue/src/components/nav/index.js +0 -2
  19. package/dist/vendor/bootstrap-vue/src/components/nav/nav-item.js +0 -43
  20. package/dist/vendor/bootstrap-vue/src/components/nav/nav.js +0 -62
  21. package/src/components/dashboards/dashboard_layout/dashboard_layout.md +0 -145
  22. package/src/components/dashboards/dashboard_panel/dashboard_panel.md +0 -66
  23. package/src/vendor/bootstrap/scss/_jumbotron.scss +0 -17
  24. package/src/vendor/bootstrap-vue/src/components/nav/index.js +0 -4
  25. package/src/vendor/bootstrap-vue/src/components/nav/nav-item.js +0 -49
  26. package/src/vendor/bootstrap-vue/src/components/nav/nav.js +0 -58
@@ -1,145 +0,0 @@
1
- ## Dashboard layout
2
-
3
- The `GlDashboardLayout` component provides an easy way to render grid-based dashboards
4
- using a configuration as outlined by our [Pajamas guidelines](#pajamas-guidelines).
5
- For more in-depth details on the dashboard layout framework, see the
6
- [architecture design document](https://handbook.gitlab.com/handbook/engineering/architecture/design-documents/dashboard_layout_framework/).
7
-
8
- ### When to use
9
-
10
- This component should be used when:
11
-
12
- - You want an easy way to create a dashboard interface.
13
- - You want your dashboard to align with our [Pajamas guidelines](#pajamas-guidelines).
14
- - You want to benefit from features such as customizable layouts with resizable, draggable elements.
15
-
16
- ### Current limitations
17
-
18
- The `GlDashboardLayout` component is limited to rendering dashboards. As defined
19
- in our architecture design document it does not provide:
20
-
21
- - Data exploration outside defined panel visualizations.
22
- - User-driven customization outside of editing panel position and size.
23
- - Navigation placement for dashboards.
24
-
25
- ## The component
26
-
27
- The component expects a dashboard configuration object as input and renders a dashboard
28
- layout with title, description, actions, and panels.
29
-
30
- ### Grid layout
31
-
32
- Panels within the dashboard layout are rendered in a cross-browser 12-column grid
33
- system with an unlimited number of rows. The grid is responsive and collapses down to a
34
- single column at the [medium breakpoint](https://design.gitlab.com/product-foundations/layout/#breakpoints).
35
-
36
- ### Dashboard panels
37
-
38
- The dashboard layout is not opinionated about the panel component used. You are free to choose
39
- whichever panel component best suits your needs. However, to ensure consistency with
40
- our design patterns, it's strongly recommended that you use `GlDashboardPanel`.
41
-
42
- ### Filters
43
-
44
- The component provides a `#filters` slot to render your filters in the dashboard layout.
45
- The component does not manage or sync filters and leaves it up to the consumer to manage this state.
46
-
47
- We expect dashboards using the framework to implement two types of filters:
48
-
49
- - Dashboard filters: Applied to every panel and visualization in the dashboard.
50
- - Panel filters: Applied per panel to refine results available within the dashboard context.
51
-
52
- ### Basic implementation
53
-
54
- A basic implementation of a static dashboard using the `#panel` slot to render existing
55
- visualizations wrapped in `GlDashboardPanel`.
56
-
57
- ```html
58
- <script>
59
- import { GlDashboardLayout, GlDashboardPanel } from '@gitlab/ui';
60
-
61
- // Your i18n library
62
- import { __ } from '~/locale';
63
-
64
- // Your visualizations
65
- import UsersVisualization from './my_users_visualization.vue';
66
- import EventsVisualization from './my_events_visualization.vue';
67
-
68
- export default {
69
- components: {
70
- GlDashboardLayout,
71
- GlDashboardPanel,
72
- UsersVisualization,
73
- EventsVisualization,
74
- },
75
- data() {
76
- return {
77
- dashboard: {
78
- title: __('My dashboard title'),
79
- description: __('The dashboard description to render'),
80
- panels: [
81
- {
82
- // Each panel ID must be unique within the context of this dashboard obj
83
- id: 'active-users-panel',
84
- dashboardPanelProps: {
85
- title: __('Active users over time'),
86
- // Any additional GlDashboardPanel props go here
87
- },
88
- component: UsersVisualization,
89
- componentProps: {
90
- apiPath: '/example-users-api',
91
- // Any props you want to pass to your component
92
- },
93
- gridAttributes: {
94
- width: 6,
95
- height: 4,
96
- yPos: 0,
97
- xPos: 0,
98
- },
99
- },
100
- {
101
- // Each panel ID must be unique within the context of this dashboard obj
102
- id: 'events-over-time-panel',
103
- dashboardPanelProps: {
104
- title: __('Events over time'),
105
- // Any additional GlDashboardPanel props go here
106
- },
107
- component: EventsVisualization,
108
- componentProps: {
109
- apiPath: '/example-events-api',
110
- // Any props you want to pass to your component
111
- },
112
- gridAttributes: {
113
- width: 6,
114
- height: 4,
115
- yPos: 0,
116
- xPos: 6,
117
- },
118
- },
119
- ],
120
- },
121
- }
122
- },
123
- }
124
- </script>
125
-
126
- <template>
127
- <gl-dashboard-layout :config="dashboard">
128
- <template #panel="{ panel }">
129
- <gl-dashboard-panel v-bind="panel.dashboardPanelProps">
130
- <template #body>
131
- <component
132
- :is="panel.component"
133
- class="gl-h-full gl-overflow-hidden"
134
- v-bind="panel.componentProps"
135
- />
136
- </template>
137
- </gl-dashboard-panel>
138
- </template>
139
- </gl-dashboard-layout>
140
- </template>
141
- ```
142
-
143
- ## Pajamas guidelines
144
-
145
- - [Pajamas dashboards pattern](https://design.gitlab.com/patterns/dashboards)
@@ -1,66 +0,0 @@
1
- ## Dashboard panel
2
-
3
- The `GlDashboardPanel` component is a foundational building block for dashboards but it can also be
4
- used in other analytics interfaces. It is desinged to wrap a query result visualization with standardized
5
- styling, loading states, actions, and metadata as outlined by our [Pajamas guidelines](https://design.gitlab.com/patterns/dashboards).
6
- It does not manage data states and fetching, or handle filter state managment.
7
-
8
- ### When to use
9
-
10
- This component should be used when:
11
-
12
- - You need a standardized container for individual results in dashboards, reports,
13
- or other analytics-focused interfaces.
14
- - You want to wrap a single visualization of query results, such as charts,d markdown,
15
- single stats, or tables.
16
- - You want to benefit from easy integration with the dashboard layout component.
17
-
18
- ## The component
19
-
20
- The component is designed to wrap a single data visualization, but it's not opinionated about its content
21
- and can be used for example to wrap other content types such as rendered markdown.
22
-
23
- ### Loading states
24
-
25
- Panels provide built-in loading state management. When content is loading:
26
-
27
- - Set the `loading` prop to `true` to show a loading spinner.
28
- - Use `loadingDelayed` and `loadingDelayedText` for long-running operations.
29
- - The panel handles the visual loading state while you handle the actual data loading.
30
-
31
- ### Filters
32
-
33
- The component provides a `#filters` slot for you to render your filters within the panel
34
- layout. It's up to the consumer to manage the state of filters.
35
-
36
- ### Basic implementation
37
-
38
- ```html
39
- <script>
40
- import { GlDashboardPanel } from '@gitlab/ui';
41
- import MyVisualization from './my_visualization.vue';
42
-
43
- export default {
44
- components: {
45
- GlDashboardPanel,
46
- MyVisualization,
47
- },
48
- data() {
49
- return {
50
- isLoading: false,
51
- };
52
- },
53
- };
54
- </script>
55
-
56
- <template>
57
- <gl-dashboard-panel
58
- title="My Content Title"
59
- :loading="isLoading"
60
- >
61
- <template #body>
62
- <my-visualization />
63
- </template>
64
- </gl-dashboard-panel>
65
- </template>
66
- ```
@@ -1,17 +0,0 @@
1
- .jumbotron {
2
- padding: $jumbotron-padding ($jumbotron-padding * .5);
3
- margin-bottom: $jumbotron-padding;
4
- color: $jumbotron-color;
5
- background-color: $jumbotron-bg;
6
- @include border-radius($border-radius-lg);
7
-
8
- @include media-breakpoint-up(sm) {
9
- padding: ($jumbotron-padding * 2) $jumbotron-padding;
10
- }
11
- }
12
-
13
- .jumbotron-fluid {
14
- padding-right: 0;
15
- padding-left: 0;
16
- @include border-radius(0);
17
- }
@@ -1,4 +0,0 @@
1
- import { BNav } from './nav'
2
- import { BNavItem } from './nav-item'
3
-
4
- export { BNav, BNavItem }
@@ -1,49 +0,0 @@
1
- import { extend, mergeData } from '../../vue'
2
- import { NAME_NAV_ITEM } from '../../constants/components'
3
- import { PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_OBJECT } from '../../constants/props'
4
- import { omit, sortKeys } from '../../utils/object'
5
- import { makeProp, makePropsConfigurable, pluckProps } from '../../utils/props'
6
- import { BLink, props as BLinkProps } from '../link/link'
7
-
8
- // --- Props ---
9
-
10
- const linkProps = omit(BLinkProps, ['event', 'routerTag'])
11
-
12
- export const props = makePropsConfigurable(
13
- sortKeys({
14
- ...linkProps,
15
- linkAttrs: makeProp(PROP_TYPE_OBJECT, {}),
16
- linkClasses: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING)
17
- }),
18
- NAME_NAV_ITEM
19
- )
20
-
21
- // --- Main component ---
22
-
23
- // @vue/component
24
- export const BNavItem = /*#__PURE__*/ extend({
25
- name: NAME_NAV_ITEM,
26
- functional: true,
27
- props,
28
- render(h, { props, data, listeners, children }) {
29
- return h(
30
- 'li',
31
- mergeData(omit(data, ['on']), {
32
- staticClass: 'nav-item'
33
- }),
34
- [
35
- h(
36
- BLink,
37
- {
38
- staticClass: 'nav-link',
39
- class: props.linkClasses,
40
- attrs: props.linkAttrs,
41
- props: pluckProps(linkProps, props),
42
- on: listeners
43
- },
44
- children
45
- )
46
- ]
47
- )
48
- }
49
- })
@@ -1,58 +0,0 @@
1
- import { extend, mergeData } from '../../vue'
2
- import { NAME_NAV } from '../../constants/components'
3
- import { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../constants/props'
4
- import { makeProp, makePropsConfigurable } from '../../utils/props'
5
-
6
- // --- Helper methods ---
7
-
8
- const computeJustifyContent = value => {
9
- value = value === 'left' ? 'start' : value === 'right' ? 'end' : value
10
- return `justify-content-${value}`
11
- }
12
-
13
- // --- Props ---
14
-
15
- export const props = makePropsConfigurable(
16
- {
17
- align: makeProp(PROP_TYPE_STRING),
18
- // Set to `true` if placing in a card header
19
- cardHeader: makeProp(PROP_TYPE_BOOLEAN, false),
20
- fill: makeProp(PROP_TYPE_BOOLEAN, false),
21
- justified: makeProp(PROP_TYPE_BOOLEAN, false),
22
- pills: makeProp(PROP_TYPE_BOOLEAN, false),
23
- small: makeProp(PROP_TYPE_BOOLEAN, false),
24
- tabs: makeProp(PROP_TYPE_BOOLEAN, false),
25
- tag: makeProp(PROP_TYPE_STRING, 'ul')
26
- },
27
- NAME_NAV
28
- )
29
-
30
- // --- Main component ---
31
-
32
- // @vue/component
33
- export const BNav = /*#__PURE__*/ extend({
34
- name: NAME_NAV,
35
- functional: true,
36
- props,
37
- render(h, { props, data, children }) {
38
- const { tabs, pills, align, cardHeader } = props
39
-
40
- return h(
41
- props.tag,
42
- mergeData(data, {
43
- staticClass: 'nav',
44
- class: {
45
- 'nav-tabs': tabs,
46
- 'nav-pills': pills && !tabs,
47
- 'card-header-tabs': cardHeader && tabs,
48
- 'card-header-pills': cardHeader && pills && !tabs,
49
- 'nav-fill': props.fill,
50
- 'nav-justified': props.justified,
51
- [computeJustifyContent(align)]: align,
52
- small: props.small
53
- }
54
- }),
55
- children
56
- )
57
- }
58
- })