@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
package/dist/docs/Tag.md
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Tag
|
|
2
|
+
|
|
3
|
+
## Visual Structure
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
ga-tag [--information|--success|--error|--warning|--disabled|--interactive|--interactive-disabled|--interactive-selected|--interactive-selected-disabled|--utility-*]
|
|
7
|
+
├── ga-tag__icon (optional)
|
|
8
|
+
├── ga-tag__label
|
|
9
|
+
├── ga-tag__separator (optional)
|
|
10
|
+
└── ga-tag__icon (optional)
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Elements Hierarchy
|
|
14
|
+
|
|
15
|
+
### Core Block
|
|
16
|
+
|
|
17
|
+
- `ga-tag` - Main container for the tag component
|
|
18
|
+
|
|
19
|
+
### Mandatory Elements
|
|
20
|
+
|
|
21
|
+
- `ga-tag__label` - Text content of the tag
|
|
22
|
+
|
|
23
|
+
### Optional Elements
|
|
24
|
+
|
|
25
|
+
- `ga-tag__icon` - Icons that can appear before or after the label
|
|
26
|
+
- `ga-tag__separator` - Visual divider between content elements
|
|
27
|
+
|
|
28
|
+
### Modifiers
|
|
29
|
+
|
|
30
|
+
#### Status Variants
|
|
31
|
+
|
|
32
|
+
- `ga-tag--information` - Styles the tag with information colors
|
|
33
|
+
- `ga-tag--success` - Styles the tag with success colors
|
|
34
|
+
- `ga-tag--error` - Styles the tag with error colors
|
|
35
|
+
- `ga-tag--warning` - Styles the tag with warning colors
|
|
36
|
+
- `ga-tag--disabled` - Styles the tag as disabled
|
|
37
|
+
|
|
38
|
+
#### Interactive Variants
|
|
39
|
+
|
|
40
|
+
- `ga-tag--interactive` - Makes tag clickable with dashed border
|
|
41
|
+
- `ga-tag--interactive-disabled` - Disabled version of interactive tag
|
|
42
|
+
- `ga-tag--interactive-selected` - Selected state for interactive tag
|
|
43
|
+
- `ga-tag--interactive-selected-disabled` - Disabled version of selected tag
|
|
44
|
+
|
|
45
|
+
#### Utility Color Variants
|
|
46
|
+
|
|
47
|
+
- `ga-tag--utility-grey` - Grey color theme
|
|
48
|
+
- `ga-tag--utility-indigo` - Indigo color theme
|
|
49
|
+
- `ga-tag--utility-teal` - Teal color theme
|
|
50
|
+
- `ga-tag--utility-lime` - Lime color theme
|
|
51
|
+
- `ga-tag--utility-purple` - Purple color theme
|
|
52
|
+
- `ga-tag--utility-pink` - Pink color theme
|
|
53
|
+
- `ga-tag--utility-rose` - Rose color theme
|
|
54
|
+
- `ga-tag--utility-blue` - Blue color theme
|
|
55
|
+
- `ga-tag--utility-green` - Green color theme
|
|
56
|
+
- `ga-tag--utility-orange` - Orange color theme
|
|
57
|
+
- `ga-tag--utility-disabled` - Disabled state for utility tags
|
|
58
|
+
|
|
59
|
+
## Examples
|
|
60
|
+
|
|
61
|
+
### Regular Status Tags
|
|
62
|
+
|
|
63
|
+
```html
|
|
64
|
+
<div class="ga-tag ga-tag--success">
|
|
65
|
+
<!-- icon: circle-check, size=16, class="ga-tag__icon" -->
|
|
66
|
+
<span class="ga-tag__label">Success</span>
|
|
67
|
+
</div>
|
|
68
|
+
<div class="ga-tag ga-tag--warning">
|
|
69
|
+
<!-- icon: triangle-alert, size=16, class="ga-tag__icon" -->
|
|
70
|
+
<span class="ga-tag__label">Warning</span>
|
|
71
|
+
</div>
|
|
72
|
+
<div class="ga-tag ga-tag--information">
|
|
73
|
+
<!-- icon: info, size=16, class="ga-tag__icon" -->
|
|
74
|
+
<span class="ga-tag__label">Information</span>
|
|
75
|
+
</div>
|
|
76
|
+
<div class="ga-tag ga-tag--error">
|
|
77
|
+
<!-- icon: octagon-alert, size=16, class="ga-tag__icon" -->
|
|
78
|
+
<span class="ga-tag__label">Error</span>
|
|
79
|
+
</div>
|
|
80
|
+
<div class="ga-tag ga-tag--disabled">
|
|
81
|
+
<!-- icon: circle-check, size=16, class="ga-tag__icon" -->
|
|
82
|
+
<span class="ga-tag__label">Disabled</span>
|
|
83
|
+
</div>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Interactive Tags
|
|
87
|
+
|
|
88
|
+
```html
|
|
89
|
+
<div tabindex="0" class="ga-tag ga-tag--interactive">
|
|
90
|
+
<!-- icon: plus, size=16, class="ga-tag__icon" -->
|
|
91
|
+
<span class="ga-tag__label">Default</span>
|
|
92
|
+
</div>
|
|
93
|
+
<div class="ga-tag ga-tag--interactive">
|
|
94
|
+
<span class="ga-tag__label">With separator</span>
|
|
95
|
+
<div class="ga-tag__separator"></div>
|
|
96
|
+
<!-- icon: x, size=16, class="ga-tag__icon" -->
|
|
97
|
+
</div>
|
|
98
|
+
<div class="ga-tag ga-tag--interactive-disabled">
|
|
99
|
+
<!-- icon: plus, size=16, class="ga-tag__icon" -->
|
|
100
|
+
<span class="ga-tag__label">Disabled</span>
|
|
101
|
+
</div>
|
|
102
|
+
<div tabindex="0" class="ga-tag ga-tag--interactive-selected">
|
|
103
|
+
<!-- icon: plus, size=16, class="ga-tag__icon" -->
|
|
104
|
+
<span class="ga-tag__label">Selected</span>
|
|
105
|
+
</div>
|
|
106
|
+
<div class="ga-tag ga-tag--interactive-selected-disabled">
|
|
107
|
+
<!-- icon: plus, size=16, class="ga-tag__icon" -->
|
|
108
|
+
<span class="ga-tag__label">Selected disabled</span>
|
|
109
|
+
</div>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Utility Color Tags
|
|
113
|
+
|
|
114
|
+
```html
|
|
115
|
+
<div tabindex="0" class="ga-tag ga-tag--utility-grey">
|
|
116
|
+
<!-- icon: plus, size=16, class="ga-tag__icon" -->
|
|
117
|
+
<span class="ga-tag__label">Default</span>
|
|
118
|
+
</div>
|
|
119
|
+
<div tabindex="0" class="ga-tag ga-tag--utility-grey">
|
|
120
|
+
<!-- icon: truck, size=16, class="ga-tag__icon" -->
|
|
121
|
+
<span class="ga-tag__label">With icons</span>
|
|
122
|
+
<!-- icon: chevrons-up-down, size=16, class="ga-tag__icon" -->
|
|
123
|
+
</div>
|
|
124
|
+
<div class="ga-tag ga-tag--utility-indigo">
|
|
125
|
+
<span class="ga-tag__label">Indigo</span>
|
|
126
|
+
</div>
|
|
127
|
+
<div class="ga-tag ga-tag--utility-teal">
|
|
128
|
+
<span class="ga-tag__label">Teal</span>
|
|
129
|
+
</div>
|
|
130
|
+
<div class="ga-tag ga-tag--utility-lime">
|
|
131
|
+
<span class="ga-tag__label">Lime</span>
|
|
132
|
+
</div>
|
|
133
|
+
<div class="ga-tag ga-tag--utility-purple">
|
|
134
|
+
<span class="ga-tag__label">Purple</span>
|
|
135
|
+
</div>
|
|
136
|
+
<div class="ga-tag ga-tag--utility-pink">
|
|
137
|
+
<span class="ga-tag__label">Pink</span>
|
|
138
|
+
</div>
|
|
139
|
+
<div class="ga-tag ga-tag--utility-rose">
|
|
140
|
+
<span class="ga-tag__label">Rose</span>
|
|
141
|
+
</div>
|
|
142
|
+
<div class="ga-tag ga-tag--utility-blue">
|
|
143
|
+
<span class="ga-tag__label">Blue</span>
|
|
144
|
+
</div>
|
|
145
|
+
<div class="ga-tag ga-tag--utility-green">
|
|
146
|
+
<span class="ga-tag__label">Green</span>
|
|
147
|
+
</div>
|
|
148
|
+
<div class="ga-tag ga-tag--utility-orange">
|
|
149
|
+
<span class="ga-tag__label">Orange</span>
|
|
150
|
+
</div>
|
|
151
|
+
<div class="ga-tag ga-tag--utility-disabled">
|
|
152
|
+
<span class="ga-tag__label">Disabled</span>
|
|
153
|
+
</div>
|
|
154
|
+
```
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Text Area
|
|
2
|
+
|
|
3
|
+
## Visual Structure
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
ga-text-area [--invalid]
|
|
7
|
+
└── textarea
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Elements Hierarchy
|
|
11
|
+
|
|
12
|
+
### Core Block
|
|
13
|
+
|
|
14
|
+
- `ga-text-area` - Main container for the text area component
|
|
15
|
+
|
|
16
|
+
### Mandatory Elements
|
|
17
|
+
|
|
18
|
+
- `textarea` - The native HTML textarea element
|
|
19
|
+
|
|
20
|
+
### Modifiers
|
|
21
|
+
|
|
22
|
+
- `ga-text-area--invalid` - Styles the text area to indicate a validation error
|
|
23
|
+
|
|
24
|
+
## Examples
|
|
25
|
+
|
|
26
|
+
### Regular
|
|
27
|
+
|
|
28
|
+
```html
|
|
29
|
+
<textarea class="ga-text-area" rows="5" placeholder="Placeholder"></textarea>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Disabled
|
|
33
|
+
|
|
34
|
+
```html
|
|
35
|
+
<textarea
|
|
36
|
+
class="ga-text-area"
|
|
37
|
+
rows="5"
|
|
38
|
+
placeholder="Placeholder"
|
|
39
|
+
disabled=""
|
|
40
|
+
></textarea>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Invalid
|
|
44
|
+
|
|
45
|
+
```html
|
|
46
|
+
<textarea
|
|
47
|
+
class="ga-text-area ga-text-area--invalid"
|
|
48
|
+
rows="5"
|
|
49
|
+
placeholder="Placeholder"
|
|
50
|
+
></textarea>
|
|
51
|
+
```
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Text Size
|
|
2
|
+
|
|
3
|
+
Text size utilities provide a consistent set of typography scales for text elements. These utilities handle three key aspects of typography: **font size**, **line height**, and **letter spacing** to ensure optimal readability across all text scales.
|
|
4
|
+
|
|
5
|
+
> **Note:** Font weight and font style (italic, bold) are intentionally not included in these utilities. These stylistic properties should be applied separately using appropriate CSS classes or inline styles based on the specific context and semantic meaning of your content.
|
|
6
|
+
|
|
7
|
+
## Visual Structure
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
ga-text-[helper|caption|body|heading|title|headline|display]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Available Classes
|
|
14
|
+
|
|
15
|
+
- `ga-text-helper` - Helper text (xs)
|
|
16
|
+
- `ga-text-caption` - Caption text (sm)
|
|
17
|
+
- `ga-text-body` - Body text (md, default body size)
|
|
18
|
+
- `ga-text-heading` - Heading text (lg)
|
|
19
|
+
- `ga-text-title` - Title text (xl, responsive)
|
|
20
|
+
- `ga-text-headline` - Headline text (2xl, responsive)
|
|
21
|
+
- `ga-text-display` - Display text (3xl, responsive)
|
|
22
|
+
|
|
23
|
+
## Responsive Typography
|
|
24
|
+
|
|
25
|
+
The `title`, `headline`, and `display` sizes are responsive — they use smaller values on mobile and scale up at the desktop breakpoint (≥768px). This ensures large text remains readable on small screens without manual overrides.
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
Text size utilities can be applied to any text element to override the default font size:
|
|
30
|
+
|
|
31
|
+
```html
|
|
32
|
+
<p class="ga-text-caption">Small paragraph text</p>
|
|
33
|
+
<h2 class="ga-text-title">Large heading</h2>
|
|
34
|
+
<span class="ga-text-helper">Fine print or metadata</span>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Examples
|
|
38
|
+
|
|
39
|
+
```html
|
|
40
|
+
<div class="space-y-4">
|
|
41
|
+
<div class="ga-text-helper">
|
|
42
|
+
Helper - The quick brown fox jumps over the lazy dog
|
|
43
|
+
</div>
|
|
44
|
+
<div class="ga-text-caption">
|
|
45
|
+
Caption - The quick brown fox jumps over the lazy dog
|
|
46
|
+
</div>
|
|
47
|
+
<div class="ga-text-body">
|
|
48
|
+
Body - The quick brown fox jumps over the lazy dog
|
|
49
|
+
</div>
|
|
50
|
+
<div class="ga-text-heading">
|
|
51
|
+
Heading - The quick brown fox jumps over the lazy dog
|
|
52
|
+
</div>
|
|
53
|
+
<div class="ga-text-title">
|
|
54
|
+
Title - The quick brown fox jumps over the lazy dog
|
|
55
|
+
</div>
|
|
56
|
+
<div class="ga-text-headline">
|
|
57
|
+
Headline - The quick brown fox jumps over the lazy dog
|
|
58
|
+
</div>
|
|
59
|
+
<div class="ga-text-display">
|
|
60
|
+
Display - The quick brown fox jumps over the lazy dog
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
```
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Tooltip
|
|
2
|
+
|
|
3
|
+
## Visual Structure
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
ga-tooltip [--{position}-{alignment}]
|
|
7
|
+
└── ga-tooltip__title (optional)
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Elements Hierarchy
|
|
11
|
+
|
|
12
|
+
### Core Block
|
|
13
|
+
|
|
14
|
+
- `ga-tooltip` - Main container for the tooltip component
|
|
15
|
+
|
|
16
|
+
### Optional Elements
|
|
17
|
+
|
|
18
|
+
- `ga-tooltip__title` - Title of the tooltip
|
|
19
|
+
|
|
20
|
+
### Position Modifiers
|
|
21
|
+
|
|
22
|
+
- **Top positions**
|
|
23
|
+
|
|
24
|
+
- `ga-tooltip--top-start` - Positioned above target, aligned to left
|
|
25
|
+
- `ga-tooltip--top-center` - Positioned above target, centered horizontally
|
|
26
|
+
- `ga-tooltip--top-end` - Positioned above target, aligned to right
|
|
27
|
+
|
|
28
|
+
- **Bottom positions**
|
|
29
|
+
|
|
30
|
+
- `ga-tooltip--bottom-start` - Positioned below target, aligned to left
|
|
31
|
+
- `ga-tooltip--bottom-center` - Positioned below target, centered horizontally
|
|
32
|
+
- `ga-tooltip--bottom-end` - Positioned below target, aligned to right
|
|
33
|
+
|
|
34
|
+
- **Left positions**
|
|
35
|
+
|
|
36
|
+
- `ga-tooltip--left-start` - Positioned to left of target, aligned to top
|
|
37
|
+
- `ga-tooltip--left-center` - Positioned to left of target, centered vertically
|
|
38
|
+
- `ga-tooltip--left-end` - Positioned to left of target, aligned to bottom
|
|
39
|
+
|
|
40
|
+
- **Right positions**
|
|
41
|
+
- `ga-tooltip--right-start` - Positioned to right of target, aligned to top
|
|
42
|
+
- `ga-tooltip--right-center` - Positioned to right of target, centered vertically
|
|
43
|
+
- `ga-tooltip--right-end` - Positioned to right of target, aligned to bottom
|
|
44
|
+
|
|
45
|
+
## Examples
|
|
46
|
+
|
|
47
|
+
### Top Positions
|
|
48
|
+
|
|
49
|
+
```html
|
|
50
|
+
<div class="ga-tooltip ga-tooltip--top-start">Tooltip content</div>
|
|
51
|
+
<div class="ga-tooltip ga-tooltip--top-center">Tooltip content</div>
|
|
52
|
+
<div class="ga-tooltip ga-tooltip--top-end">Tooltip content</div>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Bottom Positions
|
|
56
|
+
|
|
57
|
+
```html
|
|
58
|
+
<div class="ga-tooltip ga-tooltip--bottom-start">Tooltip content</div>
|
|
59
|
+
<div class="ga-tooltip ga-tooltip--bottom-center">Tooltip content</div>
|
|
60
|
+
<div class="ga-tooltip ga-tooltip--bottom-end">Tooltip content</div>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Left Positions (With Title)
|
|
64
|
+
|
|
65
|
+
```html
|
|
66
|
+
<div class="ga-tooltip ga-tooltip--left-start">
|
|
67
|
+
<div class="ga-tooltip__title">Tooltip title</div>
|
|
68
|
+
<div>Tooltip content</div>
|
|
69
|
+
</div>
|
|
70
|
+
<div class="ga-tooltip ga-tooltip--left-center">
|
|
71
|
+
<div class="ga-tooltip__title">Tooltip title</div>
|
|
72
|
+
<div>Tooltip content</div>
|
|
73
|
+
</div>
|
|
74
|
+
<div class="ga-tooltip ga-tooltip--left-end">
|
|
75
|
+
<div class="ga-tooltip__title">Tooltip title</div>
|
|
76
|
+
<div>Tooltip content</div>
|
|
77
|
+
</div>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Right Positions (With Title)
|
|
81
|
+
|
|
82
|
+
```html
|
|
83
|
+
<div class="ga-tooltip ga-tooltip--right-start">
|
|
84
|
+
<div class="ga-tooltip__title">Tooltip title</div>
|
|
85
|
+
<div>Tooltip content</div>
|
|
86
|
+
</div>
|
|
87
|
+
<div class="ga-tooltip ga-tooltip--right-center">
|
|
88
|
+
<div class="ga-tooltip__title">Tooltip title</div>
|
|
89
|
+
<div>Tooltip content</div>
|
|
90
|
+
</div>
|
|
91
|
+
<div class="ga-tooltip ga-tooltip--right-end">
|
|
92
|
+
<div class="ga-tooltip__title">Tooltip title</div>
|
|
93
|
+
<div>Tooltip content</div>
|
|
94
|
+
</div>
|
|
95
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vsn-ux/gaia-styles",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"build-tokens": "tz build",
|
|
10
10
|
"build-storybook": "storybook build",
|
|
11
11
|
"build-lib": "node ./build-component-styles.js --clean",
|
|
12
|
+
"build-docs": "tsx --tsconfig tsconfig.app.json build-docs.js",
|
|
12
13
|
"commitlint": "commitlint --edit",
|
|
13
14
|
"prepare": "husky"
|
|
14
15
|
},
|
|
@@ -51,6 +52,7 @@
|
|
|
51
52
|
"storybook": "10.3.0",
|
|
52
53
|
"storybook-addon-pseudo-states": "10.3.0",
|
|
53
54
|
"tailwindcss": "^4.2.2",
|
|
55
|
+
"tsx": "^4.21.0",
|
|
54
56
|
"typescript": "~5.9.3",
|
|
55
57
|
"typescript-eslint": "^8.57.1",
|
|
56
58
|
"vite": "^8.0.1"
|