ngwr 15.3.0 → 15.5.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/bits/border-glow/styles/_rules.scss +60 -49
- package/bits/click-spark/click-spark.scss +5 -1
- package/bits/click-spark/styles/_index.scss +10 -15
- package/bits/click-spark/styles/_rules.scss +20 -0
- package/comment/styles/_index.scss +270 -0
- package/dialog/styles/_index.scss +6 -0
- package/fesm2022/ngwr-bits-aurora.mjs +108 -52
- package/fesm2022/ngwr-bits-aurora.mjs.map +1 -1
- package/fesm2022/ngwr-bits-border-glow-testing.mjs +8 -8
- package/fesm2022/ngwr-bits-border-glow-testing.mjs.map +1 -1
- package/fesm2022/ngwr-bits-border-glow.mjs +29 -26
- package/fesm2022/ngwr-bits-border-glow.mjs.map +1 -1
- package/fesm2022/ngwr-bits-dot-grid.mjs +11 -14
- package/fesm2022/ngwr-bits-dot-grid.mjs.map +1 -1
- package/fesm2022/ngwr-bits-fuzzy-text.mjs +18 -4
- package/fesm2022/ngwr-bits-fuzzy-text.mjs.map +1 -1
- package/fesm2022/ngwr-bits-ripple-grid.mjs +14 -13
- package/fesm2022/ngwr-bits-ripple-grid.mjs.map +1 -1
- package/fesm2022/ngwr-bits-splash-cursor.mjs +21 -10
- package/fesm2022/ngwr-bits-splash-cursor.mjs.map +1 -1
- package/fesm2022/ngwr-bits-waves.mjs +10 -15
- package/fesm2022/ngwr-bits-waves.mjs.map +1 -1
- package/fesm2022/ngwr-comment-testing.mjs +60 -0
- package/fesm2022/ngwr-comment-testing.mjs.map +1 -0
- package/fesm2022/ngwr-comment.mjs +516 -0
- package/fesm2022/ngwr-comment.mjs.map +1 -0
- package/fesm2022/ngwr-dialog-testing.mjs +14 -0
- package/fesm2022/ngwr-dialog-testing.mjs.map +1 -1
- package/fesm2022/ngwr-dialog.mjs +293 -134
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-drawer.mjs +2 -0
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-editor.mjs +1 -1
- package/fesm2022/ngwr-hotkey.mjs +86 -6
- package/fesm2022/ngwr-hotkey.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ar.mjs +19 -0
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +19 -0
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +19 -0
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +19 -0
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +19 -0
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +19 -0
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +19 -0
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +19 -0
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +19 -0
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +19 -0
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +19 -0
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +19 -0
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +19 -0
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +19 -0
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +19 -0
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +19 -0
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +19 -0
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +19 -0
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +19 -0
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +19 -0
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +19 -0
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +19 -0
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
- package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +109 -12
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-keyboard.mjs +78 -18
- package/fesm2022/ngwr-keyboard.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +162 -51
- package/fesm2022/ngwr-pipes.mjs.map +1 -1
- package/fesm2022/ngwr-platform.mjs +134 -2
- package/fesm2022/ngwr-platform.mjs.map +1 -1
- package/fesm2022/ngwr-schema-form.mjs +2 -1
- package/fesm2022/ngwr-schema-form.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-statistic.mjs +11 -16
- package/fesm2022/ngwr-statistic.mjs.map +1 -1
- package/fesm2022/ngwr-storage.mjs +54 -33
- package/fesm2022/ngwr-storage.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +90 -34
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-transfer.mjs +1 -1
- package/fesm2022/ngwr-utils-router.mjs +165 -0
- package/fesm2022/ngwr-utils-router.mjs.map +1 -0
- package/fesm2022/ngwr-utils.mjs +311 -3
- package/fesm2022/ngwr-utils.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/i18n/ar.json +19 -0
- package/i18n/cs.json +19 -0
- package/i18n/de.json +19 -0
- package/i18n/en.json +19 -0
- package/i18n/es.json +19 -0
- package/i18n/fr.json +19 -0
- package/i18n/he.json +19 -0
- package/i18n/hi.json +19 -0
- package/i18n/id.json +19 -0
- package/i18n/it.json +19 -0
- package/i18n/ja.json +19 -0
- package/i18n/ko.json +19 -0
- package/i18n/nl.json +19 -0
- package/i18n/pl.json +19 -0
- package/i18n/pt.json +19 -0
- package/i18n/ru.json +19 -0
- package/i18n/sv.json +19 -0
- package/i18n/tr.json +19 -0
- package/i18n/uk.json +19 -0
- package/i18n/vi.json +19 -0
- package/i18n/zh-TW.json +19 -0
- package/i18n/zh.json +19 -0
- package/llms-full.txt +32 -16
- package/package.json +14 -1
- package/schematics/use/symbol-map.json +3 -0
- package/skills/ngwr/SKILL.md +4 -2
- package/skills/ngwr/references/catalog.md +3 -0
- package/table/styles/_index.scss +17 -0
- package/types/ngwr-badge.d.ts +2 -2
- package/types/ngwr-bits-aurora.d.ts +24 -2
- package/types/ngwr-bits-border-glow-testing.d.ts +9 -5
- package/types/ngwr-bits-border-glow.d.ts +10 -4
- package/types/ngwr-bits-fuzzy-text.d.ts +2 -1
- package/types/ngwr-bits-ripple-grid.d.ts +7 -2
- package/types/ngwr-bits-splash-cursor.d.ts +2 -1
- package/types/ngwr-button.d.ts +1 -1
- package/types/ngwr-comment-testing.d.ts +90 -0
- package/types/ngwr-comment.d.ts +304 -0
- package/types/ngwr-dialog-testing.d.ts +7 -0
- package/types/ngwr-dialog.d.ts +109 -6
- package/types/ngwr-divider.d.ts +1 -1
- package/types/ngwr-drawer.d.ts +1 -1
- package/types/ngwr-hotkey.d.ts +60 -3
- package/types/ngwr-image-cropper.d.ts +1 -1
- package/types/ngwr-input-number-testing.d.ts +5 -0
- package/types/ngwr-input-number.d.ts +91 -12
- package/types/ngwr-keyboard.d.ts +28 -1
- package/types/ngwr-pipes.d.ts +142 -32
- package/types/ngwr-platform.d.ts +73 -7
- package/types/ngwr-popconfirm.d.ts +2 -2
- package/types/ngwr-progress.d.ts +1 -1
- package/types/ngwr-select.d.ts +19 -13
- package/types/ngwr-skeleton.d.ts +1 -1
- package/types/ngwr-storage.d.ts +33 -3
- package/types/ngwr-table.d.ts +145 -44
- package/types/ngwr-utils-router.d.ts +95 -0
- package/types/ngwr-utils.d.ts +262 -2
- package/types/ngwr-version.d.ts +1 -1
|
@@ -2,12 +2,37 @@
|
|
|
2
2
|
// All visual state is driven by two custom properties the component writes:
|
|
3
3
|
// --wr-border-glow-edge-proximity 0..100, scales with pointer-to-edge distance
|
|
4
4
|
// --wr-border-glow-angle 0deg..360deg, pointer-from-centre angle
|
|
5
|
-
// Plus a colour/geometry bag set once from inputs (see border-glow.ts).
|
|
5
|
+
// Plus a colour/geometry bag set once from inputs (see border-glow.ts). The three
|
|
6
|
+
// colour inputs write an `--wr-border-glow-input-*` twin of the hook they stand
|
|
7
|
+
// in for, never the hook itself, and every read below prefers the twin.
|
|
6
8
|
|
|
7
9
|
.wr-border-glow {
|
|
8
10
|
--wr-border-glow-edge-proximity: 0;
|
|
9
11
|
--wr-border-glow-angle: 45deg;
|
|
10
|
-
//
|
|
12
|
+
// The card fill: the theme surface, unless an app sets this or `[backgroundColor]`.
|
|
13
|
+
--wr-border-glow-bg: var(--wr-color-surface);
|
|
14
|
+
// What `[backgroundColor]`, `[glowColor]` and `[colors]` write on the host, which
|
|
15
|
+
// the inline value beats. Unset here so a card projected inside another one does
|
|
16
|
+
// not inherit the outer card's inputs — and twins rather than the hooks' own
|
|
17
|
+
// names, so a `--wr-border-glow-bg` an author set on the host stays there and is
|
|
18
|
+
// read again the moment the input is unset.
|
|
19
|
+
--wr-border-glow-input-bg: initial;
|
|
20
|
+
--wr-border-glow-input-color: initial;
|
|
21
|
+
--wr-border-glow-input-color-60: initial;
|
|
22
|
+
--wr-border-glow-input-color-50: initial;
|
|
23
|
+
--wr-border-glow-input-color-40: initial;
|
|
24
|
+
--wr-border-glow-input-color-30: initial;
|
|
25
|
+
--wr-border-glow-input-color-20: initial;
|
|
26
|
+
--wr-border-glow-input-color-10: initial;
|
|
27
|
+
--wr-border-glow-input-gradient-one: initial;
|
|
28
|
+
--wr-border-glow-input-gradient-two: initial;
|
|
29
|
+
--wr-border-glow-input-gradient-three: initial;
|
|
30
|
+
--wr-border-glow-input-gradient-four: initial;
|
|
31
|
+
--wr-border-glow-input-gradient-five: initial;
|
|
32
|
+
--wr-border-glow-input-gradient-six: initial;
|
|
33
|
+
--wr-border-glow-input-gradient-seven: initial;
|
|
34
|
+
--wr-border-glow-input-gradient-base: initial;
|
|
35
|
+
// Theme-default halo (`[glowColor]` writes the `-input-` twins beside it): a deep
|
|
11
36
|
// amber that reads on white, the pale pastel on dark.
|
|
12
37
|
--wr-border-glow-color: light-dark(hsl(40deg 90% 45% / 100%), hsl(40deg 80% 80% / 100%));
|
|
13
38
|
--wr-border-glow-color-60: light-dark(hsl(40deg 90% 45% / 60%), hsl(40deg 80% 80% / 60%));
|
|
@@ -16,8 +41,8 @@
|
|
|
16
41
|
--wr-border-glow-color-30: light-dark(hsl(40deg 90% 45% / 30%), hsl(40deg 80% 80% / 30%));
|
|
17
42
|
--wr-border-glow-color-20: light-dark(hsl(40deg 90% 45% / 20%), hsl(40deg 80% 80% / 20%));
|
|
18
43
|
--wr-border-glow-color-10: light-dark(hsl(40deg 90% 45% / 10%), hsl(40deg 80% 80% / 10%));
|
|
19
|
-
// Theme-default mesh palette (
|
|
20
|
-
// tones that read on white, the reactbits pastels on dark. The geometry is
|
|
44
|
+
// Theme-default mesh palette (`[colors]` writes the `-input-` twins beside it):
|
|
45
|
+
// deep tones that read on white, the reactbits pastels on dark. The geometry is
|
|
21
46
|
// the same in both schemes, so only the one colour stop of each layer moves.
|
|
22
47
|
--wr-border-glow-gradient-one: radial-gradient(
|
|
23
48
|
at 80% 55%,
|
|
@@ -63,19 +88,19 @@
|
|
|
63
88
|
// so an inline `[glowColor]` reaches every layer of it.
|
|
64
89
|
/* stylelint-disable-next-line */
|
|
65
90
|
--wr-border-glow-edge-shadow:
|
|
66
|
-
inset 0 0 0 1px var(--wr-border-glow-color),
|
|
67
|
-
inset 0 0 1px 0 light-dark(transparent, var(--wr-border-glow-color-60)),
|
|
68
|
-
inset 0 0 3px 0 light-dark(transparent, var(--wr-border-glow-color-50)),
|
|
69
|
-
inset 0 0 6px 0 light-dark(transparent, var(--wr-border-glow-color-40)),
|
|
70
|
-
inset 0 0 15px 0 light-dark(transparent, var(--wr-border-glow-color-30)),
|
|
71
|
-
inset 0 0 25px 2px light-dark(transparent, var(--wr-border-glow-color-20)),
|
|
72
|
-
inset 0 0 50px 2px light-dark(transparent, var(--wr-border-glow-color-10)),
|
|
73
|
-
0 0 1px 0 var(--wr-border-glow-color-60),
|
|
74
|
-
0 0 3px 0 var(--wr-border-glow-color-50),
|
|
75
|
-
0 0 6px 0 var(--wr-border-glow-color-40),
|
|
76
|
-
0 0 15px 0 var(--wr-border-glow-color-30),
|
|
77
|
-
0 0 25px 2px var(--wr-border-glow-color-20),
|
|
78
|
-
0 0 50px 2px var(--wr-border-glow-color-10);
|
|
91
|
+
inset 0 0 0 1px var(--wr-border-glow-input-color, var(--wr-border-glow-color)),
|
|
92
|
+
inset 0 0 1px 0 light-dark(transparent, var(--wr-border-glow-input-color-60, var(--wr-border-glow-color-60))),
|
|
93
|
+
inset 0 0 3px 0 light-dark(transparent, var(--wr-border-glow-input-color-50, var(--wr-border-glow-color-50))),
|
|
94
|
+
inset 0 0 6px 0 light-dark(transparent, var(--wr-border-glow-input-color-40, var(--wr-border-glow-color-40))),
|
|
95
|
+
inset 0 0 15px 0 light-dark(transparent, var(--wr-border-glow-input-color-30, var(--wr-border-glow-color-30))),
|
|
96
|
+
inset 0 0 25px 2px light-dark(transparent, var(--wr-border-glow-input-color-20, var(--wr-border-glow-color-20))),
|
|
97
|
+
inset 0 0 50px 2px light-dark(transparent, var(--wr-border-glow-input-color-10, var(--wr-border-glow-color-10))),
|
|
98
|
+
0 0 1px 0 var(--wr-border-glow-input-color-60, var(--wr-border-glow-color-60)),
|
|
99
|
+
0 0 3px 0 var(--wr-border-glow-input-color-50, var(--wr-border-glow-color-50)),
|
|
100
|
+
0 0 6px 0 var(--wr-border-glow-input-color-40, var(--wr-border-glow-color-40)),
|
|
101
|
+
0 0 15px 0 var(--wr-border-glow-input-color-30, var(--wr-border-glow-color-30)),
|
|
102
|
+
0 0 25px 2px var(--wr-border-glow-input-color-20, var(--wr-border-glow-color-20)),
|
|
103
|
+
0 0 50px 2px var(--wr-border-glow-input-color-10, var(--wr-border-glow-color-10));
|
|
79
104
|
// Blend modes and a strength are not colours, so `light-dark()` cannot switch
|
|
80
105
|
// them, and each value below is the one that holds up in both schemes. The
|
|
81
106
|
// additive look dark used — `plus-lighter` on the halo, `soft-light` on the
|
|
@@ -100,7 +125,7 @@
|
|
|
100
125
|
position: relative;
|
|
101
126
|
display: grid;
|
|
102
127
|
border-radius: var(--wr-border-glow-radius);
|
|
103
|
-
background: var(--wr-border-glow-bg, var(--wr-
|
|
128
|
+
background: var(--wr-border-glow-input-bg, var(--wr-border-glow-bg));
|
|
104
129
|
overflow: visible;
|
|
105
130
|
isolation: isolate;
|
|
106
131
|
transform: translate3d(0, 0, 0.01px); // create a new layer to keep blends tidy
|
|
@@ -137,23 +162,16 @@
|
|
|
137
162
|
&::before {
|
|
138
163
|
border: 1px solid transparent;
|
|
139
164
|
background:
|
|
140
|
-
linear-gradient(var(--wr-border-glow-bg, var(--wr-
|
|
165
|
+
linear-gradient(var(--wr-border-glow-input-bg, var(--wr-border-glow-bg)) 0 100%) padding-box,
|
|
141
166
|
linear-gradient(rgb(255 255 255 / 0%) 0 100%) border-box,
|
|
142
|
-
var(--wr-border-glow-gradient-one,
|
|
143
|
-
|
|
144
|
-
var(--wr-border-glow-gradient-
|
|
145
|
-
|
|
146
|
-
var(--wr-border-glow-gradient-
|
|
147
|
-
|
|
148
|
-
var(--wr-border-glow-gradient-
|
|
149
|
-
|
|
150
|
-
var(--wr-border-glow-gradient-five, radial-gradient(at 86% 85%, hsl(186deg 100% 74%) 0px, transparent 50%))
|
|
151
|
-
border-box,
|
|
152
|
-
var(--wr-border-glow-gradient-six, radial-gradient(at 82% 18%, hsl(52deg 100% 65%) 0px, transparent 50%))
|
|
153
|
-
border-box,
|
|
154
|
-
var(--wr-border-glow-gradient-seven, radial-gradient(at 51% 4%, hsl(12deg 100% 72%) 0px, transparent 50%))
|
|
155
|
-
border-box,
|
|
156
|
-
var(--wr-border-glow-gradient-base, linear-gradient(#c299ff 0 100%)) border-box;
|
|
167
|
+
var(--wr-border-glow-input-gradient-one, var(--wr-border-glow-gradient-one)) border-box,
|
|
168
|
+
var(--wr-border-glow-input-gradient-two, var(--wr-border-glow-gradient-two)) border-box,
|
|
169
|
+
var(--wr-border-glow-input-gradient-three, var(--wr-border-glow-gradient-three)) border-box,
|
|
170
|
+
var(--wr-border-glow-input-gradient-four, var(--wr-border-glow-gradient-four)) border-box,
|
|
171
|
+
var(--wr-border-glow-input-gradient-five, var(--wr-border-glow-gradient-five)) border-box,
|
|
172
|
+
var(--wr-border-glow-input-gradient-six, var(--wr-border-glow-gradient-six)) border-box,
|
|
173
|
+
var(--wr-border-glow-input-gradient-seven, var(--wr-border-glow-gradient-seven)) border-box,
|
|
174
|
+
var(--wr-border-glow-input-gradient-base, var(--wr-border-glow-gradient-base)) border-box;
|
|
157
175
|
|
|
158
176
|
opacity: calc(
|
|
159
177
|
(var(--wr-border-glow-edge-proximity) - var(--wr-border-glow-color-sensitivity)) /
|
|
@@ -173,21 +191,14 @@
|
|
|
173
191
|
&::after {
|
|
174
192
|
border: 1px solid transparent;
|
|
175
193
|
background:
|
|
176
|
-
var(--wr-border-glow-gradient-one,
|
|
177
|
-
|
|
178
|
-
var(--wr-border-glow-gradient-
|
|
179
|
-
|
|
180
|
-
var(--wr-border-glow-gradient-
|
|
181
|
-
|
|
182
|
-
var(--wr-border-glow-gradient-
|
|
183
|
-
|
|
184
|
-
var(--wr-border-glow-gradient-five, radial-gradient(at 86% 85%, hsl(186deg 100% 74%) 0px, transparent 50%))
|
|
185
|
-
padding-box,
|
|
186
|
-
var(--wr-border-glow-gradient-six, radial-gradient(at 82% 18%, hsl(52deg 100% 65%) 0px, transparent 50%))
|
|
187
|
-
padding-box,
|
|
188
|
-
var(--wr-border-glow-gradient-seven, radial-gradient(at 51% 4%, hsl(12deg 100% 72%) 0px, transparent 50%))
|
|
189
|
-
padding-box,
|
|
190
|
-
var(--wr-border-glow-gradient-base, linear-gradient(#c299ff 0 100%)) padding-box;
|
|
194
|
+
var(--wr-border-glow-input-gradient-one, var(--wr-border-glow-gradient-one)) padding-box,
|
|
195
|
+
var(--wr-border-glow-input-gradient-two, var(--wr-border-glow-gradient-two)) padding-box,
|
|
196
|
+
var(--wr-border-glow-input-gradient-three, var(--wr-border-glow-gradient-three)) padding-box,
|
|
197
|
+
var(--wr-border-glow-input-gradient-four, var(--wr-border-glow-gradient-four)) padding-box,
|
|
198
|
+
var(--wr-border-glow-input-gradient-five, var(--wr-border-glow-gradient-five)) padding-box,
|
|
199
|
+
var(--wr-border-glow-input-gradient-six, var(--wr-border-glow-gradient-six)) padding-box,
|
|
200
|
+
var(--wr-border-glow-input-gradient-seven, var(--wr-border-glow-gradient-seven)) padding-box,
|
|
201
|
+
var(--wr-border-glow-input-gradient-base, var(--wr-border-glow-gradient-base)) padding-box;
|
|
191
202
|
|
|
192
203
|
mask-image:
|
|
193
204
|
linear-gradient(to bottom, black, black), radial-gradient(ellipse at 50% 50%, black 40%, transparent 65%),
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
// Component-scoped, but the lib uses `ViewEncapsulation.None` everywhere so
|
|
2
|
+
// the selector starts with `.wr-click-spark` — the same as the public Sass
|
|
3
|
+
// entry. Forwards the rules alone: `styles/_index.scss` is the entry that
|
|
4
|
+
// loads the theme, and a `styleUrl` is its own compilation.
|
|
5
|
+
@forward './styles/rules';
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
// Public Sass entry for `@use 'ngwr/bits/click-spark'`.
|
|
2
|
+
//
|
|
3
|
+
// Loads the theme although `_rules` reads no token: the component strokes its
|
|
4
|
+
// sparks in `sparkColor`, whose default is `var(--wr-color-on-surface)` resolved
|
|
5
|
+
// against the canvas, so an app that writes this one `@use` still has the token
|
|
6
|
+
// the default paints with. `click-spark.scss` — the component's `styleUrl` —
|
|
7
|
+
// forwards `_rules` and nothing else, so the compiled component styles carry this
|
|
8
|
+
// component's own CSS and no second copy of the theme layer.
|
|
9
|
+
@use '../../../theme/styles';
|
|
6
10
|
|
|
7
|
-
|
|
8
|
-
position: absolute;
|
|
9
|
-
inset: 0;
|
|
10
|
-
width: 100%;
|
|
11
|
-
height: 100%;
|
|
12
|
-
pointer-events: none;
|
|
13
|
-
user-select: none;
|
|
14
|
-
z-index: 1;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
11
|
+
@forward 'rules';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Click spark — canvas overlay that ignores pointer events so projected
|
|
2
|
+
// children stay interactive. The sparks themselves are stroked in
|
|
3
|
+
// `click-spark.ts`, in `sparkColor`, which defaults to `var(--wr-color-on-surface)`
|
|
4
|
+
// and is resolved against the canvas: the token is read from TypeScript rather than
|
|
5
|
+
// from a rule here, which is why `_index.scss` loads the theme for a sheet that
|
|
6
|
+
// names no token itself.
|
|
7
|
+
.wr-click-spark {
|
|
8
|
+
position: relative;
|
|
9
|
+
display: block;
|
|
10
|
+
|
|
11
|
+
&__canvas {
|
|
12
|
+
position: absolute;
|
|
13
|
+
inset: 0;
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 100%;
|
|
16
|
+
pointer-events: none;
|
|
17
|
+
user-select: none;
|
|
18
|
+
z-index: 1;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
@use '../../theme/styles' as theme;
|
|
2
|
+
|
|
3
|
+
// Styles for the entry points this component's own markup renders.
|
|
4
|
+
//
|
|
5
|
+
// v15 removed the `@use 'ngwr'` umbrella: a consumer writes one `@use` per
|
|
6
|
+
// component they place, and never learns about the ones a component places
|
|
7
|
+
// INSIDE itself. Sass deduplicates `@use` within a compilation, so an app that
|
|
8
|
+
// also loads one of these by hand still emits it once.
|
|
9
|
+
@use '../../button/styles' as button-styles; // WrButton
|
|
10
|
+
@use '../../textarea/styles' as textarea-styles; // WrTextarea
|
|
11
|
+
|
|
12
|
+
.wr-comment {
|
|
13
|
+
--wr-comment-gap: var(--wr-space-md);
|
|
14
|
+
--wr-comment-head-gap: var(--wr-space-sm);
|
|
15
|
+
--wr-comment-body-gap: var(--wr-space-xs);
|
|
16
|
+
--wr-comment-actions-gap: var(--wr-space-sm);
|
|
17
|
+
--wr-comment-font-family: var(--wr-font-family-base);
|
|
18
|
+
--wr-comment-font-size: var(--wr-text-sm);
|
|
19
|
+
--wr-comment-line-height: var(--wr-text-sm-leading);
|
|
20
|
+
--wr-comment-author-color: var(--wr-color-on-surface);
|
|
21
|
+
--wr-comment-author-font-weight: var(--wr-font-weight-semibold);
|
|
22
|
+
--wr-comment-time-color: var(--wr-color-on-surface-muted);
|
|
23
|
+
--wr-comment-time-font-size: var(--wr-text-xs);
|
|
24
|
+
--wr-comment-body-color: var(--wr-color-on-surface);
|
|
25
|
+
// Replies: how far one level steps in, and the room between them.
|
|
26
|
+
--wr-comment-indent: var(--wr-space-xl);
|
|
27
|
+
--wr-comment-replies-gap: var(--wr-space-lg);
|
|
28
|
+
--wr-comment-replies-margin-top: var(--wr-space-lg);
|
|
29
|
+
// Bubble variant. The reader's own side is a filled intent with its
|
|
30
|
+
// `-contrast` label; the other side is a neutral fill with surface text.
|
|
31
|
+
--wr-comment-bubble-bg: var(--wr-color-fill);
|
|
32
|
+
--wr-comment-bubble-color: var(--wr-color-on-surface);
|
|
33
|
+
--wr-comment-bubble-time-color: var(--wr-color-on-surface-muted);
|
|
34
|
+
--wr-comment-bubble-radius: var(--wr-border-radius-lg);
|
|
35
|
+
--wr-comment-bubble-padding-y: var(--wr-space-sm);
|
|
36
|
+
--wr-comment-bubble-padding-x: var(--wr-space-md);
|
|
37
|
+
--wr-comment-bubble-max-width: 80%;
|
|
38
|
+
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-wrap: wrap;
|
|
41
|
+
align-items: flex-start;
|
|
42
|
+
gap: var(--wr-comment-gap);
|
|
43
|
+
// Claim the full row even when nested in a flex-row demo wrapper.
|
|
44
|
+
flex: 1 1 100%;
|
|
45
|
+
width: 100%;
|
|
46
|
+
min-width: 0;
|
|
47
|
+
font-family: var(--wr-comment-font-family);
|
|
48
|
+
font-size: var(--wr-comment-font-size);
|
|
49
|
+
line-height: var(--wr-comment-line-height);
|
|
50
|
+
color: var(--wr-comment-body-color);
|
|
51
|
+
|
|
52
|
+
&__avatar {
|
|
53
|
+
flex: 0 0 auto;
|
|
54
|
+
display: flex;
|
|
55
|
+
|
|
56
|
+
&:empty {
|
|
57
|
+
display: none;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&__main {
|
|
62
|
+
flex: 1 1 0;
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-direction: column;
|
|
65
|
+
gap: var(--wr-comment-body-gap);
|
|
66
|
+
min-width: 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&__head {
|
|
70
|
+
display: flex;
|
|
71
|
+
flex-wrap: wrap;
|
|
72
|
+
align-items: baseline;
|
|
73
|
+
gap: var(--wr-comment-head-gap);
|
|
74
|
+
min-width: 0;
|
|
75
|
+
|
|
76
|
+
&:empty {
|
|
77
|
+
display: none;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&__author {
|
|
82
|
+
color: var(--wr-comment-author-color);
|
|
83
|
+
font-weight: var(--wr-comment-author-font-weight);
|
|
84
|
+
overflow-wrap: anywhere;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&__time {
|
|
88
|
+
color: var(--wr-comment-time-color);
|
|
89
|
+
font-size: var(--wr-comment-time-font-size);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&__body {
|
|
93
|
+
min-width: 0;
|
|
94
|
+
// A pasted URL or a token with no break opportunity would otherwise push
|
|
95
|
+
// the row past its column.
|
|
96
|
+
overflow-wrap: anywhere;
|
|
97
|
+
// Text from the composer holds the lines Shift+Enter made.
|
|
98
|
+
white-space: pre-line;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&__actions {
|
|
102
|
+
display: flex;
|
|
103
|
+
flex-wrap: wrap;
|
|
104
|
+
align-items: center;
|
|
105
|
+
gap: var(--wr-comment-actions-gap);
|
|
106
|
+
|
|
107
|
+
&:empty {
|
|
108
|
+
display: none;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&__replies {
|
|
113
|
+
flex: 1 1 100%;
|
|
114
|
+
display: flex;
|
|
115
|
+
flex-direction: column;
|
|
116
|
+
gap: var(--wr-comment-replies-gap);
|
|
117
|
+
margin-top: var(--wr-comment-replies-margin-top);
|
|
118
|
+
padding-inline-start: var(--wr-comment-indent);
|
|
119
|
+
min-width: 0;
|
|
120
|
+
|
|
121
|
+
&:empty {
|
|
122
|
+
display: none;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// The third level and deeper sit flush with their parent: each step takes
|
|
126
|
+
// the indent plus an avatar column, and a phone has no body width left to
|
|
127
|
+
// give after two.
|
|
128
|
+
.wr-comment__replies .wr-comment__replies {
|
|
129
|
+
padding-inline-start: 0;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// One step on a phone: the second level is flush too.
|
|
134
|
+
@media (max-width: 480px) {
|
|
135
|
+
&__replies .wr-comment__replies {
|
|
136
|
+
padding-inline-start: 0;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// Bubble variant: the body is a chat bubble, the head sits inside it, and the
|
|
141
|
+
// whole row leans to one inline side. Logical properties and `row-reverse`
|
|
142
|
+
// only, so `dir="rtl"` mirrors the log on its own.
|
|
143
|
+
&--bubble {
|
|
144
|
+
flex-wrap: nowrap;
|
|
145
|
+
|
|
146
|
+
.wr-comment__main {
|
|
147
|
+
flex: 0 1 auto;
|
|
148
|
+
max-width: var(--wr-comment-bubble-max-width);
|
|
149
|
+
gap: 0;
|
|
150
|
+
padding: var(--wr-comment-bubble-padding-y) var(--wr-comment-bubble-padding-x);
|
|
151
|
+
background: var(--wr-comment-bubble-bg);
|
|
152
|
+
color: var(--wr-comment-bubble-color);
|
|
153
|
+
@include theme.smooth-br(var(--wr-comment-bubble-radius));
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.wr-comment__head {
|
|
157
|
+
gap: var(--wr-comment-head-gap);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.wr-comment__author {
|
|
161
|
+
color: inherit;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.wr-comment__time {
|
|
165
|
+
color: var(--wr-comment-bubble-time-color);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.wr-comment__actions {
|
|
169
|
+
margin-top: var(--wr-comment-body-gap);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
&--end {
|
|
174
|
+
--wr-comment-bubble-bg: var(--wr-color-primary);
|
|
175
|
+
--wr-comment-bubble-color: var(--wr-color-primary-contrast);
|
|
176
|
+
--wr-comment-bubble-time-color: var(--wr-color-primary-contrast);
|
|
177
|
+
|
|
178
|
+
flex-direction: row-reverse;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.wr-comment-composer {
|
|
183
|
+
--wr-comment-composer-bg: var(--wr-color-surface);
|
|
184
|
+
--wr-comment-composer-border: var(--wr-border-base);
|
|
185
|
+
--wr-comment-composer-ring: transparent;
|
|
186
|
+
--wr-comment-composer-radius: var(--wr-control-radius-md);
|
|
187
|
+
--wr-comment-composer-gap: var(--wr-space-xs);
|
|
188
|
+
--wr-comment-composer-padding: var(--wr-space-xs);
|
|
189
|
+
// 36px: one row of the md field (20px line, 8px padding a side) less its
|
|
190
|
+
// border, so the button sits inside the row it sends.
|
|
191
|
+
--wr-comment-composer-send-size: 2.25rem;
|
|
192
|
+
|
|
193
|
+
display: flex;
|
|
194
|
+
align-items: flex-end;
|
|
195
|
+
gap: var(--wr-comment-composer-gap);
|
|
196
|
+
// Claim the full row even when nested in a flex-row demo wrapper.
|
|
197
|
+
flex: 1 1 100%;
|
|
198
|
+
width: 100%;
|
|
199
|
+
min-width: 0;
|
|
200
|
+
padding: var(--wr-comment-composer-padding);
|
|
201
|
+
background: var(--wr-comment-composer-bg);
|
|
202
|
+
border: 1px solid var(--wr-comment-composer-border);
|
|
203
|
+
@include theme.smooth-br(var(--wr-comment-composer-radius));
|
|
204
|
+
box-shadow: 0 0 0 3px var(--wr-comment-composer-ring);
|
|
205
|
+
transition:
|
|
206
|
+
border-color var(--wr-transition-base),
|
|
207
|
+
box-shadow var(--wr-transition-base);
|
|
208
|
+
|
|
209
|
+
// The frame carries the focus state, so the field inside draws none of its
|
|
210
|
+
// own: no border, no ring, no fill, in every state.
|
|
211
|
+
&:focus-within {
|
|
212
|
+
--wr-comment-composer-border: var(--wr-color-primary);
|
|
213
|
+
--wr-comment-composer-ring: color-mix(in srgb, var(--wr-color-primary) 15%, transparent);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
&--disabled {
|
|
217
|
+
--wr-comment-composer-bg: var(--wr-color-fill);
|
|
218
|
+
|
|
219
|
+
cursor: not-allowed;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
&--readonly {
|
|
223
|
+
--wr-comment-composer-bg: var(--wr-color-fill);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
&__field {
|
|
227
|
+
flex: 1 1 auto;
|
|
228
|
+
min-width: 0;
|
|
229
|
+
|
|
230
|
+
&.wr-textarea,
|
|
231
|
+
&.wr-textarea--focused,
|
|
232
|
+
&.wr-textarea--disabled,
|
|
233
|
+
&.wr-textarea--readonly {
|
|
234
|
+
--wr-textarea-bg: transparent;
|
|
235
|
+
--wr-textarea-border: transparent;
|
|
236
|
+
--wr-textarea-ring: transparent;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
&__actions {
|
|
241
|
+
flex: 0 0 auto;
|
|
242
|
+
display: flex;
|
|
243
|
+
align-items: center;
|
|
244
|
+
gap: var(--wr-comment-composer-gap);
|
|
245
|
+
|
|
246
|
+
&:empty {
|
|
247
|
+
display: none;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
&__send {
|
|
252
|
+
flex: 0 0 auto;
|
|
253
|
+
width: var(--wr-comment-composer-send-size);
|
|
254
|
+
height: var(--wr-comment-composer-send-size);
|
|
255
|
+
padding: 0;
|
|
256
|
+
|
|
257
|
+
@include theme.touch-target;
|
|
258
|
+
|
|
259
|
+
.wr-icon__svg {
|
|
260
|
+
display: block;
|
|
261
|
+
width: 1.125rem;
|
|
262
|
+
height: 1.125rem;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// The glyph points toward the inline end, so it turns with the direction.
|
|
266
|
+
[dir='rtl'] & .wr-icon__svg {
|
|
267
|
+
transform: scaleX(-1);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
@use '../../theme/styles' as theme;
|
|
2
2
|
|
|
3
|
+
// Styles for the entry point this component's own markup renders: `confirm()`
|
|
4
|
+
// mounts two `wr-btn`, and a consumer who writes `@use 'ngwr/dialog'` never
|
|
5
|
+
// learns about them. Sass deduplicates `@use`, so an app that also loads the
|
|
6
|
+
// button by hand still emits it once.
|
|
7
|
+
@use '../../button/styles' as button-styles; // WrButton
|
|
8
|
+
|
|
3
9
|
// CDK Overlay base styles are usually loaded once by the consumer.
|
|
4
10
|
// We re-emit the minimal `cdk-overlay-*` rules so a standalone `@use
|
|
5
11
|
// 'ngwr/dialog'` works without manually pulling CDK's prebuilt CSS.
|