@teseor/css 1.10.1 → 1.12.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.
- package/dist/compiled.css +1 -1
- package/dist/index.css +9 -7
- package/package.json +1 -1
- package/src/components/content/scroll-area/index.scss +1 -1
- package/src/components/content/scroll-area/scroll-area.api.json +1 -1
- package/src/components/data-display/card/card-visual.png +0 -0
- package/src/components/data-display/card/card.api.json +7 -0
- package/src/components/data-display/card/card.docs.json +118 -16
- package/src/components/data-display/card/index.scss +27 -0
- package/src/components/feedback/skeleton/skeleton-visual.png +0 -0
- package/src/components/feedback/skeleton/skeleton.docs.json +16 -0
- package/src/components/feedback/toast/toast-visual.png +0 -0
- package/src/components/feedback/toast/toast.docs.json +137 -0
- package/src/components/forms/checkbox/checkbox.docs.json +1 -6
- package/src/components/forms/field/field-visual.png +0 -0
- package/src/components/forms/field/field.api.json +3 -0
- package/src/components/forms/field/field.docs.json +98 -12
- package/src/components/forms/field/index.scss +29 -0
- package/src/components/forms/input/input.api.json +21 -1
- package/src/components/forms/radio/radio.docs.json +3 -8
- package/src/components/forms/textarea/index.scss +8 -0
- package/src/components/forms/textarea/textarea-visual.png +0 -0
- package/src/components/forms/textarea/textarea.api.json +3 -0
- package/src/components/forms/textarea/textarea.docs.json +33 -1
- package/src/components/navigation/breadcrumb/breadcrumb-visual.png +0 -0
- package/src/components/navigation/breadcrumb/breadcrumb.docs.json +70 -0
- package/src/components/navigation/nav/nav.api.json +10 -1
- package/src/components/navigation/tabs/tabs.api.json +14 -2
- package/src/components/overlays/drawer/drawer-visual.png +0 -0
- package/src/components/overlays/drawer/drawer.docs.json +25 -0
- package/src/components/overlays/modal/modal-visual.png +0 -0
- package/src/components/overlays/modal/modal.docs.json +89 -0
- package/src/components/overlays/popover/popover-visual.png +0 -0
- package/src/components/overlays/popover/popover.docs.json +46 -3
- package/src/components/typography/heading/index.scss +1 -0
- package/src/config/tokens/accessibility.docs.json +21 -0
- package/src/config/tokens/semantic/colors/index.scss +34 -33
- package/src/config/tokens/theming.docs.json +135 -26
- package/src/layout/center/center.api.json +5 -1
- package/src/layout/center/index.scss +1 -0
- package/src/layout/column/column-visual.png +0 -0
- package/src/layout/column/column.docs.json +26 -0
- package/src/layout/grid/grid-visual.png +0 -0
- package/src/layout/grid/grid.docs.json +34 -0
- package/src/layout/row/row-visual.png +0 -0
- package/src/layout/row/row.docs.json +108 -0
- package/src/layout/sidebar-nav/sidebar-nav.docs.json +9 -3
- package/src/utilities/container/container.api.json +6 -0
- package/src/utilities/container/container.docs.json +121 -0
- package/src/utilities/container/index.scss +18 -0
- package/src/utilities/index.scss +2 -0
- package/src/utilities/scroll-snap/index.scss +66 -0
- package/src/utilities/scroll-snap/scroll-snap.api.json +19 -0
- package/src/utilities/scroll-snap/scroll-snap.docs.json +333 -0
- package/src/utilities/text/text.api.json +7 -1
- package/src/utilities/text/text.docs.json +59 -0
- package/src/utilities/text/text.scss +42 -0
|
@@ -495,9 +495,15 @@
|
|
|
495
495
|
"tag": "li",
|
|
496
496
|
"children": [
|
|
497
497
|
{
|
|
498
|
-
"tag": "
|
|
499
|
-
"class": "ui-sidebar-nav__subgroup
|
|
500
|
-
"
|
|
498
|
+
"tag": "div",
|
|
499
|
+
"class": "ui-sidebar-nav__subgroup",
|
|
500
|
+
"children": [
|
|
501
|
+
{
|
|
502
|
+
"tag": "span",
|
|
503
|
+
"class": "ui-sidebar-nav__subgroup-label",
|
|
504
|
+
"text": "Actions"
|
|
505
|
+
}
|
|
506
|
+
]
|
|
501
507
|
}
|
|
502
508
|
]
|
|
503
509
|
},
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "container-utils",
|
|
3
|
+
"type": "utility",
|
|
4
|
+
"title": "Container",
|
|
5
|
+
"description": "Container query utilities for component-level responsive design.",
|
|
6
|
+
"api": "container.api.json",
|
|
7
|
+
"sections": [
|
|
8
|
+
{
|
|
9
|
+
"title": "Inline Size Containment",
|
|
10
|
+
"description": "Establish inline-size containment so children can use container queries to respond to the container width.",
|
|
11
|
+
"examples": [
|
|
12
|
+
{
|
|
13
|
+
"items": [
|
|
14
|
+
{
|
|
15
|
+
"tag": "div",
|
|
16
|
+
"class": "ui-container-inline ui-p-2",
|
|
17
|
+
"style": {
|
|
18
|
+
"background": "var(--ui-color-bg-muted)"
|
|
19
|
+
},
|
|
20
|
+
"children": [
|
|
21
|
+
{
|
|
22
|
+
"tag": "div",
|
|
23
|
+
"class": "ui-card",
|
|
24
|
+
"text": "This card is inside an inline-size container"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"code": "<div class=\"ui-container-inline\">\n <div class=\"ui-card\">Content responds to container width</div>\n</div>"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"title": "Size Containment",
|
|
35
|
+
"description": "Establish containment on both axes for container queries on width and height.",
|
|
36
|
+
"examples": [
|
|
37
|
+
{
|
|
38
|
+
"items": [
|
|
39
|
+
{
|
|
40
|
+
"tag": "div",
|
|
41
|
+
"class": "ui-container-size ui-p-2",
|
|
42
|
+
"style": {
|
|
43
|
+
"background": "var(--ui-color-bg-muted)",
|
|
44
|
+
"block-size": "12rem"
|
|
45
|
+
},
|
|
46
|
+
"children": [
|
|
47
|
+
{
|
|
48
|
+
"tag": "div",
|
|
49
|
+
"class": "ui-card",
|
|
50
|
+
"text": "Inside a size container"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"code": "<div class=\"ui-container-size\">\n <div class=\"ui-card\">Content responds to container width and height</div>\n</div>"
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"title": "Remove Containment",
|
|
61
|
+
"description": "Reset container type back to normal (no containment).",
|
|
62
|
+
"examples": [
|
|
63
|
+
{
|
|
64
|
+
"items": [
|
|
65
|
+
{
|
|
66
|
+
"tag": "div",
|
|
67
|
+
"class": "ui-container-normal ui-p-2",
|
|
68
|
+
"style": {
|
|
69
|
+
"background": "var(--ui-color-bg-muted)"
|
|
70
|
+
},
|
|
71
|
+
"children": [
|
|
72
|
+
{
|
|
73
|
+
"tag": "div",
|
|
74
|
+
"class": "ui-card",
|
|
75
|
+
"text": "No containment on this container"
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"code": "<div class=\"ui-container-normal\">\n <div class=\"ui-card\">Normal container behavior</div>\n</div>"
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"title": "With Responsive Card",
|
|
86
|
+
"description": "Combine container-inline with card--responsive for automatic horizontal layout at wider container sizes.",
|
|
87
|
+
"examples": [
|
|
88
|
+
{
|
|
89
|
+
"items": [
|
|
90
|
+
{
|
|
91
|
+
"tag": "div",
|
|
92
|
+
"class": "ui-container-inline",
|
|
93
|
+
"children": [
|
|
94
|
+
{
|
|
95
|
+
"tag": "div",
|
|
96
|
+
"class": "ui-card ui-card--responsive",
|
|
97
|
+
"children": [
|
|
98
|
+
{
|
|
99
|
+
"tag": "div",
|
|
100
|
+
"class": "ui-card__media",
|
|
101
|
+
"style": {
|
|
102
|
+
"background": "var(--ui-color-bg-muted)",
|
|
103
|
+
"min-block-size": "6rem"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"tag": "div",
|
|
108
|
+
"class": "ui-card__body",
|
|
109
|
+
"text": "Card switches to horizontal layout when container is wide enough"
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
],
|
|
116
|
+
"code": "<div class=\"ui-container-inline\">\n <div class=\"ui-card ui-card--responsive\">\n <div class=\"ui-card__media\">Image</div>\n <div class=\"ui-card__body\">Switches to horizontal at >= 30rem</div>\n </div>\n</div>"
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Container query utilities
|
|
2
|
+
|
|
3
|
+
@layer utilities {
|
|
4
|
+
// Establish inline-size containment for container queries
|
|
5
|
+
.container-inline {
|
|
6
|
+
container-type: inline-size;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// Establish size containment (both axes) for container queries
|
|
10
|
+
.container-size {
|
|
11
|
+
container-type: size;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Remove containment
|
|
15
|
+
.container-normal {
|
|
16
|
+
container-type: normal;
|
|
17
|
+
}
|
|
18
|
+
}
|
package/src/utilities/index.scss
CHANGED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// Scroll-snap utilities
|
|
2
|
+
|
|
3
|
+
@layer utilities {
|
|
4
|
+
// ==========================================================================
|
|
5
|
+
// SCROLL SNAP CONTAINERS
|
|
6
|
+
// ==========================================================================
|
|
7
|
+
.snap-x {
|
|
8
|
+
overflow-x: auto;
|
|
9
|
+
scroll-snap-type: x mandatory;
|
|
10
|
+
overscroll-behavior-x: contain;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.snap-y {
|
|
14
|
+
overflow-y: auto;
|
|
15
|
+
scroll-snap-type: y mandatory;
|
|
16
|
+
overscroll-behavior-y: contain;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.snap-x-proximity {
|
|
20
|
+
overflow-x: auto;
|
|
21
|
+
scroll-snap-type: x proximity;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.snap-y-proximity {
|
|
25
|
+
overflow-y: auto;
|
|
26
|
+
scroll-snap-type: y proximity;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.snap-none {
|
|
30
|
+
scroll-snap-type: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// ==========================================================================
|
|
34
|
+
// SCROLL SNAP CHILDREN
|
|
35
|
+
// ==========================================================================
|
|
36
|
+
.snap-start {
|
|
37
|
+
scroll-snap-align: start;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.snap-center {
|
|
41
|
+
scroll-snap-align: center;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.snap-end {
|
|
45
|
+
scroll-snap-align: end;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.snap-always {
|
|
49
|
+
scroll-snap-stop: always;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// ==========================================================================
|
|
53
|
+
// SCROLL PADDING (on container, for fixed headers/offsets)
|
|
54
|
+
// ==========================================================================
|
|
55
|
+
.snap-p-1 {
|
|
56
|
+
scroll-padding: var(--ui-space-1);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.snap-p-2 {
|
|
60
|
+
scroll-padding: var(--ui-space-2);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.snap-p-4 {
|
|
64
|
+
scroll-padding: var(--ui-space-4);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "scroll-snap",
|
|
3
|
+
"type": "utility",
|
|
4
|
+
"utilities": [
|
|
5
|
+
"snap-x",
|
|
6
|
+
"snap-y",
|
|
7
|
+
"snap-x-proximity",
|
|
8
|
+
"snap-y-proximity",
|
|
9
|
+
"snap-none",
|
|
10
|
+
"snap-start",
|
|
11
|
+
"snap-center",
|
|
12
|
+
"snap-end",
|
|
13
|
+
"snap-always",
|
|
14
|
+
"snap-p-1",
|
|
15
|
+
"snap-p-2",
|
|
16
|
+
"snap-p-4"
|
|
17
|
+
],
|
|
18
|
+
"cssVars": []
|
|
19
|
+
}
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "scroll-snap-utils",
|
|
3
|
+
"type": "utility",
|
|
4
|
+
"title": "Scroll Snap",
|
|
5
|
+
"description": "Scroll-snap utilities for carousels, horizontal lists, and snap-to-position scrolling.",
|
|
6
|
+
"api": "scroll-snap.api.json",
|
|
7
|
+
"sections": [
|
|
8
|
+
{
|
|
9
|
+
"title": "Horizontal Snap",
|
|
10
|
+
"description": "Snap children to start position on horizontal scroll.",
|
|
11
|
+
"examples": [
|
|
12
|
+
{
|
|
13
|
+
"items": [
|
|
14
|
+
{
|
|
15
|
+
"tag": "div",
|
|
16
|
+
"class": "ui-snap-x ui-flex ui-gap-2 ui-p-2",
|
|
17
|
+
"style": { "max-inline-size": "20rem" },
|
|
18
|
+
"children": [
|
|
19
|
+
{
|
|
20
|
+
"tag": "div",
|
|
21
|
+
"class": "ui-snap-start ui-card ui-p-2",
|
|
22
|
+
"style": { "min-inline-size": "10rem" },
|
|
23
|
+
"text": "Item 1"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"tag": "div",
|
|
27
|
+
"class": "ui-snap-start ui-card ui-p-2",
|
|
28
|
+
"style": { "min-inline-size": "10rem" },
|
|
29
|
+
"text": "Item 2"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"tag": "div",
|
|
33
|
+
"class": "ui-snap-start ui-card ui-p-2",
|
|
34
|
+
"style": { "min-inline-size": "10rem" },
|
|
35
|
+
"text": "Item 3"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"tag": "div",
|
|
39
|
+
"class": "ui-snap-start ui-card ui-p-2",
|
|
40
|
+
"style": { "min-inline-size": "10rem" },
|
|
41
|
+
"text": "Item 4"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"code": "<div class=\"ui-snap-x ui-flex ui-gap-2\">\n <div class=\"ui-snap-start\">Item 1</div>\n <div class=\"ui-snap-start\">Item 2</div>\n <div class=\"ui-snap-start\">Item 3</div>\n</div>"
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"title": "Center Snap",
|
|
52
|
+
"description": "Snap children to center position.",
|
|
53
|
+
"examples": [
|
|
54
|
+
{
|
|
55
|
+
"items": [
|
|
56
|
+
{
|
|
57
|
+
"tag": "div",
|
|
58
|
+
"class": "ui-snap-x ui-flex ui-gap-2 ui-p-2",
|
|
59
|
+
"style": { "max-inline-size": "20rem" },
|
|
60
|
+
"children": [
|
|
61
|
+
{
|
|
62
|
+
"tag": "div",
|
|
63
|
+
"class": "ui-snap-center ui-card ui-p-2",
|
|
64
|
+
"style": { "min-inline-size": "10rem" },
|
|
65
|
+
"text": "Center 1"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"tag": "div",
|
|
69
|
+
"class": "ui-snap-center ui-card ui-p-2",
|
|
70
|
+
"style": { "min-inline-size": "10rem" },
|
|
71
|
+
"text": "Center 2"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"tag": "div",
|
|
75
|
+
"class": "ui-snap-center ui-card ui-p-2",
|
|
76
|
+
"style": { "min-inline-size": "10rem" },
|
|
77
|
+
"text": "Center 3"
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"code": "<div class=\"ui-snap-x ui-flex ui-gap-2\">\n <div class=\"ui-snap-center\">Center 1</div>\n <div class=\"ui-snap-center\">Center 2</div>\n</div>"
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"title": "Vertical Snap",
|
|
88
|
+
"description": "Snap children on vertical scroll.",
|
|
89
|
+
"examples": [
|
|
90
|
+
{
|
|
91
|
+
"items": [
|
|
92
|
+
{
|
|
93
|
+
"tag": "div",
|
|
94
|
+
"class": "ui-snap-y",
|
|
95
|
+
"style": { "max-block-size": "8rem" },
|
|
96
|
+
"children": [
|
|
97
|
+
{ "tag": "div", "class": "ui-snap-start ui-card ui-p-2", "text": "Section 1" },
|
|
98
|
+
{ "tag": "div", "class": "ui-snap-start ui-card ui-p-2", "text": "Section 2" },
|
|
99
|
+
{ "tag": "div", "class": "ui-snap-start ui-card ui-p-2", "text": "Section 3" }
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"code": "<div class=\"ui-snap-y\" style=\"max-block-size: 8rem\">\n <div class=\"ui-snap-start\">Section 1</div>\n <div class=\"ui-snap-start\">Section 2</div>\n</div>"
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"title": "Proximity Snap",
|
|
109
|
+
"description": "Softer snap that only engages when close to a snap point.",
|
|
110
|
+
"examples": [
|
|
111
|
+
{
|
|
112
|
+
"items": [
|
|
113
|
+
{
|
|
114
|
+
"tag": "div",
|
|
115
|
+
"class": "ui-snap-x-proximity ui-flex ui-gap-2 ui-p-2",
|
|
116
|
+
"style": { "max-inline-size": "20rem" },
|
|
117
|
+
"children": [
|
|
118
|
+
{
|
|
119
|
+
"tag": "div",
|
|
120
|
+
"class": "ui-snap-start ui-card ui-p-2",
|
|
121
|
+
"style": { "min-inline-size": "10rem" },
|
|
122
|
+
"text": "Proximity 1"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"tag": "div",
|
|
126
|
+
"class": "ui-snap-start ui-card ui-p-2",
|
|
127
|
+
"style": { "min-inline-size": "10rem" },
|
|
128
|
+
"text": "Proximity 2"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"tag": "div",
|
|
132
|
+
"class": "ui-snap-start ui-card ui-p-2",
|
|
133
|
+
"style": { "min-inline-size": "10rem" },
|
|
134
|
+
"text": "Proximity 3"
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
"code": "<div class=\"ui-snap-x-proximity ui-flex ui-gap-2\">\n <div class=\"ui-snap-start\">Proximity 1</div>\n <div class=\"ui-snap-start\">Proximity 2</div>\n</div>"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"items": [
|
|
143
|
+
{
|
|
144
|
+
"tag": "div",
|
|
145
|
+
"class": "ui-snap-y-proximity",
|
|
146
|
+
"style": { "max-block-size": "8rem" },
|
|
147
|
+
"children": [
|
|
148
|
+
{ "tag": "div", "class": "ui-snap-start ui-card ui-p-2", "text": "Section 1" },
|
|
149
|
+
{ "tag": "div", "class": "ui-snap-start ui-card ui-p-2", "text": "Section 2" },
|
|
150
|
+
{ "tag": "div", "class": "ui-snap-start ui-card ui-p-2", "text": "Section 3" }
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"code": "<div class=\"ui-snap-y-proximity\" style=\"max-block-size: 8rem\">\n <div class=\"ui-snap-start\">Section 1</div>\n <div class=\"ui-snap-start\">Section 2</div>\n</div>"
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"title": "End Alignment and Stop",
|
|
160
|
+
"description": "Snap children to end position or force stop at every snap point.",
|
|
161
|
+
"examples": [
|
|
162
|
+
{
|
|
163
|
+
"items": [
|
|
164
|
+
{
|
|
165
|
+
"tag": "div",
|
|
166
|
+
"class": "ui-snap-x ui-flex ui-gap-2 ui-p-2",
|
|
167
|
+
"style": { "max-inline-size": "20rem" },
|
|
168
|
+
"children": [
|
|
169
|
+
{
|
|
170
|
+
"tag": "div",
|
|
171
|
+
"class": "ui-snap-end ui-card ui-p-2",
|
|
172
|
+
"style": { "min-inline-size": "10rem" },
|
|
173
|
+
"text": "End 1"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"tag": "div",
|
|
177
|
+
"class": "ui-snap-end ui-card ui-p-2",
|
|
178
|
+
"style": { "min-inline-size": "10rem" },
|
|
179
|
+
"text": "End 2"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"tag": "div",
|
|
183
|
+
"class": "ui-snap-end ui-card ui-p-2",
|
|
184
|
+
"style": { "min-inline-size": "10rem" },
|
|
185
|
+
"text": "End 3"
|
|
186
|
+
}
|
|
187
|
+
]
|
|
188
|
+
}
|
|
189
|
+
],
|
|
190
|
+
"code": "<div class=\"ui-snap-x ui-flex ui-gap-2\">\n <div class=\"ui-snap-end\">End 1</div>\n <div class=\"ui-snap-end\">End 2</div>\n</div>"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"items": [
|
|
194
|
+
{
|
|
195
|
+
"tag": "div",
|
|
196
|
+
"class": "ui-snap-x ui-flex ui-gap-2 ui-p-2",
|
|
197
|
+
"style": { "max-inline-size": "20rem" },
|
|
198
|
+
"children": [
|
|
199
|
+
{
|
|
200
|
+
"tag": "div",
|
|
201
|
+
"class": "ui-snap-start ui-snap-always ui-card ui-p-2",
|
|
202
|
+
"style": { "min-inline-size": "10rem" },
|
|
203
|
+
"text": "Always 1"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"tag": "div",
|
|
207
|
+
"class": "ui-snap-start ui-snap-always ui-card ui-p-2",
|
|
208
|
+
"style": { "min-inline-size": "10rem" },
|
|
209
|
+
"text": "Always 2"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"tag": "div",
|
|
213
|
+
"class": "ui-snap-start ui-snap-always ui-card ui-p-2",
|
|
214
|
+
"style": { "min-inline-size": "10rem" },
|
|
215
|
+
"text": "Always 3"
|
|
216
|
+
}
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
],
|
|
220
|
+
"code": "<div class=\"ui-snap-x ui-flex ui-gap-2\">\n <div class=\"ui-snap-start ui-snap-always\">Always 1</div>\n <div class=\"ui-snap-start ui-snap-always\">Always 2</div>\n</div>"
|
|
221
|
+
}
|
|
222
|
+
]
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"title": "Disable Snap",
|
|
226
|
+
"description": "Remove snap behavior from a container.",
|
|
227
|
+
"examples": [
|
|
228
|
+
{
|
|
229
|
+
"items": [
|
|
230
|
+
{
|
|
231
|
+
"tag": "div",
|
|
232
|
+
"class": "ui-snap-none ui-flex ui-gap-2 ui-p-2",
|
|
233
|
+
"style": { "max-inline-size": "20rem", "overflow-x": "auto" },
|
|
234
|
+
"children": [
|
|
235
|
+
{
|
|
236
|
+
"tag": "div",
|
|
237
|
+
"class": "ui-card ui-p-2",
|
|
238
|
+
"style": { "min-inline-size": "10rem" },
|
|
239
|
+
"text": "No snap 1"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"tag": "div",
|
|
243
|
+
"class": "ui-card ui-p-2",
|
|
244
|
+
"style": { "min-inline-size": "10rem" },
|
|
245
|
+
"text": "No snap 2"
|
|
246
|
+
}
|
|
247
|
+
]
|
|
248
|
+
}
|
|
249
|
+
],
|
|
250
|
+
"code": "<div class=\"ui-snap-none\">\n <div>No snap 1</div>\n <div>No snap 2</div>\n</div>"
|
|
251
|
+
}
|
|
252
|
+
]
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"title": "Scroll Padding",
|
|
256
|
+
"description": "Offset snap position for fixed headers or insets.",
|
|
257
|
+
"examples": [
|
|
258
|
+
{
|
|
259
|
+
"items": [
|
|
260
|
+
{
|
|
261
|
+
"tag": "div",
|
|
262
|
+
"class": "ui-snap-x ui-snap-p-1 ui-flex ui-gap-2 ui-p-2",
|
|
263
|
+
"style": { "max-inline-size": "20rem" },
|
|
264
|
+
"children": [
|
|
265
|
+
{
|
|
266
|
+
"tag": "div",
|
|
267
|
+
"class": "ui-snap-start ui-card ui-p-2",
|
|
268
|
+
"style": { "min-inline-size": "10rem" },
|
|
269
|
+
"text": "p-1"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"tag": "div",
|
|
273
|
+
"class": "ui-snap-start ui-card ui-p-2",
|
|
274
|
+
"style": { "min-inline-size": "10rem" },
|
|
275
|
+
"text": "p-1"
|
|
276
|
+
}
|
|
277
|
+
]
|
|
278
|
+
}
|
|
279
|
+
],
|
|
280
|
+
"code": "<div class=\"ui-snap-x ui-snap-p-1 ui-flex ui-gap-2\">\n <div class=\"ui-snap-start\">p-1</div>\n</div>"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"items": [
|
|
284
|
+
{
|
|
285
|
+
"tag": "div",
|
|
286
|
+
"class": "ui-snap-x ui-snap-p-2 ui-flex ui-gap-2 ui-p-2",
|
|
287
|
+
"style": { "max-inline-size": "20rem" },
|
|
288
|
+
"children": [
|
|
289
|
+
{
|
|
290
|
+
"tag": "div",
|
|
291
|
+
"class": "ui-snap-start ui-card ui-p-2",
|
|
292
|
+
"style": { "min-inline-size": "10rem" },
|
|
293
|
+
"text": "p-2"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"tag": "div",
|
|
297
|
+
"class": "ui-snap-start ui-card ui-p-2",
|
|
298
|
+
"style": { "min-inline-size": "10rem" },
|
|
299
|
+
"text": "p-2"
|
|
300
|
+
}
|
|
301
|
+
]
|
|
302
|
+
}
|
|
303
|
+
],
|
|
304
|
+
"code": "<div class=\"ui-snap-x ui-snap-p-2 ui-flex ui-gap-2\">\n <div class=\"ui-snap-start\">p-2</div>\n</div>"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"items": [
|
|
308
|
+
{
|
|
309
|
+
"tag": "div",
|
|
310
|
+
"class": "ui-snap-x ui-snap-p-4 ui-flex ui-gap-2 ui-p-2",
|
|
311
|
+
"style": { "max-inline-size": "20rem" },
|
|
312
|
+
"children": [
|
|
313
|
+
{
|
|
314
|
+
"tag": "div",
|
|
315
|
+
"class": "ui-snap-start ui-card ui-p-2",
|
|
316
|
+
"style": { "min-inline-size": "10rem" },
|
|
317
|
+
"text": "p-4"
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"tag": "div",
|
|
321
|
+
"class": "ui-snap-start ui-card ui-p-2",
|
|
322
|
+
"style": { "min-inline-size": "10rem" },
|
|
323
|
+
"text": "p-4"
|
|
324
|
+
}
|
|
325
|
+
]
|
|
326
|
+
}
|
|
327
|
+
],
|
|
328
|
+
"code": "<div class=\"ui-snap-x ui-snap-p-4 ui-flex ui-gap-2\">\n <div class=\"ui-snap-start\">p-4</div>\n</div>"
|
|
329
|
+
}
|
|
330
|
+
]
|
|
331
|
+
}
|
|
332
|
+
]
|
|
333
|
+
}
|
|
@@ -127,6 +127,65 @@
|
|
|
127
127
|
]
|
|
128
128
|
}
|
|
129
129
|
]
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"title": "Text Wrap",
|
|
133
|
+
"description": "Control how text wraps across lines.",
|
|
134
|
+
"examples": [
|
|
135
|
+
{
|
|
136
|
+
"layout": "column",
|
|
137
|
+
"items": [
|
|
138
|
+
{
|
|
139
|
+
"tag": "p",
|
|
140
|
+
"class": "ui-text-balance ui-text-2xl ui-font-bold",
|
|
141
|
+
"style": { "max-inline-size": "20rem" },
|
|
142
|
+
"text": "Balanced: distributes text evenly across lines"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"tag": "p",
|
|
146
|
+
"class": "ui-text-pretty",
|
|
147
|
+
"style": { "max-inline-size": "20rem" },
|
|
148
|
+
"text": "Pretty: avoids orphans and widows for cleaner body text paragraphs that wrap naturally"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"tag": "p",
|
|
152
|
+
"class": "ui-text-nowrap",
|
|
153
|
+
"text": "Nowrap: prevents text from wrapping to the next line"
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
"code": "<p class=\"ui-text-balance\">Balanced heading text</p>\n<p class=\"ui-text-pretty\">Pretty body text</p>\n<p class=\"ui-text-nowrap\">No wrap text</p>"
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"title": "Multi-line Truncation",
|
|
162
|
+
"description": "Clamp text to a specific number of lines with ellipsis.",
|
|
163
|
+
"examples": [
|
|
164
|
+
{
|
|
165
|
+
"layout": "column",
|
|
166
|
+
"items": [
|
|
167
|
+
{
|
|
168
|
+
"tag": "p",
|
|
169
|
+
"class": "ui-truncate-2",
|
|
170
|
+
"style": { "max-inline-size": "20rem" },
|
|
171
|
+
"text": "Truncate to 2 lines: This is a long paragraph that will be clamped after two lines of text. Any overflow content will be hidden and replaced with an ellipsis character."
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"tag": "p",
|
|
175
|
+
"class": "ui-truncate-3",
|
|
176
|
+
"style": { "max-inline-size": "20rem" },
|
|
177
|
+
"text": "Truncate to 3 lines: This is a long paragraph that will be clamped after three lines of text. Any overflow content beyond the third line will be hidden and replaced with an ellipsis character at the end."
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"tag": "p",
|
|
181
|
+
"class": "ui-truncate-4",
|
|
182
|
+
"style": { "max-inline-size": "20rem" },
|
|
183
|
+
"text": "Truncate to 4 lines: This is a long paragraph that will be clamped after four lines. It gives more room for content previews while still maintaining a consistent height. Overflow beyond line four is hidden with ellipsis."
|
|
184
|
+
}
|
|
185
|
+
],
|
|
186
|
+
"code": "<p class=\"ui-truncate-2\">Long text clamped to 2 lines...</p>\n<p class=\"ui-truncate-3\">Long text clamped to 3 lines...</p>\n<p class=\"ui-truncate-4\">Long text clamped to 4 lines...</p>"
|
|
187
|
+
}
|
|
188
|
+
]
|
|
130
189
|
}
|
|
131
190
|
]
|
|
132
191
|
}
|