@newtone-dev/ui-react-web 0.13.0 → 0.15.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.
@@ -116,10 +116,10 @@
116
116
  --newtone-control-primary-rest-text: var(--newtone-on-media-control-rest-text);
117
117
  --newtone-control-primary-rest-border: transparent;
118
118
  --newtone-control-primary-hover-fill: var(--newtone-on-media-control-hover-fill);
119
- --newtone-control-primary-hover-text: var(--newtone-on-media-control-rest-text);
119
+ --newtone-control-primary-hover-text: var(--newtone-on-media-control-hover-text);
120
120
  --newtone-control-primary-hover-border: transparent;
121
121
  --newtone-control-primary-pressed-fill: var(--newtone-on-media-control-pressed-fill);
122
- --newtone-control-primary-pressed-text: var(--newtone-on-media-control-rest-text);
122
+ --newtone-control-primary-pressed-text: var(--newtone-on-media-control-pressed-text);
123
123
  --newtone-control-primary-pressed-border: transparent;
124
124
  --newtone-control-primary-disabled-fill: var(--newtone-on-media-control-rest-fill);
125
125
  --newtone-control-primary-disabled-text: var(--newtone-on-media-control-rest-text);
@@ -130,20 +130,64 @@
130
130
  --newtone-control-secondary-rest-text: var(--newtone-on-media-control-rest-text);
131
131
  --newtone-control-secondary-rest-border: transparent;
132
132
  --newtone-control-secondary-hover-fill: var(--newtone-on-media-control-hover-fill);
133
- --newtone-control-secondary-hover-text: var(--newtone-on-media-control-rest-text);
133
+ --newtone-control-secondary-hover-text: var(--newtone-on-media-control-hover-text);
134
134
  --newtone-control-secondary-hover-border: transparent;
135
135
  --newtone-control-secondary-pressed-fill: var(--newtone-on-media-control-pressed-fill);
136
- --newtone-control-secondary-pressed-text: var(--newtone-on-media-control-rest-text);
136
+ --newtone-control-secondary-pressed-text: var(--newtone-on-media-control-pressed-text);
137
137
  --newtone-control-secondary-pressed-border: transparent;
138
138
  --newtone-control-secondary-disabled-fill: var(--newtone-on-media-control-rest-fill);
139
139
  --newtone-control-secondary-disabled-text: var(--newtone-on-media-control-rest-text);
140
140
  --newtone-control-secondary-disabled-border: transparent;
141
141
  --newtone-control-secondary-focus-ring: var(--newtone-on-media-focus-ring);
142
142
 
143
+ /* The ring's gradient, by state, from 0.15.0: rest here, hover and pressed below. */
144
+ --_on-media-rim: var(--newtone-on-media-control-rest-border);
145
+
143
146
  -webkit-backdrop-filter: blur(16px);
144
147
  backdrop-filter: blur(16px);
145
148
  }
146
149
 
150
+ .newtone-on-media-control:hover {
151
+ --_on-media-rim: var(--newtone-on-media-control-hover-border);
152
+ }
153
+
154
+ .newtone-on-media-control:active {
155
+ --_on-media-rim: var(--newtone-on-media-control-pressed-border);
156
+ }
157
+
158
+ /* THE RIM, FROM 0.14.0 (2026-09-29) -- "maybe a gradient border from 75% white on the top to 50% black
159
+ * on the bottom." The colour is the token `on-media.control.rest.border`, a `linear-gradient`, and a
160
+ * gradient cannot be a `border-color`; painted on the border box as a background it would show through
161
+ * the 45% fill. So it is a ring: a box 1px larger than the element on every side, painted with the
162
+ * gradient, with its content box masked away. It sits over the transparent 1px rim the box already
163
+ * draws, so nothing moves, and it takes no pointer. The disc below wears the same ring. Repo blueprint,
164
+ * section 3, *The disc and the control wear a gradient rim*. */
165
+ .newtone-on-media-control::before,
166
+ .newtone-on-media-disc::before {
167
+ content: '';
168
+ position: absolute;
169
+ inset: -1px;
170
+ padding: 1px;
171
+ border-radius: inherit;
172
+ /* The control's ring follows its state (0.15.0); the disc has no states, so it is rest. */
173
+ background: var(--_on-media-rim, var(--newtone-on-media-control-rest-border));
174
+ -webkit-mask:
175
+ linear-gradient(#000 0 0) content-box,
176
+ linear-gradient(#000 0 0);
177
+ -webkit-mask-composite: xor;
178
+ mask:
179
+ linear-gradient(#000 0 0) content-box exclude,
180
+ linear-gradient(#000 0 0);
181
+ pointer-events: none;
182
+ }
183
+
184
+ /* The ring needs a positioned box, and these two are often positioned already: a gallery's arrows and
185
+ * the lightbox's disc are `absolute`, at the same specificity as this sheet. So `relative` is written
186
+ * at none, and any class that places the box wins over it whatever the import order. */
187
+ :where(.newtone-on-media-control, .newtone-on-media-disc) {
188
+ position: relative;
189
+ }
190
+
147
191
  /* THE SAME DISC WITH NO PRESS IN IT, and it exists because of one element.
148
192
  *
149
193
  * `video-lightbox/`'s play disc is a `<span aria-hidden>` inside the tile's own `<button>` -- the
@@ -41,6 +41,13 @@
41
41
  pointer-events: none;
42
42
  }
43
43
 
44
+ /* The text is a block, from 0.14.0, so its lines are body-sm's own leading. As an inline span it sat in
45
+ the bubble's line box, whose height is inherited from wherever the tooltip is placed -- 24px in one
46
+ caller, 0px in another. components/tooltip.md. */
47
+ .newtone-tooltip-bubble > .newtone-text {
48
+ display: block;
49
+ }
50
+
44
51
  /* The corner bridge: a diagonal move from the trigger crosses the one point where the two boxes meet,
45
52
  which hit-testing puts in neither (a box's right and bottom edges are outside it), and hover would
46
53
  drop there. A 12px square straddling the tail corner, 8px out over the trigger box's empty corner and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newtone-dev/ui-react-web",
3
- "version": "0.13.0",
3
+ "version": "0.15.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",