@yoga-tech/canvas-core 1.2.0 → 1.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.
- package/dist/storybook/{166.12f9ed2fff67eba93071.iframe.bundle.js → 519.39c40b18084e24e405b7.iframe.bundle.js} +3 -3
- package/dist/storybook/{166.12f9ed2fff67eba93071.iframe.bundle.js.map → 519.39c40b18084e24e405b7.iframe.bundle.js.map} +1 -1
- package/dist/storybook/757.644dd6f20eae95eb8499.iframe.bundle.js +2 -0
- package/dist/storybook/757.644dd6f20eae95eb8499.iframe.bundle.js.LICENSE.txt +5 -0
- package/dist/storybook/855.08bbe451abd9f2c23c60.iframe.bundle.js +402 -0
- package/dist/storybook/{458.14ab76c3020a0945373e.iframe.bundle.js.map → 855.08bbe451abd9f2c23c60.iframe.bundle.js.map} +1 -1
- package/dist/storybook/components-Button-Button-stories.293b6498bd1800b4a113.iframe.bundle.js +1 -0
- package/dist/storybook/components-Button-DefaultButton-DefaultButton-stories.878adbdde96f372c3a76.iframe.bundle.js +1 -0
- package/dist/storybook/iframe.html +3 -3
- package/dist/storybook/index.json +1 -1
- package/dist/storybook/main.9632c3cf2caddff9b1f4.iframe.bundle.js +1 -0
- package/dist/storybook/project.json +1 -1
- package/dist/storybook/runtime~main.2b500279776a3cae2f0c.iframe.bundle.js +1 -0
- package/dist/storybook/stories-Icons-Functional-stories.5632983e33a9bac1a72d.iframe.bundle.js +1 -0
- package/lib/Button.d.ts +16 -1
- package/lib/Button.js +1 -1
- package/lib/CanvasStyles.css +1 -1
- package/lib/CanvasThemeProvider.css +5 -0
- package/lib/CanvasThemeProvider.js +1 -1
- package/lib/IconBell.js +1 -1
- package/lib/IconBlog.js +1 -1
- package/lib/IconCalendar.js +1 -1
- package/lib/IconChat.js +1 -1
- package/lib/IconContacts.js +1 -1
- package/lib/IconCrypto.js +1 -1
- package/lib/IconDownarrow.js +1 -1
- package/lib/IconEcom.js +1 -1
- package/lib/IconEmail.js +1 -1
- package/lib/IconFilemanager.js +1 -1
- package/lib/IconFullScreen.js +1 -1
- package/lib/IconHome.js +1 -1
- package/lib/IconInvoices.js +1 -1
- package/lib/IconList.js +1 -1
- package/lib/IconProject.js +1 -1
- package/lib/IconSettings.js +1 -1
- package/lib/IconTask.js +1 -1
- package/lib/scss/CanvasSCSS.scss +3 -3
- package/lib/scss/CanvasStyles.scss +6 -0
- package/lib/scss/theme/_buttons.scss +114 -0
- package/lib/scss/variables/_variables.scss +210 -0
- package/package.json +5 -3
- package/dist/storybook/458.14ab76c3020a0945373e.iframe.bundle.js +0 -402
- package/dist/storybook/components-Button-Button-stories.def13f6d9de68a380102.iframe.bundle.js +0 -1
- package/dist/storybook/main.5e5ab27495747751488e.iframe.bundle.js +0 -1
- package/dist/storybook/runtime~main.41ea90aaf222305387f6.iframe.bundle.js +0 -1
- package/dist/storybook/stories-Icons-Functional-stories.ebea43716112516a9f3a.iframe.bundle.js +0 -1
- /package/dist/storybook/{166.12f9ed2fff67eba93071.iframe.bundle.js.LICENSE.txt → 519.39c40b18084e24e405b7.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/dist/storybook/{458.14ab76c3020a0945373e.iframe.bundle.js.LICENSE.txt → 855.08bbe451abd9f2c23c60.iframe.bundle.js.LICENSE.txt} +0 -0
package/lib/scss/CanvasSCSS.scss
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
//Core files
|
|
2
|
-
@import '../../../../node_modules/bootstrap/scss/functions';
|
|
3
|
-
@import '../../../../node_modules/bootstrap/scss/bootstrap';
|
|
4
|
-
@import '../../../../node_modules/bootstrap/scss/mixins.scss';
|
|
2
|
+
// @import '../../../../node_modules/bootstrap/scss/functions';
|
|
3
|
+
// @import '../../../../node_modules/bootstrap/scss/bootstrap';
|
|
4
|
+
// @import '../../../../node_modules/bootstrap/scss/mixins.scss';
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
// styles
|
|
2
|
+
@import '../../../../node_modules/bootstrap/scss/functions';
|
|
3
|
+
@import '../../../../node_modules/bootstrap/scss/variables';
|
|
4
|
+
@import 'variables/variables';
|
|
5
|
+
@import '../../../../node_modules/bootstrap/scss/mixins';
|
|
6
|
+
|
|
2
7
|
@import 'theme/base.scss';
|
|
3
8
|
@import 'theme/layers';
|
|
9
|
+
@import 'theme/buttons';
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
//
|
|
2
|
+
// _buttons.scss
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
button,
|
|
6
|
+
a {
|
|
7
|
+
outline: none !important;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// Rounded Buttons
|
|
11
|
+
.btn-rounded {
|
|
12
|
+
border-radius: 30px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// example 1
|
|
16
|
+
|
|
17
|
+
.btn-group-example {
|
|
18
|
+
.btn {
|
|
19
|
+
position: relative;
|
|
20
|
+
|
|
21
|
+
&:first-child {
|
|
22
|
+
&::before {
|
|
23
|
+
display: none;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&:before {
|
|
28
|
+
content: "OR";
|
|
29
|
+
position: absolute;
|
|
30
|
+
font-size: 10px;
|
|
31
|
+
width: 24px;
|
|
32
|
+
height: 24px;
|
|
33
|
+
line-height: 24px;
|
|
34
|
+
border-radius: 50%;
|
|
35
|
+
background-color: $gray-600;
|
|
36
|
+
color: $light;
|
|
37
|
+
border: 1px solid $white;
|
|
38
|
+
left: -12px;
|
|
39
|
+
top: 50%;
|
|
40
|
+
transform: translateY(-50%);
|
|
41
|
+
z-index: 1;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Example 2
|
|
47
|
+
|
|
48
|
+
.btn-label {
|
|
49
|
+
position: relative;
|
|
50
|
+
padding-left: 44px;
|
|
51
|
+
.label-icon {
|
|
52
|
+
position: absolute;
|
|
53
|
+
width: 32px;
|
|
54
|
+
height: 100%;
|
|
55
|
+
left: 0;
|
|
56
|
+
top: 0;
|
|
57
|
+
background-color: rgba($white, 0.1);
|
|
58
|
+
border-right: 1px solid rgba($white, 0.1);
|
|
59
|
+
font-size: 16px;
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
}
|
|
64
|
+
&.btn-light {
|
|
65
|
+
.label-icon {
|
|
66
|
+
background-color: rgba($dark, 0.1);
|
|
67
|
+
border-right: 1px solid rgba($dark, 0.2);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
.btn-group-vertical{
|
|
74
|
+
label {
|
|
75
|
+
margin-bottom: 0px;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
//
|
|
81
|
+
// Soft Buttons
|
|
82
|
+
//
|
|
83
|
+
|
|
84
|
+
@mixin button-variant-soft($bg) {
|
|
85
|
+
color: $bg;
|
|
86
|
+
background-color: rgba($bg, 0.1);
|
|
87
|
+
border-color: transparent;
|
|
88
|
+
transition: all 0.5s ease;
|
|
89
|
+
&:hover,
|
|
90
|
+
&:focus,
|
|
91
|
+
&:active {
|
|
92
|
+
color: $white;
|
|
93
|
+
background-color: $bg;
|
|
94
|
+
border-color: transparent;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@each $color,
|
|
99
|
+
$value in $theme-colors {
|
|
100
|
+
.btn-soft-#{$color} {
|
|
101
|
+
@include button-variant-soft($value);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.like-btn {
|
|
106
|
+
&.active {
|
|
107
|
+
.bx-heart {
|
|
108
|
+
color: $danger;
|
|
109
|
+
&:before {
|
|
110
|
+
content: "\ec8f";
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
// Prefix for :root CSS variables
|
|
2
|
+
|
|
3
|
+
$variable-prefix: bs-; // Deprecated in v5.2.0 for the shorter `$prefix`
|
|
4
|
+
$prefix: $variable-prefix;
|
|
5
|
+
|
|
6
|
+
// scss-docs-start gray-color-variables
|
|
7
|
+
$white: #fff;
|
|
8
|
+
$gray-100: #f8f9fa;
|
|
9
|
+
$gray-200: #eff2f7;
|
|
10
|
+
$gray-300: #f6f6f6;
|
|
11
|
+
$gray-400: #ced4da;
|
|
12
|
+
$gray-500: #adb5bd;
|
|
13
|
+
$gray-600: #74788d;
|
|
14
|
+
$gray-700: #495057;
|
|
15
|
+
$gray-800: #343a40;
|
|
16
|
+
$gray-900: #212529;
|
|
17
|
+
$black: #000;
|
|
18
|
+
// scss-docs-end gray-color-variables
|
|
19
|
+
|
|
20
|
+
// fusv-disable
|
|
21
|
+
// scss-docs-start gray-colors-map
|
|
22
|
+
$grays: (
|
|
23
|
+
'100': $gray-100,
|
|
24
|
+
'200': $gray-200,
|
|
25
|
+
'300': $gray-300,
|
|
26
|
+
'400': $gray-400,
|
|
27
|
+
'500': $gray-500,
|
|
28
|
+
'600': $gray-600,
|
|
29
|
+
'700': $gray-700,
|
|
30
|
+
'800': $gray-800,
|
|
31
|
+
'900': $gray-900,
|
|
32
|
+
);
|
|
33
|
+
// scss-docs-end gray-colors-map
|
|
34
|
+
// fusv-enable
|
|
35
|
+
|
|
36
|
+
// scss-docs-start color-variables
|
|
37
|
+
$blue: #556ee6;
|
|
38
|
+
$indigo: #564ab1;
|
|
39
|
+
$purple: #6f42c1;
|
|
40
|
+
$pink: #e83e8c;
|
|
41
|
+
$red: #f46a6a;
|
|
42
|
+
$orange: #f1734f;
|
|
43
|
+
$yellow: #f1b44c;
|
|
44
|
+
$green: #34c38f;
|
|
45
|
+
$teal: #050505;
|
|
46
|
+
$cyan: #50a5f1;
|
|
47
|
+
// scss-docs-end color-variables
|
|
48
|
+
|
|
49
|
+
// scss-docs-start colors-map
|
|
50
|
+
$colors: (
|
|
51
|
+
'blue': $blue,
|
|
52
|
+
'indigo': $indigo,
|
|
53
|
+
'purple': $purple,
|
|
54
|
+
'pink': $pink,
|
|
55
|
+
'red': $red,
|
|
56
|
+
'orange': $orange,
|
|
57
|
+
'yellow': $yellow,
|
|
58
|
+
'green': $green,
|
|
59
|
+
'teal': $teal,
|
|
60
|
+
'cyan': $cyan,
|
|
61
|
+
'black': $black,
|
|
62
|
+
'white': $white,
|
|
63
|
+
'gray': $gray-600,
|
|
64
|
+
'gray-dark': $gray-800,
|
|
65
|
+
);
|
|
66
|
+
// scss-docs-end colors-map
|
|
67
|
+
|
|
68
|
+
// scss-docs-start theme-color-variables
|
|
69
|
+
$primary: $blue;
|
|
70
|
+
$secondary: $gray-600;
|
|
71
|
+
$success: $green;
|
|
72
|
+
$info: $cyan;
|
|
73
|
+
$warning: $yellow;
|
|
74
|
+
$danger: $red;
|
|
75
|
+
$light: $gray-200;
|
|
76
|
+
$dark: $gray-800;
|
|
77
|
+
// scss-docs-end theme-color-variables
|
|
78
|
+
|
|
79
|
+
$theme-colors: (
|
|
80
|
+
'primary': $primary,
|
|
81
|
+
'secondary': $secondary,
|
|
82
|
+
'success': $success,
|
|
83
|
+
'info': $info,
|
|
84
|
+
'warning': $warning,
|
|
85
|
+
'danger': $danger,
|
|
86
|
+
'pink': $pink,
|
|
87
|
+
'light': $light,
|
|
88
|
+
'dark': $dark,
|
|
89
|
+
);
|
|
90
|
+
|
|
91
|
+
// scss-docs-start theme-colors-map
|
|
92
|
+
$theme-colors-rgb: ();
|
|
93
|
+
|
|
94
|
+
@each $name, $color in $theme-colors {
|
|
95
|
+
$theme-colors-rgb: map-merge(
|
|
96
|
+
$theme-colors-rgb,
|
|
97
|
+
(
|
|
98
|
+
$name: to-rgb($color),
|
|
99
|
+
)
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
$font-weight-lighter: lighter;
|
|
104
|
+
$font-weight-light: 300;
|
|
105
|
+
$font-weight-normal: 400;
|
|
106
|
+
$font-weight-semibold: 600;
|
|
107
|
+
$font-weight-bold: 600;
|
|
108
|
+
$font-weight-bolder: bolder;
|
|
109
|
+
|
|
110
|
+
// scss-docs-start border-variables
|
|
111
|
+
$border-width: 1px;
|
|
112
|
+
// scss-docs-start border-radius-variables
|
|
113
|
+
$border-radius: 0.25rem;
|
|
114
|
+
$border-radius-sm: 0.2rem;
|
|
115
|
+
$border-radius-lg: 0.4rem;
|
|
116
|
+
$border-radius-xl: 1rem;
|
|
117
|
+
$border-radius-2xl: 2rem;
|
|
118
|
+
$border-radius-pill: 50rem;
|
|
119
|
+
|
|
120
|
+
$font-size-base: 0.8125rem;
|
|
121
|
+
$font-size-sm: $font-size-base * 0.875;
|
|
122
|
+
$font-size-lg: $font-size-base * 1.25;
|
|
123
|
+
$line-height-base: 1.5;
|
|
124
|
+
$line-height-sm: 1.25;
|
|
125
|
+
$line-height-lg: 2;
|
|
126
|
+
$component-active-bg: $primary;
|
|
127
|
+
|
|
128
|
+
// Buttons + Forms
|
|
129
|
+
//
|
|
130
|
+
// Shared variables that are reassigned to `$input-` and `$btn-` specific variables.
|
|
131
|
+
|
|
132
|
+
// scss-docs-start input-btn-variables
|
|
133
|
+
$input-btn-padding-y: 0.47rem;
|
|
134
|
+
$input-btn-padding-x: 0.75rem;
|
|
135
|
+
$input-btn-font-family: null;
|
|
136
|
+
$input-btn-font-size: $font-size-base;
|
|
137
|
+
$input-btn-line-height: $line-height-base;
|
|
138
|
+
|
|
139
|
+
$input-btn-focus-width: 0.15rem;
|
|
140
|
+
$input-btn-focus-color-opacity: 0.25;
|
|
141
|
+
$input-btn-focus-color: rgba($component-active-bg, $input-btn-focus-color-opacity);
|
|
142
|
+
$input-btn-focus-blur: 0;
|
|
143
|
+
$input-btn-focus-box-shadow: 0 0 0 $input-btn-focus-width $input-btn-focus-color;
|
|
144
|
+
|
|
145
|
+
$input-btn-padding-y-sm: 0.25rem;
|
|
146
|
+
$input-btn-padding-x-sm: 0.5rem;
|
|
147
|
+
$input-btn-font-size-sm: $font-size-sm;
|
|
148
|
+
|
|
149
|
+
$input-btn-padding-y-lg: 0.5rem;
|
|
150
|
+
$input-btn-padding-x-lg: 1rem;
|
|
151
|
+
$input-btn-font-size-lg: $font-size-lg;
|
|
152
|
+
|
|
153
|
+
$input-btn-border-width: $border-width;
|
|
154
|
+
// scss-docs-end input-btn-variables
|
|
155
|
+
|
|
156
|
+
// Buttons
|
|
157
|
+
//
|
|
158
|
+
// For each of Bootstrap's buttons, define text, background, and border color.
|
|
159
|
+
|
|
160
|
+
// scss-docs-start btn-variables
|
|
161
|
+
$btn-padding-y: $input-btn-padding-y;
|
|
162
|
+
$btn-padding-x: $input-btn-padding-x;
|
|
163
|
+
$btn-font-family: $input-btn-font-family;
|
|
164
|
+
$btn-font-size: $input-btn-font-size;
|
|
165
|
+
$btn-line-height: $input-btn-line-height;
|
|
166
|
+
$btn-white-space: null; // Set to `nowrap` to prevent text wrapping
|
|
167
|
+
|
|
168
|
+
$btn-padding-y-sm: $input-btn-padding-y-sm;
|
|
169
|
+
$btn-padding-x-sm: $input-btn-padding-x-sm;
|
|
170
|
+
$btn-font-size-sm: $input-btn-font-size-sm;
|
|
171
|
+
|
|
172
|
+
$btn-padding-y-lg: $input-btn-padding-y-lg;
|
|
173
|
+
$btn-padding-x-lg: $input-btn-padding-x-lg;
|
|
174
|
+
$btn-font-size-lg: $input-btn-font-size-lg;
|
|
175
|
+
|
|
176
|
+
$btn-border-width: $input-btn-border-width;
|
|
177
|
+
|
|
178
|
+
$btn-font-weight: $font-weight-normal;
|
|
179
|
+
$btn-box-shadow:
|
|
180
|
+
inset 0 1px 0 rgba($white, 0.15),
|
|
181
|
+
0 1px 1px rgba($black, 0.075);
|
|
182
|
+
$btn-focus-width: $input-btn-focus-width;
|
|
183
|
+
$btn-focus-box-shadow: $input-btn-focus-box-shadow;
|
|
184
|
+
$btn-disabled-opacity: 0.65;
|
|
185
|
+
$btn-active-box-shadow: inset 0 3px 5px rgba($black, 0.125);
|
|
186
|
+
|
|
187
|
+
$btn-link-color: var(--#{$prefix}link-color);
|
|
188
|
+
$btn-link-hover-color: var(--#{$prefix}link-hover-color);
|
|
189
|
+
$btn-link-disabled-color: $gray-600;
|
|
190
|
+
|
|
191
|
+
// Allows for customizing button radius independently from global border radius
|
|
192
|
+
$btn-border-radius: $border-radius;
|
|
193
|
+
$btn-border-radius-sm: $border-radius-sm;
|
|
194
|
+
$btn-border-radius-lg: $border-radius-lg;
|
|
195
|
+
|
|
196
|
+
$btn-transition:
|
|
197
|
+
color 0.15s ease-in-out,
|
|
198
|
+
background-color 0.15s ease-in-out,
|
|
199
|
+
border-color 0.15s ease-in-out,
|
|
200
|
+
box-shadow 0.15s ease-in-out;
|
|
201
|
+
|
|
202
|
+
$btn-hover-bg-shade-amount: 15%;
|
|
203
|
+
$btn-hover-bg-tint-amount: 15%;
|
|
204
|
+
$btn-hover-border-shade-amount: 20%;
|
|
205
|
+
$btn-hover-border-tint-amount: 10%;
|
|
206
|
+
$btn-active-bg-shade-amount: 20%;
|
|
207
|
+
$btn-active-bg-tint-amount: 20%;
|
|
208
|
+
$btn-active-border-shade-amount: 25%;
|
|
209
|
+
$btn-active-border-tint-amount: 10%;
|
|
210
|
+
// scss-docs-end btn-variables
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yoga-tech/canvas-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"author": "Thineshraj <thinesh7474@gmail.com>",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -35,10 +35,11 @@
|
|
|
35
35
|
"publish:npm": "node publish.js"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@yoga-tech/canvas-theme": "1.0
|
|
38
|
+
"@yoga-tech/canvas-theme": "1.2.0",
|
|
39
39
|
"bootstrap": "^5.3.3",
|
|
40
40
|
"react": "^18.3.1",
|
|
41
|
-
"react-dom": "^18.3.1"
|
|
41
|
+
"react-dom": "^18.3.1",
|
|
42
|
+
"reactstrap": "^9.2.2"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
44
45
|
"@babel/cli": "^7.24.7",
|
|
@@ -82,6 +83,7 @@
|
|
|
82
83
|
"style-loader": "^4.0.0",
|
|
83
84
|
"styled-components": "^6.1.11",
|
|
84
85
|
"terser-webpack-plugin": "^5.3.10",
|
|
86
|
+
"url-loader": "^4.1.1",
|
|
85
87
|
"webpack": "^5.92.1",
|
|
86
88
|
"webpack-bundle-analyzer": "^4.10.2",
|
|
87
89
|
"webpack-cli": "^5.1.4"
|