@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,101 +1,15 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { property as
|
|
3
|
-
import { Cre8Element as
|
|
4
|
-
import { Chart as
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
:host([loading]) .cre8-c-chart__container {
|
|
13
|
-
opacity: 0.5;
|
|
14
|
-
pointer-events: none;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.cre8-c-chart {
|
|
18
|
-
position: relative;
|
|
19
|
-
width: 100%;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.cre8-c-chart__container {
|
|
23
|
-
position: relative;
|
|
24
|
-
width: 100%;
|
|
25
|
-
transition: opacity 0.2s ease;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.cre8-c-chart__canvas-wrapper {
|
|
29
|
-
position: relative;
|
|
30
|
-
width: 100%;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
canvas {
|
|
34
|
-
display: block;
|
|
35
|
-
width: 100% !important;
|
|
36
|
-
max-width: 100%;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.cre8-c-chart__loading {
|
|
40
|
-
position: absolute;
|
|
41
|
-
top: 50%;
|
|
42
|
-
left: 50%;
|
|
43
|
-
transform: translate(-50%, -50%);
|
|
44
|
-
display: flex;
|
|
45
|
-
flex-direction: column;
|
|
46
|
-
align-items: center;
|
|
47
|
-
justify-content: center;
|
|
48
|
-
z-index: 10;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.cre8-c-chart__spinner {
|
|
52
|
-
width: 40px;
|
|
53
|
-
height: 40px;
|
|
54
|
-
border: 3px solid var(--cre8-color-border-default, #e5e7eb);
|
|
55
|
-
border-top-color: var(--cre8-color-bg-brand, #0066B3);
|
|
56
|
-
border-radius: 50%;
|
|
57
|
-
animation: cre8-chart-spin 0.8s linear infinite;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.cre8-c-chart__loading-text {
|
|
61
|
-
margin-top: var(--cre8-spacing-2, 8px);
|
|
62
|
-
font-size: var(--cre8-font-size-sm, 14px);
|
|
63
|
-
color: var(--cre8-color-content-subtle, #6b7280);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
@keyframes cre8-chart-spin {
|
|
67
|
-
to {
|
|
68
|
-
transform: rotate(360deg);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/* Tooltip customization */
|
|
73
|
-
.cre8-c-chart__tooltip {
|
|
74
|
-
background-color: var(--cre8-color-bg-default, #ffffff);
|
|
75
|
-
border: 1px solid var(--cre8-color-border-default, #e5e7eb);
|
|
76
|
-
border-radius: var(--cre8-border-radius-default, 4px);
|
|
77
|
-
box-shadow: var(--cre8-shadow-md, 0 4px 6px -1px rgb(0 0 0 / 0.1));
|
|
78
|
-
padding: var(--cre8-spacing-2, 8px) var(--cre8-spacing-3, 12px);
|
|
79
|
-
font-family: var(--cre8-font-family-default, inherit);
|
|
80
|
-
font-size: var(--cre8-font-size-sm, 14px);
|
|
81
|
-
color: var(--cre8-color-content-default, #1f2937);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/* Responsive adjustments */
|
|
85
|
-
@media (max-width: 640px) {
|
|
86
|
-
.cre8-c-chart__spinner {
|
|
87
|
-
width: 32px;
|
|
88
|
-
height: 32px;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
`;
|
|
92
|
-
var k = Object.defineProperty, s = (b, e, t, a) => {
|
|
93
|
-
for (var r = void 0, o = b.length - 1, c; o >= 0; o--)
|
|
94
|
-
(c = b[o]) && (r = c(e, t, r) || r);
|
|
95
|
-
return r && k(e, t, r), r;
|
|
1
|
+
import { css as x, html as h } from "lit";
|
|
2
|
+
import { property as s, state as f, query as _ } from "lit/decorators.js";
|
|
3
|
+
import { Cre8Element as z } from "../cre8-element.js";
|
|
4
|
+
import { Chart as b, registerables as C } from "chart.js";
|
|
5
|
+
const v = x`.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}`;
|
|
6
|
+
var w = Object.defineProperty, o = (u, i, t, a) => {
|
|
7
|
+
for (var e = void 0, n = u.length - 1, d; n >= 0; n--)
|
|
8
|
+
(d = u[n]) && (e = d(i, t, e) || e);
|
|
9
|
+
return e && w(i, t, e), e;
|
|
96
10
|
};
|
|
97
|
-
|
|
98
|
-
const
|
|
11
|
+
b.register(...C);
|
|
12
|
+
const g = class g extends z {
|
|
99
13
|
constructor() {
|
|
100
14
|
super(...arguments), this.type = "bar", this.data = { datasets: [] }, this.options = {}, this.height = 400, this.maintainAspectRatio = !0, this.responsive = !0, this.loading = !1, this.ariaLabel = "Chart", this.showLegend = !0, this.legendPosition = "top", this.enableAnimation = !0, this.animationDuration = 750, this.colors = [
|
|
101
15
|
"#0066B3",
|
|
@@ -122,20 +36,20 @@ const f = class f extends v {
|
|
|
122
36
|
disconnectedCallback() {
|
|
123
37
|
super.disconnectedCallback(), this._isConnected = !1, this._destroyChart();
|
|
124
38
|
}
|
|
125
|
-
firstUpdated(
|
|
126
|
-
super.firstUpdated(
|
|
39
|
+
firstUpdated(i) {
|
|
40
|
+
super.firstUpdated(i), this.loading || this._initializeChart();
|
|
127
41
|
}
|
|
128
|
-
updated(
|
|
129
|
-
if (super.updated(
|
|
42
|
+
updated(i) {
|
|
43
|
+
if (super.updated(i), i.has("loading") && !this.loading && !this._chartInstance) {
|
|
130
44
|
this._initializeChart();
|
|
131
45
|
return;
|
|
132
46
|
}
|
|
133
47
|
if (!this.loading) {
|
|
134
|
-
if (
|
|
48
|
+
if (i.has("type") && this._chartInstance) {
|
|
135
49
|
this._destroyChart(), this._initializeChart();
|
|
136
50
|
return;
|
|
137
51
|
}
|
|
138
|
-
(
|
|
52
|
+
(i.has("data") || i.has("options") || i.has("showLegend") || i.has("legendPosition") || i.has("colors")) && this._chartInstance && this._updateChart();
|
|
139
53
|
}
|
|
140
54
|
}
|
|
141
55
|
/**
|
|
@@ -144,13 +58,13 @@ const f = class f extends v {
|
|
|
144
58
|
_initializeChart() {
|
|
145
59
|
if (!this._canvas || !this._isConnected)
|
|
146
60
|
return;
|
|
147
|
-
const
|
|
148
|
-
if (!
|
|
61
|
+
const i = this._canvas.getContext("2d");
|
|
62
|
+
if (!i) {
|
|
149
63
|
console.error("Cre8Chart: Unable to get canvas 2D context");
|
|
150
64
|
return;
|
|
151
65
|
}
|
|
152
66
|
const t = this._buildChartConfig();
|
|
153
|
-
this._chartInstance = new
|
|
67
|
+
this._chartInstance = new b(i, t), this.dispatch({
|
|
154
68
|
eventName: "cre8-chart-ready",
|
|
155
69
|
detailObj: { chart: this._chartInstance }
|
|
156
70
|
});
|
|
@@ -159,10 +73,10 @@ const f = class f extends v {
|
|
|
159
73
|
* Build the complete Chart.js configuration.
|
|
160
74
|
*/
|
|
161
75
|
_buildChartConfig() {
|
|
162
|
-
const
|
|
76
|
+
const i = this._processData();
|
|
163
77
|
return {
|
|
164
78
|
type: this.type,
|
|
165
|
-
data:
|
|
79
|
+
data: i,
|
|
166
80
|
options: this._mergeOptions()
|
|
167
81
|
};
|
|
168
82
|
}
|
|
@@ -172,24 +86,24 @@ const f = class f extends v {
|
|
|
172
86
|
_processData() {
|
|
173
87
|
if (!this.data || !this.data.datasets)
|
|
174
88
|
return { labels: [], datasets: [] };
|
|
175
|
-
const
|
|
176
|
-
const
|
|
89
|
+
const i = this.data.datasets.map((t, a) => {
|
|
90
|
+
const e = a % this.colors.length, n = this.colors[e];
|
|
177
91
|
if (["pie", "doughnut", "polarArea"].includes(this.type)) {
|
|
178
|
-
const
|
|
179
|
-
{ length:
|
|
180
|
-
(
|
|
92
|
+
const d = Array.isArray(t.data) ? t.data.length : 0, p = Array.from(
|
|
93
|
+
{ length: d },
|
|
94
|
+
(m, l) => this.colors[l % this.colors.length]
|
|
181
95
|
);
|
|
182
96
|
return {
|
|
183
97
|
...t,
|
|
184
|
-
backgroundColor: t.backgroundColor ||
|
|
98
|
+
backgroundColor: t.backgroundColor || p,
|
|
185
99
|
borderColor: t.borderColor || "#ffffff",
|
|
186
100
|
borderWidth: t.borderWidth ?? 2
|
|
187
101
|
};
|
|
188
102
|
}
|
|
189
103
|
return this.type === "line" ? {
|
|
190
104
|
...t,
|
|
191
|
-
backgroundColor: t.backgroundColor || `${
|
|
192
|
-
borderColor: t.borderColor ||
|
|
105
|
+
backgroundColor: t.backgroundColor || `${n}20`,
|
|
106
|
+
borderColor: t.borderColor || n,
|
|
193
107
|
borderWidth: t.borderWidth ?? 2,
|
|
194
108
|
fill: t.fill ?? !1,
|
|
195
109
|
tension: t.tension ?? 0.4,
|
|
@@ -197,33 +111,33 @@ const f = class f extends v {
|
|
|
197
111
|
pointHoverRadius: t.pointHoverRadius ?? 6
|
|
198
112
|
} : this.type === "bar" ? {
|
|
199
113
|
...t,
|
|
200
|
-
backgroundColor: t.backgroundColor ||
|
|
201
|
-
borderColor: t.borderColor ||
|
|
114
|
+
backgroundColor: t.backgroundColor || n,
|
|
115
|
+
borderColor: t.borderColor || n,
|
|
202
116
|
borderWidth: t.borderWidth ?? 0,
|
|
203
117
|
borderRadius: 4
|
|
204
118
|
} : this.type === "radar" ? {
|
|
205
119
|
...t,
|
|
206
|
-
backgroundColor: t.backgroundColor || `${
|
|
207
|
-
borderColor: t.borderColor ||
|
|
120
|
+
backgroundColor: t.backgroundColor || `${n}40`,
|
|
121
|
+
borderColor: t.borderColor || n,
|
|
208
122
|
borderWidth: t.borderWidth ?? 2,
|
|
209
|
-
pointBackgroundColor:
|
|
123
|
+
pointBackgroundColor: n,
|
|
210
124
|
pointBorderColor: "#ffffff"
|
|
211
125
|
} : {
|
|
212
126
|
...t,
|
|
213
|
-
backgroundColor: t.backgroundColor ||
|
|
214
|
-
borderColor: t.borderColor ||
|
|
127
|
+
backgroundColor: t.backgroundColor || n,
|
|
128
|
+
borderColor: t.borderColor || n
|
|
215
129
|
};
|
|
216
130
|
});
|
|
217
131
|
return {
|
|
218
132
|
labels: this.data.labels || [],
|
|
219
|
-
datasets:
|
|
133
|
+
datasets: i
|
|
220
134
|
};
|
|
221
135
|
}
|
|
222
136
|
/**
|
|
223
137
|
* Merge user options with default options.
|
|
224
138
|
*/
|
|
225
139
|
_mergeOptions() {
|
|
226
|
-
const
|
|
140
|
+
const i = {
|
|
227
141
|
responsive: this.responsive,
|
|
228
142
|
maintainAspectRatio: this.maintainAspectRatio,
|
|
229
143
|
animation: this.enableAnimation ? { duration: this.animationDuration } : !1,
|
|
@@ -255,20 +169,20 @@ const f = class f extends v {
|
|
|
255
169
|
cornerRadius: 8,
|
|
256
170
|
callbacks: {
|
|
257
171
|
label: (t) => {
|
|
258
|
-
const a = t.dataset.label || "",
|
|
259
|
-
return `${a}: ${
|
|
172
|
+
const a = t.dataset.label || "", e = t.parsed.y ?? t.parsed;
|
|
173
|
+
return `${a}: ${e}`;
|
|
260
174
|
}
|
|
261
175
|
}
|
|
262
176
|
}
|
|
263
177
|
},
|
|
264
|
-
onClick: (t, a,
|
|
265
|
-
this._handleChartClick(t, a,
|
|
178
|
+
onClick: (t, a, e) => {
|
|
179
|
+
this._handleChartClick(t, a, e);
|
|
266
180
|
},
|
|
267
|
-
onHover: (t, a,
|
|
268
|
-
this._handleChartHover(t, a,
|
|
181
|
+
onHover: (t, a, e) => {
|
|
182
|
+
this._handleChartHover(t, a, e);
|
|
269
183
|
}
|
|
270
184
|
};
|
|
271
|
-
return ["line", "bar", "scatter", "bubble"].includes(this.type) && (
|
|
185
|
+
return ["line", "bar", "scatter", "bubble"].includes(this.type) && (i.scales = {
|
|
272
186
|
x: {
|
|
273
187
|
grid: {
|
|
274
188
|
display: !0,
|
|
@@ -296,18 +210,18 @@ const f = class f extends v {
|
|
|
296
210
|
},
|
|
297
211
|
beginAtZero: !0
|
|
298
212
|
}
|
|
299
|
-
}), this._deepMerge(
|
|
213
|
+
}), this._deepMerge(i, this.options);
|
|
300
214
|
}
|
|
301
215
|
/**
|
|
302
216
|
* Deep merge two objects.
|
|
303
217
|
*/
|
|
304
|
-
_deepMerge(
|
|
305
|
-
const a = { ...
|
|
306
|
-
for (const
|
|
307
|
-
Object.prototype.hasOwnProperty.call(t,
|
|
308
|
-
e
|
|
309
|
-
t[
|
|
310
|
-
) : a[
|
|
218
|
+
_deepMerge(i, t) {
|
|
219
|
+
const a = { ...i };
|
|
220
|
+
for (const e in t)
|
|
221
|
+
Object.prototype.hasOwnProperty.call(t, e) && (t[e] && typeof t[e] == "object" && !Array.isArray(t[e]) ? a[e] = this._deepMerge(
|
|
222
|
+
i[e] || {},
|
|
223
|
+
t[e]
|
|
224
|
+
) : a[e] = t[e]);
|
|
311
225
|
return a;
|
|
312
226
|
}
|
|
313
227
|
/**
|
|
@@ -316,8 +230,8 @@ const f = class f extends v {
|
|
|
316
230
|
_updateChart() {
|
|
317
231
|
if (!this._chartInstance)
|
|
318
232
|
return;
|
|
319
|
-
const
|
|
320
|
-
this._chartInstance.data =
|
|
233
|
+
const i = this._processData();
|
|
234
|
+
this._chartInstance.data = i, this._chartInstance.options = this._mergeOptions(), this._chartInstance.update(this.enableAnimation ? "default" : "none");
|
|
321
235
|
}
|
|
322
236
|
/**
|
|
323
237
|
* Destroy the chart instance.
|
|
@@ -328,36 +242,36 @@ const f = class f extends v {
|
|
|
328
242
|
/**
|
|
329
243
|
* Handle chart click events.
|
|
330
244
|
*/
|
|
331
|
-
_handleChartClick(
|
|
245
|
+
_handleChartClick(i, t, a) {
|
|
332
246
|
if (t.length > 0) {
|
|
333
|
-
const
|
|
334
|
-
event:
|
|
247
|
+
const e = t[0], n = e.datasetIndex, d = e.index, m = this.data.datasets[n]?.data[d], l = this.data.labels?.[d], c = {
|
|
248
|
+
event: i,
|
|
335
249
|
elements: t,
|
|
336
250
|
chart: a,
|
|
337
|
-
dataIndex:
|
|
338
|
-
datasetIndex:
|
|
339
|
-
value:
|
|
340
|
-
label:
|
|
251
|
+
dataIndex: d,
|
|
252
|
+
datasetIndex: n,
|
|
253
|
+
value: m,
|
|
254
|
+
label: l
|
|
341
255
|
};
|
|
342
|
-
this.dispatch({ eventName: "cre8-chart-click", detailObj:
|
|
256
|
+
this.dispatch({ eventName: "cre8-chart-click", detailObj: c });
|
|
343
257
|
}
|
|
344
258
|
}
|
|
345
259
|
/**
|
|
346
260
|
* Handle chart hover events.
|
|
347
261
|
*/
|
|
348
|
-
_handleChartHover(
|
|
349
|
-
const
|
|
350
|
-
if (
|
|
351
|
-
const
|
|
352
|
-
event:
|
|
262
|
+
_handleChartHover(i, t, a) {
|
|
263
|
+
const e = a.canvas;
|
|
264
|
+
if (e.style.cursor = t.length > 0 ? "pointer" : "default", t.length > 0) {
|
|
265
|
+
const n = t[0], d = n.datasetIndex, p = n.index, l = this.data.datasets[d]?.data[p], c = this.data.labels?.[p], y = {
|
|
266
|
+
event: i,
|
|
353
267
|
elements: t,
|
|
354
268
|
chart: a,
|
|
355
|
-
dataIndex:
|
|
356
|
-
datasetIndex:
|
|
357
|
-
value:
|
|
358
|
-
label:
|
|
269
|
+
dataIndex: p,
|
|
270
|
+
datasetIndex: d,
|
|
271
|
+
value: l,
|
|
272
|
+
label: c
|
|
359
273
|
};
|
|
360
|
-
this.dispatch({ eventName: "cre8-chart-hover", detailObj:
|
|
274
|
+
this.dispatch({ eventName: "cre8-chart-hover", detailObj: y });
|
|
361
275
|
}
|
|
362
276
|
}
|
|
363
277
|
/**
|
|
@@ -375,27 +289,27 @@ const f = class f extends v {
|
|
|
375
289
|
/**
|
|
376
290
|
* Public method to download chart as image.
|
|
377
291
|
*/
|
|
378
|
-
downloadImage(
|
|
292
|
+
downloadImage(i = "chart.png") {
|
|
379
293
|
if (!this._chartInstance)
|
|
380
294
|
return;
|
|
381
295
|
const t = this._chartInstance.toBase64Image(), a = document.createElement("a");
|
|
382
|
-
a.download =
|
|
296
|
+
a.download = i, a.href = t, a.click();
|
|
383
297
|
}
|
|
384
298
|
render() {
|
|
385
|
-
const
|
|
299
|
+
const i = this.componentClassNames("cre8-c-chart", {
|
|
386
300
|
"cre8-c-chart--loading": this.loading
|
|
387
301
|
}), t = `
|
|
388
302
|
width: ${this.width ? `${this.width}px` : "100%"};
|
|
389
303
|
height: ${this.height}px;
|
|
390
304
|
`;
|
|
391
|
-
return
|
|
392
|
-
<div class="${
|
|
393
|
-
${this.loading ?
|
|
305
|
+
return h`
|
|
306
|
+
<div class="${i}" style="${t}">
|
|
307
|
+
${this.loading ? h`
|
|
394
308
|
<div class="cre8-c-chart__loading">
|
|
395
309
|
<div class="cre8-c-chart__spinner"></div>
|
|
396
310
|
<span class="cre8-c-chart__loading-text">Loading chart...</span>
|
|
397
311
|
</div>
|
|
398
|
-
` :
|
|
312
|
+
` : h`
|
|
399
313
|
<canvas
|
|
400
314
|
role="img"
|
|
401
315
|
aria-label="${this.ariaLabel}"
|
|
@@ -405,61 +319,61 @@ const f = class f extends v {
|
|
|
405
319
|
`;
|
|
406
320
|
}
|
|
407
321
|
};
|
|
408
|
-
|
|
409
|
-
let
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
],
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
],
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
],
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
],
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
],
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
],
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
],
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
],
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
],
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
],
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
],
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
],
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
],
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
],
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
],
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
],
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
],
|
|
461
|
-
customElements.get("cre8-chart") === void 0 && customElements.define("cre8-chart",
|
|
322
|
+
g.styles = [v];
|
|
323
|
+
let r = g;
|
|
324
|
+
o([
|
|
325
|
+
s({ type: String })
|
|
326
|
+
], r.prototype, "type");
|
|
327
|
+
o([
|
|
328
|
+
s({ type: Object, attribute: !1 })
|
|
329
|
+
], r.prototype, "data");
|
|
330
|
+
o([
|
|
331
|
+
s({ type: Object, attribute: !1 })
|
|
332
|
+
], r.prototype, "options");
|
|
333
|
+
o([
|
|
334
|
+
s({ type: Number })
|
|
335
|
+
], r.prototype, "width");
|
|
336
|
+
o([
|
|
337
|
+
s({ type: Number })
|
|
338
|
+
], r.prototype, "height");
|
|
339
|
+
o([
|
|
340
|
+
s({ type: Boolean, attribute: "maintain-aspect-ratio" })
|
|
341
|
+
], r.prototype, "maintainAspectRatio");
|
|
342
|
+
o([
|
|
343
|
+
s({ type: Boolean })
|
|
344
|
+
], r.prototype, "responsive");
|
|
345
|
+
o([
|
|
346
|
+
s({ type: Boolean, reflect: !0 })
|
|
347
|
+
], r.prototype, "loading");
|
|
348
|
+
o([
|
|
349
|
+
s({ type: String, attribute: "aria-label" })
|
|
350
|
+
], r.prototype, "ariaLabel");
|
|
351
|
+
o([
|
|
352
|
+
s({ type: Boolean, attribute: "show-legend" })
|
|
353
|
+
], r.prototype, "showLegend");
|
|
354
|
+
o([
|
|
355
|
+
s({ type: String, attribute: "legend-position" })
|
|
356
|
+
], r.prototype, "legendPosition");
|
|
357
|
+
o([
|
|
358
|
+
s({ type: Boolean, attribute: "enable-animation" })
|
|
359
|
+
], r.prototype, "enableAnimation");
|
|
360
|
+
o([
|
|
361
|
+
s({ type: Number, attribute: "animation-duration" })
|
|
362
|
+
], r.prototype, "animationDuration");
|
|
363
|
+
o([
|
|
364
|
+
s({ type: Array, attribute: !1 })
|
|
365
|
+
], r.prototype, "colors");
|
|
366
|
+
o([
|
|
367
|
+
f()
|
|
368
|
+
], r.prototype, "_chartInstance");
|
|
369
|
+
o([
|
|
370
|
+
f()
|
|
371
|
+
], r.prototype, "_isConnected");
|
|
372
|
+
o([
|
|
373
|
+
_("canvas")
|
|
374
|
+
], r.prototype, "_canvas");
|
|
375
|
+
customElements.get("cre8-chart") === void 0 && customElements.define("cre8-chart", r);
|
|
462
376
|
export {
|
|
463
|
-
|
|
464
|
-
|
|
377
|
+
r as Cre8Chart,
|
|
378
|
+
r as default
|
|
465
379
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart.styles.d.ts","sourceRoot":"","sources":["../../../components/chart/chart.styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chart.styles.d.ts","sourceRoot":"","sources":["../../../components/chart/chart.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,yBAAoqK,CAAC;AACjrK,eAAe,MAAM,CAAC"}
|
|
@@ -1,66 +1,33 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { ifDefined as
|
|
1
|
+
import { css as h, html as p } from "lit";
|
|
2
|
+
import { ifDefined as l } from "lit-html/directives/if-defined.js";
|
|
3
3
|
import { property as t } from "lit/decorators.js";
|
|
4
|
-
import { nanoid as
|
|
5
|
-
import { Cre8Element as
|
|
4
|
+
import { nanoid as f } from "nanoid";
|
|
5
|
+
import { Cre8Element as m } from "../cre8-element.js";
|
|
6
6
|
import "../field-note/field-note.js";
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
:host {
|
|
14
|
-
display: flex;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* 1) Fieldset used for checkbox items
|
|
19
|
-
*/
|
|
20
|
-
.cre8-c-checkbox-field {
|
|
21
|
-
border: none;
|
|
22
|
-
padding: 0;
|
|
23
|
-
margin: 0;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Checkbox field legend
|
|
28
|
-
*/
|
|
29
|
-
.cre8-c-checkbox-field__legend {
|
|
30
|
-
@include cre8-typography-label-small();
|
|
31
|
-
margin-bottom: calc(8px * 1);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Checkbox list
|
|
36
|
-
*/
|
|
37
|
-
.cre8-c-checkbox-field__list {
|
|
38
|
-
display: flex;
|
|
39
|
-
flex-direction: column;
|
|
40
|
-
}`;
|
|
41
|
-
var y = Object.defineProperty, o = (d, c, n, u) => {
|
|
42
|
-
for (var i = void 0, s = d.length - 1, a; s >= 0; s--)
|
|
43
|
-
(a = d[s]) && (i = a(c, n, i) || i);
|
|
44
|
-
return i && y(c, n, i), i;
|
|
7
|
+
const x = h`*,::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:flex}.cre8-c-checkbox-field{border:none;padding:0;margin:0}.cre8-c-checkbox-field__legend{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);margin-bottom:0.5rem}.cre8-c-checkbox-field__list{display:flex;flex-direction:column}`;
|
|
8
|
+
var y = Object.defineProperty, r = (d, a, c, g) => {
|
|
9
|
+
for (var i = void 0, s = d.length - 1, n; s >= 0; s--)
|
|
10
|
+
(n = d[s]) && (i = n(a, c, i) || i);
|
|
11
|
+
return i && y(a, c, i), i;
|
|
45
12
|
};
|
|
46
|
-
const
|
|
13
|
+
const o = class o extends m {
|
|
47
14
|
connectedCallback() {
|
|
48
|
-
super.connectedCallback(), this.fieldNote && (this.ariaDescribedBy = this.ariaDescribedBy ||
|
|
15
|
+
super.connectedCallback(), this.fieldNote && (this.ariaDescribedBy = this.ariaDescribedBy || f());
|
|
49
16
|
}
|
|
50
17
|
render() {
|
|
51
|
-
const
|
|
52
|
-
return
|
|
53
|
-
<fieldset class="${
|
|
18
|
+
const a = this.componentClassNames("cre8-c-checkbox-field", {});
|
|
19
|
+
return p`
|
|
20
|
+
<fieldset class="${a}" aria-describedby="${l(this.ariaDescribedBy)}">
|
|
54
21
|
<legend class="cre8-c-checkbox-field__legend">${this.label}</legend>
|
|
55
22
|
<div class="cre8-c-checkbox-field__body">
|
|
56
23
|
<div class="cre8-c-checkbox-field__list" role="list">
|
|
57
24
|
<slot></slot>
|
|
58
25
|
</div>
|
|
59
26
|
</div>
|
|
60
|
-
${this.fieldNote ?
|
|
27
|
+
${this.fieldNote ? p`<cre8-field-note
|
|
61
28
|
?inverted=${this.fieldNoteKnockout}
|
|
62
|
-
id=${
|
|
63
|
-
iconName=${
|
|
29
|
+
id=${l(this.ariaDescribedBy)}
|
|
30
|
+
iconName=${l(this.fieldNoteIconName)}
|
|
64
31
|
?isSuccess=${this.fieldNoteIsSuccess}
|
|
65
32
|
?isError=${this.fieldNoteIsError}
|
|
66
33
|
>
|
|
@@ -70,27 +37,27 @@ const l = class l extends h {
|
|
|
70
37
|
`;
|
|
71
38
|
}
|
|
72
39
|
};
|
|
73
|
-
|
|
74
|
-
let e =
|
|
75
|
-
|
|
40
|
+
o.styles = [x];
|
|
41
|
+
let e = o;
|
|
42
|
+
r([
|
|
76
43
|
t()
|
|
77
44
|
], e.prototype, "label");
|
|
78
|
-
|
|
45
|
+
r([
|
|
79
46
|
t()
|
|
80
47
|
], e.prototype, "fieldNote");
|
|
81
|
-
|
|
48
|
+
r([
|
|
82
49
|
t()
|
|
83
50
|
], e.prototype, "ariaDescribedBy");
|
|
84
|
-
|
|
51
|
+
r([
|
|
85
52
|
t()
|
|
86
53
|
], e.prototype, "fieldNoteIconName");
|
|
87
|
-
|
|
54
|
+
r([
|
|
88
55
|
t({ type: Boolean, reflect: !0 })
|
|
89
56
|
], e.prototype, "fieldNoteKnockout");
|
|
90
|
-
|
|
57
|
+
r([
|
|
91
58
|
t({ type: Boolean, reflect: !0 })
|
|
92
59
|
], e.prototype, "fieldNoteIsSuccess");
|
|
93
|
-
|
|
60
|
+
r([
|
|
94
61
|
t({ type: Boolean, reflect: !0 })
|
|
95
62
|
], e.prototype, "fieldNoteIsError");
|
|
96
63
|
customElements.get("cre8-checkbox-field") === void 0 && customElements.define("cre8-checkbox-field", e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-field.styles.d.ts","sourceRoot":"","sources":["../../../components/checkbox-field/checkbox-field.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"checkbox-field.styles.d.ts","sourceRoot":"","sources":["../../../components/checkbox-field/checkbox-field.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,yBAAyzE,CAAC;AACt0E,eAAe,MAAM,CAAC"}
|