@uxf/cms 10.0.0-beta.7 → 10.0.0-beta.71

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.
Files changed (45) hide show
  1. package/lib/layout/breadcrumbs.js +3 -3
  2. package/lib/layout/layout-container.js +3 -3
  3. package/lib/layout/layout.js +22 -21
  4. package/lib/layout/sidebar.js +33 -19
  5. package/lib/layout/types.d.ts +1 -0
  6. package/lib/login-layout/login-layout.js +6 -8
  7. package/lib/menu/factory.d.ts +4 -4
  8. package/lib/menu/factory.js +6 -4
  9. package/lib/menu/mobile-bar.d.ts +4 -2
  10. package/lib/menu/mobile-bar.js +8 -10
  11. package/lib/menu/model.d.ts +6 -2
  12. package/lib/menu/model.js +7 -0
  13. package/lib/menu/ui/list-item/list-item.js +16 -15
  14. package/lib/menu/ui/list-item/types.d.ts +5 -4
  15. package/lib/menu/ui/menu-custom-item.js +2 -4
  16. package/lib/menu/ui/menu-item.js +10 -11
  17. package/lib/menu/ui/menu-super-section-item.js +3 -5
  18. package/lib/menu/ui/menu.js +1 -1
  19. package/lib/menu/ui/sub-menu/{sub-menuItem.js → sub-menu-item.js} +4 -6
  20. package/lib/menu/ui/sub-menu/sub-menu-mobile.js +4 -4
  21. package/lib/menu/ui/sub-menu/sub-menu.js +4 -4
  22. package/lib/menu/ui/sub-menu/use-sub-menu.d.ts +2 -2
  23. package/lib/menu/ui/sub-menu/use-sub-menu.js +1 -1
  24. package/lib/menu/ui/user-menu.js +12 -12
  25. package/package.json +15 -38
  26. package/pages/grid-page/grid-page.js +2 -2
  27. package/ui/avatar/avatar.d.ts +11 -0
  28. package/ui/avatar/avatar.js +47 -0
  29. package/ui/avatar/get-avatar-user-letters.d.ts +1 -0
  30. package/ui/avatar/get-avatar-user-letters.js +17 -0
  31. package/ui/avatar/index.d.ts +3 -0
  32. package/ui/avatar/index.js +5 -0
  33. package/ui/avatar/theme.d.ts +11 -0
  34. package/ui/avatar/theme.js +2 -0
  35. package/ui/styles/avatar.css +50 -0
  36. package/ui/styles/breadcrumbs.css +30 -0
  37. package/ui/styles/layout.css +132 -0
  38. package/ui/styles/login-layout.css +52 -0
  39. package/ui/styles/menu.css +217 -0
  40. package/ui/styles/mobile-bar.css +34 -0
  41. package/ui/styles/sidebar.css +108 -0
  42. package/utils/icons.config.js +1 -1
  43. package/utils/styles.css +7 -43
  44. package/utils/tailwind.config.js +5 -0
  45. /package/lib/menu/ui/sub-menu/{sub-menuItem.d.ts → sub-menu-item.d.ts} +0 -0
@@ -0,0 +1,217 @@
1
+ .uxf-cms-menu {
2
+ background-color: theme("colors.sidebar.background");
3
+ padding: 0 theme("spacing.2") theme("spacing.4");
4
+
5
+ &__item-wrapper {
6
+ &--super {
7
+ &:first-child {
8
+ & > .uxf-cms-menu__item--super {
9
+ margin-top: 0;
10
+ }
11
+ }
12
+ }
13
+
14
+ &--user-menu {
15
+ @screen md {
16
+ display: none;
17
+ }
18
+ }
19
+ }
20
+
21
+ &__item {
22
+ &--super {
23
+ @apply uxf-typo-overline;
24
+
25
+ color: theme("colors.darkLow");
26
+ margin-bottom: theme("spacing.3");
27
+ margin-top: theme("spacing.6");
28
+ padding-left: theme("spacing.2");
29
+ text-transform: uppercase;
30
+ }
31
+
32
+ &--basic {
33
+ align-items: center;
34
+ background-color: theme("colors.sidebar.background");
35
+ border-radius: theme("borderRadius.lg");
36
+ color: theme("colors.darkMedium");
37
+ cursor: pointer;
38
+ display: flex;
39
+ margin-bottom: theme("spacing[0.5]");
40
+ padding: theme("spacing[2.5]") theme("spacing.1") theme("spacing[2.5]") theme("spacing[2.5]");
41
+
42
+ &:hover {
43
+ background-color: theme("colors.sidebar.hover");
44
+ }
45
+
46
+ &.is-selected {
47
+ background-color: theme("colors.sidebar.highlight");
48
+ color: theme("colors.darkHigh");
49
+ font-weight: bold;
50
+ }
51
+
52
+ .uxf-cms-menu__icon-wrapper {
53
+ width: theme("spacing.7");
54
+
55
+ &--level-one {
56
+ width: theme("spacing.9");
57
+ }
58
+ }
59
+
60
+ .uxf-cms-menu__caret {
61
+ margin-left: auto;
62
+ margin-right: theme("spacing.2");
63
+
64
+ &.is-open {
65
+ transform: rotate(-90deg);
66
+ }
67
+ }
68
+ }
69
+ }
70
+
71
+ &__item-end-element {
72
+ margin-left: auto;
73
+ }
74
+
75
+ &__icon-wrapper {
76
+ flex-shrink: 0;
77
+ }
78
+
79
+ &__submenu-button {
80
+ width: 100%;
81
+
82
+ &--initially-closed {
83
+ @screen md {
84
+ display: none;
85
+ }
86
+ }
87
+
88
+ &--initially-open {
89
+ @screen md {
90
+ pointer-events: none;
91
+ }
92
+ }
93
+ }
94
+ }
95
+
96
+ .uxf-cms-user-menu {
97
+ border-top: 1px solid theme("colors.darkBorder");
98
+ color: theme("colors.darkMedium");
99
+ display: none;
100
+
101
+ @screen md {
102
+ display: block;
103
+ }
104
+
105
+ &.is-open {
106
+ background-color: theme("colors.sidebar.hover");
107
+
108
+ .uxf-cms-menu__item {
109
+ background-color: theme("colors.sidebar.hover");
110
+
111
+ &:hover {
112
+ background-color: theme("colors.sidebar.background");
113
+ }
114
+ }
115
+ }
116
+
117
+ &__button {
118
+ align-items: center;
119
+ display: flex;
120
+ padding: theme("spacing.3") theme("spacing.4");
121
+ text-align: left;
122
+ width: 100%;
123
+
124
+ &:hover {
125
+ background-color: theme("colors.sidebar.hover");
126
+ }
127
+ }
128
+
129
+ &__avatar {
130
+ flex-shrink: 0;
131
+ height: 32px;
132
+ margin-right: theme("spacing.3");
133
+ width: 32px;
134
+ }
135
+
136
+ &__label-wrapper {
137
+ @apply truncate;
138
+ }
139
+
140
+ &__name {
141
+ @apply uxf-typo-body2;
142
+ }
143
+
144
+ &__roles {
145
+ @apply uxf-typo-caption truncate;
146
+
147
+ color: theme("colors.darkLow");
148
+ }
149
+
150
+ &__caret-wrapper {
151
+ margin-left: auto;
152
+ }
153
+
154
+ &__caret {
155
+ margin-left: theme("spacing.2");
156
+
157
+ &.is-open {
158
+ transform: rotate(-90deg);
159
+ }
160
+ }
161
+
162
+ &__sub-menu {
163
+ padding: 0 theme("spacing.3") theme("spacing.4");
164
+ }
165
+ }
166
+
167
+ .uxf-cms-sub-menu {
168
+ display: none;
169
+
170
+ @screen md {
171
+ display: block;
172
+ }
173
+
174
+ &__wrapper {
175
+ background-color: theme("colors.sidebar.highlight");
176
+ border-radius: theme("borderRadius.xl");
177
+ box-shadow: theme("boxShadow.lg");
178
+ overflow-y: auto;
179
+ width: 100%;
180
+ z-index: theme("zIndex.dropdown");
181
+ }
182
+
183
+ &__wrapper-mobile {
184
+ background-color: theme("colors.sidebar.background");
185
+ border-radius: theme("borderRadius.xl");
186
+ box-shadow: theme("boxShadow.lg");
187
+ left: theme("spacing.4");
188
+ overflow-y: auto;
189
+ width: calc(100vw - 32px);
190
+ z-index: theme("zIndex.dropdown");
191
+ }
192
+
193
+ &__item {
194
+ @apply md:text-body2;
195
+
196
+ background-color: theme("colors.sidebar.highlight");
197
+ color: theme("colors.darkMedium");
198
+ font-size: theme("fontSize.body");
199
+ padding: theme("spacing[3.5]");
200
+ width: 100%;
201
+
202
+ &:hover {
203
+ background-color: theme("colors.sidebar.background");
204
+ color: theme("colors.darkLow");
205
+ }
206
+ }
207
+
208
+ &__title {
209
+ @apply uxf-typo-body;
210
+
211
+ background-color: theme("colors.sidebar.background");
212
+ color: theme("colors.darkHigh");
213
+ font-weight: bold;
214
+ padding: theme("spacing[3.5]") theme("spacing.4");
215
+ width: 100%;
216
+ }
217
+ }
@@ -0,0 +1,34 @@
1
+ .uxf-cms-mobile-bar {
2
+ align-items: center;
3
+ background-color: theme("colors.sidebar.background");
4
+ bottom: 0;
5
+ color: theme("colors.darkMedium");
6
+ display: flex;
7
+ height: 52px;
8
+ left: 0;
9
+ padding: 0 theme("spacing.1");
10
+ position: fixed;
11
+ right: 0;
12
+
13
+ @screen md {
14
+ display: none;
15
+ }
16
+
17
+ &__button {
18
+ align-items: center;
19
+ display: flex;
20
+ flex-grow: 1;
21
+ flex-shrink: 0;
22
+ height: theme("spacing.11");
23
+ justify-content: center;
24
+ }
25
+
26
+ &__avatar {
27
+ height: theme("spacing.7");
28
+ width: theme("spacing.7");
29
+ }
30
+
31
+ &__caret {
32
+ margin-left: theme("spacing.1");
33
+ }
34
+ }
@@ -0,0 +1,108 @@
1
+ .uxf-cms-sidebar {
2
+ display: flex;
3
+ flex-direction: column;
4
+ position: fixed;
5
+ width: 100%;
6
+ z-index: 15;
7
+
8
+ @screen xs {
9
+ right: 0;
10
+ width: var(--drawer-width);
11
+ }
12
+
13
+ @screen md {
14
+ border-bottom: none;
15
+ left: 0;
16
+ right: unset;
17
+ z-index: 1;
18
+ }
19
+
20
+ &__content {
21
+ --device-height: 100vh;
22
+
23
+ background-color: theme("colors.sidebar.background");
24
+ border-bottom: 1px solid theme("colors.gray.700");
25
+ flex-direction: column;
26
+ height: calc(var(--device-height) - 52px);
27
+ padding-top: theme("spacing.5");
28
+
29
+ @screen md {
30
+ border-bottom: none;
31
+ height: 100vh;
32
+ }
33
+
34
+ &--open {
35
+ display: flex;
36
+ }
37
+
38
+ &--closed {
39
+ display: none;
40
+
41
+ @screen md {
42
+ display: flex;
43
+ }
44
+ }
45
+ }
46
+
47
+ &__logo {
48
+ padding: 0 theme("spacing.4");
49
+ }
50
+
51
+ &__nav {
52
+ flex-grow: 1;
53
+ margin-top: theme("spacing.8");
54
+ overflow: auto;
55
+ padding: 0 0 theme("spacing.4");
56
+
57
+ @screen md {
58
+ padding: 0;
59
+ }
60
+
61
+ &--super-section {
62
+ margin-top: theme("spacing.4");
63
+ }
64
+
65
+ /* width */
66
+ &::-webkit-scrollbar {
67
+ width: 8px;
68
+ }
69
+
70
+ /* Track */
71
+ &::-webkit-scrollbar-track {
72
+ background: theme("colors.sidebar.background");
73
+ }
74
+
75
+ /* Handle */
76
+ &::-webkit-scrollbar-thumb {
77
+ background: theme("colors.sidebar.highlight");
78
+ border-radius: 999px;
79
+ }
80
+
81
+ /* Handle on hover */
82
+ &::-webkit-scrollbar-thumb:hover {
83
+ background: theme("colors.sidebar.hover");
84
+ }
85
+ }
86
+
87
+ &__scrollbar {
88
+ --scrollbar-color: theme("colors.darkBorder");
89
+
90
+ -ms-overflow-style: -ms-autohiding-scrollbar;
91
+ scrollbar-color: var(--scrollbar-color) transparent;
92
+ scrollbar-width: thin;
93
+
94
+ &::-webkit-scrollbar {
95
+ width: theme("spacing.2");
96
+ }
97
+
98
+ &::-webkit-scrollbar-track {
99
+ background: theme("colors.sidebar.highlight");
100
+ }
101
+
102
+ &::-webkit-scrollbar-thumb {
103
+ background-color: var(--scrollbar-color);
104
+ border: none;
105
+ border-radius: 999px;
106
+ }
107
+ }
108
+ }
@@ -2,7 +2,7 @@
2
2
  module.exports = {
3
3
  ...require("@uxf/ui/utils/icons-config"),
4
4
  ...require("@uxf/data-grid/icons-config"),
5
- ...require("@uxf/wysiwyg/icons"),
5
+ ...require("@uxf/wysiwyg/utils/icons-config"),
6
6
  angleRight: {
7
7
  width: 256,
8
8
  height: 512,
package/utils/styles.css CHANGED
@@ -1,43 +1,7 @@
1
- .sidebar__nav {
2
- /* width */
3
- &::-webkit-scrollbar {
4
- width: 4px;
5
- }
6
-
7
- /* Track */
8
- &::-webkit-scrollbar-track {
9
- background: theme("colors.sidebar.background");
10
- }
11
-
12
- /* Handle */
13
- &::-webkit-scrollbar-thumb {
14
- background: theme("colors.sidebar.highlight");
15
- }
16
-
17
- /* Handle on hover */
18
- &::-webkit-scrollbar-thumb:hover {
19
- background: theme("colors.sidebar.hover");
20
- }
21
- }
22
-
23
- .sidebar__scrollbar {
24
- --scrollbar-color: theme("colors.darkBorder");
25
-
26
- -ms-overflow-style: -ms-autohiding-scrollbar;
27
- scrollbar-color: var(--scrollbar-color) transparent;
28
- scrollbar-width: thin;
29
-
30
- &::-webkit-scrollbar {
31
- @apply w-2;
32
- }
33
-
34
- &::-webkit-scrollbar-track {
35
- background: theme("colors.sidebar.highlight");
36
- }
37
-
38
- &::-webkit-scrollbar-thumb {
39
- @apply rounded-full border-none;
40
-
41
- background-color: var(--scrollbar-color);
42
- }
43
- }
1
+ @import url("./../ui/styles/avatar.css");
2
+ @import url("./../ui/styles/layout.css");
3
+ @import url("./../ui/styles/login-layout.css");
4
+ @import url("./../ui/styles/sidebar.css");
5
+ @import url("./../ui/styles/mobile-bar.css");
6
+ @import url("./../ui/styles/menu.css");
7
+ @import url("./../ui/styles/breadcrumbs.css");
@@ -3,6 +3,11 @@ module.exports = {
3
3
  presets: [require("@uxf/ui/utils/tailwind-config")],
4
4
  content: [],
5
5
  theme: {
6
+ avatarSize: {
7
+ sm: "40px",
8
+ default: "88px",
9
+ lg: "120px",
10
+ },
6
11
  extend: {
7
12
  colors: {
8
13
  dataGridPrimary: "#140939",