@koobiq/components 18.30.0 → 18.32.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 (254) hide show
  1. package/actions-panel/actions-panel-config.d.ts +2 -0
  2. package/actions-panel/actions-panel.d.ts +3 -57
  3. package/autocomplete/autocomplete-trigger.directive.d.ts +3 -4
  4. package/autocomplete/autocomplete.component.d.ts +1 -0
  5. package/autocomplete/autocomplete.module.d.ts +1 -1
  6. package/button-toggle/button-toggle.module.d.ts +3 -4
  7. package/code-block/code-block-highlight.d.ts +1 -2
  8. package/code-block/code-block.d.ts +57 -10
  9. package/core/common-behaviors/color.d.ts +3 -0
  10. package/core/common-behaviors/common-module.d.ts +16 -3
  11. package/core/common-behaviors/error-state.d.ts +18 -0
  12. package/core/common-behaviors/index.d.ts +1 -1
  13. package/core/form-field/form-field-ref.d.ts +5 -3
  14. package/core/option/_option-theme.scss +24 -2
  15. package/core/option/option.d.ts +2 -2
  16. package/core/public-api.d.ts +1 -0
  17. package/core/selection/pseudo-checkbox/pseudo-checkbox.d.ts +1 -1
  18. package/core/styles/common/_select.scss +10 -24
  19. package/core/styles/theming/_theming.scss +0 -4
  20. package/core/tokens/index.d.ts +1 -0
  21. package/core/tokens/window.d.ts +5 -0
  22. package/core/validation/validation.d.ts +23 -2
  23. package/datepicker/datepicker-input.directive.d.ts +14 -5
  24. package/datepicker/datepicker-input.scss +1 -5
  25. package/datepicker/datepicker-module.d.ts +1 -1
  26. package/datepicker/datepicker-toggle.component.d.ts +22 -0
  27. package/datepicker/datepicker-toggle.scss +6 -0
  28. package/dropdown/dropdown-trigger.directive.d.ts +1 -0
  29. package/ellipsis-center/ellipsis-center.directive.d.ts +7 -1
  30. package/esm2022/actions-panel/actions-panel-config.mjs +1 -1
  31. package/esm2022/actions-panel/actions-panel.mjs +16 -113
  32. package/esm2022/autocomplete/autocomplete-trigger.directive.mjs +9 -13
  33. package/esm2022/autocomplete/autocomplete.component.mjs +10 -2
  34. package/esm2022/autocomplete/autocomplete.module.mjs +5 -11
  35. package/esm2022/breadcrumbs/breadcrumbs.mjs +1 -1
  36. package/esm2022/button-toggle/button-toggle.module.mjs +5 -6
  37. package/esm2022/code-block/code-block-highlight.mjs +8 -12
  38. package/esm2022/code-block/code-block.mjs +60 -18
  39. package/esm2022/core/common-behaviors/color.mjs +4 -1
  40. package/esm2022/core/common-behaviors/common-module.mjs +19 -26
  41. package/esm2022/core/common-behaviors/error-state.mjs +28 -1
  42. package/esm2022/core/common-behaviors/index.mjs +2 -2
  43. package/esm2022/core/form-field/form-field-ref.mjs +3 -4
  44. package/esm2022/core/option/option.mjs +9 -7
  45. package/esm2022/core/public-api.mjs +2 -1
  46. package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +3 -3
  47. package/esm2022/core/tokens/index.mjs +2 -0
  48. package/esm2022/core/tokens/window.mjs +19 -0
  49. package/esm2022/core/utils/utils.mjs +2 -1
  50. package/esm2022/core/validation/validation.mjs +21 -2
  51. package/esm2022/core/version.mjs +2 -2
  52. package/esm2022/datepicker/calendar-body.component.mjs +3 -3
  53. package/esm2022/datepicker/calendar-header.component.mjs +3 -3
  54. package/esm2022/datepicker/datepicker-input.directive.mjs +66 -6
  55. package/esm2022/datepicker/datepicker-module.mjs +8 -3
  56. package/esm2022/datepicker/datepicker-toggle.component.mjs +94 -10
  57. package/esm2022/dropdown/dropdown-trigger.directive.mjs +4 -3
  58. package/esm2022/dropdown/dropdown.component.mjs +3 -3
  59. package/esm2022/ellipsis-center/ellipsis-center.directive.mjs +8 -1
  60. package/esm2022/file-upload/multiple-file-upload.component.mjs +2 -2
  61. package/esm2022/filter-bar/filter-bar.mjs +27 -5
  62. package/esm2022/filter-bar/filter-bar.types.mjs +1 -1
  63. package/esm2022/filter-bar/filter-search.mjs +2 -2
  64. package/esm2022/filter-bar/filters.mjs +3 -3
  65. package/esm2022/filter-bar/pipe-add.mjs +2 -2
  66. package/esm2022/filter-bar/pipes/pipe-date.mjs +5 -11
  67. package/esm2022/filter-bar/pipes/pipe-datetime.mjs +5 -11
  68. package/esm2022/filter-bar/pipes/pipe-multi-select.mjs +29 -9
  69. package/esm2022/filter-bar/pipes/pipe-multi-tree-select.mjs +30 -10
  70. package/esm2022/filter-bar/pipes/pipe-select.mjs +2 -2
  71. package/esm2022/filter-bar/pipes/pipe-text.mjs +2 -2
  72. package/esm2022/filter-bar/pipes/pipe-tree-select.mjs +2 -2
  73. package/esm2022/form-field/cleaner.mjs +11 -6
  74. package/esm2022/form-field/error.mjs +20 -0
  75. package/esm2022/form-field/fieldset.mjs +84 -0
  76. package/esm2022/form-field/form-field-control.mjs +2 -2
  77. package/esm2022/form-field/form-field.mjs +247 -74
  78. package/esm2022/form-field/form-field.module.mjs +59 -47
  79. package/esm2022/form-field/hint.mjs +10 -18
  80. package/esm2022/form-field/label.mjs +19 -0
  81. package/esm2022/form-field/password-hint.mjs +6 -5
  82. package/esm2022/form-field/password-toggle.mjs +52 -27
  83. package/esm2022/form-field/prefix.mjs +9 -3
  84. package/esm2022/form-field/public-api.mjs +5 -2
  85. package/esm2022/form-field/reactive-password-hint.mjs +65 -0
  86. package/esm2022/form-field/stepper.mjs +34 -16
  87. package/esm2022/form-field/suffix.mjs +8 -3
  88. package/esm2022/form-field/validate.directive.mjs +16 -19
  89. package/esm2022/icon/icon-button.component.mjs +2 -2
  90. package/esm2022/input/input-number.mjs +7 -2
  91. package/esm2022/input/input.module.mjs +1 -5
  92. package/esm2022/list/list-selection.component.mjs +5 -4
  93. package/esm2022/list/list.component.mjs +2 -2
  94. package/esm2022/modal/modal-util.mjs +2 -1
  95. package/esm2022/navbar/navbar-item.component.mjs +10 -11
  96. package/esm2022/overflow-items/overflow-items.mjs +27 -10
  97. package/esm2022/radio/radio.module.mjs +4 -5
  98. package/esm2022/scrollbar/scrollbar.component.mjs +14 -11
  99. package/esm2022/scrollbar/scrollbar.directive.mjs +2 -1
  100. package/esm2022/select/select.component.mjs +39 -18
  101. package/esm2022/sidepanel/sidepanel.module.mjs +1 -5
  102. package/esm2022/splitter/splitter.component.mjs +5 -3
  103. package/esm2022/tabs/paginated-tab-header.mjs +6 -2
  104. package/esm2022/tabs/tabs.module.mjs +1 -5
  105. package/esm2022/tags/tag-list.component.mjs +2 -2
  106. package/esm2022/textarea/textarea.component.mjs +7 -6
  107. package/esm2022/textarea/textarea.module.mjs +4 -5
  108. package/esm2022/timezone/timezone-option.component.mjs +2 -2
  109. package/esm2022/timezone/timezone-select.component.mjs +6 -4
  110. package/esm2022/toast/toast-animations.mjs +2 -2
  111. package/esm2022/toast/toast.component.mjs +3 -3
  112. package/esm2022/toggle/toggle.component.mjs +3 -3
  113. package/esm2022/toggle/toggle.module.mjs +4 -5
  114. package/esm2022/top-bar/top-bar.mjs +2 -2
  115. package/esm2022/tree/padding.directive.mjs +8 -6
  116. package/esm2022/tree/toggle.mjs +2 -2
  117. package/esm2022/tree/tree-option.component.mjs +5 -4
  118. package/esm2022/tree/tree-selection.component.mjs +2 -2
  119. package/esm2022/tree/tree.mjs +2 -2
  120. package/esm2022/tree-select/tree-select.component.mjs +48 -24
  121. package/fesm2022/koobiq-components-actions-panel.mjs +16 -112
  122. package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
  123. package/fesm2022/koobiq-components-autocomplete.mjs +21 -24
  124. package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
  125. package/fesm2022/koobiq-components-breadcrumbs.mjs +1 -1
  126. package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
  127. package/fesm2022/koobiq-components-button-toggle.mjs +5 -5
  128. package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
  129. package/fesm2022/koobiq-components-code-block.mjs +65 -28
  130. package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
  131. package/fesm2022/koobiq-components-core.mjs +99 -39
  132. package/fesm2022/koobiq-components-core.mjs.map +1 -1
  133. package/fesm2022/koobiq-components-datepicker.mjs +162 -14
  134. package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
  135. package/fesm2022/koobiq-components-dropdown.mjs +5 -4
  136. package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
  137. package/fesm2022/koobiq-components-ellipsis-center.mjs +7 -0
  138. package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
  139. package/fesm2022/koobiq-components-file-upload.mjs +1 -1
  140. package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
  141. package/fesm2022/koobiq-components-filter-bar.mjs +95 -46
  142. package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
  143. package/fesm2022/koobiq-components-form-field.mjs +610 -219
  144. package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
  145. package/fesm2022/koobiq-components-icon.mjs +2 -2
  146. package/fesm2022/koobiq-components-icon.mjs.map +1 -1
  147. package/fesm2022/koobiq-components-input.mjs +7 -5
  148. package/fesm2022/koobiq-components-input.mjs.map +1 -1
  149. package/fesm2022/koobiq-components-list.mjs +6 -5
  150. package/fesm2022/koobiq-components-list.mjs.map +1 -1
  151. package/fesm2022/koobiq-components-modal.mjs +1 -0
  152. package/fesm2022/koobiq-components-modal.mjs.map +1 -1
  153. package/fesm2022/koobiq-components-navbar.mjs +9 -10
  154. package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
  155. package/fesm2022/koobiq-components-overflow-items.mjs +26 -9
  156. package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
  157. package/fesm2022/koobiq-components-radio.mjs +4 -4
  158. package/fesm2022/koobiq-components-radio.mjs.map +1 -1
  159. package/fesm2022/koobiq-components-scrollbar.mjs +14 -10
  160. package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
  161. package/fesm2022/koobiq-components-select.mjs +39 -18
  162. package/fesm2022/koobiq-components-select.mjs.map +1 -1
  163. package/fesm2022/koobiq-components-sidepanel.mjs +1 -4
  164. package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
  165. package/fesm2022/koobiq-components-splitter.mjs +4 -2
  166. package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
  167. package/fesm2022/koobiq-components-tabs.mjs +5 -5
  168. package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
  169. package/fesm2022/koobiq-components-tags.mjs +2 -2
  170. package/fesm2022/koobiq-components-tags.mjs.map +1 -1
  171. package/fesm2022/koobiq-components-textarea.mjs +9 -8
  172. package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
  173. package/fesm2022/koobiq-components-timezone.mjs +7 -5
  174. package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
  175. package/fesm2022/koobiq-components-toast.mjs +3 -3
  176. package/fesm2022/koobiq-components-toast.mjs.map +1 -1
  177. package/fesm2022/koobiq-components-toggle.mjs +6 -6
  178. package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
  179. package/fesm2022/koobiq-components-top-bar.mjs +2 -2
  180. package/fesm2022/koobiq-components-top-bar.mjs.map +1 -1
  181. package/fesm2022/koobiq-components-tree-select.mjs +48 -24
  182. package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
  183. package/fesm2022/koobiq-components-tree.mjs +17 -14
  184. package/fesm2022/koobiq-components-tree.mjs.map +1 -1
  185. package/file-upload/multiple-file-upload.component.d.ts +1 -1
  186. package/filter-bar/filter-bar.d.ts +7 -1
  187. package/filter-bar/filter-bar.types.d.ts +5 -0
  188. package/filter-bar/pipes/pipe-multi-select.d.ts +5 -1
  189. package/filter-bar/pipes/pipe-multi-tree-select.d.ts +5 -1
  190. package/form-field/_fiedset-theme.scss +13 -0
  191. package/form-field/_form-field-theme.scss +29 -13
  192. package/form-field/_hint-theme.scss +21 -22
  193. package/form-field/cleaner.d.ts +5 -1
  194. package/form-field/cleaner.scss +1 -4
  195. package/form-field/error.d.ts +8 -0
  196. package/form-field/fieldset-tokens.scss +5 -0
  197. package/form-field/fieldset.d.ts +27 -0
  198. package/form-field/fieldset.scss +93 -0
  199. package/form-field/form-field-control.d.ts +1 -1
  200. package/form-field/form-field-tokens.scss +13 -3
  201. package/form-field/form-field.d.ts +210 -22
  202. package/form-field/form-field.module.d.ts +14 -12
  203. package/form-field/form-field.scss +58 -78
  204. package/form-field/hint.d.ts +5 -1
  205. package/form-field/hint.scss +3 -5
  206. package/form-field/label.d.ts +6 -0
  207. package/form-field/password-hint.d.ts +1 -1
  208. package/form-field/password-toggle.d.ts +25 -11
  209. package/form-field/password-toggle.scss +1 -2
  210. package/form-field/prefix.d.ts +2 -1
  211. package/form-field/public-api.d.ts +4 -1
  212. package/form-field/reactive-password-hint.d.ts +19 -0
  213. package/form-field/stepper.d.ts +20 -8
  214. package/form-field/stepper.scss +12 -11
  215. package/form-field/suffix.d.ts +2 -1
  216. package/form-field/validate.directive.d.ts +10 -12
  217. package/icon/_icon-button-theme.scss +67 -85
  218. package/input/input-tokens.scss +2 -2
  219. package/input/input.module.d.ts +3 -4
  220. package/input/input.scss +1 -2
  221. package/list/_list-theme.scss +24 -2
  222. package/list/list-tokens.scss +5 -0
  223. package/navbar/navbar-item.component.d.ts +3 -1
  224. package/overflow-items/overflow-items.d.ts +12 -5
  225. package/package.json +6 -6
  226. package/prebuilt-themes/dark-theme.css +1 -1
  227. package/prebuilt-themes/light-theme.css +1 -1
  228. package/prebuilt-themes/theme.css +1 -1
  229. package/radio/radio.module.d.ts +1 -2
  230. package/schematics/ng-add/index.js +5 -5
  231. package/scrollbar/scrollbar.component.d.ts +1 -0
  232. package/select/select-tokens.scss +5 -4
  233. package/select/select.component.d.ts +12 -3
  234. package/sidepanel/sidepanel.module.d.ts +5 -6
  235. package/splitter/splitter.component.d.ts +1 -0
  236. package/tabs/paginated-tab-header.d.ts +1 -0
  237. package/tabs/tabs.module.d.ts +5 -6
  238. package/tags/tag-list.scss +8 -4
  239. package/textarea/textarea.component.d.ts +1 -0
  240. package/textarea/textarea.module.d.ts +2 -3
  241. package/timepicker/timepicker.scss +1 -1
  242. package/toast/toast.component.scss +2 -0
  243. package/toggle/_toggle-theme.scss +10 -2
  244. package/toggle/toggle-tokens.scss +7 -1
  245. package/toggle/toggle.module.d.ts +1 -2
  246. package/toggle/toggle.scss +6 -6
  247. package/top-bar/top-bar.scss +48 -32
  248. package/tree/_tree-theme.scss +30 -7
  249. package/tree/padding.directive.d.ts +1 -1
  250. package/tree/tree-option.scss +5 -2
  251. package/tree/tree-tokens.scss +5 -0
  252. package/tree-select/tree-select.component.d.ts +10 -1
  253. package/esm2022/form-field/form-field-errors.mjs +0 -7
  254. package/form-field/form-field-errors.d.ts +0 -2
@@ -57,7 +57,7 @@ export declare class KbqMultipleFileUploadComponent extends KbqFileUploadBase im
57
57
  protected readonly customFileIcon: TemplateRef<HTMLElement>;
58
58
  /** @docs-private */
59
59
  readonly input: ElementRef<HTMLInputElement>;
60
- private readonly listSelection;
60
+ private readonly listSelection?;
61
61
  private readonly fileSizeHeaderCell;
62
62
  /** @docs-private */
63
63
  protected readonly hint: QueryList<TemplateRef<any>>;
@@ -15,6 +15,11 @@ export declare class KbqFilterBar {
15
15
  filters: KbqFilters;
16
16
  /** @docs-private */
17
17
  filterReset: KbqFilterReset;
18
+ /**
19
+ * This is special logic that unselect all items when all selected because "all selected = nothing selected".
20
+ * Default is true
21
+ * */
22
+ selectedAllEqualsSelectedNothing: boolean;
18
23
  /** Filter that is currently selected */
19
24
  get filter(): KbqFilter | null;
20
25
  set filter(value: KbqFilter | null);
@@ -67,5 +72,6 @@ export declare class KbqFilterBar {
67
72
  private updateLocaleParams;
68
73
  private initDefaultParams;
69
74
  static ɵfac: i0.ɵɵFactoryDeclaration<KbqFilterBar, never>;
70
- static ɵcmp: i0.ɵɵComponentDeclaration<KbqFilterBar, "kbq-filter-bar, [kbq-filter-bar]", never, { "filter": { "alias": "filter"; "required": false; }; "pipeTemplates": { "alias": "pipeTemplates"; "required": false; }; }, { "filterChange": "filterChange"; "onChangePipe": "onChangePipe"; "onRemovePipe": "onRemovePipe"; "onClosePipe": "onClosePipe"; }, ["filters", "filterReset"], ["kbq-filters", "*", "kbq-pipe-add", "kbq-filter-reset", "kbq-filter-search, [kbq-filter-search]", "kbq-filter-refresher, [kbq-filter-refresher]"], true, never>;
75
+ static ɵcmp: i0.ɵɵComponentDeclaration<KbqFilterBar, "kbq-filter-bar, [kbq-filter-bar]", never, { "selectedAllEqualsSelectedNothing": { "alias": "selectedAllEqualsSelectedNothing"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "pipeTemplates": { "alias": "pipeTemplates"; "required": false; }; }, { "filterChange": "filterChange"; "onChangePipe": "onChangePipe"; "onRemovePipe": "onRemovePipe"; "onClosePipe": "onClosePipe"; }, ["filters", "filterReset"], ["kbq-filters", "*", "kbq-pipe-add", "kbq-filter-reset", "kbq-filter-search, [kbq-filter-search]", "kbq-filter-refresher, [kbq-filter-refresher]"], true, never>;
76
+ static ngAcceptInputType_selectedAllEqualsSelectedNothing: unknown;
71
77
  }
@@ -88,6 +88,11 @@ export interface KbqPipe {
88
88
  value: unknown | null;
89
89
  search?: boolean;
90
90
  selectAll?: boolean;
91
+ /**
92
+ * This is special logic that unselect all items when all selected because "all selected = nothing selected".
93
+ * Default is true
94
+ * */
95
+ selectedAllEqualsSelectedNothing?: boolean;
91
96
  /** @deprecated use cleanable = false and removable = false instead */
92
97
  required?: boolean;
93
98
  cleanable: boolean;
@@ -25,6 +25,7 @@ export declare class KbqPipeMultiSelectComponent extends KbqBasePipe<KbqSelectVa
25
25
  get allVisibleOptionsSelected(): boolean;
26
26
  /** true if all options selected */
27
27
  get allOptionsSelected(): boolean;
28
+ get selectedAllEqualsSelectedNothing(): boolean;
28
29
  private get visibleOptions();
29
30
  private selectionAllInProgress;
30
31
  /** @docs-private */
@@ -38,9 +39,12 @@ export declare class KbqPipeMultiSelectComponent extends KbqBasePipe<KbqSelectVa
38
39
  /** @docs-private */
39
40
  toggleSelectionAllByEnterKey(): void;
40
41
  /** @docs-private */
41
- toggleSelectionAll(): void;
42
+ toggleSelectionAll(emitEvent?: boolean): void;
43
+ private emitChangePipeEvent;
42
44
  /** Comparator of selected options */
43
45
  compareByValue: (o1: any, o2: any) => boolean;
46
+ /** handler for select all options in select */
47
+ selectAllHandler: (event: KeyboardEvent) => void;
44
48
  onClose(): void;
45
49
  /** opens select */
46
50
  open(): void;
@@ -28,6 +28,7 @@ export declare class KbqPipeMultiTreeSelectComponent extends KbqBasePipe<KbqSele
28
28
  get numberOfSelectedLeaves(): number;
29
29
  /** true if all options selected */
30
30
  get allOptionsSelected(): boolean;
31
+ get selectedAllEqualsSelectedNothing(): boolean;
31
32
  /** true if all visible options selected */
32
33
  get allVisibleOptionsSelected(): boolean;
33
34
  constructor();
@@ -38,13 +39,16 @@ export declare class KbqPipeMultiTreeSelectComponent extends KbqBasePipe<KbqSele
38
39
  value: any;
39
40
  }): void;
40
41
  searchKeydownHandler(): void;
41
- toggleSelectAllNode(): void;
42
+ toggleSelectAllNode(emitEvent?: boolean): void;
42
43
  /** updates values for selection and value template */
43
44
  updateTemplates: (templates: KbqPipeTemplate[] | null) => void;
44
45
  /** opens select */
45
46
  open(): void;
46
47
  onOpen(): void;
47
48
  onClose(): void;
49
+ /** handler for select all options in select */
50
+ selectAllHandler: (event: KeyboardEvent) => void;
51
+ private emitChangePipeEvent;
48
52
  private toggleParents;
49
53
  private transformer;
50
54
  private getLevel;
@@ -0,0 +1,13 @@
1
+ @use './form-field-theme';
2
+ @use './form-field';
3
+
4
+ @mixin kbq-fieldset-theme {
5
+ .kbq-form-field__hint {
6
+ @include form-field-theme.kbq-form-field-hint-theme();
7
+ @include form-field-theme.kbq-form-field-hint-typography();
8
+
9
+ &:empty {
10
+ margin-top: 0;
11
+ }
12
+ }
13
+ }
@@ -1,6 +1,19 @@
1
- @use '../core/styles/common/tokens' as *;
1
+ @use '../core/styles/common/tokens';
2
2
 
3
- @mixin kbq-form-field-state($state-name) {
3
+ @mixin kbq-form-field-hint-theme {
4
+ > .kbq-hint:not(.kbq-password-hint, .kbq-contrast-fade, .kbq-success, .kbq-warning, .kbq-error) {
5
+ color: var(--kbq-form-field-hint-text);
6
+ }
7
+ }
8
+
9
+ @mixin kbq-form-field-hint-typography {
10
+ > .kbq-hint:not(.kbq-password-hint, .kbq-reactive-password-hint, .kbq-contrast-fade, .kbq-success, .kbq-warning)
11
+ .kbq-hint__text {
12
+ @include tokens.kbq-typography-level-to-styles-css-variables(typography, text-compact);
13
+ }
14
+ }
15
+
16
+ @mixin _kbq-form-field-state($state-name) {
4
17
  .kbq-form-field__container {
5
18
  border-color: var(--kbq-form-field-#{$state-name}-border-color);
6
19
  background-color: var(--kbq-form-field-#{$state-name}-background);
@@ -27,7 +40,7 @@
27
40
 
28
41
  @mixin kbq-form-field-theme() {
29
42
  .kbq-form-field {
30
- @include kbq-form-field-state(default);
43
+ @include _kbq-form-field-state(default);
31
44
 
32
45
  & .kbq-input {
33
46
  //https://css-tricks.com/almanac/selectors/a/autofill/
@@ -44,7 +57,7 @@
44
57
  &.kbq-form-field_invalid,
45
58
  // Invalid by `KbqValidateDirective`
46
59
  &.kbq-form-field_has-validate-directive.ng-invalid {
47
- @include kbq-form-field-state(states-error);
60
+ @include _kbq-form-field-state(states-error);
48
61
  }
49
62
 
50
63
  &.kbq-form-field-type-input,
@@ -55,7 +68,7 @@
55
68
  &.kbq-form-field-type-tag-list,
56
69
  &.kbq-form-field-type-select.cdk-keyboard-focused {
57
70
  &.cdk-focused {
58
- @include kbq-form-field-state(states-focused);
71
+ @include _kbq-form-field-state(states-focused);
59
72
 
60
73
  & .kbq-form-field__container {
61
74
  box-shadow: 0 0 0.1px 1px var(--kbq-form-field-states-focused-focus-outline);
@@ -66,16 +79,21 @@
66
79
  &.kbq-form-field_invalid,
67
80
  // Invalid by `KbqValidateDirective`
68
81
  &.kbq-form-field_has-validate-directive.ng-invalid {
69
- @include kbq-form-field-state(states-error);
82
+ @include _kbq-form-field-state(states-error);
70
83
 
71
84
  &.cdk-focused .kbq-form-field__container {
72
85
  box-shadow: 0 0 0.1px 1px var(--kbq-form-field-states-error-focused-focus-outline);
73
86
  }
87
+
88
+ & .kbq-icon.kbq-empty {
89
+ color: var(--kbq-form-field-states-error-text);
90
+ -webkit-text-fill-color: var(--kbq-form-field-states-error-text);
91
+ }
74
92
  }
75
93
  }
76
94
 
77
95
  &.kbq-disabled {
78
- @include kbq-form-field-state(states-disabled);
96
+ @include _kbq-form-field-state(states-disabled);
79
97
 
80
98
  .kbq-icon.kbq-empty {
81
99
  color: var(--kbq-form-field-states-disabled-text);
@@ -91,19 +109,17 @@
91
109
  }
92
110
 
93
111
  .kbq-form-field__hint {
94
- & > .kbq-hint:not(.kbq-password-hint, .kbq-contrast-fade, .kbq-success, .kbq-warning, .kbq-error) {
95
- color: var(--kbq-form-field-hint-text);
96
- }
112
+ @include kbq-form-field-hint-theme();
97
113
  }
98
114
  }
99
115
  }
100
116
 
101
117
  @mixin kbq-form-field-typography() {
102
118
  .kbq-form-field {
103
- @include kbq-typography-level-to-styles-css-variables(typography, text-normal);
119
+ @include tokens.kbq-typography-level-to-styles-css-variables(typography, text-normal);
104
120
 
105
- .kbq-form-field__hint > .kbq-hint:not(.kbq-password-hint) .kbq-hint__text {
106
- @include kbq-typography-level-to-styles-css-variables(typography, text-compact);
121
+ .kbq-form-field__hint {
122
+ @include kbq-form-field-hint-typography();
107
123
  }
108
124
  }
109
125
  }
@@ -1,7 +1,6 @@
1
- @use '../core/styles/theming/theming' as *;
2
- @use '../core/styles/common/tokens' as *;
1
+ @use '../core/styles/common/tokens';
3
2
 
4
- @mixin kbq-hint-color($type, $style-name) {
3
+ @mixin _kbq-hint-color($type, $style-name) {
5
4
  color: var(--kbq-hint-#{$type}-#{$style-name}-text);
6
5
 
7
6
  & .kbq-icon.kbq-empty {
@@ -12,47 +11,47 @@
12
11
  @mixin kbq-hint-theme() {
13
12
  .kbq-hint {
14
13
  &.kbq-contrast-fade {
15
- @include kbq-hint-color(fill-text-on, fade-contrast);
14
+ @include _kbq-hint-color(fill-text-on, fade-contrast);
16
15
  }
17
16
 
18
17
  &.kbq-success {
19
- @include kbq-hint-color(fill-text-on, success);
18
+ @include _kbq-hint-color(fill-text-on, success);
20
19
  }
21
20
 
22
21
  &.kbq-warning {
23
- @include kbq-hint-color(fill-text-on, warning);
22
+ @include _kbq-hint-color(fill-text-on, warning);
24
23
  }
25
24
 
26
25
  &.kbq-error {
27
- @include kbq-hint-color(fill-text-on, error);
26
+ @include _kbq-hint-color(fill-text-on, error);
28
27
  }
29
- }
30
28
 
31
- .kbq-hint.kbq-hint_fill-text-off {
32
- &.kbq-contrast-fade {
33
- @include kbq-hint-color(fill-text-off, fade-contrast);
34
- }
29
+ &.kbq-hint_fill-text-off {
30
+ &.kbq-contrast-fade {
31
+ @include _kbq-hint-color(fill-text-off, fade-contrast);
32
+ }
35
33
 
36
- &.kbq-success {
37
- @include kbq-hint-color(fill-text-off, success);
38
- }
34
+ &.kbq-success {
35
+ @include _kbq-hint-color(fill-text-off, success);
36
+ }
39
37
 
40
- &.kbq-warning {
41
- @include kbq-hint-color(fill-text-off, warning);
42
- }
38
+ &.kbq-warning {
39
+ @include _kbq-hint-color(fill-text-off, warning);
40
+ }
43
41
 
44
- &.kbq-error {
45
- @include kbq-hint-color(fill-text-off, error);
42
+ &.kbq-error {
43
+ @include _kbq-hint-color(fill-text-off, error);
44
+ }
46
45
  }
47
46
  }
48
47
  }
49
48
 
50
49
  @mixin kbq-hint-typography() {
51
50
  .kbq-hint .kbq-hint__text {
52
- @include kbq-typography-level-to-styles-css-variables(typography, text-normal);
51
+ @include tokens.kbq-typography-level-to-styles-css-variables(typography, text-normal);
53
52
  }
54
53
 
55
54
  .kbq-hint.kbq-hint_compact .kbq-hint__text {
56
- @include kbq-typography-level-to-styles-css-variables(typography, text-compact);
55
+ @include tokens.kbq-typography-level-to-styles-css-variables(typography, text-compact);
57
56
  }
58
57
  }
@@ -1,5 +1,9 @@
1
1
  import * as i0 from "@angular/core";
2
+ /**
3
+ * Element to be placed in end of the form field.
4
+ * Resets form control by click.
5
+ */
2
6
  export declare class KbqCleaner {
3
7
  static ɵfac: i0.ɵɵFactoryDeclaration<KbqCleaner, never>;
4
- static ɵcmp: i0.ɵɵComponentDeclaration<KbqCleaner, "kbq-cleaner", ["kbqCleaner"], {}, {}, never, never, false, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<KbqCleaner, "kbq-cleaner", ["kbqCleaner"], {}, {}, never, never, true, never>;
5
9
  }
@@ -3,9 +3,6 @@
3
3
  align-items: center;
4
4
  justify-content: center;
5
5
 
6
- width: var(--kbq-form-field-size-icon-button-size);
7
- margin-right: var(--kbq-form-field-size-icon-button-margin-right);
6
+ width: var(--kbq-form-field-size-addon-width);
8
7
  height: 100%;
9
-
10
- cursor: pointer;
11
8
  }
@@ -0,0 +1,8 @@
1
+ import { KbqHint } from './hint';
2
+ import * as i0 from "@angular/core";
3
+ /** Error text to be shown below the form field control. */
4
+ export declare class KbqError extends KbqHint {
5
+ constructor();
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<KbqError, never>;
7
+ static ɵcmp: i0.ɵɵComponentDeclaration<KbqError, "kbq-error", ["kbqError"], {}, {}, never, ["[kbq-icon]", "*"], true, never>;
8
+ }
@@ -0,0 +1,5 @@
1
+ .kbq-fieldset {
2
+ --kbq-fieldset-legend-margin: var(--kbq-size-s);
3
+ --kbq-form-field-hint-size-margin-top: var(--kbq-size-xs);
4
+ --kbq-form-field-hint-text: var(--kbq-foreground-contrast-secondary);
5
+ }
@@ -0,0 +1,27 @@
1
+ import { Signal } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ /** Directive for marking an element as legend of `KbqFieldset` */
4
+ export declare class KbqLegend {
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<KbqLegend, never>;
6
+ static ɵdir: i0.ɵɵDirectiveDeclaration<KbqLegend, "[kbqLegend]", never, {}, {}, never, never, true, never>;
7
+ }
8
+ /** Directive for marking elements as items inside `KbqFieldset` */
9
+ export declare class KbqFieldsetItem {
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<KbqFieldsetItem, never>;
11
+ static ɵdir: i0.ɵɵDirectiveDeclaration<KbqFieldsetItem, "[kbqFieldsetItem]", never, {}, {}, never, never, true, never>;
12
+ }
13
+ /**
14
+ * A group of form-fields and related controls.
15
+ * Container component emulating the native `fieldset` element.
16
+ */
17
+ export declare class KbqFieldset {
18
+ private readonly legend;
19
+ /**
20
+ * Computes the aria-label from the inner text of the legend element.
21
+ * Used to enhance accessibility by labeling the group.
22
+ * @docs-private
23
+ */
24
+ protected readonly ariaLabel: Signal<string | undefined>;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<KbqFieldset, never>;
26
+ static ɵcmp: i0.ɵɵComponentDeclaration<KbqFieldset, "kbq-fieldset", never, {}, {}, ["legend"], ["[kbqLegend]", "*", "kbq-error", "kbq-hint, kbq-password-hint, kbq-reactive-password-hint"], true, never>;
27
+ }
@@ -0,0 +1,93 @@
1
+ @use './form-field-theme';
2
+ @use './form-field';
3
+ @use './fiedset-theme';
4
+
5
+ .kbq-fieldset {
6
+ display: flex;
7
+ flex-direction: column;
8
+
9
+ .kbq-legend {
10
+ margin-bottom: var(--kbq-fieldset-legend-margin);
11
+ }
12
+
13
+ .kbq-form-field__hint {
14
+ @include form-field.kbq-form-field-hint-geometry();
15
+
16
+ &:empty {
17
+ margin-top: 0;
18
+ }
19
+ }
20
+
21
+ .kbq-form-field {
22
+ // set selector specifity to 0 , so focused state will override z-index
23
+ :where(&.kbq-form-field_invalid, &.kbq-form-field_has-validate-directive.ng-invalid) {
24
+ z-index: 2;
25
+ }
26
+
27
+ // Keep form-field__container and parent heights in sync (zoom-safe)
28
+ .kbq-form-field__container {
29
+ height: 100%;
30
+ }
31
+
32
+ &:first-child:not(:last-child) {
33
+ .kbq-form-field__container,
34
+ .kbq-form-field__container .kbq-input {
35
+ border-top-right-radius: 0;
36
+ border-bottom-right-radius: 0;
37
+ }
38
+ }
39
+
40
+ &:not(:first-child):not(:last-child) {
41
+ --kbq-form-field-size-border-radius: 0;
42
+
43
+ .kbq-form-field__container {
44
+ border-radius: 0;
45
+ }
46
+ }
47
+
48
+ &:last-child:not(:first-child) {
49
+ .kbq-form-field__container,
50
+ .kbq-form-field__container .kbq-input {
51
+ border-top-left-radius: 0;
52
+ border-bottom-left-radius: 0;
53
+ }
54
+ }
55
+
56
+ &:not(:first-child) {
57
+ margin-left: calc(var(--kbq-size-border-width) * -1);
58
+ }
59
+ }
60
+
61
+ @include fiedset-theme.kbq-fieldset-theme();
62
+ }
63
+
64
+ .kbq-fieldset__container {
65
+ display: flex;
66
+ flex-direction: row;
67
+ position: relative;
68
+
69
+ > .kbq-fieldset-item {
70
+ &.cdk-focused,
71
+ &.kbq-focused {
72
+ z-index: 3;
73
+ }
74
+
75
+ &:first-child:not(:last-child) {
76
+ border-top-right-radius: 0;
77
+ border-bottom-right-radius: 0;
78
+ }
79
+
80
+ &:not(:first-child):not(:last-child) {
81
+ border-radius: 0;
82
+ }
83
+
84
+ &:last-child:not(:first-child) {
85
+ border-top-left-radius: 0;
86
+ border-bottom-left-radius: 0;
87
+ }
88
+
89
+ &:not(:first-child) {
90
+ margin-left: calc(var(--kbq-size-border-width) * -1);
91
+ }
92
+ }
93
+ }
@@ -1,6 +1,6 @@
1
1
  import { NgControl } from '@angular/forms';
2
2
  import { Observable } from 'rxjs';
3
- /** An interface which allows a control to work inside of a `MсFormField`. */
3
+ /** An interface which allows a control to work inside of a `KbqFormField`. */
4
4
  export declare abstract class KbqFormFieldControl<T> {
5
5
  /** The value of the control. */
6
6
  value: T | null;
@@ -1,15 +1,25 @@
1
1
  .kbq-form-field {
2
2
  --kbq-form-field-size-height: var(--kbq-size-3xl);
3
- --kbq-form-field-size-border-width: 1px;
3
+
4
+ --kbq-form-field-size-border-width: var(--kbq-size-border-width);
4
5
  --kbq-form-field-size-border-radius: var(--kbq-size-border-radius);
6
+
5
7
  --kbq-form-field-size-icon-size: var(--kbq-size-l);
6
8
  --kbq-form-field-size-icon-margin-left: var(--kbq-size-s);
7
9
  --kbq-form-field-size-icon-margin-right: var(--kbq-size-s);
8
10
  --kbq-form-field-size-icon-button-size: var(--kbq-size-xxl);
9
- --kbq-form-field-size-icon-button-margin-right: var(--kbq-size-xxs);
10
11
  --kbq-form-field-size-icon-button-margin-left: var(--kbq-size-xxs);
11
- --kbq-form-field-hint-size-margin-top: var(--kbq-size-xxs);
12
+
13
+ --kbq-form-field-hint-size-margin-top: var(--kbq-size-xs);
12
14
  --kbq-form-field-hint-size-gap: var(--kbq-size-s);
15
+
16
+ --kbq-form-field-size-container-vertical-padding: calc(var(--kbq-size-xs) - var(--kbq-size-border-width));
17
+ --kbq-form-field-size-container-left-padding: calc(var(--kbq-size-xs) - var(--kbq-size-border-width));
18
+ --kbq-form-field-size-container-right-padding: calc(var(--kbq-size-xs) - var(--kbq-size-border-width));
19
+ --kbq-form-field-size-infix-left-padding: var(--kbq-size-xs);
20
+ --kbq-form-field-size-infix-right-padding: var(--kbq-size-xxs);
21
+
22
+ --kbq-form-field-size-addon-width: 28px;
13
23
  /* THEME TOKENS */
14
24
  --kbq-form-field-default-border-color: var(--kbq-line-contrast-fade);
15
25
  --kbq-form-field-default-background: var(--kbq-background-bg);