@4sh/ui-kit 0.1.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.
- package/LICENSE +201 -0
- package/NOTICE +7 -0
- package/README.md +229 -0
- package/fesm2022/4sh-ui-kit-forms.mjs +501 -0
- package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-motion.mjs +155 -0
- package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-overlay.mjs +61 -0
- package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-theming.mjs +120 -0
- package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-types.mjs +12 -0
- package/fesm2022/4sh-ui-kit-types.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-accordion.mjs +244 -0
- package/fesm2022/4sh-ui-kit-ui-accordion.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-alert.mjs +160 -0
- package/fesm2022/4sh-ui-kit-ui-alert.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-autocomplete.mjs +926 -0
- package/fesm2022/4sh-ui-kit-ui-autocomplete.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-avatar-group.mjs +34 -0
- package/fesm2022/4sh-ui-kit-ui-avatar-group.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-avatar.mjs +122 -0
- package/fesm2022/4sh-ui-kit-ui-avatar.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-badge.mjs +95 -0
- package/fesm2022/4sh-ui-kit-ui-badge.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-breadcrumb.mjs +190 -0
- package/fesm2022/4sh-ui-kit-ui-breadcrumb.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-button-split.mjs +151 -0
- package/fesm2022/4sh-ui-kit-ui-button-split.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-button.mjs +222 -0
- package/fesm2022/4sh-ui-kit-ui-button.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-card.mjs +164 -0
- package/fesm2022/4sh-ui-kit-ui-card.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-checkbox.mjs +118 -0
- package/fesm2022/4sh-ui-kit-ui-checkbox.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-chip.mjs +205 -0
- package/fesm2022/4sh-ui-kit-ui-chip.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-context-menu.mjs +219 -0
- package/fesm2022/4sh-ui-kit-ui-context-menu.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-datepicker.mjs +1508 -0
- package/fesm2022/4sh-ui-kit-ui-datepicker.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-drawer.mjs +300 -0
- package/fesm2022/4sh-ui-kit-ui-drawer.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-empty-state.mjs +148 -0
- package/fesm2022/4sh-ui-kit-ui-empty-state.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-field.mjs +102 -0
- package/fesm2022/4sh-ui-kit-ui-field.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-file-upload.mjs +568 -0
- package/fesm2022/4sh-ui-kit-ui-file-upload.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-helper.mjs +85 -0
- package/fesm2022/4sh-ui-kit-ui-helper.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-icon.mjs +98 -0
- package/fesm2022/4sh-ui-kit-ui-icon.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-image.mjs +201 -0
- package/fesm2022/4sh-ui-kit-ui-image.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-group.mjs +119 -0
- package/fesm2022/4sh-ui-kit-ui-input-group.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-mask.mjs +125 -0
- package/fesm2022/4sh-ui-kit-ui-input-mask.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-number.mjs +234 -0
- package/fesm2022/4sh-ui-kit-ui-input-number.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-otp.mjs +288 -0
- package/fesm2022/4sh-ui-kit-ui-input-otp.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-tags.mjs +679 -0
- package/fesm2022/4sh-ui-kit-ui-input-tags.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input.mjs +121 -0
- package/fesm2022/4sh-ui-kit-ui-input.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-label.mjs +61 -0
- package/fesm2022/4sh-ui-kit-ui-label.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-link.mjs +147 -0
- package/fesm2022/4sh-ui-kit-ui-link.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-menu.mjs +484 -0
- package/fesm2022/4sh-ui-kit-ui-menu.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-modal.mjs +555 -0
- package/fesm2022/4sh-ui-kit-ui-modal.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-nudger.mjs +168 -0
- package/fesm2022/4sh-ui-kit-ui-nudger.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-paginator.mjs +245 -0
- package/fesm2022/4sh-ui-kit-ui-paginator.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-popover.mjs +296 -0
- package/fesm2022/4sh-ui-kit-ui-popover.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-progress-bar.mjs +124 -0
- package/fesm2022/4sh-ui-kit-ui-progress-bar.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-radio.mjs +92 -0
- package/fesm2022/4sh-ui-kit-ui-radio.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-rating.mjs +185 -0
- package/fesm2022/4sh-ui-kit-ui-rating.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-read-only.mjs +146 -0
- package/fesm2022/4sh-ui-kit-ui-read-only.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-segment-control.mjs +386 -0
- package/fesm2022/4sh-ui-kit-ui-segment-control.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-select.mjs +868 -0
- package/fesm2022/4sh-ui-kit-ui-select.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-separator.mjs +77 -0
- package/fesm2022/4sh-ui-kit-ui-separator.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-sidebar.mjs +577 -0
- package/fesm2022/4sh-ui-kit-ui-sidebar.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-skeleton.mjs +81 -0
- package/fesm2022/4sh-ui-kit-ui-skeleton.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-slider.mjs +340 -0
- package/fesm2022/4sh-ui-kit-ui-slider.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-spinner.mjs +132 -0
- package/fesm2022/4sh-ui-kit-ui-spinner.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-stepper.mjs +389 -0
- package/fesm2022/4sh-ui-kit-ui-stepper.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-table.mjs +1406 -0
- package/fesm2022/4sh-ui-kit-ui-table.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-tabs.mjs +503 -0
- package/fesm2022/4sh-ui-kit-ui-tabs.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-tag.mjs +84 -0
- package/fesm2022/4sh-ui-kit-ui-tag.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-textarea.mjs +119 -0
- package/fesm2022/4sh-ui-kit-ui-textarea.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-toast.mjs +424 -0
- package/fesm2022/4sh-ui-kit-ui-toast.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-toggle.mjs +120 -0
- package/fesm2022/4sh-ui-kit-ui-toggle.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-tooltip.mjs +445 -0
- package/fesm2022/4sh-ui-kit-ui-tooltip.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit.mjs +16 -0
- package/fesm2022/4sh-ui-kit.mjs.map +1 -0
- package/package.json +287 -0
- package/styles/base/_base.scss +19 -0
- package/styles/base/_motion.scss +144 -0
- package/styles/base/_typography.scss +99 -0
- package/styles/generated/_tokens-breakpoint.scss +8 -0
- package/styles/generated/_tokens-metrics.scss +37 -0
- package/styles/generated/_tokens-primitives.scss +284 -0
- package/styles/generated/_tokens-responsive.scss +99 -0
- package/styles/generated/_tokens-semantics.scss +1274 -0
- package/styles/generated/_tokens-styles.scss +35 -0
- package/styles/generated/_tokens-transitions.scss +11 -0
- package/styles/generated/_tokens-typography.scss +14 -0
- package/styles/generated/_tokens.scss +10 -0
- package/styles/index.scss +25 -0
- package/styles/settings/_ui-config.scss +67 -0
- package/styles/utils/_functions.scss +67 -0
- package/styles/utils/_helpers.scss +129 -0
- package/styles/utils/_mixins.scss +186 -0
- package/styles/utils/_motion.scss +47 -0
- package/styles/utils/_overlay.scss +26 -0
- package/styles/utils.scss +15 -0
- package/styles.css +1 -0
- package/types/4sh-ui-kit-forms.d.ts +259 -0
- package/types/4sh-ui-kit-motion.d.ts +111 -0
- package/types/4sh-ui-kit-overlay.d.ts +31 -0
- package/types/4sh-ui-kit-theming.d.ts +54 -0
- package/types/4sh-ui-kit-types.d.ts +13 -0
- package/types/4sh-ui-kit-ui-accordion.d.ts +140 -0
- package/types/4sh-ui-kit-ui-alert.d.ts +89 -0
- package/types/4sh-ui-kit-ui-autocomplete.d.ts +411 -0
- package/types/4sh-ui-kit-ui-avatar-group.d.ts +17 -0
- package/types/4sh-ui-kit-ui-avatar.d.ts +55 -0
- package/types/4sh-ui-kit-ui-badge.d.ts +38 -0
- package/types/4sh-ui-kit-ui-breadcrumb.d.ts +131 -0
- package/types/4sh-ui-kit-ui-button-split.d.ts +102 -0
- package/types/4sh-ui-kit-ui-button.d.ts +91 -0
- package/types/4sh-ui-kit-ui-card.d.ts +102 -0
- package/types/4sh-ui-kit-ui-checkbox.d.ts +54 -0
- package/types/4sh-ui-kit-ui-chip.d.ts +114 -0
- package/types/4sh-ui-kit-ui-context-menu.d.ts +105 -0
- package/types/4sh-ui-kit-ui-datepicker.d.ts +539 -0
- package/types/4sh-ui-kit-ui-drawer.d.ts +147 -0
- package/types/4sh-ui-kit-ui-empty-state.d.ts +93 -0
- package/types/4sh-ui-kit-ui-field.d.ts +53 -0
- package/types/4sh-ui-kit-ui-file-upload.d.ts +268 -0
- package/types/4sh-ui-kit-ui-helper.d.ts +46 -0
- package/types/4sh-ui-kit-ui-icon.d.ts +69 -0
- package/types/4sh-ui-kit-ui-image.d.ts +88 -0
- package/types/4sh-ui-kit-ui-input-group.d.ts +54 -0
- package/types/4sh-ui-kit-ui-input-mask.d.ts +63 -0
- package/types/4sh-ui-kit-ui-input-number.d.ts +96 -0
- package/types/4sh-ui-kit-ui-input-otp.d.ts +130 -0
- package/types/4sh-ui-kit-ui-input-tags.d.ts +350 -0
- package/types/4sh-ui-kit-ui-input.d.ts +78 -0
- package/types/4sh-ui-kit-ui-label.d.ts +36 -0
- package/types/4sh-ui-kit-ui-link.d.ts +72 -0
- package/types/4sh-ui-kit-ui-menu.d.ts +235 -0
- package/types/4sh-ui-kit-ui-modal.d.ts +241 -0
- package/types/4sh-ui-kit-ui-nudger.d.ts +79 -0
- package/types/4sh-ui-kit-ui-paginator.d.ts +150 -0
- package/types/4sh-ui-kit-ui-popover.d.ts +125 -0
- package/types/4sh-ui-kit-ui-progress-bar.d.ts +82 -0
- package/types/4sh-ui-kit-ui-radio.d.ts +44 -0
- package/types/4sh-ui-kit-ui-rating.d.ts +90 -0
- package/types/4sh-ui-kit-ui-read-only.d.ts +70 -0
- package/types/4sh-ui-kit-ui-segment-control.d.ts +184 -0
- package/types/4sh-ui-kit-ui-select.d.ts +392 -0
- package/types/4sh-ui-kit-ui-separator.d.ts +43 -0
- package/types/4sh-ui-kit-ui-sidebar.d.ts +358 -0
- package/types/4sh-ui-kit-ui-skeleton.d.ts +52 -0
- package/types/4sh-ui-kit-ui-slider.d.ts +127 -0
- package/types/4sh-ui-kit-ui-spinner.d.ts +67 -0
- package/types/4sh-ui-kit-ui-stepper.d.ts +220 -0
- package/types/4sh-ui-kit-ui-table.d.ts +570 -0
- package/types/4sh-ui-kit-ui-tabs.d.ts +225 -0
- package/types/4sh-ui-kit-ui-tag.d.ts +46 -0
- package/types/4sh-ui-kit-ui-textarea.d.ts +61 -0
- package/types/4sh-ui-kit-ui-toast.d.ts +247 -0
- package/types/4sh-ui-kit-ui-toggle.d.ts +67 -0
- package/types/4sh-ui-kit-ui-tooltip.d.ts +167 -0
- package/types/4sh-ui-kit.d.ts +4 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { TemplateRef } from '@angular/core';
|
|
3
|
+
import { Params } from '@angular/router';
|
|
4
|
+
|
|
5
|
+
/** Breadcrumb density: `small` = compact rendering. */
|
|
6
|
+
type BreadcrumbSize = 'default' | 'small';
|
|
7
|
+
/** Payload passed to `command` callbacks and emitted by `itemClick`. */
|
|
8
|
+
interface UiBreadcrumbItemCommandEvent {
|
|
9
|
+
originalEvent: Event;
|
|
10
|
+
item: UiBreadcrumbItem;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Declarative breadcrumb entry. An item navigates through `url` (external)
|
|
14
|
+
* or `routerLink` (internal), and/or triggers a `command` callback.
|
|
15
|
+
*/
|
|
16
|
+
interface UiBreadcrumbItem {
|
|
17
|
+
/** Text of the crumb. */
|
|
18
|
+
label?: string;
|
|
19
|
+
/** Leading FontAwesome icon name (icon-only crumb when no label, e.g. home). */
|
|
20
|
+
icon?: string;
|
|
21
|
+
/** Accessible name override (required for an icon-only crumb). */
|
|
22
|
+
ariaLabel?: string;
|
|
23
|
+
/** External / plain URL — the crumb renders a plain anchor. */
|
|
24
|
+
url?: string;
|
|
25
|
+
/** Anchor target (e.g. `_blank`). */
|
|
26
|
+
target?: string;
|
|
27
|
+
/** Anchor rel. Defaults to `noopener noreferrer` when `target="_blank"`. */
|
|
28
|
+
rel?: string;
|
|
29
|
+
/** Angular router target — the crumb renders a RouterLink anchor. */
|
|
30
|
+
routerLink?: string | unknown[];
|
|
31
|
+
/** Query params passed to `routerLink`. */
|
|
32
|
+
queryParams?: Params;
|
|
33
|
+
/** URL fragment passed to `routerLink`. */
|
|
34
|
+
fragment?: string;
|
|
35
|
+
/** Callback invoked when the crumb is clicked. */
|
|
36
|
+
command?: (event: UiBreadcrumbItemCommandEvent) => void;
|
|
37
|
+
/** Disable the crumb (no navigation, out of the tab sequence). */
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
/** Hide the crumb entirely (default true). */
|
|
40
|
+
visible?: boolean;
|
|
41
|
+
/** Extra class on the crumb's `<li>`. */
|
|
42
|
+
styleClass?: string;
|
|
43
|
+
}
|
|
44
|
+
/** @ignore Resolved render entry (crumb or overflow ellipsis). */
|
|
45
|
+
interface UiBreadcrumbEntry {
|
|
46
|
+
kind: 'item' | 'ellipsis';
|
|
47
|
+
item?: UiBreadcrumbItem;
|
|
48
|
+
key: string;
|
|
49
|
+
last: boolean;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* ui-breadcrumb — headless breadcrumb trail: shows the current location
|
|
53
|
+
* within a navigational hierarchy.
|
|
54
|
+
*
|
|
55
|
+
* Driven by a declarative `items` model ({@link UiBreadcrumbItem}). Each crumb
|
|
56
|
+
* renders the **native element matching its semantics**, never a wrapper
|
|
57
|
+
* component — so the anchor stays fully controllable (`rel`, `target`,
|
|
58
|
+
* `queryParams`, `fragment`…):
|
|
59
|
+
*
|
|
60
|
+
* • `routerLink` → `<a>` + `RouterLink` (internal navigation)
|
|
61
|
+
* • `url` → `<a href>` (external / plain navigation)
|
|
62
|
+
* • `command` only → `<button type="button">` (action, not navigation)
|
|
63
|
+
* • no destination / `disabled` → plain text (never a fake link)
|
|
64
|
+
*
|
|
65
|
+
* The last crumb represents the current page and carries `aria-current="page"`.
|
|
66
|
+
*
|
|
67
|
+
* Long trails collapse behind an accessible ellipsis **button** when `maxItems`
|
|
68
|
+
* is set (first crumb + "…" + trailing crumbs); activating it reveals the
|
|
69
|
+
* hidden crumbs.
|
|
70
|
+
*
|
|
71
|
+
* Customisation: `separator` (string, default "/"), `#separator` template,
|
|
72
|
+
* and `#item` template (crumb content, `$implicit` = item, `last`).
|
|
73
|
+
*/
|
|
74
|
+
declare class UiBreadcrumb {
|
|
75
|
+
/** Breadcrumb entries, in hierarchy order (see {@link UiBreadcrumbItem}). */
|
|
76
|
+
items: _angular_core.InputSignal<UiBreadcrumbItem[]>;
|
|
77
|
+
/** Density: `default`, or `small` for compact rendering. */
|
|
78
|
+
size: _angular_core.InputSignal<BreadcrumbSize>;
|
|
79
|
+
/** Separator character(s) between crumbs (overridden by the `#separator` template). */
|
|
80
|
+
separator: _angular_core.InputSignal<string>;
|
|
81
|
+
/**
|
|
82
|
+
* Maximum number of crumbs displayed (minimum 2). Beyond it, the middle
|
|
83
|
+
* collapses behind an ellipsis button: first crumb + "…" + the trailing
|
|
84
|
+
* crumbs. Unset = never collapse.
|
|
85
|
+
*/
|
|
86
|
+
maxItems: _angular_core.InputSignal<number | undefined>;
|
|
87
|
+
/** Accessible name of the `<nav>` landmark. */
|
|
88
|
+
ariaLabel: _angular_core.InputSignal<string>;
|
|
89
|
+
/** Accessible name of the ellipsis button revealing the hidden crumbs. */
|
|
90
|
+
ellipsisAriaLabel: _angular_core.InputSignal<string>;
|
|
91
|
+
/** Extra class(es) applied to the root `<nav>`. */
|
|
92
|
+
styleClass: _angular_core.InputSignal<string | undefined>;
|
|
93
|
+
/** Emitted when a crumb is clicked (never when disabled). */
|
|
94
|
+
itemClick: _angular_core.OutputEmitterRef<UiBreadcrumbItemCommandEvent>;
|
|
95
|
+
/** Custom crumb content: `<ng-template #item let-item let-last="last">`. */
|
|
96
|
+
protected readonly itemTemplate: _angular_core.Signal<TemplateRef<unknown> | undefined>;
|
|
97
|
+
/** Custom separator content: `<ng-template #separator>`. */
|
|
98
|
+
protected readonly separatorTemplate: _angular_core.Signal<TemplateRef<unknown> | undefined>;
|
|
99
|
+
/** @ignore Root list — focus management after expanding the overflow. */
|
|
100
|
+
private readonly listEl;
|
|
101
|
+
/** @ignore */
|
|
102
|
+
private readonly injector;
|
|
103
|
+
constructor();
|
|
104
|
+
/** @ignore Overflow revealed by the ellipsis button; resets when items change. */
|
|
105
|
+
protected readonly overflowExpanded: _angular_core.WritableSignal<boolean>;
|
|
106
|
+
/** @ignore Crumb / ellipsis icon size follows the breadcrumb density. */
|
|
107
|
+
protected readonly iconSize: _angular_core.Signal<"default" | "sm">;
|
|
108
|
+
/** @ignore */
|
|
109
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
110
|
+
/** @ignore Render entries: visible crumbs, middle collapsed when overflowing. */
|
|
111
|
+
protected readonly entries: _angular_core.Signal<UiBreadcrumbEntry[]>;
|
|
112
|
+
/** @ignore Class list of a crumb `<li>` (base + per-item styleClass). */
|
|
113
|
+
protected itemClasses(item: UiBreadcrumbItem): string;
|
|
114
|
+
/** @ignore Internal navigation: `routerLink` wins over `url`. */
|
|
115
|
+
protected isRouterCrumb(item: UiBreadcrumbItem): boolean;
|
|
116
|
+
/** @ignore Plain navigation: an `url` and no `routerLink`. */
|
|
117
|
+
protected isHrefCrumb(item: UiBreadcrumbItem): boolean;
|
|
118
|
+
/** @ignore Action-only crumb (a `command` with no destination) → real `<button>`. */
|
|
119
|
+
protected isActionCrumb(item: UiBreadcrumbItem): boolean;
|
|
120
|
+
/** @ignore Anchor `rel`: explicit, or a safe default for `target="_blank"`. */
|
|
121
|
+
protected relFor(item: UiBreadcrumbItem): string | null;
|
|
122
|
+
/** @ignore Reveal the hidden crumbs, moving focus to the first revealed one. */
|
|
123
|
+
protected expandOverflow(): void;
|
|
124
|
+
/** @ignore Crumb activation: command + itemClick (navigation stays native). */
|
|
125
|
+
protected onItemClick(event: Event, item: UiBreadcrumbItem): void;
|
|
126
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiBreadcrumb, never>;
|
|
127
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiBreadcrumb, "ui-breadcrumb", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "separator": { "alias": "separator"; "required": false; "isSignal": true; }; "maxItems": { "alias": "maxItems"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ellipsisAriaLabel": { "alias": "ellipsisAriaLabel"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; }, { "itemClick": "itemClick"; }, ["itemTemplate", "separatorTemplate"], never, true, never>;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export { UiBreadcrumb };
|
|
131
|
+
export type { BreadcrumbSize, UiBreadcrumbItem, UiBreadcrumbItemCommandEvent };
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { UiLevel } from '@4sh/ui-kit/types';
|
|
3
|
+
import { ButtonSize, ButtonIconPos, ButtonVariant, ButtonOnColor, ButtonNativeProps } from '@4sh/ui-kit/ui-button';
|
|
4
|
+
import { UiMenuItem, UiMenuItemCommandEvent, MenuSize } from '@4sh/ui-kit/ui-menu';
|
|
5
|
+
|
|
6
|
+
/** Size of the split button — forwarded to both inner buttons and the menu. */
|
|
7
|
+
type ButtonSplitSize = ButtonSize;
|
|
8
|
+
/**
|
|
9
|
+
* ui-button-split — a default action button glued to a dropdown trigger that
|
|
10
|
+
* reveals a collection of additional options.
|
|
11
|
+
*
|
|
12
|
+
* The main button fires the default action (`buttonClick`); the caret trigger
|
|
13
|
+
* toggles a {@link UiMenu} popup fed by the declarative `model`
|
|
14
|
+
* ({@link UiMenuItem}: leaves with `command` / `routerLink` / `url`, nested
|
|
15
|
+
* submenus, separators, icons…). Colors come from the `actions.*` tokens (via
|
|
16
|
+
* the composed `ui-button`), the panel from the `navigation.*` tokens (via
|
|
17
|
+
* `ui-menu`).
|
|
18
|
+
*
|
|
19
|
+
* The two buttons can be disabled independently: `buttonDisabled` for the
|
|
20
|
+
* action, `menuButtonDisabled` for the trigger, or `disabled` for both.
|
|
21
|
+
*/
|
|
22
|
+
declare class UiButtonSplit {
|
|
23
|
+
/** Additional options revealed by the dropdown (see {@link UiMenuItem}). */
|
|
24
|
+
model: _angular_core.InputSignal<UiMenuItem[]>;
|
|
25
|
+
/** Label of the default action button. */
|
|
26
|
+
label: _angular_core.InputSignal<string | undefined>;
|
|
27
|
+
/** Leading/trailing FontAwesome icon of the action button. */
|
|
28
|
+
icon: _angular_core.InputSignal<string | undefined>;
|
|
29
|
+
/** Position of the action button icon relative to its label. */
|
|
30
|
+
iconPos: _angular_core.InputSignal<ButtonIconPos>;
|
|
31
|
+
/** Icon of the dropdown trigger (the caret). */
|
|
32
|
+
dropdownIcon: _angular_core.InputSignal<string>;
|
|
33
|
+
/** Semantic level applied to both buttons. */
|
|
34
|
+
level: _angular_core.InputSignal<UiLevel>;
|
|
35
|
+
/** Size of the whole control (buttons + menu density). */
|
|
36
|
+
size: _angular_core.InputSignal<ButtonSize>;
|
|
37
|
+
/** Apparence appliquée aux deux boutons (action + trigger). */
|
|
38
|
+
variant: _angular_core.InputSignal<ButtonVariant>;
|
|
39
|
+
/** Luminosité du fond de couleur sur lequel le contrôle est posé (voir `ui-button.onColor`). */
|
|
40
|
+
onColor: _angular_core.InputSignal<ButtonOnColor | null>;
|
|
41
|
+
/** Disable both the action and the dropdown trigger. */
|
|
42
|
+
disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
43
|
+
/** Disable only the default action button. */
|
|
44
|
+
buttonDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
45
|
+
/** Disable only the dropdown trigger button. */
|
|
46
|
+
menuButtonDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
47
|
+
/** Accessible name of the action button (required when it is icon-only). */
|
|
48
|
+
ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
49
|
+
/** Accessible name of the dropdown trigger (icon-only button). */
|
|
50
|
+
menuButtonAriaLabel: _angular_core.InputSignal<string>;
|
|
51
|
+
/** Accessible name of the options list. */
|
|
52
|
+
menuAriaLabel: _angular_core.InputSignal<string | undefined>;
|
|
53
|
+
/** Color family of the menu panel: `high` (default) or `low`. */
|
|
54
|
+
menuLevel: _angular_core.InputSignal<"high" | "low">;
|
|
55
|
+
/** Extra class(es) applied to the menu panel (scoped custom styling). */
|
|
56
|
+
menuStyleClass: _angular_core.InputSignal<string | undefined>;
|
|
57
|
+
/** Auto-flip the popup above the trigger when space is lacking below. */
|
|
58
|
+
autoFlip: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
59
|
+
/** Animate the popup entrance (reduced-motion always wins). */
|
|
60
|
+
motion: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
61
|
+
/** Native tabindex of the action button. */
|
|
62
|
+
tabindex: _angular_core.InputSignal<number | undefined>;
|
|
63
|
+
/** Extra native attributes forwarded onto the action `<button>`. */
|
|
64
|
+
buttonProps: _angular_core.InputSignal<ButtonNativeProps | undefined>;
|
|
65
|
+
/** Fired when the default action button is clicked (never when disabled). */
|
|
66
|
+
buttonClick: _angular_core.OutputEmitterRef<MouseEvent>;
|
|
67
|
+
/** Fired when the dropdown trigger is clicked (never when disabled). */
|
|
68
|
+
dropdownClick: _angular_core.OutputEmitterRef<MouseEvent>;
|
|
69
|
+
/** Fired when the options popup opens. */
|
|
70
|
+
menuShow: _angular_core.OutputEmitterRef<void>;
|
|
71
|
+
/** Fired when the options popup closes. */
|
|
72
|
+
menuHide: _angular_core.OutputEmitterRef<void>;
|
|
73
|
+
/** Fired when an option is activated (click / keyboard). */
|
|
74
|
+
itemClick: _angular_core.OutputEmitterRef<UiMenuItemCommandEvent>;
|
|
75
|
+
/** @ignore Action button (programmatic focus). */
|
|
76
|
+
private readonly actionButton;
|
|
77
|
+
/** @ignore Embedded options menu (programmatic close). */
|
|
78
|
+
private readonly menu;
|
|
79
|
+
/** @ignore Popup open state (drives the trigger's `aria-expanded`). */
|
|
80
|
+
protected readonly menuOpen: _angular_core.WritableSignal<boolean>;
|
|
81
|
+
/** @ignore Menu density mirrors the control size. */
|
|
82
|
+
protected readonly menuSize: _angular_core.Signal<MenuSize>;
|
|
83
|
+
/** @ignore The action button is disabled by its own flag or the global one. */
|
|
84
|
+
protected readonly actionDisabled: _angular_core.Signal<boolean>;
|
|
85
|
+
/** @ignore The trigger is disabled by its own flag or the global one. */
|
|
86
|
+
protected readonly triggerDisabled: _angular_core.Signal<boolean>;
|
|
87
|
+
/** @ignore */
|
|
88
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
89
|
+
/** Sets focus on the default action button. */
|
|
90
|
+
focus(options?: FocusOptions): void;
|
|
91
|
+
/** Closes the options popup. */
|
|
92
|
+
hide(): void;
|
|
93
|
+
/** @ignore */
|
|
94
|
+
protected onButtonClick(event: MouseEvent): void;
|
|
95
|
+
/** @ignore Trigger click: re-emit, then toggle the popup anchored to it. */
|
|
96
|
+
protected onDropdownClick(event: MouseEvent): void;
|
|
97
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiButtonSplit, never>;
|
|
98
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiButtonSplit, "ui-button-split", never, { "model": { "alias": "model"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconPos": { "alias": "iconPos"; "required": false; "isSignal": true; }; "dropdownIcon": { "alias": "dropdownIcon"; "required": false; "isSignal": true; }; "level": { "alias": "level"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "onColor": { "alias": "onColor"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "buttonDisabled": { "alias": "buttonDisabled"; "required": false; "isSignal": true; }; "menuButtonDisabled": { "alias": "menuButtonDisabled"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "menuButtonAriaLabel": { "alias": "menuButtonAriaLabel"; "required": false; "isSignal": true; }; "menuAriaLabel": { "alias": "menuAriaLabel"; "required": false; "isSignal": true; }; "menuLevel": { "alias": "menuLevel"; "required": false; "isSignal": true; }; "menuStyleClass": { "alias": "menuStyleClass"; "required": false; "isSignal": true; }; "autoFlip": { "alias": "autoFlip"; "required": false; "isSignal": true; }; "motion": { "alias": "motion"; "required": false; "isSignal": true; }; "tabindex": { "alias": "tabindex"; "required": false; "isSignal": true; }; "buttonProps": { "alias": "buttonProps"; "required": false; "isSignal": true; }; }, { "buttonClick": "buttonClick"; "dropdownClick": "dropdownClick"; "menuShow": "menuShow"; "menuHide": "menuHide"; "itemClick": "itemClick"; }, never, ["*"], true, never>;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export { UiButtonSplit };
|
|
102
|
+
export type { ButtonSplitSize };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { TemplateRef } from '@angular/core';
|
|
3
|
+
import { UiLevel } from '@4sh/ui-kit/types';
|
|
4
|
+
|
|
5
|
+
type ButtonType = 'button' | 'submit' | 'reset';
|
|
6
|
+
type ButtonSize = 'default' | 'small';
|
|
7
|
+
type ButtonVariant = 'filled' | 'outlined' | 'ghost';
|
|
8
|
+
/** Luminosité du fond sur lequel le bouton est posé (voir l'input `onColor`). */
|
|
9
|
+
type ButtonOnColor = 'dark' | 'light';
|
|
10
|
+
type ButtonIconPos = 'left' | 'right' | 'top' | 'bottom';
|
|
11
|
+
type ButtonNativeProps = Record<string, string | number | boolean | null | undefined>;
|
|
12
|
+
declare class UiButton {
|
|
13
|
+
label: _angular_core.InputSignal<string | undefined>;
|
|
14
|
+
ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
15
|
+
type: _angular_core.InputSignal<ButtonType>;
|
|
16
|
+
level: _angular_core.InputSignal<UiLevel>;
|
|
17
|
+
variant: _angular_core.InputSignal<ButtonVariant>;
|
|
18
|
+
/**
|
|
19
|
+
* À renseigner **uniquement** quand le bouton est posé sur un fond de couleur
|
|
20
|
+
* (bandeau, carte teintée, image) : indique la luminosité de ce fond, et le
|
|
21
|
+
* bouton épingle son chrome en conséquence — `'dark'` ⇒ blanc, `'light'` ⇒
|
|
22
|
+
* sombre. Orthogonal à `level` et `variant`. Volontairement **insensible au
|
|
23
|
+
* thème** : un bandeau violet reste violet en clair comme en sombre.
|
|
24
|
+
*/
|
|
25
|
+
onColor: _angular_core.InputSignal<ButtonOnColor | null>;
|
|
26
|
+
size: _angular_core.InputSignal<ButtonSize>;
|
|
27
|
+
icon: _angular_core.InputSignal<string | undefined>;
|
|
28
|
+
iconPos: _angular_core.InputSignal<ButtonIconPos>;
|
|
29
|
+
iconOnly: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
30
|
+
loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
31
|
+
loadingIcon: _angular_core.InputSignal<string>;
|
|
32
|
+
expanded: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
33
|
+
rounded: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
34
|
+
disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
35
|
+
tabindex: _angular_core.InputSignal<number | undefined>;
|
|
36
|
+
buttonProps: _angular_core.InputSignal<ButtonNativeProps | undefined>;
|
|
37
|
+
iconTemplate: _angular_core.InputSignal<TemplateRef<unknown> | undefined>;
|
|
38
|
+
loadingIconTemplate: _angular_core.InputSignal<TemplateRef<unknown> | undefined>;
|
|
39
|
+
/** External / plain URL. Presence switches the host to an <a>. */
|
|
40
|
+
href: _angular_core.InputSignal<string | undefined>;
|
|
41
|
+
/** Angular router target. Presence switches the host to an <a> (RouterLink). */
|
|
42
|
+
routerLink: _angular_core.InputSignal<string | unknown[] | undefined>;
|
|
43
|
+
/** Anchor target (e.g. "_blank"). Only applies in link mode. */
|
|
44
|
+
target: _angular_core.InputSignal<string | undefined>;
|
|
45
|
+
/** Anchor rel. Defaults to "noopener noreferrer" when target="_blank". */
|
|
46
|
+
rel: _angular_core.InputSignal<string | undefined>;
|
|
47
|
+
/** Triggered on click (never if disabled or loading). */
|
|
48
|
+
buttonClick: _angular_core.OutputEmitterRef<MouseEvent>;
|
|
49
|
+
/** Fired when the button receives focus. */
|
|
50
|
+
buttonFocus: _angular_core.OutputEmitterRef<FocusEvent>;
|
|
51
|
+
/** Fired when the button loses focus. */
|
|
52
|
+
buttonBlur: _angular_core.OutputEmitterRef<FocusEvent>;
|
|
53
|
+
/** @ignore Host element (either the <button> or the <a>). */
|
|
54
|
+
private readonly hostEl;
|
|
55
|
+
/** @ignore */
|
|
56
|
+
private readonly contentWrap;
|
|
57
|
+
/** @ignore Content actually rendered via <ng-content> (detected after rendering). */
|
|
58
|
+
private readonly hasProjectedContent;
|
|
59
|
+
constructor();
|
|
60
|
+
/** @ignore */
|
|
61
|
+
protected readonly iconSize: _angular_core.Signal<"default" | "sm">;
|
|
62
|
+
/** @ignore An icon (or its template) is available. */
|
|
63
|
+
protected readonly hasIcon: _angular_core.Signal<boolean>;
|
|
64
|
+
/** @ignore Visible text content (label or displayed content). */
|
|
65
|
+
protected readonly hasVisibleText: _angular_core.Signal<boolean>;
|
|
66
|
+
/** @ignore The icon appears before the content (left/top) or after it (right/bottom). */
|
|
67
|
+
protected readonly iconBefore: _angular_core.Signal<boolean>;
|
|
68
|
+
/** @ignore Icon-only mode: forced, or inferred (icon only, with no visible text). */
|
|
69
|
+
protected readonly isIconOnly: _angular_core.Signal<boolean>;
|
|
70
|
+
/** @ignore Accessible name: explicit; otherwise, the label is hidden as “icon-only”; otherwise, the text is visible. */
|
|
71
|
+
protected readonly accessibleLabel: _angular_core.Signal<string | null>;
|
|
72
|
+
/** @ignore Host renders an <a> (a URL or a router target was provided). */
|
|
73
|
+
protected readonly isLink: _angular_core.Signal<boolean>;
|
|
74
|
+
/** @ignore Link mode uses the Angular RouterLink directive. */
|
|
75
|
+
protected readonly useRouterLink: _angular_core.Signal<boolean>;
|
|
76
|
+
/** @ignore Anchor rel: explicit, or a safe default for target="_blank". */
|
|
77
|
+
protected readonly computedRel: _angular_core.Signal<string | null>;
|
|
78
|
+
/** @ignore Anchor tabindex: -1 when disabled (an <a> has no native disabled). */
|
|
79
|
+
protected readonly linkTabindex: _angular_core.Signal<number | null>;
|
|
80
|
+
/** @ignore */
|
|
81
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
82
|
+
/** Sets the focus on the button (useful for controlling focus programmatically). */
|
|
83
|
+
focus(options?: FocusOptions): void;
|
|
84
|
+
/** @ignore */
|
|
85
|
+
protected onClick(event: MouseEvent): void;
|
|
86
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiButton, never>;
|
|
87
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiButton, "ui-button", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "level": { "alias": "level"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "onColor": { "alias": "onColor"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconPos": { "alias": "iconPos"; "required": false; "isSignal": true; }; "iconOnly": { "alias": "iconOnly"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "loadingIcon": { "alias": "loadingIcon"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "tabindex": { "alias": "tabindex"; "required": false; "isSignal": true; }; "buttonProps": { "alias": "buttonProps"; "required": false; "isSignal": true; }; "iconTemplate": { "alias": "iconTemplate"; "required": false; "isSignal": true; }; "loadingIconTemplate": { "alias": "loadingIconTemplate"; "required": false; "isSignal": true; }; "href": { "alias": "href"; "required": false; "isSignal": true; }; "routerLink": { "alias": "routerLink"; "required": false; "isSignal": true; }; "target": { "alias": "target"; "required": false; "isSignal": true; }; "rel": { "alias": "rel"; "required": false; "isSignal": true; }; }, { "buttonClick": "buttonClick"; "buttonFocus": "buttonFocus"; "buttonBlur": "buttonBlur"; }, never, ["*"], true, never>;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export { UiButton };
|
|
91
|
+
export type { ButtonIconPos, ButtonNativeProps, ButtonOnColor, ButtonSize, ButtonType, ButtonVariant };
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
type CardVariant = 'outlined' | 'elevated' | 'flat';
|
|
4
|
+
/**
|
|
5
|
+
* Slot markers — apply them (attribute or element form) on the content you project
|
|
6
|
+
* into a `<ui-card>` to route it to the matching region. They carry no behaviour;
|
|
7
|
+
* the card queries their presence to render the surrounding structure.
|
|
8
|
+
*
|
|
9
|
+
* <ui-card>
|
|
10
|
+
* <img uiCardMedia … />
|
|
11
|
+
* <span uiCardTitle>Title</span>
|
|
12
|
+
* <span uiCardSubtitle>Subtitle</span>
|
|
13
|
+
* Body content (default slot)
|
|
14
|
+
* <div uiCardFooter><ui-button … /></div>
|
|
15
|
+
* </ui-card>
|
|
16
|
+
*/
|
|
17
|
+
/** Full-bleed media region, rendered above the body (image, illustration…). */
|
|
18
|
+
declare class UiCardMedia {
|
|
19
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiCardMedia, never>;
|
|
20
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiCardMedia, "[uiCardMedia], ui-card-media", never, {}, {}, never, never, true, never>;
|
|
21
|
+
}
|
|
22
|
+
/** Title region (also settable via the `header` string input). */
|
|
23
|
+
declare class UiCardTitle {
|
|
24
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiCardTitle, never>;
|
|
25
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiCardTitle, "[uiCardTitle], ui-card-title", never, {}, {}, never, never, true, never>;
|
|
26
|
+
}
|
|
27
|
+
/** Subtitle region (also settable via the `subheader` string input). */
|
|
28
|
+
declare class UiCardSubtitle {
|
|
29
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiCardSubtitle, never>;
|
|
30
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiCardSubtitle, "[uiCardSubtitle], ui-card-subtitle", never, {}, {}, never, never, true, never>;
|
|
31
|
+
}
|
|
32
|
+
/** Footer region (actions, tags…), rendered below the body content. */
|
|
33
|
+
declare class UiCardFooter {
|
|
34
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiCardFooter, never>;
|
|
35
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiCardFooter, "[uiCardFooter], ui-card-footer", never, {}, {}, never, never, true, never>;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* ui-card — flexible container that composes optional regions: media, header
|
|
39
|
+
* (title + subtitle), body content and footer.
|
|
40
|
+
*
|
|
41
|
+
* Headless: renders a neutral `surface` box (border + radius, optional elevation) whose
|
|
42
|
+
* regions are driven by content projection. Each region is rendered only when it holds
|
|
43
|
+
* content, so no empty wrapper (and no phantom gap) is emitted. The most common case —
|
|
44
|
+
* dropping content into the card — needs no imports (default `<ng-content>`); title and
|
|
45
|
+
* subtitle also accept the `header`/`subheader` string inputs. Richer slots use the
|
|
46
|
+
* exported marker directives (`UiCardMedia`, `UiCardTitle`, `UiCardSubtitle`, `UiCardFooter`).
|
|
47
|
+
*/
|
|
48
|
+
declare class UiCard {
|
|
49
|
+
/** Title text (convenience shorthand for the `uiCardTitle` slot). */
|
|
50
|
+
header: _angular_core.InputSignal<string | undefined>;
|
|
51
|
+
/** Subtitle text (convenience shorthand for the `uiCardSubtitle` slot). */
|
|
52
|
+
subheader: _angular_core.InputSignal<string | undefined>;
|
|
53
|
+
/** Visual treatment of the surface. */
|
|
54
|
+
variant: _angular_core.InputSignal<CardVariant>;
|
|
55
|
+
/**
|
|
56
|
+
* Removes the horizontal gutter of the default content region so it bleeds to
|
|
57
|
+
* the card edges — lets the consumer own the inner layout (e.g. a full-bleed
|
|
58
|
+
* media/color band + a padded paragraph). Re-apply the gutter on inner blocks
|
|
59
|
+
* with `padding-inline: var(--ui-card-padding)`.
|
|
60
|
+
*/
|
|
61
|
+
contentFlush: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
62
|
+
/** Accessible name for the card region (use when the card conveys a landmark). */
|
|
63
|
+
ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
64
|
+
/** Id of the element labelling the card region. */
|
|
65
|
+
ariaLabelledBy: _angular_core.InputSignal<string | undefined>;
|
|
66
|
+
/** @ignore */
|
|
67
|
+
protected readonly titleSlot: _angular_core.Signal<UiCardTitle | undefined>;
|
|
68
|
+
/** @ignore */
|
|
69
|
+
protected readonly subtitleSlot: _angular_core.Signal<UiCardSubtitle | undefined>;
|
|
70
|
+
/** @ignore */
|
|
71
|
+
protected readonly mediaSlot: _angular_core.Signal<UiCardMedia | undefined>;
|
|
72
|
+
/** @ignore */
|
|
73
|
+
protected readonly footerSlot: _angular_core.Signal<UiCardFooter | undefined>;
|
|
74
|
+
/** @ignore */
|
|
75
|
+
private readonly contentWrap;
|
|
76
|
+
/** @ignore Default content actually projected (detected after rendering). */
|
|
77
|
+
private readonly hasProjectedContent;
|
|
78
|
+
constructor();
|
|
79
|
+
/** @ignore A title is provided (string input or projected slot). */
|
|
80
|
+
protected readonly hasTitle: _angular_core.Signal<boolean>;
|
|
81
|
+
/** @ignore A subtitle is provided (string input or projected slot). */
|
|
82
|
+
protected readonly hasSubtitle: _angular_core.Signal<boolean>;
|
|
83
|
+
/** @ignore The header region (title and/or subtitle) has content. */
|
|
84
|
+
protected readonly hasHeader: _angular_core.Signal<boolean>;
|
|
85
|
+
/** @ignore A media slot is provided. */
|
|
86
|
+
protected readonly hasMedia: _angular_core.Signal<boolean>;
|
|
87
|
+
/** @ignore A footer slot is provided. */
|
|
88
|
+
protected readonly hasFooter: _angular_core.Signal<boolean>;
|
|
89
|
+
/** @ignore The body has default content. */
|
|
90
|
+
protected readonly hasContent: _angular_core.Signal<boolean>;
|
|
91
|
+
/** @ignore Render the string title only when no title slot overrides it. */
|
|
92
|
+
protected readonly showHeaderString: _angular_core.Signal<boolean>;
|
|
93
|
+
/** @ignore Render the string subtitle only when no subtitle slot overrides it. */
|
|
94
|
+
protected readonly showSubheaderString: _angular_core.Signal<boolean>;
|
|
95
|
+
/** @ignore */
|
|
96
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
97
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiCard, never>;
|
|
98
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiCard, "ui-card", never, { "header": { "alias": "header"; "required": false; "isSignal": true; }; "subheader": { "alias": "subheader"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "contentFlush": { "alias": "contentFlush"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; "isSignal": true; }; }, {}, ["titleSlot", "subtitleSlot", "mediaSlot", "footerSlot"], ["[uiCardMedia], ui-card-media", "[uiCardTitle], ui-card-title", "[uiCardSubtitle], ui-card-subtitle", "*", "[uiCardFooter], ui-card-footer"], true, never>;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export { UiCard, UiCardFooter, UiCardMedia, UiCardSubtitle, UiCardTitle };
|
|
102
|
+
export type { CardVariant };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { BaseFieldControl } from '@4sh/ui-kit/forms';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* ui-checkbox — headless checkbox built on a real native <input type="checkbox">.
|
|
6
|
+
*
|
|
7
|
+
* The native input stays in the DOM (visually covering the styled box) so
|
|
8
|
+
* keyboard, screen readers, label click and form semantics come for free.
|
|
9
|
+
* Interactive states (hover/focus/disabled/checked) are pure CSS driven by
|
|
10
|
+
* `form.*` design tokens.
|
|
11
|
+
*
|
|
12
|
+
* Works standalone, with [(ngModel)] or with reactive forms (ControlValueAccessor).
|
|
13
|
+
* By default the model value is boolean; `trueValue`/`falseValue` let the model
|
|
14
|
+
* carry any pair of values (e.g. 'yes'/'no', 1/0).
|
|
15
|
+
*/
|
|
16
|
+
declare class UiCheckbox<T = boolean> extends BaseFieldControl<T> {
|
|
17
|
+
/** Label displayed next to the box (clicking it toggles the checkbox). */
|
|
18
|
+
label: _angular_core.InputSignal<string | undefined>;
|
|
19
|
+
/** Model value emitted when checked. */
|
|
20
|
+
trueValue: _angular_core.InputSignal<T>;
|
|
21
|
+
/** Model value emitted when unchecked. */
|
|
22
|
+
falseValue: _angular_core.InputSignal<T>;
|
|
23
|
+
/** Visual indeterminate state ("some but not all selected"). Purely visual: the model keeps its value. */
|
|
24
|
+
indeterminate: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
25
|
+
/** Icon shown when checked. */
|
|
26
|
+
checkIcon: _angular_core.InputSignal<string>;
|
|
27
|
+
/** Icon shown when indeterminate. */
|
|
28
|
+
indeterminateIcon: _angular_core.InputSignal<string>;
|
|
29
|
+
/** Emitted on user toggle with the new model value (never when disabled/readonly). */
|
|
30
|
+
checkboxChange: _angular_core.OutputEmitterRef<T>;
|
|
31
|
+
/** Emitted when the native input receives focus. */
|
|
32
|
+
checkboxFocus: _angular_core.OutputEmitterRef<FocusEvent>;
|
|
33
|
+
/** Emitted when the native input loses focus. */
|
|
34
|
+
checkboxBlur: _angular_core.OutputEmitterRef<FocusEvent>;
|
|
35
|
+
/** @ignore */
|
|
36
|
+
private readonly inputEl;
|
|
37
|
+
constructor();
|
|
38
|
+
/** @ignore */
|
|
39
|
+
protected readonly checked: _angular_core.Signal<boolean>;
|
|
40
|
+
/** @ignore */
|
|
41
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
42
|
+
/** @ignore */
|
|
43
|
+
protected uidPrefix(): string;
|
|
44
|
+
/** Focus the native input programmatically. */
|
|
45
|
+
focus(options?: FocusOptions): void;
|
|
46
|
+
/** @ignore Native change: single source of truth for user toggles. */
|
|
47
|
+
protected onNativeChange(): void;
|
|
48
|
+
/** @ignore */
|
|
49
|
+
protected onBlur(event: FocusEvent): void;
|
|
50
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiCheckbox<any>, never>;
|
|
51
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiCheckbox<any>, "ui-checkbox", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "trueValue": { "alias": "trueValue"; "required": false; "isSignal": true; }; "falseValue": { "alias": "falseValue"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "checkIcon": { "alias": "checkIcon"; "required": false; "isSignal": true; }; "indeterminateIcon": { "alias": "indeterminateIcon"; "required": false; "isSignal": true; }; }, { "checkboxChange": "checkboxChange"; "checkboxFocus": "checkboxFocus"; "checkboxBlur": "checkboxBlur"; }, never, never, true, never>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { UiCheckbox };
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { UiIconSize } from '@4sh/ui-kit/ui-icon';
|
|
3
|
+
import { UiFeedbackLevel, UiSubLevel } from '@4sh/ui-kit/types';
|
|
4
|
+
|
|
5
|
+
type ChipSize = 'default' | 'small';
|
|
6
|
+
/**
|
|
7
|
+
* ui-chip — compact, interactive entity token.
|
|
8
|
+
*
|
|
9
|
+
* A close relative of `ui-tag`, but interactive: it can carry a leading icon or
|
|
10
|
+
* image (avatar-like), an optional remove action, and arbitrary projected content.
|
|
11
|
+
* Typical uses: selected values in a multi-select, filter/entity chips, keyword lists.
|
|
12
|
+
*
|
|
13
|
+
* Categorised by `level` × `subLevel` (informative color families) and fully
|
|
14
|
+
* token-driven. Interactive states (hover/focus on the remove action) are handled in
|
|
15
|
+
* CSS via the same `informative.*` tokens — never through Angular props.
|
|
16
|
+
*
|
|
17
|
+
* Accessible: `label` is exposed as the default `aria-label` (overridable via
|
|
18
|
+
* `ariaLabel` / `ariaLabelledBy`); the remove action is a native `<button>`, focusable
|
|
19
|
+
* with Tab and removable with Enter/Space (native) plus Backspace/Delete.
|
|
20
|
+
*/
|
|
21
|
+
declare class UiChip {
|
|
22
|
+
/** Text content of the chip. */
|
|
23
|
+
label: _angular_core.InputSignal<string | undefined>;
|
|
24
|
+
/** Color family. */
|
|
25
|
+
level: _angular_core.InputSignal<UiFeedbackLevel>;
|
|
26
|
+
/** Intensity: high (solid) or low (subtle). Chips default to the discreet `low`. */
|
|
27
|
+
subLevel: _angular_core.InputSignal<UiSubLevel>;
|
|
28
|
+
/** Size. */
|
|
29
|
+
size: _angular_core.InputSignal<ChipSize>;
|
|
30
|
+
/** FontAwesome name of the leading icon (ignored when `image` is set). */
|
|
31
|
+
icon: _angular_core.InputSignal<string | undefined>;
|
|
32
|
+
/** Leading image source (avatar-like). Takes priority over `icon`. */
|
|
33
|
+
image: _angular_core.InputSignal<string | undefined>;
|
|
34
|
+
/** Alternative text for the image (leave empty for a decorative image next to a label). */
|
|
35
|
+
alt: _angular_core.InputSignal<string | undefined>;
|
|
36
|
+
/** Pill shape when true (default); rounded-rectangle when false. */
|
|
37
|
+
rounded: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
38
|
+
/** Displays a remove action at the end of the chip. */
|
|
39
|
+
removable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
40
|
+
/** FontAwesome name of the remove icon. */
|
|
41
|
+
removeIcon: _angular_core.InputSignal<string>;
|
|
42
|
+
/** Disables the chip (the remove action / selection becomes non-interactive). */
|
|
43
|
+
disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
44
|
+
/**
|
|
45
|
+
* Turns the whole chip into a selectable toggle (choice/filter chip). The root
|
|
46
|
+
* becomes a native `<button aria-pressed>`; clicking toggles `selected`.
|
|
47
|
+
* Mutually exclusive with `removable` (nesting interactive elements is invalid).
|
|
48
|
+
*/
|
|
49
|
+
selectable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
50
|
+
/** Two-way selection state (only meaningful when `selectable`). */
|
|
51
|
+
selected: _angular_core.ModelSignal<boolean>;
|
|
52
|
+
/** FontAwesome name shown in the leading slot while selected (selectable mode). */
|
|
53
|
+
selectedIcon: _angular_core.InputSignal<string>;
|
|
54
|
+
/** Explicit accessible name (overrides the `label` default). */
|
|
55
|
+
ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
56
|
+
/** Id of the element labelling the chip (overrides `ariaLabel`/`label`). */
|
|
57
|
+
ariaLabelledBy: _angular_core.InputSignal<string | undefined>;
|
|
58
|
+
/** Accessible name of the remove action. */
|
|
59
|
+
removeAriaLabel: _angular_core.InputSignal<string>;
|
|
60
|
+
/**
|
|
61
|
+
* `tabindex` of the remove action. Leave unset for the natural tab order;
|
|
62
|
+
* set `-1` when the chip lives inside a roving-focus container (e.g.
|
|
63
|
+
* `ui-input-tags`) so the button is not a separate tab stop.
|
|
64
|
+
*/
|
|
65
|
+
removeTabindex: _angular_core.InputSignal<number | undefined>;
|
|
66
|
+
/** Emitted when the chip is removed (click or keyboard on the remove action). */
|
|
67
|
+
remove: _angular_core.OutputEmitterRef<Event>;
|
|
68
|
+
/** Emitted when a selectable chip is toggled (click or keyboard on the chip). */
|
|
69
|
+
chipClick: _angular_core.OutputEmitterRef<Event>;
|
|
70
|
+
/** Emitted when the image fails to load (the chip then falls back to icon/label). */
|
|
71
|
+
imageError: _angular_core.OutputEmitterRef<Event>;
|
|
72
|
+
/** @ignore Set once the current image source failed to load. */
|
|
73
|
+
private readonly imageFailed;
|
|
74
|
+
constructor();
|
|
75
|
+
/** @ignore There is a textual label. */
|
|
76
|
+
protected readonly hasLabel: _angular_core.Signal<boolean>;
|
|
77
|
+
/** @ignore The leading image is shown (source set and not failed). */
|
|
78
|
+
protected readonly showImage: _angular_core.Signal<boolean>;
|
|
79
|
+
/** @ignore Selectable + selected: the leading slot shows the selected icon. */
|
|
80
|
+
protected readonly showSelectedIcon: _angular_core.Signal<boolean>;
|
|
81
|
+
/** @ignore The leading image is shown (not overridden by the selected icon). */
|
|
82
|
+
protected readonly showLeadingImage: _angular_core.Signal<boolean>;
|
|
83
|
+
/** @ignore The leading font icon is shown (no image / selected icon taking its place). */
|
|
84
|
+
protected readonly showIcon: _angular_core.Signal<boolean>;
|
|
85
|
+
/** @ignore The leading font icon is shown (not overridden by the selected icon). */
|
|
86
|
+
protected readonly showLeadingIcon: _angular_core.Signal<boolean>;
|
|
87
|
+
/** @ignore The remove action is rendered (never inside a selectable button). */
|
|
88
|
+
protected readonly showRemove: _angular_core.Signal<boolean>;
|
|
89
|
+
/** @ignore A visual (icon/image) with no textual label. */
|
|
90
|
+
protected readonly isVisualOnly: _angular_core.Signal<boolean>;
|
|
91
|
+
/** @ignore Resolved accessible name from the explicit label / ariaLabel. */
|
|
92
|
+
protected readonly accessibleName: _angular_core.Signal<string | null>;
|
|
93
|
+
/** @ignore Root `aria-label`: explicit name, suppressed when `ariaLabelledBy` wins. */
|
|
94
|
+
protected readonly rootAriaLabel: _angular_core.Signal<string | null>;
|
|
95
|
+
/** @ignore Leading icon size derived from the chip size. */
|
|
96
|
+
protected readonly iconSize: _angular_core.Signal<UiIconSize>;
|
|
97
|
+
/** @ignore Remove icon is compact regardless of chip size. */
|
|
98
|
+
protected readonly removeIconSize: UiIconSize;
|
|
99
|
+
/** @ignore */
|
|
100
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
101
|
+
/** @ignore */
|
|
102
|
+
protected onImageError(event: Event): void;
|
|
103
|
+
/** @ignore */
|
|
104
|
+
protected onRemove(event: Event): void;
|
|
105
|
+
/** @ignore Backspace/Delete on the remove button also removes (Enter/Space are native). */
|
|
106
|
+
protected onRemoveKeydown(event: KeyboardEvent): void;
|
|
107
|
+
/** @ignore Toggle the selection (selectable mode). Enter/Space fire this via native click. */
|
|
108
|
+
protected onToggle(event: Event): void;
|
|
109
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiChip, never>;
|
|
110
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiChip, "ui-chip", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "level": { "alias": "level"; "required": false; "isSignal": true; }; "subLevel": { "alias": "subLevel"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "image": { "alias": "image"; "required": false; "isSignal": true; }; "alt": { "alias": "alt"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "removable": { "alias": "removable"; "required": false; "isSignal": true; }; "removeIcon": { "alias": "removeIcon"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "selectedIcon": { "alias": "selectedIcon"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; "isSignal": true; }; "removeAriaLabel": { "alias": "removeAriaLabel"; "required": false; "isSignal": true; }; "removeTabindex": { "alias": "removeTabindex"; "required": false; "isSignal": true; }; }, { "selected": "selectedChange"; "remove": "remove"; "chipClick": "chipClick"; "imageError": "imageError"; }, never, ["*"], true, never>;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export { UiChip };
|
|
114
|
+
export type { ChipSize };
|