@4sh/ui-kit 0.16.0 → 0.17.1
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/README.fr.md +10 -10
- package/README.md +10 -10
- package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs +542 -150
- package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +622 -248
- package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-link.mjs +385 -152
- package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs +748 -433
- package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-base-ui-icon.mjs +227 -135
- package/fesm2022/4sh-ui-kit-base-ui-icon.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-base-ui-image.mjs +1200 -633
- package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +1675 -1000
- package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs +243 -117
- package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +2294 -2048
- package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs +1058 -1113
- package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs +1108 -0
- package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-forms-ui-field.mjs +397 -141
- package/fesm2022/4sh-ui-kit-forms-ui-field.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs +1529 -583
- package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs +383 -224
- package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs +345 -177
- package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +280 -138
- package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +507 -257
- package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs +401 -312
- package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs +1277 -697
- package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +467 -199
- package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs +394 -270
- package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-label.mjs +140 -60
- package/fesm2022/4sh-ui-kit-forms-ui-label.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs +386 -167
- package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs +150 -87
- package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs +345 -180
- package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs +582 -392
- package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-select.mjs +1552 -888
- package/fesm2022/4sh-ui-kit-forms-ui-select.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs +485 -338
- package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs +503 -311
- package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +271 -137
- package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs +457 -214
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs +711 -371
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs +235 -121
- package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms.mjs +721 -638
- package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs +546 -242
- package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs +335 -157
- package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs +53 -33
- package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs +218 -121
- package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +192 -100
- package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs +456 -204
- package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs +314 -147
- package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs +179 -82
- package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs +268 -123
- package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs +391 -146
- package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs +158 -76
- package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs +159 -80
- package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs +295 -131
- package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs +211 -83
- package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs +784 -414
- package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs +822 -476
- package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs +1014 -599
- package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-card.mjs +403 -189
- package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs +707 -272
- package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +1146 -568
- package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs +519 -308
- package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-motion.mjs +252 -150
- package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs +793 -341
- package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +351 -194
- package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs +511 -220
- package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs +910 -548
- package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs +1128 -555
- package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +915 -470
- package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +931 -474
- package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-overlay.mjs +26 -109
- package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-ripple.mjs +329 -290
- package/fesm2022/4sh-ui-kit-ripple.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +709 -248
- package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-table-ui-table.mjs +2633 -1370
- package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-theming.mjs +112 -113
- package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-types.mjs +0 -12
- package/fesm2022/4sh-ui-kit.mjs +3 -15
- package/fesm2022/4sh-ui-kit.mjs.map +1 -1
- package/mcp/data/component-api.json +299 -2
- package/mcp/data/text-search-docs.json +149 -9
- package/mcp/data/ui-config.json +378 -1
- package/mcp/index.js +8190 -2876
- package/mcp/package.json +1 -1
- package/package.json +5 -1
- package/styles/component-vars.scss +22 -1
- package/types/4sh-ui-kit-actions-ui-button-split.d.ts +198 -87
- package/types/4sh-ui-kit-actions-ui-button.d.ts +240 -116
- package/types/4sh-ui-kit-actions-ui-link.d.ts +136 -67
- package/types/4sh-ui-kit-actions-ui-speed-dial.d.ts +287 -180
- package/types/4sh-ui-kit-base-ui-icon.d.ts +92 -58
- package/types/4sh-ui-kit-base-ui-image.d.ts +406 -205
- package/types/4sh-ui-kit-forms-ui-autocomplete.d.ts +573 -376
- package/types/4sh-ui-kit-forms-ui-checkbox.d.ts +77 -42
- package/types/4sh-ui-kit-forms-ui-datepicker.d.ts +953 -700
- package/types/4sh-ui-kit-forms-ui-editor.d.ts +374 -340
- package/types/4sh-ui-kit-forms-ui-field-sign.d.ts +325 -0
- package/types/4sh-ui-kit-forms-ui-field.d.ts +150 -64
- package/types/4sh-ui-kit-forms-ui-file-upload.d.ts +583 -241
- package/types/4sh-ui-kit-forms-ui-input-date.d.ts +152 -103
- package/types/4sh-ui-kit-forms-ui-input-group.d.ts +109 -63
- package/types/4sh-ui-kit-forms-ui-input-mask.d.ts +93 -59
- package/types/4sh-ui-kit-forms-ui-input-number.d.ts +171 -96
- package/types/4sh-ui-kit-forms-ui-input-otp.d.ts +137 -104
- package/types/4sh-ui-kit-forms-ui-input-tags.d.ts +469 -309
- package/types/4sh-ui-kit-forms-ui-input.d.ts +198 -118
- package/types/4sh-ui-kit-forms-ui-knob.d.ts +132 -80
- package/types/4sh-ui-kit-forms-ui-label.d.ts +47 -22
- package/types/4sh-ui-kit-forms-ui-nudger.d.ts +134 -67
- package/types/4sh-ui-kit-forms-ui-radio.d.ts +48 -33
- package/types/4sh-ui-kit-forms-ui-rating.d.ts +120 -86
- package/types/4sh-ui-kit-forms-ui-segment-control.d.ts +221 -147
- package/types/4sh-ui-kit-forms-ui-select.d.ts +561 -357
- package/types/4sh-ui-kit-forms-ui-slider.d.ts +156 -105
- package/types/4sh-ui-kit-forms-ui-swatch-picker.d.ts +133 -97
- package/types/4sh-ui-kit-forms-ui-textarea.d.ts +90 -56
- package/types/4sh-ui-kit-forms-ui-toggle-block.d.ts +158 -94
- package/types/4sh-ui-kit-forms-ui-toggle-button.d.ts +314 -178
- package/types/4sh-ui-kit-forms-ui-toggle.d.ts +88 -54
- package/types/4sh-ui-kit-forms.d.ts +275 -194
- package/types/4sh-ui-kit-informative-ui-accordion.d.ts +162 -92
- package/types/4sh-ui-kit-informative-ui-alert.d.ts +128 -62
- package/types/4sh-ui-kit-informative-ui-avatar-group.d.ts +8 -8
- package/types/4sh-ui-kit-informative-ui-avatar.d.ts +81 -44
- package/types/4sh-ui-kit-informative-ui-badge.d.ts +71 -41
- package/types/4sh-ui-kit-informative-ui-chip.d.ts +194 -99
- package/types/4sh-ui-kit-informative-ui-empty-state.d.ts +105 -65
- package/types/4sh-ui-kit-informative-ui-helper.d.ts +64 -34
- package/types/4sh-ui-kit-informative-ui-progress-bar.d.ts +120 -65
- package/types/4sh-ui-kit-informative-ui-read-only.d.ts +147 -67
- package/types/4sh-ui-kit-informative-ui-separator.d.ts +65 -35
- package/types/4sh-ui-kit-informative-ui-skeleton.d.ts +62 -32
- package/types/4sh-ui-kit-informative-ui-spinner.d.ts +111 -50
- package/types/4sh-ui-kit-informative-ui-tag.d.ts +77 -37
- package/types/4sh-ui-kit-informative-ui-toast.d.ts +300 -180
- package/types/4sh-ui-kit-informative-ui-tooltip.d.ts +269 -141
- package/types/4sh-ui-kit-layout-ui-bottom-sheet.d.ts +360 -221
- package/types/4sh-ui-kit-layout-ui-card.d.ts +119 -79
- package/types/4sh-ui-kit-layout-ui-drawer.d.ts +244 -120
- package/types/4sh-ui-kit-layout-ui-modal.d.ts +409 -222
- package/types/4sh-ui-kit-layout-ui-popover.d.ts +149 -91
- package/types/4sh-ui-kit-motion.d.ts +117 -67
- package/types/4sh-ui-kit-navigation-ui-bottom-tab-bar.d.ts +279 -145
- package/types/4sh-ui-kit-navigation-ui-breadcrumb.d.ts +134 -96
- package/types/4sh-ui-kit-navigation-ui-context-menu.d.ts +148 -89
- package/types/4sh-ui-kit-navigation-ui-menu.d.ts +282 -201
- package/types/4sh-ui-kit-navigation-ui-sidebar.d.ts +425 -261
- package/types/4sh-ui-kit-navigation-ui-stepper.d.ts +279 -183
- package/types/4sh-ui-kit-navigation-ui-tabs.d.ts +275 -173
- package/types/4sh-ui-kit-overlay.d.ts +6 -6
- package/types/4sh-ui-kit-ripple.d.ts +99 -74
- package/types/4sh-ui-kit-table-ui-paginator.d.ts +237 -133
- package/types/4sh-ui-kit-table-ui-table.d.ts +769 -470
- package/types/4sh-ui-kit-theming.d.ts +27 -29
- package/types/4sh-ui-kit-types.d.ts +6 -5
- package/types/4sh-ui-kit.d.ts +4 -3
- package/fesm2022/4sh-ui-kit-types.mjs.map +0 -1
|
@@ -1,79 +1,81 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import { TemplateRef } from "@angular/core";
|
|
6
|
+
import { BaseFieldControl } from "@4sh/ui-kit/forms";
|
|
7
|
+
import { UiIconSize } from "@4sh/ui-kit/base/ui-icon";
|
|
8
|
+
import { UiLevel } from "@4sh/ui-kit/types";
|
|
9
|
+
export type ToggleButtonSize = 'default' | 'small' | 'large';
|
|
8
10
|
/** Habillage de l'état **non** sélectionné (l'état sélectionné est toujours plein). */
|
|
9
|
-
type ToggleButtonVariant = 'outlined' | 'filled' | 'ghost';
|
|
10
|
-
type ToggleButtonIconPos = 'left' | 'right';
|
|
11
|
-
type ToggleButtonOrientation = 'horizontal' | 'vertical';
|
|
11
|
+
export type ToggleButtonVariant = 'outlined' | 'filled' | 'ghost';
|
|
12
|
+
export type ToggleButtonIconPos = 'left' | 'right';
|
|
13
|
+
export type ToggleButtonOrientation = 'horizontal' | 'vertical';
|
|
12
14
|
/** Model value: one of the `trueValue`/`falseValue` pair (single), or the array of pressed option values (group). */
|
|
13
|
-
type ToggleButtonValue<T> = T | T[] | null;
|
|
15
|
+
export type ToggleButtonValue<T> = T | T[] | null;
|
|
14
16
|
/**
|
|
15
17
|
* Rich option shape for the group mode. Options may also be primitives
|
|
16
18
|
* (`string`/`number`) or any object, in which case `optionLabel` /
|
|
17
19
|
* `optionValue` / `optionDisabled` / `optionIcon` tell the control how to read
|
|
18
20
|
* them.
|
|
19
21
|
*/
|
|
20
|
-
interface ToggleButtonOption<T = unknown> {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
export interface ToggleButtonOption<T = unknown> {
|
|
23
|
+
/** Text shown inside the button. */
|
|
24
|
+
label?: string;
|
|
25
|
+
/** Value carried into the model when the button is pressed. */
|
|
26
|
+
value: T;
|
|
27
|
+
/** Icon name (design-system icon). */
|
|
28
|
+
icon?: string;
|
|
29
|
+
/** Icon substituted while the button is pressed. */
|
|
30
|
+
selectedIcon?: string;
|
|
31
|
+
/** Disables just this button. */
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
/** Accessible name (required for an icon-only button). */
|
|
34
|
+
ariaLabel?: string;
|
|
33
35
|
}
|
|
34
36
|
/** Context handed to the `icon` / `content` templates (single mode). */
|
|
35
|
-
interface ToggleButtonStateContext {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
export interface ToggleButtonStateContext {
|
|
38
|
+
/** Whether the button is currently pressed (default `$implicit`). */
|
|
39
|
+
$implicit: boolean;
|
|
40
|
+
/** Same as `$implicit`, named for readability. */
|
|
41
|
+
checked: boolean;
|
|
40
42
|
}
|
|
41
43
|
/** Context handed to the `item` template (group mode). */
|
|
42
|
-
interface ToggleButtonItemContext<T = unknown> {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
export interface ToggleButtonItemContext<T = unknown> {
|
|
45
|
+
/** The original option (default `$implicit`). */
|
|
46
|
+
$implicit: T;
|
|
47
|
+
/** Same as `$implicit`, named for readability. */
|
|
48
|
+
option: T;
|
|
49
|
+
/** Whether this button is currently pressed. */
|
|
50
|
+
selected: boolean;
|
|
51
|
+
/** Index of the option in the list. */
|
|
52
|
+
index: number;
|
|
51
53
|
}
|
|
52
54
|
/** Payload emitted when a group button is clicked. */
|
|
53
|
-
interface ToggleButtonOptionClickEvent<T = unknown> {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
55
|
+
export interface ToggleButtonOptionClickEvent<T = unknown> {
|
|
56
|
+
/** The original option (as passed in `options`). */
|
|
57
|
+
option: T;
|
|
58
|
+
/** The resolved value of that option. */
|
|
59
|
+
value: T;
|
|
60
|
+
/** Index of the option in the list. */
|
|
61
|
+
index: number;
|
|
62
|
+
/** Pressed state after the click. */
|
|
63
|
+
selected: boolean;
|
|
64
|
+
/** Originating DOM event. */
|
|
65
|
+
originalEvent: Event;
|
|
64
66
|
}
|
|
65
67
|
/** @ignore Internal, normalized view of a group option. */
|
|
66
68
|
interface NormalizedToggle {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
69
|
+
key: string;
|
|
70
|
+
index: number;
|
|
71
|
+
value: unknown;
|
|
72
|
+
label: string | null;
|
|
73
|
+
icon: string | null;
|
|
74
|
+
ariaLabel: string | null;
|
|
75
|
+
disabled: boolean;
|
|
76
|
+
selected: boolean;
|
|
77
|
+
iconOnly: boolean;
|
|
78
|
+
original: unknown;
|
|
77
79
|
}
|
|
78
80
|
/**
|
|
79
81
|
* ui-toggle-button — a button that holds a pressed state.
|
|
@@ -100,123 +102,257 @@ interface NormalizedToggle {
|
|
|
100
102
|
* <ui-toggle-button [(ngModel)]="days" [options]="dayOptions" ariaLabel="Jours ouvrés" />
|
|
101
103
|
* ```
|
|
102
104
|
*/
|
|
103
|
-
declare class UiToggleButton<T = boolean> extends BaseFieldControl<ToggleButtonValue<T>> {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
105
|
+
export declare class UiToggleButton<T = boolean> extends BaseFieldControl<ToggleButtonValue<T>> {
|
|
106
|
+
/** Label shown in both states (fallback of `onLabel` / `offLabel`). */
|
|
107
|
+
label: import("@angular/core").InputSignal<string | undefined>;
|
|
108
|
+
/** Label shown while pressed. */
|
|
109
|
+
onLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
110
|
+
/** Label shown while released. */
|
|
111
|
+
offLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
112
|
+
/** Icon shown in both states (fallback of `onIcon` / `offIcon`). */
|
|
113
|
+
icon: import("@angular/core").InputSignal<string | undefined>;
|
|
114
|
+
/** Icon shown while pressed. */
|
|
115
|
+
onIcon: import("@angular/core").InputSignal<string | undefined>;
|
|
116
|
+
/** Icon shown while released. */
|
|
117
|
+
offIcon: import("@angular/core").InputSignal<string | undefined>;
|
|
118
|
+
/** Side of the label the icon sits on. */
|
|
119
|
+
iconPos: import("@angular/core").InputSignal<ToggleButtonIconPos>;
|
|
120
|
+
/** Model value emitted when pressed. */
|
|
121
|
+
trueValue: import("@angular/core").InputSignal<T>;
|
|
122
|
+
/** Model value emitted when released. */
|
|
123
|
+
falseValue: import("@angular/core").InputSignal<T>;
|
|
124
|
+
/** Options to display, one button each. Presence switches the host to group mode. */
|
|
125
|
+
options: import("@angular/core").InputSignal<readonly (T | ToggleButtonOption<T>)[] | undefined>;
|
|
126
|
+
/** Field name to read a label from, when options are objects. */
|
|
127
|
+
optionLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
128
|
+
/** Field name to read the value from, when options are objects. */
|
|
129
|
+
optionValue: import("@angular/core").InputSignal<string | undefined>;
|
|
130
|
+
/** Field name to read the disabled flag from, when options are objects. */
|
|
131
|
+
optionDisabled: import("@angular/core").InputSignal<string | undefined>;
|
|
132
|
+
/** Field name to read an icon name from, when options are objects. */
|
|
133
|
+
optionIcon: import("@angular/core").InputSignal<string | undefined>;
|
|
134
|
+
/** Property used to compare object values for equality (selection matching). */
|
|
135
|
+
dataKey: import("@angular/core").InputSignal<string | undefined>;
|
|
136
|
+
/** Layout axis of the group. */
|
|
137
|
+
orientation: import("@angular/core").InputSignal<ToggleButtonOrientation>;
|
|
138
|
+
/** Colour family of the pressed state. */
|
|
139
|
+
level: import("@angular/core").InputSignal<UiLevel>;
|
|
140
|
+
/** How the released state is drawn. */
|
|
141
|
+
variant: import("@angular/core").InputSignal<ToggleButtonVariant>;
|
|
142
|
+
/** Size. */
|
|
143
|
+
size: import("@angular/core").InputSignal<ToggleButtonSize>;
|
|
144
|
+
/** Span the full width of the parent (group buttons share the width evenly). */
|
|
145
|
+
fluid: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
146
|
+
/** Ripple Effect */
|
|
147
|
+
ripple: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
148
|
+
/** Pill shape. */
|
|
149
|
+
rounded: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
150
|
+
/** Whether the last pressed button can be released (single), or the group emptied. */
|
|
151
|
+
allowEmpty: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
152
|
+
/** Replaces the icon, single mode (receives `{ $implicit, checked }`). */
|
|
153
|
+
iconTemplate: import("@angular/core").InputSignal<TemplateRef<ToggleButtonStateContext> | undefined>;
|
|
154
|
+
/** Replaces the whole button content, single mode (receives `{ $implicit, checked }`). */
|
|
155
|
+
contentTemplate: import("@angular/core").InputSignal<TemplateRef<ToggleButtonStateContext> | undefined>;
|
|
156
|
+
/** Replaces a group button's content (receives `{ $implicit, option, selected, index }`). */
|
|
157
|
+
itemTemplate: import("@angular/core").InputSignal<TemplateRef<ToggleButtonItemContext<T>> | undefined>;
|
|
158
|
+
/** Emitted on user interaction with the new model value. */
|
|
159
|
+
toggleChange: import("@angular/core").OutputEmitterRef<ToggleButtonValue<T>>;
|
|
160
|
+
/** Emitted when a group button is clicked (even if it does not change the value). */
|
|
161
|
+
optionClick: import("@angular/core").OutputEmitterRef<ToggleButtonOptionClickEvent<T>>;
|
|
162
|
+
/** Emitted when a button receives focus. */
|
|
163
|
+
toggleFocus: import("@angular/core").OutputEmitterRef<FocusEvent>;
|
|
164
|
+
/** Emitted when a button loses focus. */
|
|
165
|
+
toggleBlur: import("@angular/core").OutputEmitterRef<FocusEvent>;
|
|
166
|
+
/** @ignore */
|
|
167
|
+
private readonly buttons;
|
|
168
|
+
/** @ignore */
|
|
169
|
+
private readonly resolver;
|
|
170
|
+
constructor();
|
|
171
|
+
/** @ignore Group mode: an `options` list was provided. */
|
|
172
|
+
protected readonly isGroup: import("@angular/core").Signal<boolean>;
|
|
173
|
+
/** @ignore */
|
|
174
|
+
protected readonly iconSize: import("@angular/core").Signal<UiIconSize>;
|
|
175
|
+
/** @ignore */
|
|
176
|
+
protected readonly hostClasses: import("@angular/core").Signal<string>;
|
|
177
|
+
/** @ignore Only the group carries the group-level ARIA naming. */
|
|
178
|
+
protected readonly groupAriaLabel: import("@angular/core").Signal<string | null>;
|
|
179
|
+
/** @ignore */
|
|
180
|
+
protected readonly groupAriaLabelledBy: import("@angular/core").Signal<string | null>;
|
|
181
|
+
/** @ignore */
|
|
182
|
+
protected readonly checked: import("@angular/core").Signal<boolean>;
|
|
183
|
+
/** @ignore */
|
|
184
|
+
protected readonly hasStateLabels: import("@angular/core").Signal<boolean>;
|
|
185
|
+
/** @ignore Label of the current state, falling back to the shared one. */
|
|
186
|
+
protected readonly currentLabel: import("@angular/core").Signal<string | null>;
|
|
187
|
+
/** @ignore Icon of the current state, falling back to the shared one. */
|
|
188
|
+
protected readonly currentIcon: import("@angular/core").Signal<string | null>;
|
|
189
|
+
/** @ignore Square button: an icon, no text. */
|
|
190
|
+
protected readonly isIconOnly: import("@angular/core").Signal<boolean>;
|
|
191
|
+
/** @ignore */
|
|
192
|
+
protected readonly iconBefore: import("@angular/core").Signal<boolean>;
|
|
193
|
+
/** @ignore */
|
|
194
|
+
protected readonly stateContext: import("@angular/core").Signal<ToggleButtonStateContext>;
|
|
195
|
+
/** @ignore Accessible name of the single button (never empty-stringed). */
|
|
196
|
+
protected readonly buttonAriaLabel: import("@angular/core").Signal<string | null>;
|
|
197
|
+
/** @ignore Options resolved to a flat, render-ready shape. */
|
|
198
|
+
protected readonly normalizedOptions: import("@angular/core").Signal<NormalizedToggle[]>;
|
|
199
|
+
/** @ignore */
|
|
200
|
+
protected itemContext(item: NormalizedToggle): ToggleButtonItemContext<T>;
|
|
201
|
+
/** @ignore */
|
|
202
|
+
protected uidPrefix(): string;
|
|
203
|
+
/** Focus the button (the first enabled one in group mode). */
|
|
204
|
+
focus(options?: FocusOptions): void;
|
|
205
|
+
/** @ignore Single mode: flip the boolean pair. */
|
|
206
|
+
protected toggle(): void;
|
|
207
|
+
/** @ignore Group mode: press / release one option. */
|
|
208
|
+
protected toggleOption(item: NormalizedToggle, event: Event): void;
|
|
209
|
+
/** @ignore */
|
|
210
|
+
protected onBlur(event: FocusEvent): void;
|
|
211
|
+
/** @ignore Rich option shape (`{ value }`) resolves without a field mapping. */
|
|
212
|
+
private resolveValue;
|
|
213
|
+
/** @ignore An option object with no label key stays label-less (icon-only button). */
|
|
214
|
+
private resolveLabel;
|
|
215
|
+
/** @ignore */
|
|
216
|
+
private resolveIcon;
|
|
217
|
+
/** @ignore A group's model is the array of pressed values. */
|
|
218
|
+
private isPressed;
|
|
219
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiToggleButton<any>, never>;
|
|
220
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UiToggleButton<any>, "ui-toggle-button", never, {
|
|
221
|
+
"label": {
|
|
222
|
+
"alias": "label";
|
|
223
|
+
"required": false;
|
|
224
|
+
"isSignal": true;
|
|
225
|
+
};
|
|
226
|
+
"onLabel": {
|
|
227
|
+
"alias": "onLabel";
|
|
228
|
+
"required": false;
|
|
229
|
+
"isSignal": true;
|
|
230
|
+
};
|
|
231
|
+
"offLabel": {
|
|
232
|
+
"alias": "offLabel";
|
|
233
|
+
"required": false;
|
|
234
|
+
"isSignal": true;
|
|
235
|
+
};
|
|
236
|
+
"icon": {
|
|
237
|
+
"alias": "icon";
|
|
238
|
+
"required": false;
|
|
239
|
+
"isSignal": true;
|
|
240
|
+
};
|
|
241
|
+
"onIcon": {
|
|
242
|
+
"alias": "onIcon";
|
|
243
|
+
"required": false;
|
|
244
|
+
"isSignal": true;
|
|
245
|
+
};
|
|
246
|
+
"offIcon": {
|
|
247
|
+
"alias": "offIcon";
|
|
248
|
+
"required": false;
|
|
249
|
+
"isSignal": true;
|
|
250
|
+
};
|
|
251
|
+
"iconPos": {
|
|
252
|
+
"alias": "iconPos";
|
|
253
|
+
"required": false;
|
|
254
|
+
"isSignal": true;
|
|
255
|
+
};
|
|
256
|
+
"trueValue": {
|
|
257
|
+
"alias": "trueValue";
|
|
258
|
+
"required": false;
|
|
259
|
+
"isSignal": true;
|
|
260
|
+
};
|
|
261
|
+
"falseValue": {
|
|
262
|
+
"alias": "falseValue";
|
|
263
|
+
"required": false;
|
|
264
|
+
"isSignal": true;
|
|
265
|
+
};
|
|
266
|
+
"options": {
|
|
267
|
+
"alias": "options";
|
|
268
|
+
"required": false;
|
|
269
|
+
"isSignal": true;
|
|
270
|
+
};
|
|
271
|
+
"optionLabel": {
|
|
272
|
+
"alias": "optionLabel";
|
|
273
|
+
"required": false;
|
|
274
|
+
"isSignal": true;
|
|
275
|
+
};
|
|
276
|
+
"optionValue": {
|
|
277
|
+
"alias": "optionValue";
|
|
278
|
+
"required": false;
|
|
279
|
+
"isSignal": true;
|
|
280
|
+
};
|
|
281
|
+
"optionDisabled": {
|
|
282
|
+
"alias": "optionDisabled";
|
|
283
|
+
"required": false;
|
|
284
|
+
"isSignal": true;
|
|
285
|
+
};
|
|
286
|
+
"optionIcon": {
|
|
287
|
+
"alias": "optionIcon";
|
|
288
|
+
"required": false;
|
|
289
|
+
"isSignal": true;
|
|
290
|
+
};
|
|
291
|
+
"dataKey": {
|
|
292
|
+
"alias": "dataKey";
|
|
293
|
+
"required": false;
|
|
294
|
+
"isSignal": true;
|
|
295
|
+
};
|
|
296
|
+
"orientation": {
|
|
297
|
+
"alias": "orientation";
|
|
298
|
+
"required": false;
|
|
299
|
+
"isSignal": true;
|
|
300
|
+
};
|
|
301
|
+
"level": {
|
|
302
|
+
"alias": "level";
|
|
303
|
+
"required": false;
|
|
304
|
+
"isSignal": true;
|
|
305
|
+
};
|
|
306
|
+
"variant": {
|
|
307
|
+
"alias": "variant";
|
|
308
|
+
"required": false;
|
|
309
|
+
"isSignal": true;
|
|
310
|
+
};
|
|
311
|
+
"size": {
|
|
312
|
+
"alias": "size";
|
|
313
|
+
"required": false;
|
|
314
|
+
"isSignal": true;
|
|
315
|
+
};
|
|
316
|
+
"fluid": {
|
|
317
|
+
"alias": "fluid";
|
|
318
|
+
"required": false;
|
|
319
|
+
"isSignal": true;
|
|
320
|
+
};
|
|
321
|
+
"ripple": {
|
|
322
|
+
"alias": "ripple";
|
|
323
|
+
"required": false;
|
|
324
|
+
"isSignal": true;
|
|
325
|
+
};
|
|
326
|
+
"rounded": {
|
|
327
|
+
"alias": "rounded";
|
|
328
|
+
"required": false;
|
|
329
|
+
"isSignal": true;
|
|
330
|
+
};
|
|
331
|
+
"allowEmpty": {
|
|
332
|
+
"alias": "allowEmpty";
|
|
333
|
+
"required": false;
|
|
334
|
+
"isSignal": true;
|
|
335
|
+
};
|
|
336
|
+
"iconTemplate": {
|
|
337
|
+
"alias": "iconTemplate";
|
|
338
|
+
"required": false;
|
|
339
|
+
"isSignal": true;
|
|
340
|
+
};
|
|
341
|
+
"contentTemplate": {
|
|
342
|
+
"alias": "contentTemplate";
|
|
343
|
+
"required": false;
|
|
344
|
+
"isSignal": true;
|
|
345
|
+
};
|
|
346
|
+
"itemTemplate": {
|
|
347
|
+
"alias": "itemTemplate";
|
|
348
|
+
"required": false;
|
|
349
|
+
"isSignal": true;
|
|
350
|
+
};
|
|
351
|
+
}, {
|
|
352
|
+
"toggleChange": "toggleChange";
|
|
353
|
+
"optionClick": "optionClick";
|
|
354
|
+
"toggleFocus": "toggleFocus";
|
|
355
|
+
"toggleBlur": "toggleBlur";
|
|
356
|
+
}, never, never, true, never>;
|
|
219
357
|
}
|
|
220
|
-
|
|
221
|
-
export { UiToggleButton };
|
|
222
|
-
export type { ToggleButtonIconPos, ToggleButtonItemContext, ToggleButtonOption, ToggleButtonOptionClickEvent, ToggleButtonOrientation, ToggleButtonSize, ToggleButtonStateContext, ToggleButtonValue, ToggleButtonVariant };
|
|
358
|
+
export {};
|