@vsn-ux/gaia-styles 0.6.0 → 0.6.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.
- package/dist/docs/Avatar.md +52 -0
- package/dist/docs/Badge.md +60 -0
- package/dist/docs/Button.md +60 -0
- package/dist/docs/Calendar.md +468 -0
- package/dist/docs/Card.md +57 -0
- package/dist/docs/Checkbox.md +112 -0
- package/dist/docs/Container.md +62 -0
- package/dist/docs/Datepicker.md +107 -0
- package/dist/docs/Dropdown.md +152 -0
- package/dist/docs/FormField.md +101 -0
- package/dist/docs/Input.md +84 -0
- package/dist/docs/Link.md +109 -0
- package/dist/docs/Menu.md +316 -0
- package/dist/docs/Modal.md +337 -0
- package/dist/docs/Notification.md +341 -0
- package/dist/docs/ProgressBar.md +87 -0
- package/dist/docs/ProgressIndicator.md +217 -0
- package/dist/docs/QuickFilterButton.md +74 -0
- package/dist/docs/Radio.md +106 -0
- package/dist/docs/SegmentedControl.md +69 -0
- package/dist/docs/Select.md +411 -0
- package/dist/docs/Switch.md +97 -0
- package/dist/docs/Tabs.md +129 -0
- package/dist/docs/Tag.md +154 -0
- package/dist/docs/TextArea.md +51 -0
- package/dist/docs/TextSize.md +63 -0
- package/dist/docs/Tooltip.md +95 -0
- package/package.json +3 -1
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Progress Bar
|
|
2
|
+
|
|
3
|
+
## Visual Structure
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
ga-progress [--success|--error|--indeterminate]
|
|
7
|
+
├── ga-progress__label (optional)
|
|
8
|
+
├── ga-progress__buffer
|
|
9
|
+
│ └── ga-progress__bar
|
|
10
|
+
└── ga-progress__helper (optional)
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Elements Hierarchy
|
|
14
|
+
|
|
15
|
+
### Core Block
|
|
16
|
+
|
|
17
|
+
- `ga-progress` - Main container for the progress bar component
|
|
18
|
+
|
|
19
|
+
### Mandatory Elements
|
|
20
|
+
|
|
21
|
+
- `ga-progress__buffer` - Background buffer for the progress bar
|
|
22
|
+
- `ga-progress__bar` - Actual progress indicator
|
|
23
|
+
|
|
24
|
+
### Optional Elements
|
|
25
|
+
|
|
26
|
+
- `ga-progress__label` - Label for the progress bar
|
|
27
|
+
- `ga-progress__helper` - Helper text providing additional context
|
|
28
|
+
|
|
29
|
+
### Modifiers
|
|
30
|
+
|
|
31
|
+
- `ga-progress--success` - Indicates a successful operation
|
|
32
|
+
- `ga-progress--error` - Indicates an error or failure
|
|
33
|
+
- `ga-progress--indeterminate` - Represents an ongoing process without a defined end
|
|
34
|
+
|
|
35
|
+
## Examples
|
|
36
|
+
|
|
37
|
+
### Default
|
|
38
|
+
|
|
39
|
+
```html
|
|
40
|
+
<div class="ga-progress w-40">
|
|
41
|
+
<div class="ga-progress__label">Label</div>
|
|
42
|
+
<div class="ga-progress__buffer">
|
|
43
|
+
<div class="ga-progress__bar" style="width: 40%"></div>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="ga-progress__helper">Helper text</div>
|
|
46
|
+
</div>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Success
|
|
50
|
+
|
|
51
|
+
```html
|
|
52
|
+
<div class="ga-progress ga-progress--success w-40">
|
|
53
|
+
<div class="ga-progress__label">Label</div>
|
|
54
|
+
<div class="ga-progress__buffer">
|
|
55
|
+
<div class="ga-progress__bar" style="width: 40%"></div>
|
|
56
|
+
</div>
|
|
57
|
+
<div class="ga-progress__helper">
|
|
58
|
+
<!-- icon: circle-check, size=16, class="ga-icon" -->
|
|
59
|
+
Helper text
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Error
|
|
65
|
+
|
|
66
|
+
```html
|
|
67
|
+
<div class="ga-progress ga-progress--error w-40">
|
|
68
|
+
<div class="ga-progress__label">Label</div>
|
|
69
|
+
<div class="ga-progress__buffer">
|
|
70
|
+
<div class="ga-progress__bar" style="width: 40%"></div>
|
|
71
|
+
</div>
|
|
72
|
+
<div class="ga-progress__helper">
|
|
73
|
+
<!-- icon: octagon-alert, size=16, class="ga-icon" -->
|
|
74
|
+
Helper text
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Indeterminate
|
|
80
|
+
|
|
81
|
+
```html
|
|
82
|
+
<div class="ga-progress ga-progress--indeterminate w-40">
|
|
83
|
+
<div class="ga-progress__label">Label</div>
|
|
84
|
+
<div class="ga-progress__buffer"><div class="ga-progress__bar"></div></div>
|
|
85
|
+
<div class="ga-progress__helper">Helper text</div>
|
|
86
|
+
</div>
|
|
87
|
+
```
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
# Progress Indicator
|
|
2
|
+
|
|
3
|
+
A component for displaying multi-step progress, such as wizards, checkout flows, or onboarding processes.
|
|
4
|
+
|
|
5
|
+
## Visual Structure
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
ga-progress-indicator [--vertical|--horizontal]
|
|
9
|
+
├── ga-progress-indicator__item [--completed|--current|--incomplete|--error|--disabled]
|
|
10
|
+
│ ├── ga-progress-indicator__indicator
|
|
11
|
+
│ │ ├── ga-icon
|
|
12
|
+
│ │ └── ga-progress-indicator__current-dot (optional, for current state)
|
|
13
|
+
│ └── ga-progress-indicator__content
|
|
14
|
+
│ ├── ga-progress-indicator__label
|
|
15
|
+
│ │ ├── ga-progress-indicator__label-text
|
|
16
|
+
│ │ └── ga-progress-indicator__label-state (optional)
|
|
17
|
+
│ └── ga-progress-indicator__description (optional)
|
|
18
|
+
├── ga-progress-indicator__item
|
|
19
|
+
└── ...
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Elements Hierarchy
|
|
23
|
+
|
|
24
|
+
### Core Block
|
|
25
|
+
|
|
26
|
+
- `ga-progress-indicator` - Main container for the progress indicator component
|
|
27
|
+
|
|
28
|
+
### Mandatory Elements
|
|
29
|
+
|
|
30
|
+
- `ga-progress-indicator__item` - Individual step item (use `<button>` for clickable steps). The border-top/border-left acts as the connector line.
|
|
31
|
+
- `ga-progress-indicator__indicator` - Icon container (positioned to the left of content)
|
|
32
|
+
- `ga-progress-indicator__content` - Container for label and description (aligned vertically)
|
|
33
|
+
- `ga-progress-indicator__label` - Label wrapper
|
|
34
|
+
- `ga-progress-indicator__label-text` - The text content of the step label
|
|
35
|
+
|
|
36
|
+
### Optional Elements
|
|
37
|
+
|
|
38
|
+
- `ga-progress-indicator__current-dot` - Small dot inside the indicator for current state
|
|
39
|
+
- `ga-progress-indicator__label-state` - Additional text for the label (e.g., "(optional)")
|
|
40
|
+
- `ga-progress-indicator__description` - Helper text below the label (aligned with label, not icon)
|
|
41
|
+
|
|
42
|
+
### Block Modifiers
|
|
43
|
+
|
|
44
|
+
- `ga-progress-indicator--vertical` - Arranges items in a vertical column (border-left as connector)
|
|
45
|
+
- `ga-progress-indicator--horizontal` - Arranges items in a horizontal row (border-top as connector)
|
|
46
|
+
|
|
47
|
+
### Item State Modifiers
|
|
48
|
+
|
|
49
|
+
- `ga-progress-indicator__item--completed` - Step has been completed. Use `CircleCheckBigIcon` (size 22).
|
|
50
|
+
- `ga-progress-indicator__item--current` - Currently active step. Use `CircleDashedIcon` (size 22) with `ga-progress-indicator__current-dot` inside.
|
|
51
|
+
- `ga-progress-indicator__item--incomplete` - Step not yet reached. Use `CircleDashedIcon` (size 22).
|
|
52
|
+
- `ga-progress-indicator__item--error` - Step has an error. Use `OctagonAlertIcon` (size 22).
|
|
53
|
+
- `ga-progress-indicator__item--disabled` - Step is disabled/non-interactive. Use `CircleDashedIcon` (size 22).
|
|
54
|
+
|
|
55
|
+
## Horizontal
|
|
56
|
+
|
|
57
|
+
```html
|
|
58
|
+
<div class="ga-progress-indicator ga-progress-indicator--horizontal w-250">
|
|
59
|
+
<button
|
|
60
|
+
class="ga-progress-indicator__item ga-progress-indicator__item--completed"
|
|
61
|
+
>
|
|
62
|
+
<div class="ga-progress-indicator__indicator">
|
|
63
|
+
<!-- icon: circle-check-big, size=22, class="ga-icon" -->
|
|
64
|
+
</div>
|
|
65
|
+
<div class="ga-progress-indicator__content">
|
|
66
|
+
<span class="ga-progress-indicator__label">
|
|
67
|
+
<span class="ga-progress-indicator__label-text">Account setup</span>
|
|
68
|
+
</span>
|
|
69
|
+
</div>
|
|
70
|
+
</button>
|
|
71
|
+
<button
|
|
72
|
+
class="ga-progress-indicator__item ga-progress-indicator__item--current"
|
|
73
|
+
>
|
|
74
|
+
<div class="ga-progress-indicator__indicator">
|
|
75
|
+
<!-- icon: circle-dashed, size=22, class="ga-icon" -->
|
|
76
|
+
<span class="ga-progress-indicator__current-dot"></span>
|
|
77
|
+
</div>
|
|
78
|
+
<div class="ga-progress-indicator__content">
|
|
79
|
+
<span class="ga-progress-indicator__label">
|
|
80
|
+
<span class="ga-progress-indicator__label-text">Personal info</span>
|
|
81
|
+
</span>
|
|
82
|
+
<span class="ga-progress-indicator__description">
|
|
83
|
+
Provide your personal details.
|
|
84
|
+
</span>
|
|
85
|
+
</div>
|
|
86
|
+
</button>
|
|
87
|
+
<button
|
|
88
|
+
class="ga-progress-indicator__item ga-progress-indicator__item--incomplete"
|
|
89
|
+
>
|
|
90
|
+
<div class="ga-progress-indicator__indicator">
|
|
91
|
+
<!-- icon: circle-dashed, size=22, class="ga-icon" -->
|
|
92
|
+
</div>
|
|
93
|
+
<div class="ga-progress-indicator__content">
|
|
94
|
+
<span class="ga-progress-indicator__label">
|
|
95
|
+
<span class="ga-progress-indicator__label-text">Preferences</span>
|
|
96
|
+
<span class="ga-progress-indicator__label-state">(optional)</span>
|
|
97
|
+
</span>
|
|
98
|
+
<span class="ga-progress-indicator__description">
|
|
99
|
+
Set your notification preferences.
|
|
100
|
+
</span>
|
|
101
|
+
</div>
|
|
102
|
+
</button>
|
|
103
|
+
<button
|
|
104
|
+
class="ga-progress-indicator__item ga-progress-indicator__item--error"
|
|
105
|
+
>
|
|
106
|
+
<div class="ga-progress-indicator__indicator">
|
|
107
|
+
<!-- icon: octagon-alert, size=22, class="ga-icon" -->
|
|
108
|
+
</div>
|
|
109
|
+
<div class="ga-progress-indicator__content">
|
|
110
|
+
<span class="ga-progress-indicator__label">
|
|
111
|
+
<span class="ga-progress-indicator__label-text">Verification</span>
|
|
112
|
+
</span>
|
|
113
|
+
<span class="ga-progress-indicator__description">
|
|
114
|
+
Identity verification failed.
|
|
115
|
+
</span>
|
|
116
|
+
</div>
|
|
117
|
+
</button>
|
|
118
|
+
<button
|
|
119
|
+
class="ga-progress-indicator__item ga-progress-indicator__item--disabled"
|
|
120
|
+
disabled=""
|
|
121
|
+
>
|
|
122
|
+
<div class="ga-progress-indicator__indicator">
|
|
123
|
+
<!-- icon: circle-dashed, size=22, class="ga-icon" -->
|
|
124
|
+
</div>
|
|
125
|
+
<div class="ga-progress-indicator__content">
|
|
126
|
+
<span class="ga-progress-indicator__label">
|
|
127
|
+
<span class="ga-progress-indicator__label-text">Confirmation</span>
|
|
128
|
+
</span>
|
|
129
|
+
<span class="ga-progress-indicator__description">
|
|
130
|
+
Finalize your registration.
|
|
131
|
+
</span>
|
|
132
|
+
</div>
|
|
133
|
+
</button>
|
|
134
|
+
</div>
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Vertical
|
|
138
|
+
|
|
139
|
+
```html
|
|
140
|
+
<div class="ga-progress-indicator ga-progress-indicator--vertical w-60">
|
|
141
|
+
<button
|
|
142
|
+
class="ga-progress-indicator__item ga-progress-indicator__item--completed"
|
|
143
|
+
>
|
|
144
|
+
<div class="ga-progress-indicator__indicator">
|
|
145
|
+
<!-- icon: circle-check-big, size=22, class="ga-icon" -->
|
|
146
|
+
</div>
|
|
147
|
+
<div class="ga-progress-indicator__content">
|
|
148
|
+
<span class="ga-progress-indicator__label">
|
|
149
|
+
<span class="ga-progress-indicator__label-text">Account setup</span>
|
|
150
|
+
</span>
|
|
151
|
+
</div>
|
|
152
|
+
</button>
|
|
153
|
+
<button
|
|
154
|
+
class="ga-progress-indicator__item ga-progress-indicator__item--current"
|
|
155
|
+
>
|
|
156
|
+
<div class="ga-progress-indicator__indicator">
|
|
157
|
+
<!-- icon: circle-dashed, size=22, class="ga-icon" -->
|
|
158
|
+
<span class="ga-progress-indicator__current-dot"></span>
|
|
159
|
+
</div>
|
|
160
|
+
<div class="ga-progress-indicator__content">
|
|
161
|
+
<span class="ga-progress-indicator__label">
|
|
162
|
+
<span class="ga-progress-indicator__label-text">Personal info</span>
|
|
163
|
+
</span>
|
|
164
|
+
<span class="ga-progress-indicator__description">
|
|
165
|
+
Provide your personal details.
|
|
166
|
+
</span>
|
|
167
|
+
</div>
|
|
168
|
+
</button>
|
|
169
|
+
<button
|
|
170
|
+
class="ga-progress-indicator__item ga-progress-indicator__item--incomplete"
|
|
171
|
+
>
|
|
172
|
+
<div class="ga-progress-indicator__indicator">
|
|
173
|
+
<!-- icon: circle-dashed, size=22, class="ga-icon" -->
|
|
174
|
+
</div>
|
|
175
|
+
<div class="ga-progress-indicator__content">
|
|
176
|
+
<span class="ga-progress-indicator__label">
|
|
177
|
+
<span class="ga-progress-indicator__label-text">Preferences</span>
|
|
178
|
+
<span class="ga-progress-indicator__label-state">(optional)</span>
|
|
179
|
+
</span>
|
|
180
|
+
<span class="ga-progress-indicator__description">
|
|
181
|
+
Set your notification preferences.
|
|
182
|
+
</span>
|
|
183
|
+
</div>
|
|
184
|
+
</button>
|
|
185
|
+
<button
|
|
186
|
+
class="ga-progress-indicator__item ga-progress-indicator__item--error"
|
|
187
|
+
>
|
|
188
|
+
<div class="ga-progress-indicator__indicator">
|
|
189
|
+
<!-- icon: octagon-alert, size=22, class="ga-icon" -->
|
|
190
|
+
</div>
|
|
191
|
+
<div class="ga-progress-indicator__content">
|
|
192
|
+
<span class="ga-progress-indicator__label">
|
|
193
|
+
<span class="ga-progress-indicator__label-text">Verification</span>
|
|
194
|
+
</span>
|
|
195
|
+
<span class="ga-progress-indicator__description">
|
|
196
|
+
Identity verification failed.
|
|
197
|
+
</span>
|
|
198
|
+
</div>
|
|
199
|
+
</button>
|
|
200
|
+
<button
|
|
201
|
+
class="ga-progress-indicator__item ga-progress-indicator__item--disabled"
|
|
202
|
+
disabled=""
|
|
203
|
+
>
|
|
204
|
+
<div class="ga-progress-indicator__indicator">
|
|
205
|
+
<!-- icon: circle-dashed, size=22, class="ga-icon" -->
|
|
206
|
+
</div>
|
|
207
|
+
<div class="ga-progress-indicator__content">
|
|
208
|
+
<span class="ga-progress-indicator__label">
|
|
209
|
+
<span class="ga-progress-indicator__label-text">Confirmation</span>
|
|
210
|
+
</span>
|
|
211
|
+
<span class="ga-progress-indicator__description">
|
|
212
|
+
Finalize your registration.
|
|
213
|
+
</span>
|
|
214
|
+
</div>
|
|
215
|
+
</button>
|
|
216
|
+
</div>
|
|
217
|
+
```
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Quick Filter Button
|
|
2
|
+
|
|
3
|
+
## Visual Structure
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
ga-quick-filter-button [--selected|--transparent|--disabled]
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Elements Hierarchy
|
|
10
|
+
|
|
11
|
+
### Core Block
|
|
12
|
+
|
|
13
|
+
- `ga-quick-filter-button` - Main container for the quick filter button component used for filtering content
|
|
14
|
+
|
|
15
|
+
### Modifiers
|
|
16
|
+
|
|
17
|
+
- `ga-quick-filter-button--selected` - Selected state indicating the filter is active
|
|
18
|
+
- `ga-quick-filter-button--transparent` - Transparent variant for use on colored backgrounds
|
|
19
|
+
- `ga-quick-filter-button--disabled` - An explicit disabled state (can be omitted if used on a native `<button>` element)
|
|
20
|
+
|
|
21
|
+
## Examples
|
|
22
|
+
|
|
23
|
+
### Default
|
|
24
|
+
|
|
25
|
+
```html
|
|
26
|
+
<button class="ga-quick-filter-button">Button</button>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### With Icon
|
|
30
|
+
|
|
31
|
+
```html
|
|
32
|
+
<button class="ga-quick-filter-button">
|
|
33
|
+
<!-- icon: user-round-plus, size=24, class="ga-icon" -->
|
|
34
|
+
Button
|
|
35
|
+
</button>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Selected
|
|
39
|
+
|
|
40
|
+
```html
|
|
41
|
+
<button class="ga-quick-filter-button ga-quick-filter-button--selected">
|
|
42
|
+
Button
|
|
43
|
+
</button>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Selected with Icon
|
|
47
|
+
|
|
48
|
+
```html
|
|
49
|
+
<button class="ga-quick-filter-button ga-quick-filter-button--selected">
|
|
50
|
+
<!-- icon: user-round-plus, size=24, class="ga-icon" -->
|
|
51
|
+
Button
|
|
52
|
+
</button>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Transparent
|
|
56
|
+
|
|
57
|
+
```html
|
|
58
|
+
<button class="ga-quick-filter-button ga-quick-filter-button--transparent">
|
|
59
|
+
<!-- icon: user-round-plus, size=24, class="ga-icon" -->
|
|
60
|
+
Button
|
|
61
|
+
</button>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Disabled
|
|
65
|
+
|
|
66
|
+
```html
|
|
67
|
+
<button
|
|
68
|
+
class="ga-quick-filter-button ga-quick-filter-button--disabled"
|
|
69
|
+
disabled=""
|
|
70
|
+
>
|
|
71
|
+
<!-- icon: user-round-plus, size=24, class="ga-icon" -->
|
|
72
|
+
Button
|
|
73
|
+
</button>
|
|
74
|
+
```
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Radio Button
|
|
2
|
+
|
|
3
|
+
## Visual Structure
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
ga-radio-button [--invalid]
|
|
7
|
+
├── ga-radio-button__native
|
|
8
|
+
├── ga-radio-button__marker
|
|
9
|
+
└── ga-radio-button__label (optional)
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Elements Hierarchy
|
|
13
|
+
|
|
14
|
+
### Core Block
|
|
15
|
+
|
|
16
|
+
- `ga-radio-button` - Main container for the radio button component
|
|
17
|
+
|
|
18
|
+
### Mandatory Elements
|
|
19
|
+
|
|
20
|
+
- `ga-radio-button__native` - Native HTML radio input element (visually hidden)
|
|
21
|
+
- `ga-radio-button__marker` - Visual circular marker for the radio button state
|
|
22
|
+
|
|
23
|
+
### Optional Elements
|
|
24
|
+
|
|
25
|
+
- `ga-radio-button__label` - Text label for the radio button
|
|
26
|
+
|
|
27
|
+
### Modifiers
|
|
28
|
+
|
|
29
|
+
- `ga-radio-button--invalid` - Styles the radio button to indicate an invalid/error state
|
|
30
|
+
|
|
31
|
+
## Additional Elements
|
|
32
|
+
|
|
33
|
+
- `ga-radio-group` - Container for grouping multiple radio buttons with proper spacing
|
|
34
|
+
|
|
35
|
+
## Examples
|
|
36
|
+
|
|
37
|
+
### Default
|
|
38
|
+
|
|
39
|
+
```html
|
|
40
|
+
<label class="ga-radio-button">
|
|
41
|
+
<input
|
|
42
|
+
type="radio"
|
|
43
|
+
class="ga-radio-button__native"
|
|
44
|
+
name="radio1"
|
|
45
|
+
checked=""
|
|
46
|
+
/>
|
|
47
|
+
<div class="ga-radio-button__marker"></div>
|
|
48
|
+
<div class="ga-radio-button__label">Option A</div>
|
|
49
|
+
</label>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Disabled
|
|
53
|
+
|
|
54
|
+
```html
|
|
55
|
+
<label class="ga-radio-button">
|
|
56
|
+
<input type="radio" class="ga-radio-button__native" disabled="" checked="" />
|
|
57
|
+
<div class="ga-radio-button__marker"></div>
|
|
58
|
+
<div class="ga-radio-button__label">Option A</div>
|
|
59
|
+
</label>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Invalid
|
|
63
|
+
|
|
64
|
+
```html
|
|
65
|
+
<label class="ga-radio-button ga-radio-button--invalid">
|
|
66
|
+
<input type="radio" class="ga-radio-button__native" required="" />
|
|
67
|
+
<div class="ga-radio-button__marker"></div>
|
|
68
|
+
<div class="ga-radio-button__label">Option A</div>
|
|
69
|
+
</label>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### No Label
|
|
73
|
+
|
|
74
|
+
```html
|
|
75
|
+
<div class="ga-radio-button">
|
|
76
|
+
<input type="radio" class="ga-radio-button__native" name="radio2" />
|
|
77
|
+
<div class="ga-radio-button__marker"></div>
|
|
78
|
+
</div>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Radio Group
|
|
82
|
+
|
|
83
|
+
```html
|
|
84
|
+
<div class="ga-radio-group">
|
|
85
|
+
<label class="ga-radio-button">
|
|
86
|
+
<input
|
|
87
|
+
type="radio"
|
|
88
|
+
class="ga-radio-button__native"
|
|
89
|
+
name="radio3"
|
|
90
|
+
checked=""
|
|
91
|
+
/>
|
|
92
|
+
<div class="ga-radio-button__marker"></div>
|
|
93
|
+
<div class="ga-radio-button__label">Option A</div>
|
|
94
|
+
</label>
|
|
95
|
+
<label class="ga-radio-button">
|
|
96
|
+
<input type="radio" class="ga-radio-button__native" name="radio3" />
|
|
97
|
+
<div class="ga-radio-button__marker"></div>
|
|
98
|
+
<div class="ga-radio-button__label">Option B</div>
|
|
99
|
+
</label>
|
|
100
|
+
<label class="ga-radio-button">
|
|
101
|
+
<input type="radio" class="ga-radio-button__native" name="radio3" />
|
|
102
|
+
<div class="ga-radio-button__marker"></div>
|
|
103
|
+
<div class="ga-radio-button__label">Option C</div>
|
|
104
|
+
</label>
|
|
105
|
+
</div>
|
|
106
|
+
```
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Segmented Control
|
|
2
|
+
|
|
3
|
+
## Visual Structure
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
ga-segmented-control
|
|
7
|
+
└── ga-segmented-control__button [--selected] [--icon-only]
|
|
8
|
+
└── ga-segmented-control__button-sr-label (optional)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Elements Hierarchy
|
|
12
|
+
|
|
13
|
+
### Core Block
|
|
14
|
+
|
|
15
|
+
- `ga-segmented-control` - Main container for the entire segmented control component
|
|
16
|
+
|
|
17
|
+
### Mandatory Elements
|
|
18
|
+
|
|
19
|
+
- `ga-segmented-control__button` - Individual button segments within the control
|
|
20
|
+
|
|
21
|
+
### Optional Elements
|
|
22
|
+
|
|
23
|
+
- `ga-segmented-control__button-sr-label` - Hidden label for screen readers when using an icon-only button, alternative to aria-label
|
|
24
|
+
|
|
25
|
+
### Modifiers
|
|
26
|
+
|
|
27
|
+
- `ga-segmented-control__button--icon-only` - Styles the button to only display an icon. Make sure the icon is 16px in size.
|
|
28
|
+
- `ga-segmented-control__button--selected` - Styles the button as currently selected
|
|
29
|
+
|
|
30
|
+
## Examples
|
|
31
|
+
|
|
32
|
+
### Text
|
|
33
|
+
|
|
34
|
+
```html
|
|
35
|
+
<div class="ga-segmented-control">
|
|
36
|
+
<button
|
|
37
|
+
class="ga-segmented-control__button ga-segmented-control__button--selected"
|
|
38
|
+
>
|
|
39
|
+
All documents
|
|
40
|
+
</button>
|
|
41
|
+
<button class="ga-segmented-control__button">Invoices</button>
|
|
42
|
+
<button class="ga-segmented-control__button">Expense claims</button>
|
|
43
|
+
</div>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Icon
|
|
47
|
+
|
|
48
|
+
```html
|
|
49
|
+
<div class="ga-segmented-control">
|
|
50
|
+
<button
|
|
51
|
+
class="ga-segmented-control__button ga-segmented-control__button--icon-only ga-segmented-control__button--selected"
|
|
52
|
+
>
|
|
53
|
+
<!-- icon: tree-palm, size=16 -->
|
|
54
|
+
<span class="ga-segmented-control__button-sr-label">Item 1</span>
|
|
55
|
+
</button>
|
|
56
|
+
<button
|
|
57
|
+
class="ga-segmented-control__button ga-segmented-control__button--icon-only"
|
|
58
|
+
>
|
|
59
|
+
<!-- icon: hand, size=16 -->
|
|
60
|
+
<span class="ga-segmented-control__button-sr-label">Item 2</span>
|
|
61
|
+
</button>
|
|
62
|
+
<button
|
|
63
|
+
class="ga-segmented-control__button ga-segmented-control__button--icon-only"
|
|
64
|
+
aria-label="Item 3"
|
|
65
|
+
>
|
|
66
|
+
<!-- icon: shopping-cart, size=16 -->
|
|
67
|
+
</button>
|
|
68
|
+
</div>
|
|
69
|
+
```
|