@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
@@ -6,127 +6,128 @@ $field-label-font-weight: 600 !default;
6
6
  $field-margin-bottom: 0.75rem !default;
7
7
  $field-message-font-size: 0.75rem !default;
8
8
  $field-message-margin-top: 0.25rem !default;
9
- $field-margin-right: 0.37rem !default;
10
- $field-horizontal-label-margin: 0 1.5rem 0 0 !default;
9
+ $field-spacer: 0.5rem !default;
10
+ $field-horizontal-spacer: 0 1.5rem 0 0 !default;
11
11
  /* @docs */
12
12
 
13
13
  .o-field {
14
- flex-grow: 1;
15
-
16
- &:not(:last-child) {
17
- margin-bottom: var(--#{$prefix}field-margin-bottom, $field-margin-bottom);
18
- }
19
-
20
- &__label {
21
- display: block;
22
- color: var(--#{$prefix}field-label-color, $field-label-color);
23
- font-size: var(--#{$prefix}base-font-size, $base-font-size);
24
- font-weight: var(
25
- --#{$prefix}field-label-font-weight,
26
- $field-label-font-weight
27
- );
28
-
29
- @each $name, $value in $sizes {
30
- &-#{$name} {
31
- font-size: var(--#{$prefix}field-font-size-#{$name}, $value);
32
- }
33
- }
34
- }
35
-
36
- &__message {
37
- display: block;
38
- font-size: var(
39
- --#{$prefix}field-message-font-size,
40
- $field-message-font-size
41
- );
42
- margin-top: var(
43
- --#{$prefix}field-message-margin-top,
44
- $field-message-margin-top
45
- );
46
-
47
- @each $name, $pair in $colors {
48
- $color: list.nth($pair, 1);
49
- &-#{$name} {
50
- color: var(--#{$prefix}variant-#{$name}, $color);
51
- }
52
- }
53
- }
54
-
55
- &--addons {
56
- display: flex;
57
- justify-content: flex-start;
58
-
59
- > button:first-child,
60
- > *:first-child:not(:only-child) button,
61
- > input:first-child,
62
- > *:first-child:not(:only-child) input,
63
- > select:first-child,
64
- > *:first-child:not(:only-child) select {
65
- border-bottom-right-radius: 0;
66
- border-top-right-radius: 0;
67
- }
14
+ flex-grow: 1;
68
15
 
69
- > button:last-child,
70
- > *:last-child:not(:only-child) button,
71
- > input:last-child,
72
- > *:last-child:not(:only-child) input,
73
- > select:last-child,
74
- > *:last-child:not(:only-child) select {
75
- border-bottom-left-radius: 0;
76
- border-top-left-radius: 0;
16
+ &:not(:last-child) {
17
+ margin-bottom: var(
18
+ --#{$prefix}field-margin-bottom,
19
+ $field-margin-bottom
20
+ );
77
21
  }
78
22
 
79
- > *:not(:first-child):not(:last-child) button,
80
- > button:not(:first-child):not(:last-child),
81
- > *:not(:first-child):not(:last-child) input,
82
- > input:not(:first-child):not(:last-child),
83
- > *:not(:first-child):not(:last-child) select,
84
- > select:not(:first-child):not(:last-child) {
85
- border-radius: 0;
23
+ &__label {
24
+ display: block;
25
+ color: var(--#{$prefix}field-label-color, $field-label-color);
26
+ font-size: var(--#{$prefix}base-font-size, $base-font-size);
27
+ font-weight: var(
28
+ --#{$prefix}field-label-font-weight,
29
+ $field-label-font-weight
30
+ );
31
+
32
+ @each $name, $value in $sizes {
33
+ &--#{$name} {
34
+ font-size: var(--#{$prefix}field-font-size-#{$name}, $value);
35
+ }
36
+ }
86
37
  }
87
- }
88
38
 
89
- &--grouped {
90
- display: flex;
39
+ &__message {
40
+ display: block;
41
+ font-size: var(
42
+ --#{$prefix}field-message-font-size,
43
+ $field-message-font-size
44
+ );
45
+ margin-top: var(
46
+ --#{$prefix}field-message-margin-top,
47
+ $field-message-margin-top
48
+ );
49
+
50
+ @each $name, $pair in $colors {
51
+ $color: list.nth($pair, 1);
52
+ &--#{$name} {
53
+ color: var(--#{$prefix}variant-#{$name}, $color);
54
+ }
55
+ }
56
+ }
91
57
 
92
- @include side-flex-gap($field-margin-right);
93
- }
58
+ &--addons {
59
+ display: flex;
60
+ justify-content: flex-start;
61
+
62
+ > button:first-child,
63
+ > *:first-child:not(:only-child) button,
64
+ > input:first-child,
65
+ > *:first-child:not(:only-child) input,
66
+ > select:first-child,
67
+ > *:first-child:not(:only-child) select {
68
+ border-bottom-right-radius: 0;
69
+ border-top-right-radius: 0;
70
+ }
71
+
72
+ > button:last-child,
73
+ > *:last-child:not(:only-child) button,
74
+ > input:last-child,
75
+ > *:last-child:not(:only-child) input,
76
+ > select:last-child,
77
+ > *:last-child:not(:only-child) select {
78
+ border-bottom-left-radius: 0;
79
+ border-top-left-radius: 0;
80
+ }
81
+
82
+ > *:not(:first-child):not(:last-child) button,
83
+ > button:not(:first-child):not(:last-child),
84
+ > *:not(:first-child):not(:last-child) input,
85
+ > input:not(:first-child):not(:last-child),
86
+ > *:not(:first-child):not(:last-child) select,
87
+ > select:not(:first-child):not(:last-child) {
88
+ border-radius: 0;
89
+ }
90
+ }
94
91
 
95
- &--grouped-multiline {
96
- flex-wrap: wrap;
92
+ &--grouped {
93
+ display: flex;
94
+ gap: var(--#{$prefix}field-spacer, $field-spacer);
95
+ }
97
96
 
98
- &:last-child {
99
- margin-bottom: var(--#{$prefix}field-margin-bottom, $field-margin-bottom);
97
+ &--multiline {
98
+ display: flex;
99
+ flex-wrap: wrap;
100
+ gap: var(--#{$prefix}field-spacer, $field-spacer);
100
101
  }
101
- }
102
102
 
103
- &__horizontal-body {
104
- display: flex;
105
- flex-basis: 0;
106
- flex-grow: 5;
107
- flex-shrink: 1;
103
+ &__horizontal-body {
104
+ display: flex;
105
+ flex-basis: 0;
106
+ flex-grow: 5;
107
+ flex-shrink: 1;
108
+ }
108
109
 
109
- @include side-flex-gap($field-margin-right);
110
- }
110
+ &--horizontal {
111
+ display: flex;
112
+ }
111
113
 
112
- &--horizontal {
113
- display: flex;
114
- }
114
+ &__horizontal-label {
115
+ flex-basis: 0;
116
+ flex-grow: 1;
117
+ flex-shrink: 0;
118
+ margin: var(
119
+ --#{$prefix}field-horizontal-spacer,
120
+ $field-horizontal-spacer
121
+ );
122
+ text-align: right;
123
+ }
115
124
 
116
- &__horizontal-label {
117
- flex-basis: 0;
118
- flex-grow: 1;
119
- flex-shrink: 0;
120
- margin: $field-horizontal-label-margin;
121
- text-align: right;
122
- }
123
-
124
- &--mobile {
125
- &.o-field--horizontal,
126
- .o-field__horizontal-label,
127
- .o-field__horizontal-body {
128
- display: block;
129
- text-align: inherit;
125
+ &--mobile {
126
+ &.o-field--horizontal,
127
+ .o-field__horizontal-label,
128
+ .o-field__horizontal-body {
129
+ display: block;
130
+ text-align: inherit;
131
+ }
130
132
  }
131
- }
132
133
  }
@@ -5,49 +5,53 @@ $icon-spin-duration: 2s !default;
5
5
  /* @docs */
6
6
 
7
7
  @keyframes icon-spin {
8
- 0% {
9
- -webkit-transform: rotate(0deg);
10
- transform: rotate(0deg);
11
- }
12
-
13
- 100% {
14
- -webkit-transform: rotate(359deg);
15
- transform: rotate(359deg);
16
- }
8
+ 0% {
9
+ -webkit-transform: rotate(0deg);
10
+ transform: rotate(0deg);
11
+ }
12
+
13
+ 100% {
14
+ -webkit-transform: rotate(359deg);
15
+ transform: rotate(359deg);
16
+ }
17
17
  }
18
18
 
19
19
  .o-icon {
20
- align-items: center;
21
- display: inline-flex;
22
- justify-content: center;
23
- transition:
24
- transform $animation-speed $animation-timing,
25
- opacity $animation-speed-fast $animation-timing;
26
-
27
- @each $name, $value in $sizes {
28
- &--#{$name} {
29
- font-size: var(--#{$prefix}icon-font-size-#{$name}, $value);
20
+ align-items: center;
21
+ display: inline-flex;
22
+ justify-content: center;
23
+ transition:
24
+ transform $animation-speed $animation-timing,
25
+ opacity $animation-speed-fast $animation-timing;
26
+
27
+ // sizes
28
+ @each $name, $value in $sizes {
29
+ &--#{$name} {
30
+ font-size: var(--#{$prefix}icon-font-size-#{$name}, $value);
31
+ }
32
+ }
33
+
34
+ // color variants
35
+ @each $name, $pair in $colors {
36
+ $color: list.nth($pair, 1);
37
+
38
+ &--#{$name} {
39
+ color: var(--#{$prefix}variant-#{$name}, $color);
40
+ }
30
41
  }
31
- }
32
- @each $name, $pair in $colors {
33
- $color: list.nth($pair, 1);
34
- &--#{$name} {
35
- color: var(--#{$prefix}variant-#{$name}, $color);
42
+
43
+ &--clickable {
44
+ pointer-events: auto;
45
+ cursor: pointer;
46
+ }
47
+
48
+ &--spin {
49
+ animation-name: icon-spin;
50
+ animation-iteration-count: infinite;
51
+ animation-timing-function: linear;
52
+ animation-duration: var(
53
+ --#{$prefix}icon-spin-duration,
54
+ $icon-spin-duration
55
+ );
36
56
  }
37
- }
38
-
39
- &--clickable {
40
- pointer-events: auto;
41
- cursor: pointer;
42
- }
43
-
44
- &--spin {
45
- animation-name: icon-spin;
46
- animation-iteration-count: infinite;
47
- animation-timing-function: linear;
48
- animation-duration: var(
49
- --#{$prefix}icon-spin-duration,
50
- $icon-spin-duration
51
- );
52
- }
53
57
  }
@@ -7,7 +7,7 @@ $input-border-style: solid !default;
7
7
  $input-border-width: 1px !default;
8
8
  $input-border-radius: var(--#{$prefix}base-border-radius) !default;
9
9
  $input-rounded-border-radius: var(
10
- --#{$prefix}base-border-radius-rounded
10
+ --#{$prefix}base-border-radius-rounded
11
11
  ) !default;
12
12
  $input-box-shadow: $control-box-shadow !default;
13
13
  $input-color: #363636 !default;
@@ -17,133 +17,148 @@ $input-line-height: var(--#{$prefix}base-line-height) !default;
17
17
  $input-margin: 0 !default;
18
18
  $input-padding: $control-padding-vertical $control-padding-horizontal !default;
19
19
  $input-counter-font-size: 0.75rem !default;
20
- $input-counter-margin: 0.25rem 0 0 0.5rem !default;
20
+ $input-counter-margin: 0.25rem 0.5rem !default;
21
21
  $input-textarea-max-height: 600px !default;
22
22
  $input-textarea-min-height: 120px !default;
23
23
  $input-textarea-padding: 0.625em !default;
24
24
  /* @docs */
25
25
 
26
26
  .o-input {
27
- -moz-appearance: none;
28
- -webkit-appearance: none;
29
- display: inline-flex;
30
- position: relative;
31
- vertical-align: top;
32
-
33
- box-shadow: var(--#{$prefix}input-box-shadow, $input-box-shadow);
34
- background-color: var(
35
- --#{$prefix}input-background-color,
36
- $input-background-color
37
- );
38
- border-color: var(--#{$prefix}input-border-color, $input-border-color);
39
- border-style: var(--#{$prefix}input-border-style, $input-border-style);
40
- border-width: var(--#{$prefix}input-border-width, $input-border-width);
41
- border-radius: var(--#{$prefix}input-border-radius, $input-border-radius);
42
- color: var(--#{$prefix}input-color, $input-color);
43
- font-size: var(--#{$prefix}base-font-size, $base-font-size);
44
- height: var(--#{$prefix}input-height, $input-height);
45
- line-height: var(--#{$prefix}input-line-height, $input-line-height);
46
- padding: var(--#{$prefix}input-padding, $input-padding);
47
- margin: var(--#{$prefix}input-margin, $input-margin);
48
-
49
- &__wrapper {
50
27
  display: inline-block;
51
28
  position: relative;
52
29
 
53
- &--expanded {
54
- width: 100%;
55
- flex-grow: 1;
56
- flex-shrink: 1;
30
+ &__input {
31
+ -moz-appearance: none;
32
+ -webkit-appearance: none;
33
+ display: inline-flex;
34
+ position: relative;
35
+ vertical-align: top;
36
+
37
+ color: var(--#{$prefix}input-color, $input-color);
38
+ font-size: var(--#{$prefix}base-font-size, $base-font-size);
39
+ box-shadow: var(--#{$prefix}input-box-shadow, $input-box-shadow);
40
+ background-color: var(
41
+ --#{$prefix}input-background-color,
42
+ $input-background-color
43
+ );
44
+ border-color: var(--#{$prefix}input-border-color, $input-border-color);
45
+ border-style: var(--#{$prefix}input-border-style, $input-border-style);
46
+ border-width: var(--#{$prefix}input-border-width, $input-border-width);
47
+ border-radius: var(
48
+ --#{$prefix}input-border-radius,
49
+ $input-border-radius
50
+ );
51
+
52
+ height: var(--#{$prefix}input-height, $input-height);
53
+ line-height: var(--#{$prefix}input-line-height, $input-line-height);
54
+ padding: var(--#{$prefix}input-padding, $input-padding);
55
+ margin: var(--#{$prefix}input-margin, $input-margin);
56
+
57
+ &--iconspace-left {
58
+ padding-left: var(--#{$prefix}input-height, $input-height);
59
+ }
60
+
61
+ &--iconspace-right {
62
+ padding-right: var(--#{$prefix}input-height, $input-height);
63
+ }
64
+
65
+ &[disabled] {
66
+ cursor: inherit;
67
+ }
68
+ }
57
69
 
58
- .o-input {
59
- width: 100%;
60
- }
70
+ &--textarea textarea {
71
+ display: block;
72
+ max-width: 100%;
73
+ min-width: 100%;
74
+ height: auto;
75
+ resize: vertical;
76
+ padding: var(
77
+ --#{$prefix}input-textarea-padding,
78
+ $input-textarea-padding
79
+ );
80
+
81
+ &:not([rows]) {
82
+ max-height: var(
83
+ --#{$prefix}input-textarea-max-height,
84
+ $input-textarea-max-height
85
+ );
86
+ min-height: var(
87
+ --#{$prefix}input-textarea-min-height,
88
+ $input-textarea-min-height
89
+ );
90
+ }
61
91
  }
62
- }
63
-
64
- &__textarea {
65
- display: block;
66
- max-width: 100%;
67
- min-width: 100%;
68
- height: auto;
69
- resize: vertical;
70
- padding: var(--#{$prefix}input-textarea-padding, $input-textarea-padding);
71
-
72
- &:not([rows]) {
73
- max-height: var(
74
- --#{$prefix}input-textarea-max-height,
75
- $input-textarea-max-height
76
- );
77
- min-height: var(
78
- --#{$prefix}input-textarea-min-height,
79
- $input-textarea-min-height
80
- );
92
+
93
+ // size variants
94
+ @each $name, $value in $sizes {
95
+ &--#{$name} .o-input__input {
96
+ font-size: var(--#{$prefix}input-font-size-#{$name}, $value);
97
+ }
81
98
  }
82
- }
83
-
84
- &__counter {
85
- display: block;
86
- float: right;
87
- font-size: var(
88
- --#{$prefix}input-counter-font-size,
89
- $input-counter-font-size
90
- );
91
- margin: var(--#{$prefix}input-counter-margin, $input-counter-margin);
92
- }
93
-
94
- &__icon-left,
95
- &__icon-right {
96
- position: absolute;
97
- top: 0;
98
- height: 100%;
99
- width: var(--#{$prefix}input-height, $input-height);
100
- z-index: var(--#{$prefix}input-icon-zindex, $input-icon-zindex);
101
- }
102
-
103
- &__icon-right {
104
- right: 0;
105
- }
106
-
107
- &__icon-left {
108
- left: 0;
109
- }
110
-
111
- &--iconspace-left {
112
- padding-left: var(--#{$prefix}input-height, $input-height);
113
- }
114
-
115
- &--iconspace-right {
116
- padding-right: var(--#{$prefix}input-height, $input-height);
117
- }
118
-
119
- &--rounded {
120
- border-radius: var(
121
- --#{$prefix}input-rounded-border-radius,
122
- $input-rounded-border-radius
123
- );
124
- }
125
-
126
- // size variants
127
- @each $name, $value in $sizes {
128
- &--#{$name} {
129
- font-size: var(--#{$prefix}input-font-size-#{$name}, $value);
99
+
100
+ // colar variants
101
+ @each $name, $pair in $colors {
102
+ $color: list.nth($pair, 1);
103
+
104
+ &--#{$name} .o-input__input {
105
+ --#{$prefix}focus: #{createFocus($color)};
106
+
107
+ border-color: var(--#{$prefix}variant-#{$name}, $color);
108
+ }
130
109
  }
131
- }
132
110
 
133
- // colar variants
134
- @each $name, $pair in $colors {
135
- $color: list.nth($pair, 1);
111
+ &--rounded .o-input__input {
112
+ border-radius: var(
113
+ --#{$prefix}input-rounded-border-radius,
114
+ $input-rounded-border-radius
115
+ );
116
+ }
136
117
 
137
- &--#{$name} {
138
- --#{$prefix}focus: #{createFocus($color)};
118
+ &--expanded {
119
+ width: 100%;
120
+ flex-grow: 1;
121
+ flex-shrink: 1;
139
122
 
140
- border-color: var(--#{$prefix}variant-#{$name}, $color);
123
+ .o-input__input {
124
+ width: 100%;
125
+ }
141
126
  }
142
- }
143
127
 
144
- // focus effect
145
- &:focus,
146
- &:focus-within {
147
- box-shadow: 0 0 0 0.25rem var(--#{$prefix}focus);
148
- }
128
+ &__counter {
129
+ display: block;
130
+ float: right;
131
+ font-size: var(
132
+ --#{$prefix}input-counter-font-size,
133
+ $input-counter-font-size
134
+ );
135
+ margin: var(--#{$prefix}input-counter-margin, $input-counter-margin);
136
+ }
137
+
138
+ &__icon-left,
139
+ &__icon-right {
140
+ position: absolute;
141
+ top: 0;
142
+ height: 100%;
143
+ width: var(--#{$prefix}input-height, $input-height);
144
+ z-index: var(--#{$prefix}input-icon-zindex, $input-icon-zindex);
145
+ }
146
+
147
+ &__icon-right {
148
+ right: 0;
149
+ }
150
+
151
+ &__icon-left {
152
+ left: 0;
153
+ }
154
+
155
+ // focus effect
156
+ &:focus,
157
+ &:focus-visible,
158
+ &:focus-within {
159
+ .o-input__input {
160
+ box-shadow: 0 0 0 0.25rem var(--#{$prefix}focus);
161
+ outline: none;
162
+ }
163
+ }
149
164
  }
@@ -5,33 +5,36 @@ $loading-zindex: 29 !default;
5
5
  $loading-fullpage-zindex: 999 !default;
6
6
  /* @docs */
7
7
 
8
- .o-load {
9
- position: absolute;
10
- bottom: 0;
11
- left: 0;
12
- right: 0;
13
- top: 0;
14
- align-items: center;
15
- display: flex;
16
- justify-content: center;
17
- overflow: hidden;
18
- z-index: var(--#{$prefix}loading-zindex, $loading-zindex);
19
-
20
- &--fullpage {
21
- position: fixed;
22
- z-index: var(--#{$prefix}loading-fullpage-zindex, $loading-fullpage-zindex);
23
- }
24
-
25
- &__overlay {
8
+ .o-loading {
26
9
  position: absolute;
27
10
  bottom: 0;
28
11
  left: 0;
29
12
  right: 0;
30
13
  top: 0;
31
- background: var(
32
- --#{$prefix}loading-overlay-legacy,
33
- $loading-overlay-legacy
34
- );
35
- background: var(--#{$prefix}loading-overlay, $loading-overlay);
36
- }
14
+ align-items: center;
15
+ display: flex;
16
+ justify-content: center;
17
+ overflow: hidden;
18
+ z-index: var(--#{$prefix}loading-zindex, $loading-zindex);
19
+
20
+ &--fullpage {
21
+ position: fixed;
22
+ z-index: var(
23
+ --#{$prefix}loading-fullpage-zindex,
24
+ $loading-fullpage-zindex
25
+ );
26
+ }
27
+
28
+ &__overlay {
29
+ position: absolute;
30
+ bottom: 0;
31
+ left: 0;
32
+ right: 0;
33
+ top: 0;
34
+ background: var(
35
+ --#{$prefix}loading-overlay-legacy,
36
+ $loading-overlay-legacy
37
+ );
38
+ background: var(--#{$prefix}loading-overlay, $loading-overlay);
39
+ }
37
40
  }