@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.
- package/README.md +5 -4
- package/dist/oruga.css +2 -2
- package/dist/scss/components/_autocomplete.scss +16 -16
- package/dist/scss/components/_breadcrumb.scss +189 -0
- package/dist/scss/components/_button.scss +180 -166
- package/dist/scss/components/_carousel.scss +199 -177
- package/dist/scss/components/_checkbox.scss +130 -122
- package/dist/scss/components/_collapse.scss +11 -9
- package/dist/scss/components/_datepicker.scss +409 -417
- package/dist/scss/components/_datetimepicker.scss +8 -8
- package/dist/scss/components/_dropdown.scss +225 -207
- package/dist/scss/components/_field.scss +107 -106
- package/dist/scss/components/_icon.scss +44 -40
- package/dist/scss/components/_input.scss +127 -112
- package/dist/scss/components/_loading.scss +27 -24
- package/dist/scss/components/_menu.scss +102 -65
- package/dist/scss/components/_modal.scss +67 -67
- package/dist/scss/components/_notification.scss +146 -134
- package/dist/scss/components/_pagination.scss +227 -198
- package/dist/scss/components/_radio.scss +95 -74
- package/dist/scss/components/_select.scss +143 -120
- package/dist/scss/components/_sidebar.scss +120 -104
- package/dist/scss/components/_skeleton.scss +55 -55
- package/dist/scss/components/_slider.scss +166 -151
- package/dist/scss/components/_steps.scss +300 -287
- package/dist/scss/components/_switch.scss +115 -128
- package/dist/scss/components/_table.scss +364 -331
- package/dist/scss/components/_tabs.scss +295 -280
- package/dist/scss/components/_tag.scss +84 -0
- package/dist/scss/components/_taginput.scss +55 -97
- package/dist/scss/components/_timepicker.scss +74 -68
- package/dist/scss/components/_tooltip.scss +522 -424
- package/dist/scss/components/_upload.scss +51 -48
- package/dist/scss/oruga.scss +2 -1
- package/dist/scss/utils/_animations.scss +97 -97
- package/dist/scss/utils/_base.scss +33 -16
- package/dist/scss/utils/_helpers.scss +65 -65
- package/dist/scss/utils/_root.scss +37 -44
- package/dist/scss/utils/_variables.scss +45 -44
- package/dist/theme.js +1 -1
- package/package.json +29 -26
|
@@ -16,18 +16,18 @@
|
|
|
16
16
|
/// Replacement. Default is ''.
|
|
17
17
|
/// @return {string} string with characters replaced.
|
|
18
18
|
@function str-replace($string, $search, $replace: "") {
|
|
19
|
-
|
|
19
|
+
$index: string.index($string, $search);
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
@return if(
|
|
22
|
+
$index,
|
|
23
|
+
string.slice($string, 1, $index - 1) + $replace +
|
|
24
|
+
str-replace(
|
|
25
|
+
string.slice($string, $index + string.length($search)),
|
|
26
|
+
$search,
|
|
27
|
+
$replace
|
|
28
|
+
),
|
|
29
|
+
$string
|
|
30
|
+
);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
/// Encodes an inline svg. Original source code: http://codepen.io/jakob-e/pen/doMoML
|
|
@@ -36,78 +36,78 @@
|
|
|
36
36
|
/// Inline svg to encode
|
|
37
37
|
/// @return {string} encoded svg.
|
|
38
38
|
@function svg-encode($svg) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
// Chunk up string in order to avoid "stack level too deep" error
|
|
40
|
+
$encoded: "";
|
|
41
|
+
$slice: 2000;
|
|
42
|
+
$index: 0;
|
|
43
|
+
$loops: math.ceil(divide(string.length($svg), $slice));
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
45
|
+
@for $i from 1 through $loops {
|
|
46
|
+
$chunk: string.slice($svg, $index, $index + $slice - 1);
|
|
47
|
+
// Encode
|
|
48
|
+
$chunk: str-replace($chunk, '"', "'");
|
|
49
|
+
$chunk: str-replace($chunk, "%", "%25");
|
|
50
|
+
$chunk: str-replace($chunk, "#", "%23");
|
|
51
|
+
$chunk: str-replace($chunk, "{", "%7B");
|
|
52
|
+
$chunk: str-replace($chunk, "}", "%7D");
|
|
53
|
+
$chunk: str-replace($chunk, "<", "%3C");
|
|
54
|
+
$chunk: str-replace($chunk, ">", "%3E");
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
$encoded: #{$encoded}#{$chunk};
|
|
57
|
+
$index: $index + $slice;
|
|
58
|
+
}
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
@return "data:image/svg+xml,#{$encoded}";
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
@mixin unselectable {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
-webkit-touch-callout: none;
|
|
65
|
+
-webkit-user-select: none;
|
|
66
|
+
-moz-user-select: none;
|
|
67
|
+
-ms-user-select: none;
|
|
68
|
+
user-select: none;
|
|
69
69
|
}
|
|
70
70
|
@mixin side-flex-gap($gap) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
//flex-wrap: wrap;
|
|
72
|
+
margin-left: -$gap;
|
|
73
|
+
margin-right: -$gap;
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
& > * {
|
|
76
|
+
margin-left: $gap;
|
|
77
|
+
margin-right: $gap;
|
|
78
|
+
}
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
// Custom divide function by @mdo from https://github.com/twbs/bootstrap/pull/34245
|
|
82
82
|
// Replaces old slash division deprecated in Dart Sass
|
|
83
83
|
@function divide($dividend, $divisor, $precision: 10) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
84
|
+
$sign: if($dividend > 0 and $divisor > 0, 1, -1);
|
|
85
|
+
$dividend: math.abs($dividend);
|
|
86
|
+
$divisor: math.abs($divisor);
|
|
87
|
+
$quotient: 0;
|
|
88
|
+
$remainder: $dividend;
|
|
89
|
+
@if $dividend == 0 {
|
|
90
|
+
@return 0;
|
|
91
|
+
}
|
|
92
|
+
@if $divisor == 0 {
|
|
93
|
+
@error "Cannot divide by 0";
|
|
94
|
+
}
|
|
95
|
+
@if $divisor == 1 {
|
|
96
|
+
@return $dividend;
|
|
97
|
+
}
|
|
98
98
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
99
|
+
@while $remainder >= $divisor {
|
|
100
|
+
$quotient: $quotient + 1;
|
|
101
|
+
$remainder: $remainder - $divisor;
|
|
102
|
+
}
|
|
103
|
+
@if $remainder > 0 and $precision > 0 {
|
|
104
|
+
$remainder: divide($remainder * 10, $divisor, $precision - 1) * 0.1;
|
|
105
|
+
}
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
@return ($quotient + $remainder) * $sign;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
// create a focus color based on a given color
|
|
111
111
|
@function createFocus($color) {
|
|
112
|
-
|
|
112
|
+
@return color.adjust($color, $alpha: -0.75);
|
|
113
113
|
}
|
|
@@ -1,54 +1,47 @@
|
|
|
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
|
-
}
|
|
11
|
-
|
|
12
1
|
/*******************************
|
|
13
2
|
* Root variables extensions
|
|
14
3
|
********************************/
|
|
4
|
+
@use "sass:list";
|
|
5
|
+
@use "sass:meta";
|
|
15
6
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
7
|
+
$host-selector: if($enable-host, ":root, :host", ":root");
|
|
8
|
+
|
|
9
|
+
#{$host-selector} {
|
|
10
|
+
// define color variables
|
|
11
|
+
@each $name, $color in $colors {
|
|
12
|
+
@if meta.type-of($color) == list {
|
|
13
|
+
--#{$prefix}#{$name}: #{list.nth($color, 1)};
|
|
14
|
+
--#{$prefix}#{$name}-invert: #{list.nth($color, 2)};
|
|
15
|
+
} @else {
|
|
16
|
+
--#{$prefix}#{$name}: $color;
|
|
17
|
+
}
|
|
24
18
|
}
|
|
25
|
-
}
|
|
26
19
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
20
|
+
// define additional colors
|
|
21
|
+
--#{$prefix}white: #{$white};
|
|
22
|
+
--#{$prefix}black: #{$black};
|
|
23
|
+
--#{$prefix}grey: #{$grey};
|
|
24
|
+
--#{$prefix}grey-light: #{$grey-light};
|
|
25
|
+
--#{$prefix}grey-lighter: #{$grey-lighter};
|
|
26
|
+
--#{$prefix}grey-dark: #{$grey-dark};
|
|
27
|
+
--#{$prefix}focus: #{createFocus($primary)};
|
|
28
|
+
|
|
29
|
+
// define size variables
|
|
30
|
+
@each $name, $size in $sizes {
|
|
31
|
+
--#{$prefix}size-#{$name}: #{$size};
|
|
32
|
+
}
|
|
40
33
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
34
|
+
// define base variables
|
|
35
|
+
--#{$prefix}base-font-family: #{$base-font-family};
|
|
36
|
+
--#{$prefix}base-font-size: #{$base-font-size};
|
|
37
|
+
--#{$prefix}base-font-weight: #{$base-font-weight};
|
|
38
|
+
--#{$prefix}base-line-height: #{$base-line-height};
|
|
46
39
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
40
|
+
--#{$prefix}base-border-radius: #{$base-border-radius};
|
|
41
|
+
--#{$prefix}base-border-radius-rounded: #{$base-border-radius-rounded};
|
|
42
|
+
--#{$prefix}base-line-height: #{$base-line-height};
|
|
43
|
+
--#{$prefix}base-disabled-opacity: #{$base-disabled-opacity};
|
|
51
44
|
|
|
52
|
-
|
|
53
|
-
|
|
45
|
+
--#{$prefix}transition-duration: #{$animation-speed};
|
|
46
|
+
--#{$prefix}transition-timing: #{$animation-timing};
|
|
54
47
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
// Settings
|
|
6
6
|
$prefix: "oruga-" !default;
|
|
7
|
-
$enable-host:
|
|
7
|
+
$enable-host: true !default;
|
|
8
8
|
|
|
9
9
|
// Animations
|
|
10
10
|
$animation-speed: 150ms !default;
|
|
@@ -14,22 +14,22 @@ $animation-timing: ease-out !default;
|
|
|
14
14
|
// Font
|
|
15
15
|
$base-font-family:
|
|
16
16
|
// Cross-platform generic font family (default user interface font)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
17
|
+
system-ui,
|
|
18
|
+
// Safari for macOS and iOS (San Francisco)
|
|
19
|
+
-apple-system,
|
|
20
|
+
// Windows
|
|
21
|
+
"Segoe UI",
|
|
22
|
+
// Android
|
|
23
|
+
Roboto,
|
|
24
|
+
// older macOS and iOS
|
|
25
|
+
"Helvetica Neue",
|
|
26
|
+
// Linux
|
|
27
|
+
"Noto Sans",
|
|
28
|
+
"Liberation Sans",
|
|
29
|
+
// Basic web fallback
|
|
30
|
+
Arial,
|
|
31
|
+
// Sans serif fallback
|
|
32
|
+
sans-serif !default;
|
|
33
33
|
$base-font-size: 1rem !default;
|
|
34
34
|
$base-font-weight: 400 !default;
|
|
35
35
|
$base-line-height: 1.5 !default;
|
|
@@ -40,6 +40,7 @@ $base-border-radius-rounded: 9999px !default;
|
|
|
40
40
|
$base-line-height: 1.5 !default;
|
|
41
41
|
$base-disabled-opacity: 0.5 !default;
|
|
42
42
|
|
|
43
|
+
$control-brackground-color: #f5f5f5 !default;
|
|
43
44
|
$control-border-width: 1px !default;
|
|
44
45
|
$control-height: 2.25em !default;
|
|
45
46
|
$control-padding-vertical: calc(0.25em - #{$control-border-width});
|
|
@@ -48,9 +49,9 @@ $control-box-shadow: inset 0 1px 2px hsla(0, 0%, 4%, 0.1);
|
|
|
48
49
|
|
|
49
50
|
// Sizes
|
|
50
51
|
$sizes: (
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
"small": 0.75rem,
|
|
53
|
+
"medium": 1.25rem,
|
|
54
|
+
"large": 1.5rem,
|
|
54
55
|
) !default;
|
|
55
56
|
|
|
56
57
|
// Colors
|
|
@@ -76,28 +77,28 @@ $danger: #b60000 !default;
|
|
|
76
77
|
$danger-invert: $white !default;
|
|
77
78
|
|
|
78
79
|
$colors: (
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
80
|
+
"primary": (
|
|
81
|
+
$primary,
|
|
82
|
+
$primary-invert,
|
|
83
|
+
),
|
|
84
|
+
"secondary": (
|
|
85
|
+
$secondary,
|
|
86
|
+
$secondary-invert,
|
|
87
|
+
),
|
|
88
|
+
"success": (
|
|
89
|
+
$success,
|
|
90
|
+
$success-invert,
|
|
91
|
+
),
|
|
92
|
+
"info": (
|
|
93
|
+
$info,
|
|
94
|
+
$info-invert,
|
|
95
|
+
),
|
|
96
|
+
"warning": (
|
|
97
|
+
$warning,
|
|
98
|
+
$warning-invert,
|
|
99
|
+
),
|
|
100
|
+
"danger": (
|
|
101
|
+
$danger,
|
|
102
|
+
$danger-invert,
|
|
103
|
+
),
|
|
103
104
|
) !default;
|
package/dist/theme.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! Oruga Default Theme v0.
|
|
1
|
+
/*! Oruga Default Theme v0.7.0 | MIT License | github.com/oruga-ui/theme-oruga */
|
|
2
2
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oruga-ui/theme-oruga",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Default theme for Oruga",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -30,33 +30,36 @@
|
|
|
30
30
|
"update": "ncu -u"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@oruga-ui/oruga-next": "^0.
|
|
33
|
+
"@oruga-ui/oruga-next": "^0.11.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@
|
|
37
|
-
"@oruga-ui/
|
|
38
|
-
"@
|
|
39
|
-
"@
|
|
40
|
-
"@
|
|
36
|
+
"@eslint/compat": "^1.3.0",
|
|
37
|
+
"@oruga-ui/examples": "0.11.0",
|
|
38
|
+
"@oruga-ui/oruga-next": "0.11.0",
|
|
39
|
+
"@tsconfig/node22": "^22.0.2",
|
|
40
|
+
"@types/node": "^24.0.1",
|
|
41
|
+
"@vitejs/plugin-vue": "5.2.4",
|
|
42
|
+
"@vue/eslint-config-prettier": "^10.2.0",
|
|
43
|
+
"@vue/eslint-config-typescript": "^14.5.0",
|
|
41
44
|
"@vue/tsconfig": "^0.7.0",
|
|
42
|
-
"core-js": "3.
|
|
43
|
-
"eslint": "^9.
|
|
44
|
-
"eslint-plugin-prettier": "^5.
|
|
45
|
-
"eslint-plugin-vue": "^
|
|
46
|
-
"npm-check-updates": "^
|
|
47
|
-
"prettier": "^3.
|
|
48
|
-
"sass": "1.
|
|
49
|
-
"stylelint": "^16.
|
|
50
|
-
"stylelint-config-recommended": "^
|
|
51
|
-
"stylelint-config-recommended-scss": "^
|
|
52
|
-
"stylelint-prettier": "^5.0.
|
|
53
|
-
"stylelint-scss": "^6.
|
|
54
|
-
"typescript": "5.
|
|
55
|
-
"vite": "^6.
|
|
56
|
-
"vite-plugin-banner": "^0.8.
|
|
57
|
-
"vite-plugin-static-copy": "^
|
|
58
|
-
"vue": "^3.5.
|
|
59
|
-
"vue-router": "4.5.
|
|
60
|
-
"vue-tsc": "^2.2.
|
|
45
|
+
"core-js": "3.43.0",
|
|
46
|
+
"eslint": "^9.29.0",
|
|
47
|
+
"eslint-plugin-prettier": "^5.4.1",
|
|
48
|
+
"eslint-plugin-vue": "^10.2.0",
|
|
49
|
+
"npm-check-updates": "^18.0.1",
|
|
50
|
+
"prettier": "^3.5.3",
|
|
51
|
+
"sass": "1.89.2",
|
|
52
|
+
"stylelint": "^16.20.0",
|
|
53
|
+
"stylelint-config-recommended": "^16.0.0",
|
|
54
|
+
"stylelint-config-recommended-scss": "^15.0.1",
|
|
55
|
+
"stylelint-prettier": "^5.0.3",
|
|
56
|
+
"stylelint-scss": "^6.12.1",
|
|
57
|
+
"typescript": "5.8.3",
|
|
58
|
+
"vite": "^6.3.5",
|
|
59
|
+
"vite-plugin-banner": "^0.8.1",
|
|
60
|
+
"vite-plugin-static-copy": "^3.0.2",
|
|
61
|
+
"vue": "^3.5.16",
|
|
62
|
+
"vue-router": "4.5.1",
|
|
63
|
+
"vue-tsc": "^2.2.10"
|
|
61
64
|
}
|
|
62
65
|
}
|