@enki-tek/fms-web-components 0.0.1 → 0.0.3
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 +1 -1
- package/app.scss +1 -1
- package/components/Accordion/Accordion.scss +30 -0
- package/components/Accordion/Accordion.stories.d.ts +20 -0
- package/components/Accordion/Accordion.stories.js +30 -0
- package/components/Accordion/Accordion.svelte +617 -0
- package/components/Accordion/Accordion.svelte.d.ts +17 -0
- package/components/Alert/Alert.scss +25 -0
- package/components/Alert/Alert.stories.d.ts +54 -0
- package/components/Alert/Alert.stories.js +46 -0
- package/components/Alert/Alert.svelte +29 -0
- package/components/Alert/Alert.svelte.d.ts +19 -0
- package/components/Badge/Badge.scss +8 -0
- package/components/Badge/Badge.stories.d.ts +75 -0
- package/components/Badge/Badge.stories.js +55 -0
- package/components/Badge/Badge.svelte +587 -0
- package/components/Badge/Badge.svelte.d.ts +17 -0
- package/components/Badge/BadgeConfig.d.ts +10 -0
- package/components/Badge/BadgeConfig.js +34 -0
- package/components/Breadcrumb/Breadcrumb.scss +26 -0
- package/components/Breadcrumb/Breadcrumb.stories.d.ts +23 -0
- package/components/Breadcrumb/Breadcrumb.stories.js +20 -0
- package/components/Breadcrumb/Breadcrumb.svelte +603 -0
- package/components/Breadcrumb/Breadcrumb.svelte.d.ts +16 -0
- package/components/Button/Button.scss +706 -0
- package/components/Button/Button.stories.d.ts +96 -27
- package/components/Button/Button.stories.js +99 -38
- package/components/Button/Button.svelte +1125 -10
- package/components/Button/Button.svelte.d.ts +43 -9
- package/components/Button/buttonConfig.d.ts +38 -0
- package/components/Button/buttonConfig.js +203 -0
- package/components/Card/Card.scss +39 -0
- package/components/Card/Card.stories.d.ts +59 -0
- package/components/Card/Card.stories.js +42 -0
- package/components/Card/Card.svelte +123 -0
- package/components/Card/Card.svelte.d.ts +51 -0
- package/components/CheckBox/Checkbox.scss +32 -0
- package/components/CheckBox/Checkbox.stories.d.ts +94 -0
- package/components/CheckBox/Checkbox.stories.js +51 -0
- package/components/CheckBox/Checkbox.svelte +614 -0
- package/components/CheckBox/Checkbox.svelte.d.ts +31 -0
- package/components/Dropdown/Dropdown.scss +72 -0
- package/components/Dropdown/Dropdown.stories.d.ts +29 -0
- package/components/Dropdown/Dropdown.stories.js +19 -0
- package/components/Dropdown/Dropdown.svelte +646 -0
- package/components/Dropdown/Dropdown.svelte.d.ts +17 -0
- package/components/Header/Header.scss +54 -0
- package/components/Header/Header.stories.d.ts +28 -0
- package/components/Header/Header.stories.js +28 -0
- package/components/Header/Header.svelte +667 -0
- package/components/Header/Header.svelte.d.ts +27 -0
- package/components/Icon/Icon.scss +0 -0
- package/components/Icon/Icon.stories.d.ts +21 -0
- package/components/Icon/Icon.stories.js +18 -0
- package/components/Icon/Icon.svelte +7 -0
- package/components/Icon/Icon.svelte.d.ts +23 -0
- package/components/ModalWindow/Modal.scss +28 -0
- package/components/ModalWindow/Modal.stories.d.ts +29 -0
- package/components/ModalWindow/Modal.stories.js +20 -0
- package/components/ModalWindow/Modal.svelte +641 -0
- package/components/ModalWindow/Modal.svelte.d.ts +23 -0
- package/components/Pagination/Pagination.scss +83 -0
- package/components/Pagination/Pagination.stories.d.ts +29 -0
- package/components/Pagination/Pagination.stories.js +18 -0
- package/components/Pagination/Pagination.svelte +702 -0
- package/components/Pagination/Pagination.svelte.d.ts +18 -0
- package/components/RadioButton/RadioButton.scss +28 -0
- package/components/RadioButton/RadioButton.stories.d.ts +35 -0
- package/components/RadioButton/RadioButton.stories.js +25 -0
- package/components/RadioButton/RadioButton.svelte +616 -0
- package/components/RadioButton/RadioButton.svelte.d.ts +41 -0
- package/components/Sidebar/Sidebar.scss +87 -0
- package/components/Sidebar/Sidebar.stories.d.ts +28 -0
- package/components/Sidebar/Sidebar.stories.js +27 -0
- package/components/Sidebar/Sidebar.svelte +144 -0
- package/components/Sidebar/Sidebar.svelte.d.ts +31 -0
- package/components/Switches/Switch.scss +12 -0
- package/components/Switches/Switch.stories.d.ts +87 -0
- package/components/Switches/Switch.stories.js +50 -0
- package/components/Switches/Switch.svelte +595 -0
- package/components/Switches/Switch.svelte.d.ts +29 -0
- package/components/Tab/Tab.scss +30 -0
- package/components/Tab/Tab.stories.d.ts +23 -0
- package/components/Tab/Tab.stories.js +19 -0
- package/components/Tab/Tab.svelte +615 -0
- package/components/Tab/Tab.svelte.d.ts +19 -0
- package/components/Table/Table.scss +38 -0
- package/components/Table/Table.stories.d.ts +28 -0
- package/components/Table/Table.stories.js +21 -0
- package/components/Table/Table.svelte +137 -0
- package/components/Table/Table.svelte.d.ts +35 -0
- package/components/Tooltip/Tooltip.scss +29 -0
- package/components/Tooltip/Tooltip.stories.d.ts +40 -0
- package/components/Tooltip/Tooltip.stories.js +24 -0
- package/components/Tooltip/Tooltip.svelte +622 -0
- package/components/Tooltip/Tooltip.svelte.d.ts +21 -0
- package/components/common.scss +789 -0
- package/components/textField/TextField.scss +34 -0
- package/components/textField/TextField.stories.d.ts +85 -0
- package/components/textField/TextField.stories.js +32 -0
- package/components/textField/TextField.svelte +607 -0
- package/components/textField/TextField.svelte.d.ts +33 -0
- package/components/variable.scss +134 -0
- package/index.d.ts +17 -1
- package/index.js +17 -1
- package/package.json +60 -1
@@ -1,19 +1,53 @@
|
|
1
|
+
/** @typedef {typeof __propDef.props} ButtonProps */
|
2
|
+
/** @typedef {typeof __propDef.events} ButtonEvents */
|
3
|
+
/** @typedef {typeof __propDef.slots} ButtonSlots */
|
4
|
+
export default class Button extends SvelteComponentTyped<{
|
5
|
+
type?: string | undefined;
|
6
|
+
label?: string | undefined;
|
7
|
+
config?: string | undefined;
|
8
|
+
icon?: {
|
9
|
+
state: boolean;
|
10
|
+
name: string;
|
11
|
+
position: string;
|
12
|
+
} | undefined;
|
13
|
+
shade?: string | undefined;
|
14
|
+
outlineShade?: string | undefined;
|
15
|
+
}, {
|
16
|
+
click: MouseEvent;
|
17
|
+
focus: FocusEvent;
|
18
|
+
blur: FocusEvent;
|
19
|
+
} & {
|
20
|
+
[evt: string]: CustomEvent<any>;
|
21
|
+
}, {
|
22
|
+
default: {};
|
23
|
+
}> {
|
24
|
+
}
|
25
|
+
export type ButtonProps = typeof __propDef.props;
|
26
|
+
export type ButtonEvents = typeof __propDef.events;
|
27
|
+
export type ButtonSlots = typeof __propDef.slots;
|
1
28
|
import { SvelteComponentTyped } from "svelte";
|
2
29
|
declare const __propDef: {
|
3
30
|
props: {
|
31
|
+
type?: string | undefined;
|
4
32
|
label?: string | undefined;
|
5
|
-
|
6
|
-
|
7
|
-
|
33
|
+
config?: string | undefined;
|
34
|
+
icon?: {
|
35
|
+
state: boolean;
|
36
|
+
name: string;
|
37
|
+
position: string;
|
38
|
+
} | undefined;
|
39
|
+
shade?: string | undefined;
|
40
|
+
outlineShade?: string | undefined;
|
8
41
|
};
|
9
42
|
events: {
|
43
|
+
click: MouseEvent;
|
44
|
+
focus: FocusEvent;
|
45
|
+
blur: FocusEvent;
|
46
|
+
} & {
|
10
47
|
[evt: string]: CustomEvent<any>;
|
11
48
|
};
|
12
|
-
slots: {
|
49
|
+
slots: {
|
50
|
+
default: {};
|
51
|
+
};
|
13
52
|
};
|
14
|
-
export type ButtonProps = typeof __propDef.props;
|
15
|
-
export type ButtonEvents = typeof __propDef.events;
|
16
|
-
export type ButtonSlots = typeof __propDef.slots;
|
17
|
-
export default class Button extends SvelteComponentTyped<ButtonProps, ButtonEvents, ButtonSlots> {
|
18
|
-
}
|
19
53
|
export {};
|
@@ -0,0 +1,38 @@
|
|
1
|
+
export namespace buttonConfig {
|
2
|
+
const secondaryBtnLarge: string[];
|
3
|
+
const secondaryBtnMedium: string[];
|
4
|
+
const secondaryBtnSmall: string[];
|
5
|
+
const primaryBtnLarge: string[];
|
6
|
+
const primaryBtnMedium: string[];
|
7
|
+
const primaryBtnSmall: string[];
|
8
|
+
const infoBtnLarge: string[];
|
9
|
+
const infoBtnMedium: string[];
|
10
|
+
const infoBtnSmall: string[];
|
11
|
+
const warningBtnSmall: string[];
|
12
|
+
const warningBtnLarge: string[];
|
13
|
+
const warningBtnMedium: string[];
|
14
|
+
const dangerBtnLarge: string[];
|
15
|
+
const dangerBtnMedium: string[];
|
16
|
+
const dangerBtnSmall: string[];
|
17
|
+
const successBtnLarge: string[];
|
18
|
+
const successBtnMedium: string[];
|
19
|
+
const successBtnSmall: string[];
|
20
|
+
const secondaryOutlineBtnLarge: string[];
|
21
|
+
const secondaryOutlineBtnMedium: string[];
|
22
|
+
const secondaryOutlineBtnSmall: string[];
|
23
|
+
const primaryOutlineBtnLarge: string[];
|
24
|
+
const primaryOutlineBtnMedium: string[];
|
25
|
+
const primaryOutlineBtnSmall: string[];
|
26
|
+
const infoOutlineBtnLarge: string[];
|
27
|
+
const infoOutlineBtnMedium: string[];
|
28
|
+
const infoOutlineBtnSmall: string[];
|
29
|
+
const warningOutlineBtnSmall: string[];
|
30
|
+
const warningOutlineBtnLarge: string[];
|
31
|
+
const warningOutlineBtnMedium: string[];
|
32
|
+
const dangerOutlineBtnLarge: string[];
|
33
|
+
const dangerOutlineBtnMedium: string[];
|
34
|
+
const dangerOutlineBtnSmall: string[];
|
35
|
+
const successOutlineBtnLarge: string[];
|
36
|
+
const successOutlineBtnMedium: string[];
|
37
|
+
const successOutlineBtnSmall: string[];
|
38
|
+
}
|
@@ -0,0 +1,203 @@
|
|
1
|
+
export const buttonConfig = {
|
2
|
+
"secondaryBtnLarge" :[
|
3
|
+
"ebtn-large",
|
4
|
+
"ebg-secondary",
|
5
|
+
"etext-white",
|
6
|
+
],
|
7
|
+
"secondaryBtnMedium" :[
|
8
|
+
"ebtn-medium",
|
9
|
+
"ebg-secondary",
|
10
|
+
"etext-white",
|
11
|
+
],
|
12
|
+
"secondaryBtnSmall" :[
|
13
|
+
"ebtn-small",
|
14
|
+
"ebg-secondary",
|
15
|
+
"etext-white",
|
16
|
+
],
|
17
|
+
"primaryBtnLarge" :[
|
18
|
+
"ebtn-large",
|
19
|
+
"ebg-primary",
|
20
|
+
"etext-white",
|
21
|
+
],
|
22
|
+
"primaryBtnMedium" :[
|
23
|
+
"ebtn-medium",
|
24
|
+
"ebg-primary",
|
25
|
+
"etext-white",
|
26
|
+
],
|
27
|
+
"primaryBtnSmall" :[
|
28
|
+
"ebtn-small",
|
29
|
+
"ebg-primary",
|
30
|
+
"etext-white",
|
31
|
+
],
|
32
|
+
"infoBtnLarge" :[
|
33
|
+
"ebtn-large",
|
34
|
+
"ebg-info",
|
35
|
+
"etext-white",
|
36
|
+
],
|
37
|
+
"infoBtnMedium" :[
|
38
|
+
"ebtn-medium",
|
39
|
+
"ebg-info",
|
40
|
+
"etext-white",
|
41
|
+
],
|
42
|
+
"infoBtnSmall" :[
|
43
|
+
"ebtn-small",
|
44
|
+
"ebg-info",
|
45
|
+
"etext-white",
|
46
|
+
],
|
47
|
+
"warningBtnSmall" :[
|
48
|
+
"ebtn-small",
|
49
|
+
"ebg-warning",
|
50
|
+
"etext-white",
|
51
|
+
],
|
52
|
+
"warningBtnLarge" :[
|
53
|
+
"ebtn-small",
|
54
|
+
"ebg-warnging",
|
55
|
+
"etext-white",
|
56
|
+
],
|
57
|
+
"warningBtnMedium" :[
|
58
|
+
"ebtn-medium",
|
59
|
+
"ebg-warning",
|
60
|
+
"etext-white",
|
61
|
+
],
|
62
|
+
"dangerBtnLarge" :[
|
63
|
+
"ebtn-large",
|
64
|
+
"ebg-danger",
|
65
|
+
"etext-white"
|
66
|
+
],
|
67
|
+
"dangerBtnMedium" :[
|
68
|
+
"ebtn-medium",
|
69
|
+
"ebg-danger",
|
70
|
+
"etext-white"
|
71
|
+
],
|
72
|
+
"dangerBtnSmall" :[
|
73
|
+
"ebtn-small",
|
74
|
+
"ebg-danger",
|
75
|
+
"etext-white"
|
76
|
+
],
|
77
|
+
"successBtnLarge" :[
|
78
|
+
"ebtn-large",
|
79
|
+
"ebg-success",
|
80
|
+
"etext-white"
|
81
|
+
],
|
82
|
+
"successBtnMedium" :[
|
83
|
+
"ebtn-medium",
|
84
|
+
"ebg-success",
|
85
|
+
"etext-white"
|
86
|
+
],
|
87
|
+
"successBtnSmall" :[
|
88
|
+
"ebtn-small",
|
89
|
+
"ebg-success",
|
90
|
+
"etext-white"
|
91
|
+
],
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
"secondaryOutlineBtnLarge" :[
|
96
|
+
"ebtn-large",
|
97
|
+
"ebg-none",
|
98
|
+
"etext-secondary",
|
99
|
+
"eoutline-secondary",
|
100
|
+
],
|
101
|
+
"secondaryOutlineBtnMedium" :[
|
102
|
+
"ebtn-medium",
|
103
|
+
"ebg-none",
|
104
|
+
"etext-secondary",
|
105
|
+
"eoutline-secondary"
|
106
|
+
],
|
107
|
+
"secondaryOutlineBtnSmall" :[
|
108
|
+
"ebtn-small",
|
109
|
+
"ebg-none",
|
110
|
+
"etext-secondary",
|
111
|
+
"eoutline-secondary"
|
112
|
+
],
|
113
|
+
"primaryOutlineBtnLarge" :[
|
114
|
+
"ebtn-large",
|
115
|
+
"ebg-none",
|
116
|
+
"etext-primary",
|
117
|
+
"eoutline-primary"
|
118
|
+
],
|
119
|
+
"primaryOutlineBtnMedium" :[
|
120
|
+
"ebtn-medium",
|
121
|
+
"ebg-none",
|
122
|
+
"etext-primary",
|
123
|
+
"eoutline-primary"
|
124
|
+
],
|
125
|
+
"primaryOutlineBtnSmall" :[
|
126
|
+
"ebtn-small",
|
127
|
+
"ebg-none",
|
128
|
+
"etext-primary",
|
129
|
+
"eoutline-primary"
|
130
|
+
],
|
131
|
+
"infoOutlineBtnLarge" :[
|
132
|
+
"ebtn-large",
|
133
|
+
"ebg-none",
|
134
|
+
"etext-info",
|
135
|
+
"eoutline-info"
|
136
|
+
],
|
137
|
+
"infoOutlineBtnMedium" :[
|
138
|
+
"ebtn-medium",
|
139
|
+
"ebg-none",
|
140
|
+
"etext-info",
|
141
|
+
"eoutline-info"
|
142
|
+
],
|
143
|
+
"infoOutlineBtnSmall" :[
|
144
|
+
"ebtn-small",
|
145
|
+
"ebg-none",
|
146
|
+
"etext-info",
|
147
|
+
"eoutline-info"
|
148
|
+
],
|
149
|
+
"warningOutlineBtnSmall" :[
|
150
|
+
"ebtn-small",
|
151
|
+
"ebg-none",
|
152
|
+
"etext-warning",
|
153
|
+
"eoutline-warning"
|
154
|
+
],
|
155
|
+
"warningOutlineBtnLarge" :[
|
156
|
+
"ebtn-large",
|
157
|
+
"ebg-none",
|
158
|
+
"etext-warning",
|
159
|
+
"eoutline-warning"
|
160
|
+
],
|
161
|
+
"warningOutlineBtnMedium" :[
|
162
|
+
"ebtn-medium",
|
163
|
+
"ebg-none",
|
164
|
+
"etext-warning",
|
165
|
+
"eoutline-warning"
|
166
|
+
],
|
167
|
+
"dangerOutlineBtnLarge" :[
|
168
|
+
"ebtn-large",
|
169
|
+
"ebg-none",
|
170
|
+
"etext-danger",
|
171
|
+
"eoutline-danger"
|
172
|
+
],
|
173
|
+
"dangerOutlineBtnMedium" :[
|
174
|
+
"ebtn-medium",
|
175
|
+
"ebg-none",
|
176
|
+
"etext-danger",
|
177
|
+
"eoutline-danger"
|
178
|
+
],
|
179
|
+
"dangerOutlineBtnSmall" :[
|
180
|
+
"ebtn-small",
|
181
|
+
"ebg-none",
|
182
|
+
"etext-danger",
|
183
|
+
"eoutline-danger"
|
184
|
+
],
|
185
|
+
"successOutlineBtnLarge" :[
|
186
|
+
"ebtn-large",
|
187
|
+
"ebg-none",
|
188
|
+
"etext-success",
|
189
|
+
"eoutline-success"
|
190
|
+
],
|
191
|
+
"successOutlineBtnMedium" :[
|
192
|
+
"ebtn-medium",
|
193
|
+
"ebg-none",
|
194
|
+
"etext-success",
|
195
|
+
"eoutline-success"
|
196
|
+
],
|
197
|
+
"successOutlineBtnSmall" :[
|
198
|
+
"ebtn-small",
|
199
|
+
"ebg-none",
|
200
|
+
"etext-success",
|
201
|
+
"eoutline-success"
|
202
|
+
],
|
203
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
@import './../variable.scss';
|
2
|
+
|
3
|
+
@mixin common-font-properties($size, $weight: 400, $line-height: 28px, $style: normal, $family: 'Roboto') {
|
4
|
+
font-size: $size;
|
5
|
+
font-style: $style;
|
6
|
+
font-weight: $weight;
|
7
|
+
line-height: $line-height;
|
8
|
+
font-family: $family;
|
9
|
+
}
|
10
|
+
|
11
|
+
:global(.card) {
|
12
|
+
display: flex;
|
13
|
+
flex-direction: column;
|
14
|
+
gap: 16px;
|
15
|
+
}
|
16
|
+
|
17
|
+
.title {
|
18
|
+
color: $gray-900;
|
19
|
+
@include common-font-properties(24px, 600, normal);
|
20
|
+
}
|
21
|
+
|
22
|
+
.sub-title {
|
23
|
+
margin-top: 0.5rem;
|
24
|
+
margin-bottom: 0.5rem;
|
25
|
+
@include common-font-properties(16px, 600, normal);
|
26
|
+
color: $secondary;
|
27
|
+
}
|
28
|
+
|
29
|
+
.text {
|
30
|
+
@include common-font-properties(16px);
|
31
|
+
color: $gray-600;
|
32
|
+
}
|
33
|
+
|
34
|
+
.card-link {
|
35
|
+
@include common-font-properties(16px);
|
36
|
+
color: $primary;
|
37
|
+
text-decoration: none;
|
38
|
+
font-family: $bodyFonts;
|
39
|
+
}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
declare namespace _default {
|
2
|
+
export const title: string;
|
3
|
+
export { Card as component };
|
4
|
+
export namespace argTypes {
|
5
|
+
namespace image {
|
6
|
+
const control: string;
|
7
|
+
}
|
8
|
+
namespace width {
|
9
|
+
const control_1: string;
|
10
|
+
export { control_1 as control };
|
11
|
+
}
|
12
|
+
namespace text {
|
13
|
+
const control_2: string;
|
14
|
+
export { control_2 as control };
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
18
|
+
export default _default;
|
19
|
+
export namespace Card1 {
|
20
|
+
namespace args {
|
21
|
+
const image_1: string;
|
22
|
+
export { image_1 as image };
|
23
|
+
const text_1: string;
|
24
|
+
export { text_1 as text };
|
25
|
+
const title_1: string;
|
26
|
+
export { title_1 as title };
|
27
|
+
export const buttonLabel: string;
|
28
|
+
const width_1: string;
|
29
|
+
export { width_1 as width };
|
30
|
+
}
|
31
|
+
}
|
32
|
+
export namespace Card2 {
|
33
|
+
export namespace args_1 {
|
34
|
+
const text_2: string;
|
35
|
+
export { text_2 as text };
|
36
|
+
const title_2: string;
|
37
|
+
export { title_2 as title };
|
38
|
+
export const subTitle: string;
|
39
|
+
export const linkName1: string;
|
40
|
+
const width_2: string;
|
41
|
+
export { width_2 as width };
|
42
|
+
}
|
43
|
+
export { args_1 as args };
|
44
|
+
}
|
45
|
+
export namespace Card3 {
|
46
|
+
export namespace args_2 {
|
47
|
+
const text_3: string;
|
48
|
+
export { text_3 as text };
|
49
|
+
const title_3: string;
|
50
|
+
export { title_3 as title };
|
51
|
+
const width_3: string;
|
52
|
+
export { width_3 as width };
|
53
|
+
const linkName1_1: string;
|
54
|
+
export { linkName1_1 as linkName1 };
|
55
|
+
export const linkName2: string;
|
56
|
+
}
|
57
|
+
export { args_2 as args };
|
58
|
+
}
|
59
|
+
import Card from "./Card.svelte";
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import Card from './Card.svelte';
|
2
|
+
|
3
|
+
|
4
|
+
export default {
|
5
|
+
title: 'FMS/Card',
|
6
|
+
component: Card,
|
7
|
+
argTypes: {
|
8
|
+
image: { control: 'text' },
|
9
|
+
width: { control: 'text' },
|
10
|
+
text: { control: 'text' }
|
11
|
+
}
|
12
|
+
};
|
13
|
+
|
14
|
+
export const Card1 = {
|
15
|
+
args: {
|
16
|
+
image: 'https://s3.amazonaws.com/images.seroundtable.com/google-links-1510059186.jpg',
|
17
|
+
text: 'This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.',
|
18
|
+
title: 'Card Title',
|
19
|
+
buttonLabel:"Button",
|
20
|
+
width:'25rem'
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
export const Card2 = {
|
25
|
+
args: {
|
26
|
+
text: 'This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. ',
|
27
|
+
title: 'Card Title',
|
28
|
+
subTitle: 'Card Subtitle',
|
29
|
+
linkName1: "Card Link",
|
30
|
+
width:'30rem'
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
export const Card3 = {
|
35
|
+
args: {
|
36
|
+
text: 'This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. ',
|
37
|
+
title: 'Card Title',
|
38
|
+
width:'25rem',
|
39
|
+
linkName1: "Link",
|
40
|
+
linkName2:"Another Link"
|
41
|
+
}
|
42
|
+
}
|
@@ -0,0 +1,123 @@
|
|
1
|
+
<script>
|
2
|
+
import Button from '../Button/Button.svelte';
|
3
|
+
import { Card, CardBody, CardSubtitle, CardText, CardTitle } from 'sveltestrap';
|
4
|
+
export let image = '';
|
5
|
+
export let width = '35rem';
|
6
|
+
export let text = 'This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. '
|
7
|
+
export let title = 'Card Title';
|
8
|
+
export let subTitle = '';
|
9
|
+
export let linkName1 = "";
|
10
|
+
export let linkName2 = "";
|
11
|
+
export let link = "";
|
12
|
+
export let buttonLabel = "";
|
13
|
+
</script>
|
14
|
+
|
15
|
+
<Card style={`width:${width};`}>
|
16
|
+
{#if image}
|
17
|
+
<div>
|
18
|
+
<img src={image} class="card-img-top" alt="..." />
|
19
|
+
</div>
|
20
|
+
{/if}
|
21
|
+
<CardBody class="body">
|
22
|
+
<div>
|
23
|
+
{#if $$slots.title}
|
24
|
+
<CardTitle>
|
25
|
+
<div class="title">
|
26
|
+
<slot name="title" />
|
27
|
+
</div>
|
28
|
+
</CardTitle>
|
29
|
+
{:else}
|
30
|
+
<div class="title">
|
31
|
+
{title}
|
32
|
+
</div>
|
33
|
+
{/if}
|
34
|
+
{#if $$slots.subTitle}
|
35
|
+
<CardSubtitle>
|
36
|
+
<div class="sub-title">
|
37
|
+
<slot name="subTitle" />
|
38
|
+
</div>
|
39
|
+
</CardSubtitle>
|
40
|
+
{:else}
|
41
|
+
<div class="sub-title">
|
42
|
+
{subTitle}
|
43
|
+
</div>
|
44
|
+
{/if}
|
45
|
+
|
46
|
+
{#if $$slots.text}
|
47
|
+
<CardText>
|
48
|
+
<div class="text">
|
49
|
+
<slot name="text" />
|
50
|
+
</div>
|
51
|
+
</CardText>
|
52
|
+
{:else}
|
53
|
+
<CardText>
|
54
|
+
<div class="text">
|
55
|
+
{text}
|
56
|
+
</div>
|
57
|
+
</CardText>
|
58
|
+
{/if}
|
59
|
+
|
60
|
+
{#if $$slots.link}
|
61
|
+
<a href={link} class="card-link">
|
62
|
+
<slot name="link"></slot>
|
63
|
+
</a>
|
64
|
+
{:else}
|
65
|
+
<a href={link} class="card-link">{linkName1}</a>
|
66
|
+
<a href={link} class="card-link">{linkName2}</a>
|
67
|
+
{/if}
|
68
|
+
|
69
|
+
{#if $$slots.button}
|
70
|
+
<Button config ='primaryBtnMedium'>
|
71
|
+
<slot name="button" />
|
72
|
+
</Button>
|
73
|
+
{:else if buttonLabel}
|
74
|
+
<Button config ='primaryBtnMedium'>{buttonLabel}</Button>
|
75
|
+
{/if}
|
76
|
+
</div>
|
77
|
+
</CardBody>
|
78
|
+
</Card>
|
79
|
+
|
80
|
+
<style>@import url(https://fonts.googleapis.com/icon?family=Material+Icons);
|
81
|
+
@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");
|
82
|
+
@import url("https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap");
|
83
|
+
:global(.card) {
|
84
|
+
display: flex;
|
85
|
+
flex-direction: column;
|
86
|
+
gap: 16px;
|
87
|
+
}
|
88
|
+
.title {
|
89
|
+
color: #212529;
|
90
|
+
font-size: 24px;
|
91
|
+
font-style: normal;
|
92
|
+
font-weight: 600;
|
93
|
+
line-height: normal;
|
94
|
+
font-family: "Roboto";
|
95
|
+
}
|
96
|
+
.sub-title {
|
97
|
+
margin-top: 0.5rem;
|
98
|
+
margin-bottom: 0.5rem;
|
99
|
+
font-size: 16px;
|
100
|
+
font-style: normal;
|
101
|
+
font-weight: 600;
|
102
|
+
line-height: normal;
|
103
|
+
font-family: "Roboto";
|
104
|
+
color: #3AC82E;
|
105
|
+
}
|
106
|
+
.text {
|
107
|
+
font-size: 16px;
|
108
|
+
font-style: normal;
|
109
|
+
font-weight: 400;
|
110
|
+
line-height: 28px;
|
111
|
+
font-family: "Roboto";
|
112
|
+
color: #6C757D;
|
113
|
+
}
|
114
|
+
.card-link {
|
115
|
+
font-size: 16px;
|
116
|
+
font-style: normal;
|
117
|
+
font-weight: 400;
|
118
|
+
line-height: 28px;
|
119
|
+
font-family: "Roboto";
|
120
|
+
color: #00AEE5;
|
121
|
+
text-decoration: none;
|
122
|
+
font-family: Roboto;
|
123
|
+
}</style>
|
@@ -0,0 +1,51 @@
|
|
1
|
+
/** @typedef {typeof __propDef.props} CardProps */
|
2
|
+
/** @typedef {typeof __propDef.events} CardEvents */
|
3
|
+
/** @typedef {typeof __propDef.slots} CardSlots */
|
4
|
+
export default class Card extends SvelteComponentTyped<{
|
5
|
+
text?: string | undefined;
|
6
|
+
title?: string | undefined;
|
7
|
+
subTitle?: string | undefined;
|
8
|
+
link?: string | undefined;
|
9
|
+
image?: string | undefined;
|
10
|
+
width?: string | undefined;
|
11
|
+
linkName1?: string | undefined;
|
12
|
+
linkName2?: string | undefined;
|
13
|
+
buttonLabel?: string | undefined;
|
14
|
+
}, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {
|
17
|
+
title: {};
|
18
|
+
subTitle: {};
|
19
|
+
text: {};
|
20
|
+
link: {};
|
21
|
+
button: {};
|
22
|
+
}> {
|
23
|
+
}
|
24
|
+
export type CardProps = typeof __propDef.props;
|
25
|
+
export type CardEvents = typeof __propDef.events;
|
26
|
+
export type CardSlots = typeof __propDef.slots;
|
27
|
+
import { SvelteComponentTyped } from "svelte";
|
28
|
+
declare const __propDef: {
|
29
|
+
props: {
|
30
|
+
text?: string | undefined;
|
31
|
+
title?: string | undefined;
|
32
|
+
subTitle?: string | undefined;
|
33
|
+
link?: string | undefined;
|
34
|
+
image?: string | undefined;
|
35
|
+
width?: string | undefined;
|
36
|
+
linkName1?: string | undefined;
|
37
|
+
linkName2?: string | undefined;
|
38
|
+
buttonLabel?: string | undefined;
|
39
|
+
};
|
40
|
+
events: {
|
41
|
+
[evt: string]: CustomEvent<any>;
|
42
|
+
};
|
43
|
+
slots: {
|
44
|
+
title: {};
|
45
|
+
subTitle: {};
|
46
|
+
text: {};
|
47
|
+
link: {};
|
48
|
+
button: {};
|
49
|
+
};
|
50
|
+
};
|
51
|
+
export {};
|
@@ -0,0 +1,32 @@
|
|
1
|
+
@import '../variable.scss';
|
2
|
+
|
3
|
+
:global(.inp-checkbox .form-check-input:checked) {
|
4
|
+
background-color: $secondary;
|
5
|
+
border-color: $secondary;
|
6
|
+
border: 1.8px solid $secondary !important;
|
7
|
+
}
|
8
|
+
|
9
|
+
:global(.inp-checkbox .form-check-input:focus) {
|
10
|
+
border-color: $secondary;
|
11
|
+
outline: 0;
|
12
|
+
box-shadow: none;
|
13
|
+
}
|
14
|
+
|
15
|
+
:global(.inp-checkbox .form-check-input[type=checkbox]) {
|
16
|
+
border-radius: 3px;
|
17
|
+
border: 1.8px solid $gray-500;
|
18
|
+
}
|
19
|
+
|
20
|
+
:global(.inp-checkbox .form-check-input:disabled:not(:checked)) {
|
21
|
+
background-color: $gray-300;
|
22
|
+
border-color: $gray-600;
|
23
|
+
}
|
24
|
+
|
25
|
+
:global(.form-check-label) {
|
26
|
+
text-transform: capitalize;
|
27
|
+
font-family: $bodyFonts;
|
28
|
+
font-style: normal;
|
29
|
+
font-size: 16px;
|
30
|
+
font-weight: 400;
|
31
|
+
line-height: 28px;
|
32
|
+
}
|