@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,143 +1,28 @@
|
|
|
1
|
-
import { s as
|
|
2
|
-
import { css as
|
|
3
|
-
import { property as
|
|
4
|
-
import { nanoid as
|
|
1
|
+
import { s as p } from "../../icon-D22g8aWB.js";
|
|
2
|
+
import { css as u, html as g } from "lit";
|
|
3
|
+
import { property as o, query as b } from "lit/decorators.js";
|
|
4
|
+
import { nanoid as f } from "nanoid";
|
|
5
5
|
import { ifDefined as l } from "lit-html/directives/if-defined.js";
|
|
6
|
-
import { Cre8FormElement as
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
:host {
|
|
14
|
-
display: inline-flex;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.cre8-c-tag {
|
|
18
|
-
@include cre8-typography-label-small;
|
|
19
|
-
display: flex;
|
|
20
|
-
align-items: center;
|
|
21
|
-
background-color: var(--cre8-color-bg-default);
|
|
22
|
-
border: var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-strong);
|
|
23
|
-
color: var(--cre8-color-content-default);
|
|
24
|
-
cursor: pointer;
|
|
25
|
-
gap: var(--cre8-spacing-8);
|
|
26
|
-
padding: var(--cre8-spacing-4) var(--cre8-spacing-16);
|
|
27
|
-
transition: all var(--cre8-anim-fade-quick) var(--cre8-anim-ease);
|
|
28
|
-
white-space: nowrap;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.cre8-c-tag--square {
|
|
32
|
-
border-radius: var(--cre8-border-radius-small);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.cre8-c-tag--round {
|
|
36
|
-
border-radius: var(--cre8-border-radius-round);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.cre8-c-tag--neutral {
|
|
40
|
-
|
|
41
|
-
&:hover,
|
|
42
|
-
&:focus {
|
|
43
|
-
background-color: var(--cre8-color-bg-default-hover);
|
|
44
|
-
border: var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-strong);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.cre8-c-tag--branded {
|
|
49
|
-
background-color: var(--cre8-color-bg-brand);
|
|
50
|
-
border: var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-transparent);
|
|
51
|
-
|
|
52
|
-
&:hover,
|
|
53
|
-
&:focus {
|
|
54
|
-
background-color: var(--cre8-color-bg-brand-hover);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.cre8-c-tag--neutral-hybrid {
|
|
59
|
-
color: var(--cre8-color-content-brand);
|
|
60
|
-
|
|
61
|
-
&:hover,
|
|
62
|
-
&:focus {
|
|
63
|
-
background-color: var(--cre8-color-bg-default-hover);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.cre8-c-tag--neutral-selected,
|
|
68
|
-
.cre8-c-tag--neutral-hybrid-selected {
|
|
69
|
-
background-color: var(--cre8-color-bg-brand-strong);
|
|
70
|
-
border: var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-transparent);
|
|
71
|
-
color: var(--cre8-color-content-knockout);
|
|
72
|
-
|
|
73
|
-
&:hover,
|
|
74
|
-
&:focus {
|
|
75
|
-
background-color: var(--cre8-color-bg-brand-strong-hover);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.cre8-c-tag--branded-selected {
|
|
80
|
-
background-color: var(--cre8-color-bg-brand-xstrong);
|
|
81
|
-
border: var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-transparent);
|
|
82
|
-
color: var(--cre8-color-content-knockout);
|
|
83
|
-
|
|
84
|
-
&:hover,
|
|
85
|
-
&:focus {
|
|
86
|
-
background-color: var(--cre8-color-bg-brand-xstrong-hover);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.cre8-c-tag:focus {
|
|
91
|
-
outline: var(--cre8-border-width-focus) var(--cre8-border-style-default) var(--cre8-color-border-active-outline);
|
|
92
|
-
outline-offset: var(--cre8-border-width-focus);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.cre8-c-tag.cre8-c-tag--disabled,
|
|
96
|
-
.cre8-c-tag.cre8-c-tag--disabled:hover,
|
|
97
|
-
.cre8-c-tag.cre8-c-tag--disabled:focus {
|
|
98
|
-
background-color: var(--cre8-color-bg-disabled);
|
|
99
|
-
border: var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-disabled);
|
|
100
|
-
color: var(--cre8-color-content-disabled);
|
|
101
|
-
cursor: not-allowed;
|
|
102
|
-
outline: none;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.cre8-c-tag__input {
|
|
106
|
-
@include cre8-typography-body-small;
|
|
107
|
-
display: none;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.cre8-tag-text{
|
|
111
|
-
cursor: pointer;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.cre8-c-tag--disabled > .cre8-tag-text {
|
|
115
|
-
cursor: not-allowed;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
cre8-icon {
|
|
119
|
-
display: flex;
|
|
120
|
-
align-items: center;
|
|
121
|
-
}
|
|
122
|
-
`;
|
|
123
|
-
var y = Object.defineProperty, c = (n, e, r, t) => {
|
|
124
|
-
for (var i = void 0, s = n.length - 1, h; s >= 0; s--)
|
|
125
|
-
(h = n[s]) && (i = h(e, r, i) || i);
|
|
126
|
-
return i && y(e, r, i), i;
|
|
6
|
+
import { Cre8FormElement as y } from "../cre8-form-element.js";
|
|
7
|
+
const v = u`*,::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-tag{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);display:flex;align-items:center;background-color:var(--cre8-color-bg-default);border:var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-strong);color:var(--cre8-color-content-default);cursor:pointer;gap:var(--cre8-spacing-8);padding:var(--cre8-spacing-4) var(--cre8-spacing-16);transition:all var(--cre8-anim-fade-quick) var(--cre8-anim-ease);white-space:nowrap}.cre8-c-tag--square{border-radius:var(--cre8-border-radius-small)}.cre8-c-tag--round{border-radius:var(--cre8-border-radius-round)}.cre8-c-tag--neutral:hover,.cre8-c-tag--neutral:focus{background-color:var(--cre8-color-bg-default-hover);border:var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-strong)}.cre8-c-tag--branded{background-color:var(--cre8-color-bg-brand);border:var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-transparent)}.cre8-c-tag--branded:hover,.cre8-c-tag--branded:focus{background-color:var(--cre8-color-bg-brand-hover)}.cre8-c-tag--neutral-hybrid{color:var(--cre8-color-content-brand)}.cre8-c-tag--neutral-hybrid:hover,.cre8-c-tag--neutral-hybrid:focus{background-color:var(--cre8-color-bg-default-hover)}.cre8-c-tag--neutral-selected,.cre8-c-tag--neutral-hybrid-selected{background-color:var(--cre8-color-bg-brand-strong);border:var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-transparent);color:var(--cre8-color-content-knockout)}.cre8-c-tag--neutral-selected:hover,.cre8-c-tag--neutral-selected:focus,.cre8-c-tag--neutral-hybrid-selected:hover,.cre8-c-tag--neutral-hybrid-selected:focus{background-color:var(--cre8-color-bg-brand-strong-hover)}.cre8-c-tag--branded-selected{background-color:var(--cre8-color-bg-brand-xstrong);border:var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-transparent);color:var(--cre8-color-content-knockout)}.cre8-c-tag--branded-selected:hover,.cre8-c-tag--branded-selected:focus{background-color:var(--cre8-color-bg-brand-xstrong-hover)}.cre8-c-tag:focus{outline:var(--cre8-border-width-focus) var(--cre8-border-style-default) var(--cre8-color-border-active-outline);outline-offset:var(--cre8-border-width-focus)}.cre8-c-tag.cre8-c-tag--disabled,.cre8-c-tag.cre8-c-tag--disabled:hover,.cre8-c-tag.cre8-c-tag--disabled:focus{background-color:var(--cre8-color-bg-disabled);border:var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-disabled);color:var(--cre8-color-content-disabled);cursor:not-allowed;outline:none}.cre8-c-tag__input{font-family:var(--cre8-typography-body-small-font-family);font-size:var(--cre8-typography-body-small-font-size);font-weight:var(--cre8-typography-body-small-font-weight);line-height:var(--cre8-typography-body-small-line-height);text-decoration:var(--cre8-typography-body-small-text-decoration);text-transform:var(--cre8-typography-body-small-text-transform);display:none}.cre8-tag-text{cursor:pointer}.cre8-c-tag--disabled>.cre8-tag-text{cursor:not-allowed}cre8-icon{display:flex;align-items:center}`;
|
|
8
|
+
var m = Object.defineProperty, i = (n, e, r, t) => {
|
|
9
|
+
for (var c = void 0, s = n.length - 1, h; s >= 0; s--)
|
|
10
|
+
(h = n[s]) && (c = h(e, r, c) || c);
|
|
11
|
+
return c && m(e, r, c), c;
|
|
127
12
|
};
|
|
128
|
-
const d = class d extends
|
|
13
|
+
const d = class d extends y {
|
|
129
14
|
constructor() {
|
|
130
15
|
super(...arguments), this.variant = "neutral", this.shape = "square";
|
|
131
16
|
}
|
|
132
17
|
connectedCallback() {
|
|
133
|
-
super.connectedCallback(), this.fieldId = this.fieldId ||
|
|
18
|
+
super.connectedCallback(), this.fieldId = this.fieldId || f(), window.addEventListener("click", this._clickCheckHandler, !1), window.addEventListener("click", this._clickRadioHandler, !1), window.addEventListener("keydown", this._handleCheckKeyDown, !1), window.addEventListener("keydown", this.handleRadioKeyDown, !1);
|
|
134
19
|
}
|
|
135
20
|
disconnectedCallback() {
|
|
136
21
|
super.disconnectedCallback(), window.removeEventListener("click", this._clickCheckHandler, !1), window.removeEventListener("click", this._clickRadioHandler, !1), window.removeEventListener("keydown", this._handleCheckKeyDown, !1), window.removeEventListener("keydown", this.handleRadioKeyDown, !1);
|
|
137
22
|
}
|
|
138
23
|
renderCheckboxIcon() {
|
|
139
|
-
return this.type === "checkbox" && this.isSelected ?
|
|
140
|
-
<cre8-icon svg="${
|
|
24
|
+
return this.type === "checkbox" && this.isSelected ? g`
|
|
25
|
+
<cre8-icon svg="${p}" class="cre8-tag-icon" aria-hidden="true"></cre8-icon>
|
|
141
26
|
` : null;
|
|
142
27
|
}
|
|
143
28
|
_clickCheckHandler() {
|
|
@@ -150,7 +35,7 @@ const d = class d extends f {
|
|
|
150
35
|
* Reset the radio tag field
|
|
151
36
|
*/
|
|
152
37
|
resetField() {
|
|
153
|
-
this.
|
|
38
|
+
this._internals.setFormValue(null);
|
|
154
39
|
}
|
|
155
40
|
/**
|
|
156
41
|
* Reset the radio field tags tab indeces
|
|
@@ -182,7 +67,7 @@ const d = class d extends f {
|
|
|
182
67
|
_clickRadioHandler() {
|
|
183
68
|
this._removeChecked(), this.isSelected = !this.isSelected;
|
|
184
69
|
const e = this.shadowRoot?.querySelector(".cre8-c-tag");
|
|
185
|
-
e && e.setAttribute("tabindex", "0"), this.isSelected ? this.
|
|
70
|
+
e && e.setAttribute("tabindex", "0"), this.isSelected ? this._internals.setFormValue(this.value || "on") : this._internals.setFormValue(null);
|
|
186
71
|
}
|
|
187
72
|
_updateSibling(e, r, t) {
|
|
188
73
|
e.preventDefault(), this._removeChecked(), t.focus(), t.setAttribute("tabindex", "0"), r.setAttribute("isSelected", "");
|
|
@@ -240,7 +125,7 @@ const d = class d extends f {
|
|
|
240
125
|
[`cre8-c-tag--${this.variant}-selected`]: this.isSelected,
|
|
241
126
|
"cre8-c-tag--disabled": this.isDisabled
|
|
242
127
|
}), r = this.isSelected === !0 || this.initialSelected === !0;
|
|
243
|
-
return
|
|
128
|
+
return g`
|
|
244
129
|
<div role="${l(this._getRole())}">
|
|
245
130
|
<div role="${l(this.type)}" aria-checked="${r}" class="${e}"
|
|
246
131
|
aria-disabled="${l(this.isDisabled)}"
|
|
@@ -267,34 +152,34 @@ const d = class d extends f {
|
|
|
267
152
|
`;
|
|
268
153
|
}
|
|
269
154
|
};
|
|
270
|
-
d.styles = [
|
|
271
|
-
let
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
],
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
],
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
],
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
],
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
],
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
],
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
],
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
],
|
|
296
|
-
customElements.get("cre8-tag") === void 0 && customElements.define("cre8-tag",
|
|
155
|
+
d.styles = [v];
|
|
156
|
+
let a = d;
|
|
157
|
+
i([
|
|
158
|
+
o()
|
|
159
|
+
], a.prototype, "text");
|
|
160
|
+
i([
|
|
161
|
+
o()
|
|
162
|
+
], a.prototype, "type");
|
|
163
|
+
i([
|
|
164
|
+
o()
|
|
165
|
+
], a.prototype, "variant");
|
|
166
|
+
i([
|
|
167
|
+
o()
|
|
168
|
+
], a.prototype, "shape");
|
|
169
|
+
i([
|
|
170
|
+
o({ type: Boolean })
|
|
171
|
+
], a.prototype, "isDisabled");
|
|
172
|
+
i([
|
|
173
|
+
o({ type: Boolean })
|
|
174
|
+
], a.prototype, "isSelected");
|
|
175
|
+
i([
|
|
176
|
+
b("input")
|
|
177
|
+
], a.prototype, "field");
|
|
178
|
+
i([
|
|
179
|
+
o()
|
|
180
|
+
], a.prototype, "fieldId");
|
|
181
|
+
customElements.get("cre8-tag") === void 0 && customElements.define("cre8-tag", a);
|
|
297
182
|
export {
|
|
298
|
-
|
|
299
|
-
|
|
183
|
+
a as Cre8Tag,
|
|
184
|
+
a as default
|
|
300
185
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag.styles.d.ts","sourceRoot":"","sources":["../../../components/tag/tag.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"tag.styles.d.ts","sourceRoot":"","sources":["../../../components/tag/tag.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,yBAAirK,CAAC;AAC9rK,eAAe,MAAM,CAAC"}
|
|
@@ -1,55 +1,24 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { property as
|
|
3
|
-
import { nanoid as
|
|
4
|
-
import { Cre8Element as
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
.cre8-c-tag-list {
|
|
11
|
-
border: none;
|
|
12
|
-
padding: 0;
|
|
13
|
-
margin: 0;
|
|
14
|
-
gap: var(--cre8-spacing-16);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.cre8-c-tag-list__legend {
|
|
18
|
-
margin-bottom: var(--cre8-spacing-16);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Slotted tag items
|
|
23
|
-
*/
|
|
24
|
-
::slotted(cre8-tag) {
|
|
25
|
-
margin-bottom: var(--cre8-spacing-16);
|
|
26
|
-
margin-right: var(--cre8-spacing-8);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.cre8-c-tag-list__list {
|
|
30
|
-
list-style-type: none;
|
|
31
|
-
margin: 0;
|
|
32
|
-
padding: 0;
|
|
33
|
-
display: flex;
|
|
34
|
-
flex-wrap: wrap;
|
|
35
|
-
}
|
|
36
|
-
`;
|
|
37
|
-
var _ = Object.defineProperty, c = (l, s, a, v) => {
|
|
38
|
-
for (var e = void 0, i = l.length - 1, n; i >= 0; i--)
|
|
39
|
-
(n = l[i]) && (e = n(s, a, e) || e);
|
|
40
|
-
return e && _(s, a, e), e;
|
|
1
|
+
import { css as p, html as m } from "lit";
|
|
2
|
+
import { property as n } from "lit/decorators.js";
|
|
3
|
+
import { nanoid as h } from "nanoid";
|
|
4
|
+
import { Cre8Element as c } from "../cre8-element.js";
|
|
5
|
+
const g = 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-tag-list{border:none;padding:0;margin:0;gap:var(--cre8-spacing-16)}.cre8-c-tag-list__legend{margin-bottom:var(--cre8-spacing-16)}::slotted(cre8-tag){margin-bottom:var(--cre8-spacing-16);margin-right:var(--cre8-spacing-8)}.cre8-c-tag-list__list{list-style-type:none;margin:0;padding:0;display:flex;flex-wrap:wrap}`;
|
|
6
|
+
var f = Object.defineProperty, o = (s, i, l, x) => {
|
|
7
|
+
for (var e = void 0, r = s.length - 1, d; r >= 0; r--)
|
|
8
|
+
(d = s[r]) && (e = d(i, l, e) || e);
|
|
9
|
+
return e && f(i, l, e), e;
|
|
41
10
|
};
|
|
42
|
-
const
|
|
11
|
+
const a = class a extends c {
|
|
43
12
|
firstUpdated() {
|
|
44
13
|
this._initializeAria();
|
|
45
14
|
}
|
|
46
15
|
_initializeAria() {
|
|
47
|
-
this.fieldId = this.fieldId ||
|
|
16
|
+
this.fieldId = this.fieldId || h();
|
|
48
17
|
}
|
|
49
18
|
render() {
|
|
50
|
-
const
|
|
51
|
-
return
|
|
52
|
-
<fieldset class="${
|
|
19
|
+
const i = this.componentClassNames("cre8-c-tag-list", {});
|
|
20
|
+
return m`
|
|
21
|
+
<fieldset class="${i}">
|
|
53
22
|
<legend class="cre8-c-tag-list__legend">${this.label}</legend>
|
|
54
23
|
<div class="cre8-c-tag-list__list" role="list">
|
|
55
24
|
<slot></slot>
|
|
@@ -58,13 +27,13 @@ const r = class r extends p {
|
|
|
58
27
|
`;
|
|
59
28
|
}
|
|
60
29
|
};
|
|
61
|
-
|
|
62
|
-
let t =
|
|
63
|
-
|
|
64
|
-
|
|
30
|
+
a.styles = [g];
|
|
31
|
+
let t = a;
|
|
32
|
+
o([
|
|
33
|
+
n()
|
|
65
34
|
], t.prototype, "label");
|
|
66
|
-
|
|
67
|
-
|
|
35
|
+
o([
|
|
36
|
+
n()
|
|
68
37
|
], t.prototype, "fieldId");
|
|
69
38
|
customElements.get("cre8-tag-list") === void 0 && customElements.define("cre8-tag-list", t);
|
|
70
39
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag-list.styles.d.ts","sourceRoot":"","sources":["../../../components/tag-list/tag-list.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"tag-list.styles.d.ts","sourceRoot":"","sources":["../../../components/tag-list/tag-list.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,yBAAglE,CAAC;AAC7lE,eAAe,MAAM,CAAC"}
|
|
@@ -1,46 +1,13 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { property as
|
|
3
|
-
import { Cre8Element as
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
:host {
|
|
10
|
-
display: flex;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Tertiary nav
|
|
15
|
-
*/
|
|
16
|
-
.cre8-c-tertiary-nav {
|
|
17
|
-
width: 100%;
|
|
18
|
-
max-width: calc(8px * 30);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Tertiary nav full width
|
|
23
|
-
*/
|
|
24
|
-
.cre8-c-tertiary-nav--full-width {
|
|
25
|
-
max-width: none;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Tertiary nav list
|
|
30
|
-
*/
|
|
31
|
-
.cre8-c-tertiary-nav__list {
|
|
32
|
-
margin: 0;
|
|
33
|
-
padding: 0;
|
|
34
|
-
list-style: none;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
`;
|
|
38
|
-
var f = Object.defineProperty, c = (i, r, n, y) => {
|
|
39
|
-
for (var t = void 0, a = i.length - 1, l; a >= 0; a--)
|
|
40
|
-
(l = i[a]) && (t = l(r, n, t) || t);
|
|
41
|
-
return t && f(r, n, t), t;
|
|
1
|
+
import { css as h, html as m } from "lit";
|
|
2
|
+
import { property as d } from "lit/decorators.js";
|
|
3
|
+
import { Cre8Element as p } from "../cre8-element.js";
|
|
4
|
+
const c = 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-tertiary-nav{width:100%;max-width:15rem}.cre8-c-tertiary-nav--full-width{max-width:none}.cre8-c-tertiary-nav__list{margin:0;padding:0;list-style:none}`;
|
|
5
|
+
var f = Object.defineProperty, o = (s, r, l, x) => {
|
|
6
|
+
for (var e = void 0, i = s.length - 1, n; i >= 0; i--)
|
|
7
|
+
(n = s[i]) && (e = n(r, l, e) || e);
|
|
8
|
+
return e && f(r, l, e), e;
|
|
42
9
|
};
|
|
43
|
-
const
|
|
10
|
+
const a = class a extends p {
|
|
44
11
|
constructor() {
|
|
45
12
|
super(...arguments), this.navAriaLabel = "tertiary";
|
|
46
13
|
}
|
|
@@ -48,7 +15,7 @@ const s = class s extends v {
|
|
|
48
15
|
const r = this.componentClassNames("cre8-c-tertiary-nav", {
|
|
49
16
|
"cre8-c-tertiary-nav--full-width": this.fullWidth
|
|
50
17
|
});
|
|
51
|
-
return
|
|
18
|
+
return m`
|
|
52
19
|
<nav aria-label="${this.navAriaLabel}" role="navigation" class="${r}">
|
|
53
20
|
<ul role="list" class="cre8-c-tertiary-nav__list">
|
|
54
21
|
<slot></slot>
|
|
@@ -57,16 +24,16 @@ const s = class s extends v {
|
|
|
57
24
|
`;
|
|
58
25
|
}
|
|
59
26
|
};
|
|
60
|
-
|
|
61
|
-
let
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
],
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
],
|
|
68
|
-
customElements.get("cre8-tertiary-nav") === void 0 && customElements.define("cre8-tertiary-nav",
|
|
27
|
+
a.styles = [c];
|
|
28
|
+
let t = a;
|
|
29
|
+
o([
|
|
30
|
+
d({ type: Boolean, reflect: !0 })
|
|
31
|
+
], t.prototype, "fullWidth");
|
|
32
|
+
o([
|
|
33
|
+
d()
|
|
34
|
+
], t.prototype, "navAriaLabel");
|
|
35
|
+
customElements.get("cre8-tertiary-nav") === void 0 && customElements.define("cre8-tertiary-nav", t);
|
|
69
36
|
export {
|
|
70
|
-
|
|
71
|
-
|
|
37
|
+
t as Cre8TertiaryNav,
|
|
38
|
+
t as default
|
|
72
39
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tertiary-nav.styles.d.ts","sourceRoot":"","sources":["../../../components/tertiary-nav/tertiary-nav.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"tertiary-nav.styles.d.ts","sourceRoot":"","sources":["../../../components/tertiary-nav/tertiary-nav.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,yBAAi8D,CAAC;AAC98D,eAAe,MAAM,CAAC"}
|
|
@@ -1,85 +1,35 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { ifDefined as
|
|
1
|
+
import { css as m, html as f } from "lit";
|
|
2
|
+
import { ifDefined as c } from "lit-html/directives/if-defined.js";
|
|
3
3
|
import { property as d } from "lit/decorators.js";
|
|
4
|
-
import { Cre8Element as
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
:host {
|
|
11
|
-
display: contents;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Tertiary nav item link
|
|
16
|
-
*/
|
|
17
|
-
.cre8-c-tertiary-nav-item__link {
|
|
18
|
-
@include cre8-typography-body-default();
|
|
19
|
-
display: flex;
|
|
20
|
-
align-items: center;
|
|
21
|
-
gap: calc(8px * 1);
|
|
22
|
-
padding: calc(8px * 1) calc(8px * 1) calc(8px * 1) calc(8px * 2);
|
|
23
|
-
color: var(--cre8-color-content-brand-strong);
|
|
24
|
-
background-color: var(--cre8-color-bg-default);
|
|
25
|
-
border-block-end: var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-default);
|
|
26
|
-
text-decoration: none;
|
|
27
|
-
transition: all var(--cre8-anim-fade-quick) var(--cre8-anim-ease);
|
|
28
|
-
width: 100%;
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Tertiary nav item link hover & focus state
|
|
32
|
-
*/
|
|
33
|
-
&:hover,
|
|
34
|
-
&:focus {
|
|
35
|
-
background-color: var(--cre8-color-bg-subtle);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Tertiary nav item link focus visible state
|
|
40
|
-
*/
|
|
41
|
-
&:focus-visible {
|
|
42
|
-
@include focus;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Tertiary nav item link active/current state
|
|
47
|
-
*/
|
|
48
|
-
&:active,
|
|
49
|
-
.cre8-is-current & {
|
|
50
|
-
color: var(--cre8-color-content-default);
|
|
51
|
-
background-color: var(--cre8-color-bg-subtle);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
`;
|
|
56
|
-
var y = Object.defineProperty, u = (i, r, a, s) => {
|
|
57
|
-
for (var e = void 0, o = i.length - 1, n; o >= 0; o--)
|
|
58
|
-
(n = i[o]) && (e = n(r, a, e) || e);
|
|
59
|
-
return e && y(r, a, e), e;
|
|
4
|
+
import { Cre8Element as p } from "../cre8-element.js";
|
|
5
|
+
const y = m`*,::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-tertiary-nav-item__link{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;align-items:center;gap:0.5rem;padding:0.5rem 0.5rem 0.5rem 1rem;color:var(--cre8-color-content-brand-strong);background-color:var(--cre8-color-bg-default);border-block-end:var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-default);text-decoration:none;transition:all var(--cre8-anim-fade-quick) var(--cre8-anim-ease);width:100%}.cre8-c-tertiary-nav-item__link:hover,.cre8-c-tertiary-nav-item__link:focus{background-color:var(--cre8-color-bg-subtle)}.cre8-c-tertiary-nav-item__link:focus-visible{outline:var(--cre8-border-width-focus) solid var(--cre8-color-border-active-outline);outline-offset:0.125rem}.cre8-c-tertiary-nav-item__link:active,.cre8-is-current .cre8-c-tertiary-nav-item__link{color:var(--cre8-color-content-default);background-color:var(--cre8-color-bg-subtle)}`;
|
|
6
|
+
var u = Object.defineProperty, h = (s, r, a, n) => {
|
|
7
|
+
for (var e = void 0, i = s.length - 1, l; i >= 0; i--)
|
|
8
|
+
(l = s[i]) && (e = l(r, a, e) || e);
|
|
9
|
+
return e && u(r, a, e), e;
|
|
60
10
|
};
|
|
61
|
-
const
|
|
11
|
+
const o = class o extends p {
|
|
62
12
|
/**
|
|
63
13
|
* Handle on click
|
|
64
14
|
* 1. On click, remove all isCurrent properties from all tertiary-nav items
|
|
65
15
|
* 2. Add isCurrent to the item clicked
|
|
66
16
|
*/
|
|
67
17
|
_handleOnClick() {
|
|
68
|
-
this.closest("cre8-tertiary-nav").shadowRoot.querySelector("slot").assignedElements({ flatten: !1 }).forEach((
|
|
69
|
-
|
|
18
|
+
this.closest("cre8-tertiary-nav").shadowRoot.querySelector("slot").assignedElements({ flatten: !1 }).forEach((n) => {
|
|
19
|
+
n.isCurrent = !1;
|
|
70
20
|
}), this.isCurrent = !0;
|
|
71
21
|
}
|
|
72
22
|
render() {
|
|
73
23
|
const r = this.componentClassNames("cre8-c-tertiary-nav-item", {
|
|
74
24
|
"cre8-is-current": this.isCurrent
|
|
75
25
|
});
|
|
76
|
-
return
|
|
26
|
+
return f`
|
|
77
27
|
<li role="listitem" class="${r}">
|
|
78
28
|
<a
|
|
79
29
|
class="cre8-c-tertiary-nav-item__link"
|
|
80
|
-
aria-current=${
|
|
30
|
+
aria-current=${c(this.isCurrent ? "page" : void 0)}
|
|
81
31
|
@click=${this._handleOnClick}
|
|
82
|
-
href=${
|
|
32
|
+
href=${c(this.href)}
|
|
83
33
|
>
|
|
84
34
|
<slot></slot>
|
|
85
35
|
</a>
|
|
@@ -87,12 +37,12 @@ const c = class c extends v {
|
|
|
87
37
|
`;
|
|
88
38
|
}
|
|
89
39
|
};
|
|
90
|
-
|
|
91
|
-
let t =
|
|
92
|
-
|
|
40
|
+
o.styles = [y];
|
|
41
|
+
let t = o;
|
|
42
|
+
h([
|
|
93
43
|
d()
|
|
94
44
|
], t.prototype, "href");
|
|
95
|
-
|
|
45
|
+
h([
|
|
96
46
|
d({ type: Boolean, reflect: !0 })
|
|
97
47
|
], t.prototype, "isCurrent");
|
|
98
48
|
customElements.get("cre8-tertiary-nav-item") === void 0 && customElements.define("cre8-tertiary-nav-item", t);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tertiary-nav-item.styles.d.ts","sourceRoot":"","sources":["../../../components/tertiary-nav-item/tertiary-nav-item.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"tertiary-nav-item.styles.d.ts","sourceRoot":"","sources":["../../../components/tertiary-nav-item/tertiary-nav-item.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,yBAAu/F,CAAC;AACpgG,eAAe,MAAM,CAAC"}
|