@tedi-design-system/react 17.0.0-rc.2 → 17.0.0-rc.3

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.
Files changed (40) hide show
  1. package/_virtual/index.cjs10.js +1 -1
  2. package/_virtual/index.cjs11.js +1 -1
  3. package/_virtual/index.cjs12.js +1 -1
  4. package/_virtual/index.cjs13.js +1 -1
  5. package/_virtual/index.cjs5.js +1 -1
  6. package/_virtual/index.cjs6.js +1 -1
  7. package/_virtual/index.cjs7.js +1 -1
  8. package/_virtual/index.cjs8.js +1 -1
  9. package/_virtual/index.cjs9.js +1 -1
  10. package/_virtual/index.es10.js +1 -1
  11. package/_virtual/index.es11.js +1 -1
  12. package/_virtual/index.es12.js +1 -1
  13. package/_virtual/index.es13.js +4 -2
  14. package/_virtual/index.es14.js +2 -2
  15. package/_virtual/index.es5.js +2 -4
  16. package/_virtual/index.es6.js +1 -1
  17. package/_virtual/index.es7.js +1 -1
  18. package/_virtual/index.es8.js +1 -1
  19. package/_virtual/index.es9.js +1 -1
  20. package/bundle-stats.html +1 -1
  21. package/external/@mui/system/colorManipulator.cjs.js +1 -1
  22. package/external/@mui/system/colorManipulator.es.js +2 -2
  23. package/external/@mui/system/createStyled.cjs.js +1 -1
  24. package/external/@mui/system/createStyled.es.js +6 -6
  25. package/external/@mui/system/useThemeWithoutDefault.cjs.js +1 -1
  26. package/external/@mui/system/useThemeWithoutDefault.es.js +1 -1
  27. package/external/react-is/index.cjs.js +1 -1
  28. package/external/react-is/index.es.js +1 -1
  29. package/external/toposort/index.cjs.js +1 -1
  30. package/external/toposort/index.es.js +1 -1
  31. package/index.css +1 -1
  32. package/package.json +1 -1
  33. package/src/tedi/components/cards/card/card.cjs.js +1 -1
  34. package/src/tedi/components/cards/card/card.d.ts +14 -9
  35. package/src/tedi/components/cards/card/card.es.js +25 -25
  36. package/src/tedi/components/cards/card/card.module.scss.cjs.js +1 -1
  37. package/src/tedi/components/cards/card/card.module.scss.es.js +6 -6
  38. package/src/tedi/components/cards/card/utility.cjs.js +1 -1
  39. package/src/tedi/components/cards/card/utility.d.ts +17 -0
  40. package/src/tedi/components/cards/card/utility.es.js +35 -14
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tedi-design-system/react",
3
- "version": "17.0.0-rc.2",
3
+ "version": "17.0.0-rc.3",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "exports": {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),g=require("../../../../../external/classnames/index.cjs.js"),q=require("react"),r=require("./card.module.scss.cjs.js"),P=require("./card-content/card-content.cjs.js"),x=require("./card-context.cjs.js"),B=require("./card-header/card-header.cjs.js"),N=require("./card-notification/card-notification.cjs.js"),j=require("./utility.cjs.js"),k=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),n=q.forwardRef((t,i)=>{const{getCurrentBreakpointProps:c}=k.useBreakpointProps(t.defaultServerBreakpoint),{children:s,className:l,padding:u,background:f,borderRadius:e,borderless:C,border:m,...p}=c(t,{padding:1}),[a,d]=j.getCardBorderPlacementColor(m),b=g.default(r.default["tedi-card"],{[r.default[`tedi-card--border-${a}`]]:a,[r.default[`tedi-card--border--${d}`]]:d,[r.default["tedi-card--borderless"]]:C,[r.default["tedi-card--no-border-radius-top"]]:e===!1||(e==null?void 0:e.top)===!1,[r.default["tedi-card--no-border-radius-right"]]:e===!1||(e==null?void 0:e.right)===!1,[r.default["tedi-card--no-border-radius-bottom"]]:e===!1||(e==null?void 0:e.bottom)===!1,[r.default["tedi-card--no-border-radius-left"]]:e===!1||(e==null?void 0:e.left)===!1},l);return o.jsx(x.CardContext.Provider,{value:{padding:u,background:f},children:o.jsx("div",{"data-name":"card","data-testid":"tedi-card",...p,className:b,ref:i,children:s})})});n.displayName="Card";const v=Object.assign(n,{Content:P.CardContent,Header:B.CardHeader,Notification:N.CardNotification});exports.Card=v;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),B=require("../../../../../external/classnames/index.cjs.js"),P=require("react"),e=require("./card.module.scss.cjs.js"),R=require("./card-content/card-content.cjs.js"),v=require("./card-context.cjs.js"),x=require("./card-header/card-header.cjs.js"),N=require("./card-notification/card-notification.cjs.js"),i=require("./utility.cjs.js"),j=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),n=P.forwardRef((t,c)=>{const{getCurrentBreakpointProps:s}=j.useBreakpointProps(t.defaultServerBreakpoint),{children:u,className:l,padding:f,background:C,borderRadius:b,borderless:m,border:p,...g}=s(t,{padding:1}),[d,a]=i.getCardBorderPlacementColor(p),r=i.resolveBorderRadius(b),q=B.default(e.default["tedi-card"],{[e.default[`tedi-card--border-${d}`]]:d,[e.default[`tedi-card--border--${a}`]]:a,[e.default["tedi-card--borderless"]]:m,[e.default["tedi-card--no-radius-tl"]]:!r.topLeft,[e.default["tedi-card--no-radius-tr"]]:!r.topRight,[e.default["tedi-card--no-radius-br"]]:!r.bottomRight,[e.default["tedi-card--no-radius-bl"]]:!r.bottomLeft},l);return o.jsx(v.CardContext.Provider,{value:{padding:f,background:C},children:o.jsx("div",{"data-name":"card","data-testid":"tedi-card",...g,className:q,ref:c,children:u})})});n.displayName="Card";const k=Object.assign(n,{Content:R.CardContent,Header:x.CardHeader,Notification:N.CardNotification});exports.Card=k;
@@ -1,7 +1,7 @@
1
1
  import { default as React, CSSProperties } from 'react';
2
2
  import { BreakpointSupport } from '../../../helpers';
3
3
  import { CardContentProps } from './card-content/card-content';
4
- import { CardBackground, CardBorderType, CardContentPaddingNumber } from './utility';
4
+ import { BorderRadius, CardBackground, CardBorderType, CardContentPaddingNumber } from './utility';
5
5
  export type CardContentPadding = CardContentPaddingNumber | {
6
6
  vertical: CardContentPaddingNumber;
7
7
  horizontal: CardContentPaddingNumber;
@@ -56,15 +56,20 @@ type CardBreakpointProps = {
56
56
  */
57
57
  className?: string;
58
58
  /**
59
- * Follows the order in border-radius CSS property
60
- * Top-left / Top-right / Bottom-right / Bottom-left
59
+ * Controls card border radius.
60
+ *
61
+ * Accepts `false` to remove all radius or an object to control sides or individual corners.
62
+ *
63
+ * Side values affect two corners while corner values take precedence.
64
+ *
65
+ * Examples:
66
+ * `false` → no radius
67
+ * `{ top:false }` → removes top corners
68
+ * `{ left:false }` → removes left corners
69
+ * `{ topLeft:false }` → removes one corner
70
+ * `{ bottom:false, bottomRight:true }` → corner override
61
71
  */
62
- borderRadius?: false | {
63
- top?: boolean;
64
- right?: boolean;
65
- bottom?: boolean;
66
- left?: boolean;
67
- };
72
+ borderRadius?: BorderRadius;
68
73
  /**
69
74
  * Remove border from card
70
75
  */
@@ -1,34 +1,34 @@
1
- import { jsx as d } from "react/jsx-runtime";
2
- import N from "../../../../../external/classnames/index.es.js";
3
- import { forwardRef as B } from "react";
4
- import e from "./card.module.scss.es.js";
5
- import { CardContent as P } from "./card-content/card-content.es.js";
6
- import { CardContext as h } from "./card-context.es.js";
7
- import { CardHeader as k } from "./card-header/card-header.es.js";
8
- import { CardNotification as v } from "./card-notification/card-notification.es.js";
9
- import { getCardBorderPlacementColor as u } from "./utility.es.js";
10
- import { useBreakpointProps as x } from "../../../helpers/hooks/use-breakpoint-props.es.js";
11
- const i = B((t, n) => {
12
- const { getCurrentBreakpointProps: s } = x(t.defaultServerBreakpoint), { children: m, className: c, padding: f, background: l, borderRadius: r, borderless: p, border: C, ...b } = s(t, { padding: 1 }), [o, a] = u(C), g = N(
13
- e["tedi-card"],
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import B from "../../../../../external/classnames/index.es.js";
3
+ import { forwardRef as N } from "react";
4
+ import r from "./card.module.scss.es.js";
5
+ import { CardContent as v } from "./card-content/card-content.es.js";
6
+ import { CardContext as P } from "./card-context.es.js";
7
+ import { CardHeader as R } from "./card-header/card-header.es.js";
8
+ import { CardNotification as h } from "./card-notification/card-notification.es.js";
9
+ import { getCardBorderPlacementColor as k, resolveBorderRadius as x } from "./utility.es.js";
10
+ import { useBreakpointProps as j } from "../../../helpers/hooks/use-breakpoint-props.es.js";
11
+ const i = N((t, s) => {
12
+ const { getCurrentBreakpointProps: n } = j(t.defaultServerBreakpoint), { children: c, className: m, padding: p, background: l, borderRadius: f, borderless: C, border: b, ...u } = n(t, { padding: 1 }), [e, d] = k(b), o = x(f), g = B(
13
+ r["tedi-card"],
14
14
  {
15
- [e[`tedi-card--border-${o}`]]: o,
16
- [e[`tedi-card--border--${a}`]]: a,
17
- [e["tedi-card--borderless"]]: p,
18
- [e["tedi-card--no-border-radius-top"]]: r === !1 || (r == null ? void 0 : r.top) === !1,
19
- [e["tedi-card--no-border-radius-right"]]: r === !1 || (r == null ? void 0 : r.right) === !1,
20
- [e["tedi-card--no-border-radius-bottom"]]: r === !1 || (r == null ? void 0 : r.bottom) === !1,
21
- [e["tedi-card--no-border-radius-left"]]: r === !1 || (r == null ? void 0 : r.left) === !1
15
+ [r[`tedi-card--border-${e}`]]: e,
16
+ [r[`tedi-card--border--${d}`]]: d,
17
+ [r["tedi-card--borderless"]]: C,
18
+ [r["tedi-card--no-radius-tl"]]: !o.topLeft,
19
+ [r["tedi-card--no-radius-tr"]]: !o.topRight,
20
+ [r["tedi-card--no-radius-br"]]: !o.bottomRight,
21
+ [r["tedi-card--no-radius-bl"]]: !o.bottomLeft
22
22
  },
23
- c
23
+ m
24
24
  );
25
- return /* @__PURE__ */ d(h.Provider, { value: { padding: f, background: l }, children: /* @__PURE__ */ d("div", { "data-name": "card", "data-testid": "tedi-card", ...b, className: g, ref: n, children: m }) });
25
+ return /* @__PURE__ */ a(P.Provider, { value: { padding: p, background: l }, children: /* @__PURE__ */ a("div", { "data-name": "card", "data-testid": "tedi-card", ...u, className: g, ref: s, children: c }) });
26
26
  });
27
27
  i.displayName = "Card";
28
28
  const z = Object.assign(i, {
29
- Content: P,
30
- Header: k,
31
- Notification: v
29
+ Content: v,
30
+ Header: R,
31
+ Notification: h
32
32
  });
33
33
  export {
34
34
  z as Card
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r={"tedi-card":"tedi-card-6773201e","tedi-card--background--accent":"tedi-card--background--accent-a0ccccbf","tedi-card--border--accent":"tedi-card--border--accent-16076fd7","tedi-card--background--brand-primary":"tedi-card--background--brand-primary-2e729236","tedi-card--border--brand-primary":"tedi-card--border--brand-primary-0ebff366","tedi-card--background--brand-secondary":"tedi-card--background--brand-secondary-e0935065","tedi-card--border--brand-secondary":"tedi-card--border--brand-secondary-c8f172e4","tedi-card--background--brand-tertiary":"tedi-card--background--brand-tertiary-8d2f79f4","tedi-card--border--brand-tertiary":"tedi-card--border--brand-tertiary-cc06323c","tedi-card--background--brand-quaternary":"tedi-card--background--brand-quaternary-e35ff683","tedi-card--border--brand-quaternary":"tedi-card--border--brand-quaternary-fdf175e9","tedi-card--background--primary":"tedi-card--background--primary-6f518b6a","tedi-card--border--primary":"tedi-card--border--primary-3ee7b649","tedi-card--background--secondary":"tedi-card--background--secondary-402019fb","tedi-card--border--secondary":"tedi-card--border--secondary-b0de1d8c","tedi-card--background--tertiary":"tedi-card--background--tertiary-d57f4e16","tedi-card--border--tertiary":"tedi-card--border--tertiary-1846869a","tedi-card--background--info-primary":"tedi-card--background--info-primary-981c7808","tedi-card--border--info-primary":"tedi-card--border--info-primary-d73b0349","tedi-card--background--info-secondary":"tedi-card--background--info-secondary-118ce8d4","tedi-card--border--info-secondary":"tedi-card--border--info-secondary-25075005","tedi-card--background--neutral-primary":"tedi-card--background--neutral-primary-8b4fa913","tedi-card--border--neutral-primary":"tedi-card--border--neutral-primary-3c442023","tedi-card--background--neutral-secondary":"tedi-card--background--neutral-secondary-77a1899a","tedi-card--border--neutral-secondary":"tedi-card--border--neutral-secondary-2dd2db0a","tedi-card--background--success-primary":"tedi-card--background--success-primary-2e50333d","tedi-card--border--success-primary":"tedi-card--border--success-primary-167796e5","tedi-card--background--success-secondary":"tedi-card--background--success-secondary-5ef8094d","tedi-card--border--success-secondary":"tedi-card--border--success-secondary-5d3c8168","tedi-card--background--danger-primary":"tedi-card--background--danger-primary-a701ed87","tedi-card--border--danger-primary":"tedi-card--border--danger-primary-f0b990dd","tedi-card--background--danger-secondary":"tedi-card--background--danger-secondary-cbde6da8","tedi-card--border--danger-secondary":"tedi-card--border--danger-secondary-29b9cdf0","tedi-card--background--warning-primary":"tedi-card--background--warning-primary-92facd8b","tedi-card--border--warning-primary":"tedi-card--border--warning-primary-60cabe9b","tedi-card--background--warning-secondary":"tedi-card--background--warning-secondary-01e1cafe","tedi-card--border--warning-secondary":"tedi-card--border--warning-secondary-e4339e73","tedi-card--border-left":"tedi-card--border-left-d2bbe0cd","tedi-card--border-top":"tedi-card--border-top-4199f286","tedi-card--borderless":"tedi-card--borderless-8f44bb3f","tedi-card--no-border-radius-top":"tedi-card--no-border-radius-top-d8b0071d","tedi-card__content":"tedi-card__content-a40bc648","tedi-card--no-border-radius-right":"tedi-card--no-border-radius-right-52a78320","tedi-card--no-border-radius-bottom":"tedi-card--no-border-radius-bottom-59e75b25","tedi-card--no-border-radius-left":"tedi-card--no-border-radius-left-ff9938cb","tedi-card__content--separator":"tedi-card__content--separator-0019d413","tedi-card__header":"tedi-card__header-f7a4ed63"};exports.default=r;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r={"tedi-card":"tedi-card-6773201e","tedi-card--background--accent":"tedi-card--background--accent-a0ccccbf","tedi-card--border--accent":"tedi-card--border--accent-16076fd7","tedi-card--background--brand-primary":"tedi-card--background--brand-primary-2e729236","tedi-card--border--brand-primary":"tedi-card--border--brand-primary-0ebff366","tedi-card--background--brand-secondary":"tedi-card--background--brand-secondary-e0935065","tedi-card--border--brand-secondary":"tedi-card--border--brand-secondary-c8f172e4","tedi-card--background--brand-tertiary":"tedi-card--background--brand-tertiary-8d2f79f4","tedi-card--border--brand-tertiary":"tedi-card--border--brand-tertiary-cc06323c","tedi-card--background--brand-quaternary":"tedi-card--background--brand-quaternary-e35ff683","tedi-card--border--brand-quaternary":"tedi-card--border--brand-quaternary-fdf175e9","tedi-card--background--primary":"tedi-card--background--primary-6f518b6a","tedi-card--border--primary":"tedi-card--border--primary-3ee7b649","tedi-card--background--secondary":"tedi-card--background--secondary-402019fb","tedi-card--border--secondary":"tedi-card--border--secondary-b0de1d8c","tedi-card--background--tertiary":"tedi-card--background--tertiary-d57f4e16","tedi-card--border--tertiary":"tedi-card--border--tertiary-1846869a","tedi-card--background--info-primary":"tedi-card--background--info-primary-981c7808","tedi-card--border--info-primary":"tedi-card--border--info-primary-d73b0349","tedi-card--background--info-secondary":"tedi-card--background--info-secondary-118ce8d4","tedi-card--border--info-secondary":"tedi-card--border--info-secondary-25075005","tedi-card--background--neutral-primary":"tedi-card--background--neutral-primary-8b4fa913","tedi-card--border--neutral-primary":"tedi-card--border--neutral-primary-3c442023","tedi-card--background--neutral-secondary":"tedi-card--background--neutral-secondary-77a1899a","tedi-card--border--neutral-secondary":"tedi-card--border--neutral-secondary-2dd2db0a","tedi-card--background--success-primary":"tedi-card--background--success-primary-2e50333d","tedi-card--border--success-primary":"tedi-card--border--success-primary-167796e5","tedi-card--background--success-secondary":"tedi-card--background--success-secondary-5ef8094d","tedi-card--border--success-secondary":"tedi-card--border--success-secondary-5d3c8168","tedi-card--background--danger-primary":"tedi-card--background--danger-primary-a701ed87","tedi-card--border--danger-primary":"tedi-card--border--danger-primary-f0b990dd","tedi-card--background--danger-secondary":"tedi-card--background--danger-secondary-cbde6da8","tedi-card--border--danger-secondary":"tedi-card--border--danger-secondary-29b9cdf0","tedi-card--background--warning-primary":"tedi-card--background--warning-primary-92facd8b","tedi-card--border--warning-primary":"tedi-card--border--warning-primary-60cabe9b","tedi-card--background--warning-secondary":"tedi-card--background--warning-secondary-01e1cafe","tedi-card--border--warning-secondary":"tedi-card--border--warning-secondary-e4339e73","tedi-card--border-left":"tedi-card--border-left-d2bbe0cd","tedi-card--border-top":"tedi-card--border-top-4199f286","tedi-card--borderless":"tedi-card--borderless-8f44bb3f","tedi-card--no-radius-tl":"tedi-card--no-radius-tl-900ebe9c","tedi-card__header":"tedi-card__header-f7a4ed63","tedi-card__content":"tedi-card__content-a40bc648","tedi-card--no-radius-tr":"tedi-card--no-radius-tr-e87cc7aa","tedi-card--no-radius-br":"tedi-card--no-radius-br-0a933ce8","tedi-card--no-radius-bl":"tedi-card--no-radius-bl-b31d5f40","tedi-card__content--separator":"tedi-card__content--separator-0019d413"};exports.default=r;
@@ -39,13 +39,13 @@ const r = {
39
39
  "tedi-card--border-left": "tedi-card--border-left-d2bbe0cd",
40
40
  "tedi-card--border-top": "tedi-card--border-top-4199f286",
41
41
  "tedi-card--borderless": "tedi-card--borderless-8f44bb3f",
42
- "tedi-card--no-border-radius-top": "tedi-card--no-border-radius-top-d8b0071d",
42
+ "tedi-card--no-radius-tl": "tedi-card--no-radius-tl-900ebe9c",
43
+ "tedi-card__header": "tedi-card__header-f7a4ed63",
43
44
  "tedi-card__content": "tedi-card__content-a40bc648",
44
- "tedi-card--no-border-radius-right": "tedi-card--no-border-radius-right-52a78320",
45
- "tedi-card--no-border-radius-bottom": "tedi-card--no-border-radius-bottom-59e75b25",
46
- "tedi-card--no-border-radius-left": "tedi-card--no-border-radius-left-ff9938cb",
47
- "tedi-card__content--separator": "tedi-card__content--separator-0019d413",
48
- "tedi-card__header": "tedi-card__header-f7a4ed63"
45
+ "tedi-card--no-radius-tr": "tedi-card--no-radius-tr-e87cc7aa",
46
+ "tedi-card--no-radius-br": "tedi-card--no-radius-br-0a933ce8",
47
+ "tedi-card--no-radius-bl": "tedi-card--no-radius-bl-b31d5f40",
48
+ "tedi-card__content--separator": "tedi-card__content--separator-0019d413"
49
49
  };
50
50
  export {
51
51
  r as default
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=t=>{const n=t==null?void 0:t.replace(/(top-)|(left-)/s,"");return[t==null?void 0:t.replace(new RegExp(`(${n})|-`,"g"),""),n]},m=t=>{const n=e=>typeof e=="object"&&"vertical"in e&&"horizontal"in e;if(typeof t=="number")return{"--card-content-padding-top":`${t}rem`,"--card-content-padding-right":`${t}rem`,"--card-content-padding-bottom":`${t}rem`,"--card-content-padding-left":`${t}rem`};if(n(t)){const{vertical:e,horizontal:o}=t;return{"--card-content-padding-top":`${e}rem`,"--card-content-padding-right":`${o}rem`,"--card-content-padding-bottom":`${e}rem`,"--card-content-padding-left":`${o}rem`}}const{top:r=0,right:c=0,bottom:a=0,left:i=0}=t||{};return{"--card-content-padding-top":`${r}rem`,"--card-content-padding-right":`${c}rem`,"--card-content-padding-bottom":`${a}rem`,"--card-content-padding-left":`${i}rem`}};exports.getCardBorderPlacementColor=d;exports.getPaddingCssVariables=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=t=>{const o=t==null?void 0:t.replace(/(top-)|(left-)/s,"");return[t==null?void 0:t.replace(new RegExp(`(${o})|-`,"g"),""),o]},h=t=>{const o=e=>typeof e=="object"&&"vertical"in e&&"horizontal"in e;if(typeof t=="number")return{"--card-content-padding-top":`${t}rem`,"--card-content-padding-right":`${t}rem`,"--card-content-padding-bottom":`${t}rem`,"--card-content-padding-left":`${t}rem`};if(o(t)){const{vertical:e,horizontal:r}=t;return{"--card-content-padding-top":`${e}rem`,"--card-content-padding-right":`${r}rem`,"--card-content-padding-bottom":`${e}rem`,"--card-content-padding-left":`${r}rem`}}const{top:n=0,right:a=0,bottom:i=0,left:s=0}=t||{};return{"--card-content-padding-top":`${n}rem`,"--card-content-padding-right":`${a}rem`,"--card-content-padding-bottom":`${i}rem`,"--card-content-padding-left":`${s}rem`}},b=t=>{if(t===!1)return{topLeft:!1,topRight:!1,bottomRight:!1,bottomLeft:!1};const{top:o,right:n,bottom:a,left:i,topLeft:s,topRight:e,bottomRight:r,bottomLeft:g}=t??{},d=o!==!1,l=n!==!1,m=a!==!1,f=i!==!1,c={topLeft:d&&f,topRight:d&&l,bottomRight:m&&l,bottomLeft:m&&f};return{topLeft:s??c.topLeft,topRight:e??c.topRight,bottomRight:r??c.bottomRight,bottomLeft:g??c.bottomLeft}};exports.getCardBorderPlacementColor=p;exports.getPaddingCssVariables=h;exports.resolveBorderRadius=b;
@@ -22,3 +22,20 @@ export declare const getPaddingCssVariables: (padding: CardContentProps["padding
22
22
  '--card-content-padding-bottom': string;
23
23
  '--card-content-padding-left': string;
24
24
  };
25
+ export type BorderRadius = false | {
26
+ top?: boolean;
27
+ right?: boolean;
28
+ bottom?: boolean;
29
+ left?: boolean;
30
+ topLeft?: boolean;
31
+ topRight?: boolean;
32
+ bottomRight?: boolean;
33
+ bottomLeft?: boolean;
34
+ };
35
+ export type ResolvedCorners = {
36
+ topLeft: boolean;
37
+ topRight: boolean;
38
+ bottomRight: boolean;
39
+ bottomLeft: boolean;
40
+ };
41
+ export declare const resolveBorderRadius: (config?: BorderRadius) => ResolvedCorners;
@@ -1,8 +1,8 @@
1
- const d = (t) => {
1
+ const g = (t) => {
2
2
  const e = t == null ? void 0 : t.replace(/(top-)|(left-)/s, "");
3
3
  return [t == null ? void 0 : t.replace(new RegExp(`(${e})|-`, "g"), ""), e];
4
- }, m = (t) => {
5
- const e = (n) => typeof n == "object" && "vertical" in n && "horizontal" in n;
4
+ }, h = (t) => {
5
+ const e = (o) => typeof o == "object" && "vertical" in o && "horizontal" in o;
6
6
  if (typeof t == "number")
7
7
  return {
8
8
  "--card-content-padding-top": `${t}rem`,
@@ -11,23 +11,44 @@ const d = (t) => {
11
11
  "--card-content-padding-left": `${t}rem`
12
12
  };
13
13
  if (e(t)) {
14
- const { vertical: n, horizontal: o } = t;
14
+ const { vertical: o, horizontal: r } = t;
15
15
  return {
16
- "--card-content-padding-top": `${n}rem`,
17
- "--card-content-padding-right": `${o}rem`,
18
- "--card-content-padding-bottom": `${n}rem`,
19
- "--card-content-padding-left": `${o}rem`
16
+ "--card-content-padding-top": `${o}rem`,
17
+ "--card-content-padding-right": `${r}rem`,
18
+ "--card-content-padding-bottom": `${o}rem`,
19
+ "--card-content-padding-left": `${r}rem`
20
20
  };
21
21
  }
22
- const { top: c = 0, right: r = 0, bottom: a = 0, left: i = 0 } = t || {};
22
+ const { top: n = 0, right: i = 0, bottom: a = 0, left: s = 0 } = t || {};
23
23
  return {
24
- "--card-content-padding-top": `${c}rem`,
25
- "--card-content-padding-right": `${r}rem`,
24
+ "--card-content-padding-top": `${n}rem`,
25
+ "--card-content-padding-right": `${i}rem`,
26
26
  "--card-content-padding-bottom": `${a}rem`,
27
- "--card-content-padding-left": `${i}rem`
27
+ "--card-content-padding-left": `${s}rem`
28
+ };
29
+ }, b = (t) => {
30
+ if (t === !1)
31
+ return {
32
+ topLeft: !1,
33
+ topRight: !1,
34
+ bottomRight: !1,
35
+ bottomLeft: !1
36
+ };
37
+ const { top: e, right: n, bottom: i, left: a, topLeft: s, topRight: o, bottomRight: r, bottomLeft: l } = t ?? {}, m = e !== !1, f = n !== !1, p = i !== !1, d = a !== !1, c = {
38
+ topLeft: m && d,
39
+ topRight: m && f,
40
+ bottomRight: p && f,
41
+ bottomLeft: p && d
42
+ };
43
+ return {
44
+ topLeft: s ?? c.topLeft,
45
+ topRight: o ?? c.topRight,
46
+ bottomRight: r ?? c.bottomRight,
47
+ bottomLeft: l ?? c.bottomLeft
28
48
  };
29
49
  };
30
50
  export {
31
- d as getCardBorderPlacementColor,
32
- m as getPaddingCssVariables
51
+ g as getCardBorderPlacementColor,
52
+ h as getPaddingCssVariables,
53
+ b as resolveBorderRadius
33
54
  };