better_ui 0.5.0 → 0.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.
- checksums.yaml +4 -4
- data/README.md +137 -245
- data/app/assets/stylesheets/better_ui/_base.scss +9 -0
- data/app/assets/stylesheets/better_ui/_components.scss +2 -0
- data/app/assets/stylesheets/better_ui/_utilities.scss +14 -0
- data/app/assets/stylesheets/better_ui/application.css +3 -1
- data/app/assets/stylesheets/better_ui/components/_avatar.scss +200 -0
- data/app/assets/stylesheets/better_ui/components/_badge.scss +154 -0
- data/app/assets/stylesheets/better_ui/components/_breadcrumb.scss +106 -0
- data/app/assets/stylesheets/better_ui/components/_button.scss +105 -0
- data/app/assets/stylesheets/better_ui/components/_card.scss +60 -0
- data/app/assets/stylesheets/better_ui/components/_heading.scss +81 -0
- data/app/assets/stylesheets/better_ui/components/_icon.scss +134 -0
- data/app/assets/stylesheets/better_ui/components/_index.scss +17 -0
- data/app/assets/stylesheets/better_ui/components/_link.scss +100 -0
- data/app/assets/stylesheets/better_ui/components/_panel.scss +104 -0
- data/app/assets/stylesheets/better_ui/components/_spinner.scss +129 -0
- data/app/assets/stylesheets/better_ui/components/_table.scss +156 -0
- data/app/assets/stylesheets/better_ui/components/_variables.scss +1 -0
- data/app/assets/stylesheets/better_ui.scss +4 -0
- data/app/components/better_ui/general/avatar_component.html.erb +2 -2
- data/app/components/better_ui/general/avatar_component.rb +29 -29
- data/app/components/better_ui/general/badge_component.html.erb +3 -3
- data/app/components/better_ui/general/badge_component.rb +32 -20
- data/app/components/better_ui/general/breadcrumb_component.html.erb +2 -2
- data/app/components/better_ui/general/breadcrumb_component.rb +23 -23
- data/app/components/better_ui/general/button_component.html.erb +6 -6
- data/app/components/better_ui/general/button_component.rb +20 -22
- data/app/components/better_ui/general/heading_component.html.erb +1 -25
- data/app/components/better_ui/general/heading_component.rb +17 -116
- data/app/components/better_ui/general/icon_component.html.erb +1 -1
- data/app/components/better_ui/general/icon_component.rb +33 -56
- data/app/components/better_ui/general/link_component.html.erb +4 -4
- data/app/components/better_ui/general/link_component.rb +28 -28
- data/app/components/better_ui/general/panel_component.rb +30 -41
- data/app/components/better_ui/general/spinner_component.html.erb +3 -3
- data/app/components/better_ui/general/spinner_component.rb +13 -13
- data/app/components/better_ui/general/table_component.rb +35 -59
- data/app/helpers/better_ui/general/components/avatar_helper.rb +17 -0
- data/app/helpers/better_ui/general/components/badge_helper.rb +17 -0
- data/app/helpers/better_ui/general/components/breadcrumb_helper.rb +17 -0
- data/app/helpers/better_ui/general/components/button_helper.rb +17 -0
- data/app/helpers/better_ui/general/components/heading_helper.rb +17 -0
- data/app/helpers/better_ui/general/components/icon_helper.rb +17 -0
- data/app/helpers/better_ui/general/components/link_helper.rb +17 -0
- data/app/helpers/better_ui/general/components/panel_helper.rb +16 -0
- data/app/helpers/better_ui/general/components/spinner_helper.rb +17 -0
- data/app/helpers/better_ui/general/components/table_helper.rb +17 -0
- data/app/helpers/better_ui/general_helper.rb +15 -0
- data/app/helpers/better_ui_helper.rb +12 -0
- data/config/routes.rb +2 -13
- data/lib/better_ui/engine.rb +67 -11
- data/lib/better_ui/version.rb +1 -1
- data/lib/better_ui.rb +10 -2
- data/lib/generators/better_ui/install_generator.rb +103 -0
- data/lib/generators/better_ui/stylesheet_generator.rb +93 -30
- data/lib/generators/better_ui/templates/README +74 -5
- data/lib/generators/better_ui/templates/components/_avatar.scss +199 -150
- data/lib/generators/better_ui/templates/components/_badge.scss +153 -141
- data/lib/generators/better_ui/templates/components/_breadcrumb.scss +105 -106
- data/lib/generators/better_ui/templates/components/_button.scss +104 -101
- data/lib/generators/better_ui/templates/components/_card.scss +56 -65
- data/lib/generators/better_ui/templates/components/_heading.scss +80 -179
- data/lib/generators/better_ui/templates/components/_icon.scss +133 -89
- data/lib/generators/better_ui/templates/components/_index.scss +17 -0
- data/lib/generators/better_ui/templates/components/_link.scss +99 -129
- data/lib/generators/better_ui/templates/components/_panel.scss +103 -143
- data/lib/generators/better_ui/templates/components/_spinner.scss +127 -130
- data/lib/generators/better_ui/templates/components/_table.scss +156 -105
- data/lib/generators/better_ui/templates/components/_variables.scss +0 -33
- data/lib/generators/better_ui/templates/components_stylesheet.scss +25 -56
- data/lib/generators/better_ui/templates/index.scss +18 -0
- data/lib/generators/better_ui/templates/initializer.rb +41 -0
- metadata +91 -49
- data/app/assets/javascripts/better_ui/controllers/navbar_controller.js +0 -138
- data/app/assets/javascripts/better_ui/controllers/sidebar_controller.js +0 -211
- data/app/assets/javascripts/better_ui/controllers/toast_controller.js +0 -161
- data/app/assets/javascripts/better_ui/index.js +0 -159
- data/app/assets/javascripts/better_ui/toast_manager.js +0 -77
- data/app/components/better_ui/theme_helper.rb +0 -171
- data/app/controllers/better_ui/docs_controller.rb +0 -34
@@ -0,0 +1,200 @@
|
|
1
|
+
@layer components {
|
2
|
+
// Classe base per l'avatar (Block)
|
3
|
+
.bui-avatar {
|
4
|
+
@apply inline-flex items-center justify-center relative;
|
5
|
+
|
6
|
+
// Elements
|
7
|
+
&__image {
|
8
|
+
@apply object-cover;
|
9
|
+
}
|
10
|
+
|
11
|
+
&__placeholder {
|
12
|
+
@apply flex items-center justify-center font-medium text-white uppercase;
|
13
|
+
}
|
14
|
+
|
15
|
+
&__status {
|
16
|
+
@apply absolute bottom-0 right-0 block rounded-full ring-2 ring-white;
|
17
|
+
|
18
|
+
&--online {
|
19
|
+
@apply bg-green-400;
|
20
|
+
}
|
21
|
+
|
22
|
+
&--offline {
|
23
|
+
@apply bg-gray-400;
|
24
|
+
}
|
25
|
+
|
26
|
+
&--busy {
|
27
|
+
@apply bg-red-400;
|
28
|
+
}
|
29
|
+
|
30
|
+
&--away {
|
31
|
+
@apply bg-yellow-400;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
35
|
+
&__presence {
|
36
|
+
@apply absolute block rounded-full ring-2 ring-white;
|
37
|
+
}
|
38
|
+
|
39
|
+
&__badge {
|
40
|
+
@apply absolute -top-1 -right-1 flex items-center justify-center;
|
41
|
+
}
|
42
|
+
|
43
|
+
// Modifiers (dimensioni)
|
44
|
+
&--xs {
|
45
|
+
@apply h-6 w-6;
|
46
|
+
|
47
|
+
.bui-avatar__placeholder {
|
48
|
+
@apply text-xs;
|
49
|
+
}
|
50
|
+
|
51
|
+
.bui-avatar__status {
|
52
|
+
@apply h-1.5 w-1.5;
|
53
|
+
}
|
54
|
+
|
55
|
+
.bui-avatar__badge {
|
56
|
+
@apply h-4 w-4 text-[0.6rem];
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
&--sm {
|
61
|
+
@apply h-8 w-8;
|
62
|
+
|
63
|
+
.bui-avatar__placeholder {
|
64
|
+
@apply text-xs;
|
65
|
+
}
|
66
|
+
|
67
|
+
.bui-avatar__status {
|
68
|
+
@apply h-2 w-2;
|
69
|
+
}
|
70
|
+
|
71
|
+
.bui-avatar__badge {
|
72
|
+
@apply h-5 w-5 text-xs;
|
73
|
+
}
|
74
|
+
}
|
75
|
+
|
76
|
+
&--md {
|
77
|
+
@apply h-10 w-10;
|
78
|
+
|
79
|
+
.bui-avatar__placeholder {
|
80
|
+
@apply text-sm;
|
81
|
+
}
|
82
|
+
|
83
|
+
.bui-avatar__status {
|
84
|
+
@apply h-2.5 w-2.5;
|
85
|
+
}
|
86
|
+
|
87
|
+
.bui-avatar__badge {
|
88
|
+
@apply h-6 w-6 text-xs;
|
89
|
+
}
|
90
|
+
}
|
91
|
+
|
92
|
+
&--lg {
|
93
|
+
@apply h-12 w-12;
|
94
|
+
|
95
|
+
.bui-avatar__placeholder {
|
96
|
+
@apply text-base;
|
97
|
+
}
|
98
|
+
|
99
|
+
.bui-avatar__status {
|
100
|
+
@apply h-3 w-3;
|
101
|
+
}
|
102
|
+
|
103
|
+
.bui-avatar__badge {
|
104
|
+
@apply h-7 w-7 text-sm;
|
105
|
+
}
|
106
|
+
}
|
107
|
+
|
108
|
+
&--xl {
|
109
|
+
@apply h-16 w-16;
|
110
|
+
|
111
|
+
.bui-avatar__placeholder {
|
112
|
+
@apply text-lg;
|
113
|
+
}
|
114
|
+
|
115
|
+
.bui-avatar__status {
|
116
|
+
@apply h-4 w-4;
|
117
|
+
}
|
118
|
+
|
119
|
+
.bui-avatar__badge {
|
120
|
+
@apply h-8 w-8 text-sm;
|
121
|
+
}
|
122
|
+
}
|
123
|
+
|
124
|
+
// Modifiers (colori placeholders)
|
125
|
+
&--gray {
|
126
|
+
.bui-avatar__placeholder {
|
127
|
+
@apply bg-gray-500;
|
128
|
+
}
|
129
|
+
}
|
130
|
+
|
131
|
+
&--red {
|
132
|
+
.bui-avatar__placeholder {
|
133
|
+
@apply bg-red-500;
|
134
|
+
}
|
135
|
+
}
|
136
|
+
|
137
|
+
&--blue {
|
138
|
+
.bui-avatar__placeholder {
|
139
|
+
@apply bg-blue-500;
|
140
|
+
}
|
141
|
+
}
|
142
|
+
|
143
|
+
&--green {
|
144
|
+
.bui-avatar__placeholder {
|
145
|
+
@apply bg-green-500;
|
146
|
+
}
|
147
|
+
}
|
148
|
+
|
149
|
+
&--violet {
|
150
|
+
.bui-avatar__placeholder {
|
151
|
+
@apply bg-violet-500;
|
152
|
+
}
|
153
|
+
}
|
154
|
+
|
155
|
+
&--orange {
|
156
|
+
.bui-avatar__placeholder {
|
157
|
+
@apply bg-orange-500;
|
158
|
+
}
|
159
|
+
}
|
160
|
+
|
161
|
+
&--yellow {
|
162
|
+
.bui-avatar__placeholder {
|
163
|
+
@apply bg-yellow-500 text-yellow-900;
|
164
|
+
}
|
165
|
+
}
|
166
|
+
|
167
|
+
// Modifiers (forma)
|
168
|
+
&--circle {
|
169
|
+
@apply rounded-full;
|
170
|
+
|
171
|
+
.bui-avatar__image,
|
172
|
+
.bui-avatar__placeholder {
|
173
|
+
@apply rounded-full;
|
174
|
+
}
|
175
|
+
}
|
176
|
+
|
177
|
+
&--square {
|
178
|
+
@apply rounded-md;
|
179
|
+
|
180
|
+
.bui-avatar__image,
|
181
|
+
.bui-avatar__placeholder {
|
182
|
+
@apply rounded-md;
|
183
|
+
}
|
184
|
+
}
|
185
|
+
|
186
|
+
// Modifiers (gruppo)
|
187
|
+
&--group {
|
188
|
+
@apply -ml-2 first:ml-0;
|
189
|
+
}
|
190
|
+
}
|
191
|
+
|
192
|
+
// Avatar group container
|
193
|
+
.bui-avatar-group {
|
194
|
+
@apply flex;
|
195
|
+
|
196
|
+
.bui-avatar {
|
197
|
+
@apply border-2 border-white;
|
198
|
+
}
|
199
|
+
}
|
200
|
+
}
|
@@ -0,0 +1,154 @@
|
|
1
|
+
@layer components {
|
2
|
+
// Classe base per il badge (Block)
|
3
|
+
.bui-badge {
|
4
|
+
@apply inline-flex items-center justify-center rounded-full px-2.5 py-0.5 text-xs font-medium;
|
5
|
+
|
6
|
+
// Elements
|
7
|
+
&__icon {
|
8
|
+
@apply flex-shrink-0;
|
9
|
+
|
10
|
+
&--left {
|
11
|
+
@apply -ml-0.5 mr-1.5;
|
12
|
+
}
|
13
|
+
|
14
|
+
&--right {
|
15
|
+
@apply -mr-0.5 ml-1.5;
|
16
|
+
}
|
17
|
+
}
|
18
|
+
|
19
|
+
&__text {
|
20
|
+
@apply whitespace-nowrap;
|
21
|
+
}
|
22
|
+
|
23
|
+
&__dot {
|
24
|
+
@apply h-2 w-2 rounded-full mr-1.5;
|
25
|
+
}
|
26
|
+
|
27
|
+
// Modifiers (varianti colore)
|
28
|
+
&--default {
|
29
|
+
@apply bg-gray-100 text-gray-800;
|
30
|
+
|
31
|
+
.bui-badge__dot {
|
32
|
+
@apply bg-gray-500;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
&--white {
|
37
|
+
@apply bg-white text-gray-800 border border-gray-200;
|
38
|
+
|
39
|
+
.bui-badge__dot {
|
40
|
+
@apply bg-gray-400;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
&--red {
|
45
|
+
@apply bg-red-100 text-red-800;
|
46
|
+
|
47
|
+
.bui-badge__dot {
|
48
|
+
@apply bg-red-500;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
&--rose {
|
53
|
+
@apply bg-rose-100 text-rose-800;
|
54
|
+
|
55
|
+
.bui-badge__dot {
|
56
|
+
@apply bg-rose-500;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
&--orange {
|
61
|
+
@apply bg-orange-100 text-orange-800;
|
62
|
+
|
63
|
+
.bui-badge__dot {
|
64
|
+
@apply bg-orange-500;
|
65
|
+
}
|
66
|
+
}
|
67
|
+
|
68
|
+
&--green {
|
69
|
+
@apply bg-green-100 text-green-800;
|
70
|
+
|
71
|
+
.bui-badge__dot {
|
72
|
+
@apply bg-green-500;
|
73
|
+
}
|
74
|
+
}
|
75
|
+
|
76
|
+
&--blue {
|
77
|
+
@apply bg-blue-100 text-blue-800;
|
78
|
+
|
79
|
+
.bui-badge__dot {
|
80
|
+
@apply bg-blue-500;
|
81
|
+
}
|
82
|
+
}
|
83
|
+
|
84
|
+
&--yellow {
|
85
|
+
@apply bg-yellow-100 text-yellow-800;
|
86
|
+
|
87
|
+
.bui-badge__dot {
|
88
|
+
@apply bg-yellow-500;
|
89
|
+
}
|
90
|
+
}
|
91
|
+
|
92
|
+
&--violet {
|
93
|
+
@apply bg-violet-100 text-violet-800;
|
94
|
+
|
95
|
+
.bui-badge__dot {
|
96
|
+
@apply bg-violet-500;
|
97
|
+
}
|
98
|
+
}
|
99
|
+
|
100
|
+
// Modifiers (varianti dimensione)
|
101
|
+
&--small {
|
102
|
+
@apply text-xs px-2 py-0.5;
|
103
|
+
}
|
104
|
+
|
105
|
+
&--medium {
|
106
|
+
@apply text-sm px-2.5 py-0.5;
|
107
|
+
}
|
108
|
+
|
109
|
+
&--large {
|
110
|
+
@apply text-sm px-3 py-1;
|
111
|
+
}
|
112
|
+
|
113
|
+
// Modifiers (varianti stile)
|
114
|
+
&--pill {
|
115
|
+
@apply rounded-full;
|
116
|
+
}
|
117
|
+
|
118
|
+
&--square {
|
119
|
+
@apply rounded-md;
|
120
|
+
}
|
121
|
+
|
122
|
+
&--outline {
|
123
|
+
@apply bg-transparent border;
|
124
|
+
|
125
|
+
&.bui-badge--red {
|
126
|
+
@apply border-red-500 text-red-700 bg-transparent;
|
127
|
+
}
|
128
|
+
|
129
|
+
&.bui-badge--green {
|
130
|
+
@apply border-green-500 text-green-700 bg-transparent;
|
131
|
+
}
|
132
|
+
|
133
|
+
&.bui-badge--blue {
|
134
|
+
@apply border-blue-500 text-blue-700 bg-transparent;
|
135
|
+
}
|
136
|
+
|
137
|
+
&.bui-badge--yellow {
|
138
|
+
@apply border-yellow-500 text-yellow-700 bg-transparent;
|
139
|
+
}
|
140
|
+
|
141
|
+
&.bui-badge--violet {
|
142
|
+
@apply border-violet-500 text-violet-700 bg-transparent;
|
143
|
+
}
|
144
|
+
|
145
|
+
&.bui-badge--orange {
|
146
|
+
@apply border-orange-500 text-orange-700 bg-transparent;
|
147
|
+
}
|
148
|
+
|
149
|
+
&.bui-badge--rose {
|
150
|
+
@apply border-rose-500 text-rose-700 bg-transparent;
|
151
|
+
}
|
152
|
+
}
|
153
|
+
}
|
154
|
+
}
|
@@ -0,0 +1,106 @@
|
|
1
|
+
@layer components {
|
2
|
+
// Classe base per il breadcrumb (Block)
|
3
|
+
.bui-breadcrumb {
|
4
|
+
@apply flex items-center flex-wrap;
|
5
|
+
|
6
|
+
// Elements
|
7
|
+
&__list {
|
8
|
+
@apply flex flex-wrap items-center;
|
9
|
+
}
|
10
|
+
|
11
|
+
&__item {
|
12
|
+
@apply flex items-center;
|
13
|
+
}
|
14
|
+
|
15
|
+
&__separator {
|
16
|
+
@apply mx-2;
|
17
|
+
|
18
|
+
// Modifiers per il separatore
|
19
|
+
&--default {
|
20
|
+
@apply text-gray-500;
|
21
|
+
}
|
22
|
+
|
23
|
+
&--white {
|
24
|
+
@apply text-gray-400;
|
25
|
+
}
|
26
|
+
|
27
|
+
&--red {
|
28
|
+
@apply text-red-300;
|
29
|
+
}
|
30
|
+
|
31
|
+
&--rose {
|
32
|
+
@apply text-rose-300;
|
33
|
+
}
|
34
|
+
|
35
|
+
&--orange {
|
36
|
+
@apply text-orange-300;
|
37
|
+
}
|
38
|
+
|
39
|
+
&--green {
|
40
|
+
@apply text-green-300;
|
41
|
+
}
|
42
|
+
|
43
|
+
&--blue {
|
44
|
+
@apply text-blue-300;
|
45
|
+
}
|
46
|
+
|
47
|
+
&--yellow {
|
48
|
+
@apply text-yellow-600;
|
49
|
+
}
|
50
|
+
|
51
|
+
&--violet {
|
52
|
+
@apply text-violet-300;
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
// Modifiers (dimensioni)
|
57
|
+
&--small {
|
58
|
+
@apply text-xs;
|
59
|
+
}
|
60
|
+
|
61
|
+
&--medium {
|
62
|
+
@apply text-sm;
|
63
|
+
}
|
64
|
+
|
65
|
+
&--large {
|
66
|
+
@apply text-base;
|
67
|
+
}
|
68
|
+
|
69
|
+
// Modifiers (temi colore)
|
70
|
+
&--default {
|
71
|
+
@apply text-white;
|
72
|
+
}
|
73
|
+
|
74
|
+
&--white {
|
75
|
+
@apply text-black;
|
76
|
+
}
|
77
|
+
|
78
|
+
&--red {
|
79
|
+
@apply text-white;
|
80
|
+
}
|
81
|
+
|
82
|
+
&--rose {
|
83
|
+
@apply text-white;
|
84
|
+
}
|
85
|
+
|
86
|
+
&--orange {
|
87
|
+
@apply text-white;
|
88
|
+
}
|
89
|
+
|
90
|
+
&--green {
|
91
|
+
@apply text-white;
|
92
|
+
}
|
93
|
+
|
94
|
+
&--blue {
|
95
|
+
@apply text-white;
|
96
|
+
}
|
97
|
+
|
98
|
+
&--yellow {
|
99
|
+
@apply text-black;
|
100
|
+
}
|
101
|
+
|
102
|
+
&--violet {
|
103
|
+
@apply text-white;
|
104
|
+
}
|
105
|
+
}
|
106
|
+
}
|
@@ -0,0 +1,105 @@
|
|
1
|
+
@layer components {
|
2
|
+
// Classe base per il bottone (Block)
|
3
|
+
.bui-button {
|
4
|
+
@apply inline-flex items-center justify-center font-medium
|
5
|
+
transition-colors duration-200 rounded-md
|
6
|
+
focus:outline-none focus:ring-2 focus:ring-offset-2;
|
7
|
+
|
8
|
+
// Elements
|
9
|
+
&__icon {
|
10
|
+
@apply flex-shrink-0;
|
11
|
+
|
12
|
+
&--left {
|
13
|
+
@apply mr-2;
|
14
|
+
}
|
15
|
+
|
16
|
+
&--right {
|
17
|
+
@apply ml-2;
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
&__text {
|
22
|
+
@apply flex-grow;
|
23
|
+
}
|
24
|
+
|
25
|
+
// Modifiers (varianti colore)
|
26
|
+
&--default {
|
27
|
+
@apply bg-black text-white hover:bg-gray-900 focus:ring-gray-900;
|
28
|
+
}
|
29
|
+
|
30
|
+
&--white {
|
31
|
+
@apply bg-white text-black hover:bg-gray-100 focus:ring-gray-400;
|
32
|
+
}
|
33
|
+
|
34
|
+
&--red {
|
35
|
+
@apply bg-red-500 text-white hover:bg-red-600 focus:ring-red-500;
|
36
|
+
}
|
37
|
+
|
38
|
+
&--rose {
|
39
|
+
@apply bg-rose-500 text-white hover:bg-rose-600 focus:ring-rose-500;
|
40
|
+
}
|
41
|
+
|
42
|
+
&--orange {
|
43
|
+
@apply bg-orange-500 text-white hover:bg-orange-600 focus:ring-orange-500;
|
44
|
+
}
|
45
|
+
|
46
|
+
&--green {
|
47
|
+
@apply bg-green-500 text-white hover:bg-green-600 focus:ring-green-500;
|
48
|
+
}
|
49
|
+
|
50
|
+
&--blue {
|
51
|
+
@apply bg-blue-500 text-white hover:bg-blue-600 focus:ring-blue-500;
|
52
|
+
}
|
53
|
+
|
54
|
+
&--yellow {
|
55
|
+
@apply bg-yellow-500 text-black hover:bg-yellow-600 focus:ring-yellow-500;
|
56
|
+
}
|
57
|
+
|
58
|
+
&--violet {
|
59
|
+
@apply bg-violet-500 text-white hover:bg-violet-600 focus:ring-violet-500;
|
60
|
+
}
|
61
|
+
|
62
|
+
// Modifiers (dimensioni)
|
63
|
+
&--small {
|
64
|
+
@apply px-2.5 py-1.5 text-xs;
|
65
|
+
}
|
66
|
+
|
67
|
+
&--medium {
|
68
|
+
@apply px-4 py-2 text-sm;
|
69
|
+
}
|
70
|
+
|
71
|
+
&--large {
|
72
|
+
@apply px-6 py-3 text-base;
|
73
|
+
}
|
74
|
+
|
75
|
+
// Modifiers (border radius)
|
76
|
+
&--radius-none {
|
77
|
+
@apply rounded-none;
|
78
|
+
}
|
79
|
+
|
80
|
+
&--radius-small {
|
81
|
+
@apply rounded-md;
|
82
|
+
}
|
83
|
+
|
84
|
+
&--radius-medium {
|
85
|
+
@apply rounded-lg;
|
86
|
+
}
|
87
|
+
|
88
|
+
&--radius-large {
|
89
|
+
@apply rounded-xl;
|
90
|
+
}
|
91
|
+
|
92
|
+
&--radius-full {
|
93
|
+
@apply rounded-full;
|
94
|
+
}
|
95
|
+
|
96
|
+
// Modifiers (stati)
|
97
|
+
&--disabled {
|
98
|
+
@apply opacity-50 cursor-not-allowed;
|
99
|
+
}
|
100
|
+
|
101
|
+
&--full-width {
|
102
|
+
@apply w-full;
|
103
|
+
}
|
104
|
+
}
|
105
|
+
}
|
@@ -0,0 +1,60 @@
|
|
1
|
+
@layer components {
|
2
|
+
// Classe base per la card (Block)
|
3
|
+
.bui-card {
|
4
|
+
@apply bg-white border shadow-sm overflow-hidden;
|
5
|
+
|
6
|
+
// Elements
|
7
|
+
&__content {
|
8
|
+
@apply p-4;
|
9
|
+
}
|
10
|
+
|
11
|
+
&__header {
|
12
|
+
@apply p-4 border-b;
|
13
|
+
}
|
14
|
+
|
15
|
+
&__footer {
|
16
|
+
@apply p-4 border-t;
|
17
|
+
}
|
18
|
+
|
19
|
+
&__body {
|
20
|
+
@apply flex flex-col;
|
21
|
+
}
|
22
|
+
|
23
|
+
&__title {
|
24
|
+
@apply text-lg font-medium;
|
25
|
+
}
|
26
|
+
|
27
|
+
&__value {
|
28
|
+
@apply text-2xl font-bold mt-2;
|
29
|
+
|
30
|
+
&--reference {
|
31
|
+
@apply text-sm text-gray-500 mt-1;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
35
|
+
&__trend {
|
36
|
+
@apply mt-2 inline-flex items-center px-2 py-1 text-xs font-medium rounded;
|
37
|
+
}
|
38
|
+
|
39
|
+
// Modifiers (border radius)
|
40
|
+
&--radius-none {
|
41
|
+
@apply rounded-none;
|
42
|
+
}
|
43
|
+
|
44
|
+
&--radius-small {
|
45
|
+
@apply rounded-md;
|
46
|
+
}
|
47
|
+
|
48
|
+
&--radius-medium {
|
49
|
+
@apply rounded-lg;
|
50
|
+
}
|
51
|
+
|
52
|
+
&--radius-large {
|
53
|
+
@apply rounded-xl;
|
54
|
+
}
|
55
|
+
|
56
|
+
&--radius-full {
|
57
|
+
@apply rounded-full;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
}
|
@@ -0,0 +1,81 @@
|
|
1
|
+
@layer components {
|
2
|
+
// Classe base per il titolo (Block)
|
3
|
+
.bui-heading {
|
4
|
+
@apply font-bold text-gray-900 leading-tight;
|
5
|
+
|
6
|
+
// Modifiers (dimensioni/livelli)
|
7
|
+
&--1 {
|
8
|
+
@apply text-3xl sm:text-4xl;
|
9
|
+
}
|
10
|
+
|
11
|
+
&--2 {
|
12
|
+
@apply text-2xl sm:text-3xl;
|
13
|
+
}
|
14
|
+
|
15
|
+
&--3 {
|
16
|
+
@apply text-xl sm:text-2xl;
|
17
|
+
}
|
18
|
+
|
19
|
+
&--4 {
|
20
|
+
@apply text-lg sm:text-xl;
|
21
|
+
}
|
22
|
+
|
23
|
+
&--5 {
|
24
|
+
@apply text-base sm:text-lg;
|
25
|
+
}
|
26
|
+
|
27
|
+
&--6 {
|
28
|
+
@apply text-sm sm:text-base;
|
29
|
+
}
|
30
|
+
|
31
|
+
// Modifiers (varianti colore)
|
32
|
+
&--default {
|
33
|
+
@apply text-gray-900;
|
34
|
+
}
|
35
|
+
|
36
|
+
&--white {
|
37
|
+
@apply text-white;
|
38
|
+
}
|
39
|
+
|
40
|
+
&--red {
|
41
|
+
@apply text-red-600;
|
42
|
+
}
|
43
|
+
|
44
|
+
&--rose {
|
45
|
+
@apply text-rose-600;
|
46
|
+
}
|
47
|
+
|
48
|
+
&--orange {
|
49
|
+
@apply text-orange-600;
|
50
|
+
}
|
51
|
+
|
52
|
+
&--green {
|
53
|
+
@apply text-green-600;
|
54
|
+
}
|
55
|
+
|
56
|
+
&--blue {
|
57
|
+
@apply text-blue-600;
|
58
|
+
}
|
59
|
+
|
60
|
+
&--yellow {
|
61
|
+
@apply text-yellow-600;
|
62
|
+
}
|
63
|
+
|
64
|
+
&--violet {
|
65
|
+
@apply text-violet-600;
|
66
|
+
}
|
67
|
+
|
68
|
+
// Modifiers (allineamento)
|
69
|
+
&--left {
|
70
|
+
@apply text-left;
|
71
|
+
}
|
72
|
+
|
73
|
+
&--center {
|
74
|
+
@apply text-center;
|
75
|
+
}
|
76
|
+
|
77
|
+
&--right {
|
78
|
+
@apply text-right;
|
79
|
+
}
|
80
|
+
}
|
81
|
+
}
|