@giddaa-housing/ui 3.6.0 → 3.7.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/css/generated/shared.css +1 -1
- package/css/theme.css +11 -8
- package/dist/calendar.js +1 -1
- package/dist/{combobox-CACVdp1R.js → combobox-D70DFHoM.js} +16 -3
- package/dist/combobox.js +1 -1
- package/dist/dialog.d.ts +4 -2
- package/dist/dialog.js +10 -11
- package/dist/infotip.js +0 -1
- package/dist/input-group.js +5 -5
- package/dist/match.d.ts +11 -2
- package/dist/match.js +49 -32
- package/dist/media-player.js +3 -3
- package/dist/mobile-sidebar.js +7 -7
- package/dist/phone-input.d.ts +18 -1
- package/dist/phone-input.js +133 -64
- package/dist/rating.d.ts +60 -0
- package/dist/rating.js +187 -0
- package/dist/select.js +38 -3
- package/dist/sheet.d.ts +3 -1
- package/dist/sheet.js +10 -11
- package/dist/sonar.d.ts +3 -1
- package/dist/sonar.js +116 -28
- package/dist/styles.css +126 -22
- package/dist/video-player-dialog.js +1 -1
- package/package.json +5 -1
- package/dist/dialog-nesting.d.ts +0 -9
- package/dist/dialog-nesting.js +0 -27
package/dist/sonar.d.ts
CHANGED
|
@@ -44,7 +44,9 @@ type SonarProps = React.ComponentProps<"span"> & VariantProps<typeof sonarWaveVa
|
|
|
44
44
|
* child.
|
|
45
45
|
*
|
|
46
46
|
* The rings are painted with `box-shadow` spread, which lives outside the
|
|
47
|
-
* element's box, so an ancestor with `overflow: hidden` will clip them.
|
|
47
|
+
* element's box, so an ancestor with `overflow: hidden` will clip them. They
|
|
48
|
+
* sit behind the child with its shape punched out of them, so nothing paints
|
|
49
|
+
* inside it whatever background — or none — the child has of its own.
|
|
48
50
|
*/
|
|
49
51
|
declare function Sonar({ className, children, active, waves, size, tone, radius, style, ...props }: SonarProps): React.JSX.Element;
|
|
50
52
|
//#endregion
|
package/dist/sonar.js
CHANGED
|
@@ -18,13 +18,56 @@ const SQUARE = {
|
|
|
18
18
|
borderBottomLeftRadius: "0px"
|
|
19
19
|
};
|
|
20
20
|
function sameCorners(a, b) {
|
|
21
|
-
|
|
21
|
+
if (a === null || b === null) return a === b;
|
|
22
|
+
return a.borderTopLeftRadius === b.borderTopLeftRadius && a.borderTopRightRadius === b.borderTopRightRadius && a.borderBottomRightRadius === b.borderBottomRightRadius && a.borderBottomLeftRadius === b.borderBottomLeftRadius;
|
|
23
|
+
}
|
|
24
|
+
function sameMetrics(a, b) {
|
|
25
|
+
return a !== null && a.scaleX === b.scaleX && a.scaleY === b.scaleY && sameCorners(a.corners, b.corners);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The ring is painted at its full travel and scaled *back*, so this is where it
|
|
29
|
+
* starts: small enough that its outer edge lands exactly on the child's own,
|
|
30
|
+
* with nothing showing yet. Growing from there to scale 1 moves that edge out
|
|
31
|
+
* by `spread` — the same distance the old spread animation moved it.
|
|
32
|
+
*
|
|
33
|
+
* Worked out per axis on purpose: one factor for both would move a 200x40
|
|
34
|
+
* button's ring five times further sideways than vertically, and equal travel
|
|
35
|
+
* on every side is the whole look.
|
|
36
|
+
*/
|
|
37
|
+
function startScale(extent, spread) {
|
|
38
|
+
if (extent <= 0) return 1;
|
|
39
|
+
return Math.round(extent / (extent + 2 * spread) * 1e3) / 1e3;
|
|
40
|
+
}
|
|
41
|
+
function readCorners(target) {
|
|
42
|
+
if (!target) return SQUARE;
|
|
43
|
+
const computed = getComputedStyle(target);
|
|
44
|
+
return {
|
|
45
|
+
borderTopLeftRadius: computed.borderTopLeftRadius,
|
|
46
|
+
borderTopRightRadius: computed.borderTopRightRadius,
|
|
47
|
+
borderBottomRightRadius: computed.borderBottomRightRadius,
|
|
48
|
+
borderBottomLeftRadius: computed.borderBottomLeftRadius
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* `--sonar-spread` is authored in rem, and `getComputedStyle` hands custom
|
|
53
|
+
* properties back as written rather than resolved to pixels, so this does the
|
|
54
|
+
* one conversion the token is ever written to need. Reading it from the DOM
|
|
55
|
+
* rather than the map below keeps a `[--sonar-spread:…]` override on the
|
|
56
|
+
* wrapper driving the travel as well as the ring.
|
|
57
|
+
*/
|
|
58
|
+
function spreadInPixels(host) {
|
|
59
|
+
const raw = getComputedStyle(host).getPropertyValue("--sonar-spread").trim();
|
|
60
|
+
const value = Number.parseFloat(raw);
|
|
61
|
+
if (!Number.isFinite(value)) return 10;
|
|
62
|
+
if (!raw.endsWith("rem")) return value;
|
|
63
|
+
const root = Number.parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
64
|
+
return value * (Number.isFinite(root) ? root : 16);
|
|
22
65
|
}
|
|
23
66
|
/**
|
|
24
67
|
* Colour rides on `currentColor` so the keyframe stays tone-agnostic: one set
|
|
25
68
|
* of keyframes, one class per tone.
|
|
26
69
|
*/
|
|
27
|
-
const sonarWaveVariants = cva(cn("pointer-events-none absolute inset-0 animate-sonar-wave will-change-[
|
|
70
|
+
const sonarWaveVariants = cva(cn("pointer-events-none absolute inset-0 animate-sonar-wave opacity-0 shadow-[0_0_0_var(--sonar-spread,0.625rem)_currentColor] will-change-[transform,opacity] [backface-visibility:hidden]", "motion-reduce:animate-none motion-reduce:opacity-40 motion-reduce:shadow-[0_0_0_2px_currentColor]"), {
|
|
28
71
|
variants: { tone: {
|
|
29
72
|
brand: "text-fg-brand",
|
|
30
73
|
info: "text-status-info",
|
|
@@ -35,9 +78,46 @@ const sonarWaveVariants = cva(cn("pointer-events-none absolute inset-0 animate-s
|
|
|
35
78
|
defaultVariants: { tone: "brand" }
|
|
36
79
|
});
|
|
37
80
|
/**
|
|
81
|
+
* The cut-out the rings are painted through: everything from the child's own
|
|
82
|
+
* edge out to one `--sonar-spread`, and nothing inside it.
|
|
83
|
+
*
|
|
84
|
+
* A ring is painted at full spread and scaled back to start, which means that
|
|
85
|
+
* early in its travel it lies *within* the child rather than around it. Behind
|
|
86
|
+
* a child with a background of its own that goes unseen, but through an outline
|
|
87
|
+
* button it is a band sweeping across the middle. The child's shape is punched
|
|
88
|
+
* out of the rings here instead, so what shows is only ever the halo.
|
|
89
|
+
*
|
|
90
|
+
* A transparent border, rather than padding, because it is the padding box that
|
|
91
|
+
* absolutely positioned rings are laid out against: this way the border box is
|
|
92
|
+
* the far edge of the travel, the padding box is the child, and each ring can
|
|
93
|
+
* go on being `inset-0`. CSS shrinks the corner radii between the two boxes by
|
|
94
|
+
* the border width on its own, so the hole traces the child's corners exactly.
|
|
95
|
+
*/
|
|
96
|
+
const sonarRingsClass = cn("pointer-events-none absolute -z-10 [inset:calc(var(--sonar-spread,0.625rem)*-1)] [border:var(--sonar-spread,0.625rem)_solid_transparent]", "[mask-image:linear-gradient(#000,#000),linear-gradient(#000,#000)] [mask-clip:border-box,padding-box] [mask-composite:exclude]");
|
|
97
|
+
/**
|
|
98
|
+
* The child's corner, grown by one spread, for the box the cut-out is measured
|
|
99
|
+
* off. Written per token because a computed radius can be elliptical ("8px
|
|
100
|
+
* 4px") or, from the `radius` prop, a whole shorthand — each length grows, and
|
|
101
|
+
* the "/" between horizontal and vertical radii is passed through untouched.
|
|
102
|
+
*/
|
|
103
|
+
function growRadius(value) {
|
|
104
|
+
return value.trim().split(/\s+/).map((token) => token === "/" ? token : `calc(${token} + var(--sonar-spread, 0.625rem))`).join(" ");
|
|
105
|
+
}
|
|
106
|
+
/** The same shape as the rings, one spread wider on every side. */
|
|
107
|
+
function grownShape(shape) {
|
|
108
|
+
return Object.fromEntries(Object.entries(shape).map(([property, value]) => [property, growRadius(String(value))]));
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
38
111
|
* Rings evenly spaced across one cycle, so the last finishes just as the first
|
|
39
112
|
* comes round again. Doubles as each ring's key — the offsets are distinct by
|
|
40
113
|
* construction, which an index would only pretend to be.
|
|
114
|
+
*
|
|
115
|
+
* Applied as *negative* delays, which start every ring on the first frame at a
|
|
116
|
+
* different point in the cycle rather than holding it still until its turn
|
|
117
|
+
* comes round. A ring waiting out a positive delay shows the style it is
|
|
118
|
+
* animating from — here a finished, full-spread, fully opaque ring — so the
|
|
119
|
+
* sonar would open on a solid halo and snap into motion three quarters of a
|
|
120
|
+
* second later.
|
|
41
121
|
*/
|
|
42
122
|
function waveDelays(waves) {
|
|
43
123
|
return Array.from({ length: waves }, (_, index) => Math.round(index * SONAR_DURATION_MS / waves));
|
|
@@ -63,54 +143,62 @@ const sonarSpread = {
|
|
|
63
143
|
* child.
|
|
64
144
|
*
|
|
65
145
|
* The rings are painted with `box-shadow` spread, which lives outside the
|
|
66
|
-
* element's box, so an ancestor with `overflow: hidden` will clip them.
|
|
146
|
+
* element's box, so an ancestor with `overflow: hidden` will clip them. They
|
|
147
|
+
* sit behind the child with its shape punched out of them, so nothing paints
|
|
148
|
+
* inside it whatever background — or none — the child has of its own.
|
|
67
149
|
*/
|
|
68
150
|
function Sonar({ className, children, active = true, waves = 2, size, tone, radius, style, ...props }) {
|
|
69
151
|
const resolvedSize = useComponentSize(size);
|
|
70
152
|
const ref = React.useRef(null);
|
|
71
|
-
const [
|
|
153
|
+
const [metrics, setMetrics] = React.useState(null);
|
|
72
154
|
React.useEffect(() => {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
setCorners(SQUARE);
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
155
|
+
const host = ref.current;
|
|
156
|
+
if (!host || !active) return;
|
|
157
|
+
const target = radius === void 0 ? host.querySelector(":scope > :not([data-slot=\"sonar-rings\"])") : null;
|
|
79
158
|
const measure = () => {
|
|
80
|
-
const
|
|
159
|
+
const box = host.getBoundingClientRect();
|
|
160
|
+
const spread = spreadInPixels(host);
|
|
81
161
|
const next = {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
borderBottomLeftRadius: computed.borderBottomLeftRadius
|
|
162
|
+
corners: radius !== void 0 ? null : readCorners(target),
|
|
163
|
+
scaleX: startScale(box.width, spread),
|
|
164
|
+
scaleY: startScale(box.height, spread)
|
|
86
165
|
};
|
|
87
|
-
|
|
166
|
+
setMetrics((current) => sameMetrics(current, next) ? current : next);
|
|
88
167
|
};
|
|
89
168
|
measure();
|
|
90
169
|
if (typeof ResizeObserver === "undefined") return;
|
|
91
170
|
const observer = new ResizeObserver(measure);
|
|
92
|
-
observer.observe(
|
|
171
|
+
observer.observe(host);
|
|
93
172
|
return () => observer.disconnect();
|
|
94
173
|
}, [active, radius]);
|
|
95
|
-
const shape = radius !== void 0 ? { borderRadius: radius } : corners;
|
|
174
|
+
const shape = radius !== void 0 ? { borderRadius: radius } : metrics?.corners ?? null;
|
|
96
175
|
return /* @__PURE__ */ jsxs("span", {
|
|
97
176
|
ref,
|
|
98
177
|
"data-slot": "sonar",
|
|
99
178
|
"data-tone": tone ?? "brand",
|
|
100
179
|
"data-size": resolvedSize,
|
|
101
180
|
"data-active": active ? "" : void 0,
|
|
102
|
-
className: cn("relative inline-flex w-fit shrink-0", sonarSpread[resolvedSize], className),
|
|
103
|
-
style
|
|
181
|
+
className: cn("relative isolate inline-flex w-fit shrink-0", sonarSpread[resolvedSize], className),
|
|
182
|
+
style: metrics ? {
|
|
183
|
+
"--sonar-scale-x": metrics.scaleX,
|
|
184
|
+
"--sonar-scale-y": metrics.scaleY,
|
|
185
|
+
...style
|
|
186
|
+
} : style,
|
|
104
187
|
...props,
|
|
105
|
-
children: [children, active && shape ?
|
|
188
|
+
children: [children, active && shape ? /* @__PURE__ */ jsx("span", {
|
|
106
189
|
"aria-hidden": "true",
|
|
107
|
-
"data-slot": "sonar-
|
|
108
|
-
style:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
190
|
+
"data-slot": "sonar-rings",
|
|
191
|
+
style: grownShape(shape),
|
|
192
|
+
className: sonarRingsClass,
|
|
193
|
+
children: waveDelays(waves).map((delay) => /* @__PURE__ */ jsx("span", {
|
|
194
|
+
"data-slot": "sonar-wave",
|
|
195
|
+
style: {
|
|
196
|
+
...shape,
|
|
197
|
+
animationDelay: delay === 0 ? void 0 : `-${delay}ms`
|
|
198
|
+
},
|
|
199
|
+
className: cn(sonarWaveVariants({ tone }), delay > 0 && "motion-reduce:hidden")
|
|
200
|
+
}, `sonar-wave-${delay}`))
|
|
201
|
+
}) : null]
|
|
114
202
|
});
|
|
115
203
|
}
|
|
116
204
|
//#endregion
|
package/dist/styles.css
CHANGED
|
@@ -367,6 +367,9 @@
|
|
|
367
367
|
.sticky {
|
|
368
368
|
position: sticky;
|
|
369
369
|
}
|
|
370
|
+
.\[inset\:calc\(var\(--sonar-spread\,0\.625rem\)\*-1\)\] {
|
|
371
|
+
inset: calc(var(--sonar-spread,0.625rem) * -1);
|
|
372
|
+
}
|
|
370
373
|
.inset-0 {
|
|
371
374
|
inset: 0;
|
|
372
375
|
}
|
|
@@ -621,6 +624,9 @@
|
|
|
621
624
|
padding-inline: 40px;
|
|
622
625
|
}
|
|
623
626
|
}
|
|
627
|
+
.-mx-4 {
|
|
628
|
+
margin-inline: calc(var(--spacing) * -4);
|
|
629
|
+
}
|
|
624
630
|
.mx-0 {
|
|
625
631
|
margin-inline: 0;
|
|
626
632
|
}
|
|
@@ -1159,6 +1165,9 @@
|
|
|
1159
1165
|
.w-1 {
|
|
1160
1166
|
width: var(--spacing);
|
|
1161
1167
|
}
|
|
1168
|
+
.w-1\/2 {
|
|
1169
|
+
width: calc(1 / 2 * 100%);
|
|
1170
|
+
}
|
|
1162
1171
|
.w-2 {
|
|
1163
1172
|
width: calc(var(--spacing) * 2);
|
|
1164
1173
|
}
|
|
@@ -1330,6 +1339,9 @@
|
|
|
1330
1339
|
.max-w-140 {
|
|
1331
1340
|
max-width: calc(var(--spacing) * 140);
|
|
1332
1341
|
}
|
|
1342
|
+
.max-w-\[24\.375rem\] {
|
|
1343
|
+
max-width: 24.375rem;
|
|
1344
|
+
}
|
|
1333
1345
|
.max-w-\[28\.75rem\] {
|
|
1334
1346
|
max-width: 28.75rem;
|
|
1335
1347
|
}
|
|
@@ -2223,12 +2235,6 @@
|
|
|
2223
2235
|
background-color: color-mix(in oklab, var(--color-black) 10%, transparent);
|
|
2224
2236
|
}
|
|
2225
2237
|
}
|
|
2226
|
-
.bg-black\/25 {
|
|
2227
|
-
background-color: color-mix(in srgb, #000 25%, transparent);
|
|
2228
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
2229
|
-
background-color: color-mix(in oklab, var(--color-black) 25%, transparent);
|
|
2230
|
-
}
|
|
2231
|
-
}
|
|
2232
2238
|
.bg-black\/40 {
|
|
2233
2239
|
background-color: color-mix(in srgb, #000 40%, transparent);
|
|
2234
2240
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -2274,12 +2280,6 @@
|
|
|
2274
2280
|
.bg-canvas {
|
|
2275
2281
|
background-color: var(--color-canvas);
|
|
2276
2282
|
}
|
|
2277
|
-
.bg-canvas\/85 {
|
|
2278
|
-
background-color: color-mix(in srgb, #ffffff 85%, transparent);
|
|
2279
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
2280
|
-
background-color: color-mix(in oklab, var(--color-canvas) 85%, transparent);
|
|
2281
|
-
}
|
|
2282
|
-
}
|
|
2283
2283
|
.bg-current {
|
|
2284
2284
|
background-color: currentcolor;
|
|
2285
2285
|
}
|
|
@@ -2388,6 +2388,9 @@
|
|
|
2388
2388
|
.bg-\[linear-gradient\(180deg\,var\(--color-surface-brand\)_0\%\,var\(--color-moss-600\)_100\%\)\] {
|
|
2389
2389
|
background-image: linear-gradient(180deg,var(--color-surface-brand) 0%,var(--color-moss-600) 100%);
|
|
2390
2390
|
}
|
|
2391
|
+
.\[mask-image\:linear-gradient\(\#000\,\#000\)\,linear-gradient\(\#000\,\#000\)\] {
|
|
2392
|
+
mask-image: linear-gradient(#000,#000),linear-gradient(#000,#000);
|
|
2393
|
+
}
|
|
2391
2394
|
.\[background-size\:24px_24px\] {
|
|
2392
2395
|
background-size: 24px 24px;
|
|
2393
2396
|
}
|
|
@@ -2397,6 +2400,12 @@
|
|
|
2397
2400
|
.\[background-position\:0_0\] {
|
|
2398
2401
|
background-position: 0 0;
|
|
2399
2402
|
}
|
|
2403
|
+
.\[mask-composite\:exclude\] {
|
|
2404
|
+
mask-composite: exclude;
|
|
2405
|
+
}
|
|
2406
|
+
.\[mask-clip\:border-box\,padding-box\] {
|
|
2407
|
+
mask-clip: border-box,padding-box;
|
|
2408
|
+
}
|
|
2400
2409
|
.fill-fg-primary {
|
|
2401
2410
|
fill: var(--color-fg-primary);
|
|
2402
2411
|
}
|
|
@@ -3053,6 +3062,10 @@
|
|
|
3053
3062
|
.underline-offset-4 {
|
|
3054
3063
|
text-underline-offset: 4px;
|
|
3055
3064
|
}
|
|
3065
|
+
.antialiased {
|
|
3066
|
+
-webkit-font-smoothing: antialiased;
|
|
3067
|
+
-moz-osx-font-smoothing: grayscale;
|
|
3068
|
+
}
|
|
3056
3069
|
.caret-fg-primary {
|
|
3057
3070
|
caret-color: var(--color-fg-primary);
|
|
3058
3071
|
}
|
|
@@ -3100,6 +3113,10 @@
|
|
|
3100
3113
|
--tw-shadow: var(--shadow-3);
|
|
3101
3114
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
3102
3115
|
}
|
|
3116
|
+
.shadow-\[0_0_0_var\(--sonar-spread\,0\.625rem\)_currentColor\] {
|
|
3117
|
+
--tw-shadow: 0 0 0 var(--sonar-spread,0.625rem) var(--tw-shadow-color, currentColor);
|
|
3118
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
3119
|
+
}
|
|
3103
3120
|
.shadow-\[0_0_4px_rgb\(0_0_0\/0\.1\)\] {
|
|
3104
3121
|
--tw-shadow: 0 0 4px var(--tw-shadow-color, rgb(0 0 0/0.1));
|
|
3105
3122
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -3609,8 +3626,8 @@
|
|
|
3609
3626
|
--tw-ease: var(--ease-out);
|
|
3610
3627
|
transition-timing-function: var(--ease-out);
|
|
3611
3628
|
}
|
|
3612
|
-
.will-change-\[
|
|
3613
|
-
will-change:
|
|
3629
|
+
.will-change-\[transform\,opacity\] {
|
|
3630
|
+
will-change: transform,opacity;
|
|
3614
3631
|
}
|
|
3615
3632
|
.animate-in {
|
|
3616
3633
|
animation-name: enter;
|
|
@@ -3788,6 +3805,9 @@
|
|
|
3788
3805
|
.\[--sonar-spread\:0\.875rem\] {
|
|
3789
3806
|
--sonar-spread: 0.875rem;
|
|
3790
3807
|
}
|
|
3808
|
+
.\[--sonar-spread\:…\] {
|
|
3809
|
+
--sonar-spread: …;
|
|
3810
|
+
}
|
|
3791
3811
|
.\[--switch-spinner-size\:0\.75rem\] {
|
|
3792
3812
|
--switch-spinner-size: 0.75rem;
|
|
3793
3813
|
}
|
|
@@ -3818,6 +3838,9 @@
|
|
|
3818
3838
|
.\[backface-visibility\:hidden\] {
|
|
3819
3839
|
backface-visibility: hidden;
|
|
3820
3840
|
}
|
|
3841
|
+
.\[border\:var\(--sonar-spread\,0\.625rem\)_solid_transparent\] {
|
|
3842
|
+
border: var(--sonar-spread,0.625rem) solid transparent;
|
|
3843
|
+
}
|
|
3821
3844
|
.\[overflow-anchor\:none\] {
|
|
3822
3845
|
overflow-anchor: none;
|
|
3823
3846
|
}
|
|
@@ -4096,6 +4119,22 @@
|
|
|
4096
4119
|
display: none;
|
|
4097
4120
|
}
|
|
4098
4121
|
}
|
|
4122
|
+
.group-has-\[\.is-nested-dialog\]\/dialog-portal\:bg-black\/25 {
|
|
4123
|
+
&:is(:where(.group\/dialog-portal):has(*:is(.is-nested-dialog)) *) {
|
|
4124
|
+
background-color: color-mix(in srgb, #000 25%, transparent);
|
|
4125
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
4126
|
+
background-color: color-mix(in oklab, var(--color-black) 25%, transparent);
|
|
4127
|
+
}
|
|
4128
|
+
}
|
|
4129
|
+
}
|
|
4130
|
+
.group-has-\[\.is-nested-dialog\]\/sheet-portal\:bg-black\/25 {
|
|
4131
|
+
&:is(:where(.group\/sheet-portal):has(*:is(.is-nested-dialog)) *) {
|
|
4132
|
+
background-color: color-mix(in srgb, #000 25%, transparent);
|
|
4133
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
4134
|
+
background-color: color-mix(in oklab, var(--color-black) 25%, transparent);
|
|
4135
|
+
}
|
|
4136
|
+
}
|
|
4137
|
+
}
|
|
4099
4138
|
.group-has-\[\:focus-visible\]\/seek-thumb\:\[filter\:drop-shadow\(0_0_0\.25rem_var\(--color-line-focus\)\)\] {
|
|
4100
4139
|
&:is(:where(.group\/seek-thumb):has(*:is(:focus-visible)) *) {
|
|
4101
4140
|
filter: drop-shadow(0 0 0.25rem var(--color-line-focus));
|
|
@@ -4111,6 +4150,22 @@
|
|
|
4111
4150
|
grid-row-start: 2;
|
|
4112
4151
|
}
|
|
4113
4152
|
}
|
|
4153
|
+
.group-has-\[\>\.is-nested-dialog\]\/dialog-portal\:bg-black\/25 {
|
|
4154
|
+
&:is(:where(.group\/dialog-portal):has(>.is-nested-dialog) *) {
|
|
4155
|
+
background-color: color-mix(in srgb, #000 25%, transparent);
|
|
4156
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
4157
|
+
background-color: color-mix(in oklab, var(--color-black) 25%, transparent);
|
|
4158
|
+
}
|
|
4159
|
+
}
|
|
4160
|
+
}
|
|
4161
|
+
.group-has-\[\>\.is-nested-dialog\]\/sheet-portal\:bg-black\/25 {
|
|
4162
|
+
&:is(:where(.group\/sheet-portal):has(>.is-nested-dialog) *) {
|
|
4163
|
+
background-color: color-mix(in srgb, #000 25%, transparent);
|
|
4164
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
4165
|
+
background-color: color-mix(in oklab, var(--color-black) 25%, transparent);
|
|
4166
|
+
}
|
|
4167
|
+
}
|
|
4168
|
+
}
|
|
4114
4169
|
.group-has-\[\>input\]\/input-group\:pt-2 {
|
|
4115
4170
|
&:is(:where(.group\/input-group):has(>input) *) {
|
|
4116
4171
|
padding-top: calc(var(--spacing) * 2);
|
|
@@ -7277,6 +7332,28 @@
|
|
|
7277
7332
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
7278
7333
|
}
|
|
7279
7334
|
}
|
|
7335
|
+
.has-\[\:focus-visible\]\:ring-2 {
|
|
7336
|
+
&:has(*:is(:focus-visible)) {
|
|
7337
|
+
--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
|
|
7338
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
7339
|
+
}
|
|
7340
|
+
}
|
|
7341
|
+
.has-\[\:focus-visible\]\:ring-line-focus {
|
|
7342
|
+
&:has(*:is(:focus-visible)) {
|
|
7343
|
+
--tw-ring-color: var(--color-line-focus);
|
|
7344
|
+
}
|
|
7345
|
+
}
|
|
7346
|
+
.has-\[\:focus-visible\]\:ring-offset-2 {
|
|
7347
|
+
&:has(*:is(:focus-visible)) {
|
|
7348
|
+
--tw-ring-offset-width: 2px;
|
|
7349
|
+
--tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
7350
|
+
}
|
|
7351
|
+
}
|
|
7352
|
+
.has-\[\:focus-visible\]\:ring-offset-canvas {
|
|
7353
|
+
&:has(*:is(:focus-visible)) {
|
|
7354
|
+
--tw-ring-offset-color: var(--color-canvas);
|
|
7355
|
+
}
|
|
7356
|
+
}
|
|
7280
7357
|
.has-\[\[data-slot\=card-action\]\:active\]\:border-line-focus {
|
|
7281
7358
|
&:has(*:is([data-slot=card-action]:active)) {
|
|
7282
7359
|
border-color: var(--color-line-focus);
|
|
@@ -9693,6 +9770,24 @@
|
|
|
9693
9770
|
backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
|
|
9694
9771
|
}
|
|
9695
9772
|
}
|
|
9773
|
+
.supports-backdrop-filter\:group-has-\[\>\.is-nested-dialog\]\/dialog-portal\:backdrop-blur-none {
|
|
9774
|
+
@supports (backdrop-filter: var(--tw)) {
|
|
9775
|
+
&:is(:where(.group\/dialog-portal):has(>.is-nested-dialog) *) {
|
|
9776
|
+
--tw-backdrop-blur: ;
|
|
9777
|
+
-webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
|
|
9778
|
+
backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
|
|
9779
|
+
}
|
|
9780
|
+
}
|
|
9781
|
+
}
|
|
9782
|
+
.supports-backdrop-filter\:group-has-\[\>\.is-nested-dialog\]\/sheet-portal\:backdrop-blur-none {
|
|
9783
|
+
@supports (backdrop-filter: var(--tw)) {
|
|
9784
|
+
&:is(:where(.group\/sheet-portal):has(>.is-nested-dialog) *) {
|
|
9785
|
+
--tw-backdrop-blur: ;
|
|
9786
|
+
-webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
|
|
9787
|
+
backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
|
|
9788
|
+
}
|
|
9789
|
+
}
|
|
9790
|
+
}
|
|
9696
9791
|
.supports-backdrop-filter\:hover\:bg-black\/55 {
|
|
9697
9792
|
@supports (backdrop-filter: var(--tw)) {
|
|
9698
9793
|
&:hover {
|
|
@@ -10955,6 +11050,11 @@
|
|
|
10955
11050
|
padding-inline: calc(var(--spacing) * 5.5);
|
|
10956
11051
|
}
|
|
10957
11052
|
}
|
|
11053
|
+
.md\:px-6 {
|
|
11054
|
+
@media (width >= 48rem) {
|
|
11055
|
+
padding-inline: calc(var(--spacing) * 6);
|
|
11056
|
+
}
|
|
11057
|
+
}
|
|
10958
11058
|
.md\:px-6\.5 {
|
|
10959
11059
|
@media (width >= 48rem) {
|
|
10960
11060
|
padding-inline: calc(var(--spacing) * 6.5);
|
|
@@ -11532,6 +11632,11 @@
|
|
|
11532
11632
|
flex-direction: column;
|
|
11533
11633
|
}
|
|
11534
11634
|
}
|
|
11635
|
+
.lg\:gap-0\.5 {
|
|
11636
|
+
@media (width >= 64rem) {
|
|
11637
|
+
gap: calc(var(--spacing) * 0.5);
|
|
11638
|
+
}
|
|
11639
|
+
}
|
|
11535
11640
|
.lg\:gap-1 {
|
|
11536
11641
|
@media (width >= 64rem) {
|
|
11537
11642
|
gap: var(--spacing);
|
|
@@ -11648,6 +11753,11 @@
|
|
|
11648
11753
|
padding-inline: calc(var(--spacing) * 5.5);
|
|
11649
11754
|
}
|
|
11650
11755
|
}
|
|
11756
|
+
.lg\:px-6 {
|
|
11757
|
+
@media (width >= 64rem) {
|
|
11758
|
+
padding-inline: calc(var(--spacing) * 6);
|
|
11759
|
+
}
|
|
11760
|
+
}
|
|
11651
11761
|
.lg\:px-6\.5 {
|
|
11652
11762
|
@media (width >= 64rem) {
|
|
11653
11763
|
padding-inline: calc(var(--spacing) * 6.5);
|
|
@@ -13718,12 +13828,6 @@
|
|
|
13718
13828
|
}
|
|
13719
13829
|
}
|
|
13720
13830
|
}
|
|
13721
|
-
.\[\&\>svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3\.5 {
|
|
13722
|
-
&>svg:not([class*='size-']) {
|
|
13723
|
-
width: calc(var(--spacing) * 3.5);
|
|
13724
|
-
height: calc(var(--spacing) * 3.5);
|
|
13725
|
-
}
|
|
13726
|
-
}
|
|
13727
13831
|
.\[\&\>svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 {
|
|
13728
13832
|
&>svg:not([class*='size-']) {
|
|
13729
13833
|
width: calc(var(--spacing) * 4);
|
|
@@ -13918,11 +14022,11 @@
|
|
|
13918
14022
|
}
|
|
13919
14023
|
@keyframes sonar-wave {
|
|
13920
14024
|
from {
|
|
13921
|
-
|
|
14025
|
+
transform: scale(var(--sonar-scale-x, 0.5), var(--sonar-scale-y, 0.5));
|
|
13922
14026
|
opacity: 0.55;
|
|
13923
14027
|
}
|
|
13924
14028
|
to {
|
|
13925
|
-
|
|
14029
|
+
transform: scale(1, 1);
|
|
13926
14030
|
opacity: 0;
|
|
13927
14031
|
}
|
|
13928
14032
|
}
|
|
@@ -80,7 +80,7 @@ function VideoPlayerDialogContent({ size = "md", theme = "light", showCloseButto
|
|
|
80
80
|
function VideoPlayerDialogMedia({ className, ...props }) {
|
|
81
81
|
return /* @__PURE__ */ jsx("div", {
|
|
82
82
|
"data-slot": "video-player-dialog-media",
|
|
83
|
-
className: cn("relative isolate aspect-video w-full overflow-hidden rounded-t-[inherit] bg-[#11160f]", "[&>[data-slot=media-player]]:size-full [&>[data-slot=media-player]]:rounded-none [&>[data-slot=media-player]]:shadow-none", className),
|
|
83
|
+
className: cn("relative isolate aspect-video w-full overflow-hidden rounded-t-[inherit] bg-[#11160f] [transform:translateZ(0)]", "[&>[data-slot=media-player]]:size-full [&>[data-slot=media-player]]:rounded-none [&>[data-slot=media-player]]:shadow-none", className),
|
|
84
84
|
...props
|
|
85
85
|
});
|
|
86
86
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@giddaa-housing/ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"description": "Giddaa reusable UI component library.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -313,6 +313,10 @@
|
|
|
313
313
|
"types": "./dist/radio-group.d.ts",
|
|
314
314
|
"import": "./dist/radio-group.js"
|
|
315
315
|
},
|
|
316
|
+
"./rating": {
|
|
317
|
+
"types": "./dist/rating.d.ts",
|
|
318
|
+
"import": "./dist/rating.js"
|
|
319
|
+
},
|
|
316
320
|
"./review-block": {
|
|
317
321
|
"types": "./dist/review-block.d.ts",
|
|
318
322
|
"import": "./dist/review-block.js"
|
package/dist/dialog-nesting.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
//#region src/dialog-nesting.d.ts
|
|
3
|
-
declare function DialogNestingProvider({ children }: {
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
}): import("react").JSX.Element;
|
|
6
|
-
/** Depth of the current dialog (1 = top-level, 2+ = nested). */
|
|
7
|
-
declare function useDialogNestingDepth(): number;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { DialogNestingProvider, useDialogNestingDepth };
|
package/dist/dialog-nesting.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { createContext, useContext } from "react";
|
|
4
|
-
//#region src/dialog-nesting.tsx
|
|
5
|
-
/**
|
|
6
|
-
* Tracks how deep a Dialog/Sheet is nested. Sheet and Dialog share the same
|
|
7
|
-
* Base UI primitive, so they share this one context too — a Dialog opened
|
|
8
|
-
* inside a Sheet (or vice-versa) counts as nested.
|
|
9
|
-
*
|
|
10
|
-
* Depth is 0 outside any dialog, 1 for a top-level dialog, 2+ for nested ones.
|
|
11
|
-
* Overlays use `depth > 1` to render lighter (so the parent shows through),
|
|
12
|
-
* while the base overlay keeps the full page-hiding dim.
|
|
13
|
-
*/
|
|
14
|
-
const DialogNestingContext = createContext(0);
|
|
15
|
-
function DialogNestingProvider({ children }) {
|
|
16
|
-
const depth = useContext(DialogNestingContext);
|
|
17
|
-
return /* @__PURE__ */ jsx(DialogNestingContext.Provider, {
|
|
18
|
-
value: depth + 1,
|
|
19
|
-
children
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
/** Depth of the current dialog (1 = top-level, 2+ = nested). */
|
|
23
|
-
function useDialogNestingDepth() {
|
|
24
|
-
return useContext(DialogNestingContext);
|
|
25
|
-
}
|
|
26
|
-
//#endregion
|
|
27
|
-
export { DialogNestingProvider, useDialogNestingDepth };
|