@ukic/web-components 3.25.0 → 3.27.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/components/OpenInNew.js +5 -0
- package/components/OpenInNew.js.map +1 -0
- package/components/check-icon.js +8 -0
- package/components/check-icon.js.map +1 -0
- package/components/chevron-icon.js +8 -0
- package/components/chevron-icon.js.map +1 -0
- package/components/close-icon.js +10 -0
- package/components/close-icon.js.map +1 -0
- package/components/constants.js +184 -0
- package/components/constants.js.map +1 -0
- package/components/custom-elements.d.ts +2 -0
- package/components/helpers.js +547 -0
- package/components/helpers.js.map +1 -0
- package/components/ic-accordion-group.d.ts +11 -0
- package/components/ic-accordion-group.js +191 -0
- package/components/ic-accordion-group.js.map +1 -0
- package/components/ic-accordion.d.ts +11 -0
- package/components/ic-accordion.js +188 -0
- package/components/ic-accordion.js.map +1 -0
- package/components/ic-action-chip.d.ts +11 -0
- package/components/ic-action-chip.js +164 -0
- package/components/ic-action-chip.js.map +1 -0
- package/components/ic-alert.d.ts +11 -0
- package/components/ic-alert.js +193 -0
- package/components/ic-alert.js.map +1 -0
- package/components/ic-back-to-top.d.ts +11 -0
- package/components/ic-back-to-top.js +216 -0
- package/components/ic-back-to-top.js.map +1 -0
- package/components/ic-badge.d.ts +11 -0
- package/components/ic-badge.js +222 -0
- package/components/ic-badge.js.map +1 -0
- package/components/ic-breadcrumb-group.d.ts +11 -0
- package/components/ic-breadcrumb-group.js +278 -0
- package/components/ic-breadcrumb-group.js.map +1 -0
- package/components/ic-breadcrumb.d.ts +11 -0
- package/components/ic-breadcrumb.js +8 -0
- package/components/ic-breadcrumb.js.map +1 -0
- package/components/ic-breadcrumb2.js +145 -0
- package/components/ic-breadcrumb2.js.map +1 -0
- package/components/ic-button.d.ts +11 -0
- package/components/ic-button.js +8 -0
- package/components/ic-button.js.map +1 -0
- package/components/ic-button2.js +509 -0
- package/components/ic-button2.js.map +1 -0
- package/components/ic-card-horizontal.d.ts +11 -0
- package/components/ic-card-horizontal.js +214 -0
- package/components/ic-card-horizontal.js.map +1 -0
- package/components/ic-card-vertical.d.ts +11 -0
- package/components/ic-card-vertical.js +219 -0
- package/components/ic-card-vertical.js.map +1 -0
- package/components/ic-checkbox-group.d.ts +11 -0
- package/components/ic-checkbox-group.js +198 -0
- package/components/ic-checkbox-group.js.map +1 -0
- package/components/ic-checkbox.d.ts +11 -0
- package/components/ic-checkbox.js +202 -0
- package/components/ic-checkbox.js.map +1 -0
- package/components/ic-chip.d.ts +11 -0
- package/components/ic-chip.js +183 -0
- package/components/ic-chip.js.map +1 -0
- package/components/ic-classification-banner.d.ts +11 -0
- package/components/ic-classification-banner.js +102 -0
- package/components/ic-classification-banner.js.map +1 -0
- package/components/ic-data-list.d.ts +11 -0
- package/components/ic-data-list.js +63 -0
- package/components/ic-data-list.js.map +1 -0
- package/components/ic-data-row.d.ts +11 -0
- package/components/ic-data-row.js +115 -0
- package/components/ic-data-row.js.map +1 -0
- package/components/ic-dialog.d.ts +11 -0
- package/components/ic-dialog.js +366 -0
- package/components/ic-dialog.js.map +1 -0
- package/components/ic-divider.d.ts +11 -0
- package/components/ic-divider.js +8 -0
- package/components/ic-divider.js.map +1 -0
- package/components/ic-divider2.js +148 -0
- package/components/ic-divider2.js.map +1 -0
- package/components/ic-empty-state.d.ts +11 -0
- package/components/ic-empty-state.js +82 -0
- package/components/ic-empty-state.js.map +1 -0
- package/components/ic-footer-link-group.d.ts +11 -0
- package/components/ic-footer-link-group.js +101 -0
- package/components/ic-footer-link-group.js.map +1 -0
- package/components/ic-footer-link.d.ts +11 -0
- package/components/ic-footer-link.js +95 -0
- package/components/ic-footer-link.js.map +1 -0
- package/components/ic-footer.d.ts +11 -0
- package/components/ic-footer.js +156 -0
- package/components/ic-footer.js.map +1 -0
- package/components/ic-hero.d.ts +11 -0
- package/components/ic-hero.js +145 -0
- package/components/ic-hero.js.map +1 -0
- package/components/ic-horizontal-scroll.d.ts +11 -0
- package/components/ic-horizontal-scroll.js +8 -0
- package/components/ic-horizontal-scroll.js.map +1 -0
- package/components/ic-horizontal-scroll2.js +240 -0
- package/components/ic-horizontal-scroll2.js.map +1 -0
- package/components/ic-input-component-container.d.ts +11 -0
- package/components/ic-input-component-container.js +8 -0
- package/components/ic-input-component-container.js.map +1 -0
- package/components/ic-input-component-container2.js +95 -0
- package/components/ic-input-component-container2.js.map +1 -0
- package/components/ic-input-container.d.ts +11 -0
- package/components/ic-input-container.js +8 -0
- package/components/ic-input-container.js.map +1 -0
- package/components/ic-input-container2.js +47 -0
- package/components/ic-input-container2.js.map +1 -0
- package/components/ic-input-label.d.ts +11 -0
- package/components/ic-input-label.js +8 -0
- package/components/ic-input-label.js.map +1 -0
- package/components/ic-input-label2.js +121 -0
- package/components/ic-input-label2.js.map +1 -0
- package/components/ic-input-validation.d.ts +11 -0
- package/components/ic-input-validation.js +8 -0
- package/components/ic-input-validation.js.map +1 -0
- package/components/ic-input-validation2.js +90 -0
- package/components/ic-input-validation2.js.map +1 -0
- package/components/ic-layout-grid-item.d.ts +11 -0
- package/components/ic-layout-grid-item.js +95 -0
- package/components/ic-layout-grid-item.js.map +1 -0
- package/components/ic-layout-grid.d.ts +11 -0
- package/components/ic-layout-grid.js +188 -0
- package/components/ic-layout-grid.js.map +1 -0
- package/components/ic-link.d.ts +11 -0
- package/components/ic-link.js +8 -0
- package/components/ic-link.js.map +1 -0
- package/components/ic-link2.js +135 -0
- package/components/ic-link2.js.map +1 -0
- package/components/ic-loading-indicator.d.ts +11 -0
- package/components/ic-loading-indicator.js +8 -0
- package/components/ic-loading-indicator.js.map +1 -0
- package/components/ic-loading-indicator2.js +278 -0
- package/components/ic-loading-indicator2.js.map +1 -0
- package/components/ic-menu-group.d.ts +11 -0
- package/components/ic-menu-group.js +47 -0
- package/components/ic-menu-group.js.map +1 -0
- package/components/ic-menu-item.d.ts +11 -0
- package/components/ic-menu-item.js +8 -0
- package/components/ic-menu-item.js.map +1 -0
- package/components/ic-menu-item2.js +171 -0
- package/components/ic-menu-item2.js.map +1 -0
- package/components/ic-menu.d.ts +11 -0
- package/components/ic-menu.js +8 -0
- package/components/ic-menu.js.map +1 -0
- package/components/ic-menu2.js +2590 -0
- package/components/ic-menu2.js.map +1 -0
- package/components/ic-navigation-button.d.ts +11 -0
- package/components/ic-navigation-button.js +175 -0
- package/components/ic-navigation-button.js.map +1 -0
- package/components/ic-navigation-group.d.ts +11 -0
- package/components/ic-navigation-group.js +326 -0
- package/components/ic-navigation-group.js.map +1 -0
- package/components/ic-navigation-item.d.ts +11 -0
- package/components/ic-navigation-item.js +294 -0
- package/components/ic-navigation-item.js.map +1 -0
- package/components/ic-navigation-menu.d.ts +11 -0
- package/components/ic-navigation-menu.js +8 -0
- package/components/ic-navigation-menu.js.map +1 -0
- package/components/ic-navigation-menu2.js +188 -0
- package/components/ic-navigation-menu2.js.map +1 -0
- package/components/ic-page-header.d.ts +11 -0
- package/components/ic-page-header.js +196 -0
- package/components/ic-page-header.js.map +1 -0
- package/components/ic-pagination-bar.d.ts +11 -0
- package/components/ic-pagination-bar.js +523 -0
- package/components/ic-pagination-bar.js.map +1 -0
- package/components/ic-pagination-item.d.ts +11 -0
- package/components/ic-pagination-item.js +8 -0
- package/components/ic-pagination-item.js.map +1 -0
- package/components/ic-pagination-item2.js +107 -0
- package/components/ic-pagination-item2.js.map +1 -0
- package/components/ic-pagination.d.ts +11 -0
- package/components/ic-pagination.js +8 -0
- package/components/ic-pagination.js.map +1 -0
- package/components/ic-pagination2.js +379 -0
- package/components/ic-pagination2.js.map +1 -0
- package/components/ic-popover-menu.d.ts +11 -0
- package/components/ic-popover-menu.js +369 -0
- package/components/ic-popover-menu.js.map +1 -0
- package/components/ic-radio-group.d.ts +11 -0
- package/components/ic-radio-group.js +317 -0
- package/components/ic-radio-group.js.map +1 -0
- package/components/ic-radio-option.d.ts +11 -0
- package/components/ic-radio-option.js +211 -0
- package/components/ic-radio-option.js.map +1 -0
- package/components/ic-search-bar.d.ts +11 -0
- package/components/ic-search-bar.js +719 -0
- package/components/ic-search-bar.js.map +1 -0
- package/components/ic-section-container.d.ts +11 -0
- package/components/ic-section-container.js +8 -0
- package/components/ic-section-container.js.map +1 -0
- package/components/ic-section-container2.js +50 -0
- package/components/ic-section-container2.js.map +1 -0
- package/components/ic-select.d.ts +11 -0
- package/components/ic-select.js +8 -0
- package/components/ic-select.js.map +1 -0
- package/components/ic-select2.js +806 -0
- package/components/ic-select2.js.map +1 -0
- package/components/ic-side-navigation.d.ts +11 -0
- package/components/ic-side-navigation.js +568 -0
- package/components/ic-side-navigation.js.map +1 -0
- package/components/ic-skeleton.d.ts +11 -0
- package/components/ic-skeleton.js +81 -0
- package/components/ic-skeleton.js.map +1 -0
- package/components/ic-skip-link.d.ts +11 -0
- package/components/ic-skip-link.js +91 -0
- package/components/ic-skip-link.js.map +1 -0
- package/components/ic-status-tag.d.ts +11 -0
- package/components/ic-status-tag.js +85 -0
- package/components/ic-status-tag.js.map +1 -0
- package/components/ic-step.d.ts +11 -0
- package/components/ic-step.js +200 -0
- package/components/ic-step.js.map +1 -0
- package/components/ic-stepper.d.ts +11 -0
- package/components/ic-stepper.js +340 -0
- package/components/ic-stepper.js.map +1 -0
- package/components/ic-switch.d.ts +11 -0
- package/components/ic-switch.js +164 -0
- package/components/ic-switch.js.map +1 -0
- package/components/ic-tab-context.d.ts +11 -0
- package/components/ic-tab-context.js +275 -0
- package/components/ic-tab-context.js.map +1 -0
- package/components/ic-tab-group.d.ts +11 -0
- package/components/ic-tab-group.js +89 -0
- package/components/ic-tab-group.js.map +1 -0
- package/components/ic-tab-panel.d.ts +11 -0
- package/components/ic-tab-panel.js +63 -0
- package/components/ic-tab-panel.js.map +1 -0
- package/components/ic-tab.d.ts +11 -0
- package/components/ic-tab.js +143 -0
- package/components/ic-tab.js.map +1 -0
- package/components/ic-text-field.d.ts +11 -0
- package/components/ic-text-field.js +8 -0
- package/components/ic-text-field.js.map +1 -0
- package/components/ic-text-field2.js +532 -0
- package/components/ic-text-field2.js.map +1 -0
- package/components/ic-theme.d.ts +11 -0
- package/components/ic-theme.js +105 -0
- package/components/ic-theme.js.map +1 -0
- package/components/ic-toast-region.d.ts +11 -0
- package/components/ic-toast-region.js +76 -0
- package/components/ic-toast-region.js.map +1 -0
- package/components/ic-toast.d.ts +11 -0
- package/components/ic-toast.js +295 -0
- package/components/ic-toast.js.map +1 -0
- package/components/ic-toggle-button-group.d.ts +11 -0
- package/components/ic-toggle-button-group.js +323 -0
- package/components/ic-toggle-button-group.js.map +1 -0
- package/components/ic-toggle-button.d.ts +11 -0
- package/components/ic-toggle-button.js +235 -0
- package/components/ic-toggle-button.js.map +1 -0
- package/components/ic-tooltip.d.ts +11 -0
- package/components/ic-tooltip.js +8 -0
- package/components/ic-tooltip.js.map +1 -0
- package/components/ic-tooltip2.js +2078 -0
- package/components/ic-tooltip2.js.map +1 -0
- package/components/ic-top-navigation.d.ts +11 -0
- package/components/ic-top-navigation.js +320 -0
- package/components/ic-top-navigation.js.map +1 -0
- package/components/ic-typography.d.ts +11 -0
- package/components/ic-typography.js +8 -0
- package/components/ic-typography.js.map +1 -0
- package/components/ic-typography2.js +228 -0
- package/components/ic-typography2.js.map +1 -0
- package/components/index.d.ts +33 -0
- package/components/index.js +4 -0
- package/components/index.js.map +1 -0
- package/components/package.json +9 -0
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +63 -37
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination_3.cjs.entry.js +17 -17
- package/dist/cjs/ic-pagination_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-section-container.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +12 -8
- package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ic-menu/ic-menu.css +19 -0
- package/dist/collection/components/ic-menu/ic-menu.js +62 -36
- package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
- package/dist/collection/components/ic-menu/ic-menu.types.js.map +1 -1
- package/dist/collection/components/ic-select/ic-select.js +17 -17
- package/dist/collection/components/ic-select/ic-select.js.map +1 -1
- package/dist/collection/components/ic-select/ic-select_(single).stories.js +54 -0
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +33 -9
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.stories.js +26 -0
- package/dist/components/ic-menu2.js +63 -37
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-page-header.js.map +1 -1
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-select2.js +17 -17
- package/dist/components/ic-select2.js.map +1 -1
- package/dist/components/ic-top-navigation.js +13 -8
- package/dist/components/ic-top-navigation.js.map +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-46e5a58b.entry.js → p-12474095.entry.js} +2 -2
- package/dist/core/p-12474095.entry.js.map +1 -0
- package/dist/core/p-98dee727.entry.js.map +1 -1
- package/dist/core/p-d1220d2a.entry.js.map +1 -1
- package/dist/core/p-e0b66371.entry.js +2 -0
- package/dist/core/p-e0b66371.entry.js.map +1 -0
- package/dist/core/{p-171a19bf.entry.js → p-fdc4376e.entry.js} +2 -2
- package/dist/core/p-fdc4376e.entry.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-input-component-container_3.entry.js +63 -37
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-pagination_3.entry.js +17 -17
- package/dist/esm/ic-pagination_3.entry.js.map +1 -1
- package/dist/esm/ic-section-container.entry.js.map +1 -1
- package/dist/esm/ic-top-navigation.entry.js +12 -8
- package/dist/esm/ic-top-navigation.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-menu/ic-menu.types.d.ts +1 -0
- package/dist/types/components/ic-top-navigation/ic-top-navigation.d.ts +4 -1
- package/dist/types/components.d.ts +10 -2
- package/hydrate/index.js +93 -62
- package/hydrate/index.mjs +93 -62
- package/package.json +4 -2
- package/vscode-data.json +5 -1
- package/dist/core/p-171a19bf.entry.js.map +0 -1
- package/dist/core/p-343670b4.entry.js +0 -2
- package/dist/core/p-343670b4.entry.js.map +0 -1
- package/dist/core/p-46e5a58b.entry.js.map +0 -1
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { r as removeDisabledFalse, R as capitalize } from './helpers.js';
|
|
3
|
+
import { d as defineCustomElement$1 } from './ic-typography2.js';
|
|
4
|
+
|
|
5
|
+
const icPaginationItemCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}a{text-align:center}.item-container{display:flex;justify-content:center;align-items:center;width:calc(var(--ic-space-xl) + var(--ic-space-sm));height:var(--ic-space-xl);margin:var(--ic-space-xxs) var(--ic-space-xxxs);cursor:pointer;text-decoration:none}button{background:none;border:none;outline:inherit;position:relative}.ellipsis{pointer-events:none;--ic-typography-color:var(--ic-pagination-ellipsis)}.monochrome .ellipsis{--ic-typography-color:var(--ic-pagination-ellipsis-monochrome)}.item-container:focus{box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline);border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-fast)}.page{--ic-typography-color:var(--ic-pagination-page-number)}.monochrome .page{--ic-typography-color:var(--ic-pagination-page-number-monochrome)}.simple-current{min-width:calc(var(--ic-space-xxl) + var(--ic-space-md));height:var(--ic-space-lg);cursor:default}.item-container.page:hover:not(.selected):not(:focus){border-radius:var(--ic-border-radius);background-color:var(--ic-pagination-hover)}.item-container.page:active:not(.selected):not(:focus){background-color:var(--ic-pagination-pressed)}.monochrome .item-container.page:hover:not(.selected):not(:focus){background-color:var(--ic-pagination-hover-monochrome)}.monochrome .item-container.page:active:not(.selected):not(:focus){background-color:var(--ic-pagination-pressed-monochrome)}.selected{pointer-events:none;outline:none}.selected::after{content:\"\";height:var(--ic-space-xxs);width:100%;position:absolute;bottom:0;background-color:var(--ic-pagination-selected-banner)}.monochrome .selected::after{background-color:var(--ic-pagination-selected-banner-monochrome)}.page-selected{--ic-typography-color:var(--ic-pagination-text)}.item-container.page.light:hover:not(.selected):not(:focus){background-color:var(--ic-action-light-bg-hover)}.item-container.page.light:active:not(.selected):not(:focus){background-color:var(--ic-action-light-bg-pressed)}ic-typography.light,ic-typography.page-selected.light{--ic-typography-color:var(--ic-architectural-white)}.selected.light::after{content:\"\";height:var(--ic-space-xxs);width:100%;position:absolute;bottom:0;background-color:var(--ic-action-monochrome)}.item-container.page.dark:hover:not(.selected):not(:focus){background-color:var(--ic-action-dark-bg-hover)}.item-container.page.dark:active:not(.selected):not(:focus){background-color:var(--ic-action-dark-bg-pressed)}ic-typography.dark{--ic-typography-color:var(--ic-color-text-primary)}.selected.dark::after{content:\"\";height:var(--ic-space-xxs);width:100%;position:absolute;bottom:0;background-color:var(--ic-action-monochrome-dark)}.disabled{--ic-typography-color:var(--ic-pagination-text-disabled);pointer-events:none;cursor:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.disabled.page ic-typography{--ic-typography-color:var(--ic-pagination-page-number-disabled)}.disabled.ellipsis{--ic-typography-color:var(--ic-pagination-ellipsis-disabled)}.monochrome .disabled.page{--ic-typography-color:var(--ic-pagination-page-number-monochrome-disabled)}.monochrome .disabled.ellipsis{--ic-typography-color:var(--ic-pagination-ellipsis-monochrome-disabled)}@media (forced-colors: active){.selected::after{background-color:Highlight}.selected.light::after{background-color:Highlight}.selected.dark::after{background-color:Highlight}.disabled{--ic-typography-color:GrayText}}@media (prefers-reduced-motion: reduce){.item-container:focus{transition:none}}";
|
|
6
|
+
const IcPaginationItemStyle0 = icPaginationItemCss;
|
|
7
|
+
|
|
8
|
+
const PaginationItem = /*@__PURE__*/ proxyCustomElement(class PaginationItem extends HTMLElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
this.__attachShadow();
|
|
13
|
+
this.paginationItemClick = createEvent(this, "paginationItemClick", 7);
|
|
14
|
+
/**
|
|
15
|
+
* If `true`, the pagination item will be disabled.
|
|
16
|
+
*/
|
|
17
|
+
this.disabled = false;
|
|
18
|
+
/**
|
|
19
|
+
* The label for the pagination item (applicable when simple pagination is being used).
|
|
20
|
+
*/
|
|
21
|
+
this.label = "Page";
|
|
22
|
+
/**
|
|
23
|
+
* If `true`, the pagination item will display as black in the light theme, and white in dark theme.
|
|
24
|
+
*/
|
|
25
|
+
this.monochrome = false;
|
|
26
|
+
/**
|
|
27
|
+
* If `true`, the pagination item will be selected.
|
|
28
|
+
*/
|
|
29
|
+
this.selected = false;
|
|
30
|
+
/**
|
|
31
|
+
* Sets the theme color to the dark or light theme color. "inherit" will set the color based on the system settings or ic-theme component.
|
|
32
|
+
*/
|
|
33
|
+
this.theme = "inherit";
|
|
34
|
+
this.handleClick = () => {
|
|
35
|
+
this.paginationItemClick.emit({ page: this.page || null });
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
watchDisabledHandler() {
|
|
39
|
+
removeDisabledFalse(this.disabled, this.el);
|
|
40
|
+
}
|
|
41
|
+
watchLabelHandler() {
|
|
42
|
+
this.capitalizedLabel = capitalize(this.label);
|
|
43
|
+
}
|
|
44
|
+
componentWillLoad() {
|
|
45
|
+
this.watchLabelHandler();
|
|
46
|
+
removeDisabledFalse(this.disabled, this.el);
|
|
47
|
+
}
|
|
48
|
+
render() {
|
|
49
|
+
const { page, selected, type, disabled, label, capitalizedLabel, monochrome, } = this;
|
|
50
|
+
return (h("a", { key: '1ed788f91d47fcaf163a11cf910c9269ca83466c', class: { ["monochrome"]: !!monochrome } }, type === "ellipsis" ? (h("div", { class: {
|
|
51
|
+
["item-container"]: true,
|
|
52
|
+
["ellipsis"]: true,
|
|
53
|
+
["disabled"]: !!disabled,
|
|
54
|
+
} }, h("ic-typography", { variant: "label" }, "..."))) : type === "page" ? (h("button", { disabled: disabled, onClick: this.handleClick, tabindex: selected ? "-1" : "0", role: "button", "aria-current": selected && "page", "aria-label": selected ? `${label}: ${page}` : `Go to ${label} ${page}`, class: {
|
|
55
|
+
["selected"]: !disabled && selected,
|
|
56
|
+
["disabled"]: !!disabled,
|
|
57
|
+
["item-container"]: true,
|
|
58
|
+
["page"]: type === "page",
|
|
59
|
+
} }, h("ic-typography", { variant: "label", class: {
|
|
60
|
+
["page-selected"]: selected,
|
|
61
|
+
["disabled"]: !!disabled,
|
|
62
|
+
} }, page))) : (h("ic-typography", { "aria-live": "polite", class: {
|
|
63
|
+
[`simple-current`]: true,
|
|
64
|
+
["disabled"]: !!disabled,
|
|
65
|
+
}, variant: "label" }, capitalizedLabel, " ", page))));
|
|
66
|
+
}
|
|
67
|
+
get el() { return this; }
|
|
68
|
+
static get watchers() { return {
|
|
69
|
+
"disabled": ["watchDisabledHandler"],
|
|
70
|
+
"label": ["watchLabelHandler"]
|
|
71
|
+
}; }
|
|
72
|
+
static get style() { return IcPaginationItemStyle0; }
|
|
73
|
+
}, [1, "ic-pagination-item", {
|
|
74
|
+
"disabled": [4],
|
|
75
|
+
"label": [1],
|
|
76
|
+
"monochrome": [4],
|
|
77
|
+
"page": [2],
|
|
78
|
+
"selected": [4],
|
|
79
|
+
"theme": [1],
|
|
80
|
+
"type": [1],
|
|
81
|
+
"capitalizedLabel": [32]
|
|
82
|
+
}, undefined, {
|
|
83
|
+
"disabled": ["watchDisabledHandler"],
|
|
84
|
+
"label": ["watchLabelHandler"]
|
|
85
|
+
}]);
|
|
86
|
+
function defineCustomElement() {
|
|
87
|
+
if (typeof customElements === "undefined") {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
const components = ["ic-pagination-item", "ic-typography"];
|
|
91
|
+
components.forEach(tagName => { switch (tagName) {
|
|
92
|
+
case "ic-pagination-item":
|
|
93
|
+
if (!customElements.get(tagName)) {
|
|
94
|
+
customElements.define(tagName, PaginationItem);
|
|
95
|
+
}
|
|
96
|
+
break;
|
|
97
|
+
case "ic-typography":
|
|
98
|
+
if (!customElements.get(tagName)) {
|
|
99
|
+
defineCustomElement$1();
|
|
100
|
+
}
|
|
101
|
+
break;
|
|
102
|
+
} });
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export { PaginationItem as P, defineCustomElement as d };
|
|
106
|
+
|
|
107
|
+
//# sourceMappingURL=ic-pagination-item2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ic-pagination-item2.js","mappings":";;;;AAAA,MAAM,mBAAmB,GAAG,2yLAA2yL,CAAC;AACx0L,+BAAe,mBAAmB;;MCkBrB,cAAc;IAL3B;;;;;;;;QAaU,aAAQ,GAAa,KAAK,CAAC;;;;QAS3B,UAAK,GAAY,MAAM,CAAC;;;;QAUxB,eAAU,GAAa,KAAK,CAAC;;;;QAU7B,aAAQ,GAAY,KAAK,CAAC;;;;QAK1B,UAAK,GAAiB,SAAS,CAAC;QAiBhC,gBAAW,GAAG;YACpB,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC;SAC5D,CAAC;KAmEH;IAtHC,oBAAoB;QAClB,mBAAmB,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;KAC7C;IAQD,iBAAiB;QACf,IAAI,CAAC,gBAAgB,GAAG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AET,kCACY,QAAQ,EAClB,KAAK,EAAE;gBACL,CAAC,gBAAgB,GAAG,IAAI;gBACxB,CAAC,UAAU,GAAG,CAAC,CAAC,QAAQ;aACzB,EACD,OAAO,EAAC,OAAO,IAEd,gBAAgB,OAAG,IAAI,CACV,CACjB,CACC,EACJ;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-pagination-item/ic-pagination-item.css?tag=ic-pagination-item&encapsulation=shadow","src/components/ic-pagination-item/ic-pagination-item.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\na {\n text-align: center;\n}\n\n.item-container {\n display: flex;\n justify-content: center;\n align-items: center;\n width: calc(var(--ic-space-xl) + var(--ic-space-sm));\n height: var(--ic-space-xl);\n margin: var(--ic-space-xxs) var(--ic-space-xxxs);\n cursor: pointer;\n text-decoration: none;\n}\n\nbutton {\n background: none;\n border: none;\n outline: inherit;\n position: relative;\n}\n\n.ellipsis {\n pointer-events: none;\n\n --ic-typography-color: var(--ic-pagination-ellipsis);\n}\n\n.monochrome .ellipsis {\n --ic-typography-color: var(--ic-pagination-ellipsis-monochrome);\n}\n\n.item-container:focus {\n box-shadow: var(--ic-border-focus);\n outline: var(--ic-hc-focus-outline);\n border-radius: var(--ic-border-radius);\n transition: var(--ic-easing-transition-fast);\n}\n\n.page {\n --ic-typography-color: var(--ic-pagination-page-number);\n}\n\n.monochrome .page {\n --ic-typography-color: var(--ic-pagination-page-number-monochrome);\n}\n\n.simple-current {\n min-width: calc(var(--ic-space-xxl) + var(--ic-space-md));\n height: var(--ic-space-lg);\n cursor: default;\n}\n\n/** DEFAULT STATES **/\n.item-container.page:hover:not(.selected):not(:focus) {\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-pagination-hover);\n}\n\n.item-container.page:active:not(.selected):not(:focus) {\n background-color: var(--ic-pagination-pressed);\n}\n\n.monochrome .item-container.page:hover:not(.selected):not(:focus) {\n background-color: var(--ic-pagination-hover-monochrome);\n}\n\n.monochrome .item-container.page:active:not(.selected):not(:focus) {\n background-color: var(--ic-pagination-pressed-monochrome);\n}\n\n.selected {\n pointer-events: none;\n outline: none;\n}\n\n.selected::after {\n content: \"\";\n height: var(--ic-space-xxs);\n width: 100%;\n position: absolute;\n bottom: 0;\n background-color: var(--ic-pagination-selected-banner);\n}\n\n.monochrome .selected::after {\n background-color: var(--ic-pagination-selected-banner-monochrome);\n}\n\n.page-selected {\n --ic-typography-color: var(--ic-pagination-text);\n}\n\n/** LIGHT STATES **/\n.item-container.page.light:hover:not(.selected):not(:focus) {\n background-color: var(--ic-action-light-bg-hover);\n}\n\n.item-container.page.light:active:not(.selected):not(:focus) {\n background-color: var(--ic-action-light-bg-pressed);\n}\n\nic-typography.light,\nic-typography.page-selected.light {\n --ic-typography-color: var(--ic-architectural-white);\n}\n\n.selected.light::after {\n content: \"\";\n height: var(--ic-space-xxs);\n width: 100%;\n position: absolute;\n bottom: 0;\n background-color: var(--ic-action-monochrome);\n}\n\n/** DARK STATES **/\n.item-container.page.dark:hover:not(.selected):not(:focus) {\n background-color: var(--ic-action-dark-bg-hover);\n}\n\n.item-container.page.dark:active:not(.selected):not(:focus) {\n background-color: var(--ic-action-dark-bg-pressed);\n}\n\nic-typography.dark {\n --ic-typography-color: var(--ic-color-text-primary);\n}\n\n.selected.dark::after {\n content: \"\";\n height: var(--ic-space-xxs);\n width: 100%;\n position: absolute;\n bottom: 0;\n background-color: var(--ic-action-monochrome-dark);\n}\n\n.disabled {\n --ic-typography-color: var(--ic-pagination-text-disabled);\n\n pointer-events: none;\n cursor: none;\n user-select: none;\n}\n\n.disabled.page ic-typography {\n --ic-typography-color: var(--ic-pagination-page-number-disabled);\n}\n\n.disabled.ellipsis {\n --ic-typography-color: var(--ic-pagination-ellipsis-disabled);\n}\n\n.monochrome .disabled.page {\n --ic-typography-color: var(--ic-pagination-page-number-monochrome-disabled);\n}\n\n.monochrome .disabled.ellipsis {\n --ic-typography-color: var(--ic-pagination-ellipsis-monochrome-disabled);\n}\n\n@media (forced-colors: active) {\n .selected::after {\n background-color: Highlight;\n }\n\n .selected.light::after {\n background-color: Highlight;\n }\n\n .selected.dark::after {\n background-color: Highlight;\n }\n\n .disabled {\n --ic-typography-color: GrayText;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .item-container:focus {\n transition: none;\n }\n}\n","import {\n Component,\n Prop,\n State,\n Element,\n h,\n Event,\n EventEmitter,\n Watch,\n} from \"@stencil/core\";\nimport { IcPaginationItemType } from \"./ic-pagination-item.types\";\nimport { IcThemeMode } from \"../../utils/types\";\nimport { removeDisabledFalse, capitalize } from \"../../utils/helpers\";\n\n@Component({\n tag: \"ic-pagination-item\",\n styleUrl: \"ic-pagination-item.css\",\n shadow: true,\n})\nexport class PaginationItem {\n @Element() el: HTMLIcPaginationItemElement;\n\n @State() capitalizedLabel: string;\n\n /**\n * If `true`, the pagination item will be disabled.\n */\n @Prop() disabled?: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * The label for the pagination item (applicable when simple pagination is being used).\n */\n @Prop() label?: string = \"Page\";\n\n @Watch(\"label\")\n watchLabelHandler(): void {\n this.capitalizedLabel = capitalize(this.label!);\n }\n\n /**\n * If `true`, the pagination item will display as black in the light theme, and white in dark theme.\n */\n @Prop() monochrome?: boolean = false;\n\n /**\n * The current page number.\n */\n @Prop() page?: number;\n\n /**\n * If `true`, the pagination item will be selected.\n */\n @Prop() selected: boolean = false;\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * The type of pagination item - 'page' or 'ellipsis'.\n */\n @Prop() type: IcPaginationItemType;\n\n /**\n * @internal - Emitted when a pagination item is clicked.\n */\n @Event() paginationItemClick: EventEmitter<{ page: number | null }>;\n\n componentWillLoad(): void {\n this.watchLabelHandler();\n removeDisabledFalse(this.disabled, this.el);\n }\n\n private handleClick = () => {\n this.paginationItemClick.emit({ page: this.page || null });\n };\n\n render() {\n const {\n page,\n selected,\n type,\n disabled,\n label,\n capitalizedLabel,\n monochrome,\n } = this;\n\n return (\n <a class={{ [\"monochrome\"]: !!monochrome }}>\n {type === \"ellipsis\" ? (\n <div\n class={{\n [\"item-container\"]: true,\n [\"ellipsis\"]: true,\n [\"disabled\"]: !!disabled,\n }}\n >\n <ic-typography variant=\"label\">...</ic-typography>\n </div>\n ) : type === \"page\" ? (\n <button\n disabled={disabled}\n onClick={this.handleClick}\n tabindex={selected ? \"-1\" : \"0\"}\n role=\"button\"\n aria-current={selected && \"page\"}\n aria-label={\n selected ? `${label}: ${page}` : `Go to ${label} ${page}`\n }\n class={{\n [\"selected\"]: !disabled && selected,\n [\"disabled\"]: !!disabled,\n [\"item-container\"]: true,\n [\"page\"]: type === \"page\",\n }}\n >\n <ic-typography\n variant=\"label\"\n class={{\n [\"page-selected\"]: selected,\n [\"disabled\"]: !!disabled,\n }}\n >\n {page}\n </ic-typography>\n </button>\n ) : (\n <ic-typography\n aria-live=\"polite\"\n class={{\n [`simple-current`]: true,\n [\"disabled\"]: !!disabled,\n }}\n variant=\"label\"\n >\n {capitalizedLabel} {page}\n </ic-typography>\n )}\n </a>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IcPagination extends Components.IcPagination, HTMLElement {}
|
|
4
|
+
export const IcPagination: {
|
|
5
|
+
prototype: IcPagination;
|
|
6
|
+
new (): IcPagination;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { P as Pagination, d as defineCustomElement$1 } from './ic-pagination2.js';
|
|
2
|
+
|
|
3
|
+
const IcPagination = Pagination;
|
|
4
|
+
const defineCustomElement = defineCustomElement$1;
|
|
5
|
+
|
|
6
|
+
export { IcPagination, defineCustomElement };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=ic-pagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ic-pagination.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { r as removeDisabledFalse, o as onComponentRequiredPropUndefined } from './helpers.js';
|
|
3
|
+
import { d as defineCustomElement$5 } from './ic-button2.js';
|
|
4
|
+
import { d as defineCustomElement$4 } from './ic-loading-indicator2.js';
|
|
5
|
+
import { d as defineCustomElement$3 } from './ic-pagination-item2.js';
|
|
6
|
+
import { d as defineCustomElement$2 } from './ic-tooltip2.js';
|
|
7
|
+
import { d as defineCustomElement$1 } from './ic-typography2.js';
|
|
8
|
+
|
|
9
|
+
const paginationNextPrevious = `<svg width="8" height="10" viewBox="0 0 8 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
10
|
+
<path d="M2.08748 0L0.912476 1.175L4.72914 5L0.912476 8.825L2.08748 10L7.08748 5L2.08748 0Z" fill="currentColor"/>
|
|
11
|
+
</svg>
|
|
12
|
+
`;
|
|
13
|
+
|
|
14
|
+
const paginationFirstLast = `<svg width="12" height="10" viewBox="0 0 12 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
15
|
+
<path d="M11.1709 8.825L7.34589 5L11.1709 1.175L9.99589 0L4.99589 5L9.99589 10L11.1709 8.825ZM0.829224 0H2.49589V10H0.829224V0Z" fill="currentColour"/>
|
|
16
|
+
</svg>`;
|
|
17
|
+
|
|
18
|
+
const icPaginationCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{box-sizing:border-box;width:100%;display:flex;justify-content:center}nav{width:100%;display:flex;flex-flow:row wrap;justify-content:flex-start;align-items:center}ic-button{cursor:pointer}ic-button.next-previous{--icon-width:var(--ic-space-xs);--icon-height:calc(var(--ic-space-xs) + var(--ic-space-xxxs));padding:0 var(--ic-space-xxs) 0 var(--ic-space-xxxs)}ic-button.first-last{--icon-width:calc(var(--ic-space-sm) + var(--ic-space-xxxs));--icon-height:calc(var(--ic-space-xs) + var(--ic-space-xxxs))}ic-button.first-last::part(button),ic-button.next-previous::part(button){color:var(--ic-pagination-chevron)}:host(.ic-pagination-monochrome) ic-button.first-last::part(button),:host(.ic-pagination-monochrome) ic-button.next-previous::part(button){color:var(--ic-pagination-chevron-monochrome)}ic-button.ic-button-disabled.first-last::part(button),ic-button.ic-button-disabled.next-previous::part(button),:host(.ic-pagination-monochrome) ic-button.ic-button-disabled.first-last::part(button),:host(.ic-pagination-monochrome) ic-button.ic-button-disabled.next-previous::part(button){color:var(--ic-pagination-chevron-disabled)}.disabled{color:var(--ic-color-text-disabled-mid);pointer-events:none;cursor:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.hide-current-page{display:none}.sr-only{position:absolute;left:-9999px}.sr-only:dir(rtl){right:-9999px}";
|
|
19
|
+
const IcPaginationStyle0 = icPaginationCss;
|
|
20
|
+
|
|
21
|
+
const Pagination = /*@__PURE__*/ proxyCustomElement(class Pagination extends HTMLElement {
|
|
22
|
+
constructor() {
|
|
23
|
+
super();
|
|
24
|
+
this.__registerHost();
|
|
25
|
+
this.__attachShadow();
|
|
26
|
+
this.icPageChange = createEvent(this, "icPageChange", 7);
|
|
27
|
+
this.endEllipsis = false;
|
|
28
|
+
this.endItems = [];
|
|
29
|
+
this.midItems = [];
|
|
30
|
+
this.startEllipsis = false;
|
|
31
|
+
this.startItems = [];
|
|
32
|
+
/**
|
|
33
|
+
* The accessible label of the pagination component to provide context for screen reader users.
|
|
34
|
+
*/
|
|
35
|
+
this.accessibleLabel = "Pagination Navigation";
|
|
36
|
+
/**
|
|
37
|
+
* The number of pages displayed adjacent to the current page when using 'complex' type pagination. Accepted values are 0, 1 & 2.
|
|
38
|
+
*/
|
|
39
|
+
this.adjacentPageCount = 1;
|
|
40
|
+
/**
|
|
41
|
+
* The number of pages displayed as boundary items to the current page when using 'complex' type pagination. Accepted values are 0, 1 & 2.
|
|
42
|
+
*/
|
|
43
|
+
this.boundaryPageCount = 1;
|
|
44
|
+
/**
|
|
45
|
+
* The default page to display.
|
|
46
|
+
*/
|
|
47
|
+
this.defaultPage = 1;
|
|
48
|
+
/**
|
|
49
|
+
* If `true`, the pagination will not allow interaction.
|
|
50
|
+
*/
|
|
51
|
+
this.disabled = false;
|
|
52
|
+
/**
|
|
53
|
+
* If `true`, the current page of the simple pagination will not be displayed.
|
|
54
|
+
*/
|
|
55
|
+
this.hideCurrentPage = false;
|
|
56
|
+
/**
|
|
57
|
+
* If `true`, the first and last page buttons will not be displayed.
|
|
58
|
+
*/
|
|
59
|
+
this.hideFirstAndLastPageButton = false;
|
|
60
|
+
/**
|
|
61
|
+
* The label for the pagination item (applicable when simple pagination is being used).
|
|
62
|
+
*/
|
|
63
|
+
this.label = "Page";
|
|
64
|
+
/**
|
|
65
|
+
* If `true`, the pagination will display as black in the light theme, and white in dark theme.
|
|
66
|
+
*/
|
|
67
|
+
this.monochrome = false;
|
|
68
|
+
/**
|
|
69
|
+
* Sets the theme color to the dark or light theme color. "inherit" will set the color based on the system settings or ic-theme component.
|
|
70
|
+
*/
|
|
71
|
+
this.theme = "inherit";
|
|
72
|
+
/**
|
|
73
|
+
* The type of pagination to be used.
|
|
74
|
+
*/
|
|
75
|
+
this.type = "simple";
|
|
76
|
+
/**
|
|
77
|
+
* The current page displayed by the pagination.
|
|
78
|
+
*/
|
|
79
|
+
this.currentPage = this.defaultPage;
|
|
80
|
+
this.handleClickFirst = () => {
|
|
81
|
+
this.currentPage = 1;
|
|
82
|
+
this.icPageChange.emit({ value: this.currentPage });
|
|
83
|
+
};
|
|
84
|
+
this.handleClickPrevious = () => {
|
|
85
|
+
this.currentPage--;
|
|
86
|
+
this.icPageChange.emit({ value: this.currentPage });
|
|
87
|
+
};
|
|
88
|
+
this.handleClickNext = () => {
|
|
89
|
+
this.currentPage++;
|
|
90
|
+
this.icPageChange.emit({ value: this.currentPage });
|
|
91
|
+
};
|
|
92
|
+
this.handleClickLast = () => {
|
|
93
|
+
this.currentPage = this.pages;
|
|
94
|
+
this.icPageChange.emit({ value: this.currentPage });
|
|
95
|
+
};
|
|
96
|
+
// button rendering abstracted from component render methods for clarity
|
|
97
|
+
this.firstButton = () => {
|
|
98
|
+
return (h("ic-button", { id: "first-page-button", "aria-label": "Go to first page", theme: this.theme, onClick: this.handleClickFirst, class: "page-button first-last", disabled: this.currentPage === 1 || this.disabled, variant: "icon-tertiary", monochrome: this.theme == "light" || this.theme == "dark", innerHTML: paginationFirstLast }));
|
|
99
|
+
};
|
|
100
|
+
this.previousButton = () => {
|
|
101
|
+
return (h("ic-button", { id: "previous-page-button", "aria-label": "Go to previous page", theme: this.theme, onClick: this.handleClickPrevious, class: "page-button next-previous flip", disabled: this.currentPage === 1 || this.disabled, variant: "icon-tertiary", monochrome: this.theme == "light" || this.theme == "dark", innerHTML: paginationNextPrevious }));
|
|
102
|
+
};
|
|
103
|
+
this.nextButton = () => {
|
|
104
|
+
return (h("ic-button", { id: "next-page-button", "aria-label": "Go to next page", theme: this.theme, onClick: this.handleClickNext, class: "page-button next-previous", disabled: this.currentPage === this.pages || this.disabled, variant: "icon-tertiary", monochrome: this.theme == "light" || this.theme == "dark", innerHTML: paginationNextPrevious }));
|
|
105
|
+
};
|
|
106
|
+
this.lastButton = () => {
|
|
107
|
+
return (h("ic-button", { id: "last-page-button", "aria-label": "Go to last page", theme: this.theme, onClick: this.handleClickLast, class: "page-button first-last flip", disabled: this.currentPage === this.pages || this.disabled, variant: "icon-tertiary", monochrome: this.theme == "light" || this.theme == "dark", innerHTML: paginationFirstLast }));
|
|
108
|
+
};
|
|
109
|
+
this.renderStartEllipsis = () => {
|
|
110
|
+
return (h("ic-pagination-item", { theme: this.theme, monochrome: this.monochrome, type: "ellipsis", id: "start-ellipsis", disabled: this.disabled }));
|
|
111
|
+
};
|
|
112
|
+
this.renderEndEllipsis = () => {
|
|
113
|
+
return (h("ic-pagination-item", { theme: this.theme, monochrome: this.monochrome, type: "ellipsis", id: "end-ellipsis", disabled: this.disabled }));
|
|
114
|
+
};
|
|
115
|
+
this.renderStartItems = () => {
|
|
116
|
+
return this.startItems.map((page) => {
|
|
117
|
+
return (h("ic-pagination-item", { theme: this.theme, monochrome: this.monochrome, selected: page === this.currentPage, id: `pagination-item-${page}`, type: "page", page: page, disabled: this.disabled }));
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
this.renderEndItems = () => {
|
|
121
|
+
return this.endItems.map((page) => {
|
|
122
|
+
return (h("ic-pagination-item", { theme: this.theme, monochrome: this.monochrome, selected: page === this.currentPage, id: `pagination-item-${page}`, type: "page", page: page, disabled: this.disabled }));
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
this.renderMiddleItems = () => {
|
|
126
|
+
return this.midItems.map((page) => {
|
|
127
|
+
return (h("ic-pagination-item", { theme: this.theme, monochrome: this.monochrome, selected: page === this.currentPage, id: `pagination-item-${page}`, type: "page", page: page, disabled: this.disabled }));
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
watchAdjacentPageCountHandler() {
|
|
132
|
+
if (this.adjacentPageCount > 2) {
|
|
133
|
+
this.adjacentPageCount = 2;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
watchBoundaryPageCountHandler() {
|
|
137
|
+
if (this.boundaryPageCount > 2) {
|
|
138
|
+
this.boundaryPageCount = 2;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
watchDisabledHandler() {
|
|
142
|
+
removeDisabledFalse(this.disabled, this.el);
|
|
143
|
+
}
|
|
144
|
+
watchNumberPagesHandler() {
|
|
145
|
+
this.watchPageChangeHandler();
|
|
146
|
+
}
|
|
147
|
+
watchTypeHandler() {
|
|
148
|
+
this.watchPageChangeHandler();
|
|
149
|
+
}
|
|
150
|
+
watchPageChangeHandler() {
|
|
151
|
+
if (this.type === "simple") {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
this.startEllipsis = false;
|
|
155
|
+
this.endEllipsis = false;
|
|
156
|
+
this.startItems = [];
|
|
157
|
+
this.endItems = [];
|
|
158
|
+
this.midItems = [];
|
|
159
|
+
const startItems = [];
|
|
160
|
+
let startItemCount = 0;
|
|
161
|
+
const endItems = [];
|
|
162
|
+
let endStart = this.pages;
|
|
163
|
+
const midItems = [];
|
|
164
|
+
let midStart;
|
|
165
|
+
let midEnd;
|
|
166
|
+
let startEllipsis = false;
|
|
167
|
+
let endEllipsis = false;
|
|
168
|
+
if (this.pages <=
|
|
169
|
+
this.boundaryPageCount * 2 + this.adjacentPageCount * 2 + 3) {
|
|
170
|
+
this.startEllipsis = false;
|
|
171
|
+
this.endEllipsis = false;
|
|
172
|
+
for (let i = 1; i <= this.pages; i++) {
|
|
173
|
+
startItems.push(i);
|
|
174
|
+
}
|
|
175
|
+
this.startItems = startItems;
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
startItemCount = this.boundaryPageCount === 0 ? 1 : this.boundaryPageCount;
|
|
179
|
+
endStart =
|
|
180
|
+
this.boundaryPageCount === 0
|
|
181
|
+
? this.pages
|
|
182
|
+
: this.pages - this.boundaryPageCount + 1;
|
|
183
|
+
if (this.currentPage <=
|
|
184
|
+
this.adjacentPageCount + this.boundaryPageCount + 2) {
|
|
185
|
+
startEllipsis = false;
|
|
186
|
+
endEllipsis = true;
|
|
187
|
+
let numItems = 2 * this.adjacentPageCount + 1;
|
|
188
|
+
if (this.boundaryPageCount === 0) {
|
|
189
|
+
numItems--;
|
|
190
|
+
}
|
|
191
|
+
midStart = startItemCount + 1;
|
|
192
|
+
midEnd = midStart + numItems;
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
startEllipsis = true;
|
|
196
|
+
if (this.currentPage >
|
|
197
|
+
this.pages - (this.adjacentPageCount + this.boundaryPageCount + 2)) {
|
|
198
|
+
let numItems = 2 * this.adjacentPageCount + 1;
|
|
199
|
+
if (this.boundaryPageCount === 0) {
|
|
200
|
+
numItems--;
|
|
201
|
+
}
|
|
202
|
+
midEnd =
|
|
203
|
+
this.boundaryPageCount === 0
|
|
204
|
+
? this.pages - 1
|
|
205
|
+
: this.pages - this.boundaryPageCount;
|
|
206
|
+
midStart = midEnd - numItems;
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
endEllipsis = true;
|
|
210
|
+
midStart = this.currentPage - this.adjacentPageCount;
|
|
211
|
+
midEnd = this.currentPage + this.adjacentPageCount;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
//create array of start items
|
|
215
|
+
if (this.boundaryPageCount > 0 ||
|
|
216
|
+
(this.boundaryPageCount === 0 && startEllipsis === false)) {
|
|
217
|
+
for (let i = 1; i <= startItemCount; i++) {
|
|
218
|
+
startItems.push(i);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
//create array of end items
|
|
222
|
+
if (this.boundaryPageCount > 0 ||
|
|
223
|
+
(this.boundaryPageCount === 0 && endEllipsis === false)) {
|
|
224
|
+
for (let i = endStart; i <= this.pages; i++) {
|
|
225
|
+
endItems.push(i);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
//create array of mid items
|
|
229
|
+
for (let i = midStart; i <= midEnd; i++) {
|
|
230
|
+
midItems.push(i);
|
|
231
|
+
}
|
|
232
|
+
this.startEllipsis = startEllipsis;
|
|
233
|
+
this.endEllipsis = endEllipsis;
|
|
234
|
+
this.startItems = startItems;
|
|
235
|
+
this.endItems = endItems;
|
|
236
|
+
this.midItems = midItems;
|
|
237
|
+
}
|
|
238
|
+
componentWillLoad() {
|
|
239
|
+
this.watchPageChangeHandler();
|
|
240
|
+
this.watchBoundaryPageCountHandler();
|
|
241
|
+
this.watchAdjacentPageCountHandler();
|
|
242
|
+
removeDisabledFalse(this.disabled, this.el);
|
|
243
|
+
}
|
|
244
|
+
componentDidLoad() {
|
|
245
|
+
onComponentRequiredPropUndefined([{ prop: this.pages, propName: "pages" }], "Pagination");
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Prevents focus lingering on a disabled element. If the currently
|
|
249
|
+
* focused element is one of the back buttons (and we reach the first page),
|
|
250
|
+
* move focus to "next" button, and vice versa.
|
|
251
|
+
* @param ev
|
|
252
|
+
*/
|
|
253
|
+
icPageChangeHandler(ev) {
|
|
254
|
+
var _a, _b, _c;
|
|
255
|
+
const shadow = (_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.shadowRoot;
|
|
256
|
+
const activeEl = shadow ? shadow.activeElement : document.activeElement;
|
|
257
|
+
if (!shadow || !activeEl) {
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
if (ev.detail.value === 1 &&
|
|
261
|
+
["first-page-button", "previous-page-button"].some((id) => id === (activeEl === null || activeEl === void 0 ? void 0 : activeEl.id))) {
|
|
262
|
+
const btn = (_b = shadow.querySelector("#next-page-button").shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector("button");
|
|
263
|
+
// When navigating from firstPage->lastPage or vice versa, the to-be-selected element will be disabled. wait a tick so that it can receive focus.
|
|
264
|
+
setTimeout(() => btn === null || btn === void 0 ? void 0 : btn.focus(), 10);
|
|
265
|
+
}
|
|
266
|
+
else if (ev.detail.value === this.pages &&
|
|
267
|
+
["last-page-button", "next-page-button"].some((id) => id === (activeEl === null || activeEl === void 0 ? void 0 : activeEl.id))) {
|
|
268
|
+
const btn = (_c = shadow.querySelector("#previous-page-button").shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector("button");
|
|
269
|
+
setTimeout(() => btn === null || btn === void 0 ? void 0 : btn.focus(), 10);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
paginationItemClickHandler(ev) {
|
|
273
|
+
const page = ev.detail.page;
|
|
274
|
+
this.currentPage = page;
|
|
275
|
+
this.icPageChange.emit({ value: this.currentPage });
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Sets the currently displayed page.
|
|
279
|
+
* @param {number} page The page number to set as the current page
|
|
280
|
+
*/
|
|
281
|
+
async setCurrentPage(page) {
|
|
282
|
+
if (typeof page === "number" && page > 0 && page <= this.pages) {
|
|
283
|
+
this.currentPage = page;
|
|
284
|
+
}
|
|
285
|
+
else {
|
|
286
|
+
console.error("Current page must be a number greater than zero but less than or equal to the total number of pages");
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
render() {
|
|
290
|
+
const { type, currentPage, hideCurrentPage, disabled, hideFirstAndLastPageButton, label, theme, monochrome, } = this;
|
|
291
|
+
return (h(Host, { key: 'b6438410825fba931acc4eb7282ea11341f4a2ab', class: {
|
|
292
|
+
[`ic-theme-${theme}`]: theme !== "inherit",
|
|
293
|
+
["ic-pagination-monochrome"]: !!monochrome,
|
|
294
|
+
} }, type === "simple" && (h("nav", { key: 'c76e2d21aaed0bb12c976778e1e6399157002b4f', class: {
|
|
295
|
+
["disabled"]: !!disabled,
|
|
296
|
+
}, role: "navigation", "aria-label": this.accessibleLabel }, hideFirstAndLastPageButton ? null : this.firstButton(), this.previousButton(), h("ic-pagination-item", { key: 'c5b391e53945f6545e3b2694bcd32a8d9fdab18e', theme: this.theme, monochrome: this.monochrome, type: "simple-current", page: currentPage, label: label, class: { ["hide-current-page"]: !!hideCurrentPage }, disabled: disabled }), this.nextButton(), hideFirstAndLastPageButton ? null : this.lastButton())), type === "complex" && (h("nav", { key: 'faa2aa8655d7e1de8877efca2d43233ae3de7d49', class: {
|
|
297
|
+
["disabled"]: !!disabled,
|
|
298
|
+
}, role: "navigation", "aria-label": this.accessibleLabel }, hideFirstAndLastPageButton ? null : this.firstButton(), this.previousButton(), this.renderStartItems(), this.startEllipsis && this.renderStartEllipsis(), this.renderMiddleItems(), this.endEllipsis && this.renderEndEllipsis(), this.renderEndItems(), this.nextButton(), hideFirstAndLastPageButton ? null : this.lastButton())), type === "complex" && (h("span", { key: 'fb40e41bc8e509eb8d3119c40e0b8c2d43b1a19f', class: "sr-only", "aria-live": "polite" }, "Page ", this.currentPage))));
|
|
299
|
+
}
|
|
300
|
+
get el() { return this; }
|
|
301
|
+
static get watchers() { return {
|
|
302
|
+
"adjacentPageCount": ["watchAdjacentPageCountHandler"],
|
|
303
|
+
"boundaryPageCount": ["watchBoundaryPageCountHandler"],
|
|
304
|
+
"disabled": ["watchDisabledHandler"],
|
|
305
|
+
"pages": ["watchNumberPagesHandler"],
|
|
306
|
+
"type": ["watchTypeHandler"],
|
|
307
|
+
"currentPage": ["watchPageChangeHandler"]
|
|
308
|
+
}; }
|
|
309
|
+
static get style() { return IcPaginationStyle0; }
|
|
310
|
+
}, [1, "ic-pagination", {
|
|
311
|
+
"accessibleLabel": [1, "accessible-label"],
|
|
312
|
+
"adjacentPageCount": [1026, "adjacent-page-count"],
|
|
313
|
+
"boundaryPageCount": [1026, "boundary-page-count"],
|
|
314
|
+
"defaultPage": [2, "default-page"],
|
|
315
|
+
"disabled": [4],
|
|
316
|
+
"hideCurrentPage": [4, "hide-current-page"],
|
|
317
|
+
"hideFirstAndLastPageButton": [4, "hide-first-and-last-page-button"],
|
|
318
|
+
"label": [1],
|
|
319
|
+
"monochrome": [4],
|
|
320
|
+
"pages": [2],
|
|
321
|
+
"theme": [1],
|
|
322
|
+
"type": [1],
|
|
323
|
+
"currentPage": [1026, "current-page"],
|
|
324
|
+
"endEllipsis": [32],
|
|
325
|
+
"endItems": [32],
|
|
326
|
+
"midItems": [32],
|
|
327
|
+
"startEllipsis": [32],
|
|
328
|
+
"startItems": [32],
|
|
329
|
+
"setCurrentPage": [64]
|
|
330
|
+
}, [[0, "icPageChange", "icPageChangeHandler"], [0, "paginationItemClick", "paginationItemClickHandler"]], {
|
|
331
|
+
"adjacentPageCount": ["watchAdjacentPageCountHandler"],
|
|
332
|
+
"boundaryPageCount": ["watchBoundaryPageCountHandler"],
|
|
333
|
+
"disabled": ["watchDisabledHandler"],
|
|
334
|
+
"pages": ["watchNumberPagesHandler"],
|
|
335
|
+
"type": ["watchTypeHandler"],
|
|
336
|
+
"currentPage": ["watchPageChangeHandler"]
|
|
337
|
+
}]);
|
|
338
|
+
function defineCustomElement() {
|
|
339
|
+
if (typeof customElements === "undefined") {
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
342
|
+
const components = ["ic-pagination", "ic-button", "ic-loading-indicator", "ic-pagination-item", "ic-tooltip", "ic-typography"];
|
|
343
|
+
components.forEach(tagName => { switch (tagName) {
|
|
344
|
+
case "ic-pagination":
|
|
345
|
+
if (!customElements.get(tagName)) {
|
|
346
|
+
customElements.define(tagName, Pagination);
|
|
347
|
+
}
|
|
348
|
+
break;
|
|
349
|
+
case "ic-button":
|
|
350
|
+
if (!customElements.get(tagName)) {
|
|
351
|
+
defineCustomElement$5();
|
|
352
|
+
}
|
|
353
|
+
break;
|
|
354
|
+
case "ic-loading-indicator":
|
|
355
|
+
if (!customElements.get(tagName)) {
|
|
356
|
+
defineCustomElement$4();
|
|
357
|
+
}
|
|
358
|
+
break;
|
|
359
|
+
case "ic-pagination-item":
|
|
360
|
+
if (!customElements.get(tagName)) {
|
|
361
|
+
defineCustomElement$3();
|
|
362
|
+
}
|
|
363
|
+
break;
|
|
364
|
+
case "ic-tooltip":
|
|
365
|
+
if (!customElements.get(tagName)) {
|
|
366
|
+
defineCustomElement$2();
|
|
367
|
+
}
|
|
368
|
+
break;
|
|
369
|
+
case "ic-typography":
|
|
370
|
+
if (!customElements.get(tagName)) {
|
|
371
|
+
defineCustomElement$1();
|
|
372
|
+
}
|
|
373
|
+
break;
|
|
374
|
+
} });
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
export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,IAAI,CAAC,UAAU,EAC3B,IAAI,EAAC,gBAAgB,EACrB,IAAI,EAAE,WAAW,EACjB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,EAAE,CAAC,mBAAmB,GAAG,CAAC,CAAC,eAAe,EAAE,EACnD,QAAQ,EAAE,QAAQ,GAClB,EACD,IAAI,CAAC,UAAU,EAAE,EACjB,0BAA0B,GAAG,IAAI,GAAG,IAAI,CAAC,UAAU,EAAE,CAClD,CACP,EACA,IAAI,KAAK,SAAS,KACjB,4DACE,KAAK,EAAE;gBACL,CAAC,UAAU,GAAG,CAAC,CAAC,QAAQ;aACzB,EACD,IAAI,EAAC,YAAY,gBACL,IAAI,CAAC,eAAe,IAE/B,0BAA0B,GAAG,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,EACtD,IAAI,CAAC,cAAc,EAAE,EACrB,IAAI,CAAC,gBAAgB,EAAE,EACvB,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,mBAAmB,EAAE,EAChD,IAAI,CAAC,iBAAiB,EAAE,EACxB,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,iBAAiB,EAAE,EAC5C,IAAI,CAAC,cAAc,EAAE,EACrB,IAAI,CAAC,UAAU,EAAE,EACjB,0BAA0B,GAAG,IAAI,GAAG,IAAI,CAAC,UAAU,EAAE,CAClD,CACP,EACA,IAAI,KAAK,SAAS,KACjB,6DAAM,KAAK,EAAC,SAAS,eAAW,QAAQ,aAChC,IAAI,CAAC,WAAW,CACjB,CACR,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-pagination/ic-pagination.css?tag=ic-pagination&encapsulation=shadow","src/components/ic-pagination/ic-pagination.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n box-sizing: border-box;\n width: 100%;\n display: flex;\n justify-content: center;\n}\n\nnav {\n width: 100%;\n display: flex;\n flex-flow: row wrap;\n justify-content: flex-start;\n align-items: center;\n}\n\nic-button {\n cursor: pointer;\n}\n\nic-button.next-previous {\n --icon-width: var(--ic-space-xs);\n --icon-height: calc(var(--ic-space-xs) + var(--ic-space-xxxs));\n\n padding: 0 var(--ic-space-xxs) 0 var(--ic-space-xxxs);\n}\n\nic-button.first-last {\n --icon-width: calc(var(--ic-space-sm) + var(--ic-space-xxxs));\n --icon-height: calc(var(--ic-space-xs) + var(--ic-space-xxxs));\n}\n\nic-button.first-last::part(button),\nic-button.next-previous::part(button) {\n color: var(--ic-pagination-chevron);\n}\n\n:host(.ic-pagination-monochrome) ic-button.first-last::part(button),\n:host(.ic-pagination-monochrome) ic-button.next-previous::part(button) {\n color: var(--ic-pagination-chevron-monochrome);\n}\n\nic-button.ic-button-disabled.first-last::part(button),\nic-button.ic-button-disabled.next-previous::part(button),\n:host(.ic-pagination-monochrome)\n ic-button.ic-button-disabled.first-last::part(button),\n:host(.ic-pagination-monochrome)\n ic-button.ic-button-disabled.next-previous::part(button) {\n color: var(--ic-pagination-chevron-disabled);\n}\n\n.disabled {\n color: var(--ic-color-text-disabled-mid);\n pointer-events: none;\n cursor: none;\n user-select: none;\n}\n\n.hide-current-page {\n display: none;\n}\n\n.sr-only {\n position: absolute;\n left: -9999px;\n}\n\n.sr-only:dir(rtl) {\n right: -9999px;\n}\n","import {\n Component,\n Element,\n Host,\n Prop,\n h,\n Listen,\n State,\n Watch,\n Event,\n EventEmitter,\n Method,\n} from \"@stencil/core\";\nimport paginationNextPrevious from \"../../assets/pagination-next-previous.svg\";\nimport paginationFirstLast from \"../../assets/pagination-first-last.svg\";\nimport { IcThemeMode } from \"../../utils/types\";\nimport { IcPaginationTypes, IcChangeEventDetail } from \"./ic-pagination.types\";\nimport {\n onComponentRequiredPropUndefined,\n removeDisabledFalse,\n} from \"../../utils/helpers\";\n\n@Component({\n tag: \"ic-pagination\",\n styleUrl: \"ic-pagination.css\",\n shadow: true,\n})\nexport class Pagination {\n @Element() el: HTMLIcPaginationElement;\n\n @State() endEllipsis: boolean = false;\n @State() endItems: number[] = [];\n @State() midItems: number[] = [];\n @State() startEllipsis: boolean = false;\n @State() startItems: number[] = [];\n\n /**\n * The accessible label of the pagination component to provide context for screen reader users.\n */\n @Prop() accessibleLabel?: string = \"Pagination Navigation\";\n\n /**\n * The number of pages displayed adjacent to the current page when using 'complex' type pagination. Accepted values are 0, 1 & 2.\n */\n @Prop({ mutable: true }) adjacentPageCount?: number = 1;\n\n @Watch(\"adjacentPageCount\")\n watchAdjacentPageCountHandler(): void {\n if (this.adjacentPageCount! > 2) {\n this.adjacentPageCount = 2;\n }\n }\n\n /**\n * The number of pages displayed as boundary items to the current page when using 'complex' type pagination. Accepted values are 0, 1 & 2.\n */\n @Prop({ mutable: true }) boundaryPageCount?: number = 1;\n\n @Watch(\"boundaryPageCount\")\n watchBoundaryPageCountHandler(): void {\n if (this.boundaryPageCount! > 2) {\n this.boundaryPageCount = 2;\n }\n }\n\n /**\n * The default page to display.\n */\n @Prop() defaultPage?: number = 1;\n\n /**\n * If `true`, the pagination will not allow interaction.\n */\n @Prop() disabled?: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * If `true`, the current page of the simple pagination will not be displayed.\n */\n @Prop() hideCurrentPage?: boolean = false;\n\n /**\n * If `true`, the first and last page buttons will not be displayed.\n */\n @Prop() hideFirstAndLastPageButton?: boolean = false;\n\n /**\n * The label for the pagination item (applicable when simple pagination is being used).\n */\n @Prop() label?: string = \"Page\";\n\n /**\n * If `true`, the pagination will display as black in the light theme, and white in dark theme.\n */\n @Prop() monochrome?: boolean = false;\n\n /**\n * The total number of pages.\n */\n @Prop() pages!: number;\n\n @Watch(\"pages\")\n watchNumberPagesHandler(): void {\n this.watchPageChangeHandler();\n }\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * The type of pagination to be used.\n */\n @Prop() type?: IcPaginationTypes = \"simple\";\n\n @Watch(\"type\")\n watchTypeHandler(): void {\n this.watchPageChangeHandler();\n }\n\n /**\n * The current page displayed by the pagination.\n */\n @Prop({ mutable: true }) currentPage?: number = this.defaultPage;\n\n @Watch(\"currentPage\")\n watchPageChangeHandler(): void {\n if (this.type === \"simple\") {\n return;\n }\n\n this.startEllipsis = false;\n this.endEllipsis = false;\n this.startItems = [];\n this.endItems = [];\n this.midItems = [];\n\n const startItems = [];\n let startItemCount = 0;\n const endItems = [];\n let endStart = this.pages;\n const midItems = [];\n let midStart;\n let midEnd;\n let startEllipsis = false;\n let endEllipsis = false;\n\n if (\n this.pages <=\n this.boundaryPageCount! * 2 + this.adjacentPageCount! * 2 + 3\n ) {\n this.startEllipsis = false;\n this.endEllipsis = false;\n for (let i = 1; i <= this.pages; i++) {\n startItems.push(i);\n }\n this.startItems = startItems;\n return;\n }\n\n startItemCount = this.boundaryPageCount === 0 ? 1 : this.boundaryPageCount!;\n endStart =\n this.boundaryPageCount === 0\n ? this.pages\n : this.pages - this.boundaryPageCount! + 1;\n\n if (\n this.currentPage! <=\n this.adjacentPageCount! + this.boundaryPageCount! + 2\n ) {\n startEllipsis = false;\n endEllipsis = true;\n\n let numItems = 2 * this.adjacentPageCount! + 1;\n if (this.boundaryPageCount === 0) {\n numItems--;\n }\n midStart = startItemCount + 1;\n midEnd = midStart + numItems;\n } else {\n startEllipsis = true;\n if (\n this.currentPage! >\n this.pages - (this.adjacentPageCount! + this.boundaryPageCount! + 2)\n ) {\n let numItems = 2 * this.adjacentPageCount! + 1;\n if (this.boundaryPageCount === 0) {\n numItems--;\n }\n midEnd =\n this.boundaryPageCount === 0\n ? this.pages - 1\n : this.pages - this.boundaryPageCount!;\n midStart = midEnd - numItems;\n } else {\n endEllipsis = true;\n midStart = this.currentPage! - this.adjacentPageCount!;\n midEnd = this.currentPage! + this.adjacentPageCount!;\n }\n }\n\n //create array of start items\n if (\n this.boundaryPageCount! > 0 ||\n (this.boundaryPageCount === 0 && startEllipsis === false)\n ) {\n for (let i = 1; i <= startItemCount; i++) {\n startItems.push(i);\n }\n }\n\n //create array of end items\n if (\n this.boundaryPageCount! > 0 ||\n (this.boundaryPageCount === 0 && endEllipsis === false)\n ) {\n for (let i = endStart; i <= this.pages; i++) {\n endItems.push(i);\n }\n }\n\n //create array of mid items\n for (let i = midStart; i <= midEnd; i++) {\n midItems.push(i);\n }\n\n this.startEllipsis = startEllipsis;\n this.endEllipsis = endEllipsis;\n this.startItems = startItems;\n this.endItems = endItems;\n this.midItems = midItems;\n }\n\n /**\n * Emitted when a page is selected.\n */\n @Event() icPageChange: EventEmitter<IcChangeEventDetail>;\n\n componentWillLoad(): void {\n this.watchPageChangeHandler();\n this.watchBoundaryPageCountHandler();\n this.watchAdjacentPageCountHandler();\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.pages, propName: \"pages\" }],\n \"Pagination\"\n );\n }\n\n /**\n * Prevents focus lingering on a disabled element. If the currently\n * focused element is one of the back buttons (and we reach the first page),\n * move focus to \"next\" button, and vice versa.\n * @param ev\n */\n @Listen(\"icPageChange\")\n icPageChangeHandler(ev: CustomEvent<IcChangeEventDetail>) {\n const shadow = document.activeElement?.shadowRoot;\n\n const activeEl = shadow ? shadow.activeElement : document.activeElement;\n if (!shadow || !activeEl) {\n return;\n }\n\n if (\n ev.detail.value === 1 &&\n [\"first-page-button\", \"previous-page-button\"].some(\n (id) => id === activeEl?.id\n )\n ) {\n const btn = (\n shadow.querySelector(\"#next-page-button\") as HTMLElement\n ).shadowRoot?.querySelector(\"button\");\n // When navigating from firstPage->lastPage or vice versa, the to-be-selected element will be disabled. wait a tick so that it can receive focus.\n setTimeout(() => btn?.focus(), 10);\n } else if (\n ev.detail.value === this.pages &&\n [\"last-page-button\", \"next-page-button\"].some((id) => id === activeEl?.id)\n ) {\n const btn = (\n shadow!.querySelector(\"#previous-page-button\") as HTMLElement\n ).shadowRoot?.querySelector(\"button\");\n setTimeout(() => btn?.focus(), 10);\n }\n }\n\n @Listen(\"paginationItemClick\")\n paginationItemClickHandler(ev: CustomEvent): void {\n const page = ev.detail.page;\n this.currentPage = page;\n this.icPageChange.emit({ value: this.currentPage! });\n }\n\n /**\n * Sets the currently displayed page.\n * @param {number} page The page number to set as the current page\n */\n @Method()\n async setCurrentPage(page: number): Promise<void> {\n if (typeof page === \"number\" && page > 0 && page <= this.pages) {\n this.currentPage = page;\n } else {\n console.error(\n \"Current page must be a number greater than zero but less than or equal to the total number of pages\"\n );\n }\n }\n\n private handleClickFirst = () => {\n this.currentPage = 1;\n this.icPageChange.emit({ value: this.currentPage });\n };\n\n private handleClickPrevious = (): void => {\n this.currentPage!--;\n this.icPageChange.emit({ value: this.currentPage! });\n };\n\n private handleClickNext = (): void => {\n this.currentPage!++;\n this.icPageChange.emit({ value: this.currentPage! });\n };\n\n private handleClickLast = (): void => {\n this.currentPage = this.pages;\n this.icPageChange.emit({ value: this.currentPage });\n };\n\n // button rendering abstracted from component render methods for clarity\n private firstButton = () => {\n return (\n <ic-button\n id=\"first-page-button\"\n aria-label=\"Go to first page\"\n theme={this.theme}\n onClick={this.handleClickFirst}\n class=\"page-button first-last\"\n disabled={this.currentPage === 1 || this.disabled}\n variant=\"icon-tertiary\"\n monochrome={this.theme == \"light\" || this.theme == \"dark\"}\n innerHTML={paginationFirstLast}\n />\n );\n };\n\n private previousButton = () => {\n return (\n <ic-button\n id=\"previous-page-button\"\n aria-label=\"Go to previous page\"\n theme={this.theme}\n onClick={this.handleClickPrevious}\n class=\"page-button next-previous flip\"\n disabled={this.currentPage === 1 || this.disabled}\n variant=\"icon-tertiary\"\n monochrome={this.theme == \"light\" || this.theme == \"dark\"}\n innerHTML={paginationNextPrevious}\n />\n );\n };\n\n private nextButton = () => {\n return (\n <ic-button\n id=\"next-page-button\"\n aria-label=\"Go to next page\"\n theme={this.theme}\n onClick={this.handleClickNext}\n class=\"page-button next-previous\"\n disabled={this.currentPage === this.pages || this.disabled}\n variant=\"icon-tertiary\"\n monochrome={this.theme == \"light\" || this.theme == \"dark\"}\n innerHTML={paginationNextPrevious}\n />\n );\n };\n\n private lastButton = () => {\n return (\n <ic-button\n id=\"last-page-button\"\n aria-label=\"Go to last page\"\n theme={this.theme}\n onClick={this.handleClickLast}\n class=\"page-button first-last flip\"\n disabled={this.currentPage === this.pages || this.disabled}\n variant=\"icon-tertiary\"\n monochrome={this.theme == \"light\" || this.theme == \"dark\"}\n innerHTML={paginationFirstLast}\n />\n );\n };\n\n private renderStartEllipsis = () => {\n return (\n <ic-pagination-item\n theme={this.theme}\n monochrome={this.monochrome}\n type=\"ellipsis\"\n id=\"start-ellipsis\"\n disabled={this.disabled}\n />\n );\n };\n\n private renderEndEllipsis = () => {\n return (\n <ic-pagination-item\n theme={this.theme}\n monochrome={this.monochrome}\n type=\"ellipsis\"\n id=\"end-ellipsis\"\n disabled={this.disabled}\n />\n );\n };\n\n private renderStartItems = () => {\n return this.startItems.map((page: number) => {\n return (\n <ic-pagination-item\n theme={this.theme}\n monochrome={this.monochrome}\n selected={page === this.currentPage}\n id={`pagination-item-${page}`}\n type=\"page\"\n page={page}\n disabled={this.disabled}\n />\n );\n });\n };\n\n private renderEndItems = () => {\n return this.endItems.map((page: number) => {\n return (\n <ic-pagination-item\n theme={this.theme}\n monochrome={this.monochrome}\n selected={page === this.currentPage}\n id={`pagination-item-${page}`}\n type=\"page\"\n page={page}\n disabled={this.disabled}\n />\n );\n });\n };\n\n private renderMiddleItems = () => {\n return this.midItems.map((page: number) => {\n return (\n <ic-pagination-item\n theme={this.theme}\n monochrome={this.monochrome}\n selected={page === this.currentPage}\n id={`pagination-item-${page}`}\n type=\"page\"\n page={page}\n disabled={this.disabled}\n />\n );\n });\n };\n\n render() {\n const {\n type,\n currentPage,\n hideCurrentPage,\n disabled,\n hideFirstAndLastPageButton,\n label,\n theme,\n monochrome,\n } = this;\n\n return (\n <Host\n class={{\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n [\"ic-pagination-monochrome\"]: !!monochrome,\n }}\n >\n {type === \"simple\" && (\n <nav\n class={{\n [\"disabled\"]: !!disabled,\n }}\n role=\"navigation\"\n aria-label={this.accessibleLabel}\n >\n {hideFirstAndLastPageButton ? null : this.firstButton()}\n {this.previousButton()}\n <ic-pagination-item\n theme={this.theme}\n monochrome={this.monochrome}\n type=\"simple-current\"\n page={currentPage}\n label={label}\n class={{ [\"hide-current-page\"]: !!hideCurrentPage }}\n disabled={disabled}\n />\n {this.nextButton()}\n {hideFirstAndLastPageButton ? null : this.lastButton()}\n </nav>\n )}\n {type === \"complex\" && (\n <nav\n class={{\n [\"disabled\"]: !!disabled,\n }}\n role=\"navigation\"\n aria-label={this.accessibleLabel}\n >\n {hideFirstAndLastPageButton ? null : this.firstButton()}\n {this.previousButton()}\n {this.renderStartItems()}\n {this.startEllipsis && this.renderStartEllipsis()}\n {this.renderMiddleItems()}\n {this.endEllipsis && this.renderEndEllipsis()}\n {this.renderEndItems()}\n {this.nextButton()}\n {hideFirstAndLastPageButton ? null : this.lastButton()}\n </nav>\n )}\n {type === \"complex\" && (\n <span class=\"sr-only\" aria-live=\"polite\">\n Page {this.currentPage}\n </span>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface IcPopoverMenu extends Components.IcPopoverMenu, HTMLElement {}
|
|
4
|
+
export const IcPopoverMenu: {
|
|
5
|
+
prototype: IcPopoverMenu;
|
|
6
|
+
new (): IcPopoverMenu;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|