@watermarkinsights/ripple 0.0.1 → 0.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/app-globals-3db2fdd3.js +103 -0
- package/dist/cjs/chartFunctions-0d47b1f4.js +906 -0
- package/dist/cjs/functions-761cb9f2.js +10694 -0
- package/dist/cjs/index-bb947bd5.js +1843 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/interfaces-33cd6161.js +82 -0
- package/dist/cjs/intl-9e9388a7.js +291 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/priv-calendar.cjs.entry.js +580 -0
- package/dist/cjs/priv-chart-popover-old.cjs.entry.js +146 -0
- package/dist/cjs/priv-chart-popover_2.cjs.entry.js +204 -0
- package/dist/cjs/priv-navigator-button.cjs.entry.js +29 -0
- package/dist/cjs/priv-navigator-item.cjs.entry.js +35 -0
- package/dist/cjs/priv-option-list.cjs.entry.js +391 -0
- package/dist/cjs/ripple.cjs.js +25 -0
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +525 -0
- package/dist/cjs/wm-button.cjs.entry.js +280 -0
- package/dist/cjs/wm-chart-bar.cjs.entry.js +444 -0
- package/dist/cjs/wm-chart-column.cjs.entry.js +629 -0
- package/dist/cjs/wm-chart-slice.cjs.entry.js +27 -0
- package/dist/cjs/wm-chart-stack.cjs.entry.js +447 -0
- package/dist/cjs/wm-chart.cjs.entry.js +163 -0
- package/dist/cjs/wm-date-range.cjs.entry.js +591 -0
- package/dist/cjs/wm-datepicker.cjs.entry.js +399 -0
- package/dist/{ripple/wm-tab-panel.entry.js → cjs/wm-file-list.cjs.entry.js} +15 -24
- package/dist/cjs/wm-file.cjs.entry.js +210 -0
- package/dist/cjs/wm-flyout.cjs.entry.js +178 -0
- package/dist/{ripple/wm-modal.entry.js → cjs/wm-input.cjs.entry.js} +108 -110
- package/dist/cjs/wm-line-chart.cjs.entry.js +541 -0
- package/dist/cjs/wm-modal-pss_3.cjs.entry.js +220 -0
- package/dist/cjs/wm-modal_3.cjs.entry.js +238 -0
- package/dist/cjs/wm-navigation_3.cjs.entry.js +188 -0
- package/dist/cjs/wm-navigator.cjs.entry.js +334 -0
- package/dist/cjs/wm-nested-select.cjs.entry.js +322 -0
- package/dist/{ripple/wm-textarea.entry.js → cjs/wm-optgroup.cjs.entry.js} +62 -57
- package/dist/cjs/wm-option_2.cjs.entry.js +536 -0
- package/dist/{ripple/wm-navigation.entry.js → cjs/wm-pagination.cjs.entry.js} +204 -91
- package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +204 -0
- package/dist/{ripple/wm-flyout.entry.js → cjs/wm-search.cjs.entry.js} +168 -139
- package/dist/{ripple/wm-datepicker.entry.js → cjs/wm-snackbar.cjs.entry.js} +152 -223
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +357 -0
- package/dist/cjs/wm-tag-input.cjs.entry.js +985 -0
- package/dist/cjs/wm-tag-option.cjs.entry.js +51 -0
- package/dist/{ripple/wm-modal-pss.entry.js → cjs/wm-textarea.cjs.entry.js} +70 -111
- package/dist/{ripple/wm-progress-indicator.entry.js → cjs/wm-timepicker.cjs.entry.js} +296 -78
- package/dist/cjs/wm-toggletip.cjs.entry.js +252 -0
- package/dist/cjs/wm-uploader.cjs.entry.js +341 -0
- package/dist/cjs/wm-wrapper.cjs.entry.js +21 -0
- package/dist/collection/collection-manifest.json +207 -0
- package/dist/collection/components/charts/chartFunctions.js +831 -0
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.css +995 -0
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +345 -0
- package/dist/collection/components/charts/priv-chart-popover-old/priv-chart-popover-old.css +990 -0
- package/dist/collection/components/charts/priv-chart-popover-old/priv-chart-popover-old.js +268 -0
- package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +177 -0
- package/dist/collection/components/charts/wm-chart/wm-chart.css +1326 -0
- package/dist/collection/components/charts/wm-chart/wm-chart.js +549 -0
- package/dist/collection/components/charts/wm-chart-bar/wm-chart-bar.css +1236 -0
- package/dist/collection/components/charts/wm-chart-bar/wm-chart-bar.js +725 -0
- package/dist/collection/components/charts/wm-chart-column/wm-chart-column.css +1335 -0
- package/dist/collection/components/charts/wm-chart-column/wm-chart-column.js +914 -0
- package/dist/collection/components/charts/wm-chart-legend/wm-chart-legend.css +1006 -0
- package/dist/collection/components/charts/wm-chart-legend/wm-chart-legend.js +310 -0
- package/dist/collection/components/charts/wm-chart-stack/wm-chart-stack.css +1466 -0
- package/dist/collection/components/charts/wm-chart-stack/wm-chart-stack.js +709 -0
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.css +1208 -0
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +999 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.css +1326 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +320 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.css +967 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +232 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +167 -0
- package/dist/collection/components/datepickers/datepicker.css +1147 -0
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.css +1415 -0
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +857 -0
- package/dist/collection/components/datepickers/wm-date-range.js +1158 -0
- package/dist/collection/components/datepickers/wm-datepicker.js +875 -0
- package/dist/collection/components/selects/priv-option-list/priv-option-list.css +999 -0
- package/dist/collection/components/selects/priv-option-list/priv-option-list.js +784 -0
- package/dist/collection/components/selects/wm-nested-select/wm-nested-select.css +1259 -0
- package/dist/collection/components/selects/wm-nested-select/wm-nested-select.js +805 -0
- package/dist/collection/components/selects/wm-optgroup/wm-optgroup.css +909 -0
- package/dist/collection/components/selects/wm-optgroup/wm-optgroup.js +363 -0
- package/dist/collection/components/selects/wm-option/wm-option.css +1033 -0
- package/dist/collection/components/selects/wm-option/wm-option.js +665 -0
- package/dist/collection/components/selects/wm-select/wm-select.css +1174 -0
- package/dist/collection/components/selects/wm-select/wm-select.js +878 -0
- package/dist/collection/components/wm-action-menu/wm-action-menu.css +1690 -0
- package/dist/collection/components/wm-action-menu/wm-action-menu.js +932 -0
- package/dist/collection/components/wm-button/wm-button.css +1630 -0
- package/dist/collection/components/wm-button/wm-button.js +794 -0
- package/dist/collection/components/wm-file/wm-file.css +1086 -0
- package/dist/collection/components/wm-file/wm-file.js +536 -0
- package/dist/collection/components/wm-file-list/wm-file-list.css +899 -0
- package/dist/collection/components/wm-file-list/wm-file-list.js +118 -0
- package/dist/collection/components/wm-flyout/wm-flyout.css +1091 -0
- package/dist/collection/components/wm-flyout/wm-flyout.js +651 -0
- package/dist/collection/components/wm-input/wm-input.css +1095 -0
- package/dist/collection/components/wm-input/wm-input.js +653 -0
- package/dist/collection/components/wm-menuitem/wm-menuitem.css +982 -0
- package/dist/collection/components/wm-menuitem/wm-menuitem.js +515 -0
- package/dist/collection/components/wm-modal/wm-modal-footer.css +927 -0
- package/dist/collection/components/wm-modal/wm-modal-footer.js +199 -0
- package/dist/collection/components/wm-modal/wm-modal-header.css +926 -0
- package/dist/collection/components/wm-modal/wm-modal-header.js +110 -0
- package/dist/collection/components/wm-modal/wm-modal.css +983 -0
- package/dist/collection/components/wm-modal/wm-modal.js +534 -0
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.css +931 -0
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.js +142 -0
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.css +925 -0
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.js +86 -0
- package/dist/collection/components/wm-modal-pss/wm-modal-pss.css +1007 -0
- package/dist/collection/components/wm-modal-pss/wm-modal-pss.js +369 -0
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +926 -0
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +153 -0
- package/dist/collection/components/wm-navigation/wm-navigation-item.css +935 -0
- package/dist/collection/components/wm-navigation/wm-navigation-item.js +140 -0
- package/dist/collection/components/wm-navigation/wm-navigation.css +977 -0
- package/dist/collection/components/wm-navigation/wm-navigation.js +246 -0
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.css +929 -0
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +90 -0
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.css +918 -0
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +128 -0
- package/dist/collection/components/wm-navigator/wm-navigator.css +990 -0
- package/dist/collection/components/wm-navigator/wm-navigator.js +597 -0
- package/dist/collection/components/wm-pagination/wm-pagination.css +1044 -0
- package/dist/collection/components/wm-pagination/wm-pagination.js +487 -0
- package/dist/collection/components/wm-search/wm-search.css +983 -0
- package/dist/collection/components/wm-search/wm-search.js +604 -0
- package/dist/collection/components/wm-snackbar/wm-snackbar.css +1150 -0
- package/dist/collection/components/wm-snackbar/wm-snackbar.js +363 -0
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +958 -0
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +233 -0
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.css +966 -0
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +461 -0
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.css +906 -0
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +132 -0
- package/dist/collection/components/wm-tag-input/wm-tag-input.css +1423 -0
- package/dist/collection/components/wm-tag-input/wm-tag-input.js +1511 -0
- package/dist/collection/components/wm-tag-input/wm-tag-option/wm-tag-option.js +328 -0
- package/dist/collection/components/wm-textarea/wm-textarea.css +1065 -0
- package/dist/collection/components/wm-textarea/wm-textarea.js +423 -0
- package/dist/collection/components/wm-timepicker/wm-timepicker.css +1174 -0
- package/dist/collection/components/wm-timepicker/wm-timepicker.js +728 -0
- package/dist/collection/components/wm-toggletip/wm-toggletip.css +1296 -0
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +455 -0
- package/dist/collection/components/wm-uploader/wm-uploader.css +1987 -0
- package/dist/collection/components/wm-uploader/wm-uploader.js +760 -0
- package/dist/collection/components/wm-wrapper/wm-wrapper.js +31 -0
- package/dist/collection/dev/action-menu.js +18 -0
- package/dist/collection/dev/button.js +12 -0
- package/dist/collection/dev/chart-bar.js +430 -0
- package/dist/collection/dev/chart-column.js +459 -0
- package/dist/collection/dev/chart-small.js +56 -0
- package/dist/collection/dev/chart-stack.js +205 -0
- package/dist/collection/dev/chart.js +18 -0
- package/dist/collection/dev/date-range.js +14 -0
- package/dist/collection/dev/datepicker.js +46 -0
- package/dist/collection/dev/file-list.js +16 -0
- package/dist/collection/dev/file.js +0 -0
- package/dist/collection/dev/flyout.js +194 -0
- package/dist/collection/dev/input.js +6 -0
- package/dist/collection/dev/line-chart.js +45 -0
- package/dist/collection/dev/modal.js +48 -0
- package/dist/collection/dev/navigation.js +13 -0
- package/dist/collection/dev/navigator.js +34 -0
- package/dist/collection/dev/nested-select.js +36 -0
- package/dist/collection/dev/pagination.js +7 -0
- package/dist/collection/dev/progress-monitor.js +0 -0
- package/dist/collection/dev/pss-modal.js +8 -0
- package/dist/collection/dev/scripts.js +49 -0
- package/dist/collection/dev/search.js +72 -0
- package/dist/collection/dev/select.js +57 -0
- package/dist/collection/dev/snackbar.js +68 -0
- package/dist/collection/dev/tabs.js +44 -0
- package/dist/collection/dev/tag-input.js +32 -0
- package/dist/collection/dev/textarea.js +28 -0
- package/dist/collection/dev/timepicker.js +32 -0
- package/dist/collection/dev/toggletip.js +9 -0
- package/dist/collection/dev/uploader.js +139 -0
- package/dist/collection/global/__mocks__/functions.js +6 -0
- package/dist/collection/global/functions.js +907 -0
- package/dist/{ripple/app-globals-B7cOtGhY.js → collection/global/global.js} +16 -87
- package/dist/collection/global/interfaces.js +94 -0
- package/dist/collection/global/intl.js +281 -0
- package/dist/collection/global/services/__mocks__/http-service.js +130 -0
- package/dist/collection/global/services/http-service.js +50 -0
- package/dist/collection/lang/lang.js +5 -0
- package/dist/collection/lang/missing.js +43 -0
- package/dist/collection/lang/piglatin.js +101 -0
- package/dist/docs/docs.d.ts +435 -0
- package/dist/docs/docs.json +14178 -0
- package/dist/docs/props-reference.json +2079 -0
- package/dist/docs/skill/index.md +33 -0
- package/dist/docs/skill/wm-action-menu.md +116 -0
- package/dist/docs/skill/wm-button.md +121 -0
- package/dist/docs/skill/wm-chart-bar.md +156 -0
- package/dist/docs/skill/wm-chart-column.md +122 -0
- package/dist/docs/skill/wm-chart-legend.md +91 -0
- package/dist/docs/skill/wm-chart-slice.md +101 -0
- package/dist/docs/skill/wm-chart-stack.md +147 -0
- package/dist/docs/skill/wm-chart.md +139 -0
- package/dist/docs/skill/wm-date-range.md +176 -0
- package/dist/docs/skill/wm-datepicker.md +153 -0
- package/dist/docs/skill/wm-file-list.md +105 -0
- package/dist/docs/skill/wm-file.md +91 -0
- package/dist/docs/skill/wm-flyout.md +209 -0
- package/dist/docs/skill/wm-input.md +134 -0
- package/dist/docs/skill/wm-line-chart.md +135 -0
- package/dist/docs/skill/wm-menuitem.md +64 -0
- package/dist/docs/skill/wm-modal-footer.md +81 -0
- package/dist/docs/skill/wm-modal-header.md +71 -0
- package/dist/docs/skill/wm-modal.md +172 -0
- package/dist/docs/skill/wm-navigation-hamburger.md +61 -0
- package/dist/docs/skill/wm-navigation-item.md +78 -0
- package/dist/docs/skill/wm-navigation.md +82 -0
- package/dist/docs/skill/wm-navigator.md +106 -0
- package/dist/docs/skill/wm-nested-select.md +160 -0
- package/dist/docs/skill/wm-optgroup.md +72 -0
- package/dist/docs/skill/wm-option.md +67 -0
- package/dist/docs/skill/wm-pagination.md +114 -0
- package/dist/docs/skill/wm-progress-indicator.md +75 -0
- package/dist/docs/skill/wm-progress-monitor.md +120 -0
- package/dist/docs/skill/wm-progress-slice.md +67 -0
- package/dist/docs/skill/wm-search.md +180 -0
- package/dist/docs/skill/wm-select.md +169 -0
- package/dist/docs/skill/wm-snackbar.md +130 -0
- package/dist/docs/skill/wm-tab-item.md +45 -0
- package/dist/docs/skill/wm-tab-list.md +139 -0
- package/dist/docs/skill/wm-tab-panel.md +39 -0
- package/dist/docs/skill/wm-tag-input.md +187 -0
- package/dist/docs/skill/wm-tag-option.md +60 -0
- package/dist/docs/skill/wm-textarea.md +102 -0
- package/dist/docs/skill/wm-timepicker.md +156 -0
- package/dist/docs/skill/wm-toggletip.md +98 -0
- package/dist/docs/skill/wm-uploader.md +154 -0
- package/dist/docs/skill/wm-wrapper.md +5 -0
- package/dist/esm/app-globals-a1092590.js +101 -0
- package/dist/{ripple/chartFunctions-CmeM8Tyx.js → esm/chartFunctions-58637dc9.js} +159 -3
- package/dist/{ripple/functions-DVLl0rH_.js → esm/functions-65f1594c.js} +374 -7830
- package/dist/esm/index-3425d80d.js +1813 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/interfaces-8778346d.js +77 -0
- package/dist/{ripple/intl-7p27BJSM.js → esm/intl-d518f362.js} +11 -4
- package/dist/esm/loader.js +11 -0
- package/dist/{ripple → esm}/priv-calendar.entry.js +143 -133
- package/dist/esm/priv-chart-popover-old.entry.js +142 -0
- package/dist/esm/priv-chart-popover_2.entry.js +199 -0
- package/dist/{ripple → esm}/priv-navigator-button.entry.js +5 -4
- package/dist/{ripple → esm}/priv-navigator-item.entry.js +5 -4
- package/dist/{ripple → esm}/priv-option-list.entry.js +18 -16
- package/dist/esm/ripple.js +20 -0
- package/dist/esm/wm-action-menu_2.entry.js +520 -0
- package/dist/{ripple/wm-modal-header.entry.js → esm/wm-button.entry.js} +264 -24
- package/dist/esm/wm-chart-bar.entry.js +440 -0
- package/dist/esm/wm-chart-column.entry.js +625 -0
- package/dist/{ripple → esm}/wm-chart-slice.entry.js +6 -1
- package/dist/esm/wm-chart-stack.entry.js +443 -0
- package/dist/esm/wm-chart.entry.js +159 -0
- package/dist/{ripple → esm}/wm-date-range.entry.js +224 -114
- package/dist/esm/wm-datepicker.entry.js +395 -0
- package/dist/{ripple → esm}/wm-file-list.entry.js +5 -4
- package/dist/{ripple → esm}/wm-file.entry.js +48 -24
- package/dist/esm/wm-flyout.entry.js +174 -0
- package/dist/{ripple → esm}/wm-input.entry.js +23 -7
- package/dist/{ripple → esm}/wm-line-chart.entry.js +182 -94
- package/dist/esm/wm-modal-pss_3.entry.js +214 -0
- package/dist/esm/wm-modal_3.entry.js +232 -0
- package/dist/esm/wm-navigation_3.entry.js +182 -0
- package/dist/{ripple → esm}/wm-navigator.entry.js +26 -64
- package/dist/{ripple → esm}/wm-nested-select.entry.js +35 -25
- package/dist/{ripple → esm}/wm-optgroup.entry.js +17 -5
- package/dist/esm/wm-option_2.entry.js +531 -0
- package/dist/{ripple → esm}/wm-pagination.entry.js +16 -14
- package/dist/esm/wm-progress-indicator_3.entry.js +198 -0
- package/dist/{ripple → esm}/wm-search.entry.js +15 -31
- package/dist/{ripple → esm}/wm-snackbar.entry.js +32 -45
- package/dist/esm/wm-tab-item_3.entry.js +351 -0
- package/dist/{ripple → esm}/wm-tag-input.entry.js +169 -65
- package/dist/{ripple → esm}/wm-tag-option.entry.js +14 -2
- package/dist/{ripple/wm-menuitem.entry.js → esm/wm-textarea.entry.js} +65 -100
- package/dist/{ripple → esm}/wm-timepicker.entry.js +33 -12
- package/dist/{ripple → esm}/wm-toggletip.entry.js +105 -33
- package/dist/esm/wm-uploader.entry.js +337 -0
- package/dist/{ripple → esm}/wm-wrapper.entry.js +1 -1
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/loader/cdn.js +1 -0
- package/dist/loader/index.cjs.js +1 -0
- package/dist/loader/index.d.ts +24 -0
- package/dist/loader/index.es2017.js +1 -0
- package/dist/loader/index.js +2 -0
- package/dist/loader/package.json +11 -0
- package/dist/ripple/index.esm.js +0 -1
- package/dist/ripple/p-0d364411.entry.js +1 -0
- package/dist/ripple/p-156c4d1d.entry.js +1 -0
- package/dist/ripple/{wm-modal-footer.entry.js → p-26d8c356.entry.js} +1 -44
- package/dist/ripple/p-2b23ce49.entry.js +1 -0
- package/dist/ripple/p-2b7cc2c1.entry.js +1 -0
- package/dist/ripple/p-34bde06a.entry.js +1 -0
- package/dist/ripple/p-35db9386.entry.js +1 -0
- package/dist/ripple/p-38a987ac.entry.js +1 -0
- package/dist/ripple/p-38b05894.entry.js +1 -0
- package/dist/ripple/p-38dee4ab.entry.js +1 -0
- package/dist/ripple/p-3a19d019.entry.js +1 -0
- package/dist/ripple/p-451d4de2.js +1 -0
- package/dist/ripple/p-507f2cf4.entry.js +1 -0
- package/dist/ripple/p-59f74ead.entry.js +1 -0
- package/dist/ripple/p-5c2fc42a.entry.js +1 -0
- package/dist/ripple/p-680d7606.entry.js +1 -0
- package/dist/ripple/p-683264db.js +1 -0
- package/dist/ripple/p-6db681c8.entry.js +1 -0
- package/dist/ripple/p-6e3c2bbc.js +1 -0
- package/dist/ripple/p-6f1cabab.entry.js +1 -0
- package/dist/ripple/p-72d135ee.entry.js +1 -0
- package/dist/ripple/p-7799953c.entry.js +1 -0
- package/dist/ripple/p-83c3db60.js +2 -0
- package/dist/ripple/{wm-progress-monitor.entry.js → p-83cdad78.entry.js} +1 -71
- package/dist/ripple/p-87ef0cfa.entry.js +1 -0
- package/dist/ripple/p-88e44511.entry.js +1 -0
- package/dist/ripple/p-8f8e4eb8.entry.js +1 -0
- package/dist/ripple/p-936adffb.entry.js +1 -0
- package/dist/ripple/p-9755192c.entry.js +1 -0
- package/dist/ripple/p-9c5c591b.js +1 -0
- package/dist/ripple/p-9ea38d96.entry.js +1 -0
- package/dist/ripple/p-be3e4e7c.entry.js +1 -0
- package/dist/ripple/p-c9c7df12.entry.js +1 -0
- package/dist/ripple/p-d7a1be0b.entry.js +1 -0
- package/dist/ripple/p-dab86523.entry.js +1 -0
- package/dist/ripple/{wm-tab-list.entry.js → p-e4aa6e27.entry.js} +1 -175
- package/dist/ripple/p-ebe9f38c.js +1 -0
- package/dist/ripple/p-ed053612.entry.js +1 -0
- package/dist/ripple/p-f43f621b.entry.js +1 -0
- package/dist/ripple/p-f48d30d6.entry.js +1 -0
- package/dist/ripple/{wm-action-menu.entry.js → p-f6aad57c.entry.js} +1 -201
- package/dist/ripple/p-f6e1beb5.entry.js +1 -0
- package/dist/ripple/p-fc843bb8.entry.js +1 -0
- package/dist/ripple/{priv-chart-popover.entry.js → p-fd997764.entry.js} +1 -134
- package/dist/ripple/p-fffb46ad.entry.js +1 -0
- package/dist/ripple/ripple.esm.js +1 -48
- package/dist/types/components/charts/chartFunctions.d.ts +15 -2
- package/dist/types/components/charts/priv-chart-popover/priv-chart-popover.d.ts +25 -11
- package/dist/types/components/charts/priv-chart-popover-old/priv-chart-popover-old.d.ts +31 -0
- package/dist/types/components/charts/wm-chart/wm-chart-slice.d.ts +52 -0
- package/dist/types/components/charts/wm-chart/wm-chart.d.ts +113 -1
- package/dist/types/components/charts/wm-chart-bar/wm-chart-bar.d.ts +195 -0
- package/dist/types/components/charts/wm-chart-column/wm-chart-column.d.ts +184 -0
- package/dist/types/components/charts/wm-chart-legend/wm-chart-legend.d.ts +110 -0
- package/dist/types/components/charts/wm-chart-stack/wm-chart-stack.d.ts +194 -0
- package/dist/types/components/charts/wm-line-chart/wm-line-chart.d.ts +156 -11
- package/dist/types/components/charts/wm-progress-monitor/wm-progress-indicator.d.ts +53 -1
- package/dist/types/components/charts/wm-progress-monitor/wm-progress-monitor.d.ts +85 -0
- package/dist/types/components/charts/wm-progress-monitor/wm-progress-slice.d.ts +44 -0
- package/dist/types/components/datepickers/priv-calendar/priv-calendar.d.ts +19 -3
- package/dist/types/components/datepickers/wm-date-range.d.ts +205 -14
- package/dist/types/components/datepickers/wm-datepicker.d.ts +189 -11
- package/dist/types/components/selects/priv-option-list/priv-option-list.d.ts +6 -0
- package/dist/types/components/selects/wm-nested-select/wm-nested-select.d.ts +165 -1
- package/dist/types/components/selects/wm-optgroup/wm-optgroup.d.ts +87 -0
- package/dist/types/components/selects/wm-option/wm-option.d.ts +117 -0
- package/dist/types/components/selects/wm-select/wm-select.d.ts +193 -12
- package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +207 -2
- package/dist/types/components/wm-button/wm-button.d.ts +191 -0
- package/dist/types/components/wm-file/wm-file.d.ts +110 -1
- package/dist/types/components/wm-file-list/wm-file-list.d.ts +72 -0
- package/dist/types/components/wm-flyout/wm-flyout.d.ts +205 -0
- package/dist/types/components/wm-input/wm-input.d.ts +161 -1
- package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +79 -0
- package/dist/types/components/wm-modal/wm-modal-footer.d.ts +54 -0
- package/dist/types/components/wm-modal/wm-modal-header.d.ts +30 -0
- package/dist/types/components/wm-modal/wm-modal.d.ts +160 -0
- package/dist/types/components/wm-modal-pss/wm-modal-pss-footer.d.ts +4 -0
- package/dist/types/components/wm-modal-pss/wm-modal-pss-header.d.ts +4 -0
- package/dist/types/components/wm-modal-pss/wm-modal-pss.d.ts +6 -0
- package/dist/types/components/wm-navigation/wm-navigation-hamburger.d.ts +34 -0
- package/dist/types/components/wm-navigation/wm-navigation-item.d.ts +41 -0
- package/dist/types/components/wm-navigation/wm-navigation.d.ts +57 -0
- package/dist/types/components/wm-navigator/priv-navigator-button/priv-navigator-button.d.ts +4 -0
- package/dist/types/components/wm-navigator/priv-navigator-item/priv-navigator-item.d.ts +4 -0
- package/dist/types/components/wm-navigator/wm-navigator.d.ts +93 -4
- package/dist/types/components/wm-pagination/wm-pagination.d.ts +100 -1
- package/dist/types/components/wm-search/wm-search.d.ts +158 -6
- package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +103 -1
- package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +55 -3
- package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +119 -20
- package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +35 -2
- package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +199 -5
- package/dist/types/components/wm-tag-input/wm-tag-option/wm-tag-option.d.ts +68 -0
- package/dist/types/components/wm-textarea/wm-textarea.d.ts +99 -0
- package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +147 -0
- package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +88 -2
- package/dist/types/components/wm-uploader/wm-uploader.d.ts +145 -3
- package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +3 -0
- package/dist/types/components.d.ts +11523 -95
- package/dist/types/global/functions.d.ts +7 -2
- package/dist/types/global/interfaces.d.ts +92 -2
- package/dist/types/global/intl.d.ts +3 -0
- package/dist/types/stencil-public-runtime.d.ts +0 -28
- package/package.json +4 -33
- package/dist/components/index.d.ts +0 -33
- package/dist/components/priv-calendar.d.ts +0 -11
- package/dist/components/priv-chart-popover.d.ts +0 -11
- package/dist/components/priv-navigator-button.d.ts +0 -11
- package/dist/components/priv-navigator-item.d.ts +0 -11
- package/dist/components/priv-option-list.d.ts +0 -11
- package/dist/components/wm-action-menu.d.ts +0 -11
- package/dist/components/wm-button.d.ts +0 -11
- package/dist/components/wm-chart-slice.d.ts +0 -11
- package/dist/components/wm-chart.d.ts +0 -11
- package/dist/components/wm-date-range.d.ts +0 -11
- package/dist/components/wm-datepicker.d.ts +0 -11
- package/dist/components/wm-file-list.d.ts +0 -11
- package/dist/components/wm-file.d.ts +0 -11
- package/dist/components/wm-flyout.d.ts +0 -11
- package/dist/components/wm-input.d.ts +0 -11
- package/dist/components/wm-line-chart.d.ts +0 -11
- package/dist/components/wm-menuitem.d.ts +0 -11
- package/dist/components/wm-modal-footer.d.ts +0 -11
- package/dist/components/wm-modal-header.d.ts +0 -11
- package/dist/components/wm-modal-pss-footer.d.ts +0 -11
- package/dist/components/wm-modal-pss-header.d.ts +0 -11
- package/dist/components/wm-modal-pss.d.ts +0 -11
- package/dist/components/wm-modal.d.ts +0 -11
- package/dist/components/wm-navigation-hamburger.d.ts +0 -11
- package/dist/components/wm-navigation-item.d.ts +0 -11
- package/dist/components/wm-navigation.d.ts +0 -11
- package/dist/components/wm-navigator.d.ts +0 -11
- package/dist/components/wm-nested-select.d.ts +0 -11
- package/dist/components/wm-optgroup.d.ts +0 -11
- package/dist/components/wm-option.d.ts +0 -11
- package/dist/components/wm-pagination.d.ts +0 -11
- package/dist/components/wm-progress-indicator.d.ts +0 -11
- package/dist/components/wm-progress-monitor.d.ts +0 -11
- package/dist/components/wm-progress-slice.d.ts +0 -11
- package/dist/components/wm-search.d.ts +0 -11
- package/dist/components/wm-select.d.ts +0 -11
- package/dist/components/wm-snackbar.d.ts +0 -11
- package/dist/components/wm-tab-item.d.ts +0 -11
- package/dist/components/wm-tab-list.d.ts +0 -11
- package/dist/components/wm-tab-panel.d.ts +0 -11
- package/dist/components/wm-tag-input.d.ts +0 -11
- package/dist/components/wm-tag-option.d.ts +0 -11
- package/dist/components/wm-textarea.d.ts +0 -11
- package/dist/components/wm-timepicker.d.ts +0 -11
- package/dist/components/wm-toggletip.d.ts +0 -11
- package/dist/components/wm-uploader.d.ts +0 -11
- package/dist/components/wm-wrapper.d.ts +0 -11
- package/dist/ripple/index-CU5QNCKv.js +0 -4167
- package/dist/ripple/interfaces-CrANcZM9.js +0 -53
- package/dist/ripple/wm-button.entry.js +0 -197
- package/dist/ripple/wm-chart.entry.js +0 -157
- package/dist/ripple/wm-modal-pss-footer.entry.js +0 -40
- package/dist/ripple/wm-modal-pss-header.entry.js +0 -39
- package/dist/ripple/wm-navigation-hamburger.entry.js +0 -48
- package/dist/ripple/wm-navigation-item.entry.js +0 -18
- package/dist/ripple/wm-option.entry.js +0 -171
- package/dist/ripple/wm-progress-slice.entry.js +0 -13
- package/dist/ripple/wm-select.entry.js +0 -249
- package/dist/ripple/wm-tab-item.entry.js +0 -63
- package/dist/ripple/wm-uploader.entry.js +0 -313
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
## Component Index
|
|
2
|
+
|
|
3
|
+
| Component | Tag | File | Category |
|
|
4
|
+
|-----------|-----|------|----------|
|
|
5
|
+
| **Action Menu** | `wm-action-menu` | `wm-action-menu.md` | Basic Controls |
|
|
6
|
+
| **Button** | `wm-button` | `wm-button.md` | Basic Controls |
|
|
7
|
+
| **Nested Select** | `wm-nested-select` | `wm-nested-select.md` | Basic Controls |
|
|
8
|
+
| **Select** | `wm-select` | `wm-select.md` | Basic Controls |
|
|
9
|
+
| **Flyout** | `wm-flyout` | `wm-flyout.md` | Communication |
|
|
10
|
+
| **Modal & Dialog** | `wm-modal` | `wm-modal.md` | Communication |
|
|
11
|
+
| **Snackbar** | `wm-snackbar` | `wm-snackbar.md` | Communication |
|
|
12
|
+
| **Toggletip** | `wm-toggletip` | `wm-toggletip.md` | Communication |
|
|
13
|
+
| **Bar Chart** | `wm-chart-bar` | `wm-chart-bar.md` | Data Visualization |
|
|
14
|
+
| **Chart** | `wm-chart` | `wm-chart.md` | Data Visualization |
|
|
15
|
+
| **Chart Legend** | `wm-chart-legend` | `wm-chart-legend.md` | Data Visualization |
|
|
16
|
+
| **Column Chart** | `wm-chart-column` | `wm-chart-column.md` | Data Visualization |
|
|
17
|
+
| **Line Chart** | `wm-line-chart` | `wm-line-chart.md` | Data Visualization |
|
|
18
|
+
| **Progress Monitor** | `wm-progress-monitor` | `wm-progress-monitor.md` | Data Visualization |
|
|
19
|
+
| **Stack Chart** | `wm-chart-stack` | `wm-chart-stack.md` | Data Visualization |
|
|
20
|
+
| **Date Range** | `wm-date-range` | `wm-date-range.md` | Form Inputs |
|
|
21
|
+
| **Datepicker** | `wm-datepicker` | `wm-datepicker.md` | Form Inputs |
|
|
22
|
+
| **File List** | `wm-file-list` | `wm-file-list.md` | Form Inputs |
|
|
23
|
+
| **Input** | `wm-input` | `wm-input.md` | Form Inputs |
|
|
24
|
+
| **Search** | `wm-search` | `wm-search.md` | Form Inputs |
|
|
25
|
+
| **Tag Input** | `wm-tag-input` | `wm-tag-input.md` | Form Inputs |
|
|
26
|
+
| **Textarea** | `wm-textarea` | `wm-textarea.md` | Form Inputs |
|
|
27
|
+
| **Timepicker** | `wm-timepicker` | `wm-timepicker.md` | Form Inputs |
|
|
28
|
+
| **Uploader** | `wm-uploader` | `wm-uploader.md` | Form Inputs |
|
|
29
|
+
| **Navigation** | `wm-navigation` | `wm-navigation.md` | Navigation |
|
|
30
|
+
| **Navigator** | `wm-navigator` | `wm-navigator.md` | Navigation |
|
|
31
|
+
| **Pagination** | `wm-pagination` | `wm-pagination.md` | Navigation |
|
|
32
|
+
| **Tabs** | `wm-tab-list` | `wm-tab-list.md` | Navigation |
|
|
33
|
+
| **Wrapper** | `wm-wrapper` | `wm-wrapper.md` | Layout Containers |
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
### Action Menu
|
|
2
|
+
- **Element:** `<wm-action-menu>`
|
|
3
|
+
|
|
4
|
+
**Purpose:** Dropdown interface that displays a list of action items. When closed it shows a text
|
|
5
|
+
button, icon button, or selector box depending on action-menu-type. Selecting an item
|
|
6
|
+
executes an action and closes the menu. Composed of a parent wm-action-menu element and
|
|
7
|
+
one or more wm-menuitem children.
|
|
8
|
+
|
|
9
|
+
**When to use:**
|
|
10
|
+
|
|
11
|
+
- **Offering several contextual actions on a row or item** -- when a record in a table or list has multiple possible actions (edit, duplicate, archive, delete), use Action Menu to collapse them behind a single icon trigger rather than rendering a row of buttons.
|
|
12
|
+
- When some actions are secondary or infrequent enough that they do not warrant a persistent button, use a text or icon Action Menu to surface them on demand.
|
|
13
|
+
- **Grouping actions in a space-constrained context** -- when screen real estate is tight (toolbars, card footers, dense data tables), use an icon Action Menu to keep the UI clean while still making all actions reachable.
|
|
14
|
+
|
|
15
|
+
**Do not use for:**
|
|
16
|
+
|
|
17
|
+
- **A single action** -- if only one action is available, use wm-button directly; a menu that opens to reveal one item creates unnecessary friction.
|
|
18
|
+
- **Setting a form field value** -- if the purpose is to pick an option that persists as a form value, use wm-select instead; the selector type is for actions, not form inputs.
|
|
19
|
+
- **Binary decisions** -- if the user is choosing between exactly two opposing outcomes (approve/reject, yes/no), use wm-button with pairpositive and pairnegative; a dropdown is the wrong pattern for a binary choice.
|
|
20
|
+
- **Icon menus without a tooltip** -- the tooltip is required for icon triggers and is the only thing that tells users and screen readers what the menu is for; omitting it produces an unlabeled control that fails accessibility.
|
|
21
|
+
|
|
22
|
+
**Variants / types:**
|
|
23
|
+
|
|
24
|
+
- `action-menu-type="icon"` -- a single icon button trigger; requires tooltip for accessibility
|
|
25
|
+
- `action-menu-type="text"` -- a text button trigger; use button-text to set the label
|
|
26
|
+
- `action-menu-type="selector"` -- a selector-style trigger for action-driven option picking
|
|
27
|
+
- `action-menu-type="selector-primary"` -- a primary-weight selector trigger
|
|
28
|
+
|
|
29
|
+
**Usage notes:**
|
|
30
|
+
|
|
31
|
+
- The default type is `icon` (three-dot "more options" button). Use `text` for a labelled trigger, `selector` or `selector-primary` for a select-box appearance.
|
|
32
|
+
- `button-text` is required when `action-menu-type` is `text`, `selector`, or `selector-primary`.
|
|
33
|
+
- `tooltip` is required when `action-menu-type` is `icon`.
|
|
34
|
+
- `icon` is optional for `text`, `selector`, and `selector-primary` types, rendered alongside `button-text`. For `icon` type, `icon` overrides the default "more options" icon.
|
|
35
|
+
|
|
36
|
+
**Props:**
|
|
37
|
+
- `action-menu-type` -- Visual style of the trigger button. `'icon'` shows an icon-only button (requires `tooltip`). `'text'` shows a labelled button (requires `button-text`). `'selector'` shows a selector box that visually mimics a select control (requires `button-text`). `'selector-primary'` is a primary-styled variant of selector. _(type: `"icon" | "selector" | "selector-primary" | "text"`; default: `"icon"`)_
|
|
38
|
+
- `button-text` -- Label displayed on the trigger button. _(conditionally required: when action-menu-type is 'text', 'selector', or 'selector-primary')_
|
|
39
|
+
- `dark-mode` -- Applies dark styling to `selector` and `selector-primary` variants. Has no effect on `icon` or `text` types.
|
|
40
|
+
- `disabled` -- Disables the entire menu, preventing the trigger from being activated. _(default: `false`)_
|
|
41
|
+
- `icon` -- Icon to display alongside `button-text` for `text`, `selector`, and `selector-primary`
|
|
42
|
+
types, or in place of the default "more options" icon for the `icon` type. Formats: `'#icon-name'`
|
|
43
|
+
for a Ripple icon (e.g. `'#edit'`), or `'/path/to/file.svg#symbol-id'` for a local SVG sprite symbol.
|
|
44
|
+
- `icon-flip` -- Flips the icon along the specified axis. For use with the icon property. _(type: `"horizontal" | "vertical"`)_
|
|
45
|
+
- `icon-rotate` -- Rotates the icon by the given number of degrees. For use with the icon property.
|
|
46
|
+
- `icon-size` -- Change size of the icon to fine tune the visual rendering if it appears too large or small. Not
|
|
47
|
+
intended for general sizing. Accepts any valid CSS size value, e.g. '22px' or '1.3rem'.
|
|
48
|
+
- `label-for-identical-buttons` -- Use only when multiple action menus on the same page share identical tooltips or button text. Set this to a more descriptive label for screen readers; the visible label stays unchanged. Sets aria-label to this value.
|
|
49
|
+
- `max-width` -- Maximum width of the dropdown. Accepts any valid CSS width value (e.g. "300px", "20rem", "50%"). The dropdown may still render narrower to fit its content or the space available. _(default: `"25.875rem"`)_
|
|
50
|
+
- `tooltip` -- Tooltip text shown on hover. For `icon` menus, also serves as the accessible name announced by screen readers. _(conditionally required: when action-menu-type is 'icon')_
|
|
51
|
+
- `tooltip-position` -- Position of the tooltip relative to the trigger button. Repositions automatically when there is insufficient space at the specified position. _(type: `"bottom" | "bottom-left" | "bottom-right" | "left" | "right" | "top" | "top-left" | "top-right"`)_
|
|
52
|
+
|
|
53
|
+
**Slots:**
|
|
54
|
+
- _(default)_ -- One or more wm-menuitem elements.
|
|
55
|
+
|
|
56
|
+
**Events:**
|
|
57
|
+
- `menuLoaded` -- Fires when the component finishes loading. _(deprecated: Use wmActionMenuLoaded instead.)_
|
|
58
|
+
- `wmActionMenuLoaded` -- Fires when the component finishes loading and child wm-menuitem elements are ready.
|
|
59
|
+
|
|
60
|
+
**Required setup:**
|
|
61
|
+
|
|
62
|
+
- Wire each item's action: attach an `onclick` handler to each wm-menuitem.
|
|
63
|
+
- Slot one wm-menuitem per action as a child.
|
|
64
|
+
|
|
65
|
+
**Accessibility:**
|
|
66
|
+
|
|
67
|
+
- For `icon` menus, `tooltip` is required and serves as the accessible name announced by screen readers.
|
|
68
|
+
- When multiple action menus share identical tooltips or button text, use `label-for-identical-buttons` to give each a unique `aria-label`.
|
|
69
|
+
- Focus returns automatically to the trigger button after an item is activated, unless the action removes the trigger from the DOM -- in that case, manage focus explicitly in your action handler.
|
|
70
|
+
- **Keyboard:**
|
|
71
|
+
- **Trigger button (closed)**: Down Arrow / Space / Enter opens the menu and focuses the first item; Up Arrow opens and focuses the last item.
|
|
72
|
+
- **Open menu**: Up/Down Arrow navigates items (wraps around); Home/End jumps to first/last; Enter activates the focused item and closes the menu; Escape closes the menu and returns focus to the trigger; Tab closes the menu; typing a character focuses the next item starting with that letter.
|
|
73
|
+
|
|
74
|
+
**Related components:**
|
|
75
|
+
|
|
76
|
+
- `<wm-button>` -- if there is one specific, known action to take, use Button; if there are multiple actions to choose from, use Action Menu.
|
|
77
|
+
- `<wm-select>` -- if the user is selecting a value to store or filter by, use Select; if selecting an option immediately triggers an action, use Action Menu's selector type.
|
|
78
|
+
- `<wm-nested-select>` -- if the options are hierarchical and the result is a selected value, use Nested Select; Action Menu does not support nested option structures.
|
|
79
|
+
|
|
80
|
+
**Code example:**
|
|
81
|
+
|
|
82
|
+
_Icon action menu (default)_
|
|
83
|
+
|
|
84
|
+
```html
|
|
85
|
+
<wm-action-menu tooltip="More options">
|
|
86
|
+
<wm-menuitem onclick="editRecord()">Edit</wm-menuitem>
|
|
87
|
+
<wm-menuitem onclick="deleteRecord()">Delete</wm-menuitem>
|
|
88
|
+
</wm-action-menu>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
_Icon action menu_
|
|
92
|
+
|
|
93
|
+
```react
|
|
94
|
+
<WmActionMenu tooltip="More options">
|
|
95
|
+
<WmMenuitem onClick={editRecord}>Edit</WmMenuitem>
|
|
96
|
+
<WmMenuitem onClick={deleteRecord}>Delete</WmMenuitem>
|
|
97
|
+
</WmActionMenu>
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
_Icon action menu with a custom icon_
|
|
101
|
+
|
|
102
|
+
```html
|
|
103
|
+
<wm-action-menu icon="#filter" tooltip="Filter options">
|
|
104
|
+
<wm-menuitem>All</wm-menuitem>
|
|
105
|
+
<wm-menuitem>Unread</wm-menuitem>
|
|
106
|
+
</wm-action-menu>
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
_Icon action menu with a custom icon_
|
|
110
|
+
|
|
111
|
+
```react
|
|
112
|
+
<WmActionMenu icon="#filter" tooltip="Filter options">
|
|
113
|
+
<WmMenuitem>All</WmMenuitem>
|
|
114
|
+
<WmMenuitem>Unread</WmMenuitem>
|
|
115
|
+
</WmActionMenu>
|
|
116
|
+
```
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
### Button
|
|
2
|
+
- **Element:** `<wm-button>`
|
|
3
|
+
|
|
4
|
+
**Purpose:** Interactive button element that triggers actions and workflows. Has seven visual
|
|
5
|
+
types plus AI variants.
|
|
6
|
+
|
|
7
|
+
**When to use:**
|
|
8
|
+
|
|
9
|
+
- **Confirming a primary workflow action** -- use button-type="primary" when one clear, preferred action should stand out on a page or form, such as saving settings or submitting a report.
|
|
10
|
+
- **Offering a secondary or cancel option alongside a primary action** -- use button-type="secondary" when pairing a less-preferred action next to a primary one, such as Cancel next to Save.
|
|
11
|
+
- **Approving or rejecting with equal weight** -- use pairpositive and pairnegative together when two opposing actions carry no preference, such as an approve/reject decision.
|
|
12
|
+
- **Triggering a destructive, irreversible action** -- use the permanently-delete prop when the user is about to take an action that cannot be undone.
|
|
13
|
+
- **Performing a compact, recognizable action without a label** -- use button-type="icononly" when space is tight and the icon is universally understood, such as edit or delete in a data table.
|
|
14
|
+
- **Completing an action and moving the user to a new context** -- use button-type="navigational" for buttons that both trigger an action and navigate, such as a back button in a flyout.
|
|
15
|
+
|
|
16
|
+
**Do not use for:**
|
|
17
|
+
|
|
18
|
+
- **Icon-only buttons when the icon is not universally recognized** -- use a primary or secondary button with a text label instead.
|
|
19
|
+
- **Destructive styling (permanently-delete) on routine or reversible deletions** -- reserve it for actions that truly cannot be undone.
|
|
20
|
+
- **Multiple primary buttons in the same section** -- there should ideally be only one per page or section.
|
|
21
|
+
- **Lists of contextual actions (edit, duplicate, archive, delete)** -- use wm-action-menu instead.
|
|
22
|
+
|
|
23
|
+
**Variants / types:**
|
|
24
|
+
|
|
25
|
+
- `button-type="primary"` -- the single preferred action on a page or form
|
|
26
|
+
- `button-type="secondary"` -- a supporting or cancel action paired with a primary
|
|
27
|
+
- `button-type="textonly"` -- a low-emphasis action with no button chrome
|
|
28
|
+
- `button-type="icononly"` -- a compact action identified solely by a universally recognized icon
|
|
29
|
+
- `button-type="navigational"` -- an action that also moves the user to a new context
|
|
30
|
+
- `button-type="selector"` -- a toggle-style selection button
|
|
31
|
+
- `button-type="selector-primary"` -- a primary-weight selection button
|
|
32
|
+
- `button-type="pairpositive"` -- the affirmative action in an equal-weight approve/reject pair
|
|
33
|
+
- `button-type="pairnegative"` -- the rejecting action in an equal-weight approve/reject pair
|
|
34
|
+
- `button-type="primary-ai"` -- primary variant for AI-generated or AI-assisted actions
|
|
35
|
+
- `button-type="secondary-ai"` -- secondary variant for AI context
|
|
36
|
+
- `button-type="textonly-ai"` -- text-only variant for AI context
|
|
37
|
+
- `button-type="icononly-ai"` -- icon-only variant for AI context
|
|
38
|
+
- `button-type="navigational-ai"` -- navigational variant for AI context
|
|
39
|
+
|
|
40
|
+
**Usage notes:**
|
|
41
|
+
|
|
42
|
+
- **primary**: Use sparingly -- ideally once per page or section -- for the single most
|
|
43
|
+
important action.
|
|
44
|
+
- **pairpositive / pairnegative**: Must always be used together for binary choices where
|
|
45
|
+
neither option is preferred (e.g. Approve / Reject). Do not use one without the other.
|
|
46
|
+
- **AI variants** (`primary-ai`, `secondary-ai`, etc.): Do not set the `icon` prop --
|
|
47
|
+
the AI icon is applied automatically.
|
|
48
|
+
- **icononly / navigational**: Both `icon` and `tooltip` are required.
|
|
49
|
+
- Do not use slotted text (emoji, Unicode glyphs, or characters styled to look like an icon)
|
|
50
|
+
to simulate an icon. Use the `icon` prop so the icon is rendered as a proper SVG/MDI glyph
|
|
51
|
+
with correct sizing, color, and accessibility treatment.
|
|
52
|
+
|
|
53
|
+
**Props:**
|
|
54
|
+
- `aria-expanded-passthrough` -- Sets the button's `aria-expanded` attribute. Use on buttons that toggle a disclosure region,
|
|
55
|
+
menu, popover, or dialog. Use this prop instead of setting `aria-expanded` directly on
|
|
56
|
+
`<wm-button>`.
|
|
57
|
+
- `aria-label-passthrough` -- Sets the button's `aria-label`. Takes priority over `label-for-identical-buttons` and over
|
|
58
|
+
the label automatically derived from `tooltip` for `icononly` and `navigational` buttons. Use
|
|
59
|
+
this prop instead of setting `aria-label` directly on `<wm-button>`.
|
|
60
|
+
- `button-type` -- Visual style of the button. 'primary' for the single preferred action (use sparingly, ideally once per page/section). 'secondary' for other actions, often alongside a primary. 'textonly' for low-emphasis actions. 'icononly' requires icon and tooltip. 'navigational' for icon-only back/forward navigation (e.g. flyout back button). 'pairpositive' and 'pairnegative' must be used together for binary choices (neither is preferred, e.g. Approve/Reject). AI variants apply AI styling automatically -- do not set the icon property on AI types. 'selector' and 'selector-primary' are internal types used by wm-select -- do not use directly. _(type: `"icononly" | "icononly-ai" | "navigational" | "navigational-ai" | "pairnegative" | "pairpositive" | "primary" | "primary-ai" | "secondary" | "secondary-ai" | "selector" | "selector-primary" | "textonly" | "textonly-ai"`; default: `"secondary"`)_
|
|
61
|
+
- `custom-background` -- Set to 'dark' to render button styles appropriate for a dark background surface.
|
|
62
|
+
- `disabled` -- Disables the button, preventing interaction and applying disabled styling. _(default: `false`)_
|
|
63
|
+
- `icon` -- Icon to display. Required when button-type is 'icononly' or 'navigational'. Formats: '#icon-name' for a commonly-used Ripple icon (e.g. '#edit', '#add-person'), '/path/to/file.svg#symbol-id' for a local SVG sprite symbol, or an MDI character code like 'f3eb' (deprecated). Do not set on AI button types -- their icon is applied automatically. _(conditionally required: when button-type is 'icononly' or 'navigational')_
|
|
64
|
+
- `icon-flip` -- Flips the icon along the specified axis. For use with the icon property. _(type: `"horizontal" | "vertical"`)_
|
|
65
|
+
- `icon-rotate` -- Rotates the icon by the given number of degrees. For use with the icon property.
|
|
66
|
+
- `icon-size` -- Change size of the icon to fine tune the visual rendering if it appears too large or small. Not
|
|
67
|
+
intended for general sizing. Accepts any valid CSS size value, e.g. '22px' or '1.3rem'.
|
|
68
|
+
- `is-submit` -- When true, the button submits its containing form. Equivalent to type="submit" on a native button element. _(default: `false`)_
|
|
69
|
+
- `label-for-identical-buttons` -- Accessibility prop. Use ONLY when multiple buttons on the same page share identical visible text or identical tooltips. Set this to a more descriptive label for screen readers; leave the visible button text or tooltip unchanged. Sets aria-label to this value. _(conditionally required: when multiple buttons on the same page share identical visible text or identical tooltips)_
|
|
70
|
+
- `permanently-delete` -- Applies danger/destructive styling to the button. Use sparingly and only for irreversible destructive actions (e.g. permanently deleting an account or record). Applied as a modifier -- not a separate button-type. _(default: `false`)_
|
|
71
|
+
- `text-wrap` -- For 'textonly' buttons only. When false, text is truncated with an ellipsis and a tooltip reveals the full text on hover. _(default: `true`)_
|
|
72
|
+
- `tooltip` -- Tooltip text displayed on hover. _(conditionally required: when button-type is 'icononly' or 'navigational')_
|
|
73
|
+
- `tooltip-position` -- Position of the tooltip relative to the button. If there is insufficient space at the specified position, the component repositions automatically. _(type: `"bottom" | "bottom-left" | "bottom-right" | "left" | "right" | "top" | "top-left" | "top-right"`; default: `"bottom-right"`)_
|
|
74
|
+
|
|
75
|
+
**Slots:**
|
|
76
|
+
- _(default)_ -- Button label text. Required for all types. For `icononly` and `navigational`
|
|
77
|
+
buttons, slotted text is not rendered visually but is used as the accessible name
|
|
78
|
+
when no `tooltip` or `label-for-identical-buttons` is provided.
|
|
79
|
+
|
|
80
|
+
**Accessibility:**
|
|
81
|
+
|
|
82
|
+
`aria-label` resolution order (highest priority first):
|
|
83
|
+
1. `aria-label-passthrough`
|
|
84
|
+
2. `label-for-identical-buttons` (or `tooltip` for icononly/navigational types)
|
|
85
|
+
3. Nothing set -- browser derives the label from visible text or slotted content
|
|
86
|
+
|
|
87
|
+
`aria-expanded` -- set via `aria-expanded-passthrough` (not directly on `<wm-button>`).
|
|
88
|
+
`aria-haspopup="menu"` -- applied automatically when the host element has an `aria-haspopup` attribute.
|
|
89
|
+
- **Keyboard:** Enter - Fires a click event on the button (mirrors native button behavior).
|
|
90
|
+
|
|
91
|
+
**Related components:**
|
|
92
|
+
|
|
93
|
+
- `<wm-action-menu>` -- if the interaction triggers one of several contextual actions, use Action Menu; if there is one specific, known action, use Button.
|
|
94
|
+
|
|
95
|
+
**Code example:**
|
|
96
|
+
|
|
97
|
+
_Primary button -- the preferred action on a page or section. Use once per context._
|
|
98
|
+
|
|
99
|
+
```html
|
|
100
|
+
<wm-button button-type="primary">Save changes</wm-button>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
_Primary button_
|
|
104
|
+
|
|
105
|
+
```react
|
|
106
|
+
<WmButton buttonType="primary" onClick={handleSave}>Save changes</WmButton>
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
_Primary and secondary pair -- the most common pattern._
|
|
110
|
+
|
|
111
|
+
```html
|
|
112
|
+
<wm-button button-type="secondary">Cancel</wm-button>
|
|
113
|
+
<wm-button button-type="primary">Save changes</wm-button>
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
_Primary and secondary pair_
|
|
117
|
+
|
|
118
|
+
```react
|
|
119
|
+
<WmButton buttonType="secondary" onClick={handleCancel}>Cancel</WmButton>
|
|
120
|
+
<WmButton buttonType="primary" onClick={handleSave}>Save changes</WmButton>
|
|
121
|
+
```
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
### Chart Bar
|
|
2
|
+
- **Element:** `<wm-chart-bar>`
|
|
3
|
+
|
|
4
|
+
**Purpose:** Renders a horizontal bar chart for comparing values across nominal categories. Data and
|
|
5
|
+
configuration are set via JavaScript properties (`chart.config` and `chart.data`) -- not
|
|
6
|
+
HTML attributes. Supports single-color, discrete palette, semantic palette, and grouped bars.
|
|
7
|
+
|
|
8
|
+
**Preferred** over wm-chart's bar subtypes for all comparison and distribution use cases.
|
|
9
|
+
Use this component (or wm-chart-column) instead of `<wm-chart chart-type="bar*">`.
|
|
10
|
+
|
|
11
|
+
**When to use:**
|
|
12
|
+
|
|
13
|
+
- **Comparing values across nominal categories** -- when the goal is to compare independent quantities across a set of categories (e.g., enrollment by program), this is the primary comparison component.
|
|
14
|
+
- **Many categories or long category labels** -- the horizontal orientation gives labels room to read, so prefer Bar Chart over Column Chart when there are many categories or the labels are long.
|
|
15
|
+
- **Grouped comparison** -- when each category has sub-series to compare side by side, provide a `groupName` on each data item for grouped bars.
|
|
16
|
+
|
|
17
|
+
**Do not use for:**
|
|
18
|
+
|
|
19
|
+
- **Composition / parts of a whole** -- use `wm-chart` (for a doughnut chart) or `wm-chart-stack` (for a stacked bar chart). Bars show independent magnitudes, not segments of a total.
|
|
20
|
+
- **Data changing over time (trends)** -- use `wm-line-chart`.
|
|
21
|
+
- **Binary completion tracking** -- use `wm-progress-monitor`.
|
|
22
|
+
- **Vertical orientation or fewer categories** -- consider `wm-chart-column`.
|
|
23
|
+
|
|
24
|
+
**Variants / types:**
|
|
25
|
+
|
|
26
|
+
- **Single-color** -- one color for every bar; best for a single series where the categories carry no qualitative meaning and the goal is simply to compare magnitudes.
|
|
27
|
+
- **Discrete palette** (`colors: "discrete"`) -- cycles a set of visually distinct colors so each category reads as its own thing. Use when the categories are nominal -- no inherent order or good/bad meaning (e.g., departments, courses, activity types) -- and color is only there to tell them apart.
|
|
28
|
+
- **Semantic palette** (`colors: "semantic"`) -- maps color to meaning rather than to identity. Use when the categories carry positive / negative / status meaning (e.g., Met vs. Not Met, Exceeded vs. Below, or a progress state) and the color should reinforce that meaning. Avoid it for merely nominal categories -- applying good/bad colors to neutral data misleads the reader.
|
|
29
|
+
- **Grouped** -- multiple series per category, provided via a `groupName` on each data item.
|
|
30
|
+
|
|
31
|
+
**Usage notes:**
|
|
32
|
+
|
|
33
|
+
- Set `id` on the element to use with an external `wm-chart-legend` via `chart-ids`.
|
|
34
|
+
- For grouped charts, each `ChartData` item must include a `groupName` field.
|
|
35
|
+
- `config.gridMax: "auto"` calculates a "nice" round upper bound from the data.
|
|
36
|
+
- Bars exceeding the `gridMax` are clipped -- set an appropriate `gridMax` to avoid this.
|
|
37
|
+
|
|
38
|
+
**Props:**
|
|
39
|
+
- `config` -- Chart configuration object. Set via JavaScript property -- not an HTML
|
|
40
|
+
attribute. See the `ChartConfig` interface for the full list of options (label, gridMax,
|
|
41
|
+
valueFormat, colors, showLegend, etc.). _(type: `undefined | { label: string; showLabel: boolean; valueAxisLabel: string; categoryAxisLabel: string; printMode: boolean; printModeFormat: "amount" | "percentage"; gridMax: number | "auto"; sort?: "ascending" | "descending" | "none"; showLegend?: "top" | "bottom" | "left" | "right" | "none"; showGrid?: boolean; subinfo?: string; valueFormat?: "amount" | "percentage" | "none"; colors?: string; popoverTitle?: string; popoverText?: string; popoverButtonText?: string; decimalPlaces?: number; patternMode?: boolean; }`)_
|
|
42
|
+
- `data` -- Array of data items to render. Set via JavaScript property -- not an HTML
|
|
43
|
+
attribute. Each item must include at least `barLegend` and `amount`; grouped charts also
|
|
44
|
+
require `groupName`. See the `ChartData` interface. _(type: `ChartData[]`)_
|
|
45
|
+
- `pattern-mode` -- When true, applies a hatching pattern fill to bars in addition to color,
|
|
46
|
+
improving distinguishability for users with color vision deficiencies. Takes precedence
|
|
47
|
+
over `config.patternMode`.
|
|
48
|
+
- `print-mode` -- When true, bar values are included in the legend and keyboard interaction
|
|
49
|
+
instructions are removed from the DOM -- suitable for printed output. Takes precedence over
|
|
50
|
+
`config.printMode`.
|
|
51
|
+
- `subinfo` -- Optional secondary text displayed beneath the chart label. Takes precedence
|
|
52
|
+
over `config.subinfo`.
|
|
53
|
+
|
|
54
|
+
**Accessibility:**
|
|
55
|
+
|
|
56
|
+
- `config.label` is required -- used as the chart's `aria-label`.
|
|
57
|
+
- Each bar receives an `aria-label` composed of the category axis label, group name (if
|
|
58
|
+
grouped), bar legend, and display value.
|
|
59
|
+
- The chart renders with `role="application"` and `aria-roledescription="Interactive chart"`.
|
|
60
|
+
- In `print-mode`, keyboard interaction instructions are removed from the DOM.
|
|
61
|
+
- **Keyboard:**
|
|
62
|
+
- **Tab**: Enters the chart wrapper.
|
|
63
|
+
- **Arrow Down / Right**: Focuses the first bar; subsequent presses cycle to the next bar.
|
|
64
|
+
- **Arrow Up / Left**: Cycles to the previous bar.
|
|
65
|
+
- **Enter**: Activates the popover button when the popover is open.
|
|
66
|
+
- **Escape**: Closes the open popover.
|
|
67
|
+
- **Tab** (from within): Exits the chart and clears focus.
|
|
68
|
+
|
|
69
|
+
**Related components:**
|
|
70
|
+
|
|
71
|
+
- `<wm-chart-column>` -- the vertical equivalent; prefer it for fewer categories or when vertical orientation reads better.
|
|
72
|
+
- `<wm-chart-legend>` -- external/shared legend for one or more bar or column charts.
|
|
73
|
+
- `<wm-chart>` -- for composition (parts of a whole) in a doughnut chart rather than comparison.
|
|
74
|
+
- `<wm-chart-stack>` -- for composition (parts of a whole) in a stacked bar chart rather than comparison.
|
|
75
|
+
|
|
76
|
+
**Code example:**
|
|
77
|
+
|
|
78
|
+
_Single-color bar chart_
|
|
79
|
+
|
|
80
|
+
```html
|
|
81
|
+
<wm-chart-bar id="enrollment-chart"></wm-chart-bar>
|
|
82
|
+
<script>
|
|
83
|
+
const chart = document.querySelector('#enrollment-chart');
|
|
84
|
+
chart.config = { label: 'Enrollment by program', gridMax: 'auto', valueFormat: 'amount' };
|
|
85
|
+
chart.data = [{ barLegend: 'Biology', amount: 310 }, { barLegend: 'English', amount: 280 }];
|
|
86
|
+
</script>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
_Single-color bar chart_
|
|
90
|
+
|
|
91
|
+
```react
|
|
92
|
+
// config and data must be set via JavaScript properties in useEffect -- not as JSX props.
|
|
93
|
+
const singleRef = useRef(null);
|
|
94
|
+
|
|
95
|
+
useEffect(() => {
|
|
96
|
+
singleRef.current.config = {
|
|
97
|
+
label: 'Enrollment by program',
|
|
98
|
+
gridMax: 'auto',
|
|
99
|
+
valueFormat: 'amount',
|
|
100
|
+
popoverTitle: 'Details',
|
|
101
|
+
};
|
|
102
|
+
singleRef.current.data = [
|
|
103
|
+
{ barLegend: 'Biology', amount: 310, popoverText: '310 students enrolled' },
|
|
104
|
+
{ barLegend: 'English', amount: 280, popoverText: '280 students enrolled' },
|
|
105
|
+
{ barLegend: 'History', amount: 195, popoverText: '195 students enrolled' },
|
|
106
|
+
{ barLegend: 'Chemistry', amount: 240, popoverText: '240 students enrolled' },
|
|
107
|
+
];
|
|
108
|
+
}, []);
|
|
109
|
+
|
|
110
|
+
<WmChartBar ref={singleRef} />
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
_Grouped bar chart_
|
|
114
|
+
|
|
115
|
+
```html
|
|
116
|
+
<wm-chart-bar id="grouped-chart"></wm-chart-bar>
|
|
117
|
+
<script>
|
|
118
|
+
const chart = document.querySelector('#grouped-chart');
|
|
119
|
+
chart.config = { label: 'Retention by cohort and program', gridMax: 'auto',
|
|
120
|
+
categoryAxisLabel: 'Cohort', valueAxisLabel: 'Students', showLegend: 'bottom' };
|
|
121
|
+
chart.data = [
|
|
122
|
+
{ barLegend: 'Biology', amount: 120, groupName: '2022', popoverTitle: 'Biology -- 2022', popoverText: '120 students retained' },
|
|
123
|
+
{ barLegend: 'English', amount: 95, groupName: '2022', popoverTitle: 'English -- 2022', popoverText: '95 students retained' },
|
|
124
|
+
{ barLegend: 'Biology', amount: 135, groupName: '2023', popoverTitle: 'Biology -- 2023', popoverText: '135 students retained' },
|
|
125
|
+
{ barLegend: 'English', amount: 110, groupName: '2023', popoverTitle: 'English -- 2023', popoverText: '110 students retained' },
|
|
126
|
+
];
|
|
127
|
+
</script>
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
_Grouped bar chart_
|
|
131
|
+
|
|
132
|
+
```react
|
|
133
|
+
// config and data must be set via JavaScript properties in useEffect -- not as JSX props.
|
|
134
|
+
const groupedRef = useRef(null);
|
|
135
|
+
|
|
136
|
+
useEffect(() => {
|
|
137
|
+
groupedRef.current.config = {
|
|
138
|
+
label: 'Retention by cohort and program',
|
|
139
|
+
gridMax: 'auto',
|
|
140
|
+
valueFormat: 'amount',
|
|
141
|
+
categoryAxisLabel: 'Cohort',
|
|
142
|
+
valueAxisLabel: 'Students',
|
|
143
|
+
showLegend: 'bottom',
|
|
144
|
+
};
|
|
145
|
+
groupedRef.current.data = [
|
|
146
|
+
{ barLegend: 'Biology', amount: 120, groupName: '2022', popoverTitle: 'Biology -- 2022', popoverText: '120 students retained' },
|
|
147
|
+
{ barLegend: 'English', amount: 95, groupName: '2022', popoverTitle: 'English -- 2022', popoverText: '95 students retained' },
|
|
148
|
+
{ barLegend: 'History', amount: 80, groupName: '2022', popoverTitle: 'History -- 2022', popoverText: '80 students retained' },
|
|
149
|
+
{ barLegend: 'Biology', amount: 135, groupName: '2023', popoverTitle: 'Biology -- 2023', popoverText: '135 students retained' },
|
|
150
|
+
{ barLegend: 'English', amount: 110, groupName: '2023', popoverTitle: 'English -- 2023', popoverText: '110 students retained' },
|
|
151
|
+
{ barLegend: 'History', amount: 72, groupName: '2023', popoverTitle: 'History -- 2023', popoverText: '72 students retained' },
|
|
152
|
+
];
|
|
153
|
+
}, []);
|
|
154
|
+
|
|
155
|
+
<WmChartBar ref={groupedRef} />
|
|
156
|
+
```
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
### Chart Column
|
|
2
|
+
- **Element:** `<wm-chart-column>`
|
|
3
|
+
|
|
4
|
+
**Purpose:** Renders a vertical column chart for comparing values across nominal categories or showing
|
|
5
|
+
distribution across interval/ratio ranges. Data and configuration are set via JavaScript
|
|
6
|
+
properties (`chart.config` and `chart.data`) -- not HTML attributes. Supports single-color,
|
|
7
|
+
discrete palette, semantic palette, and grouped columns.
|
|
8
|
+
|
|
9
|
+
**Preferred** over wm-chart's bar subtypes for comparison and distribution use cases.
|
|
10
|
+
Use this component (or wm-chart-bar) instead of `<wm-chart chart-type="bar*">`. When
|
|
11
|
+
columns exceed available width, the chart scrolls horizontally.
|
|
12
|
+
|
|
13
|
+
**When to use:**
|
|
14
|
+
|
|
15
|
+
- **Comparing values across a small number of categories** -- when comparing independent quantities and the categories are few or short-labeled, the vertical orientation reads well.
|
|
16
|
+
- **Frequency distribution across numeric ranges such as time (histogram)** -- when showing how often values fall into ordered numeric bins, use a column chart with `sort: "none"` to preserve bin order and a single color so the bins read as one series.
|
|
17
|
+
- **Grouped comparison** -- when each category has sub-series to compare side by side, provide a `groupName` on each data item.
|
|
18
|
+
|
|
19
|
+
**Do not use for:**
|
|
20
|
+
|
|
21
|
+
- **Composition / parts of a whole** -- use `wm-chart-stack` for a stacked bar chart or `wm-chart` for a doughnut chart.
|
|
22
|
+
- **Many categories or long labels** -- prefer `wm-chart-bar` (horizontal) so labels have room.
|
|
23
|
+
- **Binary completion tracking** -- use `wm-progress-monitor`.
|
|
24
|
+
|
|
25
|
+
**Variants / types:**
|
|
26
|
+
|
|
27
|
+
- **Single-color** -- one color for every column; use for a single series, or for a frequency distribution / histogram where the bins are one series (pair with `sort: "none"` to preserve bin order).
|
|
28
|
+
- **Discrete palette** (`colors: "discrete"`) -- cycles a set of visually distinct colors so each category reads as its own thing. Use when the categories are nominal -- no inherent order or good/bad meaning (e.g., departments, terms, activity types) -- and color is only there to tell them apart.
|
|
29
|
+
- **Semantic palette** (`colors: "semantic"`) -- maps color to meaning rather than to identity. Use when the categories carry positive / negative / status meaning (e.g., Met vs. Not Met, Exceeded vs. Below, or a progress state) and the color should reinforce that meaning. Avoid it for merely nominal categories -- applying good/bad colors to neutral data misleads the reader.
|
|
30
|
+
- **Grouped** -- multiple series per category, provided via a `groupName` on each data item.
|
|
31
|
+
|
|
32
|
+
**Usage notes:**
|
|
33
|
+
|
|
34
|
+
- Set `id` on the element to use with an external `wm-chart-legend` via `chart-ids`.
|
|
35
|
+
- Use `print-width` to fix chart width for exported PDFs or print stylesheets (accepts `px`,
|
|
36
|
+
`in`, or `cm`). The chart will wrap columns across multiple plots when they exceed the
|
|
37
|
+
available `print-width`.
|
|
38
|
+
- For grouped charts, each `ChartData` item must include a `groupName` field.
|
|
39
|
+
|
|
40
|
+
**Props:**
|
|
41
|
+
- `config` -- Chart configuration object. Set via JavaScript property -- not an HTML
|
|
42
|
+
attribute. See the `ChartConfig` interface for the full list of options (label, gridMax,
|
|
43
|
+
valueFormat, colors, showLegend, etc.). _(type: `undefined | { label: string; showLabel: boolean; valueAxisLabel: string; categoryAxisLabel: string; printMode: boolean; printModeFormat: "amount" | "percentage"; gridMax: number | "auto"; sort?: "ascending" | "descending" | "none"; showLegend?: "top" | "bottom" | "left" | "right" | "none"; showGrid?: boolean; subinfo?: string; valueFormat?: "amount" | "percentage" | "none"; colors?: string; popoverTitle?: string; popoverText?: string; popoverButtonText?: string; decimalPlaces?: number; patternMode?: boolean; }`)_
|
|
44
|
+
- `data` -- Array of data items to render. Set via JavaScript property -- not an HTML
|
|
45
|
+
attribute. Each item must include at least `barLegend` and `amount`; grouped charts also
|
|
46
|
+
require `groupName`. See the `ChartData` interface. _(type: `ChartData[]`)_
|
|
47
|
+
- `pattern-mode` -- When true, applies a hatching pattern fill to columns in addition to color,
|
|
48
|
+
improving distinguishability for users with color vision deficiencies. Takes precedence
|
|
49
|
+
over `config.patternMode`.
|
|
50
|
+
- `print-mode` -- When true, column values are included in the legend and keyboard interaction
|
|
51
|
+
instructions are removed from the DOM -- suitable for printed output. Takes precedence over
|
|
52
|
+
`config.printMode`.
|
|
53
|
+
- `print-width` -- Fixed chart width for print or PDF export. Accepts `px`, `in`, or `cm` (e.g.
|
|
54
|
+
`"7.5in"`). When set alongside `print-mode` or during `window.print()`, columns that
|
|
55
|
+
exceed the available width wrap across multiple plot rows.
|
|
56
|
+
- `subinfo` -- Optional secondary text displayed beneath the chart label. Takes precedence
|
|
57
|
+
over `config.subinfo`.
|
|
58
|
+
|
|
59
|
+
**Accessibility:**
|
|
60
|
+
|
|
61
|
+
- `config.label` is required -- used as the chart's `aria-label`.
|
|
62
|
+
- Each column receives an `aria-label` composed of the category axis label, group name (if
|
|
63
|
+
grouped), bar legend, and display value.
|
|
64
|
+
- The chart renders with `role="application"` and `aria-roledescription="Interactive chart"`.
|
|
65
|
+
- In `print-mode`, keyboard interaction instructions are removed from the DOM.
|
|
66
|
+
- **Keyboard:**
|
|
67
|
+
- **Tab**: Enters the chart wrapper.
|
|
68
|
+
- **Arrow Down / Right**: Focuses the first column; subsequent presses cycle to the next.
|
|
69
|
+
- **Arrow Up / Left**: Cycles to the previous column.
|
|
70
|
+
- **Enter**: Activates the popover button when the popover is open.
|
|
71
|
+
- **Escape**: Closes the open popover.
|
|
72
|
+
- **Tab** (from within): Exits the chart and clears focus.
|
|
73
|
+
|
|
74
|
+
**Related components:**
|
|
75
|
+
|
|
76
|
+
- `<wm-chart-bar>` -- the horizontal equivalent; prefer it for many categories or long labels.
|
|
77
|
+
- `<wm-chart-legend>` -- external/shared legend for one or more bar or column charts.
|
|
78
|
+
- `<wm-chart>` -- for composition (parts of a whole) in a doughnut chart rather than comparison or distribution.
|
|
79
|
+
- `<wm-chart-stack>` - for composition (parts of a whole) in a stacked bar chart rather than comparison or distribution.
|
|
80
|
+
|
|
81
|
+
**Code example:**
|
|
82
|
+
|
|
83
|
+
_Single-color column chart_
|
|
84
|
+
|
|
85
|
+
```html
|
|
86
|
+
<wm-chart-column id="enrollment-chart"></wm-chart-column>
|
|
87
|
+
<script>
|
|
88
|
+
const chart = document.querySelector('#enrollment-chart');
|
|
89
|
+
chart.config = { label: 'Enrollment by term', gridMax: 'auto', valueFormat: 'amount',
|
|
90
|
+
categoryAxisLabel: 'Term', valueAxisLabel: 'Students' };
|
|
91
|
+
chart.data = [{ barLegend: 'Fall 2023', amount: 310 }, { barLegend: 'Spring 2024', amount: 280 }];
|
|
92
|
+
</script>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
_Single-color column chart_
|
|
96
|
+
|
|
97
|
+
```react
|
|
98
|
+
<WmChartColumn ref={chartRef} />
|
|
99
|
+
// In useEffect: chartRef.current.config = {...}; chartRef.current.data = [...];
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
_Grouped column chart_
|
|
103
|
+
|
|
104
|
+
```html
|
|
105
|
+
<wm-chart-column id="grouped-chart"></wm-chart-column>
|
|
106
|
+
<script>
|
|
107
|
+
const chart = document.querySelector('#grouped-chart');
|
|
108
|
+
chart.config = { label: 'Enrollment by term and program', gridMax: 'auto',
|
|
109
|
+
showLegend: 'bottom' };
|
|
110
|
+
chart.data = [
|
|
111
|
+
{ barLegend: 'Biology', amount: 120, groupName: 'Fall 2023' },
|
|
112
|
+
{ barLegend: 'English', amount: 95, groupName: 'Fall 2023' },
|
|
113
|
+
];
|
|
114
|
+
</script>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
_Grouped column chart_
|
|
118
|
+
|
|
119
|
+
```react
|
|
120
|
+
<WmChartColumn ref={chartRef} />
|
|
121
|
+
// In useEffect: chartRef.current.config = {...}; chartRef.current.data = [...];
|
|
122
|
+
```
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
### Chart Legend
|
|
2
|
+
- **Element:** `<wm-chart-legend>`
|
|
3
|
+
|
|
4
|
+
**Purpose:** External legend component for wm-chart-bar and wm-chart-column. Retrieves color and label
|
|
5
|
+
data from one or more charts via element IDs, allowing a single legend to serve multiple
|
|
6
|
+
charts. Hidden from screen readers -- relevant data is announced when the user interacts with
|
|
7
|
+
the associated chart directly.
|
|
8
|
+
|
|
9
|
+
For simple single-chart scenarios, the `config.showLegend` option on wm-chart-bar or
|
|
10
|
+
wm-chart-column renders an internal legend without requiring this element. Use
|
|
11
|
+
wm-chart-legend when sharing one legend across multiple charts or when external placement
|
|
12
|
+
is required.
|
|
13
|
+
|
|
14
|
+
**When to use:**
|
|
15
|
+
|
|
16
|
+
- **Sharing one legend across multiple charts** -- when several bar/column charts use the same categories and should be read through a single shared legend.
|
|
17
|
+
- **Placing the legend outside the chart** -- when layout requires the legend to sit somewhere the chart's internal legend cannot.
|
|
18
|
+
- **Interactive highlighting** -- clicking or hovering a legend item highlights the corresponding bars across all associated charts.
|
|
19
|
+
|
|
20
|
+
**Do not use for:**
|
|
21
|
+
|
|
22
|
+
- **A single chart with a built-in legend** -- use the `config.showLegend` option on `wm-chart-bar` or `wm-chart-column` instead; no separate element is needed.
|
|
23
|
+
- **Doughnut, line, or progress components** -- this legend derives its data from bar and column charts only.
|
|
24
|
+
|
|
25
|
+
**Variants / types:**
|
|
26
|
+
|
|
27
|
+
- **Horizontal orientation** (default) -- legend items laid out in a row.
|
|
28
|
+
- **Vertical orientation** -- legend items stacked, for side placement.
|
|
29
|
+
- **Print mode** -- shows each item's print value beside its swatch.
|
|
30
|
+
|
|
31
|
+
**Usage notes:**
|
|
32
|
+
|
|
33
|
+
- Assign an `id` to each chart and pass those IDs (space-separated) to `chart-ids`.
|
|
34
|
+
- Clicking or hovering a legend item highlights the corresponding bar(s) in all associated
|
|
35
|
+
charts.
|
|
36
|
+
|
|
37
|
+
**Props:**
|
|
38
|
+
- `chart-ids` -- Space-separated list of element IDs of the wm-chart-bar or wm-chart-column
|
|
39
|
+
elements this legend serves. The legend derives its color swatches and labels from these
|
|
40
|
+
charts automatically. _(required; default: `""`)_
|
|
41
|
+
- `orientation` -- Layout orientation of legend items. _(type: `"horizontal" | "vertical"`; default: `"horizontal"`)_
|
|
42
|
+
- `print-mode` -- When true, the print value for each item is shown next to its swatch in the
|
|
43
|
+
legend -- suitable for printed output. _(default: `false`)_
|
|
44
|
+
|
|
45
|
+
**Events:**
|
|
46
|
+
- `wmLegendItemClick` -- Fires when the user clicks a legend item. The associated chart highlights
|
|
47
|
+
the corresponding bar(s) and fades all others. Detail: `{{ idx: number }} idx -- zero-based index of the clicked legend item, or
|
|
48
|
+
`-1` to clear all highlights.`
|
|
49
|
+
- `wmLegendItemHover` -- Fires when the user hovers over a legend item. The associated chart
|
|
50
|
+
highlights the corresponding bar(s) and fades all others. Detail: `{{ idx: number }} idx -- zero-based index of the hovered legend item, or
|
|
51
|
+
`-1` to clear all highlights.`
|
|
52
|
+
|
|
53
|
+
**Related components:**
|
|
54
|
+
|
|
55
|
+
- `<wm-chart-bar>` / `<wm-chart-column>` -- the charts this legend serves, paired via `chart-ids`.
|
|
56
|
+
|
|
57
|
+
**Code example:**
|
|
58
|
+
|
|
59
|
+
_Shared legend for two charts_
|
|
60
|
+
|
|
61
|
+
```html
|
|
62
|
+
<wm-chart-legend chart-ids="chart-a chart-b"></wm-chart-legend>
|
|
63
|
+
<wm-chart-bar id="chart-a"></wm-chart-bar>
|
|
64
|
+
<wm-chart-bar id="chart-b"></wm-chart-bar>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
_Shared legend for two charts_
|
|
68
|
+
|
|
69
|
+
```react
|
|
70
|
+
const [activeIdx, setActiveIdx] = useState(null);
|
|
71
|
+
|
|
72
|
+
const handleClick = (event) => {
|
|
73
|
+
setActiveIdx(event.detail.idx);
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
<WmChartLegend chartIds="chart-a chart-b" onWmLegendItemClick={handleClick} />
|
|
77
|
+
<WmChartBar id="chart-a" />
|
|
78
|
+
<WmChartBar id="chart-b" />
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
_Vertical orientation_
|
|
82
|
+
|
|
83
|
+
```html
|
|
84
|
+
<wm-chart-legend chart-ids="my-chart" orientation="vertical"></wm-chart-legend>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
_Vertical orientation_
|
|
88
|
+
|
|
89
|
+
```react
|
|
90
|
+
<WmChartLegend chartIds="my-chart" orientation="vertical" />
|
|
91
|
+
```
|