@kubex/zinc 1.1.184 → 2.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/.browserslistrc +2 -0
- package/.github/workflows/js_build_and_deploy.yaml +54 -1
- package/.github/workflows/test.yaml +27 -0
- package/dist/chunks/zn.UWJLIXDT.js +1 -0
- package/dist/custom-elements.json +10344 -2583
- package/dist/vscode.html-custom-data.json +1102 -125
- package/dist/web-types.json +2217 -224
- package/dist/zn.d.ts +2306 -417
- package/dist/zn.min.css +1 -1
- package/dist/zn.min.js +2313 -1635
- package/docs/_includes/default.njk +4 -1
- package/docs/assets/scripts/docs.js +22 -6
- package/docs/assets/styles/docs.css +9 -2
- package/docs/data/report-table-day-compare.json +380 -0
- package/docs/data/report-table.json +314 -0
- package/docs/pages/components/avatar-group.md +57 -0
- package/docs/pages/components/badge.md +67 -0
- package/docs/pages/components/button.md +41 -1
- package/docs/pages/components/chat-message.md +16 -0
- package/docs/pages/components/checkbox.md +1 -1
- package/docs/pages/components/chip.md +25 -13
- package/docs/pages/components/color-picker.md +37 -0
- package/docs/pages/components/copy-button.md +2 -2
- package/docs/pages/components/data-table-filter.md +33 -50
- package/docs/pages/components/data-table-search.md +4 -4
- package/docs/pages/components/data-table.md +27 -3
- package/docs/pages/components/date-range.md +116 -0
- package/docs/pages/components/dialog.md +29 -37
- package/docs/pages/components/diff-row.md +28 -0
- package/docs/pages/components/diff.md +46 -0
- package/docs/pages/components/editor.md +55 -0
- package/docs/pages/components/filter-wrapper.md +20 -0
- package/docs/pages/components/icon.md +46 -1
- package/docs/pages/components/input.md +30 -11
- package/docs/pages/components/item.md +35 -0
- package/docs/pages/components/key-value.md +25 -0
- package/docs/pages/components/menu.md +74 -7
- package/docs/pages/components/nav-item.md +15 -0
- package/docs/pages/components/nav-list.md +132 -0
- package/docs/pages/components/navbar.md +100 -1
- package/docs/pages/components/page.md +242 -74
- package/docs/pages/components/priority-list.md +43 -5
- package/docs/pages/components/query-builder.md +23 -0
- package/docs/pages/components/radio-group.md +33 -1
- package/docs/pages/components/radio.md +1 -1
- package/docs/pages/components/report-table.md +202 -0
- package/docs/pages/components/stat.md +30 -0
- package/docs/pages/components/tile.md +11 -0
- package/docs/pages/components/tooltip.md +1 -1
- package/docs/pages/components/translation-grid.md +86 -0
- package/docs/pages/components/vertical-stepper.md +108 -64
- package/package.json +2 -1
- package/scss/_global-spacing.scss +2 -2
- package/scss/_root.scss +11 -171
- package/scss/boot.scss +14 -0
- package/scss/mixins/_helper-mixins.scss +24 -2
- package/scss/mixins/_motion-mixins.scss +126 -0
- package/scss/mixins/_spacing-mixins.scss +4 -3
- package/scss/mixins/_tab-indicator-mixins.scss +12 -0
- package/scss/mixins/_typography-mixins.scss +1 -1
- package/scss/mixins/index.scss +14 -0
- package/scss/shared/_base.scss +32 -1
- package/scss/shared/_button-mixin.scss +7 -5
- package/scss/shared/_table.scss +35 -4
- package/scss/shared/nav.scss +4 -0
- package/scss/shared/shimmer.scss +1 -1
- package/scss/table-controls.scss +206 -0
- package/scss/themes/_dark.scss +1 -3
- package/scss/themes/_index.scss +1 -1
- package/scss/themes/_light.scss +46 -6
- package/scss/themes/_modes.scss +11 -11
- package/scss/themes/_openbyte.scss +944 -0
- package/scss/themes/_typography.scss +4 -2
- package/scss/variables/index.scss +0 -9
- package/src/components/alert/alert.component.ts +14 -4
- package/src/components/alert/alert.scss +55 -69
- package/src/components/alert/alert.test.ts +8 -0
- package/src/components/animated-button/animated-button.component.ts +3 -2
- package/src/components/animated-button/animated-button.scss +6 -23
- package/src/components/animated-button/animated-button.test.ts +4 -3
- package/src/components/avatar-group/avatar-group.component.ts +84 -0
- package/src/components/avatar-group/avatar-group.scss +54 -0
- package/src/components/avatar-group/avatar-group.test.ts +59 -0
- package/src/components/avatar-group/index.ts +12 -0
- package/src/components/badge/badge.component.ts +49 -0
- package/src/components/badge/badge.scss +80 -0
- package/src/components/badge/badge.test.ts +34 -0
- package/src/components/badge/index.ts +12 -0
- package/src/components/bulk-actions/bulk-actions.component.ts +14 -2
- package/src/components/button/button.component.ts +242 -11
- package/src/components/button/button.scss +133 -25
- package/src/components/button/button.test.ts +122 -0
- package/src/components/button-menu/button-menu.component.ts +32 -11
- package/src/components/button-menu/button-menu.scss +5 -1
- package/src/components/channel-tile/channel-tile.component.ts +34 -27
- package/src/components/channel-tile/channel-tile.scss +76 -43
- package/src/components/chart/builders.test.ts +46 -0
- package/src/components/chart/builders.ts +27 -3
- package/src/components/chart/chart-live.test.ts +4 -6
- package/src/components/chart/chart.component.ts +125 -5
- package/src/components/chart/chart.scss +121 -0
- package/src/components/chart/chart.test.ts +81 -0
- package/src/components/chat-message/chat-message.component.ts +21 -1
- package/src/components/chat-message/chat-message.scss +13 -2
- package/src/components/chat-message/chat-message.test.ts +9 -0
- package/src/components/checkbox/checkbox.component.ts +61 -27
- package/src/components/checkbox/checkbox.scss +58 -25
- package/src/components/checkbox-group/checkbox-group.component.ts +7 -1
- package/src/components/chip/chip.component.ts +11 -1
- package/src/components/chip/chip.scss +91 -26
- package/src/components/chip/chip.test.ts +17 -0
- package/src/components/collapsible/collapsible.component.ts +17 -3
- package/src/components/collapsible/collapsible.scss +19 -10
- package/src/components/color-picker/color-picker.component.ts +277 -0
- package/src/components/color-picker/color-picker.scss +141 -0
- package/src/components/color-picker/color-picker.test.ts +57 -0
- package/src/components/color-picker/index.ts +12 -0
- package/src/components/cols/cols.component.ts +17 -3
- package/src/components/cols/cols.scss +24 -13
- package/src/components/cols/cols.test.ts +33 -0
- package/src/components/confirm/confirm.component.ts +20 -6
- package/src/components/confirm/confirm.test.ts +52 -0
- package/src/components/content-block/content-block.component.ts +38 -9
- package/src/components/content-block/content-block.scss +11 -5
- package/src/components/content-block/content-block.test.ts +26 -0
- package/src/components/copy-button/copy-button.component.ts +2 -2
- package/src/components/copy-button/copy-button.scss +17 -4
- package/src/components/data-select/data-select.component.ts +3 -1
- package/src/components/data-table/data-table.component.ts +364 -142
- package/src/components/data-table/data-table.scss +133 -60
- package/src/components/data-table/data-table.test.ts +356 -4
- package/src/components/data-table-filter/data-table-filter.component.ts +426 -406
- package/src/components/data-table-filter/data-table-filter.scss +176 -148
- package/src/components/data-table-filter/data-table-filter.test.ts +271 -273
- package/src/components/data-table-search/data-table-search.component.ts +4 -2
- package/src/components/data-table-search/data-table-search.scss +8 -1
- package/src/components/data-table-search/data-table-search.test.ts +29 -0
- package/src/components/date-range/date-range-math.test.ts +78 -0
- package/src/components/date-range/date-range-math.ts +105 -0
- package/src/components/date-range/date-range.component.ts +375 -0
- package/src/components/date-range/date-range.scss +272 -0
- package/src/components/date-range/date-range.test.ts +247 -0
- package/src/components/date-range/index.ts +12 -0
- package/src/components/datepicker/datepicker.component.ts +44 -7
- package/src/components/datepicker/datepicker.scss +9 -0
- package/src/components/datepicker/datepicker.test.ts +2 -2
- package/src/components/dialog/dialog.component.ts +38 -19
- package/src/components/dialog/dialog.scss +65 -36
- package/src/components/dialog/dialog.test.ts +14 -0
- package/src/components/diff/diff.component.ts +55 -0
- package/src/components/diff/diff.scss +46 -0
- package/src/components/diff/diff.test.ts +15 -0
- package/src/components/diff/index.ts +12 -0
- package/src/components/diff-row/diff-row.component.ts +75 -0
- package/src/components/diff-row/diff-row.scss +70 -0
- package/src/components/diff-row/diff-row.test.ts +37 -0
- package/src/components/diff-row/index.ts +12 -0
- package/src/components/dropdown/dropdown.component.ts +12 -10
- package/src/components/dropdown/dropdown.scss +2 -0
- package/src/components/editor/editor.component.ts +159 -11
- package/src/components/editor/editor.scss +250 -1
- package/src/components/editor/editor.test.ts +31 -3
- package/src/components/editor/modules/ai/panel/ai-panel.scss +0 -1
- package/src/components/editor/modules/attachment/attachment.ts +53 -31
- package/src/components/editor/modules/context-menu/context-menu.ts +17 -0
- package/src/components/editor/modules/dialog/dialog.component.ts +23 -1
- package/src/components/editor/modules/dialog/dialog.test.ts +28 -0
- package/src/components/editor/modules/emoji/emoji.ts +4 -5
- package/src/components/editor/modules/merge-field/merge-field.ts +83 -0
- package/src/components/editor/modules/toolbar/toolbar.component.ts +121 -68
- package/src/components/editor/modules/toolbar/toolbar.scss +38 -0
- package/src/components/editor/modules/toolbar/toolbar.ts +25 -1
- package/src/components/empty-state/empty-state.component.ts +6 -1
- package/src/components/empty-state/empty-state.scss +21 -4
- package/src/components/expanding-action/expanding-action.component.ts +22 -34
- package/src/components/expanding-action/expanding-action.scss +3 -45
- package/src/components/expanding-action/expanding-action.test.ts +2 -1
- package/src/components/file/file.component.ts +30 -2
- package/src/components/file/file.scss +6 -0
- package/src/components/filter-wrapper/filter-wrapper.component.ts +45 -10
- package/src/components/filter-wrapper/filter-wrapper.test.ts +58 -2
- package/src/components/flow-builder/flow-builder.component.ts +36 -3
- package/src/components/flow-builder/flow-builder.scss +0 -6
- package/src/components/flow-builder/modules/flow-canvas/flow-canvas.component.ts +8 -0
- package/src/components/flow-builder/modules/flow-canvas/flow-canvas.scss +10 -5
- package/src/components/flow-builder/modules/flow-node/flow-node.component.ts +17 -0
- package/src/components/flow-builder/modules/flow-node/flow-node.scss +10 -0
- package/src/components/form-actions/form-actions.component.ts +48 -2
- package/src/components/form-actions/form-actions.scss +1 -1
- package/src/components/form-group/form-group.component.ts +10 -3
- package/src/components/form-group/form-group.scss +37 -4
- package/src/components/form-group/form-group.test.ts +10 -0
- package/src/components/header/header.component.ts +11 -4
- package/src/components/header/header.scss +47 -5
- package/src/components/hover-container/hover-container.component.ts +4 -5
- package/src/components/icon/icon.component.ts +95 -9
- package/src/components/icon/icon.scss +70 -6
- package/src/components/icon/icon.test.ts +55 -0
- package/src/components/icon-picker/icon-picker.component.ts +35 -1
- package/src/components/inline-edit/inline-edit.component.ts +38 -8
- package/src/components/inline-edit/inline-edit.scss +128 -19
- package/src/components/input/input.component.ts +173 -297
- package/src/components/input/input.scss +65 -43
- package/src/components/input/input.test.ts +86 -4
- package/src/components/item/item.component.ts +12 -0
- package/src/components/item/item.scss +102 -3
- package/src/components/item/item.test.ts +23 -0
- package/src/components/key/key.component.ts +2 -2
- package/src/components/key/key.scss +11 -0
- package/src/components/key-value/index.ts +12 -0
- package/src/components/key-value/key-value.component.ts +160 -0
- package/src/components/key-value/key-value.scss +20 -0
- package/src/components/key-value/key-value.test.ts +22 -0
- package/src/components/markdown-editor/markdown-editor.component.ts +8 -1
- package/src/components/menu/menu.component.ts +21 -2
- package/src/components/menu/menu.scss +43 -23
- package/src/components/menu/menu.test.ts +33 -0
- package/src/components/menu-item/menu-item.component.ts +13 -2
- package/src/components/menu-item/menu-item.scss +56 -23
- package/src/components/menu-item/menu-item.test.ts +31 -0
- package/src/components/menu-item/submenu-controller.ts +25 -15
- package/src/components/menu-label/index.ts +12 -0
- package/src/components/menu-label/menu-label.component.ts +30 -0
- package/src/components/menu-label/menu-label.scss +18 -0
- package/src/components/nav-item/index.ts +12 -0
- package/src/components/nav-item/nav-item.component.ts +83 -0
- package/src/components/nav-item/nav-item.scss +128 -0
- package/src/components/nav-list/index.ts +12 -0
- package/src/components/nav-list/nav-list.component.ts +313 -0
- package/src/components/nav-list/nav-list.scss +87 -0
- package/src/components/nav-list/nav-list.test.ts +250 -0
- package/src/components/navbar/navbar.component.ts +235 -171
- package/src/components/navbar/navbar.scss +333 -169
- package/src/components/navbar/navbar.test.ts +63 -143
- package/src/components/page/page.component.ts +114 -29
- package/src/components/page/page.scss +223 -95
- package/src/components/page/page.test.ts +214 -3
- package/src/components/page-builder/page-builder.component.ts +51 -5
- package/src/components/page-builder/page-builder.scss +6 -1
- package/src/components/page-nav/page-nav.component.ts +25 -3
- package/src/components/page-nav/page-nav.scss +10 -2
- package/src/components/pagination/pagination.scss +1 -1
- package/src/components/panel/panel.component.ts +14 -13
- package/src/components/panel/panel.scss +14 -10
- package/src/components/panel/panel.test.ts +42 -0
- package/src/components/popup/popup.component.ts +20 -13
- package/src/components/popup/popup.test.ts +21 -1
- package/src/components/priority-list/priority-list.component.ts +157 -172
- package/src/components/priority-list/priority-list.scss +113 -17
- package/src/components/priority-list/priority-list.test.ts +301 -3
- package/src/components/progress-bar/progress-bar.component.ts +1 -1
- package/src/components/progress-bar/progress-bar.scss +16 -4
- package/src/components/progress-tile/progress-tile.scss +1 -1
- package/src/components/query-builder/query-builder.component.ts +85 -10
- package/src/components/query-builder/query-builder.scss +7 -1
- package/src/components/query-builder/query-builder.test.ts +40 -0
- package/src/components/radio/radio.component.ts +57 -18
- package/src/components/radio/radio.scss +101 -26
- package/src/components/radio-group/radio-group.component.ts +45 -7
- package/src/components/radio-group/radio-group.scss +17 -0
- package/src/components/radio-group/radio-group.test.ts +63 -2
- package/src/components/rating/rating.component.ts +23 -0
- package/src/components/rating/rating.scss +1 -1
- package/src/components/remarkd-editor/remarkd-editor.component.ts +60 -5
- package/src/components/remarkd-editor/remarkd-editor.scss +12 -4
- package/src/components/report-table/index.ts +12 -0
- package/src/components/report-table/report-format.test.ts +86 -0
- package/src/components/report-table/report-format.ts +72 -0
- package/src/components/report-table/report-math.test.ts +74 -0
- package/src/components/report-table/report-math.ts +252 -0
- package/src/components/report-table/report-table.component.ts +681 -0
- package/src/components/report-table/report-table.scss +328 -0
- package/src/components/report-table/report-table.test.ts +702 -0
- package/src/components/reveal/reveal.component.ts +15 -1
- package/src/components/reveal/reveal.scss +5 -0
- package/src/components/schedule-builder/schedule-builder.component.ts +23 -8
- package/src/components/scroll-container/scroll-container.component.ts +19 -1
- package/src/components/scroll-container/scroll-container.scss +6 -1
- package/src/components/select/select.component.ts +52 -36
- package/src/components/select/select.scss +42 -25
- package/src/components/select/select.test.ts +14 -2
- package/src/components/settings-container/settings-container.scss +18 -5
- package/src/components/sidebar/sidebar.component.ts +8 -1
- package/src/components/sidebar/sidebar.scss +6 -1
- package/src/components/skeleton/skeleton.component.ts +3 -3
- package/src/components/skeleton/skeleton.scss +6 -6
- package/src/components/skeleton/skeleton.test.ts +9 -0
- package/src/components/slash-menu/slash-menu.scss +1 -1
- package/src/components/slideout/slideout.component.ts +20 -3
- package/src/components/slideout/slideout.scss +13 -6
- package/src/components/slideout/slideout.test.ts +19 -0
- package/src/components/split-button/split-button.component.ts +1 -1
- package/src/components/split-pane/split-pane.component.ts +71 -8
- package/src/components/split-pane/split-pane.scss +145 -41
- package/src/components/split-pane/split-pane.test.ts +23 -3
- package/src/components/stat/stat.component.ts +209 -14
- package/src/components/stat/stat.scss +305 -5
- package/src/components/stat/stat.test.ts +143 -2
- package/src/components/status-indicator/status-indicator.scss +22 -21
- package/src/components/stepper/stepper.scss +3 -3
- package/src/components/tab/tab.component.ts +1 -0
- package/src/components/table/table.component.ts +12 -1
- package/src/components/table/table.scss +21 -13
- package/src/components/table/table.test.ts +17 -0
- package/src/components/tabs/tabs.component.ts +150 -37
- package/src/components/tabs/tabs.scss +48 -7
- package/src/components/tabs/tabs.test.ts +169 -0
- package/src/components/textarea/textarea.component.ts +25 -3
- package/src/components/textarea/textarea.scss +10 -0
- package/src/components/textarea/textarea.test.ts +8 -4
- package/src/components/theme-editor/theme-editor.scss +0 -6
- package/src/components/tile/tile.component.ts +32 -2
- package/src/components/tile/tile.scss +40 -7
- package/src/components/tile/tile.test.ts +10 -0
- package/src/components/toggle/toggle.component.ts +23 -7
- package/src/components/toggle/toggle.scss +36 -29
- package/src/components/toggle/toggle.test.ts +17 -0
- package/src/components/tooltip/tooltip.component.ts +3 -0
- package/src/components/tooltip/tooltip.scss +11 -6
- package/src/components/tooltip/tooltip.test.ts +12 -0
- package/src/components/translation-field/index.ts +12 -0
- package/src/components/translation-field/translation-field.component.ts +55 -0
- package/src/components/translation-field/translation-field.scss +101 -0
- package/src/components/translation-fields/index.ts +12 -0
- package/src/components/translation-fields/translation-fields.component.ts +80 -0
- package/src/components/translation-fields/translation-fields.scss +60 -0
- package/src/components/translation-grid/index.ts +12 -0
- package/src/components/translation-grid/translation-grid.component.ts +157 -0
- package/src/components/translation-grid/translation-grid.scss +138 -0
- package/src/components/translation-grid/translation-grid.test.ts +28 -0
- package/src/components/vertical-stepper/vertical-stepper.component.ts +35 -9
- package/src/components/vertical-stepper/vertical-stepper.scss +110 -39
- package/src/components/vertical-stepper/vertical-stepper.test.ts +35 -0
- package/src/components/well/well.scss +2 -2
- package/src/events/events.ts +2 -0
- package/src/events/zn-chart-click.ts +13 -0
- package/src/events/zn-report-change.ts +7 -0
- package/src/form-control.scss +36 -3
- package/src/internal/anchored-popover.ts +175 -0
- package/src/internal/animate.ts +19 -5
- package/src/internal/cosmic-border.ts +15 -0
- package/src/internal/form.ts +1 -1
- package/src/internal/hover-intent.ts +15 -0
- package/src/internal/input-modality.ts +15 -0
- package/src/internal/pointer-intent.ts +37 -0
- package/src/internal/reorder.ts +625 -0
- package/src/internal/scroll.ts +51 -3
- package/src/internal/selection-card.ts +1 -1
- package/src/internal/tab-indicator.ts +92 -0
- package/src/internal/table-sort.ts +25 -0
- package/src/internal/table-tabs.ts +108 -0
- package/src/internal/test-drag.ts +35 -0
- package/src/internal/theme-openbyte.test.ts +126 -0
- package/src/internal/theme.ts +4 -4
- package/src/internal/zinc-element.ts +2 -2
- package/src/selection-card.scss +25 -0
- package/src/types/web-test-runner-commands.d.ts +1 -0
- package/src/utilities/color.test.ts +43 -0
- package/src/utilities/color.ts +189 -0
- package/src/zinc.ts +14 -0
- package/.github/workflows/eleventy_build.yml +0 -42
- package/scss/themes/_aura.scss +0 -114
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
{
|
|
2
|
+
"dimension": {
|
|
3
|
+
"label": "Publisher"
|
|
4
|
+
},
|
|
5
|
+
"groups": [
|
|
6
|
+
{
|
|
7
|
+
"label": "Difference between 2026-10-19 and 2026-10-20",
|
|
8
|
+
"columns": [
|
|
9
|
+
{
|
|
10
|
+
"key": "revenue",
|
|
11
|
+
"label": "Revenue",
|
|
12
|
+
"format": "currency",
|
|
13
|
+
"style": "breakeven",
|
|
14
|
+
"formula": "{d2.total.revenue} - {d1.total.revenue}"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"key": "inbound",
|
|
18
|
+
"label": "Inbound Actions",
|
|
19
|
+
"format": "number",
|
|
20
|
+
"style": "breakeven",
|
|
21
|
+
"formula": "{d2.i.unique} - {d1.i.unique}"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"key": "leads",
|
|
25
|
+
"label": "Leads",
|
|
26
|
+
"format": "number",
|
|
27
|
+
"style": "breakeven",
|
|
28
|
+
"formula": "{d2.lead.total} - {d1.lead.total}"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"key": "acquisitions",
|
|
32
|
+
"label": "Acquisitions",
|
|
33
|
+
"format": "number",
|
|
34
|
+
"style": "breakeven",
|
|
35
|
+
"formula": "{d2.acquisition.total} - {d1.acquisition.total}"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"key": "ca",
|
|
39
|
+
"label": "Click / Acquisition",
|
|
40
|
+
"format": "percent",
|
|
41
|
+
"decimals": 2,
|
|
42
|
+
"style": "breakeven",
|
|
43
|
+
"formula": "({d2.acquisition.total} / {d2.i.unique}) - ({d1.acquisition.total} / {d1.i.unique})"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"key": "spend",
|
|
47
|
+
"label": "Spend Difference",
|
|
48
|
+
"format": "currency",
|
|
49
|
+
"style": "breakeven",
|
|
50
|
+
"formula": "{d2.total.commission} - {d1.total.commission}"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"label": "2026-10-19",
|
|
56
|
+
"columns": [
|
|
57
|
+
{
|
|
58
|
+
"key": "d1Inbound",
|
|
59
|
+
"label": "Inbound Actions",
|
|
60
|
+
"format": "number",
|
|
61
|
+
"value": "d1.i.unique"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"key": "d1Leads",
|
|
65
|
+
"label": "Leads",
|
|
66
|
+
"format": "number",
|
|
67
|
+
"value": "d1.lead.total"
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"label": "2026-10-20",
|
|
73
|
+
"columns": [
|
|
74
|
+
{
|
|
75
|
+
"key": "d2Inbound",
|
|
76
|
+
"label": "Inbound Actions",
|
|
77
|
+
"format": "number",
|
|
78
|
+
"value": "d2.i.unique"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"key": "d2Leads",
|
|
82
|
+
"label": "Leads",
|
|
83
|
+
"format": "number",
|
|
84
|
+
"value": "d2.lead.total"
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"rows": [
|
|
90
|
+
{
|
|
91
|
+
"id": "AFF-1",
|
|
92
|
+
"label": "NovaBeyond - Push/Display - Jake",
|
|
93
|
+
"uri": "#publisher-1",
|
|
94
|
+
"values": {
|
|
95
|
+
"d1": {
|
|
96
|
+
"total": {
|
|
97
|
+
"revenue": 2097.41,
|
|
98
|
+
"commission": 1650.2
|
|
99
|
+
},
|
|
100
|
+
"i": {
|
|
101
|
+
"unique": 1298
|
|
102
|
+
},
|
|
103
|
+
"lead": {
|
|
104
|
+
"total": 592
|
|
105
|
+
},
|
|
106
|
+
"acquisition": {
|
|
107
|
+
"total": 29
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"d2": {
|
|
111
|
+
"total": {
|
|
112
|
+
"revenue": 700.68,
|
|
113
|
+
"commission": 1004.34
|
|
114
|
+
},
|
|
115
|
+
"i": {
|
|
116
|
+
"unique": 9200
|
|
117
|
+
},
|
|
118
|
+
"lead": {
|
|
119
|
+
"total": 1252
|
|
120
|
+
},
|
|
121
|
+
"acquisition": {
|
|
122
|
+
"total": 31
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"id": "AFF-2",
|
|
129
|
+
"label": "AdLion - Bigo/DSP - Priya",
|
|
130
|
+
"uri": "#publisher-2",
|
|
131
|
+
"values": {
|
|
132
|
+
"d1": {
|
|
133
|
+
"total": {
|
|
134
|
+
"revenue": 14820.66,
|
|
135
|
+
"commission": 12410.18
|
|
136
|
+
},
|
|
137
|
+
"i": {
|
|
138
|
+
"unique": 48211
|
|
139
|
+
},
|
|
140
|
+
"lead": {
|
|
141
|
+
"total": 15302
|
|
142
|
+
},
|
|
143
|
+
"acquisition": {
|
|
144
|
+
"total": 402
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"d2": {
|
|
148
|
+
"total": {
|
|
149
|
+
"revenue": 7825.52,
|
|
150
|
+
"commission": 4624.87
|
|
151
|
+
},
|
|
152
|
+
"i": {
|
|
153
|
+
"unique": 16083
|
|
154
|
+
},
|
|
155
|
+
"lead": {
|
|
156
|
+
"total": 5776
|
|
157
|
+
},
|
|
158
|
+
"acquisition": {
|
|
159
|
+
"total": 334
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"id": "AFF-3",
|
|
166
|
+
"label": "UPBeat - Monthly - Dev",
|
|
167
|
+
"uri": "#publisher-3",
|
|
168
|
+
"values": {
|
|
169
|
+
"d1": {
|
|
170
|
+
"total": {
|
|
171
|
+
"revenue": 8211.09,
|
|
172
|
+
"commission": 6120.55
|
|
173
|
+
},
|
|
174
|
+
"i": {
|
|
175
|
+
"unique": 20114
|
|
176
|
+
},
|
|
177
|
+
"lead": {
|
|
178
|
+
"total": 4980
|
|
179
|
+
},
|
|
180
|
+
"acquisition": {
|
|
181
|
+
"total": 171
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"d2": {
|
|
185
|
+
"total": {
|
|
186
|
+
"revenue": 11211.48,
|
|
187
|
+
"commission": 7671.39
|
|
188
|
+
},
|
|
189
|
+
"i": {
|
|
190
|
+
"unique": 13031
|
|
191
|
+
},
|
|
192
|
+
"lead": {
|
|
193
|
+
"total": 3568
|
|
194
|
+
},
|
|
195
|
+
"acquisition": {
|
|
196
|
+
"total": 197
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"id": "AFF-4",
|
|
203
|
+
"label": "MobPlus - Native - Billy",
|
|
204
|
+
"uri": "#publisher-4",
|
|
205
|
+
"values": {
|
|
206
|
+
"d1": {
|
|
207
|
+
"total": {
|
|
208
|
+
"revenue": 22904.18,
|
|
209
|
+
"commission": 19877.42
|
|
210
|
+
},
|
|
211
|
+
"i": {
|
|
212
|
+
"unique": 15871
|
|
213
|
+
},
|
|
214
|
+
"lead": {
|
|
215
|
+
"total": 6215
|
|
216
|
+
},
|
|
217
|
+
"acquisition": {
|
|
218
|
+
"total": 388
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"d2": {
|
|
222
|
+
"total": {
|
|
223
|
+
"revenue": 42857.51,
|
|
224
|
+
"commission": 41658.05
|
|
225
|
+
},
|
|
226
|
+
"i": {
|
|
227
|
+
"unique": 26666
|
|
228
|
+
},
|
|
229
|
+
"lead": {
|
|
230
|
+
"total": 13255
|
|
231
|
+
},
|
|
232
|
+
"acquisition": {
|
|
233
|
+
"total": 706
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"id": "AFF-5",
|
|
240
|
+
"label": "ClickHarbor - Search - Tom",
|
|
241
|
+
"uri": "#publisher-5",
|
|
242
|
+
"values": {
|
|
243
|
+
"d1": {
|
|
244
|
+
"total": {
|
|
245
|
+
"revenue": 4120.77,
|
|
246
|
+
"commission": 3399.01
|
|
247
|
+
},
|
|
248
|
+
"i": {
|
|
249
|
+
"unique": 6122
|
|
250
|
+
},
|
|
251
|
+
"lead": {
|
|
252
|
+
"total": 2080
|
|
253
|
+
},
|
|
254
|
+
"acquisition": {
|
|
255
|
+
"total": 98
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"d2": {
|
|
259
|
+
"total": {
|
|
260
|
+
"revenue": 5153.2,
|
|
261
|
+
"commission": 4949.98
|
|
262
|
+
},
|
|
263
|
+
"i": {
|
|
264
|
+
"unique": 8169
|
|
265
|
+
},
|
|
266
|
+
"lead": {
|
|
267
|
+
"total": 2779
|
|
268
|
+
},
|
|
269
|
+
"acquisition": {
|
|
270
|
+
"total": 109
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"id": "AFF-6",
|
|
277
|
+
"label": "Brightwave - Social - Maya",
|
|
278
|
+
"uri": "#publisher-6",
|
|
279
|
+
"values": {
|
|
280
|
+
"d1": {
|
|
281
|
+
"total": {
|
|
282
|
+
"revenue": 61402.35,
|
|
283
|
+
"commission": 55290.64
|
|
284
|
+
},
|
|
285
|
+
"i": {
|
|
286
|
+
"unique": 26131
|
|
287
|
+
},
|
|
288
|
+
"lead": {
|
|
289
|
+
"total": 11208
|
|
290
|
+
},
|
|
291
|
+
"acquisition": {
|
|
292
|
+
"total": 905
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
"d2": {
|
|
296
|
+
"total": {
|
|
297
|
+
"revenue": 20071.26,
|
|
298
|
+
"commission": 16785.52
|
|
299
|
+
},
|
|
300
|
+
"i": {
|
|
301
|
+
"unique": 11673
|
|
302
|
+
},
|
|
303
|
+
"lead": {
|
|
304
|
+
"total": 4661
|
|
305
|
+
},
|
|
306
|
+
"acquisition": {
|
|
307
|
+
"total": 485
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
],
|
|
313
|
+
"currency": "USD"
|
|
314
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
meta:
|
|
3
|
+
title: Avatar Group
|
|
4
|
+
description: Overlapping avatars that show each person's name on hover, collapsing any past a limit into a "+N" count.
|
|
5
|
+
layout: component
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
```html:preview
|
|
9
|
+
<zn-avatar-group>
|
|
10
|
+
<zn-icon src="Ben Brooks" library="avatar" size="md" color="success"></zn-icon>
|
|
11
|
+
<zn-icon src="Jade Ellis" library="avatar" size="md" color="warning"></zn-icon>
|
|
12
|
+
<zn-icon src="Kai Walsh" library="avatar" size="md" color="error"></zn-icon>
|
|
13
|
+
</zn-avatar-group>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Examples
|
|
17
|
+
|
|
18
|
+
### Tooltips
|
|
19
|
+
|
|
20
|
+
Hovering or focusing an avatar shows its name in a tooltip: the avatar's `alt`, or its `src` when it has none. Each
|
|
21
|
+
avatar is lifted over its neighbours while hovered so it shows in full.
|
|
22
|
+
|
|
23
|
+
```html:preview
|
|
24
|
+
<zn-avatar-group>
|
|
25
|
+
<zn-icon src="BB" alt="Ben Brooks (Support)" library="avatar" size="lg" color="success"></zn-icon>
|
|
26
|
+
<zn-icon src="JE" alt="Jade Ellis (Sales)" library="avatar" size="lg" color="warning"></zn-icon>
|
|
27
|
+
<zn-icon src="KW" alt="Kai Walsh (Billing)" library="avatar" size="lg" color="error"></zn-icon>
|
|
28
|
+
</zn-avatar-group>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Maximum
|
|
32
|
+
|
|
33
|
+
Set `max` to show at most that many avatars. The rest are counted in a "+N" avatar whose tooltip lists their names.
|
|
34
|
+
|
|
35
|
+
```html:preview
|
|
36
|
+
<zn-avatar-group max="3">
|
|
37
|
+
<zn-icon src="Ben Brooks" library="avatar" size="md" color="success"></zn-icon>
|
|
38
|
+
<zn-icon src="Jade Ellis" library="avatar" size="md" color="warning"></zn-icon>
|
|
39
|
+
<zn-icon src="Kai Walsh" library="avatar" size="md" color="error"></zn-icon>
|
|
40
|
+
<zn-icon src="Ann Isaacs" library="avatar" size="md" color="violet"></zn-icon>
|
|
41
|
+
<zn-icon src="Fiona Hart" library="avatar" size="md"></zn-icon>
|
|
42
|
+
<zn-icon src="Harry Hill" library="avatar" size="md"></zn-icon>
|
|
43
|
+
<zn-icon src="Mark Nolan" library="avatar" size="md"></zn-icon>
|
|
44
|
+
</zn-avatar-group>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Presence
|
|
48
|
+
|
|
49
|
+
Avatars keep their presence dot inside a group.
|
|
50
|
+
|
|
51
|
+
```html:preview
|
|
52
|
+
<zn-avatar-group>
|
|
53
|
+
<zn-icon src="Ben Brooks" library="avatar" size="md" color="success" presence="online"></zn-icon>
|
|
54
|
+
<zn-icon src="Jade Ellis" library="avatar" size="md" color="warning" presence="away"></zn-icon>
|
|
55
|
+
<zn-icon src="Kai Walsh" library="avatar" size="md" color="error" presence="busy"></zn-icon>
|
|
56
|
+
</zn-avatar-group>
|
|
57
|
+
```
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
meta:
|
|
3
|
+
title: Badge
|
|
4
|
+
description: Badges label the status or category of a record, such as "Active" or "Past due".
|
|
5
|
+
layout: component
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
```html:preview
|
|
9
|
+
<zn-badge>Neutral</zn-badge>
|
|
10
|
+
<zn-badge type="success">Active</zn-badge>
|
|
11
|
+
<zn-badge type="warning">Past due</zn-badge>
|
|
12
|
+
<zn-badge type="danger">Cancelled</zn-badge>
|
|
13
|
+
<zn-badge type="info">Trial</zn-badge>
|
|
14
|
+
<zn-badge type="ai">AI suggested</zn-badge>
|
|
15
|
+
<zn-badge type="success" dot>Completed</zn-badge>
|
|
16
|
+
<zn-badge type="danger" dot>Failed</zn-badge>
|
|
17
|
+
<zn-badge type="info" solid>VIP</zn-badge>
|
|
18
|
+
<zn-badge type="danger" solid>Urgent</zn-badge>
|
|
19
|
+
<zn-badge type="success" size="large" dot>Large</zn-badge>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Examples
|
|
23
|
+
|
|
24
|
+
### Types
|
|
25
|
+
|
|
26
|
+
Use the `type` attribute to set the badge's colour: `neutral` (default), `success`, `warning`, `danger`, `info` or `ai`. Reserve `ai` for AI-generated content — it is the only type that carries an icon.
|
|
27
|
+
|
|
28
|
+
```html:preview
|
|
29
|
+
<zn-badge>Neutral</zn-badge>
|
|
30
|
+
<zn-badge type="success">Active</zn-badge>
|
|
31
|
+
<zn-badge type="warning">Past due</zn-badge>
|
|
32
|
+
<zn-badge type="danger">Cancelled</zn-badge>
|
|
33
|
+
<zn-badge type="info">Trial</zn-badge>
|
|
34
|
+
<zn-badge type="ai">AI suggested</zn-badge>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Status Dot
|
|
38
|
+
|
|
39
|
+
Use `dot` to lead the label with a status indicator in the type colour.
|
|
40
|
+
|
|
41
|
+
```html:preview
|
|
42
|
+
<zn-badge type="success" dot>Completed</zn-badge>
|
|
43
|
+
<zn-badge type="warning" dot>Pending</zn-badge>
|
|
44
|
+
<zn-badge type="danger" dot>Failed</zn-badge>
|
|
45
|
+
<zn-badge dot>Draft</zn-badge>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Solid
|
|
49
|
+
|
|
50
|
+
Use `solid` to fill the badge with its type colour for labels that need to stand out, such as VIP or urgent.
|
|
51
|
+
|
|
52
|
+
```html:preview
|
|
53
|
+
<zn-badge type="info" solid>VIP</zn-badge>
|
|
54
|
+
<zn-badge type="danger" solid>Urgent</zn-badge>
|
|
55
|
+
<zn-badge type="success" solid>Paid</zn-badge>
|
|
56
|
+
<zn-badge type="warning" solid>Overdue</zn-badge>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Large
|
|
60
|
+
|
|
61
|
+
Use `size="large"` for a larger badge.
|
|
62
|
+
|
|
63
|
+
```html:preview
|
|
64
|
+
<zn-badge type="success" size="large" dot>Large</zn-badge>
|
|
65
|
+
<zn-badge type="ai" size="large">AI suggested</zn-badge>
|
|
66
|
+
<zn-badge type="danger" size="large" solid>Urgent</zn-badge>
|
|
67
|
+
```
|
|
@@ -61,9 +61,22 @@ Use the `color` attribute to set the button's color.
|
|
|
61
61
|
<zn-button color="info">Info</zn-button>
|
|
62
62
|
<zn-button color="warning">Warning</zn-button>
|
|
63
63
|
<zn-button color="error">Error</zn-button>
|
|
64
|
+
<zn-button color="ai" icon="auto_awesome">AI</zn-button>
|
|
64
65
|
<zn-button color="transparent">Transparent</zn-button>
|
|
65
66
|
```
|
|
66
67
|
|
|
68
|
+
Reserve `color="ai"` for actions that invoke AI or act on AI-generated content.
|
|
69
|
+
|
|
70
|
+
### Sizes
|
|
71
|
+
|
|
72
|
+
Use the `size` attribute to pick a smaller or larger button. Heights follow the theme's density.
|
|
73
|
+
|
|
74
|
+
```html:preview
|
|
75
|
+
<zn-button size="small">Small</zn-button>
|
|
76
|
+
<zn-button>Medium</zn-button>
|
|
77
|
+
<zn-button size="large">Large</zn-button>
|
|
78
|
+
```
|
|
79
|
+
|
|
67
80
|
### Outline
|
|
68
81
|
|
|
69
82
|
Use the `outline` attribute to set the button's outline.
|
|
@@ -189,7 +202,7 @@ Use the `square` attribute to create square-shaped buttons, useful for icon-only
|
|
|
189
202
|
|
|
190
203
|
### Pill Buttons
|
|
191
204
|
|
|
192
|
-
Use the `pill` attribute for a label-like trigger rather than an action: fully rounded, sentence case and regular weight, so it reads as a value you can change rather than a command.
|
|
205
|
+
Use the `pill` attribute for a label-like trigger rather than an action: fully rounded, sentence case and regular weight, so it reads as a value you can change rather than a command.
|
|
193
206
|
|
|
194
207
|
```html:preview
|
|
195
208
|
<zn-button pill panel-bg icon="chevron-down@lu" icon-position="right">Role</zn-button>
|
|
@@ -276,6 +289,33 @@ You can also override form attributes using `formaction`, `formmethod`, `formenc
|
|
|
276
289
|
</form>
|
|
277
290
|
```
|
|
278
291
|
|
|
292
|
+
### Long Press Menu
|
|
293
|
+
|
|
294
|
+
Put a `<zn-menu>` in the `menu` slot to give a button advanced options, the way an app in the macOS Dock shows its menu when held. A click still runs the button's own action; holding it for `long-press-delay` milliseconds (500 by default) opens the menu instead. Keep holding and drag onto an item, then release, to choose it in one gesture.
|
|
295
|
+
|
|
296
|
+
Right click, <kbd>Arrow Down</kbd>, <kbd>Shift</kbd>+<kbd>F10</kbd> and the context menu key also open the menu. Use `menu-placement` to change where it opens.
|
|
297
|
+
|
|
298
|
+
Clicks on menu items bubble through the button, so a `click` listener on the button also hears them. Wire item actions through the menu's `zn-select` event, or check `event.target`.
|
|
299
|
+
|
|
300
|
+
```html:preview
|
|
301
|
+
<zn-button color="primary" class="long-press-example" long-press-delay="400">
|
|
302
|
+
Send
|
|
303
|
+
<zn-menu slot="menu">
|
|
304
|
+
<zn-menu-item value="schedule">Schedule send</zn-menu-item>
|
|
305
|
+
<zn-menu-item value="draft">Save as draft</zn-menu-item>
|
|
306
|
+
<zn-menu-item value="test">Send a test to myself</zn-menu-item>
|
|
307
|
+
</zn-menu>
|
|
308
|
+
</zn-button>
|
|
309
|
+
|
|
310
|
+
<script type="module">
|
|
311
|
+
const button = document.querySelector('.long-press-example');
|
|
312
|
+
button.addEventListener('click', e => {
|
|
313
|
+
if (e.target === button) alert('Send');
|
|
314
|
+
});
|
|
315
|
+
button.querySelector('zn-menu').addEventListener('zn-select', e => alert(e.detail.item.value));
|
|
316
|
+
</script>
|
|
317
|
+
```
|
|
318
|
+
|
|
279
319
|
### Dropdown Closer
|
|
280
320
|
|
|
281
321
|
Use the `dropdown-closer` attribute to automatically close parent dropdowns when the button is clicked.
|
|
@@ -67,6 +67,22 @@ multiple lines when they overflow.
|
|
|
67
67
|
</zn-chat-message>
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
+
### Footer
|
|
71
|
+
|
|
72
|
+
Use the `footer` slot for content beneath the bubble, such as reactions or a thread summary. The row
|
|
73
|
+
only takes up space when something is slotted into it.
|
|
74
|
+
|
|
75
|
+
```html:preview
|
|
76
|
+
<zn-chat-message sender="Agent Name" time="1718193420">
|
|
77
|
+
Deploy is out — let me know if anything looks off.
|
|
78
|
+
<div slot="footer">
|
|
79
|
+
<zn-chip>👍 3</zn-chip>
|
|
80
|
+
<zn-chip>🎉 1</zn-chip>
|
|
81
|
+
<zn-button size="small" color="transparent">2 replies</zn-button>
|
|
82
|
+
</div>
|
|
83
|
+
</zn-chat-message>
|
|
84
|
+
```
|
|
85
|
+
|
|
70
86
|
### Custom Bubble Color
|
|
71
87
|
|
|
72
88
|
The bubble background can be themed with the `--message-background` custom property.
|
|
@@ -172,7 +172,7 @@ Use the `checked-icon` and `unchecked-icon` attributes to display custom icons f
|
|
|
172
172
|
|
|
173
173
|
### Contained Style
|
|
174
174
|
|
|
175
|
-
Add the `contained` attribute to draw a card-like container around a checkbox. This style is useful for giving more emphasis to a checkbox or list of checkboxes.
|
|
175
|
+
Add the `contained` attribute to draw a card-like container around a checkbox. This style is useful for giving more emphasis to a checkbox or list of checkboxes. The container shows the checked state, so the checkbox indicator is hidden; set `control-position` to place one in the card.
|
|
176
176
|
|
|
177
177
|
```html:preview
|
|
178
178
|
<zn-checkbox description="Grants access to cash account and charge card features" contained>Financial products access</zn-checkbox>
|
|
@@ -29,7 +29,7 @@ A basic chip displays text content with default neutral styling.
|
|
|
29
29
|
|
|
30
30
|
### Types
|
|
31
31
|
|
|
32
|
-
Use the `type` attribute to change the semantic color and styling of the chip. Available types are: `neutral` (default), `primary`, `info`, `success`, `warning`, `error`, `transparent`, and `custom`.
|
|
32
|
+
Use the `type` attribute to change the semantic color and styling of the chip. Available types are: `neutral` (default), `primary`, `info`, `success`, `warning`, `error`, `ai`, `transparent`, and `custom`. Reserve `ai` for AI-generated content.
|
|
33
33
|
|
|
34
34
|
```html:preview
|
|
35
35
|
<zn-chip type="neutral">Neutral</zn-chip>
|
|
@@ -38,9 +38,21 @@ Use the `type` attribute to change the semantic color and styling of the chip. A
|
|
|
38
38
|
<zn-chip type="success">Success</zn-chip>
|
|
39
39
|
<zn-chip type="warning">Warning</zn-chip>
|
|
40
40
|
<zn-chip type="error">Error</zn-chip>
|
|
41
|
+
<zn-chip type="ai">AI</zn-chip>
|
|
41
42
|
<zn-chip type="transparent">Transparent</zn-chip>
|
|
42
43
|
```
|
|
43
44
|
|
|
45
|
+
### Dot and Solid
|
|
46
|
+
|
|
47
|
+
Use `dot` to lead the label with a dot in the type colour, and `solid` to fill the chip with it.
|
|
48
|
+
|
|
49
|
+
```html:preview
|
|
50
|
+
<zn-chip type="success" dot>Paid</zn-chip>
|
|
51
|
+
<zn-chip type="warning" dot>Pending</zn-chip>
|
|
52
|
+
<zn-chip type="warning" solid>Overdue</zn-chip>
|
|
53
|
+
<zn-chip type="error" solid>Failed</zn-chip>
|
|
54
|
+
```
|
|
55
|
+
|
|
44
56
|
### With Icons
|
|
45
57
|
|
|
46
58
|
Use the `icon` attribute to add an icon to the chip. Icons appear on the left side of the chip content.
|
|
@@ -111,15 +123,15 @@ Chips can include an action button, typically used for removing or closing the c
|
|
|
111
123
|
```html:preview
|
|
112
124
|
<zn-chip icon="tag" type="info">
|
|
113
125
|
Removable Tag
|
|
114
|
-
<zn-button icon="close" slot="action" icon-size="
|
|
126
|
+
<zn-button icon="close" slot="action" icon-size="14" color="transparent"></zn-button>
|
|
115
127
|
</zn-chip>
|
|
116
128
|
<zn-chip icon="label" type="success">
|
|
117
129
|
Another Tag
|
|
118
|
-
<zn-button icon="close" slot="action" icon-size="
|
|
130
|
+
<zn-button icon="close" slot="action" icon-size="14" color="transparent"></zn-button>
|
|
119
131
|
</zn-chip>
|
|
120
132
|
<zn-chip icon="bookmark" type="warning">
|
|
121
133
|
Bookmark
|
|
122
|
-
<zn-button icon="close" slot="action" icon-size="
|
|
134
|
+
<zn-button icon="close" slot="action" icon-size="14" color="transparent"></zn-button>
|
|
123
135
|
</zn-chip>
|
|
124
136
|
```
|
|
125
137
|
|
|
@@ -189,19 +201,19 @@ Chips work well when grouped together to represent multiple tags or categories.
|
|
|
189
201
|
<div style="display: flex; gap: 8px; flex-wrap: wrap;">
|
|
190
202
|
<zn-chip icon="tag" type="info">
|
|
191
203
|
Frontend
|
|
192
|
-
<zn-button icon="close" slot="action" icon-size="
|
|
204
|
+
<zn-button icon="close" slot="action" icon-size="14" color="transparent"></zn-button>
|
|
193
205
|
</zn-chip>
|
|
194
206
|
<zn-chip icon="tag" type="info">
|
|
195
207
|
Backend
|
|
196
|
-
<zn-button icon="close" slot="action" icon-size="
|
|
208
|
+
<zn-button icon="close" slot="action" icon-size="14" color="transparent"></zn-button>
|
|
197
209
|
</zn-chip>
|
|
198
210
|
<zn-chip icon="tag" type="info">
|
|
199
211
|
Database
|
|
200
|
-
<zn-button icon="close" slot="action" icon-size="
|
|
212
|
+
<zn-button icon="close" slot="action" icon-size="14" color="transparent"></zn-button>
|
|
201
213
|
</zn-chip>
|
|
202
214
|
<zn-chip icon="tag" type="info">
|
|
203
215
|
DevOps
|
|
204
|
-
<zn-button icon="close" slot="action" icon-size="
|
|
216
|
+
<zn-button icon="close" slot="action" icon-size="14" color="transparent"></zn-button>
|
|
205
217
|
</zn-chip>
|
|
206
218
|
</div>
|
|
207
219
|
```
|
|
@@ -231,7 +243,7 @@ Chips can be used to display user information or assignments.
|
|
|
231
243
|
<zn-chip icon="person" type="primary">Bob Johnson</zn-chip>
|
|
232
244
|
<zn-chip icon="person" type="primary">
|
|
233
245
|
Alice Williams
|
|
234
|
-
<zn-button icon="close" slot="action" icon-size="
|
|
246
|
+
<zn-button icon="close" slot="action" icon-size="14" color="transparent"></zn-button>
|
|
235
247
|
</zn-chip>
|
|
236
248
|
</div>
|
|
237
249
|
```
|
|
@@ -244,19 +256,19 @@ Here's a complete example demonstrating removable chips with JavaScript interact
|
|
|
244
256
|
<div id="chip-container" style="display: flex; gap: 8px; flex-wrap: wrap;">
|
|
245
257
|
<zn-chip icon="tag" type="info">
|
|
246
258
|
Design
|
|
247
|
-
<zn-button icon="close" slot="action" icon-size="
|
|
259
|
+
<zn-button icon="close" slot="action" icon-size="14" color="transparent"></zn-button>
|
|
248
260
|
</zn-chip>
|
|
249
261
|
<zn-chip icon="tag" type="info">
|
|
250
262
|
Development
|
|
251
|
-
<zn-button icon="close" slot="action" icon-size="
|
|
263
|
+
<zn-button icon="close" slot="action" icon-size="14" color="transparent"></zn-button>
|
|
252
264
|
</zn-chip>
|
|
253
265
|
<zn-chip icon="tag" type="info">
|
|
254
266
|
Testing
|
|
255
|
-
<zn-button icon="close" slot="action" icon-size="
|
|
267
|
+
<zn-button icon="close" slot="action" icon-size="14" color="transparent"></zn-button>
|
|
256
268
|
</zn-chip>
|
|
257
269
|
<zn-chip icon="tag" type="info">
|
|
258
270
|
Documentation
|
|
259
|
-
<zn-button icon="close" slot="action" icon-size="
|
|
271
|
+
<zn-button icon="close" slot="action" icon-size="14" color="transparent"></zn-button>
|
|
260
272
|
</zn-chip>
|
|
261
273
|
</div>
|
|
262
274
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
meta:
|
|
3
|
+
title: Color Picker
|
|
4
|
+
description: A colour panel with a saturation and brightness area, a hue slider and the colour's HEX, RGB, HSL and OKLCH values.
|
|
5
|
+
layout: component
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
```html:preview
|
|
9
|
+
<zn-color-picker value="#085EFD"></zn-color-picker>
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
The panel that a [colour input](/components/input#color-input) opens from its swatch. In a form, use
|
|
13
|
+
`<zn-input type="color">` rather than the panel on its own.
|
|
14
|
+
|
|
15
|
+
## Examples
|
|
16
|
+
|
|
17
|
+
### Using the Panel
|
|
18
|
+
|
|
19
|
+
The colour area sets saturation (left to right) and brightness (bottom to top); click or drag, or use the arrow keys
|
|
20
|
+
(Shift for bigger steps). The hue slider sits under it. HEX, RGB, HSL and OKLCH are always shown together: edit any one
|
|
21
|
+
and the others follow, and an out-of-range number is marked red.
|
|
22
|
+
|
|
23
|
+
`value` accepts any CSS colour and reads back as `#RRGGBB`. `format` is the row last worked in, which a colour input
|
|
24
|
+
uses as the format to write its value in. Listen for `zn-input` to follow changes.
|
|
25
|
+
|
|
26
|
+
```html:preview
|
|
27
|
+
<zn-color-picker class="color-picker-demo" value="rgb(117, 87, 245)"></zn-color-picker>
|
|
28
|
+
<p>Value: <code class="color-picker-demo-value">#7557F5</code> · format: <code class="color-picker-demo-format">hex</code></p>
|
|
29
|
+
|
|
30
|
+
<script type="module">
|
|
31
|
+
const picker = document.querySelector('.color-picker-demo');
|
|
32
|
+
picker.addEventListener('zn-input', () => {
|
|
33
|
+
document.querySelector('.color-picker-demo-value').textContent = picker.value;
|
|
34
|
+
document.querySelector('.color-picker-demo-format').textContent = picker.format;
|
|
35
|
+
});
|
|
36
|
+
</script>
|
|
37
|
+
```
|