@koobiq/components 18.34.0 → 18.35.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 (139) hide show
  1. package/button/_button-theme.scss +1 -0
  2. package/core/form-field/field-sizing-content.d.ts +21 -0
  3. package/core/form-field/index.d.ts +1 -0
  4. package/core/locales/en-US.d.ts +6 -0
  5. package/core/locales/es-LA.d.ts +6 -0
  6. package/core/locales/fa-IR.d.ts +6 -0
  7. package/core/locales/locale-service.d.ts +42 -0
  8. package/core/locales/pt-BR.d.ts +6 -0
  9. package/core/locales/ru-RU.d.ts +6 -0
  10. package/core/locales/tk-TM.d.ts +6 -0
  11. package/core/locales/zh-CN.d.ts +6 -0
  12. package/core/navbar/index.d.ts +1 -0
  13. package/core/navbar/rectangle-item.d.ts +14 -0
  14. package/core/option/option.d.ts +3 -1
  15. package/core/pop-up/pop-up-trigger.d.ts +2 -0
  16. package/core/public-api.d.ts +1 -0
  17. package/core/utils/dom.d.ts +9 -0
  18. package/core/utils/index.d.ts +1 -0
  19. package/core/utils/utils.d.ts +4 -0
  20. package/datepicker/datepicker-input.directive.d.ts +18 -7
  21. package/dropdown/dropdown-item.scss +1 -0
  22. package/dropdown/dropdown-trigger.directive.d.ts +7 -1
  23. package/esm2022/breadcrumbs/breadcrumbs.mjs +2 -2
  24. package/esm2022/button/button.component.mjs +2 -2
  25. package/esm2022/core/form-field/field-sizing-content.mjs +114 -0
  26. package/esm2022/core/form-field/index.mjs +2 -1
  27. package/esm2022/core/locales/en-US.mjs +7 -1
  28. package/esm2022/core/locales/es-LA.mjs +7 -1
  29. package/esm2022/core/locales/fa-IR.mjs +7 -1
  30. package/esm2022/core/locales/pt-BR.mjs +7 -1
  31. package/esm2022/core/locales/ru-RU.mjs +7 -1
  32. package/esm2022/core/locales/tk-TM.mjs +7 -1
  33. package/esm2022/core/locales/zh-CN.mjs +7 -1
  34. package/esm2022/core/navbar/index.mjs +2 -0
  35. package/esm2022/core/navbar/rectangle-item.mjs +39 -0
  36. package/esm2022/core/option/option.mjs +8 -4
  37. package/esm2022/core/pop-up/pop-up-trigger.mjs +5 -1
  38. package/esm2022/core/public-api.mjs +2 -1
  39. package/esm2022/core/utils/dom.mjs +14 -0
  40. package/esm2022/core/utils/index.mjs +2 -1
  41. package/esm2022/core/utils/utils.mjs +9 -1
  42. package/esm2022/core/version.mjs +2 -2
  43. package/esm2022/datepicker/calendar-header.component.mjs +1 -1
  44. package/esm2022/datepicker/datepicker-input.directive.mjs +24 -21
  45. package/esm2022/dropdown/dropdown-item.component.mjs +2 -2
  46. package/esm2022/dropdown/dropdown-trigger.directive.mjs +30 -10
  47. package/esm2022/file-upload/file-upload.mjs +6 -1
  48. package/esm2022/file-upload/multiple-file-upload.component.mjs +12 -7
  49. package/esm2022/file-upload/single-file-upload.component.mjs +14 -7
  50. package/esm2022/filter-bar/filter-bar.mjs +3 -3
  51. package/esm2022/filter-bar/filters.mjs +16 -4
  52. package/esm2022/filter-bar/pipe-add.mjs +2 -2
  53. package/esm2022/filter-bar/pipes/pipe-date.mjs +2 -2
  54. package/esm2022/filter-bar/pipes/pipe-datetime.mjs +2 -2
  55. package/esm2022/filter-bar/pipes/pipe-multi-select.mjs +9 -9
  56. package/esm2022/filter-bar/pipes/pipe-select.mjs +2 -2
  57. package/esm2022/filter-bar/pipes/pipe-text.mjs +2 -2
  58. package/esm2022/form-field/fieldset.mjs +2 -2
  59. package/esm2022/form-field/form-field.mjs +2 -2
  60. package/esm2022/navbar-ic/index.mjs +2 -0
  61. package/esm2022/navbar-ic/koobiq-components-navbar-ic.mjs +5 -0
  62. package/esm2022/navbar-ic/navbar-ic-header.mjs +58 -0
  63. package/esm2022/navbar-ic/navbar-ic-item.mjs +399 -0
  64. package/esm2022/navbar-ic/navbar-ic.animation.mjs +9 -0
  65. package/esm2022/navbar-ic/navbar-ic.mjs +281 -0
  66. package/esm2022/navbar-ic/navbar-ic.module.mjs +74 -0
  67. package/esm2022/navbar-ic/public-api.mjs +5 -0
  68. package/esm2022/popover/popover-confirm.component.mjs +3 -3
  69. package/esm2022/popover/popover.component.mjs +10 -5
  70. package/esm2022/select/select.component.mjs +2 -2
  71. package/esm2022/tags/tag-list.component.mjs +24 -5
  72. package/esm2022/tags/tag.component.mjs +231 -22
  73. package/esm2022/tags/tag.module.mjs +16 -6
  74. package/esm2022/tooltip/tooltip.component.mjs +3 -3
  75. package/esm2022/tree-select/tree-select.component.mjs +2 -2
  76. package/fesm2022/koobiq-components-breadcrumbs.mjs +1 -1
  77. package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
  78. package/fesm2022/koobiq-components-button.mjs +2 -2
  79. package/fesm2022/koobiq-components-button.mjs.map +1 -1
  80. package/fesm2022/koobiq-components-core.mjs +243 -31
  81. package/fesm2022/koobiq-components-core.mjs.map +1 -1
  82. package/fesm2022/koobiq-components-datepicker.mjs +24 -22
  83. package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
  84. package/fesm2022/koobiq-components-dropdown.mjs +31 -11
  85. package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
  86. package/fesm2022/koobiq-components-file-upload.mjs +26 -9
  87. package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
  88. package/fesm2022/koobiq-components-filter-bar.mjs +29 -17
  89. package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
  90. package/fesm2022/koobiq-components-form-field.mjs +4 -4
  91. package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
  92. package/fesm2022/koobiq-components-navbar-ic.mjs +800 -0
  93. package/fesm2022/koobiq-components-navbar-ic.mjs.map +1 -0
  94. package/fesm2022/koobiq-components-popover.mjs +11 -6
  95. package/fesm2022/koobiq-components-popover.mjs.map +1 -1
  96. package/fesm2022/koobiq-components-select.mjs +1 -1
  97. package/fesm2022/koobiq-components-select.mjs.map +1 -1
  98. package/fesm2022/koobiq-components-tags.mjs +271 -34
  99. package/fesm2022/koobiq-components-tags.mjs.map +1 -1
  100. package/fesm2022/koobiq-components-tooltip.mjs +2 -2
  101. package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
  102. package/fesm2022/koobiq-components-tree-select.mjs +1 -1
  103. package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
  104. package/file-upload/file-upload.d.ts +5 -2
  105. package/file-upload/multiple-file-upload.component.d.ts +3 -1
  106. package/file-upload/single-file-upload.component.d.ts +3 -1
  107. package/filter-bar/_filter-bar-theme.scss +2 -2
  108. package/filter-bar/filters.d.ts +1 -0
  109. package/form-field/form-field.scss +7 -1
  110. package/navbar-ic/_navbar-ic-theme.scss +81 -0
  111. package/navbar-ic/index.d.ts +1 -0
  112. package/navbar-ic/navbar-ic-divider.scss +7 -0
  113. package/navbar-ic/navbar-ic-header.d.ts +18 -0
  114. package/navbar-ic/navbar-ic-header.scss +53 -0
  115. package/navbar-ic/navbar-ic-item.d.ts +125 -0
  116. package/navbar-ic/navbar-ic-item.scss +96 -0
  117. package/navbar-ic/navbar-ic-tokens.scss +22 -0
  118. package/navbar-ic/navbar-ic.animation.d.ts +2 -0
  119. package/navbar-ic/navbar-ic.d.ts +103 -0
  120. package/navbar-ic/navbar-ic.module.d.ts +14 -0
  121. package/navbar-ic/navbar-ic.scss +32 -0
  122. package/navbar-ic/public-api.d.ts +4 -0
  123. package/package.json +10 -4
  124. package/popover/_popover-theme.scss +6 -2
  125. package/popover/popover-tokens.scss +2 -0
  126. package/popover/popover.component.d.ts +4 -1
  127. package/prebuilt-themes/dark-theme.css +1 -1
  128. package/prebuilt-themes/light-theme.css +1 -1
  129. package/prebuilt-themes/theme.css +1 -1
  130. package/schematics/ng-add/index.js +3 -3
  131. package/tags/_tag-theme.scss +10 -1
  132. package/tags/tag-list.component.d.ts +10 -2
  133. package/tags/tag-list.scss +5 -0
  134. package/tags/tag.component.d.ts +78 -8
  135. package/tags/tag.module.d.ts +1 -1
  136. package/tags/tag.scss +18 -0
  137. package/textarea/textarea-tokens.scss +1 -1
  138. package/tooltip/_tooltip-theme.scss +9 -2
  139. package/tooltip/tooltip-tokens.scss +2 -0
@@ -1,12 +1,22 @@
1
- import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnDestroy, QueryList } from '@angular/core';
1
+ import { AfterContentInit, AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnDestroy, QueryList } from '@angular/core';
2
2
  import { IFocusableOption } from '@koobiq/cdk/a11y';
3
3
  import { KbqColorDirective, KbqTitleTextRef } from '@koobiq/components/core';
4
4
  import { KbqIcon } from '@koobiq/components/icon';
5
5
  import { Subject } from 'rxjs';
6
6
  import * as i0 from "@angular/core";
7
+ import * as i1 from "@koobiq/components/core";
7
8
  export interface KbqTagEvent {
8
9
  tag: KbqTag;
9
10
  }
11
+ /**
12
+ * Event object emitted by KbqTag when the tag is edited.
13
+ */
14
+ export declare class KbqTagEditChange {
15
+ readonly tag: KbqTag;
16
+ readonly type: 'start' | 'submit' | 'cancel';
17
+ readonly reason: string;
18
+ constructor(tag: KbqTag, type: 'start' | 'submit' | 'cancel', reason: string);
19
+ }
10
20
  /** Event object emitted by KbqTag when selected or deselected. */
11
21
  export declare class KbqTagSelectionChange {
12
22
  source: KbqTag;
@@ -30,20 +40,67 @@ export declare class KbqTagTrailingIcon {
30
40
  static ɵfac: i0.ɵɵFactoryDeclaration<KbqTagTrailingIcon, never>;
31
41
  static ɵdir: i0.ɵɵDirectiveDeclaration<KbqTagTrailingIcon, "kbq-tag-trailing-icon, [kbqTagTrailingIcon]", never, {}, {}, never, never, false, never>;
32
42
  }
33
- export declare class KbqTag extends KbqColorDirective implements IFocusableOption, OnDestroy, KbqTitleTextRef, AfterContentInit {
34
- elementRef: ElementRef;
43
+ /**
44
+ * Directive to add submit behavior for the editable tag.
45
+ */
46
+ export declare class KbqTagEditSubmit {
47
+ /** @docs-private */
48
+ protected readonly tag: KbqTag;
49
+ static ɵfac: i0.ɵɵFactoryDeclaration<KbqTagEditSubmit, never>;
50
+ static ɵdir: i0.ɵɵDirectiveDeclaration<KbqTagEditSubmit, "[kbqTagEditSubmit]", ["kbqTagEditSubmit"], {}, {}, never, never, true, never>;
51
+ }
52
+ /**
53
+ * Directive to add input behavior for the editable tag.
54
+ */
55
+ export declare class KbqTagEditInput {
56
+ private readonly tag;
57
+ /** @docs-private */
58
+ protected handleKeydown(event: KeyboardEvent): void;
59
+ static ɵfac: i0.ɵɵFactoryDeclaration<KbqTagEditInput, never>;
60
+ static ɵdir: i0.ɵɵDirectiveDeclaration<KbqTagEditInput, "[kbqTagEditInput]", ["kbqTagEditInput"], {}, {}, never, never, true, [{ directive: typeof i1.KbqFieldSizingContent; inputs: {}; outputs: {}; }]>;
61
+ }
62
+ export declare class KbqTag extends KbqColorDirective implements IFocusableOption, OnDestroy, KbqTitleTextRef, AfterContentInit, AfterViewInit {
35
63
  changeDetectorRef: ChangeDetectorRef;
36
64
  private _ngZone;
65
+ private readonly focusMonitor;
66
+ private readonly tagList;
67
+ /** @docs-private */
68
+ readonly elementRef: ElementRef<HTMLElement>;
37
69
  /** Emits when the tag is focused. */
38
70
  readonly onFocus: Subject<KbqTagEvent>;
39
71
  /** Emits when the tag is blurred. */
40
72
  readonly onBlur: Subject<KbqTagEvent>;
41
- nativeElement: HTMLElement;
73
+ /** @docs-private */
74
+ readonly nativeElement: HTMLElement;
42
75
  /** Whether the tag has focus. */
43
76
  hasFocus: boolean;
44
77
  /** Whether the tag list is selectable */
45
78
  tagListSelectable: boolean;
46
- textElement: ElementRef;
79
+ /**
80
+ * Whether the tag list is editable.
81
+ *
82
+ * @docs-private
83
+ */
84
+ private get tagListEditable();
85
+ /** Whether the tag is editable. */
86
+ get editable(): boolean;
87
+ set editable(value: boolean);
88
+ private _editable;
89
+ /** Whether the tag edits can't be submitted. */
90
+ preventEditSubmit: boolean;
91
+ private readonly editInputElementRef;
92
+ /**
93
+ * Emits event when the tag is edited.
94
+ */
95
+ readonly editChange: EventEmitter<KbqTagEditChange>;
96
+ /**
97
+ * @docs-private
98
+ */
99
+ protected readonly editing: import("@angular/core").WritableSignal<boolean>;
100
+ /**
101
+ * @docs-private
102
+ */
103
+ readonly textElement: ElementRef<HTMLSpanElement>;
47
104
  contentChildren: QueryList<KbqIcon>;
48
105
  /** The tag avatar */
49
106
  avatar: KbqTagAvatar;
@@ -86,11 +143,12 @@ export declare class KbqTag extends KbqColorDirective implements IFocusableOptio
86
143
  get disabled(): any;
87
144
  set disabled(value: any);
88
145
  private _disabled;
89
- constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, _ngZone: NgZone);
146
+ constructor(changeDetectorRef: ChangeDetectorRef, _ngZone: NgZone);
90
147
  ngAfterContentInit(): void;
148
+ ngAfterViewInit(): void;
149
+ ngOnDestroy(): void;
91
150
  addClassModificatorForIcons(): void;
92
151
  addHostClassName(): void;
93
- ngOnDestroy(): void;
94
152
  select(): void;
95
153
  deselect(): void;
96
154
  selectViaInteraction(): void;
@@ -104,12 +162,24 @@ export declare class KbqTag extends KbqColorDirective implements IFocusableOptio
104
162
  * Informs any listeners of the removal request. Does not remove the tag from the DOM.
105
163
  */
106
164
  remove(): void;
165
+ /** @docs-private */
107
166
  handleMousedown(event: Event): void;
167
+ /** @docs-private */
108
168
  handleKeydown(event: KeyboardEvent): void;
169
+ /** @docs-private */
109
170
  blur(): void;
171
+ /** @docs-private */
172
+ protected handleDblClick(event: MouseEvent): void;
173
+ private startEditing;
174
+ /** @docs-private */
175
+ cancelEditing(reason: string): void;
176
+ /** @docs-private */
177
+ submitEditing(reason: string): void;
110
178
  private dispatchSelectionChange;
111
179
  static ɵfac: i0.ɵɵFactoryDeclaration<KbqTag, never>;
112
- static ɵcmp: i0.ɵɵComponentDeclaration<KbqTag, "kbq-tag, [kbq-tag], kbq-basic-tag, [kbq-basic-tag]", ["kbqTag"], { "selected": { "alias": "selected"; "required": false; }; "value": { "alias": "value"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "removable": { "alias": "removable"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "selectionChange": "selectionChange"; "destroyed": "destroyed"; "removed": "removed"; }, ["avatar", "trailingIcon", "removeIcon", "contentChildren"], ["[kbq-icon]:not([kbqTagRemove])", "*", "[kbqTagRemove]"], false, never>;
180
+ static ɵcmp: i0.ɵɵComponentDeclaration<KbqTag, "kbq-tag, [kbq-tag], kbq-basic-tag, [kbq-basic-tag]", ["kbqTag"], { "editable": { "alias": "editable"; "required": false; }; "preventEditSubmit": { "alias": "preventEditSubmit"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "value": { "alias": "value"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "removable": { "alias": "removable"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "editChange": "editChange"; "selectionChange": "selectionChange"; "destroyed": "destroyed"; "removed": "removed"; }, ["editInputElementRef", "avatar", "trailingIcon", "removeIcon", "contentChildren"], ["[kbq-icon]:not([kbqTagRemove]):not([kbqTagEditSubmit])", "[kbqTagEditInput]", "*", "[kbqTagEditSubmit]", "[kbqTagRemove]"], false, never>;
181
+ static ngAcceptInputType_editable: unknown;
182
+ static ngAcceptInputType_preventEditSubmit: unknown;
113
183
  }
114
184
  /**
115
185
  *
@@ -5,6 +5,6 @@ import * as i3 from "./tag-input";
5
5
  import * as i4 from "@angular/cdk/platform";
6
6
  export declare class KbqTagsModule {
7
7
  static ɵfac: i0.ɵɵFactoryDeclaration<KbqTagsModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<KbqTagsModule, [typeof i1.KbqTagList, typeof i2.KbqTag, typeof i3.KbqTagInput, typeof i2.KbqTagTrailingIcon, typeof i2.KbqTagAvatar, typeof i2.KbqTagRemove], [typeof i4.PlatformModule], [typeof i1.KbqTagList, typeof i2.KbqTag, typeof i3.KbqTagInput, typeof i2.KbqTagTrailingIcon, typeof i2.KbqTagAvatar, typeof i2.KbqTagRemove]>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<KbqTagsModule, [typeof i1.KbqTagList, typeof i2.KbqTag, typeof i3.KbqTagInput, typeof i2.KbqTagTrailingIcon, typeof i2.KbqTagAvatar, typeof i2.KbqTagRemove], [typeof i4.PlatformModule, typeof i2.KbqTagEditSubmit, typeof i2.KbqTagEditInput], [typeof i1.KbqTagList, typeof i2.KbqTag, typeof i3.KbqTagInput, typeof i2.KbqTagTrailingIcon, typeof i2.KbqTagAvatar, typeof i2.KbqTagRemove, typeof i2.KbqTagEditSubmit, typeof i2.KbqTagEditInput]>;
9
9
  static ɵinj: i0.ɵɵInjectorDeclaration<KbqTagsModule>;
10
10
  }
package/tags/tag.scss CHANGED
@@ -1,5 +1,6 @@
1
1
  @use '../core/styles/common/tokens' as *;
2
2
  @use '../core/styles/common/vendor-prefixes';
3
+ @use '../core/styles/common/input';
3
4
 
4
5
  .kbq-tag {
5
6
  @include vendor-prefixes.user-select(none);
@@ -49,6 +50,23 @@
49
50
  & .kbq-icon_left {
50
51
  margin-left: var(--kbq-tag-size-icon-margin-left);
51
52
  }
53
+
54
+ .kbq-tag-edit-input {
55
+ @include input.kbq-reset-input();
56
+
57
+ min-width: var(--kbq-size-xs);
58
+ max-width: 100%;
59
+
60
+ &.kbq-input {
61
+ min-height: unset !important;
62
+ border-radius: unset !important;
63
+ padding: unset !important;
64
+ }
65
+ }
66
+
67
+ .kbq-tag-edit-submit {
68
+ margin-right: var(--kbq-size-3xs);
69
+ }
52
70
  }
53
71
 
54
72
  .kbq-tag__wrapper {
@@ -2,5 +2,5 @@
2
2
  --kbq-textarea-size-min-height: 64px;
3
3
  --kbq-textarea-size-max-height: 96px;
4
4
  --kbq-textarea-size-padding-vertical: 5px;
5
- --kbq-textarea-size-padding-horizontal: var(--kbq-size-m);
5
+ --kbq-textarea-size-padding-horizontal: 11px;
6
6
  }
@@ -1,8 +1,6 @@
1
1
  @use '../core/styles/common/tokens' as *;
2
2
 
3
3
  @mixin kbq-tooltip-color($style-name) {
4
- box-shadow: var(--kbq-tooltip-#{$style-name}-shadow);
5
-
6
4
  & .kbq-tooltip__inner {
7
5
  color: var(--kbq-tooltip-#{$style-name}-text);
8
6
 
@@ -11,11 +9,20 @@
11
9
 
12
10
  & .kbq-tooltip__arrow {
13
11
  background-color: var(--kbq-tooltip-#{$style-name}-background);
12
+ box-shadow: var(--kbq-tooltip-borderless-shadow);
13
+ }
14
+
15
+ &.kbq-tooltip_arrowless {
14
16
  box-shadow: var(--kbq-tooltip-#{$style-name}-shadow);
15
17
  }
16
18
  }
17
19
 
18
20
  @mixin kbq-tooltip-theme() {
21
+ .kbq-tooltip,
22
+ .kbq-tooltip__arrow {
23
+ box-shadow: var(--kbq-tooltip-borderless-shadow);
24
+ }
25
+
19
26
  .kbq-tooltip.kbq-theme {
20
27
  @include kbq-tooltip-color(theme-fade-off);
21
28
  }
@@ -20,4 +20,6 @@
20
20
  --kbq-tooltip-error-fade-off-background: var(--kbq-background-error);
21
21
  --kbq-tooltip-error-fade-off-text: var(--kbq-foreground-white);
22
22
  --kbq-tooltip-error-fade-off-shadow: var(--kbq-shadow-popup);
23
+
24
+ --kbq-tooltip-borderless-shadow: 0 2px 8px var(--kbq-shadow-key), 0 3px 8px var(--kbq-shadow-ambient);
23
25
  }