UNPKG

@yamada-ui/react

Version:

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

1 lines 1.41 kB
{"version":3,"file":"display.cjs","names":["visuallyHiddenAttributes"],"sources":["../../../../src/core/css/display.ts"],"sourcesContent":["import type { TransformOptions } from \"./utils\"\nimport { visuallyHiddenAttributes } from \"../../utils\"\n\nexport function display(value: any, { prev }: TransformOptions) {\n switch (value) {\n case \"center\":\n return {\n display: \"flex\",\n placeContent: prev?.placeContent ?? \"center\",\n placeItems: prev?.placeItems ?? \"center\",\n }\n case \"inline-center\":\n return {\n display: \"inline-flex\",\n placeContent: prev?.placeContent ?? \"center\",\n placeItems: prev?.placeItems ?? \"center\",\n }\n case \"absolute-center\":\n return {\n insetBlockStart: \"50%\",\n insetInlineStart: \"50%\",\n position: \"absolute\",\n translateX: \"-50%\",\n translateY: \"-50%\",\n }\n case \"hidden\":\n return visuallyHiddenAttributes.style\n default:\n return value\n }\n}\n"],"mappings":";;;AAGA,SAAgB,QAAQ,OAAY,EAAE,QAA0B;AAC9D,SAAQ,OAAR;EACE,KAAK,SACH,QAAO;GACL,SAAS;GACT,cAAc,MAAM,gBAAgB;GACpC,YAAY,MAAM,cAAc;GACjC;EACH,KAAK,gBACH,QAAO;GACL,SAAS;GACT,cAAc,MAAM,gBAAgB;GACpC,YAAY,MAAM,cAAc;GACjC;EACH,KAAK,kBACH,QAAO;GACL,iBAAiB;GACjB,kBAAkB;GAClB,UAAU;GACV,YAAY;GACZ,YAAY;GACb;EACH,KAAK,SACH,QAAOA,qCAAyB;EAClC,QACE,QAAO"}