@kubex/zinc 0.0.2 → 1.0.0
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/.editorconfig +18 -0
- package/.eslintignore +8 -0
- package/.eslintrc.cjs +208 -0
- package/.github/workflows/eleventy_build.yml +42 -0
- package/.github/workflows/js_build_and_deploy.yaml +62 -0
- package/custom-elements-manifest.config.js +230 -0
- package/custom-elements.json +24227 -0
- package/docs/_includes/component.njk +340 -0
- package/docs/_includes/default.njk +137 -0
- package/docs/_includes/sidebar.njk +24 -0
- package/docs/_utilities/active-links.cjs +41 -0
- package/docs/_utilities/anchor-headings.cjs +74 -0
- package/docs/_utilities/cem.cjs +89 -0
- package/docs/_utilities/code-previews.cjs +98 -0
- package/docs/_utilities/copy-code-buttons.cjs +26 -0
- package/docs/_utilities/external-links.cjs +53 -0
- package/docs/_utilities/highlight-code.cjs +74 -0
- package/docs/_utilities/markdown.cjs +74 -0
- package/docs/_utilities/prettier.cjs +26 -0
- package/docs/_utilities/replacer.cjs +24 -0
- package/docs/_utilities/scrolling-tables.cjs +23 -0
- package/docs/_utilities/strings.cjs +16 -0
- package/docs/_utilities/table-of-contents.cjs +48 -0
- package/docs/_utilities/typography.cjs +24 -0
- package/docs/assets/icons.json +57989 -0
- package/docs/assets/images/chrome.png +0 -0
- package/docs/assets/images/edge.png +0 -0
- package/docs/assets/images/firefox.png +0 -0
- package/docs/assets/images/opera.png +0 -0
- package/docs/assets/images/safari.png +0 -0
- package/docs/assets/images/watermark.svg +1 -0
- package/docs/assets/rip.js +78 -0
- package/docs/assets/scripts/code-previews.js +250 -0
- package/docs/assets/scripts/docs.js +374 -0
- package/docs/assets/scripts/search.js +441 -0
- package/docs/assets/scripts/turbo.js +29 -0
- package/docs/assets/styles/code-previews.css +169 -0
- package/docs/assets/styles/docs.css +1168 -0
- package/docs/assets/styles/search.css +347 -0
- package/docs/eleventy.config.cjs +262 -0
- package/docs/pages/components/absolute-container.md +35 -0
- package/docs/pages/components/action-bar.md +58 -0
- package/docs/pages/components/alert.md +45 -0
- package/docs/pages/components/bulk-actions.md +26 -0
- package/docs/pages/components/button-group.md +78 -0
- package/docs/pages/components/button-menu.md +127 -0
- package/docs/pages/components/button.md +80 -0
- package/docs/pages/components/chart.md +27 -0
- package/docs/pages/components/checkbox-group.md +196 -0
- package/docs/pages/components/checkbox.md +157 -0
- package/docs/pages/components/chip.md +61 -0
- package/docs/pages/components/collapsible.md +52 -0
- package/docs/pages/components/cols.md +66 -0
- package/docs/pages/components/confirm.md +52 -0
- package/docs/pages/components/content-block.md +108 -0
- package/docs/pages/components/copy-button.md +22 -0
- package/docs/pages/components/data-select.md +54 -0
- package/docs/pages/components/data-table-filter.md +23 -0
- package/docs/pages/components/data-table-sort.md +20 -0
- package/docs/pages/components/data-table.md +74 -0
- package/docs/pages/components/datepicker.md +25 -0
- package/docs/pages/components/defined-label.md +26 -0
- package/docs/pages/components/dialog.md +145 -0
- package/docs/pages/components/dropdown.md +22 -0
- package/docs/pages/components/editor.md +26 -0
- package/docs/pages/components/empty-state.md +51 -0
- package/docs/pages/components/expanding-action.md +55 -0
- package/docs/pages/components/file.md +45 -0
- package/docs/pages/components/form-group.md +22 -0
- package/docs/pages/components/header.md +103 -0
- package/docs/pages/components/icon.md +322 -0
- package/docs/pages/components/inline-edit.md +41 -0
- package/docs/pages/components/input.md +261 -0
- package/docs/pages/components/item.md +78 -0
- package/docs/pages/components/linked-select.md +41 -0
- package/docs/pages/components/menu-item.md +22 -0
- package/docs/pages/components/menu.md +36 -0
- package/docs/pages/components/navbar.md +57 -0
- package/docs/pages/components/note.md +55 -0
- package/docs/pages/components/option.md +22 -0
- package/docs/pages/components/order-table.md +22 -0
- package/docs/pages/components/page-nav.md +23 -0
- package/docs/pages/components/pagination.md +22 -0
- package/docs/pages/components/pane.md +22 -0
- package/docs/pages/components/panel.md +124 -0
- package/docs/pages/components/popup.md +22 -0
- package/docs/pages/components/progress-bar.md +22 -0
- package/docs/pages/components/progress-tile.md +22 -0
- package/docs/pages/components/query-builder.md +148 -0
- package/docs/pages/components/radio-group.md +129 -0
- package/docs/pages/components/radio.md +20 -0
- package/docs/pages/components/rating.md +28 -0
- package/docs/pages/components/scroll-container.md +22 -0
- package/docs/pages/components/select.md +452 -0
- package/docs/pages/components/sidebar.md +28 -0
- package/docs/pages/components/simple-chart.md +23 -0
- package/docs/pages/components/skeleton.md +70 -0
- package/docs/pages/components/slideout.md +23 -0
- package/docs/pages/components/sp.md +87 -0
- package/docs/pages/components/split-button.md +32 -0
- package/docs/pages/components/split-pane.md +22 -0
- package/docs/pages/components/stat.md +24 -0
- package/docs/pages/components/status-indicator.md +13 -0
- package/docs/pages/components/stepper.md +20 -0
- package/docs/pages/components/style.md +106 -0
- package/docs/pages/components/table.md +22 -0
- package/docs/pages/components/tabs.md +57 -0
- package/docs/pages/components/textarea.md +120 -0
- package/docs/pages/components/tile-property.md +29 -0
- package/docs/pages/components/tile.md +51 -0
- package/docs/pages/components/timer.md +22 -0
- package/docs/pages/components/toggle.md +22 -0
- package/docs/pages/components/tooltip.md +242 -0
- package/docs/pages/components/vertical-stepper.md +22 -0
- package/docs/pages/components/well.md +13 -0
- package/docs/pages/getting-started/example-layout.md +143 -0
- package/docs/pages/getting-started/example-page.md +83 -0
- package/docs/pages/getting-started/form-controls.md +552 -0
- package/docs/pages/getting-started/form-examples.md +122 -0
- package/docs/pages/getting-started/table-examples.md +43 -0
- package/docs/pages/index.md +32 -0
- package/index.html +22 -0
- package/package.json +111 -11
- package/scripts/build.js +381 -0
- package/scripts/generator/generator.js +102 -0
- package/scripts/generator/index.js +17 -0
- package/scripts/generator/preprocess.js +20 -0
- package/scripts/generator/resolver.js +86 -0
- package/scripts/generator/tailwind.config.js +14 -0
- package/scripts/make-metadata.js +10 -0
- package/scripts/make-themes.js +27 -0
- package/scripts/plop/plopfile.js +63 -0
- package/scripts/plop/templates/component.hbs +43 -0
- package/scripts/plop/templates/define.hbs +12 -0
- package/scripts/plop/templates/docs.hbs +20 -0
- package/scripts/plop/templates/style.hbs +5 -0
- package/scripts/plop/templates/test.hbs +10 -0
- package/scss/_global-components.scss +4 -0
- package/scss/_global-spacing.scss +96 -0
- package/scss/_root.scss +202 -0
- package/scss/boot.scss +29 -0
- package/scss/mixins/_helper-mixins.scss +24 -0
- package/scss/mixins/_spacing-mixins.scss +84 -0
- package/scss/mixins/index.scss +2 -0
- package/scss/shared/_base.scss +138 -0
- package/scss/shared/_button.scss +27 -0
- package/scss/shared/_form-elements.scss +162 -0
- package/scss/shared/_opacity.scss +27 -0
- package/scss/shared/_reset.scss +288 -0
- package/scss/shared/_table.scss +73 -0
- package/scss/shared/divide.scss +41 -0
- package/scss/shared/index.scss +12 -0
- package/scss/shared/layout.scss +290 -0
- package/scss/shared/nav.scss +71 -0
- package/scss/themes/_dark.scss +277 -0
- package/scss/themes/_index.scss +3 -0
- package/scss/themes/_light.scss +540 -0
- package/scss/themes/_utility.scss +44 -0
- package/scss/variables/_spacing.scss +35 -0
- package/scss/variables/index.scss +1 -0
- package/src/components/absolute-container/absolute-container.component.ts +62 -0
- package/src/components/absolute-container/absolute-container.test.ts +10 -0
- package/src/components/absolute-container/index.ts +12 -0
- package/src/components/action-bar/action-bar.component.ts +41 -0
- package/src/components/action-bar/action-bar.scss +33 -0
- package/src/components/action-bar/action-bar.test.ts +10 -0
- package/src/components/action-bar/index.ts +12 -0
- package/src/components/alert/alert.component.ts +71 -0
- package/src/components/alert/alert.scss +170 -0
- package/src/components/alert/alert.test.ts +10 -0
- package/src/components/alert/index.ts +12 -0
- package/src/components/bulk-actions/bulk-actions.component.ts +229 -0
- package/src/components/bulk-actions/bulk-actions.scss +56 -0
- package/src/components/bulk-actions/bulk-actions.test.ts +10 -0
- package/src/components/bulk-actions/index.ts +12 -0
- package/src/components/button/button.component.ts +242 -0
- package/src/components/button/button.scss +346 -0
- package/src/components/button/button.test.ts +32 -0
- package/src/components/button/index.ts +12 -0
- package/src/components/button-group/button-group.component.ts +74 -0
- package/src/components/button-group/button-group.scss +39 -0
- package/src/components/button-group/button-group.test.ts +10 -0
- package/src/components/button-group/index.ts +12 -0
- package/src/components/button-menu/button-menu.component.ts +353 -0
- package/src/components/button-menu/button-menu.scss +41 -0
- package/src/components/button-menu/button-menu.test.ts +10 -0
- package/src/components/button-menu/index.ts +12 -0
- package/src/components/chart/chart.component.ts +206 -0
- package/src/components/chart/chart.scss +11 -0
- package/src/components/chart/chart.test.ts +10 -0
- package/src/components/chart/index.ts +12 -0
- package/src/components/checkbox/checkbox.component.ts +326 -0
- package/src/components/checkbox/checkbox.scss +202 -0
- package/src/components/checkbox/checkbox.test.ts +10 -0
- package/src/components/checkbox/index.ts +12 -0
- package/src/components/checkbox-group/checkbox-group.component.ts +351 -0
- package/src/components/checkbox-group/checkbox-group.scss +60 -0
- package/src/components/checkbox-group/checkbox-group.test.ts +10 -0
- package/src/components/checkbox-group/index.ts +12 -0
- package/src/components/chip/chip.component.ts +70 -0
- package/src/components/chip/chip.scss +101 -0
- package/src/components/chip/chip.test.ts +10 -0
- package/src/components/chip/index.ts +12 -0
- package/src/components/collapsible/collapsible.component.ts +86 -0
- package/src/components/collapsible/collapsible.scss +100 -0
- package/src/components/collapsible/collapsible.test.ts +10 -0
- package/src/components/collapsible/index.ts +12 -0
- package/src/components/cols/cols.component.ts +76 -0
- package/src/components/cols/cols.scss +99 -0
- package/src/components/cols/cols.test.ts +10 -0
- package/src/components/cols/index.ts +12 -0
- package/src/components/confirm/confirm.component.ts +181 -0
- package/src/components/confirm/confirm.scss +44 -0
- package/src/components/confirm/confirm.test.ts +10 -0
- package/src/components/confirm/index.ts +12 -0
- package/src/components/content-block/content-block.component.ts +225 -0
- package/src/components/content-block/content-block.scss +64 -0
- package/src/components/content-block/content-block.test.ts +10 -0
- package/src/components/content-block/index.ts +12 -0
- package/src/components/copy-button/copy-button.component.ts +163 -0
- package/src/components/copy-button/copy-button.scss +47 -0
- package/src/components/copy-button/copy-button.test.ts +10 -0
- package/src/components/copy-button/index.ts +12 -0
- package/src/components/data-select/data-select.component.ts +219 -0
- package/src/components/data-select/data-select.scss +43 -0
- package/src/components/data-select/data-select.test.ts +10 -0
- package/src/components/data-select/index.ts +12 -0
- package/src/components/data-select/providers/color-data-provider.ts +16 -0
- package/src/components/data-select/providers/country-code-data-provider.ts +517 -0
- package/src/components/data-select/providers/country-data-provider.ts +527 -0
- package/src/components/data-select/providers/currency-data-provider.ts +328 -0
- package/src/components/data-select/providers/provider.ts +32 -0
- package/src/components/data-table/data-table.component.ts +1093 -0
- package/src/components/data-table/data-table.scss +330 -0
- package/src/components/data-table/data-table.test.ts +10 -0
- package/src/components/data-table/index.ts +12 -0
- package/src/components/data-table-filter/data-table-filter.component.ts +126 -0
- package/src/components/data-table-filter/data-table-filter.scss +22 -0
- package/src/components/data-table-filter/data-table-filter.test.ts +10 -0
- package/src/components/data-table-filter/index.ts +12 -0
- package/src/components/data-table-sort/data-table-sort.component.ts +56 -0
- package/src/components/data-table-sort/data-table-sort.scss +37 -0
- package/src/components/data-table-sort/data-table-sort.test.ts +10 -0
- package/src/components/data-table-sort/index.ts +12 -0
- package/src/components/datepicker/datepicker.component.ts +315 -0
- package/src/components/datepicker/datepicker.scss +237 -0
- package/src/components/datepicker/datepicker.test.ts +10 -0
- package/src/components/datepicker/index.ts +12 -0
- package/src/components/defined-label/defined-label.component.ts +241 -0
- package/src/components/defined-label/defined-label.scss +43 -0
- package/src/components/defined-label/defined-label.test.ts +10 -0
- package/src/components/defined-label/index.ts +12 -0
- package/src/components/dialog/dialog.component.ts +237 -0
- package/src/components/dialog/dialog.scss +197 -0
- package/src/components/dialog/dialog.test.ts +10 -0
- package/src/components/dialog/index.ts +12 -0
- package/src/components/dropdown/dropdown.component.ts +380 -0
- package/src/components/dropdown/dropdown.scss +9 -0
- package/src/components/dropdown/dropdown.test.ts +10 -0
- package/src/components/dropdown/index.ts +12 -0
- package/src/components/editor/editor.component.ts +423 -0
- package/src/components/editor/editor.scss +131 -0
- package/src/components/editor/editor.test.ts +10 -0
- package/src/components/editor/index.ts +12 -0
- package/src/components/editor/modules/attachment-module.ts +195 -0
- package/src/components/editor/modules/dialog-module/dialog-module.component.ts +289 -0
- package/src/components/editor/modules/dialog-module/dialog-module.scss +115 -0
- package/src/components/editor/modules/dialog-module/dialog-module.ts +99 -0
- package/src/components/editor/modules/drag-drop-module.ts +125 -0
- package/src/components/editor/modules/events/zn-command-select.ts +7 -0
- package/src/components/editor/modules/events/zn-editor-update.ts +7 -0
- package/src/components/editor/modules/events/zn-show-canned-response-dialog.ts +15 -0
- package/src/components/editor/modules/image-resize-module/image-resize-module.ts +157 -0
- package/src/components/editor/modules/menu-module/menu-module.component.ts +149 -0
- package/src/components/editor/modules/menu-module/menu-module.scss +17 -0
- package/src/components/editor/modules/menu-module/menu-module.ts +203 -0
- package/src/components/editor/modules/time-tracking-module.ts +35 -0
- package/src/components/empty-state/empty-state.component.ts +63 -0
- package/src/components/empty-state/empty-state.scss +91 -0
- package/src/components/empty-state/empty-state.test.ts +10 -0
- package/src/components/empty-state/index.ts +12 -0
- package/src/components/expanding-action/expanding-action.component.ts +312 -0
- package/src/components/expanding-action/expanding-action.scss +87 -0
- package/src/components/expanding-action/expanding-action.test.ts +10 -0
- package/src/components/expanding-action/index.ts +12 -0
- package/src/components/file/file.component.ts +619 -0
- package/src/components/file/file.scss +200 -0
- package/src/components/file/file.test.ts +10 -0
- package/src/components/file/index.ts +12 -0
- package/src/components/form-group/form-group.component.ts +93 -0
- package/src/components/form-group/form-group.scss +84 -0
- package/src/components/form-group/form-group.test.ts +10 -0
- package/src/components/form-group/index.ts +12 -0
- package/src/components/header/header.component.ts +186 -0
- package/src/components/header/header.scss +244 -0
- package/src/components/header/header.test.ts +10 -0
- package/src/components/header/index.ts +12 -0
- package/src/components/hover-container/hover-container.component.ts +214 -0
- package/src/components/hover-container/hover-container.scss +59 -0
- package/src/components/hover-container/hover-container.ts +10 -0
- package/src/components/hover-container/index.ts +12 -0
- package/src/components/icon/icon.component.ts +251 -0
- package/src/components/icon/icon.scss +186 -0
- package/src/components/icon/icon.test.ts +10 -0
- package/src/components/icon/index.ts +13 -0
- package/src/components/icon/lni.scss +2492 -0
- package/src/components/inline-edit/index.ts +12 -0
- package/src/components/inline-edit/inline-edit.component.ts +289 -0
- package/src/components/inline-edit/inline-edit.scss +139 -0
- package/src/components/inline-edit/inline-edit.test.ts +10 -0
- package/src/components/input/index.ts +12 -0
- package/src/components/input/input.component.ts +614 -0
- package/src/components/input/input.scss +355 -0
- package/src/components/input/input.test.ts +10 -0
- package/src/components/item/index.ts +12 -0
- package/src/components/item/item.component.ts +102 -0
- package/src/components/item/item.scss +161 -0
- package/src/components/item/item.test.ts +10 -0
- package/src/components/linked-select/index.ts +12 -0
- package/src/components/linked-select/linked-select.component.ts +156 -0
- package/src/components/linked-select/linked-select.scss +9 -0
- package/src/components/linked-select/linked-select.test.ts +17 -0
- package/src/components/menu/index.ts +12 -0
- package/src/components/menu/menu.component.ts +243 -0
- package/src/components/menu/menu.scss +14 -0
- package/src/components/menu/menu.test.ts +10 -0
- package/src/components/menu-item/index.ts +12 -0
- package/src/components/menu-item/menu-item.component.ts +220 -0
- package/src/components/menu-item/menu-item.scss +157 -0
- package/src/components/menu-item/menu-item.test.ts +10 -0
- package/src/components/menu-item/submenu-controller.ts +291 -0
- package/src/components/navbar/index.ts +12 -0
- package/src/components/navbar/navbar.component.ts +240 -0
- package/src/components/navbar/navbar.scss +411 -0
- package/src/components/navbar/navbar.test.ts +10 -0
- package/src/components/note/index.ts +12 -0
- package/src/components/note/note.component.ts +60 -0
- package/src/components/note/note.scss +69 -0
- package/src/components/note/note.test.ts +10 -0
- package/src/components/option/index.ts +12 -0
- package/src/components/option/option.component.ts +152 -0
- package/src/components/option/option.scss +88 -0
- package/src/components/option/option.test.ts +10 -0
- package/src/components/order-table/index.ts +12 -0
- package/src/components/order-table/order-table.component.ts +323 -0
- package/src/components/order-table/order-table.scss +154 -0
- package/src/components/order-table/order-table.test.ts +10 -0
- package/src/components/page-nav/index.ts +12 -0
- package/src/components/page-nav/page-nav.component.ts +117 -0
- package/src/components/page-nav/page-nav.scss +155 -0
- package/src/components/page-nav/page-nav.test.ts +10 -0
- package/src/components/pagination/index.ts +12 -0
- package/src/components/pagination/pagination.component.ts +91 -0
- package/src/components/pagination/pagination.scss +76 -0
- package/src/components/pagination/pagination.test.ts +10 -0
- package/src/components/pane/index.ts +12 -0
- package/src/components/pane/pane.component.ts +52 -0
- package/src/components/pane/pane.scss +45 -0
- package/src/components/pane/pane.test.ts +10 -0
- package/src/components/panel/index.ts +12 -0
- package/src/components/panel/panel.component.ts +100 -0
- package/src/components/panel/panel.scss +129 -0
- package/src/components/panel/panel.test.ts +10 -0
- package/src/components/popup/index.ts +12 -0
- package/src/components/popup/popup.component.ts +543 -0
- package/src/components/popup/popup.scss +59 -0
- package/src/components/popup/popup.test.ts +10 -0
- package/src/components/progress-bar/index.ts +12 -0
- package/src/components/progress-bar/progress-bar.component.ts +80 -0
- package/src/components/progress-bar/progress-bar.scss +46 -0
- package/src/components/progress-bar/progress-bar.test.ts +10 -0
- package/src/components/progress-tile/index.ts +12 -0
- package/src/components/progress-tile/progress-tile.component.ts +127 -0
- package/src/components/progress-tile/progress-tile.scss +116 -0
- package/src/components/progress-tile/progress-tile.test.ts +10 -0
- package/src/components/query-builder/index.ts +12 -0
- package/src/components/query-builder/query-builder.component.ts +544 -0
- package/src/components/query-builder/query-builder.scss +53 -0
- package/src/components/query-builder/query-builder.test.ts +10 -0
- package/src/components/radio/index.ts +12 -0
- package/src/components/radio/radio.component.ts +305 -0
- package/src/components/radio/radio.scss +197 -0
- package/src/components/radio/radio.test.ts +10 -0
- package/src/components/radio-group/index.ts +12 -0
- package/src/components/radio-group/radio-group.component.ts +362 -0
- package/src/components/radio-group/radio-group.scss +60 -0
- package/src/components/radio-group/radio-group.test.ts +10 -0
- package/src/components/rating/index.ts +12 -0
- package/src/components/rating/rating.component.ts +235 -0
- package/src/components/rating/rating.scss +82 -0
- package/src/components/rating/rating.test.ts +10 -0
- package/src/components/scroll-container/index.ts +12 -0
- package/src/components/scroll-container/scroll-container.component.ts +41 -0
- package/src/components/scroll-container/scroll-container.scss +17 -0
- package/src/components/scroll-container/scroll-container.test.ts +10 -0
- package/src/components/select/index.ts +12 -0
- package/src/components/select/select.component.ts +984 -0
- package/src/components/select/select.scss +325 -0
- package/src/components/select/select.test.ts +10 -0
- package/src/components/sidebar/index.ts +12 -0
- package/src/components/sidebar/sidebar.component.ts +98 -0
- package/src/components/sidebar/sidebar.scss +294 -0
- package/src/components/sidebar/sidebar.test.ts +10 -0
- package/src/components/simple-chart/index.ts +12 -0
- package/src/components/simple-chart/simple-chart.component.ts +204 -0
- package/src/components/simple-chart/simple-chart.scss +9 -0
- package/src/components/simple-chart/simple-chart.test.ts +10 -0
- package/src/components/skeleton/index.ts +12 -0
- package/src/components/skeleton/skeleton.component.ts +34 -0
- package/src/components/skeleton/skeleton.scss +39 -0
- package/src/components/skeleton/skeleton.test.ts +10 -0
- package/src/components/slideout/index.ts +12 -0
- package/src/components/slideout/slideout.component.ts +223 -0
- package/src/components/slideout/slideout.scss +96 -0
- package/src/components/slideout/slideout.test.ts +10 -0
- package/src/components/sp/index.ts +12 -0
- package/src/components/sp/sp.component.ts +86 -0
- package/src/components/sp/sp.scss +88 -0
- package/src/components/sp/sp.test.ts +10 -0
- package/src/components/split-button/index.ts +12 -0
- package/src/components/split-button/split-button.component.ts +154 -0
- package/src/components/split-button/split-button.scss +9 -0
- package/src/components/split-button/split-button.test.ts +10 -0
- package/src/components/split-pane/index.ts +12 -0
- package/src/components/split-pane/split-pane.component.ts +195 -0
- package/src/components/split-pane/split-pane.scss +303 -0
- package/src/components/split-pane/split-pane.test.ts +10 -0
- package/src/components/stat/index.ts +12 -0
- package/src/components/stat/stat.component.ts +117 -0
- package/src/components/stat/stat.scss +92 -0
- package/src/components/stat/stat.test.ts +10 -0
- package/src/components/status-indicator/index.ts +12 -0
- package/src/components/status-indicator/status-indicator.component.ts +31 -0
- package/src/components/status-indicator/status-indicator.scss +32 -0
- package/src/components/status-indicator/status-indicator.test.ts +10 -0
- package/src/components/stepper/index.ts +12 -0
- package/src/components/stepper/stepper.component.ts +80 -0
- package/src/components/stepper/stepper.scss +88 -0
- package/src/components/stepper/stepper.test.ts +10 -0
- package/src/components/style/index.ts +12 -0
- package/src/components/style/style.component.ts +150 -0
- package/src/components/style/style.scss +1 -0
- package/src/components/style/style.test.ts +10 -0
- package/src/components/table/index.ts +12 -0
- package/src/components/table/table.component.ts +297 -0
- package/src/components/table/table.scss +209 -0
- package/src/components/table/table.test.ts +10 -0
- package/src/components/tabs/index.ts +12 -0
- package/src/components/tabs/tabs.component.ts +496 -0
- package/src/components/tabs/tabs.scss +147 -0
- package/src/components/tabs/tabs.test.ts +10 -0
- package/src/components/textarea/index.ts +12 -0
- package/src/components/textarea/textarea.component.ts +417 -0
- package/src/components/textarea/textarea.scss +152 -0
- package/src/components/textarea/textarea.test.ts +10 -0
- package/src/components/tile/index.ts +12 -0
- package/src/components/tile/tile.component.ts +105 -0
- package/src/components/tile/tile.scss +144 -0
- package/src/components/tile/tile.test.ts +10 -0
- package/src/components/tile-property/index.ts +12 -0
- package/src/components/tile-property/tile-property.component.ts +43 -0
- package/src/components/tile-property/tile-property.scss +43 -0
- package/src/components/tile-property/tile-property.test.ts +10 -0
- package/src/components/timer/index.ts +12 -0
- package/src/components/timer/timer.component.ts +88 -0
- package/src/components/timer/timer.scss +40 -0
- package/src/components/timer/timer.test.ts +10 -0
- package/src/components/toggle/index.ts +12 -0
- package/src/components/toggle/toggle.component.ts +203 -0
- package/src/components/toggle/toggle.scss +93 -0
- package/src/components/toggle/toggle.test.ts +10 -0
- package/src/components/tooltip/index.ts +12 -0
- package/src/components/tooltip/tooltip.component.ts +215 -0
- package/src/components/tooltip/tooltip.scss +43 -0
- package/src/components/tooltip/tooltip.test.ts +10 -0
- package/src/components/vertical-stepper/index.ts +12 -0
- package/src/components/vertical-stepper/vertical-stepper.component.ts +53 -0
- package/src/components/vertical-stepper/vertical-stepper.scss +84 -0
- package/src/components/vertical-stepper/vertical-stepper.test.ts +10 -0
- package/src/components/well/index.ts +12 -0
- package/src/components/well/well.component.ts +43 -0
- package/src/components/well/well.scss +19 -0
- package/src/components/well/well.test.ts +10 -0
- package/src/declaration.d.ts +39 -0
- package/src/events/events.ts +7 -0
- package/src/events/zn-after-collapse.ts +7 -0
- package/src/events/zn-after-expand.ts +7 -0
- package/src/events/zn-after-hide.ts +7 -0
- package/src/events/zn-after-show.ts +7 -0
- package/src/events/zn-blur.ts +7 -0
- package/src/events/zn-cancel.ts +7 -0
- package/src/events/zn-change.ts +7 -0
- package/src/events/zn-clear.ts +7 -0
- package/src/events/zn-close.ts +7 -0
- package/src/events/zn-collapse.ts +7 -0
- package/src/events/zn-copy.ts +7 -0
- package/src/events/zn-element-added.ts +7 -0
- package/src/events/zn-error.ts +7 -0
- package/src/events/zn-expand.ts +7 -0
- package/src/events/zn-filter-change.ts +7 -0
- package/src/events/zn-finish.ts +7 -0
- package/src/events/zn-focus.ts +7 -0
- package/src/events/zn-hide.ts +7 -0
- package/src/events/zn-hover.ts +10 -0
- package/src/events/zn-initial-focus.ts +7 -0
- package/src/events/zn-input.ts +7 -0
- package/src/events/zn-invalid.ts +7 -0
- package/src/events/zn-load.ts +7 -0
- package/src/events/zn-menu-ready.ts +9 -0
- package/src/events/zn-menu-select.ts +9 -0
- package/src/events/zn-open.ts +7 -0
- package/src/events/zn-remove.ts +7 -0
- package/src/events/zn-request-close.ts +7 -0
- package/src/events/zn-select.ts +9 -0
- package/src/events/zn-show.ts +7 -0
- package/src/events/zn-sort-change.ts +7 -0
- package/src/events/zn-submit.ts +7 -0
- package/src/form-control.scss +123 -0
- package/src/internal/animate.ts +64 -0
- package/src/internal/default-value.ts +49 -0
- package/src/internal/event.ts +75 -0
- package/src/internal/form.ts +527 -0
- package/src/internal/offset.ts +13 -0
- package/src/internal/scroll.ts +69 -0
- package/src/internal/slot.ts +110 -0
- package/src/internal/storage.ts +70 -0
- package/src/internal/tabbable.ts +198 -0
- package/src/internal/theme.ts +54 -0
- package/src/internal/watch.ts +63 -0
- package/src/internal/zinc-element.ts +113 -0
- package/src/translations/en.ts +30 -0
- package/src/utilities/animation-registry.ts +74 -0
- package/src/utilities/base-path.ts +46 -0
- package/src/utilities/lit-to-html.ts +7 -0
- package/src/utilities/localize.ts +37 -0
- package/src/utilities/md5.ts +216 -0
- package/src/utilities/on.ts +29 -0
- package/src/utilities/query.ts +36 -0
- package/src/wc.scss +33 -0
- package/src/zinc-autoloader.ts +58 -0
- package/src/zinc.ts +83 -0
- package/tsconfig.json +41 -0
- package/tsconfig.prod.json +12 -0
- package/vscode.html-custom-data.json +2804 -0
- package/web-test-runner.config.js +50 -0
- package/web-types.json +6420 -0
- package/zn.d.ts +6318 -0
- package/zn.min.css +1 -0
- package/zn.min.js +3701 -0
- package/.idea/.name +0 -1
- package/.idea/fusion.iml +0 -9
- package/.idea/modules.xml +0 -8
- package/.idea/php.xml +0 -4
- package/.idea/vcs.xml +0 -6
- package/.idea/watcherTasks.xml +0 -25
- package/components/Blank/demo/demo.html +0 -11
- package/components/Blank/dist/zn-blank.js +0 -39
- package/components/Blank/go/component.go +0 -18
- package/components/Blank/go/go.mod +0 -3
- package/components/Blank/package.json +0 -33
- package/components/Blank/php/composer.json +0 -25
- package/components/Blank/php/src/Blank.php +0 -15
- package/components/Blank/rollup.config.js +0 -32
- package/components/Blank/scss/Styles.scss +0 -6
- package/components/Blank/ts/Component.ts +0 -15
- package/components/Blank/tsconfig.json +0 -7
- package/components/Icon/demo/demo.html +0 -90
- package/components/Icon/dist/zn-icon.js +0 -55
- package/components/Icon/go/component.go +0 -56
- package/components/Icon/go/go.mod +0 -3
- package/components/Icon/package.json +0 -33
- package/components/Icon/php/composer.json +0 -26
- package/components/Icon/php/src/Icon.php +0 -38
- package/components/Icon/php/src/Library.php +0 -17
- package/components/Icon/php/src/Size.php +0 -42
- package/components/Icon/roadmap.md +0 -7
- package/components/Icon/rollup.config.js +0 -32
- package/components/Icon/scss/Styles.scss +0 -65
- package/components/Icon/ts/Component.ts +0 -108
- package/components/Icon/ts/md5.ts +0 -215
- package/components/Icon/tsconfig.json +0 -7
- package/components/MaxWidth/demo/demo.html +0 -11
- package/components/MaxWidth/dist/zn-max-width.js +0 -51
- package/components/MaxWidth/go/component.go +0 -24
- package/components/MaxWidth/go/go.mod +0 -3
- package/components/MaxWidth/package.json +0 -33
- package/components/MaxWidth/php/composer.json +0 -25
- package/components/MaxWidth/php/src/MaxWidth.php +0 -32
- package/components/MaxWidth/rollup.config.js +0 -32
- package/components/MaxWidth/scss/Styles.scss +0 -13
- package/components/MaxWidth/ts/Component.ts +0 -27
- package/components/MaxWidth/tsconfig.json +0 -7
- package/components/roadmap.md +0 -4
- package/layout/components/Columns/demo/demo.html +0 -16
- package/layout/components/Columns/ts/Component.ts +0 -59
- package/layout/demo/index.html +0 -24
- package/layout/dist/zn-layout.js +0 -87
- package/layout/package.json +0 -38
- package/layout/rollup.config.js +0 -38
- package/layout/scss/layout.scss +0 -24
- package/layout/tailwind.config.js +0 -42
- package/layout/ts/import.ts +0 -2
- package/layout/tsconfig.json +0 -7
- /package/{layout/components/Columns/scss/Styles.scss → src/internal/zinc-element.test.ts} +0 -0
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
namespace Kubex\Zinc\Components\Icon;
|
|
3
|
-
|
|
4
|
-
use Packaged\SafeHtml\ISafeHtmlProducer;
|
|
5
|
-
use Packaged\SafeHtml\SafeHtml;
|
|
6
|
-
|
|
7
|
-
class Icon implements ISafeHtmlProducer
|
|
8
|
-
{
|
|
9
|
-
protected $_src;
|
|
10
|
-
protected $_library;
|
|
11
|
-
protected $_size;
|
|
12
|
-
|
|
13
|
-
public function __construct(string $src, Library $library = null)
|
|
14
|
-
{
|
|
15
|
-
$this->_src = $src;
|
|
16
|
-
$this->_library = $library ?? Library::MaterialIconsOutlined();
|
|
17
|
-
$this->_size = Size::Size24();
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
public function setSize(Size $size): self
|
|
21
|
-
{
|
|
22
|
-
$this->_size = $size;
|
|
23
|
-
return $this;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
public function size(): Size
|
|
27
|
-
{
|
|
28
|
-
return $this->_size;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
public function produceSafeHTML(): SafeHtml
|
|
32
|
-
{
|
|
33
|
-
return new SafeHtml(
|
|
34
|
-
sprintf('<fusion-icon src="%s" library="%s" size="%d"></fusion-icon>', $this->_src, $this->_library, $this->_size)
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
namespace Kubex\Zinc\Components\Icon;
|
|
3
|
-
|
|
4
|
-
use Packaged\Enum\AbstractEnum;
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @method static Library MaterialIconsOutlined()
|
|
8
|
-
*/
|
|
9
|
-
class Library extends AbstractEnum
|
|
10
|
-
{
|
|
11
|
-
public const Material = "material";
|
|
12
|
-
public const MaterialOutlined = "material-outlined";
|
|
13
|
-
public const MaterialRound = "material-round";
|
|
14
|
-
public const MaterialSharp = "material-sharp";
|
|
15
|
-
public const MaterialTwoTone = "material-two-tone";
|
|
16
|
-
public const Gravatar = "gravatar";
|
|
17
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
namespace Kubex\Zinc\Components\Icon;
|
|
3
|
-
|
|
4
|
-
use Packaged\Enum\AbstractEnum;
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @method static Size Size16()
|
|
8
|
-
* @method static Size Size24()
|
|
9
|
-
* @method static Size Size32()
|
|
10
|
-
* @method static Size Size40()
|
|
11
|
-
* @method static Size Size48()
|
|
12
|
-
* @method static Size Size56()
|
|
13
|
-
* @method static Size Size64()
|
|
14
|
-
* @method static Size Size80()
|
|
15
|
-
* @method static Size Size96()
|
|
16
|
-
* @method static Size Size120()
|
|
17
|
-
* @method static Size Size144()
|
|
18
|
-
* @method static Size Size160()
|
|
19
|
-
* @method static Size Size200()
|
|
20
|
-
* @method static Size Size240()
|
|
21
|
-
* @method static Size Size280()
|
|
22
|
-
* @method static Size Size320()
|
|
23
|
-
*/
|
|
24
|
-
class Size extends AbstractEnum
|
|
25
|
-
{
|
|
26
|
-
public const Size16 = 16;
|
|
27
|
-
public const Size24 = 24;
|
|
28
|
-
public const Size32 = 32;
|
|
29
|
-
public const Size40 = 40;
|
|
30
|
-
public const Size48 = 48;
|
|
31
|
-
public const Size56 = 56;
|
|
32
|
-
public const Size64 = 64;
|
|
33
|
-
public const Size80 = 80;
|
|
34
|
-
public const Size96 = 96;
|
|
35
|
-
public const Size120 = 120;
|
|
36
|
-
public const Size144 = 144;
|
|
37
|
-
public const Size160 = 160;
|
|
38
|
-
public const Size200 = 200;
|
|
39
|
-
public const Size240 = 240;
|
|
40
|
-
public const Size280 = 280;
|
|
41
|
-
public const Size320 = 320;
|
|
42
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import resolve from '@rollup/plugin-node-resolve';
|
|
2
|
-
import typescript from '@rollup/plugin-typescript';
|
|
3
|
-
import {terser} from 'rollup-plugin-terser';
|
|
4
|
-
import commonjs from '@rollup/plugin-commonjs';
|
|
5
|
-
import postcss from 'rollup-plugin-postcss';
|
|
6
|
-
import AtImport from 'postcss-import';
|
|
7
|
-
|
|
8
|
-
const component = {
|
|
9
|
-
input: 'ts/Component.ts',
|
|
10
|
-
output: {
|
|
11
|
-
dir: 'dist',
|
|
12
|
-
format: 'iife',
|
|
13
|
-
entryFileNames: 'zn-icon.js',
|
|
14
|
-
sourcemap: false,
|
|
15
|
-
},
|
|
16
|
-
plugins: [
|
|
17
|
-
resolve({browser: true, preferBuiltins: false}),
|
|
18
|
-
typescript(),
|
|
19
|
-
commonjs(),
|
|
20
|
-
postcss(
|
|
21
|
-
{
|
|
22
|
-
plugins: [AtImport()],
|
|
23
|
-
inject: false,
|
|
24
|
-
extract: false,
|
|
25
|
-
minimize: true,
|
|
26
|
-
sourceMap: false,
|
|
27
|
-
}),
|
|
28
|
-
terser(),
|
|
29
|
-
],
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export default [component];
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--icon-size: 24;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
:host {
|
|
6
|
-
user-select: none;
|
|
7
|
-
font-family: sans-serif;
|
|
8
|
-
overflow: hidden;
|
|
9
|
-
|
|
10
|
-
margin: 0;
|
|
11
|
-
padding: 0;
|
|
12
|
-
|
|
13
|
-
display: inline-flex;
|
|
14
|
-
align-items: center;
|
|
15
|
-
justify-content: center;
|
|
16
|
-
text-align: center;
|
|
17
|
-
|
|
18
|
-
width: var(--icon-size);
|
|
19
|
-
height: var(--icon-size);
|
|
20
|
-
|
|
21
|
-
&, i {
|
|
22
|
-
font-size: var(--icon-size);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
:host([round]) {
|
|
27
|
-
border-radius: 50%;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
img {
|
|
31
|
-
width: 100%;
|
|
32
|
-
height: 100%;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.mi {
|
|
36
|
-
font-family: 'Material Icons';
|
|
37
|
-
font-size: inherit;
|
|
38
|
-
font-weight: normal;
|
|
39
|
-
font-style: normal;
|
|
40
|
-
line-height: 1;
|
|
41
|
-
letter-spacing: normal;
|
|
42
|
-
text-transform: none;
|
|
43
|
-
display: inline-block;
|
|
44
|
-
white-space: nowrap;
|
|
45
|
-
word-wrap: normal;
|
|
46
|
-
direction: ltr;
|
|
47
|
-
-webkit-font-feature-settings: 'liga';
|
|
48
|
-
-webkit-font-smoothing: antialiased;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.mi--outlined {
|
|
52
|
-
font-family: 'Material Icons Outlined';
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.mi--round {
|
|
56
|
-
font-family: 'Material Icons Round';
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.mi--sharp {
|
|
60
|
-
font-family: 'Material Icons Sharp';
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.mi--two-tone {
|
|
64
|
-
font-family: 'Material Icons Two Tone';
|
|
65
|
-
}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import {html, LitElement, render, unsafeCSS} from 'lit';
|
|
2
|
-
import {customElement, property} from 'lit/decorators.js';
|
|
3
|
-
// @ts-ignore
|
|
4
|
-
import styles from '../scss/Styles.scss';
|
|
5
|
-
import {md5} from './md5'
|
|
6
|
-
|
|
7
|
-
const Library = {
|
|
8
|
-
None: "",
|
|
9
|
-
Material: "material",
|
|
10
|
-
MaterialOutlined: "material-outlined",
|
|
11
|
-
MaterialRound: "material-round",
|
|
12
|
-
MaterialSharp: "material-sharp",
|
|
13
|
-
MaterialTwoTone: "material-two-tone",
|
|
14
|
-
Gravatar: "gravatar",
|
|
15
|
-
Libravatar: "libravatar"
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
@customElement('zn-icon')
|
|
19
|
-
export class ZincIcon extends LitElement {
|
|
20
|
-
static styles = unsafeCSS(styles);
|
|
21
|
-
|
|
22
|
-
gravatarOptions = ""
|
|
23
|
-
|
|
24
|
-
@property({reflect: true})
|
|
25
|
-
src = ""
|
|
26
|
-
|
|
27
|
-
@property({reflect: true})
|
|
28
|
-
size = 24
|
|
29
|
-
|
|
30
|
-
@property({reflect: true})
|
|
31
|
-
library = Library.None
|
|
32
|
-
|
|
33
|
-
@property()
|
|
34
|
-
round = false
|
|
35
|
-
|
|
36
|
-
connectedCallback() {
|
|
37
|
-
super.connectedCallback();
|
|
38
|
-
|
|
39
|
-
//Register the material design icon packs
|
|
40
|
-
render(html`
|
|
41
|
-
<link
|
|
42
|
-
href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined|Material+Icons+Round|Material+Icons+Sharp|Material+Icons+Two+Tone"
|
|
43
|
-
rel="stylesheet">`, document.head);
|
|
44
|
-
|
|
45
|
-
if (this.src.includes('@')) {
|
|
46
|
-
if (this.library == "") {
|
|
47
|
-
const split = this.src.split('@')
|
|
48
|
-
if (split[1].includes('.')) {
|
|
49
|
-
this.library = Library.Gravatar
|
|
50
|
-
} else {
|
|
51
|
-
this.library = split[1]
|
|
52
|
-
this.src = split[0]
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
if (this.library == Library.Gravatar || this.library == Library.Libravatar) {
|
|
57
|
-
this.ravatarOptions()
|
|
58
|
-
this.src = md5(this.src)
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
this.ravatarOptions()
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
ravatarOptions() {
|
|
65
|
-
if ((this.library == Library.Gravatar || this.library == Library.Libravatar) && this.src.includes('#')) {
|
|
66
|
-
const split = this.src.split('#')
|
|
67
|
-
this.gravatarOptions = "&d=" + split[1]
|
|
68
|
-
this.src = split[0]
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
attributeChangedCallback(name: string, _old: string | null, value: string | null) {
|
|
73
|
-
super.attributeChangedCallback(name, _old, value);
|
|
74
|
-
if (name == "size") {
|
|
75
|
-
this.size = Number(value) - Number(value) % 8;
|
|
76
|
-
this.style.setProperty('--icon-size', this.size + "px")
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
render() {
|
|
81
|
-
switch (this.library) {
|
|
82
|
-
case Library.Material:
|
|
83
|
-
return html`<i class="mi mi">${this.src}</i>`;
|
|
84
|
-
case Library.MaterialOutlined:
|
|
85
|
-
return html`<i class="mi mi--outlined">${this.src}</i>`;
|
|
86
|
-
case Library.MaterialRound:
|
|
87
|
-
return html`<i class="mi mi--round">${this.src}</i>`;
|
|
88
|
-
case Library.MaterialSharp:
|
|
89
|
-
return html`<i class="mi mi--sharp">${this.src}</i>`;
|
|
90
|
-
case Library.MaterialTwoTone:
|
|
91
|
-
return html`<i class="mi mi--two-tone">${this.src}</i>`;
|
|
92
|
-
case Library.Gravatar:
|
|
93
|
-
return html`<img
|
|
94
|
-
src="https://www.gravatar.com/avatar/${this.src}?s=${this.size}${this.gravatarOptions}"/>`;
|
|
95
|
-
case Library.Libravatar:
|
|
96
|
-
return html`<img
|
|
97
|
-
src="https://seccdn.libravatar.org/avatar/${this.src}?s=${this.size}${this.gravatarOptions}"/>`;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
if (this.src != "") {
|
|
101
|
-
return html`
|
|
102
|
-
<img src="${this.src}" class="${this.library}/">`;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
return html`
|
|
106
|
-
<slot></slot>`;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
export function md5(string) {
|
|
2
|
-
|
|
3
|
-
function RotateLeft(lValue, iShiftBits) {
|
|
4
|
-
return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits));
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
function AddUnsigned(lX, lY) {
|
|
8
|
-
var lX4, lY4, lX8, lY8, lResult;
|
|
9
|
-
lX8 = (lX & 0x80000000);
|
|
10
|
-
lY8 = (lY & 0x80000000);
|
|
11
|
-
lX4 = (lX & 0x40000000);
|
|
12
|
-
lY4 = (lY & 0x40000000);
|
|
13
|
-
lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF);
|
|
14
|
-
if (lX4 & lY4) {
|
|
15
|
-
return (lResult ^ 0x80000000 ^ lX8 ^ lY8);
|
|
16
|
-
}
|
|
17
|
-
if (lX4 | lY4) {
|
|
18
|
-
if (lResult & 0x40000000) {
|
|
19
|
-
return (lResult ^ 0xC0000000 ^ lX8 ^ lY8);
|
|
20
|
-
} else {
|
|
21
|
-
return (lResult ^ 0x40000000 ^ lX8 ^ lY8);
|
|
22
|
-
}
|
|
23
|
-
} else {
|
|
24
|
-
return (lResult ^ lX8 ^ lY8);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function F(x, y, z) {
|
|
29
|
-
return (x & y) | ((~x) & z);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function G(x, y, z) {
|
|
33
|
-
return (x & z) | (y & (~z));
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function H(x, y, z) {
|
|
37
|
-
return (x ^ y ^ z);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function I(x, y, z) {
|
|
41
|
-
return (y ^ (x | (~z)));
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function FF(a, b, c, d, x, s, ac) {
|
|
45
|
-
a = AddUnsigned(a, AddUnsigned(AddUnsigned(F(b, c, d), x), ac));
|
|
46
|
-
return AddUnsigned(RotateLeft(a, s), b);
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
function GG(a, b, c, d, x, s, ac) {
|
|
50
|
-
a = AddUnsigned(a, AddUnsigned(AddUnsigned(G(b, c, d), x), ac));
|
|
51
|
-
return AddUnsigned(RotateLeft(a, s), b);
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
function HH(a, b, c, d, x, s, ac) {
|
|
55
|
-
a = AddUnsigned(a, AddUnsigned(AddUnsigned(H(b, c, d), x), ac));
|
|
56
|
-
return AddUnsigned(RotateLeft(a, s), b);
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
function II(a, b, c, d, x, s, ac) {
|
|
60
|
-
a = AddUnsigned(a, AddUnsigned(AddUnsigned(I(b, c, d), x), ac));
|
|
61
|
-
return AddUnsigned(RotateLeft(a, s), b);
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
function ConvertToWordArray(string) {
|
|
65
|
-
var lWordCount;
|
|
66
|
-
var lMessageLength = string.length;
|
|
67
|
-
var lNumberOfWords_temp1 = lMessageLength + 8;
|
|
68
|
-
var lNumberOfWords_temp2 = (lNumberOfWords_temp1 - (lNumberOfWords_temp1 % 64)) / 64;
|
|
69
|
-
var lNumberOfWords = (lNumberOfWords_temp2 + 1) * 16;
|
|
70
|
-
var lWordArray = Array(lNumberOfWords - 1);
|
|
71
|
-
var lBytePosition = 0;
|
|
72
|
-
var lByteCount = 0;
|
|
73
|
-
while (lByteCount < lMessageLength) {
|
|
74
|
-
lWordCount = (lByteCount - (lByteCount % 4)) / 4;
|
|
75
|
-
lBytePosition = (lByteCount % 4) * 8;
|
|
76
|
-
lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount) << lBytePosition));
|
|
77
|
-
lByteCount++;
|
|
78
|
-
}
|
|
79
|
-
lWordCount = (lByteCount - (lByteCount % 4)) / 4;
|
|
80
|
-
lBytePosition = (lByteCount % 4) * 8;
|
|
81
|
-
lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition);
|
|
82
|
-
lWordArray[lNumberOfWords - 2] = lMessageLength << 3;
|
|
83
|
-
lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29;
|
|
84
|
-
return lWordArray;
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
function WordToHex(lValue) {
|
|
88
|
-
var WordToHexValue = "", WordToHexValue_temp = "", lByte, lCount;
|
|
89
|
-
for (lCount = 0; lCount <= 3; lCount++) {
|
|
90
|
-
lByte = (lValue >>> (lCount * 8)) & 255;
|
|
91
|
-
WordToHexValue_temp = "0" + lByte.toString(16);
|
|
92
|
-
WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length - 2, 2);
|
|
93
|
-
}
|
|
94
|
-
return WordToHexValue;
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
function Utf8Encode(string) {
|
|
98
|
-
string = string.replace(/\r\n/g, "\n");
|
|
99
|
-
var utftext = "";
|
|
100
|
-
|
|
101
|
-
for (var n = 0; n < string.length; n++) {
|
|
102
|
-
|
|
103
|
-
var c = string.charCodeAt(n);
|
|
104
|
-
|
|
105
|
-
if (c < 128) {
|
|
106
|
-
utftext += String.fromCharCode(c);
|
|
107
|
-
} else if ((c > 127) && (c < 2048)) {
|
|
108
|
-
utftext += String.fromCharCode((c >> 6) | 192);
|
|
109
|
-
utftext += String.fromCharCode((c & 63) | 128);
|
|
110
|
-
} else {
|
|
111
|
-
utftext += String.fromCharCode((c >> 12) | 224);
|
|
112
|
-
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
|
|
113
|
-
utftext += String.fromCharCode((c & 63) | 128);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
return utftext;
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
var x = Array();
|
|
122
|
-
var k, AA, BB, CC, DD, a, b, c, d;
|
|
123
|
-
var S11 = 7, S12 = 12, S13 = 17, S14 = 22;
|
|
124
|
-
var S21 = 5, S22 = 9, S23 = 14, S24 = 20;
|
|
125
|
-
var S31 = 4, S32 = 11, S33 = 16, S34 = 23;
|
|
126
|
-
var S41 = 6, S42 = 10, S43 = 15, S44 = 21;
|
|
127
|
-
|
|
128
|
-
string = Utf8Encode(string);
|
|
129
|
-
|
|
130
|
-
x = ConvertToWordArray(string);
|
|
131
|
-
|
|
132
|
-
a = 0x67452301;
|
|
133
|
-
b = 0xEFCDAB89;
|
|
134
|
-
c = 0x98BADCFE;
|
|
135
|
-
d = 0x10325476;
|
|
136
|
-
|
|
137
|
-
for (k = 0; k < x.length; k += 16) {
|
|
138
|
-
AA = a;
|
|
139
|
-
BB = b;
|
|
140
|
-
CC = c;
|
|
141
|
-
DD = d;
|
|
142
|
-
a = FF(a, b, c, d, x[k + 0], S11, 0xD76AA478);
|
|
143
|
-
d = FF(d, a, b, c, x[k + 1], S12, 0xE8C7B756);
|
|
144
|
-
c = FF(c, d, a, b, x[k + 2], S13, 0x242070DB);
|
|
145
|
-
b = FF(b, c, d, a, x[k + 3], S14, 0xC1BDCEEE);
|
|
146
|
-
a = FF(a, b, c, d, x[k + 4], S11, 0xF57C0FAF);
|
|
147
|
-
d = FF(d, a, b, c, x[k + 5], S12, 0x4787C62A);
|
|
148
|
-
c = FF(c, d, a, b, x[k + 6], S13, 0xA8304613);
|
|
149
|
-
b = FF(b, c, d, a, x[k + 7], S14, 0xFD469501);
|
|
150
|
-
a = FF(a, b, c, d, x[k + 8], S11, 0x698098D8);
|
|
151
|
-
d = FF(d, a, b, c, x[k + 9], S12, 0x8B44F7AF);
|
|
152
|
-
c = FF(c, d, a, b, x[k + 10], S13, 0xFFFF5BB1);
|
|
153
|
-
b = FF(b, c, d, a, x[k + 11], S14, 0x895CD7BE);
|
|
154
|
-
a = FF(a, b, c, d, x[k + 12], S11, 0x6B901122);
|
|
155
|
-
d = FF(d, a, b, c, x[k + 13], S12, 0xFD987193);
|
|
156
|
-
c = FF(c, d, a, b, x[k + 14], S13, 0xA679438E);
|
|
157
|
-
b = FF(b, c, d, a, x[k + 15], S14, 0x49B40821);
|
|
158
|
-
a = GG(a, b, c, d, x[k + 1], S21, 0xF61E2562);
|
|
159
|
-
d = GG(d, a, b, c, x[k + 6], S22, 0xC040B340);
|
|
160
|
-
c = GG(c, d, a, b, x[k + 11], S23, 0x265E5A51);
|
|
161
|
-
b = GG(b, c, d, a, x[k + 0], S24, 0xE9B6C7AA);
|
|
162
|
-
a = GG(a, b, c, d, x[k + 5], S21, 0xD62F105D);
|
|
163
|
-
d = GG(d, a, b, c, x[k + 10], S22, 0x2441453);
|
|
164
|
-
c = GG(c, d, a, b, x[k + 15], S23, 0xD8A1E681);
|
|
165
|
-
b = GG(b, c, d, a, x[k + 4], S24, 0xE7D3FBC8);
|
|
166
|
-
a = GG(a, b, c, d, x[k + 9], S21, 0x21E1CDE6);
|
|
167
|
-
d = GG(d, a, b, c, x[k + 14], S22, 0xC33707D6);
|
|
168
|
-
c = GG(c, d, a, b, x[k + 3], S23, 0xF4D50D87);
|
|
169
|
-
b = GG(b, c, d, a, x[k + 8], S24, 0x455A14ED);
|
|
170
|
-
a = GG(a, b, c, d, x[k + 13], S21, 0xA9E3E905);
|
|
171
|
-
d = GG(d, a, b, c, x[k + 2], S22, 0xFCEFA3F8);
|
|
172
|
-
c = GG(c, d, a, b, x[k + 7], S23, 0x676F02D9);
|
|
173
|
-
b = GG(b, c, d, a, x[k + 12], S24, 0x8D2A4C8A);
|
|
174
|
-
a = HH(a, b, c, d, x[k + 5], S31, 0xFFFA3942);
|
|
175
|
-
d = HH(d, a, b, c, x[k + 8], S32, 0x8771F681);
|
|
176
|
-
c = HH(c, d, a, b, x[k + 11], S33, 0x6D9D6122);
|
|
177
|
-
b = HH(b, c, d, a, x[k + 14], S34, 0xFDE5380C);
|
|
178
|
-
a = HH(a, b, c, d, x[k + 1], S31, 0xA4BEEA44);
|
|
179
|
-
d = HH(d, a, b, c, x[k + 4], S32, 0x4BDECFA9);
|
|
180
|
-
c = HH(c, d, a, b, x[k + 7], S33, 0xF6BB4B60);
|
|
181
|
-
b = HH(b, c, d, a, x[k + 10], S34, 0xBEBFBC70);
|
|
182
|
-
a = HH(a, b, c, d, x[k + 13], S31, 0x289B7EC6);
|
|
183
|
-
d = HH(d, a, b, c, x[k + 0], S32, 0xEAA127FA);
|
|
184
|
-
c = HH(c, d, a, b, x[k + 3], S33, 0xD4EF3085);
|
|
185
|
-
b = HH(b, c, d, a, x[k + 6], S34, 0x4881D05);
|
|
186
|
-
a = HH(a, b, c, d, x[k + 9], S31, 0xD9D4D039);
|
|
187
|
-
d = HH(d, a, b, c, x[k + 12], S32, 0xE6DB99E5);
|
|
188
|
-
c = HH(c, d, a, b, x[k + 15], S33, 0x1FA27CF8);
|
|
189
|
-
b = HH(b, c, d, a, x[k + 2], S34, 0xC4AC5665);
|
|
190
|
-
a = II(a, b, c, d, x[k + 0], S41, 0xF4292244);
|
|
191
|
-
d = II(d, a, b, c, x[k + 7], S42, 0x432AFF97);
|
|
192
|
-
c = II(c, d, a, b, x[k + 14], S43, 0xAB9423A7);
|
|
193
|
-
b = II(b, c, d, a, x[k + 5], S44, 0xFC93A039);
|
|
194
|
-
a = II(a, b, c, d, x[k + 12], S41, 0x655B59C3);
|
|
195
|
-
d = II(d, a, b, c, x[k + 3], S42, 0x8F0CCC92);
|
|
196
|
-
c = II(c, d, a, b, x[k + 10], S43, 0xFFEFF47D);
|
|
197
|
-
b = II(b, c, d, a, x[k + 1], S44, 0x85845DD1);
|
|
198
|
-
a = II(a, b, c, d, x[k + 8], S41, 0x6FA87E4F);
|
|
199
|
-
d = II(d, a, b, c, x[k + 15], S42, 0xFE2CE6E0);
|
|
200
|
-
c = II(c, d, a, b, x[k + 6], S43, 0xA3014314);
|
|
201
|
-
b = II(b, c, d, a, x[k + 13], S44, 0x4E0811A1);
|
|
202
|
-
a = II(a, b, c, d, x[k + 4], S41, 0xF7537E82);
|
|
203
|
-
d = II(d, a, b, c, x[k + 11], S42, 0xBD3AF235);
|
|
204
|
-
c = II(c, d, a, b, x[k + 2], S43, 0x2AD7D2BB);
|
|
205
|
-
b = II(b, c, d, a, x[k + 9], S44, 0xEB86D391);
|
|
206
|
-
a = AddUnsigned(a, AA);
|
|
207
|
-
b = AddUnsigned(b, BB);
|
|
208
|
-
c = AddUnsigned(c, CC);
|
|
209
|
-
d = AddUnsigned(d, DD);
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
var temp = WordToHex(a) + WordToHex(b) + WordToHex(c) + WordToHex(d);
|
|
213
|
-
|
|
214
|
-
return temp.toLowerCase();
|
|
215
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<title>Zinc-Max-Width Demo</title>
|
|
6
|
-
</head>
|
|
7
|
-
<body>
|
|
8
|
-
<zn-max-width>Contained Content</zn-max-width>
|
|
9
|
-
<script src="../dist/zn-max-width.js" type="text/javascript"></script>
|
|
10
|
-
</body>
|
|
11
|
-
</html>
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
!function(t){"use strict";
|
|
2
|
-
/*! *****************************************************************************
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
4
|
-
|
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
-
purpose with or without fee is hereby granted.
|
|
7
|
-
|
|
8
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */function e(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r
|
|
16
|
-
/**
|
|
17
|
-
* @license
|
|
18
|
-
* Copyright 2019 Google LLC
|
|
19
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
20
|
-
*/}const i=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),n=new Map;class o{constructor(t,e){if(this._$cssResult$=!0,e!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=n.get(this.cssText);return i&&void 0===t&&(n.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}}const r=t=>new o("string"==typeof t?t:t+"",s),l=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return r(e)})(t):t
|
|
21
|
-
/**
|
|
22
|
-
* @license
|
|
23
|
-
* Copyright 2017 Google LLC
|
|
24
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
-
*/;var h;const a=window.reactiveElementPolyfillSupport,d={toAttribute(t,e){switch(e){case Boolean:t=t?"":null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},c=(t,e)=>e!==t&&(e==e||t==t),u={attribute:!0,type:String,converter:d,reflect:!1,hasChanged:c};class p extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var e;null!==(e=this.l)&&void 0!==e||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const s=this._$Eh(i,e);void 0!==s&&(this._$Eu.set(s,i),t.push(s))})),t}static createProperty(t,e=u){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,s=this.getPropertyDescriptor(t,i,e);void 0!==s&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(s){const n=this[t];this[e]=s,this.requestUpdate(t,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||u}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(l(t))}else void 0!==t&&e.push(l(t));return e}static _$Eh(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ev=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Ep(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$Em)&&void 0!==e?e:this._$Em=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$Em)||void 0===e||e.splice(this._$Em.indexOf(t)>>>0,1)}_$Ep(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Et.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{i?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),s=window.litNonce;void 0!==s&&i.setAttribute("nonce",s),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Em)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$Em)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$Eg(t,e,i=u){var s,n;const o=this.constructor._$Eh(t,i);if(void 0!==o&&!0===i.reflect){const r=(null!==(n=null===(s=i.converter)||void 0===s?void 0:s.toAttribute)&&void 0!==n?n:d.toAttribute)(e,i.type);this._$Ei=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Ei=null}}_$AK(t,e){var i,s,n;const o=this.constructor,r=o._$Eu.get(t);if(void 0!==r&&this._$Ei!==r){const t=o.getPropertyOptions(r),l=t.converter,h=null!==(n=null!==(s=null===(i=l)||void 0===i?void 0:i.fromAttribute)&&void 0!==s?s:"function"==typeof l?l:null)&&void 0!==n?n:d.fromAttribute;this._$Ei=r,this[r]=h(e,t.type),this._$Ei=null}}requestUpdate(t,e,i){let s=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||c)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Ei!==t&&(void 0===this._$ES&&(this._$ES=new Map),this._$ES.set(t,i))):s=!1),!this.isUpdatePending&&s&&(this._$Ev=this._$EC())}async _$EC(){this.isUpdatePending=!0;try{await this._$Ev}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((t,e)=>this[e]=t)),this._$Et=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$Em)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$Em)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ev}shouldUpdate(t){return!0}update(t){void 0!==this._$ES&&(this._$ES.forEach(((t,e)=>this._$Eg(e,this[e],t))),this._$ES=void 0),this._$EU()}updated(t){}firstUpdated(t){}}
|
|
26
|
-
/**
|
|
27
|
-
* @license
|
|
28
|
-
* Copyright 2017 Google LLC
|
|
29
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
30
|
-
*/
|
|
31
|
-
var v;p.finalized=!0,p.elementProperties=new Map,p.elementStyles=[],p.shadowRootOptions={mode:"open"},null==a||a({ReactiveElement:p}),(null!==(h=globalThis.reactiveElementVersions)&&void 0!==h?h:globalThis.reactiveElementVersions=[]).push("1.0.1");const $=globalThis.trustedTypes,_=$?$.createPolicy("lit-html",{createHTML:t=>t}):void 0,f=`lit$${(Math.random()+"").slice(9)}$`,A="?"+f,m=`<${A}>`,y=document,g=(t="")=>y.createComment(t),E=t=>null===t||"object"!=typeof t&&"function"!=typeof t,b=Array.isArray,S=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,w=/-->/g,C=/>/g,x=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,P=/'/g,U=/"/g,H=/^(?:script|style|textarea)$/i,T=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),M=Symbol.for("lit-noChange"),N=Symbol.for("lit-nothing"),O=new WeakMap,R=y.createTreeWalker(y,129,null,!1),k=(t,e)=>{const i=t.length-1,s=[];let n,o=2===e?"<svg>":"",r=S;for(let e=0;e<i;e++){const i=t[e];let l,h,a=-1,d=0;for(;d<i.length&&(r.lastIndex=d,h=r.exec(i),null!==h);)d=r.lastIndex,r===S?"!--"===h[1]?r=w:void 0!==h[1]?r=C:void 0!==h[2]?(H.test(h[2])&&(n=RegExp("</"+h[2],"g")),r=x):void 0!==h[3]&&(r=x):r===x?">"===h[0]?(r=null!=n?n:S,a=-1):void 0===h[1]?a=-2:(a=r.lastIndex-h[2].length,l=h[1],r=void 0===h[3]?x:'"'===h[3]?U:P):r===U||r===P?r=x:r===w||r===C?r=S:(r=x,n=void 0);const c=r===x&&t[e+1].startsWith("/>")?" ":"";o+=r===S?i+m:a>=0?(s.push(l),i.slice(0,a)+"$lit$"+i.slice(a)+f+c):i+f+(-2===a?(s.push(void 0),e):c)}const l=o+(t[i]||"<?>")+(2===e?"</svg>":"");return[void 0!==_?_.createHTML(l):l,s]};class z{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let n=0,o=0;const r=t.length-1,l=this.parts,[h,a]=k(t,e);if(this.el=z.createElement(h,i),R.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(s=R.nextNode())&&l.length<r;){if(1===s.nodeType){if(s.hasAttributes()){const t=[];for(const e of s.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(f)){const i=a[o++];if(t.push(e),void 0!==i){const t=s.getAttribute(i.toLowerCase()+"$lit$").split(f),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:n,name:e[2],strings:t,ctor:"."===e[1]?I:"?"===e[1]?W:"@"===e[1]?Z:D})}else l.push({type:6,index:n})}for(const e of t)s.removeAttribute(e)}if(H.test(s.tagName)){const t=s.textContent.split(f),e=t.length-1;if(e>0){s.textContent=$?$.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],g()),R.nextNode(),l.push({type:2,index:++n});s.append(t[e],g())}}}else if(8===s.nodeType)if(s.data===A)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=s.data.indexOf(f,t+1));)l.push({type:7,index:n}),t+=f.length-1}n++}}static createElement(t,e){const i=y.createElement("template");return i.innerHTML=t,i}}function L(t,e,i=t,s){var n,o,r,l;if(e===M)return e;let h=void 0!==s?null===(n=i._$Cl)||void 0===n?void 0:n[s]:i._$Cu;const a=E(e)?void 0:e._$litDirective$;return(null==h?void 0:h.constructor)!==a&&(null===(o=null==h?void 0:h._$AO)||void 0===o||o.call(h,!1),void 0===a?h=void 0:(h=new a(t),h._$AT(t,i,s)),void 0!==s?(null!==(r=(l=i)._$Cl)&&void 0!==r?r:l._$Cl=[])[s]=h:i._$Cu=h),void 0!==h&&(e=L(t,h._$AS(t,e.values),h,s)),e}class j{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:i},parts:s}=this._$AD,n=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:y).importNode(i,!0);R.currentNode=n;let o=R.nextNode(),r=0,l=0,h=s[0];for(;void 0!==h;){if(r===h.index){let e;2===h.type?e=new B(o,o.nextSibling,this,t):1===h.type?e=new h.ctor(o,h.name,h.strings,this,t):6===h.type&&(e=new V(o,this,t)),this.v.push(e),h=s[++l]}r!==(null==h?void 0:h.index)&&(o=R.nextNode(),r++)}return n}m(t){let e=0;for(const i of this.v)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class B{constructor(t,e,i,s){var n;this.type=2,this._$AH=N,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cg=null===(n=null==s?void 0:s.isConnected)||void 0===n||n}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=L(this,t,e),E(t)?t===N||null==t||""===t?(this._$AH!==N&&this._$AR(),this._$AH=N):t!==this._$AH&&t!==M&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var e;return b(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])})(t)?this.M(t):this.$(t)}A(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.A(t))}$(t){this._$AH!==N&&E(this._$AH)?this._$AA.nextSibling.data=t:this.S(y.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:s}=t,n="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=z.createElement(s.h,this.options)),s);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===n)this._$AH.m(i);else{const t=new j(n,this),e=t.p(this.options);t.m(i),this.S(e),this._$AH=t}}_$AC(t){let e=O.get(t.strings);return void 0===e&&O.set(t.strings,e=new z(t)),e}M(t){b(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const n of t)s===e.length?e.push(i=new B(this.A(g()),this.A(g()),this,this.options)):i=e[s],i._$AI(n),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class D{constructor(t,e,i,s,n){this.type=1,this._$AH=N,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=N}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const n=this.strings;let o=!1;if(void 0===n)t=L(this,t,e,0),o=!E(t)||t!==this._$AH&&t!==M,o&&(this._$AH=t);else{const s=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=L(this,s[i+r],e,r),l===M&&(l=this._$AH[r]),o||(o=!E(l)||l!==this._$AH[r]),l===N?t=N:t!==N&&(t+=(null!=l?l:"")+n[r+1]),this._$AH[r]=l}o&&!s&&this.k(t)}k(t){t===N?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class I extends D{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===N?void 0:t}}class W extends D{constructor(){super(...arguments),this.type=4}k(t){t&&t!==N?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name)}}class Z extends D{constructor(t,e,i,s,n){super(t,e,i,s,n),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=L(this,t,e,0))&&void 0!==i?i:N)===M)return;const s=this._$AH,n=t===N&&s!==N||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==N&&(s===N||n);n&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class V{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){L(this,t)}}const q=window.litHtmlPolyfillSupport;
|
|
32
|
-
/**
|
|
33
|
-
* @license
|
|
34
|
-
* Copyright 2017 Google LLC
|
|
35
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
36
|
-
*/
|
|
37
|
-
var K,J;null==q||q(z,B),(null!==(v=globalThis.litHtmlVersions)&&void 0!==v?v:globalThis.litHtmlVersions=[]).push("2.0.1");class F extends p{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,e,i)=>{var s,n;const o=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:e;let r=o._$litPart$;if(void 0===r){const t=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:null;o._$litPart$=r=new B(e.insertBefore(g(),t),t,void 0,null!=i?i:{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return M}}F.finalized=!0,F._$litElement$=!0,null===(K=globalThis.litElementHydrateSupport)||void 0===K||K.call(globalThis,{LitElement:F});const G=globalThis.litElementPolyfillSupport;null==G||G({LitElement:F}),(null!==(J=globalThis.litElementVersions)&&void 0!==J?J:globalThis.litElementVersions=[]).push("3.0.1");
|
|
38
|
-
/**
|
|
39
|
-
* @license
|
|
40
|
-
* Copyright 2017 Google LLC
|
|
41
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
42
|
-
*/
|
|
43
|
-
const Q=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};
|
|
44
|
-
/**
|
|
45
|
-
* @license
|
|
46
|
-
* Copyright 2017 Google LLC
|
|
47
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
48
|
-
*/t.ZincMaxWidth=class extends F{constructor(){super(...arguments),this.width=1024}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),Number(i)<1&&(this.width=Number(e)),this.style.setProperty("--max-width",this.width+"px")}render(){return T`
|
|
49
|
-
<div class="container">
|
|
50
|
-
<slot></slot>
|
|
51
|
-
</div>`}},t.ZincMaxWidth.styles=r(":root{--max-width:1024}:host{display:flex;justify-content:center}.container{max-width:calc(var(--max-width));width:100%}"),e([function(t){return(e,i)=>void 0!==i?((t,e,i)=>{e.constructor.createProperty(i,t)})(t,e,i):Q(t,e)}({reflect:!0})],t.ZincMaxWidth.prototype,"width",void 0),t.ZincMaxWidth=e([(t=>e=>"function"==typeof e?((t,e)=>(window.customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:i,elements:s}=e;return{kind:i,elements:s,finisher(e){window.customElements.define(t,e)}}})(t,e))("zn-max-width")],t.ZincMaxWidth),Object.defineProperty(t,"__esModule",{value:!0})}({});
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
package MaxWidth
|
|
2
|
-
|
|
3
|
-
import (
|
|
4
|
-
"fmt"
|
|
5
|
-
"html/template"
|
|
6
|
-
)
|
|
7
|
-
|
|
8
|
-
type Instance struct {
|
|
9
|
-
size int32
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
func New() Instance {
|
|
13
|
-
return Instance{}
|
|
14
|
-
}
|
|
15
|
-
func Defined(size int32) Instance {
|
|
16
|
-
return Instance{size: size}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
func (i Instance) Size() int32 { return i.size }
|
|
20
|
-
func (i *Instance) SetSize(size int32) { i.size = size }
|
|
21
|
-
|
|
22
|
-
func (i Instance) Html() template.HTML {
|
|
23
|
-
return template.HTML(fmt.Sprintf(`<zn-max-width width="%d"></zn-max-width>`, i.size))
|
|
24
|
-
}
|