@tmorrow/cre8-wc 1.0.26 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/cdn/cre8-wc.esm.js +9082 -15604
  2. package/cdn/cre8-wc.esm.js.map +1 -1
  3. package/cdn/cre8-wc.min.js +1231 -8308
  4. package/cdn/cre8-wc.min.js.map +1 -1
  5. package/lib/cdn-entry.d.ts +20 -2
  6. package/lib/cdn-entry.d.ts.map +1 -1
  7. package/lib/components/accordion/accordion.js +18 -64
  8. package/lib/components/accordion/accordion.styles.d.ts.map +1 -1
  9. package/lib/components/accordion-item/accordion-item.js +35 -238
  10. package/lib/components/accordion-item/accordion-item.styles.d.ts.map +1 -1
  11. package/lib/components/alert/alert.js +56 -221
  12. package/lib/components/alert/alert.styles.d.ts.map +1 -1
  13. package/lib/components/badge/badge.js +33 -164
  14. package/lib/components/badge/badge.styles.d.ts.map +1 -1
  15. package/lib/components/band/band.js +11 -261
  16. package/lib/components/band/band.styles.d.ts.map +1 -1
  17. package/lib/components/breadcrumbs/breadcrumbs.js +14 -33
  18. package/lib/components/breadcrumbs/breadcrumbs.styles.d.ts.map +1 -1
  19. package/lib/components/breadcrumbs-item/breadcrumbs-item.js +10 -45
  20. package/lib/components/breadcrumbs-item/breadcrumbs-item.styles.d.ts.map +1 -1
  21. package/lib/components/button/button.js +14 -14
  22. package/lib/components/button-group/button-group.js +10 -261
  23. package/lib/components/button-group/button-group.styles.d.ts.map +1 -1
  24. package/lib/components/card/card.js +17 -130
  25. package/lib/components/card/card.styles.d.ts.map +1 -1
  26. package/lib/components/chart/chart.js +137 -223
  27. package/lib/components/chart/chart.styles.d.ts.map +1 -1
  28. package/lib/components/checkbox-field/checkbox-field.js +26 -59
  29. package/lib/components/checkbox-field/checkbox-field.styles.d.ts.map +1 -1
  30. package/lib/components/checkbox-field-item/checkbox-field-item.js +38 -205
  31. package/lib/components/checkbox-field-item/checkbox-field-item.styles.d.ts.map +1 -1
  32. package/lib/components/danger-button/danger-button.js +53 -582
  33. package/lib/components/danger-button/danger-button.styles.d.ts.map +1 -1
  34. package/lib/components/date-picker/calendar/calendar.styles.d.ts.map +1 -1
  35. package/lib/components/date-picker/calendar-month-modal/calendar-month-modal.styles.d.ts.map +1 -1
  36. package/lib/components/date-picker/calendar-navigation/calendar-navigation.styles.d.ts.map +1 -1
  37. package/lib/components/date-picker/calendar-year-modal/calendar-year-modal.styles.d.ts.map +1 -1
  38. package/lib/components/date-picker/date-picker.js +262 -499
  39. package/lib/components/date-picker/date-picker.styles.d.ts.map +1 -1
  40. package/lib/components/divider/divider.js +20 -61
  41. package/lib/components/divider/divider.styles.d.ts.map +1 -1
  42. package/lib/components/dropdown/dropdown.js +34 -107
  43. package/lib/components/dropdown/dropdown.styles.d.ts.map +1 -1
  44. package/lib/components/dropdown-item/dropdown-item.js +18 -49
  45. package/lib/components/dropdown-item/dropdown-item.styles.d.ts.map +1 -1
  46. package/lib/components/feature/feature.js +19 -81
  47. package/lib/components/feature/feature.styles.d.ts.map +1 -1
  48. package/lib/components/field/field.js +12 -146
  49. package/lib/components/field/field.styles.d.ts.map +1 -1
  50. package/lib/components/field-note/field-note.js +22 -66
  51. package/lib/components/field-note/field-note.styles.d.ts.map +1 -1
  52. package/lib/components/footer/footer.js +10 -29
  53. package/lib/components/footer/footer.styles.d.ts.map +1 -1
  54. package/lib/components/global-nav/global-nav.js +20 -43
  55. package/lib/components/global-nav/global-nav.styles.d.ts.map +1 -1
  56. package/lib/components/global-nav-item/global-nav-item.js +26 -105
  57. package/lib/components/global-nav-item/global-nav-item.styles.d.ts.map +1 -1
  58. package/lib/components/grid/grid.js +15 -337
  59. package/lib/components/grid/grid.styles.d.ts.map +1 -1
  60. package/lib/components/grid-item/grid-item.js +7 -15
  61. package/lib/components/grid-item/grid-item.styles.d.ts.map +1 -1
  62. package/lib/components/header/header.js +17 -80
  63. package/lib/components/header/header.styles.d.ts.map +1 -1
  64. package/lib/components/heading/heading.js +16 -153
  65. package/lib/components/heading/heading.styles.d.ts.map +1 -1
  66. package/lib/components/hero/hero.js +17 -149
  67. package/lib/components/hero/hero.styles.d.ts.map +1 -1
  68. package/lib/components/icon/icon.js +1 -1
  69. package/lib/components/icon/icon.styles.d.ts.map +1 -1
  70. package/lib/components/inline-alert/inline-alert.js +53 -214
  71. package/lib/components/inline-alert/inline-alert.styles.d.ts.map +1 -1
  72. package/lib/components/layout/layout.js +20 -53
  73. package/lib/components/layout/layout.styles.d.ts.map +1 -1
  74. package/lib/components/layout-container/layout-container.js +20 -43
  75. package/lib/components/layout-container/layout-container.styles.d.ts.map +1 -1
  76. package/lib/components/layout-section/layout-section.js +20 -29
  77. package/lib/components/layout-section/layout-section.styles.d.ts.map +1 -1
  78. package/lib/components/linelength-container/linelength-container.js +7 -15
  79. package/lib/components/linelength-container/linelength-container.styles.d.ts.map +1 -1
  80. package/lib/components/link/link.js +33 -228
  81. package/lib/components/link/link.styles.d.ts.map +1 -1
  82. package/lib/components/link-list/link-list.js +23 -129
  83. package/lib/components/link-list/link-list.styles.d.ts.map +1 -1
  84. package/lib/components/link-list-item/link-list-item.js +19 -80
  85. package/lib/components/link-list-item/link-list-item.styles.d.ts.map +1 -1
  86. package/lib/components/list/list.js +17 -67
  87. package/lib/components/list/list.styles.d.ts.map +1 -1
  88. package/lib/components/list-item/list-item.js +11 -16
  89. package/lib/components/list-item/list-item.styles.d.ts.map +1 -1
  90. package/lib/components/loading-spinner/loading-spinner.js +13 -157
  91. package/lib/components/loading-spinner/loading-spinner.styles.d.ts.map +1 -1
  92. package/lib/components/logo/logo.js +20 -30
  93. package/lib/components/logo/logo.styles.d.ts.map +1 -1
  94. package/lib/components/main/main.js +18 -42
  95. package/lib/components/main/main.styles.d.ts.map +1 -1
  96. package/lib/components/modal/modal.js +50 -215
  97. package/lib/components/modal/modal.styles.d.ts.map +1 -1
  98. package/lib/components/multi-select/multi-select.js +71 -532
  99. package/lib/components/multi-select/multi-select.styles.d.ts.map +1 -1
  100. package/lib/components/nav-container/nav-container.js +5 -40
  101. package/lib/components/nav-container/nav-container.styles.d.ts.map +1 -1
  102. package/lib/components/page-header/page-header.js +19 -54
  103. package/lib/components/page-header/page-header.styles.d.ts.map +1 -1
  104. package/lib/components/pagination/page-counter/page-counter.styles.d.ts.map +1 -1
  105. package/lib/components/pagination/pagination.js +102 -183
  106. package/lib/components/pagination/pagination.styles.d.ts.map +1 -1
  107. package/lib/components/percent-bar/percent-bar.js +22 -50
  108. package/lib/components/percent-bar/percent-bar.styles.d.ts.map +1 -1
  109. package/lib/components/popover/popover.js +51 -220
  110. package/lib/components/popover/popover.styles.d.ts.map +1 -1
  111. package/lib/components/primary-nav/primary-nav.js +17 -51
  112. package/lib/components/primary-nav/primary-nav.styles.d.ts.map +1 -1
  113. package/lib/components/primary-nav-item/primary-nav-item.js +24 -191
  114. package/lib/components/primary-nav-item/primary-nav-item.styles.d.ts.map +1 -1
  115. package/lib/components/progress-meter/progress-meter.js +23 -127
  116. package/lib/components/progress-meter/progress-meter.styles.d.ts.map +1 -1
  117. package/lib/components/progress-steps/progress-steps.styles.d.ts.map +1 -1
  118. package/lib/components/progress-steps-item/progress-steps-item.js +27 -118
  119. package/lib/components/progress-steps-item/progress-steps-item.styles.d.ts.map +1 -1
  120. package/lib/components/radio-field/radio-field.js +28 -64
  121. package/lib/components/radio-field/radio-field.styles.d.ts.map +1 -1
  122. package/lib/components/radio-field-item/radio-field-item.js +54 -189
  123. package/lib/components/radio-field-item/radio-field-item.styles.d.ts.map +1 -1
  124. package/lib/components/remove-tag/remove-tag.js +36 -129
  125. package/lib/components/remove-tag/remove-tag.styles.d.ts.map +1 -1
  126. package/lib/components/section/section.js +19 -50
  127. package/lib/components/section/section.styles.d.ts.map +1 -1
  128. package/lib/components/select/select.js +43 -416
  129. package/lib/components/select/select.styles.d.ts.map +1 -1
  130. package/lib/components/select-tile/select-tile.js +18 -442
  131. package/lib/components/select-tile/select-tile.styles.d.ts.map +1 -1
  132. package/lib/components/select-tile-list/select-tile-list.js +24 -62
  133. package/lib/components/select-tile-list/select-tile-list.styles.d.ts.map +1 -1
  134. package/lib/components/skeleton-loader/skeleton-loader.js +19 -73
  135. package/lib/components/skeleton-loader/skeleton-loader.styles.d.ts.map +1 -1
  136. package/lib/components/split-button/split-button.js +21 -37
  137. package/lib/components/split-button/split-button.styles.d.ts.map +1 -1
  138. package/lib/components/submenu/submenu.js +8 -18
  139. package/lib/components/submenu/submenu.styles.d.ts.map +1 -1
  140. package/lib/components/submenu-item/submenu-item.js +21 -42
  141. package/lib/components/submenu-item/submenu-item.styles.d.ts.map +1 -1
  142. package/lib/components/tab/tab.js +17 -100
  143. package/lib/components/tab/tab.styles.d.ts.map +1 -1
  144. package/lib/components/tab-panel/tab-panel.js +18 -52
  145. package/lib/components/tab-panel/tab-panel.styles.d.ts.map +1 -1
  146. package/lib/components/table/table.js +21 -73
  147. package/lib/components/table/table.styles.d.ts.map +1 -1
  148. package/lib/components/table-body/table-body.js +12 -24
  149. package/lib/components/table-body/table-body.styles.d.ts.map +1 -1
  150. package/lib/components/table-cell/table-cell.js +29 -69
  151. package/lib/components/table-cell/table-cell.styles.d.ts.map +1 -1
  152. package/lib/components/table-header/table-header.js +8 -39
  153. package/lib/components/table-header/table-header.styles.d.ts.map +1 -1
  154. package/lib/components/table-header-cell/table-header-cell.js +18 -37
  155. package/lib/components/table-header-cell/table-header-cell.styles.d.ts.map +1 -1
  156. package/lib/components/table-object/table-object.js +13 -32
  157. package/lib/components/table-object/table-object.styles.d.ts.map +1 -1
  158. package/lib/components/table-row/table-row.js +33 -139
  159. package/lib/components/table-row/table-row.styles.d.ts.map +1 -1
  160. package/lib/components/tabs/tabs.js +24 -339
  161. package/lib/components/tabs/tabs.styles.d.ts.map +1 -1
  162. package/lib/components/tag/tag.js +44 -159
  163. package/lib/components/tag/tag.styles.d.ts.map +1 -1
  164. package/lib/components/tag-list/tag-list.js +20 -51
  165. package/lib/components/tag-list/tag-list.styles.d.ts.map +1 -1
  166. package/lib/components/tertiary-nav/tertiary-nav.js +21 -54
  167. package/lib/components/tertiary-nav/tertiary-nav.styles.d.ts.map +1 -1
  168. package/lib/components/tertiary-nav-item/tertiary-nav-item.js +18 -68
  169. package/lib/components/tertiary-nav-item/tertiary-nav-item.styles.d.ts.map +1 -1
  170. package/lib/components/text-link/text-link.js +20 -85
  171. package/lib/components/text-link/text-link.styles.d.ts.map +1 -1
  172. package/lib/components/text-passage/text-passage-light-dom.styles.d.ts.map +1 -1
  173. package/lib/components/text-passage/text-passage.js +17 -189
  174. package/lib/components/text-passage/text-passage.styles.d.ts.map +1 -1
  175. package/lib/components/tooltip/tooltip.js +57 -248
  176. package/lib/components/tooltip/tooltip.styles.d.ts.map +1 -1
  177. package/lib/components/utility-nav/utility-nav.js +23 -56
  178. package/lib/components/utility-nav/utility-nav.styles.d.ts.map +1 -1
  179. package/lib/components/utility-nav-item/utility-nav-item.js +28 -83
  180. package/lib/components/utility-nav-item/utility-nav-item.styles.d.ts.map +1 -1
  181. package/lib/design-tokens/brands/blue/css/tokens_blue.module.d.ts.map +1 -1
  182. package/lib/design-tokens/brands/bolt/tokens_bolt.theme.d.ts.map +1 -1
  183. package/lib/design-tokens/brands/cre8-a2ui/css/tokens_cre8-a2ui.module.d.ts +3 -0
  184. package/lib/design-tokens/brands/cre8-a2ui/css/tokens_cre8-a2ui.module.d.ts.map +1 -0
  185. package/lib/design-tokens/brands/cre8-legacy/css/tokens_cre8-legacy.module.d.ts.map +1 -1
  186. package/lib/design-tokens/brands/femmecubator/css/tokens_femmecubator2.module.d.ts.map +1 -1
  187. package/lib/design-tokens/brands/legacy/css/tokens_legacy.module.d.ts.map +1 -1
  188. package/lib/design-tokens/brands/marketing/css/tokens_marketing.module.d.ts.map +1 -1
  189. package/lib/design-tokens/brands/minimalist/css/tokens_minimalist.module.d.ts +2 -2
  190. package/lib/design-tokens/brands/minimalist/css/tokens_minimalist.module.d.ts.map +1 -1
  191. package/lib/design-tokens/brands/starbucks/tokens_starbucks.module.d.ts.map +1 -1
  192. package/lib/design-tokens/core/scss/theming/component.scss +5 -5
  193. package/lib/design-tokens/core/scss/theming/functions.scss +4 -0
  194. package/lib/design-tokens/core/scss/theming/spacing.scss +60 -60
  195. package/lib/design-tokens/core/scss/theming/variables.scss +11 -11
  196. package/lib/design-tokens/mixins/typography-usage.scss +277 -277
  197. package/lib/design-tokens/tokens_netflix.theme.d.ts.map +1 -1
  198. package/lib/{icon-DImqxDiW.js → icon-D22g8aWB.js} +35 -138
  199. package/lib/index.js +1 -1
  200. package/package.json +7 -6
@@ -1,150 +1,16 @@
1
- import { css as f, html as l, nothing as h } from "lit";
1
+ import { css as f, html as l, nothing as u } from "lit";
2
2
  import { ifDefined as i } from "lit-html/directives/if-defined.js";
3
3
  import { property as t, query as y } from "lit/decorators.js";
4
4
  import { nanoid as d } from "nanoid";
5
- import { Cre8FormElement as b } from "../cre8-form-element.js";
5
+ import { Cre8FormElement as m } from "../cre8-form-element.js";
6
6
  import "../field-note/field-note.js";
7
- const v = f`
8
- :host {
9
- display: block;
10
- }
11
-
12
- /**
13
- * Field Label
14
- */
15
- .cre8-c-field__label {
16
- font-family: var(--cre8-typography-label-small-font-family);
17
- font-size: var(--cre8-typography-label-small-font-size);
18
- font-weight: var(--cre8-typography-label-small-font-weight);
19
- line-height: var(--cre8-typography-label-small-line-height);
20
- text-decoration: var(--cre8-typography-label-small-text-decoration);
21
- text-transform: var(--cre8-typography-label-small-text-transform);
22
- display: block;
23
- margin-bottom: calc(8px * 1);
24
- }
25
-
26
- /**
27
- * Field Body
28
- * 1) The div that contains the input and icons
29
- */
30
- .cre8-c-field__body {
31
- position: relative;
32
- }
33
-
34
- /**
35
- * Field Input
36
- * 1) The html5 input element
37
- */
38
- .cre8-c-field__input {
39
- /* Typography */
40
- font-family: var(--cre8-typography-body-default-font-family);
41
- font-size: var(--cre8-typography-body-default-font-size);
42
- font-weight: var(--cre8-typography-body-default-font-weight);
43
- line-height: var(--cre8-typography-body-default-line-height);
44
- text-decoration: var(--cre8-typography-body-default-text-decoration);
45
- text-transform: var(--cre8-typography-body-default-text-transform);
46
-
47
- /* Focus transparent base */
48
- outline: var(--cre8-border-width-focus) solid transparent;
49
- outline-offset: calc(8px * 0.25);
50
-
51
- /* Input styles */
52
- -webkit-appearance: none;
53
- width: 100%;
54
- border-width: var(--cre8-border-width-default);
55
- border-style: solid;
56
- border-color: var(--cre8-color-border-strong);
57
- border-radius: var(--cre8-border-radius-default);
58
- padding: calc(8px * 1.5) calc(8px * 1);
59
- color: var(--cre8-color-content-default);
60
- background-color: var(--cre8-color-bg-default);
61
- transition: outline-color var(--cre8-anim-fade-quick) var(--cre8-anim-ease), border-color var(--cre8-anim-fade-quick) var(--cre8-anim-ease), background-color var(--cre8-anim-fade-quick) var(--cre8-anim-ease), color var(--cre8-anim-fade-quick) var(--cre8-anim-ease);
62
- }
63
-
64
- /**
65
- * Hover, focus, active, and focus-visible styles for default input elements
66
- */
67
- .cre8-c-field__input:hover:not(:disabled),
68
- .cre8-c-field__input:focus:not(:disabled),
69
- .cre8-c-field__input:active:not(:disabled),
70
- .cre8-c-field__input:focus-visible {
71
- outline: var(--cre8-border-width-focus) solid var(--cre8-color-border-active-outline);
72
- outline-offset: calc(8px * 0.25);
73
- }
74
-
75
- /**
76
- * Error state focus
77
- */
78
- .cre8-is-error .cre8-c-field__input:hover:not(:disabled),
79
- .cre8-is-error .cre8-c-field__input:focus:not(:disabled),
80
- .cre8-is-error .cre8-c-field__input:active:not(:disabled),
81
- .cre8-is-error .cre8-c-field__input:focus-visible {
82
- outline-color: var(--cre8-color-border-error);
83
- }
84
-
85
- /**
86
- * Success state focus
87
- */
88
- .cre8-is-success .cre8-c-field__input:hover:not(:disabled),
89
- .cre8-is-success .cre8-c-field__input:focus:not(:disabled),
90
- .cre8-is-success .cre8-c-field__input:active:not(:disabled),
91
- .cre8-is-success .cre8-c-field__input:focus-visible {
92
- outline-color: var(--cre8-color-border-success);
93
- }
94
-
95
- /**
96
- * Disabled styles for default input elements
97
- */
98
- .cre8-c-field__input:disabled {
99
- background-color: var(--cre8-color-bg-disabled);
100
- border-color: var(--cre8-color-border-disabled);
101
- color: var(--cre8-color-content-disabled);
102
- cursor: not-allowed;
103
- }
104
-
105
- /**
106
- * Disabled placeholder text colors
107
- */
108
- .cre8-c-field__input:disabled::placeholder {
109
- color: var(--cre8-color-content-disabled);
110
- }
111
-
112
- /**
113
- * Placeholder styles for default input elements
114
- */
115
- .cre8-c-field__input::placeholder {
116
- color: var(--cre8-color-content-subtle);
117
- }
118
-
119
- /**
120
- * Error state for default input elements
121
- */
122
- .cre8-is-error .cre8-c-field__input {
123
- border-color: var(--cre8-color-border-error);
124
- }
125
-
126
- /**
127
- * Success state for default input elements
128
- */
129
- .cre8-is-success .cre8-c-field__input {
130
- border-color: var(--cre8-color-border-success);
131
- }
132
-
133
- /**
134
- * Readonly input styles
135
- */
136
- .cre8-c-field__input:read-only {
137
- background-color: var(--cre8-color-bg-disabled);
138
- border-color: var(--cre8-color-border-disabled);
139
- cursor: default;
140
- }
141
- `;
142
- var m = Object.defineProperty, r = (p, o, a, _) => {
143
- for (var s = void 0, c = p.length - 1, u; c >= 0; c--)
144
- (u = p[c]) && (s = u(o, a, s) || s);
145
- return s && m(o, a, s), s;
7
+ const b = f`*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{display:block}.cre8-c-field__label{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:block;margin-bottom:0.5rem}.cre8-c-field__body{position:relative}.cre8-c-field__input{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);outline:var(--cre8-border-width-focus) solid rgba(0,0,0,0);outline-offset:0.125rem;-webkit-appearance:none;width:100%;border-width:var(--cre8-border-width-default);border-style:solid;border-color:var(--cre8-color-border-strong);border-radius:var(--cre8-border-radius-default);padding:0.75rem 0.5rem;color:var(--cre8-color-content-default);background-color:var(--cre8-color-bg-default);transition:outline-color var(--cre8-anim-fade-quick) var(--cre8-anim-ease),border-color var(--cre8-anim-fade-quick) var(--cre8-anim-ease),background-color var(--cre8-anim-fade-quick) var(--cre8-anim-ease),color var(--cre8-anim-fade-quick) var(--cre8-anim-ease)}.cre8-c-field__input:hover:not(:disabled),.cre8-c-field__input:focus:not(:disabled),.cre8-c-field__input:active:not(:disabled),.cre8-c-field__input:focus-visible{outline:var(--cre8-border-width-focus) solid var(--cre8-color-border-active-outline);outline-offset:0.125rem}.cre8-is-error .cre8-c-field__input:hover:not(:disabled),.cre8-is-error .cre8-c-field__input:focus:not(:disabled),.cre8-is-error .cre8-c-field__input:active:not(:disabled),.cre8-is-error .cre8-c-field__input:focus-visible{outline-color:var(--cre8-color-border-error)}.cre8-is-success .cre8-c-field__input:hover:not(:disabled),.cre8-is-success .cre8-c-field__input:focus:not(:disabled),.cre8-is-success .cre8-c-field__input:active:not(:disabled),.cre8-is-success .cre8-c-field__input:focus-visible{outline-color:var(--cre8-color-border-success)}.cre8-c-field__input:disabled{background-color:var(--cre8-color-bg-disabled);border-color:var(--cre8-color-border-disabled);color:var(--cre8-color-content-disabled);cursor:not-allowed}.cre8-c-field__input:disabled::placeholder{color:var(--cre8-color-content-disabled)}.cre8-c-field__input::placeholder{color:var(--cre8-color-content-subtle)}.cre8-is-error .cre8-c-field__input{border-color:var(--cre8-color-border-error)}.cre8-is-success .cre8-c-field__input{border-color:var(--cre8-color-border-success)}.cre8-c-field__input:read-only{background-color:var(--cre8-color-bg-disabled);border-color:var(--cre8-color-border-disabled);cursor:default}`;
8
+ var v = Object.defineProperty, r = (p, o, s, g) => {
9
+ for (var a = void 0, c = p.length - 1, h; c >= 0; c--)
10
+ (h = p[c]) && (a = h(o, s, a) || a);
11
+ return a && v(o, s, a), a;
146
12
  };
147
- const n = class n extends b {
13
+ const n = class n extends m {
148
14
  constructor() {
149
15
  super(...arguments), this.type = "text", this.label = "Label", this.ariaLive = "polite", this.errorText = "Error", this.successText = "Success";
150
16
  }
@@ -178,8 +44,8 @@ const n = class n extends b {
178
44
  * 2) Set the internal form value of the input to the updated value
179
45
  */
180
46
  _handleOnInput(o) {
181
- const a = o.target.value;
182
- this.value = a, this._internals.setFormValue(this.value);
47
+ const s = o.target.value;
48
+ this.value = s, this._internals.setFormValue(this.value);
183
49
  }
184
50
  /**
185
51
  * Render the success or error field notes
@@ -233,13 +99,13 @@ const n = class n extends b {
233
99
  </div>
234
100
  ${this.fieldNote || this.slotNotEmpty("fieldNote") ? l`<cre8-field-note id=${this.ariaDescribedBy} class="cre8-c-field__field-note"
235
101
  ><slot name="fieldNote">${this.fieldNote}</slot></cre8-field-note
236
- >` : h}
102
+ >` : u}
237
103
  ${this.renderSuccessErrorFieldNote()}
238
104
  </div>
239
105
  `;
240
106
  }
241
107
  };
242
- n.styles = [v];
108
+ n.styles = [b];
243
109
  let e = n;
244
110
  r([
245
111
  t()
@@ -1 +1 @@
1
- {"version":3,"file":"field.styles.d.ts","sourceRoot":"","sources":["../../../components/field/field.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,yBAsIX,CAAC;AACF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"field.styles.d.ts","sourceRoot":"","sources":["../../../components/field/field.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,yBAA+qJ,CAAC;AAC5rJ,eAAe,MAAM,CAAC"}
@@ -1,59 +1,15 @@
1
- import { b as f } from "../../icon-DImqxDiW.js";
2
- import { s as p } from "../../Error-aYunUubM.js";
3
- import { css as m, html as c } from "lit";
4
- import { property as s } from "lit/decorators.js";
5
- import { Cre8Element as u } from "../cre8-element.js";
6
- const v = m`@import '../../design-tokens/core/scss/theming/component';
7
-
8
- :host {
9
- display: flex;
10
- }
11
-
12
- /**
13
- * Field Note
14
- * 1) Messaging associated with the form field usually located below the form field input
15
- */
16
- .cre8-c-field-note {
17
- display: flex;
18
- align-items: flex-start;
19
- gap: calc(8px * 0.5);
20
- color: var(--cre8-color-content-default);
21
- margin-top: calc(8px * 0.5);
22
- }
23
-
24
- .cre8-field-note-icon {
25
- margin-top: calc(8px * 0.5);
26
- height: calc(8px * 2);
27
- width: calc(8px * 2);
28
- }
29
-
30
- /**
31
- * Field Note Error State
32
- */
33
- .cre8-c-field-note.cre8-is-error {
34
- color: var(--cre8-color-content-error);
35
- }
36
-
37
- /**
38
- * Field Note Success State
39
- */
40
- .cre8-c-field-note.cre8-is-success {
41
- color: var(--cre8-color-content-success);
42
- }
43
-
44
- /**
45
- * Inverted field note
46
- */
47
- .cre8-c-field-note--inverted {
48
- color: var(--cre8-color-content-knockout);
49
- }
50
- `;
51
- var h = Object.defineProperty, i = (n, t, a, g) => {
52
- for (var e = void 0, o = n.length - 1, d; o >= 0; o--)
53
- (d = n[o]) && (e = d(t, a, e) || e);
54
- return e && h(t, a, e), e;
1
+ import { b as h } from "../../icon-D22g8aWB.js";
2
+ import { s as m } from "../../Error-aYunUubM.js";
3
+ import { css as p, html as s } from "lit";
4
+ import { property as o } from "lit/decorators.js";
5
+ import { Cre8Element as f } from "../cre8-element.js";
6
+ const x = p`*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{display:flex}.cre8-c-field-note{display:flex;align-items:flex-start;gap:0.25rem;color:var(--cre8-color-content-default);margin-top:0.25rem}.cre8-field-note-icon{margin-top:0.25rem;height:1rem;width:1rem}.cre8-c-field-note.cre8-is-error{color:var(--cre8-color-content-error)}.cre8-c-field-note.cre8-is-success{color:var(--cre8-color-content-success)}.cre8-c-field-note--inverted{color:var(--cre8-color-content-knockout)}`;
7
+ var g = Object.defineProperty, a = (l, t, n, u) => {
8
+ for (var e = void 0, i = l.length - 1, d; i >= 0; i--)
9
+ (d = l[i]) && (e = d(t, n, e) || e);
10
+ return e && g(t, n, e), e;
55
11
  };
56
- const l = class l extends u {
12
+ const c = class c extends f {
57
13
  /**
58
14
  * Check if there are success or error states and set "aria-live=polite"
59
15
  */
@@ -65,27 +21,27 @@ const l = class l extends u {
65
21
  "cre8-is-error": this.isError,
66
22
  "cre8-is-success": this.isSuccess
67
23
  });
68
- return c`
24
+ return s`
69
25
  <div
70
26
  aria-live="${this.fieldNoteAriaLive() ?? "off"}"
71
27
  class="${t}">
72
- ${this.isError === !0 ? c`<cre8-icon class="cre8-field-note-icon" svg='${p}' aria-hidden="true" ></cre8-icon>` : ""}
73
- ${this.isSuccess === !0 ? c`<cre8-icon class="cre8-field-note-icon" svg='${f}' aria-hidden="true"></cre8-icon>` : ""}
28
+ ${this.isError === !0 ? s`<cre8-icon class="cre8-field-note-icon" svg='${m}' aria-hidden="true" ></cre8-icon>` : ""}
29
+ ${this.isSuccess === !0 ? s`<cre8-icon class="cre8-field-note-icon" svg='${h}' aria-hidden="true"></cre8-icon>` : ""}
74
30
  <div><slot></slot></div>
75
31
  </div>
76
32
  `;
77
33
  }
78
34
  };
79
- l.styles = [v];
80
- let r = l;
81
- i([
82
- s({ type: Boolean, reflect: !0 })
35
+ c.styles = [x];
36
+ let r = c;
37
+ a([
38
+ o({ type: Boolean, reflect: !0 })
83
39
  ], r.prototype, "isError");
84
- i([
85
- s({ type: Boolean, reflect: !0 })
40
+ a([
41
+ o({ type: Boolean, reflect: !0 })
86
42
  ], r.prototype, "isSuccess");
87
- i([
88
- s()
43
+ a([
44
+ o()
89
45
  ], r.prototype, "iconName");
90
46
  customElements.get("cre8-field-note") === void 0 && customElements.define("cre8-field-note", r);
91
47
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"field-note.styles.d.ts","sourceRoot":"","sources":["../../../components/field-note/field-note.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,yBA4CX,CAAC;AACF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"field-note.styles.d.ts","sourceRoot":"","sources":["../../../components/field-note/field-note.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,yBAAyrE,CAAC;AACtsE,eAAe,MAAM,CAAC"}
@@ -1,30 +1,11 @@
1
- import { css as r, html as o } from "lit";
2
- import { Cre8Element as s } from "../cre8-element.js";
3
- const n = r`@import '../../design-tokens/core/scss/theming/component';
4
- @import '@cre8_dev/cre8-design-tokens/lib/web/layouts/breakpoints.scss';
5
-
6
- // #FOOTER
7
-
8
- /**
9
- * 1) Container used to house various Components and content for the global footer
10
- */
11
- .cre8-c-footer {
12
- @include cre8-typography-body-default();
13
- background: var(--cre8-color-bg-brand-xstrong);
14
- color: var(--cre8-color-content-knockout);
15
- padding-top: calc(8px * 5);
16
- padding-bottom: calc(8px * 6);
17
-
18
- @media all and (min-width:$cre8-breakpoint-lg) {
19
- padding-top: calc(8px * 6.875);
20
- }
21
- }
22
- `, e = class e extends s {
1
+ import { css as o, html as e } from "lit";
2
+ import { Cre8Element as i } from "../cre8-element.js";
3
+ const s = o`*,::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-footer{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);background:var(--cre8-color-bg-brand-xstrong);color:var(--cre8-color-content-knockout);padding-top:2.5rem;padding-bottom:3rem}@media all and (min-width: 960px){.cre8-c-footer{padding-top:3.4375rem}}`, r = class r extends i {
23
4
  render() {
24
- const c = this.componentClassNames("cre8-c-footer", {});
25
- return o`
26
- <footer class="${c}" role="contentinfo">
27
- ${this.slotNotEmpty("top") && o`<div class="cre8-c-footer__top">
5
+ const a = this.componentClassNames("cre8-c-footer", {});
6
+ return e`
7
+ <footer class="${a}" role="contentinfo">
8
+ ${this.slotNotEmpty("top") && e`<div class="cre8-c-footer__top">
28
9
  <cre8-layout-container>
29
10
  <slot name="top"></slot>
30
11
  </cre8-layout-container>
@@ -34,7 +15,7 @@ const n = r`@import '../../design-tokens/core/scss/theming/component';
34
15
  <slot></slot>
35
16
  </cre8-layout-container>
36
17
  </div>
37
- ${this.slotNotEmpty("bottom") && o`<div class="cre8-c-footer__bottom">
18
+ ${this.slotNotEmpty("bottom") && e`<div class="cre8-c-footer__bottom">
38
19
  <cre8-layout-container>
39
20
  <slot name="bottom"></slot>
40
21
  </cre8-layout-container>
@@ -43,8 +24,8 @@ const n = r`@import '../../design-tokens/core/scss/theming/component';
43
24
  `;
44
25
  }
45
26
  };
46
- e.styles = [n];
47
- let t = e;
27
+ r.styles = [s];
28
+ let t = r;
48
29
  customElements.get("cre8-footer") === void 0 && customElements.define("cre8-footer", t);
49
30
  export {
50
31
  t as Cre8Footer,
@@ -1 +1 @@
1
- {"version":3,"file":"footer.styles.d.ts","sourceRoot":"","sources":["../../../components/footer/footer.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,yBAmBX,CAAC;AACF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"footer.styles.d.ts","sourceRoot":"","sources":["../../../components/footer/footer.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,yBAAu1E,CAAC;AACp2E,eAAe,MAAM,CAAC"}
@@ -1,46 +1,23 @@
1
- import { css as v, html as d } from "lit";
2
- import { property as s } from "lit/decorators.js";
3
- import { Cre8Element as m } from "../cre8-element.js";
4
- const p = v`@import '../../design-tokens/core/scss/theming/component';
5
-
6
- // #GLOBAL NAV
7
-
8
- /**
9
- * Inverted Global nav
10
- */
11
- .cre8-c-global-nav--inverted {
12
- --cre8-global-nav-link-color: var(--cre8-color-content-knockout);
13
- }
14
-
15
- /**
16
- * Global nav list
17
- * 1) Stack on small screens within the toggleable menu but place side by side on large screens
18
- */
19
- .cre8-c-global-nav__list {
20
- display: flex;
21
- margin: 0;
22
- padding: 0;
23
- width: 100%;
24
- list-style: none;
25
- overflow: auto;
26
- }
27
- `;
28
- var b = Object.defineProperty, a = (r, l, i, g) => {
29
- for (var e = void 0, o = r.length - 1, c; o >= 0; o--)
30
- (c = r[o]) && (e = c(l, i, e) || e);
31
- return e && b(l, i, e), e;
1
+ import { css as p, html as h } from "lit";
2
+ import { property as i } from "lit/decorators.js";
3
+ import { Cre8Element as c } from "../cre8-element.js";
4
+ const m = 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-global-nav--inverted{--cre8-global-nav-link-color: var(--cre8-color-content-knockout)}.cre8-c-global-nav__list{display:flex;margin:0;padding:0;width:100%;list-style:none;overflow:auto}`;
5
+ var f = Object.defineProperty, s = (n, r, o, g) => {
6
+ for (var e = void 0, a = n.length - 1, d; a >= 0; a--)
7
+ (d = n[a]) && (e = d(r, o, e) || e);
8
+ return e && f(r, o, e), e;
32
9
  };
33
- const n = class n extends m {
10
+ const l = class l extends c {
34
11
  constructor() {
35
12
  super(...arguments), this.navAriaLabel = "global";
36
13
  }
37
14
  render() {
38
- const l = this.componentClassNames("cre8-c-global-nav", {
15
+ const r = this.componentClassNames("cre8-c-global-nav", {
39
16
  "cre8-c-global-nav--side-by-side": this.behavior === "side-by-side",
40
17
  "cre8-c-global-nav--inverted": this.inverted === !0
41
18
  });
42
- return d`
43
- <nav aria-label="${this.navAriaLabel}" class="${l}">
19
+ return h`
20
+ <nav aria-label="${this.navAriaLabel}" class="${r}">
44
21
  <ul class="cre8-c-global-nav__list">
45
22
  <slot></slot>
46
23
  </ul>
@@ -48,16 +25,16 @@ const n = class n extends m {
48
25
  `;
49
26
  }
50
27
  };
51
- n.styles = [p];
52
- let t = n;
53
- a([
54
- s({ type: Boolean, reflect: !0 })
28
+ l.styles = [m];
29
+ let t = l;
30
+ s([
31
+ i({ type: Boolean, reflect: !0 })
55
32
  ], t.prototype, "inverted");
56
- a([
57
- s()
33
+ s([
34
+ i()
58
35
  ], t.prototype, "behavior");
59
- a([
60
- s()
36
+ s([
37
+ i()
61
38
  ], t.prototype, "navAriaLabel");
62
39
  customElements.get("cre8-global-nav") === void 0 && customElements.define("cre8-global-nav", t);
63
40
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"global-nav.styles.d.ts","sourceRoot":"","sources":["../../../components/global-nav/global-nav.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,yBAuBX,CAAC;AACF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"global-nav.styles.d.ts","sourceRoot":"","sources":["../../../components/global-nav/global-nav.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,yBAAg9D,CAAC;AAC79D,eAAe,MAAM,CAAC"}
@@ -1,93 +1,14 @@
1
- import { css as h, html as r } from "lit";
2
- import { ifDefined as v } from "lit-html/directives/if-defined.js";
3
- import { property as n, state as p } from "lit/decorators.js";
4
- import { Cre8Element as u } from "../cre8-element.js";
5
- const f = h`@import '../../design-tokens/core/scss/theming/component';
6
-
7
- // #PRIMARY NAV ITEM
8
-
9
- /**
10
- * Actual primary nav list item
11
- */
12
-
13
- /**
14
- * Content within the primary nav item
15
- */
16
- .cre8-c-global-nav__item-content {
17
- display: flex;
18
- align-items: baseline;
19
- }
20
-
21
- /**
22
- * Primary navigation link
23
- * 1) Used to remove any sort of default button styles when a button tag is rendered
24
- */
25
- .cre8-c-global-nav__link {
26
- @include cre8-typography-body-small;
27
- display: flex;
28
- align-items: center;
29
- appearance: none; /* 1 */
30
- background: transparent; /* 1 */
31
- border: none;
32
- //border: 1px solid var(--cre8-color-header-menu-border-default); /* 1 */
33
- white-space: nowrap;
34
- width: 100%;
35
- margin: 0;
36
- padding: calc(8px * 1) calc(8px * 2);
37
- color: var(--cre8-global-nav-link-color, var(--cre8-color-content-subtle));
38
- text-decoration: none;
39
- transition: all var(--cre8-anim-fade-quick) var(--cre8-anim-ease);
40
- cursor: pointer;
41
-
42
- &:hover,
43
- &:focus-visible {
44
- //border-color: var(--cre8-color-header-menu-border-hover);
45
- background: var(--cre8-color-header-menu-bg-hover);
46
- color: var(--cre8-color-header-menu-content-hover);
47
- }
48
-
49
- &:active {
50
- border-color: var(--cre8-color-header-menu-border-pressed);
51
- background: var(--cre8-color-header-menu-bg-pressed);
52
- color: var(--cre8-color-header-menu-content-pressed);
53
- }
54
- }
55
-
56
- /**
57
- * Icon within primary navigation item
58
- * 1) TODO: Figure out how to pass down calc(8px * 1.5) instead of static rem value
59
- */
60
- cre8-icon-legacy {
61
- --cre8-icon-height: #{calc(8px * 1)}; /* 1 */
62
- --cre8-icon-width: #{calc(8px * 1)}; /* 1 */
63
- margin-left: auto;
64
- transition: transform var(--cre8-anim-fade-quick) var(--cre8-anim-ease);
65
-
66
- /**
67
- * Icon within active primary nav item
68
- * 1) Rotate the icon to show that the dropdown is open
69
- */
70
- .cre8-c-global-nav__item.cre8-is-active & {
71
- transform: rotate(-180deg); /* 1 */
72
- }
73
-
74
- @media all and (min-width:$cre8-breakpoint-lg) {
75
- margin-left: calc(8px * 1);
76
- }
77
- }
78
-
79
- .cre8-c-global-nav__item-after {
80
- --cre8-icon-height: #{calc(8px * 1.5)};
81
- --cre8-icon-width: #{calc(8px * 1.5)};
82
- margin-left: calc(8px * 1);
83
- }
84
- `;
85
- var g = Object.defineProperty, a = (d, e, t, c) => {
86
- for (var o = void 0, s = d.length - 1, m; s >= 0; s--)
87
- (m = d[s]) && (o = m(e, t, o) || o);
88
- return o && g(e, t, o), o;
1
+ import { css as m, html as a } from "lit";
2
+ import { ifDefined as p } from "lit-html/directives/if-defined.js";
3
+ import { property as n, state as f } from "lit/decorators.js";
4
+ import { Cre8Element as g } from "../cre8-element.js";
5
+ const v = 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-global-nav__item-content{display:flex;align-items:baseline}.cre8-c-global-nav__link{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:flex;align-items:center;appearance:none;background:rgba(0,0,0,0);border:none;white-space:nowrap;width:100%;margin:0;padding:0.5rem 1rem;color:var(--cre8-global-nav-link-color, var(--cre8-color-content-subtle));text-decoration:none;transition:all var(--cre8-anim-fade-quick) var(--cre8-anim-ease);cursor:pointer}.cre8-c-global-nav__link:hover,.cre8-c-global-nav__link:focus-visible{background:var(--cre8-color-header-menu-bg-hover);color:var(--cre8-color-header-menu-content-hover)}.cre8-c-global-nav__link:active{border-color:var(--cre8-color-header-menu-border-pressed);background:var(--cre8-color-header-menu-bg-pressed);color:var(--cre8-color-header-menu-content-pressed)}cre8-icon-legacy{--cre8-icon-height: 0.5rem;--cre8-icon-width: 0.5rem;margin-left:auto;transition:transform var(--cre8-anim-fade-quick) var(--cre8-anim-ease)}.cre8-c-global-nav__item.cre8-is-active cre8-icon-legacy{transform:rotate(-180deg)}@media all and (min-width: 960px){cre8-icon-legacy{margin-left:0.5rem}}.cre8-c-global-nav__item-after{--cre8-icon-height: 0.75rem;--cre8-icon-width: 0.75rem;margin-left:0.5rem}`;
6
+ var u = Object.defineProperty, o = (d, e, t, s) => {
7
+ for (var r = void 0, l = d.length - 1, h; l >= 0; l--)
8
+ (h = d[l]) && (r = h(e, t, r) || r);
9
+ return r && u(e, t, r), r;
89
10
  };
90
- const l = class l extends u {
11
+ const c = class c extends g {
91
12
  /**
92
13
  * Initialize functions
93
14
  */
@@ -135,8 +56,8 @@ const l = class l extends u {
135
56
  * 2) Toggle active state of element selected
136
57
  */
137
58
  _clickHandler(e) {
138
- e.preventDefault(), this.parentNode && this.parentNode.querySelectorAll("cre8-global-nav-item").forEach((c) => {
139
- c !== this && (c.isActive = !1);
59
+ e.preventDefault(), this.parentNode && this.parentNode.querySelectorAll("cre8-global-nav-item").forEach((s) => {
60
+ s !== this && (s.isActive = !1);
140
61
  }), this.isActive = !this.isActive;
141
62
  }
142
63
  closePanel() {
@@ -158,10 +79,10 @@ const l = class l extends u {
158
79
  "cre8-is-active": this.isActive === !0,
159
80
  "cre8-c-global-nav__item--megamenu": this.megaMenu === !0
160
81
  });
161
- return this.megaMenu ? r`
82
+ return this.megaMenu ? a`
162
83
  <li class="${e}" @keydown=${this._handleOnKeyDown}>
163
84
  <div class="cre8-c-global-nav__item-content">
164
- ${this.slotNotEmpty("itemBefore") && r`
85
+ ${this.slotNotEmpty("itemBefore") && a`
165
86
  <div class="cre8-c-global-nav__item-before">
166
87
  <slot name="itemBefore"></slot>
167
88
  </div>`}
@@ -171,20 +92,20 @@ const l = class l extends u {
171
92
  aria-expanded=${this.isActive === !0}
172
93
  >
173
94
  ${this.text}
174
- <cre8-icon-legacy aria-hidden="true" name="${v(this.iconName)}"></cre8-icon-legacy>
95
+ <cre8-icon-legacy aria-hidden="true" name="${p(this.iconName)}"></cre8-icon-legacy>
175
96
  </button>
176
97
  </div>
177
98
  </li>
178
- ` : r`
99
+ ` : a`
179
100
  <li class="${e}">
180
101
  <div class="cre8-c-global-nav__item-content">
181
102
  <a class="cre8-c-global-nav__link" href="${this.href}">
182
- ${this.slotNotEmpty("itemBefore") && r`
103
+ ${this.slotNotEmpty("itemBefore") && a`
183
104
  <div class="cre8-c-global-nav__item-before">
184
105
  <slot name="itemBefore"></slot>
185
106
  </div>`}
186
107
  ${this.text}
187
- ${this.slotNotEmpty("itemAfter") && r`
108
+ ${this.slotNotEmpty("itemAfter") && a`
188
109
  <div class="cre8-c-global-nav__item-after">
189
110
  <slot name="itemAfter"></slot>
190
111
  </div>`}
@@ -194,22 +115,22 @@ const l = class l extends u {
194
115
  `;
195
116
  }
196
117
  };
197
- l.styles = [f];
198
- let i = l;
199
- a([
118
+ c.styles = [v];
119
+ let i = c;
120
+ o([
200
121
  n()
201
122
  ], i.prototype, "text");
202
- a([
123
+ o([
203
124
  n()
204
125
  ], i.prototype, "href");
205
- a([
126
+ o([
206
127
  n()
207
128
  ], i.prototype, "iconName");
208
- a([
129
+ o([
209
130
  n({ type: Boolean, reflect: !0 })
210
131
  ], i.prototype, "megaMenu");
211
- a([
212
- p()
132
+ o([
133
+ f()
213
134
  ], i.prototype, "isActive");
214
135
  customElements.get("cre8-global-nav-item") === void 0 && customElements.define("cre8-global-nav-item", i);
215
136
  export {