-
Notifications
You must be signed in to change notification settings - Fork 6
/
COMPONENT_API.json
182 lines (182 loc) · 10.4 KB
/
COMPONENT_API.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
{
"total": 3,
"components": [
{
"moduleName": "BootstrapToast",
"filePath": "src/BootstrapToast.svelte",
"props": [
{
"name": "theme",
"kind": "let",
"description": "Default theme for all toasts",
"type": " Theme ",
"value": "'light'",
"isFunction": false,
"constant": false,
"reactive": false
},
{
"name": "data",
"kind": "let",
"description": "Default theme for all toasts",
"type": " ToastProps ",
"value": "{}",
"isFunction": false,
"constant": false,
"reactive": false
}
],
"slots": [
{
"name": "close-icon",
"default": false,
"fallback": "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"bx--toast-notification__close-icon\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 32 32\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z\"\n />\n </svg>",
"slot_props": "{}"
},
{ "name": "extra", "default": false, "slot_props": "{}" },
{
"name": "icon",
"default": false,
"fallback": "{#if data.type === 'success'}\n <svg\n class=\"st-toast-icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M10,1c-4.9,0-9,4.1-9,9s4.1,9,9,9s9-4,9-9S15,1,10,1z M8.7,13.5l-3.2-3.2l1-1l2.2,2.2l4.8-4.8l1,1L8.7,13.5z\"\n />\n <path\n fill=\"none\"\n d=\"M8.7,13.5l-3.2-3.2l1-1l2.2,2.2l4.8-4.8l1,1L8.7,13.5z\"\n data-icon-path=\"inner-path\"\n opacity=\"0\"\n />\n </svg>\n {:else if data.type === 'info'}\n <svg\n class=\"st-toast-icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 32 32\"\n aria-hidden=\"true\"\n ><path\n d=\"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,7Zm4,17.12H12V21.88h2.88V15.12H13V12.88h4.13v9H20Z\"\n /></svg\n >\n {:else if data.type === 'error'}\n <svg\n class=\"st-toast-icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n aria-hidden=\"true\"\n ><path\n d=\"M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z\"\n /><path\n d=\"M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z\"\n data-icon-path=\"inner-path\"\n opacity=\"0\"\n /></svg\n >\n {:else}\n <svg\n class=\"st-toast-icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n aria-hidden=\"true\"\n ><path\n d=\"M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M9.2,5h1.5v7H9.2V5z M10,16c-0.6,0-1-0.4-1-1s0.4-1,1-1\ts1,0.4,1,1S10.6,16,10,16z\"\n /><path\n d=\"M9.2,5h1.5v7H9.2V5z M10,16c-0.6,0-1-0.4-1-1s0.4-1,1-1s1,0.4,1,1S10.6,16,10,16z\"\n data-icon-path=\"inner-path\"\n opacity=\"0\"\n /></svg\n >\n {/if}",
"slot_props": "{}"
}
],
"events": [],
"typedefs": []
},
{
"moduleName": "FlatToast",
"filePath": "src/FlatToast.svelte",
"props": [
{
"name": "theme",
"kind": "let",
"description": "Default theme for all toasts",
"type": " Theme ",
"value": "'light'",
"isFunction": false,
"constant": false,
"reactive": false
},
{
"name": "data",
"kind": "let",
"description": "Default theme for all toasts",
"type": " ToastProps ",
"value": "{}",
"isFunction": false,
"constant": false,
"reactive": false
}
],
"slots": [
{
"name": "close-icon",
"default": false,
"fallback": "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"bx--toast-notification__close-icon\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 32 32\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z\"\n />\n </svg>",
"slot_props": "{}"
},
{ "name": "extra", "default": false, "slot_props": "{}" },
{
"name": "icon",
"default": false,
"fallback": "{#if data.type === 'success'}\n <svg\n class=\"st-toast-icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M10,1c-4.9,0-9,4.1-9,9s4.1,9,9,9s9-4,9-9S15,1,10,1z M8.7,13.5l-3.2-3.2l1-1l2.2,2.2l4.8-4.8l1,1L8.7,13.5z\"\n />\n <path\n fill=\"none\"\n d=\"M8.7,13.5l-3.2-3.2l1-1l2.2,2.2l4.8-4.8l1,1L8.7,13.5z\"\n data-icon-path=\"inner-path\"\n opacity=\"0\"\n />\n </svg>\n {:else if data.type === 'info'}\n <svg\n class=\"st-toast-icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 32 32\"\n aria-hidden=\"true\"\n ><path\n d=\"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,7Zm4,17.12H12V21.88h2.88V15.12H13V12.88h4.13v9H20Z\"\n /></svg\n >\n {:else if data.type === 'error'}\n <svg\n class=\"st-toast-icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n aria-hidden=\"true\"\n ><path\n d=\"M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z\"\n /><path\n d=\"M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z\"\n data-icon-path=\"inner-path\"\n opacity=\"0\"\n /></svg\n >\n {:else}\n <svg\n class=\"st-toast-icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n aria-hidden=\"true\"\n ><path\n d=\"M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M9.2,5h1.5v7H9.2V5z M10,16c-0.6,0-1-0.4-1-1s0.4-1,1-1\ts1,0.4,1,1S10.6,16,10,16z\"\n /><path\n d=\"M9.2,5h1.5v7H9.2V5z M10,16c-0.6,0-1-0.4-1-1s0.4-1,1-1s1,0.4,1,1S10.6,16,10,16z\"\n data-icon-path=\"inner-path\"\n opacity=\"0\"\n /></svg\n >\n {/if}",
"slot_props": "{}"
}
],
"events": [],
"typedefs": []
},
{
"moduleName": "ToastContainer",
"filePath": "src/ToastContainer.svelte",
"props": [
{
"name": "theme",
"kind": "let",
"description": "Default theme for all toasts",
"type": " Theme ",
"value": "'dark'",
"isFunction": false,
"constant": false,
"reactive": false
},
{
"name": "placement",
"kind": "let",
"description": "Default placement for all toasts",
"type": " Placement ",
"value": "'bottom-right'",
"isFunction": false,
"constant": false,
"reactive": false
},
{
"name": "type",
"kind": "let",
"description": "Default type of all toasts",
"type": " ToastType ",
"value": "'info'",
"isFunction": false,
"constant": false,
"reactive": false
},
{
"name": "showProgress",
"kind": "let",
"description": "Show progress if showProgress is true and duration is greater then 0",
"type": " boolean ",
"value": "false",
"isFunction": false,
"constant": false,
"reactive": false
},
{
"name": "duration",
"kind": "let",
"description": "Default duration for all toasts to auto close. 0 to disable auto close",
"type": " number ",
"value": "3000",
"isFunction": false,
"constant": false,
"reactive": false
},
{
"name": "width",
"kind": "let",
"description": "Width of all toasts",
"type": " 'string' ",
"value": "'320px'",
"isFunction": false,
"constant": false,
"reactive": false
}
],
"slots": [
{
"name": "__default__",
"default": true,
"slot_props": "{ data: ToastProps }"
}
],
"events": [],
"typedefs": [
{
"type": "'success' | 'info' | 'error' | 'warning'",
"name": "ToastType",
"ts": "type ToastType = 'success' | 'info' | 'error' | 'warning'"
},
{
"type": "'bottom-right' | 'bottom-left' | 'top-right' | 'top-left' | 'top-center' | 'bottom-center' | 'center-center'",
"name": "Placement",
"ts": "type Placement = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left' | 'top-center' | 'bottom-center' | 'center-center'"
},
{
"type": "{\nuid: number;\ntitle?: string;\ndescription: string;\nduration: number;\ntype: ToastType;\ntheme?: Theme;\nplacement: Placement;\nshowProgress?: boolean;\nremove?: Function;\nupdate?: Function;\nonRemove?: Function;\nonClick?: Function;\n}",
"name": "ToastProps",
"ts": "interface ToastProps {\nuid: number;\ntitle?: string;\ndescription: string;\nduration: number;\ntype: ToastType;\ntheme?: Theme;\nplacement: Placement;\nshowProgress?: boolean;\nremove?: Function;\nupdate?: Function;\nonRemove?: Function;\nonClick?: Function;\n}"
}
]
}
]
}