@cfx-dev/ui-components 5.0.3 → 5.0.4

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.
@@ -1 +1 @@
1
- .cfxui__Prose__root__e03c1{font-size:var(--font-size-large)}.cfxui__Prose__root__e03c1 *{line-height:1.4}.cfxui__Prose__root__e03c1 h1,.cfxui__Prose__root__e03c1 h2,.cfxui__Prose__root__e03c1 h3,.cfxui__Prose__root__e03c1 h4,.cfxui__Prose__root__e03c1 h5,.cfxui__Prose__root__e03c1 h6{margin:var(--offset-normal) 0}.cfxui__Prose__root__e03c1 p:not(:empty){margin:var(--offset-small) 0}.cfxui__Prose__root__e03c1 li{margin-left:calc(var(--quant) * 3)}.cfxui__Prose__root__e03c1 code{padding:0 var(--offset-xsmall);background-color:var(--color-input-background);border-radius:var(--border-radius-small);font-family:var(--font-family-primary);letter-spacing:var(--letter-spacing-large);font-weight:350;letter-spacing:.5px;text-shadow:0 1px 2px var(--color-shadow-small);-webkit-user-select:text;user-select:text}.cfxui__Prose__root__e03c1 img.emoji{height:1.4ch;width:auto}
1
+ .cfxui__Prose__root__e03c1 *{line-height:1.4}.cfxui__Prose__root__e03c1 h1,.cfxui__Prose__root__e03c1 h2,.cfxui__Prose__root__e03c1 h3,.cfxui__Prose__root__e03c1 h4,.cfxui__Prose__root__e03c1 h5,.cfxui__Prose__root__e03c1 h6{margin:calc(var(--quant) * 2) 0}.cfxui__Prose__root__e03c1 p:not(:empty){margin:var(--quant) 0}.cfxui__Prose__root__e03c1 li{margin-left:calc(var(--quant) * 3)}.cfxui__Prose__root__e03c1 code{padding:0 calc(var(--quant) * .5);background-color:var(--color-input-background);border-radius:var(--border-radius-small);font-family:var(--font-family-primary);letter-spacing:var(--letter-spacing-large);font-weight:350;text-shadow:0 1px 2px var(--color-shadow-small);-webkit-user-select:text;user-select:text}.cfxui__Prose__root__e03c1 img.emoji{height:1.4ch;width:auto}
@@ -1,4 +1,10 @@
1
1
  import { default as React } from 'react';
2
+ import { ResponsiveTextSize, TextColorProps } from '../Text';
3
+ import { ResponsiveValueType } from '../../utils/ui';
2
4
 
3
- export type ProseProps = React.PropsWithChildren;
4
- export declare function Prose({ children, }: ProseProps): import("react/jsx-runtime").JSX.Element;
5
+ export type ProseProps = React.PropsWithChildren & TextColorProps & {
6
+ size?: ResponsiveValueType<ResponsiveTextSize>;
7
+ className?: string;
8
+ lineHeight?: ResponsiveValueType<number>;
9
+ };
10
+ export declare function Prose(props: ProseProps): import("react/jsx-runtime").JSX.Element;
@@ -1,12 +1,35 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- const t = "cfxui__Prose__root__e03c1", s = {
3
- root: t
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { getTextOpacity as g, DEFAULT_TEXT_COLOR as f, lineHeightResponsiveValueFormatter as _, textSizeResponsiveValueFormatter as h } from "../Text/Text.js";
3
+ import { ui as e } from "../../utils/ui/ui.js";
4
+ import { clsx as v } from "../../utils/clsx.js";
5
+ import { getColor as R } from "../../utils/color.js";
6
+ const u = "cfxui__Prose__root__e03c1", x = {
7
+ root: u
4
8
  };
5
- function e({
6
- children: o
7
- }) {
8
- return /* @__PURE__ */ r("div", { className: s.root, children: o });
9
+ function d(t) {
10
+ const {
11
+ size: o = "normal",
12
+ lineHeight: s = o,
13
+ color: i,
14
+ opacity: r,
15
+ className: n,
16
+ children: l
17
+ } = t, c = R({
18
+ ...t,
19
+ color: i || f,
20
+ opacity: g(r)
21
+ }), a = v(
22
+ x.root,
23
+ n,
24
+ e.getResponsiveClassnames("font-size", o),
25
+ e.getResponsiveClassnames("line-height", o)
26
+ ), m = {
27
+ color: c,
28
+ ...e.getResponsiveStyles("font-size", o, h),
29
+ ...e.getResponsiveStyles("line-height", s, _)
30
+ };
31
+ return /* @__PURE__ */ p("div", { className: a, style: m, children: l });
9
32
  }
10
33
  export {
11
- e as Prose
34
+ d as Prose
12
35
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cfx-dev/ui-components",
3
3
  "private": false,
4
- "version": "5.0.3",
4
+ "version": "5.0.4",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "main": "dist/main.js",