@tedi-design-system/react 19.0.0-rc.13 → 19.0.0-rc.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tedi-design-system/react",
3
- "version": "19.0.0-rc.13",
3
+ "version": "19.0.0-rc.14",
4
4
  "description": "TEDI Design System React component library — accessible, reusable UI components. Docs & live examples: https://storybook.tedi.ee/react/rc/",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),c=require("../../../../../external/classnames/index.cjs.js"),u=require("./list.module.scss.cjs.js"),o=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),m=require("../../layout/vertical-spacing/vertical-spacing-item.cjs.js"),a=t=>{const{getCurrentBreakpointProps:n}=o.useBreakpointProps(t.defaultServerBreakpoint),{children:i,verticalSpacingItem:e,className:l}=n(t),r=c.default(u.default["tedi-list__item"],e==null?void 0:e.className,l);return t.verticalSpacingItem?s.jsx(m.VerticalSpacingItem,{...e,element:"li",className:r,children:i}):s.jsx("li",{className:r,children:i})};exports.ListItem=a;exports.default=a;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("react/jsx-runtime"),o=require("../../../../../external/classnames/index.cjs.js"),m=require("./list.module.scss.cjs.js"),d=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),p=require("../../layout/vertical-spacing/vertical-spacing-item.cjs.js"),a=r=>{const{getCurrentBreakpointProps:u}=d.useBreakpointProps(r.defaultServerBreakpoint),{children:s,verticalSpacingItem:e,className:c,...t}=u(r),i=o.default(m.default["tedi-list__item"],e==null?void 0:e.className,c),n=typeof t.value=="number"?{counterIncrement:"none",counterSet:`item ${t.value}`}:void 0;return r.verticalSpacingItem?l.jsx(p.VerticalSpacingItem,{...e,...t,element:"li",className:i,style:n,children:s}):l.jsx("li",{className:i,...t,style:n,children:s})};exports.ListItem=a;exports.default=a;
@@ -7,7 +7,7 @@ type ListItemBreakpointProps = {
7
7
  */
8
8
  verticalSpacingItem?: Omit<VerticalSpacingItemProps, 'element' | 'children'>;
9
9
  };
10
- export interface ListItemProps extends BreakpointSupport<ListItemBreakpointProps> {
10
+ export interface ListItemProps extends BreakpointSupport<ListItemBreakpointProps>, Omit<React.LiHTMLAttributes<HTMLLIElement>, 'style' | 'children'> {
11
11
  /**
12
12
  * List children should be ListItem components
13
13
  */
@@ -1,11 +1,11 @@
1
- import { jsx as m } from "react/jsx-runtime";
2
- import o from "../../../../../external/classnames/index.es.js";
3
- import l from "./list.module.scss.es.js";
4
- import { useBreakpointProps as n } from "../../../helpers/hooks/use-breakpoint-props.es.js";
5
- import { VerticalSpacingItem as c } from "../../layout/vertical-spacing/vertical-spacing-item.es.js";
6
- const B = (e) => {
7
- const { getCurrentBreakpointProps: i } = n(e.defaultServerBreakpoint), { children: r, verticalSpacingItem: t, className: a } = i(e), s = o(l["tedi-list__item"], t == null ? void 0 : t.className, a);
8
- return e.verticalSpacingItem ? /* @__PURE__ */ m(c, { ...t, element: "li", className: s, children: r }) : /* @__PURE__ */ m("li", { className: s, children: r });
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import l from "../../../../../external/classnames/index.es.js";
3
+ import c from "./list.module.scss.es.js";
4
+ import { useBreakpointProps as u } from "../../../helpers/hooks/use-breakpoint-props.es.js";
5
+ import { VerticalSpacingItem as f } from "../../layout/vertical-spacing/vertical-spacing-item.es.js";
6
+ const B = (r) => {
7
+ const { getCurrentBreakpointProps: n } = u(r.defaultServerBreakpoint), { children: s, verticalSpacingItem: e, className: a, ...t } = n(r), m = l(c["tedi-list__item"], e == null ? void 0 : e.className, a), o = typeof t.value == "number" ? { counterIncrement: "none", counterSet: `item ${t.value}` } : void 0;
8
+ return r.verticalSpacingItem ? /* @__PURE__ */ i(f, { ...e, ...t, element: "li", className: m, style: o, children: s }) : /* @__PURE__ */ i("li", { className: m, ...t, style: o, children: s });
9
9
  };
10
10
  export {
11
11
  B as ListItem,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),f=require("../../../../../external/classnames/index.cjs.js"),t=require("./list.module.scss.cjs.js"),p=require("./list-item.cjs.js"),q=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),g=require("../../layout/vertical-spacing/vertical-spacing.cjs.js"),o=s=>{const{getCurrentBreakpointProps:u}=q.useBreakpointProps(s.defaultServerBreakpoint),{children:i,element:r="ul",style:a="none",verticalSpacing:e,className:c,color:d="brand"}=u(s),l=f.default(t.default["tedi-list"],t.default[`tedi-list--${r==="ul"?"unordered":"ordered"}`],t.default[`tedi-list--style-${a}`],t.default[`tedi-list--bullet-color-${d}`],e==null?void 0:e.className,c),m=r;return e?n.jsx(g.VerticalSpacing,{...e,element:r,className:l,children:i}):n.jsx(m,{className:l,children:i})};o.Item=p.ListItem;exports.List=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),v=require("../../../../../external/classnames/index.cjs.js"),q=require("react"),s=require("./list.module.scss.cjs.js"),b=require("./list-item.cjs.js"),S=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),g=require("../../layout/vertical-spacing/vertical-spacing.cjs.js"),d=n=>{const{getCurrentBreakpointProps:a}=S.useBreakpointProps(n.defaultServerBreakpoint),{children:i,element:t="ul",style:m="none",verticalSpacing:r,className:f,color:p="brand",...e}=a(n),o=t==="ol"&&e.reversed===!0,l=v.default(s.default["tedi-list"],s.default[`tedi-list--${t==="ul"?"unordered":"ordered"}`],s.default[`tedi-list--style-${m}`],s.default[`tedi-list--bullet-color-${p}`],o&&s.default["tedi-list--reversed"],r==null?void 0:r.className,f),y=t,u=(()=>{if(t==="ol")return o?{counterReset:`item ${(typeof e.start=="number"?e.start:q.Children.count(i))+1}`}:typeof e.start=="number"?{counterReset:`item ${e.start-1}`}:void 0})();return r?c.jsx(g.VerticalSpacing,{...r,...e,element:t,className:l,style:u,children:i}):c.jsx(y,{className:l,...e,style:u,children:i})};d.Item=b.ListItem;exports.List=d;
@@ -16,7 +16,7 @@ type ListBreakpointProps = {
16
16
  */
17
17
  style?: 'styled' | 'none';
18
18
  };
19
- export interface ListProps extends BreakpointSupport<ListBreakpointProps> {
19
+ export interface ListProps extends BreakpointSupport<ListBreakpointProps>, Omit<React.OlHTMLAttributes<HTMLOListElement>, 'style' | 'children'> {
20
20
  /**
21
21
  * List children should be ListItem components
22
22
  */
@@ -1,28 +1,34 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import p from "../../../../../external/classnames/index.es.js";
3
- import e from "./list.module.scss.es.js";
4
- import { ListItem as u } from "./list-item.es.js";
5
- import { useBreakpointProps as f } from "../../../helpers/hooks/use-breakpoint-props.es.js";
6
- import { VerticalSpacing as N } from "../../layout/vertical-spacing/vertical-spacing.es.js";
7
- const B = (s) => {
8
- const { getCurrentBreakpointProps: m } = f(s.defaultServerBreakpoint), {
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import y from "../../../../../external/classnames/index.es.js";
3
+ import { Children as v } from "react";
4
+ import s from "./list.module.scss.es.js";
5
+ import { ListItem as N } from "./list-item.es.js";
6
+ import { useBreakpointProps as $ } from "../../../helpers/hooks/use-breakpoint-props.es.js";
7
+ import { VerticalSpacing as b } from "../../layout/vertical-spacing/vertical-spacing.es.js";
8
+ const B = (i) => {
9
+ const { getCurrentBreakpointProps: a } = $(i.defaultServerBreakpoint), {
9
10
  children: o,
10
- element: r = "ul",
11
- style: n = "none",
12
- verticalSpacing: t,
13
- className: a,
14
- color: c = "brand"
15
- } = m(s), l = p(
16
- e["tedi-list"],
17
- e[`tedi-list--${r === "ul" ? "unordered" : "ordered"}`],
18
- e[`tedi-list--style-${n}`],
19
- e[`tedi-list--bullet-color-${c}`],
20
- t == null ? void 0 : t.className,
21
- a
22
- ), d = r;
23
- return t ? /* @__PURE__ */ i(N, { ...t, element: r, className: l, children: o }) : /* @__PURE__ */ i(d, { className: l, children: o });
11
+ element: t = "ul",
12
+ style: c = "none",
13
+ verticalSpacing: r,
14
+ className: u,
15
+ color: f = "brand",
16
+ ...e
17
+ } = a(i), l = t === "ol" && e.reversed === !0, n = y(
18
+ s["tedi-list"],
19
+ s[`tedi-list--${t === "ul" ? "unordered" : "ordered"}`],
20
+ s[`tedi-list--style-${c}`],
21
+ s[`tedi-list--bullet-color-${f}`],
22
+ l && s["tedi-list--reversed"],
23
+ r == null ? void 0 : r.className,
24
+ u
25
+ ), p = t, m = (() => {
26
+ if (t === "ol")
27
+ return l ? { counterReset: `item ${(typeof e.start == "number" ? e.start : v.count(o)) + 1}` } : typeof e.start == "number" ? { counterReset: `item ${e.start - 1}` } : void 0;
28
+ })();
29
+ return r ? /* @__PURE__ */ d(b, { ...r, ...e, element: t, className: n, style: m, children: o }) : /* @__PURE__ */ d(p, { className: n, ...e, style: m, children: o });
24
30
  };
25
- B.Item = u;
31
+ B.Item = N;
26
32
  export {
27
33
  B as List
28
34
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t={"tedi-list":"tedi-list-71701cf9","tedi-list__item":"tedi-list__item-2a714ed1","tedi-list--unordered":"tedi-list--unordered-60115136","tedi-list--bullet-color-primary":"tedi-list--bullet-color-primary-afabfe71","tedi-list--bullet-color-secondary":"tedi-list--bullet-color-secondary-25f0c3e3","tedi-list--bullet-color-tertiary":"tedi-list--bullet-color-tertiary-fbd2b53f","tedi-list--bullet-color-brand":"tedi-list--bullet-color-brand-de9348a6","tedi-list--bullet-color-brand-dark":"tedi-list--bullet-color-brand-dark-948cec45","tedi-list--bullet-color-success":"tedi-list--bullet-color-success-1c3189cf","tedi-list--bullet-color-warning":"tedi-list--bullet-color-warning-0ec8b981","tedi-list--bullet-color-warning-dark":"tedi-list--bullet-color-warning-dark-ecaf5ef7","tedi-list--bullet-color-danger":"tedi-list--bullet-color-danger-4457905e","tedi-list--bullet-color-white":"tedi-list--bullet-color-white-a25c101f","tedi-list--ordered":"tedi-list--ordered-cd38b627","tedi-list--style-none":"tedi-list--style-none-14fa69aa"};exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={"tedi-list":"tedi-list-71701cf9","tedi-list__item":"tedi-list__item-2a714ed1","tedi-list--unordered":"tedi-list--unordered-60115136","tedi-list--bullet-color-primary":"tedi-list--bullet-color-primary-afabfe71","tedi-list--bullet-color-secondary":"tedi-list--bullet-color-secondary-25f0c3e3","tedi-list--bullet-color-tertiary":"tedi-list--bullet-color-tertiary-fbd2b53f","tedi-list--bullet-color-brand":"tedi-list--bullet-color-brand-de9348a6","tedi-list--bullet-color-brand-dark":"tedi-list--bullet-color-brand-dark-948cec45","tedi-list--bullet-color-success":"tedi-list--bullet-color-success-1c3189cf","tedi-list--bullet-color-warning":"tedi-list--bullet-color-warning-0ec8b981","tedi-list--bullet-color-warning-dark":"tedi-list--bullet-color-warning-dark-ecaf5ef7","tedi-list--bullet-color-danger":"tedi-list--bullet-color-danger-4457905e","tedi-list--bullet-color-white":"tedi-list--bullet-color-white-a25c101f","tedi-list--ordered":"tedi-list--ordered-cd38b627","tedi-list--reversed":"tedi-list--reversed-a403096a","tedi-list--style-none":"tedi-list--style-none-14fa69aa"};exports.default=e;
@@ -1,4 +1,4 @@
1
- const l = {
1
+ const t = {
2
2
  "tedi-list": "tedi-list-71701cf9",
3
3
  "tedi-list__item": "tedi-list__item-2a714ed1",
4
4
  "tedi-list--unordered": "tedi-list--unordered-60115136",
@@ -13,8 +13,9 @@ const l = {
13
13
  "tedi-list--bullet-color-danger": "tedi-list--bullet-color-danger-4457905e",
14
14
  "tedi-list--bullet-color-white": "tedi-list--bullet-color-white-a25c101f",
15
15
  "tedi-list--ordered": "tedi-list--ordered-cd38b627",
16
+ "tedi-list--reversed": "tedi-list--reversed-a403096a",
16
17
  "tedi-list--style-none": "tedi-list--style-none-14fa69aa"
17
18
  };
18
19
  export {
19
- l as default
20
+ t as default
20
21
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),u=require("../../../../../external/classnames/index.cjs.js"),m=require("./vertical-spacing.module.scss.cjs.js"),d=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),i=e=>{const{getCurrentBreakpointProps:r}=d.useBreakpointProps(e.defaultServerBreakpoint),{children:a,className:n,element:s="div",size:t=1,...c}=r(e),l=u.default(m.default["tedi-vertical-spacing__item"],n);return o.jsx(s,{"data-name":"vertical-spacing-item",...c,style:{"--vertical-spacing-internal":`${t}${t!==0?"em":""}`},className:l,children:a})};exports.VerticalSpacingItem=i;exports.default=i;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("react/jsx-runtime"),m=require("../../../../../external/classnames/index.cjs.js"),d=require("./vertical-spacing.module.scss.cjs.js"),p=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),i=e=>{const{getCurrentBreakpointProps:r}=p.useBreakpointProps(e.defaultServerBreakpoint),{children:a,className:n,element:s="div",size:t=1,style:c,...l}=r(e),o=m.default(d.default["tedi-vertical-spacing__item"],n);return u.jsx(s,{"data-name":"vertical-spacing-item",...l,style:{"--vertical-spacing-internal":`${t}${t!==0?"em":""}`,...c},className:o,children:a})};exports.VerticalSpacingItem=i;exports.default=i;
@@ -21,6 +21,11 @@ export interface VerticalSpacingItemProps extends BreakpointSupport<VerticalSpac
21
21
  * Additional class name(s) to apply to the element
22
22
  */
23
23
  className?: string;
24
+ /**
25
+ * Additional inline styles, merged with the internal spacing custom property
26
+ * (rather than replacing it).
27
+ */
28
+ style?: React.CSSProperties;
24
29
  }
25
30
  export declare const VerticalSpacingItem: (props: VerticalSpacingItemProps) => JSX.Element;
26
31
  export default VerticalSpacingItem;
@@ -1,27 +1,28 @@
1
- import { jsx as c } from "react/jsx-runtime";
1
+ import { jsx as l } from "react/jsx-runtime";
2
2
  import o from "../../../../../external/classnames/index.es.js";
3
- import l from "./vertical-spacing.module.scss.es.js";
4
- import { useBreakpointProps as p } from "../../../helpers/hooks/use-breakpoint-props.es.js";
5
- const v = (e) => {
6
- const { getCurrentBreakpointProps: r } = p(e.defaultServerBreakpoint), {
3
+ import p from "./vertical-spacing.module.scss.es.js";
4
+ import { useBreakpointProps as d } from "../../../helpers/hooks/use-breakpoint-props.es.js";
5
+ const B = (e) => {
6
+ const { getCurrentBreakpointProps: r } = d(e.defaultServerBreakpoint), {
7
7
  children: a,
8
8
  className: i,
9
9
  element: s = "div",
10
10
  size: t = 1,
11
- ...n
12
- } = r(e), m = o(l["tedi-vertical-spacing__item"], i);
13
- return /* @__PURE__ */ c(
11
+ style: n,
12
+ ...m
13
+ } = r(e), c = o(p["tedi-vertical-spacing__item"], i);
14
+ return /* @__PURE__ */ l(
14
15
  s,
15
16
  {
16
17
  "data-name": "vertical-spacing-item",
17
- ...n,
18
- style: { "--vertical-spacing-internal": `${t}${t !== 0 ? "em" : ""}` },
19
- className: m,
18
+ ...m,
19
+ style: { "--vertical-spacing-internal": `${t}${t !== 0 ? "em" : ""}`, ...n },
20
+ className: c,
20
21
  children: a
21
22
  }
22
23
  );
23
24
  };
24
25
  export {
25
- v as VerticalSpacingItem,
26
- v as default
26
+ B as VerticalSpacingItem,
27
+ B as default
27
28
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),u=require("../../../../../external/classnames/index.cjs.js"),p=require("./vertical-spacing.module.scss.cjs.js"),g=require("./vertical-spacing-item.cjs.js"),m=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),r=e=>{const{getCurrentBreakpointProps:i}=m.useBreakpointProps(e.defaultServerBreakpoint),{children:a,className:n,element:c="div",size:t=1,...s}=i(e),l=u.default(p.default["tedi-vertical-spacing"],n);return o.jsx(c,{"data-name":"vertical-spacing",role:"presentation",...s,className:l,style:{"--vertical-spacing-internal":t!==0?`${t}em`:"0"},children:a})};r.Item=g.VerticalSpacingItem;exports.VerticalSpacing=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),p=require("../../../../../external/classnames/index.cjs.js"),g=require("./vertical-spacing.module.scss.cjs.js"),m=require("./vertical-spacing-item.cjs.js"),d=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),r=e=>{const{getCurrentBreakpointProps:i}=d.useBreakpointProps(e.defaultServerBreakpoint),{children:a,className:n,element:c="div",size:t=1,style:s,...l}=i(e),o=p.default(g.default["tedi-vertical-spacing"],n);return u.jsx(c,{"data-name":"vertical-spacing",role:"presentation",...l,className:o,style:{"--vertical-spacing-internal":t!==0?`${t}em`:"0",...s},children:a})};r.Item=m.VerticalSpacingItem;exports.VerticalSpacing=r;
@@ -22,6 +22,11 @@ export interface VerticalSpacingProps extends BreakpointSupport<VerticalSpacingB
22
22
  * Additional class name(s) to apply to the element
23
23
  */
24
24
  className?: string;
25
+ /**
26
+ * Additional inline styles, merged with the internal spacing custom property
27
+ * (rather than replacing it).
28
+ */
29
+ style?: React.CSSProperties;
25
30
  }
26
31
  export declare const VerticalSpacing: {
27
32
  (props: VerticalSpacingProps): JSX.Element;
@@ -1,29 +1,30 @@
1
- import { jsx as c } from "react/jsx-runtime";
2
- import m from "../../../../../external/classnames/index.es.js";
3
- import l from "./vertical-spacing.module.scss.es.js";
4
- import { VerticalSpacingItem as p } from "./vertical-spacing-item.es.js";
5
- import { useBreakpointProps as g } from "../../../helpers/hooks/use-breakpoint-props.es.js";
6
- const f = (e) => {
7
- const { getCurrentBreakpointProps: r } = g(e.defaultServerBreakpoint), {
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import l from "../../../../../external/classnames/index.es.js";
3
+ import p from "./vertical-spacing.module.scss.es.js";
4
+ import { VerticalSpacingItem as g } from "./vertical-spacing-item.es.js";
5
+ import { useBreakpointProps as f } from "../../../helpers/hooks/use-breakpoint-props.es.js";
6
+ const d = (e) => {
7
+ const { getCurrentBreakpointProps: r } = f(e.defaultServerBreakpoint), {
8
8
  children: a,
9
9
  className: i,
10
- element: n = "div",
10
+ element: s = "div",
11
11
  size: t = 1,
12
- ...s
13
- } = r(e), o = m(l["tedi-vertical-spacing"], i);
14
- return /* @__PURE__ */ c(
15
- n,
12
+ style: n,
13
+ ...o
14
+ } = r(e), c = l(p["tedi-vertical-spacing"], i);
15
+ return /* @__PURE__ */ m(
16
+ s,
16
17
  {
17
18
  "data-name": "vertical-spacing",
18
19
  role: "presentation",
19
- ...s,
20
- className: o,
21
- style: { "--vertical-spacing-internal": t !== 0 ? `${t}em` : "0" },
20
+ ...o,
21
+ className: c,
22
+ style: { "--vertical-spacing-internal": t !== 0 ? `${t}em` : "0", ...n },
22
23
  children: a
23
24
  }
24
25
  );
25
26
  };
26
- f.Item = p;
27
+ d.Item = g;
27
28
  export {
28
- f as VerticalSpacing
29
+ d as VerticalSpacing
29
30
  };