@mage-ui/components 1.0.154 → 1.0.155

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,2 +1,2 @@
1
- import{CheckboxGroup as e}from"../checkbox-group/CheckboxGroup.mjs";import{cx as t}from"@mage-ui/styled-system/css";import{checkbox as n,checkboxBody as r,checkboxBodyError as i,checkboxDescription as a,checkboxError as o,checkboxIcon as s,checkboxInner as c,checkboxInput as l,checkboxLabel as u,checkboxLabelRequired as d,checkboxLabelWrapper as f,checkboxRoot as p}from"@mage-ui/styled-system/recipes";import{Checkbox as m}from"@mantine/core";import{Fragment as h,jsx as g,jsxs as _}from"react/jsx-runtime";import{visuallyHidden as v}from"@mage-ui/styled-system/patterns";const y=({classNames:e,label:y,hiddenLabel:b,error:x,required:S,...C})=>g(m,{classNames:{root:t(e?.checkbox??n(),e?.root??p()),input:t(e?.input??l(),`peer`),icon:e?.icon??s(),inner:e?.inner??c(),body:t(e?.body??r(),x&&(e?.bodyError??i())),labelWrapper:e?.labelWrapper??f(),label:t(e?.label??u(),b&&v()),description:e?.description??a(),error:e?.error??o()},error:x,label:_(h,{children:[y,g(()=>S?_(`span`,{className:e?.labelRequired??d(),children:[` `,`*`]}):null,{})]}),...C});y.displayName=`Checkbox`,y.Group=e;export{y as Checkbox};
1
+ import{CheckboxGroup as e}from"../checkbox-group/CheckboxGroup.mjs";import{cx as t}from"@mage-ui/styled-system/css";import{checkbox as n,checkboxBody as r,checkboxBodyError as i,checkboxDescription as a,checkboxError as o,checkboxIcon as s,checkboxInner as c,checkboxInput as l,checkboxLabel as u,checkboxLabelRequired as d,checkboxLabelWrapper as f,checkboxRoot as p}from"@mage-ui/styled-system/recipes";import{Checkbox as m}from"@mantine/core";import{Fragment as h,jsx as g,jsxs as _}from"react/jsx-runtime";import{visuallyHidden as v}from"@mage-ui/styled-system/patterns";const y=({classNames:e,label:y,hiddenLabel:b,error:x,required:S,...C})=>g(m,{classNames:{root:t(e?.checkbox??n(),e?.root??p()),input:t(e?.input??l(),`peer`),icon:e?.icon??s(),inner:e?.inner??c(),body:t(e?.body??r(),x&&(e?.bodyError??i())),labelWrapper:e?.labelWrapper??f(),label:t(e?.label??u(),b&&v()),description:e?.description??a(),error:e?.error??o()},required:S,error:x,label:_(h,{children:[y,g(()=>S?_(`span`,{className:e?.labelRequired??d(),children:[` `,`*`]}):null,{})]}),...C});y.displayName=`Checkbox`,y.Group=e;export{y as Checkbox};
2
2
  //# sourceMappingURL=Checkbox.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.mjs","names":["Checkbox","MantineCheckbox"],"sources":["../../../../src/components/controls/checkbox/Checkbox.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport { visuallyHidden } from '@mage-ui/styled-system/patterns';\nimport {\n checkbox,\n checkboxBody,\n checkboxBodyError,\n checkboxDescription,\n checkboxError,\n checkboxIcon,\n checkboxInner,\n checkboxInput,\n checkboxLabel,\n checkboxLabelRequired,\n checkboxLabelWrapper,\n checkboxRoot,\n} from '@mage-ui/styled-system/recipes';\nimport { Checkbox as MantineCheckbox } from '@mantine/core';\n\nimport { CheckboxGroup } from '../checkbox-group/CheckboxGroup';\n\nexport type CheckboxProps = Omit<\n ComponentProps<'input'>,\n 'size' | 'children'\n> & {\n indeterminate?: boolean;\n label?: ReactNode;\n description?: ReactNode;\n error?: string;\n classNames?: {\n checkbox?: string;\n root?: string;\n input?: string;\n icon?: string;\n inner?: string;\n body?: string;\n bodyError?: string;\n labelWrapper?: string;\n labelRequired?: string;\n label?: string;\n description?: string;\n error?: string;\n };\n hiddenLabel?: boolean;\n};\n\nexport const Checkbox = ({\n classNames,\n label,\n hiddenLabel,\n error,\n required,\n ...props\n}: CheckboxProps): ReactNode => {\n const RequiredAsterisk = () =>\n required ? (\n <span className={classNames?.labelRequired ?? checkboxLabelRequired()}>\n {' '}\n *\n </span>\n ) : null;\n\n return (\n <MantineCheckbox\n classNames={{\n root: cx(\n classNames?.checkbox ?? checkbox(),\n classNames?.root ?? checkboxRoot(),\n ),\n input: cx(classNames?.input ?? checkboxInput(), 'peer'),\n icon: classNames?.icon ?? checkboxIcon(),\n inner: classNames?.inner ?? checkboxInner(),\n body: cx(\n classNames?.body ?? checkboxBody(),\n error && (classNames?.bodyError ?? checkboxBodyError()),\n ),\n labelWrapper: classNames?.labelWrapper ?? checkboxLabelWrapper(),\n label: cx(\n classNames?.label ?? checkboxLabel(),\n hiddenLabel && visuallyHidden(),\n ),\n description: classNames?.description ?? checkboxDescription(),\n error: classNames?.error ?? checkboxError(),\n }}\n error={error}\n label={\n <>\n {label}\n <RequiredAsterisk />\n </>\n }\n {...props}\n />\n );\n};\n\nCheckbox.displayName = 'Checkbox';\nCheckbox.Group = CheckboxGroup;\n"],"mappings":"+jBA+CA,MAAaA,GAAY,CACvB,aACA,QACA,cACA,QACA,WACA,GAAG,KAWD,EAACC,EAAD,CACE,WAAY,CACV,KAAM,EACJ,GAAY,UAAY,GAAU,CAClC,GAAY,MAAQ,GAAc,CACnC,CACD,MAAO,EAAG,GAAY,OAAS,GAAe,CAAE,OAAO,CACvD,KAAM,GAAY,MAAQ,GAAc,CACxC,MAAO,GAAY,OAAS,GAAe,CAC3C,KAAM,EACJ,GAAY,MAAQ,GAAc,CAClC,IAAU,GAAY,WAAa,GAAmB,EACvD,CACD,aAAc,GAAY,cAAgB,GAAsB,CAChE,MAAO,EACL,GAAY,OAAS,GAAe,CACpC,GAAe,GAAgB,CAChC,CACD,YAAa,GAAY,aAAe,GAAqB,CAC7D,MAAO,GAAY,OAAS,GAAe,CAC5C,CACM,QACP,MACE,EAAA,EAAA,CAAA,SAAA,CACG,EACD,MAjCN,EACE,EAAC,OAAD,CAAM,UAAW,GAAY,eAAiB,GAAuB,UAArE,CACG,IAAI,IAEA,GACL,KA4BE,EAAoB,CAAA,CACnB,CAAA,CAAA,CAEL,GAAI,EACJ,CAAA,CAIN,EAAS,YAAc,WACvB,EAAS,MAAQ"}
1
+ {"version":3,"file":"Checkbox.mjs","names":["Checkbox","MantineCheckbox"],"sources":["../../../../src/components/controls/checkbox/Checkbox.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport { visuallyHidden } from '@mage-ui/styled-system/patterns';\nimport {\n checkbox,\n checkboxBody,\n checkboxBodyError,\n checkboxDescription,\n checkboxError,\n checkboxIcon,\n checkboxInner,\n checkboxInput,\n checkboxLabel,\n checkboxLabelRequired,\n checkboxLabelWrapper,\n checkboxRoot,\n} from '@mage-ui/styled-system/recipes';\nimport { Checkbox as MantineCheckbox } from '@mantine/core';\n\nimport { CheckboxGroup } from '../checkbox-group/CheckboxGroup';\n\nexport type CheckboxProps = Omit<\n ComponentProps<'input'>,\n 'size' | 'children'\n> & {\n indeterminate?: boolean;\n label?: ReactNode;\n description?: ReactNode;\n error?: string;\n classNames?: {\n checkbox?: string;\n root?: string;\n input?: string;\n icon?: string;\n inner?: string;\n body?: string;\n bodyError?: string;\n labelWrapper?: string;\n labelRequired?: string;\n label?: string;\n description?: string;\n error?: string;\n };\n hiddenLabel?: boolean;\n};\n\nexport const Checkbox = ({\n classNames,\n label,\n hiddenLabel,\n error,\n required,\n ...props\n}: CheckboxProps): ReactNode => {\n const RequiredAsterisk = () =>\n required ? (\n <span className={classNames?.labelRequired ?? checkboxLabelRequired()}>\n {' '}\n *\n </span>\n ) : null;\n\n return (\n <MantineCheckbox\n classNames={{\n root: cx(\n classNames?.checkbox ?? checkbox(),\n classNames?.root ?? checkboxRoot(),\n ),\n input: cx(classNames?.input ?? checkboxInput(), 'peer'),\n icon: classNames?.icon ?? checkboxIcon(),\n inner: classNames?.inner ?? checkboxInner(),\n body: cx(\n classNames?.body ?? checkboxBody(),\n error && (classNames?.bodyError ?? checkboxBodyError()),\n ),\n labelWrapper: classNames?.labelWrapper ?? checkboxLabelWrapper(),\n label: cx(\n classNames?.label ?? checkboxLabel(),\n hiddenLabel && visuallyHidden(),\n ),\n description: classNames?.description ?? checkboxDescription(),\n error: classNames?.error ?? checkboxError(),\n }}\n required={required}\n error={error}\n label={\n <>\n {label}\n <RequiredAsterisk />\n </>\n }\n {...props}\n />\n );\n};\n\nCheckbox.displayName = 'Checkbox';\nCheckbox.Group = CheckboxGroup;\n"],"mappings":"+jBA+CA,MAAaA,GAAY,CACvB,aACA,QACA,cACA,QACA,WACA,GAAG,KAWD,EAACC,EAAD,CACE,WAAY,CACV,KAAM,EACJ,GAAY,UAAY,GAAU,CAClC,GAAY,MAAQ,GAAc,CACnC,CACD,MAAO,EAAG,GAAY,OAAS,GAAe,CAAE,OAAO,CACvD,KAAM,GAAY,MAAQ,GAAc,CACxC,MAAO,GAAY,OAAS,GAAe,CAC3C,KAAM,EACJ,GAAY,MAAQ,GAAc,CAClC,IAAU,GAAY,WAAa,GAAmB,EACvD,CACD,aAAc,GAAY,cAAgB,GAAsB,CAChE,MAAO,EACL,GAAY,OAAS,GAAe,CACpC,GAAe,GAAgB,CAChC,CACD,YAAa,GAAY,aAAe,GAAqB,CAC7D,MAAO,GAAY,OAAS,GAAe,CAC5C,CACS,WACH,QACP,MACE,EAAA,EAAA,CAAA,SAAA,CACG,EACD,MAlCN,EACE,EAAC,OAAD,CAAM,UAAW,GAAY,eAAiB,GAAuB,UAArE,CACG,IAAI,IAEA,GACL,KA6BE,EAAoB,CAAA,CACnB,CAAA,CAAA,CAEL,GAAI,EACJ,CAAA,CAIN,EAAS,YAAc,WACvB,EAAS,MAAQ"}
@@ -1,2 +1,2 @@
1
- import{cx as e}from"@mage-ui/styled-system/css";import{textInput as t,textInputDescription as n,textInputError as r,textInputInput as i,textInputLabel as a,textInputRequired as o,textInputRoot as s,textInputSection as c,textInputWrapper as l}from"@mage-ui/styled-system/recipes";import{TextInput as u}from"@mantine/core";import{jsx as d}from"react/jsx-runtime";const f=({classNames:f,required:p,startSlot:m,endSlot:h,...g})=>d(u,{leftSection:m,rightSection:h,withAsterisk:p,classNames:{root:e(f?.textInput??t(),f?.root??s(),`group`),label:f?.label??a(),required:f?.required??o(),description:f?.description??n(),error:f?.error??r(),wrapper:f?.wrapper??l(),input:e(f?.input??i(),`peer`),section:e(f?.section??c(),`group`)},...g});export{f as TextInput};
1
+ import{cx as e}from"@mage-ui/styled-system/css";import{textInput as t,textInputDescription as n,textInputError as r,textInputInput as i,textInputLabel as a,textInputRequired as o,textInputRoot as s,textInputSection as c,textInputWrapper as l}from"@mage-ui/styled-system/recipes";import{TextInput as u}from"@mantine/core";import{jsx as d}from"react/jsx-runtime";const f=({classNames:f,required:p,startSlot:m,endSlot:h,...g})=>d(u,{leftSection:m,rightSection:h,withAsterisk:p,required:p,classNames:{root:e(f?.textInput??t(),f?.root??s(),`group`),label:f?.label??a(),required:f?.required??o(),description:f?.description??n(),error:f?.error??r(),wrapper:f?.wrapper??l(),input:e(f?.input??i(),`peer`),section:e(f?.section??c(),`group`)},...g});export{f as TextInput};
2
2
  //# sourceMappingURL=TextInput.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextInput.mjs","names":["TextInput","MantineTextInput"],"sources":["../../../../src/components/controls/text-input/TextInput.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n textInput,\n textInputDescription,\n textInputError,\n textInputInput,\n textInputLabel,\n textInputRequired,\n textInputRoot,\n textInputSection,\n textInputWrapper,\n} from '@mage-ui/styled-system/recipes';\nimport { TextInput as MantineTextInput } from '@mantine/core';\n\nexport type TextInputProps = Omit<ComponentProps<'input'>, 'size'> & {\n label?: ReactNode;\n description?: ReactNode;\n error?: ReactNode;\n startSlot?: ReactNode;\n endSlot?: ReactNode;\n readOnly?: boolean;\n classNames?: {\n textInput?: string;\n root?: string;\n label?: string;\n description?: string;\n error?: string;\n wrapper?: string;\n input?: string;\n section?: string;\n required?: string;\n };\n};\n\nexport const TextInput = ({\n classNames,\n required,\n startSlot,\n endSlot,\n ...props\n}: TextInputProps) => {\n return (\n <MantineTextInput\n leftSection={startSlot}\n rightSection={endSlot}\n withAsterisk={required}\n classNames={{\n root: cx(\n classNames?.textInput ?? textInput(),\n classNames?.root ?? textInputRoot(),\n 'group',\n ),\n label: classNames?.label ?? textInputLabel(),\n required: classNames?.required ?? textInputRequired(),\n description: classNames?.description ?? textInputDescription(),\n error: classNames?.error ?? textInputError(),\n wrapper: classNames?.wrapper ?? textInputWrapper(),\n input: cx(classNames?.input ?? textInputInput(), 'peer'),\n section: cx(classNames?.section ?? textInputSection(), 'group'),\n }}\n {...props}\n />\n );\n};\n"],"mappings":"yWAoCA,MAAaA,GAAa,CACxB,aACA,WACA,YACA,UACA,GAAG,KAGD,EAACC,EAAD,CACE,YAAa,EACb,aAAc,EACd,aAAc,EACd,WAAY,CACV,KAAM,EACJ,GAAY,WAAa,GAAW,CACpC,GAAY,MAAQ,GAAe,CACnC,QACD,CACD,MAAO,GAAY,OAAS,GAAgB,CAC5C,SAAU,GAAY,UAAY,GAAmB,CACrD,YAAa,GAAY,aAAe,GAAsB,CAC9D,MAAO,GAAY,OAAS,GAAgB,CAC5C,QAAS,GAAY,SAAW,GAAkB,CAClD,MAAO,EAAG,GAAY,OAAS,GAAgB,CAAE,OAAO,CACxD,QAAS,EAAG,GAAY,SAAW,GAAkB,CAAE,QAAQ,CAChE,CACD,GAAI,EACJ,CAAA"}
1
+ {"version":3,"file":"TextInput.mjs","names":["TextInput","MantineTextInput"],"sources":["../../../../src/components/controls/text-input/TextInput.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n textInput,\n textInputDescription,\n textInputError,\n textInputInput,\n textInputLabel,\n textInputRequired,\n textInputRoot,\n textInputSection,\n textInputWrapper,\n} from '@mage-ui/styled-system/recipes';\nimport { TextInput as MantineTextInput } from '@mantine/core';\n\nexport type TextInputProps = Omit<ComponentProps<'input'>, 'size'> & {\n label?: ReactNode;\n description?: ReactNode;\n error?: ReactNode;\n startSlot?: ReactNode;\n endSlot?: ReactNode;\n readOnly?: boolean;\n classNames?: {\n textInput?: string;\n root?: string;\n label?: string;\n description?: string;\n error?: string;\n wrapper?: string;\n input?: string;\n section?: string;\n required?: string;\n };\n};\n\nexport const TextInput = ({\n classNames,\n required,\n startSlot,\n endSlot,\n ...props\n}: TextInputProps) => {\n return (\n <MantineTextInput\n leftSection={startSlot}\n rightSection={endSlot}\n withAsterisk={required}\n required={required}\n classNames={{\n root: cx(\n classNames?.textInput ?? textInput(),\n classNames?.root ?? textInputRoot(),\n 'group',\n ),\n label: classNames?.label ?? textInputLabel(),\n required: classNames?.required ?? textInputRequired(),\n description: classNames?.description ?? textInputDescription(),\n error: classNames?.error ?? textInputError(),\n wrapper: classNames?.wrapper ?? textInputWrapper(),\n input: cx(classNames?.input ?? textInputInput(), 'peer'),\n section: cx(classNames?.section ?? textInputSection(), 'group'),\n }}\n {...props}\n />\n );\n};\n"],"mappings":"yWAoCA,MAAaA,GAAa,CACxB,aACA,WACA,YACA,UACA,GAAG,KAGD,EAACC,EAAD,CACE,YAAa,EACb,aAAc,EACd,aAAc,EACJ,WACV,WAAY,CACV,KAAM,EACJ,GAAY,WAAa,GAAW,CACpC,GAAY,MAAQ,GAAe,CACnC,QACD,CACD,MAAO,GAAY,OAAS,GAAgB,CAC5C,SAAU,GAAY,UAAY,GAAmB,CACrD,YAAa,GAAY,aAAe,GAAsB,CAC9D,MAAO,GAAY,OAAS,GAAgB,CAC5C,QAAS,GAAY,SAAW,GAAkB,CAClD,MAAO,EAAG,GAAY,OAAS,GAAgB,CAAE,OAAO,CACxD,QAAS,EAAG,GAAY,SAAW,GAAkB,CAAE,QAAQ,CAChE,CACD,GAAI,EACJ,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mage-ui/components",
3
- "version": "1.0.154",
3
+ "version": "1.0.155",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [],
@@ -25,7 +25,7 @@
25
25
  "rimraf": "^6.1.3",
26
26
  "tsdown": "^0.21.4",
27
27
  "typescript": "^5.9.3",
28
- "@mage-ui/preset": "1.0.154",
28
+ "@mage-ui/preset": "1.0.155",
29
29
  "@mage-ui/styled-system": "1.0.8"
30
30
  },
31
31
  "peerDependencies": {