@tmorrow/cre8-wc 1.0.26 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/cre8-wc.esm.js +9082 -15604
- package/cdn/cre8-wc.esm.js.map +1 -1
- package/cdn/cre8-wc.min.js +1231 -8308
- package/cdn/cre8-wc.min.js.map +1 -1
- package/lib/cdn-entry.d.ts +20 -2
- package/lib/cdn-entry.d.ts.map +1 -1
- package/lib/components/accordion/accordion.js +18 -64
- package/lib/components/accordion/accordion.styles.d.ts.map +1 -1
- package/lib/components/accordion-item/accordion-item.js +35 -238
- package/lib/components/accordion-item/accordion-item.styles.d.ts.map +1 -1
- package/lib/components/alert/alert.js +56 -221
- package/lib/components/alert/alert.styles.d.ts.map +1 -1
- package/lib/components/badge/badge.js +33 -164
- package/lib/components/badge/badge.styles.d.ts.map +1 -1
- package/lib/components/band/band.js +11 -261
- package/lib/components/band/band.styles.d.ts.map +1 -1
- package/lib/components/breadcrumbs/breadcrumbs.js +14 -33
- package/lib/components/breadcrumbs/breadcrumbs.styles.d.ts.map +1 -1
- package/lib/components/breadcrumbs-item/breadcrumbs-item.js +10 -45
- package/lib/components/breadcrumbs-item/breadcrumbs-item.styles.d.ts.map +1 -1
- package/lib/components/button/button.js +14 -14
- package/lib/components/button-group/button-group.js +10 -261
- package/lib/components/button-group/button-group.styles.d.ts.map +1 -1
- package/lib/components/card/card.js +17 -130
- package/lib/components/card/card.styles.d.ts.map +1 -1
- package/lib/components/chart/chart.js +137 -223
- package/lib/components/chart/chart.styles.d.ts.map +1 -1
- package/lib/components/checkbox-field/checkbox-field.js +26 -59
- package/lib/components/checkbox-field/checkbox-field.styles.d.ts.map +1 -1
- package/lib/components/checkbox-field-item/checkbox-field-item.js +38 -205
- package/lib/components/checkbox-field-item/checkbox-field-item.styles.d.ts.map +1 -1
- package/lib/components/danger-button/danger-button.js +53 -582
- package/lib/components/danger-button/danger-button.styles.d.ts.map +1 -1
- package/lib/components/date-picker/calendar/calendar.styles.d.ts.map +1 -1
- package/lib/components/date-picker/calendar-month-modal/calendar-month-modal.styles.d.ts.map +1 -1
- package/lib/components/date-picker/calendar-navigation/calendar-navigation.styles.d.ts.map +1 -1
- package/lib/components/date-picker/calendar-year-modal/calendar-year-modal.styles.d.ts.map +1 -1
- package/lib/components/date-picker/date-picker.js +262 -499
- package/lib/components/date-picker/date-picker.styles.d.ts.map +1 -1
- package/lib/components/divider/divider.js +20 -61
- package/lib/components/divider/divider.styles.d.ts.map +1 -1
- package/lib/components/dropdown/dropdown.js +34 -107
- package/lib/components/dropdown/dropdown.styles.d.ts.map +1 -1
- package/lib/components/dropdown-item/dropdown-item.js +18 -49
- package/lib/components/dropdown-item/dropdown-item.styles.d.ts.map +1 -1
- package/lib/components/feature/feature.js +19 -81
- package/lib/components/feature/feature.styles.d.ts.map +1 -1
- package/lib/components/field/field.js +12 -146
- package/lib/components/field/field.styles.d.ts.map +1 -1
- package/lib/components/field-note/field-note.js +22 -66
- package/lib/components/field-note/field-note.styles.d.ts.map +1 -1
- package/lib/components/footer/footer.js +10 -29
- package/lib/components/footer/footer.styles.d.ts.map +1 -1
- package/lib/components/global-nav/global-nav.js +20 -43
- package/lib/components/global-nav/global-nav.styles.d.ts.map +1 -1
- package/lib/components/global-nav-item/global-nav-item.js +26 -105
- package/lib/components/global-nav-item/global-nav-item.styles.d.ts.map +1 -1
- package/lib/components/grid/grid.js +15 -337
- package/lib/components/grid/grid.styles.d.ts.map +1 -1
- package/lib/components/grid-item/grid-item.js +7 -15
- package/lib/components/grid-item/grid-item.styles.d.ts.map +1 -1
- package/lib/components/header/header.js +17 -80
- package/lib/components/header/header.styles.d.ts.map +1 -1
- package/lib/components/heading/heading.js +16 -153
- package/lib/components/heading/heading.styles.d.ts.map +1 -1
- package/lib/components/hero/hero.js +17 -149
- package/lib/components/hero/hero.styles.d.ts.map +1 -1
- package/lib/components/icon/icon.js +1 -1
- package/lib/components/icon/icon.styles.d.ts.map +1 -1
- package/lib/components/inline-alert/inline-alert.js +53 -214
- package/lib/components/inline-alert/inline-alert.styles.d.ts.map +1 -1
- package/lib/components/layout/layout.js +20 -53
- package/lib/components/layout/layout.styles.d.ts.map +1 -1
- package/lib/components/layout-container/layout-container.js +20 -43
- package/lib/components/layout-container/layout-container.styles.d.ts.map +1 -1
- package/lib/components/layout-section/layout-section.js +20 -29
- package/lib/components/layout-section/layout-section.styles.d.ts.map +1 -1
- package/lib/components/linelength-container/linelength-container.js +7 -15
- package/lib/components/linelength-container/linelength-container.styles.d.ts.map +1 -1
- package/lib/components/link/link.js +33 -228
- package/lib/components/link/link.styles.d.ts.map +1 -1
- package/lib/components/link-list/link-list.js +23 -129
- package/lib/components/link-list/link-list.styles.d.ts.map +1 -1
- package/lib/components/link-list-item/link-list-item.js +19 -80
- package/lib/components/link-list-item/link-list-item.styles.d.ts.map +1 -1
- package/lib/components/list/list.js +17 -67
- package/lib/components/list/list.styles.d.ts.map +1 -1
- package/lib/components/list-item/list-item.js +11 -16
- package/lib/components/list-item/list-item.styles.d.ts.map +1 -1
- package/lib/components/loading-spinner/loading-spinner.js +13 -157
- package/lib/components/loading-spinner/loading-spinner.styles.d.ts.map +1 -1
- package/lib/components/logo/logo.js +20 -30
- package/lib/components/logo/logo.styles.d.ts.map +1 -1
- package/lib/components/main/main.js +18 -42
- package/lib/components/main/main.styles.d.ts.map +1 -1
- package/lib/components/modal/modal.js +50 -215
- package/lib/components/modal/modal.styles.d.ts.map +1 -1
- package/lib/components/multi-select/multi-select.js +71 -532
- package/lib/components/multi-select/multi-select.styles.d.ts.map +1 -1
- package/lib/components/nav-container/nav-container.js +5 -40
- package/lib/components/nav-container/nav-container.styles.d.ts.map +1 -1
- package/lib/components/page-header/page-header.js +19 -54
- package/lib/components/page-header/page-header.styles.d.ts.map +1 -1
- package/lib/components/pagination/page-counter/page-counter.styles.d.ts.map +1 -1
- package/lib/components/pagination/pagination.js +102 -183
- package/lib/components/pagination/pagination.styles.d.ts.map +1 -1
- package/lib/components/percent-bar/percent-bar.js +22 -50
- package/lib/components/percent-bar/percent-bar.styles.d.ts.map +1 -1
- package/lib/components/popover/popover.js +51 -220
- package/lib/components/popover/popover.styles.d.ts.map +1 -1
- package/lib/components/primary-nav/primary-nav.js +17 -51
- package/lib/components/primary-nav/primary-nav.styles.d.ts.map +1 -1
- package/lib/components/primary-nav-item/primary-nav-item.js +24 -191
- package/lib/components/primary-nav-item/primary-nav-item.styles.d.ts.map +1 -1
- package/lib/components/progress-meter/progress-meter.js +23 -127
- package/lib/components/progress-meter/progress-meter.styles.d.ts.map +1 -1
- package/lib/components/progress-steps/progress-steps.styles.d.ts.map +1 -1
- package/lib/components/progress-steps-item/progress-steps-item.js +27 -118
- package/lib/components/progress-steps-item/progress-steps-item.styles.d.ts.map +1 -1
- package/lib/components/radio-field/radio-field.js +28 -64
- package/lib/components/radio-field/radio-field.styles.d.ts.map +1 -1
- package/lib/components/radio-field-item/radio-field-item.js +54 -189
- package/lib/components/radio-field-item/radio-field-item.styles.d.ts.map +1 -1
- package/lib/components/remove-tag/remove-tag.js +36 -129
- package/lib/components/remove-tag/remove-tag.styles.d.ts.map +1 -1
- package/lib/components/section/section.js +19 -50
- package/lib/components/section/section.styles.d.ts.map +1 -1
- package/lib/components/select/select.js +43 -416
- package/lib/components/select/select.styles.d.ts.map +1 -1
- package/lib/components/select-tile/select-tile.js +18 -442
- package/lib/components/select-tile/select-tile.styles.d.ts.map +1 -1
- package/lib/components/select-tile-list/select-tile-list.js +24 -62
- package/lib/components/select-tile-list/select-tile-list.styles.d.ts.map +1 -1
- package/lib/components/skeleton-loader/skeleton-loader.js +19 -73
- package/lib/components/skeleton-loader/skeleton-loader.styles.d.ts.map +1 -1
- package/lib/components/split-button/split-button.js +21 -37
- package/lib/components/split-button/split-button.styles.d.ts.map +1 -1
- package/lib/components/submenu/submenu.js +8 -18
- package/lib/components/submenu/submenu.styles.d.ts.map +1 -1
- package/lib/components/submenu-item/submenu-item.js +21 -42
- package/lib/components/submenu-item/submenu-item.styles.d.ts.map +1 -1
- package/lib/components/tab/tab.js +17 -100
- package/lib/components/tab/tab.styles.d.ts.map +1 -1
- package/lib/components/tab-panel/tab-panel.js +18 -52
- package/lib/components/tab-panel/tab-panel.styles.d.ts.map +1 -1
- package/lib/components/table/table.js +21 -73
- package/lib/components/table/table.styles.d.ts.map +1 -1
- package/lib/components/table-body/table-body.js +12 -24
- package/lib/components/table-body/table-body.styles.d.ts.map +1 -1
- package/lib/components/table-cell/table-cell.js +29 -69
- package/lib/components/table-cell/table-cell.styles.d.ts.map +1 -1
- package/lib/components/table-header/table-header.js +8 -39
- package/lib/components/table-header/table-header.styles.d.ts.map +1 -1
- package/lib/components/table-header-cell/table-header-cell.js +18 -37
- package/lib/components/table-header-cell/table-header-cell.styles.d.ts.map +1 -1
- package/lib/components/table-object/table-object.js +13 -32
- package/lib/components/table-object/table-object.styles.d.ts.map +1 -1
- package/lib/components/table-row/table-row.js +33 -139
- package/lib/components/table-row/table-row.styles.d.ts.map +1 -1
- package/lib/components/tabs/tabs.js +24 -339
- package/lib/components/tabs/tabs.styles.d.ts.map +1 -1
- package/lib/components/tag/tag.js +44 -159
- package/lib/components/tag/tag.styles.d.ts.map +1 -1
- package/lib/components/tag-list/tag-list.js +20 -51
- package/lib/components/tag-list/tag-list.styles.d.ts.map +1 -1
- package/lib/components/tertiary-nav/tertiary-nav.js +21 -54
- package/lib/components/tertiary-nav/tertiary-nav.styles.d.ts.map +1 -1
- package/lib/components/tertiary-nav-item/tertiary-nav-item.js +18 -68
- package/lib/components/tertiary-nav-item/tertiary-nav-item.styles.d.ts.map +1 -1
- package/lib/components/text-link/text-link.js +20 -85
- package/lib/components/text-link/text-link.styles.d.ts.map +1 -1
- package/lib/components/text-passage/text-passage-light-dom.styles.d.ts.map +1 -1
- package/lib/components/text-passage/text-passage.js +17 -189
- package/lib/components/text-passage/text-passage.styles.d.ts.map +1 -1
- package/lib/components/tooltip/tooltip.js +57 -248
- package/lib/components/tooltip/tooltip.styles.d.ts.map +1 -1
- package/lib/components/utility-nav/utility-nav.js +23 -56
- package/lib/components/utility-nav/utility-nav.styles.d.ts.map +1 -1
- package/lib/components/utility-nav-item/utility-nav-item.js +28 -83
- package/lib/components/utility-nav-item/utility-nav-item.styles.d.ts.map +1 -1
- package/lib/design-tokens/brands/blue/css/tokens_blue.module.d.ts.map +1 -1
- package/lib/design-tokens/brands/bolt/tokens_bolt.theme.d.ts.map +1 -1
- package/lib/design-tokens/brands/cre8-a2ui/css/tokens_cre8-a2ui.module.d.ts +3 -0
- package/lib/design-tokens/brands/cre8-a2ui/css/tokens_cre8-a2ui.module.d.ts.map +1 -0
- package/lib/design-tokens/brands/cre8-legacy/css/tokens_cre8-legacy.module.d.ts.map +1 -1
- package/lib/design-tokens/brands/femmecubator/css/tokens_femmecubator2.module.d.ts.map +1 -1
- package/lib/design-tokens/brands/legacy/css/tokens_legacy.module.d.ts.map +1 -1
- package/lib/design-tokens/brands/marketing/css/tokens_marketing.module.d.ts.map +1 -1
- package/lib/design-tokens/brands/minimalist/css/tokens_minimalist.module.d.ts +2 -2
- package/lib/design-tokens/brands/minimalist/css/tokens_minimalist.module.d.ts.map +1 -1
- package/lib/design-tokens/brands/starbucks/tokens_starbucks.module.d.ts.map +1 -1
- package/lib/design-tokens/core/scss/theming/component.scss +5 -5
- package/lib/design-tokens/core/scss/theming/functions.scss +4 -0
- package/lib/design-tokens/core/scss/theming/spacing.scss +60 -60
- package/lib/design-tokens/core/scss/theming/variables.scss +11 -11
- package/lib/design-tokens/mixins/typography-usage.scss +277 -277
- package/lib/design-tokens/tokens_netflix.theme.d.ts.map +1 -1
- package/lib/{icon-DImqxDiW.js → icon-D22g8aWB.js} +35 -138
- package/lib/index.js +1 -1
- package/package.json +7 -6
|
@@ -1,51 +1,16 @@
|
|
|
1
|
-
import { css as
|
|
1
|
+
import { css as r, html as a } from "lit";
|
|
2
2
|
import { Cre8Element as s } from "../cre8-element.js";
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* 1) Wrapper around contents that get placed into a toggleable
|
|
7
|
-
* menu on smaller screens (usually primary nav and maybe other contents)
|
|
8
|
-
*/
|
|
9
|
-
:host {
|
|
10
|
-
position: absolute;
|
|
11
|
-
left: 0;
|
|
12
|
-
top: 100%;
|
|
13
|
-
width: 100%;
|
|
14
|
-
height: 100vh;
|
|
15
|
-
background: var(--cre8-nav-container-background, var(--cre8-color-header-submenu-bg-default));
|
|
16
|
-
overflow: auto;
|
|
17
|
-
|
|
18
|
-
@media all and (min-width:$cre8-breakpoint-lg) {
|
|
19
|
-
position: static;
|
|
20
|
-
width: auto;
|
|
21
|
-
height: auto;
|
|
22
|
-
background: none;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Actual nav container component
|
|
28
|
-
*/
|
|
29
|
-
.cre8-c-nav-container {
|
|
30
|
-
display: flex;
|
|
31
|
-
flex-direction: column;
|
|
32
|
-
justify-content: space-between;
|
|
33
|
-
|
|
34
|
-
@media all and (min-width:$cre8-breakpoint-lg) {
|
|
35
|
-
flex-direction: row;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
`, t = class t extends s {
|
|
3
|
+
const n = r`*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{position:absolute;left:0;top:100%;width:100%;height:100vh;background:var(--cre8-nav-container-background, var(--cre8-color-header-submenu-bg-default));overflow:auto}@media all and (min-width: 960px){:host{position:static;width:auto;height:auto;background:none}}.cre8-c-nav-container{display:flex;flex-direction:column;justify-content:space-between}@media all and (min-width: 960px){.cre8-c-nav-container{flex-direction:row}}`, t = class t extends s {
|
|
39
4
|
render() {
|
|
40
|
-
const
|
|
5
|
+
const i = this.componentClassNames("cre8-c-nav-container", {});
|
|
41
6
|
return a`
|
|
42
|
-
<div class="${
|
|
7
|
+
<div class="${i}">
|
|
43
8
|
<slot></slot>
|
|
44
9
|
</div>
|
|
45
10
|
`;
|
|
46
11
|
}
|
|
47
12
|
};
|
|
48
|
-
t.styles = [
|
|
13
|
+
t.styles = [n];
|
|
49
14
|
let e = t;
|
|
50
15
|
customElements.get("cre8-nav-container") === void 0 && customElements.define("cre8-nav-container", e);
|
|
51
16
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nav-container.styles.d.ts","sourceRoot":"","sources":["../../../components/nav-container/nav-container.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"nav-container.styles.d.ts","sourceRoot":"","sources":["../../../components/nav-container/nav-container.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,yBAA8rE,CAAC;AAC3sE,eAAe,MAAM,CAAC"}
|
|
@@ -1,58 +1,23 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { property as
|
|
3
|
-
import { Cre8Element as
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
.cre8-c-page-header {
|
|
10
|
-
margin-bottom: calc(8px * 4);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Page header title
|
|
15
|
-
*/
|
|
16
|
-
.cre8-c-page-header__title {
|
|
17
|
-
display: inline;
|
|
18
|
-
margin: 0;
|
|
19
|
-
@include cre8-typography-display-default();
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Page header title after
|
|
24
|
-
* 1) Container placed after page header title if something like a badge needs to be placed there
|
|
25
|
-
*/
|
|
26
|
-
.cre8-c-page-header__title-after {
|
|
27
|
-
display: inline-block;
|
|
28
|
-
position: relative;
|
|
29
|
-
bottom: calc(8px * 1.25);
|
|
30
|
-
margin-left: calc(8px * 2);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Page header description
|
|
35
|
-
*/
|
|
36
|
-
.cre8-c-page-header__description {
|
|
37
|
-
@include cre8-typography-body-default;
|
|
38
|
-
}
|
|
39
|
-
`;
|
|
40
|
-
var g = Object.defineProperty, m = (s, t, c, f) => {
|
|
41
|
-
for (var e = void 0, r = s.length - 1, o; r >= 0; r--)
|
|
42
|
-
(o = s[r]) && (e = o(t, c, e) || e);
|
|
43
|
-
return e && g(t, c, e), e;
|
|
1
|
+
import { css as p, html as l } from "lit";
|
|
2
|
+
import { property as n } from "lit/decorators.js";
|
|
3
|
+
import { Cre8Element as h } from "../cre8-element.js";
|
|
4
|
+
const f = p`*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}.cre8-c-page-header{margin-bottom:2rem}.cre8-c-page-header__title{display:inline;margin:0;font-family:var(--cre8-typography-display-default-mobile-font-family);font-size:var(--cre8-typography-display-default-mobile-font-size);font-weight:var(--cre8-typography-display-default-mobile-font-weight);line-height:var(--cre8-typography-display-default-mobile-line-height);text-decoration:var(--cre8-typography-display-default-mobile-text-decoration);text-transform:var(--cre8-typography-display-default-mobile-text-transform)}@media all and (min-width: 768px){.cre8-c-page-header__title{font-family:var(--cre8-typography-display-default-font-family);font-size:var(--cre8-typography-display-default-font-size);font-weight:var(--cre8-typography-display-default-font-weight);line-height:var(--cre8-typography-display-default-line-height);text-decoration:var(--cre8-typography-display-default-text-decoration);text-transform:var(--cre8-typography-display-default-text-transform)}}.cre8-c-page-header__title-after{display:inline-block;position:relative;bottom:0.625rem;margin-left:1rem}.cre8-c-page-header__description{font-family:var(--cre8-typography-body-default-font-family);font-size:var(--cre8-typography-body-default-font-size);font-weight:var(--cre8-typography-body-default-font-weight);line-height:var(--cre8-typography-body-default-line-height);text-decoration:var(--cre8-typography-body-default-text-decoration);text-transform:var(--cre8-typography-body-default-text-transform)}`;
|
|
5
|
+
var m = Object.defineProperty, c = (s, t, d, y) => {
|
|
6
|
+
for (var e = void 0, a = s.length - 1, o; a >= 0; a--)
|
|
7
|
+
(o = s[a]) && (e = o(t, d, e) || e);
|
|
8
|
+
return e && m(t, d, e), e;
|
|
44
9
|
};
|
|
45
|
-
const i = class i extends
|
|
10
|
+
const i = class i extends h {
|
|
46
11
|
constructor() {
|
|
47
12
|
super(...arguments), this.heading = "Page header title";
|
|
48
13
|
}
|
|
49
14
|
render() {
|
|
50
15
|
const t = this.componentClassNames("cre8-c-page-header", {});
|
|
51
|
-
return
|
|
16
|
+
return l`
|
|
52
17
|
<div class="${t}">
|
|
53
18
|
<h1 class="cre8-c-page-header__title">
|
|
54
19
|
${this.heading}
|
|
55
|
-
${this.slotNotEmpty("titCre8ter") &&
|
|
20
|
+
${this.slotNotEmpty("titCre8ter") && l`
|
|
56
21
|
<div class="cre8-c-page-header__title-after">
|
|
57
22
|
<slot name="titCre8ter"></slot>
|
|
58
23
|
</div>`}
|
|
@@ -64,13 +29,13 @@ const i = class i extends p {
|
|
|
64
29
|
`;
|
|
65
30
|
}
|
|
66
31
|
};
|
|
67
|
-
i.styles = [
|
|
68
|
-
let
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
],
|
|
72
|
-
customElements.get("cre8-page-header") === void 0 && customElements.define("cre8-page-header",
|
|
32
|
+
i.styles = [f];
|
|
33
|
+
let r = i;
|
|
34
|
+
c([
|
|
35
|
+
n({ type: String })
|
|
36
|
+
], r.prototype, "heading");
|
|
37
|
+
customElements.get("cre8-page-header") === void 0 && customElements.define("cre8-page-header", r);
|
|
73
38
|
export {
|
|
74
|
-
|
|
75
|
-
|
|
39
|
+
r as Cre8PageHeader,
|
|
40
|
+
r as default
|
|
76
41
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-header.styles.d.ts","sourceRoot":"","sources":["../../../components/page-header/page-header.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"page-header.styles.d.ts","sourceRoot":"","sources":["../../../components/page-header/page-header.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,yBAAstG,CAAC;AACnuG,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-counter.styles.d.ts","sourceRoot":"","sources":["../../../../components/pagination/page-counter/page-counter.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"page-counter.styles.d.ts","sourceRoot":"","sources":["../../../../components/pagination/page-counter/page-counter.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,yBAA8rE,CAAC;AAC3sE,eAAe,MAAM,CAAC"}
|
|
@@ -1,40 +1,26 @@
|
|
|
1
|
-
import { css as w, html as a, nothing as
|
|
2
|
-
import { ifDefined as
|
|
3
|
-
import { property as n, state as
|
|
4
|
-
import { h as
|
|
5
|
-
import { s as
|
|
6
|
-
import { Cre8Element as
|
|
1
|
+
import { css as w, html as a, nothing as g } from "lit";
|
|
2
|
+
import { ifDefined as u } from "lit/directives/if-defined.js";
|
|
3
|
+
import { property as n, state as f, queryAll as z } from "lit/decorators.js";
|
|
4
|
+
import { h as C } from "../../icon-D22g8aWB.js";
|
|
5
|
+
import { s as _ } from "../../Caret_Right-DZH0BlfG.js";
|
|
6
|
+
import { Cre8Element as P } from "../cre8-element.js";
|
|
7
7
|
import { Cre8Button as y } from "../button/button.js";
|
|
8
|
-
const
|
|
8
|
+
const k = `<svg fill="currentColor" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
|
9
9
|
<path d="M12.1508 14.7578C12.2184 14.8254 12.272 14.9056 12.3085 14.9939C12.3451 15.0822 12.3639 15.1768 12.3639 15.2724C12.3639 15.3679 12.3451 15.4625 12.3085 15.5508C12.272 15.6391 12.2184 15.7193 12.1508 15.7869C12.0832 15.8544 12.003 15.908 11.9147 15.9446C11.8265 15.9812 11.7318 16 11.6363 16C11.5407 16 11.4461 15.9812 11.3578 15.9446C11.2695 15.908 11.1893 15.8544 11.1218 15.7869L3.8494 8.51452C3.78178 8.44698 3.72814 8.36677 3.69154 8.27849C3.65495 8.1902 3.63611 8.09557 3.63611 8C3.63611 7.90443 3.65495 7.8098 3.69154 7.72151C3.72814 7.63323 3.78178 7.55302 3.8494 7.48548L11.1218 0.213121C11.2582 0.0766618 11.4433 -3.80414e-09 11.6363 0C11.8293 3.80414e-09 12.0143 0.0766618 12.1508 0.213121C12.2873 0.34958 12.3639 0.534658 12.3639 0.72764C12.3639 0.920622 12.2873 1.1057 12.1508 1.24216L5.39205 8L12.1508 14.7578Z"/>
|
|
10
10
|
</svg>
|
|
11
|
-
`,
|
|
11
|
+
`, $ = `<svg fill="currentColor" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
|
12
12
|
<path d="M15.7869 14.7577C15.8544 14.8253 15.908 14.9055 15.9446 14.9937C15.9812 15.082 16 15.1766 16 15.2722C16 15.3678 15.9812 15.4624 15.9446 15.5507C15.908 15.6389 15.8544 15.7191 15.7869 15.7867C15.7193 15.8543 15.6391 15.9079 15.5508 15.9444C15.4625 15.981 15.3679 15.9998 15.2724 15.9998C15.1768 15.9998 15.0822 15.981 14.9939 15.9444C14.9056 15.9079 14.8254 15.8543 14.7579 15.7867L7.48557 8.51443C7.41795 8.44689 7.36432 8.36669 7.32772 8.2784C7.29112 8.19012 7.27228 8.09549 7.27228 7.99992C7.27228 7.90435 7.29112 7.80972 7.32772 7.72143C7.36432 7.63315 7.41795 7.55294 7.48557 7.4854L14.7579 0.213119C14.8943 0.076661 15.0794 -3.8041e-09 15.2724 0C15.4653 3.8041e-09 15.6504 0.076661 15.7869 0.213119C15.9233 0.349576 16 0.534653 16 0.727633C16 0.920613 15.9233 1.10569 15.7869 1.24215L9.0282 7.99992L15.7869 14.7577ZM1.75592 7.99992L8.5146 1.24215C8.65106 1.10569 8.72772 0.920613 8.72772 0.727633C8.72772 0.534653 8.65106 0.349576 8.5146 0.213119C8.37814 0.076661 8.19306 1.43782e-09 8.00008 0C7.8071 -1.43781e-09 7.62203 0.076661 7.48557 0.213119L0.213286 7.4854C0.145671 7.55294 0.0920317 7.63315 0.0554344 7.72143C0.0188371 7.80972 0 7.90435 0 7.99992C0 8.09549 0.0188371 8.19012 0.0554344 8.2784C0.0920317 8.36669 0.145671 8.44689 0.213286 8.51443L7.48557 15.7867C7.55314 15.8543 7.63335 15.9079 7.72163 15.9444C7.80991 15.981 7.90453 15.9998 8.00008 15.9998C8.09564 15.9998 8.19026 15.981 8.27854 15.9444C8.36682 15.9079 8.44703 15.8543 8.5146 15.7867C8.58217 15.7191 8.63576 15.6389 8.67233 15.5507C8.7089 15.4624 8.72772 15.3678 8.72772 15.2722C8.72772 15.1766 8.7089 15.082 8.67233 14.9937C8.63576 14.9055 8.58217 14.8253 8.5146 14.7577L1.75592 7.99992Z"/>
|
|
13
13
|
</svg>
|
|
14
14
|
`, v = {
|
|
15
15
|
md: 768,
|
|
16
16
|
lg: 960
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* 1)
|
|
26
|
-
*/
|
|
27
|
-
.cre8-c-pagination__text{
|
|
28
|
-
@include cre8-typography-label-small();
|
|
29
|
-
padding: calc(8px * 1);
|
|
30
|
-
}
|
|
31
|
-
`;
|
|
32
|
-
var L = Object.defineProperty, u = (h, e, t, s) => {
|
|
33
|
-
for (var i = void 0, o = h.length - 1, c; o >= 0; o--)
|
|
34
|
-
(c = h[o]) && (i = c(e, t, i) || i);
|
|
35
|
-
return i && L(e, t, i), i;
|
|
17
|
+
}, x = (d = "768") => !window.matchMedia(`(min-width: ${d}px)`).matches, R = w`*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{display:inline-flex}.cre8-c-pagination__text{font-family:var(--cre8-typography-label-small-font-family);font-size:var(--cre8-typography-label-small-font-size);font-weight:var(--cre8-typography-label-small-font-weight);line-height:var(--cre8-typography-label-small-line-height);text-decoration:var(--cre8-typography-label-small-text-decoration);text-transform:var(--cre8-typography-label-small-text-transform);padding:0.5rem}`;
|
|
18
|
+
var N = Object.defineProperty, p = (d, t, e, s) => {
|
|
19
|
+
for (var r = void 0, o = d.length - 1, c; o >= 0; o--)
|
|
20
|
+
(c = d[o]) && (r = c(t, e, r) || r);
|
|
21
|
+
return r && N(t, e, r), r;
|
|
36
22
|
};
|
|
37
|
-
const
|
|
23
|
+
const b = class b extends P {
|
|
38
24
|
constructor() {
|
|
39
25
|
super(...arguments), this.currentPage = 1, this.display = "default";
|
|
40
26
|
}
|
|
@@ -53,9 +39,9 @@ const P = class P extends C {
|
|
|
53
39
|
return Math.ceil(this.totalResults / this.pageSize);
|
|
54
40
|
}
|
|
55
41
|
render() {
|
|
56
|
-
const
|
|
42
|
+
const t = this.componentClassNames("cre8-c-page-counter", {});
|
|
57
43
|
return a`
|
|
58
|
-
<div class='${
|
|
44
|
+
<div class='${t}'>
|
|
59
45
|
<span class="cre8-c-pagination__text" aria-live="polite">
|
|
60
46
|
${!this.display || this.display === "default" ? a`${this.currentPage}` : a`${this.currentPage} of ${this._totalPages}`}
|
|
61
47
|
</span>
|
|
@@ -63,135 +49,68 @@ const P = class P extends C {
|
|
|
63
49
|
`;
|
|
64
50
|
}
|
|
65
51
|
};
|
|
66
|
-
|
|
67
|
-
let
|
|
68
|
-
|
|
52
|
+
b.styles = [R];
|
|
53
|
+
let h = b;
|
|
54
|
+
p([
|
|
69
55
|
n({ type: Boolean, reflect: !0 })
|
|
70
|
-
],
|
|
71
|
-
|
|
56
|
+
], h.prototype, "rangeVariant");
|
|
57
|
+
p([
|
|
72
58
|
n()
|
|
73
|
-
],
|
|
74
|
-
|
|
59
|
+
], h.prototype, "currentPage");
|
|
60
|
+
p([
|
|
75
61
|
n()
|
|
76
|
-
],
|
|
77
|
-
|
|
62
|
+
], h.prototype, "totalResults");
|
|
63
|
+
p([
|
|
78
64
|
n()
|
|
79
|
-
],
|
|
80
|
-
|
|
65
|
+
], h.prototype, "pageSize");
|
|
66
|
+
p([
|
|
81
67
|
n()
|
|
82
|
-
],
|
|
83
|
-
customElements.get("cre8-page-counter") === void 0 && customElements.define("cre8-page-counter",
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
:
|
|
88
|
-
|
|
89
|
-
justify-content: var(--pagination-justify-content, center);
|
|
90
|
-
align-items: var(--pagination-align-items, center);
|
|
91
|
-
--cre8-button-width: 2rem;
|
|
92
|
-
--cre8-button-height: 2rem;
|
|
93
|
-
--cre8-button-min-width: 2rem;
|
|
94
|
-
--cre8-button-min-height: 2rem;
|
|
95
|
-
--cre8-button-padding-horizontal-small: 0px;
|
|
96
|
-
--cre8-button-padding-vertical-small: 0px;
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
*, ::slotted(*), *:before, *:after {
|
|
101
|
-
box-sizing: border-box;
|
|
102
|
-
width: auto;
|
|
103
|
-
height: auto;
|
|
104
|
-
display: flex;
|
|
105
|
-
justify-content: center;
|
|
106
|
-
--cre8-button-margin-right: var(--cre8-spacing-2);
|
|
107
|
-
--cre8-button-margin-left: var(--cre8-spacing-2);
|
|
108
|
-
margin-right: var(--cre8-button-margin-right);
|
|
109
|
-
margin-left: var(--cre8-button-margin-left);
|
|
110
|
-
|
|
111
|
-
align-items: center;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
[aria-current='true'], #current{
|
|
115
|
-
--cre8-color-button-tertiary-bg: var( --cre8-color-bg-strong);
|
|
116
|
-
--cre8-color-button-tertiary-content: var(--cre8-color-content-knockout);
|
|
117
|
-
--cre8-color-button-tertiary-border: var(--cre8-color-border-transparent);
|
|
118
|
-
&:hover, &:active{
|
|
119
|
-
border-radius: var(--cre8-border-radius-button);
|
|
120
|
-
--cre8-color-button-tertiary-bg-hover: var(--cre8-color-bg-strong);
|
|
121
|
-
--cre8-color-button-tertiary-content-hover: var(--cre8-color-content-knockout);
|
|
122
|
-
|
|
123
|
-
&:focus, &:focus-visible, &:focus-within{
|
|
124
|
-
border-radius: var(--cre8-border-radius-button);
|
|
125
|
-
|
|
126
|
-
--cre8-color-button-tertiary-bg-active: var(--cre8-color-bg-strong);
|
|
127
|
-
--cre8-color-button-tertiary-content-active: var(--cre8-color-content-knockout);
|
|
128
|
-
@includefocus();
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.cre8-c-pagination--compact, .cre8-c-pagination--icon-only, .cre8-c-pagination--range {
|
|
134
|
-
--cre8-button-width: 3rem;
|
|
135
|
-
--cre8-button-height: 3rem;
|
|
136
|
-
--cre8-button-min-width: 3rem;
|
|
137
|
-
--cre8-button-min-height: 3rem;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.cre8-c-pagionation__icon {
|
|
141
|
-
fill: var(--cre8-color-button-tertiary-content);
|
|
142
|
-
}
|
|
143
|
-
.cre8-c-pagination__icon:has(cre8-button:disabled){
|
|
144
|
-
color: var(--cre8-color-button-tertiary-content-disabled);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.cre8-c-pagination [aria-disabled="true"]{
|
|
148
|
-
fill: var(--cre8-color-content-default);
|
|
149
|
-
--cre8-color-button-tertiary-content: var(--cre8-color-content-default);
|
|
150
|
-
}
|
|
151
|
-
`;
|
|
152
|
-
var T = Object.defineProperty, k = Object.getOwnPropertyDescriptor, l = (h, e, t, s) => {
|
|
153
|
-
for (var i = s > 1 ? void 0 : s ? k(e, t) : e, o = h.length - 1, c; o >= 0; o--)
|
|
154
|
-
(c = h[o]) && (i = (s ? c(e, t, i) : c(i)) || i);
|
|
155
|
-
return s && i && T(e, t, i), i;
|
|
68
|
+
], h.prototype, "display");
|
|
69
|
+
customElements.get("cre8-page-counter") === void 0 && customElements.define("cre8-page-counter", h);
|
|
70
|
+
const S = w`*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{display:var(--pagination-display, inline-flex);justify-content:var(--pagination-justify-content, center);align-items:var(--pagination-align-items, center);--cre8-button-width: 2rem;--cre8-button-height: 2rem;--cre8-button-min-width: 2rem;--cre8-button-min-height: 2rem;--cre8-button-padding-horizontal-small: 0px;--cre8-button-padding-vertical-small: 0px}*,::slotted(*),*:before,*:after{box-sizing:border-box;width:auto;height:auto;display:flex;justify-content:center;--cre8-button-margin-right: var(--cre8-spacing-2);--cre8-button-margin-left: var(--cre8-spacing-2);margin-right:var(--cre8-button-margin-right);margin-left:var(--cre8-button-margin-left);align-items:center}[aria-current=true],#current{--cre8-color-button-tertiary-bg: var( --cre8-color-bg-strong);--cre8-color-button-tertiary-content: var(--cre8-color-content-knockout);--cre8-color-button-tertiary-border: var(--cre8-color-border-transparent)}[aria-current=true]:hover,[aria-current=true]:active,#current:hover,#current:active{border-radius:var(--cre8-border-radius-button);--cre8-color-button-tertiary-bg-hover: var(--cre8-color-bg-strong);--cre8-color-button-tertiary-content-hover: var(--cre8-color-content-knockout)}[aria-current=true]:hover:focus,[aria-current=true]:hover:focus-visible,[aria-current=true]:hover:focus-within,[aria-current=true]:active:focus,[aria-current=true]:active:focus-visible,[aria-current=true]:active:focus-within,#current:hover:focus,#current:hover:focus-visible,#current:hover:focus-within,#current:active:focus,#current:active:focus-visible,#current:active:focus-within{border-radius:var(--cre8-border-radius-button);--cre8-color-button-tertiary-bg-active: var(--cre8-color-bg-strong);--cre8-color-button-tertiary-content-active: var(--cre8-color-content-knockout);outline:var(--cre8-border-width-focus) solid var(--cre8-color-border-active-outline);outline-offset:0.125rem}.cre8-c-pagination--compact,.cre8-c-pagination--icon-only,.cre8-c-pagination--range{--cre8-button-width: 3rem;--cre8-button-height: 3rem;--cre8-button-min-width: 3rem;--cre8-button-min-height: 3rem}.cre8-c-pagionation__icon{fill:var(--cre8-color-button-tertiary-content)}.cre8-c-pagination__icon:has(cre8-button:disabled){color:var(--cre8-color-button-tertiary-content-disabled)}.cre8-c-pagination [aria-disabled=true]{fill:var(--cre8-color-content-default);--cre8-color-button-tertiary-content: var(--cre8-color-content-default)}`;
|
|
71
|
+
var T = Object.defineProperty, L = Object.getOwnPropertyDescriptor, l = (d, t, e, s) => {
|
|
72
|
+
for (var r = s > 1 ? void 0 : s ? L(t, e) : t, o = d.length - 1, c; o >= 0; o--)
|
|
73
|
+
(c = d[o]) && (r = (s ? c(t, e, r) : c(r)) || r);
|
|
74
|
+
return s && r && T(t, e, r), r;
|
|
156
75
|
};
|
|
157
|
-
const
|
|
76
|
+
const m = class m extends P {
|
|
158
77
|
constructor() {
|
|
159
|
-
super(...arguments), this._currentPage = 99, this._pageSize = 10, this.visiblePages = 5, this._handleKeydown = (
|
|
160
|
-
s.code === "Enter" && this._goToPage(
|
|
161
|
-
}, this._goToPage = (
|
|
78
|
+
super(...arguments), this._currentPage = 99, this._pageSize = 10, this.visiblePages = 5, this._handleKeydown = (t, e) => (s) => {
|
|
79
|
+
s.code === "Enter" && this._goToPage(t, e);
|
|
80
|
+
}, this._goToPage = (t, e) => () => {
|
|
162
81
|
const s = this._currentPage;
|
|
163
|
-
let
|
|
82
|
+
let r;
|
|
164
83
|
this.buttons.forEach((o) => {
|
|
165
84
|
const c = new y();
|
|
166
|
-
return c.hideText && c.text ===
|
|
167
|
-
}), this._currentPage =
|
|
85
|
+
return c.hideText && c.text === e && (r = c, r.shadowRoot.querySelector(".cre8-c-button").blur()), null;
|
|
86
|
+
}), this._currentPage = t, this.currentPage = this._currentPage, this.requestUpdate("currentPage", s), this.dispatchEvent(new CustomEvent(
|
|
168
87
|
"pagination.click",
|
|
169
|
-
{ detail: { buttonName:
|
|
88
|
+
{ detail: { buttonName: e ?? this.currentPage.toString(), value: this.currentPage } }
|
|
170
89
|
));
|
|
171
90
|
};
|
|
172
91
|
}
|
|
173
92
|
get pageSize() {
|
|
174
93
|
return this._pageSize;
|
|
175
94
|
}
|
|
176
|
-
set pageSize(
|
|
177
|
-
const
|
|
178
|
-
this._pageSize =
|
|
95
|
+
set pageSize(t) {
|
|
96
|
+
const e = this._pageSize;
|
|
97
|
+
this._pageSize = t, this.requestUpdate("pageSize", e);
|
|
179
98
|
}
|
|
180
99
|
get currentPage() {
|
|
181
100
|
return this._currentPage;
|
|
182
101
|
}
|
|
183
|
-
set currentPage(
|
|
184
|
-
const
|
|
185
|
-
this._currentPage =
|
|
102
|
+
set currentPage(t) {
|
|
103
|
+
const e = this._currentPage;
|
|
104
|
+
this._currentPage = t, this.requestUpdate("currentPage", e);
|
|
186
105
|
}
|
|
187
106
|
connectedCallBack() {
|
|
188
107
|
super.connectedCallback();
|
|
189
108
|
}
|
|
190
109
|
get maxVisiblePages() {
|
|
191
|
-
const
|
|
110
|
+
const t = {
|
|
192
111
|
md: 5
|
|
193
112
|
};
|
|
194
|
-
return
|
|
113
|
+
return x(v.lg.toString()) ? x(v.md.toString()) ? 0 : Math.min(t.md, this.visiblePages) : this.visiblePages;
|
|
195
114
|
}
|
|
196
115
|
get totalPages() {
|
|
197
116
|
return Math.ceil(this.totalResults / this.pageSize);
|
|
@@ -210,25 +129,25 @@ const b = class b extends C {
|
|
|
210
129
|
}
|
|
211
130
|
// get range of pages to display [3, 4, 5], [2, 3, 4, 5]
|
|
212
131
|
get pageRange() {
|
|
213
|
-
const
|
|
214
|
-
let
|
|
215
|
-
|
|
216
|
-
const s = Math.min(
|
|
217
|
-
return [...Array(this.totalPages)].map((
|
|
132
|
+
const t = Math.floor(this.maxVisiblePages / 2);
|
|
133
|
+
let e = this.currentPage - t;
|
|
134
|
+
e = Math.min(e, this.totalPages - this.maxVisiblePages + 1), e = Math.max(e, 1);
|
|
135
|
+
const s = Math.min(e + this.maxVisiblePages - 1, this.totalPages);
|
|
136
|
+
return [...Array(this.totalPages)].map((r, o) => o + 1).slice(e - 1, s);
|
|
218
137
|
}
|
|
219
138
|
async firstUpdated() {
|
|
220
139
|
if (await this.updateComplete, this._pageSize !== this.pageSize) {
|
|
221
|
-
const
|
|
222
|
-
this._pageSize = this.pageSize, this.requestUpdate("pageSize",
|
|
140
|
+
const t = this._pageSize;
|
|
141
|
+
this._pageSize = this.pageSize, this.requestUpdate("pageSize", t);
|
|
223
142
|
}
|
|
224
143
|
if (this.windowWidth = window.innerWidth, window.addEventListener("resize", () => {
|
|
225
144
|
if (this.windowWidth !== window.innerWidth) {
|
|
226
|
-
const
|
|
227
|
-
this.windowWidth = window.innerWidth, this.handleResize(), this.requestUpdate("isResponsive",
|
|
145
|
+
const t = this.windowWidth;
|
|
146
|
+
this.windowWidth = window.innerWidth, this.handleResize(), this.requestUpdate("isResponsive", t);
|
|
228
147
|
}
|
|
229
148
|
}), this._currentPage !== this.currentPage) {
|
|
230
|
-
const
|
|
231
|
-
this._currentPage = this.currentPage, this.requestUpdate("currentPage",
|
|
149
|
+
const t = this._currentPage;
|
|
150
|
+
this._currentPage = this.currentPage, this.requestUpdate("currentPage", t);
|
|
232
151
|
}
|
|
233
152
|
}
|
|
234
153
|
disconnectedCallback() {
|
|
@@ -243,28 +162,28 @@ const b = class b extends C {
|
|
|
243
162
|
display=${this.display}>
|
|
244
163
|
</cre8-page-counter>`;
|
|
245
164
|
}
|
|
246
|
-
goToPage(
|
|
247
|
-
return this._goToPage(
|
|
165
|
+
goToPage(t, e) {
|
|
166
|
+
return this._goToPage(t, e).bind(this);
|
|
248
167
|
}
|
|
249
|
-
handleKeydown(
|
|
250
|
-
return this._handleKeydown(
|
|
168
|
+
handleKeydown(t, e) {
|
|
169
|
+
return this._handleKeydown(t, e);
|
|
251
170
|
}
|
|
252
171
|
render() {
|
|
253
|
-
const
|
|
172
|
+
const t = this.componentClassNames("cre8-c-pagination", {
|
|
254
173
|
"cre8-c-pagination--compact": this.display !== void 0 && this.display === "compact",
|
|
255
174
|
"cre8-c-pagination--icon-only": this.display !== void 0 && this.display === "icon-only"
|
|
256
175
|
});
|
|
257
176
|
return a`<nav
|
|
258
177
|
aria-label="pagination"
|
|
259
|
-
class=${
|
|
178
|
+
class=${t}>
|
|
260
179
|
<slot></slot>
|
|
261
|
-
${this.hideLastAndFirstButtons ?
|
|
180
|
+
${this.hideLastAndFirstButtons ? g : a` <cre8-button
|
|
262
181
|
variant="tertiary"
|
|
263
182
|
size="sm"
|
|
264
183
|
text=""
|
|
265
184
|
hideText
|
|
266
185
|
part="icon"
|
|
267
|
-
aria-disabled="${
|
|
186
|
+
aria-disabled="${u(this.hasNoPreviousPage)}"
|
|
268
187
|
?disabled=${this.hasNoPreviousPage}
|
|
269
188
|
@click=${this.goToPage(1, "First Page")}
|
|
270
189
|
@keydown=${this.handleKeydown(1, "First Page")}
|
|
@@ -274,7 +193,7 @@ const b = class b extends C {
|
|
|
274
193
|
<cre8-icon
|
|
275
194
|
className="cre8-c-pagination__icon"
|
|
276
195
|
aria-label="First Page"
|
|
277
|
-
svg=${
|
|
196
|
+
svg=${$}
|
|
278
197
|
size="24">
|
|
279
198
|
</cre8-icon>
|
|
280
199
|
</span>
|
|
@@ -285,7 +204,7 @@ const b = class b extends C {
|
|
|
285
204
|
hideText
|
|
286
205
|
text=""
|
|
287
206
|
part="icon"
|
|
288
|
-
aria-disabled="${
|
|
207
|
+
aria-disabled="${u(this.hasNoPreviousPage)}"
|
|
289
208
|
?disabled=${this.hasNoPreviousPage}
|
|
290
209
|
@click=${this.goToPage(this._currentPage - 1, "Previous Page")}
|
|
291
210
|
@keydown=${this.handleKeydown(this.currentPage - 1, "Previous Page")}
|
|
@@ -296,7 +215,7 @@ const b = class b extends C {
|
|
|
296
215
|
className="cre8-c-pagination__icon"
|
|
297
216
|
aria-label="Previous Page"
|
|
298
217
|
slot="before"
|
|
299
|
-
svg=${
|
|
218
|
+
svg=${k}
|
|
300
219
|
size="24"
|
|
301
220
|
|
|
302
221
|
>
|
|
@@ -305,15 +224,15 @@ const b = class b extends C {
|
|
|
305
224
|
</cre8-button>
|
|
306
225
|
|
|
307
226
|
${this.displayTypes()}
|
|
308
|
-
${!this.display || this.display === "default" ? a`${this.pageRange[this.pageRange.length - 1] > 1 && this.pageRange[0] !== 1 ? a`<cre8-button hideText iconName="ellipsis" variant="tertiary" size="sm" aria-disabled="true" inert></cre8-button>` :
|
|
309
|
-
${this.pageRange.map((
|
|
227
|
+
${!this.display || this.display === "default" ? a`${this.pageRange[this.pageRange.length - 1] > 1 && this.pageRange[0] !== 1 ? a`<cre8-button hideText iconName="ellipsis" variant="tertiary" size="sm" aria-disabled="true" inert></cre8-button>` : g}
|
|
228
|
+
${this.pageRange.map((e) => e === this.currentPage ? a`<cre8-button variant="tertiary" tab-index="-1" text="${e}" class="icon-only" size="sm" id="current"></cre8-button>` : a`<cre8-button
|
|
310
229
|
variant="tertiary"
|
|
311
230
|
size="sm"
|
|
312
|
-
text="${
|
|
231
|
+
text="${e}"
|
|
313
232
|
class="icon-only"
|
|
314
|
-
id="${
|
|
315
|
-
@click=${this.goToPage(
|
|
316
|
-
@keydown=${this.handleKeydown(
|
|
233
|
+
id="${e}"
|
|
234
|
+
@click=${this.goToPage(e, e.toString())}
|
|
235
|
+
@keydown=${this.handleKeydown(e, e.toString())}>
|
|
317
236
|
</cre8-button>`)}
|
|
318
237
|
${this.pageRange[this.pageRange.length - 1] < this.totalPages ? a`<cre8-button
|
|
319
238
|
hideText
|
|
@@ -323,14 +242,14 @@ const b = class b extends C {
|
|
|
323
242
|
size="sm"
|
|
324
243
|
aria-disabled="true"
|
|
325
244
|
inert>
|
|
326
|
-
</cre8-button>` :
|
|
245
|
+
</cre8-button>` : g}` : g}
|
|
327
246
|
<cre8-button
|
|
328
247
|
variant="tertiary"
|
|
329
248
|
size="sm"
|
|
330
249
|
part="icon"
|
|
331
250
|
hideText
|
|
332
251
|
text=""
|
|
333
|
-
aria-disabled="${
|
|
252
|
+
aria-disabled="${u(this.hasNoNextPage)}"
|
|
334
253
|
?disabled=${this.hasNoNextPage}
|
|
335
254
|
@click=${this.goToPage(this.currentPage + 1, "Next Page")}
|
|
336
255
|
@keydown=${this.handleKeydown(this.currentPage + 1, "Next Page")}
|
|
@@ -340,19 +259,19 @@ const b = class b extends C {
|
|
|
340
259
|
<cre8-icon
|
|
341
260
|
aria-label="Next Page"
|
|
342
261
|
className="cre8-c-pagination__icon"
|
|
343
|
-
slot="before" svg=${
|
|
262
|
+
slot="before" svg=${_}
|
|
344
263
|
size="24">
|
|
345
264
|
</cre8-icon>
|
|
346
265
|
</span>
|
|
347
266
|
</cre8-button>
|
|
348
267
|
|
|
349
|
-
${this.hideLastAndFirstButtons ?
|
|
268
|
+
${this.hideLastAndFirstButtons ? g : a` <cre8-button
|
|
350
269
|
variant="tertiary"
|
|
351
270
|
size="sm"
|
|
352
271
|
hideText
|
|
353
272
|
text=""
|
|
354
273
|
part="icon"
|
|
355
|
-
aria-disabled="${
|
|
274
|
+
aria-disabled="${u(this.hasNoNextPage)}"
|
|
356
275
|
?disabled=${this.hasNoNextPage}
|
|
357
276
|
@click=${this.goToPage(this.totalPages, "Last Page")}
|
|
358
277
|
@keydown=${this.handleKeydown(this.totalPages, "Last Page")}
|
|
@@ -363,7 +282,7 @@ const b = class b extends C {
|
|
|
363
282
|
aria-label="Last Page"
|
|
364
283
|
className="cre8-c-pagination__icon"
|
|
365
284
|
slot="before"
|
|
366
|
-
svg=${
|
|
285
|
+
svg=${C}
|
|
367
286
|
size="24"
|
|
368
287
|
>
|
|
369
288
|
</cre8-icon>
|
|
@@ -373,41 +292,41 @@ const b = class b extends C {
|
|
|
373
292
|
</nav>`;
|
|
374
293
|
}
|
|
375
294
|
};
|
|
376
|
-
|
|
295
|
+
m.styles = [S], m.elementDefinitions = {
|
|
377
296
|
"cre8-button": y
|
|
378
297
|
};
|
|
379
|
-
let
|
|
298
|
+
let i = m;
|
|
380
299
|
l([
|
|
381
|
-
|
|
382
|
-
],
|
|
300
|
+
f()
|
|
301
|
+
], i.prototype, "_currentPage", 2);
|
|
383
302
|
l([
|
|
384
303
|
n({ reflect: !0, type: Number })
|
|
385
|
-
],
|
|
304
|
+
], i.prototype, "totalResults", 2);
|
|
386
305
|
l([
|
|
387
306
|
n({ type: Number, reflect: !0 })
|
|
388
|
-
],
|
|
307
|
+
], i.prototype, "pageSize", 1);
|
|
389
308
|
l([
|
|
390
|
-
|
|
391
|
-
],
|
|
309
|
+
f()
|
|
310
|
+
], i.prototype, "_pageSize", 2);
|
|
392
311
|
l([
|
|
393
312
|
n({ reflect: !0, type: Number })
|
|
394
|
-
],
|
|
313
|
+
], i.prototype, "visiblePages", 2);
|
|
395
314
|
l([
|
|
396
315
|
n({ type: String, reflect: !0 })
|
|
397
|
-
],
|
|
316
|
+
], i.prototype, "display", 2);
|
|
398
317
|
l([
|
|
399
|
-
|
|
400
|
-
],
|
|
318
|
+
f()
|
|
319
|
+
], i.prototype, "windowWidth", 2);
|
|
401
320
|
l([
|
|
402
|
-
|
|
403
|
-
],
|
|
321
|
+
z("cre8-button")
|
|
322
|
+
], i.prototype, "buttons", 2);
|
|
404
323
|
l([
|
|
405
324
|
n({ type: Boolean, reflect: !0 })
|
|
406
|
-
],
|
|
325
|
+
], i.prototype, "hideLastAndFirstButtons", 2);
|
|
407
326
|
l([
|
|
408
327
|
n({ reflect: !0, type: Number })
|
|
409
|
-
],
|
|
410
|
-
customElements.get("cre8-pagination") === void 0 && customElements.define("cre8-pagination",
|
|
328
|
+
], i.prototype, "currentPage", 1);
|
|
329
|
+
customElements.get("cre8-pagination") === void 0 && customElements.define("cre8-pagination", i);
|
|
411
330
|
export {
|
|
412
|
-
|
|
331
|
+
i as Cre8Pagination
|
|
413
332
|
};
|