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
|
@@ -32,157 +32,116 @@ if (textColor === 'blue') {
|
|
|
32
32
|
divClass = 'relative bg-white rounded-lg shadow dark:bg-blue-700';
|
|
33
33
|
headDivClass = 'flex justify-between items-start p-5 rounded-t border-b dark:border-blue-600';
|
|
34
34
|
h3Class = 'text-xl font-semibold text-blue-900 lg:text-2xl dark:text-white';
|
|
35
|
-
buttonClass =
|
|
36
|
-
'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';
|
|
35
|
+
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';
|
|
37
36
|
pClass = 'text-base leading-relaxed text-blue-500 dark:text-blue-400';
|
|
38
|
-
footerClass =
|
|
39
|
-
|
|
40
|
-
btn2Class =
|
|
41
|
-
'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';
|
|
37
|
+
footerClass = 'flex items-center p-6 space-x-2 rounded-b border-t border-blue-200 dark:border-blue-600';
|
|
38
|
+
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';
|
|
42
39
|
}
|
|
43
40
|
else if (textColor === 'gray') {
|
|
44
41
|
divClass = 'relative bg-white rounded-lg shadow dark:bg-gray-700';
|
|
45
42
|
headDivClass = 'flex justify-between items-start p-5 rounded-t border-b dark:border-gray-600';
|
|
46
43
|
h3Class = 'text-xl font-semibold text-gray-900 lg:text-2xl dark:text-white';
|
|
47
|
-
buttonClass =
|
|
48
|
-
'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';
|
|
44
|
+
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';
|
|
49
45
|
pClass = 'text-base leading-relaxed text-gray-500 dark:text-gray-400';
|
|
50
|
-
footerClass =
|
|
51
|
-
|
|
52
|
-
btn2Class =
|
|
53
|
-
'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';
|
|
46
|
+
footerClass = 'flex items-center p-6 space-x-2 rounded-b border-t border-gray-200 dark:border-gray-600';
|
|
47
|
+
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';
|
|
54
48
|
}
|
|
55
49
|
else if (textColor === 'red') {
|
|
56
50
|
divClass = 'relative bg-white rounded-lg shadow dark:bg-red-700';
|
|
57
51
|
headDivClass = 'flex justify-between items-start p-5 rounded-t border-b dark:border-red-600';
|
|
58
52
|
h3Class = 'text-xl font-semibold text-red-900 lg:text-2xl dark:text-white';
|
|
59
|
-
buttonClass =
|
|
60
|
-
'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';
|
|
53
|
+
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';
|
|
61
54
|
pClass = 'text-base leading-relaxed text-red-500 dark:text-red-400';
|
|
62
|
-
footerClass =
|
|
63
|
-
|
|
64
|
-
btn2Class =
|
|
65
|
-
'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';
|
|
55
|
+
footerClass = 'flex items-center p-6 space-x-2 rounded-b border-t border-red-200 dark:border-red-600';
|
|
56
|
+
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';
|
|
66
57
|
}
|
|
67
58
|
else if (textColor === 'yellow') {
|
|
68
59
|
divClass = 'relative bg-white rounded-lg shadow dark:bg-yellow-700';
|
|
69
60
|
headDivClass = 'flex justify-between items-start p-5 rounded-t border-b dark:border-yellow-600';
|
|
70
61
|
h3Class = 'text-xl font-semibold text-yellow-900 lg:text-2xl 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';
|
|
62
|
+
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
63
|
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';
|
|
64
|
+
footerClass = 'flex items-center p-6 space-x-2 rounded-b border-t border-yellow-200 dark:border-yellow-600';
|
|
65
|
+
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
66
|
}
|
|
79
67
|
else if (textColor === 'green') {
|
|
80
68
|
divClass = 'relative bg-white rounded-lg shadow dark:bg-green-700';
|
|
81
69
|
headDivClass = 'flex justify-between items-start p-5 rounded-t border-b dark:border-green-600';
|
|
82
70
|
h3Class = 'text-xl font-semibold text-green-900 lg:text-2xl 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';
|
|
71
|
+
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
72
|
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';
|
|
73
|
+
footerClass = 'flex items-center p-6 space-x-2 rounded-b border-t border-green-200 dark:border-green-600';
|
|
74
|
+
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
75
|
}
|
|
91
76
|
else if (textColor === 'indigo') {
|
|
92
77
|
divClass = 'relative bg-white rounded-lg shadow dark:bg-indigo-700';
|
|
93
78
|
headDivClass = 'flex justify-between items-start p-5 rounded-t border-b dark:border-indigo-600';
|
|
94
79
|
h3Class = 'text-xl font-semibold text-indigo-900 lg:text-2xl dark:text-white';
|
|
95
|
-
buttonClass =
|
|
96
|
-
'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';
|
|
80
|
+
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';
|
|
97
81
|
pClass = 'text-base leading-relaxed text-indigo-500 dark:text-indigo-400';
|
|
98
|
-
footerClass =
|
|
99
|
-
|
|
100
|
-
btn2Class =
|
|
101
|
-
'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';
|
|
82
|
+
footerClass = 'flex items-center p-6 space-x-2 rounded-b border-t border-indigo-200 dark:border-indigo-600';
|
|
83
|
+
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';
|
|
102
84
|
}
|
|
103
85
|
else if (textColor === 'purple') {
|
|
104
86
|
divClass = 'relative bg-white rounded-lg shadow dark:bg-purple-700';
|
|
105
87
|
headDivClass = 'flex justify-between items-start p-5 rounded-t border-b dark:border-purple-600';
|
|
106
88
|
h3Class = 'text-xl font-semibold text-purple-900 lg:text-2xl dark:text-white';
|
|
107
|
-
buttonClass =
|
|
108
|
-
'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';
|
|
89
|
+
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';
|
|
109
90
|
pClass = 'text-base leading-relaxed text-purple-500 dark:text-purple-400';
|
|
110
|
-
footerClass =
|
|
111
|
-
|
|
112
|
-
btn2Class =
|
|
113
|
-
'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';
|
|
91
|
+
footerClass = 'flex items-center p-6 space-x-2 rounded-b border-t border-purple-200 dark:border-purple-600';
|
|
92
|
+
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';
|
|
114
93
|
}
|
|
115
94
|
else if (textColor === 'pink') {
|
|
116
95
|
divClass = 'relative bg-white rounded-lg shadow dark:bg-pink-700';
|
|
117
96
|
headDivClass = 'flex justify-between items-start p-5 rounded-t border-b dark:border-pink-600';
|
|
118
97
|
h3Class = 'text-xl font-semibold text-pink-900 lg:text-2xl dark:text-white';
|
|
119
|
-
buttonClass =
|
|
120
|
-
'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';
|
|
98
|
+
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';
|
|
121
99
|
pClass = 'text-base leading-relaxed text-pink-500 dark:text-pink-400';
|
|
122
|
-
footerClass =
|
|
123
|
-
|
|
124
|
-
btn2Class =
|
|
125
|
-
'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';
|
|
100
|
+
footerClass = 'flex items-center p-6 space-x-2 rounded-b border-t border-pink-200 dark:border-pink-600';
|
|
101
|
+
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';
|
|
126
102
|
}
|
|
127
103
|
else {
|
|
128
104
|
divClass = 'relative bg-white rounded-lg shadow dark:bg-blue-700';
|
|
129
105
|
headDivClass = 'flex justify-between items-start p-5 rounded-t border-b dark:border-blue-600';
|
|
130
106
|
h3Class = 'text-xl font-semibold text-blue-900 lg:text-2xl dark:text-white';
|
|
131
|
-
buttonClass =
|
|
132
|
-
'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';
|
|
107
|
+
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';
|
|
133
108
|
pClass = 'text-base leading-relaxed text-blue-500 dark:text-blue-400';
|
|
134
|
-
footerClass =
|
|
135
|
-
|
|
136
|
-
btn2Class =
|
|
137
|
-
'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';
|
|
109
|
+
footerClass = 'flex items-center p-6 space-x-2 rounded-b border-t border-blue-200 dark:border-blue-600';
|
|
110
|
+
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';
|
|
138
111
|
}
|
|
139
112
|
let button1Class;
|
|
140
113
|
if (btnColor === 'blue') {
|
|
141
|
-
button1Class =
|
|
142
|
-
'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';
|
|
114
|
+
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';
|
|
143
115
|
}
|
|
144
116
|
else if (btnColor === 'gray') {
|
|
145
|
-
button1Class =
|
|
146
|
-
'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';
|
|
117
|
+
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';
|
|
147
118
|
}
|
|
148
119
|
else if (btnColor === 'red') {
|
|
149
|
-
button1Class =
|
|
150
|
-
'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';
|
|
120
|
+
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';
|
|
151
121
|
}
|
|
152
122
|
else if (btnColor === 'yellow') {
|
|
153
|
-
button1Class =
|
|
154
|
-
'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';
|
|
123
|
+
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';
|
|
155
124
|
}
|
|
156
125
|
else if (btnColor === 'green') {
|
|
157
|
-
button1Class =
|
|
158
|
-
'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';
|
|
126
|
+
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';
|
|
159
127
|
}
|
|
160
128
|
else if (btnColor === 'indigo') {
|
|
161
|
-
button1Class =
|
|
162
|
-
'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';
|
|
129
|
+
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';
|
|
163
130
|
}
|
|
164
131
|
else if (btnColor === 'purple') {
|
|
165
|
-
button1Class =
|
|
166
|
-
'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';
|
|
132
|
+
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';
|
|
167
133
|
}
|
|
168
134
|
else if (btnColor === 'pink') {
|
|
169
|
-
button1Class =
|
|
170
|
-
'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';
|
|
135
|
+
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';
|
|
171
136
|
}
|
|
172
137
|
else {
|
|
173
|
-
button1Class =
|
|
174
|
-
'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';
|
|
138
|
+
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';
|
|
175
139
|
}
|
|
176
140
|
</script>
|
|
177
141
|
|
|
178
142
|
{#if showModalId === id}
|
|
179
143
|
<!-- Main modal -->
|
|
180
|
-
<div
|
|
181
|
-
{id}
|
|
182
|
-
role="dialog"
|
|
183
|
-
aria-modal="true"
|
|
184
|
-
class="flex overflow-y-auto overflow-x-hidden fixed right-0 left-0 top-20 z-50 justify-center items-center"
|
|
185
|
-
>
|
|
144
|
+
<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">
|
|
186
145
|
<div class="relative px-4 w-full max-w-2xl h-full md:h-auto">
|
|
187
146
|
<!-- Modal content -->
|
|
188
147
|
<div class={divClass}>
|
|
@@ -192,17 +151,7 @@ else {
|
|
|
192
151
|
{title}
|
|
193
152
|
</h3>
|
|
194
153
|
<button type="button" class={buttonClass} on:click={closeModal}>
|
|
195
|
-
<svg
|
|
196
|
-
class="w-5 h-5"
|
|
197
|
-
fill="currentColor"
|
|
198
|
-
viewBox="0 0 20 20"
|
|
199
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
200
|
-
><path
|
|
201
|
-
fill-rule="evenodd"
|
|
202
|
-
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"
|
|
203
|
-
clip-rule="evenodd"
|
|
204
|
-
/></svg
|
|
205
|
-
>
|
|
154
|
+
<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>
|
|
206
155
|
</button>
|
|
207
156
|
</div>
|
|
208
157
|
<!-- Modal body -->
|
|
@@ -226,8 +175,5 @@ else {
|
|
|
226
175
|
</div>
|
|
227
176
|
</div>
|
|
228
177
|
|
|
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
|
-
/>
|
|
178
|
+
<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
179
|
{/if}
|
|
@@ -4,47 +4,38 @@ export let id = 'modal-id';
|
|
|
4
4
|
export let btnName = 'Modal Name';
|
|
5
5
|
export let btnColor = 'blue';
|
|
6
6
|
let showModalId;
|
|
7
|
-
export
|
|
7
|
+
export const openFn = (id) => {
|
|
8
8
|
modalIdStore.update((n) => (n = id));
|
|
9
9
|
showModalId = get(modalIdStore);
|
|
10
10
|
// console.log('showModalId', showModalId);
|
|
11
11
|
};
|
|
12
12
|
let buttonClass;
|
|
13
13
|
if (btnColor === 'blue') {
|
|
14
|
-
buttonClass =
|
|
15
|
-
'block w-full md:w-auto 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';
|
|
14
|
+
buttonClass = 'block w-full md:w-auto 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';
|
|
16
15
|
}
|
|
17
16
|
else if (btnColor === 'gray') {
|
|
18
|
-
buttonClass =
|
|
19
|
-
'block w-full md:w-auto 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';
|
|
17
|
+
buttonClass = 'block w-full md:w-auto 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';
|
|
20
18
|
}
|
|
21
19
|
else if (btnColor === 'red') {
|
|
22
|
-
buttonClass =
|
|
23
|
-
'block w-full md:w-auto 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';
|
|
20
|
+
buttonClass = 'block w-full md:w-auto 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';
|
|
24
21
|
}
|
|
25
22
|
else if (btnColor === 'yellow') {
|
|
26
|
-
buttonClass =
|
|
27
|
-
'block w-full md:w-auto 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';
|
|
23
|
+
buttonClass = 'block w-full md:w-auto 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';
|
|
28
24
|
}
|
|
29
25
|
else if (btnColor === 'green') {
|
|
30
|
-
buttonClass =
|
|
31
|
-
'block w-full md:w-auto 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';
|
|
26
|
+
buttonClass = 'block w-full md:w-auto 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';
|
|
32
27
|
}
|
|
33
28
|
else if (btnColor === 'indigo') {
|
|
34
|
-
buttonClass =
|
|
35
|
-
'block w-full md:w-auto 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';
|
|
29
|
+
buttonClass = 'block w-full md:w-auto 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';
|
|
36
30
|
}
|
|
37
31
|
else if (btnColor === 'purple') {
|
|
38
|
-
buttonClass =
|
|
39
|
-
'block w-full md:w-auto 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';
|
|
32
|
+
buttonClass = 'block w-full md:w-auto 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';
|
|
40
33
|
}
|
|
41
34
|
else if (btnColor === 'pink') {
|
|
42
|
-
buttonClass =
|
|
43
|
-
'block w-full md:w-auto 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';
|
|
35
|
+
buttonClass = 'block w-full md:w-auto 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';
|
|
44
36
|
}
|
|
45
37
|
else {
|
|
46
|
-
buttonClass =
|
|
47
|
-
'block w-full md:w-auto 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';
|
|
38
|
+
buttonClass = 'block w-full md:w-auto 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';
|
|
48
39
|
}
|
|
49
40
|
</script>
|
|
50
41
|
|
|
@@ -16,5 +16,6 @@ export declare type ModalButtonProps = typeof __propDef.props;
|
|
|
16
16
|
export declare type ModalButtonEvents = typeof __propDef.events;
|
|
17
17
|
export declare type ModalButtonSlots = typeof __propDef.slots;
|
|
18
18
|
export default class ModalButton extends SvelteComponentTyped<ModalButtonProps, ModalButtonEvents, ModalButtonSlots> {
|
|
19
|
+
get openFn(): (id: string) => void;
|
|
19
20
|
}
|
|
20
21
|
export {};
|
|
@@ -16,69 +16,41 @@ modalIdStore.subscribe((value) => {
|
|
|
16
16
|
});
|
|
17
17
|
let submitClass;
|
|
18
18
|
if (btnSignInColor === 'blue') {
|
|
19
|
-
submitClass =
|
|
20
|
-
'w-full 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';
|
|
19
|
+
submitClass = 'w-full 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';
|
|
21
20
|
}
|
|
22
21
|
else if (btnSignInColor === 'gray') {
|
|
23
|
-
submitClass =
|
|
24
|
-
'w-full 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';
|
|
22
|
+
submitClass = 'w-full 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';
|
|
25
23
|
}
|
|
26
24
|
else if (btnSignInColor === 'red') {
|
|
27
|
-
submitClass =
|
|
28
|
-
'w-full 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';
|
|
25
|
+
submitClass = 'w-full 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';
|
|
29
26
|
}
|
|
30
27
|
else if (btnSignInColor === 'yellow') {
|
|
31
|
-
submitClass =
|
|
32
|
-
'w-full 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';
|
|
28
|
+
submitClass = 'w-full 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';
|
|
33
29
|
}
|
|
34
30
|
else if (btnSignInColor === 'green') {
|
|
35
|
-
submitClass =
|
|
36
|
-
'w-full 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';
|
|
31
|
+
submitClass = 'w-full 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';
|
|
37
32
|
}
|
|
38
33
|
else if (btnSignInColor === 'indigo') {
|
|
39
|
-
submitClass =
|
|
40
|
-
'w-full 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';
|
|
34
|
+
submitClass = 'w-full 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';
|
|
41
35
|
}
|
|
42
36
|
else if (btnSignInColor === 'purple') {
|
|
43
|
-
submitClass =
|
|
44
|
-
'w-full 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';
|
|
37
|
+
submitClass = 'w-full 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';
|
|
45
38
|
}
|
|
46
39
|
else if (btnSignInColor === 'pink') {
|
|
47
|
-
submitClass =
|
|
48
|
-
'w-full 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';
|
|
40
|
+
submitClass = 'w-full 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';
|
|
49
41
|
}
|
|
50
42
|
else {
|
|
51
|
-
submitClass =
|
|
52
|
-
'w-full 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';
|
|
43
|
+
submitClass = 'w-full 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';
|
|
53
44
|
}
|
|
54
45
|
</script>
|
|
55
46
|
|
|
56
47
|
{#if showModalId === id}
|
|
57
|
-
<div
|
|
58
|
-
{id}
|
|
59
|
-
role="dialog"
|
|
60
|
-
aria-modal="true"
|
|
61
|
-
class="flex overflow-y-auto overflow-x-hidden fixed right-0 left-0 top-20 z-50 justify-center items-center"
|
|
62
|
-
>
|
|
48
|
+
<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">
|
|
63
49
|
<div class="relative px-4 w-full max-w-md h-full md:h-auto">
|
|
64
50
|
<div class="relative bg-white rounded-lg shadow dark:bg-gray-700">
|
|
65
51
|
<div class="flex justify-end p-2">
|
|
66
|
-
<button
|
|
67
|
-
|
|
68
|
-
class="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-800 dark:hover:text-white"
|
|
69
|
-
on:click={closeModal}
|
|
70
|
-
>
|
|
71
|
-
<svg
|
|
72
|
-
class="w-5 h-5"
|
|
73
|
-
fill="currentColor"
|
|
74
|
-
viewBox="0 0 20 20"
|
|
75
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
76
|
-
><path
|
|
77
|
-
fill-rule="evenodd"
|
|
78
|
-
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"
|
|
79
|
-
clip-rule="evenodd"
|
|
80
|
-
/></svg
|
|
81
|
-
>
|
|
52
|
+
<button type="button" class="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-800 dark:hover:text-white" on:click={closeModal}>
|
|
53
|
+
<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>
|
|
82
54
|
</button>
|
|
83
55
|
</div>
|
|
84
56
|
<form class="px-6 pb-4 space-y-6 lg:px-8 sm:pb-6 xl:pb-8" {action}>
|
|
@@ -86,81 +58,37 @@ else {
|
|
|
86
58
|
{titleSignIn}
|
|
87
59
|
</h3>
|
|
88
60
|
<div>
|
|
89
|
-
<label
|
|
90
|
-
|
|
91
|
-
class="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300"
|
|
92
|
-
>Your email</label
|
|
93
|
-
>
|
|
94
|
-
<input
|
|
95
|
-
type="email"
|
|
96
|
-
name="email"
|
|
97
|
-
id="email-{id}"
|
|
98
|
-
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white"
|
|
99
|
-
placeholder={emailPlaceholder}
|
|
100
|
-
required
|
|
101
|
-
/>
|
|
61
|
+
<label for="email-{id}" class="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300">Your email</label>
|
|
62
|
+
<input type="email" name="email" id="email-{id}" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white" placeholder={emailPlaceholder} required />
|
|
102
63
|
</div>
|
|
103
64
|
<div>
|
|
104
|
-
<label
|
|
105
|
-
|
|
106
|
-
class="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300"
|
|
107
|
-
>Your password</label
|
|
108
|
-
>
|
|
109
|
-
<input
|
|
110
|
-
type="password"
|
|
111
|
-
name="password"
|
|
112
|
-
id="password-{id}"
|
|
113
|
-
placeholder="••••••••"
|
|
114
|
-
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white"
|
|
115
|
-
required
|
|
116
|
-
/>
|
|
65
|
+
<label for="password-{id}" class="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300">Your password</label>
|
|
66
|
+
<input type="password" name="password" id="password-{id}" placeholder="••••••••" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white" required />
|
|
117
67
|
</div>
|
|
118
68
|
<div class="flex justify-between">
|
|
119
69
|
{#if rememberMe}
|
|
120
70
|
<div class="flex items-start">
|
|
121
71
|
<div class="flex items-center h-5">
|
|
122
|
-
<input
|
|
123
|
-
id="remember-{id}"
|
|
124
|
-
aria-describedby="remember"
|
|
125
|
-
type="checkbox"
|
|
126
|
-
class="w-4 h-4 bg-gray-50 rounded border border-gray-300 focus:ring-3 focus:ring-blue-300 dark:bg-gray-700 dark:border-gray-600 dark:focus:ring-blue-600 dark:ring-offset-gray-800"
|
|
127
|
-
/>
|
|
72
|
+
<input id="remember-{id}" aria-describedby="remember" type="checkbox" class="w-4 h-4 bg-gray-50 rounded border border-gray-300 focus:ring-3 focus:ring-blue-300 dark:bg-gray-700 dark:border-gray-600 dark:focus:ring-blue-600 dark:ring-offset-gray-800" />
|
|
128
73
|
</div>
|
|
129
74
|
<div class="ml-3 text-sm">
|
|
130
|
-
<label for="remember" class="font-medium text-gray-900 dark:text-gray-300"
|
|
131
|
-
>Remember me</label
|
|
132
|
-
>
|
|
75
|
+
<label for="remember" class="font-medium text-gray-900 dark:text-gray-300">Remember me</label>
|
|
133
76
|
</div>
|
|
134
77
|
</div>
|
|
135
78
|
{/if}
|
|
136
79
|
{#if lostPasswordLink}
|
|
137
|
-
<a
|
|
138
|
-
href={lostPasswordLink}
|
|
139
|
-
rel="external"
|
|
140
|
-
class="text-sm text-blue-700 hover:underline dark:text-blue-500"
|
|
141
|
-
><button type="button" on:click={closeModal}>Lost Password?</button></a
|
|
142
|
-
>
|
|
80
|
+
<a href={lostPasswordLink} rel="external" class="text-sm text-blue-700 hover:underline dark:text-blue-500"><button type="button" on:click={closeModal}>Lost Password?</button></a>
|
|
143
81
|
{/if}
|
|
144
82
|
</div>
|
|
145
|
-
<button type="submit" class={submitClass} on:click={closeModal}
|
|
146
|
-
>Login to your account</button
|
|
147
|
-
>
|
|
83
|
+
<button type="submit" class={submitClass} on:click={closeModal}>Login to your account</button>
|
|
148
84
|
{#if signUp}
|
|
149
85
|
<div class="text-sm font-medium text-gray-500 dark:text-gray-300">
|
|
150
|
-
Not registered? <a
|
|
151
|
-
href={signUp}
|
|
152
|
-
rel="external"
|
|
153
|
-
class="text-blue-700 hover:underline dark:text-blue-500"
|
|
154
|
-
><button type="button" on:click={closeModal}>Create account</button></a
|
|
155
|
-
>
|
|
86
|
+
Not registered? <a href={signUp} rel="external" class="text-blue-700 hover:underline dark:text-blue-500"><button type="button" on:click={closeModal}>Create account</button></a>
|
|
156
87
|
</div>
|
|
157
88
|
{/if}
|
|
158
89
|
</form>
|
|
159
90
|
</div>
|
|
160
91
|
</div>
|
|
161
92
|
</div>
|
|
162
|
-
<div
|
|
163
|
-
on:click={closeModal}
|
|
164
|
-
class="bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40 w-full h-full"
|
|
165
|
-
/>
|
|
93
|
+
<div on:click={closeModal} class="bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40 w-full h-full" />
|
|
166
94
|
{/if}
|