@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
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
meta:
|
|
3
|
+
title: Alert
|
|
4
|
+
description: Alerts are used to display important messages inline or as toast notifications.
|
|
5
|
+
layout: component
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Examples
|
|
9
|
+
|
|
10
|
+
### Basic Alert
|
|
11
|
+
|
|
12
|
+
```html:preview
|
|
13
|
+
|
|
14
|
+
<zn-alert caption="This is an alert">This is the Description</zn-alert>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### With Icon
|
|
18
|
+
|
|
19
|
+
```html:preview
|
|
20
|
+
|
|
21
|
+
<zn-alert caption="This is an alert" icon="House" level="note">
|
|
22
|
+
This is the Description
|
|
23
|
+
<zn-button slot="actions" color="transparent">View All</zn-button>
|
|
24
|
+
</zn-alert>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Levels
|
|
28
|
+
|
|
29
|
+
```html:preview
|
|
30
|
+
|
|
31
|
+
<zn-alert caption="This is an alert" level="primary">This is the Description</zn-alert>
|
|
32
|
+
<zn-alert caption="This is an alert" level="error">This is the Description</zn-alert>
|
|
33
|
+
<zn-alert caption="This is an alert" level="info">This is the Description</zn-alert>
|
|
34
|
+
<zn-alert caption="This is an alert" level="success">This is the Description</zn-alert>
|
|
35
|
+
<zn-alert caption="This is an alert" level="warning">This is the Description</zn-alert>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### sizes
|
|
39
|
+
|
|
40
|
+
```html:preview
|
|
41
|
+
|
|
42
|
+
<zn-alert caption="This is an alert" size="small">This is the Description</zn-alert>
|
|
43
|
+
<zn-alert caption="This is an alert" size="medium">This is the Description</zn-alert>
|
|
44
|
+
<zn-alert caption="This is an alert" size="large">This is the Description</zn-alert>
|
|
45
|
+
```
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
meta:
|
|
3
|
+
title: Bulk Actions
|
|
4
|
+
description:
|
|
5
|
+
layout: component
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
```html:preview
|
|
9
|
+
|
|
10
|
+
<zn-bulk-actions
|
|
11
|
+
actions="[{"id":"agent","name":"agent","options":{"agent1":"Agent 1","agent2":"Agent 2"}},{"id":"company","name":"company","options":{"company1":"Company 1","company2":"Company 2"}},{"id":"impact","name":"impact","options":{"0":"None","10":"Minor","20":"Moderate","30":"Significant","40":"Extensive"}},{"id":"priority","name":"priority","options":{"priority1":"Priority 1","priority2":"Priority 2"}}]"
|
|
12
|
+
name="actions">
|
|
13
|
+
</zn-bulk-actions>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Examples
|
|
17
|
+
|
|
18
|
+
### First Example
|
|
19
|
+
|
|
20
|
+
TODO
|
|
21
|
+
|
|
22
|
+
### Second Example
|
|
23
|
+
|
|
24
|
+
TODO
|
|
25
|
+
|
|
26
|
+
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
meta:
|
|
3
|
+
title: Button Group
|
|
4
|
+
description:
|
|
5
|
+
layout: component
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
```html:preview
|
|
9
|
+
|
|
10
|
+
<zn-button-group>
|
|
11
|
+
<zn-button>First</zn-button>
|
|
12
|
+
<zn-button>Inner 1</zn-button>
|
|
13
|
+
<zn-button>Inner 2</zn-button>
|
|
14
|
+
<zn-button>Last</zn-button>
|
|
15
|
+
</zn-button-group>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Examples
|
|
19
|
+
|
|
20
|
+
### Grow Example
|
|
21
|
+
|
|
22
|
+
```html:preview
|
|
23
|
+
|
|
24
|
+
<zn-button-group grow>
|
|
25
|
+
<zn-button>First</zn-button>
|
|
26
|
+
<zn-button>Inner 1</zn-button>
|
|
27
|
+
<zn-button>Inner 2</zn-button>
|
|
28
|
+
<zn-button>Last</zn-button>
|
|
29
|
+
</zn-button-group>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Start Example
|
|
33
|
+
|
|
34
|
+
```html:preview
|
|
35
|
+
|
|
36
|
+
<zn-button-group start>
|
|
37
|
+
<zn-button>First</zn-button>
|
|
38
|
+
<zn-button>Inner 1</zn-button>
|
|
39
|
+
<zn-button>Inner 2</zn-button>
|
|
40
|
+
<zn-button>Last</zn-button>
|
|
41
|
+
</zn-button-group>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Gap Example
|
|
45
|
+
|
|
46
|
+
```html:preview
|
|
47
|
+
|
|
48
|
+
<zn-button-group gap>
|
|
49
|
+
<zn-button>First</zn-button>
|
|
50
|
+
<zn-button>Inner 1</zn-button>
|
|
51
|
+
<zn-button>Inner 2</zn-button>
|
|
52
|
+
<zn-button>Last</zn-button>
|
|
53
|
+
</zn-button-group>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Grow Gap Example
|
|
57
|
+
|
|
58
|
+
```html:preview
|
|
59
|
+
|
|
60
|
+
<zn-button-group gap grow>
|
|
61
|
+
<zn-button>First</zn-button>
|
|
62
|
+
<zn-button>Inner 1</zn-button>
|
|
63
|
+
<zn-button>Inner 2</zn-button>
|
|
64
|
+
<zn-button>Last</zn-button>
|
|
65
|
+
</zn-button-group>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Vertical Example
|
|
69
|
+
|
|
70
|
+
```html:preview
|
|
71
|
+
|
|
72
|
+
<zn-button-group direction="vertical">
|
|
73
|
+
<zn-button>First</zn-button>
|
|
74
|
+
<zn-button>Inner 1</zn-button>
|
|
75
|
+
<zn-button>Inner 2</zn-button>
|
|
76
|
+
<zn-button>Last</zn-button>
|
|
77
|
+
</zn-button-group>
|
|
78
|
+
```
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
meta:
|
|
3
|
+
title: Button Menu
|
|
4
|
+
description:
|
|
5
|
+
layout: component
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
```html:preview
|
|
9
|
+
|
|
10
|
+
<zn-button-menu limit="4">
|
|
11
|
+
<zn-button id="trigger-something" color="error" primary>Cancel</zn-button>
|
|
12
|
+
<zn-confirm type="error"
|
|
13
|
+
trigger="trigger-something"
|
|
14
|
+
caption="Cancel Action"
|
|
15
|
+
content="Are you sure you want to cancel this action">
|
|
16
|
+
</zn-confirm>
|
|
17
|
+
|
|
18
|
+
<zn-button primary color="error" icon="house">Something sdf</zn-button>
|
|
19
|
+
<zn-button id="trigger-anotherone" color="warning" icon="house">Another One</zn-button>
|
|
20
|
+
<zn-confirm type="error"
|
|
21
|
+
trigger="trigger-anotherone"
|
|
22
|
+
caption="Another Action"
|
|
23
|
+
content="Are you sure you?">
|
|
24
|
+
</zn-confirm>
|
|
25
|
+
</zn-button-menu>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Examples
|
|
29
|
+
|
|
30
|
+
### Button Limit
|
|
31
|
+
|
|
32
|
+
You can limit the number of buttons that are shown in the menu. The rest will be hidden in a dropdown.
|
|
33
|
+
|
|
34
|
+
```html:preview
|
|
35
|
+
|
|
36
|
+
<zn-button-menu limit="2">
|
|
37
|
+
<zn-button primary>Something sdf</zn-button>
|
|
38
|
+
<zn-button >sd</zn-button>
|
|
39
|
+
<zn-button secondary>fdf</zn-button>
|
|
40
|
+
<zn-button secondary>fsdsfdf</zn-button>
|
|
41
|
+
<zn-button >fd</zn-button>
|
|
42
|
+
<zn-button category="edit">fdsfdf</zn-button>
|
|
43
|
+
<zn-button primary category="edit">d</zn-button>
|
|
44
|
+
<zn-button secondary category="view">dfsf</zn-button>
|
|
45
|
+
</zn-button-menu>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Button Max (1)
|
|
49
|
+
|
|
50
|
+
```html:preview
|
|
51
|
+
|
|
52
|
+
<zn-button-menu max-level="1">
|
|
53
|
+
<zn-button primary>Primary</zn-button>
|
|
54
|
+
<zn-button secondary>Secondary</zn-button>
|
|
55
|
+
<zn-button>Default</zn-button>
|
|
56
|
+
<zn-button>Default 2</zn-button>
|
|
57
|
+
</zn-button-menu>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Button Max (2)
|
|
61
|
+
|
|
62
|
+
```html:preview
|
|
63
|
+
|
|
64
|
+
<zn-button-menu max-level="2">
|
|
65
|
+
<zn-button primary>Primary</zn-button>
|
|
66
|
+
<zn-button secondary>Secondary</zn-button>
|
|
67
|
+
<zn-button>Default</zn-button>
|
|
68
|
+
<zn-button>Default 2</zn-button>
|
|
69
|
+
</zn-button-menu>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Button Max (3)
|
|
73
|
+
|
|
74
|
+
```html:preview
|
|
75
|
+
|
|
76
|
+
<zn-button-menu max-level="3">
|
|
77
|
+
<zn-button primary>Primary</zn-button>
|
|
78
|
+
<zn-button secondary>Secondary</zn-button>
|
|
79
|
+
<zn-button>Default</zn-button>
|
|
80
|
+
<zn-button>Default 2</zn-button>
|
|
81
|
+
</zn-button-menu>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Button Max (2) - No Primary / Secondary
|
|
85
|
+
|
|
86
|
+
```html:preview
|
|
87
|
+
|
|
88
|
+
<zn-button-menu max-level="2">
|
|
89
|
+
<zn-button>Default</zn-button>
|
|
90
|
+
<zn-button>Default 2</zn-button>
|
|
91
|
+
</zn-button-menu>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Max Width
|
|
95
|
+
|
|
96
|
+
Below is an example of a button menu with a maximum width of 200px. The menu will not exceed this width, even if the
|
|
97
|
+
buttons inside it are wider.
|
|
98
|
+
|
|
99
|
+
```html:preview
|
|
100
|
+
|
|
101
|
+
<zn-button-menu max-width="300">
|
|
102
|
+
<zn-button primary>Something sdf</zn-button>
|
|
103
|
+
<zn-button >sd</zn-button>
|
|
104
|
+
<zn-button secondary>fdf</zn-button>
|
|
105
|
+
<zn-button secondary>fsdsfdf</zn-button>
|
|
106
|
+
<zn-button >fd</zn-button>
|
|
107
|
+
<zn-button category="edit">fdsfdf</zn-button>
|
|
108
|
+
<zn-button primary category="edit">d</zn-button>
|
|
109
|
+
<zn-button secondary category="view">dfsf</zn-button>
|
|
110
|
+
</zn-button-menu>
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### No Gap
|
|
114
|
+
|
|
115
|
+
```html:preview
|
|
116
|
+
|
|
117
|
+
<zn-button-menu no-gap max-width="200">
|
|
118
|
+
<zn-button primary>Something sdf</zn-button>
|
|
119
|
+
<zn-button >sd</zn-button>
|
|
120
|
+
<zn-button secondary>fdf</zn-button>
|
|
121
|
+
<zn-button secondary>fsdsfdf</zn-button>
|
|
122
|
+
<zn-button >fd</zn-button>
|
|
123
|
+
<zn-button category="edit">fdsfdf</zn-button>
|
|
124
|
+
<zn-button primary category="edit">d</zn-button>
|
|
125
|
+
<zn-button secondary category="view">dfsf</zn-button>
|
|
126
|
+
</zn-button-menu>
|
|
127
|
+
```
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
meta:
|
|
3
|
+
title: Button
|
|
4
|
+
description: Buttons represent actions that are available to the user.
|
|
5
|
+
layout: component
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
```html:preview
|
|
9
|
+
<zn-button>Button</zn-button>
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Examples
|
|
13
|
+
|
|
14
|
+
### Variants
|
|
15
|
+
|
|
16
|
+
Use the `color` attribute to set the button's color.
|
|
17
|
+
|
|
18
|
+
```html:preview
|
|
19
|
+
<zn-button color="default">Default</zn-button>
|
|
20
|
+
<zn-button color="secondary">Secondary</zn-button>
|
|
21
|
+
<zn-button color="success">Success</zn-button>
|
|
22
|
+
<zn-button color="info">Info</zn-button>
|
|
23
|
+
<zn-button color="warning">Warning</zn-button>
|
|
24
|
+
<zn-button color="error">Error</zn-button>
|
|
25
|
+
<zn-button color="transparent">Transparent</zn-button>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Sizes
|
|
29
|
+
|
|
30
|
+
Use the `size` attribute to set the button's size.
|
|
31
|
+
|
|
32
|
+
```html:preview
|
|
33
|
+
<zn-button size="content">Content</zn-button>
|
|
34
|
+
<zn-button size="x-small">X Small</zn-button>
|
|
35
|
+
<zn-button size="small">Small</zn-button>
|
|
36
|
+
<zn-button size="medium">Medium</zn-button>
|
|
37
|
+
<zn-button size="large">Large</zn-button>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Outline
|
|
41
|
+
|
|
42
|
+
Use the `outline` attribute to set the button's outline.
|
|
43
|
+
|
|
44
|
+
```html:preview
|
|
45
|
+
<zn-button outline>Outline</zn-button>
|
|
46
|
+
<zn-button outline color="secondary">Outline</zn-button>
|
|
47
|
+
<zn-button outline color="success">Outline</zn-button>
|
|
48
|
+
<zn-button outline color="info">Outline</zn-button>
|
|
49
|
+
<zn-button outline color="warning">Outline</zn-button>
|
|
50
|
+
<zn-button outline color="error">Outline</zn-button>
|
|
51
|
+
<zn-button outline color="transparent">Outline</zn-button>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Text
|
|
55
|
+
|
|
56
|
+
Use the `text` attribute to set the button's style to text.
|
|
57
|
+
|
|
58
|
+
```html:preview
|
|
59
|
+
<zn-button text>Outline</zn-button>
|
|
60
|
+
<zn-button text color="secondary">Text</zn-button>
|
|
61
|
+
<zn-button text color="success">Text</zn-button>
|
|
62
|
+
<zn-button text color="info">Text</zn-button>
|
|
63
|
+
<zn-button text color="warning">Text</zn-button>
|
|
64
|
+
<zn-button text color="error">Text</zn-button>
|
|
65
|
+
<zn-button text color="transparent">Text</zn-button>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Icon
|
|
69
|
+
|
|
70
|
+
Use the `icon` attribute to set the button's icon.
|
|
71
|
+
|
|
72
|
+
```html:preview
|
|
73
|
+
<zn-button icon="add_circle">Icon</zn-button>
|
|
74
|
+
<zn-button icon="file_download" color="secondary">Icon</zn-button>
|
|
75
|
+
<zn-button icon="check" color="success">Icon</zn-button>
|
|
76
|
+
<zn-button icon="help" color="info">Icon</zn-button>
|
|
77
|
+
<zn-button icon="report_problem" color="warning">Icon</zn-button>
|
|
78
|
+
<zn-button icon="cancel" color="error">Icon</zn-button>
|
|
79
|
+
<zn-button icon="pending" color="transparent">Icon</zn-button>
|
|
80
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
meta:
|
|
3
|
+
title: Data Chart
|
|
4
|
+
description:
|
|
5
|
+
layout: component
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
```html:preview
|
|
9
|
+
<zn-chart
|
|
10
|
+
type="area"
|
|
11
|
+
categories="["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep"]"
|
|
12
|
+
data="[{"name":"Series 1","data":[30,40,45,50,49,60,70,91,125]}]"
|
|
13
|
+
height="300">
|
|
14
|
+
</zn-chart>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Examples
|
|
18
|
+
|
|
19
|
+
### First Example
|
|
20
|
+
|
|
21
|
+
TODO
|
|
22
|
+
|
|
23
|
+
### Second Example
|
|
24
|
+
|
|
25
|
+
TODO
|
|
26
|
+
|
|
27
|
+
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
---
|
|
2
|
+
meta:
|
|
3
|
+
title: Checkbox Group
|
|
4
|
+
description:
|
|
5
|
+
layout: component
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Examples
|
|
9
|
+
|
|
10
|
+
### Basic Checkbox Group
|
|
11
|
+
|
|
12
|
+
A basic checkbox group lays out multiple checkbox items vertically.
|
|
13
|
+
|
|
14
|
+
```html:preview
|
|
15
|
+
<zn-checkbox-group label="Financial products permissions" name="a">
|
|
16
|
+
<zn-checkbox value="initiate-outbound">Initiate outbound transfers</zn-checkbox>
|
|
17
|
+
<zn-checkbox value="approve-outbound">Approve outbound transfers </zn-checkbox>
|
|
18
|
+
<zn-checkbox value="export">Export transactions</zn-checkbox>
|
|
19
|
+
</zn-checkbox-group>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Help Text
|
|
23
|
+
|
|
24
|
+
Add descriptive help text to a checkbox group with the `help-text` attribute. For help texts that contain HTML, use the
|
|
25
|
+
`help-text` slot instead.
|
|
26
|
+
|
|
27
|
+
```html:preview
|
|
28
|
+
<zn-checkbox-group label="Financial products permissions" help-text="Outbound transfers require separate initiators and approvers" name="a">
|
|
29
|
+
<zn-checkbox value="initiate-outbound">Initiate outbound transfers</zn-checkbox>
|
|
30
|
+
<zn-checkbox value="approve-outbound">Approve outbound transfers </zn-checkbox>
|
|
31
|
+
<zn-checkbox value="export">Export transactions</zn-checkbox>
|
|
32
|
+
</zn-checkbox-group>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Label with Tooltip
|
|
36
|
+
|
|
37
|
+
Use the `label-tooltip` attribute to add text that appears in a tooltip triggered by an info icon next to the label.
|
|
38
|
+
|
|
39
|
+
:::tip
|
|
40
|
+
**Usage:** Use a **label tooltip** to provide helpful but non-essential instructions or examples to guide people when
|
|
41
|
+
making a selection from the checkbox group. Use **help text** to communicate instructions or requirements for making a
|
|
42
|
+
selection without errors.
|
|
43
|
+
:::
|
|
44
|
+
|
|
45
|
+
```html:preview
|
|
46
|
+
<zn-checkbox-group name="a" label="Financial products permissions" help-text="Outbound transfers require separate initiators and approvers" label-tooltip="These apply to cash account only">
|
|
47
|
+
<zn-checkbox value="initiate-outbound">Initiate outbound transfers</zn-checkbox>
|
|
48
|
+
<zn-checkbox value="approve-outbound">Approve outbound transfers </zn-checkbox>
|
|
49
|
+
<zn-checkbox value="export">Export transactions</zn-checkbox>
|
|
50
|
+
</zn-checkbox-group>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Horizontal Checkbox Group
|
|
54
|
+
|
|
55
|
+
Use the `horizontal` attribute to lay out multiple checkbox items horizontally.
|
|
56
|
+
|
|
57
|
+
:::tip
|
|
58
|
+
**Making the horizontal checkbox group responsive:** Use a container query to adjust the layout of the checkbox group's
|
|
59
|
+
`form-control-input` part (which wraps the checkbox items) at a custom target breakpoint (the container's width when the
|
|
60
|
+
horizontal layout breaks). In the example below, a container query checks the width of the checkbox group container and
|
|
61
|
+
switches the layout to vertical (setting `flex-direction` to `column`) when the container becomes too narrow for a
|
|
62
|
+
horizontal layout.
|
|
63
|
+
:::
|
|
64
|
+
|
|
65
|
+
```html:preview
|
|
66
|
+
<zn-checkbox-group name="a" id="permissions" label="Financial products permissions" horizontal>
|
|
67
|
+
<zn-checkbox value="manage-transfers">Manage transfers</zn-checkbox>
|
|
68
|
+
<zn-checkbox value="export">Export transactions</zn-checkbox>
|
|
69
|
+
</zn-checkbox-group>
|
|
70
|
+
|
|
71
|
+
<style>
|
|
72
|
+
zn-checkbox-group[id="permissions"] {
|
|
73
|
+
container-type: inline-size;
|
|
74
|
+
container-name: permissions;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@container permissions (max-width: 400px) {
|
|
78
|
+
zn-checkbox-group[id="permissions"]::part(form-control-input) {
|
|
79
|
+
flex-direction: column;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
</style>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Contained Checkbox Group
|
|
86
|
+
|
|
87
|
+
Use the `contained` attribute to draw a card-like container around each checkbox item in the checkbox group. This style
|
|
88
|
+
is useful for giving more emphasis to the list of options.
|
|
89
|
+
|
|
90
|
+
This option can be combined with the `horizontal` attribute.
|
|
91
|
+
|
|
92
|
+
```html:preview
|
|
93
|
+
<zn-checkbox-group name="a" label="Financial products permissions" help-text="Outbound transfers require separate initiators and approvers" contained>
|
|
94
|
+
<zn-checkbox value="initiate-outbound">Initiate outbound transfers</zn-checkbox>
|
|
95
|
+
<zn-checkbox value="approve-outbound">Approve outbound transfers </zn-checkbox>
|
|
96
|
+
<zn-checkbox value="export">Export transactions</zn-checkbox>
|
|
97
|
+
</zn-checkbox-group>
|
|
98
|
+
<br/>
|
|
99
|
+
<br/>
|
|
100
|
+
<zn-checkbox-group name="b" label="Financial products permissions" help-text="Outbound transfers require separate initiators and approvers" contained horizontal>
|
|
101
|
+
<zn-checkbox value="initiate-outbound">Initiate outbound transfers</zn-checkbox>
|
|
102
|
+
<zn-checkbox value="approve-outbound">Approve outbound transfers </zn-checkbox>
|
|
103
|
+
</zn-checkbox-group>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
:::tip
|
|
107
|
+
When [checkboxes](/components/checkbox) are wrapped with the Checkbox Group , adding the `contained` attribute to the
|
|
108
|
+
parent Checkbox Group or to _any_ checkbox in the group will create `contained` checkboxes for the entire group.
|
|
109
|
+
:::
|
|
110
|
+
|
|
111
|
+
### Disabling Options
|
|
112
|
+
|
|
113
|
+
Checkboxes can be disabled by adding the `disabled` attribute to the respective options inside the checkbox group.
|
|
114
|
+
|
|
115
|
+
```html:preview
|
|
116
|
+
<zn-checkbox-group name="a" label="Financial products permissions" help-text="Exporting is currently disabled for all users" required>
|
|
117
|
+
<zn-checkbox value="initiate-outbound">Initiate outbound transfers</zn-checkbox>
|
|
118
|
+
<zn-checkbox value="approve-outbound">Approve outbound transfers </zn-checkbox>
|
|
119
|
+
<zn-checkbox value="export" disabled>Export transactions</zn-checkbox>
|
|
120
|
+
</zn-checkbox-group>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Validation
|
|
124
|
+
|
|
125
|
+
Set the `required` attribute to make selecting at least one option mandatory. If at least one value has not been
|
|
126
|
+
selected, it will prevent the form from submitting and display an error message.
|
|
127
|
+
|
|
128
|
+
```html:preview
|
|
129
|
+
<form class="validation">
|
|
130
|
+
<zn-checkbox-group name="a" label="Select at least one option" required>
|
|
131
|
+
<zn-checkbox value="option-1">Option 1</zn-checkbox>
|
|
132
|
+
<zn-checkbox value="option-2">Option 2</zn-checkbox>
|
|
133
|
+
<zn-checkbox value="option-3">Option 3</zn-checkbox>
|
|
134
|
+
</zn-checkbox-group>
|
|
135
|
+
<br />
|
|
136
|
+
<zn-button type="submit" variant="primary">Submit</zn-button>
|
|
137
|
+
</form>
|
|
138
|
+
|
|
139
|
+
<script type="module">
|
|
140
|
+
const form = document.querySelector('.validation');
|
|
141
|
+
|
|
142
|
+
// Wait for controls to be defined before attaching form listeners
|
|
143
|
+
await Promise.all([
|
|
144
|
+
customElements.whenDefined('zn-checkbox-group'),
|
|
145
|
+
]).then(() => {
|
|
146
|
+
form.addEventListener('submit', event => {
|
|
147
|
+
event.preventDefault();
|
|
148
|
+
alert('All fields are valid!');
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
</script>
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Custom Validity
|
|
155
|
+
|
|
156
|
+
Use the `setCustomValidity()` method to set a custom validation message. This will prevent the form from submitting and
|
|
157
|
+
make the browser display the error message you provide. To clear the error, call this function with an empty string.
|
|
158
|
+
|
|
159
|
+
```html:preview
|
|
160
|
+
<form class="custom-validity">
|
|
161
|
+
<zn-checkbox-group name="a" label="Select the third option" required>
|
|
162
|
+
<zn-checkbox value="option-1">You can optionally choose me</zn-checkbox>
|
|
163
|
+
<zn-checkbox value="option-2">I'm optional too</zn-checkbox>
|
|
164
|
+
<zn-checkbox value="option-3">You must choose me</zn-checkbox>
|
|
165
|
+
</zn-checkbox-group>
|
|
166
|
+
<br />
|
|
167
|
+
<zn-button type="submit" variant="primary">Submit</zn-button>
|
|
168
|
+
</form>
|
|
169
|
+
|
|
170
|
+
<script type="module">
|
|
171
|
+
const form = document.querySelector('.custom-validity');
|
|
172
|
+
const checkboxGroup = form.querySelector('zn-checkbox-group');
|
|
173
|
+
const errorMessage = 'You must choose the last option';
|
|
174
|
+
|
|
175
|
+
// Set initial validity as soon as the element is defined
|
|
176
|
+
customElements.whenDefined('zn-checkbox').then(() => {
|
|
177
|
+
checkboxGroup.setCustomValidity(errorMessage);
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
// Update validity when a selection is made
|
|
181
|
+
form.addEventListener('zn-change', () => {
|
|
182
|
+
const isValid = checkboxGroup.value.some(value => value.includes('option-3'));
|
|
183
|
+
checkboxGroup.setCustomValidity(isValid ? '' : errorMessage);
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
// Wait for controls to be defined before attaching form listeners
|
|
187
|
+
await Promise.all([
|
|
188
|
+
customElements.whenDefined('zn-checkbox-group'),
|
|
189
|
+
]).then(() => {
|
|
190
|
+
form.addEventListener('submit', event => {
|
|
191
|
+
event.preventDefault();
|
|
192
|
+
alert('All fields are valid!');
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
</script>
|
|
196
|
+
```
|