@infonomic/uikit 6.9.1 → 7.1.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/README.md +186 -5
- package/dist/classes/accordion.d.ts +1 -0
- package/dist/classes/accordion.js +1 -0
- package/dist/classes/alert.d.ts +1 -0
- package/dist/classes/alert.js +1 -0
- package/dist/classes/autocomplete.d.ts +1 -0
- package/dist/classes/autocomplete.js +1 -0
- package/dist/classes/avatar.d.ts +1 -0
- package/dist/classes/avatar.js +1 -0
- package/dist/classes/badge.d.ts +1 -0
- package/dist/classes/badge.js +1 -0
- package/dist/classes/button-group.d.ts +1 -0
- package/dist/classes/button-group.js +1 -0
- package/dist/classes/button.d.ts +1 -0
- package/dist/classes/button.js +1 -0
- package/dist/classes/card.d.ts +1 -0
- package/dist/classes/card.js +1 -0
- package/dist/classes/checkbox-group.d.ts +1 -0
- package/dist/classes/checkbox-group.js +1 -0
- package/dist/classes/checkbox.d.ts +1 -0
- package/dist/classes/checkbox.js +1 -0
- package/dist/classes/chip.d.ts +1 -0
- package/dist/classes/chip.js +1 -0
- package/dist/classes/combo-button.d.ts +1 -0
- package/dist/classes/combo-button.js +1 -0
- package/dist/classes/container.d.ts +1 -0
- package/dist/classes/container.js +1 -0
- package/dist/classes/control-buttons.d.ts +1 -0
- package/dist/classes/control-buttons.js +1 -0
- package/dist/classes/copy-button.d.ts +1 -0
- package/dist/classes/copy-button.js +1 -0
- package/dist/classes/datepicker.d.ts +1 -0
- package/dist/classes/datepicker.js +1 -0
- package/dist/classes/drawer.d.ts +1 -0
- package/dist/classes/drawer.js +1 -0
- package/dist/classes/dropdown.d.ts +1 -0
- package/dist/classes/dropdown.js +1 -0
- package/dist/classes/ellipses.d.ts +1 -0
- package/dist/classes/ellipses.js +1 -0
- package/dist/classes/error-text.d.ts +1 -0
- package/dist/classes/error-text.js +1 -0
- package/dist/classes/hamburger.d.ts +1 -0
- package/dist/classes/hamburger.js +1 -0
- package/dist/classes/help-text.d.ts +1 -0
- package/dist/classes/help-text.js +1 -0
- package/dist/classes/input-adornment.d.ts +1 -0
- package/dist/classes/input-adornment.js +1 -0
- package/dist/classes/input-password.d.ts +1 -0
- package/dist/classes/input-password.js +1 -0
- package/dist/classes/input.d.ts +1 -0
- package/dist/classes/input.js +1 -0
- package/dist/classes/label.d.ts +1 -0
- package/dist/classes/label.js +1 -0
- package/dist/classes/modal.d.ts +1 -0
- package/dist/classes/modal.js +1 -0
- package/dist/classes/pagination.d.ts +1 -0
- package/dist/classes/pagination.js +1 -0
- package/dist/classes/radio-group.d.ts +1 -0
- package/dist/classes/radio-group.js +1 -0
- package/dist/classes/ring.d.ts +1 -0
- package/dist/classes/ring.js +1 -0
- package/dist/classes/scroll-area.d.ts +1 -0
- package/dist/classes/scroll-area.js +1 -0
- package/dist/classes/scroll-to-top.d.ts +1 -0
- package/dist/classes/scroll-to-top.js +1 -0
- package/dist/classes/section.d.ts +1 -0
- package/dist/classes/section.js +1 -0
- package/dist/classes/select.d.ts +1 -0
- package/dist/classes/select.js +1 -0
- package/dist/classes/shimmer.d.ts +1 -0
- package/dist/classes/shimmer.js +1 -0
- package/dist/classes/spinner.d.ts +1 -0
- package/dist/classes/spinner.js +1 -0
- package/dist/classes/table.d.ts +1 -0
- package/dist/classes/table.js +1 -0
- package/dist/classes/tabs.d.ts +1 -0
- package/dist/classes/tabs.js +1 -0
- package/dist/classes/text-area.d.ts +1 -0
- package/dist/classes/text-area.js +1 -0
- package/dist/classes/timeline.d.ts +1 -0
- package/dist/classes/timeline.js +1 -0
- package/dist/classes/toast.d.ts +1 -0
- package/dist/classes/toast.js +1 -0
- package/dist/classes/tooltip.d.ts +1 -0
- package/dist/classes/tooltip.js +1 -0
- package/dist/components/@types/contract.d.ts +69 -0
- package/dist/components/@types/contract.d.ts.map +1 -0
- package/dist/components/@types/contract.js +1 -0
- package/dist/components/accordion/accordion.classes.d.ts +18 -0
- package/dist/components/accordion/accordion.classes.d.ts.map +1 -0
- package/dist/components/accordion/accordion.classes.js +12 -0
- package/dist/components/accordion/accordion.contract.d.ts +33 -0
- package/dist/components/accordion/accordion.contract.d.ts.map +1 -0
- package/dist/components/accordion/accordion.contract.js +38 -0
- package/dist/components/accordion/accordion.d.ts.map +1 -1
- package/dist/components/accordion/accordion.js +6 -6
- package/dist/components/accordion/accordion.module.css +16 -5
- package/dist/components/accordion/accordion.module.css.d.ts +9 -0
- package/dist/components/accordion/accordion.module.d.css.ts +9 -0
- package/dist/components/accordion/accordion_module.css +4 -6
- package/dist/components/avatar/avatar.classes.d.ts +17 -0
- package/dist/components/avatar/avatar.classes.d.ts.map +1 -0
- package/dist/components/avatar/avatar.classes.js +11 -0
- package/dist/components/avatar/avatar.contract.d.ts +27 -0
- package/dist/components/avatar/avatar.contract.d.ts.map +1 -0
- package/dist/components/avatar/avatar.contract.js +27 -0
- package/dist/components/avatar/avatar.d.ts.map +1 -1
- package/dist/components/avatar/avatar.js +5 -6
- package/dist/components/avatar/avatar.module.css.d.ts +11 -0
- package/dist/components/avatar/avatar.module.d.css.ts +11 -0
- package/dist/components/badge/badge.classes.d.ts +16 -0
- package/dist/components/badge/badge.classes.d.ts.map +1 -0
- package/dist/components/badge/badge.classes.js +10 -0
- package/dist/components/badge/badge.contract.d.ts +23 -0
- package/dist/components/badge/badge.contract.d.ts.map +1 -0
- package/dist/components/badge/badge.contract.js +23 -0
- package/dist/components/badge/badge.js +4 -2
- package/dist/components/badge/badge.module.css.d.ts +11 -0
- package/dist/components/badge/badge.module.d.css.ts +11 -0
- package/dist/components/button/button-group.classes.d.ts +14 -0
- package/dist/components/button/button-group.classes.d.ts.map +1 -0
- package/dist/components/button/button-group.classes.js +8 -0
- package/dist/components/button/button-group.contract.d.ts +12 -0
- package/dist/components/button/button-group.contract.d.ts.map +1 -0
- package/dist/components/button/button-group.contract.js +12 -0
- package/dist/components/button/button-group.js +2 -2
- package/dist/components/button/button-group.module.css.d.ts +5 -0
- package/dist/components/button/button-group.module.d.css.ts +5 -0
- package/dist/components/button/button.astro +17 -19
- package/dist/components/button/button.classes.d.ts +24 -0
- package/dist/components/button/button.classes.d.ts.map +1 -0
- package/dist/components/button/button.classes.js +14 -0
- package/dist/components/button/button.contract.d.ts +45 -0
- package/dist/components/button/button.contract.d.ts.map +1 -0
- package/dist/components/button/button.contract.js +47 -0
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/button.js +9 -5
- package/dist/components/button/button.module.css +12 -0
- package/dist/components/button/button.module.css.d.ts +25 -0
- package/dist/components/button/button.module.d.css.ts +25 -0
- package/dist/components/button/button_module.css +6 -6
- package/dist/components/button/combo-button.classes.d.ts +30 -0
- package/dist/components/button/combo-button.classes.d.ts.map +1 -0
- package/dist/components/button/combo-button.classes.js +19 -0
- package/dist/components/button/combo-button.contract.d.ts +46 -0
- package/dist/components/button/combo-button.contract.d.ts.map +1 -0
- package/dist/components/button/combo-button.contract.js +48 -0
- package/dist/components/button/combo-button.d.ts.map +1 -1
- package/dist/components/button/combo-button.js +11 -11
- package/dist/components/button/combo-button.module.css +6 -2
- package/dist/components/button/combo-button.module.css.d.ts +17 -0
- package/dist/components/button/combo-button.module.d.css.ts +17 -0
- package/dist/components/button/combo-button_module.css +2 -2
- package/dist/components/button/control-buttons.classes.d.ts +26 -0
- package/dist/components/button/control-buttons.classes.d.ts.map +1 -0
- package/dist/components/button/control-buttons.classes.js +18 -0
- package/dist/components/button/control-buttons.contract.d.ts +60 -0
- package/dist/components/button/control-buttons.contract.d.ts.map +1 -0
- package/dist/components/button/control-buttons.contract.js +49 -0
- package/dist/components/button/control-buttons.d.ts.map +1 -1
- package/dist/components/button/control-buttons.js +14 -7
- package/dist/components/button/control-buttons.module.css +43 -17
- package/dist/components/button/control-buttons.module.css.d.ts +19 -0
- package/dist/components/button/control-buttons.module.d.css.ts +19 -0
- package/dist/components/button/control-buttons_module.css +17 -17
- package/dist/components/button/copy-button.classes.d.ts +20 -0
- package/dist/components/button/copy-button.classes.d.ts.map +1 -0
- package/dist/components/button/copy-button.classes.js +11 -0
- package/dist/components/button/copy-button.contract.d.ts +26 -0
- package/dist/components/button/copy-button.contract.d.ts.map +1 -0
- package/dist/components/button/copy-button.contract.js +26 -0
- package/dist/components/button/copy-button.d.ts.map +1 -1
- package/dist/components/button/copy-button.js +5 -3
- package/dist/components/button/copy-button.module.css.d.ts +12 -0
- package/dist/components/button/copy-button.module.d.css.ts +12 -0
- package/dist/components/button/icon-button.astro +3 -3
- package/dist/components/button/icon-button.js +5 -3
- package/dist/components/card/card-content.astro +2 -2
- package/dist/components/card/card-description.astro +2 -2
- package/dist/components/card/card-footer.astro +2 -2
- package/dist/components/card/card-header.astro +2 -2
- package/dist/components/card/card-title.astro +2 -2
- package/dist/components/card/card.astro +3 -3
- package/dist/components/card/card.classes.d.ts +23 -0
- package/dist/components/card/card.classes.d.ts.map +1 -0
- package/dist/components/card/card.classes.js +15 -0
- package/dist/components/card/card.contract.d.ts +42 -0
- package/dist/components/card/card.contract.d.ts.map +1 -0
- package/dist/components/card/card.contract.js +42 -0
- package/dist/components/card/card.d.ts.map +1 -1
- package/dist/components/card/card.js +9 -8
- package/dist/components/card/card.module.css.d.ts +16 -0
- package/dist/components/card/card.module.d.css.ts +16 -0
- package/dist/components/chips/chip.classes.d.ts +37 -0
- package/dist/components/chips/chip.classes.d.ts.map +1 -0
- package/dist/components/chips/chip.classes.js +16 -0
- package/dist/components/chips/chip.contract.d.ts +57 -0
- package/dist/components/chips/chip.contract.d.ts.map +1 -0
- package/dist/components/chips/chip.contract.js +59 -0
- package/dist/components/chips/chip.js +13 -9
- package/dist/components/chips/chip.module.css +45 -0
- package/dist/components/chips/chip.module.css.d.ts +26 -0
- package/dist/components/chips/chip.module.d.css.ts +26 -0
- package/dist/components/chips/chip_module.css +26 -5
- package/dist/components/container/container.astro +2 -2
- package/dist/components/container/container.classes.d.ts +14 -0
- package/dist/components/container/container.classes.d.ts.map +1 -0
- package/dist/components/container/container.classes.js +8 -0
- package/dist/components/container/container.contract.d.ts +12 -0
- package/dist/components/container/container.contract.d.ts.map +1 -0
- package/dist/components/container/container.contract.js +12 -0
- package/dist/components/container/container.js +2 -2
- package/dist/components/container/container.module.css.d.ts +4 -0
- package/dist/components/container/container.module.d.css.ts +4 -0
- package/dist/components/dropdown/dropdown.classes.d.ts +21 -0
- package/dist/components/dropdown/dropdown.classes.d.ts.map +1 -0
- package/dist/components/dropdown/dropdown.classes.js +15 -0
- package/dist/components/dropdown/dropdown.contract.d.ts +46 -0
- package/dist/components/dropdown/dropdown.contract.d.ts.map +1 -0
- package/dist/components/dropdown/dropdown.contract.js +53 -0
- package/dist/components/dropdown/dropdown.d.ts.map +1 -1
- package/dist/components/dropdown/dropdown.js +9 -9
- package/dist/components/dropdown/dropdown.module.css +11 -0
- package/dist/components/dropdown/dropdown.module.css.d.ts +15 -0
- package/dist/components/dropdown/dropdown.module.d.css.ts +15 -0
- package/dist/components/dropdown/dropdown_module.css +5 -0
- package/dist/components/hamburger/hamburger.astro +4 -6
- package/dist/components/hamburger/hamburger.classes.d.ts +26 -0
- package/dist/components/hamburger/hamburger.classes.d.ts.map +1 -0
- package/dist/components/hamburger/hamburger.classes.js +13 -0
- package/dist/components/hamburger/hamburger.contract.d.ts +31 -0
- package/dist/components/hamburger/hamburger.contract.d.ts.map +1 -0
- package/dist/components/hamburger/hamburger.contract.js +31 -0
- package/dist/components/hamburger/hamburger.d.ts.map +1 -1
- package/dist/components/hamburger/hamburger.js +7 -8
- package/dist/components/hamburger/hamburger.module.css.d.ts +9 -0
- package/dist/components/hamburger/hamburger.module.d.css.ts +9 -0
- package/dist/components/inputs/@types/checkbox-options.d.ts +38 -0
- package/dist/components/inputs/@types/checkbox-options.d.ts.map +1 -0
- package/dist/components/inputs/@types/checkbox-options.js +10 -0
- package/dist/components/inputs/@types/checkbox.d.ts +2 -33
- package/dist/components/inputs/@types/checkbox.d.ts.map +1 -1
- package/dist/components/inputs/@types/checkbox.js +1 -10
- package/dist/components/inputs/@types/input-options.d.ts +39 -0
- package/dist/components/inputs/@types/input-options.d.ts.map +1 -0
- package/dist/components/inputs/@types/input-options.js +11 -0
- package/dist/components/inputs/@types/input.d.ts +4 -34
- package/dist/components/inputs/@types/input.d.ts.map +1 -1
- package/dist/components/inputs/@types/input.js +1 -11
- package/dist/components/inputs/autocomplete.classes.d.ts +37 -0
- package/dist/components/inputs/autocomplete.classes.d.ts.map +1 -0
- package/dist/components/inputs/autocomplete.classes.js +23 -0
- package/dist/components/inputs/autocomplete.contract.d.ts +89 -0
- package/dist/components/inputs/autocomplete.contract.d.ts.map +1 -0
- package/dist/components/inputs/autocomplete.contract.js +104 -0
- package/dist/components/inputs/autocomplete.d.ts.map +1 -1
- package/dist/components/inputs/autocomplete.js +18 -12
- package/dist/components/inputs/autocomplete.module.css +15 -7
- package/dist/components/inputs/autocomplete.module.css.d.ts +35 -0
- package/dist/components/inputs/autocomplete.module.d.css.ts +35 -0
- package/dist/components/inputs/autocomplete_module.css +8 -8
- package/dist/components/inputs/checkbox-group.classes.d.ts +14 -0
- package/dist/components/inputs/checkbox-group.classes.d.ts.map +1 -0
- package/dist/components/inputs/checkbox-group.classes.js +8 -0
- package/dist/components/inputs/checkbox-group.contract.d.ts +12 -0
- package/dist/components/inputs/checkbox-group.contract.d.ts.map +1 -0
- package/dist/components/inputs/checkbox-group.contract.js +12 -0
- package/dist/components/inputs/checkbox-group.js +2 -2
- package/dist/components/inputs/checkbox-group.module.css.d.ts +5 -0
- package/dist/components/inputs/checkbox-group.module.d.css.ts +5 -0
- package/dist/components/inputs/checkbox.astro +39 -15
- package/dist/components/inputs/checkbox.classes.d.ts +36 -0
- package/dist/components/inputs/checkbox.classes.d.ts.map +1 -0
- package/dist/components/inputs/checkbox.classes.js +20 -0
- package/dist/components/inputs/checkbox.contract.d.ts +73 -0
- package/dist/components/inputs/checkbox.contract.d.ts.map +1 -0
- package/dist/components/inputs/checkbox.contract.js +85 -0
- package/dist/components/inputs/checkbox.d.ts +6 -0
- package/dist/components/inputs/checkbox.d.ts.map +1 -1
- package/dist/components/inputs/checkbox.js +14 -9
- package/dist/components/inputs/checkbox.module.css +32 -13
- package/dist/components/inputs/checkbox.module.css.d.ts +23 -0
- package/dist/components/inputs/checkbox.module.d.css.ts +23 -0
- package/dist/components/inputs/checkbox.module.js +0 -1
- package/dist/components/inputs/checkbox_module.css +28 -12
- package/dist/components/inputs/error-text.astro +5 -3
- package/dist/components/inputs/error-text.classes.d.ts +16 -0
- package/dist/components/inputs/error-text.classes.d.ts.map +1 -0
- package/dist/components/inputs/error-text.classes.js +10 -0
- package/dist/components/inputs/error-text.contract.d.ts +19 -0
- package/dist/components/inputs/error-text.contract.d.ts.map +1 -0
- package/dist/components/inputs/error-text.contract.js +19 -0
- package/dist/components/inputs/error-text.js +4 -2
- package/dist/components/inputs/error-text.module.css.d.ts +7 -0
- package/dist/components/inputs/error-text.module.d.css.ts +7 -0
- package/dist/components/inputs/help-text.astro +5 -3
- package/dist/components/inputs/help-text.classes.d.ts +16 -0
- package/dist/components/inputs/help-text.classes.d.ts.map +1 -0
- package/dist/components/inputs/help-text.classes.js +10 -0
- package/dist/components/inputs/help-text.contract.d.ts +20 -0
- package/dist/components/inputs/help-text.contract.d.ts.map +1 -0
- package/dist/components/inputs/help-text.contract.js +22 -0
- package/dist/components/inputs/help-text.js +4 -2
- package/dist/components/inputs/help-text.module.css +1 -1
- package/dist/components/inputs/help-text.module.css.d.ts +7 -0
- package/dist/components/inputs/help-text.module.d.css.ts +7 -0
- package/dist/components/inputs/help-text_module.css +1 -1
- package/dist/components/inputs/input-adornment.astro +2 -4
- package/dist/components/inputs/input-adornment.classes.d.ts +15 -0
- package/dist/components/inputs/input-adornment.classes.d.ts.map +1 -0
- package/dist/components/inputs/input-adornment.classes.js +10 -0
- package/dist/components/inputs/input-adornment.contract.d.ts +18 -0
- package/dist/components/inputs/input-adornment.contract.d.ts.map +1 -0
- package/dist/components/inputs/input-adornment.contract.js +18 -0
- package/dist/components/inputs/input-adornment.d.ts.map +1 -1
- package/dist/components/inputs/input-adornment.js +4 -6
- package/dist/components/inputs/input-adornment.module.css.d.ts +6 -0
- package/dist/components/inputs/input-adornment.module.d.css.ts +6 -0
- package/dist/components/inputs/input-password.classes.d.ts +14 -0
- package/dist/components/inputs/input-password.classes.d.ts.map +1 -0
- package/dist/components/inputs/input-password.classes.js +8 -0
- package/dist/components/inputs/input-password.contract.d.ts +12 -0
- package/dist/components/inputs/input-password.contract.d.ts.map +1 -0
- package/dist/components/inputs/input-password.contract.js +12 -0
- package/dist/components/inputs/input-password.d.ts.map +1 -1
- package/dist/components/inputs/input-password.js +2 -3
- package/dist/components/inputs/input-password.module.css.d.ts +4 -0
- package/dist/components/inputs/input-password.module.d.css.ts +4 -0
- package/dist/components/inputs/input.astro +23 -15
- package/dist/components/inputs/input.classes.d.ts +43 -0
- package/dist/components/inputs/input.classes.d.ts.map +1 -0
- package/dist/components/inputs/input.classes.js +25 -0
- package/dist/components/inputs/input.contract.d.ts +100 -0
- package/dist/components/inputs/input.contract.d.ts.map +1 -0
- package/dist/components/inputs/input.contract.js +109 -0
- package/dist/components/inputs/input.d.ts.map +1 -1
- package/dist/components/inputs/input.js +20 -12
- package/dist/components/inputs/input.module.css +16 -14
- package/dist/components/inputs/input.module.css.d.ts +33 -0
- package/dist/components/inputs/input.module.d.css.ts +33 -0
- package/dist/components/inputs/input_module.css +13 -15
- package/dist/components/inputs/label.astro +5 -4
- package/dist/components/inputs/label.classes.d.ts +23 -0
- package/dist/components/inputs/label.classes.d.ts.map +1 -0
- package/dist/components/inputs/label.classes.js +11 -0
- package/dist/components/inputs/label.contract.d.ts +25 -0
- package/dist/components/inputs/label.contract.d.ts.map +1 -0
- package/dist/components/inputs/label.contract.js +27 -0
- package/dist/components/inputs/label.d.ts +3 -1
- package/dist/components/inputs/label.d.ts.map +1 -1
- package/dist/components/inputs/label.js +6 -4
- package/dist/components/inputs/label.module.css +21 -1
- package/dist/components/inputs/label.module.css.d.ts +8 -0
- package/dist/components/inputs/label.module.d.css.ts +8 -0
- package/dist/components/inputs/label.module.js +3 -0
- package/dist/components/inputs/label_module.css +9 -1
- package/dist/components/inputs/radio-group.classes.d.ts +27 -0
- package/dist/components/inputs/radio-group.classes.d.ts.map +1 -0
- package/dist/components/inputs/radio-group.classes.js +16 -0
- package/dist/components/inputs/radio-group.contract.d.ts +50 -0
- package/dist/components/inputs/radio-group.contract.d.ts.map +1 -0
- package/dist/components/inputs/radio-group.contract.js +55 -0
- package/dist/components/inputs/radio-group.js +10 -6
- package/dist/components/inputs/radio-group.module.css.d.ts +19 -0
- package/dist/components/inputs/radio-group.module.d.css.ts +19 -0
- package/dist/components/inputs/select.classes.d.ts +28 -0
- package/dist/components/inputs/select.classes.d.ts.map +1 -0
- package/dist/components/inputs/select.classes.js +16 -0
- package/dist/components/inputs/select.contract.d.ts +51 -0
- package/dist/components/inputs/select.contract.d.ts.map +1 -0
- package/dist/components/inputs/select.contract.js +54 -0
- package/dist/components/inputs/select.d.ts.map +1 -1
- package/dist/components/inputs/select.js +11 -9
- package/dist/components/inputs/select.module.css +26 -13
- package/dist/components/inputs/select.module.css.d.ts +22 -0
- package/dist/components/inputs/select.module.d.css.ts +22 -0
- package/dist/components/inputs/select_module.css +11 -11
- package/dist/components/inputs/text-area.astro +4 -9
- package/dist/components/inputs/text-area.classes.d.ts +22 -0
- package/dist/components/inputs/text-area.classes.d.ts.map +1 -0
- package/dist/components/inputs/text-area.classes.js +20 -0
- package/dist/components/inputs/text-area.contract.d.ts +23 -0
- package/dist/components/inputs/text-area.contract.d.ts.map +1 -0
- package/dist/components/inputs/text-area.contract.js +25 -0
- package/dist/components/inputs/text-area.d.ts.map +1 -1
- package/dist/components/inputs/text-area.js +8 -6
- package/dist/components/inputs/text-area.module.css +7 -5
- package/dist/components/inputs/text-area.module.css.d.ts +6 -0
- package/dist/components/inputs/text-area.module.d.css.ts +6 -0
- package/dist/components/inputs/text-area_module.css +2 -2
- package/dist/components/notifications/alert.classes.d.ts +27 -0
- package/dist/components/notifications/alert.classes.d.ts.map +1 -0
- package/dist/components/notifications/alert.classes.js +17 -0
- package/dist/components/notifications/alert.contract.d.ts +56 -0
- package/dist/components/notifications/alert.contract.d.ts.map +1 -0
- package/dist/components/notifications/alert.contract.js +56 -0
- package/dist/components/notifications/alert.d.ts.map +1 -1
- package/dist/components/notifications/alert.js +16 -15
- package/dist/components/notifications/alert.module.css.d.ts +19 -0
- package/dist/components/notifications/alert.module.d.css.ts +19 -0
- package/dist/components/notifications/toast.classes.d.ts +26 -0
- package/dist/components/notifications/toast.classes.d.ts.map +1 -0
- package/dist/components/notifications/toast.classes.js +17 -0
- package/dist/components/notifications/toast.contract.d.ts +57 -0
- package/dist/components/notifications/toast.contract.d.ts.map +1 -0
- package/dist/components/notifications/toast.contract.js +64 -0
- package/dist/components/notifications/toast.d.ts.map +1 -1
- package/dist/components/notifications/toast.js +10 -8
- package/dist/components/notifications/toast.module.css +16 -4
- package/dist/components/notifications/toast.module.css.d.ts +19 -0
- package/dist/components/notifications/toast.module.d.css.ts +19 -0
- package/dist/components/notifications/toast_module.css +8 -4
- package/dist/components/pager/ellipses.js +2 -2
- package/dist/components/pager/first-button.js +6 -3
- package/dist/components/pager/last-button.js +6 -3
- package/dist/components/pager/next-button.js +6 -7
- package/dist/components/pager/number-button.js +8 -10
- package/dist/components/pager/pagination.classes.d.ts +38 -0
- package/dist/components/pager/pagination.classes.d.ts.map +1 -0
- package/dist/components/pager/pagination.classes.js +26 -0
- package/dist/components/pager/pagination.contract.d.ts +132 -0
- package/dist/components/pager/pagination.contract.d.ts.map +1 -0
- package/dist/components/pager/pagination.contract.js +109 -0
- package/dist/components/pager/pagination.d.ts.map +1 -1
- package/dist/components/pager/pagination.js +5 -3
- package/dist/components/pager/pagination.module.css +121 -15
- package/dist/components/pager/pagination.module.css.d.ts +28 -0
- package/dist/components/pager/pagination.module.d.css.ts +28 -0
- package/dist/components/pager/pagination_module.css +117 -12
- package/dist/components/pager/previous-button.js +6 -5
- package/dist/components/scroll-area/scroll-area.classes.d.ts +18 -0
- package/dist/components/scroll-area/scroll-area.classes.d.ts.map +1 -0
- package/dist/components/scroll-area/scroll-area.classes.js +12 -0
- package/dist/components/scroll-area/scroll-area.contract.d.ts +33 -0
- package/dist/components/scroll-area/scroll-area.contract.d.ts.map +1 -0
- package/dist/components/scroll-area/scroll-area.contract.js +35 -0
- package/dist/components/scroll-area/scroll-area.d.ts.map +1 -1
- package/dist/components/scroll-area/scroll-area.js +8 -8
- package/dist/components/scroll-area/scroll-area.module.css.d.ts +8 -0
- package/dist/components/scroll-area/scroll-area.module.d.css.ts +8 -0
- package/dist/components/scroll-to-top/scroll-to-top.astro +15 -7
- package/dist/components/scroll-to-top/scroll-to-top.classes.d.ts +16 -0
- package/dist/components/scroll-to-top/scroll-to-top.classes.d.ts.map +1 -0
- package/dist/components/scroll-to-top/scroll-to-top.classes.js +10 -0
- package/dist/components/scroll-to-top/scroll-to-top.contract.d.ts +17 -0
- package/dist/components/scroll-to-top/scroll-to-top.contract.d.ts.map +1 -0
- package/dist/components/scroll-to-top/scroll-to-top.contract.js +17 -0
- package/dist/components/scroll-to-top/scroll-to-top.d.ts.map +1 -1
- package/dist/components/scroll-to-top/scroll-to-top.js +4 -5
- package/dist/components/scroll-to-top/scroll-to-top.module.css.d.ts +7 -0
- package/dist/components/scroll-to-top/scroll-to-top.module.d.css.ts +7 -0
- package/dist/components/section/section.astro +2 -2
- package/dist/components/section/section.classes.d.ts +14 -0
- package/dist/components/section/section.classes.d.ts.map +1 -0
- package/dist/components/section/section.classes.js +8 -0
- package/dist/components/section/section.contract.d.ts +12 -0
- package/dist/components/section/section.contract.d.ts.map +1 -0
- package/dist/components/section/section.contract.js +12 -0
- package/dist/components/section/section.js +2 -2
- package/dist/components/section/section.module.css.d.ts +4 -0
- package/dist/components/section/section.module.d.css.ts +4 -0
- package/dist/components/shimmer/shimmer.classes.d.ts +23 -0
- package/dist/components/shimmer/shimmer.classes.d.ts.map +1 -0
- package/dist/components/shimmer/shimmer.classes.js +11 -0
- package/dist/components/shimmer/shimmer.contract.d.ts +24 -0
- package/dist/components/shimmer/shimmer.contract.d.ts.map +1 -0
- package/dist/components/shimmer/shimmer.contract.js +24 -0
- package/dist/components/shimmer/shimmer.d.ts.map +1 -1
- package/dist/components/shimmer/shimmer.js +8 -14
- package/dist/components/shimmer/shimmer.module.css.d.ts +8 -0
- package/dist/components/shimmer/shimmer.module.d.css.ts +8 -0
- package/dist/components/table/table.classes.d.ts +22 -0
- package/dist/components/table/table.classes.d.ts.map +1 -0
- package/dist/components/table/table.classes.js +16 -0
- package/dist/components/table/table.contract.d.ts +51 -0
- package/dist/components/table/table.contract.d.ts.map +1 -0
- package/dist/components/table/table.contract.js +51 -0
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/table/table.js +10 -10
- package/dist/components/table/table.module.css.d.ts +18 -0
- package/dist/components/table/table.module.d.css.ts +18 -0
- package/dist/components/tabs/tabs.classes.d.ts +17 -0
- package/dist/components/tabs/tabs.classes.d.ts.map +1 -0
- package/dist/components/tabs/tabs.classes.js +11 -0
- package/dist/components/tabs/tabs.contract.d.ts +28 -0
- package/dist/components/tabs/tabs.contract.d.ts.map +1 -0
- package/dist/components/tabs/tabs.contract.js +31 -0
- package/dist/components/tabs/tabs.d.ts.map +1 -1
- package/dist/components/tabs/tabs.js +5 -5
- package/dist/components/tabs/tabs.module.css +9 -0
- package/dist/components/tabs/tabs.module.css.d.ts +11 -0
- package/dist/components/tabs/tabs.module.d.css.ts +11 -0
- package/dist/components/tabs/tabs_module.css +1 -1
- package/dist/components/tooltip/tooltip.classes.d.ts +18 -0
- package/dist/components/tooltip/tooltip.classes.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip.classes.js +12 -0
- package/dist/components/tooltip/tooltip.contract.d.ts +34 -0
- package/dist/components/tooltip/tooltip.contract.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip.contract.js +39 -0
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip.js +6 -7
- package/dist/components/tooltip/tooltip.module.css +27 -11
- package/dist/components/tooltip/tooltip.module.css.d.ts +12 -0
- package/dist/components/tooltip/tooltip.module.d.css.ts +12 -0
- package/dist/components/tooltip/tooltip_module.css +7 -7
- package/dist/core/part-classes.d.ts +38 -0
- package/dist/core/part-classes.d.ts.map +1 -0
- package/dist/core/part-classes.js +27 -0
- package/dist/css/accordion.css +53 -0
- package/dist/css/alert.css +130 -0
- package/dist/css/autocomplete.css +314 -0
- package/dist/css/avatar.css +38 -0
- package/dist/css/badge.css +53 -0
- package/dist/css/button-group.css +19 -0
- package/dist/css/button.css +384 -0
- package/dist/css/card.css +64 -0
- package/dist/css/checkbox-group.css +12 -0
- package/dist/css/checkbox.css +238 -0
- package/dist/css/chip.css +338 -0
- package/dist/css/combo-button.css +74 -0
- package/dist/css/container.css +31 -0
- package/dist/css/control-buttons.css +111 -0
- package/dist/css/copy-button.css +51 -0
- package/dist/css/datepicker.css +193 -0
- package/dist/css/drawer.css +167 -0
- package/dist/css/dropdown.css +118 -0
- package/dist/css/ellipses.css +75 -0
- package/dist/css/error-text.css +23 -0
- package/dist/css/hamburger.css +171 -0
- package/dist/css/help-text.css +23 -0
- package/dist/css/input-adornment.css +21 -0
- package/dist/css/input-password.css +25 -0
- package/dist/css/input.css +259 -0
- package/dist/css/label.css +24 -0
- package/dist/css/modal.css +120 -0
- package/dist/css/pagination.css +210 -0
- package/dist/css/radio-group.css +162 -0
- package/dist/css/ring.css +51 -0
- package/dist/css/scroll-area.css +65 -0
- package/dist/css/scroll-to-top.css +102 -0
- package/dist/css/section.css +11 -0
- package/dist/css/select.css +143 -0
- package/dist/css/shimmer.css +49 -0
- package/dist/css/spinner.css +101 -0
- package/dist/css/table.css +93 -0
- package/dist/css/tabs.css +54 -0
- package/dist/css/text-area.css +21 -0
- package/dist/css/timeline.css +85 -0
- package/dist/css/toast.css +218 -0
- package/dist/css/tooltip.css +75 -0
- package/dist/lib/ripple.d.ts +55 -6
- package/dist/lib/ripple.d.ts.map +1 -1
- package/dist/lib/ripple.js +61 -10
- package/dist/loaders/ellipses.classes.d.ts +26 -0
- package/dist/loaders/ellipses.classes.d.ts.map +1 -0
- package/dist/loaders/ellipses.classes.js +15 -0
- package/dist/loaders/ellipses.contract.d.ts +18 -0
- package/dist/loaders/ellipses.contract.d.ts.map +1 -0
- package/dist/loaders/ellipses.contract.js +21 -0
- package/dist/loaders/ellipses.d.ts.map +1 -1
- package/dist/loaders/ellipses.js +8 -6
- package/dist/loaders/ellipses.module.css +8 -4
- package/dist/loaders/ellipses.module.css.d.ts +13 -0
- package/dist/loaders/ellipses.module.d.css.ts +13 -0
- package/dist/loaders/ellipses_module.css +4 -4
- package/dist/loaders/ring.classes.d.ts +26 -0
- package/dist/loaders/ring.classes.d.ts.map +1 -0
- package/dist/loaders/ring.classes.js +15 -0
- package/dist/loaders/ring.contract.d.ts +18 -0
- package/dist/loaders/ring.contract.d.ts.map +1 -0
- package/dist/loaders/ring.contract.js +21 -0
- package/dist/loaders/ring.d.ts.map +1 -1
- package/dist/loaders/ring.js +8 -6
- package/dist/loaders/ring.module.css +6 -3
- package/dist/loaders/ring.module.css.d.ts +7 -0
- package/dist/loaders/ring.module.d.css.ts +7 -0
- package/dist/loaders/ring_module.css +3 -3
- package/dist/loaders/spinner.classes.d.ts +27 -0
- package/dist/loaders/spinner.classes.d.ts.map +1 -0
- package/dist/loaders/spinner.classes.js +16 -0
- package/dist/loaders/spinner.contract.d.ts +23 -0
- package/dist/loaders/spinner.contract.d.ts.map +1 -0
- package/dist/loaders/spinner.contract.js +26 -0
- package/dist/loaders/spinner.d.ts.map +1 -1
- package/dist/loaders/spinner.js +9 -7
- package/dist/loaders/spinner.module.css +24 -12
- package/dist/loaders/spinner.module.css.d.ts +9 -0
- package/dist/loaders/spinner.module.d.css.ts +9 -0
- package/dist/loaders/spinner_module.css +12 -12
- package/dist/styles/components-vanilla.css +1 -1
- package/dist/styles/styles.css +1 -1
- package/dist/widgets/datepicker/datepicker.classes.d.ts +35 -0
- package/dist/widgets/datepicker/datepicker.classes.d.ts.map +1 -0
- package/dist/widgets/datepicker/datepicker.classes.js +23 -0
- package/dist/widgets/datepicker/datepicker.contract.d.ts +90 -0
- package/dist/widgets/datepicker/datepicker.contract.d.ts.map +1 -0
- package/dist/widgets/datepicker/datepicker.contract.js +97 -0
- package/dist/widgets/datepicker/datepicker.d.ts.map +1 -1
- package/dist/widgets/datepicker/datepicker.js +17 -17
- package/dist/widgets/datepicker/datepicker.module.css +2 -1
- package/dist/widgets/datepicker/datepicker.module.css.d.ts +33 -0
- package/dist/widgets/datepicker/datepicker.module.d.css.ts +33 -0
- package/dist/widgets/datepicker/datepicker_module.css +1 -1
- package/dist/widgets/drawer/drawer-container.d.ts.map +1 -1
- package/dist/widgets/drawer/drawer-container.js +2 -2
- package/dist/widgets/drawer/drawer-content.d.ts.map +1 -1
- package/dist/widgets/drawer/drawer-content.js +2 -2
- package/dist/widgets/drawer/drawer-header.js +2 -2
- package/dist/widgets/drawer/drawer-top-actions.js +2 -2
- package/dist/widgets/drawer/drawer.classes.d.ts +30 -0
- package/dist/widgets/drawer/drawer.classes.d.ts.map +1 -0
- package/dist/widgets/drawer/drawer.classes.js +21 -0
- package/dist/widgets/drawer/drawer.contract.d.ts +52 -0
- package/dist/widgets/drawer/drawer.contract.d.ts.map +1 -0
- package/dist/widgets/drawer/drawer.contract.js +62 -0
- package/dist/widgets/drawer/drawer.d.ts.map +1 -1
- package/dist/widgets/drawer/drawer.js +6 -4
- package/dist/widgets/drawer/drawer.module.css +25 -10
- package/dist/widgets/drawer/drawer.module.css.d.ts +26 -0
- package/dist/widgets/drawer/drawer.module.d.css.ts +26 -0
- package/dist/widgets/drawer/drawer_module.css +40 -4
- package/dist/widgets/modal/modal-actions.d.ts.map +1 -1
- package/dist/widgets/modal/modal-actions.js +2 -2
- package/dist/widgets/modal/modal-container.d.ts.map +1 -1
- package/dist/widgets/modal/modal-container.js +2 -2
- package/dist/widgets/modal/modal-content.d.ts.map +1 -1
- package/dist/widgets/modal/modal-content.js +2 -2
- package/dist/widgets/modal/modal-header.js +2 -2
- package/dist/widgets/modal/modal.classes.d.ts +19 -0
- package/dist/widgets/modal/modal.classes.d.ts.map +1 -0
- package/dist/widgets/modal/modal.classes.js +13 -0
- package/dist/widgets/modal/modal.contract.d.ts +39 -0
- package/dist/widgets/modal/modal.contract.d.ts.map +1 -0
- package/dist/widgets/modal/modal.contract.js +43 -0
- package/dist/widgets/modal/modal.d.ts.map +1 -1
- package/dist/widgets/modal/modal.js +3 -4
- package/dist/widgets/modal/modal.module.css +6 -2
- package/dist/widgets/modal/modal.module.css.d.ts +14 -0
- package/dist/widgets/modal/modal.module.d.css.ts +14 -0
- package/dist/widgets/modal/modal_module.css +2 -2
- package/dist/widgets/timeline/timeline.classes.d.ts +20 -0
- package/dist/widgets/timeline/timeline.classes.d.ts.map +1 -0
- package/dist/widgets/timeline/timeline.classes.js +14 -0
- package/dist/widgets/timeline/timeline.contract.d.ts +42 -0
- package/dist/widgets/timeline/timeline.contract.d.ts.map +1 -0
- package/dist/widgets/timeline/timeline.contract.js +42 -0
- package/dist/widgets/timeline/timeline.d.ts.map +1 -1
- package/dist/widgets/timeline/timeline.js +8 -8
- package/dist/widgets/timeline/timeline.module.css.d.ts +16 -0
- package/dist/widgets/timeline/timeline.module.d.css.ts +16 -0
- package/package.json +17 -2
- package/src/components/@types/contract.ts +63 -0
- package/src/components/accordion/accordion.classes.ts +23 -0
- package/src/components/accordion/accordion.contract.ts +35 -0
- package/src/components/accordion/accordion.module.css +16 -5
- package/src/components/accordion/accordion.tsx +6 -14
- package/src/components/avatar/avatar.classes.ts +22 -0
- package/src/components/avatar/avatar.contract.ts +29 -0
- package/src/components/avatar/avatar.tsx +5 -15
- package/src/components/badge/badge.classes.ts +23 -0
- package/src/components/badge/badge.contract.ts +24 -0
- package/src/components/badge/badge.tsx +2 -8
- package/src/components/button/button-group.classes.ts +19 -0
- package/src/components/button/button-group.contract.ts +14 -0
- package/src/components/button/button-group.tsx +2 -2
- package/src/components/button/button.astro +17 -19
- package/src/components/button/button.classes.ts +37 -0
- package/src/components/button/button.contract.ts +48 -0
- package/src/components/button/button.module.css +12 -0
- package/src/components/button/button.tsx +6 -13
- package/src/components/button/combo-button.classes.ts +41 -0
- package/src/components/button/combo-button.contract.ts +47 -0
- package/src/components/button/combo-button.module.css +6 -2
- package/src/components/button/combo-button.tsx +9 -11
- package/src/components/button/control-buttons.classes.ts +34 -0
- package/src/components/button/control-buttons.contract.ts +50 -0
- package/src/components/button/control-buttons.module.css +43 -17
- package/src/components/button/control-buttons.tsx +34 -9
- package/src/components/button/copy-button.classes.ts +26 -0
- package/src/components/button/copy-button.contract.ts +29 -0
- package/src/components/button/copy-button.tsx +6 -13
- package/src/components/button/icon-button.astro +3 -3
- package/src/components/button/icon-button.tsx +3 -3
- package/src/components/card/card-content.astro +2 -2
- package/src/components/card/card-description.astro +2 -2
- package/src/components/card/card-footer.astro +2 -2
- package/src/components/card/card-header.astro +2 -2
- package/src/components/card/card-title.astro +2 -2
- package/src/components/card/card.astro +3 -3
- package/src/components/card/card.classes.ts +30 -0
- package/src/components/card/card.contract.ts +44 -0
- package/src/components/card/card.tsx +7 -24
- package/src/components/chips/chip.classes.ts +48 -0
- package/src/components/chips/chip.contract.ts +60 -0
- package/src/components/chips/chip.module.css +45 -0
- package/src/components/chips/chip.tsx +13 -23
- package/src/components/container/container.astro +2 -2
- package/src/components/container/container.classes.ts +19 -0
- package/src/components/container/container.contract.ts +13 -0
- package/src/components/container/container.tsx +2 -2
- package/src/components/dropdown/dropdown.classes.ts +26 -0
- package/src/components/dropdown/dropdown.contract.ts +49 -0
- package/src/components/dropdown/dropdown.module.css +11 -0
- package/src/components/dropdown/dropdown.stories.tsx +6 -0
- package/src/components/dropdown/dropdown.tsx +9 -29
- package/src/components/hamburger/hamburger.astro +4 -6
- package/src/components/hamburger/hamburger.classes.ts +33 -0
- package/src/components/hamburger/hamburger.contract.ts +33 -0
- package/src/components/hamburger/hamburger.tsx +4 -13
- package/src/components/inputs/@types/checkbox-options.ts +44 -0
- package/src/components/inputs/@types/checkbox.ts +2 -36
- package/src/components/inputs/@types/input-options.ts +45 -0
- package/src/components/inputs/@types/input.ts +4 -41
- package/src/components/inputs/autocomplete.classes.ts +51 -0
- package/src/components/inputs/autocomplete.contract.ts +94 -0
- package/src/components/inputs/autocomplete.module.css +15 -7
- package/src/components/inputs/autocomplete.tsx +13 -35
- package/src/components/inputs/checkbox-group.classes.ts +19 -0
- package/src/components/inputs/checkbox-group.contract.ts +13 -0
- package/src/components/inputs/checkbox-group.tsx +2 -2
- package/src/components/inputs/checkbox.astro +39 -15
- package/src/components/inputs/checkbox.classes.ts +48 -0
- package/src/components/inputs/checkbox.contract.ts +75 -0
- package/src/components/inputs/checkbox.module.css +32 -13
- package/src/components/inputs/checkbox.stories.tsx +43 -0
- package/src/components/inputs/checkbox.tsx +19 -25
- package/src/components/inputs/error-text.astro +5 -3
- package/src/components/inputs/error-text.classes.ts +23 -0
- package/src/components/inputs/error-text.contract.ts +20 -0
- package/src/components/inputs/error-text.tsx +2 -2
- package/src/components/inputs/help-text.astro +5 -3
- package/src/components/inputs/help-text.classes.ts +23 -0
- package/src/components/inputs/help-text.contract.ts +21 -0
- package/src/components/inputs/help-text.module.css +1 -1
- package/src/components/inputs/help-text.tsx +2 -2
- package/src/components/inputs/input-adornment.astro +2 -4
- package/src/components/inputs/input-adornment.classes.ts +24 -0
- package/src/components/inputs/input-adornment.contract.ts +19 -0
- package/src/components/inputs/input-adornment.tsx +2 -12
- package/src/components/inputs/input-password.classes.ts +19 -0
- package/src/components/inputs/input-password.contract.ts +14 -0
- package/src/components/inputs/input-password.tsx +2 -4
- package/src/components/inputs/input.astro +23 -15
- package/src/components/inputs/input.classes.ts +67 -0
- package/src/components/inputs/input.contract.ts +93 -0
- package/src/components/inputs/input.module.css +16 -14
- package/src/components/inputs/input.tsx +31 -34
- package/src/components/inputs/label.astro +5 -4
- package/src/components/inputs/label.classes.ts +29 -0
- package/src/components/inputs/label.contract.ts +27 -0
- package/src/components/inputs/label.module.css +21 -1
- package/src/components/inputs/label.tsx +13 -4
- package/src/components/inputs/radio-group.classes.ts +36 -0
- package/src/components/inputs/radio-group.contract.ts +53 -0
- package/src/components/inputs/radio-group.tsx +6 -6
- package/src/components/inputs/select.classes.ts +35 -0
- package/src/components/inputs/select.contract.ts +55 -0
- package/src/components/inputs/select.module.css +26 -13
- package/src/components/inputs/select.tsx +9 -13
- package/src/components/inputs/text-area.astro +4 -9
- package/src/components/inputs/text-area.classes.ts +39 -0
- package/src/components/inputs/text-area.contract.ts +22 -0
- package/src/components/inputs/text-area.module.css +7 -5
- package/src/components/inputs/text-area.tsx +6 -11
- package/src/components/notifications/alert.classes.ts +34 -0
- package/src/components/notifications/alert.contract.ts +59 -0
- package/src/components/notifications/alert.tsx +14 -25
- package/src/components/notifications/toast.classes.ts +33 -0
- package/src/components/notifications/toast.contract.ts +61 -0
- package/src/components/notifications/toast.module.css +16 -4
- package/src/components/notifications/toast.tsx +8 -12
- package/src/components/pager/ellipses.tsx +2 -2
- package/src/components/pager/first-button.tsx +3 -5
- package/src/components/pager/last-button.tsx +3 -5
- package/src/components/pager/next-button.tsx +6 -5
- package/src/components/pager/number-button.tsx +12 -12
- package/src/components/pager/pagination.classes.ts +63 -0
- package/src/components/pager/pagination.contract.ts +91 -0
- package/src/components/pager/pagination.module.css +121 -15
- package/src/components/pager/pagination.tsx +3 -17
- package/src/components/pager/previous-button.tsx +6 -5
- package/src/components/scroll-area/scroll-area.classes.ts +23 -0
- package/src/components/scroll-area/scroll-area.contract.ts +35 -0
- package/src/components/scroll-area/scroll-area.tsx +8 -17
- package/src/components/scroll-to-top/scroll-to-top.astro +15 -7
- package/src/components/scroll-to-top/scroll-to-top.classes.ts +23 -0
- package/src/components/scroll-to-top/scroll-to-top.contract.ts +19 -0
- package/src/components/scroll-to-top/scroll-to-top.tsx +2 -10
- package/src/components/section/section.astro +2 -2
- package/src/components/section/section.classes.ts +19 -0
- package/src/components/section/section.contract.ts +14 -0
- package/src/components/section/section.tsx +2 -2
- package/src/components/shimmer/shimmer.classes.ts +30 -0
- package/src/components/shimmer/shimmer.contract.ts +26 -0
- package/src/components/shimmer/shimmer.tsx +4 -15
- package/src/components/table/table.classes.ts +27 -0
- package/src/components/table/table.contract.ts +52 -0
- package/src/components/table/table.tsx +10 -14
- package/src/components/tabs/tabs.classes.ts +22 -0
- package/src/components/tabs/tabs.contract.ts +30 -0
- package/src/components/tabs/tabs.module.css +9 -0
- package/src/components/tabs/tabs.tsx +5 -23
- package/src/components/tooltip/tooltip.classes.ts +23 -0
- package/src/components/tooltip/tooltip.contract.ts +36 -0
- package/src/components/tooltip/tooltip.module.css +27 -11
- package/src/components/tooltip/tooltip.tsx +6 -9
- package/src/core/part-classes.ts +66 -0
- package/src/lib/ripple.ts +136 -13
- package/src/loaders/ellipses.classes.ts +42 -0
- package/src/loaders/ellipses.contract.ts +19 -0
- package/src/loaders/ellipses.module.css +8 -4
- package/src/loaders/ellipses.tsx +5 -14
- package/src/loaders/ring.classes.ts +41 -0
- package/src/loaders/ring.contract.ts +19 -0
- package/src/loaders/ring.module.css +6 -3
- package/src/loaders/ring.tsx +4 -16
- package/src/loaders/spinner.classes.ts +43 -0
- package/src/loaders/spinner.contract.ts +24 -0
- package/src/loaders/spinner.module.css +24 -12
- package/src/loaders/spinner.tsx +5 -25
- package/src/styles/components/components.css +0 -2
- package/src/styles/theme/defaults.css +3 -2
- package/src/styles/utils/utility-classes.css +3 -2
- package/src/widgets/datepicker/datepicker.classes.ts +40 -0
- package/src/widgets/datepicker/datepicker.contract.ts +97 -0
- package/src/widgets/datepicker/datepicker.module.css +2 -1
- package/src/widgets/datepicker/datepicker.tsx +17 -49
- package/src/widgets/drawer/drawer-container.tsx +2 -6
- package/src/widgets/drawer/drawer-content.tsx +2 -6
- package/src/widgets/drawer/drawer-header.tsx +2 -2
- package/src/widgets/drawer/drawer-top-actions.tsx +2 -2
- package/src/widgets/drawer/drawer.classes.ts +39 -0
- package/src/widgets/drawer/drawer.contract.ts +55 -0
- package/src/widgets/drawer/drawer.module.css +25 -10
- package/src/widgets/drawer/drawer.tsx +3 -15
- package/src/widgets/modal/modal-actions.tsx +2 -6
- package/src/widgets/modal/modal-container.tsx +2 -6
- package/src/widgets/modal/modal-content.tsx +2 -6
- package/src/widgets/modal/modal-header.tsx +2 -2
- package/src/widgets/modal/modal.classes.ts +24 -0
- package/src/widgets/modal/modal.contract.ts +44 -0
- package/src/widgets/modal/modal.module.css +6 -2
- package/src/widgets/modal/modal.tsx +3 -4
- package/src/widgets/timeline/timeline.classes.ts +25 -0
- package/src/widgets/timeline/timeline.contract.ts +43 -0
- package/src/widgets/timeline/timeline.tsx +8 -12
- package/src/styles/components/loaders.css +0 -212
package/src/lib/ripple.ts
CHANGED
|
@@ -5,11 +5,45 @@
|
|
|
5
5
|
* Original work licensed under the MIT License.
|
|
6
6
|
* Copyright (c) 2021 Sajad Ahmad Nawabi
|
|
7
7
|
*
|
|
8
|
-
* Adapted for use as an
|
|
8
|
+
* Adapted for use as an ESM/TypeScript module with minor improvements. It uses
|
|
9
|
+
* the DOM only, so any framework can import it.
|
|
9
10
|
*/
|
|
10
11
|
|
|
11
12
|
export type RippleColor = 'light' | 'dark'
|
|
12
13
|
|
|
14
|
+
/** The part of a mouse or pointer event that a ripple needs. */
|
|
15
|
+
export interface RipplePress {
|
|
16
|
+
clientX: number
|
|
17
|
+
clientY: number
|
|
18
|
+
currentTarget: EventTarget | null
|
|
19
|
+
/** The mouse button, where the event has one. Only the main button ripples. */
|
|
20
|
+
button?: number
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// `false` turns the ripple off, on an element or on anything around it.
|
|
24
|
+
const optOutSelector = '[data-ripple="false"]'
|
|
25
|
+
const disabledSelector = ':disabled, [data-disabled], [aria-disabled="true"]'
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Whether a press on `element` may draw a ripple. Every ripple goes through
|
|
29
|
+
* this, whichever listener asked for it, so the rules are the same for a React
|
|
30
|
+
* Button, an Astro Button and a button drawn by any other framework.
|
|
31
|
+
*
|
|
32
|
+
* No ripple for: any mouse button but the main one, a disabled element
|
|
33
|
+
* (`disabled`, `data-disabled` or `aria-disabled="true"`), an element with
|
|
34
|
+
* `data-ripple="false"` or inside one, and a user who has asked for reduced
|
|
35
|
+
* motion.
|
|
36
|
+
*
|
|
37
|
+
* It asks the element's own document and window, not the globals, so it works
|
|
38
|
+
* for an element inside an iframe.
|
|
39
|
+
*/
|
|
40
|
+
export function canRipple(event: { button?: number }, element: Element): boolean {
|
|
41
|
+
if (event.button != null && event.button !== 0) return false
|
|
42
|
+
if (element.matches(disabledSelector) || element.closest(optOutSelector) != null) return false
|
|
43
|
+
const view = element.ownerDocument.defaultView
|
|
44
|
+
return view?.matchMedia?.('(prefers-reduced-motion: reduce)').matches !== true
|
|
45
|
+
}
|
|
46
|
+
|
|
13
47
|
export class Ripple {
|
|
14
48
|
private x = 0
|
|
15
49
|
private y = 0
|
|
@@ -48,8 +82,8 @@ export class Ripple {
|
|
|
48
82
|
element.style.width = element.style.height = `${radius * 2}px`
|
|
49
83
|
}
|
|
50
84
|
|
|
51
|
-
private applyAnimation(element: HTMLSpanElement):
|
|
52
|
-
element.animate(
|
|
85
|
+
private applyAnimation(element: HTMLSpanElement): Animation {
|
|
86
|
+
return element.animate(
|
|
53
87
|
[
|
|
54
88
|
{ transform: 'scale(0)', opacity: 1 },
|
|
55
89
|
{ transform: 'scale(1.5)', opacity: 0 },
|
|
@@ -61,13 +95,24 @@ export class Ripple {
|
|
|
61
95
|
)
|
|
62
96
|
}
|
|
63
97
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
98
|
+
/**
|
|
99
|
+
* Draws one ripple from the point of the press.
|
|
100
|
+
*
|
|
101
|
+
* The ripple is drawn in `target`, or in the event's `currentTarget` when no
|
|
102
|
+
* target is given. Pass the target when the listener is on an ancestor, where
|
|
103
|
+
* `currentTarget` is that ancestor and not the element pressed.
|
|
104
|
+
*
|
|
105
|
+
* Nothing is drawn when `canRipple` says no: see the rules there.
|
|
106
|
+
*/
|
|
107
|
+
create(event: RipplePress, color: RippleColor = 'light', target?: HTMLElement): void {
|
|
108
|
+
const element = target ?? (event.currentTarget as HTMLElement | null)
|
|
109
|
+
if (element == null || !canRipple(event, element)) return
|
|
110
|
+
const view = element.ownerDocument.defaultView
|
|
111
|
+
if (view == null) return
|
|
69
112
|
|
|
70
|
-
element.
|
|
113
|
+
// The circle is placed against the element and clipped to it. An element
|
|
114
|
+
// that is already positioned keeps its own position.
|
|
115
|
+
if (view.getComputedStyle(element).position === 'static') element.style.position = 'relative'
|
|
71
116
|
element.style.overflow = 'hidden'
|
|
72
117
|
|
|
73
118
|
const rect = element.getBoundingClientRect()
|
|
@@ -81,14 +126,92 @@ export class Ripple {
|
|
|
81
126
|
rect.top
|
|
82
127
|
)
|
|
83
128
|
|
|
84
|
-
const circle =
|
|
129
|
+
const circle = element.ownerDocument.createElement('span')
|
|
85
130
|
|
|
86
131
|
this.applyStyles(circle, color, rect, radius, event.clientX, event.clientY)
|
|
87
|
-
this.applyAnimation(circle)
|
|
88
|
-
|
|
89
132
|
element.appendChild(circle)
|
|
90
133
|
|
|
91
|
-
|
|
134
|
+
// Removed when the animation ends, or when it is cancelled, which is what
|
|
135
|
+
// happens if the element leaves the page first.
|
|
136
|
+
const remove = (): void => circle.remove()
|
|
137
|
+
this.applyAnimation(circle).finished.then(remove, remove)
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const buttonSelector = '.infonomic-button'
|
|
142
|
+
const lightSelector = '.infonomic-button-filled, .infonomic-button-gradient'
|
|
143
|
+
// `self` marks a button that makes its own ripple, as the React Button does, so
|
|
144
|
+
// that a page with both kinds never draws two for one press.
|
|
145
|
+
const ownRippleSelector = '[data-ripple="self"]'
|
|
146
|
+
|
|
147
|
+
interface Attachment {
|
|
148
|
+
count: number
|
|
149
|
+
detach: () => void
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const attachments = new WeakMap<Document | Element, Attachment>()
|
|
153
|
+
|
|
154
|
+
// Presses already answered. Roots can overlap, a container inside a document
|
|
155
|
+
// that is attached too, and the press reaches both listeners.
|
|
156
|
+
const answered = new WeakSet<Event>()
|
|
157
|
+
|
|
158
|
+
/** An element from any window: `instanceof Element` fails across iframes. */
|
|
159
|
+
const isElement = (node: unknown): node is Element =>
|
|
160
|
+
node != null && (node as Node).nodeType === 1 && typeof (node as Element).closest === 'function'
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Gives every kit button inside `root` a ripple, with one listener on `root`.
|
|
164
|
+
*
|
|
165
|
+
* A press on an element with the `infonomic-button` class, or on anything
|
|
166
|
+
* inside one, draws a ripple in that button: light on a filled or gradient
|
|
167
|
+
* button, dark on the others. Buttons added later are covered too.
|
|
168
|
+
*
|
|
169
|
+
* No ripple is drawn where `canRipple` says no, or for a button that makes its
|
|
170
|
+
* own ripple (`data-ripple="self"`).
|
|
171
|
+
*
|
|
172
|
+
* Returns a function that removes the ripple from `root`. A press draws one
|
|
173
|
+
* ripple however many roots it passes through: attaching to the same root more
|
|
174
|
+
* than once, or to a container inside an attached document, changes nothing.
|
|
175
|
+
* Each attachment is removed on its own, and a root's listener stays until
|
|
176
|
+
* every caller for that root has detached.
|
|
177
|
+
*
|
|
178
|
+
* `root` may belong to another window, such as an iframe's document.
|
|
179
|
+
*/
|
|
180
|
+
export function attachRipple(root: Document | Element): () => void {
|
|
181
|
+
let attachment = attachments.get(root)
|
|
182
|
+
|
|
183
|
+
if (attachment == null) {
|
|
184
|
+
const ripple = new Ripple()
|
|
185
|
+
const onPointerDown = (event: Event): void => {
|
|
186
|
+
const press = event as PointerEvent
|
|
187
|
+
if (answered.has(press) || !isElement(press.target)) return
|
|
188
|
+
const button = press.target.closest<HTMLElement>(buttonSelector)
|
|
189
|
+
if (button == null || !root.contains(button)) return
|
|
190
|
+
answered.add(press)
|
|
191
|
+
if (button.matches(ownRippleSelector)) return
|
|
192
|
+
ripple.create(press, button.matches(lightSelector) ? 'light' : 'dark', button)
|
|
193
|
+
}
|
|
194
|
+
root.addEventListener('pointerdown', onPointerDown)
|
|
195
|
+
const created: Attachment = {
|
|
196
|
+
count: 0,
|
|
197
|
+
detach: () => root.removeEventListener('pointerdown', onPointerDown),
|
|
198
|
+
}
|
|
199
|
+
attachments.set(root, created)
|
|
200
|
+
attachment = created
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
const current = attachment
|
|
204
|
+
current.count += 1
|
|
205
|
+
let detached = false
|
|
206
|
+
|
|
207
|
+
return () => {
|
|
208
|
+
if (detached) return
|
|
209
|
+
detached = true
|
|
210
|
+
current.count -= 1
|
|
211
|
+
if (current.count === 0) {
|
|
212
|
+
current.detach()
|
|
213
|
+
attachments.delete(root)
|
|
214
|
+
}
|
|
92
215
|
}
|
|
93
216
|
}
|
|
94
217
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { createPartClasses } from '../core/part-classes.js'
|
|
2
|
+
import { loaderEllipsisContract } from './ellipses.contract.js'
|
|
3
|
+
import styles from './ellipses.module.css'
|
|
4
|
+
|
|
5
|
+
export { loaderEllipsisContract, styles as loaderEllipsisStyles }
|
|
6
|
+
|
|
7
|
+
const part = createPartClasses(loaderEllipsisContract, styles)
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The class attribute for each LoaderEllipsis part, for any framework: the plain
|
|
11
|
+
* `infonomic-*` hook followed by the generated module class.
|
|
12
|
+
*
|
|
13
|
+
* Importing this module loads the LoaderEllipsis stylesheet.
|
|
14
|
+
*/
|
|
15
|
+
export const loaderEllipsisClasses = {
|
|
16
|
+
root: part('root'),
|
|
17
|
+
dot: part('dot'),
|
|
18
|
+
} as const
|
|
19
|
+
|
|
20
|
+
export type LoaderEllipsisPart = keyof typeof loaderEllipsisClasses
|
|
21
|
+
|
|
22
|
+
export interface LoaderEllipsisVariableOptions {
|
|
23
|
+
/** A number is taken as pixels. Left out, the stylesheet's default applies. */
|
|
24
|
+
size?: number | string | undefined
|
|
25
|
+
/** Any CSS colour. Left out, the stylesheet's default applies. */
|
|
26
|
+
color?: string | undefined
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The CSS variables that size and colour the loader, to set as inline style
|
|
31
|
+
* on the root. Empty when neither option is given.
|
|
32
|
+
*/
|
|
33
|
+
export function loaderEllipsisVariables({
|
|
34
|
+
size,
|
|
35
|
+
color,
|
|
36
|
+
}: LoaderEllipsisVariableOptions = {}): Record<string, string> {
|
|
37
|
+
const variables: Record<string, string> = {}
|
|
38
|
+
if (size != null)
|
|
39
|
+
variables['--loader-ellipsis-size'] = typeof size === 'number' ? `${size}px` : size
|
|
40
|
+
if (color) variables['--loader-ellipsis-color'] = color
|
|
41
|
+
return variables
|
|
42
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComponentContract } from '../components/@types/contract.js'
|
|
2
|
+
|
|
3
|
+
export const loaderEllipsisContract = {
|
|
4
|
+
name: 'LoaderEllipsis',
|
|
5
|
+
module: 'loaders/ellipses.module.css',
|
|
6
|
+
parts: {
|
|
7
|
+
root: {
|
|
8
|
+
description: 'The loader. Size and colour come from two optional variables set inline.',
|
|
9
|
+
plainClass: 'infonomic-loader-ellipsis',
|
|
10
|
+
moduleClass: 'loader-ellipsis',
|
|
11
|
+
themingVariables: ['--loader-ellipsis-size', '--loader-ellipsis-color'],
|
|
12
|
+
},
|
|
13
|
+
dot: {
|
|
14
|
+
description: 'One of the four animated dots.',
|
|
15
|
+
plainClass: 'infonomic-loader-ellipsis-dot',
|
|
16
|
+
moduleClass: 'loader-ellipsis-dot',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
} as const satisfies ComponentContract
|
|
@@ -32,22 +32,26 @@
|
|
|
32
32
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
.loader-ellipsis-dot:nth-child(1)
|
|
35
|
+
.loader-ellipsis-dot:nth-child(1),
|
|
36
|
+
:global(.infonomic-loader-ellipsis-dot):nth-child(1) {
|
|
36
37
|
left: 10%;
|
|
37
38
|
animation: loader-ellipsis-grow 0.6s infinite;
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
.loader-ellipsis-dot:nth-child(2)
|
|
41
|
+
.loader-ellipsis-dot:nth-child(2),
|
|
42
|
+
:global(.infonomic-loader-ellipsis-dot):nth-child(2) {
|
|
41
43
|
left: 10%;
|
|
42
44
|
animation: loader-ellipsis-slide 0.6s infinite;
|
|
43
45
|
}
|
|
44
46
|
|
|
45
|
-
.loader-ellipsis-dot:nth-child(3)
|
|
47
|
+
.loader-ellipsis-dot:nth-child(3),
|
|
48
|
+
:global(.infonomic-loader-ellipsis-dot):nth-child(3) {
|
|
46
49
|
left: 40%;
|
|
47
50
|
animation: loader-ellipsis-slide 0.6s infinite;
|
|
48
51
|
}
|
|
49
52
|
|
|
50
|
-
.loader-ellipsis-dot:nth-child(4)
|
|
53
|
+
.loader-ellipsis-dot:nth-child(4),
|
|
54
|
+
:global(.infonomic-loader-ellipsis-dot):nth-child(4) {
|
|
51
55
|
left: 70%;
|
|
52
56
|
animation: loader-ellipsis-shrink 0.6s infinite;
|
|
53
57
|
}
|
package/src/loaders/ellipses.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import type React from 'react'
|
|
|
3
3
|
|
|
4
4
|
import cx from 'clsx'
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import { loaderEllipsisClasses, loaderEllipsisVariables } from './ellipses.classes.js'
|
|
7
7
|
import type { LoaderProps } from './@types/index.js'
|
|
8
8
|
|
|
9
9
|
export function LoaderEllipsis({
|
|
@@ -13,30 +13,21 @@ export function LoaderEllipsis({
|
|
|
13
13
|
style,
|
|
14
14
|
...rest
|
|
15
15
|
}: LoaderProps): React.JSX.Element {
|
|
16
|
-
const ellipsisStyle: React.CSSProperties
|
|
16
|
+
const ellipsisStyle: React.CSSProperties = {
|
|
17
17
|
...style,
|
|
18
|
-
|
|
19
|
-
if (size != null) {
|
|
20
|
-
ellipsisStyle['--loader-ellipsis-size'] = typeof size === 'number' ? `${size}px` : size
|
|
21
|
-
}
|
|
22
|
-
if (color) {
|
|
23
|
-
ellipsisStyle['--loader-ellipsis-color'] = color
|
|
18
|
+
...loaderEllipsisVariables({ size, color }),
|
|
24
19
|
}
|
|
25
20
|
|
|
26
21
|
const circles = [...Array(4)].map((_, index) => (
|
|
27
22
|
<div
|
|
28
23
|
// biome-ignore lint/suspicious/noArrayIndexKey: <explanation>
|
|
29
24
|
key={index}
|
|
30
|
-
className={
|
|
25
|
+
className={loaderEllipsisClasses.dot}
|
|
31
26
|
/>
|
|
32
27
|
))
|
|
33
28
|
|
|
34
29
|
return (
|
|
35
|
-
<div
|
|
36
|
-
className={cx('infonomic-loader-ellipsis', styles['loader-ellipsis'], className)}
|
|
37
|
-
style={ellipsisStyle}
|
|
38
|
-
{...rest}
|
|
39
|
-
>
|
|
30
|
+
<div className={cx(loaderEllipsisClasses.root, className)} style={ellipsisStyle} {...rest}>
|
|
40
31
|
{circles}
|
|
41
32
|
</div>
|
|
42
33
|
)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { createPartClasses } from '../core/part-classes.js'
|
|
2
|
+
import { loaderRingContract } from './ring.contract.js'
|
|
3
|
+
import styles from './ring.module.css'
|
|
4
|
+
|
|
5
|
+
export { loaderRingContract, styles as loaderRingStyles }
|
|
6
|
+
|
|
7
|
+
const part = createPartClasses(loaderRingContract, styles)
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The class attribute for each LoaderRing part, for any framework: the plain
|
|
11
|
+
* `infonomic-*` hook followed by the generated module class.
|
|
12
|
+
*
|
|
13
|
+
* Importing this module loads the LoaderRing stylesheet.
|
|
14
|
+
*/
|
|
15
|
+
export const loaderRingClasses = {
|
|
16
|
+
root: part('root'),
|
|
17
|
+
arc: part('arc'),
|
|
18
|
+
} as const
|
|
19
|
+
|
|
20
|
+
export type LoaderRingPart = keyof typeof loaderRingClasses
|
|
21
|
+
|
|
22
|
+
export interface LoaderRingVariableOptions {
|
|
23
|
+
/** A number is taken as pixels. Left out, the stylesheet's default applies. */
|
|
24
|
+
size?: number | string | undefined
|
|
25
|
+
/** Any CSS colour. Left out, the stylesheet's default applies. */
|
|
26
|
+
color?: string | undefined
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The CSS variables that size and colour the loader, to set as inline style
|
|
31
|
+
* on the root. Empty when neither option is given.
|
|
32
|
+
*/
|
|
33
|
+
export function loaderRingVariables({
|
|
34
|
+
size,
|
|
35
|
+
color,
|
|
36
|
+
}: LoaderRingVariableOptions = {}): Record<string, string> {
|
|
37
|
+
const variables: Record<string, string> = {}
|
|
38
|
+
if (size != null) variables['--loader-ring-size'] = typeof size === 'number' ? `${size}px` : size
|
|
39
|
+
if (color) variables['--loader-ring-color'] = color
|
|
40
|
+
return variables
|
|
41
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComponentContract } from '../components/@types/contract.js'
|
|
2
|
+
|
|
3
|
+
export const loaderRingContract = {
|
|
4
|
+
name: 'LoaderRing',
|
|
5
|
+
module: 'loaders/ring.module.css',
|
|
6
|
+
parts: {
|
|
7
|
+
root: {
|
|
8
|
+
description: 'The loader. Size and colour come from two optional variables set inline.',
|
|
9
|
+
plainClass: 'infonomic-loader-ring',
|
|
10
|
+
moduleClass: 'loader-ring',
|
|
11
|
+
themingVariables: ['--loader-ring-size', '--loader-ring-color'],
|
|
12
|
+
},
|
|
13
|
+
arc: {
|
|
14
|
+
description: 'One of the four animated arcs that make the ring.',
|
|
15
|
+
plainClass: 'infonomic-loader-ring-arc',
|
|
16
|
+
moduleClass: 'loader-ring-arc',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
} as const satisfies ComponentContract
|
|
@@ -36,15 +36,18 @@
|
|
|
36
36
|
border-color: var(--_color) transparent transparent transparent;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
.loader-ring-arc:nth-child(1)
|
|
39
|
+
.loader-ring-arc:nth-child(1),
|
|
40
|
+
:global(.infonomic-loader-ring-arc):nth-child(1) {
|
|
40
41
|
animation-delay: -0.45s;
|
|
41
42
|
}
|
|
42
43
|
|
|
43
|
-
.loader-ring-arc:nth-child(2)
|
|
44
|
+
.loader-ring-arc:nth-child(2),
|
|
45
|
+
:global(.infonomic-loader-ring-arc):nth-child(2) {
|
|
44
46
|
animation-delay: -0.3s;
|
|
45
47
|
}
|
|
46
48
|
|
|
47
|
-
.loader-ring-arc:nth-child(3)
|
|
49
|
+
.loader-ring-arc:nth-child(3),
|
|
50
|
+
:global(.infonomic-loader-ring-arc):nth-child(3) {
|
|
48
51
|
animation-delay: -0.15s;
|
|
49
52
|
}
|
|
50
53
|
|
package/src/loaders/ring.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import type React from 'react'
|
|
|
3
3
|
|
|
4
4
|
import cx from 'clsx'
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import { loaderRingClasses, loaderRingVariables } from './ring.classes.js'
|
|
7
7
|
import type { LoaderProps } from './@types/index.js'
|
|
8
8
|
|
|
9
9
|
export function LoaderRing({
|
|
@@ -13,32 +13,20 @@ export function LoaderRing({
|
|
|
13
13
|
style,
|
|
14
14
|
...rest
|
|
15
15
|
}: LoaderProps): React.JSX.Element {
|
|
16
|
-
const ringStyle: React.CSSProperties
|
|
17
|
-
...style,
|
|
18
|
-
}
|
|
19
|
-
if (size != null) {
|
|
20
|
-
ringStyle['--loader-ring-size'] = typeof size === 'number' ? `${size}px` : size
|
|
21
|
-
}
|
|
22
|
-
if (color) {
|
|
23
|
-
ringStyle['--loader-ring-color'] = color
|
|
24
|
-
}
|
|
16
|
+
const ringStyle: React.CSSProperties = { ...style, ...loaderRingVariables({ size, color }) }
|
|
25
17
|
|
|
26
18
|
const circles = [...Array(4)].map((_, index) => {
|
|
27
19
|
return (
|
|
28
20
|
<div
|
|
29
21
|
// biome-ignore lint/suspicious/noArrayIndexKey: <explanation>
|
|
30
22
|
key={index}
|
|
31
|
-
className={
|
|
23
|
+
className={loaderRingClasses.arc}
|
|
32
24
|
/>
|
|
33
25
|
)
|
|
34
26
|
})
|
|
35
27
|
|
|
36
28
|
return (
|
|
37
|
-
<div
|
|
38
|
-
className={cx('infonomic-loader-ring', styles['loader-ring'], className)}
|
|
39
|
-
style={ringStyle}
|
|
40
|
-
{...rest}
|
|
41
|
-
>
|
|
29
|
+
<div className={cx(loaderRingClasses.root, className)} style={ringStyle} {...rest}>
|
|
42
30
|
{circles}
|
|
43
31
|
</div>
|
|
44
32
|
)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { createPartClasses } from '../core/part-classes.js'
|
|
2
|
+
import { loaderSpinnerContract } from './spinner.contract.js'
|
|
3
|
+
import styles from './spinner.module.css'
|
|
4
|
+
|
|
5
|
+
export { loaderSpinnerContract, styles as loaderSpinnerStyles }
|
|
6
|
+
|
|
7
|
+
const part = createPartClasses(loaderSpinnerContract, styles)
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The class attribute for each LoaderSpinner part, for any framework: the plain
|
|
11
|
+
* `infonomic-*` hook followed by the generated module class.
|
|
12
|
+
*
|
|
13
|
+
* Importing this module loads the LoaderSpinner stylesheet.
|
|
14
|
+
*/
|
|
15
|
+
export const loaderSpinnerClasses = {
|
|
16
|
+
root: part('root'),
|
|
17
|
+
blade: part('blade'),
|
|
18
|
+
bladeInner: part('bladeInner'),
|
|
19
|
+
} as const
|
|
20
|
+
|
|
21
|
+
export type LoaderSpinnerPart = keyof typeof loaderSpinnerClasses
|
|
22
|
+
|
|
23
|
+
export interface LoaderSpinnerVariableOptions {
|
|
24
|
+
/** A number is taken as pixels. Left out, the stylesheet's default applies. */
|
|
25
|
+
size?: number | string | undefined
|
|
26
|
+
/** Any CSS colour. Left out, the stylesheet's default applies. */
|
|
27
|
+
color?: string | undefined
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The CSS variables that size and colour the loader, to set as inline style
|
|
32
|
+
* on the root. Empty when neither option is given.
|
|
33
|
+
*/
|
|
34
|
+
export function loaderSpinnerVariables({
|
|
35
|
+
size,
|
|
36
|
+
color,
|
|
37
|
+
}: LoaderSpinnerVariableOptions = {}): Record<string, string> {
|
|
38
|
+
const variables: Record<string, string> = {}
|
|
39
|
+
if (size != null)
|
|
40
|
+
variables['--loader-spinner-size'] = typeof size === 'number' ? `${size}px` : size
|
|
41
|
+
if (color) variables['--loader-spinner-color'] = color
|
|
42
|
+
return variables
|
|
43
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ComponentContract } from '../components/@types/contract.js'
|
|
2
|
+
|
|
3
|
+
export const loaderSpinnerContract = {
|
|
4
|
+
name: 'LoaderSpinner',
|
|
5
|
+
module: 'loaders/spinner.module.css',
|
|
6
|
+
parts: {
|
|
7
|
+
root: {
|
|
8
|
+
description: 'The loader. Size and colour come from two optional variables set inline.',
|
|
9
|
+
plainClass: 'infonomic-loader-spinner',
|
|
10
|
+
moduleClass: 'loader-spinner',
|
|
11
|
+
themingVariables: ['--loader-spinner-size', '--loader-spinner-color'],
|
|
12
|
+
},
|
|
13
|
+
blade: {
|
|
14
|
+
description: 'One of the twelve positions around the spinner.',
|
|
15
|
+
plainClass: 'infonomic-loader-spinner-blade',
|
|
16
|
+
moduleClass: 'loader-spinner-blade',
|
|
17
|
+
},
|
|
18
|
+
bladeInner: {
|
|
19
|
+
description: 'The visible bar inside a blade, which fades in turn.',
|
|
20
|
+
plainClass: 'infonomic-loader-spinner-blade-inner',
|
|
21
|
+
moduleClass: 'loader-spinner-blade-inner',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
} as const satisfies ComponentContract
|
|
@@ -39,62 +39,74 @@
|
|
|
39
39
|
background: var(--_color);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.loader-spinner-blade:nth-child(1)
|
|
42
|
+
.loader-spinner-blade:nth-child(1),
|
|
43
|
+
:global(.infonomic-loader-spinner-blade):nth-child(1) {
|
|
43
44
|
transform: rotate(0deg);
|
|
44
45
|
animation-delay: -1.1s;
|
|
45
46
|
}
|
|
46
47
|
|
|
47
|
-
.loader-spinner-blade:nth-child(2)
|
|
48
|
+
.loader-spinner-blade:nth-child(2),
|
|
49
|
+
:global(.infonomic-loader-spinner-blade):nth-child(2) {
|
|
48
50
|
transform: rotate(30deg);
|
|
49
51
|
animation-delay: -1s;
|
|
50
52
|
}
|
|
51
53
|
|
|
52
|
-
.loader-spinner-blade:nth-child(3)
|
|
54
|
+
.loader-spinner-blade:nth-child(3),
|
|
55
|
+
:global(.infonomic-loader-spinner-blade):nth-child(3) {
|
|
53
56
|
transform: rotate(60deg);
|
|
54
57
|
animation-delay: -0.9s;
|
|
55
58
|
}
|
|
56
59
|
|
|
57
|
-
.loader-spinner-blade:nth-child(4)
|
|
60
|
+
.loader-spinner-blade:nth-child(4),
|
|
61
|
+
:global(.infonomic-loader-spinner-blade):nth-child(4) {
|
|
58
62
|
transform: rotate(90deg);
|
|
59
63
|
animation-delay: -0.8s;
|
|
60
64
|
}
|
|
61
65
|
|
|
62
|
-
.loader-spinner-blade:nth-child(5)
|
|
66
|
+
.loader-spinner-blade:nth-child(5),
|
|
67
|
+
:global(.infonomic-loader-spinner-blade):nth-child(5) {
|
|
63
68
|
transform: rotate(120deg);
|
|
64
69
|
animation-delay: -0.7s;
|
|
65
70
|
}
|
|
66
71
|
|
|
67
|
-
.loader-spinner-blade:nth-child(6)
|
|
72
|
+
.loader-spinner-blade:nth-child(6),
|
|
73
|
+
:global(.infonomic-loader-spinner-blade):nth-child(6) {
|
|
68
74
|
transform: rotate(150deg);
|
|
69
75
|
animation-delay: -0.6s;
|
|
70
76
|
}
|
|
71
77
|
|
|
72
|
-
.loader-spinner-blade:nth-child(7)
|
|
78
|
+
.loader-spinner-blade:nth-child(7),
|
|
79
|
+
:global(.infonomic-loader-spinner-blade):nth-child(7) {
|
|
73
80
|
transform: rotate(180deg);
|
|
74
81
|
animation-delay: -0.5s;
|
|
75
82
|
}
|
|
76
83
|
|
|
77
|
-
.loader-spinner-blade:nth-child(8)
|
|
84
|
+
.loader-spinner-blade:nth-child(8),
|
|
85
|
+
:global(.infonomic-loader-spinner-blade):nth-child(8) {
|
|
78
86
|
transform: rotate(210deg);
|
|
79
87
|
animation-delay: -0.4s;
|
|
80
88
|
}
|
|
81
89
|
|
|
82
|
-
.loader-spinner-blade:nth-child(9)
|
|
90
|
+
.loader-spinner-blade:nth-child(9),
|
|
91
|
+
:global(.infonomic-loader-spinner-blade):nth-child(9) {
|
|
83
92
|
transform: rotate(240deg);
|
|
84
93
|
animation-delay: -0.3s;
|
|
85
94
|
}
|
|
86
95
|
|
|
87
|
-
.loader-spinner-blade:nth-child(10)
|
|
96
|
+
.loader-spinner-blade:nth-child(10),
|
|
97
|
+
:global(.infonomic-loader-spinner-blade):nth-child(10) {
|
|
88
98
|
transform: rotate(270deg);
|
|
89
99
|
animation-delay: -0.2s;
|
|
90
100
|
}
|
|
91
101
|
|
|
92
|
-
.loader-spinner-blade:nth-child(11)
|
|
102
|
+
.loader-spinner-blade:nth-child(11),
|
|
103
|
+
:global(.infonomic-loader-spinner-blade):nth-child(11) {
|
|
93
104
|
transform: rotate(300deg);
|
|
94
105
|
animation-delay: -0.1s;
|
|
95
106
|
}
|
|
96
107
|
|
|
97
|
-
.loader-spinner-blade:nth-child(12)
|
|
108
|
+
.loader-spinner-blade:nth-child(12),
|
|
109
|
+
:global(.infonomic-loader-spinner-blade):nth-child(12) {
|
|
98
110
|
transform: rotate(330deg);
|
|
99
111
|
animation-delay: 0s;
|
|
100
112
|
}
|
package/src/loaders/spinner.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import type React from 'react'
|
|
|
3
3
|
|
|
4
4
|
import cx from 'clsx'
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import { loaderSpinnerClasses, loaderSpinnerVariables } from './spinner.classes.js'
|
|
7
7
|
import type { LoaderProps } from './@types/index.js'
|
|
8
8
|
|
|
9
9
|
export function LoaderSpinner({
|
|
@@ -16,36 +16,16 @@ export function LoaderSpinner({
|
|
|
16
16
|
const circles = [...Array(12)].map((_, index) => {
|
|
17
17
|
return (
|
|
18
18
|
// biome-ignore lint/suspicious/noArrayIndexKey: <explanation>
|
|
19
|
-
<div
|
|
20
|
-
|
|
21
|
-
className={cx('infonomic-loader-spinner-blade', styles['loader-spinner-blade'])}
|
|
22
|
-
>
|
|
23
|
-
<div
|
|
24
|
-
className={cx(
|
|
25
|
-
'infonomic-loader-spinner-blade-inner',
|
|
26
|
-
styles['loader-spinner-blade-inner']
|
|
27
|
-
)}
|
|
28
|
-
/>
|
|
19
|
+
<div key={index} className={loaderSpinnerClasses.blade}>
|
|
20
|
+
<div className={loaderSpinnerClasses.bladeInner} />
|
|
29
21
|
</div>
|
|
30
22
|
)
|
|
31
23
|
})
|
|
32
24
|
|
|
33
|
-
const spinnerStyle: React.CSSProperties
|
|
34
|
-
...style,
|
|
35
|
-
}
|
|
36
|
-
if (size != null) {
|
|
37
|
-
spinnerStyle['--loader-spinner-size'] = typeof size === 'number' ? `${size}px` : size
|
|
38
|
-
}
|
|
39
|
-
if (color) {
|
|
40
|
-
spinnerStyle['--loader-spinner-color'] = color
|
|
41
|
-
}
|
|
25
|
+
const spinnerStyle: React.CSSProperties = { ...style, ...loaderSpinnerVariables({ size, color }) }
|
|
42
26
|
|
|
43
27
|
return (
|
|
44
|
-
<div
|
|
45
|
-
className={cx('infonomic-loader-spinner', styles['loader-spinner'], className)}
|
|
46
|
-
style={spinnerStyle}
|
|
47
|
-
{...rest}
|
|
48
|
-
>
|
|
28
|
+
<div className={cx(loaderSpinnerClasses.root, className)} style={spinnerStyle} {...rest}>
|
|
49
29
|
{circles}
|
|
50
30
|
</div>
|
|
51
31
|
)
|