@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/bundle-stats.html +1 -1
- package/index.css +1 -1
- package/package.json +1 -1
- package/src/tedi/components/content/list/list-item.cjs.js +1 -1
- package/src/tedi/components/content/list/list-item.d.ts +1 -1
- package/src/tedi/components/content/list/list-item.es.js +8 -8
- package/src/tedi/components/content/list/list.cjs.js +1 -1
- package/src/tedi/components/content/list/list.d.ts +1 -1
- package/src/tedi/components/content/list/list.es.js +29 -23
- package/src/tedi/components/content/list/list.module.scss.cjs.js +1 -1
- package/src/tedi/components/content/list/list.module.scss.es.js +3 -2
- package/src/tedi/components/layout/vertical-spacing/vertical-spacing-item.cjs.js +1 -1
- package/src/tedi/components/layout/vertical-spacing/vertical-spacing-item.d.ts +5 -0
- package/src/tedi/components/layout/vertical-spacing/vertical-spacing-item.es.js +14 -13
- package/src/tedi/components/layout/vertical-spacing/vertical-spacing.cjs.js +1 -1
- package/src/tedi/components/layout/vertical-spacing/vertical-spacing.d.ts +5 -0
- package/src/tedi/components/layout/vertical-spacing/vertical-spacing.es.js +18 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tedi-design-system/react",
|
|
3
|
-
"version": "19.0.0-rc.
|
|
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
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { useBreakpointProps as
|
|
5
|
-
import { VerticalSpacingItem as
|
|
6
|
-
const B = (
|
|
7
|
-
const { getCurrentBreakpointProps:
|
|
8
|
-
return
|
|
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
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
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:
|
|
11
|
-
style:
|
|
12
|
-
verticalSpacing:
|
|
13
|
-
className:
|
|
14
|
-
color:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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 =
|
|
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
|
|
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
|
|
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
|
-
|
|
20
|
+
t as default
|
|
20
21
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
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
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import o from "../../../../../external/classnames/index.es.js";
|
|
3
|
-
import
|
|
4
|
-
import { useBreakpointProps as
|
|
5
|
-
const
|
|
6
|
-
const { getCurrentBreakpointProps: r } =
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
...
|
|
18
|
-
style: { "--vertical-spacing-internal": `${t}${t !== 0 ? "em" : ""}
|
|
19
|
-
className:
|
|
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
|
-
|
|
26
|
-
|
|
26
|
+
B as VerticalSpacingItem,
|
|
27
|
+
B as default
|
|
27
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { VerticalSpacingItem as
|
|
5
|
-
import { useBreakpointProps as
|
|
6
|
-
const
|
|
7
|
-
const { getCurrentBreakpointProps: r } =
|
|
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:
|
|
10
|
+
element: s = "div",
|
|
11
11
|
size: t = 1,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
...
|
|
20
|
-
className:
|
|
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
|
-
|
|
27
|
+
d.Item = g;
|
|
27
28
|
export {
|
|
28
|
-
|
|
29
|
+
d as VerticalSpacing
|
|
29
30
|
};
|