@koobiq/components 18.16.1 → 18.18.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 (57) hide show
  1. package/core/locales/locale-service.d.ts +18 -1
  2. package/core/styles/common/_list.scss +4 -0
  3. package/esm2022/button-toggle/button-toggle.component.mjs +2 -2
  4. package/esm2022/core/locales/locale-service.mjs +24 -2
  5. package/esm2022/core/option/option.mjs +2 -2
  6. package/esm2022/core/version.mjs +2 -2
  7. package/esm2022/dropdown/dropdown-item.component.mjs +2 -2
  8. package/esm2022/list/list-selection.component.mjs +2 -2
  9. package/esm2022/list/list.component.mjs +2 -2
  10. package/esm2022/navbar/navbar.component.mjs +2 -2
  11. package/esm2022/navbar/vertical-navbar.component.mjs +2 -2
  12. package/esm2022/overflow-items/overflow-items.mjs +52 -86
  13. package/esm2022/popover/popover-confirm.component.mjs +3 -3
  14. package/esm2022/popover/popover.component.mjs +3 -3
  15. package/esm2022/sidepanel/sidepanel-container.component.mjs +3 -3
  16. package/esm2022/timezone/timezone-option.component.mjs +2 -2
  17. package/esm2022/top-bar/index.mjs +2 -0
  18. package/esm2022/top-bar/koobiq-components-top-bar.mjs +5 -0
  19. package/esm2022/top-bar/module.mjs +25 -0
  20. package/esm2022/top-bar/public-api.mjs +3 -0
  21. package/esm2022/top-bar/top-bar.mjs +66 -0
  22. package/esm2022/tree/tree-option.component.mjs +2 -2
  23. package/esm2022/tree-select/tree-select.component.mjs +3 -3
  24. package/fesm2022/koobiq-components-button-toggle.mjs +2 -2
  25. package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
  26. package/fesm2022/koobiq-components-core.mjs +27 -5
  27. package/fesm2022/koobiq-components-core.mjs.map +1 -1
  28. package/fesm2022/koobiq-components-dropdown.mjs +2 -2
  29. package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
  30. package/fesm2022/koobiq-components-list.mjs +4 -4
  31. package/fesm2022/koobiq-components-list.mjs.map +1 -1
  32. package/fesm2022/koobiq-components-navbar.mjs +4 -4
  33. package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
  34. package/fesm2022/koobiq-components-overflow-items.mjs +52 -86
  35. package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
  36. package/fesm2022/koobiq-components-popover.mjs +4 -4
  37. package/fesm2022/koobiq-components-popover.mjs.map +1 -1
  38. package/fesm2022/koobiq-components-sidepanel.mjs +2 -2
  39. package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
  40. package/fesm2022/koobiq-components-timezone.mjs +2 -2
  41. package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
  42. package/fesm2022/koobiq-components-top-bar.mjs +95 -0
  43. package/fesm2022/koobiq-components-top-bar.mjs.map +1 -0
  44. package/fesm2022/koobiq-components-tree-select.mjs +2 -2
  45. package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
  46. package/fesm2022/koobiq-components-tree.mjs +2 -2
  47. package/fesm2022/koobiq-components-tree.mjs.map +1 -1
  48. package/overflow-items/overflow-items.d.ts +15 -17
  49. package/package.json +10 -4
  50. package/schematics/ng-add/index.js +4 -4
  51. package/top-bar/index.d.ts +1 -0
  52. package/top-bar/module.d.ts +7 -0
  53. package/top-bar/public-api.d.ts +2 -0
  54. package/top-bar/top-bar-tokens.scss +12 -0
  55. package/top-bar/top-bar.d.ts +25 -0
  56. package/top-bar/top-bar.scss +36 -0
  57. package/tree-select/tree-select.component.d.ts +1 -1
@@ -59,7 +59,7 @@ export declare class KbqOverflowItem {
59
59
  *
60
60
  * @docs-private
61
61
  */
62
- readonly hidden: import("@angular/core").WritableSignal<boolean>;
62
+ hidden: boolean;
63
63
  /**
64
64
  * TemplateRef for the item.
65
65
  *
@@ -93,6 +93,7 @@ export declare class KbqOverflowItems {
93
93
  * @docs-private
94
94
  */
95
95
  protected readonly resultTemplateContext: import("@angular/core").Signal<KbqOverflowItemsResultContext>;
96
+ private readonly hiddenItemIDs;
96
97
  /**
97
98
  * Whether the overflow result is hidden.
98
99
  *
@@ -106,27 +107,24 @@ export declare class KbqOverflowItems {
106
107
  * @default false
107
108
  */
108
109
  readonly reverseOverflowOrder: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
110
+ /**
111
+ * Debounce time for recalculating items visibility.
112
+ *
113
+ * @default 100
114
+ */
115
+ readonly debounceTime: import("@angular/core").InputSignalWithTransform<number, unknown>;
109
116
  private readonly elementRef;
110
117
  private readonly resizeObserver;
111
- private readonly contentObserver;
118
+ private readonly changeDetectorRef;
112
119
  constructor();
113
120
  /**
114
- * Updates the visibility of items based on the container width.
115
- *
116
- * This method calculates whether items should be hidden or shown by comparing the scroll width of the container
117
- * with its visible width. It determines which items are visible and which are hidden, and applies the hiding logic
118
- * based on the `reverseOverflowOrder` flag.
119
- *
120
- * The function operates recursively to adjust the visibility of items until the overflow condition is resolved.
121
- *
122
- * - If the container is overflown, it hides the last visible item from the end (or start if `reverseOverflowOrder`)
123
- * and checks if further adjustments are needed.
124
- * - If the container is not overflown, it reveals the first hidden item from the start
125
- * (or end if `reverseOverflowOrder`), ensuring it fits within the visible area.
121
+ * Updates items visibility, based on the container width and the `reverseOverflowOrder` flag.
126
122
  */
127
123
  private updateItemsVisibility;
128
- /** @TODO Should use `Array.prototype.findLast` after migrating to ES2023 */
129
- private findLast;
124
+ /**
125
+ * Determines if the given item is hidden.
126
+ */
127
+ private isHiddenItem;
130
128
  static ɵfac: i0.ɵɵFactoryDeclaration<KbqOverflowItems, never>;
131
- static ɵcmp: i0.ɵɵComponentDeclaration<KbqOverflowItems, "kbq-overflow-items", never, { "reverseOverflowOrder": { "alias": "reverseOverflowOrder"; "required": false; "isSignal": true; }; }, {}, ["items", "result"], never, true, never>;
129
+ static ɵcmp: i0.ɵɵComponentDeclaration<KbqOverflowItems, "kbq-overflow-items", never, { "reverseOverflowOrder": { "alias": "reverseOverflowOrder"; "required": false; "isSignal": true; }; "debounceTime": { "alias": "debounceTime"; "required": false; "isSignal": true; }; }, {}, ["items", "result"], never, true, never>;
132
130
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koobiq/components",
3
- "version": "18.16.1",
3
+ "version": "18.18.0",
4
4
  "description": "koobiq",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,9 +24,9 @@
24
24
  "@angular/cdk": "^18.0.0",
25
25
  "@angular/core": "^18.0.0",
26
26
  "@angular/forms": "^18.0.0",
27
- "@koobiq/cdk": "18.16.1",
28
- "@koobiq/angular-moment-adapter": "18.16.1",
29
- "@koobiq/angular-luxon-adapter": "18.16.1",
27
+ "@koobiq/cdk": "18.18.0",
28
+ "@koobiq/angular-moment-adapter": "18.18.0",
29
+ "@koobiq/angular-luxon-adapter": "18.18.0",
30
30
  "@koobiq/date-formatter": "^3.1.4",
31
31
  "@koobiq/icons": "^9.2.0",
32
32
  "@koobiq/tokens-builder": "3.11.0",
@@ -346,6 +346,12 @@
346
346
  "esm": "./esm2022/tooltip/koobiq-components-tooltip.mjs",
347
347
  "default": "./fesm2022/koobiq-components-tooltip.mjs"
348
348
  },
349
+ "./top-bar": {
350
+ "types": "./top-bar/index.d.ts",
351
+ "esm2022": "./esm2022/top-bar/koobiq-components-top-bar.mjs",
352
+ "esm": "./esm2022/top-bar/koobiq-components-top-bar.mjs",
353
+ "default": "./fesm2022/koobiq-components-top-bar.mjs"
354
+ },
349
355
  "./tree": {
350
356
  "types": "./tree/index.d.ts",
351
357
  "esm2022": "./esm2022/tree/koobiq-components-tree.mjs",
@@ -27,10 +27,10 @@ function ngAdd(options) {
27
27
  }
28
28
  // Installing dependencies
29
29
  utils_packageConfig.addPackageToPackageJson(tree, '@angular/cdk', "^18.2.6");
30
- utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/cdk', "^18.16.1");
31
- utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/angular-luxon-adapter', "^18.16.1");
32
- utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/date-formatter', "^3.2.0");
33
- utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/date-adapter', "^3.2.0");
30
+ utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/cdk', "^18.18.0");
31
+ utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/angular-luxon-adapter', "^18.18.0");
32
+ utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/date-formatter', "^3.2.1");
33
+ utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/date-adapter', "^3.2.1");
34
34
  utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/icons', "^9.2.0");
35
35
  utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/tokens-builder', "^3.11.0");
36
36
  utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/design-tokens', "^3.11.2");
@@ -0,0 +1 @@
1
+ export * from './public-api';
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./top-bar";
3
+ export declare class KbqTopBarModule {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<KbqTopBarModule, never>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<KbqTopBarModule, never, [typeof i1.KbqTopBar, typeof i1.KbqTopBarContainer, typeof i1.KbqTopBarSpacer], [typeof i1.KbqTopBar, typeof i1.KbqTopBarContainer, typeof i1.KbqTopBarSpacer]>;
6
+ static ɵinj: i0.ɵɵInjectorDeclaration<KbqTopBarModule>;
7
+ }
@@ -0,0 +1,2 @@
1
+ export * from './module';
2
+ export * from './top-bar';
@@ -0,0 +1,12 @@
1
+ .kbq-top-bar {
2
+ --kbq-top-bar-position: sticky;
3
+ --kbq-top-bar-background: var(--kbq-background-bg);
4
+ --kbq-top-bar-spacer-min-width: 80px;
5
+ --kbq-top-bar-padding-vertical: var(--kbq-size-l);
6
+ --kbq-top-bar-padding-horizontal: var(--kbq-size-l);
7
+ --kbq-top-bar-border-radius: 0;
8
+ --kbq-top-bar-left-gap: 0;
9
+ --kbq-top-bar-right-gap: var(--kbq-size-s);
10
+ --kbq-top-bar-shadow-bottom: var(--kbq-shadow-overflow-normal-bottom);
11
+ --kbq-top-bar-shadow-transition: ease-out 300ms;
12
+ }
@@ -0,0 +1,25 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class KbqTopBarSpacer {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<KbqTopBarSpacer, never>;
4
+ static ɵdir: i0.ɵɵDirectiveDeclaration<KbqTopBarSpacer, "[kbqTopBarSpacer]", never, {}, {}, never, never, true, never>;
5
+ }
6
+ /**
7
+ * Directive that dynamically applying CSS classes based on a placement value (left or right).
8
+ */
9
+ export declare class KbqTopBarContainer {
10
+ /**
11
+ * Conditionally applies a CSS class based on the value
12
+ */
13
+ placement: import("@angular/core").InputSignal<"start" | "end">;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<KbqTopBarContainer, never>;
15
+ static ɵdir: i0.ɵɵDirectiveDeclaration<KbqTopBarContainer, "[kbqTopBarContainer]", never, { "placement": { "alias": "placement"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
16
+ }
17
+ export declare class KbqTopBar {
18
+ /**
19
+ * Enables overflow behavior, applying `kbq-top-bar-overflow` to show a bottom shadow.
20
+ */
21
+ withShadow: boolean;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<KbqTopBar, never>;
23
+ static ɵcmp: i0.ɵɵComponentDeclaration<KbqTopBar, "kbq-top-bar", never, { "withShadow": { "alias": "withShadow"; "required": false; }; }, {}, never, ["*"], true, never>;
24
+ static ngAcceptInputType_withShadow: unknown;
25
+ }
@@ -0,0 +1,36 @@
1
+ @use '../core/styles/common/tokens';
2
+
3
+ .kbq-top-bar {
4
+ display: flex;
5
+ align-items: center;
6
+ justify-content: space-between;
7
+ flex-direction: row;
8
+ box-sizing: border-box;
9
+
10
+ position: var(--kbq-top-bar-position);
11
+ background-color: var(--kbq-top-bar-background);
12
+ padding: var(--kbq-top-bar-padding-vertical) var(--kbq-top-bar-padding-horizontal);
13
+ border: var(--kbq-top-bar-border-radius);
14
+
15
+ .kbq-top-bar-spacer {
16
+ height: 100%;
17
+ flex: 1 0 var(--kbq-top-bar-spacer-min-width);
18
+ }
19
+
20
+ .kbq-top-bar-container__start {
21
+ display: flex;
22
+ gap: var(--kbq-top-bar-left-gap);
23
+ }
24
+
25
+ .kbq-top-bar-container__end {
26
+ display: flex;
27
+ gap: var(--kbq-top-bar-right-gap);
28
+ }
29
+
30
+ &.kbq-top-bar_with-shadow {
31
+ box-shadow: var(--kbq-top-bar-shadow-bottom);
32
+ transition: box-shadow var(--kbq-top-bar-shadow-transition);
33
+ }
34
+
35
+ @include tokens.kbq-typography-level-to-styles-css-variables(typography, text-normal);
36
+ }
@@ -297,6 +297,6 @@ export declare class KbqTreeSelect extends KbqTreeSelectMixinBase implements Aft
297
297
  private scrollActiveOptionIntoView;
298
298
  private subscribeOnSearchChanges;
299
299
  static ɵfac: i0.ɵɵFactoryDeclaration<KbqTreeSelect, [null, null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; host: true; }, { optional: true; self: true; }, { optional: true; }]>;
300
- static ɵcmp: i0.ɵɵComponentDeclaration<KbqTreeSelect, "kbq-tree-select", ["kbqTreeSelect"], { "disabled": { "alias": "disabled"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "hiddenItemsText": { "alias": "hiddenItemsText"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "backdropClass": { "alias": "backdropClass"; "required": false; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; }; "sortComparator": { "alias": "sortComparator"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "required": { "alias": "required"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "autoSelect": { "alias": "autoSelect"; "required": false; }; "id": { "alias": "id"; "required": false; }; "hasBackdrop": { "alias": "hasBackdrop"; "required": false; }; "panelWidth": { "alias": "panelWidth"; "required": false; }; "hiddenItemsTextFormatter": { "alias": "hiddenItemsTextFormatter"; "required": false; }; }, { "openedChange": "openedChange"; "openedStream": "opened"; "closedStream": "closed"; "selectionChange": "selectionChange"; "valueChange": "valueChange"; }, ["cleaner", "customTrigger", "customMatcher", "customTagTemplateRef", "tree", "search"], ["kbq-select-matcher, [kbq-select-matcher]", "kbq-select-trigger", "kbq-cleaner", "[kbqSelectSearch]", "[kbq-select-search-empty-result]", "kbq-tree-selection", "kbq-select-footer,[kbq-tree-select-footer]"], false, never>;
300
+ static ɵcmp: i0.ɵɵComponentDeclaration<KbqTreeSelect, "kbq-tree-select", ["kbqTreeSelect"], { "disabled": { "alias": "disabled"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "hiddenItemsText": { "alias": "hiddenItemsText"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "backdropClass": { "alias": "backdropClass"; "required": false; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; }; "sortComparator": { "alias": "sortComparator"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "required": { "alias": "required"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "autoSelect": { "alias": "autoSelect"; "required": false; }; "id": { "alias": "id"; "required": false; }; "hasBackdrop": { "alias": "hasBackdrop"; "required": false; }; "panelWidth": { "alias": "panelWidth"; "required": false; }; "hiddenItemsTextFormatter": { "alias": "hiddenItemsTextFormatter"; "required": false; }; }, { "openedChange": "openedChange"; "openedStream": "opened"; "closedStream": "closed"; "selectionChange": "selectionChange"; "valueChange": "valueChange"; }, ["cleaner", "customTrigger", "customMatcher", "customTagTemplateRef", "tree", "search"], ["kbq-select-matcher, [kbq-select-matcher]", "kbq-select-trigger, [kbq-select-trigger]", "kbq-cleaner", "[kbqSelectSearch]", "[kbq-select-search-empty-result]", "kbq-tree-selection", "kbq-select-footer,[kbq-tree-select-footer]"], false, never>;
301
301
  }
302
302
  export {};