@rededor/site-front-end-lib 20.0.39 → 20.1.0-alpha.0

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 (162) hide show
  1. package/components/algolia-search/index.d.ts +1 -1
  2. package/components/filters/filter-generic/index.d.ts +3 -3
  3. package/components/filters/filter-planos-convenios/index.d.ts +3 -2
  4. package/components/footer/index.d.ts +1 -1
  5. package/components/header/index.d.ts +1 -1
  6. package/core/index.d.ts +3 -4
  7. package/fesm2022/rededor-site-front-end-lib-components-algolia-search.mjs +4 -4
  8. package/fesm2022/rededor-site-front-end-lib-components-algolia-search.mjs.map +1 -1
  9. package/fesm2022/rededor-site-front-end-lib-components-banner.mjs +5 -5
  10. package/fesm2022/rededor-site-front-end-lib-components-banner.mjs.map +1 -1
  11. package/fesm2022/rededor-site-front-end-lib-components-breadcrumbs.mjs +2 -2
  12. package/fesm2022/rededor-site-front-end-lib-components-breadcrumbs.mjs.map +1 -1
  13. package/fesm2022/rededor-site-front-end-lib-components-cards.mjs +6 -6
  14. package/fesm2022/rededor-site-front-end-lib-components-cards.mjs.map +1 -1
  15. package/fesm2022/rededor-site-front-end-lib-components-carousels.mjs +2 -2
  16. package/fesm2022/rededor-site-front-end-lib-components-carousels.mjs.map +1 -1
  17. package/fesm2022/rededor-site-front-end-lib-components-cta-wrapper.mjs +2 -2
  18. package/fesm2022/rededor-site-front-end-lib-components-cta-wrapper.mjs.map +1 -1
  19. package/fesm2022/rededor-site-front-end-lib-components-error.mjs +6 -6
  20. package/fesm2022/rededor-site-front-end-lib-components-error.mjs.map +1 -1
  21. package/fesm2022/rededor-site-front-end-lib-components-filter-letter-and-terms.mjs +1 -1
  22. package/fesm2022/rededor-site-front-end-lib-components-filter-letter-and-terms.mjs.map +1 -1
  23. package/fesm2022/rededor-site-front-end-lib-components-filters-filter-generic.mjs +13 -13
  24. package/fesm2022/rededor-site-front-end-lib-components-filters-filter-generic.mjs.map +1 -1
  25. package/fesm2022/rededor-site-front-end-lib-components-filters-filter-planos-convenios.mjs +14 -14
  26. package/fesm2022/rededor-site-front-end-lib-components-filters-filter-planos-convenios.mjs.map +1 -1
  27. package/fesm2022/rededor-site-front-end-lib-components-footer.mjs +1 -1
  28. package/fesm2022/rededor-site-front-end-lib-components-footer.mjs.map +1 -1
  29. package/fesm2022/rededor-site-front-end-lib-components-header-components-action.mjs +1 -1
  30. package/fesm2022/rededor-site-front-end-lib-components-header-components-action.mjs.map +1 -1
  31. package/fesm2022/rededor-site-front-end-lib-components-header-components-auxiliar.mjs +1 -1
  32. package/fesm2022/rededor-site-front-end-lib-components-header-components-auxiliar.mjs.map +1 -1
  33. package/fesm2022/rededor-site-front-end-lib-components-header-components-main.mjs +1 -1
  34. package/fesm2022/rededor-site-front-end-lib-components-header-components-main.mjs.map +1 -1
  35. package/fesm2022/rededor-site-front-end-lib-components-header-components-side.mjs +1 -1
  36. package/fesm2022/rededor-site-front-end-lib-components-header-components-side.mjs.map +1 -1
  37. package/fesm2022/rededor-site-front-end-lib-components-header.mjs +1 -1
  38. package/fesm2022/rededor-site-front-end-lib-components-header.mjs.map +1 -1
  39. package/fesm2022/rededor-site-front-end-lib-components-load-screen.mjs +1 -1
  40. package/fesm2022/rededor-site-front-end-lib-components-load-screen.mjs.map +1 -1
  41. package/fesm2022/rededor-site-front-end-lib-components-modal-drawer.mjs +1 -1
  42. package/fesm2022/rededor-site-front-end-lib-components-modal-drawer.mjs.map +1 -1
  43. package/fesm2022/rededor-site-front-end-lib-components-modal.mjs +1 -1
  44. package/fesm2022/rededor-site-front-end-lib-components-modal.mjs.map +1 -1
  45. package/fesm2022/rededor-site-front-end-lib-components-page-header.mjs +2 -2
  46. package/fesm2022/rededor-site-front-end-lib-components-page-header.mjs.map +1 -1
  47. package/fesm2022/rededor-site-front-end-lib-components-pagination.mjs +2 -2
  48. package/fesm2022/rededor-site-front-end-lib-components-pagination.mjs.map +1 -1
  49. package/fesm2022/rededor-site-front-end-lib-components-search.mjs +3 -3
  50. package/fesm2022/rededor-site-front-end-lib-components-search.mjs.map +1 -1
  51. package/fesm2022/rededor-site-front-end-lib-components-section-navigation.mjs +1 -1
  52. package/fesm2022/rededor-site-front-end-lib-components-section-navigation.mjs.map +1 -1
  53. package/fesm2022/rededor-site-front-end-lib-components-side-ctas.mjs +2 -2
  54. package/fesm2022/rededor-site-front-end-lib-components-side-ctas.mjs.map +1 -1
  55. package/fesm2022/rededor-site-front-end-lib-components-sidebar-navigation.mjs +3 -3
  56. package/fesm2022/rededor-site-front-end-lib-components-sidebar-navigation.mjs.map +1 -1
  57. package/fesm2022/rededor-site-front-end-lib-components-sticky-navigation.mjs +3 -3
  58. package/fesm2022/rededor-site-front-end-lib-components-sticky-navigation.mjs.map +1 -1
  59. package/fesm2022/rededor-site-front-end-lib-components-whatsapp.mjs +2 -2
  60. package/fesm2022/rededor-site-front-end-lib-components-whatsapp.mjs.map +1 -1
  61. package/fesm2022/rededor-site-front-end-lib-core.mjs +1 -0
  62. package/fesm2022/rededor-site-front-end-lib-core.mjs.map +1 -1
  63. package/package.json +2 -133
  64. package/cura/accordion/index.d.ts +0 -120
  65. package/cura/api/index.d.ts +0 -359
  66. package/cura/badges/cura-badge-counter/index.d.ts +0 -38
  67. package/cura/badges/cura-badge-distance/index.d.ts +0 -21
  68. package/cura/badges/cura-badge-dot/index.d.ts +0 -29
  69. package/cura/badges/cura-badge-pill/index.d.ts +0 -42
  70. package/cura/badges/index.d.ts +0 -5
  71. package/cura/buttons/cura-button/index.d.ts +0 -90
  72. package/cura/buttons/cura-button-outline/index.d.ts +0 -90
  73. package/cura/buttons/cura-button-select/index.d.ts +0 -39
  74. package/cura/buttons/cura-button-transparent/index.d.ts +0 -87
  75. package/cura/buttons/index.d.ts +0 -15
  76. package/cura/cards/cura-card/index.d.ts +0 -49
  77. package/cura/feedback/cura-alert/index.d.ts +0 -55
  78. package/cura/feedback/cura-modal/index.d.ts +0 -97
  79. package/cura/feedback/cura-toast/index.d.ts +0 -104
  80. package/cura/forms/cura-checkbox/index.d.ts +0 -160
  81. package/cura/forms/cura-input-text/index.d.ts +0 -236
  82. package/cura/forms/cura-label/index.d.ts +0 -47
  83. package/cura/forms/cura-radio/index.d.ts +0 -148
  84. package/cura/forms/cura-select/index.d.ts +0 -154
  85. package/cura/forms/cura-select-option/index.d.ts +0 -54
  86. package/cura/forms/cura-select-state/index.d.ts +0 -72
  87. package/cura/forms/cura-switch/index.d.ts +0 -113
  88. package/cura/forms/cura-textarea/index.d.ts +0 -113
  89. package/cura/forms/index.d.ts +0 -20
  90. package/cura/icons/cura-icon/index.d.ts +0 -46
  91. package/cura/loaders/cura-loader-bar/index.d.ts +0 -22
  92. package/cura/loaders/cura-loader-circle/index.d.ts +0 -24
  93. package/cura/texts/cura-display/index.d.ts +0 -54
  94. package/cura/texts/cura-heading/index.d.ts +0 -65
  95. package/cura/texts/cura-paragraph/index.d.ts +0 -54
  96. package/cura/texts/index.d.ts +0 -7
  97. package/fesm2022/rededor-site-front-end-lib-cura-accordion.mjs +0 -252
  98. package/fesm2022/rededor-site-front-end-lib-cura-accordion.mjs.map +0 -1
  99. package/fesm2022/rededor-site-front-end-lib-cura-api.mjs +0 -643
  100. package/fesm2022/rededor-site-front-end-lib-cura-api.mjs.map +0 -1
  101. package/fesm2022/rededor-site-front-end-lib-cura-badges-cura-badge-counter.mjs +0 -90
  102. package/fesm2022/rededor-site-front-end-lib-cura-badges-cura-badge-counter.mjs.map +0 -1
  103. package/fesm2022/rededor-site-front-end-lib-cura-badges-cura-badge-distance.mjs +0 -55
  104. package/fesm2022/rededor-site-front-end-lib-cura-badges-cura-badge-distance.mjs.map +0 -1
  105. package/fesm2022/rededor-site-front-end-lib-cura-badges-cura-badge-dot.mjs +0 -66
  106. package/fesm2022/rededor-site-front-end-lib-cura-badges-cura-badge-dot.mjs.map +0 -1
  107. package/fesm2022/rededor-site-front-end-lib-cura-badges-cura-badge-pill.mjs +0 -91
  108. package/fesm2022/rededor-site-front-end-lib-cura-badges-cura-badge-pill.mjs.map +0 -1
  109. package/fesm2022/rededor-site-front-end-lib-cura-badges.mjs +0 -4
  110. package/fesm2022/rededor-site-front-end-lib-cura-badges.mjs.map +0 -1
  111. package/fesm2022/rededor-site-front-end-lib-cura-buttons-cura-button-outline.mjs +0 -170
  112. package/fesm2022/rededor-site-front-end-lib-cura-buttons-cura-button-outline.mjs.map +0 -1
  113. package/fesm2022/rededor-site-front-end-lib-cura-buttons-cura-button-select.mjs +0 -135
  114. package/fesm2022/rededor-site-front-end-lib-cura-buttons-cura-button-select.mjs.map +0 -1
  115. package/fesm2022/rededor-site-front-end-lib-cura-buttons-cura-button-transparent.mjs +0 -161
  116. package/fesm2022/rededor-site-front-end-lib-cura-buttons-cura-button-transparent.mjs.map +0 -1
  117. package/fesm2022/rededor-site-front-end-lib-cura-buttons-cura-button.mjs +0 -170
  118. package/fesm2022/rededor-site-front-end-lib-cura-buttons-cura-button.mjs.map +0 -1
  119. package/fesm2022/rededor-site-front-end-lib-cura-buttons.mjs +0 -13
  120. package/fesm2022/rededor-site-front-end-lib-cura-buttons.mjs.map +0 -1
  121. package/fesm2022/rededor-site-front-end-lib-cura-cards-cura-card.mjs +0 -72
  122. package/fesm2022/rededor-site-front-end-lib-cura-cards-cura-card.mjs.map +0 -1
  123. package/fesm2022/rededor-site-front-end-lib-cura-feedback-cura-alert.mjs +0 -90
  124. package/fesm2022/rededor-site-front-end-lib-cura-feedback-cura-alert.mjs.map +0 -1
  125. package/fesm2022/rededor-site-front-end-lib-cura-feedback-cura-modal.mjs +0 -105
  126. package/fesm2022/rededor-site-front-end-lib-cura-feedback-cura-modal.mjs.map +0 -1
  127. package/fesm2022/rededor-site-front-end-lib-cura-feedback-cura-toast.mjs +0 -198
  128. package/fesm2022/rededor-site-front-end-lib-cura-feedback-cura-toast.mjs.map +0 -1
  129. package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-checkbox.mjs +0 -262
  130. package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-checkbox.mjs.map +0 -1
  131. package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-input-text.mjs +0 -586
  132. package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-input-text.mjs.map +0 -1
  133. package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-label.mjs +0 -82
  134. package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-label.mjs.map +0 -1
  135. package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-radio.mjs +0 -243
  136. package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-radio.mjs.map +0 -1
  137. package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-select-option.mjs +0 -89
  138. package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-select-option.mjs.map +0 -1
  139. package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-select-state.mjs +0 -123
  140. package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-select-state.mjs.map +0 -1
  141. package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-select.mjs +0 -365
  142. package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-select.mjs.map +0 -1
  143. package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-switch.mjs +0 -182
  144. package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-switch.mjs.map +0 -1
  145. package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-textarea.mjs +0 -209
  146. package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-textarea.mjs.map +0 -1
  147. package/fesm2022/rededor-site-front-end-lib-cura-forms.mjs +0 -21
  148. package/fesm2022/rededor-site-front-end-lib-cura-forms.mjs.map +0 -1
  149. package/fesm2022/rededor-site-front-end-lib-cura-icons-cura-icon.mjs +0 -88
  150. package/fesm2022/rededor-site-front-end-lib-cura-icons-cura-icon.mjs.map +0 -1
  151. package/fesm2022/rededor-site-front-end-lib-cura-loaders-cura-loader-bar.mjs +0 -44
  152. package/fesm2022/rededor-site-front-end-lib-cura-loaders-cura-loader-bar.mjs.map +0 -1
  153. package/fesm2022/rededor-site-front-end-lib-cura-loaders-cura-loader-circle.mjs +0 -49
  154. package/fesm2022/rededor-site-front-end-lib-cura-loaders-cura-loader-circle.mjs.map +0 -1
  155. package/fesm2022/rededor-site-front-end-lib-cura-texts-cura-display.mjs +0 -84
  156. package/fesm2022/rededor-site-front-end-lib-cura-texts-cura-display.mjs.map +0 -1
  157. package/fesm2022/rededor-site-front-end-lib-cura-texts-cura-heading.mjs +0 -104
  158. package/fesm2022/rededor-site-front-end-lib-cura-texts-cura-heading.mjs.map +0 -1
  159. package/fesm2022/rededor-site-front-end-lib-cura-texts-cura-paragraph.mjs +0 -89
  160. package/fesm2022/rededor-site-front-end-lib-cura-texts-cura-paragraph.mjs.map +0 -1
  161. package/fesm2022/rededor-site-front-end-lib-cura-texts.mjs +0 -4
  162. package/fesm2022/rededor-site-front-end-lib-cura-texts.mjs.map +0 -1
@@ -1,182 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, model, input, output, computed, forwardRef, Component } from '@angular/core';
3
- import { CommonModule } from '@angular/common';
4
- import { NG_VALUE_ACCESSOR } from '@angular/forms';
5
- import { CuraApiService } from '@rededor/site-front-end-lib/cura/api';
6
- import { CuraLabelComponent } from '@rededor/site-front-end-lib/cura/forms/cura-label';
7
- import { formsSizes } from '@rededor/site-front-end-lib/cura/forms';
8
-
9
- class CuraSwitchComponent {
10
- constructor() {
11
- this.curaApi = inject(CuraApiService);
12
- /**
13
- * Indicates whether the switch is checked or not.
14
- */
15
- this.checked = model(false, ...(ngDevMode ? [{ debugName: "checked" }] : []));
16
- /**
17
- * Indicates whether the switch is disabled or not.
18
- */
19
- this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
20
- /**
21
- * The label text to display next to the switch.
22
- */
23
- this.label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
24
- /**
25
- * Tab index for the switch element.
26
- */
27
- this.tabindex = input(0, ...(ngDevMode ? [{ debugName: "tabindex" }] : []));
28
- /**
29
- * Controls how the label text should handle overflow.
30
- * - 'none': No overflow handling; the label displays normally.
31
- * - 'single': The label will be truncated with an ellipsis if it overflows a single line.
32
- * - string: Custom overflow handling mode.
33
- */
34
- this.overflowLabel = input('none', ...(ngDevMode ? [{ debugName: "overflowLabel" }] : []));
35
- /**
36
- * Controls how the helper text should handle overflow.
37
- * - 'none': No overflow handling; the label displays normally.
38
- * - 'single': The label will be truncated with an ellipsis if it overflows a single line.
39
- * - string: Custom overflow handling mode.
40
- */
41
- this.overflowHelper = input('none', ...(ngDevMode ? [{ debugName: "overflowHelper" }] : []));
42
- /**
43
- * Position of the label relative to the switch.
44
- */
45
- this.position = input('left', ...(ngDevMode ? [{ debugName: "position" }] : []));
46
- /**
47
- * Size of the switch.
48
- */
49
- this.size = input('medium', ...(ngDevMode ? [{ debugName: "size" }] : []));
50
- /**
51
- * Background style of the switch.
52
- */
53
- this.background = input('light', ...(ngDevMode ? [{ debugName: "background" }] : []));
54
- /**
55
- * Accent color of the switch.
56
- */
57
- this.color = input('accent', ...(ngDevMode ? [{ debugName: "color" }] : []));
58
- /**
59
- * Change event emitter
60
- */
61
- this.onchange = output();
62
- // Form control callbacks
63
- this.onChange = (value) => { };
64
- this.onTouched = () => { };
65
- this.sizes = {
66
- large: { size: 64 },
67
- medium: { size: 48 },
68
- small: { size: 40 },
69
- };
70
- // Computed signals
71
- this.colorConfig = computed(() => {
72
- if (this.disabled()) {
73
- return {
74
- label: this.isDarkBackground() ? 'neutral-dark' : 'neutral-dark',
75
- message: this.isDarkBackground() ? 'neutral-dark' : 'neutral-dark',
76
- };
77
- }
78
- const darkBackground = this.isDarkBackground();
79
- return {
80
- label: darkBackground ? 'neutral-white' : 'neutral-black',
81
- message: darkBackground ? 'primary-lighter' : 'neutral-dark',
82
- };
83
- }, ...(ngDevMode ? [{ debugName: "colorConfig" }] : []));
84
- this.containerClasses = computed(() => {
85
- const classes = ['container'];
86
- if (this.checked())
87
- classes.push('checked');
88
- if (this.disabled())
89
- classes.push('disabled');
90
- if (this.position() === 'right')
91
- classes.push('position');
92
- return classes.join(' ');
93
- }, ...(ngDevMode ? [{ debugName: "containerClasses" }] : []));
94
- this.labelColor = computed(() => this.colorConfig().label, ...(ngDevMode ? [{ debugName: "labelColor" }] : []));
95
- this.messageColor = computed(() => this.colorConfig().message, ...(ngDevMode ? [{ debugName: "messageColor" }] : []));
96
- this.labelSize = computed(() => (this.size() === 'large' ? 'medium' : 'xsmall'), ...(ngDevMode ? [{ debugName: "labelSize" }] : []));
97
- this.labelTextAlign = computed(() => (this.position() === 'right' ? 'right' : 'left'), ...(ngDevMode ? [{ debugName: "labelTextAlign" }] : []));
98
- this.styles = computed(() => {
99
- const sizeConfig = this.sizes[this.size()];
100
- const formsSize = formsSizes[this.size()];
101
- const sizeStyles = {
102
- '--size-track': `${sizeConfig.size}px`,
103
- '--size': `${formsSize.size}px`,
104
- '--gap': `${formsSize.gap}px`,
105
- };
106
- const darkBackground = this.isDarkBackground();
107
- const colorValue = this.color();
108
- const colors = [
109
- { name: '--info-base', background: 'info-base' },
110
- { name: '--neutral-black-shadow', background: 'neutral-black', opacity: 0.16 },
111
- { name: '--neutral-purewhite', background: 'neutral-purewhite' },
112
- { name: '--neutral-medium', background: 'neutral-medium' },
113
- { name: '--neutral-pale', background: 'neutral-pale' },
114
- { name: '--neutral-dark-base', background: `neutral-${darkBackground ? 'dark' : 'base'}` },
115
- { name: '--neutral-darker-medium', background: `neutral-${darkBackground ? 'darker' : 'medium'}` },
116
- { name: '--neutral-black-neutral-pale', background: `${darkBackground ? 'neutral-black' : 'neutral-pale'}` },
117
- { name: '--neutral-black-neutral-base', background: `${darkBackground ? 'neutral-dark' : 'neutral-base'}` },
118
- { name: '--color-base-light', background: `${colorValue}-light` },
119
- { name: '--color-dark', background: `${colorValue}-dark` },
120
- ];
121
- const colorStyles = {};
122
- colors.forEach((color) => {
123
- if (this.curaApi) {
124
- colorStyles[color.name] = this.curaApi.theme.colors.getColor(color.background, color?.opacity);
125
- }
126
- });
127
- return { ...sizeStyles, ...colorStyles };
128
- }, ...(ngDevMode ? [{ debugName: "styles" }] : []));
129
- }
130
- // ControlValueAccessor implementation
131
- writeValue(value) {
132
- this.checked.set(value || false);
133
- }
134
- registerOnChange(fn) {
135
- this.onChange = fn;
136
- }
137
- registerOnTouched(fn) {
138
- this.onTouched = fn;
139
- }
140
- isDarkBackground() {
141
- return this.background() === 'dark';
142
- }
143
- toggleSwitch() {
144
- if (this.disabled())
145
- return;
146
- this.checked.update((value) => !value);
147
- // Notify form control
148
- this.onChange(this.checked());
149
- this.onTouched();
150
- this.onchange.emit({ checked: this.checked() });
151
- }
152
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: CuraSwitchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
153
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.18", type: CuraSwitchComponent, isStandalone: true, selector: "cura-switch", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, overflowLabel: { classPropertyName: "overflowLabel", publicName: "overflowLabel", isSignal: true, isRequired: false, transformFunction: null }, overflowHelper: { classPropertyName: "overflowHelper", publicName: "overflowHelper", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, background: { classPropertyName: "background", publicName: "background", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", onchange: "onchange" }, host: { attributes: { "role": "switch" }, properties: { "attr.aria-checked": "checked()", "attr.aria-disabled": "disabled()", "attr.tabindex": "tabindex()" } }, providers: [
154
- {
155
- provide: NG_VALUE_ACCESSOR,
156
- useExisting: forwardRef(() => CuraSwitchComponent),
157
- multi: true,
158
- },
159
- ], ngImport: i0, template: "<div [class]=\"containerClasses()\" [style]=\"styles()\" (click)=\"toggleSwitch()\">\r\n <div class=\"info\">\r\n <cura-label\r\n [textOverflow]=\"overflowLabel()\"\r\n [style.textAlign]=\"labelTextAlign()\"\r\n class=\"label\"\r\n weight=\"bold\"\r\n [size]=\"labelSize()\"\r\n lineHeight=\"125%\"\r\n [color]=\"labelColor()\"\r\n >\r\n {{ label() }}\r\n </cura-label>\r\n\r\n <cura-label [textOverflow]=\"overflowHelper()\" [style.textAlign]=\"labelTextAlign()\" [color]=\"messageColor()\" size=\"xsmall\" class=\"message\">\r\n <ng-content></ng-content>\r\n </cura-label>\r\n </div>\r\n\r\n <div class=\"control\">\r\n <div [class]=\"'track ' + size().toLowerCase()\">\r\n <div [class]=\"'thumb ' + size().toLowerCase()\" [tabIndex]=\"tabindex()\" (keydown.space)=\"toggleSwitch()\" (keydown.enter)=\"toggleSwitch()\"></div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";:host{display:block;box-sizing:border-box;min-width:0}.container{display:flex;align-items:center;flex-direction:row-reverse;justify-content:start;gap:var(--gap);text-align:left;cursor:pointer}.position{flex-direction:row}.info{overflow:hidden}.label,.message{text-align:left}.control{width:fit-content}.track{background:var(--neutral-dark-base);border-radius:16px;transition:background-color .3s;align-items:flex-start;flex-shrink:0;box-sizing:border-box;width:var(--size-track);height:var(--size);position:relative}.thumb{background:var(--neutral-purewhite);border:2px solid var(--neutral-darker-medium);border-radius:50%;position:absolute;transition:transform .3s,outline .3s;display:inline-block;cursor:pointer;-webkit-user-select:none;user-select:none;box-sizing:border-box;width:var(--size);height:var(--size);top:50%;transform:translateY(-50%)}.checked .thumb{border-color:var(--color-dark);box-shadow:0 4px 8px 0 var(--neutral-black-shadow, rgba(38, 38, 38, .16));background:var(--neutral-purewhite);transform:translate(var(--size)) translateY(-50%)}.checked .thumb:hover{background:var(--neutral-pale)!important;border-color:var(--neutral-darker-medium)!important}.checked .thumb:active{border-color:var(--color-dark);background:var(--neutral-pale)}.checked .track{background:var(--color-base-light)}.disabled .track{background:var(--neutral-black-neutral-pale)}.disabled .thumb{background:var(--neutral-black-neutral-base)!important;border-color:var(--neutral-black-neutral-pale)!important;cursor:not-allowed}.disabled.checked .track{background:var(--neutral-black-neutral-pale)}.container.disabled .thumb:focus{outline:none!important;border-color:var(--neutral-black-neutral-pale)!important}:not(.disabled):not(.checked) .thumb:hover{border-color:var(--color-dark);background:var(--neutral-pale)}:not(.disabled):not(.checked) .thumb:active{border-color:var(--color-dark);background:var(--neutral-pale)}:not(.disabled) .thumb:focus{outline:2px solid var(--info-base)!important;border:2px solid var(--neutral-darker-medium);z-index:1}:not(.disabled) .checked .thumb:focus{outline:2px solid var(--info-base)!important;border-color:var(--color-dark)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: CuraLabelComponent, selector: "cura-label", inputs: ["size", "weight", "spotColor", "color", "marginBlock", "lineHeight", "textOverflow"] }] }); }
160
- }
161
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: CuraSwitchComponent, decorators: [{
162
- type: Component,
163
- args: [{ selector: 'cura-switch', imports: [CommonModule, CuraLabelComponent], host: {
164
- role: 'switch',
165
- '[attr.aria-checked]': 'checked()',
166
- '[attr.aria-disabled]': 'disabled()',
167
- '[attr.tabindex]': 'tabindex()',
168
- }, providers: [
169
- {
170
- provide: NG_VALUE_ACCESSOR,
171
- useExisting: forwardRef(() => CuraSwitchComponent),
172
- multi: true,
173
- },
174
- ], template: "<div [class]=\"containerClasses()\" [style]=\"styles()\" (click)=\"toggleSwitch()\">\r\n <div class=\"info\">\r\n <cura-label\r\n [textOverflow]=\"overflowLabel()\"\r\n [style.textAlign]=\"labelTextAlign()\"\r\n class=\"label\"\r\n weight=\"bold\"\r\n [size]=\"labelSize()\"\r\n lineHeight=\"125%\"\r\n [color]=\"labelColor()\"\r\n >\r\n {{ label() }}\r\n </cura-label>\r\n\r\n <cura-label [textOverflow]=\"overflowHelper()\" [style.textAlign]=\"labelTextAlign()\" [color]=\"messageColor()\" size=\"xsmall\" class=\"message\">\r\n <ng-content></ng-content>\r\n </cura-label>\r\n </div>\r\n\r\n <div class=\"control\">\r\n <div [class]=\"'track ' + size().toLowerCase()\">\r\n <div [class]=\"'thumb ' + size().toLowerCase()\" [tabIndex]=\"tabindex()\" (keydown.space)=\"toggleSwitch()\" (keydown.enter)=\"toggleSwitch()\"></div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";:host{display:block;box-sizing:border-box;min-width:0}.container{display:flex;align-items:center;flex-direction:row-reverse;justify-content:start;gap:var(--gap);text-align:left;cursor:pointer}.position{flex-direction:row}.info{overflow:hidden}.label,.message{text-align:left}.control{width:fit-content}.track{background:var(--neutral-dark-base);border-radius:16px;transition:background-color .3s;align-items:flex-start;flex-shrink:0;box-sizing:border-box;width:var(--size-track);height:var(--size);position:relative}.thumb{background:var(--neutral-purewhite);border:2px solid var(--neutral-darker-medium);border-radius:50%;position:absolute;transition:transform .3s,outline .3s;display:inline-block;cursor:pointer;-webkit-user-select:none;user-select:none;box-sizing:border-box;width:var(--size);height:var(--size);top:50%;transform:translateY(-50%)}.checked .thumb{border-color:var(--color-dark);box-shadow:0 4px 8px 0 var(--neutral-black-shadow, rgba(38, 38, 38, .16));background:var(--neutral-purewhite);transform:translate(var(--size)) translateY(-50%)}.checked .thumb:hover{background:var(--neutral-pale)!important;border-color:var(--neutral-darker-medium)!important}.checked .thumb:active{border-color:var(--color-dark);background:var(--neutral-pale)}.checked .track{background:var(--color-base-light)}.disabled .track{background:var(--neutral-black-neutral-pale)}.disabled .thumb{background:var(--neutral-black-neutral-base)!important;border-color:var(--neutral-black-neutral-pale)!important;cursor:not-allowed}.disabled.checked .track{background:var(--neutral-black-neutral-pale)}.container.disabled .thumb:focus{outline:none!important;border-color:var(--neutral-black-neutral-pale)!important}:not(.disabled):not(.checked) .thumb:hover{border-color:var(--color-dark);background:var(--neutral-pale)}:not(.disabled):not(.checked) .thumb:active{border-color:var(--color-dark);background:var(--neutral-pale)}:not(.disabled) .thumb:focus{outline:2px solid var(--info-base)!important;border:2px solid var(--neutral-darker-medium);z-index:1}:not(.disabled) .checked .thumb:focus{outline:2px solid var(--info-base)!important;border-color:var(--color-dark)}\n"] }]
175
- }], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], overflowLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "overflowLabel", required: false }] }], overflowHelper: [{ type: i0.Input, args: [{ isSignal: true, alias: "overflowHelper", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], background: [{ type: i0.Input, args: [{ isSignal: true, alias: "background", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], onchange: [{ type: i0.Output, args: ["onchange"] }] } });
176
-
177
- /**
178
- * Generated bundle index. Do not edit.
179
- */
180
-
181
- export { CuraSwitchComponent };
182
- //# sourceMappingURL=rededor-site-front-end-lib-cura-forms-cura-switch.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rededor-site-front-end-lib-cura-forms-cura-switch.mjs","sources":["../../../projects/site-front-end-lib/cura/forms/cura-switch/cura-switch.component.ts","../../../projects/site-front-end-lib/cura/forms/cura-switch/cura-switch.component.html","../../../projects/site-front-end-lib/cura/forms/cura-switch/rededor-site-front-end-lib-cura-forms-cura-switch.ts"],"sourcesContent":["import { Component, input, output, inject, computed, forwardRef, model } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\r\nimport { CuraLabelComponent } from '@rededor/site-front-end-lib/cura/forms/cura-label';\r\nimport { formsSizes, TextOverflow } from '@rededor/site-front-end-lib/cura/forms';\r\nimport { SwitchSize, SwitchPosition, SwitchBackground, SwitchChangeEvent } from './cura-switch.definitions';\r\n\r\n@Component({\r\n selector: 'cura-switch',\r\n imports: [CommonModule, CuraLabelComponent],\r\n templateUrl: './cura-switch.component.html',\r\n styleUrls: ['./cura-switch.component.scss'],\r\n host: {\r\n role: 'switch',\r\n '[attr.aria-checked]': 'checked()',\r\n '[attr.aria-disabled]': 'disabled()',\r\n '[attr.tabindex]': 'tabindex()',\r\n },\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => CuraSwitchComponent),\r\n multi: true,\r\n },\r\n ],\r\n})\r\nexport class CuraSwitchComponent implements ControlValueAccessor {\r\n private curaApi: CuraApiService = inject(CuraApiService);\r\n\r\n /**\r\n * Indicates whether the switch is checked or not.\r\n */\r\n checked = model<boolean>(false);\r\n\r\n /**\r\n * Indicates whether the switch is disabled or not.\r\n */\r\n disabled = input<boolean>(false);\r\n\r\n /**\r\n * The label text to display next to the switch.\r\n */\r\n label = input<string>('');\r\n\r\n /**\r\n * Tab index for the switch element.\r\n */\r\n tabindex = input<number>(0);\r\n\r\n /**\r\n * Controls how the label text should handle overflow.\r\n * - 'none': No overflow handling; the label displays normally.\r\n * - 'single': The label will be truncated with an ellipsis if it overflows a single line.\r\n * - string: Custom overflow handling mode.\r\n */\r\n overflowLabel = input<TextOverflow>('none');\r\n\r\n /**\r\n * Controls how the helper text should handle overflow.\r\n * - 'none': No overflow handling; the label displays normally.\r\n * - 'single': The label will be truncated with an ellipsis if it overflows a single line.\r\n * - string: Custom overflow handling mode.\r\n */\r\n overflowHelper = input<TextOverflow>('none');\r\n\r\n /**\r\n * Position of the label relative to the switch.\r\n */\r\n position = input<SwitchPosition>('left');\r\n\r\n /**\r\n * Size of the switch.\r\n */\r\n size = input<SwitchSize>('medium');\r\n\r\n /**\r\n * Background style of the switch.\r\n */\r\n background = input<SwitchBackground>('light');\r\n\r\n /**\r\n * Accent color of the switch.\r\n */\r\n color = input<string>('accent');\r\n\r\n /**\r\n * Change event emitter\r\n */\r\n onchange = output<SwitchChangeEvent>();\r\n\r\n // Form control callbacks\r\n private onChange = (value: boolean) => {};\r\n private onTouched = () => {};\r\n\r\n private sizes = {\r\n large: { size: 64 },\r\n medium: { size: 48 },\r\n small: { size: 40 },\r\n };\r\n\r\n // Computed signals\r\n private colorConfig = computed(() => {\r\n if (this.disabled()) {\r\n return {\r\n label: this.isDarkBackground() ? 'neutral-dark' : 'neutral-dark',\r\n message: this.isDarkBackground() ? 'neutral-dark' : 'neutral-dark',\r\n };\r\n }\r\n\r\n const darkBackground = this.isDarkBackground();\r\n return {\r\n label: darkBackground ? 'neutral-white' : 'neutral-black',\r\n message: darkBackground ? 'primary-lighter' : 'neutral-dark',\r\n };\r\n });\r\n\r\n containerClasses = computed(() => {\r\n const classes = ['container'];\r\n if (this.checked()) classes.push('checked');\r\n if (this.disabled()) classes.push('disabled');\r\n if (this.position() === 'right') classes.push('position');\r\n return classes.join(' ');\r\n });\r\n\r\n labelColor = computed(() => this.colorConfig().label);\r\n messageColor = computed(() => this.colorConfig().message);\r\n labelSize = computed(() => (this.size() === 'large' ? 'medium' : 'xsmall'));\r\n labelTextAlign = computed(() => (this.position() === 'right' ? 'right' : 'left'));\r\n\r\n styles = computed(() => {\r\n const sizeConfig = this.sizes[this.size()];\r\n const formsSize = formsSizes[this.size()];\r\n\r\n const sizeStyles = {\r\n '--size-track': `${sizeConfig.size}px`,\r\n '--size': `${formsSize.size}px`,\r\n '--gap': `${formsSize.gap}px`,\r\n };\r\n\r\n const darkBackground = this.isDarkBackground();\r\n const colorValue = this.color();\r\n\r\n const colors = [\r\n { name: '--info-base', background: 'info-base' },\r\n { name: '--neutral-black-shadow', background: 'neutral-black', opacity: 0.16 },\r\n { name: '--neutral-purewhite', background: 'neutral-purewhite' },\r\n { name: '--neutral-medium', background: 'neutral-medium' },\r\n { name: '--neutral-pale', background: 'neutral-pale' },\r\n { name: '--neutral-dark-base', background: `neutral-${darkBackground ? 'dark' : 'base'}` },\r\n { name: '--neutral-darker-medium', background: `neutral-${darkBackground ? 'darker' : 'medium'}` },\r\n { name: '--neutral-black-neutral-pale', background: `${darkBackground ? 'neutral-black' : 'neutral-pale'}` },\r\n { name: '--neutral-black-neutral-base', background: `${darkBackground ? 'neutral-dark' : 'neutral-base'}` },\r\n { name: '--color-base-light', background: `${colorValue}-light` },\r\n { name: '--color-dark', background: `${colorValue}-dark` },\r\n ];\r\n\r\n const colorStyles: { [key: string]: string } = {};\r\n colors.forEach((color) => {\r\n if (this.curaApi) {\r\n colorStyles[color.name] = this.curaApi.theme.colors.getColor(color.background, color?.opacity);\r\n }\r\n });\r\n\r\n return { ...sizeStyles, ...colorStyles };\r\n });\r\n\r\n // ControlValueAccessor implementation\r\n writeValue(value: boolean): void {\r\n this.checked.set(value || false);\r\n }\r\n\r\n registerOnChange(fn: (value: boolean) => void): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: () => void): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n private isDarkBackground(): boolean {\r\n return this.background() === 'dark';\r\n }\r\n\r\n toggleSwitch(): void {\r\n if (this.disabled()) return;\r\n\r\n this.checked.update((value) => !value);\r\n\r\n // Notify form control\r\n this.onChange(this.checked());\r\n this.onTouched();\r\n\r\n this.onchange.emit({ checked: this.checked() });\r\n }\r\n}\r\n","<div [class]=\"containerClasses()\" [style]=\"styles()\" (click)=\"toggleSwitch()\">\r\n <div class=\"info\">\r\n <cura-label\r\n [textOverflow]=\"overflowLabel()\"\r\n [style.textAlign]=\"labelTextAlign()\"\r\n class=\"label\"\r\n weight=\"bold\"\r\n [size]=\"labelSize()\"\r\n lineHeight=\"125%\"\r\n [color]=\"labelColor()\"\r\n >\r\n {{ label() }}\r\n </cura-label>\r\n\r\n <cura-label [textOverflow]=\"overflowHelper()\" [style.textAlign]=\"labelTextAlign()\" [color]=\"messageColor()\" size=\"xsmall\" class=\"message\">\r\n <ng-content></ng-content>\r\n </cura-label>\r\n </div>\r\n\r\n <div class=\"control\">\r\n <div [class]=\"'track ' + size().toLowerCase()\">\r\n <div [class]=\"'thumb ' + size().toLowerCase()\" [tabIndex]=\"tabindex()\" (keydown.space)=\"toggleSwitch()\" (keydown.enter)=\"toggleSwitch()\"></div>\r\n </div>\r\n </div>\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MA2Ba,mBAAmB,CAAA;AAnBhC,IAAA,WAAA,GAAA;AAoBU,QAAA,IAAA,CAAA,OAAO,GAAmB,MAAM,CAAC,cAAc,CAAC;AAExD;;AAEG;AACH,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAU,KAAK,mDAAC;AAE/B;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,oDAAC;AAEhC;;AAEG;AACH,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE,iDAAC;AAEzB;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAS,CAAC,oDAAC;AAE3B;;;;;AAKG;AACH,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAe,MAAM,yDAAC;AAE3C;;;;;AAKG;AACH,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK,CAAe,MAAM,0DAAC;AAE5C;;AAEG;AACH,QA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,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,kBAAkB,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,QAAA,EAAA,WAAA,EAAA,OAAA,EAAA,aAAA,EAAA,YAAA,EAAA,cAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAiB/B,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAnB/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,WACd,CAAC,YAAY,EAAE,kBAAkB,CAAC,EAAA,IAAA,EAGrC;AACJ,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,qBAAqB,EAAE,WAAW;AAClC,wBAAA,sBAAsB,EAAE,YAAY;AACpC,wBAAA,iBAAiB,EAAE,YAAY;qBAChC,EAAA,SAAA,EACU;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,yBAAyB,CAAC;AAClD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA,EAAA,QAAA,EAAA,46BAAA,EAAA,MAAA,EAAA,CAAA,moEAAA,CAAA,EAAA;;;AEzBH;;AAEG;;;;"}
@@ -1,209 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, input, model, output, signal, computed, forwardRef, Component } from '@angular/core';
3
- import * as i1 from '@angular/common';
4
- import { CommonModule } from '@angular/common';
5
- import * as i2 from '@angular/forms';
6
- import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
7
- import { CuraApiService } from '@rededor/site-front-end-lib/cura/api';
8
- import { CuraLabelComponent } from '@rededor/site-front-end-lib/cura/forms/cura-label';
9
-
10
- class CuraTextareaComponent {
11
- constructor() {
12
- this.curaApi = inject(CuraApiService);
13
- /**
14
- * Status of the textarea component
15
- */
16
- this.status = input('default', ...(ngDevMode ? [{ debugName: "status" }] : []));
17
- /**
18
- * Size of the textarea component
19
- */
20
- this.size = input('medium', ...(ngDevMode ? [{ debugName: "size" }] : []));
21
- /**
22
- * Label text for the textarea
23
- */
24
- this.label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
25
- /**
26
- * Name attribute for the textarea
27
- */
28
- this.name = input('', ...(ngDevMode ? [{ debugName: "name" }] : []));
29
- /**
30
- * Placeholder text for the textarea
31
- */
32
- this.placeholder = input(null, ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
33
- /**
34
- * Current value of the textarea
35
- */
36
- this.value = model('', ...(ngDevMode ? [{ debugName: "value" }] : []));
37
- /**
38
- * Whether the textarea is disabled
39
- */
40
- this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
41
- /**
42
- * Whether the textarea is required
43
- */
44
- this.required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : []));
45
- /**
46
- * Whether the textarea is read-only
47
- */
48
- this.readOnly = input(false, ...(ngDevMode ? [{ debugName: "readOnly" }] : []));
49
- /**
50
- * Maximum length of the textarea value
51
- */
52
- this.maxlength = input(undefined, ...(ngDevMode ? [{ debugName: "maxlength" }] : []));
53
- /**
54
- * Number of visible text rows
55
- */
56
- this.rows = input(3, ...(ngDevMode ? [{ debugName: "rows" }] : []));
57
- /**
58
- * Resize behaviour of the textarea
59
- */
60
- this.resize = input('none', ...(ngDevMode ? [{ debugName: "resize" }] : []));
61
- /**
62
- * Event emitted when the value changes
63
- */
64
- this.valueChange = output();
65
- // Internal state signals
66
- this.isHovered = signal(false, ...(ngDevMode ? [{ debugName: "isHovered" }] : []));
67
- this.isFocused = signal(false, ...(ngDevMode ? [{ debugName: "isFocused" }] : []));
68
- // Form control callbacks
69
- this.onChange = (value) => { };
70
- this.onTouched = () => { };
71
- this.currentLength = computed(() => this.value()?.length ?? 0, ...(ngDevMode ? [{ debugName: "currentLength" }] : []));
72
- // Computed styles
73
- this.styles = computed(() => {
74
- const { fonts, colors } = this.curaApi?.theme || { fonts: null, colors: null };
75
- const baseStyles = {};
76
- if (fonts) {
77
- const fontWeights = fonts.getWeights();
78
- baseStyles['--font-weight-medium'] = fontWeights.medium;
79
- baseStyles['--font-weight-bold'] = fontWeights.bold;
80
- baseStyles['--font-weight-regular'] = fontWeights.regular;
81
- baseStyles['--font-color'] = fonts.getColor();
82
- baseStyles['--font-family'] = fonts.getFamily();
83
- baseStyles['--font-size'] = fonts.getSize();
84
- }
85
- if (colors) {
86
- const colorKeys = [
87
- 'primary-base',
88
- 'neutral-purewhite',
89
- 'neutral-white',
90
- 'neutral-black',
91
- 'neutral-medium',
92
- 'neutral-base',
93
- 'neutral-dark',
94
- 'success-dark',
95
- 'success-darker',
96
- 'success-lighter',
97
- 'error-lighter',
98
- 'error-dark',
99
- 'error-darker',
100
- 'error-base',
101
- 'info-base',
102
- ];
103
- colorKeys.forEach((key) => {
104
- baseStyles[`--${key}`] = colors.getColor(key);
105
- });
106
- }
107
- return baseStyles;
108
- }, ...(ngDevMode ? [{ debugName: "styles" }] : []));
109
- // Computed signals
110
- this.classes = computed(() => ({
111
- [this.size().toLowerCase()]: true,
112
- disabled: this.disabled(),
113
- isFocused: this.isFocused() && !this.disabled() && !this.readOnly(),
114
- isHovered: this.isHovered(),
115
- [this.status()]: true,
116
- }), ...(ngDevMode ? [{ debugName: "classes" }] : []));
117
- this.labelColor = computed(() => {
118
- if (this.disabled()) {
119
- return 'neutral-medium';
120
- }
121
- else if ((this.isFocused() || this.isHovered() || this.status() === 'success' || this.status() === 'error') && !this.readOnly()) {
122
- return 'neutral-black';
123
- }
124
- else {
125
- return 'neutral-dark';
126
- }
127
- }, ...(ngDevMode ? [{ debugName: "labelColor" }] : []));
128
- this.helperText = computed(() => {
129
- const isError = this.status() === 'error';
130
- const isSuccess = this.status() === 'success';
131
- const isDefault = this.status() === 'default';
132
- const helperTextSize = this.size() === 'large' ? 'small' : 'xsmall';
133
- const colorText = (() => {
134
- if (this.disabled())
135
- return 'neutral-medium';
136
- if (this.isFocused() || this.isHovered())
137
- return 'neutral-black';
138
- return 'neutral-dark';
139
- })();
140
- return {
141
- size: helperTextSize,
142
- color: isDefault ? colorText : isError ? 'error-dark' : isSuccess ? 'success-dark' : colorText,
143
- };
144
- }, ...(ngDevMode ? [{ debugName: "helperText" }] : []));
145
- }
146
- // ControlValueAccessor implementation
147
- writeValue(value) {
148
- this.value.set(value ?? '');
149
- }
150
- registerOnChange(fn) {
151
- this.onChange = fn;
152
- }
153
- registerOnTouched(fn) {
154
- this.onTouched = fn;
155
- }
156
- // Event handlers
157
- handleMouseEnter() {
158
- this.isHovered.set(true);
159
- }
160
- handleMouseLeave() {
161
- this.isHovered.set(false);
162
- }
163
- handleFocus() {
164
- this.isFocused.set(true);
165
- }
166
- handleBlur() {
167
- this.onTouched();
168
- setTimeout(() => {
169
- this.isFocused.set(false);
170
- }, 150);
171
- }
172
- handleInputChange(event) {
173
- const newValue = event.target.value;
174
- this.value.set(newValue);
175
- this.onChange(newValue);
176
- this.valueChange.emit({ value: newValue });
177
- }
178
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: CuraTextareaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
179
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: CuraTextareaComponent, isStandalone: true, selector: "cura-textarea", inputs: { status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, maxlength: { classPropertyName: "maxlength", publicName: "maxlength", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, resize: { classPropertyName: "resize", publicName: "resize", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", valueChange: "valueChange" }, host: { attributes: { "role": "textbox" }, properties: { "attr.aria-multiline": "true", "attr.aria-disabled": "disabled()", "attr.aria-required": "required()", "attr.aria-invalid": "status() === \"error\"" } }, providers: [
180
- {
181
- provide: NG_VALUE_ACCESSOR,
182
- useExisting: forwardRef(() => CuraTextareaComponent),
183
- multi: true,
184
- },
185
- ], ngImport: i0, template: "<div class=\"cura-input-group\" [ngClass]=\"classes()\" [style]=\"styles()\" (mouseenter)=\"handleMouseEnter()\" (mouseleave)=\"handleMouseLeave()\">\r\n <div class=\"input-wrapper\">\r\n @if (label()) {\r\n <cura-label class=\"label\" weight=\"bold\" [size]=\"size()\" [color]=\"labelColor()\">\r\n {{ label() }}\r\n @if (required()) {\r\n <span class=\"required\">*</span>\r\n }\r\n </cura-label>\r\n }\r\n\r\n <div class=\"cura-input-field\" [style]=\"styles()\">\r\n <textarea\r\n [attr.id]=\"name() || null\"\r\n [attr.name]=\"name() || null\"\r\n [placeholder]=\"placeholder() || ''\"\r\n [disabled]=\"disabled()\"\r\n [required]=\"required()\"\r\n [readOnly]=\"readOnly()\"\r\n [attr.maxlength]=\"maxlength()\"\r\n [rows]=\"rows()\"\r\n [style.resize]=\"resize()\"\r\n [(ngModel)]=\"value\"\r\n [ngClass]=\"classes()\"\r\n [style]=\"styles()\"\r\n (focus)=\"handleFocus()\"\r\n (blur)=\"handleBlur()\"\r\n (input)=\"handleInputChange($event)\"\r\n ></textarea>\r\n </div>\r\n\r\n @if (maxlength() !== undefined) {\r\n <div class=\"char-counter\" [style]=\"styles()\">{{ currentLength() }}/{{ maxlength() }}</div>\r\n }\r\n\r\n @if (helperText()) {\r\n <div [style]=\"styles()\" class=\"helper-text\" part=\"cura-textarea-helper\">\r\n <cura-label [size]=\"helperText().size\" lineHeight=\"xsmall\" [color]=\"helperText().color\">\r\n <ng-content></ng-content>\r\n </cura-label>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: [":host{display:block;box-sizing:border-box;width:100%}.required{color:var(--error-base)}.cura-input-group{width:100%;font-family:var(--font-family);text-align:left!important}.cura-input-group .char-counter{margin-top:4px;text-align:right;font-size:12px;color:var(--neutral-dark);font-family:var(--font-family)}.cura-input-group cura-label{margin-bottom:8px}.cura-input-group .helper-text{margin-top:8px;color:var(--neutral-dark)}.cura-input-group .cura-input-field{width:100%;display:flex;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:.32px;box-sizing:border-box;overflow:hidden}.cura-input-group .cura-input-field textarea{flex:1;width:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:8px 12px;line-height:20px}.cura-input-group .cura-input-field textarea::placeholder{color:var(--neutral-dark)}.cura-input-group:hover:not(.disabled):not(.success):not(.error):not(.isFocused) .cura-input-field{border-color:var(--neutral-dark)}.cura-input-group:hover:not(.disabled):not(.success):not(.error):not(.isFocused) .cura-input-field textarea{color:var(--neutral-dark)}.cura-input-group:hover:not(.disabled):not(.success):not(.error):not(.isFocused) .cura-input-field textarea::placeholder{color:var(--neutral-dark)}.cura-input-group:focus-within .cura-input-field{border:2px solid var(--info-base)!important;background-color:var(--neutral-purewhite);outline:none}.cura-input-group:focus-within .cura-input-field textarea{color:var(--neutral-black)!important}.cura-input-group.small .cura-input-field textarea{font-size:12px;line-height:13px;letter-spacing:.72px}.cura-input-group.small .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-regular)}.cura-input-group.medium .cura-input-field textarea{font-size:14px;line-height:16px;letter-spacing:.56px}.cura-input-group.medium .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-regular)}.cura-input-group.large .cura-input-field textarea{font-size:16px}.cura-input-group.large .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-bold)}.cura-input-group.disabled .char-counter{color:var(--neutral-medium)}.cura-input-group.disabled .cura-input-field{background-color:var(--neutral-white);border:2px solid var(--neutral-base)}.cura-input-group.disabled .cura-input-field textarea{color:var(--neutral-medium)}.cura-input-group.disabled .cura-input-field textarea::placeholder{color:var(--neutral-medium)}.cura-input-group.success .cura-input-field{border:2px solid var(--success-dark)!important;background-color:var(--success-lighter)!important}.cura-input-group.success .cura-input-field textarea{color:var(--success-darker)!important}.cura-input-group.success .cura-input-field textarea::placeholder{color:var(--success-darker)!important}.cura-input-group.error .cura-input-field{border:2px solid var(--error-dark)!important;background-color:var(--error-lighter)!important}.cura-input-group.error .cura-input-field textarea{color:var(--error-darker)!important}.cura-input-group.error .cura-input-field textarea::placeholder{color:var(--error-darker)!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: CuraLabelComponent, selector: "cura-label", inputs: ["size", "weight", "spotColor", "color", "marginBlock", "lineHeight", "textOverflow"] }] }); }
186
- }
187
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: CuraTextareaComponent, decorators: [{
188
- type: Component,
189
- args: [{ selector: 'cura-textarea', imports: [CommonModule, FormsModule, CuraLabelComponent], host: {
190
- role: 'textbox',
191
- '[attr.aria-multiline]': 'true',
192
- '[attr.aria-disabled]': 'disabled()',
193
- '[attr.aria-required]': 'required()',
194
- '[attr.aria-invalid]': 'status() === "error"',
195
- }, providers: [
196
- {
197
- provide: NG_VALUE_ACCESSOR,
198
- useExisting: forwardRef(() => CuraTextareaComponent),
199
- multi: true,
200
- },
201
- ], template: "<div class=\"cura-input-group\" [ngClass]=\"classes()\" [style]=\"styles()\" (mouseenter)=\"handleMouseEnter()\" (mouseleave)=\"handleMouseLeave()\">\r\n <div class=\"input-wrapper\">\r\n @if (label()) {\r\n <cura-label class=\"label\" weight=\"bold\" [size]=\"size()\" [color]=\"labelColor()\">\r\n {{ label() }}\r\n @if (required()) {\r\n <span class=\"required\">*</span>\r\n }\r\n </cura-label>\r\n }\r\n\r\n <div class=\"cura-input-field\" [style]=\"styles()\">\r\n <textarea\r\n [attr.id]=\"name() || null\"\r\n [attr.name]=\"name() || null\"\r\n [placeholder]=\"placeholder() || ''\"\r\n [disabled]=\"disabled()\"\r\n [required]=\"required()\"\r\n [readOnly]=\"readOnly()\"\r\n [attr.maxlength]=\"maxlength()\"\r\n [rows]=\"rows()\"\r\n [style.resize]=\"resize()\"\r\n [(ngModel)]=\"value\"\r\n [ngClass]=\"classes()\"\r\n [style]=\"styles()\"\r\n (focus)=\"handleFocus()\"\r\n (blur)=\"handleBlur()\"\r\n (input)=\"handleInputChange($event)\"\r\n ></textarea>\r\n </div>\r\n\r\n @if (maxlength() !== undefined) {\r\n <div class=\"char-counter\" [style]=\"styles()\">{{ currentLength() }}/{{ maxlength() }}</div>\r\n }\r\n\r\n @if (helperText()) {\r\n <div [style]=\"styles()\" class=\"helper-text\" part=\"cura-textarea-helper\">\r\n <cura-label [size]=\"helperText().size\" lineHeight=\"xsmall\" [color]=\"helperText().color\">\r\n <ng-content></ng-content>\r\n </cura-label>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: [":host{display:block;box-sizing:border-box;width:100%}.required{color:var(--error-base)}.cura-input-group{width:100%;font-family:var(--font-family);text-align:left!important}.cura-input-group .char-counter{margin-top:4px;text-align:right;font-size:12px;color:var(--neutral-dark);font-family:var(--font-family)}.cura-input-group cura-label{margin-bottom:8px}.cura-input-group .helper-text{margin-top:8px;color:var(--neutral-dark)}.cura-input-group .cura-input-field{width:100%;display:flex;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:.32px;box-sizing:border-box;overflow:hidden}.cura-input-group .cura-input-field textarea{flex:1;width:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:8px 12px;line-height:20px}.cura-input-group .cura-input-field textarea::placeholder{color:var(--neutral-dark)}.cura-input-group:hover:not(.disabled):not(.success):not(.error):not(.isFocused) .cura-input-field{border-color:var(--neutral-dark)}.cura-input-group:hover:not(.disabled):not(.success):not(.error):not(.isFocused) .cura-input-field textarea{color:var(--neutral-dark)}.cura-input-group:hover:not(.disabled):not(.success):not(.error):not(.isFocused) .cura-input-field textarea::placeholder{color:var(--neutral-dark)}.cura-input-group:focus-within .cura-input-field{border:2px solid var(--info-base)!important;background-color:var(--neutral-purewhite);outline:none}.cura-input-group:focus-within .cura-input-field textarea{color:var(--neutral-black)!important}.cura-input-group.small .cura-input-field textarea{font-size:12px;line-height:13px;letter-spacing:.72px}.cura-input-group.small .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-regular)}.cura-input-group.medium .cura-input-field textarea{font-size:14px;line-height:16px;letter-spacing:.56px}.cura-input-group.medium .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-regular)}.cura-input-group.large .cura-input-field textarea{font-size:16px}.cura-input-group.large .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-bold)}.cura-input-group.disabled .char-counter{color:var(--neutral-medium)}.cura-input-group.disabled .cura-input-field{background-color:var(--neutral-white);border:2px solid var(--neutral-base)}.cura-input-group.disabled .cura-input-field textarea{color:var(--neutral-medium)}.cura-input-group.disabled .cura-input-field textarea::placeholder{color:var(--neutral-medium)}.cura-input-group.success .cura-input-field{border:2px solid var(--success-dark)!important;background-color:var(--success-lighter)!important}.cura-input-group.success .cura-input-field textarea{color:var(--success-darker)!important}.cura-input-group.success .cura-input-field textarea::placeholder{color:var(--success-darker)!important}.cura-input-group.error .cura-input-field{border:2px solid var(--error-dark)!important;background-color:var(--error-lighter)!important}.cura-input-group.error .cura-input-field textarea{color:var(--error-darker)!important}.cura-input-group.error .cura-input-field textarea::placeholder{color:var(--error-darker)!important}\n"] }]
202
- }], propDecorators: { status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }], maxlength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxlength", required: false }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], resize: [{ type: i0.Input, args: [{ isSignal: true, alias: "resize", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
203
-
204
- /**
205
- * Generated bundle index. Do not edit.
206
- */
207
-
208
- export { CuraTextareaComponent };
209
- //# sourceMappingURL=rededor-site-front-end-lib-cura-forms-cura-textarea.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rededor-site-front-end-lib-cura-forms-cura-textarea.mjs","sources":["../../../projects/site-front-end-lib/cura/forms/cura-textarea/cura-textarea.component.ts","../../../projects/site-front-end-lib/cura/forms/cura-textarea/cura-textarea.component.html","../../../projects/site-front-end-lib/cura/forms/cura-textarea/rededor-site-front-end-lib-cura-forms-cura-textarea.ts"],"sourcesContent":["import { Component, input, output, signal, computed, inject, forwardRef, model } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\r\nimport { CuraLabelComponent } from '@rededor/site-front-end-lib/cura/forms/cura-label';\r\nimport { LabelSize } from '@rededor/site-front-end-lib/cura/forms';\r\nimport { TextareaSize, TextareaStatus, TextareaResize, TextareaValueChangeEvent } from './cura-textarea.definitions';\r\n\r\n@Component({\r\n selector: 'cura-textarea',\r\n imports: [CommonModule, FormsModule, CuraLabelComponent],\r\n templateUrl: './cura-textarea.component.html',\r\n styleUrls: ['./cura-textarea.component.scss'],\r\n host: {\r\n role: 'textbox',\r\n '[attr.aria-multiline]': 'true',\r\n '[attr.aria-disabled]': 'disabled()',\r\n '[attr.aria-required]': 'required()',\r\n '[attr.aria-invalid]': 'status() === \"error\"',\r\n },\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => CuraTextareaComponent),\r\n multi: true,\r\n },\r\n ],\r\n})\r\nexport class CuraTextareaComponent implements ControlValueAccessor {\r\n private curaApi: CuraApiService = inject(CuraApiService);\r\n\r\n /**\r\n * Status of the textarea component\r\n */\r\n status = input<TextareaStatus>('default');\r\n\r\n /**\r\n * Size of the textarea component\r\n */\r\n size = input<TextareaSize>('medium');\r\n\r\n /**\r\n * Label text for the textarea\r\n */\r\n label = input<string>('');\r\n\r\n /**\r\n * Name attribute for the textarea\r\n */\r\n name = input<string>('');\r\n\r\n /**\r\n * Placeholder text for the textarea\r\n */\r\n placeholder = input<string | null>(null);\r\n\r\n /**\r\n * Current value of the textarea\r\n */\r\n value = model<string>('');\r\n\r\n /**\r\n * Whether the textarea is disabled\r\n */\r\n disabled = input<boolean>(false);\r\n\r\n /**\r\n * Whether the textarea is required\r\n */\r\n required = input<boolean>(false);\r\n\r\n /**\r\n * Whether the textarea is read-only\r\n */\r\n readOnly = input<boolean>(false);\r\n\r\n /**\r\n * Maximum length of the textarea value\r\n */\r\n maxlength = input<number | undefined>(undefined);\r\n\r\n /**\r\n * Number of visible text rows\r\n */\r\n rows = input<number>(3);\r\n\r\n /**\r\n * Resize behaviour of the textarea\r\n */\r\n resize = input<TextareaResize>('none');\r\n\r\n /**\r\n * Event emitted when the value changes\r\n */\r\n valueChange = output<TextareaValueChangeEvent>();\r\n\r\n // Internal state signals\r\n private isHovered = signal<boolean>(false);\r\n private isFocused = signal<boolean>(false);\r\n\r\n // Form control callbacks\r\n private onChange = (value: string) => {};\r\n private onTouched = () => {};\r\n\r\n // ControlValueAccessor implementation\r\n writeValue(value: string): void {\r\n this.value.set(value ?? '');\r\n }\r\n\r\n registerOnChange(fn: (value: string) => void): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: () => void): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n currentLength = computed(() => this.value()?.length ?? 0);\r\n\r\n // Computed styles\r\n styles = computed(() => {\r\n const { fonts, colors } = this.curaApi?.theme || { fonts: null, colors: null };\r\n\r\n const baseStyles: { [key: string]: string } = {};\r\n\r\n if (fonts) {\r\n const fontWeights = fonts.getWeights();\r\n baseStyles['--font-weight-medium'] = fontWeights.medium;\r\n baseStyles['--font-weight-bold'] = fontWeights.bold;\r\n baseStyles['--font-weight-regular'] = fontWeights.regular;\r\n baseStyles['--font-color'] = fonts.getColor();\r\n baseStyles['--font-family'] = fonts.getFamily();\r\n baseStyles['--font-size'] = fonts.getSize();\r\n }\r\n\r\n if (colors) {\r\n const colorKeys = [\r\n 'primary-base',\r\n 'neutral-purewhite',\r\n 'neutral-white',\r\n 'neutral-black',\r\n 'neutral-medium',\r\n 'neutral-base',\r\n 'neutral-dark',\r\n 'success-dark',\r\n 'success-darker',\r\n 'success-lighter',\r\n 'error-lighter',\r\n 'error-dark',\r\n 'error-darker',\r\n 'error-base',\r\n 'info-base',\r\n ];\r\n\r\n colorKeys.forEach((key) => {\r\n baseStyles[`--${key}`] = colors.getColor(key);\r\n });\r\n }\r\n\r\n return baseStyles;\r\n });\r\n\r\n // Computed signals\r\n classes = computed(() => ({\r\n [this.size().toLowerCase()]: true,\r\n disabled: this.disabled(),\r\n isFocused: this.isFocused() && !this.disabled() && !this.readOnly(),\r\n isHovered: this.isHovered(),\r\n [this.status()]: true,\r\n }));\r\n\r\n labelColor = computed(() => {\r\n if (this.disabled()) {\r\n return 'neutral-medium';\r\n } else if ((this.isFocused() || this.isHovered() || this.status() === 'success' || this.status() === 'error') && !this.readOnly()) {\r\n return 'neutral-black';\r\n } else {\r\n return 'neutral-dark';\r\n }\r\n });\r\n\r\n helperText = computed((): { size: LabelSize; color: string } => {\r\n const isError = this.status() === 'error';\r\n const isSuccess = this.status() === 'success';\r\n const isDefault = this.status() === 'default';\r\n const helperTextSize: LabelSize = this.size() === 'large' ? 'small' : 'xsmall';\r\n\r\n const colorText = (() => {\r\n if (this.disabled()) return 'neutral-medium';\r\n if (this.isFocused() || this.isHovered()) return 'neutral-black';\r\n return 'neutral-dark';\r\n })();\r\n\r\n return {\r\n size: helperTextSize,\r\n color: isDefault ? colorText : isError ? 'error-dark' : isSuccess ? 'success-dark' : colorText,\r\n };\r\n });\r\n\r\n // Event handlers\r\n handleMouseEnter(): void {\r\n this.isHovered.set(true);\r\n }\r\n\r\n handleMouseLeave(): void {\r\n this.isHovered.set(false);\r\n }\r\n\r\n handleFocus(): void {\r\n this.isFocused.set(true);\r\n }\r\n\r\n handleBlur(): void {\r\n this.onTouched();\r\n setTimeout(() => {\r\n this.isFocused.set(false);\r\n }, 150);\r\n }\r\n\r\n handleInputChange(event: Event): void {\r\n const newValue = (event.target as HTMLTextAreaElement).value;\r\n this.value.set(newValue);\r\n this.onChange(newValue);\r\n this.valueChange.emit({ value: newValue });\r\n }\r\n}\r\n","<div class=\"cura-input-group\" [ngClass]=\"classes()\" [style]=\"styles()\" (mouseenter)=\"handleMouseEnter()\" (mouseleave)=\"handleMouseLeave()\">\r\n <div class=\"input-wrapper\">\r\n @if (label()) {\r\n <cura-label class=\"label\" weight=\"bold\" [size]=\"size()\" [color]=\"labelColor()\">\r\n {{ label() }}\r\n @if (required()) {\r\n <span class=\"required\">*</span>\r\n }\r\n </cura-label>\r\n }\r\n\r\n <div class=\"cura-input-field\" [style]=\"styles()\">\r\n <textarea\r\n [attr.id]=\"name() || null\"\r\n [attr.name]=\"name() || null\"\r\n [placeholder]=\"placeholder() || ''\"\r\n [disabled]=\"disabled()\"\r\n [required]=\"required()\"\r\n [readOnly]=\"readOnly()\"\r\n [attr.maxlength]=\"maxlength()\"\r\n [rows]=\"rows()\"\r\n [style.resize]=\"resize()\"\r\n [(ngModel)]=\"value\"\r\n [ngClass]=\"classes()\"\r\n [style]=\"styles()\"\r\n (focus)=\"handleFocus()\"\r\n (blur)=\"handleBlur()\"\r\n (input)=\"handleInputChange($event)\"\r\n ></textarea>\r\n </div>\r\n\r\n @if (maxlength() !== undefined) {\r\n <div class=\"char-counter\" [style]=\"styles()\">{{ currentLength() }}/{{ maxlength() }}</div>\r\n }\r\n\r\n @if (helperText()) {\r\n <div [style]=\"styles()\" class=\"helper-text\" part=\"cura-textarea-helper\">\r\n <cura-label [size]=\"helperText().size\" lineHeight=\"xsmall\" [color]=\"helperText().color\">\r\n <ng-content></ng-content>\r\n </cura-label>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MA4Ba,qBAAqB,CAAA;AApBlC,IAAA,WAAA,GAAA;AAqBU,QAAA,IAAA,CAAA,OAAO,GAAmB,MAAM,CAAC,cAAc,CAAC;AAExD;;AAEG;AACH,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAiB,SAAS,kDAAC;AAEzC;;AAEG;AACH,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAe,QAAQ,gDAAC;AAEpC;;AAEG;AACH,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE,iDAAC;AAEzB;;AAEG;AACH,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAS,EAAE,gDAAC;AAExB;;AAEG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAgB,IAAI,uDAAC;AAExC;;AAEG;AACH,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE,iDAAC;AAEzB;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,oDAAC;AAEhC;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,oDAAC;AAEhC;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,oDAAC;AAEhC;;AAEG;AACH,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAqB,SAAS,qDAAC;AAEhD;;AAEG;AACH,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAS,CAAC,gDAAC;AAEvB;;AAEG;AACH,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAiB,MAAM,kDAAC;AAEtC;;AAEG;QACH,IAAA,CAAA,WAAW,GAAG,MAAM,EAA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AW,EAAE,kBAAkB,CAAC,EAAA,IAAA,EAGlD;AACJ,wBAAA,IAAI,EAAE,SAAS;AACf,wBAAA,uBAAuB,EAAE,MAAM;AAC/B,wBAAA,sBAAsB,EAAE,YAAY;AACpC,wBAAA,sBAAsB,EAAE,YAAY;AACpC,wBAAA,qBAAqB,EAAE,sBAAsB;qBAC9C,EAAA,SAAA,EACU;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,2BAA2B,CAAC;AACpD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA,EAAA,QAAA,EAAA,+mDAAA,EAAA,MAAA,EAAA,CAAA,6wGAAA,CAAA,EAAA;;;AE1BH;;AAEG;;;;"}
@@ -1,21 +0,0 @@
1
- const formsSizes = {
2
- large: {
3
- size: 32,
4
- gap: 16,
5
- },
6
- medium: {
7
- size: 24,
8
- gap: 12,
9
- },
10
- small: {
11
- size: 20,
12
- gap: 8,
13
- },
14
- };
15
-
16
- /**
17
- * Generated bundle index. Do not edit.
18
- */
19
-
20
- export { formsSizes };
21
- //# sourceMappingURL=rededor-site-front-end-lib-cura-forms.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rededor-site-front-end-lib-cura-forms.mjs","sources":["../../../projects/site-front-end-lib/cura/forms/cura-forms.definitions.ts","../../../projects/site-front-end-lib/cura/forms/rededor-site-front-end-lib-cura-forms.ts"],"sourcesContent":["export const formsSizes = {\r\n large: {\r\n size: 32,\r\n gap: 16,\r\n },\r\n medium: {\r\n size: 24,\r\n gap: 12,\r\n },\r\n small: {\r\n size: 20,\r\n gap: 8,\r\n },\r\n};\r\n\r\nexport type LabelSize = 'medium' | 'large' | 'small' | 'xsmall';\r\nexport type LabelWeight = 'regular' | 'bold';\r\nexport type TextOverflow = 'none' | 'single';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAO,MAAM,UAAU,GAAG;AACxB,IAAA,KAAK,EAAE;AACL,QAAA,IAAI,EAAE,EAAE;AACR,QAAA,GAAG,EAAE,EAAE;AACR,KAAA;AACD,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAE,EAAE;AACR,QAAA,GAAG,EAAE,EAAE;AACR,KAAA;AACD,IAAA,KAAK,EAAE;AACL,QAAA,IAAI,EAAE,EAAE;AACR,QAAA,GAAG,EAAE,CAAC;AACP,KAAA;;;ACZH;;AAEG;;;;"}