@teseor/css 2.4.0 → 2.5.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/compiled.css +1 -1
- package/dist/index.css +3 -3
- package/package.json +1 -1
- package/src/components/forms/input/api.json +3 -0
- package/src/components/forms/input/docs.html +5 -0
- package/src/components/forms/input/index.scss +13 -0
- package/src/components/navigation/nav/api.json +3 -0
- package/src/components/navigation/nav/docs.html +18 -0
- package/src/components/navigation/nav/index.scss +26 -0
- package/src/utilities/display/api.json +9 -1
- package/src/utilities/display/display.scss +9 -0
- package/src/utilities/display/docs.html +9 -0
package/package.json
CHANGED
|
@@ -26,6 +26,11 @@ description: Text input field for user data entry. Heights align to grid rows.
|
|
|
26
26
|
<!-- @full_width -->
|
|
27
27
|
<input class="ui-input ui-input--block" type="text" placeholder="{{ t('full_width_input', 'Full width input') }}"></input>
|
|
28
28
|
|
|
29
|
+
<!-- @auto_size | column -->
|
|
30
|
+
<!-- Auto-sizing textarea grows with content. Requires browser support for field-sizing. -->
|
|
31
|
+
<textarea class="ui-input ui-input--auto-size ui-input--block" placeholder="{{ t('auto_size_textarea', 'Type here and watch it grow...') }}"></textarea>
|
|
32
|
+
<input class="ui-input ui-input--auto-size" type="text" placeholder="{{ t('auto_size_input', 'Auto-sizing input') }}"></input>
|
|
33
|
+
|
|
29
34
|
<!-- @with_prefix_icon -->
|
|
30
35
|
<div class="ui-input-group ui-input-group--has-prefix">
|
|
31
36
|
<span class="ui-input-group__addon ui-input-group__addon--start">
|
|
@@ -79,6 +79,12 @@
|
|
|
79
79
|
// @desc Success border
|
|
80
80
|
--_border-color-focus: var(--ui-input-success-border, var(--ui-color-success, #{t.$color-success}));
|
|
81
81
|
}
|
|
82
|
+
|
|
83
|
+
// @modifier boolean auto-size
|
|
84
|
+
.input--auto-size {
|
|
85
|
+
--_height: auto;
|
|
86
|
+
--_min-height: var(--ui-input-height, var(--ui-row-2, #{t.$row-2}));
|
|
87
|
+
}
|
|
82
88
|
}
|
|
83
89
|
|
|
84
90
|
@layer components.styles {
|
|
@@ -129,6 +135,13 @@
|
|
|
129
135
|
background: var(--_color-bg-subtle);
|
|
130
136
|
}
|
|
131
137
|
|
|
138
|
+
// Auto-size — textarea/input grows with content
|
|
139
|
+
&--auto-size {
|
|
140
|
+
field-sizing: content;
|
|
141
|
+
|
|
142
|
+
min-block-size: var(--_min-height);
|
|
143
|
+
}
|
|
144
|
+
|
|
132
145
|
// Full width
|
|
133
146
|
// @modifier boolean block
|
|
134
147
|
&--block {
|
|
@@ -54,6 +54,24 @@ description: Horizontal or vertical navigation links for primary and secondary n
|
|
|
54
54
|
</ul>
|
|
55
55
|
</nav>
|
|
56
56
|
|
|
57
|
+
<!-- @responsive -->
|
|
58
|
+
<!-- Auto-collapses to vertical when container is narrow. -->
|
|
59
|
+
<div class="ui-bg-muted ui-p-2" style="inline-size: 250px">
|
|
60
|
+
<nav class="ui-nav ui-nav--responsive">
|
|
61
|
+
<ul class="ui-nav__list">
|
|
62
|
+
<li>
|
|
63
|
+
<a class="ui-nav__item ui-nav__item--active" href="#">{{ t('home', 'Home') }}</a>
|
|
64
|
+
</li>
|
|
65
|
+
<li>
|
|
66
|
+
<a class="ui-nav__item" href="#">{{ t('about', 'About') }}</a>
|
|
67
|
+
</li>
|
|
68
|
+
<li>
|
|
69
|
+
<a class="ui-nav__item" href="#">{{ t('contact', 'Contact') }}</a>
|
|
70
|
+
</li>
|
|
71
|
+
</ul>
|
|
72
|
+
</nav>
|
|
73
|
+
</div>
|
|
74
|
+
|
|
57
75
|
<!-- @vertical_pills -->
|
|
58
76
|
<!-- Vertical navigation with pill-style active indicator. -->
|
|
59
77
|
<nav class="ui-nav ui-nav--vertical ui-nav--pills" style="inline-size: 200px">
|
|
@@ -44,6 +44,8 @@
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
// @modifier boolean vertical
|
|
47
|
+
|
|
48
|
+
// @modifier boolean responsive
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
@layer components.styles {
|
|
@@ -148,6 +150,30 @@
|
|
|
148
150
|
}
|
|
149
151
|
}
|
|
150
152
|
|
|
153
|
+
// Responsive — auto-collapses to vertical in narrow containers
|
|
154
|
+
.nav--responsive {
|
|
155
|
+
container-type: inline-size;
|
|
156
|
+
|
|
157
|
+
@container (max-width: #{t.$container-threshold-sm}) {
|
|
158
|
+
.nav__list {
|
|
159
|
+
flex-direction: column;
|
|
160
|
+
align-items: stretch;
|
|
161
|
+
|
|
162
|
+
block-size: auto;
|
|
163
|
+
|
|
164
|
+
box-shadow: inset calc(var(--_border-width-sm) * -1) 0 0 var(--_border-color);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.nav__item {
|
|
168
|
+
box-shadow: inset calc(var(--_border-width-md) * -1) 0 0 transparent;
|
|
169
|
+
|
|
170
|
+
&--active {
|
|
171
|
+
box-shadow: inset calc(var(--_border-width-md) * -1) 0 0 var(--_item-color-active);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
151
177
|
// Vertical + pills
|
|
152
178
|
.nav--vertical.nav--pills {
|
|
153
179
|
.nav__list {
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "display",
|
|
3
3
|
"type": "utility",
|
|
4
|
-
"utilities": [
|
|
4
|
+
"utilities": [
|
|
5
|
+
"flex",
|
|
6
|
+
"justify-between",
|
|
7
|
+
"items-center",
|
|
8
|
+
"gap-2",
|
|
9
|
+
"p-2",
|
|
10
|
+
"container-inline",
|
|
11
|
+
"container-normal"
|
|
12
|
+
],
|
|
5
13
|
"cssVars": []
|
|
6
14
|
}
|
|
@@ -174,6 +174,15 @@
|
|
|
174
174
|
visibility: hidden;
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
+
// Container query types
|
|
178
|
+
.container-inline {
|
|
179
|
+
container-type: inline-size;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.container-normal {
|
|
183
|
+
container-type: normal;
|
|
184
|
+
}
|
|
185
|
+
|
|
177
186
|
// Screen reader only - visually hidden but accessible
|
|
178
187
|
.sr-only {
|
|
179
188
|
position: absolute;
|
|
@@ -22,6 +22,15 @@ description: Flexbox and display utilities.
|
|
|
22
22
|
<span>{{ t('row_3', 'Row 3') }}</span>
|
|
23
23
|
</div>
|
|
24
24
|
|
|
25
|
+
<!-- @container_queries | row -->
|
|
26
|
+
<!-- Make an element a container query context. -->
|
|
27
|
+
<div class="ui-container-inline ui-bg-muted ui-p-2">
|
|
28
|
+
<span class="ui-text-sm">{{ t('container_inline_desc', 'container-inline: enables inline-size container queries on children') }}</span>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="ui-container-normal ui-bg-muted ui-p-2">
|
|
31
|
+
<span class="ui-text-sm">{{ t('container_normal_desc', 'container-normal: named container without size containment') }}</span>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
25
34
|
<!-- @visibility | row -->
|
|
26
35
|
<span class="ui-visible ui-p-1 ui-bg-muted">{{ t('visible', 'Visible') }}</span>
|
|
27
36
|
<span class="ui-invisible ui-p-1 ui-bg-muted">{{ t('invisible_hidden_but_occupies_space', 'Invisible (hidden but occupies space)') }}</span>
|