@nanoporetech-digital/components 8.0.0-alpha.6 → 8.0.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{algolia-data-CSD3I9WJ.js → algolia-data-Ck3OvAaS.js} +1 -1
- package/dist/cjs/app-globals-BRy5S0cS.js +10 -0
- package/dist/cjs/{component-store-DS6c_IIg.js → component-store-Cpxjkhrv.js} +1 -1
- package/dist/cjs/{dom-3kyE_RMm.js → dom-B0-coRX2.js} +1 -1
- package/dist/cjs/{fade-B3XUTiE5.js → fade-463IMjUb.js} +3 -3
- package/dist/cjs/{form-control-BVH0tPGy.js → form-control-OWJOOoxA.js} +1 -1
- package/dist/cjs/{fullscreen-BQdjQr7K.js → fullscreen-0yMY8mhF.js} +3 -3
- package/dist/cjs/{index-IR1lkhwT.js → index-BlC8UV0T.js} +23 -15
- package/dist/cjs/{index-yq5hsIxW.js → index-ZOnWVzxx.js} +1 -1
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/{lazyload-B8HnSPAU.js → lazyload-CnQrwJrf.js} +3 -3
- package/dist/cjs/loader.cjs.js +4 -3
- package/dist/cjs/{modal-DZVjwBg8.js → modal-DTqHsNdW.js} +1 -1
- package/dist/cjs/nano-accordion.cjs.entry.js +3 -3
- package/dist/cjs/nano-alert.cjs.entry.js +7 -7
- package/dist/cjs/nano-algolia-filter.cjs.entry.js +4 -4
- package/dist/cjs/nano-algolia-pagination.cjs.entry.js +2 -2
- package/dist/cjs/nano-algolia-results.cjs.entry.js +3 -3
- package/dist/cjs/nano-algolia.cjs.entry.js +5 -5
- package/dist/cjs/nano-animation.cjs.entry.js +3 -3
- package/dist/cjs/nano-avatar_5.cjs.entry.js +20 -18
- package/dist/cjs/nano-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/nano-card-carousel.cjs.entry.js +2 -2
- package/dist/cjs/nano-card.cjs.entry.js +1 -1
- package/dist/cjs/nano-checkbox-group.cjs.entry.js +16 -19
- package/dist/cjs/nano-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/nano-collapsible-comparison.cjs.entry.js +2 -2
- package/dist/cjs/nano-components.cjs.js +5 -4
- package/dist/cjs/nano-content-links.cjs.entry.js +1 -1
- package/dist/cjs/nano-cta.cjs.entry.js +1 -1
- package/dist/cjs/{nano-data-table-BiTzaPlZ.js → nano-data-table-fppjZGKo.js} +6 -6
- package/dist/cjs/nano-data-table.cjs.entry.js +6 -6
- package/dist/cjs/nano-datalist_3.cjs.entry.js +12 -12
- package/dist/cjs/nano-date-input.cjs.entry.js +2 -2
- package/dist/cjs/nano-date-picker_2.cjs.entry.js +19 -17
- package/dist/cjs/nano-details.cjs.entry.js +3 -3
- package/dist/cjs/nano-dialog.cjs.entry.js +8 -8
- package/dist/cjs/nano-dropdown_2.cjs.entry.js +5 -5
- package/dist/cjs/nano-feature-box.cjs.entry.js +19 -0
- package/dist/cjs/nano-field-validator.cjs.entry.js +3 -3
- package/dist/cjs/nano-file-upload.cjs.entry.js +9 -6
- package/dist/cjs/nano-footer.cjs.entry.js +1 -1
- package/dist/cjs/nano-global-nav.cjs.entry.js +2 -2
- package/dist/cjs/nano-grid-item.cjs.entry.js +1 -1
- package/dist/cjs/nano-grid_2.cjs.entry.js +3 -3
- package/dist/cjs/nano-hero.cjs.entry.js +2 -2
- package/dist/cjs/nano-icon-item.cjs.entry.js +1 -1
- package/dist/cjs/nano-icon_3.cjs.entry.js +2 -2
- package/dist/cjs/nano-in-page-nav.cjs.entry.js +3 -3
- package/dist/cjs/nano-intersection-observe.cjs.entry.js +4 -4
- package/dist/cjs/nano-masked-overflow.cjs.entry.js +7 -7
- package/dist/cjs/nano-menu-drawer.cjs.entry.js +3 -3
- package/dist/cjs/nano-more-less.cjs.entry.js +4 -4
- package/dist/cjs/nano-nav-item.cjs.entry.js +5 -5
- package/dist/cjs/nano-progress-bar.cjs.entry.js +2 -2
- package/dist/cjs/nano-range.cjs.entry.js +2 -2
- package/dist/cjs/nano-rating.cjs.entry.js +2 -2
- package/dist/cjs/nano-resize-observe.cjs.entry.js +3 -3
- package/dist/cjs/nano-slide.cjs.entry.js +2 -2
- package/dist/cjs/{nano-slides-BHsOLxRZ.js → nano-slides-BxtmLUSX.js} +16 -60
- package/dist/cjs/nano-slides.cjs.entry.js +3 -3
- package/dist/cjs/nano-sortable.cjs.entry.js +2 -2
- package/dist/cjs/nano-spinner.cjs.entry.js +1 -1
- package/dist/cjs/nano-split-pane.cjs.entry.js +2 -2
- package/dist/cjs/nano-sticker.cjs.entry.js +4 -4
- package/dist/cjs/nano-tab-content.cjs.entry.js +2 -2
- package/dist/cjs/nano-tab-group.cjs.entry.js +5 -5
- package/dist/cjs/nano-tab.cjs.entry.js +2 -2
- package/dist/cjs/nano-table.cjs.entry.js +2 -2
- package/dist/cjs/{page-dots-DJrv0V9e.js → page-dots-B2slCN6O.js} +3 -3
- package/dist/cjs/{renderer-h0yo23iy.js → renderer-BjTjwe8d.js} +1 -1
- package/dist/cjs/{scroll-_aiH0KkA.js → scroll-CtgMHKrt.js} +1 -1
- package/dist/cjs/{slot-DJxvnd35.js → slot-CoMwYflw.js} +1 -1
- package/dist/cjs/{tabbable-CkzmpQhq.js → tabbable-D33Xh_1b.js} +1 -1
- package/dist/cjs/{table.worker-DjOtTDwg.js → table.worker-CBBDTe_S.js} +6 -6
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/animation/animation.js +1 -1
- package/dist/collection/components/card/card.js +1 -0
- package/dist/collection/components/checkbox/checkbox-group.js +14 -17
- package/dist/collection/components/data-table/table.js +1 -1
- package/dist/collection/components/datalist/datalist.js +5 -5
- package/dist/collection/components/date-picker/date-picker.js +6 -6
- package/dist/collection/components/feature-box/feature-box.css +42 -0
- package/dist/collection/components/feature-box/feature-box.js +49 -0
- package/dist/collection/components/file-upload/file-upload.js +7 -4
- package/dist/collection/components/grid/grid.js +1 -1
- package/dist/collection/components/input/input.css +1 -1
- package/dist/collection/components/input/input.js +8 -6
- package/dist/collection/components/masked-overflow/masked-overflow.js +3 -3
- package/dist/collection/components/more-less/more-less.js +2 -2
- package/dist/collection/components/option/option.js +2 -2
- package/dist/collection/components/progress-bar/progress-bar.css +5 -5
- package/dist/collection/components/resize-observe/resize-observe.js +1 -1
- package/dist/collection/components/select/select.css +1 -1
- package/dist/collection/components/select/select.js +10 -8
- package/dist/collection/components/slides/lib/js/prev-next-button.js +6 -50
- package/dist/collection/components/slides/slides.css +41 -10
- package/dist/collection/components/slides/slides.js +3 -3
- package/dist/collection/components/tabs/tab-group.js +1 -1
- package/dist/collection/components/tag/tag.js +2 -2
- package/dist/collection/utils/constructible-style.js +1 -1
- package/dist/components/datalist.js +5 -5
- package/dist/components/date-picker.js +6 -6
- package/dist/components/grid.js +1 -1
- package/dist/components/input.js +9 -7
- package/dist/components/masked-overflow.js +3 -3
- package/dist/components/nano-animation.js +1 -1
- package/dist/components/nano-checkbox-group.js +14 -17
- package/dist/components/nano-data-table.js +1 -1
- package/dist/components/nano-feature-box.d.ts +11 -0
- package/dist/components/nano-feature-box.js +36 -0
- package/dist/components/nano-file-upload.js +7 -4
- package/dist/components/nano-more-less.js +2 -2
- package/dist/components/nano-tab-group.js +1 -1
- package/dist/components/option.js +2 -2
- package/dist/components/progress-bar.js +1 -1
- package/dist/components/resize-observe.js +1 -1
- package/dist/components/select.js +11 -9
- package/dist/components/slides.js +10 -54
- package/dist/components/tag.js +2 -2
- package/dist/esm/{algolia-data-D6wnbV__.js → algolia-data-B1lm-wYl.js} +1 -1
- package/dist/esm/app-globals-CWIH620u.js +8 -0
- package/dist/esm/{component-store-CH5BI3Tg.js → component-store-DMqr8_D3.js} +1 -1
- package/dist/esm/{dom-Cb7FUtXp.js → dom-COiksOVZ.js} +1 -1
- package/dist/esm/{fade-C74M8NQp.js → fade-BR_L2aBv.js} +3 -3
- package/dist/esm/{form-control-BOVGZF9R.js → form-control-dh9YtDPa.js} +1 -1
- package/dist/esm/{fullscreen-CmJdWdrB.js → fullscreen-ChzUqF71.js} +3 -3
- package/dist/esm/{index-DXvE-U_j.js → index-CX_Hk6ss.js} +24 -15
- package/dist/esm/{index-Dw3NZx59.js → index-VZJF9v1K.js} +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/{lazyload-BPqjfQB3.js → lazyload-IYX4l8Tu.js} +3 -3
- package/dist/esm/loader.js +4 -3
- package/dist/esm/{modal-B_AxJQQp.js → modal-CH7Vma1I.js} +1 -1
- package/dist/esm/nano-accordion.entry.js +3 -3
- package/dist/esm/nano-alert.entry.js +7 -7
- package/dist/esm/nano-algolia-filter.entry.js +4 -4
- package/dist/esm/nano-algolia-pagination.entry.js +2 -2
- package/dist/esm/nano-algolia-results.entry.js +3 -3
- package/dist/esm/nano-algolia.entry.js +5 -5
- package/dist/esm/nano-animation.entry.js +3 -3
- package/dist/esm/nano-avatar_5.entry.js +20 -18
- package/dist/esm/nano-breadcrumb.entry.js +1 -1
- package/dist/esm/nano-card-carousel.entry.js +2 -2
- package/dist/esm/nano-card.entry.js +1 -1
- package/dist/esm/nano-checkbox-group.entry.js +16 -19
- package/dist/esm/nano-checkbox.entry.js +2 -2
- package/dist/esm/nano-collapsible-comparison.entry.js +2 -2
- package/dist/esm/nano-components.js +5 -4
- package/dist/esm/nano-content-links.entry.js +1 -1
- package/dist/esm/nano-cta.entry.js +1 -1
- package/dist/esm/{nano-data-table-BPQhfLyq.js → nano-data-table-EkTqZy8O.js} +6 -6
- package/dist/esm/nano-data-table.entry.js +6 -6
- package/dist/esm/nano-datalist_3.entry.js +12 -12
- package/dist/esm/nano-date-input.entry.js +2 -2
- package/dist/esm/nano-date-picker_2.entry.js +19 -17
- package/dist/esm/nano-details.entry.js +3 -3
- package/dist/esm/nano-dialog.entry.js +8 -8
- package/dist/esm/nano-dropdown_2.entry.js +5 -5
- package/dist/esm/nano-feature-box.entry.js +17 -0
- package/dist/esm/nano-field-validator.entry.js +3 -3
- package/dist/esm/nano-file-upload.entry.js +9 -6
- package/dist/esm/nano-footer.entry.js +1 -1
- package/dist/esm/nano-global-nav.entry.js +2 -2
- package/dist/esm/nano-grid-item.entry.js +1 -1
- package/dist/esm/nano-grid_2.entry.js +3 -3
- package/dist/esm/nano-hero.entry.js +2 -2
- package/dist/esm/nano-icon-item.entry.js +1 -1
- package/dist/esm/nano-icon_3.entry.js +2 -2
- package/dist/esm/nano-in-page-nav.entry.js +3 -3
- package/dist/esm/nano-intersection-observe.entry.js +4 -4
- package/dist/esm/nano-masked-overflow.entry.js +7 -7
- package/dist/esm/nano-menu-drawer.entry.js +3 -3
- package/dist/esm/nano-more-less.entry.js +4 -4
- package/dist/esm/nano-nav-item.entry.js +5 -5
- package/dist/esm/nano-progress-bar.entry.js +2 -2
- package/dist/esm/nano-range.entry.js +2 -2
- package/dist/esm/nano-rating.entry.js +2 -2
- package/dist/esm/nano-resize-observe.entry.js +3 -3
- package/dist/esm/nano-slide.entry.js +2 -2
- package/dist/esm/{nano-slides-Bv0u7kg0.js → nano-slides-DL3S1wHE.js} +16 -60
- package/dist/esm/nano-slides.entry.js +3 -3
- package/dist/esm/nano-sortable.entry.js +2 -2
- package/dist/esm/nano-spinner.entry.js +1 -1
- package/dist/esm/nano-split-pane.entry.js +2 -2
- package/dist/esm/nano-sticker.entry.js +4 -4
- package/dist/esm/nano-tab-content.entry.js +2 -2
- package/dist/esm/nano-tab-group.entry.js +5 -5
- package/dist/esm/nano-tab.entry.js +2 -2
- package/dist/esm/nano-table.entry.js +2 -2
- package/dist/esm/{page-dots-e1Gyk8V7.js → page-dots-gxG3_NaA.js} +3 -3
- package/dist/esm/{renderer-BUaAsDso.js → renderer-ZmozgREV.js} +1 -1
- package/dist/esm/{scroll-iCYjzh9N.js → scroll-D4n69pGx.js} +1 -1
- package/dist/esm/{slot-Db9r1aLM.js → slot-CjAtXEOo.js} +1 -1
- package/dist/esm/{tabbable-C4l-rYq9.js → tabbable-CZtanbA9.js} +1 -1
- package/dist/esm/{table.worker-DlLhvqK5.js → table.worker-Dcaz5STw.js} +6 -6
- package/dist/nano-components/{algolia-data-D6wnbV__.js → algolia-data-B1lm-wYl.js} +1 -1
- package/dist/nano-components/app-globals-CWIH620u.js +4 -0
- package/dist/nano-components/{component-store-CH5BI3Tg.js → component-store-DMqr8_D3.js} +1 -1
- package/dist/nano-components/{dom-Cb7FUtXp.js → dom-COiksOVZ.js} +1 -1
- package/dist/nano-components/{fade-C74M8NQp.js → fade-BR_L2aBv.js} +1 -1
- package/dist/nano-components/{form-control-BOVGZF9R.js → form-control-dh9YtDPa.js} +1 -1
- package/dist/nano-components/{fullscreen-CmJdWdrB.js → fullscreen-ChzUqF71.js} +1 -1
- package/dist/nano-components/index-CX_Hk6ss.js +5 -0
- package/dist/nano-components/{index-Dw3NZx59.js → index-VZJF9v1K.js} +1 -1
- package/dist/nano-components/index.esm.js +1 -1
- package/dist/nano-components/{lazyload-BPqjfQB3.js → lazyload-IYX4l8Tu.js} +1 -1
- package/dist/nano-components/{modal-B_AxJQQp.js → modal-CH7Vma1I.js} +1 -1
- package/dist/nano-components/nano-accordion.entry.js +1 -1
- package/dist/nano-components/nano-alert.entry.js +1 -1
- package/dist/nano-components/nano-algolia-filter.entry.js +1 -1
- package/dist/nano-components/nano-algolia-pagination.entry.js +1 -1
- package/dist/nano-components/nano-algolia-results.entry.js +1 -1
- package/dist/nano-components/nano-algolia.entry.js +1 -1
- package/dist/nano-components/nano-animation.entry.js +1 -1
- package/dist/nano-components/nano-avatar_5.entry.js +1 -1
- package/dist/nano-components/nano-breadcrumb.entry.js +1 -1
- package/dist/nano-components/nano-card-carousel.entry.js +1 -1
- package/dist/nano-components/nano-card.entry.js +1 -1
- package/dist/nano-components/nano-checkbox-group.entry.js +1 -1
- package/dist/nano-components/nano-checkbox.entry.js +1 -1
- package/dist/nano-components/nano-collapsible-comparison.entry.js +1 -1
- package/dist/nano-components/nano-components.css +119 -17
- package/dist/nano-components/nano-components.esm.js +1 -1
- package/dist/nano-components/nano-content-links.entry.js +1 -1
- package/dist/nano-components/nano-cta.entry.js +1 -1
- package/dist/nano-components/nano-data-table-EkTqZy8O.js +4 -0
- package/dist/nano-components/nano-data-table.entry.js +1 -1
- package/dist/nano-components/nano-datalist_3.entry.js +1 -1
- package/dist/nano-components/nano-date-input.entry.js +1 -1
- package/dist/nano-components/nano-date-picker_2.entry.js +1 -1
- package/dist/nano-components/nano-details.entry.js +1 -1
- package/dist/nano-components/nano-dialog.entry.js +1 -1
- package/dist/nano-components/nano-dropdown_2.entry.js +1 -1
- package/dist/nano-components/nano-feature-box.entry.js +4 -0
- package/dist/nano-components/nano-field-validator.entry.js +1 -1
- package/dist/nano-components/nano-file-upload.entry.js +1 -1
- package/dist/nano-components/nano-footer.entry.js +1 -1
- package/dist/nano-components/nano-global-nav.entry.js +1 -1
- package/dist/nano-components/nano-grid-item.entry.js +1 -1
- package/dist/nano-components/nano-grid_2.entry.js +1 -1
- package/dist/nano-components/nano-hero.entry.js +1 -1
- package/dist/nano-components/nano-icon-item.entry.js +1 -1
- package/dist/nano-components/nano-icon_3.entry.js +1 -1
- package/dist/nano-components/nano-in-page-nav.entry.js +1 -1
- package/dist/nano-components/nano-intersection-observe.entry.js +1 -1
- package/dist/nano-components/nano-masked-overflow.entry.js +1 -1
- package/dist/nano-components/nano-menu-drawer.entry.js +1 -1
- package/dist/nano-components/nano-more-less.entry.js +1 -1
- package/dist/nano-components/nano-nav-item.entry.js +1 -1
- package/dist/nano-components/nano-progress-bar.entry.js +1 -1
- package/dist/nano-components/nano-range.entry.js +1 -1
- package/dist/nano-components/nano-rating.entry.js +1 -1
- package/dist/nano-components/nano-resize-observe.entry.js +1 -1
- package/dist/nano-components/nano-slide.entry.js +1 -1
- package/dist/nano-components/{nano-slides-Bv0u7kg0.js → nano-slides-DL3S1wHE.js} +4 -4
- package/dist/nano-components/nano-slides.entry.js +1 -1
- package/dist/nano-components/nano-sortable.entry.js +1 -1
- package/dist/nano-components/nano-spinner.entry.js +1 -1
- package/dist/nano-components/nano-split-pane.entry.js +1 -1
- package/dist/nano-components/nano-sticker.entry.js +1 -1
- package/dist/nano-components/nano-tab-content.entry.js +1 -1
- package/dist/nano-components/nano-tab-group.entry.js +1 -1
- package/dist/nano-components/nano-tab.entry.js +1 -1
- package/dist/nano-components/nano-table.entry.js +1 -1
- package/dist/nano-components/{page-dots-e1Gyk8V7.js → page-dots-gxG3_NaA.js} +1 -1
- package/dist/nano-components/{renderer-BUaAsDso.js → renderer-ZmozgREV.js} +1 -1
- package/dist/nano-components/{scroll-iCYjzh9N.js → scroll-D4n69pGx.js} +1 -1
- package/dist/nano-components/{slot-Db9r1aLM.js → slot-CjAtXEOo.js} +1 -1
- package/dist/nano-components/{tabbable-C4l-rYq9.js → tabbable-CZtanbA9.js} +1 -1
- package/dist/nano-components/{table.worker-DlLhvqK5.js → table.worker-Dcaz5STw.js} +1 -1
- package/dist/style/components.css +1 -1
- package/dist/style/components.css.map +1 -1
- package/dist/style/nano.css +1 -1
- package/dist/style/nano.css.map +1 -1
- package/dist/types/components/card/card.d.ts +1 -0
- package/dist/types/components/date-picker/date-picker-interface.d.ts +6 -6
- package/dist/types/components/feature-box/feature-box.d.ts +14 -0
- package/dist/types/components/slides/slides-interface.d.ts +1 -1
- package/dist/types/components.d.ts +47 -0
- package/docs-json.json +116 -3
- package/docs-vscode.json +21 -0
- package/hydrate/index.js +163 -125
- package/hydrate/index.mjs +163 -125
- package/package.json +2 -2
- package/dist/nano-components/index-DXvE-U_j.js +0 -5
- package/dist/nano-components/nano-data-table-BPQhfLyq.js +0 -4
@@ -164,7 +164,7 @@ export class NanoAnimation {
|
|
164
164
|
this.animation?.finish();
|
165
165
|
}
|
166
166
|
render() {
|
167
|
-
return (h(Host, { key: '
|
167
|
+
return (h(Host, { key: '566f725817c91b577fc31a6eea9d5baecf3b481e', class: "nano-animation" }, h("slot", { key: '968e1c43d7e3a73d0662f8595ad08c3fa1a44044', ref: (slot) => {
|
168
168
|
this.defaultSlot = slot;
|
169
169
|
}, onSlotchange: this.handleSlotChange })));
|
170
170
|
}
|
@@ -6,6 +6,7 @@
|
|
6
6
|
* @type CSS Only
|
7
7
|
*
|
8
8
|
* @slot img - The image of the card. Appears first.
|
9
|
+
* @slot category - The category tag on a card. Appears on the bottom right corner of a card image.
|
9
10
|
* @slot title - The title of the card. Appears second.
|
10
11
|
* @slot content - The main content of the card. Appears third.
|
11
12
|
* @slot footer - The footer of the card. Appears last.
|
@@ -56,7 +56,8 @@ export class CheckboxGroup {
|
|
56
56
|
* A collective label for children controls
|
57
57
|
*/
|
58
58
|
get legend() {
|
59
|
-
if (!this._legend.endsWith('*') &&
|
59
|
+
if (!this._legend.endsWith('*') &&
|
60
|
+
this.nativeCbs?.find((cb) => !!cb.required)) {
|
60
61
|
return this._legend + ' *';
|
61
62
|
}
|
62
63
|
return this._legend;
|
@@ -101,18 +102,14 @@ export class CheckboxGroup {
|
|
101
102
|
* @returns `{ isValid: boolean, errorMessage: string }`
|
102
103
|
*/
|
103
104
|
async reportValidity(validateFirst) {
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
errorMessage: this.errorMessage,
|
113
|
-
});
|
114
|
-
}, 50);
|
115
|
-
});
|
105
|
+
if (validateFirst) {
|
106
|
+
this.customValidate();
|
107
|
+
this.showInlineValidation();
|
108
|
+
}
|
109
|
+
return {
|
110
|
+
isValid: !this.invalid,
|
111
|
+
errorMessage: this.errorMessage,
|
112
|
+
};
|
116
113
|
}
|
117
114
|
/**
|
118
115
|
* Invalidate the field and show a custom error message.
|
@@ -323,7 +320,7 @@ export class CheckboxGroup {
|
|
323
320
|
// stencil hooks
|
324
321
|
componentWillLoad() {
|
325
322
|
this.handleValueChange = this.handleValueChange.bind(this);
|
326
|
-
this.handleValueChange = debounce(this.handleValueChange, 1);
|
323
|
+
// this.handleValueChange = debounce(this.handleValueChange, 1);
|
327
324
|
this.showInlineValidation = debounce(this.showInlineValidation, 10);
|
328
325
|
this.handleDisabledChange();
|
329
326
|
this.handleSlotChange();
|
@@ -346,14 +343,14 @@ export class CheckboxGroup {
|
|
346
343
|
render() {
|
347
344
|
const legendId = this.grpId + '-lbl';
|
348
345
|
const moreId = this.showInlineError || this.hasHelperSlot ? this.grpId + '-more' : '';
|
349
|
-
return (h(Host, { key: '
|
346
|
+
return (h(Host, { key: '15fc5c86bc5db9189119af9c59b5b406fe5b6e22', class: this.checkboxTypes }, h("fieldset", { key: 'b3d7acc9c452fefca51966fa2a88d755f338b206', disabled: this.disabled, class: {
|
350
347
|
cbgroup: true,
|
351
348
|
'has-error': this.showErrorMsg && !!this.errorMessage,
|
352
349
|
'has-helper': this.hasHelperSlot,
|
353
|
-
} }, h("legend", { key: '
|
350
|
+
} }, h("legend", { key: 'd4aef86c845f730e2a11696a4347da6c1e7771d8', id: legendId, class: {
|
354
351
|
cbgroup__legend: true,
|
355
352
|
'visually-hide': this.hideLegend,
|
356
|
-
} }, h("slot", { key: '
|
353
|
+
} }, h("slot", { key: 'a31964559fc797ee445b9e38633b7cc2c3d30286', name: "legend" }, this.legend)), h("div", { key: 'bcfad3c07ebcefc2e5cc0bb7ac5c23712ae76284', class: "cbgroup__cbs", role: "group", "aria-labelledby": legendId + ' ' + moreId }, h("slot", { key: '7222f411ed5c38a520aff17452fe4da6e84c80d3' })), (this.showInlineError || this.hasHelperSlot) && (h("div", { key: '6a31f268047242b78861057902d06ecaf4e7e0c1', class: "cbgroup__more", id: moreId }, this.showInlineError ? (h("div", { class: "cbgroup__error" }, this.errorMessage)) : (''), h("div", { key: '2b9f59ce901eddbe7b40cf13bdf0276b4522dc6e', class: "cbgroup__help" }, h("slot", { key: '92df785a50cfe52cafe741747e65b56d2a451211', name: "helper" })))))));
|
357
354
|
}
|
358
355
|
static get is() { return "nano-checkbox-group"; }
|
359
356
|
static get encapsulation() { return "scoped"; }
|
@@ -831,7 +831,7 @@ export class NanoDataTable {
|
|
831
831
|
h(TableColHead, { column: colModel, headRenderer: this.headRender, onColumnSortClick: this.sortStart, defaults: {
|
832
832
|
sortable: this.defaultSort,
|
833
833
|
} }),
|
834
|
-
]))), this._loading && !this.blocks.length && (h("tbody", { class: `${CSSNAMESPACE}__active ${CSSNAMESPACE}__loading` }, [...Array(this.placeholderSize).keys()].map((rowIndex) => (h("tr", null, this.store.config.state.columns.map((_colModel, colIndex) => (h(TableCell, { rowIndex: rowIndex, colIndex: colIndex, nestedContent: () => h("span", { class: "n-loader-skeleton" }, h("span", null, "Content loading")) })))))))), h("tr", { hidden: !!this._loading || !!this.blocks.length }, h("th", { class: `${CSSNAMESPACE}__th`, colSpan: this.store.config.state.columns.length }, h("div", { class: "nano-tbl__cell-content nano-tbl__cell-content--no-result" }, h("slot", { name: "no-results" }, "No results found")))), this.blocks.map((block, blockIndex) => (h("tbody", { key: block.__uuid, id: `tbody-${this.renderId}-${blockIndex}`, ref: (tb) => {
|
834
|
+
]))), this._loading && !this.blocks.length && (h("tbody", { class: `${CSSNAMESPACE}__active ${CSSNAMESPACE}__loading` }, [...Array(this.placeholderSize).keys()].map((rowIndex) => (h("tr", null, this.store.config.state.columns.map((_colModel, colIndex) => (h(TableCell, { rowIndex: rowIndex, colIndex: colIndex, nestedContent: () => (h("span", { class: "n-loader-skeleton" }, h("span", null, "Content loading"))) })))))))), h("tr", { hidden: !!this._loading || !!this.blocks.length }, h("th", { class: `${CSSNAMESPACE}__th`, colSpan: this.store.config.state.columns.length }, h("div", { class: "nano-tbl__cell-content nano-tbl__cell-content--no-result" }, h("slot", { name: "no-results" }, "No results found")))), this.blocks.map((block, blockIndex) => (h("tbody", { key: block.__uuid, id: `tbody-${this.renderId}-${blockIndex}`, ref: (tb) => {
|
835
835
|
this.blockElements.push(tb);
|
836
836
|
}, class: {
|
837
837
|
[`${CSSNAMESPACE}__inactive`]: !this.activeBlocks.includes(blockIndex),
|
@@ -525,18 +525,18 @@ export class DataList {
|
|
525
525
|
}
|
526
526
|
}
|
527
527
|
render() {
|
528
|
-
return (h(Host, { key: '
|
528
|
+
return (h(Host, { key: 'f5870b17a2a42fc705708682f48c42b8acc623b7', class: "nano-datalist", role: this.actvOptEles.length ? 'listbox' : undefined, "aria-owns": this.optionIds.length ? this.optionIds.join(' ') : undefined, "aria-label": this.optionIds.length
|
529
529
|
? 'Select options from the list below'
|
530
|
-
: undefined }, h("nano-dropdown", { key: '
|
530
|
+
: undefined }, h("nano-dropdown", { key: 'ef306491a6086d4977e46567ad1e4b344890ea86', part: "dropdown", exportparts: "trigger:dropdown__trigger, panel:dropdown__panel", ...this.dropDownConfig, ref: (el) => (this.nanoDropdown = el), dialogTitle: "Select options from the list below", class: {
|
531
531
|
dlist__dropdown: true,
|
532
532
|
'dlist--isfiltered': this.isFiltered,
|
533
|
-
}, onNanoAfterShow: this.handleShow, onNanoAfterHide: this.handleHide, role: "group" }, h("nano-menu", { key: '
|
533
|
+
}, onNanoAfterShow: this.handleShow, onNanoAfterHide: this.handleHide, role: "group" }, h("nano-menu", { key: 'c175138c17a40bf755688ef7e4a85ef8e1608836', part: "main-menu", ref: (el) => (this.listBox = el), hidden: !this.actvOptEles.length, type: "listbox", label: this.inputLabel ? this.inputLabel.textContent : undefined, class: {
|
534
534
|
dlist__menu: true,
|
535
535
|
'dlist__menu--open': this.dropwdownOpen,
|
536
|
-
}, tabIndex: -1, onNanoSelect: this.optSelected, onKeyDown: this.optionKeyDown }, h("slot", { key: '
|
536
|
+
}, tabIndex: -1, onNanoSelect: this.optSelected, onKeyDown: this.optionKeyDown }, h("slot", { key: '9a079eef12530562bd535a4d9e2ec65f747cd113', name: "list-top" }), h("slot", { key: '3421b5c0f4bfe14354f7a27d99b17d208032df25' }), h("slot", { key: '5bc52d6bbaffb020a8dee8acdceafb5c421e89d8', name: "internal-opts" }), h("slot", { key: '66a4b6158d9bea7f0212088a86069d93bc7c17ef', name: "list-bottom" })), h("nano-menu", { key: '78daf54379a013a64c702cfc2df12e2cf36c993e', part: "no-result-menu", type: "listbox", label: "No results found", hidden: !!this.actvOptEles.length, class: {
|
537
537
|
dlist__menu: true,
|
538
538
|
'dlist__menu--open': this.dropwdownOpen,
|
539
|
-
} }, h("slot", { key: '
|
539
|
+
} }, h("slot", { key: '4c1fa43790c0ae2c84d919242764797c9e9a2546', name: "no-result" })), !!this.actvOptEles && (h("div", { key: '01e5040fe2991ffacfceb27ce997399641ab6a37', class: "dlist__status" }, this.actvOptEles.length, " result", this.actvOptEles.length > 1 ? 's' : '', " available.")))));
|
540
540
|
}
|
541
541
|
static get is() { return "nano-datalist"; }
|
542
542
|
static get encapsulation() { return "shadow"; }
|
@@ -81,12 +81,12 @@ export class NanoDatePicker {
|
|
81
81
|
async setFocus(day = false) {
|
82
82
|
this.setFocusedDay(parseISODate(this.selectedDate) || new Date());
|
83
83
|
if (day) {
|
84
|
-
setTimeout((_) => this.focusedDayNode.focus(), 20);
|
84
|
+
setTimeout((_) => this.focusedDayNode.focus({ preventScroll: true }), 20);
|
85
85
|
return;
|
86
86
|
}
|
87
87
|
clearTimeout(this.focusTimeoutId);
|
88
88
|
this.focusTimeoutId = setTimeout(() => {
|
89
|
-
this.monthSelectNode.focus();
|
89
|
+
this.monthSelectNode.focus({ preventScroll: true });
|
90
90
|
}, 20);
|
91
91
|
}
|
92
92
|
handleSelectedDateChange() {
|
@@ -242,7 +242,7 @@ export class NanoDatePicker {
|
|
242
242
|
processFocusedDayNode = (element) => {
|
243
243
|
this.focusedDayNode = element;
|
244
244
|
if (this.activeFocus) {
|
245
|
-
setTimeout(() => element.focus(), 0);
|
245
|
+
setTimeout(() => element.focus({ preventScroll: true }), 0);
|
246
246
|
}
|
247
247
|
};
|
248
248
|
componentWillLoad() {
|
@@ -267,11 +267,11 @@ export class NanoDatePicker {
|
|
267
267
|
minYear = minDate.getFullYear();
|
268
268
|
if (maxDate)
|
269
269
|
maxYear = maxDate.getFullYear();
|
270
|
-
return (h(Host, { key: '
|
270
|
+
return (h(Host, { key: '325b63a7956c84802d783fa95086b66df5fbfdc2', class: "nano-date-picker" }, h("div", { key: 'be1ef3571202d7074ddda34a299774b1e9a8a96c', class: "duet-date" }, h("div", { key: '52583e20b54f39ef154e51e200f09719654555c9', class: {
|
271
271
|
'duet-date__dialog': true,
|
272
272
|
'is-active': true,
|
273
|
-
}, onTouchMove: this.handleTouchMove, onTouchStart: this.handleTouchStart, onTouchEnd: this.handleTouchEnd }, h("div", { key: '
|
274
|
-
element), onChange: this.handleMonthSelect }, this.localization.monthNames.map((month, i) => (h("option", { key: month, value: i, selected: i === focusedMonth, disabled: !inRange(new Date(focusedYear, i, 1), minDate ? startOfMonth(minDate) : null, maxDate ? endOfMonth(maxDate) : null) }, month)))), h("div", { key: '
|
273
|
+
}, onTouchMove: this.handleTouchMove, onTouchStart: this.handleTouchStart, onTouchEnd: this.handleTouchEnd }, h("div", { key: '9ff8a1baa94f6502a4691cbd69c45808ee94eaa1', class: "duet-date__dialog-content" }, h("div", { key: 'ea56053783abfe899d19dffee3d0709decf34586', class: "duet-date__vhidden duet-date__instructions", "aria-live": "polite" }, this.localization.keyboardInstruction), h("div", { key: '53fde77f3ae470c6d5271ff901557876f9f082db', class: "duet-date__header", onFocusin: this.disableActiveFocus }, h("div", { key: '0dd5d2f41fa1acc596b4d0b83644744607427295' }, h("h2", { key: 'fbc33424f5048889a766afec0dec6408b8d107e4', id: this.dialogLabelId, class: "duet-date__vhidden", "aria-live": "polite" }, this.localization.monthNames[focusedMonth], ' ', this.focusedDay.getFullYear()), h("label", { key: 'b2f293e2eecaad9c2070fb0b0612332b7c60bb13', htmlFor: this.monthSelectId, class: "duet-date__vhidden" }, this.localization.monthSelectLabel), h("div", { key: 'e3641b3731fd4387c5623590d16e7f566f6f7273', class: "duet-date__select" }, h("select", { key: 'a7d655e5ed0e5f30a4acb1fc6e5fc0b6f4190211', id: this.monthSelectId, class: "duet-date__select--month", ref: (element) => (this.firstFocusableElement = this.monthSelectNode =
|
274
|
+
element), onChange: this.handleMonthSelect }, this.localization.monthNames.map((month, i) => (h("option", { key: month, value: i, selected: i === focusedMonth, disabled: !inRange(new Date(focusedYear, i, 1), minDate ? startOfMonth(minDate) : null, maxDate ? endOfMonth(maxDate) : null) }, month)))), h("div", { key: 'd48f0c2a4ba4f25a5fbe2c524119d53c852225fe', class: "duet-date__select-label", "aria-hidden": "true" }, h("span", { key: 'c5a052d1d5d627efc147fa3c6d815aa58a88a658' }, this.localization.monthNamesShort[focusedMonth]), h("nano-icon", { key: '75a671f7f3b5e99db8292448a1213057522cb54a', name: "light/chevron-down" }))), h("label", { key: 'd75e61f7a398d8a59eea903ed7579e0e2488a588', htmlFor: this.yearSelectId, class: "duet-date__vhidden" }, this.localization.yearSelectLabel), h("div", { key: '7f53843dbfd10dad14ab29ba36fa132c411b7181', class: "duet-date__select" }, h("select", { key: '95c128dd44bc337d21f93acb263db9ab31a7a85d', id: this.yearSelectId, class: "duet-date__select--year", onChange: this.handleYearSelect }, range(minYear, maxYear).map((year) => (h("option", { key: year, selected: year === focusedYear }, year)))), h("div", { key: '3bed714eb0f65a52f50686c7bc1b66c53be8ffc9', class: "duet-date__select-label", "aria-hidden": "true" }, h("span", { key: '925804c72b36ad5092babc990660505d3841dca9' }, this.focusedDay.getFullYear()), h("nano-icon", { key: 'b8a54c98c40d20ce85562d0a3de40aa4dde2ff11', name: "light/chevron-down" })))), h("div", { key: 'd9525a0266c3abf1c0248fc8defa85f49a1a93d4', class: "duet-date__nav" }, h("button", { key: '9c7390ebc74ae31f8687c764dbe918f50316d93c', class: "duet-date__prev", onClick: this.handlePreviousMonthClick, disabled: prevMonthDisabled, type: "button" }, h("nano-icon", { key: '0cc15df22222c3c7c944b12cd6518f200c15891c', name: "light/chevron-left" }), h("span", { key: 'e9a376ce2f4aa7e180de15388ee3cb657e1968ac', class: "duet-date__vhidden" }, this.localization.prevMonthLabel)), h("button", { key: '6b49ef9d261384853bf5982ed212e33f110d86a7', class: "duet-date__next", onClick: this.handleNextMonthClick, disabled: nextMonthDisabled, type: "button" }, h("nano-icon", { key: '48fd8c193aa842fcc610edccc205124d7b955230', name: "light/chevron-right" }), h("span", { key: '639bf8f2367d1d4b077cf1dfb2e8144b49dc234d', class: "duet-date__vhidden" }, this.localization.nextMonthLabel)))), h("div", { key: '88459567f3cd03189554d95d691ac51058905396' }, h(DatePickerMonth, { key: '79561fa4051c802e33a74cafc11c212c399d20e9', selectedDate: valueAsDate, focusedDate: this.focusedDay, onDateSelect: this.handleDaySelect, onKeyboardNavigation: this.handleKeyboardNavigation, labelledById: this.dialogLabelId, localization: this.localization, firstDayOfWeek: this.firstDayOfWeek, focusedDayRef: this.processFocusedDayNode, min: minDate, max: maxDate, isDateDisabled: this.isDateDisabled })))))));
|
275
275
|
}
|
276
276
|
static get is() { return "nano-date-picker"; }
|
277
277
|
static get encapsulation() { return "shadow"; }
|
@@ -0,0 +1,42 @@
|
|
1
|
+
:host,
|
2
|
+
*,
|
3
|
+
*::before,
|
4
|
+
*::after {
|
5
|
+
box-sizing: border-box;
|
6
|
+
}
|
7
|
+
[hidden] {
|
8
|
+
display: none !important;
|
9
|
+
}
|
10
|
+
@media (prefers-reduced-motion: reduce) {
|
11
|
+
:host,
|
12
|
+
*,
|
13
|
+
*::before,
|
14
|
+
*::after {
|
15
|
+
animation-duration: 0.01ms !important;
|
16
|
+
animation-iteration-count: 1 !important;
|
17
|
+
transition-duration: 0.01ms !important;
|
18
|
+
scroll-behavior: auto !important;
|
19
|
+
}
|
20
|
+
}:host,
|
21
|
+
*,
|
22
|
+
*::before,
|
23
|
+
*::after {
|
24
|
+
box-sizing: border-box;
|
25
|
+
}
|
26
|
+
[hidden] {
|
27
|
+
display: none !important;
|
28
|
+
}
|
29
|
+
@media (prefers-reduced-motion: reduce) {
|
30
|
+
:host,
|
31
|
+
*,
|
32
|
+
*::before,
|
33
|
+
*::after {
|
34
|
+
animation-duration: 0.01ms !important;
|
35
|
+
animation-iteration-count: 1 !important;
|
36
|
+
transition-duration: 0.01ms !important;
|
37
|
+
scroll-behavior: auto !important;
|
38
|
+
}
|
39
|
+
}/**
|
40
|
+
* @prop --color: text colour of feature box contents. Defaults to `var(--nano-color-basic-white)`;
|
41
|
+
* @prop --bg: background of the feature box. Defaults to `var(--nano-color-basic-black)`;
|
42
|
+
*/
|
@@ -0,0 +1,49 @@
|
|
1
|
+
/**
|
2
|
+
* Highlights a key message on a landing page.
|
3
|
+
*
|
4
|
+
* @status new
|
5
|
+
* @version 8.0.0
|
6
|
+
* @type CSS Only
|
7
|
+
*
|
8
|
+
* @slot img - The image of the card. Appears first.
|
9
|
+
* @slot content - The main content of the card. Suitable for headings, paragraphs, and other text elements.
|
10
|
+
*/
|
11
|
+
export class NanoFeatureBox {
|
12
|
+
/** The position of the image of the feature-box (`start` being left on a l2r page) */
|
13
|
+
imgPosition = 'start';
|
14
|
+
static get is() { return "nano-feature-box"; }
|
15
|
+
static get originalStyleUrls() {
|
16
|
+
return {
|
17
|
+
"$": ["feature-box.scss"]
|
18
|
+
};
|
19
|
+
}
|
20
|
+
static get styleUrls() {
|
21
|
+
return {
|
22
|
+
"$": ["feature-box.css"]
|
23
|
+
};
|
24
|
+
}
|
25
|
+
static get properties() {
|
26
|
+
return {
|
27
|
+
"imgPosition": {
|
28
|
+
"type": "string",
|
29
|
+
"attribute": "img-position",
|
30
|
+
"mutable": false,
|
31
|
+
"complexType": {
|
32
|
+
"original": "'start' | 'end'",
|
33
|
+
"resolved": "\"end\" | \"start\"",
|
34
|
+
"references": {}
|
35
|
+
},
|
36
|
+
"required": false,
|
37
|
+
"optional": true,
|
38
|
+
"docs": {
|
39
|
+
"tags": [],
|
40
|
+
"text": "The position of the image of the feature-box (`start` being left on a l2r page)"
|
41
|
+
},
|
42
|
+
"getter": false,
|
43
|
+
"setter": false,
|
44
|
+
"reflect": true,
|
45
|
+
"defaultValue": "'start'"
|
46
|
+
}
|
47
|
+
};
|
48
|
+
}
|
49
|
+
}
|
@@ -67,7 +67,9 @@ export class FileUpload {
|
|
67
67
|
_label = '';
|
68
68
|
/** String to place within a label element. */
|
69
69
|
get label() {
|
70
|
-
return this.required && !this._label.endsWith('*')
|
70
|
+
return this.required && !this._label.endsWith('*')
|
71
|
+
? this._label + ' *'
|
72
|
+
: this._label;
|
71
73
|
}
|
72
74
|
set label(value) {
|
73
75
|
this._label = value;
|
@@ -229,7 +231,7 @@ export class FileUpload {
|
|
229
231
|
checkFileType(type) {
|
230
232
|
if (!this.accept)
|
231
233
|
return true;
|
232
|
-
return !!type && this.accept.match(type) && this.accept.match(type).length > 0;
|
234
|
+
return (!!type && this.accept.match(type) && this.accept.match(type).length > 0);
|
233
235
|
}
|
234
236
|
validate = () => {
|
235
237
|
this.errorMessage = '';
|
@@ -386,7 +388,8 @@ export class FileUpload {
|
|
386
388
|
this.onDragStop(e);
|
387
389
|
}, onDragEnd: this.onDragStop, onDragLeave: this.onDragStop, onDragEnter: this.onDragStart, onDragOver: this.onDragStart }, (!!this.label || (this.hasLabelSlot && eleType !== 'drop')) && (h("div", { class: `file-upload__label ${this.hideLabel ? 'visually-hide' : ''}` }, !!this.label && !!this.label.length ? this.label : '', !this.label && this.hasLabelSlot && eleType !== 'drop' && (h("slot", { name: "label" })))), eleType === 'drop' && (h("div", { class: "file-upload__drop-area" }, h("div", null, this.hasLabelSlot && h("slot", { name: "label" })), h("div", null, "Drag and drop or\u00A0", h("span", null, "browse")))), eleType === 'btn' && (h("div", { class: `file-upload__button button--keyline button--icon-start ${this.hasFocus ? 'button--focus' : ''}` }, h("nano-cta", { secondary: true, class: `file-upload__btn-content` }, h("div", { class: "button", disabled: this.disabled }, this.fileList.length
|
388
390
|
? this.fileList[0].file.name
|
389
|
-
: this.placeholder)), !!this.value && this.clearable && !this.disabled && (h("button", { type: "button", class: "icon file-upload__clear-btn", tabindex: "0", "aria-label": "Clear selected file", onClick: this.onClearClick }, h("nano-icon", { name: "light/xmark" }))), !this.disabled &&
|
391
|
+
: this.placeholder)), !!this.value && this.clearable && !this.disabled && (h("button", { type: "button", class: "icon file-upload__clear-btn", tabindex: "0", "aria-label": "Clear selected file", onClick: this.onClearClick }, h("nano-icon", { name: "light/xmark" }))), !this.disabled &&
|
392
|
+
this.showInlineError &&
|
390
393
|
(this._invalid ? (h("nano-icon", { name: "solid/circle-xmark", class: "file-upload__icon file-upload__icon-error" })) : (h("nano-icon", { name: "solid/circle-check", class: "file-upload__icon file-upload__icon-success" }))))), h("input", { "aria-labelledby": labelId + ' ' + moreId + ' ' + listId, type: "file", id: this.fileInputId, accept: this.accept, class: "file-upload__input", multiple: this.maxFiles > 1, disabled: this.disabled, name: this.canChangeFileList ? undefined : this.name, form: this.form, ref: (input) => {
|
391
394
|
if (this.canChangeFileList) {
|
392
395
|
this.publicInputEl = input;
|
@@ -414,7 +417,7 @@ export class FileUpload {
|
|
414
417
|
];
|
415
418
|
};
|
416
419
|
render() {
|
417
|
-
return (h(Host, { key: '
|
420
|
+
return (h(Host, { key: 'c6fc291c7ac3c990d5304a2589c7dd1a0193333e', class: "nano-file-upload" }, h("div", { key: '12fd1e6551fe6ff6e1eb6a84000a21e526c61c36', class: {
|
418
421
|
'file-upload': true,
|
419
422
|
'file-upload--dragging': this.isDragging,
|
420
423
|
'file-upload--focus': this.hasFocus,
|
@@ -175,7 +175,7 @@ export class Grid {
|
|
175
175
|
this.constructSizeArray();
|
176
176
|
}
|
177
177
|
render() {
|
178
|
-
return (h(Host, { key: '
|
178
|
+
return (h(Host, { key: '74b98156bf6fbb3bf105135be4f461737d7774ac', class: "nano-grid" }, h("div", { key: 'dda06ec152c7d25ee0e6090e6c301bc8e5e81aac', part: "grid", class: "grid", "cache-key": this.cacheKey }, h("slot", { key: '175e120e0198bfad25600316aa8a8becf9390866' })), this.showHelper && (h("div", { key: '773d0ca81af12cc416550578e4df88f08b7af3cd', class: "grid grid--helper", part: "helper", "cache-key": this.cacheKey }, [...Array(24)].map(() => (h("div", { class: "grid__helper-item" })))))));
|
179
179
|
}
|
180
180
|
static get is() { return "nano-grid"; }
|
181
181
|
static get encapsulation() { return "shadow"; }
|
@@ -358,7 +358,7 @@ label.visually-hide,
|
|
358
358
|
display: grid;
|
359
359
|
grid-template-areas: "overlay";
|
360
360
|
}
|
361
|
-
:host(:not(.is-invalid
|
361
|
+
:host(:not(.is-invalid, .is-valid)) .form-ctrl__validation-icon {
|
362
362
|
display: none;
|
363
363
|
}
|
364
364
|
|
@@ -140,7 +140,9 @@ export class Input {
|
|
140
140
|
* String to place within a label element. Alternatively you may use a label slot.
|
141
141
|
*/
|
142
142
|
get label() {
|
143
|
-
return this.required && !this._label.endsWith('*')
|
143
|
+
return this.required && !this._label.endsWith('*')
|
144
|
+
? this._label + ' *'
|
145
|
+
: this._label;
|
144
146
|
}
|
145
147
|
set label(value) {
|
146
148
|
this._label = value;
|
@@ -579,18 +581,18 @@ export class Input {
|
|
579
581
|
disabled,
|
580
582
|
clearControl: this.clearable,
|
581
583
|
}))(this);
|
582
|
-
return (h(Host, { key: '
|
584
|
+
return (h(Host, { key: '87ffe8828b64535a10140feecfc75ff5fba354f2', "aria-disabled": this.disabled ? 'true' : null, class: {
|
583
585
|
'has-value': this.hasValue(),
|
584
586
|
'has-focus': this.hasFocus,
|
585
587
|
'is-invalid': this._invalid === true,
|
586
588
|
'is-valid': this._invalid === false,
|
587
589
|
'nano-input': true,
|
588
|
-
} }, h("div", { key: '
|
590
|
+
} }, h("div", { key: '88cf2db24e47049dd5ef7d45b41614b821a6dd5f', style: { width: '100%' } }, h(FormControlWrap, { key: 'c50c5abfb6c8e3b64c151cca611ba83d6949dfff', ...wrapOptions, class: {
|
589
591
|
'has-helper': this.hasHelperSlot,
|
590
592
|
'has-error': !!this.errorMessage &&
|
591
593
|
this.showInlineError &&
|
592
594
|
this._invalid === true,
|
593
|
-
} }, h(FormControl, { key: '
|
595
|
+
} }, h(FormControl, { key: 'fc9d46333893136293bbdac44372ba3863a9d864', ...controlOptions, onClearText: this.clearTextInput, control: this.el, ref: (el) => (this.nativeInputWrap = el), showInlineError: this.showInlineError, endSlot: this.showPicker &&
|
594
596
|
this.type === 'date' &&
|
595
597
|
!this.readonly &&
|
596
598
|
!this.disabled && [
|
@@ -605,10 +607,10 @@ export class Input {
|
|
605
607
|
this.value = e.detail.value;
|
606
608
|
this.pickerDropdown?.hide();
|
607
609
|
}, min: this.min, max: this.max, "is-modal": true, selectedDate: this.value || this.initialPickerDate || undefined }))),
|
608
|
-
] }, this.type !== 'textarea' && (h("input", { key: '
|
610
|
+
] }, this.type !== 'textarea' && (h("input", { key: '5aa8c0b68e55c5afb3f9e9676ee75bd53a242af2', id: this.inputId, class: "input__native-ctrl", ref: (input) => (this.nativeInput = input), "aria-labelledby": labelId + ' ' + moreId + ' ' + helperEndId, disabled: this.disabled, accept: this.accept, autoCapitalize: this.autocapitalise, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, inputMode: this.inputmode, form: this.form, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, size: this.size, type: this.type, value: value, onInput: this.onInput, onClick: (e) => e.preventDefault(), onChange: this.onInput, onFocus: this.onFocus, onBlur: this.handleBlur, onKeyDown: this.onKeydown, onInvalid: this.validate })), this.type === 'textarea' && (h("textarea", { key: '571c808ea1f623b996e17d287eab361444da2fa3', rows: this.floatLabel ? 1 : this.rows, id: this.inputId, class: {
|
609
611
|
'input__native-ctrl': true,
|
610
612
|
input__resizable: this.resize === 'true',
|
611
|
-
}, ref: (input) => (this.nativeInput = input), "aria-labelledby": labelId + ' ' + moreId + ' ' + helperEndId, disabled: this.disabled, autoCapitalize: this.autocapitalise, autoCorrect: this.autocorrect, autoFocus: this.autofocus, inputMode: this.inputmode, form: this.form, minLength: this.minlength, maxLength: this.maxlength, name: this.name, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, value: value, onInput: this.onInput, onChange: this.onInput, onFocus: this.onFocus, onKeyDown: this.onKeydown, onInvalid: this.validate, onBlur: this.handleBlur })))), h("slot", { key: '
|
613
|
+
}, ref: (input) => (this.nativeInput = input), "aria-labelledby": labelId + ' ' + moreId + ' ' + helperEndId, disabled: this.disabled, autoCapitalize: this.autocapitalise, autoCorrect: this.autocorrect, autoFocus: this.autofocus, inputMode: this.inputmode, form: this.form, minLength: this.minlength, maxLength: this.maxlength, name: this.name, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, value: value, onInput: this.onInput, onChange: this.onInput, onFocus: this.onFocus, onKeyDown: this.onKeydown, onInvalid: this.validate, onBlur: this.handleBlur })))), h("slot", { key: '10a61c2bbda41eac07546a6ad6a83b2b767489e8' }))));
|
612
614
|
}
|
613
615
|
static get is() { return "nano-input"; }
|
614
616
|
static get encapsulation() { return "scoped"; }
|
@@ -327,7 +327,7 @@ export class MaskedOverflow {
|
|
327
327
|
}
|
328
328
|
}
|
329
329
|
render() {
|
330
|
-
return (h(Host, { key: '
|
330
|
+
return (h(Host, { key: 'ce255683796d356286e4c9cbd7f7ea34db77190b', dir: this.isRtl ? 'rtl' : null, class: "nano-masked-overflow", "has-scroll-controls": this.hasScrollControls }, h("div", { key: 'd1ed2c18f2b317721e2cab42694a1f203d5d807a', part: "base", class: {
|
331
331
|
onav: true,
|
332
332
|
[`onav--${this.orientation}`]: true,
|
333
333
|
'onav--has-scroll-controls': this.hasScrollControls,
|
@@ -336,12 +336,12 @@ export class MaskedOverflow {
|
|
336
336
|
'onav--no-transitions': this.instantReCalc,
|
337
337
|
'onnav--has-indicator': this.showIndicator,
|
338
338
|
'onnav--hide-scrollbars': this.hideScrollbars && this.hideScrollbars !== 'false',
|
339
|
-
}, onClick: this.handleClick, onKeyDown: this.handleKeyDown }, h("div", { key: '
|
339
|
+
}, onClick: this.handleClick, onKeyDown: this.handleKeyDown }, h("div", { key: 'e1acd4b76844e48ef2700500977fcc227323fa92', class: "onav__nav" }, this.scrollControls && (h("nano-icon-button", { key: '30e8801e0b1ba96675ab129e5371eb6e1edff420', part: "scroll-button scroll-button-prev", class: {
|
340
340
|
'onav__scroll-button': true,
|
341
341
|
'onav__scroll-button--start': true,
|
342
342
|
}, ref: (btn) => (this.startBtn = btn), onClick: () => this.handleBtnClick(false), label: "Click to scroll", iconName: this.orientation === 'horizontal'
|
343
343
|
? 'light/chevron-left'
|
344
|
-
: 'light/chevron-up' })), h("div", { key: '
|
344
|
+
: 'light/chevron-up' })), h("div", { key: '494da67346cf9ec3217eb46aad8e0bbfca7e5842', part: "scroller", ref: (el) => (this.nav = el), class: "onav__scroller", onScroll: this.handleScroll, tabindex: this.hasScrollControls ? 0 : undefined, role: "region", "aria-label": this.label || undefined }, h("div", { key: '98e0cc7a8b0ab82440b0110e8f4d018b02612901', part: "items", ref: (el) => (this.itemContainer = el), class: "onav__items" }, this.showIndicator && (h("div", { key: '9f1622b178b5cfcf0c44cacb9f5dd3465306b9f8', part: "indicator", ref: (el) => (this.activeIndicator = el), class: "onav__active-indicator" })), h("slot", { key: 'd11134d63b8a733b7d9e0e74283eb463be032c82', onSlotchange: this.slotChangeHandler }))), this.scrollControls && (h("nano-icon-button", { key: '2630de597a4c38e555eb95dfc19033a517ccdee2', part: "scroll-button scroll-button-next", class: {
|
345
345
|
'onav__scroll-button': true,
|
346
346
|
'onav__scroll-button--end': true,
|
347
347
|
}, ref: (btn) => (this.endBtn = btn), onClick: () => this.handleBtnClick(true), label: "Click to scroll", iconName: this.orientation === 'horizontal'
|
@@ -65,8 +65,8 @@ export class Rating {
|
|
65
65
|
this.handleShowHideElements();
|
66
66
|
}
|
67
67
|
render() {
|
68
|
-
return (h(Host, { key: '
|
69
|
-
h("div", { key: '
|
68
|
+
return (h(Host, { key: 'e1afec82d8deaccc2710b9523edb2f46e9918c1b', class: "nano-more-less" }, h("slot", { key: '704bb046e601225e50a7dc5b74dee973bf58274c', onSlotchange: () => this.handleShowHideElements() }), this.children?.length > this.maxToShow && [
|
69
|
+
h("div", { key: 'd905bc9d85634c5eed8e33acdc28f0bfae6396a4', style: { display: this.show ? 'none' : 'contents' }, class: "button-wrapper", part: "button-wrapper button-wrapper--less", onClick: (e) => this.handleClick(e) }, h("slot", { key: '64c6138dc9e43cfe13e7be7d43740e533fa03630', name: "less" }, h("button", { key: '3c447841fafb877de9e2e16ce2f103da5831d744', part: "button button--less" }, "Show more (+", this.children.length - this.maxToShow, ")"))),
|
70
70
|
!this.noHideBtn ? (h("div", { style: { display: this.show ? 'contents' : 'none' }, class: "button-wrapper", part: "button-wrapper button-wrapper--more", onClick: (e) => this.handleClick(e) }, h("slot", { name: "more" }, h("button", { part: "button button--more" }, "Show less (-", this.children.length - this.maxToShow, ")")))) : (''),
|
71
71
|
]));
|
72
72
|
}
|
@@ -83,12 +83,12 @@ export class Option {
|
|
83
83
|
}
|
84
84
|
render() {
|
85
85
|
const WrapTag = this.href ? 'a' : 'div';
|
86
|
-
return (h(Host, { key: '
|
86
|
+
return (h(Host, { key: '9cb53ef00c462eeca94b4dbe77d94698cd86f9b2', role: "option", "aria-selected": this.selected ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', class: "nano-option" }, h(WrapTag, { key: 'a51a558222fe2b114677ad1bc374058aba990a0a', href: this.href || undefined, onMouseDown: this.handleClick, id: this.optId, class: {
|
87
87
|
option: true,
|
88
88
|
'option--selected': this.selected,
|
89
89
|
'option--disabled': this.disabled,
|
90
90
|
'option--novalue': !this.value,
|
91
|
-
} }, h("div", { key: '
|
91
|
+
} }, h("div", { key: 'fa5ce294668b860ac56cb0b436379057eebb275e', part: "check-icon", class: "option__check" }, h("slot", { key: '2592c5a5435e45023c0cb4b650d43a4cda29928d', name: "check-icon" }, h("nano-icon", { key: '2ad41f653575adc67328f3cea2eb39d3720ad400', name: "light/check", "aria-hidden": "true" }))), h("div", { key: '0d7c8d24179350d535095a0c990e3ac46bdc4a03', part: "start", class: "option__start" }, h("slot", { key: '4d06de2b71ab9b00aa56ba87a09fdaa432b55b59', name: "start" })), h("div", { key: '5e05e3a353da6d50ad54f5ce3b5b63d496a2581b', part: "label", class: "option__label" }, h("slot", { key: '22acfe355130ea11be35f8abb2529476e67e9ab4' }, this.label || this.value)), h("div", { key: '016938a4d89ca5188dc4f7c20b7cd7fedb51cc44', part: "end", class: "option__end" }, h("slot", { key: 'b8c0caa513d3089d607189cb673c9d78e424fabb', name: "end" })))));
|
92
92
|
}
|
93
93
|
static get is() { return "nano-option"; }
|
94
94
|
static get encapsulation() { return "shadow"; }
|
@@ -51,7 +51,7 @@ nano-progress-bar {
|
|
51
51
|
position: relative;
|
52
52
|
overflow: clip;
|
53
53
|
border-radius: var(--border-radius);
|
54
|
-
|
54
|
+
block-size: var(--height);
|
55
55
|
font-size: var(--height);
|
56
56
|
}
|
57
57
|
nano-progress-bar[size=small] {
|
@@ -62,8 +62,8 @@ nano-progress-bar[size=large] {
|
|
62
62
|
}
|
63
63
|
nano-progress-bar progress {
|
64
64
|
appearance: none;
|
65
|
-
|
66
|
-
|
65
|
+
inline-size: 100%;
|
66
|
+
block-size: inherit;
|
67
67
|
border-radius: var(--border-radius);
|
68
68
|
background-color: var(--track-color);
|
69
69
|
grid-area: 1/1;
|
@@ -79,7 +79,7 @@ nano-progress-bar > label progress {
|
|
79
79
|
}
|
80
80
|
nano-progress-bar:has(progress:not([value]))::after {
|
81
81
|
content: "";
|
82
|
-
|
82
|
+
inline-size: 100%;
|
83
83
|
inset: 0;
|
84
84
|
display: block;
|
85
85
|
transform: translateZ(0);
|
@@ -125,7 +125,7 @@ nano-progress-bar[show-percent] progress[value]::before {
|
|
125
125
|
position: absolute;
|
126
126
|
inline-size: attr(value %);
|
127
127
|
min-inline-size: 6%;
|
128
|
-
|
128
|
+
inset-block-start: 50%;
|
129
129
|
translate: 0 -50%;
|
130
130
|
text-align: center;
|
131
131
|
transition: inline-size var(--nano-transition-fast);
|
@@ -227,7 +227,7 @@ export class ResizeObserve {
|
|
227
227
|
this.ro.disconnect();
|
228
228
|
}
|
229
229
|
render() {
|
230
|
-
return (h(Host, { key: '
|
230
|
+
return (h(Host, { key: '110989d9ed5b1b40b76f9c8e641d5fdc95f0cdc3', class: "nano-resize-observe" }, h("slot", { key: '817b25ecae05e920029170061a31b03b3a155b53' }), !!this.notifyContentFit &&
|
231
231
|
(this.contentFitX !== null || this.contentFitY !== null) && [
|
232
232
|
this.contentFitX ? (h("slot", { name: "content-fit-x" })) : (h("slot", { name: "content-nofit-x" })),
|
233
233
|
this.contentFitY ? (h("slot", { name: "content-fit-y" })) : (h("slot", { name: "content-nofit-y" })),
|
@@ -358,7 +358,7 @@ label.visually-hide,
|
|
358
358
|
display: grid;
|
359
359
|
grid-template-areas: "overlay";
|
360
360
|
}
|
361
|
-
:host(:not(.is-invalid
|
361
|
+
:host(:not(.is-invalid, .is-valid)) .form-ctrl__validation-icon {
|
362
362
|
display: none;
|
363
363
|
}
|
364
364
|
|
@@ -113,7 +113,9 @@ export class Select {
|
|
113
113
|
* String to place within a label element. Alternatively you may use a label slot.
|
114
114
|
*/
|
115
115
|
get label() {
|
116
|
-
return this.required && !this._label.endsWith('*')
|
116
|
+
return this.required && !this._label.endsWith('*')
|
117
|
+
? this._label + ' *'
|
118
|
+
: this._label;
|
117
119
|
}
|
118
120
|
set label(value) {
|
119
121
|
this._label = value;
|
@@ -701,30 +703,30 @@ export class Select {
|
|
701
703
|
disabled,
|
702
704
|
clearControl: this.clearable,
|
703
705
|
}))(this);
|
704
|
-
return (h(Host, { key: '
|
706
|
+
return (h(Host, { key: '176a0d6fb53c170c355d6a65446e063a509ffb6a', type: this.multiple ? 'select-multiple' : 'select-one', "aria-disabled": this.disabled ? 'true' : null, class: {
|
705
707
|
'has-value': !!this.value.length || !!this.inputSearchVal.length,
|
706
708
|
'has-focus': this.hasFocus,
|
707
709
|
'is-invalid': this._invalid === true,
|
708
710
|
'is-valid': this._invalid === false,
|
709
711
|
'nano-select': true,
|
710
|
-
} }, h(FormControlWrap, { key: '
|
712
|
+
} }, h(FormControlWrap, { key: '37984e991141b3cc49952e422b6e05d4ee60b797', ...wrapOptions, class: {
|
711
713
|
'has-error': !!this.errorMessage &&
|
712
714
|
this.showInlineError &&
|
713
715
|
this._invalid === true,
|
714
716
|
'has-helper': this.hasHelperSlot,
|
715
717
|
'is-open': this.hasOpened,
|
716
718
|
masked: this.mask,
|
717
|
-
} }, h(FormControl, { key: '
|
718
|
-
this.mask && (h("div", { key: '
|
719
|
-
h("input", { key: '
|
720
|
-
])), !this.readonly && !this.disabled && (h("nano-datalist", { key: '
|
719
|
+
} }, h(FormControl, { key: '2ba3a6dba6398baaa6666c8433fbef51965cbfa0', ...controlOptions, ref: (el) => (this.selectWrap = el), onClearText: this.clearSelectValue, control: this.el, endValueSlot: h("slot", { name: "down-arrow" }, h("nano-icon", { class: "select__down-arrow", name: "light/chevron-down" })), showInlineError: this.showInlineError }, this.multiple && (h("div", { key: 'c98ceed9279e96fcf40b94634ba3d2462dae8c40', class: "select__multi-wrap select" }, this.multipleValues(labelId, moreId, helperEndId))), !this.multiple && [
|
720
|
+
this.mask && (h("div", { key: '3aeb73d315a15554913d83d55082371901b76fde', class: "select__mask" }, this.getLabel(this.value))),
|
721
|
+
h("input", { key: 'cce66d2d18e7f5ba1235ede4fee57b4f67a8a157', ref: (input) => (this.inputCtrl = input), id: this.selectId, class: "select__native-input", "aria-labelledby": labelId + ' ' + moreId + ' ' + helperEndId, disabled: this.disabled, form: this.form, placeholder: this.placeholder, readOnly: true, required: this.required, value: this.getLabel(this.value), onFocus: this.onFocus }),
|
722
|
+
])), !this.readonly && !this.disabled && (h("nano-datalist", { key: '76a86645ba7119bb9e9cfc95782c6d911761b315', ref: (el) => (this.datalist = el), selected: this.valArray, type: this.multiple ? 'selectMulti' : 'select', options: this._options.length ? this._options : undefined, onNanoDeselect: (e) => {
|
721
723
|
e.preventDefault();
|
722
724
|
this.removeValue(e.detail.value);
|
723
725
|
}, onNanoOptionsUpdated: this.setOptions, onNanoSelect: this.setValue,
|
724
726
|
// @ts-expect-error - this bubbles from the nano-dropdown
|
725
727
|
onNanoShow: () => (this.hasOpened = true), onNanoHide: () => (this.hasOpened = false) }, this.allowCustomValues &&
|
726
728
|
this.multiple &&
|
727
|
-
!!this.inputSearchVal && (h("nano-option", { key: '
|
729
|
+
!!this.inputSearchVal && (h("nano-option", { key: '31bc6caa39d7675249e7e6e2edd9756b3b24fe2a', slot: "list-top", value: this.inputSearchVal, selected: false, label: this.inputSearchVal, onNanoSelect: () => this.inputCtrl.focus() }, h("span", { key: 'b5cd544bb04a692ea31b61428c89d4095b09347f', slot: "check-icon" }), "Add '", this.inputSearchVal, "'")), h("slot", { key: 'c9e265690baa4c48609b9ea4e05555d762cc759c' }))), h("select", { key: 'bbae26688eafd95609c5b17dfe7b7a2083de5967', id: this.selectId + '-hidden', class: "select__native-ctrl", ref: (select) => (this.nativeSelect = select), "aria-labelledby": labelId + ' ' + moreId + ' ' + helperEndId, disabled: this.disabled, form: this.form, multiple: this.multiple, name: this.name, required: this.required, onInvalid: this.handleInvalid }, this.allowCustomValues &&
|
728
730
|
this.valArray.map((val) => {
|
729
731
|
return (h("option", { value: val, selected: true }, val));
|
730
732
|
}), !this.allowCustomValues &&
|