@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,58 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-a64d8966.js';
|
|
2
|
+
|
|
3
|
+
const inputCss = ".text-input-container.sc-admiralty-input{display:flex;flex-direction:column}.text-input-container.sc-admiralty-input input.sc-admiralty-input{border-color:#333333;border-width:2px;border-style:solid;color:#333333;font-size:18px;line-height:24px;font-weight:300;padding:12px}.text-input-container.sc-admiralty-input input.sc-admiralty-input:focus{outline-offset:unset;outline:3px solid #ffdd00;box-shadow:#333333 inset 0 0 0 2px}.text-input-container.sc-admiralty-input .form-field.sc-admiralty-input{background-color:#ffffff}.text-input-container.sc-admiralty-input .form-field.sc-admiralty-input:focus-visible{outline:3px solid #ffdd00;box-shadow:#333333 inset 0 0 0 2px}.text-input-container.sc-admiralty-input .form-field.invalid.sc-admiralty-input{border-color:#e20d0d}.text-input-container.sc-admiralty-input .form-field.invalid.sc-admiralty-input:focus-visible{border-color:unset;outline:3px solid #ffdd00}.text-input-container.sc-admiralty-input .form-field.disabled.sc-admiralty-input{color:#adadad;border-color:#adadad;background:#ffffff}.text-input-container.sc-admiralty-input admiralty-input-error.sc-admiralty-input{margin-top:6px}";
|
|
4
|
+
|
|
5
|
+
const InputComponent = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.admiraltyChange = createEvent(this, "admiraltyChange", 7);
|
|
9
|
+
this.inputId = `admiralty-input-${++nextId}`;
|
|
10
|
+
this.onInput = (ev) => {
|
|
11
|
+
const input = ev.target;
|
|
12
|
+
if (input) {
|
|
13
|
+
this.value = input.value || '';
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
this.name = this.inputId;
|
|
17
|
+
this.label = undefined;
|
|
18
|
+
this.hint = undefined;
|
|
19
|
+
this.disabled = false;
|
|
20
|
+
this.type = 'text';
|
|
21
|
+
this.placeholder = undefined;
|
|
22
|
+
this.width = undefined;
|
|
23
|
+
this.required = false;
|
|
24
|
+
this.invalid = false;
|
|
25
|
+
this.invalidMessage = undefined;
|
|
26
|
+
this.autocomplete = 'off';
|
|
27
|
+
this.value = '';
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Update the native input element when the value changes
|
|
31
|
+
*/
|
|
32
|
+
valueChanged() {
|
|
33
|
+
const nativeInput = this.nativeInput;
|
|
34
|
+
const value = this.getValue();
|
|
35
|
+
if (nativeInput && nativeInput.value !== value) {
|
|
36
|
+
nativeInput.value = value;
|
|
37
|
+
}
|
|
38
|
+
this.admiraltyChange.emit({ value: this.value == null ? this.getValue() : this.value.toString() });
|
|
39
|
+
}
|
|
40
|
+
getValue() {
|
|
41
|
+
return typeof this.value === 'number' ? this.value.toString() : (this.value || '').toString();
|
|
42
|
+
}
|
|
43
|
+
render() {
|
|
44
|
+
const value = this.getValue();
|
|
45
|
+
return (h("div", { class: "text-input-container" }, this.label ? (h("admiralty-label", { disabled: this.disabled, for: this.inputId }, this.label)) : null, this.hint ? h("admiralty-hint", { disabled: this.disabled }, this.hint) : null, h("input", { ref: input => (this.nativeInput = input), disabled: this.disabled, id: this.inputId, name: this.name, type: this.type, value: value, onInput: this.onInput, placeholder: this.placeholder, autoComplete: this.autocomplete, required: this.required, style: {
|
|
46
|
+
maxWidth: this.width ? `${this.width}px` : null,
|
|
47
|
+
} }), this.invalid ? h("admiralty-input-error", null, this.invalidMessage) : null));
|
|
48
|
+
}
|
|
49
|
+
static get watchers() { return {
|
|
50
|
+
"value": ["valueChanged"]
|
|
51
|
+
}; }
|
|
52
|
+
};
|
|
53
|
+
let nextId = 0;
|
|
54
|
+
InputComponent.style = inputCss;
|
|
55
|
+
|
|
56
|
+
export { InputComponent as admiralty_input };
|
|
57
|
+
|
|
58
|
+
//# sourceMappingURL=admiralty-input.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"admiralty-input.entry.js","mappings":";;AAAA,MAAM,QAAQ,GAAG,0nCAA0nC;;MCe9nC,cAAc;;;;IACzB,YAAO,GAAW,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAkFxC,YAAO,GAAG,CAAC,EAAS;MAC1B,MAAM,KAAK,GAAG,EAAE,CAAC,MAAiC,CAAC;MACnD,IAAI,KAAK,EAAE;QACT,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC;OAChC;KACF,CAAC;gBAhFqB,IAAI,CAAC,OAAO;;;oBAehB,KAAK;gBAKwD,MAAM;;;oBAe1D,KAAK;mBAKN,KAAK;;wBAUD,KAAK;iBAKsB,EAAE;;;;;EAWlD,YAAY;IACpB,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;IACrC,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC9B,IAAI,WAAW,IAAI,WAAW,CAAC,KAAK,KAAK,KAAK,EAAE;MAC9C,WAAW,CAAC,KAAK,GAAG,KAAK,CAAC;KAC3B;IACD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,IAAI,GAAG,IAAI,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;GACpG;EASO,QAAQ;IACd,OAAO,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC;GAC/F;EAED,MAAM;IACJ,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC9B,QACE,WAAK,KAAK,EAAC,sBAAsB,IAC9B,IAAI,CAAC,KAAK,IACT,uBAAiB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,IAAI,CAAC,OAAO,IACxD,IAAI,CAAC,KAAK,CACK,IAChB,IAAI,EACP,IAAI,CAAC,IAAI,GAAG,sBAAgB,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAG,IAAI,CAAC,IAAI,CAAkB,GAAG,IAAI,EACzF,aACE,GAAG,EAAE,KAAK,KAAK,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,EACxC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,EAAE,EAAE,IAAI,CAAC,OAAO,EAChB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,KAAK,EAAE;QACL,QAAQ,EAAE,IAAI,CAAC,KAAK,GAAG,GAAG,IAAI,CAAC,KAAK,IAAI,GAAG,IAAI;OAChD,GACD,EACD,IAAI,CAAC,OAAO,GAAG,iCAAwB,IAAI,CAAC,cAAc,CAAyB,GAAG,IAAI,CACvF,EACN;GACH;;;;;AAEH,IAAI,MAAM,GAAG,CAAC,CAAC;;;;;","names":[],"sources":["./src/components/input/input.scss?tag=admiralty-input&encapsulation=scoped","./src/components/input/input.tsx"],"sourcesContent":["@use \"../../scss/vars/colours\";\n@use \"../../scss/vars/typography\";\n\n.text-input-container {\n display: flex;\n flex-direction: column;\n\n input {\n border-color: colours.$colour-text;\n border-width: 2px;\n border-style: solid;\n color: colours.$colour-text;\n font-size: 18px;\n line-height: 24px;\n font-weight: typography.$font-weight-light;\n\n padding: 12px;\n\n &:focus {\n outline-offset: unset;\n outline: 3px solid colours.$colour-utility-focus;\n box-shadow: colours.$colour-text inset 0 0 0 2px;\n }\n }\n\n .form-field {\n background-color: colours.$colour-white;\n\n &:focus-visible {\n outline: 3px solid colours.$colour-utility-focus;\n box-shadow: colours.$colour-text inset 0 0 0 2px;\n }\n\n &.invalid {\n border-color: colours.$colour-utility-error;\n\n &:focus-visible {\n border-color: unset;\n outline: 3px solid colours.$colour-utility-focus;\n }\n }\n\n &.disabled {\n color: colours.$colour-textinput-text-disabled;\n border-color: colours.$colour-textinput-border-disabled;\n background: colours.$colour-white;\n }\n }\n\n admiralty-input-error {\n margin-top: 6px;\n }\n}\n","import { Component, ComponentInterface, Event, EventEmitter, h, Prop, Watch } from '@stencil/core';\nimport { InputChangeEventDetail } from './input.interface';\n\n/**\n * Once this component works, review whether a form field component should be created so\n * that shared properties such as `label`, `hint`, `disabled` etc. can be defined once.\n * Examples of similar components that can extend that base component are area, select\n * and checkbox.\n */\n\n@Component({\n tag: 'admiralty-input',\n styleUrl: 'input.scss',\n scoped: true,\n})\nexport class InputComponent implements ComponentInterface {\n inputId: string = `admiralty-input-${++nextId}`;\n\n private nativeInput?: HTMLInputElement;\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 * The label which will be used above the input to describe the input.\n */\n @Prop() label: string;\n\n /**\n * The hint which will be used under the label to describe the input.\n */\n @Prop() hint: string;\n\n /**\n * This dictates whether the form field is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * The input type, options are: `text | date | time | email | password | tel | url`\n */\n @Prop() type: 'text' | 'date' | 'time' | 'email' | 'password' | 'tel' | 'url' = 'text';\n\n /**\n * The placeholder text to show in the input\n */\n @Prop() placeholder: string;\n\n /**\n * The maximum width for the input field.\n */\n @Prop() width: number;\n\n /**\n * This dictates whether the input is required or not\n */\n @Prop() required: boolean = false;\n\n /**\n * Whether to show the input in an invalid state\n */\n @Prop() invalid: boolean = false;\n\n /**\n * The message to show when the input is invalid\n */\n @Prop() invalidMessage: string;\n\n /**\n * Indicates whether the value of the control can be automatically completed by the browser.\n */\n @Prop() autocomplete: string = 'off';\n\n /**\n * The value of the input.\n */\n @Prop({ mutable: true }) value?: string | number | null = '';\n\n /**\n * Emitted when the value has changed.\n */\n @Event() admiraltyChange: EventEmitter<InputChangeEventDetail>;\n\n /**\n * Update the native input element when the value changes\n */\n @Watch('value')\n protected valueChanged() {\n const nativeInput = this.nativeInput;\n const value = this.getValue();\n if (nativeInput && nativeInput.value !== value) {\n nativeInput.value = value;\n }\n this.admiraltyChange.emit({ value: this.value == null ? this.getValue() : this.value.toString() });\n }\n\n private onInput = (ev: Event) => {\n const input = ev.target as HTMLInputElement | null;\n if (input) {\n this.value = input.value || '';\n }\n };\n\n private getValue(): string {\n return typeof this.value === 'number' ? this.value.toString() : (this.value || '').toString();\n }\n\n render() {\n const value = this.getValue();\n return (\n <div class=\"text-input-container\">\n {this.label ? (\n <admiralty-label disabled={this.disabled} for={this.inputId}>\n {this.label}\n </admiralty-label>\n ) : null}\n {this.hint ? <admiralty-hint disabled={this.disabled}>{this.hint}</admiralty-hint> : null}\n <input\n ref={input => (this.nativeInput = input)}\n disabled={this.disabled}\n id={this.inputId}\n name={this.name}\n type={this.type}\n value={value}\n onInput={this.onInput}\n placeholder={this.placeholder}\n autoComplete={this.autocomplete}\n required={this.required}\n style={{\n maxWidth: this.width ? `${this.width}px` : null,\n }}\n />\n {this.invalid ? <admiralty-input-error>{this.invalidMessage}</admiralty-input-error> : null}\n </div>\n );\n }\n}\nlet nextId = 0;\n"],"version":3}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-a64d8966.js';
|
|
2
|
+
|
|
3
|
+
const LinkComponent = class {
|
|
4
|
+
constructor(hostRef) {
|
|
5
|
+
registerInstance(this, hostRef);
|
|
6
|
+
this.href = undefined;
|
|
7
|
+
this.newTab = false;
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
return (h("a", { href: this.href, target: this.newTab ? '_blank' : '_self' }, h("slot", null)));
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { LinkComponent as admiralty_link };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=admiralty-link.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"admiralty-link.entry.js","mappings":";;MAMa,aAAa;;;;kBAQP,KAAK;;EAEtB,MAAM;IACJ,QACE,SAAG,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,GAAG,QAAQ,GAAG,OAAO,IAC1D,eAAa,CACX,EACJ;GACH;;;;;","names":[],"sources":["./src/components/link/link.tsx"],"sourcesContent":["import { Component, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'admiralty-link',\n shadow: false,\n})\nexport class LinkComponent {\n /**\n * The URL that the link will navigate to.\n */\n @Prop() href: string;\n /**\n * Whether to open the URL in a new tab.\n */\n @Prop() newTab = false;\n\n render() {\n return (\n <a href={this.href} target={this.newTab ? '_blank' : '_self'}>\n <slot></slot>\n </a>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index-a64d8966.js';
|
|
2
|
+
|
|
3
|
+
const PaginatorWrapperComponent = class {
|
|
4
|
+
constructor(hostRef) {
|
|
5
|
+
registerInstance(this, hostRef);
|
|
6
|
+
}
|
|
7
|
+
pageChangedHandler(event) {
|
|
8
|
+
const page = event.detail;
|
|
9
|
+
const paginator = this.el.querySelector('admiralty-paginator');
|
|
10
|
+
const perPage = 6;
|
|
11
|
+
const first = page == 1 ? 1 : perPage * (page - 1) + 1;
|
|
12
|
+
const last = page == 8 ? 45 : perPage * page;
|
|
13
|
+
const total = 45;
|
|
14
|
+
const label = `Showing ${first}-${last} of ${total}`;
|
|
15
|
+
if (paginator.label) {
|
|
16
|
+
paginator.label = label;
|
|
17
|
+
}
|
|
18
|
+
paginator.currentPage = page;
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
return (h("div", null, h("slot", null)));
|
|
22
|
+
}
|
|
23
|
+
get el() { return getElement(this); }
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export { PaginatorWrapperComponent as admiralty_paginator_wrapper };
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=admiralty-paginator-wrapper.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"admiralty-paginator-wrapper.entry.js","mappings":";;MAWa,yBAAyB;;;;EAIpC,kBAAkB,CAAC,KAAuB;IACxC,MAAM,IAAI,GAAW,KAAK,CAAC,MAAM,CAAC;IAClC,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;IAE/D,MAAM,OAAO,GAAG,CAAC,CAAC;IAClB,MAAM,KAAK,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,OAAO,IAAI,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IACvD,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,OAAO,GAAG,IAAI,CAAC;IAC7C,MAAM,KAAK,GAAG,EAAE,CAAC;IACjB,MAAM,KAAK,GAAG,WAAW,KAAK,IAAI,IAAI,OAAO,KAAK,EAAE,CAAC;IAErD,IAAI,SAAS,CAAC,KAAK,EAAE;MACnB,SAAS,CAAC,KAAK,GAAG,KAAK,CAAC;KACzB;IACD,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC;GAC9B;EAED,MAAM;IACJ,QACE,eACE,eAAa,CACT,EACN;GACH;;;;;;","names":[],"sources":["./src/components/paginator/paginator.stories.data.tsx"],"sourcesContent":["import { Component, Element, h, Listen } from '@stencil/core';\n\n/**\n * @internal\n * Wrapper for the Paginator to demonstrate how the label and current page properties\n * can be updated.\n */\n@Component({\n tag: 'admiralty-paginator-wrapper',\n shadow: false,\n})\nexport class PaginatorWrapperComponent {\n @Element() el!: HTMLElement;\n\n @Listen('pageChange')\n pageChangedHandler(event: CustomEvent<any>) {\n const page: number = event.detail;\n const paginator = this.el.querySelector('admiralty-paginator');\n\n const perPage = 6;\n const first = page == 1 ? 1 : perPage * (page - 1) + 1;\n const last = page == 8 ? 45 : perPage * page;\n const total = 45;\n const label = `Showing ${first}-${last} of ${total}`;\n\n if (paginator.label) {\n paginator.label = label;\n }\n paginator.currentPage = page;\n }\n\n render() {\n return (\n <div>\n <slot></slot>\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-a64d8966.js';
|
|
2
|
+
import { B as ButtonVariant } from './button.types-2655b2cf.js';
|
|
3
|
+
import { f as faChevronRight, e as faChevronLeft } from './index-e73d97b7.js';
|
|
4
|
+
|
|
5
|
+
const paginatorCss = "admiralty-paginator nav.standard{display:flex;flex-direction:row;align-items:center}admiralty-paginator nav.standard admiralty-button{margin:6px}admiralty-paginator nav.standard p{padding:0px 18px 0px 0px;margin-bottom:0px}";
|
|
6
|
+
|
|
7
|
+
const PaginatorComponent = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.pageChange = createEvent(this, "pageChange", 7);
|
|
11
|
+
this.maxLength = 7;
|
|
12
|
+
this.pages = 1;
|
|
13
|
+
this.currentPage = 1;
|
|
14
|
+
this.label = '';
|
|
15
|
+
}
|
|
16
|
+
pageChanged(page) {
|
|
17
|
+
this.pageChange.emit(page);
|
|
18
|
+
}
|
|
19
|
+
onKeydown(event, navFn) {
|
|
20
|
+
if (event.key === 'Enter' || event.key === 'Enter') {
|
|
21
|
+
navFn();
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
prev() {
|
|
25
|
+
if (this.currentPage > 1) {
|
|
26
|
+
this.pageChanged(this.currentPage - 1);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
next() {
|
|
30
|
+
if (this.currentPage < this.pages) {
|
|
31
|
+
this.pageChanged(this.currentPage + 1);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
render() {
|
|
35
|
+
return (h("nav", { "aria-label": "pagination", class: "standard" }, h("p", { "aria-live": "polite" }, this.label), h("admiralty-button", { variant: ButtonVariant.Icon, icon: faChevronLeft.iconName, disabled: this.currentPage === 1, tabindex: 0, "aria-disabled": this.currentPage === 1, onClick: this.prev.bind(this), onKeyDown: e => this.onKeydown(e, this.prev.bind(this)), "aria-label": "Previous Page" }), h("admiralty-button", { variant: ButtonVariant.Icon, icon: faChevronRight.iconName, disabled: this.currentPage === this.pages, tabindex: 0, "aria-disabled": this.currentPage === this.pages, onClick: this.next.bind(this), onKeyDown: e => this.onKeydown(e, this.next.bind(this)), "aria-label": "Next Page" })));
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
PaginatorComponent.style = paginatorCss;
|
|
39
|
+
|
|
40
|
+
export { PaginatorComponent as admiralty_paginator };
|
|
41
|
+
|
|
42
|
+
//# sourceMappingURL=admiralty-paginator.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"admiralty-paginator.entry.js","mappings":";;;;AAAA,MAAM,YAAY,GAAG,iOAAiO;;MCSzO,kBAAkB;;;;IAmBpB,cAAS,GAAG,CAAC,CAAC;iBAfP,CAAC;uBAIK,CAAC;iBAIC,EAAE;;EASnB,WAAW,CAAC,IAAY;IAC7B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;GAC5B;EAED,SAAS,CAAC,KAAoB,EAAE,KAAe;IAC7C,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO,EAAE;MAClD,KAAK,EAAE,CAAC;KACT;GACF;EAED,IAAI;IACF,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC,EAAE;MACxB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC;KACxC;GACF;EAED,IAAI;IACF,IAAI,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,KAAK,EAAE;MACjC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC;KACxC;GACF;EAED,MAAM;IACJ,QACE,yBAAgB,YAAY,EAAC,KAAK,EAAC,UAAU,IAC3C,sBAAa,QAAQ,IAAE,IAAI,CAAC,KAAK,CAAK,EACtC,wBACE,OAAO,EAAE,aAAa,CAAC,IAAI,EAC3B,IAAI,EAAE,aAAa,CAAC,QAAQ,EAC5B,QAAQ,EAAE,IAAI,CAAC,WAAW,KAAK,CAAC,EAChC,QAAQ,EAAE,CAAC,mBACI,IAAI,CAAC,WAAW,KAAK,CAAC,EACrC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAC7B,SAAS,EAAE,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,gBAC5C,eAAe,GACR,EACpB,wBACE,OAAO,EAAE,aAAa,CAAC,IAAI,EAC3B,IAAI,EAAE,cAAc,CAAC,QAAQ,EAC7B,QAAQ,EAAE,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,KAAK,EACzC,QAAQ,EAAE,CAAC,mBACI,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,KAAK,EAC9C,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAC7B,SAAS,EAAE,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,gBAC5C,WAAW,GACJ,CAChB,EACN;GACH;;;;;;","names":[],"sources":["./src/components/paginator/paginator.scss?tag=admiralty-paginator","./src/components/paginator/paginator.tsx"],"sourcesContent":["@use \"../../scss/vars/colours\";\n\nadmiralty-paginator nav.standard {\n display: flex;\n flex-direction: row;\n align-items: center;\n\n admiralty-button {\n margin: 6px;\n }\n\n p {\n padding: 0px 18px 0px 0px;\n margin-bottom: 0px;\n }\n}\n","import { Component, Prop, h, Event, EventEmitter } from '@stencil/core';\nimport { ButtonVariant } from '../button/button.types';\nimport { faChevronLeft, faChevronRight } from '@fortawesome/free-solid-svg-icons';\n\n@Component({\n tag: 'admiralty-paginator',\n styleUrl: 'paginator.scss',\n shadow: false,\n})\nexport class PaginatorComponent {\n /**\n * The total number of pages. Defaults to 1.\n */\n @Prop() pages = 1;\n /**\n * The current page. Defaults to 1.\n */\n @Prop() currentPage = 1;\n /**\n * The label to display.\n */\n @Prop() label: string = '';\n /**\n * Dispatched when the previous or next button is pressed. The event detail contains\n * the requested page number.\n */\n @Event() pageChange: EventEmitter<number>;\n\n readonly maxLength = 7;\n\n public pageChanged(page: number) {\n this.pageChange.emit(page);\n }\n\n onKeydown(event: KeyboardEvent, navFn: Function) {\n if (event.key === 'Enter' || event.key === 'Enter') {\n navFn();\n }\n }\n\n prev() {\n if (this.currentPage > 1) {\n this.pageChanged(this.currentPage - 1);\n }\n }\n\n next() {\n if (this.currentPage < this.pages) {\n this.pageChanged(this.currentPage + 1);\n }\n }\n\n render() {\n return (\n <nav aria-label=\"pagination\" class=\"standard\">\n <p aria-live=\"polite\">{this.label}</p>\n <admiralty-button\n variant={ButtonVariant.Icon}\n icon={faChevronLeft.iconName}\n disabled={this.currentPage === 1}\n tabindex={0}\n aria-disabled={this.currentPage === 1}\n onClick={this.prev.bind(this)}\n onKeyDown={e => this.onKeydown(e, this.prev.bind(this))}\n aria-label=\"Previous Page\"\n ></admiralty-button>\n <admiralty-button\n variant={ButtonVariant.Icon}\n icon={faChevronRight.iconName}\n disabled={this.currentPage === this.pages}\n tabindex={0}\n aria-disabled={this.currentPage === this.pages}\n onClick={this.next.bind(this)}\n onKeyDown={e => this.onKeydown(e, this.next.bind(this))}\n aria-label=\"Next Page\"\n ></admiralty-button>\n </nav>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-a64d8966.js';
|
|
2
|
+
|
|
3
|
+
const phaseBannerCss = "@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}}admiralty-phase-banner .phase-banner{display:block;line-height:40px;width:100%;padding:0 18px}@media (min-width: 1024px){admiralty-phase-banner .phase-banner{padding:0 20px}}admiralty-phase-banner .phase-banner strong{border:2px solid;font-weight:bold;text-transform:uppercase;letter-spacing:1px;color:#09315b;padding:6px 8px 3px;margin-right:10px}";
|
|
4
|
+
|
|
5
|
+
const PhaseBannerComponent = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.phase = 'alpha';
|
|
9
|
+
this.link = undefined;
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
return (h("div", { class: "phase-banner" }, h("strong", null, this.phase), h("span", null, "This service is in ", this.phase, " phase - please provide", ' ', h("a", { href: this.link, target: "_blank" }, "feedback"), ' ', "to help us improve it")));
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
PhaseBannerComponent.style = phaseBannerCss;
|
|
16
|
+
|
|
17
|
+
export { PhaseBannerComponent as admiralty_phase_banner };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=admiralty-phase-banner.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"admiralty-phase-banner.entry.js","mappings":";;AAAA,MAAM,cAAc,GAAG,s1BAAs1B;;MCOh2B,oBAAoB;;;iBAIG,OAAO;;;EAOzC,MAAM;IACJ,QACE,WAAK,KAAK,EAAC,cAAc,IACvB,kBAAS,IAAI,CAAC,KAAK,CAAU,EAC7B,uCACsB,IAAI,CAAC,KAAK,6BAAyB,GAAG,EAC1D,SAAG,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAC,QAAQ,eAE/B,EAAC,GAAG,0BAEH,CACH,EACN;GACH;;;;;;","names":[],"sources":["./src/components/phase-banner/phase-banner.scss?tag=admiralty-phase-banner","./src/components/phase-banner/phase-banner.tsx"],"sourcesContent":["@use \"../../scss/base/responsive\";\n@use \"../../scss/vars/colours\";\n\nadmiralty-phase-banner .phase-banner {\n display: block;\n line-height: 40px;\n width: 100%;\n padding: 0 18px;\n @include responsive.desktop-only {\n padding: 0 20px;\n }\n\n strong {\n border: 2px solid;\n font-weight: bold;\n text-transform: uppercase;\n letter-spacing: 1px;\n color: colours.$colour-admiralty-blue;\n padding: 6px 8px 3px;\n margin-right: 10px;\n }\n}\n","import { Component, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'admiralty-phase-banner',\n styleUrl: 'phase-banner.scss',\n shadow: false,\n})\nexport class PhaseBannerComponent {\n /**\n * The phase for the phase banner\n */\n @Prop() phase: 'alpha' | 'beta' = 'alpha';\n\n /**\n * A link to where the end user can provide feedback\n */\n @Prop() link: string;\n\n render() {\n return (\n <div class=\"phase-banner\">\n <strong>{this.phase}</strong>\n <span>\n This service is in {this.phase} phase - please provide{' '}\n <a href={this.link} target=\"_blank\">\n feedback\n </a>{' '}\n to help us improve it\n </span>\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-a64d8966.js';
|
|
2
|
+
|
|
3
|
+
const progressBarCss = "progress.sc-admiralty-progress-bar{appearance:none;background:#eeeeee;border:none;box-sizing:border-box;color:#09315b;display:inline-block;font-size:18px;flex:1;height:1em;width:100%}progress[value].error.sc-admiralty-progress-bar::-webkit-progress-value{background-color:#e20d0d}progress[value].sc-admiralty-progress-bar::-webkit-progress-value{background-color:#47a234}";
|
|
4
|
+
|
|
5
|
+
const ProgressBarComponent = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.id = `admiralty-progress-${++progressId}`;
|
|
9
|
+
this.label = undefined;
|
|
10
|
+
this.progression = 0;
|
|
11
|
+
this.error = false;
|
|
12
|
+
this.progressionValue = this.progression;
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
const { id, label, error, progressionValue } = this;
|
|
16
|
+
return (h("div", { class: "admiralty-progress" }, label ? h("admiralty-label", { for: id }, label) : null, h("progress", { id: id, class: { error: error }, value: progressionValue, max: "100" })));
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
let progressId = 0;
|
|
20
|
+
ProgressBarComponent.style = progressBarCss;
|
|
21
|
+
|
|
22
|
+
export { ProgressBarComponent as admiralty_progress_bar };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=admiralty-progress-bar.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"admiralty-progress-bar.entry.js","mappings":";;AAAA,MAAM,cAAc,GAAG,qXAAqX;;MCO/X,oBAAoB;;;IACvB,OAAE,GAAG,sBAAsB,EAAE,UAAU,EAAE,CAAC;;uBASpB,CAAC;iBAKN,KAAK;4BAKM,IAAI,CAAC,WAAW;;EAEpD,MAAM;IACJ,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAC;IAEpD,QACE,WAAK,KAAK,EAAC,oBAAoB,IAC5B,KAAK,GAAG,uBAAiB,GAAG,EAAE,EAAE,IAAG,KAAK,CAAmB,GAAG,IAAI,EACnE,gBAAU,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAC,KAAK,GAAG,CAC5E,EACN;GACH;;AAGH,IAAI,UAAU,GAAG,CAAC,CAAC;;;;;","names":[],"sources":["./src/components/progress-bar/progress-bar.scss?tag=admiralty-progress-bar&encapsulation=scoped","./src/components/progress-bar/progress-bar.tsx"],"sourcesContent":["@use \"../../scss/vars/colours\" as colours;\r\n\r\nprogress {\r\n appearance: none;\r\n background: colours.$colour-button-secondary-hover;\r\n border: none;\r\n box-sizing: border-box;\r\n color: colours.$colour-admiralty-blue;\r\n display: inline-block;\r\n font-size: 18px;\r\n flex: 1;\r\n height: 1em;\r\n width: 100%;\r\n\r\n &[value].error::-webkit-progress-value {\r\n background-color: colours.$colour-utility-error;\r\n }\r\n\r\n &[value]::-webkit-progress-value {\r\n background-color: colours.$colour-utility-success;\r\n }\r\n}\r\n","import { Component, h, Prop, State } from '@stencil/core';\n\n@Component({\n tag: 'admiralty-progress-bar',\n styleUrl: 'progress-bar.scss',\n scoped: true,\n})\nexport class ProgressBarComponent {\n private id = `admiralty-progress-${++progressId}`;\n\n /**\n * If set, adds a label above the progress bar\n */\n @Prop() label?: string;\n\n /** * A value from 0 - 100 that visually represents the current progression\n */\n @Prop() progression: number = 0;\n\n /**\n * Set to true to indicate an error (turns the progress bar red)\n */\n @Prop() error: boolean = false;\n\n /**\n * Progress value, min:0, max: 100\n */\n @State() progressionValue: number = this.progression;\n\n render() {\n const { id, label, error, progressionValue } = this;\n\n return (\n <div class=\"admiralty-progress\">\n {label ? <admiralty-label for={id}>{label}</admiralty-label> : null}\n <progress id={id} class={{ error: error }} value={progressionValue} max=\"100\" />\n </div>\n );\n }\n}\n\nlet progressId = 0;\n"],"version":3}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a64d8966.js';
|
|
2
|
+
|
|
3
|
+
const radioGroupCss = ".radio-group.sc-admiralty-radio-group{display:flex;flex-direction:row}.radio-group.sc-admiralty-radio-group-s>*,.radio-group .sc-admiralty-radio-group-s>*{margin-right:2em !important}.stack.sc-admiralty-radio-group{flex-direction:column}.stack.sc-admiralty-radio-group-s>*,.stack .sc-admiralty-radio-group-s>*{margin-bottom:10px !important}";
|
|
4
|
+
|
|
5
|
+
const RadioGroupComponent = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.radioChange = createEvent(this, "radioChange", 7);
|
|
9
|
+
this.inputId = `admiralty-rg-${radioGroupIds++}`;
|
|
10
|
+
this.setRadioTabindex = (value) => {
|
|
11
|
+
const radios = this.getRadios();
|
|
12
|
+
// Get the first radio that is not disabled and the checked one
|
|
13
|
+
const first = radios.find(radio => !radio.disabled);
|
|
14
|
+
const checked = radios.find(radio => radio.value === value && !radio.disabled);
|
|
15
|
+
if (!first && !checked) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
// If an enabled checked radio exists, set it to be the focusable radio
|
|
19
|
+
// otherwise we default to focus the first radio
|
|
20
|
+
const focusable = checked || first;
|
|
21
|
+
for (const radio of radios) {
|
|
22
|
+
const tabindex = radio === focusable ? 0 : -1;
|
|
23
|
+
radio.setButtonTabindex(tabindex);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
this.onClick = (e) => {
|
|
27
|
+
const selectedRadio = e.target && e.target.closest('admiralty-radio');
|
|
28
|
+
if (selectedRadio) {
|
|
29
|
+
const currentValue = this.value;
|
|
30
|
+
const newValue = selectedRadio.value;
|
|
31
|
+
if (newValue !== currentValue) {
|
|
32
|
+
this.value = newValue;
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
this.value = undefined;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
this.name = this.inputId;
|
|
40
|
+
this.value = undefined;
|
|
41
|
+
this.displayVertical = false;
|
|
42
|
+
}
|
|
43
|
+
valueChanged(value) {
|
|
44
|
+
this.setRadioTabindex(value);
|
|
45
|
+
this.radioChange.emit({ value });
|
|
46
|
+
}
|
|
47
|
+
componentDidLoad() {
|
|
48
|
+
this.setRadioTabindex(this.value);
|
|
49
|
+
}
|
|
50
|
+
getRadios() {
|
|
51
|
+
return Array.from(this.el.querySelectorAll('admiralty-radio'));
|
|
52
|
+
}
|
|
53
|
+
render() {
|
|
54
|
+
const { displayVertical } = this;
|
|
55
|
+
return (h(Host, null, h("div", { class: { 'radio-group': true, 'stack': displayVertical }, role: "radiogroup", onClick: this.onClick }, h("slot", null))));
|
|
56
|
+
}
|
|
57
|
+
get el() { return getElement(this); }
|
|
58
|
+
static get watchers() { return {
|
|
59
|
+
"value": ["valueChanged"]
|
|
60
|
+
}; }
|
|
61
|
+
};
|
|
62
|
+
let radioGroupIds = 0;
|
|
63
|
+
RadioGroupComponent.style = radioGroupCss;
|
|
64
|
+
|
|
65
|
+
export { RadioGroupComponent as admiralty_radio_group };
|
|
66
|
+
|
|
67
|
+
//# sourceMappingURL=admiralty-radio-group.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"admiralty-radio-group.entry.js","mappings":";;AAAA,MAAM,aAAa,GAAG,sVAAsV;;MCO/V,mBAAmB;;;;IACtB,YAAO,GAAG,gBAAgB,aAAa,EAAE,EAAE,CAAC;IAmC5C,qBAAgB,GAAG,CAAC,KAAsB;MAChD,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;;MAGhC,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;MACpD,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;MAE/E,IAAI,CAAC,KAAK,IAAI,CAAC,OAAO,EAAE;QACtB,OAAO;OACR;;;MAID,MAAM,SAAS,GAAG,OAAO,IAAI,KAAK,CAAC;MAEnC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;QAC1B,MAAM,QAAQ,GAAG,KAAK,KAAK,SAAS,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QAC9C,KAAK,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;OACnC;KACF,CAAC;IAKM,YAAO,GAAG,CAAC,CAAQ;MACzB,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,IAAK,CAAC,CAAC,MAAsB,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;MAEvF,IAAI,aAAa,EAAE;QACjB,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC;QAChC,MAAM,QAAQ,GAAG,aAAa,CAAC,KAAK,CAAC;QAErC,IAAI,QAAQ,KAAK,YAAY,EAAE;UAC7B,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC;SACvB;aAAM;UACL,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;SACxB;OACF;KACF,CAAC;gBAjEqB,IAAI,CAAC,OAAO;;2BAUA,KAAK;;EAGxC,YAAY,CAAC,KAAU;IACrB,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAE7B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;GAClC;EAOD,gBAAgB;IACd,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;GACnC;EAuBO,SAAS;IACf,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,CAAC;GAChE;EAgBD,MAAM;IACJ,MAAM,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC;IAEjC,QACE,EAAC,IAAI,QACH,WAAK,KAAK,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,OAAO,EAAE,eAAe,EAAE,EAAE,IAAI,EAAC,YAAY,EAAC,OAAO,EAAE,IAAI,CAAC,OAAO,IACpG,eAAa,CACT,CACD,EACP;GACH;;;;;;AAGH,IAAI,aAAa,GAAW,CAAC,CAAC;;;;;","names":[],"sources":["./src/components/radio-group/radio-group.scss?tag=admiralty-radio-group&encapsulation=scoped","./src/components/radio-group/radio-group.tsx"],"sourcesContent":[".radio-group {\r\n display: flex;\r\n flex-direction: row;\r\n\r\n ::slotted(*) {\r\n margin-right: 2em !important;\r\n }\r\n}\r\n\r\n.stack {\r\n flex-direction: column;\r\n\r\n ::slotted(*) {\r\n margin-bottom: 10px !important;\r\n }\r\n}\r\n\r\n","import { Component, Host, h, Prop, Element, Event, EventEmitter, ComponentInterface, Watch } from '@stencil/core';\n\n@Component({\n tag: 'admiralty-radio-group',\n styleUrl: 'radio-group.scss',\n scoped: true,\n})\nexport class RadioGroupComponent implements ComponentInterface {\n private inputId = `admiralty-rg-${radioGroupIds++}`;\n\n @Element() el!: HTMLElement;\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 * The value of the radio group\n */\n @Prop({ mutable: true }) value: any | null;\n\n /**\n * Setting this true displays the radio options vertically (defaults to false)\n */\n @Prop() displayVertical: boolean = false;\n\n @Watch('value')\n valueChanged(value: any) {\n this.setRadioTabindex(value);\n\n this.radioChange.emit({ value });\n }\n\n /**\n * Event fired when the checked radio button changes\n */\n @Event() radioChange: EventEmitter<any>;\n\n componentDidLoad(): void {\n this.setRadioTabindex(this.value);\n }\n\n private setRadioTabindex = (value: any | undefined) => {\n const radios = this.getRadios();\n\n // Get the first radio that is not disabled and the checked one\n const first = radios.find(radio => !radio.disabled);\n const checked = radios.find(radio => radio.value === value && !radio.disabled);\n\n if (!first && !checked) {\n return;\n }\n\n // If an enabled checked radio exists, set it to be the focusable radio\n // otherwise we default to focus the first radio\n const focusable = checked || first;\n\n for (const radio of radios) {\n const tabindex = radio === focusable ? 0 : -1;\n radio.setButtonTabindex(tabindex);\n }\n };\n\n private getRadios(): any {\n return Array.from(this.el.querySelectorAll('admiralty-radio'));\n }\n private onClick = (e: Event) => {\n const selectedRadio = e.target && (e.target as HTMLElement).closest('admiralty-radio');\n\n if (selectedRadio) {\n const currentValue = this.value;\n const newValue = selectedRadio.value;\n\n if (newValue !== currentValue) {\n this.value = newValue;\n } else {\n this.value = undefined;\n }\n }\n };\n\n render() {\n const { displayVertical } = this;\n\n return (\n <Host>\n <div class={{ 'radio-group': true, 'stack': displayVertical }} role=\"radiogroup\" onClick={this.onClick}>\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n\nlet radioGroupIds: number = 0;\n"],"version":3}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a64d8966.js';
|
|
2
|
+
|
|
3
|
+
const radioCss = ".admiralty-radio.sc-admiralty-radio input.sc-admiralty-radio{appearance:none;border:2px solid #09315b;border-radius:1rem;height:1.5rem;width:1.5rem;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;margin-right:18px}.admiralty-radio.sc-admiralty-radio input.sc-admiralty-radio:checked:after{border-radius:100%;background-color:#09315b;width:0.8rem;height:0.8rem;content:\" \"}.admiralty-radio.sc-admiralty-radio input.sc-admiralty-radio:disabled{border:2px solid #adadad}.admiralty-radio.sc-admiralty-radio input.sc-admiralty-radio:focus{outline:3px solid #ffdd00;outline-offset:0}.admiralty-radio.sc-admiralty-radio label.sc-admiralty-radio{font-family:\"JohnstonITC\", Helvetica, sans-serif;font-weight:300;position:relative;top:2px}";
|
|
4
|
+
|
|
5
|
+
const RadioComponent = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.admiraltyFocus = createEvent(this, "admiraltyFocus", 7);
|
|
9
|
+
this.admiraltyBlur = createEvent(this, "admiraltyBlur", 7);
|
|
10
|
+
this.inputId = `admiralty-radio-${radioButtonIds++}`;
|
|
11
|
+
this.radioGroup = null;
|
|
12
|
+
this.updateState = () => {
|
|
13
|
+
if (this.radioGroup) {
|
|
14
|
+
this.checked = this.radioGroup.value === this.value;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
this.onClick = () => {
|
|
18
|
+
this.checked = this.nativeInput.checked;
|
|
19
|
+
};
|
|
20
|
+
this.onFocus = () => {
|
|
21
|
+
this.admiraltyFocus.emit();
|
|
22
|
+
};
|
|
23
|
+
this.onBlur = () => {
|
|
24
|
+
this.admiraltyBlur.emit();
|
|
25
|
+
};
|
|
26
|
+
this.buttonTabindex = -1;
|
|
27
|
+
this.name = this.inputId;
|
|
28
|
+
this.value = undefined;
|
|
29
|
+
this.disabled = false;
|
|
30
|
+
this.checked = false;
|
|
31
|
+
}
|
|
32
|
+
connectedCallback() {
|
|
33
|
+
if (this.value === undefined) {
|
|
34
|
+
this.value = this.inputId;
|
|
35
|
+
}
|
|
36
|
+
const radioGroup = (this.radioGroup = this.el.closest('admiralty-radio-group'));
|
|
37
|
+
if (radioGroup) {
|
|
38
|
+
this.updateState();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/** @internal */
|
|
42
|
+
async setButtonTabindex(value) {
|
|
43
|
+
this.buttonTabindex = value;
|
|
44
|
+
}
|
|
45
|
+
render() {
|
|
46
|
+
const { buttonTabindex, checked, disabled, inputId, name, value } = this;
|
|
47
|
+
return (h(Host, null, h("div", { class: "admiralty-radio" }, h("input", { "aria-checked": `${checked}`, "aria-hidden": disabled ? 'true' : null, "aria-labelledby": inputId, id: inputId, name: name, tabindex: buttonTabindex, onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.onClick, class: "admiralty-radio", type: "radio", value: value, checked: checked, disabled: disabled ? true : null, ref: nativeEl => (this.nativeInput = nativeEl) }), h("label", { htmlFor: inputId }, h("slot", null)))));
|
|
48
|
+
}
|
|
49
|
+
get el() { return getElement(this); }
|
|
50
|
+
static get watchers() { return {
|
|
51
|
+
"checked": ["render"],
|
|
52
|
+
"disabled": ["render"]
|
|
53
|
+
}; }
|
|
54
|
+
};
|
|
55
|
+
let radioButtonIds = 0;
|
|
56
|
+
RadioComponent.style = radioCss;
|
|
57
|
+
|
|
58
|
+
export { RadioComponent as admiralty_radio };
|
|
59
|
+
|
|
60
|
+
//# sourceMappingURL=admiralty-radio.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"admiralty-radio.entry.js","mappings":";;AAAA,MAAM,QAAQ,GAAG,mwBAAmwB;;MCOvwB,cAAc;;;;;IACjB,YAAO,GAAG,mBAAmB,cAAc,EAAE,EAAE,CAAC;IAEhD,eAAU,GAA0C,IAAI,CAAC;IAuDzD,gBAAW,GAAG;MACpB,IAAI,IAAI,CAAC,UAAU,EAAE;QACnB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC;OACrD;KACF,CAAC;IAEM,YAAO,GAAG;MAChB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;KACzC,CAAC;IAEM,YAAO,GAAG;MAChB,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;KAC5B,CAAC;IAEM,WAAM,GAAG;MACf,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;KAC3B,CAAC;0BA/DwB,CAAC,CAAC;gBAKL,IAAI,CAAC,OAAO;;oBAQN,KAAK;mBAKW,KAAK;;EAYlD,iBAAiB;IACf,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE;MAC5B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC;KAC3B;IACD,MAAM,UAAU,IAAI,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC,CAAC;IAEhF,IAAI,UAAU,EAAE;MACd,IAAI,CAAC,WAAW,EAAE,CAAC;KACpB;GACF;;EAID,MAAM,iBAAiB,CAAC,KAAa;IACnC,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;GAC7B;EAsBD,MAAM;IACJ,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IAEzE,QACE,EAAC,IAAI,QACH,WAAK,KAAK,EAAC,iBAAiB,IAC1B,6BACgB,GAAG,OAAO,EAAE,iBACb,QAAQ,GAAG,MAAM,GAAG,IAAI,qBACpB,OAAO,EACxB,EAAE,EAAE,OAAO,EACX,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,KAAK,EAAC,iBAAiB,EACvB,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,GAAG,IAAI,GAAG,IAAI,EAChC,GAAG,EAAE,QAAQ,KAAK,IAAI,CAAC,WAAW,GAAG,QAA4B,CAAC,GAClE,EACF,aAAO,OAAO,EAAE,OAAO,IACrB,eAAQ,CACF,CACJ,CACD,EACP;GACH;;;;;;;AAGH,IAAI,cAAc,GAAG,CAAC,CAAC;;;;;","names":[],"sources":["./src/components/radio/radio.scss?tag=admiralty-radio&encapsulation=scoped","./src/components/radio/radio.tsx"],"sourcesContent":["@use \"../../scss/vars/colours\" as colours;\n@use \"../../scss/vars/typography\" as typography;\n\n.admiralty-radio {\n input {\n appearance: none;\n border: 2px solid colours.$colour-admiralty-blue;\n border-radius: 1rem;\n height: 1.5rem;\n width: 1.5rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n vertical-align: middle;\n margin-right: 18px;\n\n &:checked:after {\n border-radius: 100%;\n background-color: colours.$colour-admiralty-blue;\n width: .8rem;\n height: .8rem;\n content: \" \";\n }\n\n &:disabled {\n border: 2px solid colours.$colour-textinput-text-disabled;\n }\n\n &:focus {\n outline: 3px solid colours.$colour-utility-focus;\n outline-offset: 0;\n }\n }\n\n label {\n font-family: typography.$font-family;\n font-weight: typography.$font-weight-light;\n position: relative;\n top: 2px;\n }\n}\n","import { Element, Component, Event, h, Prop, Watch, Host, State, Method, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'admiralty-radio',\n styleUrl: 'radio.scss',\n scoped: true,\n})\nexport class RadioComponent {\n private inputId = `admiralty-radio-${radioButtonIds++}`;\n private nativeInput!: HTMLInputElement;\n private radioGroup: HTMLAdmiraltyRadioGroupElement | null = null;\n\n @Element() el!: HTMLElement;\n\n /**\n * The tabindex of the radio button.\n * @internal\n */\n @State() buttonTabindex = -1;\n\n /**\n * The name of the radio button for use on selection within a radio group\n */\n @Prop() name: string = this.inputId;\n /**\n * The value of the radio button for use on selection within a radio group\n */\n @Prop({ mutable: true }) value: string | null;\n /**\n * Determines whether the radio button is disabled. A button in disabled state will not fire click output events.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * Determines whether the radio button is selected (or checked)\n */\n @Prop({ mutable: true }) checked?: boolean = false;\n\n /**\n * Emitted when the radio button gains focus.\n */\n @Event() admiraltyFocus!: EventEmitter<void>;\n\n /**\n * Emitted when the radio button loses focus.\n */\n @Event() admiraltyBlur!: EventEmitter<void>;\n\n connectedCallback() {\n if (this.value === undefined) {\n this.value = this.inputId;\n }\n const radioGroup = (this.radioGroup = this.el.closest('admiralty-radio-group'));\n\n if (radioGroup) {\n this.updateState();\n }\n }\n\n /** @internal */\n @Method()\n async setButtonTabindex(value: number) {\n this.buttonTabindex = value;\n }\n\n private updateState = () => {\n if (this.radioGroup) {\n this.checked = this.radioGroup.value === this.value;\n }\n };\n\n private onClick = () => {\n this.checked = this.nativeInput.checked;\n };\n\n private onFocus = () => {\n this.admiraltyFocus.emit();\n };\n\n private onBlur = () => {\n this.admiraltyBlur.emit();\n };\n\n @Watch('checked')\n @Watch('disabled')\n render() {\n const { buttonTabindex, checked, disabled, inputId, name, value } = this;\n\n return (\n <Host>\n <div class=\"admiralty-radio\">\n <input\n aria-checked={`${checked}`}\n aria-hidden={disabled ? 'true' : null}\n aria-labelledby={inputId}\n id={inputId}\n name={name}\n tabindex={buttonTabindex}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onClick={this.onClick}\n class=\"admiralty-radio\"\n type=\"radio\"\n value={value}\n checked={checked}\n disabled={disabled ? true : null}\n ref={nativeEl => (this.nativeInput = nativeEl as HTMLInputElement)}\n />\n <label htmlFor={inputId}>\n <slot />\n </label>\n </div>\n </Host>\n );\n }\n}\n\nlet radioButtonIds = 0;\n"],"version":3}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a64d8966.js';
|
|
2
|
+
|
|
3
|
+
const selectCss = ".disabled{color:#adadad}.select-wrapper{position:relative}admiralty-icon{font-size:24px;font-weight:normal;pointer-events:none;position:absolute;right:12px;top:12px}select{appearance:none;background-color:#ffffff;border:2px solid #333333;box-sizing:border-box;color:#333333;font-family:\"JohnstonITC\", Helvetica, sans-serif;font-size:18px;line-height:24px;margin-bottom:6px;position:relative;font-weight:300;padding:12px;width:100%}select.error{border-color:#e20d0d}select:focus-visible{outline:3px solid #ffdd00;box-shadow:inset 0 0 0 2px #333333}select.disabled{border-color:#adadad}";
|
|
4
|
+
|
|
5
|
+
const SelectComponent = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.admiraltyChange = createEvent(this, "admiraltyChange", 7);
|
|
9
|
+
this.admiraltyBlur = createEvent(this, "admiraltyBlur", 7);
|
|
10
|
+
this.id = `admiralty-select-${++nextId}`;
|
|
11
|
+
this.disabled = false;
|
|
12
|
+
this.error = false;
|
|
13
|
+
this.errorHint = null;
|
|
14
|
+
this.hint = null;
|
|
15
|
+
this.label = 'Choose a colour';
|
|
16
|
+
this.width = undefined;
|
|
17
|
+
}
|
|
18
|
+
componentWillRender() {
|
|
19
|
+
this.getOptions();
|
|
20
|
+
}
|
|
21
|
+
handleSelect(event) {
|
|
22
|
+
this.admiraltyChange.emit(event.target);
|
|
23
|
+
}
|
|
24
|
+
handleBlur(_event) {
|
|
25
|
+
this.admiraltyBlur.emit();
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Summary. gets the options passed the user passes through the slots and
|
|
29
|
+
* extracs the text and value
|
|
30
|
+
*/
|
|
31
|
+
getOptions() {
|
|
32
|
+
const slotOptions = this.el.querySelectorAll('option');
|
|
33
|
+
const options = [];
|
|
34
|
+
// grab all the data from the slot and extract the data to be inserted into the template
|
|
35
|
+
slotOptions.forEach(slot => {
|
|
36
|
+
// remove the slotted option to keep the shadowDom clean
|
|
37
|
+
slot.remove();
|
|
38
|
+
options.push({
|
|
39
|
+
text: slot.text,
|
|
40
|
+
value: slot.value,
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
this.options = options;
|
|
44
|
+
}
|
|
45
|
+
render() {
|
|
46
|
+
const { disabled, error, errorHint, hint, id, label } = this;
|
|
47
|
+
const disabledClass = disabled ? 'disabled' : '';
|
|
48
|
+
return (h(Host, null, h("div", { class: `admiralty-select ${disabledClass}` }, h("admiralty-label", { for: id }, label), h("admiralty-hint", null, hint), h("div", { class: "select-wrapper", style: this.width ? { maxWidth: `${this.width}px` } : {} }, h("select", { id: id, class: { 'admiralty-form-control': true, 'error': error, 'disabled': disabled }, "aria-disabled": disabled ? 'true' : 'false', "aria-label": label, onChange: event => this.handleSelect(event), onBlur: event => this.handleBlur(event), disabled: disabled }, this.options.map(option => (h("option", { value: option.value }, option.text)))), h("admiralty-icon", { class: `select-down-icon ${disabledClass}`, "icon-name": "angle-down" })), this.error ? h("admiralty-input-error", null, errorHint) : '')));
|
|
49
|
+
}
|
|
50
|
+
get el() { return getElement(this); }
|
|
51
|
+
};
|
|
52
|
+
let nextId = 0;
|
|
53
|
+
SelectComponent.style = selectCss;
|
|
54
|
+
|
|
55
|
+
export { SelectComponent as admiralty_select };
|
|
56
|
+
|
|
57
|
+
//# sourceMappingURL=admiralty-select.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"admiralty-select.entry.js","mappings":";;AAAA,MAAM,SAAS,GAAG,4kBAA4kB;;MCQjlB,eAAe;;;;;IAE1B,OAAE,GAAW,oBAAoB,EAAE,MAAM,EAAE,CAAC;oBAIhB,KAAK;iBAIR,KAAK;qBAIF,IAAI;gBAIT,IAAI;iBAIH,iBAAiB;;;EAczC,mBAAmB;IACjB,IAAI,CAAC,UAAU,EAAE,CAAC;GACnB;EAID,YAAY,CAAC,KAAY;IACvB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;GACzC;EAED,UAAU,CAAC,MAAkB;IAC3B,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;GAC3B;;;;;EAMD,UAAU;IACR,MAAM,WAAW,GAAG,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACvD,MAAM,OAAO,GAAG,EAAE,CAAC;;IAGnB,WAAW,CAAC,OAAO,CAAC,IAAI;;MAEtB,IAAI,CAAC,MAAM,EAAE,CAAC;MAEd,OAAO,CAAC,IAAI,CAAC;QACX,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,KAAK,EAAE,IAAI,CAAC,KAAK;OAClB,CAAC,CAAC;KACJ,CAAC,CAAC;IAEH,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;GACxB;EAED,MAAM;IACJ,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IAC7D,MAAM,aAAa,GAAG,QAAQ,GAAG,UAAU,GAAG,EAAE,CAAC;IAEjD,QACE,EAAC,IAAI,QACH,WAAK,KAAK,EAAE,oBAAoB,aAAa,EAAE,IAC7C,uBAAiB,GAAG,EAAE,EAAE,IAAG,KAAK,CAAmB,EACnD,0BAAiB,IAAI,CAAkB,EACvC,WAAK,KAAK,EAAC,gBAAgB,EAAC,KAAK,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,GAAG,EAAE,IAClF,cACE,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,EAAE,wBAAwB,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,mBAChE,QAAQ,GAAG,MAAM,GAAG,OAAO,gBAC9B,KAAK,EACjB,QAAQ,EAAE,KAAK,IAAI,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,EAC3C,MAAM,EAAE,KAAK,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EACvC,QAAQ,EAAE,QAAQ,IAEjB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,KACtB,cAAQ,KAAK,EAAE,MAAM,CAAC,KAAK,IAAG,MAAM,CAAC,IAAI,CAAU,CACpD,CAAC,CACK,EACT,sBAAgB,KAAK,EAAE,oBAAoB,aAAa,EAAE,eAAY,YAAY,GAAkB,CAChG,EACL,IAAI,CAAC,KAAK,GAAG,iCAAwB,SAAS,CAAyB,GAAG,EAAE,CACzE,CACD,EACP;GACH;;;AAGH,IAAI,MAAM,GAAG,CAAC,CAAC;;;;;","names":[],"sources":["./src/components/select/select.scss?tag=admiralty-select&encapsulation=shadow","./src/components/select/select.tsx"],"sourcesContent":["@use \"../../scss/vars/colours\";\n@use \"../../scss/vars/typography\";\n\n.disabled {\n color: colours.$colour-textinput-text-disabled;\n}\n\n.select-wrapper {\n position: relative;\n}\n\nadmiralty-icon {\n font-size: 24px;\n font-weight: typography.$font-weight-medium;\n pointer-events: none;\n position: absolute;\n right: 12px;\n top: 12px;\n}\n\n\nselect {\n appearance: none;\n background-color: colours.$colour-white;\n border: 2px solid colours.$colour-text;\n box-sizing: border-box;\n color: colours.$colour-text;\n font-family: typography.$font-family;\n font-size: typography.$font-size-normal;\n line-height: 24px;\n margin-bottom: 6px;\n position: relative;\n font-weight: typography.$font-weight-light;\n padding: 12px;\n width: 100%;\n\n &.error {\n border-color: colours.$colour-utility-error;\n }\n\n &:focus-visible {\n outline: 3px solid colours.$colour-utility-focus;\n box-shadow: inset 0 0 0 2px colours.$colour-text;\n }\n\n &.disabled {\n border-color: colours.$colour-textinput-text-disabled;\n }\n}\n\n\n","import { Component, Event, Prop, Element, EventEmitter, h, Host } from '@stencil/core';\nimport { UKHOOptions } from './select.types';\n\n@Component({\n tag: 'admiralty-select',\n styleUrl: 'select.scss',\n shadow: true,\n})\nexport class SelectComponent {\n @Element() el: HTMLElement;\n id: string = `admiralty-select-${++nextId}`;\n /**\n * If `true`, the user cannot interact with the select.\n */\n @Prop() disabled: boolean = false;\n /**\n * If 'true', the 'error' class is added to suggest an error\n */\n @Prop() error: boolean = false;\n /**\n * The hint that is used to inform the user of an error (displayed below the select box)\n */\n @Prop() errorHint: string = null;\n /**\n * The text that will be used as a field label.\n */\n @Prop() hint: string = null;\n /**\n * The text that will be used as a field label.\n */\n @Prop() label: string = 'Choose a colour';\n /**\n * The maximum width (px) for the input field.\n */\n @Prop() width?: number;\n /**\n * Emitted when the value has changed.\n */\n @Event() admiraltyChange: EventEmitter<EventTarget>;\n /**\n * Emitted when the component loses focus.\n */\n @Event() admiraltyBlur: EventEmitter<void>;\n\n componentWillRender() {\n this.getOptions();\n }\n\n options: Array<UKHOOptions>;\n\n handleSelect(event: Event) {\n this.admiraltyChange.emit(event.target);\n }\n\n handleBlur(_event: FocusEvent): void {\n this.admiraltyBlur.emit();\n }\n\n /**\n * Summary. gets the options passed the user passes through the slots and\n * extracs the text and value\n */\n getOptions() {\n const slotOptions = this.el.querySelectorAll('option');\n const options = [];\n\n // grab all the data from the slot and extract the data to be inserted into the template\n slotOptions.forEach(slot => {\n // remove the slotted option to keep the shadowDom clean\n slot.remove();\n\n options.push({\n text: slot.text,\n value: slot.value,\n });\n });\n\n this.options = options;\n }\n\n render() {\n const { disabled, error, errorHint, hint, id, label } = this;\n const disabledClass = disabled ? 'disabled' : '';\n\n return (\n <Host>\n <div class={`admiralty-select ${disabledClass}`}>\n <admiralty-label for={id}>{label}</admiralty-label>\n <admiralty-hint>{hint}</admiralty-hint>\n <div class=\"select-wrapper\" style={this.width ? { maxWidth: `${this.width}px` } : {}}>\n <select\n id={id}\n class={{ 'admiralty-form-control': true, 'error': error, 'disabled': disabled }}\n aria-disabled={disabled ? 'true' : 'false'}\n aria-label={label}\n onChange={event => this.handleSelect(event)}\n onBlur={event => this.handleBlur(event)}\n disabled={disabled}\n >\n {this.options.map(option => (\n <option value={option.value}>{option.text}</option>\n ))}\n </select>\n <admiralty-icon class={`select-down-icon ${disabledClass}`} icon-name=\"angle-down\"></admiralty-icon>\n </div>\n {this.error ? <admiralty-input-error>{errorHint}</admiralty-input-error> : ''}\n </div>\n </Host>\n );\n }\n}\n\nlet nextId = 0;\n"],"version":3}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-a64d8966.js';
|
|
2
|
+
|
|
3
|
+
const sideNavItemCss = "@media (max-width: 1023px){.desktop-only.sc-admiralty-side-nav-item{display:none}}@media (min-width: 1024px){.not-desktop.sc-admiralty-side-nav-item{display:none}}@media (min-width: 1024px){.tablet-only.sc-admiralty-side-nav-item{display:none}}@media (max-width: 479px) and (min-width: 0px){.tablet-only.sc-admiralty-side-nav-item{display:none}}@media (max-width: 479px) and (min-width: 0px){.tablet-or-desktop.sc-admiralty-side-nav-item{display:none}}@media (min-width: 1024px){.phone-or-tablet.sc-admiralty-side-nav-item{display:none}}@media (min-width: 1024px){.phone-only.sc-admiralty-side-nav-item{display:none}}@media (max-width: 1023px) and (min-width: 480px){.phone-only.sc-admiralty-side-nav-item{display:none}}a.section.sc-admiralty-side-nav-item{cursor:pointer;padding:0px 10px;display:flex;flex-direction:column;justify-content:center;height:42px;max-width:fit-content;box-sizing:border-box;user-select:none;text-align:center;text-decoration:none;color:#09315b;font-weight:normal;font-size:16px}a.section.sc-admiralty-side-nav-item:hover{background-color:#f0f0f0}a.section.sc-admiralty-side-nav-item:focus{outline-offset:-2px}a.section.navActive.sc-admiralty-side-nav-item{background-color:#09315b;color:#ffffff}";
|
|
4
|
+
|
|
5
|
+
const SideNavItemComponent = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.sideNavItemSelected = createEvent(this, "sideNavItemSelected", 7);
|
|
9
|
+
this.sideNavItemId = undefined;
|
|
10
|
+
this.headingTitle = undefined;
|
|
11
|
+
this.navActive = false;
|
|
12
|
+
}
|
|
13
|
+
handleClickAction() {
|
|
14
|
+
this.emitSideNavItemSelected();
|
|
15
|
+
}
|
|
16
|
+
handleKeyUpAction(ev) {
|
|
17
|
+
if (ev.key === 'Enter') {
|
|
18
|
+
this.emitSideNavItemSelected();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
emitSideNavItemSelected() {
|
|
22
|
+
this.sideNavItemSelected.emit(this.sideNavItemId);
|
|
23
|
+
}
|
|
24
|
+
render() {
|
|
25
|
+
return (h("a", { class: {
|
|
26
|
+
section: true,
|
|
27
|
+
navActive: this.navActive,
|
|
28
|
+
}, tabindex: "0", role: "button", onClick: this.handleClickAction.bind(this), onKeyUp: this.handleKeyUpAction.bind(this) }, this.headingTitle));
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
SideNavItemComponent.style = sideNavItemCss;
|
|
32
|
+
|
|
33
|
+
export { SideNavItemComponent as admiralty_side_nav_item };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=admiralty-side-nav-item.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"admiralty-side-nav-item.entry.js","mappings":";;AAAA,MAAM,cAAc,GAAG,0sCAA0sC;;MCOptC,oBAAoB;;;;;;qBAiBF,KAAK;;EAOlC,iBAAiB;IACf,IAAI,CAAC,uBAAuB,EAAE,CAAC;GAChC;EAED,iBAAiB,CAAC,EAAiB;IACjC,IAAI,EAAE,CAAC,GAAG,KAAK,OAAO,EAAE;MACtB,IAAI,CAAC,uBAAuB,EAAE,CAAC;KAChC;GACF;EAED,uBAAuB;IACrB,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;GACnD;EAED,MAAM;IACJ,QACE,SACE,KAAK,EAAE;QACL,OAAO,EAAE,IAAI;QACb,SAAS,EAAE,IAAI,CAAC,SAAS;OAC1B,EACD,QAAQ,EAAC,GAAG,EACZ,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,EAC1C,OAAO,EAAE,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,IAEzC,IAAI,CAAC,YAAY,CAChB,EACJ;GACH;;;;;;","names":[],"sources":["./src/components/side-nav-item/side-nav-item.scss?tag=admiralty-side-nav-item&encapsulation=scoped","./src/components/side-nav-item/side-nav-item.tsx"],"sourcesContent":["@use \"../../scss/base/responsive\";\r\n@use \"../../scss/vars/colours\";\r\n\r\na.section {\r\n cursor: pointer;\r\n padding: 0px 10px;\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n height: 42px;\r\n max-width: fit-content;\r\n box-sizing: border-box;\r\n user-select: none;\r\n\r\n text-align: center;\r\n text-decoration: none;\r\n color: colours.$colour-admiralty-blue;\r\n font-weight: normal;\r\n font-size: 16px;\r\n\r\n &:hover {\r\n background-color: colours.$colour-nav-bg-hover;\r\n }\r\n\r\n &:focus {\r\n outline-offset: -2px;\r\n }\r\n\r\n &.navActive {\r\n background-color: colours.$colour-admiralty-blue;\r\n color: colours.$colour-white;\r\n }\r\n}\r\n","import { Component, Event, EventEmitter, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'admiralty-side-nav-item',\n styleUrl: 'side-nav-item.scss',\n scoped: true,\n})\nexport class SideNavItemComponent {\n /**\n * A unique id for this SideNavItem\n */\n @Prop() sideNavItemId: string;\n\n /**\n * The text that is displayed in the SideNavItem\n */\n @Prop() headingTitle: string;\n\n /**\n * Represents whether this SideNavItem is 'active'\n * and will be styled differently than SideNavItems that are not 'active'.\n * The intent behind the design for SideNav is for there to only be ONE\n * SideNavItem that is 'active' per SideNav\n */\n @Prop() navActive: boolean = false;\n\n /**\n * An event emitted when this Side Nav item is selected containing the sideNavItemId\n */\n @Event() sideNavItemSelected: EventEmitter<string>;\n\n handleClickAction() {\n this.emitSideNavItemSelected();\n }\n\n handleKeyUpAction(ev: KeyboardEvent) {\n if (ev.key === 'Enter') {\n this.emitSideNavItemSelected();\n }\n }\n\n emitSideNavItemSelected() {\n this.sideNavItemSelected.emit(this.sideNavItemId);\n }\n\n render() {\n return (\n <a\n class={{\n section: true,\n navActive: this.navActive,\n }}\n tabindex=\"0\"\n role=\"button\"\n onClick={this.handleClickAction.bind(this)}\n onKeyUp={this.handleKeyUpAction.bind(this)}\n >\n {this.headingTitle}\n </a>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index-a64d8966.js';
|
|
2
|
+
|
|
3
|
+
const SideNavWrapperComponent = class {
|
|
4
|
+
constructor(hostRef) {
|
|
5
|
+
registerInstance(this, hostRef);
|
|
6
|
+
}
|
|
7
|
+
onSideNavItemSelected(event) {
|
|
8
|
+
const sideNavItemId = event.detail;
|
|
9
|
+
const sideNav = this.el.querySelector('admiralty-side-nav');
|
|
10
|
+
const sideNavItems = sideNav.querySelectorAll('admiralty-side-nav-item');
|
|
11
|
+
sideNavItems.forEach(sideNavItem => {
|
|
12
|
+
sideNavItem.navActive = sideNavItem.sideNavItemId === sideNavItemId;
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
return (h("div", null, h("slot", null)));
|
|
17
|
+
}
|
|
18
|
+
get el() { return getElement(this); }
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { SideNavWrapperComponent as admiralty_side_nav_wrapper };
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=admiralty-side-nav-wrapper.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"admiralty-side-nav-wrapper.entry.js","mappings":";;MAWa,uBAAuB;;;;EAIlC,qBAAqB,CAAC,KAA0B;IAC9C,MAAM,aAAa,GAAW,KAAK,CAAC,MAAM,CAAC;IAC3C,MAAM,OAAO,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAC;IAC5D,MAAM,YAAY,GAAG,OAAO,CAAC,gBAAgB,CAAC,yBAAyB,CAAC,CAAC;IAEzE,YAAY,CAAC,OAAO,CAAC,WAAW;MAC9B,WAAW,CAAC,SAAS,GAAG,WAAW,CAAC,aAAa,KAAK,aAAa,CAAC;KACrE,CAAC,CAAC;GACJ;EAED,MAAM;IACJ,QACE,eACE,eAAa,CACT,EACN;GACH;;;;;;","names":[],"sources":["./src/components/side-nav/side-nav.stories.data.tsx"],"sourcesContent":["import { Component, Element, h, Listen } from '@stencil/core';\n\n/**\n * @internal\n * Wrapper for the Side Nav + Side Nav Items to demonstrate how\n * the sideNavItemSelected event can be handled and navActive can be set.\n */\n@Component({\n tag: 'admiralty-side-nav-wrapper',\n shadow: false,\n})\nexport class SideNavWrapperComponent {\n @Element() el!: HTMLElement;\n\n @Listen('sideNavItemSelected')\n onSideNavItemSelected(event: CustomEvent<string>) {\n const sideNavItemId: string = event.detail;\n const sideNav = this.el.querySelector('admiralty-side-nav');\n const sideNavItems = sideNav.querySelectorAll('admiralty-side-nav-item');\n\n sideNavItems.forEach(sideNavItem => {\n sideNavItem.navActive = sideNavItem.sideNavItemId === sideNavItemId;\n });\n }\n\n render() {\n return (\n <div>\n <slot></slot>\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-a64d8966.js';
|
|
2
|
+
|
|
3
|
+
const sideNavCss = "@media (max-width: 1023px){.desktop-only.sc-admiralty-side-nav{display:none}}@media (min-width: 1024px){.not-desktop.sc-admiralty-side-nav{display:none}}@media (min-width: 1024px){.tablet-only.sc-admiralty-side-nav{display:none}}@media (max-width: 479px) and (min-width: 0px){.tablet-only.sc-admiralty-side-nav{display:none}}@media (max-width: 479px) and (min-width: 0px){.tablet-or-desktop.sc-admiralty-side-nav{display:none}}@media (min-width: 1024px){.phone-or-tablet.sc-admiralty-side-nav{display:none}}@media (min-width: 1024px){.phone-only.sc-admiralty-side-nav{display:none}}@media (max-width: 1023px) and (min-width: 480px){.phone-only.sc-admiralty-side-nav{display:none}}nav.side-nav.sc-admiralty-side-nav{display:flex;flex-direction:column}";
|
|
4
|
+
|
|
5
|
+
const SideNavComponent = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.label = undefined;
|
|
9
|
+
}
|
|
10
|
+
render() {
|
|
11
|
+
return (h("nav", { class: "side-nav", "aria-label": this.label }, h("slot", null)));
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
SideNavComponent.style = sideNavCss;
|
|
15
|
+
|
|
16
|
+
export { SideNavComponent as admiralty_side_nav };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=admiralty-side-nav.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"admiralty-side-nav.entry.js","mappings":";;AAAA,MAAM,UAAU,GAAG,gvBAAgvB;;MCOtvB,gBAAgB;;;;;EAO3B,MAAM;IACJ,QACE,WAAK,KAAK,EAAC,UAAU,gBAAa,IAAI,CAAC,KAAK,IAC1C,eAAa,CACT,EACN;GACH;;;;;;","names":[],"sources":["./src/components/side-nav/side-nav.scss?tag=admiralty-side-nav&encapsulation=scoped","./src/components/side-nav/side-nav.tsx"],"sourcesContent":["@use \"../../scss/base/responsive\";\r\n@use \"../../scss/vars/colours\";\r\n\r\nnav.side-nav {\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n","import { Component, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'admiralty-side-nav',\n styleUrl: 'side-nav.scss',\n scoped: true,\n})\nexport class SideNavComponent {\n /**\n * A label for accessibility purposes to describe what this Side Nav navigation is for\n * e.g. Product Menu, Map Tool Menu etc.\n */\n @Prop() label: string;\n\n render() {\n return (\n <nav class=\"side-nav\" aria-label={this.label}>\n <slot></slot>\n </nav>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-a64d8966.js';
|
|
2
|
+
|
|
3
|
+
const tableBodyCss = ".sc-admiralty-table-body-h{display:table-row-group}.sc-admiralty-table-body-s>:nth-child(odd){background-color:#ffffff}.sc-admiralty-table-body-s>:nth-child(even){background-color:#eef3f4}";
|
|
4
|
+
|
|
5
|
+
const TableBody = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
return (h(Host, { role: "rowgroup" }, h("slot", null)));
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
TableBody.style = tableBodyCss;
|
|
14
|
+
|
|
15
|
+
export { TableBody as admiralty_table_body };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=admiralty-table-body.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"admiralty-table-body.entry.js","mappings":";;AAAA,MAAM,YAAY,GAAG,8LAA8L;;MCWtM,SAAS;;;;EACpB,MAAM;IACJ,QACE,EAAC,IAAI,IAAC,IAAI,EAAC,UAAU,IACnB,eAAa,CACR,EACP;GACH;;;;;;","names":[],"sources":["./src/components/table-body/table-body.scss?tag=admiralty-table-body&encapsulation=scoped","./src/components/table-body/table-body.tsx"],"sourcesContent":["@use '../../scss/vars/colours';\r\n\r\n:host {\r\n display: table-row-group;\r\n}\r\n\r\n::slotted(:nth-child(odd)) {\r\n background-color: colours.$colour-table-row-bg;\r\n}\r\n\r\n::slotted(:nth-child(even)) {\r\n background-color: colours.$colour-table-row-alt-bg;\r\n}\r\n\r\n","import { Component, Host, h } from '@stencil/core';\n\n/**\n * The table body element is a wrapper for a standard html table body and should be used to wrap rows\n * @slot - Table rows should be placed in the slot\n */\n@Component({\n tag: 'admiralty-table-body',\n styleUrl: 'table-body.scss',\n scoped: true,\n})\nexport class TableBody {\n render() {\n return (\n <Host role=\"rowgroup\">\n <slot></slot>\n </Host>\n );\n }\n}\n"],"version":3}
|