create-basicjs 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/create-basicjs.js +2 -2
- package/bin/verify-package.js +16 -0
- package/package.json +4 -1
- package/payload/starter/AGENTS.md +82 -0
- package/payload/starter/CLAUDE.md +1 -0
- package/payload/starter/README.md +45 -0
- package/payload/starter/_basic/VERSION +1 -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-cup.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/data-table/palette.svg +2 -0
- package/payload/starter/_basic/assets/data-table/people.js +104 -0
- package/payload/starter/_basic/assets/data-table/trash.svg +2 -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/assets/icons/alert-black.png +0 -0
- package/payload/starter/_basic/assets/icons/alert.png +0 -0
- package/payload/starter/_basic/assets/icons/arrow-drop.svg +3 -0
- package/payload/starter/_basic/assets/icons/arrow-rise.svg +3 -0
- package/payload/starter/_basic/assets/icons/close.svg +1 -0
- package/payload/starter/_basic/assets/icons/lamp-on.png +0 -0
- package/payload/starter/_basic/assets/icons/lamp.png +0 -0
- package/payload/starter/_basic/assets/icons/lock.png +0 -0
- package/payload/starter/_basic/assets/icons/panel.png +0 -0
- package/payload/starter/_basic/assets/icons/plant.png +0 -0
- package/payload/starter/_basic/assets/icons/trash.png +0 -0
- package/payload/starter/_basic/assets/icons/trash.svg +2 -0
- package/payload/starter/_basic/assets/tab-bar/settings.png +0 -0
- package/payload/starter/_basic/assets/tab-bar/status.png +0 -0
- package/payload/starter/_basic/assets/tab-bar/transactions.png +0 -0
- package/payload/starter/_basic/assets/tutorial/blueberries.png +0 -0
- package/payload/starter/_basic/assets/tutorial/carrot.png +0 -0
- package/payload/starter/_basic/assets/tutorial/olives.png +0 -0
- package/payload/starter/_basic/assets/tutorial/strawberry.png +0 -0
- package/payload/starter/_basic/assets/ui-bottom-bar/setting.svg +11 -0
- package/payload/starter/_basic/basic/LICENSE +14 -0
- package/payload/starter/_basic/basic/basic.css +277 -0
- package/payload/starter/_basic/basic/basic.js +3767 -0
- package/payload/starter/_basic/basic/basic.min.css +1 -0
- package/payload/starter/_basic/basic/basic.min.js +65 -0
- package/payload/starter/_basic/basic/font/open-sans/LICENSE.txt +206 -0
- package/payload/starter/_basic/basic/font/open-sans/OpenSans-Bold.ttf +0 -0
- package/payload/starter/_basic/basic/font/open-sans/OpenSans-Regular.ttf +0 -0
- package/payload/starter/_basic/basic/scroll-bar.js +536 -0
- package/payload/starter/_basic/basic/scroll-bar.min.js +2 -0
- package/payload/starter/_basic/comp/action-button/add.png +0 -0
- package/payload/starter/_basic/comp/action-button.js +522 -0
- package/payload/starter/_basic/comp/action-tab-bar.js +383 -0
- package/payload/starter/_basic/comp/app-bar.js +236 -0
- package/payload/starter/_basic/comp/badge-v2.js +246 -0
- package/payload/starter/_basic/comp/bottom-bar.js +547 -0
- package/payload/starter/_basic/comp/breadcrumbs.js +522 -0
- package/payload/starter/_basic/comp/chart-box/chart-4.5.1.umd.min.js +13 -0
- package/payload/starter/_basic/comp/chart-box/chart-js-LICENSE.md +9 -0
- package/payload/starter/_basic/comp/chart-box.js +868 -0
- package/payload/starter/_basic/comp/check-box.js +374 -0
- package/payload/starter/_basic/comp/context-menu.js +634 -0
- package/payload/starter/_basic/comp/currency-input-b.js +190 -0
- package/payload/starter/_basic/comp/data-table/arrow.svg +2 -0
- package/payload/starter/_basic/comp/data-table.js +865 -0
- package/payload/starter/_basic/comp/dialog.js +854 -0
- package/payload/starter/_basic/comp/email-input-b.js +57 -0
- package/payload/starter/_basic/comp/filters.js +493 -0
- package/payload/starter/_basic/comp/form.js +590 -0
- package/payload/starter/_basic/comp/full-screen-select/arrow.svg +2 -0
- package/payload/starter/_basic/comp/full-screen-select/cancel.svg +2 -0
- package/payload/starter/_basic/comp/full-screen-select.js +611 -0
- package/payload/starter/_basic/comp/gauge.js +435 -0
- package/payload/starter/_basic/comp/hold-to-confirm-button/trash-red.png +0 -0
- package/payload/starter/_basic/comp/hold-to-confirm-button/trash.png +0 -0
- package/payload/starter/_basic/comp/hold-to-confirm-button.js +280 -0
- package/payload/starter/_basic/comp/input-b.js +759 -0
- package/payload/starter/_basic/comp/item-list.js +1396 -0
- package/payload/starter/_basic/comp/label-editor.js +1137 -0
- package/payload/starter/_basic/comp/left-menu/_Material Symbols & Icons - Google Fonts.webloc +8 -0
- package/payload/starter/_basic/comp/left-menu/data-table.png +0 -0
- package/payload/starter/_basic/comp/left-menu/home.png +0 -0
- package/payload/starter/_basic/comp/left-menu/reports.png +0 -0
- package/payload/starter/_basic/comp/left-menu/setting.png +0 -0
- package/payload/starter/_basic/comp/left-menu.js +476 -0
- package/payload/starter/_basic/comp/line-progress-bar.js +192 -0
- package/payload/starter/_basic/comp/loading-screen.js +382 -0
- package/payload/starter/_basic/comp/login-page-v2.js +586 -0
- package/payload/starter/_basic/comp/mini-graph-box.js +483 -0
- package/payload/starter/_basic/comp/notice.js +227 -0
- package/payload/starter/_basic/comp/number-input-b.js +121 -0
- package/payload/starter/_basic/comp/numeric-keyboard.js +296 -0
- package/payload/starter/_basic/comp/page-control.js +745 -0
- package/payload/starter/_basic/comp/page-header.js +190 -0
- package/payload/starter/_basic/comp/password-input-b/hide-btn.png +0 -0
- package/payload/starter/_basic/comp/password-input-b/hide-btn2.png +0 -0
- package/payload/starter/_basic/comp/password-input-b/show-btn.png +0 -0
- package/payload/starter/_basic/comp/password-input-b/show-btn2.png +0 -0
- package/payload/starter/_basic/comp/password-input-b.js +164 -0
- package/payload/starter/_basic/comp/period-bar.js +435 -0
- package/payload/starter/_basic/comp/phone-input-b.js +287 -0
- package/payload/starter/_basic/comp/progress-bar.js +676 -0
- package/payload/starter/_basic/comp/property-panel.js +2740 -0
- package/payload/starter/_basic/comp/radio-button.js +467 -0
- package/payload/starter/_basic/comp/rich-text-editor.js +1061 -0
- package/payload/starter/_basic/comp/scrolling-text.js +296 -0
- package/payload/starter/_basic/comp/search-input-v2/clear-round.svg +1 -0
- package/payload/starter/_basic/comp/search-input-v2/clear.svg +1 -0
- package/payload/starter/_basic/comp/search-input-v2/filter.png +0 -0
- package/payload/starter/_basic/comp/search-input-v2/filter.svg +1 -0
- package/payload/starter/_basic/comp/search-input-v2/search.svg +1 -0
- package/payload/starter/_basic/comp/search-input-v2.js +427 -0
- package/payload/starter/_basic/comp/search-results.js +560 -0
- package/payload/starter/_basic/comp/select-box.js +1740 -0
- package/payload/starter/_basic/comp/select-color.js +603 -0
- package/payload/starter/_basic/comp/select-date.js +1003 -0
- package/payload/starter/_basic/comp/select-file.js +732 -0
- package/payload/starter/_basic/comp/select-time.js +979 -0
- package/payload/starter/_basic/comp/settings-row.js +298 -0
- package/payload/starter/_basic/comp/side-panel.js +573 -0
- package/payload/starter/_basic/comp/slider-field.js +776 -0
- package/payload/starter/_basic/comp/slider.js +368 -0
- package/payload/starter/_basic/comp/smart-button/alert-black.png +0 -0
- package/payload/starter/_basic/comp/smart-button/clock.png +0 -0
- package/payload/starter/_basic/comp/smart-button.js +896 -0
- package/payload/starter/_basic/comp/smart-table/clock.png +0 -0
- package/payload/starter/_basic/comp/smart-table/down.png +0 -0
- package/payload/starter/_basic/comp/smart-table/scroll.png +0 -0
- package/payload/starter/_basic/comp/smart-table/sort.png +0 -0
- package/payload/starter/_basic/comp/smart-table/up.png +0 -0
- package/payload/starter/_basic/comp/smart-table.js +1321 -0
- package/payload/starter/_basic/comp/sortable-list.js +1172 -0
- package/payload/starter/_basic/comp/spark-line-box.js +729 -0
- package/payload/starter/_basic/comp/stepper.js +699 -0
- package/payload/starter/_basic/comp/tabs.js +1317 -0
- package/payload/starter/_basic/comp/tag-input.js +1067 -0
- package/payload/starter/_basic/comp/tap-effect.js +168 -0
- package/payload/starter/_basic/comp/textarea-b.js +184 -0
- package/payload/starter/_basic/comp/time-line.js +324 -0
- package/payload/starter/_basic/comp/tiny-select/arrow.svg +1 -0
- package/payload/starter/_basic/comp/tiny-select.js +282 -0
- package/payload/starter/_basic/comp/tiny-table.js +279 -0
- package/payload/starter/_basic/comp/toast.js +838 -0
- package/payload/starter/_basic/comp/toggle.js +636 -0
- package/payload/starter/_basic/comp/tooltip.js +471 -0
- package/payload/starter/_basic/comp/tree-view.js +1096 -0
- package/payload/starter/_basic/comp/ui-effects.js +1091 -0
- package/payload/starter/_basic/comp/ui-standards.js +402 -0
- package/payload/starter/_basic/comp/url-input-b.js +145 -0
- package/payload/starter/_basic/comp/web-view.js +534 -0
- package/payload/starter/_basic/docs/basic-js-animated-rules.md +90 -0
- package/payload/starter/_basic/docs/basic-js-code-rules.md +91 -0
- package/payload/starter/_basic/docs/basic-js-components.md +134 -0
- package/payload/starter/_basic/docs/basic-js-core.md +131 -0
- package/payload/starter/_basic/docs/component-index.md +522 -0
- package/payload/starter/_basic/docs/component-template.js +416 -0
- package/payload/starter/_basic/docs/handbook/00-introduction.md +125 -0
- package/payload/starter/_basic/docs/handbook/00-what-is-new.md +96 -0
- package/payload/starter/_basic/docs/handbook/01-label.md +104 -0
- package/payload/starter/_basic/docs/handbook/02-box.md +166 -0
- package/payload/starter/_basic/docs/handbook/03-image.md +81 -0
- package/payload/starter/_basic/docs/handbook/04-common-properties.md +159 -0
- package/payload/starter/_basic/docs/handbook/05-autolayout.md +332 -0
- package/payload/starter/_basic/docs/handbook/06-button.md +103 -0
- package/payload/starter/_basic/docs/handbook/07-input.md +78 -0
- package/payload/starter/_basic/docs/handbook/08-page.md +120 -0
- package/payload/starter/_basic/docs/handbook/09-useful-examples.md +309 -0
- package/payload/starter/_basic/docs/handbook/10-motion.md +132 -0
- package/payload/starter/_basic/docs/handbook/11-other-functions.md +92 -0
- package/payload/starter/_basic/docs/handbook/12-utilities.md +123 -0
- package/payload/starter/_basic/docs/handbook/13-sound.md +88 -0
- package/payload/starter/_basic/docs/what-is-new.md +402 -0
- package/payload/starter/_basic/examples/action-button.htm +81 -0
- package/payload/starter/_basic/examples/action-tab-bar.htm +97 -0
- package/payload/starter/_basic/examples/app-bar.htm +140 -0
- package/payload/starter/_basic/examples/badgeV2.htm +68 -0
- package/payload/starter/_basic/examples/bottom-bar/grid.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/grids.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/home.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/homes.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon1.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon1s.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon2.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon2s.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon3.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon3s.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon4.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon4s.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/search.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/searchs.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/settings.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/settingss.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/tasks.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/taskss.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar-2.htm +187 -0
- package/payload/starter/_basic/examples/bottom-bar.htm +46 -0
- package/payload/starter/_basic/examples/breadcrumbs.htm +284 -0
- package/payload/starter/_basic/examples/chart-box.htm +287 -0
- package/payload/starter/_basic/examples/check-box-1.htm +220 -0
- package/payload/starter/_basic/examples/check-box-2.htm +212 -0
- package/payload/starter/_basic/examples/check-box-3.htm +179 -0
- package/payload/starter/_basic/examples/context-menu.htm +269 -0
- package/payload/starter/_basic/examples/currency-input-b.htm +71 -0
- package/payload/starter/_basic/examples/data-table-2.htm +67 -0
- package/payload/starter/_basic/examples/data-table-3.htm +72 -0
- package/payload/starter/_basic/examples/data-table-4.htm +144 -0
- package/payload/starter/_basic/examples/data-table-5.htm +152 -0
- package/payload/starter/_basic/examples/data-table.htm +178 -0
- package/payload/starter/_basic/examples/dialog-centered.htm +130 -0
- package/payload/starter/_basic/examples/dialog.htm +209 -0
- package/payload/starter/_basic/examples/email-input-b.htm +67 -0
- package/payload/starter/_basic/examples/filters.htm +115 -0
- package/payload/starter/_basic/examples/form-1.htm +123 -0
- package/payload/starter/_basic/examples/full-screen-select.htm +114 -0
- package/payload/starter/_basic/examples/gauge.htm +133 -0
- package/payload/starter/_basic/examples/hold-to-confirm-button.htm +144 -0
- package/payload/starter/_basic/examples/input-b-ex1.htm +132 -0
- package/payload/starter/_basic/examples/input-b-ex2.htm +136 -0
- package/payload/starter/_basic/examples/input-b-ex3-style.htm +113 -0
- package/payload/starter/_basic/examples/input-b-ex4-custom-unit.htm +112 -0
- package/payload/starter/_basic/examples/input-b-ex5-warning-icon.htm +80 -0
- package/payload/starter/_basic/examples/input-b-ex6-dark.htm +108 -0
- package/payload/starter/_basic/examples/input-b-ex7-ozden.htm +153 -0
- package/payload/starter/_basic/examples/item-list-2.htm +253 -0
- package/payload/starter/_basic/examples/item-list.htm +176 -0
- package/payload/starter/_basic/examples/label-editor.htm +196 -0
- package/payload/starter/_basic/examples/left-menu.htm +81 -0
- package/payload/starter/_basic/examples/line-progress-bar.htm +145 -0
- package/payload/starter/_basic/examples/loading-screen.htm +217 -0
- package/payload/starter/_basic/examples/login-page-dark-v2.htm +269 -0
- package/payload/starter/_basic/examples/login-page-v2.htm +269 -0
- package/payload/starter/_basic/examples/mini-graph-box.htm +229 -0
- package/payload/starter/_basic/examples/notice.htm +79 -0
- package/payload/starter/_basic/examples/number-input-b.htm +68 -0
- package/payload/starter/_basic/examples/numeric-keyboard.htm +100 -0
- package/payload/starter/_basic/examples/page-control.htm +262 -0
- package/payload/starter/_basic/examples/page-header.htm +117 -0
- package/payload/starter/_basic/examples/password-input-b.htm +70 -0
- package/payload/starter/_basic/examples/period-bar.htm +94 -0
- package/payload/starter/_basic/examples/phone-input-b-select-country.htm +298 -0
- package/payload/starter/_basic/examples/phone-input-b.htm +72 -0
- package/payload/starter/_basic/examples/progress-bar-ozden.htm +168 -0
- package/payload/starter/_basic/examples/progress-bar.htm +296 -0
- package/payload/starter/_basic/examples/property-panel.htm +216 -0
- package/payload/starter/_basic/examples/radio-button-1.htm +264 -0
- package/payload/starter/_basic/examples/radio-button-2.htm +256 -0
- package/payload/starter/_basic/examples/radio-button-3.htm +168 -0
- package/payload/starter/_basic/examples/rich-text-editor.htm +228 -0
- package/payload/starter/_basic/examples/scrolling-text.htm +75 -0
- package/payload/starter/_basic/examples/search-input-v2-ozden.htm +128 -0
- package/payload/starter/_basic/examples/search-input-v2-place.htm +80 -0
- package/payload/starter/_basic/examples/search-input-v2.htm +65 -0
- package/payload/starter/_basic/examples/search-results.htm +193 -0
- package/payload/starter/_basic/examples/select-box-ozden-item.htm +114 -0
- package/payload/starter/_basic/examples/select-box-ozden-text.htm +64 -0
- package/payload/starter/_basic/examples/select-box.htm +254 -0
- package/payload/starter/_basic/examples/select-color.htm +215 -0
- package/payload/starter/_basic/examples/select-date.htm +244 -0
- package/payload/starter/_basic/examples/select-file.htm +268 -0
- package/payload/starter/_basic/examples/select-time.htm +249 -0
- package/payload/starter/_basic/examples/settings-row.htm +193 -0
- package/payload/starter/_basic/examples/side-panel-2.htm +270 -0
- package/payload/starter/_basic/examples/side-panel.htm +219 -0
- package/payload/starter/_basic/examples/slider-field.htm +223 -0
- package/payload/starter/_basic/examples/slider.htm +180 -0
- package/payload/starter/_basic/examples/smart-button-2.htm +220 -0
- package/payload/starter/_basic/examples/smart-button-3-ozden.htm +320 -0
- package/payload/starter/_basic/examples/smart-button-4-dark.htm +102 -0
- package/payload/starter/_basic/examples/smart-button-5-features.htm +205 -0
- package/payload/starter/_basic/examples/smart-button.htm +252 -0
- package/payload/starter/_basic/examples/smart-table-1.htm +142 -0
- package/payload/starter/_basic/examples/smart-table-2.htm +191 -0
- package/payload/starter/_basic/examples/smart-table-3.htm +359 -0
- package/payload/starter/_basic/examples/smart-table-4.htm +158 -0
- package/payload/starter/_basic/examples/sortable-list.htm +250 -0
- package/payload/starter/_basic/examples/spark-line-box.htm +285 -0
- package/payload/starter/_basic/examples/stepper-2.htm +172 -0
- package/payload/starter/_basic/examples/stepper.htm +255 -0
- package/payload/starter/_basic/examples/tabs-2/coffee.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i1-white.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i1.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i2-white.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i2.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i3-white.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i3.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i4-white.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i4.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i5-white.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i5.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/lamp-on.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/lamp.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/search.svg +2 -0
- package/payload/starter/_basic/examples/tabs-2.htm +188 -0
- package/payload/starter/_basic/examples/tabs.htm +300 -0
- package/payload/starter/_basic/examples/tag-input.htm +242 -0
- package/payload/starter/_basic/examples/tap-effect.htm +100 -0
- package/payload/starter/_basic/examples/textarea-b.htm +76 -0
- package/payload/starter/_basic/examples/time-line.htm +226 -0
- package/payload/starter/_basic/examples/tiny-select.htm +86 -0
- package/payload/starter/_basic/examples/tiny-table.htm +109 -0
- package/payload/starter/_basic/examples/toast.htm +262 -0
- package/payload/starter/_basic/examples/toggle-2.htm +163 -0
- package/payload/starter/_basic/examples/toggle-3.htm +218 -0
- package/payload/starter/_basic/examples/toggle.htm +93 -0
- package/payload/starter/_basic/examples/tooltip-2.htm +177 -0
- package/payload/starter/_basic/examples/tooltip-3.htm +212 -0
- package/payload/starter/_basic/examples/tooltip.htm +124 -0
- package/payload/starter/_basic/examples/tree-view.htm +285 -0
- package/payload/starter/_basic/examples/ui-effects.htm +463 -0
- package/payload/starter/_basic/examples/ui-standards.htm +261 -0
- package/payload/starter/_basic/examples/unfinished-login-page-dark-supabase.htm +221 -0
- package/payload/starter/_basic/examples/unfinished-login-page-supabase.htm +221 -0
- package/payload/starter/_basic/examples/url-input-b.htm +85 -0
- package/payload/starter/_basic/examples/web-view.htm +241 -0
- package/payload/starter/_basic/min/action-button.min.js +2 -0
- package/payload/starter/_basic/min/action-tab-bar.min.js +2 -0
- package/payload/starter/_basic/min/app-bar.min.js +2 -0
- package/payload/starter/_basic/min/badge-v2.min.js +2 -0
- package/payload/starter/_basic/min/bottom-bar.min.js +2 -0
- package/payload/starter/_basic/min/breadcrumbs.min.js +2 -0
- package/payload/starter/_basic/min/chart-box.min.js +2 -0
- package/payload/starter/_basic/min/check-box.min.js +2 -0
- package/payload/starter/_basic/min/context-menu.min.js +2 -0
- package/payload/starter/_basic/min/currency-input-b.min.js +2 -0
- package/payload/starter/_basic/min/data-table.min.js +2 -0
- package/payload/starter/_basic/min/dialog.min.js +2 -0
- package/payload/starter/_basic/min/email-input-b.min.js +2 -0
- package/payload/starter/_basic/min/filters.min.js +2 -0
- package/payload/starter/_basic/min/form.min.js +2 -0
- package/payload/starter/_basic/min/full-screen-select.min.js +2 -0
- package/payload/starter/_basic/min/gauge.min.js +2 -0
- package/payload/starter/_basic/min/hold-to-confirm-button.min.js +2 -0
- package/payload/starter/_basic/min/input-b.min.js +2 -0
- package/payload/starter/_basic/min/item-list.min.js +2 -0
- package/payload/starter/_basic/min/label-editor.min.js +2 -0
- package/payload/starter/_basic/min/left-menu.min.js +2 -0
- package/payload/starter/_basic/min/line-progress-bar.min.js +2 -0
- package/payload/starter/_basic/min/loading-screen.min.js +2 -0
- package/payload/starter/_basic/min/login-page-v2.min.js +2 -0
- package/payload/starter/_basic/min/mini-graph-box.min.js +2 -0
- package/payload/starter/_basic/min/notice.min.js +2 -0
- package/payload/starter/_basic/min/number-input-b.min.js +2 -0
- package/payload/starter/_basic/min/numeric-keyboard.min.js +2 -0
- package/payload/starter/_basic/min/page-control.min.js +2 -0
- package/payload/starter/_basic/min/page-header.min.js +2 -0
- package/payload/starter/_basic/min/password-input-b.min.js +2 -0
- package/payload/starter/_basic/min/period-bar.min.js +2 -0
- package/payload/starter/_basic/min/phone-input-b.min.js +2 -0
- package/payload/starter/_basic/min/progress-bar.min.js +2 -0
- package/payload/starter/_basic/min/property-panel.min.js +2 -0
- package/payload/starter/_basic/min/radio-button.min.js +2 -0
- package/payload/starter/_basic/min/rich-text-editor.min.js +2 -0
- package/payload/starter/_basic/min/scrolling-text.min.js +2 -0
- package/payload/starter/_basic/min/search-input-v2.min.js +2 -0
- package/payload/starter/_basic/min/search-results.min.js +2 -0
- package/payload/starter/_basic/min/select-box.min.js +2 -0
- package/payload/starter/_basic/min/select-color.min.js +2 -0
- package/payload/starter/_basic/min/select-date.min.js +2 -0
- package/payload/starter/_basic/min/select-file.min.js +2 -0
- package/payload/starter/_basic/min/select-time.min.js +2 -0
- package/payload/starter/_basic/min/settings-row.min.js +2 -0
- package/payload/starter/_basic/min/side-panel.min.js +2 -0
- package/payload/starter/_basic/min/slider-field.min.js +2 -0
- package/payload/starter/_basic/min/slider.min.js +2 -0
- package/payload/starter/_basic/min/smart-button.min.js +2 -0
- package/payload/starter/_basic/min/smart-table.min.js +2 -0
- package/payload/starter/_basic/min/sortable-list.min.js +2 -0
- package/payload/starter/_basic/min/spark-line-box.min.js +2 -0
- package/payload/starter/_basic/min/stepper.min.js +2 -0
- package/payload/starter/_basic/min/tabs.min.js +2 -0
- package/payload/starter/_basic/min/tag-input.min.js +2 -0
- package/payload/starter/_basic/min/tap-effect.min.js +2 -0
- package/payload/starter/_basic/min/textarea-b.min.js +2 -0
- package/payload/starter/_basic/min/time-line.min.js +2 -0
- package/payload/starter/_basic/min/tiny-select.min.js +2 -0
- package/payload/starter/_basic/min/tiny-table.min.js +2 -0
- package/payload/starter/_basic/min/toast.min.js +2 -0
- package/payload/starter/_basic/min/toggle.min.js +2 -0
- package/payload/starter/_basic/min/tooltip.min.js +2 -0
- package/payload/starter/_basic/min/tree-view.min.js +2 -0
- package/payload/starter/_basic/min/ui-effects.min.js +2 -0
- package/payload/starter/_basic/min/ui-standards.min.js +2 -0
- package/payload/starter/_basic/min/url-input-b.min.js +2 -0
- package/payload/starter/_basic/min/web-view.min.js +2 -0
- package/payload/starter/_basic/tools/build.js +175 -0
- package/payload/starter/_basic/tools/check.js +318 -0
- package/payload/starter/app/app.js +27 -0
- package/payload/starter/assets/.gitkeep +0 -0
- package/payload/starter/gitignore +3 -0
- package/payload/starter/index.htm +23 -0
- package/payload/templates/booking/TEMPLATE.md +77 -0
- package/payload/templates/booking/app/app.js +722 -0
- package/payload/templates/booking/app/settings.js +52 -0
- package/payload/templates/booking/app/store.js +265 -0
- package/payload/templates/booking/app/texts.js +148 -0
- package/payload/templates/booking/assets/app-icon.svg +1 -0
- package/payload/templates/booking/assets/tabs/account.svg +1 -0
- package/payload/templates/booking/assets/tabs/appointments.svg +1 -0
- package/payload/templates/booking/assets/tabs/home.svg +1 -0
- package/payload/templates/booking/assets/tabs/services.svg +1 -0
- package/payload/templates/booking/components/booking-ui.js +252 -0
- package/payload/templates/booking/index.htm +53 -0
- package/payload/templates/booking/pages/account.js +124 -0
- package/payload/templates/booking/pages/appointments.js +141 -0
- package/payload/templates/booking/pages/book.js +231 -0
- package/payload/templates/booking/pages/home.js +99 -0
- package/payload/templates/booking/pages/services.js +79 -0
- package/payload/templates/classic/TEMPLATE.md +104 -0
- package/payload/templates/classic/app/app.js +779 -0
- package/payload/templates/classic/app/settings.js +77 -0
- package/payload/templates/classic/assets/_attribute.txt +37 -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-cup.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/assets/example-tabs/coffee.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i1-white.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i1.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i2-white.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i2.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i3-white.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i3.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i4-white.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i4.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i5-white.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i5.png +0 -0
- package/payload/templates/classic/assets/example-tabs/lamp-on.png +0 -0
- package/payload/templates/classic/assets/example-tabs/lamp.png +0 -0
- package/payload/templates/classic/assets/example-tabs/search.svg +2 -0
- package/payload/templates/classic/assets/files/ai.png +0 -0
- package/payload/templates/classic/assets/files/doc.png +0 -0
- package/payload/templates/classic/assets/files/folder.png +0 -0
- package/payload/templates/classic/assets/files/js.png +0 -0
- package/payload/templates/classic/assets/files/pdf.png +0 -0
- package/payload/templates/classic/assets/files/txt.png +0 -0
- package/payload/templates/classic/assets/files/xls.png +0 -0
- package/payload/templates/classic/assets/icons/arrow-drop.svg +3 -0
- package/payload/templates/classic/assets/icons/arrow-rise.svg +3 -0
- package/payload/templates/classic/assets/icons/download.svg +18 -0
- package/payload/templates/classic/assets/icons/lamp-on.png +0 -0
- package/payload/templates/classic/assets/icons/lamp.png +0 -0
- package/payload/templates/classic/assets/icons/lock-small.png +0 -0
- package/payload/templates/classic/assets/icons/lock.png +0 -0
- package/payload/templates/classic/assets/icons/logo.png +0 -0
- package/payload/templates/classic/assets/icons/trash-red.svg +2 -0
- package/payload/templates/classic/assets/icons/trash.svg +2 -0
- package/payload/templates/classic/assets/menu/t1.png +0 -0
- package/payload/templates/classic/assets/menu/t10.png +0 -0
- package/payload/templates/classic/assets/menu/t11.png +0 -0
- package/payload/templates/classic/assets/menu/t2.png +0 -0
- package/payload/templates/classic/assets/menu/t3.png +0 -0
- package/payload/templates/classic/assets/menu/t4.png +0 -0
- package/payload/templates/classic/assets/menu/t5.png +0 -0
- package/payload/templates/classic/assets/menu/t6.png +0 -0
- package/payload/templates/classic/assets/menu/t7.png +0 -0
- package/payload/templates/classic/assets/menu/t8.png +0 -0
- package/payload/templates/classic/assets/menu/t9.png +0 -0
- package/payload/templates/classic/assets/products/brokoli.png +0 -0
- package/payload/templates/classic/assets/products/cilek.png +0 -0
- package/payload/templates/classic/assets/products/domates.png +0 -0
- package/payload/templates/classic/assets/products/elma.png +0 -0
- package/payload/templates/classic/assets/products/havuc.png +0 -0
- package/payload/templates/classic/assets/products/karpuz.png +0 -0
- package/payload/templates/classic/assets/products/limon.png +0 -0
- package/payload/templates/classic/assets/products/muz.png +0 -0
- package/payload/templates/classic/assets/products/nar.png +0 -0
- package/payload/templates/classic/assets/products/patlican.png +0 -0
- package/payload/templates/classic/assets/products/yabanmersini.png +0 -0
- package/payload/templates/classic/assets/products/yesilbiber.png +0 -0
- package/payload/templates/classic/assets/tab-bar/settings.png +0 -0
- package/payload/templates/classic/assets/tab-bar/status.png +0 -0
- package/payload/templates/classic/assets/tab-bar/transactions.png +0 -0
- package/payload/templates/classic/assets/tabs/grid.png +0 -0
- package/payload/templates/classic/assets/tabs/grids.png +0 -0
- package/payload/templates/classic/assets/tabs/home.png +0 -0
- package/payload/templates/classic/assets/tabs/homes.png +0 -0
- package/payload/templates/classic/assets/tabs/search.png +0 -0
- package/payload/templates/classic/assets/tabs/searchs.png +0 -0
- package/payload/templates/classic/assets/tabs/settings.png +0 -0
- package/payload/templates/classic/assets/tabs/settingss.png +0 -0
- package/payload/templates/classic/assets/tabs/tasks.png +0 -0
- package/payload/templates/classic/assets/tabs/taskss.png +0 -0
- package/payload/templates/classic/html/privacy.htm +58 -0
- package/payload/templates/classic/index.htm +70 -0
- package/payload/templates/classic/pages/dialogs.js +205 -0
- package/payload/templates/classic/pages/example.js +296 -0
- package/payload/templates/classic/pages/examples.js +148 -0
- package/payload/templates/classic/pages/home.js +268 -0
- package/payload/templates/classic/pages/info-pages.js +95 -0
- package/payload/templates/classic/pages/lock.js +70 -0
- package/payload/templates/classic/pages/search.js +153 -0
- package/payload/templates/classic/pages/settings.js +184 -0
- package/payload/templates/classic/pages/tasks.js +221 -0
- package/payload/templates/classic/pages/template-pages.js +240 -0
- package/payload/templates/coffee-shop/TEMPLATE.md +63 -0
- package/payload/templates/coffee-shop/app/app.js +713 -0
- package/payload/templates/coffee-shop/app/settings.js +20 -0
- package/payload/templates/coffee-shop/app/store.js +52 -0
- package/payload/templates/coffee-shop/assets/cappuccino.png +0 -0
- package/payload/templates/coffee-shop/assets/chocolate-milk.png +0 -0
- package/payload/templates/coffee-shop/assets/coffee-art/cocoa.svg +1 -0
- package/payload/templates/coffee-shop/assets/coffee-art/filter.svg +1 -0
- package/payload/templates/coffee-shop/assets/coffee-art/frappe.svg +1 -0
- package/payload/templates/coffee-shop/assets/coffee-art/iced.svg +1 -0
- package/payload/templates/coffee-shop/assets/coffee-art/latte.svg +1 -0
- package/payload/templates/coffee-shop/assets/coffee-art/tea.svg +1 -0
- package/payload/templates/coffee-shop/assets/coffee.png +0 -0
- package/payload/templates/coffee-shop/assets/credits.txt +41 -0
- package/payload/templates/coffee-shop/assets/fonts/OFL.txt +93 -0
- package/payload/templates/coffee-shop/assets/fonts/gelasio-OFL.txt +93 -0
- package/payload/templates/coffee-shop/assets/fonts/gelasio.ttf +0 -0
- package/payload/templates/coffee-shop/assets/frappe.png +0 -0
- package/payload/templates/coffee-shop/assets/iced-caffee.png +0 -0
- package/payload/templates/coffee-shop/assets/tabs/cart.svg +1 -0
- package/payload/templates/coffee-shop/assets/tabs/home.svg +1 -0
- package/payload/templates/coffee-shop/assets/tabs/menu.svg +1 -0
- package/payload/templates/coffee-shop/assets/tabs/rewards.svg +1 -0
- package/payload/templates/coffee-shop/assets/tea.png +0 -0
- package/payload/templates/coffee-shop/components/coffee-ui.js +246 -0
- package/payload/templates/coffee-shop/index.htm +55 -0
- package/payload/templates/coffee-shop/pages/cart.js +82 -0
- package/payload/templates/coffee-shop/pages/drink.js +74 -0
- package/payload/templates/coffee-shop/pages/home.js +54 -0
- package/payload/templates/coffee-shop/pages/menu.js +53 -0
- package/payload/templates/coffee-shop/pages/rewards.js +38 -0
- package/payload/templates/forms/TEMPLATE.md +12 -0
- package/payload/templates/forms/app/app.js +30 -0
- package/payload/templates/forms/appointment-form.htm +969 -0
- package/payload/templates/forms/assets/error.png +0 -0
- package/payload/templates/forms/assets/logo.png +0 -0
- package/payload/templates/forms/assets/logo2.png +0 -0
- package/payload/templates/forms/assets/mail.png +0 -0
- package/payload/templates/forms/assets/success.png +0 -0
- package/payload/templates/forms/contact-form-iframe.htm +24 -0
- package/payload/templates/forms/contact-form-table.sql +11 -0
- package/payload/templates/forms/contact-form-to-mail.htm +358 -0
- package/payload/templates/forms/contact-form-to-supabase.htm +396 -0
- package/payload/templates/forms/dark-contact-form.htm +623 -0
- package/payload/templates/forms/event-registration-form.htm +1056 -0
- package/payload/templates/forms/feedback-form.htm +813 -0
- package/payload/templates/forms/order-form.htm +1187 -0
- package/payload/templates/forms/recruitment-form.htm +698 -0
- package/payload/templates/forms/service/PHPMailer/Exception.php +40 -0
- package/payload/templates/forms/service/PHPMailer/LICENSE +502 -0
- package/payload/templates/forms/service/PHPMailer/PHPMailer.php +5586 -0
- package/payload/templates/forms/service/PHPMailer/SMTP.php +1617 -0
- package/payload/templates/forms/service/readme.md +162 -0
- package/payload/templates/forms/service/send-form-mail.php +941 -0
- package/payload/templates/forms/support-ticket-form.htm +908 -0
- package/payload/templates/panel/TEMPLATE.md +16 -0
- package/payload/templates/panel/assets/_Material Symbols & Icons - Google Fonts.webloc +8 -0
- package/payload/templates/panel/assets/arrow_down.png +0 -0
- package/payload/templates/panel/assets/close.png +0 -0
- package/payload/templates/panel/assets/left-menu/bolt.png +0 -0
- package/payload/templates/panel/assets/left-menu/brick.png +0 -0
- package/payload/templates/panel/assets/left-menu/code.png +0 -0
- package/payload/templates/panel/assets/left-menu/dashboard.png +0 -0
- package/payload/templates/panel/assets/left-menu/data-table.png +0 -0
- package/payload/templates/panel/assets/left-menu/extension.png +0 -0
- package/payload/templates/panel/assets/left-menu/home.png +0 -0
- package/payload/templates/panel/assets/left-menu/reports.png +0 -0
- package/payload/templates/panel/assets/left-menu/setting.png +0 -0
- package/payload/templates/panel/assets/left-menu/url.png +0 -0
- package/payload/templates/panel/assets/light.png +0 -0
- package/payload/templates/panel/assets/maybe.png +0 -0
- package/payload/templates/panel/assets/panel-icon.png +0 -0
- package/payload/templates/panel/assets/top-bar/add.png +0 -0
- package/payload/templates/panel/assets/top-bar/add.svg +1 -0
- package/payload/templates/panel/assets/top-bar/apps.png +0 -0
- package/payload/templates/panel/assets/top-bar/apps.svg +1 -0
- package/payload/templates/panel/assets/top-bar/arrow-down.svg +1 -0
- package/payload/templates/panel/assets/top-bar/bell.svg +1 -0
- package/payload/templates/panel/assets/top-bar/bookmark.png +0 -0
- package/payload/templates/panel/assets/top-bar/bookmark.svg +1 -0
- package/payload/templates/panel/assets/top-bar/cancel.png +0 -0
- package/payload/templates/panel/assets/top-bar/close.svg +1 -0
- package/payload/templates/panel/assets/top-bar/comment.png +0 -0
- package/payload/templates/panel/assets/top-bar/filter.png +0 -0
- package/payload/templates/panel/assets/top-bar/keyboard.svg +1 -0
- package/payload/templates/panel/assets/top-bar/notification.png +0 -0
- package/payload/templates/panel/assets/top-bar/search.png +0 -0
- package/payload/templates/panel/assets/top-bar/search.svg +1 -0
- package/payload/templates/panel/assets/top-bar/user.png +0 -0
- package/payload/templates/panel/assets/top-bar/user.svg +1 -0
- package/payload/templates/panel/assets/warning.png +0 -0
- package/payload/templates/panel/common/bridge.js +1 -0
- package/payload/templates/panel/common/bridge.min.js +0 -0
- package/payload/templates/panel/common/components.js +12 -0
- package/payload/templates/panel/common/full-view.js +107 -0
- package/payload/templates/panel/common/full-view.min.js +1 -0
- package/payload/templates/panel/common/main-view.js +53 -0
- package/payload/templates/panel/common/main-view.min.js +1 -0
- package/payload/templates/panel/common/module-page.js +46 -0
- package/payload/templates/panel/common/module-page.min.js +1 -0
- package/payload/templates/panel/common/right-view.js +77 -0
- package/payload/templates/panel/common/right-view.min.js +1 -0
- package/payload/templates/panel/common/start-page.js +31 -0
- package/payload/templates/panel/common/start-page.min.js +1 -0
- package/payload/templates/panel/common/theme.js +491 -0
- package/payload/templates/panel/common/top-bar-v25-07-29-1.js +330 -0
- package/payload/templates/panel/common/top-bar-v25-07-29-2.js +265 -0
- package/payload/templates/panel/common/top-bar.js +855 -0
- package/payload/templates/panel/common/top-bar.min.js +1 -0
- package/payload/templates/panel/common/ui-standards.css +77 -0
- package/payload/templates/panel/common/ui-standards.js +133 -0
- package/payload/templates/panel/common/ui-standards.min.css +1 -0
- package/payload/templates/panel/common/ui-standards.min.js +1 -0
- package/payload/templates/panel/index.htm +642 -0
- package/payload/templates/panel/managers/database.js +1 -0
- package/payload/templates/panel/managers/database.min.js +1 -0
- package/payload/templates/panel/managers/login.js +2 -0
- package/payload/templates/panel/managers/login.min.js +1 -0
- package/payload/templates/panel/module1/empty-main.htm +26 -0
- package/payload/templates/panel/module10/greenhouse.htm +1361 -0
- package/payload/templates/panel/module11/arduino-projects.htm +1124 -0
- package/payload/templates/panel/module2/empty-full.htm +26 -0
- package/payload/templates/panel/module3/empty-right.htm +26 -0
- package/payload/templates/panel/module4/empty-main-topbar.htm +26 -0
- package/payload/templates/panel/module5/empty-right-topbar.htm +26 -0
- package/payload/templates/panel/module6/energy-hub.htm +1507 -0
- package/payload/templates/panel/module7/3d-printers.htm +1258 -0
- package/payload/templates/panel/module8/cold-rooms.htm +1250 -0
- package/payload/templates/panel/module9/elevator-fleet.htm +1488 -0
- package/payload/templates/panel/pages/_page-template.js +36 -0
- package/payload/templates/panel/pages/_page-template.min.js +1 -0
- package/payload/templates/panel/pages/activity.js +1072 -0
- package/payload/templates/panel/pages/contents.js +1555 -0
- package/payload/templates/panel/pages/contents.min.js +1 -0
- package/payload/templates/panel/pages/customers.js +1171 -0
- package/payload/templates/panel/pages/edit-user.js +381 -0
- package/payload/templates/panel/pages/edit-user.min.js +1 -0
- package/payload/templates/panel/pages/edit-users-table.min.js +1 -0
- package/payload/templates/panel/pages/home.js +637 -0
- package/payload/templates/panel/pages/home.min.js +1 -0
- package/payload/templates/panel/pages/media.js +1538 -0
- package/payload/templates/panel/pages/notifications.js +542 -0
- package/payload/templates/panel/pages/notifications.min.js +1 -0
- package/payload/templates/panel/pages/orders.js +1147 -0
- package/payload/templates/panel/pages/products.js +1281 -0
- package/payload/templates/panel/pages/reports.js +1138 -0
- package/payload/templates/panel/pages/reports.min.js +1 -0
- package/payload/templates/panel/pages/roles.js +1096 -0
- package/payload/templates/panel/pages/settings.js +1462 -0
- package/payload/templates/panel/pages/settings.min.js +1 -0
- package/payload/templates/panel/pages/user-actions.js +456 -0
- package/payload/templates/panel/pages/user-actions.min.js +2 -0
- package/payload/templates/panel/pages/user-list.js +1113 -0
- package/payload/templates/panel/pages/users.js +334 -0
- package/payload/templates/panel/pages/users.min.js +1 -0
- package/payload/templates/shop/TEMPLATE.md +69 -0
- package/payload/templates/shop/app/app.js +727 -0
- package/payload/templates/shop/app/art.js +89 -0
- package/payload/templates/shop/app/settings.js +45 -0
- package/payload/templates/shop/app/store.js +239 -0
- package/payload/templates/shop/app/texts.js +232 -0
- package/payload/templates/shop/assets/app-icon.svg +1 -0
- package/payload/templates/shop/assets/tabs/account.svg +1 -0
- package/payload/templates/shop/assets/tabs/cart.svg +1 -0
- package/payload/templates/shop/assets/tabs/home.svg +1 -0
- package/payload/templates/shop/assets/tabs/shop.svg +1 -0
- package/payload/templates/shop/components/shop-ui.js +343 -0
- package/payload/templates/shop/index.htm +57 -0
- package/payload/templates/shop/pages/account.js +190 -0
- package/payload/templates/shop/pages/cart.js +116 -0
- package/payload/templates/shop/pages/checkout.js +134 -0
- package/payload/templates/shop/pages/favorites.js +37 -0
- package/payload/templates/shop/pages/home.js +86 -0
- package/payload/templates/shop/pages/orders.js +132 -0
- package/payload/templates/shop/pages/product.js +168 -0
- package/payload/templates/shop/pages/shop.js +113 -0
- package/payload/templates/starter/TEMPLATE.md +107 -0
- package/payload/templates/starter/app/app.js +660 -0
- package/payload/templates/starter/app/settings.js +57 -0
- package/payload/templates/starter/assets/app-icon.svg +5 -0
- package/payload/templates/starter/assets/products/brokoli.png +0 -0
- package/payload/templates/starter/assets/products/cilek.png +0 -0
- package/payload/templates/starter/assets/products/domates.png +0 -0
- package/payload/templates/starter/assets/products/elma.png +0 -0
- package/payload/templates/starter/assets/products/havuc.png +0 -0
- package/payload/templates/starter/assets/products/karpuz.png +0 -0
- package/payload/templates/starter/assets/products/limon.png +0 -0
- package/payload/templates/starter/assets/products/muz.png +0 -0
- package/payload/templates/starter/assets/products/nar.png +0 -0
- package/payload/templates/starter/assets/products/patlican.png +0 -0
- package/payload/templates/starter/assets/products/yabanmersini.png +0 -0
- package/payload/templates/starter/assets/products/yesilbiber.png +0 -0
- package/payload/templates/starter/assets/tabs/grid.png +0 -0
- package/payload/templates/starter/assets/tabs/grids.png +0 -0
- package/payload/templates/starter/assets/tabs/home.png +0 -0
- package/payload/templates/starter/assets/tabs/homes.png +0 -0
- package/payload/templates/starter/assets/tabs/settings.png +0 -0
- package/payload/templates/starter/assets/tabs/settingss.png +0 -0
- package/payload/templates/starter/assets/tabs/tasks.png +0 -0
- package/payload/templates/starter/assets/tabs/taskss.png +0 -0
- package/payload/templates/starter/html/about.htm +54 -0
- package/payload/templates/starter/index.htm +57 -0
- package/payload/templates/starter/pages/about.js +23 -0
- package/payload/templates/starter/pages/home.js +81 -0
- package/payload/templates/starter/pages/product.js +45 -0
- package/payload/templates/starter/pages/products.js +61 -0
- package/payload/templates/starter/pages/settings.js +103 -0
- package/payload/templates/starter/pages/tasks.js +187 -0
- package/payload/templates/starter/pages/website.js +29 -0
|
@@ -0,0 +1,896 @@
|
|
|
1
|
+
/* Bismillah */
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
|
|
5
|
+
Smart Button - v26.10
|
|
6
|
+
|
|
7
|
+
THE DEFAULT BUTTON of new pages and projects (the user, 2026-10-30). It was ButtonWithIcon
|
|
8
|
+
(comp/button-with-icon.js) until 2026-10-30: renamed and moved to comp-m4.
|
|
9
|
+
|
|
10
|
+
- A button with an icon and a text (or only one of them); the icon on the left or on top (iconPosition).
|
|
11
|
+
- STYLE PACKAGES (SmartButton.styles; sample _basic/examples/smart-button-3-ozden.htm; the draft
|
|
12
|
+
_designs/smart-button.htm): "ozdenType1" (THE DEFAULT: SmartButtonDefaults.style): #E3E3E3, a thin dark edge and
|
|
13
|
+
a darker line at the bottom; "ozdenType2": no bottom line; "ozdenType3": a faint edge; "ozdenType4": a ghost (no
|
|
14
|
+
surface, no edge, only its hover is gray); "classic": the look of before 2026-10-30 (a white button, a bold 16 px
|
|
15
|
+
text). A page gives its own color in style.box / hover / active.
|
|
16
|
+
DARK (2026-10-31, the draft _designs/smart-button-dark.htm): "ozdenType1Dark" ... "ozdenType4Dark": the same shapes
|
|
17
|
+
for a dark page (#2E2E2C, a light edge, a white text and icon, the dark waiting clock, yellow dots).
|
|
18
|
+
SITUATIONS (2026-10-31, the draft _designs/smart-button-colors.htm): ozdenType1 in the color of a situation:
|
|
19
|
+
"primary" #5BBAC1, "danger" #E8796D (a white text), "warning" #F1C74A, "success" #7BC362, "info" #52A8D0. The Dialog
|
|
20
|
+
uses them for its button types.
|
|
21
|
+
PILL AND OUTLINED (2026-11-02, the user; sample _basic/examples/smart-button.htm): 52 px high with a 30 px icon.
|
|
22
|
+
"pill": round, no edge, a bold text on a soft tint; "pillSolid": the full color with a white text; "outlined": a
|
|
23
|
+
colored edge with a thicker line at the bottom. Without a tone they are gray.
|
|
24
|
+
- TONE (2026-11-02, the user): the shape comes from styleName, the color from tone: styleName: "outlined", tone: "blue".
|
|
25
|
+
Any shape works with any name of SmartButton.TONES: gray, blue, green, purple, orange, red, yellow, teal, sky, navy,
|
|
26
|
+
pink, primary, danger, warning, success, info. A new color is one new row there. The order: style > tone > package.
|
|
27
|
+
ozdenType4 stays a ghost: its text and its hover take the color. setTone(name, styleName): after create (the look of
|
|
28
|
+
the package again, then the tone; style given with params goes).
|
|
29
|
+
- KEYBOARD AND ACCESSIBILITY: role "button", Tab reaches it, Enter / Space press it (Space when it goes up), a focus
|
|
30
|
+
ring only for the keyboard; ariaLabel for a button with only an icon (else labelText is read).
|
|
31
|
+
- setEnabled(0): no click, no hover, out of the Tab order (aria-disabled): a flat light gray button, a faint edge, no
|
|
32
|
+
bottom line, the text and the icon faint gray (the same for every color; chosen on
|
|
33
|
+
experimental/smart-button-bench.htm).
|
|
34
|
+
- ASK (two clicks): ask: "Click again to delete." -> the first click turns the button red (style.ask.button) and
|
|
35
|
+
shows the text in a bubble over it (comp/tooltip.js, Tooltip.show(): it stays inside the screen; without
|
|
36
|
+
tooltip.js only the red button); the second click runs onClick. It forgets after style.ask.time. One button asks
|
|
37
|
+
at a time. setAsk(text), cancelAsk(), isAsking. onBeforeClick(self) returns false: no ask and no onClick (Ex: a
|
|
38
|
+
form with an error must not ask "Sure?" first). press(): a press like a click (the ask too), Ex: Enter in a field.
|
|
39
|
+
- WAITING: setWaiting(1) while a job runs (a download, a save): the text and the icon fade and a small animation is
|
|
40
|
+
in the middle; the button can not be clicked. waitingType: "clock" (the default: the clock of the waiting views
|
|
41
|
+
with moving hands; waitingClock "ozden" or "ozdenDark") or "dots" (three dots one after the other).
|
|
42
|
+
setWaiting(0) ends it (after delay ms, if given). Nothing turns with prefers-reduced-motion.
|
|
43
|
+
(comp/loading-screen.js draws its clock and its dots with SmartButton.createClockSvg / createDots)
|
|
44
|
+
- MOTION: animated: 1 (default): pressed 0.94 and a little darker. ripple: 1 (default): a wave from the pressed
|
|
45
|
+
point (from the middle for the keyboard); its color fits the button. setAnimated(0/1), setRipple(0/1).
|
|
46
|
+
- setStyle(style): changes the look after create with only the keys it gets.
|
|
47
|
+
|
|
48
|
+
USAGE:
|
|
49
|
+
SmartButton({ labelText: "Send", iconFile: "_basic/assets/icons/send.png", onClick: function (self) { } });
|
|
50
|
+
const btnDownload = SmartButton({ labelText: "Download", onClick: function (self) {
|
|
51
|
+
self.setWaiting(1);
|
|
52
|
+
download().then(function () { self.setWaiting(0); });
|
|
53
|
+
} });
|
|
54
|
+
SmartButton({ styleName: "ozdenType4", labelText: "Delete", ask: "Click again to delete.", onClick: deleteFile });
|
|
55
|
+
SmartButton({ styleName: "pill", tone: "green", labelText: "Accepted", iconFile: "check.svg" });
|
|
56
|
+
button.setTone("blue", "pillSolid"); // another color and shape after create
|
|
57
|
+
btnSave.setStyle({ box: { color: "#9DC7B5" }, hover: { color: "#91BCA9" }, active: { color: "#91BCA9" } });
|
|
58
|
+
|
|
59
|
+
Started Date: January 2026
|
|
60
|
+
Developer: Bugra Ozden
|
|
61
|
+
Email: bugra.ozden@gmail.com
|
|
62
|
+
Webpage: https://bug7a.github.io/js-components/
|
|
63
|
+
|
|
64
|
+
*/
|
|
65
|
+
|
|
66
|
+
"use strict";
|
|
67
|
+
|
|
68
|
+
// Default values:
|
|
69
|
+
const SmartButtonDefaults = {
|
|
70
|
+
key: "0",
|
|
71
|
+
styleName: "ozdenType1", // SmartButton.styles: "ozdenType1" (the default), "ozdenType2", "ozdenType3", "ozdenType4", "classic", "pill", "pillSolid", "outlined"...
|
|
72
|
+
tone: "", // the color: a name of SmartButton.TONES (Ex: "blue", "primary"). "": the colors of the package. setTone()
|
|
73
|
+
width: "auto",
|
|
74
|
+
height: "auto",
|
|
75
|
+
labelText: "Button",
|
|
76
|
+
iconFile: "", // "": no icon (Ex: "_basic/comp/smart-button/alert-black.png")
|
|
77
|
+
iconPosition: "left", // "left", "top"
|
|
78
|
+
enabled: 1, // 0: gray, can not be pressed (set later with setEnabled)
|
|
79
|
+
ariaLabel: "", // "": labelText is read. A button with only an icon needs it (Ex: "Delete")
|
|
80
|
+
waiting: 0, // 1: it waits (set later with setWaiting)
|
|
81
|
+
waitingType: "clock", // "clock" (the default wait) or "dots"
|
|
82
|
+
waitingClock: "ozden", // the look of the clock: "ozden" (a white face, dark lines) or "ozdenDark" (SmartButton.clocks)
|
|
83
|
+
animated: 1, // 1: the press effect (smaller and darker while pressed). setAnimated()
|
|
84
|
+
ripple: 1, // 1: a wave from the pressed point (it works with animated: 0 too). setRipple()
|
|
85
|
+
ask: "", // "Click again to delete.": two clicks (the first one asks with a red button and this text in a bubble). setAsk()
|
|
86
|
+
onBeforeClick: null, // function (self): false stops the press, with no ask either
|
|
87
|
+
onClick: function (self) { }, // Not called while waiting
|
|
88
|
+
onWaitingEnd: function (self) { }, // The wait ended (setWaiting(0))
|
|
89
|
+
style: { // ozdenType1 (the default package)
|
|
90
|
+
layout: {
|
|
91
|
+
gap: 8,
|
|
92
|
+
padding: [16, 0],
|
|
93
|
+
align: "center center",
|
|
94
|
+
// px less space on the side of the icon (an icon left of a text): the empty edge in an icon file and its
|
|
95
|
+
// thin lines made that side look wider (measured 1 - 3 px; the user, 2026-10-30). 0: the same on both sides
|
|
96
|
+
iconSideTrim: 2,
|
|
97
|
+
},
|
|
98
|
+
icon: {
|
|
99
|
+
width: 24,
|
|
100
|
+
height: 24,
|
|
101
|
+
opacity: 0.8,
|
|
102
|
+
filter: "none", // a CSS filter: the dark packages turn the icon white ("brightness(0) invert(1)")
|
|
103
|
+
},
|
|
104
|
+
label: {
|
|
105
|
+
fontSize: 20,
|
|
106
|
+
textColor: Black(0.7),
|
|
107
|
+
fontFamily: "opensans",
|
|
108
|
+
},
|
|
109
|
+
box: {
|
|
110
|
+
color: "#E3E3E3",
|
|
111
|
+
border: 1,
|
|
112
|
+
borderColor: Black(0.35),
|
|
113
|
+
round: 4,
|
|
114
|
+
boxShadow: "inset 0 -2px 0 rgba(0, 0, 0, 0.25)",
|
|
115
|
+
},
|
|
116
|
+
hover: {
|
|
117
|
+
color: "#D9D9D9",
|
|
118
|
+
},
|
|
119
|
+
active: {
|
|
120
|
+
color: "#D9D9D9",
|
|
121
|
+
},
|
|
122
|
+
// ask: the red look of the button while it asks, and the bubble over it (Tooltip.BUBBLE_LOOK keys)
|
|
123
|
+
ask: {
|
|
124
|
+
button: {
|
|
125
|
+
color: "#E8796D", // also under the mouse and pressed
|
|
126
|
+
border: 1,
|
|
127
|
+
borderColor: "#E8796D",
|
|
128
|
+
boxShadow: "none",
|
|
129
|
+
textColor: "white",
|
|
130
|
+
iconFilter: "brightness(0) invert(1)", // the icon turns white, whatever color its file has
|
|
131
|
+
},
|
|
132
|
+
bubble: { color: "#E8796D", textColor: "white", fontSize: 13, bold: 1, round: 8, padding: [12, 7], border: 0, borderColor: "", shadow: "0 6px 16px rgba(0, 0, 0, 0.18)", arrow: 12, gap: 6, edge: 8, grow: 1 },
|
|
133
|
+
time: 5000, // ms: it forgets the question
|
|
134
|
+
},
|
|
135
|
+
focus: {
|
|
136
|
+
ringColor: "rgba(95, 158, 160, 0.6)", // the ring of the keyboard focus
|
|
137
|
+
},
|
|
138
|
+
disabled: {
|
|
139
|
+
color: "#EBEBEA",
|
|
140
|
+
borderColor: "rgba(0, 0, 0, 0.1)",
|
|
141
|
+
textColor: "rgba(0, 0, 0, 0.3)",
|
|
142
|
+
iconOpacity: 0.25, // (and no color)
|
|
143
|
+
},
|
|
144
|
+
press: {
|
|
145
|
+
scale: 0.94, // while pressed
|
|
146
|
+
removeShadow: 0, // 1: while pressed the box shadow (Ex: the inset bottom line) goes away, as if pushed in
|
|
147
|
+
brightness: 0.92, // while pressed
|
|
148
|
+
time: 0.15, // s
|
|
149
|
+
},
|
|
150
|
+
ripple: {
|
|
151
|
+
color: "", // "": light on a dark button, dark on a light one
|
|
152
|
+
lightColor: White(0.45),
|
|
153
|
+
darkColor: Black(0.12),
|
|
154
|
+
time: 0.6, // s
|
|
155
|
+
},
|
|
156
|
+
waiting: {
|
|
157
|
+
contentOpacity: 0.18, // the text and the icon while waiting
|
|
158
|
+
clockSize: 30, // at most; a small button gets a smaller clock
|
|
159
|
+
space: 14, // the room around the clock in a small button
|
|
160
|
+
dots: { size: 6, gap: 4, color: "indianred" },
|
|
161
|
+
},
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
const SmartButton = function (params = {}) {
|
|
166
|
+
|
|
167
|
+
// Merge params:
|
|
168
|
+
SmartButton.applyTone(params);
|
|
169
|
+
basic.applyStylePackage(params, SmartButton.styles, SmartButtonDefaults);
|
|
170
|
+
mergeIntoIfMissing(params, SmartButtonDefaults);
|
|
171
|
+
|
|
172
|
+
// BOX: Component container
|
|
173
|
+
const box = startObject(params);
|
|
174
|
+
|
|
175
|
+
// *** PRIVATE VARIABLES:
|
|
176
|
+
const WAITING_MOTION = "opacity 0.2s"; // the content fades while waiting
|
|
177
|
+
const STILL_MOTION = "background-color 0.2s"; // the colors of hover / pressed (animated: 0 too)
|
|
178
|
+
let cancelWaitingEnd = null;
|
|
179
|
+
let cancelAskTimer = null;
|
|
180
|
+
let askBubble = null;
|
|
181
|
+
let isHover = 0;
|
|
182
|
+
let isPressed = 0;
|
|
183
|
+
let isSpaceDown = 0; // Space went down on this button (it presses when it goes up, like a real button)
|
|
184
|
+
let wasAnimated = 0; // the press look was written (setAnimated(0) writes the still look back)
|
|
185
|
+
|
|
186
|
+
// *** PRIVATE FUNCTIONS:
|
|
187
|
+
|
|
188
|
+
const canPress = function () {
|
|
189
|
+
return box.enabled == 1 && box.waiting != 1;
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
const isReducedMotion = function () {
|
|
193
|
+
return window.matchMedia && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
const isMotionOn = function () {
|
|
197
|
+
return box.animated == 1 && !isReducedMotion();
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
// THE LOOK OF THE STATE: disabled > asking > pressed > under the mouse > normal
|
|
201
|
+
const getBoxColor = function () {
|
|
202
|
+
const _s = box.style;
|
|
203
|
+
if (box.enabled != 1) return _s.disabled.color;
|
|
204
|
+
if (box.isAsking == 1) return _s.ask.button.color;
|
|
205
|
+
// WHY not while waiting: the button stays in its own color under the animation
|
|
206
|
+
if (box.waiting == 1) return _s.box.color;
|
|
207
|
+
if (isPressed) return _s.active.color;
|
|
208
|
+
if (isHover) return _s.hover.color;
|
|
209
|
+
return _s.box.color;
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
const getBorderColor = function () {
|
|
213
|
+
if (box.enabled != 1) return box.style.disabled.borderColor;
|
|
214
|
+
if (box.isAsking == 1) return box.style.ask.button.borderColor;
|
|
215
|
+
return box.style.box.borderColor;
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
// WHY none when disabled: a flat button is not one that can be pressed in
|
|
219
|
+
const getBoxShadow = function () {
|
|
220
|
+
if (box.enabled != 1) return "none";
|
|
221
|
+
if (box.isAsking == 1) return box.style.ask.button.boxShadow;
|
|
222
|
+
if (isPressed && canPress() && box.style.press.removeShadow == 1) return "none";
|
|
223
|
+
return box.style.box.boxShadow || "";
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
const getTextColor = function () {
|
|
227
|
+
if (box.enabled != 1) return box.style.disabled.textColor;
|
|
228
|
+
if (box.isAsking == 1) return box.style.ask.button.textColor;
|
|
229
|
+
return box.style.label.textColor;
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
const getIconOpacity = function () {
|
|
233
|
+
if (box.enabled != 1) return box.style.disabled.iconOpacity;
|
|
234
|
+
return (box.style.icon.opacity === undefined) ? 1 : box.style.icon.opacity;
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
// The press: smaller and darker while pressed (only with animated: 1)
|
|
238
|
+
const getPressCss = function () {
|
|
239
|
+
const isPressedNow = isPressed && canPress() && isMotionOn();
|
|
240
|
+
return {
|
|
241
|
+
transform: isPressedNow ? "scale(" + box.style.press.scale + ")" : "none",
|
|
242
|
+
filter: isPressedNow ? "brightness(" + box.style.press.brightness + ")" : "none",
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
const getIconFilter = function () {
|
|
247
|
+
if (box.isAsking == 1 && box.enabled == 1) return box.style.ask.button.iconFilter;
|
|
248
|
+
return box.style.icon.filter || "none";
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
// Everything that changes with the state: the box, the content, the press, the keyboard and the screen reader
|
|
252
|
+
const render = function () {
|
|
253
|
+
const isEnabled = (box.enabled == 1);
|
|
254
|
+
box.color = getBoxColor();
|
|
255
|
+
box.border = (box.isAsking == 1) ? box.style.ask.button.border : box.style.box.border;
|
|
256
|
+
box.borderColor = getBorderColor();
|
|
257
|
+
box.css = Object.assign({ boxShadow: getBoxShadow() }, getPressCss());
|
|
258
|
+
if (box.label) box.label.textColor = getTextColor();
|
|
259
|
+
if (box.icon) {
|
|
260
|
+
box.icon.opacity = getIconOpacity();
|
|
261
|
+
box.icon.css = { filter: getIconFilter() };
|
|
262
|
+
}
|
|
263
|
+
box.layout.css = { filter: isEnabled ? "none" : "grayscale(1)" };
|
|
264
|
+
box.layout.opacity = (box.waiting == 1) ? box.style.waiting.contentOpacity : 1;
|
|
265
|
+
box.cursor = isEnabled ? "pointer" : "default";
|
|
266
|
+
box.tabIndex = isEnabled ? 0 : -1;
|
|
267
|
+
box.aria = { disabled: !isEnabled, label: box.ariaLabel || box.labelText || "" };
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
const press = function (event) {
|
|
271
|
+
if (!canPress()) return;
|
|
272
|
+
if (typeof box.onBeforeClick === "function" && box.onBeforeClick(box) === false) return;
|
|
273
|
+
if (box.ask && box.isAsking != 1) {
|
|
274
|
+
startAsk();
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
box.cancelAsk();
|
|
278
|
+
if (box.onClick) box.onClick(box, event);
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
// *** ASK (two clicks): the red look (render) and the bubble (Tooltip.show)
|
|
282
|
+
|
|
283
|
+
const startAsk = function () {
|
|
284
|
+
// WHY one at a time: the bubble of another button would stay over this one
|
|
285
|
+
const other = SmartButton.askingButton;
|
|
286
|
+
if (other && other !== box) other.cancelAsk();
|
|
287
|
+
SmartButton.askingButton = box;
|
|
288
|
+
box.isAsking = 1;
|
|
289
|
+
render();
|
|
290
|
+
if (typeof Tooltip !== "undefined") askBubble = Tooltip.show(box, box.ask, box.style.ask.bubble);
|
|
291
|
+
cancelAskTimer = box.after(box.style.ask.time, box.cancelAsk);
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
// *** THE RIPPLE (a wave from the pressed point)
|
|
295
|
+
|
|
296
|
+
const getRippleColor = function () {
|
|
297
|
+
const _r = box.style.ripple;
|
|
298
|
+
if (_r.color) return _r.color;
|
|
299
|
+
return SmartButton.isDarkColor(getComputedStyle(box.elem).backgroundColor) ? _r.lightColor : _r.darkColor;
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
// The pressed point in the button (px), also when the page is zoomed (page.fit) or the button is pressed (scale)
|
|
303
|
+
const getLocalPoint = function (event) {
|
|
304
|
+
const elem = box.elem;
|
|
305
|
+
if (!event || event.clientX === undefined) return { x: elem.clientWidth / 2, y: elem.clientHeight / 2 };
|
|
306
|
+
const rect = elem.getBoundingClientRect();
|
|
307
|
+
const scaleX = rect.width ? elem.offsetWidth / rect.width : 1;
|
|
308
|
+
const scaleY = rect.height ? elem.offsetHeight / rect.height : 1;
|
|
309
|
+
return { x: (event.clientX - rect.left) * scaleX - elem.clientLeft, y: (event.clientY - rect.top) * scaleY - elem.clientTop };
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
// A layer for a moment over the content; the mouse goes through it
|
|
313
|
+
const showRipple = function (event) {
|
|
314
|
+
if (box.ripple != 1 || !canPress() || isReducedMotion()) return;
|
|
315
|
+
const elem = box.elem;
|
|
316
|
+
const point = getLocalPoint(event);
|
|
317
|
+
// WHY: the radius reaches the farthest corner, so the wave covers the whole button
|
|
318
|
+
const radius = Math.hypot(Math.max(point.x, elem.clientWidth - point.x), Math.max(point.y, elem.clientHeight - point.y));
|
|
319
|
+
const layer = document.createElement("span");
|
|
320
|
+
layer.style.cssText = "position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; border-radius: inherit; pointer-events: none;";
|
|
321
|
+
const dot = document.createElement("span");
|
|
322
|
+
dot.style.cssText = "position: absolute; border-radius: 50%; pointer-events: none; background: " + getRippleColor() + ";" +
|
|
323
|
+
" left: " + (point.x - radius) + "px; top: " + (point.y - radius) + "px; width: " + (radius * 2) + "px; height: " + (radius * 2) + "px;";
|
|
324
|
+
layer.appendChild(dot);
|
|
325
|
+
elem.insertBefore(layer, box.waitingCover.elem); // WHY: under the waiting cover (onClick often starts it)
|
|
326
|
+
const wave = dot.animate([
|
|
327
|
+
{ transform: "scale(0)", opacity: 1 },
|
|
328
|
+
{ transform: "scale(1)", opacity: 0.7, offset: 0.6 },
|
|
329
|
+
{ transform: "scale(1)", opacity: 0 },
|
|
330
|
+
], { duration: box.style.ripple.time * 1000, easing: "cubic-bezier(0.2, 0.6, 0.35, 1)" });
|
|
331
|
+
wave.onfinish = function () { layer.remove(); };
|
|
332
|
+
};
|
|
333
|
+
|
|
334
|
+
// *** WAITING
|
|
335
|
+
|
|
336
|
+
// The press transitions, or the still look back (only when it was animated before)
|
|
337
|
+
const applyAnimated = function () {
|
|
338
|
+
if (!isMotionOn()) {
|
|
339
|
+
if (!wasAnimated) return;
|
|
340
|
+
wasAnimated = 0;
|
|
341
|
+
render();
|
|
342
|
+
box.setMotionNow(STILL_MOTION);
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
wasAnimated = 1;
|
|
346
|
+
const time = box.style.press.time + "s";
|
|
347
|
+
// WHY not setMotion(): it starts after a timer, and the press must answer the first click
|
|
348
|
+
box.setMotionNow("transform " + time + ", filter " + time + ", box-shadow " + time + ", " + STILL_MOTION);
|
|
349
|
+
render();
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
// The clock fits the button: at most its size, smaller in a small button (the dots keep their size)
|
|
353
|
+
const fitWaitingIcon = function () {
|
|
354
|
+
const icon = box.waitingCover.icon;
|
|
355
|
+
if (box.waitingType == "clock") {
|
|
356
|
+
const _w = box.style.waiting;
|
|
357
|
+
const size = Math.max(0, Math.min(_w.clockSize, Math.min(box.width, box.height) - _w.space));
|
|
358
|
+
icon.setSize(size, size);
|
|
359
|
+
}
|
|
360
|
+
icon.center();
|
|
361
|
+
};
|
|
362
|
+
|
|
363
|
+
const endWaiting = function () {
|
|
364
|
+
box.waiting = 0;
|
|
365
|
+
box.aria = { busy: false };
|
|
366
|
+
box.waitingCover.visible = 0;
|
|
367
|
+
render();
|
|
368
|
+
box.onWaitingEnd(box);
|
|
369
|
+
};
|
|
370
|
+
|
|
371
|
+
// *** PUBLIC FUNCTIONS:
|
|
372
|
+
|
|
373
|
+
box.isAsking = 0; // 1: the first click of ask was made, the button is red
|
|
374
|
+
|
|
375
|
+
box.setText = function (text) {
|
|
376
|
+
box.labelText = text;
|
|
377
|
+
if (box.label) box.label.text = text;
|
|
378
|
+
render(); // (the label read by a screen reader)
|
|
379
|
+
};
|
|
380
|
+
// USAGE: button.setText("Save")
|
|
381
|
+
|
|
382
|
+
box.setIcon = function (file) {
|
|
383
|
+
box.iconFile = file;
|
|
384
|
+
if (box.icon) box.icon.load(file);
|
|
385
|
+
};
|
|
386
|
+
// USAGE: button.setIcon("_basic/comp/smart-button/alert-black.png")
|
|
387
|
+
|
|
388
|
+
box.setAnimated = function (value) {
|
|
389
|
+
box.animated = basic.isOn(value) ? 1 : 0;
|
|
390
|
+
applyAnimated();
|
|
391
|
+
};
|
|
392
|
+
// USAGE: get: button.animated, set: button.setAnimated(0)
|
|
393
|
+
|
|
394
|
+
box.setRipple = function (value) {
|
|
395
|
+
box.ripple = basic.isOn(value) ? 1 : 0;
|
|
396
|
+
};
|
|
397
|
+
// USAGE: get: button.ripple, set: button.setRipple(1)
|
|
398
|
+
|
|
399
|
+
box.setEnabled = function (value) {
|
|
400
|
+
box.enabled = basic.isOn(value) ? 1 : 0;
|
|
401
|
+
if (box.enabled != 1) {
|
|
402
|
+
box.cancelAsk();
|
|
403
|
+
isHover = 0;
|
|
404
|
+
isPressed = 0;
|
|
405
|
+
isSpaceDown = 0;
|
|
406
|
+
} else {
|
|
407
|
+
isHover = box.elem.matches(":hover") ? 1 : 0; // WHY: the mouse may have stayed on it while it was off
|
|
408
|
+
}
|
|
409
|
+
render();
|
|
410
|
+
};
|
|
411
|
+
// USAGE: get: button.enabled, set: button.setEnabled(0)
|
|
412
|
+
|
|
413
|
+
// Back to its own look, without onClick (the ask is forgotten)
|
|
414
|
+
box.cancelAsk = function () {
|
|
415
|
+
if (box.isAsking != 1) return;
|
|
416
|
+
box.isAsking = 0;
|
|
417
|
+
if (cancelAskTimer) cancelAskTimer();
|
|
418
|
+
cancelAskTimer = null;
|
|
419
|
+
if (askBubble) askBubble.remove();
|
|
420
|
+
askBubble = null;
|
|
421
|
+
if (SmartButton.askingButton === box) SmartButton.askingButton = null;
|
|
422
|
+
render();
|
|
423
|
+
};
|
|
424
|
+
// USAGE: button.cancelAsk()
|
|
425
|
+
|
|
426
|
+
box.setAsk = function (text) {
|
|
427
|
+
box.ask = text || "";
|
|
428
|
+
if (!box.ask) box.cancelAsk();
|
|
429
|
+
};
|
|
430
|
+
// USAGE: button.setAsk("Click again to delete."), button.setAsk("") (one click)
|
|
431
|
+
|
|
432
|
+
// A press like a click: onBeforeClick, the ask, onClick (Ex: Enter in a field of a dialog)
|
|
433
|
+
box.press = function () {
|
|
434
|
+
press(null);
|
|
435
|
+
};
|
|
436
|
+
// USAGE: button.press()
|
|
437
|
+
|
|
438
|
+
// WHY its own remove: the bubble is on the page and SmartButton.askingButton is static
|
|
439
|
+
const superRemove = box.remove;
|
|
440
|
+
box.superRemove = superRemove;
|
|
441
|
+
box.remove = function () {
|
|
442
|
+
box.cancelAsk();
|
|
443
|
+
superRemove.call(box);
|
|
444
|
+
};
|
|
445
|
+
|
|
446
|
+
// Only the given keys change; the other keys of the style stay.
|
|
447
|
+
// WHY a new object for each part: the old one can be shared with other buttons (the same style object of a page)
|
|
448
|
+
box.setStyle = function (style) {
|
|
449
|
+
Object.keys(style || {}).forEach(function (part) {
|
|
450
|
+
box.style[part] = Object.assign({}, box.style[part], style[part]);
|
|
451
|
+
});
|
|
452
|
+
applyStyle();
|
|
453
|
+
};
|
|
454
|
+
// USAGE: button.setStyle({ box: { color: "tomato", borderColor: "red" }, hover: { color: "tomato" } })
|
|
455
|
+
|
|
456
|
+
box.setTone = function (toneName, styleName) {
|
|
457
|
+
box.styleName = styleName || box.styleName;
|
|
458
|
+
box.setStyle(SmartButton.getPackageStyle(box.styleName));
|
|
459
|
+
box.tone = toneName;
|
|
460
|
+
if (toneName) box.setStyle(SmartButton.getToneStyle(toneName, box.styleName));
|
|
461
|
+
};
|
|
462
|
+
// USAGE: button.setTone("blue"), button.setTone("blue", "pillSolid"), button.setTone("", "pill") (only the package)
|
|
463
|
+
|
|
464
|
+
// The style on the objects (box, layout, icon, label, focus ring); render() gives the colors of the state.
|
|
465
|
+
// The side of the icon a little narrower (style.layout.iconSideTrim), only for an icon left of a text
|
|
466
|
+
const paintIconSide = function () {
|
|
467
|
+
const _l = box.style.layout;
|
|
468
|
+
const isIconLeft = box.icon && box.label && box.iconPosition !== "top";
|
|
469
|
+
const padding = Array.isArray(_l.padding) ? _l.padding[0] : _l.padding;
|
|
470
|
+
const trim = isIconLeft ? (Number(_l.iconSideTrim) || 0) : 0;
|
|
471
|
+
box.layout.css = { paddingLeft: Math.max(0, padding - trim) + "px" };
|
|
472
|
+
};
|
|
473
|
+
|
|
474
|
+
const applyStyle = function () {
|
|
475
|
+
const _s = box.style;
|
|
476
|
+
box.props(_s.box);
|
|
477
|
+
box.layout.props(_s.layout);
|
|
478
|
+
paintIconSide();
|
|
479
|
+
if (box.icon) box.icon.props(_s.icon);
|
|
480
|
+
if (box.label) box.label.props(_s.label);
|
|
481
|
+
box.setFocusRing(_s.focus.ringColor);
|
|
482
|
+
render();
|
|
483
|
+
};
|
|
484
|
+
|
|
485
|
+
// delay: ms before the wait ends (only for 0)
|
|
486
|
+
box.setWaiting = function (value, delay = 0) {
|
|
487
|
+
const isWaiting = basic.isOn(value) ? 1 : 0;
|
|
488
|
+
if (cancelWaitingEnd) cancelWaitingEnd();
|
|
489
|
+
cancelWaitingEnd = null;
|
|
490
|
+
if (isWaiting) {
|
|
491
|
+
box.cancelAsk();
|
|
492
|
+
box.waiting = 1;
|
|
493
|
+
box.aria = { busy: true };
|
|
494
|
+
box.waitingCover.visible = 1;
|
|
495
|
+
fitWaitingIcon();
|
|
496
|
+
render();
|
|
497
|
+
return;
|
|
498
|
+
}
|
|
499
|
+
if (box.waiting != 1) return;
|
|
500
|
+
if (delay <= 0) {
|
|
501
|
+
endWaiting();
|
|
502
|
+
return;
|
|
503
|
+
}
|
|
504
|
+
cancelWaitingEnd = box.after(delay, function () {
|
|
505
|
+
cancelWaitingEnd = null;
|
|
506
|
+
endWaiting();
|
|
507
|
+
});
|
|
508
|
+
};
|
|
509
|
+
// USAGE: get: button.waiting, set: button.setWaiting(1) / button.setWaiting(0, 1000)
|
|
510
|
+
|
|
511
|
+
// *** OBJECT VIEW:
|
|
512
|
+
|
|
513
|
+
// BOX: Container look
|
|
514
|
+
box.props(box.style.box);
|
|
515
|
+
box.clickable = 1;
|
|
516
|
+
box.role = "button";
|
|
517
|
+
box.setFocusRing(box.style.focus.ringColor);
|
|
518
|
+
// (the transitions: applyAnimated(); WHY not setMotion() here: its timer came after them and wrote over them)
|
|
519
|
+
box.setMotionNow(STILL_MOTION);
|
|
520
|
+
|
|
521
|
+
// GROUP: Layout (icon, label). iconPosition "top" puts the icon above the label.
|
|
522
|
+
// WHY "100%" for a fixed size: the group fills the inside of the border; with the size of the box itself it was
|
|
523
|
+
// as big as the border box and its content sat 1 px too low (a border of 1 px)
|
|
524
|
+
box.layout = AutoLayout({
|
|
525
|
+
flow: (box.iconPosition === "top") ? "vertical" : "horizontal",
|
|
526
|
+
width: (params.width === "auto") ? "auto" : "100%",
|
|
527
|
+
height: (params.height === "auto") ? "auto" : "100%",
|
|
528
|
+
position: "relative", // WHY: The box (width / height "auto") grows with it.
|
|
529
|
+
...box.style.layout,
|
|
530
|
+
});
|
|
531
|
+
|
|
532
|
+
// ICON: only when there is an icon file
|
|
533
|
+
if (box.iconFile) {
|
|
534
|
+
box.icon = Icon(0, 0, box.style.icon);
|
|
535
|
+
box.icon.load(box.iconFile);
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
// LABEL: only when there is a text
|
|
539
|
+
if (box.labelText) {
|
|
540
|
+
box.label = Label(0, 0, box.style.label);
|
|
541
|
+
box.label.text = box.labelText;
|
|
542
|
+
box.label.css.whiteSpace = "nowrap";
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
endAutoLayout();
|
|
546
|
+
box.layout.setMotionNow(WAITING_MOTION);
|
|
547
|
+
paintIconSide();
|
|
548
|
+
|
|
549
|
+
// BOX: Waiting cover (clear: the content fades under it; it holds the animation and takes the mouse)
|
|
550
|
+
box.waitingCover = startBox(0, 0, "100%", "100%", {
|
|
551
|
+
color: "transparent",
|
|
552
|
+
clickable: 1, // WHY: the button under it gets no hover look while waiting
|
|
553
|
+
cursor: "progress",
|
|
554
|
+
});
|
|
555
|
+
if (box.waitingType == "dots") {
|
|
556
|
+
box.waitingCover.icon = SmartButton.createDots(box.style.waiting.dots);
|
|
557
|
+
} else {
|
|
558
|
+
const clock = Box(0, 0, 0, 0, { color: "transparent" });
|
|
559
|
+
clock.elem.innerHTML = SmartButton.createClockSvg(SmartButton.clocks[box.waitingClock] || SmartButton.clocks.ozden);
|
|
560
|
+
box.waitingCover.icon = clock;
|
|
561
|
+
}
|
|
562
|
+
endBox();
|
|
563
|
+
box.waitingCover.visible = 0;
|
|
564
|
+
|
|
565
|
+
// *** OBJECT INIT CODE:
|
|
566
|
+
|
|
567
|
+
box.on("click", function (self, event) {
|
|
568
|
+
press(event);
|
|
569
|
+
});
|
|
570
|
+
|
|
571
|
+
// KEYBOARD: Enter / Space press it (Space: when the key goes up, like a real button)
|
|
572
|
+
box.on("keydown", function (self, event) {
|
|
573
|
+
if (event.key == "Enter") {
|
|
574
|
+
event.preventDefault();
|
|
575
|
+
if (event.repeat) return; // WHY: a held Enter must not pass an ask (two clicks)
|
|
576
|
+
showRipple(null);
|
|
577
|
+
press(event);
|
|
578
|
+
}
|
|
579
|
+
if (event.key == " ") {
|
|
580
|
+
event.preventDefault(); // WHY: no page scroll
|
|
581
|
+
isSpaceDown = 1;
|
|
582
|
+
}
|
|
583
|
+
});
|
|
584
|
+
box.on("keyup", function (self, event) {
|
|
585
|
+
if (event.key != " " || !isSpaceDown) return;
|
|
586
|
+
isSpaceDown = 0;
|
|
587
|
+
showRipple(null);
|
|
588
|
+
press(event);
|
|
589
|
+
});
|
|
590
|
+
box.on("blur", function () {
|
|
591
|
+
isSpaceDown = 0;
|
|
592
|
+
});
|
|
593
|
+
|
|
594
|
+
box.onResize(function () {
|
|
595
|
+
if (box.waiting == 1) fitWaitingIcon();
|
|
596
|
+
});
|
|
597
|
+
|
|
598
|
+
// THE MOUSE: hover, pressed, back to normal (render)
|
|
599
|
+
box.onHoverChange(function (self, isOver) {
|
|
600
|
+
isHover = isOver;
|
|
601
|
+
if (!isOver) isPressed = 0;
|
|
602
|
+
render();
|
|
603
|
+
});
|
|
604
|
+
box.on("mousedown", function (self, event) {
|
|
605
|
+
if (!canPress() || event.button !== 0) return; // WHY: a right click gives no click
|
|
606
|
+
isPressed = 1;
|
|
607
|
+
render();
|
|
608
|
+
showRipple(event);
|
|
609
|
+
});
|
|
610
|
+
box.on("mouseup", function () {
|
|
611
|
+
isPressed = 0;
|
|
612
|
+
render();
|
|
613
|
+
});
|
|
614
|
+
|
|
615
|
+
applyAnimated();
|
|
616
|
+
render();
|
|
617
|
+
|
|
618
|
+
if (box.waiting == 1) {
|
|
619
|
+
box.waiting = 0;
|
|
620
|
+
box.setWaiting(1);
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
return endObject(box);
|
|
624
|
+
|
|
625
|
+
};
|
|
626
|
+
|
|
627
|
+
// *** STATIC FUNCTIONS:
|
|
628
|
+
|
|
629
|
+
SmartButton.askingButton = null; // the button that asks now (ask: one at a time)
|
|
630
|
+
|
|
631
|
+
// 1: a dark color (the ripple is light on it). A color of the browser: "rgb(r, g, b)" or "rgba(r, g, b, a)".
|
|
632
|
+
// A transparent color is not dark (the page under it shows).
|
|
633
|
+
SmartButton.DARK_LIMIT = 0.45; // the brightness (0 - 1) under it a color is dark
|
|
634
|
+
SmartButton.isDarkColor = function (cssColor) {
|
|
635
|
+
const text = String(cssColor).trim();
|
|
636
|
+
const isSrgb = /^color\(srgb\s/.test(text);
|
|
637
|
+
if (!isSrgb && !/^rgba?\(/.test(text)) return 0; // WHY: oklch(), lab()... are not read (0: not dark)
|
|
638
|
+
// WHY the scale: color-mix() (Alpha(), UI.alpha) is computed as color(srgb 0.95 0.95 0.95 / 0.9), channels 0 - 1
|
|
639
|
+
const channelScale = isSrgb ? 255 : 1;
|
|
640
|
+
const parts = (isSrgb ? text.slice(11) : text).match(/[\d.]+/g);
|
|
641
|
+
if (!parts || parts.length < 3) return 0;
|
|
642
|
+
const alpha = (parts.length > 3) ? parseFloat(parts[3]) : 1;
|
|
643
|
+
if (alpha < 0.5) return 0;
|
|
644
|
+
for (let i = 0; i < 3; i++) parts[i] = parseFloat(parts[i]) * channelScale;
|
|
645
|
+
// WHY these weights: the eye sees green brighter than red, and red brighter than blue
|
|
646
|
+
const brightness = (0.299 * parts[0] + 0.587 * parts[1] + 0.114 * parts[2]) / 255;
|
|
647
|
+
return (brightness < SmartButton.DARK_LIMIT) ? 1 : 0;
|
|
648
|
+
};
|
|
649
|
+
|
|
650
|
+
// The turns of the clock and the dots (once for the page). Nothing moves with reduced motion.
|
|
651
|
+
SmartButton.injectCss = function () {
|
|
652
|
+
basic.addCss("smart-button-css",
|
|
653
|
+
"@keyframes smart-button-turn { to { transform: rotate(360deg); } }" +
|
|
654
|
+
"@keyframes smart-button-dot { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.35; } 40% { transform: scale(1); opacity: 1; } }" +
|
|
655
|
+
// WHY view-box: a hand of the clock turns around the middle of the clock, not around its own box
|
|
656
|
+
".smart-button-hand { transform-box: view-box; transform-origin: 50% 50%; animation-name: smart-button-turn;" +
|
|
657
|
+
" animation-timing-function: linear; animation-iteration-count: infinite; }" +
|
|
658
|
+
"@media (prefers-reduced-motion: reduce) { .smart-button-hand, .smart-button-dot { animation: none !important; } }");
|
|
659
|
+
};
|
|
660
|
+
|
|
661
|
+
// *** THE STYLE PACKAGES (the user, 2026-10-30): the buttons of _basic/examples/smart-button-3-ozden.htm.
|
|
662
|
+
// A package needs only the keys that differ from the default (ozdenType1).
|
|
663
|
+
SmartButton.styles = {
|
|
664
|
+
ozdenType1: SmartButtonDefaults.style, // an edge and a bottom line
|
|
665
|
+
ozdenType2: { box: { boxShadow: "none" } }, // only the edge
|
|
666
|
+
ozdenType3: { box: { borderColor: Black(0.1), boxShadow: "none" } }, // a faint edge
|
|
667
|
+
ozdenType4: { box: { color: White(0), border: 0, borderColor: "transparent", boxShadow: "none" } }, // a ghost
|
|
668
|
+
classic: { // the look of before 2026-10-30
|
|
669
|
+
layout: { gap: 8, padding: [12, 6] },
|
|
670
|
+
icon: { opacity: 1 },
|
|
671
|
+
label: { fontSize: 16, textColor: Black(0.8), fontFamily: "opensans-bold" },
|
|
672
|
+
box: { color: White(1), border: 1, borderColor: Black(0.2), round: 6, boxShadow: "none" },
|
|
673
|
+
hover: { color: "#f5f5f5" },
|
|
674
|
+
active: { color: "#e0e0e0" },
|
|
675
|
+
},
|
|
676
|
+
};
|
|
677
|
+
|
|
678
|
+
// THE DARK PACKAGES (2026-10-31, the draft _designs/smart-button-dark.htm): the shapes of ozdenType1-4 with the
|
|
679
|
+
// colors of a dark page (the cards of Ozden Panel / Ozden Manager, #1A1A19). The icon turns white, the waiting clock
|
|
680
|
+
// is the dark one, the dots yellow; the ask stays red. Packages of params (a "style" key): waitingClock is a param.
|
|
681
|
+
SmartButton.createDarkPackage = function (box, hoverColor) {
|
|
682
|
+
return {
|
|
683
|
+
style: {
|
|
684
|
+
box: box,
|
|
685
|
+
hover: { color: hoverColor },
|
|
686
|
+
active: { color: hoverColor },
|
|
687
|
+
label: { textColor: White(0.85) },
|
|
688
|
+
icon: { opacity: 0.85, filter: "brightness(0) invert(1)" },
|
|
689
|
+
focus: { ringColor: "rgba(101, 162, 147, 0.75)" },
|
|
690
|
+
disabled: { color: "#232322", borderColor: White(0.06), textColor: White(0.28), iconOpacity: 0.25 },
|
|
691
|
+
press: { brightness: 0.88 },
|
|
692
|
+
waiting: { dots: { color: "#F1C74A" } },
|
|
693
|
+
},
|
|
694
|
+
waitingClock: "ozdenDark",
|
|
695
|
+
};
|
|
696
|
+
};
|
|
697
|
+
SmartButton.styles.ozdenType1Dark = SmartButton.createDarkPackage({ color: "#2E2E2C", borderColor: White(0.16), boxShadow: "inset 0 -2px 0 rgba(0, 0, 0, 0.45)" }, "#383835"); // an edge and a bottom line
|
|
698
|
+
SmartButton.styles.ozdenType2Dark = SmartButton.createDarkPackage({ color: "#2E2E2C", borderColor: White(0.16), boxShadow: "none" }, "#383835"); // only the edge
|
|
699
|
+
SmartButton.styles.ozdenType3Dark = SmartButton.createDarkPackage({ color: "#2E2E2C", borderColor: White(0.06), boxShadow: "none" }, "#383835"); // a faint edge
|
|
700
|
+
SmartButton.styles.ozdenType4Dark = SmartButton.createDarkPackage({ color: White(0), border: 0, borderColor: "transparent", boxShadow: "none" }, White(0.08)); // a ghost
|
|
701
|
+
|
|
702
|
+
// *** THE TONES AND THE SHAPES (2026-11-02, the user): the color of a button is apart from its shape.
|
|
703
|
+
// color: the strong color; solidHover: its hover; onColor: the text on it (default white); tint / hover: the soft
|
|
704
|
+
// surface; deep: the text of outlined; pillText: the text of pill (default color); light: the light part of a
|
|
705
|
+
// two-tone icon. A new color is one new row.
|
|
706
|
+
SmartButton.ON_COLOR_TEXT = Black(0.75); // the dark text on a light full color
|
|
707
|
+
SmartButton.TONES = {
|
|
708
|
+
gray: { color: "#6E6F74", deep: "#3A3A3A", tint: "#F0F0F0", hover: "#E6E6E6", solidHover: "#5F6065", light: "#C4C5C9", pillText: "#3A3A3A" },
|
|
709
|
+
blue: { color: "#2F6FED", deep: "#2563D8", tint: "#E4EDFD", hover: "#D8E5FC", solidHover: "#2563D8", light: "#93B7F7" },
|
|
710
|
+
green: { color: "#3F9A6C", deep: "#2F8259", tint: "#E6F5EE", hover: "#D9EFE4", solidHover: "#358A5E", light: "#9FD6BC" },
|
|
711
|
+
purple: { color: "#8B5CF0", deep: "#7C4FE0", tint: "#EFE9FD", hover: "#E6DDFC", solidHover: "#7C4FE0", light: "#C9B4F7" },
|
|
712
|
+
orange: { color: "#F28C33", deep: "#B8651E", tint: "#FDF1E3", hover: "#FCE8D2", solidHover: "#E57E25", light: "#F7C393" },
|
|
713
|
+
red: { color: "#E5564A", deep: "#C8443A", tint: "#FDECEA", hover: "#FBDFDC", solidHover: "#D84A3E", light: "#F4B1AB" },
|
|
714
|
+
yellow: { color: "#D9A400", deep: "#8F6B00", tint: "#FFF7DB", hover: "#FFF0C2", solidHover: "#C99700", light: "#F5DC8A", pillText: "#B88A00" },
|
|
715
|
+
teal: { color: "#0E9A9A", deep: "#0B7F7F", tint: "#E4F5F5", hover: "#D6EEEE", solidHover: "#0B8C8C", light: "#92D6D6" },
|
|
716
|
+
sky: { color: "#4FB5D4", deep: "#2A7C93", tint: "#E3F7FB", hover: "#D5F2F8", solidHover: "#3FA6C6", light: "#A5DEEC", pillText: "#2E8BC0" },
|
|
717
|
+
navy: { color: "#2A3A8C", deep: "#1C2A78", tint: "#DFE3EF", hover: "#D3D8E9", solidHover: "#1C2A78", light: "#8F9AC6" },
|
|
718
|
+
pink: { color: "#E8457C", deep: "#C93668", tint: "#FDE8EF", hover: "#FBDBE6", solidHover: "#DC3A70", light: "#F5AFC7" },
|
|
719
|
+
// The situations (2026-10-31, chosen by the user on the draft _designs/smart-button-colors.htm)
|
|
720
|
+
primary: { color: "#5BBAC1", solidHover: "#50AEB5", onColor: SmartButton.ON_COLOR_TEXT, deep: "#2F8088", tint: "#E6F5F6", hover: "#D9EFF1", light: "#ADDDE0", pillText: "#2F8088" }, // the main action: Save, Send
|
|
721
|
+
danger: { color: "#E8796D", solidHover: "#E0695C", deep: "#C4574C", tint: "#FDECEA", hover: "#FBDFDC", light: "#F4BDB6", pillText: "#C4574C" }, // a delete, a reject
|
|
722
|
+
warning: { color: "#F1C74A", solidHover: "#E6BB3C", onColor: SmartButton.ON_COLOR_TEXT, deep: "#8F6B00", tint: "#FFF7DB", hover: "#FFF0C2", light: "#F7E2A0", pillText: "#B88A00" }, // go on, but look first
|
|
723
|
+
success: { color: "#7BC362", solidHover: "#70B756", onColor: SmartButton.ON_COLOR_TEXT, deep: "#4A8A35", tint: "#EDF7E8", hover: "#E1F1DA", light: "#BDE0AF", pillText: "#4F9A38" }, // after a good result: Done
|
|
724
|
+
info: { color: "#52A8D0", solidHover: "#479CC4", onColor: SmartButton.ON_COLOR_TEXT, deep: "#2F7DA3", tint: "#E6F3F9", hover: "#D9ECF5", light: "#A6D2E7", pillText: "#2F7DA3" }, // Details, Help
|
|
725
|
+
};
|
|
726
|
+
|
|
727
|
+
// The colors of a tone on each shape; "filled" is the look of every other shape.
|
|
728
|
+
SmartButton.toneLooks = {
|
|
729
|
+
filled: function (tone) {
|
|
730
|
+
const textColor = tone.onColor || "white";
|
|
731
|
+
const isWhiteText = (textColor == "white");
|
|
732
|
+
return {
|
|
733
|
+
box: { color: tone.color },
|
|
734
|
+
hover: { color: tone.solidHover },
|
|
735
|
+
active: { color: tone.solidHover },
|
|
736
|
+
label: { textColor: textColor },
|
|
737
|
+
icon: { opacity: isWhiteText ? 1 : 0.8, filter: isWhiteText ? "brightness(0) invert(1)" : "none" },
|
|
738
|
+
};
|
|
739
|
+
},
|
|
740
|
+
ozdenType4: function (tone) {
|
|
741
|
+
return {
|
|
742
|
+
hover: { color: tone.tint },
|
|
743
|
+
active: { color: tone.tint },
|
|
744
|
+
label: { textColor: tone.deep },
|
|
745
|
+
};
|
|
746
|
+
},
|
|
747
|
+
pill: function (tone) {
|
|
748
|
+
return {
|
|
749
|
+
box: { color: tone.tint },
|
|
750
|
+
hover: { color: tone.hover },
|
|
751
|
+
active: { color: tone.hover },
|
|
752
|
+
label: { textColor: tone.pillText || tone.color },
|
|
753
|
+
};
|
|
754
|
+
},
|
|
755
|
+
pillSolid: function (tone) {
|
|
756
|
+
return {
|
|
757
|
+
box: { color: tone.color },
|
|
758
|
+
hover: { color: tone.solidHover },
|
|
759
|
+
active: { color: tone.solidHover },
|
|
760
|
+
label: { textColor: tone.onColor || "white" },
|
|
761
|
+
};
|
|
762
|
+
},
|
|
763
|
+
outlined: function (tone) {
|
|
764
|
+
return {
|
|
765
|
+
box: { color: tone.tint, borderColor: tone.color, boxShadow: "inset 0 -" + SmartButton.EDGE_WIDTH + "px 0 " + tone.color },
|
|
766
|
+
hover: { color: tone.hover },
|
|
767
|
+
active: { color: tone.hover },
|
|
768
|
+
label: { textColor: tone.deep },
|
|
769
|
+
};
|
|
770
|
+
},
|
|
771
|
+
};
|
|
772
|
+
|
|
773
|
+
SmartButton.getToneStyle = function (toneName, styleName) {
|
|
774
|
+
const tone = SmartButton.TONES[toneName];
|
|
775
|
+
if (!tone) {
|
|
776
|
+
console.warn("SmartButton: tone not found: " + toneName);
|
|
777
|
+
return {};
|
|
778
|
+
}
|
|
779
|
+
const createLook = SmartButton.toneLooks[styleName] || SmartButton.toneLooks.filled;
|
|
780
|
+
return createLook(tone);
|
|
781
|
+
};
|
|
782
|
+
|
|
783
|
+
// The whole look of a package: its keys, then the defaults (a package has only the keys that differ).
|
|
784
|
+
SmartButton.getPackageStyle = function (styleName) {
|
|
785
|
+
const stylePackage = SmartButton.styles[styleName] || {};
|
|
786
|
+
const packageStyle = {};
|
|
787
|
+
mergeIntoIfMissing(packageStyle, stylePackage.style || stylePackage);
|
|
788
|
+
mergeIntoIfMissing(packageStyle, SmartButtonDefaults.style);
|
|
789
|
+
return packageStyle;
|
|
790
|
+
};
|
|
791
|
+
|
|
792
|
+
// The tone goes under params.style, so a key the page gives still wins. WHY a new object: params.style can be a package.
|
|
793
|
+
SmartButton.applyTone = function (params) {
|
|
794
|
+
if (!params.tone) return;
|
|
795
|
+
const styleName = params.styleName || SmartButtonDefaults.styleName;
|
|
796
|
+
const ownStyle = {};
|
|
797
|
+
mergeIntoIfMissing(ownStyle, params.style || {});
|
|
798
|
+
mergeIntoIfMissing(ownStyle, SmartButton.getToneStyle(params.tone, styleName));
|
|
799
|
+
params.style = ownStyle;
|
|
800
|
+
};
|
|
801
|
+
|
|
802
|
+
// THE SITUATION PACKAGES: ozdenType1 (an edge and a bottom line) in the color of a situation.
|
|
803
|
+
["primary", "danger", "warning", "success", "info"].forEach(function (toneName) {
|
|
804
|
+
SmartButton.styles[toneName] = SmartButton.toneLooks.filled(SmartButton.TONES[toneName]);
|
|
805
|
+
});
|
|
806
|
+
|
|
807
|
+
// THE PILL AND OUTLINED SHAPES (the user: the buttons of _basic/examples/smart-button.htm): gray without a tone.
|
|
808
|
+
SmartButton.PILL_ROUND = 100; // always round, at any height
|
|
809
|
+
SmartButton.EDGE_WIDTH = 2; // outlined: the edge and the bottom line on it
|
|
810
|
+
|
|
811
|
+
SmartButton.PILL_SHAPE = {
|
|
812
|
+
layout: { gap: 12, padding: [22, 11] },
|
|
813
|
+
icon: { width: 30, height: 30, opacity: 1 },
|
|
814
|
+
label: { fontFamily: "opensans-bold" },
|
|
815
|
+
box: { border: 0, borderColor: "transparent", round: SmartButton.PILL_ROUND, boxShadow: "none" },
|
|
816
|
+
};
|
|
817
|
+
SmartButton.OUTLINED_SHAPE = {
|
|
818
|
+
layout: { gap: 8, padding: [16, 9] },
|
|
819
|
+
icon: { width: 30, height: 30, opacity: 1 },
|
|
820
|
+
label: { fontFamily: "opensans" },
|
|
821
|
+
box: { border: SmartButton.EDGE_WIDTH, round: SmartButton.PILL_ROUND },
|
|
822
|
+
};
|
|
823
|
+
SmartButton.createShapePackage = function (shape, look) {
|
|
824
|
+
const shapePackage = {};
|
|
825
|
+
mergeIntoIfMissing(shapePackage, look);
|
|
826
|
+
mergeIntoIfMissing(shapePackage, shape);
|
|
827
|
+
return shapePackage;
|
|
828
|
+
};
|
|
829
|
+
SmartButton.styles.pill = SmartButton.createShapePackage(SmartButton.PILL_SHAPE, SmartButton.toneLooks.pill(SmartButton.TONES.gray));
|
|
830
|
+
SmartButton.styles.pillSolid = SmartButton.createShapePackage(SmartButton.PILL_SHAPE, SmartButton.toneLooks.pillSolid(SmartButton.TONES.gray));
|
|
831
|
+
SmartButton.styles.outlined = SmartButton.createShapePackage(SmartButton.OUTLINED_SHAPE, SmartButton.toneLooks.outlined(SmartButton.TONES.gray));
|
|
832
|
+
|
|
833
|
+
// *** THE WAITING DRAWINGS: the clock and the dots (comp/loading-screen.js uses them too)
|
|
834
|
+
|
|
835
|
+
// The clocks of the waiting views with moving hands (the user, 2026-10-29). The sizes are px on a 30 px clock.
|
|
836
|
+
SmartButton.clocks = {
|
|
837
|
+
ozden: { // a white face, dark lines
|
|
838
|
+
faceColor: "#FFFFFF",
|
|
839
|
+
lineColor: "#141414", // the edge (and the hour hand, when there is no hourColor)
|
|
840
|
+
edgeWidth: 2,
|
|
841
|
+
hourWidth: 2, // the short hand
|
|
842
|
+
hourLength: 7.5, // from the middle
|
|
843
|
+
minuteWidth: 2, // the long hand
|
|
844
|
+
minuteLength: 10,
|
|
845
|
+
minuteColor: "indianred",
|
|
846
|
+
centerColor: "indianred", // the dot in the middle: it hides where the hands meet
|
|
847
|
+
centerSize: 4,
|
|
848
|
+
minuteTurn: 1.6, // seconds for one turn of the minute hand
|
|
849
|
+
hourTurn: 19.2, // seconds for one turn of the hour hand (12 x minuteTurn: a real clock)
|
|
850
|
+
},
|
|
851
|
+
};
|
|
852
|
+
// a dark face, light lines; WHY yellow (the user, 2026-10-29): indianred was weak on the dark face (contrast 3.6,
|
|
853
|
+
// #F1C74A 8.9); the hour hand is dimmer, so the yellow minute hand leads (as the red one on the light clock)
|
|
854
|
+
SmartButton.clocks.ozdenDark = Object.assign({}, SmartButton.clocks.ozden, {
|
|
855
|
+
faceColor: "#2A2A2A",
|
|
856
|
+
lineColor: "rgba(255, 255, 255, 0.9)",
|
|
857
|
+
hourColor: "rgba(255, 255, 255, 0.6)",
|
|
858
|
+
minuteColor: "#F1C74A",
|
|
859
|
+
centerColor: "#F1C74A",
|
|
860
|
+
});
|
|
861
|
+
|
|
862
|
+
// The clock as an SVG text (as wide as its box): a face with an edge, the minute hand up, the hour hand to the right.
|
|
863
|
+
SmartButton.CLOCK_SIZE = 30; // the px of the drawing
|
|
864
|
+
SmartButton.createClockSvg = function (clockStyle) {
|
|
865
|
+
SmartButton.injectCss();
|
|
866
|
+
const c = clockStyle;
|
|
867
|
+
const size = SmartButton.CLOCK_SIZE;
|
|
868
|
+
const middle = size / 2;
|
|
869
|
+
const faceRadius = middle - c.edgeWidth / 2; // WHY: the edge is drawn on the circle line: it stays inside
|
|
870
|
+
const hand = function (x2, y2, width, color, turnTime) {
|
|
871
|
+
return '<line class="smart-button-hand" x1="' + middle + '" y1="' + middle + '" x2="' + x2 + '" y2="' + y2 + '" stroke="' + color +
|
|
872
|
+
'" stroke-width="' + width + '" stroke-linecap="round" style="animation-duration: ' + turnTime + 's"/>';
|
|
873
|
+
};
|
|
874
|
+
return '<svg viewBox="0 0 ' + size + ' ' + size + '" width="100%" height="100%" aria-hidden="true" style="display: block">' +
|
|
875
|
+
'<circle cx="' + middle + '" cy="' + middle + '" r="' + faceRadius + '" fill="' + c.faceColor + '" stroke="' + c.lineColor + '" stroke-width="' + c.edgeWidth + '"/>' +
|
|
876
|
+
hand(middle + c.hourLength, middle, c.hourWidth, c.hourColor || c.lineColor, c.hourTurn) + // the hour hand (under)
|
|
877
|
+
hand(middle, middle - c.minuteLength, c.minuteWidth, c.minuteColor, c.minuteTurn) + // the minute hand
|
|
878
|
+
'<circle cx="' + middle + '" cy="' + middle + '" r="' + (c.centerSize / 2) + '" fill="' + c.centerColor + '"/>' +
|
|
879
|
+
"</svg>";
|
|
880
|
+
};
|
|
881
|
+
|
|
882
|
+
// GROUP: Three dots that grow one after the other. dots: { size, gap, color }
|
|
883
|
+
SmartButton.DOT_COUNT = 3;
|
|
884
|
+
SmartButton.DOT_TIME = 1.2; // seconds for one bounce of a dot
|
|
885
|
+
SmartButton.DOT_DELAY = 0.16; // seconds between two dots
|
|
886
|
+
SmartButton.createDots = function (dots) {
|
|
887
|
+
SmartButton.injectCss();
|
|
888
|
+
const group = HGroup({ hug: 1, align: "center center", gap: dots.gap });
|
|
889
|
+
for (let i = 0; i < SmartButton.DOT_COUNT; i++) {
|
|
890
|
+
const dot = Box({ width: dots.size, height: dots.size, color: dots.color, round: 100 });
|
|
891
|
+
dot.elem.classList.add("smart-button-dot");
|
|
892
|
+
dot.css = { animation: "smart-button-dot " + SmartButton.DOT_TIME + "s ease-in-out " + (i * SmartButton.DOT_DELAY) + "s infinite" };
|
|
893
|
+
}
|
|
894
|
+
endGroup();
|
|
895
|
+
return group;
|
|
896
|
+
};
|