@ainias42/react-bootstrap-mobile 1.0.6 → 1.0.7
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/.storybook/preview.ts +3 -1
- package/dist/Components/Flavor.d.ts +4 -4
- package/dist/Components/FlavorWithText.d.ts +19 -0
- package/dist/Components/Icon/BaseIcon.d.ts +4 -1
- package/dist/Components/Icon/DoubleIcon.d.ts +3 -2
- package/dist/Components/Icon/DoubleIcon.stories.d.ts +1 -1
- package/dist/Components/Icon/Icon.stories.d.ts +1 -1
- package/dist/Components/Image/Image.d.ts +1 -1
- package/dist/Components/Layout/Grow.d.ts +1 -1
- package/dist/Components/Menu/Menu.d.ts +2 -1
- package/dist/Components/Menu/MenuItem.d.ts +5 -3
- package/dist/Components/Menu/MenuItem.stories.d.ts +1 -1
- package/dist/Components/Menu/Submenu.d.ts +3 -2
- package/dist/Components/Menu/Submenu.stories.d.ts +1 -1
- package/dist/index.css +10 -10
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +48 -33
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/Components/ActionSheet/actionSheet.module.scss +3 -3
- package/src/Components/Card/card.module.scss +1 -0
- package/src/Components/Dialog/ButtonDialog.tsx +1 -1
- package/src/Components/Dialog/dialog.module.scss +1 -1
- package/src/Components/Flavor.ts +4 -4
- package/src/Components/FlavorWithText.ts +11 -0
- package/src/Components/FormElements/Button/Button.stories.tsx +4 -4
- package/src/Components/FormElements/Button/Button.tsx +1 -1
- package/src/Components/FormElements/ColorInput/colorInput.module.scss +2 -2
- package/src/Components/FormElements/SearchSelectInput/seachSelectInput.module.scss +1 -1
- package/src/Components/Icon/BaseIcon.tsx +7 -2
- package/src/Components/Icon/DoubleIcon.stories.tsx +3 -2
- package/src/Components/Icon/DoubleIcon.tsx +6 -5
- package/src/Components/Icon/Icon.stories.tsx +4 -2
- package/src/Components/Icon/icon.module.scss +6 -0
- package/src/Components/Image/Image.tsx +1 -1
- package/src/Components/Layout/Container.tsx +5 -5
- package/src/Components/Layout/Grid/grid.module.scss +8 -8
- package/src/Components/Layout/Grow.tsx +1 -1
- package/src/Components/Layout/container.module.scss +15 -14
- package/src/Components/Menu/Menu.stories.tsx +3 -2
- package/src/Components/Menu/Menu.tsx +7 -6
- package/src/Components/Menu/MenuItem.tsx +7 -4
- package/src/Components/Menu/Submenu.tsx +4 -3
- package/src/Components/Text/text.module.scss +1 -0
- package/src/Components/Title/Title.stories.tsx +3 -2
- package/src/Components/Toast/toast.module.scss +1 -1
- package/src/Components/TopBar/topBar.module.scss +1 -1
- package/src/index.ts +1 -0
- package/src/scss/_colors.scss +33 -0
- package/src/scss/_default.scss +1 -0
- package/src/scss/_firstUpper.scss +5 -0
- package/src/scss/_flavorMixin.scss +24 -4
- package/src/scss/_variables.scss +2 -2
- package/src/scss/breakpoints.scss +19 -18
- package/tsconfig.json +1 -0
package/src/scss/_colors.scss
CHANGED
|
@@ -23,6 +23,31 @@
|
|
|
23
23
|
--text-link: #0d6efd; // No Tailwind
|
|
24
24
|
--text-inverse: #ffffff; // white
|
|
25
25
|
--opacity-disabled: 0.3;
|
|
26
|
+
--text-primary-default-color: var(--text-primary);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
%color-vars-dark {
|
|
30
|
+
--flavor-basic: #a3a3a3; // Neutral 400
|
|
31
|
+
--flavor-pale-basic: #737373; // Neutral 500
|
|
32
|
+
--flavor-constructive: #15803d; // Green 700
|
|
33
|
+
--flavor-pale-constructive: #86efac; // Green 300
|
|
34
|
+
--flavor-destructive: #dc2626; // Red 600
|
|
35
|
+
--flavor-pale-destructive: #fca5a5; // Red 300
|
|
36
|
+
--curtain-light: rgb(0 0 0 / 40%);
|
|
37
|
+
--curtain-strong: rgb(0 0 0 / 80%);
|
|
38
|
+
--foreground-primary: #292524; // Stone 800
|
|
39
|
+
--foreground-secondary: #44403c; // Stone 700
|
|
40
|
+
--foreground-tertiary: #57534e; // Stone 600
|
|
41
|
+
--border-light: #52525b; // Zinc 600
|
|
42
|
+
--border-strong: #71717a; // Neutral 500
|
|
43
|
+
--text-primary: #f1f5f9; // Slate 100
|
|
44
|
+
--text-secondary: #cbd5e1; // Slate 300
|
|
45
|
+
--text-tertiary: #94a3b8; // Slate 400
|
|
46
|
+
--text-disabled: #cbd5e1; // Slate 300
|
|
47
|
+
--text-link: #0d6efd; // No Tailwind
|
|
48
|
+
--text-inverse: #0f172a; // Slate 900
|
|
49
|
+
--opacity-disabled: 0.3;
|
|
50
|
+
--text-primary-default-color: var(--text-primary);
|
|
26
51
|
}
|
|
27
52
|
|
|
28
53
|
.#{$material} {
|
|
@@ -30,6 +55,10 @@
|
|
|
30
55
|
|
|
31
56
|
--flavor-accent: #37474f;
|
|
32
57
|
--box-shadow-color: rgb(0 0 0 / 20%);
|
|
58
|
+
|
|
59
|
+
&.dark {
|
|
60
|
+
@extend %color-vars-dark;
|
|
61
|
+
}
|
|
33
62
|
}
|
|
34
63
|
|
|
35
64
|
.#{$flat} {
|
|
@@ -38,4 +67,8 @@
|
|
|
38
67
|
--flavor-accent: #2563eb; // blue 600
|
|
39
68
|
--flavor-pale-accent: #93c5fd; // blue 300
|
|
40
69
|
--box-shadow-color: rgb(0 0 0 / 12%);
|
|
70
|
+
|
|
71
|
+
&.dark {
|
|
72
|
+
@extend %color-vars-dark;
|
|
73
|
+
}
|
|
41
74
|
}
|
package/src/scss/_default.scss
CHANGED
|
@@ -1,19 +1,39 @@
|
|
|
1
1
|
@use 'sass:selector';
|
|
2
2
|
|
|
3
3
|
@mixin flavorSelection($varName) {
|
|
4
|
-
&:global(.
|
|
4
|
+
&:global(.flavorAccent) {
|
|
5
5
|
#{$varName}: var(--flavor-accent);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
&:global(.
|
|
8
|
+
&:global(.flavorBasic) {
|
|
9
9
|
#{$varName}: var(--flavor-basic);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
&:global(.
|
|
12
|
+
&:global(.flavorDestructive) {
|
|
13
13
|
#{$varName}: var(--flavor-destructive);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
&:global(.
|
|
16
|
+
&:global(.flavorConstructive) {
|
|
17
17
|
#{$varName}: var(--flavor-constructive);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
+
|
|
21
|
+
@mixin flavorWithTextSelection($varName) {
|
|
22
|
+
@include flavorSelection($varName);
|
|
23
|
+
|
|
24
|
+
&:global(.textPrimary) {
|
|
25
|
+
#{$varName}: var(--text-primary);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&:global(.textSecondary) {
|
|
29
|
+
#{$varName}: var(--text-secondary);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&:global(.textTertiary) {
|
|
33
|
+
#{$varName}: var(--text-tertiary);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&:global(.textInverse) {
|
|
37
|
+
#{$varName}: var(--text-inverse);
|
|
38
|
+
}
|
|
39
|
+
}
|
package/src/scss/_variables.scss
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
@use "sass:map";
|
|
2
2
|
@use "sass:list";
|
|
3
3
|
@use "variables";
|
|
4
|
+
@use "./firstUpper" as *;
|
|
4
5
|
|
|
5
|
-
@function
|
|
6
|
+
@function breakpointMin($name, $breakpoints: variables.$gridBreakpoints) {
|
|
6
7
|
$min: map.get($breakpoints, $name);
|
|
7
8
|
|
|
8
9
|
@return if($min != 0, $min, null);
|
|
9
10
|
}
|
|
10
11
|
|
|
11
|
-
@mixin
|
|
12
|
-
$min:
|
|
12
|
+
@mixin mediaBreakpointUp($name, $breakpoints: variables.$gridBreakpoints) {
|
|
13
|
+
$min: breakpointMin($name, $breakpoints);
|
|
13
14
|
|
|
14
15
|
@if $min {
|
|
15
16
|
@media (min-width: $min) {
|
|
@@ -20,34 +21,34 @@
|
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
|
|
23
|
-
@function
|
|
24
|
-
@return if(
|
|
24
|
+
@function breakpointInfix($name, $breakpoints: variables.$gridBreakpoints) {
|
|
25
|
+
@return if(breakpointMin($name, $breakpoints) == null, "", "#{firstUpper($name)}");
|
|
25
26
|
}
|
|
26
27
|
|
|
27
|
-
@function
|
|
28
|
-
$n: list.index($
|
|
28
|
+
@function breakpointNext($name, $breakpoints: variables.$gridBreakpoints, $breakpointNames: map.keys($breakpoints)) {
|
|
29
|
+
$n: list.index($breakpointNames, $name);
|
|
29
30
|
|
|
30
31
|
@if not $n {
|
|
31
32
|
@error "breakpoint `#{$name}` not found in `#{$breakpoints}`";
|
|
32
33
|
}
|
|
33
34
|
|
|
34
|
-
@return if($n < list.length($
|
|
35
|
+
@return if($n < list.length($breakpointNames), list.nth($breakpointNames, $n + 1), null);
|
|
35
36
|
}
|
|
36
37
|
|
|
37
|
-
@function
|
|
38
|
+
@function breakpointMin($name, $breakpoints: variables.$gridBreakpoints) {
|
|
38
39
|
$min: map.get($breakpoints, $name);
|
|
39
40
|
|
|
40
41
|
@return if($min != 0, $min, null);
|
|
41
42
|
}
|
|
42
43
|
|
|
43
|
-
@function
|
|
44
|
+
@function breakpointMax($name, $breakpoints: variables.$gridBreakpoints) {
|
|
44
45
|
$max: map.get($breakpoints, $name);
|
|
45
46
|
|
|
46
47
|
@return if($max and $max > 0, $max - .02, null);
|
|
47
48
|
}
|
|
48
49
|
|
|
49
|
-
@mixin
|
|
50
|
-
$max:
|
|
50
|
+
@mixin mediaBreakpointDown($name, $breakpoints: variables.$gridBreakpoints) {
|
|
51
|
+
$max: breakpointMax($name, $breakpoints);
|
|
51
52
|
|
|
52
53
|
@if $max {
|
|
53
54
|
@media (max-width: $max) {
|
|
@@ -58,21 +59,21 @@
|
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
61
|
|
|
61
|
-
@mixin
|
|
62
|
-
$min:
|
|
63
|
-
$next:
|
|
64
|
-
$max:
|
|
62
|
+
@mixin mediaBreakpointOnly($name, $breakpoints: variables.$gridBreakpoints) {
|
|
63
|
+
$min: breakpointMin($name, $breakpoints);
|
|
64
|
+
$next: breakpointNext($name, $breakpoints);
|
|
65
|
+
$max: breakpointMax($next, $breakpoints);
|
|
65
66
|
|
|
66
67
|
@if $min != null and $max != null {
|
|
67
68
|
@media (min-width: $min) and (max-width: $max) {
|
|
68
69
|
@content;
|
|
69
70
|
}
|
|
70
71
|
} @else if $max == null {
|
|
71
|
-
@include
|
|
72
|
+
@include mediaBreakpointUp($name, $breakpoints) {
|
|
72
73
|
@content;
|
|
73
74
|
}
|
|
74
75
|
} @else if $min == null {
|
|
75
|
-
@include
|
|
76
|
+
@include mediaBreakpointDown($next, $breakpoints) {
|
|
76
77
|
@content;
|
|
77
78
|
}
|
|
78
79
|
}
|