@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,206 +1,15 @@
|
|
|
1
|
-
import { css as u, html as
|
|
2
|
-
import { property as
|
|
1
|
+
import { css as u, html as c } from "lit";
|
|
2
|
+
import { property as o, query as h } from "lit/decorators.js";
|
|
3
3
|
import { nanoid as b } from "nanoid";
|
|
4
|
-
import { ifDefined as
|
|
5
|
-
import { Cre8Element as
|
|
6
|
-
const g = u
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
:host {
|
|
12
|
-
display: inline-flex;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Tooltip
|
|
17
|
-
* The main container that holds the trigger and panel
|
|
18
|
-
*/
|
|
19
|
-
.cre8-c-tooltip {
|
|
20
|
-
position: relative;
|
|
21
|
-
display: table;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Tooltip panel
|
|
26
|
-
* The container for the tooltip panel heading, content, and footer
|
|
27
|
-
*/
|
|
28
|
-
.cre8-c-tooltip__panel {
|
|
29
|
-
@include cre8-typography-body-default();
|
|
30
|
-
opacity: 0;
|
|
31
|
-
visibility: hidden;
|
|
32
|
-
position: absolute;
|
|
33
|
-
word-wrap: break-word;
|
|
34
|
-
inset-block-start: calc(100% + #{calc(8px * 1.5)});
|
|
35
|
-
inset-block-end: auto;
|
|
36
|
-
inset-inline-start: 50%;
|
|
37
|
-
inset-inline-end: auto;
|
|
38
|
-
transform: translateX(var(--rtlTranslateX, -50%));
|
|
39
|
-
display: flex;
|
|
40
|
-
flex-direction: column;
|
|
41
|
-
gap: calc(8px * 1);
|
|
42
|
-
width: max-content;
|
|
43
|
-
max-width: calc(8px * 35);
|
|
44
|
-
z-index: 400;
|
|
45
|
-
color: var(--cre8-color-content-knockout);
|
|
46
|
-
background-color: var(--cre8-color-bg-strong);
|
|
47
|
-
border: var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-strong);
|
|
48
|
-
border-radius: var(--cre8-border-radius-default);
|
|
49
|
-
padding: calc(8px * 1);
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Active state for tooltip panel
|
|
53
|
-
*/
|
|
54
|
-
.cre8-is-active:not(.cre8-is-dynamic) &,
|
|
55
|
-
.cre8-is-active.cre8-is-dynamic-active & {
|
|
56
|
-
opacity: 1;
|
|
57
|
-
visibility: visible;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Tooltip panel positioned to the top of the trigger
|
|
62
|
-
*/
|
|
63
|
-
.cre8-c-tooltip--top & {
|
|
64
|
-
inset-block-start: auto;
|
|
65
|
-
inset-block-end: calc(100% + #{calc(8px * 1.5)});
|
|
66
|
-
inset-inline-start: 50%;
|
|
67
|
-
inset-inline-end: auto;
|
|
68
|
-
transform: translateX(var(--rtlTranslateX, -50%));
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Tooltip panel positioned to the left of the trigger
|
|
73
|
-
*/
|
|
74
|
-
.cre8-c-tooltip--left & {
|
|
75
|
-
inset-block-start: 50%;
|
|
76
|
-
inset-block-end: auto;
|
|
77
|
-
inset-inline-start: auto;
|
|
78
|
-
inset-inline-end: calc(100% + #{calc(8px * 1.5)});
|
|
79
|
-
transform: translateY(-50%);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Tooltip panel positioned to the right of the trigger
|
|
84
|
-
*/
|
|
85
|
-
.cre8-c-tooltip--right & {
|
|
86
|
-
inset-block-start: 50%;
|
|
87
|
-
inset-block-end: auto;
|
|
88
|
-
inset-inline-start: calc(100% + #{calc(8px * 1.5)});
|
|
89
|
-
inset-inline-end: auto;
|
|
90
|
-
transform: translateY(-50%);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Tooltip panel knockout
|
|
95
|
-
*/
|
|
96
|
-
.cre8-c-tooltip--knockout & {
|
|
97
|
-
background-color: var(--cre8-color-bg-default);
|
|
98
|
-
color: var(--cre8-color-content-default);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Tooltip panel arrow
|
|
104
|
-
*/
|
|
105
|
-
.cre8-c-tooltip__panel::before {
|
|
106
|
-
content: '';
|
|
107
|
-
display: block;
|
|
108
|
-
width: calc(8px * 1.5);
|
|
109
|
-
height: calc(8px * 1.5);
|
|
110
|
-
position: absolute;
|
|
111
|
-
margin: auto;
|
|
112
|
-
background-color: var(--cre8-color-bg-strong);
|
|
113
|
-
border-block-start: var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-strong);
|
|
114
|
-
border-inline-start: var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-strong);
|
|
115
|
-
inset-block-start: calc((var(--cre8-border-width-default) + #{calc(8px * 0.75)}) * -1);
|
|
116
|
-
inset-inline-start: 50%;
|
|
117
|
-
transform: translateX(var(--rtlTranslateX, -50%)) rotate(45deg);
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Moves the tooltip panel arrow to the top of the panel
|
|
121
|
-
*/
|
|
122
|
-
.cre8-c-tooltip--top & {
|
|
123
|
-
inset-block-start: auto;
|
|
124
|
-
inset-block-end: calc((var(--cre8-border-width-default) + #{calc(8px * 0.75)}) * -1);
|
|
125
|
-
border-block-start: none;
|
|
126
|
-
border-inline-start: none;
|
|
127
|
-
border-block-end: var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-strong);
|
|
128
|
-
border-inline-end: var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-strong);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Moves the tooltip panel arrow to the right side of the panel
|
|
133
|
-
*/
|
|
134
|
-
.cre8-c-tooltip--left & {
|
|
135
|
-
inset-block-start: 50%;
|
|
136
|
-
inset-block-end: auto;
|
|
137
|
-
inset-inline-start: auto;
|
|
138
|
-
inset-inline-end: calc((var(--cre8-border-width-default) + #{calc(8px * 0.75)}) * -1);
|
|
139
|
-
border-block-start: var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-strong);
|
|
140
|
-
border-inline-start: none;
|
|
141
|
-
border-block-end: none;
|
|
142
|
-
border-inline-end: var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-strong);
|
|
143
|
-
transform: translateY(-50%) rotate(var(--rtlRotate45Inverse, 45deg));
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Moves the tooltip panel arrow to the left side of the panel
|
|
148
|
-
*/
|
|
149
|
-
.cre8-c-tooltip--right & {
|
|
150
|
-
inset-block-start: 50%;
|
|
151
|
-
inset-block-end: auto;
|
|
152
|
-
inset-inline-start: calc((var(--cre8-border-width-default) + #{calc(8px * 0.75)}) * -1);
|
|
153
|
-
inset-inline-end: auto;
|
|
154
|
-
border-block-start: none;
|
|
155
|
-
border-inline-start: var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-strong);
|
|
156
|
-
border-block-end: var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-strong);
|
|
157
|
-
border-inline-end: none;
|
|
158
|
-
transform: translateY(-50%) rotate(var(--rtlRotate45Inverse, 45deg));
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Tooltip arrow knockout
|
|
163
|
-
*/
|
|
164
|
-
.cre8-c-tooltip--knockout & {
|
|
165
|
-
background-color: var(--cre8-color-bg-default);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Tooltip footer
|
|
171
|
-
* 1) The footer container in the panel
|
|
172
|
-
*/
|
|
173
|
-
.cre8-c-tooltip__footer {
|
|
174
|
-
display: flex;
|
|
175
|
-
gap: calc(8px * 2);
|
|
176
|
-
justify-content: flex-end;
|
|
177
|
-
flex-grow: 1;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* Tooltip trigger
|
|
182
|
-
* 1) Add global focus state on keyboard focus
|
|
183
|
-
*/
|
|
184
|
-
.cre8-c-tooltip__trigger {
|
|
185
|
-
cursor: pointer;
|
|
186
|
-
|
|
187
|
-
&:focus-visible {
|
|
188
|
-
@include focus;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
svg {
|
|
193
|
-
display: flex;
|
|
194
|
-
height: calc(8px * 2);
|
|
195
|
-
width: calc(8px * 2);
|
|
196
|
-
}
|
|
197
|
-
`;
|
|
198
|
-
var m = Object.defineProperty, i = (d, e, t, n) => {
|
|
199
|
-
for (var c = void 0, s = d.length - 1, p; s >= 0; s--)
|
|
200
|
-
(p = d[s]) && (c = p(e, t, c) || c);
|
|
201
|
-
return c && m(e, t, c), c;
|
|
4
|
+
import { ifDefined as f } from "lit/directives/if-defined.js";
|
|
5
|
+
import { Cre8Element as m } from "../cre8-element.js";
|
|
6
|
+
const g = 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-tooltip{position:relative;display:table}.cre8-c-tooltip__panel{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);opacity:0;visibility:hidden;position:absolute;word-wrap:break-word;inset-block-start:calc(100% + 0.75rem);inset-block-end:auto;inset-inline-start:50%;inset-inline-end:auto;transform:translateX(var(--rtlTranslateX, -50%));display:flex;flex-direction:column;gap:0.5rem;width:max-content;max-width:17.5rem;z-index:400;color:var(--cre8-color-content-knockout);background-color:var(--cre8-color-bg-strong);border:var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-strong);border-radius:var(--cre8-border-radius-default);padding:0.5rem}.cre8-is-active:not(.cre8-is-dynamic) .cre8-c-tooltip__panel,.cre8-is-active.cre8-is-dynamic-active .cre8-c-tooltip__panel{opacity:1;visibility:visible}.cre8-c-tooltip--top .cre8-c-tooltip__panel{inset-block-start:auto;inset-block-end:calc(100% + 0.75rem);inset-inline-start:50%;inset-inline-end:auto;transform:translateX(var(--rtlTranslateX, -50%))}.cre8-c-tooltip--left .cre8-c-tooltip__panel{inset-block-start:50%;inset-block-end:auto;inset-inline-start:auto;inset-inline-end:calc(100% + 0.75rem);transform:translateY(-50%)}.cre8-c-tooltip--right .cre8-c-tooltip__panel{inset-block-start:50%;inset-block-end:auto;inset-inline-start:calc(100% + 0.75rem);inset-inline-end:auto;transform:translateY(-50%)}.cre8-c-tooltip--knockout .cre8-c-tooltip__panel{background-color:var(--cre8-color-bg-default);color:var(--cre8-color-content-default)}.cre8-c-tooltip__panel::before{content:"";display:block;width:0.75rem;height:0.75rem;position:absolute;margin:auto;background-color:var(--cre8-color-bg-strong);border-block-start:var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-strong);border-inline-start:var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-strong);inset-block-start:calc((var(--cre8-border-width-default) + 0.375rem)*-1);inset-inline-start:50%;transform:translateX(var(--rtlTranslateX, -50%)) rotate(45deg)}.cre8-c-tooltip--top .cre8-c-tooltip__panel::before{inset-block-start:auto;inset-block-end:calc((var(--cre8-border-width-default) + 0.375rem)*-1);border-block-start:none;border-inline-start:none;border-block-end:var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-strong);border-inline-end:var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-strong)}.cre8-c-tooltip--left .cre8-c-tooltip__panel::before{inset-block-start:50%;inset-block-end:auto;inset-inline-start:auto;inset-inline-end:calc((var(--cre8-border-width-default) + 0.375rem)*-1);border-block-start:var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-strong);border-inline-start:none;border-block-end:none;border-inline-end:var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-strong);transform:translateY(-50%) rotate(var(--rtlRotate45Inverse, 45deg))}.cre8-c-tooltip--right .cre8-c-tooltip__panel::before{inset-block-start:50%;inset-block-end:auto;inset-inline-start:calc((var(--cre8-border-width-default) + 0.375rem)*-1);inset-inline-end:auto;border-block-start:none;border-inline-start:var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-strong);border-block-end:var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-strong);border-inline-end:none;transform:translateY(-50%) rotate(var(--rtlRotate45Inverse, 45deg))}.cre8-c-tooltip--knockout .cre8-c-tooltip__panel::before{background-color:var(--cre8-color-bg-default)}.cre8-c-tooltip__footer{display:flex;gap:1rem;justify-content:flex-end;flex-grow:1}.cre8-c-tooltip__trigger{cursor:pointer}.cre8-c-tooltip__trigger:focus-visible{outline:var(--cre8-border-width-focus) solid var(--cre8-color-border-active-outline);outline-offset:0.125rem}svg{display:flex;height:1rem;width:1rem}`;
|
|
7
|
+
var v = Object.defineProperty, i = (d, t, e, s) => {
|
|
8
|
+
for (var a = void 0, n = d.length - 1, p; n >= 0; n--)
|
|
9
|
+
(p = d[n]) && (a = p(t, e, a) || a);
|
|
10
|
+
return a && v(t, e, a), a;
|
|
202
11
|
};
|
|
203
|
-
const
|
|
12
|
+
const l = class l extends m {
|
|
204
13
|
constructor() {
|
|
205
14
|
super(...arguments), this.iconRotateDegree = 0, this.removeActive = () => {
|
|
206
15
|
this.isActive && this.toggleActive();
|
|
@@ -220,11 +29,11 @@ const a = class a extends f {
|
|
|
220
29
|
* 3. Set the textContent of the tip generated in the firstUpdated lifecycle callback
|
|
221
30
|
* */
|
|
222
31
|
updated() {
|
|
223
|
-
const
|
|
224
|
-
((
|
|
32
|
+
const t = this.shadowRoot.querySelectorAll("slot")[1].assignedNodes().reduce(
|
|
33
|
+
((e, s) => `${e}${s.textContent.replace(/\n/g, "").trim()}`),
|
|
225
34
|
""
|
|
226
35
|
);
|
|
227
|
-
document.getElementById(this._uniqueId) && (document.getElementById(this._uniqueId).textContent =
|
|
36
|
+
document.getElementById(this._uniqueId) && (document.getElementById(this._uniqueId).textContent = t);
|
|
228
37
|
}
|
|
229
38
|
/**
|
|
230
39
|
* firstUpdated Callback Lifecycle
|
|
@@ -236,14 +45,14 @@ const a = class a extends f {
|
|
|
236
45
|
firstUpdated() {
|
|
237
46
|
if (this.ariaDescribes) {
|
|
238
47
|
this._uniqueId = this._uniqueId || b();
|
|
239
|
-
const
|
|
240
|
-
|
|
241
|
-
const
|
|
242
|
-
|
|
243
|
-
const
|
|
244
|
-
|
|
48
|
+
const t = new RegExp(`\\b${this._uniqueId}\\b`), e = document.createElement("div");
|
|
49
|
+
e.setAttribute("role", "tooltip"), e.setAttribute("style", "position:fixed; left: -1000px; top: -1000px;"), e.id = this._uniqueId;
|
|
50
|
+
const s = document.getElementById(this.ariaDescribes);
|
|
51
|
+
s.parentNode.insertBefore(e, s);
|
|
52
|
+
const a = s?.getAttribute("aria-describedBy");
|
|
53
|
+
s?.setAttribute(
|
|
245
54
|
"aria-describedby",
|
|
246
|
-
`${
|
|
55
|
+
`${a ? `${a.replace(t, "")} ` : ""}${this._uniqueId}`.trim()
|
|
247
56
|
);
|
|
248
57
|
}
|
|
249
58
|
}
|
|
@@ -270,8 +79,8 @@ const a = class a extends f {
|
|
|
270
79
|
*/
|
|
271
80
|
dynamicPosition() {
|
|
272
81
|
if (this.isDynamic && this._Cre8TooltipPanel) {
|
|
273
|
-
const
|
|
274
|
-
|
|
82
|
+
const t = document.querySelector("body").getBoundingClientRect(), e = this._Cre8TooltipPanel.getBoundingClientRect(), s = this._Cre8Tooltip.clientHeight + e.height + e.top;
|
|
83
|
+
e.left < 0 && (this.position = this.isRTL ? "left" : "right"), e.right >= t.width && (this.position = this.isRTL ? "right" : "left"), e.top < 0 && e.left > 0 && e.right < t.width && (this.position = null), s >= window.innerHeight && e.bottom >= window.innerHeight && e.left >= 0 && e.right <= t.width && (this.position = "top");
|
|
275
84
|
}
|
|
276
85
|
}
|
|
277
86
|
/**
|
|
@@ -280,8 +89,8 @@ const a = class a extends f {
|
|
|
280
89
|
* 2. If enter or escape is keyed, toggle the tooltip open or close.
|
|
281
90
|
* We need these since the click event is on a div so that accessibility reads this aloud to a user
|
|
282
91
|
*/
|
|
283
|
-
_handleKeydown(
|
|
284
|
-
this.isActive && (
|
|
92
|
+
_handleKeydown(t) {
|
|
93
|
+
this.isActive && (t.code === "Escape" || t.code === "Tab") && this.toggleActive(), (t.code === "Enter" || t.code === "Space") && this.toggleActive();
|
|
285
94
|
}
|
|
286
95
|
/**
|
|
287
96
|
* Set Tooltip Active State
|
|
@@ -306,7 +115,7 @@ const a = class a extends f {
|
|
|
306
115
|
}, 2);
|
|
307
116
|
}
|
|
308
117
|
render() {
|
|
309
|
-
const
|
|
118
|
+
const t = this.componentClassNames("cre8-c-tooltip", {
|
|
310
119
|
"cre8-c-tooltip--top": this.position === "top",
|
|
311
120
|
"cre8-c-tooltip--left": this.position === "left",
|
|
312
121
|
"cre8-c-tooltip--right": this.position === "right",
|
|
@@ -315,22 +124,22 @@ const a = class a extends f {
|
|
|
315
124
|
"cre8-is-dynamic": this.isDynamic,
|
|
316
125
|
"cre8-is-dynamic-active": this.isActiveDynamic
|
|
317
126
|
});
|
|
318
|
-
return
|
|
319
|
-
<div class="${
|
|
127
|
+
return c`
|
|
128
|
+
<div class="${t}">
|
|
320
129
|
<div
|
|
321
130
|
class="cre8-c-tooltip__trigger"
|
|
322
131
|
tabindex="0"
|
|
323
132
|
@focus=${this.toggleActive}
|
|
324
133
|
@keydown=${this._handleKeydown}
|
|
325
134
|
>
|
|
326
|
-
${this.svg ?
|
|
135
|
+
${this.svg ? c`
|
|
327
136
|
<slot name="trigger">
|
|
328
137
|
<cre8-icon svg='${this.svg}' rotate="${Number(this.iconRotateDegree)}"
|
|
329
138
|
flip="${this.iconFlipDirection}" aria-hidden="true"></cre8-icon>
|
|
330
|
-
</slot>` :
|
|
139
|
+
</slot>` : c`<slot name="trigger"></slot>`}
|
|
331
140
|
</div>
|
|
332
141
|
<dialog
|
|
333
|
-
id=${
|
|
142
|
+
id=${f(this._uniqueId)}
|
|
334
143
|
aria-labelledby=${this.ariaDescribes}
|
|
335
144
|
class="cre8-c-tooltip__panel"
|
|
336
145
|
role="tooltip">
|
|
@@ -340,46 +149,46 @@ const a = class a extends f {
|
|
|
340
149
|
`;
|
|
341
150
|
}
|
|
342
151
|
};
|
|
343
|
-
|
|
344
|
-
let
|
|
152
|
+
l.styles = [g];
|
|
153
|
+
let r = l;
|
|
345
154
|
i([
|
|
346
|
-
|
|
347
|
-
],
|
|
155
|
+
o()
|
|
156
|
+
], r.prototype, "position");
|
|
348
157
|
i([
|
|
349
|
-
|
|
350
|
-
],
|
|
158
|
+
o({ type: Boolean, reflect: !0 })
|
|
159
|
+
], r.prototype, "knockout");
|
|
351
160
|
i([
|
|
352
|
-
|
|
353
|
-
],
|
|
161
|
+
o({ type: Boolean, reflect: !0 })
|
|
162
|
+
], r.prototype, "isDynamic");
|
|
354
163
|
i([
|
|
355
|
-
|
|
356
|
-
],
|
|
164
|
+
o({ type: Boolean })
|
|
165
|
+
], r.prototype, "isActiveDynamic");
|
|
357
166
|
i([
|
|
358
|
-
|
|
359
|
-
],
|
|
167
|
+
o({ type: Boolean, reflect: !0 })
|
|
168
|
+
], r.prototype, "isActive");
|
|
360
169
|
i([
|
|
361
|
-
|
|
362
|
-
],
|
|
170
|
+
o({ type: String })
|
|
171
|
+
], r.prototype, "ariaDescribes");
|
|
363
172
|
i([
|
|
364
|
-
|
|
365
|
-
],
|
|
173
|
+
o({ type: String })
|
|
174
|
+
], r.prototype, "_uniqueId");
|
|
366
175
|
i([
|
|
367
|
-
|
|
368
|
-
],
|
|
176
|
+
o()
|
|
177
|
+
], r.prototype, "svg");
|
|
369
178
|
i([
|
|
370
|
-
|
|
371
|
-
],
|
|
179
|
+
o({ type: Number })
|
|
180
|
+
], r.prototype, "iconRotateDegree");
|
|
372
181
|
i([
|
|
373
|
-
|
|
374
|
-
],
|
|
182
|
+
o()
|
|
183
|
+
], r.prototype, "iconFlipDirection");
|
|
375
184
|
i([
|
|
376
185
|
h(".cre8-c-tooltip")
|
|
377
|
-
],
|
|
186
|
+
], r.prototype, "_Cre8Tooltip");
|
|
378
187
|
i([
|
|
379
188
|
h(".cre8-c-tooltip__panel")
|
|
380
|
-
],
|
|
381
|
-
customElements.get("cre8-tooltip") === void 0 && customElements.define("cre8-tooltip",
|
|
189
|
+
], r.prototype, "_Cre8TooltipPanel");
|
|
190
|
+
customElements.get("cre8-tooltip") === void 0 && customElements.define("cre8-tooltip", r);
|
|
382
191
|
export {
|
|
383
|
-
|
|
384
|
-
|
|
192
|
+
r as Cre8Tooltip,
|
|
193
|
+
r as default
|
|
385
194
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.styles.d.ts","sourceRoot":"","sources":["../../../components/tooltip/tooltip.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"tooltip.styles.d.ts","sourceRoot":"","sources":["../../../components/tooltip/tooltip.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,yBAA+gM,CAAC;AAC5hM,eAAe,MAAM,CAAC"}
|
|
@@ -1,55 +1,22 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { property as
|
|
3
|
-
import { Cre8Element as
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
:host {
|
|
10
|
-
margin-left: auto;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Inverted utility-nav
|
|
15
|
-
*/
|
|
16
|
-
.cre8-c-utility-nav--inverted {
|
|
17
|
-
--cre8-utility-nav-link-color: var(--cre8-color-content-knockout);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Utility nav list
|
|
22
|
-
*/
|
|
23
|
-
.cre8-c-utility-nav__list {
|
|
24
|
-
display: flex;
|
|
25
|
-
margin: calc(8px * -2) 0 0 calc(8px * -2);
|
|
26
|
-
padding: 0;
|
|
27
|
-
list-style: none;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Slotted utility nav item
|
|
31
|
-
*/
|
|
32
|
-
::slotted(cre8-utility-nav-item) {
|
|
33
|
-
margin-left: calc(8px * 2);
|
|
34
|
-
margin-top: calc(8px * 2);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
`;
|
|
38
|
-
var d = Object.defineProperty, c = (r, i, a, y) => {
|
|
39
|
-
for (var t = void 0, n = r.length - 1, s; n >= 0; n--)
|
|
40
|
-
(s = r[n]) && (t = s(i, a, t) || t);
|
|
41
|
-
return t && d(i, a, t), t;
|
|
1
|
+
import { css as m, html as p } from "lit";
|
|
2
|
+
import { property as d } from "lit/decorators.js";
|
|
3
|
+
import { Cre8Element as c } from "../cre8-element.js";
|
|
4
|
+
const h = 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{margin-left:auto}.cre8-c-utility-nav--inverted{--cre8-utility-nav-link-color: var(--cre8-color-content-knockout)}.cre8-c-utility-nav__list{display:flex;margin:-1rem 0 0 -1rem;padding:0;list-style:none}.cre8-c-utility-nav__list ::slotted(cre8-utility-nav-item){margin-left:1rem;margin-top:1rem}`;
|
|
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 c {
|
|
44
11
|
constructor() {
|
|
45
12
|
super(...arguments), this.navAriaLabel = "utility";
|
|
46
13
|
}
|
|
47
14
|
render() {
|
|
48
|
-
const
|
|
15
|
+
const r = this.componentClassNames("cre8-c-utility-nav", {
|
|
49
16
|
"cre8-c-utility-nav--inverted": this.inverted === !0
|
|
50
17
|
});
|
|
51
|
-
return
|
|
52
|
-
<nav aria-label="${this.navAriaLabel}" class="${
|
|
18
|
+
return p`
|
|
19
|
+
<nav aria-label="${this.navAriaLabel}" class="${r}">
|
|
53
20
|
<ul class="cre8-c-utility-nav__list">
|
|
54
21
|
<slot></slot>
|
|
55
22
|
</ul>
|
|
@@ -57,16 +24,16 @@ const l = class l extends m {
|
|
|
57
24
|
`;
|
|
58
25
|
}
|
|
59
26
|
};
|
|
60
|
-
|
|
61
|
-
let
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
],
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
],
|
|
68
|
-
customElements.get("cre8-utility-nav") === void 0 && customElements.define("cre8-utility-nav",
|
|
27
|
+
a.styles = [h];
|
|
28
|
+
let t = a;
|
|
29
|
+
o([
|
|
30
|
+
d({ type: Boolean, reflect: !0 })
|
|
31
|
+
], t.prototype, "inverted");
|
|
32
|
+
o([
|
|
33
|
+
d()
|
|
34
|
+
], t.prototype, "navAriaLabel");
|
|
35
|
+
customElements.get("cre8-utility-nav") === void 0 && customElements.define("cre8-utility-nav", t);
|
|
69
36
|
export {
|
|
70
|
-
|
|
71
|
-
|
|
37
|
+
t as Cre8UtilityNav,
|
|
38
|
+
t as default
|
|
72
39
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utility-nav.styles.d.ts","sourceRoot":"","sources":["../../../components/utility-nav/utility-nav.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"utility-nav.styles.d.ts","sourceRoot":"","sources":["../../../components/utility-nav/utility-nav.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,yBAA2jE,CAAC;AACxkE,eAAe,MAAM,CAAC"}
|
|
@@ -1,117 +1,62 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { ifDefined as
|
|
3
|
-
import { property as
|
|
4
|
-
import { Cre8Element as
|
|
5
|
-
const m =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
.cre8-c-utility-nav__item {
|
|
11
|
-
margin: 0;
|
|
12
|
-
padding: 0;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Utility nav link
|
|
17
|
-
*/
|
|
18
|
-
.cre8-c-utility-nav__link {
|
|
19
|
-
display: flex;
|
|
20
|
-
@include cre8-typography-label-default;
|
|
21
|
-
border: none;
|
|
22
|
-
background: none;
|
|
23
|
-
appearance: none;
|
|
24
|
-
padding: 0;
|
|
25
|
-
text-align: left;
|
|
26
|
-
color: var(--cre8-utility-nav-link-color, var(--cre8-color-content-brand));
|
|
27
|
-
cursor: pointer;
|
|
28
|
-
transition: color var(--cre8-anim-fade-quick) var(--cre8-anim-ease);
|
|
29
|
-
|
|
30
|
-
&:hover,
|
|
31
|
-
&:focus {
|
|
32
|
-
color: var(--cre8-color-content-brand-hover);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Utility nav icon
|
|
38
|
-
* 1) Pass properties down to icon component
|
|
39
|
-
*/
|
|
40
|
-
cre8-icon-legacy {
|
|
41
|
-
--cre8-icon-height: 1.5rem; /* 1 */
|
|
42
|
-
--cre8-icon-width: 1.5rem; /* 1 */
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Utility nav icon directly after utility nav text
|
|
47
|
-
* 1) Create space between text and icon
|
|
48
|
-
*/
|
|
49
|
-
.cre8-c-utility-nav__text + cre8-icon-legacy {
|
|
50
|
-
margin-left: calc(8px * 1); /* 1 */
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Utility nav text directly after utility nav icon
|
|
55
|
-
* 1) Create space between text and icon
|
|
56
|
-
*/
|
|
57
|
-
cre8-icon-legacy + .cre8-c-utility-nav__text {
|
|
58
|
-
margin-left: calc(8px * 1); /* 1 */
|
|
59
|
-
}
|
|
60
|
-
`;
|
|
61
|
-
var v = Object.defineProperty, r = (d, n, p, f) => {
|
|
62
|
-
for (var t = void 0, s = d.length - 1, y; s >= 0; s--)
|
|
63
|
-
(y = d[s]) && (t = y(n, p, t) || t);
|
|
64
|
-
return t && v(n, p, t), t;
|
|
1
|
+
import { css as m, nothing as o, html as i } from "lit";
|
|
2
|
+
import { ifDefined as c } from "lit-html/directives/if-defined.js";
|
|
3
|
+
import { property as a } from "lit/decorators.js";
|
|
4
|
+
import { Cre8Element as f } 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}.cre8-c-utility-nav__item{margin:0;padding:0}.cre8-c-utility-nav__link{display:flex;font-family:var(--cre8-typography-label-default-font-family);font-size:var(--cre8-typography-label-default-font-size);font-weight:var(--cre8-typography-label-default-font-weight);line-height:var(--cre8-typography-label-default-line-height);text-decoration:var(--cre8-typography-label-default-text-decoration);text-transform:var(--cre8-typography-label-default-text-transform);border:none;background:none;appearance:none;padding:0;text-align:left;color:var(--cre8-utility-nav-link-color, var(--cre8-color-content-brand));cursor:pointer;transition:color var(--cre8-anim-fade-quick) var(--cre8-anim-ease)}.cre8-c-utility-nav__link:hover,.cre8-c-utility-nav__link:focus{color:var(--cre8-color-content-brand-hover)}cre8-icon-legacy{--cre8-icon-height: 1.5rem;--cre8-icon-width: 1.5rem}.cre8-c-utility-nav__text+cre8-icon-legacy{margin-left:0.5rem}cre8-icon-legacy+.cre8-c-utility-nav__text{margin-left:0.5rem}`;
|
|
6
|
+
var g = Object.defineProperty, n = (d, r, h, u) => {
|
|
7
|
+
for (var t = void 0, s = d.length - 1, p; s >= 0; s--)
|
|
8
|
+
(p = d[s]) && (t = p(r, h, t) || t);
|
|
9
|
+
return t && g(r, h, t), t;
|
|
65
10
|
};
|
|
66
|
-
const l = class l extends
|
|
11
|
+
const l = class l extends f {
|
|
67
12
|
constructor() {
|
|
68
13
|
super(...arguments), this.iconPosition = void 0;
|
|
69
14
|
}
|
|
70
15
|
render() {
|
|
71
|
-
const
|
|
16
|
+
const r = this.componentClassNames("cre8-c-utility-nav__item", {});
|
|
72
17
|
return this.href ? i`
|
|
73
|
-
<li class="${
|
|
18
|
+
<li class="${r}">
|
|
74
19
|
<a href="${this.href}" class="cre8-c-utility-nav__link">
|
|
75
|
-
${this.iconPosition === "before" ? i`<cre8-icon-legacy aria-hidden="true" name="${
|
|
20
|
+
${this.iconPosition === "before" ? i`<cre8-icon-legacy aria-hidden="true" name="${c(this.iconName)}"></cre8-icon-legacy>` : o}
|
|
76
21
|
<span
|
|
77
22
|
class="${this.hideText ? "cre8-u-is-vishidden cre8-c-utility-nav__text" : "cre8-c-utility-nav__text"}"
|
|
78
23
|
>
|
|
79
24
|
${this.text}
|
|
80
25
|
</span>
|
|
81
|
-
${this.iconPosition === "after" ? i`<cre8-icon-legacy aria-hidden="true" name="${
|
|
26
|
+
${this.iconPosition === "after" ? i`<cre8-icon-legacy aria-hidden="true" name="${c(this.iconName)}"></cre8-icon-legacy>` : o}
|
|
82
27
|
</a>
|
|
83
28
|
</li>
|
|
84
29
|
` : i`
|
|
85
|
-
<li class="${
|
|
30
|
+
<li class="${r}">
|
|
86
31
|
<button class="cre8-c-utility-nav__link">
|
|
87
|
-
${this.iconPosition === "before" ? i`<cre8-icon-legacy aria-hidden="true" name="${
|
|
32
|
+
${this.iconPosition === "before" ? i`<cre8-icon-legacy aria-hidden="true" name="${c(this.iconName)}"></cre8-icon-legacy>` : o}
|
|
88
33
|
<span
|
|
89
34
|
class="${this.hideText ? "cre8-u-is-vishidden cre8-c-utility-nav__text" : "cre8-c-utility-nav__text"}"
|
|
90
35
|
>
|
|
91
36
|
${this.text}
|
|
92
37
|
</span>
|
|
93
|
-
${this.iconPosition === "after" ? i`<cre8-icon-legacy aria-hidden="true" name="${
|
|
38
|
+
${this.iconPosition === "after" ? i`<cre8-icon-legacy aria-hidden="true" name="${c(this.iconName)}"></cre8-icon-legacy>` : o}
|
|
94
39
|
</button>
|
|
95
40
|
</li>
|
|
96
41
|
`;
|
|
97
42
|
}
|
|
98
43
|
};
|
|
99
|
-
l.styles = [
|
|
44
|
+
l.styles = [y];
|
|
100
45
|
let e = l;
|
|
101
|
-
|
|
102
|
-
|
|
46
|
+
n([
|
|
47
|
+
a({ type: Boolean, reflect: !0 })
|
|
103
48
|
], e.prototype, "hideText");
|
|
104
|
-
|
|
105
|
-
|
|
49
|
+
n([
|
|
50
|
+
a()
|
|
106
51
|
], e.prototype, "href");
|
|
107
|
-
|
|
108
|
-
|
|
52
|
+
n([
|
|
53
|
+
a()
|
|
109
54
|
], e.prototype, "iconName");
|
|
110
|
-
|
|
111
|
-
|
|
55
|
+
n([
|
|
56
|
+
a()
|
|
112
57
|
], e.prototype, "iconPosition");
|
|
113
|
-
|
|
114
|
-
|
|
58
|
+
n([
|
|
59
|
+
a()
|
|
115
60
|
], e.prototype, "text");
|
|
116
61
|
customElements.get("cre8-utility-nav-item") === void 0 && customElements.define("cre8-utility-nav-item", e);
|
|
117
62
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utility-nav-item.styles.d.ts","sourceRoot":"","sources":["../../../components/utility-nav-item/utility-nav-item.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"utility-nav-item.styles.d.ts","sourceRoot":"","sources":["../../../components/utility-nav-item/utility-nav-item.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,yBAA4uF,CAAC;AACzvF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens_blue.module.d.ts","sourceRoot":"","sources":["../../../../../design-tokens/brands/blue/css/tokens_blue.module.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"tokens_blue.module.d.ts","sourceRoot":"","sources":["../../../../../design-tokens/brands/blue/css/tokens_blue.module.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,IAAI,yBA6tBT,CAAC;AAEF,eAAe,IAAI,CAAC"}
|