@mage-ui/components 1.0.80 → 1.0.81
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.
- package/dist/components/controls/checkbox-group/CheckboxGroup.mjs.map +1 -1
- package/dist/components/controls/dropdown/DropdownTargetTextInput.d.mts +1 -0
- package/dist/components/controls/dropdown/DropdownTargetTextInput.d.mts.map +1 -1
- package/dist/components/controls/dropdown/DropdownTargetTextInput.mjs +1 -1
- package/dist/components/controls/dropdown/DropdownTargetTextInput.mjs.map +1 -1
- package/dist/components/controls/dropdown/select/Select.mjs +1 -1
- package/dist/components/controls/dropdown/select/Select.mjs.map +1 -1
- package/dist/components/controls/index.d.mts +1 -0
- package/dist/components/controls/switch/Switch.d.mts +17 -0
- package/dist/components/controls/switch/Switch.d.mts.map +1 -1
- package/dist/components/controls/switch/Switch.mjs +1 -1
- package/dist/components/controls/switch/Switch.mjs.map +1 -1
- package/dist/components/controls/switch-group/SwitchGroup.d.mts +41 -0
- package/dist/components/controls/switch-group/SwitchGroup.d.mts.map +1 -0
- package/dist/components/controls/switch-group/SwitchGroup.mjs +2 -0
- package/dist/components/controls/switch-group/SwitchGroup.mjs.map +1 -0
- package/dist/components/data-display/datatables/DataTableColumns.mjs +1 -1
- package/dist/components/data-display/datatables/DataTableColumns.mjs.map +1 -1
- package/dist/components/index.d.mts +2 -1
- package/dist/components/layouts/card/Card.d.mts +50 -6
- package/dist/components/layouts/card/Card.d.mts.map +1 -1
- package/dist/components/layouts/card/Card.mjs +1 -1
- package/dist/components/layouts/card/Card.mjs.map +1 -1
- package/dist/components/layouts/index.d.mts +1 -1
- package/dist/index.d.mts +3 -2
- package/dist/index.mjs +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxGroup.mjs","names":["CheckboxMantine"],"sources":["../../../../src/components/controls/checkbox-group/CheckboxGroup.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n checkboxGroup,\n checkboxGroupDescription,\n checkboxGroupError,\n checkboxGroupGroup,\n checkboxGroupLabel,\n checkboxGroupRequired,\n checkboxGroupRoot,\n} from '@mage-ui/styled-system/recipes';\nimport { Checkbox as CheckboxMantine } from '@mantine/core';\n\nexport type CheckboxGroupProps = {\n label?: ReactNode;\n error?: ReactNode;\n description?: ReactNode;\n children?: ReactNode;\n value?: string[];\n onChange?: (value: string[]) => void;\n withAsterisk?: boolean;\n required?: boolean;\n disabled?: boolean;\n classNames?: {\n checkboxGroup?: string;\n root?: string;\n label?: string;\n required?: string;\n description?: string;\n error?: string;\n list?: string;\n };\n};\n\nexport const CheckboxGroup = ({\n label,\n error,\n description,\n children,\n value,\n onChange,\n withAsterisk,\n required,\n disabled,\n classNames,\n}: CheckboxGroupProps): ReactNode => {\n return (\n <CheckboxMantine.Group\n classNames={{\n root: cx(\n classNames?.checkboxGroup ?? checkboxGroup(),\n classNames?.root ?? checkboxGroupRoot(),\n ),\n label: classNames?.label ?? checkboxGroupLabel(),\n required: classNames?.required ?? checkboxGroupRequired(),\n description: classNames?.description ?? checkboxGroupDescription(),\n error: classNames?.error ?? checkboxGroupError(),\n }}\n label={label}\n description={description}\n error={error}\n value={value}\n onChange={onChange}\n disabled={disabled}\n required={required}\n withAsterisk={withAsterisk}\n
|
|
1
|
+
{"version":3,"file":"CheckboxGroup.mjs","names":["CheckboxMantine"],"sources":["../../../../src/components/controls/checkbox-group/CheckboxGroup.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n checkboxGroup,\n checkboxGroupDescription,\n checkboxGroupError,\n checkboxGroupGroup,\n checkboxGroupLabel,\n checkboxGroupRequired,\n checkboxGroupRoot,\n} from '@mage-ui/styled-system/recipes';\nimport { Checkbox as CheckboxMantine } from '@mantine/core';\n\nexport type CheckboxGroupProps = {\n label?: ReactNode;\n error?: ReactNode;\n description?: ReactNode;\n children?: ReactNode;\n value?: string[];\n onChange?: (value: string[]) => void;\n withAsterisk?: boolean;\n required?: boolean;\n disabled?: boolean;\n classNames?: {\n checkboxGroup?: string;\n root?: string;\n label?: string;\n required?: string;\n description?: string;\n error?: string;\n list?: string;\n };\n};\n\nexport const CheckboxGroup = ({\n label,\n error,\n description,\n children,\n value,\n onChange,\n withAsterisk,\n required,\n disabled,\n classNames,\n}: CheckboxGroupProps): ReactNode => {\n return (\n <CheckboxMantine.Group\n classNames={{\n root: cx(\n classNames?.checkboxGroup ?? checkboxGroup(),\n classNames?.root ?? checkboxGroupRoot(),\n ),\n label: classNames?.label ?? checkboxGroupLabel(),\n required: classNames?.required ?? checkboxGroupRequired(),\n description: classNames?.description ?? checkboxGroupDescription(),\n error: classNames?.error ?? checkboxGroupError(),\n }}\n label={label}\n description={description}\n error={error}\n value={value}\n onChange={onChange}\n disabled={disabled}\n required={required}\n withAsterisk={withAsterisk}\n >\n <div className={classNames?.list ?? checkboxGroupGroup()}>{children}</div>\n </CheckboxMantine.Group>\n );\n};\n\nCheckboxGroup.displayName = 'Checkbox.Group';\n"],"mappings":"wVAmCA,MAAa,GAAiB,CAC5B,QACA,QACA,cACA,WACA,QACA,WACA,eACA,WACA,WACA,gBAGE,EAACA,EAAgB,MAAA,CACf,WAAY,CACV,KAAM,EACJ,GAAY,eAAiB,GAAe,CAC5C,GAAY,MAAQ,GAAmB,CACxC,CACD,MAAO,GAAY,OAAS,GAAoB,CAChD,SAAU,GAAY,UAAY,GAAuB,CACzD,YAAa,GAAY,aAAe,GAA0B,CAClE,MAAO,GAAY,OAAS,GAAoB,CACjD,CACM,QACM,cACN,QACA,QACG,WACA,WACA,WACI,wBAEd,EAAC,MAAA,CAAI,UAAW,GAAY,MAAQ,GAAoB,CAAG,YAAe,EACpD,CAI5B,EAAc,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownTargetTextInput.d.mts","names":[],"sources":["../../../../src/components/controls/dropdown/DropdownTargetTextInput.tsx"],"mappings":";;;;;;;KAoBY,4BAAA,GAA+B,IAAA,CACzC,cAAA;EAGA,UAAA,GAAa,IAAA,CAAK,WAAA,CAAY,cAAA;IAC5B,iBAAA;EAAA;EAEF,gBAAA,GAAmB,wBAAA;EACnB,YAAA,GAAe,oBAAA;EAEf,WAAA;EACA,SAAA;EACA,WAAA;EACA,SAAA,GAAY,SAAA;AAAA"}
|
|
1
|
+
{"version":3,"file":"DropdownTargetTextInput.d.mts","names":[],"sources":["../../../../src/components/controls/dropdown/DropdownTargetTextInput.tsx"],"mappings":";;;;;;;KAoBY,4BAAA,GAA+B,IAAA,CACzC,cAAA;EAGA,UAAA,GAAa,IAAA,CAAK,WAAA,CAAY,cAAA;IAC5B,iBAAA;EAAA;EAEF,gBAAA,GAAmB,wBAAA;EACnB,YAAA,GAAe,oBAAA;EAEf,WAAA;EACA,SAAA;EACA,WAAA;EACA,SAAA,GAAY,SAAA;EACZ,YAAA;AAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useDropdownContext as e}from"./DropdownContextProvider.mjs";import{TextInput as t}from"../text-input/TextInput.mjs";import{DropdownEndSlot as n}from"./DropdownEndSlot.mjs";import{dropdownTextInput as r,dropdownTextInputDescription as i,dropdownTextInputError as a,dropdownTextInputInput as o,dropdownTextInputLabel as s,dropdownTextInputRequired as c,dropdownTextInputRoot as l,dropdownTextInputSection as u,dropdownTextInputWrapper as d}from"@mage-ui/styled-system/recipes";import{jsx as f}from"react/jsx-runtime";const p=({classNames:p,clearable:m,showChevron:h,clearButtonProps:g,chevronProps:_,closeOnBlur:v=!0,startSlot:y,...
|
|
1
|
+
import{useDropdownContext as e}from"./DropdownContextProvider.mjs";import{TextInput as t}from"../text-input/TextInput.mjs";import{DropdownEndSlot as n}from"./DropdownEndSlot.mjs";import{dropdownTextInput as r,dropdownTextInputDescription as i,dropdownTextInputError as a,dropdownTextInputInput as o,dropdownTextInputLabel as s,dropdownTextInputRequired as c,dropdownTextInputRoot as l,dropdownTextInputSection as u,dropdownTextInputWrapper as d}from"@mage-ui/styled-system/recipes";import{jsx as f}from"react/jsx-runtime";const p=({classNames:p,clearable:m,showChevron:h,clearButtonProps:g,chevronProps:_,closeOnBlur:v=!0,startSlot:y,displayQuery:b=!0,...x})=>{let{store:S,value:C,query:w,setQuery:T}=e(),E=b?w??C?.value??``:C?.value??``,D=m&&E!==``,O={"--dropdown-text-input-right-section-pointer-events":D?`auto`:`none`};return f(t,{readOnly:!1,value:E,startSlot:y,endSlot:f(n,{clearable:D,showChevron:h,clearButtonProps:g,chevronProps:_}),onFocus:e=>{e.stopPropagation(),e.preventDefault(),S.openDropdown()},onBlur:e=>{e.stopPropagation(),e.preventDefault(),v&&(S.closeDropdown(),T(void 0))},classNames:{textInput:p?.dropdownTextInput??r(),root:p?.root??l(),label:p?.label??s(),description:p?.description??i(),error:p?.error??a(),wrapper:p?.wrapper??d(),input:p?.input??o(),section:p?.section??u(),required:p?.required??c()},style:O,...x})};export{p as DropdownTargetTextInput};
|
|
2
2
|
//# sourceMappingURL=DropdownTargetTextInput.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownTargetTextInput.mjs","names":[],"sources":["../../../../src/components/controls/dropdown/DropdownTargetTextInput.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport {\n dropdownTextInput,\n dropdownTextInputDescription,\n dropdownTextInputError,\n dropdownTextInputInput,\n dropdownTextInputLabel,\n dropdownTextInputRequired,\n dropdownTextInputRoot,\n dropdownTextInputSection,\n dropdownTextInputWrapper,\n} from '@mage-ui/styled-system/recipes';\n\nimport { TextInput, type TextInputProps } from '../text-input/TextInput';\nimport type { DropdownChevronProps } from './DropdownChevron';\nimport type { DropdownClearButtonProps } from './DropdownClearButton';\nimport { useDropdownContext } from './DropdownContextProvider';\nimport { DropdownEndSlot } from './DropdownEndSlot';\n\nexport type DropdownTargetTextInputProps = Omit<\n TextInputProps,\n 'classNames'\n> & {\n classNames?: Omit<NonNullable<TextInputProps['classNames']>, 'textInput'> & {\n dropdownTextInput?: string;\n };\n clearButtonProps?: DropdownClearButtonProps;\n chevronProps?: DropdownChevronProps;\n\n showChevron?: boolean;\n clearable?: boolean;\n closeOnBlur?: boolean;\n startSlot?: ReactNode;\n};\n\nexport const DropdownTargetTextInput = ({\n classNames,\n clearable,\n showChevron,\n clearButtonProps,\n chevronProps,\n closeOnBlur = true,\n startSlot,\n ...props\n}: DropdownTargetTextInputProps) => {\n const { store, value, query, setQuery } = useDropdownContext();\n const
|
|
1
|
+
{"version":3,"file":"DropdownTargetTextInput.mjs","names":[],"sources":["../../../../src/components/controls/dropdown/DropdownTargetTextInput.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport {\n dropdownTextInput,\n dropdownTextInputDescription,\n dropdownTextInputError,\n dropdownTextInputInput,\n dropdownTextInputLabel,\n dropdownTextInputRequired,\n dropdownTextInputRoot,\n dropdownTextInputSection,\n dropdownTextInputWrapper,\n} from '@mage-ui/styled-system/recipes';\n\nimport { TextInput, type TextInputProps } from '../text-input/TextInput';\nimport type { DropdownChevronProps } from './DropdownChevron';\nimport type { DropdownClearButtonProps } from './DropdownClearButton';\nimport { useDropdownContext } from './DropdownContextProvider';\nimport { DropdownEndSlot } from './DropdownEndSlot';\n\nexport type DropdownTargetTextInputProps = Omit<\n TextInputProps,\n 'classNames'\n> & {\n classNames?: Omit<NonNullable<TextInputProps['classNames']>, 'textInput'> & {\n dropdownTextInput?: string;\n };\n clearButtonProps?: DropdownClearButtonProps;\n chevronProps?: DropdownChevronProps;\n\n showChevron?: boolean;\n clearable?: boolean;\n closeOnBlur?: boolean;\n startSlot?: ReactNode;\n displayQuery?: boolean;\n};\n\nexport const DropdownTargetTextInput = ({\n classNames,\n clearable,\n showChevron,\n clearButtonProps,\n chevronProps,\n closeOnBlur = true,\n startSlot,\n displayQuery = true,\n ...props\n}: DropdownTargetTextInputProps) => {\n const { store, value, query, setQuery } = useDropdownContext();\n const displayedValue = displayQuery\n ? (query ?? value?.value ?? '')\n : (value?.value ?? '');\n const isClearable = clearable && displayedValue !== '';\n\n const style = {\n '--dropdown-text-input-right-section-pointer-events': isClearable\n ? 'auto'\n : 'none',\n } as React.CSSProperties;\n\n return (\n <TextInput\n readOnly={false}\n value={displayedValue}\n startSlot={startSlot}\n endSlot={\n <DropdownEndSlot\n clearable={isClearable}\n showChevron={showChevron}\n clearButtonProps={clearButtonProps}\n chevronProps={chevronProps}\n />\n }\n onFocus={(e) => {\n e.stopPropagation();\n e.preventDefault();\n store.openDropdown();\n }}\n onBlur={(e) => {\n e.stopPropagation();\n e.preventDefault();\n if (closeOnBlur) {\n store.closeDropdown();\n setQuery(undefined);\n }\n }}\n classNames={{\n textInput: classNames?.dropdownTextInput ?? dropdownTextInput(),\n root: classNames?.root ?? dropdownTextInputRoot(),\n label: classNames?.label ?? dropdownTextInputLabel(),\n description: classNames?.description ?? dropdownTextInputDescription(),\n error: classNames?.error ?? dropdownTextInputError(),\n wrapper: classNames?.wrapper ?? dropdownTextInputWrapper(),\n input: classNames?.input ?? dropdownTextInputInput(),\n section: classNames?.section ?? dropdownTextInputSection(),\n required: classNames?.required ?? dropdownTextInputRequired(),\n }}\n style={style}\n {...props}\n />\n );\n};\n"],"mappings":"0gBAqCA,MAAa,GAA2B,CACtC,aACA,YACA,cACA,mBACA,eACA,cAAc,GACd,YACA,eAAe,GACf,GAAG,KAC+B,CAClC,GAAM,CAAE,QAAO,QAAO,QAAO,YAAa,GAAoB,CACxD,EAAiB,EAClB,GAAS,GAAO,OAAS,GACzB,GAAO,OAAS,GACf,EAAc,GAAa,IAAmB,GAE9C,EAAQ,CACZ,qDAAsD,EAClD,OACA,OACL,CAED,OACE,EAAC,EAAA,CACC,SAAU,GACV,MAAO,EACI,YACX,QACE,EAAC,EAAA,CACC,UAAW,EACE,cACK,mBACJ,gBACd,CAEJ,QAAU,GAAM,CACd,EAAE,iBAAiB,CACnB,EAAE,gBAAgB,CAClB,EAAM,cAAc,EAEtB,OAAS,GAAM,CACb,EAAE,iBAAiB,CACnB,EAAE,gBAAgB,CACd,IACF,EAAM,eAAe,CACrB,EAAS,IAAA,GAAU,GAGvB,WAAY,CACV,UAAW,GAAY,mBAAqB,GAAmB,CAC/D,KAAM,GAAY,MAAQ,GAAuB,CACjD,MAAO,GAAY,OAAS,GAAwB,CACpD,YAAa,GAAY,aAAe,GAA8B,CACtE,MAAO,GAAY,OAAS,GAAwB,CACpD,QAAS,GAAY,SAAW,GAA0B,CAC1D,MAAO,GAAY,OAAS,GAAwB,CACpD,QAAS,GAAY,SAAW,GAA0B,CAC1D,SAAU,GAAY,UAAY,GAA2B,CAC9D,CACM,QACP,GAAI,GACJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Dropdown as e}from"../Dropdown.mjs";import{ComboboxOptions as t}from"../combobox/ComboboxOptions.mjs";import{ComboboxTarget as n}from"../combobox/ComboboxTarget.mjs";import{SelectSearch as r}from"./SelectSearch.mjs";import{select as i,selectChevron as a,selectChevronIcon as o,selectChevronIconRoot as s,selectChevronRoot as c,selectClearButton as l,selectClearButtonIcon as u,selectClearButtonIconRaw as d,selectClearButtonIconRawRoot as f,selectClearButtonRoot as p,selectEmpty as m,selectOption as h,selectOptions as g,selectRoot as _,selectScrollAreaAutosize as v,selectSearchInput as y,selectSearchSection as b,selectSearchWrapper as x,selectTextInput as S,selectTextInputDescription as C,selectTextInputError as w,selectTextInputInput as T,selectTextInputLabel as E,selectTextInputRequired as D,selectTextInputRoot as O,selectTextInputSection as k,selectTextInputWrapper as A}from"@mage-ui/styled-system/recipes";import{jsx as j}from"react/jsx-runtime";const M=({label:M,placeholder:N,clearable:P=!0,clearButtonText:F,emptyText:I,searchable:L,searchPlaceholder:R,searchStartSlot:z,searchClassNames:B,startSlot:V,classNames:H,...U})=>{let{target:W,scrollArea:G,...K}=H||{},{clearButton:q,chevron:J,...Y}=W||{},X=I??(L?`No results`:void 0),Z={placeholder:N,label:M,clearable:P,readOnly:!0,closeOnBlur:!L,startSlot:V,classNames:{dropdownTextInput:Y?.dropdownTextInput??S(),root:Y?.root??O(),label:Y?.label??E(),description:Y?.description??C(),error:Y?.error??w(),wrapper:Y?.wrapper??A(),input:Y?.input??T(),section:Y?.section??k(),required:Y?.required??D()},clearButtonProps:{label:F,classNames:{clearButton:q?.clearButton??l(),root:q?.root??p(),icon:q?.icon??u(),iconRaw:{iconRaw:q?.iconRaw?.iconRaw??d(),root:q?.iconRaw?.root??f()}}},chevronProps:{classNames:{chevron:J?.chevron??a(),root:J?.root??c(),open:{iconRaw:J?.open?.iconRaw??o(),root:J?.open?.root??s()},close:{iconRaw:J?.close?.iconRaw??o(),root:J?.close?.root??s()}}}};return j(e,{"data-searchable":L,classNames:{dropdown:K?.dropdown??i(),root:K?.root??_(),options:K?.options??g(),option:K?.option??h(),empty:K?.empty??m(),search:K?.search},scrollAreaProps:{classNames:{dropdownScrollAreaAutosize:G?.dropdownScrollAreaAutosize??v()}},target:j(n,{...Z}),dropdownTopSlot:L&&j(r,{searchPlaceholder:R,startSlot:z,classNames:{input:B?.input??y(),wrapper:B?.wrapper??x(),section:B?.section??b()}}),...U,children:j(t,{emptyProps:{emptyText:X,classNames:{empty:K?.empty??m()}},creatableProps:{creatable:!1}})})};export{M as Select};
|
|
1
|
+
import{Dropdown as e}from"../Dropdown.mjs";import{ComboboxOptions as t}from"../combobox/ComboboxOptions.mjs";import{ComboboxTarget as n}from"../combobox/ComboboxTarget.mjs";import{SelectSearch as r}from"./SelectSearch.mjs";import{select as i,selectChevron as a,selectChevronIcon as o,selectChevronIconRoot as s,selectChevronRoot as c,selectClearButton as l,selectClearButtonIcon as u,selectClearButtonIconRaw as d,selectClearButtonIconRawRoot as f,selectClearButtonRoot as p,selectEmpty as m,selectOption as h,selectOptions as g,selectRoot as _,selectScrollAreaAutosize as v,selectSearchInput as y,selectSearchSection as b,selectSearchWrapper as x,selectTextInput as S,selectTextInputDescription as C,selectTextInputError as w,selectTextInputInput as T,selectTextInputLabel as E,selectTextInputRequired as D,selectTextInputRoot as O,selectTextInputSection as k,selectTextInputWrapper as A}from"@mage-ui/styled-system/recipes";import{jsx as j}from"react/jsx-runtime";const M=({label:M,placeholder:N,clearable:P=!0,clearButtonText:F,emptyText:I,searchable:L,searchPlaceholder:R,searchStartSlot:z,searchClassNames:B,startSlot:V,classNames:H,...U})=>{let{target:W,scrollArea:G,...K}=H||{},{clearButton:q,chevron:J,...Y}=W||{},X=I??(L?`No results`:void 0),Z={placeholder:N,label:M,clearable:P,readOnly:!0,closeOnBlur:!L,startSlot:V,displayQuery:!1,classNames:{dropdownTextInput:Y?.dropdownTextInput??S(),root:Y?.root??O(),label:Y?.label??E(),description:Y?.description??C(),error:Y?.error??w(),wrapper:Y?.wrapper??A(),input:Y?.input??T(),section:Y?.section??k(),required:Y?.required??D()},clearButtonProps:{label:F,classNames:{clearButton:q?.clearButton??l(),root:q?.root??p(),icon:q?.icon??u(),iconRaw:{iconRaw:q?.iconRaw?.iconRaw??d(),root:q?.iconRaw?.root??f()}}},chevronProps:{classNames:{chevron:J?.chevron??a(),root:J?.root??c(),open:{iconRaw:J?.open?.iconRaw??o(),root:J?.open?.root??s()},close:{iconRaw:J?.close?.iconRaw??o(),root:J?.close?.root??s()}}}};return j(e,{"data-searchable":L,classNames:{dropdown:K?.dropdown??i(),root:K?.root??_(),options:K?.options??g(),option:K?.option??h(),empty:K?.empty??m(),search:K?.search},scrollAreaProps:{classNames:{dropdownScrollAreaAutosize:G?.dropdownScrollAreaAutosize??v()}},target:j(n,{...Z}),dropdownTopSlot:L&&j(r,{searchPlaceholder:R,startSlot:z,classNames:{input:B?.input??y(),wrapper:B?.wrapper??x(),section:B?.section??b()}}),...U,children:j(t,{emptyProps:{emptyText:X,classNames:{empty:K?.empty??m()}},creatableProps:{creatable:!1}})})};export{M as Select};
|
|
2
2
|
//# sourceMappingURL=Select.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.mjs","names":[],"sources":["../../../../../src/components/controls/dropdown/select/Select.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport {\n select,\n selectChevron,\n selectChevronIcon,\n selectChevronIconRoot,\n selectChevronRoot,\n selectClearButton,\n selectClearButtonIcon,\n selectClearButtonIconRaw,\n selectClearButtonIconRawRoot,\n selectClearButtonRoot,\n selectEmpty,\n selectOption,\n selectOptions,\n selectRoot,\n selectScrollAreaAutosize,\n selectSearchInput,\n selectSearchSection,\n selectSearchWrapper,\n selectTextInput,\n selectTextInputDescription,\n selectTextInputError,\n selectTextInputInput,\n selectTextInputLabel,\n selectTextInputRequired,\n selectTextInputRoot,\n selectTextInputSection,\n selectTextInputWrapper,\n} from '@mage-ui/styled-system/recipes';\n\nimport { ComboboxOptions } from '../combobox/ComboboxOptions';\nimport type { ComboboxTargetProps } from '../combobox/ComboboxTarget';\nimport { ComboboxTarget } from '../combobox/ComboboxTarget';\nimport { Dropdown, type DropdownProps } from '../Dropdown';\nimport { SelectSearch, type SelectSearchClassNames } from './SelectSearch';\n\nexport type SelectProps = Omit<\n DropdownProps,\n 'children' | 'classNames' | 'target'\n> & {\n label?: string;\n placeholder?: string;\n clearable?: boolean;\n clearButtonText?: string;\n emptyText?: string;\n searchable?: boolean;\n searchPlaceholder?: string;\n searchStartSlot?: ReactNode;\n searchClassNames?: SelectSearchClassNames;\n startSlot?: ReactNode;\n classNames?: DropdownProps['classNames'] & {\n target?: ComboboxTargetProps['classNames'] & {\n clearButton?: NonNullable<\n ComboboxTargetProps['clearButtonProps']\n >['classNames'];\n chevron?: NonNullable<ComboboxTargetProps['chevronProps']>['classNames'];\n };\n scrollArea?: NonNullable<DropdownProps['scrollAreaProps']>['classNames'];\n };\n};\n\nexport const Select = ({\n label,\n placeholder,\n clearable = true,\n clearButtonText,\n emptyText,\n searchable,\n searchPlaceholder,\n searchStartSlot,\n searchClassNames,\n startSlot,\n classNames,\n ...props\n}: SelectProps) => {\n const {\n target: targetClassNames,\n scrollArea: scrollAreaClassNames,\n ...dropdownClassNames\n } = classNames || {};\n\n const {\n clearButton: clearButtonClassNames,\n chevron: chevronClassNames,\n ...restTargetClassNames\n } = targetClassNames || {};\n const resolvedEmptyText =\n emptyText ?? (searchable ? 'No results' : undefined);\n\n const targetProps = {\n placeholder,\n label,\n clearable,\n readOnly: true,\n closeOnBlur: !searchable,\n startSlot,\n classNames: {\n dropdownTextInput:\n restTargetClassNames?.dropdownTextInput ?? selectTextInput(),\n root: restTargetClassNames?.root ?? selectTextInputRoot(),\n label: restTargetClassNames?.label ?? selectTextInputLabel(),\n description:\n restTargetClassNames?.description ?? selectTextInputDescription(),\n error: restTargetClassNames?.error ?? selectTextInputError(),\n wrapper: restTargetClassNames?.wrapper ?? selectTextInputWrapper(),\n input: restTargetClassNames?.input ?? selectTextInputInput(),\n section: restTargetClassNames?.section ?? selectTextInputSection(),\n required: restTargetClassNames?.required ?? selectTextInputRequired(),\n },\n clearButtonProps: {\n label: clearButtonText,\n classNames: {\n clearButton: clearButtonClassNames?.clearButton ?? selectClearButton(),\n root: clearButtonClassNames?.root ?? selectClearButtonRoot(),\n icon: clearButtonClassNames?.icon ?? selectClearButtonIcon(),\n iconRaw: {\n iconRaw:\n clearButtonClassNames?.iconRaw?.iconRaw ??\n selectClearButtonIconRaw(),\n root:\n clearButtonClassNames?.iconRaw?.root ??\n selectClearButtonIconRawRoot(),\n },\n },\n },\n chevronProps: {\n classNames: {\n chevron: chevronClassNames?.chevron ?? selectChevron(),\n root: chevronClassNames?.root ?? selectChevronRoot(),\n open: {\n iconRaw: chevronClassNames?.open?.iconRaw ?? selectChevronIcon(),\n root: chevronClassNames?.open?.root ?? selectChevronIconRoot(),\n },\n close: {\n iconRaw: chevronClassNames?.close?.iconRaw ?? selectChevronIcon(),\n root: chevronClassNames?.close?.root ?? selectChevronIconRoot(),\n },\n },\n },\n };\n\n return (\n <Dropdown\n data-searchable={searchable}\n classNames={{\n dropdown: dropdownClassNames?.dropdown ?? select(),\n root: dropdownClassNames?.root ?? selectRoot(),\n options: dropdownClassNames?.options ?? selectOptions(),\n option: dropdownClassNames?.option ?? selectOption(),\n empty: dropdownClassNames?.empty ?? selectEmpty(),\n search: dropdownClassNames?.search,\n }}\n scrollAreaProps={{\n classNames: {\n dropdownScrollAreaAutosize:\n scrollAreaClassNames?.dropdownScrollAreaAutosize ??\n selectScrollAreaAutosize(),\n },\n }}\n target={<ComboboxTarget {...targetProps} />}\n dropdownTopSlot={\n searchable && (\n <SelectSearch\n searchPlaceholder={searchPlaceholder}\n startSlot={searchStartSlot}\n classNames={{\n input: searchClassNames?.input ?? selectSearchInput(),\n wrapper: searchClassNames?.wrapper ?? selectSearchWrapper(),\n section: searchClassNames?.section ?? selectSearchSection(),\n }}\n />\n )\n }\n {...props}\n >\n <ComboboxOptions\n emptyProps={{\n emptyText: resolvedEmptyText,\n classNames: {\n empty: dropdownClassNames?.empty ?? selectEmpty(),\n },\n }}\n creatableProps={{\n creatable: false,\n }}\n />\n </Dropdown>\n );\n};\n"],"mappings":"s8BA+DA,MAAa,GAAU,CACrB,QACA,cACA,YAAY,GACZ,kBACA,YACA,aACA,oBACA,kBACA,mBACA,YACA,aACA,GAAG,KACc,CACjB,GAAM,CACJ,OAAQ,EACR,WAAY,EACZ,GAAG,GACD,GAAc,EAAE,CAEd,CACJ,YAAa,EACb,QAAS,EACT,GAAG,GACD,GAAoB,EAAE,CACpB,EACJ,IAAc,EAAa,aAAe,IAAA,IAEtC,EAAc,CAClB,cACA,QACA,YACA,SAAU,GACV,YAAa,CAAC,EACd,YACA,WAAY,CACV,kBACE,GAAsB,mBAAqB,GAAiB,CAC9D,KAAM,GAAsB,MAAQ,GAAqB,CACzD,MAAO,GAAsB,OAAS,GAAsB,CAC5D,YACE,GAAsB,aAAe,GAA4B,CACnE,MAAO,GAAsB,OAAS,GAAsB,CAC5D,QAAS,GAAsB,SAAW,GAAwB,CAClE,MAAO,GAAsB,OAAS,GAAsB,CAC5D,QAAS,GAAsB,SAAW,GAAwB,CAClE,SAAU,GAAsB,UAAY,GAAyB,CACtE,CACD,iBAAkB,CAChB,MAAO,EACP,WAAY,CACV,YAAa,GAAuB,aAAe,GAAmB,CACtE,KAAM,GAAuB,MAAQ,GAAuB,CAC5D,KAAM,GAAuB,MAAQ,GAAuB,CAC5D,QAAS,CACP,QACE,GAAuB,SAAS,SAChC,GAA0B,CAC5B,KACE,GAAuB,SAAS,MAChC,GAA8B,CACjC,CACF,CACF,CACD,aAAc,CACZ,WAAY,CACV,QAAS,GAAmB,SAAW,GAAe,CACtD,KAAM,GAAmB,MAAQ,GAAmB,CACpD,KAAM,CACJ,QAAS,GAAmB,MAAM,SAAW,GAAmB,CAChE,KAAM,GAAmB,MAAM,MAAQ,GAAuB,CAC/D,CACD,MAAO,CACL,QAAS,GAAmB,OAAO,SAAW,GAAmB,CACjE,KAAM,GAAmB,OAAO,MAAQ,GAAuB,CAChE,CACF,CACF,CACF,CAED,OACE,EAAC,EAAA,CACC,kBAAiB,EACjB,WAAY,CACV,SAAU,GAAoB,UAAY,GAAQ,CAClD,KAAM,GAAoB,MAAQ,GAAY,CAC9C,QAAS,GAAoB,SAAW,GAAe,CACvD,OAAQ,GAAoB,QAAU,GAAc,CACpD,MAAO,GAAoB,OAAS,GAAa,CACjD,OAAQ,GAAoB,OAC7B,CACD,gBAAiB,CACf,WAAY,CACV,2BACE,GAAsB,4BACtB,GAA0B,CAC7B,CACF,CACD,OAAQ,EAAC,EAAA,CAAe,GAAI,EAAA,CAAe,CAC3C,gBACE,GACE,EAAC,EAAA,CACoB,oBACnB,UAAW,EACX,WAAY,CACV,MAAO,GAAkB,OAAS,GAAmB,CACrD,QAAS,GAAkB,SAAW,GAAqB,CAC3D,QAAS,GAAkB,SAAW,GAAqB,CAC5D,EACD,CAGN,GAAI,WAEJ,EAAC,EAAA,CACC,WAAY,CACV,UAAW,EACX,WAAY,CACV,MAAO,GAAoB,OAAS,GAAa,CAClD,CACF,CACD,eAAgB,CACd,UAAW,GACZ,EACD,EACO"}
|
|
1
|
+
{"version":3,"file":"Select.mjs","names":[],"sources":["../../../../../src/components/controls/dropdown/select/Select.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport {\n select,\n selectChevron,\n selectChevronIcon,\n selectChevronIconRoot,\n selectChevronRoot,\n selectClearButton,\n selectClearButtonIcon,\n selectClearButtonIconRaw,\n selectClearButtonIconRawRoot,\n selectClearButtonRoot,\n selectEmpty,\n selectOption,\n selectOptions,\n selectRoot,\n selectScrollAreaAutosize,\n selectSearchInput,\n selectSearchSection,\n selectSearchWrapper,\n selectTextInput,\n selectTextInputDescription,\n selectTextInputError,\n selectTextInputInput,\n selectTextInputLabel,\n selectTextInputRequired,\n selectTextInputRoot,\n selectTextInputSection,\n selectTextInputWrapper,\n} from '@mage-ui/styled-system/recipes';\n\nimport { ComboboxOptions } from '../combobox/ComboboxOptions';\nimport type { ComboboxTargetProps } from '../combobox/ComboboxTarget';\nimport { ComboboxTarget } from '../combobox/ComboboxTarget';\nimport { Dropdown, type DropdownProps } from '../Dropdown';\nimport { SelectSearch, type SelectSearchClassNames } from './SelectSearch';\n\nexport type SelectProps = Omit<\n DropdownProps,\n 'children' | 'classNames' | 'target'\n> & {\n label?: string;\n placeholder?: string;\n clearable?: boolean;\n clearButtonText?: string;\n emptyText?: string;\n searchable?: boolean;\n searchPlaceholder?: string;\n searchStartSlot?: ReactNode;\n searchClassNames?: SelectSearchClassNames;\n startSlot?: ReactNode;\n classNames?: DropdownProps['classNames'] & {\n target?: ComboboxTargetProps['classNames'] & {\n clearButton?: NonNullable<\n ComboboxTargetProps['clearButtonProps']\n >['classNames'];\n chevron?: NonNullable<ComboboxTargetProps['chevronProps']>['classNames'];\n };\n scrollArea?: NonNullable<DropdownProps['scrollAreaProps']>['classNames'];\n };\n};\n\nexport const Select = ({\n label,\n placeholder,\n clearable = true,\n clearButtonText,\n emptyText,\n searchable,\n searchPlaceholder,\n searchStartSlot,\n searchClassNames,\n startSlot,\n classNames,\n ...props\n}: SelectProps) => {\n const {\n target: targetClassNames,\n scrollArea: scrollAreaClassNames,\n ...dropdownClassNames\n } = classNames || {};\n\n const {\n clearButton: clearButtonClassNames,\n chevron: chevronClassNames,\n ...restTargetClassNames\n } = targetClassNames || {};\n const resolvedEmptyText =\n emptyText ?? (searchable ? 'No results' : undefined);\n\n const targetProps = {\n placeholder,\n label,\n clearable,\n readOnly: true,\n closeOnBlur: !searchable,\n startSlot,\n displayQuery: false,\n classNames: {\n dropdownTextInput:\n restTargetClassNames?.dropdownTextInput ?? selectTextInput(),\n root: restTargetClassNames?.root ?? selectTextInputRoot(),\n label: restTargetClassNames?.label ?? selectTextInputLabel(),\n description:\n restTargetClassNames?.description ?? selectTextInputDescription(),\n error: restTargetClassNames?.error ?? selectTextInputError(),\n wrapper: restTargetClassNames?.wrapper ?? selectTextInputWrapper(),\n input: restTargetClassNames?.input ?? selectTextInputInput(),\n section: restTargetClassNames?.section ?? selectTextInputSection(),\n required: restTargetClassNames?.required ?? selectTextInputRequired(),\n },\n clearButtonProps: {\n label: clearButtonText,\n classNames: {\n clearButton: clearButtonClassNames?.clearButton ?? selectClearButton(),\n root: clearButtonClassNames?.root ?? selectClearButtonRoot(),\n icon: clearButtonClassNames?.icon ?? selectClearButtonIcon(),\n iconRaw: {\n iconRaw:\n clearButtonClassNames?.iconRaw?.iconRaw ??\n selectClearButtonIconRaw(),\n root:\n clearButtonClassNames?.iconRaw?.root ??\n selectClearButtonIconRawRoot(),\n },\n },\n },\n chevronProps: {\n classNames: {\n chevron: chevronClassNames?.chevron ?? selectChevron(),\n root: chevronClassNames?.root ?? selectChevronRoot(),\n open: {\n iconRaw: chevronClassNames?.open?.iconRaw ?? selectChevronIcon(),\n root: chevronClassNames?.open?.root ?? selectChevronIconRoot(),\n },\n close: {\n iconRaw: chevronClassNames?.close?.iconRaw ?? selectChevronIcon(),\n root: chevronClassNames?.close?.root ?? selectChevronIconRoot(),\n },\n },\n },\n };\n\n return (\n <Dropdown\n data-searchable={searchable}\n classNames={{\n dropdown: dropdownClassNames?.dropdown ?? select(),\n root: dropdownClassNames?.root ?? selectRoot(),\n options: dropdownClassNames?.options ?? selectOptions(),\n option: dropdownClassNames?.option ?? selectOption(),\n empty: dropdownClassNames?.empty ?? selectEmpty(),\n search: dropdownClassNames?.search,\n }}\n scrollAreaProps={{\n classNames: {\n dropdownScrollAreaAutosize:\n scrollAreaClassNames?.dropdownScrollAreaAutosize ??\n selectScrollAreaAutosize(),\n },\n }}\n target={<ComboboxTarget {...targetProps} />}\n dropdownTopSlot={\n searchable && (\n <SelectSearch\n searchPlaceholder={searchPlaceholder}\n startSlot={searchStartSlot}\n classNames={{\n input: searchClassNames?.input ?? selectSearchInput(),\n wrapper: searchClassNames?.wrapper ?? selectSearchWrapper(),\n section: searchClassNames?.section ?? selectSearchSection(),\n }}\n />\n )\n }\n {...props}\n >\n <ComboboxOptions\n emptyProps={{\n emptyText: resolvedEmptyText,\n classNames: {\n empty: dropdownClassNames?.empty ?? selectEmpty(),\n },\n }}\n creatableProps={{\n creatable: false,\n }}\n />\n </Dropdown>\n );\n};\n"],"mappings":"s8BA+DA,MAAa,GAAU,CACrB,QACA,cACA,YAAY,GACZ,kBACA,YACA,aACA,oBACA,kBACA,mBACA,YACA,aACA,GAAG,KACc,CACjB,GAAM,CACJ,OAAQ,EACR,WAAY,EACZ,GAAG,GACD,GAAc,EAAE,CAEd,CACJ,YAAa,EACb,QAAS,EACT,GAAG,GACD,GAAoB,EAAE,CACpB,EACJ,IAAc,EAAa,aAAe,IAAA,IAEtC,EAAc,CAClB,cACA,QACA,YACA,SAAU,GACV,YAAa,CAAC,EACd,YACA,aAAc,GACd,WAAY,CACV,kBACE,GAAsB,mBAAqB,GAAiB,CAC9D,KAAM,GAAsB,MAAQ,GAAqB,CACzD,MAAO,GAAsB,OAAS,GAAsB,CAC5D,YACE,GAAsB,aAAe,GAA4B,CACnE,MAAO,GAAsB,OAAS,GAAsB,CAC5D,QAAS,GAAsB,SAAW,GAAwB,CAClE,MAAO,GAAsB,OAAS,GAAsB,CAC5D,QAAS,GAAsB,SAAW,GAAwB,CAClE,SAAU,GAAsB,UAAY,GAAyB,CACtE,CACD,iBAAkB,CAChB,MAAO,EACP,WAAY,CACV,YAAa,GAAuB,aAAe,GAAmB,CACtE,KAAM,GAAuB,MAAQ,GAAuB,CAC5D,KAAM,GAAuB,MAAQ,GAAuB,CAC5D,QAAS,CACP,QACE,GAAuB,SAAS,SAChC,GAA0B,CAC5B,KACE,GAAuB,SAAS,MAChC,GAA8B,CACjC,CACF,CACF,CACD,aAAc,CACZ,WAAY,CACV,QAAS,GAAmB,SAAW,GAAe,CACtD,KAAM,GAAmB,MAAQ,GAAmB,CACpD,KAAM,CACJ,QAAS,GAAmB,MAAM,SAAW,GAAmB,CAChE,KAAM,GAAmB,MAAM,MAAQ,GAAuB,CAC/D,CACD,MAAO,CACL,QAAS,GAAmB,OAAO,SAAW,GAAmB,CACjE,KAAM,GAAmB,OAAO,MAAQ,GAAuB,CAChE,CACF,CACF,CACF,CAED,OACE,EAAC,EAAA,CACC,kBAAiB,EACjB,WAAY,CACV,SAAU,GAAoB,UAAY,GAAQ,CAClD,KAAM,GAAoB,MAAQ,GAAY,CAC9C,QAAS,GAAoB,SAAW,GAAe,CACvD,OAAQ,GAAoB,QAAU,GAAc,CACpD,MAAO,GAAoB,OAAS,GAAa,CACjD,OAAQ,GAAoB,OAC7B,CACD,gBAAiB,CACf,WAAY,CACV,2BACE,GAAsB,4BACtB,GAA0B,CAC7B,CACF,CACD,OAAQ,EAAC,EAAA,CAAe,GAAI,EAAA,CAAe,CAC3C,gBACE,GACE,EAAC,EAAA,CACoB,oBACnB,UAAW,EACX,WAAY,CACV,MAAO,GAAkB,OAAS,GAAmB,CACrD,QAAS,GAAkB,SAAW,GAAqB,CAC3D,QAAS,GAAkB,SAAW,GAAqB,CAC5D,EACD,CAGN,GAAI,WAEJ,EAAC,EAAA,CACC,WAAY,CACV,UAAW,EACX,WAAY,CACV,MAAO,GAAoB,OAAS,GAAa,CAClD,CACF,CACD,eAAgB,CACd,UAAW,GACZ,EACD,EACO"}
|
|
@@ -13,4 +13,5 @@ import { PasswordRule, PasswordSegment, PasswordStrengthInput, PasswordStrengthI
|
|
|
13
13
|
import { PasswordRuleDefinition, usePasswordRules } from "./password-input/usePasswordRules.mjs";
|
|
14
14
|
import { Radio, RadioProps } from "./radio/Radio.mjs";
|
|
15
15
|
import { Switch, SwitchProps } from "./switch/Switch.mjs";
|
|
16
|
+
import { SwitchGroup, SwitchGroupProps } from "./switch-group/SwitchGroup.mjs";
|
|
16
17
|
import { Textarea, TextareaProps } from "./textarea/Textarea.mjs";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { SwitchGroupProps } from "../switch-group/SwitchGroup.mjs";
|
|
2
|
+
import "../index.mjs";
|
|
1
3
|
import { ComponentProps, ReactNode } from "react";
|
|
2
4
|
|
|
3
5
|
//#region src/components/controls/switch/Switch.d.ts
|
|
@@ -35,6 +37,21 @@ declare const Switch: {
|
|
|
35
37
|
...props
|
|
36
38
|
}: SwitchProps): ReactNode;
|
|
37
39
|
displayName: string;
|
|
40
|
+
Group: {
|
|
41
|
+
({
|
|
42
|
+
label,
|
|
43
|
+
error,
|
|
44
|
+
description,
|
|
45
|
+
children,
|
|
46
|
+
value,
|
|
47
|
+
onChange,
|
|
48
|
+
hiddenLabel,
|
|
49
|
+
required,
|
|
50
|
+
disabled,
|
|
51
|
+
classNames
|
|
52
|
+
}: SwitchGroupProps): ReactNode;
|
|
53
|
+
displayName: string;
|
|
54
|
+
};
|
|
38
55
|
};
|
|
39
56
|
//#endregion
|
|
40
57
|
export { Switch, SwitchProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.d.mts","names":[],"sources":["../../../../src/components/controls/switch/Switch.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Switch.d.mts","names":[],"sources":["../../../../src/components/controls/switch/Switch.tsx"],"mappings":";;;;;KAuBY,WAAA,GAAc,IAAA,CAAK,cAAA;EAC7B,KAAA,GAAQ,SAAA;EACR,WAAA,GAAc,SAAA;EACd,KAAA;EACA,WAAA;EACA,aAAA;EACA,UAAA;IACE,MAAA;IACA,IAAA;IACA,KAAA;IACA,KAAA;IACA,KAAA;IACA,UAAA;IACA,IAAA;IACA,SAAA;IACA,YAAA;IACA,aAAA;IACA,KAAA;IACA,WAAA;IACA,KAAA;EAAA;AAAA;AAAA,cAIS,MAAA;EAAA;;;;;;;;;KASV,WAAA,GAAc,SAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{SwitchGroup as e}from"../switch-group/SwitchGroup.mjs";import{cx as t}from"@mage-ui/styled-system/css";import{switchBody as n,switchBodyError as r,switchDescription as i,switchError as a,switchInput as o,switchLabel as s,switchLabelRequired as c,switchLabelWrapper as l,switchRecipe as u,switchRoot as d,switchThumb as f,switchTrack as p,switchTrackLabel as m}from"@mage-ui/styled-system/recipes";import{Switch as h}from"@mantine/core";import{Fragment as g,jsx as _,jsxs as v}from"react/jsx-runtime";import{visuallyHidden as y}from"@mage-ui/styled-system/patterns";const b=({classNames:e,label:b,hiddenLabel:x,description:S,error:C,required:w,labelPosition:T,...E})=>_(h,{classNames:{root:t(e?.switch??u(),e?.root??d()),input:t(e?.input??o(),`peer`),track:e?.track??p(),thumb:e?.thumb??f(),trackLabel:e?.trackLabel??m(),body:t(e?.body??n(),C&&(e?.bodyError??r())),labelWrapper:e?.labelWrapper??l(),label:t(e?.label??s(),x&&y()),description:e?.description??i(),error:e?.error??a()},label:v(g,{children:[b,_(()=>w?_(`span`,{className:e?.labelRequired??c(),children:`*`}):null,{})]}),description:S,error:C,required:w,labelPosition:T,...E});b.displayName=`Switch`,b.Group=e;export{b as Switch};
|
|
2
2
|
//# sourceMappingURL=Switch.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.mjs","names":["Switch","MantineSwitch"],"sources":["../../../../src/components/controls/switch/Switch.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 switchBody,\n switchBodyError,\n switchDescription,\n switchError,\n switchInput,\n switchLabel,\n switchLabelRequired,\n switchLabelWrapper,\n switchRecipe,\n switchRoot,\n switchThumb,\n switchTrack,\n switchTrackLabel,\n} from '@mage-ui/styled-system/recipes';\nimport { Switch as MantineSwitch } from '@mantine/core';\n\nexport type SwitchProps = Omit<ComponentProps<'input'>, 'size' | 'children'> & {\n label?: ReactNode;\n description?: ReactNode;\n error?: string;\n hiddenLabel?: boolean;\n labelPosition?: 'left' | 'right';\n classNames?: {\n switch?: string;\n root?: string;\n input?: string;\n track?: string;\n thumb?: string;\n trackLabel?: string;\n body?: string;\n bodyError?: string;\n labelWrapper?: string;\n labelRequired?: string;\n label?: string;\n description?: string;\n error?: string;\n };\n};\n\nexport const Switch = ({\n classNames,\n label,\n hiddenLabel,\n description,\n error,\n required,\n labelPosition,\n ...props\n}: SwitchProps): ReactNode => {\n const RequiredAsterisk = () =>\n required ? (\n <span className={classNames?.labelRequired ?? switchLabelRequired()}>\n *\n </span>\n ) : null;\n\n return (\n <MantineSwitch\n classNames={{\n root: cx(\n classNames?.switch ?? switchRecipe(),\n classNames?.root ?? switchRoot(),\n ),\n input: cx(classNames?.input ?? switchInput(), 'peer'),\n track: classNames?.track ?? switchTrack(),\n thumb: classNames?.thumb ?? switchThumb(),\n trackLabel: classNames?.trackLabel ?? switchTrackLabel(),\n body: cx(\n classNames?.body ?? switchBody(),\n error && (classNames?.bodyError ?? switchBodyError()),\n ),\n labelWrapper: classNames?.labelWrapper ?? switchLabelWrapper(),\n label: cx(\n classNames?.label ?? switchLabel(),\n hiddenLabel && visuallyHidden(),\n ),\n description: classNames?.description ?? switchDescription(),\n error: classNames?.error ?? switchError(),\n }}\n label={\n <>\n {label}\n <RequiredAsterisk />\n </>\n }\n description={description}\n error={error}\n required={required}\n labelPosition={labelPosition}\n {...props}\n />\n );\n};\n\nSwitch.displayName = 'Switch';\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Switch.mjs","names":["Switch","MantineSwitch"],"sources":["../../../../src/components/controls/switch/Switch.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 switchBody,\n switchBodyError,\n switchDescription,\n switchError,\n switchInput,\n switchLabel,\n switchLabelRequired,\n switchLabelWrapper,\n switchRecipe,\n switchRoot,\n switchThumb,\n switchTrack,\n switchTrackLabel,\n} from '@mage-ui/styled-system/recipes';\nimport { Switch as MantineSwitch } from '@mantine/core';\n\nimport { SwitchGroup } from '../switch-group/SwitchGroup';\n\nexport type SwitchProps = Omit<ComponentProps<'input'>, 'size' | 'children'> & {\n label?: ReactNode;\n description?: ReactNode;\n error?: string;\n hiddenLabel?: boolean;\n labelPosition?: 'left' | 'right';\n classNames?: {\n switch?: string;\n root?: string;\n input?: string;\n track?: string;\n thumb?: string;\n trackLabel?: string;\n body?: string;\n bodyError?: string;\n labelWrapper?: string;\n labelRequired?: string;\n label?: string;\n description?: string;\n error?: string;\n };\n};\n\nexport const Switch = ({\n classNames,\n label,\n hiddenLabel,\n description,\n error,\n required,\n labelPosition,\n ...props\n}: SwitchProps): ReactNode => {\n const RequiredAsterisk = () =>\n required ? (\n <span className={classNames?.labelRequired ?? switchLabelRequired()}>\n *\n </span>\n ) : null;\n\n return (\n <MantineSwitch\n classNames={{\n root: cx(\n classNames?.switch ?? switchRecipe(),\n classNames?.root ?? switchRoot(),\n ),\n input: cx(classNames?.input ?? switchInput(), 'peer'),\n track: classNames?.track ?? switchTrack(),\n thumb: classNames?.thumb ?? switchThumb(),\n trackLabel: classNames?.trackLabel ?? switchTrackLabel(),\n body: cx(\n classNames?.body ?? switchBody(),\n error && (classNames?.bodyError ?? switchBodyError()),\n ),\n labelWrapper: classNames?.labelWrapper ?? switchLabelWrapper(),\n label: cx(\n classNames?.label ?? switchLabel(),\n hiddenLabel && visuallyHidden(),\n ),\n description: classNames?.description ?? switchDescription(),\n error: classNames?.error ?? switchError(),\n }}\n label={\n <>\n {label}\n <RequiredAsterisk />\n </>\n }\n description={description}\n error={error}\n required={required}\n labelPosition={labelPosition}\n {...props}\n />\n );\n};\n\nSwitch.displayName = 'Switch';\nSwitch.Group = SwitchGroup;\n"],"mappings":"4jBA8CA,MAAaA,GAAU,CACrB,aACA,QACA,cACA,cACA,QACA,WACA,gBACA,GAAG,KAUD,EAACC,EAAAA,CACC,WAAY,CACV,KAAM,EACJ,GAAY,QAAU,GAAc,CACpC,GAAY,MAAQ,GAAY,CACjC,CACD,MAAO,EAAG,GAAY,OAAS,GAAa,CAAE,OAAO,CACrD,MAAO,GAAY,OAAS,GAAa,CACzC,MAAO,GAAY,OAAS,GAAa,CACzC,WAAY,GAAY,YAAc,GAAkB,CACxD,KAAM,EACJ,GAAY,MAAQ,GAAY,CAChC,IAAU,GAAY,WAAa,GAAiB,EACrD,CACD,aAAc,GAAY,cAAgB,GAAoB,CAC9D,MAAO,EACL,GAAY,OAAS,GAAa,CAClC,GAAe,GAAgB,CAChC,CACD,YAAa,GAAY,aAAe,GAAmB,CAC3D,MAAO,GAAY,OAAS,GAAa,CAC1C,CACD,MACE,EAAA,EAAA,CAAA,SAAA,CACG,EACD,MAhCN,EACE,EAAC,OAAA,CAAK,UAAW,GAAY,eAAiB,GAAqB,UAAE,KAE9D,CACL,KA4BG,EAAA,CAAmB,CAAA,CAAA,CACnB,CAEQ,cACN,QACG,WACK,gBACf,GAAI,GACJ,CAIN,EAAO,YAAc,SACrB,EAAO,MAAQ"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/controls/switch-group/SwitchGroup.d.ts
|
|
4
|
+
type SwitchGroupProps = {
|
|
5
|
+
label: ReactNode;
|
|
6
|
+
error?: ReactNode;
|
|
7
|
+
description?: ReactNode;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
value?: string[];
|
|
10
|
+
onChange?: (value: string[]) => void;
|
|
11
|
+
hiddenLabel?: boolean;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
classNames?: {
|
|
15
|
+
switchGroup?: string;
|
|
16
|
+
root?: string;
|
|
17
|
+
label?: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
error?: string;
|
|
20
|
+
required?: string;
|
|
21
|
+
groupList?: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
declare const SwitchGroup: {
|
|
25
|
+
({
|
|
26
|
+
label,
|
|
27
|
+
error,
|
|
28
|
+
description,
|
|
29
|
+
children,
|
|
30
|
+
value,
|
|
31
|
+
onChange,
|
|
32
|
+
hiddenLabel,
|
|
33
|
+
required,
|
|
34
|
+
disabled,
|
|
35
|
+
classNames
|
|
36
|
+
}: SwitchGroupProps): ReactNode;
|
|
37
|
+
displayName: string;
|
|
38
|
+
};
|
|
39
|
+
//#endregion
|
|
40
|
+
export { SwitchGroup, SwitchGroupProps };
|
|
41
|
+
//# sourceMappingURL=SwitchGroup.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SwitchGroup.d.mts","names":[],"sources":["../../../../src/components/controls/switch-group/SwitchGroup.tsx"],"mappings":";;;KAeY,gBAAA;EACV,KAAA,EAAO,SAAA;EACP,KAAA,GAAQ,SAAA;EACR,WAAA,GAAc,SAAA;EACd,QAAA,GAAW,SAAA;EACX,KAAA;EACA,QAAA,IAAY,KAAA;EACZ,WAAA;EACA,QAAA;EACA,QAAA;EACA,UAAA;IACE,WAAA;IACA,IAAA;IACA,KAAA;IACA,WAAA;IACA,KAAA;IACA,QAAA;IACA,SAAA;EAAA;AAAA;AAAA,cAIS,WAAA;EAAA;;;;;;;;;;;KAWV,gBAAA,GAAmB,SAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{cx as e}from"@mage-ui/styled-system/css";import{switchGroup as t,switchGroupDescription as n,switchGroupError as r,switchGroupGroup as i,switchGroupLabel as a,switchGroupRequired as o,switchGroupRoot as s}from"@mage-ui/styled-system/recipes";import{Switch as c}from"@mantine/core";import{jsx as l}from"react/jsx-runtime";import{visuallyHidden as u}from"@mage-ui/styled-system/patterns";const d=({label:d,error:f,description:p,children:m,value:h,onChange:g,hiddenLabel:_,required:v,disabled:y,classNames:b})=>l(c.Group,{classNames:{root:e(b?.switchGroup??t(),b?.root??s()),label:e(b?.label??a(),_&&u()),description:b?.description??n(),required:b?.required??o(),error:b?.error??r()},label:d,description:p,error:f,value:h,onChange:g,withAsterisk:v,disabled:y,children:l(`div`,{className:b?.groupList??i(),children:m})});d.displayName=`Switch.Group`;export{d as SwitchGroup};
|
|
2
|
+
//# sourceMappingURL=SwitchGroup.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SwitchGroup.mjs","names":["MantineSwitch"],"sources":["../../../../src/components/controls/switch-group/SwitchGroup.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport { visuallyHidden } from '@mage-ui/styled-system/patterns';\nimport {\n switchGroup,\n switchGroupDescription,\n switchGroupError,\n switchGroupGroup,\n switchGroupLabel,\n switchGroupRequired,\n switchGroupRoot,\n} from '@mage-ui/styled-system/recipes';\nimport { Switch as MantineSwitch } from '@mantine/core';\n\nexport type SwitchGroupProps = {\n label: ReactNode;\n error?: ReactNode;\n description?: ReactNode;\n children?: ReactNode;\n value?: string[];\n onChange?: (value: string[]) => void;\n hiddenLabel?: boolean;\n required?: boolean;\n disabled?: boolean;\n classNames?: {\n switchGroup?: string;\n root?: string;\n label?: string;\n description?: string;\n error?: string;\n required?: string;\n groupList?: string;\n };\n};\n\nexport const SwitchGroup = ({\n label,\n error,\n description,\n children,\n value,\n onChange,\n hiddenLabel,\n required,\n disabled,\n classNames,\n}: SwitchGroupProps): ReactNode => {\n return (\n <MantineSwitch.Group\n classNames={{\n root: cx(\n classNames?.switchGroup ?? switchGroup(),\n classNames?.root ?? switchGroupRoot(),\n ),\n label: cx(\n classNames?.label ?? switchGroupLabel(),\n hiddenLabel && visuallyHidden(),\n ),\n description: classNames?.description ?? switchGroupDescription(),\n required: classNames?.required ?? switchGroupRequired(),\n error: classNames?.error ?? switchGroupError(),\n }}\n label={label}\n description={description}\n error={error}\n value={value}\n onChange={onChange}\n withAsterisk={required}\n disabled={disabled}\n >\n <div className={classNames?.groupList ?? switchGroupGroup()}>\n {children}\n </div>\n </MantineSwitch.Group>\n );\n};\n\nSwitchGroup.displayName = 'Switch.Group';\n"],"mappings":"yYAoCA,MAAa,GAAe,CAC1B,QACA,QACA,cACA,WACA,QACA,WACA,cACA,WACA,WACA,gBAGE,EAACA,EAAc,MAAA,CACb,WAAY,CACV,KAAM,EACJ,GAAY,aAAe,GAAa,CACxC,GAAY,MAAQ,GAAiB,CACtC,CACD,MAAO,EACL,GAAY,OAAS,GAAkB,CACvC,GAAe,GAAgB,CAChC,CACD,YAAa,GAAY,aAAe,GAAwB,CAChE,SAAU,GAAY,UAAY,GAAqB,CACvD,MAAO,GAAY,OAAS,GAAkB,CAC/C,CACM,QACM,cACN,QACA,QACG,WACV,aAAc,EACJ,oBAEV,EAAC,MAAA,CAAI,UAAW,GAAY,WAAa,GAAkB,CACxD,YACG,EACc,CAI1B,EAAY,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Checkbox as e}from"../../controls/checkbox/Checkbox.mjs";import{dataTableExpandButton as
|
|
1
|
+
import{Checkbox as e}from"../../controls/checkbox/Checkbox.mjs";import{columnCheck as t,columnExpand as n,dataTableExpandButton as r}from"@mage-ui/styled-system/recipes";import{jsx as i}from"react/jsx-runtime";const a=n=>({id:`_select`,meta:{classNames:{header:t(),cell:t()}},header:({table:t})=>i(e,{"aria-label":n.selectAllRows,checked:t.getIsAllPageRowsSelected(),indeterminate:t.getIsSomePageRowsSelected()&&!t.getIsAllPageRowsSelected(),onChange:t.getToggleAllPageRowsSelectedHandler()}),cell:({row:t})=>i(e,{"aria-label":n.selectRow(t.index+1),checked:t.getIsSelected(),disabled:!t.getCanSelect(),onChange:t.getToggleSelectedHandler()})}),o=(e,t)=>({id:`_expand`,meta:{classNames:{header:n(),cell:n()}},header:()=>null,cell:({row:n})=>i(`button`,{className:e??r(),type:`button`,onClick:n.getToggleExpandedHandler(),"data-expanded":n.getIsExpanded()||void 0,"aria-expanded":n.getIsExpanded(),"aria-controls":`data-table-expanded-${n.id}`,"aria-label":n.getIsExpanded()?t.collapseRow:t.expandRow,children:i(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,children:i(`path`,{d:`M6 4l4 4-4 4`,stroke:`currentColor`,strokeWidth:`1.5`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`})})})});export{o as getDataTableExpandColumn,a as getDataTableSelectColumn};
|
|
2
2
|
//# sourceMappingURL=DataTableColumns.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableColumns.mjs","names":[],"sources":["../../../../src/components/data-display/datatables/DataTableColumns.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"DataTableColumns.mjs","names":[],"sources":["../../../../src/components/data-display/datatables/DataTableColumns.tsx"],"sourcesContent":["import {\n columnCheck,\n columnExpand,\n dataTableExpandButton,\n} from '@mage-ui/styled-system/recipes';\nimport type { ColumnDef } from '@tanstack/react-table';\n\nimport { Checkbox } from '../../controls/checkbox/Checkbox';\nimport type { DataTableLabels } from './useDataTableContext';\n\nexport const getDataTableSelectColumn = <Data,>(\n labels: DataTableLabels,\n): ColumnDef<Data, unknown> => ({\n id: '_select',\n meta: {\n classNames: {\n header: columnCheck(),\n cell: columnCheck(),\n },\n },\n header: ({ table }) => {\n return (\n <Checkbox\n aria-label={labels.selectAllRows}\n checked={table.getIsAllPageRowsSelected()}\n indeterminate={\n table.getIsSomePageRowsSelected() && !table.getIsAllPageRowsSelected()\n }\n onChange={table.getToggleAllPageRowsSelectedHandler()}\n />\n );\n },\n cell: ({ row }) => (\n <Checkbox\n aria-label={labels.selectRow(row.index + 1)}\n checked={row.getIsSelected()}\n disabled={!row.getCanSelect()}\n onChange={row.getToggleSelectedHandler()}\n />\n ),\n});\n\nexport const getDataTableExpandColumn = <Data,>(\n className: string | undefined,\n labels: DataTableLabels,\n): ColumnDef<Data, unknown> => ({\n id: '_expand',\n meta: {\n classNames: {\n header: columnExpand(),\n cell: columnExpand(),\n },\n },\n header: () => null,\n cell: ({ row }) => (\n <button\n className={className ?? dataTableExpandButton()}\n type='button'\n onClick={row.getToggleExpandedHandler()}\n data-expanded={row.getIsExpanded() || undefined}\n aria-expanded={row.getIsExpanded()}\n aria-controls={`data-table-expanded-${row.id}`}\n aria-label={row.getIsExpanded() ? labels.collapseRow : labels.expandRow}\n >\n <svg\n width='16'\n height='16'\n viewBox='0 0 16 16'\n fill='currentColor'\n aria-hidden='true'\n focusable='false'\n >\n <path\n d='M6 4l4 4-4 4'\n stroke='currentColor'\n strokeWidth='1.5'\n fill='none'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n </svg>\n </button>\n ),\n});\n"],"mappings":"kNAUA,MAAa,EACX,IAC8B,CAC9B,GAAI,UACJ,KAAM,CACJ,WAAY,CACV,OAAQ,GAAa,CACrB,KAAM,GAAa,CACpB,CACF,CACD,QAAS,CAAE,WAEP,EAAC,EAAA,CACC,aAAY,EAAO,cACnB,QAAS,EAAM,0BAA0B,CACzC,cACE,EAAM,2BAA2B,EAAI,CAAC,EAAM,0BAA0B,CAExE,SAAU,EAAM,qCAAqC,EACrD,CAGN,MAAO,CAAE,SACP,EAAC,EAAA,CACC,aAAY,EAAO,UAAU,EAAI,MAAQ,EAAE,CAC3C,QAAS,EAAI,eAAe,CAC5B,SAAU,CAAC,EAAI,cAAc,CAC7B,SAAU,EAAI,0BAA0B,EACxC,CAEL,EAEY,GACX,EACA,KAC8B,CAC9B,GAAI,UACJ,KAAM,CACJ,WAAY,CACV,OAAQ,GAAc,CACtB,KAAM,GAAc,CACrB,CACF,CACD,WAAc,KACd,MAAO,CAAE,SACP,EAAC,SAAA,CACC,UAAW,GAAa,GAAuB,CAC/C,KAAK,SACL,QAAS,EAAI,0BAA0B,CACvC,gBAAe,EAAI,eAAe,EAAI,IAAA,GACtC,gBAAe,EAAI,eAAe,CAClC,gBAAe,uBAAuB,EAAI,KAC1C,aAAY,EAAI,eAAe,CAAG,EAAO,YAAc,EAAO,mBAE9D,EAAC,MAAA,CACC,MAAM,KACN,OAAO,KACP,QAAQ,YACR,KAAK,eACL,cAAY,OACZ,UAAU,iBAEV,EAAC,OAAA,CACC,EAAE,eACF,OAAO,eACP,YAAY,MACZ,KAAK,OACL,cAAc,QACd,eAAe,SACf,EACE,EACC,CAEZ"}
|
|
@@ -67,13 +67,14 @@ import { PasswordRule, PasswordSegment, PasswordStrengthInput, PasswordStrengthI
|
|
|
67
67
|
import { PasswordRuleDefinition, usePasswordRules } from "./controls/password-input/usePasswordRules.mjs";
|
|
68
68
|
import { Radio, RadioProps } from "./controls/radio/Radio.mjs";
|
|
69
69
|
import { Switch, SwitchProps } from "./controls/switch/Switch.mjs";
|
|
70
|
+
import { SwitchGroup, SwitchGroupProps } from "./controls/switch-group/SwitchGroup.mjs";
|
|
70
71
|
import { Textarea, TextareaProps } from "./controls/textarea/Textarea.mjs";
|
|
71
72
|
import "./controls/index.mjs";
|
|
72
73
|
import { Form, FormProps } from "./forms/Form.mjs";
|
|
73
74
|
import { PASSWORD_RULES } from "./forms/rules/password-rules.mjs";
|
|
74
75
|
import { z } from "./forms/rules/zod.mjs";
|
|
75
76
|
import "./forms/index.mjs";
|
|
76
|
-
import { Card, CardProps } from "./layouts/card/Card.mjs";
|
|
77
|
+
import { Card, CardBase, CardBody, CardClassNames, CardFooter, CardHeader, CardProps, CardRoot } from "./layouts/card/Card.mjs";
|
|
77
78
|
import { FluidGrid, FluidGridProps } from "./layouts/fluid-grid/FluidGrid.mjs";
|
|
78
79
|
import { Grid, GridClassNames } from "./layouts/grid/Grid.mjs";
|
|
79
80
|
import "./layouts/index.mjs";
|
|
@@ -1,18 +1,62 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/components/layouts/card/Card.d.ts
|
|
4
|
+
type CardClassNames = {
|
|
5
|
+
card?: string;
|
|
6
|
+
root?: string;
|
|
7
|
+
header?: string;
|
|
8
|
+
body?: string;
|
|
9
|
+
footer?: string;
|
|
10
|
+
};
|
|
4
11
|
type CardProps = HTMLAttributes<HTMLDivElement> & {
|
|
5
12
|
children?: ReactNode;
|
|
6
|
-
classNames?:
|
|
7
|
-
card?: string;
|
|
8
|
-
root?: string;
|
|
9
|
-
};
|
|
13
|
+
classNames?: CardClassNames;
|
|
10
14
|
};
|
|
11
|
-
declare const
|
|
15
|
+
declare const CardBase: ({
|
|
16
|
+
children,
|
|
17
|
+
classNames,
|
|
18
|
+
...props
|
|
19
|
+
}: CardProps) => ReactNode;
|
|
20
|
+
declare const CardRoot: ({
|
|
12
21
|
children,
|
|
13
22
|
classNames,
|
|
14
23
|
...props
|
|
15
24
|
}: CardProps) => ReactNode;
|
|
25
|
+
declare const CardHeader: ({
|
|
26
|
+
children,
|
|
27
|
+
...props
|
|
28
|
+
}: HTMLAttributes<HTMLDivElement>) => ReactNode;
|
|
29
|
+
declare const CardBody: ({
|
|
30
|
+
children,
|
|
31
|
+
...props
|
|
32
|
+
}: HTMLAttributes<HTMLDivElement>) => ReactNode;
|
|
33
|
+
declare const CardFooter: ({
|
|
34
|
+
children,
|
|
35
|
+
...props
|
|
36
|
+
}: HTMLAttributes<HTMLDivElement>) => ReactNode;
|
|
37
|
+
declare const Card: (({
|
|
38
|
+
children,
|
|
39
|
+
classNames,
|
|
40
|
+
...props
|
|
41
|
+
}: CardProps) => ReactNode) & {
|
|
42
|
+
Root: ({
|
|
43
|
+
children,
|
|
44
|
+
classNames,
|
|
45
|
+
...props
|
|
46
|
+
}: CardProps) => ReactNode;
|
|
47
|
+
Header: ({
|
|
48
|
+
children,
|
|
49
|
+
...props
|
|
50
|
+
}: HTMLAttributes<HTMLDivElement>) => ReactNode;
|
|
51
|
+
Body: ({
|
|
52
|
+
children,
|
|
53
|
+
...props
|
|
54
|
+
}: HTMLAttributes<HTMLDivElement>) => ReactNode;
|
|
55
|
+
Footer: ({
|
|
56
|
+
children,
|
|
57
|
+
...props
|
|
58
|
+
}: HTMLAttributes<HTMLDivElement>) => ReactNode;
|
|
59
|
+
};
|
|
16
60
|
//#endregion
|
|
17
|
-
export { Card, CardProps };
|
|
61
|
+
export { Card, CardBase, CardBody, CardClassNames, CardFooter, CardHeader, CardProps, CardRoot };
|
|
18
62
|
//# sourceMappingURL=Card.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.mts","names":[],"sources":["../../../../src/components/layouts/card/Card.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Card.d.mts","names":[],"sources":["../../../../src/components/layouts/card/Card.tsx"],"mappings":";;;KAgBY,cAAA;EACV,IAAA;EACA,IAAA;EACA,MAAA;EACA,IAAA;EACA,MAAA;AAAA;AAAA,KAGU,SAAA,GAAY,cAAA,CAAe,cAAA;EACrC,QAAA,GAAW,SAAA;EACX,UAAA,GAAa,cAAA;AAAA;AAAA,cAKF,QAAA;EAAY,QAAA;EAAA,UAAA;EAAA,GAAA;AAAA,GAItB,SAAA,KAAY,SAAA;AAAA,cAgBF,QAAA;EAAQ,QAAA;EAAA,UAAA;EAAA,GAAA;AAAA,GAhBlB,SAAA,KAAY,SAAA;AAAA,cAkBF,UAAA;EAAc,QAAA;EAAA,GAAA;AAAA,GAGxB,cAAA,CAAe,cAAA,MAAkB,SAAA;AAAA,cASvB,QAAA;EAAY,QAAA;EAAA,GAAA;AAAA,GAGtB,cAAA,CAAe,cAAA,MAAkB,SAAA;AAAA,cASvB,UAAA;EAAc,QAAA;EAAA,GAAA;AAAA,GAGxB,cAAA,CAAe,cAAA,MAAkB,SAAA;AAAA,cASvB,IAAA;EAAI,QAAA;EAAA,UAAA;EAAA,GAAA;AAAA,GAtDd,SAAA,KAAY,SAAA;;;;;KAAZ,SAAA,KAAY,SAAA;;;;KAqBZ,cAAA,CAAe,cAAA,MAAkB,SAAA;;;;KAYjC,cAAA,CAAe,cAAA,MAAkB,SAAA;;;;KAYjC,cAAA,CAAe,cAAA,MAAkB,SAAA;AAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cx as e}from"@mage-ui/styled-system/css";import{card as t,cardRoot as
|
|
1
|
+
import{cx as e}from"@mage-ui/styled-system/css";import{card as t,cardBody as n,cardFooter as r,cardHeader as i,cardRoot as a}from"@mage-ui/styled-system/recipes";import{jsx as o}from"react/jsx-runtime";import{createContext as s,useContext as c}from"react";const l=s({}),u=({children:n,classNames:r,...i})=>o(l.Provider,{value:{classNames:r},children:o(`div`,{className:e(r?.card??t(),r?.root??a()),...i,children:n})}),d=u,f=({children:e,...t})=>{let{classNames:n}=c(l);return o(`div`,{className:n?.header??i(),...t,children:e})},p=({children:e,...t})=>{let{classNames:r}=c(l);return o(`div`,{className:r?.body??n(),...t,children:e})},m=({children:e,...t})=>{let{classNames:n}=c(l);return o(`div`,{className:n?.footer??r(),...t,children:e})},h=Object.assign(u,{Root:d,Header:f,Body:p,Footer:m});export{h as Card,u as CardBase,p as CardBody,m as CardFooter,f as CardHeader,d as CardRoot};
|
|
2
2
|
//# sourceMappingURL=Card.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.mjs","names":[],"sources":["../../../../src/components/layouts/card/Card.tsx"],"sourcesContent":["import type
|
|
1
|
+
{"version":3,"file":"Card.mjs","names":[],"sources":["../../../../src/components/layouts/card/Card.tsx"],"sourcesContent":["import {\n createContext,\n type HTMLAttributes,\n type ReactNode,\n useContext,\n} from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n card,\n cardBody,\n cardFooter,\n cardHeader,\n cardRoot,\n} from '@mage-ui/styled-system/recipes';\n\nexport type CardClassNames = {\n card?: string;\n root?: string;\n header?: string;\n body?: string;\n footer?: string;\n};\n\nexport type CardProps = HTMLAttributes<HTMLDivElement> & {\n children?: ReactNode;\n classNames?: CardClassNames;\n};\n\nconst CardContext = createContext<{ classNames?: CardClassNames }>({});\n\nexport const CardBase = ({\n children,\n classNames,\n ...props\n}: CardProps): ReactNode => {\n return (\n <CardContext.Provider value={{ classNames }}>\n <div\n className={cx(\n classNames?.card ?? card(),\n classNames?.root ?? cardRoot(),\n )}\n {...props}\n >\n {children}\n </div>\n </CardContext.Provider>\n );\n};\n\nexport const CardRoot = CardBase;\n\nexport const CardHeader = ({\n children,\n ...props\n}: HTMLAttributes<HTMLDivElement>): ReactNode => {\n const { classNames } = useContext(CardContext);\n return (\n <div className={classNames?.header ?? cardHeader()} {...props}>\n {children}\n </div>\n );\n};\n\nexport const CardBody = ({\n children,\n ...props\n}: HTMLAttributes<HTMLDivElement>): ReactNode => {\n const { classNames } = useContext(CardContext);\n return (\n <div className={classNames?.body ?? cardBody()} {...props}>\n {children}\n </div>\n );\n};\n\nexport const CardFooter = ({\n children,\n ...props\n}: HTMLAttributes<HTMLDivElement>): ReactNode => {\n const { classNames } = useContext(CardContext);\n return (\n <div className={classNames?.footer ?? cardFooter()} {...props}>\n {children}\n </div>\n );\n};\n\nexport const Card = Object.assign(CardBase, {\n Root: CardRoot,\n Header: CardHeader,\n Body: CardBody,\n Footer: CardFooter,\n});\n"],"mappings":"gQA6BA,MAAM,EAAc,EAA+C,EAAE,CAAC,CAEzD,GAAY,CACvB,WACA,aACA,GAAG,KAGD,EAAC,EAAY,SAAA,CAAS,MAAO,CAAE,aAAY,UACzC,EAAC,MAAA,CACC,UAAW,EACT,GAAY,MAAQ,GAAM,CAC1B,GAAY,MAAQ,GAAU,CAC/B,CACD,GAAI,EAEH,YACG,EACe,CAId,EAAW,EAEX,GAAc,CACzB,WACA,GAAG,KAC4C,CAC/C,GAAM,CAAE,cAAe,EAAW,EAAY,CAC9C,OACE,EAAC,MAAA,CAAI,UAAW,GAAY,QAAU,GAAY,CAAE,GAAI,EACrD,YACG,EAIG,GAAY,CACvB,WACA,GAAG,KAC4C,CAC/C,GAAM,CAAE,cAAe,EAAW,EAAY,CAC9C,OACE,EAAC,MAAA,CAAI,UAAW,GAAY,MAAQ,GAAU,CAAE,GAAI,EACjD,YACG,EAIG,GAAc,CACzB,WACA,GAAG,KAC4C,CAC/C,GAAM,CAAE,cAAe,EAAW,EAAY,CAC9C,OACE,EAAC,MAAA,CAAI,UAAW,GAAY,QAAU,GAAY,CAAE,GAAI,EACrD,YACG,EAIG,EAAO,OAAO,OAAO,EAAU,CAC1C,KAAM,EACN,OAAQ,EACR,KAAM,EACN,OAAQ,EACT,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Card, CardProps } from "./card/Card.mjs";
|
|
1
|
+
import { Card, CardBase, CardBody, CardClassNames, CardFooter, CardHeader, CardProps, CardRoot } from "./card/Card.mjs";
|
|
2
2
|
import { FluidGrid, FluidGridProps } from "./fluid-grid/FluidGrid.mjs";
|
|
3
3
|
import { Grid, GridClassNames } from "./grid/Grid.mjs";
|
package/dist/index.d.mts
CHANGED
|
@@ -64,11 +64,12 @@ import { PasswordRule, PasswordSegment, PasswordStrengthInput, PasswordStrengthI
|
|
|
64
64
|
import { PasswordRuleDefinition, usePasswordRules } from "./components/controls/password-input/usePasswordRules.mjs";
|
|
65
65
|
import { Radio, RadioProps } from "./components/controls/radio/Radio.mjs";
|
|
66
66
|
import { Switch, SwitchProps } from "./components/controls/switch/Switch.mjs";
|
|
67
|
+
import { SwitchGroup, SwitchGroupProps } from "./components/controls/switch-group/SwitchGroup.mjs";
|
|
67
68
|
import { Textarea, TextareaProps } from "./components/controls/textarea/Textarea.mjs";
|
|
68
69
|
import { Form, FormProps } from "./components/forms/Form.mjs";
|
|
69
70
|
import { PASSWORD_RULES } from "./components/forms/rules/password-rules.mjs";
|
|
70
71
|
import { z } from "./components/forms/rules/zod.mjs";
|
|
71
|
-
import { Card, CardProps } from "./components/layouts/card/Card.mjs";
|
|
72
|
+
import { Card, CardBase, CardBody, CardClassNames, CardFooter, CardHeader, CardProps, CardRoot } from "./components/layouts/card/Card.mjs";
|
|
72
73
|
import { FluidGrid, FluidGridProps } from "./components/layouts/fluid-grid/FluidGrid.mjs";
|
|
73
74
|
import { Grid, GridClassNames } from "./components/layouts/grid/Grid.mjs";
|
|
74
75
|
import { BreadcrumbsBarProps } from "./components/navigations/breadcrumbs/BreadcrumbsBar.mjs";
|
|
@@ -84,4 +85,4 @@ import { Tooltip, TooltipProps } from "./components/overlays/tooltip/Tooltip.mjs
|
|
|
84
85
|
import "./components/index.mjs";
|
|
85
86
|
import { MageUiProvider, MageUiProviderProps } from "./providers/MageUiProvider.mjs";
|
|
86
87
|
import "./providers/index.mjs";
|
|
87
|
-
export { AssignedUser, AssignedUserProps, Autocomplete, AutocompleteProps, Avatar, AvatarProps, Badge, BadgeProps, BoardData, BoardItem, Breadcrumbs, BreadcrumbsBarProps, BreadcrumbsProps, Button, ButtonAction, ButtonActionProps, ButtonIcon, ButtonIconProps, ButtonIconVisual, ButtonIconVisualProps, ButtonLoader, ButtonProps, ButtonVisual, ButtonVisualProps, Calendar, CalendarEvent, CalendarProps, CalendarVariant, Card, CardMove, CardProps, CardRenderProps, Checkbox, CheckboxProps, ColumnDef, Combobox, ComboboxProps, ConfigMap, DEFAULT_DATA_TABLE_LABELS, DataTable, DataTableBottomSlot, DataTableBottomSlotProps, DataTableClassNames, DataTableColumnMeta, DataTableContextProvider, DataTableContextValue, DataTableErrorState, DataTableExpansionConfig, DataTableExtraColumnConfig, DataTableFiltersConfig, DataTableLabels, DataTablePageSize, DataTablePageSizeProps, DataTablePagination, DataTablePaginationConfig, DataTablePaginationProps, DataTableProps, DataTableRecord, DataTableSearchConfig, DataTableSelectionConfig, DataTableSortingConfig, DataTableTableConfig, DataTableTopSlot, DataTableTopSlotProps, DateLocalizer, DatePicker, DatePickerProps, DescriptionList, DescriptionListClassNames, DescriptionListItemProps, DescriptionListProps, Dropzone, DropzoneFiles, DropzoneFilesProps, DropzoneProps, ExpandedState, FileData, FileInput, FileInputMultiple, FileInputMultipleProps, FileInputProps, FluidGrid, FluidGridProps, Form, FormProps, Grid, GridClassNames, HorizontalDivider, HorizontalDividerProps, Icon, IconProps, IconRaw, IconRawProps, IconSvg, IconSvgProps, IconWrapped, IconWrappedProps, Indicator, IndicatorProps, Kanban, KanbanCardBase, KanbanCardBaseProps, KanbanProps, LoaderDot, LoaderDotProps, LoaderOval, LoaderOvalProps, LogoImage, LogoImageProps, LogoSvg, LogoSvgProps, MageUiProvider, MageUiProviderProps, Menu, MenuProps, Modal, ModalClassNames, ModalIntent, ModalProps, ModalRegistry, ModalRegistryEntry, ModalRootProps, Modals, NotificationBanner, NotificationBannerIntent, NotificationBannerProps, PASSWORD_RULES, Pagination, PaginationClassNames, PaginationRootProps, PaginationState, PasswordInput, PasswordInputProps, PasswordRule, PasswordRuleDefinition, PasswordSegment, PasswordStrengthInput, PasswordStrengthInputProps, Radio, RadioProps, RemovableItem, RemovableItemProps, RowSelectionState, ScrollArea, ScrollAreaAutosize, ScrollAreaAutosizeProps, ScrollAreaClassNames, ScrollAreaProps, Select, SelectProps, Sidebar, SidebarClassNames, SidebarProps, SortingState, Switch, SwitchProps, Table, TableBodyProps, TableCaptionProps, TableCellProps, TableClassNames, TableFootProps, TableHeadProps, TableHeaderCellProps, TableProps, TableRowProps, Tag, TagGroup, TagGroupProps, TagProps, TextInput, TextInputProps, Textarea, TextareaProps, Toast, ToastOptions, ToastProviderProps, Tooltip, TooltipProps, UploadedFile, UploadedFileDetails, UploadedFileDetailsProps, UploadedFileProps, Virtual, VirtualItem, VirtualPadding, VirtualProps, VisuallyHidden, VisuallyHiddenProps, momentLocalizer, useDataTableContext, usePasswordRules, z };
|
|
88
|
+
export { AssignedUser, AssignedUserProps, Autocomplete, AutocompleteProps, Avatar, AvatarProps, Badge, BadgeProps, BoardData, BoardItem, Breadcrumbs, BreadcrumbsBarProps, BreadcrumbsProps, Button, ButtonAction, ButtonActionProps, ButtonIcon, ButtonIconProps, ButtonIconVisual, ButtonIconVisualProps, ButtonLoader, ButtonProps, ButtonVisual, ButtonVisualProps, Calendar, CalendarEvent, CalendarProps, CalendarVariant, Card, CardBase, CardBody, CardClassNames, CardFooter, CardHeader, CardMove, CardProps, CardRenderProps, CardRoot, Checkbox, CheckboxProps, ColumnDef, Combobox, ComboboxProps, ConfigMap, DEFAULT_DATA_TABLE_LABELS, DataTable, DataTableBottomSlot, DataTableBottomSlotProps, DataTableClassNames, DataTableColumnMeta, DataTableContextProvider, DataTableContextValue, DataTableErrorState, DataTableExpansionConfig, DataTableExtraColumnConfig, DataTableFiltersConfig, DataTableLabels, DataTablePageSize, DataTablePageSizeProps, DataTablePagination, DataTablePaginationConfig, DataTablePaginationProps, DataTableProps, DataTableRecord, DataTableSearchConfig, DataTableSelectionConfig, DataTableSortingConfig, DataTableTableConfig, DataTableTopSlot, DataTableTopSlotProps, DateLocalizer, DatePicker, DatePickerProps, DescriptionList, DescriptionListClassNames, DescriptionListItemProps, DescriptionListProps, Dropzone, DropzoneFiles, DropzoneFilesProps, DropzoneProps, ExpandedState, FileData, FileInput, FileInputMultiple, FileInputMultipleProps, FileInputProps, FluidGrid, FluidGridProps, Form, FormProps, Grid, GridClassNames, HorizontalDivider, HorizontalDividerProps, Icon, IconProps, IconRaw, IconRawProps, IconSvg, IconSvgProps, IconWrapped, IconWrappedProps, Indicator, IndicatorProps, Kanban, KanbanCardBase, KanbanCardBaseProps, KanbanProps, LoaderDot, LoaderDotProps, LoaderOval, LoaderOvalProps, LogoImage, LogoImageProps, LogoSvg, LogoSvgProps, MageUiProvider, MageUiProviderProps, Menu, MenuProps, Modal, ModalClassNames, ModalIntent, ModalProps, ModalRegistry, ModalRegistryEntry, ModalRootProps, Modals, NotificationBanner, NotificationBannerIntent, NotificationBannerProps, PASSWORD_RULES, Pagination, PaginationClassNames, PaginationRootProps, PaginationState, PasswordInput, PasswordInputProps, PasswordRule, PasswordRuleDefinition, PasswordSegment, PasswordStrengthInput, PasswordStrengthInputProps, Radio, RadioProps, RemovableItem, RemovableItemProps, RowSelectionState, ScrollArea, ScrollAreaAutosize, ScrollAreaAutosizeProps, ScrollAreaClassNames, ScrollAreaProps, Select, SelectProps, Sidebar, SidebarClassNames, SidebarProps, SortingState, Switch, SwitchGroup, SwitchGroupProps, SwitchProps, Table, TableBodyProps, TableCaptionProps, TableCellProps, TableClassNames, TableFootProps, TableHeadProps, TableHeaderCellProps, TableProps, TableRowProps, Tag, TagGroup, TagGroupProps, TagProps, TextInput, TextInputProps, Textarea, TextareaProps, Toast, ToastOptions, ToastProviderProps, Tooltip, TooltipProps, UploadedFile, UploadedFileDetails, UploadedFileDetailsProps, UploadedFileProps, Virtual, VirtualItem, VirtualPadding, VirtualProps, VisuallyHidden, VisuallyHiddenProps, momentLocalizer, useDataTableContext, usePasswordRules, z };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Button as e}from"./components/buttons/button/Button.mjs";import{VisuallyHidden as t}from"./components/misc/visually-hidden/VisuallyHidden.mjs";import{ButtonAction as n}from"./components/buttons/button-action/ButtonAction.mjs";import{ButtonLoader as r}from"./components/buttons/button-action/ButtonLoader.mjs";import{AssignedUser as i}from"./components/data-display/assigned-user/AssignedUser.mjs";import{Avatar as a}from"./components/data-display/avatar/Avatar.mjs";import{Badge as o}from"./components/data-display/badge/Badge.mjs";import{Calendar as s,momentLocalizer as c}from"./components/data-display/calendar/Calendar.mjs";import{Virtual as l}from"./components/misc/virtual/Virtual.mjs";import{ScrollArea as u}from"./components/misc/scroll-area/ScrollArea.mjs";import{Table as d}from"./components/data-display/table/Table.mjs";import{IconRaw as f}from"./components/data-display/icons/icon-raw/IconRaw.mjs";import{Icon as p}from"./components/data-display/icons/icon/Icon.mjs";import{DEFAULT_DATA_TABLE_LABELS as m,DataTableContextProvider as h,useDataTableContext as g}from"./components/data-display/datatables/useDataTableContext.mjs";import{Checkbox as _}from"./components/controls/checkbox/Checkbox.mjs";import{DataTable as v}from"./components/data-display/datatables/DataTable.mjs";import{HorizontalDivider as y}from"./components/misc/horizontal-divider/HorizontalDivider.mjs";import{ScrollAreaAutosize as b}from"./components/misc/scroll-area-autosize/ScrollAreaAutosize.mjs";import{TextInput as x}from"./components/controls/text-input/TextInput.mjs";import{IconWrapped as S}from"./components/data-display/icons/icon-wrapped/IconWrapped.mjs";import{Select as C}from"./components/controls/dropdown/select/Select.mjs";import{DataTablePageSize as w}from"./components/data-display/datatables/DataTablePageSize.mjs";import{Pagination as T}from"./components/navigations/pagination/Pagination.mjs";import{DataTablePagination as E}from"./components/data-display/datatables/DataTablePagination.mjs";import{DataTableBottomSlot as D}from"./components/data-display/datatables/DataTableBottomSlot.mjs";import{DataTableErrorState as O}from"./components/data-display/datatables/DataTableErrorState.mjs";import{DataTableTopSlot as k}from"./components/data-display/datatables/DataTableTopSlot.mjs";import{DescriptionList as A}from"./components/data-display/description-list/DescriptionList.mjs";import{IconSvg as j}from"./components/data-display/icons/icon-svg/IconSvg.mjs";import{Indicator as M}from"./components/data-display/indicator/Indicator.mjs";import{Kanban as N}from"./components/data-display/kanban/Kanban.mjs";import{KanbanCardBase as P}from"./components/data-display/kanban/KanbanCardBase.mjs";import{LoaderDot as F}from"./components/data-display/loader-dot/LoaderDot.mjs";import{LoaderOval as I}from"./components/data-display/loader-oval/LoaderOval.mjs";import{LogoImage as L}from"./components/data-display/logos/logo-image/LogoImage.mjs";import{LogoSvg as R}from"./components/data-display/logos/logo-svg/LogoSvg.mjs";import{NotificationBanner as z}from"./components/data-display/notification-banner/NotificationBanner.mjs";import{RemovableItem as B}from"./components/data-display/removable-item/RemovableItem.mjs";import{TagGroup as V}from"./components/data-display/tag-group/TagGroup.mjs";import{Tag as H}from"./components/data-display/tag/Tag.mjs";import{UploadedFile as U}from"./components/data-display/uploaded-file/UploadedFile.mjs";import{UploadedFileDetails as W}from"./components/data-display/uploaded-file/UploadedFileDetails.mjs";import{ButtonIcon as G}from"./components/buttons/button-icon/ButtonIcon.mjs";import{ButtonIconVisual as K}from"./components/buttons/button-icon-visual/ButtonIconVisual.mjs";import{ButtonVisual as q}from"./components/buttons/button-visual/ButtonVisual.mjs";import{DatePicker as J}from"./components/controls/date-picker/DatePicker.mjs";import{Autocomplete as Y}from"./components/controls/dropdown/autocomplete/Autocomplete.mjs";import{Combobox as X}from"./components/controls/dropdown/combobox/Combobox.mjs";import{Dropzone as Z}from"./components/controls/dropzone/Dropzone.mjs";import{DropzoneFiles as Q}from"./components/controls/dropzone-files/DropzoneFiles.mjs";import{FileInput as $}from"./components/controls/file-input/FileInput.mjs";import{FileInputMultiple as ee}from"./components/controls/file-input/FileInputMultiple.mjs";import{PasswordInput as te}from"./components/controls/password-input/PasswordInput.mjs";import{PasswordStrengthInput as ne}from"./components/controls/password-input/PasswordStrengthInput.mjs";import{usePasswordRules as re}from"./components/controls/password-input/usePasswordRules.mjs";import{Radio as ie}from"./components/controls/radio/Radio.mjs";import{
|
|
1
|
+
import{Button as e}from"./components/buttons/button/Button.mjs";import{VisuallyHidden as t}from"./components/misc/visually-hidden/VisuallyHidden.mjs";import{ButtonAction as n}from"./components/buttons/button-action/ButtonAction.mjs";import{ButtonLoader as r}from"./components/buttons/button-action/ButtonLoader.mjs";import{AssignedUser as i}from"./components/data-display/assigned-user/AssignedUser.mjs";import{Avatar as a}from"./components/data-display/avatar/Avatar.mjs";import{Badge as o}from"./components/data-display/badge/Badge.mjs";import{Calendar as s,momentLocalizer as c}from"./components/data-display/calendar/Calendar.mjs";import{Virtual as l}from"./components/misc/virtual/Virtual.mjs";import{ScrollArea as u}from"./components/misc/scroll-area/ScrollArea.mjs";import{Table as d}from"./components/data-display/table/Table.mjs";import{IconRaw as f}from"./components/data-display/icons/icon-raw/IconRaw.mjs";import{Icon as p}from"./components/data-display/icons/icon/Icon.mjs";import{DEFAULT_DATA_TABLE_LABELS as m,DataTableContextProvider as h,useDataTableContext as g}from"./components/data-display/datatables/useDataTableContext.mjs";import{Checkbox as _}from"./components/controls/checkbox/Checkbox.mjs";import{DataTable as v}from"./components/data-display/datatables/DataTable.mjs";import{HorizontalDivider as y}from"./components/misc/horizontal-divider/HorizontalDivider.mjs";import{ScrollAreaAutosize as b}from"./components/misc/scroll-area-autosize/ScrollAreaAutosize.mjs";import{TextInput as x}from"./components/controls/text-input/TextInput.mjs";import{IconWrapped as S}from"./components/data-display/icons/icon-wrapped/IconWrapped.mjs";import{Select as C}from"./components/controls/dropdown/select/Select.mjs";import{DataTablePageSize as w}from"./components/data-display/datatables/DataTablePageSize.mjs";import{Pagination as T}from"./components/navigations/pagination/Pagination.mjs";import{DataTablePagination as E}from"./components/data-display/datatables/DataTablePagination.mjs";import{DataTableBottomSlot as D}from"./components/data-display/datatables/DataTableBottomSlot.mjs";import{DataTableErrorState as O}from"./components/data-display/datatables/DataTableErrorState.mjs";import{DataTableTopSlot as k}from"./components/data-display/datatables/DataTableTopSlot.mjs";import{DescriptionList as A}from"./components/data-display/description-list/DescriptionList.mjs";import{IconSvg as j}from"./components/data-display/icons/icon-svg/IconSvg.mjs";import{Indicator as M}from"./components/data-display/indicator/Indicator.mjs";import{Kanban as N}from"./components/data-display/kanban/Kanban.mjs";import{KanbanCardBase as P}from"./components/data-display/kanban/KanbanCardBase.mjs";import{LoaderDot as F}from"./components/data-display/loader-dot/LoaderDot.mjs";import{LoaderOval as I}from"./components/data-display/loader-oval/LoaderOval.mjs";import{LogoImage as L}from"./components/data-display/logos/logo-image/LogoImage.mjs";import{LogoSvg as R}from"./components/data-display/logos/logo-svg/LogoSvg.mjs";import{NotificationBanner as z}from"./components/data-display/notification-banner/NotificationBanner.mjs";import{RemovableItem as B}from"./components/data-display/removable-item/RemovableItem.mjs";import{TagGroup as V}from"./components/data-display/tag-group/TagGroup.mjs";import{Tag as H}from"./components/data-display/tag/Tag.mjs";import{UploadedFile as U}from"./components/data-display/uploaded-file/UploadedFile.mjs";import{UploadedFileDetails as W}from"./components/data-display/uploaded-file/UploadedFileDetails.mjs";import{ButtonIcon as G}from"./components/buttons/button-icon/ButtonIcon.mjs";import{ButtonIconVisual as K}from"./components/buttons/button-icon-visual/ButtonIconVisual.mjs";import{ButtonVisual as q}from"./components/buttons/button-visual/ButtonVisual.mjs";import{DatePicker as J}from"./components/controls/date-picker/DatePicker.mjs";import{Autocomplete as Y}from"./components/controls/dropdown/autocomplete/Autocomplete.mjs";import{Combobox as X}from"./components/controls/dropdown/combobox/Combobox.mjs";import{Dropzone as Z}from"./components/controls/dropzone/Dropzone.mjs";import{DropzoneFiles as Q}from"./components/controls/dropzone-files/DropzoneFiles.mjs";import{FileInput as $}from"./components/controls/file-input/FileInput.mjs";import{FileInputMultiple as ee}from"./components/controls/file-input/FileInputMultiple.mjs";import{PasswordInput as te}from"./components/controls/password-input/PasswordInput.mjs";import{PasswordStrengthInput as ne}from"./components/controls/password-input/PasswordStrengthInput.mjs";import{usePasswordRules as re}from"./components/controls/password-input/usePasswordRules.mjs";import{Radio as ie}from"./components/controls/radio/Radio.mjs";import{SwitchGroup as ae}from"./components/controls/switch-group/SwitchGroup.mjs";import{Switch as oe}from"./components/controls/switch/Switch.mjs";import{Textarea as se}from"./components/controls/textarea/Textarea.mjs";import{PASSWORD_RULES as ce}from"./components/forms/rules/password-rules.mjs";import{z as le}from"./components/forms/rules/zod.mjs";import{Form as ue}from"./components/forms/Form.mjs";import{Card as de,CardBase as fe,CardBody as pe,CardFooter as me,CardHeader as he,CardRoot as ge}from"./components/layouts/card/Card.mjs";import{FluidGrid as _e}from"./components/layouts/fluid-grid/FluidGrid.mjs";import{Grid as ve}from"./components/layouts/grid/Grid.mjs";import{Breadcrumbs as ye}from"./components/navigations/breadcrumbs/Breadcrumbs.mjs";import{Menu as be}from"./components/navigations/menu/Menu.mjs";import{Modal as xe}from"./components/overlays/modal/Modal.mjs";import{Modals as Se}from"./components/overlays/modal/index.mjs";import{Toast as Ce}from"./components/overlays/toast/toast.mjs";import{Tooltip as we}from"./components/overlays/tooltip/Tooltip.mjs";import{Sidebar as Te}from"./components/navigations/sidebars/sidebar/Sidebar.mjs";import{MageUiProvider as Ee}from"./providers/MageUiProvider.mjs";export{i as AssignedUser,Y as Autocomplete,a as Avatar,o as Badge,ye as Breadcrumbs,e as Button,n as ButtonAction,G as ButtonIcon,K as ButtonIconVisual,r as ButtonLoader,q as ButtonVisual,s as Calendar,de as Card,fe as CardBase,pe as CardBody,me as CardFooter,he as CardHeader,ge as CardRoot,_ as Checkbox,X as Combobox,m as DEFAULT_DATA_TABLE_LABELS,v as DataTable,D as DataTableBottomSlot,h as DataTableContextProvider,O as DataTableErrorState,w as DataTablePageSize,E as DataTablePagination,k as DataTableTopSlot,J as DatePicker,A as DescriptionList,Z as Dropzone,Q as DropzoneFiles,$ as FileInput,ee as FileInputMultiple,_e as FluidGrid,ue as Form,ve as Grid,y as HorizontalDivider,p as Icon,f as IconRaw,j as IconSvg,S as IconWrapped,M as Indicator,N as Kanban,P as KanbanCardBase,F as LoaderDot,I as LoaderOval,L as LogoImage,R as LogoSvg,Ee as MageUiProvider,be as Menu,xe as Modal,Se as Modals,z as NotificationBanner,ce as PASSWORD_RULES,T as Pagination,te as PasswordInput,ne as PasswordStrengthInput,ie as Radio,B as RemovableItem,u as ScrollArea,b as ScrollAreaAutosize,C as Select,Te as Sidebar,oe as Switch,ae as SwitchGroup,d as Table,H as Tag,V as TagGroup,x as TextInput,se as Textarea,Ce as Toast,we as Tooltip,U as UploadedFile,W as UploadedFileDetails,l as Virtual,t as VisuallyHidden,c as momentLocalizer,g as useDataTableContext,re as usePasswordRules,le as z};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mage-ui/components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.81",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [],
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"rimraf": "^6.1.3",
|
|
26
26
|
"tsdown": "^0.20.3",
|
|
27
27
|
"typescript": "^5.9.3",
|
|
28
|
-
"@mage-ui/
|
|
29
|
-
"@mage-ui/
|
|
28
|
+
"@mage-ui/styled-system": "1.0.8",
|
|
29
|
+
"@mage-ui/preset": "1.0.81"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"@ebay/nice-modal-react": "^1.2.13",
|