flowbite-svelte 0.12.4 → 0.13.2
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/CHANGELOG.md +5 -0
- package/accordions/AccordionItem.svelte +1 -7
- package/alerts/BorderAlert.svelte +11 -36
- package/avatar/Avatar.svelte +2 -20
- package/badges/BadgeLink.svelte +2 -2
- package/badges/BadgeLink.svelte.d.ts +1 -1
- package/buttons/Button.svelte +1 -2
- package/buttons/GradientOutlineButton.svelte +8 -16
- package/cards/Card.svelte +10 -29
- package/cards/EcommerceCard.svelte +24 -53
- package/cards/EcommerceCard.svelte.d.ts +2 -2
- package/cards/InteractiveCard.svelte +14 -51
- package/cards/InteractiveCard.svelte.d.ts +2 -2
- package/cards/ListCard.svelte +2 -8
- package/cards/SignInCard.svelte +18 -65
- package/cards/SignInCard.svelte.d.ts +2 -2
- package/darkmode/DarkMode.svelte +4 -28
- package/dropdowns/DropdownDefault.svelte +5 -24
- package/dropdowns/DropdownDefault.svelte.d.ts +2 -2
- package/footer/SitemapFooter.svelte +1 -3
- package/forms/Checkbox.svelte +2 -16
- package/forms/Checkbox.svelte.d.ts +2 -7
- package/forms/FloatingLabelInput.svelte +2 -1
- package/forms/FloatingLabelInput.svelte.d.ts +3 -2
- package/forms/Iconinput.svelte +3 -2
- package/forms/Iconinput.svelte.d.ts +3 -2
- package/forms/Input.svelte +4 -13
- package/forms/Input.svelte.d.ts +2 -1
- package/forms/Radio.svelte +2 -30
- package/forms/Radio.svelte.d.ts +2 -7
- package/forms/Select.svelte +4 -3
- package/forms/SingleCheckbox.svelte +4 -11
- package/forms/SingleCheckbox.svelte.d.ts +1 -1
- package/forms/Textarea.svelte +3 -2
- package/forms/Toggle.svelte +5 -4
- package/index.d.ts +2 -0
- package/index.js +4 -0
- package/list-group/List.svelte +1 -3
- package/modals/ExtraLargeModal.svelte +42 -99
- package/modals/LargeModal.svelte +42 -99
- package/modals/MediumModal.svelte +39 -93
- package/modals/ModalButton.svelte +10 -19
- package/modals/ModalButton.svelte.d.ts +1 -0
- package/modals/SignInModal.svelte +22 -94
- package/modals/SmallModal.svelte +42 -99
- package/navbar/DropdownNavbar.svelte +5 -43
- package/navbar/Navbar.svelte +4 -31
- package/package.json +4 -2
- package/paginations/Next.svelte +1 -11
- package/paginations/Pagination.svelte +2 -22
- package/paginations/Previous.svelte +1 -11
- package/progressbars/Progressbar.svelte +34 -31
- package/progressbars/Progressbar.svelte.d.ts +9 -19
- package/spinners/Spinner.svelte +4 -22
- package/tables/Table.svelte +21 -3
- package/tables/Table.svelte.d.ts +12 -16
- package/tables/TableDefaultRow.svelte +66 -0
- package/tables/TableDefaultRow.svelte.d.ts +18 -0
- package/tabs/IconTabs.svelte +2 -10
- package/tabs/InteractiveTabHead.svelte +2 -17
- package/tabs/InteractiveTabs.svelte +2 -15
- package/tabs/UnderlineTabs.svelte +1 -8
- package/toasts/Toast.svelte +9 -27
- package/toasts/Toast.svelte.d.ts +2 -2
- package/tooltips/Tooltip.svelte +1 -9
- package/types.d.ts +23 -0
- package/utils/generateId.d.ts +1 -0
- package/utils/generateId.js +5 -0
package/modals/SmallModal.svelte
CHANGED
|
@@ -31,160 +31,116 @@ if (textColor === 'blue') {
|
|
|
31
31
|
divClass = 'relative bg-white rounded-lg shadow dark:bg-blue-700';
|
|
32
32
|
headDivClass = 'flex justify-between items-center p-5 rounded-t border-b dark:border-blue-600';
|
|
33
33
|
h3Class = 'text-xl font-medium text-blue-900 dark:text-white';
|
|
34
|
-
buttonClass =
|
|
35
|
-
'text-blue-400 bg-transparent hover:bg-blue-200 hover:text-blue-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-blue-600 dark:hover:text-white';
|
|
34
|
+
buttonClass = 'text-blue-400 bg-transparent hover:bg-blue-200 hover:text-blue-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-blue-600 dark:hover:text-white';
|
|
36
35
|
pClass = 'text-base leading-relaxed text-blue-500 dark:text-blue-400';
|
|
37
|
-
footerClass =
|
|
38
|
-
|
|
39
|
-
btn2Class =
|
|
40
|
-
'text-blue-500 bg-white hover:bg-blue-100 focus:ring-4 focus:ring-blue-300 rounded-lg border border-blue-200 text-sm font-medium px-5 py-2.5 hover:text-blue-900 focus:z-10 dark:bg-blue-700 dark:text-blue-300 dark:border-blue-500 dark:hover:text-white dark:hover:bg-blue-600';
|
|
36
|
+
footerClass = 'flex items-center p-6 space-x-2 rounded-b border-t border-blue-200 dark:border-blue-600';
|
|
37
|
+
btn2Class = 'text-blue-500 bg-white hover:bg-blue-100 focus:ring-4 focus:ring-blue-300 rounded-lg border border-blue-200 text-sm font-medium px-5 py-2.5 hover:text-blue-900 focus:z-10 dark:bg-blue-700 dark:text-blue-300 dark:border-blue-500 dark:hover:text-white dark:hover:bg-blue-600';
|
|
41
38
|
}
|
|
42
39
|
else if (textColor === 'gray') {
|
|
43
40
|
divClass = 'relative bg-white rounded-lg shadow dark:bg-gray-700';
|
|
44
41
|
headDivClass = 'flex justify-between items-center p-5 rounded-t border-b dark:border-gray-600';
|
|
45
42
|
h3Class = 'text-xl font-medium text-gray-900 dark:text-white';
|
|
46
|
-
buttonClass =
|
|
47
|
-
'text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white';
|
|
43
|
+
buttonClass = 'text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white';
|
|
48
44
|
pClass = 'text-base leading-relaxed text-gray-500 dark:text-gray-400';
|
|
49
|
-
footerClass =
|
|
50
|
-
|
|
51
|
-
btn2Class =
|
|
52
|
-
'text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:ring-gray-300 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600';
|
|
45
|
+
footerClass = 'flex items-center p-6 space-x-2 rounded-b border-t border-gray-200 dark:border-gray-600';
|
|
46
|
+
btn2Class = 'text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:ring-gray-300 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600';
|
|
53
47
|
}
|
|
54
48
|
else if (textColor === 'red') {
|
|
55
49
|
divClass = 'relative bg-white rounded-lg shadow dark:bg-red-700';
|
|
56
50
|
headDivClass = 'flex justify-between items-center p-5 rounded-t border-b dark:border-red-600';
|
|
57
51
|
h3Class = 'text-xl font-medium text-red-900 dark:text-white';
|
|
58
|
-
buttonClass =
|
|
59
|
-
'text-red-400 bg-transparent hover:bg-red-200 hover:text-red-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-red-600 dark:hover:text-white';
|
|
52
|
+
buttonClass = 'text-red-400 bg-transparent hover:bg-red-200 hover:text-red-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-red-600 dark:hover:text-white';
|
|
60
53
|
pClass = 'text-base leading-relaxed text-red-500 dark:text-red-400';
|
|
61
|
-
footerClass =
|
|
62
|
-
|
|
63
|
-
btn2Class =
|
|
64
|
-
'text-red-500 bg-white hover:bg-red-100 focus:ring-4 focus:ring-red-300 rounded-lg border border-red-200 text-sm font-medium px-5 py-2.5 hover:text-red-900 focus:z-10 dark:bg-red-700 dark:text-red-300 dark:border-red-500 dark:hover:text-white dark:hover:bg-red-600';
|
|
54
|
+
footerClass = 'flex items-center p-6 space-x-2 rounded-b border-t border-red-200 dark:border-red-600';
|
|
55
|
+
btn2Class = 'text-red-500 bg-white hover:bg-red-100 focus:ring-4 focus:ring-red-300 rounded-lg border border-red-200 text-sm font-medium px-5 py-2.5 hover:text-red-900 focus:z-10 dark:bg-red-700 dark:text-red-300 dark:border-red-500 dark:hover:text-white dark:hover:bg-red-600';
|
|
65
56
|
}
|
|
66
57
|
else if (textColor === 'yellow') {
|
|
67
58
|
divClass = 'relative bg-white rounded-lg shadow dark:bg-yellow-700';
|
|
68
|
-
headDivClass =
|
|
69
|
-
'flex justify-between items-center p-5 rounded-t border-b dark:border-yellow-600';
|
|
59
|
+
headDivClass = 'flex justify-between items-center p-5 rounded-t border-b dark:border-yellow-600';
|
|
70
60
|
h3Class = 'text-xl font-medium text-yellow-900 dark:text-white';
|
|
71
|
-
buttonClass =
|
|
72
|
-
'text-yellow-400 bg-transparent hover:bg-yellow-200 hover:text-yellow-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-yellow-600 dark:hover:text-white';
|
|
61
|
+
buttonClass = 'text-yellow-400 bg-transparent hover:bg-yellow-200 hover:text-yellow-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-yellow-600 dark:hover:text-white';
|
|
73
62
|
pClass = 'text-base leading-relaxed text-yellow-500 dark:text-yellow-400';
|
|
74
|
-
footerClass =
|
|
75
|
-
|
|
76
|
-
btn2Class =
|
|
77
|
-
'text-yellow-500 bg-white hover:bg-yellow-100 focus:ring-4 focus:ring-yellow-300 rounded-lg border border-yellow-200 text-sm font-medium px-5 py-2.5 hover:text-yellow-900 focus:z-10 dark:bg-yellow-700 dark:text-yellow-300 dark:border-yellow-500 dark:hover:text-white dark:hover:bg-yellow-600';
|
|
63
|
+
footerClass = 'flex items-center p-6 space-x-2 rounded-b border-t border-yellow-200 dark:border-yellow-600';
|
|
64
|
+
btn2Class = 'text-yellow-500 bg-white hover:bg-yellow-100 focus:ring-4 focus:ring-yellow-300 rounded-lg border border-yellow-200 text-sm font-medium px-5 py-2.5 hover:text-yellow-900 focus:z-10 dark:bg-yellow-700 dark:text-yellow-300 dark:border-yellow-500 dark:hover:text-white dark:hover:bg-yellow-600';
|
|
78
65
|
}
|
|
79
66
|
else if (textColor === 'green') {
|
|
80
67
|
divClass = 'relative bg-white rounded-lg shadow dark:bg-green-700';
|
|
81
68
|
headDivClass = 'flex justify-between items-center p-5 rounded-t border-b dark:border-green-600';
|
|
82
69
|
h3Class = 'text-xl font-medium text-green-900 dark:text-white';
|
|
83
|
-
buttonClass =
|
|
84
|
-
'text-green-400 bg-transparent hover:bg-green-200 hover:text-green-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-green-600 dark:hover:text-white';
|
|
70
|
+
buttonClass = 'text-green-400 bg-transparent hover:bg-green-200 hover:text-green-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-green-600 dark:hover:text-white';
|
|
85
71
|
pClass = 'text-base leading-relaxed text-green-500 dark:text-green-400';
|
|
86
|
-
footerClass =
|
|
87
|
-
|
|
88
|
-
btn2Class =
|
|
89
|
-
'text-green-500 bg-white hover:bg-green-100 focus:ring-4 focus:ring-green-300 rounded-lg border border-green-200 text-sm font-medium px-5 py-2.5 hover:text-green-900 focus:z-10 dark:bg-green-700 dark:text-green-300 dark:border-green-500 dark:hover:text-white dark:hover:bg-green-600';
|
|
72
|
+
footerClass = 'flex items-center p-6 space-x-2 rounded-b border-t border-green-200 dark:border-green-600';
|
|
73
|
+
btn2Class = 'text-green-500 bg-white hover:bg-green-100 focus:ring-4 focus:ring-green-300 rounded-lg border border-green-200 text-sm font-medium px-5 py-2.5 hover:text-green-900 focus:z-10 dark:bg-green-700 dark:text-green-300 dark:border-green-500 dark:hover:text-white dark:hover:bg-green-600';
|
|
90
74
|
}
|
|
91
75
|
else if (textColor === 'indigo') {
|
|
92
76
|
divClass = 'relative bg-white rounded-lg shadow dark:bg-indigo-700';
|
|
93
|
-
headDivClass =
|
|
94
|
-
'flex justify-between items-center p-5 rounded-t border-b dark:border-indigo-600';
|
|
77
|
+
headDivClass = 'flex justify-between items-center p-5 rounded-t border-b dark:border-indigo-600';
|
|
95
78
|
h3Class = 'text-xl font-medium text-indigo-900 dark:text-white';
|
|
96
|
-
buttonClass =
|
|
97
|
-
'text-indigo-400 bg-transparent hover:bg-indigo-200 hover:text-indigo-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-indigo-600 dark:hover:text-white';
|
|
79
|
+
buttonClass = 'text-indigo-400 bg-transparent hover:bg-indigo-200 hover:text-indigo-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-indigo-600 dark:hover:text-white';
|
|
98
80
|
pClass = 'text-base leading-relaxed text-indigo-500 dark:text-indigo-400';
|
|
99
|
-
footerClass =
|
|
100
|
-
|
|
101
|
-
btn2Class =
|
|
102
|
-
'text-indigo-500 bg-white hover:bg-indigo-100 focus:ring-4 focus:ring-indigo-300 rounded-lg border border-indigo-200 text-sm font-medium px-5 py-2.5 hover:text-indigo-900 focus:z-10 dark:bg-indigo-700 dark:text-indigo-300 dark:border-indigo-500 dark:hover:text-white dark:hover:bg-indigo-600';
|
|
81
|
+
footerClass = 'flex items-center p-6 space-x-2 rounded-b border-t border-indigo-200 dark:border-indigo-600';
|
|
82
|
+
btn2Class = 'text-indigo-500 bg-white hover:bg-indigo-100 focus:ring-4 focus:ring-indigo-300 rounded-lg border border-indigo-200 text-sm font-medium px-5 py-2.5 hover:text-indigo-900 focus:z-10 dark:bg-indigo-700 dark:text-indigo-300 dark:border-indigo-500 dark:hover:text-white dark:hover:bg-indigo-600';
|
|
103
83
|
}
|
|
104
84
|
else if (textColor === 'purple') {
|
|
105
85
|
divClass = 'relative bg-white rounded-lg shadow dark:bg-purple-700';
|
|
106
|
-
headDivClass =
|
|
107
|
-
'flex justify-between items-center p-5 rounded-t border-b dark:border-purple-600';
|
|
86
|
+
headDivClass = 'flex justify-between items-center p-5 rounded-t border-b dark:border-purple-600';
|
|
108
87
|
h3Class = 'text-xl font-medium text-purple-900 dark:text-white';
|
|
109
|
-
buttonClass =
|
|
110
|
-
'text-purple-400 bg-transparent hover:bg-purple-200 hover:text-purple-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-purple-600 dark:hover:text-white';
|
|
88
|
+
buttonClass = 'text-purple-400 bg-transparent hover:bg-purple-200 hover:text-purple-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-purple-600 dark:hover:text-white';
|
|
111
89
|
pClass = 'text-base leading-relaxed text-purple-500 dark:text-purple-400';
|
|
112
|
-
footerClass =
|
|
113
|
-
|
|
114
|
-
btn2Class =
|
|
115
|
-
'text-purple-500 bg-white hover:bg-purple-100 focus:ring-4 focus:ring-purple-300 rounded-lg border border-purple-200 text-sm font-medium px-5 py-2.5 hover:text-purple-900 focus:z-10 dark:bg-purple-700 dark:text-purple-300 dark:border-purple-500 dark:hover:text-white dark:hover:bg-purple-600';
|
|
90
|
+
footerClass = 'flex items-center p-6 space-x-2 rounded-b border-t border-purple-200 dark:border-purple-600';
|
|
91
|
+
btn2Class = 'text-purple-500 bg-white hover:bg-purple-100 focus:ring-4 focus:ring-purple-300 rounded-lg border border-purple-200 text-sm font-medium px-5 py-2.5 hover:text-purple-900 focus:z-10 dark:bg-purple-700 dark:text-purple-300 dark:border-purple-500 dark:hover:text-white dark:hover:bg-purple-600';
|
|
116
92
|
}
|
|
117
93
|
else if (textColor === 'pink') {
|
|
118
94
|
divClass = 'relative bg-white rounded-lg shadow dark:bg-pink-700';
|
|
119
95
|
headDivClass = 'flex justify-between items-center p-5 rounded-t border-b dark:border-pink-600';
|
|
120
96
|
h3Class = 'text-xl font-medium text-pink-900 dark:text-white';
|
|
121
|
-
buttonClass =
|
|
122
|
-
'text-pink-400 bg-transparent hover:bg-pink-200 hover:text-pink-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-pink-600 dark:hover:text-white';
|
|
97
|
+
buttonClass = 'text-pink-400 bg-transparent hover:bg-pink-200 hover:text-pink-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-pink-600 dark:hover:text-white';
|
|
123
98
|
pClass = 'text-base leading-relaxed text-pink-500 dark:text-pink-400';
|
|
124
|
-
footerClass =
|
|
125
|
-
|
|
126
|
-
btn2Class =
|
|
127
|
-
'text-pink-500 bg-white hover:bg-pink-100 focus:ring-4 focus:ring-pink-300 rounded-lg border border-pink-200 text-sm font-medium px-5 py-2.5 hover:text-pink-900 focus:z-10 dark:bg-pink-700 dark:text-pink-300 dark:border-pink-500 dark:hover:text-white dark:hover:bg-pink-600';
|
|
99
|
+
footerClass = 'flex items-center p-6 space-x-2 rounded-b border-t border-pink-200 dark:border-pink-600';
|
|
100
|
+
btn2Class = 'text-pink-500 bg-white hover:bg-pink-100 focus:ring-4 focus:ring-pink-300 rounded-lg border border-pink-200 text-sm font-medium px-5 py-2.5 hover:text-pink-900 focus:z-10 dark:bg-pink-700 dark:text-pink-300 dark:border-pink-500 dark:hover:text-white dark:hover:bg-pink-600';
|
|
128
101
|
}
|
|
129
102
|
else {
|
|
130
103
|
divClass = 'relative bg-white rounded-lg shadow dark:bg-blue-700';
|
|
131
104
|
headDivClass = 'flex justify-between items-center p-5 rounded-t border-b dark:border-blue-600';
|
|
132
105
|
h3Class = 'text-xl font-medium text-blue-900 dark:text-white';
|
|
133
|
-
buttonClass =
|
|
134
|
-
'text-blue-400 bg-transparent hover:bg-blue-200 hover:text-blue-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-blue-600 dark:hover:text-white';
|
|
106
|
+
buttonClass = 'text-blue-400 bg-transparent hover:bg-blue-200 hover:text-blue-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-blue-600 dark:hover:text-white';
|
|
135
107
|
pClass = 'text-base leading-relaxed text-blue-500 dark:text-blue-400';
|
|
136
|
-
footerClass =
|
|
137
|
-
|
|
138
|
-
btn2Class =
|
|
139
|
-
'text-blue-500 bg-white hover:bg-blue-100 focus:ring-4 focus:ring-blue-300 rounded-lg border border-blue-200 text-sm font-medium px-5 py-2.5 hover:text-blue-900 focus:z-10 dark:bg-blue-700 dark:text-blue-300 dark:border-blue-500 dark:hover:text-white dark:hover:bg-blue-600';
|
|
108
|
+
footerClass = 'flex items-center p-6 space-x-2 rounded-b border-t border-blue-200 dark:border-blue-600';
|
|
109
|
+
btn2Class = 'text-blue-500 bg-white hover:bg-blue-100 focus:ring-4 focus:ring-blue-300 rounded-lg border border-blue-200 text-sm font-medium px-5 py-2.5 hover:text-blue-900 focus:z-10 dark:bg-blue-700 dark:text-blue-300 dark:border-blue-500 dark:hover:text-white dark:hover:bg-blue-600';
|
|
140
110
|
}
|
|
141
111
|
let button1Class;
|
|
142
112
|
if (btnColor === 'blue') {
|
|
143
|
-
button1Class =
|
|
144
|
-
'text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800';
|
|
113
|
+
button1Class = 'text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800';
|
|
145
114
|
}
|
|
146
115
|
else if (btnColor === 'gray') {
|
|
147
|
-
button1Class =
|
|
148
|
-
'text-white bg-gray-700 hover:bg-gray-800 focus:ring-4 focus:ring-gray-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-800';
|
|
116
|
+
button1Class = 'text-white bg-gray-700 hover:bg-gray-800 focus:ring-4 focus:ring-gray-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-800';
|
|
149
117
|
}
|
|
150
118
|
else if (btnColor === 'red') {
|
|
151
|
-
button1Class =
|
|
152
|
-
'text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-800';
|
|
119
|
+
button1Class = 'text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-800';
|
|
153
120
|
}
|
|
154
121
|
else if (btnColor === 'yellow') {
|
|
155
|
-
button1Class =
|
|
156
|
-
'text-white bg-yellow-700 hover:bg-yellow-800 focus:ring-4 focus:ring-yellow-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-yellow-600 dark:hover:bg-yellow-700 dark:focus:ring-yellow-800';
|
|
122
|
+
button1Class = 'text-white bg-yellow-700 hover:bg-yellow-800 focus:ring-4 focus:ring-yellow-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-yellow-600 dark:hover:bg-yellow-700 dark:focus:ring-yellow-800';
|
|
157
123
|
}
|
|
158
124
|
else if (btnColor === 'green') {
|
|
159
|
-
button1Class =
|
|
160
|
-
'text-white bg-green-700 hover:bg-green-800 focus:ring-4 focus:ring-green-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800';
|
|
125
|
+
button1Class = 'text-white bg-green-700 hover:bg-green-800 focus:ring-4 focus:ring-green-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800';
|
|
161
126
|
}
|
|
162
127
|
else if (btnColor === 'indigo') {
|
|
163
|
-
button1Class =
|
|
164
|
-
'text-white bg-indigo-700 hover:bg-indigo-800 focus:ring-4 focus:ring-indigo-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-indigo-600 dark:hover:bg-indigo-700 dark:focus:ring-indigo-800';
|
|
128
|
+
button1Class = 'text-white bg-indigo-700 hover:bg-indigo-800 focus:ring-4 focus:ring-indigo-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-indigo-600 dark:hover:bg-indigo-700 dark:focus:ring-indigo-800';
|
|
165
129
|
}
|
|
166
130
|
else if (btnColor === 'purple') {
|
|
167
|
-
button1Class =
|
|
168
|
-
'text-white bg-purple-700 hover:bg-purple-800 focus:ring-4 focus:ring-purple-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-purple-600 dark:hover:bg-purple-700 dark:focus:ring-purple-800';
|
|
131
|
+
button1Class = 'text-white bg-purple-700 hover:bg-purple-800 focus:ring-4 focus:ring-purple-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-purple-600 dark:hover:bg-purple-700 dark:focus:ring-purple-800';
|
|
169
132
|
}
|
|
170
133
|
else if (btnColor === 'pink') {
|
|
171
|
-
button1Class =
|
|
172
|
-
'text-white bg-pink-700 hover:bg-pink-800 focus:ring-4 focus:ring-pink-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-pink-600 dark:hover:bg-pink-700 dark:focus:ring-pink-800';
|
|
134
|
+
button1Class = 'text-white bg-pink-700 hover:bg-pink-800 focus:ring-4 focus:ring-pink-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-pink-600 dark:hover:bg-pink-700 dark:focus:ring-pink-800';
|
|
173
135
|
}
|
|
174
136
|
else {
|
|
175
|
-
button1Class =
|
|
176
|
-
'text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800';
|
|
137
|
+
button1Class = 'text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800';
|
|
177
138
|
}
|
|
178
139
|
</script>
|
|
179
140
|
|
|
180
141
|
{#if showModalId === id}
|
|
181
142
|
<!-- Small Modal Component -->
|
|
182
|
-
<div
|
|
183
|
-
{id}
|
|
184
|
-
role="dialog"
|
|
185
|
-
aria-modal="true"
|
|
186
|
-
class="flex overflow-y-auto overflow-x-hidden fixed right-0 left-0 top-20 z-50 justify-center items-center"
|
|
187
|
-
>
|
|
143
|
+
<div {id} role="dialog" aria-modal="true" class="flex overflow-y-auto overflow-x-hidden fixed right-0 left-0 top-20 z-50 justify-center items-center">
|
|
188
144
|
<div class="relative px-4 w-full max-w-md h-full md:h-auto">
|
|
189
145
|
<!-- Modal content -->
|
|
190
146
|
<div class={divClass}>
|
|
@@ -194,17 +150,7 @@ else {
|
|
|
194
150
|
{title}
|
|
195
151
|
</h3>
|
|
196
152
|
<button type="button" class={buttonClass} on:click={closeModal}>
|
|
197
|
-
<svg
|
|
198
|
-
class="w-5 h-5"
|
|
199
|
-
fill="currentColor"
|
|
200
|
-
viewBox="0 0 20 20"
|
|
201
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
202
|
-
><path
|
|
203
|
-
fill-rule="evenodd"
|
|
204
|
-
d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
|
|
205
|
-
clip-rule="evenodd"
|
|
206
|
-
/></svg
|
|
207
|
-
>
|
|
153
|
+
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd" /></svg>
|
|
208
154
|
</button>
|
|
209
155
|
</div>
|
|
210
156
|
<!-- Modal body -->
|
|
@@ -226,8 +172,5 @@ else {
|
|
|
226
172
|
</div>
|
|
227
173
|
</div>
|
|
228
174
|
|
|
229
|
-
<div
|
|
230
|
-
on:click={closeModal}
|
|
231
|
-
class="bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40 w-full h-full"
|
|
232
|
-
/>
|
|
175
|
+
<div on:click={closeModal} class="bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40 w-full h-full" />
|
|
233
176
|
{/if}
|
|
@@ -25,57 +25,19 @@ export let liButtonClass = `flex justify-between items-center py-2 pr-4 pl-3 w-f
|
|
|
25
25
|
<img src={logo} {alt} />
|
|
26
26
|
<span class={spanClass}>{sitename}</span>
|
|
27
27
|
</a>
|
|
28
|
-
<button
|
|
29
|
-
on:click={handleClickbtn}
|
|
30
|
-
type="button"
|
|
31
|
-
class={buttonClass}
|
|
32
|
-
aria-controls="mobile-menu-2"
|
|
33
|
-
aria-expanded="false"
|
|
34
|
-
>
|
|
28
|
+
<button on:click={handleClickbtn} type="button" class={buttonClass} aria-controls="mobile-menu-2" aria-expanded="false">
|
|
35
29
|
<span class="sr-only">Open main menu</span>
|
|
36
|
-
<svg
|
|
37
|
-
|
|
38
|
-
fill="currentColor"
|
|
39
|
-
viewBox="0 0 20 20"
|
|
40
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
41
|
-
><path
|
|
42
|
-
fill-rule="evenodd"
|
|
43
|
-
d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
|
|
44
|
-
clip-rule="evenodd"
|
|
45
|
-
/></svg
|
|
46
|
-
>
|
|
47
|
-
<svg
|
|
48
|
-
class="hidden w-6 h-6"
|
|
49
|
-
fill="currentColor"
|
|
50
|
-
viewBox="0 0 20 20"
|
|
51
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
52
|
-
><path
|
|
53
|
-
fill-rule="evenodd"
|
|
54
|
-
d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
|
|
55
|
-
clip-rule="evenodd"
|
|
56
|
-
/></svg
|
|
57
|
-
>
|
|
30
|
+
<svg class="w-6 h-6" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z" clip-rule="evenodd" /></svg>
|
|
31
|
+
<svg class="hidden w-6 h-6" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd" /></svg>
|
|
58
32
|
</button>
|
|
59
33
|
<div class="w-full md:block md:w-auto" class:hidden={barHidden} id="mobile-menu">
|
|
60
34
|
<ul class="flex flex-col mt-4 md:flex-row md:space-x-8 md:mt-0 md:text-sm md:font-medium">
|
|
61
35
|
{#each menus as { name, href, rel, child }}
|
|
62
36
|
{#if child}
|
|
63
|
-
<NavDropdown
|
|
64
|
-
{liButtonClass}
|
|
65
|
-
{dropdownDiv}
|
|
66
|
-
{name}
|
|
67
|
-
{child}
|
|
68
|
-
{rel}
|
|
69
|
-
{dropdownLinkClassWithChild}
|
|
70
|
-
/>
|
|
37
|
+
<NavDropdown {liButtonClass} {dropdownDiv} {name} {child} {rel} {dropdownLinkClassWithChild} />
|
|
71
38
|
{:else}
|
|
72
39
|
<li>
|
|
73
|
-
<a
|
|
74
|
-
class:active={$page.url.pathname === href}
|
|
75
|
-
{href}
|
|
76
|
-
{rel}
|
|
77
|
-
class={dropdownLinkClassWithoutChild}>{name}</a
|
|
78
|
-
>
|
|
40
|
+
<a class:active={$page.url.pathname === href} {href} {rel} class={dropdownLinkClassWithoutChild}>{name}</a>
|
|
79
41
|
</li>
|
|
80
42
|
{/if}
|
|
81
43
|
{/each}
|
package/navbar/Navbar.svelte
CHANGED
|
@@ -21,43 +21,16 @@ export let liLinkClass = `block py-2 pr-4 pl-3 text-gray-700 border-b border-gr
|
|
|
21
21
|
<img src={logo} {alt} />
|
|
22
22
|
<span class={spanClass}>{name}</span>
|
|
23
23
|
</a>
|
|
24
|
-
<button
|
|
25
|
-
on:click={handleClickbtn}
|
|
26
|
-
type="button"
|
|
27
|
-
class={buttonClass}
|
|
28
|
-
aria-controls="mobile-menu-2"
|
|
29
|
-
aria-expanded="false"
|
|
30
|
-
>
|
|
24
|
+
<button on:click={handleClickbtn} type="button" class={buttonClass} aria-controls="mobile-menu-2" aria-expanded="false">
|
|
31
25
|
<span class="sr-only">Open main menu</span>
|
|
32
|
-
<svg
|
|
33
|
-
|
|
34
|
-
fill="currentColor"
|
|
35
|
-
viewBox="0 0 20 20"
|
|
36
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
37
|
-
><path
|
|
38
|
-
fill-rule="evenodd"
|
|
39
|
-
d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
|
|
40
|
-
clip-rule="evenodd"
|
|
41
|
-
/></svg
|
|
42
|
-
>
|
|
43
|
-
<svg
|
|
44
|
-
class="hidden w-6 h-6"
|
|
45
|
-
fill="currentColor"
|
|
46
|
-
viewBox="0 0 20 20"
|
|
47
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
48
|
-
><path
|
|
49
|
-
fill-rule="evenodd"
|
|
50
|
-
d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
|
|
51
|
-
clip-rule="evenodd"
|
|
52
|
-
/></svg
|
|
53
|
-
>
|
|
26
|
+
<svg class="w-6 h-6" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z" clip-rule="evenodd" /></svg>
|
|
27
|
+
<svg class="hidden w-6 h-6" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd" /></svg>
|
|
54
28
|
</button>
|
|
55
29
|
<div class:hidden={barHidden} class="hidden w-full md:block md:w-auto" id="mobile-menu">
|
|
56
30
|
<ul class="flex flex-col mt-4 md:flex-row md:space-x-8 md:mt-0 md:text-sm md:font-medium">
|
|
57
31
|
{#each menus as { name, href, rel }}
|
|
58
32
|
<li>
|
|
59
|
-
<a class:active={$page.url.pathname === href} {href} {rel} class={liLinkClass}>{name}</a
|
|
60
|
-
>
|
|
33
|
+
<a class:active={$page.url.pathname === href} {href} {rel} class={liLinkClass}>{name}</a>
|
|
61
34
|
</li>
|
|
62
35
|
{/each}
|
|
63
36
|
</ul>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowbite-svelte",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.2",
|
|
4
4
|
"description": "Flowbite components for Svelte",
|
|
5
5
|
"main": "./package/index.js",
|
|
6
6
|
"author": {
|
|
@@ -137,6 +137,7 @@
|
|
|
137
137
|
"./spinners/Spinner.svelte": "./spinners/Spinner.svelte",
|
|
138
138
|
"./spinners/SpinnerButton.svelte": "./spinners/SpinnerButton.svelte",
|
|
139
139
|
"./tables/Table.svelte": "./tables/Table.svelte",
|
|
140
|
+
"./tables/TableDefaultRow.svelte": "./tables/TableDefaultRow.svelte",
|
|
140
141
|
"./tabs/DefaultTabs.svelte": "./tabs/DefaultTabs.svelte",
|
|
141
142
|
"./tabs/FullWidthTabs.svelte": "./tabs/FullWidthTabs.svelte",
|
|
142
143
|
"./tabs/IconTabs.svelte": "./tabs/IconTabs.svelte",
|
|
@@ -158,7 +159,8 @@
|
|
|
158
159
|
"./toasts/Toast.svelte": "./toasts/Toast.svelte",
|
|
159
160
|
"./tooltips/LightTooltip.svelte": "./tooltips/LightTooltip.svelte",
|
|
160
161
|
"./tooltips/Tooltip.svelte": "./tooltips/Tooltip.svelte",
|
|
161
|
-
"./types": "./types.js"
|
|
162
|
+
"./types": "./types.js",
|
|
163
|
+
"./utils/generateId": "./utils/generateId.js"
|
|
162
164
|
},
|
|
163
165
|
"svelte": "./index.js"
|
|
164
166
|
}
|
package/paginations/Next.svelte
CHANGED
|
@@ -13,16 +13,6 @@ if (!icon) {
|
|
|
13
13
|
<a href="/" on:click|preventDefault={next} class={nextClass}>
|
|
14
14
|
Next
|
|
15
15
|
{#if icon}
|
|
16
|
-
<svg
|
|
17
|
-
class="ml-2 w-5 h-5"
|
|
18
|
-
fill="currentColor"
|
|
19
|
-
viewBox="0 0 20 20"
|
|
20
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
21
|
-
><path
|
|
22
|
-
fill-rule="evenodd"
|
|
23
|
-
d="M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z"
|
|
24
|
-
clip-rule="evenodd"
|
|
25
|
-
/></svg
|
|
26
|
-
>
|
|
16
|
+
<svg class="ml-2 w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z" clip-rule="evenodd" /></svg>
|
|
27
17
|
{/if}
|
|
28
18
|
</a>
|
|
@@ -22,17 +22,7 @@ export let iconNextClass = 'block py-2 px-3 leading-tight text-gray-500 bg-white
|
|
|
22
22
|
{#if icon}
|
|
23
23
|
<a href="/" on:click|preventDefault={previous} class={iconPreviousClass}>
|
|
24
24
|
<span class="sr-only">Previous</span>
|
|
25
|
-
<svg
|
|
26
|
-
class="w-5 h-5"
|
|
27
|
-
fill="currentColor"
|
|
28
|
-
viewBox="0 0 20 20"
|
|
29
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
30
|
-
><path
|
|
31
|
-
fill-rule="evenodd"
|
|
32
|
-
d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z"
|
|
33
|
-
clip-rule="evenodd"
|
|
34
|
-
/></svg
|
|
35
|
-
>
|
|
25
|
+
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" clip-rule="evenodd" /></svg>
|
|
36
26
|
</a>
|
|
37
27
|
{:else}
|
|
38
28
|
<a href="/" on:click|preventDefault={previous} class={previousClass}>Previous</a>
|
|
@@ -47,17 +37,7 @@ export let iconNextClass = 'block py-2 px-3 leading-tight text-gray-500 bg-white
|
|
|
47
37
|
{#if icon}
|
|
48
38
|
<a href="/" on:click|preventDefault={next} class={iconNextClass}>
|
|
49
39
|
<span class="sr-only">Next</span>
|
|
50
|
-
<svg
|
|
51
|
-
class="w-5 h-5"
|
|
52
|
-
fill="currentColor"
|
|
53
|
-
viewBox="0 0 20 20"
|
|
54
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
55
|
-
><path
|
|
56
|
-
fill-rule="evenodd"
|
|
57
|
-
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
|
|
58
|
-
clip-rule="evenodd"
|
|
59
|
-
/></svg
|
|
60
|
-
>
|
|
40
|
+
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" /></svg>
|
|
61
41
|
</a>
|
|
62
42
|
{:else}
|
|
63
43
|
<a href="/" on:click|preventDefault={next} class={nextClass}>Next</a>
|
|
@@ -12,17 +12,7 @@ if (icon) {
|
|
|
12
12
|
|
|
13
13
|
<a href="/" on:click|preventDefault={previous} class={previousClass}>
|
|
14
14
|
{#if icon}
|
|
15
|
-
<svg
|
|
16
|
-
class="mr-2 w-5 h-5"
|
|
17
|
-
fill="currentColor"
|
|
18
|
-
viewBox="0 0 20 20"
|
|
19
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
20
|
-
><path
|
|
21
|
-
fill-rule="evenodd"
|
|
22
|
-
d="M7.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l2.293 2.293a1 1 0 010 1.414z"
|
|
23
|
-
clip-rule="evenodd"
|
|
24
|
-
/></svg
|
|
25
|
-
>
|
|
15
|
+
<svg class="mr-2 w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M7.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l2.293 2.293a1 1 0 010 1.414z" clip-rule="evenodd" /></svg>
|
|
26
16
|
{/if}
|
|
27
17
|
Previous
|
|
28
18
|
</a>
|
|
@@ -1,41 +1,44 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
<script >export let progress = '45';
|
|
2
|
+
export let size = 'h-2.5';
|
|
3
|
+
export let labelInside = false;
|
|
4
|
+
export let labelOutside = '';
|
|
5
|
+
export let color = 'blue';
|
|
6
|
+
let barColor;
|
|
7
|
+
if (color === 'blue') {
|
|
8
|
+
barColor = 'bg-blue-600';
|
|
9
|
+
}
|
|
10
|
+
else if (color === 'gray') {
|
|
11
|
+
barColor = 'bg-gray-600 dark:bg-gray-300';
|
|
12
|
+
}
|
|
13
|
+
else if (color === 'red') {
|
|
14
|
+
barColor = 'bg-red-600 dark:bg-red-500';
|
|
15
|
+
}
|
|
16
|
+
else if (color === 'green') {
|
|
17
|
+
barColor = 'bg-green-600 dark:bg-green-500';
|
|
18
|
+
}
|
|
19
|
+
else if (color === 'yellow') {
|
|
20
|
+
barColor = 'bg-yellow-400 ';
|
|
21
|
+
}
|
|
22
|
+
else if (color === 'purple') {
|
|
23
|
+
barColor = 'bg-purple-600 dark:bg-purple-500';
|
|
24
|
+
}
|
|
25
|
+
else if (color === 'indigo') {
|
|
26
|
+
barColor = 'bg-indigo-600 dark:bg-indigo-500';
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
barColor = 'bg-blue-600 dark:bg-blue-500';
|
|
30
|
+
}
|
|
25
31
|
</script>
|
|
26
32
|
|
|
27
|
-
{#if
|
|
33
|
+
{#if labelOutside}
|
|
28
34
|
<div class="flex justify-between mb-1">
|
|
29
|
-
<span class="text-base font-medium text-blue-700 dark:text-white">{
|
|
35
|
+
<span class="text-base font-medium text-blue-700 dark:text-white">{labelOutside}</span>
|
|
30
36
|
<span class="text-sm font-medium text-blue-700 dark:text-white">{progress}%</span>
|
|
31
37
|
</div>
|
|
32
38
|
{/if}
|
|
33
39
|
<div class="w-full bg-gray-200 rounded-full {size} dark:bg-gray-700">
|
|
34
|
-
{#if
|
|
35
|
-
<div
|
|
36
|
-
class="bg-blue-600 text-xs font-medium text-blue-100 text-center p-0.5 leading-none rounded-full"
|
|
37
|
-
style="width: {progress}%"
|
|
38
|
-
>
|
|
40
|
+
{#if labelInside}
|
|
41
|
+
<div class="bg-blue-600 text-xs font-medium text-blue-100 text-center p-0.5 leading-none rounded-full" style="width: {progress}%">
|
|
39
42
|
{progress}%
|
|
40
43
|
</div>
|
|
41
44
|
{:else}
|
|
@@ -1,31 +1,21 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} ProgressbarProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} ProgressbarEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} ProgressbarSlots */
|
|
4
|
-
export default class Progressbar extends SvelteComponentTyped<{
|
|
5
|
-
progress?: string;
|
|
6
|
-
color?: string;
|
|
7
|
-
label?: string;
|
|
8
|
-
size?: string;
|
|
9
|
-
position?: string;
|
|
10
|
-
}, {
|
|
11
|
-
[evt: string]: CustomEvent<any>;
|
|
12
|
-
}, {}> {
|
|
13
|
-
}
|
|
14
|
-
export type ProgressbarProps = typeof __propDef.props;
|
|
15
|
-
export type ProgressbarEvents = typeof __propDef.events;
|
|
16
|
-
export type ProgressbarSlots = typeof __propDef.slots;
|
|
17
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { Colors } from '../types';
|
|
18
3
|
declare const __propDef: {
|
|
19
4
|
props: {
|
|
20
5
|
progress?: string;
|
|
21
|
-
color?: string;
|
|
22
|
-
label?: string;
|
|
23
6
|
size?: string;
|
|
24
|
-
|
|
7
|
+
labelInside?: boolean;
|
|
8
|
+
labelOutside?: string;
|
|
9
|
+
color?: Colors;
|
|
25
10
|
};
|
|
26
11
|
events: {
|
|
27
12
|
[evt: string]: CustomEvent<any>;
|
|
28
13
|
};
|
|
29
14
|
slots: {};
|
|
30
15
|
};
|
|
16
|
+
export declare type ProgressbarProps = typeof __propDef.props;
|
|
17
|
+
export declare type ProgressbarEvents = typeof __propDef.events;
|
|
18
|
+
export declare type ProgressbarSlots = typeof __propDef.slots;
|
|
19
|
+
export default class Progressbar extends SvelteComponentTyped<ProgressbarProps, ProgressbarEvents, ProgressbarSlots> {
|
|
20
|
+
}
|
|
31
21
|
export {};
|
package/spinners/Spinner.svelte
CHANGED
|
@@ -31,17 +31,8 @@ else {
|
|
|
31
31
|
|
|
32
32
|
{#if align}
|
|
33
33
|
<div class={align}>
|
|
34
|
-
<svg
|
|
35
|
-
|
|
36
|
-
class="inline mr-2 {size} {bg} animate-spin dark:text-gray-600 {colorClass}"
|
|
37
|
-
viewBox="0 0 100 101"
|
|
38
|
-
fill="none"
|
|
39
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
40
|
-
>
|
|
41
|
-
<path
|
|
42
|
-
d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z"
|
|
43
|
-
fill="currentColor"
|
|
44
|
-
/>
|
|
34
|
+
<svg role="status" class="inline mr-2 {size} {bg} animate-spin dark:text-gray-600 {colorClass}" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
35
|
+
<path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor" />
|
|
45
36
|
<path
|
|
46
37
|
d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z"
|
|
47
38
|
fill="currentFill"
|
|
@@ -49,17 +40,8 @@ else {
|
|
|
49
40
|
</svg>
|
|
50
41
|
</div>
|
|
51
42
|
{:else}
|
|
52
|
-
<svg
|
|
53
|
-
|
|
54
|
-
class="inline mr-2 {size} {bg} animate-spin dark:text-gray-600 {colorClass}"
|
|
55
|
-
viewBox="0 0 100 101"
|
|
56
|
-
fill="none"
|
|
57
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
58
|
-
>
|
|
59
|
-
<path
|
|
60
|
-
d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z"
|
|
61
|
-
fill="currentColor"
|
|
62
|
-
/>
|
|
43
|
+
<svg role="status" class="inline mr-2 {size} {bg} animate-spin dark:text-gray-600 {colorClass}" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
44
|
+
<path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor" />
|
|
63
45
|
<path
|
|
64
46
|
d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z"
|
|
65
47
|
fill="currentFill"
|