@celar-ui/svelte 0.0.4 → 0.0.5
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/package.json +4 -2
- package/src/styles/colors.scss +45 -0
- package/src/styles/config.scss +1 -0
- package/src/styles/misc.scss +15 -0
- package/src/styles/spacing.scss +23 -0
- package/src/styles/utils.scss +27 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celar-ui/svelte",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "cuikho210",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
23
|
"dist",
|
|
24
|
+
"src/styles",
|
|
24
25
|
"!dist/**/*.test.*",
|
|
25
26
|
"!dist/**/*.spec.*"
|
|
26
27
|
],
|
|
@@ -34,7 +35,8 @@
|
|
|
34
35
|
".": {
|
|
35
36
|
"types": "./dist/index.d.ts",
|
|
36
37
|
"svelte": "./dist/index.js"
|
|
37
|
-
}
|
|
38
|
+
},
|
|
39
|
+
"./styles": "./src/styles/*.scss"
|
|
38
40
|
},
|
|
39
41
|
"peerDependencies": {
|
|
40
42
|
"svelte": "^5.0.0"
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
@use './utils.scss';
|
|
2
|
+
@use './config.scss';
|
|
3
|
+
|
|
4
|
+
$colors-theme: (
|
|
5
|
+
color-primary--text: #570000,
|
|
6
|
+
color-primary--darker: #962c0f,
|
|
7
|
+
color-primary--dark: #ff907f,
|
|
8
|
+
color-primary: #ffc5b3,
|
|
9
|
+
color-primary--light: #ffe5dc,
|
|
10
|
+
color-primary--lighter: #fff6f3,
|
|
11
|
+
|
|
12
|
+
color-alt--text: #481523,
|
|
13
|
+
color-alt--darker: #8f1538,
|
|
14
|
+
color-alt--dark: #c48591,
|
|
15
|
+
color-alt: #f1afbb,
|
|
16
|
+
color-alt--light: #ffe3ec,
|
|
17
|
+
color-alt--lighter: #fff3f7,
|
|
18
|
+
|
|
19
|
+
color-text: #000000,
|
|
20
|
+
color-text-info: #1a3baa,
|
|
21
|
+
color-text-success: #438d75,
|
|
22
|
+
color-text-warning: #c18500,
|
|
23
|
+
color-text-danger: #98000b,
|
|
24
|
+
|
|
25
|
+
color-bg: #ffffff,
|
|
26
|
+
color-bg-info: #faf8ff,
|
|
27
|
+
color-bg-success: #e8fef5,
|
|
28
|
+
color-bg-warning: #fff8ec,
|
|
29
|
+
color-bg-danger: #fff4ef
|
|
30
|
+
) !default;
|
|
31
|
+
|
|
32
|
+
$colors-misc: (
|
|
33
|
+
color-shadow--soft: rgba(0, 0, 0, 0.05),
|
|
34
|
+
color-shadow--md: rgba(0, 0, 0, 0.075),
|
|
35
|
+
color-shadow: rgba(0, 0, 0, 0.1),
|
|
36
|
+
color-shadow--strong: rgba(0, 0, 0, 0.16),
|
|
37
|
+
color-border: rgba(var(--color-text--rgb), 0.07),
|
|
38
|
+
color-border--strong: rgba(var(--color-text--rgb), 0.1),
|
|
39
|
+
color-wrapper: rgba(var(--color-text--rgb), 0.024)
|
|
40
|
+
) !default;
|
|
41
|
+
|
|
42
|
+
:root {
|
|
43
|
+
@include utils.generate_colors(config.$prefix, $colors-theme);
|
|
44
|
+
@include utils.add_prefix(config.$prefix, $colors-misc);
|
|
45
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
$prefix: '';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@use './utils.scss';
|
|
2
|
+
@use './config.scss';
|
|
3
|
+
|
|
4
|
+
$misc: (
|
|
5
|
+
radius: 16px,
|
|
6
|
+
radius--half: 8px,
|
|
7
|
+
blur-length--x2: 8px,
|
|
8
|
+
blur-length: 4px,
|
|
9
|
+
transition-dur: 150ms,
|
|
10
|
+
transition-dur--long: 300ms
|
|
11
|
+
) !default;
|
|
12
|
+
|
|
13
|
+
:root {
|
|
14
|
+
@include utils.add_prefix(config.$prefix, $misc);
|
|
15
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
@use './utils.scss';
|
|
2
|
+
@use './config.scss';
|
|
3
|
+
|
|
4
|
+
$spacing: (
|
|
5
|
+
gap--x3: 3rem,
|
|
6
|
+
gap--x2: 2rem,
|
|
7
|
+
gap: 1rem,
|
|
8
|
+
gap--md: 0.7rem,
|
|
9
|
+
gap--half: 0.5rem,
|
|
10
|
+
gap--sm: 0.3rem,
|
|
11
|
+
gap--xs: 0.1rem
|
|
12
|
+
) !default;
|
|
13
|
+
|
|
14
|
+
$breaking: (
|
|
15
|
+
break--xs: 540px,
|
|
16
|
+
break--sm: 960px,
|
|
17
|
+
break--md: 1320px
|
|
18
|
+
) !default;
|
|
19
|
+
|
|
20
|
+
:root {
|
|
21
|
+
@include utils.add_prefix(config.$prefix, $spacing);
|
|
22
|
+
@include utils.add_prefix(config.$prefix, $breaking);
|
|
23
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@use 'sass:string';
|
|
2
|
+
@use 'sass:color';
|
|
3
|
+
|
|
4
|
+
@function convertHexToRGB($hex) {
|
|
5
|
+
@return color.channel($hex, 'red', $space: rgb), color.channel($hex, 'green', $space: rgb),
|
|
6
|
+
color.channel($hex, 'blue', $space: rgb);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@mixin generate_colors($prefix, $colors) {
|
|
10
|
+
// Colors, RGB Colors
|
|
11
|
+
@each $color, $value in $colors {
|
|
12
|
+
@if string.slice(#{$value}, 1, 1) == '#' {
|
|
13
|
+
--#{$prefix}#{$color}: #{$value};
|
|
14
|
+
--#{$prefix}#{$color}--rgb: #{convertHexToRGB($value)};
|
|
15
|
+
} @else {
|
|
16
|
+
--#{$prefix}#{$color}: var(--#{$value});
|
|
17
|
+
--#{$prefix}#{$color}--rgb: var(--#{$value}--rgb);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@mixin add_prefix($prefix, $vars) {
|
|
23
|
+
// Colors, RGB Colors
|
|
24
|
+
@each $var, $value in $vars {
|
|
25
|
+
--#{$prefix}#{$var}: #{$value};
|
|
26
|
+
}
|
|
27
|
+
} ;
|