zaravand-ui 4.3.0 → 4.3.2
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/components/Table/Table.constants.d.ts +1 -0
- package/dist/components/Table/Table.interface.d.ts +8 -0
- package/dist/components/shared/responsiveScale.d.ts +31 -31
- package/dist/index.cjs +13 -13
- package/dist/index.css +1 -1
- package/dist/index.js +3479 -3421
- package/dist/shared/scale.d.ts +17 -8
- package/package.json +1 -1
package/dist/shared/scale.d.ts
CHANGED
|
@@ -5,19 +5,28 @@ type ApplyScaleOptions = {
|
|
|
5
5
|
/**
|
|
6
6
|
* Sets the `--zui-scale` CSS custom property this library's components
|
|
7
7
|
* size themselves against (see src/index.css and shared/responsiveScale.ts).
|
|
8
|
-
* `scale` is a
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
8
|
+
* `scale` is a CSS length — `10px` (the default when this is never
|
|
9
|
+
* called) renders every component at its fixed desktop size; a
|
|
10
|
+
* consuming app that wants this library to shrink/grow with the
|
|
11
|
+
* viewport passes a smaller/larger length here (or sets the CSS
|
|
12
|
+
* variable itself, e.g. via a `clamp()` on `:root` — this function is a
|
|
13
|
+
* convenience over that, same relationship `applyTheme` has to
|
|
14
|
+
* hand-writing the theme's CSS variables). A bare `number` is treated
|
|
15
|
+
* as a `px` value.
|
|
16
|
+
*
|
|
17
|
+
* `--zui-scale` is kept a length rather than a unitless ratio because a
|
|
18
|
+
* bare CSS <number> can't be derived from a viewport-relative unit like
|
|
19
|
+
* `vw` without dividing it by another length inside `calc()` — and
|
|
20
|
+
* dividing two dimensioned values is exactly the construct Firefox
|
|
21
|
+
* silently drops the whole declaration for. A length can be set with a
|
|
22
|
+
* plain `clamp()` of `px`/`vw` values, no calc() division needed, the
|
|
23
|
+
* same shape as a typical root `font-size` clamp.
|
|
15
24
|
*
|
|
16
25
|
* Deliberately independent of the host app's own root `font-size`/`rem`
|
|
17
26
|
* scaling: `rem` always resolves against the document's <html> element,
|
|
18
27
|
* so it can't be scoped to just this library's components, which is why
|
|
19
28
|
* this library stopped reading it.
|
|
20
29
|
*/
|
|
21
|
-
declare function applyScale(scale: number, options?: ApplyScaleOptions):
|
|
30
|
+
declare function applyScale(scale: number | string, options?: ApplyScaleOptions): string;
|
|
22
31
|
export type { ApplyScaleOptions };
|
|
23
32
|
export { applyScale, ZUI_SCALE_CSS_VARIABLE };
|