@doku-com/tala 1.0.0-alpha.6 → 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/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
- ```