zidan-select 2.4.0 → 2.4.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/docs/build.md CHANGED
@@ -99,13 +99,13 @@ Without esbuild the build still succeeds and prints that minification was skippe
99
99
 
100
100
  | Build | JavaScript | Core CSS | Theme CSS |
101
101
  | --- | --- | --- | --- |
102
- | Full | `/dist/zidan-form.min.js` | `/dist/plugin-core.min.css` | `/dist/plugin-theme.min.css` |
103
- | Select-only | `/dist/select/zidan-select.min.js` | `/dist/select/plugin-select-core.min.css` | `/dist/select/plugin-select-theme.min.css` |
104
- | File-only | `/dist/file/zidan-file.min.js` | `/dist/file/plugin-file-core.min.css` | `/dist/file/plugin-file-theme.min.css` |
102
+ | Full | `/dist/zidan-form.min.js` — ≈131 kB | `/dist/plugin-core.min.css` — ≈31 kB | `/dist/plugin-theme.min.css` — ≈39 kB |
103
+ | Select-only | `/dist/select/zidan-select.min.js` — ≈68 kB | `/dist/select/plugin-select-core.min.css` — ≈9 kB | `/dist/select/plugin-select-theme.min.css` — ≈27 kB |
104
+ | File-only | `/dist/file/zidan-file.min.js` — ≈50 kB | `/dist/file/plugin-file-core.min.css` — ≈7 kB | `/dist/file/plugin-file-theme.min.css` — ≈29 kB |
105
105
 
106
- Prepend `https://cdn.jsdelivr.net/npm/zidan-select@2.4.0` to each path (or your own origin).
107
- These are real files in the npm tarball, so unpkg and self-hosted CDNs serve the same bytes;
108
- jsDelivr additionally auto-minifies the readable root files, but do not rely on that trick.
106
+ Prepend `https://cdn.jsdelivr.net/npm/zidan-select@2.4.1` to each path (or your own origin).
107
+ These are real files in the npm tarball, so unpkg and self-hosted CDNs serve the same bytes.
108
+ Use these package files rather than relying on a CDN's auto-minification.
109
109
  Check the three you use with `curl -I` before changing a version, then update the URLs in the
110
110
  README, the demo build cards and the playground in the same commit.
111
111
 
@@ -126,19 +126,26 @@ Both theme stylesheets keep the token set, the five preset themes (`default`, `m
126
126
  adapters, so `data-zidan-theme`, `data-zidan-layout` and `data-zidan-framework` behave the same
127
127
  as in the full build.
128
128
 
129
- Approximate v2.4.0 sizes (readable → minified): select ≈104 → 62 kB JS, 12 → 9 kB core CSS,
130
- 32 → 27 kB theme; file ≈82 → 49 kB JS, 9 → 7 kB core, 34 → 29 kB theme; full ≈208 → 123 kB
131
- JS, 38 → 29 kB core, 47 → 39 kB theme.
129
+ Measured v2.4.1 sizes (1 kB = 1,024 bytes; readable → minified):
130
+
131
+ | Build | JavaScript | Core CSS | Theme CSS |
132
+ | --- | --- | --- | --- |
133
+ | Full | 229,274 B (≈224 kB) → 134,575 B (≈131 kB) | 41,054 B (≈40 kB) → 31,422 B (≈31 kB) | 47,697 B (≈47 kB) → 39,983 B (≈39 kB) |
134
+ | Select-only | 116,926 B (≈114 kB) → 69,144 B (≈68 kB) | 12,456 B (≈12 kB) → 9,511 B (≈9 kB) | 32,559 B (≈32 kB) → 27,505 B (≈27 kB) |
135
+ | File-only | 87,728 B (≈86 kB) → 51,406 B (≈50 kB) | 9,939 B (≈10 kB) → 7,210 B (≈7 kB) | 34,991 B (≈34 kB) → 29,929 B (≈29 kB) |
132
136
 
133
137
  A page should load **one** flavour: a subset **or** the full build. The `__zidanFormGuard`
134
138
  check keeps the first initialised copy, so loading two flavours together does not merge their
135
139
  APIs — use the full build when a page needs both select and file upload.
136
140
 
137
141
  Declarative init comes along in both subsets because the marker scan and the factory live in the
138
- shared/factory sections every variant keeps. `class="zidan-select"`, `class="zidan-field"`,
139
- `data-zidan-options` JSON and `window.ZIDAN_FORM_CONFIG` targets all work without a JS call; a
140
- `zidan-form` scope enhances every select in the select bundle and every file input in the file
141
- bundle.
142
+ shared/factory sections every variant keeps. `class="zidan-select"`, `data-zidan-options` JSON
143
+ and `window.ZIDAN_FORM_CONFIG` targets all work without a JS call; a `zidan-form` scope enhances
144
+ every select in the select bundle and every file input in the file bundle. The select-only bundle
145
+ also contains the complete AJAX/pagination implementation — `fetchUrl`, `fetchOptions`,
146
+ `fetchPageSize`, `loadMore()`, `refreshOptions()`, `getAsyncState()` and cache clearing — because
147
+ those sections are part of its build. The file-only bundle intentionally excludes select APIs;
148
+ it keeps the shared validation, theming, declarative-init and upload features.
142
149
 
143
150
  Build-time safety: every generated JS file is passed through `node --check`, and missing sections
144
151
  abort the build instead of producing a partial bundle.
@@ -185,7 +192,8 @@ Flags: `--dry-run` (print the plan, write nothing), `--no-commit` (edit files an
185
192
  only), `--skip-checks`. It requires a clean tracked working tree, so the release commit holds only
186
193
  the bump, and it refuses a version that is already tagged.
187
194
 
188
- Pushing the tag starts `.github/workflows/release.yml`. Nothing else to run.
195
+ Pushing the tag starts `.github/workflows/release.yml`. Nothing else to run: it publishes to npm and
196
+ creates the matching GitHub Release, so the Releases panel and the changelog stay in step.
189
197
 
190
198
  ## Publishing to npm
191
199
 
@@ -193,7 +201,7 @@ Publishing happens in CI:
193
201
 
194
202
  | Trigger | What happens |
195
203
  | --- | --- |
196
- | Tag `vX.Y.Z` pushed | Verifies the tag against `package.json`, refuses an existing version, runs `prepublishOnly` (types → build → test), publishes with `--provenance`. |
204
+ | Tag `vX.Y.Z` pushed | Verifies the tag against `package.json`, refuses an existing version, runs `prepublishOnly` (types → build → test), publishes with `--provenance`, then creates the GitHub Release for the tag with that version's `CHANGELOG.md` section as the body (`scripts/changelog-section.mjs`), falling back to `--generate-notes` when the section is missing. |
197
205
  | **Actions → Publish to npm → Run workflow** | The same job without a tag, for publishing the version already committed. |
198
206
 
199
207
  Authentication is **npm trusted publishing** over OIDC: the job requests `id-token: write` and
@@ -31,8 +31,8 @@ same two stylesheets.
31
31
  | Built-in themes | **5** + custom tokens | Themes via CSS | Themes via CSS | Themes via CSS | Themes via CSS | 1 (Bootstrap) |
32
32
  | CSS-framework adapters | **Bootstrap, Tailwind, Bulma, Foundation** | — | — | — | — | n/a |
33
33
  | Validation coexistence tests | **jQuery Validation, JustValidate, Parsley, native** | — | — | — | — | Native + framework |
34
- | Framework support | **React, Next.js, Vue, Svelte, Angular guides** | Community wrappers | Community wrappers | Community wrappers | Community wrappers | Framework kits |
35
- | Weight | ~5,300 lines, one JS file | larger, plus jQuery | moderate | moderate | small | large (whole framework) |
34
+ | Framework support | **React, Next.js, Vue, Angular guides** | Community wrappers | Community wrappers | Community wrappers | Community wrappers | Framework kits |
35
+ | Weight | ≈224 kB raw JS + two CSS files | larger, plus jQuery | moderate | moderate | small | large (whole framework) |
36
36
 
37
37
  Feature claims above describe each project's *core* package. Plugins and community add-ons can
38
38
  close some gaps — check the other project's current docs before deciding.
@@ -66,7 +66,7 @@ close some gaps — check the other project's current docs before deciding.
66
66
  Bootstrap.
67
67
  - **No framework components.** React/Vue/Angular integration is lifecycle wiring around the
68
68
  vanilla API, not a native component library.
69
- - **Newer.** Version 2.0 is a rename/expansion of `zidan-select`; pin a version and read the
69
+ - **Newer.** Version 2.x is a rename/expansion of `zidan-select`; pin a version and read the
70
70
  migration notes.
71
71
 
72
72
  ## Choose ZidanForm when…
@@ -25,9 +25,11 @@ export default function ProfileForm() {
25
25
 
26
26
  useEffect(() => {
27
27
  initZidanSelects(host.current);
28
- initZidanForms(host.current);
29
- const radios = ZidanForm.fields.find(f => f.kind === 'radio-group' && host.current.contains(f.root));
30
- radios?.onChange = ({ value }) => setPlan(value);
28
+ initZidanForms(host.current, {
29
+ onChange: ({ instance, value }) => {
30
+ if (instance.kind === 'radio-group') setPlan(value);
31
+ }
32
+ });
31
33
 
32
34
  return () => {
33
35
  ZidanForm.fields
@@ -115,16 +117,27 @@ inside a server-only module.
115
117
 
116
118
  ```vue
117
119
  <script setup>
118
- import { onBeforeUnmount, onMounted, ref } from 'vue';
120
+ import { onBeforeUnmount, onMounted, ref, watch } from 'vue';
119
121
  import { ZidanForm, ZidanSelect, initZidanForms, initZidanSelects } from 'zidan-select';
120
122
  import 'zidan-select/css/core';
121
123
  import 'zidan-select/css/theme';
122
124
 
123
125
  const host = ref(null);
126
+ const model = ref('France');
124
127
 
125
128
  onMounted(() => {
126
129
  initZidanSelects(host.value);
127
130
  initZidanForms(host.value);
131
+ const country = host.value.querySelector('select[name="country"]');
132
+ country.addEventListener('zidan:change', event => {
133
+ model.value = event.detail.value;
134
+ });
135
+ });
136
+
137
+ watch(model, value => {
138
+ const country = host.value?.querySelector('select[name="country"]');
139
+ const field = ZidanSelect.instances.find(instance => instance.el === country);
140
+ field?.setValue(value);
128
141
  });
129
142
 
130
143
  onBeforeUnmount(() => {
@@ -147,15 +160,8 @@ onBeforeUnmount(() => {
147
160
  </template>
148
161
  ```
149
162
 
150
- For two-way binding, read `zidan:change` in `onMounted`:
151
-
152
- ```js
153
- host.value.addEventListener('zidan:change', event => {
154
- model.value = event.detail.value;
155
- });
156
- ```
157
-
158
- and push back with `field.setValue(model.value)` in a `watch()`.
163
+ The `model` ref above demonstrates two-way binding: the native `zidan:change` event updates
164
+ Vue state, and `watch()` pushes external changes back through the select instance.
159
165
 
160
166
  ## Angular
161
167
 
@@ -33,15 +33,15 @@ colours), `plugin-theme.css` carries colours, presets and skins.
33
33
  | File uploads only | `dist/file/zidan-file.js` + `plugin-file-core.css` + `plugin-file-theme.css` |
34
34
  | Several control types together | `zidan-form.js` + `plugin-core.css` + `plugin-theme.css` |
35
35
 
36
- Pinned CDN URLs (replace `2.4.0` when you upgrade):
36
+ Pinned CDN URLs (replace `2.4.1` when you upgrade):
37
37
 
38
38
  | Build | JavaScript | CSS |
39
39
  | --- | --- | --- |
40
- | Full | `https://cdn.jsdelivr.net/npm/zidan-select@2.4.0/zidan-form.js` | `…@2.4.0/plugin-core.css` + `…@2.4.0/plugin-theme.css` |
41
- | Select-only | `https://cdn.jsdelivr.net/npm/zidan-select@2.4.0/dist/select/zidan-select.js` | `…@2.4.0/dist/select/plugin-select-core.css` + `…plugin-select-theme.css` |
42
- | File-only | `https://cdn.jsdelivr.net/npm/zidan-select@2.4.0/dist/file/zidan-file.js` | `…@2.4.0/dist/file/plugin-file-core.css` + `…plugin-file-theme.css` |
40
+ | Full | `https://cdn.jsdelivr.net/npm/zidan-select@2.4.1/zidan-form.js` | `…@2.4.1/plugin-core.css` + `…@2.4.1/plugin-theme.css` |
41
+ | Select-only | `https://cdn.jsdelivr.net/npm/zidan-select@2.4.1/dist/select/zidan-select.js` | `…@2.4.1/dist/select/plugin-select-core.css` + `…plugin-select-theme.css` |
42
+ | File-only | `https://cdn.jsdelivr.net/npm/zidan-select@2.4.1/dist/file/zidan-file.js` | `…@2.4.1/dist/file/plugin-file-core.css` + `…plugin-file-theme.css` |
43
43
 
44
- Prefer self-hosting? Download the same files (`npm pack zidan-select@2.4.0`, or the raw files
44
+ Prefer self-hosting? Download the same files (`npm pack zidan-select@2.4.1`, or the raw files
45
45
  from GitHub) and keep them next to your page:
46
46
 
47
47
  ```
@@ -174,8 +174,8 @@ see the native `FormData`.
174
174
  <title>ZidanForm static example</title>
175
175
 
176
176
  <!-- structure first, theme second -->
177
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/zidan-select@2.4.0/plugin-core.css">
178
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/zidan-select@2.4.0/plugin-theme.css">
177
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/zidan-select@2.4.1/plugin-core.css">
178
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/zidan-select@2.4.1/plugin-theme.css">
179
179
  </head>
180
180
  <body>
181
181
 
@@ -251,7 +251,7 @@ see the native `FormData`.
251
251
  </form>
252
252
  </main>
253
253
 
254
- <script src="https://cdn.jsdelivr.net/npm/zidan-select@2.4.0/zidan-form.js"></script>
254
+ <script src="https://cdn.jsdelivr.net/npm/zidan-select@2.4.1/zidan-form.js"></script>
255
255
  <script>
256
256
  // Demo only: show the native FormData instead of navigating away.
257
257
  document.querySelector('.zidan-form').addEventListener('submit', function (event) {
@@ -289,9 +289,9 @@ and `ZidanSelect`; `zidanField` does not exist here.
289
289
  <meta name="viewport" content="width=device-width, initial-scale=1">
290
290
  <title>Select-only example</title>
291
291
  <link rel="stylesheet"
292
- href="https://cdn.jsdelivr.net/npm/zidan-select@2.4.0/dist/select/plugin-select-core.css">
292
+ href="https://cdn.jsdelivr.net/npm/zidan-select@2.4.1/dist/select/plugin-select-core.css">
293
293
  <link rel="stylesheet"
294
- href="https://cdn.jsdelivr.net/npm/zidan-select@2.4.0/dist/select/plugin-select-theme.css">
294
+ href="https://cdn.jsdelivr.net/npm/zidan-select@2.4.1/dist/select/plugin-select-theme.css">
295
295
  </head>
296
296
  <body style="max-width:520px;margin:40px auto;padding:0 20px">
297
297
 
@@ -311,7 +311,7 @@ and `ZidanSelect`; `zidanField` does not exist here.
311
311
  </select>
312
312
  </p>
313
313
 
314
- <script src="https://cdn.jsdelivr.net/npm/zidan-select@2.4.0/dist/select/zidan-select.js"></script>
314
+ <script src="https://cdn.jsdelivr.net/npm/zidan-select@2.4.1/dist/select/zidan-select.js"></script>
315
315
  <script>
316
316
  zidanSelect('#country', {
317
317
  mode: 'combobox',
@@ -342,9 +342,9 @@ Only uploads on this page? Load the file-only build. It exposes `zidanField`,
342
342
  <meta name="viewport" content="width=device-width, initial-scale=1">
343
343
  <title>File upload example</title>
344
344
  <link rel="stylesheet"
345
- href="https://cdn.jsdelivr.net/npm/zidan-select@2.4.0/dist/file/plugin-file-core.css">
345
+ href="https://cdn.jsdelivr.net/npm/zidan-select@2.4.1/dist/file/plugin-file-core.css">
346
346
  <link rel="stylesheet"
347
- href="https://cdn.jsdelivr.net/npm/zidan-select@2.4.0/dist/file/plugin-file-theme.css">
347
+ href="https://cdn.jsdelivr.net/npm/zidan-select@2.4.1/dist/file/plugin-file-theme.css">
348
348
  </head>
349
349
  <body style="max-width:520px;margin:40px auto;padding:0 20px">
350
350
 
@@ -356,7 +356,7 @@ Only uploads on this page? Load the file-only build. It exposes `zidanField`,
356
356
  <input id="shots" type="file" name="shots" multiple accept="image/*">
357
357
  </form>
358
358
 
359
- <script src="https://cdn.jsdelivr.net/npm/zidan-select@2.4.0/dist/file/zidan-file.js"></script>
359
+ <script src="https://cdn.jsdelivr.net/npm/zidan-select@2.4.1/dist/file/zidan-file.js"></script>
360
360
  <script>
361
361
  zidanField('#cv', {
362
362
  variant: 'dropzone',
@@ -475,9 +475,9 @@ add_action('wp_enqueue_scripts', function () {
475
475
 
476
476
  $base = get_stylesheet_directory_uri() . '/assets/zidan';
477
477
 
478
- wp_enqueue_style('zidan-core', $base . '/plugin-core.css', array(), '2.4.0');
479
- wp_enqueue_style('zidan-theme', $base . '/plugin-theme.css', array('zidan-core'), '2.4.0');
480
- wp_enqueue_script('zidan-form', $base . '/zidan-form.js', array(), '2.4.0', true);
478
+ wp_enqueue_style('zidan-core', $base . '/plugin-core.css', array(), '2.4.1');
479
+ wp_enqueue_style('zidan-theme', $base . '/plugin-theme.css', array('zidan-core'), '2.4.1');
480
+ wp_enqueue_script('zidan-form', $base . '/zidan-form.js', array(), '2.4.1', true);
481
481
 
482
482
  // Optional: configure fields by ID/class without inline HTML scripts.
483
483
  wp_add_inline_script('zidan-form', "window.ZIDAN_FORM_CONFIG = {
@@ -552,9 +552,9 @@ Shopify has its own section: [9. Shopify](#9-shopify).
552
552
  ```html
553
553
  <!-- inside one embed block: markup first, script last -->
554
554
  <select class="zidan-select" data-zidan-options='{"mode":"combobox"}'>…</select>
555
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/zidan-select@2.4.0/plugin-core.css">
556
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/zidan-select@2.4.0/plugin-theme.css">
557
- <script src="https://cdn.jsdelivr.net/npm/zidan-select@2.4.0/zidan-form.js"></script>
555
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/zidan-select@2.4.1/plugin-core.css">
556
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/zidan-select@2.4.1/plugin-theme.css">
557
+ <script src="https://cdn.jsdelivr.net/npm/zidan-select@2.4.1/zidan-form.js"></script>
558
558
  ```
559
559
 
560
560
  For the single-select case, the select-only build is smaller: swap in the
package/docs/index.html CHANGED
@@ -1,125 +1,181 @@
1
1
  <!DOCTYPE html>
2
- <html lang="en">
2
+ <html lang="en" data-zs-theme="default" data-zs-framework="none">
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
6
6
  <title>ZidanForm documentation</title>
7
7
  <meta name="description" content="ZidanForm documentation index: field playground, options and data attributes, validation compatibility, theming, framework integration, build and publish guides.">
8
8
  <link rel="canonical" href="https://akhtar1985.github.io/zidan-select/docs/">
9
+ <meta name="theme-color" content="#4f6bed">
9
10
  <meta property="og:type" content="website">
11
+ <meta property="og:site_name" content="ZidanForm">
10
12
  <meta property="og:title" content="ZidanForm documentation">
11
13
  <meta property="og:description" content="Options, validation, theming, frameworks and build guides for the ZidanForm vanilla form library.">
12
14
  <meta property="og:url" content="https://akhtar1985.github.io/zidan-select/docs/">
13
15
  <meta property="og:image" content="https://akhtar1985.github.io/zidan-select/docs/demo-inputs.png">
14
16
  <meta name="twitter:card" content="summary_large_image">
15
- <style>
16
- :root { color-scheme: light; }
17
- * { box-sizing: border-box; }
18
- body {
19
- margin: 0;
20
- padding: 48px 24px 72px;
21
- font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
22
- color: #101324;
23
- background: #f5f6fb;
24
- line-height: 1.6;
25
- }
26
- main { max-width: 720px; margin: 0 auto; }
27
- a { color: #4f6bed; }
28
- h1 { margin: 0 0 6px; font-size: 2rem; letter-spacing: -0.02em; }
29
- p.lead { margin: 0 0 28px; color: #525a70; }
30
- ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
31
- li {
32
- background: #fff;
33
- border: 1px solid #e4e8f1;
34
- border-radius: 14px;
35
- padding: 16px 18px;
36
- box-shadow: 0 1px 2px rgba(16, 19, 36, 0.05);
37
- }
38
- li strong { display: block; font-size: 0.95rem; }
39
- li span { font-size: 0.85rem; color: #6b7385; }
40
- code { background: #eef1fd; padding: 1px 5px; border-radius: 5px; font-size: 0.85em; }
41
- footer { margin-top: 32px; font-size: 0.85rem; color: #6b7385; }
42
- </style>
17
+ <link rel="stylesheet" href="../plugin-core.css">
18
+ <link rel="stylesheet" href="../plugin-theme.css">
19
+ <link rel="stylesheet" href="../demo.css">
20
+ <link rel="stylesheet" href="../nav.css">
21
+ <link rel="stylesheet" href="../docs.css">
43
22
  </head>
44
23
  <body>
45
- <main>
46
- <h1>ZidanForm documentation</h1>
47
- <p class="lead">
48
- Zero-dependency form enhancement: select, checkbox, switch, radio, file upload, text,
49
- number, phone, date and range inputs — with input icons, steppers, upload progress,
50
- async validation, remote select pagination, RTL support and TypeScript declarations.
51
- Start with the <a href="../index.html">interactive demo</a> or the
52
- <a href="../playground.html">field playground</a>, then dive into the reference.
53
- </p>
24
+ <a class="skip-link" href="#docs-main">Skip to content</a>
25
+ <div class="bg-orbs" aria-hidden="true"><span class="orb"></span></div>
26
+
27
+ <header class="site-header">
28
+ <a class="brand" href="../index.html">
29
+ <span class="logo-mark" aria-hidden="true">Z</span>
30
+ <span>
31
+ <span class="brand-name">ZidanForm</span>
32
+ <span class="brand-sub">v2.4.1 · zero dependencies</span>
33
+ </span>
34
+ </a>
35
+ <button class="nav-toggle" type="button" aria-expanded="false" aria-controls="site-nav">
36
+ <span class="nav-toggle-bars" aria-hidden="true"><span></span><span></span><span></span></span>
37
+ <span>Menu</span>
38
+ </button>
39
+ <nav class="header-nav" id="site-nav" aria-label="Project links">
40
+ <a href="../index.html">Demo</a>
41
+ <a href="../advanced.html">Advanced</a>
42
+ <a href="../playground.html">Playground</a>
43
+ <a href="../ajax.html">AJAX</a>
44
+ <a href="../shopify.html">Shopify</a>
45
+ <a href="../index.html#compare">Compare</a>
46
+ <a href="../index.html#faq">FAQ</a>
47
+ <details class="nav-docs">
48
+ <summary>Docs</summary>
49
+ <div class="nav-docs-panel">
50
+ <a href="index.html" aria-current="page">Documentation index</a>
51
+ <a href="options.html">Options &amp; data attributes</a>
52
+ <a href="comparison.html">Why &amp; comparison</a>
53
+ <a href="frameworks.html">Frameworks</a>
54
+ <a href="html-and-wordpress.html">HTML &amp; WordPress</a>
55
+ <a href="validation-guide.html">Validation</a>
56
+ <a href="theming.html">Theming</a>
57
+ <a href="build.html">Build &amp; publish</a>
58
+ </div>
59
+ </details>
60
+ <a href="https://github.com/akhtar1985/zidan-select">GitHub</a>
61
+ <a href="https://www.npmjs.com/package/zidan-select">npm</a>
62
+ <label class="sr-only" for="quick-theme">Page theme</label>
63
+ <select id="quick-theme" aria-label="Page theme">
64
+ <option value="default">Default theme</option>
65
+ <option value="modern">Modern</option>
66
+ <option value="minimal">Minimal</option>
67
+ <option value="dark">Dark</option>
68
+ <option value="glass">Glass</option>
69
+ </select>
70
+ </nav>
71
+ </header>
72
+
73
+ <main id="docs-main" class="wrap docs-main">
74
+ <section class="hero docs-hero" aria-labelledby="docs-title">
75
+ <p class="eyebrow"><span class="eyebrow-dot" aria-hidden="true"></span> Documentation · guides &amp; reference</p>
76
+ <h1 id="docs-title">Everything you need to <span>build with ZidanForm.</span></h1>
77
+ <p class="doc-blurb">
78
+ Zero-dependency form enhancement: select, checkbox, switch, radio, file upload, text,
79
+ number, phone, date and range inputs — with input icons, steppers, upload progress,
80
+ async validation, remote select pagination, RTL support and TypeScript declarations.
81
+ Start with the <a href="../index.html">interactive demo</a> or the
82
+ <a href="../playground.html">field playground</a>, then dive into the reference.
83
+ </p>
84
+ <div class="hero-actions">
85
+ <a class="btn btn-primary" href="../playground.html">Open the playground</a>
86
+ <a class="btn" href="../index.html">Interactive demo</a>
87
+ <a class="btn" href="options.html">Options reference</a>
88
+ </div>
89
+ </section>
90
+
54
91
  <a href="../index.html">
55
- <img src="demo-inputs.png" alt="Input icons, number stepper, phone formatting and range controls in the ZidanForm demo"
56
- style="display:block;width:100%;max-width:640px;margin:0 0 28px;border-radius:14px;border:1px solid #e4e8f1;box-shadow:0 1px 2px rgba(16,19,36,.05)">
92
+ <img class="doc-screenshot" src="demo-inputs.png" alt="Input icons, number stepper, phone formatting and range controls in the ZidanForm demo">
57
93
  </a>
58
- <ul>
59
- <li>
60
- <strong><a href="../advanced.html">Advanced options &amp; API reference</a></strong>
94
+
95
+ <div class="doc-index-grid">
96
+ <a class="card doc-index-card" href="../advanced.html">
97
+ <strong>Advanced options &amp; API reference</strong>
61
98
  <span>Initialization and option precedence, async select pagination, tags, Promise validation, uploads, events, lifecycle, RTL, TypeScript and copyable HTML/JavaScript examples.</span>
62
- </li>
63
- <li>
64
- <strong><a href="../playground.html">Field playground</a></strong>
99
+ </a>
100
+ <a class="card doc-index-card" href="../playground.html">
101
+ <strong>Field playground</strong>
65
102
  <span>Pick one control, toggle its options, preview it live and copy the matching HTML attributes or vanilla JavaScript call.</span>
66
- </li>
67
- <li>
68
- <strong><a href="../ajax.html">AJAX &amp; remote data demo</a></strong>
103
+ </a>
104
+ <a class="card doc-index-card" href="../ajax.html">
105
+ <strong>AJAX &amp; remote data demo</strong>
69
106
  <span>Declarative <code>data-zidan-fetch-url</code> against a real API, plus a hand-written <code>fetchOptions</code> example with paging, abort and cache state on screen.</span>
70
- </li>
71
- <li>
72
- <strong><a href="../index.html#controls">Controls &amp; options reference</a></strong>
107
+ </a>
108
+ <a class="card doc-index-card" href="../index.html#controls">
109
+ <strong>Controls &amp; options reference</strong>
73
110
  <span>Every control family in one place: the options you reach for most, the two ways to initialise a field, and live examples — with links into the playground for the remaining options and the advanced reference for callbacks and the API.</span>
74
- </li>
75
- <li>
76
- <strong><a href="html-and-wordpress.html">Static HTML &amp; WordPress cookbook</a></strong>
111
+ </a>
112
+ <a class="card doc-index-card" href="html-and-wordpress.html">
113
+ <strong>Static HTML &amp; WordPress cookbook</strong>
77
114
  <span>Complete copy-paste pages for plain HTML, select-only and file-only builds, ID/class targeting, WordPress <code>functions.php</code>, Shopify <code>asset_url</code> + Liquid sections, and troubleshooting for page builders and caching plugins.</span>
78
- </li>
79
- <li>
80
- <strong><a href="../shopify.html">Shopify product-page demo</a></strong>
115
+ </a>
116
+ <a class="card doc-index-card" href="../shopify.html">
117
+ <strong>Shopify product-page demo</strong>
81
118
  <span>A mock storefront product form: variant combobox, stepper, gift-wrap switch, tile radios and an upload dropzone — with the Liquid snippets to install it in a theme, and what Shopify's checkout does not allow.</span>
82
- </li>
83
- <li>
84
- <strong><a href="https://github.com/akhtar1985/zidan-select#which-files-should-you-load">Which files should I load?</a></strong>
119
+ </a>
120
+ <a class="card doc-index-card" href="https://github.com/akhtar1985/zidan-select#which-files-should-you-load">
121
+ <strong>Which files should I load?</strong>
85
122
  <span>Only want a select, or only a file upload? Load only that build — you do not need the full bundle. The complete form JS and CSS is for forms that enhance every input at once.</span>
86
- </li>
87
- <li>
88
- <strong><a href="comparison.html">Why ZidanForm &amp; comparison</a></strong>
123
+ </a>
124
+ <a class="card doc-index-card" href="comparison.html">
125
+ <strong>Why ZidanForm &amp; comparison</strong>
89
126
  <span>Feature matrix against Select2, Choices.js, Tom Select, Slim Select and Bootstrap, plus benefits, trade-offs and migration notes.</span>
90
- </li>
91
- <li>
92
- <strong><a href="options.html">Options &amp; data attributes</a></strong>
127
+ </a>
128
+ <a class="card doc-index-card" href="options.html">
129
+ <strong>Options &amp; data attributes</strong>
93
130
  <span>Every JS option, data attribute, callback, event and instance method — remote pagination and cache controls, no-JS init by marker class, form scope, <code>data-zidan-options</code> JSON and config targets, in the full build and both subsets. TypeScript declarations ship with the package.</span>
94
- </li>
95
- <li>
96
- <strong><a href="validation-guide.html">Validation compatibility</a></strong>
97
- <span>Native constraint validation, jQuery Validation, JustValidate, Parsley and double-submit guards. <a href="validation.html">Runnable test bench →</a></span>
98
- </li>
99
- <li>
100
- <strong><a href="theming.html">Theming</a></strong>
131
+ </a>
132
+ <a class="card doc-index-card" href="validation-guide.html">
133
+ <strong>Validation compatibility</strong>
134
+ <span>Native constraint validation, jQuery Validation, JustValidate, Parsley and double-submit guards, with copyable integration patterns.</span>
135
+ </a>
136
+ <a class="card doc-index-card" href="validation.html">
137
+ <strong>Live validation test bench</strong>
138
+ <span>Run the same form through native constraints, jQuery Validation, JustValidate and Parsley, then inspect each result live.</span>
139
+ </a>
140
+ <a class="card doc-index-card" href="theming.html">
141
+ <strong>Theming</strong>
101
142
  <span>Token reference, five presets, layouts, framework adapters and custom themes.</span>
102
- </li>
103
- <li>
104
- <strong><a href="frameworks.html">Framework integration</a></strong>
143
+ </a>
144
+ <a class="card doc-index-card" href="frameworks.html">
145
+ <strong>Framework integration</strong>
105
146
  <span>React, Next.js (with SSR), Vue, Angular and state-sync patterns.</span>
106
- </li>
107
- <li>
108
- <strong><a href="build.html#select-only-and-file-only-builds">Select-only &amp; file-only builds</a></strong>
147
+ </a>
148
+ <a class="card doc-index-card" href="build.html#select-only-and-file-only-builds">
149
+ <strong>Select-only &amp; file-only builds</strong>
109
150
  <span>Trimmed JS and matching CSS for pages that only need a select or a file upload, with every theme and framework adapter included.</span>
110
- </li>
111
- <li>
112
- <strong><a href="build.html">Build &amp; publish</a></strong>
151
+ </a>
152
+ <a class="card doc-index-card" href="build.html">
153
+ <strong>Build &amp; publish</strong>
113
154
  <span>Repository layout, scripts, dist output, npm publishing and GitHub Pages.</span>
114
- </li>
115
- </ul>
116
- <footer>
155
+ </a>
156
+ </div>
157
+
158
+ <p class="doc-source-note">
117
159
  Markdown guides open rendered on GitHub; <a href="../index.html">the demo</a>, the
118
160
  <a href="../playground.html">field playground</a>, the
119
161
  <a href="../shopify.html">Shopify product-page demo</a> and the
120
162
  <a href="validation.html">validation bench</a> run here on GitHub Pages.
121
163
  Source: <a href="https://github.com/akhtar1985/zidan-select">github.com/akhtar1985/zidan-select</a>.
122
- </footer>
164
+ </p>
123
165
  </main>
166
+
167
+ <footer class="site-footer">
168
+ <div class="wrap">
169
+ <p>
170
+ <strong>ZidanForm</strong> — MIT licensed, no dependencies.
171
+ <a href="../index.html">Demo</a> ·
172
+ <a href="../playground.html">Playground</a> ·
173
+ <a href="index.html">Documentation</a> ·
174
+ <a href="https://github.com/akhtar1985/zidan-select">GitHub</a>
175
+ </p>
176
+ </div>
177
+ </footer>
178
+
179
+ <script src="../nav.js"></script>
124
180
  </body>
125
181
  </html>