@livenetworks/ashlar 1.6.1 → 2.0.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/LICENSE +641 -0
- package/README.md +190 -86
- package/{js → components}/COMPONENTS.md +1116 -1108
- package/{js → components}/index.js +81 -58
- package/{js → components}/ln-accordion/README.md +7 -6
- package/components/ln-accordion/ln-accordion-dev.scss +8 -0
- package/components/ln-accordion/ln-accordion.js +1 -0
- package/components/ln-accordion/ln-accordion.schema.json +30 -0
- package/components/ln-accordion/ln-accordion.scss +8 -0
- package/{js → components}/ln-accordion/src/ln-accordion.js +8 -2
- package/{js → components}/ln-ajax/README.md +171 -160
- package/components/ln-ajax/ln-ajax-dev.scss +8 -0
- package/components/ln-ajax/ln-ajax.js +1 -0
- package/components/ln-ajax/ln-ajax.schema.json +30 -0
- package/{js → components}/ln-ajax/src/ln-ajax.js +65 -30
- package/{js → components}/ln-api-connector/README.md +27 -5
- package/components/ln-api-connector/ln-api-connector.js +1 -0
- package/components/ln-api-connector/ln-api-connector.schema.json +96 -0
- package/components/ln-api-connector/src/connector-core.js +97 -0
- package/components/ln-api-connector/src/ln-api-connector.js +447 -0
- package/{js → components}/ln-api-queue/README.md +12 -9
- package/components/ln-api-queue/ln-api-queue.js +1 -0
- package/components/ln-api-queue/ln-api-queue.schema.json +34 -0
- package/{js → components}/ln-api-queue/src/ln-api-queue.js +33 -14
- package/{js → components}/ln-api-queue/src/queue-storage.js +7 -3
- package/{js → components}/ln-autoresize/README.md +129 -127
- package/components/ln-autoresize/ln-autoresize-dev.scss +8 -0
- package/components/ln-autoresize/ln-autoresize.js +1 -0
- package/components/ln-autoresize/ln-autoresize.schema.json +22 -0
- package/{js → components}/ln-autoresize/src/ln-autoresize.js +8 -1
- package/{js → components}/ln-autosave/README.md +127 -124
- package/components/ln-autosave/ln-autosave-dev.scss +13 -0
- package/components/ln-autosave/ln-autosave.js +1 -0
- package/components/ln-autosave/ln-autosave.schema.json +48 -0
- package/components/ln-autosave/src/autosave-model.js +34 -0
- package/{js → components}/ln-autosave/src/ln-autosave.js +65 -58
- package/components/ln-chart/README.md +145 -0
- package/components/ln-chart/ln-chart-dev.scss +20 -0
- package/components/ln-chart/ln-chart.js +1 -0
- package/components/ln-chart/ln-chart.schema.json +146 -0
- package/components/ln-chart/ln-chart.scss +8 -0
- package/components/ln-chart/src/chart-model.js +154 -0
- package/components/ln-chart/src/ln-chart.js +176 -0
- package/{js → components}/ln-circular-progress/README.md +15 -14
- package/components/ln-circular-progress/ln-circular-progress-dev.scss +8 -0
- package/components/ln-circular-progress/ln-circular-progress.js +1 -0
- package/components/ln-circular-progress/ln-circular-progress.schema.json +42 -0
- package/{js → components}/ln-circular-progress/src/ln-circular-progress.js +32 -50
- package/{js → components}/ln-confirm/README.md +69 -18
- package/components/ln-confirm/ln-confirm-dev.scss +24 -0
- package/components/ln-confirm/ln-confirm.js +1 -0
- package/components/ln-confirm/ln-confirm.schema.json +66 -0
- package/components/ln-confirm/ln-confirm.scss +24 -0
- package/{js → components}/ln-confirm/src/ln-confirm.js +180 -171
- package/{js → components}/ln-core/README.md +374 -149
- package/components/ln-core/attrs.js +273 -0
- package/components/ln-core/compare.js +40 -0
- package/components/ln-core/crypto.js +265 -0
- package/components/ln-core/date.js +50 -0
- package/components/ln-core/dom.js +115 -0
- package/components/ln-core/events.js +122 -0
- package/components/ln-core/form.js +136 -0
- package/{js → components}/ln-core/hash.js +149 -92
- package/components/ln-core/helpers.js +33 -0
- package/components/ln-core/http.js +48 -0
- package/components/ln-core/index.js +11 -0
- package/components/ln-core/lifecycle.js +403 -0
- package/components/ln-core/ln-core.schema.json +109 -0
- package/components/ln-core/locale.js +55 -0
- package/components/ln-core/matching.js +78 -0
- package/components/ln-core/number.js +125 -0
- package/components/ln-core/progress.js +30 -0
- package/components/ln-core/template.js +206 -0
- package/{js → components}/ln-core/window-cache.js +247 -213
- package/{js → components}/ln-couchdb-connector/README.md +7 -5
- package/components/ln-couchdb-connector/ln-couchdb-connector.js +1 -0
- package/components/ln-couchdb-connector/ln-couchdb-connector.schema.json +50 -0
- package/{js → components}/ln-couchdb-connector/src/ln-couchdb-connector.js +29 -43
- package/{js → components}/ln-data-coordinator/README.md +109 -73
- package/components/ln-data-coordinator/ln-data-coordinator-dev.scss +8 -0
- package/components/ln-data-coordinator/ln-data-coordinator.js +1 -0
- package/components/ln-data-coordinator/ln-data-coordinator.schema.json +196 -0
- package/components/ln-data-coordinator/src/data-read-policy.js +41 -0
- package/{js → components}/ln-data-coordinator/src/ln-data-coordinator.js +411 -154
- package/{js → components}/ln-data-coordinator/src/mutation-receipts.js +0 -5
- package/{js → components}/ln-data-store/README.md +42 -17
- package/components/ln-data-store/ln-data-store-dev.scss +13 -0
- package/components/ln-data-store/ln-data-store.js +1 -0
- package/components/ln-data-store/ln-data-store.schema.json +84 -0
- package/components/ln-data-store/src/data-store-model.js +155 -0
- package/{js → components}/ln-data-store/src/ln-data-store.js +407 -105
- package/components/ln-data-store/src/window-index.js +119 -0
- package/{js → components}/ln-date/README.md +17 -7
- package/{js → components}/ln-date/ln-date-dev.scss +14 -14
- package/components/ln-date/ln-date.js +1 -0
- package/components/ln-date/ln-date.schema.json +92 -0
- package/components/ln-date/src/date-model.js +186 -0
- package/components/ln-date/src/ln-date.js +486 -0
- package/components/ln-debug/README.md +132 -0
- package/components/ln-debug/ln-debug.js +1 -0
- package/components/ln-debug/ln-debug.schema.json +28 -0
- package/components/ln-debug/src/console-sink.js +19 -0
- package/components/ln-debug/src/debug-verifier.js +331 -0
- package/components/ln-debug/src/gate.js +95 -0
- package/components/ln-debug/src/generated-attributes.js +299 -0
- package/components/ln-debug/src/ln-debug.js +60 -0
- package/{js → components}/ln-dropdown/README.md +150 -140
- package/components/ln-dropdown/ln-dropdown-dev.scss +13 -0
- package/components/ln-dropdown/ln-dropdown.js +1 -0
- package/components/ln-dropdown/ln-dropdown.schema.json +90 -0
- package/components/ln-dropdown/ln-dropdown.scss +18 -0
- package/{js → components}/ln-dropdown/src/ln-dropdown.js +114 -11
- package/{js → components}/ln-editor/README.md +11 -9
- package/components/ln-editor/ln-editor-dev.scss +18 -0
- package/components/ln-editor/ln-editor.js +1 -0
- package/components/ln-editor/ln-editor.schema.json +58 -0
- package/components/ln-editor/ln-editor.scss +13 -0
- package/{js → components}/ln-editor/src/ln-editor.js +59 -11
- package/{js → components}/ln-external-links/README.md +10 -8
- package/components/ln-external-links/ln-external-links.js +1 -0
- package/components/ln-external-links/ln-external-links.schema.json +18 -0
- package/{js → components}/ln-external-links/src/ln-external-links.js +13 -11
- package/{js → components}/ln-fill/README.md +6 -8
- package/components/ln-fill/ln-fill.js +1 -0
- package/components/ln-fill/ln-fill.schema.json +23 -0
- package/{js → components}/ln-fill/src/ln-fill.js +7 -1
- package/components/ln-filter/README.md +131 -0
- package/components/ln-filter/ln-filter-dev.scss +13 -0
- package/components/ln-filter/ln-filter.js +1 -0
- package/components/ln-filter/ln-filter.schema.json +153 -0
- package/components/ln-filter/src/filter-model.js +185 -0
- package/components/ln-filter/src/ln-filter.js +435 -0
- package/{js → components}/ln-form/README.md +260 -264
- package/components/ln-form/ln-form-dev.scss +8 -0
- package/components/ln-form/ln-form.js +1 -0
- package/components/ln-form/ln-form.schema.json +45 -0
- package/{js → components}/ln-form/src/ln-form.js +107 -99
- package/{js → components}/ln-http/README.md +11 -6
- package/components/ln-http/ln-http.js +1 -0
- package/components/ln-http/ln-http.schema.json +6 -0
- package/components/ln-http/src/http-core.js +51 -0
- package/{js → components}/ln-http/src/ln-http.js +28 -33
- package/{js → components}/ln-icon/README.md +16 -9
- package/components/ln-icon/ln-icon.schema.json +6 -0
- package/components/ln-include/README.md +75 -0
- package/components/ln-include/ln-include-dev.scss +13 -0
- package/components/ln-include/ln-include.js +1 -0
- package/components/ln-include/ln-include.schema.json +23 -0
- package/components/ln-include/src/ln-include.js +111 -0
- package/components/ln-key/README.md +130 -0
- package/components/ln-key/ln-key-dev.scss +18 -0
- package/components/ln-key/ln-key.js +1 -0
- package/components/ln-key/ln-key.schema.json +56 -0
- package/components/ln-key/src/key-model.js +146 -0
- package/components/ln-key/src/ln-key.js +201 -0
- package/{js → components}/ln-link/README.md +7 -9
- package/components/ln-link/ln-link-dev.scss +8 -0
- package/components/ln-link/ln-link.js +1 -0
- package/components/ln-link/ln-link.schema.json +22 -0
- package/{js → components}/ln-link/src/ln-link.js +16 -11
- package/components/ln-list/README.md +152 -0
- package/components/ln-list/ln-list-dev.scss +8 -0
- package/components/ln-list/ln-list.js +1 -0
- package/components/ln-list/ln-list.schema.json +166 -0
- package/components/ln-list/ln-list.scss +25 -0
- package/{js → components}/ln-list/src/ln-list.js +1301 -1216
- package/{js → components}/ln-modal/README.md +13 -10
- package/components/ln-modal/ln-modal-dev.scss +18 -0
- package/components/ln-modal/ln-modal.js +1 -0
- package/components/ln-modal/ln-modal.schema.json +54 -0
- package/components/ln-modal/ln-modal.scss +51 -0
- package/{js → components}/ln-modal/src/ln-modal.js +164 -137
- package/{js → components}/ln-nav/README.md +11 -11
- package/components/ln-nav/ln-nav.js +1 -0
- package/components/ln-nav/ln-nav.schema.json +25 -0
- package/{js → components}/ln-nav/src/ln-nav.js +25 -14
- package/components/ln-number/README.md +205 -0
- package/{js → components}/ln-number/ln-number-dev.scss +13 -13
- package/components/ln-number/ln-number.js +1 -0
- package/components/ln-number/ln-number.schema.json +63 -0
- package/components/ln-number/src/ln-number.js +400 -0
- package/components/ln-number/src/number-model.js +31 -0
- package/components/ln-obfuscator/README.md +60 -0
- package/components/ln-obfuscator/ln-obfuscator.js +1 -0
- package/components/ln-obfuscator/ln-obfuscator.schema.json +49 -0
- package/components/ln-obfuscator/src/ln-obfuscator.js +159 -0
- package/components/ln-obfuscator/src/obfuscator-model.js +250 -0
- package/{js → components}/ln-options/README.md +3 -1
- package/components/ln-options/ln-options-dev.scss +13 -0
- package/components/ln-options/ln-options.js +1 -0
- package/components/ln-options/ln-options.schema.json +41 -0
- package/{js → components}/ln-options/src/ln-options.js +13 -5
- package/components/ln-persist/README.md +151 -0
- package/components/ln-persist/ln-persist.js +1 -0
- package/components/ln-persist/ln-persist.schema.json +28 -0
- package/components/ln-persist/src/ln-persist.js +83 -0
- package/components/ln-picklist/README.md +230 -0
- package/components/ln-picklist/ln-picklist-dev.scss +22 -0
- package/components/ln-picklist/ln-picklist.js +1 -0
- package/components/ln-picklist/ln-picklist.schema.json +49 -0
- package/components/ln-picklist/src/ln-picklist.js +228 -0
- package/{js → components}/ln-popover/README.md +164 -162
- package/components/ln-popover/ln-popover-dev.scss +13 -0
- package/components/ln-popover/ln-popover.js +1 -0
- package/components/ln-popover/ln-popover.schema.json +82 -0
- package/components/ln-popover/ln-popover.scss +18 -0
- package/{js → components}/ln-popover/src/ln-popover.js +42 -36
- package/{js → components}/ln-progress/README.md +410 -413
- package/components/ln-progress/ln-progress-dev.scss +8 -0
- package/components/ln-progress/ln-progress.js +1 -0
- package/components/ln-progress/ln-progress.schema.json +40 -0
- package/components/ln-progress/src/ln-progress.js +91 -0
- package/components/ln-progress/src/progress-model.js +20 -0
- package/{js → components}/ln-router/README.md +443 -432
- package/components/ln-router/ln-router-dev.scss +13 -0
- package/components/ln-router/ln-router.js +1 -0
- package/components/ln-router/ln-router.schema.json +68 -0
- package/{js → components}/ln-router/src/ln-router.js +585 -539
- package/components/ln-router/src/router-model.js +50 -0
- package/components/ln-scroll/README.md +45 -0
- package/components/ln-scroll/ln-scroll.js +1 -0
- package/components/ln-scroll/ln-scroll.schema.json +85 -0
- package/components/ln-scroll/src/ln-scroll.js +150 -0
- package/components/ln-search/README.md +188 -0
- package/components/ln-search/ln-search-dev.scss +13 -0
- package/components/ln-search/ln-search.js +1 -0
- package/components/ln-search/ln-search.schema.json +103 -0
- package/components/ln-search/src/ln-search.js +330 -0
- package/{js → components}/ln-slug/README.md +6 -3
- package/components/ln-slug/ln-slug-dev.scss +18 -0
- package/components/ln-slug/ln-slug.js +1 -0
- package/components/ln-slug/ln-slug.schema.json +23 -0
- package/{js → components}/ln-slug/src/ln-slug.js +20 -13
- package/components/ln-slug/src/slug-model.js +21 -0
- package/{js → components}/ln-sort/README.md +178 -170
- package/{js → components}/ln-sort/ln-sort-dev.scss +8 -8
- package/components/ln-sort/ln-sort.js +1 -0
- package/components/ln-sort/ln-sort.schema.json +104 -0
- package/components/ln-sort/src/ln-sort.js +321 -0
- package/components/ln-sort/src/sort-model.js +117 -0
- package/{js → components}/ln-sortable/README.md +7 -11
- package/components/ln-sortable/ln-sortable-dev.scss +13 -0
- package/components/ln-sortable/ln-sortable.js +1 -0
- package/components/ln-sortable/ln-sortable.schema.json +36 -0
- package/{js → components}/ln-sortable/src/ln-sortable.js +8 -13
- package/{js → components}/ln-stat/README.md +3 -1
- package/components/ln-stat/ln-stat-dev.scss +8 -0
- package/components/ln-stat/ln-stat.js +1 -0
- package/components/ln-stat/ln-stat.schema.json +32 -0
- package/{js → components}/ln-stat/src/ln-stat.js +14 -18
- package/components/ln-stat/src/stat-model.js +28 -0
- package/{js → components}/ln-table/README.md +37 -24
- package/{js → components}/ln-table/ln-table-dev.scss +17 -17
- package/components/ln-table/ln-table.js +1 -0
- package/components/ln-table/ln-table.schema.json +211 -0
- package/components/ln-table/ln-table.scss +15 -0
- package/{js → components}/ln-table/src/ln-table.js +1365 -1493
- package/components/ln-table/src/table-model.js +98 -0
- package/components/ln-table-coordinator/README.md +61 -0
- package/components/ln-table-coordinator/ln-table-coordinator.js +1 -0
- package/components/ln-table-coordinator/ln-table-coordinator.schema.json +93 -0
- package/components/ln-table-coordinator/src/ln-table-coordinator.js +193 -0
- package/{js → components}/ln-tabs/README.md +32 -14
- package/components/ln-tabs/ln-tabs-dev.scss +24 -0
- package/components/ln-tabs/ln-tabs.js +1 -0
- package/components/ln-tabs/ln-tabs.schema.json +75 -0
- package/components/ln-tabs/ln-tabs.scss +8 -0
- package/components/ln-tabs/src/ln-tabs.js +207 -0
- package/components/ln-tabs/src/tabs-model.js +82 -0
- package/{js → components}/ln-time/README.md +96 -95
- package/components/ln-time/ln-time-dev.scss +13 -0
- package/components/ln-time/ln-time.js +1 -0
- package/components/ln-time/ln-time.schema.json +38 -0
- package/{js → components}/ln-time/src/ln-time.js +206 -223
- package/components/ln-time/src/time-model.js +64 -0
- package/{js → components}/ln-toast/README.md +23 -5
- package/components/ln-toast/ln-toast-dev.scss +8 -0
- package/components/ln-toast/ln-toast.js +1 -0
- package/components/ln-toast/ln-toast.schema.json +65 -0
- package/components/ln-toast/ln-toast.scss +59 -0
- package/{js → components}/ln-toast/src/ln-toast.js +233 -232
- package/{js → components}/ln-toggle/README.md +198 -196
- package/{js → components}/ln-toggle/ln-toggle-dev.scss +13 -13
- package/components/ln-toggle/ln-toggle.js +1 -0
- package/components/ln-toggle/ln-toggle.schema.json +52 -0
- package/components/ln-toggle/ln-toggle.scss +37 -0
- package/{js → components}/ln-toggle/src/ln-toggle.js +61 -46
- package/{js → components}/ln-tooltip/README.md +6 -6
- package/{js → components}/ln-tooltip/ln-tooltip-dev.scss +9 -9
- package/components/ln-tooltip/ln-tooltip.js +1 -0
- package/components/ln-tooltip/ln-tooltip.schema.json +86 -0
- package/components/ln-tooltip/ln-tooltip.scss +9 -0
- package/{js → components}/ln-tooltip/src/ln-tooltip.js +14 -3
- package/{js → components}/ln-translations/README.md +3 -1
- package/components/ln-translations/ln-translations-dev.scss +13 -0
- package/components/ln-translations/ln-translations.js +1 -0
- package/components/ln-translations/ln-translations.schema.json +120 -0
- package/{js → components}/ln-translations/src/ln-translations.js +25 -10
- package/components/ln-ui-coordinator/README.md +101 -0
- package/components/ln-ui-coordinator/ln-ui-coordinator-dev.scss +8 -0
- package/components/ln-ui-coordinator/ln-ui-coordinator.js +1 -0
- package/components/ln-ui-coordinator/ln-ui-coordinator.schema.json +60 -0
- package/{js/ln-modal-coordinator/src/ln-modal-coordinator.js → components/ln-ui-coordinator/src/ln-ui-coordinator.js} +403 -345
- package/components/ln-upload/README.md +133 -0
- package/components/ln-upload/ln-upload-dev.scss +18 -0
- package/components/ln-upload/ln-upload.js +1 -0
- package/components/ln-upload/ln-upload.schema.json +193 -0
- package/components/ln-upload/ln-upload.scss +20 -0
- package/components/ln-upload/src/ln-upload.js +652 -0
- package/components/ln-upload/src/upload-model.js +78 -0
- package/{js → components}/ln-validate/README.md +182 -180
- package/{js → components}/ln-validate/ln-validate-dev.scss +15 -15
- package/components/ln-validate/ln-validate.js +1 -0
- package/components/ln-validate/ln-validate.schema.json +50 -0
- package/components/ln-validate/ln-validate.scss +7 -0
- package/{js → components}/ln-validate/src/ln-validate.js +23 -45
- package/components/ln-validate/src/validate-model.js +64 -0
- package/components/ln-websocket-connector/README.md +166 -0
- package/components/ln-websocket-connector/ln-websocket-connector.js +1 -0
- package/components/ln-websocket-connector/ln-websocket-connector.schema.json +29 -0
- package/components/ln-websocket-connector/src/ln-websocket-connector.js +279 -0
- package/ln-ashlar.html-data.json +1796 -0
- package/package.json +84 -61
- package/{scss → theme}/base/_global.scss +1 -2
- package/{scss → theme}/base/_reset.scss +1 -1
- package/{scss → theme}/base/_typography.scss +2 -0
- package/theme/brand.css +73 -0
- package/{scss → theme}/components/_app-shell.scss +8 -0
- package/theme/components/_button.scss +24 -0
- package/theme/components/_chart.scss +5 -0
- package/theme/components/_confirm.scss +6 -0
- package/{scss → theme}/components/_date.scss +30 -22
- package/{scss → theme}/components/_dropdown.scss +6 -1
- package/theme/components/_form.scss +140 -0
- package/{scss → theme}/components/_layout.scss +6 -0
- package/{scss → theme}/components/_ln-table.scss +1 -6
- package/theme/components/_picklist.scss +3 -0
- package/{scss → theme}/components/_sort.scss +10 -10
- package/theme/components/_status-badge.scss +6 -0
- package/{scss → theme}/components/_table.scss +16 -0
- package/{scss → theme}/components/_tabs.scss +0 -4
- package/theme/components/_toast.scss +48 -0
- package/{scss → theme}/components/_toggle.scss +1 -1
- package/theme/components/_upload.scss +45 -0
- package/{scss → theme}/config/_breakpoints.scss +1 -1
- package/theme/config/_contrast.scss +128 -0
- package/{scss → theme}/config/_density.scss +191 -205
- package/theme/config/_palette.scss +274 -0
- package/theme/config/_theme.scss +293 -0
- package/{scss → theme}/config/_tokens.scss +285 -441
- package/{scss → theme}/config/mixins/_accordion.scss +1 -1
- package/{scss → theme}/config/mixins/_alert.scss +1 -0
- package/{scss → theme}/config/mixins/_app-shell.scss +4 -2
- package/{scss → theme}/config/mixins/_borders.scss +2 -0
- package/theme/config/mixins/_btn.scss +175 -0
- package/{scss → theme}/config/mixins/_card.scss +55 -46
- package/theme/config/mixins/_chart.scss +82 -0
- package/{scss → theme}/config/mixins/_collapsible.scss +2 -1
- package/{scss → theme}/config/mixins/_colors.scss +8 -14
- package/{scss → theme}/config/mixins/_diagnostics.scss +48 -48
- package/theme/config/mixins/_dropdown.scss +169 -0
- package/{scss → theme}/config/mixins/_editor.scss +0 -7
- package/{scss → theme}/config/mixins/_filter.scss +47 -47
- package/{scss → theme}/config/mixins/_footer.scss +1 -1
- package/{scss → theme}/config/mixins/_form.scss +49 -18
- package/{scss → theme}/config/mixins/_index.scss +62 -61
- package/{scss → theme}/config/mixins/_layout.scss +6 -2
- package/{scss → theme}/config/mixins/_ln-table.scss +31 -10
- package/{scss → theme}/config/mixins/_loader.scss +1 -1
- package/{scss → theme}/config/mixins/_modal.scss +145 -149
- package/{scss → theme}/config/mixins/_motion.scss +13 -0
- package/{scss → theme}/config/mixins/_nav.scss +7 -7
- package/theme/config/mixins/_picklist.scss +66 -0
- package/theme/config/mixins/_popover.scss +96 -0
- package/{scss → theme}/config/mixins/_sidebar.scss +7 -4
- package/{scss → theme}/config/mixins/_sort.scss +43 -42
- package/{scss → theme}/config/mixins/_status-badge.scss +15 -2
- package/{scss → theme}/config/mixins/_table.scss +25 -14
- package/{scss → theme}/config/mixins/_tabs.scss +1 -1
- package/{scss → theme}/config/mixins/_toast.scss +174 -179
- package/{scss → theme}/config/mixins/_tooltip.scss +2 -2
- package/{scss → theme}/config/mixins/_typography.scss +16 -5
- package/{scss → theme}/config/mixins/_upload.scss +8 -6
- package/theme/ln-ashlar-core.scss +24 -0
- package/theme/ln-ashlar-dev.scss +66 -0
- package/theme/ln-ashlar-landing.scss +56 -0
- package/{scss/ln-ashlar.scss → theme/ln-ashlar-theme.scss} +63 -69
- package/theme/ln-ashlar.scss +8 -0
- package/theme/presentation/_bento.scss +151 -0
- package/theme/presentation/_cta.scss +111 -0
- package/theme/presentation/_effects.scss +216 -0
- package/theme/presentation/_features.scss +108 -0
- package/theme/presentation/_footer.scss +129 -0
- package/theme/presentation/_hero.scss +158 -0
- package/theme/presentation/_layout.scss +170 -0
- package/theme/presentation/_navbar.scss +140 -0
- package/theme/presentation/_pricing.scss +262 -0
- package/theme/presentation/_stats.scss +87 -0
- package/theme/presentation/_testimonials.scss +124 -0
- package/theme/presentation/_tokens.scss +39 -0
- package/theme/presentation/_typography.scss +163 -0
- package/{scss → theme}/utilities/_animations.scss +38 -0
- package/{scss → theme}/utilities/_utilities.scss +6 -0
- package/web-types.json +2312 -0
- package/js/ln-accordion/ln-accordion.js +0 -1
- package/js/ln-ajax/ln-ajax.js +0 -1
- package/js/ln-api-connector/ln-api-connector.js +0 -1
- package/js/ln-api-connector/src/ln-api-connector.js +0 -368
- package/js/ln-api-queue/ln-api-queue.js +0 -1
- package/js/ln-autoresize/ln-autoresize.js +0 -1
- package/js/ln-autosave/ln-autosave.js +0 -1
- package/js/ln-circular-progress/ln-circular-progress.js +0 -1
- package/js/ln-confirm/_ln-confirm.scss +0 -24
- package/js/ln-confirm/ln-confirm.js +0 -1
- package/js/ln-core/crypto.js +0 -83
- package/js/ln-core/helpers.js +0 -788
- package/js/ln-core/index.js +0 -7
- package/js/ln-core/persist.js +0 -97
- package/js/ln-couchdb-connector/ln-couchdb-connector.js +0 -1
- package/js/ln-data-coordinator/ln-data-coordinator.js +0 -1
- package/js/ln-data-coordinator/src/data-read-policy.js +0 -18
- package/js/ln-data-store/ln-data-store.js +0 -1
- package/js/ln-date/ln-date.js +0 -1
- package/js/ln-date/src/ln-date.js +0 -603
- package/js/ln-debug/README.md +0 -58
- package/js/ln-debug/ln-debug.js +0 -1
- package/js/ln-debug/src/ln-debug.js +0 -19
- package/js/ln-dropdown/ln-dropdown.js +0 -1
- package/js/ln-dropdown/ln-dropdown.scss +0 -15
- package/js/ln-editor/ln-editor.js +0 -1
- package/js/ln-editor/ln-editor.scss +0 -43
- package/js/ln-external-links/ln-external-links.js +0 -1
- package/js/ln-fill/ln-fill.js +0 -1
- package/js/ln-filter/README.md +0 -189
- package/js/ln-filter/ln-filter-dev.scss +0 -8
- package/js/ln-filter/ln-filter.js +0 -1
- package/js/ln-filter/src/ln-filter.js +0 -419
- package/js/ln-form/ln-form.js +0 -1
- package/js/ln-http/ln-http.js +0 -1
- package/js/ln-link/ln-link.js +0 -1
- package/js/ln-list/README.md +0 -129
- package/js/ln-list/ln-list.js +0 -1
- package/js/ln-list/ln-list.scss +0 -28
- package/js/ln-modal/ln-modal-dev.scss +0 -13
- package/js/ln-modal/ln-modal.js +0 -1
- package/js/ln-modal/ln-modal.scss +0 -35
- package/js/ln-modal-coordinator/README.md +0 -99
- package/js/ln-modal-coordinator/ln-modal-coordinator-dev.scss +0 -8
- package/js/ln-modal-coordinator/ln-modal-coordinator.js +0 -1
- package/js/ln-nav/ln-nav.js +0 -1
- package/js/ln-number/README.md +0 -149
- package/js/ln-number/ln-number.js +0 -1
- package/js/ln-number/src/ln-number.js +0 -443
- package/js/ln-options/ln-options.js +0 -1
- package/js/ln-popover/ln-popover.js +0 -1
- package/js/ln-progress/ln-progress.js +0 -1
- package/js/ln-progress/src/ln-progress.js +0 -98
- package/js/ln-router/ln-router.js +0 -1
- package/js/ln-search/README.md +0 -158
- package/js/ln-search/ln-search-dev.scss +0 -8
- package/js/ln-search/ln-search.js +0 -1
- package/js/ln-search/src/ln-search.js +0 -117
- package/js/ln-slug/ln-slug.js +0 -1
- package/js/ln-sort/ln-sort.js +0 -1
- package/js/ln-sort/src/ln-sort.js +0 -178
- package/js/ln-sortable/ln-sortable.js +0 -1
- package/js/ln-stat/ln-stat.js +0 -1
- package/js/ln-table/ln-table.js +0 -1
- package/js/ln-table/ln-table.scss +0 -11
- package/js/ln-table-coordinator/README.md +0 -73
- package/js/ln-table-coordinator/ln-table-coordinator.js +0 -1
- package/js/ln-table-coordinator/src/ln-table-coordinator.js +0 -160
- package/js/ln-tabs/ln-tabs-dev.scss +0 -18
- package/js/ln-tabs/ln-tabs.js +0 -1
- package/js/ln-tabs/src/ln-tabs.js +0 -188
- package/js/ln-time/ln-time.js +0 -1
- package/js/ln-toast/ln-toast.js +0 -1
- package/js/ln-toggle/ln-toggle.js +0 -1
- package/js/ln-tooltip/ln-tooltip.js +0 -1
- package/js/ln-tooltip/ln-tooltip.scss +0 -9
- package/js/ln-translations/ln-translations.js +0 -1
- package/js/ln-upload/README.md +0 -255
- package/js/ln-upload/ln-upload.js +0 -1
- package/js/ln-upload/ln-upload.scss +0 -20
- package/js/ln-upload/src/ln-upload.js +0 -423
- package/js/ln-validate/ln-validate.js +0 -1
- package/scss/components/_button.scss +0 -20
- package/scss/components/_confirm.scss +0 -5
- package/scss/components/_form.scss +0 -107
- package/scss/components/_status-badge.scss +0 -4
- package/scss/components/_toast.scss +0 -68
- package/scss/components/_upload.scss +0 -51
- package/scss/config/_theme.scss +0 -216
- package/scss/config/mixins/_btn.scss +0 -179
- package/scss/config/mixins/_confirm.scss +0 -31
- package/scss/config/mixins/_dropdown.scss +0 -141
- package/scss/config/mixins/_popover.scss +0 -64
- package/scss/ln-ashlar-dev.scss +0 -39
- /package/{js → components}/ln-core/positioning.js +0 -0
- /package/{js → components}/ln-core/reactive.js +0 -0
- /package/{js → components}/ln-filter/ln-filter.scss +0 -0
- /package/{js → components}/ln-icon/ln-icon.js +0 -0
- /package/{js → components}/ln-icon/src/ln-icon.js +0 -0
- /package/{js → components}/ln-search/ln-search.scss +0 -0
- /package/{js → components}/ln-toast/template.html +0 -0
- /package/{scss → theme}/components/_accordion.scss +0 -0
- /package/{scss → theme}/components/_ajax.scss +0 -0
- /package/{scss → theme}/components/_alert.scss +0 -0
- /package/{scss → theme}/components/_avatar.scss +0 -0
- /package/{scss → theme}/components/_breadcrumbs.scss +0 -0
- /package/{scss → theme}/components/_card.scss +0 -0
- /package/{scss → theme}/components/_chip.scss +0 -0
- /package/{scss → theme}/components/_circular-progress.scss +0 -0
- /package/{scss → theme}/components/_editor.scss +0 -0
- /package/{scss → theme}/components/_empty-state.scss +0 -0
- /package/{scss → theme}/components/_filter.scss +0 -0
- /package/{scss → theme}/components/_link.scss +0 -0
- /package/{scss → theme}/components/_loader.scss +0 -0
- /package/{scss → theme}/components/_modal.scss +0 -0
- /package/{scss → theme}/components/_nav.scss +0 -0
- /package/{scss → theme}/components/_page-header.scss +0 -0
- /package/{scss → theme}/components/_popover.scss +0 -0
- /package/{scss → theme}/components/_progress.scss +0 -0
- /package/{scss → theme}/components/_prose.scss +0 -0
- /package/{scss → theme}/components/_scrollbar.scss +0 -0
- /package/{scss → theme}/components/_sections.scss +0 -0
- /package/{scss → theme}/components/_sidebar.scss +0 -0
- /package/{scss → theme}/components/_stat-card.scss +0 -0
- /package/{scss → theme}/components/_stepper.scss +0 -0
- /package/{scss → theme}/components/_timeline.scss +0 -0
- /package/{scss → theme}/components/_tooltip.scss +0 -0
- /package/{scss → theme}/components/_translations.scss +0 -0
- /package/{scss → theme}/config/_icons.scss +0 -0
- /package/{scss → theme}/config/_mixins.scss +0 -0
- /package/{scss → theme}/config/mixins/_ajax.scss +0 -0
- /package/{scss → theme}/config/mixins/_avatar.scss +0 -0
- /package/{scss → theme}/config/mixins/_breadcrumbs.scss +0 -0
- /package/{scss → theme}/config/mixins/_breakpoints.scss +0 -0
- /package/{scss → theme}/config/mixins/_chip.scss +0 -0
- /package/{scss → theme}/config/mixins/_circular-progress.scss +0 -0
- /package/{scss → theme}/config/mixins/_display.scss +0 -0
- /package/{scss → theme}/config/mixins/_empty-state.scss +0 -0
- /package/{scss → theme}/config/mixins/_focus.scss +0 -0
- /package/{scss → theme}/config/mixins/_interaction.scss +0 -0
- /package/{scss → theme}/config/mixins/_kbd.scss +0 -0
- /package/{scss → theme}/config/mixins/_link.scss +0 -0
- /package/{scss → theme}/config/mixins/_page-header.scss +0 -0
- /package/{scss → theme}/config/mixins/_position.scss +0 -0
- /package/{scss → theme}/config/mixins/_progress.scss +0 -0
- /package/{scss → theme}/config/mixins/_prose.scss +0 -0
- /package/{scss → theme}/config/mixins/_shadows.scss +0 -0
- /package/{scss → theme}/config/mixins/_sizing.scss +0 -0
- /package/{scss → theme}/config/mixins/_spacing.scss +0 -0
- /package/{scss → theme}/config/mixins/_stat-card.scss +0 -0
- /package/{scss → theme}/config/mixins/_stepper.scss +0 -0
- /package/{scss → theme}/config/mixins/_timeline.scss +0 -0
- /package/{scss → theme}/config/mixins/_transitions.scss +0 -0
- /package/{scss → theme}/config/mixins/_translations.scss +0 -0
- /package/{scss → theme}/tabler-icons.txt +0 -0
|
@@ -1,413 +1,410 @@
|
|
|
1
|
-
# ln-progress
|
|
2
|
-
|
|
3
|
-
>
|
|
4
|
-
> `data-ln-progress
|
|
5
|
-
>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
- **
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
`
|
|
37
|
-
`
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
<div class="
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
`
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
| `data-ln-progress="N"` | bar element |
|
|
66
|
-
| `data-ln-progress-max="N"` |
|
|
67
|
-
| `
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
`detail.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
| `
|
|
115
|
-
| `
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
|
131
|
-
|
|
132
|
-
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
document.getElementById('
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
<div class="
|
|
201
|
-
<div data-ln-progress="
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
<div class="
|
|
220
|
-
<div data-ln-progress="
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
<
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
document.getElementById('upload-
|
|
250
|
-
e.
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
bar.
|
|
291
|
-
bar.classList.
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
<div class="
|
|
357
|
-
<div data-ln-progress="
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
<div
|
|
369
|
-
<div data-ln-progress="
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
- **`scss/components/_progress.scss`** — applies the base mixin to
|
|
412
|
-
`.progress` and applies the `.success` / `.warning` /
|
|
413
|
-
`.error` colour variants.
|
|
1
|
+
# ln-progress
|
|
2
|
+
|
|
3
|
+
> Applied to a child bar element via `data-ln-progress="value"` inside a track container. An attribute observer detects
|
|
4
|
+
> changes to `data-ln-progress` or `data-ln-progress-max`: it calculates `percentage = (value / max) * 100`, sets inline
|
|
5
|
+
> `style.width = percentage + '%'`, and synchronizes `aria-valuenow` on the element with zero internal state.
|
|
6
|
+
|
|
7
|
+
## Integration
|
|
8
|
+
|
|
9
|
+
### In-Bundle (Standard Integration)
|
|
10
|
+
To load `ln-progress` as part of the unified `ln-ashlar` bundle, include the main script:
|
|
11
|
+
```html
|
|
12
|
+
<script src="dist/ln-ashlar.iife.js" defer></script>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Standalone (Zero-Dependency IIFE)
|
|
16
|
+
If you only need the progress bar component, load the compiled zero-dependency IIFE directly:
|
|
17
|
+
```html
|
|
18
|
+
<script src="components/ln-progress/ln-progress.js" defer></script>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Source Files & Development
|
|
22
|
+
- **Active Development Source**: [components/ln-progress/src/ln-progress.js](file:///c:/laragon/www/ln-ashlar/components/ln-progress/src/ln-progress.js) — The source of truth for component logic.
|
|
23
|
+
- **Compiled Standalone**: [components/ln-progress/ln-progress.js](file:///c:/laragon/www/ln-ashlar/components/ln-progress/ln-progress.js) — The compiled, ready-to-use standalone bundle.
|
|
24
|
+
|
|
25
|
+
## Philosophy
|
|
26
|
+
|
|
27
|
+
A linear progress indicator is mechanically a track `<div>` wrapping
|
|
28
|
+
one or more child bar `<div>`s whose `width` is a percentage of the
|
|
29
|
+
track. The maths is `width = (value / max) * 100%`. What `ln-progress`
|
|
30
|
+
adds is the reactive plumbing: when the width gets recomputed, what
|
|
31
|
+
triggers a re-render, where the maximum comes from when multiple bars
|
|
32
|
+
share a denominator, and what survives a `destroy()` call.
|
|
33
|
+
|
|
34
|
+
The contract is simple: **the attribute IS the state**. There is no
|
|
35
|
+
`element.setValue(42)` API and no imperative entry point. You set
|
|
36
|
+
`data-ln-progress="42"` on a bar; the MutationObserver sees the
|
|
37
|
+
change; `_render` runs; the bar redraws. State is visible in DOM
|
|
38
|
+
Inspector at all times, can be set declaratively from server templates,
|
|
39
|
+
and survives `outerHTML` round-trips.
|
|
40
|
+
|
|
41
|
+
The component supports stacked bars sharing one denominator: declare
|
|
42
|
+
`data-ln-progress-max` on the parent track and every child bar reads
|
|
43
|
+
that as its max. This is what makes "4 done + 2 in progress + 1
|
|
44
|
+
pending = 7 total" render as three bars filling exactly one track.
|
|
45
|
+
|
|
46
|
+
## Quick start
|
|
47
|
+
|
|
48
|
+
```html
|
|
49
|
+
<div class="progress">
|
|
50
|
+
<div data-ln-progress="75" class="success"></div>
|
|
51
|
+
</div>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
A green bar at 75% of the track, no JS on the consumer side. The
|
|
55
|
+
`class="progress"` on the wrapper marks it as a track (pure CSS hook,
|
|
56
|
+
no JS instance is created). The `data-ln-progress="75"` on the child
|
|
57
|
+
marks it as a bar (instance is created, `style.width = "75%"` is
|
|
58
|
+
written).
|
|
59
|
+
|
|
60
|
+
## Attributes
|
|
61
|
+
|
|
62
|
+
| Attribute | On | Description |
|
|
63
|
+
|---|---|---|
|
|
64
|
+
| `data-ln-progress="N"` | bar element | Current value of the bar. Number; can be negative or above max — the rendered percentage clamps to 0–100. Empty / non-numeric values render as 0%. |
|
|
65
|
+
| `data-ln-progress-max="N"` | bar element | Maximum value for this bar. Default `100`. Used as the denominator. Setting `max="0"` collapses to 0%. |
|
|
66
|
+
| `data-ln-progress-max="N"` | track element | Shared max for all bar children. Wins over each bar's own max. The track itself uses `class="progress"` for styling — no JS instance is created on it. |
|
|
67
|
+
| `class="success"` / `.warning` / `.error` | bar element | Colour variant. Plain CSS, no JS involvement. |
|
|
68
|
+
|
|
69
|
+
The track is marked with `class="progress"` (pure CSS hook). The bar
|
|
70
|
+
is marked with `data-ln-progress="N"` (JS instance).
|
|
71
|
+
|
|
72
|
+
The component writes `role="progressbar"`, `aria-valuemin="0"`,
|
|
73
|
+
`aria-valuemax`, and `aria-valuenow` on **each bar element** on every
|
|
74
|
+
render. `aria-valuenow` is clamped to `[0, max]` to match the rendered
|
|
75
|
+
bar (so an overshoot value of `150` against `max=100` reports as
|
|
76
|
+
`100`). Add `aria-label` on the bar yourself for screen-reader context
|
|
77
|
+
— the component does not invent a label.
|
|
78
|
+
|
|
79
|
+
## Events
|
|
80
|
+
|
|
81
|
+
One event, bubbles, not cancelable.
|
|
82
|
+
|
|
83
|
+
| Event | `detail` | Dispatched on | Dispatched when |
|
|
84
|
+
|---|---|---|---|
|
|
85
|
+
| `ln-progress:change` | `{ target: HTMLElement, value: number, max: number, percentage: number }` | the bar element | every `_render` call: at construction, on every value or max attribute change (bar's own value, bar's own max, or parent track's max) |
|
|
86
|
+
|
|
87
|
+
`detail.value` is the raw `parseFloat` of the value attribute —
|
|
88
|
+
unclamped. `detail.max` is the resolved max (parent's first, then
|
|
89
|
+
bar's own, then 100). `detail.percentage` is the clamped 0–100
|
|
90
|
+
percentage written to `style.width`.
|
|
91
|
+
|
|
92
|
+
The event fires once per attribute write. Writing
|
|
93
|
+
`data-ln-progress="50"` then `"75"` synchronously fires the event
|
|
94
|
+
twice. The CSS transition smooths the visual to a single sweep, but
|
|
95
|
+
the event count is per-write.
|
|
96
|
+
|
|
97
|
+
There is no `:initialized` and no `:destroyed` event. The first
|
|
98
|
+
`ln-progress:change` fires inside `_render` during construction and serves as
|
|
99
|
+
the init signal for any consumer listening at the document level.
|
|
100
|
+
|
|
101
|
+
## API
|
|
102
|
+
|
|
103
|
+
`window.lnProgress(root)` re-runs the init scan over `root`. The
|
|
104
|
+
document-level observer managed by `registerComponent` covers AJAX inserts and
|
|
105
|
+
`data-ln-progress` attribute additions; call this manually only when
|
|
106
|
+
you inject markup into a Shadow DOM root or another document context
|
|
107
|
+
the observer cannot see.
|
|
108
|
+
|
|
109
|
+
`el.lnProgress` on a bar exposes:
|
|
110
|
+
|
|
111
|
+
| Property | Type | Description |
|
|
112
|
+
|---|---|---|
|
|
113
|
+
| `dom` | `HTMLElement` | back-reference to the bar element |
|
|
114
|
+
| `_parentObserver` | `MutationObserver \| null` | watches the parent track's `data-ln-progress-max` |
|
|
115
|
+
| `destroy()` | method | disconnects the parent observer, deletes `el.lnProgress`. Does NOT remove `data-ln-progress` itself, the colour class, or the inline `style.width`. |
|
|
116
|
+
|
|
117
|
+
There is no `setValue(n)`, `setMax(n)`, `update()`, or `redraw()`
|
|
118
|
+
method. The attribute is the API. A programmatic update is
|
|
119
|
+
`el.setAttribute('data-ln-progress', n)`, exactly the same as a
|
|
120
|
+
server-side render that writes the attribute into markup. To force a
|
|
121
|
+
re-render without changing the value, write the same value back —
|
|
122
|
+
the MutationObserver fires on any write, including identical ones.
|
|
123
|
+
|
|
124
|
+
## Max priority resolution
|
|
125
|
+
|
|
126
|
+
`_render` resolves the maximum in this order:
|
|
127
|
+
|
|
128
|
+
| Priority | Source | Truthy check |
|
|
129
|
+
|---|---|---|
|
|
130
|
+
| 1 | parent track's `data-ln-progress-max` parsed as float | parses to a finite number > 0 |
|
|
131
|
+
| 2 | bar's own `data-ln-progress-max` parsed as float | parses to a finite number > 0 |
|
|
132
|
+
| 3 | `100` (default) | always |
|
|
133
|
+
|
|
134
|
+
The chain is `parentMax || ownMax || 100`. Two consequences:
|
|
135
|
+
|
|
136
|
+
1. A parent declaring `data-ln-progress-max="0"` falls through to the
|
|
137
|
+
bar's own max, because `0` is falsy in JS. Same for non-numeric
|
|
138
|
+
values like `data-ln-progress-max="abc"` — `NaN` is falsy.
|
|
139
|
+
2. An own-max declaration is silently ignored when the parent declares
|
|
140
|
+
one. If a bar carries `data-ln-progress-max="50"` and the parent
|
|
141
|
+
carries `data-ln-progress-max="100"`, the parent wins — the bar
|
|
142
|
+
measures against 100. If you genuinely need per-bar maxes inside a
|
|
143
|
+
shared-max parent, do not declare the parent max; set each bar's
|
|
144
|
+
own max individually and accept that the bars no longer fill the
|
|
145
|
+
track in proportional fashion.
|
|
146
|
+
|
|
147
|
+
## Examples
|
|
148
|
+
|
|
149
|
+
### Minimal — fixed value
|
|
150
|
+
|
|
151
|
+
```html
|
|
152
|
+
<div class="progress">
|
|
153
|
+
<div data-ln-progress="75" class="success"></div>
|
|
154
|
+
</div>
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
The simplest case. Green bar at 75%, no JS on the consumer side.
|
|
158
|
+
|
|
159
|
+
### Reactive — change value at runtime
|
|
160
|
+
|
|
161
|
+
```html
|
|
162
|
+
<div id="upload-track" class="progress">
|
|
163
|
+
<div id="upload-bar" data-ln-progress="0" class="success"
|
|
164
|
+
aria-label="Upload progress"></div>
|
|
165
|
+
</div>
|
|
166
|
+
<button id="advance">Advance</button>
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
```js
|
|
170
|
+
let pct = 0;
|
|
171
|
+
document.getElementById('advance').addEventListener('click', function () {
|
|
172
|
+
pct = Math.min(100, pct + 10);
|
|
173
|
+
document.getElementById('upload-bar').setAttribute('data-ln-progress', pct);
|
|
174
|
+
});
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Each attribute write triggers a re-render and a `:change` event. The
|
|
178
|
+
CSS transition smoothly animates between widths. The component writes
|
|
179
|
+
`aria-valuenow` on the bar automatically — no manual sync needed.
|
|
180
|
+
|
|
181
|
+
### Custom max — non-percentage scale (per-bar)
|
|
182
|
+
|
|
183
|
+
```html
|
|
184
|
+
<!-- 7.5 GB of 10 GB — bar fills 75% of the track -->
|
|
185
|
+
<div class="progress">
|
|
186
|
+
<div data-ln-progress="7.5" data-ln-progress-max="10" class="warning"></div>
|
|
187
|
+
</div>
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
`max="10"` shifts the denominator so 7.5 maps to 75%. There is no
|
|
191
|
+
text label slot inside the bar; place descriptive text as a sibling
|
|
192
|
+
element if you need it.
|
|
193
|
+
|
|
194
|
+
### Stacked — multiple bars, one track, default max=100
|
|
195
|
+
|
|
196
|
+
```html
|
|
197
|
+
<!-- CPU 40% / RAM 30% / Disk 30% — sums to 100% of the track -->
|
|
198
|
+
<div class="progress">
|
|
199
|
+
<div data-ln-progress="40" class="success" aria-label="CPU usage"></div>
|
|
200
|
+
<div data-ln-progress="30" class="warning" aria-label="RAM usage"></div>
|
|
201
|
+
<div data-ln-progress="30" class="error" aria-label="Disk usage"></div>
|
|
202
|
+
</div>
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
Each bar uses the default max of 100. Three bars at 40 + 30 + 30 fill
|
|
206
|
+
the track exactly. If the values sum to less than 100, the remainder
|
|
207
|
+
of the track stays empty (the track's recessed background shows
|
|
208
|
+
through). If more than 100, each bar still renders at its clamped
|
|
209
|
+
0–100 width and the visuals overflow the track horizontally — the
|
|
210
|
+
SCSS `overflow: hidden` clips the overflow so the visual stays clean,
|
|
211
|
+
but the maths is wrong.
|
|
212
|
+
|
|
213
|
+
### Stacked — shared max on the parent track
|
|
214
|
+
|
|
215
|
+
```html
|
|
216
|
+
<!-- 4 done + 2 in progress + 1 pending = 7 total — fills the track exactly -->
|
|
217
|
+
<div class="progress" data-ln-progress-max="7">
|
|
218
|
+
<div data-ln-progress="4" class="success" aria-label="Done"></div>
|
|
219
|
+
<div data-ln-progress="2" class="warning" aria-label="In progress"></div>
|
|
220
|
+
<div data-ln-progress="1" class="error" aria-label="Pending"></div>
|
|
221
|
+
</div>
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
The track carries `data-ln-progress-max="7"`. Each child bar's
|
|
225
|
+
`_render` reads the parent's max first and uses `7` as the
|
|
226
|
+
denominator. Bar widths are 4/7 ≈ 57.1%, 2/7 ≈ 28.6%, 1/7 ≈ 14.3%,
|
|
227
|
+
summing to 100%.
|
|
228
|
+
|
|
229
|
+
Changing the parent's max at runtime
|
|
230
|
+
(`track.setAttribute('data-ln-progress-max', '10')`) re-renders each
|
|
231
|
+
child via the per-bar `_parentObserver`.
|
|
232
|
+
|
|
233
|
+
### Upload progress — driving from XHR
|
|
234
|
+
|
|
235
|
+
```html
|
|
236
|
+
<form id="upload-form">
|
|
237
|
+
<input type="file" name="file">
|
|
238
|
+
<div id="upload-track" class="progress">
|
|
239
|
+
<div id="upload-bar" data-ln-progress="0" class="success"
|
|
240
|
+
aria-label="Upload progress"></div>
|
|
241
|
+
</div>
|
|
242
|
+
<button type="submit">Upload</button>
|
|
243
|
+
</form>
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
```js
|
|
247
|
+
document.getElementById('upload-form').addEventListener('submit', function (e) {
|
|
248
|
+
e.preventDefault();
|
|
249
|
+
const bar = document.getElementById('upload-bar');
|
|
250
|
+
const file = e.target.querySelector('input[type=file]').files[0];
|
|
251
|
+
if (!file) return;
|
|
252
|
+
|
|
253
|
+
const xhr = new XMLHttpRequest();
|
|
254
|
+
const fd = new FormData(e.target);
|
|
255
|
+
|
|
256
|
+
xhr.upload.addEventListener('progress', function (ev) {
|
|
257
|
+
if (!ev.lengthComputable) return;
|
|
258
|
+
const pct = Math.round((ev.loaded / ev.total) * 100);
|
|
259
|
+
bar.setAttribute('data-ln-progress', pct);
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
xhr.upload.addEventListener('load', function () {
|
|
263
|
+
bar.setAttribute('data-ln-progress', 100);
|
|
264
|
+
});
|
|
265
|
+
|
|
266
|
+
xhr.open('POST', '/upload');
|
|
267
|
+
xhr.send(fd);
|
|
268
|
+
});
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
ARIA on the bar is managed automatically by `ln-progress` —
|
|
272
|
+
`aria-valuenow` updates on every attribute write. The `progress`
|
|
273
|
+
event fires often during a large upload — every 16ms or so on a fast
|
|
274
|
+
connection. Each call rewrites the attribute, the MutationObserver
|
|
275
|
+
fires, `_render` runs, and the `:change` event dispatches. If
|
|
276
|
+
profiling shows it as a hot spot, throttle the JS-side write to
|
|
277
|
+
every 100ms before calling `setAttribute`.
|
|
278
|
+
|
|
279
|
+
### Threshold-based colour — consumer code
|
|
280
|
+
|
|
281
|
+
The component has no automatic threshold colours. `class="success"`
|
|
282
|
+
/ `.warning` / `.error` are static — JS does not flip them based on
|
|
283
|
+
value. If you want red below 30% and green above 70%, that is
|
|
284
|
+
consumer code:
|
|
285
|
+
|
|
286
|
+
```js
|
|
287
|
+
function setProgressWithThreshold(bar, value) {
|
|
288
|
+
bar.setAttribute('data-ln-progress', value);
|
|
289
|
+
bar.classList.remove('success', 'warning', 'error');
|
|
290
|
+
if (value < 30) bar.classList.add('error');
|
|
291
|
+
else if (value < 70) bar.classList.add('warning');
|
|
292
|
+
else bar.classList.add('success');
|
|
293
|
+
}
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
The colour-class swap is a `classList` write — no MutationObserver
|
|
297
|
+
fires for it (the component watches `data-ln-progress` and
|
|
298
|
+
`data-ln-progress-max`, not `class`). The new colour applies via plain
|
|
299
|
+
CSS rules in `theme/components/_progress.scss`.
|
|
300
|
+
|
|
301
|
+
## What `ln-progress` does NOT do
|
|
302
|
+
|
|
303
|
+
- **Does NOT clamp the input attribute.** It clamps the *computed
|
|
304
|
+
percentage* between 0 and 100 before writing the width. The
|
|
305
|
+
attribute can hold any number; reading
|
|
306
|
+
`el.getAttribute('data-ln-progress')` after writing `'150'` returns
|
|
307
|
+
`'150'`, not `'100'`.
|
|
308
|
+
- **Does NOT have an indeterminate / striped / pulsing mode.**
|
|
309
|
+
No animated-stripes overlay, no shimmer, no pulse. For an
|
|
310
|
+
indeterminate indicator on an unbounded operation, use
|
|
311
|
+
`@mixin loader` (`theme/config/mixins/_loader.scss`) — different
|
|
312
|
+
visual idiom, separate primitive.
|
|
313
|
+
- **Does NOT debounce or throttle rapid-fire value changes.** Every
|
|
314
|
+
attribute write triggers a synchronous `_render` call. For
|
|
315
|
+
high-frequency flows (60+ writes/sec), the consumer is responsible
|
|
316
|
+
for throttling.
|
|
317
|
+
|
|
318
|
+
## Common mistakes
|
|
319
|
+
|
|
320
|
+
### 1. Setting `style.width` manually inside the markup
|
|
321
|
+
|
|
322
|
+
```html
|
|
323
|
+
<!-- WRONG — JS overwrites style.width on construction -->
|
|
324
|
+
<div class="progress">
|
|
325
|
+
<div data-ln-progress="75" class="success" style="width: 50%"></div>
|
|
326
|
+
</div>
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
The constructor's first action is `_render`, which writes
|
|
330
|
+
`this.dom.style.width = percentage + '%'`. Whatever inline width you
|
|
331
|
+
set in markup is overwritten on the first paint. If you want the bar
|
|
332
|
+
to render at a specific width, set the value via `data-ln-progress`,
|
|
333
|
+
not `style.width`.
|
|
334
|
+
|
|
335
|
+
### 2. Mixing percentage values with absolute max
|
|
336
|
+
|
|
337
|
+
```html
|
|
338
|
+
<!-- WRONG — value is "50" interpreted as a count, not 50% -->
|
|
339
|
+
<div class="progress">
|
|
340
|
+
<div data-ln-progress="50" data-ln-progress-max="500" class="success"></div>
|
|
341
|
+
</div>
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
This renders 50/500 = 10% of the track, probably not what the author
|
|
345
|
+
meant. The component does not interpret the value as a percentage; it
|
|
346
|
+
treats it as a count against the max. Either write the absolute count
|
|
347
|
+
(`250` for "50% of 500") or drop the max and use the default of 100
|
|
348
|
+
with the percentage as the value.
|
|
349
|
+
|
|
350
|
+
### 3. Multiple bars sharing a parent without declaring parent-max
|
|
351
|
+
|
|
352
|
+
```html
|
|
353
|
+
<!-- WRONG — three bars at 4 / 2 / 1, default max=100 each → 7% of track filled -->
|
|
354
|
+
<div class="progress">
|
|
355
|
+
<div data-ln-progress="4" class="success"></div>
|
|
356
|
+
<div data-ln-progress="2" class="warning"></div>
|
|
357
|
+
<div data-ln-progress="1" class="error"></div>
|
|
358
|
+
</div>
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
If the intent was "4 + 2 + 1 = 7 items, all visible proportionally,"
|
|
362
|
+
declare the parent's max:
|
|
363
|
+
|
|
364
|
+
```html
|
|
365
|
+
<!-- RIGHT -->
|
|
366
|
+
<div class="progress" data-ln-progress-max="7">
|
|
367
|
+
<div data-ln-progress="4" class="success"></div>
|
|
368
|
+
<div data-ln-progress="2" class="warning"></div>
|
|
369
|
+
<div data-ln-progress="1" class="error"></div>
|
|
370
|
+
</div>
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
Each bar reads parent max (`7`) as the denominator, and 4/7 + 2/7 +
|
|
374
|
+
1/7 fills the track exactly.
|
|
375
|
+
|
|
376
|
+
### 4. Forgetting `class="progress"` on the track wrapper
|
|
377
|
+
|
|
378
|
+
Without the class, the wrapper has no styling — no recessed
|
|
379
|
+
background, no rounded edges, no overflow clip. The bar still
|
|
380
|
+
renders correctly but visually escapes its track.
|
|
381
|
+
|
|
382
|
+
## 🔧 Internals
|
|
383
|
+
|
|
384
|
+
Source: `components/ln-progress/src/ln-progress.js` (~85 lines). Passive renderer — `_render` re-reads all three attributes fresh on every call; there is no cached value or max on the instance.
|
|
385
|
+
|
|
386
|
+
### Two observers, two concerns
|
|
387
|
+
|
|
388
|
+
1. `registerComponent`'s shared document-level observer instantiates new bars and handles own attribute mutations via `onAttributeChange` (`data-ln-progress`, `data-ln-progress-max`).
|
|
389
|
+
2. `_parentObserver` (per bar, always registered when a parent exists) watches the parent track's `data-ln-progress-max` — this is what makes a runtime change to the shared max re-render every child bar without any bar-side wiring.
|
|
390
|
+
|
|
391
|
+
### Construction order
|
|
392
|
+
|
|
393
|
+
`_render` runs once immediately (dispatching the first `:change` before the parent observer is wired), so a document-level listener attached before the bundle loads sees an event for every bar during the initial `DOMContentLoaded` scan; the parent observer is attached after.
|
|
394
|
+
|
|
395
|
+
### Render writes
|
|
396
|
+
|
|
397
|
+
Every `_render` call writes `style.width` and all four ARIA attributes (`role`, `aria-valuemin`, `aria-valuemax`, `aria-valuenow`) together, in the same pass that dispatches `:change` — there is no separate ARIA-sync step to keep in sync.
|
|
398
|
+
|
|
399
|
+
---
|
|
400
|
+
|
|
401
|
+
## Related
|
|
402
|
+
|
|
403
|
+
- **`@mixin progress`** (`theme/config/mixins/_progress.scss`) — the
|
|
404
|
+
recipe. Defines the track height, the recessed background, the
|
|
405
|
+
rounded full radius, the overflow clip, and the inner-bar rules
|
|
406
|
+
(initial `width: 0`, `transition: width var(--transition-base)`
|
|
407
|
+
gated through `motion-safe`, rounded right edge on the last child).
|
|
408
|
+
- **`theme/components/_progress.scss`** — applies the base mixin to
|
|
409
|
+
`.progress` and applies the `.success` / `.warning` /
|
|
410
|
+
`.error` colour variants.
|