zidan-select 2.1.2 → 2.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 +182 -22
- package/dist/file/plugin-file-core.css +464 -0
- package/dist/file/plugin-file-theme.css +1247 -0
- package/dist/file/zidan-file.js +1946 -0
- package/dist/file/zidan-file.mjs +24 -0
- package/dist/plugin-core.css +22 -1
- package/dist/plugin-theme.css +10 -1
- package/dist/select/plugin-select-core.css +515 -0
- package/dist/select/plugin-select-theme.css +1034 -0
- package/dist/select/zidan-select.js +2515 -0
- package/dist/select/zidan-select.mjs +24 -0
- package/dist/zidan-form.js +316 -86
- package/docs/build.md +55 -3
- package/docs/comparison.md +14 -3
- package/docs/index.html +5 -1
- package/docs/options.md +77 -4
- package/package.json +19 -3
- package/plugin-core.css +22 -1
- package/plugin-theme.css +10 -1
- package/zidan-form.js +316 -86
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ZidanForm File-only — ES module entry point.
|
|
3
|
+
*
|
|
4
|
+
* import { ZidanFileUpload, zidanField } from './zidan-file.mjs';
|
|
5
|
+
*
|
|
6
|
+
* Pairs with plugin-file-core.css and plugin-file-theme.css.
|
|
7
|
+
* https://github.com/akhtar1985/zidan-select
|
|
8
|
+
*/
|
|
9
|
+
import './zidan-file.js';
|
|
10
|
+
|
|
11
|
+
const host = typeof window !== 'undefined' ? window : globalThis;
|
|
12
|
+
|
|
13
|
+
if (!host.ZidanForm) {
|
|
14
|
+
throw new Error('ZidanForm: subset script did not initialise (no DOM available?).');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const core = host.ZidanForm.api || host;
|
|
18
|
+
|
|
19
|
+
export const ZidanForm = host.ZidanForm;
|
|
20
|
+
export const ZidanFileUpload = core.ZidanFileUpload;
|
|
21
|
+
export const zidanField = core.zidanField;
|
|
22
|
+
export const initZidanForms = core.initZidanForms;
|
|
23
|
+
export const registerIcon = core.registerIcon;
|
|
24
|
+
export default ZidanForm;
|
package/dist/plugin-core.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ZidanForm v2.
|
|
2
|
+
* ZidanForm v2.2.0 — plugin-core.css
|
|
3
3
|
* Structure and mechanics only: layout, positioning, visibility, focus
|
|
4
4
|
* plumbing and accessible native-input handling. No colours, borders colours,
|
|
5
5
|
* shadows or decorative skin — load plugin-theme.css (or your own theme) for
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* MIT License © akhtar1985
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
+
/* @zidan-build:scope */
|
|
12
13
|
/* ==================================================================
|
|
13
14
|
1. Scope reset
|
|
14
15
|
================================================================== */
|
|
@@ -38,6 +39,7 @@
|
|
|
38
39
|
box-sizing: border-box;
|
|
39
40
|
}
|
|
40
41
|
|
|
42
|
+
/* @zidan-build:select-shell */
|
|
41
43
|
/* ==================================================================
|
|
42
44
|
2. Select / combobox / tags — shell
|
|
43
45
|
================================================================== */
|
|
@@ -87,6 +89,7 @@
|
|
|
87
89
|
cursor: not-allowed;
|
|
88
90
|
}
|
|
89
91
|
|
|
92
|
+
/* @zidan-build:select-values */
|
|
90
93
|
/* ==================================================================
|
|
91
94
|
3. Values, chips, input, icons
|
|
92
95
|
================================================================== */
|
|
@@ -221,6 +224,7 @@
|
|
|
221
224
|
height: 28px;
|
|
222
225
|
}
|
|
223
226
|
|
|
227
|
+
/* @zidan-build:select-dropdown */
|
|
224
228
|
/* ==================================================================
|
|
225
229
|
4. Dropdown / listbox
|
|
226
230
|
================================================================== */
|
|
@@ -355,6 +359,7 @@
|
|
|
355
359
|
border: 0;
|
|
356
360
|
}
|
|
357
361
|
|
|
362
|
+
/* @zidan-build:select-layouts */
|
|
358
363
|
/* ==================================================================
|
|
359
364
|
5. Select layout mechanics
|
|
360
365
|
(skin and token presets live in plugin-theme.css)
|
|
@@ -461,6 +466,7 @@
|
|
|
461
466
|
margin: 0;
|
|
462
467
|
}
|
|
463
468
|
|
|
469
|
+
/* @zidan-build:fields-shared */
|
|
464
470
|
/* ==================================================================
|
|
465
471
|
6. Fields — shared shell
|
|
466
472
|
================================================================== */
|
|
@@ -534,6 +540,7 @@
|
|
|
534
540
|
margin: 0;
|
|
535
541
|
}
|
|
536
542
|
|
|
543
|
+
/* @zidan-build:checkbox */
|
|
537
544
|
/* ==================================================================
|
|
538
545
|
7. Checkbox / switch
|
|
539
546
|
================================================================== */
|
|
@@ -757,6 +764,7 @@
|
|
|
757
764
|
border-radius: 4px;
|
|
758
765
|
}
|
|
759
766
|
|
|
767
|
+
/* @zidan-build:radio */
|
|
760
768
|
/* ==================================================================
|
|
761
769
|
8. Radio groups
|
|
762
770
|
================================================================== */
|
|
@@ -876,6 +884,7 @@
|
|
|
876
884
|
min-width: 0;
|
|
877
885
|
}
|
|
878
886
|
|
|
887
|
+
/* @zidan-build:file */
|
|
879
888
|
/* ==================================================================
|
|
880
889
|
9. File upload
|
|
881
890
|
================================================================== */
|
|
@@ -1175,6 +1184,7 @@
|
|
|
1175
1184
|
cursor: pointer;
|
|
1176
1185
|
}
|
|
1177
1186
|
|
|
1187
|
+
/* @zidan-build:text */
|
|
1178
1188
|
/* ==================================================================
|
|
1179
1189
|
10. Text inputs & textarea
|
|
1180
1190
|
================================================================== */
|
|
@@ -1231,6 +1241,15 @@ textarea.zs-input-native {
|
|
|
1231
1241
|
-webkit-appearance: auto;
|
|
1232
1242
|
}
|
|
1233
1243
|
|
|
1244
|
+
/* a custom icon (or picker button) replaces the browser's own indicator */
|
|
1245
|
+
.zs-field--custom-picker[data-zs-type="date"] .zs-input-native::-webkit-calendar-picker-indicator,
|
|
1246
|
+
.zs-field--custom-picker[data-zs-type="time"] .zs-input-native::-webkit-calendar-picker-indicator,
|
|
1247
|
+
.zs-field--custom-picker[data-zs-type="datetime-local"] .zs-input-native::-webkit-calendar-picker-indicator,
|
|
1248
|
+
.zs-field--custom-picker[data-zs-type="month"] .zs-input-native::-webkit-calendar-picker-indicator,
|
|
1249
|
+
.zs-field--custom-picker[data-zs-type="week"] .zs-input-native::-webkit-calendar-picker-indicator {
|
|
1250
|
+
display: none;
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1234
1253
|
.zs-field[data-zs-type="color"] .zs-input-native {
|
|
1235
1254
|
height: 34px;
|
|
1236
1255
|
padding: 0;
|
|
@@ -1552,6 +1571,7 @@ textarea.zs-input-native {
|
|
|
1552
1571
|
border-radius: var(--zs-radius, 10px);
|
|
1553
1572
|
}
|
|
1554
1573
|
|
|
1574
|
+
/* @zidan-build:form-layout */
|
|
1555
1575
|
/* ==================================================================
|
|
1556
1576
|
11. Form layout helper
|
|
1557
1577
|
================================================================== */
|
|
@@ -1567,6 +1587,7 @@ textarea.zs-input-native {
|
|
|
1567
1587
|
grid-column: 1 / -1;
|
|
1568
1588
|
}
|
|
1569
1589
|
|
|
1590
|
+
/* @zidan-build:focus */
|
|
1570
1591
|
/* ==================================================================
|
|
1571
1592
|
12. Focus & motion
|
|
1572
1593
|
================================================================== */
|
package/dist/plugin-theme.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ZidanForm v2.
|
|
2
|
+
* ZidanForm v2.2.0 — plugin-theme.css
|
|
3
3
|
* Design tokens, paint, state colours, preset themes (default, modern,
|
|
4
4
|
* minimal, dark, glass), the five select layouts and framework adapters
|
|
5
5
|
* (bootstrap, tailwind, bulma, foundation).
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* MIT License © akhtar1985
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
+
/* @zidan-build:tokens */
|
|
15
16
|
/* ==================================================================
|
|
16
17
|
1. Default tokens
|
|
17
18
|
================================================================== */
|
|
@@ -133,6 +134,7 @@
|
|
|
133
134
|
--zs-shadow: none;
|
|
134
135
|
}
|
|
135
136
|
|
|
137
|
+
/* @zidan-build:select-paint */
|
|
136
138
|
/* ==================================================================
|
|
137
139
|
2. Select paint
|
|
138
140
|
================================================================== */
|
|
@@ -324,6 +326,7 @@
|
|
|
324
326
|
box-shadow: var(--zs-shadow), 0 0 0 var(--zs-focus-ring-width) var(--zs-focus-ring);
|
|
325
327
|
}
|
|
326
328
|
|
|
329
|
+
/* @zidan-build:select-layouts */
|
|
327
330
|
/* ==================================================================
|
|
328
331
|
3. Select layout presets
|
|
329
332
|
================================================================== */
|
|
@@ -452,6 +455,7 @@
|
|
|
452
455
|
}
|
|
453
456
|
}
|
|
454
457
|
|
|
458
|
+
/* @zidan-build:scrollbar */
|
|
455
459
|
/* ==================================================================
|
|
456
460
|
4. Scrollbar variants
|
|
457
461
|
================================================================== */
|
|
@@ -571,6 +575,7 @@
|
|
|
571
575
|
}
|
|
572
576
|
}
|
|
573
577
|
|
|
578
|
+
/* @zidan-build:field-paint */
|
|
574
579
|
/* ==================================================================
|
|
575
580
|
5. Field paint
|
|
576
581
|
================================================================== */
|
|
@@ -1205,6 +1210,7 @@
|
|
|
1205
1210
|
outline: none;
|
|
1206
1211
|
}
|
|
1207
1212
|
|
|
1213
|
+
/* @zidan-build:preset-themes */
|
|
1208
1214
|
/* ==================================================================
|
|
1209
1215
|
6. Preset themes
|
|
1210
1216
|
================================================================== */
|
|
@@ -1396,6 +1402,7 @@
|
|
|
1396
1402
|
}
|
|
1397
1403
|
}
|
|
1398
1404
|
|
|
1405
|
+
/* @zidan-build:field-layout-paint */
|
|
1399
1406
|
/* ==================================================================
|
|
1400
1407
|
7. Field layouts that need paint
|
|
1401
1408
|
================================================================== */
|
|
@@ -1413,6 +1420,7 @@
|
|
|
1413
1420
|
--zs-label-size: 0.75rem;
|
|
1414
1421
|
}
|
|
1415
1422
|
|
|
1423
|
+
/* @zidan-build:adapters */
|
|
1416
1424
|
/* ==================================================================
|
|
1417
1425
|
8. Framework adapters
|
|
1418
1426
|
================================================================== */
|
|
@@ -1647,6 +1655,7 @@
|
|
|
1647
1655
|
--zs-upload-bar: #1779ba;
|
|
1648
1656
|
}
|
|
1649
1657
|
|
|
1658
|
+
/* @zidan-build:forced */
|
|
1650
1659
|
/* ==================================================================
|
|
1651
1660
|
9. Forced colours & motion-independent state visibility
|
|
1652
1661
|
================================================================== */
|