@tedi-design-system/react 16.0.0-rc.13 → 16.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/buttons/closing-button/closing-button.cjs.js +1 -1
- package/src/tedi/components/buttons/closing-button/closing-button.d.ts +3 -1
- package/src/tedi/components/buttons/closing-button/closing-button.es.js +25 -15
- package/src/tedi/components/buttons/closing-button/closing-button.module.scss.cjs.js +1 -1
- package/src/tedi/components/buttons/closing-button/closing-button.module.scss.es.js +4 -1
package/package.json
CHANGED
|
@@ -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 i=require("react/jsx-runtime"),f=require("../../../../../external/classnames/index.cjs.js"),q=require("../../base/icon/icon.cjs.js"),e=require("./closing-button.module.scss.cjs.js"),z=require("../../../providers/label-provider/use-labels.cjs.js"),u=c=>{const{getLabel:r}=z.useLabels(),{title:o=r("close"),onClick:a,size:t="default",iconSize:n=24,color:s="primary",className:d,...b}=c,l=n===18?"small":t,g=f.default(e.default["tedi-closing-button"],{[e.default[`tedi-closing-button--${t}`]]:t,[e.default[`tedi-closing-button--color-${s}`]]:s,[e.default[`tedi-closing-button--${l}`]]:l},d),m=n??24;return i.jsx("button",{"data-name":"closing-button",type:"button",...b,className:g,onClick:a,title:o,"aria-label":o,children:i.jsx(q.Icon,{name:"close",size:m,color:"inherit"})})};exports.ClosingButton=u;exports.default=u;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MouseEventHandler, ButtonHTMLAttributes } from 'react';
|
|
2
|
+
type ClosingButtonColor = 'primary' | 'brand' | 'white';
|
|
2
3
|
export type ClosingButtonSize = 'default' | 'small';
|
|
3
4
|
export type ClosingButtonIconSize = 18 | 24;
|
|
4
5
|
export interface ClosingButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
@@ -8,7 +9,7 @@ export interface ClosingButtonProps extends ButtonHTMLAttributes<HTMLButtonEleme
|
|
|
8
9
|
className?: string;
|
|
9
10
|
/**
|
|
10
11
|
* Size of the ClosingButton
|
|
11
|
-
* @default
|
|
12
|
+
* @default default
|
|
12
13
|
*/
|
|
13
14
|
size?: ClosingButtonSize;
|
|
14
15
|
/**
|
|
@@ -16,6 +17,7 @@ export interface ClosingButtonProps extends ButtonHTMLAttributes<HTMLButtonEleme
|
|
|
16
17
|
*/
|
|
17
18
|
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
18
19
|
title?: string;
|
|
20
|
+
color?: ClosingButtonColor;
|
|
19
21
|
iconSize?: ClosingButtonIconSize;
|
|
20
22
|
}
|
|
21
23
|
export declare const ClosingButton: (props: ClosingButtonProps) => JSX.Element;
|
|
@@ -1,27 +1,37 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { Icon as
|
|
4
|
-
import
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import d from "../../../../../external/classnames/index.es.js";
|
|
3
|
+
import { Icon as p } from "../../base/icon/icon.es.js";
|
|
4
|
+
import o from "./closing-button.module.scss.es.js";
|
|
5
5
|
import { useLabels as f } from "../../../providers/label-provider/use-labels.es.js";
|
|
6
|
-
const I = (
|
|
7
|
-
const { getLabel:
|
|
8
|
-
|
|
6
|
+
const I = (c) => {
|
|
7
|
+
const { getLabel: r } = f(), {
|
|
8
|
+
title: e = r("close"),
|
|
9
|
+
onClick: a,
|
|
10
|
+
size: t = "default",
|
|
11
|
+
iconSize: s = 24,
|
|
12
|
+
color: n = "primary",
|
|
13
|
+
className: m,
|
|
14
|
+
...u
|
|
15
|
+
} = c, l = s === 18 ? "small" : t, b = d(
|
|
16
|
+
o["tedi-closing-button"],
|
|
9
17
|
{
|
|
10
|
-
[
|
|
18
|
+
[o[`tedi-closing-button--${t}`]]: t,
|
|
19
|
+
[o[`tedi-closing-button--color-${n}`]]: n,
|
|
20
|
+
[o[`tedi-closing-button--${l}`]]: l
|
|
11
21
|
},
|
|
12
|
-
|
|
22
|
+
m
|
|
13
23
|
);
|
|
14
|
-
return /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ i(
|
|
15
25
|
"button",
|
|
16
26
|
{
|
|
17
27
|
"data-name": "closing-button",
|
|
18
28
|
type: "button",
|
|
19
|
-
...
|
|
20
|
-
className:
|
|
29
|
+
...u,
|
|
30
|
+
className: b,
|
|
21
31
|
onClick: a,
|
|
22
|
-
title:
|
|
23
|
-
"aria-label":
|
|
24
|
-
children: /* @__PURE__ */
|
|
32
|
+
title: e,
|
|
33
|
+
"aria-label": e,
|
|
34
|
+
children: /* @__PURE__ */ i(p, { name: "close", size: s ?? 24, color: "inherit" })
|
|
25
35
|
}
|
|
26
36
|
);
|
|
27
37
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t={"tedi-closing-button":"tedi-closing-button-358111e2","tedi-closing-button--default":"tedi-closing-button--default-22ed12be","tedi-closing-button--small":"tedi-closing-button--small-0e85c3e2"};exports.default=t;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t={"tedi-closing-button":"tedi-closing-button-358111e2","tedi-closing-button--default":"tedi-closing-button--default-22ed12be","tedi-closing-button--small":"tedi-closing-button--small-0e85c3e2","tedi-closing-button--color-primary":"tedi-closing-button--color-primary-354c7441","tedi-closing-button--color-brand":"tedi-closing-button--color-brand-3b2d68a9","tedi-closing-button--color-white":"tedi-closing-button--color-white-be57bd0e"};exports.default=t;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
const t = {
|
|
2
2
|
"tedi-closing-button": "tedi-closing-button-358111e2",
|
|
3
3
|
"tedi-closing-button--default": "tedi-closing-button--default-22ed12be",
|
|
4
|
-
"tedi-closing-button--small": "tedi-closing-button--small-0e85c3e2"
|
|
4
|
+
"tedi-closing-button--small": "tedi-closing-button--small-0e85c3e2",
|
|
5
|
+
"tedi-closing-button--color-primary": "tedi-closing-button--color-primary-354c7441",
|
|
6
|
+
"tedi-closing-button--color-brand": "tedi-closing-button--color-brand-3b2d68a9",
|
|
7
|
+
"tedi-closing-button--color-white": "tedi-closing-button--color-white-be57bd0e"
|
|
5
8
|
};
|
|
6
9
|
export {
|
|
7
10
|
t as default
|