@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,452 @@
|
|
|
1
|
+
---
|
|
2
|
+
meta:
|
|
3
|
+
title: Select
|
|
4
|
+
description: Selects allow you to choose items from a menu of predefined options.
|
|
5
|
+
layout: component
|
|
6
|
+
unusedProperties: |
|
|
7
|
+
- Size `small`
|
|
8
|
+
- Booleans `pill`
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Examples
|
|
12
|
+
|
|
13
|
+
### Basic Select with Label
|
|
14
|
+
|
|
15
|
+
Use the `label` attribute to give the select an accessible label. For labels that contain HTML, use the `label` slot
|
|
16
|
+
instead.
|
|
17
|
+
|
|
18
|
+
```html:preview
|
|
19
|
+
|
|
20
|
+
<form method="get" action="#">
|
|
21
|
+
<zn-select name="something" label="Select one option" value="0">
|
|
22
|
+
<zn-option value="0">Option 0</zn-option>
|
|
23
|
+
<zn-option value="1">Option 1</zn-option>
|
|
24
|
+
<zn-option value="2">Option 2</zn-option>
|
|
25
|
+
<zn-option value="3">Option 3</zn-option>
|
|
26
|
+
<zn-option value="4">Option 4</zn-option>
|
|
27
|
+
<zn-option value="5">Option 5</zn-option>
|
|
28
|
+
<zn-option value="6">Option 6</zn-option>
|
|
29
|
+
</zn-select>
|
|
30
|
+
|
|
31
|
+
<br>
|
|
32
|
+
|
|
33
|
+
<zn-button type="submit">Submit</zn-button>
|
|
34
|
+
</form>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
:::tip
|
|
38
|
+
This component works with standard `<form>` elements. Please refer to the section
|
|
39
|
+
on [form controls](/getting-started/form-controls) to learn more about form submission and client-side validation.
|
|
40
|
+
:::
|
|
41
|
+
|
|
42
|
+
### Help Text
|
|
43
|
+
|
|
44
|
+
Add descriptive help text to a select with the `help-text` attribute. For help texts that contain HTML, use the
|
|
45
|
+
`help-text` slot instead.
|
|
46
|
+
|
|
47
|
+
```html:preview
|
|
48
|
+
<zn-select label="Skill level" help-text="Select one option that best describes your current skill level">
|
|
49
|
+
<zn-option value="1">Novice</zn-option>
|
|
50
|
+
<zn-option value="2">Intermediate</zn-option>
|
|
51
|
+
<zn-option value="3">Advanced</zn-option>
|
|
52
|
+
<zn-option value="4">Expert</zn-option>
|
|
53
|
+
</zn-select>
|
|
54
|
+
<br>
|
|
55
|
+
<zn-select label="Skill level">
|
|
56
|
+
<zn-option value="1">Novice</zn-option>
|
|
57
|
+
<zn-option value="2">Intermediate</zn-option>
|
|
58
|
+
<zn-option value="3">Advanced</zn-option>
|
|
59
|
+
<zn-option value="4">Expert</zn-option>
|
|
60
|
+
<div slot="help-text">Select one option that best describes your <strong>current</strong> skill level</div>
|
|
61
|
+
</zn-select>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Label with Tooltip
|
|
65
|
+
|
|
66
|
+
Use the `label-tooltip` attribute to add text that appears in a tooltip triggered by an info icon next to the label.
|
|
67
|
+
|
|
68
|
+
:::tip
|
|
69
|
+
**Usage:** Use a **label tooltip** to provide helpful but non-essential instructions or examples to guide people when
|
|
70
|
+
selecting an option. Use **help text** to communicate instructions or requirements for choosing an option without
|
|
71
|
+
errors.
|
|
72
|
+
:::
|
|
73
|
+
|
|
74
|
+
```html:preview
|
|
75
|
+
<zn-select label="Skill level" label-tooltip="Although skill doesn't always map to years of experience, the following is a general guide: Novice (Less than 1 year); Intermediate (1-2 years); Advanced (3-5 years); Expert (5+ years)" help-text="Select one option that best describes your current skill level">
|
|
76
|
+
<zn-option value="1">Novice</zn-option>
|
|
77
|
+
<zn-option value="2">Intermediate</zn-option>
|
|
78
|
+
<zn-option value="3">Advanced</zn-option>
|
|
79
|
+
<zn-option value="4">Expert</zn-option>
|
|
80
|
+
</zn-select>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Label with Context Note
|
|
84
|
+
|
|
85
|
+
Use the `context-note` attribute to add text that provides additional context or reference. For text that contains HTML,
|
|
86
|
+
use the `context-note` slot. **Note:** On small screens the context note will wrap below the label if there isn't enough
|
|
87
|
+
room next to the label.
|
|
88
|
+
|
|
89
|
+
:::tip
|
|
90
|
+
**Usage:** Use a **context note** to provide secondary contextual data, especially dynamic data, that would help people
|
|
91
|
+
when choosing an option. Use **help text** to communicate instructions or requirements for choosing an option without
|
|
92
|
+
errors.
|
|
93
|
+
:::
|
|
94
|
+
|
|
95
|
+
```html:preview
|
|
96
|
+
<zn-select label="Skill level" help-text="Select one option that best describes your current skill level">
|
|
97
|
+
<div slot="context-note"><a href="javascript;" class="ts-text-link">See open positions by skill level</a></div>
|
|
98
|
+
<zn-option value="1">Novice</zn-option>
|
|
99
|
+
<zn-option value="2">Intermediate</zn-option>
|
|
100
|
+
<zn-option value="3">Advanced</zn-option>
|
|
101
|
+
<zn-option value="4">Expert</zn-option>
|
|
102
|
+
</zn-select>
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Placeholders
|
|
106
|
+
|
|
107
|
+
Use the `placeholder` attribute to add a placeholder.
|
|
108
|
+
|
|
109
|
+
```html:preview
|
|
110
|
+
<zn-select placeholder="Select one">
|
|
111
|
+
<zn-option value="option-1">Option 1</zn-option>
|
|
112
|
+
<zn-option value="option-2">Option 2</zn-option>
|
|
113
|
+
<zn-option value="option-3">Option 3</zn-option>
|
|
114
|
+
</zn-select>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Clearable
|
|
118
|
+
|
|
119
|
+
Use the `clearable` attribute to make the control clearable. The clear button only appears when an option is selected.
|
|
120
|
+
|
|
121
|
+
:::tip
|
|
122
|
+
**Usage:** Add a clear button only when **multiple** options can be selected. For the default single-choice use case (
|
|
123
|
+
the most common for selects), include an empty option that people can select to "clear" the current selection.
|
|
124
|
+
:::
|
|
125
|
+
|
|
126
|
+
```html:preview
|
|
127
|
+
<zn-select label="Clearable multi-choice select" clearable multiple value="option-1 option-2" help-text="For multi-choice selects only, display an icon button to let people clear their selections">
|
|
128
|
+
<zn-option value="option-1">Option 1</zn-option>
|
|
129
|
+
<zn-option value="option-2">Option 2</zn-option>
|
|
130
|
+
<zn-option value="option-3">Option 3</zn-option>
|
|
131
|
+
<zn-option value="option-4">Option 4</zn-option>
|
|
132
|
+
<zn-option value="option-5">Option 5</zn-option>
|
|
133
|
+
<zn-option value="option-6">Option 6</zn-option>
|
|
134
|
+
</zn-select>
|
|
135
|
+
<br />
|
|
136
|
+
<zn-select label="Clearable single-choice select" help-text="Add an empty value option to allow people to clear their selection in a single-choice select">
|
|
137
|
+
<zn-option value=""></zn-option>
|
|
138
|
+
<zn-option value="option-1">Option 1</zn-option>
|
|
139
|
+
<zn-option value="option-2">Option 2</zn-option>
|
|
140
|
+
<zn-option value="option-3">Option 3</zn-option>
|
|
141
|
+
<zn-option value="option-4">Option 4</zn-option>
|
|
142
|
+
<zn-option value="option-5">Option 5</zn-option>
|
|
143
|
+
<zn-option value="option-6">Option 6</zn-option>
|
|
144
|
+
</zn-select>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Pill
|
|
148
|
+
|
|
149
|
+
Use the `pill` attribute to give selects rounded edges.
|
|
150
|
+
|
|
151
|
+
:::warning
|
|
152
|
+
**Note:** Pill-shaped selects are not a standard pattern in our Design System, and there is no Figma component for this
|
|
153
|
+
option. Please check with the design team before using this option.
|
|
154
|
+
:::
|
|
155
|
+
|
|
156
|
+
```html:preview
|
|
157
|
+
<zn-select label="Medium pill" pill>
|
|
158
|
+
<zn-option value="option-1">Option 1</zn-option>
|
|
159
|
+
<zn-option value="option-2">Option 2</zn-option>
|
|
160
|
+
<zn-option value="option-3">Option 3</zn-option>
|
|
161
|
+
<zn-option value="option-4">Option 4</zn-option>
|
|
162
|
+
<zn-option value="option-5">Option 5</zn-option>
|
|
163
|
+
<zn-option value="option-6">Option 6</zn-option>
|
|
164
|
+
</zn-select>
|
|
165
|
+
<br />
|
|
166
|
+
<zn-select label="Large pill" size="large" pill>
|
|
167
|
+
<zn-option value="option-1">Option 1</zn-option>
|
|
168
|
+
<zn-option value="option-2">Option 2</zn-option>
|
|
169
|
+
<zn-option value="option-3">Option 3</zn-option>
|
|
170
|
+
<zn-option value="option-4">Option 4</zn-option>
|
|
171
|
+
<zn-option value="option-5">Option 5</zn-option>
|
|
172
|
+
<zn-option value="option-6">Option 6</zn-option>
|
|
173
|
+
</zn-select>
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Disabled
|
|
177
|
+
|
|
178
|
+
Use the `disabled` attribute to disable the entire select. To disable just one option, put `disabled` on the
|
|
179
|
+
`zn-option`.
|
|
180
|
+
|
|
181
|
+
```html:preview
|
|
182
|
+
<zn-select label="Disabled select" disabled>
|
|
183
|
+
<zn-option value="option-1">Option 1</zn-option>
|
|
184
|
+
<zn-option value="option-2">Option 2</zn-option>
|
|
185
|
+
<zn-option value="option-3">Option 3</zn-option>
|
|
186
|
+
<zn-option value="option-4">Option 4</zn-option>
|
|
187
|
+
<zn-option value="option-5">Option 5</zn-option>
|
|
188
|
+
<zn-option value="option-6">Option 6</zn-option>
|
|
189
|
+
</zn-select>
|
|
190
|
+
<br/>
|
|
191
|
+
<zn-select label="Select with disabled option">
|
|
192
|
+
<zn-option value="option-1">Option 1</zn-option>
|
|
193
|
+
<zn-option value="option-2">Option 2</zn-option>
|
|
194
|
+
<zn-option value="option-3" disabled>Option 3</zn-option>
|
|
195
|
+
<zn-option value="option-4">Option 4</zn-option>
|
|
196
|
+
<zn-option value="option-5">Option 5</zn-option>
|
|
197
|
+
<zn-option value="option-6">Option 6</zn-option>
|
|
198
|
+
</zn-select>
|
|
199
|
+
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Multiple
|
|
203
|
+
|
|
204
|
+
To allow multiple options to be selected, use the `multiple` attribute. When this option is enabled, be sure to also add
|
|
205
|
+
the `clearable` attribute to display a clear button. To set multiple values at once, set `value` to a space-delimited
|
|
206
|
+
list of values.
|
|
207
|
+
|
|
208
|
+
```html:preview
|
|
209
|
+
<zn-select label="Select one or more" value="option-1 option-2 option-3" multiple clearable>
|
|
210
|
+
<zn-option value="option-1">Option 1</zn-option>
|
|
211
|
+
<zn-option value="option-2">Option 2</zn-option>
|
|
212
|
+
<zn-option value="option-3">Option 3</zn-option>
|
|
213
|
+
<zn-option value="option-4">Option 4</zn-option>
|
|
214
|
+
<zn-option value="option-5">Option 5</zn-option>
|
|
215
|
+
<zn-option value="option-6">Option 6</zn-option>
|
|
216
|
+
</zn-select>
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
:::tip
|
|
220
|
+
Note that multi-select options may wrap, causing the control to expand vertically. You can use the `max-options-visible`
|
|
221
|
+
attribute to control the maximum number of selected options to show at once.
|
|
222
|
+
:::
|
|
223
|
+
|
|
224
|
+
### Multiple with a limit
|
|
225
|
+
|
|
226
|
+
To limit the number of options that can be selected, use the `max-options` attribute.
|
|
227
|
+
|
|
228
|
+
```html:preview
|
|
229
|
+
<zn-select label="Select one or more" value="option-1 option-2" multiple clearable max-options="3">
|
|
230
|
+
<zn-option value="option-1">Option 1</zn-option>
|
|
231
|
+
<zn-option value="option-2">Option 2</zn-option>
|
|
232
|
+
<zn-option value="option-3">Option 3</zn-option>
|
|
233
|
+
<zn-option value="option-4">Option 4</zn-option>
|
|
234
|
+
<zn-option value="option-5">Option 5</zn-option>
|
|
235
|
+
<zn-option value="option-6">Option 6</zn-option>
|
|
236
|
+
</zn-select>
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### Setting Initial Values
|
|
240
|
+
|
|
241
|
+
Use the `value` attribute to set the initial selection.
|
|
242
|
+
|
|
243
|
+
When using `multiple`, the `value` _attribute_ uses space-delimited values to select more than one option. Because of
|
|
244
|
+
this, `<zn-option>` values cannot contain spaces. If you're accessing the `value` _property_ through Javascript, it will
|
|
245
|
+
be an array.
|
|
246
|
+
|
|
247
|
+
```html:preview
|
|
248
|
+
<zn-select label="Select one or more" value="option-1 option-2" multiple clearable>
|
|
249
|
+
<zn-option value="option-1">Option 1</zn-option>
|
|
250
|
+
<zn-option value="option-2">Option 2</zn-option>
|
|
251
|
+
<zn-option value="option-3">Option 3</zn-option>
|
|
252
|
+
<zn-option value="option-4">Option 4</zn-option>
|
|
253
|
+
</zn-select>
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Grouping Options
|
|
257
|
+
|
|
258
|
+
Use `<zn-divider>` to group listbox items visually. You can also use `<small>` to provide labels for each group, but
|
|
259
|
+
they won't be announced by most assistive devices.
|
|
260
|
+
|
|
261
|
+
:::warning
|
|
262
|
+
**Note:** `ts_form_for` doesn't support grouping select options with labels and dividers.
|
|
263
|
+
:::
|
|
264
|
+
|
|
265
|
+
```html:preview
|
|
266
|
+
<zn-select label="Select an option from one of the groups">
|
|
267
|
+
<zn-option value=""></zn-option>
|
|
268
|
+
<small>Section 1</small>
|
|
269
|
+
<zn-option value="option-1">Option 1</zn-option>
|
|
270
|
+
<zn-option value="option-2">Option 2</zn-option>
|
|
271
|
+
<zn-option value="option-3">Option 3</zn-option>
|
|
272
|
+
<zn-divider></zn-divider>
|
|
273
|
+
<small>Section 2</small>
|
|
274
|
+
<zn-option value="option-4">Option 4</zn-option>
|
|
275
|
+
<zn-option value="option-5">Option 5</zn-option>
|
|
276
|
+
<zn-option value="option-6">Option 6</zn-option>
|
|
277
|
+
</zn-select>
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### Sizes
|
|
281
|
+
|
|
282
|
+
Use the `size` attribute to change a select's size. Note that size does not apply to listbox options. Size `medium` is
|
|
283
|
+
the selects default.
|
|
284
|
+
|
|
285
|
+
```html:preview
|
|
286
|
+
<zn-select label="Medium input">
|
|
287
|
+
<zn-option value="option-1">Option 1</zn-option>
|
|
288
|
+
<zn-option value="option-2">Option 2</zn-option>
|
|
289
|
+
<zn-option value="option-3">Option 3</zn-option>
|
|
290
|
+
<zn-option value="option-4">Option 4</zn-option>
|
|
291
|
+
<zn-option value="option-5">Option 5</zn-option>
|
|
292
|
+
<zn-option value="option-6">Option 6</zn-option>
|
|
293
|
+
</zn-select>
|
|
294
|
+
<br />
|
|
295
|
+
<zn-select label="Medium input" size="medium">
|
|
296
|
+
<zn-option value="option-1">Option 1</zn-option>
|
|
297
|
+
<zn-option value="option-2">Option 2</zn-option>
|
|
298
|
+
<zn-option value="option-3">Option 3</zn-option>
|
|
299
|
+
<zn-option value="option-4">Option 4</zn-option>
|
|
300
|
+
<zn-option value="option-5">Option 5</zn-option>
|
|
301
|
+
<zn-option value="option-6">Option 6</zn-option>
|
|
302
|
+
</zn-select>
|
|
303
|
+
<br />
|
|
304
|
+
<zn-select label="Large input" size="large">
|
|
305
|
+
<zn-option value="option-1">Option 1</zn-option>
|
|
306
|
+
<zn-option value="option-2">Option 2</zn-option>
|
|
307
|
+
<zn-option value="option-3">Option 3</zn-option>
|
|
308
|
+
<zn-option value="option-4">Option 4</zn-option>
|
|
309
|
+
<zn-option value="option-5">Option 5</zn-option>
|
|
310
|
+
<zn-option value="option-6">Option 6</zn-option>
|
|
311
|
+
</zn-select>
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
### Placement
|
|
315
|
+
|
|
316
|
+
The preferred placement of the select's listbox can be set with the `placement` attribute. Note that the actual position
|
|
317
|
+
may vary to ensure the panel remains in the viewport. Valid placements are `top` and `bottom`.
|
|
318
|
+
|
|
319
|
+
```html:preview
|
|
320
|
+
<zn-select label="Select an option" placement="top" help-text="This select’s panel of options will try to open on top first if there is room">
|
|
321
|
+
<zn-option value="option-1">Option 1</zn-option>
|
|
322
|
+
<zn-option value="option-2">Option 2</zn-option>
|
|
323
|
+
<zn-option value="option-3">Option 3</zn-option>
|
|
324
|
+
<zn-option value="option-4">Option 4</zn-option>
|
|
325
|
+
<zn-option value="option-5">Option 5</zn-option>
|
|
326
|
+
<zn-option value="option-6">Option 6</zn-option>
|
|
327
|
+
</zn-select>
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
### Prefix Icons
|
|
331
|
+
|
|
332
|
+
Use the `prefix` slot to prepend an icon to the select.
|
|
333
|
+
|
|
334
|
+
Follow these general guidelines when adding prefix icons to the select:
|
|
335
|
+
|
|
336
|
+
- Use the `zn-icon` component
|
|
337
|
+
- Use `library="fa"` (our default Font Awesome icon set)
|
|
338
|
+
- Use the `Regular` icon style, which means you don't need to add a `fas-` or other prefix to the icon name
|
|
339
|
+
- See [icons sets](/components/icon/#icon-sets) for more about Font Awesome icon styles
|
|
340
|
+
- In general **don't** resize icons or change their color from the default already set by the `zn-select` component
|
|
341
|
+
|
|
342
|
+
:::warning
|
|
343
|
+
**Note:** If you find your use case requires a different size or color from the default, bring it up to the Design Team
|
|
344
|
+
so that we can consider whether the pattern needs to be updated.
|
|
345
|
+
:::
|
|
346
|
+
:::warning
|
|
347
|
+
**Note:** `ts_form_for` doesn't support slots. Prefix icons cannot be added when rendering `zn-select` with
|
|
348
|
+
`ts_form_for`.
|
|
349
|
+
:::
|
|
350
|
+
|
|
351
|
+
```html:preview
|
|
352
|
+
<zn-select label="Prefix icon example: DO">
|
|
353
|
+
<zn-icon src="rocket_launch" slot="prefix"></zn-icon>
|
|
354
|
+
<zn-option value="option-1">Option 1</zn-option>
|
|
355
|
+
<zn-option value="option-2">Option 2</zn-option>
|
|
356
|
+
<zn-option value="option-3">Option 3</zn-option>
|
|
357
|
+
<zn-option value="option-4">Option 4</zn-option>
|
|
358
|
+
<zn-option value="option-5">Option 5</zn-option>
|
|
359
|
+
<zn-option value="option-6">Option 6</zn-option>
|
|
360
|
+
</zn-select>
|
|
361
|
+
<br />
|
|
362
|
+
<zn-select label="Prefix icon example: DON'T">
|
|
363
|
+
<zn-icon src="rocket_launch" style="font-size: 1.25rem; color:mediumaquamarine;" slot="prefix"></zn-icon>
|
|
364
|
+
<zn-option value="option-1">Option 1</zn-option>
|
|
365
|
+
<zn-option value="option-2">Option 2</zn-option>
|
|
366
|
+
<zn-option value="option-3">Option 3</zn-option>
|
|
367
|
+
<zn-option value="option-4">Option 4</zn-option>
|
|
368
|
+
<zn-option value="option-5">Option 5</zn-option>
|
|
369
|
+
<zn-option value="option-6">Option 6</zn-option>
|
|
370
|
+
</zn-select>
|
|
371
|
+
<br />
|
|
372
|
+
<zn-select label="Prefix icon example: POSSIBLE EXCEPTION" help-text="An icon that is hard to read at the default size" value="option-1">
|
|
373
|
+
<zn-icon src="account_circle_off" slot="prefix"></zn-icon>
|
|
374
|
+
<zn-option value="option-1">Option 1 (default alignment)</zn-option>
|
|
375
|
+
<zn-option value="option-2">Option 2 (default alignment)</zn-option>
|
|
376
|
+
<zn-option value="option-3">Option 3 (default alignment)</zn-option>
|
|
377
|
+
<zn-option value="option-4">Option 4 (default alignment)</zn-option></zn-select>
|
|
378
|
+
<br />
|
|
379
|
+
<zn-select label="Prefix icon example: RESIZED" help-text="Same icon as above, resized. Note that a larger prefix icon will push the option text out of alignment." value="option-1">
|
|
380
|
+
<zn-icon src="account_circle_off" size="24" slot="prefix"></zn-icon>
|
|
381
|
+
<zn-option value="option-1">Option 1 (shifted 4px right due to icon size)</zn-option>
|
|
382
|
+
<zn-option value="option-2">Option 2 (shifted 4px right due to icon size)</zn-option>
|
|
383
|
+
<zn-option value="option-3">Option 3 (shifted 4px right due to icon size)</zn-option>
|
|
384
|
+
<zn-option value="option-4">Option 4 (shifted 4px right due to icon size)</zn-option>
|
|
385
|
+
</zn-select>
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
### Custom Tags
|
|
389
|
+
|
|
390
|
+
When multiple options can be selected, you can provide custom tags by passing a function to the `getTag` property. Your
|
|
391
|
+
function can return a string of HTML, a <a href="https://lit.dev/docs/templates/overview/">Lit Template</a>, or an [
|
|
392
|
+
`HTMLElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement). The `getTag()` function will be called for
|
|
393
|
+
each option. The first argument is an `<zn-option>` element and the second argument is the tag's index (its position in
|
|
394
|
+
the tag list).
|
|
395
|
+
|
|
396
|
+
Remember that custom tags are rendered in a shadow root. To style them, you can use the `style` attribute in your
|
|
397
|
+
template or you can add your own [parts](/getting-started/customizing/#css-parts) and target them with the [
|
|
398
|
+
`::part()`](https://developer.mozilla.org/en-US/docs/Web/CSS/::part) selector.
|
|
399
|
+
|
|
400
|
+
:::warning
|
|
401
|
+
**Note:** In general, you shouldn't need to do this. If you are working on a design that requires custom styling for the
|
|
402
|
+
tag, please ensure that there's not a standard tag in the design system that would work instead.
|
|
403
|
+
:::
|
|
404
|
+
:::warning
|
|
405
|
+
**Note:** `ts_form_for` doesn't support slots. Custom tags cannot be added when rendering `zn-select` with
|
|
406
|
+
`ts_form_for`.
|
|
407
|
+
:::
|
|
408
|
+
|
|
409
|
+
```html:preview
|
|
410
|
+
<zn-select
|
|
411
|
+
placeholder="Select one"
|
|
412
|
+
value="email phone"
|
|
413
|
+
multiple
|
|
414
|
+
clearable
|
|
415
|
+
class="custom-tag"
|
|
416
|
+
>
|
|
417
|
+
<zn-option value="email">
|
|
418
|
+
<zn-icon slot="prefix" name="envelope" library="fa"></zn-icon>
|
|
419
|
+
Email
|
|
420
|
+
</zn-option>
|
|
421
|
+
<zn-option value="phone">
|
|
422
|
+
<zn-icon slot="prefix" name="phone" library="fa"></zn-icon>
|
|
423
|
+
Phone
|
|
424
|
+
</zn-option>
|
|
425
|
+
<zn-option value="chat">
|
|
426
|
+
<zn-icon slot="prefix" name="comment" library="fa"></zn-icon>
|
|
427
|
+
Chat
|
|
428
|
+
</zn-option>
|
|
429
|
+
</zn-select>
|
|
430
|
+
|
|
431
|
+
<script type="module">
|
|
432
|
+
const select = document.querySelector('.custom-tag');
|
|
433
|
+
|
|
434
|
+
select.getTag = (option, index) => {
|
|
435
|
+
// Use the same icon used in the <zn-option>
|
|
436
|
+
const name = option.querySelector('zn-icon[slot="prefix"]').name;
|
|
437
|
+
|
|
438
|
+
// You can return a string, a Lit Template, or an HTMLElement here
|
|
439
|
+
return `
|
|
440
|
+
<zn-tag removable>
|
|
441
|
+
<zn-icon library="fa" name="${name}" style="padding-inline-end: .5rem;"></zn-icon>
|
|
442
|
+
${option.getTextLabel()}
|
|
443
|
+
</zn-tag>
|
|
444
|
+
`;
|
|
445
|
+
};
|
|
446
|
+
</script>
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
:::warning
|
|
450
|
+
Be sure you trust the content you are outputting! Passing unsanitized user input to `getTag()` can result in XSS
|
|
451
|
+
vulnerabilities.
|
|
452
|
+
:::
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
meta:
|
|
3
|
+
title: Sidebar
|
|
4
|
+
description:
|
|
5
|
+
layout: component
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
```html:preview
|
|
9
|
+
<zn-sidebar>
|
|
10
|
+
<div slot="side" class="zn-divide">
|
|
11
|
+
This is the sidebar content
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
This is the body content
|
|
15
|
+
</zn-sidebar>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Examples
|
|
19
|
+
|
|
20
|
+
### First Example
|
|
21
|
+
|
|
22
|
+
TODO
|
|
23
|
+
|
|
24
|
+
### Second Example
|
|
25
|
+
|
|
26
|
+
TODO
|
|
27
|
+
|
|
28
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
meta:
|
|
3
|
+
title: Simple Chart
|
|
4
|
+
description:
|
|
5
|
+
layout: component
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
```html:preview
|
|
9
|
+
<zn-simple-chart>
|
|
10
|
+
</zn-simple-chart>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Examples
|
|
14
|
+
|
|
15
|
+
### First Example
|
|
16
|
+
|
|
17
|
+
TODO
|
|
18
|
+
|
|
19
|
+
### Second Example
|
|
20
|
+
|
|
21
|
+
TODO
|
|
22
|
+
|
|
23
|
+
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
meta:
|
|
3
|
+
title: Skeleton
|
|
4
|
+
description:
|
|
5
|
+
layout: component
|
|
6
|
+
fullWidth: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
```html:preview
|
|
10
|
+
|
|
11
|
+
<zn-skeleton></zn-skeleton>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Examples
|
|
15
|
+
|
|
16
|
+
### Animation Speed
|
|
17
|
+
|
|
18
|
+
```html:preview
|
|
19
|
+
|
|
20
|
+
<div
|
|
21
|
+
style="display: grid; grid-template-columns: 75px 1fr; justify-content: center; align-items: center; gap: 10px; width: 450px;">
|
|
22
|
+
<p style="place-self: end;"><b>Fast:</b></p>
|
|
23
|
+
<zn-skeleton speed="1.5s"></zn-skeleton>
|
|
24
|
+
</div>
|
|
25
|
+
<div
|
|
26
|
+
style="display: grid; grid-template-columns: 75px 1fr; justify-content: center; align-items: center; gap: 10px; width: 450px;">
|
|
27
|
+
<p style="place-self: end;"><b>Average:</b></p>
|
|
28
|
+
<zn-skeleton speed="3s"></zn-skeleton>
|
|
29
|
+
</div>
|
|
30
|
+
<div
|
|
31
|
+
style="display: grid; grid-template-columns: 75px 1fr; justify-content: center; align-items: center; gap: 10px; width: 450px;">
|
|
32
|
+
<p style="place-self: end;"><b>Slow:</b></p>
|
|
33
|
+
<zn-skeleton speed="5s"></zn-skeleton>
|
|
34
|
+
</div>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Height
|
|
38
|
+
|
|
39
|
+
```html:preview
|
|
40
|
+
|
|
41
|
+
<div style="display: grid; gap: 10px;">
|
|
42
|
+
<zn-skeleton height="25px"></zn-skeleton>
|
|
43
|
+
<zn-skeleton height="50px"></zn-skeleton>
|
|
44
|
+
<zn-skeleton height="75px"></zn-skeleton>
|
|
45
|
+
<zn-skeleton height="100px"></zn-skeleton>
|
|
46
|
+
</div>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Width
|
|
50
|
+
|
|
51
|
+
```html:preview
|
|
52
|
+
|
|
53
|
+
<div style="display: grid; gap: 10px;">
|
|
54
|
+
<zn-skeleton width="50px"></zn-skeleton>
|
|
55
|
+
<zn-skeleton width="100px"></zn-skeleton>
|
|
56
|
+
<zn-skeleton width="500px"></zn-skeleton>
|
|
57
|
+
<zn-skeleton width="975px"></zn-skeleton>
|
|
58
|
+
</div>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Border Radius
|
|
62
|
+
|
|
63
|
+
```html:preview
|
|
64
|
+
|
|
65
|
+
<div style="display: grid; gap: 10px;">
|
|
66
|
+
<zn-skeleton radius="0"></zn-skeleton>
|
|
67
|
+
<zn-skeleton radius="4px"></zn-skeleton>
|
|
68
|
+
<zn-skeleton radius="50px"></zn-skeleton>
|
|
69
|
+
</div>
|
|
70
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
meta:
|
|
3
|
+
title: Slideout
|
|
4
|
+
description: 'Slideouts, appear from the side of the screen and are used to display additional content without navigating away from the current page.'
|
|
5
|
+
layout: component
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Examples
|
|
9
|
+
|
|
10
|
+
### Basic Slideout
|
|
11
|
+
|
|
12
|
+
This is a basic sliding out component that can be triggered by a button. It includes a footer with action buttons.
|
|
13
|
+
|
|
14
|
+
```html:preview
|
|
15
|
+
|
|
16
|
+
<zn-button id="slideout-trigger">Open Basic slideout</zn-button>
|
|
17
|
+
<zn-slideout class="slideout-basic" trigger="slideout-trigger" label="Slideout">
|
|
18
|
+
This is the slideout’s body.
|
|
19
|
+
|
|
20
|
+
<zn-button color="default" slot="footer">Do Something</zn-button>
|
|
21
|
+
<zn-button color="secondary" slot="footer" slideout-closer>Close Slideout</zn-button>
|
|
22
|
+
</zn-slideout>
|
|
23
|
+
```
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
meta:
|
|
3
|
+
title: Sp
|
|
4
|
+
description:
|
|
5
|
+
layout: component
|
|
6
|
+
fullWidth: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
```html:preview
|
|
10
|
+
<zn-sp>
|
|
11
|
+
<p>Hello World</p>
|
|
12
|
+
<p>Hello World</p>
|
|
13
|
+
<p>Hello World</p>
|
|
14
|
+
<p>Hello World</p>
|
|
15
|
+
</zn-sp>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Examples
|
|
19
|
+
|
|
20
|
+
### Restricted Width
|
|
21
|
+
|
|
22
|
+
```html:preview
|
|
23
|
+
|
|
24
|
+
<zn-sp width-container>
|
|
25
|
+
<p>Hello Wsorld</p>
|
|
26
|
+
<p>Hello World</p>
|
|
27
|
+
<p>Hello World</p>
|
|
28
|
+
<p>Hello World</p>
|
|
29
|
+
</zn-sp>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Divided
|
|
33
|
+
|
|
34
|
+
```html:preview
|
|
35
|
+
<zn-sp divide>
|
|
36
|
+
<p>Hello World</p>
|
|
37
|
+
<p>Hello World</p>
|
|
38
|
+
<p>Hello World</p>
|
|
39
|
+
<p>Hello World</p>
|
|
40
|
+
</zn-sp>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Row
|
|
44
|
+
|
|
45
|
+
```html:preview
|
|
46
|
+
<zn-sp row>
|
|
47
|
+
<p>Hello World</p>
|
|
48
|
+
<p>Hello World</p>
|
|
49
|
+
<p>Hello World</p>
|
|
50
|
+
<p>Hello World</p>
|
|
51
|
+
</zn-sp>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Padding
|
|
55
|
+
|
|
56
|
+
```html:preview
|
|
57
|
+
<zn-sp pad>
|
|
58
|
+
<p>Hello World</p>
|
|
59
|
+
<p>Hello World</p>
|
|
60
|
+
<p>Hello World</p>
|
|
61
|
+
<p>Hello World</p>
|
|
62
|
+
</zn-sp>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
#### Pad X
|
|
66
|
+
|
|
67
|
+
```html:preview
|
|
68
|
+
<zn-sp pad-x>
|
|
69
|
+
<p>Hello World</p>
|
|
70
|
+
<p>Hello World</p>
|
|
71
|
+
<p>Hello World</p>
|
|
72
|
+
<p>Hello World</p>
|
|
73
|
+
</zn-sp>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
#### Pad Y
|
|
77
|
+
|
|
78
|
+
```html:preview
|
|
79
|
+
<zn-sp pad-y>
|
|
80
|
+
<p>Hello World</p>
|
|
81
|
+
<p>Hello World</p>
|
|
82
|
+
<p>Hello World</p>
|
|
83
|
+
<p>Hello World</p>
|
|
84
|
+
</zn-sp>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
|