@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,365 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, ElementRef, PLATFORM_ID, input, model, output, signal, linkedSignal, viewChild, contentChildren, computed, effect, forwardRef, Component } from '@angular/core';
3
- import * as i1 from '@angular/common';
4
- import { isPlatformBrowser, CommonModule } from '@angular/common';
5
- import { NG_VALUE_ACCESSOR } from '@angular/forms';
6
- import { CuraApiService } from '@rededor/site-front-end-lib/cura/api';
7
- import { CuraLabelComponent } from '@rededor/site-front-end-lib/cura/forms/cura-label';
8
- import { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';
9
- import { CuraSelectOptionComponent } from '@rededor/site-front-end-lib/cura/forms/cura-select-option';
10
-
11
- class CuraSelectComponent {
12
- constructor() {
13
- this.curaApi = inject(CuraApiService);
14
- this.elementRef = inject(ElementRef);
15
- this.platformId = inject(PLATFORM_ID);
16
- this.name = input('', ...(ngDevMode ? [{ debugName: "name" }] : []));
17
- /**
18
- * The label text for the select component
19
- */
20
- this.label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
21
- /**
22
- * Placeholder text for the input field
23
- */
24
- this.placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
25
- /**
26
- * Current value of the select component
27
- */
28
- this.value = model('', ...(ngDevMode ? [{ debugName: "value" }] : []));
29
- /**
30
- * Display mode of the select component
31
- */
32
- this.mode = input('default', ...(ngDevMode ? [{ debugName: "mode" }] : []));
33
- /**
34
- * Size of the select component
35
- */
36
- this.size = input('medium', ...(ngDevMode ? [{ debugName: "size" }] : []));
37
- /**
38
- * Icon name for the select component
39
- */
40
- this.iconName = input(undefined, ...(ngDevMode ? [{ debugName: "iconName" }] : []));
41
- /**
42
- * Status of the select component
43
- */
44
- this.status = input('default', ...(ngDevMode ? [{ debugName: "status" }] : []));
45
- /**
46
- * Whether the select component is disabled
47
- */
48
- this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
49
- /**
50
- * Whether the select component is required
51
- */
52
- this.required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : []));
53
- /**
54
- * Enable/Disable search at options by term
55
- */
56
- this.searchBehavior = input(false, ...(ngDevMode ? [{ debugName: "searchBehavior" }] : []));
57
- /**
58
- * The search will be sensitive to accents
59
- */
60
- this.caseSensitive = input(true, ...(ngDevMode ? [{ debugName: "caseSensitive" }] : []));
61
- /**
62
- * CSS max-height property for dropdown item.
63
- * Can also be used by css property --max-height.
64
- * Default: 285px
65
- */
66
- this.maxHeight = input('285px', ...(ngDevMode ? [{ debugName: "maxHeight" }] : []));
67
- /**
68
- * Event emitted when an option is selected
69
- */
70
- this.selected = output();
71
- /**
72
- * Event emitted when search term changes
73
- */
74
- this.searchTermInput = output();
75
- // Internal state signals
76
- this.isHovered = signal(false, ...(ngDevMode ? [{ debugName: "isHovered" }] : []));
77
- this.isFocused = signal(false, ...(ngDevMode ? [{ debugName: "isFocused" }] : []));
78
- this.isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
79
- this.activeIndex = signal(-1, ...(ngDevMode ? [{ debugName: "activeIndex" }] : []));
80
- this.textInput = linkedSignal(() => {
81
- const opts = this.options();
82
- const val = this.value();
83
- const option = opts.find((o) => o.value() === val);
84
- return option?.elementRef?.nativeElement?.textContent ?? '';
85
- }, ...(ngDevMode ? [{ debugName: "textInput" }] : []));
86
- // Unique ID for accessibility
87
- this.componentId = `cura-select-${Math.random().toString(36).substring(2, 8)}`;
88
- // Form control callbacks
89
- this.onChange = (value) => { };
90
- this.onTouched = () => { };
91
- // ViewChild references
92
- this.inputElement = viewChild('inputElement', ...(ngDevMode ? [{ debugName: "inputElement" }] : []));
93
- this.options = contentChildren(CuraSelectOptionComponent, ...(ngDevMode ? [{ debugName: "options" }] : []));
94
- // Computed signals
95
- this.currentIconName = computed(() => {
96
- const iconMap = {
97
- default: this.iconName() || '',
98
- success: 'checkCircle',
99
- error: 'alertCircle',
100
- };
101
- return iconMap[this.status()];
102
- }, ...(ngDevMode ? [{ debugName: "currentIconName" }] : []));
103
- this.colorConfig = computed(() => {
104
- if (this.disabled()) {
105
- return {
106
- label: 'neutral-medium',
107
- text: 'neutral-medium',
108
- icon: 'neutral-medium',
109
- };
110
- }
111
- const isStatusDefault = this.status() === 'default';
112
- const isHoveredOrFocused = this.isFocused() || this.isHovered();
113
- return {
114
- label: !isStatusDefault || isHoveredOrFocused ? 'neutral-black' : 'neutral-dark',
115
- text: this.getTextColor(isHoveredOrFocused, isStatusDefault),
116
- icon: this.getTextColor(isHoveredOrFocused, isStatusDefault),
117
- };
118
- }, ...(ngDevMode ? [{ debugName: "colorConfig" }] : []));
119
- this.containerClasses = computed(() => {
120
- return {
121
- wrapper: true,
122
- label: !!this.label(),
123
- disabled: this.disabled(),
124
- transparent: this.mode() === 'transparent',
125
- [this.size().toLowerCase()]: true,
126
- [this.status().toLowerCase()]: true,
127
- };
128
- }, ...(ngDevMode ? [{ debugName: "containerClasses" }] : []));
129
- this.labelColor = computed(() => this.colorConfig().label, ...(ngDevMode ? [{ debugName: "labelColor" }] : []));
130
- this.textColor = computed(() => this.colorConfig().text, ...(ngDevMode ? [{ debugName: "textColor" }] : []));
131
- this.iconColor = computed(() => this.colorConfig().icon, ...(ngDevMode ? [{ debugName: "iconColor" }] : []));
132
- // Accessibility computed signals
133
- this.listboxId = computed(() => `${this.componentId}-listbox`, ...(ngDevMode ? [{ debugName: "listboxId" }] : []));
134
- this.activeOptionId = computed(() => {
135
- const activeOption = this.options()?.[this.activeIndex()];
136
- return activeOption?.optionId() || '';
137
- }, ...(ngDevMode ? [{ debugName: "activeOptionId" }] : []));
138
- this.styles = computed(() => {
139
- const { fonts, colors } = this.curaApi?.theme || { fonts: null, colors: null };
140
- const baseStyles = {};
141
- if (fonts) {
142
- const fontWeights = fonts.getWeights();
143
- baseStyles['--font-weight-medium'] = fontWeights.medium;
144
- baseStyles['--font-weight-bold'] = fontWeights.bold;
145
- baseStyles['--font-weight-regular'] = fontWeights.regular;
146
- baseStyles['--font-color'] = fonts.getColor();
147
- baseStyles['--font-family'] = fonts.getFamily();
148
- baseStyles['--font-size'] = fonts.getSize();
149
- }
150
- if (colors) {
151
- const colorKeys = [
152
- 'primary-base',
153
- 'neutral-purewhite',
154
- 'neutral-white',
155
- 'neutral-black',
156
- 'neutral-medium',
157
- 'neutral-light',
158
- 'neutral-base',
159
- 'neutral-dark',
160
- 'success-dark',
161
- 'success-darker',
162
- 'success-lighter',
163
- 'error-lighter',
164
- 'error-dark',
165
- 'error-darker',
166
- 'error-base',
167
- 'info-base',
168
- ];
169
- colorKeys.forEach((key) => {
170
- baseStyles[`--${key}`] = colors.getColor(key);
171
- });
172
- }
173
- return baseStyles;
174
- }, ...(ngDevMode ? [{ debugName: "styles" }] : []));
175
- this.handleClickOutside = (event) => {
176
- if (!isPlatformBrowser(this.platformId)) {
177
- return;
178
- }
179
- const clickedOutside = !this.elementRef.nativeElement.contains(event.target);
180
- if (clickedOutside && this.isOpen()) {
181
- this.isOpen.set(false);
182
- }
183
- };
184
- effect(() => {
185
- this.updateOptionHighlights(this.activeIndex());
186
- });
187
- effect(() => {
188
- const currentValue = this.value();
189
- this.options().forEach((opt) => opt.selected.set(opt.value() === currentValue));
190
- });
191
- }
192
- ngAfterViewInit() {
193
- this.initializeOptions();
194
- this.addOutsideClickListener();
195
- }
196
- ngOnDestroy() {
197
- if (isPlatformBrowser(this.platformId)) {
198
- this.removeOutsideClickListener();
199
- }
200
- }
201
- // ControlValueAccessor implementation
202
- writeValue(value) {
203
- this.value.set(value);
204
- }
205
- registerOnChange(fn) {
206
- this.onChange = fn;
207
- }
208
- registerOnTouched(fn) {
209
- this.onTouched = fn;
210
- }
211
- getTextColor(isHoveredOrFocused, isStatusDefault) {
212
- if (isHoveredOrFocused && isStatusDefault)
213
- return 'neutral-black';
214
- if (this.status() === 'success')
215
- return 'success-dark';
216
- if (this.status() === 'error')
217
- return 'error-dark';
218
- return 'neutral-dark';
219
- }
220
- initializeOptions() {
221
- if (!this.options())
222
- return;
223
- this.options().forEach((option) => {
224
- option.size.set(this.size());
225
- option.active.set(false);
226
- option.visible.set(true);
227
- });
228
- }
229
- selectOption(selectedOption) {
230
- const value = selectedOption.value();
231
- this.value.set(value);
232
- this.onChange(value);
233
- this.isOpen.set(false);
234
- this.filterOptions(selectedOption.elementRef?.nativeElement?.textContent || '');
235
- this.selected.emit({ value });
236
- }
237
- removeAccents(str) {
238
- return str.normalize('NFD').replace(/[̀-ͯ]/g, '');
239
- }
240
- filterOptions(searchTerm) {
241
- if (!this.searchBehavior()) {
242
- return;
243
- }
244
- this.searchTermInput.emit({ searchTerm });
245
- let processedSearchTerm = searchTerm;
246
- if (!this.caseSensitive()) {
247
- processedSearchTerm = this.removeAccents(searchTerm).toLowerCase();
248
- }
249
- this.options().forEach((option) => {
250
- let optionText = option.elementRef?.nativeElement?.textContent || '';
251
- if (!this.caseSensitive()) {
252
- optionText = this.removeAccents(optionText.toLowerCase());
253
- }
254
- const isVisible = optionText.includes(processedSearchTerm);
255
- option.visible.set(isVisible);
256
- option.elementRef.nativeElement.style.display = isVisible ? 'block' : 'none';
257
- });
258
- }
259
- // Event handlers
260
- handleKeyNavigation(event) {
261
- const { code: keyCode } = event;
262
- if (!this.isOpen() && keyCode === 'ArrowDown') {
263
- this.isOpen.set(true);
264
- this.activeIndex.set(0);
265
- return;
266
- }
267
- if (keyCode === 'ArrowDown') {
268
- event.preventDefault();
269
- this.updateActiveIndex(1);
270
- }
271
- if (keyCode === 'ArrowUp') {
272
- event.preventDefault();
273
- this.updateActiveIndex(-1);
274
- }
275
- if (keyCode === 'Enter' || keyCode === 'Space') {
276
- this.options()?.[this.activeIndex()]?.elementRef?.nativeElement?.click();
277
- }
278
- if (keyCode === 'Escape') {
279
- this.isOpen.set(false);
280
- }
281
- }
282
- updateActiveIndex(direction) {
283
- const visibleOptions = this.options();
284
- if (!visibleOptions || visibleOptions.length === 0)
285
- return;
286
- this.activeIndex.update((index) => (index + direction + visibleOptions.length) % visibleOptions.length);
287
- }
288
- handleInputChange(event) {
289
- const value = event.target.value;
290
- this.textInput.set(value);
291
- this.isOpen.set(value.length > 0);
292
- this.onChange(value);
293
- this.filterOptions(value);
294
- }
295
- handleClick(event) {
296
- if (this.disabled()) {
297
- event.preventDefault();
298
- return;
299
- }
300
- const target = event.target;
301
- const optionElement = target.closest('cura-select-option');
302
- if (optionElement) {
303
- const clickedOption = this.options()?.find((option) => option.elementRef?.nativeElement === optionElement);
304
- if (clickedOption) {
305
- this.selectOption(clickedOption);
306
- }
307
- return;
308
- }
309
- this.isOpen.update((value) => !value);
310
- }
311
- updateOptionHighlights(newActiveIndex) {
312
- this.options().forEach((option, index) => {
313
- option.active.set(index === newActiveIndex);
314
- });
315
- }
316
- /**
317
- * Controla o clique fora do componente
318
- */
319
- addOutsideClickListener() {
320
- if (!isPlatformBrowser(this.platformId)) {
321
- return;
322
- }
323
- document.addEventListener('click', this.handleClickOutside);
324
- }
325
- removeOutsideClickListener() {
326
- if (!isPlatformBrowser(this.platformId)) {
327
- return;
328
- }
329
- document.removeEventListener('click', this.handleClickOutside);
330
- }
331
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: CuraSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
332
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: CuraSelectComponent, isStandalone: true, selector: "cura-select", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", 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 }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, iconName: { classPropertyName: "iconName", publicName: "iconName", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", 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 }, searchBehavior: { classPropertyName: "searchBehavior", publicName: "searchBehavior", isSignal: true, isRequired: false, transformFunction: null }, caseSensitive: { classPropertyName: "caseSensitive", publicName: "caseSensitive", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", selected: "selected", searchTermInput: "searchTermInput" }, host: { attributes: { "role": "combobox" }, properties: { "attr.aria-label": "label()", "attr.aria-required": "required()", "attr.aria-disabled": "disabled()", "attr.aria-invalid": "status() === \"error\"", "attr.aria-expanded": "isOpen()", "attr.aria-controls": "listboxId()", "attr.aria-activedescendant": "activeOptionId()" } }, providers: [
333
- {
334
- provide: NG_VALUE_ACCESSOR,
335
- useExisting: forwardRef(() => CuraSelectComponent),
336
- multi: true,
337
- },
338
- ], queries: [{ propertyName: "options", predicate: CuraSelectOptionComponent, isSignal: true }], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true, isSignal: true }], ngImport: i0, template: "<div [ngClass]=\"containerClasses()\" [style]=\"styles()\" (mouseenter)=\"isHovered.set(true)\" (mouseleave)=\"isHovered.set(false)\" (click)=\"handleClick($event)\">\r\n @if (label()) {\r\n <cura-label class=\"label\" weight=\"bold\" [size]=\"size() === 'large' ? 'small' : 'xsmall'\" [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\r\n [ngClass]=\"{\r\n 'cura-input-field': true,\r\n open: isOpen(),\r\n }\"\r\n >\r\n @if (status() !== 'default' || iconName()) {\r\n <cura-icon\r\n class=\"feedback-icon\"\r\n [name]=\"currentIconName()\"\r\n iconset=\"default\"\r\n [size]=\"size() === 'large' ? 20 : 16\"\r\n [color]=\"iconColor()\"\r\n [style]=\"styles()\"\r\n >\r\n </cura-icon>\r\n }\r\n\r\n <input\r\n #inputElement\r\n type=\"text\"\r\n autocomplete=\"off\"\r\n [placeholder]=\"placeholder()\"\r\n [disabled]=\"disabled()\"\r\n [required]=\"required()\"\r\n [readonly]=\"!searchBehavior()\"\r\n [value]=\"textInput()\"\r\n [attr.id]=\"name() || null\"\r\n [attr.name]=\"name() || null\"\r\n [attr.aria-required]=\"required()\"\r\n [attr.aria-disabled]=\"disabled()\"\r\n [attr.aria-invalid]=\"status() === 'error'\"\r\n [attr.aria-autocomplete]=\"searchBehavior() ? 'list' : 'none'\"\r\n [attr.aria-controls]=\"listboxId()\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n [attr.aria-activedescendant]=\"activeOptionId()\"\r\n role=\"combobox\"\r\n [style]=\"styles()\"\r\n (focus)=\"isFocused.set(true)\"\r\n (blur)=\"isFocused.set(false)\"\r\n (input)=\"handleInputChange($event)\"\r\n (keydown)=\"handleKeyNavigation($event)\"\r\n />\r\n\r\n <button\r\n class=\"up-down-button\"\r\n type=\"button\"\r\n [attr.aria-label]=\"isOpen() ? 'Fechar lista de op\u00E7\u00F5es' : 'Abrir lista de op\u00E7\u00F5es'\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n [attr.aria-controls]=\"listboxId()\"\r\n [disabled]=\"disabled()\"\r\n tabindex=\"-1\"\r\n >\r\n <cura-icon [name]=\"isOpen() ? 'up' : 'down'\" class=\"up-down-icon\" [color]=\"disabled() ? 'neutral-dark' : 'primary-base'\" [size]=\"16\" iconset=\"default\">\r\n </cura-icon>\r\n </button>\r\n </div>\r\n\r\n <cura-label class=\"helper-text\" size=\"xsmall\" [color]=\"textColor()\" [weight]=\"mode() === 'transparent' ? 'bold' : 'regular'\">\r\n <ng-content></ng-content>\r\n </cura-label>\r\n\r\n @if (isOpen()) {\r\n <div\r\n [ngClass]=\"{\r\n menu: true,\r\n open: isOpen(),\r\n }\"\r\n [style]=\"{ '--max-height': maxHeight() }\"\r\n role=\"listbox\"\r\n [id]=\"listboxId()\"\r\n [attr.aria-label]=\"'Lista de op\u00E7\u00F5es para ' + (label() || 'sele\u00E7\u00E3o')\"\r\n [attr.aria-multiselectable]=\"false\"\r\n >\r\n <ng-content select=\"cura-select-option\"></ng-content>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{display:block;position:relative;font-family:var(--font-family)}.wrapper{width:100%;-webkit-user-select:none;user-select:none;text-align:left!important}.wrapper cura-label{margin-bottom:8px}.wrapper .helper-text{margin-top:8px;color:var(--neutral-dark)}.wrapper .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:var(--border-radius, 4px);color:var(--primary-base);letter-spacing:.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.wrapper .cura-input-field input{flex:1;width:100%;height: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:0 12px 0 8px}.wrapper .cura-input-field input::placeholder{color:var(--neutral-dark)}.wrapper .cura-input-field .feedback-icon{padding-left:12px}.wrapper .cura-input-field .feedback-icon{box-sizing:content-box}.wrapper .cura-input-field .up-down-icon{order:3;margin-right:6px;cursor:pointer;pointer-events:all}.wrapper .cura-input-field .up-down-button{background-color:transparent;border:none}.wrapper .cura-input-field input{padding:0 12px 0 8px;cursor:pointer}.wrapper .cura-input-field.open{border-radius:calc(var(--border-radius, 4px) / 2) calc(var(--border-radius, 4px) / 2) 0 0!important}.wrapper.transparent{background-color:transparent;padding:0;max-height:80px}.wrapper.transparent .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:var(--border-radius, 4px);color:var(--primary-base);letter-spacing:.32px;line-height:20px;overflow:hidden;box-sizing:border-box;background-color:transparent!important;border:none!important;border-radius:0;height:27px}.wrapper.transparent .cura-input-field input{flex:1;width:100%;height: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:0 12px 0 8px}.wrapper.transparent .cura-input-field input::placeholder{color:var(--neutral-dark)}.wrapper.transparent .cura-input-field .feedback-icon{padding-left:12px}.wrapper.transparent .cura-input-field input{color:var(--neutral-black)!important;font-size:16px;font-weight:var(--font-weight-bold)!important;padding:0}.wrapper.transparent .cura-input-field input::placeholder{color:var(--neutral-black)}.wrapper.transparent .cura-input-field .feedback-icon{order:3;margin:0 20px 0 0}.wrapper.transparent:focus-within .cura-input-field{border:none!important;background-color:transparent!important}.wrapper.transparent:focus-within .cura-input-field input{border:none!important;outline:none}.wrapper.transparent .helper-text{margin-top:0}.wrapper:hover:not(.disabled):not(.isLoading):not(.success):not(.error):not(.isFocused):not(.readOnly):not(.transparent) .cura-input-field{border-color:var(--neutral-dark)}.wrapper:hover:not(.disabled):not(.isLoading):not(.success):not(.error):not(.isFocused):not(.readOnly):not(.transparent) .cura-input-field input{color:var(--neutral-dark)}.wrapper:hover:not(.disabled):not(.isLoading):not(.success):not(.error):not(.isFocused):not(.readOnly):not(.transparent) .cura-input-field input::placeholder{color:var(--neutral-dark)}.wrapper:focus-within:not(.selection) .cura-input-field{border:2px solid var(--info-base)!important;background-color:var(--neutral-purewhite);outline:none}.wrapper:focus-within:not(.selection) .cura-input-field input{color:var(--neutral-black)!important}.wrapper:focus-within.selection .cura-input-field{border-radius:var(--border-radius) var(--border-radius) 0px 0px}.wrapper.success .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:var(--border-radius, 4px);color:var(--primary-base);letter-spacing:.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.wrapper.success .cura-input-field input{flex:1;width:100%;height: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:0 12px 0 8px}.wrapper.success .cura-input-field input::placeholder{color:var(--neutral-dark)}.wrapper.success .cura-input-field .feedback-icon{padding-left:12px}.wrapper.success .cura-input-field input{color:var(--success-darker)!important}.wrapper.success .cura-input-field input::placeholder{color:var(--success-darker)!important}.wrapper.success:not(.transparent) .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:var(--border-radius, 4px);color:var(--primary-base);letter-spacing:.32px;line-height:20px;overflow:hidden;box-sizing:border-box;border:2px solid var(--success-dark)!important;background-color:var(--success-lighter)!important}.wrapper.success:not(.transparent) .cura-input-field input{flex:1;width:100%;height: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:0 12px 0 8px}.wrapper.success:not(.transparent) .cura-input-field input::placeholder{color:var(--neutral-dark)}.wrapper.success:not(.transparent) .cura-input-field .feedback-icon{padding-left:12px}.wrapper.error .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:var(--border-radius, 4px);color:var(--primary-base);letter-spacing:.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.wrapper.error .cura-input-field input{flex:1;width:100%;height: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:0 12px 0 8px}.wrapper.error .cura-input-field input::placeholder{color:var(--neutral-dark)}.wrapper.error .cura-input-field .feedback-icon{padding-left:12px}.wrapper.error .cura-input-field input{color:var(--error-darker)!important}.wrapper.error .cura-input-field input::placeholder{color:var(--error-darker)!important}.wrapper.error:not(.transparent) .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:var(--border-radius, 4px);color:var(--primary-base);letter-spacing:.32px;line-height:20px;overflow:hidden;box-sizing:border-box;border:2px solid var(--error-dark)!important;background-color:var(--error-lighter)!important}.wrapper.error:not(.transparent) .cura-input-field input{flex:1;width:100%;height: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:0 12px 0 8px}.wrapper.error:not(.transparent) .cura-input-field input::placeholder{color:var(--neutral-dark)}.wrapper.error:not(.transparent) .cura-input-field .feedback-icon{padding-left:12px}.wrapper.small .cura-input-field{width:100%;height:32px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:var(--border-radius, 4px);color:var(--primary-base);letter-spacing:.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.wrapper.small .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:12px;box-sizing:border-box;padding:0 12px 0 8px}.wrapper.small .cura-input-field input::placeholder{color:var(--neutral-dark)}.wrapper.small .cura-input-field .feedback-icon{padding-left:12px}.wrapper.small .cura-input-field input{line-height:13px;letter-spacing:.72px}.wrapper.small .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-regular)}.wrapper.small.label .menu{top:53px}.wrapper.small .menu{top:33px}.wrapper.medium .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:var(--border-radius, 4px);color:var(--primary-base);letter-spacing:.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.wrapper.medium .cura-input-field input{flex:1;width:100%;height: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:0 12px 0 8px}.wrapper.medium .cura-input-field input::placeholder{color:var(--neutral-dark)}.wrapper.medium .cura-input-field .feedback-icon{padding-left:12px}.wrapper.medium .cura-input-field input{line-height:16px;letter-spacing:.56px}.wrapper.medium .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-regular)}.wrapper.medium.label .menu{top:61px}.wrapper.medium .menu{top:40px}.wrapper.large .cura-input-field{width:100%;height:44px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:var(--border-radius, 4px);color:var(--primary-base);letter-spacing:.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.wrapper.large .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:16px;box-sizing:border-box;padding:0 12px 0 8px}.wrapper.large .cura-input-field input::placeholder{color:var(--neutral-dark)}.wrapper.large .cura-input-field .feedback-icon{padding-left:12px}.wrapper.large .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-bold)}.wrapper.large.label .menu{top:69px}.wrapper.large .menu{top:47px}.wrapper.disabled .cura-input-field{background-color:var(--neutral-white);border:2px solid var(--neutral-base)}.wrapper.disabled .cura-input-field input{color:var(--neutral-medium)}.wrapper.disabled .cura-input-field input::placeholder{color:var(--neutral-medium)}.required{color:red}.menu{position:absolute;left:0;right:-1px;background:#fff;border:2px solid var(--neutral-light);border-radius:4px;z-index:1000;max-height:285px;overflow:hidden;border-top:transparent;align-items:center;scrollbar-color:var(--neutral-medium) var(--neutral-black-20);overflow-y:auto;box-shadow:0 4px 8px #26262629}.menu.open{border-radius:0!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: CuraLabelComponent, selector: "cura-label", inputs: ["size", "weight", "spotColor", "color", "marginBlock", "lineHeight", "textOverflow"] }, { kind: "component", type: CuraIconComponent, selector: "cura-icon", inputs: ["name", "color", "size", "iconset", "disabled"] }] }); }
339
- }
340
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: CuraSelectComponent, decorators: [{
341
- type: Component,
342
- args: [{ selector: 'cura-select', imports: [CommonModule, CuraLabelComponent, CuraIconComponent], host: {
343
- role: 'combobox',
344
- '[attr.aria-label]': 'label()',
345
- '[attr.aria-required]': 'required()',
346
- '[attr.aria-disabled]': 'disabled()',
347
- '[attr.aria-invalid]': 'status() === "error"',
348
- '[attr.aria-expanded]': 'isOpen()',
349
- '[attr.aria-controls]': 'listboxId()',
350
- '[attr.aria-activedescendant]': 'activeOptionId()',
351
- }, providers: [
352
- {
353
- provide: NG_VALUE_ACCESSOR,
354
- useExisting: forwardRef(() => CuraSelectComponent),
355
- multi: true,
356
- },
357
- ], template: "<div [ngClass]=\"containerClasses()\" [style]=\"styles()\" (mouseenter)=\"isHovered.set(true)\" (mouseleave)=\"isHovered.set(false)\" (click)=\"handleClick($event)\">\r\n @if (label()) {\r\n <cura-label class=\"label\" weight=\"bold\" [size]=\"size() === 'large' ? 'small' : 'xsmall'\" [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\r\n [ngClass]=\"{\r\n 'cura-input-field': true,\r\n open: isOpen(),\r\n }\"\r\n >\r\n @if (status() !== 'default' || iconName()) {\r\n <cura-icon\r\n class=\"feedback-icon\"\r\n [name]=\"currentIconName()\"\r\n iconset=\"default\"\r\n [size]=\"size() === 'large' ? 20 : 16\"\r\n [color]=\"iconColor()\"\r\n [style]=\"styles()\"\r\n >\r\n </cura-icon>\r\n }\r\n\r\n <input\r\n #inputElement\r\n type=\"text\"\r\n autocomplete=\"off\"\r\n [placeholder]=\"placeholder()\"\r\n [disabled]=\"disabled()\"\r\n [required]=\"required()\"\r\n [readonly]=\"!searchBehavior()\"\r\n [value]=\"textInput()\"\r\n [attr.id]=\"name() || null\"\r\n [attr.name]=\"name() || null\"\r\n [attr.aria-required]=\"required()\"\r\n [attr.aria-disabled]=\"disabled()\"\r\n [attr.aria-invalid]=\"status() === 'error'\"\r\n [attr.aria-autocomplete]=\"searchBehavior() ? 'list' : 'none'\"\r\n [attr.aria-controls]=\"listboxId()\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n [attr.aria-activedescendant]=\"activeOptionId()\"\r\n role=\"combobox\"\r\n [style]=\"styles()\"\r\n (focus)=\"isFocused.set(true)\"\r\n (blur)=\"isFocused.set(false)\"\r\n (input)=\"handleInputChange($event)\"\r\n (keydown)=\"handleKeyNavigation($event)\"\r\n />\r\n\r\n <button\r\n class=\"up-down-button\"\r\n type=\"button\"\r\n [attr.aria-label]=\"isOpen() ? 'Fechar lista de op\u00E7\u00F5es' : 'Abrir lista de op\u00E7\u00F5es'\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n [attr.aria-controls]=\"listboxId()\"\r\n [disabled]=\"disabled()\"\r\n tabindex=\"-1\"\r\n >\r\n <cura-icon [name]=\"isOpen() ? 'up' : 'down'\" class=\"up-down-icon\" [color]=\"disabled() ? 'neutral-dark' : 'primary-base'\" [size]=\"16\" iconset=\"default\">\r\n </cura-icon>\r\n </button>\r\n </div>\r\n\r\n <cura-label class=\"helper-text\" size=\"xsmall\" [color]=\"textColor()\" [weight]=\"mode() === 'transparent' ? 'bold' : 'regular'\">\r\n <ng-content></ng-content>\r\n </cura-label>\r\n\r\n @if (isOpen()) {\r\n <div\r\n [ngClass]=\"{\r\n menu: true,\r\n open: isOpen(),\r\n }\"\r\n [style]=\"{ '--max-height': maxHeight() }\"\r\n role=\"listbox\"\r\n [id]=\"listboxId()\"\r\n [attr.aria-label]=\"'Lista de op\u00E7\u00F5es para ' + (label() || 'sele\u00E7\u00E3o')\"\r\n [attr.aria-multiselectable]=\"false\"\r\n >\r\n <ng-content select=\"cura-select-option\"></ng-content>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{display:block;position:relative;font-family:var(--font-family)}.wrapper{width:100%;-webkit-user-select:none;user-select:none;text-align:left!important}.wrapper cura-label{margin-bottom:8px}.wrapper .helper-text{margin-top:8px;color:var(--neutral-dark)}.wrapper .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:var(--border-radius, 4px);color:var(--primary-base);letter-spacing:.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.wrapper .cura-input-field input{flex:1;width:100%;height: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:0 12px 0 8px}.wrapper .cura-input-field input::placeholder{color:var(--neutral-dark)}.wrapper .cura-input-field .feedback-icon{padding-left:12px}.wrapper .cura-input-field .feedback-icon{box-sizing:content-box}.wrapper .cura-input-field .up-down-icon{order:3;margin-right:6px;cursor:pointer;pointer-events:all}.wrapper .cura-input-field .up-down-button{background-color:transparent;border:none}.wrapper .cura-input-field input{padding:0 12px 0 8px;cursor:pointer}.wrapper .cura-input-field.open{border-radius:calc(var(--border-radius, 4px) / 2) calc(var(--border-radius, 4px) / 2) 0 0!important}.wrapper.transparent{background-color:transparent;padding:0;max-height:80px}.wrapper.transparent .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:var(--border-radius, 4px);color:var(--primary-base);letter-spacing:.32px;line-height:20px;overflow:hidden;box-sizing:border-box;background-color:transparent!important;border:none!important;border-radius:0;height:27px}.wrapper.transparent .cura-input-field input{flex:1;width:100%;height: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:0 12px 0 8px}.wrapper.transparent .cura-input-field input::placeholder{color:var(--neutral-dark)}.wrapper.transparent .cura-input-field .feedback-icon{padding-left:12px}.wrapper.transparent .cura-input-field input{color:var(--neutral-black)!important;font-size:16px;font-weight:var(--font-weight-bold)!important;padding:0}.wrapper.transparent .cura-input-field input::placeholder{color:var(--neutral-black)}.wrapper.transparent .cura-input-field .feedback-icon{order:3;margin:0 20px 0 0}.wrapper.transparent:focus-within .cura-input-field{border:none!important;background-color:transparent!important}.wrapper.transparent:focus-within .cura-input-field input{border:none!important;outline:none}.wrapper.transparent .helper-text{margin-top:0}.wrapper:hover:not(.disabled):not(.isLoading):not(.success):not(.error):not(.isFocused):not(.readOnly):not(.transparent) .cura-input-field{border-color:var(--neutral-dark)}.wrapper:hover:not(.disabled):not(.isLoading):not(.success):not(.error):not(.isFocused):not(.readOnly):not(.transparent) .cura-input-field input{color:var(--neutral-dark)}.wrapper:hover:not(.disabled):not(.isLoading):not(.success):not(.error):not(.isFocused):not(.readOnly):not(.transparent) .cura-input-field input::placeholder{color:var(--neutral-dark)}.wrapper:focus-within:not(.selection) .cura-input-field{border:2px solid var(--info-base)!important;background-color:var(--neutral-purewhite);outline:none}.wrapper:focus-within:not(.selection) .cura-input-field input{color:var(--neutral-black)!important}.wrapper:focus-within.selection .cura-input-field{border-radius:var(--border-radius) var(--border-radius) 0px 0px}.wrapper.success .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:var(--border-radius, 4px);color:var(--primary-base);letter-spacing:.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.wrapper.success .cura-input-field input{flex:1;width:100%;height: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:0 12px 0 8px}.wrapper.success .cura-input-field input::placeholder{color:var(--neutral-dark)}.wrapper.success .cura-input-field .feedback-icon{padding-left:12px}.wrapper.success .cura-input-field input{color:var(--success-darker)!important}.wrapper.success .cura-input-field input::placeholder{color:var(--success-darker)!important}.wrapper.success:not(.transparent) .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:var(--border-radius, 4px);color:var(--primary-base);letter-spacing:.32px;line-height:20px;overflow:hidden;box-sizing:border-box;border:2px solid var(--success-dark)!important;background-color:var(--success-lighter)!important}.wrapper.success:not(.transparent) .cura-input-field input{flex:1;width:100%;height: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:0 12px 0 8px}.wrapper.success:not(.transparent) .cura-input-field input::placeholder{color:var(--neutral-dark)}.wrapper.success:not(.transparent) .cura-input-field .feedback-icon{padding-left:12px}.wrapper.error .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:var(--border-radius, 4px);color:var(--primary-base);letter-spacing:.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.wrapper.error .cura-input-field input{flex:1;width:100%;height: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:0 12px 0 8px}.wrapper.error .cura-input-field input::placeholder{color:var(--neutral-dark)}.wrapper.error .cura-input-field .feedback-icon{padding-left:12px}.wrapper.error .cura-input-field input{color:var(--error-darker)!important}.wrapper.error .cura-input-field input::placeholder{color:var(--error-darker)!important}.wrapper.error:not(.transparent) .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:var(--border-radius, 4px);color:var(--primary-base);letter-spacing:.32px;line-height:20px;overflow:hidden;box-sizing:border-box;border:2px solid var(--error-dark)!important;background-color:var(--error-lighter)!important}.wrapper.error:not(.transparent) .cura-input-field input{flex:1;width:100%;height: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:0 12px 0 8px}.wrapper.error:not(.transparent) .cura-input-field input::placeholder{color:var(--neutral-dark)}.wrapper.error:not(.transparent) .cura-input-field .feedback-icon{padding-left:12px}.wrapper.small .cura-input-field{width:100%;height:32px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:var(--border-radius, 4px);color:var(--primary-base);letter-spacing:.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.wrapper.small .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:12px;box-sizing:border-box;padding:0 12px 0 8px}.wrapper.small .cura-input-field input::placeholder{color:var(--neutral-dark)}.wrapper.small .cura-input-field .feedback-icon{padding-left:12px}.wrapper.small .cura-input-field input{line-height:13px;letter-spacing:.72px}.wrapper.small .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-regular)}.wrapper.small.label .menu{top:53px}.wrapper.small .menu{top:33px}.wrapper.medium .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:var(--border-radius, 4px);color:var(--primary-base);letter-spacing:.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.wrapper.medium .cura-input-field input{flex:1;width:100%;height: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:0 12px 0 8px}.wrapper.medium .cura-input-field input::placeholder{color:var(--neutral-dark)}.wrapper.medium .cura-input-field .feedback-icon{padding-left:12px}.wrapper.medium .cura-input-field input{line-height:16px;letter-spacing:.56px}.wrapper.medium .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-regular)}.wrapper.medium.label .menu{top:61px}.wrapper.medium .menu{top:40px}.wrapper.large .cura-input-field{width:100%;height:44px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:var(--border-radius, 4px);color:var(--primary-base);letter-spacing:.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.wrapper.large .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:16px;box-sizing:border-box;padding:0 12px 0 8px}.wrapper.large .cura-input-field input::placeholder{color:var(--neutral-dark)}.wrapper.large .cura-input-field .feedback-icon{padding-left:12px}.wrapper.large .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-bold)}.wrapper.large.label .menu{top:69px}.wrapper.large .menu{top:47px}.wrapper.disabled .cura-input-field{background-color:var(--neutral-white);border:2px solid var(--neutral-base)}.wrapper.disabled .cura-input-field input{color:var(--neutral-medium)}.wrapper.disabled .cura-input-field input::placeholder{color:var(--neutral-medium)}.required{color:red}.menu{position:absolute;left:0;right:-1px;background:#fff;border:2px solid var(--neutral-light);border-radius:4px;z-index:1000;max-height:285px;overflow:hidden;border-top:transparent;align-items:center;scrollbar-color:var(--neutral-medium) var(--neutral-black-20);overflow-y:auto;box-shadow:0 4px 8px #26262629}.menu.open{border-radius:0!important}\n"] }]
358
- }], ctorParameters: () => [], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", 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"] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], iconName: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconName", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], searchBehavior: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchBehavior", required: false }] }], caseSensitive: [{ type: i0.Input, args: [{ isSignal: true, alias: "caseSensitive", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }], searchTermInput: [{ type: i0.Output, args: ["searchTermInput"] }], inputElement: [{ type: i0.ViewChild, args: ['inputElement', { isSignal: true }] }], options: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => CuraSelectOptionComponent), { isSignal: true }] }] } });
359
-
360
- /**
361
- * Generated bundle index. Do not edit.
362
- */
363
-
364
- export { CuraSelectComponent };
365
- //# sourceMappingURL=rededor-site-front-end-lib-cura-forms-cura-select.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rededor-site-front-end-lib-cura-forms-cura-select.mjs","sources":["../../../projects/site-front-end-lib/cura/forms/cura-select/cura-select.component.ts","../../../projects/site-front-end-lib/cura/forms/cura-select/cura-select.component.html","../../../projects/site-front-end-lib/cura/forms/cura-select/rededor-site-front-end-lib-cura-forms-cura-select.ts"],"sourcesContent":["import {\r\n Component,\r\n input,\r\n output,\r\n signal,\r\n computed,\r\n inject,\r\n forwardRef,\r\n ElementRef,\r\n AfterViewInit,\r\n OnDestroy,\r\n viewChild,\r\n contentChildren,\r\n model,\r\n effect,\r\n linkedSignal,\r\n PLATFORM_ID,\r\n} from '@angular/core';\r\nimport { CommonModule, isPlatformBrowser } 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 { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';\r\nimport { CuraSelectOptionComponent } from '@rededor/site-front-end-lib/cura/forms/cura-select-option';\r\nimport { SelectMode, SelectSize, SelectStatus, SelectSelectedEvent, SelectSearchEvent } from './cura-select.definitions';\r\n\r\n@Component({\r\n selector: 'cura-select',\r\n imports: [CommonModule, CuraLabelComponent, CuraIconComponent],\r\n templateUrl: './cura-select.component.html',\r\n styleUrls: ['./cura-select.component.scss'],\r\n host: {\r\n role: 'combobox',\r\n '[attr.aria-label]': 'label()',\r\n '[attr.aria-required]': 'required()',\r\n '[attr.aria-disabled]': 'disabled()',\r\n '[attr.aria-invalid]': 'status() === \"error\"',\r\n '[attr.aria-expanded]': 'isOpen()',\r\n '[attr.aria-controls]': 'listboxId()',\r\n '[attr.aria-activedescendant]': 'activeOptionId()',\r\n },\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => CuraSelectComponent),\r\n multi: true,\r\n },\r\n ],\r\n})\r\nexport class CuraSelectComponent implements ControlValueAccessor, AfterViewInit, OnDestroy {\r\n private curaApi: CuraApiService = inject(CuraApiService);\r\n private elementRef = inject(ElementRef);\r\n private platformId = inject(PLATFORM_ID);\r\n\r\n name = input<string>('');\r\n\r\n /**\r\n * The label text for the select component\r\n */\r\n label = input<string>('');\r\n\r\n /**\r\n * Placeholder text for the input field\r\n */\r\n placeholder = input<string>('');\r\n\r\n /**\r\n * Current value of the select component\r\n */\r\n value = model<string | any>('');\r\n\r\n /**\r\n * Display mode of the select component\r\n */\r\n mode = input<SelectMode>('default');\r\n\r\n /**\r\n * Size of the select component\r\n */\r\n size = input<SelectSize>('medium');\r\n\r\n /**\r\n * Icon name for the select component\r\n */\r\n iconName = input<string | undefined>(undefined);\r\n\r\n /**\r\n * Status of the select component\r\n */\r\n status = input<SelectStatus>('default');\r\n\r\n /**\r\n * Whether the select component is disabled\r\n */\r\n disabled = input<boolean>(false);\r\n\r\n /**\r\n * Whether the select component is required\r\n */\r\n required = input<boolean>(false);\r\n\r\n /**\r\n * Enable/Disable search at options by term\r\n */\r\n searchBehavior = input<boolean>(false);\r\n\r\n /**\r\n * The search will be sensitive to accents\r\n */\r\n caseSensitive = input<boolean>(true);\r\n\r\n /**\r\n * CSS max-height property for dropdown item.\r\n * Can also be used by css property --max-height.\r\n * Default: 285px\r\n */\r\n maxHeight = input<string>('285px');\r\n\r\n /**\r\n * Event emitted when an option is selected\r\n */\r\n selected = output<SelectSelectedEvent>();\r\n\r\n /**\r\n * Event emitted when search term changes\r\n */\r\n searchTermInput = output<SelectSearchEvent>();\r\n\r\n // Internal state signals\r\n isHovered = signal<boolean>(false);\r\n isFocused = signal<boolean>(false);\r\n isOpen = signal<boolean>(false);\r\n activeIndex = signal<number>(-1);\r\n\r\n textInput = linkedSignal(() => {\r\n const opts = this.options();\r\n const val = this.value();\r\n const option = opts.find((o) => o.value() === val);\r\n return option?.elementRef?.nativeElement?.textContent ?? '';\r\n });\r\n\r\n // Unique ID for accessibility\r\n private componentId = `cura-select-${Math.random().toString(36).substring(2, 8)}`;\r\n\r\n // Form control callbacks\r\n private onChange = (value: string) => {};\r\n private onTouched = () => {};\r\n\r\n // ViewChild references\r\n inputElement = viewChild<ElementRef<HTMLInputElement>>('inputElement');\r\n options = contentChildren<CuraSelectOptionComponent>(CuraSelectOptionComponent);\r\n\r\n // Computed signals\r\n currentIconName = computed(() => {\r\n const iconMap = {\r\n default: this.iconName() || '',\r\n success: 'checkCircle',\r\n error: 'alertCircle',\r\n };\r\n return iconMap[this.status()];\r\n });\r\n\r\n private colorConfig = computed(() => {\r\n if (this.disabled()) {\r\n return {\r\n label: 'neutral-medium',\r\n text: 'neutral-medium',\r\n icon: 'neutral-medium',\r\n };\r\n }\r\n\r\n const isStatusDefault = this.status() === 'default';\r\n const isHoveredOrFocused = this.isFocused() || this.isHovered();\r\n\r\n return {\r\n label: !isStatusDefault || isHoveredOrFocused ? 'neutral-black' : 'neutral-dark',\r\n text: this.getTextColor(isHoveredOrFocused, isStatusDefault),\r\n icon: this.getTextColor(isHoveredOrFocused, isStatusDefault),\r\n };\r\n });\r\n\r\n containerClasses = computed(() => {\r\n return {\r\n wrapper: true,\r\n label: !!this.label(),\r\n disabled: this.disabled(),\r\n transparent: this.mode() === 'transparent',\r\n [this.size().toLowerCase()]: true,\r\n [this.status().toLowerCase()]: true,\r\n };\r\n });\r\n\r\n labelColor = computed(() => this.colorConfig().label);\r\n textColor = computed(() => this.colorConfig().text);\r\n iconColor = computed(() => this.colorConfig().icon);\r\n\r\n // Accessibility computed signals\r\n listboxId = computed(() => `${this.componentId}-listbox`);\r\n activeOptionId = computed(() => {\r\n const activeOption = this.options()?.[this.activeIndex()];\r\n return activeOption?.optionId() || '';\r\n });\r\n\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-light',\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 constructor() {\r\n effect(() => {\r\n this.updateOptionHighlights(this.activeIndex());\r\n });\r\n\r\n effect(() => {\r\n const currentValue = this.value();\r\n this.options().forEach((opt) => opt.selected.set(opt.value() === currentValue));\r\n });\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.initializeOptions();\r\n this.addOutsideClickListener();\r\n }\r\n\r\n ngOnDestroy() {\r\n if (isPlatformBrowser(this.platformId)) {\r\n this.removeOutsideClickListener();\r\n }\r\n }\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 private getTextColor(isHoveredOrFocused: boolean, isStatusDefault: boolean): string {\r\n if (isHoveredOrFocused && isStatusDefault) return 'neutral-black';\r\n if (this.status() === 'success') return 'success-dark';\r\n if (this.status() === 'error') return 'error-dark';\r\n return 'neutral-dark';\r\n }\r\n\r\n private initializeOptions() {\r\n if (!this.options()) return;\r\n\r\n this.options().forEach((option) => {\r\n option.size.set(this.size());\r\n option.active.set(false);\r\n option.visible.set(true);\r\n });\r\n }\r\n\r\n private selectOption(selectedOption: CuraSelectOptionComponent): void {\r\n const value = selectedOption.value();\r\n this.value.set(value);\r\n this.onChange(value);\r\n this.isOpen.set(false);\r\n this.filterOptions(selectedOption.elementRef?.nativeElement?.textContent || '');\r\n this.selected.emit({ value });\r\n }\r\n\r\n private removeAccents(str: string): string {\r\n return str.normalize('NFD').replace(/[̀-ͯ]/g, '');\r\n }\r\n\r\n private filterOptions(searchTerm: string) {\r\n if (!this.searchBehavior()) {\r\n return;\r\n }\r\n\r\n this.searchTermInput.emit({ searchTerm });\r\n\r\n let processedSearchTerm = searchTerm;\r\n if (!this.caseSensitive()) {\r\n processedSearchTerm = this.removeAccents(searchTerm).toLowerCase();\r\n }\r\n\r\n this.options().forEach((option) => {\r\n let optionText = option.elementRef?.nativeElement?.textContent || '';\r\n if (!this.caseSensitive()) {\r\n optionText = this.removeAccents(optionText.toLowerCase());\r\n }\r\n\r\n const isVisible = optionText.includes(processedSearchTerm);\r\n option.visible.set(isVisible);\r\n option.elementRef.nativeElement.style.display = isVisible ? 'block' : 'none';\r\n });\r\n }\r\n\r\n // Event handlers\r\n handleKeyNavigation(event: KeyboardEvent) {\r\n const { code: keyCode } = event;\r\n\r\n if (!this.isOpen() && keyCode === 'ArrowDown') {\r\n this.isOpen.set(true);\r\n this.activeIndex.set(0);\r\n return;\r\n }\r\n\r\n if (keyCode === 'ArrowDown') {\r\n event.preventDefault();\r\n this.updateActiveIndex(1);\r\n }\r\n\r\n if (keyCode === 'ArrowUp') {\r\n event.preventDefault();\r\n this.updateActiveIndex(-1);\r\n }\r\n\r\n if (keyCode === 'Enter' || keyCode === 'Space') {\r\n this.options()?.[this.activeIndex()]?.elementRef?.nativeElement?.click();\r\n }\r\n\r\n if (keyCode === 'Escape') {\r\n this.isOpen.set(false);\r\n }\r\n }\r\n\r\n private updateActiveIndex(direction: number) {\r\n const visibleOptions = this.options();\r\n if (!visibleOptions || visibleOptions.length === 0) return;\r\n\r\n this.activeIndex.update((index) => (index + direction + visibleOptions.length) % visibleOptions.length);\r\n }\r\n\r\n handleInputChange(event: Event) {\r\n const value = (event.target as HTMLInputElement).value;\r\n this.textInput.set(value);\r\n this.isOpen.set(value.length > 0);\r\n this.onChange(value);\r\n this.filterOptions(value);\r\n }\r\n\r\n handleClick(event: MouseEvent) {\r\n if (this.disabled()) {\r\n event.preventDefault();\r\n return;\r\n }\r\n\r\n const target = event.target as HTMLElement;\r\n const optionElement = target.closest('cura-select-option') as HTMLElement;\r\n\r\n if (optionElement) {\r\n const clickedOption = this.options()?.find((option) => option.elementRef?.nativeElement === optionElement);\r\n if (clickedOption) {\r\n this.selectOption(clickedOption);\r\n }\r\n return;\r\n }\r\n\r\n this.isOpen.update((value) => !value);\r\n }\r\n\r\n private updateOptionHighlights(newActiveIndex: number): void {\r\n this.options().forEach((option, index) => {\r\n option.active.set(index === newActiveIndex);\r\n });\r\n }\r\n\r\n /**\r\n * Controla o clique fora do componente\r\n */\r\n private addOutsideClickListener(): void {\r\n if (!isPlatformBrowser(this.platformId)) {\r\n return;\r\n }\r\n document.addEventListener('click', this.handleClickOutside);\r\n }\r\n\r\n private removeOutsideClickListener(): void {\r\n if (!isPlatformBrowser(this.platformId)) {\r\n return;\r\n }\r\n document.removeEventListener('click', this.handleClickOutside);\r\n }\r\n\r\n private handleClickOutside = (event: MouseEvent): void => {\r\n if (!isPlatformBrowser(this.platformId)) {\r\n return;\r\n }\r\n\r\n const clickedOutside = !this.elementRef.nativeElement.contains(event.target as Node);\r\n if (clickedOutside && this.isOpen()) {\r\n this.isOpen.set(false);\r\n }\r\n };\r\n}\r\n","<div [ngClass]=\"containerClasses()\" [style]=\"styles()\" (mouseenter)=\"isHovered.set(true)\" (mouseleave)=\"isHovered.set(false)\" (click)=\"handleClick($event)\">\r\n @if (label()) {\r\n <cura-label class=\"label\" weight=\"bold\" [size]=\"size() === 'large' ? 'small' : 'xsmall'\" [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\r\n [ngClass]=\"{\r\n 'cura-input-field': true,\r\n open: isOpen(),\r\n }\"\r\n >\r\n @if (status() !== 'default' || iconName()) {\r\n <cura-icon\r\n class=\"feedback-icon\"\r\n [name]=\"currentIconName()\"\r\n iconset=\"default\"\r\n [size]=\"size() === 'large' ? 20 : 16\"\r\n [color]=\"iconColor()\"\r\n [style]=\"styles()\"\r\n >\r\n </cura-icon>\r\n }\r\n\r\n <input\r\n #inputElement\r\n type=\"text\"\r\n autocomplete=\"off\"\r\n [placeholder]=\"placeholder()\"\r\n [disabled]=\"disabled()\"\r\n [required]=\"required()\"\r\n [readonly]=\"!searchBehavior()\"\r\n [value]=\"textInput()\"\r\n [attr.id]=\"name() || null\"\r\n [attr.name]=\"name() || null\"\r\n [attr.aria-required]=\"required()\"\r\n [attr.aria-disabled]=\"disabled()\"\r\n [attr.aria-invalid]=\"status() === 'error'\"\r\n [attr.aria-autocomplete]=\"searchBehavior() ? 'list' : 'none'\"\r\n [attr.aria-controls]=\"listboxId()\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n [attr.aria-activedescendant]=\"activeOptionId()\"\r\n role=\"combobox\"\r\n [style]=\"styles()\"\r\n (focus)=\"isFocused.set(true)\"\r\n (blur)=\"isFocused.set(false)\"\r\n (input)=\"handleInputChange($event)\"\r\n (keydown)=\"handleKeyNavigation($event)\"\r\n />\r\n\r\n <button\r\n class=\"up-down-button\"\r\n type=\"button\"\r\n [attr.aria-label]=\"isOpen() ? 'Fechar lista de opções' : 'Abrir lista de opções'\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n [attr.aria-controls]=\"listboxId()\"\r\n [disabled]=\"disabled()\"\r\n tabindex=\"-1\"\r\n >\r\n <cura-icon [name]=\"isOpen() ? 'up' : 'down'\" class=\"up-down-icon\" [color]=\"disabled() ? 'neutral-dark' : 'primary-base'\" [size]=\"16\" iconset=\"default\">\r\n </cura-icon>\r\n </button>\r\n </div>\r\n\r\n <cura-label class=\"helper-text\" size=\"xsmall\" [color]=\"textColor()\" [weight]=\"mode() === 'transparent' ? 'bold' : 'regular'\">\r\n <ng-content></ng-content>\r\n </cura-label>\r\n\r\n @if (isOpen()) {\r\n <div\r\n [ngClass]=\"{\r\n menu: true,\r\n open: isOpen(),\r\n }\"\r\n [style]=\"{ '--max-height': maxHeight() }\"\r\n role=\"listbox\"\r\n [id]=\"listboxId()\"\r\n [attr.aria-label]=\"'Lista de opções para ' + (label() || 'seleção')\"\r\n [attr.aria-multiselectable]=\"false\"\r\n >\r\n <ng-content select=\"cura-select-option\"></ng-content>\r\n </div>\r\n }\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MAiDa,mBAAmB,CAAA;AAqM9B,IAAA,WAAA,GAAA;AApMQ,QAAA,IAAA,CAAA,OAAO,GAAmB,MAAM,CAAC,cAAc,CAAC;AAChD,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;AAExC,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAS,EAAE,gDAAC;AAExB;;AAEG;AACH,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE,iDAAC;AAEzB;;AAEG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAS,EAAE,uDAAC;AAE/B;;AAEG;AACH,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAe,EAAE,iDAAC;AAE/B;;AAEG;AACH,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAa,SAAS,gDAAC;AAEnC;;AAEG;AACH,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAa,QAAQ,gDAAC;AAElC;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAq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