fluid-ui-svelte 0.2.4 → 0.3.1
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/LICENSE +22 -0
- package/README.md +16 -5
- package/dist/app.css +284 -0
- package/dist/base/Button.svelte +35 -0
- package/dist/base/Button.svelte.d.ts +14 -0
- package/dist/base/Container.svelte +34 -0
- package/dist/base/Container.svelte.d.ts +14 -0
- package/dist/base/Image.svelte +21 -0
- package/dist/base/Image.svelte.d.ts +8 -0
- package/dist/base/InputField.svelte +33 -0
- package/dist/base/InputField.svelte.d.ts +10 -0
- package/dist/base/Link.svelte +23 -0
- package/dist/base/Link.svelte.d.ts +10 -0
- package/dist/base/List.svelte +39 -0
- package/dist/base/List.svelte.d.ts +33 -0
- package/dist/base/Table.svelte +80 -0
- package/dist/base/Table.svelte.d.ts +42 -0
- package/dist/base/Text.svelte +45 -0
- package/dist/base/Text.svelte.d.ts +11 -0
- package/dist/base/index.d.ts +8 -0
- package/dist/base/index.js +8 -0
- package/dist/components/Accordion.svelte +44 -1
- package/dist/components/Accordion.svelte.d.ts +14 -25
- package/dist/components/Calendar.svelte +62 -0
- package/dist/components/Calendar.svelte.d.ts +12 -25
- package/dist/components/Carousel.svelte +114 -0
- package/dist/components/Carousel.svelte.d.ts +37 -0
- package/dist/components/CodeBlock.svelte +33 -0
- package/dist/components/CodeBlock.svelte.d.ts +9 -0
- package/dist/components/Drawer.svelte +77 -22
- package/dist/components/Drawer.svelte.d.ts +21 -6
- package/dist/components/{Badge.svelte.d.ts → ImageCrop.svelte.d.ts} +3 -3
- package/dist/components/Page.svelte +26 -0
- package/dist/components/Page.svelte.d.ts +11 -0
- package/dist/components/Switch.svelte +22 -20
- package/dist/components/Switch.svelte.d.ts +9 -4
- package/dist/components/index.d.ts +8 -0
- package/dist/components/index.js +8 -0
- package/dist/index.d.ts +2 -33
- package/dist/index.js +2 -36
- package/dist/{community/components/index.js → utilities/accesibility.js} +1 -0
- package/dist/utilities/applyCharacterFilter.d.ts +1 -0
- package/dist/utilities/applyCharacterFilter.js +6 -0
- package/dist/utilities/calendar.d.ts +10 -0
- package/dist/utilities/calendar.js +112 -0
- package/dist/utilities/carousel.d.ts +2 -0
- package/dist/utilities/carousel.js +27 -0
- package/dist/utilities/codeBlockContents.d.ts +15 -0
- package/dist/utilities/codeBlockContents.js +298 -0
- package/dist/utilities/imageCrop.d.ts +33 -0
- package/dist/utilities/imageCrop.js +217 -0
- package/dist/utilities/mergeClasses.d.ts +1 -0
- package/dist/utilities/mergeClasses.js +3 -0
- package/package.json +50 -33
- package/dist/community/prebuilt/index.d.ts +0 -1
- package/dist/community/prebuilt/index.js +0 -1
- package/dist/components/Breadcrumb.svelte +0 -1
- package/dist/components/Breadcrumb.svelte.d.ts +0 -26
- package/dist/components/Dropdown.svelte +0 -59
- package/dist/components/Dropdown.svelte.d.ts +0 -20
- package/dist/components/Dropzone.svelte +0 -1
- package/dist/components/Dropzone.svelte.d.ts +0 -26
- package/dist/components/InteractiveScrollArea.svelte +0 -1
- package/dist/components/InteractiveScrollArea.svelte.d.ts +0 -26
- package/dist/components/Pagination.svelte +0 -1
- package/dist/components/Pagination.svelte.d.ts +0 -26
- package/dist/components/Progress.svelte +0 -1
- package/dist/components/Progress.svelte.d.ts +0 -26
- package/dist/components/Tabs.svelte +0 -1
- package/dist/components/Tabs.svelte.d.ts +0 -26
- package/dist/components/Tooltip.svelte +0 -1
- package/dist/components/Tooltip.svelte.d.ts +0 -26
- package/dist/components/charts/BatteryChart.svelte +0 -0
- package/dist/components/charts/BatteryChart.svelte.d.ts +0 -26
- package/dist/components/charts/LineChart.svelte +0 -0
- package/dist/components/charts/LineChart.svelte.d.ts +0 -26
- package/dist/components/charts/PieChart.svelte +0 -0
- package/dist/components/charts/PieChart.svelte.d.ts +0 -26
- package/dist/components/notification/NotificationArea.svelte +0 -21
- package/dist/components/notification/NotificationArea.svelte.d.ts +0 -7
- package/dist/prebuilt/FormBuilder.svelte +0 -1
- package/dist/prebuilt/FormBuilder.svelte.d.ts +0 -26
- package/dist/prebuilt/document/Document.svelte +0 -1
- package/dist/prebuilt/document/Document.svelte.d.ts +0 -26
- package/dist/prebuilt/document/DocumentBlock.svelte +0 -1
- package/dist/prebuilt/document/DocumentBlock.svelte.d.ts +0 -26
- package/dist/prebuilt/document/DocumentPage.svelte +0 -1
- package/dist/prebuilt/document/DocumentPage.svelte.d.ts +0 -26
- package/dist/prebuilt/timeline/Timeline.svelte +0 -0
- package/dist/prebuilt/timeline/Timeline.svelte.d.ts +0 -26
- package/dist/prebuilt/timeline/TimelineItem.svelte +0 -0
- package/dist/prebuilt/timeline/TimelineItem.svelte.d.ts +0 -26
- package/dist/primitives/Button.svelte +0 -53
- package/dist/primitives/Button.svelte.d.ts +0 -13
- package/dist/primitives/Container.svelte +0 -51
- package/dist/primitives/Container.svelte.d.ts +0 -10
- package/dist/primitives/Dialog.svelte +0 -39
- package/dist/primitives/Dialog.svelte.d.ts +0 -10
- package/dist/primitives/Divider.svelte +0 -14
- package/dist/primitives/Divider.svelte.d.ts +0 -6
- package/dist/primitives/Form.svelte +0 -18
- package/dist/primitives/Form.svelte.d.ts +0 -8
- package/dist/primitives/Image.svelte +0 -57
- package/dist/primitives/Image.svelte.d.ts +0 -12
- package/dist/primitives/Input.svelte +0 -23
- package/dist/primitives/Input.svelte.d.ts +0 -9
- package/dist/primitives/Label.svelte +0 -18
- package/dist/primitives/Label.svelte.d.ts +0 -8
- package/dist/primitives/Link.svelte +0 -18
- package/dist/primitives/Link.svelte.d.ts +0 -8
- package/dist/primitives/Table.svelte +0 -18
- package/dist/primitives/Table.svelte.d.ts +0 -8
- package/dist/primitives/TableBody.svelte +0 -17
- package/dist/primitives/TableBody.svelte.d.ts +0 -7
- package/dist/primitives/TableData.svelte +0 -18
- package/dist/primitives/TableData.svelte.d.ts +0 -8
- package/dist/primitives/TableFooter.svelte +0 -17
- package/dist/primitives/TableFooter.svelte.d.ts +0 -7
- package/dist/primitives/TableHead.svelte +0 -18
- package/dist/primitives/TableHead.svelte.d.ts +0 -8
- package/dist/primitives/TableHeader.svelte +0 -17
- package/dist/primitives/TableHeader.svelte.d.ts +0 -7
- package/dist/primitives/TableRow.svelte +0 -18
- package/dist/primitives/TableRow.svelte.d.ts +0 -8
- package/dist/primitives/Text.svelte +0 -46
- package/dist/primitives/Text.svelte.d.ts +0 -8
- package/dist/primitives/TextArea.svelte +0 -15
- package/dist/primitives/TextArea.svelte.d.ts +0 -7
- package/dist/types.d.ts +0 -4
- package/dist/types.js +0 -1
- /package/dist/components/{Badge.svelte → ImageCrop.svelte} +0 -0
- /package/dist/{community/components/index.d.ts → utilities/accesibility.d.ts} +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Copyright (c) 2025 Emre Ayaz
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person
|
|
4
|
+
obtaining a copy of this software and associated documentation
|
|
5
|
+
files (the "Software"), to deal in the Software without
|
|
6
|
+
restriction, including without limitation the rights to use,
|
|
7
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
copies of the Software, and to permit persons to whom the
|
|
9
|
+
Software is furnished to do so, subject to the following
|
|
10
|
+
conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be
|
|
13
|
+
included in all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
17
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
18
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
19
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
20
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
21
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,11 +1,22 @@
|
|
|
1
|
-
# Fluid UI
|
|
1
|
+
# Fluid UI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/fluid-ui-svelte)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
TODO
|
|
6
|
+
A modern, lightweight, and accessible Svelte UI component library designed for building beautiful and responsive web applications with ease.
|
|
8
7
|
|
|
9
8
|
## Documentation
|
|
10
9
|
|
|
10
|
+
For full documentation and a list of all available components, visit **[fluidui.io](https://fluidui.io)**.
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
You can install `fluid-ui-svelte` with the command below.
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install fluid-ui-svelte
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## License
|
|
11
21
|
|
|
22
|
+
This project is licensed under the MIT License - see the LICENSE file for details.
|
package/dist/app.css
ADDED
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
@import 'tailwindcss';
|
|
2
|
+
|
|
3
|
+
@custom-variant dark (&:where(.dark, .dark *));
|
|
4
|
+
|
|
5
|
+
@theme {
|
|
6
|
+
--font-family-sans: 'Inter', sans-serif;
|
|
7
|
+
--color-*: initial;
|
|
8
|
+
--color-white: #fff;
|
|
9
|
+
--color-black: #000;
|
|
10
|
+
|
|
11
|
+
--color-neutral-50: #fafafa;
|
|
12
|
+
--color-neutral-100: #f4f4f5;
|
|
13
|
+
--color-neutral-200: #e4e4e7;
|
|
14
|
+
--color-neutral-300: #dedee1;
|
|
15
|
+
--color-neutral-400: #a1a1aa;
|
|
16
|
+
--color-neutral-500: #71717a;
|
|
17
|
+
--color-neutral-600: #52525b;
|
|
18
|
+
--color-neutral-700: #3f3f46;
|
|
19
|
+
--color-neutral-800: #27272a;
|
|
20
|
+
--color-neutral-900: #18181b;
|
|
21
|
+
--color-neutral-950: #09090b;
|
|
22
|
+
|
|
23
|
+
--color-primary-50: #eff4ff;
|
|
24
|
+
--color-primary-100: #dce6fd;
|
|
25
|
+
--color-primary-200: #c0d4fd;
|
|
26
|
+
--color-primary-300: #95bafb;
|
|
27
|
+
--color-primary-400: #6295f8;
|
|
28
|
+
--color-primary-500: #3e6ff3;
|
|
29
|
+
--color-primary-600: #284fe8;
|
|
30
|
+
--color-primary-700: #203bd5;
|
|
31
|
+
--color-primary-800: #2032ad;
|
|
32
|
+
--color-primary-900: #203088;
|
|
33
|
+
--color-primary-950: #182053;
|
|
34
|
+
|
|
35
|
+
--color-secondary-50: #f5f3ff;
|
|
36
|
+
--color-secondary-100: #ede9fe;
|
|
37
|
+
--color-secondary-200: #ddd6fe;
|
|
38
|
+
--color-secondary-300: #c4b5fd;
|
|
39
|
+
--color-secondary-400: #a78bfa;
|
|
40
|
+
--color-secondary-500: #8b5cf6;
|
|
41
|
+
--color-secondary-600: #7c3aed;
|
|
42
|
+
--color-secondary-700: #6d28d9;
|
|
43
|
+
--color-secondary-800: #5b21b6;
|
|
44
|
+
--color-secondary-900: #4c1d95;
|
|
45
|
+
--color-secondary-950: #2a1065;
|
|
46
|
+
|
|
47
|
+
--color-tetriary-50: #f5f3ff;
|
|
48
|
+
--color-tetriary-100: #ede9fe;
|
|
49
|
+
--color-tetriary-200: #ddd6fe;
|
|
50
|
+
--color-tetriary-300: #c4b5fd;
|
|
51
|
+
--color-tetriary-400: #a78bfa;
|
|
52
|
+
--color-tetriary-500: #8b5cf6;
|
|
53
|
+
--color-tetriary-600: #7c3aed;
|
|
54
|
+
--color-tetriary-700: #6d28d9;
|
|
55
|
+
--color-tetriary-800: #5b21b6;
|
|
56
|
+
--color-tetriary-900: #4c1d95;
|
|
57
|
+
--color-tetriary-950: #2a1065;
|
|
58
|
+
|
|
59
|
+
--color-success-50: #ecfdf5;
|
|
60
|
+
--color-success-100: #d1fae5;
|
|
61
|
+
--color-success-200: #a7f3d0;
|
|
62
|
+
--color-success-300: #6ee7b7;
|
|
63
|
+
--color-success-400: #34d399;
|
|
64
|
+
--color-success-500: #10b981;
|
|
65
|
+
--color-success-600: #059669;
|
|
66
|
+
--color-success-700: #0f766e;
|
|
67
|
+
--color-success-800: #065f46;
|
|
68
|
+
--color-success-900: #064e3b;
|
|
69
|
+
--color-success-950: #022c22;
|
|
70
|
+
|
|
71
|
+
--color-warning-50: #fffbeb;
|
|
72
|
+
--color-warning-100: #fef3c7;
|
|
73
|
+
--color-warning-200: #fde68a;
|
|
74
|
+
--color-warning-300: #fcd34d;
|
|
75
|
+
--color-warning-400: #fbbf24;
|
|
76
|
+
--color-warning-500: #f59e0b;
|
|
77
|
+
--color-warning-600: #d97706;
|
|
78
|
+
--color-warning-700: #b45309;
|
|
79
|
+
--color-warning-800: #92400e;
|
|
80
|
+
--color-warning-900: #78350f;
|
|
81
|
+
--color-warning-950: #451a03;
|
|
82
|
+
|
|
83
|
+
--color-info-50: #f0f9ff;
|
|
84
|
+
--color-info-100: #e0f2fe;
|
|
85
|
+
--color-info-200: #bae6fd;
|
|
86
|
+
--color-info-300: #7dd3fc;
|
|
87
|
+
--color-info-400: #38bdf8;
|
|
88
|
+
--color-info-500: #0ea5e9;
|
|
89
|
+
--color-info-600: #0284c7;
|
|
90
|
+
--color-info-700: #0369a1;
|
|
91
|
+
--color-info-800: #075985;
|
|
92
|
+
--color-info-900: #0c4a6e;
|
|
93
|
+
--color-info-950: #082f49;
|
|
94
|
+
|
|
95
|
+
--color-error-50: #fef2f2;
|
|
96
|
+
--color-error-100: #fee2e2;
|
|
97
|
+
--color-error-200: #fecaca;
|
|
98
|
+
--color-error-300: #fca5a5;
|
|
99
|
+
--color-error-400: #f87171;
|
|
100
|
+
--color-error-500: #ef4444;
|
|
101
|
+
--color-error-600: #dc2626;
|
|
102
|
+
--color-error-700: #b91c1c;
|
|
103
|
+
--color-error-800: #991b1b;
|
|
104
|
+
--color-error-900: #7f1d1d;
|
|
105
|
+
--color-error-950: #450a0a;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* ==========================================================================
|
|
109
|
+
BASE LAYER STYLES
|
|
110
|
+
Fundamental building blocks and semantic wrappers.
|
|
111
|
+
========================================================================== */
|
|
112
|
+
|
|
113
|
+
/* Button -------------------------- */
|
|
114
|
+
.fluid-button {
|
|
115
|
+
@apply flex cursor-pointer items-center gap-1 rounded-md p-2 transition-all duration-500;
|
|
116
|
+
}
|
|
117
|
+
.fluid-button-primary {
|
|
118
|
+
@apply bg-primary-500 text-neutral-50 hover:bg-primary-400;
|
|
119
|
+
}
|
|
120
|
+
.fluid-button-secondary {
|
|
121
|
+
@apply bg-secondary-500 text-neutral-50 hover:bg-secondary-400;
|
|
122
|
+
}
|
|
123
|
+
.fluid-button-outline {
|
|
124
|
+
@apply text-primary-500 outline-2 outline-primary-500 hover:bg-primary-500 hover:text-neutral-50;
|
|
125
|
+
}
|
|
126
|
+
.fluid-button-transparent {
|
|
127
|
+
@apply text-primary-500 hover:text-primary-700 dark:hover:text-neutral-50;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* Container ----------------------- */
|
|
131
|
+
.fluid-container {
|
|
132
|
+
@apply transition-all duration-500;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
section,
|
|
136
|
+
main.fluid-container {
|
|
137
|
+
@apply min-w-0 bg-neutral-50 transition-all duration-500 dark:bg-neutral-900;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* Image --------------------------- */
|
|
141
|
+
.fluid-image {
|
|
142
|
+
@apply object-contain;
|
|
143
|
+
}
|
|
144
|
+
.fluid-image-loading {
|
|
145
|
+
@apply animate-pulse bg-primary-500;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/* Input Field --------------------- */
|
|
149
|
+
.fluid-input-field {
|
|
150
|
+
@apply rounded-md bg-neutral-50 p-1 outline-1 outline-primary-500 transition-all focus:outline-2 focus:outline-primary-500 dark:bg-neutral-800 dark:text-neutral-50;
|
|
151
|
+
}
|
|
152
|
+
.fluid-input-field-error {
|
|
153
|
+
@apply outline-2 outline-error-500;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/* Link ---------------------------- */
|
|
157
|
+
.fluid-link {
|
|
158
|
+
@apply text-neutral-950 transition-all visited:text-primary-300 hover:text-neutral-500 dark:text-neutral-50 dark:hover:text-neutral-300;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* List ---------------------------- */
|
|
162
|
+
.fluid-unordered-list {
|
|
163
|
+
@apply list-disc text-neutral-950 dark:text-neutral-50;
|
|
164
|
+
}
|
|
165
|
+
.fluid-ordered-list {
|
|
166
|
+
@apply list-decimal text-neutral-950 dark:text-neutral-50;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* Table --------------------------- */
|
|
170
|
+
.fluid-table {
|
|
171
|
+
@apply w-full border-separate border-spacing-0 overflow-hidden rounded-md border dark:border-neutral-300;
|
|
172
|
+
}
|
|
173
|
+
.fluid-table-head {
|
|
174
|
+
@apply bg-neutral-200 dark:bg-neutral-800;
|
|
175
|
+
}
|
|
176
|
+
.fluid-table-row {
|
|
177
|
+
@apply even:bg-neutral-200 dark:even:bg-neutral-800;
|
|
178
|
+
}
|
|
179
|
+
.fluid-table-cell {
|
|
180
|
+
@apply border-collapse bg-clip-padding text-center;
|
|
181
|
+
}
|
|
182
|
+
.fluid-table-body {
|
|
183
|
+
}
|
|
184
|
+
.fluid-table-footer {
|
|
185
|
+
@apply bg-clip-padding p-2 odd:bg-neutral-100 dark:odd:bg-neutral-800;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/* Text ---------------------------- */
|
|
189
|
+
.fluid-text {
|
|
190
|
+
@apply text-neutral-950 transition-all duration-500 dark:text-neutral-50;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/* ==========================================================================
|
|
194
|
+
COMPONENT LAYER STYLES
|
|
195
|
+
Complex UI elements composed from the Base Layer.
|
|
196
|
+
========================================================================== */
|
|
197
|
+
|
|
198
|
+
/* Accordion ----------------------- */
|
|
199
|
+
.fluid-accordion-wrapper {
|
|
200
|
+
@apply flex-col;
|
|
201
|
+
}
|
|
202
|
+
.fluid-accordion-header {
|
|
203
|
+
@apply flex w-full cursor-pointer flex-nowrap items-center justify-between rounded-md p-2 transition-all hover:bg-neutral-200 dark:text-neutral-50 dark:hover:bg-neutral-800;
|
|
204
|
+
}
|
|
205
|
+
.fluid-accordion-body {
|
|
206
|
+
@apply flex w-full flex-col gap-1 p-2;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/* Calendar ------------------------ */
|
|
210
|
+
.fluid-calendar {
|
|
211
|
+
}
|
|
212
|
+
.fluid-calendar-container {
|
|
213
|
+
@apply flex flex-wrap;
|
|
214
|
+
}
|
|
215
|
+
.fluid-calendar-wrapper {
|
|
216
|
+
@apply flex flex-col items-center gap-1 p-2;
|
|
217
|
+
}
|
|
218
|
+
.fluid-calendar-header {
|
|
219
|
+
@apply flex w-full justify-center;
|
|
220
|
+
}
|
|
221
|
+
.fluid-calendar-body {
|
|
222
|
+
@apply grid grid-cols-7 justify-items-center gap-4;
|
|
223
|
+
}
|
|
224
|
+
.fluid-calendar-cell {
|
|
225
|
+
@apply dark:text-neutral-50;
|
|
226
|
+
}
|
|
227
|
+
.fluid-calendar-cell-selected {
|
|
228
|
+
@apply bg-primary-600 text-neutral-50;
|
|
229
|
+
}
|
|
230
|
+
.fluid-calendar-cell-in-range {
|
|
231
|
+
@apply bg-primary-400 text-neutral-50;
|
|
232
|
+
}
|
|
233
|
+
.fluid-calendar-cell-rolling-day {
|
|
234
|
+
@apply opacity-25;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/* Carousel ------------------------ */
|
|
238
|
+
.fluid-carousel-container {
|
|
239
|
+
@apply flex snap-mandatory overflow-hidden scroll-smooth [scrollbar-width:none] [&::-webkit-scrollbar]:hidden;
|
|
240
|
+
}
|
|
241
|
+
.fluid-carousel-item {
|
|
242
|
+
@apply size-full shrink-0 snap-center;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/* Code Block ---------------------- */
|
|
246
|
+
.fluid-code-block-container {
|
|
247
|
+
@apply flex flex-col overflow-scroll rounded-md bg-neutral-200 p-4 font-mono dark:bg-neutral-800;
|
|
248
|
+
}
|
|
249
|
+
.fluid-code-block-row {
|
|
250
|
+
@apply flex items-center gap-1;
|
|
251
|
+
}
|
|
252
|
+
.fluid-code-block-index {
|
|
253
|
+
@apply min-w-8 gap-1 border-r dark:border-neutral-50;
|
|
254
|
+
}
|
|
255
|
+
.fluid-code-block-content {
|
|
256
|
+
@apply flex flex-col gap-1 px-2;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/* Drawer -------------------------- */
|
|
260
|
+
.fluid-drawer-container {
|
|
261
|
+
@apply fixed inset-0 z-10 bg-black/30 backdrop-blur-sm;
|
|
262
|
+
}
|
|
263
|
+
.fluid-drawer-panel {
|
|
264
|
+
@apply fixed z-20 bg-white p-6 shadow-xl transition-all dark:bg-neutral-900;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/* Page ---------------------------- */
|
|
268
|
+
.fluid-page {
|
|
269
|
+
@apply flex w-full flex-1 flex-col p-8 md:p-16;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/* Switch -------------------------- */
|
|
273
|
+
.fluid-switch-button {
|
|
274
|
+
@apply relative inline-flex h-5 w-9 shrink-0 cursor-pointer rounded-full border-2 border-transparent bg-neutral-200 transition-colors duration-200 ease-in-out focus:outline-none disabled:cursor-not-allowed disabled:opacity-50;
|
|
275
|
+
}
|
|
276
|
+
.fluid-switch-circle {
|
|
277
|
+
@apply pointer-events-none inline-block h-4 w-4 translate-x-0 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out checked:translate-x-4;
|
|
278
|
+
}
|
|
279
|
+
.fluid-switch-button.checked {
|
|
280
|
+
@apply bg-primary-600;
|
|
281
|
+
}
|
|
282
|
+
.fluid-switch-button.checked .fluid-switch-circle {
|
|
283
|
+
@apply translate-x-4;
|
|
284
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLButtonAttributes } from 'svelte/elements';
|
|
3
|
+
import { mergeClasses } from '../utilities/mergeClasses.js';
|
|
4
|
+
import { type Snippet } from 'svelte';
|
|
5
|
+
|
|
6
|
+
const {
|
|
7
|
+
onclick,
|
|
8
|
+
class: className = '',
|
|
9
|
+
overrideDefaultStyling = false,
|
|
10
|
+
loadingPlaceholder,
|
|
11
|
+
children,
|
|
12
|
+
...rest
|
|
13
|
+
}: {
|
|
14
|
+
onclick: (event: Event, buttonState: { inProgress: boolean }) => Promise<unknown>;
|
|
15
|
+
class?: string;
|
|
16
|
+
overrideDefaultStyling?: boolean;
|
|
17
|
+
loadingPlaceholder?: Snippet;
|
|
18
|
+
children: Snippet;
|
|
19
|
+
} & Omit<HTMLButtonAttributes, 'onclick'> = $props();
|
|
20
|
+
|
|
21
|
+
let buttonState = $state({ inProgress: false });
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<button
|
|
25
|
+
type="button"
|
|
26
|
+
onclick={async (event: Event) => onclick(event, buttonState)}
|
|
27
|
+
{...rest}
|
|
28
|
+
class={mergeClasses(className, overrideDefaultStyling ? '' : 'fluid-button')}
|
|
29
|
+
>
|
|
30
|
+
{#if buttonState.inProgress && loadingPlaceholder}
|
|
31
|
+
{@render loadingPlaceholder()}
|
|
32
|
+
{:else}
|
|
33
|
+
{@render children()}
|
|
34
|
+
{/if}
|
|
35
|
+
</button>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { HTMLButtonAttributes } from 'svelte/elements';
|
|
2
|
+
import { type Snippet } from 'svelte';
|
|
3
|
+
type $$ComponentProps = {
|
|
4
|
+
onclick: (event: Event, buttonState: {
|
|
5
|
+
inProgress: boolean;
|
|
6
|
+
}) => Promise<unknown>;
|
|
7
|
+
class?: string;
|
|
8
|
+
overrideDefaultStyling?: boolean;
|
|
9
|
+
loadingPlaceholder?: Snippet;
|
|
10
|
+
children: Snippet;
|
|
11
|
+
} & Omit<HTMLButtonAttributes, 'onclick'>;
|
|
12
|
+
declare const Button: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
13
|
+
type Button = ReturnType<typeof Button>;
|
|
14
|
+
export default Button;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import { mergeClasses } from '../utilities/mergeClasses.js';
|
|
4
|
+
import type { Snippet } from 'svelte';
|
|
5
|
+
import type { TransitionConfig } from 'svelte/transition';
|
|
6
|
+
|
|
7
|
+
const {
|
|
8
|
+
type = 'div',
|
|
9
|
+
class: className = '',
|
|
10
|
+
transitionFn = (node: Element, params?: any) => {
|
|
11
|
+
return {};
|
|
12
|
+
},
|
|
13
|
+
transitionParams,
|
|
14
|
+
overrideDefaultStyling = false,
|
|
15
|
+
children,
|
|
16
|
+
...rest
|
|
17
|
+
}: {
|
|
18
|
+
type?: 'div' | 'nav' | 'section' | 'main' | 'header' | 'footer' | 'aside' | 'article';
|
|
19
|
+
class?: string;
|
|
20
|
+
transitionFn?: (node: Element, params?: any) => TransitionConfig;
|
|
21
|
+
transitionParams?: TransitionConfig;
|
|
22
|
+
overrideDefaultStyling?: boolean;
|
|
23
|
+
children?: Snippet;
|
|
24
|
+
} & HTMLAttributes<HTMLElement> = $props();
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<svelte:element
|
|
28
|
+
this={type}
|
|
29
|
+
{...rest}
|
|
30
|
+
transition:transitionFn={transitionParams}
|
|
31
|
+
class={mergeClasses(className, overrideDefaultStyling ? '' : 'fluid-container')}
|
|
32
|
+
>
|
|
33
|
+
{@render children?.()}
|
|
34
|
+
</svelte:element>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { TransitionConfig } from 'svelte/transition';
|
|
4
|
+
type $$ComponentProps = {
|
|
5
|
+
type?: 'div' | 'nav' | 'section' | 'main' | 'header' | 'footer' | 'aside' | 'article';
|
|
6
|
+
class?: string;
|
|
7
|
+
transitionFn?: (node: Element, params?: any) => TransitionConfig;
|
|
8
|
+
transitionParams?: TransitionConfig;
|
|
9
|
+
overrideDefaultStyling?: boolean;
|
|
10
|
+
children?: Snippet;
|
|
11
|
+
} & HTMLAttributes<HTMLElement>;
|
|
12
|
+
declare const Container: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
13
|
+
type Container = ReturnType<typeof Container>;
|
|
14
|
+
export default Container;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLImgAttributes } from 'svelte/elements';
|
|
3
|
+
import { mergeClasses } from '../utilities/mergeClasses.js';
|
|
4
|
+
|
|
5
|
+
const {
|
|
6
|
+
class: className = '',
|
|
7
|
+
overrideDefaultStyling = false,
|
|
8
|
+
...rest
|
|
9
|
+
}: {
|
|
10
|
+
class?: string;
|
|
11
|
+
overrideDefaultStyling?: boolean;
|
|
12
|
+
} & HTMLImgAttributes = $props();
|
|
13
|
+
let isLoaded = $state(false);
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<img
|
|
17
|
+
onload={() => (isLoaded = true)}
|
|
18
|
+
{...rest}
|
|
19
|
+
class={mergeClasses(className, overrideDefaultStyling ? '' : 'fluid-image') +
|
|
20
|
+
(isLoaded ? '' : ' fluid-image-loading')}
|
|
21
|
+
/>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { HTMLImgAttributes } from 'svelte/elements';
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
class?: string;
|
|
4
|
+
overrideDefaultStyling?: boolean;
|
|
5
|
+
} & HTMLImgAttributes;
|
|
6
|
+
declare const Image: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type Image = ReturnType<typeof Image>;
|
|
8
|
+
export default Image;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
3
|
+
import { mergeClasses } from '../utilities/mergeClasses.js';
|
|
4
|
+
import { applyCharacterFilter } from '../utilities/applyCharacterFilter.js';
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
type = 'text',
|
|
8
|
+
value = $bindable(''),
|
|
9
|
+
class: className = '',
|
|
10
|
+
characterFilter,
|
|
11
|
+
overrideDefaultStyling = false,
|
|
12
|
+
oninput,
|
|
13
|
+
...rest
|
|
14
|
+
}: {
|
|
15
|
+
class?: string;
|
|
16
|
+
type?: 'text' | 'password';
|
|
17
|
+
characterFilter?: Array<string>;
|
|
18
|
+
overrideDefaultStyling?: boolean;
|
|
19
|
+
} & HTMLInputAttributes = $props();
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<input
|
|
23
|
+
bind:value
|
|
24
|
+
{type}
|
|
25
|
+
oninput={(e) => {
|
|
26
|
+
if (characterFilter) {
|
|
27
|
+
value = applyCharacterFilter(characterFilter, value);
|
|
28
|
+
}
|
|
29
|
+
oninput?.(e as any);
|
|
30
|
+
}}
|
|
31
|
+
{...rest}
|
|
32
|
+
class={mergeClasses(className, overrideDefaultStyling ? '' : 'fluid-input-field')}
|
|
33
|
+
/>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
class?: string;
|
|
4
|
+
type?: 'text' | 'password';
|
|
5
|
+
characterFilter?: Array<string>;
|
|
6
|
+
overrideDefaultStyling?: boolean;
|
|
7
|
+
} & HTMLInputAttributes;
|
|
8
|
+
declare const InputField: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
9
|
+
type InputField = ReturnType<typeof InputField>;
|
|
10
|
+
export default InputField;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAnchorAttributes } from 'svelte/elements';
|
|
3
|
+
import { mergeClasses } from '../utilities/mergeClasses.js';
|
|
4
|
+
import type { Snippet } from 'svelte';
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
class: className = '',
|
|
8
|
+
overrideDefaultStyling = false,
|
|
9
|
+
children,
|
|
10
|
+
...rest
|
|
11
|
+
}: {
|
|
12
|
+
class?: string;
|
|
13
|
+
overrideDefaultStyling?: boolean;
|
|
14
|
+
children: Snippet;
|
|
15
|
+
} & HTMLAnchorAttributes = $props();
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<a
|
|
19
|
+
{...rest}
|
|
20
|
+
class={mergeClasses(className, overrideDefaultStyling ? '' : 'fluid-link')}
|
|
21
|
+
>
|
|
22
|
+
{@render children()}</a
|
|
23
|
+
>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAnchorAttributes } from 'svelte/elements';
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
type $$ComponentProps = {
|
|
4
|
+
class?: string;
|
|
5
|
+
overrideDefaultStyling?: boolean;
|
|
6
|
+
children: Snippet;
|
|
7
|
+
} & HTMLAnchorAttributes;
|
|
8
|
+
declare const Link: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
9
|
+
type Link = ReturnType<typeof Link>;
|
|
10
|
+
export default Link;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<script lang="ts" generics="T">
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import { mergeClasses } from '../utilities/mergeClasses.js';
|
|
4
|
+
import type { Snippet } from 'svelte';
|
|
5
|
+
|
|
6
|
+
const {
|
|
7
|
+
type = 'ul',
|
|
8
|
+
items = [],
|
|
9
|
+
itemTemplate,
|
|
10
|
+
class: className = '',
|
|
11
|
+
itemClass = '',
|
|
12
|
+
overrideDefaultStyling = false,
|
|
13
|
+
...rest
|
|
14
|
+
}: {
|
|
15
|
+
type?: 'ol' | 'ul';
|
|
16
|
+
items: Array<T>;
|
|
17
|
+
itemTemplate: Snippet<[T]>;
|
|
18
|
+
class?: string;
|
|
19
|
+
itemClass?: string;
|
|
20
|
+
overrideDefaultStyling?: boolean;
|
|
21
|
+
} & HTMLAttributes<HTMLUListElement | HTMLOListElement> = $props();
|
|
22
|
+
|
|
23
|
+
const classes = {
|
|
24
|
+
ol: 'fluid-ordered-list',
|
|
25
|
+
ul: 'fluid-unordered-list'
|
|
26
|
+
};
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<svelte:element
|
|
30
|
+
this={type}
|
|
31
|
+
{...rest}
|
|
32
|
+
class={mergeClasses(className, overrideDefaultStyling ? '' : classes[type])}
|
|
33
|
+
>
|
|
34
|
+
{#each items as item}
|
|
35
|
+
<li class={mergeClasses(itemClass, overrideDefaultStyling ? '' : classes[type] + '-item')}>
|
|
36
|
+
{@render itemTemplate(item)}
|
|
37
|
+
</li>
|
|
38
|
+
{/each}
|
|
39
|
+
</svelte:element>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
declare function $$render<T>(): {
|
|
4
|
+
props: {
|
|
5
|
+
type?: "ol" | "ul";
|
|
6
|
+
items: Array<T>;
|
|
7
|
+
itemTemplate: Snippet<[T]>;
|
|
8
|
+
class?: string;
|
|
9
|
+
itemClass?: string;
|
|
10
|
+
overrideDefaultStyling?: boolean;
|
|
11
|
+
} & HTMLAttributes<HTMLUListElement | HTMLOListElement>;
|
|
12
|
+
exports: {};
|
|
13
|
+
bindings: "";
|
|
14
|
+
slots: {};
|
|
15
|
+
events: {};
|
|
16
|
+
};
|
|
17
|
+
declare class __sveltets_Render<T> {
|
|
18
|
+
props(): ReturnType<typeof $$render<T>>['props'];
|
|
19
|
+
events(): ReturnType<typeof $$render<T>>['events'];
|
|
20
|
+
slots(): ReturnType<typeof $$render<T>>['slots'];
|
|
21
|
+
bindings(): "";
|
|
22
|
+
exports(): {};
|
|
23
|
+
}
|
|
24
|
+
interface $$IsomorphicComponent {
|
|
25
|
+
new <T>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<T>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<T>['props']>, ReturnType<__sveltets_Render<T>['events']>, ReturnType<__sveltets_Render<T>['slots']>> & {
|
|
26
|
+
$$bindings?: ReturnType<__sveltets_Render<T>['bindings']>;
|
|
27
|
+
} & ReturnType<__sveltets_Render<T>['exports']>;
|
|
28
|
+
<T>(internal: unknown, props: ReturnType<__sveltets_Render<T>['props']> & {}): ReturnType<__sveltets_Render<T>['exports']>;
|
|
29
|
+
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
30
|
+
}
|
|
31
|
+
declare const List: $$IsomorphicComponent;
|
|
32
|
+
type List<T> = InstanceType<typeof List<T>>;
|
|
33
|
+
export default List;
|