q2-design-system 1.67.0 → 1.67.1

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 (67) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +19 -17
  3. package/guidelines/Guidelines.md +0 -208
  4. package/guidelines/components/overview.md +0 -59
  5. package/guidelines/components/q2-action-group.md +0 -118
  6. package/guidelines/components/q2-avatar.md +0 -85
  7. package/guidelines/components/q2-badge.md +0 -102
  8. package/guidelines/components/q2-btn.md +0 -519
  9. package/guidelines/components/q2-calendar.md +0 -504
  10. package/guidelines/components/q2-card-image.md +0 -332
  11. package/guidelines/components/q2-card.md +0 -117
  12. package/guidelines/components/q2-carousel-pane.md +0 -35
  13. package/guidelines/components/q2-carousel.md +0 -283
  14. package/guidelines/components/q2-chart-area.md +0 -425
  15. package/guidelines/components/q2-chart-bar.md +0 -330
  16. package/guidelines/components/q2-chart-donut.md +0 -355
  17. package/guidelines/components/q2-checkbox-group.md +0 -214
  18. package/guidelines/components/q2-checkbox.md +0 -216
  19. package/guidelines/components/q2-context.md +0 -41
  20. package/guidelines/components/q2-currency.md +0 -191
  21. package/guidelines/components/q2-data-table.md +0 -897
  22. package/guidelines/components/q2-detail.md +0 -114
  23. package/guidelines/components/q2-dropdown.md +0 -421
  24. package/guidelines/components/q2-editable-field.md +0 -300
  25. package/guidelines/components/q2-file-picker.md +0 -214
  26. package/guidelines/components/q2-form.md +0 -35
  27. package/guidelines/components/q2-formatted-text.md +0 -105
  28. package/guidelines/components/q2-grid-area.md +0 -704
  29. package/guidelines/components/q2-grid.md +0 -755
  30. package/guidelines/components/q2-icon.md +0 -90
  31. package/guidelines/components/q2-input.md +0 -721
  32. package/guidelines/components/q2-item.md +0 -230
  33. package/guidelines/components/q2-legend.md +0 -95
  34. package/guidelines/components/q2-link.md +0 -222
  35. package/guidelines/components/q2-list.md +0 -320
  36. package/guidelines/components/q2-loading.md +0 -121
  37. package/guidelines/components/q2-loc.md +0 -81
  38. package/guidelines/components/q2-message.md +0 -74
  39. package/guidelines/components/q2-meter.md +0 -193
  40. package/guidelines/components/q2-mutation-observer.md +0 -77
  41. package/guidelines/components/q2-optgroup.md +0 -37
  42. package/guidelines/components/q2-option-list.md +0 -170
  43. package/guidelines/components/q2-option.md +0 -81
  44. package/guidelines/components/q2-pagination.md +0 -339
  45. package/guidelines/components/q2-pill.md +0 -356
  46. package/guidelines/components/q2-radio-group.md +0 -174
  47. package/guidelines/components/q2-radio.md +0 -111
  48. package/guidelines/components/q2-relative-time.md +0 -144
  49. package/guidelines/components/q2-resize-observer.md +0 -50
  50. package/guidelines/components/q2-section-container.md +0 -237
  51. package/guidelines/components/q2-section.md +0 -141
  52. package/guidelines/components/q2-select.md +0 -638
  53. package/guidelines/components/q2-stepper-pane.md +0 -150
  54. package/guidelines/components/q2-stepper-vertical.md +0 -124
  55. package/guidelines/components/q2-stepper.md +0 -139
  56. package/guidelines/components/q2-tab-container.md +0 -180
  57. package/guidelines/components/q2-tab-pane.md +0 -81
  58. package/guidelines/components/q2-tag.md +0 -278
  59. package/guidelines/components/q2-textarea.md +0 -263
  60. package/guidelines/components/q2-toast.md +0 -728
  61. package/guidelines/components/q2-tooltip.md +0 -133
  62. package/guidelines/framework-wrappers/overview.md +0 -4
  63. package/guidelines/framework-wrappers/react-wrappers.md +0 -105
  64. package/guidelines/framework-wrappers/vue-wrappers.md +0 -90
  65. package/guidelines/theming/overview.md +0 -4
  66. package/guidelines/theming/q2-tecton-theme.css +0 -3
  67. package/guidelines/theming/styling-components.md +0 -208
package/dist/index.js CHANGED
@@ -71,7 +71,7 @@ function __variableDynamicImportRuntime1__(path) {
71
71
  })
72
72
  }
73
73
  }
74
- const TECTONSDKVERSION = '1.67.0';
74
+ const TECTONSDKVERSION = '1.67.1';
75
75
  const defaultOptions = {
76
76
  loadTheme: true,
77
77
  loadUtilities: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q2-design-system",
3
- "version": "1.67.0",
3
+ "version": "1.67.1",
4
4
  "description": "Package that allows projects to only use the elements portion of the Tecton system.",
5
5
  "license": "MIT",
6
6
  "author": "Q2 Tecton Team",
@@ -14,11 +14,23 @@
14
14
  "publishConfig": {
15
15
  "access": "public"
16
16
  },
17
+ "scripts": {
18
+ "build": "pnpm run clean && rollup --config rollup.config.js --bundleConfigAsCjs",
19
+ "build:dev": "pnpm run build",
20
+ "build:local": "pnpm run clean && rollup --config rollup.config.js -w --bundleConfigAsCjs",
21
+ "build:prerelease": "pnpm run build",
22
+ "build:prod": "pnpm run build",
23
+ "clean": "rm -rf ./dist",
24
+ "nom": "rm -rf node_modules",
25
+ "test": "jest",
26
+ "test:ci": "jest",
27
+ "test:coverage": "jest --coverage"
28
+ },
17
29
  "dependencies": {
18
30
  "intl-messageformat": "10.7.18",
19
- "q2-tecton-common": "1.67.0",
20
- "q2-tecton-theme": "1.67.0",
21
- "q2-tecton-elements": "1.67.0"
31
+ "q2-tecton-common": "1.67.1",
32
+ "q2-tecton-elements": "1.67.1",
33
+ "q2-tecton-theme": "1.67.1"
22
34
  },
23
35
  "devDependencies": {
24
36
  "@rollup/plugin-dynamic-import-vars": "^2.1.5",
@@ -35,16 +47,6 @@
35
47
  "rollup-plugin-serve": "^2.0.3",
36
48
  "ts-jest": "^29.2.3"
37
49
  },
38
- "scripts": {
39
- "build": "pnpm run clean && rollup --config rollup.config.js --bundleConfigAsCjs",
40
- "build:dev": "pnpm run build",
41
- "build:local": "pnpm run clean && rollup --config rollup.config.js -w --bundleConfigAsCjs",
42
- "build:prerelease": "pnpm run build",
43
- "build:prod": "pnpm run build",
44
- "clean": "rm -rf ./dist",
45
- "nom": "rm -rf node_modules",
46
- "test": "jest",
47
- "test:ci": "jest",
48
- "test:coverage": "jest --coverage"
49
- }
50
- }
50
+ "packageManager": "pnpm@10.27.0",
51
+ "gitHead": "b6fd1c010a85ddc29aec84305d9546f823197a70"
52
+ }
@@ -1,208 +0,0 @@
1
- > This content is specific to Tecton libraries on version 1.67.0.
2
-
3
- ## Before You Start
4
-
5
- If you're unsure what framework the developer is using, ask them:
6
- - **React** → Use React wrappers from [react-wrappers.md](framework-wrappers/react-wrappers.md)
7
- - **Vue** → Use Vue wrappers from [vue-wrappers.md](framework-wrappers/vue-wrappers.md)
8
- - **Plain HTML/Jinja/other** → Use web components directly (examples below)
9
-
10
- You can also check the project's `package.json` for `react`, `vue`, or similar dependencies.
11
-
12
- ---
13
-
14
- The Tecton Design System provides web components for building consistent user-experiences that work across various frameworks and platforms and remain in sync with branding and theming.
15
-
16
- ## About Web Components
17
-
18
- Today, if you're doing web development, there are countless options you may be utilizing to present content to your users. Some of these options include server-side rendering using languages like Ruby, Python, or Javascript. Other options include client-side rendering with frameworks like React, Vue, Ember, or Angular.
19
-
20
- Because of this, we chose to build out our design system with [web components](https://developer.mozilla.org/en-US/docs/Web/Web_Components). Using a symphony of browser features, we can create custom HTML elements complete with their own attributes, styling, and features.
21
-
22
- Each of the components that Tecton publishes goes through an extensive design review, is well-tested, and is built with accessibility in mind. Additionally, when bugs or necessary improvements are identified, we address them in our codebase, and then all the teams using the design system only need to take an update to utilize them.
23
-
24
-
25
- ## Using Web Components
26
-
27
- Because web components get registered with the browser as HTML elements, using them is pretty straightforward. For example, if you want to display a `q2-btn` element with a `q2-icon` on the left side, it's as simple as this:
28
-
29
- ```html
30
- <q2-btn intent="workflow-primary">
31
- <q2-icon type="edit"></q2-icon>
32
- <span>Edit</span>
33
- </q2-btn>
34
- ```
35
-
36
- Below, you will find descriptions of the various ways you can use each of these features within web components. Every element's documentation page documents what is available.
37
-
38
-
39
- ## Properties
40
-
41
- Each component in the design system allows you to customize its use in various ways by exposing attributes and properties that modify how it looks or behaves. While attributes and properties are two ways of achieving the same result, their distinction is worth documenting here.
42
-
43
- **Attributes** are how you set the state of an element via HTML. On the other hand, you use **properties** to set the state of an element via JavaScript. The difference can be easily seen here:
44
-
45
- ```html
46
- <!-- Setting with an attribute -->
47
- <q2-btn intent="workflow-primary"></q2-btn>
48
-
49
- <!-- Setting with a property -->
50
- <script>
51
- const button = document.querySelector("q2-btn");
52
- button.intent = "workflow-primary";
53
- </script>
54
- ```
55
-
56
- Some properties are defined as `boolean`, meaning they can only have a value of `true` or `false`. These can be utilized in the following ways:
57
-
58
- ```html
59
- <!-- ATTRIBUTE -->
60
- <q2-btn hide-label></q2-btn>
61
- <!-- OR -->
62
- <q2-btn hide-label="true"></q2-btn>
63
-
64
- <!-- PROPERTY -->
65
- <script>
66
- const button = document.querySelector("q2-btn");
67
- button.hideLabel = true;
68
- </script>
69
- ```
70
-
71
- In rare cases, properties can be objects or arrays. An example is when data is passed to a chart or table. While these cannot be set via attributes, they can easily be set using JavaScript.
72
-
73
- ```javascript
74
- const chart = document.querySelector("q2-chart-bar");
75
- chart.data = [
76
- {
77
- value: 1048,
78
- name: 'March',
79
- id: 'march',
80
- },
81
- {
82
- value: 580,
83
- name: 'April',
84
- id: 'april',
85
- },
86
- {
87
- value: 735,
88
- name: 'May',
89
- id: 'may',
90
- },
91
- {
92
- value: 465,
93
- name: 'June',
94
- id: 'june',
95
- },
96
- {
97
- value: 927,
98
- name: 'July',
99
- id: 'july',
100
- },
101
- ]
102
- ```
103
-
104
- Please visit each component's documentation page for a full list of exposed properties.
105
-
106
-
107
- ## Events
108
-
109
- Within the Tecton components, you can use events to listen for when the user performs an action, such as typing a value into an input field or clicking a button. To listen for events, you can use the `addEventListener` method on the element.
110
-
111
- ```html
112
- <!-- In JavaScript with addEventListener -->
113
- <q2-input label="Name"></q2-input>
114
-
115
- <script>
116
- const input = document.querySelector("input");
117
- input.addEventListener("tctInput", (event) => {
118
- console.log("VALUE", event.detail.value);
119
- })
120
- </script>
121
- ```
122
-
123
- Please see the documentation on each component to learn what events are available and what data they provide. If you are using our provided framework wrappers, please see the documentation for working with events in React Wrappers and Vue Wrappers.
124
-
125
-
126
- ## Methods
127
-
128
- Many components have methods that you can call to perform various actions that may not make sense to do by updating an attribute or property. They can be invoked the same way you might call other methods on an element like `element.click()` or `element.focus()`. For example:
129
-
130
- ```javascript
131
- const chart = document.querySelector("q2-chart-donut");
132
- await chart.clearSelection();
133
- ```
134
-
135
- All methods defined by Tecton are asynchronous by default, so you may need to take that into consideration when using them. Please see the documentation on each component to learn what methods are available and the arguments you may pass to them.
136
-
137
-
138
- ## Common Patterns
139
-
140
- Here are some frequently used component patterns to help you get started quickly.
141
-
142
- ### Form with Validation
143
- ```html
144
- <q2-form>
145
- <q2-input label="Email" id="email" type="email"></q2-input>
146
- <q2-input label="Password" id="password" type="password"></q2-input>
147
- <q2-btn intent="workflow-primary" type="submit">Sign In</q2-btn>
148
- </q2-form>
149
-
150
- <script>
151
- document.querySelector("q2-form").addEventListener("submit", (e) => {
152
- const emailInput = document.getElementById("email");
153
- const passwordInput = document.getElementById("password");
154
-
155
- if (!emailInput.value) {
156
- emailInput.errors = ["Email is required"];
157
- e.preventDefault();
158
- }
159
- if (!passwordInput.value) {
160
- passwordInput.errors = ["Password is required"];
161
- e.preventDefault();
162
- }
163
- });
164
- </script>
165
- ```
166
-
167
- ### Button Pairing
168
- ```html
169
- <q2-action-group>
170
- <q2-btn intent="workflow-secondary">Cancel</q2-btn>
171
- <q2-btn intent="workflow-primary">Submit</q2-btn>
172
- </q2-action-group>
173
- ```
174
-
175
- ### Collapsible Section
176
- ```html
177
- <q2-section label="Account Details" collapsible expanded>
178
- <q2-detail label="Account Number" value="****1234"></q2-detail>
179
- <q2-detail label="Account Type" value="Checking"></q2-detail>
180
- </q2-section>
181
- ```
182
-
183
- ### Icon Button
184
- ```html
185
- <q2-btn intent="workflow-primary" label="Edit" hide-label>
186
- <q2-icon type="edit"></q2-icon>
187
- </q2-btn>
188
- ```
189
-
190
-
191
- ## Testing
192
-
193
- Tecton components are extensively tested with End-to-End (E2E), Unit, and Accessibility tests. This means you don't need to verify core component functionality—we handle that. Your tests should focus on your application logic and how components integrate with your features.
194
-
195
- Key test types to consider for your features:
196
- - **E2E Testing** - Test complete user flows from the user's perspective
197
- - **Integration Testing** - Verify your components work together correctly
198
- - **Accessibility Testing** - Ensure your feature meets accessibility criteria (tools like [aXe DevTools](https://www.deque.com/axe/devtools/) help here)
199
-
200
- Use [Test Methods](/guides/test-methods) to interact with components in tests without reaching into ShadowDOM.
201
-
202
- ## Resources
203
-
204
- <!-- RESOURCES_START -->
205
- - [Components](components/overview.md) — Full catalog of Tecton web components with props, slots, events, and usage examples. Read overview.md to find the right component for any UI need: buttons, inputs, selects, forms, cards, data tables, charts, modals, tooltips, carousels, steppers, tabs, lists, grids, and more. Use these instead of native HTML elements.
206
- - [Theming](theming/overview.md) — How Tecton styles components using layered CSS variables and the complete set of available theme tokens. Read overview.md for the styling guide (variable prefixes, override strategies, platform vs. extension scoping) and the full CSS variable reference — use these tokens instead of writing custom hex values or hardcoded styles.
207
- - [Framework Wrappers](framework-wrappers/overview.md) — Integration guides for using Tecton web components in React and Vue projects. Read overview.md for setup instructions, import patterns, event binding, and idiomatic usage examples for each framework — always use these wrappers instead of raw web component tags in React or Vue codebases.
208
- <!-- RESOURCES_END -->
@@ -1,59 +0,0 @@
1
- # Components
2
-
3
- - [Action Group](q2-action-group.md) — (Display) Use for laying out groups of buttons or links with consistent spacing.
4
- - [Avatar](q2-avatar.md) — (Display) Use for displaying photos, initials, or icons for people, businesses, or accounts.
5
- - [Badge](q2-badge.md) — (Display) Use for displaying counts, statuses, or indicators on other elements.
6
- - [Button](q2-btn.md) — (Forms) Use for triggering actions including submit, save, cancel, or delete.
7
- - [Calendar](q2-calendar.md) — (Forms) Use for selecting a date from a calendar popover.
8
- - [Card Image](q2-card-image.md) — Displays a visual representation of a credit or debit card with customizable styling
9
- - [Card](q2-card.md) — (Display) Use for grouping related content in a contained, elevated surface.
10
- - [Carousel Pane](q2-carousel-pane.md) — (Display) Use as a single slide within a Carousel.
11
- - [Carousel](q2-carousel.md) — (Display) Use for cycling through a series of content slides with swipe or button navigation.
12
- - [Area Chart](q2-chart-area.md) — (Data Visualization) Use for showing trends over time with filled areas under lines.
13
- - [Bar Chart](q2-chart-bar.md) — (Data Visualization) Use for comparing values across categories with horizontal or vertical bars.
14
- - [Donut Chart](q2-chart-donut.md) — (Data Visualization) Use for showing proportions of a whole as segments in a ring.
15
- - [Checkbox Group](q2-checkbox-group.md) — (Forms) Use for selecting multiple options from a set of checkboxes.
16
- - [Checkbox](q2-checkbox.md) — (Forms) Use as a single binary choice; nest within a Checkbox Group for grouped selection.
17
- - [Context](q2-context.md) — (Display) Use for displaying supplementary information or hints alongside content.
18
- - [Currency](q2-currency.md) — (Text) Use for displaying formatted monetary amounts with proper locale.
19
- - [Data Table](q2-data-table.md) — (Display) Use for displaying large datasets with sorting, filtering, and selecting.
20
- - [Detail](q2-detail.md) — (Display) Use for displaying label-value pairs like account details or miscellaneous info.
21
- - [Dropdown](q2-dropdown.md) — (Display) Use for menus of contextual actions triggered by a button click.
22
- - [Editable Field](q2-editable-field.md) — (Forms) Use for inline editing of data that is normally displayed as read-only.
23
- - [File Picker](q2-file-picker.md) — (Forms) Use for uploading files via browse dialog or drag-and-drop.
24
- - [Form](q2-form.md) — (Forms) Use for wrapping form fields with consistent spacing.
25
- - [Formatted Text](q2-formatted-text.md) — (Text) Use for displaying text with formatting like phone numbers, SSN, or dates.
26
- - [Grid Area](q2-grid-area.md) — (Display) Use as a positioned cell within a Grid layout.
27
- - [Grid](q2-grid.md) — (Display) Use for responsive grid layouts with flexible rows and columns.
28
- - [Icon](q2-icon.md) — (Display) Use for displaying icons that represent actions, states, or concepts.
29
- - [Input](q2-input.md) — (Forms) Use for single-line text entry including email, phone, currency, SSN, and password.
30
- - [Item](q2-item.md) — (Display) Use for laying out structured content with header, body, and footer text, icons, and actions.
31
- - [Legend](q2-legend.md) — (Data Visualization) Use for displaying chart legends with interactive item selection.
32
- - [Link](q2-link.md) — (Display) Use for navigation to other pages or sections. Prefer over q2-btn for non-action navigation.
33
- - [List](q2-list.md) — (Display) Use for grouping Item components into a vertical list.
34
- - [Loading](q2-loading.md) — (Feedback) Use to indicate async operations or content loading in progress.
35
- - [Localization](q2-loc.md) — (Text) Use for displaying localized text from translation keys.
36
- - [Message](q2-message.md) — (Feedback) Use for contextual non-blocking notifications like success, error, or info alerts.
37
- - [Meter](q2-meter.md) — (Data Visualization) Use for showing progress or a value within a known range.
38
- - [Mutation Observer](q2-mutation-observer.md) — (Utility) Use for observing DOM changes to child elements and emitting events.
39
- - [Option Group](q2-optgroup.md) — (Forms) Use for grouping related options under a label in Select or Dropdown.
40
- - [Option List](q2-option-list.md) — (Forms) Use internally by Select and Dropdown for rendering searchable option lists.
41
- - [Option](q2-option.md) — (Forms) Use as a selectable item within Select, Dropdown, Tag, or Pill components.
42
- - [Pagination](q2-pagination.md) — (Display) Use for navigating between pages of content like search results or tables.
43
- - [Pill](q2-pill.md) — (Display) Use for displaying and removing active filters in data views.
44
- - [Radio Group](q2-radio-group.md) — (Forms) Use for selecting exactly one option from a small set of choices.
45
- - [Radio](q2-radio.md) — (Forms) Use as a single option within a Radio Group.
46
- - [Relative Time](q2-relative-time.md) — (Text) Use for displaying time differences like "2 hours ago" or "in 3 days".
47
- - [Resize Observer](q2-resize-observer.md) — (Utility) Use for detecting size changes to elements and emitting resize events.
48
- - [Section Container](q2-section-container.md) — (Display) Use for managing multiple collapsible sections with single or multiple open modes.
49
- - [Section](q2-section.md) — (Display) Use for grouping related content with a header and optional collapse.
50
- - [Select](q2-select.md) — (Forms) Use for choosing from a list of options with single-select, multi-select, or search.
51
- - [Stepper Pane](q2-stepper-pane.md) — (Display) Use as a single step within a Stepper or Vertical Stepper.
52
- - [Vertical Stepper](q2-stepper-vertical.md) — (Display) Use for guiding users through a multi-step workflow with vertical progress.
53
- - [Stepper](q2-stepper.md) — (Display) Use for guiding users through a multi-step workflow with horizontal progress.
54
- - [Tab Container](q2-tab-container.md) — (Display) Use for switching between multiple views within the same context.
55
- - [Tab Pane](q2-tab-pane.md) — (Display) Use as a single tab within a Tab Container.
56
- - [Tag](q2-tag.md) — (Display) Use for displaying metadata labels or categories on content.
57
- - [Textarea](q2-textarea.md) — (Forms) Use for multi-line text input like messages, comments, or lengthy descriptions.
58
- - [q2-toast](q2-toast.md)
59
- - [Tooltip](q2-tooltip.md) — (Feedback) Use for brief hints or explanations shown on hover or focus.
@@ -1,118 +0,0 @@
1
- ---
2
- title: Action Group
3
- description: (Display) Use for laying out groups of buttons or links with consistent spacing.
4
- ---
5
- # Action Group
6
-
7
- Use for laying out groups of buttons or links with consistent spacing.
8
-
9
- ## Props
10
-
11
- ### fullWidth
12
-
13
- Whether the slotted elements should take up the full width of the container when in horizontal orientation.
14
-
15
- **Type:**
16
- ```typescript
17
- boolean
18
- ```
19
-
20
- **Default Value:** `undefined`
21
-
22
- > [!WARNING]
23
- > This will prevent the buttons from wrapping when the container is too small to fit all buttons.
24
-
25
-
26
- ### orientation
27
-
28
- The orientation of the buttons, which will override the auto orientation.
29
-
30
- **Type:**
31
- ```typescript
32
- "auto" | "horizontal" | "vertical"
33
- ```
34
-
35
- **Default Value:** `'auto'`
36
-
37
- > [!NOTE]
38
- > This will override and disable the auto determination of the orientation.
39
-
40
- > [!WARNING]
41
- > Vertical orientation is not supported for [Links](https://tecton.q2developer.com/design-system/q2-link/)
42
- or `"coin"` [Buttons](https://tecton.q2developer.com/design-system/q2-btn/), and will be set to "horizontal".
43
-
44
-
45
- ### orientationThreshold
46
-
47
- The width, in pixels, that determines whether to display the buttons in vertical or horizontal orientation
48
-
49
- **Type:**
50
- ```typescript
51
- number
52
- ```
53
-
54
- **Default Value:** `440`
55
-
56
- > [!NOTE]
57
- > The component determines this based on the width of the element itself, not the browser window.
58
-
59
-
60
- ## Design
61
-
62
- ### Overview
63
-
64
- An Action Group is a collection of actions combined to give access to frequently performed, related actions. Actions inside the Action Group follow their parent components' guidelines and states.
65
-
66
- #### Anatomy
67
-
68
- ```html
69
- <q2-action-group>
70
- <q2-btn intent="workflow-primary">Submit</q2-btn>
71
- <q2-btn intent="workflow-secondary">Cancel</q2-btn>
72
- <q2-btn intent="workflow-escape">Reset</q2-btn>
73
- </q2-action-group>
74
- ```
75
-
76
- To insure proper display in the user interface, action groups using buttons should never wrap to two lines or rows. If there is a situation where the action group wraps inside its object, use stacked blocked display to present the buttons.
77
-
78
- #### Usage
79
-
80
- #### When To Use
81
-
82
- - **Actions have a contextual relationship**
83
- - For example, the default button group can be used when a form has a primary and alternative action.
84
- - **Stepping through linear content**
85
- - Actions in an action group can be used for directional navigation and actions ("Back", "Next", "Continue", "Skip", "Cancel")
86
-
87
- #### When To Not Use
88
-
89
- - **If actions are not related**
90
- - Consider how placement and alternative structure of unrelated actions can improve usability over placing all actions in a group.
91
- - **Linking to content**
92
- - Buttons in button groups should not be used when text links would be simpler and more contextually appropriate. Grouped buttons such as "Next" and "Previous" are acceptable when content is organized sequentially.
93
-
94
- #### Usability Guidance
95
-
96
- - **Avoid burden of choice.**
97
-
98
- - Try not to present the user with too many options (4 actions maximum)
99
- - **Don't mix differently sized buttons in the same group**
100
- - **Use only one primary button in a button group**
101
- - **Attempt to maintain consistency with other pages when placing the primary action.**
102
- - **Use short, descriptive button labels to describe controls.**
103
- - Button labels should be concise and clear enough to indicate what will happen when the button is interacted with
104
-
105
-
106
-
107
-
108
-
109
- ## Dependencies
110
-
111
- ### Uses
112
-
113
- - `q2-resize-observer`
114
-
115
- ### Used By
116
-
117
- - `q2-context`
118
- - `q2-modal`
@@ -1,85 +0,0 @@
1
- ---
2
- title: Avatar
3
- description: (Display) Use for displaying photos, initials, or icons for people, businesses, or accounts.
4
- ---
5
- # Avatar
6
-
7
- Use for displaying photos, initials, or icons for people, businesses, or accounts.
8
-
9
- ## Props
10
-
11
- ### icon
12
-
13
- A [q2-icon](https://tecton.q2developer.com/design-system/q2-icon/) to display as the fallback.
14
-
15
- **Type:**
16
- ```typescript
17
- string
18
- ```
19
-
20
- **Default Value:** `'person'`
21
-
22
- ### initials
23
-
24
- A set of up to four initials to display as capitalized text. Takes priority over `name`.
25
-
26
- **Type:**
27
- ```typescript
28
- string
29
- ```
30
-
31
- **Default Value:** `undefined`
32
-
33
- ### name
34
-
35
- The name associated with the avatar.
36
- The initials of the first and last words provided will display as capital letters.
37
-
38
- **Type:**
39
- ```typescript
40
- string
41
- ```
42
-
43
- **Default Value:** `undefined`
44
-
45
- > [!NOTE]
46
- > We recommend always providing a name when you want the avatar to be presented to screen readers.
47
-
48
-
49
- ### size
50
-
51
- Determines how large to make the avatar
52
-
53
- **Type:**
54
- ```typescript
55
- "large" | "medium" | "small"
56
- ```
57
-
58
- **Default Value:** `'medium'`
59
-
60
- ### src
61
-
62
- Displays the image provided by the user.
63
-
64
- **Type:**
65
- ```typescript
66
- string
67
- ```
68
-
69
- **Default Value:** `undefined`
70
-
71
- ## Slots
72
-
73
- | Name | Description |
74
- |------|-------------|
75
- | `decorator` | An optional affordance indicator to display in the top-right corner |
76
-
77
- ## Dependencies
78
-
79
- ### Uses
80
-
81
- - `q2-icon`
82
-
83
- ### Used By
84
-
85
- - `q2-card`
@@ -1,102 +0,0 @@
1
- ---
2
- title: Badge
3
- description: (Display) Use for displaying counts, statuses, or indicators on other elements.
4
- ---
5
- # Badge
6
-
7
- Use for displaying counts, statuses, or indicators on other elements.
8
-
9
- ## Props
10
-
11
- ### maxLength
12
-
13
- The number of characters to show. A maximum limit of 18 characters is acceptable.
14
-
15
- **Type:**
16
- ```typescript
17
- number
18
- ```
19
-
20
- **Default Value:** `undefined`
21
-
22
- ### size
23
-
24
- The size of the badge.
25
-
26
- **Type:**
27
- ```typescript
28
- "default" | "large"
29
- ```
30
-
31
- **Default Value:** `undefined`
32
-
33
- ### status
34
-
35
- The stoplight color of the element when `theme` is not present.
36
-
37
- **Type:**
38
- ```typescript
39
- "alert" | "info" | "success" | "warning"
40
- ```
41
-
42
- **Default Value:** `undefined`
43
-
44
- ### theme
45
-
46
- The color of the badge when in the active state.
47
- The `theme` has higher priority than `status`.
48
-
49
- **Type:**
50
- ```typescript
51
- "primary" | "secondary" | "tertiary"
52
- ```
53
-
54
- **Default Value:** `undefined`
55
-
56
- ### value
57
-
58
- > [!NOTE]
59
- > This prop is localizable.
60
-
61
- What to display in the badge. Negative numbers will be shown as positive.
62
-
63
- **Type:**
64
- ```typescript
65
- number | string
66
- ```
67
-
68
- **Default Value:** `undefined`
69
-
70
- > [!NOTE]
71
- > `q2-badge` also has limited support for slotted HTML elements.
72
-
73
-
74
- ## Methods
75
-
76
- ### getTextContent
77
-
78
- ```typescript
79
- getTextContent() => Promise<string>
80
- ```
81
-
82
- Returns the text content of the badge. This accounts for the text in slotted elements or the Shadow DOM.
83
-
84
- **Returns:** `Promise<string>`
85
-
86
- ## Accessibility
87
-
88
- ### Decorator Text
89
-
90
- When using the q2-badge in its "empty" state as a decorator in other elements, it is the implementer's responsibility to ensure proper screen reader text is made available for assistive technologies.
91
-
92
- When the q2-badge has a value, the element will be visible to assistive technologies and will be read aloud.
93
-
94
-
95
-
96
- ## Dependencies
97
-
98
- ### Used By
99
-
100
- - `q2-data-table`
101
- - `q2-input`
102
- - `q2-tab-container`