@ukho/admiralty-core 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +86 -0
- package/dist/admiralty/admiralty.esm.js +2 -0
- package/dist/admiralty/admiralty.esm.js.map +1 -0
- package/dist/admiralty/index.esm.js +2 -0
- package/dist/admiralty/index.esm.js.map +1 -0
- package/dist/admiralty/p-01cb7adb.entry.js +2 -0
- package/dist/admiralty/p-01cb7adb.entry.js.map +1 -0
- package/dist/admiralty/p-05415353.entry.js +2 -0
- package/dist/admiralty/p-05415353.entry.js.map +1 -0
- package/dist/admiralty/p-08baadfe.entry.js +2 -0
- package/dist/admiralty/p-08baadfe.entry.js.map +1 -0
- package/dist/admiralty/p-1156fb5a.entry.js +2 -0
- package/dist/admiralty/p-1156fb5a.entry.js.map +1 -0
- package/dist/admiralty/p-1597c067.entry.js +2 -0
- package/dist/admiralty/p-1597c067.entry.js.map +1 -0
- package/dist/admiralty/p-18cff2de.js +2 -0
- package/dist/admiralty/p-18cff2de.js.map +1 -0
- package/dist/admiralty/p-1e0fcbb0.entry.js +2 -0
- package/dist/admiralty/p-1e0fcbb0.entry.js.map +1 -0
- package/dist/admiralty/p-281fb779.entry.js +2 -0
- package/dist/admiralty/p-281fb779.entry.js.map +1 -0
- package/dist/admiralty/p-31b52c40.entry.js +2 -0
- package/dist/admiralty/p-31b52c40.entry.js.map +1 -0
- package/dist/admiralty/p-33b7244b.entry.js +2 -0
- package/dist/admiralty/p-33b7244b.entry.js.map +1 -0
- package/dist/admiralty/p-34cbc7a1.entry.js +2 -0
- package/dist/admiralty/p-34cbc7a1.entry.js.map +1 -0
- package/dist/admiralty/p-3c9dee38.entry.js +2 -0
- package/dist/admiralty/p-3c9dee38.entry.js.map +1 -0
- package/dist/admiralty/p-3dfc9fc0.entry.js +2 -0
- package/dist/admiralty/p-3dfc9fc0.entry.js.map +1 -0
- package/dist/admiralty/p-52cb5c3d.entry.js +2 -0
- package/dist/admiralty/p-52cb5c3d.entry.js.map +1 -0
- package/dist/admiralty/p-573407ef.entry.js +2 -0
- package/dist/admiralty/p-573407ef.entry.js.map +1 -0
- package/dist/admiralty/p-61a86783.entry.js +2 -0
- package/dist/admiralty/p-61a86783.entry.js.map +1 -0
- package/dist/admiralty/p-6293fffb.entry.js +2 -0
- package/dist/admiralty/p-6293fffb.entry.js.map +1 -0
- package/dist/admiralty/p-69e7a596.entry.js +2 -0
- package/dist/admiralty/p-69e7a596.entry.js.map +1 -0
- package/dist/admiralty/p-6b102dd7.entry.js +2 -0
- package/dist/admiralty/p-6b102dd7.entry.js.map +1 -0
- package/dist/admiralty/p-80c03397.entry.js +2 -0
- package/dist/admiralty/p-80c03397.entry.js.map +1 -0
- package/dist/admiralty/p-914567f9.entry.js +2 -0
- package/dist/admiralty/p-914567f9.entry.js.map +1 -0
- package/dist/admiralty/p-96a33adb.entry.js +2 -0
- package/dist/admiralty/p-96a33adb.entry.js.map +1 -0
- package/dist/admiralty/p-aa03be54.entry.js +2 -0
- package/dist/admiralty/p-aa03be54.entry.js.map +1 -0
- package/dist/admiralty/p-bbe4dd68.entry.js +2 -0
- package/dist/admiralty/p-bbe4dd68.entry.js.map +1 -0
- package/dist/admiralty/p-c63b9703.entry.js +2 -0
- package/dist/admiralty/p-c63b9703.entry.js.map +1 -0
- package/dist/admiralty/p-c7dd53e5.js +2 -0
- package/dist/admiralty/p-c7dd53e5.js.map +1 -0
- package/dist/admiralty/p-c9625a50.entry.js +2 -0
- package/dist/admiralty/p-c9625a50.entry.js.map +1 -0
- package/dist/admiralty/p-d23537cc.entry.js +2 -0
- package/dist/admiralty/p-d23537cc.entry.js.map +1 -0
- package/dist/admiralty/p-d5680d2f.entry.js +2 -0
- package/dist/admiralty/p-d5680d2f.entry.js.map +1 -0
- package/dist/admiralty/p-da4c6170.entry.js +2 -0
- package/dist/admiralty/p-da4c6170.entry.js.map +1 -0
- package/dist/admiralty/p-dae5bfda.entry.js +2 -0
- package/dist/admiralty/p-dae5bfda.entry.js.map +1 -0
- package/dist/admiralty/p-de48be42.entry.js +2 -0
- package/dist/admiralty/p-de48be42.entry.js.map +1 -0
- package/dist/admiralty/p-e1457fd2.entry.js +2 -0
- package/dist/admiralty/p-e1457fd2.entry.js.map +1 -0
- package/dist/admiralty/p-e1680782.js +3 -0
- package/dist/admiralty/p-e1680782.js.map +1 -0
- package/dist/admiralty/p-e5f9308a.entry.js +2 -0
- package/dist/admiralty/p-e5f9308a.entry.js.map +1 -0
- package/dist/admiralty/p-e7bb0eca.entry.js +2 -0
- package/dist/admiralty/p-e7bb0eca.entry.js.map +1 -0
- package/dist/admiralty/p-eba5b551.entry.js +2 -0
- package/dist/admiralty/p-eba5b551.entry.js.map +1 -0
- package/dist/admiralty/p-eefe699d.entry.js +2 -0
- package/dist/admiralty/p-eefe699d.entry.js.map +1 -0
- package/dist/admiralty/p-f049a682.entry.js +2 -0
- package/dist/admiralty/p-f049a682.entry.js.map +1 -0
- package/dist/admiralty/p-f268e1dd.entry.js +2 -0
- package/dist/admiralty/p-f268e1dd.entry.js.map +1 -0
- package/dist/admiralty/p-f9815502.entry.js +2 -0
- package/dist/admiralty/p-f9815502.entry.js.map +1 -0
- package/dist/admiralty/p-ffb0dae5.entry.js +2 -0
- package/dist/admiralty/p-ffb0dae5.entry.js.map +1 -0
- package/dist/admiralty/p-ffe3ca07.entry.js +2 -0
- package/dist/admiralty/p-ffe3ca07.entry.js.map +1 -0
- package/dist/cjs/admiralty-breadcrumb.cjs.entry.js +25 -0
- package/dist/cjs/admiralty-breadcrumb.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-breadcrumbs.cjs.entry.js +48 -0
- package/dist/cjs/admiralty-breadcrumbs.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-button.cjs.entry.js +26 -0
- package/dist/cjs/admiralty-button.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-card.cjs.entry.js +22 -0
- package/dist/cjs/admiralty-card.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-checkbox.cjs.entry.js +54 -0
- package/dist/cjs/admiralty-checkbox.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-colour-block.cjs.entry.js +37 -0
- package/dist/cjs/admiralty-colour-block.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-dialogue.cjs.entry.js +39 -0
- package/dist/cjs/admiralty-dialogue.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-expansion.cjs.entry.js +42 -0
- package/dist/cjs/admiralty-expansion.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-file-input.cjs.entry.js +89 -0
- package/dist/cjs/admiralty-file-input.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-filter-group.cjs.entry.js +22 -0
- package/dist/cjs/admiralty-filter-group.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-filter.cjs.entry.js +32 -0
- package/dist/cjs/admiralty-filter.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-footer.cjs.entry.js +25 -0
- package/dist/cjs/admiralty-footer.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-header-menu-item.cjs.entry.js +63 -0
- package/dist/cjs/admiralty-header-menu-item.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-header-profile.cjs.entry.js +44 -0
- package/dist/cjs/admiralty-header-profile.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-header-sub-menu-item.cjs.entry.js +28 -0
- package/dist/cjs/admiralty-header-sub-menu-item.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-header.cjs.entry.js +32 -0
- package/dist/cjs/admiralty-header.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-hint_3.cjs.entry.js +51 -0
- package/dist/cjs/admiralty-hint_3.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-hr.cjs.entry.js +21 -0
- package/dist/cjs/admiralty-hr.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-icon.cjs.entry.js +7045 -0
- package/dist/cjs/admiralty-icon.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-input.cjs.entry.js +62 -0
- package/dist/cjs/admiralty-input.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-link.cjs.entry.js +20 -0
- package/dist/cjs/admiralty-link.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-paginator-wrapper.cjs.entry.js +32 -0
- package/dist/cjs/admiralty-paginator-wrapper.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-paginator.cjs.entry.js +46 -0
- package/dist/cjs/admiralty-paginator.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-phase-banner.cjs.entry.js +23 -0
- package/dist/cjs/admiralty-phase-banner.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-progress-bar.cjs.entry.js +28 -0
- package/dist/cjs/admiralty-progress-bar.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-radio-group.cjs.entry.js +71 -0
- package/dist/cjs/admiralty-radio-group.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-radio.cjs.entry.js +64 -0
- package/dist/cjs/admiralty-radio.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-select.cjs.entry.js +61 -0
- package/dist/cjs/admiralty-select.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-side-nav-item.cjs.entry.js +39 -0
- package/dist/cjs/admiralty-side-nav-item.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-side-nav-wrapper.cjs.entry.js +27 -0
- package/dist/cjs/admiralty-side-nav-wrapper.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-side-nav.cjs.entry.js +22 -0
- package/dist/cjs/admiralty-side-nav.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-table-body.cjs.entry.js +21 -0
- package/dist/cjs/admiralty-table-body.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-table-cell.cjs.entry.js +21 -0
- package/dist/cjs/admiralty-table-cell.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-table-header-cell.cjs.entry.js +21 -0
- package/dist/cjs/admiralty-table-header-cell.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-table-header.cjs.entry.js +21 -0
- package/dist/cjs/admiralty-table-header.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-table-row.cjs.entry.js +21 -0
- package/dist/cjs/admiralty-table-row.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-table.cjs.entry.js +22 -0
- package/dist/cjs/admiralty-table.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-textarea.cjs.entry.js +38 -0
- package/dist/cjs/admiralty-textarea.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-type-ahead-item.cjs.entry.js +22 -0
- package/dist/cjs/admiralty-type-ahead-item.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty-type-ahead.cjs.entry.js +185 -0
- package/dist/cjs/admiralty-type-ahead.cjs.entry.js.map +1 -0
- package/dist/cjs/admiralty.cjs.js +28 -0
- package/dist/cjs/admiralty.cjs.js.map +1 -0
- package/dist/cjs/button.types-0549d311.js +12 -0
- package/dist/cjs/button.types-0549d311.js.map +1 -0
- package/dist/cjs/index-18b58c3d.js +9484 -0
- package/dist/cjs/index-18b58c3d.js.map +1 -0
- package/dist/cjs/index-9db1e550.js +1971 -0
- package/dist/cjs/index-9db1e550.js.map +1 -0
- package/dist/cjs/index.cjs.js +4 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +24 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/collection/assets/svg/Admiralty linear logo.svg +373 -0
- package/dist/collection/assets/svg/Admiralty stacked logo.svg +1275 -0
- package/dist/collection/assets/svg/AdmiraltyUKHO linear logo.svg +3350 -0
- package/dist/collection/assets/svg/UKHO linear logo.svg +3526 -0
- package/dist/collection/assets/svg/UKHO stacked logo.svg +2985 -0
- package/dist/collection/collection-manifest.json +53 -0
- package/dist/collection/components/breadcrumb/breadcrumb.css +89 -0
- package/dist/collection/components/breadcrumb/breadcrumb.js +84 -0
- package/dist/collection/components/breadcrumb/breadcrumb.js.map +1 -0
- package/dist/collection/components/breadcrumbs/breadcrumbs.css +25 -0
- package/dist/collection/components/breadcrumbs/breadcrumbs.js +48 -0
- package/dist/collection/components/breadcrumbs/breadcrumbs.js.map +1 -0
- package/dist/collection/components/button/button.css +384 -0
- package/dist/collection/components/button/button.js +109 -0
- package/dist/collection/components/button/button.js.map +1 -0
- package/dist/collection/components/button/button.types.js +9 -0
- package/dist/collection/components/button/button.types.js.map +1 -0
- package/dist/collection/components/card/card.css +101 -0
- package/dist/collection/components/card/card.js +42 -0
- package/dist/collection/components/card/card.js.map +1 -0
- package/dist/collection/components/checkbox/checkbox.css +72 -0
- package/dist/collection/components/checkbox/checkbox.js +222 -0
- package/dist/collection/components/checkbox/checkbox.js.map +1 -0
- package/dist/collection/components/colour-block/colour-block.css +53 -0
- package/dist/collection/components/colour-block/colour-block.js +141 -0
- package/dist/collection/components/colour-block/colour-block.js.map +1 -0
- package/dist/collection/components/dialogue/dialogue.css +105 -0
- package/dist/collection/components/dialogue/dialogue.js +78 -0
- package/dist/collection/components/dialogue/dialogue.js.map +1 -0
- package/dist/collection/components/expansion/expansion.css +75 -0
- package/dist/collection/components/expansion/expansion.js +133 -0
- package/dist/collection/components/expansion/expansion.js.map +1 -0
- package/dist/collection/components/file-input/file-input.css +78 -0
- package/dist/collection/components/file-input/file-input.js +155 -0
- package/dist/collection/components/file-input/file-input.js.map +1 -0
- package/dist/collection/components/filter/filter.css +277 -0
- package/dist/collection/components/filter/filter.js +88 -0
- package/dist/collection/components/filter/filter.js.map +1 -0
- package/dist/collection/components/filter-group/filter-group.css +0 -0
- package/dist/collection/components/filter-group/filter-group.js +46 -0
- package/dist/collection/components/filter-group/filter-group.js.map +1 -0
- package/dist/collection/components/footer/footer.css +61 -0
- package/dist/collection/components/footer/footer.js +104 -0
- package/dist/collection/components/footer/footer.js.map +1 -0
- package/dist/collection/components/header/header.css +113 -0
- package/dist/collection/components/header/header.js +145 -0
- package/dist/collection/components/header/header.js.map +1 -0
- package/dist/collection/components/header/header.stories.data.js +146 -0
- package/dist/collection/components/header/header.stories.data.js.map +1 -0
- package/dist/collection/components/header/header.types.js +2 -0
- package/dist/collection/components/header/header.types.js.map +1 -0
- package/dist/collection/components/header-menu-item/header-menu-item.css +53 -0
- package/dist/collection/components/header-menu-item/header-menu-item.js +122 -0
- package/dist/collection/components/header-menu-item/header-menu-item.js.map +1 -0
- package/dist/collection/components/header-profile/header-profile.css +81 -0
- package/dist/collection/components/header-profile/header-profile.js +148 -0
- package/dist/collection/components/header-profile/header-profile.js.map +1 -0
- package/dist/collection/components/header-sub-menu-item/header-sub-menu-item.css +35 -0
- package/dist/collection/components/header-sub-menu-item/header-sub-menu-item.js +66 -0
- package/dist/collection/components/header-sub-menu-item/header-sub-menu-item.js.map +1 -0
- package/dist/collection/components/hint/hint.css +26 -0
- package/dist/collection/components/hint/hint.js +47 -0
- package/dist/collection/components/hint/hint.js.map +1 -0
- package/dist/collection/components/horizontal-rule/horizontal-rule.css +23 -0
- package/dist/collection/components/horizontal-rule/horizontal-rule.js +18 -0
- package/dist/collection/components/horizontal-rule/horizontal-rule.js.map +1 -0
- package/dist/collection/components/icon/icon.css +15 -0
- package/dist/collection/components/icon/icon.js +79 -0
- package/dist/collection/components/icon/icon.js.map +1 -0
- package/dist/collection/components/input/input.css +58 -0
- package/dist/collection/components/input/input.interface.js +2 -0
- package/dist/collection/components/input/input.interface.js.map +1 -0
- package/dist/collection/components/input/input.js +308 -0
- package/dist/collection/components/input/input.js.map +1 -0
- package/dist/collection/components/input-error/input-error.css +30 -0
- package/dist/collection/components/input-error/input-error.js +24 -0
- package/dist/collection/components/input-error/input-error.js.map +1 -0
- package/dist/collection/components/label/label.css +25 -0
- package/dist/collection/components/label/label.js +65 -0
- package/dist/collection/components/label/label.js.map +1 -0
- package/dist/collection/components/link/link.js +51 -0
- package/dist/collection/components/link/link.js.map +1 -0
- package/dist/collection/components/paginator/paginator.css +29 -0
- package/dist/collection/components/paginator/paginator.js +120 -0
- package/dist/collection/components/paginator/paginator.js.map +1 -0
- package/dist/collection/components/paginator/paginator.stories.data.js +36 -0
- package/dist/collection/components/paginator/paginator.stories.data.js.map +1 -0
- package/dist/collection/components/phase-banner/phase-banner.css +84 -0
- package/dist/collection/components/phase-banner/phase-banner.js +61 -0
- package/dist/collection/components/phase-banner/phase-banner.js.map +1 -0
- package/dist/collection/components/progress-bar/progress-bar.css +35 -0
- package/dist/collection/components/progress-bar/progress-bar.js +90 -0
- package/dist/collection/components/progress-bar/progress-bar.js.map +1 -0
- package/dist/collection/components/radio/radio.css +49 -0
- package/dist/collection/components/radio/radio.js +206 -0
- package/dist/collection/components/radio/radio.js.map +1 -0
- package/dist/collection/components/radio-group/radio-group.css +14 -0
- package/dist/collection/components/radio-group/radio-group.js +148 -0
- package/dist/collection/components/radio-group/radio-group.js.map +1 -0
- package/dist/collection/components/select/select.css +59 -0
- package/dist/collection/components/select/select.js +207 -0
- package/dist/collection/components/select/select.js.map +1 -0
- package/dist/collection/components/select/select.types.js +3 -0
- package/dist/collection/components/select/select.types.js.map +1 -0
- package/dist/collection/components/side-nav/side-nav.css +68 -0
- package/dist/collection/components/side-nav/side-nav.js +43 -0
- package/dist/collection/components/side-nav/side-nav.js.map +1 -0
- package/dist/collection/components/side-nav/side-nav.stories.data.js +31 -0
- package/dist/collection/components/side-nav/side-nav.stories.data.js.map +1 -0
- package/dist/collection/components/side-nav-item/side-nav-item.css +90 -0
- package/dist/collection/components/side-nav-item/side-nav-item.js +112 -0
- package/dist/collection/components/side-nav-item/side-nav-item.js.map +1 -0
- package/dist/collection/components/table/table.css +29 -0
- package/dist/collection/components/table/table.js +47 -0
- package/dist/collection/components/table/table.js.map +1 -0
- package/dist/collection/components/table-body/table-body.css +28 -0
- package/dist/collection/components/table-body/table-body.js +23 -0
- package/dist/collection/components/table-body/table-body.js.map +1 -0
- package/dist/collection/components/table-cell/table-cell.css +28 -0
- package/dist/collection/components/table-cell/table-cell.js +23 -0
- package/dist/collection/components/table-cell/table-cell.js.map +1 -0
- package/dist/collection/components/table-header/table-header.css +20 -0
- package/dist/collection/components/table-header/table-header.js +23 -0
- package/dist/collection/components/table-header/table-header.js.map +1 -0
- package/dist/collection/components/table-header-cell/table-header-cell.css +27 -0
- package/dist/collection/components/table-header-cell/table-header-cell.js +23 -0
- package/dist/collection/components/table-header-cell/table-header-cell.js.map +1 -0
- package/dist/collection/components/table-row/table-row.css +20 -0
- package/dist/collection/components/table-row/table-row.js +23 -0
- package/dist/collection/components/table-row/table-row.js.map +1 -0
- package/dist/collection/components/textarea/textarea.css +269 -0
- package/dist/collection/components/textarea/textarea.js +202 -0
- package/dist/collection/components/textarea/textarea.js.map +1 -0
- package/dist/collection/components/type-ahead/type-ahead.css +73 -0
- package/dist/collection/components/type-ahead/type-ahead.js +294 -0
- package/dist/collection/components/type-ahead/type-ahead.js.map +1 -0
- package/dist/collection/components/type-ahead-item/type-ahead-item.css +3 -0
- package/dist/collection/components/type-ahead-item/type-ahead-item.js +43 -0
- package/dist/collection/components/type-ahead-item/type-ahead-item.js.map +1 -0
- package/dist/collection/index.js +2 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/components/admiralty-breadcrumb.d.ts +11 -0
- package/dist/components/admiralty-breadcrumb.js +48 -0
- package/dist/components/admiralty-breadcrumb.js.map +1 -0
- package/dist/components/admiralty-breadcrumbs.d.ts +11 -0
- package/dist/components/admiralty-breadcrumbs.js +62 -0
- package/dist/components/admiralty-breadcrumbs.js.map +1 -0
- package/dist/components/admiralty-button.d.ts +11 -0
- package/dist/components/admiralty-button.js +8 -0
- package/dist/components/admiralty-button.js.map +1 -0
- package/dist/components/admiralty-card.d.ts +11 -0
- package/dist/components/admiralty-card.js +37 -0
- package/dist/components/admiralty-card.js.map +1 -0
- package/dist/components/admiralty-checkbox.d.ts +11 -0
- package/dist/components/admiralty-checkbox.js +75 -0
- package/dist/components/admiralty-checkbox.js.map +1 -0
- package/dist/components/admiralty-colour-block.d.ts +11 -0
- package/dist/components/admiralty-colour-block.js +68 -0
- package/dist/components/admiralty-colour-block.js.map +1 -0
- package/dist/components/admiralty-dialogue.d.ts +11 -0
- package/dist/components/admiralty-dialogue.js +61 -0
- package/dist/components/admiralty-dialogue.js.map +1 -0
- package/dist/components/admiralty-expansion.d.ts +11 -0
- package/dist/components/admiralty-expansion.js +8 -0
- package/dist/components/admiralty-expansion.js.map +1 -0
- package/dist/components/admiralty-file-input.d.ts +11 -0
- package/dist/components/admiralty-file-input.js +113 -0
- package/dist/components/admiralty-file-input.js.map +1 -0
- package/dist/components/admiralty-filter-group.d.ts +11 -0
- package/dist/components/admiralty-filter-group.js +49 -0
- package/dist/components/admiralty-filter-group.js.map +1 -0
- package/dist/components/admiralty-filter.d.ts +11 -0
- package/dist/components/admiralty-filter.js +59 -0
- package/dist/components/admiralty-filter.js.map +1 -0
- package/dist/components/admiralty-footer.d.ts +11 -0
- package/dist/components/admiralty-footer.js +43 -0
- package/dist/components/admiralty-footer.js.map +1 -0
- package/dist/components/admiralty-header-menu-item.d.ts +11 -0
- package/dist/components/admiralty-header-menu-item.js +80 -0
- package/dist/components/admiralty-header-menu-item.js.map +1 -0
- package/dist/components/admiralty-header-profile.d.ts +11 -0
- package/dist/components/admiralty-header-profile.js +62 -0
- package/dist/components/admiralty-header-profile.js.map +1 -0
- package/dist/components/admiralty-header-sub-menu-item.d.ts +11 -0
- package/dist/components/admiralty-header-sub-menu-item.js +44 -0
- package/dist/components/admiralty-header-sub-menu-item.js.map +1 -0
- package/dist/components/admiralty-header.d.ts +11 -0
- package/dist/components/admiralty-header.js +51 -0
- package/dist/components/admiralty-header.js.map +1 -0
- package/dist/components/admiralty-hint.d.ts +11 -0
- package/dist/components/admiralty-hint.js +8 -0
- package/dist/components/admiralty-hint.js.map +1 -0
- package/dist/components/admiralty-hr.d.ts +11 -0
- package/dist/components/admiralty-hr.js +34 -0
- package/dist/components/admiralty-hr.js.map +1 -0
- package/dist/components/admiralty-icon.d.ts +11 -0
- package/dist/components/admiralty-icon.js +8 -0
- package/dist/components/admiralty-icon.js.map +1 -0
- package/dist/components/admiralty-input-error.d.ts +11 -0
- package/dist/components/admiralty-input-error.js +8 -0
- package/dist/components/admiralty-input-error.js.map +1 -0
- package/dist/components/admiralty-input.d.ts +11 -0
- package/dist/components/admiralty-input.js +8 -0
- package/dist/components/admiralty-input.js.map +1 -0
- package/dist/components/admiralty-label.d.ts +11 -0
- package/dist/components/admiralty-label.js +8 -0
- package/dist/components/admiralty-label.js.map +1 -0
- package/dist/components/admiralty-link.d.ts +11 -0
- package/dist/components/admiralty-link.js +36 -0
- package/dist/components/admiralty-link.js.map +1 -0
- package/dist/components/admiralty-paginator-wrapper.d.ts +11 -0
- package/dist/components/admiralty-paginator-wrapper.js +45 -0
- package/dist/components/admiralty-paginator-wrapper.js.map +1 -0
- package/dist/components/admiralty-paginator.d.ts +11 -0
- package/dist/components/admiralty-paginator.js +73 -0
- package/dist/components/admiralty-paginator.js.map +1 -0
- package/dist/components/admiralty-phase-banner.d.ts +11 -0
- package/dist/components/admiralty-phase-banner.js +39 -0
- package/dist/components/admiralty-phase-banner.js.map +1 -0
- package/dist/components/admiralty-progress-bar.d.ts +11 -0
- package/dist/components/admiralty-progress-bar.js +52 -0
- package/dist/components/admiralty-progress-bar.js.map +1 -0
- package/dist/components/admiralty-radio-group.d.ts +11 -0
- package/dist/components/admiralty-radio-group.js +88 -0
- package/dist/components/admiralty-radio-group.js.map +1 -0
- package/dist/components/admiralty-radio.d.ts +11 -0
- package/dist/components/admiralty-radio.js +84 -0
- package/dist/components/admiralty-radio.js.map +1 -0
- package/dist/components/admiralty-select.d.ts +11 -0
- package/dist/components/admiralty-select.js +106 -0
- package/dist/components/admiralty-select.js.map +1 -0
- package/dist/components/admiralty-side-nav-item.d.ts +11 -0
- package/dist/components/admiralty-side-nav-item.js +56 -0
- package/dist/components/admiralty-side-nav-item.js.map +1 -0
- package/dist/components/admiralty-side-nav-wrapper.d.ts +11 -0
- package/dist/components/admiralty-side-nav-wrapper.js +40 -0
- package/dist/components/admiralty-side-nav-wrapper.js.map +1 -0
- package/dist/components/admiralty-side-nav.d.ts +11 -0
- package/dist/components/admiralty-side-nav.js +37 -0
- package/dist/components/admiralty-side-nav.js.map +1 -0
- package/dist/components/admiralty-table-body.d.ts +11 -0
- package/dist/components/admiralty-table-body.js +34 -0
- package/dist/components/admiralty-table-body.js.map +1 -0
- package/dist/components/admiralty-table-cell.d.ts +11 -0
- package/dist/components/admiralty-table-cell.js +34 -0
- package/dist/components/admiralty-table-cell.js.map +1 -0
- package/dist/components/admiralty-table-header-cell.d.ts +11 -0
- package/dist/components/admiralty-table-header-cell.js +34 -0
- package/dist/components/admiralty-table-header-cell.js.map +1 -0
- package/dist/components/admiralty-table-header.d.ts +11 -0
- package/dist/components/admiralty-table-header.js +34 -0
- package/dist/components/admiralty-table-header.js.map +1 -0
- package/dist/components/admiralty-table-row.d.ts +11 -0
- package/dist/components/admiralty-table-row.js +34 -0
- package/dist/components/admiralty-table-row.js.map +1 -0
- package/dist/components/admiralty-table.d.ts +11 -0
- package/dist/components/admiralty-table.js +37 -0
- package/dist/components/admiralty-table.js.map +1 -0
- package/dist/components/admiralty-textarea.d.ts +11 -0
- package/dist/components/admiralty-textarea.js +84 -0
- package/dist/components/admiralty-textarea.js.map +1 -0
- package/dist/components/admiralty-type-ahead-item.d.ts +11 -0
- package/dist/components/admiralty-type-ahead-item.js +37 -0
- package/dist/components/admiralty-type-ahead-item.js.map +1 -0
- package/dist/components/admiralty-type-ahead.d.ts +11 -0
- package/dist/components/admiralty-type-ahead.js +235 -0
- package/dist/components/admiralty-type-ahead.js.map +1 -0
- package/dist/components/button.js +55 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/expansion.js +62 -0
- package/dist/components/expansion.js.map +1 -0
- package/dist/components/hint.js +35 -0
- package/dist/components/hint.js.map +1 -0
- package/dist/components/icon.js +16529 -0
- package/dist/components/icon.js.map +1 -0
- package/dist/components/index.d.ts +27 -0
- package/dist/components/index.js +3 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/input-error.js +38 -0
- package/dist/components/input-error.js.map +1 -0
- package/dist/components/input.js +109 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/label.js +37 -0
- package/dist/components/label.js.map +1 -0
- package/dist/esm/admiralty-breadcrumb.entry.js +21 -0
- package/dist/esm/admiralty-breadcrumb.entry.js.map +1 -0
- package/dist/esm/admiralty-breadcrumbs.entry.js +44 -0
- package/dist/esm/admiralty-breadcrumbs.entry.js.map +1 -0
- package/dist/esm/admiralty-button.entry.js +22 -0
- package/dist/esm/admiralty-button.entry.js.map +1 -0
- package/dist/esm/admiralty-card.entry.js +18 -0
- package/dist/esm/admiralty-card.entry.js.map +1 -0
- package/dist/esm/admiralty-checkbox.entry.js +50 -0
- package/dist/esm/admiralty-checkbox.entry.js.map +1 -0
- package/dist/esm/admiralty-colour-block.entry.js +33 -0
- package/dist/esm/admiralty-colour-block.entry.js.map +1 -0
- package/dist/esm/admiralty-dialogue.entry.js +35 -0
- package/dist/esm/admiralty-dialogue.entry.js.map +1 -0
- package/dist/esm/admiralty-expansion.entry.js +38 -0
- package/dist/esm/admiralty-expansion.entry.js.map +1 -0
- package/dist/esm/admiralty-file-input.entry.js +85 -0
- package/dist/esm/admiralty-file-input.entry.js.map +1 -0
- package/dist/esm/admiralty-filter-group.entry.js +18 -0
- package/dist/esm/admiralty-filter-group.entry.js.map +1 -0
- package/dist/esm/admiralty-filter.entry.js +28 -0
- package/dist/esm/admiralty-filter.entry.js.map +1 -0
- package/dist/esm/admiralty-footer.entry.js +21 -0
- package/dist/esm/admiralty-footer.entry.js.map +1 -0
- package/dist/esm/admiralty-header-menu-item.entry.js +59 -0
- package/dist/esm/admiralty-header-menu-item.entry.js.map +1 -0
- package/dist/esm/admiralty-header-profile.entry.js +40 -0
- package/dist/esm/admiralty-header-profile.entry.js.map +1 -0
- package/dist/esm/admiralty-header-sub-menu-item.entry.js +24 -0
- package/dist/esm/admiralty-header-sub-menu-item.entry.js.map +1 -0
- package/dist/esm/admiralty-header.entry.js +28 -0
- package/dist/esm/admiralty-header.entry.js.map +1 -0
- package/dist/esm/admiralty-hint_3.entry.js +45 -0
- package/dist/esm/admiralty-hint_3.entry.js.map +1 -0
- package/dist/esm/admiralty-hr.entry.js +17 -0
- package/dist/esm/admiralty-hr.entry.js.map +1 -0
- package/dist/esm/admiralty-icon.entry.js +7041 -0
- package/dist/esm/admiralty-icon.entry.js.map +1 -0
- package/dist/esm/admiralty-input.entry.js +58 -0
- package/dist/esm/admiralty-input.entry.js.map +1 -0
- package/dist/esm/admiralty-link.entry.js +16 -0
- package/dist/esm/admiralty-link.entry.js.map +1 -0
- package/dist/esm/admiralty-paginator-wrapper.entry.js +28 -0
- package/dist/esm/admiralty-paginator-wrapper.entry.js.map +1 -0
- package/dist/esm/admiralty-paginator.entry.js +42 -0
- package/dist/esm/admiralty-paginator.entry.js.map +1 -0
- package/dist/esm/admiralty-phase-banner.entry.js +19 -0
- package/dist/esm/admiralty-phase-banner.entry.js.map +1 -0
- package/dist/esm/admiralty-progress-bar.entry.js +24 -0
- package/dist/esm/admiralty-progress-bar.entry.js.map +1 -0
- package/dist/esm/admiralty-radio-group.entry.js +67 -0
- package/dist/esm/admiralty-radio-group.entry.js.map +1 -0
- package/dist/esm/admiralty-radio.entry.js +60 -0
- package/dist/esm/admiralty-radio.entry.js.map +1 -0
- package/dist/esm/admiralty-select.entry.js +57 -0
- package/dist/esm/admiralty-select.entry.js.map +1 -0
- package/dist/esm/admiralty-side-nav-item.entry.js +35 -0
- package/dist/esm/admiralty-side-nav-item.entry.js.map +1 -0
- package/dist/esm/admiralty-side-nav-wrapper.entry.js +23 -0
- package/dist/esm/admiralty-side-nav-wrapper.entry.js.map +1 -0
- package/dist/esm/admiralty-side-nav.entry.js +18 -0
- package/dist/esm/admiralty-side-nav.entry.js.map +1 -0
- package/dist/esm/admiralty-table-body.entry.js +17 -0
- package/dist/esm/admiralty-table-body.entry.js.map +1 -0
- package/dist/esm/admiralty-table-cell.entry.js +17 -0
- package/dist/esm/admiralty-table-cell.entry.js.map +1 -0
- package/dist/esm/admiralty-table-header-cell.entry.js +17 -0
- package/dist/esm/admiralty-table-header-cell.entry.js.map +1 -0
- package/dist/esm/admiralty-table-header.entry.js +17 -0
- package/dist/esm/admiralty-table-header.entry.js.map +1 -0
- package/dist/esm/admiralty-table-row.entry.js +17 -0
- package/dist/esm/admiralty-table-row.entry.js.map +1 -0
- package/dist/esm/admiralty-table.entry.js +18 -0
- package/dist/esm/admiralty-table.entry.js.map +1 -0
- package/dist/esm/admiralty-textarea.entry.js +34 -0
- package/dist/esm/admiralty-textarea.entry.js.map +1 -0
- package/dist/esm/admiralty-type-ahead-item.entry.js +18 -0
- package/dist/esm/admiralty-type-ahead-item.entry.js.map +1 -0
- package/dist/esm/admiralty-type-ahead.entry.js +181 -0
- package/dist/esm/admiralty-type-ahead.entry.js.map +1 -0
- package/dist/esm/admiralty.js +23 -0
- package/dist/esm/admiralty.js.map +1 -0
- package/dist/esm/button.types-2655b2cf.js +12 -0
- package/dist/esm/button.types-2655b2cf.js.map +1 -0
- package/dist/esm/index-a64d8966.js +1942 -0
- package/dist/esm/index-a64d8966.js.map +1 -0
- package/dist/esm/index-e73d97b7.js +9474 -0
- package/dist/esm/index-e73d97b7.js.map +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +20 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +18 -0
- package/dist/types/components/breadcrumbs/breadcrumbs.d.ts +8 -0
- package/dist/types/components/button/button.d.ts +23 -0
- package/dist/types/components/button/button.types.d.ts +7 -0
- package/dist/types/components/card/card.d.ts +7 -0
- package/dist/types/components/checkbox/checkbox.d.ts +52 -0
- package/dist/types/components/colour-block/colour-block.d.ts +27 -0
- package/dist/types/components/dialogue/dialogue.d.ts +13 -0
- package/dist/types/components/expansion/expansion.d.ts +30 -0
- package/dist/types/components/file-input/file-input.d.ts +53 -0
- package/dist/types/components/filter/filter.d.ts +21 -0
- package/dist/types/components/filter-group/filter-group.d.ts +10 -0
- package/dist/types/components/footer/footer.d.ts +25 -0
- package/dist/types/components/header/header.d.ts +33 -0
- package/dist/types/components/header/header.stories.data.d.ts +6 -0
- package/dist/types/components/header/header.types.d.ts +10 -0
- package/dist/types/components/header-menu-item/header-menu-item.d.ts +34 -0
- package/dist/types/components/header-profile/header-profile.d.ts +38 -0
- package/dist/types/components/header-sub-menu-item/header-sub-menu-item.d.ts +13 -0
- package/dist/types/components/hint/hint.d.ts +11 -0
- package/dist/types/components/horizontal-rule/horizontal-rule.d.ts +3 -0
- package/dist/types/components/icon/icon.d.ts +17 -0
- package/dist/types/components/input/input.d.ts +71 -0
- package/dist/types/components/input/input.interface.d.ts +3 -0
- package/dist/types/components/input-error/input-error.d.ts +7 -0
- package/dist/types/components/label/label.d.ts +15 -0
- package/dist/types/components/link/link.d.ts +11 -0
- package/dist/types/components/paginator/paginator.d.ts +26 -0
- package/dist/types/components/paginator/paginator.stories.data.d.ts +10 -0
- package/dist/types/components/phase-banner/phase-banner.d.ts +11 -0
- package/dist/types/components/progress-bar/progress-bar.d.ts +19 -0
- package/dist/types/components/radio/radio.d.ts +44 -0
- package/dist/types/components/radio-group/radio-group.d.ts +27 -0
- package/dist/types/components/select/select.d.ts +48 -0
- package/dist/types/components/select/select.types.d.ts +4 -0
- package/dist/types/components/side-nav/side-nav.d.ts +8 -0
- package/dist/types/components/side-nav/side-nav.stories.data.d.ts +10 -0
- package/dist/types/components/side-nav-item/side-nav-item.d.ts +26 -0
- package/dist/types/components/table/table.d.ts +8 -0
- package/dist/types/components/table-body/table-body.d.ts +7 -0
- package/dist/types/components/table-cell/table-cell.d.ts +7 -0
- package/dist/types/components/table-header/table-header.d.ts +7 -0
- package/dist/types/components/table-header-cell/table-header-cell.d.ts +7 -0
- package/dist/types/components/table-row/table-row.d.ts +7 -0
- package/dist/types/components/textarea/textarea.d.ts +45 -0
- package/dist/types/components/type-ahead/type-ahead.d.ts +66 -0
- package/dist/types/components/type-ahead-item/type-ahead-item.d.ts +4 -0
- package/dist/types/components.d.ts +1637 -0
- package/dist/types/index.d.ts +0 -0
- package/dist/types/stencil-public-runtime.d.ts +1637 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +21 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +11 -0
- package/package.json +69 -0
- package/styles/core.css +1 -0
- package/styles/core.css.map +1 -0
- package/styles/webfonts/JohnstonITC/bold/JohnstonITCStd-Bold.woff +0 -0
- package/styles/webfonts/JohnstonITC/bold/JohnstonITCStd-Bold.woff2 +0 -0
- package/styles/webfonts/JohnstonITC/italic/JohnstonITCStd-MediumIta.woff +0 -0
- package/styles/webfonts/JohnstonITC/italic/JohnstonITCStd-MediumIta.woff2 +0 -0
- package/styles/webfonts/JohnstonITC/light/JohnstonITCStd-Light.woff +0 -0
- package/styles/webfonts/JohnstonITC/light/JohnstonITCStd-Light.woff2 +0 -0
- package/styles/webfonts/JohnstonITC/light-italic/JohnstonITCStd-LightIta.woff +0 -0
- package/styles/webfonts/JohnstonITC/light-italic/JohnstonITCStd-LightIta.woff2 +0 -0
- package/styles/webfonts/JohnstonITC/medium/JohnstonITCStd-Medium.woff +0 -0
- package/styles/webfonts/JohnstonITC/medium/JohnstonITCStd-Medium.woff2 +0 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const checkboxCss = ".form-control{font-size:18px;position:relative;display:inline-block}.form-control input[type=checkbox]{box-sizing:border-box;opacity:0;position:absolute;top:0;left:0;padding:0;width:30px;height:30px;margin:0;z-index:1;cursor:pointer}.form-control input[type=checkbox]:checked+label::after{content:\"\"}.form-control label{position:relative;display:inline-block;padding-left:42px;margin-bottom:14px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;line-height:30px}.form-control label.disabled{cursor:default;pointer-events:none}.form-control label::before,.form-control label::after{position:absolute;content:none;display:inline-block}.form-control label::before{content:\"\";height:26px;width:26px;border:2px solid #03284f;left:0;top:0;background-color:#fff}.form-control label::after{height:8px;width:15px;border-left:3px solid;border-bottom:3px solid;transform:rotate(-45deg);color:#09315b;left:6px;top:7px}.form-control.right-align label{padding-left:unset;padding-right:35px}.form-control.right-align label::before{left:unset;right:0}.form-control.right-align label::after{left:unset;right:6px}";
|
|
4
|
+
|
|
5
|
+
const CheckboxComponent = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
this.checkboxChange = createEvent(this, "checkboxChange", 7);
|
|
11
|
+
this.checkboxFocus = createEvent(this, "checkboxFocus", 7);
|
|
12
|
+
this.checkboxBlur = createEvent(this, "checkboxBlur", 7);
|
|
13
|
+
this.inputId = `admiralty-${checkboxIds++}`;
|
|
14
|
+
this.onBlur = () => {
|
|
15
|
+
this.checkboxBlur.emit();
|
|
16
|
+
};
|
|
17
|
+
this.onClick = (ev) => {
|
|
18
|
+
if (!this.disabled) {
|
|
19
|
+
ev.preventDefault();
|
|
20
|
+
this.checked = !this.checked;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
this.onFocus = () => {
|
|
24
|
+
this.checkboxFocus.emit();
|
|
25
|
+
};
|
|
26
|
+
this.checkboxRight = false;
|
|
27
|
+
this.disabled = false;
|
|
28
|
+
this.name = this.inputId;
|
|
29
|
+
this.checked = false;
|
|
30
|
+
this.value = undefined;
|
|
31
|
+
this.labelText = null;
|
|
32
|
+
}
|
|
33
|
+
checkedChanged(isChecked) {
|
|
34
|
+
this.checkboxChange.emit({
|
|
35
|
+
checked: isChecked,
|
|
36
|
+
value: this.value,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
render() {
|
|
40
|
+
const { checked, checkboxRight, disabled, inputId, labelText, name } = this;
|
|
41
|
+
return (h(Host, null, h("div", { "aria-checked": `${checked}`, "aria-hidden": disabled ? 'true' : null, role: "checkbox", class: { 'form-control': true, 'right-align': checkboxRight } }, h("input", { "aria-checked": `${checked}`, type: "checkbox", onBlur: () => this.onBlur(), onFocus: () => this.onFocus(), id: inputId, disabled: disabled, name: name, checked: checked }), h("label", { class: { disabled: disabled }, onClick: this.onClick, htmlFor: inputId }, labelText))));
|
|
42
|
+
}
|
|
43
|
+
static get watchers() { return {
|
|
44
|
+
"checked": ["checkedChanged"]
|
|
45
|
+
}; }
|
|
46
|
+
static get style() { return checkboxCss; }
|
|
47
|
+
}, [1, "admiralty-checkbox", {
|
|
48
|
+
"checkboxRight": [4, "checkbox-right"],
|
|
49
|
+
"disabled": [4],
|
|
50
|
+
"name": [1],
|
|
51
|
+
"checked": [1028],
|
|
52
|
+
"value": [8],
|
|
53
|
+
"labelText": [1, "label-text"]
|
|
54
|
+
}]);
|
|
55
|
+
let checkboxIds = 0;
|
|
56
|
+
function defineCustomElement$1() {
|
|
57
|
+
if (typeof customElements === "undefined") {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const components = ["admiralty-checkbox"];
|
|
61
|
+
components.forEach(tagName => { switch (tagName) {
|
|
62
|
+
case "admiralty-checkbox":
|
|
63
|
+
if (!customElements.get(tagName)) {
|
|
64
|
+
customElements.define(tagName, CheckboxComponent);
|
|
65
|
+
}
|
|
66
|
+
break;
|
|
67
|
+
} });
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const AdmiraltyCheckbox = CheckboxComponent;
|
|
71
|
+
const defineCustomElement = defineCustomElement$1;
|
|
72
|
+
|
|
73
|
+
export { AdmiraltyCheckbox, defineCustomElement };
|
|
74
|
+
|
|
75
|
+
//# sourceMappingURL=admiralty-checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"admiralty-checkbox.js","mappings":";;AAAA,MAAM,WAAW,GAAG,2mCAA2mC;;MCOlnC,iBAAiB;;;;;;;;IACpB,YAAO,GAAG,aAAa,WAAW,EAAE,EAAE,CAAC;IA8DvC,WAAM,GAAG;MACf,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;KAC1B,CAAC;IAEM,YAAO,GAAG,CAAC,EAAO;MACxB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;QAClB,EAAE,CAAC,cAAc,EAAE,CAAC;QACpB,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;OAC9B;KACF,CAAC;IAEM,YAAO,GAAG;MAChB,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;KAC3B,CAAC;yBAtE+B,KAAK;oBAKV,KAAK;gBAKV,IAAI,CAAC,OAAO;mBAKS,KAAK;;qBAcrB,IAAI;;EAqBhC,cAAc,CAAC,SAAkB;IAC/B,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC;MACvB,OAAO,EAAE,SAAS;MAClB,KAAK,EAAE,IAAI,CAAC,KAAK;KAClB,CAAC,CAAC;GACJ;EAiBD,MAAM;IACJ,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IAE5E,QACE,EAAC,IAAI,QACH,2BAAmB,GAAG,OAAO,EAAE,iBAAe,QAAQ,GAAG,MAAM,GAAG,IAAI,EAAE,IAAI,EAAC,UAAU,EAAC,KAAK,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,aAAa,EAAE,IACnJ,6BACgB,GAAG,OAAO,EAAE,EAC1B,IAAI,EAAC,UAAU,EACf,MAAM,EAAE,MAAM,IAAI,CAAC,MAAM,EAAE,EAC3B,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE,EAC7B,EAAE,EAAE,OAAO,EACX,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,GAChB,EACF,aAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,IAC1E,SAAS,CACJ,CACJ,CACD,EACP;GACH;;;;;;;;;;;;;AAGH,IAAI,WAAW,GAAG,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/checkbox/checkbox.scss?tag=admiralty-checkbox&encapsulation=shadow","./src/components/checkbox/checkbox.tsx"],"sourcesContent":[".form-control {\r\n font-size: 18px;\r\n position: relative;\r\n display: inline-block;\r\n\r\n input[type=\"checkbox\"] {\r\n box-sizing: border-box;\r\n opacity: 0;\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n padding: 0;\r\n width: 30px;\r\n height: 30px;\r\n margin: 0;\r\n z-index: 1;\r\n cursor: pointer;\r\n\r\n &:checked+label::after {\r\n content: \"\";\r\n }\r\n }\r\n\r\n label {\r\n position: relative;\r\n display: inline-block;\r\n padding-left: 42px;\r\n margin-bottom: 14px;\r\n cursor: pointer;\r\n -webkit-user-select: none;\r\n -moz-user-select: none;\r\n user-select: none;\r\n line-height: 30px;\r\n\r\n &.disabled {\r\n cursor: default;\r\n pointer-events: none;\r\n }\r\n\r\n &::before, &::after {\r\n position: absolute;\r\n content: none;\r\n display: inline-block;\r\n }\r\n\r\n\r\n &::before {\r\n content: \"\";\r\n height: 26px;\r\n width: 26px;\r\n border: 2px solid #03284f;\r\n left: 0;\r\n top: 0;\r\n background-color: #fff;\r\n }\r\n\r\n &::after {\r\n height: 8px;\r\n width: 15px;\r\n border-left: 3px solid;\r\n border-bottom: 3px solid;\r\n transform: rotate(-45deg);\r\n color: #09315b;\r\n left: 6px;\r\n top: 7px;\r\n }\r\n }\r\n\r\n &.right-align label {\r\n padding-left: unset;\r\n padding-right: 35px;\r\n\r\n &::before {\r\n left: unset;\r\n right: 0;\r\n }\r\n\r\n &::after {\r\n left: unset;\r\n right: 6px;\r\n }\r\n }\r\n}\r\n\r\n","import { Component, EventEmitter, Event, Host, h, Prop, Watch } from '@stencil/core';\n\n@Component({\n tag: 'admiralty-checkbox',\n styleUrl: 'checkbox.scss',\n shadow: true,\n})\nexport class CheckboxComponent {\n private inputId = `admiralty-${checkboxIds++}`;\n\n /**\n * Whether the checkbox should be positioned to the right of the label.\n */\n @Prop() checkboxRight: boolean = false;\n\n /**\n * This dictates whether the form field is disabled.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * If `true`, the checkbox is selected.\n */\n @Prop({ mutable: true }) checked: boolean = false;\n\n /**\n * The value of the checkbox does not mean if it's checked or not, use the `checked`\n * property for that.\n *\n * The value of a checkbox is analogous to the value of an `<input type=\"checkbox\">`,\n * it's only used when the checkbox participates in a native `<form>`.\n */\n @Prop() value: any | null;\n\n /**\n * The text that's displayed alongside the checkbox\n */\n @Prop() labelText: string = null;\n\n /**\n * Event is fired when the form control changes state\n * @event radioChanges\n */\n @Event() checkboxChange: EventEmitter<any>;\n\n /**\n * Event is fired when the form control gains focus\n * @event checkboxFocus\n */\n @Event() checkboxFocus: EventEmitter<any>;\n\n /**\n * Event is fired when the form control loses focus\n * @event checkboxBlur\n */\n @Event() checkboxBlur: EventEmitter<any>;\n\n @Watch('checked')\n checkedChanged(isChecked: boolean) {\n this.checkboxChange.emit({\n checked: isChecked,\n value: this.value,\n });\n }\n\n private onBlur = () => {\n this.checkboxBlur.emit();\n };\n\n private onClick = (ev: any) => {\n if (!this.disabled) {\n ev.preventDefault();\n this.checked = !this.checked;\n }\n };\n\n private onFocus = () => {\n this.checkboxFocus.emit();\n };\n\n render() {\n const { checked, checkboxRight, disabled, inputId, labelText, name } = this;\n\n return (\n <Host>\n <div aria-checked={`${checked}`} aria-hidden={disabled ? 'true' : null} role=\"checkbox\" class={{ 'form-control': true, 'right-align': checkboxRight }}>\n <input\n aria-checked={`${checked}`}\n type=\"checkbox\"\n onBlur={() => this.onBlur()}\n onFocus={() => this.onFocus()}\n id={inputId}\n disabled={disabled}\n name={name}\n checked={checked}\n />\n <label class={{ disabled: disabled }} onClick={this.onClick} htmlFor={inputId}>\n {labelText}\n </label>\n </div>\n </Host>\n );\n }\n}\n\nlet checkboxIds = 0;\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface AdmiraltyColourBlock extends Components.AdmiraltyColourBlock, HTMLElement {}
|
|
4
|
+
export const AdmiraltyColourBlock: {
|
|
5
|
+
prototype: AdmiraltyColourBlock;
|
|
6
|
+
new (): AdmiraltyColourBlock;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { a as ButtonVariant, d as defineCustomElement$3 } from './button.js';
|
|
3
|
+
import { d as defineCustomElement$2 } from './icon.js';
|
|
4
|
+
|
|
5
|
+
const colourBlockCss = "admiralty-colour-block .colourBlock{height:100%;width:100%;max-width:100%;padding:30px 18px;display:flex;flex-direction:column;box-sizing:border-box}admiralty-colour-block .colourBlock .content{flex-grow:1}admiralty-colour-block .colourBlock .clickAction{background-color:unset;align-self:flex-end;cursor:pointer}admiralty-colour-block .colourBlock .clickAction h3{margin-bottom:0px}admiralty-colour-block .colourBlock.admiralty-blue{background-color:#09315b}admiralty-colour-block .colourBlock.admiralty-blue *{color:#ffffff}admiralty-colour-block .colourBlock.teal{background-color:#007e97}admiralty-colour-block .colourBlock.teal *{color:#ffffff}admiralty-colour-block .colourBlock.bright-blue{background-color:#65c4db;color:#09315b}";
|
|
6
|
+
|
|
7
|
+
const ColourBlockComponent = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.__registerHost();
|
|
11
|
+
this.width = undefined;
|
|
12
|
+
this.height = undefined;
|
|
13
|
+
this.heading = undefined;
|
|
14
|
+
this.colour = 'admiralty-blue';
|
|
15
|
+
this.clickAction = undefined;
|
|
16
|
+
this.actionText = undefined;
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
return (h("div", { class: {
|
|
20
|
+
colourBlock: true,
|
|
21
|
+
[this.colour]: true,
|
|
22
|
+
}, style: {
|
|
23
|
+
height: this.height ? `${this.height}px` : null,
|
|
24
|
+
width: this.width ? `${this.width}px` : null,
|
|
25
|
+
} }, h("h2", null, this.heading), h("div", { class: {
|
|
26
|
+
'content': true,
|
|
27
|
+
'white-text': this.colour === 'admiralty-blue' || this.colour === 'teal',
|
|
28
|
+
} }, h("slot", null)), this.clickAction && this.actionText ? (h("admiralty-button", { variant: ButtonVariant.Text, class: "clickAction", onClick: this.clickAction.bind(this) }, h("h3", null, this.actionText))) : null));
|
|
29
|
+
}
|
|
30
|
+
static get style() { return colourBlockCss; }
|
|
31
|
+
}, [4, "admiralty-colour-block", {
|
|
32
|
+
"width": [2],
|
|
33
|
+
"height": [2],
|
|
34
|
+
"heading": [1],
|
|
35
|
+
"colour": [1],
|
|
36
|
+
"clickAction": [16],
|
|
37
|
+
"actionText": [1, "action-text"]
|
|
38
|
+
}]);
|
|
39
|
+
function defineCustomElement$1() {
|
|
40
|
+
if (typeof customElements === "undefined") {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const components = ["admiralty-colour-block", "admiralty-button", "admiralty-icon"];
|
|
44
|
+
components.forEach(tagName => { switch (tagName) {
|
|
45
|
+
case "admiralty-colour-block":
|
|
46
|
+
if (!customElements.get(tagName)) {
|
|
47
|
+
customElements.define(tagName, ColourBlockComponent);
|
|
48
|
+
}
|
|
49
|
+
break;
|
|
50
|
+
case "admiralty-button":
|
|
51
|
+
if (!customElements.get(tagName)) {
|
|
52
|
+
defineCustomElement$3();
|
|
53
|
+
}
|
|
54
|
+
break;
|
|
55
|
+
case "admiralty-icon":
|
|
56
|
+
if (!customElements.get(tagName)) {
|
|
57
|
+
defineCustomElement$2();
|
|
58
|
+
}
|
|
59
|
+
break;
|
|
60
|
+
} });
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const AdmiraltyColourBlock = ColourBlockComponent;
|
|
64
|
+
const defineCustomElement = defineCustomElement$1;
|
|
65
|
+
|
|
66
|
+
export { AdmiraltyColourBlock, defineCustomElement };
|
|
67
|
+
|
|
68
|
+
//# sourceMappingURL=admiralty-colour-block.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"admiralty-colour-block.js","mappings":";;;;AAAA,MAAM,cAAc,GAAG,kuBAAkuB;;MCQ5uB,oBAAoB;;;;;;;kBAgB6B,gBAAgB;;;;EAU5E,MAAM;IACJ,QACE,WACE,KAAK,EAAE;QACL,WAAW,EAAE,IAAI;QACjB,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI;OACpB,EACD,KAAK,EAAE;QACL,MAAM,EAAE,IAAI,CAAC,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,IAAI,GAAG,IAAI;QAC/C,KAAK,EAAE,IAAI,CAAC,KAAK,GAAG,GAAG,IAAI,CAAC,KAAK,IAAI,GAAG,IAAI;OAC7C,IAED,cAAK,IAAI,CAAC,OAAO,CAAM,EACvB,WACE,KAAK,EAAE;QACL,SAAS,EAAE,IAAI;QACf,YAAY,EAAE,IAAI,CAAC,MAAM,KAAK,gBAAgB,IAAI,IAAI,CAAC,MAAM,KAAK,MAAM;OACzE,IAED,eAAa,CACT,EACL,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,UAAU,IAClC,wBAAkB,OAAO,EAAE,aAAa,CAAC,IAAI,EAAE,KAAK,EAAC,aAAa,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IACrG,cAAK,IAAI,CAAC,UAAU,CAAM,CACT,IACjB,IAAI,CACJ,EACN;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/colour-block/colour-block.scss?tag=admiralty-colour-block","./src/components/colour-block/colour-block.tsx"],"sourcesContent":["@use \"../../scss/vars/colours\";\n\nadmiralty-colour-block {\n .colourBlock {\n height: 100%;\n width: 100%;\n max-width: 100%;\n padding: 30px 18px;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n\n .content {\n flex-grow: 1;\n }\n\n .clickAction {\n background-color: unset;\n align-self: flex-end;\n cursor: pointer;\n\n h3 {\n margin-bottom: 0px;\n }\n }\n\n &.admiralty-blue {\n background-color: colours.$colour-admiralty-blue;\n * {\n color: colours.$colour-white;\n }\n }\n\n &.teal {\n background-color: colours.$colour-teal;\n * {\n color: colours.$colour-white;\n }\n }\n\n &.bright-blue {\n background-color: colours.$colour-bright-blue;\n color: colours.$colour-admiralty-blue;\n }\n }\n}\n","import { Component, Prop, h } from '@stencil/core';\nimport { ButtonVariant } from '../button/button.types';\n\n@Component({\n tag: 'admiralty-colour-block',\n styleUrl: 'colour-block.scss',\n shadow: false,\n})\nexport class ColourBlockComponent {\n /**\n * The width in pixels of the component.\n */\n @Prop() width: number;\n /**\n * The height in pixels of the component.\n */\n @Prop() height: number;\n /**\n * The heading text to display.\n */\n @Prop() heading: string;\n /**\n * The background colour of the component.\n */\n @Prop() colour: 'admiralty-blue' | 'teal' | 'bright-blue' = 'admiralty-blue';\n /**\n * The function to call when the action button is pressed.\n */\n @Prop() clickAction: () => any;\n /**\n * The text to display on the action button\n */\n @Prop() actionText: string;\n\n render() {\n return (\n <div\n class={{\n colourBlock: true,\n [this.colour]: true,\n }}\n style={{\n height: this.height ? `${this.height}px` : null,\n width: this.width ? `${this.width}px` : null,\n }}\n >\n <h2>{this.heading}</h2>\n <div\n class={{\n 'content': true,\n 'white-text': this.colour === 'admiralty-blue' || this.colour === 'teal',\n }}\n >\n <slot></slot>\n </div>\n {this.clickAction && this.actionText ? (\n <admiralty-button variant={ButtonVariant.Text} class=\"clickAction\" onClick={this.clickAction.bind(this)}>\n <h3>{this.actionText}</h3>\n </admiralty-button>\n ) : null}\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface AdmiraltyDialogue extends Components.AdmiraltyDialogue, HTMLElement {}
|
|
4
|
+
export const AdmiraltyDialogue: {
|
|
5
|
+
prototype: AdmiraltyDialogue;
|
|
6
|
+
new (): AdmiraltyDialogue;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { a as faExclamation, b as faCheck, c as faTriangleExclamation, e as faCircleInfo, d as defineCustomElement$2 } from './icon.js';
|
|
3
|
+
|
|
4
|
+
const dialogueCss = "@media (max-width: 1023px){.desktop-only{display:none}}@media (min-width: 1024px){.not-desktop{display:none}}@media (min-width: 1024px){.tablet-only{display:none}}@media (max-width: 479px) and (min-width: 0px){.tablet-only{display:none}}@media (max-width: 479px) and (min-width: 0px){.tablet-or-desktop{display:none}}@media (min-width: 1024px){.phone-or-tablet{display:none}}@media (min-width: 1024px){.phone-only{display:none}}@media (max-width: 1023px) and (min-width: 480px){.phone-only{display:none}}.dialogue{box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2);padding:30px 18px;overflow-wrap:break-word;word-wrap:break-word}@media (max-width: 1023px){.dialogue{padding:24px 18px}}.dialogue .dialogue-title{color:#09315b;font-size:20px;font-weight:normal;line-height:30px;display:flex;align-items:center;overflow-wrap:break-word;word-wrap:break-word;margin-bottom:12px}.dialogue .dialogue-title .dialogue-title-icon{margin-right:12px}.dialogue.info{border-left:5px solid #0177c1;background-color:#e0ecf3}.dialogue.error{border-left:5px solid #e20d0d;background-color:#f7e1e1}.dialogue.success{border-left:5px solid #47a234;background-color:#e7f1e5}.dialogue.warning{border-left:5px solid #e3660e;background-color:#f8ede3}";
|
|
5
|
+
|
|
6
|
+
const DialogueComponent = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.__attachShadow();
|
|
11
|
+
this.type = 'info';
|
|
12
|
+
this.heading = undefined;
|
|
13
|
+
}
|
|
14
|
+
getIconNameForType() {
|
|
15
|
+
switch (this.type) {
|
|
16
|
+
case 'info':
|
|
17
|
+
return faCircleInfo;
|
|
18
|
+
case 'warning':
|
|
19
|
+
return faTriangleExclamation;
|
|
20
|
+
case 'success':
|
|
21
|
+
return faCheck;
|
|
22
|
+
case 'error':
|
|
23
|
+
return faExclamation;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
render() {
|
|
27
|
+
return (h("section", { class: {
|
|
28
|
+
dialogue: true,
|
|
29
|
+
[this.type]: true,
|
|
30
|
+
} }, h("div", { class: "dialogue-title" }, h("admiralty-icon", { class: "dialogue-title-icon", "icon-name": this.getIconNameForType().iconName }), this.heading), h("slot", null)));
|
|
31
|
+
}
|
|
32
|
+
static get style() { return dialogueCss; }
|
|
33
|
+
}, [1, "admiralty-dialogue", {
|
|
34
|
+
"type": [1],
|
|
35
|
+
"heading": [1]
|
|
36
|
+
}]);
|
|
37
|
+
function defineCustomElement$1() {
|
|
38
|
+
if (typeof customElements === "undefined") {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const components = ["admiralty-dialogue", "admiralty-icon"];
|
|
42
|
+
components.forEach(tagName => { switch (tagName) {
|
|
43
|
+
case "admiralty-dialogue":
|
|
44
|
+
if (!customElements.get(tagName)) {
|
|
45
|
+
customElements.define(tagName, DialogueComponent);
|
|
46
|
+
}
|
|
47
|
+
break;
|
|
48
|
+
case "admiralty-icon":
|
|
49
|
+
if (!customElements.get(tagName)) {
|
|
50
|
+
defineCustomElement$2();
|
|
51
|
+
}
|
|
52
|
+
break;
|
|
53
|
+
} });
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const AdmiraltyDialogue = DialogueComponent;
|
|
57
|
+
const defineCustomElement = defineCustomElement$1;
|
|
58
|
+
|
|
59
|
+
export { AdmiraltyDialogue, defineCustomElement };
|
|
60
|
+
|
|
61
|
+
//# sourceMappingURL=admiralty-dialogue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"admiralty-dialogue.js","mappings":";;;AAAA,MAAM,WAAW,GAAG,ksCAAksC;;MCSzsC,iBAAiB;;;;;gBAI6B,MAAM;;;EAO/D,kBAAkB;IAChB,QAAQ,IAAI,CAAC,IAAI;MACf,KAAK,MAAM;QACT,OAAO,YAAY,CAAC;MACtB,KAAK,SAAS;QACZ,OAAO,qBAAqB,CAAC;MAC/B,KAAK,SAAS;QACZ,OAAO,OAAO,CAAC;MACjB,KAAK,OAAO;QACV,OAAO,aAAa,CAAC;KACxB;GACF;EAED,MAAM;IACJ,QACE,eACE,KAAK,EAAE;QACL,QAAQ,EAAE,IAAI;QACd,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI;OAClB,IAED,WAAK,KAAK,EAAC,gBAAgB,IACzB,sBAAgB,KAAK,EAAC,qBAAqB,eAAY,IAAI,CAAC,kBAAkB,EAAE,CAAC,QAAQ,GAAmB,EAC3G,IAAI,CAAC,OAAO,CACT,EACN,eAAa,CACL,EACV;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/dialogue/dialogue.scss?tag=admiralty-dialogue&encapsulation=shadow","./src/components/dialogue/dialogue.tsx"],"sourcesContent":["@use \"../../scss/base/responsive\";\r\n@use \"../../scss/vars/typography\";\r\n@use \"../../scss/vars/colours\";\r\n\r\n.dialogue {\r\n box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2);\r\n padding: 30px 18px;\r\n overflow-wrap: break-word;\r\n word-wrap: break-word;\r\n\r\n @include responsive.not-desktop {\r\n padding: 24px 18px;\r\n }\r\n\r\n .dialogue-title {\r\n color: colours.$colour-admiralty-blue;\r\n font-size: 20px;\r\n font-weight: typography.$font-weight-medium;\r\n line-height: 30px;\r\n display: flex;\r\n align-items: center;\r\n overflow-wrap: break-word;\r\n word-wrap: break-word;\r\n margin-bottom: 12px;\r\n\r\n .dialogue-title-icon {\r\n margin-right: 12px;\r\n }\r\n }\r\n\r\n &.info {\r\n border-left: 5px solid colours.$colour-utility-info;\r\n background-color: colours.$colour-utility-info-bg;\r\n }\r\n\r\n &.error {\r\n border-left: 5px solid colours.$colour-utility-error;\r\n background-color: colours.$colour-utility-error-bg;\r\n }\r\n &.success {\r\n border-left: 5px solid colours.$colour-utility-success;\r\n background-color: colours.$colour-utility-success-bg;\r\n }\r\n &.warning {\r\n border-left: 5px solid colours.$colour-utility-warning;\r\n background-color: colours.$colour-utility-warning-bg;\r\n }\r\n}\r\n","import { Component, Prop, h } from '@stencil/core';\nimport { faCheck, faCircleInfo, faExclamation, faTriangleExclamation } from '@fortawesome/free-solid-svg-icons';\nimport { IconDefinition } from '@fortawesome/fontawesome-svg-core';\n\n@Component({\n tag: 'admiralty-dialogue',\n styleUrl: 'dialogue.scss',\n shadow: true,\n})\nexport class DialogueComponent {\n /**\n * The type of dialogue box to render.\n */\n @Prop() type: 'info' | 'warning' | 'success' | 'error' = 'info';\n\n /**\n * The heading to display.\n */\n @Prop() heading: string;\n\n getIconNameForType(): IconDefinition {\n switch (this.type) {\n case 'info':\n return faCircleInfo;\n case 'warning':\n return faTriangleExclamation;\n case 'success':\n return faCheck;\n case 'error':\n return faExclamation;\n }\n }\n\n render() {\n return (\n <section\n class={{\n dialogue: true,\n [this.type]: true,\n }}\n >\n <div class=\"dialogue-title\">\n <admiralty-icon class=\"dialogue-title-icon\" icon-name={this.getIconNameForType().iconName}></admiralty-icon>\n {this.heading}\n </div>\n <slot></slot>\n </section>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface AdmiraltyExpansion extends Components.AdmiraltyExpansion, HTMLElement {}
|
|
4
|
+
export const AdmiraltyExpansion: {
|
|
5
|
+
prototype: AdmiraltyExpansion;
|
|
6
|
+
new (): AdmiraltyExpansion;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { E as ExpansionComponent, d as defineCustomElement$1 } from './expansion.js';
|
|
2
|
+
|
|
3
|
+
const AdmiraltyExpansion = ExpansionComponent;
|
|
4
|
+
const defineCustomElement = defineCustomElement$1;
|
|
5
|
+
|
|
6
|
+
export { AdmiraltyExpansion, defineCustomElement };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=admiralty-expansion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"admiralty-expansion.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface AdmiraltyFileInput extends Components.AdmiraltyFileInput, HTMLElement {}
|
|
4
|
+
export const AdmiraltyFileInput: {
|
|
5
|
+
prototype: AdmiraltyFileInput;
|
|
6
|
+
new (): AdmiraltyFileInput;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$2 } from './icon.js';
|
|
3
|
+
|
|
4
|
+
const fileInputCss = ".admiralty-file-input{background:#eee;display:flex;position:relative;border:2px dashed #09315b;min-height:120px;align-content:stretch;justify-content:stretch;margin-bottom:36px;font-family:\"JohnstonITC\", Helvetica, sans-serif;font-size:18px;line-height:24px;font-weight:300}.admiralty-file-input.drop_zone{background:#fff !important}.admiralty-file-input .upload-icon{color:#09315b;font-size:24px;font-weight:900;margin:0.4rem auto;text-align:center;flex:0 1}label{border-image-repeat:stretch;border-image-width:1;display:flex;align-content:center;flex-direction:column;flex:1;justify-content:center;cursor:pointer}label span{color:#09315b;flex:0 1;font-size:18px;font-weight:300;text-align:center;margin:0.4rem 0}label span.instructions{font-weight:normal}input[type=file]{align-items:baseline;overflow:visible;position:absolute;top:0;bottom:0;z-index:-1;width:100%}input[type=file]:focus{outline:3px solid #ffdd00;outline-offset:2px}";
|
|
5
|
+
|
|
6
|
+
const FileInputComponent = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.__attachShadow();
|
|
11
|
+
this.fileInputChange = createEvent(this, "fileInputChange", 7);
|
|
12
|
+
this.id = `admiralty-file-input-${++nextId}`;
|
|
13
|
+
/**
|
|
14
|
+
* Takes the bytes of a file and returns it as human readable figure
|
|
15
|
+
* @param bytes pass bytes throughs as a number
|
|
16
|
+
* @returns convers the bytes to the appropiate largest figure followed by the format ie. 'kb', 'mb' etc
|
|
17
|
+
*/
|
|
18
|
+
this.sizeOf = function (bytes) {
|
|
19
|
+
if (bytes === 0) {
|
|
20
|
+
return '0.00 B';
|
|
21
|
+
}
|
|
22
|
+
var e = Math.floor(Math.log(bytes) / Math.log(1024));
|
|
23
|
+
return (bytes / Math.pow(1024, e)).toFixed(2) + ' ' + ' KMGTP'.charAt(e) + 'B';
|
|
24
|
+
};
|
|
25
|
+
this.label = 'Click to choose a file or drag it';
|
|
26
|
+
this.multiple = false;
|
|
27
|
+
this.files = undefined;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The event that is fired when the user clicks on the file input box and uses the default dialog
|
|
31
|
+
* @param event
|
|
32
|
+
*/
|
|
33
|
+
changeHandler(event) {
|
|
34
|
+
event.preventDefault();
|
|
35
|
+
this.storeFileInfo(event.target.files);
|
|
36
|
+
this.fileInputChange.emit(this.files);
|
|
37
|
+
console.log('changeHandler:', this.files);
|
|
38
|
+
}
|
|
39
|
+
storeFileInfo(files) {
|
|
40
|
+
this.files = this.multiple ? [...files] : [files.item(0)];
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Prevents default dragOver behaviour which, stops the file being downloaded to the browser
|
|
44
|
+
* in a new tab
|
|
45
|
+
* @param event
|
|
46
|
+
*/
|
|
47
|
+
dragOverHandler(event) {
|
|
48
|
+
event.preventDefault();
|
|
49
|
+
this.el.shadowRoot.querySelector('.admiralty-file-input').classList.add('drop_zone');
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* When this event is fired the 'drop_zone' class is removed from the wrapper 'admiralty-file-input' div
|
|
53
|
+
* which, turns the background back to off white
|
|
54
|
+
* @param event
|
|
55
|
+
*/
|
|
56
|
+
dragLeaveHander(event) {
|
|
57
|
+
event.preventDefault();
|
|
58
|
+
this.el.shadowRoot.querySelector('.admiralty-file-input').classList.remove('drop_zone');
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Handles the 'file' the user drops into the input field
|
|
62
|
+
* Does a check if it's a file and update the interface with the filename and the size of the file
|
|
63
|
+
* @param event
|
|
64
|
+
*/
|
|
65
|
+
dropHandler(event) {
|
|
66
|
+
event.preventDefault();
|
|
67
|
+
this.el.shadowRoot.querySelector('.admiralty-file-input').classList.remove('drop_zone');
|
|
68
|
+
if (event.dataTransfer.files) {
|
|
69
|
+
this.storeFileInfo(event.dataTransfer.files);
|
|
70
|
+
this.fileInputChange.emit(this.files);
|
|
71
|
+
console.log('Drop: ', this.files);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
get filesDisplay() {
|
|
75
|
+
return `${this.files[0].name} (${this.sizeOf(this.files[0].size)}) ${this.files.length > 1 ? ' ...' : ''}`;
|
|
76
|
+
}
|
|
77
|
+
render() {
|
|
78
|
+
var _a;
|
|
79
|
+
return (h(Host, { onDragLeave: event => this.dragLeaveHander(event), onDragOver: event => this.dragOverHandler(event), onDrop: event => this.dropHandler(event) }, h("div", { class: "admiralty-file-input" }, h("label", { htmlFor: this.id }, h("admiralty-icon", { class: "upload-icon", "icon-name": "upload" }), ((_a = this.files) === null || _a === void 0 ? void 0 : _a.length) ? h("span", null, this.filesDisplay) : h("span", { class: "instructions" }, this.label)), h("input", { onChange: event => this.changeHandler(event), id: this.id, "aria-hidden": "true", "aria-label": "File Upload", type: "file", class: "admiralty-form-field", multiple: this.multiple }))));
|
|
80
|
+
}
|
|
81
|
+
get el() { return this; }
|
|
82
|
+
static get style() { return fileInputCss; }
|
|
83
|
+
}, [1, "admiralty-file-input", {
|
|
84
|
+
"label": [1],
|
|
85
|
+
"multiple": [4],
|
|
86
|
+
"files": [32]
|
|
87
|
+
}]);
|
|
88
|
+
let nextId = 0;
|
|
89
|
+
function defineCustomElement$1() {
|
|
90
|
+
if (typeof customElements === "undefined") {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const components = ["admiralty-file-input", "admiralty-icon"];
|
|
94
|
+
components.forEach(tagName => { switch (tagName) {
|
|
95
|
+
case "admiralty-file-input":
|
|
96
|
+
if (!customElements.get(tagName)) {
|
|
97
|
+
customElements.define(tagName, FileInputComponent);
|
|
98
|
+
}
|
|
99
|
+
break;
|
|
100
|
+
case "admiralty-icon":
|
|
101
|
+
if (!customElements.get(tagName)) {
|
|
102
|
+
defineCustomElement$2();
|
|
103
|
+
}
|
|
104
|
+
break;
|
|
105
|
+
} });
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const AdmiraltyFileInput = FileInputComponent;
|
|
109
|
+
const defineCustomElement = defineCustomElement$1;
|
|
110
|
+
|
|
111
|
+
export { AdmiraltyFileInput, defineCustomElement };
|
|
112
|
+
|
|
113
|
+
//# sourceMappingURL=admiralty-file-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"admiralty-file-input.js","mappings":";;;AAAA,MAAM,YAAY,GAAG,26BAA26B;;MCOn7B,kBAAkB;;;;;;IAkB7B,OAAE,GAAW,wBAAwB,EAAE,MAAM,EAAE,CAAC;;;;;;IAqEhD,WAAM,GAAG,UAAU,KAAa;MAC9B,IAAI,KAAK,KAAK,CAAC,EAAE;QACf,OAAO,QAAQ,CAAC;OACjB;MACD,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;MACrD,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;KAChF,CAAC;iBAvFsB,mCAAmC;oBAKxC,KAAK;;;;;;;EAkBxB,aAAa,CAAC,KAAY;IACxB,KAAK,CAAC,cAAc,EAAE,CAAC;IAEvB,IAAI,CAAC,aAAa,CAAE,KAAK,CAAC,MAA2B,CAAC,KAAK,CAAC,CAAC;IAE7D,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACtC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;GAC3C;EAEO,aAAa,CAAC,KAAe;IACnC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,QAAQ,GAAG,CAAC,GAAI,KAA2B,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;GAClF;;;;;;EAOD,eAAe,CAAC,KAAgB;IAC9B,KAAK,CAAC,cAAc,EAAE,CAAC;IACvB,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,uBAAuB,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;GACtF;;;;;;EAOD,eAAe,CAAC,KAAgB;IAC9B,KAAK,CAAC,cAAc,EAAE,CAAC;IACvB,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,uBAAuB,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;GACzF;;;;;;EAOD,WAAW,CAAC,KAAgB;IAC1B,KAAK,CAAC,cAAc,EAAE,CAAC;IACvB,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,uBAAuB,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAExF,IAAI,KAAK,CAAC,YAAY,CAAC,KAAK,EAAE;MAC5B,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;MAC7C,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;MACtC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;KACnC;GACF;EAED,IAAI,YAAY;IACd,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,GAAG,MAAM,GAAG,EAAE,EAAE,CAAC;GAC5G;EAeD,MAAM;;IACJ,QACE,EAAC,IAAI,IAAC,WAAW,EAAE,KAAK,IAAI,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,KAAK,IAAI,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,IACjJ,WAAK,KAAK,EAAC,sBAAsB,IAC/B,aAAO,OAAO,EAAE,IAAI,CAAC,EAAE,IACrB,sBAAgB,KAAK,EAAC,aAAa,eAAW,QAAQ,GAAkB,EACvE,CAAA,MAAA,IAAI,CAAC,KAAK,0CAAE,MAAM,IAAG,gBAAO,IAAI,CAAC,YAAY,CAAQ,GAAG,YAAM,KAAK,EAAC,cAAc,IAAE,IAAI,CAAC,KAAK,CAAQ,CACjG,EACR,aACE,QAAQ,EAAE,KAAK,IAAI,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,EAC5C,EAAE,EAAE,IAAI,CAAC,EAAE,iBACC,MAAM,gBACP,aAAa,EACxB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,sBAAsB,EAC5B,QAAQ,EAAE,IAAI,CAAC,QAAQ,GACvB,CACE,CACD,EACP;GACH;;;;;;;;AAGH,IAAI,MAAM,GAAG,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/file-input/file-input.scss?tag=admiralty-file-input&encapsulation=shadow","./src/components/file-input/file-input.tsx"],"sourcesContent":["@use \"../../scss/vars/colours\";\n@use \"../../scss/vars/typography\";\n\n.admiralty-file-input {\n background: #eee;\n display: flex;\n position: relative;\n border: 2px dashed colours.$colour-admiralty-blue;;\n min-height: 120px;\n align-content: stretch;\n justify-content: stretch;\n margin-bottom: 36px;\n font-family: typography.$font-family;\n font-size: 18px;\n line-height: 24px;\n font-weight: 300;\n\n &.drop_zone { // active when file is dragged over label\n background: #fff !important;\n }\n\n .upload-icon {\n color: colours.$colour-admiralty-blue;\n font-size: 24px;\n font-weight: 900;\n margin: .4rem auto;\n text-align: center;\n flex: 0 1;\n }\n}\n\nlabel {\n border-image-repeat: stretch;\n border-image-width: 1;\n display: flex;\n align-content: center;\n flex-direction: column;\n flex:1;\n justify-content: center;\n cursor: pointer;\n\n span {\n color: colours.$colour-admiralty-blue;\n flex: 0 1;\n font-size: 18px;\n font-weight: typography.$font-weight-light;\n text-align: center;\n margin: 0.4rem 0;\n\n &.instructions {\n font-weight: typography.$font-weight-medium;\n }\n }\n}\n\ninput[type=file] {\n align-items: baseline;\n overflow: visible;\n position: absolute;\n top: 0;\n bottom: 0;\n z-index: -1;\n width: 100%;\n\n &:focus {\n outline: 3px solid colours.$colour-utility-focus;\n outline-offset: 2px;\n }\n}\n","import { Component, Element, Event, Host, h, Prop, State, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'admiralty-file-input',\n styleUrl: 'file-input.scss',\n shadow: true,\n})\nexport class FileInputComponent {\n @Element() el: HTMLElement;\n\n /**\n * Used to display instructions to the user and is replaced with the filename the user inputs\n */\n @Prop() label: string = 'Click to choose a file or drag it';\n\n /**\n * If true, enables multiple files to be selected or dragged\n */\n @Prop() multiple = false;\n\n /**\n * Emitted when the added file(s) changes\n */\n @Event() fileInputChange: EventEmitter<File[]>;\n\n id: string = `admiralty-file-input-${++nextId}`;\n\n /**\n * INTERNAL - The list of files currently in the field\n */\n @State() files: File[];\n\n /**\n * The event that is fired when the user clicks on the file input box and uses the default dialog\n * @param event\n */\n changeHandler(event: Event) {\n event.preventDefault();\n\n this.storeFileInfo((event.target as HTMLInputElement).files);\n\n this.fileInputChange.emit(this.files);\n console.log('changeHandler:', this.files);\n }\n\n private storeFileInfo(files: FileList) {\n this.files = this.multiple ? [...(files as unknown as File[])] : [files.item(0)];\n }\n\n /**\n * Prevents default dragOver behaviour which, stops the file being downloaded to the browser\n * in a new tab\n * @param event\n */\n dragOverHandler(event: DragEvent) {\n event.preventDefault();\n this.el.shadowRoot.querySelector('.admiralty-file-input').classList.add('drop_zone');\n }\n\n /**\n * When this event is fired the 'drop_zone' class is removed from the wrapper 'admiralty-file-input' div\n * which, turns the background back to off white\n * @param event\n */\n dragLeaveHander(event: DragEvent) {\n event.preventDefault();\n this.el.shadowRoot.querySelector('.admiralty-file-input').classList.remove('drop_zone');\n }\n\n /**\n * Handles the 'file' the user drops into the input field\n * Does a check if it's a file and update the interface with the filename and the size of the file\n * @param event\n */\n dropHandler(event: DragEvent) {\n event.preventDefault();\n this.el.shadowRoot.querySelector('.admiralty-file-input').classList.remove('drop_zone');\n\n if (event.dataTransfer.files) {\n this.storeFileInfo(event.dataTransfer.files);\n this.fileInputChange.emit(this.files);\n console.log('Drop: ', this.files);\n }\n }\n\n get filesDisplay() {\n return `${this.files[0].name} (${this.sizeOf(this.files[0].size)}) ${this.files.length > 1 ? ' ...' : ''}`;\n }\n\n /**\n * Takes the bytes of a file and returns it as human readable figure\n * @param bytes pass bytes throughs as a number\n * @returns convers the bytes to the appropiate largest figure followed by the format ie. 'kb', 'mb' etc\n */\n sizeOf = function (bytes: number) {\n if (bytes === 0) {\n return '0.00 B';\n }\n var e = Math.floor(Math.log(bytes) / Math.log(1024));\n return (bytes / Math.pow(1024, e)).toFixed(2) + ' ' + ' KMGTP'.charAt(e) + 'B';\n };\n\n render() {\n return (\n <Host onDragLeave={event => this.dragLeaveHander(event)} onDragOver={event => this.dragOverHandler(event)} onDrop={event => this.dropHandler(event)}>\n <div class=\"admiralty-file-input\">\n <label htmlFor={this.id}>\n <admiralty-icon class=\"upload-icon\" icon-name=\"upload\"></admiralty-icon>\n {this.files?.length ? <span>{this.filesDisplay}</span> : <span class=\"instructions\">{this.label}</span>}\n </label>\n <input\n onChange={event => this.changeHandler(event)}\n id={this.id}\n aria-hidden=\"true\"\n aria-label=\"File Upload\"\n type=\"file\"\n class=\"admiralty-form-field\"\n multiple={this.multiple}\n />\n </div>\n </Host>\n );\n }\n}\n\nlet nextId = 0;\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface AdmiraltyFilterGroup extends Components.AdmiraltyFilterGroup, HTMLElement {}
|
|
4
|
+
export const AdmiraltyFilterGroup: {
|
|
5
|
+
prototype: AdmiraltyFilterGroup;
|
|
6
|
+
new (): AdmiraltyFilterGroup;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$3 } from './expansion.js';
|
|
3
|
+
import { d as defineCustomElement$2 } from './icon.js';
|
|
4
|
+
|
|
5
|
+
const filterGroupCss = "";
|
|
6
|
+
|
|
7
|
+
const FilterGroupComponent = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.__registerHost();
|
|
11
|
+
this.groupTitle = undefined;
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
return (h("admiralty-expansion", { heading: this.groupTitle, "hide-border": true, expanded: true }, h("slot", null)));
|
|
15
|
+
}
|
|
16
|
+
static get style() { return filterGroupCss; }
|
|
17
|
+
}, [6, "admiralty-filter-group", {
|
|
18
|
+
"groupTitle": [1, "group-title"]
|
|
19
|
+
}]);
|
|
20
|
+
function defineCustomElement$1() {
|
|
21
|
+
if (typeof customElements === "undefined") {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const components = ["admiralty-filter-group", "admiralty-expansion", "admiralty-icon"];
|
|
25
|
+
components.forEach(tagName => { switch (tagName) {
|
|
26
|
+
case "admiralty-filter-group":
|
|
27
|
+
if (!customElements.get(tagName)) {
|
|
28
|
+
customElements.define(tagName, FilterGroupComponent);
|
|
29
|
+
}
|
|
30
|
+
break;
|
|
31
|
+
case "admiralty-expansion":
|
|
32
|
+
if (!customElements.get(tagName)) {
|
|
33
|
+
defineCustomElement$3();
|
|
34
|
+
}
|
|
35
|
+
break;
|
|
36
|
+
case "admiralty-icon":
|
|
37
|
+
if (!customElements.get(tagName)) {
|
|
38
|
+
defineCustomElement$2();
|
|
39
|
+
}
|
|
40
|
+
break;
|
|
41
|
+
} });
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const AdmiraltyFilterGroup = FilterGroupComponent;
|
|
45
|
+
const defineCustomElement = defineCustomElement$1;
|
|
46
|
+
|
|
47
|
+
export { AdmiraltyFilterGroup, defineCustomElement };
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=admiralty-filter-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"admiralty-filter-group.js","mappings":";;;;AAAA,MAAM,cAAc,GAAG,EAAE;;MCUZ,oBAAoB;;;;;;EAM/B,MAAM;IACJ,QACE,2BAAqB,OAAO,EAAE,IAAI,CAAC,UAAU,iBAAe,IAAI,EAAE,QAAQ,EAAE,IAAI,IAC9E,eAAa,CACO,EACtB;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/filter-group/filter-group.scss?tag=admiralty-filter-group&encapsulation=scoped","./src/components/filter-group/filter-group.tsx"],"sourcesContent":["","import { Component, Prop, h } from '@stencil/core';\n\n/**\n * @slot - You can place any content inside this element that you wish to use inside your filter component.\n */\n@Component({\n tag: 'admiralty-filter-group',\n styleUrl: 'filter-group.scss',\n scoped: true,\n})\nexport class FilterGroupComponent {\n /**\n * The title of the filter group\n */\n @Prop() groupTitle: string;\n\n render() {\n return (\n <admiralty-expansion heading={this.groupTitle} hide-border={true} expanded={true}>\n <slot></slot>\n </admiralty-expansion>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface AdmiraltyFilter extends Components.AdmiraltyFilter, HTMLElement {}
|
|
4
|
+
export const AdmiraltyFilter: {
|
|
5
|
+
prototype: AdmiraltyFilter;
|
|
6
|
+
new (): AdmiraltyFilter;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$3 } from './button.js';
|
|
3
|
+
import { d as defineCustomElement$2 } from './icon.js';
|
|
4
|
+
|
|
5
|
+
const filterCss = "@charset \"UTF-8\";@media (max-width: 1023px){.desktop-only.sc-admiralty-filter{display:none}}@media (min-width: 1024px){.not-desktop.sc-admiralty-filter{display:none}}@media (min-width: 1024px){.tablet-only.sc-admiralty-filter{display:none}}@media (max-width: 479px) and (min-width: 0px){.tablet-only.sc-admiralty-filter{display:none}}@media (max-width: 479px) and (min-width: 0px){.tablet-or-desktop.sc-admiralty-filter{display:none}}@media (min-width: 1024px){.phone-or-tablet.sc-admiralty-filter{display:none}}@media (min-width: 1024px){.phone-only.sc-admiralty-filter{display:none}}@media (max-width: 1023px) and (min-width: 480px){.phone-only.sc-admiralty-filter{display:none}}*.sc-admiralty-filter{font-family:\"JohnstonITC\", Helvetica, sans-serif;font-size:18px;line-height:24px;font-weight:300;color:#333333}@media (max-width: 1023px){*.sc-admiralty-filter{font-size:16px}}a.sc-admiralty-filter{color:#09315b}a.sc-admiralty-filter:focus{outline:3px solid #ffdd00;outline-offset:1px}h1.sc-admiralty-filter{font-family:\"JohnstonITC\", Helvetica, sans-serif;color:#09315b;font-weight:normal;font-size:48px;line-height:60px;margin:0 0 30px 0}@media (max-width: 1023px){h1.sc-admiralty-filter{font-size:46px;line-height:54px}}h2.sc-admiralty-filter,.filter-heading.sc-admiralty-filter .filter-title.sc-admiralty-filter{font-family:\"JohnstonITC\", Helvetica, sans-serif;color:#09315b;font-weight:normal;font-size:36px;line-height:48px;margin-bottom:18px}@media (max-width: 1023px){h2.sc-admiralty-filter,.filter-heading.sc-admiralty-filter .filter-title.sc-admiralty-filter{font-size:34px;line-height:42px}}h3.sc-admiralty-filter,h4.sc-admiralty-filter,h5.sc-admiralty-filter{font-family:\"JohnstonITC\", Helvetica, sans-serif;color:#09315b;font-weight:normal;font-size:21px;line-height:30px;margin-bottom:12px}@media (max-width: 1023px){h3.sc-admiralty-filter,h4.sc-admiralty-filter,h5.sc-admiralty-filter{font-size:20px;line-height:30px}}h6.sc-admiralty-filter{font-family:\"JohnstonITC\", Helvetica, sans-serif;color:#09315b;font-weight:normal;font-size:18px;line-height:24px;margin-bottom:12px}@media (max-width: 1023px){h6.sc-admiralty-filter{font-size:16px}}p.sc-admiralty-filter{font-family:\"JohnstonITC\", Helvetica, sans-serif;margin-bottom:30px}.intro.sc-admiralty-filter{font-family:\"JohnstonITC\", Helvetica, sans-serif;font-size:28px;line-height:36px;margin-bottom:30px}@media (max-width: 1023px){.intro.sc-admiralty-filter{font-size:26px}}.small.sc-admiralty-filter{font-family:\"JohnstonITC\", Helvetica, sans-serif;font-size:16px}@media (max-width: 1023px){.small.sc-admiralty-filter{font-size:14px;line-height:22px}}blockquote.sc-admiralty-filter{font-family:\"JohnstonITC\", Helvetica, sans-serif;line-height:30px;width:100%;padding:24px 18px;border-left:5px solid #09315b;margin-bottom:30px;background:#eeeeee}@media (max-width: 1023px){blockquote.sc-admiralty-filter{line-height:24px}}ul.sc-admiralty-filter{font-family:\"JohnstonITC\", Helvetica, sans-serif;list-style:none}ul.sc-admiralty-filter a.sc-admiralty-filter{font-weight:300}ul.sc-admiralty-filter li.sc-admiralty-filter{margin-bottom:12px}ul.sc-admiralty-filter li.sc-admiralty-filter:before{content:\"■\";font-size:18px;color:#09315b;vertical-align:text-bottom;margin-right:12px}@media (max-width: 1023px){ul.sc-admiralty-filter li.sc-admiralty-filter:before{font-size:8px}}ol.sc-admiralty-filter{font-family:\"JohnstonITC\", Helvetica, sans-serif;list-style:none;counter-reset:li}ol.sc-admiralty-filter a.sc-admiralty-filter{font-weight:300}ol.sc-admiralty-filter li.sc-admiralty-filter:before{content:counter(li) \".\";color:#03284f;font-size:18px;margin-right:12px}ol.sc-admiralty-filter li.sc-admiralty-filter{counter-increment:li;margin-bottom:12px}.white-text.sc-admiralty-filter *.sc-admiralty-filter{color:#ffffff}.filter-heading.sc-admiralty-filter{display:flex;justify-content:space-between;align-items:baseline}.filter-heading.sc-admiralty-filter .button-wrapper.sc-admiralty-filter{position:relative;margin-left:28px}.filter-heading.sc-admiralty-filter .button-wrapper.sc-admiralty-filter button.text-link.sc-admiralty-filter{background-color:unset;border:none;color:black;padding:0;min-width:unset;width:unset;height:unset;font-size:16px;text-decoration:underline;font-weight:unset;cursor:pointer}.filter-heading.sc-admiralty-filter .button-wrapper.sc-admiralty-filter button.text-link.sc-admiralty-filter:hover{background-color:unset;border:unset}.filter-heading.sc-admiralty-filter .button-wrapper.sc-admiralty-filter button.text-link.sc-admiralty-filter:focus{outline:none}.filter-heading.sc-admiralty-filter .button-wrapper.sc-admiralty-filter button.text-link.sc-admiralty-filter:focus::after{content:\"\";position:absolute;top:-3px;bottom:0;right:-3px;left:-3px;box-shadow:0 0 0 3px #ffdd00}";
|
|
6
|
+
|
|
7
|
+
const FilterComponent = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.__registerHost();
|
|
11
|
+
this.filterCleared = createEvent(this, "filterCleared", 7);
|
|
12
|
+
this.filterApplied = createEvent(this, "filterApplied", 7);
|
|
13
|
+
this.onFilterCleared = (ev) => {
|
|
14
|
+
ev.preventDefault();
|
|
15
|
+
this.filterCleared.emit();
|
|
16
|
+
};
|
|
17
|
+
this.onFilterApplied = (ev) => {
|
|
18
|
+
ev.preventDefault();
|
|
19
|
+
this.filterApplied.emit();
|
|
20
|
+
};
|
|
21
|
+
this.filterTitle = 'Filter';
|
|
22
|
+
}
|
|
23
|
+
render() {
|
|
24
|
+
return (h("div", { class: "filter-container" }, h("div", { class: "filter-heading" }, h("div", { class: "filter-title" }, this.filterTitle), h("div", { class: "button-wrapper" }, h("button", { type: "reset", class: "text-link", "aria-label": "Clear selected filters", onClick: this.onFilterCleared }, "Clear"))), h("div", null, h("slot", null)), h("div", null, h("admiralty-button", { onClick: this.onFilterApplied }, "Apply filters"))));
|
|
25
|
+
}
|
|
26
|
+
static get style() { return filterCss; }
|
|
27
|
+
}, [6, "admiralty-filter", {
|
|
28
|
+
"filterTitle": [1, "filter-title"]
|
|
29
|
+
}]);
|
|
30
|
+
function defineCustomElement$1() {
|
|
31
|
+
if (typeof customElements === "undefined") {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const components = ["admiralty-filter", "admiralty-button", "admiralty-icon"];
|
|
35
|
+
components.forEach(tagName => { switch (tagName) {
|
|
36
|
+
case "admiralty-filter":
|
|
37
|
+
if (!customElements.get(tagName)) {
|
|
38
|
+
customElements.define(tagName, FilterComponent);
|
|
39
|
+
}
|
|
40
|
+
break;
|
|
41
|
+
case "admiralty-button":
|
|
42
|
+
if (!customElements.get(tagName)) {
|
|
43
|
+
defineCustomElement$3();
|
|
44
|
+
}
|
|
45
|
+
break;
|
|
46
|
+
case "admiralty-icon":
|
|
47
|
+
if (!customElements.get(tagName)) {
|
|
48
|
+
defineCustomElement$2();
|
|
49
|
+
}
|
|
50
|
+
break;
|
|
51
|
+
} });
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const AdmiraltyFilter = FilterComponent;
|
|
55
|
+
const defineCustomElement = defineCustomElement$1;
|
|
56
|
+
|
|
57
|
+
export { AdmiraltyFilter, defineCustomElement };
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=admiralty-filter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"admiralty-filter.js","mappings":";;;;AAAA,MAAM,SAAS,GAAG,msJAAmsJ;;MCUxsJ,eAAe;;;;;;IAgBlB,oBAAe,GAAG,CAAC,EAAS;MAClC,EAAE,CAAC,cAAc,EAAE,CAAC;MACpB,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;KAC3B,CAAC;IAEM,oBAAe,GAAG,CAAC,EAAS;MAClC,EAAE,CAAC,cAAc,EAAE,CAAC;MACpB,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;KAC3B,CAAC;uBApBoB,QAAQ;;EAsB9B,MAAM;IACJ,QACE,WAAK,KAAK,EAAC,kBAAkB,IAC3B,WAAK,KAAK,EAAC,gBAAgB,IACzB,WAAK,KAAK,EAAC,cAAc,IAAE,IAAI,CAAC,WAAW,CAAO,EAClD,WAAK,KAAK,EAAC,gBAAgB,IACzB,cAAQ,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,WAAW,gBAAY,wBAAwB,EAAC,OAAO,EAAE,IAAI,CAAC,eAAe,YAE/F,CACL,CACF,EACN,eACE,eAAa,CACT,EACN,eACE,wBAAkB,OAAO,EAAE,IAAI,CAAC,eAAe,oBAAkC,CAC7E,CACF,EACN;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/filter/filter.scss?tag=admiralty-filter&encapsulation=scoped","./src/components/filter/filter.tsx"],"sourcesContent":["@use \"../../scss/vars/colours\";\r\n@use \"../../scss/base/typography\";\r\n\r\n.filter-heading {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: baseline;\r\n\r\n .filter-title {\r\n @extend h2\r\n }\r\n\r\n .button-wrapper {\r\n position: relative;\r\n margin-left: 28px;\r\n /* TODO: If reused, move class to button component */\r\n button.text-link {\r\n background-color: unset;\r\n border: none;\r\n color: black;\r\n padding: 0;\r\n min-width: unset;\r\n width: unset;\r\n height: unset;\r\n font-size: 16px;\r\n text-decoration: underline;\r\n font-weight: unset;\r\n cursor: pointer;\r\n }\r\n button.text-link:hover {\r\n background-color: unset;\r\n border: unset;\r\n }\r\n button.text-link:focus {\r\n outline: none;\r\n }\r\n button.text-link:focus::after {\r\n content: \"\";\r\n position: absolute;\r\n top: -3px;\r\n bottom: 0;\r\n right: -3px;\r\n left: -3px;\r\n box-shadow: 0 0 0 3px colours.$colour-utility-focus;\r\n }\r\n }\r\n}\r\n","import { Component, Prop, h, Event, EventEmitter } from '@stencil/core';\n\n/**\n * @slot - 'admiralty-filter-group' components can be placed inside of this element to render groups of filter controls. You can also place any elements you wish\n */\n@Component({\n tag: 'admiralty-filter',\n styleUrl: 'filter.scss',\n scoped: true,\n})\nexport class FilterComponent {\n /**\n * The title of the filter\n */\n @Prop() filterTitle = 'Filter';\n\n /**\n * Event that is emitted when the filters are cleared\n */\n @Event() filterCleared: EventEmitter<void>;\n\n /**\n * Event that is emitted when the filters are applied\n */\n @Event() filterApplied: EventEmitter<void>;\n\n private onFilterCleared = (ev: Event) => {\n ev.preventDefault();\n this.filterCleared.emit();\n };\n\n private onFilterApplied = (ev: Event) => {\n ev.preventDefault();\n this.filterApplied.emit();\n };\n\n render() {\n return (\n <div class=\"filter-container\">\n <div class=\"filter-heading\">\n <div class=\"filter-title\">{this.filterTitle}</div>\n <div class=\"button-wrapper\">\n <button type=\"reset\" class=\"text-link\" aria-label=\"Clear selected filters\" onClick={this.onFilterCleared}>\n Clear\n </button>\n </div>\n </div>\n <div>\n <slot></slot>\n </div>\n <div>\n <admiralty-button onClick={this.onFilterApplied}>Apply filters</admiralty-button>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface AdmiraltyFooter extends Components.AdmiraltyFooter, HTMLElement {}
|
|
4
|
+
export const AdmiraltyFooter: {
|
|
5
|
+
prototype: AdmiraltyFooter;
|
|
6
|
+
new (): AdmiraltyFooter;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|