@doku-com/tala 1.0.0-alpha.5 → 1.0.0-alpha.7
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.md +1 -1
- package/fesm2022/doku-com-tala.mjs +398 -138
- package/fesm2022/doku-com-tala.mjs.map +1 -1
- package/package.json +4 -4
- package/styles/_typography.scss +162 -277
- package/styles/index.scss +26 -4
- package/styles/tokens/_color.scss +135 -0
- package/styles/tokens/_typography.scss +6 -0
- package/styles/tokens/_utility.scss +35 -0
- package/styles/tokens/index.scss +3 -0
- package/types/doku-com-tala.d.ts +214 -46
- package/llms.txt +0 -244
- package/styles/_color.scss +0 -178
- package/styles/_radius.scss +0 -10
- package/styles/_shadow.scss +0 -7
- package/styles/_spacing.scss +0 -12
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
// Spacing
|
|
3
|
+
--tala-ref-space-1: 4px;
|
|
4
|
+
--tala-ref-space-2: 8px;
|
|
5
|
+
--tala-ref-space-3: 12px;
|
|
6
|
+
--tala-ref-space-4: 16px;
|
|
7
|
+
--tala-ref-space-5: 20px;
|
|
8
|
+
--tala-ref-space-6: 24px;
|
|
9
|
+
--tala-ref-space-8: 32px;
|
|
10
|
+
--tala-ref-space-10: 40px;
|
|
11
|
+
--tala-ref-space-12: 48px;
|
|
12
|
+
--tala-ref-space-16: 64px;
|
|
13
|
+
|
|
14
|
+
// Radius
|
|
15
|
+
--tala-ref-radius-none: 0px;
|
|
16
|
+
--tala-ref-radius-xs: 2px;
|
|
17
|
+
--tala-ref-radius-sm: 4px;
|
|
18
|
+
--tala-ref-radius-md: 6px;
|
|
19
|
+
--tala-ref-radius-lg: 8px;
|
|
20
|
+
--tala-ref-radius-xl: 12px;
|
|
21
|
+
--tala-ref-radius-2xl: 16px;
|
|
22
|
+
--tala-ref-radius-full: 9999px;
|
|
23
|
+
|
|
24
|
+
// Shadow
|
|
25
|
+
--tala-ref-shadow-xs: 0 1px 2px
|
|
26
|
+
color-mix(in srgb, var(--tala-ref-color-neutral-100) 5%, transparent);
|
|
27
|
+
--tala-ref-shadow-sm: 0 1px 3px
|
|
28
|
+
color-mix(in srgb, var(--tala-ref-color-neutral-100) 8%, transparent);
|
|
29
|
+
--tala-ref-shadow-md: 0 4px 6px
|
|
30
|
+
color-mix(in srgb, var(--tala-ref-color-neutral-100) 7%, transparent);
|
|
31
|
+
--tala-ref-shadow-lg: 0 10px 15px
|
|
32
|
+
color-mix(in srgb, var(--tala-ref-color-neutral-100) 8%, transparent);
|
|
33
|
+
--tala-ref-shadow-xl: 0 20px 25px
|
|
34
|
+
color-mix(in srgb, var(--tala-ref-color-neutral-100) 10%, transparent);
|
|
35
|
+
}
|
package/types/doku-com-tala.d.ts
CHANGED
|
@@ -1,15 +1,43 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { InjectionToken, Signal, TemplateRef } from '@angular/core';
|
|
3
|
+
import { FormValueControl } from '@angular/forms/signals';
|
|
4
|
+
|
|
5
|
+
type AlertVariant = 'info' | 'success' | 'warning' | 'danger';
|
|
6
|
+
type AlertType = 'inline' | 'banner';
|
|
7
|
+
type AlertAction = 'none' | 'label' | 'custom';
|
|
8
|
+
declare class TalaAlert {
|
|
9
|
+
readonly variant: _angular_core.InputSignal<AlertVariant>;
|
|
10
|
+
readonly type: _angular_core.InputSignal<AlertType>;
|
|
11
|
+
readonly title: _angular_core.InputSignal<string>;
|
|
12
|
+
readonly message: _angular_core.InputSignal<string>;
|
|
13
|
+
readonly dismissible: _angular_core.InputSignal<boolean>;
|
|
14
|
+
readonly action: _angular_core.InputSignal<AlertAction>;
|
|
15
|
+
readonly actionLabel: _angular_core.InputSignal<string>;
|
|
16
|
+
readonly actionClick: _angular_core.OutputEmitterRef<void>;
|
|
17
|
+
readonly dismissed: _angular_core.OutputEmitterRef<void>;
|
|
18
|
+
protected readonly _dismissed: _angular_core.WritableSignal<boolean>;
|
|
19
|
+
protected readonly hostClasses: _angular_core.Signal<string>;
|
|
20
|
+
protected _onActionClick(): void;
|
|
21
|
+
protected _onDismiss(): void;
|
|
22
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TalaAlert, never>;
|
|
23
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TalaAlert, "tala-alert", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; "action": { "alias": "action"; "required": false; "isSignal": true; }; "actionLabel": { "alias": "actionLabel"; "required": false; "isSignal": true; }; }, { "actionClick": "actionClick"; "dismissed": "dismissed"; }, never, ["*"], true, never>;
|
|
24
|
+
}
|
|
3
25
|
|
|
4
26
|
type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
5
27
|
type AvatarShape = 'circle' | 'square';
|
|
6
28
|
type AvatarStatus = 'none' | 'online' | 'busy' | 'away' | 'offline';
|
|
7
29
|
declare class TalaAvatar {
|
|
30
|
+
/** Accessible display name used for initials and the generated aria label. */
|
|
8
31
|
readonly name: _angular_core.InputSignal<string>;
|
|
32
|
+
/** Visual size of the avatar. */
|
|
9
33
|
readonly size: _angular_core.InputSignal<AvatarSize>;
|
|
34
|
+
/** Outer shape of the avatar container. */
|
|
10
35
|
readonly shape: _angular_core.InputSignal<AvatarShape>;
|
|
36
|
+
/** Optional presence indicator shown on the avatar. */
|
|
11
37
|
readonly status: _angular_core.InputSignal<AvatarStatus>;
|
|
38
|
+
/** Optional notification badge count. Values above 99 render as `99+`. */
|
|
12
39
|
readonly badgeCount: _angular_core.InputSignal<number>;
|
|
40
|
+
/** Image URL. When omitted, the component falls back to generated initials. */
|
|
13
41
|
readonly src: _angular_core.InputSignal<string>;
|
|
14
42
|
protected readonly initials: _angular_core.Signal<string>;
|
|
15
43
|
protected readonly bgColor: _angular_core.Signal<string>;
|
|
@@ -26,6 +54,7 @@ declare class TalaAvatar {
|
|
|
26
54
|
}
|
|
27
55
|
|
|
28
56
|
declare class TalaAvatarGroup {
|
|
57
|
+
/** Shared avatar size applied to items inside the group. */
|
|
29
58
|
readonly size: _angular_core.InputSignal<AvatarSize>;
|
|
30
59
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TalaAvatarGroup, never>;
|
|
31
60
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TalaAvatarGroup, "tala-avatar-group", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
@@ -33,52 +62,142 @@ declare class TalaAvatarGroup {
|
|
|
33
62
|
|
|
34
63
|
type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'accent' | 'danger' | 'link';
|
|
35
64
|
type ButtonSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
36
|
-
type ButtonType = 'button' | 'submit' | 'reset';
|
|
37
65
|
declare class TalaButton {
|
|
66
|
+
private readonly el;
|
|
67
|
+
/**
|
|
68
|
+
* Selects the button's visual treatment.
|
|
69
|
+
*
|
|
70
|
+
* @default 'primary'
|
|
71
|
+
*/
|
|
38
72
|
readonly variant: _angular_core.InputSignal<ButtonVariant>;
|
|
73
|
+
/**
|
|
74
|
+
* Controls the button's height and horizontal padding.
|
|
75
|
+
*
|
|
76
|
+
* @default 'md'
|
|
77
|
+
*/
|
|
39
78
|
readonly size: _angular_core.InputSignal<ButtonSize>;
|
|
40
|
-
|
|
79
|
+
/**
|
|
80
|
+
* Disables interaction.
|
|
81
|
+
* Applies the native `disabled` attribute on `<button>` and `aria-disabled="true"` plus
|
|
82
|
+
* `tabindex="-1"` on `<a>`.
|
|
83
|
+
*
|
|
84
|
+
* @default false
|
|
85
|
+
*/
|
|
41
86
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
87
|
+
/**
|
|
88
|
+
* Shows the loading state and blocks interaction.
|
|
89
|
+
* Adds `aria-busy="true"` and reuses disabled behavior while loading, including removing
|
|
90
|
+
* anchors from the tab order.
|
|
91
|
+
*
|
|
92
|
+
* @default false
|
|
93
|
+
*/
|
|
42
94
|
readonly loading: _angular_core.InputSignal<boolean>;
|
|
95
|
+
/**
|
|
96
|
+
* Collapses horizontal padding for icon-only buttons.
|
|
97
|
+
* Provide an accessible name such as `aria-label` when no visible text is present.
|
|
98
|
+
*
|
|
99
|
+
* @default false
|
|
100
|
+
*/
|
|
43
101
|
readonly iconOnly: _angular_core.InputSignal<boolean>;
|
|
102
|
+
protected readonly isButton: boolean;
|
|
44
103
|
protected readonly hostClasses: _angular_core.Signal<string>;
|
|
45
|
-
protected
|
|
104
|
+
protected onHostClick(event: Event): void;
|
|
46
105
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TalaButton, never>;
|
|
47
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TalaButton, "
|
|
106
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TalaButton, "button[talaButton], a[talaButton]", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "iconOnly": { "alias": "iconOnly"; "required": false; "isSignal": true; }; }, {}, never, ["[slot=prefix]", "*", "[slot=suffix]"], true, never>;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Contract a control (e.g. `TalaInput`) provides to a hosting `TalaFormField` so the wrapper can
|
|
111
|
+
* reflect the control's presentational state (label `for`, container border, disabled styling)
|
|
112
|
+
* without either side importing the other's concrete class.
|
|
113
|
+
*/
|
|
114
|
+
interface TalaFormFieldControl {
|
|
115
|
+
readonly id: Signal<string>;
|
|
116
|
+
readonly disabled: Signal<boolean>;
|
|
117
|
+
readonly readonly: Signal<boolean>;
|
|
118
|
+
readonly required: Signal<boolean>;
|
|
119
|
+
readonly status: Signal<string>;
|
|
120
|
+
readonly size: Signal<string>;
|
|
121
|
+
}
|
|
122
|
+
declare const TALA_FORM_FIELD_CONTROL: InjectionToken<TalaFormFieldControl>;
|
|
123
|
+
/**
|
|
124
|
+
* Contract a `TalaFormField` provides to its projected control so the control can wire its own
|
|
125
|
+
* `aria-describedby` to the wrapper's helper text without the wrapper writing to it directly.
|
|
126
|
+
*
|
|
127
|
+
* The helper row is always rendered (visible whenever a consumer projects `slot="helper"`
|
|
128
|
+
* content, regardless of `disabled` — CSS collapses it only when genuinely empty, see
|
|
129
|
+
* `form-field.scss`), so `helperId` is always a stable id, not conditionally `null`. An
|
|
130
|
+
* `aria-describedby` pointing at a rendered-but-empty element is harmless to assistive tech
|
|
131
|
+
* (nothing to announce), so this avoids needing a way to detect "did the consumer project
|
|
132
|
+
* content into this slot", which would otherwise require a marker directive the consumer has to
|
|
133
|
+
* remember to import.
|
|
134
|
+
*/
|
|
135
|
+
interface TalaFormFieldHost {
|
|
136
|
+
readonly helperId: Signal<string>;
|
|
137
|
+
}
|
|
138
|
+
declare const TALA_FORM_FIELD_HOST: InjectionToken<TalaFormFieldHost>;
|
|
139
|
+
|
|
140
|
+
declare class TalaFormField implements TalaFormFieldHost {
|
|
141
|
+
private static _nextId;
|
|
142
|
+
protected readonly _id: string;
|
|
143
|
+
protected readonly _helperId: string;
|
|
144
|
+
protected readonly _control: _angular_core.Signal<TalaFormFieldControl | undefined>;
|
|
145
|
+
protected readonly _controlId: _angular_core.Signal<string | undefined>;
|
|
146
|
+
protected readonly _status: _angular_core.Signal<string>;
|
|
147
|
+
protected readonly _size: _angular_core.Signal<string>;
|
|
148
|
+
protected readonly _required: _angular_core.Signal<boolean>;
|
|
149
|
+
protected readonly _isDisabled: _angular_core.Signal<boolean>;
|
|
150
|
+
protected readonly _isReadonly: _angular_core.Signal<boolean>;
|
|
151
|
+
readonly helperId: _angular_core.Signal<string>;
|
|
152
|
+
protected readonly hostClasses: _angular_core.Signal<string>;
|
|
153
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TalaFormField, never>;
|
|
154
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TalaFormField, "tala-form-field", never, {}, {}, ["_control"], ["[slot=label]", "[slot=prefix]", "[slot=leading-icon]", "*", "[slot=trailing-icon]", "[slot=suffix]", "[slot=helper]"], true, never>;
|
|
48
155
|
}
|
|
49
156
|
|
|
50
157
|
type InputSize = 'sm' | 'md' | 'lg';
|
|
51
158
|
type InputStatus = 'default' | 'error' | 'success' | 'warning';
|
|
52
|
-
declare class TalaInput implements
|
|
159
|
+
declare class TalaInput implements TalaFormFieldControl {
|
|
53
160
|
private static _nextId;
|
|
161
|
+
private readonly _field;
|
|
162
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
54
163
|
readonly size: _angular_core.InputSignal<InputSize>;
|
|
55
164
|
readonly status: _angular_core.InputSignal<InputStatus>;
|
|
56
|
-
readonly label: _angular_core.InputSignal<string>;
|
|
57
|
-
readonly placeholder: _angular_core.InputSignal<string>;
|
|
58
|
-
readonly helperText: _angular_core.InputSignal<string>;
|
|
59
|
-
readonly required: _angular_core.InputSignal<boolean>;
|
|
60
165
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
61
166
|
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
62
|
-
readonly
|
|
63
|
-
readonly
|
|
64
|
-
readonly type: _angular_core.InputSignal<string>;
|
|
65
|
-
readonly name: _angular_core.InputSignal<string>;
|
|
66
|
-
protected readonly _id: string;
|
|
67
|
-
protected readonly _helperId: string;
|
|
68
|
-
protected readonly _value: _angular_core.WritableSignal<string>;
|
|
69
|
-
protected readonly _disabledByForm: _angular_core.WritableSignal<boolean>;
|
|
70
|
-
protected readonly _isDisabled: _angular_core.Signal<boolean>;
|
|
71
|
-
protected readonly hostClasses: _angular_core.Signal<string>;
|
|
72
|
-
private _onChange;
|
|
73
|
-
private _onTouched;
|
|
74
|
-
writeValue(value: string): void;
|
|
75
|
-
registerOnChange(fn: (value: string) => void): void;
|
|
76
|
-
registerOnTouched(fn: () => void): void;
|
|
77
|
-
setDisabledState(isDisabled: boolean): void;
|
|
78
|
-
protected _onInput(event: Event): void;
|
|
79
|
-
protected _onBlur(): void;
|
|
167
|
+
readonly required: _angular_core.InputSignal<boolean>;
|
|
168
|
+
protected readonly _describedBy: _angular_core.Signal<string>;
|
|
80
169
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TalaInput, never>;
|
|
81
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TalaInput, "
|
|
170
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TalaInput, "input[talaInput]", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "status": { "alias": "status"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
interface SelectOptionTemplateContext {
|
|
174
|
+
$implicit: SelectOption;
|
|
175
|
+
selected: boolean;
|
|
176
|
+
focused: boolean;
|
|
177
|
+
}
|
|
178
|
+
interface SelectValueTemplateContext {
|
|
179
|
+
$implicit: SelectOption;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Apply to an `ng-template` projected into `tala-select` to override how each
|
|
183
|
+
* option is rendered inside the dropdown list.
|
|
184
|
+
*/
|
|
185
|
+
declare class TalaSelectOptionTemplate {
|
|
186
|
+
static ngTemplateContextGuard(_dir: TalaSelectOptionTemplate, ctx: unknown): ctx is SelectOptionTemplateContext;
|
|
187
|
+
readonly templateRef: TemplateRef<SelectOptionTemplateContext>;
|
|
188
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TalaSelectOptionTemplate, never>;
|
|
189
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TalaSelectOptionTemplate, "ng-template[talaSelectOption]", never, {}, {}, never, never, true, never>;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Apply to an `ng-template` projected into `tala-select` to override how the
|
|
193
|
+
* chosen value is rendered — the trigger label for `single`/`searchable`, or
|
|
194
|
+
* each chip for `multi`.
|
|
195
|
+
*/
|
|
196
|
+
declare class TalaSelectValueTemplate {
|
|
197
|
+
static ngTemplateContextGuard(_dir: TalaSelectValueTemplate, ctx: unknown): ctx is SelectValueTemplateContext;
|
|
198
|
+
readonly templateRef: TemplateRef<SelectValueTemplateContext>;
|
|
199
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TalaSelectValueTemplate, never>;
|
|
200
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TalaSelectValueTemplate, "ng-template[talaSelectValue]", never, {}, {}, never, never, true, never>;
|
|
82
201
|
}
|
|
83
202
|
|
|
84
203
|
type SelectType = 'single' | 'searchable' | 'multi';
|
|
@@ -89,7 +208,7 @@ interface SelectOption {
|
|
|
89
208
|
label: string;
|
|
90
209
|
disabled?: boolean;
|
|
91
210
|
}
|
|
92
|
-
declare class TalaSelect implements
|
|
211
|
+
declare class TalaSelect implements FormValueControl<string | string[]> {
|
|
93
212
|
private static _nextId;
|
|
94
213
|
private readonly _elementRef;
|
|
95
214
|
readonly type: _angular_core.InputSignal<SelectType>;
|
|
@@ -103,31 +222,25 @@ declare class TalaSelect implements ControlValueAccessor {
|
|
|
103
222
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
104
223
|
readonly loading: _angular_core.InputSignal<boolean>;
|
|
105
224
|
readonly width: _angular_core.InputSignal<string>;
|
|
225
|
+
readonly value: _angular_core.ModelSignal<string | string[]>;
|
|
226
|
+
readonly touched: _angular_core.ModelSignal<boolean>;
|
|
106
227
|
protected readonly _id: string;
|
|
107
228
|
protected readonly _helperId: string;
|
|
108
229
|
protected readonly _listboxId: string;
|
|
109
230
|
protected readonly _isOpen: _angular_core.WritableSignal<boolean>;
|
|
110
|
-
protected readonly _value: _angular_core.WritableSignal<string | string[]>;
|
|
111
231
|
protected readonly _searchQuery: _angular_core.WritableSignal<string>;
|
|
112
232
|
protected readonly _focusedIndex: _angular_core.WritableSignal<number>;
|
|
113
|
-
protected readonly _disabledByForm: _angular_core.WritableSignal<boolean>;
|
|
114
|
-
protected readonly _isDisabled: _angular_core.Signal<boolean>;
|
|
115
233
|
protected readonly _hostWidth: _angular_core.Signal<string>;
|
|
116
234
|
protected readonly _filteredOptions: _angular_core.Signal<SelectOption[]>;
|
|
117
235
|
protected readonly _hasValue: _angular_core.Signal<boolean>;
|
|
118
236
|
protected readonly _displayValue: _angular_core.Signal<string>;
|
|
119
|
-
protected readonly
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
237
|
+
protected readonly _selectedOption: _angular_core.Signal<SelectOption | undefined>;
|
|
238
|
+
protected readonly _selectedOptions: _angular_core.Signal<SelectOption[]>;
|
|
239
|
+
protected readonly _optionTemplate: _angular_core.Signal<TalaSelectOptionTemplate | undefined>;
|
|
240
|
+
protected readonly _valueTemplate: _angular_core.Signal<TalaSelectValueTemplate | undefined>;
|
|
123
241
|
protected readonly hostClasses: _angular_core.Signal<string>;
|
|
124
|
-
private _onChange;
|
|
125
|
-
private _onTouched;
|
|
126
242
|
_onDocumentClick(target: EventTarget | null): void;
|
|
127
|
-
|
|
128
|
-
registerOnChange(fn: (value: string | string[]) => void): void;
|
|
129
|
-
registerOnTouched(fn: () => void): void;
|
|
130
|
-
setDisabledState(isDisabled: boolean): void;
|
|
243
|
+
focus(options?: FocusOptions): void;
|
|
131
244
|
protected _onTriggerClick(event: MouseEvent): void;
|
|
132
245
|
protected _onTriggerKeydown(event: KeyboardEvent): void;
|
|
133
246
|
protected _selectOption(opt: SelectOption, event: Event): void;
|
|
@@ -137,8 +250,63 @@ declare class TalaSelect implements ControlValueAccessor {
|
|
|
137
250
|
protected _onDropdownClick(event: MouseEvent): void;
|
|
138
251
|
protected _onSearchKeydown(event: KeyboardEvent): void;
|
|
139
252
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TalaSelect, never>;
|
|
140
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TalaSelect, "tala-select", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "status": { "alias": "status"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "helperText": { "alias": "helperText"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; }, {},
|
|
253
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TalaSelect, "tala-select", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "status": { "alias": "status"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "helperText": { "alias": "helperText"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touched": "touchedChange"; }, ["_optionTemplate", "_valueTemplate"], never, true, never>;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
type TextVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'body' | 'label' | 'caption' | 'code' | 'docTitle' | 'docSection';
|
|
257
|
+
type TextSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
258
|
+
type TextWeight = 'regular' | 'medium' | 'semibold' | 'bold';
|
|
259
|
+
declare class TalaText {
|
|
260
|
+
/**
|
|
261
|
+
* Sets the text variant/semantic type.
|
|
262
|
+
* Determines the HTML semantics and typography styles applied to the element.
|
|
263
|
+
*
|
|
264
|
+
* @default 'body'
|
|
265
|
+
* @example
|
|
266
|
+
* // Heading variant
|
|
267
|
+
* <h1 talaText="h1">Heading 1</h1>
|
|
268
|
+
* // Body text with custom size
|
|
269
|
+
* <p talaText="body">Body text</p>
|
|
270
|
+
* // Code block
|
|
271
|
+
* <code talaText="code">const x = 42;</code>
|
|
272
|
+
*/
|
|
273
|
+
readonly talaText: _angular_core.InputSignal<TextVariant>;
|
|
274
|
+
/**
|
|
275
|
+
* Controls the font size relative to the current variant.
|
|
276
|
+
* Size mapping varies by variant:
|
|
277
|
+
* - Ignored for headings (h1-h6), code, and documentation text
|
|
278
|
+
* - body: 'sm' | 'md' (default) | 'lg'
|
|
279
|
+
* - label: 'xs' | 'sm' | 'md' (default) | 'lg'
|
|
280
|
+
* - caption: 'sm' (default) | 'lg'
|
|
281
|
+
*
|
|
282
|
+
* @default 'md'
|
|
283
|
+
* @example
|
|
284
|
+
* <p talaText="body" [size]="'lg'">Large body text</p>
|
|
285
|
+
*/
|
|
286
|
+
readonly size: _angular_core.InputSignal<TextSize>;
|
|
287
|
+
/**
|
|
288
|
+
* Controls the font weight.
|
|
289
|
+
* Weight application varies by variant:
|
|
290
|
+
* - Ignored for headings (h1-h6), code, caption, and documentation text
|
|
291
|
+
* - For body/label: 'regular' (default) | 'medium' | 'semibold' | 'bold'
|
|
292
|
+
*
|
|
293
|
+
* @default 'regular'
|
|
294
|
+
* @example
|
|
295
|
+
* <p talaText="body" [weight]="'bold'">Bold body text</p>
|
|
296
|
+
*/
|
|
297
|
+
readonly weight: _angular_core.InputSignal<TextWeight>;
|
|
298
|
+
private readonly normalizedVariant;
|
|
299
|
+
private readonly normalizedSize;
|
|
300
|
+
private readonly normalizedWeight;
|
|
301
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
302
|
+
private readonly variantClass;
|
|
303
|
+
private readonly weightClass;
|
|
304
|
+
private readonly bodySizeKey;
|
|
305
|
+
private readonly labelSizeKey;
|
|
306
|
+
private readonly captionSizeKey;
|
|
307
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TalaText, never>;
|
|
308
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TalaText, "[talaText]", never, { "talaText": { "alias": "talaText"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "weight": { "alias": "weight"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
141
309
|
}
|
|
142
310
|
|
|
143
|
-
export { TalaAvatar, TalaAvatarGroup, TalaButton, TalaInput, TalaSelect };
|
|
144
|
-
export type { AvatarShape, AvatarSize, AvatarStatus, ButtonSize,
|
|
311
|
+
export { TALA_FORM_FIELD_CONTROL, TALA_FORM_FIELD_HOST, TalaAlert, TalaAvatar, TalaAvatarGroup, TalaButton, TalaFormField, TalaInput, TalaSelect, TalaSelectOptionTemplate, TalaSelectValueTemplate, TalaText };
|
|
312
|
+
export type { AlertAction, AlertType, AlertVariant, AvatarShape, AvatarSize, AvatarStatus, ButtonSize, ButtonVariant, InputSize, InputStatus, SelectOption, SelectOptionTemplateContext, SelectSize, SelectStatus, SelectType, SelectValueTemplateContext, TalaFormFieldControl, TalaFormFieldHost, TextSize, TextVariant, TextWeight };
|
package/llms.txt
DELETED
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
# @doku-com/tala
|
|
2
|
-
|
|
3
|
-
Angular UI component library by DOKU. Provides accessible, themeable standalone components built with Angular signals and OnPush change detection.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install @doku-com/tala
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
Add global styles to your `angular.json`:
|
|
12
|
-
|
|
13
|
-
```json
|
|
14
|
-
"styles": ["node_modules/@doku-com/tala/styles/index.scss"]
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Or import in your global stylesheet:
|
|
18
|
-
|
|
19
|
-
```scss
|
|
20
|
-
@use '@doku-com/tala';
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## Design Tokens
|
|
26
|
-
|
|
27
|
-
All tokens are CSS custom properties. Apply via `var(--token-name)`.
|
|
28
|
-
|
|
29
|
-
### Colors
|
|
30
|
-
|
|
31
|
-
Surface:
|
|
32
|
-
- `--tala-sys-color-surface-sunken` — recessed areas like inputs or code blocks
|
|
33
|
-
- `--tala-sys-color-surface-default` — base page and standard cards
|
|
34
|
-
- `--tala-sys-color-surface-raised` — cards or panels that sit above the page
|
|
35
|
-
- `--tala-sys-color-surface-overlay` — modals, drawers, and popovers
|
|
36
|
-
- `--tala-sys-color-surface-inverse` — dark/inverted sections
|
|
37
|
-
|
|
38
|
-
Outline:
|
|
39
|
-
- `--tala-sys-color-outline-default` — subtle dividers and input borders at rest
|
|
40
|
-
- `--tala-sys-color-outline-strong` — more prominent borders needing higher contrast
|
|
41
|
-
- `--tala-sys-color-outline-focus` — keyboard focus ring on interactive elements
|
|
42
|
-
|
|
43
|
-
Text:
|
|
44
|
-
- `--tala-sys-color-text-primary` — main body copy and headings
|
|
45
|
-
- `--tala-sys-color-text-secondary` — supporting labels, captions, and metadata
|
|
46
|
-
- `--tala-sys-color-text-tertiary` — de-emphasized hints or supplemental info
|
|
47
|
-
- `--tala-sys-color-text-disabled` — non-interactive / unavailable text
|
|
48
|
-
- `--tala-sys-color-text-inverse` — text on dark or inverse surfaces
|
|
49
|
-
- `--tala-sys-color-text-placeholder` — input placeholder copy
|
|
50
|
-
- `--tala-sys-color-text-link` — interactive inline links
|
|
51
|
-
|
|
52
|
-
Brand:
|
|
53
|
-
- `--tala-sys-color-brand` — primary CTA and key accent color
|
|
54
|
-
- `--tala-sys-color-on-brand` — content placed on top of a brand-colored surface
|
|
55
|
-
- `--tala-sys-color-brand-hover` — brand color on pointer hover
|
|
56
|
-
- `--tala-sys-color-brand-subtle` — light tinted surface for brand-adjacent areas
|
|
57
|
-
|
|
58
|
-
Error (destructive interactive):
|
|
59
|
-
- `--tala-sys-color-error` — destructive buttons, icons, and controls
|
|
60
|
-
- `--tala-sys-color-on-error` — content placed on top of an error-colored surface
|
|
61
|
-
- `--tala-sys-color-error-hover` — error color on pointer hover
|
|
62
|
-
|
|
63
|
-
Feedback (read-only status):
|
|
64
|
-
- `--tala-sys-color-success-surface`, `--tala-sys-color-success-text`, `--tala-sys-color-success-outline`
|
|
65
|
-
- `--tala-sys-color-warning-surface`, `--tala-sys-color-warning-text`, `--tala-sys-color-warning-outline`
|
|
66
|
-
- `--tala-sys-color-error-surface`, `--tala-sys-color-error-text`, `--tala-sys-color-error-outline`
|
|
67
|
-
- `--tala-sys-color-info-surface`, `--tala-sys-color-info-text`, `--tala-sys-color-info-outline`
|
|
68
|
-
|
|
69
|
-
### Spacing
|
|
70
|
-
|
|
71
|
-
- `--space-1: 4px`
|
|
72
|
-
- `--space-2: 8px`
|
|
73
|
-
- `--space-3: 12px`
|
|
74
|
-
- `--space-4: 16px`
|
|
75
|
-
- `--space-5: 20px`
|
|
76
|
-
- `--space-6: 24px`
|
|
77
|
-
- `--space-8: 32px`
|
|
78
|
-
- `--space-10: 40px`
|
|
79
|
-
- `--space-12: 48px`
|
|
80
|
-
- `--space-16: 64px`
|
|
81
|
-
|
|
82
|
-
### Typography
|
|
83
|
-
|
|
84
|
-
Font families:
|
|
85
|
-
- `--font-family-din` — DIN Next LT Pro (headings)
|
|
86
|
-
- `--font-family-inter` — Inter (body)
|
|
87
|
-
- `--font-family-jetbrains` — JetBrains Mono (code)
|
|
88
|
-
|
|
89
|
-
Font weights:
|
|
90
|
-
- `--font-weight-regular: 400`
|
|
91
|
-
- `--font-weight-medium: 500`
|
|
92
|
-
- `--font-weight-semibold: 600`
|
|
93
|
-
- `--font-weight-bold: 700`
|
|
94
|
-
|
|
95
|
-
Font sizes: `--font-size-11` through `--font-size-40` (px values)
|
|
96
|
-
|
|
97
|
-
### Border Radius
|
|
98
|
-
|
|
99
|
-
- `--radius-none: 0px`
|
|
100
|
-
- `--radius-xs: 2px`
|
|
101
|
-
- `--radius-sm: 4px`
|
|
102
|
-
- `--radius-md: 6px`
|
|
103
|
-
- `--radius-lg: 8px`
|
|
104
|
-
- `--radius-xl: 12px`
|
|
105
|
-
- `--radius-2xl: 16px`
|
|
106
|
-
- `--radius-full: 9999px`
|
|
107
|
-
|
|
108
|
-
### Shadows
|
|
109
|
-
|
|
110
|
-
- `--shadow-xs` — subtle, for tight UI elements
|
|
111
|
-
- `--shadow-sm` — small elevation
|
|
112
|
-
- `--shadow-md` — medium elevation (cards)
|
|
113
|
-
- `--shadow-lg` — large elevation (dropdowns)
|
|
114
|
-
- `--shadow-xl` — extra large (modals, dialogs)
|
|
115
|
-
|
|
116
|
-
---
|
|
117
|
-
|
|
118
|
-
## Components
|
|
119
|
-
|
|
120
|
-
### TalaButton
|
|
121
|
-
|
|
122
|
-
Selector: `tala-button`
|
|
123
|
-
Import: `import { TalaButton } from '@doku-com/tala'`
|
|
124
|
-
|
|
125
|
-
Inputs:
|
|
126
|
-
- `variant: ButtonVariant` — default: `'primary'`
|
|
127
|
-
- `size: ButtonSize` — default: `'md'`
|
|
128
|
-
- `disabled: boolean` — default: `false`
|
|
129
|
-
- `loading: boolean` — default: `false`
|
|
130
|
-
- `iconOnly: boolean` — default: `false`
|
|
131
|
-
|
|
132
|
-
Types:
|
|
133
|
-
- `ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'accent' | 'danger' | 'link'`
|
|
134
|
-
- `ButtonSize = 'xs' | 'sm' | 'md' | 'lg'`
|
|
135
|
-
|
|
136
|
-
Size heights: xs=24px, sm=32px, md=40px, lg=48px
|
|
137
|
-
|
|
138
|
-
Notes:
|
|
139
|
-
- Content is projected via `<ng-content>`
|
|
140
|
-
- Keyboard accessible: Enter and Space trigger click
|
|
141
|
-
- Click events are suppressed when `disabled` or `loading` is true
|
|
142
|
-
|
|
143
|
-
Example:
|
|
144
|
-
|
|
145
|
-
```html
|
|
146
|
-
<tala-button>Submit</tala-button>
|
|
147
|
-
<tala-button variant="secondary" size="sm">Cancel</tala-button>
|
|
148
|
-
<tala-button variant="danger" [disabled]="true">Delete</tala-button>
|
|
149
|
-
<tala-button [loading]="isSaving">Save</tala-button>
|
|
150
|
-
<tala-button [iconOnly]="true"><svg><!-- icon --></svg></tala-button>
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
```typescript
|
|
154
|
-
import { TalaButton } from '@doku-com/tala';
|
|
155
|
-
|
|
156
|
-
@Component({
|
|
157
|
-
imports: [TalaButton],
|
|
158
|
-
template: `<tala-button [variant]="v" [loading]="loading">Submit</tala-button>`,
|
|
159
|
-
})
|
|
160
|
-
export class MyComponent {
|
|
161
|
-
v = 'primary';
|
|
162
|
-
loading = false;
|
|
163
|
-
}
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
---
|
|
167
|
-
|
|
168
|
-
### TalaAvatar
|
|
169
|
-
|
|
170
|
-
Selector: `tala-avatar`
|
|
171
|
-
Import: `import { TalaAvatar } from '@doku-com/tala'`
|
|
172
|
-
|
|
173
|
-
Inputs:
|
|
174
|
-
- `name: string` — default: `''` — used for initials and background color
|
|
175
|
-
- `src: string` — default: `''` — image URL; when set, shows image instead of initials
|
|
176
|
-
- `size: AvatarSize` — default: `'md'`
|
|
177
|
-
- `shape: AvatarShape` — default: `'circle'`
|
|
178
|
-
- `status: AvatarStatus` — default: `'none'`
|
|
179
|
-
- `badgeCount: number` — default: `0` — shows `99+` when value exceeds 99
|
|
180
|
-
|
|
181
|
-
Types:
|
|
182
|
-
- `AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl'`
|
|
183
|
-
- `AvatarShape = 'circle' | 'square'`
|
|
184
|
-
- `AvatarStatus = 'none' | 'online' | 'busy' | 'away' | 'offline'`
|
|
185
|
-
|
|
186
|
-
Size dimensions: xs=24px, sm=32px, md=40px, lg=48px, xl=64px
|
|
187
|
-
|
|
188
|
-
Notes:
|
|
189
|
-
- Background color is auto-derived from the `name` value via hashing
|
|
190
|
-
- `aria-label` is auto-generated from name, status, and badgeCount
|
|
191
|
-
- Role is set to `img`
|
|
192
|
-
|
|
193
|
-
Example:
|
|
194
|
-
|
|
195
|
-
```html
|
|
196
|
-
<tala-avatar name="John Doe" />
|
|
197
|
-
<tala-avatar name="Jane Smith" src="https://example.com/jane.jpg" />
|
|
198
|
-
<tala-avatar name="Alice" size="lg" shape="square" status="online" />
|
|
199
|
-
<tala-avatar name="Bob" [badgeCount]="5" />
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
---
|
|
203
|
-
|
|
204
|
-
### TalaAvatarGroup
|
|
205
|
-
|
|
206
|
-
Selector: `tala-avatar-group`
|
|
207
|
-
Import: `import { TalaAvatarGroup } from '@doku-com/tala'`
|
|
208
|
-
|
|
209
|
-
Inputs:
|
|
210
|
-
- `size: AvatarSize` — default: `'md'`
|
|
211
|
-
|
|
212
|
-
Notes:
|
|
213
|
-
- Wraps multiple `TalaAvatar` components for a stacked/grouped layout
|
|
214
|
-
- Set matching `size` on both the group and each child avatar
|
|
215
|
-
- Role is set to `group`
|
|
216
|
-
|
|
217
|
-
Example:
|
|
218
|
-
|
|
219
|
-
```html
|
|
220
|
-
<tala-avatar-group size="md">
|
|
221
|
-
<tala-avatar name="Alice Smith" size="md" />
|
|
222
|
-
<tala-avatar name="Bob Jones" size="md" />
|
|
223
|
-
<tala-avatar name="Carol Lee" size="md" />
|
|
224
|
-
</tala-avatar-group>
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
```typescript
|
|
228
|
-
import { TalaAvatar, TalaAvatarGroup } from '@doku-com/tala';
|
|
229
|
-
|
|
230
|
-
@Component({
|
|
231
|
-
imports: [TalaAvatar, TalaAvatarGroup],
|
|
232
|
-
template: `
|
|
233
|
-
<tala-avatar-group [size]="size">
|
|
234
|
-
@for (user of users; track user.id) {
|
|
235
|
-
<tala-avatar [name]="user.name" [src]="user.avatar" [size]="size" />
|
|
236
|
-
}
|
|
237
|
-
</tala-avatar-group>
|
|
238
|
-
`,
|
|
239
|
-
})
|
|
240
|
-
export class MyComponent {
|
|
241
|
-
size = 'md' as const;
|
|
242
|
-
users = [{ id: 1, name: 'Alice', avatar: '' }];
|
|
243
|
-
}
|
|
244
|
-
```
|