@finhay-pro/leaf-design-system 0.1.6 → 0.1.7
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/README.md +175 -81
- package/dist/border.css +154 -17
- package/dist/button.css +2 -12
- package/dist/cdn/leaf-0.1.7.min.css +2 -0
- package/dist/cdn/leaf-0.1.7.min.js +2 -0
- package/dist/classes.css +1898 -268
- package/dist/color.css +27 -32
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +3 -3
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.js +1 -1
- package/dist/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/Logo/Logo.d.ts.map +1 -1
- package/dist/components/Logo/Logo.js +2 -2
- package/dist/components/Logo/Logo.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.js +1 -1
- package/dist/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/Slider/Slider.js +2 -2
- package/dist/components/Slider/Slider.js.map +1 -1
- package/dist/components/Spinner/Spinner.d.ts.map +1 -1
- package/dist/components/Spinner/Spinner.js +2 -2
- package/dist/components/Spinner/Spinner.js.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.js +3 -3
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/Toggle/Toggle.d.ts.map +1 -1
- package/dist/components/Toggle/Toggle.js +1 -1
- package/dist/components/Toggle/Toggle.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.js +2 -2
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/dialog.css +4 -36
- package/dist/flex.css +229 -0
- package/dist/grid.css +533 -0
- package/dist/logo.css +2 -7
- package/dist/overflow.css +72 -0
- package/dist/position.css +140 -0
- package/dist/sizing.css +377 -0
- package/dist/skeleton.css +0 -4
- package/dist/slider.css +3 -31
- package/dist/spacing.css +71 -4
- package/dist/spinner.css +2 -16
- package/dist/styles.css +1909 -276
- package/dist/tabs.css +2 -13
- package/dist/text-layout.css +219 -0
- package/dist/toggle.css +1 -9
- package/dist/tokens.css +11 -8
- package/dist/tooltip.css +2 -15
- package/dist/typography.css +1 -3
- package/package.json +7 -1
- package/dist/cdn/leaf-0.1.6.min.css +0 -2
- package/dist/cdn/leaf-0.1.6.min.js +0 -2
package/dist/dialog.css
CHANGED
|
@@ -13,12 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
@layer components {
|
|
15
15
|
.leaf-dialog-backdrop {
|
|
16
|
-
position: fixed;
|
|
17
|
-
inset: 0;
|
|
18
16
|
z-index: var(--leaf-z-dialog, 50);
|
|
19
|
-
display: flex;
|
|
20
|
-
align-items: center;
|
|
21
|
-
justify-content: center;
|
|
22
17
|
padding: 16px;
|
|
23
18
|
box-sizing: border-box;
|
|
24
19
|
/*
|
|
@@ -30,7 +25,7 @@
|
|
|
30
25
|
backdrop-filter: blur(5px);
|
|
31
26
|
}
|
|
32
27
|
|
|
33
|
-
/* `
|
|
28
|
+
/* `hidden` luôn ẩn — display đến từ class layout; selector `[hidden]` specificity cao hơn nên thắng. */
|
|
34
29
|
.leaf-dialog-backdrop[hidden] {
|
|
35
30
|
display: none;
|
|
36
31
|
}
|
|
@@ -43,21 +38,18 @@
|
|
|
43
38
|
--leaf-dialog-close-size: 28px;
|
|
44
39
|
--leaf-dialog-close-icon: 20px;
|
|
45
40
|
|
|
46
|
-
display: flex;
|
|
47
|
-
flex-direction: column;
|
|
48
41
|
gap: var(--leaf-dialog-gap);
|
|
49
42
|
/*
|
|
50
43
|
* Width: luôn 100% trong trần maxWidth (responsive).
|
|
51
44
|
* Height: cố định khi có --leaf-dialog-height (content động không giật panel);
|
|
52
45
|
* không có → auto theo nội dung. maxHeight luôn là trần viewport.
|
|
46
|
+
* Layout flex/overflow/w-full lấy từ class Leaf trên markup.
|
|
53
47
|
*/
|
|
54
|
-
width: 100%;
|
|
55
48
|
max-width: var(--leaf-dialog-max-width, 100%);
|
|
56
49
|
height: var(--leaf-dialog-height, auto);
|
|
57
50
|
max-height: var(--leaf-dialog-max-height, 100%);
|
|
58
51
|
margin: 0;
|
|
59
52
|
padding: var(--leaf-dialog-padding);
|
|
60
|
-
overflow: hidden;
|
|
61
53
|
box-sizing: border-box;
|
|
62
54
|
border-radius: var(--leaf-dialog-radius);
|
|
63
55
|
background-color: var(--base-primary);
|
|
@@ -71,34 +63,20 @@
|
|
|
71
63
|
}
|
|
72
64
|
|
|
73
65
|
.leaf-dialog__header {
|
|
74
|
-
display: flex;
|
|
75
|
-
flex-shrink: 0;
|
|
76
|
-
align-items: center;
|
|
77
|
-
justify-content: space-between;
|
|
78
66
|
gap: var(--leaf-dialog-gap);
|
|
79
|
-
width: 100%;
|
|
80
|
-
min-width: 0;
|
|
81
67
|
}
|
|
82
68
|
|
|
83
|
-
/* Cụm trái: back + title */
|
|
69
|
+
/* Cụm trái: back + title — flex/min-w từ class Leaf trên markup */
|
|
84
70
|
.leaf-dialog__start {
|
|
85
|
-
display: flex;
|
|
86
|
-
align-items: center;
|
|
87
71
|
gap: var(--leaf-dialog-gap);
|
|
88
|
-
min-width: 0;
|
|
89
|
-
flex: 1 1 auto;
|
|
90
72
|
}
|
|
91
73
|
|
|
92
74
|
/*
|
|
93
75
|
* Title — heading-3 · --text-primary nằm ngay ở đây: markup không cần class typography /
|
|
94
|
-
* màu, nên utility trùng tên của app (vd. `text-primary`
|
|
76
|
+
* màu, nên utility trùng tên của app (vd. `text-primary`) không chen vào.
|
|
95
77
|
*/
|
|
96
78
|
.leaf-dialog__start > :where(h2, p) {
|
|
97
79
|
margin: 0;
|
|
98
|
-
min-width: 0;
|
|
99
|
-
overflow: hidden;
|
|
100
|
-
text-overflow: ellipsis;
|
|
101
|
-
white-space: nowrap;
|
|
102
80
|
color: var(--text-primary);
|
|
103
81
|
font-family: var(--font-sans);
|
|
104
82
|
font-size: var(--heading-3-size);
|
|
@@ -108,10 +86,6 @@
|
|
|
108
86
|
|
|
109
87
|
.leaf-dialog__back,
|
|
110
88
|
.leaf-dialog__close {
|
|
111
|
-
display: inline-flex;
|
|
112
|
-
flex-shrink: 0;
|
|
113
|
-
align-items: center;
|
|
114
|
-
justify-content: center;
|
|
115
89
|
margin: 0;
|
|
116
90
|
padding: 0;
|
|
117
91
|
border: none;
|
|
@@ -159,12 +133,6 @@
|
|
|
159
133
|
}
|
|
160
134
|
|
|
161
135
|
.leaf-dialog__body {
|
|
162
|
-
display: flex;
|
|
163
|
-
flex: 1 1 auto;
|
|
164
|
-
flex-direction: column;
|
|
165
136
|
gap: var(--leaf-dialog-gap);
|
|
166
|
-
min-height: 0;
|
|
167
|
-
width: 100%;
|
|
168
|
-
overflow: auto;
|
|
169
137
|
}
|
|
170
138
|
}
|
package/dist/flex.css
ADDED
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
/* @finhay-pro/leaf-design-system — generated by scripts/build-css.mjs. Do not edit. */
|
|
2
|
+
@layer theme, base, components, utilities;
|
|
3
|
+
|
|
4
|
+
/* --- src/styles/flex.css --- */
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
* Flex + alignment classes.
|
|
8
|
+
*
|
|
9
|
+
* Display, hướng, wrap, grow/shrink/basis, và căn chỉnh (justify / items / self /
|
|
10
|
+
* content). Nhóm căn chỉnh dùng chung cho grid.
|
|
11
|
+
*
|
|
12
|
+
* Nằm trong @layer components — SCSS module (ngoài layer) đè được class Leaf.
|
|
13
|
+
*
|
|
14
|
+
* `.flex[hidden]`… specificity cao hơn class display nên `hidden` luôn ẩn.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
@layer components {
|
|
18
|
+
.block {
|
|
19
|
+
display: block;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.inline-block {
|
|
23
|
+
display: inline-block;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.inline {
|
|
27
|
+
display: inline;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.hidden {
|
|
31
|
+
display: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.flex {
|
|
35
|
+
display: flex;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.inline-flex {
|
|
39
|
+
display: inline-flex;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.block[hidden],
|
|
43
|
+
.inline-block[hidden],
|
|
44
|
+
.inline[hidden],
|
|
45
|
+
.flex[hidden],
|
|
46
|
+
.inline-flex[hidden] {
|
|
47
|
+
display: none;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.flex-row {
|
|
51
|
+
flex-direction: row;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.flex-row-reverse {
|
|
55
|
+
flex-direction: row-reverse;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.flex-col {
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.flex-col-reverse {
|
|
63
|
+
flex-direction: column-reverse;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.flex-wrap {
|
|
67
|
+
flex-wrap: wrap;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.flex-wrap-reverse {
|
|
71
|
+
flex-wrap: wrap-reverse;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.flex-nowrap {
|
|
75
|
+
flex-wrap: nowrap;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.flex-1 {
|
|
79
|
+
flex: 1;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.flex-auto {
|
|
83
|
+
flex: auto;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.flex-initial {
|
|
87
|
+
flex: 0 auto;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.flex-none {
|
|
91
|
+
flex: none;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.grow {
|
|
95
|
+
flex-grow: 1;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.grow-0 {
|
|
99
|
+
flex-grow: 0;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.shrink {
|
|
103
|
+
flex-shrink: 1;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.shrink-0 {
|
|
107
|
+
flex-shrink: 0;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.basis-0 {
|
|
111
|
+
flex-basis: 0px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.basis-auto {
|
|
115
|
+
flex-basis: auto;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.basis-full {
|
|
119
|
+
flex-basis: 100%;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.justify-start {
|
|
123
|
+
justify-content: flex-start;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.justify-end {
|
|
127
|
+
justify-content: flex-end;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.justify-center {
|
|
131
|
+
justify-content: center;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.justify-between {
|
|
135
|
+
justify-content: space-between;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.justify-around {
|
|
139
|
+
justify-content: space-around;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.justify-evenly {
|
|
143
|
+
justify-content: space-evenly;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.justify-stretch {
|
|
147
|
+
justify-content: stretch;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.justify-normal {
|
|
151
|
+
justify-content: normal;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.items-start {
|
|
155
|
+
align-items: flex-start;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.items-end {
|
|
159
|
+
align-items: flex-end;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.items-center {
|
|
163
|
+
align-items: center;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.items-baseline {
|
|
167
|
+
align-items: baseline;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.items-stretch {
|
|
171
|
+
align-items: stretch;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.self-auto {
|
|
175
|
+
align-self: auto;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.self-start {
|
|
179
|
+
align-self: flex-start;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.self-end {
|
|
183
|
+
align-self: flex-end;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.self-center {
|
|
187
|
+
align-self: center;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.self-baseline {
|
|
191
|
+
align-self: baseline;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.self-stretch {
|
|
195
|
+
align-self: stretch;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.content-start {
|
|
199
|
+
align-content: flex-start;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.content-end {
|
|
203
|
+
align-content: flex-end;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.content-center {
|
|
207
|
+
align-content: center;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.content-between {
|
|
211
|
+
align-content: space-between;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.content-around {
|
|
215
|
+
align-content: space-around;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.content-evenly {
|
|
219
|
+
align-content: space-evenly;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.content-stretch {
|
|
223
|
+
align-content: stretch;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.content-normal {
|
|
227
|
+
align-content: normal;
|
|
228
|
+
}
|
|
229
|
+
}
|