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
@@ -1,144 +1,104 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
}
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
.bui-
|
40
|
-
|
41
|
-
}
|
42
|
-
|
43
|
-
.bui-
|
44
|
-
|
45
|
-
}
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
}
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
.bui-
|
65
|
-
|
66
|
-
}
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
}
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
}
|
104
|
-
|
105
|
-
.bui-panel-violet-header {
|
106
|
-
@apply bg-violet-500 text-white;
|
107
|
-
}
|
108
|
-
|
109
|
-
/* Temi di colore per footer */
|
110
|
-
.bui-panel-default-footer {
|
111
|
-
@apply bg-black text-white;
|
112
|
-
}
|
113
|
-
|
114
|
-
.bui-panel-white-footer {
|
115
|
-
@apply bg-white text-black;
|
116
|
-
}
|
117
|
-
|
118
|
-
.bui-panel-red-footer {
|
119
|
-
@apply bg-red-500 text-white;
|
120
|
-
}
|
121
|
-
|
122
|
-
.bui-panel-rose-footer {
|
123
|
-
@apply bg-rose-500 text-white;
|
124
|
-
}
|
125
|
-
|
126
|
-
.bui-panel-orange-footer {
|
127
|
-
@apply bg-orange-500 text-white;
|
128
|
-
}
|
129
|
-
|
130
|
-
.bui-panel-green-footer {
|
131
|
-
@apply bg-green-500 text-white;
|
132
|
-
}
|
133
|
-
|
134
|
-
.bui-panel-blue-footer {
|
135
|
-
@apply bg-blue-500 text-white;
|
136
|
-
}
|
137
|
-
|
138
|
-
.bui-panel-yellow-footer {
|
139
|
-
@apply bg-yellow-500 text-black;
|
140
|
-
}
|
141
|
-
|
142
|
-
.bui-panel-violet-footer {
|
143
|
-
@apply bg-violet-500 text-white;
|
1
|
+
@layer components {
|
2
|
+
// Classe base per il pannello (Block)
|
3
|
+
.bui-panel {
|
4
|
+
@apply border shadow-sm;
|
5
|
+
|
6
|
+
// Elements
|
7
|
+
&__header {
|
8
|
+
@apply px-4 py-3 border-b;
|
9
|
+
}
|
10
|
+
|
11
|
+
&__body {
|
12
|
+
@apply p-4;
|
13
|
+
}
|
14
|
+
|
15
|
+
&__footer {
|
16
|
+
@apply px-4 py-3 border-t;
|
17
|
+
}
|
18
|
+
|
19
|
+
&__title {
|
20
|
+
@apply text-lg font-medium;
|
21
|
+
}
|
22
|
+
|
23
|
+
// Modifiers (varianti colore)
|
24
|
+
&--default {
|
25
|
+
@apply bg-black text-white border-gray-900;
|
26
|
+
|
27
|
+
.bui-panel__header {
|
28
|
+
@apply bg-gray-900;
|
29
|
+
}
|
30
|
+
|
31
|
+
.bui-panel__footer {
|
32
|
+
@apply bg-gray-900;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
&--white {
|
37
|
+
@apply bg-white text-black border-gray-200;
|
38
|
+
|
39
|
+
.bui-panel__header {
|
40
|
+
@apply bg-gray-50;
|
41
|
+
}
|
42
|
+
|
43
|
+
.bui-panel__footer {
|
44
|
+
@apply bg-gray-50;
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
&--red {
|
49
|
+
@apply bg-red-50 text-red-900 border-red-200;
|
50
|
+
|
51
|
+
.bui-panel__header {
|
52
|
+
@apply bg-red-100 text-red-800;
|
53
|
+
}
|
54
|
+
|
55
|
+
.bui-panel__footer {
|
56
|
+
@apply bg-red-100;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
// ... altre varianti di colore ...
|
61
|
+
|
62
|
+
// Modifiers (varianti di padding)
|
63
|
+
&--padding-none {
|
64
|
+
.bui-panel__body {
|
65
|
+
@apply p-0;
|
66
|
+
}
|
67
|
+
}
|
68
|
+
|
69
|
+
&--padding-small {
|
70
|
+
.bui-panel__body {
|
71
|
+
@apply p-2;
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
75
|
+
&--padding-medium {
|
76
|
+
.bui-panel__body {
|
77
|
+
@apply p-4;
|
78
|
+
}
|
79
|
+
}
|
80
|
+
|
81
|
+
&--padding-large {
|
82
|
+
.bui-panel__body {
|
83
|
+
@apply p-6;
|
84
|
+
}
|
85
|
+
}
|
86
|
+
|
87
|
+
// Modifiers (border radius)
|
88
|
+
&--radius-none {
|
89
|
+
@apply rounded-none;
|
90
|
+
}
|
91
|
+
|
92
|
+
&--radius-small {
|
93
|
+
@apply rounded-md;
|
94
|
+
}
|
95
|
+
|
96
|
+
&--radius-medium {
|
97
|
+
@apply rounded-lg;
|
98
|
+
}
|
99
|
+
|
100
|
+
&--radius-large {
|
101
|
+
@apply rounded-xl;
|
102
|
+
}
|
103
|
+
}
|
144
104
|
}
|
@@ -1,132 +1,129 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
}
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
}
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
.bui-
|
36
|
-
|
37
|
-
}
|
38
|
-
|
39
|
-
.bui-
|
40
|
-
|
41
|
-
}
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
}
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
}
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
}
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
}
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
}
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
}
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
}
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
}
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
.bui-spinner-label {
|
130
|
-
@apply text-violet-600;
|
1
|
+
@layer components {
|
2
|
+
// Classe base per lo spinner (Block)
|
3
|
+
.bui-spinner {
|
4
|
+
@apply inline-flex flex-col items-center justify-center;
|
5
|
+
|
6
|
+
// Elements
|
7
|
+
&__animation {
|
8
|
+
@apply inline-block rounded-full animate-spin;
|
9
|
+
border-top-color: transparent;
|
10
|
+
}
|
11
|
+
|
12
|
+
&__label {
|
13
|
+
@apply mt-2 text-center;
|
14
|
+
}
|
15
|
+
|
16
|
+
&__content {
|
17
|
+
@apply mt-4;
|
18
|
+
}
|
19
|
+
|
20
|
+
// Modifiers (dimensioni)
|
21
|
+
&--small &__animation {
|
22
|
+
@apply w-5 h-5 border-2;
|
23
|
+
}
|
24
|
+
|
25
|
+
&--medium &__animation {
|
26
|
+
@apply w-8 h-8 border-3;
|
27
|
+
}
|
28
|
+
|
29
|
+
&--large &__animation {
|
30
|
+
@apply w-12 h-12 border-4;
|
31
|
+
}
|
32
|
+
|
33
|
+
// Modifiers (temi colore)
|
34
|
+
&--default {
|
35
|
+
.bui-spinner__animation {
|
36
|
+
@apply border-gray-200 border-t-gray-800;
|
37
|
+
}
|
38
|
+
|
39
|
+
.bui-spinner__label {
|
40
|
+
@apply text-gray-800;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
&--white {
|
45
|
+
.bui-spinner__animation {
|
46
|
+
@apply border-gray-100 border-t-white;
|
47
|
+
}
|
48
|
+
|
49
|
+
.bui-spinner__label {
|
50
|
+
@apply text-white;
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
&--red {
|
55
|
+
.bui-spinner__animation {
|
56
|
+
@apply border-red-100 border-t-red-600;
|
57
|
+
}
|
58
|
+
|
59
|
+
.bui-spinner__label {
|
60
|
+
@apply text-red-600;
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
64
|
+
&--rose {
|
65
|
+
.bui-spinner__animation {
|
66
|
+
@apply border-rose-100 border-t-rose-600;
|
67
|
+
}
|
68
|
+
|
69
|
+
.bui-spinner__label {
|
70
|
+
@apply text-rose-600;
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
74
|
+
&--orange {
|
75
|
+
.bui-spinner__animation {
|
76
|
+
@apply border-orange-100 border-t-orange-500;
|
77
|
+
}
|
78
|
+
|
79
|
+
.bui-spinner__label {
|
80
|
+
@apply text-orange-500;
|
81
|
+
}
|
82
|
+
}
|
83
|
+
|
84
|
+
&--green {
|
85
|
+
.bui-spinner__animation {
|
86
|
+
@apply border-green-100 border-t-green-600;
|
87
|
+
}
|
88
|
+
|
89
|
+
.bui-spinner__label {
|
90
|
+
@apply text-green-600;
|
91
|
+
}
|
92
|
+
}
|
93
|
+
|
94
|
+
&--blue {
|
95
|
+
.bui-spinner__animation {
|
96
|
+
@apply border-blue-100 border-t-blue-600;
|
97
|
+
}
|
98
|
+
|
99
|
+
.bui-spinner__label {
|
100
|
+
@apply text-blue-600;
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
104
|
+
&--yellow {
|
105
|
+
.bui-spinner__animation {
|
106
|
+
@apply border-yellow-100 border-t-yellow-500;
|
107
|
+
}
|
108
|
+
|
109
|
+
.bui-spinner__label {
|
110
|
+
@apply text-yellow-500;
|
111
|
+
}
|
112
|
+
}
|
113
|
+
|
114
|
+
&--violet {
|
115
|
+
.bui-spinner__animation {
|
116
|
+
@apply border-violet-100 border-t-violet-600;
|
117
|
+
}
|
118
|
+
|
119
|
+
.bui-spinner__label {
|
120
|
+
@apply text-violet-600;
|
121
|
+
}
|
122
|
+
}
|
123
|
+
|
124
|
+
// Modifiers (stati)
|
125
|
+
&--fullscreen {
|
126
|
+
@apply fixed inset-0 flex items-center justify-center z-50 bg-black bg-opacity-50;
|
127
|
+
}
|
131
128
|
}
|
132
129
|
}
|