UNPKG

@yamada-ui/react

Version:

React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion

1 lines 2.45 kB
{"version":3,"file":"field.style.cjs","names":["defineComponentSlotStyle"],"sources":["../../../../src/components/field/field.style.ts"],"sourcesContent":["import { defineComponentSlotStyle } from \"../../core\"\n\nexport const fieldStyle = defineComponentSlotStyle({\n base: {\n errorMessage: {\n alignItems: \"center\",\n color: \"fg.error\",\n display: \"inline-flex\",\n fontSize: \"xs\",\n gap: \"1\",\n },\n helperMessage: {\n alignItems: \"center\",\n color: \"fg.muted\",\n display: \"inline-flex\",\n fontSize: \"xs\",\n gap: \"1\",\n },\n label: {\n alignItems: \"center\",\n display: \"inline-flex\",\n fontSize: \"sm\",\n fontWeight: \"medium\",\n gap: \"1\",\n _readOnly: { pointerEvents: \"none\" },\n _disabled: { layerStyle: \"disabled\" },\n },\n requiredIndicator: {\n color: \"fg.error\",\n },\n root: {\n display: \"grid\",\n gap: \"1.5\",\n position: \"relative\",\n w: \"100%\",\n },\n },\n\n props: {\n /**\n * The orientation of the field.\n */\n orientation: {\n horizontal: {\n errorMessage: { gridColumn: \"2 / 3\" },\n helperMessage: { gridColumn: \"2 / 3\" },\n label: { gridColumn: \"1 / 2\" },\n root: { gridTemplateColumns: \"{field-label-width, spaces.32} 1fr\" },\n },\n vertical: {\n errorMessage: { gridColumn: \"initial\" },\n helperMessage: { gridColumn: \"initial\" },\n label: { gridColumn: \"initial\" },\n root: { gridTemplateColumns: \"initial\" },\n },\n },\n },\n\n defaultProps: {\n orientation: \"vertical\",\n },\n})\n\nexport type FieldStyle = typeof fieldStyle\n"],"mappings":";;;AAEA,MAAa,aAAaA,wCAAyB;CACjD,MAAM;EACJ,cAAc;GACZ,YAAY;GACZ,OAAO;GACP,SAAS;GACT,UAAU;GACV,KAAK;GACN;EACD,eAAe;GACb,YAAY;GACZ,OAAO;GACP,SAAS;GACT,UAAU;GACV,KAAK;GACN;EACD,OAAO;GACL,YAAY;GACZ,SAAS;GACT,UAAU;GACV,YAAY;GACZ,KAAK;GACL,WAAW,EAAE,eAAe,QAAQ;GACpC,WAAW,EAAE,YAAY,YAAY;GACtC;EACD,mBAAmB,EACjB,OAAO,YACR;EACD,MAAM;GACJ,SAAS;GACT,KAAK;GACL,UAAU;GACV,GAAG;GACJ;EACF;CAED,OAAO,EAIL,aAAa;EACX,YAAY;GACV,cAAc,EAAE,YAAY,SAAS;GACrC,eAAe,EAAE,YAAY,SAAS;GACtC,OAAO,EAAE,YAAY,SAAS;GAC9B,MAAM,EAAE,qBAAqB,sCAAsC;GACpE;EACD,UAAU;GACR,cAAc,EAAE,YAAY,WAAW;GACvC,eAAe,EAAE,YAAY,WAAW;GACxC,OAAO,EAAE,YAAY,WAAW;GAChC,MAAM,EAAE,qBAAqB,WAAW;GACzC;EACF,EACF;CAED,cAAc,EACZ,aAAa,YACd;CACF,CAAC"}