@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tedi-design-system/react",
3
- "version": "16.0.0-rc.13",
3
+ "version": "16.0.0-rc.14",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "exports": {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),m=require("../../../../../external/classnames/index.cjs.js"),f=require("../../base/icon/icon.cjs.js"),n=require("./closing-button.module.scss.cjs.js"),q=require("../../../providers/label-provider/use-labels.cjs.js"),l=i=>{const{getLabel:u}=q.useLabels(),{title:e=u("close"),onClick:c,size:a="default",iconSize:t=24,className:r,...d}=i,s=t===18?"small":a,b=m.default(n.default["tedi-closing-button"],{[n.default[`tedi-closing-button--${s}`]]:s},r),g=t??24;return o.jsx("button",{"data-name":"closing-button",type:"button",...d,className:b,onClick:c,title:e,"aria-label":e,children:o.jsx(f.Icon,{name:"close",size:g})})};exports.ClosingButton=l;exports.default=l;
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 '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 s } from "react/jsx-runtime";
2
- import b from "../../../../../external/classnames/index.es.js";
3
- import { Icon as d } from "../../base/icon/icon.es.js";
4
- import n from "./closing-button.module.scss.es.js";
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 = (l) => {
7
- const { getLabel: i } = f(), { title: o = i("close"), onClick: a, size: c = "default", iconSize: t = 24, className: r, ...m } = l, e = t === 18 ? "small" : c, u = b(
8
- n["tedi-closing-button"],
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
- [n[`tedi-closing-button--${e}`]]: e
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
- r
22
+ m
13
23
  );
14
- return /* @__PURE__ */ s(
24
+ return /* @__PURE__ */ i(
15
25
  "button",
16
26
  {
17
27
  "data-name": "closing-button",
18
28
  type: "button",
19
- ...m,
20
- className: u,
29
+ ...u,
30
+ className: b,
21
31
  onClick: a,
22
- title: o,
23
- "aria-label": o,
24
- children: /* @__PURE__ */ s(d, { name: "close", size: t ?? 24 })
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