@atlasng/design-system 0.0.2
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 +39 -0
- package/fesm2022/atlasng-design-system-buttons-breadcrumbs.mjs +24 -0
- package/fesm2022/atlasng-design-system-buttons-breadcrumbs.mjs.map +1 -0
- package/fesm2022/atlasng-design-system-buttons-help.mjs +35 -0
- package/fesm2022/atlasng-design-system-buttons-help.mjs.map +1 -0
- package/fesm2022/atlasng-design-system-buttons-navigation-toggle.mjs +28 -0
- package/fesm2022/atlasng-design-system-buttons-navigation-toggle.mjs.map +1 -0
- package/fesm2022/atlasng-design-system-buttons-navigation.mjs +24 -0
- package/fesm2022/atlasng-design-system-buttons-navigation.mjs.map +1 -0
- package/fesm2022/atlasng-design-system-buttons-social-media.mjs +121 -0
- package/fesm2022/atlasng-design-system-buttons-social-media.mjs.map +1 -0
- package/fesm2022/atlasng-design-system-cookie-banner.mjs +274 -0
- package/fesm2022/atlasng-design-system-cookie-banner.mjs.map +1 -0
- package/fesm2022/atlasng-design-system-indicators-end-of-results.mjs +31 -0
- package/fesm2022/atlasng-design-system-indicators-end-of-results.mjs.map +1 -0
- package/fesm2022/atlasng-design-system-indicators-no-results.mjs +33 -0
- package/fesm2022/atlasng-design-system-indicators-no-results.mjs.map +1 -0
- package/fesm2022/atlasng-design-system-indicators-results.mjs +50 -0
- package/fesm2022/atlasng-design-system-indicators-results.mjs.map +1 -0
- package/fesm2022/atlasng-design-system-text-link.mjs +49 -0
- package/fesm2022/atlasng-design-system-text-link.mjs.map +1 -0
- package/fesm2022/atlasng-design-system.mjs +6 -0
- package/fesm2022/atlasng-design-system.mjs.map +1 -0
- package/package.json +70 -0
- package/sass/_index.scss +3 -0
- package/sass/_mat-defaults.scss +27 -0
- package/sass/internal/_breakpoints.scss +150 -0
- package/sass/internal/_sass-utils.scss +45 -0
- package/sass/internal/_token-utils.scss +59 -0
- package/types/atlasng-design-system-buttons-breadcrumbs.d.ts +20 -0
- package/types/atlasng-design-system-buttons-help.d.ts +17 -0
- package/types/atlasng-design-system-buttons-navigation-toggle.d.ts +10 -0
- package/types/atlasng-design-system-buttons-navigation.d.ts +11 -0
- package/types/atlasng-design-system-buttons-social-media.d.ts +54 -0
- package/types/atlasng-design-system-cookie-banner.d.ts +132 -0
- package/types/atlasng-design-system-indicators-end-of-results.d.ts +17 -0
- package/types/atlasng-design-system-indicators-no-results.d.ts +20 -0
- package/types/atlasng-design-system-indicators-results.d.ts +30 -0
- package/types/atlasng-design-system-text-link.d.ts +24 -0
- package/types/atlasng-design-system.d.ts +2 -0
package/package.json
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlasng/design-system",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"exports": {
|
|
5
|
+
".": {
|
|
6
|
+
"sass": "./sass/_index.scss",
|
|
7
|
+
"types": "./types/atlasng-design-system.d.ts",
|
|
8
|
+
"default": "./fesm2022/atlasng-design-system.mjs"
|
|
9
|
+
},
|
|
10
|
+
"./package.json": {
|
|
11
|
+
"default": "./package.json"
|
|
12
|
+
},
|
|
13
|
+
"./buttons/breadcrumbs": {
|
|
14
|
+
"types": "./types/atlasng-design-system-buttons-breadcrumbs.d.ts",
|
|
15
|
+
"default": "./fesm2022/atlasng-design-system-buttons-breadcrumbs.mjs"
|
|
16
|
+
},
|
|
17
|
+
"./buttons/help": {
|
|
18
|
+
"types": "./types/atlasng-design-system-buttons-help.d.ts",
|
|
19
|
+
"default": "./fesm2022/atlasng-design-system-buttons-help.mjs"
|
|
20
|
+
},
|
|
21
|
+
"./buttons/navigation": {
|
|
22
|
+
"types": "./types/atlasng-design-system-buttons-navigation.d.ts",
|
|
23
|
+
"default": "./fesm2022/atlasng-design-system-buttons-navigation.mjs"
|
|
24
|
+
},
|
|
25
|
+
"./buttons/navigation-toggle": {
|
|
26
|
+
"types": "./types/atlasng-design-system-buttons-navigation-toggle.d.ts",
|
|
27
|
+
"default": "./fesm2022/atlasng-design-system-buttons-navigation-toggle.mjs"
|
|
28
|
+
},
|
|
29
|
+
"./buttons/social-media": {
|
|
30
|
+
"types": "./types/atlasng-design-system-buttons-social-media.d.ts",
|
|
31
|
+
"default": "./fesm2022/atlasng-design-system-buttons-social-media.mjs"
|
|
32
|
+
},
|
|
33
|
+
"./cookie-banner": {
|
|
34
|
+
"types": "./types/atlasng-design-system-cookie-banner.d.ts",
|
|
35
|
+
"default": "./fesm2022/atlasng-design-system-cookie-banner.mjs"
|
|
36
|
+
},
|
|
37
|
+
"./indicators/end-of-results": {
|
|
38
|
+
"types": "./types/atlasng-design-system-indicators-end-of-results.d.ts",
|
|
39
|
+
"default": "./fesm2022/atlasng-design-system-indicators-end-of-results.mjs"
|
|
40
|
+
},
|
|
41
|
+
"./indicators/no-results": {
|
|
42
|
+
"types": "./types/atlasng-design-system-indicators-no-results.d.ts",
|
|
43
|
+
"default": "./fesm2022/atlasng-design-system-indicators-no-results.mjs"
|
|
44
|
+
},
|
|
45
|
+
"./indicators/results": {
|
|
46
|
+
"types": "./types/atlasng-design-system-indicators-results.d.ts",
|
|
47
|
+
"default": "./fesm2022/atlasng-design-system-indicators-results.mjs"
|
|
48
|
+
},
|
|
49
|
+
"./text-link": {
|
|
50
|
+
"types": "./types/atlasng-design-system-text-link.d.ts",
|
|
51
|
+
"default": "./fesm2022/atlasng-design-system-text-link.mjs"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"@angular/cdk": "^21.2.6",
|
|
56
|
+
"@angular/common": "^21.2.6",
|
|
57
|
+
"@angular/core": "^21.2.6",
|
|
58
|
+
"@angular/material": "^21.2.6",
|
|
59
|
+
"@atlasng/analytics": "^0.0.2",
|
|
60
|
+
"@atlasng/common": "^0.0.2",
|
|
61
|
+
"@atlasng/core": "^0.0.2"
|
|
62
|
+
},
|
|
63
|
+
"sideEffects": false,
|
|
64
|
+
"module": "fesm2022/atlasng-design-system.mjs",
|
|
65
|
+
"typings": "types/atlasng-design-system.d.ts",
|
|
66
|
+
"type": "module",
|
|
67
|
+
"dependencies": {
|
|
68
|
+
"tslib": "^2.3.0"
|
|
69
|
+
}
|
|
70
|
+
}
|
package/sass/_index.scss
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '@angular/material' as mat;
|
|
3
|
+
@use './internal/sass-utils';
|
|
4
|
+
@use './internal/token-utils';
|
|
5
|
+
|
|
6
|
+
$button-defaults: (
|
|
7
|
+
outlined-label-text-color: token-utils.sys-slot(on-surface-variant),
|
|
8
|
+
outlined-ripple-color: sass-utils.color-with-opacity(
|
|
9
|
+
token-utils.sys-token(on-surface-variant),
|
|
10
|
+
token-utils.sys-token(pressed-state-layer-opacity)
|
|
11
|
+
),
|
|
12
|
+
outlined-state-layer-color: token-utils.sys-slot(on-surface-variant),
|
|
13
|
+
text-label-text-color: token-utils.sys-slot(on-primary-container),
|
|
14
|
+
text-ripple-color: sass-utils.color-with-opacity(
|
|
15
|
+
token-utils.sys-token(on-primary-container),
|
|
16
|
+
token-utils.sys-token(pressed-state-layer-opacity)
|
|
17
|
+
),
|
|
18
|
+
text-state-layer-color: token-utils.sys-slot(on-primary-container),
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
@mixin button-defaults {
|
|
22
|
+
@include mat.button-overrides($button-defaults);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@mixin all-defaults {
|
|
26
|
+
@include button-defaults;
|
|
27
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
@use 'sass:list';
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
@use 'sass:meta';
|
|
4
|
+
|
|
5
|
+
$_breakpoint-min: 0px;
|
|
6
|
+
$_breakpoint-max: 1000000px;
|
|
7
|
+
$_breakpoint-keywords: ('boundary');
|
|
8
|
+
$_breakpoint-boundary-modes: ('open', 'open-start', 'open-end', 'closed');
|
|
9
|
+
|
|
10
|
+
$breakpoints: (
|
|
11
|
+
x-small: (
|
|
12
|
+
$_breakpoint-min,
|
|
13
|
+
599.98px,
|
|
14
|
+
),
|
|
15
|
+
small: (
|
|
16
|
+
600px,
|
|
17
|
+
959.98px,
|
|
18
|
+
),
|
|
19
|
+
medium: (
|
|
20
|
+
960px,
|
|
21
|
+
1279.98px,
|
|
22
|
+
),
|
|
23
|
+
large: (
|
|
24
|
+
1280px,
|
|
25
|
+
1919.98px,
|
|
26
|
+
),
|
|
27
|
+
x-large: (
|
|
28
|
+
1920px,
|
|
29
|
+
$_breakpoint-max,
|
|
30
|
+
),
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
// Create a media query for the given breakpoint(s) and boundary mode (default: 'closed').
|
|
34
|
+
@mixin breakpoint($breakpoint, $args...) {
|
|
35
|
+
$keywords: meta.keywords($args);
|
|
36
|
+
$invalid-keywords: map.remove($keywords, $_breakpoint-keywords...);
|
|
37
|
+
$breakpoint-keys: list.join(($breakpoint), $args);
|
|
38
|
+
$boundary-mode: map.get($keywords, 'boundary') or 'closed';
|
|
39
|
+
|
|
40
|
+
@if list.length($invalid-keywords) != 0 {
|
|
41
|
+
@error 'Invalid keyword arguments: #{map.keys($invalid-keywords)}.';
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@if not list.index($_breakpoint-boundary-modes, $boundary-mode) {
|
|
45
|
+
@error 'Invalid boundary mode: #{$boundary-mode}. Valid boundary modes are: #{$_breakpoint-boundary-modes}.';
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@each $key in $breakpoint-keys {
|
|
49
|
+
@if not map.has-key($breakpoints, $key) {
|
|
50
|
+
@error 'Invalid breakpoint: #{$key}. Valid breakpoints are: #{map.keys($breakpoints)}.';
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
$ranges: _select-ranges($breakpoint-keys);
|
|
55
|
+
$ranges: _merge-adjacent-ranges($ranges);
|
|
56
|
+
$ranges: _trim-boundaries($ranges, $boundary-mode);
|
|
57
|
+
$queries: ();
|
|
58
|
+
@each $range in $ranges {
|
|
59
|
+
$queries: list.append($queries, _range-to-query($range), $separator: comma);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@if list.length($queries) != 0 {
|
|
63
|
+
@media #{$queries} {
|
|
64
|
+
@content;
|
|
65
|
+
}
|
|
66
|
+
} @else {
|
|
67
|
+
@warn 'Breakpoints cover the entire range of possible widths. This is likely a mistake, please check the specified breakpoints and boundary mode.';
|
|
68
|
+
@content;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@function _select-ranges($keys) {
|
|
73
|
+
$ranges: ();
|
|
74
|
+
@each $key, $range in $breakpoints {
|
|
75
|
+
@if list.index($keys, $key) {
|
|
76
|
+
$ranges: list.append($ranges, $range);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@return $ranges;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@function _merge-adjacent-ranges($ranges, $tolerance: 1px) {
|
|
84
|
+
$merged: ();
|
|
85
|
+
$current: null;
|
|
86
|
+
@each $range in $ranges {
|
|
87
|
+
@if $current == null {
|
|
88
|
+
$current: $range;
|
|
89
|
+
} @else {
|
|
90
|
+
$currentMax: list.nth($current, 2);
|
|
91
|
+
$min: list.nth($range, 1);
|
|
92
|
+
$max: list.nth($range, 2);
|
|
93
|
+
$diff: $min - $currentMax;
|
|
94
|
+
|
|
95
|
+
@if $diff <= $tolerance {
|
|
96
|
+
$current: list.set-nth($current, 2, $max);
|
|
97
|
+
} @else {
|
|
98
|
+
$merged: list.append($merged, $current);
|
|
99
|
+
$current: $range;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@if $current != null {
|
|
105
|
+
$merged: list.append($merged, $current);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@return $merged;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@function _trim-boundaries($ranges, $boundary-mode) {
|
|
112
|
+
$length: list.length($ranges);
|
|
113
|
+
$first: list.nth($ranges, 1);
|
|
114
|
+
$last: list.nth($ranges, $length);
|
|
115
|
+
|
|
116
|
+
@if list.index(('open', 'open-start'), $boundary-mode) or list.nth($first, 1) == $_breakpoint-min {
|
|
117
|
+
$first: list.set-nth($first, 1, null);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@if list.index(('open', 'open-end'), $boundary-mode) or list.nth($last, 2) == $_breakpoint-max {
|
|
121
|
+
$last: list.set-nth($last, 2, null);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@if $length == 1 {
|
|
125
|
+
$min: list.nth($first, 1);
|
|
126
|
+
$max: list.nth($last, 2);
|
|
127
|
+
@if $min == null and $max == null {
|
|
128
|
+
@return ();
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@return list.append((), ($min, $max));
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
$ranges: list.set-nth($ranges, 1, $first);
|
|
135
|
+
$ranges: list.set-nth($ranges, $length, $last);
|
|
136
|
+
@return $ranges;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
@function _range-to-query($range) {
|
|
140
|
+
$min: list.nth($range, 1);
|
|
141
|
+
$max: list.nth($range, 2);
|
|
142
|
+
|
|
143
|
+
@if $min == null {
|
|
144
|
+
@return '(max-width: #{$max})';
|
|
145
|
+
} @else if $max == null {
|
|
146
|
+
@return '(min-width: #{$min})';
|
|
147
|
+
} @else {
|
|
148
|
+
@return '(min-width: #{$min}) and (max-width: #{$max})';
|
|
149
|
+
}
|
|
150
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
@use 'sass:meta';
|
|
2
|
+
@use 'sass:string';
|
|
3
|
+
|
|
4
|
+
// Apply style to current selector if exists, otherwise apply to root (html)
|
|
5
|
+
@mixin current-selector-or-root($root: html) {
|
|
6
|
+
@if & {
|
|
7
|
+
@content;
|
|
8
|
+
} @else {
|
|
9
|
+
#{$root} {
|
|
10
|
+
@content;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// Checks if a value is a CSS variable name, e.g. --mat-sys-primary
|
|
16
|
+
@function is-css-var-name($value) {
|
|
17
|
+
@return meta.type-of($value) == string and string.index($value, '--') == 1;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Creates a CSS variable with an optional fallback,
|
|
21
|
+
// e.g. create-var(--mat-sys-primary, #fff) => var(--mat-sys-primary, #fff)
|
|
22
|
+
@function create-var($name, $fallback: null) {
|
|
23
|
+
@if ($fallback) {
|
|
24
|
+
@return var($name, $fallback);
|
|
25
|
+
} @else {
|
|
26
|
+
@return var($name);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Creates a color with opacity,
|
|
31
|
+
// e.g. color-with-opacity(--mat-sys-primary, 50%) => color-mix(in srgb, var(--mat-sys-primary) 50%, transparent)
|
|
32
|
+
@function color-with-opacity($color, $opacity) {
|
|
33
|
+
@if (is-css-var-name($color)) {
|
|
34
|
+
$color: var($color);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@if (is-css-var-name($opacity)) {
|
|
38
|
+
$opacity: 'calc(var(#{$opacity}) * 100%)';
|
|
39
|
+
} @else if (meta.type-of($opacity) == number and $opacity < 1) {
|
|
40
|
+
@warn 'Opacity value #{$opacity} is less than 1. Prefer using a percentage (e.g. "50%").';
|
|
41
|
+
$opacity: '#{$opacity * 100}%';
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@return color-mix(in srgb, #{$color} #{$opacity}, transparent);
|
|
45
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use 'sass:meta';
|
|
3
|
+
@use './sass-utils';
|
|
4
|
+
|
|
5
|
+
// Returns an angular material system token as a CSS variable name, e.g. sys-token(primary) => --mat-sys-primary
|
|
6
|
+
@function sys-token($token) {
|
|
7
|
+
// TODO: Validate token exists in angular material tokens
|
|
8
|
+
@return --mat-sys-#{$token};
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// Returns an angular material system token as a CSS variable,
|
|
12
|
+
// e.g. sys-slot(primary) => var(--mat-sys-primary)
|
|
13
|
+
@function sys-slot($token, $fallback: null) {
|
|
14
|
+
@return sass-utils.create-var(sys-token($token), $fallback);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Returns a CSS variable name for a given token and namespace,
|
|
18
|
+
// e.g. token(primary, button) => --atlasng-button-primary
|
|
19
|
+
@function token($token, $namespace-or-config) {
|
|
20
|
+
$namespace: $namespace-or-config;
|
|
21
|
+
@if meta.type-of($namespace-or-config) == 'map' {
|
|
22
|
+
$namespace: map.get($namespace-or-config, namespace);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@return --ang-#{$namespace}-#{$token};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Returns a CSS variable for a given token and namespace,
|
|
29
|
+
// e.g. slot(primary, button) => var(--atlasng-button-primary, var(--mat-sys-primary))
|
|
30
|
+
@function slot($token, $tokens-config, $fallback: null) {
|
|
31
|
+
$tokens: map.get($tokens-config, tokens);
|
|
32
|
+
@if not map.has-key($tokens, $token) {
|
|
33
|
+
@error "Token '#{$token}' does not exist. Configured tokens are: #{map.keys($tokens)}";
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
$sys-fallback: map.get($tokens, $token);
|
|
37
|
+
@if (sass-utils.is-css-var-name($sys-fallback)) {
|
|
38
|
+
$sys-fallback: sass-utils.create-var($sys-fallback, $fallback);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@return sass-utils.create-var(token($token, $tokens-config), $sys-fallback);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Mixin to apply a map of token overrides as CSS variables to the current selector.
|
|
45
|
+
@mixin apply-overrides($overrides, $tokens-config) {
|
|
46
|
+
$tokens: map.get($tokens-config, tokens);
|
|
47
|
+
|
|
48
|
+
@include sass-utils.current-selector-or-root() {
|
|
49
|
+
@each $token, $value in $overrides {
|
|
50
|
+
@if not map.has-key($tokens, $token) {
|
|
51
|
+
@error "Token '#{$token}' does not exist. Configured tokens are: #{map.keys($tokens)}";
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@if $value != null {
|
|
55
|
+
#{token($token, $tokens-config)}: #{$value};
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { AnyLinkCommand } from '@atlasng/common';
|
|
3
|
+
|
|
4
|
+
/** Breadcrumb item */
|
|
5
|
+
interface BreadcrumbItem {
|
|
6
|
+
/** Name of item */
|
|
7
|
+
name: string;
|
|
8
|
+
/** Command to execute when the breadcrumb is clicked */
|
|
9
|
+
command?: AnyLinkCommand;
|
|
10
|
+
}
|
|
11
|
+
declare class Breadcrumbs {
|
|
12
|
+
/** Crumbs to display */
|
|
13
|
+
readonly items: _angular_core.InputSignal<BreadcrumbItem[]>;
|
|
14
|
+
/** Separator to display between crumbs */
|
|
15
|
+
readonly separator: _angular_core.InputSignal<string>;
|
|
16
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Breadcrumbs, never>;
|
|
17
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Breadcrumbs, "ang-breadcrumbs", never, { "items": { "alias": "items"; "required": true; "isSignal": true; }; "separator": { "alias": "separator"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { Breadcrumbs };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { MatMenuPanel } from '@angular/material/menu';
|
|
3
|
+
import { AnyLinkCommand } from '@atlasng/common';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Display a help icon button that either opens a menu or a link in a new tab.
|
|
7
|
+
*/
|
|
8
|
+
declare class HelpButton {
|
|
9
|
+
/** Optional menu attached to the help button trigger. */
|
|
10
|
+
readonly menu: _angular_core.InputSignal<MatMenuPanel<unknown> | undefined>;
|
|
11
|
+
/** Optional destination used when the help button acts as a link. */
|
|
12
|
+
readonly link: _angular_core.InputSignal<AnyLinkCommand>;
|
|
13
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HelpButton, never>;
|
|
14
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<HelpButton, "ang-help-button", never, { "menu": { "alias": "menu"; "required": false; "isSignal": true; }; "link": { "alias": "link"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { HelpButton };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
|
|
3
|
+
declare class NavigationToggle {
|
|
4
|
+
/** Whether the button is currently selected */
|
|
5
|
+
readonly selected: i0.ModelSignal<boolean>;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NavigationToggle, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NavigationToggle, "ang-navigation-toggle", never, { "selected": { "alias": "selected"; "required": false; "isSignal": true; }; }, { "selected": "selectedChange"; }, never, ["*"], true, never>;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { NavigationToggle };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { AnyLinkCommand } from '@atlasng/common';
|
|
3
|
+
|
|
4
|
+
declare class NavigationButton {
|
|
5
|
+
/** The link to navigate to */
|
|
6
|
+
readonly link: i0.InputSignal<AnyLinkCommand>;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NavigationButton, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NavigationButton, "ang-navigation-button", never, { "link": { "alias": "link"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { NavigationButton };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { Provider } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Definition for a single social media button.
|
|
6
|
+
*
|
|
7
|
+
* Rendering supports two icon strategies:
|
|
8
|
+
* - Set `icon` to render a `mat-icon` using `[svgIcon]`.
|
|
9
|
+
* - Omit `icon` and set `classes` so CSS can apply a mask icon
|
|
10
|
+
* (for example one of the built-in class names).
|
|
11
|
+
*/
|
|
12
|
+
interface SocialMediaButtonDef {
|
|
13
|
+
/** Key used for `id`-based lookup. */
|
|
14
|
+
id: string;
|
|
15
|
+
/** Accessible label for the anchor button. */
|
|
16
|
+
label: string;
|
|
17
|
+
/** Destination URL for the external social media link. */
|
|
18
|
+
url: string;
|
|
19
|
+
/** CSS classes applied to the icon element. Can be used to create a mask icon instead of an SVG icon. */
|
|
20
|
+
classes?: string | string[];
|
|
21
|
+
/** Svg icon name registered with `MatIconRegistry` to render within the button. */
|
|
22
|
+
icon?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Registers custom button definitions for `id`-based resolution.
|
|
26
|
+
*
|
|
27
|
+
* @param defs Array of button definitions to register.
|
|
28
|
+
* @return Provider to include in the application module or component providers.
|
|
29
|
+
*/
|
|
30
|
+
declare function provideSocialMediaButtons(defs: SocialMediaButtonDef[]): Provider;
|
|
31
|
+
declare class SocialMediaButton {
|
|
32
|
+
/** Identifier used to resolve a definition from injected or built-in sets. */
|
|
33
|
+
readonly id: _angular_core.InputSignal<string | undefined>;
|
|
34
|
+
/** Explicit definition with precedence over any `id`-based resolution. */
|
|
35
|
+
readonly def: _angular_core.InputSignal<SocialMediaButtonDef | undefined>;
|
|
36
|
+
/** Resolved definition from either `def` input or `id` lookup. */
|
|
37
|
+
protected readonly resolvedDef: _angular_core.Signal<SocialMediaButtonDef>;
|
|
38
|
+
/** Optional custom definitions provided via dependency injection. */
|
|
39
|
+
private readonly defs;
|
|
40
|
+
/**
|
|
41
|
+
* Yields candidate definitions in precedence order:
|
|
42
|
+
* 1) explicit `def` input
|
|
43
|
+
* 2) injected definition matching `id`
|
|
44
|
+
* 3) built-in definition matching `id`
|
|
45
|
+
*
|
|
46
|
+
* In dev mode, missing inputs or unresolved `id` will throw.
|
|
47
|
+
*/
|
|
48
|
+
private getDefCandidates;
|
|
49
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SocialMediaButton, never>;
|
|
50
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SocialMediaButton, "ang-social-media-button", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "def": { "alias": "def"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export { SocialMediaButton, provideSocialMediaButtons };
|
|
54
|
+
export type { SocialMediaButtonDef };
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { OutputEmitterRef } from '@angular/core';
|
|
3
|
+
import { AnyLinkCommand } from '@atlasng/common';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Marks projected logo content inside the cookie banner.
|
|
7
|
+
*/
|
|
8
|
+
declare class CookieBannerLogo {
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CookieBannerLogo, never>;
|
|
10
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CookieBannerLogo, "ang-cookie-banner-logo, [angCookieBannerLogo]", never, {}, {}, never, never, true, never>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Marks projected title content and guarantees it has an id for aria labelling.
|
|
14
|
+
*/
|
|
15
|
+
declare class CookieBannerTitle {
|
|
16
|
+
/**
|
|
17
|
+
* Id used for accessibility. Generates a default id if not provided.
|
|
18
|
+
*/
|
|
19
|
+
readonly id: i0.InputSignal<string>;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CookieBannerTitle, never>;
|
|
21
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CookieBannerTitle, "ang-cookie-banner-title, [angCookieBannerTitle]", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Marks projected description content inside the cookie banner.
|
|
25
|
+
*/
|
|
26
|
+
declare class CookieBannerDescription {
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CookieBannerDescription, never>;
|
|
28
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CookieBannerDescription, "ang-cookie-banner-description, [angCookieBannerDescription]", never, {}, {}, never, never, true, never>;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Marks a projected action element and optionally closes the banner when clicked.
|
|
32
|
+
*/
|
|
33
|
+
declare class CookieBannerAction {
|
|
34
|
+
/**
|
|
35
|
+
* When true, this action requests closing the banner after click.
|
|
36
|
+
*/
|
|
37
|
+
readonly closeOnClick: i0.InputSignal<boolean>;
|
|
38
|
+
/** Reference to the parent cookie banner. */
|
|
39
|
+
private readonly banner;
|
|
40
|
+
/**
|
|
41
|
+
* Closes the parent banner only when both action-level and banner-level
|
|
42
|
+
* closeOnClick settings are enabled.
|
|
43
|
+
*/
|
|
44
|
+
protected handleClick(): void;
|
|
45
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CookieBannerAction, never>;
|
|
46
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CookieBannerAction, "ang-cookie-banner-action, [angCookieBannerAction]", never, { "closeOnClick": { "alias": "closeOnClick"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Cookie consent banner.
|
|
50
|
+
*
|
|
51
|
+
* Supports projected title/description/action content, emits user intent events,
|
|
52
|
+
* and can auto-close when users activate action buttons.
|
|
53
|
+
*/
|
|
54
|
+
declare class CookieBanner {
|
|
55
|
+
/**
|
|
56
|
+
* Controls whether the banner is visible.
|
|
57
|
+
*/
|
|
58
|
+
readonly opened: i0.ModelSignal<boolean>;
|
|
59
|
+
/**
|
|
60
|
+
* Optional privacy policy link configuration.
|
|
61
|
+
*/
|
|
62
|
+
readonly privacyPolicy: i0.InputSignal<AnyLinkCommand>;
|
|
63
|
+
/**
|
|
64
|
+
* Global close behavior for built-in click handlers.
|
|
65
|
+
*/
|
|
66
|
+
readonly closeOnClick: i0.InputSignal<boolean>;
|
|
67
|
+
/** Emits when the user accepts all cookies. */
|
|
68
|
+
readonly allowAll: OutputEmitterRef<void>;
|
|
69
|
+
/** Emits when the user accepts only necessary cookies. */
|
|
70
|
+
readonly allowNecessary: OutputEmitterRef<void>;
|
|
71
|
+
/** Emits when the user chooses to customize cookie settings. */
|
|
72
|
+
readonly customize: OutputEmitterRef<void>;
|
|
73
|
+
/**
|
|
74
|
+
* Id used by aria-labelledby. Falls back to a generated id if no title directive is projected.
|
|
75
|
+
*/
|
|
76
|
+
protected readonly titleId: i0.Signal<string>;
|
|
77
|
+
/** Reference to the projected title directive. */
|
|
78
|
+
private readonly titleDir;
|
|
79
|
+
/** Reference to the id generator. */
|
|
80
|
+
private readonly idGenerator;
|
|
81
|
+
/** Renderer used to update host/container classes and inline CSS variables. */
|
|
82
|
+
private readonly renderer;
|
|
83
|
+
/**
|
|
84
|
+
* External element that receives spacing and animation classes.
|
|
85
|
+
* Falls back to document body when no explicit container directive is projected.
|
|
86
|
+
*/
|
|
87
|
+
private readonly containerEl;
|
|
88
|
+
/** Native host element of this banner instance. */
|
|
89
|
+
private readonly el;
|
|
90
|
+
/** Current measured banner block size in pixels. */
|
|
91
|
+
private readonly height;
|
|
92
|
+
/** Initializes the cookie banner. */
|
|
93
|
+
constructor();
|
|
94
|
+
/**
|
|
95
|
+
* Open the banner.
|
|
96
|
+
*/
|
|
97
|
+
open(): void;
|
|
98
|
+
/**
|
|
99
|
+
* Close the banner.
|
|
100
|
+
*/
|
|
101
|
+
close(): void;
|
|
102
|
+
/**
|
|
103
|
+
* Emits the selected action and closes the banner when closeOnClick is enabled.
|
|
104
|
+
*
|
|
105
|
+
* @param ref Emitter associated with the selected banner action.
|
|
106
|
+
*/
|
|
107
|
+
protected handleClick(ref: OutputEmitterRef<void>): void;
|
|
108
|
+
/**
|
|
109
|
+
* Handles the end of an animation event.
|
|
110
|
+
*
|
|
111
|
+
* @param event The animation event.
|
|
112
|
+
*/
|
|
113
|
+
protected handleAnimationEnd(event: AnimationEvent): void;
|
|
114
|
+
/**
|
|
115
|
+
* Registers container-level classes/styles and ensures they are removed on destroy.
|
|
116
|
+
*/
|
|
117
|
+
private initializeContainer;
|
|
118
|
+
/**
|
|
119
|
+
* Observes host size changes and updates the container spacing CSS variable.
|
|
120
|
+
*/
|
|
121
|
+
private monitorHeight;
|
|
122
|
+
/**
|
|
123
|
+
* Applies open/closed animation classes to both container and host elements.
|
|
124
|
+
*
|
|
125
|
+
* @param classes Animation class token to apply.
|
|
126
|
+
*/
|
|
127
|
+
private setAnimationClasses;
|
|
128
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CookieBanner, never>;
|
|
129
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CookieBanner, "ang-cookie-banner", never, { "opened": { "alias": "opened"; "required": false; "isSignal": true; }; "privacyPolicy": { "alias": "privacyPolicy"; "required": false; "isSignal": true; }; "closeOnClick": { "alias": "closeOnClick"; "required": false; "isSignal": true; }; }, { "opened": "openedChange"; "allowAll": "allowAll"; "allowNecessary": "allowNecessary"; "customize": "customize"; }, ["titleDir"], ["ang-cookie-banner-logo, [angCookieBannerLogo]", "ang-cookie-banner-title, [angCookieBannerTitle]", "*", "ang-cookie-banner-action, [angCookieBannerAction]"], true, never>;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export { CookieBanner, CookieBannerAction, CookieBannerDescription, CookieBannerLogo, CookieBannerTitle };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* End of Results Indicator Component
|
|
5
|
+
*/
|
|
6
|
+
declare class EndOfResultsIndicator {
|
|
7
|
+
/** Label text placed before the results count */
|
|
8
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
9
|
+
/** Description placed after the results count in it's own text box */
|
|
10
|
+
readonly description: _angular_core.InputSignal<string>;
|
|
11
|
+
/** Number of results */
|
|
12
|
+
readonly count: _angular_core.InputSignal<number>;
|
|
13
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EndOfResultsIndicator, never>;
|
|
14
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EndOfResultsIndicator, "ang-end-of-results-indicator", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "count": { "alias": "count"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { EndOfResultsIndicator };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Empty-state indicator shown when a results list has no matches.
|
|
5
|
+
*
|
|
6
|
+
* The component renders a short message and a clear action that
|
|
7
|
+
* consumers can wire to reset search or filter state.
|
|
8
|
+
*/
|
|
9
|
+
declare class NoResultsIndicator {
|
|
10
|
+
/** Message shown above the action button. */
|
|
11
|
+
readonly description: _angular_core.InputSignal<string>;
|
|
12
|
+
/** Button label used for the clear action. */
|
|
13
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
14
|
+
/** Emitted when the action button is clicked. */
|
|
15
|
+
readonly clearClick: _angular_core.OutputEmitterRef<void>;
|
|
16
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NoResultsIndicator, never>;
|
|
17
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NoResultsIndicator, "ang-no-results-indicator", never, { "description": { "alias": "description"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, { "clearClick": "clearClick"; }, never, never, true, never>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { NoResultsIndicator };
|