ngwr 15.7.0 → 15.9.0
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/button/styles/_index.scss +3 -1
- package/collapse/styles/_index.scss +55 -3
- package/fesm2022/ngwr-breadcrumbs.mjs +2 -2
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +2 -2
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-collapse-testing.mjs +8 -0
- package/fesm2022/ngwr-collapse-testing.mjs.map +1 -1
- package/fesm2022/ngwr-collapse.mjs +39 -3
- package/fesm2022/ngwr-collapse.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +7 -1
- package/fesm2022/ngwr-i18n.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +2 -2
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +2 -2
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +2 -2
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-sortable-list.mjs +2 -2
- package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +34 -7
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/input/styles/_index.scss +12 -3
- package/llms-full.txt +1 -1
- package/llms.txt +5 -3
- package/package.json +1 -1
- package/pagination/styles/_index.scss +8 -0
- package/schematics/migrations/v15/index.js +2 -2
- package/skills/ngwr/references/setup.md +8 -4
- package/styles/_reset.scss +131 -119
- package/table/styles/_index.scss +7 -1
- package/theme/styles/_focus.scss +6 -0
- package/types/ngwr-collapse-testing.d.ts +16 -0
- package/types/ngwr-collapse.d.ts +66 -37
- package/types/ngwr-i18n.d.ts +12 -0
- package/types/ngwr-table.d.ts +19 -7
- package/types/ngwr-version.d.ts +1 -1
|
@@ -5,7 +5,7 @@ import { InjectionToken } from "@angular/core";
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
7
7
|
*/
|
|
8
|
-
const NGWR_VERSION = "15.
|
|
8
|
+
const NGWR_VERSION = "15.9.0";
|
|
9
9
|
/**
|
|
10
10
|
* @license
|
|
11
11
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-version.mjs","names":[],"sources":["../../../projects/lib/version/version.ts","../../../projects/lib/version/version.token.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/**\n * The ngwr library version string, kept in sync with\n * `projects/lib/package.json` by `scripts/release/prepare.ts`.\n *\n * Prefer this over reading `package.json` at runtime — that requires a JSON\n * import or `require`, neither of which tree-shakes well in Angular builds.\n *\n * Distinct from `Version` exported by `@angular/core`, which reports the\n * loaded Angular runtime version (e.g. `'22.0.0'`), not ngwr's.\n */\nexport const NGWR_VERSION = '15.
|
|
1
|
+
{"version":3,"file":"ngwr-version.mjs","names":[],"sources":["../../../projects/lib/version/version.ts","../../../projects/lib/version/version.token.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/**\n * The ngwr library version string, kept in sync with\n * `projects/lib/package.json` by `scripts/release/prepare.ts`.\n *\n * Prefer this over reading `package.json` at runtime — that requires a JSON\n * import or `require`, neither of which tree-shakes well in Angular builds.\n *\n * Distinct from `Version` exported by `@angular/core`, which reports the\n * loaded Angular runtime version (e.g. `'22.0.0'`), not ngwr's.\n */\nexport const NGWR_VERSION = '15.9.0';\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { InjectionToken } from '@angular/core';\n\nimport { NGWR_VERSION } from './version';\n\n/**\n * Injection token holding the ngwr library version string.\n *\n * Default factory returns {@link NGWR_VERSION}. Override it in tests or in\n * apps that want to surface a custom build identifier.\n *\n * @example\n * ```ts\n * @Component({...})\n * export class FooterComponent {\n * readonly version = inject(NGWR_VERSION_TOKEN);\n * }\n * ```\n */\nexport const NGWR_VERSION_TOKEN = new InjectionToken<string>('NGWR_VERSION_TOKEN', {\n providedIn: 'root',\n factory: () => NGWR_VERSION,\n});\n"],"mappings":";;;;;;;AAiBA,MAAa,eAAe;;;;;;;ACQ5B,MAAa,qBAAqB,IAAI,eAAuB,sBAAsB;CACjF,YAAY;CACZ,eAAe;AAChB,CAAA"}
|
package/input/styles/_index.scss
CHANGED
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
--wr-input-placeholder: var(--wr-color-placeholder);
|
|
16
16
|
--wr-input-bg: var(--wr-color-surface);
|
|
17
17
|
--wr-input-border: var(--wr-border-base);
|
|
18
|
+
// The theme has no border-width token.
|
|
19
|
+
--wr-input-border-width: 1px;
|
|
18
20
|
--wr-input-radius: var(--wr-control-radius-md);
|
|
19
21
|
--wr-input-ring: transparent;
|
|
20
22
|
--wr-input-padding-y: var(--wr-control-padding-y-md);
|
|
@@ -22,6 +24,10 @@
|
|
|
22
24
|
--wr-input-font-family: var(--wr-font-family-base);
|
|
23
25
|
--wr-input-font-size: var(--wr-control-font-size-md);
|
|
24
26
|
--wr-input-line-height: var(--wr-control-line-height-md);
|
|
27
|
+
// What the border takes over 1px, given back by the padding so a thicker border
|
|
28
|
+
// grows inward and the content box stays put. Private, so a group can zero it
|
|
29
|
+
// whatever a consumer sets the hook to.
|
|
30
|
+
--_border-extra: calc(var(--wr-input-border-width) - 1px);
|
|
25
31
|
|
|
26
32
|
display: inline-block;
|
|
27
33
|
width: 100%;
|
|
@@ -29,13 +35,13 @@
|
|
|
29
35
|
appearance: none;
|
|
30
36
|
background: var(--wr-input-bg);
|
|
31
37
|
color: var(--wr-input-color);
|
|
32
|
-
border:
|
|
38
|
+
border: var(--wr-input-border-width) solid var(--wr-input-border);
|
|
33
39
|
@include theme.smooth-br(var(--wr-input-radius));
|
|
34
40
|
box-shadow: 0 0 0 3px var(--wr-input-ring);
|
|
35
41
|
outline: 0;
|
|
36
42
|
margin: 0;
|
|
37
|
-
padding: calc(var(--wr-input-padding-y) * var(--wr-density-y, 1))
|
|
38
|
-
calc(var(--wr-input-padding-x) * var(--wr-density-x, 1));
|
|
43
|
+
padding: max(0px, calc(var(--wr-input-padding-y) * var(--wr-density-y, 1) - var(--_border-extra)))
|
|
44
|
+
max(0px, calc(var(--wr-input-padding-x) * var(--wr-density-x, 1) - var(--_border-extra)));
|
|
39
45
|
font-family: var(--wr-input-font-family);
|
|
40
46
|
font-size: var(--wr-input-font-size);
|
|
41
47
|
line-height: var(--wr-input-line-height);
|
|
@@ -131,6 +137,9 @@
|
|
|
131
137
|
|
|
132
138
|
// Native input inside a group loses its own chrome.
|
|
133
139
|
.wr-input {
|
|
140
|
+
// The group draws the border, so the padding gives nothing back.
|
|
141
|
+
--_border-extra: 0px;
|
|
142
|
+
|
|
134
143
|
border: 0;
|
|
135
144
|
background: transparent;
|
|
136
145
|
box-shadow: none;
|
package/llms-full.txt
CHANGED
|
@@ -484,7 +484,7 @@
|
|
|
484
484
|
## ngwr/collapse
|
|
485
485
|
- import: `import { WrCollapse } from 'ngwr/collapse'`
|
|
486
486
|
- selector: `wr-accordion`, `wr-collapse-group`, `wr-collapse`
|
|
487
|
-
- exports: WrCollapse, WrCollapseGroup, WrAccordion, WR_COLLAPSE_GROUP, WrCollapseGroupContext, WrCollapseGroupMember
|
|
487
|
+
- exports: WrCollapse, WrCollapseGroup, WrAccordion, WR_COLLAPSE_GROUP, WrCollapseGroupContext, WrCollapseGroupMember, WrCollapseIndicator
|
|
488
488
|
- keywords: accordion
|
|
489
489
|
- A panel that opens and closes from its header.
|
|
490
490
|
|
package/llms.txt
CHANGED
|
@@ -92,9 +92,11 @@ service opens — `WrDialog.open()` needs `ngwr/dialog`, `WrToast.show()`
|
|
|
92
92
|
needs: `ngwr/reset`, `ngwr/grid`, `ngwr/typography-utilities`,
|
|
93
93
|
`ngwr/breakpoints` (mixins for your own SCSS) and `ngwr/animations` (keyframes
|
|
94
94
|
and animation classes).
|
|
95
|
-
`ngwr/
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
`ngwr/typography-utilities` and `ngwr/animations` load the theme, so they go
|
|
96
|
+
below a configured `@use 'ngwr/theme' with (…)` like any component line.
|
|
97
|
+
`ngwr/reset` reads theme tokens without loading the theme, so the app loads
|
|
98
|
+
`ngwr/theme` too; `@use 'ngwr/reset' with ($layer: 'reset')` puts its rules in
|
|
99
|
+
a cascade layer. Details: https://ngwr.dev/docs/installation
|
|
98
100
|
|
|
99
101
|
## Providers (main.ts)
|
|
100
102
|
|
package/package.json
CHANGED
|
@@ -146,6 +146,14 @@
|
|
|
146
146
|
&.wr-select {
|
|
147
147
|
--wr-select-min-width: 0;
|
|
148
148
|
}
|
|
149
|
+
|
|
150
|
+
// The select takes the pager's size, so its text matches the cells. Its
|
|
151
|
+
// height scale (22 / 30 / 36px) is not the cells' (28 / 32 / 40px), so the
|
|
152
|
+
// trigger is locked to the cell height the same way the buttons are.
|
|
153
|
+
.wr-select__trigger {
|
|
154
|
+
height: var(--wr-pagination-cell, 2rem);
|
|
155
|
+
padding-block: 0;
|
|
156
|
+
}
|
|
149
157
|
}
|
|
150
158
|
|
|
151
159
|
// Size variants — set the cell size; each button gets the matching [size].
|
|
@@ -779,7 +779,7 @@ const REPORTS = [
|
|
|
779
779
|
},
|
|
780
780
|
{
|
|
781
781
|
lead: "a sheet that now loads the theme above a configured `@use 'ngwr/theme' with (…)`",
|
|
782
|
-
body: '`ngwr/
|
|
782
|
+
body: '`ngwr/animations` and `ngwr/typography-utilities` load the theme now, and Sass configures a ' +
|
|
783
783
|
'module only at its first load, so the build stops with "This module was already loaded". Move them below ' +
|
|
784
784
|
"the configured `@use 'ngwr/theme'`.",
|
|
785
785
|
find: file => {
|
|
@@ -788,7 +788,7 @@ const REPORTS = [
|
|
|
788
788
|
const configured = /@use\s+['"]ngwr\/theme['"]\s+with\b/.exec(file.after);
|
|
789
789
|
if (!configured)
|
|
790
790
|
return [];
|
|
791
|
-
return at(file.after.slice(0, configured.index), /@(?:use|forward)\s+['"]ngwr\/(?:
|
|
791
|
+
return at(file.after.slice(0, configured.index), /@(?:use|forward)\s+['"]ngwr\/(?:animations|typography-utilities)['"]/);
|
|
792
792
|
},
|
|
793
793
|
},
|
|
794
794
|
{
|
|
@@ -66,10 +66,14 @@ No component needs these:
|
|
|
66
66
|
your own SCSS.
|
|
67
67
|
- `@use 'ngwr/animations';` — keyframes and animation classes.
|
|
68
68
|
|
|
69
|
-
`ngwr/
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
`ngwr/typography-utilities` and `ngwr/animations` load the theme, so like a
|
|
70
|
+
component line they go below a configured `@use 'ngwr/theme' with (…)`. Above
|
|
71
|
+
it the build fails with "This module was already loaded".
|
|
72
|
+
|
|
73
|
+
`ngwr/reset` reads the theme's tokens without loading the theme, so the app
|
|
74
|
+
loads `ngwr/theme` too. `@use 'ngwr/reset' with ($layer: 'reset')` puts its
|
|
75
|
+
rules in `@layer reset`, below unlayered styles and every layer declared
|
|
76
|
+
after it.
|
|
73
77
|
|
|
74
78
|
## Light and dark
|
|
75
79
|
|
package/styles/_reset.scss
CHANGED
|
@@ -1,137 +1,149 @@
|
|
|
1
|
-
// Opt-in CSS reset
|
|
2
|
-
//
|
|
3
|
-
// Apps that don't already have a reset (Tailwind preflight, normalize.css,
|
|
4
|
-
// etc.) can opt in via:
|
|
1
|
+
// Opt-in CSS reset: boxes, margins, form-element inheritance, a few link and
|
|
2
|
+
// list cleanups, and a heading scale read from the `--wr-text-*` tokens.
|
|
5
3
|
//
|
|
4
|
+
// @use 'ngwr/theme';
|
|
6
5
|
// @use 'ngwr/reset';
|
|
7
6
|
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
|
|
14
|
-
// for an inherited property means INHERIT. So each rule won the cascade over
|
|
15
|
-
// the UA stylesheet and then resolved to its parent: measured in Chromium, the
|
|
16
|
-
// bare sheet flattened `h1`–`h6` to 16px apiece where the browser alone gives
|
|
17
|
-
// 32 / 24 / 18.72 / 16 / 13.28 / 10.72, and turned `code` and `pre` from
|
|
18
|
-
// monospace into the body serif. Someone adding this for `box-sizing` lost
|
|
19
|
-
// their whole type scale and said nothing, because nothing in a build, a
|
|
20
|
-
// console or a test has an opinion about a `var()` that resolves to nothing.
|
|
21
|
-
// Sass deduplicates within one compilation, so an app that also loads the theme
|
|
22
|
-
// or any component pays nothing for this line — verified byte-identical.
|
|
23
|
-
@use '../theme/styles';
|
|
24
|
-
|
|
25
|
-
*,
|
|
26
|
-
*::before,
|
|
27
|
-
*::after {
|
|
28
|
-
box-sizing: border-box;
|
|
29
|
-
}
|
|
7
|
+
// It reads theme tokens without loading the theme, so the app loads it too:
|
|
8
|
+
// alone, each `var()` here computes to `unset`, headings flatten to 16px and
|
|
9
|
+
// `code` loses its monospace. `meta.load-css()` emits a module's dependencies
|
|
10
|
+
// where it is called, so a theme loaded here would land a second time in every
|
|
11
|
+
// layer the reset is loaded into.
|
|
12
|
+
@use 'sass:meta';
|
|
30
13
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
14
|
+
/// The cascade layer the rules go in, such as `'reset'` or `'base.reset'`:
|
|
15
|
+
/// `@use 'ngwr/reset' with ($layer: 'reset')`. `null` leaves them unlayered,
|
|
16
|
+
/// where an element rule like `button { background: none }` beats every
|
|
17
|
+
/// layered sheet whatever its specificity. The layer opens where the reset is
|
|
18
|
+
/// emitted, so it ranks below unlayered styles and every layer declared after it.
|
|
19
|
+
$layer: null !default;
|
|
37
20
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
min-height: 100vh;
|
|
41
|
-
font-family: var(--wr-font-family-base);
|
|
42
|
-
-webkit-font-smoothing: antialiased;
|
|
43
|
-
-moz-osx-font-smoothing: grayscale;
|
|
44
|
-
text-rendering: optimizeLegibility;
|
|
21
|
+
@if $layer != null and (meta.type-of($layer) != 'string' or $layer == '') {
|
|
22
|
+
@error 'ngwr/reset: `$layer` takes a cascade layer name, such as reset, not #{meta.inspect($layer)}.';
|
|
45
23
|
}
|
|
46
24
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
p,
|
|
54
|
-
figure,
|
|
55
|
-
blockquote,
|
|
56
|
-
dl,
|
|
57
|
-
dd {
|
|
58
|
-
margin: 0;
|
|
59
|
-
}
|
|
25
|
+
@mixin _rules {
|
|
26
|
+
*,
|
|
27
|
+
*::before,
|
|
28
|
+
*::after {
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
}
|
|
60
31
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
font-weight: var(--wr-font-weight-semibold);
|
|
68
|
-
line-height: var(--wr-leading-tight);
|
|
69
|
-
letter-spacing: var(--wr-tracking-tight);
|
|
70
|
-
text-wrap: balance;
|
|
71
|
-
}
|
|
32
|
+
html {
|
|
33
|
+
-webkit-text-size-adjust: 100%;
|
|
34
|
+
-moz-tab-size: 4;
|
|
35
|
+
tab-size: 4;
|
|
36
|
+
line-height: 1.5;
|
|
37
|
+
}
|
|
72
38
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
h4 {
|
|
83
|
-
font-size: var(--wr-text-xl);
|
|
84
|
-
}
|
|
85
|
-
h5 {
|
|
86
|
-
font-size: var(--wr-text-lg);
|
|
87
|
-
}
|
|
88
|
-
h6 {
|
|
89
|
-
font-size: var(--wr-text-base);
|
|
90
|
-
}
|
|
39
|
+
body {
|
|
40
|
+
margin: 0;
|
|
41
|
+
min-height: 100vh;
|
|
42
|
+
font-family: var(--wr-font-family-base);
|
|
43
|
+
-webkit-font-smoothing: antialiased;
|
|
44
|
+
-moz-osx-font-smoothing: grayscale;
|
|
45
|
+
text-rendering: optimizeLegibility;
|
|
46
|
+
}
|
|
91
47
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
48
|
+
h1,
|
|
49
|
+
h2,
|
|
50
|
+
h3,
|
|
51
|
+
h4,
|
|
52
|
+
h5,
|
|
53
|
+
h6,
|
|
54
|
+
p,
|
|
55
|
+
figure,
|
|
56
|
+
blockquote,
|
|
57
|
+
dl,
|
|
58
|
+
dd {
|
|
59
|
+
margin: 0;
|
|
60
|
+
}
|
|
96
61
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
62
|
+
h1,
|
|
63
|
+
h2,
|
|
64
|
+
h3,
|
|
65
|
+
h4,
|
|
66
|
+
h5,
|
|
67
|
+
h6 {
|
|
68
|
+
font-weight: var(--wr-font-weight-semibold);
|
|
69
|
+
line-height: var(--wr-leading-tight);
|
|
70
|
+
letter-spacing: var(--wr-tracking-tight);
|
|
71
|
+
text-wrap: balance;
|
|
72
|
+
}
|
|
103
73
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
74
|
+
h1 {
|
|
75
|
+
font-size: var(--wr-text-4xl);
|
|
76
|
+
}
|
|
77
|
+
h2 {
|
|
78
|
+
font-size: var(--wr-text-3xl);
|
|
79
|
+
}
|
|
80
|
+
h3 {
|
|
81
|
+
font-size: var(--wr-text-2xl);
|
|
82
|
+
}
|
|
83
|
+
h4 {
|
|
84
|
+
font-size: var(--wr-text-xl);
|
|
85
|
+
}
|
|
86
|
+
h5 {
|
|
87
|
+
font-size: var(--wr-text-lg);
|
|
88
|
+
}
|
|
89
|
+
h6 {
|
|
90
|
+
font-size: var(--wr-text-base);
|
|
91
|
+
}
|
|
108
92
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
display: block;
|
|
114
|
-
max-width: 100%;
|
|
115
|
-
}
|
|
93
|
+
p {
|
|
94
|
+
line-height: var(--wr-leading-normal);
|
|
95
|
+
text-wrap: pretty;
|
|
96
|
+
}
|
|
116
97
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
98
|
+
ul[role='list'],
|
|
99
|
+
ol[role='list'] {
|
|
100
|
+
list-style: none;
|
|
101
|
+
margin: 0;
|
|
102
|
+
padding: 0;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
a {
|
|
106
|
+
color: inherit;
|
|
107
|
+
text-decoration: none;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
img,
|
|
111
|
+
picture,
|
|
112
|
+
svg,
|
|
113
|
+
video {
|
|
114
|
+
display: block;
|
|
115
|
+
max-width: 100%;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
button,
|
|
119
|
+
input,
|
|
120
|
+
select,
|
|
121
|
+
textarea {
|
|
122
|
+
font: inherit;
|
|
123
|
+
color: inherit;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
button {
|
|
127
|
+
background: none;
|
|
128
|
+
border: 0;
|
|
129
|
+
padding: 0;
|
|
130
|
+
cursor: pointer;
|
|
131
|
+
}
|
|
124
132
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
133
|
+
code,
|
|
134
|
+
kbd,
|
|
135
|
+
samp,
|
|
136
|
+
pre {
|
|
137
|
+
font-family: var(--wr-font-family-mono);
|
|
138
|
+
}
|
|
130
139
|
}
|
|
131
140
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
141
|
+
@if $layer == null {
|
|
142
|
+
@include _rules;
|
|
143
|
+
} @else {
|
|
144
|
+
// The name is the consumer's, interpolated.
|
|
145
|
+
// stylelint-disable-next-line layer-name-pattern
|
|
146
|
+
@layer #{$layer} {
|
|
147
|
+
@include _rules;
|
|
148
|
+
}
|
|
137
149
|
}
|
package/table/styles/_index.scss
CHANGED
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
--wr-table-detail-padding: var(--wr-space-lg);
|
|
60
60
|
--wr-table-foot-cell-font-weight: var(--wr-font-weight-semibold);
|
|
61
61
|
--wr-table-empty-padding: var(--wr-space-xl);
|
|
62
|
-
--wr-table-pager-padding: var(--wr-space-md);
|
|
62
|
+
--wr-table-pager-padding: var(--wr-space-sm) var(--wr-space-md);
|
|
63
63
|
|
|
64
64
|
// Card mode (`--responsive` inside its own container query). Declared on the
|
|
65
65
|
// BASE rather than down in the `@container` block, because a custom property
|
|
@@ -584,6 +584,12 @@
|
|
|
584
584
|
padding: var(--wr-table-pager-padding);
|
|
585
585
|
border-top: 1px solid var(--wr-table-border);
|
|
586
586
|
background: var(--wr-table-head-bg);
|
|
587
|
+
|
|
588
|
+
// The pager's own block padding is for a pager standing alone. Here the
|
|
589
|
+
// strip already pads it, and the two added up to 20px above and below.
|
|
590
|
+
> .wr-pagination {
|
|
591
|
+
--wr-pagination-padding-block: 0;
|
|
592
|
+
}
|
|
587
593
|
}
|
|
588
594
|
|
|
589
595
|
&__loading {
|
package/theme/styles/_focus.scss
CHANGED
|
@@ -108,6 +108,12 @@
|
|
|
108
108
|
outline-offset: -2px;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
+
// A flat panel clips nothing and its header has no side padding, so the inset
|
|
112
|
+
// ring would sit on the title's first glyph: it goes back outside.
|
|
113
|
+
.wr-collapse--flat .wr-collapse__header:focus-visible {
|
|
114
|
+
outline-offset: var(--wr-focus-ring-offset);
|
|
115
|
+
}
|
|
116
|
+
|
|
111
117
|
// Command palette options
|
|
112
118
|
.wr-command-palette__option:focus-visible {
|
|
113
119
|
@include focus-ring;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from "@angular/cdk/testing";
|
|
2
|
+
import { WrCollapseIndicator } from "ngwr/collapse";
|
|
2
3
|
/** Narrows which `<wr-collapse>` a harness query matches. */
|
|
3
4
|
interface WrCollapseHarnessFilters extends BaseHarnessFilters {
|
|
4
5
|
/** Match the panel's header text — a string is an exact match, a RegExp is tested. */
|
|
@@ -95,6 +96,21 @@ export declare class WrCollapseHarness extends ComponentHarness {
|
|
|
95
96
|
* spec wants to know is whether the control is inert.
|
|
96
97
|
*/
|
|
97
98
|
isDisabled(): Promise<boolean>;
|
|
99
|
+
/**
|
|
100
|
+
* The header glyph (`indicator`): `'chevron'` or `'plus'`, from which element the
|
|
101
|
+
* header renders, since the two are different elements.
|
|
102
|
+
*
|
|
103
|
+
* Throws when the header holds neither rather than answering `'chevron'` by default:
|
|
104
|
+
* a header that lost its glyph would otherwise read as the default exactly when the
|
|
105
|
+
* glyph is what broke.
|
|
106
|
+
*/
|
|
107
|
+
getIndicator(): Promise<WrCollapseIndicator>;
|
|
108
|
+
/**
|
|
109
|
+
* Whether the panel is drawn flat (`[bordered]="false"`): no frame or background, rows
|
|
110
|
+
* split by a divider. Read from the public `wr-collapse--flat` modifier, which is
|
|
111
|
+
* styling and not state.
|
|
112
|
+
*/
|
|
113
|
+
isFlat(): Promise<boolean>;
|
|
98
114
|
/**
|
|
99
115
|
* The id the header's `aria-controls` names, or `null` when it names nothing.
|
|
100
116
|
*
|
package/types/ngwr-collapse.d.ts
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { InjectionToken, Signal } from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* @license
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* What a `<wr-collapse>` hands its parent group when it registers.
|
|
11
|
+
*
|
|
12
|
+
* A named export rather than the structural type it used to be spelled as. Both
|
|
13
|
+
* group components declared their OWN local `interface Member`, so d.ts
|
|
14
|
+
* flattening had two of one name to resolve and published the second as
|
|
15
|
+
* `Member$1` — a bundler-assigned identifier in the signature of a public method,
|
|
16
|
+
* which no consumer could import and nobody had authored.
|
|
17
|
+
*/
|
|
18
|
+
interface WrCollapseGroupMember {
|
|
19
|
+
/** Close this collapse — the group calls it on siblings in accordion mode. */
|
|
20
|
+
close(): void;
|
|
21
|
+
/** Identity of the registering collapse, used as the map key and by `notifyOpened`. */
|
|
22
|
+
readonly id: object;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Contract a collapse uses to talk to its parent `<wr-collapse-group>`.
|
|
26
|
+
*
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
interface WrCollapseGroupContext {
|
|
30
|
+
/** When true, only one child collapse may be open at a time. */
|
|
31
|
+
readonly accordion: Signal<boolean>;
|
|
32
|
+
/** Called by a child when it opens — closes siblings in accordion mode. */
|
|
33
|
+
notifyOpened(opener: object): void;
|
|
34
|
+
/** Register a child so the group can call `closeAll()` etc. */
|
|
35
|
+
register(member: WrCollapseGroupMember): void;
|
|
36
|
+
/** Unregister on destroy. */
|
|
37
|
+
unregister(memberId: object): void;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* @license
|
|
41
|
+
*
|
|
42
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
43
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
44
|
+
*/
|
|
45
|
+
/** The glyph at the end of a collapse header: a turning chevron, or a plus that becomes a minus. */
|
|
46
|
+
type WrCollapseIndicator = 'chevron' | 'plus';
|
|
3
47
|
/**
|
|
4
48
|
* Expandable panel with a clickable header. Two-way binds the `open`
|
|
5
49
|
* state. When wrapped in `<wr-collapse-group accordion>`, only one
|
|
@@ -26,6 +70,17 @@ export declare class WrCollapse {
|
|
|
26
70
|
readonly open: import("@angular/core").ModelSignal<boolean>;
|
|
27
71
|
/** Disable interaction. @default false */
|
|
28
72
|
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
73
|
+
/**
|
|
74
|
+
* Draws the frame, the panel background and the rounded corners. Turn it off for a
|
|
75
|
+
* flat list: no frame, rows split by a divider line between neighbours.
|
|
76
|
+
* @default true
|
|
77
|
+
*/
|
|
78
|
+
readonly bordered: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
79
|
+
/**
|
|
80
|
+
* The header glyph: `chevron` turns over, `plus` becomes a minus while open.
|
|
81
|
+
* @default 'chevron'
|
|
82
|
+
*/
|
|
83
|
+
readonly indicator: import("@angular/core").InputSignal<WrCollapseIndicator>;
|
|
29
84
|
/** Identity used by the parent group when tracking children. @internal */
|
|
30
85
|
readonly id: {
|
|
31
86
|
name: string;
|
|
@@ -59,46 +114,20 @@ export declare class WrCollapse {
|
|
|
59
114
|
"required": false;
|
|
60
115
|
"isSignal": true;
|
|
61
116
|
};
|
|
117
|
+
"bordered": {
|
|
118
|
+
"alias": "bordered";
|
|
119
|
+
"required": false;
|
|
120
|
+
"isSignal": true;
|
|
121
|
+
};
|
|
122
|
+
"indicator": {
|
|
123
|
+
"alias": "indicator";
|
|
124
|
+
"required": false;
|
|
125
|
+
"isSignal": true;
|
|
126
|
+
};
|
|
62
127
|
}, {
|
|
63
128
|
"open": "openChange";
|
|
64
129
|
}, never, ["*"], true, never>;
|
|
65
130
|
}
|
|
66
|
-
/**
|
|
67
|
-
* @license
|
|
68
|
-
*
|
|
69
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
70
|
-
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
71
|
-
*/
|
|
72
|
-
/**
|
|
73
|
-
* What a `<wr-collapse>` hands its parent group when it registers.
|
|
74
|
-
*
|
|
75
|
-
* A named export rather than the structural type it used to be spelled as. Both
|
|
76
|
-
* group components declared their OWN local `interface Member`, so d.ts
|
|
77
|
-
* flattening had two of one name to resolve and published the second as
|
|
78
|
-
* `Member$1` — a bundler-assigned identifier in the signature of a public method,
|
|
79
|
-
* which no consumer could import and nobody had authored.
|
|
80
|
-
*/
|
|
81
|
-
interface WrCollapseGroupMember {
|
|
82
|
-
/** Close this collapse — the group calls it on siblings in accordion mode. */
|
|
83
|
-
close(): void;
|
|
84
|
-
/** Identity of the registering collapse, used as the map key and by `notifyOpened`. */
|
|
85
|
-
readonly id: object;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Contract a collapse uses to talk to its parent `<wr-collapse-group>`.
|
|
89
|
-
*
|
|
90
|
-
* @internal
|
|
91
|
-
*/
|
|
92
|
-
interface WrCollapseGroupContext {
|
|
93
|
-
/** When true, only one child collapse may be open at a time. */
|
|
94
|
-
readonly accordion: Signal<boolean>;
|
|
95
|
-
/** Called by a child when it opens — closes siblings in accordion mode. */
|
|
96
|
-
notifyOpened(opener: object): void;
|
|
97
|
-
/** Register a child so the group can call `closeAll()` etc. */
|
|
98
|
-
register(member: WrCollapseGroupMember): void;
|
|
99
|
-
/** Unregister on destroy. */
|
|
100
|
-
unregister(memberId: object): void;
|
|
101
|
-
}
|
|
102
131
|
/**
|
|
103
132
|
* Visual + behavioral grouping of `<wr-collapse>` children. When
|
|
104
133
|
* `accordion` is true, opening one child closes the others.
|
|
@@ -159,4 +188,4 @@ export declare class WrAccordion implements WrCollapseGroupContext {
|
|
|
159
188
|
* @internal
|
|
160
189
|
*/
|
|
161
190
|
export declare const WR_COLLAPSE_GROUP: InjectionToken<WrCollapseGroupContext>;
|
|
162
|
-
export type { WrCollapseGroupContext, WrCollapseGroupMember };
|
|
191
|
+
export type { WrCollapseGroupContext, WrCollapseGroupMember, WrCollapseIndicator };
|
package/types/ngwr-i18n.d.ts
CHANGED
|
@@ -351,6 +351,18 @@ export declare class WrI18nHttpLoader implements WrI18nLoader {
|
|
|
351
351
|
interface ProvideWrI18nOptions extends WrI18nConfig {
|
|
352
352
|
readonly loader?: WrI18nLoader;
|
|
353
353
|
}
|
|
354
|
+
/**
|
|
355
|
+
* Configure {@link WrI18n} for the application.
|
|
356
|
+
*
|
|
357
|
+
* Call it in the application's root providers (`bootstrapApplication` or
|
|
358
|
+
* `ApplicationConfig`), together with {@link provideWrI18nBaseCatalogs} and the
|
|
359
|
+
* loader. `WrI18n` is a root service: a route's `providers` or a lazy module
|
|
360
|
+
* never reach it, so a locale or catalogs given there do nothing, and dev mode
|
|
361
|
+
* warns. A lazy area switches the language at runtime with
|
|
362
|
+
* `inject(WrI18n).use('de')`, for example in its resolver. The switch is
|
|
363
|
+
* app-wide, and the locale must be in the root `availableLocales`. The area's
|
|
364
|
+
* own keys load with `registerScope()`.
|
|
365
|
+
*/
|
|
354
366
|
export declare function provideWrI18n(options?: ProvideWrI18nOptions): EnvironmentProviders;
|
|
355
367
|
/**
|
|
356
368
|
* Provide a static loader — catalogs already in memory.
|