create-basicjs 0.1.4 → 0.1.6
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 +12 -2
- package/bin/create-basicjs.js +58 -5
- package/bin/verify-package.js +1 -1
- package/package.json +2 -2
- package/payload/projects/tauri/.github/workflows/build.yml +86 -0
- package/payload/projects/tauri/.github/workflows/tests.yml +87 -0
- package/payload/projects/tauri/AGENTS.md +128 -0
- package/payload/projects/tauri/CLAUDE.md +1 -0
- package/payload/projects/tauri/LICENSE +201 -0
- package/payload/projects/tauri/NOTICE +8 -0
- package/payload/projects/tauri/README.md +269 -0
- package/payload/projects/tauri/checks/window-check.js +189 -0
- package/payload/projects/tauri/gitignore +8 -0
- package/payload/projects/tauri/handbook/01-getting-started.md +188 -0
- package/payload/projects/tauri/handbook/02-the-project.md +264 -0
- package/payload/projects/tauri/handbook/03-the-page.md +260 -0
- package/payload/projects/tauri/handbook/04-commands.md +265 -0
- package/payload/projects/tauri/handbook/05-events-and-state.md +275 -0
- package/payload/projects/tauri/handbook/06-plugins.md +282 -0
- package/payload/projects/tauri/handbook/07-the-window-and-the-app.md +431 -0
- package/payload/projects/tauri/handbook/08-security.md +374 -0
- package/payload/projects/tauri/handbook/09-tests-and-checks.md +266 -0
- package/payload/projects/tauri/handbook/10-building-and-releasing.md +238 -0
- package/payload/projects/tauri/handbook/11-troubleshooting.md +259 -0
- package/payload/projects/tauri/handbook/README.md +125 -0
- package/payload/projects/tauri/handbook/turkce/01-getting-started.md +193 -0
- package/payload/projects/tauri/handbook/turkce/02-the-project.md +272 -0
- package/payload/projects/tauri/handbook/turkce/03-the-page.md +272 -0
- package/payload/projects/tauri/handbook/turkce/04-commands.md +271 -0
- package/payload/projects/tauri/handbook/turkce/05-events-and-state.md +284 -0
- package/payload/projects/tauri/handbook/turkce/06-plugins.md +286 -0
- package/payload/projects/tauri/handbook/turkce/07-the-window-and-the-app.md +433 -0
- package/payload/projects/tauri/handbook/turkce/08-security.md +384 -0
- package/payload/projects/tauri/handbook/turkce/09-tests-and-checks.md +275 -0
- package/payload/projects/tauri/handbook/turkce/10-building-and-releasing.md +241 -0
- package/payload/projects/tauri/handbook/turkce/11-troubleshooting.md +264 -0
- package/payload/projects/tauri/handbook/turkce/README.md +128 -0
- package/payload/projects/tauri/images/app.png +0 -0
- package/payload/projects/tauri/src-tauri/Cargo.lock +4389 -0
- package/payload/projects/tauri/src-tauri/Cargo.toml +31 -0
- package/payload/projects/tauri/src-tauri/app-icon.svg +16 -0
- package/payload/projects/tauri/src-tauri/build.rs +15 -0
- package/payload/projects/tauri/src-tauri/capabilities/default.json +7 -0
- package/payload/projects/tauri/src-tauri/gitignore +5 -0
- package/payload/projects/tauri/src-tauri/icons/128x128.png +0 -0
- package/payload/projects/tauri/src-tauri/icons/128x128@2x.png +0 -0
- package/payload/projects/tauri/src-tauri/icons/32x32.png +0 -0
- package/payload/projects/tauri/src-tauri/icons/icon.icns +0 -0
- package/payload/projects/tauri/src-tauri/icons/icon.ico +0 -0
- package/payload/projects/tauri/src-tauri/src/check.rs +144 -0
- package/payload/projects/tauri/src-tauri/src/files.rs +255 -0
- package/payload/projects/tauri/src-tauri/src/main.rs +45 -0
- package/payload/projects/tauri/src-tauri/src/sizes.rs +214 -0
- package/payload/projects/tauri/src-tauri/tauri.conf.json +44 -0
- package/payload/projects/tauri/src-tauri/tests/project.rs +243 -0
- package/payload/projects/tauri/ui/app.js +459 -0
- package/payload/projects/tauri/ui/backend.js +196 -0
- package/payload/projects/tauri/ui/basic/LICENSE +14 -0
- package/payload/projects/tauri/ui/basic/basic.min.css +1 -0
- package/payload/projects/tauri/ui/basic/basic.min.js +78 -0
- package/payload/projects/tauri/ui/basic/font/open-sans/LICENSE.txt +206 -0
- package/payload/projects/tauri/ui/basic/font/open-sans/OpenSans-Bold.ttf +0 -0
- package/payload/projects/tauri/ui/basic/font/open-sans/OpenSans-Regular.ttf +0 -0
- package/payload/projects/tauri/ui/basic/scroll-bar.min.js +3 -0
- package/payload/projects/tauri/ui/comp/_sources.txt +9 -0
- package/payload/projects/tauri/ui/comp/components.min.js +21 -0
- package/payload/projects/tauri/ui/index.html +28 -0
- package/payload/projects/tauri/ui/sizes.js +104 -0
- package/payload/starter/AGENTS.md +11 -6
- package/payload/starter/README.md +1 -1
- package/payload/starter/_basic/VERSION +1 -1
- package/payload/starter/_basic/assets/cards/almond-blossom.png +0 -0
- package/payload/starter/_basic/assets/cards/blackberry.png +0 -0
- package/payload/starter/_basic/assets/cards/borage.png +0 -0
- package/payload/starter/_basic/assets/cards/chamomile.png +0 -0
- package/payload/starter/_basic/assets/cards/dill.png +0 -0
- package/payload/starter/_basic/assets/cards/eucalyptus.png +0 -0
- package/payload/starter/_basic/assets/cards/fennel.png +0 -0
- package/payload/starter/_basic/assets/cards/fig.png +0 -0
- package/payload/starter/_basic/assets/cards/juniper.png +0 -0
- package/payload/starter/_basic/assets/cards/lavender.png +0 -0
- package/payload/starter/_basic/assets/cards/lemon.png +0 -0
- package/payload/starter/_basic/assets/cards/olives.png +0 -0
- package/payload/starter/_basic/assets/cards/oregano.png +0 -0
- package/payload/starter/_basic/assets/cards/pepper.png +0 -0
- package/payload/starter/_basic/assets/cards/physalis.png +0 -0
- package/payload/starter/_basic/assets/cards/pomegranate.png +0 -0
- package/payload/starter/_basic/assets/cards/poppy.png +0 -0
- package/payload/starter/_basic/assets/cards/rosehip.png +0 -0
- package/payload/starter/_basic/assets/cards/saffron.png +0 -0
- package/payload/starter/_basic/assets/categories/cappuccino.png +0 -0
- package/payload/starter/_basic/assets/categories/chocolate-milk.png +0 -0
- package/payload/starter/_basic/assets/categories/coffee.png +0 -0
- package/payload/starter/_basic/assets/categories/frappe.png +0 -0
- package/payload/starter/_basic/assets/categories/iced-caffee.png +0 -0
- package/payload/starter/_basic/assets/categories/milkshake.png +0 -0
- package/payload/starter/_basic/assets/categories/orange-juice.png +0 -0
- package/payload/starter/_basic/assets/categories/tea.png +0 -0
- package/payload/starter/_basic/assets/fruids/brokoli.png +0 -0
- package/payload/starter/_basic/assets/fruids/cilek.png +0 -0
- package/payload/starter/_basic/assets/fruids/domates.png +0 -0
- package/payload/starter/_basic/assets/fruids/elma.png +0 -0
- package/payload/starter/_basic/assets/fruids/havuc.png +0 -0
- package/payload/starter/_basic/assets/fruids/karpuz.png +0 -0
- package/payload/starter/_basic/assets/fruids/limon.png +0 -0
- package/payload/starter/_basic/assets/fruids/muz.png +0 -0
- package/payload/starter/_basic/assets/fruids/nar.png +0 -0
- package/payload/starter/_basic/assets/fruids/patlican.png +0 -0
- package/payload/starter/_basic/assets/fruids/yabanmersini.png +0 -0
- package/payload/starter/_basic/assets/fruids/yesilbiber.png +0 -0
- package/payload/starter/_basic/basic/LICENSE +1 -1
- package/payload/starter/_basic/basic/basic.css +3 -6
- package/payload/starter/_basic/basic/basic.js +154 -60
- package/payload/starter/_basic/basic/basic.min.js +19 -6
- package/payload/starter/_basic/basic/scroll-bar.js +4 -2
- package/payload/starter/_basic/basic/scroll-bar.min.js +1 -0
- package/payload/starter/_basic/comp/accordion.js +659 -0
- package/payload/starter/_basic/comp/action-button.js +22 -23
- package/payload/starter/_basic/comp/action-tab-bar.js +8 -8
- package/payload/starter/_basic/comp/app-bar.js +12 -11
- package/payload/starter/_basic/comp/{badge-v2.js → badge.js} +51 -5
- package/payload/starter/_basic/comp/bottom-bar.js +62 -26
- package/payload/starter/_basic/comp/breadcrumbs.js +4 -2
- package/payload/starter/_basic/comp/canvas.js +652 -0
- package/payload/starter/_basic/comp/chat-view.js +827 -0
- package/payload/starter/_basic/comp/check-box.js +137 -21
- package/payload/starter/_basic/comp/code-editor.js +1171 -0
- package/payload/starter/_basic/comp/{select-color.js → color-picker.js} +62 -29
- package/payload/starter/_basic/comp/context-menu.js +348 -31
- package/payload/starter/_basic/comp/{currency-input-b.js → currency-field.js} +48 -29
- package/payload/starter/_basic/comp/data-table.js +114 -42
- package/payload/starter/_basic/comp/{select-date.js → date-picker.js} +104 -52
- package/payload/starter/_basic/comp/dialog.js +214 -76
- package/payload/starter/_basic/comp/email-field.js +65 -0
- package/payload/starter/_basic/comp/{select-file.js → file-picker.js} +245 -57
- package/payload/starter/_basic/comp/filters.js +374 -60
- package/payload/starter/_basic/comp/form.js +38 -26
- package/payload/starter/_basic/comp/full-screen-select.js +36 -33
- package/payload/starter/_basic/comp/gauge.js +12 -8
- package/payload/starter/_basic/comp/graph-box.js +3911 -0
- package/payload/starter/_basic/comp/grid-group.js +185 -0
- package/payload/starter/_basic/comp/hold-to-confirm-button.js +16 -7
- package/payload/starter/_basic/comp/image-view.js +598 -0
- package/payload/starter/_basic/comp/item-list.js +507 -163
- package/payload/starter/_basic/comp/json-editor.js +3221 -0
- package/payload/starter/_basic/comp/json-view.js +597 -0
- package/payload/starter/_basic/comp/label-editor.js +22 -19
- package/payload/starter/_basic/comp/left-menu.js +89 -22
- package/payload/starter/_basic/comp/line-progress-bar.js +196 -45
- package/payload/starter/_basic/comp/loading-screen.js +49 -18
- package/payload/starter/_basic/comp/log-view.js +530 -0
- package/payload/starter/_basic/comp/{login-page-v2.js → login-page.js} +205 -106
- package/payload/starter/_basic/comp/markdown-view.js +1046 -0
- package/payload/starter/_basic/comp/menu-bar.js +624 -0
- package/payload/starter/_basic/comp/mini-graph-box.js +20 -11
- package/payload/starter/_basic/comp/minimal-accent.js +208 -0
- package/payload/starter/_basic/comp/notice.js +15 -13
- package/payload/starter/_basic/comp/{number-input-b.js → number-field.js} +26 -19
- package/payload/starter/_basic/comp/numeric-keyboard.js +15 -13
- package/payload/starter/_basic/comp/page-control.js +21 -4
- package/payload/starter/_basic/comp/page-header.js +7 -6
- package/payload/starter/_basic/comp/password-field.js +192 -0
- package/payload/starter/_basic/comp/period-bar.js +8 -7
- package/payload/starter/_basic/comp/{phone-input-b.js → phone-field.js} +80 -45
- package/payload/starter/_basic/comp/progress-bar.js +401 -85
- package/payload/starter/_basic/comp/property-panel.js +1022 -123
- package/payload/starter/_basic/comp/radio-button.js +79 -19
- package/payload/starter/_basic/comp/range-slider.js +569 -0
- package/payload/starter/_basic/comp/rich-text-editor.js +33 -30
- package/payload/starter/_basic/comp/scroll-area.js +308 -0
- package/payload/starter/_basic/comp/scrolling-text.js +10 -9
- package/payload/starter/_basic/comp/search-input.js +725 -0
- package/payload/starter/_basic/comp/search-results.js +60 -24
- package/payload/starter/_basic/comp/select-box.js +229 -107
- package/payload/starter/_basic/comp/settings-row.js +20 -19
- package/payload/starter/_basic/comp/side-panel.js +53 -10
- package/payload/starter/_basic/comp/slider-field.js +264 -88
- package/payload/starter/_basic/comp/slider.js +556 -86
- package/payload/starter/_basic/comp/smart-button.js +438 -353
- package/payload/starter/_basic/comp/smart-table.js +748 -186
- package/payload/starter/_basic/comp/sortable-list.js +47 -38
- package/payload/starter/_basic/comp/spark-line-box.js +25 -16
- package/payload/starter/_basic/comp/splitter.js +411 -0
- package/payload/starter/_basic/comp/status-bar.js +408 -0
- package/payload/starter/_basic/comp/step-bar.js +345 -0
- package/payload/starter/_basic/comp/stepper.js +103 -49
- package/payload/starter/_basic/comp/tabs.js +67 -18
- package/payload/starter/_basic/comp/tag-input.js +50 -10
- package/payload/starter/_basic/comp/tap-effect.js +6 -4
- package/payload/starter/_basic/comp/text-area-field.js +233 -0
- package/payload/starter/_basic/comp/text-field.js +1006 -0
- package/payload/starter/_basic/comp/time-line.js +102 -28
- package/payload/starter/_basic/comp/{select-time.js → time-picker.js} +104 -51
- package/payload/starter/_basic/comp/tiny-select.js +79 -39
- package/payload/starter/_basic/comp/tiny-table.js +12 -8
- package/payload/starter/_basic/comp/toast.js +87 -34
- package/payload/starter/_basic/comp/toggle.js +149 -28
- package/payload/starter/_basic/comp/tool-bar.js +760 -0
- package/payload/starter/_basic/comp/tooltip.js +80 -17
- package/payload/starter/_basic/comp/tree-view.js +124 -41
- package/payload/starter/_basic/comp/ui-effects.js +17 -11
- package/payload/starter/_basic/comp/ui-standards.js +5 -4
- package/payload/starter/_basic/comp/url-field.js +190 -0
- package/payload/starter/_basic/comp/web-view.js +70 -16
- package/payload/starter/_basic/docs/basic-js-animated-rules.md +15 -9
- package/payload/starter/_basic/docs/basic-js-code-rules.md +42 -5
- package/payload/starter/_basic/docs/basic-js-components.md +12 -17
- package/payload/starter/_basic/docs/basic-js-core.md +5 -4
- package/payload/starter/_basic/docs/component-index.md +248 -107
- package/payload/starter/_basic/docs/component-template.js +28 -24
- package/payload/starter/_basic/docs/handbook/00-introduction.md +6 -2
- package/payload/starter/_basic/docs/handbook/00-what-is-new.md +21 -0
- package/payload/starter/_basic/docs/handbook/01-label.md +4 -4
- package/payload/starter/_basic/docs/handbook/02-box.md +7 -7
- package/payload/starter/_basic/docs/handbook/03-image.md +4 -4
- package/payload/starter/_basic/docs/handbook/04-common-properties.md +6 -5
- package/payload/starter/_basic/docs/handbook/05-autolayout.md +8 -7
- package/payload/starter/_basic/docs/handbook/06-button.md +3 -3
- package/payload/starter/_basic/docs/handbook/07-input.md +3 -3
- package/payload/starter/_basic/docs/handbook/08-page.md +3 -3
- package/payload/starter/_basic/docs/handbook/09-useful-examples.md +39 -58
- package/payload/starter/_basic/docs/handbook/10-motion.md +6 -6
- package/payload/starter/_basic/docs/handbook/11-other-functions.md +1 -0
- package/payload/starter/_basic/docs/handbook/13-sound.md +3 -3
- package/payload/starter/_basic/docs/handbook/14-using-components.md +180 -0
- package/payload/starter/_basic/docs/handbook/15-making-a-component.md +338 -0
- package/payload/starter/_basic/docs/what-is-new.md +106 -0
- package/payload/starter/_basic/examples/accordion.htm +174 -0
- package/payload/starter/_basic/examples/action-button.htm +74 -32
- package/payload/starter/_basic/examples/action-tab-bar.htm +5 -6
- package/payload/starter/_basic/examples/app-bar.htm +63 -41
- package/payload/starter/_basic/examples/badge.htm +96 -0
- package/payload/starter/_basic/examples/bottom-bar-2.htm +61 -48
- package/payload/starter/_basic/examples/bottom-bar.htm +74 -16
- package/payload/starter/_basic/examples/breadcrumbs.htm +160 -150
- package/payload/starter/_basic/examples/canvas.htm +190 -0
- package/payload/starter/_basic/examples/chat-view.htm +143 -0
- package/payload/starter/_basic/examples/check-box-2.htm +71 -82
- package/payload/starter/_basic/examples/check-box-3.htm +72 -83
- package/payload/starter/_basic/examples/check-box.htm +207 -0
- package/payload/starter/_basic/examples/code-editor-2.htm +259 -0
- package/payload/starter/_basic/examples/code-editor.htm +272 -0
- package/payload/starter/_basic/examples/color-picker.htm +206 -0
- package/payload/starter/_basic/examples/context-menu.htm +180 -139
- package/payload/starter/_basic/examples/currency-field.htm +105 -0
- package/payload/starter/_basic/examples/data-table-2.htm +2 -1
- package/payload/starter/_basic/examples/data-table-3.htm +1 -1
- package/payload/starter/_basic/examples/data-table-4.htm +15 -12
- package/payload/starter/_basic/examples/data-table-5.htm +11 -3
- package/payload/starter/_basic/examples/data-table.htm +90 -40
- package/payload/starter/_basic/examples/date-picker.htm +239 -0
- package/payload/starter/_basic/examples/dialog-centered.htm +394 -40
- package/payload/starter/_basic/examples/dialog.htm +267 -46
- package/payload/starter/_basic/examples/email-field.htm +102 -0
- package/payload/starter/_basic/examples/file-picker.htm +296 -0
- package/payload/starter/_basic/examples/filters.htm +33 -22
- package/payload/starter/_basic/examples/{form-1.htm → form.htm} +18 -19
- package/payload/starter/_basic/examples/full-screen-select.htm +81 -58
- package/payload/starter/_basic/examples/gallery-styled.htm +896 -0
- package/payload/starter/_basic/examples/gauge.htm +95 -81
- package/payload/starter/_basic/examples/graph-box.htm +365 -0
- package/payload/starter/_basic/examples/grid-group.htm +179 -0
- package/payload/starter/_basic/examples/hold-to-confirm-button.htm +102 -113
- package/payload/starter/_basic/examples/image-view.htm +195 -0
- package/payload/starter/_basic/examples/item-list-2.htm +138 -94
- package/payload/starter/_basic/examples/item-list.htm +191 -86
- package/payload/starter/_basic/examples/json-editor.htm +206 -0
- package/payload/starter/_basic/examples/json-view.htm +153 -0
- package/payload/starter/_basic/examples/label-editor.htm +85 -89
- package/payload/starter/_basic/examples/left-menu-2.htm +93 -0
- package/payload/starter/_basic/examples/left-menu.htm +42 -37
- package/payload/starter/_basic/examples/line-progress-bar.htm +155 -114
- package/payload/starter/_basic/examples/loading-screen.htm +149 -125
- package/payload/starter/_basic/examples/log-view.htm +175 -0
- package/payload/starter/_basic/examples/{login-page-dark-v2.htm → login-page-dark.htm} +265 -267
- package/payload/starter/_basic/examples/{login-page-v2.htm → login-page.htm} +266 -267
- package/payload/starter/_basic/examples/markdown-view.htm +220 -0
- package/payload/starter/_basic/examples/menu-bar-2.htm +225 -0
- package/payload/starter/_basic/examples/menu-bar.htm +145 -0
- package/payload/starter/_basic/examples/mini-graph-box.htm +98 -109
- package/payload/starter/_basic/examples/minimal-accent.htm +196 -0
- package/payload/starter/_basic/examples/minimal-theme.htm +432 -0
- package/payload/starter/_basic/examples/notice.htm +13 -4
- package/payload/starter/_basic/examples/number-field.htm +103 -0
- package/payload/starter/_basic/examples/numeric-keyboard.htm +44 -42
- package/payload/starter/_basic/examples/page-control.htm +181 -130
- package/payload/starter/_basic/examples/page-header.htm +57 -30
- package/payload/starter/_basic/examples/password-field.htm +117 -0
- package/payload/starter/_basic/examples/period-bar.htm +43 -29
- package/payload/starter/_basic/examples/phone-field-select-country.htm +292 -0
- package/payload/starter/_basic/examples/phone-field.htm +104 -0
- package/payload/starter/_basic/examples/progress-bar-ozden.htm +229 -92
- package/payload/starter/_basic/examples/progress-bar.htm +222 -174
- package/payload/starter/_basic/examples/property-panel.htm +152 -52
- package/payload/starter/_basic/examples/radio-button-2.htm +101 -109
- package/payload/starter/_basic/examples/radio-button-3.htm +81 -71
- package/payload/starter/_basic/examples/radio-button.htm +289 -0
- package/payload/starter/_basic/examples/range-slider.htm +171 -0
- package/payload/starter/_basic/examples/rich-text-editor.htm +115 -110
- package/payload/starter/_basic/examples/scroll-area.htm +293 -0
- package/payload/starter/_basic/examples/scrolling-text.htm +27 -6
- package/payload/starter/_basic/examples/search-input-2-light.htm +112 -0
- package/payload/starter/_basic/examples/search-input-3-dark.htm +105 -0
- package/payload/starter/_basic/examples/{search-input-v2-place.htm → search-input-place.htm} +25 -26
- package/payload/starter/_basic/examples/search-input.htm +159 -0
- package/payload/starter/_basic/examples/search-results.htm +85 -88
- package/payload/starter/_basic/examples/select-box-2-item-view.htm +304 -0
- package/payload/starter/_basic/examples/select-box-ozden-dark-text.htm +70 -0
- package/payload/starter/_basic/examples/select-box-ozden-item.htm +6 -5
- package/payload/starter/_basic/examples/select-box-ozden-text.htm +5 -3
- package/payload/starter/_basic/examples/select-box.htm +190 -159
- package/payload/starter/_basic/examples/settings-row.htm +92 -43
- package/payload/starter/_basic/examples/side-panel-2.htm +63 -25
- package/payload/starter/_basic/examples/side-panel.htm +84 -70
- package/payload/starter/_basic/examples/slider-2-split.htm +186 -0
- package/payload/starter/_basic/examples/slider-field-ozden.htm +286 -0
- package/payload/starter/_basic/examples/slider-field.htm +174 -134
- package/payload/starter/_basic/examples/slider.htm +257 -180
- package/payload/starter/_basic/examples/smart-button-3-ozden.htm +170 -257
- package/payload/starter/_basic/examples/smart-button-4-dark.htm +86 -47
- package/payload/starter/_basic/examples/smart-button-5-features.htm +130 -125
- package/payload/starter/_basic/examples/smart-button-alternatif.htm +266 -0
- package/payload/starter/_basic/examples/smart-button.htm +207 -174
- package/payload/starter/_basic/examples/smart-table-2.htm +43 -56
- package/payload/starter/_basic/examples/smart-table-3.htm +148 -113
- package/payload/starter/_basic/examples/smart-table-4.htm +37 -50
- package/payload/starter/_basic/examples/{smart-table-1.htm → smart-table-5.htm} +37 -48
- package/payload/starter/_basic/examples/smart-table.htm +183 -0
- package/payload/starter/_basic/examples/sortable-list.htm +191 -142
- package/payload/starter/_basic/examples/spark-line-box.htm +149 -161
- package/payload/starter/_basic/examples/splitter.htm +164 -0
- package/payload/starter/_basic/examples/status-bar.htm +166 -0
- package/payload/starter/_basic/examples/step-bar.htm +129 -0
- package/payload/starter/_basic/examples/stepper-2.htm +86 -58
- package/payload/starter/_basic/examples/stepper.htm +146 -135
- package/payload/starter/_basic/examples/tabs-2.htm +58 -67
- package/payload/starter/_basic/examples/tabs.htm +197 -180
- package/payload/starter/_basic/examples/tag-input.htm +150 -153
- package/payload/starter/_basic/examples/tap-effect.htm +23 -19
- package/payload/starter/_basic/examples/text-area-field.htm +104 -0
- package/payload/starter/_basic/examples/text-field-2.htm +113 -0
- package/payload/starter/_basic/examples/text-field-3-style.htm +105 -0
- package/payload/starter/_basic/examples/text-field-4-custom-unit.htm +96 -0
- package/payload/starter/_basic/examples/{input-b-ex5-warning-icon.htm → text-field-5-warning-icon.htm} +19 -19
- package/payload/starter/_basic/examples/text-field-6-modern-dark.htm +114 -0
- package/payload/starter/_basic/examples/text-field-7-modern.htm +106 -0
- package/payload/starter/_basic/examples/text-field-8-light-dark.htm +159 -0
- package/payload/starter/_basic/examples/text-field.htm +163 -0
- package/payload/starter/_basic/examples/time-line.htm +180 -116
- package/payload/starter/_basic/examples/time-picker.htm +240 -0
- package/payload/starter/_basic/examples/tiny-select.htm +118 -86
- package/payload/starter/_basic/examples/tiny-table.htm +40 -34
- package/payload/starter/_basic/examples/toast.htm +145 -147
- package/payload/starter/_basic/examples/toggle-2.htm +99 -68
- package/payload/starter/_basic/examples/toggle-3.htm +104 -101
- package/payload/starter/_basic/examples/toggle.htm +161 -93
- package/payload/starter/_basic/examples/tool-bar.htm +172 -0
- package/payload/starter/_basic/examples/tooltip-2.htm +110 -60
- package/payload/starter/_basic/examples/tooltip-3.htm +124 -65
- package/payload/starter/_basic/examples/tooltip-4.htm +218 -0
- package/payload/starter/_basic/examples/tooltip.htm +206 -124
- package/payload/starter/_basic/examples/tree-view.htm +210 -182
- package/payload/starter/_basic/examples/ui-effects.htm +207 -185
- package/payload/starter/_basic/examples/ui-standards.htm +200 -139
- package/payload/starter/_basic/examples/url-field.htm +120 -0
- package/payload/starter/_basic/examples/web-view.htm +109 -110
- package/payload/starter/_basic/min/accordion.min.js +2 -0
- package/payload/starter/_basic/min/action-button.min.js +1 -1
- package/payload/starter/_basic/min/app-bar.min.js +1 -1
- package/payload/starter/_basic/min/badge.min.js +2 -0
- package/payload/starter/_basic/min/bottom-bar.min.js +1 -1
- package/payload/starter/_basic/min/canvas.min.js +2 -0
- package/payload/starter/_basic/min/chat-view.min.js +2 -0
- package/payload/starter/_basic/min/check-box.min.js +1 -1
- package/payload/starter/_basic/min/code-editor.min.js +2 -0
- package/payload/starter/_basic/min/color-picker.min.js +2 -0
- package/payload/starter/_basic/min/context-menu.min.js +1 -1
- package/payload/starter/_basic/min/currency-field.min.js +2 -0
- package/payload/starter/_basic/min/data-table.min.js +1 -1
- package/payload/starter/_basic/min/date-picker.min.js +2 -0
- package/payload/starter/_basic/min/dialog.min.js +1 -1
- package/payload/starter/_basic/min/email-field.min.js +2 -0
- package/payload/starter/_basic/min/file-picker.min.js +2 -0
- package/payload/starter/_basic/min/filters.min.js +1 -1
- package/payload/starter/_basic/min/form.min.js +1 -1
- package/payload/starter/_basic/min/full-screen-select.min.js +1 -1
- package/payload/starter/_basic/min/gauge.min.js +1 -1
- package/payload/starter/_basic/min/graph-box.min.js +2 -0
- package/payload/starter/_basic/min/grid-group.min.js +2 -0
- package/payload/starter/_basic/min/hold-to-confirm-button.min.js +1 -1
- package/payload/starter/_basic/min/image-view.min.js +2 -0
- package/payload/starter/_basic/min/item-list.min.js +1 -1
- package/payload/starter/_basic/min/json-editor.min.js +2 -0
- package/payload/starter/_basic/min/json-view.min.js +2 -0
- package/payload/starter/_basic/min/label-editor.min.js +1 -1
- package/payload/starter/_basic/min/left-menu.min.js +1 -1
- package/payload/starter/_basic/min/line-progress-bar.min.js +1 -1
- package/payload/starter/_basic/min/loading-screen.min.js +1 -1
- package/payload/starter/_basic/min/log-view.min.js +2 -0
- package/payload/starter/_basic/min/login-page.min.js +2 -0
- package/payload/starter/_basic/min/markdown-view.min.js +2 -0
- package/payload/starter/_basic/min/menu-bar.min.js +2 -0
- package/payload/starter/_basic/min/mini-graph-box.min.js +1 -1
- package/payload/starter/_basic/min/minimal-accent.min.js +2 -0
- package/payload/starter/_basic/min/notice.min.js +1 -1
- package/payload/starter/_basic/min/number-field.min.js +2 -0
- package/payload/starter/_basic/min/numeric-keyboard.min.js +1 -1
- package/payload/starter/_basic/min/page-control.min.js +1 -1
- package/payload/starter/_basic/min/password-field.min.js +2 -0
- package/payload/starter/_basic/min/phone-field.min.js +2 -0
- package/payload/starter/_basic/min/progress-bar.min.js +1 -1
- package/payload/starter/_basic/min/property-panel.min.js +1 -1
- package/payload/starter/_basic/min/radio-button.min.js +1 -1
- package/payload/starter/_basic/min/range-slider.min.js +2 -0
- package/payload/starter/_basic/min/rich-text-editor.min.js +1 -1
- package/payload/starter/_basic/min/scroll-area.min.js +2 -0
- package/payload/starter/_basic/min/scrolling-text.min.js +1 -1
- package/payload/starter/_basic/min/search-input.min.js +2 -0
- package/payload/starter/_basic/min/search-results.min.js +1 -1
- package/payload/starter/_basic/min/select-box.min.js +1 -1
- package/payload/starter/_basic/min/settings-row.min.js +1 -1
- package/payload/starter/_basic/min/side-panel.min.js +1 -1
- package/payload/starter/_basic/min/slider-field.min.js +1 -1
- package/payload/starter/_basic/min/slider.min.js +1 -1
- package/payload/starter/_basic/min/smart-button.min.js +1 -1
- package/payload/starter/_basic/min/smart-table.min.js +1 -1
- package/payload/starter/_basic/min/sortable-list.min.js +1 -1
- package/payload/starter/_basic/min/spark-line-box.min.js +1 -1
- package/payload/starter/_basic/min/splitter.min.js +2 -0
- package/payload/starter/_basic/min/status-bar.min.js +2 -0
- package/payload/starter/_basic/min/step-bar.min.js +2 -0
- package/payload/starter/_basic/min/stepper.min.js +1 -1
- package/payload/starter/_basic/min/tabs.min.js +1 -1
- package/payload/starter/_basic/min/tag-input.min.js +1 -1
- package/payload/starter/_basic/min/text-area-field.min.js +2 -0
- package/payload/starter/_basic/min/text-field.min.js +2 -0
- package/payload/starter/_basic/min/time-line.min.js +1 -1
- package/payload/starter/_basic/min/time-picker.min.js +2 -0
- package/payload/starter/_basic/min/tiny-select.min.js +1 -1
- package/payload/starter/_basic/min/toast.min.js +1 -1
- package/payload/starter/_basic/min/toggle.min.js +1 -1
- package/payload/starter/_basic/min/tool-bar.min.js +2 -0
- package/payload/starter/_basic/min/tooltip.min.js +1 -1
- package/payload/starter/_basic/min/tree-view.min.js +1 -1
- package/payload/starter/_basic/min/ui-effects.min.js +1 -1
- package/payload/starter/_basic/min/url-field.min.js +2 -0
- package/payload/starter/_basic/min/web-view.min.js +1 -1
- package/payload/templates/booking/app/app.js +11 -8
- package/payload/templates/booking/app/settings.js +4 -4
- package/payload/templates/booking/index.htm +3 -3
- package/payload/templates/booking/pages/account.js +6 -6
- package/payload/templates/booking/pages/book.js +1 -1
- package/payload/templates/booking/pages/services.js +5 -4
- package/payload/templates/classic/app/app.js +15 -11
- package/payload/templates/classic/app/settings.js +22 -20
- package/payload/templates/classic/assets/_attribute.txt +2 -0
- package/payload/templates/classic/assets/cards/dill.png +0 -0
- package/payload/templates/classic/assets/cards/fennel.png +0 -0
- package/payload/templates/classic/assets/cards/juniper.png +0 -0
- package/payload/templates/classic/assets/cards/olives.png +0 -0
- package/payload/templates/classic/assets/cards/oregano.png +0 -0
- package/payload/templates/classic/assets/cards/pepper.png +0 -0
- package/payload/templates/classic/assets/cards/rosehip.png +0 -0
- package/payload/templates/classic/assets/categories/cappuccino.png +0 -0
- package/payload/templates/classic/assets/categories/chocolate-milk.png +0 -0
- package/payload/templates/classic/assets/categories/coffee.png +0 -0
- package/payload/templates/classic/assets/categories/frappe.png +0 -0
- package/payload/templates/classic/assets/categories/iced-caffee.png +0 -0
- package/payload/templates/classic/assets/categories/milkshake.png +0 -0
- package/payload/templates/classic/assets/categories/orange-juice.png +0 -0
- package/payload/templates/classic/assets/categories/tea.png +0 -0
- package/payload/templates/classic/index.htm +2 -2
- package/payload/templates/classic/pages/example.js +10 -10
- package/payload/templates/classic/pages/examples.js +44 -43
- package/payload/templates/classic/pages/home.js +16 -15
- package/payload/templates/classic/pages/info-pages.js +5 -5
- package/payload/templates/classic/pages/search.js +8 -7
- package/payload/templates/classic/pages/settings.js +13 -13
- package/payload/templates/classic/pages/tasks.js +1 -0
- package/payload/templates/classic/pages/template-pages.js +12 -11
- package/payload/templates/coffee-shop/app/app.js +12 -8
- package/payload/templates/coffee-shop/app/settings.js +4 -4
- package/payload/templates/coffee-shop/index.htm +3 -3
- package/payload/templates/coffee-shop/pages/drink.js +1 -1
- package/payload/templates/coffee-shop/pages/menu.js +5 -4
- package/payload/templates/forms/TEMPLATE.md +1 -1
- package/payload/templates/forms/appointment-form.htm +55 -53
- package/payload/templates/forms/contact-form-to-mail.htm +38 -37
- package/payload/templates/forms/contact-form-to-supabase.htm +47 -46
- package/payload/templates/forms/dark-contact-form.htm +43 -40
- package/payload/templates/forms/event-registration-form.htm +80 -77
- package/payload/templates/forms/feedback-form.htm +54 -54
- package/payload/templates/forms/order-form.htm +88 -84
- package/payload/templates/forms/recruitment-form.htm +60 -60
- package/payload/templates/forms/service/readme.md +9 -8
- package/payload/templates/forms/service/send-form-mail.php +38 -21
- package/payload/templates/forms/support-ticket-form.htm +67 -65
- package/payload/templates/panel/common/module-page.js +2 -2
- package/payload/templates/panel/common/theme.js +37 -10
- package/payload/templates/panel/common/top-bar.js +45 -40
- package/payload/templates/panel/index.htm +59 -60
- package/payload/templates/panel/module10/greenhouse.htm +98 -113
- package/payload/templates/panel/module11/arduino-projects.htm +47 -58
- package/payload/templates/panel/module6/energy-hub.htm +71 -103
- package/payload/templates/panel/module7/3d-printers.htm +58 -81
- package/payload/templates/panel/module8/cold-rooms.htm +58 -79
- package/payload/templates/panel/module9/elevator-fleet.htm +72 -93
- package/payload/templates/panel/pages/activity.js +134 -152
- package/payload/templates/panel/pages/contents.js +291 -308
- package/payload/templates/panel/pages/customers.js +250 -267
- package/payload/templates/panel/pages/edit-user.js +31 -30
- package/payload/templates/panel/pages/home.js +39 -70
- package/payload/templates/panel/pages/media.js +166 -183
- package/payload/templates/panel/pages/notifications.js +7 -7
- package/payload/templates/panel/pages/orders.js +200 -217
- package/payload/templates/panel/pages/products.js +259 -278
- package/payload/templates/panel/pages/reports.js +74 -123
- package/payload/templates/panel/pages/roles.js +57 -60
- package/payload/templates/panel/pages/settings.js +127 -143
- package/payload/templates/panel/pages/user-actions.js +106 -110
- package/payload/templates/panel/pages/user-list.js +221 -238
- package/payload/templates/panel/pages/users.js +14 -29
- package/payload/templates/shop/TEMPLATE.md +1 -1
- package/payload/templates/shop/app/app.js +11 -8
- package/payload/templates/shop/app/settings.js +4 -4
- package/payload/templates/shop/index.htm +3 -3
- package/payload/templates/shop/pages/account.js +7 -7
- package/payload/templates/shop/pages/cart.js +1 -1
- package/payload/templates/shop/pages/checkout.js +2 -2
- package/payload/templates/shop/pages/product.js +2 -2
- package/payload/templates/shop/pages/shop.js +6 -5
- package/payload/templates/starter/TEMPLATE.md +1 -1
- package/payload/templates/starter/app/app.js +12 -8
- package/payload/templates/starter/app/settings.js +14 -11
- package/payload/templates/starter/index.htm +3 -3
- package/payload/templates/starter/pages/about.js +1 -1
- package/payload/templates/starter/pages/home.js +2 -2
- package/payload/templates/starter/pages/product.js +1 -1
- package/payload/templates/starter/pages/products.js +5 -5
- package/payload/templates/starter/pages/settings.js +1 -1
- package/payload/templates/starter/pages/tasks.js +8 -8
- package/payload/templates/starter/pages/website.js +1 -1
- package/payload/starter/_basic/comp/chart-box/chart-4.5.1.umd.min.js +0 -13
- package/payload/starter/_basic/comp/chart-box/chart-js-LICENSE.md +0 -9
- package/payload/starter/_basic/comp/chart-box.js +0 -868
- package/payload/starter/_basic/comp/email-input-b.js +0 -57
- package/payload/starter/_basic/comp/input-b.js +0 -759
- package/payload/starter/_basic/comp/password-input-b.js +0 -164
- package/payload/starter/_basic/comp/search-input-v2.js +0 -427
- package/payload/starter/_basic/comp/textarea-b.js +0 -184
- package/payload/starter/_basic/comp/url-input-b.js +0 -145
- package/payload/starter/_basic/examples/badgeV2.htm +0 -68
- package/payload/starter/_basic/examples/chart-box.htm +0 -287
- package/payload/starter/_basic/examples/check-box-1.htm +0 -220
- package/payload/starter/_basic/examples/currency-input-b.htm +0 -71
- package/payload/starter/_basic/examples/email-input-b.htm +0 -67
- package/payload/starter/_basic/examples/input-b-ex1.htm +0 -132
- package/payload/starter/_basic/examples/input-b-ex2.htm +0 -136
- package/payload/starter/_basic/examples/input-b-ex3-style.htm +0 -113
- package/payload/starter/_basic/examples/input-b-ex4-custom-unit.htm +0 -112
- package/payload/starter/_basic/examples/input-b-ex6-dark.htm +0 -108
- package/payload/starter/_basic/examples/input-b-ex7-ozden.htm +0 -153
- package/payload/starter/_basic/examples/number-input-b.htm +0 -68
- package/payload/starter/_basic/examples/password-input-b.htm +0 -70
- package/payload/starter/_basic/examples/phone-input-b-select-country.htm +0 -298
- package/payload/starter/_basic/examples/phone-input-b.htm +0 -72
- package/payload/starter/_basic/examples/radio-button-1.htm +0 -264
- package/payload/starter/_basic/examples/search-input-v2-ozden.htm +0 -128
- package/payload/starter/_basic/examples/search-input-v2.htm +0 -65
- package/payload/starter/_basic/examples/select-color.htm +0 -215
- package/payload/starter/_basic/examples/select-date.htm +0 -244
- package/payload/starter/_basic/examples/select-file.htm +0 -268
- package/payload/starter/_basic/examples/select-time.htm +0 -249
- package/payload/starter/_basic/examples/smart-button-2.htm +0 -220
- package/payload/starter/_basic/examples/textarea-b.htm +0 -76
- package/payload/starter/_basic/examples/unfinished-login-page-dark-supabase.htm +0 -221
- package/payload/starter/_basic/examples/unfinished-login-page-supabase.htm +0 -221
- package/payload/starter/_basic/examples/url-input-b.htm +0 -85
- package/payload/starter/_basic/min/badge-v2.min.js +0 -2
- package/payload/starter/_basic/min/chart-box.min.js +0 -2
- package/payload/starter/_basic/min/currency-input-b.min.js +0 -2
- package/payload/starter/_basic/min/email-input-b.min.js +0 -2
- package/payload/starter/_basic/min/input-b.min.js +0 -2
- package/payload/starter/_basic/min/login-page-v2.min.js +0 -2
- package/payload/starter/_basic/min/number-input-b.min.js +0 -2
- package/payload/starter/_basic/min/password-input-b.min.js +0 -2
- package/payload/starter/_basic/min/phone-input-b.min.js +0 -2
- package/payload/starter/_basic/min/search-input-v2.min.js +0 -2
- package/payload/starter/_basic/min/select-color.min.js +0 -2
- package/payload/starter/_basic/min/select-date.min.js +0 -2
- package/payload/starter/_basic/min/select-file.min.js +0 -2
- package/payload/starter/_basic/min/select-time.min.js +0 -2
- package/payload/starter/_basic/min/textarea-b.min.js +0 -2
- package/payload/starter/_basic/min/url-input-b.min.js +0 -2
- package/payload/templates/panel/common/bridge.min.js +0 -0
- package/payload/templates/panel/common/full-view.min.js +0 -1
- package/payload/templates/panel/common/main-view.min.js +0 -1
- package/payload/templates/panel/common/module-page.min.js +0 -1
- package/payload/templates/panel/common/right-view.min.js +0 -1
- package/payload/templates/panel/common/start-page.min.js +0 -1
- package/payload/templates/panel/common/top-bar-v25-07-29-1.js +0 -330
- package/payload/templates/panel/common/top-bar-v25-07-29-2.js +0 -265
- package/payload/templates/panel/common/top-bar.min.js +0 -1
- package/payload/templates/panel/common/ui-standards.min.js +0 -1
- package/payload/templates/panel/managers/database.min.js +0 -1
- package/payload/templates/panel/managers/login.min.js +0 -1
- package/payload/templates/panel/pages/_page-template.min.js +0 -1
- package/payload/templates/panel/pages/contents.min.js +0 -1
- package/payload/templates/panel/pages/edit-user.min.js +0 -1
- package/payload/templates/panel/pages/edit-users-table.min.js +0 -1
- package/payload/templates/panel/pages/home.min.js +0 -1
- package/payload/templates/panel/pages/notifications.min.js +0 -1
- package/payload/templates/panel/pages/reports.min.js +0 -1
- package/payload/templates/panel/pages/settings.min.js +0 -1
- package/payload/templates/panel/pages/user-actions.min.js +0 -2
- package/payload/templates/panel/pages/users.min.js +0 -1
- /package/payload/starter/_basic/comp/{password-input-b → password-field}/hide-btn.png +0 -0
- /package/payload/starter/_basic/comp/{password-input-b → password-field}/hide-btn2.png +0 -0
- /package/payload/starter/_basic/comp/{password-input-b → password-field}/show-btn.png +0 -0
- /package/payload/starter/_basic/comp/{password-input-b → password-field}/show-btn2.png +0 -0
- /package/payload/starter/_basic/comp/{search-input-v2 → search-input}/clear-round.svg +0 -0
- /package/payload/starter/_basic/comp/{search-input-v2 → search-input}/clear.svg +0 -0
- /package/payload/starter/_basic/comp/{search-input-v2 → search-input}/filter.png +0 -0
- /package/payload/starter/_basic/comp/{search-input-v2 → search-input}/filter.svg +0 -0
- /package/payload/starter/_basic/comp/{search-input-v2 → search-input}/search.svg +0 -0
|
@@ -8,13 +8,18 @@ UI COMPONENT TEMPLATE
|
|
|
8
8
|
- A dropdown select: a field that opens a list (popup) under or above it.
|
|
9
9
|
- Single or multiple selection (multiple: 1). "Select all" and "Clear" for multiple.
|
|
10
10
|
- Search in the list (searchable: "auto" -> when there are more than 8 options). Matches are highlighted.
|
|
11
|
-
- The search box is a SearchInput (comp/search-input
|
|
11
|
+
- The search box is a SearchInput (comp/search-input.js, with its clear button) when that file is loaded
|
|
12
12
|
before this one (useSearchInput: 1). Its look: style.searchInput (the params of SearchInput). Without it the
|
|
13
13
|
search box is an own input (its look: style.search).
|
|
14
14
|
- The list at the full height of the page (fullHeightList: 1): as wide as the field, at its left, from the top
|
|
15
|
-
of the page to its bottom, and it stays that high when a search leaves a few rows
|
|
16
|
-
|
|
15
|
+
of the page to its bottom, and it stays that high when a search leaves a few rows.
|
|
16
|
+
A resize of the page places it again (the normal list closes).
|
|
17
17
|
- Options can have a description, an icon, a group title and can be disabled.
|
|
18
|
+
- style.optionSelected.canSelectAgain: 0 (ozden, ozdenDark): the selected row (single) can not be chosen again:
|
|
19
|
+
no look under the mouse or the keys, the keys skip it, a click on it does nothing.
|
|
20
|
+
- An edge around the rows (style.option.border, borderColor; optionActive.borderColor, optionSelected.borderColor) and
|
|
21
|
+
space between them (style.option.space): the minimal packages frame the row under the mouse and the selected one.
|
|
22
|
+
optionSelected.tickSize: the tick of the selected row (16).
|
|
18
23
|
- Clear button in the field (clearable: 1).
|
|
19
24
|
- Keyboard: Enter / Space / ArrowDown opens. ArrowUp / ArrowDown / Home / End move, Enter selects,
|
|
20
25
|
Escape closes, Tab closes. Typing on the closed field opens the search with the typed letter.
|
|
@@ -23,15 +28,17 @@ UI COMPONENT TEMPLATE
|
|
|
23
28
|
- Big lists: Only the first "maxRenderCount" matches are drawn. (Search shows the others.)
|
|
24
29
|
- The list scrolls with basic/scroll-bar.js (useScrollBar: 1, style.scrollBar) when it is loaded before.
|
|
25
30
|
- Your own rows: createItemView(option, row, self) draws an option with your objects. The list is then a
|
|
26
|
-
|
|
31
|
+
ItemList (load comp/item-list.js before this file; without it: a warning and the normal rows).
|
|
27
32
|
The search box, the keyboard, single / multiple, disabled options and onChange work the same.
|
|
28
33
|
(Not in this mode: the group titles, the highlight of the search and maxRenderCount.) The list: box.itemList.
|
|
29
34
|
The search finds the label, the description, the group and option.searchText (Turkish letters without marks).
|
|
30
35
|
- Your own field: createValueView(option, field, self) draws the selected option in the field with your
|
|
31
36
|
objects (single selection; the placeholder and the multiple text stay as they are).
|
|
32
|
-
- Style packages: "
|
|
33
|
-
|
|
34
|
-
|
|
37
|
+
- Style packages: "light" (default; the old name "classic" works too), "dark", "ozden" (a package of params: 350 x 50, a search box, the list goes down to the bottom of the page),
|
|
38
|
+
"ozdenDark" (the same on a dark page). Select with styleName. (SelectBox.styles)
|
|
39
|
+
NEW PROJECTS: use "light" (the default) on a light page and "dark" on a dark page, the
|
|
40
|
+
looks of _basic/examples/select-box.htm, unless the user asks for another look ("ozden" / "ozdenDark" only when
|
|
41
|
+
asked).
|
|
35
42
|
- scale: multiplies every size (the style, width / height / panelMinWidth / panelMaxHeight, the spaces in the
|
|
36
43
|
code, the search box, the rows, the checks). Its default is basic.uiScale: on a page fitted with page.fit()
|
|
37
44
|
(basic.uiScale = 1 / page.zoom) the field and its list keep their size on the screen. The objects of
|
|
@@ -69,10 +76,12 @@ const country = SelectBox({
|
|
|
69
76
|
});
|
|
70
77
|
|
|
71
78
|
Started Date: September 2026
|
|
72
|
-
Developer: Bugra Ozden
|
|
73
|
-
Email: bugra.ozden@gmail.com
|
|
74
79
|
Webpage: https://bug7a.github.io/js-components/
|
|
75
80
|
|
|
81
|
+
Copyright 2020-2026 Bugra Ozden <bugra.ozden@gmail.com> (https://bug7a.github.io/)
|
|
82
|
+
Licensed under the Apache License, Version 2.0
|
|
83
|
+
SPDX-License-Identifier: Apache-2.0
|
|
84
|
+
|
|
76
85
|
*/
|
|
77
86
|
|
|
78
87
|
"use strict";
|
|
@@ -102,7 +111,7 @@ const SelectBoxDefaults = {
|
|
|
102
111
|
maxRenderCount: 300,
|
|
103
112
|
enabled: 1,
|
|
104
113
|
useScrollBar: 1, // basic/scroll-bar.js on the list (load it first). 0: the scrollbar of the browser (hidden by basic.css in Chrome).
|
|
105
|
-
useSearchInput: 1, // 1: the search box is a SearchInput when comp/search-input
|
|
114
|
+
useSearchInput: 1, // 1: the search box is a SearchInput when comp/search-input.js is loaded first (style.searchInput). 0: the own input (style.search)
|
|
106
115
|
fullHeightList: 0, // 1: the list opens from the top of the page to its bottom, as wide as the field, at its left. (box.setFullHeightList())
|
|
107
116
|
scale: null, // Multiplies every size. null: basic.uiScale (1, or 1 / page.zoom on a fitted page). (Only at create time)
|
|
108
117
|
ariaLabel: "",
|
|
@@ -111,8 +120,8 @@ const SelectBoxDefaults = {
|
|
|
111
120
|
onChange: function (self) { }, // self.value, self.getSelectedOptions()
|
|
112
121
|
onOpen: function (self) { },
|
|
113
122
|
onClose: function (self) { },
|
|
114
|
-
styleName: "
|
|
115
|
-
style: { //
|
|
123
|
+
styleName: "light", // "light" ("classic": its old name), "dark", "ozden", "ozdenDark", "minimal", "minimalDark" or a name added to SelectBox.styles
|
|
124
|
+
style: { // Light style package (default)
|
|
116
125
|
field: {
|
|
117
126
|
color: White(1),
|
|
118
127
|
border: 1,
|
|
@@ -163,9 +172,9 @@ const SelectBoxDefaults = {
|
|
|
163
172
|
startScale: 0.9,
|
|
164
173
|
},
|
|
165
174
|
// The search box when it is a SearchInput: its params (a styleName of SearchInput.styles and its look params).
|
|
166
|
-
//
|
|
175
|
+
// Its icons are the ones of SearchInput (searchIconFile, clearIconFile: your own pictures).
|
|
167
176
|
searchInput: {
|
|
168
|
-
styleName: "
|
|
177
|
+
styleName: "original", // the first look of SearchInput
|
|
169
178
|
height: 38,
|
|
170
179
|
searchIconLeft: 10, // WHY: the icon and the text at the place of the own search input (icon 18, text 42)
|
|
171
180
|
color: Black(0.04),
|
|
@@ -176,8 +185,6 @@ const SelectBoxDefaults = {
|
|
|
176
185
|
fontSize: 14,
|
|
177
186
|
textColor: Black(0.85),
|
|
178
187
|
placeholderColor: "",
|
|
179
|
-
searchIconFile: "search.svg",
|
|
180
|
-
clearIconFile: "clear.svg",
|
|
181
188
|
searchIconSize: 16,
|
|
182
189
|
searchIconGap: 8, // Between the icon and the text (the default of SearchInput: here, so that scale changes it)
|
|
183
190
|
searchIconOpacity: 0.55,
|
|
@@ -207,9 +214,14 @@ const SelectBoxDefaults = {
|
|
|
207
214
|
iconSize: 22,
|
|
208
215
|
iconRound: 0,
|
|
209
216
|
iconMargin: [0, 0], // [left, top and bottom]
|
|
217
|
+
border: 0, // px: an edge around every row (its color: borderColor, optionActive / optionSelected.borderColor)
|
|
218
|
+
borderColor: "transparent",
|
|
219
|
+
space: 0, // px between two rows (Ex: 2: the edges of two rows do not meet)
|
|
210
220
|
},
|
|
211
221
|
optionActive: {
|
|
212
222
|
color: Black(0.06),
|
|
223
|
+
lineColor: "", // A line above and under the active row (1 px, inside it: no row moves). "": none
|
|
224
|
+
borderColor: "", // The edge of the active row (option.border). "": the edge of the row
|
|
213
225
|
showAtOpen: 1, // 0: no row is marked when the list opens (only under the mouse / the keyboard)
|
|
214
226
|
},
|
|
215
227
|
optionSelected: {
|
|
@@ -218,7 +230,10 @@ const SelectBoxDefaults = {
|
|
|
218
230
|
checkTickColor: White(1),
|
|
219
231
|
fontFamily: "opensans-bold", // Single selection. "": the font does not change
|
|
220
232
|
showTick: 1, // Single selection: a tick on the right
|
|
233
|
+
tickSize: 16, // px of the tick
|
|
234
|
+
borderColor: "", // The edge of the selected row (option.border). "": the edge of the row
|
|
221
235
|
opacity: 1,
|
|
236
|
+
canSelectAgain: 1, // 0 (single): the selected row can not be chosen again: no look under the mouse or the keys, the keys skip it, a click on it does nothing
|
|
222
237
|
},
|
|
223
238
|
optionDisabled: {
|
|
224
239
|
opacity: 0.4,
|
|
@@ -249,13 +264,15 @@ const SelectBoxDefaults = {
|
|
|
249
264
|
disabled: {
|
|
250
265
|
opacity: 0.4,
|
|
251
266
|
},
|
|
252
|
-
// The
|
|
267
|
+
// The package of the ItemList of createItemView (ItemList.styles)
|
|
268
|
+
itemListStyleName: "ozden",
|
|
269
|
+
// The style of the ItemList of createItemView (the keys of ItemList.styles.ozden: row, hover, selected,
|
|
253
270
|
// disabled, check...). Its empty text takes style.empty. The check mark is shown only for multiple.
|
|
254
271
|
itemList: {
|
|
255
272
|
box: { color: "transparent", border: 0, round: 0, padding: 0 },
|
|
256
273
|
list: { gap: 0 },
|
|
257
274
|
row: { height: "auto", padding: [8, 8], gap: 10, color: "transparent", round: 6, motion: "" },
|
|
258
|
-
hover: { color: Black(0.06) },
|
|
275
|
+
hover: { color: Black(0.06), lineColor: "" }, // WHY: "": no lines above and under the row (ItemList ozden has them).
|
|
259
276
|
selected: { color: Black(0.04), opacity: 1 },
|
|
260
277
|
disabled: { opacity: 0.4 },
|
|
261
278
|
focus: { ringColor: "transparent" }, // WHY: The keyboard stays in the field / search box (the active row is painted).
|
|
@@ -278,8 +295,9 @@ const SelectBoxDefaults = {
|
|
|
278
295
|
|
|
279
296
|
const SelectBox = function (params = {}) {
|
|
280
297
|
|
|
281
|
-
// Merge style package: params.style > SelectBox.styles[styleName] > SelectBoxDefaults.style (
|
|
298
|
+
// Merge style package: params.style > SelectBox.styles[styleName] > SelectBoxDefaults.style (light)
|
|
282
299
|
basic.applyStylePackage(params, SelectBox.styles, SelectBoxDefaults);
|
|
300
|
+
SelectBox.fillSearchInputPackage(params.style);
|
|
283
301
|
|
|
284
302
|
// Merge params:
|
|
285
303
|
mergeIntoIfMissing(params, SelectBoxDefaults);
|
|
@@ -310,7 +328,7 @@ const SelectBox = function (params = {}) {
|
|
|
310
328
|
const SCREEN_MARGIN = 8 * scale; // px: the panel stays this far from the edges of the page
|
|
311
329
|
const MIN_LIST_HEIGHT = 80 * scale; // px: the list is not made shorter than this when the space is small
|
|
312
330
|
const CHECK_SIZE = 18 * scale; // The check box of a row (multiple)
|
|
313
|
-
const TICK_SIZE =
|
|
331
|
+
const TICK_SIZE = _s.optionSelected.tickSize; // The tick of the selected row (single; the style is scaled already)
|
|
314
332
|
const CLEAR_BUTTON_SIZE = 20 * scale; // The clear button of the field
|
|
315
333
|
const CLEAR_ICON_SIZE = 14 * scale;
|
|
316
334
|
const BUTTON_ROUND = 4 * scale; // The clear button and the footer buttons
|
|
@@ -330,7 +348,7 @@ const SelectBox = function (params = {}) {
|
|
|
330
348
|
// createItemView: the list is an ItemList (box.itemList), made at the first open.
|
|
331
349
|
const usesItemList = (typeof box.createItemView === "function") && SelectBox.canUseItemList();
|
|
332
350
|
let fieldViewOption = null; // The option that createValueView has drawn in the field
|
|
333
|
-
// The search box is a SearchInput (box.searchGroup) when comp/search-input
|
|
351
|
+
// The search box is a SearchInput (box.searchGroup) when comp/search-input.js is loaded. box.searchInput: its input.
|
|
334
352
|
const usesSearchInput = (box.useSearchInput == 1) && SelectBox.canUseSearchInput();
|
|
335
353
|
|
|
336
354
|
// *** PUBLIC VARIABLES:
|
|
@@ -359,6 +377,16 @@ const SelectBox = function (params = {}) {
|
|
|
359
377
|
return sameValue(box.value, option.value);
|
|
360
378
|
};
|
|
361
379
|
|
|
380
|
+
// single, style.optionSelected.canSelectAgain: 0 (ozden): the selected row can not be chosen again.
|
|
381
|
+
const isLockedOption = function (option) {
|
|
382
|
+
return _s.optionSelected.canSelectAgain == 0 && !isMultiple() && isSelected(option);
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
// A row the mouse and the keys can make active (and choose): not disabled, not the locked selected one.
|
|
386
|
+
const isActivatable = function (option) {
|
|
387
|
+
return !option.disabled && !isLockedOption(option);
|
|
388
|
+
};
|
|
389
|
+
|
|
362
390
|
const findOption = function (value) {
|
|
363
391
|
return box.options.find(function (option) { return sameValue(option.value, value); });
|
|
364
392
|
};
|
|
@@ -406,10 +434,10 @@ const SelectBox = function (params = {}) {
|
|
|
406
434
|
};
|
|
407
435
|
|
|
408
436
|
// Creates the objects of a container again, in one group (container.wrapper).
|
|
409
|
-
const renderInto = function (container, buildContent) {
|
|
437
|
+
const renderInto = function (container, buildContent, gap = 0) {
|
|
410
438
|
if (container.wrapper) container.wrapper.remove();
|
|
411
439
|
createIn(container, function () {
|
|
412
|
-
container.wrapper = VGroup({ width: "100%", height: "auto", align: "left top", gap:
|
|
440
|
+
container.wrapper = VGroup({ width: "100%", height: "auto", align: "left top", gap: gap, position: "relative" });
|
|
413
441
|
container.wrapper.css.alignItems = "stretch";
|
|
414
442
|
buildContent();
|
|
415
443
|
endGroup();
|
|
@@ -554,7 +582,7 @@ const SelectBox = function (params = {}) {
|
|
|
554
582
|
Label({ text: moreText, width: "100%", textAlign: "center", padding: MORE_MESSAGE_PADDING, ..._s.empty });
|
|
555
583
|
}
|
|
556
584
|
|
|
557
|
-
});
|
|
585
|
+
}, _s.option.space);
|
|
558
586
|
|
|
559
587
|
setActive(getStartActiveIndex(), 0);
|
|
560
588
|
|
|
@@ -575,10 +603,10 @@ const SelectBox = function (params = {}) {
|
|
|
575
603
|
const toListItem = function (option, index) {
|
|
576
604
|
return {
|
|
577
605
|
key: String(index),
|
|
578
|
-
|
|
579
|
-
|
|
606
|
+
text: option.label,
|
|
607
|
+
description: option.description,
|
|
580
608
|
searchText: [option.group, option.searchText || ""].join(" "),
|
|
581
|
-
|
|
609
|
+
enabled: basic.isOn(option.disabled) ? 0 : 1,
|
|
582
610
|
option: option,
|
|
583
611
|
};
|
|
584
612
|
};
|
|
@@ -589,7 +617,10 @@ const SelectBox = function (params = {}) {
|
|
|
589
617
|
|
|
590
618
|
const getItemListStyle = function () {
|
|
591
619
|
const check = Object.assign({}, _s.itemList.check, { visible: isMultiple() ? 1 : 0 });
|
|
592
|
-
|
|
620
|
+
// WHY: The rows of the ItemList follow optionSelected.canSelectAgain: one setting for both kinds of rows (the
|
|
621
|
+
// ozden package of ItemList has 0, so a classic SelectBox must give its 1).
|
|
622
|
+
const selected = Object.assign({}, _s.itemList.selected, { canSelectAgain: _s.optionSelected.canSelectAgain });
|
|
623
|
+
return Object.assign({}, _s.itemList, { empty: _s.itemList.empty || _s.empty, check: check, selected: selected });
|
|
593
624
|
};
|
|
594
625
|
|
|
595
626
|
const createListItemView = function (item, row) {
|
|
@@ -613,6 +644,7 @@ const SelectBox = function (params = {}) {
|
|
|
613
644
|
ariaLabel: box.ariaLabel || "List",
|
|
614
645
|
onItemClick: onListItemClick,
|
|
615
646
|
onChange: onListChange,
|
|
647
|
+
styleName: _s.itemListStyleName,
|
|
616
648
|
style: getItemListStyle(),
|
|
617
649
|
scale: 1, // WHY: style.itemList is scaled already (with the style of SelectBox).
|
|
618
650
|
});
|
|
@@ -631,21 +663,24 @@ const SelectBox = function (params = {}) {
|
|
|
631
663
|
|
|
632
664
|
const prepareListRow = function (item, row, index) {
|
|
633
665
|
row.elem.id = id + "-option-" + index;
|
|
634
|
-
if (item.option.disabled) row.cursor = "default";
|
|
635
666
|
row.on("mousemove", function () {
|
|
636
667
|
const rowIndex = rows.findIndex(function (shown) { return shown.row === row; });
|
|
637
|
-
|
|
638
|
-
});
|
|
639
|
-
// WHY: The ItemList paints the row again when the mouse leaves it; the keyboard row keeps its color.
|
|
640
|
-
row.onHoverChange(function () {
|
|
641
|
-
if (rows[activeIndex] && rows[activeIndex].row === row) row.color = getActiveColor();
|
|
668
|
+
onRowMouseMove(rowIndex, item.option);
|
|
642
669
|
});
|
|
643
670
|
};
|
|
644
671
|
|
|
672
|
+
// The mouse on a row makes it active. WHY: On the locked selected row no row is active (the last one is not
|
|
673
|
+
// left white): the row under the mouse can not be chosen.
|
|
674
|
+
const onRowMouseMove = function (index, option) {
|
|
675
|
+
if (index < 0 || index == activeIndex || option.disabled) return;
|
|
676
|
+
setActive(isLockedOption(option) ? -1 : index, 0);
|
|
677
|
+
};
|
|
678
|
+
|
|
679
|
+
|
|
645
680
|
// The search, the selection and the active row of the ItemList (its rows are made only once).
|
|
646
681
|
const renderItemList = function () {
|
|
647
682
|
if (!box.itemList) createItemList();
|
|
648
|
-
syncListSelection();
|
|
683
|
+
syncListSelection(); // WHY: Also the cursors: the ItemList gives a hand only to a row that can be chosen.
|
|
649
684
|
box.itemList.search(searchText);
|
|
650
685
|
rows = [];
|
|
651
686
|
box.itemList.forEach(function (item, row) {
|
|
@@ -663,8 +698,9 @@ const SelectBox = function (params = {}) {
|
|
|
663
698
|
};
|
|
664
699
|
|
|
665
700
|
// A click on a row: the ItemList changes its selection (onListChange). The selected row clicked again
|
|
666
|
-
// (single) is not a change, but the list closes like the normal rows.
|
|
701
|
+
// (single) is not a change, but the list closes like the normal rows (not the locked one: nothing happens).
|
|
667
702
|
const onListItemClick = function (list, item) {
|
|
703
|
+
if (isLockedOption(item.option)) return;
|
|
668
704
|
if (!isMultiple() && isSelected(item.option)) afterSelect(JSON.stringify(box.value));
|
|
669
705
|
};
|
|
670
706
|
|
|
@@ -695,17 +731,20 @@ const SelectBox = function (params = {}) {
|
|
|
695
731
|
return getFilteredOptions();
|
|
696
732
|
};
|
|
697
733
|
|
|
698
|
-
|
|
699
|
-
|
|
734
|
+
// The edge of an own row (option.border): selected, active, or its own
|
|
735
|
+
const getOptionBorderColor = function (row, isActive) {
|
|
736
|
+
if (row.isSelectedOption && _s.optionSelected.borderColor) return _s.optionSelected.borderColor;
|
|
737
|
+
if (isActive && _s.optionActive.borderColor) return _s.optionActive.borderColor;
|
|
738
|
+
return _s.option.borderColor;
|
|
700
739
|
};
|
|
701
740
|
|
|
702
|
-
// The look of
|
|
703
|
-
const
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
row.
|
|
741
|
+
// The look of an own row (not of an ItemList), active (under the mouse or the arrow keys) or not: style.optionActive.
|
|
742
|
+
const paintOptionRow = function (row, isActive) {
|
|
743
|
+
row.color = isActive ? _s.optionActive.color : "transparent";
|
|
744
|
+
if (_s.option.border) row.borderColor = getOptionBorderColor(row, isActive);
|
|
745
|
+
const lineColor = _s.optionActive.lineColor;
|
|
746
|
+
// WHY: Only with lines: a package without them never touches the shadow of a row.
|
|
747
|
+
if (lineColor) row.boxShadow = isActive ? "inset 0 1px 0 " + lineColor + ", inset 0 -1px 0 " + lineColor : "";
|
|
709
748
|
};
|
|
710
749
|
|
|
711
750
|
// Scrolls the list to show a row.
|
|
@@ -723,12 +762,12 @@ const SelectBox = function (params = {}) {
|
|
|
723
762
|
else if (bottom > area.scrollTop + area.clientHeight) area.scrollTop = bottom - area.clientHeight;
|
|
724
763
|
};
|
|
725
764
|
|
|
726
|
-
// Active row after the list is drawn: the first selected one, or the first
|
|
765
|
+
// Active row after the list is drawn: the first selected one, or the first one that can be chosen
|
|
727
766
|
const getStartActiveIndex = function () {
|
|
728
767
|
if (_s.optionActive.showAtOpen == 0) return -1;
|
|
729
|
-
const selectedIndex = rows.findIndex(function (item) { return isSelected(item.option) &&
|
|
768
|
+
const selectedIndex = rows.findIndex(function (item) { return isSelected(item.option) && isActivatable(item.option); });
|
|
730
769
|
if (selectedIndex >= 0) return selectedIndex;
|
|
731
|
-
return rows.findIndex(function (item) { return
|
|
770
|
+
return rows.findIndex(function (item) { return isActivatable(item.option); });
|
|
732
771
|
};
|
|
733
772
|
|
|
734
773
|
const createDescription = function (html) {
|
|
@@ -752,11 +791,13 @@ const SelectBox = function (params = {}) {
|
|
|
752
791
|
clickable: 1,
|
|
753
792
|
});
|
|
754
793
|
if (_s.option.minHeight) row.css.minHeight = _s.option.minHeight + "px";
|
|
794
|
+
row.isSelectedOption = selected;
|
|
795
|
+
if (_s.option.border) row.props({ border: _s.option.border, borderColor: getOptionBorderColor(row, 0) });
|
|
755
796
|
if (selected && _s.optionSelected.opacity != 1) row.opacity = _s.optionSelected.opacity;
|
|
756
797
|
row.elem.id = id + "-option-" + index;
|
|
757
798
|
row.role = "option";
|
|
758
799
|
row.aria = { selected: (selected) ? "true" : "false" };
|
|
759
|
-
row.cursor = (option
|
|
800
|
+
row.cursor = isActivatable(option) ? "pointer" : "default";
|
|
760
801
|
if (option.disabled) {
|
|
761
802
|
row.aria = { disabled: "true" };
|
|
762
803
|
row.opacity = _s.optionDisabled.opacity;
|
|
@@ -798,11 +839,11 @@ const SelectBox = function (params = {}) {
|
|
|
798
839
|
endGroup();
|
|
799
840
|
|
|
800
841
|
row.on("mousemove", function () {
|
|
801
|
-
|
|
842
|
+
onRowMouseMove(index, option);
|
|
802
843
|
});
|
|
803
844
|
|
|
804
845
|
row.on("click", function () {
|
|
805
|
-
if (
|
|
846
|
+
if (isActivatable(option)) selectOption(option);
|
|
806
847
|
});
|
|
807
848
|
|
|
808
849
|
return row;
|
|
@@ -812,31 +853,33 @@ const SelectBox = function (params = {}) {
|
|
|
812
853
|
// scroll: 1 -> Move the list to show the active row.
|
|
813
854
|
const setActive = function (index, scroll = 1) {
|
|
814
855
|
|
|
815
|
-
if (rows[activeIndex])
|
|
856
|
+
if (rows[activeIndex] && !usesItemList) paintOptionRow(rows[activeIndex].row, 0);
|
|
816
857
|
activeIndex = index;
|
|
817
858
|
|
|
818
859
|
const item = rows[activeIndex];
|
|
860
|
+
// WHY: The ItemList paints its own rows: it knows their look (selected, under the mouse).
|
|
861
|
+
if (usesItemList && box.itemList) box.itemList.setActiveKey(item ? getListKey(item.option) : null);
|
|
819
862
|
if (!item) {
|
|
820
863
|
box.panel.aria = { activedescendant: null };
|
|
821
864
|
box.aria = { activedescendant: null };
|
|
822
865
|
return;
|
|
823
866
|
}
|
|
824
867
|
|
|
825
|
-
item.row
|
|
868
|
+
if (!usesItemList) paintOptionRow(item.row, 1);
|
|
826
869
|
box.aria = { activedescendant: item.row.elem.id };
|
|
827
870
|
if (box.searchInput) box.searchInput.inputElement.setAttribute("aria-activedescendant", item.row.elem.id);
|
|
828
871
|
if (scroll) scrollToRow(item.row);
|
|
829
872
|
|
|
830
873
|
};
|
|
831
874
|
|
|
832
|
-
// step: +1 or -1. Skips disabled
|
|
875
|
+
// step: +1 or -1. Skips the rows that can not be chosen (disabled, the locked selected one).
|
|
833
876
|
const moveActive = function (step) {
|
|
834
877
|
if (rows.length == 0) return;
|
|
835
878
|
// WHY: With no active row (-1), ArrowUp starts from the end: (-1 - 1) % length was the row before the last one.
|
|
836
879
|
let index = (activeIndex < 0 && step < 0) ? rows.length : activeIndex;
|
|
837
880
|
for (let i = 0; i < rows.length; i++) {
|
|
838
881
|
index = (index + step + rows.length) % rows.length;
|
|
839
|
-
if (
|
|
882
|
+
if (isActivatable(rows[index].option)) return setActive(index);
|
|
840
883
|
}
|
|
841
884
|
};
|
|
842
885
|
|
|
@@ -886,7 +929,9 @@ const SelectBox = function (params = {}) {
|
|
|
886
929
|
const scrollTop = box.list.elem.scrollTop;
|
|
887
930
|
renderList();
|
|
888
931
|
box.list.elem.scrollTop = scrollTop; // WHY: The list must not jump after a click.
|
|
889
|
-
|
|
932
|
+
// WHY: The row just chosen may be the locked selected one now (canSelectAgain: 0): no active row then.
|
|
933
|
+
const keptRow = rows[keepActive];
|
|
934
|
+
setActive((keptRow && isActivatable(keptRow.option)) ? keepActive : -1, 0);
|
|
890
935
|
}
|
|
891
936
|
|
|
892
937
|
// WHY: The selected option clicked again is not a change.
|
|
@@ -975,7 +1020,7 @@ const SelectBox = function (params = {}) {
|
|
|
975
1020
|
// The height of the panel and the list for fullHeightList (1) or the normal list (0).
|
|
976
1021
|
const applyListHeightMode = function () {
|
|
977
1022
|
const isFullHeight = (box.fullHeightList == 1);
|
|
978
|
-
// WHY: a full height list touches the top and the bottom of the page: square corners
|
|
1023
|
+
// WHY: a full height list touches the top and the bottom of the page: square corners.
|
|
979
1024
|
box.panel.round = isFullHeight ? 0 : _s.panel.round;
|
|
980
1025
|
box.panel.height = "auto";
|
|
981
1026
|
box.panel.css.minHeight = "";
|
|
@@ -1014,7 +1059,7 @@ const SelectBox = function (params = {}) {
|
|
|
1014
1059
|
|
|
1015
1060
|
const selectActiveRow = function () {
|
|
1016
1061
|
const item = rows[activeIndex];
|
|
1017
|
-
if (item &&
|
|
1062
|
+
if (item && isActivatable(item.option)) selectOption(item.option);
|
|
1018
1063
|
};
|
|
1019
1064
|
|
|
1020
1065
|
// A letter typed without Ctrl / Cmd / Alt
|
|
@@ -1106,15 +1151,13 @@ const SelectBox = function (params = {}) {
|
|
|
1106
1151
|
input.setAttribute("autocomplete", "off");
|
|
1107
1152
|
};
|
|
1108
1153
|
|
|
1109
|
-
// A SearchInput of comp/search-input
|
|
1154
|
+
// A SearchInput of comp/search-input.js (style.searchInput), with its clear button.
|
|
1110
1155
|
const createSearchInput = function () {
|
|
1111
1156
|
const params = Object.assign({}, _s.searchInput);
|
|
1112
|
-
params.searchIconFile = SelectBox.getSearchIconFile(params.searchIconFile);
|
|
1113
|
-
params.clearIconFile = SelectBox.getSearchIconFile(params.clearIconFile);
|
|
1114
1157
|
params.width = "100%";
|
|
1115
1158
|
params.scale = 1; // WHY: style.searchInput is scaled already (with the style of SelectBox).
|
|
1116
|
-
params.
|
|
1117
|
-
params.
|
|
1159
|
+
params.placeholder = box.searchPlaceholder;
|
|
1160
|
+
params.onChange = onSearchTextChange; // WHY: also after its clear button (that is not an "input" event).
|
|
1118
1161
|
box.searchGroup = SearchInput(params);
|
|
1119
1162
|
box.searchInput = box.searchGroup.txtSearch;
|
|
1120
1163
|
};
|
|
@@ -1146,7 +1189,7 @@ const SelectBox = function (params = {}) {
|
|
|
1146
1189
|
};
|
|
1147
1190
|
|
|
1148
1191
|
const setSearchBoxText = function (text) {
|
|
1149
|
-
if (usesSearchInput) box.searchGroup.
|
|
1192
|
+
if (usesSearchInput) box.searchGroup.setValue(text, 1);
|
|
1150
1193
|
else box.searchInput.text = text;
|
|
1151
1194
|
};
|
|
1152
1195
|
|
|
@@ -1171,6 +1214,10 @@ const SelectBox = function (params = {}) {
|
|
|
1171
1214
|
setSearchBoxText(searchText);
|
|
1172
1215
|
box.footer.visible = (isMultiple() && box.showSelectAll == 1) ? 1 : 0;
|
|
1173
1216
|
|
|
1217
|
+
// WHY at open: a field in a Dialog or a SidePanel (their layer is over 1001) opens its list over them
|
|
1218
|
+
const layerZIndex = basic.zIndexAbove(box, OVERLAY_Z_INDEX);
|
|
1219
|
+
box.overlay.zIndex = layerZIndex;
|
|
1220
|
+
box.panel.zIndex = layerZIndex + 1;
|
|
1174
1221
|
box.overlay.visible = 1;
|
|
1175
1222
|
box.panel.visible = 1;
|
|
1176
1223
|
applyListHeightMode();
|
|
@@ -1216,7 +1263,10 @@ const SelectBox = function (params = {}) {
|
|
|
1216
1263
|
|
|
1217
1264
|
// silent: 1 -> onChange is not called.
|
|
1218
1265
|
box.setValue = function (value, silent = 0) {
|
|
1219
|
-
|
|
1266
|
+
const next = normalizeValue(value);
|
|
1267
|
+
// WHY JSON: a multiple selection is a list (setOptions compares the same way)
|
|
1268
|
+
if (JSON.stringify(next) === JSON.stringify(box.value)) return;
|
|
1269
|
+
box.value = next;
|
|
1220
1270
|
updateField();
|
|
1221
1271
|
if (isOpen) renderList();
|
|
1222
1272
|
if (!silent) box.onChange(box);
|
|
@@ -1515,20 +1565,24 @@ SelectBox.canUseItemList = function () {
|
|
|
1515
1565
|
return false;
|
|
1516
1566
|
};
|
|
1517
1567
|
|
|
1518
|
-
// The search box is a SearchInput when comp/search-input
|
|
1519
|
-
// WHY
|
|
1568
|
+
// The search box is a SearchInput when comp/search-input.js is loaded (no warning without it: the own box).
|
|
1569
|
+
// WHY SearchInput.styles: an older SearchInput had the same global name and not the same params.
|
|
1520
1570
|
SelectBox.canUseSearchInput = function () {
|
|
1521
1571
|
return (typeof SearchInput === "function") && !!SearchInput.styles;
|
|
1522
1572
|
};
|
|
1523
1573
|
|
|
1524
|
-
//
|
|
1525
|
-
//
|
|
1526
|
-
//
|
|
1527
|
-
SelectBox
|
|
1528
|
-
|
|
1529
|
-
const
|
|
1530
|
-
if (!
|
|
1531
|
-
|
|
1574
|
+
// A search box in a package of SearchInput (style.searchInput.styleName): the params of that package fill
|
|
1575
|
+
// style.searchInput before SelectBoxDefaults does. The keys of the SelectBox package still win.
|
|
1576
|
+
// WHY: The look keys of the classic search box of SelectBoxDefaults filled every missing key, so a search box with
|
|
1577
|
+
// styleName "ozden" kept the classic icons, sizes and colors (the search box of SelectBox ozden looked old).
|
|
1578
|
+
SelectBox.fillSearchInputPackage = function (style) {
|
|
1579
|
+
const searchInput = style.searchInput;
|
|
1580
|
+
if (!searchInput || !SelectBox.canUseSearchInput()) return;
|
|
1581
|
+
const searchPackage = SearchInput.styles[searchInput.styleName];
|
|
1582
|
+
if (!searchPackage) return;
|
|
1583
|
+
const packageParams = Object.assign({}, searchPackage);
|
|
1584
|
+
delete packageParams.style;
|
|
1585
|
+
mergeIntoIfMissing(searchInput, packageParams);
|
|
1532
1586
|
};
|
|
1533
1587
|
|
|
1534
1588
|
// "Apple" -> { value: "Apple", label: "Apple", description: "", iconFile: "", group: "", disabled: 0 }
|
|
@@ -1556,7 +1610,7 @@ SelectBox.getArrowSvg = function (color, size = 16) {
|
|
|
1556
1610
|
return '<svg xmlns="http://www.w3.org/2000/svg" width="' + size + '" height="' + size + '" viewBox="0 0 24 24" fill="none" stroke="' + color + '" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>';
|
|
1557
1611
|
};
|
|
1558
1612
|
|
|
1559
|
-
// Up and down arrows (the "unfold more" icon
|
|
1613
|
+
// Up and down arrows (the "unfold more" icon)
|
|
1560
1614
|
SelectBox.getUnfoldSvg = function (color, size = 20) {
|
|
1561
1615
|
return '<svg xmlns="http://www.w3.org/2000/svg" width="' + size + '" height="' + size + '" viewBox="0 -960 960 960" fill="' + color + '"><path d="M480-80 240-320l57-57 183 183 183-183 57 57L480-80ZM298-584l-58-56 240-240 240 240-58 56-182-182-182 182Z"/></svg>';
|
|
1562
1616
|
};
|
|
@@ -1593,9 +1647,9 @@ SelectBox.getCheckSvg = function (checked, style, size = 18) {
|
|
|
1593
1647
|
SelectBox.styles = {
|
|
1594
1648
|
|
|
1595
1649
|
// White field, dark text, a soft line.
|
|
1596
|
-
|
|
1650
|
+
light: SelectBoxDefaults.style,
|
|
1597
1651
|
|
|
1598
|
-
// Dark theme. (The other dark packages
|
|
1652
|
+
// Dark theme. (The other dark packages use these colors.)
|
|
1599
1653
|
dark: {
|
|
1600
1654
|
field: { color: "#232322", border: 1, borderColor: "rgba(255, 255, 255, 0.10)", round: 8, padding: [12, 0] },
|
|
1601
1655
|
fieldHover: { borderColor: "rgba(255, 255, 255, 0.30)" },
|
|
@@ -1605,7 +1659,7 @@ SelectBox.styles = {
|
|
|
1605
1659
|
arrow: { color: "rgba(255, 255, 255, 0.55)" },
|
|
1606
1660
|
panel: { color: "#232322", border: 1, borderColor: "rgba(255, 255, 255, 0.12)", round: 10, padding: 6, shadow: "0 8px 24px rgba(0, 0, 0, 0.5)" },
|
|
1607
1661
|
searchInput: {
|
|
1608
|
-
styleName: "
|
|
1662
|
+
styleName: "original", // the first look of SearchInput
|
|
1609
1663
|
height: 38,
|
|
1610
1664
|
searchIconLeft: 10, // WHY: the icon and the text at the place of the own search input (icon 18, text 42)
|
|
1611
1665
|
color: "rgba(255, 255, 255, 0.05)",
|
|
@@ -1642,11 +1696,12 @@ SelectBox.styles = {
|
|
|
1642
1696
|
},
|
|
1643
1697
|
|
|
1644
1698
|
};
|
|
1699
|
+
SelectBox.styles.classic = SelectBox.styles.light; // the old name of light: the pages made with it keep their look
|
|
1645
1700
|
|
|
1646
1701
|
|
|
1647
|
-
//
|
|
1648
|
-
//
|
|
1649
|
-
//
|
|
1702
|
+
// A whitesmoke box with a thin border, the list opens over the field with a fade, a white search box (SearchInput),
|
|
1703
|
+
// rows that get white with a thin line above and under them under the mouse, the selected one half transparent.
|
|
1704
|
+
// A package of params: a 350 x 50 field, a search box, the list down to the
|
|
1650
1705
|
// bottom of the page. Text rows; your own rows and field: createItemView / createValueView
|
|
1651
1706
|
// (_basic/examples/select-box-ozden-item.htm). The params of the package are used when the page does not give them.
|
|
1652
1707
|
SelectBox.styles.ozden = {
|
|
@@ -1677,33 +1732,24 @@ SelectBox.styles.ozden = {
|
|
|
1677
1732
|
motionDuration: 200,
|
|
1678
1733
|
startScale: 0.9,
|
|
1679
1734
|
},
|
|
1680
|
-
// The
|
|
1735
|
+
// The search bar: the ozden SearchInput (its icons, its font and icon sizes, its bottom line) in white, nearly
|
|
1736
|
+
// square and without a border: the search box of ItemList ozden.
|
|
1681
1737
|
searchInput: {
|
|
1682
|
-
styleName: "
|
|
1683
|
-
height:
|
|
1684
|
-
|
|
1738
|
+
styleName: "ozden",
|
|
1739
|
+
height: 44, // as ItemList ozden; ozdenDark takes it too
|
|
1740
|
+
searchIconLeft: 16, // WHY: the default of SearchInput, as ItemList ozden (SelectBoxDefaults has 10)
|
|
1741
|
+
color: "white",
|
|
1685
1742
|
border: 0,
|
|
1686
|
-
borderColor: "transparent",
|
|
1687
|
-
borderBottomStyle: "2px solid rgba(0, 0, 0, 0.06)",
|
|
1688
1743
|
round: 2,
|
|
1689
|
-
fontSize: 18,
|
|
1690
|
-
textColor: "rgba(0, 0, 0, 0.8)",
|
|
1691
|
-
placeholderColor: "",
|
|
1692
|
-
searchIconFile: "search.svg",
|
|
1693
|
-
clearIconFile: "clear.svg",
|
|
1694
|
-
searchIconSize: 22,
|
|
1695
|
-
searchIconOpacity: 1,
|
|
1696
|
-
clearIconOpacity: 0.6,
|
|
1697
|
-
invertIconColor: 0,
|
|
1698
1744
|
},
|
|
1699
1745
|
search: {
|
|
1700
|
-
color: "
|
|
1746
|
+
color: "white", // (as searchInput)
|
|
1701
1747
|
border: 0,
|
|
1702
1748
|
borderColor: "transparent",
|
|
1703
1749
|
round: 2,
|
|
1704
1750
|
fontSize: 18,
|
|
1705
1751
|
textColor: "rgba(0, 0, 0, 0.8)",
|
|
1706
|
-
height:
|
|
1752
|
+
height: 44, // as searchInput (this own search box: a page without comp/search-input.js)
|
|
1707
1753
|
padding: [16, 0],
|
|
1708
1754
|
iconSize: 22,
|
|
1709
1755
|
borderBottom: "2px solid rgba(0, 0, 0, 0.06)",
|
|
@@ -1719,22 +1765,98 @@ SelectBox.styles.ozden = {
|
|
|
1719
1765
|
iconRound: 4,
|
|
1720
1766
|
iconMargin: [0, 0],
|
|
1721
1767
|
},
|
|
1722
|
-
optionActive: { color: "white", showAtOpen: 0 },
|
|
1723
|
-
|
|
1724
|
-
|
|
1768
|
+
optionActive: { color: "white", lineColor: Black(0.2), showAtOpen: 0 }, // as ItemList ozden
|
|
1769
|
+
// WHY canSelectAgain 0: the selected item is half transparent and not clickable: it does not get the white under
|
|
1770
|
+
// the mouse and a click on it does nothing.
|
|
1771
|
+
optionSelected: { textColor: "rgba(0, 0, 0, 0.8)", checkColor: "#373836", checkTickColor: "white", fontFamily: "", showTick: 0, opacity: 0.5, canSelectAgain: 0 },
|
|
1772
|
+
description: { fontSize: 14, textColor: "gray", marginTop: -4 }, // WHY -4: the title and the description overlap a little.
|
|
1725
1773
|
highlight: { color: "transparent" },
|
|
1726
1774
|
empty: { fontSize: 16, textColor: Black(0.45) },
|
|
1727
|
-
// createItemView:
|
|
1775
|
+
// createItemView: rows that are white with a thin line above and under them under the mouse, the selected one
|
|
1776
|
+
// half transparent, as ItemList ozden.
|
|
1728
1777
|
itemList: {
|
|
1729
|
-
row: { padding: [19, 0], gap: 20, round: 0, motion: "background-color 0.2s" }, // WHY: 19: see option.padding
|
|
1730
|
-
hover: { color: "white" },
|
|
1731
|
-
selected: { color: "transparent", opacity: 0.5 }, // WHY: transparent:
|
|
1778
|
+
row: { padding: [19, 0], gap: 20, round: 0, motion: "background-color 0.2s, box-shadow 0.2s" }, // WHY: 19: see option.padding
|
|
1779
|
+
hover: { color: "white", lineColor: Black(0.2) },
|
|
1780
|
+
selected: { color: "transparent", opacity: 0.5 }, // WHY: transparent: no look of its own (it can not be chosen again).
|
|
1732
1781
|
check: { size: 22, color: "#373836", iconColor: "white", borderColor: Black(0.25) },
|
|
1733
1782
|
},
|
|
1734
|
-
// The scroll bar
|
|
1783
|
+
// The scroll bar: always shown, with the dots at its ends.
|
|
1735
1784
|
scrollBar: { bar_color: "#373836", bar_mouseOverColor: "#373836", bar_opacity: 0.4, bar_mouseOverOpacity: 0.9, neverHide: 1, showDots: 1 },
|
|
1736
1785
|
},
|
|
1737
1786
|
};
|
|
1738
1787
|
|
|
1788
|
+
// The dark theme of ozden: the shapes of ozden in the dark tones of the kit, as ItemList
|
|
1789
|
+
// ozdenDark: a field and a list of #1A1A19 (on a darker page, Ex: #141414), the active row #262624 with a thin light
|
|
1790
|
+
// line above and under it, the selected one half transparent, the ozdenDark search box (_basic/examples/
|
|
1791
|
+
// select-box-ozden-dark-text.htm). Only the colors are here: the sizes and the params come from ozden (below).
|
|
1792
|
+
SelectBox.styles.ozdenDark = {
|
|
1793
|
+
style: {
|
|
1794
|
+
field: { color: "#1A1A19", borderColor: White(0.22) },
|
|
1795
|
+
fieldHover: { borderColor: White(0.22) },
|
|
1796
|
+
fieldFocus: { borderColor: White(0.22) },
|
|
1797
|
+
fieldText: { textColor: White(0.88) },
|
|
1798
|
+
placeholder: { textColor: White(0.4) },
|
|
1799
|
+
arrow: { color: "white" },
|
|
1800
|
+
panel: { color: "#1A1A19", borderColor: White(0.22) },
|
|
1801
|
+
searchInput: { styleName: "ozdenDark", color: "#262624" },
|
|
1802
|
+
search: { color: "#262624", textColor: White(0.88), borderBottom: "2px solid " + White(0.06) },
|
|
1803
|
+
option: { textColor: White(0.88) },
|
|
1804
|
+
optionActive: { color: "#262624", lineColor: White(0.14) },
|
|
1805
|
+
optionSelected: { textColor: White(0.88), checkColor: "#E6E6E4", checkTickColor: "#1A1A19" },
|
|
1806
|
+
description: { textColor: White(0.45) },
|
|
1807
|
+
group: { textColor: White(0.45) },
|
|
1808
|
+
empty: { textColor: White(0.45) },
|
|
1809
|
+
footerButton: { textColor: White(0.8) },
|
|
1810
|
+
divider: { color: White(0.08) },
|
|
1811
|
+
itemListStyleName: "ozdenDark",
|
|
1812
|
+
itemList: {
|
|
1813
|
+
hover: { color: "#262624", lineColor: White(0.14) },
|
|
1814
|
+
check: { color: "#E6E6E4", iconColor: "#1A1A19", borderColor: White(0.3) },
|
|
1815
|
+
},
|
|
1816
|
+
scrollBar: { bar_color: "#CFCFCD", bar_mouseOverColor: "#CFCFCD" },
|
|
1817
|
+
},
|
|
1818
|
+
};
|
|
1819
|
+
// WHY: The shapes, the sizes and the params of ozden (350 x 50, the search box, the list to the bottom of the page).
|
|
1820
|
+
mergeIntoIfMissing(SelectBox.styles.ozdenDark, SelectBox.styles.ozden);
|
|
1821
|
+
|
|
1739
1822
|
// The old name of the dark package. (Kept: pages may use it.)
|
|
1740
1823
|
SelectBox.DARK_STYLE = SelectBox.styles.dark;
|
|
1824
|
+
|
|
1825
|
+
// The minimal theme (_designs/minimal-theme.htm): a 28 px field of a line (darker under the mouse, ink while open),
|
|
1826
|
+
// a 13 px text, a 14 px chevron; the list on the ground of the window with a line and no shadow, a line around the row
|
|
1827
|
+
// under the mouse, the selected row in ink with a check. minimalDark: the same on a dark window.
|
|
1828
|
+
SelectBox.createMinimalStyle = function (colors) {
|
|
1829
|
+
return {
|
|
1830
|
+
height: 28,
|
|
1831
|
+
style: {
|
|
1832
|
+
field: { color: "transparent", border: 1, borderColor: colors.edge, round: 4, padding: [10, 0] }, // WHY edge: 3:1 at least (a control)
|
|
1833
|
+
fieldHover: { borderColor: colors.edgeHover },
|
|
1834
|
+
fieldFocus: { borderColor: colors.ink },
|
|
1835
|
+
fieldText: { fontSize: 13, textColor: colors.text },
|
|
1836
|
+
placeholder: { textColor: colors.faintText },
|
|
1837
|
+
arrow: { color: colors.softText, icon: "chevron", size: 14, opacity: 1, marginRight: 0 },
|
|
1838
|
+
panel: { color: colors.ground, border: 1, borderColor: colors.line, round: 4, padding: 4, shadow: "none", gap: 4 },
|
|
1839
|
+
searchInput: { styleName: colors.searchStyleName, height: 28, fontSize: 13, searchIconSize: 14, searchIconLeft: 10, searchIconGap: 6, round: 14 },
|
|
1840
|
+
search: { color: "transparent", border: 1, borderColor: colors.edge, round: 4, fontSize: 13, textColor: colors.text, height: 28, padding: [10, 0], iconSize: 14 },
|
|
1841
|
+
option: { fontSize: 13, textColor: colors.text, round: 3, padding: [8, 4], gap: 8, iconSize: 14, border: 1, borderColor: "transparent", space: 2 },
|
|
1842
|
+
optionActive: { color: "transparent", lineColor: "", borderColor: colors.lineHover },
|
|
1843
|
+
optionSelected: { textColor: colors.ink, checkColor: colors.ink, checkTickColor: colors.onInk, fontFamily: "", showTick: 1, tickSize: 12, borderColor: colors.ink },
|
|
1844
|
+
description: { fontSize: 12, textColor: colors.softText },
|
|
1845
|
+
group: { fontSize: 11, textColor: colors.faintText },
|
|
1846
|
+
empty: { fontSize: 12, textColor: colors.softText },
|
|
1847
|
+
footerButton: { fontSize: 12, textColor: colors.ink },
|
|
1848
|
+
divider: { color: colors.line },
|
|
1849
|
+
itemListStyleName: colors.itemListStyleName,
|
|
1850
|
+
},
|
|
1851
|
+
};
|
|
1852
|
+
};
|
|
1853
|
+
SelectBox.MINIMAL_COLORS = {
|
|
1854
|
+
ground: "#FFFFFF", text: Black(0.85), softText: Black(0.55), faintText: Black(0.54),
|
|
1855
|
+
line: Black(0.2), lineHover: Black(0.45), edge: Black(0.45), edgeHover: Black(0.65), ink: "#1F1F1F", onInk: "#FFFFFF", searchStyleName: "minimal", itemListStyleName: "minimal",
|
|
1856
|
+
};
|
|
1857
|
+
SelectBox.styles.minimal = SelectBox.createMinimalStyle(SelectBox.MINIMAL_COLORS);
|
|
1858
|
+
SelectBox.MINIMAL_DARK_COLORS = {
|
|
1859
|
+
ground: "#1A1A19", text: White(0.88), softText: White(0.55), faintText: White(0.48),
|
|
1860
|
+
line: White(0.18), lineHover: White(0.42), edge: White(0.42), edgeHover: White(0.62), ink: "#EDEDEB", onInk: "#1A1A19", searchStyleName: "minimalDark", itemListStyleName: "minimalDark",
|
|
1861
|
+
};
|
|
1862
|
+
SelectBox.styles.minimalDark = SelectBox.createMinimalStyle(SelectBox.MINIMAL_DARK_COLORS);
|