@ktfth/stickjs 3.0.0
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 +169 -0
- package/README.md +449 -0
- package/bin/registry.json +20 -0
- package/bin/stickjs.js +158 -0
- package/llms.txt +244 -0
- package/package.json +38 -0
- package/stick-ui/components/accordion.html +25 -0
- package/stick-ui/components/autocomplete.html +82 -0
- package/stick-ui/components/command-palette.html +28 -0
- package/stick-ui/components/copy-button.html +12 -0
- package/stick-ui/components/data-table.html +191 -0
- package/stick-ui/components/dialog.html +23 -0
- package/stick-ui/components/dropdown.html +16 -0
- package/stick-ui/components/notification.html +11 -0
- package/stick-ui/components/skeleton.html +11 -0
- package/stick-ui/components/stepper.html +102 -0
- package/stick-ui/components/tabs.html +26 -0
- package/stick-ui/components/toast.html +10 -0
- package/stick-ui/components/toggle-group.html +16 -0
- package/stick-ui/components/toggle.html +9 -0
- package/stick-ui/components/tooltip.html +12 -0
- package/stick-ui/plugins/autocomplete.js +422 -0
- package/stick-ui/plugins/command-palette.js +289 -0
- package/stick-ui/plugins/data-table.js +426 -0
- package/stick-ui/plugins/dropdown.js +70 -0
- package/stick-ui/plugins/stepper.js +155 -0
- package/stick-ui/plugins/toast.js +51 -0
- package/stick-ui/plugins/tooltip.js +67 -0
- package/stick-ui/stick-ui.css +825 -0
- package/stick.d.ts +105 -0
- package/stick.js +655 -0
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
<!-- Stick UI: Data Table
|
|
2
|
+
Requires: stick.js + stick-ui/plugins/data-table.js
|
|
3
|
+
Optional: stick-ui.css (provides .stk-table-* styles)
|
|
4
|
+
Features: sort (click headers), filter (type in search), pagination (prev/next)
|
|
5
|
+
-->
|
|
6
|
+
<div class="stk-table-wrapper">
|
|
7
|
+
|
|
8
|
+
<!-- Toolbar: filter + page size selector -->
|
|
9
|
+
<div class="stk-table-toolbar">
|
|
10
|
+
<input
|
|
11
|
+
class="stk-table-filter"
|
|
12
|
+
type="text"
|
|
13
|
+
placeholder="Filter rows..."
|
|
14
|
+
aria-label="Filter table"
|
|
15
|
+
data-stick="input:table-filter:.stk-table"
|
|
16
|
+
>
|
|
17
|
+
<label style="margin-left:auto; display:inline-flex; align-items:center; gap:6px; font-size:var(--stk-text-sm); color:var(--stk-muted);">
|
|
18
|
+
Rows
|
|
19
|
+
<select
|
|
20
|
+
class="stk-table-page-size"
|
|
21
|
+
data-stick="change:table-page-size:.stk-table"
|
|
22
|
+
>
|
|
23
|
+
<option value="5" selected>5</option>
|
|
24
|
+
<option value="10">10</option>
|
|
25
|
+
<option value="20">20</option>
|
|
26
|
+
</select>
|
|
27
|
+
</label>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<!-- Table -->
|
|
31
|
+
<table class="stk-table" data-stk-paginate>
|
|
32
|
+
<thead>
|
|
33
|
+
<tr>
|
|
34
|
+
<th data-stk-sortable data-stick="click:table-sort:0">Name</th>
|
|
35
|
+
<th>Email</th>
|
|
36
|
+
<th data-stk-sortable data-stick="click:table-sort:2">Role</th>
|
|
37
|
+
<th>Status</th>
|
|
38
|
+
<th data-stk-sortable data-stick="click:table-sort:4">Joined</th>
|
|
39
|
+
</tr>
|
|
40
|
+
</thead>
|
|
41
|
+
<tbody>
|
|
42
|
+
<tr>
|
|
43
|
+
<td>Alice Johnson</td>
|
|
44
|
+
<td>alice@example.com</td>
|
|
45
|
+
<td>Admin</td>
|
|
46
|
+
<td>Active</td>
|
|
47
|
+
<td data-sort-value="2023-01-15">Jan 15, 2023</td>
|
|
48
|
+
</tr>
|
|
49
|
+
<tr>
|
|
50
|
+
<td>Bob Smith</td>
|
|
51
|
+
<td>bob@example.com</td>
|
|
52
|
+
<td>Editor</td>
|
|
53
|
+
<td>Active</td>
|
|
54
|
+
<td data-sort-value="2023-02-20">Feb 20, 2023</td>
|
|
55
|
+
</tr>
|
|
56
|
+
<tr>
|
|
57
|
+
<td>Carol Williams</td>
|
|
58
|
+
<td>carol@example.com</td>
|
|
59
|
+
<td>Viewer</td>
|
|
60
|
+
<td>Inactive</td>
|
|
61
|
+
<td data-sort-value="2023-03-10">Mar 10, 2023</td>
|
|
62
|
+
</tr>
|
|
63
|
+
<tr>
|
|
64
|
+
<td>Dave Brown</td>
|
|
65
|
+
<td>dave@example.com</td>
|
|
66
|
+
<td>Editor</td>
|
|
67
|
+
<td>Active</td>
|
|
68
|
+
<td data-sort-value="2023-04-05">Apr 5, 2023</td>
|
|
69
|
+
</tr>
|
|
70
|
+
<tr>
|
|
71
|
+
<td>Eve Davis</td>
|
|
72
|
+
<td>eve@example.com</td>
|
|
73
|
+
<td>Admin</td>
|
|
74
|
+
<td>Active</td>
|
|
75
|
+
<td data-sort-value="2023-05-18">May 18, 2023</td>
|
|
76
|
+
</tr>
|
|
77
|
+
<tr>
|
|
78
|
+
<td>Frank Miller</td>
|
|
79
|
+
<td>frank@example.com</td>
|
|
80
|
+
<td>Viewer</td>
|
|
81
|
+
<td>Inactive</td>
|
|
82
|
+
<td data-sort-value="2023-06-22">Jun 22, 2023</td>
|
|
83
|
+
</tr>
|
|
84
|
+
<tr>
|
|
85
|
+
<td>Grace Wilson</td>
|
|
86
|
+
<td>grace@example.com</td>
|
|
87
|
+
<td>Editor</td>
|
|
88
|
+
<td>Active</td>
|
|
89
|
+
<td data-sort-value="2023-07-01">Jul 1, 2023</td>
|
|
90
|
+
</tr>
|
|
91
|
+
<tr>
|
|
92
|
+
<td>Hank Moore</td>
|
|
93
|
+
<td>hank@example.com</td>
|
|
94
|
+
<td>Viewer</td>
|
|
95
|
+
<td>Active</td>
|
|
96
|
+
<td data-sort-value="2023-08-14">Aug 14, 2023</td>
|
|
97
|
+
</tr>
|
|
98
|
+
<tr>
|
|
99
|
+
<td>Ivy Taylor</td>
|
|
100
|
+
<td>ivy@example.com</td>
|
|
101
|
+
<td>Admin</td>
|
|
102
|
+
<td>Active</td>
|
|
103
|
+
<td data-sort-value="2023-09-30">Sep 30, 2023</td>
|
|
104
|
+
</tr>
|
|
105
|
+
<tr>
|
|
106
|
+
<td>Jack Anderson</td>
|
|
107
|
+
<td>jack@example.com</td>
|
|
108
|
+
<td>Editor</td>
|
|
109
|
+
<td>Inactive</td>
|
|
110
|
+
<td data-sort-value="2023-10-12">Oct 12, 2023</td>
|
|
111
|
+
</tr>
|
|
112
|
+
<tr>
|
|
113
|
+
<td>Karen Thomas</td>
|
|
114
|
+
<td>karen@example.com</td>
|
|
115
|
+
<td>Viewer</td>
|
|
116
|
+
<td>Active</td>
|
|
117
|
+
<td data-sort-value="2023-11-08">Nov 8, 2023</td>
|
|
118
|
+
</tr>
|
|
119
|
+
<tr>
|
|
120
|
+
<td>Leo Martinez</td>
|
|
121
|
+
<td>leo@example.com</td>
|
|
122
|
+
<td>Editor</td>
|
|
123
|
+
<td>Active</td>
|
|
124
|
+
<td data-sort-value="2023-12-01">Dec 1, 2023</td>
|
|
125
|
+
</tr>
|
|
126
|
+
<tr>
|
|
127
|
+
<td>Mia Jackson</td>
|
|
128
|
+
<td>mia@example.com</td>
|
|
129
|
+
<td>Admin</td>
|
|
130
|
+
<td>Inactive</td>
|
|
131
|
+
<td data-sort-value="2024-01-20">Jan 20, 2024</td>
|
|
132
|
+
</tr>
|
|
133
|
+
<tr>
|
|
134
|
+
<td>Noah White</td>
|
|
135
|
+
<td>noah@example.com</td>
|
|
136
|
+
<td>Viewer</td>
|
|
137
|
+
<td>Active</td>
|
|
138
|
+
<td data-sort-value="2024-02-14">Feb 14, 2024</td>
|
|
139
|
+
</tr>
|
|
140
|
+
<tr>
|
|
141
|
+
<td>Olivia Harris</td>
|
|
142
|
+
<td>olivia@example.com</td>
|
|
143
|
+
<td>Editor</td>
|
|
144
|
+
<td>Active</td>
|
|
145
|
+
<td data-sort-value="2024-03-05">Mar 5, 2024</td>
|
|
146
|
+
</tr>
|
|
147
|
+
<tr>
|
|
148
|
+
<td>Paul Clark</td>
|
|
149
|
+
<td>paul@example.com</td>
|
|
150
|
+
<td>Viewer</td>
|
|
151
|
+
<td>Active</td>
|
|
152
|
+
<td data-sort-value="2024-04-11">Apr 11, 2024</td>
|
|
153
|
+
</tr>
|
|
154
|
+
<tr>
|
|
155
|
+
<td>Quinn Lewis</td>
|
|
156
|
+
<td>quinn@example.com</td>
|
|
157
|
+
<td>Admin</td>
|
|
158
|
+
<td>Inactive</td>
|
|
159
|
+
<td data-sort-value="2024-05-28">May 28, 2024</td>
|
|
160
|
+
</tr>
|
|
161
|
+
</tbody>
|
|
162
|
+
</table>
|
|
163
|
+
|
|
164
|
+
<!-- Pagination (auto-managed by the plugin, but you can also place manually) -->
|
|
165
|
+
<div class="stk-table-pagination">
|
|
166
|
+
<span class="stk-table-page-info" aria-live="polite" role="status"></span>
|
|
167
|
+
<span class="stk-table-page-nav">
|
|
168
|
+
<button
|
|
169
|
+
class="stk-table-page-btn"
|
|
170
|
+
type="button"
|
|
171
|
+
data-stk-page="prev"
|
|
172
|
+
data-stick="click:table-paginate:prev"
|
|
173
|
+
>‹ Prev</button>
|
|
174
|
+
<span class="stk-table-page-num"></span>
|
|
175
|
+
<button
|
|
176
|
+
class="stk-table-page-btn"
|
|
177
|
+
type="button"
|
|
178
|
+
data-stk-page="next"
|
|
179
|
+
data-stick="click:table-paginate:next"
|
|
180
|
+
>Next ›</button>
|
|
181
|
+
</span>
|
|
182
|
+
</div>
|
|
183
|
+
|
|
184
|
+
</div>
|
|
185
|
+
|
|
186
|
+
<script>
|
|
187
|
+
// Initialise after DOM is ready
|
|
188
|
+
document.addEventListener('DOMContentLoaded', function () {
|
|
189
|
+
stkDataTable.init(document.querySelector('.stk-table'), { pageSize: 5 });
|
|
190
|
+
});
|
|
191
|
+
</script>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!-- Stick UI: Dialog (Modal)
|
|
2
|
+
Requires: stick.js
|
|
3
|
+
Optional: stick-ui.css
|
|
4
|
+
Uses native <dialog> — no plugin needed.
|
|
5
|
+
-->
|
|
6
|
+
<button class="stk-btn" data-stick="click:show-modal:" data-stick-target="#my-dialog">
|
|
7
|
+
Open dialog
|
|
8
|
+
</button>
|
|
9
|
+
<dialog id="my-dialog" class="stk-dialog">
|
|
10
|
+
<div class="stk-dialog-header">
|
|
11
|
+
<h3 class="stk-dialog-title">Dialog title</h3>
|
|
12
|
+
<button class="stk-dialog-close"
|
|
13
|
+
data-stick="click:close-modal:" data-stick-target="closest:dialog"
|
|
14
|
+
aria-label="Close">×</button>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="stk-dialog-body">
|
|
17
|
+
<p>Dialog content goes here.</p>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="stk-dialog-footer">
|
|
20
|
+
<button class="stk-btn" data-stick="click:close-modal:" data-stick-target="closest:dialog">Cancel</button>
|
|
21
|
+
<button class="stk-btn stk-btn-primary" data-stick="click:close-modal:confirmed" data-stick-target="closest:dialog">Confirm</button>
|
|
22
|
+
</div>
|
|
23
|
+
</dialog>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!-- Stick UI: Dropdown
|
|
2
|
+
Requires: stick.js + stick-ui/plugins/dropdown.js
|
|
3
|
+
Optional: stick-ui.css
|
|
4
|
+
-->
|
|
5
|
+
<div class="stk-dropdown">
|
|
6
|
+
<button class="stk-btn stk-dropdown-trigger" aria-expanded="false" aria-haspopup="true"
|
|
7
|
+
data-stick="click:dropdown" data-stick-target="next">
|
|
8
|
+
Options
|
|
9
|
+
</button>
|
|
10
|
+
<div class="stk-dropdown-menu" role="menu" hidden>
|
|
11
|
+
<button class="stk-dropdown-item" role="menuitem">Edit</button>
|
|
12
|
+
<button class="stk-dropdown-item" role="menuitem">Duplicate</button>
|
|
13
|
+
<div class="stk-dropdown-separator"></div>
|
|
14
|
+
<button class="stk-dropdown-item stk-dropdown-item-danger" role="menuitem">Delete</button>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Stick UI: Notification Banner
|
|
2
|
+
Requires: stick.js
|
|
3
|
+
Optional: stick-ui.css
|
|
4
|
+
Variants: stk-notification-info / success / warning / error
|
|
5
|
+
-->
|
|
6
|
+
<div class="stk-notification stk-notification-info" data-stick-transition="fade">
|
|
7
|
+
<span class="stk-notification-content">This is an informational message.</span>
|
|
8
|
+
<button class="stk-notification-dismiss"
|
|
9
|
+
data-stick="click:hide:" data-stick-target="parent"
|
|
10
|
+
aria-label="Dismiss">×</button>
|
|
11
|
+
</div>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Stick UI: Loading Skeleton
|
|
2
|
+
Requires: stick-ui.css (CSS only — no stick.js needed)
|
|
3
|
+
Use hidden attribute to hide when content loads.
|
|
4
|
+
Combine with data-stick="ready:hide:" or fetch loading states.
|
|
5
|
+
-->
|
|
6
|
+
<div>
|
|
7
|
+
<div class="stk-skeleton stk-skeleton-heading"></div>
|
|
8
|
+
<div class="stk-skeleton stk-skeleton-text" style="width:90%"></div>
|
|
9
|
+
<div class="stk-skeleton stk-skeleton-text" style="width:75%"></div>
|
|
10
|
+
<div class="stk-skeleton stk-skeleton-text" style="width:85%"></div>
|
|
11
|
+
</div>
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
<!-- Stick UI: Stepper / Wizard
|
|
2
|
+
Requires: stick.js + stick-ui/plugins/stepper.js
|
|
3
|
+
Optional: stick-ui/stick-ui.css
|
|
4
|
+
-->
|
|
5
|
+
<div id="signup-wizard" class="stk-stepper" data-stk-stepper
|
|
6
|
+
role="group" aria-label="Sign-up wizard">
|
|
7
|
+
|
|
8
|
+
<!-- ── Step indicators ─────────────────────────── -->
|
|
9
|
+
<div class="stk-stepper-header">
|
|
10
|
+
<div class="stk-stepper-indicator" data-stk-step-indicator aria-current="step">
|
|
11
|
+
1
|
|
12
|
+
<span class="stk-stepper-indicator-label">Personal Info</span>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="stk-stepper-connector"></div>
|
|
15
|
+
<div class="stk-stepper-indicator" data-stk-step-indicator>
|
|
16
|
+
2
|
|
17
|
+
<span class="stk-stepper-indicator-label">Preferences</span>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="stk-stepper-connector"></div>
|
|
20
|
+
<div class="stk-stepper-indicator" data-stk-step-indicator>
|
|
21
|
+
3
|
|
22
|
+
<span class="stk-stepper-indicator-label">Review</span>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<!-- ── Step panels ─────────────────────────────── -->
|
|
27
|
+
<div class="stk-stepper-body">
|
|
28
|
+
|
|
29
|
+
<!-- Step 1: Personal Info -->
|
|
30
|
+
<div class="stk-stepper-step" data-stk-step aria-label="Step 1 — Personal Info">
|
|
31
|
+
<div style="display:flex; flex-direction:column; gap:var(--stk-space-4); max-width:400px;">
|
|
32
|
+
<div>
|
|
33
|
+
<label class="stk-label" for="wiz-name">Full Name</label>
|
|
34
|
+
<input id="wiz-name" class="stk-input" type="text"
|
|
35
|
+
placeholder="Jane Doe" required>
|
|
36
|
+
</div>
|
|
37
|
+
<div>
|
|
38
|
+
<label class="stk-label" for="wiz-email">Email</label>
|
|
39
|
+
<input id="wiz-email" class="stk-input" type="email"
|
|
40
|
+
placeholder="jane@example.com" required>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<!-- Step 2: Preferences -->
|
|
46
|
+
<div class="stk-stepper-step" data-stk-step hidden aria-label="Step 2 — Preferences">
|
|
47
|
+
<div style="display:flex; flex-direction:column; gap:var(--stk-space-3); max-width:400px;">
|
|
48
|
+
<p style="margin:0; font-size:var(--stk-text-sm); color:var(--stk-fg); font-weight:500;">
|
|
49
|
+
How would you like to be contacted?
|
|
50
|
+
</p>
|
|
51
|
+
<label style="display:flex; align-items:center; gap:var(--stk-space-2); font-size:var(--stk-text-sm); color:var(--stk-fg);">
|
|
52
|
+
<input type="checkbox" name="contact" value="email"> Email updates
|
|
53
|
+
</label>
|
|
54
|
+
<label style="display:flex; align-items:center; gap:var(--stk-space-2); font-size:var(--stk-text-sm); color:var(--stk-fg);">
|
|
55
|
+
<input type="checkbox" name="contact" value="sms"> SMS notifications
|
|
56
|
+
</label>
|
|
57
|
+
<p style="margin:var(--stk-space-3) 0 0; font-size:var(--stk-text-sm); color:var(--stk-fg); font-weight:500;">
|
|
58
|
+
Preferred theme
|
|
59
|
+
</p>
|
|
60
|
+
<label style="display:flex; align-items:center; gap:var(--stk-space-2); font-size:var(--stk-text-sm); color:var(--stk-fg);">
|
|
61
|
+
<input type="radio" name="theme" value="light" checked> Light
|
|
62
|
+
</label>
|
|
63
|
+
<label style="display:flex; align-items:center; gap:var(--stk-space-2); font-size:var(--stk-text-sm); color:var(--stk-fg);">
|
|
64
|
+
<input type="radio" name="theme" value="dark"> Dark
|
|
65
|
+
</label>
|
|
66
|
+
<label style="display:flex; align-items:center; gap:var(--stk-space-2); font-size:var(--stk-text-sm); color:var(--stk-fg);">
|
|
67
|
+
<input type="radio" name="theme" value="system"> System
|
|
68
|
+
</label>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
<!-- Step 3: Review -->
|
|
73
|
+
<div class="stk-stepper-step" data-stk-step hidden aria-label="Step 3 — Review">
|
|
74
|
+
<div style="max-width:400px;">
|
|
75
|
+
<p style="margin:0 0 var(--stk-space-3); font-size:var(--stk-text-sm); color:var(--stk-fg); font-weight:500;">
|
|
76
|
+
Review your information
|
|
77
|
+
</p>
|
|
78
|
+
<p style="margin:0 0 var(--stk-space-2); font-size:var(--stk-text-sm); color:var(--stk-muted);">
|
|
79
|
+
Please verify that everything looks correct before submitting.
|
|
80
|
+
You can go back to previous steps to make changes.
|
|
81
|
+
</p>
|
|
82
|
+
<p style="margin:0; font-size:var(--stk-text-sm); color:var(--stk-fg);">
|
|
83
|
+
Click <strong>Submit</strong> to complete sign-up.
|
|
84
|
+
</p>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
<!-- ── Footer with navigation buttons ──────────── -->
|
|
90
|
+
<div class="stk-stepper-footer">
|
|
91
|
+
<button class="stk-btn"
|
|
92
|
+
data-stick="click:step-prev"
|
|
93
|
+
data-stick-target="#signup-wizard">
|
|
94
|
+
← Previous
|
|
95
|
+
</button>
|
|
96
|
+
<button class="stk-btn stk-btn-primary"
|
|
97
|
+
data-stick="click:step-next"
|
|
98
|
+
data-stick-target="#signup-wizard">
|
|
99
|
+
Next →
|
|
100
|
+
</button>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!-- Stick UI: Tabs
|
|
2
|
+
Requires: stick.js + set-aria handler
|
|
3
|
+
Optional: stick-ui.css
|
|
4
|
+
-->
|
|
5
|
+
<div class="stk-tabs">
|
|
6
|
+
<div class="stk-tab-list" role="tablist">
|
|
7
|
+
<button class="stk-tab" role="tab" aria-selected="true"
|
|
8
|
+
data-stick="click:set-aria:selected:true"
|
|
9
|
+
data-stick-2="click:set-aria:selected:false" data-stick-target-2="siblings"
|
|
10
|
+
data-stick-3="click:hide:" data-stick-target-3="all:.stk-tab-panel"
|
|
11
|
+
data-stick-4="click:show:" data-stick-target-4="#tab-1">Tab 1</button>
|
|
12
|
+
<button class="stk-tab" role="tab" aria-selected="false"
|
|
13
|
+
data-stick="click:set-aria:selected:true"
|
|
14
|
+
data-stick-2="click:set-aria:selected:false" data-stick-target-2="siblings"
|
|
15
|
+
data-stick-3="click:hide:" data-stick-target-3="all:.stk-tab-panel"
|
|
16
|
+
data-stick-4="click:show:" data-stick-target-4="#tab-2">Tab 2</button>
|
|
17
|
+
<button class="stk-tab" role="tab" aria-selected="false"
|
|
18
|
+
data-stick="click:set-aria:selected:true"
|
|
19
|
+
data-stick-2="click:set-aria:selected:false" data-stick-target-2="siblings"
|
|
20
|
+
data-stick-3="click:hide:" data-stick-target-3="all:.stk-tab-panel"
|
|
21
|
+
data-stick-4="click:show:" data-stick-target-4="#tab-3">Tab 3</button>
|
|
22
|
+
</div>
|
|
23
|
+
<div id="tab-1" class="stk-tab-panel" role="tabpanel">Content for Tab 1.</div>
|
|
24
|
+
<div id="tab-2" class="stk-tab-panel" role="tabpanel" hidden>Content for Tab 2.</div>
|
|
25
|
+
<div id="tab-3" class="stk-tab-panel" role="tabpanel" hidden>Content for Tab 3.</div>
|
|
26
|
+
</div>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<!-- Stick UI: Toast
|
|
2
|
+
Requires: stick.js + stick-ui/plugins/toast.js
|
|
3
|
+
Optional: stick-ui.css
|
|
4
|
+
Variants in param: "success:Saved!" / "error:Failed!" / "warning:Careful!" / "info:Note"
|
|
5
|
+
Container auto-creates. Add <div id="stk-toast-zone"></div> to customize position.
|
|
6
|
+
-->
|
|
7
|
+
<button class="stk-btn" data-stick="click:toast:Item saved!">Default toast</button>
|
|
8
|
+
<button class="stk-btn" data-stick="click:toast:success:Changes saved!">Success</button>
|
|
9
|
+
<button class="stk-btn" data-stick="click:toast:error:Something went wrong.">Error</button>
|
|
10
|
+
<button class="stk-btn" data-stick="click:toast:warning:Check your input.">Warning</button>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!-- Stick UI: Toggle Group
|
|
2
|
+
Requires: stick.js + set-aria handler
|
|
3
|
+
Optional: stick-ui.css
|
|
4
|
+
Radio behavior: clicking one deselects siblings.
|
|
5
|
+
-->
|
|
6
|
+
<div class="stk-toggle-group" role="group" aria-label="View mode">
|
|
7
|
+
<button class="stk-toggle-group-item" role="radio" aria-pressed="true"
|
|
8
|
+
data-stick="click:set-aria:pressed:true"
|
|
9
|
+
data-stick-2="click:set-aria:pressed:false" data-stick-target-2="siblings">Grid</button>
|
|
10
|
+
<button class="stk-toggle-group-item" role="radio" aria-pressed="false"
|
|
11
|
+
data-stick="click:set-aria:pressed:true"
|
|
12
|
+
data-stick-2="click:set-aria:pressed:false" data-stick-target-2="siblings">List</button>
|
|
13
|
+
<button class="stk-toggle-group-item" role="radio" aria-pressed="false"
|
|
14
|
+
data-stick="click:set-aria:pressed:true"
|
|
15
|
+
data-stick-2="click:set-aria:pressed:false" data-stick-target-2="siblings">Table</button>
|
|
16
|
+
</div>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<!-- Stick UI: Toggle / Switch
|
|
2
|
+
Requires: stick.js + toggle-aria handler
|
|
3
|
+
Optional: stick-ui.css
|
|
4
|
+
-->
|
|
5
|
+
<button class="stk-toggle" role="switch" aria-checked="false"
|
|
6
|
+
data-stick="click:toggle-aria:checked">
|
|
7
|
+
<span class="stk-toggle-track"></span>
|
|
8
|
+
<span class="stk-toggle-label">Feature toggle</span>
|
|
9
|
+
</button>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!-- Stick UI: Tooltip
|
|
2
|
+
Requires: stick.js + stick-ui/plugins/tooltip.js
|
|
3
|
+
Optional: stick-ui.css
|
|
4
|
+
Position: data-stk-tooltip-pos="top|bottom|left|right" (default: top)
|
|
5
|
+
-->
|
|
6
|
+
<button class="stk-btn"
|
|
7
|
+
data-stick="mouseenter:tooltip:This is a tooltip"
|
|
8
|
+
data-stick-2="mouseleave:tooltip-hide:"
|
|
9
|
+
data-stick-3="focus:tooltip:This is a tooltip"
|
|
10
|
+
data-stick-4="blur:tooltip-hide:">
|
|
11
|
+
Hover me
|
|
12
|
+
</button>
|