@furystack/shades-common-components 10.0.35 → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +496 -0
- package/esm/components/accordion/accordion-item.d.ts +31 -0
- package/esm/components/accordion/accordion-item.d.ts.map +1 -0
- package/esm/components/accordion/accordion-item.js +147 -0
- package/esm/components/accordion/accordion-item.js.map +1 -0
- package/esm/components/accordion/accordion.d.ts +27 -0
- package/esm/components/accordion/accordion.d.ts.map +1 -0
- package/esm/components/accordion/accordion.js +39 -0
- package/esm/components/accordion/accordion.js.map +1 -0
- package/esm/components/accordion/accordion.spec.d.ts +2 -0
- package/esm/components/accordion/accordion.spec.d.ts.map +1 -0
- package/esm/components/accordion/accordion.spec.js +284 -0
- package/esm/components/accordion/accordion.spec.js.map +1 -0
- package/esm/components/accordion/index.d.ts +3 -0
- package/esm/components/accordion/index.d.ts.map +1 -0
- package/esm/components/accordion/index.js +3 -0
- package/esm/components/accordion/index.js.map +1 -0
- package/esm/components/alert.d.ts +21 -0
- package/esm/components/alert.d.ts.map +1 -0
- package/esm/components/alert.js +131 -0
- package/esm/components/alert.js.map +1 -0
- package/esm/components/alert.spec.d.ts +2 -0
- package/esm/components/alert.spec.d.ts.map +1 -0
- package/esm/components/alert.spec.js +177 -0
- package/esm/components/alert.spec.js.map +1 -0
- package/esm/components/animations.spec.d.ts +2 -0
- package/esm/components/animations.spec.d.ts.map +1 -0
- package/esm/components/animations.spec.js +201 -0
- package/esm/components/animations.spec.js.map +1 -0
- package/esm/components/app-bar-link.d.ts +22 -2
- package/esm/components/app-bar-link.d.ts.map +1 -1
- package/esm/components/app-bar-link.js +36 -22
- package/esm/components/app-bar-link.js.map +1 -1
- package/esm/components/app-bar-link.spec.d.ts +2 -0
- package/esm/components/app-bar-link.spec.d.ts.map +1 -0
- package/esm/components/app-bar-link.spec.js +255 -0
- package/esm/components/app-bar-link.spec.js.map +1 -0
- package/esm/components/app-bar.d.ts +2 -0
- package/esm/components/app-bar.d.ts.map +1 -1
- package/esm/components/app-bar.js +28 -23
- package/esm/components/app-bar.js.map +1 -1
- package/esm/components/app-bar.spec.d.ts +2 -0
- package/esm/components/app-bar.spec.d.ts.map +1 -0
- package/esm/components/app-bar.spec.js +132 -0
- package/esm/components/app-bar.spec.js.map +1 -0
- package/esm/components/avatar.d.ts +2 -0
- package/esm/components/avatar.d.ts.map +1 -1
- package/esm/components/avatar.js +50 -51
- package/esm/components/avatar.js.map +1 -1
- package/esm/components/avatar.spec.d.ts +2 -0
- package/esm/components/avatar.spec.d.ts.map +1 -0
- package/esm/components/avatar.spec.js +114 -0
- package/esm/components/avatar.spec.js.map +1 -0
- package/esm/components/badge.d.ts +35 -0
- package/esm/components/badge.d.ts.map +1 -0
- package/esm/components/badge.js +68 -0
- package/esm/components/badge.js.map +1 -0
- package/esm/components/badge.spec.d.ts +2 -0
- package/esm/components/badge.spec.d.ts.map +1 -0
- package/esm/components/badge.spec.js +157 -0
- package/esm/components/badge.spec.js.map +1 -0
- package/esm/components/breadcrumb.d.ts +103 -0
- package/esm/components/breadcrumb.d.ts.map +1 -0
- package/esm/components/breadcrumb.js +121 -0
- package/esm/components/breadcrumb.js.map +1 -0
- package/esm/components/breadcrumb.spec.d.ts +2 -0
- package/esm/components/breadcrumb.spec.d.ts.map +1 -0
- package/esm/components/breadcrumb.spec.js +251 -0
- package/esm/components/breadcrumb.spec.js.map +1 -0
- package/esm/components/button-group.d.ts +85 -0
- package/esm/components/button-group.d.ts.map +1 -0
- package/esm/components/button-group.js +290 -0
- package/esm/components/button-group.js.map +1 -0
- package/esm/components/button-group.spec.d.ts +2 -0
- package/esm/components/button-group.spec.d.ts.map +1 -0
- package/esm/components/button-group.spec.js +502 -0
- package/esm/components/button-group.spec.js.map +1 -0
- package/esm/components/button.d.ts +44 -2
- package/esm/components/button.d.ts.map +1 -1
- package/esm/components/button.js +151 -153
- package/esm/components/button.js.map +1 -1
- package/esm/components/button.spec.d.ts +2 -0
- package/esm/components/button.spec.d.ts.map +1 -0
- package/esm/components/button.spec.js +310 -0
- package/esm/components/button.spec.js.map +1 -0
- package/esm/components/card.d.ts +117 -0
- package/esm/components/card.d.ts.map +1 -0
- package/esm/components/card.js +181 -0
- package/esm/components/card.js.map +1 -0
- package/esm/components/card.spec.d.ts +2 -0
- package/esm/components/card.spec.d.ts.map +1 -0
- package/esm/components/card.spec.js +278 -0
- package/esm/components/card.spec.js.map +1 -0
- package/esm/components/carousel.d.ts +50 -0
- package/esm/components/carousel.d.ts.map +1 -0
- package/esm/components/carousel.js +263 -0
- package/esm/components/carousel.js.map +1 -0
- package/esm/components/carousel.spec.d.ts +2 -0
- package/esm/components/carousel.spec.d.ts.map +1 -0
- package/esm/components/carousel.spec.js +677 -0
- package/esm/components/carousel.spec.js.map +1 -0
- package/esm/components/chip.d.ts +23 -0
- package/esm/components/chip.d.ts.map +1 -0
- package/esm/components/chip.js +139 -0
- package/esm/components/chip.js.map +1 -0
- package/esm/components/chip.spec.d.ts +2 -0
- package/esm/components/chip.spec.d.ts.map +1 -0
- package/esm/components/chip.spec.js +142 -0
- package/esm/components/chip.spec.js.map +1 -0
- package/esm/components/circular-progress.d.ts +37 -0
- package/esm/components/circular-progress.d.ts.map +1 -0
- package/esm/components/circular-progress.js +84 -0
- package/esm/components/circular-progress.js.map +1 -0
- package/esm/components/circular-progress.spec.d.ts +2 -0
- package/esm/components/circular-progress.spec.d.ts.map +1 -0
- package/esm/components/circular-progress.spec.js +228 -0
- package/esm/components/circular-progress.spec.js.map +1 -0
- package/esm/components/command-palette/command-palette-input.d.ts +3 -0
- package/esm/components/command-palette/command-palette-input.d.ts.map +1 -1
- package/esm/components/command-palette/command-palette-input.js +33 -23
- package/esm/components/command-palette/command-palette-input.js.map +1 -1
- package/esm/components/command-palette/command-palette-input.spec.d.ts +2 -0
- package/esm/components/command-palette/command-palette-input.spec.d.ts.map +1 -0
- package/esm/components/command-palette/command-palette-input.spec.js +244 -0
- package/esm/components/command-palette/command-palette-input.spec.js.map +1 -0
- package/esm/components/command-palette/command-palette-manager.spec.d.ts +2 -0
- package/esm/components/command-palette/command-palette-manager.spec.d.ts.map +1 -0
- package/esm/components/command-palette/command-palette-manager.spec.js +378 -0
- package/esm/components/command-palette/command-palette-manager.spec.js.map +1 -0
- package/esm/components/command-palette/command-palette-suggestion-list.d.ts +2 -0
- package/esm/components/command-palette/command-palette-suggestion-list.d.ts.map +1 -1
- package/esm/components/command-palette/command-palette-suggestion-list.js +53 -57
- package/esm/components/command-palette/command-palette-suggestion-list.js.map +1 -1
- package/esm/components/command-palette/command-palette-suggestion-list.spec.d.ts +2 -0
- package/esm/components/command-palette/command-palette-suggestion-list.spec.d.ts.map +1 -0
- package/esm/components/command-palette/command-palette-suggestion-list.spec.js +394 -0
- package/esm/components/command-palette/command-palette-suggestion-list.spec.js.map +1 -0
- package/esm/components/command-palette/index.d.ts +2 -0
- package/esm/components/command-palette/index.d.ts.map +1 -1
- package/esm/components/command-palette/index.js +41 -120
- package/esm/components/command-palette/index.js.map +1 -1
- package/esm/components/command-palette/index.spec.d.ts +2 -0
- package/esm/components/command-palette/index.spec.d.ts.map +1 -0
- package/esm/components/command-palette/index.spec.js +509 -0
- package/esm/components/command-palette/index.spec.js.map +1 -0
- package/esm/components/context-menu/context-menu-item.d.ts +9 -0
- package/esm/components/context-menu/context-menu-item.d.ts.map +1 -0
- package/esm/components/context-menu/context-menu-item.js +56 -0
- package/esm/components/context-menu/context-menu-item.js.map +1 -0
- package/esm/components/context-menu/context-menu-manager.d.ts +52 -0
- package/esm/components/context-menu/context-menu-manager.d.ts.map +1 -0
- package/esm/components/context-menu/context-menu-manager.js +128 -0
- package/esm/components/context-menu/context-menu-manager.js.map +1 -0
- package/esm/components/context-menu/context-menu-manager.spec.d.ts +2 -0
- package/esm/components/context-menu/context-menu-manager.spec.d.ts.map +1 -0
- package/esm/components/context-menu/context-menu-manager.spec.js +332 -0
- package/esm/components/context-menu/context-menu-manager.spec.js.map +1 -0
- package/esm/components/context-menu/context-menu.d.ts +8 -0
- package/esm/components/context-menu/context-menu.d.ts.map +1 -0
- package/esm/components/context-menu/context-menu.js +79 -0
- package/esm/components/context-menu/context-menu.js.map +1 -0
- package/esm/components/context-menu/context-menu.spec.d.ts +2 -0
- package/esm/components/context-menu/context-menu.spec.d.ts.map +1 -0
- package/esm/components/context-menu/context-menu.spec.js +282 -0
- package/esm/components/context-menu/context-menu.spec.js.map +1 -0
- package/esm/components/context-menu/index.d.ts +4 -0
- package/esm/components/context-menu/index.d.ts.map +1 -0
- package/esm/components/context-menu/index.js +4 -0
- package/esm/components/context-menu/index.js.map +1 -0
- package/esm/components/data-grid/body.js +1 -1
- package/esm/components/data-grid/body.js.map +1 -1
- package/esm/components/data-grid/body.spec.d.ts +2 -0
- package/esm/components/data-grid/body.spec.d.ts.map +1 -0
- package/esm/components/data-grid/body.spec.js +238 -0
- package/esm/components/data-grid/body.spec.js.map +1 -0
- package/esm/components/data-grid/data-grid-row.d.ts.map +1 -1
- package/esm/components/data-grid/data-grid-row.js +84 -96
- package/esm/components/data-grid/data-grid-row.js.map +1 -1
- package/esm/components/data-grid/data-grid-row.spec.d.ts +2 -0
- package/esm/components/data-grid/data-grid-row.spec.d.ts.map +1 -0
- package/esm/components/data-grid/data-grid-row.spec.js +328 -0
- package/esm/components/data-grid/data-grid-row.spec.js.map +1 -0
- package/esm/components/data-grid/data-grid.d.ts.map +1 -1
- package/esm/components/data-grid/data-grid.js +39 -31
- package/esm/components/data-grid/data-grid.js.map +1 -1
- package/esm/components/data-grid/data-grid.spec.d.ts +2 -0
- package/esm/components/data-grid/data-grid.spec.d.ts.map +1 -0
- package/esm/components/data-grid/data-grid.spec.js +569 -0
- package/esm/components/data-grid/data-grid.spec.js.map +1 -0
- package/esm/components/data-grid/footer.js +21 -15
- package/esm/components/data-grid/footer.js.map +1 -1
- package/esm/components/data-grid/footer.spec.d.ts +2 -0
- package/esm/components/data-grid/footer.spec.d.ts.map +1 -0
- package/esm/components/data-grid/footer.spec.js +276 -0
- package/esm/components/data-grid/footer.spec.js.map +1 -0
- package/esm/components/data-grid/header.d.ts +3 -1
- package/esm/components/data-grid/header.d.ts.map +1 -1
- package/esm/components/data-grid/header.js +94 -60
- package/esm/components/data-grid/header.js.map +1 -1
- package/esm/components/data-grid/header.spec.d.ts +2 -0
- package/esm/components/data-grid/header.spec.d.ts.map +1 -0
- package/esm/components/data-grid/header.spec.js +444 -0
- package/esm/components/data-grid/header.spec.js.map +1 -0
- package/esm/components/data-grid/selection-cell.d.ts +2 -0
- package/esm/components/data-grid/selection-cell.d.ts.map +1 -1
- package/esm/components/data-grid/selection-cell.js +15 -13
- package/esm/components/data-grid/selection-cell.js.map +1 -1
- package/esm/components/data-grid/selection-cell.spec.d.ts +2 -0
- package/esm/components/data-grid/selection-cell.spec.d.ts.map +1 -0
- package/esm/components/data-grid/selection-cell.spec.js +127 -0
- package/esm/components/data-grid/selection-cell.spec.js.map +1 -0
- package/esm/components/dialog.d.ts +46 -0
- package/esm/components/dialog.d.ts.map +1 -0
- package/esm/components/dialog.js +178 -0
- package/esm/components/dialog.js.map +1 -0
- package/esm/components/dialog.spec.d.ts +2 -0
- package/esm/components/dialog.spec.d.ts.map +1 -0
- package/esm/components/dialog.spec.js +113 -0
- package/esm/components/dialog.spec.js.map +1 -0
- package/esm/components/divider.d.ts +22 -0
- package/esm/components/divider.d.ts.map +1 -0
- package/esm/components/divider.js +113 -0
- package/esm/components/divider.js.map +1 -0
- package/esm/components/divider.spec.d.ts +2 -0
- package/esm/components/divider.spec.d.ts.map +1 -0
- package/esm/components/divider.spec.js +136 -0
- package/esm/components/divider.spec.js.map +1 -0
- package/esm/components/drawer/drawer-toggle-button.d.ts +36 -0
- package/esm/components/drawer/drawer-toggle-button.d.ts.map +1 -0
- package/esm/components/drawer/drawer-toggle-button.js +94 -0
- package/esm/components/drawer/drawer-toggle-button.js.map +1 -0
- package/esm/components/drawer/drawer-toggle-button.spec.d.ts +2 -0
- package/esm/components/drawer/drawer-toggle-button.spec.d.ts.map +1 -0
- package/esm/components/drawer/drawer-toggle-button.spec.js +306 -0
- package/esm/components/drawer/drawer-toggle-button.spec.js.map +1 -0
- package/esm/components/drawer/index.d.ts +56 -0
- package/esm/components/drawer/index.d.ts.map +1 -0
- package/esm/components/drawer/index.js +172 -0
- package/esm/components/drawer/index.js.map +1 -0
- package/esm/components/drawer/index.spec.d.ts +2 -0
- package/esm/components/drawer/index.spec.d.ts.map +1 -0
- package/esm/components/drawer/index.spec.js +538 -0
- package/esm/components/drawer/index.spec.js.map +1 -0
- package/esm/components/dropdown.d.ts +15 -0
- package/esm/components/dropdown.d.ts.map +1 -0
- package/esm/components/dropdown.js +262 -0
- package/esm/components/dropdown.js.map +1 -0
- package/esm/components/dropdown.spec.d.ts +2 -0
- package/esm/components/dropdown.spec.d.ts.map +1 -0
- package/esm/components/dropdown.spec.js +372 -0
- package/esm/components/dropdown.spec.js.map +1 -0
- package/esm/components/fab.d.ts +10 -1
- package/esm/components/fab.d.ts.map +1 -1
- package/esm/components/fab.js +32 -7
- package/esm/components/fab.js.map +1 -1
- package/esm/components/fab.spec.d.ts +2 -0
- package/esm/components/fab.spec.d.ts.map +1 -0
- package/esm/components/fab.spec.js +106 -0
- package/esm/components/fab.spec.js.map +1 -0
- package/esm/components/form.d.ts.map +1 -1
- package/esm/components/form.js +9 -7
- package/esm/components/form.js.map +1 -1
- package/esm/components/form.spec.d.ts +2 -0
- package/esm/components/form.spec.d.ts.map +1 -0
- package/esm/components/form.spec.js +324 -0
- package/esm/components/form.spec.js.map +1 -0
- package/esm/components/grid.d.ts.map +1 -1
- package/esm/components/grid.js +43 -40
- package/esm/components/grid.js.map +1 -1
- package/esm/components/grid.spec.d.ts +2 -0
- package/esm/components/grid.spec.d.ts.map +1 -0
- package/esm/components/grid.spec.js +340 -0
- package/esm/components/grid.spec.js.map +1 -0
- package/esm/components/icons/icon-definitions.d.ts +140 -0
- package/esm/components/icons/icon-definitions.d.ts.map +1 -0
- package/esm/components/icons/icon-definitions.js +432 -0
- package/esm/components/icons/icon-definitions.js.map +1 -0
- package/esm/components/icons/icon-definitions.spec.d.ts +2 -0
- package/esm/components/icons/icon-definitions.spec.d.ts.map +1 -0
- package/esm/components/icons/icon-definitions.spec.js +59 -0
- package/esm/components/icons/icon-definitions.spec.js.map +1 -0
- package/esm/components/icons/icon-types.d.ts +48 -0
- package/esm/components/icons/icon-types.d.ts.map +1 -0
- package/esm/components/icons/icon-types.js +2 -0
- package/esm/components/icons/icon-types.js.map +1 -0
- package/esm/components/icons/icon.d.ts +56 -0
- package/esm/components/icons/icon.d.ts.map +1 -0
- package/esm/components/icons/icon.js +61 -0
- package/esm/components/icons/icon.js.map +1 -0
- package/esm/components/icons/icon.spec.d.ts +2 -0
- package/esm/components/icons/icon.spec.d.ts.map +1 -0
- package/esm/components/icons/icon.spec.js +224 -0
- package/esm/components/icons/icon.spec.js.map +1 -0
- package/esm/components/icons/index.d.ts +5 -0
- package/esm/components/icons/index.d.ts.map +1 -0
- package/esm/components/icons/index.js +3 -0
- package/esm/components/icons/index.js.map +1 -0
- package/esm/components/image.d.ts +62 -0
- package/esm/components/image.d.ts.map +1 -0
- package/esm/components/image.js +348 -0
- package/esm/components/image.js.map +1 -0
- package/esm/components/image.spec.d.ts +2 -0
- package/esm/components/image.spec.d.ts.map +1 -0
- package/esm/components/image.spec.js +542 -0
- package/esm/components/image.spec.js.map +1 -0
- package/esm/components/index.d.ts +32 -4
- package/esm/components/index.d.ts.map +1 -1
- package/esm/components/index.js +32 -4
- package/esm/components/index.js.map +1 -1
- package/esm/components/inputs/autocomplete.d.ts +2 -0
- package/esm/components/inputs/autocomplete.d.ts.map +1 -1
- package/esm/components/inputs/autocomplete.js +10 -6
- package/esm/components/inputs/autocomplete.js.map +1 -1
- package/esm/components/inputs/autocomplete.spec.d.ts +2 -0
- package/esm/components/inputs/autocomplete.spec.d.ts.map +1 -0
- package/esm/components/inputs/autocomplete.spec.js +203 -0
- package/esm/components/inputs/autocomplete.spec.js.map +1 -0
- package/esm/components/inputs/checkbox.d.ts +50 -0
- package/esm/components/inputs/checkbox.d.ts.map +1 -0
- package/esm/components/inputs/checkbox.js +126 -0
- package/esm/components/inputs/checkbox.js.map +1 -0
- package/esm/components/inputs/checkbox.spec.d.ts +2 -0
- package/esm/components/inputs/checkbox.spec.d.ts.map +1 -0
- package/esm/components/inputs/checkbox.spec.js +287 -0
- package/esm/components/inputs/checkbox.spec.js.map +1 -0
- package/esm/components/inputs/index.d.ts +7 -0
- package/esm/components/inputs/index.d.ts.map +1 -1
- package/esm/components/inputs/index.js +7 -0
- package/esm/components/inputs/index.js.map +1 -1
- package/esm/components/inputs/input-number.d.ts +79 -0
- package/esm/components/inputs/input-number.d.ts.map +1 -0
- package/esm/components/inputs/input-number.js +232 -0
- package/esm/components/inputs/input-number.js.map +1 -0
- package/esm/components/inputs/input-number.spec.d.ts +2 -0
- package/esm/components/inputs/input-number.spec.d.ts.map +1 -0
- package/esm/components/inputs/input-number.spec.js +516 -0
- package/esm/components/inputs/input-number.spec.js.map +1 -0
- package/esm/components/inputs/input.d.ts +2 -1
- package/esm/components/inputs/input.d.ts.map +1 -1
- package/esm/components/inputs/input.js +179 -177
- package/esm/components/inputs/input.js.map +1 -1
- package/esm/components/inputs/input.spec.d.ts +2 -0
- package/esm/components/inputs/input.spec.d.ts.map +1 -0
- package/esm/components/inputs/input.spec.js +611 -0
- package/esm/components/inputs/input.spec.js.map +1 -0
- package/esm/components/inputs/radio-group.d.ts +38 -0
- package/esm/components/inputs/radio-group.d.ts.map +1 -0
- package/esm/components/inputs/radio-group.js +58 -0
- package/esm/components/inputs/radio-group.js.map +1 -0
- package/esm/components/inputs/radio-group.spec.d.ts +2 -0
- package/esm/components/inputs/radio-group.spec.d.ts.map +1 -0
- package/esm/components/inputs/radio-group.spec.js +201 -0
- package/esm/components/inputs/radio-group.spec.js.map +1 -0
- package/esm/components/inputs/radio.d.ts +42 -0
- package/esm/components/inputs/radio.d.ts.map +1 -0
- package/esm/components/inputs/radio.js +134 -0
- package/esm/components/inputs/radio.js.map +1 -0
- package/esm/components/inputs/radio.spec.d.ts +2 -0
- package/esm/components/inputs/radio.spec.d.ts.map +1 -0
- package/esm/components/inputs/radio.spec.js +211 -0
- package/esm/components/inputs/radio.spec.js.map +1 -0
- package/esm/components/inputs/select.d.ts +67 -0
- package/esm/components/inputs/select.d.ts.map +1 -0
- package/esm/components/inputs/select.js +581 -0
- package/esm/components/inputs/select.js.map +1 -0
- package/esm/components/inputs/select.spec.d.ts +2 -0
- package/esm/components/inputs/select.spec.d.ts.map +1 -0
- package/esm/components/inputs/select.spec.js +1009 -0
- package/esm/components/inputs/select.spec.js.map +1 -0
- package/esm/components/inputs/slider.d.ts +66 -0
- package/esm/components/inputs/slider.d.ts.map +1 -0
- package/esm/components/inputs/slider.js +526 -0
- package/esm/components/inputs/slider.js.map +1 -0
- package/esm/components/inputs/slider.spec.d.ts +2 -0
- package/esm/components/inputs/slider.spec.d.ts.map +1 -0
- package/esm/components/inputs/slider.spec.js +812 -0
- package/esm/components/inputs/slider.spec.js.map +1 -0
- package/esm/components/inputs/switch.d.ts +50 -0
- package/esm/components/inputs/switch.d.ts.map +1 -0
- package/esm/components/inputs/switch.js +138 -0
- package/esm/components/inputs/switch.js.map +1 -0
- package/esm/components/inputs/switch.spec.d.ts +2 -0
- package/esm/components/inputs/switch.spec.d.ts.map +1 -0
- package/esm/components/inputs/switch.spec.js +313 -0
- package/esm/components/inputs/switch.spec.js.map +1 -0
- package/esm/components/inputs/text-area.d.ts +2 -0
- package/esm/components/inputs/text-area.d.ts.map +1 -1
- package/esm/components/inputs/text-area.js +46 -58
- package/esm/components/inputs/text-area.js.map +1 -1
- package/esm/components/inputs/text-area.spec.d.ts +2 -0
- package/esm/components/inputs/text-area.spec.d.ts.map +1 -0
- package/esm/components/inputs/text-area.spec.js +229 -0
- package/esm/components/inputs/text-area.spec.js.map +1 -0
- package/esm/components/linear-progress.d.ts +32 -0
- package/esm/components/linear-progress.d.ts.map +1 -0
- package/esm/components/linear-progress.js +79 -0
- package/esm/components/linear-progress.js.map +1 -0
- package/esm/components/linear-progress.spec.d.ts +2 -0
- package/esm/components/linear-progress.spec.d.ts.map +1 -0
- package/esm/components/linear-progress.spec.js +251 -0
- package/esm/components/linear-progress.spec.js.map +1 -0
- package/esm/components/list/index.d.ts +3 -0
- package/esm/components/list/index.d.ts.map +1 -0
- package/esm/components/list/index.js +3 -0
- package/esm/components/list/index.js.map +1 -0
- package/esm/components/list/list-item.d.ts +13 -0
- package/esm/components/list/list-item.d.ts.map +1 -0
- package/esm/components/list/list-item.js +81 -0
- package/esm/components/list/list-item.js.map +1 -0
- package/esm/components/list/list.d.ts +18 -0
- package/esm/components/list/list.d.ts.map +1 -0
- package/esm/components/list/list.js +42 -0
- package/esm/components/list/list.js.map +1 -0
- package/esm/components/list/list.spec.d.ts +2 -0
- package/esm/components/list/list.spec.d.ts.map +1 -0
- package/esm/components/list/list.spec.js +540 -0
- package/esm/components/list/list.spec.js.map +1 -0
- package/esm/components/loader.d.ts +2 -0
- package/esm/components/loader.d.ts.map +1 -1
- package/esm/components/loader.js +19 -11
- package/esm/components/loader.js.map +1 -1
- package/esm/components/loader.spec.d.ts +2 -0
- package/esm/components/loader.spec.d.ts.map +1 -0
- package/esm/components/loader.spec.js +267 -0
- package/esm/components/loader.spec.js.map +1 -0
- package/esm/components/menu/index.d.ts +3 -0
- package/esm/components/menu/index.d.ts.map +1 -0
- package/esm/components/menu/index.js +3 -0
- package/esm/components/menu/index.js.map +1 -0
- package/esm/components/menu/menu-types.d.ts +27 -0
- package/esm/components/menu/menu-types.d.ts.map +1 -0
- package/esm/components/menu/menu-types.js +22 -0
- package/esm/components/menu/menu-types.js.map +1 -0
- package/esm/components/menu/menu-types.spec.d.ts +2 -0
- package/esm/components/menu/menu-types.spec.d.ts.map +1 -0
- package/esm/components/menu/menu-types.spec.js +103 -0
- package/esm/components/menu/menu-types.spec.js.map +1 -0
- package/esm/components/menu/menu.d.ts +17 -0
- package/esm/components/menu/menu.d.ts.map +1 -0
- package/esm/components/menu/menu.js +240 -0
- package/esm/components/menu/menu.js.map +1 -0
- package/esm/components/menu/menu.spec.d.ts +2 -0
- package/esm/components/menu/menu.spec.d.ts.map +1 -0
- package/esm/components/menu/menu.spec.js +427 -0
- package/esm/components/menu/menu.spec.js.map +1 -0
- package/esm/components/modal.d.ts +3 -2
- package/esm/components/modal.d.ts.map +1 -1
- package/esm/components/modal.js +19 -14
- package/esm/components/modal.js.map +1 -1
- package/esm/components/modal.spec.d.ts +2 -0
- package/esm/components/modal.spec.d.ts.map +1 -0
- package/esm/components/modal.spec.js +234 -0
- package/esm/components/modal.spec.js.map +1 -0
- package/esm/components/noty-list.d.ts +4 -0
- package/esm/components/noty-list.d.ts.map +1 -1
- package/esm/components/noty-list.js +87 -76
- package/esm/components/noty-list.js.map +1 -1
- package/esm/components/noty-list.spec.d.ts +2 -0
- package/esm/components/noty-list.spec.d.ts.map +1 -0
- package/esm/components/noty-list.spec.js +489 -0
- package/esm/components/noty-list.spec.js.map +1 -0
- package/esm/components/page-container/index.d.ts +54 -0
- package/esm/components/page-container/index.d.ts.map +1 -0
- package/esm/components/page-container/index.js +63 -0
- package/esm/components/page-container/index.js.map +1 -0
- package/esm/components/page-container/index.spec.d.ts +2 -0
- package/esm/components/page-container/index.spec.d.ts.map +1 -0
- package/esm/components/page-container/index.spec.js +217 -0
- package/esm/components/page-container/index.spec.js.map +1 -0
- package/esm/components/page-container/page-header.d.ts +57 -0
- package/esm/components/page-container/page-header.d.ts.map +1 -0
- package/esm/components/page-container/page-header.js +93 -0
- package/esm/components/page-container/page-header.js.map +1 -0
- package/esm/components/page-container/page-header.spec.d.ts +2 -0
- package/esm/components/page-container/page-header.spec.d.ts.map +1 -0
- package/esm/components/page-container/page-header.spec.js +230 -0
- package/esm/components/page-container/page-header.spec.js.map +1 -0
- package/esm/components/page-layout/index.d.ts +83 -0
- package/esm/components/page-layout/index.d.ts.map +1 -0
- package/esm/components/page-layout/index.js +288 -0
- package/esm/components/page-layout/index.js.map +1 -0
- package/esm/components/page-layout/index.spec.d.ts +2 -0
- package/esm/components/page-layout/index.spec.d.ts.map +1 -0
- package/esm/components/page-layout/index.spec.js +637 -0
- package/esm/components/page-layout/index.spec.js.map +1 -0
- package/esm/components/pagination.d.ts +43 -0
- package/esm/components/pagination.d.ts.map +1 -0
- package/esm/components/pagination.js +165 -0
- package/esm/components/pagination.js.map +1 -0
- package/esm/components/pagination.spec.d.ts +2 -0
- package/esm/components/pagination.spec.d.ts.map +1 -0
- package/esm/components/pagination.spec.js +195 -0
- package/esm/components/pagination.spec.js.map +1 -0
- package/esm/components/paper.d.ts +3 -1
- package/esm/components/paper.d.ts.map +1 -1
- package/esm/components/paper.js +20 -15
- package/esm/components/paper.js.map +1 -1
- package/esm/components/paper.spec.d.ts +2 -0
- package/esm/components/paper.spec.d.ts.map +1 -0
- package/esm/components/paper.spec.js +71 -0
- package/esm/components/paper.spec.js.map +1 -0
- package/esm/components/rating.d.ts +62 -0
- package/esm/components/rating.d.ts.map +1 -0
- package/esm/components/rating.js +201 -0
- package/esm/components/rating.js.map +1 -0
- package/esm/components/rating.spec.d.ts +2 -0
- package/esm/components/rating.spec.d.ts.map +1 -0
- package/esm/components/rating.spec.js +663 -0
- package/esm/components/rating.spec.js.map +1 -0
- package/esm/components/result.d.ts +37 -0
- package/esm/components/result.d.ts.map +1 -0
- package/esm/components/result.js +109 -0
- package/esm/components/result.js.map +1 -0
- package/esm/components/result.spec.d.ts +2 -0
- package/esm/components/result.spec.d.ts.map +1 -0
- package/esm/components/result.spec.js +159 -0
- package/esm/components/result.spec.js.map +1 -0
- package/esm/components/searchable-input-styles.d.ts +8 -0
- package/esm/components/searchable-input-styles.d.ts.map +1 -0
- package/esm/components/searchable-input-styles.js +71 -0
- package/esm/components/searchable-input-styles.js.map +1 -0
- package/esm/components/skeleton.d.ts +2 -0
- package/esm/components/skeleton.d.ts.map +1 -1
- package/esm/components/skeleton.js +20 -7
- package/esm/components/skeleton.js.map +1 -1
- package/esm/components/skeleton.spec.d.ts +2 -0
- package/esm/components/skeleton.spec.d.ts.map +1 -0
- package/esm/components/skeleton.spec.js +167 -0
- package/esm/components/skeleton.spec.js.map +1 -0
- package/esm/components/styles.d.ts.map +1 -1
- package/esm/components/styles.js +14 -13
- package/esm/components/styles.js.map +1 -1
- package/esm/components/styles.spec.d.ts +2 -0
- package/esm/components/styles.spec.d.ts.map +1 -0
- package/esm/components/styles.spec.js +57 -0
- package/esm/components/styles.spec.js.map +1 -0
- package/esm/components/suggest/index.d.ts.map +1 -1
- package/esm/components/suggest/index.js +32 -102
- package/esm/components/suggest/index.js.map +1 -1
- package/esm/components/suggest/index.spec.d.ts +2 -0
- package/esm/components/suggest/index.spec.d.ts.map +1 -0
- package/esm/components/suggest/index.spec.js +539 -0
- package/esm/components/suggest/index.spec.js.map +1 -0
- package/esm/components/suggest/suggest-input.d.ts +2 -0
- package/esm/components/suggest/suggest-input.d.ts.map +1 -1
- package/esm/components/suggest/suggest-input.js +24 -23
- package/esm/components/suggest/suggest-input.js.map +1 -1
- package/esm/components/suggest/suggest-input.spec.d.ts +2 -0
- package/esm/components/suggest/suggest-input.spec.d.ts.map +1 -0
- package/esm/components/suggest/suggest-input.spec.js +150 -0
- package/esm/components/suggest/suggest-input.spec.js.map +1 -0
- package/esm/components/suggest/suggest-manager.spec.d.ts +2 -0
- package/esm/components/suggest/suggest-manager.spec.d.ts.map +1 -0
- package/esm/components/suggest/suggest-manager.spec.js +318 -0
- package/esm/components/suggest/suggest-manager.spec.js.map +1 -0
- package/esm/components/suggest/suggestion-list.d.ts.map +1 -1
- package/esm/components/suggest/suggestion-list.js +52 -58
- package/esm/components/suggest/suggestion-list.js.map +1 -1
- package/esm/components/suggest/suggestion-list.spec.d.ts +2 -0
- package/esm/components/suggest/suggestion-list.spec.d.ts.map +1 -0
- package/esm/components/suggest/suggestion-list.spec.js +271 -0
- package/esm/components/suggest/suggestion-list.spec.js.map +1 -0
- package/esm/components/tabs.d.ts +18 -2
- package/esm/components/tabs.d.ts.map +1 -1
- package/esm/components/tabs.js +173 -19
- package/esm/components/tabs.js.map +1 -1
- package/esm/components/tabs.spec.d.ts +2 -0
- package/esm/components/tabs.spec.d.ts.map +1 -0
- package/esm/components/tabs.spec.js +475 -0
- package/esm/components/tabs.spec.js.map +1 -0
- package/esm/components/timeline.d.ts +53 -0
- package/esm/components/timeline.d.ts.map +1 -0
- package/esm/components/timeline.js +162 -0
- package/esm/components/timeline.js.map +1 -0
- package/esm/components/timeline.spec.d.ts +2 -0
- package/esm/components/timeline.spec.d.ts.map +1 -0
- package/esm/components/timeline.spec.js +209 -0
- package/esm/components/timeline.spec.js.map +1 -0
- package/esm/components/tooltip.d.ts +25 -0
- package/esm/components/tooltip.d.ts.map +1 -0
- package/esm/components/tooltip.js +113 -0
- package/esm/components/tooltip.js.map +1 -0
- package/esm/components/tooltip.spec.d.ts +2 -0
- package/esm/components/tooltip.spec.d.ts.map +1 -0
- package/esm/components/tooltip.spec.js +152 -0
- package/esm/components/tooltip.spec.js.map +1 -0
- package/esm/components/tree/index.d.ts +3 -0
- package/esm/components/tree/index.d.ts.map +1 -0
- package/esm/components/tree/index.js +3 -0
- package/esm/components/tree/index.js.map +1 -0
- package/esm/components/tree/tree-item.d.ts +14 -0
- package/esm/components/tree/tree-item.d.ts.map +1 -0
- package/esm/components/tree/tree-item.js +118 -0
- package/esm/components/tree/tree-item.js.map +1 -0
- package/esm/components/tree/tree.d.ts +20 -0
- package/esm/components/tree/tree.d.ts.map +1 -0
- package/esm/components/tree/tree.js +66 -0
- package/esm/components/tree/tree.js.map +1 -0
- package/esm/components/tree/tree.spec.d.ts +2 -0
- package/esm/components/tree/tree.spec.d.ts.map +1 -0
- package/esm/components/tree/tree.spec.js +427 -0
- package/esm/components/tree/tree.spec.js.map +1 -0
- package/esm/components/typography.d.ts +48 -0
- package/esm/components/typography.d.ts.map +1 -0
- package/esm/components/typography.js +223 -0
- package/esm/components/typography.js.map +1 -0
- package/esm/components/typography.spec.d.ts +2 -0
- package/esm/components/typography.spec.d.ts.map +1 -0
- package/esm/components/typography.spec.js +199 -0
- package/esm/components/typography.spec.js.map +1 -0
- package/esm/components/wizard/index.d.ts +2 -0
- package/esm/components/wizard/index.d.ts.map +1 -1
- package/esm/components/wizard/index.js +10 -7
- package/esm/components/wizard/index.js.map +1 -1
- package/esm/components/wizard/index.spec.d.ts +2 -0
- package/esm/components/wizard/index.spec.d.ts.map +1 -0
- package/esm/components/wizard/index.spec.js +185 -0
- package/esm/components/wizard/index.spec.js.map +1 -0
- package/esm/services/click-away-service.d.ts +5 -2
- package/esm/services/click-away-service.d.ts.map +1 -1
- package/esm/services/click-away-service.js +7 -1
- package/esm/services/click-away-service.js.map +1 -1
- package/esm/services/collection-service.spec.js +391 -2
- package/esm/services/collection-service.spec.js.map +1 -1
- package/esm/services/css-variable-theme.d.ts +167 -1
- package/esm/services/css-variable-theme.d.ts.map +1 -1
- package/esm/services/css-variable-theme.js +123 -1
- package/esm/services/css-variable-theme.js.map +1 -1
- package/esm/services/css-variable-theme.spec.d.ts +2 -0
- package/esm/services/css-variable-theme.spec.d.ts.map +1 -0
- package/esm/services/css-variable-theme.spec.js +299 -0
- package/esm/services/css-variable-theme.spec.js.map +1 -0
- package/esm/services/default-dark-theme.d.ts +107 -2
- package/esm/services/default-dark-theme.d.ts.map +1 -1
- package/esm/services/default-dark-theme.js +87 -1
- package/esm/services/default-dark-theme.js.map +1 -1
- package/esm/services/default-light-theme.d.ts +107 -2
- package/esm/services/default-light-theme.d.ts.map +1 -1
- package/esm/services/default-light-theme.js +86 -0
- package/esm/services/default-light-theme.js.map +1 -1
- package/esm/services/default-palette.d.ts +4 -0
- package/esm/services/default-palette.d.ts.map +1 -1
- package/esm/services/default-palette.js +22 -0
- package/esm/services/default-palette.js.map +1 -1
- package/esm/services/index.d.ts +6 -2
- package/esm/services/index.d.ts.map +1 -1
- package/esm/services/index.js +6 -2
- package/esm/services/index.js.map +1 -1
- package/esm/services/layout-service.d.ts +217 -0
- package/esm/services/layout-service.d.ts.map +1 -0
- package/esm/services/layout-service.js +331 -0
- package/esm/services/layout-service.js.map +1 -0
- package/esm/services/layout-service.spec.d.ts +2 -0
- package/esm/services/layout-service.spec.d.ts.map +1 -0
- package/esm/services/layout-service.spec.js +425 -0
- package/esm/services/layout-service.spec.js.map +1 -0
- package/esm/services/list-service.d.ts +31 -0
- package/esm/services/list-service.d.ts.map +1 -0
- package/esm/services/list-service.js +149 -0
- package/esm/services/list-service.js.map +1 -0
- package/esm/services/list-service.spec.d.ts +2 -0
- package/esm/services/list-service.spec.d.ts.map +1 -0
- package/esm/services/list-service.spec.js +254 -0
- package/esm/services/list-service.spec.js.map +1 -0
- package/esm/services/palette-css-vars.d.ts +12 -0
- package/esm/services/palette-css-vars.d.ts.map +1 -0
- package/esm/services/palette-css-vars.js +44 -0
- package/esm/services/palette-css-vars.js.map +1 -0
- package/esm/services/theme-provider-service.d.ts +445 -2
- package/esm/services/theme-provider-service.d.ts.map +1 -1
- package/esm/services/theme-provider-service.js.map +1 -1
- package/esm/services/theme-provider-service.spec.d.ts +2 -0
- package/esm/services/theme-provider-service.spec.d.ts.map +1 -0
- package/esm/services/theme-provider-service.spec.js +166 -0
- package/esm/services/theme-provider-service.spec.js.map +1 -0
- package/esm/services/tree-service.d.ts +61 -0
- package/esm/services/tree-service.d.ts.map +1 -0
- package/esm/services/tree-service.js +149 -0
- package/esm/services/tree-service.js.map +1 -0
- package/esm/services/tree-service.spec.d.ts +2 -0
- package/esm/services/tree-service.spec.d.ts.map +1 -0
- package/esm/services/tree-service.spec.js +307 -0
- package/esm/services/tree-service.spec.js.map +1 -0
- package/esm/utils/promisify-animation.d.ts.map +1 -1
- package/esm/utils/promisify-animation.js +6 -1
- package/esm/utils/promisify-animation.js.map +1 -1
- package/package.json +4 -4
- package/src/components/accordion/accordion-item.tsx +197 -0
- package/src/components/accordion/accordion.spec.tsx +418 -0
- package/src/components/accordion/accordion.tsx +50 -0
- package/src/components/accordion/index.ts +2 -0
- package/src/components/alert.spec.tsx +256 -0
- package/src/components/alert.tsx +186 -0
- package/src/components/animations.spec.ts +299 -0
- package/src/components/app-bar-link.spec.tsx +344 -0
- package/src/components/app-bar-link.tsx +44 -25
- package/src/components/app-bar.spec.tsx +157 -0
- package/src/components/app-bar.tsx +31 -24
- package/src/components/avatar.spec.tsx +146 -0
- package/src/components/avatar.tsx +56 -60
- package/src/components/badge.spec.tsx +228 -0
- package/src/components/badge.tsx +104 -0
- package/src/components/breadcrumb.spec.tsx +396 -0
- package/src/components/breadcrumb.tsx +188 -0
- package/src/components/button-group.spec.tsx +611 -0
- package/src/components/button-group.tsx +423 -0
- package/src/components/button.spec.tsx +383 -0
- package/src/components/button.tsx +211 -196
- package/src/components/card.spec.tsx +389 -0
- package/src/components/card.tsx +261 -0
- package/src/components/carousel.spec.tsx +894 -0
- package/src/components/carousel.tsx +376 -0
- package/src/components/chip.spec.tsx +200 -0
- package/src/components/chip.tsx +188 -0
- package/src/components/circular-progress.spec.tsx +289 -0
- package/src/components/circular-progress.tsx +145 -0
- package/src/components/command-palette/command-palette-input.spec.tsx +331 -0
- package/src/components/command-palette/command-palette-input.tsx +40 -27
- package/src/components/command-palette/command-palette-manager.spec.ts +485 -0
- package/src/components/command-palette/command-palette-suggestion-list.spec.tsx +517 -0
- package/src/components/command-palette/command-palette-suggestion-list.tsx +55 -57
- package/src/components/command-palette/index.spec.tsx +684 -0
- package/src/components/command-palette/index.tsx +42 -148
- package/src/components/context-menu/context-menu-item.tsx +85 -0
- package/src/components/context-menu/context-menu-manager.spec.ts +478 -0
- package/src/components/context-menu/context-menu-manager.ts +148 -0
- package/src/components/context-menu/context-menu.spec.tsx +352 -0
- package/src/components/context-menu/context-menu.tsx +116 -0
- package/src/components/context-menu/index.ts +3 -0
- package/src/components/data-grid/body.spec.tsx +354 -0
- package/src/components/data-grid/body.tsx +1 -1
- package/src/components/data-grid/data-grid-row.spec.tsx +407 -0
- package/src/components/data-grid/data-grid-row.tsx +87 -102
- package/src/components/data-grid/data-grid.spec.tsx +964 -0
- package/src/components/data-grid/data-grid.tsx +45 -38
- package/src/components/data-grid/footer.spec.tsx +356 -0
- package/src/components/data-grid/footer.tsx +19 -19
- package/src/components/data-grid/header.spec.tsx +586 -0
- package/src/components/data-grid/header.tsx +104 -76
- package/src/components/data-grid/selection-cell.spec.tsx +151 -0
- package/src/components/data-grid/selection-cell.tsx +14 -12
- package/src/components/dialog.spec.tsx +135 -0
- package/src/components/dialog.tsx +277 -0
- package/src/components/divider.spec.tsx +197 -0
- package/src/components/divider.tsx +147 -0
- package/src/components/drawer/drawer-toggle-button.spec.tsx +374 -0
- package/src/components/drawer/drawer-toggle-button.tsx +124 -0
- package/src/components/drawer/index.spec.tsx +748 -0
- package/src/components/drawer/index.tsx +227 -0
- package/src/components/dropdown.spec.tsx +445 -0
- package/src/components/dropdown.tsx +343 -0
- package/src/components/fab.spec.tsx +119 -0
- package/src/components/fab.tsx +40 -8
- package/src/components/form.spec.tsx +491 -0
- package/src/components/form.tsx +10 -7
- package/src/components/grid.spec.tsx +427 -0
- package/src/components/grid.tsx +60 -66
- package/src/components/icons/icon-definitions.spec.ts +68 -0
- package/src/components/icons/icon-definitions.ts +509 -0
- package/src/components/icons/icon-types.ts +48 -0
- package/src/components/icons/icon.spec.tsx +314 -0
- package/src/components/icons/icon.tsx +111 -0
- package/src/components/icons/index.ts +4 -0
- package/src/components/image.spec.tsx +748 -0
- package/src/components/image.tsx +520 -0
- package/src/components/index.ts +32 -4
- package/src/components/inputs/autocomplete.spec.tsx +267 -0
- package/src/components/inputs/autocomplete.tsx +13 -7
- package/src/components/inputs/checkbox.spec.tsx +377 -0
- package/src/components/inputs/checkbox.tsx +198 -0
- package/src/components/inputs/index.ts +7 -0
- package/src/components/inputs/input-number.spec.tsx +686 -0
- package/src/components/inputs/input-number.tsx +387 -0
- package/src/components/inputs/input.spec.tsx +844 -0
- package/src/components/inputs/input.tsx +191 -218
- package/src/components/inputs/radio-group.spec.tsx +281 -0
- package/src/components/inputs/radio-group.tsx +108 -0
- package/src/components/inputs/radio.spec.tsx +273 -0
- package/src/components/inputs/radio.tsx +199 -0
- package/src/components/inputs/select.spec.tsx +1237 -0
- package/src/components/inputs/select.tsx +775 -0
- package/src/components/inputs/slider.spec.tsx +1020 -0
- package/src/components/inputs/slider.tsx +696 -0
- package/src/components/inputs/switch.spec.tsx +410 -0
- package/src/components/inputs/switch.tsx +218 -0
- package/src/components/inputs/text-area.spec.tsx +300 -0
- package/src/components/inputs/text-area.tsx +47 -79
- package/src/components/linear-progress.spec.tsx +320 -0
- package/src/components/linear-progress.tsx +127 -0
- package/src/components/list/index.ts +2 -0
- package/src/components/list/list-item.tsx +106 -0
- package/src/components/list/list.spec.tsx +817 -0
- package/src/components/list/list.tsx +92 -0
- package/src/components/loader.spec.tsx +362 -0
- package/src/components/loader.tsx +18 -10
- package/src/components/menu/index.ts +2 -0
- package/src/components/menu/menu-types.spec.ts +122 -0
- package/src/components/menu/menu-types.ts +43 -0
- package/src/components/menu/menu.spec.tsx +483 -0
- package/src/components/menu/menu.tsx +326 -0
- package/src/components/modal.spec.tsx +314 -0
- package/src/components/modal.tsx +20 -15
- package/src/components/noty-list.spec.tsx +634 -0
- package/src/components/noty-list.tsx +98 -101
- package/src/components/page-container/index.spec.tsx +274 -0
- package/src/components/page-container/index.tsx +82 -0
- package/src/components/page-container/page-header.spec.tsx +308 -0
- package/src/components/page-container/page-header.tsx +127 -0
- package/src/components/page-layout/index.spec.tsx +882 -0
- package/src/components/page-layout/index.tsx +392 -0
- package/src/components/pagination.spec.tsx +275 -0
- package/src/components/pagination.tsx +249 -0
- package/src/components/paper.spec.tsx +80 -0
- package/src/components/paper.tsx +21 -17
- package/src/components/rating.spec.tsx +866 -0
- package/src/components/rating.tsx +286 -0
- package/src/components/result.spec.tsx +221 -0
- package/src/components/result.tsx +155 -0
- package/src/components/searchable-input-styles.ts +81 -0
- package/src/components/skeleton.spec.tsx +227 -0
- package/src/components/skeleton.tsx +24 -7
- package/src/components/styles.spec.ts +69 -0
- package/src/components/styles.tsx +15 -13
- package/src/components/suggest/index.spec.tsx +885 -0
- package/src/components/suggest/index.tsx +36 -130
- package/src/components/suggest/suggest-input.spec.tsx +195 -0
- package/src/components/suggest/suggest-input.tsx +23 -29
- package/src/components/suggest/suggest-manager.spec.ts +419 -0
- package/src/components/suggest/suggestion-list.spec.tsx +355 -0
- package/src/components/suggest/suggestion-list.tsx +54 -58
- package/src/components/tabs.spec.tsx +598 -0
- package/src/components/tabs.tsx +241 -26
- package/src/components/timeline.spec.tsx +294 -0
- package/src/components/timeline.tsx +221 -0
- package/src/components/tooltip.spec.tsx +223 -0
- package/src/components/tooltip.tsx +155 -0
- package/src/components/tree/index.ts +2 -0
- package/src/components/tree/tree-item.tsx +161 -0
- package/src/components/tree/tree.spec.tsx +677 -0
- package/src/components/tree/tree.tsx +111 -0
- package/src/components/typography.spec.tsx +235 -0
- package/src/components/typography.tsx +292 -0
- package/src/components/wizard/index.spec.tsx +233 -0
- package/src/components/wizard/index.tsx +10 -9
- package/src/services/click-away-service.ts +9 -3
- package/src/services/collection-service.spec.ts +492 -3
- package/src/services/css-variable-theme.spec.ts +372 -0
- package/src/services/css-variable-theme.ts +128 -3
- package/src/services/default-dark-theme.ts +89 -3
- package/src/services/default-light-theme.ts +88 -2
- package/src/services/default-palette.ts +22 -0
- package/src/services/index.ts +6 -2
- package/src/services/layout-service.spec.ts +535 -0
- package/src/services/layout-service.ts +391 -0
- package/src/services/list-service.spec.ts +364 -0
- package/src/services/list-service.ts +169 -0
- package/src/services/palette-css-vars.ts +46 -0
- package/src/services/theme-provider-service.spec.ts +195 -0
- package/src/services/theme-provider-service.ts +305 -2
- package/src/services/tree-service.spec.ts +428 -0
- package/src/services/tree-service.ts +179 -0
- package/src/utils/promisify-animation.ts +7 -1
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { Injector } from '@furystack/inject';
|
|
2
|
+
import { createComponent, initializeShadeRoot } from '@furystack/shades';
|
|
3
|
+
import { sleepAsync, usingAsync } from '@furystack/utils';
|
|
4
|
+
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
|
|
5
|
+
import { CollectionService } from '../../services/collection-service.js';
|
|
6
|
+
import { SelectionCell } from './selection-cell.js';
|
|
7
|
+
describe('SelectionCell', () => {
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
document.body.innerHTML = '<div id="root"></div>';
|
|
10
|
+
});
|
|
11
|
+
afterEach(() => {
|
|
12
|
+
document.body.innerHTML = '';
|
|
13
|
+
});
|
|
14
|
+
const renderSelectionCell = async (entry, service) => {
|
|
15
|
+
const injector = new Injector();
|
|
16
|
+
const root = document.getElementById('root');
|
|
17
|
+
initializeShadeRoot({
|
|
18
|
+
injector,
|
|
19
|
+
rootElement: root,
|
|
20
|
+
jsxElement: createComponent(SelectionCell, { entry: entry, service: service }),
|
|
21
|
+
});
|
|
22
|
+
await sleepAsync(50);
|
|
23
|
+
return {
|
|
24
|
+
injector,
|
|
25
|
+
cell: root.querySelector('shades-data-grid-selection-cell'),
|
|
26
|
+
getCheckbox: () => root.querySelector('shades-data-grid-selection-cell')?.querySelector('input[type="checkbox"]'),
|
|
27
|
+
[Symbol.asyncDispose]: () => injector[Symbol.asyncDispose](),
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
describe('rendering', () => {
|
|
31
|
+
it('should render a checkbox input', async () => {
|
|
32
|
+
await usingAsync(new CollectionService(), async (service) => {
|
|
33
|
+
const entry = { id: 1, name: 'Test' };
|
|
34
|
+
await usingAsync(await renderSelectionCell(entry, service), async ({ cell, getCheckbox }) => {
|
|
35
|
+
expect(cell).toBeTruthy();
|
|
36
|
+
expect(getCheckbox()).toBeTruthy();
|
|
37
|
+
expect(getCheckbox()?.type).toBe('checkbox');
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
describe('checkbox state sync', () => {
|
|
43
|
+
it('should be unchecked when entry is not selected', async () => {
|
|
44
|
+
await usingAsync(new CollectionService(), async (service) => {
|
|
45
|
+
const entry = { id: 1, name: 'Test' };
|
|
46
|
+
await usingAsync(await renderSelectionCell(entry, service), async ({ getCheckbox }) => {
|
|
47
|
+
expect(getCheckbox()?.checked).toBe(false);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
it('should be checked when entry is in selection', async () => {
|
|
52
|
+
await usingAsync(new CollectionService(), async (service) => {
|
|
53
|
+
const entry = { id: 1, name: 'Test' };
|
|
54
|
+
service.selection.setValue([entry]);
|
|
55
|
+
await usingAsync(await renderSelectionCell(entry, service), async ({ getCheckbox }) => {
|
|
56
|
+
expect(getCheckbox()?.checked).toBe(true);
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
it('should update checkbox when selection changes externally', async () => {
|
|
61
|
+
await usingAsync(new CollectionService(), async (service) => {
|
|
62
|
+
const entry = { id: 1, name: 'Test' };
|
|
63
|
+
await usingAsync(await renderSelectionCell(entry, service), async ({ getCheckbox }) => {
|
|
64
|
+
expect(getCheckbox()?.checked).toBe(false);
|
|
65
|
+
service.selection.setValue([entry]);
|
|
66
|
+
await sleepAsync(50);
|
|
67
|
+
expect(getCheckbox()?.checked).toBe(true);
|
|
68
|
+
service.selection.setValue([]);
|
|
69
|
+
await sleepAsync(50);
|
|
70
|
+
expect(getCheckbox()?.checked).toBe(false);
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
it('should remain unchecked when different entries are selected', async () => {
|
|
75
|
+
await usingAsync(new CollectionService(), async (service) => {
|
|
76
|
+
const entry = { id: 1, name: 'Test' };
|
|
77
|
+
const otherEntry = { id: 2, name: 'Other' };
|
|
78
|
+
service.selection.setValue([otherEntry]);
|
|
79
|
+
await usingAsync(await renderSelectionCell(entry, service), async ({ getCheckbox }) => {
|
|
80
|
+
expect(getCheckbox()?.checked).toBe(false);
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
describe('selection toggle', () => {
|
|
86
|
+
it('should add entry to selection when checkbox is clicked and entry is not selected', async () => {
|
|
87
|
+
await usingAsync(new CollectionService(), async (service) => {
|
|
88
|
+
const entry = { id: 1, name: 'Test' };
|
|
89
|
+
await usingAsync(await renderSelectionCell(entry, service), async ({ getCheckbox }) => {
|
|
90
|
+
expect(service.selection.getValue()).toEqual([]);
|
|
91
|
+
const checkbox = getCheckbox();
|
|
92
|
+
checkbox?.dispatchEvent(new Event('change', { bubbles: true }));
|
|
93
|
+
await sleepAsync(50);
|
|
94
|
+
expect(service.selection.getValue()).toContain(entry);
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
it('should remove entry from selection when checkbox is clicked and entry is selected', async () => {
|
|
99
|
+
await usingAsync(new CollectionService(), async (service) => {
|
|
100
|
+
const entry = { id: 1, name: 'Test' };
|
|
101
|
+
service.selection.setValue([entry]);
|
|
102
|
+
await usingAsync(await renderSelectionCell(entry, service), async ({ getCheckbox }) => {
|
|
103
|
+
expect(service.selection.getValue()).toContain(entry);
|
|
104
|
+
const checkbox = getCheckbox();
|
|
105
|
+
checkbox?.dispatchEvent(new Event('change', { bubbles: true }));
|
|
106
|
+
await sleepAsync(50);
|
|
107
|
+
expect(service.selection.getValue()).not.toContain(entry);
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
it('should preserve other selected entries when toggling', async () => {
|
|
112
|
+
await usingAsync(new CollectionService(), async (service) => {
|
|
113
|
+
const entry = { id: 1, name: 'Test' };
|
|
114
|
+
const otherEntry = { id: 2, name: 'Other' };
|
|
115
|
+
service.selection.setValue([otherEntry]);
|
|
116
|
+
await usingAsync(await renderSelectionCell(entry, service), async ({ getCheckbox }) => {
|
|
117
|
+
const checkbox = getCheckbox();
|
|
118
|
+
checkbox?.dispatchEvent(new Event('change', { bubbles: true }));
|
|
119
|
+
await sleepAsync(50);
|
|
120
|
+
expect(service.selection.getValue()).toContain(entry);
|
|
121
|
+
expect(service.selection.getValue()).toContain(otherEntry);
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
//# sourceMappingURL=selection-cell.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection-cell.spec.js","sourceRoot":"","sources":["../../../src/components/data-grid/selection-cell.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AACxE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACzD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAA;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAInD,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,UAAU,CAAC,GAAG,EAAE;QACd,QAAQ,CAAC,IAAI,CAAC,SAAS,GAAG,uBAAuB,CAAA;IACnD,CAAC,CAAC,CAAA;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,QAAQ,CAAC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAA;IAC9B,CAAC,CAAC,CAAA;IAEF,MAAM,mBAAmB,GAAG,KAAK,EAAE,KAAgB,EAAE,OAAqC,EAAE,EAAE;QAC5F,MAAM,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAA;QAC/B,MAAM,IAAI,GAAG,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAE,CAAA;QAC7C,mBAAmB,CAAC;YAClB,QAAQ;YAC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oBAC9B,QAAQ,EAAE,aAAa,CAAC,IAAI,KAAK,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;oBAC/D,MAAM,UAAU,CAAC,EAAE,CAAC,CAAA;oBAEpB,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;oBACrD,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;gBAC5D,CAAC,CAAC,CAAA;YACJ,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export type DialogProps = {
|
|
2
|
+
isVisible: boolean;
|
|
3
|
+
title?: string;
|
|
4
|
+
onClose?: () => void;
|
|
5
|
+
actions?: JSX.Element;
|
|
6
|
+
maxWidth?: string;
|
|
7
|
+
fullWidth?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const Dialog: (props: DialogProps & Omit<Partial<HTMLElement>, "style"> & {
|
|
10
|
+
style?: Partial<CSSStyleDeclaration>;
|
|
11
|
+
} & {
|
|
12
|
+
ref?: import("@furystack/shades").RefObject<Element>;
|
|
13
|
+
}, children?: import("@furystack/shades").ChildrenList) => JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* Options for the confirm dialog helper
|
|
16
|
+
*/
|
|
17
|
+
export type ConfirmDialogOptions = {
|
|
18
|
+
title: string;
|
|
19
|
+
message: string | JSX.Element;
|
|
20
|
+
confirmText?: string;
|
|
21
|
+
cancelText?: string;
|
|
22
|
+
onConfirm: () => void;
|
|
23
|
+
onCancel?: () => void;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Renders a pre-built confirm dialog with confirm/cancel buttons.
|
|
27
|
+
* Returns a JSX element that should be placed in the component tree.
|
|
28
|
+
*
|
|
29
|
+
* @param isVisible - Boolean controlling the dialog visibility
|
|
30
|
+
* @param options - Configuration for the confirm dialog
|
|
31
|
+
* @returns A Dialog JSX element
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```tsx
|
|
35
|
+
* const [isConfirmOpen, setConfirmOpen] = useState('confirmOpen', false)
|
|
36
|
+
* // ...
|
|
37
|
+
* {ConfirmDialog(isConfirmOpen, {
|
|
38
|
+
* title: 'Delete Item',
|
|
39
|
+
* message: 'Are you sure you want to delete this item?',
|
|
40
|
+
* onConfirm: () => { deleteItem(); setConfirmOpen(false) },
|
|
41
|
+
* onCancel: () => setConfirmOpen(false),
|
|
42
|
+
* })}
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export declare const ConfirmDialog: (isVisible: boolean, options: ConfirmDialogOptions) => JSX.Element;
|
|
46
|
+
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/components/dialog.tsx"],"names":[],"mappings":"AAOA,MAAM,MAAM,WAAW,GAAG;IACxB,SAAS,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,OAAO,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAsCD,eAAO,MAAM,MAAM;;;;sEAwHjB,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,CAAA;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;CACtB,CAAA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,aAAa,GAAI,WAAW,OAAO,EAAE,SAAS,oBAAoB,KAAG,GAAG,CAAC,OAsErF,CAAA"}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { Shade, createComponent } from '@furystack/shades';
|
|
2
|
+
import { buildTransition, cssVariableTheme } from '../services/css-variable-theme.js';
|
|
3
|
+
import { promisifyAnimation } from '../utils/promisify-animation.js';
|
|
4
|
+
import { Icon } from './icons/icon.js';
|
|
5
|
+
import { close } from './icons/icon-definitions.js';
|
|
6
|
+
import { Modal } from './modal.js';
|
|
7
|
+
const showAnimation = async (el) => {
|
|
8
|
+
const panel = el?.querySelector?.('.dialog-panel');
|
|
9
|
+
if (panel) {
|
|
10
|
+
await promisifyAnimation(panel, [
|
|
11
|
+
{ opacity: 0, transform: 'scale(0.9)' },
|
|
12
|
+
{ opacity: 1, transform: 'scale(1)' },
|
|
13
|
+
], {
|
|
14
|
+
duration: 200,
|
|
15
|
+
easing: 'cubic-bezier(0.4, 0, 0.2, 1)',
|
|
16
|
+
fill: 'forwards',
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
const hideAnimation = async (el) => {
|
|
21
|
+
const panel = el?.querySelector?.('.dialog-panel');
|
|
22
|
+
if (panel) {
|
|
23
|
+
await promisifyAnimation(panel, [
|
|
24
|
+
{ opacity: 1, transform: 'scale(1)' },
|
|
25
|
+
{ opacity: 0, transform: 'scale(0.9)' },
|
|
26
|
+
], {
|
|
27
|
+
duration: 150,
|
|
28
|
+
easing: 'cubic-bezier(0.4, 0, 0.2, 1)',
|
|
29
|
+
fill: 'forwards',
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
export const Dialog = Shade({
|
|
34
|
+
shadowDomName: 'shade-dialog',
|
|
35
|
+
css: {
|
|
36
|
+
'& .dialog-panel': {
|
|
37
|
+
position: 'relative',
|
|
38
|
+
display: 'flex',
|
|
39
|
+
flexDirection: 'column',
|
|
40
|
+
backgroundColor: cssVariableTheme.background.paper,
|
|
41
|
+
color: cssVariableTheme.text.primary,
|
|
42
|
+
borderRadius: cssVariableTheme.shape.borderRadius.md,
|
|
43
|
+
boxShadow: cssVariableTheme.shadows.xl,
|
|
44
|
+
margin: cssVariableTheme.spacing.lg,
|
|
45
|
+
maxHeight: 'calc(100vh - 64px)',
|
|
46
|
+
overflow: 'hidden',
|
|
47
|
+
fontFamily: cssVariableTheme.typography.fontFamily,
|
|
48
|
+
},
|
|
49
|
+
'& .dialog-header': {
|
|
50
|
+
display: 'flex',
|
|
51
|
+
alignItems: 'center',
|
|
52
|
+
justifyContent: 'space-between',
|
|
53
|
+
padding: `${cssVariableTheme.spacing.md} ${cssVariableTheme.spacing.lg}`,
|
|
54
|
+
borderBottom: `1px solid ${cssVariableTheme.divider}`,
|
|
55
|
+
flexShrink: '0',
|
|
56
|
+
},
|
|
57
|
+
'& .dialog-title': {
|
|
58
|
+
margin: '0',
|
|
59
|
+
fontSize: cssVariableTheme.typography.fontSize.lg,
|
|
60
|
+
fontWeight: cssVariableTheme.typography.fontWeight.semibold,
|
|
61
|
+
lineHeight: cssVariableTheme.typography.lineHeight.tight,
|
|
62
|
+
},
|
|
63
|
+
'& .dialog-close': {
|
|
64
|
+
display: 'inline-flex',
|
|
65
|
+
alignItems: 'center',
|
|
66
|
+
justifyContent: 'center',
|
|
67
|
+
width: '32px',
|
|
68
|
+
height: '32px',
|
|
69
|
+
border: 'none',
|
|
70
|
+
background: 'transparent',
|
|
71
|
+
color: cssVariableTheme.text.secondary,
|
|
72
|
+
borderRadius: cssVariableTheme.shape.borderRadius.sm,
|
|
73
|
+
cursor: 'pointer',
|
|
74
|
+
fontSize: '18px',
|
|
75
|
+
lineHeight: '1',
|
|
76
|
+
padding: '0',
|
|
77
|
+
flexShrink: '0',
|
|
78
|
+
transition: buildTransition(['background', cssVariableTheme.transitions.duration.fast, cssVariableTheme.transitions.easing.default], ['color', cssVariableTheme.transitions.duration.fast, cssVariableTheme.transitions.easing.default]),
|
|
79
|
+
},
|
|
80
|
+
'& .dialog-close:hover': {
|
|
81
|
+
background: cssVariableTheme.action.hoverBackground,
|
|
82
|
+
color: cssVariableTheme.text.primary,
|
|
83
|
+
},
|
|
84
|
+
'& .dialog-body': {
|
|
85
|
+
padding: cssVariableTheme.spacing.lg,
|
|
86
|
+
overflowY: 'auto',
|
|
87
|
+
flex: '1',
|
|
88
|
+
},
|
|
89
|
+
'& .dialog-actions': {
|
|
90
|
+
display: 'flex',
|
|
91
|
+
alignItems: 'center',
|
|
92
|
+
justifyContent: 'flex-end',
|
|
93
|
+
padding: `${cssVariableTheme.spacing.sm} ${cssVariableTheme.spacing.lg}`,
|
|
94
|
+
borderTop: `1px solid ${cssVariableTheme.divider}`,
|
|
95
|
+
gap: cssVariableTheme.spacing.sm,
|
|
96
|
+
flexShrink: '0',
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
render: ({ props, children }) => {
|
|
100
|
+
const { isVisible, title, onClose, actions, maxWidth = '560px', fullWidth } = props;
|
|
101
|
+
const handleClose = () => {
|
|
102
|
+
onClose?.();
|
|
103
|
+
};
|
|
104
|
+
return (createComponent(Modal, { isVisible: isVisible, onClose: handleClose, showAnimation: showAnimation, hideAnimation: hideAnimation, backdropStyle: {
|
|
105
|
+
display: 'flex',
|
|
106
|
+
alignItems: 'center',
|
|
107
|
+
justifyContent: 'center',
|
|
108
|
+
backgroundColor: cssVariableTheme.action.backdrop,
|
|
109
|
+
zIndex: '1300',
|
|
110
|
+
} },
|
|
111
|
+
createComponent("div", { className: "dialog-panel", style: {
|
|
112
|
+
width: fullWidth ? '100%' : undefined,
|
|
113
|
+
maxWidth,
|
|
114
|
+
}, onclick: (ev) => ev.stopPropagation() },
|
|
115
|
+
title || onClose ? (createComponent("div", { className: "dialog-header" },
|
|
116
|
+
title ? createComponent("h2", { className: "dialog-title" }, title) : createComponent("span", null),
|
|
117
|
+
onClose ? (createComponent("button", { className: "dialog-close", onclick: handleClose, "aria-label": "Close dialog" },
|
|
118
|
+
createComponent(Icon, { icon: close, size: "small" }))) : null)) : null,
|
|
119
|
+
createComponent("div", { className: "dialog-body" }, children),
|
|
120
|
+
actions ? createComponent("div", { className: "dialog-actions" }, actions) : null)));
|
|
121
|
+
},
|
|
122
|
+
});
|
|
123
|
+
/**
|
|
124
|
+
* Renders a pre-built confirm dialog with confirm/cancel buttons.
|
|
125
|
+
* Returns a JSX element that should be placed in the component tree.
|
|
126
|
+
*
|
|
127
|
+
* @param isVisible - Boolean controlling the dialog visibility
|
|
128
|
+
* @param options - Configuration for the confirm dialog
|
|
129
|
+
* @returns A Dialog JSX element
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* ```tsx
|
|
133
|
+
* const [isConfirmOpen, setConfirmOpen] = useState('confirmOpen', false)
|
|
134
|
+
* // ...
|
|
135
|
+
* {ConfirmDialog(isConfirmOpen, {
|
|
136
|
+
* title: 'Delete Item',
|
|
137
|
+
* message: 'Are you sure you want to delete this item?',
|
|
138
|
+
* onConfirm: () => { deleteItem(); setConfirmOpen(false) },
|
|
139
|
+
* onCancel: () => setConfirmOpen(false),
|
|
140
|
+
* })}
|
|
141
|
+
* ```
|
|
142
|
+
*/
|
|
143
|
+
export const ConfirmDialog = (isVisible, options) => {
|
|
144
|
+
const { title, message, confirmText = 'Confirm', cancelText = 'Cancel', onConfirm, onCancel } = options;
|
|
145
|
+
const handleCancel = () => {
|
|
146
|
+
onCancel?.();
|
|
147
|
+
};
|
|
148
|
+
const handleConfirm = () => {
|
|
149
|
+
onConfirm();
|
|
150
|
+
};
|
|
151
|
+
return (createComponent(Dialog, { isVisible: isVisible, title: title, onClose: handleCancel, maxWidth: "440px", actions: createComponent(createComponent, null,
|
|
152
|
+
createComponent("button", { className: "dialog-cancel-btn", onclick: handleCancel, style: {
|
|
153
|
+
padding: '8px 16px',
|
|
154
|
+
border: 'none',
|
|
155
|
+
borderRadius: '4px',
|
|
156
|
+
background: 'transparent',
|
|
157
|
+
color: cssVariableTheme.text.secondary,
|
|
158
|
+
cursor: 'pointer',
|
|
159
|
+
fontSize: cssVariableTheme.typography.fontSize.md,
|
|
160
|
+
fontWeight: cssVariableTheme.typography.fontWeight.medium,
|
|
161
|
+
} }, cancelText),
|
|
162
|
+
createComponent("button", { className: "dialog-confirm-btn", onclick: handleConfirm, style: {
|
|
163
|
+
padding: '8px 16px',
|
|
164
|
+
border: 'none',
|
|
165
|
+
borderRadius: '4px',
|
|
166
|
+
background: cssVariableTheme.palette.primary.main,
|
|
167
|
+
color: cssVariableTheme.palette.primary.mainContrast,
|
|
168
|
+
cursor: 'pointer',
|
|
169
|
+
fontSize: cssVariableTheme.typography.fontSize.md,
|
|
170
|
+
fontWeight: cssVariableTheme.typography.fontWeight.medium,
|
|
171
|
+
} }, confirmText)) }, typeof message === 'string' ? (createComponent("p", { style: {
|
|
172
|
+
margin: '0',
|
|
173
|
+
fontSize: cssVariableTheme.typography.fontSize.md,
|
|
174
|
+
lineHeight: cssVariableTheme.typography.lineHeight.normal,
|
|
175
|
+
color: cssVariableTheme.text.secondary,
|
|
176
|
+
} }, message)) : (message)));
|
|
177
|
+
};
|
|
178
|
+
//# sourceMappingURL=dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/components/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAA;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAA;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6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,CAAC,CAAC,CAAC,CAC7B,uBACE,KAAK,EAAE;YACL,MAAM,EAAE,GAAG;YACX,QAAQ,EAAE,gBAAgB,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;YACjD,UAAU,EAAE,gBAAgB,CAAC,UAAU,CAAC,UAAU,CAAC,MAAM;YACzD,KAAK,EAAE,gBAAgB,CAAC,IAAI,CAAC,SAAS;SACvC,IAEA,OAAO,CACN,CACL,CAAC,CAAC,CAAC,CACF,OAAO,CACR,CACM,CACV,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.spec.d.ts","sourceRoot":"","sources":["../../src/components/dialog.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { createComponent } from '@furystack/shades';
|
|
2
|
+
import { describe, expect, it, vi } from 'vitest';
|
|
3
|
+
import { ConfirmDialog, Dialog } from './dialog.js';
|
|
4
|
+
describe('Dialog', () => {
|
|
5
|
+
it('should be defined', () => {
|
|
6
|
+
expect(Dialog).toBeDefined();
|
|
7
|
+
expect(typeof Dialog).toBe('function');
|
|
8
|
+
});
|
|
9
|
+
it('should create a dialog element', () => {
|
|
10
|
+
const el = (createComponent(Dialog, { isVisible: true }));
|
|
11
|
+
expect(el).toBeDefined();
|
|
12
|
+
expect(el.tagName?.toLowerCase()).toBe('shade-dialog');
|
|
13
|
+
});
|
|
14
|
+
it('should pass title prop', () => {
|
|
15
|
+
const el = (createComponent(Dialog, { isVisible: true, title: "Test Title" }));
|
|
16
|
+
expect(el.props.title).toBe('Test Title');
|
|
17
|
+
});
|
|
18
|
+
it('should pass onClose prop', () => {
|
|
19
|
+
const onClose = vi.fn();
|
|
20
|
+
const el = (createComponent(Dialog, { isVisible: true, onClose: onClose }));
|
|
21
|
+
expect(el.props.onClose).toBe(onClose);
|
|
22
|
+
});
|
|
23
|
+
it('should pass actions prop', () => {
|
|
24
|
+
const actions = createComponent("button", null, "OK");
|
|
25
|
+
const el = (createComponent(Dialog, { isVisible: true, actions: actions }));
|
|
26
|
+
expect(el.props.actions).toBeDefined();
|
|
27
|
+
});
|
|
28
|
+
it('should pass maxWidth prop', () => {
|
|
29
|
+
const el = (createComponent(Dialog, { isVisible: true, maxWidth: "800px" }));
|
|
30
|
+
expect(el.props.maxWidth).toBe('800px');
|
|
31
|
+
});
|
|
32
|
+
it('should pass fullWidth prop', () => {
|
|
33
|
+
const el = (createComponent(Dialog, { isVisible: true, fullWidth: true }));
|
|
34
|
+
expect(el.props.fullWidth).toBe(true);
|
|
35
|
+
});
|
|
36
|
+
it('should pass children as dialog content', () => {
|
|
37
|
+
const el = (createComponent(Dialog, { isVisible: true },
|
|
38
|
+
createComponent("p", null, "Dialog content")));
|
|
39
|
+
expect(el).toBeDefined();
|
|
40
|
+
});
|
|
41
|
+
it('should accept isVisible boolean', () => {
|
|
42
|
+
const el = (createComponent(Dialog, { isVisible: false }));
|
|
43
|
+
expect(el.props.isVisible).toBe(false);
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
describe('ConfirmDialog', () => {
|
|
47
|
+
it('should be defined', () => {
|
|
48
|
+
expect(ConfirmDialog).toBeDefined();
|
|
49
|
+
expect(typeof ConfirmDialog).toBe('function');
|
|
50
|
+
});
|
|
51
|
+
it('should create a confirm dialog element', () => {
|
|
52
|
+
const onConfirm = vi.fn();
|
|
53
|
+
const el = ConfirmDialog(true, {
|
|
54
|
+
title: 'Confirm',
|
|
55
|
+
message: 'Are you sure?',
|
|
56
|
+
onConfirm,
|
|
57
|
+
});
|
|
58
|
+
expect(el).toBeDefined();
|
|
59
|
+
expect(el.tagName?.toLowerCase()).toBe('shade-dialog');
|
|
60
|
+
});
|
|
61
|
+
it('should pass the title to the dialog', () => {
|
|
62
|
+
const onConfirm = vi.fn();
|
|
63
|
+
const el = ConfirmDialog(true, {
|
|
64
|
+
title: 'Delete Item',
|
|
65
|
+
message: 'Are you sure?',
|
|
66
|
+
onConfirm,
|
|
67
|
+
});
|
|
68
|
+
expect(el.props.title).toBe('Delete Item');
|
|
69
|
+
});
|
|
70
|
+
it('should render with default button texts', () => {
|
|
71
|
+
const onConfirm = vi.fn();
|
|
72
|
+
const el = ConfirmDialog(true, {
|
|
73
|
+
title: 'Confirm',
|
|
74
|
+
message: 'Are you sure?',
|
|
75
|
+
onConfirm,
|
|
76
|
+
});
|
|
77
|
+
expect(el.props.actions).toBeDefined();
|
|
78
|
+
});
|
|
79
|
+
it('should accept custom button texts', () => {
|
|
80
|
+
const onConfirm = vi.fn();
|
|
81
|
+
const el = ConfirmDialog(true, {
|
|
82
|
+
title: 'Confirm',
|
|
83
|
+
message: 'Are you sure?',
|
|
84
|
+
confirmText: 'Yes, delete',
|
|
85
|
+
cancelText: 'No, keep',
|
|
86
|
+
onConfirm,
|
|
87
|
+
});
|
|
88
|
+
expect(el).toBeDefined();
|
|
89
|
+
});
|
|
90
|
+
it('should accept JSX as message', () => {
|
|
91
|
+
const onConfirm = vi.fn();
|
|
92
|
+
const el = ConfirmDialog(true, {
|
|
93
|
+
title: 'Confirm',
|
|
94
|
+
message: (createComponent("div", null,
|
|
95
|
+
createComponent("strong", null, "Warning:"),
|
|
96
|
+
" This action cannot be undone.")),
|
|
97
|
+
onConfirm,
|
|
98
|
+
});
|
|
99
|
+
expect(el).toBeDefined();
|
|
100
|
+
});
|
|
101
|
+
it('should call onCancel when onClose is triggered', () => {
|
|
102
|
+
const onCancel = vi.fn();
|
|
103
|
+
const el = ConfirmDialog(true, {
|
|
104
|
+
title: 'Confirm',
|
|
105
|
+
message: 'Are you sure?',
|
|
106
|
+
onConfirm: vi.fn(),
|
|
107
|
+
onCancel,
|
|
108
|
+
});
|
|
109
|
+
el.props.onClose?.();
|
|
110
|
+
expect(onCancel).toHaveBeenCalledOnce();
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
//# sourceMappingURL=dialog.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,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e;YACxB,SAAS,EAAE,EAAE,CAAC,EAAE,EAAE;YAClB,QAAQ;SACT,CAAsC,CAAA;QAEvC,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,CAAA;QACpB,MAAM,CAAC,QAAQ,CAAC,CAAC,oBAAoB,EAAE,CAAA;IACzC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { PartialElement } from '@furystack/shades';
|
|
2
|
+
export type DividerProps = PartialElement<HTMLElement> & {
|
|
3
|
+
/** Orientation of the divider */
|
|
4
|
+
orientation?: 'horizontal' | 'vertical';
|
|
5
|
+
/** Variant controls whether the divider spans the full width/height or is inset */
|
|
6
|
+
variant?: 'full' | 'inset' | 'middle';
|
|
7
|
+
/** Alignment of text content within the divider. Only applies to horizontal dividers with children. */
|
|
8
|
+
textAlign?: 'left' | 'center' | 'right';
|
|
9
|
+
};
|
|
10
|
+
export declare const Divider: (props: Omit<Partial<HTMLElement>, "style"> & {
|
|
11
|
+
style?: Partial<CSSStyleDeclaration>;
|
|
12
|
+
} & {
|
|
13
|
+
ref?: import("@furystack/shades").RefObject<Element>;
|
|
14
|
+
} & {
|
|
15
|
+
/** Orientation of the divider */
|
|
16
|
+
orientation?: "horizontal" | "vertical";
|
|
17
|
+
/** Variant controls whether the divider spans the full width/height or is inset */
|
|
18
|
+
variant?: "full" | "inset" | "middle";
|
|
19
|
+
/** Alignment of text content within the divider. Only applies to horizontal dividers with children. */
|
|
20
|
+
textAlign?: "left" | "center" | "right";
|
|
21
|
+
}, children?: import("@furystack/shades").ChildrenList) => JSX.Element;
|
|
22
|
+
//# sourceMappingURL=divider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"divider.d.ts","sourceRoot":"","sources":["../../src/components/divider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAIvD,MAAM,MAAM,YAAY,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IACvD,iCAAiC;IACjC,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IACvC,mFAAmF;IACnF,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAA;IACrC,uGAAuG;IACvG,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAA;CACxC,CAAA;AAED,eAAO,MAAM,OAAO;;;;;IARlB,iCAAiC;kBACnB,YAAY,GAAG,UAAU;IACvC,mFAAmF;cACzE,MAAM,GAAG,OAAO,GAAG,QAAQ;IACrC,uGAAuG;gBAC3F,MAAM,GAAG,QAAQ,GAAG,OAAO;sEAwIvC,CAAA"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { Shade, createComponent } from '@furystack/shades';
|
|
2
|
+
import { cssVariableTheme } from '../services/css-variable-theme.js';
|
|
3
|
+
export const Divider = Shade({
|
|
4
|
+
shadowDomName: 'shade-divider',
|
|
5
|
+
css: {
|
|
6
|
+
display: 'flex',
|
|
7
|
+
alignItems: 'center',
|
|
8
|
+
margin: '0',
|
|
9
|
+
border: 'none',
|
|
10
|
+
flexShrink: '0',
|
|
11
|
+
// ==========================================
|
|
12
|
+
// HORIZONTAL (default)
|
|
13
|
+
// ==========================================
|
|
14
|
+
'&:not([data-orientation="vertical"])': {
|
|
15
|
+
width: '100%',
|
|
16
|
+
flexDirection: 'row',
|
|
17
|
+
},
|
|
18
|
+
// Horizontal line (no children)
|
|
19
|
+
'&:not([data-orientation="vertical"]):not([data-has-children])': {
|
|
20
|
+
borderTop: `1px solid ${cssVariableTheme.divider}`,
|
|
21
|
+
margin: `${cssVariableTheme.spacing.md} 0`,
|
|
22
|
+
},
|
|
23
|
+
// Horizontal with children: lines on both sides
|
|
24
|
+
'&:not([data-orientation="vertical"])[data-has-children]': {
|
|
25
|
+
margin: `${cssVariableTheme.spacing.md} 0`,
|
|
26
|
+
gap: cssVariableTheme.spacing.md,
|
|
27
|
+
},
|
|
28
|
+
'&:not([data-orientation="vertical"])[data-has-children]::before, &:not([data-orientation="vertical"])[data-has-children]::after': {
|
|
29
|
+
content: '""',
|
|
30
|
+
flex: '1',
|
|
31
|
+
borderTop: `1px solid ${cssVariableTheme.divider}`,
|
|
32
|
+
},
|
|
33
|
+
// Text align left: shrink left line
|
|
34
|
+
'&[data-text-align="left"]::before': {
|
|
35
|
+
flex: '0 0 10%',
|
|
36
|
+
},
|
|
37
|
+
// Text align right: shrink right line
|
|
38
|
+
'&[data-text-align="right"]::after': {
|
|
39
|
+
flex: '0 0 10%',
|
|
40
|
+
},
|
|
41
|
+
// Divider text styling
|
|
42
|
+
'& .divider-text': {
|
|
43
|
+
fontFamily: cssVariableTheme.typography.fontFamily,
|
|
44
|
+
fontSize: cssVariableTheme.typography.fontSize.sm,
|
|
45
|
+
color: cssVariableTheme.text.secondary,
|
|
46
|
+
whiteSpace: 'nowrap',
|
|
47
|
+
lineHeight: '1',
|
|
48
|
+
},
|
|
49
|
+
// ==========================================
|
|
50
|
+
// VERTICAL
|
|
51
|
+
// ==========================================
|
|
52
|
+
'&[data-orientation="vertical"]': {
|
|
53
|
+
flexDirection: 'column',
|
|
54
|
+
alignSelf: 'stretch',
|
|
55
|
+
height: 'auto',
|
|
56
|
+
width: 'auto',
|
|
57
|
+
},
|
|
58
|
+
// Vertical line (no children)
|
|
59
|
+
'&[data-orientation="vertical"]:not([data-has-children])': {
|
|
60
|
+
borderLeft: `1px solid ${cssVariableTheme.divider}`,
|
|
61
|
+
margin: `0 ${cssVariableTheme.spacing.md}`,
|
|
62
|
+
},
|
|
63
|
+
// Vertical with children
|
|
64
|
+
'&[data-orientation="vertical"][data-has-children]': {
|
|
65
|
+
margin: `0 ${cssVariableTheme.spacing.md}`,
|
|
66
|
+
gap: cssVariableTheme.spacing.sm,
|
|
67
|
+
},
|
|
68
|
+
'&[data-orientation="vertical"][data-has-children]::before, &[data-orientation="vertical"][data-has-children]::after': {
|
|
69
|
+
content: '""',
|
|
70
|
+
flex: '1',
|
|
71
|
+
borderLeft: `1px solid ${cssVariableTheme.divider}`,
|
|
72
|
+
},
|
|
73
|
+
// ==========================================
|
|
74
|
+
// VARIANT: INSET (indented on the start side)
|
|
75
|
+
// ==========================================
|
|
76
|
+
'&:not([data-orientation="vertical"])[data-variant="inset"]': {
|
|
77
|
+
marginLeft: cssVariableTheme.spacing.xl,
|
|
78
|
+
},
|
|
79
|
+
'&[data-orientation="vertical"][data-variant="inset"]': {
|
|
80
|
+
marginTop: cssVariableTheme.spacing.xl,
|
|
81
|
+
},
|
|
82
|
+
// ==========================================
|
|
83
|
+
// VARIANT: MIDDLE (indented on both sides)
|
|
84
|
+
// ==========================================
|
|
85
|
+
'&:not([data-orientation="vertical"])[data-variant="middle"]': {
|
|
86
|
+
marginLeft: cssVariableTheme.spacing.lg,
|
|
87
|
+
marginRight: cssVariableTheme.spacing.lg,
|
|
88
|
+
},
|
|
89
|
+
'&[data-orientation="vertical"][data-variant="middle"]': {
|
|
90
|
+
marginTop: cssVariableTheme.spacing.lg,
|
|
91
|
+
marginBottom: cssVariableTheme.spacing.lg,
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
render: ({ props, children, useHostProps }) => {
|
|
95
|
+
const { orientation, variant, textAlign, style } = props;
|
|
96
|
+
const isVertical = orientation === 'vertical';
|
|
97
|
+
const hasChildren = children && (Array.isArray(children) ? children.length > 0 : true);
|
|
98
|
+
useHostProps({
|
|
99
|
+
role: 'separator',
|
|
100
|
+
'data-orientation': isVertical ? 'vertical' : undefined,
|
|
101
|
+
'aria-orientation': isVertical ? 'vertical' : undefined,
|
|
102
|
+
'data-variant': variant && variant !== 'full' ? variant : undefined,
|
|
103
|
+
'data-has-children': hasChildren ? '' : undefined,
|
|
104
|
+
'data-text-align': textAlign && textAlign !== 'center' ? textAlign : undefined,
|
|
105
|
+
...(style ? { style: style } : {}),
|
|
106
|
+
});
|
|
107
|
+
if (hasChildren) {
|
|
108
|
+
return createComponent("span", { className: "divider-text" }, children);
|
|
109
|
+
}
|
|
110
|
+
return createComponent(createComponent, null);
|
|
111
|
+
},
|
|
112
|
+
});
|
|
113
|
+
//# sourceMappingURL=divider.js.map
|