@diwacopilot/components 1.0.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/diwa-checkbox.cjs.entry.js +1 -3
- package/dist/cjs/diwa-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/diwa-components.cjs.js +1 -1
- package/dist/cjs/diwa-heading.cjs.entry.js +126 -0
- package/dist/cjs/diwa-heading.cjs.entry.js.map +1 -0
- package/dist/cjs/diwa-icon.cjs.entry.js +1 -1
- package/dist/cjs/diwa-inline-notification.cjs.entry.js +1 -1
- package/dist/cjs/diwa-input-date.cjs.entry.js +1 -1
- package/dist/cjs/diwa-input-email.cjs.entry.js +1 -1
- package/dist/cjs/diwa-input-month.cjs.entry.js +1 -1
- package/dist/cjs/diwa-input-number.cjs.entry.js +1 -1
- package/dist/cjs/diwa-input-password.cjs.entry.js +1 -1
- package/dist/cjs/diwa-input-search.cjs.entry.js +1 -1
- package/dist/cjs/diwa-input-tel.cjs.entry.js +1 -1
- package/dist/cjs/diwa-input-text.cjs.entry.js +1 -1
- package/dist/cjs/diwa-input-time.cjs.entry.js +1 -1
- package/dist/cjs/diwa-input-url.cjs.entry.js +1 -1
- package/dist/cjs/diwa-input-week.cjs.entry.js +1 -1
- package/dist/cjs/diwa-input.cjs.entry.js +1 -1
- package/dist/cjs/diwa-link-pure.cjs.entry.js +1 -1
- package/dist/cjs/diwa-link.cjs.entry.js +1 -1
- package/dist/cjs/diwa-modal.cjs.entry.js +1 -1
- package/dist/cjs/diwa-multi-select-option.cjs.entry.js +1 -1
- package/dist/cjs/diwa-multi-select.cjs.entry.js +2 -2
- package/dist/cjs/diwa-pagination.cjs.entry.js +1 -1
- package/dist/cjs/diwa-pin-code.cjs.entry.js +2 -2
- package/dist/cjs/diwa-popover.cjs.entry.js +1 -1
- package/dist/cjs/diwa-radio-group-item.cjs.entry.js +2 -3
- package/dist/cjs/diwa-radio-group-item.cjs.entry.js.map +1 -1
- package/dist/cjs/diwa-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/diwa-scroller.cjs.entry.js +23 -13
- package/dist/cjs/diwa-scroller.cjs.entry.js.map +1 -1
- package/dist/cjs/diwa-segmented-control-item.cjs.entry.js +1 -1
- package/dist/cjs/diwa-segmented-control.cjs.entry.js +1 -1
- package/dist/cjs/diwa-select-option.cjs.entry.js +24 -10
- package/dist/cjs/diwa-select-option.cjs.entry.js.map +1 -1
- package/dist/cjs/diwa-select.cjs.entry.js +15 -1
- package/dist/cjs/diwa-select.cjs.entry.js.map +1 -1
- package/dist/cjs/diwa-spinner.cjs.entry.js +1 -1
- package/dist/cjs/diwa-stepper-horizontal-item.cjs.entry.js +1 -1
- package/dist/cjs/diwa-stepper-horizontal.cjs.entry.js +1 -1
- package/dist/cjs/diwa-switch.cjs.entry.js +1 -1
- package/dist/cjs/diwa-table-body.cjs.entry.js +1 -1
- package/dist/cjs/diwa-table-cell.cjs.entry.js +15 -15
- package/dist/cjs/diwa-table-cell.cjs.entry.js.map +1 -1
- package/dist/cjs/diwa-table-head-cell.cjs.entry.js +64 -53
- package/dist/cjs/diwa-table-head-cell.cjs.entry.js.map +1 -1
- package/dist/cjs/diwa-table-head.cjs.entry.js +16 -11
- package/dist/cjs/diwa-table-head.cjs.entry.js.map +1 -1
- package/dist/cjs/diwa-table-row.cjs.entry.js +11 -10
- package/dist/cjs/diwa-table-row.cjs.entry.js.map +1 -1
- package/dist/cjs/diwa-table.cjs.entry.js +83 -43
- package/dist/cjs/diwa-table.cjs.entry.js.map +1 -1
- package/dist/cjs/diwa-tabs-bar.cjs.entry.js +1 -1
- package/dist/cjs/diwa-tabs-item.cjs.entry.js +1 -1
- package/dist/cjs/diwa-tabs.cjs.entry.js +12 -12
- package/dist/cjs/diwa-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/diwa-tag-dismissible.cjs.entry.js +6 -8
- package/dist/cjs/diwa-tag-dismissible.cjs.entry.js.map +1 -1
- package/dist/cjs/diwa-tag.cjs.entry.js +2 -2
- package/dist/cjs/diwa-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/diwa-text-list-item.cjs.entry.js +1 -1
- package/dist/cjs/diwa-text-list.cjs.entry.js +1 -1
- package/dist/cjs/diwa-text.cjs.entry.js +1 -1
- package/dist/cjs/diwa-textarea.cjs.entry.js +1 -1
- package/dist/cjs/diwa-toast-item.cjs.entry.js +1 -1
- package/dist/cjs/diwa-toast.cjs.entry.js +111 -17
- package/dist/cjs/diwa-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/diwa-checkbox/diwa-checkbox-styles.js +1 -3
- package/dist/collection/components/diwa-checkbox/diwa-checkbox-styles.js.map +1 -1
- package/dist/collection/components/diwa-heading/diwa-heading-styles.js +53 -0
- package/dist/collection/components/diwa-heading/diwa-heading-styles.js.map +1 -0
- package/dist/collection/components/diwa-heading/diwa-heading-utils.js +26 -0
- package/dist/collection/components/diwa-heading/diwa-heading-utils.js.map +1 -0
- package/dist/collection/components/diwa-heading/diwa-heading.js +235 -0
- package/dist/collection/components/diwa-heading/diwa-heading.js.map +1 -0
- package/dist/collection/components/diwa-heading/types.js +2 -0
- package/dist/collection/components/diwa-heading/types.js.map +1 -0
- package/dist/collection/components/diwa-icon/diwa-icon.js +1 -1
- package/dist/collection/components/diwa-inline-notification/diwa-inline-notification.js +1 -1
- package/dist/collection/components/diwa-input/diwa-input.js +1 -1
- package/dist/collection/components/diwa-input-date/diwa-input-date.js +1 -1
- package/dist/collection/components/diwa-input-email/diwa-input-email.js +1 -1
- package/dist/collection/components/diwa-input-month/diwa-input-month.js +1 -1
- package/dist/collection/components/diwa-input-number/diwa-input-number.js +1 -1
- package/dist/collection/components/diwa-input-password/diwa-input-password.js +1 -1
- package/dist/collection/components/diwa-input-search/diwa-input-search.js +1 -1
- package/dist/collection/components/diwa-input-tel/diwa-input-tel.js +1 -1
- package/dist/collection/components/diwa-input-text/diwa-input-text.js +1 -1
- package/dist/collection/components/diwa-input-time/diwa-input-time.js +1 -1
- package/dist/collection/components/diwa-input-url/diwa-input-url.js +1 -1
- package/dist/collection/components/diwa-input-week/diwa-input-week.js +1 -1
- package/dist/collection/components/diwa-link/diwa-link.js +1 -1
- package/dist/collection/components/diwa-link-pure/diwa-link-pure.js +1 -1
- package/dist/collection/components/diwa-modal/diwa-modal.js +1 -1
- package/dist/collection/components/diwa-multi-select/diwa-multi-select.js +2 -2
- package/dist/collection/components/diwa-multi-select-option/diwa-multi-select-option.js +1 -1
- package/dist/collection/components/diwa-pagination/diwa-pagination.js +1 -1
- package/dist/collection/components/diwa-pin-code/diwa-pin-code.js +2 -2
- package/dist/collection/components/diwa-popover/diwa-popover.js +1 -1
- package/dist/collection/components/diwa-radio-group/diwa-radio-group.js +1 -1
- package/dist/collection/components/diwa-radio-group-item/diwa-radio-group-item-styles.js +1 -2
- package/dist/collection/components/diwa-radio-group-item/diwa-radio-group-item-styles.js.map +1 -1
- package/dist/collection/components/diwa-radio-group-item/diwa-radio-group-item.js +1 -1
- package/dist/collection/components/diwa-scroller/diwa-scroller-styles.js +14 -9
- package/dist/collection/components/diwa-scroller/diwa-scroller-styles.js.map +1 -1
- package/dist/collection/components/diwa-scroller/diwa-scroller.js +9 -13
- package/dist/collection/components/diwa-scroller/diwa-scroller.js.map +1 -1
- package/dist/collection/components/diwa-segmented-control/diwa-segmented-control.js +1 -1
- package/dist/collection/components/diwa-segmented-control-item/diwa-segmented-control-item.js +1 -1
- package/dist/collection/components/diwa-select/diwa-select.js +17 -1
- package/dist/collection/components/diwa-select/diwa-select.js.map +1 -1
- package/dist/collection/components/diwa-select-option/diwa-select-option-styles.js +21 -9
- package/dist/collection/components/diwa-select-option/diwa-select-option-styles.js.map +1 -1
- package/dist/collection/components/diwa-select-option/diwa-select-option.js +23 -1
- package/dist/collection/components/diwa-select-option/diwa-select-option.js.map +1 -1
- package/dist/collection/components/diwa-spinner/diwa-spinner.js +1 -1
- package/dist/collection/components/diwa-stepper-horizontal/diwa-stepper-horizontal.js +1 -1
- package/dist/collection/components/diwa-stepper-horizontal-item/diwa-stepper-horizontal-item.js +1 -1
- package/dist/collection/components/diwa-switch/diwa-switch.js +1 -1
- package/dist/collection/components/diwa-table/diwa-table-styles.js +81 -42
- package/dist/collection/components/diwa-table/diwa-table-styles.js.map +1 -1
- package/dist/collection/components/diwa-table/diwa-table.js +3 -2
- package/dist/collection/components/diwa-table/diwa-table.js.map +1 -1
- package/dist/collection/components/diwa-table-body/diwa-table-body.js +1 -1
- package/dist/collection/components/diwa-table-cell/diwa-table-cell-styles.js +14 -14
- package/dist/collection/components/diwa-table-cell/diwa-table-cell-styles.js.map +1 -1
- package/dist/collection/components/diwa-table-cell/diwa-table-cell.js +1 -1
- package/dist/collection/components/diwa-table-cell/diwa-table-cell.js.map +1 -1
- package/dist/collection/components/diwa-table-head/diwa-table-head-styles.js +15 -10
- package/dist/collection/components/diwa-table-head/diwa-table-head-styles.js.map +1 -1
- package/dist/collection/components/diwa-table-head/diwa-table-head.js +1 -1
- package/dist/collection/components/diwa-table-head-cell/diwa-table-head-cell-styles.js +60 -49
- package/dist/collection/components/diwa-table-head-cell/diwa-table-head-cell-styles.js.map +1 -1
- package/dist/collection/components/diwa-table-head-cell/diwa-table-head-cell.js +4 -4
- package/dist/collection/components/diwa-table-head-cell/diwa-table-head-cell.js.map +1 -1
- package/dist/collection/components/diwa-table-row/diwa-table-row-styles.js +10 -9
- package/dist/collection/components/diwa-table-row/diwa-table-row-styles.js.map +1 -1
- package/dist/collection/components/diwa-table-row/diwa-table-row.js +1 -1
- package/dist/collection/components/diwa-tabs/diwa-tabs-styles.js +11 -11
- package/dist/collection/components/diwa-tabs/diwa-tabs-styles.js.map +1 -1
- package/dist/collection/components/diwa-tabs/diwa-tabs.js +1 -1
- package/dist/collection/components/diwa-tabs-bar/diwa-tabs-bar.js +1 -1
- package/dist/collection/components/diwa-tabs-item/diwa-tabs-item.js +1 -1
- package/dist/collection/components/diwa-tag/diwa-tag-styles.js +1 -1
- package/dist/collection/components/diwa-tag/diwa-tag-styles.js.map +1 -1
- package/dist/collection/components/diwa-tag/diwa-tag.js +1 -1
- package/dist/collection/components/diwa-tag-dismissible/diwa-tag-dismissible-styles.js +5 -6
- package/dist/collection/components/diwa-tag-dismissible/diwa-tag-dismissible-styles.js.map +1 -1
- package/dist/collection/components/diwa-tag-dismissible/diwa-tag-dismissible.js +1 -2
- package/dist/collection/components/diwa-tag-dismissible/diwa-tag-dismissible.js.map +1 -1
- package/dist/collection/components/diwa-text/diwa-text.js +1 -1
- package/dist/collection/components/diwa-text-list/diwa-text-list.js +1 -1
- package/dist/collection/components/diwa-text-list-item/diwa-text-list-item.js +1 -1
- package/dist/collection/components/diwa-textarea/diwa-textarea.js +1 -1
- package/dist/collection/components/diwa-toast/diwa-toast-manager.js +96 -0
- package/dist/collection/components/diwa-toast/diwa-toast-manager.js.map +1 -0
- package/dist/collection/components/diwa-toast/diwa-toast.js +24 -25
- package/dist/collection/components/diwa-toast/diwa-toast.js.map +1 -1
- package/dist/collection/components/diwa-toast-item/diwa-toast-item.js +1 -1
- package/dist/diwa-components/diwa-components.css +2 -2
- package/dist/diwa-components/diwa-components.esm.js +1 -1
- package/dist/diwa-components/diwa-components.esm.js.map +1 -1
- package/dist/diwa-components/{p-2b54c761.entry.js → p-09f2e643.entry.js} +2 -2
- package/dist/diwa-components/{p-4ac5a26e.entry.js → p-117dc41d.entry.js} +2 -2
- package/dist/diwa-components/p-117dc41d.entry.js.map +1 -0
- package/dist/diwa-components/{p-1022a474.entry.js → p-1250d0c7.entry.js} +2 -2
- package/dist/diwa-components/{p-1a1bd7ed.entry.js → p-13e71247.entry.js} +2 -2
- package/dist/diwa-components/p-1830772d.entry.js +2 -0
- package/dist/diwa-components/{p-f4a589b5.entry.js → p-1d708e1e.entry.js} +2 -2
- package/dist/diwa-components/{p-bb04cdd6.entry.js → p-238da82a.entry.js} +2 -2
- package/dist/diwa-components/p-29419c9a.entry.js +2 -0
- package/dist/diwa-components/p-29419c9a.entry.js.map +1 -0
- package/dist/diwa-components/{p-c896dfa5.entry.js → p-3269a4b7.entry.js} +2 -2
- package/dist/diwa-components/p-35b69160.entry.js +2 -0
- package/dist/diwa-components/p-35b69160.entry.js.map +1 -0
- package/dist/diwa-components/{p-fbe73240.entry.js → p-3660b09a.entry.js} +2 -2
- package/dist/diwa-components/{p-c37374ab.entry.js → p-36b004e9.entry.js} +2 -2
- package/dist/diwa-components/p-37e1bea3.entry.js +2 -0
- package/dist/diwa-components/p-37e1bea3.entry.js.map +1 -0
- package/dist/diwa-components/{p-851cbfb8.entry.js → p-3b38fa01.entry.js} +2 -2
- package/dist/diwa-components/p-3fb5cc30.entry.js +2 -0
- package/dist/diwa-components/p-429c596d.entry.js +2 -0
- package/dist/diwa-components/p-429c596d.entry.js.map +1 -0
- package/dist/diwa-components/p-50866c5a.entry.js +2 -0
- package/dist/diwa-components/p-50866c5a.entry.js.map +1 -0
- package/dist/diwa-components/p-5a597e27.entry.js +2 -0
- package/dist/diwa-components/p-5f9139bc.entry.js +2 -0
- package/dist/diwa-components/p-5f9139bc.entry.js.map +1 -0
- package/dist/diwa-components/p-66c15f66.entry.js +2 -0
- package/dist/diwa-components/p-66c53adc.entry.js +2 -0
- package/dist/diwa-components/p-66c53adc.entry.js.map +1 -0
- package/dist/diwa-components/{p-6253fff6.entry.js → p-71c45961.entry.js} +2 -2
- package/dist/diwa-components/{p-358e1177.entry.js → p-78b16866.entry.js} +2 -2
- package/dist/diwa-components/p-7a99a2aa.entry.js +2 -0
- package/dist/diwa-components/p-7a99a2aa.entry.js.map +1 -0
- package/dist/diwa-components/p-7dc7291f.entry.js +2 -0
- package/dist/diwa-components/{p-09a9e0a0.entry.js → p-8369c48e.entry.js} +2 -2
- package/dist/diwa-components/{p-c0614fb1.entry.js → p-8506ea0c.entry.js} +2 -2
- package/dist/diwa-components/p-863c88a4.entry.js +2 -0
- package/dist/diwa-components/{p-339f6ba7.entry.js.map → p-863c88a4.entry.js.map} +1 -1
- package/dist/diwa-components/{p-ba1ffa71.entry.js → p-87932af2.entry.js} +2 -2
- package/dist/diwa-components/{p-48009a79.entry.js → p-926e283b.entry.js} +2 -2
- package/dist/diwa-components/p-952af214.entry.js +2 -0
- package/dist/diwa-components/p-952af214.entry.js.map +1 -0
- package/dist/diwa-components/{p-4ff58224.entry.js → p-95b0fdea.entry.js} +2 -2
- package/dist/diwa-components/p-9910d570.entry.js +2 -0
- package/dist/diwa-components/p-9910d570.entry.js.map +1 -0
- package/dist/diwa-components/{p-20fd1505.entry.js → p-998dd88e.entry.js} +2 -2
- package/dist/diwa-components/p-9ade0403.entry.js +2 -0
- package/dist/diwa-components/{p-57db0c31.entry.js → p-9c89e586.entry.js} +2 -2
- package/dist/diwa-components/p-b072ff72.entry.js +2 -0
- package/dist/diwa-components/p-b072ff72.entry.js.map +1 -0
- package/dist/diwa-components/{p-565f623e.entry.js → p-bd501daa.entry.js} +2 -2
- package/dist/diwa-components/{p-c1c85f9e.entry.js → p-c6ca8d8b.entry.js} +2 -2
- package/dist/diwa-components/{p-53e21a74.entry.js → p-c78591ce.entry.js} +2 -2
- package/dist/diwa-components/{p-996f7110.entry.js → p-cc0e1662.entry.js} +2 -2
- package/dist/diwa-components/{p-711e295e.entry.js → p-d25377eb.entry.js} +2 -2
- package/dist/diwa-components/{p-7f0ce623.entry.js → p-d917625e.entry.js} +2 -2
- package/dist/diwa-components/{p-d0762292.entry.js → p-db70e030.entry.js} +2 -2
- package/dist/diwa-components/p-db70e030.entry.js.map +1 -0
- package/dist/diwa-components/p-def36bc4.entry.js +2 -0
- package/dist/diwa-components/p-def36bc4.entry.js.map +1 -0
- package/dist/diwa-components/p-e137afc9.entry.js +2 -0
- package/dist/diwa-components/{p-666844e0.entry.js → p-e1935375.entry.js} +2 -2
- package/dist/diwa-components/{p-87ea8001.entry.js → p-e602c199.entry.js} +2 -2
- package/dist/diwa-components/{p-9f140e14.entry.js → p-e9673253.entry.js} +2 -2
- package/dist/diwa-components/p-f44d4091.entry.js +2 -0
- package/dist/diwa-components/p-f44d4091.entry.js.map +1 -0
- package/dist/diwa-components/p-f60f1d81.entry.js +2 -0
- package/dist/diwa-components/p-fae653f7.entry.js +2 -0
- package/dist/esm/diwa-checkbox.entry.js +1 -3
- package/dist/esm/diwa-checkbox.entry.js.map +1 -1
- package/dist/esm/diwa-components.js +1 -1
- package/dist/esm/diwa-heading.entry.js +122 -0
- package/dist/esm/diwa-heading.entry.js.map +1 -0
- package/dist/esm/diwa-icon.entry.js +1 -1
- package/dist/esm/diwa-inline-notification.entry.js +1 -1
- package/dist/esm/diwa-input-date.entry.js +1 -1
- package/dist/esm/diwa-input-email.entry.js +1 -1
- package/dist/esm/diwa-input-month.entry.js +1 -1
- package/dist/esm/diwa-input-number.entry.js +1 -1
- package/dist/esm/diwa-input-password.entry.js +1 -1
- package/dist/esm/diwa-input-search.entry.js +1 -1
- package/dist/esm/diwa-input-tel.entry.js +1 -1
- package/dist/esm/diwa-input-text.entry.js +1 -1
- package/dist/esm/diwa-input-time.entry.js +1 -1
- package/dist/esm/diwa-input-url.entry.js +1 -1
- package/dist/esm/diwa-input-week.entry.js +1 -1
- package/dist/esm/diwa-input.entry.js +1 -1
- package/dist/esm/diwa-link-pure.entry.js +1 -1
- package/dist/esm/diwa-link.entry.js +1 -1
- package/dist/esm/diwa-modal.entry.js +1 -1
- package/dist/esm/diwa-multi-select-option.entry.js +1 -1
- package/dist/esm/diwa-multi-select.entry.js +2 -2
- package/dist/esm/diwa-pagination.entry.js +1 -1
- package/dist/esm/diwa-pin-code.entry.js +2 -2
- package/dist/esm/diwa-popover.entry.js +1 -1
- package/dist/esm/diwa-radio-group-item.entry.js +2 -3
- package/dist/esm/diwa-radio-group-item.entry.js.map +1 -1
- package/dist/esm/diwa-radio-group.entry.js +1 -1
- package/dist/esm/diwa-scroller.entry.js +23 -13
- package/dist/esm/diwa-scroller.entry.js.map +1 -1
- package/dist/esm/diwa-segmented-control-item.entry.js +1 -1
- package/dist/esm/diwa-segmented-control.entry.js +1 -1
- package/dist/esm/diwa-select-option.entry.js +24 -10
- package/dist/esm/diwa-select-option.entry.js.map +1 -1
- package/dist/esm/diwa-select.entry.js +15 -1
- package/dist/esm/diwa-select.entry.js.map +1 -1
- package/dist/esm/diwa-spinner.entry.js +1 -1
- package/dist/esm/diwa-stepper-horizontal-item.entry.js +1 -1
- package/dist/esm/diwa-stepper-horizontal.entry.js +1 -1
- package/dist/esm/diwa-switch.entry.js +1 -1
- package/dist/esm/diwa-table-body.entry.js +1 -1
- package/dist/esm/diwa-table-cell.entry.js +15 -15
- package/dist/esm/diwa-table-cell.entry.js.map +1 -1
- package/dist/esm/diwa-table-head-cell.entry.js +64 -53
- package/dist/esm/diwa-table-head-cell.entry.js.map +1 -1
- package/dist/esm/diwa-table-head.entry.js +16 -11
- package/dist/esm/diwa-table-head.entry.js.map +1 -1
- package/dist/esm/diwa-table-row.entry.js +11 -10
- package/dist/esm/diwa-table-row.entry.js.map +1 -1
- package/dist/esm/diwa-table.entry.js +83 -43
- package/dist/esm/diwa-table.entry.js.map +1 -1
- package/dist/esm/diwa-tabs-bar.entry.js +1 -1
- package/dist/esm/diwa-tabs-item.entry.js +1 -1
- package/dist/esm/diwa-tabs.entry.js +12 -12
- package/dist/esm/diwa-tabs.entry.js.map +1 -1
- package/dist/esm/diwa-tag-dismissible.entry.js +6 -8
- package/dist/esm/diwa-tag-dismissible.entry.js.map +1 -1
- package/dist/esm/diwa-tag.entry.js +2 -2
- package/dist/esm/diwa-tag.entry.js.map +1 -1
- package/dist/esm/diwa-text-list-item.entry.js +1 -1
- package/dist/esm/diwa-text-list.entry.js +1 -1
- package/dist/esm/diwa-text.entry.js +1 -1
- package/dist/esm/diwa-textarea.entry.js +1 -1
- package/dist/esm/diwa-toast-item.entry.js +1 -1
- package/dist/esm/diwa-toast.entry.js +111 -17
- package/dist/esm/diwa-toast.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/diwa-heading/diwa-heading-styles.d.ts +3 -0
- package/dist/types/components/diwa-heading/diwa-heading-utils.d.ts +10 -0
- package/dist/types/components/diwa-heading/diwa-heading.d.ts +49 -0
- package/dist/types/components/diwa-heading/types.d.ts +17 -0
- package/dist/types/components/diwa-scroller/diwa-scroller-styles.d.ts +1 -1
- package/dist/types/components/diwa-scroller/diwa-scroller.d.ts +2 -1
- package/dist/types/components/diwa-select/diwa-select.d.ts +2 -0
- package/dist/types/components/diwa-select-option/diwa-select-option.d.ts +2 -0
- package/dist/types/components/diwa-table/diwa-table.d.ts +1 -1
- package/dist/types/components/diwa-toast/diwa-toast-manager.d.ts +34 -0
- package/dist/types/components/diwa-toast/diwa-toast.d.ts +12 -12
- package/dist/types/components.d.ts +144 -25
- package/dist-custom-elements/diwa-accordion.js +1 -1
- package/dist-custom-elements/diwa-button-pure.js +1 -1
- package/dist-custom-elements/diwa-button.js +1 -1
- package/dist-custom-elements/diwa-checkbox.js +1 -3
- package/dist-custom-elements/diwa-checkbox.js.map +1 -1
- package/dist-custom-elements/diwa-flyout.js +2 -2
- package/dist-custom-elements/diwa-heading.d.ts +11 -0
- package/dist-custom-elements/diwa-heading.js +149 -0
- package/dist-custom-elements/diwa-heading.js.map +1 -0
- package/dist-custom-elements/diwa-icon.js +1 -1
- package/dist-custom-elements/diwa-inline-notification.js +3 -3
- package/dist-custom-elements/diwa-input-date.js +1 -1
- package/dist-custom-elements/diwa-input-email.js +1 -1
- package/dist-custom-elements/diwa-input-month.js +1 -1
- package/dist-custom-elements/diwa-input-number.js +1 -1
- package/dist-custom-elements/diwa-input-password.js +2 -2
- package/dist-custom-elements/diwa-input-search.js +2 -2
- package/dist-custom-elements/diwa-input-tel.js +1 -1
- package/dist-custom-elements/diwa-input-text.js +1 -1
- package/dist-custom-elements/diwa-input-time.js +1 -1
- package/dist-custom-elements/diwa-input-url.js +1 -1
- package/dist-custom-elements/diwa-input-week.js +1 -1
- package/dist-custom-elements/diwa-input.js +1 -1
- package/dist-custom-elements/diwa-link-pure.js +2 -2
- package/dist-custom-elements/diwa-link.js +2 -2
- package/dist-custom-elements/diwa-modal.js +1 -1
- package/dist-custom-elements/diwa-multi-select-option.js +1 -1
- package/dist-custom-elements/diwa-multi-select.js +2 -2
- package/dist-custom-elements/diwa-pagination.js +1 -1
- package/dist-custom-elements/diwa-pin-code.js +2 -2
- package/dist-custom-elements/diwa-popover.js +1 -1
- package/dist-custom-elements/diwa-radio-group-item.js +2 -3
- package/dist-custom-elements/diwa-radio-group-item.js.map +1 -1
- package/dist-custom-elements/diwa-radio-group.js +1 -1
- package/dist-custom-elements/diwa-scroller.js +24 -14
- package/dist-custom-elements/diwa-scroller.js.map +1 -1
- package/dist-custom-elements/diwa-segmented-control-item.js +1 -1
- package/dist-custom-elements/diwa-segmented-control.js +1 -1
- package/dist-custom-elements/diwa-select-option.js +25 -10
- package/dist-custom-elements/diwa-select-option.js.map +1 -1
- package/dist-custom-elements/diwa-select.js +16 -1
- package/dist-custom-elements/diwa-select.js.map +1 -1
- package/dist-custom-elements/diwa-spinner.js +1 -1
- package/dist-custom-elements/diwa-stepper-horizontal-item.js +1 -1
- package/dist-custom-elements/diwa-stepper-horizontal.js +1 -1
- package/dist-custom-elements/diwa-switch.js +2 -2
- package/dist-custom-elements/diwa-table-body.js +1 -1
- package/dist-custom-elements/diwa-table-cell.js +15 -15
- package/dist-custom-elements/diwa-table-cell.js.map +1 -1
- package/dist-custom-elements/diwa-table-head-cell.js +64 -53
- package/dist-custom-elements/diwa-table-head-cell.js.map +1 -1
- package/dist-custom-elements/diwa-table-head.js +16 -11
- package/dist-custom-elements/diwa-table-head.js.map +1 -1
- package/dist-custom-elements/diwa-table-row.js +11 -10
- package/dist-custom-elements/diwa-table-row.js.map +1 -1
- package/dist-custom-elements/diwa-table.js +83 -43
- package/dist-custom-elements/diwa-table.js.map +1 -1
- package/dist-custom-elements/diwa-tabs-bar.js +1 -1
- package/dist-custom-elements/diwa-tabs-item.js +1 -1
- package/dist-custom-elements/diwa-tabs.js +12 -12
- package/dist-custom-elements/diwa-tabs.js.map +1 -1
- package/dist-custom-elements/diwa-tag-dismissible.js +6 -8
- package/dist-custom-elements/diwa-tag-dismissible.js.map +1 -1
- package/dist-custom-elements/diwa-tag.js +3 -3
- package/dist-custom-elements/diwa-tag.js.map +1 -1
- package/dist-custom-elements/diwa-text-list-item.js +1 -1
- package/dist-custom-elements/diwa-text-list.js +1 -1
- package/dist-custom-elements/diwa-text.js +1 -1
- package/dist-custom-elements/diwa-textarea.js +1 -1
- package/dist-custom-elements/diwa-toast-item.js +1 -1
- package/dist-custom-elements/diwa-toast.js +113 -19
- package/dist-custom-elements/diwa-toast.js.map +1 -1
- package/dist-custom-elements/{p-54e5b3fb.js → p-105f3f97.js} +2 -2
- package/dist-custom-elements/{p-54e5b3fb.js.map → p-105f3f97.js.map} +1 -1
- package/dist-custom-elements/{p-f480bce8.js → p-7c951f7f.js} +2 -2
- package/dist-custom-elements/{p-f480bce8.js.map → p-7c951f7f.js.map} +1 -1
- package/dist-custom-elements/{p-302af10d.js → p-8972ae69.js} +2 -2
- package/dist-custom-elements/{p-302af10d.js.map → p-8972ae69.js.map} +1 -1
- package/dist-custom-elements/{p-ed901570.js → p-b7255dc4.js} +2 -2
- package/dist-custom-elements/{p-ed901570.js.map → p-b7255dc4.js.map} +1 -1
- package/package.json +11 -9
- package/dist/diwa-components/p-043e3e19.entry.js +0 -2
- package/dist/diwa-components/p-05988905.entry.js +0 -2
- package/dist/diwa-components/p-08c584fb.entry.js +0 -2
- package/dist/diwa-components/p-08c584fb.entry.js.map +0 -1
- package/dist/diwa-components/p-0cbe8ed4.entry.js +0 -2
- package/dist/diwa-components/p-0cbe8ed4.entry.js.map +0 -1
- package/dist/diwa-components/p-139f619d.entry.js +0 -2
- package/dist/diwa-components/p-139f619d.entry.js.map +0 -1
- package/dist/diwa-components/p-178d18c2.entry.js +0 -2
- package/dist/diwa-components/p-178d18c2.entry.js.map +0 -1
- package/dist/diwa-components/p-2b72a324.entry.js +0 -2
- package/dist/diwa-components/p-339f6ba7.entry.js +0 -2
- package/dist/diwa-components/p-3b7a1431.entry.js +0 -2
- package/dist/diwa-components/p-3b7a1431.entry.js.map +0 -1
- package/dist/diwa-components/p-4a84fee8.entry.js +0 -2
- package/dist/diwa-components/p-4ac5a26e.entry.js.map +0 -1
- package/dist/diwa-components/p-51673c06.entry.js +0 -2
- package/dist/diwa-components/p-51673c06.entry.js.map +0 -1
- package/dist/diwa-components/p-5c2325aa.entry.js +0 -2
- package/dist/diwa-components/p-5cd79382.entry.js +0 -2
- package/dist/diwa-components/p-67950f59.entry.js +0 -2
- package/dist/diwa-components/p-67950f59.entry.js.map +0 -1
- package/dist/diwa-components/p-8012c384.entry.js +0 -2
- package/dist/diwa-components/p-8012c384.entry.js.map +0 -1
- package/dist/diwa-components/p-9088f057.entry.js +0 -2
- package/dist/diwa-components/p-94f603c2.entry.js +0 -2
- package/dist/diwa-components/p-94f603c2.entry.js.map +0 -1
- package/dist/diwa-components/p-b7132ea7.entry.js +0 -2
- package/dist/diwa-components/p-b7132ea7.entry.js.map +0 -1
- package/dist/diwa-components/p-b988c5b3.entry.js +0 -2
- package/dist/diwa-components/p-b988c5b3.entry.js.map +0 -1
- package/dist/diwa-components/p-bc2eecd2.entry.js +0 -2
- package/dist/diwa-components/p-cf960cf6.entry.js +0 -2
- package/dist/diwa-components/p-d0762292.entry.js.map +0 -1
- package/dist/diwa-components/p-f22b6145.entry.js +0 -2
- package/dist/diwa-components/p-f22b6145.entry.js.map +0 -1
- /package/dist/diwa-components/{p-2b54c761.entry.js.map → p-09f2e643.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-1022a474.entry.js.map → p-1250d0c7.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-1a1bd7ed.entry.js.map → p-13e71247.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-711e295e.entry.js.map → p-1830772d.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-f4a589b5.entry.js.map → p-1d708e1e.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-bb04cdd6.entry.js.map → p-238da82a.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-c896dfa5.entry.js.map → p-3269a4b7.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-fbe73240.entry.js.map → p-3660b09a.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-c37374ab.entry.js.map → p-36b004e9.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-851cbfb8.entry.js.map → p-3b38fa01.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-4a84fee8.entry.js.map → p-3fb5cc30.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-5cd79382.entry.js.map → p-5a597e27.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-043e3e19.entry.js.map → p-66c15f66.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-6253fff6.entry.js.map → p-71c45961.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-358e1177.entry.js.map → p-78b16866.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-05988905.entry.js.map → p-7dc7291f.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-09a9e0a0.entry.js.map → p-8369c48e.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-bc2eecd2.entry.js.map → p-8506ea0c.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-ba1ffa71.entry.js.map → p-87932af2.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-48009a79.entry.js.map → p-926e283b.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-4ff58224.entry.js.map → p-95b0fdea.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-20fd1505.entry.js.map → p-998dd88e.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-5c2325aa.entry.js.map → p-9ade0403.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-57db0c31.entry.js.map → p-9c89e586.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-565f623e.entry.js.map → p-bd501daa.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-c1c85f9e.entry.js.map → p-c6ca8d8b.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-53e21a74.entry.js.map → p-c78591ce.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-996f7110.entry.js.map → p-cc0e1662.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-9088f057.entry.js.map → p-d25377eb.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-7f0ce623.entry.js.map → p-d917625e.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-2b72a324.entry.js.map → p-e137afc9.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-666844e0.entry.js.map → p-e1935375.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-87ea8001.entry.js.map → p-e602c199.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-9f140e14.entry.js.map → p-e9673253.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-cf960cf6.entry.js.map → p-f60f1d81.entry.js.map} +0 -0
- /package/dist/diwa-components/{p-c0614fb1.entry.js.map → p-fae653f7.entry.js.map} +0 -0
|
@@ -148,7 +148,7 @@ const DiwaTextarea = class {
|
|
|
148
148
|
const taId = 'textarea';
|
|
149
149
|
const descId = 'desc';
|
|
150
150
|
const msgId = 'msg';
|
|
151
|
-
return (index.h(index.Host, { key: '
|
|
151
|
+
return (index.h(index.Host, { key: 'bc8c28e4261d600dcd7279fbf83f3c69598bede9', "data-theme": this.theme }, index.h("style", { key: '6424b2957223222e398afbd46110e7da11e074d0', innerHTML: getComponentCss(this.state, this.disabled, this.readOnly, this.resize, this.compact) }), index.h("div", { key: 'f99c09858acafd13e43389f0fdeef23352016658', class: "root" }, !this.hideLabel && this.label && (index.h("div", { key: '19062e869778b9f486c110a8a501fbdd77c7a629', class: "label-row" }, index.h("label", { key: '6b7e15fd5794920731f84abb408f4c73c212a03a', class: "label", htmlFor: taId }, this.label, this.required && index.h("span", { key: '2fce6e00c084737d175057e6d0fe291962152f9f', class: "required", "aria-hidden": "true" }, " *")), index.h("slot", { key: '20de835c3283696e786370a8b9e667ad14811f65', name: "label-after" }))), index.h("div", { key: '5ce3c0798d9085266c19623aec5c84809e8abe2f', class: "textarea-wrapper" }, index.h("textarea", { key: '76b21ac80b5f7609692af0dd78badc4bbdc1c8c2', class: "ta", id: taId, name: this.name || undefined, value: this.value, placeholder: this.placeholder || undefined, disabled: this.disabled, required: this.required, readOnly: this.readOnly, rows: this.rows, maxLength: this.maxLength, minLength: this.minLength, "aria-label": this.hideLabel && this.label ? this.label : undefined, "aria-invalid": this.state === 'error' ? 'true' : undefined, "aria-required": this.required ? 'true' : undefined, "aria-describedby": this.message ? msgId : this.description ? descId : undefined, onInput: this.handleInput, onChange: this.handleChange, onBlur: this.handleBlur })), !this.message && this.description && (index.h("p", { key: '8b8914744e47cedda2ceeea9dc004cfb8712fa15', id: descId, class: "description" }, this.description)), this.message && (index.h("p", { key: 'f3678d9d8eeb81e12bd98aac8186df07c7b17369', id: msgId, class: "message" }, this.message)))));
|
|
152
152
|
}
|
|
153
153
|
static get delegatesFocus() { return true; }
|
|
154
154
|
};
|
|
@@ -115,7 +115,7 @@ const DiwaToastItem = class {
|
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
117
|
render() {
|
|
118
|
-
return (index.h(index.Host, { key: '
|
|
118
|
+
return (index.h(index.Host, { key: '333dc3ff2ce58d508fb129b7d415c431ca1c7090', "data-theme": this.theme }, index.h("style", { key: '33587d5ee1d57a09e175b3c6563fe04d57986ec2', innerHTML: getComponentCss(this.state) }), index.h("div", { key: 'f613e6c5351afcf85eeee2423b9c67fb4691e543', class: "toast" }, index.h("span", { key: '6f2c5d046eef9c9c37ddb74e711e91a196fd89b6', class: "icon", "aria-hidden": "true", innerHTML: STATE_ICONS[this.state] }), index.h("span", { key: 'ed412934617f70359b612d6e220410be69f47575', class: "text" }, this.text), index.h("button", { key: 'a71b252002e9573792860b6b068ccbd71dfa210e', type: "button", class: "close", "aria-label": "Dismiss notification", onClick: this.handleClose, innerHTML: CLOSE_ICON }))));
|
|
119
119
|
}
|
|
120
120
|
static get delegatesFocus() { return true; }
|
|
121
121
|
};
|
|
@@ -36,33 +36,127 @@ const getComponentCss = () => `
|
|
|
36
36
|
}
|
|
37
37
|
`;
|
|
38
38
|
|
|
39
|
+
const DEFAULT_TIMEOUT = 6000;
|
|
40
|
+
/** Duration to wait after dismiss before showing the next queued message (matches slideIn animation). */
|
|
41
|
+
const DISMISS_DELAY = 200;
|
|
42
|
+
/**
|
|
43
|
+
* ToastManagerClass — singleton service that owns the toast queue.
|
|
44
|
+
*
|
|
45
|
+
* Only one `<diwa-toast>` element may be registered at a time.
|
|
46
|
+
* The component registers a `refreshFn` callback on `connectedCallback`
|
|
47
|
+
* and unregisters on `disconnectedCallback`.
|
|
48
|
+
*
|
|
49
|
+
* Consumers call `element.addMessage()` (which delegates here) OR import
|
|
50
|
+
* `toastManager` directly and call `toastManager.addMessage()`.
|
|
51
|
+
*/
|
|
52
|
+
class ToastManagerClass {
|
|
53
|
+
constructor() {
|
|
54
|
+
this.queue = [];
|
|
55
|
+
this.current = null;
|
|
56
|
+
this.toastEl = null;
|
|
57
|
+
this.refreshFn = null;
|
|
58
|
+
this.timeout = null;
|
|
59
|
+
this.nextId = 0;
|
|
60
|
+
}
|
|
61
|
+
// ── Registration ──────────────────────────────────────────────────────────
|
|
62
|
+
register(host, refreshFn) {
|
|
63
|
+
if (this.toastEl) {
|
|
64
|
+
console.error('[diwa-toast] Only one <diwa-toast> may exist per page. Multiple instances detected.');
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
this.toastEl = host;
|
|
68
|
+
this.refreshFn = refreshFn;
|
|
69
|
+
}
|
|
70
|
+
unregister() {
|
|
71
|
+
this.clearTimeout();
|
|
72
|
+
this.queue = [];
|
|
73
|
+
this.current = null;
|
|
74
|
+
this.toastEl = null;
|
|
75
|
+
this.refreshFn = null;
|
|
76
|
+
}
|
|
77
|
+
// ── Public API ────────────────────────────────────────────────────────────
|
|
78
|
+
addMessage(message) {
|
|
79
|
+
var _a;
|
|
80
|
+
if (!this.toastEl) {
|
|
81
|
+
console.warn('[diwa-toast] addMessage() called but no <diwa-toast> element is mounted in the page.');
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
if (!((_a = message.text) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
85
|
+
console.warn('[diwa-toast] addMessage() called with empty text.');
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
const entry = Object.assign(Object.assign({ state: 'neutral' }, message), { id: this.nextId++ });
|
|
89
|
+
if (this.current === null) {
|
|
90
|
+
this.show(entry);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
this.queue.push(entry);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
dismiss() {
|
|
97
|
+
var _a;
|
|
98
|
+
this.clearTimeout();
|
|
99
|
+
this.current = null;
|
|
100
|
+
(_a = this.refreshFn) === null || _a === void 0 ? void 0 : _a.call(this, null);
|
|
101
|
+
// Wait for the dismiss animation, then show next queued item
|
|
102
|
+
setTimeout(() => {
|
|
103
|
+
const next = this.queue.shift();
|
|
104
|
+
if (next) {
|
|
105
|
+
this.show(next);
|
|
106
|
+
}
|
|
107
|
+
}, DISMISS_DELAY);
|
|
108
|
+
}
|
|
109
|
+
getCurrent() {
|
|
110
|
+
return this.current;
|
|
111
|
+
}
|
|
112
|
+
// ── Private helpers ───────────────────────────────────────────────────────
|
|
113
|
+
show(entry) {
|
|
114
|
+
var _a;
|
|
115
|
+
this.current = entry;
|
|
116
|
+
(_a = this.refreshFn) === null || _a === void 0 ? void 0 : _a.call(this, entry);
|
|
117
|
+
this.scheduleTimeout(entry);
|
|
118
|
+
}
|
|
119
|
+
scheduleTimeout(entry) {
|
|
120
|
+
var _a;
|
|
121
|
+
const duration = (_a = entry.duration) !== null && _a !== void 0 ? _a : DEFAULT_TIMEOUT;
|
|
122
|
+
if (duration > 0) {
|
|
123
|
+
this.timeout = setTimeout(() => this.dismiss(), duration);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
clearTimeout() {
|
|
127
|
+
if (this.timeout !== null) {
|
|
128
|
+
clearTimeout(this.timeout);
|
|
129
|
+
this.timeout = null;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
const toastManager = new ToastManagerClass();
|
|
134
|
+
|
|
39
135
|
const DiwaToast = class {
|
|
40
136
|
constructor(hostRef) {
|
|
41
137
|
index.registerInstance(this, hostRef);
|
|
42
138
|
this.theme = 'dark';
|
|
43
|
-
this.
|
|
44
|
-
|
|
139
|
+
this.currentMsg = null;
|
|
140
|
+
}
|
|
141
|
+
connectedCallback() {
|
|
142
|
+
toastManager.register(this.host, (msg) => {
|
|
143
|
+
this.currentMsg = msg;
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
disconnectedCallback() {
|
|
147
|
+
toastManager.unregister();
|
|
45
148
|
}
|
|
46
149
|
/**
|
|
47
|
-
*
|
|
150
|
+
* Enqueues a toast message. If no toast is currently visible it is shown
|
|
151
|
+
* immediately; otherwise it is placed in the FIFO queue and shown after all
|
|
152
|
+
* preceding messages have been dismissed.
|
|
48
153
|
*/
|
|
49
154
|
async addMessage(message) {
|
|
50
|
-
|
|
51
|
-
const id = this.nextId++;
|
|
52
|
-
this.messages = [...this.messages, Object.assign(Object.assign({}, message), { id })];
|
|
53
|
-
const duration = (_a = message.duration) !== null && _a !== void 0 ? _a : 5000;
|
|
54
|
-
if (duration > 0) {
|
|
55
|
-
setTimeout(() => this.removeMessage(id), duration);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
removeMessage(id) {
|
|
59
|
-
this.messages = this.messages.filter((m) => m.id !== id);
|
|
155
|
+
toastManager.addMessage(message);
|
|
60
156
|
}
|
|
61
157
|
render() {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
return (index.h("diwa-toast-item", { key: msg.id, text: msg.text, state: (_a = msg.state) !== null && _a !== void 0 ? _a : 'neutral', theme: this.theme, onDismiss: () => this.removeMessage(msg.id) }));
|
|
65
|
-
})));
|
|
158
|
+
var _a;
|
|
159
|
+
return (index.h(index.Host, { key: 'b670220ae7a15fd466b439895fd36bb5e3107f38', role: "status", "aria-live": "polite", "aria-atomic": "false", "data-theme": this.theme }, index.h("style", { key: '621b6332123edfc2078ba87d184036746176aa93', innerHTML: getComponentCss() }), this.currentMsg && (index.h("diwa-toast-item", { key: this.currentMsg.id, text: this.currentMsg.text, state: (_a = this.currentMsg.state) !== null && _a !== void 0 ? _a : 'neutral', theme: this.theme, onDismiss: () => toastManager.dismiss() }))));
|
|
66
160
|
}
|
|
67
161
|
get host() { return index.getElement(this); }
|
|
68
162
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"diwa-toast.entry.cjs.js","mappings":";;;;;;AAAO,MAAM,eAAe,GAAG,MAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8B5C;;
|
|
1
|
+
{"file":"diwa-toast.entry.cjs.js","mappings":";;;;;;AAAO,MAAM,eAAe,GAAG,MAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8B5C;;AC5BD,MAAM,eAAe,GAAG,IAAI,CAAC;AAC7B;AACA,MAAM,aAAa,GAAG,GAAG,CAAC;AAK1B;;;;;;;;;;MAUa,iBAAiB;IAA9B;QACU,UAAK,GAAiB,EAAE,CAAC;QACzB,YAAO,GAAsB,IAAI,CAAC;QAClC,YAAO,GAAuB,IAAI,CAAC;QACnC,cAAS,GAAqB,IAAI,CAAC;QACnC,YAAO,GAAyC,IAAI,CAAC;QACrD,WAAM,GAAG,CAAC,CAAC;KAqFpB;;IAjFC,QAAQ,CAAC,IAAiB,EAAE,SAAoB;QAC9C,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,OAAO,CAAC,KAAK,CAAC,qFAAqF,CAAC,CAAC;YACrG,OAAO;SACR;QACD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;KAC5B;IAED,UAAU;QACR,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;KACvB;;IAID,UAAU,CAAC,OAAqB;;QAC9B,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACjB,OAAO,CAAC,IAAI,CAAC,sFAAsF,CAAC,CAAC;YACrG,OAAO;SACR;QACD,IAAI,EAAC,MAAA,OAAO,CAAC,IAAI,0CAAE,IAAI,EAAE,CAAA,EAAE;YACzB,OAAO,CAAC,IAAI,CAAC,mDAAmD,CAAC,CAAC;YAClE,OAAO;SACR;QAED,MAAM,KAAK,iCACT,KAAK,EAAE,SAAS,IACb,OAAO,KACV,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE,GAClB,CAAC;QAEF,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI,EAAE;YACzB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAClB;aAAM;YACL,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACxB;KACF;IAED,OAAO;;QACL,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,MAAA,IAAI,CAAC,SAAS,qDAAG,IAAI,CAAC,CAAC;;QAGvB,UAAU,CAAC;YACT,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YAChC,IAAI,IAAI,EAAE;gBACR,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACjB;SACF,EAAE,aAAa,CAAC,CAAC;KACnB;IAED,UAAU;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;KACrB;;IAIO,IAAI,CAAC,KAAiB;;QAC5B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,MAAA,IAAI,CAAC,SAAS,qDAAG,KAAK,CAAC,CAAC;QACxB,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;KAC7B;IAEO,eAAe,CAAC,KAAiB;;QACvC,MAAM,QAAQ,GAAG,MAAA,KAAK,CAAC,QAAQ,mCAAI,eAAe,CAAC;QACnD,IAAI,QAAQ,GAAG,CAAC,EAAE;YAChB,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,CAAC,CAAC;SAC3D;KACF;IAEO,YAAY;QAClB,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI,EAAE;YACzB,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC3B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;SACrB;KACF;CACF;AAEM,MAAM,YAAY,GAAG,IAAI,iBAAiB,EAAE;;MCvFtC,SAAS;IAJtB;;QAO2B,UAAK,GAAU,MAAM,CAAC;QAE9B,eAAU,GAAsB,IAAI,CAAC;KAsCvD;IApCC,iBAAiB;QACf,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG;YACnC,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC;SACvB,CAAC,CAAC;KACJ;IAED,oBAAoB;QAClB,YAAY,CAAC,UAAU,EAAE,CAAC;KAC3B;;;;;;IAQD,MAAM,UAAU,CAAC,OAAqB;QACpC,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;KAClC;IAED,MAAM;;QACJ,QACEA,QAACC,UAAI,qDAAC,IAAI,EAAC,QAAQ,eAAW,QAAQ,iBAAa,OAAO,gBAAa,IAAI,CAAC,KAAK,IAC/ED,oEAAO,SAAS,EAAE,eAAe,EAAE,GAAI,EACtC,IAAI,CAAC,UAAU,KACdA,6BACE,GAAG,EAAE,IAAI,CAAC,UAAU,CAAC,EAAE,EACvB,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,EAC1B,KAAK,EAAE,MAAA,IAAI,CAAC,UAAU,CAAC,KAAK,mCAAI,SAAS,EACzC,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,SAAS,EAAE,MAAM,YAAY,CAAC,OAAO,EAAE,GACvC,CACH,CACI,EACP;KACH;;;;;;","names":["h","Host"],"sources":["src/components/diwa-toast/diwa-toast-styles.ts","src/components/diwa-toast/diwa-toast-manager.ts","src/components/diwa-toast/diwa-toast.tsx"],"sourcesContent":["export const getComponentCss = (): string => `\r\n :host {\n position: fixed;\n bottom: var(--diwa-space-6);\n right: var(--diwa-space-6);\n z-index: var(--diwa-z-toast);\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: var(--diwa-space-3);\n pointer-events: none;\r\n font-family: var(--diwa-font-family-base);\r\n }\r\n\r\n :host([hidden]) {\r\n display: none;\r\n }\r\n\r\n ::slotted(*) {\n pointer-events: all;\n }\n\n @media (max-width: 480px) {\n :host {\n left: var(--diwa-space-3);\n right: var(--diwa-space-3);\n bottom: var(--diwa-space-3);\n align-items: stretch;\n }\n }\n`;\n","import type { ToastMessage } from './types';\r\n\r\nconst DEFAULT_TIMEOUT = 6000;\r\n/** Duration to wait after dismiss before showing the next queued message (matches slideIn animation). */\r\nconst DISMISS_DELAY = 200;\r\n\r\nexport type ToastEntry = ToastMessage & { id: number };\r\ntype RefreshFn = (entry: ToastEntry | null) => void;\r\n\r\n/**\r\n * ToastManagerClass — singleton service that owns the toast queue.\r\n *\r\n * Only one `<diwa-toast>` element may be registered at a time.\r\n * The component registers a `refreshFn` callback on `connectedCallback`\r\n * and unregisters on `disconnectedCallback`.\r\n *\r\n * Consumers call `element.addMessage()` (which delegates here) OR import\r\n * `toastManager` directly and call `toastManager.addMessage()`.\r\n */\r\nexport class ToastManagerClass {\r\n private queue: ToastEntry[] = [];\r\n private current: ToastEntry | null = null;\r\n private toastEl: HTMLElement | null = null;\r\n private refreshFn: RefreshFn | null = null;\r\n private timeout: ReturnType<typeof setTimeout> | null = null;\r\n private nextId = 0;\r\n\r\n // ── Registration ──────────────────────────────────────────────────────────\r\n\r\n register(host: HTMLElement, refreshFn: RefreshFn): void {\r\n if (this.toastEl) {\r\n console.error('[diwa-toast] Only one <diwa-toast> may exist per page. Multiple instances detected.');\r\n return;\r\n }\r\n this.toastEl = host;\r\n this.refreshFn = refreshFn;\r\n }\r\n\r\n unregister(): void {\r\n this.clearTimeout();\r\n this.queue = [];\r\n this.current = null;\r\n this.toastEl = null;\r\n this.refreshFn = null;\r\n }\r\n\r\n // ── Public API ────────────────────────────────────────────────────────────\r\n\r\n addMessage(message: ToastMessage): void {\r\n if (!this.toastEl) {\r\n console.warn('[diwa-toast] addMessage() called but no <diwa-toast> element is mounted in the page.');\r\n return;\r\n }\r\n if (!message.text?.trim()) {\r\n console.warn('[diwa-toast] addMessage() called with empty text.');\r\n return;\r\n }\r\n\r\n const entry: ToastEntry = {\r\n state: 'neutral',\r\n ...message,\r\n id: this.nextId++,\r\n };\r\n\r\n if (this.current === null) {\r\n this.show(entry);\r\n } else {\r\n this.queue.push(entry);\r\n }\r\n }\r\n\r\n dismiss(): void {\r\n this.clearTimeout();\r\n this.current = null;\r\n this.refreshFn?.(null);\r\n\r\n // Wait for the dismiss animation, then show next queued item\r\n setTimeout(() => {\r\n const next = this.queue.shift();\r\n if (next) {\r\n this.show(next);\r\n }\r\n }, DISMISS_DELAY);\r\n }\r\n\r\n getCurrent(): ToastEntry | null {\r\n return this.current;\r\n }\r\n\r\n // ── Private helpers ───────────────────────────────────────────────────────\r\n\r\n private show(entry: ToastEntry): void {\r\n this.current = entry;\r\n this.refreshFn?.(entry);\r\n this.scheduleTimeout(entry);\r\n }\r\n\r\n private scheduleTimeout(entry: ToastEntry): void {\r\n const duration = entry.duration ?? DEFAULT_TIMEOUT;\r\n if (duration > 0) {\r\n this.timeout = setTimeout(() => this.dismiss(), duration);\r\n }\r\n }\r\n\r\n private clearTimeout(): void {\r\n if (this.timeout !== null) {\r\n clearTimeout(this.timeout);\r\n this.timeout = null;\r\n }\r\n }\r\n}\r\n\r\nexport const toastManager = new ToastManagerClass();\r\n","import { Component, Element, Host, Method, Prop, State, h } from '@stencil/core';\r\nimport type { ToastMessage } from './types';\r\nimport type { Theme } from '../../utils/styles';\r\nimport { getComponentCss } from './diwa-toast-styles';\r\nimport { toastManager } from './diwa-toast-manager';\r\nimport type { ToastEntry } from './diwa-toast-manager';\r\n\r\n/**\r\n * @component diwa-toast\r\n *\r\n * Singleton container that queues and displays toast notifications one at a\r\n * time. Call `addMessage()` to enqueue a toast — only one toast is visible at\r\n * a given moment; additional messages are shown in FIFO order as each one is\r\n * dismissed or times out.\r\n *\r\n * Only one `<diwa-toast>` element should exist per page.\r\n *\r\n * Usage:\r\n * const toast = document.querySelector('diwa-toast');\r\n * toast.addMessage({ text: 'Saved!', state: 'success' });\r\n */\r\n@Component({\r\n tag: 'diwa-toast',\r\n shadow: true,\r\n})\r\nexport class DiwaToast {\r\n @Element() host!: HTMLDiwaToastElement;\r\n\r\n @Prop({ reflect: true }) theme: Theme = 'dark';\r\n\r\n @State() private currentMsg: ToastEntry | null = null;\r\n\r\n connectedCallback(): void {\r\n toastManager.register(this.host, (msg) => {\r\n this.currentMsg = msg;\r\n });\r\n }\r\n\r\n disconnectedCallback(): void {\r\n toastManager.unregister();\r\n }\r\n\r\n /**\r\n * Enqueues a toast message. If no toast is currently visible it is shown\r\n * immediately; otherwise it is placed in the FIFO queue and shown after all\r\n * preceding messages have been dismissed.\r\n */\r\n @Method()\r\n async addMessage(message: ToastMessage): Promise<void> {\r\n toastManager.addMessage(message);\r\n }\r\n\r\n render() {\r\n return (\r\n <Host role=\"status\" aria-live=\"polite\" aria-atomic=\"false\" data-theme={this.theme}>\r\n <style innerHTML={getComponentCss()} />\r\n {this.currentMsg && (\r\n <diwa-toast-item\r\n key={this.currentMsg.id}\r\n text={this.currentMsg.text}\r\n state={this.currentMsg.state ?? 'neutral'}\r\n theme={this.theme}\r\n onDismiss={() => toastManager.dismiss()}\r\n />\r\n )}\r\n </Host>\r\n );\r\n }\r\n}\r\n"],"version":3}
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
|
10
10
|
await appGlobals.globalScripts();
|
|
11
|
-
return index.bootstrapLazy(JSON.parse("[[\"diwa-flyout.cjs\",[[1,\"diwa-flyout\",{\"theme\":[513],\"open\":[1540],\"position\":[513],\"backdrop\":[1],\"heading\":[1]},[[8,\"keydown\",\"onKeyDown\"]],{\"open\":[\"onOpenChange\"]}]]],[\"diwa-inline-notification.cjs\",[[1,\"diwa-inline-notification\",{\"theme\":[513],\"state\":[513],\"heading\":[1],\"description\":[1],\"dismissButton\":[4,\"dismiss-button\"],\"actionLabel\":[1,\"action-label\"],\"actionLoading\":[4,\"action-loading\"]}]]],[\"diwa-accordion.cjs\",[[17,\"diwa-accordion\",{\"theme\":[513],\"heading\":[1],\"headingTag\":[1,\"heading-tag\"],\"open\":[516],\"compact\":[516]}]]],[\"diwa-button.cjs\",[[17,\"diwa-button\",{\"theme\":[513],\"variant\":[513],\"size\":[513],\"type\":[1],\"disabled\":[516],\"loading\":[516],\"href\":[1],\"target\":[1],\"name\":[1],\"value\":[1],\"label\":[1],\"hideLabel\":[516,\"hide-label\"],\"icon\":[1]}]]],[\"diwa-input-password.cjs\",[[17,\"diwa-input-password\",{\"label\":[1],\"description\":[1],\"message\":[1],\"state\":[1],\"name\":[1],\"value\":[1025],\"placeholder\":[1],\"disabled\":[516],\"required\":[516],\"readonly\":[516],\"hideLabel\":[4,\"hide-label\"],\"compact\":[4],\"autoComplete\":[1,\"auto-complete\"],\"theme\":[1],\"showToggle\":[4,\"show-toggle\"],\"_hasStart\":[32],\"_hasEnd\":[32],\"showPassword\":[32]}]]],[\"diwa-input-search.cjs\",[[17,\"diwa-input-search\",{\"label\":[1],\"description\":[1],\"message\":[1],\"state\":[1],\"name\":[1],\"value\":[1025],\"placeholder\":[1],\"disabled\":[516],\"required\":[516],\"readonly\":[516],\"hideLabel\":[4,\"hide-label\"],\"compact\":[4],\"autoComplete\":[1,\"auto-complete\"],\"theme\":[1],\"showClearButton\":[4,\"show-clear-button\"],\"_hasStart\":[32],\"_hasEnd\":[32]}]]],[\"diwa-link.cjs\",[[17,\"diwa-link\",{\"theme\":[513],\"variant\":[513],\"href\":[1],\"target\":[1],\"download\":[1],\"rel\":[1],\"icon\":[1],\"hideLabel\":[516,\"hide-label\"],\"compact\":[516],\"label\":[1],\"disabled\":[516]}]]],[\"diwa-link-pure.cjs\",[[17,\"diwa-link-pure\",{\"theme\":[513],\"href\":[1],\"target\":[1],\"download\":[1],\"rel\":[1],\"icon\":[1],\"hideLabel\":[516,\"hide-label\"],\"active\":[516],\"underline\":[516],\"size\":[513],\"alignLabel\":[513,\"align-label\"],\"stretch\":[516],\"label\":[1]}]]],[\"diwa-switch.cjs\",[[17,\"diwa-switch\",{\"checked\":[516],\"disabled\":[516],\"loading\":[516],\"alignLabel\":[1,\"align-label\"],\"compact\":[516],\"theme\":[513]}]]],[\"diwa-tag.cjs\",[[1,\"diwa-tag\",{\"variant\":[513],\"compact\":[516],\"icon\":[1],\"theme\":[513]}]]],[\"diwa-toast.cjs\",[[1,\"diwa-toast\",{\"theme\":[513],\"messages\":[32],\"addMessage\":[64]}]]],[\"diwa-badge.cjs\",[[1,\"diwa-badge\",{\"variant\":[513],\"size\":[513],\"label\":[1],\"theme\":[513]}]]],[\"diwa-checkbox.cjs\",[[17,\"diwa-checkbox\",{\"theme\":[513],\"label\":[1],\"name\":[1],\"value\":[1],\"checked\":[1540],\"indeterminate\":[516],\"disabled\":[516],\"required\":[4],\"state\":[513],\"message\":[1],\"compact\":[516],\"hideLabel\":[516,\"hide-label\"]},null,{\"indeterminate\":[\"watchIndeterminate\"]}]]],[\"diwa-divider.cjs\",[[1,\"diwa-divider\",{\"theme\":[513],\"orientation\":[513]}]]],[\"diwa-input.cjs\",[[17,\"diwa-input\",{\"type\":[1],\"label\":[1],\"placeholder\":[1],\"value\":[1025],\"required\":[4],\"disabled\":[516],\"readonly\":[516],\"state\":[513],\"hint\":[1],\"autocomplete\":[1],\"name\":[1],\"inputId\":[1,\"input-id\"],\"theme\":[513]}]]],[\"diwa-input-date.cjs\",[[17,\"diwa-input-date\",{\"label\":[1],\"description\":[1],\"message\":[1],\"state\":[1],\"name\":[1],\"value\":[1025],\"placeholder\":[1],\"disabled\":[516],\"required\":[516],\"readonly\":[516],\"hideLabel\":[4,\"hide-label\"],\"compact\":[4],\"autoComplete\":[1,\"auto-complete\"],\"theme\":[1],\"min\":[1],\"max\":[1],\"_hasStart\":[32],\"_hasEnd\":[32]}]]],[\"diwa-input-email.cjs\",[[17,\"diwa-input-email\",{\"label\":[1],\"description\":[1],\"message\":[1],\"state\":[1],\"name\":[1],\"value\":[1025],\"placeholder\":[1],\"disabled\":[516],\"required\":[516],\"readonly\":[516],\"hideLabel\":[4,\"hide-label\"],\"compact\":[4],\"autoComplete\":[1,\"auto-complete\"],\"theme\":[1],\"_hasStart\":[32],\"_hasEnd\":[32]}]]],[\"diwa-input-month.cjs\",[[17,\"diwa-input-month\",{\"label\":[1],\"description\":[1],\"message\":[1],\"state\":[1],\"name\":[1],\"value\":[1025],\"placeholder\":[1],\"disabled\":[516],\"required\":[516],\"readonly\":[516],\"hideLabel\":[4,\"hide-label\"],\"compact\":[4],\"autoComplete\":[1,\"auto-complete\"],\"theme\":[1],\"min\":[1],\"max\":[1],\"_hasStart\":[32],\"_hasEnd\":[32]}]]],[\"diwa-input-number.cjs\",[[17,\"diwa-input-number\",{\"label\":[1],\"description\":[1],\"message\":[1],\"state\":[1],\"name\":[1],\"value\":[1025],\"placeholder\":[1],\"disabled\":[516],\"required\":[516],\"readonly\":[516],\"hideLabel\":[4,\"hide-label\"],\"compact\":[4],\"autoComplete\":[1,\"auto-complete\"],\"theme\":[1],\"min\":[2],\"max\":[2],\"step\":[2],\"_hasStart\":[32],\"_hasEnd\":[32]}]]],[\"diwa-input-tel.cjs\",[[17,\"diwa-input-tel\",{\"label\":[1],\"description\":[1],\"message\":[1],\"state\":[1],\"name\":[1],\"value\":[1025],\"placeholder\":[1],\"disabled\":[516],\"required\":[516],\"readonly\":[516],\"hideLabel\":[4,\"hide-label\"],\"compact\":[4],\"autoComplete\":[1,\"auto-complete\"],\"theme\":[1],\"_hasStart\":[32],\"_hasEnd\":[32]}]]],[\"diwa-input-text.cjs\",[[17,\"diwa-input-text\",{\"label\":[1],\"description\":[1],\"message\":[1],\"state\":[1],\"name\":[1],\"value\":[1025],\"placeholder\":[1],\"disabled\":[516],\"required\":[516],\"readonly\":[516],\"hideLabel\":[4,\"hide-label\"],\"compact\":[4],\"autoComplete\":[1,\"auto-complete\"],\"theme\":[1],\"maxLength\":[2,\"max-length\"],\"minLength\":[2,\"min-length\"],\"spellCheck\":[4,\"spell-check\"],\"_hasStart\":[32],\"_hasEnd\":[32]}]]],[\"diwa-input-time.cjs\",[[17,\"diwa-input-time\",{\"label\":[1],\"description\":[1],\"message\":[1],\"state\":[1],\"name\":[1],\"value\":[1025],\"placeholder\":[1],\"disabled\":[516],\"required\":[516],\"readonly\":[516],\"hideLabel\":[4,\"hide-label\"],\"compact\":[4],\"autoComplete\":[1,\"auto-complete\"],\"theme\":[1],\"min\":[1],\"max\":[1],\"step\":[2],\"_hasStart\":[32],\"_hasEnd\":[32]}]]],[\"diwa-input-url.cjs\",[[17,\"diwa-input-url\",{\"label\":[1],\"description\":[1],\"message\":[1],\"state\":[1],\"name\":[1],\"value\":[1025],\"placeholder\":[1],\"disabled\":[516],\"required\":[516],\"readonly\":[516],\"hideLabel\":[4,\"hide-label\"],\"compact\":[4],\"autoComplete\":[1,\"auto-complete\"],\"theme\":[1],\"_hasStart\":[32],\"_hasEnd\":[32]}]]],[\"diwa-input-week.cjs\",[[17,\"diwa-input-week\",{\"label\":[1],\"description\":[1],\"message\":[1],\"state\":[1],\"name\":[1],\"value\":[1025],\"placeholder\":[1],\"disabled\":[516],\"required\":[516],\"readonly\":[516],\"hideLabel\":[4,\"hide-label\"],\"compact\":[4],\"autoComplete\":[1,\"auto-complete\"],\"theme\":[1],\"min\":[1],\"max\":[1],\"_hasStart\":[32],\"_hasEnd\":[32]}]]],[\"diwa-modal.cjs\",[[17,\"diwa-modal\",{\"theme\":[513],\"open\":[516],\"heading\":[1],\"dismissButton\":[4,\"dismiss-button\"],\"disableBackdropClick\":[4,\"disable-backdrop-click\"],\"backdrop\":[1],\"_hasFooter\":[32],\"_hasHeader\":[32]},[[8,\"keydown\",\"onKeyDown\"]],{\"open\":[\"onOpenChange\"]}]]],[\"diwa-multi-select.cjs\",[[17,\"diwa-multi-select\",{\"theme\":[513],\"label\":[1],\"description\":[1],\"name\":[1],\"value\":[1040],\"state\":[513],\"message\":[1],\"hideLabel\":[516,\"hide-label\"],\"disabled\":[516],\"required\":[4],\"compact\":[516],\"dropdownDirection\":[1,\"dropdown-direction\"],\"isOpen\":[32],\"filterText\":[32],\"hasFilterResults\":[32],\"dropdownClass\":[32],\"open\":[64],\"close\":[64]},[[0,\"diwaMultiSelectOptionUpdate\",\"onOptionUpdate\"],[0,\"slotchange\",\"onSlotChange\"]],{\"theme\":[\"onThemeChange\"],\"compact\":[\"onCompactChange\"],\"value\":[\"onValueChange\"],\"isOpen\":[\"onIsOpenChange\"]}]]],[\"diwa-multi-select-option.cjs\",[[17,\"diwa-multi-select-option\",{\"value\":[513],\"disabled\":[516],\"selected\":[1540],\"highlighted\":[1540],\"compact\":[1540],\"theme\":[1025],\"setFocus\":[64]},null,{\"selected\":[\"handlePropChange\"],\"highlighted\":[\"handlePropChange\"],\"disabled\":[\"handlePropChange\"]}]]],[\"diwa-pagination.cjs\",[[17,\"diwa-pagination\",{\"theme\":[513],\"totalItemsCount\":[2,\"total-items-count\"],\"itemsPerPage\":[2,\"items-per-page\"],\"activePage\":[1026,\"active-page\"],\"showLastPage\":[4,\"show-last-page\"],\"intl\":[16]}]]],[\"diwa-pin-code.cjs\",[[17,\"diwa-pin-code\",{\"label\":[1],\"description\":[1],\"state\":[1],\"message\":[1],\"length\":[2],\"value\":[1],\"type\":[1],\"required\":[516],\"disabled\":[516],\"compact\":[4],\"hideLabel\":[4,\"hide-label\"],\"theme\":[513]}]]],[\"diwa-popover.cjs\",[[17,\"diwa-popover\",{\"direction\":[1],\"description\":[1],\"theme\":[513],\"isOpen\":[32]},[[8,\"keydown\",\"handleGlobalKeydown\"],[9,\"pointerdown\",\"handleGlobalPointerDown\"]]]]],[\"diwa-radio-group.cjs\",[[1,\"diwa-radio-group\",{\"theme\":[513],\"label\":[1],\"description\":[1],\"value\":[1537],\"direction\":[513],\"required\":[4],\"disabled\":[516],\"state\":[513],\"message\":[1],\"compact\":[516],\"hideLabel\":[516,\"hide-label\"],\"name\":[1]},[[0,\"diwa-radio-select\",\"handleItemSelect\"]]]]],[\"diwa-radio-group-item.cjs\",[[17,\"diwa-radio-group-item\",{\"theme\":[513],\"value\":[513],\"checked\":[1540],\"name\":[1537],\"disabled\":[516],\"compact\":[516]},null,{\"checked\":[\"handleCheckedChange\"]}]]],[\"diwa-scroller.cjs\",[[1,\"diwa-scroller\",{\"alignScrollIndicator\":[1,\"align-scroll-indicator\"],\"scrollbar\":[4],\"theme\":[513],\"hasOverflow\":[32],\"canScrollLeft\":[32],\"canScrollRight\":[32]},[[9,\"resize\",\"handleWindowResize\"]]]]],[\"diwa-segmented-control.cjs\",[[1,\"diwa-segmented-control\",{\"theme\":[513],\"value\":[1537],\"disabled\":[516],\"compact\":[516]},[[0,\"diwa-segment-select\",\"handleItemSelect\"]]]]],[\"diwa-segmented-control-item.cjs\",[[17,\"diwa-segmented-control-item\",{\"theme\":[513],\"value\":[513],\"selected\":[1540],\"disabled\":[516],\"compact\":[516]}]]],[\"diwa-select.cjs\",[[17,\"diwa-select\",{\"theme\":[513],\"label\":[1],\"description\":[1],\"name\":[1],\"value\":[1025],\"state\":[513],\"message\":[1],\"hideLabel\":[516,\"hide-label\"],\"disabled\":[516],\"required\":[4],\"compact\":[516],\"dropdownDirection\":[1,\"dropdown-direction\"],\"isOpen\":[32],\"hasFilterResults\":[32],\"dropdownClass\":[32],\"open\":[64],\"close\":[64]},[[0,\"diwaSelectOptionUpdate\",\"onOptionUpdate\"],[0,\"slotchange\",\"onSlotChange\"]],{\"theme\":[\"onThemeChange\"],\"value\":[\"onValueChange\"],\"isOpen\":[\"onIsOpenChange\"]}]]],[\"diwa-select-option.cjs\",[[17,\"diwa-select-option\",{\"value\":[513],\"disabled\":[516],\"selected\":[1540],\"highlighted\":[1540],\"theme\":[1025],\"setFocus\":[64]}]]],[\"diwa-stepper-horizontal.cjs\",[[1,\"diwa-stepper-horizontal\",{\"theme\":[513],\"activeStepIndex\":[1026,\"active-step-index\"]},null,{\"activeStepIndex\":[\"handleIndexChange\"]}]]],[\"diwa-stepper-horizontal-item.cjs\",[[1,\"diwa-stepper-horizontal-item\",{\"theme\":[513],\"label\":[1],\"sublabel\":[1],\"state\":[1537],\"stepNumber\":[1026,\"step-number\"],\"isLast\":[1028,\"is-last\"]}]]],[\"diwa-table.cjs\",[[1,\"diwa-table\",{\"theme\":[513],\"caption\":[1],\"compact\":[4],\"layout\":[1],\"bordered\":[4],\"striped\":[4]},[[0,\"diwaTableUpdate\",\"handleTableUpdate\"]]]]],[\"diwa-table-body.cjs\",[[1,\"diwa-table-body\",{\"theme\":[513]}]]],[\"diwa-table-cell.cjs\",[[1,\"diwa-table-cell\",{\"theme\":[513],\"multiline\":[4]}]]],[\"diwa-table-head.cjs\",[[1,\"diwa-table-head\",{\"theme\":[513]}]]],[\"diwa-table-head-cell.cjs\",[[1,\"diwa-table-head-cell\",{\"theme\":[513],\"sort\":[16],\"hideLabel\":[4,\"hide-label\"],\"multiline\":[4]}]]],[\"diwa-table-row.cjs\",[[1,\"diwa-table-row\",{\"theme\":[513]}]]],[\"diwa-tabs.cjs\",[[1,\"diwa-tabs\",{\"theme\":[513],\"activeTabIndex\":[1026,\"active-tab-index\"]},null,{\"activeTabIndex\":[\"handleIndexChange\"]}]]],[\"diwa-tabs-bar.cjs\",[[1,\"diwa-tabs-bar\",{\"theme\":[513],\"activeTabIndex\":[1026,\"active-tab-index\"]},[[0,\"click\",\"handleClick\"],[0,\"keydown\",\"handleKeydown\"]],{\"activeTabIndex\":[\"handleIndexChange\"]}]]],[\"diwa-tabs-item.cjs\",[[1,\"diwa-tabs-item\",{\"theme\":[513],\"label\":[1],\"active\":[1540]}]]],[\"diwa-tag-dismissible.cjs\",[[17,\"diwa-tag-dismissible\",{\"variant\":[513],\"compact\":[516],\"label\":[1],\"theme\":[513]}]]],[\"diwa-text.cjs\",[[1,\"diwa-text\",{\"theme\":[513],\"tag\":[513],\"size\":[513],\"weight\":[513],\"align\":[513],\"color\":[513],\"ellipsis\":[516]}]]],[\"diwa-text-list.cjs\",[[1,\"diwa-text-list\",{\"theme\":[513],\"type\":[513]}]]],[\"diwa-text-list-item.cjs\",[[1,\"diwa-text-list-item\",{\"theme\":[513]}]]],[\"diwa-textarea.cjs\",[[17,\"diwa-textarea\",{\"label\":[1],\"description\":[1],\"state\":[1],\"message\":[1],\"name\":[1],\"value\":[1025],\"placeholder\":[1],\"required\":[4],\"disabled\":[516],\"readOnly\":[516,\"read-only\"],\"maxLength\":[2,\"max-length\"],\"minLength\":[2,\"min-length\"],\"rows\":[2],\"resize\":[1],\"compact\":[4],\"hideLabel\":[4,\"hide-label\"],\"theme\":[513]}]]],[\"diwa-spinner.cjs\",[[1,\"diwa-spinner\",{\"size\":[513],\"theme\":[513],\"label\":[1]}]]],[\"diwa-toast-item.cjs\",[[17,\"diwa-toast-item\",{\"theme\":[513],\"text\":[1],\"state\":[513]}]]],[\"diwa-icon.cjs\",[[1,\"diwa-icon\",{\"name\":[1],\"size\":[2],\"color\":[1],\"label\":[1],\"theme\":[513]}]]],[\"diwa-button-pure.cjs\",[[17,\"diwa-button-pure\",{\"theme\":[513],\"size\":[513],\"icon\":[1],\"disabled\":[516],\"loading\":[516],\"hideLabel\":[516,\"hide-label\"],\"active\":[516],\"underline\":[516],\"alignLabel\":[513,\"align-label\"],\"stretch\":[516],\"type\":[1],\"name\":[1],\"value\":[1],\"href\":[1],\"target\":[1],\"label\":[1]}]]]]"), options);
|
|
11
|
+
return index.bootstrapLazy(JSON.parse("[[\"diwa-flyout.cjs\",[[1,\"diwa-flyout\",{\"theme\":[513],\"open\":[1540],\"position\":[513],\"backdrop\":[1],\"heading\":[1]},[[8,\"keydown\",\"onKeyDown\"]],{\"open\":[\"onOpenChange\"]}]]],[\"diwa-inline-notification.cjs\",[[1,\"diwa-inline-notification\",{\"theme\":[513],\"state\":[513],\"heading\":[1],\"description\":[1],\"dismissButton\":[4,\"dismiss-button\"],\"actionLabel\":[1,\"action-label\"],\"actionLoading\":[4,\"action-loading\"]}]]],[\"diwa-accordion.cjs\",[[17,\"diwa-accordion\",{\"theme\":[513],\"heading\":[1],\"headingTag\":[1,\"heading-tag\"],\"open\":[516],\"compact\":[516]}]]],[\"diwa-button.cjs\",[[17,\"diwa-button\",{\"theme\":[513],\"variant\":[513],\"size\":[513],\"type\":[1],\"disabled\":[516],\"loading\":[516],\"href\":[1],\"target\":[1],\"name\":[1],\"value\":[1],\"label\":[1],\"hideLabel\":[516,\"hide-label\"],\"icon\":[1]}]]],[\"diwa-input-password.cjs\",[[17,\"diwa-input-password\",{\"label\":[1],\"description\":[1],\"message\":[1],\"state\":[1],\"name\":[1],\"value\":[1025],\"placeholder\":[1],\"disabled\":[516],\"required\":[516],\"readonly\":[516],\"hideLabel\":[4,\"hide-label\"],\"compact\":[4],\"autoComplete\":[1,\"auto-complete\"],\"theme\":[1],\"showToggle\":[4,\"show-toggle\"],\"_hasStart\":[32],\"_hasEnd\":[32],\"showPassword\":[32]}]]],[\"diwa-input-search.cjs\",[[17,\"diwa-input-search\",{\"label\":[1],\"description\":[1],\"message\":[1],\"state\":[1],\"name\":[1],\"value\":[1025],\"placeholder\":[1],\"disabled\":[516],\"required\":[516],\"readonly\":[516],\"hideLabel\":[4,\"hide-label\"],\"compact\":[4],\"autoComplete\":[1,\"auto-complete\"],\"theme\":[1],\"showClearButton\":[4,\"show-clear-button\"],\"_hasStart\":[32],\"_hasEnd\":[32]}]]],[\"diwa-link.cjs\",[[17,\"diwa-link\",{\"theme\":[513],\"variant\":[513],\"href\":[1],\"target\":[1],\"download\":[1],\"rel\":[1],\"icon\":[1],\"hideLabel\":[516,\"hide-label\"],\"compact\":[516],\"label\":[1],\"disabled\":[516]}]]],[\"diwa-link-pure.cjs\",[[17,\"diwa-link-pure\",{\"theme\":[513],\"href\":[1],\"target\":[1],\"download\":[1],\"rel\":[1],\"icon\":[1],\"hideLabel\":[516,\"hide-label\"],\"active\":[516],\"underline\":[516],\"size\":[513],\"alignLabel\":[513,\"align-label\"],\"stretch\":[516],\"label\":[1]}]]],[\"diwa-switch.cjs\",[[17,\"diwa-switch\",{\"checked\":[516],\"disabled\":[516],\"loading\":[516],\"alignLabel\":[1,\"align-label\"],\"compact\":[516],\"theme\":[513]}]]],[\"diwa-tag.cjs\",[[1,\"diwa-tag\",{\"variant\":[513],\"compact\":[516],\"icon\":[1],\"theme\":[513]}]]],[\"diwa-toast.cjs\",[[1,\"diwa-toast\",{\"theme\":[513],\"currentMsg\":[32],\"addMessage\":[64]}]]],[\"diwa-badge.cjs\",[[1,\"diwa-badge\",{\"variant\":[513],\"size\":[513],\"label\":[1],\"theme\":[513]}]]],[\"diwa-checkbox.cjs\",[[17,\"diwa-checkbox\",{\"theme\":[513],\"label\":[1],\"name\":[1],\"value\":[1],\"checked\":[1540],\"indeterminate\":[516],\"disabled\":[516],\"required\":[4],\"state\":[513],\"message\":[1],\"compact\":[516],\"hideLabel\":[516,\"hide-label\"]},null,{\"indeterminate\":[\"watchIndeterminate\"]}]]],[\"diwa-divider.cjs\",[[1,\"diwa-divider\",{\"theme\":[513],\"orientation\":[513]}]]],[\"diwa-heading.cjs\",[[1,\"diwa-heading\",{\"theme\":[513],\"size\":[513],\"tag\":[513],\"weight\":[513],\"align\":[513],\"color\":[513],\"ellipsis\":[516]}]]],[\"diwa-input.cjs\",[[17,\"diwa-input\",{\"type\":[1],\"label\":[1],\"placeholder\":[1],\"value\":[1025],\"required\":[4],\"disabled\":[516],\"readonly\":[516],\"state\":[513],\"hint\":[1],\"autocomplete\":[1],\"name\":[1],\"inputId\":[1,\"input-id\"],\"theme\":[513]}]]],[\"diwa-input-date.cjs\",[[17,\"diwa-input-date\",{\"label\":[1],\"description\":[1],\"message\":[1],\"state\":[1],\"name\":[1],\"value\":[1025],\"placeholder\":[1],\"disabled\":[516],\"required\":[516],\"readonly\":[516],\"hideLabel\":[4,\"hide-label\"],\"compact\":[4],\"autoComplete\":[1,\"auto-complete\"],\"theme\":[1],\"min\":[1],\"max\":[1],\"_hasStart\":[32],\"_hasEnd\":[32]}]]],[\"diwa-input-email.cjs\",[[17,\"diwa-input-email\",{\"label\":[1],\"description\":[1],\"message\":[1],\"state\":[1],\"name\":[1],\"value\":[1025],\"placeholder\":[1],\"disabled\":[516],\"required\":[516],\"readonly\":[516],\"hideLabel\":[4,\"hide-label\"],\"compact\":[4],\"autoComplete\":[1,\"auto-complete\"],\"theme\":[1],\"_hasStart\":[32],\"_hasEnd\":[32]}]]],[\"diwa-input-month.cjs\",[[17,\"diwa-input-month\",{\"label\":[1],\"description\":[1],\"message\":[1],\"state\":[1],\"name\":[1],\"value\":[1025],\"placeholder\":[1],\"disabled\":[516],\"required\":[516],\"readonly\":[516],\"hideLabel\":[4,\"hide-label\"],\"compact\":[4],\"autoComplete\":[1,\"auto-complete\"],\"theme\":[1],\"min\":[1],\"max\":[1],\"_hasStart\":[32],\"_hasEnd\":[32]}]]],[\"diwa-input-number.cjs\",[[17,\"diwa-input-number\",{\"label\":[1],\"description\":[1],\"message\":[1],\"state\":[1],\"name\":[1],\"value\":[1025],\"placeholder\":[1],\"disabled\":[516],\"required\":[516],\"readonly\":[516],\"hideLabel\":[4,\"hide-label\"],\"compact\":[4],\"autoComplete\":[1,\"auto-complete\"],\"theme\":[1],\"min\":[2],\"max\":[2],\"step\":[2],\"_hasStart\":[32],\"_hasEnd\":[32]}]]],[\"diwa-input-tel.cjs\",[[17,\"diwa-input-tel\",{\"label\":[1],\"description\":[1],\"message\":[1],\"state\":[1],\"name\":[1],\"value\":[1025],\"placeholder\":[1],\"disabled\":[516],\"required\":[516],\"readonly\":[516],\"hideLabel\":[4,\"hide-label\"],\"compact\":[4],\"autoComplete\":[1,\"auto-complete\"],\"theme\":[1],\"_hasStart\":[32],\"_hasEnd\":[32]}]]],[\"diwa-input-text.cjs\",[[17,\"diwa-input-text\",{\"label\":[1],\"description\":[1],\"message\":[1],\"state\":[1],\"name\":[1],\"value\":[1025],\"placeholder\":[1],\"disabled\":[516],\"required\":[516],\"readonly\":[516],\"hideLabel\":[4,\"hide-label\"],\"compact\":[4],\"autoComplete\":[1,\"auto-complete\"],\"theme\":[1],\"maxLength\":[2,\"max-length\"],\"minLength\":[2,\"min-length\"],\"spellCheck\":[4,\"spell-check\"],\"_hasStart\":[32],\"_hasEnd\":[32]}]]],[\"diwa-input-time.cjs\",[[17,\"diwa-input-time\",{\"label\":[1],\"description\":[1],\"message\":[1],\"state\":[1],\"name\":[1],\"value\":[1025],\"placeholder\":[1],\"disabled\":[516],\"required\":[516],\"readonly\":[516],\"hideLabel\":[4,\"hide-label\"],\"compact\":[4],\"autoComplete\":[1,\"auto-complete\"],\"theme\":[1],\"min\":[1],\"max\":[1],\"step\":[2],\"_hasStart\":[32],\"_hasEnd\":[32]}]]],[\"diwa-input-url.cjs\",[[17,\"diwa-input-url\",{\"label\":[1],\"description\":[1],\"message\":[1],\"state\":[1],\"name\":[1],\"value\":[1025],\"placeholder\":[1],\"disabled\":[516],\"required\":[516],\"readonly\":[516],\"hideLabel\":[4,\"hide-label\"],\"compact\":[4],\"autoComplete\":[1,\"auto-complete\"],\"theme\":[1],\"_hasStart\":[32],\"_hasEnd\":[32]}]]],[\"diwa-input-week.cjs\",[[17,\"diwa-input-week\",{\"label\":[1],\"description\":[1],\"message\":[1],\"state\":[1],\"name\":[1],\"value\":[1025],\"placeholder\":[1],\"disabled\":[516],\"required\":[516],\"readonly\":[516],\"hideLabel\":[4,\"hide-label\"],\"compact\":[4],\"autoComplete\":[1,\"auto-complete\"],\"theme\":[1],\"min\":[1],\"max\":[1],\"_hasStart\":[32],\"_hasEnd\":[32]}]]],[\"diwa-modal.cjs\",[[17,\"diwa-modal\",{\"theme\":[513],\"open\":[516],\"heading\":[1],\"dismissButton\":[4,\"dismiss-button\"],\"disableBackdropClick\":[4,\"disable-backdrop-click\"],\"backdrop\":[1],\"_hasFooter\":[32],\"_hasHeader\":[32]},[[8,\"keydown\",\"onKeyDown\"]],{\"open\":[\"onOpenChange\"]}]]],[\"diwa-multi-select.cjs\",[[17,\"diwa-multi-select\",{\"theme\":[513],\"label\":[1],\"description\":[1],\"name\":[1],\"value\":[1040],\"state\":[513],\"message\":[1],\"hideLabel\":[516,\"hide-label\"],\"disabled\":[516],\"required\":[4],\"compact\":[516],\"dropdownDirection\":[1,\"dropdown-direction\"],\"isOpen\":[32],\"filterText\":[32],\"hasFilterResults\":[32],\"dropdownClass\":[32],\"open\":[64],\"close\":[64]},[[0,\"diwaMultiSelectOptionUpdate\",\"onOptionUpdate\"],[0,\"slotchange\",\"onSlotChange\"]],{\"theme\":[\"onThemeChange\"],\"compact\":[\"onCompactChange\"],\"value\":[\"onValueChange\"],\"isOpen\":[\"onIsOpenChange\"]}]]],[\"diwa-multi-select-option.cjs\",[[17,\"diwa-multi-select-option\",{\"value\":[513],\"disabled\":[516],\"selected\":[1540],\"highlighted\":[1540],\"compact\":[1540],\"theme\":[1025],\"setFocus\":[64]},null,{\"selected\":[\"handlePropChange\"],\"highlighted\":[\"handlePropChange\"],\"disabled\":[\"handlePropChange\"]}]]],[\"diwa-pagination.cjs\",[[17,\"diwa-pagination\",{\"theme\":[513],\"totalItemsCount\":[2,\"total-items-count\"],\"itemsPerPage\":[2,\"items-per-page\"],\"activePage\":[1026,\"active-page\"],\"showLastPage\":[4,\"show-last-page\"],\"intl\":[16]}]]],[\"diwa-pin-code.cjs\",[[17,\"diwa-pin-code\",{\"label\":[1],\"description\":[1],\"state\":[1],\"message\":[1],\"length\":[2],\"value\":[1],\"type\":[1],\"required\":[516],\"disabled\":[516],\"compact\":[4],\"hideLabel\":[4,\"hide-label\"],\"theme\":[513]}]]],[\"diwa-popover.cjs\",[[17,\"diwa-popover\",{\"direction\":[1],\"description\":[1],\"theme\":[513],\"isOpen\":[32]},[[8,\"keydown\",\"handleGlobalKeydown\"],[9,\"pointerdown\",\"handleGlobalPointerDown\"]]]]],[\"diwa-radio-group.cjs\",[[1,\"diwa-radio-group\",{\"theme\":[513],\"label\":[1],\"description\":[1],\"value\":[1537],\"direction\":[513],\"required\":[4],\"disabled\":[516],\"state\":[513],\"message\":[1],\"compact\":[516],\"hideLabel\":[516,\"hide-label\"],\"name\":[1]},[[0,\"diwa-radio-select\",\"handleItemSelect\"]]]]],[\"diwa-radio-group-item.cjs\",[[17,\"diwa-radio-group-item\",{\"theme\":[513],\"value\":[513],\"checked\":[1540],\"name\":[1537],\"disabled\":[516],\"compact\":[516]},null,{\"checked\":[\"handleCheckedChange\"]}]]],[\"diwa-scroller.cjs\",[[1,\"diwa-scroller\",{\"alignScrollIndicator\":[1,\"align-scroll-indicator\"],\"scrollbar\":[4],\"theme\":[513],\"hasOverflow\":[32],\"canScrollLeft\":[32],\"canScrollRight\":[32]}]]],[\"diwa-segmented-control.cjs\",[[1,\"diwa-segmented-control\",{\"theme\":[513],\"value\":[1537],\"disabled\":[516],\"compact\":[516]},[[0,\"diwa-segment-select\",\"handleItemSelect\"]]]]],[\"diwa-segmented-control-item.cjs\",[[17,\"diwa-segmented-control-item\",{\"theme\":[513],\"value\":[513],\"selected\":[1540],\"disabled\":[516],\"compact\":[516]}]]],[\"diwa-select.cjs\",[[17,\"diwa-select\",{\"theme\":[513],\"label\":[1],\"description\":[1],\"name\":[1],\"value\":[1025],\"state\":[513],\"message\":[1],\"hideLabel\":[516,\"hide-label\"],\"disabled\":[516],\"required\":[4],\"compact\":[516],\"dropdownDirection\":[1,\"dropdown-direction\"],\"isOpen\":[32],\"hasFilterResults\":[32],\"dropdownClass\":[32],\"open\":[64],\"close\":[64]},[[0,\"diwaSelectOptionUpdate\",\"onOptionUpdate\"],[0,\"slotchange\",\"onSlotChange\"]],{\"theme\":[\"onThemeChange\"],\"compact\":[\"onCompactChange\"],\"value\":[\"onValueChange\"],\"isOpen\":[\"onIsOpenChange\"]}]]],[\"diwa-select-option.cjs\",[[17,\"diwa-select-option\",{\"value\":[513],\"disabled\":[516],\"selected\":[1540],\"highlighted\":[1540],\"theme\":[1025],\"compact\":[1540],\"setFocus\":[64]}]]],[\"diwa-stepper-horizontal.cjs\",[[1,\"diwa-stepper-horizontal\",{\"theme\":[513],\"activeStepIndex\":[1026,\"active-step-index\"]},null,{\"activeStepIndex\":[\"handleIndexChange\"]}]]],[\"diwa-stepper-horizontal-item.cjs\",[[1,\"diwa-stepper-horizontal-item\",{\"theme\":[513],\"label\":[1],\"sublabel\":[1],\"state\":[1537],\"stepNumber\":[1026,\"step-number\"],\"isLast\":[1028,\"is-last\"]}]]],[\"diwa-table.cjs\",[[1,\"diwa-table\",{\"theme\":[513],\"caption\":[1],\"compact\":[4],\"layout\":[1],\"bordered\":[4],\"striped\":[4]},[[0,\"diwaTableUpdate\",\"handleTableUpdate\"]]]]],[\"diwa-table-body.cjs\",[[1,\"diwa-table-body\",{\"theme\":[513]}]]],[\"diwa-table-cell.cjs\",[[1,\"diwa-table-cell\",{\"theme\":[513],\"multiline\":[4]}]]],[\"diwa-table-head.cjs\",[[1,\"diwa-table-head\",{\"theme\":[513]}]]],[\"diwa-table-head-cell.cjs\",[[1,\"diwa-table-head-cell\",{\"theme\":[513],\"sort\":[16],\"hideLabel\":[4,\"hide-label\"],\"multiline\":[4]}]]],[\"diwa-table-row.cjs\",[[1,\"diwa-table-row\",{\"theme\":[513]}]]],[\"diwa-tabs.cjs\",[[1,\"diwa-tabs\",{\"theme\":[513],\"activeTabIndex\":[1026,\"active-tab-index\"]},null,{\"activeTabIndex\":[\"handleIndexChange\"]}]]],[\"diwa-tabs-bar.cjs\",[[1,\"diwa-tabs-bar\",{\"theme\":[513],\"activeTabIndex\":[1026,\"active-tab-index\"]},[[0,\"click\",\"handleClick\"],[0,\"keydown\",\"handleKeydown\"]],{\"activeTabIndex\":[\"handleIndexChange\"]}]]],[\"diwa-tabs-item.cjs\",[[1,\"diwa-tabs-item\",{\"theme\":[513],\"label\":[1],\"active\":[1540]}]]],[\"diwa-tag-dismissible.cjs\",[[17,\"diwa-tag-dismissible\",{\"variant\":[513],\"compact\":[516],\"label\":[1],\"theme\":[513]}]]],[\"diwa-text.cjs\",[[1,\"diwa-text\",{\"theme\":[513],\"tag\":[513],\"size\":[513],\"weight\":[513],\"align\":[513],\"color\":[513],\"ellipsis\":[516]}]]],[\"diwa-text-list.cjs\",[[1,\"diwa-text-list\",{\"theme\":[513],\"type\":[513]}]]],[\"diwa-text-list-item.cjs\",[[1,\"diwa-text-list-item\",{\"theme\":[513]}]]],[\"diwa-textarea.cjs\",[[17,\"diwa-textarea\",{\"label\":[1],\"description\":[1],\"state\":[1],\"message\":[1],\"name\":[1],\"value\":[1025],\"placeholder\":[1],\"required\":[4],\"disabled\":[516],\"readOnly\":[516,\"read-only\"],\"maxLength\":[2,\"max-length\"],\"minLength\":[2,\"min-length\"],\"rows\":[2],\"resize\":[1],\"compact\":[4],\"hideLabel\":[4,\"hide-label\"],\"theme\":[513]}]]],[\"diwa-spinner.cjs\",[[1,\"diwa-spinner\",{\"size\":[513],\"theme\":[513],\"label\":[1]}]]],[\"diwa-toast-item.cjs\",[[17,\"diwa-toast-item\",{\"theme\":[513],\"text\":[1],\"state\":[513]}]]],[\"diwa-icon.cjs\",[[1,\"diwa-icon\",{\"name\":[1],\"size\":[2],\"color\":[1],\"label\":[1],\"theme\":[513]}]]],[\"diwa-button-pure.cjs\",[[17,\"diwa-button-pure\",{\"theme\":[513],\"size\":[513],\"icon\":[1],\"disabled\":[516],\"loading\":[516],\"hideLabel\":[516,\"hide-label\"],\"active\":[516],\"underline\":[516],\"alignLabel\":[513,\"align-label\"],\"stretch\":[516],\"type\":[1],\"name\":[1],\"value\":[1],\"href\":[1],\"target\":[1],\"label\":[1]}]]]]"), options);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"components/diwa-checkbox/diwa-checkbox.js",
|
|
8
8
|
"components/diwa-divider/diwa-divider.js",
|
|
9
9
|
"components/diwa-flyout/diwa-flyout.js",
|
|
10
|
+
"components/diwa-heading/diwa-heading.js",
|
|
10
11
|
"components/diwa-icon/diwa-icon.js",
|
|
11
12
|
"components/diwa-inline-notification/diwa-inline-notification.js",
|
|
12
13
|
"components/diwa-input/diwa-input.js",
|
|
@@ -35,7 +35,7 @@ export const getComponentCss = (state, _disabled, compact, _hideLabel) => {
|
|
|
35
35
|
|
|
36
36
|
.wrapper {
|
|
37
37
|
display: inline-flex;
|
|
38
|
-
align-items:
|
|
38
|
+
align-items: center;
|
|
39
39
|
gap: var(--diwa-space-3);
|
|
40
40
|
cursor: pointer;
|
|
41
41
|
}
|
|
@@ -51,8 +51,6 @@ export const getComponentCss = (state, _disabled, compact, _hideLabel) => {
|
|
|
51
51
|
flex-shrink: 0;
|
|
52
52
|
width: ${boxSize};
|
|
53
53
|
height: ${boxSize};
|
|
54
|
-
/* Center the box on the first line of label text (line-height: 1.5) */
|
|
55
|
-
margin-top: calc((1.5em - ${boxSize}) / 2);
|
|
56
54
|
}
|
|
57
55
|
|
|
58
56
|
/* ── Native checkbox ──────────────────────────────────────────────── */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diwa-checkbox-styles.js","sourceRoot":"","sources":["../../../src/components/diwa-checkbox/diwa-checkbox-styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE5E,uEAAuE;AACvE,MAAM,gBAAgB,GAAG,gLAAgL,CAAC;AAE1M,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,KAAoB,EACpB,SAAkB,EAClB,OAAgB,EAChB,UAAmB,EACX,EAAE;IACV,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;IAC1C,MAAM,YAAY,GAChB,KAAK,KAAK,OAAO;QACf,CAAC,CAAC,gCAAgC;QAClC,CAAC,CAAC,KAAK,KAAK,SAAS;YACnB,CAAC,CAAC,kCAAkC;YACpC,CAAC,CAAC,4BAA4B,CAAC;IAErC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAwCI,OAAO;cACN,OAAO
|
|
1
|
+
{"version":3,"file":"diwa-checkbox-styles.js","sourceRoot":"","sources":["../../../src/components/diwa-checkbox/diwa-checkbox-styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE5E,uEAAuE;AACvE,MAAM,gBAAgB,GAAG,gLAAgL,CAAC;AAE1M,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,KAAoB,EACpB,SAAkB,EAClB,OAAgB,EAChB,UAAmB,EACX,EAAE;IACV,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;IAC1C,MAAM,YAAY,GAChB,KAAK,KAAK,OAAO;QACf,CAAC,CAAC,gCAAgC;QAClC,CAAC,CAAC,KAAK,KAAK,SAAS;YACnB,CAAC,CAAC,kCAAkC;YACpC,CAAC,CAAC,4BAA4B,CAAC;IAErC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAwCI,OAAO;cACN,OAAO;;;;;;;;;;;;;;;;MAgBf,iBAAiB,EAAE;;;;;;;;;IASrB,aAAa,CAAC,wBAAwB,CAAC;;;;;;;;;;;;;;wBAcnB,YAAY;;;;;;;;;;;;;wBAaZ,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA0E3B,YAAY;;yBAEA,OAAO;;;;;IAK5B,qBAAqB,CAAC,wBAAwB,CAAC;CAClD,CAAC;AACF,CAAC,CAAC","sourcesContent":["import type { CheckboxState } from './types';\r\nimport { getFocusStyle, getReducedMotionStyle } from '../../utils/styles';\r\nimport { checkmarkSvg, getCheckboxBoxCss } from '../../utils/checkbox-mark';\r\n\r\n/** White horizontal dash for indeterminate state on a 12×12 viewBox */\r\nconst indeterminateSvg = `url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Crect x='2.5' y='5.25' width='7' height='1.5' rx='0.75' fill='white'/%3E%3C/svg%3E\")`;\r\n\r\nexport const getComponentCss = (\r\n state: CheckboxState,\r\n _disabled: boolean,\r\n compact: boolean,\r\n _hideLabel: boolean,\r\n): string => {\r\n const boxSize = compact ? '14px' : '20px';\r\n const messageColor =\r\n state === 'error'\r\n ? 'var(--diwa-notification-error)'\r\n : state === 'success'\r\n ? 'var(--diwa-notification-success)'\r\n : 'var(--diwa-text-secondary)';\r\n\r\n return `\r\n\r\n /* ── Host ─────────────────────────────────────────────────────────── */\r\n\r\n :host {\r\n display: inline-block;\r\n font-family: var(--diwa-font-family-base);\r\n outline: none;\r\n }\r\n\r\n :host([hidden]) {\r\n display: none;\r\n }\r\n\r\n /* ── Root layout ──────────────────────────────────────────────────── */\r\n\r\n .root {\r\n display: flex;\r\n flex-direction: column;\r\n gap: var(--diwa-space-1);\r\n }\r\n\r\n /* ── Wrapper: checkbox + label side by side ───────────────────────── */\r\n\r\n .wrapper {\r\n display: inline-flex;\r\n align-items: center;\r\n gap: var(--diwa-space-3);\r\n cursor: pointer;\r\n }\r\n\r\n :host([disabled]) .wrapper {\r\n cursor: not-allowed;\r\n }\r\n\r\n /* ── Input container ──────────────────────────────────────────────── */\r\n\r\n .input-container {\r\n position: relative;\r\n flex-shrink: 0;\r\n width: ${boxSize};\r\n height: ${boxSize};\r\n }\r\n\r\n /* ── Native checkbox ──────────────────────────────────────────────── */\r\n\r\n input[type=\"checkbox\"] {\r\n appearance: none;\r\n -webkit-appearance: none;\r\n display: block;\r\n width: 100%;\r\n height: 100%;\r\n margin: 0;\r\n padding: 0;\r\n box-sizing: border-box;\r\n cursor: pointer;\r\n\r\n ${getCheckboxBoxCss()}\r\n }\r\n\r\n input[type=\"checkbox\"]:disabled {\r\n cursor: not-allowed;\r\n }\r\n\r\n /* ── Focus ring ───────────────────────────────────────────────────── */\r\n\r\n ${getFocusStyle('input[type=\"checkbox\"]')}\r\n\r\n /* ── Hover ────────────────────────────────────────────────────────── */\r\n\r\n input[type=\"checkbox\"]:hover:not(:disabled) {\r\n border-color: var(--diwa-accent);\r\n background-color: var(--diwa-bg-hover);\r\n }\r\n\r\n /* ── Checked state ────────────────────────────────────────────────── */\r\n\r\n input[type=\"checkbox\"]:checked {\r\n background-color: var(--diwa-accent);\r\n border-color: var(--diwa-accent);\r\n background-image: ${checkmarkSvg};\r\n }\r\n\r\n input[type=\"checkbox\"]:checked:hover:not(:disabled) {\r\n background-color: var(--diwa-accent-hover);\r\n border-color: var(--diwa-accent-hover);\r\n }\r\n\r\n /* ── Indeterminate state ──────────────────────────────────────────── */\r\n\r\n input[type=\"checkbox\"]:indeterminate {\r\n background-color: var(--diwa-accent);\r\n border-color: var(--diwa-accent);\r\n background-image: ${indeterminateSvg};\r\n }\r\n\r\n input[type=\"checkbox\"]:indeterminate:hover:not(:disabled) {\r\n background-color: var(--diwa-accent-hover);\r\n border-color: var(--diwa-accent-hover);\r\n }\r\n\r\n /* ── Validation states ────────────────────────────────────────────── */\r\n\r\n :host([state=\"error\"]) input[type=\"checkbox\"]:not(:checked):not(:indeterminate) {\r\n border-color: var(--diwa-notification-error);\r\n }\r\n\r\n :host([state=\"error\"]) input[type=\"checkbox\"]:not(:checked):not(:indeterminate):hover:not(:disabled) {\r\n border-color: var(--diwa-notification-error);\r\n background-color: var(--diwa-bg-hover);\r\n }\r\n\r\n :host([state=\"success\"]) input[type=\"checkbox\"]:not(:checked):not(:indeterminate) {\r\n border-color: var(--diwa-notification-success);\r\n }\r\n\r\n :host([state=\"success\"]) input[type=\"checkbox\"]:not(:checked):not(:indeterminate):hover:not(:disabled) {\r\n border-color: var(--diwa-notification-success);\r\n background-color: var(--diwa-bg-hover);\r\n }\r\n\r\n /* ── Disabled ─────────────────────────────────────────────────────── */\r\n\r\n :host([disabled]) {\r\n opacity: var(--diwa-opacity-disabled);\r\n pointer-events: none;\r\n }\r\n\r\n /* ── Label ────────────────────────────────────────────────────────── */\r\n\r\n .label {\r\n font-size: var(--diwa-font-size-base);\r\n font-weight: var(--diwa-font-weight-regular);\r\n line-height: 1.5;\r\n color: var(--diwa-text-primary);\r\n cursor: pointer;\r\n }\r\n\r\n :host([disabled]) .label {\r\n cursor: not-allowed;\r\n }\r\n\r\n /* Visually-hidden label (still read by screen readers) */\r\n .label--hidden {\r\n border: 0;\r\n clip: rect(0, 0, 0, 0);\r\n height: 1px;\r\n margin: -1px;\r\n overflow: hidden;\r\n padding: 0;\r\n position: absolute;\r\n white-space: nowrap;\r\n width: 1px;\r\n }\r\n\r\n /* Required asterisk */\r\n .required {\r\n color: var(--diwa-notification-error);\r\n margin-left: var(--diwa-space-0-5);\r\n }\r\n\r\n /* ── Message ──────────────────────────────────────────────────────── */\r\n\r\n .message {\r\n display: block;\r\n font-size: var(--diwa-font-size-sm);\r\n line-height: 1.4;\r\n color: ${messageColor};\r\n /* Indent to align under the label, not the checkbox */\r\n padding-left: calc(${boxSize} + var(--diwa-space-3));\r\n }\r\n\r\n /* ── Reduced motion ───────────────────────────────────────────────── */\r\n\r\n ${getReducedMotionStyle('input[type=\"checkbox\"]')}\r\n`;\r\n};\r\n"]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
const FONT_SIZE = {
|
|
2
|
+
'display': 'var(--diwa-heading-font-size, var(--diwa-font-size-fluid-4xl))',
|
|
3
|
+
'h1': 'var(--diwa-heading-font-size, var(--diwa-font-size-fluid-3xl))',
|
|
4
|
+
'h2': 'var(--diwa-heading-font-size, var(--diwa-font-size-fluid-2xl))',
|
|
5
|
+
'h3': 'var(--diwa-heading-font-size, var(--diwa-font-size-fluid-xl))',
|
|
6
|
+
'h4': 'var(--diwa-heading-font-size, var(--diwa-font-size-fluid-lg))',
|
|
7
|
+
'h5': 'var(--diwa-heading-font-size, var(--diwa-font-size-fluid-base))',
|
|
8
|
+
'h6': 'var(--diwa-heading-font-size, var(--diwa-font-size-fluid-sm))',
|
|
9
|
+
'inherit': 'var(--diwa-heading-font-size, inherit)',
|
|
10
|
+
};
|
|
11
|
+
const LETTER_SPACING = {
|
|
12
|
+
'display': 'var(--diwa-heading-letter-spacing, -0.03em)',
|
|
13
|
+
'h1': 'var(--diwa-heading-letter-spacing, -0.03em)',
|
|
14
|
+
'h2': 'var(--diwa-heading-letter-spacing, -0.015em)',
|
|
15
|
+
'h3': 'var(--diwa-heading-letter-spacing, -0.015em)',
|
|
16
|
+
'h4': 'var(--diwa-heading-letter-spacing, 0)',
|
|
17
|
+
'h5': 'var(--diwa-heading-letter-spacing, 0)',
|
|
18
|
+
'h6': 'var(--diwa-heading-letter-spacing, 0)',
|
|
19
|
+
'inherit': 'var(--diwa-heading-letter-spacing, inherit)',
|
|
20
|
+
};
|
|
21
|
+
const FONT_WEIGHT = {
|
|
22
|
+
semibold: 'var(--diwa-font-weight-semibold)',
|
|
23
|
+
bold: 'var(--diwa-font-weight-bold)',
|
|
24
|
+
};
|
|
25
|
+
const COLOR = {
|
|
26
|
+
primary: 'var(--diwa-heading-color, var(--diwa-text-primary))',
|
|
27
|
+
secondary: 'var(--diwa-heading-color, var(--diwa-text-secondary))',
|
|
28
|
+
inherit: 'var(--diwa-heading-color, inherit)',
|
|
29
|
+
};
|
|
30
|
+
export const getComponentCss = (size, weight, align, color, ellipsis) => `
|
|
31
|
+
|
|
32
|
+
:host {
|
|
33
|
+
display: block;
|
|
34
|
+
font-family: var(--diwa-font-family-base);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:host([hidden]) {
|
|
38
|
+
display: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.heading {
|
|
42
|
+
margin: 0;
|
|
43
|
+
padding: 0;
|
|
44
|
+
font-size: ${FONT_SIZE[size]};
|
|
45
|
+
font-weight: ${FONT_WEIGHT[weight]};
|
|
46
|
+
line-height: var(--diwa-heading-line-height, var(--diwa-line-height-tight));
|
|
47
|
+
letter-spacing: ${LETTER_SPACING[size]};
|
|
48
|
+
text-align: ${align};
|
|
49
|
+
color: ${COLOR[color]};
|
|
50
|
+
${ellipsis ? 'overflow: hidden; text-overflow: ellipsis; white-space: nowrap;' : ''}
|
|
51
|
+
}
|
|
52
|
+
`;
|
|
53
|
+
//# sourceMappingURL=diwa-heading-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diwa-heading-styles.js","sourceRoot":"","sources":["../../../src/components/diwa-heading/diwa-heading-styles.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAgC;IAC7C,SAAS,EAAE,gEAAgE;IAC3E,IAAI,EAAO,gEAAgE;IAC3E,IAAI,EAAO,gEAAgE;IAC3E,IAAI,EAAO,+DAA+D;IAC1E,IAAI,EAAO,+DAA+D;IAC1E,IAAI,EAAO,iEAAiE;IAC5E,IAAI,EAAO,+DAA+D;IAC1E,SAAS,EAAE,wCAAwC;CACpD,CAAC;AAEF,MAAM,cAAc,GAAgC;IAClD,SAAS,EAAE,6CAA6C;IACxD,IAAI,EAAO,6CAA6C;IACxD,IAAI,EAAO,8CAA8C;IACzD,IAAI,EAAO,8CAA8C;IACzD,IAAI,EAAO,uCAAuC;IAClD,IAAI,EAAO,uCAAuC;IAClD,IAAI,EAAO,uCAAuC;IAClD,SAAS,EAAE,6CAA6C;CACzD,CAAC;AAEF,MAAM,WAAW,GAAkC;IACjD,QAAQ,EAAE,kCAAkC;IAC5C,IAAI,EAAM,8BAA8B;CACzC,CAAC;AAEF,MAAM,KAAK,GAAiC;IAC1C,OAAO,EAAI,qDAAqD;IAChE,SAAS,EAAE,uDAAuD;IAClE,OAAO,EAAI,oCAAoC;CAChD,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,IAAiB,EACjB,MAAqB,EACrB,KAAmB,EACnB,KAAmB,EACnB,QAAiB,EACT,EAAE,CAAC;;;;;;;;;;;;;;iBAcI,SAAS,CAAC,IAAI,CAAC;mBACb,WAAW,CAAC,MAAM,CAAC;;sBAEhB,cAAc,CAAC,IAAI,CAAC;kBACxB,KAAK;aACV,KAAK,CAAC,KAAK,CAAC;MACnB,QAAQ,CAAC,CAAC,CAAC,iEAAiE,CAAC,CAAC,CAAC,EAAE;;CAEtF,CAAC","sourcesContent":["import type { HeadingAlign, HeadingColor, HeadingSize, HeadingWeight } from './types';\r\n\r\nconst FONT_SIZE: Record<HeadingSize, string> = {\r\n 'display': 'var(--diwa-heading-font-size, var(--diwa-font-size-fluid-4xl))',\r\n 'h1': 'var(--diwa-heading-font-size, var(--diwa-font-size-fluid-3xl))',\r\n 'h2': 'var(--diwa-heading-font-size, var(--diwa-font-size-fluid-2xl))',\r\n 'h3': 'var(--diwa-heading-font-size, var(--diwa-font-size-fluid-xl))',\r\n 'h4': 'var(--diwa-heading-font-size, var(--diwa-font-size-fluid-lg))',\r\n 'h5': 'var(--diwa-heading-font-size, var(--diwa-font-size-fluid-base))',\r\n 'h6': 'var(--diwa-heading-font-size, var(--diwa-font-size-fluid-sm))',\r\n 'inherit': 'var(--diwa-heading-font-size, inherit)',\r\n};\r\n\r\nconst LETTER_SPACING: Record<HeadingSize, string> = {\r\n 'display': 'var(--diwa-heading-letter-spacing, -0.03em)',\r\n 'h1': 'var(--diwa-heading-letter-spacing, -0.03em)',\r\n 'h2': 'var(--diwa-heading-letter-spacing, -0.015em)',\r\n 'h3': 'var(--diwa-heading-letter-spacing, -0.015em)',\r\n 'h4': 'var(--diwa-heading-letter-spacing, 0)',\r\n 'h5': 'var(--diwa-heading-letter-spacing, 0)',\r\n 'h6': 'var(--diwa-heading-letter-spacing, 0)',\r\n 'inherit': 'var(--diwa-heading-letter-spacing, inherit)',\r\n};\r\n\r\nconst FONT_WEIGHT: Record<HeadingWeight, string> = {\r\n semibold: 'var(--diwa-font-weight-semibold)',\r\n bold: 'var(--diwa-font-weight-bold)',\r\n};\r\n\r\nconst COLOR: Record<HeadingColor, string> = {\r\n primary: 'var(--diwa-heading-color, var(--diwa-text-primary))',\r\n secondary: 'var(--diwa-heading-color, var(--diwa-text-secondary))',\r\n inherit: 'var(--diwa-heading-color, inherit)',\r\n};\r\n\r\nexport const getComponentCss = (\r\n size: HeadingSize,\r\n weight: HeadingWeight,\r\n align: HeadingAlign,\r\n color: HeadingColor,\r\n ellipsis: boolean,\r\n): string => `\r\n\r\n :host {\r\n display: block;\r\n font-family: var(--diwa-font-family-base);\r\n }\r\n\r\n :host([hidden]) {\r\n display: none;\r\n }\r\n\r\n .heading {\r\n margin: 0;\r\n padding: 0;\r\n font-size: ${FONT_SIZE[size]};\r\n font-weight: ${FONT_WEIGHT[weight]};\r\n line-height: var(--diwa-heading-line-height, var(--diwa-line-height-tight));\r\n letter-spacing: ${LETTER_SPACING[size]};\r\n text-align: ${align};\r\n color: ${COLOR[color]};\r\n ${ellipsis ? 'overflow: hidden; text-overflow: ellipsis; white-space: nowrap;' : ''}\r\n }\r\n`;\r\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const H_TAGS = new Set(['h1', 'h2', 'h3', 'h4', 'h5', 'h6']);
|
|
2
|
+
export const SIZE_TO_TAG = {
|
|
3
|
+
display: 'h1',
|
|
4
|
+
h1: 'h1',
|
|
5
|
+
h2: 'h2',
|
|
6
|
+
h3: 'h3',
|
|
7
|
+
h4: 'h4',
|
|
8
|
+
h5: 'h5',
|
|
9
|
+
h6: 'h6',
|
|
10
|
+
inherit: 'h2',
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Resolves the HTML tag to render:
|
|
14
|
+
* 1. If any direct slotted child is an h1–h6 element → return 'div' (avoids invalid nesting).
|
|
15
|
+
* 2. If an explicit `tag` prop is provided → use it.
|
|
16
|
+
* 3. Otherwise → infer from the `size` prop.
|
|
17
|
+
*/
|
|
18
|
+
export function getHeadingTag(host, size, tag) {
|
|
19
|
+
if (host && Array.from(host.children).some((el) => H_TAGS.has(el.tagName.toLowerCase()))) {
|
|
20
|
+
return 'div';
|
|
21
|
+
}
|
|
22
|
+
if (tag)
|
|
23
|
+
return tag;
|
|
24
|
+
return SIZE_TO_TAG[size];
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=diwa-heading-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diwa-heading-utils.js","sourceRoot":"","sources":["../../../src/components/diwa-heading/diwa-heading-utils.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AAE7D,MAAM,CAAC,MAAM,WAAW,GAAoC;IAC1D,OAAO,EAAE,IAAI;IACb,EAAE,EAAO,IAAI;IACb,EAAE,EAAO,IAAI;IACb,EAAE,EAAO,IAAI;IACb,EAAE,EAAO,IAAI;IACb,EAAE,EAAO,IAAI;IACb,EAAE,EAAO,IAAI;IACb,OAAO,EAAE,IAAI;CACd,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAC3B,IAAwB,EACxB,IAAiB,EACjB,GAA2B;IAE3B,IAAI,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC;QACzF,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,GAAG;QAAE,OAAO,GAAG,CAAC;IACpB,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC","sourcesContent":["import type { HeadingSize, HeadingTag } from './types';\r\n\r\nconst H_TAGS = new Set(['h1', 'h2', 'h3', 'h4', 'h5', 'h6']);\r\n\r\nexport const SIZE_TO_TAG: Record<HeadingSize, HeadingTag> = {\r\n display: 'h1',\r\n h1: 'h1',\r\n h2: 'h2',\r\n h3: 'h3',\r\n h4: 'h4',\r\n h5: 'h5',\r\n h6: 'h6',\r\n inherit: 'h2',\r\n};\r\n\r\n/**\r\n * Resolves the HTML tag to render:\r\n * 1. If any direct slotted child is an h1–h6 element → return 'div' (avoids invalid nesting).\r\n * 2. If an explicit `tag` prop is provided → use it.\r\n * 3. Otherwise → infer from the `size` prop.\r\n */\r\nexport function getHeadingTag(\r\n host: HTMLElement | null,\r\n size: HeadingSize,\r\n tag: HeadingTag | undefined,\r\n): HeadingTag {\r\n if (host && Array.from(host.children).some((el) => H_TAGS.has(el.tagName.toLowerCase()))) {\r\n return 'div';\r\n }\r\n if (tag) return tag;\r\n return SIZE_TO_TAG[size];\r\n}\r\n"]}
|