@juspay/svelte-ui-components 4.46.0 → 4.47.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/dist/Img/Img.svelte +24 -0
- package/dist-wc/index.js +1 -1
- package/package.json +1 -1
package/dist/Img/Img.svelte
CHANGED
|
@@ -368,4 +368,28 @@
|
|
|
368
368
|
background: var(--image-hover-background, var(--image-background));
|
|
369
369
|
border: var(--image-hover-border, var(--image-border));
|
|
370
370
|
}
|
|
371
|
+
|
|
372
|
+
/* The ceilings sit in a cascade layer and read through :where(), for one reason:
|
|
373
|
+
an Img that sets neither token must compute exactly what it computed before
|
|
374
|
+
they existed, beside whatever max-width rule the app already has.
|
|
375
|
+
|
|
376
|
+
A layer loses to every rule outside a layer, whatever its selector and
|
|
377
|
+
whichever stylesheet loads first, so an app's `img { max-width: 100% }`, its
|
|
378
|
+
`* { max-width: 100% }` and a zero-specificity `:where(img)` reset all keep
|
|
379
|
+
winning. A zero-specificity rule outside a layer would not do that: it ties
|
|
380
|
+
with the app's `*` and `:where()` rules, and the later stylesheet takes it.
|
|
381
|
+
:where() keeps the rule at zero specificity should it ever leave the layer;
|
|
382
|
+
Svelte compiles :where(img) to :where(img.svelte-hash).
|
|
383
|
+
|
|
384
|
+
The fallback is `revert-layer`, not `none`. `none` is the initial value, but
|
|
385
|
+
as a declaration it would outrank a reset an app keeps in an earlier layer
|
|
386
|
+
(Tailwind 4's preflight does). `revert-layer` hands the property back to the
|
|
387
|
+
layers below this one, and to `none` when there are none, so an unset token
|
|
388
|
+
declares nothing. */
|
|
389
|
+
@layer svelte-ui-img {
|
|
390
|
+
:where(img, svg) {
|
|
391
|
+
max-width: var(--image-max-width, revert-layer);
|
|
392
|
+
max-height: var(--image-max-height, revert-layer);
|
|
393
|
+
}
|
|
394
|
+
}
|
|
371
395
|
</style>
|
package/dist-wc/index.js
CHANGED
|
@@ -3863,7 +3863,7 @@ customElements.define("sui-animated-number", create_custom_element(AnimatedNumbe
|
|
|
3863
3863
|
//#region src/lib/Img/Img.svelte
|
|
3864
3864
|
var root_1$100 = /* @__PURE__ */ from_svg("<svg></svg>"), root_2$78 = /* @__PURE__ */ from_html("<img/>"), $$css$204 = {
|
|
3865
3865
|
hash: "svelte-13ogpty",
|
|
3866
|
-
code: "img.svelte-13ogpty,\n svg.svelte-13ogpty {object-fit:var(--image-object-fit);height:var(--image-height, 24px);width:var(--image-width, 24px);padding:var(--image-padding, 0px);border-radius:var(--image-border-radius, 0px);margin:var(--image-margin, 0px);filter:var(--image-filter, none);background:var(--image-background);border:var(--image-border);transition:var(--image-transition);}img.svelte-13ogpty:hover,\n svg.svelte-13ogpty:hover {background:var(--image-hover-background, var(--image-background));border:var(--image-hover-border, var(--image-border));}"
|
|
3866
|
+
code: "img.svelte-13ogpty,\n svg.svelte-13ogpty {object-fit:var(--image-object-fit);height:var(--image-height, 24px);width:var(--image-width, 24px);padding:var(--image-padding, 0px);border-radius:var(--image-border-radius, 0px);margin:var(--image-margin, 0px);filter:var(--image-filter, none);background:var(--image-background);border:var(--image-border);transition:var(--image-transition);}img.svelte-13ogpty:hover,\n svg.svelte-13ogpty:hover {background:var(--image-hover-background, var(--image-background));border:var(--image-hover-border, var(--image-border));}\n\n /* The ceilings sit in a cascade layer and read through :where(), for one reason:\n an Img that sets neither token must compute exactly what it computed before\n they existed, beside whatever max-width rule the app already has.\n\n A layer loses to every rule outside a layer, whatever its selector and\n whichever stylesheet loads first, so an app's `img { max-width: 100% }`, its\n `* { max-width: 100% }` and a zero-specificity `:where(img)` reset all keep\n winning. A zero-specificity rule outside a layer would not do that: it ties\n with the app's `*` and `:where()` rules, and the later stylesheet takes it.\n :where() keeps the rule at zero specificity should it ever leave the layer;\n Svelte compiles :where(img) to :where(img.svelte-hash).\n\n The fallback is `revert-layer`, not `none`. `none` is the initial value, but\n as a declaration it would outrank a reset an app keeps in an earlier layer\n (Tailwind 4's preflight does). `revert-layer` hands the property back to the\n layers below this one, and to `none` when there are none, so an unset token\n declares nothing. */\n @layer svelte-ui-img {:where(img.svelte-13ogpty, svg.svelte-13ogpty) {max-width:var(--image-max-width, revert-layer);max-height:var(--image-max-height, revert-layer);}\n }"
|
|
3867
3867
|
};
|
|
3868
3868
|
function Img(e, t) {
|
|
3869
3869
|
push(t, !0), append_styles$1(e, $$css$204);
|