create-basicjs 0.1.0 → 0.1.2
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 +84 -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 +336 -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 +27 -0
- package/payload/templates/panel/module10/greenhouse.htm +1362 -0
- package/payload/templates/panel/module11/arduino-projects.htm +1125 -0
- package/payload/templates/panel/module2/empty-full.htm +27 -0
- package/payload/templates/panel/module3/empty-right.htm +27 -0
- package/payload/templates/panel/module4/empty-main-topbar.htm +27 -0
- package/payload/templates/panel/module5/empty-right-topbar.htm +27 -0
- package/payload/templates/panel/module6/energy-hub.htm +1508 -0
- package/payload/templates/panel/module7/3d-printers.htm +1259 -0
- package/payload/templates/panel/module8/cold-rooms.htm +1251 -0
- package/payload/templates/panel/module9/elevator-fleet.htm +1489 -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,838 @@
|
|
|
1
|
+
/* Bismillah */
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
|
|
5
|
+
Toast - v26.09
|
|
6
|
+
|
|
7
|
+
UI COMPONENT TEMPLATE
|
|
8
|
+
- Short messages that come and go: "Saved", "Copied", "Could not connect"...
|
|
9
|
+
- Types: "success", "error", "warning", "info", "loading". Icons are drawn with SVG (no image files).
|
|
10
|
+
- Title, message, an action button (Ex: "Undo") and a close button.
|
|
11
|
+
- A time bar shows when it closes. The time stops while the mouse (or the keyboard focus)
|
|
12
|
+
is on the toast, and while the browser tab is hidden.
|
|
13
|
+
- key: A toast with the same key is updated, not added again. (Ex: pressing "Copy" many times)
|
|
14
|
+
- Toast.promise(): "loading" toast that becomes "success" or "error".
|
|
15
|
+
- Positions: "top-right", "top-center", "top-left", "bottom-right", "bottom-center", "bottom-left".
|
|
16
|
+
- Themes: "light", "dark", "auto" (follows the system setting).
|
|
17
|
+
- maxVisible: Old toasts are closed when there are too many.
|
|
18
|
+
- Small screens: Toasts use the full width.
|
|
19
|
+
- Accessibility: Errors use role="alert", others role="status". Escape closes the focused toast.
|
|
20
|
+
- Scale (2026-11-01): scale multiplies every size of a toast (its style, its shadow, its motion); the scale of
|
|
21
|
+
Toast.options multiplies the places of the toasts (width, offsets, gap, smallScreenWidth). null (default):
|
|
22
|
+
Toast.options.scale, else basic.uiScale (1; a page fitted with page.fit() sets 1 / page.zoom: the toasts keep
|
|
23
|
+
their size on the screen).
|
|
24
|
+
|
|
25
|
+
USAGE:
|
|
26
|
+
Toast.success("Changes are saved.");
|
|
27
|
+
Toast.error("Could not save the file.", { title: "Upload failed", duration: 0 });
|
|
28
|
+
Toast.show({ type: "info", title: "Item deleted", message: "report.pdf", action: { text: "Undo", onClick: undoDelete } });
|
|
29
|
+
Toast.show({ key: "copy", type: "success", message: "Link is copied." }); // Same key: updates the visible toast
|
|
30
|
+
Toast.promise(saveData(), { loading: "Saving...", success: "Saved.", error: (err) => "Failed: " + err.message });
|
|
31
|
+
Toast.setOptions({ position: "bottom-right", theme: "dark" });
|
|
32
|
+
Toast.setOptions({ scale: 1.5 }); // every toast and its place x 1.5 (default: basic.uiScale)
|
|
33
|
+
|
|
34
|
+
const toast = Toast.show({ type: "loading", message: "Uploading 0%" });
|
|
35
|
+
toast.update({ message: "Uploading 60%" });
|
|
36
|
+
toast.update({ type: "success", message: "Uploaded." }); // Starts its timer (loading has no timer)
|
|
37
|
+
toast.close();
|
|
38
|
+
|
|
39
|
+
Started Date: September 2026
|
|
40
|
+
Developer: Bugra Ozden
|
|
41
|
+
Email: bugra.ozden@gmail.com
|
|
42
|
+
Webpage: https://bug7a.github.io/js-components/
|
|
43
|
+
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
"use strict";
|
|
47
|
+
|
|
48
|
+
// Default values:
|
|
49
|
+
const ToastDefaults = {
|
|
50
|
+
key: "", // Same key: updates the visible toast.
|
|
51
|
+
type: "info", // "success", "error", "warning", "info", "loading"
|
|
52
|
+
title: "",
|
|
53
|
+
message: "",
|
|
54
|
+
allowHtml: 0, // 0: title and message are shown as text. 1: As HTML (use only your own texts).
|
|
55
|
+
duration: null, // ms. null: Toast.options.durations[type]. 0: Stays until it is closed.
|
|
56
|
+
closable: 1, // 1: Close button
|
|
57
|
+
showProgress: 1, // 1: Time bar
|
|
58
|
+
pauseOnHover: 1,
|
|
59
|
+
action: null, // { text: "Undo", onClick: function (toast) {} } onClick returns false: the toast stays open.
|
|
60
|
+
position: null, // null: Toast.options.position
|
|
61
|
+
theme: null, // null: Toast.options.theme
|
|
62
|
+
scale: null, // every size multiplied (Ex: 1.5). null: Toast.options.scale
|
|
63
|
+
onClick: null, // function (toast) {} Click on the toast (not on the buttons)
|
|
64
|
+
onClose: function (toast, reason) { }, // reason: "timeout", "close", "action", "limit", "api"
|
|
65
|
+
style: { // (its sizes are px, multiplied by scale)
|
|
66
|
+
card: {
|
|
67
|
+
round: 10,
|
|
68
|
+
padding: [14, 12],
|
|
69
|
+
gap: 12,
|
|
70
|
+
border: 1,
|
|
71
|
+
},
|
|
72
|
+
icon: {
|
|
73
|
+
size: 20,
|
|
74
|
+
marginTop: 1, // in the line of the title
|
|
75
|
+
},
|
|
76
|
+
texts: {
|
|
77
|
+
gap: 2, // between the title, the message and the action
|
|
78
|
+
},
|
|
79
|
+
title: {
|
|
80
|
+
fontSize: 14,
|
|
81
|
+
},
|
|
82
|
+
message: {
|
|
83
|
+
fontSize: 13,
|
|
84
|
+
},
|
|
85
|
+
action: { // the action button (Ex: "Undo")
|
|
86
|
+
fontSize: 13,
|
|
87
|
+
padding: [10, 4],
|
|
88
|
+
round: 6,
|
|
89
|
+
marginTop: 6,
|
|
90
|
+
},
|
|
91
|
+
close: { // the close button
|
|
92
|
+
size: 24,
|
|
93
|
+
iconSize: 16,
|
|
94
|
+
round: 6,
|
|
95
|
+
marginTop: -2, // a little up and right: its icon in the line of the title, near the corner
|
|
96
|
+
marginRight: -4,
|
|
97
|
+
},
|
|
98
|
+
progress: {
|
|
99
|
+
height: 3,
|
|
100
|
+
opacity: 0.45,
|
|
101
|
+
},
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
const Toast = function (params = {}) {
|
|
106
|
+
|
|
107
|
+
// Merge params:
|
|
108
|
+
mergeIntoIfMissing(params, ToastDefaults);
|
|
109
|
+
|
|
110
|
+
const options = Toast.options;
|
|
111
|
+
const position = Toast.POSITIONS.includes(params.position) ? params.position : options.position;
|
|
112
|
+
|
|
113
|
+
// Same key: update the visible toast.
|
|
114
|
+
if (params.key) {
|
|
115
|
+
const old = Toast.list.find(function (toast) { return toast.key == params.key && !toast.isClosing; });
|
|
116
|
+
if (old) {
|
|
117
|
+
old.update(params);
|
|
118
|
+
old.bump();
|
|
119
|
+
return old;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// WHY: Only the listed values are changed later with update(). Functions and objects are kept as they are.
|
|
124
|
+
const action = params.action;
|
|
125
|
+
const onClick = params.onClick;
|
|
126
|
+
|
|
127
|
+
// Edit params, if needed:
|
|
128
|
+
params.scale = Toast.getScale(params.scale);
|
|
129
|
+
params.style = basic.scaleStyle(params.style, params.scale);
|
|
130
|
+
params.width = "100%";
|
|
131
|
+
params.height = "auto";
|
|
132
|
+
params.color = "transparent";
|
|
133
|
+
params.position = "relative"; // WHY: "position" is a basic.js property too. The toast position is kept below.
|
|
134
|
+
|
|
135
|
+
const container = Toast.getContainer(position);
|
|
136
|
+
const isBottom = position.startsWith("bottom");
|
|
137
|
+
|
|
138
|
+
// WHY: Toasts must be over everything. They are created in their container on the page.
|
|
139
|
+
const previousContainer = getDefaultContainerBox();
|
|
140
|
+
setDefaultContainerBox(container);
|
|
141
|
+
|
|
142
|
+
// BOX: Component container (a slot in the stack; its height is animated on close)
|
|
143
|
+
let box = startObject(params);
|
|
144
|
+
|
|
145
|
+
// *** PRIVATE VARIABLES:
|
|
146
|
+
const _s = box.style;
|
|
147
|
+
let timer = null; // The cancel function of box.after (stopped by remove())
|
|
148
|
+
let removeVisibilityEvent = null;
|
|
149
|
+
let remaining = 0; // ms
|
|
150
|
+
let startedAt = 0;
|
|
151
|
+
let isHovered = 0;
|
|
152
|
+
let isFocused = 0;
|
|
153
|
+
const SLIDE_X = 16 * box.scale; // px: a toast at the left or right side comes from (and goes to) that side
|
|
154
|
+
const SLIDE_Y = 12 * box.scale; // px: a centered toast comes from the top or the bottom
|
|
155
|
+
const ENTER_TIME = "0.2s";
|
|
156
|
+
const LEAVE_TIME = "0.16s"; // The fade out, then the closing of the space in the stack
|
|
157
|
+
const LEAVE_WAIT = 150; // ms: the space starts to close a little before the fade ends
|
|
158
|
+
const COLLAPSE_WAIT = 170; // ms: a little after the space is closed
|
|
159
|
+
const BUMP_TIME = 120; // ms
|
|
160
|
+
|
|
161
|
+
// *** PUBLIC VARIABLES:
|
|
162
|
+
// [var] "top-right", ...
|
|
163
|
+
box.toastPosition = position;
|
|
164
|
+
// [var]
|
|
165
|
+
box.action = action;
|
|
166
|
+
// [var]
|
|
167
|
+
box.onClick = onClick;
|
|
168
|
+
// [var] 1: Close animation started.
|
|
169
|
+
box.isClosing = 0;
|
|
170
|
+
|
|
171
|
+
// *** PRIVATE FUNCTIONS:
|
|
172
|
+
|
|
173
|
+
const getTheme = function () {
|
|
174
|
+
return basic.resolveTheme(Toast.THEMES, box.theme || options.theme);
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
const getDuration = function () {
|
|
178
|
+
if (box.duration !== null && box.duration !== undefined) return box.duration;
|
|
179
|
+
return options.durations[box.type] ?? 4000;
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
const getViewText = function (value) {
|
|
183
|
+
return (box.allowHtml == 1) ? String(value) : Toast.escapeHtml(value);
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
// The move of the enter and the close animations: { x, y } in px
|
|
187
|
+
const getSlideOffset = function () {
|
|
188
|
+
if (box.toastPosition.endsWith("left")) return { x: -SLIDE_X, y: 0 };
|
|
189
|
+
if (box.toastPosition.endsWith("right")) return { x: SLIDE_X, y: 0 };
|
|
190
|
+
return { x: 0, y: (isBottom) ? SLIDE_Y : -SLIDE_Y };
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
// Writes the values to the view. (On create and update)
|
|
194
|
+
const render = function () {
|
|
195
|
+
|
|
196
|
+
const theme = getTheme();
|
|
197
|
+
const color = theme.colors[box.type] || theme.colors.info;
|
|
198
|
+
const isError = (box.type == "error");
|
|
199
|
+
|
|
200
|
+
box.card.color = theme.background;
|
|
201
|
+
box.card.borderColor = theme.border;
|
|
202
|
+
box.card.boxShadow = basic.scaleCssText(theme.shadow, box.scale);
|
|
203
|
+
box.card.role = (isError) ? "alert" : "status";
|
|
204
|
+
box.card.aria = { live: (isError) ? "assertive" : "polite" };
|
|
205
|
+
box.card.cursor = (box.onClick) ? "pointer" : "default";
|
|
206
|
+
|
|
207
|
+
box.icon.text = Toast.getIconSvg(box.type, color, _s.icon.size);
|
|
208
|
+
|
|
209
|
+
box.lblTitle.visible = (box.title) ? 1 : 0;
|
|
210
|
+
box.lblTitle.text = getViewText(box.title);
|
|
211
|
+
box.lblTitle.textColor = theme.title;
|
|
212
|
+
|
|
213
|
+
box.lblMessage.visible = (box.message) ? 1 : 0;
|
|
214
|
+
box.lblMessage.text = getViewText(box.message);
|
|
215
|
+
box.lblMessage.textColor = (box.title) ? theme.message : theme.title; // WHY: Without a title, the message is the main text.
|
|
216
|
+
|
|
217
|
+
const hasAction = !!(box.action && box.action.text);
|
|
218
|
+
box.btnAction.visible = (hasAction) ? 1 : 0;
|
|
219
|
+
if (hasAction) {
|
|
220
|
+
box.btnAction.plainText = box.action.text;
|
|
221
|
+
box.btnAction.textColor = color;
|
|
222
|
+
box.btnAction.color = Toast.alpha(color, 0.12);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
box.btnClose.visible = (box.closable == 1) ? 1 : 0;
|
|
226
|
+
box.btnClose.text = Toast.getCloseSvg(theme.close, _s.close.iconSize);
|
|
227
|
+
|
|
228
|
+
box.progress.color = color;
|
|
229
|
+
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
// Time bar: from full to empty in ms.
|
|
233
|
+
const animateProgress = function (ms, fromFull) {
|
|
234
|
+
const style = box.progress.css;
|
|
235
|
+
if (fromFull) {
|
|
236
|
+
style.transition = "none";
|
|
237
|
+
style.width = "100%";
|
|
238
|
+
void box.progress.elem.offsetWidth; // WHY: Apply 100% before the transition starts.
|
|
239
|
+
}
|
|
240
|
+
style.transition = "width " + ms + "ms linear";
|
|
241
|
+
style.width = "0%";
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
const freezeProgress = function () {
|
|
245
|
+
const style = box.progress.css;
|
|
246
|
+
const width = window.getComputedStyle(box.progress.elem).width;
|
|
247
|
+
style.transition = "none";
|
|
248
|
+
style.width = width;
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
// Closes the toast after the remaining time.
|
|
252
|
+
const waitAndClose = function () {
|
|
253
|
+
startedAt = Date.now();
|
|
254
|
+
timer = box.after(remaining, function () {
|
|
255
|
+
timer = null;
|
|
256
|
+
box.close("timeout");
|
|
257
|
+
});
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
const stopTimer = function () {
|
|
261
|
+
if (timer) timer();
|
|
262
|
+
timer = null;
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
const startTimer = function () {
|
|
266
|
+
|
|
267
|
+
stopTimer();
|
|
268
|
+
const duration = getDuration();
|
|
269
|
+
|
|
270
|
+
const showProgress = duration > 0 && box.showProgress == 1;
|
|
271
|
+
box.progress.visible = (showProgress) ? 1 : 0;
|
|
272
|
+
|
|
273
|
+
if (!(duration > 0)) {
|
|
274
|
+
remaining = 0;
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
remaining = duration;
|
|
279
|
+
if (isPaused()) {
|
|
280
|
+
// Starts when the pause ends.
|
|
281
|
+
box.progress.css = { transition: "none", width: "100%" };
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
waitAndClose();
|
|
286
|
+
if (showProgress) animateProgress(remaining, true);
|
|
287
|
+
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
const isPaused = function () {
|
|
291
|
+
return (box.pauseOnHover == 1 && (isHovered || isFocused)) || document.hidden;
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
const pause = function () {
|
|
295
|
+
if (!timer) return;
|
|
296
|
+
stopTimer();
|
|
297
|
+
remaining = Math.max(0, remaining - (Date.now() - startedAt));
|
|
298
|
+
freezeProgress();
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
const resume = function () {
|
|
302
|
+
if (timer || !(remaining > 0) || isPaused() || box.isClosing) return;
|
|
303
|
+
waitAndClose();
|
|
304
|
+
if (box.progress.visible) animateProgress(remaining, false);
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
const updatePause = function () {
|
|
308
|
+
if (!box) return;
|
|
309
|
+
if (isPaused()) pause();
|
|
310
|
+
else resume();
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
const onVisibilityChange = function () {
|
|
314
|
+
updatePause();
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
// *** PUBLIC FUNCTIONS:
|
|
318
|
+
|
|
319
|
+
// Changes the toast and starts its timer again.
|
|
320
|
+
box.update = function (values = {}) {
|
|
321
|
+
if (!box || box.isClosing) return box;
|
|
322
|
+
["type", "title", "message", "allowHtml", "duration", "closable", "showProgress", "pauseOnHover", "theme", "onClick", "action"].forEach(function (key) {
|
|
323
|
+
if (key in values) box[key] = values[key];
|
|
324
|
+
});
|
|
325
|
+
if (!("duration" in values)) box.duration = null; // WHY: A new type (loading -> success) uses its own duration.
|
|
326
|
+
render();
|
|
327
|
+
startTimer();
|
|
328
|
+
return box;
|
|
329
|
+
};
|
|
330
|
+
// USAGE: toast.update({ type: "success", message: "Uploaded." })
|
|
331
|
+
|
|
332
|
+
// A small move to show that the toast is updated.
|
|
333
|
+
box.bump = function () {
|
|
334
|
+
if (!box) return;
|
|
335
|
+
const cardStyle = box.card.css;
|
|
336
|
+
cardStyle.transition = "transform " + (BUMP_TIME / 1000) + "s";
|
|
337
|
+
cardStyle.transform = "scale(1.03)";
|
|
338
|
+
box.after(BUMP_TIME, function () {
|
|
339
|
+
cardStyle.transform = "scale(1)";
|
|
340
|
+
});
|
|
341
|
+
};
|
|
342
|
+
|
|
343
|
+
box.close = function (reason = "api") {
|
|
344
|
+
|
|
345
|
+
if (!box || box.isClosing) return;
|
|
346
|
+
box.isClosing = 1;
|
|
347
|
+
|
|
348
|
+
stopTimer();
|
|
349
|
+
if (removeVisibilityEvent) removeVisibilityEvent();
|
|
350
|
+
Toast.list = Toast.list.filter(function (toast) { return toast !== box; });
|
|
351
|
+
|
|
352
|
+
const self = box;
|
|
353
|
+
const cardStyle = self.card.css;
|
|
354
|
+
const move = getSlideOffset();
|
|
355
|
+
|
|
356
|
+
// 1. Fade and move out
|
|
357
|
+
cardStyle.transition = "opacity " + LEAVE_TIME + ", transform " + LEAVE_TIME;
|
|
358
|
+
cardStyle.opacity = "0";
|
|
359
|
+
cardStyle.transform = "translate(" + move.x + "px, " + move.y + "px) scale(0.98)";
|
|
360
|
+
|
|
361
|
+
setTimeout(function () {
|
|
362
|
+
|
|
363
|
+
// 2. Close the space in the stack
|
|
364
|
+
const slotStyle = self.css;
|
|
365
|
+
slotStyle.height = self.elem.offsetHeight + "px";
|
|
366
|
+
void self.elem.offsetHeight; // WHY: Apply the fixed height before the transition starts.
|
|
367
|
+
slotStyle.transition = "height " + LEAVE_TIME + ", padding " + LEAVE_TIME;
|
|
368
|
+
slotStyle.height = "0px";
|
|
369
|
+
slotStyle.paddingTop = "0px";
|
|
370
|
+
slotStyle.paddingBottom = "0px";
|
|
371
|
+
|
|
372
|
+
setTimeout(function () {
|
|
373
|
+
self.onClose(self, reason);
|
|
374
|
+
self.remove();
|
|
375
|
+
if (box === self) box = null;
|
|
376
|
+
}, COLLAPSE_WAIT);
|
|
377
|
+
|
|
378
|
+
}, LEAVE_WAIT);
|
|
379
|
+
|
|
380
|
+
};
|
|
381
|
+
// reason: "timeout", "close", "action", "limit", "api"
|
|
382
|
+
|
|
383
|
+
// WHY: box.superRemove is overwritten by a component that extends this one, so the local copy is called below.
|
|
384
|
+
const superRemove = box.remove;
|
|
385
|
+
box.superRemove = superRemove;
|
|
386
|
+
box.remove = function () {
|
|
387
|
+
if (!box) return; // WHY: remove() can be called twice (also by the parent's remove()).
|
|
388
|
+
Toast.list = Toast.list.filter(function (toast) { return toast !== box; });
|
|
389
|
+
superRemove.call(box); // NOTE: basic.js remove(). It cleans all the events and the objects inside.
|
|
390
|
+
box = null;
|
|
391
|
+
};
|
|
392
|
+
|
|
393
|
+
// *** OBJECT VIEW:
|
|
394
|
+
|
|
395
|
+
box.css = { overflow: "visible", boxSizing: "border-box" };
|
|
396
|
+
// (the gap between the toasts is a place: the scale of Toast.options, like the offsets)
|
|
397
|
+
box.css[(isBottom) ? "paddingTop" : "paddingBottom"] = (options.gap * Toast.getScale()) + "px";
|
|
398
|
+
|
|
399
|
+
// GROUP: Card
|
|
400
|
+
box.card = HGroup({
|
|
401
|
+
width: "100%",
|
|
402
|
+
height: "auto",
|
|
403
|
+
align: "left top",
|
|
404
|
+
gap: _s.card.gap,
|
|
405
|
+
padding: _s.card.padding,
|
|
406
|
+
border: _s.card.border,
|
|
407
|
+
round: _s.card.round,
|
|
408
|
+
clickable: 1,
|
|
409
|
+
position: "relative",
|
|
410
|
+
});
|
|
411
|
+
box.card.css = { overflow: "hidden", boxSizing: "border-box", outline: "none" };
|
|
412
|
+
box.card.tabIndex = -1;
|
|
413
|
+
|
|
414
|
+
// LABEL: Icon (SVG)
|
|
415
|
+
box.icon = Label({
|
|
416
|
+
text: "",
|
|
417
|
+
width: _s.icon.size,
|
|
418
|
+
height: _s.icon.size,
|
|
419
|
+
});
|
|
420
|
+
box.icon.shrink = 0;
|
|
421
|
+
box.icon.lineHeight = "0";
|
|
422
|
+
box.icon.css.marginTop = _s.icon.marginTop + "px";
|
|
423
|
+
box.icon.aria = { hidden: "true" };
|
|
424
|
+
|
|
425
|
+
// GROUP: Texts and action
|
|
426
|
+
box.textGroup = VGroup({
|
|
427
|
+
width: "auto",
|
|
428
|
+
height: "auto",
|
|
429
|
+
align: "left top",
|
|
430
|
+
gap: _s.texts.gap,
|
|
431
|
+
});
|
|
432
|
+
box.textGroup.css = { flex: "1 1 auto", minWidth: "0" };
|
|
433
|
+
|
|
434
|
+
box.lblTitle = Label({ text: "", width: "100%", fontSize: _s.title.fontSize });
|
|
435
|
+
box.lblTitle.css = { fontFamily: "opensans-bold", overflowWrap: "anywhere" };
|
|
436
|
+
|
|
437
|
+
box.lblMessage = Label({ text: "", width: "100%", fontSize: _s.message.fontSize });
|
|
438
|
+
box.lblMessage.css.overflowWrap = "anywhere";
|
|
439
|
+
box.lblMessage.lineHeight = "1.45";
|
|
440
|
+
|
|
441
|
+
// LABEL: Action button
|
|
442
|
+
box.btnAction = Label({
|
|
443
|
+
text: "",
|
|
444
|
+
fontSize: _s.action.fontSize,
|
|
445
|
+
padding: _s.action.padding,
|
|
446
|
+
round: _s.action.round,
|
|
447
|
+
clickable: 1,
|
|
448
|
+
});
|
|
449
|
+
box.btnAction.css = { fontFamily: "opensans-bold", marginTop: _s.action.marginTop + "px" };
|
|
450
|
+
box.btnAction.cursor = "pointer";
|
|
451
|
+
box.btnAction.tabIndex = 0;
|
|
452
|
+
box.btnAction.role = "button";
|
|
453
|
+
|
|
454
|
+
endGroup();
|
|
455
|
+
|
|
456
|
+
// LABEL: Close button (SVG)
|
|
457
|
+
box.btnClose = Label({
|
|
458
|
+
text: "",
|
|
459
|
+
width: _s.close.size,
|
|
460
|
+
height: _s.close.size,
|
|
461
|
+
round: _s.close.round,
|
|
462
|
+
clickable: 1,
|
|
463
|
+
});
|
|
464
|
+
box.btnClose.shrink = 0;
|
|
465
|
+
box.btnClose.lineHeight = "0";
|
|
466
|
+
box.btnClose.cursor = "pointer";
|
|
467
|
+
box.btnClose.elem.style.display = "flex";
|
|
468
|
+
const closeMargin = _s.close.marginTop + "px " + _s.close.marginRight + "px 0 0";
|
|
469
|
+
box.btnClose.css = { alignItems: "center", justifyContent: "center", margin: closeMargin };
|
|
470
|
+
box.btnClose.tabIndex = 0;
|
|
471
|
+
box.btnClose.role = "button";
|
|
472
|
+
box.btnClose.aria = { label: "Close" };
|
|
473
|
+
|
|
474
|
+
// BOX: Time bar
|
|
475
|
+
box.progress = Box({
|
|
476
|
+
width: "100%",
|
|
477
|
+
height: _s.progress.height,
|
|
478
|
+
opacity: _s.progress.opacity,
|
|
479
|
+
});
|
|
480
|
+
|
|
481
|
+
endGroup();
|
|
482
|
+
|
|
483
|
+
// WHY: The card is a flex group. The bar must be out of the flow, at the bottom.
|
|
484
|
+
box.progress.position = "absolute";
|
|
485
|
+
box.progress.left = 0;
|
|
486
|
+
box.progress.bottom = 0;
|
|
487
|
+
|
|
488
|
+
// *** OBJECT INIT CODE:
|
|
489
|
+
|
|
490
|
+
// Newest toast is next to the screen edge.
|
|
491
|
+
if (!isBottom && container.elem.firstChild !== box.elem) {
|
|
492
|
+
container.elem.insertBefore(box.elem, container.elem.firstChild);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
// Buttons (mouse and keyboard)
|
|
496
|
+
const pressKey = function (event, func) {
|
|
497
|
+
if (event.key == "Enter" || event.key == " ") {
|
|
498
|
+
event.preventDefault();
|
|
499
|
+
func();
|
|
500
|
+
}
|
|
501
|
+
};
|
|
502
|
+
|
|
503
|
+
const runAction = function () {
|
|
504
|
+
// WHY isClosing: the card fades for a moment after close(); a double click ran the action (Undo) twice
|
|
505
|
+
if (!box || !box.action || box.isClosing) return;
|
|
506
|
+
const result = (typeof box.action.onClick === "function") ? box.action.onClick(box) : undefined;
|
|
507
|
+
if (result !== false) box.close("action");
|
|
508
|
+
};
|
|
509
|
+
|
|
510
|
+
box.btnAction.on("click", runAction);
|
|
511
|
+
box.btnAction.on("keydown", function (self, event) {
|
|
512
|
+
pressKey(event, runAction);
|
|
513
|
+
});
|
|
514
|
+
|
|
515
|
+
const closeByButton = function () {
|
|
516
|
+
box.close("close");
|
|
517
|
+
};
|
|
518
|
+
|
|
519
|
+
box.btnClose.on("click", closeByButton);
|
|
520
|
+
box.btnClose.on("keydown", function (self, event) {
|
|
521
|
+
pressKey(event, closeByButton);
|
|
522
|
+
});
|
|
523
|
+
box.btnClose.on("mouseover", function () {
|
|
524
|
+
box.btnClose.color = getTheme().closeHover;
|
|
525
|
+
});
|
|
526
|
+
box.btnClose.on("mouseout", function () {
|
|
527
|
+
box.btnClose.color = "transparent";
|
|
528
|
+
});
|
|
529
|
+
|
|
530
|
+
box.card.on("click", function (self, event) {
|
|
531
|
+
if (!box || !box.onClick) return;
|
|
532
|
+
if (box.btnAction.elem.contains(event.target) || box.btnClose.elem.contains(event.target)) return;
|
|
533
|
+
box.onClick(box);
|
|
534
|
+
});
|
|
535
|
+
|
|
536
|
+
box.card.on("keydown", function (self, event) {
|
|
537
|
+
if (event.key == "Escape" && box && box.closable == 1) box.close("close");
|
|
538
|
+
});
|
|
539
|
+
|
|
540
|
+
// Pause the time
|
|
541
|
+
box.card.on("mouseenter", function () {
|
|
542
|
+
isHovered = 1;
|
|
543
|
+
updatePause();
|
|
544
|
+
});
|
|
545
|
+
box.card.on("mouseleave", function () {
|
|
546
|
+
isHovered = 0;
|
|
547
|
+
updatePause();
|
|
548
|
+
});
|
|
549
|
+
box.card.on("focusin", function () {
|
|
550
|
+
isFocused = 1;
|
|
551
|
+
updatePause();
|
|
552
|
+
});
|
|
553
|
+
box.card.on("focusout", function () {
|
|
554
|
+
isFocused = 0;
|
|
555
|
+
updatePause();
|
|
556
|
+
});
|
|
557
|
+
removeVisibilityEvent = box.listenTo(document, "visibilitychange", onVisibilityChange);
|
|
558
|
+
|
|
559
|
+
render();
|
|
560
|
+
|
|
561
|
+
// Enter animation
|
|
562
|
+
const cardStyle = box.card.css;
|
|
563
|
+
const enterMove = getSlideOffset();
|
|
564
|
+
cardStyle.opacity = "0";
|
|
565
|
+
cardStyle.transform = "translate(" + enterMove.x + "px, " + enterMove.y + "px) scale(0.98)";
|
|
566
|
+
void box.card.elem.offsetWidth; // WHY: Apply the start position before the transition starts.
|
|
567
|
+
cardStyle.transition = "opacity " + ENTER_TIME + ", transform " + ENTER_TIME;
|
|
568
|
+
cardStyle.opacity = "1";
|
|
569
|
+
cardStyle.transform = "translate(0px, 0px) scale(1)";
|
|
570
|
+
|
|
571
|
+
Toast.list.push(box);
|
|
572
|
+
|
|
573
|
+
endObject(box);
|
|
574
|
+
setDefaultContainerBox(previousContainer);
|
|
575
|
+
|
|
576
|
+
startTimer();
|
|
577
|
+
|
|
578
|
+
// Too many toasts in this position: close the oldest.
|
|
579
|
+
const sameList = Toast.list.filter(function (toast) { return toast.toastPosition == position; });
|
|
580
|
+
if (sameList.length > options.maxVisible) {
|
|
581
|
+
sameList.slice(0, sameList.length - options.maxVisible).forEach(function (toast) { toast.close("limit"); });
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
return box;
|
|
585
|
+
|
|
586
|
+
};
|
|
587
|
+
|
|
588
|
+
// *** STATIC VARIABLES:
|
|
589
|
+
|
|
590
|
+
Toast.POSITIONS = ["top-right", "top-center", "top-left", "bottom-right", "bottom-center", "bottom-left"];
|
|
591
|
+
|
|
592
|
+
// Global options. Change with Toast.setOptions().
|
|
593
|
+
Toast.options = {
|
|
594
|
+
position: "top-right",
|
|
595
|
+
theme: "auto", // "light", "dark", "auto"
|
|
596
|
+
width: 360,
|
|
597
|
+
offset: 16, // Space to the screen edges
|
|
598
|
+
offsetTop: null, // Space to the top edge (Ex: under the header of an app). null: offset
|
|
599
|
+
offsetBottom: null, // Space to the bottom edge (Ex: over a tab bar). null: offset
|
|
600
|
+
gap: 10, // Space between toasts
|
|
601
|
+
maxVisible: 5, // In one position
|
|
602
|
+
zIndex: 3000,
|
|
603
|
+
smallScreenWidth: 520, // Page width: toasts use the full width below this.
|
|
604
|
+
durations: { success: 3000, info: 4000, warning: 5000, error: 7000, loading: 0 },
|
|
605
|
+
// The px above (width, offsets, gap, smallScreenWidth) multiplied, and the scale of a toast without its own.
|
|
606
|
+
// null: basic.uiScale (1 / page.zoom on a page fitted with page.fit())
|
|
607
|
+
scale: null,
|
|
608
|
+
};
|
|
609
|
+
|
|
610
|
+
// *** THEMES: the colors. (The style param has the shapes and the sizes.)
|
|
611
|
+
// USAGE: Toast.success("Saved", { theme: "dark" })
|
|
612
|
+
// USAGE: Toast.setOptions({ theme: "auto" }) // Every toast: "light", "dark", "auto" (the system setting)
|
|
613
|
+
// NOTE: A new theme needs only the keys that differ from the light theme.
|
|
614
|
+
// USAGE: Toast.THEMES.ocean = { background: "#0B2239", title: "#FFFFFF" };
|
|
615
|
+
Toast.THEMES = {
|
|
616
|
+
light: {
|
|
617
|
+
background: "#FFFFFF",
|
|
618
|
+
border: "rgba(11, 11, 11, 0.08)",
|
|
619
|
+
shadow: "0 8px 28px rgba(0, 0, 0, 0.14)",
|
|
620
|
+
title: "#1B1B1A",
|
|
621
|
+
message: "#5F5E5A",
|
|
622
|
+
close: "rgba(11, 11, 11, 0.45)",
|
|
623
|
+
closeHover: "rgba(11, 11, 11, 0.06)",
|
|
624
|
+
colors: { success: "#15935F", error: "#D93F3E", warning: "#B77A00", info: "#2A78D6", loading: "#6B6A65" },
|
|
625
|
+
},
|
|
626
|
+
dark: {
|
|
627
|
+
background: "#262625",
|
|
628
|
+
border: "rgba(255, 255, 255, 0.10)",
|
|
629
|
+
shadow: "0 8px 28px rgba(0, 0, 0, 0.5)",
|
|
630
|
+
title: "rgba(255, 255, 255, 0.95)",
|
|
631
|
+
message: "rgba(255, 255, 255, 0.65)",
|
|
632
|
+
close: "rgba(255, 255, 255, 0.5)",
|
|
633
|
+
closeHover: "rgba(255, 255, 255, 0.08)",
|
|
634
|
+
colors: { success: "#3CC08A", error: "#EF6B6A", warning: "#E8B23A", info: "#5A9CF0", loading: "rgba(255, 255, 255, 0.7)" },
|
|
635
|
+
},
|
|
636
|
+
};
|
|
637
|
+
|
|
638
|
+
// [toast] Visible toasts (oldest first)
|
|
639
|
+
Toast.list = [];
|
|
640
|
+
|
|
641
|
+
Toast._containers = {};
|
|
642
|
+
Toast._isResizeListening = 0;
|
|
643
|
+
Toast._layoutScale = 1; // the scale of the last layoutContainers()
|
|
644
|
+
|
|
645
|
+
// *** STATIC FUNCTIONS:
|
|
646
|
+
|
|
647
|
+
Toast.show = function (params = {}) {
|
|
648
|
+
return Toast(params);
|
|
649
|
+
};
|
|
650
|
+
|
|
651
|
+
Toast.success = function (message, params = {}) {
|
|
652
|
+
return Toast(Object.assign({}, params, { type: "success", message: message }));
|
|
653
|
+
};
|
|
654
|
+
|
|
655
|
+
Toast.error = function (message, params = {}) {
|
|
656
|
+
return Toast(Object.assign({}, params, { type: "error", message: message }));
|
|
657
|
+
};
|
|
658
|
+
|
|
659
|
+
Toast.warning = function (message, params = {}) {
|
|
660
|
+
return Toast(Object.assign({}, params, { type: "warning", message: message }));
|
|
661
|
+
};
|
|
662
|
+
|
|
663
|
+
Toast.info = function (message, params = {}) {
|
|
664
|
+
return Toast(Object.assign({}, params, { type: "info", message: message }));
|
|
665
|
+
};
|
|
666
|
+
|
|
667
|
+
// A "loading" toast that becomes "success" or "error". Returns the promise.
|
|
668
|
+
// texts: { loading, success, error } success and error can be functions: (value) => text
|
|
669
|
+
Toast.promise = function (promise, texts = {}, params = {}) {
|
|
670
|
+
|
|
671
|
+
const toast = Toast(Object.assign({}, params, {
|
|
672
|
+
type: "loading",
|
|
673
|
+
message: texts.loading || "Loading...",
|
|
674
|
+
duration: 0,
|
|
675
|
+
closable: 0,
|
|
676
|
+
}));
|
|
677
|
+
|
|
678
|
+
const getText = function (value, data) {
|
|
679
|
+
return (typeof value === "function") ? value(data) : value;
|
|
680
|
+
};
|
|
681
|
+
|
|
682
|
+
promise.then(function (data) {
|
|
683
|
+
toast.update({ type: "success", message: getText(texts.success, data) || "Done.", closable: 1 });
|
|
684
|
+
}, function (error) {
|
|
685
|
+
toast.update({ type: "error", message: getText(texts.error, error) || "Something went wrong.", closable: 1 });
|
|
686
|
+
});
|
|
687
|
+
|
|
688
|
+
return promise;
|
|
689
|
+
|
|
690
|
+
};
|
|
691
|
+
// USAGE: Toast.promise(fetch(url), { loading: "Sending...", success: "Sent.", error: (e) => e.message })
|
|
692
|
+
|
|
693
|
+
Toast.closeAll = function () {
|
|
694
|
+
Toast.list.slice().forEach(function (toast) { toast.close("api"); });
|
|
695
|
+
};
|
|
696
|
+
|
|
697
|
+
// USAGE: Toast.setOptions({ position: "bottom-center", theme: "dark", maxVisible: 3 })
|
|
698
|
+
// USAGE: Toast.setOptions({ position: "top-center", offsetTop: 64 }) // under a 56 px header
|
|
699
|
+
Toast.setOptions = function (values = {}) {
|
|
700
|
+
Object.keys(values).forEach(function (key) {
|
|
701
|
+
if (key == "durations") Object.assign(Toast.options.durations, values.durations);
|
|
702
|
+
else Toast.options[key] = values[key];
|
|
703
|
+
});
|
|
704
|
+
Toast.layoutContainers();
|
|
705
|
+
};
|
|
706
|
+
|
|
707
|
+
// GROUP: The stack of one position (created one time, on the page)
|
|
708
|
+
Toast.getContainer = function (position) {
|
|
709
|
+
|
|
710
|
+
let container = Toast._containers[position];
|
|
711
|
+
if (container && container.elem.isConnected) {
|
|
712
|
+
// WHY: a page changes basic.uiScale with page.zoom, often without a resize of the window
|
|
713
|
+
if (Toast.getScale() !== Toast._layoutScale) Toast.layoutContainers();
|
|
714
|
+
return container;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
const getAlign = function () {
|
|
718
|
+
if (position.endsWith("left")) return "left top";
|
|
719
|
+
if (position.endsWith("right")) return "right top";
|
|
720
|
+
return "center top";
|
|
721
|
+
};
|
|
722
|
+
|
|
723
|
+
const previous = getDefaultContainerBox();
|
|
724
|
+
setDefaultContainerBox(page);
|
|
725
|
+
|
|
726
|
+
container = VGroup({
|
|
727
|
+
width: Toast.options.width,
|
|
728
|
+
height: "auto",
|
|
729
|
+
align: getAlign(),
|
|
730
|
+
gap: 0,
|
|
731
|
+
});
|
|
732
|
+
container.css = {
|
|
733
|
+
alignItems: "stretch",
|
|
734
|
+
overflow: "visible", // WHY: Groups hide overflow. The card shadows were cut at the edges.
|
|
735
|
+
};
|
|
736
|
+
container.role = "region";
|
|
737
|
+
container.aria = { label: "Notifications" };
|
|
738
|
+
|
|
739
|
+
endGroup();
|
|
740
|
+
setDefaultContainerBox(previous);
|
|
741
|
+
|
|
742
|
+
container.toastPosition = position;
|
|
743
|
+
Toast._containers[position] = container;
|
|
744
|
+
|
|
745
|
+
if (!Toast._isResizeListening) {
|
|
746
|
+
Toast._isResizeListening = 1;
|
|
747
|
+
page.onResize(function () { Toast.layoutContainers(); });
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
Toast.layoutContainers();
|
|
751
|
+
return container;
|
|
752
|
+
|
|
753
|
+
};
|
|
754
|
+
|
|
755
|
+
// The scale of a toast: its own, else Toast.options.scale, else basic.uiScale. Toast.getScale(): of the containers
|
|
756
|
+
Toast.getScale = function (ownScale = null) {
|
|
757
|
+
return ownScale ?? Toast.options.scale ?? basic.uiScale;
|
|
758
|
+
};
|
|
759
|
+
|
|
760
|
+
// Places the containers. (Full width on small screens)
|
|
761
|
+
Toast.layoutContainers = function () {
|
|
762
|
+
|
|
763
|
+
const options = Toast.options;
|
|
764
|
+
const scale = Toast.getScale();
|
|
765
|
+
const offset = options.offset * scale;
|
|
766
|
+
const offsetTop = (options.offsetTop ?? options.offset) * scale;
|
|
767
|
+
const offsetBottom = (options.offsetBottom ?? options.offset) * scale;
|
|
768
|
+
// WHY smallScreenWidth x scale: page.width is in the px of the page, a fitted page has more of them
|
|
769
|
+
const isSmall = page.width < options.smallScreenWidth * scale;
|
|
770
|
+
Toast._layoutScale = scale;
|
|
771
|
+
|
|
772
|
+
Object.keys(Toast._containers).forEach(function (position) {
|
|
773
|
+
|
|
774
|
+
const container = Toast._containers[position];
|
|
775
|
+
const style = container.css;
|
|
776
|
+
|
|
777
|
+
// WHY: "absolute", not "fixed": the container is on page (page never scrolls). page.fit() / page.zoom give
|
|
778
|
+
// <body> a transform, and a fixed box is placed on the scaled <body> (a toast in the middle of a phone screen).
|
|
779
|
+
style.position = "absolute";
|
|
780
|
+
style.zIndex = String(options.zIndex);
|
|
781
|
+
style.top = "";
|
|
782
|
+
style.bottom = "";
|
|
783
|
+
style.left = "";
|
|
784
|
+
style.right = "";
|
|
785
|
+
style.transform = "none";
|
|
786
|
+
style.maxWidth = "calc(100% - " + (offset * 2) + "px)";
|
|
787
|
+
|
|
788
|
+
// WHY own top / bottom spaces: a bigger offset for a header also narrowed the toasts at the sides
|
|
789
|
+
if (position.startsWith("top")) style.top = offsetTop + "px";
|
|
790
|
+
else style.bottom = offsetBottom + "px";
|
|
791
|
+
|
|
792
|
+
if (isSmall) {
|
|
793
|
+
style.left = offset + "px";
|
|
794
|
+
style.width = "calc(100% - " + (offset * 2) + "px)";
|
|
795
|
+
return;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
style.width = (options.width * scale) + "px";
|
|
799
|
+
if (position.endsWith("left")) style.left = offset + "px";
|
|
800
|
+
else if (position.endsWith("right")) style.right = offset + "px";
|
|
801
|
+
else {
|
|
802
|
+
style.left = "50%";
|
|
803
|
+
style.transform = "translateX(-50%)";
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
});
|
|
807
|
+
|
|
808
|
+
};
|
|
809
|
+
|
|
810
|
+
// WHY: Label.text uses innerHTML. Texts must not be read as HTML.
|
|
811
|
+
Toast.escapeHtml = basic.escapeHtml; // (the name is kept: other code may use it)
|
|
812
|
+
|
|
813
|
+
// "#2A78D6", 0.2 -> "rgba(42, 120, 214, 0.2)" (rgba texts are used as they are)
|
|
814
|
+
Toast.alpha = function (color, alpha) {
|
|
815
|
+
if (!/^#[0-9a-f]{6}$/i.test(color)) return color.replace(/[\d.]+\)$/, alpha + ")");
|
|
816
|
+
const n = parseInt(color.slice(1), 16);
|
|
817
|
+
return "rgba(" + (n >> 16) + ", " + ((n >> 8) & 255) + ", " + (n & 255) + ", " + alpha + ")";
|
|
818
|
+
};
|
|
819
|
+
|
|
820
|
+
Toast.ICON_PATHS = {
|
|
821
|
+
success: '<circle cx="12" cy="12" r="10"/><path d="m7.5 12.5 3 3 6-6.5"/>',
|
|
822
|
+
error: '<circle cx="12" cy="12" r="10"/><path d="M15 9l-6 6M9 9l6 6"/>',
|
|
823
|
+
warning: '<path d="M10.3 3.9 2.4 17.6A2 2 0 0 0 4.1 20.6h15.8a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z"/><path d="M12 9.5v4M12 17h.01"/>',
|
|
824
|
+
info: '<circle cx="12" cy="12" r="10"/><path d="M12 11v5.5M12 7.5h.01"/>',
|
|
825
|
+
// WHY: SVG animation (SMIL): a turning icon without a CSS file.
|
|
826
|
+
loading: '<circle cx="12" cy="12" r="9" opacity="0.25"/><path d="M21 12a9 9 0 0 0-9-9"><animateTransform attributeName="transform" type="rotate" from="0 12 12" to="360 12 12" dur="0.8s" repeatCount="indefinite"/></path>',
|
|
827
|
+
};
|
|
828
|
+
|
|
829
|
+
Toast.getIconSvg = function (type, color, size) {
|
|
830
|
+
return '<svg xmlns="http://www.w3.org/2000/svg" width="' + size + '" height="' + size + '" viewBox="0 0 24 24" fill="none" stroke="' + color +
|
|
831
|
+
'" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">' + (Toast.ICON_PATHS[type] || Toast.ICON_PATHS.info) + '</svg>';
|
|
832
|
+
};
|
|
833
|
+
|
|
834
|
+
Toast.getCloseSvg = function (color, size = 16) {
|
|
835
|
+
return '<svg xmlns="http://www.w3.org/2000/svg" width="' + size + '" height="' + size + '" viewBox="0 0 24 24" fill="none" stroke="' + color +
|
|
836
|
+
'" stroke-width="2" stroke-linecap="round"><path d="M6 6l12 12M18 6 6 18"/></svg>';
|
|
837
|
+
};
|
|
838
|
+
|