@africanies/angular-web-sdk 0.1.5 → 0.1.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/.nx/cache/{13524438527920092277 → 13466509747676776487}/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs +140 -52
- package/.nx/cache/13466509747676776487/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs.map +1 -0
- package/.nx/cache/{13524438527920092277 → 13466509747676776487}/dist/libs/africanies-core/package.json +3 -3
- package/.nx/cache/{13524438527920092277 → 13466509747676776487}/dist/libs/africanies-core/types/africanies-africanies-core.d.ts +14 -11
- package/.nx/cache/{18132311043100376919 → 14995846848874973576}/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs +539 -232
- package/.nx/cache/14995846848874973576/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +1 -0
- package/.nx/cache/{18132311043100376919 → 14995846848874973576}/dist/libs/africanies-ui/package.json +5 -5
- package/.nx/cache/{5741611231803799383 → 14995846848874973576}/dist/libs/africanies-ui/types/africanies-africanies-ui.d.ts +111 -28
- package/.nx/cache/{1275815545780424169 → 6673686859704879504}/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs +16 -0
- package/.nx/cache/6673686859704879504/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs.map +1 -0
- package/.nx/cache/{14153928176747262656 → 6673686859704879504}/dist/libs/africanies-theme/package.json +3 -3
- package/.nx/cache/{1275815545780424169 → 6673686859704879504}/dist/libs/africanies-theme/tailwind-preset.cjs +31 -14
- package/.nx/cache/{14153928176747262656 → 6673686859704879504}/dist/libs/africanies-theme/types/africanies-africanies-theme.d.ts +18 -1
- package/.nx/cache/run.json +18 -18
- package/.nx/cache/terminalOutputs/{4011892767661954819 → 13466509747676776487} +1 -1
- package/.nx/cache/terminalOutputs/1446890025183346611 +32 -0
- package/.nx/cache/terminalOutputs/{3064561615116090625 → 14995846848874973576} +7 -7
- package/.nx/cache/terminalOutputs/6337357866566791975 +6 -0
- package/.nx/cache/terminalOutputs/{1275815545780424169 → 6673686859704879504} +1 -1
- package/.nx/cache/terminalOutputs/{12148417737220755248 → 8032148447904822353} +182 -174
- package/.nx/workspace-data/0091ABA9-5C90-580D-953C-8C94E763ADB5-v3.db +0 -0
- package/.nx/workspace-data/0091ABA9-5C90-580D-953C-8C94E763ADB5-v3.db-shm +0 -0
- package/.nx/workspace-data/0091ABA9-5C90-580D-953C-8C94E763ADB5-v3.db-wal +0 -0
- package/.nx/workspace-data/d/daemon.log +2461 -0
- package/.nx/workspace-data/d/server-process.json +2 -2
- package/.nx/workspace-data/file-map.json +2747 -2747
- package/.nx/workspace-data/nx_files.nxt +0 -0
- package/.nx/workspace-data/project-graph.json +2 -2
- package/apps/playground/src/app/pages/button-page.ts +5 -3
- package/apps/playground/src/app/pages/feedback-page.ts +1 -1
- package/apps/playground/src/app/pages/home-page.ts +1 -1
- package/apps/playground/src/app/pages/icons-page.ts +3 -3
- package/apps/playground/src/app/pages/lecture-page.ts +3 -3
- package/apps/playground/src/app/pages/models-page.ts +1 -1
- package/apps/playground/src/app/pages/overlay-demos.ts +1 -1
- package/apps/playground/src/app/pages/tokens-page.ts +17 -3
- package/apps/playground/src/app/pages/usecases/onboarding-login.page.ts +1 -1
- package/apps/playground/src/app/pages/usecases/onboarding-reset-password.page.ts +1 -1
- package/apps/playground/src/app/pages/usecases/shipment-detail.page.ts +1 -1
- package/apps/playground/src/app/pages/viewport-preview.component.ts +1 -1
- package/apps/playground/src/app/snippets/button.snippets.ts +4 -3
- package/apps/playground/src/index.html +6 -0
- package/apps/playground/src/styles.css +4 -5
- package/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs +131 -8
- package/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs.map +1 -1
- package/dist/libs/africanies-core/types/africanies-africanies-core.d.ts +8 -6
- package/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs +12 -2
- package/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs.map +1 -1
- package/dist/libs/africanies-theme/tailwind-preset.cjs +16 -7
- package/dist/libs/africanies-theme/types/africanies-africanies-theme.d.ts +11 -3
- package/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs +83 -63
- package/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +1 -1
- package/dist/libs/africanies-ui/types/africanies-africanies-ui.d.ts +11 -8
- package/libs/africanies-core/src/index.ts +1 -0
- package/libs/africanies-core/src/lib/notification/index.ts +1 -1
- package/libs/africanies-core/src/lib/notification/notification-link.spec.ts +40 -7
- package/libs/africanies-core/src/lib/notification/notification-link.ts +143 -7
- package/libs/africanies-theme/src/lib/mode-color.safelist.ts +8 -2
- package/libs/africanies-theme/src/lib/mode-color.service.ts +16 -0
- package/libs/africanies-theme/tailwind-preset.cjs +16 -7
- package/libs/africanies-ui/src/lib/button/button.component.ts +5 -1
- package/libs/africanies-ui/src/lib/feedback/empty-state.component.ts +1 -1
- package/libs/africanies-ui/src/lib/feedback/error-state.component.ts +1 -1
- package/libs/africanies-ui/src/lib/forms/file-upload/file-preview.dialog.ts +1 -1
- package/libs/africanies-ui/src/lib/forms/file-upload/file-upload.component.ts +4 -4
- package/libs/africanies-ui/src/lib/forms/form-field.classes.ts +2 -2
- package/libs/africanies-ui/src/lib/forms/select/select.component.ts +1 -1
- package/libs/africanies-ui/src/lib/layout/app-shell-header.component.ts +1 -1
- package/libs/africanies-ui/src/lib/layout/app-shell.component.ts +2 -2
- package/libs/africanies-ui/src/lib/navigation/shipping-mode-switch/shipping-mode-switch.component.ts +2 -2
- package/libs/africanies-ui/src/lib/navigation/side-nav/africanies-side-nav.component.html +2 -2
- package/libs/africanies-ui/src/lib/navigation/side-nav/africanies-side-nav.component.ts +10 -6
- package/libs/africanies-ui/src/lib/notifications/notification-drawer.panel.ts +21 -8
- package/libs/africanies-ui/src/lib/overlay/drawer.service.ts +1 -1
- package/libs/africanies-ui/src/lib/overlay/modal.service.ts +1 -1
- package/libs/africanies-ui/src/lib/pagination/pagination.component.ts +3 -3
- package/libs/africanies-ui/src/lib/table/table.component.ts +5 -5
- package/libs/africanies-ui/src/lib/toast/toast-host.component.ts +4 -4
- package/libs/africanies-ui/src/lib/toast/toast-item.component.ts +1 -1
- package/package.json +1 -1
- package/.nx/cache/1275815545780424169/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs.map +0 -1
- package/.nx/cache/1275815545780424169/dist/libs/africanies-theme/package.json +0 -36
- package/.nx/cache/1275815545780424169/dist/libs/africanies-theme/types/africanies-africanies-theme.d.ts +0 -157
- package/.nx/cache/13524438527920092277/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs.map +0 -1
- package/.nx/cache/14153928176747262656/dist/libs/africanies-theme/README.md +0 -46
- package/.nx/cache/14153928176747262656/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs +0 -215
- package/.nx/cache/14153928176747262656/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs.map +0 -1
- package/.nx/cache/14153928176747262656/dist/libs/africanies-theme/tailwind-preset.cjs +0 -245
- package/.nx/cache/18132311043100376919/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +0 -1
- package/.nx/cache/18132311043100376919/dist/libs/africanies-ui/types/africanies-africanies-ui.d.ts +0 -5410
- package/.nx/cache/2782605790118376385/dist/libs/africanies-icons/README.md +0 -69
- package/.nx/cache/2782605790118376385/dist/libs/africanies-icons/assets/icons.sprite.svg +0 -1844
- package/.nx/cache/2782605790118376385/dist/libs/africanies-icons/fesm2022/africanies-africanies-icons.mjs +0 -832
- package/.nx/cache/2782605790118376385/dist/libs/africanies-icons/fesm2022/africanies-africanies-icons.mjs.map +0 -1
- package/.nx/cache/2782605790118376385/dist/libs/africanies-icons/package.json +0 -31
- package/.nx/cache/2782605790118376385/dist/libs/africanies-icons/types/africanies-africanies-icons.d.ts +0 -108
- package/.nx/cache/3064561615116090625/dist/libs/africanies-storage/README.md +0 -31
- package/.nx/cache/3064561615116090625/dist/libs/africanies-storage/fesm2022/africanies-africanies-storage.mjs +0 -243
- package/.nx/cache/3064561615116090625/dist/libs/africanies-storage/fesm2022/africanies-africanies-storage.mjs.map +0 -1
- package/.nx/cache/3064561615116090625/dist/libs/africanies-storage/package.json +0 -27
- package/.nx/cache/3064561615116090625/dist/libs/africanies-storage/types/africanies-africanies-storage.d.ts +0 -210
- package/.nx/cache/4011892767661954819/dist/libs/africanies-core/README.md +0 -85
- package/.nx/cache/4011892767661954819/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs +0 -4546
- package/.nx/cache/4011892767661954819/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs.map +0 -1
- package/.nx/cache/4011892767661954819/dist/libs/africanies-core/package.json +0 -32
- package/.nx/cache/4011892767661954819/dist/libs/africanies-core/types/africanies-africanies-core.d.ts +0 -2740
- package/.nx/cache/5741611231803799383/dist/libs/africanies-ui/README.md +0 -68
- package/.nx/cache/5741611231803799383/dist/libs/africanies-ui/assets/brand/africanies-logo-mini.png +0 -0
- package/.nx/cache/5741611231803799383/dist/libs/africanies-ui/assets/brand/africanies-logo.png +0 -0
- package/.nx/cache/5741611231803799383/dist/libs/africanies-ui/assets/brand/africanies-logo.svg +0 -5
- package/.nx/cache/5741611231803799383/dist/libs/africanies-ui/assets/carriers/dhl.svg +0 -7
- package/.nx/cache/5741611231803799383/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs +0 -19088
- package/.nx/cache/5741611231803799383/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +0 -1
- package/.nx/cache/5741611231803799383/dist/libs/africanies-ui/package.json +0 -36
- package/.nx/cache/6372470950255467653/dist/libs/africanies-models/README.md +0 -60
- package/.nx/cache/6372470950255467653/dist/libs/africanies-models/fesm2022/africanies-africanies-models.mjs +0 -599
- package/.nx/cache/6372470950255467653/dist/libs/africanies-models/fesm2022/africanies-africanies-models.mjs.map +0 -1
- package/.nx/cache/6372470950255467653/dist/libs/africanies-models/package.json +0 -24
- package/.nx/cache/6372470950255467653/dist/libs/africanies-models/types/africanies-africanies-models.d.ts +0 -1452
- package/.nx/cache/terminalOutputs/11768036696192889608 +0 -8
- package/.nx/cache/terminalOutputs/1227201614544602906 +0 -23
- package/.nx/cache/terminalOutputs/12538607787148205787 +0 -19
- package/.nx/cache/terminalOutputs/13524438527920092277 +0 -196
- package/.nx/cache/terminalOutputs/14153928176747262656 +0 -45
- package/.nx/cache/terminalOutputs/17404566492103808557 +0 -8
- package/.nx/cache/terminalOutputs/18132311043100376919 +0 -315
- package/.nx/cache/terminalOutputs/2436781291243085315 +0 -8
- package/.nx/cache/terminalOutputs/2782605790118376385 +0 -21
- package/.nx/cache/terminalOutputs/3681975492957101833 +0 -8
- package/.nx/cache/terminalOutputs/5741611231803799383 +0 -21
- package/.nx/cache/terminalOutputs/6037166070823946880 +0 -8
- package/.nx/cache/terminalOutputs/6372470950255467653 +0 -21
- package/.nx/cache/terminalOutputs/665190206482526466 +0 -175
- package/.nx/cache/terminalOutputs/7756595539965457927 +0 -23
- package/.nx/cache/terminalOutputs/9200013119269230075 +0 -8
- /package/.nx/cache/{13524438527920092277 → 13466509747676776487}/dist/libs/africanies-core/README.md +0 -0
- /package/.nx/cache/{18132311043100376919 → 14995846848874973576}/dist/libs/africanies-ui/README.md +0 -0
- /package/.nx/cache/{18132311043100376919 → 14995846848874973576}/dist/libs/africanies-ui/assets/brand/africanies-logo-mini.png +0 -0
- /package/.nx/cache/{18132311043100376919 → 14995846848874973576}/dist/libs/africanies-ui/assets/brand/africanies-logo.png +0 -0
- /package/.nx/cache/{18132311043100376919 → 14995846848874973576}/dist/libs/africanies-ui/assets/brand/africanies-logo.svg +0 -0
- /package/.nx/cache/{18132311043100376919 → 14995846848874973576}/dist/libs/africanies-ui/assets/carriers/dhl.svg +0 -0
- /package/.nx/cache/{1275815545780424169 → 6673686859704879504}/dist/libs/africanies-theme/README.md +0 -0
package/.nx/cache/{18132311043100376919 → 14995846848874973576}/dist/libs/africanies-ui/package.json
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@africanies/africanies-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^22.0.0",
|
|
6
6
|
"@angular/core": "^22.0.0",
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
"@angular/forms": "^22.0.0",
|
|
9
9
|
"@angular/router": "^22.0.0",
|
|
10
10
|
"rxjs": "^7.8.0",
|
|
11
|
-
"@africanies/africanies-models": "
|
|
12
|
-
"@africanies/africanies-icons": "
|
|
13
|
-
"@africanies/africanies-core": "
|
|
14
|
-
"@africanies/africanies-theme": "
|
|
11
|
+
"@africanies/africanies-models": ">=0.0.2 <0.1.0",
|
|
12
|
+
"@africanies/africanies-icons": ">=0.0.1 <0.1.0",
|
|
13
|
+
"@africanies/africanies-core": ">=0.0.2 <0.1.0",
|
|
14
|
+
"@africanies/africanies-theme": ">=0.0.1 <0.1.0"
|
|
15
15
|
},
|
|
16
16
|
"sideEffects": false,
|
|
17
17
|
"publishConfig": {
|
|
@@ -17,13 +17,14 @@ import { IsActiveMatchOptions, ActivatedRouteSnapshot, Router, UrlTree } from '@
|
|
|
17
17
|
* Visual emphasis for {@link ButtonComponent}.
|
|
18
18
|
*
|
|
19
19
|
* - `primary` — filled mode accent (SFN green / STN orange) for the main action
|
|
20
|
-
* - `secondary` —
|
|
20
|
+
* - `secondary` — stroked mode accent (white + mode border/text; portal `.btn-stroked`)
|
|
21
|
+
* - `flat` — neutral chrome (white + ink + soft border; portal `.btn-flat`)
|
|
21
22
|
* - `ghost` — neutral text-only for low-emphasis actions (Cancel, tertiary)
|
|
22
23
|
* - `ghost-primary` — text-only mode accent (SFN green / STN orange)
|
|
23
24
|
* - `ghost-danger` — text-only destructive actions (Clear, Remove)
|
|
24
25
|
* - `danger` — destructive confirmations and deletes
|
|
25
26
|
*/
|
|
26
|
-
type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'ghost-primary' | 'ghost-danger' | 'underline' | 'danger';
|
|
27
|
+
type ButtonVariant = 'primary' | 'secondary' | 'flat' | 'ghost' | 'ghost-primary' | 'ghost-danger' | 'underline' | 'danger';
|
|
27
28
|
/**
|
|
28
29
|
* Control size for {@link ButtonComponent}.
|
|
29
30
|
*/
|
|
@@ -163,14 +164,31 @@ declare class CopyButtonComponent {
|
|
|
163
164
|
|
|
164
165
|
/**
|
|
165
166
|
* Option row for {@link ActionMenuComponent}.
|
|
167
|
+
*
|
|
168
|
+
* Set optional {@link routerLink} (and `queryParams` / `fragment`) so the row
|
|
169
|
+
* renders as an `<a href>` — right-click / ⌘-click can open in a new tab.
|
|
170
|
+
* Primary click still runs {@link onClick} when provided; otherwise the menu
|
|
171
|
+
* navigates via the router (same pattern as tabs / segment).
|
|
166
172
|
*/
|
|
167
173
|
interface AfricaniesMenuItem {
|
|
168
174
|
/** Visible label. */
|
|
169
175
|
label: string;
|
|
170
|
-
/**
|
|
171
|
-
|
|
176
|
+
/**
|
|
177
|
+
* Invoked on primary activation (then the menu closes).
|
|
178
|
+
* Optional when {@link routerLink} is set — the menu navigates instead.
|
|
179
|
+
*/
|
|
180
|
+
onClick?: () => void;
|
|
172
181
|
/** Optional leading icon from `@africanies/africanies-icons`. */
|
|
173
182
|
icon?: IconName;
|
|
183
|
+
/**
|
|
184
|
+
* Optional Angular router link (`string` or commands array).
|
|
185
|
+
* When set, the row is an `<a>` with a real `href` for open-in-new-tab.
|
|
186
|
+
*/
|
|
187
|
+
routerLink?: string | readonly unknown[];
|
|
188
|
+
/** Optional query params passed with {@link routerLink}. */
|
|
189
|
+
queryParams?: Record<string, unknown>;
|
|
190
|
+
/** Optional URL fragment with {@link routerLink}. */
|
|
191
|
+
fragment?: string;
|
|
174
192
|
/** When true, the item cannot be activated. */
|
|
175
193
|
disabled?: boolean;
|
|
176
194
|
/** Destructive styling (e.g. Delete). */
|
|
@@ -186,6 +204,9 @@ interface AfricaniesMenuItem {
|
|
|
186
204
|
* clipped by table `overflow`. Default trigger is a ghost ellipsis button;
|
|
187
205
|
* project a custom control with {@link ActionMenuTriggerDirective}.
|
|
188
206
|
*
|
|
207
|
+
* Items with {@link AfricaniesMenuItem.routerLink} render as anchors so users
|
|
208
|
+
* can right-click / modified-click to open in a new tab.
|
|
209
|
+
*
|
|
189
210
|
* @example
|
|
190
211
|
* ```html
|
|
191
212
|
* <!-- Default icon trigger (table row) -->
|
|
@@ -201,7 +222,12 @@ interface AfricaniesMenuItem {
|
|
|
201
222
|
* ```ts
|
|
202
223
|
* rowActions(row: Shipment): AfricaniesMenuItem[] {
|
|
203
224
|
* return [
|
|
204
|
-
* {
|
|
225
|
+
* {
|
|
226
|
+
* label: 'Open',
|
|
227
|
+
* icon: 'eye',
|
|
228
|
+
* routerLink: ['/shipments', row.id],
|
|
229
|
+
* onClick: () => this.open(row),
|
|
230
|
+
* },
|
|
205
231
|
* { label: 'Edit', icon: 'edit', onClick: () => this.edit(row) },
|
|
206
232
|
* {
|
|
207
233
|
* label: 'Delete',
|
|
@@ -215,6 +241,7 @@ interface AfricaniesMenuItem {
|
|
|
215
241
|
* ```
|
|
216
242
|
*/
|
|
217
243
|
declare class ActionMenuComponent {
|
|
244
|
+
private readonly router;
|
|
218
245
|
protected readonly panelPositions: ConnectedPosition[];
|
|
219
246
|
private readonly panelRef;
|
|
220
247
|
private readonly projectedTrigger;
|
|
@@ -230,12 +257,19 @@ declare class ActionMenuComponent {
|
|
|
230
257
|
protected readonly hasCustomTrigger: _angular_core.Signal<boolean>;
|
|
231
258
|
protected itemDomId(index: number): string;
|
|
232
259
|
protected itemClass(item: AfricaniesMenuItem, index: number): string;
|
|
260
|
+
protected hrefFor(item: AfricaniesMenuItem): string | null;
|
|
233
261
|
protected onTriggerClick(event: MouseEvent): void;
|
|
234
262
|
protected onTriggerKeydown(event: KeyboardEvent): void;
|
|
235
263
|
protected onPanelKeydown(event: KeyboardEvent): void;
|
|
236
264
|
protected onOutsideClick(event: MouseEvent): void;
|
|
237
265
|
protected onOverlayDetach(): void;
|
|
266
|
+
/**
|
|
267
|
+
* Primary click on a routed item: in-app activate via {@link onClick} or
|
|
268
|
+
* router. Modified clicks keep native link behaviour (new tab).
|
|
269
|
+
*/
|
|
270
|
+
protected onRoutedItemClick(event: MouseEvent, item: AfricaniesMenuItem): void;
|
|
238
271
|
protected selectItem(item: AfricaniesMenuItem): void;
|
|
272
|
+
private activateItem;
|
|
239
273
|
protected toggle(): void;
|
|
240
274
|
protected openMenu(): void;
|
|
241
275
|
protected close(): void;
|
|
@@ -522,6 +556,46 @@ declare class LoadingStateComponent {
|
|
|
522
556
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<LoadingStateComponent, "africanies-loading-state", never, { "message": { "alias": "message"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
523
557
|
}
|
|
524
558
|
|
|
559
|
+
/**
|
|
560
|
+
* Visual density for {@link AccordionComponent}.
|
|
561
|
+
*
|
|
562
|
+
* - `md` — page sections (pay review, top-level cards)
|
|
563
|
+
* - `sm` — nested panels (e.g. export boxes inside a manifest box)
|
|
564
|
+
*/
|
|
565
|
+
type AccordionSize = 'md' | 'sm';
|
|
566
|
+
/**
|
|
567
|
+
* Bordered expandable panel with animated fold — the pattern used on
|
|
568
|
+
* Manifest detail and Make Payment review.
|
|
569
|
+
*
|
|
570
|
+
* Parent owns open state via {@link open} (`model()` / `[(open)]`).
|
|
571
|
+
*
|
|
572
|
+
* @example
|
|
573
|
+
* ```html
|
|
574
|
+
* <africanies-accordion
|
|
575
|
+
* title="Customer Information"
|
|
576
|
+
* [open]="isOpen('customer')"
|
|
577
|
+
* (openChange)="onOpenChange('customer', $event)"
|
|
578
|
+
* >
|
|
579
|
+
* <dl>…</dl>
|
|
580
|
+
* </africanies-accordion>
|
|
581
|
+
* ```
|
|
582
|
+
*/
|
|
583
|
+
declare class AccordionComponent {
|
|
584
|
+
/** Plain-text header. Prefer projected `[africaniesAccordionTitle]` for rich titles. */
|
|
585
|
+
readonly title: _angular_core.InputSignal<string>;
|
|
586
|
+
/** Whether the panel body is expanded. */
|
|
587
|
+
readonly open: _angular_core.ModelSignal<boolean>;
|
|
588
|
+
/** Padding / chevron density. */
|
|
589
|
+
readonly size: _angular_core.InputSignal<AccordionSize>;
|
|
590
|
+
protected readonly chevronSize: _angular_core.Signal<14 | 16>;
|
|
591
|
+
protected readonly shellClass: _angular_core.Signal<"rounded-lg border border-border dark:border-white/10" | "rounded-xl border border-border dark:border-white/10">;
|
|
592
|
+
protected readonly triggerClass: _angular_core.Signal<"flex w-full items-center justify-between gap-3 px-3 py-2 text-left text-ink dark:text-white" | "flex w-full items-center justify-between gap-3 px-4 py-3 text-left text-ink dark:text-white">;
|
|
593
|
+
protected readonly bodyClass: _angular_core.Signal<"border-t border-border px-3 py-2 dark:border-white/10" | "border-t border-border px-4 py-3 dark:border-white/10">;
|
|
594
|
+
protected toggle(): void;
|
|
595
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionComponent, never>;
|
|
596
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AccordionComponent, "africanies-accordion", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "open": { "alias": "open"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "open": "openChange"; }, never, ["[africaniesAccordionTitle]", "*"], true, never>;
|
|
597
|
+
}
|
|
598
|
+
|
|
525
599
|
/**
|
|
526
600
|
* Visual tone for {@link AlertComponent}.
|
|
527
601
|
*
|
|
@@ -3517,9 +3591,10 @@ interface AfricaniesSideNavItem {
|
|
|
3517
3591
|
/**
|
|
3518
3592
|
* App shell side navigation with icons, nested items, and a collapsible rail.
|
|
3519
3593
|
*
|
|
3520
|
-
* **Design - ink spine:** a continuous mode-accent edge
|
|
3521
|
-
*
|
|
3522
|
-
*
|
|
3594
|
+
* **Design - ink spine:** a continuous mode-accent edge; active leaves use
|
|
3595
|
+
* primary fill + white text (portal parity); expanded parents of an active
|
|
3596
|
+
* child use primary text on white. Collapsed mode keeps icons; hover opens a
|
|
3597
|
+
* floating label blade (name + children) instead of a plain tooltip.
|
|
3523
3598
|
*
|
|
3524
3599
|
* ## Parent items with children
|
|
3525
3600
|
* **Expanded rail:** branches start open by default (`expandBranchesByDefault`).
|
|
@@ -3850,7 +3925,7 @@ declare class ShippingModeSwitchComponent {
|
|
|
3850
3925
|
/** Active mode from {@link ShippingModeService}. */
|
|
3851
3926
|
protected readonly mode: _angular_core.Signal<ShippingMode>;
|
|
3852
3927
|
/** Host padding / divider — tighter when the rail is collapsed. */
|
|
3853
|
-
protected readonly hostClass: _angular_core.Signal<"block shrink-0 border-t border-
|
|
3928
|
+
protected readonly hostClass: _angular_core.Signal<"block shrink-0 border-t border-strong px-1.5 py-3 dark:border-white/10" | "block shrink-0 border-t border-strong px-2 py-3 dark:border-white/10">;
|
|
3854
3929
|
/**
|
|
3855
3930
|
* Requests a mode change through {@link ShippingModeService.requestModeChange}
|
|
3856
3931
|
* so feature guards (e.g. Create Shipment confirm) can run first.
|
|
@@ -4049,6 +4124,7 @@ declare class NotificationDrawerPanel {
|
|
|
4049
4124
|
private observer;
|
|
4050
4125
|
protected readonly viewLinkClass: _angular_core.Signal<"inline-flex cursor-pointer items-center gap-1 self-start text-caption font-semibold underline underline-offset-[3px] transition-colors text-import decoration-import/35 hover:decoration-import dark:text-import-light dark:decoration-import-light/40 dark:hover:decoration-import-light" | "inline-flex cursor-pointer items-center gap-1 self-start text-caption font-semibold underline underline-offset-[3px] transition-colors text-export decoration-export/35 hover:decoration-export dark:text-export-light dark:decoration-export-light/40 dark:hover:decoration-export-light">;
|
|
4051
4126
|
protected readonly title: _angular_core.Signal<string>;
|
|
4127
|
+
private readonly seededItems;
|
|
4052
4128
|
protected readonly items: _angular_core.WritableSignal<AfricaniesNotification[]>;
|
|
4053
4129
|
protected readonly markingId: _angular_core.WritableSignal<string | null>;
|
|
4054
4130
|
protected readonly markingAll: _angular_core.WritableSignal<boolean>;
|
|
@@ -4218,7 +4294,7 @@ declare class AppShellComponent {
|
|
|
4218
4294
|
protected readonly showContentChrome: _angular_core.Signal<boolean>;
|
|
4219
4295
|
/** Full height in preview embeds so absolute drawers stay inside the frame. */
|
|
4220
4296
|
protected readonly hostClass: _angular_core.Signal<"block h-full" | "block min-h-full">;
|
|
4221
|
-
protected readonly shellRootClass: _angular_core.Signal<"relative flex h-full min-h-0" | "relative flex min-h-full">;
|
|
4297
|
+
protected readonly shellRootClass: _angular_core.Signal<"relative flex h-full min-h-0 bg-background-chrome dark:bg-ink-950" | "relative flex min-h-full bg-background-chrome dark:bg-ink-950">;
|
|
4222
4298
|
protected readonly headerDensity: _angular_core.Signal<"desktop" | "mobile" | "tablet">;
|
|
4223
4299
|
protected readonly showMobileBar: _angular_core.Signal<boolean>;
|
|
4224
4300
|
protected readonly sidenavHostClass: _angular_core.Signal<"z-50 shrink-0 self-start sticky top-0 block h-full" | "z-50 shrink-0 self-start absolute inset-y-0 left-0 h-full shadow-xl" | "hidden" | "z-50 shrink-0 self-start h-dvh fixed inset-y-0 left-0 shadow-xl lg:sticky lg:top-0 lg:block" | "z-50 shrink-0 self-start h-dvh hidden lg:sticky lg:top-0 lg:block">;
|
|
@@ -4780,9 +4856,11 @@ interface TableSortChange {
|
|
|
4780
4856
|
* **Sticky columns:** a column with `key: 'actions'` stays pinned to the
|
|
4781
4857
|
* right while the grid scrolls horizontally. The expand trigger column pins
|
|
4782
4858
|
* to the left when rows are expandable. Override with
|
|
4783
|
-
* {@link TableColumn.sticky}.
|
|
4859
|
+
* {@link TableColumn.sticky}. Sticky columns use a slightly thicker bottom
|
|
4860
|
+
* border (and opaque fill) so dividers stay visible while scrolling.
|
|
4784
4861
|
*/
|
|
4785
4862
|
declare class TableComponent<T = unknown> {
|
|
4863
|
+
protected readonly modeColor: ModeColorService;
|
|
4786
4864
|
/**
|
|
4787
4865
|
* When false, hides row expansion even if {@link RowDetailDefDirective}
|
|
4788
4866
|
* templates are projected. Defaults to true.
|
|
@@ -4901,7 +4979,7 @@ declare class TableComponent<T = unknown> {
|
|
|
4901
4979
|
protected readonly colSpan: _angular_core.Signal<number>;
|
|
4902
4980
|
protected readonly errorMessage: _angular_core.Signal<string>;
|
|
4903
4981
|
protected readonly staleError: _angular_core.Signal<string | null>;
|
|
4904
|
-
protected readonly bodyKind: _angular_core.Signal<"
|
|
4982
|
+
protected readonly bodyKind: _angular_core.Signal<"error" | "loading" | "empty" | "rows">;
|
|
4905
4983
|
protected readonly paginationLoading: _angular_core.Signal<boolean>;
|
|
4906
4984
|
/** Top-left Refresh — only when rows are on screen (empty/error use in-body Retry). */
|
|
4907
4985
|
protected readonly showToolbarRefresh: _angular_core.Signal<boolean>;
|
|
@@ -4932,6 +5010,17 @@ declare class TableComponent<T = unknown> {
|
|
|
4932
5010
|
protected cellContext(row: T): {
|
|
4933
5011
|
$implicit: T;
|
|
4934
5012
|
};
|
|
5013
|
+
/**
|
|
5014
|
+
* Header row chrome. Soft fill lives on each `th` ({@link headerSoftClass})
|
|
5015
|
+
* so sticky columns do not double-tint and paint over neighbor labels.
|
|
5016
|
+
* @returns Header row class list.
|
|
5017
|
+
*/
|
|
5018
|
+
protected headerRowClass(): string;
|
|
5019
|
+
/**
|
|
5020
|
+
* Opaque mode soft fill for header cells (sticky-safe in dark mode).
|
|
5021
|
+
* @returns Soft solid background utilities.
|
|
5022
|
+
*/
|
|
5023
|
+
protected headerSoftClass(): string;
|
|
4935
5024
|
/**
|
|
4936
5025
|
* Body row classes — row marker for hover styles, plus hide cell borders on
|
|
4937
5026
|
* the last / expanded row.
|
|
@@ -4955,8 +5044,8 @@ declare class TableComponent<T = unknown> {
|
|
|
4955
5044
|
protected expandHeaderClass(): string;
|
|
4956
5045
|
/**
|
|
4957
5046
|
* Body classes for the expand/collapse trigger column (pinned left).
|
|
4958
|
-
*
|
|
4959
|
-
*
|
|
5047
|
+
* Uses a slightly thicker bottom border than scrolling cells so the
|
|
5048
|
+
* sticky fill still reads a clear divider (no top-shadow fallback).
|
|
4960
5049
|
* @param index - Index within {@link rows}.
|
|
4961
5050
|
* @returns Body cell class list.
|
|
4962
5051
|
*/
|
|
@@ -4969,9 +5058,8 @@ declare class TableComponent<T = unknown> {
|
|
|
4969
5058
|
protected headerCellClass(col: TableColumn<T>): string;
|
|
4970
5059
|
/**
|
|
4971
5060
|
* Body cell classes, including sticky pin when set.
|
|
4972
|
-
* Sticky
|
|
4973
|
-
*
|
|
4974
|
-
* same pixel and read brighter (especially in dark mode).
|
|
5061
|
+
* Sticky expand/actions columns use a 1.5px bottom border; scrolling cells
|
|
5062
|
+
* stay at 1px. Expanded rows drop the bottom border (see {@link bodyRowClass}).
|
|
4975
5063
|
* @param col - Column definition.
|
|
4976
5064
|
* @param index - Index within {@link rows}.
|
|
4977
5065
|
* @returns Body cell class list.
|
|
@@ -4981,22 +5069,17 @@ declare class TableComponent<T = unknown> {
|
|
|
4981
5069
|
* Sticky pin utilities for a known edge (expand column or data column).
|
|
4982
5070
|
* @param edge - Left or right pin.
|
|
4983
5071
|
* @param surface - Header vs body fill tokens.
|
|
4984
|
-
* @param index - Body row index; unused for the header.
|
|
4985
|
-
* @param afterExpanded - Previous row is expanded — skip the top shadow
|
|
4986
|
-
* divider so the sticky column stays flush under the detail panel.
|
|
4987
5072
|
* @returns Sticky utilities.
|
|
4988
5073
|
*/
|
|
4989
|
-
protected stickyPinClass(edge: 'left' | 'right', surface: 'head' | 'body'
|
|
5074
|
+
protected stickyPinClass(edge: 'left' | 'right', surface: 'head' | 'body'): string;
|
|
4990
5075
|
/**
|
|
4991
5076
|
* Sticky pin plus an opaque fill matching the table surface, so scrolled
|
|
4992
5077
|
* cells do not show through.
|
|
4993
5078
|
* @param col - Column definition.
|
|
4994
5079
|
* @param surface - Header vs body fill tokens.
|
|
4995
|
-
* @param index - Body row index; unused for the header.
|
|
4996
|
-
* @param afterExpanded - Previous row is expanded — skip the top shadow.
|
|
4997
5080
|
* @returns Sticky utilities, or empty when the column scrolls.
|
|
4998
5081
|
*/
|
|
4999
|
-
protected stickySurfaceClass(col: TableColumn<T>, surface: 'head' | 'body'
|
|
5082
|
+
protected stickySurfaceClass(col: TableColumn<T>, surface: 'head' | 'body'): string;
|
|
5000
5083
|
/**
|
|
5001
5084
|
* Stable id for a row — used for expand/collapse state.
|
|
5002
5085
|
*
|
|
@@ -5286,7 +5369,7 @@ declare class AfricaniesActionsModule {
|
|
|
5286
5369
|
}
|
|
5287
5370
|
|
|
5288
5371
|
/**
|
|
5289
|
-
* Async feedback states, inline alert, and status chips.
|
|
5372
|
+
* Async feedback states, accordion panels, inline alert, and status chips.
|
|
5290
5373
|
*
|
|
5291
5374
|
* Toast stays out of this module — register {@link provideAfricaniesToasts} instead.
|
|
5292
5375
|
*
|
|
@@ -5300,7 +5383,7 @@ declare class AfricaniesActionsModule {
|
|
|
5300
5383
|
*/
|
|
5301
5384
|
declare class AfricaniesFeedbackModule {
|
|
5302
5385
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AfricaniesFeedbackModule, never>;
|
|
5303
|
-
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AfricaniesFeedbackModule, never, [typeof LoadingStateComponent, typeof ErrorStateComponent, typeof ErrorIndicatorComponent, typeof EmptyStateComponent, typeof AsyncStateComponent, typeof AlertComponent, typeof ChipComponent], [typeof LoadingStateComponent, typeof ErrorStateComponent, typeof ErrorIndicatorComponent, typeof EmptyStateComponent, typeof AsyncStateComponent, typeof AlertComponent, typeof ChipComponent]>;
|
|
5386
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AfricaniesFeedbackModule, never, [typeof AccordionComponent, typeof LoadingStateComponent, typeof ErrorStateComponent, typeof ErrorIndicatorComponent, typeof EmptyStateComponent, typeof AsyncStateComponent, typeof AlertComponent, typeof ChipComponent], [typeof AccordionComponent, typeof LoadingStateComponent, typeof ErrorStateComponent, typeof ErrorIndicatorComponent, typeof EmptyStateComponent, typeof AsyncStateComponent, typeof AlertComponent, typeof ChipComponent]>;
|
|
5304
5387
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<AfricaniesFeedbackModule>;
|
|
5305
5388
|
}
|
|
5306
5389
|
|
|
@@ -5406,5 +5489,5 @@ declare class AfricaniesTooltipModule {
|
|
|
5406
5489
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<AfricaniesTooltipModule>;
|
|
5407
5490
|
}
|
|
5408
5491
|
|
|
5409
|
-
export { AFRICANIES_BRAND_LOGO_MINI_URL, AFRICANIES_BRAND_LOGO_URL, ActionMenuComponent, ActionMenuTriggerDirective, AddressInputComponent, AfricaniesActionsModule, AfricaniesFeedbackModule, AfricaniesFormsModule, AfricaniesInfoPopoverModule, AfricaniesNavigationModule, AfricaniesOverlayRef, AfricaniesStepperModule, AfricaniesTableModule, AfricaniesTooltipModule, AlertComponent, AppShellComponent, AppShellContentHeaderComponent, AppShellHeaderComponent, AppShellHeaderEndDirective, AppShellHeaderSlotDirective, AppShellHeaderStartDirective, AsyncStateComponent, AvatarComponent, AvatarMenuComponent, BrandLogoComponent, BreadcrumbComponent, ButtonComponent, CarrierLogoComponent, CellDefDirective, CheckboxComponent, ChipComponent, ConfirmDialogComponent, ConfirmService, ContentStackComponent, CopyButtonComponent, DatePickerComponent, DrawerService, EmptyStateComponent, ErrorIndicatorComponent, ErrorStateComponent, FileUploadComponent, FilterDrawerPanel, FilterDrawerService, FilterQueryService, GOOGLE_PLACES_CONFIG, GooglePlacesService, HeaderCellDefDirective, ImageComponent, InfoPopoverComponent, InfoPopoverContentDirective, InfoPopoverTriggerDirective, LoadingStateComponent, MODAL_SIZE_PANEL_CLASS, ModalService, NotificationDrawerPanel, NotificationDrawerService, NumberInputComponent, OVERLAY_DATA, OtpInputComponent, OverlayFooterDirective, OverlayFrameComponent, OverlayHeaderDirective, PageHeaderComponent, PaginationComponent, RadioComponent, RowDetailDefDirective, SearchComboboxComponent, SegmentComponent, SelectComponent, ShippingModeSwitchComponent, SideNavComponent, StepDefDirective, StepperComponent, TOAST_DURATION_MS, TOAST_ICONS, TabDefDirective, TableComponent, TabsComponent, TextInputComponent, TextareaComponent, ToastService, ToggleComponent, TooltipComponent, TooltipTriggerDirective, acceptLabels, buildBreadcrumbsFromSideNav, deliveryVendorOptionsForStoredValue, deliveryVendorSelectOptions, deliveryVendorSelected, fileExtensionLabel, fileMatchesAccept, headerGreetingFirstName, headerGreetingPeriod, isCatalogRootRoute, isNavItemActive, isNestedChildRoute, navItemUrlTree, normalizeCarrierLogoSlug, normalizeNavPath, pickHeaderGreeting, provideAfricaniesToasts, provideAfricaniesUiOverlays, provideGooglePlaces, resolveCatalogRootLink, resolveContentBackTarget, resolveHeaderBackTarget, resolveParentPathFromRootSnapshot, toastFingerprint };
|
|
5410
|
-
export type { AddressComponent, AddressPlace, AddressPrediction, AfricaniesMenuItem, AfricaniesNavItem, AfricaniesNotification, AfricaniesSideNavItem, AlertVariant, AppShellContentWidth, AppShellHeaderDensity, AppShellLayoutPreview, AvatarSize, BrandLogoSize, ButtonSize, ButtonVariant, CarrierLogoSize, CarrierLogoSlug, CellDefContext, ChipSize, ChipVariant, ConfirmOptions, ConfirmWork, ContentBackTarget, FileUploadResult, FileUploadVariant, FilterDrawerData, FilterDrawerResult, GooglePlacesConfig, HeaderBackTarget, HeaderGreeting, HeaderGreetingPeriod, HeaderWeather, HeaderWeatherKind, ImageFit, ImageShape, InfoPopoverPlacement, LoadingStateMode, ModalOpenConfig, ModalSize, NotificationDrawerData, NotificationDrawerResult, NotificationPageResult, OtpInputVariant, OverlayOpenConfig, RadioOption, RowDetailDefContext, SearchComboboxBadge, SearchComboboxBadgeFn, SearchComboboxLabelFn, SearchComboboxMarkFn, SearchComboboxSearchFn, SearchComboboxSubtitleFn, SearchComboboxTrackFn, SelectCreateConfig, SelectOption, SelectSize, StepDefContext, StepDefinition, TabDefContext, TableColumn, TableSortChange, TextInputType, ToastItem, ToastShowOptions, ToastVariant, TooltipPlacement };
|
|
5492
|
+
export { AFRICANIES_BRAND_LOGO_MINI_URL, AFRICANIES_BRAND_LOGO_URL, AccordionComponent, ActionMenuComponent, ActionMenuTriggerDirective, AddressInputComponent, AfricaniesActionsModule, AfricaniesFeedbackModule, AfricaniesFormsModule, AfricaniesInfoPopoverModule, AfricaniesNavigationModule, AfricaniesOverlayRef, AfricaniesStepperModule, AfricaniesTableModule, AfricaniesTooltipModule, AlertComponent, AppShellComponent, AppShellContentHeaderComponent, AppShellHeaderComponent, AppShellHeaderEndDirective, AppShellHeaderSlotDirective, AppShellHeaderStartDirective, AsyncStateComponent, AvatarComponent, AvatarMenuComponent, BrandLogoComponent, BreadcrumbComponent, ButtonComponent, CarrierLogoComponent, CellDefDirective, CheckboxComponent, ChipComponent, ConfirmDialogComponent, ConfirmService, ContentStackComponent, CopyButtonComponent, DatePickerComponent, DrawerService, EmptyStateComponent, ErrorIndicatorComponent, ErrorStateComponent, FileUploadComponent, FilterDrawerPanel, FilterDrawerService, FilterQueryService, GOOGLE_PLACES_CONFIG, GooglePlacesService, HeaderCellDefDirective, ImageComponent, InfoPopoverComponent, InfoPopoverContentDirective, InfoPopoverTriggerDirective, LoadingStateComponent, MODAL_SIZE_PANEL_CLASS, ModalService, NotificationDrawerPanel, NotificationDrawerService, NumberInputComponent, OVERLAY_DATA, OtpInputComponent, OverlayFooterDirective, OverlayFrameComponent, OverlayHeaderDirective, PageHeaderComponent, PaginationComponent, RadioComponent, RowDetailDefDirective, SearchComboboxComponent, SegmentComponent, SelectComponent, ShippingModeSwitchComponent, SideNavComponent, StepDefDirective, StepperComponent, TOAST_DURATION_MS, TOAST_ICONS, TabDefDirective, TableComponent, TabsComponent, TextInputComponent, TextareaComponent, ToastService, ToggleComponent, TooltipComponent, TooltipTriggerDirective, acceptLabels, buildBreadcrumbsFromSideNav, deliveryVendorOptionsForStoredValue, deliveryVendorSelectOptions, deliveryVendorSelected, fileExtensionLabel, fileMatchesAccept, headerGreetingFirstName, headerGreetingPeriod, isCatalogRootRoute, isNavItemActive, isNestedChildRoute, navItemUrlTree, normalizeCarrierLogoSlug, normalizeNavPath, pickHeaderGreeting, provideAfricaniesToasts, provideAfricaniesUiOverlays, provideGooglePlaces, resolveCatalogRootLink, resolveContentBackTarget, resolveHeaderBackTarget, resolveParentPathFromRootSnapshot, toastFingerprint };
|
|
5493
|
+
export type { AccordionSize, AddressComponent, AddressPlace, AddressPrediction, AfricaniesMenuItem, AfricaniesNavItem, AfricaniesNotification, AfricaniesSideNavItem, AlertVariant, AppShellContentWidth, AppShellHeaderDensity, AppShellLayoutPreview, AvatarSize, BrandLogoSize, ButtonSize, ButtonVariant, CarrierLogoSize, CarrierLogoSlug, CellDefContext, ChipSize, ChipVariant, ConfirmOptions, ConfirmWork, ContentBackTarget, FileUploadResult, FileUploadVariant, FilterDrawerData, FilterDrawerResult, GooglePlacesConfig, HeaderBackTarget, HeaderGreeting, HeaderGreetingPeriod, HeaderWeather, HeaderWeatherKind, ImageFit, ImageShape, InfoPopoverPlacement, LoadingStateMode, ModalOpenConfig, ModalSize, NotificationDrawerData, NotificationDrawerResult, NotificationPageResult, OtpInputVariant, OverlayOpenConfig, RadioOption, RowDetailDefContext, SearchComboboxBadge, SearchComboboxBadgeFn, SearchComboboxLabelFn, SearchComboboxMarkFn, SearchComboboxSearchFn, SearchComboboxSubtitleFn, SearchComboboxTrackFn, SelectCreateConfig, SelectOption, SelectSize, StepDefContext, StepDefinition, TabDefContext, TableColumn, TableSortChange, TextInputType, ToastItem, ToastShowOptions, ToastVariant, TooltipPlacement };
|
|
@@ -17,10 +17,12 @@ import { STORAGE_TOKEN, AFRICANIES_THEME_KEY } from '@africanies/africanies-stor
|
|
|
17
17
|
* SFN (export / green):
|
|
18
18
|
* text-export bg-export bg-export-subtle bg-export-light border-export
|
|
19
19
|
* hover:bg-export-light hover:bg-export-subtle dark:bg-export/15 dark:hover:bg-export/15
|
|
20
|
+
* dark:bg-[color-mix(in_srgb,#1cbd5d_15%,#212529)] dark:bg-export dark:text-export dark:border-export
|
|
20
21
|
*
|
|
21
22
|
* STN (import / orange):
|
|
22
23
|
* text-import bg-import bg-import-subtle bg-import-light border-import
|
|
23
24
|
* hover:bg-import-light hover:bg-import-subtle dark:bg-import/15 dark:hover:bg-import/15
|
|
25
|
+
* dark:bg-[color-mix(in_srgb,#f08829_15%,#212529)] dark:bg-import dark:text-import dark:border-import
|
|
24
26
|
*/
|
|
25
27
|
const MODE_COLOR_SAFELIST = [
|
|
26
28
|
'text-export',
|
|
@@ -32,6 +34,10 @@ const MODE_COLOR_SAFELIST = [
|
|
|
32
34
|
'hover:bg-export-subtle',
|
|
33
35
|
'dark:bg-export/15',
|
|
34
36
|
'dark:hover:bg-export/15',
|
|
37
|
+
'dark:bg-[color-mix(in_srgb,#1cbd5d_15%,#212529)]',
|
|
38
|
+
'dark:bg-export',
|
|
39
|
+
'dark:text-export',
|
|
40
|
+
'dark:border-export',
|
|
35
41
|
'text-import',
|
|
36
42
|
'bg-import',
|
|
37
43
|
'bg-import-subtle',
|
|
@@ -41,6 +47,10 @@ const MODE_COLOR_SAFELIST = [
|
|
|
41
47
|
'hover:bg-import-subtle',
|
|
42
48
|
'dark:bg-import/15',
|
|
43
49
|
'dark:hover:bg-import/15',
|
|
50
|
+
'dark:bg-[color-mix(in_srgb,#f08829_15%,#212529)]',
|
|
51
|
+
'dark:bg-import',
|
|
52
|
+
'dark:text-import',
|
|
53
|
+
'dark:border-import',
|
|
44
54
|
];
|
|
45
55
|
|
|
46
56
|
/**
|
|
@@ -76,7 +86,10 @@ class ModeColorService {
|
|
|
76
86
|
primary: 'bg-export text-white border-transparent hover:bg-export-light',
|
|
77
87
|
ghostPrimary: 'bg-transparent text-export border-transparent hover:bg-export-subtle dark:hover:bg-export/15',
|
|
78
88
|
soft: 'bg-export-subtle dark:bg-export/15',
|
|
89
|
+
softSolid: 'bg-export-subtle dark:bg-[color-mix(in_srgb,#1cbd5d_15%,#212529)]',
|
|
79
90
|
softHover: 'hover:bg-export-subtle dark:hover:bg-export/15',
|
|
91
|
+
activeFill: 'bg-export text-white border-transparent dark:bg-export dark:text-white',
|
|
92
|
+
stroked: 'bg-white text-export border-export hover:bg-export-subtle dark:bg-ink-950 dark:text-export dark:border-export dark:hover:bg-export/15',
|
|
80
93
|
};
|
|
81
94
|
}
|
|
82
95
|
return {
|
|
@@ -87,7 +100,10 @@ class ModeColorService {
|
|
|
87
100
|
primary: 'bg-import text-white border-transparent hover:bg-import-light',
|
|
88
101
|
ghostPrimary: 'bg-transparent text-import border-transparent hover:bg-import-subtle dark:hover:bg-import/15',
|
|
89
102
|
soft: 'bg-import-subtle dark:bg-import/15',
|
|
103
|
+
softSolid: 'bg-import-subtle dark:bg-[color-mix(in_srgb,#f08829_15%,#212529)]',
|
|
90
104
|
softHover: 'hover:bg-import-subtle dark:hover:bg-import/15',
|
|
105
|
+
activeFill: 'bg-import text-white border-transparent dark:bg-import dark:text-white',
|
|
106
|
+
stroked: 'bg-white text-import border-import hover:bg-import-subtle dark:bg-ink-950 dark:text-import dark:border-import dark:hover:bg-import/15',
|
|
91
107
|
};
|
|
92
108
|
}, /* @ts-ignore */
|
|
93
109
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"africanies-africanies-theme.mjs","sources":["../../../../libs/africanies-theme/src/lib/mode-color.safelist.ts","../../../../libs/africanies-theme/src/lib/mode-color.service.ts","../../../../libs/africanies-theme/src/lib/theme.service.ts","../../../../libs/africanies-theme/src/africanies-africanies-theme.ts"],"sourcesContent":["/**\n * Tailwind safelist side-effect for shipping-mode color utilities.\n *\n * WHY this file exists: JIT/content scanning only keeps class names that appear\n * as *literal strings* in scanned sources. {@link ModeColorService} already\n * returns these literals, but keeping a dedicated comment list makes the\n * contract obvious for consumers who configure `safelist` or purge plugins.\n *\n * Do not rename these strings without updating ModeColorService and THEME.md.\n *\n * SFN (export / green):\n * text-export bg-export bg-export-subtle bg-export-light border-export\n * hover:bg-export-light hover:bg-export-subtle dark:bg-export/15 dark:hover:bg-export/15\n * dark:bg-[color-mix(in_srgb,#1cbd5d_15%,#212529)] dark:bg-export dark:text-export dark:border-export\n *\n * STN (import / orange):\n * text-import bg-import bg-import-subtle bg-import-light border-import\n * hover:bg-import-light hover:bg-import-subtle dark:bg-import/15 dark:hover:bg-import/15\n * dark:bg-[color-mix(in_srgb,#f08829_15%,#212529)] dark:bg-import dark:text-import dark:border-import\n */\nexport const MODE_COLOR_SAFELIST = [\n 'text-export',\n 'bg-export',\n 'bg-export-subtle',\n 'bg-export-light',\n 'border-export',\n 'hover:bg-export-light',\n 'hover:bg-export-subtle',\n 'dark:bg-export/15',\n 'dark:hover:bg-export/15',\n 'dark:bg-[color-mix(in_srgb,#1cbd5d_15%,#212529)]',\n 'dark:bg-export',\n 'dark:text-export',\n 'dark:border-export',\n 'text-import',\n 'bg-import',\n 'bg-import-subtle',\n 'bg-import-light',\n 'border-import',\n 'hover:bg-import-light',\n 'hover:bg-import-subtle',\n 'dark:bg-import/15',\n 'dark:hover:bg-import/15',\n 'dark:bg-[color-mix(in_srgb,#f08829_15%,#212529)]',\n 'dark:bg-import',\n 'dark:text-import',\n 'dark:border-import',\n] as const;\n","import { computed, inject, Injectable } from '@angular/core';\n\nimport { ShippingModeService } from '@africanies/africanies-core';\n\n/**\n * Tailwind class bundle for the active shipping mode (SFN export / STN import).\n *\n * Use these for **primary** product chrome: CTAs, selected controls, progress,\n * and accent text. Semantic colors (danger / warning) stay mode-independent.\n */\nexport interface ModeColorClasses {\n /** Text color utility, e.g. `text-export`. */\n text: string;\n /** Solid background utility, e.g. `bg-export`. */\n bg: string;\n /** Soft background utility, e.g. `bg-export-subtle`. */\n bgSubtle: string;\n /** Border matching the mode accent, e.g. `border-export`. */\n border: string;\n /**\n * Filled primary CTA — `variant=\"primary\"` on buttons.\n * Includes hover utility as a literal so Tailwind keeps it.\n */\n primary: string;\n /**\n * Transparent / text-only CTA — `variant=\"ghost-primary\"` on buttons.\n * Mode accent text + soft hover fill.\n */\n ghostPrimary: string;\n /**\n * Soft highlight for selected / active rows (works in dark mode).\n * Dark uses a translucent tint — fine over solid surfaces, not for\n * sticky overlays (see {@link softSolid}).\n */\n soft: string;\n /**\n * Opaque soft fill — same tint as {@link soft}, but dark mode mixes into\n * ink so scrolled content cannot show through (sticky table headers/cells).\n */\n softSolid: string;\n /**\n * Soft hover highlight for menus and lists.\n */\n softHover: string;\n /**\n * Active nav leaf / collapsed rail — solid mode fill + white text.\n */\n activeFill: string;\n /**\n * Stroked secondary CTA — white fill, mode border + text (portal `.btn-stroked`).\n */\n stroked: string;\n}\n\n/**\n * Maps {@link ShippingModeService} to mode-accent Tailwind classes.\n *\n * - **SFN** → export green is primary\n * - **STN** → import orange is primary\n *\n * WHY literal class strings: Tailwind's scanner cannot see dynamically built\n * names like `` `text-${token}` ``. Returning full literals (`text-export`, …)\n * keeps utilities in the compiled CSS. See {@link MODE_COLOR_SAFELIST}.\n *\n * @example\n * ```html\n * @let colors = modeColor.classes();\n * <button type=\"button\" [class]=\"colors.primary\">Save</button>\n * <span [class]=\"colors.text\">Mode accent</span>\n * ```\n */\n@Injectable({ providedIn: 'root' })\nexport class ModeColorService {\n private readonly shippingMode = inject(ShippingModeService);\n\n /**\n * Mode-dependent utility classes. Recomputes when shipping mode changes.\n */\n readonly classes = computed<ModeColorClasses>(() => {\n // Literal strings required for Tailwind content detection — do not interpolate.\n if (this.shippingMode.mode() === 'sfn') {\n return {\n text: 'text-export',\n bg: 'bg-export',\n bgSubtle: 'bg-export-subtle',\n border: 'border-export',\n primary:\n 'bg-export text-white border-transparent hover:bg-export-light',\n ghostPrimary:\n 'bg-transparent text-export border-transparent hover:bg-export-subtle dark:hover:bg-export/15',\n soft: 'bg-export-subtle dark:bg-export/15',\n softSolid:\n 'bg-export-subtle dark:bg-[color-mix(in_srgb,#1cbd5d_15%,#212529)]',\n softHover: 'hover:bg-export-subtle dark:hover:bg-export/15',\n activeFill:\n 'bg-export text-white border-transparent dark:bg-export dark:text-white',\n stroked:\n 'bg-white text-export border-export hover:bg-export-subtle dark:bg-ink-950 dark:text-export dark:border-export dark:hover:bg-export/15',\n };\n }\n return {\n text: 'text-import',\n bg: 'bg-import',\n bgSubtle: 'bg-import-subtle',\n border: 'border-import',\n primary:\n 'bg-import text-white border-transparent hover:bg-import-light',\n ghostPrimary:\n 'bg-transparent text-import border-transparent hover:bg-import-subtle dark:hover:bg-import/15',\n soft: 'bg-import-subtle dark:bg-import/15',\n softSolid:\n 'bg-import-subtle dark:bg-[color-mix(in_srgb,#f08829_15%,#212529)]',\n softHover: 'hover:bg-import-subtle dark:hover:bg-import/15',\n activeFill:\n 'bg-import text-white border-transparent dark:bg-import dark:text-white',\n stroked:\n 'bg-white text-import border-import hover:bg-import-subtle dark:bg-ink-950 dark:text-import dark:border-import dark:hover:bg-import/15',\n };\n });\n}\n","import { DOCUMENT } from '@angular/common';\nimport { inject, Injectable, signal } from '@angular/core';\n\nimport { AFRICANIES_THEME_KEY, STORAGE_TOKEN } from '@africanies/africanies-storage';\n\nimport type { Theme } from './theme.types';\n\n/**\n * Application light/dark theme preference.\n *\n * WHY signals (not BehaviorSubject): theme is synchronous UI state read from\n * templates and other services; a signal avoids RxJS subscription boilerplate\n * and matches Angular 22 change detection. Persistence goes through\n * {@link STORAGE_TOKEN} so tests can swap storage without touching `localStorage`.\n *\n * Applies the Tailwind `darkMode: 'class'` contract by toggling `dark` on\n * `document.documentElement`, and sets `color-scheme` so native UI (date\n * pickers, scrollbars, form controls) matches the app theme — class-based\n * dark mode alone does not restyle browser chrome.\n *\n * @example\n * ```ts\n * // app.config.ts\n * import { inject, provideAppInitializer } from '@angular/core';\n * import { ThemeService } from '@africanies/africanies-theme';\n *\n * export const appConfig = {\n * providers: [\n * provideAppInitializer(() => {\n * inject(ThemeService); // applies stored / system theme once\n * }),\n * ],\n * };\n *\n * // In a component\n * const theme = inject(ThemeService);\n * theme.toggle();\n * theme.setTheme('dark');\n * const current = theme.theme(); // 'light' | 'dark'\n * ```\n */\n@Injectable({ providedIn: 'root' })\nexport class ThemeService {\n private readonly storage = inject(STORAGE_TOKEN);\n private readonly document = inject(DOCUMENT);\n\n /**\n * Current theme. Prefer reading via `theme()` in templates / computed values\n * rather than caching the string, so dark-class consumers stay in sync.\n */\n readonly theme = signal<Theme>(this.resolveInitialTheme());\n\n constructor() {\n this.applyToDocument(this.theme());\n }\n\n /**\n * Sets and persists the theme, updating the `dark` class and `color-scheme`\n * on `<html>`.\n *\n * @param theme - Absolute preference to store.\n */\n setTheme(theme: Theme): void {\n this.theme.set(theme);\n this.applyToDocument(theme);\n try {\n this.storage.set(AFRICANIES_THEME_KEY, theme);\n } catch {\n // Persistence failure must not block the in-session visual toggle —\n // private browsing / quota issues are transient for theme preference.\n }\n }\n\n /**\n * Flips between light and dark.\n *\n * @returns The theme after the toggle.\n */\n toggle(): Theme {\n const next: Theme = this.theme() === 'light' ? 'dark' : 'light';\n this.setTheme(next);\n return next;\n }\n\n private resolveInitialTheme(): Theme {\n try {\n const stored = this.storage.get<Theme>(AFRICANIES_THEME_KEY);\n if (stored === 'light' || stored === 'dark') {\n return stored;\n }\n } catch {\n // Fall through to system preference when storage is unavailable.\n }\n return this.prefersDark() ? 'dark' : 'light';\n }\n\n private prefersDark(): boolean {\n const win = this.document.defaultView;\n return !!win?.matchMedia?.('(prefers-color-scheme: dark)').matches;\n }\n\n private applyToDocument(theme: Theme): void {\n const root = this.document.documentElement;\n if (theme === 'dark') {\n root.classList.add('dark');\n } else {\n root.classList.remove('dark');\n }\n // Native date/time pickers follow `color-scheme`, not Tailwind's `dark` class.\n root.style.colorScheme = theme;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;AAmBG;AACI,MAAM,mBAAmB,GAAG;IACjC,aAAa;IACb,WAAW;IACX,kBAAkB;IAClB,iBAAiB;IACjB,eAAe;IACf,uBAAuB;IACvB,wBAAwB;IACxB,mBAAmB;IACnB,yBAAyB;IACzB,kDAAkD;IAClD,gBAAgB;IAChB,kBAAkB;IAClB,oBAAoB;IACpB,aAAa;IACb,WAAW;IACX,kBAAkB;IAClB,iBAAiB;IACjB,eAAe;IACf,uBAAuB;IACvB,wBAAwB;IACxB,mBAAmB;IACnB,yBAAyB;IACzB,kDAAkD;IAClD,gBAAgB;IAChB,kBAAkB;IAClB,oBAAoB;;;ACQtB;;;;;;;;;;;;;;;;AAgBG;MAEU,gBAAgB,CAAA;AACV,IAAA,YAAY,GAAG,MAAM,CAAC,mBAAmB,CAAC;AAE3D;;AAEG;AACM,IAAA,OAAO,GAAG,QAAQ,CAAmB,MAAK;;QAEjD,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,KAAK,EAAE;YACtC,OAAO;AACL,gBAAA,IAAI,EAAE,aAAa;AACnB,gBAAA,EAAE,EAAE,WAAW;AACf,gBAAA,QAAQ,EAAE,kBAAkB;AAC5B,gBAAA,MAAM,EAAE,eAAe;AACvB,gBAAA,OAAO,EACL,+DAA+D;AACjE,gBAAA,YAAY,EACV,8FAA8F;AAChG,gBAAA,IAAI,EAAE,oCAAoC;AAC1C,gBAAA,SAAS,EACP,mEAAmE;AACrE,gBAAA,SAAS,EAAE,gDAAgD;AAC3D,gBAAA,UAAU,EACR,wEAAwE;AAC1E,gBAAA,OAAO,EACL,uIAAuI;aAC1I;QACH;QACA,OAAO;AACL,YAAA,IAAI,EAAE,aAAa;AACnB,YAAA,EAAE,EAAE,WAAW;AACf,YAAA,QAAQ,EAAE,kBAAkB;AAC5B,YAAA,MAAM,EAAE,eAAe;AACvB,YAAA,OAAO,EACL,+DAA+D;AACjE,YAAA,YAAY,EACV,8FAA8F;AAChG,YAAA,IAAI,EAAE,oCAAoC;AAC1C,YAAA,SAAS,EACP,mEAAmE;AACrE,YAAA,SAAS,EAAE,gDAAgD;AAC3D,YAAA,UAAU,EACR,wEAAwE;AAC1E,YAAA,OAAO,EACL,uIAAuI;SAC1I;IACH,CAAC;gFAAC;uGA9CS,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAhB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cADH,MAAM,EAAA,CAAA;;2FACnB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;AChElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCG;MAEU,YAAY,CAAA;AACN,IAAA,OAAO,GAAG,MAAM,CAAC,aAAa,CAAC;AAC/B,IAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAE5C;;;AAGG;AACM,IAAA,KAAK,GAAG,MAAM,CAAQ,IAAI,CAAC,mBAAmB,EAAE;8EAAC;AAE1D,IAAA,WAAA,GAAA;QACE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;IACpC;AAEA;;;;;AAKG;AACH,IAAA,QAAQ,CAAC,KAAY,EAAA;AACnB,QAAA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC;AACrB,QAAA,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC;AAC3B,QAAA,IAAI;YACF,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,KAAK,CAAC;QAC/C;AAAE,QAAA,MAAM;;;QAGR;IACF;AAEA;;;;AAIG;IACH,MAAM,GAAA;AACJ,QAAA,MAAM,IAAI,GAAU,IAAI,CAAC,KAAK,EAAE,KAAK,OAAO,GAAG,MAAM,GAAG,OAAO;AAC/D,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;AACnB,QAAA,OAAO,IAAI;IACb;IAEQ,mBAAmB,GAAA;AACzB,QAAA,IAAI;YACF,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAQ,oBAAoB,CAAC;YAC5D,IAAI,MAAM,KAAK,OAAO,IAAI,MAAM,KAAK,MAAM,EAAE;AAC3C,gBAAA,OAAO,MAAM;YACf;QACF;AAAE,QAAA,MAAM;;QAER;AACA,QAAA,OAAO,IAAI,CAAC,WAAW,EAAE,GAAG,MAAM,GAAG,OAAO;IAC9C;IAEQ,WAAW,GAAA;AACjB,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW;QACrC,OAAO,CAAC,CAAC,GAAG,EAAE,UAAU,GAAG,8BAA8B,CAAC,CAAC,OAAO;IACpE;AAEQ,IAAA,eAAe,CAAC,KAAY,EAAA;AAClC,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,eAAe;AAC1C,QAAA,IAAI,KAAK,KAAK,MAAM,EAAE;AACpB,YAAA,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC;QAC5B;aAAO;AACL,YAAA,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC;QAC/B;;AAEA,QAAA,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,KAAK;IAChC;uGApEW,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAZ,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,cADC,MAAM,EAAA,CAAA;;2FACnB,YAAY,EAAA,UAAA,EAAA,CAAA;kBADxB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACzClC;;AAEG;;;;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@africanies/africanies-theme",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^22.0.0",
|
|
6
6
|
"@angular/core": "^22.0.0",
|
|
7
|
-
"@africanies/africanies-core": "
|
|
8
|
-
"@africanies/africanies-storage": "
|
|
7
|
+
"@africanies/africanies-core": ">=0.0.2 <0.1.0",
|
|
8
|
+
"@africanies/africanies-storage": ">=0.0.1 <0.1.0"
|
|
9
9
|
},
|
|
10
10
|
"sideEffects": false,
|
|
11
11
|
"publishConfig": {
|
|
@@ -69,6 +69,11 @@ function africaniesInteractiveCursorPlugin({ addBase }) {
|
|
|
69
69
|
* (`white` / `ink-950`) and `-webkit-text-fill-color` keeps body text on
|
|
70
70
|
* `ink` / white. `.dark` matches `ThemeService` (`class` on `<html>`).
|
|
71
71
|
*
|
|
72
|
+
* WHY one selector per `addBase` key: joining autofill selectors with commas
|
|
73
|
+
* under a single `.dark ${list}` key only scopes the first selector — the rest
|
|
74
|
+
* leak into light mode. WHY no `color` in the long transition: delaying color
|
|
75
|
+
* freezes text when the user toggles light/dark.
|
|
76
|
+
*
|
|
72
77
|
* @param {import('tailwindcss/types/config').PluginAPI} api
|
|
73
78
|
*/
|
|
74
79
|
function africaniesAutofillPlugin({ addBase }) {
|
|
@@ -81,21 +86,24 @@ function africaniesAutofillPlugin({ addBase }) {
|
|
|
81
86
|
'textarea:-webkit-autofill:hover',
|
|
82
87
|
'textarea:-webkit-autofill:focus',
|
|
83
88
|
'textarea:-webkit-autofill:active',
|
|
84
|
-
]
|
|
89
|
+
];
|
|
85
90
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
91
|
+
/** @type {Record<string, Record<string, string>>} */
|
|
92
|
+
const rules = {};
|
|
93
|
+
for (const selector of autofillSelectors) {
|
|
94
|
+
rules[selector] = {
|
|
95
|
+
WebkitTextFillColor: '#1c2b3f',
|
|
96
|
+
caretColor: '#1c2b3f',
|
|
90
97
|
boxShadow: '0 0 0 1000px #ffffff inset',
|
|
91
98
|
transition: 'background-color 99999s ease-in-out 0s',
|
|
92
|
-
}
|
|
93
|
-
[`.dark ${
|
|
99
|
+
};
|
|
100
|
+
rules[`.dark ${selector}`] = {
|
|
94
101
|
WebkitTextFillColor: '#ffffff',
|
|
95
102
|
caretColor: '#ffffff',
|
|
96
103
|
boxShadow: '0 0 0 1000px #272729 inset',
|
|
97
|
-
}
|
|
98
|
-
}
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
addBase(rules);
|
|
99
107
|
}
|
|
100
108
|
|
|
101
109
|
/**
|
|
@@ -186,9 +194,12 @@ module.exports = {
|
|
|
186
194
|
black: '#000000',
|
|
187
195
|
white: '#ffffff',
|
|
188
196
|
ink: {
|
|
189
|
-
|
|
197
|
+
// Portal `.txt-primary` navy — primary body / heading text (light).
|
|
198
|
+
DEFAULT: '#1c2b3f',
|
|
190
199
|
blue: '#192a3e',
|
|
191
200
|
brand: '#1c2b3f',
|
|
201
|
+
// Previous ink DEFAULT — dark elevated cards / panels (`dark:bg-ink-surface`).
|
|
202
|
+
surface: '#212529',
|
|
192
203
|
950: '#272729',
|
|
193
204
|
},
|
|
194
205
|
neutral: {
|
|
@@ -197,11 +208,17 @@ module.exports = {
|
|
|
197
208
|
600: '#667185',
|
|
198
209
|
},
|
|
199
210
|
border: {
|
|
200
|
-
//
|
|
201
|
-
|
|
202
|
-
|
|
211
|
+
// Soft hairline on white (portal `$border-bottom-gray`).
|
|
212
|
+
DEFAULT: '#f0f2f5',
|
|
213
|
+
// Nav pins / stronger chrome dividers.
|
|
214
|
+
strong: '#e0e6f0',
|
|
203
215
|
},
|
|
204
216
|
background: {
|
|
217
|
+
// Portal page shell (`container-wrap`).
|
|
218
|
+
chrome: '#f6f7f9',
|
|
219
|
+
// Nested wells inside white cards.
|
|
220
|
+
well: '#f3f3f3',
|
|
221
|
+
// Auth / welcome / soft hover.
|
|
205
222
|
welcome: '#f9fafb',
|
|
206
223
|
},
|
|
207
224
|
export: {
|
|
@@ -228,7 +245,7 @@ module.exports = {
|
|
|
228
245
|
},
|
|
229
246
|
},
|
|
230
247
|
fontFamily: {
|
|
231
|
-
sans: ['
|
|
248
|
+
sans: ['Inter', 'system-ui', 'sans-serif'],
|
|
232
249
|
},
|
|
233
250
|
fontSize: {
|
|
234
251
|
// PROVISIONAL — see THEME.md; sizes may tighten after design QA.
|
|
@@ -13,12 +13,14 @@ import * as i0 from '@angular/core';
|
|
|
13
13
|
* SFN (export / green):
|
|
14
14
|
* text-export bg-export bg-export-subtle bg-export-light border-export
|
|
15
15
|
* hover:bg-export-light hover:bg-export-subtle dark:bg-export/15 dark:hover:bg-export/15
|
|
16
|
+
* dark:bg-[color-mix(in_srgb,#1cbd5d_15%,#212529)] dark:bg-export dark:text-export dark:border-export
|
|
16
17
|
*
|
|
17
18
|
* STN (import / orange):
|
|
18
19
|
* text-import bg-import bg-import-subtle bg-import-light border-import
|
|
19
20
|
* hover:bg-import-light hover:bg-import-subtle dark:bg-import/15 dark:hover:bg-import/15
|
|
21
|
+
* dark:bg-[color-mix(in_srgb,#f08829_15%,#212529)] dark:bg-import dark:text-import dark:border-import
|
|
20
22
|
*/
|
|
21
|
-
declare const MODE_COLOR_SAFELIST: readonly ["text-export", "bg-export", "bg-export-subtle", "bg-export-light", "border-export", "hover:bg-export-light", "hover:bg-export-subtle", "dark:bg-export/15", "dark:hover:bg-export/15", "text-import", "bg-import", "bg-import-subtle", "bg-import-light", "border-import", "hover:bg-import-light", "hover:bg-import-subtle", "dark:bg-import/15", "dark:hover:bg-import/15"];
|
|
23
|
+
declare const MODE_COLOR_SAFELIST: readonly ["text-export", "bg-export", "bg-export-subtle", "bg-export-light", "border-export", "hover:bg-export-light", "hover:bg-export-subtle", "dark:bg-export/15", "dark:hover:bg-export/15", "dark:bg-[color-mix(in_srgb,#1cbd5d_15%,#212529)]", "dark:bg-export", "dark:text-export", "dark:border-export", "text-import", "bg-import", "bg-import-subtle", "bg-import-light", "border-import", "hover:bg-import-light", "hover:bg-import-subtle", "dark:bg-import/15", "dark:hover:bg-import/15", "dark:bg-[color-mix(in_srgb,#f08829_15%,#212529)]", "dark:bg-import", "dark:text-import", "dark:border-import"];
|
|
22
24
|
|
|
23
25
|
/**
|
|
24
26
|
* Tailwind class bundle for the active shipping mode (SFN export / STN import).
|
|
@@ -47,12 +49,27 @@ interface ModeColorClasses {
|
|
|
47
49
|
ghostPrimary: string;
|
|
48
50
|
/**
|
|
49
51
|
* Soft highlight for selected / active rows (works in dark mode).
|
|
52
|
+
* Dark uses a translucent tint — fine over solid surfaces, not for
|
|
53
|
+
* sticky overlays (see {@link softSolid}).
|
|
50
54
|
*/
|
|
51
55
|
soft: string;
|
|
56
|
+
/**
|
|
57
|
+
* Opaque soft fill — same tint as {@link soft}, but dark mode mixes into
|
|
58
|
+
* ink so scrolled content cannot show through (sticky table headers/cells).
|
|
59
|
+
*/
|
|
60
|
+
softSolid: string;
|
|
52
61
|
/**
|
|
53
62
|
* Soft hover highlight for menus and lists.
|
|
54
63
|
*/
|
|
55
64
|
softHover: string;
|
|
65
|
+
/**
|
|
66
|
+
* Active nav leaf / collapsed rail — solid mode fill + white text.
|
|
67
|
+
*/
|
|
68
|
+
activeFill: string;
|
|
69
|
+
/**
|
|
70
|
+
* Stroked secondary CTA — white fill, mode border + text (portal `.btn-stroked`).
|
|
71
|
+
*/
|
|
72
|
+
stroked: string;
|
|
56
73
|
}
|
|
57
74
|
/**
|
|
58
75
|
* Maps {@link ShippingModeService} to mode-accent Tailwind classes.
|