@oruga-ui/theme-oruga 0.5.1 → 0.7.0

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 (41) hide show
  1. package/README.md +5 -4
  2. package/dist/oruga.css +2 -2
  3. package/dist/scss/components/_autocomplete.scss +16 -16
  4. package/dist/scss/components/_breadcrumb.scss +189 -0
  5. package/dist/scss/components/_button.scss +180 -166
  6. package/dist/scss/components/_carousel.scss +199 -177
  7. package/dist/scss/components/_checkbox.scss +130 -122
  8. package/dist/scss/components/_collapse.scss +11 -9
  9. package/dist/scss/components/_datepicker.scss +409 -417
  10. package/dist/scss/components/_datetimepicker.scss +8 -8
  11. package/dist/scss/components/_dropdown.scss +225 -207
  12. package/dist/scss/components/_field.scss +107 -106
  13. package/dist/scss/components/_icon.scss +44 -40
  14. package/dist/scss/components/_input.scss +127 -112
  15. package/dist/scss/components/_loading.scss +27 -24
  16. package/dist/scss/components/_menu.scss +102 -65
  17. package/dist/scss/components/_modal.scss +67 -67
  18. package/dist/scss/components/_notification.scss +146 -134
  19. package/dist/scss/components/_pagination.scss +227 -198
  20. package/dist/scss/components/_radio.scss +95 -74
  21. package/dist/scss/components/_select.scss +143 -120
  22. package/dist/scss/components/_sidebar.scss +120 -104
  23. package/dist/scss/components/_skeleton.scss +55 -55
  24. package/dist/scss/components/_slider.scss +166 -151
  25. package/dist/scss/components/_steps.scss +300 -287
  26. package/dist/scss/components/_switch.scss +115 -128
  27. package/dist/scss/components/_table.scss +364 -331
  28. package/dist/scss/components/_tabs.scss +295 -280
  29. package/dist/scss/components/_tag.scss +84 -0
  30. package/dist/scss/components/_taginput.scss +55 -97
  31. package/dist/scss/components/_timepicker.scss +74 -68
  32. package/dist/scss/components/_tooltip.scss +522 -424
  33. package/dist/scss/components/_upload.scss +51 -48
  34. package/dist/scss/oruga.scss +2 -1
  35. package/dist/scss/utils/_animations.scss +97 -97
  36. package/dist/scss/utils/_base.scss +33 -16
  37. package/dist/scss/utils/_helpers.scss +65 -65
  38. package/dist/scss/utils/_root.scss +37 -44
  39. package/dist/scss/utils/_variables.scss +45 -44
  40. package/dist/theme.js +1 -1
  41. package/package.json +29 -26
@@ -1,23 +1,23 @@
1
1
  /* @docs */
2
- $autocomplete-item-hover-background-color: #f5f5f5 !default;
2
+ $autocomplete-item-hover-background-color: $control-brackground-color !default;
3
3
  /* @docs */
4
4
 
5
- .o-acp {
6
- &__item {
7
- white-space: nowrap;
8
- overflow: hidden;
9
- text-overflow: ellipsis;
5
+ .o-autocomplete {
6
+ &__item {
7
+ white-space: nowrap;
8
+ overflow: hidden;
9
+ text-overflow: ellipsis;
10
10
 
11
- &-group-title,
12
- &--empty {
13
- @extend .o-drop--disabled;
14
- }
11
+ &-group-title,
12
+ &--empty {
13
+ @extend .o-dropdown--disabled;
14
+ }
15
15
 
16
- &--hover {
17
- background-color: var(
18
- --#{$prefix}autocomplete-item-hover-background-color,
19
- $autocomplete-item-hover-background-color
20
- );
16
+ &--focused {
17
+ background-color: var(
18
+ --#{$prefix}autocomplete-item-hover-background-color,
19
+ $autocomplete-item-hover-background-color
20
+ );
21
+ }
21
22
  }
22
- }
23
23
  }
@@ -0,0 +1,189 @@
1
+ @use "sass:list";
2
+
3
+ /* @docs */
4
+ $breadcrumb-list-line-height: 1.25em !default;
5
+ $breadcrumb-item-spacer: 0.25em !default;
6
+ $breadcrumb-item-font-size: $base-font-size !default;
7
+ $breadcrumb-item-padding: 0.3em !default;
8
+ $breadcrumb-list-border-radius: var(--#{$prefix}base-border-radius) !default;
9
+ $breadcrumb-item-color: var(--#{$prefix}grey-dark) !default;
10
+ $breadcrumb-item-background-color: transparent !default;
11
+ $breadcrumb-item-active-color: var(--#{$prefix}primary) !default;
12
+ $breadcrumb-item-active-background-color: transparent !default;
13
+ $breadcrumb-item-disabled-color: var(--#{$prefix}grey-light) !default;
14
+ $breadcrumb-item-hover-color: var(--#{$prefix}white) !default;
15
+ $breadcrumb-item-hover-background-color: var(--#{$prefix}secondary) !default;
16
+ $breadcrumb-seperator-color: inherit;
17
+ /* @docs */
18
+
19
+ .o-breadcrumb {
20
+ &__list {
21
+ list-style: none;
22
+ display: flex;
23
+ padding: unset;
24
+ line-height: var(
25
+ --#{$prefix}breadcrumb-list-line-height,
26
+ $breadcrumb-list-line-height
27
+ );
28
+ }
29
+
30
+ &__item {
31
+ -moz-appearance: none;
32
+ -webkit-appearance: none;
33
+ display: block;
34
+ list-style: none;
35
+ border: transparent;
36
+ background-color: var(
37
+ --#{$prefix}breadcrumb-item-background-color,
38
+ $breadcrumb-item-background-color
39
+ );
40
+ color: var(--#{$prefix}breadcrumb-item-color, $breadcrumb-item-color);
41
+ font-size: var(
42
+ --#{$prefix}breadcrumb-item-size,
43
+ $breadcrumb-item-font-size
44
+ );
45
+ border-radius: var(
46
+ --#{$prefix}breadcrumb-list-border-radius,
47
+ $breadcrumb-list-border-radius
48
+ );
49
+
50
+ // define seprator
51
+ &:not(:first-child)::before {
52
+ float: left;
53
+ color: var(
54
+ --#{$prefix}breadcrumb-seperator-color,
55
+ $breadcrumb-seperator-color
56
+ );
57
+ content: var(--seperator, "/");
58
+ }
59
+
60
+ // remove sperator when custom seperator is used
61
+ &:not(:has(.o-breadcrumb__item__link:first-child))::before {
62
+ content: unset;
63
+ }
64
+
65
+ &:focus-within:not(&--disabled),
66
+ &:focus:not(&--disabled),
67
+ &:hover:not(&--disabled) {
68
+ .o-breadcrumb__item__link {
69
+ color: var(
70
+ --#{$prefix}breadcrumb-item-hover-color,
71
+ $breadcrumb-item-hover-color
72
+ );
73
+ background-color: var(
74
+ --#{$prefix}breadcrumb-item-hover-background-color,
75
+ $breadcrumb-item-hover-background-color
76
+ );
77
+ border-radius: var(
78
+ --#{$prefix}breadcrumb-list-border-radius,
79
+ $breadcrumb-list-border-radius
80
+ );
81
+ }
82
+ }
83
+
84
+ &--active .o-breadcrumb__item__link {
85
+ color: var(
86
+ --#{$prefix}breadcrumb-item-active-color,
87
+ $breadcrumb-item-active-color
88
+ );
89
+ background-color: var(
90
+ --#{$prefix}breadcrumb-item-active-background-color,
91
+ $breadcrumb-item-active-background-color
92
+ );
93
+ }
94
+
95
+ &--disabled .o-breadcrumb__item__link {
96
+ cursor: unset;
97
+ pointer-events: none;
98
+ color: var(
99
+ --#{$prefix}breadcrumb-item-disabled-color,
100
+ $breadcrumb-item-disabled-color
101
+ );
102
+ }
103
+
104
+ &__icon {
105
+ &--left {
106
+ padding-right: var(
107
+ --#{$prefix}breadcrumb-item-spacer,
108
+ $breadcrumb-item-spacer
109
+ );
110
+ }
111
+
112
+ &--right {
113
+ padding-left: var(
114
+ --#{$prefix}breadcrumb-item-spacer,
115
+ $breadcrumb-item-spacer
116
+ );
117
+ }
118
+ }
119
+
120
+ &__link {
121
+ margin: var(
122
+ --#{$prefix}breadcrumb-item-spacer,
123
+ $breadcrumb-item-spacer
124
+ );
125
+ padding: var(
126
+ --#{$prefix}breadcrumb-item-padding,
127
+ $breadcrumb-item-padding
128
+ );
129
+ }
130
+ }
131
+
132
+ /* size variants*/
133
+ @each $name, $value in $sizes {
134
+ &--#{$name} .o-breadcrumb__item {
135
+ font-size: var(--#{$prefix}button-font-size-#{$name}, $value);
136
+ }
137
+ }
138
+
139
+ /* color variants*/
140
+ @each $name, $pair in $colors {
141
+ $color: list.nth($pair, 1);
142
+
143
+ &--#{$name} {
144
+ --#{$prefix}focus: #{createFocus($color)};
145
+
146
+ .o-breadcrumb__item .o-breadcrumb__item__link {
147
+ color: var(--#{$prefix}variant-#{$name}, $color);
148
+
149
+ &:hover {
150
+ /* background-color: darken($color, 2.5%)*/
151
+ /* IE 11 needs polyfill*/
152
+ filter: brightness(97.5%);
153
+ }
154
+ }
155
+ }
156
+ }
157
+
158
+ /** alignment **/
159
+ &--left {
160
+ ol,
161
+ ul {
162
+ justify-content: flex-start;
163
+ }
164
+ }
165
+
166
+ &--centered {
167
+ ol,
168
+ ul {
169
+ justify-content: center;
170
+ }
171
+ }
172
+
173
+ &--right {
174
+ ol,
175
+ ul {
176
+ justify-content: flex-end;
177
+ }
178
+ }
179
+
180
+ // focus effect
181
+ &:focus,
182
+ &:focus-visible,
183
+ &:focus-within {
184
+ .o-breadcrumb__item {
185
+ box-shadow: 0 0 0 0.25rem var(--#{$prefix}focus);
186
+ outline: none;
187
+ }
188
+ }
189
+ }
@@ -15,7 +15,7 @@ $button-spacer: 0.5rem !default;
15
15
  $button-height: $control-height !default;
16
16
  $button-padding: $control-padding-vertical 0.75em !default;
17
17
  $button-rounded-border-radius: var(
18
- --#{$prefix}#{base-border-radius-rounded}
18
+ --#{$prefix}#{base-border-radius-rounded}
19
19
  ) !default;
20
20
  $button-disabled-opacity: var(--#{$prefix}#{base-disabled-opacity}) !default;
21
21
  $button-outlined-background-color: transparent !default;
@@ -23,200 +23,214 @@ $button-outlined-border-color: var(--#{$prefix}grey-light) !default;
23
23
  /* @docs */
24
24
 
25
25
  @keyframes spinAround {
26
- from {
27
- transform: rotate(0deg);
28
- }
26
+ from {
27
+ transform: rotate(0deg);
28
+ }
29
29
 
30
- to {
31
- transform: rotate(359deg);
32
- }
30
+ to {
31
+ transform: rotate(359deg);
32
+ }
33
33
  }
34
34
 
35
- .o-btn {
36
- position: relative;
37
- display: inline-flex;
38
- cursor: pointer;
39
- text-align: center;
40
- white-space: nowrap;
41
- align-items: center;
42
- justify-content: center;
43
- vertical-align: top;
44
- text-decoration: none;
45
-
46
- @include unselectable;
47
- -moz-appearance: none;
48
- -webkit-appearance: none;
49
-
50
- background-color: var(
51
- --#{$prefix}button-background-color,
52
- $button-background-color
53
- );
54
- color: var(--#{$prefix}button-color, $button-color);
55
- padding: var(--#{$prefix}button-padding, $button-padding);
56
- border: var(--#{$prefix}button-border, $button-border);
57
- border-radius: var(--#{$prefix}button-border-radius, $button-border-radius);
58
- box-shadow: var(--#{$prefix}button-box-shadow, $button-box-shadow);
59
- font-size: var(--#{$prefix}base-font-size, $base-font-size);
60
- font-weight: var(--#{$prefix}button-font-weight, $button-font-weight);
61
- line-height: var(--#{$prefix}button-line-height, $button-line-height);
62
- margin: var(--#{$prefix}button-margin, $button-margin);
63
- height: var(--#{$prefix}button-height, $button-height);
64
-
65
- &__wrapper {
35
+ .o-button {
36
+ @include unselectable;
37
+
38
+ position: relative;
66
39
  display: inline-flex;
40
+ cursor: pointer;
41
+ text-align: center;
42
+ white-space: nowrap;
67
43
  align-items: center;
68
44
  justify-content: center;
69
- position: relative;
70
- width: 100%;
71
-
72
- @include side-flex-gap($button-margin-icon-to-text);
73
- }
74
-
75
- &__label {
76
- width: 100%;
77
- }
78
-
79
- &--expanded {
80
- width: 100%;
81
- }
82
-
83
- &--rounded {
84
- border-radius: var(
85
- --#{$prefix}button-rounded-border-radius,
86
- $button-rounded-border-radius
45
+ vertical-align: top;
46
+ text-decoration: none;
47
+ -moz-appearance: none;
48
+ -webkit-appearance: none;
49
+ padding: unset;
50
+
51
+ background-color: var(
52
+ --#{$prefix}button-background-color,
53
+ $button-background-color
87
54
  );
88
- }
89
-
90
- &--disabled {
91
- opacity: var(--#{$prefix}button-disabled-opacity, $button-disabled-opacity);
92
- cursor: not-allowed;
93
- pointer-events: none;
94
- }
95
-
96
- /* size variants*/
97
- @each $name, $value in $sizes {
98
- &--#{$name} {
99
- font-size: var(--#{$prefix}button-font-size-#{$name}, $value);
55
+ color: var(--#{$prefix}button-color, $button-color);
56
+ border: var(--#{$prefix}button-border, $button-border);
57
+ border-radius: var(--#{$prefix}button-border-radius, $button-border-radius);
58
+ box-shadow: var(--#{$prefix}button-box-shadow, $button-box-shadow);
59
+ font-size: var(--#{$prefix}base-font-size, $base-font-size);
60
+ font-weight: var(--#{$prefix}button-font-weight, $button-font-weight);
61
+ line-height: var(--#{$prefix}button-line-height, $button-line-height);
62
+ margin: var(--#{$prefix}button-margin, $button-margin);
63
+ height: var(--#{$prefix}button-height, $button-height);
64
+
65
+ &__wrapper {
66
+ display: inline-flex;
67
+ align-items: center;
68
+ justify-content: center;
69
+ position: relative;
70
+ width: 100%;
71
+ padding: var(--#{$prefix}button-padding, $button-padding);
72
+
73
+ @include side-flex-gap($button-margin-icon-to-text);
100
74
  }
101
- }
102
75
 
103
- /* color variants*/
104
- @each $name, $pair in $colors {
105
- $color: list.nth($pair, 1);
106
- $color-invert: list.nth($pair, 2);
76
+ &__label {
77
+ width: 100%;
78
+ }
107
79
 
108
- &--#{$name} {
109
- --#{$prefix}focus: #{createFocus($color)};
80
+ &--expanded {
81
+ width: 100%;
82
+ }
110
83
 
111
- border-color: transparent;
112
- background-color: var(--#{$prefix}variant-#{$name}, $color);
113
- color: var(--#{$prefix}variant-invert-#{$name}, $color-invert);
84
+ &--rounded {
85
+ border-radius: var(
86
+ --#{$prefix}button-rounded-border-radius,
87
+ $button-rounded-border-radius
88
+ );
89
+ }
114
90
 
115
- &:hover {
116
- /* background-color: darken($color, 2.5%)*/
117
- /* IE 11 needs polyfill*/
118
- filter: brightness(97.5%);
119
- }
91
+ &--disabled {
92
+ opacity: var(
93
+ --#{$prefix}button-disabled-opacity,
94
+ $button-disabled-opacity
95
+ );
96
+ cursor: not-allowed;
97
+ pointer-events: none;
120
98
  }
121
- }
122
99
 
123
- &--outlined {
124
- &:focus,
125
- &:hover {
126
- background-color: var(
127
- --#{$prefix}button-border-color,
128
- $button-border-color
129
- );
130
- color: var(--#{$prefix}button-color, $button-color);
100
+ /* size variants*/
101
+ @each $name, $value in $sizes {
102
+ &--#{$name} {
103
+ font-size: var(--#{$prefix}button-font-size-#{$name}, $value);
104
+ }
131
105
  }
132
106
 
107
+ /* color variants*/
133
108
  @each $name, $pair in $colors {
134
- $color: list.nth($pair, 1);
135
- $color-invert: list.nth($pair, 2);
109
+ $color: list.nth($pair, 1);
110
+ $color-invert: list.nth($pair, 2);
136
111
 
137
- &-#{$name} {
138
- --#{$prefix}focus: #{createFocus($color)};
112
+ &--#{$name} {
113
+ --#{$prefix}focus: #{createFocus($color)};
139
114
 
140
- background-color: var(
141
- --#{$prefix}button-outlined-background-color,
142
- $button-outlined-background-color
143
- );
144
- border-color: var(--#{$prefix}variant-#{$name}, $color);
145
- color: var(--#{$prefix}variant-#{$name}, $color);
115
+ border-color: transparent;
116
+ background-color: var(--#{$prefix}variant-#{$name}, $color);
117
+ color: var(--#{$prefix}variant-invert-#{$name}, $color-invert);
118
+
119
+ &:hover {
120
+ /* background-color: darken($color, 2.5%)*/
121
+ /* IE 11 needs polyfill*/
122
+ filter: brightness(97.5%);
123
+ }
124
+ }
125
+ }
146
126
 
127
+ &--outlined {
147
128
  &:focus,
148
129
  &:hover {
149
- border-color: transparent;
150
- background-color: var(--#{$prefix}variant-#{$name}, $color);
151
- color: var(--#{$prefix}variant-invert-#{$name}, $color-invert);
130
+ background-color: var(
131
+ --#{$prefix}button-border-color,
132
+ $button-border-color
133
+ );
134
+ color: var(--#{$prefix}button-color, $button-color);
135
+ }
136
+
137
+ @each $name, $pair in $colors {
138
+ $color: list.nth($pair, 1);
139
+ $color-invert: list.nth($pair, 2);
140
+
141
+ &-#{$name} {
142
+ --#{$prefix}focus: #{createFocus($color)};
143
+
144
+ background-color: var(
145
+ --#{$prefix}button-outlined-background-color,
146
+ $button-outlined-background-color
147
+ );
148
+ border-color: var(--#{$prefix}variant-#{$name}, $color);
149
+ color: var(--#{$prefix}variant-#{$name}, $color);
150
+
151
+ &:focus,
152
+ &:hover {
153
+ border-color: transparent;
154
+ background-color: var(--#{$prefix}variant-#{$name}, $color);
155
+ color: var(
156
+ --#{$prefix}variant-invert-#{$name},
157
+ $color-invert
158
+ );
159
+ }
160
+ }
152
161
  }
153
- }
154
162
  }
155
- }
156
163
 
157
- &--inverted {
158
- background-color: var(--#{$prefix}button-color, $button-color);
159
- border-color: var(--#{$prefix}button-color, $button-color);
160
- color: var(--#{$prefix}button-border-color, $button-border-color);
164
+ &--inverted {
165
+ background-color: var(--#{$prefix}button-color, $button-color);
166
+ border-color: var(--#{$prefix}button-color, $button-color);
167
+ color: var(--#{$prefix}button-border-color, $button-border-color);
168
+
169
+ &:hover {
170
+ /* background-color: darken($color-invert, 5%)*/
171
+ /* IE 11 needs polyfill*/
172
+ filter: brightness(95%);
173
+ }
161
174
 
162
- &:hover {
163
- /* background-color: darken($color-invert, 5%)*/
164
- /* IE 11 needs polyfill*/
165
- filter: brightness(95%);
175
+ @each $name, $pair in $colors {
176
+ $color: list.nth($pair, 1);
177
+ $color-invert: list.nth($pair, 2);
178
+
179
+ &-#{$name} {
180
+ --#{$prefix}focus: #{createFocus($color)};
181
+
182
+ background-color: var(
183
+ --#{$prefix}variant-invert-#{$name},
184
+ $color-invert
185
+ );
186
+ border-color: var(
187
+ --#{$prefix}variant-invert-#{$name},
188
+ $color-invert
189
+ );
190
+ color: var(--#{$prefix}variant-#{$name}, $color);
191
+
192
+ &:focus,
193
+ &:hover {
194
+ /* background-color: darken($color-invert, 5%)*/
195
+ /* IE 11 needs polyfill*/
196
+ filter: brightness(95%);
197
+ }
198
+ }
199
+ }
166
200
  }
167
201
 
168
- @each $name, $pair in $colors {
169
- $color: list.nth($pair, 1);
170
- $color-invert: list.nth($pair, 2);
202
+ /* focus effect*/
203
+ &:focus,
204
+ &:focus-within {
205
+ box-shadow: 0 0 0 0.25rem var(--#{$prefix}focus);
206
+ outline: 0;
207
+ }
171
208
 
172
- &-#{$name} {
173
- --#{$prefix}focus: #{createFocus($color)};
209
+ &--loading {
210
+ color: transparent !important;
211
+ pointer-events: none;
212
+ }
174
213
 
175
- background-color: var(
176
- --#{$prefix}variant-invert-#{$name},
177
- $color-invert
178
- );
179
- border-color: var(--#{$prefix}variant-invert-#{$name}, $color-invert);
180
- color: var(--#{$prefix}variant-#{$name}, $color);
214
+ &--loading::after {
215
+ -webkit-animation: spinAround 500ms infinite linear;
216
+ left: calc(50% - 0.5em);
217
+ top: calc(50% - 0.5em);
218
+ position: absolute !important;
219
+ border: 2px solid #dbdbdb;
220
+ border-radius: 9999px;
221
+ border-right-color: transparent;
222
+ border-top-color: transparent;
223
+ content: "";
224
+ display: block;
225
+ height: 1em;
226
+ width: 1em;
227
+ }
181
228
 
182
- &:focus,
183
- &:hover {
184
- /* background-color: darken($color-invert, 5%)*/
185
- /* IE 11 needs polyfill*/
186
- filter: brightness(95%);
187
- }
188
- }
189
- }
190
- }
191
-
192
- /* focus effect*/
193
- &:focus,
194
- &:focus-within {
195
- box-shadow: 0 0 0 0.25rem var(--#{$prefix}focus);
196
- outline: 0;
197
- }
198
-
199
- &--loading {
200
- color: transparent !important;
201
- pointer-events: none;
202
- }
203
-
204
- &--loading::after {
205
- -webkit-animation: spinAround 500ms infinite linear;
206
- left: calc(50% - 0.5em);
207
- top: calc(50% - 0.5em);
208
- position: absolute !important;
209
- border: 2px solid #dbdbdb;
210
- border-radius: 9999px;
211
- border-right-color: transparent;
212
- border-top-color: transparent;
213
- content: "";
214
- display: block;
215
- height: 1em;
216
- width: 1em;
217
- }
218
-
219
- .o-icon:not(:last-child) {
220
- margin-right: var(--#{$prefix}button-spacer, $button-spacer);
221
- }
229
+ .o-icon:not(:last-child) {
230
+ margin-right: var(--#{$prefix}button-spacer, $button-spacer);
231
+ }
232
+
233
+ &:has(.o-tag--badge) {
234
+ position: relative;
235
+ }
222
236
  }