@oruga-ui/theme-oruga 0.3.0 → 0.4.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/dist/oruga.css +191 -23
  2. package/dist/oruga.min.css +1 -1
  3. package/dist/scss/components/_autocomplete.scss +8 -0
  4. package/dist/scss/components/_button.scss +15 -0
  5. package/dist/scss/components/_checkbox.scss +9 -0
  6. package/dist/scss/components/_collapse.scss +3 -0
  7. package/dist/scss/components/_datepicker.scss +5 -0
  8. package/dist/scss/components/_datetimepicker.scss +3 -0
  9. package/dist/scss/components/_dropdown.scss +3 -3
  10. package/dist/scss/components/_input.scss +9 -0
  11. package/dist/scss/components/_menu.scss +6 -2
  12. package/dist/scss/components/_radio.scss +10 -2
  13. package/dist/scss/components/_select.scss +17 -1
  14. package/dist/scss/components/_slider.scss +12 -0
  15. package/dist/scss/components/_switch.scss +12 -0
  16. package/dist/scss/components/_table.scss +4 -3
  17. package/dist/scss/components/_tabs.scss +9 -3
  18. package/dist/scss/components/_taginput.scss +24 -1
  19. package/dist/scss/utils/_helpers.scss +8 -2
  20. package/dist/scss/utils/_root.scss +12 -2
  21. package/dist/scss/utils/_variables.scss +1 -0
  22. package/package.json +22 -23
  23. package/src/assets/scss/components/_autocomplete.scss +8 -0
  24. package/src/assets/scss/components/_button.scss +15 -0
  25. package/src/assets/scss/components/_checkbox.scss +9 -0
  26. package/src/assets/scss/components/_collapse.scss +3 -0
  27. package/src/assets/scss/components/_datepicker.scss +5 -0
  28. package/src/assets/scss/components/_datetimepicker.scss +3 -0
  29. package/src/assets/scss/components/_dropdown.scss +3 -3
  30. package/src/assets/scss/components/_input.scss +9 -0
  31. package/src/assets/scss/components/_menu.scss +6 -2
  32. package/src/assets/scss/components/_radio.scss +10 -2
  33. package/src/assets/scss/components/_select.scss +17 -1
  34. package/src/assets/scss/components/_slider.scss +12 -0
  35. package/src/assets/scss/components/_switch.scss +12 -0
  36. package/src/assets/scss/components/_table.scss +4 -3
  37. package/src/assets/scss/components/_tabs.scss +9 -3
  38. package/src/assets/scss/components/_taginput.scss +24 -1
  39. package/src/assets/scss/utils/_helpers.scss +8 -2
  40. package/src/assets/scss/utils/_root.scss +12 -2
  41. package/src/assets/scss/utils/_variables.scss +1 -0
@@ -102,6 +102,8 @@ $button-outlined-background-color: transparent !default;
102
102
  $color-invert: list.nth($pair, 2);
103
103
 
104
104
  &--#{$name} {
105
+ --#{$prefix}focus: #{createFocus($color)};
106
+
105
107
  border-color: transparent;
106
108
  background-color: var(--#{$prefix}variant-#{$name}, $color);
107
109
  color: var(--#{$prefix}variant-invert-#{$name}, $color-invert);
@@ -140,6 +142,8 @@ $button-outlined-background-color: transparent !default;
140
142
  $color-invert: list.nth($pair, 2);
141
143
 
142
144
  &-#{$name} {
145
+ --#{$prefix}focus: #{createFocus($color)};
146
+
143
147
  background-color: var(
144
148
  --#{$prefix}button-outlined-background-color,
145
149
  $button-outlined-background-color
@@ -147,6 +151,7 @@ $button-outlined-background-color: transparent !default;
147
151
  border-color: var(--#{$prefix}variant-#{$name}, $color);
148
152
  color: var(--#{$prefix}variant-#{$name}, $color);
149
153
 
154
+ &:focus,
150
155
  &:hover {
151
156
  border-color: transparent;
152
157
  background-color: var(--#{$prefix}variant-#{$name}, $color);
@@ -192,6 +197,8 @@ $button-outlined-background-color: transparent !default;
192
197
  $color-invert: list.nth($pair, 2);
193
198
 
194
199
  &-#{$name} {
200
+ --#{$prefix}focus: #{createFocus($color)};
201
+
195
202
  background-color: var(
196
203
  --#{$prefix}variant-invert-#{$name},
197
204
  $color-invert
@@ -199,6 +206,7 @@ $button-outlined-background-color: transparent !default;
199
206
  border-color: var(--#{$prefix}variant-invert-#{$name}, $color-invert);
200
207
  color: var(--#{$prefix}variant-#{$name}, $color);
201
208
 
209
+ &:focus,
202
210
  &:hover {
203
211
  // background-color: darken($color-invert, 5%)
204
212
  // IE 11 needs polyfill
@@ -207,4 +215,11 @@ $button-outlined-background-color: transparent !default;
207
215
  }
208
216
  }
209
217
  }
218
+
219
+ // focus effect
220
+ &:focus,
221
+ &:focus-within {
222
+ box-shadow: 0 0 0 0.25rem var(--#{$prefix}focus);
223
+ outline: 0;
224
+ }
210
225
  }
@@ -139,7 +139,10 @@ $checkbox-line-height: 1.5 !default;
139
139
  @each $name, $pair in $colors {
140
140
  $color: list.nth($pair, 1);
141
141
  $color-invert: list.nth($pair, 2);
142
+
142
143
  &--#{$name} {
144
+ --#{$prefix}focus: #{createFocus($color)};
145
+
143
146
  .o-chk__input {
144
147
  border-color: var(--#{$prefix}variant-#{$name}, $color);
145
148
  background-color: var(--#{$prefix}variant-#{$name}, $color);
@@ -154,4 +157,10 @@ $checkbox-line-height: 1.5 !default;
154
157
  }
155
158
  }
156
159
  }
160
+
161
+ // focus effect
162
+ &:focus &__input,
163
+ &:focus-within &__input {
164
+ box-shadow: 0 0 0 0.25rem var(--#{$prefix}focus);
165
+ }
157
166
  }
@@ -2,8 +2,11 @@
2
2
  /* @docs */
3
3
 
4
4
  .o-clps {
5
+ width: 100%;
6
+
5
7
  &__trigger {
6
8
  cursor: pointer;
9
+ display: inline-block;
7
10
  }
8
11
 
9
12
  &__content {
@@ -469,6 +469,11 @@ $datepicker-btn-padding: 0.5em 0.5em !default;
469
469
  height: 2.5rem;
470
470
  }
471
471
 
472
+ &--expanded {
473
+ width: 100%;
474
+ flex-grow: 1;
475
+ }
476
+
472
477
  &--mobile {
473
478
  .o-dpck__header__previous {
474
479
  order: 1;
@@ -6,5 +6,8 @@
6
6
  display: flex;
7
7
  justify-content: center;
8
8
  align-items: center;
9
+
10
+ // override time dropdown shadow
11
+ --#{$prefix}dropdown-menu-box-shadow: 0,0,0,0;
9
12
  }
10
13
  }
@@ -21,13 +21,13 @@ $dropdown-menu-spacer: 0px !default;
21
21
  $dropdown-menu-margin: 0 !default;
22
22
  $dropdown-menu-padding: 0.5rem 0 0.5rem 0 !default;
23
23
  $dropdown-menu-width: 12rem !default;
24
- $dropdown-menu-zindex: 20 !default;
24
+ $dropdown-menu-zindex: 50 !default;
25
25
  $dropdown-mobile-max-height: calc(100vh - 120px) !default;
26
26
  $dropdown-mobile-max-width: 460px !default;
27
27
  $dropdown-mobile-overlay-color: rgba(#000000, 0.86) !default;
28
- $dropdown-mobile-overlay-zindex: 40 !default;
28
+ $dropdown-mobile-overlay-zindex: 55 !default;
29
29
  $dropdown-mobile-width: calc(100vw - 40px) !default;
30
- $dropdown-mobile-zindex: 50 !default;
30
+ $dropdown-mobile-zindex: 60 !default;
31
31
  /* @docs */
32
32
 
33
33
  .o-drop {
@@ -133,8 +133,17 @@ $input-textarea-padding: 0.625em !default;
133
133
  // colar variants
134
134
  @each $name, $pair in $colors {
135
135
  $color: list.nth($pair, 1);
136
+
136
137
  &--#{$name} {
138
+ --#{$prefix}focus: #{createFocus($color)};
139
+
137
140
  border-color: var(--#{$prefix}variant-#{$name}, $color);
138
141
  }
139
142
  }
143
+
144
+ // focus effect
145
+ &:focus,
146
+ &:focus-within {
147
+ box-shadow: 0 0 0 0.25rem var(--#{$prefix}focus);
148
+ }
140
149
  }
@@ -13,11 +13,10 @@ $menu-nested-list-padding-left: 0.75em !default;
13
13
  $menu-label-color: $grey !default;
14
14
  $menu-label-font-size: 0.75em !default;
15
15
  $menu-label-spacing: 1em !default;
16
+ $menu-icon-spacer: 0.5rem !default;
16
17
  /* @docs */
17
18
 
18
19
  .o-menu {
19
- font-size: var(--#{$prefix}base-font-size, $base-font-size);
20
-
21
20
  @each $name, $value in $sizes {
22
21
  &--#{$name} {
23
22
  font-size: var(--#{$prefix}menu-font-size-#{$name}, $value);
@@ -61,6 +60,7 @@ $menu-label-spacing: 1em !default;
61
60
  list-style: none;
62
61
  color: var(--#{$prefix}menu-item-color, $menu-item-color);
63
62
  padding: var(--#{$prefix}menu-item-padding, $menu-item-padding);
63
+ font-size: var(--#{$prefix}menu-item-size, $base-font-size);
64
64
 
65
65
  &:hover:not(&--active):not(&--disabled) {
66
66
  color: var(--#{$prefix}menu-item-hover-color, $menu-item-hover-color);
@@ -70,6 +70,10 @@ $menu-label-spacing: 1em !default;
70
70
  );
71
71
  }
72
72
 
73
+ &--icon-text .o-icon {
74
+ margin-right: var(--#{$prefix}menu-icon-spacer, $menu-icon-spacer);
75
+ }
76
+
73
77
  &--active {
74
78
  color: var(--#{$prefix}menu-item-active-color, $menu-item-active-color);
75
79
  background-color: var(
@@ -60,7 +60,7 @@ $radio-line-height: 1.25 !default;
60
60
  box-shadow: var(--#{$prefix}radio-box-shadow, $radio-box-shadow);
61
61
  border-radius: 50%;
62
62
  background: var(
63
- --oruga-radio-active-background-color,
63
+ --#{$prefix}radio-active-background-color,
64
64
  $radio-active-background-color
65
65
  );
66
66
  mask-image: url(svg_radio_empty());
@@ -97,8 +97,16 @@ $radio-line-height: 1.25 !default;
97
97
  @each $name, $pair in $colors {
98
98
  $color: list.nth($pair, 1);
99
99
  $color-invert: list.nth($pair, 2);
100
+
100
101
  &--#{$name} {
101
- --oruga-radio-active-background-color: #{$color};
102
+ --#{$prefix}focus: #{createFocus($color)};
103
+ --#{$prefix}radio-active-background-color: #{$color};
102
104
  }
103
105
  }
106
+
107
+ // focus effect
108
+ &:focus &__input,
109
+ &:focus-within &__input {
110
+ box-shadow: 0 0 0 0.25rem var(--#{$prefix}focus);
111
+ }
104
112
  }
@@ -36,7 +36,10 @@ $select-placeholder-opacity: var(--#{$prefix}base-disabled-opacity) !default;
36
36
  &--expanded {
37
37
  width: 100%;
38
38
  flex-grow: 1;
39
- flex-shrink: 1;
39
+
40
+ .o-sel {
41
+ width: 100%;
42
+ }
40
43
  }
41
44
  }
42
45
 
@@ -97,7 +100,10 @@ $select-placeholder-opacity: var(--#{$prefix}base-disabled-opacity) !default;
97
100
  // color variants
98
101
  @each $name, $pair in $colors {
99
102
  $color: list.nth($pair, 1);
103
+
100
104
  &--#{$name} {
105
+ --#{$prefix}focus: #{createFocus($color)};
106
+
101
107
  border-color: var(--#{$prefix}variant-#{$name}, $color);
102
108
  }
103
109
  }
@@ -137,4 +143,14 @@ $select-placeholder-opacity: var(--#{$prefix}base-disabled-opacity) !default;
137
143
  &__icon-left {
138
144
  left: 0;
139
145
  }
146
+
147
+ &[disabled] {
148
+ cursor: inherit;
149
+ }
150
+
151
+ // focus effect
152
+ &:focus,
153
+ &:focus-within {
154
+ box-shadow: 0 0 0 0.25rem var(--#{$prefix}focus);
155
+ }
140
156
  }
@@ -139,8 +139,13 @@ $slider-track-shadow: 0px 0px 0px var(--#{$prefix}grey) !default;
139
139
 
140
140
  @each $name, $pair in $colors {
141
141
  $color: list.nth($pair, 1);
142
+
142
143
  &--#{$name} {
143
144
  background: var(--#{$prefix}variant-#{$name}, $color);
145
+
146
+ + .o-slide__thumb-wrapper {
147
+ --#{$prefix}focus: #{createFocus($color)};
148
+ }
144
149
  }
145
150
  }
146
151
  }
@@ -184,4 +189,11 @@ $slider-track-shadow: 0px 0px 0px var(--#{$prefix}grey) !default;
184
189
  pointer-events: none;
185
190
  opacity: var(--#{$prefix}slider-track-disabled, $slider-track-disabled);
186
191
  }
192
+
193
+ // focus effect
194
+ &:active &__thumb,
195
+ &:focus &__thumb,
196
+ &:focus-within &__thumb {
197
+ box-shadow: 0 0 0 0.25rem var(--#{$prefix}focus);
198
+ }
187
199
  }
@@ -24,6 +24,7 @@ $switch-width: 2.75 * 1em !default;
24
24
  display: inline-flex;
25
25
  align-items: center;
26
26
  position: relative;
27
+ border-radius: 50rem;
27
28
 
28
29
  // size variants
29
30
  @each $name, $value in $sizes {
@@ -35,12 +36,17 @@ $switch-width: 2.75 * 1em !default;
35
36
  // color variants
36
37
  @each $name, $pair in $colors {
37
38
  $color: list.nth($pair, 1);
39
+
38
40
  &--#{$name} {
41
+ --#{$prefix}focus: #{createFocus($color)};
42
+
39
43
  .o-switch__check--checked {
40
44
  background: var(--#{$prefix}variant-#{$name}, $color);
41
45
  }
42
46
  }
43
47
  &--#{$name}-passive {
48
+ --#{$prefix}focus: #{createFocus($color)};
49
+
44
50
  .o-switch__check:not(.o-switch__check--checked) {
45
51
  background: var(--#{$prefix}variant-#{$name}, $color);
46
52
  }
@@ -135,4 +141,10 @@ $switch-width: 2.75 * 1em !default;
135
141
  &--disabled {
136
142
  opacity: var(--#{$prefix}switch-disabled-opacity, $switch-disabled-opacity);
137
143
  }
144
+
145
+ // focus effect
146
+ &:focus &__check,
147
+ &:focus-within &__check {
148
+ box-shadow: 0 0 0 0.25rem var(--#{$prefix}focus);
149
+ }
138
150
  }
@@ -78,6 +78,9 @@ $table-th-padding: 0.5em 0.75em !default;
78
78
  --#{$prefix}table-background-color,
79
79
  $table-background-color
80
80
  );
81
+ z-index: calc(
82
+ var(--#{$prefix}table-sticky-zindex, $table-sticky-zindex) + 1
83
+ );
81
84
  }
82
85
  }
83
86
 
@@ -252,9 +255,7 @@ $table-th-padding: 0.5em 0.75em !default;
252
255
  position: sticky;
253
256
  left: 0;
254
257
  top: 0;
255
- z-index: calc(
256
- var(--#{$prefix}table-sticky-zindex, $table-sticky-zindex) + 0
257
- );
258
+ z-index: var(--#{$prefix}table-sticky-zindex, $table-sticky-zindex);
258
259
  background: var(
259
260
  --#{$prefix}table-background-color,
260
261
  $table-background-color
@@ -23,7 +23,6 @@ $tabs-toggle-link-border-style: solid !default;
23
23
  $tabs-toggle-link-border-width: 1px !default;
24
24
  $tabs-toggle-link-hover-background-color: hsl(0, 0%, 96%) !default;
25
25
  $tabs-toggle-link-hover-border-color: hsl(0, 0%, 71%) !default;
26
- $tabs-toggle-link-radius: var(--#{$prefix}base-border-radius) !default;
27
26
  $tabs-toggle-link-active-background-color: var(--#{$prefix}primary) !default;
28
27
  $tabs-toggle-link-active-border-color: var(--#{$prefix}primary) !default;
29
28
  $tabs-toggle-link-active-color: var(--#{$prefix}primary-invert) !default;
@@ -96,7 +95,7 @@ $tabs-toggle-link-active-color: var(--#{$prefix}primary-invert) !default;
96
95
  );
97
96
  border-radius: var(
98
97
  --#{$prefix}tabs-border-bottom-color,
99
- #{$tabs-toggle-link-radius} 0 0 #{$tabs-toggle-link-radius}
98
+ #{$tabs-boxed-link-radius} 0 0 #{$tabs-boxed-link-radius}
100
99
  );
101
100
 
102
101
  &--active {
@@ -147,7 +146,6 @@ $tabs-toggle-link-active-color: var(--#{$prefix}primary-invert) !default;
147
146
  flex-grow: 1;
148
147
  flex-shrink: 0;
149
148
  justify-content: flex-start;
150
- overflow-x: auto;
151
149
  // padding bottom to keep showing the border-bottom
152
150
  padding-bottom: var(
153
151
  --#{$prefix}tabs-border-bottom-width,
@@ -174,6 +172,14 @@ $tabs-toggle-link-active-color: var(--#{$prefix}primary-invert) !default;
174
172
  margin-right: var(--#{$prefix}tabs-icon-margin, $tabs-icon-margin);
175
173
  }
176
174
 
175
+ // focus effect
176
+ &:focus,
177
+ &:focus-within {
178
+ box-shadow: 0 0 0 0.25rem var(--#{$prefix}focus);
179
+ outline: 0;
180
+ border-radius: #{$tabs-boxed-link-radius};
181
+ }
182
+
177
183
  &-default {
178
184
  @include item;
179
185
 
@@ -12,7 +12,7 @@ $taginput-margin-icon-to-text: 0.1875em !default;
12
12
  /* @docs */
13
13
 
14
14
  .o-taginput {
15
- display: block;
15
+ display: flex;
16
16
 
17
17
  &__container {
18
18
  display: flex;
@@ -31,6 +31,7 @@ $taginput-margin-icon-to-text: 0.1875em !default;
31
31
  font-size: var(--#{$prefix}base-font-size, $base-font-size);
32
32
  line-height: var(--#{$prefix}input-line-height, $input-line-height);
33
33
  margin: var(--#{$prefix}input-margin, $input-margin);
34
+ width: var(--#{$prefix}taginput-width, inherit);
34
35
 
35
36
  // size variants
36
37
  @each $name, $value in $sizes {
@@ -49,6 +50,7 @@ $taginput-margin-icon-to-text: 0.1875em !default;
49
50
  &__input {
50
51
  border: none;
51
52
  box-shadow: none;
53
+ width: 100%;
52
54
  }
53
55
 
54
56
  &__item {
@@ -69,11 +71,21 @@ $taginput-margin-icon-to-text: 0.1875em !default;
69
71
  @each $name, $pair in $colors {
70
72
  $color: list.nth($pair, 1);
71
73
  $color-invert: list.nth($pair, 2);
74
+
72
75
  &--#{$name} {
76
+ --#{$prefix}focus: #{createFocus($color)};
77
+
73
78
  background-color: var(--#{$prefix}variant-#{$name}, $color);
74
79
  color: var(--#{$prefix}variant-invert-#{$name}, $color-invert);
75
80
  }
76
81
  }
82
+
83
+ // focus effect
84
+ &:focus,
85
+ &:focus-within {
86
+ box-shadow: 0 0 0 0.25rem var(--#{$prefix}focus);
87
+ outline: 0;
88
+ }
77
89
  }
78
90
 
79
91
  &__counter {
@@ -91,4 +103,15 @@ $taginput-margin-icon-to-text: 0.1875em !default;
91
103
  flex-grow: 1;
92
104
  flex-shrink: 1;
93
105
  }
106
+
107
+ // // focus effect
108
+ // &:focus &__container,
109
+ // &:focus-within &__container {
110
+ // box-shadow: 0 0 0 0.25rem var(--#{$prefix}focus);
111
+
112
+ // // disable focus effect for inner input
113
+ // .o-input {
114
+ // --#{$prefix}focus: transparent;
115
+ // }
116
+ // }
94
117
  }
@@ -1,5 +1,6 @@
1
1
  @use "sass:string";
2
2
  @use "sass:math";
3
+ @use "sass:color";
3
4
 
4
5
  /**********************************
5
6
  * Utility mixins and functions
@@ -19,9 +20,9 @@
19
20
 
20
21
  @return if(
21
22
  $index,
22
- str-slice($string, 1, $index - 1) + $replace +
23
+ string.slice($string, 1, $index - 1) + $replace +
23
24
  str-replace(
24
- str-slice($string, $index + str-length($search)),
25
+ string.slice($string, $index + string.length($search)),
25
26
  $search,
26
27
  $replace
27
28
  ),
@@ -105,3 +106,8 @@
105
106
 
106
107
  @return ($quotient + $remainder) * $sign;
107
108
  }
109
+
110
+ // create a focus color based on a given color
111
+ @function createFocus($color) {
112
+ @return color.adjust($color, $alpha: -0.75);
113
+ }
@@ -1,13 +1,22 @@
1
1
  @use "sass:list";
2
+ @use "sass:meta";
3
+
4
+ @mixin root() {
5
+ $host-selector: if($enable-host, ":host", ":root");
6
+
7
+ #{$host-selector} {
8
+ @content;
9
+ }
10
+ }
2
11
 
3
12
  /*******************************
4
13
  * Root variables extensions
5
14
  ********************************/
6
15
 
7
- :root {
16
+ @include root() {
8
17
  // define color variables
9
18
  @each $name, $color in $colors {
10
- @if type-of($color) == list {
19
+ @if meta.type-of($color) == list {
11
20
  --#{$prefix}#{$name}: #{list.nth($color, 1)};
12
21
  --#{$prefix}#{$name}-invert: #{list.nth($color, 2)};
13
22
  } @else {
@@ -22,6 +31,7 @@
22
31
  --#{$prefix}grey-light: #{$grey-light};
23
32
  --#{$prefix}grey-lighter: #{$grey-lighter};
24
33
  --#{$prefix}grey-dark: #{$grey-dark};
34
+ --#{$prefix}focus: #{createFocus($primary)};
25
35
 
26
36
  // define size variables
27
37
  @each $name, $size in $sizes {
@@ -4,6 +4,7 @@
4
4
 
5
5
  // Settings
6
6
  $prefix: "oruga-" !default;
7
+ $enable-host: false !default;
7
8
 
8
9
  // Animations
9
10
  $animation-speed: 150ms !default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oruga-ui/theme-oruga",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Default theme for Oruga",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -17,7 +17,7 @@
17
17
  ],
18
18
  "repository": {
19
19
  "type": "git",
20
- "url": "https://github.com/oruga-ui/theme-oruga.git"
20
+ "url": "git+https://github.com/oruga-ui/theme-oruga.git"
21
21
  },
22
22
  "bugs": {
23
23
  "url": "https://github.com/oruga-ui/theme-oruga/issues"
@@ -34,10 +34,10 @@
34
34
  "update": "ncu -u"
35
35
  },
36
36
  "devDependencies": {
37
- "@fortawesome/fontawesome-free": "6.5.2",
38
- "@oruga-ui/oruga-next": "^0.8.9",
37
+ "@oruga-ui/examples": "^0.9.0-pre.1",
38
+ "@oruga-ui/oruga-next": "^0.9.0-pre.1",
39
39
  "@rollup/plugin-typescript": "11.1.6",
40
- "@vitejs/plugin-vue": "5.0.4",
40
+ "@vitejs/plugin-vue": "5.0.5",
41
41
  "@vue/eslint-config-prettier": "^9.0.0",
42
42
  "@vue/eslint-config-typescript": "^13.0.0",
43
43
  "@vue/tsconfig": "^0.5.1",
@@ -46,25 +46,24 @@
46
46
  "core-js": "3.37.1",
47
47
  "eslint": "^8.57.0",
48
48
  "eslint-plugin-prettier": "^5.1.3",
49
- "eslint-plugin-vue": "^9.26.0",
49
+ "eslint-plugin-vue": "^9.27.0",
50
50
  "npm-check-updates": "^16.14.20",
51
- "postcss": "8.4.38",
52
- "prettier": "^3.2.5",
53
- "rimraf": "5.0.7",
54
- "rollup": "^4.17.2",
51
+ "postcss": "8.4.39",
52
+ "prettier": "^3.3.3",
53
+ "rimraf": "6.0.1",
54
+ "rollup": "^4.18.1",
55
55
  "rollup-plugin-copy": "3.5.0",
56
- "rollup-plugin-sass": "1.12.22",
57
- "sass": "1.77.2",
58
- "stylelint": "^16.5.0",
59
- "stylelint-config-recommended": "^14.0.0",
60
- "stylelint-config-recommended-scss": "^14.0.0",
61
- "stylelint-prettier": "^5.0.0",
62
- "stylelint-scss": "^6.3.0",
63
- "tslib": "2.6.2",
64
- "typescript": "5.4.5",
65
- "vite": "^5.2.11",
66
- "vue": "3.4.27",
67
- "vue-router": "4.3.2",
68
- "vue-tsc": "2.0.19"
56
+ "rollup-plugin-sass": "1.13.1",
57
+ "sass": "1.77.8",
58
+ "stylelint": "^16.7.0",
59
+ "stylelint-config-recommended": "^14.0.1",
60
+ "stylelint-config-recommended-scss": "^14.1.0",
61
+ "stylelint-prettier": "^5.0.1",
62
+ "stylelint-scss": "^6.4.1",
63
+ "typescript": "5.5.3",
64
+ "vite": "^5.3.3",
65
+ "vue": "^3.4.31",
66
+ "vue-router": "4.4.0",
67
+ "vue-tsc": "^2.0.26"
69
68
  }
70
69
  }
@@ -1,4 +1,5 @@
1
1
  /* @docs */
2
+ $autocomplete-item-hover-background-color: #f5f5f5 !default;
2
3
  /* @docs */
3
4
 
4
5
  .o-acp {
@@ -11,5 +12,12 @@
11
12
  &--empty {
12
13
  @extend .o-drop--disabled;
13
14
  }
15
+
16
+ &--hover {
17
+ background-color: var(
18
+ --#{$prefix}autocomplete-item-hover-background-color,
19
+ $autocomplete-item-hover-background-color
20
+ );
21
+ }
14
22
  }
15
23
  }
@@ -102,6 +102,8 @@ $button-outlined-background-color: transparent !default;
102
102
  $color-invert: list.nth($pair, 2);
103
103
 
104
104
  &--#{$name} {
105
+ --#{$prefix}focus: #{createFocus($color)};
106
+
105
107
  border-color: transparent;
106
108
  background-color: var(--#{$prefix}variant-#{$name}, $color);
107
109
  color: var(--#{$prefix}variant-invert-#{$name}, $color-invert);
@@ -140,6 +142,8 @@ $button-outlined-background-color: transparent !default;
140
142
  $color-invert: list.nth($pair, 2);
141
143
 
142
144
  &-#{$name} {
145
+ --#{$prefix}focus: #{createFocus($color)};
146
+
143
147
  background-color: var(
144
148
  --#{$prefix}button-outlined-background-color,
145
149
  $button-outlined-background-color
@@ -147,6 +151,7 @@ $button-outlined-background-color: transparent !default;
147
151
  border-color: var(--#{$prefix}variant-#{$name}, $color);
148
152
  color: var(--#{$prefix}variant-#{$name}, $color);
149
153
 
154
+ &:focus,
150
155
  &:hover {
151
156
  border-color: transparent;
152
157
  background-color: var(--#{$prefix}variant-#{$name}, $color);
@@ -192,6 +197,8 @@ $button-outlined-background-color: transparent !default;
192
197
  $color-invert: list.nth($pair, 2);
193
198
 
194
199
  &-#{$name} {
200
+ --#{$prefix}focus: #{createFocus($color)};
201
+
195
202
  background-color: var(
196
203
  --#{$prefix}variant-invert-#{$name},
197
204
  $color-invert
@@ -199,6 +206,7 @@ $button-outlined-background-color: transparent !default;
199
206
  border-color: var(--#{$prefix}variant-invert-#{$name}, $color-invert);
200
207
  color: var(--#{$prefix}variant-#{$name}, $color);
201
208
 
209
+ &:focus,
202
210
  &:hover {
203
211
  // background-color: darken($color-invert, 5%)
204
212
  // IE 11 needs polyfill
@@ -207,4 +215,11 @@ $button-outlined-background-color: transparent !default;
207
215
  }
208
216
  }
209
217
  }
218
+
219
+ // focus effect
220
+ &:focus,
221
+ &:focus-within {
222
+ box-shadow: 0 0 0 0.25rem var(--#{$prefix}focus);
223
+ outline: 0;
224
+ }
210
225
  }
@@ -139,7 +139,10 @@ $checkbox-line-height: 1.5 !default;
139
139
  @each $name, $pair in $colors {
140
140
  $color: list.nth($pair, 1);
141
141
  $color-invert: list.nth($pair, 2);
142
+
142
143
  &--#{$name} {
144
+ --#{$prefix}focus: #{createFocus($color)};
145
+
143
146
  .o-chk__input {
144
147
  border-color: var(--#{$prefix}variant-#{$name}, $color);
145
148
  background-color: var(--#{$prefix}variant-#{$name}, $color);
@@ -154,4 +157,10 @@ $checkbox-line-height: 1.5 !default;
154
157
  }
155
158
  }
156
159
  }
160
+
161
+ // focus effect
162
+ &:focus &__input,
163
+ &:focus-within &__input {
164
+ box-shadow: 0 0 0 0.25rem var(--#{$prefix}focus);
165
+ }
157
166
  }