@oruga-ui/theme-oruga 0.7.1 → 0.8.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.
Files changed (48) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +5 -5
  3. package/dist/scss/components/_autocomplete.scss +3 -12
  4. package/dist/scss/components/_breadcrumb.scss +122 -103
  5. package/dist/scss/components/_button.scss +228 -173
  6. package/dist/scss/components/_carousel.scss +164 -142
  7. package/dist/scss/components/_checkbox.scss +118 -118
  8. package/dist/scss/components/_collapse.scss +1 -1
  9. package/dist/scss/components/_datepicker.scss +228 -290
  10. package/dist/scss/components/_datetimepicker.scss +8 -2
  11. package/dist/scss/components/_dialog.scss +243 -0
  12. package/dist/scss/components/_dropdown.scss +190 -164
  13. package/dist/scss/components/_field.scss +68 -39
  14. package/dist/scss/components/_icon.scss +24 -29
  15. package/dist/scss/components/_input.scss +112 -97
  16. package/dist/scss/components/_listbox.scss +176 -0
  17. package/dist/scss/components/_loading.scss +35 -15
  18. package/dist/scss/components/_menu.scss +113 -109
  19. package/dist/scss/components/_modal.scss +112 -50
  20. package/dist/scss/components/_notification.scss +113 -97
  21. package/dist/scss/components/_pagination.scss +173 -106
  22. package/dist/scss/components/_radio.scss +91 -84
  23. package/dist/scss/components/_select.scss +108 -115
  24. package/dist/scss/components/_sidebar.scss +102 -101
  25. package/dist/scss/components/_skeleton.scss +50 -39
  26. package/dist/scss/components/_slider.scss +221 -159
  27. package/dist/scss/components/_steps.scss +223 -261
  28. package/dist/scss/components/_switch.scss +126 -90
  29. package/dist/scss/components/_table.scss +307 -251
  30. package/dist/scss/components/_tabs.scss +360 -247
  31. package/dist/scss/components/_tag.scss +95 -39
  32. package/dist/scss/components/_taginput.scss +48 -36
  33. package/dist/scss/components/_timepicker.scss +61 -62
  34. package/dist/scss/components/_tooltip.scss +129 -254
  35. package/dist/scss/components/_upload.scss +83 -35
  36. package/dist/scss/theme-build.scss +9 -0
  37. package/dist/scss/theme.scss +44 -0
  38. package/dist/scss/utils/_animations.scss +30 -9
  39. package/dist/scss/utils/_base.scss +6 -4
  40. package/dist/scss/utils/_helpers.scss +84 -22
  41. package/dist/scss/utils/_root.scss +82 -29
  42. package/dist/scss/utils/_variables.scss +64 -42
  43. package/dist/theme.css +2 -0
  44. package/dist/theme.js +1 -1
  45. package/package.json +27 -20
  46. package/dist/oruga.css +0 -2
  47. package/dist/scss/oruga-build.scss +0 -9
  48. package/dist/scss/oruga.scss +0 -42
@@ -0,0 +1,243 @@
1
+ @use "sass:map";
2
+ @use "../utils/helpers" as h;
3
+ @use "../utils/variables" as vars;
4
+
5
+ /* @docs */
6
+ $dialog-spacer: calc(2 * h.useVar("control-spacer")) !default;
7
+ $dialog-zindex: map.get(vars.$zindex, "fixed") !default;
8
+ $dialog-box-shadow: h.useVar("overlay-box-shadow") !default;
9
+ $dialog-background-color: h.useVar("control-brackground-color") !default;
10
+ $dialog-border-width: h.useVar("control-border-width") !default;
11
+ $dialog-border-style: solid !default;
12
+ $dialog-border-color: h.useVar("control-border-color") !default;
13
+ $dialog-border-radius: h.useVar("border-radius") !default;
14
+
15
+ $dialog-backdrop-background-color: h.useVar(
16
+ "overlay-background-color"
17
+ ) !default;
18
+
19
+ $dialog-header-padding: $dialog-spacer !default;
20
+ $dialog-header-background-color: inherit !default;
21
+
22
+ $dialog-body-padding: $dialog-spacer !default;
23
+ $dialog-body-background-color: inherit !default;
24
+
25
+ $dialog-footer-padding: $dialog-spacer !default;
26
+ $dialog-footer-background-color: inherit !default;
27
+
28
+ $dialog-title-color: h.useVar("font-color") !default;
29
+ $dialog-title-font-size: 2em !default;
30
+ $dialog-title-font-weight: bold !default;
31
+
32
+ $dialog-subtitle-color: h.useVar("font-color") !default;
33
+ $dialog-subtitle-font-size: 1.5em !default;
34
+ $dialog-subtitle-font-weight: normal !default;
35
+
36
+ $dialog-content-color: h.useVar("font-color") !default;
37
+ $dialog-content-font-size: h.useVar("font-size") !default;
38
+ $dialog-content-font-weight: h.useVar("font-weight") !default;
39
+
40
+ $dialog-close-top: $dialog-spacer !default;
41
+ $dialog-close-right: $dialog-spacer !default;
42
+ $dialog-close-color: h.useVar("black") !default;
43
+ $dialog-close-size: 2rem !default;
44
+ $dialog-close-border-radius: h.useVar("border-radius-rounded") !default;
45
+ $dialog-close-background-color: inherit !default;
46
+ /* @docs */
47
+
48
+ .o-dialog {
49
+ @include h.defineVar("dialog-zindex", $dialog-zindex);
50
+ @include h.defineVar(
51
+ "dialog-backdrop-background-color",
52
+ $dialog-backdrop-background-color
53
+ );
54
+
55
+ @include h.defineVar("dialog-box-shadow", $dialog-box-shadow);
56
+ @include h.defineVar("dialog-background-color", $dialog-background-color);
57
+ @include h.defineVar("dialog-border-width", $dialog-border-width);
58
+ @include h.defineVar("dialog-border-style", $dialog-border-style);
59
+ @include h.defineVar("dialog-border-color", $dialog-border-color);
60
+ @include h.defineVar("dialog-border-radius", $dialog-border-radius);
61
+
62
+ @include h.defineVar("dialog-header-padding", $dialog-header-padding);
63
+ @include h.defineVar(
64
+ "dialog-header-background-color",
65
+ $dialog-header-background-color
66
+ );
67
+
68
+ @include h.defineVar("dialog-body-padding", $dialog-body-padding);
69
+ @include h.defineVar(
70
+ "dialog-body-background-color",
71
+ $dialog-body-background-color
72
+ );
73
+
74
+ @include h.defineVar("dialog-footer-padding", $dialog-footer-padding);
75
+ @include h.defineVar(
76
+ "dialog-footer-background-color",
77
+ $dialog-footer-background-color
78
+ );
79
+
80
+ @include h.defineVar("dialog-title-color", $dialog-title-color);
81
+ @include h.defineVar("dialog-title-font-size", $dialog-title-font-size);
82
+ @include h.defineVar("dialog-title-font-weight", $dialog-title-font-weight);
83
+
84
+ @include h.defineVar("dialog-subtitle-color", $dialog-subtitle-color);
85
+ @include h.defineVar(
86
+ "dialog-subtitle-font-size",
87
+ $dialog-subtitle-font-size
88
+ );
89
+ @include h.defineVar(
90
+ "dialog-subtitle-font-weight",
91
+ $dialog-subtitle-font-weight
92
+ );
93
+
94
+ @include h.defineVar("dialog-content-color", $dialog-content-color);
95
+ @include h.defineVar("dialog-content-font-size", $dialog-content-font-size);
96
+ @include h.defineVar(
97
+ "dialog-content-font-weight",
98
+ $dialog-content-font-weight
99
+ );
100
+
101
+ @include h.defineVar("dialog-close-top", $dialog-close-top);
102
+ @include h.defineVar("dialog-close-right", $dialog-close-right);
103
+ @include h.defineVar("dialog-close-color", $dialog-close-color);
104
+ @include h.defineVar("dialog-close-size", $dialog-close-size);
105
+ @include h.defineVar(
106
+ "dialog-close-border-radius",
107
+ $dialog-close-border-radius
108
+ );
109
+ @include h.defineVar(
110
+ "dialog-close-background-color",
111
+ $dialog-close-background-color
112
+ );
113
+
114
+ position: fixed;
115
+ top: 0;
116
+ left: 0;
117
+ padding: 0;
118
+
119
+ // mode non dialog dialogs adjustements
120
+ &:not(dialog:modal) {
121
+ margin-top: 10vh;
122
+ }
123
+
124
+ box-shadow: h.useVar("dialog-box-shadow");
125
+ background-color: h.useVar("dialog-background-color");
126
+
127
+ border-color: h.useVar("dialog-border-color");
128
+ border-style: h.useVar("dialog-border-style");
129
+ border-width: h.useVar("dialog-border-width");
130
+ border-radius: h.useVar("dialog-border-radius");
131
+
132
+ z-index: h.useVar("dialog-zindex");
133
+
134
+ &::backdrop {
135
+ background-color: h.useVar("dialog-backdrop-background-color");
136
+ }
137
+
138
+ &--fullscreen {
139
+ width: 100%;
140
+ height: 100%;
141
+ }
142
+
143
+ &__wrapper {
144
+ position: relative;
145
+
146
+ &--left {
147
+ text-align: start;
148
+ }
149
+
150
+ &--center {
151
+ text-align: center;
152
+ }
153
+
154
+ &--right {
155
+ text-align: flex-end;
156
+ }
157
+ }
158
+
159
+ &__header {
160
+ padding: h.useVar("dialog-header-padding");
161
+ background-color: h.useVar("dialog-header-background-color");
162
+ border-bottom-color: h.useVar("dialog-border-color");
163
+ border-bottom-style: h.useVar("dialog-border-style");
164
+ border-bottom-width: h.useVar("dialog-border-width");
165
+
166
+ &-title {
167
+ margin: 0;
168
+
169
+ color: h.useVar("dialog-title-color");
170
+ font-size: h.useVar("dialog-title-font-size");
171
+ font-weight: h.useVar("dialog-title-font-weight");
172
+ }
173
+
174
+ &-subtitle {
175
+ margin: 0;
176
+ color: h.useVar("dialog-subtitle-color");
177
+ font-size: h.useVar("dialog-subtitle-font-size");
178
+ font-weight: h.useVar("dialog-subtitle-font-weight");
179
+ }
180
+ }
181
+
182
+ &__close {
183
+ // define focus shadow effect
184
+ @include h.focusable;
185
+
186
+ // add clickable cursor
187
+ @include h.clickable;
188
+
189
+ // remove default appearance
190
+ @include h.removeAppearance;
191
+
192
+ position: absolute;
193
+ top: h.useVar("dialog-close-top");
194
+ right: h.useVar("dialog-close-right");
195
+
196
+ display: inline-flex;
197
+ align-items: center;
198
+ justify-content: center;
199
+
200
+ height: h.useVar("dialog-close-size");
201
+ width: h.useVar("dialog-close-size");
202
+
203
+ color: h.useVar("dialog-close-color");
204
+
205
+ border: none;
206
+ border-radius: h.useVar("dialog-close-border-radius");
207
+ background-color: h.useVar("dialog-close-background-color");
208
+ }
209
+
210
+ &__body {
211
+ padding: h.useVar("dialog-body-padding");
212
+ background-color: h.useVar("dialog-body-background-color");
213
+
214
+ &-content {
215
+ color: h.useVar("dialog-content-color");
216
+ font-size: h.useVar("dialog-content-font-size");
217
+ font-weight: h.useVar("dialog-content-font-weight");
218
+ }
219
+ }
220
+
221
+ &__footer {
222
+ padding: h.useVar("dialog-footer-padding");
223
+ background-color: h.useVar("dialog-footer-background-color");
224
+ border-top-color: h.useVar("dialog-border-color");
225
+ border-top-style: h.useVar("dialog-border-style");
226
+ border-top-width: h.useVar("dialog-border-width");
227
+
228
+ display: flex;
229
+ gap: 0.5rem;
230
+
231
+ &--left {
232
+ justify-content: flex-start;
233
+ }
234
+
235
+ &--center {
236
+ justify-content: center;
237
+ }
238
+
239
+ &--right {
240
+ justify-content: flex-end;
241
+ }
242
+ }
243
+ }
@@ -1,59 +1,117 @@
1
+ @use "sass:map";
2
+ @use "../utils/helpers" as h;
3
+ @use "../utils/variables" as vars;
4
+
1
5
  /* @docs */
2
- $dropdown-disabled-opacity: var(--#{$prefix}base-disabled-opacity) !default;
3
- $dropdown-item-active-background-color: var(--#{$prefix}primary) !default;
4
- $dropdown-item-active-color: var(--#{$prefix}primary-invert) !default;
5
- $dropdown-item-color: #000000 !default;
6
- $dropdown-item-disabled-opacity: var(
7
- --#{$prefix}base-disabled-opacity
8
- ) !default;
9
- $dropdown-item-font-size: var(--#{$prefix}base-font-size) !default;
10
- $dropdown-item-hover-background-color: $control-brackground-color !default;
11
- $dropdown-item-hover-color: #000000 !default;
12
- $dropdown-item-line-height: var(--#{$prefix}base-line-height) !default;
13
- $dropdown-item-padding: 0.375rem 1rem !default;
14
- $dropdown-item-font-weight: 400 !default;
15
- $dropdown-menu-background: #ffffff !default;
16
- $dropdown-menu-border-radius: var(--#{$prefix}base-border-radius) !default;
6
+ $dropdown-disabled-opacity: h.useVar("control-disabled-opacity") !default;
7
+
8
+ $dropdown-menu-zindex: map.get(vars.$zindex, "dropdown") !default;
9
+ $dropdown-menu-spacer: 0px !default;
10
+ $dropdown-menu-padding: h.useVar("control-spacer") 0 !default;
17
11
  $dropdown-menu-box-shadow:
18
12
  0 0.5em 1em -0.125em rgba(10, 10, 10, 0.1),
19
13
  0 0 0 1px rgba(10, 10, 10, 0.02) !default;
20
- $dropdown-menu-spacer: 0px !default;
21
- $dropdown-menu-margin: 0 !default;
22
- $dropdown-menu-padding: 0.5rem 0 0.5rem 0 !default;
23
- $dropdown-menu-width: 12rem !default;
24
- $dropdown-menu-zindex: 50 !default;
25
- $dropdown-mobile-max-height: calc(100vh - 120px) !default;
26
- $dropdown-mobile-max-width: 460px !default;
27
- $dropdown-mobile-overlay-color: rgba(#000000, 0.86) !default;
28
- $dropdown-mobile-overlay-zindex: 55 !default;
29
- $dropdown-mobile-width: calc(100vw - 40px) !default;
30
- $dropdown-mobile-zindex: 60 !default;
14
+ $dropdown-menu-background-color: h.useVar("control-brackground-color") !default;
15
+ $dropdown-menu-border-color: h.useVar("control-border-color") !default;
16
+ $dropdown-menu-border-style: solid !default;
17
+ $dropdown-menu-border-width: h.useVar("control-border-width") !default;
18
+ $dropdown-menu-border-radius: h.useVar("border-radius") !default;
19
+
20
+ $dropdown-item-padding: 0.25rem 1rem !default;
21
+ $dropdown-item-color: h.useVar("font-color") !default;
22
+ $dropdown-item-font-size: h.useVar("font-size") !default;
23
+ $dropdown-item-font-weight: h.useVar("font-weight") !default;
24
+ $dropdown-item-line-height: h.useVar("line-height") !default;
25
+
26
+ $dropdown-item-background-color: transparent !default;
27
+ $dropdown-item-active-color: h.useVar("primary-invert") !default;
28
+ $dropdown-item-active-background-color: h.useVar("primary") !default;
29
+ $dropdown-item-hover-background-color: h.useVar("grey-lighter") !default;
30
+ $dropdown-item-hover-color: h.useVar("font-color") !default;
31
+
32
+ $dropdown-modal-zindex: map.get(vars.$zindex, "modal") !default;
33
+ $dropdown-modal-max-height: min(50vh, calc(100vh - 160px)) !default;
34
+ $dropdown-modal-max-width: min(50vw, calc(100vw - 160px)) !default;
35
+ $dropdown-modal-min-width: min(80vw, 400px) !default;
36
+
37
+ $dropdown-overlay-background-color: h.useVar(
38
+ "overlay-background-color"
39
+ ) !default;
40
+ $dropdown-overlay-zindex: map.get(vars.$zindex, "overlay") !default;
31
41
  /* @docs */
32
42
 
33
43
  .o-dropdown {
44
+ @include h.defineVar(
45
+ "dropdown-disabled-opacity",
46
+ $dropdown-disabled-opacity
47
+ );
48
+ @include h.defineVar(
49
+ "dropdown-overlay-background-color",
50
+ $dropdown-overlay-background-color
51
+ );
52
+ @include h.defineVar("dropdown-overlay-zindex", $dropdown-overlay-zindex);
53
+
54
+ @include h.defineVar("dropdown-item-color", $dropdown-item-color);
55
+ @include h.defineVar("dropdown-item-font-size", $dropdown-item-font-size);
56
+ @include h.defineVar(
57
+ "dropdown-item-font-weight",
58
+ $dropdown-item-font-weight
59
+ );
60
+ @include h.defineVar(
61
+ "dropdown-item-line-height",
62
+ $dropdown-item-line-height
63
+ );
64
+ @include h.defineVar("dropdown-item-padding", $dropdown-item-padding);
65
+ @include h.defineVar(
66
+ "dropdown-item-background-color",
67
+ $dropdown-item-background-color
68
+ );
69
+ @include h.defineVar(
70
+ "dropdown-item-active-color",
71
+ $dropdown-item-active-color
72
+ );
73
+ @include h.defineVar(
74
+ "dropdown-item-active-background-color",
75
+ $dropdown-item-active-background-color
76
+ );
77
+ @include h.defineVar(
78
+ "dropdown-item-hover-color",
79
+ $dropdown-item-hover-color
80
+ );
81
+ @include h.defineVar(
82
+ "dropdown-item-hover-background-color",
83
+ $dropdown-item-hover-background-color
84
+ );
85
+
86
+ @include h.defineVar("dropdown-menu-zindex", $dropdown-menu-zindex);
87
+ @include h.defineVar("dropdown-menu-spacer", $dropdown-menu-spacer);
88
+ @include h.defineVar("dropdown-menu-box-shadow", $dropdown-menu-box-shadow);
89
+ @include h.defineVar("dropdown-menu-padding", $dropdown-menu-padding);
90
+ @include h.defineVar(
91
+ "dropdown-menu-background-color",
92
+ $dropdown-menu-background-color
93
+ );
94
+ @include h.defineVar(
95
+ "dropdown-menu-border-style",
96
+ $dropdown-menu-border-style
97
+ );
98
+ @include h.defineVar(
99
+ "dropdown-menu-border-color",
100
+ $dropdown-menu-border-color
101
+ );
102
+ @include h.defineVar(
103
+ "dropdown-menu-border-width",
104
+ $dropdown-menu-border-width
105
+ );
106
+ @include h.defineVar(
107
+ "dropdown-menu-border-radius",
108
+ $dropdown-menu-border-radius
109
+ );
110
+
34
111
  display: inline-flex;
35
112
  position: relative;
36
113
  vertical-align: top;
37
114
 
38
- &__overlay {
39
- position: fixed;
40
- bottom: 0;
41
- left: 0;
42
- right: 0;
43
- top: 0;
44
- cursor: pointer;
45
- display: none;
46
-
47
- background-color: var(
48
- --#{$prefix}dropdown-mobile-overlay-color,
49
- $dropdown-mobile-overlay-color
50
- );
51
- z-index: var(
52
- --#{$prefix}dropdown-mobile-overlay-zindex,
53
- $dropdown-mobile-overlay-zindex
54
- );
55
- }
56
-
57
115
  &__trigger {
58
116
  display: inline-flex;
59
117
  width: 100%;
@@ -62,31 +120,24 @@ $dropdown-mobile-zindex: 60 !default;
62
120
  &__menu {
63
121
  position: absolute;
64
122
  display: block;
123
+ width: max-content;
124
+ min-width: 100%;
65
125
 
66
- min-width: var(--#{$prefix}dropdown-menu-width, $dropdown-menu-width);
67
- z-index: var(--#{$prefix}dropdown-menu-zindex, $dropdown-menu-zindex);
68
- background-color: var(
69
- --#{$prefix}dropdown-menu-background,
70
- $dropdown-menu-background
71
- );
72
- border-radius: var(
73
- --#{$prefix}dropdown-menu-border-radius,
74
- $dropdown-menu-border-radius
75
- );
76
- box-shadow: var(
77
- --#{$prefix}dropdown-menu-box-shadow,
78
- $dropdown-menu-box-shadow
79
- );
80
- padding: var(--#{$prefix}dropdown-menu-padding, $dropdown-menu-padding);
81
- margin: var(--#{$prefix}dropdown-menu-margin, $dropdown-menu-margin);
126
+ z-index: h.useVar("dropdown-menu-zindex");
127
+ padding: h.useVar("dropdown-menu-padding");
82
128
 
129
+ box-shadow: h.useVar("dropdown-menu-box-shadow");
130
+ background-color: h.useVar("dropdown-menu-background-color");
131
+ border-color: h.useVar("dropdown-menu-border-color");
132
+ border-style: h.useVar("dropdown-menu-border-style");
133
+ border-width: h.useVar("dropdown-menu-border-width");
134
+ border-radius: h.useVar("dropdown-menu-border-radius");
135
+
136
+ // position variants
83
137
  &--bottom {
84
138
  left: 50%;
85
139
  right: auto;
86
- top: calc(
87
- 100% +
88
- var(--#{$prefix}dropdown-menu-spacer, $dropdown-menu-spacer)
89
- );
140
+ top: calc(100% + h.useVar("dropdown-menu-spacer"));
90
141
  bottom: auto;
91
142
  transform: translateX(-50%);
92
143
  }
@@ -95,18 +146,12 @@ $dropdown-mobile-zindex: 60 !default;
95
146
  left: 50%;
96
147
  right: auto;
97
148
  top: auto;
98
- bottom: calc(
99
- 100% +
100
- var(--#{$prefix}dropdown-menu-spacer, $dropdown-menu-spacer)
101
- );
149
+ bottom: calc(100% + h.useVar("dropdown-menu-spacer"));
102
150
  transform: translateX(-50%);
103
151
  }
104
152
 
105
153
  &--left {
106
- right: calc(
107
- 100% +
108
- var(--#{$prefix}dropdown-menu-spacer, $dropdown-menu-spacer)
109
- );
154
+ right: calc(100% + h.useVar("dropdown-menu-spacer"));
110
155
  left: auto;
111
156
  top: 50%;
112
157
  bottom: auto;
@@ -115,10 +160,7 @@ $dropdown-mobile-zindex: 60 !default;
115
160
 
116
161
  &--right {
117
162
  right: auto;
118
- left: calc(
119
- 100% +
120
- var(--#{$prefix}dropdown-menu-spacer, $dropdown-menu-spacer)
121
- );
163
+ left: calc(100% + h.useVar("dropdown-menu-spacer"));
122
164
  top: 50%;
123
165
  bottom: auto;
124
166
  transform: translateY(-50%);
@@ -128,39 +170,27 @@ $dropdown-mobile-zindex: 60 !default;
128
170
  right: 0;
129
171
  left: auto;
130
172
  top: auto;
131
- bottom: calc(
132
- 100% +
133
- var(--#{$prefix}dropdown-menu-spacer, $dropdown-menu-spacer)
134
- );
173
+ bottom: calc(100% + h.useVar("dropdown-menu-spacer"));
135
174
  }
136
175
 
137
176
  &--top-left {
138
177
  right: auto;
139
178
  left: 0;
140
179
  top: auto;
141
- bottom: calc(
142
- 100% +
143
- var(--#{$prefix}dropdown-menu-spacer, $dropdown-menu-spacer)
144
- );
180
+ bottom: calc(100% + h.useVar("dropdown-menu-spacer"));
145
181
  }
146
182
 
147
183
  &--bottom-right {
148
184
  right: 0;
149
185
  left: auto;
150
- top: calc(
151
- 100% +
152
- var(--#{$prefix}dropdown-menu-spacer, $dropdown-menu-spacer)
153
- );
186
+ top: calc(100% + h.useVar("dropdown-menu-spacer"));
154
187
  bottom: auto;
155
188
  }
156
189
 
157
190
  &--bottom-left {
158
191
  right: auto;
159
192
  left: 0;
160
- top: calc(
161
- 100% +
162
- var(--#{$prefix}dropdown-menu-spacer, $dropdown-menu-spacer)
163
- );
193
+ top: calc(100% + h.useVar("dropdown-menu-spacer"));
164
194
  bottom: auto;
165
195
  }
166
196
  }
@@ -169,55 +199,45 @@ $dropdown-mobile-zindex: 60 !default;
169
199
  display: block;
170
200
  position: relative;
171
201
 
172
- color: var(--#{$prefix}dropdown-item-color, $dropdown-item-color);
173
- font-size: var(
174
- --#{$prefix}dropdown-item-font-size,
175
- $dropdown-item-font-size
176
- );
177
- font-weight: var(
178
- --#{$prefix}dropdown-item-font-weight,
179
- $dropdown-item-font-weight
180
- );
181
- line-height: var(
182
- --#{$prefix}dropdown-item-line-height,
183
- $dropdown-item-line-height
184
- );
185
- padding: var(--#{$prefix}dropdown-item-padding, $dropdown-item-padding);
202
+ padding: h.useVar("dropdown-item-padding");
203
+
204
+ color: h.useVar("dropdown-item-color");
205
+ font-size: h.useVar("dropdown-item-font-size");
206
+ font-weight: h.useVar("dropdown-item-font-weight");
207
+ line-height: h.useVar("dropdown-item-line-height");
208
+
209
+ background-color: h.useVar("dropdown-item-background-color");
186
210
 
187
211
  &--disabled {
188
- opacity: var(
189
- --#{$prefix}dropdown-item-disabled-opacity,
190
- $dropdown-item-disabled-opacity
191
- );
192
- pointer-events: none;
212
+ @include h.disabled(h.useVar("dropdown-disabled-opacity"));
193
213
  }
194
214
 
195
215
  &--active {
196
- background-color: var(
197
- --#{$prefix}dropdown-item-active-background-color,
198
- $dropdown-item-active-background-color
216
+ @include h.defineVar(
217
+ "dropdown-item-color",
218
+ h.useVar("dropdown-item-active-color")
199
219
  );
200
- color: var(
201
- --#{$prefix}dropdown-item-active-color,
202
- $dropdown-item-active-color
220
+ @include h.defineVar(
221
+ "dropdown-item-background-color",
222
+ h.useVar("dropdown-item-active-background-color")
203
223
  );
204
224
  }
205
225
 
206
226
  &--clickable {
207
- cursor: pointer;
208
-
209
- &:not(.o-dropdown__item--active) {
210
- &:hover,
211
- &.o-dropdown__item--focused {
212
- background-color: var(
213
- --#{$prefix}dropdown-item-hover-background-color,
214
- $dropdown-item-hover-background-color
215
- );
216
- color: var(
217
- --#{$prefix}dropdown-item-hover-color,
218
- $dropdown-item-hover-color
219
- );
220
- }
227
+ @include h.clickable;
228
+ }
229
+
230
+ &--clickable:not(&--active) {
231
+ &:hover,
232
+ &.o-dropdown__item--focused {
233
+ @include h.defineVar(
234
+ "dropdown-item-color",
235
+ h.useVar("dropdown-item-hover-color")
236
+ );
237
+ @include h.defineVar(
238
+ "dropdown-item-background-color",
239
+ h.useVar("dropdown-item-hover-background-color")
240
+ );
221
241
  }
222
242
  }
223
243
  }
@@ -241,46 +261,52 @@ $dropdown-mobile-zindex: 60 !default;
241
261
  }
242
262
 
243
263
  &--disabled {
244
- opacity: var(
245
- --#{$prefix}dropdown-disabled-opacity,
246
- $dropdown-disabled-opacity
247
- );
248
- pointer-events: none;
264
+ @include h.disabled(h.useVar("dropdown-disabled-opacity"));
265
+ }
266
+
267
+ &--teleport {
268
+ width: unset;
249
269
  }
250
270
 
251
- &--modal:not(.o-dropdown--inline):not(.o-dropdown--hoverable) {
271
+ &--modal {
272
+ @include h.defineVar("dropdown-modal-zindex", $dropdown-modal-zindex);
273
+ @include h.defineVar(
274
+ "dropdown-modal-max-height",
275
+ $dropdown-modal-max-height
276
+ );
277
+ @include h.defineVar(
278
+ "dropdown-modal-min-width",
279
+ $dropdown-modal-min-width
280
+ );
281
+ @include h.defineVar(
282
+ "dropdown-modal-max-width",
283
+ $dropdown-modal-max-width
284
+ );
285
+
286
+ > .o-dropdown__overlay {
287
+ pointer-events: auto;
288
+ position: fixed;
289
+ bottom: 0;
290
+ left: 0;
291
+ right: 0;
292
+ top: 0;
293
+ background-color: h.useVar("dropdown-overlay-background-color");
294
+ z-index: h.useVar("dropdown-overlay-zindex");
295
+ }
296
+
252
297
  > .o-dropdown__menu {
298
+ pointer-events: auto;
253
299
  position: fixed;
254
300
  top: 25%;
255
301
  left: 50%;
256
- bottom: auto;
257
- right: auto;
302
+ bottom: unset;
303
+ right: unset;
258
304
  transform: translate3d(-50%, -25%, 0);
259
- overflow-y: auto;
260
- width: var(
261
- --#{$prefix}dropdown-mobile-width,
262
- $dropdown-mobile-width
263
- );
264
- max-width: var(
265
- --#{$prefix}dropdown-mobile-max-width,
266
- $dropdown-mobile-max-width
267
- );
268
- max-height: var(
269
- --#{$prefix}dropdown-mobile-max-height,
270
- $dropdown-mobile-max-height
271
- );
272
- z-index: var(
273
- --#{$prefix}dropdown-mobile-zindex,
274
- $dropdown-mobile-zindex
275
- );
276
- }
277
305
 
278
- > .o-dropdown__overlay {
279
- display: block;
306
+ min-width: h.useVar("dropdown-modal-min-width");
307
+ max-width: h.useVar("dropdown-modal-max-width");
308
+ max-height: h.useVar("dropdown-modal-max-height");
309
+ z-index: h.useVar("dropdown-modal-zindex");
280
310
  }
281
311
  }
282
-
283
- &--teleport {
284
- width: unset;
285
- }
286
312
  }