@tmorrow/cre8-wc 1.0.25 → 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 +15 -46
- 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 +16 -16
- package/lib/components/button-group/button-group.js +19 -50
- 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.d.ts +0 -5
- package/lib/components/checkbox-field-item/checkbox-field-item.d.ts.map +1 -1
- package/lib/components/checkbox-field-item/checkbox-field-item.js +42 -212
- package/lib/components/checkbox-field-item/checkbox-field-item.styles.d.ts.map +1 -1
- package/lib/components/contexts/form-internals-context.d.ts +30 -0
- package/lib/components/contexts/form-internals-context.d.ts.map +1 -0
- package/lib/components/cre8-form-element.d.ts +98 -24
- package/lib/components/cre8-form-element.d.ts.map +1 -1
- package/lib/components/cre8-form-element.js +221 -22
- 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 +57 -222
- 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.d.ts +0 -4
- package/lib/components/radio-field-item/radio-field-item.d.ts.map +1 -1
- package/lib/components/radio-field-item/radio-field-item.js +69 -207
- 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.d.ts +6 -10
- package/lib/components/select/select.d.ts.map +1 -1
- package/lib/components/select/select.js +67 -135
- package/lib/components/select/select.styles.d.ts.map +1 -1
- package/lib/components/select-tile/select-tile.d.ts +0 -4
- package/lib/components/select-tile/select-tile.d.ts.map +1 -1
- package/lib/components/select-tile/select-tile.js +21 -448
- 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.d.ts.map +1 -1
- package/lib/components/tabs/tabs.js +58 -159
- package/lib/components/tabs/tabs.styles.d.ts.map +1 -1
- package/lib/components/tag/tag.js +46 -161
- 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 +6 -6
- 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 +12 -5
|
@@ -1,122 +1,16 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { css as
|
|
3
|
-
import { property as
|
|
4
|
-
import { Cre8Element as
|
|
1
|
+
import { a as s } from "../../icon-D22g8aWB.js";
|
|
2
|
+
import { css as c, html as n } from "lit";
|
|
3
|
+
import { property as r } from "lit/decorators.js";
|
|
4
|
+
import { Cre8Element as g } from "../cre8-element.js";
|
|
5
5
|
import "../button/button.js";
|
|
6
6
|
import "../table-cell/table-cell.js";
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
\*------------------------------------*/
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Set the host to display the contents within the table header or table body wrapper
|
|
16
|
-
*/
|
|
17
|
-
:host {
|
|
18
|
-
display: contents;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* 1) Row of the cre8 table
|
|
23
|
-
*/
|
|
24
|
-
.cre8-c-table__row {
|
|
25
|
-
display: var(--cre8-table-row-display, table-row);
|
|
26
|
-
border-bottom: var(--cre8-table-row-border-bottom);
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Table row hover state
|
|
30
|
-
* 1) Set the row hover background via custom property to allow
|
|
31
|
-
* the table variant to control the color
|
|
32
|
-
*/
|
|
33
|
-
&:hover {
|
|
34
|
-
background: var(--cre8-table-row-hover-background);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Table row within odd cre8-table-row wrappers
|
|
39
|
-
* 1) Set the odd row and odd row hover background via
|
|
40
|
-
* custom property to allow the table variant to control the color
|
|
41
|
-
*/
|
|
42
|
-
:host(:nth-child(odd)) & {
|
|
43
|
-
background: var(--cre8-table-row-odd-background, none);
|
|
44
|
-
|
|
45
|
-
&:hover {
|
|
46
|
-
background: var(--cre8-table-row-odd-hover-background, inherit);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
@media all and (min-width:$cre8-breakpoint-md) {
|
|
51
|
-
border-bottom: inherit;
|
|
52
|
-
display: table-row;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Bare variant to remove border
|
|
58
|
-
*/
|
|
59
|
-
.cre8-c-table__row--bare {
|
|
60
|
-
--cre8-table-cell-border-bottom-color: transparent;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Slotted table row in expanded content following expandable table row
|
|
65
|
-
* 1) Don't show the collapsed table row by default
|
|
66
|
-
*/
|
|
67
|
-
.cre8-c-table__row--expandable + ::slotted(cre8-table-row) {
|
|
68
|
-
display: none; /* 1 */
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.cre8-c-table__row--expandable.cre8-is-expanded {
|
|
72
|
-
--cre8-table-cell-border-bottom-color: transparent;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Slotted table row in expanded content following expanded table row class
|
|
77
|
-
* 1) Display contents to get the proper table-row display for the row
|
|
78
|
-
*/
|
|
79
|
-
.cre8-c-table__row--expandable.cre8-is-expanded + ::slotted(cre8-table-row) {
|
|
80
|
-
display: contents; /* 1 */
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Button that expands the next table row
|
|
85
|
-
*/
|
|
86
|
-
.cre8-c-table__expand-button {
|
|
87
|
-
background-color: var(--cre8-color-bg-transparent);
|
|
88
|
-
border-width: var(--cre8-border-width-none);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Text within the button that expands the next table row
|
|
93
|
-
*/
|
|
94
|
-
.cre8-c-table__expand-button-text {
|
|
95
|
-
@include visuallyHidden;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Icon within the button that expands the next table row
|
|
100
|
-
*/
|
|
101
|
-
.cre8-c-table__expand-button-icon {
|
|
102
|
-
display: block;
|
|
103
|
-
transition: transform 0.2s ease;
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* Icon within the button that expands the next table row when the table row is expanded
|
|
107
|
-
* 1) Rotate the icon to show that it's open
|
|
108
|
-
*/
|
|
109
|
-
.cre8-is-expanded & {
|
|
110
|
-
transform: rotate(90deg); /* 1 */
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
`;
|
|
114
|
-
var w = Object.defineProperty, a = (d, r, c, u) => {
|
|
115
|
-
for (var t = void 0, l = d.length - 1, i; l >= 0; l--)
|
|
116
|
-
(i = d[l]) && (t = i(r, c, t) || t);
|
|
117
|
-
return t && w(r, c, t), t;
|
|
7
|
+
const h = c`.cre8-u-content-knockout-brand{color:var(----cre8-color-content-knockout-brand)}.cre8-u-is-hidden{display:none !important;visibility:hidden !important}.cre8-u-is-vishidden{position:absolute !important;overflow:hidden;width:1px;height:1px;padding:0;border:0;clip:rect(1px, 1px, 1px, 1px)}@media all and (min-width: 23.4375rem){.cre8-u-hide-sm{display:none !important}}@media all and (min-width: 35rem){.cre8-u-hide-sm-2{display:none !important}}@media all and (min-width: 48rem){.cre8-u-hide-md{display:none !important}}@media all and (min-width: 60rem){.cre8-u-hide-lg{display:none !important}}@media all and (min-width: 75rem){.cre8-u-hide-xl{display:none !important}}@media all and (max-width: 23.4375rem){.cre8-u-show-sm{display:none !important}}@media all and (max-width: 35rem){.cre8-u-show-sm-2{display:none !important}}@media all and (max-width: 48rem){.cre8-u-show-md{display:none !important}}@media all and (max-width: 60rem){.cre8-u-show-lg{display:none !important}}@media all and (max-width: 75rem){.cre8-u-show-xl{display:none !important}}.cre8-u-margin-none{margin:0 !important}.cre8-u-margin-sm{margin:size(1) !important}.cre8-u-margin-md{margin:size(2) !important}.cre8-u-margin-lg{margin:size(3) !important}.cre8-u-margin-xl{margin:size(4) !important}.cre8-u-margin-xxl{margin:size(8) !important}.cre8-u-margin-top-none{margin-top:0 !important}.cre8-u-margin-top-sm{margin-top:size(1) !important}.cre8-u-margin-top-md{margin-top:size(2) !important}.cre8-u-margin-top-lg{margin-top:size(3) !important}.cre8-u-margin-top-xl{margin-top:size(4) !important}.cre8-u-margin-top-xxl{margin-top:size(8) !important}.cre8-u-margin-right-none{margin-right:0 !important}.cre8-u-margin-right-sm{margin-right:size(1) !important}.cre8-u-margin-right-md{margin-right:size(2) !important}.cre8-u-margin-right-lg{margin-right:size(3) !important}.cre8-u-margin-right-xl{margin-right:size(4) !important}.cre8-u-margin-right-xxl{margin-right:size(8) !important}.cre8-u-margin-bottom-none{margin-bottom:0 !important}.cre8-u-margin-bottom-sm{margin-bottom:size(1) !important}.cre8-u-margin-bottom-md{margin-bottom:size(2) !important}.cre8-u-margin-bottom-lg{margin-bottom:size(3) !important}.cre8-u-margin-bottom-xl{margin-bottom:size(4) !important}.cre8-u-margin-bottom-xxl{margin-bottom:size(8) !important}.cre8-u-margin-bottom-xl-xxl{margin-bottom:size(4) !important}@media all and (min-width: 768px){.cre8-u-margin-bottom-xl-xxl{margin-bottom:size(8) !important}}.cre8-u-margin-left-none{margin-left:0 !important}.cre8-u-margin-left-sm{margin-left:size(1) !important}.cre8-u-margin-left-md{margin-left:size(2) !important}.cre8-u-margin-left-lg{margin-left:size(3) !important}.cre8-u-margin-left-xl{margin-left:size(4) !important}.cre8-u-margin-left-xxl{margin-left:size(8) !important}.cre8-u-padding-none{padding:0 !important}.cre8-u-padding-sm{padding:size(1) !important}.cre8-u-padding-md{padding:size(2) !important}.cre8-u-padding-lg{padding:size(3) !important}.cre8-u-padding-xl{padding:size(4) !important}.cre8-u-padding-xxl{padding:size(8) !important}.cre8-u-padding-top-none{padding-top:0 !important}.cre8-u-padding-top-sm{padding-top:size(1) !important}.cre8-u-padding-top-md{padding-top:size(2) !important}.cre8-u-padding-top-lg{padding-top:size(3) !important}.cre8-u-padding-top-xl{padding-top:size(4) !important}.cre8-u-padding-top-xxl{padding-top:size(8) !important}.cre8-u-padding-right-none{padding-right:0 !important}.cre8-u-padding-right-sm{padding-right:size(1) !important}.cre8-u-padding-right-md{padding-right:size(2) !important}.cre8-u-padding-right-lg{padding-right:size(3) !important}.cre8-u-padding-right-xl{padding-right:size(4) !important}.cre8-u-padding-right-xxl{padding-right:size(8) !important}.cre8-u-padding-bottom-none{padding-bottom:0 !important}.cre8-u-padding-bottom-sm{padding-bottom:size(1) !important}.cre8-u-padding-bottom-md{padding-bottom:size(2) !important}.cre8-u-padding-bottom-lg{padding-bottom:size(3) !important}.cre8-u-padding-bottom-xl{padding-bottom:size(4) !important}.cre8-u-padding-bottom-xxl{padding-bottom:size(8) !important}.cre8-u-padding-left-none{padding-left:0 !important}.cre8-u-padding-left-sm{padding-left:size(1) !important}.cre8-u-padding-left-md{padding-left:size(2) !important}.cre8-u-padding-left-lg{padding-left:size(3) !important}.cre8-u-padding-left-xl{padding-left:size(4) !important}.cre8-u-padding-left-xxl{padding-left:size(8) !important}.cre8-u-display-flex{display:flex !important}.cre8-u-display-block{display:block !important}body{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);display:flex;flex-direction:column;padding:0;margin:0;color:var(--cre8-color-content-default);background:var(--background-default)}@media all and (min-width: 60rem){.page-container{background:linear-gradient(90deg, #fff 0, #fff 66.66%, #f8f8f9 0, #f8f8f9 0)}}.band__inner{margin-left:2rem;margin-right:2rem}@media all and (min-width: 60rem){.band__inner{margin-right:0}}img{max-width:100%;height:auto}*,::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:contents}.cre8-c-table__row{display:var(--cre8-table-row-display, table-row);border-bottom:var(--cre8-table-row-border-bottom)}.cre8-c-table__row:hover{background:var(--cre8-table-row-hover-background)}:host(:nth-child(odd)) .cre8-c-table__row{background:var(--cre8-table-row-odd-background, none)}:host(:nth-child(odd)) .cre8-c-table__row:hover{background:var(--cre8-table-row-odd-hover-background, inherit)}@media all and (min-width: 768px){.cre8-c-table__row{border-bottom:inherit;display:table-row}}.cre8-c-table__row--bare{--cre8-table-cell-border-bottom-color: transparent}.cre8-c-table__row--expandable+::slotted(cre8-table-row){display:none}.cre8-c-table__row--expandable.cre8-is-expanded{--cre8-table-cell-border-bottom-color: transparent}.cre8-c-table__row--expandable.cre8-is-expanded+::slotted(cre8-table-row){display:contents}.cre8-c-table__expand-button{background-color:var(--cre8-color-bg-transparent);border-width:var(--cre8-border-width-none)}.cre8-c-table__expand-button-text{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.cre8-c-table__expand-button-icon{display:block;transition:transform .2s ease}.cre8-is-expanded .cre8-c-table__expand-button-icon{transform:rotate(90deg)}`;
|
|
8
|
+
var x = Object.defineProperty, i = (p, a, m, u) => {
|
|
9
|
+
for (var e = void 0, o = p.length - 1, l; o >= 0; o--)
|
|
10
|
+
(l = p[o]) && (e = l(a, m, e) || e);
|
|
11
|
+
return e && x(a, m, e), e;
|
|
118
12
|
};
|
|
119
|
-
const
|
|
13
|
+
const d = class d extends g {
|
|
120
14
|
constructor() {
|
|
121
15
|
super(...arguments), this.expandedButtonText = "Collapse Table Row", this.collapsedButtonText = "Expand Table Row";
|
|
122
16
|
}
|
|
@@ -124,13 +18,13 @@ const s = class s extends h {
|
|
|
124
18
|
this.isExpanded = !this.isExpanded, this.classList.contains("cre8-is-expanded") ? this.classList.remove("cre8-is-expanded") : this.classList.add("cre8-is-expanded");
|
|
125
19
|
}
|
|
126
20
|
render() {
|
|
127
|
-
const
|
|
21
|
+
const a = this.componentClassNames("cre8-c-table__row", {
|
|
128
22
|
"cre8-c-table__row--expandable": this.isExpandable,
|
|
129
23
|
"cre8-c-table__row--bare": this.variant === "bare",
|
|
130
24
|
"cre8-is-expanded": this.isExpanded
|
|
131
25
|
});
|
|
132
26
|
return n`
|
|
133
|
-
<tr role="row" class="${
|
|
27
|
+
<tr role="row" class="${a}">
|
|
134
28
|
${this.isExpandable ? n`<cre8-table-cell>
|
|
135
29
|
<button
|
|
136
30
|
class="cre8-c-table__expand-button"
|
|
@@ -140,7 +34,7 @@ const s = class s extends h {
|
|
|
140
34
|
<span class="cre8-c-table__expand-button-text">
|
|
141
35
|
${this.isExpanded ? this.expandedButtonText : this.collapsedButtonText}
|
|
142
36
|
</span>
|
|
143
|
-
<cre8-icon svg='${
|
|
37
|
+
<cre8-icon svg='${s}' rotate="90" class="cre8-c-table__expand-button-icon"></cre8-icon>
|
|
144
38
|
</button>
|
|
145
39
|
</cre8-table-cell>` : ""}
|
|
146
40
|
${n`<slot></slot>`}
|
|
@@ -149,25 +43,25 @@ const s = class s extends h {
|
|
|
149
43
|
`;
|
|
150
44
|
}
|
|
151
45
|
};
|
|
152
|
-
|
|
153
|
-
let
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
],
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
],
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
],
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
],
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
],
|
|
169
|
-
customElements.get("cre8-table-row") === void 0 && customElements.define("cre8-table-row",
|
|
46
|
+
d.styles = [h];
|
|
47
|
+
let t = d;
|
|
48
|
+
i([
|
|
49
|
+
r({ type: Boolean, reflect: !0 })
|
|
50
|
+
], t.prototype, "isExpanded");
|
|
51
|
+
i([
|
|
52
|
+
r({ type: Boolean, reflect: !0 })
|
|
53
|
+
], t.prototype, "isExpandable");
|
|
54
|
+
i([
|
|
55
|
+
r()
|
|
56
|
+
], t.prototype, "variant");
|
|
57
|
+
i([
|
|
58
|
+
r()
|
|
59
|
+
], t.prototype, "expandedButtonText");
|
|
60
|
+
i([
|
|
61
|
+
r()
|
|
62
|
+
], t.prototype, "collapsedButtonText");
|
|
63
|
+
customElements.get("cre8-table-row") === void 0 && customElements.define("cre8-table-row", t);
|
|
170
64
|
export {
|
|
171
|
-
|
|
172
|
-
|
|
65
|
+
t as Cre8TableRow,
|
|
66
|
+
t as default
|
|
173
67
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-row.styles.d.ts","sourceRoot":"","sources":["../../../components/table-row/table-row.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"table-row.styles.d.ts","sourceRoot":"","sources":["../../../components/table-row/table-row.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,yBAAgqQ,CAAC;AAC7qQ,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../components/tabs/tabs.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAKrC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,qBAAa,QAAS,SAAQ,WAAW;IACrC,MAAM,CAAC,MAAM,4BAAY;IAEzB;;;;;;OAMG;
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../components/tabs/tabs.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAKrC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,qBAAa,QAAS,SAAQ,WAAW;IACrC,MAAM,CAAC,MAAM,4BAAY;IAEzB;;;;;;OAMG;IAEH,IAAI,CAAC,EAAE,IAAI,CAAC;IAEZ;;;OAGG;IAEH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IAEH,WAAW,CAAC,EAAE,MAAM,CAAK;IAEzB;;;;OAIG;IAEH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;OAKG;IAEH,OAAO,CAAC,EAAE,OAAO,CAAQ;IAEzB;;;;;OAKG;IAEH,KAAK,CAAC,EAAE,OAAO,CAAS;IAExB;;OAEG;IAEH,aAAa,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAE9B;;OAEG;IAEH,cAAc,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IAEpC;;OAEG;IAEH,eAAe,EAAE,WAAW,CAAC;IAE7B;;OAEG;IAEH,mBAAmB,EAAE,WAAW,CAAC;IAEjC;;;;OAIG;IACH,IAAI,KAAK,YAER;IAED;;OAEG;;IAgBH;;;OAGG;IACH,iBAAiB;IAKjB;;;;OAIG;IACH,oBAAoB;IAKpB;;;;;;OAMG;IACG,YAAY;IAiBlB;;;;;OAKG;IACG,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAerD;;;;;OAKG;IACH,YAAY;IAKZ;;;;;OAKG;IACH,YAAY;IAKZ;;;OAGG;IACH,UAAU;IAcV;;;OAGG;IACH,QAAQ;IAQR;;;;;OAKG;IACH,YAAY;IAYZ;;;OAGG;IACH,aAAa;IAQb;;;;;OAKG;IACH,gBAAgB;IAiBhB;;;;OAIG;IACH,YAAY;IAWZ;;OAEG;IACH,iBAAiB;IAIjB;;;;;;;OAOG;IACH,iBAAiB,CAAC,KAAK,EAAE,UAAU;IAqBnC;;;;;;;;;OASG;IACH,aAAa,CAAC,KAAK,EAAE,aAAa;IAqClC;;;;;;;OAOG;IACH,wBAAwB,CAAC,UAAU,EAAE,OAAO;IAwB5C;;;;;;;OAOG;IACH,oBAAoB,CAAC,UAAU,EAAE,OAAO;IAwBxC;;;;OAIG;IACH,uBAAuB;IAWvB;;OAEG;IACH,SAAS;IAYT,MAAM;CA2BT;AAMD,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,WAAW,EAAE,QAAQ,CAAC;KACzB;CACJ;AAED,eAAe,QAAQ,CAAC"}
|
|
@@ -1,116 +1,15 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { property as
|
|
3
|
-
import { nanoid as
|
|
4
|
-
import { Cre8Element as
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
:host {
|
|
11
|
-
display: block;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Tabs header
|
|
16
|
-
*/
|
|
17
|
-
.cre8-c-tabs__header {
|
|
18
|
-
position: relative;
|
|
19
|
-
display: flex;
|
|
20
|
-
flex-direction: column;
|
|
21
|
-
align-items: baseline;
|
|
22
|
-
overflow: hidden;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Tabs inner where the beginning of the tabs list isn't fully in the viewport
|
|
26
|
-
*/
|
|
27
|
-
.cre8-c-tabs:not(.cre8-is-start) & {
|
|
28
|
-
/**
|
|
29
|
-
* Left overflow gradient for the tabs list
|
|
30
|
-
*/
|
|
31
|
-
&::before {
|
|
32
|
-
content: '';
|
|
33
|
-
display: block;
|
|
34
|
-
position: absolute;
|
|
35
|
-
pointer-events: none;
|
|
36
|
-
background: linear-gradient(var(--rtlGradientToRight, 90deg), var(--cre8-color-bg-default), rgb(255 255 255 / 0.1%) 30%);
|
|
37
|
-
height: 100%;
|
|
38
|
-
inset-block-start: 0;
|
|
39
|
-
inset-inline-start: 0;
|
|
40
|
-
width: calc(8px * 6);
|
|
41
|
-
z-index: 1;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Tabs inner where the end of the tabs list isn't fully in the viewport
|
|
47
|
-
*/
|
|
48
|
-
.cre8-c-tabs:not(.cre8-is-end) & {
|
|
49
|
-
/**
|
|
50
|
-
* Right overflow gradient for the tabs list
|
|
51
|
-
*/
|
|
52
|
-
&::after {
|
|
53
|
-
content: '';
|
|
54
|
-
display: block !important;
|
|
55
|
-
position: absolute;
|
|
56
|
-
pointer-events: none;
|
|
57
|
-
background: linear-gradient(var(--rtlGradientToRight, 90deg), rgb(255 255 255 / 0.1%) 30%, var(--cre8-color-bg-default));
|
|
58
|
-
height: 100%;
|
|
59
|
-
inset-block-start: 0;
|
|
60
|
-
inset-inline-end: 0;
|
|
61
|
-
width: calc(8px * 6);
|
|
62
|
-
z-index: 1;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Tabs list
|
|
69
|
-
* 1) The div that contains the cre8-tab's
|
|
70
|
-
*/
|
|
71
|
-
.cre8-c-tabs__list {
|
|
72
|
-
display: flex;
|
|
73
|
-
overflow: auto;
|
|
74
|
-
width: 100%;
|
|
75
|
-
margin: 0;
|
|
76
|
-
position: relative;
|
|
77
|
-
padding: var(--cre8-border-width-focus);
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Visually hides the scrollbar
|
|
81
|
-
*/
|
|
82
|
-
scrollbar-width: none;
|
|
83
|
-
-ms-overflow-style: none;
|
|
84
|
-
&::-webkit-scrollbar {
|
|
85
|
-
display: none;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Tabs body
|
|
91
|
-
* 1) The div that contains the tab panel content
|
|
92
|
-
*/
|
|
93
|
-
.cre8-c-tabs__body {
|
|
94
|
-
padding-block-start: calc(8px * 2);
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Full Width Variant - border default bar across tabs
|
|
98
|
-
*/
|
|
99
|
-
.cre8-c-tabs--full-width & {
|
|
100
|
-
border-top: var(--cre8-border-width-tab-selected) var(--cre8-border-style-default) var(--cre8-color-border-default);
|
|
101
|
-
// To match the border of the tabs to this full width line
|
|
102
|
-
// Shift border up by the tab bottom border width + Width of the padding on the list of tabs
|
|
103
|
-
margin-top: calc(var(--cre8-border-width-tab-selected) * -2);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
`;
|
|
107
|
-
var _ = Object.defineProperty, r = (d, t, e, i) => {
|
|
108
|
-
for (var s = void 0, n = d.length - 1, h; n >= 0; n--)
|
|
109
|
-
(h = d[n]) && (s = h(t, e, s) || s);
|
|
110
|
-
return s && _(t, e, s), s;
|
|
1
|
+
import { css as p, html as f } from "lit";
|
|
2
|
+
import { property as d, state as c, queryAssignedElements as v, query as m } from "lit/decorators.js";
|
|
3
|
+
import { nanoid as u } from "nanoid";
|
|
4
|
+
import { Cre8Element as T } from "../cre8-element.js";
|
|
5
|
+
const x = 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}:host{display:block}.cre8-c-tabs__header{position:relative;display:flex;flex-direction:column;align-items:baseline;overflow:hidden}.cre8-c-tabs:not(.cre8-is-start) .cre8-c-tabs__header::before{content:"";display:block;position:absolute;pointer-events:none;background:linear-gradient(var(--rtlGradientToRight, 90deg), var(--cre8-color-bg-default), rgba(255, 255, 255, 0.001) 30%);height:100%;inset-block-start:0;inset-inline-start:0;width:3rem;z-index:1}.cre8-c-tabs:not(.cre8-is-end) .cre8-c-tabs__header::after{content:"";display:block !important;position:absolute;pointer-events:none;background:linear-gradient(var(--rtlGradientToRight, 90deg), rgba(255, 255, 255, 0.001) 30%, var(--cre8-color-bg-default));height:100%;inset-block-start:0;inset-inline-end:0;width:3rem;z-index:1}.cre8-c-tabs__list{display:flex;overflow:auto;width:100%;margin:0;position:relative;padding:var(--cre8-border-width-focus);scrollbar-width:none;-ms-overflow-style:none}.cre8-c-tabs__list::-webkit-scrollbar{display:none}.cre8-c-tabs__body{padding-block-start:1rem}.cre8-c-tabs--full-width .cre8-c-tabs__body{border-top:var(--cre8-border-width-tab-selected) var(--cre8-border-style-default) var(--cre8-color-border-default);margin-top:calc(var(--cre8-border-width-tab-selected)*-2)}`;
|
|
6
|
+
var g = Object.defineProperty, r = (l, e, t, i) => {
|
|
7
|
+
for (var s = void 0, n = l.length - 1, h; n >= 0; n--)
|
|
8
|
+
(h = l[n]) && (s = h(e, t, s) || s);
|
|
9
|
+
return s && g(e, t, s), s;
|
|
111
10
|
};
|
|
112
11
|
let b = 1;
|
|
113
|
-
const
|
|
12
|
+
const o = class o extends T {
|
|
114
13
|
/**
|
|
115
14
|
* Initialize Functions
|
|
116
15
|
*/
|
|
@@ -156,9 +55,9 @@ const l = class l extends m {
|
|
|
156
55
|
* 2. Checks to see if the old `activeIndex` property has been updated.
|
|
157
56
|
* If the new value doesn't equal the old value, activate the proper tab
|
|
158
57
|
*/
|
|
159
|
-
async updated(
|
|
160
|
-
|
|
161
|
-
i === "activeIndex" && this.activeIndex !==
|
|
58
|
+
async updated(e) {
|
|
59
|
+
e.forEach(async (t, i) => {
|
|
60
|
+
i === "activeIndex" && this.activeIndex !== t && (await this.updateComplete, this.activeTab && this.removePreviousActiveTab(), this.activeTab = this._Cre8TabItems[this.activeIndex], this.setActiveTab());
|
|
162
61
|
});
|
|
163
62
|
}
|
|
164
63
|
/**
|
|
@@ -200,10 +99,10 @@ const l = class l extends m {
|
|
|
200
99
|
* than or equal to the window inner width or document client width
|
|
201
100
|
*/
|
|
202
101
|
isInViewport() {
|
|
203
|
-
const
|
|
204
|
-
if (!
|
|
102
|
+
const t = this._Cre8TabItems[this._Cre8TabItems.length - 1].shadowRoot?.querySelector(".cre8-c-tab");
|
|
103
|
+
if (!t)
|
|
205
104
|
return !1;
|
|
206
|
-
const i =
|
|
105
|
+
const i = t.getBoundingClientRect(), s = window.innerWidth || document.documentElement.clientWidth;
|
|
207
106
|
return i.left >= 0 && i.right <= s;
|
|
208
107
|
}
|
|
209
108
|
/**
|
|
@@ -211,8 +110,8 @@ const l = class l extends m {
|
|
|
211
110
|
* 1. Loop through all the cre8-tab Components and set the size to 'sm' if the parent has size 'sm'.
|
|
212
111
|
*/
|
|
213
112
|
setTabVariant() {
|
|
214
|
-
this.size === "sm" && this._Cre8TabItems.forEach((
|
|
215
|
-
|
|
113
|
+
this.size === "sm" && this._Cre8TabItems.forEach((e) => {
|
|
114
|
+
e.size = "sm";
|
|
216
115
|
});
|
|
217
116
|
}
|
|
218
117
|
/**
|
|
@@ -222,12 +121,12 @@ const l = class l extends m {
|
|
|
222
121
|
* 3. Set the index and id on the tab-panel to match the tab.
|
|
223
122
|
*/
|
|
224
123
|
setTabAttributes() {
|
|
225
|
-
this._Cre8TabItems.forEach((
|
|
226
|
-
|
|
227
|
-
const s =
|
|
228
|
-
|
|
229
|
-
const n = this._Cre8TabPanels[
|
|
230
|
-
n.index =
|
|
124
|
+
this._Cre8TabItems.forEach((e, t) => {
|
|
125
|
+
e.index = t;
|
|
126
|
+
const s = e.ariaLabelledBy || u();
|
|
127
|
+
e.ariaLabelledBy = s;
|
|
128
|
+
const n = this._Cre8TabPanels[t];
|
|
129
|
+
n.index = t;
|
|
231
130
|
});
|
|
232
131
|
}
|
|
233
132
|
/**
|
|
@@ -237,8 +136,8 @@ const l = class l extends m {
|
|
|
237
136
|
*/
|
|
238
137
|
setActiveTab() {
|
|
239
138
|
this.activeTab.isActive = !0;
|
|
240
|
-
const
|
|
241
|
-
|
|
139
|
+
const e = this._Cre8TabPanels.find((t) => t.index === this.activeTab.index);
|
|
140
|
+
e && (e.isActive = !0);
|
|
242
141
|
}
|
|
243
142
|
/**
|
|
244
143
|
* Set Active Tab Focus
|
|
@@ -254,10 +153,10 @@ const l = class l extends m {
|
|
|
254
153
|
* 4. Emit the custom event.
|
|
255
154
|
* @fires tabSelected
|
|
256
155
|
*/
|
|
257
|
-
handleTabSelected(
|
|
258
|
-
const { target:
|
|
259
|
-
if (this._Cre8TabItems.includes(
|
|
260
|
-
this.activeTab && this.removePreviousActiveTab(), this.activeTab =
|
|
156
|
+
handleTabSelected(e) {
|
|
157
|
+
const { target: t } = e;
|
|
158
|
+
if (this._Cre8TabItems.includes(t)) {
|
|
159
|
+
this.activeTab && this.removePreviousActiveTab(), this.activeTab = t;
|
|
261
160
|
const i = this._Cre8TabItems.findIndex((s) => s === this.activeTab);
|
|
262
161
|
this.activeIndex = i, this.setActiveTab(), this.emitEvent();
|
|
263
162
|
}
|
|
@@ -272,25 +171,25 @@ const l = class l extends m {
|
|
|
272
171
|
* 6. On keydown of the escape key, remove the focus.
|
|
273
172
|
* @fires keydown
|
|
274
173
|
*/
|
|
275
|
-
handleKeydown(
|
|
276
|
-
const { target:
|
|
174
|
+
handleKeydown(e) {
|
|
175
|
+
const { target: t } = e;
|
|
277
176
|
if (document.activeElement.matches("cre8-tab"))
|
|
278
|
-
switch (
|
|
177
|
+
switch (e.key) {
|
|
279
178
|
/* 2 */
|
|
280
179
|
case "ArrowRight":
|
|
281
|
-
|
|
180
|
+
e.preventDefault(), this.setSelectedToNextTab(t);
|
|
282
181
|
break;
|
|
283
182
|
/* 3 */
|
|
284
183
|
case "ArrowLeft":
|
|
285
|
-
|
|
184
|
+
e.preventDefault(), this.setSelectedToPreviousTab(t);
|
|
286
185
|
break;
|
|
287
186
|
/* 4 */
|
|
288
187
|
case "Home":
|
|
289
|
-
|
|
188
|
+
e.preventDefault(), this.setSelectedToNextTab(this._Cre8TabItems[this._Cre8TabItems.length - 1]);
|
|
290
189
|
break;
|
|
291
190
|
/* 5 */
|
|
292
191
|
case "End":
|
|
293
|
-
|
|
192
|
+
e.preventDefault(), this.setSelectedToPreviousTab(this._Cre8TabItems[0]);
|
|
294
193
|
break;
|
|
295
194
|
/* 6 */
|
|
296
195
|
case "Escape":
|
|
@@ -306,14 +205,14 @@ const l = class l extends m {
|
|
|
306
205
|
* 4. Emit custom event.
|
|
307
206
|
* @fires tabChange
|
|
308
207
|
*/
|
|
309
|
-
setSelectedToPreviousTab(
|
|
310
|
-
const
|
|
208
|
+
setSelectedToPreviousTab(e) {
|
|
209
|
+
const t = e.index;
|
|
311
210
|
this.removePreviousActiveTab();
|
|
312
211
|
const i = this._Cre8TabItems.length - 1;
|
|
313
|
-
if (
|
|
212
|
+
if (t === 0)
|
|
314
213
|
this.activeIndex = i, this.activeTab = this._Cre8TabItems[i];
|
|
315
214
|
else {
|
|
316
|
-
const s =
|
|
215
|
+
const s = t - 1;
|
|
317
216
|
this.activeIndex = s, this.activeTab = this._Cre8TabItems[s];
|
|
318
217
|
}
|
|
319
218
|
this.setActiveTab(), this.setActiveTabFocus(), this.emitEvent();
|
|
@@ -326,14 +225,14 @@ const l = class l extends m {
|
|
|
326
225
|
* 4. Emit custom event.
|
|
327
226
|
* @fires tabChange
|
|
328
227
|
*/
|
|
329
|
-
setSelectedToNextTab(
|
|
330
|
-
const
|
|
228
|
+
setSelectedToNextTab(e) {
|
|
229
|
+
const t = e.index;
|
|
331
230
|
this.removePreviousActiveTab();
|
|
332
231
|
const i = this._Cre8TabItems.length - 1;
|
|
333
|
-
if (
|
|
232
|
+
if (t === i)
|
|
334
233
|
this.activeIndex = 0, this.activeTab = this._Cre8TabItems[0];
|
|
335
234
|
else {
|
|
336
|
-
const s =
|
|
235
|
+
const s = t + 1;
|
|
337
236
|
this.activeIndex = s, this.activeTab = this._Cre8TabItems[s];
|
|
338
237
|
}
|
|
339
238
|
this.setActiveTab(), this.setActiveTabFocus(), this.emitEvent();
|
|
@@ -345,14 +244,14 @@ const l = class l extends m {
|
|
|
345
244
|
*/
|
|
346
245
|
removePreviousActiveTab() {
|
|
347
246
|
this.activeTab.isActive = !1;
|
|
348
|
-
const
|
|
349
|
-
|
|
247
|
+
const e = this._Cre8TabPanels.find((t) => t.index === this.activeTab.index);
|
|
248
|
+
e && (e.isActive = !1);
|
|
350
249
|
}
|
|
351
250
|
/**
|
|
352
251
|
* Emit custom event
|
|
353
252
|
*/
|
|
354
253
|
emitEvent() {
|
|
355
|
-
const
|
|
254
|
+
const e = new CustomEvent("tabChange", {
|
|
356
255
|
detail: {
|
|
357
256
|
value: this.activeTab,
|
|
358
257
|
activeTabIndex: this.activeIndex
|
|
@@ -360,16 +259,16 @@ const l = class l extends m {
|
|
|
360
259
|
bubbles: !0,
|
|
361
260
|
composed: !0
|
|
362
261
|
});
|
|
363
|
-
this.dispatchEvent(
|
|
262
|
+
this.dispatchEvent(e);
|
|
364
263
|
}
|
|
365
264
|
render() {
|
|
366
|
-
const
|
|
265
|
+
const e = this.componentClassNames("cre8-c-tabs", {
|
|
367
266
|
"cre8-is-start": this.isStart === !0,
|
|
368
267
|
"cre8-is-end": this.isEnd === !0,
|
|
369
268
|
"cre8-c-tabs--full-width": this.fullWidth
|
|
370
269
|
});
|
|
371
270
|
return f`
|
|
372
|
-
<div class="${
|
|
271
|
+
<div class="${e}">
|
|
373
272
|
<div class="cre8-c-tabs__header">
|
|
374
273
|
<div
|
|
375
274
|
class="cre8-c-tabs__list"
|
|
@@ -389,16 +288,16 @@ const l = class l extends m {
|
|
|
389
288
|
`;
|
|
390
289
|
}
|
|
391
290
|
};
|
|
392
|
-
|
|
393
|
-
let a =
|
|
291
|
+
o.styles = [x];
|
|
292
|
+
let a = o;
|
|
394
293
|
r([
|
|
395
|
-
|
|
294
|
+
d()
|
|
396
295
|
], a.prototype, "size");
|
|
397
296
|
r([
|
|
398
|
-
|
|
297
|
+
d({ type: Boolean, reflect: !0 })
|
|
399
298
|
], a.prototype, "fullWidth");
|
|
400
299
|
r([
|
|
401
|
-
|
|
300
|
+
d({ type: Number })
|
|
402
301
|
], a.prototype, "activeIndex");
|
|
403
302
|
r([
|
|
404
303
|
c()
|
|
@@ -416,10 +315,10 @@ r([
|
|
|
416
315
|
v({ slot: "panel" })
|
|
417
316
|
], a.prototype, "_Cre8TabPanels");
|
|
418
317
|
r([
|
|
419
|
-
|
|
318
|
+
m(".cre8-c-tabs__header")
|
|
420
319
|
], a.prototype, "_Cre8TabsHeader");
|
|
421
320
|
r([
|
|
422
|
-
|
|
321
|
+
m(".cre8-c-tabs__list")
|
|
423
322
|
], a.prototype, "_Cre8TabsHeaderList");
|
|
424
323
|
customElements.get("cre8-tabs") === void 0 && customElements.define("cre8-tabs", a);
|
|
425
324
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.styles.d.ts","sourceRoot":"","sources":["../../../components/tabs/tabs.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"tabs.styles.d.ts","sourceRoot":"","sources":["../../../components/tabs/tabs.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,yBAA6/F,CAAC;AAC1gG,eAAe,MAAM,CAAC"}
|