@shmidko61/lc-ui-kit 0.1.0 → 0.3.0

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/dist/accordion.js +1 -3
  2. package/dist/box/box.d.ts +2 -2
  3. package/dist/box/box.types.d.ts +2 -2
  4. package/dist/box.cjs +1 -1
  5. package/dist/box.js +176 -137
  6. package/dist/button/button.d.ts +1 -1
  7. package/dist/button/button.helpers.d.ts +1 -1
  8. package/dist/flex/flex.d.ts +1 -1
  9. package/dist/flex/flex.types.d.ts +1 -1
  10. package/dist/grid.cjs +1 -1
  11. package/dist/grid.js +66 -64
  12. package/dist/icons.cjs +1 -1
  13. package/dist/icons.js +2 -2
  14. package/dist/index.cjs +1 -1
  15. package/dist/index.d.ts +4 -4
  16. package/dist/index.js +24 -24
  17. package/dist/media-card.cjs +1 -1
  18. package/dist/media-card.js +42 -42
  19. package/dist/media-gallery/media-gallery.types.d.ts +1 -1
  20. package/dist/modal/modal.d.ts +1 -1
  21. package/dist/modal.cjs +1 -1
  22. package/dist/modal.js +10 -8
  23. package/dist/select/select.d.ts +1 -1
  24. package/dist/select/select.helpers.d.ts +1 -1
  25. package/dist/shared/lib/cn.d.ts +1 -1
  26. package/dist/shared/responsive-style/responsive-style.types.d.ts +1 -1
  27. package/dist/styles.css +1 -1
  28. package/dist/table/table.d.ts +3 -3
  29. package/dist/table/table.types.d.ts +2 -2
  30. package/dist/types/interaction.types.d.ts +11 -0
  31. package/dist/types/layout.types.d.ts +69 -0
  32. package/dist/types/shared.types.d.ts +7 -0
  33. package/dist/types/visual.types.d.ts +29 -0
  34. package/dist/typography/typography.d.ts +1 -1
  35. package/dist/typography/typography.helpers.d.ts +1 -1
  36. package/dist/ui-kit-provider.cjs +1 -1
  37. package/dist/ui-kit-provider.js +1 -1
  38. package/package.json +3 -3
  39. /package/dist/{types.cjs → types-entry.cjs} +0 -0
  40. /package/dist/{types.js → types-entry.js} +0 -0
package/dist/accordion.js CHANGED
@@ -15,9 +15,7 @@ function ae() {
15
15
  throw new Error("Accordion.Item должен использоваться внутри Accordion.");
16
16
  return t;
17
17
  }
18
- function ie({
19
- children: t
20
- }) {
18
+ function ie({ children: t }) {
21
19
  return /* @__PURE__ */ e(l, { align: "center", gap: 16, justify: "space-between", width: "100%", children: t });
22
20
  }
23
21
  function ce({
package/dist/box/box.d.ts CHANGED
@@ -8,5 +8,5 @@ type BoxComponentType = {
8
8
  displayName?: string;
9
9
  };
10
10
  export declare const Box: BoxComponentType;
11
- export type { BoxAs, BoxBackgroundValue, BoxBreakpointProps, BoxComponentProps, BoxProps } from './box.types';
12
- export type { BorderRadiusItem, BorderRadiusKeys, BorderRadiusSides, BorderWidthItem, BorderWidthSides, PositionValue, UiKitAnyIndentationMargin, UiKitAnyIndentationPadding, UiKitArrayIndentation, UiKitAxisIndentationMargin, UiKitAxisIndentationPadding, UiKitDimensionProps, UiKitIndentations, UiKitIndentationsProps, UiKitMarginArrayIndentation, UiKitMarginIndentation, UiKitBackgroundProps, UiKitBorderColor, UiKitBorderProps, UiKitBorderRadius, UiKitBorderWidth, UiKitCursorProps, UiKitDisplayProps, UiKitListStyleProps, UiKitMixedXAxisIndentationMargin, UiKitMixedXAxisIndentationPadding, UiKitMixedYAxisIndentationMargin, UiKitMixedYAxisIndentationPadding, UiKitOutlineProps, UiKitPositionProps, } from '../types/index';
11
+ export type { BorderRadiusItem, BorderRadiusKeys, BorderRadiusSides, BorderWidthItem, BorderWidthSides, PositionValue, UiKitAnyIndentationMargin, UiKitAnyIndentationPadding, UiKitArrayIndentation, UiKitAspectRatioProps, UiKitAspectRatioValue, UiKitAxisIndentationMargin, UiKitAxisIndentationPadding, UiKitBackgroundProps, UiKitBorderColor, UiKitBorderProps, UiKitBorderRadius, UiKitBorderWidth, UiKitBoxShadowProps, UiKitBoxShadowValue, UiKitColorProps, UiKitColorValue, UiKitCursorProps, UiKitDimensionProps, UiKitDisplayProps, UiKitIndentations, UiKitIndentationsProps, UiKitListStyleProps, UiKitMarginArrayIndentation, UiKitMarginIndentation, UiKitMixedXAxisIndentationMargin, UiKitMixedXAxisIndentationPadding, UiKitMixedYAxisIndentationMargin, UiKitMixedYAxisIndentationPadding, UiKitOpacityProps, UiKitOpacityValue, UiKitOutlineProps, UiKitOverflowProps, UiKitOverflowValue, UiKitPointerEventsProps, UiKitPointerEventsValue, UiKitPositionProps, UiKitTransformOriginValue, UiKitTransformProps, UiKitTransformValue, } from '../types';
12
+ export type { BoxAs, BoxBackgroundValue, BoxBreakpointProps, BoxComponentProps, BoxProps, } from './box.types';
@@ -1,6 +1,6 @@
1
1
  import { ComponentPropsWithoutRef, ElementType, ReactNode } from 'react';
2
2
  import { ResponsiveStyleBreakpoint } from '../shared/responsive-style/responsive-style.types';
3
- import { UiKitBackgroundProps, UiKitBackgroundValue, UiKitBorderProps, UiKitCursorProps, UiKitDimensionProps, UiKitIndentationsProps, UiKitDisplayProps, UiKitListStyleProps, UiKitOutlineProps, UiKitPositionProps } from '../types/index';
3
+ import { UiKitAspectRatioProps, UiKitBackgroundProps, UiKitBackgroundValue, UiKitBorderProps, UiKitBoxShadowProps, UiKitColorProps, UiKitCursorProps, UiKitDimensionProps, UiKitDisplayProps, UiKitIndentationsProps, UiKitListStyleProps, UiKitOpacityProps, UiKitOutlineProps, UiKitOverflowProps, UiKitPointerEventsProps, UiKitPositionProps, UiKitTransformProps } from '../types';
4
4
  /**
5
5
  * Допустимые HTML-теги для Box.
6
6
  *
@@ -20,7 +20,7 @@ export type BoxBackgroundValue = UiKitBackgroundValue;
20
20
  /**
21
21
  * Стилевые props, общие для base-состояния и responsive overrides.
22
22
  */
23
- export type BoxStyleProps = UiKitDisplayProps & UiKitPositionProps & UiKitBackgroundProps & UiKitCursorProps & UiKitIndentationsProps & UiKitOutlineProps & UiKitListStyleProps & UiKitDimensionProps;
23
+ export type BoxStyleProps = UiKitDisplayProps & UiKitPositionProps & UiKitOverflowProps & UiKitAspectRatioProps & UiKitTransformProps & UiKitColorProps & UiKitOpacityProps & UiKitPointerEventsProps & UiKitBoxShadowProps & UiKitBackgroundProps & UiKitCursorProps & UiKitIndentationsProps & UiKitOutlineProps & UiKitListStyleProps & UiKitDimensionProps;
24
24
  /**
25
25
  * Собственные стилевые props Box поверх общих контрактов ui-kit.
26
26
  */
package/dist/box.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react/jsx-runtime"),F=require("react"),j=require("./responsive-style.config-B2m9jVlX.cjs");function J({background:t,backgroundColor:o,bg:i,bgSize:d,bgRepeat:f,bgPosition:a,border:h,cursor:u,p:s,m,outlineColor:l,outlineWidth:c,outlineOffset:b,outlineStyle:v,listStyle:p,display:y,position:r,width:R,maxWidth:x,minWidth:k,height:S,maxHeight:z,minHeight:W}){const e={};return i!==void 0?lo(e,i):t!==void 0&&(e.background=T(t)),o!==void 0&&(e.backgroundColor=T(o)),d!==void 0&&(e.backgroundSize=ao(d)),f!==void 0&&(e.backgroundRepeat=co(f)),a!==void 0&&(e.backgroundPosition=so(a)),io(e,h),u!==void 0&&(e.cursor=u),oo(e,s),to(e,m),l!==void 0&&(e.outlineColor=N(l)),c!==void 0&&(e.outlineWidth=c),b!==void 0&&(e.outlineOffset=b),v!==void 0&&(e.outlineStyle=v),p?.position!==void 0&&(e.listStylePosition=p.position),p?.type!==void 0&&(e.listStyleType=p.type),y!==void 0&&(e.display=fo(y)),r?.type!==void 0&&(e.position=r.type),r?.top!==void 0&&(e.top=C(r.top)),r?.left!==void 0&&(e.left=C(r.left)),r?.right!==void 0&&(e.right=C(r.right)),r?.bottom!==void 0&&(e.bottom=C(r.bottom)),r?.zIndex!==void 0&&(e.zIndex=r.zIndex),R!==void 0&&(e.width=g(R)),x!==void 0&&(e.maxWidth=g(x)),k!==void 0&&(e.minWidth=g(k)),S!==void 0&&(e.height=g(S)),z!==void 0&&(e.maxHeight=g(z)),W!==void 0&&(e.minHeight=g(W)),Object.keys(e).length>0?e:void 0}function Q(t){const o=[],i={},d=t.groupParent===!0;P(t,o,i,"","",d);for(const f of j.responsiveBreakpoints){const a=t[f];a&&P(a,o,i,`${f}:`,`${f}-`,d)}return{className:o.join(" "),style:Object.keys(i).length>0?i:void 0}}function P(t,o,i,d="",f="",a=!1){const h=J(t);for(const[u,s]of Object.entries(h??{})){if(s==null)continue;const m=String(s),l=U(u,m);if(l){o.push(`${d}${l}`);continue}const c=`${f}${Y(u)}`,b=X(u,c);b&&(i[`--${c}`]=m,o.push(`${d}${b}`))}if(t.bgGroup!==void 0){const u=`${f}group-background`;i[`--${u}`]=T(t.bgGroup),o.push(`${d}group-hover:[background:var(--${u})]`),a&&o.push(`${d}hover:[background:var(--${u})]`)}}function U(t,o){if(t==="display")return o==="none"?"hidden":o;if(t==="position")return o==="inherit"?"[position:inherit]":o;if(t==="cursor")return`cursor-${o}`;if(t==="backgroundRepeat")return{"no-repeat":"bg-no-repeat",repeat:"bg-repeat",round:"bg-repeat-round",space:"bg-repeat-space","repeat-x":"bg-repeat-x","repeat-y":"bg-repeat-y"}[o];if(t==="backgroundSize")return{auto:"bg-auto",contain:"bg-contain",cover:"bg-cover"}[o];if(t==="backgroundPosition")return{bottom:"bg-bottom",center:"bg-center",left:"bg-left","left bottom":"bg-left-bottom","left top":"bg-left-top",right:"bg-right","right bottom":"bg-right-bottom","right top":"bg-right-top",top:"bg-top"}[o];if(t==="borderStyle")return o==="none"?"border-none":`border-${o}`;if(t==="outlineStyle")return o==="none"?"outline-none":`outline-${o}`;if(t==="listStylePosition")return`list-${o}`;if(t==="listStyleType")return`list-${o}`}function X(t,o){const i=`var(--${o})`;return{background:`[background:${i}]`,backgroundColor:`bg-[${i}]`,backgroundPosition:`bg-[position:${i}]`,backgroundSize:`bg-[length:${i}]`,borderBottomLeftRadius:`rounded-bl-[${i}]`,borderBottomRightRadius:`rounded-br-[${i}]`,borderBottomWidth:`border-b-[length:${i}]`,borderColor:`border-[color:${i}]`,borderLeftWidth:`border-l-[length:${i}]`,borderRadius:`rounded-[${i}]`,borderRightWidth:`border-r-[length:${i}]`,borderTopLeftRadius:`rounded-tl-[${i}]`,borderTopRightRadius:`rounded-tr-[${i}]`,borderTopWidth:`border-t-[length:${i}]`,borderWidth:`border-[length:${i}]`,bottom:`bottom-[${i}]`,height:`h-[${i}]`,left:`left-[${i}]`,margin:`m-[${i}]`,marginBottom:`mb-[${i}]`,marginLeft:`ml-[${i}]`,marginRight:`mr-[${i}]`,marginTop:`mt-[${i}]`,maxHeight:`max-h-[${i}]`,maxWidth:`max-w-[${i}]`,minHeight:`min-h-[${i}]`,minWidth:`min-w-[${i}]`,outlineColor:`outline-[color:${i}]`,outlineOffset:`outline-offset-[${i}]`,outlineWidth:`outline-[length:${i}]`,padding:`p-[${i}]`,paddingBottom:`pb-[${i}]`,paddingLeft:`pl-[${i}]`,paddingRight:`pr-[${i}]`,paddingTop:`pt-[${i}]`,right:`right-[${i}]`,top:`top-[${i}]`,width:`w-[${i}]`,zIndex:`z-[${i}]`}[t]}function Y(t){return t.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`)}function oo(t,o){if(o!==void 0){if(Array.isArray(o)){t.padding=o.map(n).join(" ");return}if(typeof o!="object"){t.padding=n(o);return}"px"in o&&o.px!==void 0&&(t.paddingLeft=n(o.px),t.paddingRight=n(o.px)),"py"in o&&o.py!==void 0&&(t.paddingTop=n(o.py),t.paddingBottom=n(o.py)),"pt"in o&&o.pt!==void 0&&(t.paddingTop=n(o.pt)),"pb"in o&&o.pb!==void 0&&(t.paddingBottom=n(o.pb)),"pl"in o&&o.pl!==void 0&&(t.paddingLeft=n(o.pl)),"pr"in o&&o.pr!==void 0&&(t.paddingRight=n(o.pr))}}function to(t,o){if(o!==void 0){if(Array.isArray(o)){t.margin=o.map(n).join(" ");return}if(typeof o!="object"){t.margin=n(o);return}"mx"in o&&o.mx!==void 0&&(t.marginLeft=n(o.mx),t.marginRight=n(o.mx)),"my"in o&&o.my!==void 0&&(t.marginTop=n(o.my),t.marginBottom=n(o.my)),"mt"in o&&o.mt!==void 0&&(t.marginTop=n(o.mt)),"mb"in o&&o.mb!==void 0&&(t.marginBottom=n(o.mb)),"ml"in o&&o.ml!==void 0&&(t.marginLeft=n(o.ml)),"mr"in o&&o.mr!==void 0&&(t.marginRight=n(o.mr))}}function io(t,o){o&&(o.radius!==void 0&&eo(t,o.radius),o.color!==void 0&&(t.borderColor=N(o.color)),o.width!==void 0&&no(t,o.width),o.style!==void 0&&(t.borderStyle=o.style))}function eo(t,o){if(ro(o)){o.topLeft!==void 0&&(t.borderTopLeftRadius=$(o.topLeft)),o.topRight!==void 0&&(t.borderTopRightRadius=$(o.topRight)),o.bottomLeft!==void 0&&(t.borderBottomLeftRadius=$(o.bottomLeft)),o.bottomRight!==void 0&&(t.borderBottomRightRadius=$(o.bottomRight));return}t.borderRadius=$(o)}function no(t,o){if(uo(o)){o.top!==void 0&&(t.borderTopWidth=B(o.top)),o.bottom!==void 0&&(t.borderBottomWidth=B(o.bottom)),o.left!==void 0&&(t.borderLeftWidth=B(o.left)),o.right!==void 0&&(t.borderRightWidth=B(o.right));return}t.borderWidth=B(o)}function ro(t){return typeof t=="object"}function uo(t){return typeof t=="object"}function $(t){return t.startsWith("--")?`var(${t})`:t}function B(t){return t.startsWith("--")?`var(${t})`:t}function fo(t){return t==="hidden"?"none":t}function C(t){return typeof t=="number"?`${t}px`:t}function n(t){return typeof t=="number"?`${t}px`:t}function g(t){return typeof t=="number"?`${t}px`:t}function ao(t){return typeof t=="number"?`${t}px`:t}function co(t){return{"no-repeat":"no-repeat",repeat:"repeat","repeat-round":"round","repeat-space":"space","repeat-x":"repeat-x","repeat-y":"repeat-y"}[t]}function so(t){return t.replace("-"," ")}function T(t){return N(t)}function lo(t,o){const i=T(o);if(bo(o)){t.background=i;return}t.backgroundColor=i}function bo(t){const o=t.trim().toLowerCase();return o.includes("url(")||o.includes("gradient(")||o.includes("image-set(")||o.includes("cross-fade(")||o.includes("element(")||o.includes("paint(")}function N(t){return t.startsWith("--")?`var(${t})`:t}function mo(t,o){const{as:i,children:d,className:f,background:a,backgroundColor:h,bg:u,bgSize:s,bgRepeat:m,bgGroup:l,groupParent:c,bgPosition:b,border:v,cursor:p,p:y,m:r,outlineColor:R,outlineWidth:x,outlineOffset:k,outlineStyle:S,listStyle:z,display:W,position:e,width:I,maxWidth:w,minWidth:O,height:A,maxHeight:G,minHeight:H,md:q,lg:D,xl:M,style:V,...K}=t,Z=i??"div",L=Q({background:a,backgroundColor:h,bg:u,bgSize:s,bgRepeat:m,bgGroup:l,groupParent:c,bgPosition:b,border:v,cursor:p,p:y,m:r,outlineColor:R,outlineWidth:x,outlineOffset:k,outlineStyle:S,listStyle:z,display:W,position:e,width:I,maxWidth:w,minWidth:O,height:A,maxHeight:G,minHeight:H,md:q,lg:D,xl:M}),_=L.style||V?{...L.style,...V}:void 0;return E.jsx(Z,{className:j.cn(L.className,c&&"group",f),ref:o,style:_,...K,children:d})}const po=F.forwardRef(mo);exports.Box=po;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const eo=require("react/jsx-runtime"),ro=require("react"),D=require("./responsive-style.config-B2m9jVlX.cjs");function no({background:t,backgroundColor:o,bg:i,bgSize:d,bgRepeat:a,bgPosition:u,border:v,boxShadow:f,color:b,cursor:m,opacity:c,overflow:s,overflowX:p,overflowY:x,pointerEvents:R,aspectRatio:g,transform:k,transformOrigin:S,p:G,m:H,outlineColor:z,outlineWidth:W,outlineOffset:C,outlineStyle:T,listStyle:h,display:L,position:n,width:N,maxWidth:V,minWidth:P,height:w,maxHeight:j,minHeight:I}){const e={};return i!==void 0?xo(e,i):t!==void 0&&(e.background=A(t)),o!==void 0&&(e.backgroundColor=A(o)),d!==void 0&&(e.backgroundSize=vo(d)),a!==void 0&&(e.backgroundRepeat=Bo(a)),u!==void 0&&(e.backgroundPosition=yo(u)),bo(e,v),f!==void 0&&(e.boxShadow=l(f)),b!==void 0&&(e.color=l(b)),m!==void 0&&(e.cursor=m),c!==void 0&&(e.opacity=typeof c=="number"?c:l(c)),s!==void 0&&(e.overflowX=s,e.overflowY=s),p!==void 0&&(e.overflowX=p),x!==void 0&&(e.overflowY=x),R!==void 0&&(e.pointerEvents=R),g!==void 0&&(e.aspectRatio=typeof g=="number"?String(g):l(g)),k!==void 0&&(e.transform=l(k)),S!==void 0&&(e.transformOrigin=l(S)),so(e,G),lo(e,H),z!==void 0&&(e.outlineColor=l(z)),W!==void 0&&(e.outlineWidth=W),C!==void 0&&(e.outlineOffset=C),T!==void 0&&(e.outlineStyle=T),h?.position!==void 0&&(e.listStylePosition=h.position),h?.type!==void 0&&(e.listStyleType=h.type),L!==void 0&&(e.display=$o(L)),n?.type!==void 0&&(e.position=n.type),n?.top!==void 0&&(e.top=O(n.top)),n?.left!==void 0&&(e.left=O(n.left)),n?.right!==void 0&&(e.right=O(n.right)),n?.bottom!==void 0&&(e.bottom=O(n.bottom)),n?.zIndex!==void 0&&(e.zIndex=n.zIndex),N!==void 0&&(e.width=$(N)),V!==void 0&&(e.maxWidth=$(V)),P!==void 0&&(e.minWidth=$(P)),w!==void 0&&(e.height=$(w)),j!==void 0&&(e.maxHeight=$(j)),I!==void 0&&(e.minHeight=$(I)),Object.keys(e).length>0?e:void 0}function fo(t){const o=[],i={},d=t.groupParent===!0;Y(t,o,i,"","",d);for(const a of D.responsiveBreakpoints){const u=t[a];u&&Y(u,o,i,`${a}:`,`${a}-`,d)}return{className:o.join(" "),style:Object.keys(i).length>0?i:void 0}}function Y(t,o,i,d="",a="",u=!1){const v=no(t);for(const[f,b]of Object.entries(v??{})){if(b==null)continue;const m=String(b),c=ao(f,m);if(c){o.push(`${d}${c}`);continue}const s=`${a}${co(f)}`,p=uo(f,s);p&&(i[`--${s}`]=m,o.push(`${d}${p}`))}if(t.bgGroup!==void 0){const f=`${a}group-background`;i[`--${f}`]=A(t.bgGroup),o.push(`${d}group-hover:[background:var(--${f})]`),u&&o.push(`${d}hover:[background:var(--${f})]`)}}function ao(t,o){if(t==="display")return o==="none"?"hidden":o;if(t==="position")return o==="inherit"?"[position:inherit]":o;if(t==="cursor")return`cursor-${o}`;if(t==="backgroundRepeat")return{"no-repeat":"bg-no-repeat",repeat:"bg-repeat",round:"bg-repeat-round",space:"bg-repeat-space","repeat-x":"bg-repeat-x","repeat-y":"bg-repeat-y"}[o];if(t==="backgroundSize")return{auto:"bg-auto",contain:"bg-contain",cover:"bg-cover"}[o];if(t==="backgroundPosition")return{bottom:"bg-bottom",center:"bg-center",left:"bg-left","left bottom":"bg-left-bottom","left top":"bg-left-top",right:"bg-right","right bottom":"bg-right-bottom","right top":"bg-right-top",top:"bg-top"}[o];if(t==="borderStyle")return o==="none"?"border-none":`border-${o}`;if(t==="outlineStyle")return o==="none"?"outline-none":`outline-${o}`;if(t==="listStylePosition")return`list-${o}`;if(t==="listStyleType")return`list-${o}`}function uo(t,o){const i=`var(--${o})`;return{background:`[background:${i}]`,backgroundColor:`bg-[${i}]`,backgroundPosition:`bg-[position:${i}]`,backgroundSize:`bg-[length:${i}]`,aspectRatio:`[aspect-ratio:${i}]`,borderBottomLeftRadius:`rounded-bl-[${i}]`,borderBottomRightRadius:`rounded-br-[${i}]`,borderBottomWidth:`border-b-[length:${i}]`,borderColor:`border-[color:${i}]`,borderLeftWidth:`border-l-[length:${i}]`,borderRadius:`rounded-[${i}]`,borderRightWidth:`border-r-[length:${i}]`,borderTopLeftRadius:`rounded-tl-[${i}]`,borderTopRightRadius:`rounded-tr-[${i}]`,borderTopWidth:`border-t-[length:${i}]`,borderWidth:`border-[length:${i}]`,boxShadow:`[box-shadow:${i}]`,bottom:`bottom-[${i}]`,color:`[color:${i}]`,height:`h-[${i}]`,left:`left-[${i}]`,margin:`m-[${i}]`,marginBottom:`mb-[${i}]`,marginLeft:`ml-[${i}]`,marginRight:`mr-[${i}]`,marginTop:`mt-[${i}]`,maxHeight:`max-h-[${i}]`,maxWidth:`max-w-[${i}]`,minHeight:`min-h-[${i}]`,minWidth:`min-w-[${i}]`,outlineColor:`outline-[color:${i}]`,outlineOffset:`outline-offset-[${i}]`,outlineWidth:`outline-[length:${i}]`,opacity:`[opacity:${i}]`,overflowX:`[overflow-x:${i}]`,overflowY:`[overflow-y:${i}]`,padding:`p-[${i}]`,paddingBottom:`pb-[${i}]`,paddingLeft:`pl-[${i}]`,paddingRight:`pr-[${i}]`,paddingTop:`pt-[${i}]`,pointerEvents:`[pointer-events:${i}]`,right:`right-[${i}]`,top:`top-[${i}]`,transform:`[transform:${i}]`,transformOrigin:`[transform-origin:${i}]`,width:`w-[${i}]`,zIndex:`z-[${i}]`}[t]}function co(t){return t.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`)}function so(t,o){if(o!==void 0){if(Array.isArray(o)){t.padding=o.map(r).join(" ");return}if(typeof o!="object"){t.padding=r(o);return}"px"in o&&o.px!==void 0&&(t.paddingLeft=r(o.px),t.paddingRight=r(o.px)),"py"in o&&o.py!==void 0&&(t.paddingTop=r(o.py),t.paddingBottom=r(o.py)),"pt"in o&&o.pt!==void 0&&(t.paddingTop=r(o.pt)),"pb"in o&&o.pb!==void 0&&(t.paddingBottom=r(o.pb)),"pl"in o&&o.pl!==void 0&&(t.paddingLeft=r(o.pl)),"pr"in o&&o.pr!==void 0&&(t.paddingRight=r(o.pr))}}function lo(t,o){if(o!==void 0){if(Array.isArray(o)){t.margin=o.map(r).join(" ");return}if(typeof o!="object"){t.margin=r(o);return}"mx"in o&&o.mx!==void 0&&(t.marginLeft=r(o.mx),t.marginRight=r(o.mx)),"my"in o&&o.my!==void 0&&(t.marginTop=r(o.my),t.marginBottom=r(o.my)),"mt"in o&&o.mt!==void 0&&(t.marginTop=r(o.mt)),"mb"in o&&o.mb!==void 0&&(t.marginBottom=r(o.mb)),"ml"in o&&o.ml!==void 0&&(t.marginLeft=r(o.ml)),"mr"in o&&o.mr!==void 0&&(t.marginRight=r(o.mr))}}function bo(t,o){o&&(o.radius!==void 0&&mo(t,o.radius),o.color!==void 0&&(t.borderColor=l(o.color)),o.width!==void 0&&po(t,o.width),o.style!==void 0&&(t.borderStyle=o.style))}function mo(t,o){if(go(o)){o.topLeft!==void 0&&(t.borderTopLeftRadius=B(o.topLeft)),o.topRight!==void 0&&(t.borderTopRightRadius=B(o.topRight)),o.bottomLeft!==void 0&&(t.borderBottomLeftRadius=B(o.bottomLeft)),o.bottomRight!==void 0&&(t.borderBottomRightRadius=B(o.bottomRight));return}t.borderRadius=B(o)}function po(t,o){if(ho(o)){o.top!==void 0&&(t.borderTopWidth=y(o.top)),o.bottom!==void 0&&(t.borderBottomWidth=y(o.bottom)),o.left!==void 0&&(t.borderLeftWidth=y(o.left)),o.right!==void 0&&(t.borderRightWidth=y(o.right));return}t.borderWidth=y(o)}function go(t){return typeof t=="object"}function ho(t){return typeof t=="object"}function B(t){return t.startsWith("--")?`var(${t})`:t}function y(t){return t.startsWith("--")?`var(${t})`:t}function $o(t){return t==="hidden"?"none":t}function O(t){return typeof t=="number"?`${t}px`:t}function r(t){return typeof t=="number"?`${t}px`:t}function $(t){return typeof t=="number"?`${t}px`:t}function vo(t){return typeof t=="number"?`${t}px`:t}function Bo(t){return{"no-repeat":"no-repeat",repeat:"repeat","repeat-round":"round","repeat-space":"space","repeat-x":"repeat-x","repeat-y":"repeat-y"}[t]}function yo(t){return t.replace("-"," ")}function A(t){return l(t)}function xo(t,o){const i=A(o);if(Ro(o)){t.background=i;return}t.backgroundColor=i}function Ro(t){const o=t.trim().toLowerCase();return o.includes("url(")||o.includes("gradient(")||o.includes("image-set(")||o.includes("cross-fade(")||o.includes("element(")||o.includes("paint(")}function l(t){return t.startsWith("--")?`var(${t})`:t}function ko(t,o){const{as:i,children:d,className:a,background:u,backgroundColor:v,bg:f,bgSize:b,bgRepeat:m,bgGroup:c,groupParent:s,bgPosition:p,border:x,boxShadow:R,color:g,cursor:k,opacity:S,overflow:G,overflowX:H,overflowY:z,pointerEvents:W,aspectRatio:C,transform:T,transformOrigin:h,p:L,m:n,outlineColor:N,outlineWidth:V,outlineOffset:P,outlineStyle:w,listStyle:j,display:I,position:e,width:E,maxWidth:M,minWidth:K,height:Z,maxHeight:_,minHeight:F,md:J,lg:Q,xl:U,style:X,...oo}=t,to=i??"div",q=fo({background:u,backgroundColor:v,bg:f,bgSize:b,bgRepeat:m,bgGroup:c,groupParent:s,bgPosition:p,border:x,boxShadow:R,color:g,cursor:k,opacity:S,overflow:G,overflowX:H,overflowY:z,pointerEvents:W,aspectRatio:C,transform:T,transformOrigin:h,p:L,m:n,outlineColor:N,outlineWidth:V,outlineOffset:P,outlineStyle:w,listStyle:j,display:I,position:e,width:E,maxWidth:M,minWidth:K,height:Z,maxHeight:_,minHeight:F,md:J,lg:Q,xl:U}),io=q.style||X?{...q.style,...X}:void 0;return eo.jsx(to,{className:D.cn(q.className,s&&"group",a),ref:o,style:io,...oo,children:d})}const So=ro.forwardRef(ko);exports.Box=So;
package/dist/box.js CHANGED
@@ -1,40 +1,50 @@
1
- import { jsx as E } from "react/jsx-runtime";
2
- import { forwardRef as F } from "react";
3
- import { a as J, c as Q } from "./responsive-style.config-DFuATrIM.js";
4
- function U({
1
+ import { jsx as io } from "react/jsx-runtime";
2
+ import { forwardRef as eo } from "react";
3
+ import { a as ro, c as no } from "./responsive-style.config-DFuATrIM.js";
4
+ function fo({
5
5
  background: t,
6
6
  backgroundColor: o,
7
7
  bg: i,
8
8
  bgSize: d,
9
9
  bgRepeat: a,
10
10
  bgPosition: u,
11
- border: h,
12
- cursor: f,
13
- p: s,
14
- m,
15
- outlineColor: b,
16
- outlineWidth: c,
17
- outlineOffset: l,
18
- outlineStyle: v,
19
- listStyle: p,
20
- display: y,
21
- position: r,
22
- width: R,
23
- maxWidth: k,
24
- minWidth: x,
25
- height: S,
26
- maxHeight: z,
27
- minHeight: W
11
+ border: v,
12
+ boxShadow: f,
13
+ color: b,
14
+ cursor: m,
15
+ opacity: c,
16
+ overflow: s,
17
+ overflowX: p,
18
+ overflowY: x,
19
+ pointerEvents: R,
20
+ aspectRatio: g,
21
+ transform: k,
22
+ transformOrigin: S,
23
+ p: G,
24
+ m: H,
25
+ outlineColor: z,
26
+ outlineWidth: W,
27
+ outlineOffset: C,
28
+ outlineStyle: T,
29
+ listStyle: h,
30
+ display: L,
31
+ position: n,
32
+ width: N,
33
+ maxWidth: V,
34
+ minWidth: w,
35
+ height: P,
36
+ maxHeight: I,
37
+ minHeight: j
28
38
  }) {
29
39
  const e = {};
30
- return i !== void 0 ? lo(e, i) : t !== void 0 && (e.background = T(t)), o !== void 0 && (e.backgroundColor = T(o)), d !== void 0 && (e.backgroundSize = co(d)), a !== void 0 && (e.backgroundRepeat = so(a)), u !== void 0 && (e.backgroundPosition = bo(u)), eo(e, h), f !== void 0 && (e.cursor = f), to(e, s), io(e, m), b !== void 0 && (e.outlineColor = N(b)), c !== void 0 && (e.outlineWidth = c), l !== void 0 && (e.outlineOffset = l), v !== void 0 && (e.outlineStyle = v), p?.position !== void 0 && (e.listStylePosition = p.position), p?.type !== void 0 && (e.listStyleType = p.type), y !== void 0 && (e.display = uo(y)), r?.type !== void 0 && (e.position = r.type), r?.top !== void 0 && (e.top = C(r.top)), r?.left !== void 0 && (e.left = C(r.left)), r?.right !== void 0 && (e.right = C(r.right)), r?.bottom !== void 0 && (e.bottom = C(r.bottom)), r?.zIndex !== void 0 && (e.zIndex = r.zIndex), R !== void 0 && (e.width = g(R)), k !== void 0 && (e.maxWidth = g(k)), x !== void 0 && (e.minWidth = g(x)), S !== void 0 && (e.height = g(S)), z !== void 0 && (e.maxHeight = g(z)), W !== void 0 && (e.minHeight = g(W)), Object.keys(e).length > 0 ? e : void 0;
40
+ return i !== void 0 ? Ro(e, i) : t !== void 0 && (e.background = A(t)), o !== void 0 && (e.backgroundColor = A(o)), d !== void 0 && (e.backgroundSize = Bo(d)), a !== void 0 && (e.backgroundRepeat = yo(a)), u !== void 0 && (e.backgroundPosition = xo(u)), mo(e, v), f !== void 0 && (e.boxShadow = l(f)), b !== void 0 && (e.color = l(b)), m !== void 0 && (e.cursor = m), c !== void 0 && (e.opacity = typeof c == "number" ? c : l(c)), s !== void 0 && (e.overflowX = s, e.overflowY = s), p !== void 0 && (e.overflowX = p), x !== void 0 && (e.overflowY = x), R !== void 0 && (e.pointerEvents = R), g !== void 0 && (e.aspectRatio = typeof g == "number" ? String(g) : l(g)), k !== void 0 && (e.transform = l(k)), S !== void 0 && (e.transformOrigin = l(S)), lo(e, G), bo(e, H), z !== void 0 && (e.outlineColor = l(z)), W !== void 0 && (e.outlineWidth = W), C !== void 0 && (e.outlineOffset = C), T !== void 0 && (e.outlineStyle = T), h?.position !== void 0 && (e.listStylePosition = h.position), h?.type !== void 0 && (e.listStyleType = h.type), L !== void 0 && (e.display = vo(L)), n?.type !== void 0 && (e.position = n.type), n?.top !== void 0 && (e.top = O(n.top)), n?.left !== void 0 && (e.left = O(n.left)), n?.right !== void 0 && (e.right = O(n.right)), n?.bottom !== void 0 && (e.bottom = O(n.bottom)), n?.zIndex !== void 0 && (e.zIndex = n.zIndex), N !== void 0 && (e.width = $(N)), V !== void 0 && (e.maxWidth = $(V)), w !== void 0 && (e.minWidth = $(w)), P !== void 0 && (e.height = $(P)), I !== void 0 && (e.maxHeight = $(I)), j !== void 0 && (e.minHeight = $(j)), Object.keys(e).length > 0 ? e : void 0;
31
41
  }
32
- function X(t) {
42
+ function ao(t) {
33
43
  const o = [], i = {}, d = t.groupParent === !0;
34
- P(t, o, i, "", "", d);
35
- for (const a of J) {
44
+ D(t, o, i, "", "", d);
45
+ for (const a of ro) {
36
46
  const u = t[a];
37
- u && P(
47
+ u && D(
38
48
  u,
39
49
  o,
40
50
  i,
@@ -48,25 +58,25 @@ function X(t) {
48
58
  style: Object.keys(i).length > 0 ? i : void 0
49
59
  };
50
60
  }
51
- function P(t, o, i, d = "", a = "", u = !1) {
52
- const h = U(t);
53
- for (const [f, s] of Object.entries(h ?? {})) {
54
- if (s == null)
61
+ function D(t, o, i, d = "", a = "", u = !1) {
62
+ const v = fo(t);
63
+ for (const [f, b] of Object.entries(v ?? {})) {
64
+ if (b == null)
55
65
  continue;
56
- const m = String(s), b = Y(f, m);
57
- if (b) {
58
- o.push(`${d}${b}`);
66
+ const m = String(b), c = uo(f, m);
67
+ if (c) {
68
+ o.push(`${d}${c}`);
59
69
  continue;
60
70
  }
61
- const c = `${a}${oo(f)}`, l = _(f, c);
62
- l && (i[`--${c}`] = m, o.push(`${d}${l}`));
71
+ const s = `${a}${so(f)}`, p = co(f, s);
72
+ p && (i[`--${s}`] = m, o.push(`${d}${p}`));
63
73
  }
64
74
  if (t.bgGroup !== void 0) {
65
75
  const f = `${a}group-background`;
66
- i[`--${f}`] = T(t.bgGroup), o.push(`${d}group-hover:[background:var(--${f})]`), u && o.push(`${d}hover:[background:var(--${f})]`);
76
+ i[`--${f}`] = A(t.bgGroup), o.push(`${d}group-hover:[background:var(--${f})]`), u && o.push(`${d}hover:[background:var(--${f})]`);
67
77
  }
68
78
  }
69
- function Y(t, o) {
79
+ function uo(t, o) {
70
80
  if (t === "display")
71
81
  return o === "none" ? "hidden" : o;
72
82
  if (t === "position")
@@ -109,13 +119,14 @@ function Y(t, o) {
109
119
  if (t === "listStyleType")
110
120
  return `list-${o}`;
111
121
  }
112
- function _(t, o) {
122
+ function co(t, o) {
113
123
  const i = `var(--${o})`;
114
124
  return {
115
125
  background: `[background:${i}]`,
116
126
  backgroundColor: `bg-[${i}]`,
117
127
  backgroundPosition: `bg-[position:${i}]`,
118
128
  backgroundSize: `bg-[length:${i}]`,
129
+ aspectRatio: `[aspect-ratio:${i}]`,
119
130
  borderBottomLeftRadius: `rounded-bl-[${i}]`,
120
131
  borderBottomRightRadius: `rounded-br-[${i}]`,
121
132
  borderBottomWidth: `border-b-[length:${i}]`,
@@ -127,7 +138,9 @@ function _(t, o) {
127
138
  borderTopRightRadius: `rounded-tr-[${i}]`,
128
139
  borderTopWidth: `border-t-[length:${i}]`,
129
140
  borderWidth: `border-[length:${i}]`,
141
+ boxShadow: `[box-shadow:${i}]`,
130
142
  bottom: `bottom-[${i}]`,
143
+ color: `[color:${i}]`,
131
144
  height: `h-[${i}]`,
132
145
  left: `left-[${i}]`,
133
146
  margin: `m-[${i}]`,
@@ -142,91 +155,97 @@ function _(t, o) {
142
155
  outlineColor: `outline-[color:${i}]`,
143
156
  outlineOffset: `outline-offset-[${i}]`,
144
157
  outlineWidth: `outline-[length:${i}]`,
158
+ opacity: `[opacity:${i}]`,
159
+ overflowX: `[overflow-x:${i}]`,
160
+ overflowY: `[overflow-y:${i}]`,
145
161
  padding: `p-[${i}]`,
146
162
  paddingBottom: `pb-[${i}]`,
147
163
  paddingLeft: `pl-[${i}]`,
148
164
  paddingRight: `pr-[${i}]`,
149
165
  paddingTop: `pt-[${i}]`,
166
+ pointerEvents: `[pointer-events:${i}]`,
150
167
  right: `right-[${i}]`,
151
168
  top: `top-[${i}]`,
169
+ transform: `[transform:${i}]`,
170
+ transformOrigin: `[transform-origin:${i}]`,
152
171
  width: `w-[${i}]`,
153
172
  zIndex: `z-[${i}]`
154
173
  }[t];
155
174
  }
156
- function oo(t) {
175
+ function so(t) {
157
176
  return t.replace(/[A-Z]/g, (o) => `-${o.toLowerCase()}`);
158
177
  }
159
- function to(t, o) {
178
+ function lo(t, o) {
160
179
  if (o !== void 0) {
161
180
  if (Array.isArray(o)) {
162
- t.padding = o.map(n).join(" ");
181
+ t.padding = o.map(r).join(" ");
163
182
  return;
164
183
  }
165
184
  if (typeof o != "object") {
166
- t.padding = n(o);
185
+ t.padding = r(o);
167
186
  return;
168
187
  }
169
- "px" in o && o.px !== void 0 && (t.paddingLeft = n(o.px), t.paddingRight = n(o.px)), "py" in o && o.py !== void 0 && (t.paddingTop = n(o.py), t.paddingBottom = n(o.py)), "pt" in o && o.pt !== void 0 && (t.paddingTop = n(o.pt)), "pb" in o && o.pb !== void 0 && (t.paddingBottom = n(o.pb)), "pl" in o && o.pl !== void 0 && (t.paddingLeft = n(o.pl)), "pr" in o && o.pr !== void 0 && (t.paddingRight = n(o.pr));
188
+ "px" in o && o.px !== void 0 && (t.paddingLeft = r(o.px), t.paddingRight = r(o.px)), "py" in o && o.py !== void 0 && (t.paddingTop = r(o.py), t.paddingBottom = r(o.py)), "pt" in o && o.pt !== void 0 && (t.paddingTop = r(o.pt)), "pb" in o && o.pb !== void 0 && (t.paddingBottom = r(o.pb)), "pl" in o && o.pl !== void 0 && (t.paddingLeft = r(o.pl)), "pr" in o && o.pr !== void 0 && (t.paddingRight = r(o.pr));
170
189
  }
171
190
  }
172
- function io(t, o) {
191
+ function bo(t, o) {
173
192
  if (o !== void 0) {
174
193
  if (Array.isArray(o)) {
175
- t.margin = o.map(n).join(" ");
194
+ t.margin = o.map(r).join(" ");
176
195
  return;
177
196
  }
178
197
  if (typeof o != "object") {
179
- t.margin = n(o);
198
+ t.margin = r(o);
180
199
  return;
181
200
  }
182
- "mx" in o && o.mx !== void 0 && (t.marginLeft = n(o.mx), t.marginRight = n(o.mx)), "my" in o && o.my !== void 0 && (t.marginTop = n(o.my), t.marginBottom = n(o.my)), "mt" in o && o.mt !== void 0 && (t.marginTop = n(o.mt)), "mb" in o && o.mb !== void 0 && (t.marginBottom = n(o.mb)), "ml" in o && o.ml !== void 0 && (t.marginLeft = n(o.ml)), "mr" in o && o.mr !== void 0 && (t.marginRight = n(o.mr));
201
+ "mx" in o && o.mx !== void 0 && (t.marginLeft = r(o.mx), t.marginRight = r(o.mx)), "my" in o && o.my !== void 0 && (t.marginTop = r(o.my), t.marginBottom = r(o.my)), "mt" in o && o.mt !== void 0 && (t.marginTop = r(o.mt)), "mb" in o && o.mb !== void 0 && (t.marginBottom = r(o.mb)), "ml" in o && o.ml !== void 0 && (t.marginLeft = r(o.ml)), "mr" in o && o.mr !== void 0 && (t.marginRight = r(o.mr));
183
202
  }
184
203
  }
185
- function eo(t, o) {
186
- o && (o.radius !== void 0 && no(t, o.radius), o.color !== void 0 && (t.borderColor = N(o.color)), o.width !== void 0 && ro(t, o.width), o.style !== void 0 && (t.borderStyle = o.style));
204
+ function mo(t, o) {
205
+ o && (o.radius !== void 0 && po(t, o.radius), o.color !== void 0 && (t.borderColor = l(o.color)), o.width !== void 0 && go(t, o.width), o.style !== void 0 && (t.borderStyle = o.style));
187
206
  }
188
- function no(t, o) {
189
- if (fo(o)) {
190
- o.topLeft !== void 0 && (t.borderTopLeftRadius = $(o.topLeft)), o.topRight !== void 0 && (t.borderTopRightRadius = $(o.topRight)), o.bottomLeft !== void 0 && (t.borderBottomLeftRadius = $(o.bottomLeft)), o.bottomRight !== void 0 && (t.borderBottomRightRadius = $(o.bottomRight));
207
+ function po(t, o) {
208
+ if (ho(o)) {
209
+ o.topLeft !== void 0 && (t.borderTopLeftRadius = B(o.topLeft)), o.topRight !== void 0 && (t.borderTopRightRadius = B(o.topRight)), o.bottomLeft !== void 0 && (t.borderBottomLeftRadius = B(o.bottomLeft)), o.bottomRight !== void 0 && (t.borderBottomRightRadius = B(o.bottomRight));
191
210
  return;
192
211
  }
193
- t.borderRadius = $(o);
212
+ t.borderRadius = B(o);
194
213
  }
195
- function ro(t, o) {
196
- if (ao(o)) {
197
- o.top !== void 0 && (t.borderTopWidth = B(o.top)), o.bottom !== void 0 && (t.borderBottomWidth = B(o.bottom)), o.left !== void 0 && (t.borderLeftWidth = B(o.left)), o.right !== void 0 && (t.borderRightWidth = B(o.right));
214
+ function go(t, o) {
215
+ if ($o(o)) {
216
+ o.top !== void 0 && (t.borderTopWidth = y(o.top)), o.bottom !== void 0 && (t.borderBottomWidth = y(o.bottom)), o.left !== void 0 && (t.borderLeftWidth = y(o.left)), o.right !== void 0 && (t.borderRightWidth = y(o.right));
198
217
  return;
199
218
  }
200
- t.borderWidth = B(o);
219
+ t.borderWidth = y(o);
201
220
  }
202
- function fo(t) {
221
+ function ho(t) {
203
222
  return typeof t == "object";
204
223
  }
205
- function ao(t) {
224
+ function $o(t) {
206
225
  return typeof t == "object";
207
226
  }
208
- function $(t) {
227
+ function B(t) {
209
228
  return t.startsWith("--") ? `var(${t})` : t;
210
229
  }
211
- function B(t) {
230
+ function y(t) {
212
231
  return t.startsWith("--") ? `var(${t})` : t;
213
232
  }
214
- function uo(t) {
233
+ function vo(t) {
215
234
  return t === "hidden" ? "none" : t;
216
235
  }
217
- function C(t) {
236
+ function O(t) {
218
237
  return typeof t == "number" ? `${t}px` : t;
219
238
  }
220
- function n(t) {
239
+ function r(t) {
221
240
  return typeof t == "number" ? `${t}px` : t;
222
241
  }
223
- function g(t) {
242
+ function $(t) {
224
243
  return typeof t == "number" ? `${t}px` : t;
225
244
  }
226
- function co(t) {
245
+ function Bo(t) {
227
246
  return typeof t == "number" ? `${t}px` : t;
228
247
  }
229
- function so(t) {
248
+ function yo(t) {
230
249
  return {
231
250
  "no-repeat": "no-repeat",
232
251
  repeat: "repeat",
@@ -236,107 +255,127 @@ function so(t) {
236
255
  "repeat-y": "repeat-y"
237
256
  }[t];
238
257
  }
239
- function bo(t) {
258
+ function xo(t) {
240
259
  return t.replace("-", " ");
241
260
  }
242
- function T(t) {
243
- return N(t);
261
+ function A(t) {
262
+ return l(t);
244
263
  }
245
- function lo(t, o) {
246
- const i = T(o);
247
- if (mo(o)) {
264
+ function Ro(t, o) {
265
+ const i = A(o);
266
+ if (ko(o)) {
248
267
  t.background = i;
249
268
  return;
250
269
  }
251
270
  t.backgroundColor = i;
252
271
  }
253
- function mo(t) {
272
+ function ko(t) {
254
273
  const o = t.trim().toLowerCase();
255
274
  return o.includes("url(") || o.includes("gradient(") || o.includes("image-set(") || o.includes("cross-fade(") || o.includes("element(") || o.includes("paint(");
256
275
  }
257
- function N(t) {
276
+ function l(t) {
258
277
  return t.startsWith("--") ? `var(${t})` : t;
259
278
  }
260
- function po(t, o) {
279
+ function So(t, o) {
261
280
  const {
262
281
  as: i,
263
282
  children: d,
264
283
  className: a,
265
284
  background: u,
266
- backgroundColor: h,
285
+ backgroundColor: v,
267
286
  bg: f,
268
- bgSize: s,
287
+ bgSize: b,
269
288
  bgRepeat: m,
270
- bgGroup: b,
271
- groupParent: c,
272
- bgPosition: l,
273
- border: v,
274
- cursor: p,
275
- p: y,
276
- m: r,
277
- outlineColor: R,
278
- outlineWidth: k,
279
- outlineOffset: x,
280
- outlineStyle: S,
281
- listStyle: z,
282
- display: W,
289
+ bgGroup: c,
290
+ groupParent: s,
291
+ bgPosition: p,
292
+ border: x,
293
+ boxShadow: R,
294
+ color: g,
295
+ cursor: k,
296
+ opacity: S,
297
+ overflow: G,
298
+ overflowX: H,
299
+ overflowY: z,
300
+ pointerEvents: W,
301
+ aspectRatio: C,
302
+ transform: T,
303
+ transformOrigin: h,
304
+ p: L,
305
+ m: n,
306
+ outlineColor: N,
307
+ outlineWidth: V,
308
+ outlineOffset: w,
309
+ outlineStyle: P,
310
+ listStyle: I,
311
+ display: j,
283
312
  position: e,
284
- width: I,
285
- maxWidth: j,
286
- minWidth: w,
287
- height: A,
288
- maxHeight: O,
289
- minHeight: G,
290
- md: H,
291
- lg: D,
292
- xl: K,
293
- style: V,
294
- ...M
295
- } = t, Z = i ?? "div", L = X({
313
+ width: E,
314
+ maxWidth: K,
315
+ minWidth: M,
316
+ height: Z,
317
+ maxHeight: q,
318
+ minHeight: F,
319
+ md: J,
320
+ lg: Q,
321
+ xl: U,
322
+ style: Y,
323
+ ..._
324
+ } = t, oo = i ?? "div", X = ao({
296
325
  background: u,
297
- backgroundColor: h,
326
+ backgroundColor: v,
298
327
  bg: f,
299
- bgSize: s,
328
+ bgSize: b,
300
329
  bgRepeat: m,
301
- bgGroup: b,
302
- groupParent: c,
303
- bgPosition: l,
304
- border: v,
305
- cursor: p,
306
- p: y,
307
- m: r,
308
- outlineColor: R,
309
- outlineWidth: k,
310
- outlineOffset: x,
311
- outlineStyle: S,
312
- listStyle: z,
313
- display: W,
330
+ bgGroup: c,
331
+ groupParent: s,
332
+ bgPosition: p,
333
+ border: x,
334
+ boxShadow: R,
335
+ color: g,
336
+ cursor: k,
337
+ opacity: S,
338
+ overflow: G,
339
+ overflowX: H,
340
+ overflowY: z,
341
+ pointerEvents: W,
342
+ aspectRatio: C,
343
+ transform: T,
344
+ transformOrigin: h,
345
+ p: L,
346
+ m: n,
347
+ outlineColor: N,
348
+ outlineWidth: V,
349
+ outlineOffset: w,
350
+ outlineStyle: P,
351
+ listStyle: I,
352
+ display: j,
314
353
  position: e,
315
- width: I,
316
- maxWidth: j,
317
- minWidth: w,
318
- height: A,
319
- maxHeight: O,
320
- minHeight: G,
321
- md: H,
322
- lg: D,
323
- xl: K
324
- }), q = L.style || V ? {
325
- ...L.style,
326
- ...V
354
+ width: E,
355
+ maxWidth: K,
356
+ minWidth: M,
357
+ height: Z,
358
+ maxHeight: q,
359
+ minHeight: F,
360
+ md: J,
361
+ lg: Q,
362
+ xl: U
363
+ }), to = X.style || Y ? {
364
+ ...X.style,
365
+ ...Y
327
366
  } : void 0;
328
- return /* @__PURE__ */ E(
329
- Z,
367
+ return /* @__PURE__ */ io(
368
+ oo,
330
369
  {
331
- className: Q(L.className, c && "group", a),
370
+ className: no(X.className, s && "group", a),
332
371
  ref: o,
333
- style: q,
334
- ...M,
372
+ style: to,
373
+ ..._,
335
374
  children: d
336
375
  }
337
376
  );
338
377
  }
339
- const vo = F(po);
378
+ const Lo = eo(So);
340
379
  export {
341
- vo as Box
380
+ Lo as Box
342
381
  };
@@ -19,4 +19,4 @@ type AnchorButtonProps = ButtonBaseProps & Omit<AnchorHTMLAttributes<HTMLAnchorE
19
19
  };
20
20
  export type ButtonProps = NativeButtonProps | AnchorButtonProps;
21
21
  export declare function Button({ alignContent, children, className, disabled, display, border, bg, color, cursor, fullWidth, href, hoverBg, activeBg, fontSize, fontWeight, isLoading, lineHeight, minHeight, minWidth, md, lg, xl, p, position, size, style, variant, width, ...props }: ButtonProps): ReactNode;
22
- export { buttonSizeBoxProps, buttonSizeBorderRadius, buttonSizeClassNames, buttonVariantClassNames, buttonVariants, } from './button.helpers';
22
+ export { buttonSizeBorderRadius, buttonSizeBoxProps, buttonSizeClassNames, buttonVariantClassNames, buttonVariants, } from './button.helpers';
@@ -1,7 +1,7 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import { BoxBreakpointProps } from '../box/box';
3
3
  import { ResponsiveStyleBreakpoint } from '../shared/responsive-style/responsive-style.types';
4
- import { TypographyFontSizeValue, TypographyFontWeightValue, TypographyLineHeightValue, UiKitBackgroundValue } from '../types/index';
4
+ import { TypographyFontSizeValue, TypographyFontWeightValue, TypographyLineHeightValue, UiKitBackgroundValue } from '../types';
5
5
  export type ButtonAlignContent = 'start' | 'center' | 'end';
6
6
  export type ButtonAlignContentBreakpointProps = {
7
7
  alignContent?: ButtonAlignContent;
@@ -5,5 +5,5 @@ export declare function Flex(props: FlexProps<'div'>): JSX.Element;
5
5
  export declare function Flex<TAs extends BoxAs>(props: FlexProps<TAs> & {
6
6
  as: TAs;
7
7
  }): JSX.Element;
8
+ export type { UiKitAlign, UiKitFlexDirection, UiKitFlexParams, UiKitFlexWrap, UiKitGap, UiKitJustify, } from '../types';
8
9
  export type { FlexBreakpointProps, FlexProps, FlexResponsiveProps } from './flex.types';
9
- export type { UiKitAlign, UiKitFlexDirection, UiKitFlexParams, UiKitFlexWrap, UiKitGap, UiKitJustify, } from '../types/index';
@@ -1,6 +1,6 @@
1
1
  import { BoxAs, BoxBreakpointProps, BoxProps } from '../box/box.types';
2
2
  import { ResponsiveStyleBreakpoint } from '../shared/responsive-style/responsive-style.types';
3
- import { UiKitFlexParams } from '../types/index';
3
+ import { UiKitFlexParams } from '../types';
4
4
  export type FlexBreakpointProps = BoxBreakpointProps & UiKitFlexParams;
5
5
  export type FlexProps<TAs extends BoxAs = 'div'> = Omit<BoxProps<TAs>, keyof BoxBreakpointProps | 'display' | 'md' | 'lg' | 'xl'> & FlexBreakpointProps & {
6
6
  /** Рендерит контейнер как `inline-flex` вместо `flex`. */
package/dist/grid.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),v=require("./box.cjs"),g=require("./responsive-style.config-B2m9jVlX.cjs");function j(i){const n=[],t={},s={md:i.md,lg:i.lg,xl:i.xl};l(i,n,t);for(const e of g.responsiveBreakpoints){const o=s[e];o&&l(o,n,t,`${e}:`,`${e}-`)}return{className:n.join(" "),style:Object.keys(t).length>0?t:void 0}}function l({cols:i,gap:n},t,s,e="",o=""){if(i!==void 0){const r=`${o}grid-template-columns`;s[`--${r}`]=`repeat(${i}, minmax(0, 1fr))`,t.push(`${e}${u("grid-cols",`var(--${r})`)}`)}if(n!==void 0){const r=`${o}grid-gap`;s[`--${r}`]=G(n),t.push(`${e}${u("gap",`var(--${r})`)}`)}}function u(i,n){return[i,"-[",n,"]"].join("")}function G(i){return typeof i=="number"?`${i}px`:i}function N({children:i,className:n,cols:t=1,gap:s=0,md:e,lg:o,xl:r,style:a,...f}){const d=j({cols:t,gap:s,md:e,lg:o,xl:r}),x=c(e),$=c(o),y=c(r),b=d.style||a?{...d.style,...a}:void 0;return m.jsx(v.Box,{...f,display:"grid",className:g.cn(d.className,n),md:x,lg:$,xl:y,style:b,children:i})}function h({children:i,className:n,...t}){return m.jsx("div",{className:n,...t,children:i})}const w=Object.assign(N,{Item:h});function c(i){if(i)return{background:i.background,backgroundColor:i.backgroundColor,height:i.height,maxHeight:i.maxHeight,maxWidth:i.maxWidth,minHeight:i.minHeight,minWidth:i.minWidth,width:i.width}}exports.Grid=w;exports.GridItem=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),w=require("./box.cjs"),g=require("./responsive-style.config-B2m9jVlX.cjs");function j(t){const i=[],n={},l={md:t.md,lg:t.lg,xl:t.xl};a(t,i,n);for(const e of g.responsiveBreakpoints){const o=l[e];o&&a(o,i,n,`${e}:`,`${e}-`)}return{className:i.join(" "),style:Object.keys(n).length>0?n:void 0}}function a({cols:t,gap:i},n,l,e="",o=""){if(t!==void 0){const c=`${o}grid-template-columns`;l[`--${c}`]=`repeat(${t}, minmax(0, 1fr))`,n.push(`${e}${m("grid-cols",`var(--${c})`)}`)}if(i!==void 0){const c=`${o}grid-gap`;l[`--${c}`]=G(i),n.push(`${e}${m("gap",`var(--${c})`)}`)}}function m(t,i){return[t,"-[",i,"]"].join("")}function G(t){return typeof t=="number"?`${t}px`:t}function N({children:t,className:i,cols:n=1,gap:l=0,md:e,lg:o,xl:c,style:s,...h}){const r=j({cols:n,gap:l,md:e,lg:o,xl:c}),v=d(e),x=d(o),y=d(c),$=r.style||s?{...r.style,...s}:void 0;return u.jsx(w.Box,{...h,display:"grid",className:g.cn(r.className,i),md:v,lg:x,xl:y,style:$,children:t})}function f({children:t,className:i,...n}){return u.jsx("div",{className:i,...n,children:t})}const S=Object.assign(N,{Item:f});function d(t){if(t)return{aspectRatio:t.aspectRatio,background:t.background,backgroundColor:t.backgroundColor,boxShadow:t.boxShadow,color:t.color,height:t.height,maxHeight:t.maxHeight,maxWidth:t.maxWidth,minHeight:t.minHeight,minWidth:t.minWidth,opacity:t.opacity,overflow:t.overflow,overflowX:t.overflowX,overflowY:t.overflowY,pointerEvents:t.pointerEvents,transform:t.transform,transformOrigin:t.transformOrigin,width:t.width}}exports.Grid=S;exports.GridItem=f;