@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,101 @@
|
|
|
1
|
+
### Chart Slice
|
|
2
|
+
- **Element:** `<wm-chart-slice>`
|
|
3
|
+
|
|
4
|
+
**Purpose:** Data slice for a wm-chart composition chart. Each slice represents one segment of the whole.
|
|
5
|
+
Always used as a direct child of wm-chart.
|
|
6
|
+
|
|
7
|
+
**When to use:**
|
|
8
|
+
|
|
9
|
+
- **Showing a single composition as a doughnut** -- when the data points are segments of a single total (they sum to 100%), the goal is to communicate that breakdown rather than compare independent values, and the layout needs to be compact/circular, or where a doughnut is the established pattern for that context -- a design decision, not inferable from the data. For most single- or multi-group compositions, prefer `wm-chart-stack` instead -- it reads faster and covers both cases; this component's own bar subtypes (`bar2`-`bar5`) are legacy (see note below).
|
|
10
|
+
- **Qualitative status or proficiency breakdowns, shown as a doughnut** -- when the segments represent qualitative states (e.g., Not Started / In Progress / Met / Not Met, or a proficiency scale from Exceeded to Not Met) and a doughnut fits the context, pick the doughnut subtype whose capacity matches the number of states (see Variants / Types).
|
|
11
|
+
- **A limited set of categories** -- each subtype has a fixed palette sized for a small number of segments; keep the number of slices within the subtype's palette size so colors stay distinct.
|
|
12
|
+
|
|
13
|
+
**Do not use for:**
|
|
14
|
+
|
|
15
|
+
- **General comparison of independent values across categories** -- prefer the dedicated `wm-chart-bar` or `wm-chart-column`, the recommended data-driven comparison components. (The simple-bar subtypes `bar6`/`bar7` can compare discrete categories, but the stacked `bar2`-`bar5` subtypes are composition patterns, not general-purpose bar charts.)
|
|
16
|
+
- **Frequency distribution across numeric ranges (histograms)** -- use `wm-chart-column`.
|
|
17
|
+
- **Data changing over time (trends)** -- use `wm-line-chart`.
|
|
18
|
+
- **Binary completion tracking (exactly two states, done vs. not done)** -- use `wm-progress-monitor`.
|
|
19
|
+
- **Any composition that would read better as a bar, single-group or multi-group** -- prefer `wm-chart-stack` as the default; it's the only composition component with a grouped/multi-group layout, and reads faster than a doughnut even for a single group. Use this component's doughnut only for the compact/circular or established-pattern exception (see When to Use).
|
|
20
|
+
|
|
21
|
+
**Variants / types:**
|
|
22
|
+
|
|
23
|
+
The subtype is set with the `chart-type` prop (default `doughnut1`). Colors are assigned automatically by the subtype from a fixed palette -- the application does not choose per-slice colors on this component.
|
|
24
|
+
|
|
25
|
+
**Doughnut subtypes**
|
|
26
|
+
|
|
27
|
+
- **`doughnut1`** (default) -- simple part-to-whole with up to three segments.
|
|
28
|
+
- **`doughnut2`** -- qualitative multi-state composition that can include a neutral / "not started" state (e.g., Met / Not Met / Not started); palette supports up to five segments.
|
|
29
|
+
- **`doughnut3`** -- nominal categories with no inherent qualitative meaning; palette supports up to seven segments.
|
|
30
|
+
|
|
31
|
+
**Stacked bar subtypes** (composition -- segments of a single total)
|
|
32
|
+
|
|
33
|
+
- **`bar2`** -- qualitative outcome breakdown across several states (e.g., Not Started / In Progress / Met / Not Met); palette supports up to six segments.
|
|
34
|
+
- **`bar3`** -- a performance or proficiency scale (e.g., Exceeded / Met / Approached / Not Met); also used for a two-state Met / Not Met split. Supports two to four segments.
|
|
35
|
+
- **`bar4`** -- three-state completion (Not started / In Progress / Completed).
|
|
36
|
+
- **`bar5`** -- many nominal categories (up to seven); set `not-started-color` to render a leading gray "not started" segment.
|
|
37
|
+
|
|
38
|
+
**Simple bar subtypes** (non-stacked -- compare values across categories)
|
|
39
|
+
|
|
40
|
+
- **`bar6`** -- a single-color simple bar chart for comparing discrete categorical values (not a part-to-whole); supports `show-grid` and `label-width`.
|
|
41
|
+
- **`bar7`** -- a multi-color simple bar chart for comparing discrete categorical values, with an optional y-axis bar legend (`show-bar-legend`).
|
|
42
|
+
|
|
43
|
+
> For new work, prefer the dedicated `wm-chart-bar` and `wm-chart-column` components for comparing categorical values. They are the recommended, data-driven comparison charts and effectively supersede the `bar6`/`bar7` simple-bar subtypes, which predate them. For new work needing a bar-shaped composition -- single-group or multi-group -- prefer the dedicated `wm-chart-stack`. It is the recommended, data-driven composition chart and supersedes the `bar2`/`bar3`/`bar4`/`bar5` stacked bar subtypes, which predate it. This component's doughnut subtypes remain the recommended path only when a doughnut is specifically wanted.
|
|
44
|
+
|
|
45
|
+
> The precise design intent for each subtype is owned by the design system team; the scenarios above reflect each subtype's canonical usage as exercised by the component's own visual tests. Confirm with the design team before repurposing a subtype for a new scenario.
|
|
46
|
+
|
|
47
|
+
**Usage notes:**
|
|
48
|
+
|
|
49
|
+
- A `legend` is required unless `amount` is `0` or omitted -- the component throws if a
|
|
50
|
+
non-zero amount is provided without a legend.
|
|
51
|
+
- Slices without an `amount` are not rendered but still occupy a color slot, preserving
|
|
52
|
+
consistent color assignment when some data points are conditionally absent.
|
|
53
|
+
- Use `popover-title`, `popover-text`, and `popover-button-text` to surface additional
|
|
54
|
+
context when a segment is focused or clicked.
|
|
55
|
+
|
|
56
|
+
**Props:**
|
|
57
|
+
- `amount` -- Numeric value for this slice as a string. Slices with no amount (or `0`) are
|
|
58
|
+
not rendered but still occupy a color slot.
|
|
59
|
+
- `legend` -- Label for this slice in the legend and popovers. Required when `amount` is
|
|
60
|
+
greater than zero. _(required)_
|
|
61
|
+
- `popover-button-text` -- Label for the action button in the data popover. When set, the popover
|
|
62
|
+
renders a button and fires `wmChartPopoverButtonTriggered` when clicked.
|
|
63
|
+
- `popover-text` -- Body text shown in the data popover when this segment is focused or clicked.
|
|
64
|
+
- `popover-title` -- Title text shown in the data popover when this segment is focused or clicked.
|
|
65
|
+
|
|
66
|
+
**Related components:**
|
|
67
|
+
|
|
68
|
+
- `<wm-chart-slice>` -- required child; one per segment of the whole.
|
|
69
|
+
- `<wm-chart-bar>` / `<wm-chart-column>` -- for comparing independent values across categories rather than showing composition.
|
|
70
|
+
- `<wm-chart-stack>` -- the default composition component for both single-group and multi-group part-to-whole breakdowns shown as a bar; use this component (doughnut) only for the compact/circular or established-pattern exception.
|
|
71
|
+
- `<wm-progress-monitor>` -- for binary (two-state) completion tracking.
|
|
72
|
+
|
|
73
|
+
**Code example:**
|
|
74
|
+
|
|
75
|
+
_Basic slice_
|
|
76
|
+
|
|
77
|
+
```html
|
|
78
|
+
<wm-chart-slice legend="Enrolled" amount="310"></wm-chart-slice>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
_Basic slice_
|
|
82
|
+
|
|
83
|
+
```react
|
|
84
|
+
<WmChartSlice legend="Enrolled" amount="310" />
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
_Slice with popover_
|
|
88
|
+
|
|
89
|
+
```html
|
|
90
|
+
<wm-chart-slice legend="At risk" amount="45"
|
|
91
|
+
popover-title="45 students" popover-text="Flagged for early intervention"
|
|
92
|
+
popover-button-text="View students"></wm-chart-slice>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
_Slice with popover_
|
|
96
|
+
|
|
97
|
+
```react
|
|
98
|
+
<WmChartSlice legend="At risk" amount="45"
|
|
99
|
+
popoverTitle="45 students" popoverText="Flagged for early intervention"
|
|
100
|
+
popoverButtonText="View students" />
|
|
101
|
+
```
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
### Chart Stack
|
|
2
|
+
- **Element:** `<wm-chart-stack>`
|
|
3
|
+
|
|
4
|
+
**Purpose:** Renders a horizontal stacked bar chart: each stack's segments are sized as a percentage of
|
|
5
|
+
that stack's total. Supports any number of stacks and segments, each occupying their own row.
|
|
6
|
+
Data and configuration are set via JavaScript properties (`chart.config` and `chart.data`) -- not
|
|
7
|
+
HTML attributes.
|
|
8
|
+
|
|
9
|
+
**When to use:**
|
|
10
|
+
|
|
11
|
+
- **Any part-to-whole composition -- single-group or multi-group (default choice)**, except binary completion tracking (see Do Not Use For) -- a single stack renders without a stack label; multiple stacks (via distinct `stackName` values) each render as their own labeled row. Prefer this over `wm-chart` doughnut in both cases -- a bar reads faster than a doughnut for most viewers.
|
|
12
|
+
- **Comparing composition across multiple groups** -- when several groups each have their own part-to-whole breakdown and the goal is to compare those breakdowns side by side (each row normalized to 100%). This is the only composition component with a grouped layout; `wm-chart` doughnut has no multi-group variant.
|
|
13
|
+
- **Keeping a category's color consistent across stacks** -- segment color follows the order each `legend` first appears in the data, so a legend keeps the same color across every stack.
|
|
14
|
+
|
|
15
|
+
**Do not use for:**
|
|
16
|
+
|
|
17
|
+
- **Comparing absolute values across categories** -- use `wm-chart-bar` or `wm-chart-column`; stack segments show percentages of each stack's total, not absolute magnitudes.
|
|
18
|
+
- **A single composition that must fit a compact, circular footprint, or where a doughnut is the established pattern for that context** -- a design decision, not inferable from the data -- use `wm-chart` doughnut instead. This is the only case where a single-group composition should skip this component.
|
|
19
|
+
- **Data changing over time (trends)** -- use `wm-line-chart`.
|
|
20
|
+
- **Binary completion tracking** -- use `wm-progress-monitor`.
|
|
21
|
+
|
|
22
|
+
**Variants / types:**
|
|
23
|
+
|
|
24
|
+
- **Single-stack** -- one distinct `stackName`; renders without a stack label.
|
|
25
|
+
- **Grouped (multi-stack)** -- multiple distinct `stackName` values; each renders as its own labeled row.
|
|
26
|
+
- **Discrete palette** (`colors: "discrete"`, default) -- gives each segment (legend) its own visually distinct color. Use when the segments are nominal parts with no inherent good/bad meaning and color is only there to tell them apart. Limited to 7 segments based on the discrete color palette.
|
|
27
|
+
- **Semantic palette** (`colors: "semantic"`) -- maps color to meaning rather than to identity. Use when the segments carry positive / negative / status meaning (e.g., a proficiency scale, or Met vs. Not Met) and the color should reinforce that meaning. Avoid it for merely nominal segments. Limited to 8 segments based on the semantic color palette.
|
|
28
|
+
- **Print mode** -- shortens the bars, enlarges percentage labels, hides the interactive legend, and renders a data table per stack.
|
|
29
|
+
|
|
30
|
+
**Usage notes:**
|
|
31
|
+
|
|
32
|
+
- Segments are grouped into stacks by each segment's `stackName`; one distinct `stackName` renders
|
|
33
|
+
the single-stack layout (no stack label), multiple render the grouped variant.
|
|
34
|
+
- Color follows the order each `legend` first appears in `data`, so a legend keeps a consistent
|
|
35
|
+
color across stacks. A per-segment `color` overrides the palette; legends beyond the palette
|
|
36
|
+
fall back to the default color.
|
|
37
|
+
- Set `id` on the element to pair it with an external `wm-chart-legend` via `chart-ids`.
|
|
38
|
+
- Print mode (`printMode` prop, `config.printMode`, or an active browser print) shortens the bars,
|
|
39
|
+
enlarges the percentage labels, hides the interactive legend, and renders a data table per stack.
|
|
40
|
+
|
|
41
|
+
**Props:**
|
|
42
|
+
- `config` -- Chart configuration object. Set via JavaScript property -- not an HTML attribute.
|
|
43
|
+
Fields:
|
|
44
|
+
- `label` (string, required): the chart's title, also used as its `aria-label`.
|
|
45
|
+
- `subinfo` (string): secondary text shown beneath the label.
|
|
46
|
+
- `colors` (`"discrete"` | `"semantic"`, default `"discrete"`): palette for the segments.
|
|
47
|
+
`"semantic"` maps to the meaning-based palette (gray/purples/teals/coral).
|
|
48
|
+
- `showLabel` (boolean, default `true`): whether the chart label and subinfo are rendered.
|
|
49
|
+
- `showLegend` (`"left"` | `"right"` | `"top"` | `"bottom"` | `"none"`, default `"none"`):
|
|
50
|
+
placement of the interactive legend (hidden in print, where the data table replaces it).
|
|
51
|
+
- `showGrid` (boolean, default `false`): renders a `0%`-`100%` axis and a vertical baseline.
|
|
52
|
+
- `valueFormat` (`"percentage"` | `"none"`, default `"percentage"`): whether each segment shows
|
|
53
|
+
its percentage label above the bar.
|
|
54
|
+
- `printMode` / `patternMode` (boolean, default `false`): same as the props of the same name;
|
|
55
|
+
the props take precedence when both are set.
|
|
56
|
+
- `popoverTitle` / `popoverText` / `popoverButtonText` (string): default popover content applied
|
|
57
|
+
to every segment, each overridable per-segment in `data`. When unset, the popover title
|
|
58
|
+
defaults to `amount/total`, the text to the segment's legend, and no button is shown. _(type: `undefined | { label: string; subinfo?: string; popoverTitle?: string; popoverText?: string; popoverButtonText?: string; colors?: "discrete" | "semantic"; showLabel?: boolean; showLegend?: "top" | "bottom" | "left" | "right" | "none"; showGrid?: boolean; valueFormat?: "percentage" | "none"; printMode?: boolean; patternMode?: boolean; }`)_
|
|
59
|
+
- `data` -- Array of segments to render. Set via JavaScript property -- not an HTML attribute.
|
|
60
|
+
Each segment's fields:
|
|
61
|
+
- `stackName` (string, required): groups segments into the same stack (row); the set of distinct
|
|
62
|
+
stackNames determines whether the single or grouped layout is used.
|
|
63
|
+
- `legend` (string, required): the segment's category, shown in the legend and used to assign a
|
|
64
|
+
consistent color across stacks.
|
|
65
|
+
- `amount` (number, required): the raw value; the segment's width is `amount / stackTotal`.
|
|
66
|
+
- `color` (string): a `wmcolor` token overriding the palette color for this segment.
|
|
67
|
+
- `popoverTitle` / `popoverText` / `popoverButtonText` (string): popover content for this segment,
|
|
68
|
+
overriding the corresponding `config` defaults. _(type: `StackSegmentData[]`)_
|
|
69
|
+
- `pattern-mode` -- When true, applies a hatching pattern fill to segments and enlarges the legend
|
|
70
|
+
tiles, in addition to color -- improving distinguishability for users with color vision
|
|
71
|
+
deficiencies. Takes precedence over `config.patternMode`.
|
|
72
|
+
- `print-mode` -- When true, renders the print layout: shorter bars, larger bold percentage labels,
|
|
73
|
+
and a data table beneath each stack (legend, percentage, amount/total, popover text) in place of
|
|
74
|
+
the interactive legend. Also activated automatically while the browser is printing. Takes
|
|
75
|
+
precedence over `config.printMode`.
|
|
76
|
+
- `subinfo` -- Optional secondary text displayed beneath the chart label. Takes precedence over
|
|
77
|
+
`config.subinfo`.
|
|
78
|
+
|
|
79
|
+
**Accessibility:**
|
|
80
|
+
|
|
81
|
+
- `config.label` is required -- used as the chart's `aria-label`.
|
|
82
|
+
- The chart renders with `role="application"` and `aria-roledescription="Interactive chart"`.
|
|
83
|
+
- When a percentage label is hidden for lack of space, a "click a segment to see values" hint is
|
|
84
|
+
shown; it is removed when printing, where clicking isn't available and the data table lists
|
|
85
|
+
every value.
|
|
86
|
+
- **Keyboard:**
|
|
87
|
+
- **Tab**: Enters the chart wrapper.
|
|
88
|
+
- **Arrow Down / Right**: Focuses the first segment.
|
|
89
|
+
- **Arrow Left / Right**: Moves to the previous / next segment within the stack, wrapping at the ends.
|
|
90
|
+
- **Arrow Up / Down**: Moves to the previous / next stack (focusing its first segment), wrapping at the ends.
|
|
91
|
+
- **Enter**: Activates the popover button when the popover is open.
|
|
92
|
+
- **Escape**: Closes the open popover.
|
|
93
|
+
- **Tab** (from within): Exits the chart and clears focus.
|
|
94
|
+
|
|
95
|
+
**Related components:**
|
|
96
|
+
|
|
97
|
+
- `<wm-chart>` -- for a single composition shown as a doughnut.
|
|
98
|
+
- `<wm-chart-bar>` / `<wm-chart-column>` -- for comparing absolute values rather than normalized composition.
|
|
99
|
+
- `<wm-chart-legend>` -- external/shared legend paired via `chart-ids`.
|
|
100
|
+
|
|
101
|
+
**Code example:**
|
|
102
|
+
|
|
103
|
+
_Single stack_
|
|
104
|
+
|
|
105
|
+
```html
|
|
106
|
+
<wm-chart-stack id="submission-status"></wm-chart-stack>
|
|
107
|
+
<script>
|
|
108
|
+
const chart = document.querySelector('#submission-status');
|
|
109
|
+
chart.config = { label: 'Submission status', colors: 'semantic', showLegend: 'top' };
|
|
110
|
+
chart.data = [
|
|
111
|
+
{ stackName: 'Status', legend: 'Not Submitted', amount: 2 },
|
|
112
|
+
{ stackName: 'Status', legend: 'Awaiting Review', amount: 4 },
|
|
113
|
+
{ stackName: 'Status', legend: 'Met', amount: 10 },
|
|
114
|
+
{ stackName: 'Status', legend: 'Not Met', amount: 4 },
|
|
115
|
+
];
|
|
116
|
+
</script>
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
_Single stack_
|
|
120
|
+
|
|
121
|
+
```react
|
|
122
|
+
<WmChartStack ref={chartRef} />
|
|
123
|
+
// In useEffect: chartRef.current.config = {...}; chartRef.current.data = [...];
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
_Grouped (multiple stacks)_
|
|
127
|
+
|
|
128
|
+
```html
|
|
129
|
+
<wm-chart-stack id="status-by-requirement"></wm-chart-stack>
|
|
130
|
+
<script>
|
|
131
|
+
const chart = document.querySelector('#status-by-requirement');
|
|
132
|
+
chart.config = { label: 'Status by requirement', colors: 'semantic', showLegend: 'top' };
|
|
133
|
+
chart.data = [
|
|
134
|
+
{ stackName: 'Requirement 01', legend: 'Met', amount: 12 },
|
|
135
|
+
{ stackName: 'Requirement 01', legend: 'Not Met', amount: 12 },
|
|
136
|
+
{ stackName: 'Requirement 02', legend: 'Met', amount: 33 },
|
|
137
|
+
{ stackName: 'Requirement 02', legend: 'Not Met', amount: 67 },
|
|
138
|
+
];
|
|
139
|
+
</script>
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
_Grouped (multiple stacks)_
|
|
143
|
+
|
|
144
|
+
```react
|
|
145
|
+
<WmChartStack ref={chartRef} />
|
|
146
|
+
// In useEffect: chartRef.current.config = {...}; chartRef.current.data = [...];
|
|
147
|
+
```
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
### Chart
|
|
2
|
+
- **Element:** `<wm-chart>`
|
|
3
|
+
|
|
4
|
+
**Purpose:** Composition chart component rendering doughnut or stacked bar charts. Composed of a parent
|
|
5
|
+
wm-chart element and wm-chart-slice children. Has 3 doughnut subtypes and 5 bar subtypes,
|
|
6
|
+
each designed for a specific composition use case.
|
|
7
|
+
|
|
8
|
+
**Important:** The bar subtypes (`bar2`-`bar7`) are COMPOSITION patterns -- they show parts
|
|
9
|
+
of a whole for specific qualitative use cases. They are NOT general-purpose bar charts. For
|
|
10
|
+
general comparison or distribution bar charts, use wm-chart-bar or wm-chart-column instead.
|
|
11
|
+
|
|
12
|
+
**When to use:**
|
|
13
|
+
|
|
14
|
+
- **Showing a single composition as a doughnut** -- when the data points are segments of a single total (they sum to 100%), the goal is to communicate that breakdown rather than compare independent values, and the layout needs to be compact/circular, or where a doughnut is the established pattern for that context -- a design decision, not inferable from the data. For most single- or multi-group compositions, prefer `wm-chart-stack` instead -- it reads faster and covers both cases; this component's own bar subtypes (`bar2`-`bar5`) are legacy (see note below).
|
|
15
|
+
- **Qualitative status or proficiency breakdowns, shown as a doughnut** -- when the segments represent qualitative states (e.g., Not Started / In Progress / Met / Not Met, or a proficiency scale from Exceeded to Not Met) and a doughnut fits the context, pick the doughnut subtype whose capacity matches the number of states (see Variants / Types).
|
|
16
|
+
- **A limited set of categories** -- each subtype has a fixed palette sized for a small number of segments; keep the number of slices within the subtype's palette size so colors stay distinct.
|
|
17
|
+
|
|
18
|
+
**Do not use for:**
|
|
19
|
+
|
|
20
|
+
- **General comparison of independent values across categories** -- prefer the dedicated `wm-chart-bar` or `wm-chart-column`, the recommended data-driven comparison components. (The simple-bar subtypes `bar6`/`bar7` can compare discrete categories, but the stacked `bar2`-`bar5` subtypes are composition patterns, not general-purpose bar charts.)
|
|
21
|
+
- **Frequency distribution across numeric ranges (histograms)** -- use `wm-chart-column`.
|
|
22
|
+
- **Data changing over time (trends)** -- use `wm-line-chart`.
|
|
23
|
+
- **Binary completion tracking (exactly two states, done vs. not done)** -- use `wm-progress-monitor`.
|
|
24
|
+
- **Any composition that would read better as a bar, single-group or multi-group** -- prefer `wm-chart-stack` as the default; it's the only composition component with a grouped/multi-group layout, and reads faster than a doughnut even for a single group. Use this component's doughnut only for the compact/circular or established-pattern exception (see When to Use).
|
|
25
|
+
|
|
26
|
+
**Variants / types:**
|
|
27
|
+
|
|
28
|
+
The subtype is set with the `chart-type` prop (default `doughnut1`). Colors are assigned automatically by the subtype from a fixed palette -- the application does not choose per-slice colors on this component.
|
|
29
|
+
|
|
30
|
+
**Doughnut subtypes**
|
|
31
|
+
|
|
32
|
+
- **`doughnut1`** (default) -- simple part-to-whole with up to three segments.
|
|
33
|
+
- **`doughnut2`** -- qualitative multi-state composition that can include a neutral / "not started" state (e.g., Met / Not Met / Not started); palette supports up to five segments.
|
|
34
|
+
- **`doughnut3`** -- nominal categories with no inherent qualitative meaning; palette supports up to seven segments.
|
|
35
|
+
|
|
36
|
+
**Stacked bar subtypes** (composition -- segments of a single total)
|
|
37
|
+
|
|
38
|
+
- **`bar2`** -- qualitative outcome breakdown across several states (e.g., Not Started / In Progress / Met / Not Met); palette supports up to six segments.
|
|
39
|
+
- **`bar3`** -- a performance or proficiency scale (e.g., Exceeded / Met / Approached / Not Met); also used for a two-state Met / Not Met split. Supports two to four segments.
|
|
40
|
+
- **`bar4`** -- three-state completion (Not started / In Progress / Completed).
|
|
41
|
+
- **`bar5`** -- many nominal categories (up to seven); set `not-started-color` to render a leading gray "not started" segment.
|
|
42
|
+
|
|
43
|
+
**Simple bar subtypes** (non-stacked -- compare values across categories)
|
|
44
|
+
|
|
45
|
+
- **`bar6`** -- a single-color simple bar chart for comparing discrete categorical values (not a part-to-whole); supports `show-grid` and `label-width`.
|
|
46
|
+
- **`bar7`** -- a multi-color simple bar chart for comparing discrete categorical values, with an optional y-axis bar legend (`show-bar-legend`).
|
|
47
|
+
|
|
48
|
+
> For new work, prefer the dedicated `wm-chart-bar` and `wm-chart-column` components for comparing categorical values. They are the recommended, data-driven comparison charts and effectively supersede the `bar6`/`bar7` simple-bar subtypes, which predate them. For new work needing a bar-shaped composition -- single-group or multi-group -- prefer the dedicated `wm-chart-stack`. It is the recommended, data-driven composition chart and supersedes the `bar2`/`bar3`/`bar4`/`bar5` stacked bar subtypes, which predate it. This component's doughnut subtypes remain the recommended path only when a doughnut is specifically wanted.
|
|
49
|
+
|
|
50
|
+
> The precise design intent for each subtype is owned by the design system team; the scenarios above reflect each subtype's canonical usage as exercised by the component's own visual tests. Confirm with the design team before repurposing a subtype for a new scenario.
|
|
51
|
+
|
|
52
|
+
**Usage notes:**
|
|
53
|
+
|
|
54
|
+
- Slices without an `amount` are not rendered but still occupy a color slot, allowing
|
|
55
|
+
consistent color assignment when some data points are missing.
|
|
56
|
+
- The `show-legend` prop controls legend visibility but the legend is always read by screen
|
|
57
|
+
readers regardless of visibility.
|
|
58
|
+
- For data-driven bar charts (comparison, distribution), prefer wm-chart-bar or
|
|
59
|
+
wm-chart-column.
|
|
60
|
+
|
|
61
|
+
**Props:**
|
|
62
|
+
- `chart-type` -- Chart subtype. Doughnut subtypes (`doughnut1`-`doughnut3`) and bar composition
|
|
63
|
+
subtypes (`bar2`-`bar7`) -- each tailored to a specific composition use case. _(type: `"bar" | "bar2" | "bar3" | "bar4" | "bar5" | "bar6" | "bar7" | "doughnut" | "doughnut1" | "doughnut2" | "doughnut3"`; default: `"doughnut1"`)_
|
|
64
|
+
- `label` -- Accessible label for the chart. Required -- the component throws an error if
|
|
65
|
+
omitted. Used as the `aria-label` on the chart container and as the visual chart label. _(required)_
|
|
66
|
+
- `label-position` -- Position of the chart label relative to the chart. When `"none"`, no label is
|
|
67
|
+
rendered -- an external label matching `label` must be visually grouped with the chart. _(type: `"left" | "none" | "top"`; default: `"top"`)_
|
|
68
|
+
- `label-width` -- Controls the bar label width. Only applies to `bar6` and `bar7` subtypes. _(default: `"150px"`)_
|
|
69
|
+
- `not-started-color` -- When true, applies a gray color to the first slice to represent a
|
|
70
|
+
"not started" state. Only applies to `bar5`. _(default: `false`)_
|
|
71
|
+
- `print-mode` -- When true, slice values are included in the legend and keyboard interaction
|
|
72
|
+
instructions are removed from the DOM -- suitable for printed output. _(default: `false`)_
|
|
73
|
+
- `print-mode-format` -- Format for legend values when `print-mode` is enabled. _(type: `"amount" | "percentage"`; default: `"amount"`)_
|
|
74
|
+
- `show-bar-legend` -- Show or hide the y-axis bar legend. Only applies to `bar7`. _(default: `false`)_
|
|
75
|
+
- `show-grid` -- Show or hide the value grid lines. Only applies to `bar6`. _(default: `true`)_
|
|
76
|
+
- `show-legend` -- Show or hide the legend below the chart. The legend is still read by screen
|
|
77
|
+
readers regardless of this setting. _(default: `true`)_
|
|
78
|
+
- `subinfo` -- Optional secondary text displayed beneath the chart label. Not shown when
|
|
79
|
+
`label-position` is `"none"`.
|
|
80
|
+
- `value-format` -- Controls how individual segment values are displayed on the chart. _(type: `"amount" | "none" | "percentage"`; default: `"none"`)_
|
|
81
|
+
|
|
82
|
+
**Accessibility:**
|
|
83
|
+
|
|
84
|
+
- `label` is required for accessibility -- the chart throws if omitted.
|
|
85
|
+
- The chart renders with `role="application"` and an `aria-roledescription` of
|
|
86
|
+
"Interactive chart". Each segment is individually focusable with an `aria-label`.
|
|
87
|
+
- `print-mode` removes keyboard interaction instructions for printed output.
|
|
88
|
+
- **Keyboard:**
|
|
89
|
+
- **Tab**: Enters the chart. Subsequent Tab exits the chart.
|
|
90
|
+
- **Arrow keys**: Navigate between slices/segments.
|
|
91
|
+
- **Enter / Space**: Opens the data popover for the focused segment.
|
|
92
|
+
- **Escape**: Closes the popover and returns to the chart container.
|
|
93
|
+
|
|
94
|
+
**Related components:**
|
|
95
|
+
|
|
96
|
+
- `<wm-chart-slice>` -- required child; one per segment of the whole.
|
|
97
|
+
- `<wm-chart-bar>` / `<wm-chart-column>` -- for comparing independent values across categories rather than showing composition.
|
|
98
|
+
- `<wm-chart-stack>` -- the default composition component for both single-group and multi-group part-to-whole breakdowns shown as a bar; use this component (doughnut) only for the compact/circular or established-pattern exception.
|
|
99
|
+
- `<wm-progress-monitor>` -- for binary (two-state) completion tracking.
|
|
100
|
+
|
|
101
|
+
**Code example:**
|
|
102
|
+
|
|
103
|
+
_Doughnut chart_
|
|
104
|
+
|
|
105
|
+
```html
|
|
106
|
+
<wm-chart label="Enrollment by status">
|
|
107
|
+
<wm-chart-slice legend="Enrolled" amount="310"></wm-chart-slice>
|
|
108
|
+
<wm-chart-slice legend="Not enrolled" amount="90"></wm-chart-slice>
|
|
109
|
+
</wm-chart>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
_Doughnut chart_
|
|
113
|
+
|
|
114
|
+
```react
|
|
115
|
+
<WmChart label="Enrollment by status">
|
|
116
|
+
<WmChartSlice legend="Enrolled" amount="310" />
|
|
117
|
+
<WmChartSlice legend="Not enrolled" amount="90" />
|
|
118
|
+
</WmChart>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
_Bar composition chart_
|
|
122
|
+
|
|
123
|
+
```html
|
|
124
|
+
<wm-chart label="Completion by cohort" chart-type="bar5">
|
|
125
|
+
<wm-chart-slice legend="Completed" amount="200"></wm-chart-slice>
|
|
126
|
+
<wm-chart-slice legend="In progress" amount="75"></wm-chart-slice>
|
|
127
|
+
<wm-chart-slice legend="Not started" amount="25"></wm-chart-slice>
|
|
128
|
+
</wm-chart>
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
_Bar composition chart_
|
|
132
|
+
|
|
133
|
+
```react
|
|
134
|
+
<WmChart label="Completion by cohort" chartType="bar5">
|
|
135
|
+
<WmChartSlice legend="Completed" amount="200" />
|
|
136
|
+
<WmChartSlice legend="In progress" amount="75" />
|
|
137
|
+
<WmChartSlice legend="Not started" amount="25" />
|
|
138
|
+
</WmChart>
|
|
139
|
+
```
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
### Date Range
|
|
2
|
+
- **Element:** `<wm-date-range>`
|
|
3
|
+
|
|
4
|
+
**Purpose:** Two linked date inputs (start and end) with a shared calendar popup for selecting a date
|
|
5
|
+
range. Users can type or click to set each date. Provides separate error states for start
|
|
6
|
+
and end, and emits distinct blur events for each input. Use instead of two native
|
|
7
|
+
`<input type="date">` elements when a range is required.
|
|
8
|
+
|
|
9
|
+
**When to use:**
|
|
10
|
+
|
|
11
|
+
- **Collecting a bounded time period with a start and end** -- when a user needs to define a window of time (a reporting period, an enrollment window, a project timeline), use Date Range to capture both boundary dates as a single, semantically linked input rather than two independent Datepickers.
|
|
12
|
+
- **Filtering data by a date range** -- when a user is narrowing results by a time window (e.g., "show records between these two dates"), Date Range provides the right interaction model with a shared calendar that highlights the selected span visually.
|
|
13
|
+
- **Enforcing range integrity at the form level** -- when the application needs to validate that the start date precedes the end date, Date Range exposes the right blur events and standardized error messages to handle all range validation scenarios consistently.
|
|
14
|
+
- **Allowing range selection via a shared calendar popup** -- when users benefit from seeing both dates in context on a calendar, Date Range's shared popup highlights the full selected range, which two independent Datepickers cannot do.
|
|
15
|
+
|
|
16
|
+
**Do not use for:**
|
|
17
|
+
|
|
18
|
+
- **Two separate dates that happen to be related** -- if the two dates are logically a range, use Date Range; two independent Datepickers have no shared calendar, no range highlighting, and no built-in mechanism to enforce that start precedes end.
|
|
19
|
+
- **Selecting a single point in time** -- if the user is selecting one date rather than a span, use wm-datepicker; Date Range always manages two values and two validation states, which is unnecessary overhead for a single date.
|
|
20
|
+
|
|
21
|
+
**Variants / types:**
|
|
22
|
+
|
|
23
|
+
_None documented_
|
|
24
|
+
|
|
25
|
+
**Usage notes:**
|
|
26
|
+
|
|
27
|
+
- Set `value-start` and `value-end` in the format specified by `date-format` (default
|
|
28
|
+
`mm/dd/yyyy`). For programmatic pre-population, prefer ISO format via `preselected` and
|
|
29
|
+
convert with the `reformatDate` method.
|
|
30
|
+
- `wmRangeSelection` emits a detail object with `startDate` and `endDate`, each in ISO, US,
|
|
31
|
+
and INT formats.
|
|
32
|
+
- The same-date re-selection rule: clicking the same date as `date1` a second time resets the
|
|
33
|
+
range selection so the user can pick a new `date1`.
|
|
34
|
+
|
|
35
|
+
**Props:**
|
|
36
|
+
- `date-format` -- The date format shown in the input placeholders and announced to screen readers. _(default: `"mm/dd/yyyy"`)_
|
|
37
|
+
- `disabled` -- Disables the entire date range component, preventing all interaction. _(default: `false`)_
|
|
38
|
+
- `error-message` -- Puts the component in an error state and displays this message below both
|
|
39
|
+
inputs. Use with `invalid-start` and/or `invalid-end` to highlight specific fields.
|
|
40
|
+
- `invalid-end` -- Puts the end date input in an error state (red border). Use with
|
|
41
|
+
`error-message`. _(default: `false`)_
|
|
42
|
+
- `invalid-start` -- Puts the start date input in an error state (red border). Use with
|
|
43
|
+
`error-message`. _(default: `false`)_
|
|
44
|
+
- `label-end` -- Visible label for the end date input. Required for accessibility. _(required; default: `""`)_
|
|
45
|
+
- `label-start` -- Visible label for the start date input. Required for accessibility. _(required; default: `""`)_
|
|
46
|
+
- `preselected` -- The ISO date (YYYY-MM-DD) the calendar popup opens to when first opened and
|
|
47
|
+
no `value-start` is set. Falls back to today's date if omitted.
|
|
48
|
+
- `required-field` -- Displays a required-field asterisk (*) next to each label. _(default: `false`)_
|
|
49
|
+
- `value-end` -- The value of the end date input, in the format specified by `date-format`.
|
|
50
|
+
Updated as the user types or picks from the calendar. _(default: `""`)_
|
|
51
|
+
- `value-start` -- The value of the start date input, in the format specified by `date-format`.
|
|
52
|
+
Updated as the user types or picks from the calendar. _(default: `""`)_
|
|
53
|
+
|
|
54
|
+
**Events:**
|
|
55
|
+
- `wmEndInputBlur` -- Fires when the end date input loses focus.
|
|
56
|
+
- `wmRangeSelection` -- Fires when the user completes a range selection from the calendar popup. Detail: `{{ startDate: { iso: string, us: string, int: string }, endDate: { iso: string, us: string, int: string } }}
|
|
57
|
+
startDate and endDate -- each formatted in ISO (YYYY-MM-DD), US (mm/dd/yyyy), and INT
|
|
58
|
+
(dd/mm/yyyy). The dates are always returned in chronological order regardless of the order
|
|
59
|
+
they were clicked.`
|
|
60
|
+
- `wmStartInputBlur` -- Fires when the start date input loses focus.
|
|
61
|
+
|
|
62
|
+
**Methods:**
|
|
63
|
+
- `isValidISO(input?: string) => Promise<boolean>` -- Validates whether a string is a well-formed, calendar-correct ISO date
|
|
64
|
+
(YYYY-MM-DD). Accounts for invalid day-of-month values and leap years.
|
|
65
|
+
- `input` -- - The string to validate.
|
|
66
|
+
- **Returns:** `true` if the string is a valid ISO date, `false` otherwise.
|
|
67
|
+
- `reformatDate(inputFormat: string, outputFormat: string, date?: string) => Promise<string>` -- Converts a date string between `"US"` (mm/dd/yyyy), `"INT"` (dd/mm/yyyy),
|
|
68
|
+
and `"ISO"` (YYYY-MM-DD). Direct US ↔ INT conversion is not supported -- route through
|
|
69
|
+
ISO as an intermediate step.
|
|
70
|
+
- `inputFormat` -- - Format of the input date string (`"US"`, `"INT"`, or `"ISO"`).
|
|
71
|
+
- `outputFormat` -- - Desired output format (`"US"`, `"INT"`, or `"ISO"`).
|
|
72
|
+
- `date` -- - The date string to reformat.
|
|
73
|
+
- **Returns:** The reformatted date string, an empty string if `date` is omitted, or the original
|
|
74
|
+
string unchanged if it cannot be parsed.
|
|
75
|
+
|
|
76
|
+
**Accessibility:**
|
|
77
|
+
|
|
78
|
+
- `label-start` and `label-end` are required for accessibility -- always provide both even if
|
|
79
|
+
visually implied by context.
|
|
80
|
+
- The calendar toggle announces "Select range" to screen readers and reflects `aria-expanded`.
|
|
81
|
+
- Validation errors are announced via an `aria-live` region when `error-message` changes.
|
|
82
|
+
- The calendar popup hides its toggle when there is no room to display it; users can still
|
|
83
|
+
type dates directly into the inputs.
|
|
84
|
+
- **Keyboard:**
|
|
85
|
+
- **Input fields**: Tab moves focus between start input, end input, and the calendar toggle.
|
|
86
|
+
- **Calendar toggle**: Space / Enter opens the calendar; Escape closes it and returns focus.
|
|
87
|
+
- **Day grid**: Arrow keys navigate dates; Enter selects. After selecting the first date,
|
|
88
|
+
the calendar resets for a second selection. Selecting a date earlier than the first date
|
|
89
|
+
automatically swaps start and end.
|
|
90
|
+
- **Month/year selectors**: Arrow keys cycle values; Tab/Shift+Tab move focus through controls.
|
|
91
|
+
|
|
92
|
+
**Related components:**
|
|
93
|
+
|
|
94
|
+
- `<wm-datepicker>` -- if only a single date is needed rather than a start-and-end pair, use Datepicker; Date Range always manages two values and is only appropriate when both are required together.
|
|
95
|
+
- `<wm-timepicker>` -- if the range also needs to capture times of day, Date Range has no time input; pair it with Timepicker fields for the start and end times separately.
|
|
96
|
+
- `<wm-select>` -- if the user is choosing from a predefined list of named time periods (e.g., "Q1 2025", "Fall Semester") rather than specifying arbitrary dates, Select is more appropriate; Date Range is for open-ended date entry.
|
|
97
|
+
|
|
98
|
+
**Code example:**
|
|
99
|
+
|
|
100
|
+
_Basic date range_
|
|
101
|
+
|
|
102
|
+
```html
|
|
103
|
+
<wm-date-range label-start="Start date" label-end="End date"></wm-date-range>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
_Basic date range_
|
|
107
|
+
|
|
108
|
+
```react
|
|
109
|
+
// The component does not update its own values after a calendar selection --
|
|
110
|
+
// the app must call reformatDate and set valueStart/valueEnd imperatively via a ref.
|
|
111
|
+
const ref = useRef(null);
|
|
112
|
+
|
|
113
|
+
function getFormatName(format) {
|
|
114
|
+
const map = { 'mm/dd/yyyy': 'US', 'dd/mm/yyyy': 'INT', 'yyyy/mm/dd': 'ISO' };
|
|
115
|
+
return format ? map[format] : 'US';
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// event.detail is { startDate: { iso, us, int }, endDate: { iso, us, int } }
|
|
119
|
+
const handleRangeSelection = async (event) => {
|
|
120
|
+
const dr = ref.current;
|
|
121
|
+
const fmt = getFormatName(dr.getAttribute('date-format'));
|
|
122
|
+
dr.valueStart = await dr.reformatDate('ISO', fmt, event.detail.startDate.iso);
|
|
123
|
+
dr.valueEnd = await dr.reformatDate('ISO', fmt, event.detail.endDate.iso);
|
|
124
|
+
dr.errorMessage = '';
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
const handleInputBlurred = async (field) => {
|
|
128
|
+
const dr = ref.current;
|
|
129
|
+
const fmt = getFormatName(dr.getAttribute('date-format'));
|
|
130
|
+
const value = field === 'start' ? dr.valueStart : dr.valueEnd;
|
|
131
|
+
if (value) {
|
|
132
|
+
const iso = await dr.reformatDate(fmt, 'ISO', value);
|
|
133
|
+
if (await dr.isValidISO(iso)) {
|
|
134
|
+
const display = await dr.reformatDate('ISO', fmt, iso);
|
|
135
|
+
if (field === 'start') dr.valueStart = display;
|
|
136
|
+
else dr.valueEnd = display;
|
|
137
|
+
dr.errorMessage = '';
|
|
138
|
+
dr.invalidStart = false;
|
|
139
|
+
dr.invalidEnd = false;
|
|
140
|
+
} else {
|
|
141
|
+
dr.errorMessage = `Please enter a valid date in the format ${dr.getAttribute('date-format') ?? 'mm/dd/yyyy'}`;
|
|
142
|
+
if (field === 'start') dr.invalidStart = true;
|
|
143
|
+
else dr.invalidEnd = true;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
<WmDateRange
|
|
149
|
+
ref={ref}
|
|
150
|
+
labelStart="Start date"
|
|
151
|
+
labelEnd="End date"
|
|
152
|
+
onWmRangeSelection={handleRangeSelection}
|
|
153
|
+
onWmStartInputBlur={() => handleInputBlurred('start')}
|
|
154
|
+
onWmEndInputBlur={() => handleInputBlurred('end')}
|
|
155
|
+
/>
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
_Required fields with validation_
|
|
159
|
+
|
|
160
|
+
```html
|
|
161
|
+
<wm-date-range label-start="From" label-end="To" required-field></wm-date-range>
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
_Required fields with validation_
|
|
165
|
+
|
|
166
|
+
```react
|
|
167
|
+
<WmDateRange
|
|
168
|
+
ref={ref}
|
|
169
|
+
labelStart="From"
|
|
170
|
+
labelEnd="To"
|
|
171
|
+
requiredField={true}
|
|
172
|
+
onWmRangeSelection={handleRangeSelection}
|
|
173
|
+
onWmStartInputBlur={() => handleInputBlurred('start')}
|
|
174
|
+
onWmEndInputBlur={() => handleInputBlurred('end')}
|
|
175
|
+
/>
|
|
176
|
+
```
|