@sanity-labs/ui-poc 0.0.1-alpha.6 → 0.0.1-alpha.8

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.
@@ -1 +1 @@
1
- {"version":3,"file":"card.props.d.ts","sourceRoot":"","sources":["../../../../../src/components/card/card.props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,WAAW,EAAc,MAAM,oBAAoB,CAAA;AAEhE,OAAO,EAAC,KAAK,OAAO,EAAC,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAAgB,KAAK,YAAY,EAAC,MAAM,qBAAqB,CAAA;AACpE,OAAO,EAAC,KAAK,OAAO,EAAC,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAAC,KAAK,UAAU,EAAC,MAAM,wBAAwB,CAAA;AACtD,OAAO,KAAK,EAAC,IAAI,EAAE,SAAS,EAAC,MAAM,kBAAkB,CAAA;AAErD,cAAc;AACd,MAAM,WAAW,SAAS,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,CAAE,SAAQ,WAAW;IACzE,wBAAwB;IACxB,EAAE,CAAC,EAAE,CAAC,CAAA;IACN,+BAA+B;IAC/B,OAAO,CAAC,EAAE,UAAU,CAAC,YAAY,CAAC,CAAA;IAClC,2DAA2D;IAC3D,OAAO,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAA;IAC7B,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,SAAS,CAAC,EAAE,SAAS,CAAA;CACtB;AAED,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAmB7C,CAAA"}
1
+ {"version":3,"file":"card.props.d.ts","sourceRoot":"","sources":["../../../../../src/components/card/card.props.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,KAAK,WAAW,EAAc,MAAM,oBAAoB,CAAA;AAGhE,OAAO,EAAC,KAAK,OAAO,EAAC,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAAgB,KAAK,YAAY,EAAC,MAAM,qBAAqB,CAAA;AACpE,OAAO,EAAC,KAAK,OAAO,EAAC,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAAC,KAAK,UAAU,EAAC,MAAM,wBAAwB,CAAA;AACtD,OAAO,KAAK,EAAC,IAAI,EAAE,SAAS,EAAC,MAAM,kBAAkB,CAAA;AAErD,cAAc;AACd,MAAM,WAAW,SAAS,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,CAAE,SAAQ,WAAW;IACzE,wBAAwB;IACxB,EAAE,CAAC,EAAE,CAAC,CAAA;IACN,+BAA+B;IAC/B,OAAO,CAAC,EAAE,UAAU,CAAC,YAAY,CAAC,CAAA;IAClC,2DAA2D;IAC3D,OAAO,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAA;IAC7B,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,SAAS,CAAC,EAAE,SAAS,CAAA;CACtB;AAED,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAgC7C,CAAA"}
@@ -20,12 +20,14 @@ type UnionPropDef<T> = {
20
20
  };
21
21
  /** A composite prop def defines a prop that takes a union of
22
22
  * values (represented by the composition object’s keys) which
23
- * map to a composition of one or more class names (represented
24
- * by the composition object’s values).
23
+ * map to a composition of one or more other props.
25
24
  */
26
25
  type CompositePropDef = {
27
26
  type: 'composite';
28
- composition: Record<string, string>;
27
+ composition: Record<string, {
28
+ propDef: PropDef;
29
+ mapping: Record<string, unknown>;
30
+ }>;
29
31
  };
30
32
  export type PropDef<T = unknown> = BooleanPropDef | NumberPropDef | StringPropDef | UnionPropDef<T> | CompositePropDef;
31
33
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"PropDef.d.ts","sourceRoot":"","sources":["../../../../src/types/PropDef.ts"],"names":[],"mappings":"AAAA,KAAK,cAAc,GAAG;IACpB,IAAI,EAAE,SAAS,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM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;IACrB,IAAI,EAAE,OAAO,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,SAAS,CAAC,EAAE,CAAA;CACrB,CAAA;AAED;;;GAGG;AACH,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,WAAW,CAAA;IACjB,WAAW,EAAE,MAAM,CACjB,MAAM,EACN;QACE,OAAO,EAAE,OAAO,CAAA;QAChB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KACjC,CACF,CAAA;CACF,CAAA;AAED,MAAM,MAAM,OAAO,CAAC,CAAC,GAAG,OAAO,IAC3B,cAAc,GACd,aAAa,GACb,aAAa,GACb,YAAY,CAAC,CAAC,CAAC,GACf,gBAAgB,CAAA"}
@@ -5,5 +5,9 @@ interface ComponentProps {
5
5
  [key: string]: any;
6
6
  }
7
7
  export declare function getProps<P extends ComponentProps, T extends Record<string, PropDef>>(componentProps?: P, propDefs?: T): ComponentProps;
8
+ export declare function flattenCompositeProps<P extends ComponentProps, T extends Record<string, PropDef>>(componentProps?: P, propDefs?: T): {
9
+ allComponentProps: ComponentProps;
10
+ allPropDefs: Record<string, PropDef>;
11
+ };
8
12
  export {};
9
13
  //# sourceMappingURL=getProps.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getProps.d.ts","sourceRoot":"","sources":["../../../../src/utils/getProps.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,KAAK,OAAO,EAAC,MAAM,kBAAkB,CAAA;AAK7C,UAAU,cAAc;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAE3B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACnB;AAED,wBAAgB,QAAQ,CAAC,CAAC,SAAS,cAAc,EAAE,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClF,cAAc,CAAC,EAAE,CAAC,EAClB,QAAQ,CAAC,EAAE,CAAC,GACX,cAAc,CAiChB"}
1
+ {"version":3,"file":"getProps.d.ts","sourceRoot":"","sources":["../../../../src/utils/getProps.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,KAAK,OAAO,EAAC,MAAM,kBAAkB,CAAA;AAK7C,UAAU,cAAc;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAE3B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACnB;AAED,wBAAgB,QAAQ,CAAC,CAAC,SAAS,cAAc,EAAE,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClF,cAAc,CAAC,EAAE,CAAC,EAClB,QAAQ,CAAC,EAAE,CAAC,GACX,cAAc,CA2BhB;AA+BD,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,cAAc,EAAE,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/F,cAAc,CAAC,EAAE,CAAC,EAClB,QAAQ,CAAC,EAAE,CAAC;uBAGe,cAAc;iBACpB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;EAmB7C"}
package/dist/index.js CHANGED
@@ -258,29 +258,58 @@ const RADIUS = [0, 1, 2, 3, 4, 5, 6, "full"], borderProps = {
258
258
  ...gridChildProps
259
259
  }, DISPLAY_BLOCK = ["block", "inline-block", "none"], DISPLAY_FLEX = ["flex", "inline-flex", "none"], DISPLAY_GRID = ["grid", "inline-grid", "none"], PREFIX = "sui", BREAKPOINTS_LENGTH = 7;
260
260
  function getProps(componentProps, propDefs) {
261
+ const { allComponentProps, allPropDefs } = flattenCompositeProps(componentProps, propDefs), restProps = {};
261
262
  let className = componentProps?.className || "", style = componentProps?.style || {};
262
- const restProps = {};
263
- for (const key in componentProps) {
264
- if (!propDefs?.[key] || !("className" in propDefs[key]) && !("composition" in propDefs[key])) {
265
- restProps[key] = componentProps[key];
263
+ for (const key in allComponentProps) {
264
+ const propDef = allPropDefs?.[key], propValue = allComponentProps[key];
265
+ if (!propDef || !("className" in propDef) || !propDef.className) {
266
+ restProps[key] = propValue;
266
267
  continue;
267
268
  }
268
- if (Array.isArray(componentProps[key]))
269
- for (let i = 0, len = Math.min(componentProps[key].length, BREAKPOINTS_LENGTH); i < len; i++)
270
- className = classNames(className, getClassName(componentProps[key][i], propDefs[key], i)), style = { ...style, ...getStyle(componentProps[key][i], propDefs[key], i) };
269
+ if (Array.isArray(propValue))
270
+ for (let i = 0, len = Math.min(propValue.length, BREAKPOINTS_LENGTH); i < len; i++)
271
+ className = classNames(className, getClassName(propValue[i], propDef, i)), style = { ...style, ...getStyle(propValue[i], propDef, i) };
271
272
  else
272
- className = classNames(className, getClassName(componentProps[key], propDefs[key])), style = { ...style, ...getStyle(componentProps[key], propDefs[key]) };
273
+ className = classNames(className, getClassName(propValue, propDef)), style = { ...style, ...getStyle(propValue, propDef) };
273
274
  }
274
275
  return { ...restProps, className, style };
275
276
  }
276
- function getClassName(prop, propDef, bp) {
277
- return propDef.type === "composite" && propDef.composition[prop] ? bp ? propDef.composition[prop].split(" ").map((className) => `${className}-bp-${bp}`).join(" ") : propDef.composition[prop] : propDef.type === "union" && propDef.values?.includes(prop) ? `${PREFIX}-${propDef.className}${typeof prop == "string" ? `-${prop}` : prop}${bp ? `-bp-${bp}` : ""}` : propDef.type === "string" || propDef.type === "number" ? `${PREFIX}-${propDef.className}${bp ? `-bp-${bp}` : ""}` : propDef.type === "boolean" ? `${PREFIX}-${prop ? propDef.className : propDef.inverse}${bp ? `-bp-${bp}` : ""}` : "";
277
+ function getClassName(propValue, propDef, bp) {
278
+ return propDef.type === "union" && propDef.values?.includes(propValue) ? `${PREFIX}-${propDef.className}${typeof propValue == "string" ? `-${propValue}` : propValue}${bp ? `-bp-${bp}` : ""}` : propDef.type === "string" || propDef.type === "number" ? `${PREFIX}-${propDef.className}${bp ? `-bp-${bp}` : ""}` : propDef.type === "boolean" ? `${PREFIX}-${propValue ? propDef.className : propDef.inverse}${bp ? `-bp-${bp}` : ""}` : "";
278
279
  }
279
- function getStyle(prop, propDef, bp) {
280
+ function getStyle(propValue, propDef, bp) {
280
281
  return propDef.type === "string" || propDef.type === "number" ? {
281
- [`${propDef.variable}${bp ? `-bp-${bp}` : ""}`]: prop
282
+ [`${propDef.variable}${bp ? `-bp-${bp}` : ""}`]: propValue
282
283
  } : {};
283
284
  }
285
+ function flattenCompositeProps(componentProps, propDefs) {
286
+ const props = {
287
+ allComponentProps: {},
288
+ allPropDefs: {}
289
+ };
290
+ for (const key in componentProps)
291
+ if (propDefs?.[key] && propDefs?.[key].type === "composite")
292
+ for (const compositeKey in propDefs?.[key].composition) {
293
+ const compositeValue = getCompositeValue(componentProps[key], propDefs[key], compositeKey);
294
+ props.allComponentProps[compositeKey] = compositeValue, props.allPropDefs[compositeKey] = propDefs[key].composition[compositeKey]?.propDef;
295
+ }
296
+ else
297
+ props.allComponentProps[key] = componentProps[key], props.allPropDefs[key] = propDefs?.[key];
298
+ return props;
299
+ }
300
+ function getCompositeValue(propValue, propDef, key) {
301
+ if (!("composition" in propDef))
302
+ return;
303
+ const mapping = propDef.composition[key]?.mapping;
304
+ let compositeValue;
305
+ if (Array.isArray(propValue)) {
306
+ compositeValue = [];
307
+ for (let i = 0, len = propValue.length; i < len; i++)
308
+ compositeValue[i] = mapping?.[propValue[i]];
309
+ } else
310
+ compositeValue = mapping?.[propValue];
311
+ return compositeValue;
312
+ }
284
313
  const boxProps = {
285
314
  as: {
286
315
  type: "string"
@@ -311,9 +340,22 @@ const cardProps = {
311
340
  density: {
312
341
  type: "composite",
313
342
  composition: {
314
- compact: "sui-p3 sui-radius2",
315
- regular: "sui-p4 sui-radius3",
316
- loose: "sui-p5 sui-radius4"
343
+ padding: {
344
+ propDef: paddingProps.padding,
345
+ mapping: {
346
+ compact: 3,
347
+ regular: 4,
348
+ loose: 5
349
+ }
350
+ },
351
+ radius: {
352
+ propDef: borderProps.radius,
353
+ mapping: {
354
+ compact: 2,
355
+ regular: 3,
356
+ loose: 4
357
+ }
358
+ }
317
359
  }
318
360
  },
319
361
  ...toneProps,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/types/Radius.ts","../src/props/border.ts","../src/props/flexChild.ts","../src/props/gridChild.ts","../src/props/height.ts","../src/types/Space.ts","../src/props/margin.ts","../src/types/Overflow.ts","../src/props/overflow.ts","../src/props/padding.ts","../src/types/Position.ts","../src/props/position.ts","../src/types/Tone.ts","../src/props/tone.ts","../src/props/width.ts","../src/props/layout.ts","../src/types/Display.ts","../src/utils/getProps.ts","../src/components/box/box.props.ts","../src/components/box/Box.tsx","../src/components/card/card.props.ts","../src/components/card/Card.tsx","../src/components/divider/Divider.tsx","../src/types/Flex.ts","../src/props/flexParent.ts","../src/props/gap.ts","../src/components/flex/flex.props.ts","../src/components/flex/Flex.tsx","../src/types/Grid.ts","../src/props/gridParent.ts","../src/components/grid/grid.props.ts","../src/components/grid/Grid.tsx","../src/types/FontWeight.ts","../src/types/TextAlign.ts","../src/props/typography.ts","../src/types/Heading.ts","../src/components/heading/heading.props.ts","../src/components/heading/Heading.tsx","../src/types/Text.ts","../src/components/text/text.props.ts","../src/components/text/Text.tsx"],"sourcesContent":["export const RADIUS = [0, 1, 2, 3, 4, 5, 6, 'full'] as const\nexport type Radius = (typeof RADIUS)[number]\n","import {type PropDef} from '../types/PropDef'\nimport {RADIUS, type Radius} from '../types/Radius'\nimport {type Responsive} from '../types/Responsive'\n\nexport type BorderProps = {\n /** CSS **border** property */\n border?: Responsive<boolean>\n /** CSS **border-top** property */\n borderTop?: Responsive<boolean>\n /** CSS **border-right** property */\n borderRight?: Responsive<boolean>\n /** CSS **border-bottom** property */\n borderBottom?: Responsive<boolean>\n /** CSS **border-left** property */\n borderLeft?: Responsive<boolean>\n /** CSS **border-radius** property */\n radius?: Responsive<Radius>\n}\n\nexport const borderProps: Record<string, PropDef> = {\n border: {\n type: 'boolean',\n className: 'border',\n inverse: 'border-none',\n },\n borderTop: {\n type: 'boolean',\n className: 'border-top',\n inverse: 'border-top-none',\n },\n borderRight: {\n type: 'boolean',\n className: 'border-right',\n inverse: 'border-right-none',\n },\n borderBottom: {\n type: 'boolean',\n className: 'border-bottom',\n inverse: 'border-bottom-none',\n },\n borderLeft: {\n type: 'boolean',\n className: 'border-left',\n inverse: 'border-left-none',\n },\n radius: {\n type: 'union',\n className: 'radius',\n values: RADIUS,\n },\n}\n","import {type PropDef} from '../types/PropDef'\nimport {type Responsive} from '../types/Responsive'\n\nexport type FlexChildProps = {\n /** CSS **flex-basis** property */\n flexBasis?: Responsive<string>\n /** CSS **flex-grow** property */\n flexGrow?: Responsive<number>\n /** CSS **flex-shrink** property */\n flexShrink?: Responsive<number>\n}\n\nexport const flexChildProps: Record<string, PropDef> = {\n flexBasis: {\n type: 'string',\n className: 'flex-basis',\n variable: '--flex-basis',\n },\n flexGrow: {\n type: 'number',\n className: 'flex-grow',\n variable: '--flex-grow',\n },\n flexShrink: {\n type: 'number',\n className: 'flex-shrink',\n variable: '--flex-shrink',\n },\n}\n","import {type PropDef} from '../types/PropDef'\nimport {type Responsive} from '../types/Responsive'\n\nexport type GridChildProps = {\n /** CSS **grid-column** property */\n gridColumn?: Responsive<string>\n /** CSS **grid-column-start** property */\n gridColumnStart?: Responsive<string>\n /** CSS **grid-column-end** property */\n gridColumnEnd?: Responsive<string>\n /** CSS **grid-row** property */\n gridRow?: Responsive<string>\n /** CSS **grid-row-start** property */\n gridRowStart?: Responsive<string>\n /** CSS **grid-row-end** property */\n gridRowEnd?: Responsive<string>\n}\n\nexport const gridChildProps: Record<string, PropDef> = {\n gridColumn: {\n type: 'string',\n className: 'grid-column',\n variable: '--grid-column',\n },\n gridColumnStart: {\n type: 'string',\n className: 'grid-column-start',\n variable: '--grid-column-start',\n },\n gridColumnEnd: {\n type: 'string',\n className: 'grid-column-end',\n variable: '--grid-column-end',\n },\n gridRow: {\n type: 'string',\n className: 'grid-row',\n variable: '--grid-row',\n },\n gridRowStart: {\n type: 'string',\n className: 'grid-row-start',\n variable: '--grid-row-start',\n },\n gridRowEnd: {\n type: 'string',\n className: 'grid-row-end',\n variable: '--grid-row-end',\n },\n}\n","import {type PropDef} from '../types/PropDef'\nimport {type Responsive} from '../types/Responsive'\n\nexport type HeightProps = {\n /** CSS **height** property */\n height?: Responsive<string>\n /** CSS **min-height** property */\n minHeight?: Responsive<string>\n /** CSS **max-height** property */\n maxHeight?: Responsive<string>\n}\n\nexport const heightProps: Record<string, PropDef> = {\n height: {\n type: 'string',\n className: 'height',\n variable: '--height',\n },\n minHeight: {\n type: 'string',\n className: 'min-height',\n variable: '--min-height',\n },\n maxHeight: {\n type: 'string',\n className: 'max-height',\n variable: '--max-height',\n },\n}\n","export const SPACE = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] as const\nexport type Space = (typeof SPACE)[number]\n\nexport const SPACE_AUTO = [...SPACE, 'auto'] as const\nexport type SpaceAuto = (typeof SPACE_AUTO)[number]\n","import {type PropDef} from '../types/PropDef'\nimport {type Responsive} from '../types/Responsive'\nimport {SPACE_AUTO, type SpaceAuto} from '../types/Space'\n\nexport type MarginProps = {\n /** CSS **margin** property */\n margin?: Responsive<SpaceAuto>\n /** CSS **margin-left** and **margin-right** properties */\n marginX?: Responsive<SpaceAuto>\n /** CSS **margin-top** and **margin-bottom** properties */\n marginY?: Responsive<SpaceAuto>\n /** CSS **margin-top** property */\n marginTop?: Responsive<SpaceAuto>\n /** CSS **margin-right** property */\n marginRight?: Responsive<SpaceAuto>\n /** CSS **margin-bottom** property */\n marginBottom?: Responsive<SpaceAuto>\n /** CSS **margin-left** property */\n marginLeft?: Responsive<SpaceAuto>\n}\n\nexport const marginProps: Record<string, PropDef> = {\n margin: {\n type: 'union',\n className: 'm',\n values: SPACE_AUTO,\n },\n marginX: {\n type: 'union',\n className: 'mx',\n values: SPACE_AUTO,\n },\n marginY: {\n type: 'union',\n className: 'my',\n values: SPACE_AUTO,\n },\n marginTop: {\n type: 'union',\n className: 'mt',\n values: SPACE_AUTO,\n },\n marginRight: {\n type: 'union',\n className: 'mr',\n values: SPACE_AUTO,\n },\n marginBottom: {\n type: 'union',\n className: 'mb',\n values: SPACE_AUTO,\n },\n marginLeft: {\n type: 'union',\n className: 'ml',\n values: SPACE_AUTO,\n },\n}\n","export const OVERFLOW = ['visible', 'hidden', 'auto', 'scroll', 'clip'] as const\nexport type Overflow = (typeof OVERFLOW)[number]\n","import {OVERFLOW, type Overflow} from '../types/Overflow'\nimport {type PropDef} from '../types/PropDef'\nimport {type Responsive} from '../types/Responsive'\n\nexport type OverflowProps = {\n /** CSS **overflow** property */\n overflow?: Responsive<Overflow>\n /** CSS **overflow-x** property */\n overflowX?: Responsive<Overflow>\n /** CSS **overflow-y** property */\n overflowY?: Responsive<Overflow>\n}\n\nexport const overflowProps: Record<string, PropDef> = {\n overflow: {\n type: 'union',\n className: 'overflow',\n values: OVERFLOW,\n },\n overflowX: {\n type: 'union',\n className: 'overflow-x',\n values: OVERFLOW,\n },\n overflowY: {\n type: 'union',\n className: 'overflow-y',\n values: OVERFLOW,\n },\n}\n","import {type PropDef} from '../types/PropDef'\nimport {type Responsive} from '../types/Responsive'\nimport {SPACE, type Space} from '../types/Space'\n\nexport interface PaddingProps {\n /** CSS **padding** property */\n padding?: Responsive<Space>\n /** CSS **padding-left** and **padding-right** properties */\n paddingX?: Responsive<Space>\n /** CSS **padding-top** and **padding-bottom** properties */\n paddingY?: Responsive<Space>\n /** CSS **padding-top** property */\n paddingTop?: Responsive<Space>\n /** CSS **padding-right** property */\n paddingRight?: Responsive<Space>\n /** CSS **padding-bottom** property */\n paddingBottom?: Responsive<Space>\n /** CSS **padding-left** property */\n paddingLeft?: Responsive<Space>\n}\n\nexport const paddingProps: Record<string, PropDef> = {\n padding: {\n type: 'union',\n className: 'p',\n values: SPACE,\n },\n paddingX: {\n type: 'union',\n className: 'px',\n values: SPACE,\n },\n paddingY: {\n type: 'union',\n className: 'py',\n values: SPACE,\n },\n paddingTop: {\n type: 'union',\n className: 'pt',\n values: SPACE,\n },\n paddingRight: {\n type: 'union',\n className: 'pr',\n values: SPACE,\n },\n paddingBottom: {\n type: 'union',\n className: 'pb',\n values: SPACE,\n },\n paddingLeft: {\n type: 'union',\n className: 'pl',\n values: SPACE,\n },\n}\n","export const POSITION = ['absolute', 'fixed', 'relative', 'static', 'sticky'] as const\nexport type Position = (typeof POSITION)[number]\n","import {POSITION, type Position} from '../types/Position'\nimport {type PropDef} from '../types/PropDef'\nimport {type Responsive} from '../types/Responsive'\nimport {SPACE_AUTO, type SpaceAuto} from '../types/Space'\n\nexport type PositionProps = {\n /** CSS **position** property */\n position?: Responsive<Position>\n /** CSS **inset** property */\n inset?: Responsive<SpaceAuto>\n /** CSS **top** property */\n top?: Responsive<SpaceAuto>\n /** CSS **right** property */\n right?: Responsive<SpaceAuto>\n /** CSS **bottom** property */\n bottom?: Responsive<SpaceAuto>\n /** CSS **left** property */\n left?: Responsive<SpaceAuto>\n /** CSS **z-index** property */\n zIndex?: Responsive<number>\n}\n\nexport const positionProps: Record<string, PropDef> = {\n position: {\n type: 'union',\n className: 'position',\n values: POSITION,\n },\n inset: {\n type: 'union',\n className: 'inset',\n values: SPACE_AUTO,\n },\n top: {\n type: 'union',\n className: 'top',\n values: SPACE_AUTO,\n },\n right: {\n type: 'union',\n className: 'right',\n values: SPACE_AUTO,\n },\n bottom: {\n type: 'union',\n className: 'bottom',\n values: SPACE_AUTO,\n },\n left: {\n type: 'union',\n className: 'left',\n values: SPACE_AUTO,\n },\n zIndex: {\n type: 'number',\n className: 'z-index',\n variable: '--z-index',\n },\n}\n","export const TONE = ['neutral', 'primary', 'positive', 'suggest', 'caution', 'critical'] as const\nexport type Tone = (typeof TONE)[number]\n\nexport const TONE_LEVEL = ['muted', 'normal', 'strong']\nexport type ToneLevel = (typeof TONE_LEVEL)[number]\n","import {type PropDef} from '../types/PropDef'\nimport {TONE, type Tone, TONE_LEVEL, type ToneLevel} from '../types/Tone'\n\nexport type ToneProps = {\n /** CSS **background-color** property */\n tone?: Tone\n toneLevel?: ToneLevel\n}\n\nexport const toneProps: Record<string, PropDef> = {\n tone: {\n type: 'union',\n className: 'tone',\n values: TONE,\n },\n toneLevel: {\n type: 'union',\n className: 'tone-level',\n values: TONE_LEVEL,\n },\n}\n","import {type PropDef} from '../types/PropDef'\nimport {type Responsive} from '../types/Responsive'\n\nexport type WidthProps = {\n /** CSS **width** property */\n width?: Responsive<string>\n /** CSS **min-width** property */\n minWidth?: Responsive<string>\n /** CSS **max-width** property */\n maxWidth?: Responsive<string>\n}\n\nexport const widthProps: Record<string, PropDef> = {\n width: {\n type: 'string',\n className: 'width',\n variable: '--width',\n },\n minWidth: {\n type: 'string',\n className: 'min-width',\n variable: '--min-width',\n },\n maxWidth: {\n type: 'string',\n className: 'max-width',\n variable: '--max-width',\n },\n}\n","import {type PropDef} from '../types/PropDef'\nimport {type BorderProps, borderProps} from './border'\nimport {type FlexChildProps, flexChildProps} from './flexChild'\nimport {type GridChildProps, gridChildProps} from './gridChild'\nimport {type HeightProps, heightProps} from './height'\nimport {type MarginProps, marginProps} from './margin'\nimport {type OverflowProps, overflowProps} from './overflow'\nimport {type PaddingProps, paddingProps} from './padding'\nimport {type PositionProps, positionProps} from './position'\nimport {type ToneProps, toneProps} from './tone'\nimport {type WidthProps, widthProps} from './width'\n\nexport interface LayoutProps\n extends\n ToneProps,\n WidthProps,\n HeightProps,\n MarginProps,\n BorderProps,\n PaddingProps,\n PositionProps,\n OverflowProps,\n FlexChildProps,\n GridChildProps {}\n\nexport const layoutProps: Record<string, PropDef> = {\n ...toneProps,\n ...widthProps,\n ...heightProps,\n ...marginProps,\n ...borderProps,\n ...paddingProps,\n ...positionProps,\n ...overflowProps,\n ...flexChildProps,\n ...gridChildProps,\n}\n","export const DISPLAY_BLOCK = ['block', 'inline-block', 'none'] as const\nexport type DisplayBlock = (typeof DISPLAY_BLOCK)[number]\n\nexport const DISPLAY_FLEX = ['flex', 'inline-flex', 'none'] as const\nexport type DisplayFlex = (typeof DISPLAY_FLEX)[number]\n\nexport const DISPLAY_GRID = ['grid', 'inline-grid', 'none'] as const\nexport type DisplayGrid = (typeof DISPLAY_GRID)[number]\n","import classNames from 'classnames'\n\nimport {type PropDef} from '../types/PropDef'\n\nconst PREFIX = 'sui'\nconst BREAKPOINTS_LENGTH = 7\n\ninterface ComponentProps {\n className?: string\n style?: React.CSSProperties\n /* eslint-disable-next-line @typescript-eslint/no-explicit-any */\n [key: string]: any\n}\n\nexport function getProps<P extends ComponentProps, T extends Record<string, PropDef>>(\n componentProps?: P,\n propDefs?: T,\n): ComponentProps {\n let className = componentProps?.className || ''\n let style = componentProps?.style || {}\n const restProps: ComponentProps = {}\n\n for (const key in componentProps) {\n // Pass over props that don't effect CSS output, including them in `restProps` instead.\n // @TODO Is there a better way to write this `if`? Perhaps explicitly enumerating the props\n // we know we don't need to operate on here (e.g. the `as` prop)?\n if (\n !propDefs?.[key] ||\n (!('className' in propDefs[key]) && !('composition' in propDefs[key]))\n ) {\n restProps[key] = componentProps[key]\n continue\n }\n\n if (Array.isArray(componentProps[key])) {\n for (\n let i = 0, len = Math.min(componentProps[key].length, BREAKPOINTS_LENGTH);\n i < len;\n i++\n ) {\n className = classNames(className, getClassName(componentProps[key][i], propDefs[key], i))\n style = {...style, ...getStyle(componentProps[key][i], propDefs[key], i)}\n }\n } else {\n className = classNames(className, getClassName(componentProps[key], propDefs[key]))\n style = {...style, ...getStyle(componentProps[key], propDefs[key])}\n }\n }\n\n return {...restProps, className, style}\n}\n\n/* eslint-disable-next-line @typescript-eslint/no-explicit-any */\nfunction getClassName(prop: any, propDef: PropDef, bp?: number) {\n if (propDef.type === 'composite' && propDef.composition[prop]) {\n const classes = bp\n ? propDef.composition[prop]\n .split(' ')\n .map((className: string) => `${className}-bp-${bp}`)\n .join(' ')\n : propDef.composition[prop]\n // @TODO prefix has been written included as part of composite class names; does it need to be dynamic?\n return classes\n }\n\n if (propDef.type === 'union' && propDef.values?.includes(prop)) {\n /* Note: This may need updating depending on the final CSS classname formatting */\n return `${PREFIX}-${propDef.className}${typeof prop === 'string' ? `-${prop}` : prop}${bp ? `-bp-${bp}` : ''}`\n }\n\n if (propDef.type === 'string' || propDef.type === 'number') {\n return `${PREFIX}-${propDef.className}${bp ? `-bp-${bp}` : ''}`\n }\n\n if (propDef.type === 'boolean') {\n return `${PREFIX}-${prop ? propDef.className : propDef.inverse}${bp ? `-bp-${bp}` : ''}`\n }\n\n return ''\n}\n\n/* eslint-disable-next-line @typescript-eslint/no-explicit-any */\nfunction getStyle(prop: any, propDef: PropDef, bp?: number) {\n if (propDef.type === 'string' || propDef.type === 'number') {\n return {\n [`${propDef.variable}${bp ? `-bp-${bp}` : ''}`]: prop,\n }\n }\n\n return {}\n}\n","import {layoutProps} from '../../props/layout'\nimport {DISPLAY_BLOCK} from '../../types/Display'\nimport {type PropDef} from '../../types/PropDef'\n\nexport const boxProps: Record<string, PropDef> = {\n as: {\n type: 'string',\n },\n display: {\n type: 'union',\n className: 'display',\n values: DISPLAY_BLOCK,\n },\n ...layoutProps,\n}\n","import classNames from 'classnames'\nimport React from 'react'\n\nimport {type LayoutProps} from '../../props/layout'\nimport {type DisplayBlock} from '../../types/Display'\nimport {type Responsive} from '../../types/Responsive'\nimport {getProps} from '../../utils/getProps'\nimport {boxProps} from './box.props'\n\n/** @public */\nexport interface BoxProps<T extends React.ElementType> extends LayoutProps {\n /** Element to render */\n as?: T\n /** CSS **display** property */\n display?: Responsive<DisplayBlock>\n}\n\n/** @public */\nexport function Box<T extends React.ElementType = 'div'>({\n display = 'block',\n ...props\n}: BoxProps<T> & Omit<React.ComponentPropsWithRef<T>, keyof BoxProps<T>>) {\n const {as, children, className, style, ...rest} = getProps({display, ...props}, boxProps)\n const Component = as || 'div'\n\n return (\n <Component className={classNames('sui-Box', className)} style={style} data-ui=\"Box\" {...rest}>\n {children}\n </Component>\n )\n}\n","import {type MarginProps, marginProps} from '../../props/margin'\nimport {toneProps} from '../../props/tone'\nimport {type Density} from '../../types/Density'\nimport {DISPLAY_BLOCK, type DisplayBlock} from '../../types/Display'\nimport {type PropDef} from '../../types/PropDef'\nimport {type Responsive} from '../../types/Responsive'\nimport type {Tone, ToneLevel} from '../../types/Tone'\n\n/** @public */\nexport interface CardProps<T extends React.ElementType> extends MarginProps {\n /** Element to render */\n as?: T\n /** CSS **display** property */\n display?: Responsive<DisplayBlock>\n /** Composite prop for setting padding and border radius */\n density?: Responsive<Density>\n tone?: Tone\n toneLevel?: ToneLevel\n}\n\nexport const cardProps: Record<string, PropDef> = {\n as: {\n type: 'string',\n },\n display: {\n type: 'union',\n className: 'display',\n values: DISPLAY_BLOCK,\n },\n density: {\n type: 'composite',\n composition: {\n compact: 'sui-p3 sui-radius2',\n regular: 'sui-p4 sui-radius3',\n loose: 'sui-p5 sui-radius4',\n } as Record<Density, string>,\n },\n ...toneProps,\n ...marginProps,\n}\n","import classNames from 'classnames'\nimport React from 'react'\n\nimport {getProps} from '../../utils/getProps'\nimport {type CardProps, cardProps} from './card.props'\n\n/** @public */\nexport function Card<T extends React.ElementType = 'div'>({\n density = 'regular',\n tone = 'neutral',\n toneLevel = 'normal',\n ...props\n}: CardProps<T> & Omit<React.ComponentPropsWithRef<T>, keyof CardProps<T>>) {\n const {as, children, className, style, ...rest} = getProps(\n {density, tone, toneLevel, ...props},\n cardProps,\n )\n const Component = as || 'div'\n\n return (\n <Component className={classNames('sui-Card', className)} style={style} data-ui=\"Card\" {...rest}>\n {children}\n </Component>\n )\n}\n","import React from 'react'\n\n/** @public */\nexport function Divider() {\n return (\n <hr\n className=\"sui-Divider sui-border-bottom-none sui-border-left-none sui-border-right-none sui-border-top\"\n data-ui=\"Divider\"\n />\n )\n}\n","export const ALIGN_ITEMS = ['baseline', 'center', 'flex-end', 'flex-start', 'stretch'] as const\nexport type AlignItems = (typeof ALIGN_ITEMS)[number]\n\nexport const JUSTIFY_CONTENT = [\n 'flex-start',\n 'flex-end',\n 'center',\n 'space-between',\n 'space-around',\n 'space-evenly',\n] as const\nexport type JustifyContent = (typeof JUSTIFY_CONTENT)[number]\n\nexport const FLEX_DIRECTION = ['row', 'row-reverse', 'column', 'column-reverse'] as const\nexport type FlexDirection = (typeof FLEX_DIRECTION)[number]\n\nexport const FLEX_WRAP = ['wrap', 'wrap-reverse', 'nowrap'] as const\nexport type FlexWrap = (typeof FLEX_WRAP)[number]\n","import {\n ALIGN_ITEMS,\n type AlignItems,\n FLEX_DIRECTION,\n FLEX_WRAP,\n type FlexDirection,\n type FlexWrap,\n JUSTIFY_CONTENT,\n type JustifyContent,\n} from '../types/Flex'\nimport {type PropDef} from '../types/PropDef'\nimport {type Responsive} from '../types/Responsive'\n\nexport type FlexParentProps = {\n /** CSS **align-items** property */\n alignItems?: Responsive<AlignItems>\n /** CSS **justify-content** property */\n justifyContent?: Responsive<JustifyContent>\n /** CSS **flex-direction** property */\n flexDirection?: Responsive<FlexDirection>\n /** CSS **flex-wrap** property */\n flexWrap?: Responsive<FlexWrap>\n}\n\nexport const flexParentProps: Record<string, PropDef> = {\n alignItems: {\n type: 'union',\n className: 'align-items',\n values: ALIGN_ITEMS,\n },\n justifyContent: {\n type: 'union',\n className: 'justify-content',\n values: JUSTIFY_CONTENT,\n },\n flexDirection: {\n type: 'union',\n className: 'flex-direction',\n values: FLEX_DIRECTION,\n },\n flexWrap: {\n type: 'union',\n className: 'flex-wrap',\n values: FLEX_WRAP,\n },\n}\n","import {type PropDef} from '../types/PropDef'\nimport {type Responsive} from '../types/Responsive'\nimport {SPACE, type Space} from '../types/Space'\n\nexport type GapProps = {\n /** CSS **gap** property */\n gap?: Responsive<Space>\n /** CSS **row-gap** property */\n rowGap?: Responsive<Space>\n /** CSS **column-gap** property */\n columnGap?: Responsive<Space>\n}\n\nexport const gapProps: Record<string, PropDef> = {\n gap: {\n type: 'union',\n className: 'gap',\n values: SPACE,\n },\n rowGap: {\n type: 'union',\n className: 'row-gap',\n values: SPACE,\n },\n columnGap: {\n type: 'union',\n className: 'column-gap',\n values: SPACE,\n },\n}\n","import {flexParentProps} from '../../props/flexParent'\nimport {gapProps} from '../../props/gap'\nimport {layoutProps} from '../../props/layout'\nimport {DISPLAY_FLEX} from '../../types/Display'\nimport {type PropDef} from '../../types/PropDef'\n\nexport const flexProps: Record<string, PropDef> = {\n as: {\n type: 'string',\n },\n display: {\n type: 'union',\n className: 'display',\n values: DISPLAY_FLEX,\n },\n ...flexParentProps,\n ...gapProps,\n ...layoutProps,\n}\n","import classNames from 'classnames'\nimport React from 'react'\n\nimport type {FlexParentProps} from '../../props/flexParent'\nimport type {GapProps} from '../../props/gap'\nimport {type LayoutProps} from '../../props/layout'\nimport {type DisplayFlex} from '../../types/Display'\nimport {type Responsive} from '../../types/Responsive'\nimport {getProps} from '../../utils/getProps'\nimport {flexProps} from './flex.props'\n\n/** @public */\nexport interface FlexProps<T extends React.ElementType>\n extends FlexParentProps, GapProps, LayoutProps {\n /** Element to render */\n as?: T\n /** CSS **display** property */\n display?: Responsive<DisplayFlex>\n}\n\n/** @public */\nexport function Flex<T extends React.ElementType = 'div'>({\n display = 'flex',\n ...props\n}: FlexProps<T> & Omit<React.ComponentPropsWithRef<T>, keyof FlexProps<T>>) {\n const {as, children, className, style, ...rest} = getProps({display, ...props}, flexProps)\n const Component = as || 'div'\n\n return (\n <Component className={classNames('sui-Flex', className)} style={style} data-ui=\"Flex\" {...rest}>\n {children}\n </Component>\n )\n}\n","export const GRID_AUTO_FLOW = ['row', 'column', 'row dense', 'column dense', 'dense'] as const\nexport type GridAutoFlow = (typeof GRID_AUTO_FLOW)[number]\n","import {GRID_AUTO_FLOW, type GridAutoFlow} from '../types/Grid'\nimport {type PropDef} from '../types/PropDef'\nimport {type Responsive} from '../types/Responsive'\n\nexport type GridParentProps = {\n /** CSS **grid-auto-flow** property */\n gridAutoFlow?: Responsive<GridAutoFlow>\n /** CSS **grid-auto-columns** property */\n gridAutoColumns?: Responsive<string>\n /** CSS **grid-auto-row** property */\n gridAutoRows?: Responsive<string>\n /** CSS **grid-template-columns** property */\n gridTemplateColumns?: Responsive<string>\n /** CSS **grid-template-rows** property */\n gridTemplateRows?: Responsive<string>\n}\n\nexport const gridParentProps: Record<string, PropDef> = {\n gridAutoFlow: {\n type: 'union',\n className: 'grid-auto-flow',\n values: GRID_AUTO_FLOW,\n },\n gridAutoColumns: {\n type: 'string',\n className: 'grid-auto-columns',\n variable: '--grid-auto-columns',\n },\n gridAutoRows: {\n type: 'string',\n className: 'grid-auto-rows',\n variable: '--grid-auto-rows',\n },\n gridTemplateColumns: {\n type: 'string',\n className: 'grid-template-columns',\n variable: '--grid-template-columns',\n },\n gridTemplateRows: {\n type: 'string',\n className: 'grid-template-rows',\n variable: '--grid-template-rows',\n },\n}\n","import {gapProps} from '../../props/gap'\nimport {gridParentProps} from '../../props/gridParent'\nimport {layoutProps} from '../../props/layout'\nimport {DISPLAY_GRID} from '../../types/Display'\nimport {type PropDef} from '../../types/PropDef'\n\nexport const gridProps: Record<string, PropDef> = {\n as: {\n type: 'string',\n },\n display: {\n type: 'union',\n className: 'display',\n values: DISPLAY_GRID,\n },\n ...gridParentProps,\n ...gapProps,\n ...layoutProps,\n}\n","import classNames from 'classnames'\nimport React from 'react'\n\nimport {type GapProps} from '../../props/gap'\nimport {type GridParentProps} from '../../props/gridParent'\nimport {type LayoutProps} from '../../props/layout'\nimport {type DisplayGrid} from '../../types/Display'\nimport {type Responsive} from '../../types/Responsive'\nimport {getProps} from '../../utils/getProps'\nimport {gridProps} from './grid.props'\n\n/** @public */\nexport interface GridProps<T extends React.ElementType>\n extends GridParentProps, GapProps, LayoutProps {\n /** Element to render */\n as?: T\n /** CSS **display** property */\n display?: Responsive<DisplayGrid>\n}\n\n/** @public */\nexport function Grid<T extends React.ElementType = 'div'>({\n display = 'grid',\n ...props\n}: GridProps<T> & Omit<React.ComponentPropsWithRef<T>, keyof GridProps<T>>) {\n const {as, children, className, style, ...rest} = getProps({display, ...props}, gridProps)\n const Component = as || 'div'\n\n return (\n <Component className={classNames('sui-Grid', className)} style={style} data-ui=\"Grid\" {...rest}>\n {children}\n </Component>\n )\n}\n","export const FONT_WEIGHT = ['regular', 'medium', 'semibold', 'bold'] as const\nexport type FontWeight = (typeof FONT_WEIGHT)[number]\n","export const TEXT_ALIGN = ['left', 'center', 'right', 'justify'] as const\nexport type TextAlign = (typeof TEXT_ALIGN)[number]\n","import {FONT_WEIGHT, type FontWeight} from '../types/FontWeight'\nimport {type PropDef} from '../types/PropDef'\nimport {TEXT_ALIGN, type TextAlign} from '../types/TextAlign'\nimport {type MarginProps, marginProps} from './margin'\n\nexport interface TypographyProps extends MarginProps {\n /** CSS **text-align** property */\n align?: TextAlign\n /** CSS **-webkit-line-clamp** property */\n lineClamp?: number\n /** CSS **color** property */\n muted?: boolean\n /** CSS **text-box-trim** property */\n trim?: boolean\n /** CSS **font-weight** property */\n weight?: FontWeight\n}\n\nexport const typographyProps: Record<string, PropDef> = {\n align: {\n type: 'union',\n className: 'text',\n values: TEXT_ALIGN,\n },\n lineClamp: {\n type: 'number',\n className: 'line-clamp',\n variable: '--line-clamp',\n },\n muted: {\n type: 'boolean',\n className: 'text-muted',\n inverse: 'text-default',\n },\n trim: {\n type: 'boolean',\n className: 'text-trim',\n inverse: 'text-trim-none',\n },\n weight: {\n type: 'union',\n className: 'weight',\n values: FONT_WEIGHT,\n },\n ...marginProps,\n}\n","export const HEADING_TAG = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const\nexport type HeadingTag = (typeof HEADING_TAG)[number]\n\nexport const HEADING_SIZE = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] as const\nexport type HeadingSize = (typeof HEADING_SIZE)[number]\n","import {type TypographyProps, typographyProps} from '../../props/typography'\nimport {HEADING_SIZE, HEADING_TAG, type HeadingSize, type HeadingTag} from '../../types/Heading'\nimport {type PropDef} from '../../types/PropDef'\n\n/** @public */\nexport interface HeadingProps extends TypographyProps {\n /** Element to render */\n as?: HeadingTag\n /** CSS **font-size** property */\n size?: HeadingSize\n}\n\nexport const headingProps: Record<string, PropDef> = {\n as: {\n type: 'union',\n values: HEADING_TAG,\n },\n size: {\n type: 'union',\n className: 'text-heading',\n values: HEADING_SIZE,\n },\n ...typographyProps,\n}\n","import classNames from 'classnames'\nimport React from 'react'\n\nimport {getProps} from '../../utils/getProps'\nimport {type HeadingProps, headingProps} from './heading.props'\n\n/** @public */\nexport function Heading<T extends React.ElementType = 'h1'>({\n size = 2,\n weight = 'bold',\n ...props\n}: HeadingProps & Omit<React.ComponentPropsWithRef<T>, keyof HeadingProps>) {\n const {as, children, className, style, ...rest} = getProps({size, weight, ...props}, headingProps)\n const Component = as || 'h1'\n\n if (props.lineClamp && props.trim) {\n return (\n <Component\n className={classNames('sui-Heading', className?.replace('sui-line-clamp', ''))}\n style={style}\n data-ui=\"Heading\"\n {...rest}\n >\n <span className=\"sui-line-clamp\">{children}</span>\n </Component>\n )\n }\n\n return (\n <Component\n className={classNames('sui-Heading', className)}\n style={style}\n data-ui=\"Heading\"\n {...rest}\n >\n {children}\n </Component>\n )\n}\n","export const TEXT_SIZE = [0, 1, 2, 3, 4] as const\nexport type TextSize = (typeof TEXT_SIZE)[number]\n","import {typographyProps} from '../../props/typography'\nimport {type PropDef} from '../../types/PropDef'\nimport {TEXT_SIZE} from '../../types/Text'\n\nexport const textProps: Record<string, PropDef> = {\n as: {\n type: 'string',\n },\n size: {\n type: 'union',\n className: 'text-body',\n values: TEXT_SIZE,\n },\n ...typographyProps,\n}\n","import classNames from 'classnames'\nimport React from 'react'\n\nimport type {TypographyProps} from '../../props/typography'\nimport type {TextSize} from '../../types/Text'\nimport {getProps} from '../../utils/getProps'\nimport {textProps} from './text.props'\n\n/** @public */\nexport interface TextProps<T extends React.ElementType> extends TypographyProps {\n /** Element to render */\n as?: T\n /** CSS **font-size** property */\n size?: TextSize\n}\n\n/** @public */\nexport function Text<T extends React.ElementType = 'p'>({\n size = 2,\n ...props\n}: TextProps<T> & Omit<React.ComponentPropsWithRef<T>, keyof TextProps<T>>) {\n const {as, children, className, style, ...rest} = getProps({size, ...props}, textProps)\n const Component = as || 'p'\n\n if (props.lineClamp && props.trim) {\n return (\n <Component\n className={classNames('sui-Text', className?.replace('sui-line-clamp', ''))}\n style={style}\n data-ui=\"Text\"\n {...rest}\n >\n <span className=\"sui-line-clamp\">{children}</span>\n </Component>\n )\n }\n\n return (\n <Component className={classNames('sui-Text', className)} style={style} data-ui=\"Text\" {...rest}>\n {children}\n </Component>\n )\n}\n"],"names":[],"mappings":";;AAAO,MAAM,SAAS,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,MAAM,GCmBrC,cAAuC;AAAA,EAClD,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,WAAW;AAAA,IACX,SAAS;AAAA,EAAA;AAAA,EAEX,WAAW;AAAA,IACT,MAAM;AAAA,IACN,WAAW;AAAA,IACX,SAAS;AAAA,EAAA;AAAA,EAEX,aAAa;AAAA,IACX,MAAM;AAAA,IACN,WAAW;AAAA,IACX,SAAS;AAAA,EAAA;AAAA,EAEX,cAAc;AAAA,IACZ,MAAM;AAAA,IACN,WAAW;AAAA,IACX,SAAS;AAAA,EAAA;AAAA,EAEX,YAAY;AAAA,IACV,MAAM;AAAA,IACN,WAAW;AAAA,IACX,SAAS;AAAA,EAAA;AAAA,EAEX,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,WAAW;AAAA,IACX,QAAQ;AAAA,EAAA;AAEZ,GCtCa,iBAA0C;AAAA,EACrD,WAAW;AAAA,IACT,MAAM;AAAA,IACN,WAAW;AAAA,IACX,UAAU;AAAA,EAAA;AAAA,EAEZ,UAAU;AAAA,IACR,MAAM;AAAA,IACN,WAAW;AAAA,IACX,UAAU;AAAA,EAAA;AAAA,EAEZ,YAAY;AAAA,IACV,MAAM;AAAA,IACN,WAAW;AAAA,IACX,UAAU;AAAA,EAAA;AAEd,GCVa,iBAA0C;AAAA,EACrD,YAAY;AAAA,IACV,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M,OAEzB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,WAAW,YAAY,WAAW,QAAQ,kBAAkB,EAAE,CAAC;AAAA,MAC1E;AAAA,MACA,WAAQ;AAAA,MACP,GAAG;AAAA,MAEJ,UAAA,oBAAC,QAAA,EAAK,WAAU,kBAAkB,SAAA,CAAS;AAAA,IAAA;AAAA,EAAA,IAM/C,oBAAC,WAAA,EAAU,WAAW,WAAW,YAAY,SAAS,GAAG,OAAc,WAAQ,QAAQ,GAAG,MACvF,SAAA,CACH;AAEJ;"}
1
+ {"version":3,"file":"index.js","sources":["../src/types/Radius.ts","../src/props/border.ts","../src/props/flexChild.ts","../src/props/gridChild.ts","../src/props/height.ts","../src/types/Space.ts","../src/props/margin.ts","../src/types/Overflow.ts","../src/props/overflow.ts","../src/props/padding.ts","../src/types/Position.ts","../src/props/position.ts","../src/types/Tone.ts","../src/props/tone.ts","../src/props/width.ts","../src/props/layout.ts","../src/types/Display.ts","../src/utils/getProps.ts","../src/components/box/box.props.ts","../src/components/box/Box.tsx","../src/components/card/card.props.ts","../src/components/card/Card.tsx","../src/components/divider/Divider.tsx","../src/types/Flex.ts","../src/props/flexParent.ts","../src/props/gap.ts","../src/components/flex/flex.props.ts","../src/components/flex/Flex.tsx","../src/types/Grid.ts","../src/props/gridParent.ts","../src/components/grid/grid.props.ts","../src/components/grid/Grid.tsx","../src/types/FontWeight.ts","../src/types/TextAlign.ts","../src/props/typography.ts","../src/types/Heading.ts","../src/components/heading/heading.props.ts","../src/components/heading/Heading.tsx","../src/types/Text.ts","../src/components/text/text.props.ts","../src/components/text/Text.tsx"],"sourcesContent":["export const RADIUS = [0, 1, 2, 3, 4, 5, 6, 'full'] as const\nexport type Radius = (typeof RADIUS)[number]\n","import {type PropDef} from '../types/PropDef'\nimport {RADIUS, type Radius} from '../types/Radius'\nimport {type Responsive} from '../types/Responsive'\n\nexport type BorderProps = {\n /** CSS **border** property */\n border?: Responsive<boolean>\n /** CSS **border-top** property */\n borderTop?: Responsive<boolean>\n /** CSS **border-right** property */\n borderRight?: Responsive<boolean>\n /** CSS **border-bottom** property */\n borderBottom?: Responsive<boolean>\n /** CSS **border-left** property */\n borderLeft?: Responsive<boolean>\n /** CSS **border-radius** property */\n radius?: Responsive<Radius>\n}\n\nexport const borderProps: Record<string, PropDef> = {\n border: {\n type: 'boolean',\n className: 'border',\n inverse: 'border-none',\n },\n borderTop: {\n type: 'boolean',\n className: 'border-top',\n inverse: 'border-top-none',\n },\n borderRight: {\n type: 'boolean',\n className: 'border-right',\n inverse: 'border-right-none',\n },\n borderBottom: {\n type: 'boolean',\n className: 'border-bottom',\n inverse: 'border-bottom-none',\n },\n borderLeft: {\n type: 'boolean',\n className: 'border-left',\n inverse: 'border-left-none',\n },\n radius: {\n type: 'union',\n className: 'radius',\n values: RADIUS,\n },\n}\n","import {type PropDef} from '../types/PropDef'\nimport {type Responsive} from '../types/Responsive'\n\nexport type FlexChildProps = {\n /** CSS **flex-basis** property */\n flexBasis?: Responsive<string>\n /** CSS **flex-grow** property */\n flexGrow?: Responsive<number>\n /** CSS **flex-shrink** property */\n flexShrink?: Responsive<number>\n}\n\nexport const flexChildProps: Record<string, PropDef> = {\n flexBasis: {\n type: 'string',\n className: 'flex-basis',\n variable: '--flex-basis',\n },\n flexGrow: {\n type: 'number',\n className: 'flex-grow',\n variable: '--flex-grow',\n },\n flexShrink: {\n type: 'number',\n className: 'flex-shrink',\n variable: '--flex-shrink',\n },\n}\n","import {type PropDef} from '../types/PropDef'\nimport {type Responsive} from '../types/Responsive'\n\nexport type GridChildProps = {\n /** CSS **grid-column** property */\n gridColumn?: Responsive<string>\n /** CSS **grid-column-start** property */\n gridColumnStart?: Responsive<string>\n /** CSS **grid-column-end** property */\n gridColumnEnd?: Responsive<string>\n /** CSS **grid-row** property */\n gridRow?: Responsive<string>\n /** CSS **grid-row-start** property */\n gridRowStart?: Responsive<string>\n /** CSS **grid-row-end** property */\n gridRowEnd?: Responsive<string>\n}\n\nexport const gridChildProps: Record<string, PropDef> = {\n gridColumn: {\n type: 'string',\n className: 'grid-column',\n variable: '--grid-column',\n },\n gridColumnStart: {\n type: 'string',\n className: 'grid-column-start',\n variable: '--grid-column-start',\n },\n gridColumnEnd: {\n type: 'string',\n className: 'grid-column-end',\n variable: '--grid-column-end',\n },\n gridRow: {\n type: 'string',\n className: 'grid-row',\n variable: '--grid-row',\n },\n gridRowStart: {\n type: 'string',\n className: 'grid-row-start',\n variable: '--grid-row-start',\n },\n gridRowEnd: {\n type: 'string',\n className: 'grid-row-end',\n variable: '--grid-row-end',\n },\n}\n","import {type PropDef} from '../types/PropDef'\nimport {type Responsive} from '../types/Responsive'\n\nexport type HeightProps = {\n /** CSS **height** property */\n height?: Responsive<string>\n /** CSS **min-height** property */\n minHeight?: Responsive<string>\n /** CSS **max-height** property */\n maxHeight?: Responsive<string>\n}\n\nexport const heightProps: Record<string, PropDef> = {\n height: {\n type: 'string',\n className: 'height',\n variable: '--height',\n },\n minHeight: {\n type: 'string',\n className: 'min-height',\n variable: '--min-height',\n },\n maxHeight: {\n type: 'string',\n className: 'max-height',\n variable: '--max-height',\n },\n}\n","export const SPACE = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] as const\nexport type Space = (typeof SPACE)[number]\n\nexport const SPACE_AUTO = [...SPACE, 'auto'] as const\nexport type SpaceAuto = (typeof SPACE_AUTO)[number]\n","import {type PropDef} from '../types/PropDef'\nimport {type Responsive} from '../types/Responsive'\nimport {SPACE_AUTO, type SpaceAuto} from '../types/Space'\n\nexport type MarginProps = {\n /** CSS **margin** property */\n margin?: Responsive<SpaceAuto>\n /** CSS **margin-left** and **margin-right** properties */\n marginX?: Responsive<SpaceAuto>\n /** CSS **margin-top** and **margin-bottom** properties */\n marginY?: Responsive<SpaceAuto>\n /** CSS **margin-top** property */\n marginTop?: Responsive<SpaceAuto>\n /** CSS **margin-right** property */\n marginRight?: Responsive<SpaceAuto>\n /** CSS **margin-bottom** property */\n marginBottom?: Responsive<SpaceAuto>\n /** CSS **margin-left** property */\n marginLeft?: Responsive<SpaceAuto>\n}\n\nexport const marginProps: Record<string, PropDef> = {\n margin: {\n type: 'union',\n className: 'm',\n values: SPACE_AUTO,\n },\n marginX: {\n type: 'union',\n className: 'mx',\n values: SPACE_AUTO,\n },\n marginY: {\n type: 'union',\n className: 'my',\n values: SPACE_AUTO,\n },\n marginTop: {\n type: 'union',\n className: 'mt',\n values: SPACE_AUTO,\n },\n marginRight: {\n type: 'union',\n className: 'mr',\n values: SPACE_AUTO,\n },\n marginBottom: {\n type: 'union',\n className: 'mb',\n values: SPACE_AUTO,\n },\n marginLeft: {\n type: 'union',\n className: 'ml',\n values: SPACE_AUTO,\n },\n}\n","export const OVERFLOW = ['visible', 'hidden', 'auto', 'scroll', 'clip'] as const\nexport type Overflow = (typeof OVERFLOW)[number]\n","import {OVERFLOW, type Overflow} from '../types/Overflow'\nimport {type PropDef} from '../types/PropDef'\nimport {type Responsive} from '../types/Responsive'\n\nexport type OverflowProps = {\n /** CSS **overflow** property */\n overflow?: Responsive<Overflow>\n /** CSS **overflow-x** property */\n overflowX?: Responsive<Overflow>\n /** CSS **overflow-y** property */\n overflowY?: Responsive<Overflow>\n}\n\nexport const overflowProps: Record<string, PropDef> = {\n overflow: {\n type: 'union',\n className: 'overflow',\n values: OVERFLOW,\n },\n overflowX: {\n type: 'union',\n className: 'overflow-x',\n values: OVERFLOW,\n },\n overflowY: {\n type: 'union',\n className: 'overflow-y',\n values: OVERFLOW,\n },\n}\n","import {type PropDef} from '../types/PropDef'\nimport {type Responsive} from '../types/Responsive'\nimport {SPACE, type Space} from '../types/Space'\n\nexport interface PaddingProps {\n /** CSS **padding** property */\n padding?: Responsive<Space>\n /** CSS **padding-left** and **padding-right** properties */\n paddingX?: Responsive<Space>\n /** CSS **padding-top** and **padding-bottom** properties */\n paddingY?: Responsive<Space>\n /** CSS **padding-top** property */\n paddingTop?: Responsive<Space>\n /** CSS **padding-right** property */\n paddingRight?: Responsive<Space>\n /** CSS **padding-bottom** property */\n paddingBottom?: Responsive<Space>\n /** CSS **padding-left** property */\n paddingLeft?: Responsive<Space>\n}\n\nexport const paddingProps: Record<string, PropDef> = {\n padding: {\n type: 'union',\n className: 'p',\n values: SPACE,\n },\n paddingX: {\n type: 'union',\n className: 'px',\n values: SPACE,\n },\n paddingY: {\n type: 'union',\n className: 'py',\n values: SPACE,\n },\n paddingTop: {\n type: 'union',\n className: 'pt',\n values: SPACE,\n },\n paddingRight: {\n type: 'union',\n className: 'pr',\n values: SPACE,\n },\n paddingBottom: {\n type: 'union',\n className: 'pb',\n values: SPACE,\n },\n paddingLeft: {\n type: 'union',\n className: 'pl',\n values: SPACE,\n },\n}\n","export const POSITION = ['absolute', 'fixed', 'relative', 'static', 'sticky'] as const\nexport type Position = (typeof POSITION)[number]\n","import {POSITION, type Position} from '../types/Position'\nimport {type PropDef} from '../types/PropDef'\nimport {type Responsive} from '../types/Responsive'\nimport {SPACE_AUTO, type SpaceAuto} from '../types/Space'\n\nexport type PositionProps = {\n /** CSS **position** property */\n position?: Responsive<Position>\n /** CSS **inset** property */\n inset?: Responsive<SpaceAuto>\n /** CSS **top** property */\n top?: Responsive<SpaceAuto>\n /** CSS **right** property */\n right?: Responsive<SpaceAuto>\n /** CSS **bottom** property */\n bottom?: Responsive<SpaceAuto>\n /** CSS **left** property */\n left?: Responsive<SpaceAuto>\n /** CSS **z-index** property */\n zIndex?: Responsive<number>\n}\n\nexport const positionProps: Record<string, PropDef> = {\n position: {\n type: 'union',\n className: 'position',\n values: POSITION,\n },\n inset: {\n type: 'union',\n className: 'inset',\n values: SPACE_AUTO,\n },\n top: {\n type: 'union',\n className: 'top',\n values: SPACE_AUTO,\n },\n right: {\n type: 'union',\n className: 'right',\n values: SPACE_AUTO,\n },\n bottom: {\n type: 'union',\n className: 'bottom',\n values: SPACE_AUTO,\n },\n left: {\n type: 'union',\n className: 'left',\n values: SPACE_AUTO,\n },\n zIndex: {\n type: 'number',\n className: 'z-index',\n variable: '--z-index',\n },\n}\n","export const TONE = ['neutral', 'primary', 'positive', 'suggest', 'caution', 'critical'] as const\nexport type Tone = (typeof TONE)[number]\n\nexport const TONE_LEVEL = ['muted', 'normal', 'strong']\nexport type ToneLevel = (typeof TONE_LEVEL)[number]\n","import {type PropDef} from '../types/PropDef'\nimport {TONE, type Tone, TONE_LEVEL, type ToneLevel} from '../types/Tone'\n\nexport type ToneProps = {\n /** CSS **background-color** property */\n tone?: Tone\n toneLevel?: ToneLevel\n}\n\nexport const toneProps: Record<string, PropDef> = {\n tone: {\n type: 'union',\n className: 'tone',\n values: TONE,\n },\n toneLevel: {\n type: 'union',\n className: 'tone-level',\n values: TONE_LEVEL,\n },\n}\n","import {type PropDef} from '../types/PropDef'\nimport {type Responsive} from '../types/Responsive'\n\nexport type WidthProps = {\n /** CSS **width** property */\n width?: Responsive<string>\n /** CSS **min-width** property */\n minWidth?: Responsive<string>\n /** CSS **max-width** property */\n maxWidth?: Responsive<string>\n}\n\nexport const widthProps: Record<string, PropDef> = {\n width: {\n type: 'string',\n className: 'width',\n variable: '--width',\n },\n minWidth: {\n type: 'string',\n className: 'min-width',\n variable: '--min-width',\n },\n maxWidth: {\n type: 'string',\n className: 'max-width',\n variable: '--max-width',\n },\n}\n","import {type PropDef} from '../types/PropDef'\nimport {type BorderProps, borderProps} from './border'\nimport {type FlexChildProps, flexChildProps} from './flexChild'\nimport {type GridChildProps, gridChildProps} from './gridChild'\nimport {type HeightProps, heightProps} from './height'\nimport {type MarginProps, marginProps} from './margin'\nimport {type OverflowProps, overflowProps} from './overflow'\nimport {type PaddingProps, paddingProps} from './padding'\nimport {type PositionProps, positionProps} from './position'\nimport {type ToneProps, toneProps} from './tone'\nimport {type WidthProps, widthProps} from './width'\n\nexport interface LayoutProps\n extends\n ToneProps,\n WidthProps,\n HeightProps,\n MarginProps,\n BorderProps,\n PaddingProps,\n PositionProps,\n OverflowProps,\n FlexChildProps,\n GridChildProps {}\n\nexport const layoutProps: Record<string, PropDef> = {\n ...toneProps,\n ...widthProps,\n ...heightProps,\n ...marginProps,\n ...borderProps,\n ...paddingProps,\n ...positionProps,\n ...overflowProps,\n ...flexChildProps,\n ...gridChildProps,\n}\n","export const DISPLAY_BLOCK = ['block', 'inline-block', 'none'] as const\nexport type DisplayBlock = (typeof DISPLAY_BLOCK)[number]\n\nexport const DISPLAY_FLEX = ['flex', 'inline-flex', 'none'] as const\nexport type DisplayFlex = (typeof DISPLAY_FLEX)[number]\n\nexport const DISPLAY_GRID = ['grid', 'inline-grid', 'none'] as const\nexport type DisplayGrid = (typeof DISPLAY_GRID)[number]\n","import classNames from 'classnames'\n\nimport {type PropDef} from '../types/PropDef'\n\nconst PREFIX = 'sui'\nconst BREAKPOINTS_LENGTH = 7\n\ninterface ComponentProps {\n className?: string\n style?: React.CSSProperties\n /* eslint-disable-next-line @typescript-eslint/no-explicit-any */\n [key: string]: any\n}\n\nexport function getProps<P extends ComponentProps, T extends Record<string, PropDef>>(\n componentProps?: P,\n propDefs?: T,\n): ComponentProps {\n const {allComponentProps, allPropDefs} = flattenCompositeProps(componentProps, propDefs)\n const restProps: ComponentProps = {}\n let className = componentProps?.className || ''\n let style = componentProps?.style || {}\n\n for (const key in allComponentProps) {\n const propDef = allPropDefs?.[key]\n const propValue = allComponentProps[key]\n\n if (!propDef || !('className' in propDef) || !propDef.className) {\n restProps[key] = propValue\n continue\n }\n\n if (Array.isArray(propValue)) {\n for (let i = 0, len = Math.min(propValue.length, BREAKPOINTS_LENGTH); i < len; i++) {\n className = classNames(className, getClassName(propValue[i], propDef, i))\n style = {...style, ...getStyle(propValue[i], propDef, i)}\n }\n } else {\n className = classNames(className, getClassName(propValue, propDef))\n style = {...style, ...getStyle(propValue, propDef)}\n }\n }\n\n return {...restProps, className, style}\n}\n\n/* eslint-disable-next-line @typescript-eslint/no-explicit-any */\nfunction getClassName(propValue: any, propDef: PropDef, bp?: number) {\n if (propDef.type === 'union' && propDef.values?.includes(propValue)) {\n /* Note: This may need updating depending on the final CSS classname formatting */\n return `${PREFIX}-${propDef.className}${typeof propValue === 'string' ? `-${propValue}` : propValue}${bp ? `-bp-${bp}` : ''}`\n }\n\n if (propDef.type === 'string' || propDef.type === 'number') {\n return `${PREFIX}-${propDef.className}${bp ? `-bp-${bp}` : ''}`\n }\n\n if (propDef.type === 'boolean') {\n return `${PREFIX}-${propValue ? propDef.className : propDef.inverse}${bp ? `-bp-${bp}` : ''}`\n }\n\n return ''\n}\n\n/* eslint-disable-next-line @typescript-eslint/no-explicit-any */\nfunction getStyle(propValue: any, propDef: PropDef, bp?: number) {\n if (propDef.type === 'string' || propDef.type === 'number') {\n return {\n [`${propDef.variable}${bp ? `-bp-${bp}` : ''}`]: propValue,\n }\n }\n\n return {}\n}\n\nexport function flattenCompositeProps<P extends ComponentProps, T extends Record<string, PropDef>>(\n componentProps?: P,\n propDefs?: T,\n) {\n const props = {\n allComponentProps: {} as ComponentProps,\n allPropDefs: {} as Record<string, PropDef>,\n }\n\n for (const key in componentProps) {\n if (propDefs?.[key] && propDefs?.[key].type === 'composite') {\n for (const compositeKey in propDefs?.[key].composition) {\n const compositeValue = getCompositeValue(componentProps[key], propDefs[key], compositeKey)\n\n props.allComponentProps[compositeKey] = compositeValue\n props.allPropDefs[compositeKey] = propDefs[key].composition[compositeKey]\n ?.propDef as PropDef\n }\n } else {\n props.allComponentProps[key] = componentProps[key]\n props.allPropDefs[key] = propDefs?.[key] as PropDef\n }\n }\n\n return props\n}\n\n/* eslint-disable-next-line @typescript-eslint/no-explicit-any */\nfunction getCompositeValue(propValue: any, propDef: PropDef, key: string) {\n if (!('composition' in propDef)) {\n return\n }\n\n const mapping = propDef.composition[key]?.['mapping']\n let compositeValue\n\n if (Array.isArray(propValue)) {\n compositeValue = []\n\n for (let i = 0, len = propValue.length; i < len; i++) {\n compositeValue[i] = mapping?.[propValue[i]]\n }\n } else {\n compositeValue = mapping?.[propValue]\n }\n\n return compositeValue\n}\n","import {layoutProps} from '../../props/layout'\nimport {DISPLAY_BLOCK} from '../../types/Display'\nimport {type PropDef} from '../../types/PropDef'\n\nexport const boxProps: Record<string, PropDef> = {\n as: {\n type: 'string',\n },\n display: {\n type: 'union',\n className: 'display',\n values: DISPLAY_BLOCK,\n },\n ...layoutProps,\n}\n","import classNames from 'classnames'\nimport React from 'react'\n\nimport {type LayoutProps} from '../../props/layout'\nimport {type DisplayBlock} from '../../types/Display'\nimport {type Responsive} from '../../types/Responsive'\nimport {getProps} from '../../utils/getProps'\nimport {boxProps} from './box.props'\n\n/** @public */\nexport interface BoxProps<T extends React.ElementType> extends LayoutProps {\n /** Element to render */\n as?: T\n /** CSS **display** property */\n display?: Responsive<DisplayBlock>\n}\n\n/** @public */\nexport function Box<T extends React.ElementType = 'div'>({\n display = 'block',\n ...props\n}: BoxProps<T> & Omit<React.ComponentPropsWithRef<T>, keyof BoxProps<T>>) {\n const {as, children, className, style, ...rest} = getProps({display, ...props}, boxProps)\n const Component = as || 'div'\n\n return (\n <Component className={classNames('sui-Box', className)} style={style} data-ui=\"Box\" {...rest}>\n {children}\n </Component>\n )\n}\n","import {borderProps} from '../../props/border'\nimport {type MarginProps, marginProps} from '../../props/margin'\nimport {paddingProps} from '../../props/padding'\nimport {toneProps} from '../../props/tone'\nimport {type Density} from '../../types/Density'\nimport {DISPLAY_BLOCK, type DisplayBlock} from '../../types/Display'\nimport {type PropDef} from '../../types/PropDef'\nimport {type Responsive} from '../../types/Responsive'\nimport type {Tone, ToneLevel} from '../../types/Tone'\n\n/** @public */\nexport interface CardProps<T extends React.ElementType> extends MarginProps {\n /** Element to render */\n as?: T\n /** CSS **display** property */\n display?: Responsive<DisplayBlock>\n /** Composite prop for setting padding and border radius */\n density?: Responsive<Density>\n tone?: Tone\n toneLevel?: ToneLevel\n}\n\nexport const cardProps: Record<string, PropDef> = {\n as: {\n type: 'string',\n },\n display: {\n type: 'union',\n className: 'display',\n values: DISPLAY_BLOCK,\n },\n density: {\n type: 'composite',\n composition: {\n padding: {\n propDef: paddingProps['padding'] as PropDef,\n mapping: {\n compact: 3,\n regular: 4,\n loose: 5,\n },\n },\n radius: {\n propDef: borderProps['radius'] as PropDef,\n mapping: {\n compact: 2,\n regular: 3,\n loose: 4,\n },\n },\n },\n },\n ...toneProps,\n ...marginProps,\n}\n","import classNames from 'classnames'\nimport React from 'react'\n\nimport {getProps} from '../../utils/getProps'\nimport {type CardProps, cardProps} from './card.props'\n\n/** @public */\nexport function Card<T extends React.ElementType = 'div'>({\n density = 'regular',\n tone = 'neutral',\n toneLevel = 'normal',\n ...props\n}: CardProps<T> & Omit<React.ComponentPropsWithRef<T>, keyof CardProps<T>>) {\n const {as, children, className, style, ...rest} = getProps(\n {density, tone, toneLevel, ...props},\n cardProps,\n )\n const Component = as || 'div'\n\n return (\n <Component className={classNames('sui-Card', className)} style={style} data-ui=\"Card\" {...rest}>\n {children}\n </Component>\n )\n}\n","import React from 'react'\n\n/** @public */\nexport function Divider() {\n return (\n <hr\n className=\"sui-Divider sui-border-bottom-none sui-border-left-none sui-border-right-none sui-border-top\"\n data-ui=\"Divider\"\n />\n )\n}\n","export const ALIGN_ITEMS = ['baseline', 'center', 'flex-end', 'flex-start', 'stretch'] as const\nexport type AlignItems = (typeof ALIGN_ITEMS)[number]\n\nexport const JUSTIFY_CONTENT = [\n 'flex-start',\n 'flex-end',\n 'center',\n 'space-between',\n 'space-around',\n 'space-evenly',\n] as const\nexport type JustifyContent = (typeof JUSTIFY_CONTENT)[number]\n\nexport const FLEX_DIRECTION = ['row', 'row-reverse', 'column', 'column-reverse'] as const\nexport type FlexDirection = (typeof FLEX_DIRECTION)[number]\n\nexport const FLEX_WRAP = ['wrap', 'wrap-reverse', 'nowrap'] as const\nexport type FlexWrap = (typeof FLEX_WRAP)[number]\n","import {\n ALIGN_ITEMS,\n type AlignItems,\n FLEX_DIRECTION,\n FLEX_WRAP,\n type FlexDirection,\n type FlexWrap,\n JUSTIFY_CONTENT,\n type JustifyContent,\n} from '../types/Flex'\nimport {type PropDef} from '../types/PropDef'\nimport {type Responsive} from '../types/Responsive'\n\nexport type FlexParentProps = {\n /** CSS **align-items** property */\n alignItems?: Responsive<AlignItems>\n /** CSS **justify-content** property */\n justifyContent?: Responsive<JustifyContent>\n /** CSS **flex-direction** property */\n flexDirection?: Responsive<FlexDirection>\n /** CSS **flex-wrap** property */\n flexWrap?: Responsive<FlexWrap>\n}\n\nexport const flexParentProps: Record<string, PropDef> = {\n alignItems: {\n type: 'union',\n className: 'align-items',\n values: ALIGN_ITEMS,\n },\n justifyContent: {\n type: 'union',\n className: 'justify-content',\n values: JUSTIFY_CONTENT,\n },\n flexDirection: {\n type: 'union',\n className: 'flex-direction',\n values: FLEX_DIRECTION,\n },\n flexWrap: {\n type: 'union',\n className: 'flex-wrap',\n values: FLEX_WRAP,\n },\n}\n","import {type PropDef} from '../types/PropDef'\nimport {type Responsive} from '../types/Responsive'\nimport {SPACE, type Space} from '../types/Space'\n\nexport type GapProps = {\n /** CSS **gap** property */\n gap?: Responsive<Space>\n /** CSS **row-gap** property */\n rowGap?: Responsive<Space>\n /** CSS **column-gap** property */\n columnGap?: Responsive<Space>\n}\n\nexport const gapProps: Record<string, PropDef> = {\n gap: {\n type: 'union',\n className: 'gap',\n values: SPACE,\n },\n rowGap: {\n type: 'union',\n className: 'row-gap',\n values: SPACE,\n },\n columnGap: {\n type: 'union',\n className: 'column-gap',\n values: SPACE,\n },\n}\n","import {flexParentProps} from '../../props/flexParent'\nimport {gapProps} from '../../props/gap'\nimport {layoutProps} from '../../props/layout'\nimport {DISPLAY_FLEX} from '../../types/Display'\nimport {type PropDef} from '../../types/PropDef'\n\nexport const flexProps: Record<string, PropDef> = {\n as: {\n type: 'string',\n },\n display: {\n type: 'union',\n className: 'display',\n values: DISPLAY_FLEX,\n },\n ...flexParentProps,\n ...gapProps,\n ...layoutProps,\n}\n","import classNames from 'classnames'\nimport React from 'react'\n\nimport type {FlexParentProps} from '../../props/flexParent'\nimport type {GapProps} from '../../props/gap'\nimport {type LayoutProps} from '../../props/layout'\nimport {type DisplayFlex} from '../../types/Display'\nimport {type Responsive} from '../../types/Responsive'\nimport {getProps} from '../../utils/getProps'\nimport {flexProps} from './flex.props'\n\n/** @public */\nexport interface FlexProps<T extends React.ElementType>\n extends FlexParentProps, GapProps, LayoutProps {\n /** Element to render */\n as?: T\n /** CSS **display** property */\n display?: Responsive<DisplayFlex>\n}\n\n/** @public */\nexport function Flex<T extends React.ElementType = 'div'>({\n display = 'flex',\n ...props\n}: FlexProps<T> & Omit<React.ComponentPropsWithRef<T>, keyof FlexProps<T>>) {\n const {as, children, className, style, ...rest} = getProps({display, ...props}, flexProps)\n const Component = as || 'div'\n\n return (\n <Component className={classNames('sui-Flex', className)} style={style} data-ui=\"Flex\" {...rest}>\n {children}\n </Component>\n )\n}\n","export const GRID_AUTO_FLOW = ['row', 'column', 'row dense', 'column dense', 'dense'] as const\nexport type GridAutoFlow = (typeof GRID_AUTO_FLOW)[number]\n","import {GRID_AUTO_FLOW, type GridAutoFlow} from '../types/Grid'\nimport {type PropDef} from '../types/PropDef'\nimport {type Responsive} from '../types/Responsive'\n\nexport type GridParentProps = {\n /** CSS **grid-auto-flow** property */\n gridAutoFlow?: Responsive<GridAutoFlow>\n /** CSS **grid-auto-columns** property */\n gridAutoColumns?: Responsive<string>\n /** CSS **grid-auto-row** property */\n gridAutoRows?: Responsive<string>\n /** CSS **grid-template-columns** property */\n gridTemplateColumns?: Responsive<string>\n /** CSS **grid-template-rows** property */\n gridTemplateRows?: Responsive<string>\n}\n\nexport const gridParentProps: Record<string, PropDef> = {\n gridAutoFlow: {\n type: 'union',\n className: 'grid-auto-flow',\n values: GRID_AUTO_FLOW,\n },\n gridAutoColumns: {\n type: 'string',\n className: 'grid-auto-columns',\n variable: '--grid-auto-columns',\n },\n gridAutoRows: {\n type: 'string',\n className: 'grid-auto-rows',\n variable: '--grid-auto-rows',\n },\n gridTemplateColumns: {\n type: 'string',\n className: 'grid-template-columns',\n variable: '--grid-template-columns',\n },\n gridTemplateRows: {\n type: 'string',\n className: 'grid-template-rows',\n variable: '--grid-template-rows',\n },\n}\n","import {gapProps} from '../../props/gap'\nimport {gridParentProps} from '../../props/gridParent'\nimport {layoutProps} from '../../props/layout'\nimport {DISPLAY_GRID} from '../../types/Display'\nimport {type PropDef} from '../../types/PropDef'\n\nexport const gridProps: Record<string, PropDef> = {\n as: {\n type: 'string',\n },\n display: {\n type: 'union',\n className: 'display',\n values: DISPLAY_GRID,\n },\n ...gridParentProps,\n ...gapProps,\n ...layoutProps,\n}\n","import classNames from 'classnames'\nimport React from 'react'\n\nimport {type GapProps} from '../../props/gap'\nimport {type GridParentProps} from '../../props/gridParent'\nimport {type LayoutProps} from '../../props/layout'\nimport {type DisplayGrid} from '../../types/Display'\nimport {type Responsive} from '../../types/Responsive'\nimport {getProps} from '../../utils/getProps'\nimport {gridProps} from './grid.props'\n\n/** @public */\nexport interface GridProps<T extends React.ElementType>\n extends GridParentProps, GapProps, LayoutProps {\n /** Element to render */\n as?: T\n /** CSS **display** property */\n display?: Responsive<DisplayGrid>\n}\n\n/** @public */\nexport function Grid<T extends React.ElementType = 'div'>({\n display = 'grid',\n ...props\n}: GridProps<T> & Omit<React.ComponentPropsWithRef<T>, keyof GridProps<T>>) {\n const {as, children, className, style, ...rest} = getProps({display, ...props}, gridProps)\n const Component = as || 'div'\n\n return (\n <Component className={classNames('sui-Grid', className)} style={style} data-ui=\"Grid\" {...rest}>\n {children}\n </Component>\n )\n}\n","export const FONT_WEIGHT = ['regular', 'medium', 'semibold', 'bold'] as const\nexport type FontWeight = (typeof FONT_WEIGHT)[number]\n","export const TEXT_ALIGN = ['left', 'center', 'right', 'justify'] as const\nexport type TextAlign = (typeof TEXT_ALIGN)[number]\n","import {FONT_WEIGHT, type FontWeight} from '../types/FontWeight'\nimport {type PropDef} from '../types/PropDef'\nimport {TEXT_ALIGN, type TextAlign} from '../types/TextAlign'\nimport {type MarginProps, marginProps} from './margin'\n\nexport interface TypographyProps extends MarginProps {\n /** CSS **text-align** property */\n align?: TextAlign\n /** CSS **-webkit-line-clamp** property */\n lineClamp?: number\n /** CSS **color** property */\n muted?: boolean\n /** CSS **text-box-trim** property */\n trim?: boolean\n /** CSS **font-weight** property */\n weight?: FontWeight\n}\n\nexport const typographyProps: Record<string, PropDef> = {\n align: {\n type: 'union',\n className: 'text',\n values: TEXT_ALIGN,\n },\n lineClamp: {\n type: 'number',\n className: 'line-clamp',\n variable: '--line-clamp',\n },\n muted: {\n type: 'boolean',\n className: 'text-muted',\n inverse: 'text-default',\n },\n trim: {\n type: 'boolean',\n className: 'text-trim',\n inverse: 'text-trim-none',\n },\n weight: {\n type: 'union',\n className: 'weight',\n values: FONT_WEIGHT,\n },\n ...marginProps,\n}\n","export const HEADING_TAG = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const\nexport type HeadingTag = (typeof HEADING_TAG)[number]\n\nexport const HEADING_SIZE = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] as const\nexport type HeadingSize = (typeof HEADING_SIZE)[number]\n","import {type TypographyProps, typographyProps} from '../../props/typography'\nimport {HEADING_SIZE, HEADING_TAG, type HeadingSize, type HeadingTag} from '../../types/Heading'\nimport {type PropDef} from '../../types/PropDef'\n\n/** @public */\nexport interface HeadingProps extends TypographyProps {\n /** Element to render */\n as?: HeadingTag\n /** CSS **font-size** property */\n size?: HeadingSize\n}\n\nexport const headingProps: Record<string, PropDef> = {\n as: {\n type: 'union',\n values: HEADING_TAG,\n },\n size: {\n type: 'union',\n className: 'text-heading',\n values: HEADING_SIZE,\n },\n ...typographyProps,\n}\n","import classNames from 'classnames'\nimport React from 'react'\n\nimport {getProps} from '../../utils/getProps'\nimport {type HeadingProps, headingProps} from './heading.props'\n\n/** @public */\nexport function Heading<T extends React.ElementType = 'h1'>({\n size = 2,\n weight = 'bold',\n ...props\n}: HeadingProps & Omit<React.ComponentPropsWithRef<T>, keyof HeadingProps>) {\n const {as, children, className, style, ...rest} = getProps({size, weight, ...props}, headingProps)\n const Component = as || 'h1'\n\n if (props.lineClamp && props.trim) {\n return (\n <Component\n className={classNames('sui-Heading', className?.replace('sui-line-clamp', ''))}\n style={style}\n data-ui=\"Heading\"\n {...rest}\n >\n <span className=\"sui-line-clamp\">{children}</span>\n </Component>\n )\n }\n\n return (\n <Component\n className={classNames('sui-Heading', className)}\n style={style}\n data-ui=\"Heading\"\n {...rest}\n >\n {children}\n </Component>\n )\n}\n","export const TEXT_SIZE = [0, 1, 2, 3, 4] as const\nexport type TextSize = (typeof TEXT_SIZE)[number]\n","import {typographyProps} from '../../props/typography'\nimport {type PropDef} from '../../types/PropDef'\nimport {TEXT_SIZE} from '../../types/Text'\n\nexport const textProps: Record<string, PropDef> = {\n as: {\n type: 'string',\n },\n size: {\n type: 'union',\n className: 'text-body',\n values: TEXT_SIZE,\n },\n ...typographyProps,\n}\n","import classNames from 'classnames'\nimport React from 'react'\n\nimport type {TypographyProps} from '../../props/typography'\nimport type {TextSize} from '../../types/Text'\nimport {getProps} from '../../utils/getProps'\nimport {textProps} from './text.props'\n\n/** @public */\nexport interface TextProps<T extends React.ElementType> extends TypographyProps {\n /** Element to render */\n as?: T\n /** CSS **font-size** property */\n size?: TextSize\n}\n\n/** @public */\nexport function Text<T extends React.ElementType = 'p'>({\n size = 2,\n ...props\n}: TextProps<T> & Omit<React.ComponentPropsWithRef<T>, keyof TextProps<T>>) {\n const {as, children, className, style, ...rest} = getProps({size, ...props}, textProps)\n const Component = as || 'p'\n\n if (props.lineClamp && props.trim) {\n return (\n <Component\n className={classNames('sui-Text', className?.replace('sui-line-clamp', ''))}\n style={style}\n data-ui=\"Text\"\n {...rest}\n >\n <span className=\"sui-line-clamp\">{children}</span>\n </Component>\n )\n }\n\n return (\n <Component className={classNames('sui-Text', className)} style={style} data-ui=\"Text\" {...rest}>\n {children}\n </Component>\n )\n}\n"],"names":[],"mappings":";;AAAO,MAAM,SAAS,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,MAAM,GCmBrC,cAAuC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