@dodlhuat/basix 1.1.1 → 1.2.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/README.md +706 -482
- package/css/accordion.scss +86 -87
- package/css/alert.scss +137 -137
- package/css/badge.scss +104 -0
- package/css/bottom-sheet.scss +192 -0
- package/css/breadcrumb.scss +158 -0
- package/css/button.scss +48 -0
- package/css/calendar.scss +957 -0
- package/css/card.scss +65 -65
- package/css/chart.scss +270 -157
- package/css/chat-bubbles.scss +134 -68
- package/css/chips.scss +109 -19
- package/css/colors.scss +32 -32
- package/css/context-menu.scss +182 -0
- package/css/datepicker.scss +336 -336
- package/css/defaults.scss +90 -90
- package/css/docs.scss +529 -0
- package/css/editor.scss +664 -461
- package/css/file-uploader.scss +1 -1
- package/css/flyout-menu.scss +361 -361
- package/css/form.scss +124 -0
- package/css/gallery.scss +65 -6
- package/css/grid.scss +41 -40
- package/css/group-picker.scss +345 -0
- package/css/guitar-chords.css +250 -250
- package/css/icons.scss +330 -330
- package/css/parameters.scss +3 -3
- package/css/placeholder.scss +33 -33
- package/css/popover.scss +206 -0
- package/css/progress.scss +76 -32
- package/css/properties.scss +51 -36
- package/css/push-menu.scss +302 -174
- package/css/reset.scss +39 -39
- package/css/scrollbar.scss +62 -5
- package/css/sidebar-nav.scss +92 -0
- package/css/spinner.scss +65 -65
- package/css/stepper.scss +248 -0
- package/css/style.css +4603 -273
- package/css/style.css.map +1 -1
- package/css/style.min.css +1 -1
- package/css/style.scss +51 -39
- package/css/table.scss +199 -199
- package/css/tabs.scss +154 -123
- package/css/timeline.scss +83 -38
- package/css/timepicker.scss +100 -5
- package/css/toast.scss +81 -81
- package/css/typography.scss +194 -161
- package/css/virtual-dropdown.scss +35 -29
- package/js/bottom-sheet.js +173 -0
- package/js/bottom-sheet.ts +222 -0
- package/js/calendar.js +532 -0
- package/js/calendar.ts +706 -0
- package/js/carousel.js +26 -13
- package/js/chart.js +573 -257
- package/js/chart.ts +692 -0
- package/js/code-viewer.js +10 -10
- package/js/code-viewer.ts +188 -188
- package/js/context-menu.js +212 -0
- package/js/context-menu.ts +252 -0
- package/js/datepicker.ts +627 -627
- package/js/docs-nav.js +204 -0
- package/js/dropdown.ts +179 -179
- package/js/editor.js +96 -38
- package/js/editor.ts +483 -425
- package/js/file-uploader.js +1 -0
- package/js/file-uploader.ts +1 -0
- package/js/flyout-menu.js +14 -14
- package/js/flyout-menu.ts +249 -249
- package/js/form-builder.js +106 -106
- package/js/gallery.js +13 -6
- package/js/gallery.ts +245 -236
- package/js/group-picker.js +342 -0
- package/js/group-picker.ts +447 -0
- package/js/guitar-chords.js +268 -268
- package/js/lazy-loader.js +121 -121
- package/js/modal.ts +166 -166
- package/js/popover.js +163 -0
- package/js/popover.ts +219 -0
- package/js/position.js +108 -0
- package/js/position.ts +111 -0
- package/js/push-menu.js +226 -113
- package/js/push-menu.ts +284 -145
- package/js/request.js +50 -50
- package/js/scroll.ts +47 -47
- package/js/scrollbar.js +13 -0
- package/js/scrollbar.ts +324 -307
- package/js/select.ts +216 -216
- package/js/sidebar-nav.js +41 -0
- package/js/sidebar-nav.ts +66 -0
- package/js/stepper.js +80 -0
- package/js/stepper.ts +104 -0
- package/js/table.ts +452 -452
- package/js/tabs.ts +279 -279
- package/js/theme.js +17 -6
- package/js/theme.ts +234 -224
- package/js/timepicker.js +21 -8
- package/js/toast.ts +137 -137
- package/js/tooltip.js +6 -60
- package/js/tooltip.ts +184 -251
- package/js/tsconfig.json +18 -18
- package/js/utils.ts +83 -83
- package/js/virtual-dropdown.js +25 -25
- package/js/virtual-dropdown.ts +365 -365
- package/package.json +39 -39
- package/fonts/Outfit-VariableFont_wght.woff +0 -0
- package/fonts/material-icons.woff2 +0 -0
- package/icons/activity-outline.svg +0 -1
- package/icons/alert-circle-outline.svg +0 -1
- package/icons/alert-triangle-outline.svg +0 -1
- package/icons/archive-outline.svg +0 -1
- package/icons/arrow-back-outline.svg +0 -1
- package/icons/arrow-circle-down-outline.svg +0 -1
- package/icons/arrow-circle-left-outline.svg +0 -1
- package/icons/arrow-circle-right-outline.svg +0 -1
- package/icons/arrow-circle-up-outline.svg +0 -1
- package/icons/arrow-down-outline.svg +0 -1
- package/icons/arrow-downward-outline.svg +0 -1
- package/icons/arrow-forward-outline.svg +0 -1
- package/icons/arrow-ios-back-outline.svg +0 -1
- package/icons/arrow-ios-downward-outline.svg +0 -1
- package/icons/arrow-ios-forward-outline.svg +0 -1
- package/icons/arrow-ios-upward-outline.svg +0 -1
- package/icons/arrow-left-outline.svg +0 -1
- package/icons/arrow-right-outline.svg +0 -1
- package/icons/arrow-up-outline.svg +0 -1
- package/icons/arrow-upward-outline.svg +0 -1
- package/icons/arrowhead-down-outline.svg +0 -1
- package/icons/arrowhead-left-outline.svg +0 -1
- package/icons/arrowhead-right-outline.svg +0 -1
- package/icons/arrowhead-up-outline.svg +0 -1
- package/icons/at-outline.svg +0 -1
- package/icons/attach-2-outline.svg +0 -1
- package/icons/attach-outline.svg +0 -1
- package/icons/award-outline.svg +0 -1
- package/icons/backspace-outline.svg +0 -1
- package/icons/bar-chart-2-outline.svg +0 -1
- package/icons/bar-chart-outline.svg +0 -1
- package/icons/battery-outline.svg +0 -1
- package/icons/behance-outline.svg +0 -1
- package/icons/bell-off-outline.svg +0 -1
- package/icons/bell-outline.svg +0 -1
- package/icons/bluetooth-outline.svg +0 -1
- package/icons/book-open-outline.svg +0 -1
- package/icons/book-outline.svg +0 -1
- package/icons/bookmark-outline.svg +0 -1
- package/icons/briefcase-outline.svg +0 -1
- package/icons/browser-outline.svg +0 -1
- package/icons/brush-outline.svg +0 -1
- package/icons/bulb-outline.svg +0 -1
- package/icons/calendar-outline.svg +0 -1
- package/icons/camera-outline.svg +0 -1
- package/icons/car-outline.svg +0 -1
- package/icons/cast-outline.svg +0 -1
- package/icons/charging-outline.svg +0 -1
- package/icons/checkmark-circle-2-outline.svg +0 -1
- package/icons/checkmark-circle-outline.svg +0 -1
- package/icons/checkmark-outline.svg +0 -1
- package/icons/checkmark-square-2-outline.svg +0 -1
- package/icons/checkmark-square-outline.svg +0 -1
- package/icons/chevron-down-outline.svg +0 -1
- package/icons/chevron-left-outline.svg +0 -1
- package/icons/chevron-right-outline.svg +0 -1
- package/icons/chevron-up-outline.svg +0 -1
- package/icons/clipboard-outline.svg +0 -1
- package/icons/clock-outline.svg +0 -1
- package/icons/close-circle-outline.svg +0 -1
- package/icons/close-outline.svg +0 -1
- package/icons/close-square-outline.svg +0 -1
- package/icons/cloud-download-outline.svg +0 -1
- package/icons/cloud-upload-outline.svg +0 -1
- package/icons/code-download-outline.svg +0 -1
- package/icons/code-outline.svg +0 -1
- package/icons/collapse-outline.svg +0 -1
- package/icons/color-palette-outline.svg +0 -1
- package/icons/color-picker-outline.svg +0 -1
- package/icons/compass-outline.svg +0 -1
- package/icons/copy-outline.svg +0 -1
- package/icons/corner-down-left-outline.svg +0 -1
- package/icons/corner-down-right-outline.svg +0 -1
- package/icons/corner-left-down-outline.svg +0 -1
- package/icons/corner-left-up-outline.svg +0 -1
- package/icons/corner-right-down-outline.svg +0 -1
- package/icons/corner-right-up-outline.svg +0 -1
- package/icons/corner-up-left-outline.svg +0 -1
- package/icons/corner-up-right-outline.svg +0 -1
- package/icons/credit-card-outline.svg +0 -1
- package/icons/crop-outline.svg +0 -1
- package/icons/cube-outline.svg +0 -1
- package/icons/diagonal-arrow-left-down-outline.svg +0 -1
- package/icons/diagonal-arrow-left-up-outline.svg +0 -1
- package/icons/diagonal-arrow-right-down-outline.svg +0 -1
- package/icons/diagonal-arrow-right-up-outline.svg +0 -1
- package/icons/done-all-outline.svg +0 -1
- package/icons/download-outline.svg +0 -1
- package/icons/droplet-off-outline.svg +0 -1
- package/icons/droplet-outline.svg +0 -1
- package/icons/edit-2-outline.svg +0 -1
- package/icons/edit-outline.svg +0 -1
- package/icons/email-outline.svg +0 -1
- package/icons/expand-outline.svg +0 -1
- package/icons/external-link-outline.svg +0 -1
- package/icons/eye-off-2-outline.svg +0 -1
- package/icons/eye-off-outline.svg +0 -1
- package/icons/eye-outline.svg +0 -1
- package/icons/facebook-outline.svg +0 -1
- package/icons/file-add-outline.svg +0 -1
- package/icons/file-outline.svg +0 -1
- package/icons/file-remove-outline.svg +0 -1
- package/icons/file-text-outline.svg +0 -1
- package/icons/film-outline.svg +0 -1
- package/icons/flag-outline.svg +0 -1
- package/icons/flash-off-outline.svg +0 -1
- package/icons/flash-outline.svg +0 -1
- package/icons/flip-2-outline.svg +0 -1
- package/icons/flip-outline.svg +0 -1
- package/icons/folder-add-outline.svg +0 -1
- package/icons/folder-outline.svg +0 -1
- package/icons/folder-remove-outline.svg +0 -1
- package/icons/funnel-outline.svg +0 -1
- package/icons/gift-outline.svg +0 -1
- package/icons/github-outline.svg +0 -1
- package/icons/globe-2-outline.svg +0 -1
- package/icons/globe-outline.svg +0 -1
- package/icons/google-outline.svg +0 -1
- package/icons/grid-outline.svg +0 -1
- package/icons/hard-drive-outline.svg +0 -1
- package/icons/hash-outline.svg +0 -1
- package/icons/headphones-outline.svg +0 -1
- package/icons/heart-outline.svg +0 -1
- package/icons/home-outline.svg +0 -1
- package/icons/image-outline.svg +0 -1
- package/icons/inbox-outline.svg +0 -1
- package/icons/info-outline.svg +0 -1
- package/icons/keypad-outline.svg +0 -1
- package/icons/layers-outline.svg +0 -1
- package/icons/layout-outline.svg +0 -1
- package/icons/link-2-outline.svg +0 -1
- package/icons/link-outline.svg +0 -1
- package/icons/linkedin-outline.svg +0 -1
- package/icons/list-outline.svg +0 -1
- package/icons/loader-outline.svg +0 -1
- package/icons/lock-outline.svg +0 -1
- package/icons/log-in-outline.svg +0 -1
- package/icons/log-out-outline.svg +0 -1
- package/icons/map-outline.svg +0 -1
- package/icons/maximize-outline.svg +0 -1
- package/icons/menu-2-outline.svg +0 -1
- package/icons/menu-arrow-outline.svg +0 -1
- package/icons/menu-outline.svg +0 -1
- package/icons/message-circle-outline.svg +0 -1
- package/icons/message-square-outline.svg +0 -1
- package/icons/mic-off-outline.svg +0 -1
- package/icons/mic-outline.svg +0 -1
- package/icons/minimize-outline.svg +0 -1
- package/icons/minus-circle-outline.svg +0 -1
- package/icons/minus-outline.svg +0 -1
- package/icons/minus-square-outline.svg +0 -1
- package/icons/monitor-outline.svg +0 -1
- package/icons/moon-outline.svg +0 -1
- package/icons/more-horizontal-outline.svg +0 -1
- package/icons/more-vertical-outline.svg +0 -1
- package/icons/move-outline.svg +0 -1
- package/icons/music-outline.svg +0 -1
- package/icons/navigation-2-outline.svg +0 -1
- package/icons/navigation-outline.svg +0 -1
- package/icons/npm-outline.svg +0 -1
- package/icons/options-2-outline.svg +0 -1
- package/icons/options-outline.svg +0 -1
- package/icons/pantone-outline.svg +0 -1
- package/icons/paper-plane-outline.svg +0 -1
- package/icons/pause-circle-outline.svg +0 -1
- package/icons/people-outline.svg +0 -1
- package/icons/percent-outline.svg +0 -1
- package/icons/person-add-outline.svg +0 -1
- package/icons/person-delete-outline.svg +0 -1
- package/icons/person-done-outline.svg +0 -1
- package/icons/person-outline.svg +0 -1
- package/icons/person-remove-outline.svg +0 -1
- package/icons/phone-call-outline.svg +0 -1
- package/icons/phone-missed-outline.svg +0 -1
- package/icons/phone-off-outline.svg +0 -1
- package/icons/phone-outline.svg +0 -1
- package/icons/pie-chart-outline.svg +0 -1
- package/icons/pin-outline.svg +0 -1
- package/icons/play-circle-outline.svg +0 -1
- package/icons/plus-circle-outline.svg +0 -1
- package/icons/plus-outline.svg +0 -1
- package/icons/plus-square-outline.svg +0 -1
- package/icons/power-outline.svg +0 -1
- package/icons/pricetags-outline.svg +0 -1
- package/icons/printer-outline.svg +0 -1
- package/icons/question-mark-circle-outline.svg +0 -1
- package/icons/question-mark-outline.svg +0 -1
- package/icons/radio-button-off-outline.svg +0 -1
- package/icons/radio-button-on-outline.svg +0 -1
- package/icons/radio-outline.svg +0 -1
- package/icons/recording-outline.svg +0 -1
- package/icons/refresh-outline.svg +0 -1
- package/icons/repeat-outline.svg +0 -1
- package/icons/rewind-left-outline.svg +0 -1
- package/icons/rewind-right-outline.svg +0 -1
- package/icons/save-outline.svg +0 -1
- package/icons/scissors-outline.svg +0 -1
- package/icons/search-outline.svg +0 -1
- package/icons/settings-2-outline.svg +0 -1
- package/icons/settings-outline.svg +0 -1
- package/icons/shake-outline.svg +0 -1
- package/icons/share-outline.svg +0 -1
- package/icons/shield-off-outline.svg +0 -1
- package/icons/shield-outline.svg +0 -1
- package/icons/shopping-bag-outline.svg +0 -1
- package/icons/shopping-cart-outline.svg +0 -1
- package/icons/shuffle-2-outline.svg +0 -1
- package/icons/shuffle-outline.svg +0 -1
- package/icons/skip-back-outline.svg +0 -1
- package/icons/skip-forward-outline.svg +0 -1
- package/icons/slash-outline.svg +0 -1
- package/icons/smartphone-outline.svg +0 -1
- package/icons/smiling-face-outline.svg +0 -1
- package/icons/speaker-outline.svg +0 -1
- package/icons/square-outline.svg +0 -1
- package/icons/star-outline.svg +0 -1
- package/icons/stop-circle-outline.svg +0 -1
- package/icons/sun-outline.svg +0 -1
- package/icons/swap-outline.svg +0 -1
- package/icons/sync-outline.svg +0 -1
- package/icons/text-outline.svg +0 -1
- package/icons/thermometer-minus-outline.svg +0 -1
- package/icons/thermometer-outline.svg +0 -1
- package/icons/thermometer-plus-outline.svg +0 -1
- package/icons/toggle-left-outline.svg +0 -1
- package/icons/toggle-right-outline.svg +0 -1
- package/icons/trash-2-outline.svg +0 -1
- package/icons/trash-outline.svg +0 -1
- package/icons/trending-down-outline.svg +0 -1
- package/icons/trending-up-outline.svg +0 -1
- package/icons/tv-outline.svg +0 -1
- package/icons/twitter-outline.svg +0 -1
- package/icons/umbrella-outline.svg +0 -1
- package/icons/undo-outline.svg +0 -1
- package/icons/unlock-outline.svg +0 -1
- package/icons/upload-outline.svg +0 -1
- package/icons/video-off-outline.svg +0 -1
- package/icons/video-outline.svg +0 -1
- package/icons/volume-down-outline.svg +0 -1
- package/icons/volume-mute-outline.svg +0 -1
- package/icons/volume-off-outline.svg +0 -1
- package/icons/volume-up-outline.svg +0 -1
- package/icons/wifi-off-outline.svg +0 -1
- package/icons/wifi-outline.svg +0 -1
- package/js/index.js +0 -718
- package/js/index.ts +0 -873
package/README.md
CHANGED
|
@@ -1,482 +1,706 @@
|
|
|
1
|
-
# Basix 1.1
|
|
2
|
-
|
|
3
|
-
Basix is intended as a starter for the rapid development of a design. Each design element can be added individually to
|
|
4
|
-
include only the data required. It is using plain javascript / typescript and therefore is not dependent on any plugin.
|
|
5
|
-
|
|
6
|
-
A demo can be found here: <a href="http://www.andibauer.at/basix/" target="_blank">http://www.andibauer.at/basix/</a>
|
|
7
|
-
|
|
8
|
-
### Benefits
|
|
9
|
-
|
|
10
|
-
* lightweight
|
|
11
|
-
* customizable
|
|
12
|
-
* no dependencies, completely vanilla javascript (or css only)
|
|
13
|
-
|
|
14
|
-
## Usage
|
|
15
|
-
|
|
16
|
-
Take a look at style.scss for a glimpse on a full import. reset, parameters, colors & defaults are mandatory, anything
|
|
17
|
-
else can be added as needed.
|
|
18
|
-
|
|
19
|
-
To use the import functionality of javascript files you need to import your main script as a module. And either build
|
|
20
|
-
your own css or include the existing full style.css (or min)
|
|
21
|
-
|
|
22
|
-
``` html
|
|
23
|
-
<link rel="stylesheet" href="css/style.css" type="text/css">
|
|
24
|
-
<script src="js/index.js" type="module"></script>
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
# Available Components
|
|
30
|
-
|
|
31
|
-
## Layout
|
|
32
|
-
|
|
33
|
-
### Grid System
|
|
34
|
-
|
|
35
|
-
The Grid component provides a flexbox-based layout system. Use `.row` with `.column` children. Columns can use `.grow-2` through `.grow-6` for proportional sizing. Responsive — stacks on mobile.
|
|
36
|
-
|
|
37
|
-
``` html
|
|
38
|
-
<div class="row">
|
|
39
|
-
<div class="column">Column 1</div>
|
|
40
|
-
<div class="column grow-2">Column 2 (2x)</div>
|
|
41
|
-
<div class="column">Column 3</div>
|
|
42
|
-
</div>
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### Typography
|
|
46
|
-
|
|
47
|
-
The typography system is built around the Outfit variable font, providing a modern, readable base for all text. Headings follow a clear scale with bold weight and tighter line spacing for strong visual hierarchy. Utility classes enable simple text alignment. Monospace fonts are reserved for code.
|
|
48
|
-
|
|
49
|
-
### Cards
|
|
50
|
-
|
|
51
|
-
The Card component is a CSS-only component that creates visually contained content sections with optional header and footer. Use `.card` on rows or columns to wrap them into a card.
|
|
52
|
-
|
|
53
|
-
``` html
|
|
54
|
-
<div class="row card">
|
|
55
|
-
<div class="column">Card content</div>
|
|
56
|
-
</div>
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### Icons
|
|
60
|
-
|
|
61
|
-
Basix
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
<
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
<
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
<label
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
|
147
|
-
|
|
148
|
-
| `
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
</div>
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
|
190
|
-
|
|
191
|
-
| `
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
###
|
|
206
|
-
|
|
207
|
-
The
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
<
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
<span class="
|
|
306
|
-
```
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
| `
|
|
363
|
-
| `
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
<
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
</div>
|
|
404
|
-
</div>
|
|
405
|
-
```
|
|
406
|
-
|
|
407
|
-
###
|
|
408
|
-
|
|
409
|
-
The
|
|
410
|
-
|
|
411
|
-
``` html
|
|
412
|
-
<div class="
|
|
413
|
-
<div
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
1
|
+
# Basix 1.2.1
|
|
2
|
+
|
|
3
|
+
Basix is intended as a starter for the rapid development of a design. Each design element can be added individually to
|
|
4
|
+
include only the data required. It is using plain javascript / typescript and therefore is not dependent on any plugin.
|
|
5
|
+
|
|
6
|
+
A demo can be found here: <a href="http://www.andibauer.at/basix/" target="_blank">http://www.andibauer.at/basix/</a>
|
|
7
|
+
|
|
8
|
+
### Benefits
|
|
9
|
+
|
|
10
|
+
* lightweight
|
|
11
|
+
* customizable
|
|
12
|
+
* no dependencies, completely vanilla javascript (or css only)
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
Take a look at style.scss for a glimpse on a full import. reset, parameters, colors & defaults are mandatory, anything
|
|
17
|
+
else can be added as needed.
|
|
18
|
+
|
|
19
|
+
To use the import functionality of javascript files you need to import your main script as a module. And either build
|
|
20
|
+
your own css or include the existing full style.css (or min)
|
|
21
|
+
|
|
22
|
+
``` html
|
|
23
|
+
<link rel="stylesheet" href="css/style.css" type="text/css">
|
|
24
|
+
<script src="js/index.js" type="module"></script>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
# Available Components
|
|
30
|
+
|
|
31
|
+
## Layout
|
|
32
|
+
|
|
33
|
+
### Grid System
|
|
34
|
+
|
|
35
|
+
The Grid component provides a flexbox-based layout system. Use `.row` with `.column` children. Columns can use `.grow-2` through `.grow-6` for proportional sizing. Responsive — stacks on mobile.
|
|
36
|
+
|
|
37
|
+
``` html
|
|
38
|
+
<div class="row">
|
|
39
|
+
<div class="column">Column 1</div>
|
|
40
|
+
<div class="column grow-2">Column 2 (2x)</div>
|
|
41
|
+
<div class="column">Column 3</div>
|
|
42
|
+
</div>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Typography
|
|
46
|
+
|
|
47
|
+
The typography system is built around the Outfit variable font, providing a modern, readable base for all text. Headings follow a clear scale with bold weight and tighter line spacing for strong visual hierarchy. Utility classes enable simple text alignment. Monospace fonts are reserved for code.
|
|
48
|
+
|
|
49
|
+
### Cards
|
|
50
|
+
|
|
51
|
+
The Card component is a CSS-only component that creates visually contained content sections with optional header and footer. Use `.card` on rows or columns to wrap them into a card.
|
|
52
|
+
|
|
53
|
+
``` html
|
|
54
|
+
<div class="row card">
|
|
55
|
+
<div class="column">Card content</div>
|
|
56
|
+
</div>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Icons
|
|
60
|
+
|
|
61
|
+
Basix ships icons in two formats:
|
|
62
|
+
|
|
63
|
+
**Font icons** — a reduced Google Material Icon font (~5.5 KB vs the full 242.5 KB). Use the `.icon` class with a modifier.
|
|
64
|
+
|
|
65
|
+
``` html
|
|
66
|
+
<span class="icon icon-home"></span>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**SVG sprite** — a single `svg-icons/icons.svg` sprite file. Preferred when you need consistent sizing, color inheritance via `currentColor`, or icons inside JS-generated markup.
|
|
70
|
+
|
|
71
|
+
``` html
|
|
72
|
+
<svg class="icon-svg"><use href="svg-icons/icons.svg#home"/></svg>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Forms
|
|
78
|
+
|
|
79
|
+
The Form styles provide consistent styling for inputs, textareas, and native elements.
|
|
80
|
+
|
|
81
|
+
### Text Input
|
|
82
|
+
|
|
83
|
+
``` html
|
|
84
|
+
<label for="my-input">Text Input</label>
|
|
85
|
+
<input type="text" id="my-input" />
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Textarea
|
|
89
|
+
|
|
90
|
+
``` html
|
|
91
|
+
<label for="my-textarea">Text Area</label>
|
|
92
|
+
<textarea id="my-textarea"></textarea>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Checkbox
|
|
96
|
+
|
|
97
|
+
The Checkbox component provides custom-styled checkboxes.
|
|
98
|
+
|
|
99
|
+
``` html
|
|
100
|
+
<input class="styled-checkbox" id="checkbox-1" type="checkbox" value="1" />
|
|
101
|
+
<label for="checkbox-1">Checkbox</label>
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Radio Buttons
|
|
105
|
+
|
|
106
|
+
The Radio Button component provides custom-styled radio inputs.
|
|
107
|
+
|
|
108
|
+
``` html
|
|
109
|
+
<label class="radio-button-container">One
|
|
110
|
+
<input type="radio" checked="checked" name="radio" />
|
|
111
|
+
<span class="checkmark"></span>
|
|
112
|
+
</label>
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Switch
|
|
116
|
+
|
|
117
|
+
The Switch component creates styled toggle switches based on checkboxes.
|
|
118
|
+
|
|
119
|
+
``` html
|
|
120
|
+
<div class="switch">
|
|
121
|
+
<input type="checkbox" id="switch" />
|
|
122
|
+
<label for="switch">Toggle</label>
|
|
123
|
+
</div>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Range Slider
|
|
127
|
+
|
|
128
|
+
The Range Slider component creates a simple styled slider.
|
|
129
|
+
|
|
130
|
+
``` html
|
|
131
|
+
<input type="range" min="1" max="100" value="50" />
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Navigation
|
|
137
|
+
|
|
138
|
+
### Push Menu
|
|
139
|
+
|
|
140
|
+
The PushMenu component creates a sidebar navigation that "pushes" the main content when opened. Uses a checkbox-based toggle mechanism.
|
|
141
|
+
|
|
142
|
+
### Flyout Menu
|
|
143
|
+
|
|
144
|
+
The Flyout Menu component creates slide-in navigation menus with nested submenus. Supports left/right direction, header/footer and keyboard navigation (Escape to close).
|
|
145
|
+
|
|
146
|
+
| Option | Type | Default | Description |
|
|
147
|
+
|---|---|---|---|
|
|
148
|
+
| `triggerSelector` | string | `'.menu-trigger'` | CSS selector for the element(s) that open the menu |
|
|
149
|
+
| `menuSelector` | string | `'#flyoutMenu'` | CSS selector for the flyout menu element |
|
|
150
|
+
| `overlaySelector` | string | `'#flyoutOverlay'` | CSS selector for the backdrop overlay |
|
|
151
|
+
| `closeSelector` | string | `'.close-menu'` | CSS selector for close button(s) inside the menu |
|
|
152
|
+
| `direction` | string | `'right'` | Slide-in direction, either `'right'` or `'left'` |
|
|
153
|
+
| `title` | string | `'Menu'` | Shown in the header if enabled |
|
|
154
|
+
| `enableHeader` | boolean | `true` | Shows the menu header |
|
|
155
|
+
| `footerText` | string | `'© 2025 Brand Inc.'` | Shown in the footer if enabled |
|
|
156
|
+
| `enableFooter` | boolean | `true` | Shows the menu footer |
|
|
157
|
+
|
|
158
|
+
### Dropdown Menu
|
|
159
|
+
|
|
160
|
+
The Dropdown Menu allows to create multi-level dropdown menus with nested submenus. The menu fires custom events `CustomEvent<DropdownSelectDetail>` that can be listened to in order to react to user selections.
|
|
161
|
+
|
|
162
|
+
``` html
|
|
163
|
+
<div class="dropdown-container" id="myDropdown">
|
|
164
|
+
<button class="dropdown-trigger">Select Option</button>
|
|
165
|
+
<ul class="dropdown-menu">
|
|
166
|
+
<li><div class="dropdown-item">Profile</div></li>
|
|
167
|
+
<li>
|
|
168
|
+
<div class="dropdown-item">Settings</div>
|
|
169
|
+
<ul>
|
|
170
|
+
<li><div class="dropdown-item">Account</div></li>
|
|
171
|
+
</ul>
|
|
172
|
+
</li>
|
|
173
|
+
</ul>
|
|
174
|
+
</div>
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Feedback
|
|
180
|
+
|
|
181
|
+
### Modal
|
|
182
|
+
|
|
183
|
+
The Modal component creates dialog overlays with header, content, and footer sections. Supports types (success, error, warning, info) and close on Escape key.
|
|
184
|
+
|
|
185
|
+
| Parameter | Type | Description |
|
|
186
|
+
|---|---|---|
|
|
187
|
+
| `content` | string | Content of the modal. Can be HTML or a simple string |
|
|
188
|
+
| `header` | string | Header of the modal. Can be HTML or a simple string |
|
|
189
|
+
| `footer` | string | Footer of the modal. Can be HTML or a simple string |
|
|
190
|
+
| `closeable` | boolean | Shows a close button |
|
|
191
|
+
| `type` | ModalType | The type of the modal (success, error, warning, info, default) |
|
|
192
|
+
|
|
193
|
+
### Toast
|
|
194
|
+
|
|
195
|
+
The Toast component shows brief notification messages.
|
|
196
|
+
|
|
197
|
+
| Parameter | Type | Description |
|
|
198
|
+
|---|---|---|
|
|
199
|
+
| `content` | string | The content of the toast |
|
|
200
|
+
| `header` | string | The header of the toast |
|
|
201
|
+
| `markup` | ToastType | Changes the color of the toast: default, success, warning, error |
|
|
202
|
+
| `closeable` | boolean | Allows to close the toast before auto-closure time |
|
|
203
|
+
| `auto-closure` | integer | Optional closure time in ms |
|
|
204
|
+
|
|
205
|
+
### Bottom Sheet
|
|
206
|
+
|
|
207
|
+
The Bottom Sheet component slides up a panel from the bottom of the screen. On desktop it centers as a floating panel. Supports drag-to-dismiss, snap heights, header/footer slots, and an optional close button.
|
|
208
|
+
|
|
209
|
+
| Option | Type | Default | Description |
|
|
210
|
+
|---|---|---|---|
|
|
211
|
+
| `content` | string | — | HTML content rendered inside the sheet body |
|
|
212
|
+
| `header` | string | — | Optional header text |
|
|
213
|
+
| `footer` | string | — | Optional footer HTML (e.g. action buttons) |
|
|
214
|
+
| `closeable` | boolean | `true` | Shows a close button and enables backdrop/Escape dismissal |
|
|
215
|
+
| `snapHeight` | string | `'auto'` | Height preset: `'auto'`, `'half'` (50vh), or `'full'` (100dvh) |
|
|
216
|
+
| `onClose` | function | — | Callback fired after the dismiss animation completes |
|
|
217
|
+
|
|
218
|
+
``` js
|
|
219
|
+
const sheet = new BottomSheet({
|
|
220
|
+
content: '<p>Sheet content here.</p>',
|
|
221
|
+
header: 'Title',
|
|
222
|
+
footer: '<div class="buttons"><button>Cancel</button><button>Confirm</button></div>',
|
|
223
|
+
snapHeight: 'half',
|
|
224
|
+
onClose: () => console.log('closed'),
|
|
225
|
+
});
|
|
226
|
+
sheet.show();
|
|
227
|
+
sheet.hide();
|
|
228
|
+
sheet.snapTo('full');
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Tooltip
|
|
232
|
+
|
|
233
|
+
The Tooltip component shows contextual information on hover.
|
|
234
|
+
|
|
235
|
+
``` html
|
|
236
|
+
<button class="tooltip-trigger" data-tooltip="This is a simple tooltip">Hover me</button>
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### Spinner / Loading
|
|
240
|
+
|
|
241
|
+
The Spinner component shows simple loading indicators. There are two variants: a simple spinner and a loading indicator with dots.
|
|
242
|
+
|
|
243
|
+
``` html
|
|
244
|
+
<div class="spinner"></div>
|
|
245
|
+
<div class="loading"></div>
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## Components
|
|
251
|
+
|
|
252
|
+
### Alerts
|
|
253
|
+
|
|
254
|
+
The Alert component displays contextual feedback messages. Available variants: default, error, warning and success.
|
|
255
|
+
|
|
256
|
+
``` html
|
|
257
|
+
<div class="alert alert-error"><strong>Error: </strong> This is an error alert!</div>
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
### Buttons
|
|
261
|
+
|
|
262
|
+
The Button component provides styled buttons with variants. Use the `.button` class on divs or simply the `button` element with color classes: `button-primary`, `button-success`, `button-warning`, `button-error`.
|
|
263
|
+
|
|
264
|
+
``` html
|
|
265
|
+
<button class="button-primary">Primary</button>
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### Chips
|
|
269
|
+
|
|
270
|
+
The Chips component displays small interactive elements like tags or filters. CSS only. Use listeners if you want them to be clickable or closeable.
|
|
271
|
+
|
|
272
|
+
``` html
|
|
273
|
+
<div class="chips">
|
|
274
|
+
<div class="chip">Example Chip</div>
|
|
275
|
+
<div class="chip clickable">Clickable Chip</div>
|
|
276
|
+
<div class="chip closeable">
|
|
277
|
+
Closeable Chip
|
|
278
|
+
<button class="close"><span class="icon icon-close"></span></button>
|
|
279
|
+
</div>
|
|
280
|
+
</div>
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### Badge
|
|
284
|
+
|
|
285
|
+
The Badge component displays compact status labels or counts inline. CSS only. Supports soft (tinted), solid, and outline variants, three sizes, and a dot-only indicator.
|
|
286
|
+
|
|
287
|
+
``` html
|
|
288
|
+
<!-- Soft (default) -->
|
|
289
|
+
<span class="badge badge-info">Info</span>
|
|
290
|
+
<span class="badge badge-success">Success</span>
|
|
291
|
+
<span class="badge badge-warning">Warning</span>
|
|
292
|
+
<span class="badge badge-error">Error</span>
|
|
293
|
+
|
|
294
|
+
<!-- Solid fill -->
|
|
295
|
+
<span class="badge badge-solid badge-info">Info</span>
|
|
296
|
+
|
|
297
|
+
<!-- Outline -->
|
|
298
|
+
<span class="badge badge-outline badge-error">Error</span>
|
|
299
|
+
|
|
300
|
+
<!-- Sizes -->
|
|
301
|
+
<span class="badge badge-sm badge-info">Small</span>
|
|
302
|
+
<span class="badge badge-lg badge-info">Large</span>
|
|
303
|
+
|
|
304
|
+
<!-- Dot indicator (no text) -->
|
|
305
|
+
<span class="badge badge-dot badge-success"></span>
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
### Stepper
|
|
309
|
+
|
|
310
|
+
The Stepper component guides users through a multi-step process. Supports horizontal and vertical layouts, animated connector fills, active pulse, completed, and error states. Steps can optionally be made clickable for non-linear navigation.
|
|
311
|
+
|
|
312
|
+
``` html
|
|
313
|
+
<div class="stepper" id="my-stepper">
|
|
314
|
+
<div class="stepper-step completed">
|
|
315
|
+
<div class="stepper-indicator">
|
|
316
|
+
<svg class="icon-svg"><use href="svg-icons/icons.svg#check"/></svg>
|
|
317
|
+
</div>
|
|
318
|
+
<div class="stepper-label">
|
|
319
|
+
<span class="stepper-title">Account</span>
|
|
320
|
+
<span class="stepper-desc">Your details</span>
|
|
321
|
+
</div>
|
|
322
|
+
</div>
|
|
323
|
+
<div class="stepper-connector completed"></div>
|
|
324
|
+
<div class="stepper-step active">
|
|
325
|
+
<div class="stepper-indicator">2</div>
|
|
326
|
+
<div class="stepper-label">
|
|
327
|
+
<span class="stepper-title">Profile</span>
|
|
328
|
+
</div>
|
|
329
|
+
</div>
|
|
330
|
+
<div class="stepper-connector"></div>
|
|
331
|
+
<div class="stepper-step">
|
|
332
|
+
<div class="stepper-indicator">3</div>
|
|
333
|
+
<div class="stepper-label">
|
|
334
|
+
<span class="stepper-title">Review</span>
|
|
335
|
+
</div>
|
|
336
|
+
</div>
|
|
337
|
+
</div>
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
Add `.stepper-vertical` to the container for a vertical layout.
|
|
341
|
+
|
|
342
|
+
``` js
|
|
343
|
+
const stepper = new Stepper('#my-stepper', {
|
|
344
|
+
defaultStep: 0, // initial active step (0-based)
|
|
345
|
+
clickable: true, // allow clicking completed steps to navigate back
|
|
346
|
+
onChange: (current, previous) => console.log(current, previous),
|
|
347
|
+
});
|
|
348
|
+
|
|
349
|
+
stepper.next();
|
|
350
|
+
stepper.prev();
|
|
351
|
+
stepper.goTo(2);
|
|
352
|
+
stepper.setError(1);
|
|
353
|
+
stepper.clearError(1);
|
|
354
|
+
stepper.isFirst(); // boolean
|
|
355
|
+
stepper.isLast(); // boolean
|
|
356
|
+
stepper.getStep(); // current index
|
|
357
|
+
stepper.getStepCount();
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
| Option | Type | Default | Description |
|
|
361
|
+
|---|---|---|---|
|
|
362
|
+
| `defaultStep` | number | `0` | Index of the initially active step |
|
|
363
|
+
| `clickable` | boolean | `false` | Adds `.stepper-clickable` and wires click-to-navigate on all steps |
|
|
364
|
+
| `onChange` | function | — | Callback fired on step change: `(current, previous) => void` |
|
|
365
|
+
|
|
366
|
+
### Accordion
|
|
367
|
+
|
|
368
|
+
The Accordion component creates collapsible content sections. Uses hidden radio/checkbox inputs with labels and is CSS only.
|
|
369
|
+
|
|
370
|
+
``` html
|
|
371
|
+
<div class="accordion">
|
|
372
|
+
<div class="accordion-item">
|
|
373
|
+
<input type="radio" name="accordion" id="acc1" class="accordion-input" checked />
|
|
374
|
+
<label for="acc1" class="accordion-label">Section Title</label>
|
|
375
|
+
<div class="accordion-content">
|
|
376
|
+
<div class="accordion-body"><div><p>Content here.</p></div></div>
|
|
377
|
+
</div>
|
|
378
|
+
</div>
|
|
379
|
+
</div>
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
### Tabs
|
|
383
|
+
|
|
384
|
+
The Tabs component creates accessible tabbed interfaces. Supports horizontal/vertical layouts, keyboard navigation (arrow keys, Home, End), and ARIA attributes.
|
|
385
|
+
|
|
386
|
+
| Option | Type | Default | Description |
|
|
387
|
+
|---|---|---|---|
|
|
388
|
+
| `layout` | string | `'horizontal'` | Layout of the tabs, either `'horizontal'` or `'vertical'` |
|
|
389
|
+
| `defaultTab` | integer | `0` | Index of the default active tab (0-based) |
|
|
390
|
+
|
|
391
|
+
### Timeline
|
|
392
|
+
|
|
393
|
+
The Timeline component displays chronological events. CSS only.
|
|
394
|
+
|
|
395
|
+
``` html
|
|
396
|
+
<div class="timeline">
|
|
397
|
+
<div class="timeline-item active">
|
|
398
|
+
<div class="timeline-content">
|
|
399
|
+
<span class="timeline-date">October 12, 2023</span>
|
|
400
|
+
<h3 class="timeline-title">Event Title</h3>
|
|
401
|
+
<p class="timeline-body">Event description.</p>
|
|
402
|
+
</div>
|
|
403
|
+
</div>
|
|
404
|
+
</div>
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
### Progress Bar
|
|
408
|
+
|
|
409
|
+
The Progress Bar component displays task completion.
|
|
410
|
+
|
|
411
|
+
``` html
|
|
412
|
+
<div class="progress-bar">
|
|
413
|
+
<div class="progress" style="height: 24px; width: 50%"></div>
|
|
414
|
+
</div>
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
### Placeholder / Skeleton
|
|
418
|
+
|
|
419
|
+
The Placeholder component creates skeleton loading states. Use `.placeholder` with width classes `.w-1` through `.w-12` (12-column grid). Animates with a pulsing fade effect.
|
|
420
|
+
|
|
421
|
+
``` html
|
|
422
|
+
<span class="placeholder w-6"></span>
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
---
|
|
426
|
+
|
|
427
|
+
## Advanced Components
|
|
428
|
+
|
|
429
|
+
### Context Menu
|
|
430
|
+
|
|
431
|
+
The Context Menu component shows a custom right-click menu on any target element. Supports icons, keyboard shortcuts, group labels, separators, submenus, destructive items, and disabled items. Automatically flips to avoid viewport overflow and animates in from the click origin.
|
|
432
|
+
|
|
433
|
+
``` js
|
|
434
|
+
new ContextMenu('.my-element', [
|
|
435
|
+
{ group: 'File' },
|
|
436
|
+
{ label: 'Open', icon: 'folder_open', shortcut: '⌘O', action: (target) => {} },
|
|
437
|
+
{ label: 'Rename', icon: 'edit', shortcut: 'F2', action: (target) => {} },
|
|
438
|
+
'separator',
|
|
439
|
+
{
|
|
440
|
+
label: 'Share', icon: 'send',
|
|
441
|
+
submenu: [
|
|
442
|
+
{ label: 'Copy link', icon: 'attachment', action: (target) => {} },
|
|
443
|
+
{ label: 'Send by mail', icon: 'mail', action: (target) => {} },
|
|
444
|
+
]
|
|
445
|
+
},
|
|
446
|
+
'separator',
|
|
447
|
+
{ label: 'Delete', icon: 'delete', destructive: true, action: (target) => {} },
|
|
448
|
+
]);
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
The constructor accepts a CSS selector string, a single `HTMLElement`, or an array of `HTMLElement`s as the first argument.
|
|
452
|
+
|
|
453
|
+
#### Item types
|
|
454
|
+
|
|
455
|
+
| Type | Shape | Description |
|
|
456
|
+
|---|---|---|
|
|
457
|
+
| Action item | `ContextMenuItemDef` | Regular clickable item |
|
|
458
|
+
| Separator | `'separator'` | Horizontal divider line |
|
|
459
|
+
| Group label | `{ group: string }` | Non-interactive section header |
|
|
460
|
+
|
|
461
|
+
#### ContextMenuItemDef
|
|
462
|
+
|
|
463
|
+
| Property | Type | Description |
|
|
464
|
+
|---|---|---|
|
|
465
|
+
| `label` | string | Display text |
|
|
466
|
+
| `icon` | string | SVG sprite icon id (e.g. `'delete'`) |
|
|
467
|
+
| `shortcut` | string | Keyboard shortcut hint shown on the right (e.g. `'⌘O'`) |
|
|
468
|
+
| `disabled` | boolean | Renders item at reduced opacity, non-interactive |
|
|
469
|
+
| `destructive` | boolean | Renders item in error/red color |
|
|
470
|
+
| `action` | function | Callback `(target: HTMLElement) => void` — receives the right-clicked element |
|
|
471
|
+
| `submenu` | `ContextMenuInput[]` | Nested items; renders a submenu on hover |
|
|
472
|
+
|
|
473
|
+
#### Keyboard navigation
|
|
474
|
+
|
|
475
|
+
| Key | Action |
|
|
476
|
+
|---|---|
|
|
477
|
+
| `↑` / `↓` | Move focus between items |
|
|
478
|
+
| `Enter` | Activate focused item |
|
|
479
|
+
| `Escape` | Close the menu |
|
|
480
|
+
|
|
481
|
+
### Data Tables
|
|
482
|
+
|
|
483
|
+
The Table component provides sortable, searchable, and paginated data tables. It can parse existing HTML tables or accept data programmatically.
|
|
484
|
+
|
|
485
|
+
### Date Picker
|
|
486
|
+
|
|
487
|
+
The DatePicker component provides a calendar interface for date selection. Supports single date or date range modes, customizable locales, and mobile-responsive design.
|
|
488
|
+
|
|
489
|
+
#### DatePicker Parameters
|
|
490
|
+
|
|
491
|
+
| Parameter | Type | Description |
|
|
492
|
+
|---|---|---|
|
|
493
|
+
| `input` | HTMLInputElement \| string | The input element to attach the date picker to |
|
|
494
|
+
| `options` | DatePickerOptions | Configuration options for the date picker (see options table) |
|
|
495
|
+
| `currentDate` | Date | The current date to be displayed; defaults to today's date |
|
|
496
|
+
| `selectedDate` | Date | The selected date; defaults to null |
|
|
497
|
+
| `rangeStart` | Date | The start of a selected date range; defaults to null |
|
|
498
|
+
| `rangeEnd` | Date | The end of a selected date range; defaults to null |
|
|
499
|
+
| `viewYear` | number | The year currently displayed; defaults to the current year |
|
|
500
|
+
| `viewMonth` | number | The month currently displayed; defaults to the current month |
|
|
501
|
+
| `viewMode` | ViewMode | The view mode (`'days'` \| `'months'` \| `'years'`); defaults to `'days'` |
|
|
502
|
+
| `yearRangeStart` | number | The start of the year range; defaults to this year |
|
|
503
|
+
|
|
504
|
+
#### DatePickerOptions
|
|
505
|
+
|
|
506
|
+
| Option | Type | Default | Description |
|
|
507
|
+
|---|---|---|---|
|
|
508
|
+
| `mode` | string | `'single'` | Mode of the date picker, either `'single'` or `'range'` |
|
|
509
|
+
| `startDay` | number | `0` | Start day of the week (0 = Sunday, 1 = Monday, etc.) |
|
|
510
|
+
| `locales` | DatePickerLocales | — | Locales object containing a `days` array and a `months` array with localized names |
|
|
511
|
+
| `format` | `(date: Date) => string` | — | Function to format the date for display; defaults to `'YYYY-MM-DD'` |
|
|
512
|
+
| `onSelect` | `(date: Date \| DateRange) => void` | — | Callback when a date is selected |
|
|
513
|
+
|
|
514
|
+
### Tree Component
|
|
515
|
+
|
|
516
|
+
The TreeComponent renders hierarchical data as an expandable/collapsible tree. Supports file/folder icons, selection, and programmatic expand/collapse.
|
|
517
|
+
|
|
518
|
+
#### TreeComponent Parameters
|
|
519
|
+
|
|
520
|
+
| Parameter | Type | Description |
|
|
521
|
+
|---|---|---|
|
|
522
|
+
| `container` | HTMLElement \| string | The container element |
|
|
523
|
+
| `data` | TreeNode[] | An array of TreeNodes to render |
|
|
524
|
+
| `selectedNode` | TreeNode \| null | The currently selected TreeNode |
|
|
525
|
+
|
|
526
|
+
#### TreeNode
|
|
527
|
+
|
|
528
|
+
| Parameter | Type | Description |
|
|
529
|
+
|---|---|---|
|
|
530
|
+
| `label` | string | The label of the TreeNode |
|
|
531
|
+
| `type` | NodeType | The type of the TreeNode: `'file'` \| `'folder'` |
|
|
532
|
+
| `children` | TreeNode[] | An array of child TreeNodes |
|
|
533
|
+
|
|
534
|
+
### File Uploader
|
|
535
|
+
|
|
536
|
+
The FileUploader component provides drag-and-drop file upload functionality with progress indication. Supports file validation (size, type), multiple files, and upload cancellation.
|
|
537
|
+
|
|
538
|
+
### Virtual Dropdown
|
|
539
|
+
|
|
540
|
+
Virtual Dropdown is a performant, virtualized dropdown component that efficiently renders large option lists by only drawing visible items in the DOM. Supports single and multi-select modes, built-in search/filtering, keyboard navigation, and configurable item height and render limits — making it ideal for scenarios with hundreds or thousands of selectable options.
|
|
541
|
+
|
|
542
|
+
### Group Picker
|
|
543
|
+
|
|
544
|
+
The GroupPicker component enables hierarchical group and subgroup selection. Users can either select an entire parent group (covering all subgroups) or pick individual subgroups. Groups without children are directly selectable. Selecting all subgroups automatically promotes to a parent selection. Includes debounced search with match highlighting, expand/collapse, and a chip-based selection summary.
|
|
545
|
+
|
|
546
|
+
``` html
|
|
547
|
+
<div id="group-picker-demo"></div>
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
``` js
|
|
551
|
+
const data: GroupData[] = [
|
|
552
|
+
{
|
|
553
|
+
id: 'gruppenspiele', label: 'Gruppenspiele',
|
|
554
|
+
subgroups: [
|
|
555
|
+
{ id: 'grossgruppe', label: 'Grossgruppenspiele' },
|
|
556
|
+
{ id: 'trinkspiele', label: 'Trinkspiele' },
|
|
557
|
+
]
|
|
558
|
+
},
|
|
559
|
+
{ id: 'schach', label: 'Schach' }, // no subgroups — directly selectable
|
|
560
|
+
];
|
|
561
|
+
|
|
562
|
+
const picker = new GroupPicker('#group-picker-demo', data, {
|
|
563
|
+
onSelectionChange: (selection) => console.log(selection),
|
|
564
|
+
});
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
#### GroupData
|
|
568
|
+
|
|
569
|
+
| Property | Type | Description |
|
|
570
|
+
|---|---|---|
|
|
571
|
+
| `id` | string | Unique identifier for the group |
|
|
572
|
+
| `label` | string | Display name |
|
|
573
|
+
| `subgroups` | SubgroupData[] | Optional array of `{ id, label }` child items |
|
|
574
|
+
|
|
575
|
+
#### GroupPickerOptions
|
|
576
|
+
|
|
577
|
+
| Option | Type | Default | Description |
|
|
578
|
+
|---|---|---|---|
|
|
579
|
+
| `onSelectionChange` | function | — | Callback fired on selection change with `GroupPickerSelection` |
|
|
580
|
+
| `searchPlaceholder` | string | `'Gruppen durchsuchen...'` | Placeholder text for the search input |
|
|
581
|
+
| `selectAllLabel` | string | `'Alle'` | Label for the select-all button |
|
|
582
|
+
| `deselectLabel` | string | `'Abwahlen'` | Label shown when a parent group is selected |
|
|
583
|
+
| `emptyLabel` | string | `'Keine Ergebnisse'` | Shown when search yields no results |
|
|
584
|
+
| `selectionPlaceholder` | string | `'Noch keine Auswahl getroffen'` | Placeholder in the selection summary area |
|
|
585
|
+
|
|
586
|
+
#### Public API
|
|
587
|
+
|
|
588
|
+
| Method | Description |
|
|
589
|
+
|---|---|
|
|
590
|
+
| `getSelection()` | Returns `{ parentGroups: string[], subgroups: { groupId, subgroupId }[] }` |
|
|
591
|
+
| `setSelection(selection)` | Programmatically set the selection state |
|
|
592
|
+
| `clearSelection()` | Clear all selections |
|
|
593
|
+
| `expandAll()` | Expand all groups |
|
|
594
|
+
| `collapseAll()` | Collapse all groups |
|
|
595
|
+
| `destroy()` | Remove event listeners and clear the DOM |
|
|
596
|
+
|
|
597
|
+
### Custom Scrollbar
|
|
598
|
+
|
|
599
|
+
The Scrollbar component creates custom-styled scrollbars. Supports pointer/touch dragging, track clicking, and automatic thumb sizing. Can be used with any class.
|
|
600
|
+
|
|
601
|
+
``` html
|
|
602
|
+
<div class="scroll-container" style="height: 100px">
|
|
603
|
+
<div class="viewport">
|
|
604
|
+
<div class="content">...</div>
|
|
605
|
+
<div class="scrollbar" aria-hidden="true">
|
|
606
|
+
<div class="track">
|
|
607
|
+
<div class="thumb" role="presentation" aria-hidden="true"></div>
|
|
608
|
+
</div>
|
|
609
|
+
</div>
|
|
610
|
+
</div>
|
|
611
|
+
</div>
|
|
612
|
+
```
|
|
613
|
+
|
|
614
|
+
### Chat Bubbles
|
|
615
|
+
|
|
616
|
+
The Chat Bubbles component styles messaging interfaces.
|
|
617
|
+
|
|
618
|
+
``` html
|
|
619
|
+
<div class="chat-container">
|
|
620
|
+
<div class="message message-incoming">
|
|
621
|
+
Hello!
|
|
622
|
+
<span class="message-meta">10:42 AM</span>
|
|
623
|
+
</div>
|
|
624
|
+
<div class="message message-outgoing">
|
|
625
|
+
Hi there!
|
|
626
|
+
<span class="message-meta">10:43 AM</span>
|
|
627
|
+
</div>
|
|
628
|
+
</div>
|
|
629
|
+
```
|
|
630
|
+
|
|
631
|
+
### Carousel
|
|
632
|
+
|
|
633
|
+
The Carousel component creates image/content sliders with navigation buttons and dot indicators. Supports loop mode, autoplay, and touch/swipe gestures.
|
|
634
|
+
|
|
635
|
+
``` html
|
|
636
|
+
<div class="carousel" id="carouselIdHere">
|
|
637
|
+
<div>Slide 1</div>
|
|
638
|
+
<div>Slide 2</div>
|
|
639
|
+
<div>Slide 3</div>
|
|
640
|
+
</div>
|
|
641
|
+
```
|
|
642
|
+
|
|
643
|
+
### Gallery
|
|
644
|
+
|
|
645
|
+
A responsive, infinite-scroll masonry gallery that dynamically arranges image cards into columns. The layout automatically adapts to the viewport width, redistributing items into the shortest column for a balanced, Pinterest-style grid. Cards feature lazy-loaded images with a smooth fade-in effect, titles, and descriptions. Scroll to the bottom to load more content — fetching can be throttled with a configurable reload limit to prevent runaway requests.
|
|
646
|
+
|
|
647
|
+
#### Constructor Parameters
|
|
648
|
+
|
|
649
|
+
| Parameter | Type | Description |
|
|
650
|
+
|---|---|---|
|
|
651
|
+
| `containerId` | string | The `id` of the HTML element that will serve as the gallery container. Throws an error if not found in the DOM. |
|
|
652
|
+
| `options` | MasonryGalleryOptions | Optional configuration object to customise the gallery's layout and behaviour. Defaults to `{}`. |
|
|
653
|
+
|
|
654
|
+
#### MasonryGalleryOptions
|
|
655
|
+
|
|
656
|
+
| Option | Type | Default | Description |
|
|
657
|
+
|---|---|---|---|
|
|
658
|
+
| `minColumnWidth` | number | `250` | Minimum width (in pixels) for each masonry column. The number of columns is calculated by dividing the available container width by this value. |
|
|
659
|
+
| `scrollThreshold` | number | `100` | Distance from the bottom of the page (in pixels) at which the next batch of images is fetched. |
|
|
660
|
+
| `loaderSelector` | string | `'.loader'` | CSS selector for the loading-indicator element. Shown/hidden automatically during fetch cycles via a `hidden` class toggle. |
|
|
661
|
+
| `reload` | number | `2` | Maximum number of times new images can be fetched via infinite scroll. Once the limit is reached, further scroll events are ignored. |
|
|
662
|
+
| `fetchFunction` | `Promise<ImageData[]>` | — | A promise that resolves to an array of `ImageData` objects (`{ src, title, desc }`). Required in practice — the built-in fallback throws an error. |
|
|
663
|
+
|
|
664
|
+
---
|
|
665
|
+
|
|
666
|
+
## Utilities
|
|
667
|
+
|
|
668
|
+
### Theme Toggle
|
|
669
|
+
|
|
670
|
+
The Theme component manages light/dark mode switching. Persists preference to localStorage, respects system preference, and supports keyboard shortcut (Ctrl/Cmd+J). Any element with id `theme-toggle` can work as a switch.
|
|
671
|
+
|
|
672
|
+
### Scroll Utility
|
|
673
|
+
|
|
674
|
+
The Scroll utility allows to scroll to elements in the DOM. You can scroll to any class or id element.
|
|
675
|
+
|
|
676
|
+
``` js
|
|
677
|
+
window.Scroll.to('#my-element');
|
|
678
|
+
```
|
|
679
|
+
|
|
680
|
+
---
|
|
681
|
+
|
|
682
|
+
## How to Run Locally
|
|
683
|
+
|
|
684
|
+
Building is only necessary if you want to make changes to files. Otherwise, docker is enough.
|
|
685
|
+
|
|
686
|
+
```bash
|
|
687
|
+
# Docker
|
|
688
|
+
docker compose up -d
|
|
689
|
+
# → http://localhost:8082
|
|
690
|
+
|
|
691
|
+
# Compile TypeScript
|
|
692
|
+
# One-time compilation (all .ts files in js/)
|
|
693
|
+
npx tsc -p js/tsconfig.json
|
|
694
|
+
# Watch mode (auto-recompile on changes)
|
|
695
|
+
npx tsc -p js/tsconfig.json --watch
|
|
696
|
+
# Or use the shorter alias:
|
|
697
|
+
tsc -p js/tsconfig.json -w
|
|
698
|
+
|
|
699
|
+
# Compile SCSS to CSS
|
|
700
|
+
# Install sass first: npm install -g sass
|
|
701
|
+
sass css:css
|
|
702
|
+
# Or with watch mode:
|
|
703
|
+
sass --watch css:css
|
|
704
|
+
# Or compile + minify the main bundle:
|
|
705
|
+
sass --style=compressed css/style.scss css/style.min.css
|
|
706
|
+
```
|