@mage-ui/components 0.0.46 → 0.0.48
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/buttons/button/Button.d.ts +2 -4
- package/dist/components/buttons/button/Button.d.ts.map +1 -1
- package/dist/components/buttons/button/Button.js.map +1 -1
- package/dist/components/buttons/button-icon/ButtonIcon.d.ts +2 -4
- package/dist/components/buttons/button-icon/ButtonIcon.d.ts.map +1 -1
- package/dist/components/buttons/button-icon/ButtonIcon.js.map +1 -1
- package/dist/components/controls/checkbox/Checkbox.d.ts +0 -1
- package/dist/components/controls/checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/controls/checkbox/Checkbox.js.map +1 -1
- package/dist/components/controls/checkbox/CheckboxGroup.d.ts.map +1 -1
- package/dist/components/controls/checkbox/CheckboxGroup.js.map +1 -1
- package/dist/components/controls/date-picker/DatePicker.d.ts.map +1 -1
- package/dist/components/controls/date-picker/DatePicker.js.map +1 -1
- package/dist/components/controls/dropdown/Combobox.d.ts +2 -4
- package/dist/components/controls/dropdown/Combobox.d.ts.map +1 -1
- package/dist/components/controls/dropdown/Combobox.js +1 -1
- package/dist/components/controls/dropdown/Combobox.js.map +1 -1
- package/dist/components/controls/dropdown/DropdownBase.d.ts.map +1 -1
- package/dist/components/controls/dropdown/DropdownBase.js.map +1 -1
- package/dist/components/controls/dropdown/Menu.d.ts +4 -4
- package/dist/components/controls/dropdown/Menu.d.ts.map +1 -1
- package/dist/components/controls/dropdown/Menu.js +1 -1
- package/dist/components/controls/dropdown/Menu.js.map +1 -1
- package/dist/components/controls/dropdown/Select.d.ts +2 -4
- package/dist/components/controls/dropdown/Select.d.ts.map +1 -1
- package/dist/components/controls/dropdown/Select.js.map +1 -1
- package/dist/components/controls/input-file/InputFile.d.ts +2 -3
- package/dist/components/controls/input-file/InputFile.d.ts.map +1 -1
- package/dist/components/controls/input-file/InputFile.js.map +1 -1
- package/dist/components/controls/input-password/InputPassword.d.ts +2 -3
- package/dist/components/controls/input-password/InputPassword.d.ts.map +1 -1
- package/dist/components/controls/input-password/InputPassword.js.map +1 -1
- package/dist/components/controls/input-text/InputText.d.ts +2 -3
- package/dist/components/controls/input-text/InputText.d.ts.map +1 -1
- package/dist/components/controls/input-text/InputText.js.map +1 -1
- package/dist/components/controls/multi-switch/MultiSwitch.d.ts +0 -1
- package/dist/components/controls/multi-switch/MultiSwitch.d.ts.map +1 -1
- package/dist/components/controls/multi-switch/MultiSwitch.js.map +1 -1
- package/dist/components/controls/radio/Radio.d.ts +0 -1
- package/dist/components/controls/radio/Radio.d.ts.map +1 -1
- package/dist/components/controls/radio/Radio.js.map +1 -1
- package/dist/components/controls/radio/RadioGroup.d.ts.map +1 -1
- package/dist/components/controls/radio/RadioGroup.js.map +1 -1
- package/dist/components/controls/radio/RadioIcon.d.ts +0 -1
- package/dist/components/controls/radio/RadioIcon.d.ts.map +1 -1
- package/dist/components/controls/radio/RadioIcon.js.map +1 -1
- package/dist/components/controls/textarea/Textarea.d.ts +2 -4
- package/dist/components/controls/textarea/Textarea.d.ts.map +1 -1
- package/dist/components/controls/textarea/Textarea.js.map +1 -1
- package/dist/components/data-display/avatar/Avatar.d.ts +2 -4
- package/dist/components/data-display/avatar/Avatar.d.ts.map +1 -1
- package/dist/components/data-display/avatar/Avatar.js.map +1 -1
- package/dist/components/data-display/badge/Badge.d.ts +2 -4
- package/dist/components/data-display/badge/Badge.d.ts.map +1 -1
- package/dist/components/data-display/badge/Badge.js.map +1 -1
- package/dist/components/data-display/carousel/Carousel.d.ts +2 -3
- package/dist/components/data-display/carousel/Carousel.d.ts.map +1 -1
- package/dist/components/data-display/carousel/Carousel.js +1 -1
- package/dist/components/data-display/carousel/Carousel.js.map +1 -1
- package/dist/components/data-display/carousel/useEmbla.js.map +1 -1
- package/dist/components/data-display/icons/icon/Icon.d.ts +0 -2
- package/dist/components/data-display/icons/icon/Icon.d.ts.map +1 -1
- package/dist/components/data-display/icons/icon/Icon.js.map +1 -1
- package/dist/components/data-display/icons/icon-raw/IconRaw.d.ts +0 -2
- package/dist/components/data-display/icons/icon-raw/IconRaw.d.ts.map +1 -1
- package/dist/components/data-display/icons/icon-raw/IconRaw.js.map +1 -1
- package/dist/components/data-display/icons/icon-theme/IconTheme.d.ts +0 -2
- package/dist/components/data-display/icons/icon-theme/IconTheme.d.ts.map +1 -1
- package/dist/components/data-display/icons/icon-theme/IconTheme.js.map +1 -1
- package/dist/components/data-display/tables/table/Table.d.ts +8 -9
- package/dist/components/data-display/tables/table/Table.d.ts.map +1 -1
- package/dist/components/data-display/tables/table/Table.js.map +1 -1
- package/dist/components/data-display/tables/table/TableBody.js.map +1 -1
- package/dist/components/data-display/tables/table/TableCell.js.map +1 -1
- package/dist/components/data-display/tables/table/TableFooter.js.map +1 -1
- package/dist/components/data-display/tables/table/TableHead.js.map +1 -1
- package/dist/components/data-display/tables/table/TableHeader.js.map +1 -1
- package/dist/components/data-display/tables/table/TableRow.js.map +1 -1
- package/dist/components/data-display/tables/table/TableScroll.js.map +1 -1
- package/dist/components/forms/form/Form.d.ts +13 -15
- package/dist/components/forms/form/Form.d.ts.map +1 -1
- package/dist/components/forms/form/Form.js.map +1 -1
- package/dist/components/forms/form/controls/FormCheckbox.js +1 -1
- package/dist/components/forms/form/controls/FormCheckbox.js.map +1 -1
- package/dist/components/forms/form/controls/FormCheckboxGroup.d.ts.map +1 -1
- package/dist/components/forms/form/controls/FormCheckboxGroup.js +1 -1
- package/dist/components/forms/form/controls/FormCheckboxGroup.js.map +1 -1
- package/dist/components/forms/form/controls/FormCombobox.js +1 -1
- package/dist/components/forms/form/controls/FormCombobox.js.map +1 -1
- package/dist/components/forms/form/controls/FormDatePicker.js +1 -1
- package/dist/components/forms/form/controls/FormDatePicker.js.map +1 -1
- package/dist/components/forms/form/controls/FormIfField.d.ts.map +1 -1
- package/dist/components/forms/form/controls/FormIfField.js +1 -1
- package/dist/components/forms/form/controls/FormIfField.js.map +1 -1
- package/dist/components/forms/form/controls/FormInputFile.js +1 -1
- package/dist/components/forms/form/controls/FormInputFile.js.map +1 -1
- package/dist/components/forms/form/controls/FormInputPassword.js +1 -1
- package/dist/components/forms/form/controls/FormInputPassword.js.map +1 -1
- package/dist/components/forms/form/controls/FormInputText.js +1 -1
- package/dist/components/forms/form/controls/FormInputText.js.map +1 -1
- package/dist/components/forms/form/controls/FormRadio.js.map +1 -1
- package/dist/components/forms/form/controls/FormRadioGroup.d.ts.map +1 -1
- package/dist/components/forms/form/controls/FormRadioGroup.js +1 -1
- package/dist/components/forms/form/controls/FormRadioGroup.js.map +1 -1
- package/dist/components/forms/form/controls/FormSelect.js +1 -1
- package/dist/components/forms/form/controls/FormSelect.js.map +1 -1
- package/dist/components/forms/form/controls/FormTextarea.js +1 -1
- package/dist/components/forms/form/controls/FormTextarea.js.map +1 -1
- package/dist/components/misc/horizontal-divider/HorizontalDivider.d.ts +15 -0
- package/dist/components/misc/horizontal-divider/HorizontalDivider.d.ts.map +1 -0
- package/dist/components/misc/horizontal-divider/HorizontalDivider.js +2 -0
- package/dist/components/misc/horizontal-divider/HorizontalDivider.js.map +1 -0
- package/dist/components/misc/visually-hidden/VisuallyHidden.d.ts +2 -4
- package/dist/components/misc/visually-hidden/VisuallyHidden.d.ts.map +1 -1
- package/dist/components/misc/visually-hidden/VisuallyHidden.js.map +1 -1
- package/dist/components/navigation/breadcrumbs/Breadcrumbs.d.ts +2 -2
- package/dist/components/navigation/breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/components/navigation/breadcrumbs/Breadcrumbs.js.map +1 -1
- package/dist/components/navigation/tabs/Tabs.d.ts +5 -7
- package/dist/components/navigation/tabs/Tabs.d.ts.map +1 -1
- package/dist/components/navigation/tabs/Tabs.js.map +1 -1
- package/dist/components/navigation/tabs/TabsList.js.map +1 -1
- package/dist/components/navigation/tabs/TabsPanel.js.map +1 -1
- package/dist/components/navigation/tabs/TabsTab.d.ts.map +1 -1
- package/dist/components/navigation/tabs/TabsTab.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/panda.json +23 -19
- package/dist/providers/MageUiProvider.d.ts +0 -2
- package/dist/providers/MageUiProvider.d.ts.map +1 -1
- package/dist/providers/MageUiProvider.js.map +1 -1
- package/package.json +20 -20
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime6 from "react/jsx-runtime";
|
|
2
2
|
import { ComponentProps, ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/buttons/button/Button.d.ts
|
|
@@ -19,9 +19,7 @@ declare const Button: ({
|
|
|
19
19
|
endSlot,
|
|
20
20
|
children,
|
|
21
21
|
...props
|
|
22
|
-
}: ButtonProps) =>
|
|
23
|
-
//# sourceMappingURL=Button.d.ts.map
|
|
24
|
-
|
|
22
|
+
}: ButtonProps) => react_jsx_runtime6.JSX.Element;
|
|
25
23
|
//#endregion
|
|
26
24
|
export { Button, ButtonProps };
|
|
27
25
|
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","names":[],"sources":["../../../../src/components/buttons/button/Button.tsx"],"sourcesContent":[],"mappings":";;;;KAUY,WAAA,GAAc;;;IAAd,KAAA,CAAA,EAAA,MAAW;IAAA,KAAA,CAAA,EAAA,MAAA;IAAG,OAAA,CAAA,EAAA,MAAA
|
|
1
|
+
{"version":3,"file":"Button.d.ts","names":[],"sources":["../../../../src/components/buttons/button/Button.tsx"],"sourcesContent":[],"mappings":";;;;KAUY,WAAA,GAAc;;;IAAd,KAAA,CAAA,EAAA,MAAW;IAAA,KAAA,CAAA,EAAA,MAAA;IAAG,OAAA,CAAA,EAAA,MAAA;;WAQd,CAAA,EADE,SACF;SACC,CAAA,EADD,SACC;EAAS,QAAA,CAAA,EAAT,SAAS;AAGtB,CAAA;AAsBC,cAtBY,MAsBZ,EAAA,CAAA;EAAA,UAAA;EAAA,SAAA;EAAA,OAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAhBE,WAgBF,EAAA,GAhBa,kBAAA,CAAA,GAAA,CAAA,OAgBb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","names":["Button","MantineButton"],"sources":["../../../../src/components/buttons/button/Button.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\n\nimport {\n button,\n buttonInner,\n buttonLabel,\n buttonSection,\n} from '@mage-ui/styled-system/recipes';\nimport { Button as MantineButton } from '@mantine/core';\n\nexport type ButtonProps = ComponentProps<'button'> & {\n classNames?: {\n root?: string;\n inner?: string;\n label?: string;\n section?: string;\n };\n startSlot?: ReactNode;\n endSlot?: ReactNode;\n children?: ReactNode;\n};\n\nexport const Button = ({\n classNames,\n startSlot,\n endSlot,\n children,\n ...props\n}: ButtonProps) => {\n return (\n <MantineButton\n classNames={{\n root: classNames?.root ?? button(),\n inner: classNames?.inner ?? buttonInner(),\n label: classNames?.label ?? buttonLabel(),\n section: classNames?.section ?? buttonSection(),\n }}\n leftSection={startSlot}\n rightSection={endSlot}\n {...props}\n >\n {children}\n </MantineButton>\n );\n};\n"],"mappings":"4LAsBA,MAAaA,
|
|
1
|
+
{"version":3,"file":"Button.js","names":["Button","MantineButton"],"sources":["../../../../src/components/buttons/button/Button.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\n\nimport {\n button,\n buttonInner,\n buttonLabel,\n buttonSection,\n} from '@mage-ui/styled-system/recipes';\nimport { Button as MantineButton } from '@mantine/core';\n\nexport type ButtonProps = ComponentProps<'button'> & {\n classNames?: {\n root?: string;\n inner?: string;\n label?: string;\n section?: string;\n };\n startSlot?: ReactNode;\n endSlot?: ReactNode;\n children?: ReactNode;\n};\n\nexport const Button = ({\n classNames,\n startSlot,\n endSlot,\n children,\n ...props\n}: ButtonProps) => {\n return (\n <MantineButton\n classNames={{\n root: classNames?.root ?? button(),\n inner: classNames?.inner ?? buttonInner(),\n label: classNames?.label ?? buttonLabel(),\n section: classNames?.section ?? buttonSection(),\n }}\n leftSection={startSlot}\n rightSection={endSlot}\n {...props}\n >\n {children}\n </MantineButton>\n );\n};\n"],"mappings":"4LAsBA,MAAaA,GAAU,CACrB,aACA,YACA,UACA,WACA,GAAG,KAGD,EAACC,EAAAA,CACC,WAAY,CACV,KAAM,GAAY,MAAQ,GAAQ,CAClC,MAAO,GAAY,OAAS,GAAa,CACzC,MAAO,GAAY,OAAS,GAAa,CACzC,QAAS,GAAY,SAAW,GAAe,CAChD,CACD,YAAa,EACb,aAAc,EACd,GAAI,EAEH,YACa"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ButtonProps } from "../button/Button.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime5 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/buttons/button-icon/ButtonIcon.d.ts
|
|
5
5
|
type ButtonIconProps = ButtonProps & {
|
|
@@ -15,9 +15,7 @@ declare const ButtonIcon: ({
|
|
|
15
15
|
icon,
|
|
16
16
|
classNames,
|
|
17
17
|
...props
|
|
18
|
-
}: ButtonIconProps) =>
|
|
19
|
-
//# sourceMappingURL=ButtonIcon.d.ts.map
|
|
20
|
-
|
|
18
|
+
}: ButtonIconProps) => react_jsx_runtime5.JSX.Element;
|
|
21
19
|
//#endregion
|
|
22
20
|
export { ButtonIcon, ButtonIconProps };
|
|
23
21
|
//# sourceMappingURL=ButtonIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonIcon.d.ts","names":[],"sources":["../../../../src/components/buttons/button-icon/ButtonIcon.tsx"],"sourcesContent":[],"mappings":";;;;KAMY,eAAA,GAAkB;;;EAAlB,UAAA,CAAA,EAAA;IASC,IAAA,CAAA,EAAA,MAkBZ;IAAA,IAAA,CAAA,EAAA,MAAA
|
|
1
|
+
{"version":3,"file":"ButtonIcon.d.ts","names":[],"sources":["../../../../src/components/buttons/button-icon/ButtonIcon.tsx"],"sourcesContent":[],"mappings":";;;;KAMY,eAAA,GAAkB;;;EAAlB,UAAA,CAAA,EAAA;IASC,IAAA,CAAA,EAAA,MAkBZ;IAAA,IAAA,CAAA,EAAA,MAAA;;;AAlB0B,cAAd,UAAc,EAAA,CAAA;EAAA,KAAA;EAAA,IAAA;EAAA,UAAA;EAAA,GAAA;AAAA,CAAA,EAKxB,eALwB,EAAA,GAKT,kBAAA,CAAA,GAAA,CAAA,OALS"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonIcon.js","names":["icon"],"sources":["../../../../src/components/buttons/button-icon/ButtonIcon.tsx"],"sourcesContent":["import { buttonIcon, buttonIconIcon } from '@mage-ui/styled-system/recipes';\nimport { ActionIcon } from '@mantine/core';\nimport type { ButtonProps } from '@/components/buttons';\nimport { IconRaw } from '@/components/data-display';\nimport { VisuallyHidden } from '@/components/misc';\n\nexport type ButtonIconProps = ButtonProps & {\n label: string;\n icon: string;\n classNames?: {\n root?: string;\n icon?: string;\n };\n};\n\nexport const ButtonIcon = ({\n label,\n icon,\n classNames,\n ...props\n}: ButtonIconProps) => {\n return (\n <ActionIcon\n classNames={{\n root: classNames?.root ?? buttonIcon(),\n icon: classNames?.icon ?? buttonIconIcon(),\n }}\n {...props}\n >\n <IconRaw name={icon} />\n <VisuallyHidden>{label}</VisuallyHidden>\n </ActionIcon>\n );\n};\n"],"mappings":"kUAeA,MAAa,
|
|
1
|
+
{"version":3,"file":"ButtonIcon.js","names":["icon","VisuallyHidden"],"sources":["../../../../src/components/buttons/button-icon/ButtonIcon.tsx"],"sourcesContent":["import { buttonIcon, buttonIconIcon } from '@mage-ui/styled-system/recipes';\nimport { ActionIcon } from '@mantine/core';\nimport type { ButtonProps } from '@/components/buttons';\nimport { IconRaw } from '@/components/data-display';\nimport { VisuallyHidden } from '@/components/misc';\n\nexport type ButtonIconProps = ButtonProps & {\n label: string;\n icon: string;\n classNames?: {\n root?: string;\n icon?: string;\n };\n};\n\nexport const ButtonIcon = ({\n label,\n icon,\n classNames,\n ...props\n}: ButtonIconProps) => {\n return (\n <ActionIcon\n classNames={{\n root: classNames?.root ?? buttonIcon(),\n icon: classNames?.icon ?? buttonIconIcon(),\n }}\n {...props}\n >\n <IconRaw name={icon} />\n <VisuallyHidden>{label}</VisuallyHidden>\n </ActionIcon>\n );\n};\n"],"mappings":"kUAeA,MAAa,GAAc,CACzB,QACA,KAAA,EACA,aACA,GAAG,KAGD,EAAC,EAAA,CACC,WAAY,CACV,KAAM,GAAY,MAAQ,GAAY,CACtC,KAAM,GAAY,MAAQ,GAAgB,CAC3C,CACD,GAAI,YAEJ,EAAC,EAAA,CAAQ,KAAMA,EAAAA,CAAQ,CACvB,EAACC,EAAAA,CAAAA,SAAgB,EAAA,CAAuB,CAAA,EAC7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","names":[],"sources":["../../../../src/components/controls/checkbox/Checkbox.tsx"],"sourcesContent":[],"mappings":";;;KAeY,aAAA,GAAgB,KAAK;UACvB;EADE,WAAA,CAAA,EAEI,SAFS;EAAA,KAAA,CAAA,EAAA,MAAA;
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","names":[],"sources":["../../../../src/components/controls/checkbox/Checkbox.tsx"],"sourcesContent":[],"mappings":";;;KAeY,aAAA,GAAgB,KAAK;UACvB;EADE,WAAA,CAAA,EAEI,SAFS;EAAA,KAAA,CAAA,EAAA,MAAA;MAAQ,CAAA,EAAA,MAAA;SAAL,CAAA,EAAA,OAAA;OAClB,CAAA,EAKA,SALA;UACM,CAAA,EAAA,OAAA;YAIN,CAAA,EAAA;IAAS,YAAA,CAAA,EAAA,MAAA;IAcN,mBAoBZ,CAAA,EAAA,MAAA;IAAA,aAAA,CAAA,EAAA,MAAA;;IAjBE,aAAA,CAAA,EAAA,MAAA;IAAgB,aAAA,CAAA,EAAA,MAAA;IAAS,aAAA,CAAA,EAAA,MAAA;;;;cAHf;;;;KAGV,gBAAgB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","names":["Checkbox","CheckboxMantine"],"sources":["../../../../src/components/controls/checkbox/Checkbox.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n checkboxBody,\n checkboxDescription,\n checkboxError,\n checkboxIcon,\n checkboxInner,\n checkboxInput,\n checkboxLabel,\n checkboxLabelWrapper,\n} from '@mage-ui/styled-system/recipes';\nimport { Checkbox as CheckboxMantine } from '@mantine/core';\n\nexport type CheckboxProps = Omit<ComponentProps<'input'>, 'size'> & {\n error?: ReactNode;\n description?: ReactNode;\n value?: string;\n name?: string;\n checked?: boolean;\n label?: ReactNode;\n disabled?: boolean;\n classNames?: {\n checkboxBody?: string;\n checkboxDescription?: string;\n checkboxError?: string;\n checkboxIcon?: string;\n checkboxInner?: string;\n checkboxInput?: string;\n checkboxLabel?: string;\n checkboxLabelWrapper?: string;\n };\n};\n\nexport const Checkbox = ({\n classNames,\n ...props\n}: CheckboxProps): ReactNode => {\n return (\n <CheckboxMantine\n classNames={{\n body: classNames?.checkboxBody ?? checkboxBody(),\n labelWrapper:\n classNames?.checkboxLabelWrapper ?? checkboxLabelWrapper(),\n label: classNames?.checkboxLabel ?? checkboxLabel(),\n description: classNames?.checkboxDescription ?? checkboxDescription(),\n error: classNames?.checkboxError ?? checkboxError(),\n input: cx(classNames?.checkboxInput ?? checkboxInput(), 'peer'),\n inner: classNames?.checkboxInner ?? checkboxInner(),\n icon: classNames?.checkboxIcon ?? checkboxIcon(),\n }}\n {...props}\n />\n );\n};\n\nCheckbox.displayName = 'Checkbox';\n"],"mappings":"gVAmCA,MAAaA,
|
|
1
|
+
{"version":3,"file":"Checkbox.js","names":["Checkbox","CheckboxMantine"],"sources":["../../../../src/components/controls/checkbox/Checkbox.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n checkboxBody,\n checkboxDescription,\n checkboxError,\n checkboxIcon,\n checkboxInner,\n checkboxInput,\n checkboxLabel,\n checkboxLabelWrapper,\n} from '@mage-ui/styled-system/recipes';\nimport { Checkbox as CheckboxMantine } from '@mantine/core';\n\nexport type CheckboxProps = Omit<ComponentProps<'input'>, 'size'> & {\n error?: ReactNode;\n description?: ReactNode;\n value?: string;\n name?: string;\n checked?: boolean;\n label?: ReactNode;\n disabled?: boolean;\n classNames?: {\n checkboxBody?: string;\n checkboxDescription?: string;\n checkboxError?: string;\n checkboxIcon?: string;\n checkboxInner?: string;\n checkboxInput?: string;\n checkboxLabel?: string;\n checkboxLabelWrapper?: string;\n };\n};\n\nexport const Checkbox = ({\n classNames,\n ...props\n}: CheckboxProps): ReactNode => {\n return (\n <CheckboxMantine\n classNames={{\n body: classNames?.checkboxBody ?? checkboxBody(),\n labelWrapper:\n classNames?.checkboxLabelWrapper ?? checkboxLabelWrapper(),\n label: classNames?.checkboxLabel ?? checkboxLabel(),\n description: classNames?.checkboxDescription ?? checkboxDescription(),\n error: classNames?.checkboxError ?? checkboxError(),\n input: cx(classNames?.checkboxInput ?? checkboxInput(), 'peer'),\n inner: classNames?.checkboxInner ?? checkboxInner(),\n icon: classNames?.checkboxIcon ?? checkboxIcon(),\n }}\n {...props}\n />\n );\n};\n\nCheckbox.displayName = 'Checkbox';\n"],"mappings":"gVAmCA,MAAaA,GAAY,CACvB,aACA,GAAG,KAGD,EAACC,EAAAA,CACC,WAAY,CACV,KAAM,GAAY,cAAgB,GAAc,CAChD,aACE,GAAY,sBAAwB,GAAsB,CAC5D,MAAO,GAAY,eAAiB,GAAe,CACnD,YAAa,GAAY,qBAAuB,GAAqB,CACrE,MAAO,GAAY,eAAiB,GAAe,CACnD,MAAO,EAAG,GAAY,eAAiB,GAAe,CAAE,OAAO,CAC/D,MAAO,GAAY,eAAiB,GAAe,CACnD,KAAM,GAAY,cAAgB,GAAc,CACjD,CACD,GAAI,GACJ,CAIN,EAAS,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxGroup.d.ts","names":[],"sources":["../../../../src/components/controls/checkbox/CheckboxGroup.tsx"],"sourcesContent":[],"mappings":";;;KAcY,kBAAA;UACF;EADE,KAAA,CAAA,EAEF,SAFE;EAAkB,WAAA,CAAA,EAGd,SAHc;
|
|
1
|
+
{"version":3,"file":"CheckboxGroup.d.ts","names":[],"sources":["../../../../src/components/controls/checkbox/CheckboxGroup.tsx"],"sourcesContent":[],"mappings":";;;KAcY,kBAAA;UACF;EADE,KAAA,CAAA,EAEF,SAFE;EAAkB,WAAA,CAAA,EAGd,SAHc;UACpB,CAAA,EAGG,SAHH;OACA,CAAA,EAAA,MAAA,EAAA;MACM,CAAA,EAAA,MAAA;UACH,CAAA,EAAA,CAAA,KAAA,EAAA,MAAA,EAAA,EAAA,GAAA,IAAA;EAAS,UAAA,CAAA,EAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxGroup.js","names":["MantineCheckbox","MantineGroup"],"sources":["../../../../src/components/controls/checkbox/CheckboxGroup.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport {\n checkboxDescription,\n checkboxError,\n checkboxGroupRoot,\n checkboxLabel,\n checkboxRoot,\n} from '@mage-ui/styled-system/recipes';\nimport {\n Checkbox as MantineCheckbox,\n Group as MantineGroup,\n} from '@mantine/core';\n\nexport type CheckboxGroupProps = {\n label?: ReactNode;\n error?: ReactNode;\n description?: ReactNode;\n children?: ReactNode;\n value?: string[];\n name?: string;\n onChange?: (value: string[]) => void;\n classNames?: {\n root?: string;\n radio?: string;\n icon?: string;\n inner?: string;\n body?: string;\n labelWrapper?: string;\n label?: string;\n description?: string;\n error?: string;\n groupRoot?: string;\n };\n};\n\nexport const CheckboxGroup = ({\n classNames,\n children,\n ...props\n}: CheckboxGroupProps): ReactNode => {\n return (\n <MantineCheckbox.Group\n classNames={{\n root: classNames?.root ?? checkboxRoot(),\n label: classNames?.label ?? checkboxLabel(),\n description: classNames?.description ?? checkboxDescription(),\n error: classNames?.error ?? checkboxError(),\n }}\n {...props}\n >\n <MantineGroup\n classNames={{\n root: classNames?.groupRoot ?? checkboxGroupRoot(),\n }}\n >\n {children}\n </MantineGroup>\n </MantineCheckbox.Group>\n );\n};\n\nCheckboxGroup.displayName = 'Checkbox.Group';\n"],"mappings":"gPAoCA,MAAa,
|
|
1
|
+
{"version":3,"file":"CheckboxGroup.js","names":["MantineCheckbox","MantineGroup"],"sources":["../../../../src/components/controls/checkbox/CheckboxGroup.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport {\n checkboxDescription,\n checkboxError,\n checkboxGroupRoot,\n checkboxLabel,\n checkboxRoot,\n} from '@mage-ui/styled-system/recipes';\nimport {\n Checkbox as MantineCheckbox,\n Group as MantineGroup,\n} from '@mantine/core';\n\nexport type CheckboxGroupProps = {\n label?: ReactNode;\n error?: ReactNode;\n description?: ReactNode;\n children?: ReactNode;\n value?: string[];\n name?: string;\n onChange?: (value: string[]) => void;\n classNames?: {\n root?: string;\n radio?: string;\n icon?: string;\n inner?: string;\n body?: string;\n labelWrapper?: string;\n label?: string;\n description?: string;\n error?: string;\n groupRoot?: string;\n };\n};\n\nexport const CheckboxGroup = ({\n classNames,\n children,\n ...props\n}: CheckboxGroupProps): ReactNode => {\n return (\n <MantineCheckbox.Group\n classNames={{\n root: classNames?.root ?? checkboxRoot(),\n label: classNames?.label ?? checkboxLabel(),\n description: classNames?.description ?? checkboxDescription(),\n error: classNames?.error ?? checkboxError(),\n }}\n {...props}\n >\n <MantineGroup\n classNames={{\n root: classNames?.groupRoot ?? checkboxGroupRoot(),\n }}\n >\n {children}\n </MantineGroup>\n </MantineCheckbox.Group>\n );\n};\n\nCheckboxGroup.displayName = 'Checkbox.Group';\n"],"mappings":"gPAoCA,MAAa,GAAiB,CAC5B,aACA,WACA,GAAG,KAGD,EAACA,EAAgB,MAAA,CACf,WAAY,CACV,KAAM,GAAY,MAAQ,GAAc,CACxC,MAAO,GAAY,OAAS,GAAe,CAC3C,YAAa,GAAY,aAAe,GAAqB,CAC7D,MAAO,GAAY,OAAS,GAAe,CAC5C,CACD,GAAI,WAEJ,EAACC,EAAAA,CACC,WAAY,CACV,KAAM,GAAY,WAAa,GAAmB,CACnD,CAEA,YACY,EACO,CAI5B,EAAc,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.d.ts","names":[],"sources":["../../../../src/components/controls/date-picker/DatePicker.tsx"],"sourcesContent":[],"mappings":";;;;KAkCY,eAAA;;EAAA,KAAA,CAAA,EAAA,MAAA;EAAe,WAAA,CAAA,EAAA,MAAA;
|
|
1
|
+
{"version":3,"file":"DatePicker.d.ts","names":[],"sources":["../../../../src/components/controls/date-picker/DatePicker.tsx"],"sourcesContent":[],"mappings":";;;;KAkCY,eAAA;;EAAA,KAAA,CAAA,EAAA,MAAA;EAAe,WAAA,CAAA,EAAA,MAAA;aAKZ,CAAA,EAAA,MAAA;MAEA,CAAA,EAFN,KAAA,CAAM,SAEA;OACL,CAAA,EAAA,MAAA;YACU,CAAA,EAFL,oBAEK;EAAI,KAAA,CAAA,EADd,eACc;EAGX,QAAA,CAAA,EAAA,CAAA,IAqBZ,EAxBmB,IAwBnB,GAAA,MAAA,GAAA,IAAA,EAAA,GAAA,IAAA;CAAA;AArB0B,cAAd,UAAc,EAAA,CAAA;EAAA,UAAA;EAAA,KAAA;EAAA,WAAA;EAAA,WAAA;EAAA,IAAA;EAAA,GAAA;AAAA,CAAA,EAOxB,eAPwB,EAAA,GAON,SAPM;KAuBtB,oBAAA,GAAuB,mBAvBD,GAwBzB,4BAxByB,GAyBzB,2BAzByB,GA0BzB,gCA1ByB,GA2BzB,+BA3ByB,GA4BzB,qBA5ByB;KA8BtB,mBAAA,GA9BsB;MAAA,CAAA,EAAA,MAAA;SAAA,CAAA,EAAA,MAAA;OAOxB,CAAA,EAAA,MAAA;OAAkB,CAAA,EAAA,MAAA;EAcpB,KAAA,CAAA,EAAA,MAAA;EAEI,WAAA,CAAA,EAAA,MAAA;EAAoB,WAAA,CAAA,EAAA,MAAA;SAAG,CAAA,EAAA,MAAA;;KA+BvB,4BAAA,GA7BH;oBACA,CAAA,EAAA,MAAA;uBACA,CAAA,EAAA,MAAA;gBACA,CAAA,EAAA,MAAA;EAAqB,mBAAA,CAAA,EAAA,MAAA;EAElB,yBAAmB,CAAA,EAAA,MAAA;AAAA,CAAA;AAwBS,KAsB5B,2BAAA,GAA2B;EAmB3B,aAAA,CAAA,EAAA,MAAA;EAoBA,mBAAA,CAAA,EAAA,MAAA;EAmBA,eAAA,CAAA,EAAA,MAAqB;;;;;KAvCrB,gCAAA;;;;;;KAoBA,+BAAA;;;;;;KAmBA,qBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.js","names":["icon"
|
|
1
|
+
{"version":3,"file":"DatePicker.js","names":["icon"],"sources":["../../../../src/components/controls/date-picker/DatePicker.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n calendarControl,\n calendarDay,\n calendarHeader,\n calendarHeaderControlIcon,\n calendarHeaderLevel,\n calendarMonth,\n calendarMonthRow,\n calendarMonthsList,\n calendarMonthsListCell,\n calendarMonthsListControl,\n calendarMonthsListRow,\n calendarWeekDay,\n calendarWeekDaysRow,\n calendarYearsList,\n calendarYearsListCell,\n calendarYearsListControl,\n calendarYearsListRow,\n datepickerDropdown,\n datepickerInput,\n input,\n inputDescription,\n inputError,\n inputLabel,\n inputPlaceholder,\n inputRoot,\n inputSection,\n inputWrapper,\n} from '@mage-ui/styled-system/recipes';\nimport { DatePickerInput, type DatePickerValue } from '@mantine/dates';\n\nexport type DatePickerProps = {\n name?: string;\n label?: string;\n placeholder?: string;\n description?: string;\n icon?: React.ReactNode;\n error?: string;\n classNames?: DatePickerClassNames;\n value?: DatePickerValue;\n onChange?: (date: Date | string | null) => void;\n};\n\nexport const DatePicker = ({\n classNames,\n label,\n placeholder,\n description,\n icon,\n ...props\n}: DatePickerProps): ReactNode => {\n return (\n <DatePickerInput\n label={label ?? 'Pick date'}\n placeholder={placeholder ?? 'Pick date'}\n description={description ?? 'Select a date'}\n classNames={datePickerClassNames(classNames)}\n popoverProps={{\n classNames: popoverClassNames(classNames),\n }}\n rightSection={icon}\n {...props}\n />\n );\n};\n\ntype DatePickerClassNames = InputClassNamesType &\n CalenderHeaderClassNamesType &\n CalendarMonthClassNamesType &\n CalendarMonthsListClassNamesType &\n CalendarYearsListClassNamesType &\n PopoverClassNamesType;\n\ntype InputClassNamesType = {\n root?: string;\n wrapper?: string;\n input?: string;\n label?: string;\n error?: string;\n description?: string;\n placeholder?: string;\n section?: string;\n};\n\nconst inputClassNames = (classNames?: InputClassNamesType) => {\n return {\n root: classNames?.root ?? inputRoot(),\n wrapper: classNames?.wrapper ?? inputWrapper(),\n input: classNames?.input ?? cx(input(), datepickerInput()),\n label: classNames?.label ?? inputLabel(),\n error: classNames?.error ?? inputError(),\n description: classNames?.description ?? inputDescription(),\n placeholder: classNames?.placeholder ?? inputPlaceholder(),\n section: classNames?.section ?? inputSection({ pointerEvents: 'none' }),\n };\n};\n\ntype CalenderHeaderClassNamesType = {\n datepickerDropdown?: string;\n calendarHeaderControl?: string;\n calendarHeader?: string;\n calendarHeaderLevel?: string;\n calendarHeaderControlIcon?: string;\n};\n\nconst calendarHeaderClassNames = (\n classNames?: CalenderHeaderClassNamesType,\n) => {\n return {\n calendarHeaderControl:\n classNames?.calendarHeaderControl ?? calendarControl(),\n calendarHeader: classNames?.calendarHeader ?? calendarHeader(),\n calendarHeaderLevel:\n classNames?.calendarHeaderLevel ?? calendarHeaderLevel(),\n calendarHeaderControlIcon:\n classNames?.calendarHeaderControlIcon ?? calendarHeaderControlIcon(),\n };\n};\n\ntype CalendarMonthClassNamesType = {\n calendarMonth?: string;\n calendarWeekDaysRow?: string;\n calendarWeekDay?: string;\n calendarMonthRow?: string;\n calendarMonthCell?: string;\n calendarDay?: string;\n};\n\nconst calendarMonthClassNames = (classNames?: CalendarMonthClassNamesType) => {\n return {\n month: classNames?.calendarMonth ?? calendarMonth(),\n weekdaysRow: classNames?.calendarWeekDaysRow ?? calendarWeekDaysRow(),\n weekday: classNames?.calendarWeekDay ?? calendarWeekDay(),\n monthRow: classNames?.calendarMonthRow ?? calendarMonthRow(),\n day: classNames?.calendarDay ?? calendarDay(),\n };\n};\n\ntype CalendarMonthsListClassNamesType = {\n calendarMonthsList?: string;\n calendarMonthsListRow?: string;\n calendarMonthsListCell?: string;\n calendarMonthsListControl?: string;\n};\n\nconst calendarMonthsListClassNames = (\n classNames?: CalendarMonthsListClassNamesType,\n) => {\n return {\n monthsList: classNames?.calendarMonthsList ?? calendarMonthsList(),\n monthsListRow: classNames?.calendarMonthsListRow ?? calendarMonthsListRow(),\n monthsListCell:\n classNames?.calendarMonthsListCell ?? calendarMonthsListCell(),\n monthsListControl:\n classNames?.calendarMonthsListControl ?? calendarMonthsListControl(),\n };\n};\n\ntype CalendarYearsListClassNamesType = {\n calendarYearsList?: string;\n calendarYearsListRow?: string;\n calendarYearsListCell?: string;\n calendarYearsListControl?: string;\n};\n\nconst calendarYearsListClassNames = (\n classNames?: CalendarYearsListClassNamesType,\n) => {\n return {\n yearsList: classNames?.calendarYearsList ?? calendarYearsList(),\n yearsListRow: classNames?.calendarYearsListRow ?? calendarYearsListRow(),\n yearsListCell: classNames?.calendarYearsListCell ?? calendarYearsListCell(),\n yearsListControl:\n classNames?.calendarYearsListControl ?? calendarYearsListControl(),\n };\n};\n\ntype PopoverClassNamesType = {\n datepickerDropdown?: string;\n};\n\nconst popoverClassNames = (classNames?: PopoverClassNamesType) => {\n return {\n dropdown: classNames?.datepickerDropdown ?? datepickerDropdown(),\n };\n};\n\nconst datePickerClassNames = (classNames?: DatePickerClassNames) => {\n return {\n ...inputClassNames(classNames),\n ...calendarHeaderClassNames(classNames),\n ...calendarMonthClassNames(classNames),\n ...calendarMonthsListClassNames(classNames),\n ...calendarYearsListClassNames(classNames),\n };\n};\n"],"mappings":"6wBA8CA,MAAa,GAAc,CACzB,aACA,QACA,cACA,cACA,KAAA,EACA,GAAG,KAGD,EAAC,EAAA,CACC,MAAO,GAAS,YAChB,YAAa,GAAe,YAC5B,YAAa,GAAe,gBAC5B,WAAY,EAAqB,EAAW,CAC5C,aAAc,CACZ,WAAY,EAAkB,EAAW,CAC1C,CACD,aAAcA,EACd,GAAI,GACJ,CAsBA,EAAmB,IAChB,CACL,KAAM,GAAY,MAAQ,GAAW,CACrC,QAAS,GAAY,SAAW,GAAc,CAC9C,MAAO,GAAY,OAAS,EAAG,GAAO,CAAE,GAAiB,CAAC,CAC1D,MAAO,GAAY,OAAS,GAAY,CACxC,MAAO,GAAY,OAAS,GAAY,CACxC,YAAa,GAAY,aAAe,GAAkB,CAC1D,YAAa,GAAY,aAAe,GAAkB,CAC1D,QAAS,GAAY,SAAW,EAAa,CAAE,cAAe,OAAQ,CAAC,CACxE,EAWG,EACJ,IAEO,CACL,sBACE,GAAY,uBAAyB,GAAiB,CACxD,eAAgB,GAAY,gBAAkB,GAAgB,CAC9D,oBACE,GAAY,qBAAuB,GAAqB,CAC1D,0BACE,GAAY,2BAA6B,GAA2B,CACvE,EAYG,EAA2B,IACxB,CACL,MAAO,GAAY,eAAiB,GAAe,CACnD,YAAa,GAAY,qBAAuB,GAAqB,CACrE,QAAS,GAAY,iBAAmB,GAAiB,CACzD,SAAU,GAAY,kBAAoB,GAAkB,CAC5D,IAAK,GAAY,aAAe,GAAa,CAC9C,EAUG,EACJ,IAEO,CACL,WAAY,GAAY,oBAAsB,GAAoB,CAClE,cAAe,GAAY,uBAAyB,GAAuB,CAC3E,eACE,GAAY,wBAA0B,GAAwB,CAChE,kBACE,GAAY,2BAA6B,GAA2B,CACvE,EAUG,EACJ,IAEO,CACL,UAAW,GAAY,mBAAqB,GAAmB,CAC/D,aAAc,GAAY,sBAAwB,GAAsB,CACxE,cAAe,GAAY,uBAAyB,GAAuB,CAC3E,iBACE,GAAY,0BAA4B,GAA0B,CACrE,EAOG,EAAqB,IAClB,CACL,SAAU,GAAY,oBAAsB,GAAoB,CACjE,EAGG,EAAwB,IACrB,CACL,GAAG,EAAgB,EAAW,CAC9B,GAAG,EAAyB,EAAW,CACvC,GAAG,EAAwB,EAAW,CACtC,GAAG,EAA6B,EAAW,CAC3C,GAAG,EAA4B,EAAW,CAC3C"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DropdownBaseProps } from "./DropdownBase.js";
|
|
2
2
|
import { InputTextProps } from "../input-text/InputText.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime8 from "react/jsx-runtime";
|
|
4
4
|
import React from "react";
|
|
5
5
|
|
|
6
6
|
//#region src/components/controls/dropdown/Combobox.d.ts
|
|
@@ -34,9 +34,7 @@ declare const Combobox: ({
|
|
|
34
34
|
create,
|
|
35
35
|
empty,
|
|
36
36
|
...props
|
|
37
|
-
}: ComboboxProps) =>
|
|
38
|
-
//# sourceMappingURL=Combobox.d.ts.map
|
|
39
|
-
|
|
37
|
+
}: ComboboxProps) => react_jsx_runtime8.JSX.Element;
|
|
40
38
|
//#endregion
|
|
41
39
|
export { Combobox, ComboboxProps };
|
|
42
40
|
//# sourceMappingURL=Combobox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Combobox.d.ts","names":[],"sources":["../../../../src/components/controls/dropdown/Combobox.tsx"],"sourcesContent":[],"mappings":";;;;;;KAgBY,aAAA,GAAgB,KAC1B,qEAGA;;;IAJU,KAAA,EAAA,MAAa;EAAA,CAAA,GAAA,SAAA,EAAA,GAAA,IAAA;
|
|
1
|
+
{"version":3,"file":"Combobox.d.ts","names":[],"sources":["../../../../src/components/controls/dropdown/Combobox.tsx"],"sourcesContent":[],"mappings":";;;;;;KAgBY,aAAA,GAAgB,KAC1B,qEAGA;;;IAJU,KAAA,EAAA,MAAa;EAAA,CAAA,GAAA,SAAA,EAAA,GAAA,IAAA;SACvB,EAAA;IAD0B,EAAA,EAAA,MAAA,GAAA,MAAA;IAI1B,KAAA,EAAA,MAAA;KAaY;EAAe,SAAA,CAAA,EAAA,OAAA;EAGhB,UAAA,CAoFZ,EAAA;IAAA,MAAA,CAAA,EAAA,MAAA;IApFwB,KAAA,CAAA,EAAA,MAAA;IAAA,MAAA,CAAA,EAAA,MAAA;;QAAA,CAAA,EAAA,MAAA;OAAA,CAAA,EAAA,MAAA;SAAA,CAAA,EAHX,KAAA,CAAM,SAGK;;AAAA,cAAZ,QAAY,EAAA,CAAA;EAAA,aAAA;EAAA,SAAA;EAAA,iBAAA;EAAA,cAAA;EAAA,OAAA;EAAA,OAAA;EAAA,UAAA;EAAA,MAAA;EAAA,KAAA;EAAA,GAAA;AAAA,CAAA,EAWtB,aAXsB,EAAA,GAWT,kBAAA,CAAA,GAAA,CAAA,OAXS"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Icon as e}from"../../data-display/icons/icon/Icon.js";import{DropdownBase as t}from"./DropdownBase.js";import{InputText as n}from"../input-text/InputText.js";import{comboboxEmpty as r,comboboxOption as i,icon as a,inputSection as o,selectSection as s}from"@mage-ui/styled-system/recipes";import{jsx as c,jsxs as l}from"react/jsx-runtime";import{useState as u}from"react";import{cx as d}from"@mage-ui/styled-system/css";const f=({defaultOpened:f=!1,creatable:p,setSelectedOption:m,selectedOption:h,endSlot:g,options:_,classNames:v,create:y,empty:b,...x})=>{let[S,C]=u(h?.value??``),w=_.every(e=>e.value!==S)
|
|
1
|
+
import{Icon as e}from"../../data-display/icons/icon/Icon.js";import{DropdownBase as t}from"./DropdownBase.js";import{InputText as n}from"../input-text/InputText.js";import{comboboxEmpty as r,comboboxOption as i,icon as a,inputSection as o,selectSection as s}from"@mage-ui/styled-system/recipes";import{jsx as c,jsxs as l}from"react/jsx-runtime";import{useState as u}from"react";import{cx as d}from"@mage-ui/styled-system/css";const f=({defaultOpened:f=!1,creatable:p,setSelectedOption:m,selectedOption:h,endSlot:g,options:_,classNames:v,create:y,empty:b,...x})=>{let[S,C]=u(h?.value??``),w=(_.every(e=>e.value!==S)?_.filter(e=>e.value.toLowerCase().includes(S.toLowerCase().trim())):_).map(e=>c(t.Option,{value:e.value,active:h?.id===e.id,classNames:{option:v?.option??i()},children:e.value},e.id)),T=()=>p&&S?l(t.Option,{value:S,classNames:{option:v?.create??i({type:`create`})},children:[c(e,{name:`plus`,classNames:a({size:`m`})}),`${y??`Create`} '${S}'`]},S):c(t.Empty,{classNames:{empty:v?.empty??r()},children:b??`Nothing found`}),E=e=>{let t=_.find(t=>t.value===e);!t&&p&&e&&(t={id:`new`,value:e}),m(t)};return c(t,{readOnly:!1,target:c(n,{value:S,classNames:{section:v?.section??d(o(),s())},...x}),selectedOption:h,setQuery:C,setSelectedOption:e=>E(e),endSlot:g,children:w.length>0?w:c(T,{})})};export{f as Combobox};
|
|
2
2
|
//# sourceMappingURL=Combobox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Combobox.js","names":[
|
|
1
|
+
{"version":3,"file":"Combobox.js","names":[],"sources":["../../../../src/components/controls/dropdown/Combobox.tsx"],"sourcesContent":["import type React from 'react';\nimport { useState } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n comboboxEmpty,\n comboboxOption,\n icon,\n inputSection,\n selectSection,\n} from '@mage-ui/styled-system/recipes';\nimport { InputText, type InputTextProps } from '@/components/controls';\nimport { Icon } from '@/components/data-display';\n\nimport { DropdownBase, type DropdownBaseProps } from './DropdownBase';\n\nexport type ComboboxProps = Omit<\n DropdownBaseProps,\n 'children' | 'onClick' | 'setQuery' | 'target'\n> &\n InputTextProps & {\n setSelectedOption: (\n option: { id: string | number; value: string } | undefined,\n ) => void;\n options: { id: string | number; value: string }[];\n creatable?: boolean;\n classNames?: {\n option?: string;\n empty?: string;\n create?: string;\n };\n create?: string;\n empty?: string;\n endSlot?: React.ReactNode;\n };\n\nexport const Combobox = ({\n defaultOpened = false,\n creatable,\n setSelectedOption,\n selectedOption,\n endSlot,\n options,\n classNames,\n create,\n empty,\n ...props\n}: ComboboxProps) => {\n const [query, setQuery] = useState(selectedOption?.value ?? '');\n\n const shouldFilterOptions = options.every((item) => item.value !== query);\n const filteredOptions = shouldFilterOptions\n ? options.filter((item) =>\n item.value.toLowerCase().includes(query.toLowerCase().trim()),\n )\n : options;\n\n const dropdownOptions = filteredOptions.map((option) => (\n <DropdownBase.Option\n value={option.value}\n key={option.id}\n active={selectedOption?.id === option.id}\n classNames={{ option: classNames?.option ?? comboboxOption() }}\n >\n {option.value}\n </DropdownBase.Option>\n ));\n\n const MissingOption = () => {\n if (creatable && query) {\n return (\n <DropdownBase.Option\n value={query}\n key={query}\n classNames={{\n option: classNames?.create ?? comboboxOption({ type: 'create' }),\n }}\n >\n <Icon name='plus' classNames={icon({ size: 'm' })} />\n {`${create ?? 'Create'} '${query}'`}\n </DropdownBase.Option>\n );\n }\n return (\n <DropdownBase.Empty\n classNames={{ empty: classNames?.empty ?? comboboxEmpty() }}\n >\n {empty ?? 'Nothing found'}\n </DropdownBase.Empty>\n );\n };\n\n const onChange = (value: string | undefined) => {\n let selected = options.find((item) => item.value === value);\n if (!selected && creatable && value) {\n selected = { id: 'new', value };\n }\n setSelectedOption(selected);\n };\n\n return (\n <DropdownBase\n readOnly={false}\n target={\n <InputText\n value={query}\n classNames={{\n section: classNames?.section ?? cx(inputSection(), selectSection()),\n }}\n {...props}\n />\n }\n selectedOption={selectedOption}\n setQuery={setQuery}\n setSelectedOption={(option) => onChange(option)}\n endSlot={endSlot}\n >\n {dropdownOptions.length > 0 ? dropdownOptions : <MissingOption />}\n </DropdownBase>\n );\n};\n"],"mappings":"0aAoCA,MAAa,GAAY,CACvB,gBAAgB,GAChB,YACA,oBACA,iBACA,UACA,UACA,aACA,SACA,QACA,GAAG,KACgB,CACnB,GAAM,CAAC,EAAO,GAAY,EAAS,GAAgB,OAAS,GAAG,CASzD,GAPsB,EAAQ,MAAO,GAAS,EAAK,QAAU,EAAM,CAErE,EAAQ,OAAQ,GACd,EAAK,MAAM,aAAa,CAAC,SAAS,EAAM,aAAa,CAAC,MAAM,CAAC,CAC9D,CACD,GAEoC,IAAK,GAC3C,EAAC,EAAa,OAAA,CACZ,MAAO,EAAO,MAEd,OAAQ,GAAgB,KAAO,EAAO,GACtC,WAAY,CAAE,OAAQ,GAAY,QAAU,GAAgB,CAAE,UAE7D,EAAO,OAJH,EAAO,GAKQ,CACtB,CAEI,MACA,GAAa,EAEb,EAAC,EAAa,OAAA,CACZ,MAAO,EAEP,WAAY,CACV,OAAQ,GAAY,QAAU,EAAe,CAAE,KAAM,SAAU,CAAC,CACjE,WAED,EAAC,EAAA,CAAK,KAAK,OAAO,WAAY,EAAK,CAAE,KAAM,IAAK,CAAC,EAAI,CACpD,GAAG,GAAU,SAAS,IAAI,EAAM,GAAA,EAN5B,EAOe,CAIxB,EAAC,EAAa,MAAA,CACZ,WAAY,CAAE,MAAO,GAAY,OAAS,GAAe,CAAE,UAE1D,GAAS,iBACS,CAInB,EAAY,GAA8B,CAC9C,IAAI,EAAW,EAAQ,KAAM,GAAS,EAAK,QAAU,EAAM,CACvD,CAAC,GAAY,GAAa,IAC5B,EAAW,CAAE,GAAI,MAAO,QAAO,EAEjC,EAAkB,EAAS,EAG7B,OACE,EAAC,EAAA,CACC,SAAU,GACV,OACE,EAAC,EAAA,CACC,MAAO,EACP,WAAY,CACV,QAAS,GAAY,SAAW,EAAG,GAAc,CAAE,GAAe,CAAC,CACpE,CACD,GAAI,GACJ,CAEY,iBACN,WACV,kBAAoB,GAAW,EAAS,EAAO,CACtC,mBAER,EAAgB,OAAS,EAAI,EAAkB,EAAC,EAAA,EAAA,CAAgB,EACpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownBase.d.ts","names":[],"sources":["../../../../src/components/controls/dropdown/DropdownBase.tsx"],"sourcesContent":[],"mappings":";;;;KAKY,iBAAA;;;;EAAA,cAAA,CAAA,EAAA;IAAiB,EAAA,EAAA,MAAA,GAAA,MAAA;IAMnB,KAAM,EAAA,MAAA;
|
|
1
|
+
{"version":3,"file":"DropdownBase.d.ts","names":[],"sources":["../../../../src/components/controls/dropdown/DropdownBase.tsx"],"sourcesContent":[],"mappings":";;;;KAKY,iBAAA;;;;EAAA,cAAA,CAAA,EAAA;IAAiB,EAAA,EAAA,MAAA,GAAA,MAAA;IAMnB,KAAM,EAAA,MAAA;MAKJ,SAAM;mBACE,EAAA,CAAA,KAAA,EAAA,MAAA,GAAA,SAAA,EAAA,GAAA,IAAA;QACR,EAPF,KAAA,CAAM,YAOE;EAAS,UAAA,CAAA,EAAA;;;;YAFf,KAAA,CAAM;cACJ,KAAA,CAAM;YACR,KAAA,CAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownBase.js","names":["MantineCombobox"],"sources":["../../../../src/components/controls/dropdown/DropdownBase.tsx"],"sourcesContent":["import { type ChangeEvent, cloneElement } from 'react';\n\nimport { comboboxOptions, dropdown } from '@mage-ui/styled-system/recipes';\nimport { Combobox as MantineCombobox, useCombobox } from '@mantine/core';\n\nexport type DropdownBaseProps = {\n defaultOpened?: boolean;\n readOnly?: boolean;\n setQuery?: (value: string) => void;\n selectedOption?: { id: string | number; value: string } | undefined;\n setSelectedOption: (value: string | undefined) => void;\n target: React.ReactElement;\n classNames?: {\n dropdown?: string;\n options?: string;\n };\n endSlot?: React.ReactNode;\n startSlot?: React.ReactNode;\n children: React.ReactNode;\n portal?: boolean;\n position?:\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'left'\n | 'left-start'\n | 'left-end';\n width?: number | string;\n};\n\nexport const DropdownBase = ({\n defaultOpened,\n readOnly,\n setQuery,\n setSelectedOption,\n selectedOption,\n target,\n classNames,\n children,\n endSlot,\n startSlot,\n position,\n portal,\n width,\n ...props\n}: DropdownBaseProps) => {\n const combobox = useCombobox({\n defaultOpened: defaultOpened ?? false,\n scrollBehavior: 'smooth',\n onDropdownClose: () => {\n combobox.resetSelectedOption();\n },\n });\n\n const targetComponent = cloneElement(target, {\n ...(target?.props ?? {}),\n onChange: ({\n currentTarget,\n }: ChangeEvent<HTMLInputElement | HTMLButtonElement>) => {\n setQuery?.(currentTarget.value);\n combobox.openDropdown();\n combobox.updateSelectedOptionIndex();\n },\n onBlur: () => {\n setQuery?.(selectedOption?.value ?? '');\n },\n onClick: () => {\n if (readOnly) {\n combobox.toggleDropdown();\n } else {\n combobox.openDropdown();\n }\n },\n // opened: combobox.isDropdownOpened,\n startSlot: startSlot,\n endSlot: endSlot,\n } as React.HTMLProps<HTMLInputElement | HTMLButtonElement>);\n\n return (\n <MantineCombobox\n readOnly={readOnly ?? false}\n onOptionSubmit={(option) => {\n setSelectedOption(option);\n setQuery?.(option);\n combobox.closeDropdown();\n }}\n store={combobox}\n withinPortal={portal || true}\n position={position || 'bottom-start'}\n width={width || 'auto'}\n {...props}\n >\n <MantineCombobox.Target>{targetComponent}</MantineCombobox.Target>\n <MantineCombobox.Dropdown\n classNames={{\n dropdown: classNames?.dropdown ?? dropdown(),\n }}\n >\n <MantineCombobox.Options\n classNames={{\n options: classNames?.options ?? comboboxOptions(),\n }}\n >\n {children}\n </MantineCombobox.Options>\n </MantineCombobox.Dropdown>\n </MantineCombobox>\n );\n};\n\nDropdownBase.Option = MantineCombobox.Option;\nDropdownBase.Option.displayName = 'DropdownBase.Option';\nDropdownBase.Empty = MantineCombobox.Empty;\nDropdownBase.Empty.displayName = 'DropdownBase.Empty';\n"],"mappings":"gOAoCA,MAAa,
|
|
1
|
+
{"version":3,"file":"DropdownBase.js","names":["MantineCombobox"],"sources":["../../../../src/components/controls/dropdown/DropdownBase.tsx"],"sourcesContent":["import { type ChangeEvent, cloneElement } from 'react';\n\nimport { comboboxOptions, dropdown } from '@mage-ui/styled-system/recipes';\nimport { Combobox as MantineCombobox, useCombobox } from '@mantine/core';\n\nexport type DropdownBaseProps = {\n defaultOpened?: boolean;\n readOnly?: boolean;\n setQuery?: (value: string) => void;\n selectedOption?: { id: string | number; value: string } | undefined;\n setSelectedOption: (value: string | undefined) => void;\n target: React.ReactElement;\n classNames?: {\n dropdown?: string;\n options?: string;\n };\n endSlot?: React.ReactNode;\n startSlot?: React.ReactNode;\n children: React.ReactNode;\n portal?: boolean;\n position?:\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'left'\n | 'left-start'\n | 'left-end';\n width?: number | string;\n};\n\nexport const DropdownBase = ({\n defaultOpened,\n readOnly,\n setQuery,\n setSelectedOption,\n selectedOption,\n target,\n classNames,\n children,\n endSlot,\n startSlot,\n position,\n portal,\n width,\n ...props\n}: DropdownBaseProps) => {\n const combobox = useCombobox({\n defaultOpened: defaultOpened ?? false,\n scrollBehavior: 'smooth',\n onDropdownClose: () => {\n combobox.resetSelectedOption();\n },\n });\n\n const targetComponent = cloneElement(target, {\n ...(target?.props ?? {}),\n onChange: ({\n currentTarget,\n }: ChangeEvent<HTMLInputElement | HTMLButtonElement>) => {\n setQuery?.(currentTarget.value);\n combobox.openDropdown();\n combobox.updateSelectedOptionIndex();\n },\n onBlur: () => {\n setQuery?.(selectedOption?.value ?? '');\n },\n onClick: () => {\n if (readOnly) {\n combobox.toggleDropdown();\n } else {\n combobox.openDropdown();\n }\n },\n // opened: combobox.isDropdownOpened,\n startSlot: startSlot,\n endSlot: endSlot,\n } as React.HTMLProps<HTMLInputElement | HTMLButtonElement>);\n\n return (\n <MantineCombobox\n readOnly={readOnly ?? false}\n onOptionSubmit={(option) => {\n setSelectedOption(option);\n setQuery?.(option);\n combobox.closeDropdown();\n }}\n store={combobox}\n withinPortal={portal || true}\n position={position || 'bottom-start'}\n width={width || 'auto'}\n {...props}\n >\n <MantineCombobox.Target>{targetComponent}</MantineCombobox.Target>\n <MantineCombobox.Dropdown\n classNames={{\n dropdown: classNames?.dropdown ?? dropdown(),\n }}\n >\n <MantineCombobox.Options\n classNames={{\n options: classNames?.options ?? comboboxOptions(),\n }}\n >\n {children}\n </MantineCombobox.Options>\n </MantineCombobox.Dropdown>\n </MantineCombobox>\n );\n};\n\nDropdownBase.Option = MantineCombobox.Option;\nDropdownBase.Option.displayName = 'DropdownBase.Option';\nDropdownBase.Empty = MantineCombobox.Empty;\nDropdownBase.Empty.displayName = 'DropdownBase.Empty';\n"],"mappings":"gOAoCA,MAAa,GAAgB,CAC3B,gBACA,WACA,WACA,oBACA,iBACA,SACA,aACA,WACA,UACA,YACA,WACA,SACA,QACA,GAAG,KACoB,CACvB,IAAM,EAAW,EAAY,CAC3B,cAAe,GAAiB,GAChC,eAAgB,SAChB,oBAAuB,CACrB,EAAS,qBAAqB,EAEjC,CAAC,CAEI,EAAkB,EAAa,EAAQ,CAC3C,GAAI,GAAQ,OAAS,EAAE,CACvB,UAAW,CACT,mBACuD,CACvD,IAAW,EAAc,MAAM,CAC/B,EAAS,cAAc,CACvB,EAAS,2BAA2B,EAEtC,WAAc,CACZ,IAAW,GAAgB,OAAS,GAAG,EAEzC,YAAe,CACT,EACF,EAAS,gBAAgB,CAEzB,EAAS,cAAc,EAIhB,YACF,UACV,CAA0D,CAE3D,OACE,EAACA,EAAAA,CACC,SAAU,GAAY,GACtB,eAAiB,GAAW,CAC1B,EAAkB,EAAO,CACzB,IAAW,EAAO,CAClB,EAAS,eAAe,EAE1B,MAAO,EACP,aAAc,GAAU,GACxB,SAAU,GAAY,eACtB,MAAO,GAAS,OAChB,GAAI,YAEJ,EAACA,EAAgB,OAAA,CAAA,SAAQ,EAAA,CAAyC,CAClE,EAACA,EAAgB,SAAA,CACf,WAAY,CACV,SAAU,GAAY,UAAY,GAAU,CAC7C,UAED,EAACA,EAAgB,QAAA,CACf,WAAY,CACV,QAAS,GAAY,SAAW,GAAiB,CAClD,CAEA,YACuB,EACD,CAAA,EACX,EAItB,EAAa,OAASA,EAAgB,OACtC,EAAa,OAAO,YAAc,sBAClC,EAAa,MAAQA,EAAgB,MACrC,EAAa,MAAM,YAAc"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DropdownBaseProps } from "./DropdownBase.js";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime9 from "react/jsx-runtime";
|
|
3
|
+
import * as react0 from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/controls/dropdown/Menu.d.ts
|
|
6
6
|
type MenuProps = Omit<DropdownBaseProps, 'setSelectedOption' | 'target' | 'opened'> & {
|
|
@@ -30,11 +30,11 @@ declare const Menu: {
|
|
|
30
30
|
endSlot,
|
|
31
31
|
startSlot,
|
|
32
32
|
...props
|
|
33
|
-
}: MenuProps):
|
|
33
|
+
}: MenuProps): react_jsx_runtime9.JSX.Element;
|
|
34
34
|
Option: {
|
|
35
35
|
({
|
|
36
36
|
children
|
|
37
|
-
}: MenuOptionProps):
|
|
37
|
+
}: MenuOptionProps): react0.ReactNode;
|
|
38
38
|
displayName: string;
|
|
39
39
|
};
|
|
40
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","names":[],"sources":["../../../../src/components/controls/dropdown/Menu.tsx"],"sourcesContent":[],"mappings":";;;;;KAQY,SAAA,GAAY,KACtB;UAGQ,KAAA,CAAM;;;IAJJ,MAAA,CAAA,EAAS,MAAA;IAAA,QAAA,CAAA,EAAA,MAAA
|
|
1
|
+
{"version":3,"file":"Menu.d.ts","names":[],"sources":["../../../../src/components/controls/dropdown/Menu.tsx"],"sourcesContent":[],"mappings":";;;;;KAQY,SAAA,GAAY,KACtB;UAGQ,KAAA,CAAM;;;IAJJ,MAAA,CAAA,EAAS,MAAA;IAAA,QAAA,CAAA,EAAA,MAAA;;kBAAG,CAAA,EAAA;IAId,IAAA,CAAM,EAAA,MAAA;IAYH,KAAM,CAAA,EAAA,MAAA;IACP,KAAM,CAAA,EAAA,MAAA;IACJ,OAAM,CAAA,EAAA,MAAA;EAAS,CAAA;EAGhB,QAqDZ,CAAA,EA1DY,KAAA,CAAM,SA0DlB;EAAA,OAAA,CAAA,EAzDW,KAAA,CAAM,SAyDjB;cAxDa,KAAA,CAAM;;cAGP;;;;;;;;;;KASV,YAAS,kBAAA,CAAA,GAAA,CAAA;;;;OAqDkB,kBAAe,MAAA,CAAA;;;;KAPxC,eAAA;MAOyB,MAAA,GAAA,MAAA;OAAe,EAAA,MAAA;EAAA,OAAA,EAAA,GAAA,GAAA,IAAA;EAPxC,QAAA,CAAA,EAIQ,KAAA,CAAM,SAJC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Button as e}from"../../buttons/button/Button.js";import{DropdownBase as t}from"./DropdownBase.js";import{comboboxOption as n,dropdown as r}from"@mage-ui/styled-system/recipes";import{jsx as i}from"react/jsx-runtime";import{Children as a,isValidElement as o}from"react";const s=({label:c,a11yLabel:l,classNames:u,buttonClassNames:d,children:f,endSlot:p,startSlot:m,...h})=>{let g=a.toArray(f).filter(e=>o(e)&&e.type===s.Option),
|
|
1
|
+
import{Button as e}from"../../buttons/button/Button.js";import{DropdownBase as t}from"./DropdownBase.js";import{comboboxOption as n,dropdown as r}from"@mage-ui/styled-system/recipes";import{jsx as i}from"react/jsx-runtime";import{Children as a,isValidElement as o}from"react";const s=({label:c,a11yLabel:l,classNames:u,buttonClassNames:d,children:f,endSlot:p,startSlot:m,...h})=>{let g=a.toArray(f).filter(e=>o(e)&&e.type===s.Option);return i(t,{setSelectedOption:e=>{let t=g.find(t=>t.props.value===e);t&&t.props.onClick()},target:i(e,{classNames:d,...l&&{"aria-label":l},children:c}),classNames:{dropdown:u?.dropdown??r()},startSlot:m,endSlot:p,...h,children:g.map(e=>{let{id:r,value:a,children:o}=e.props;return i(t.Option,{value:a,classNames:{option:u?.option??n()},children:o},r)})})},c=({children:e})=>e;c.displayName=`Menu.Option`,s.Option=c;export{s as Menu};
|
|
2
2
|
//# sourceMappingURL=Menu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.js","names":["
|
|
1
|
+
{"version":3,"file":"Menu.js","names":["children"],"sources":["../../../../src/components/controls/dropdown/Menu.tsx"],"sourcesContent":["import { Children, isValidElement } from 'react';\n\nimport { comboboxOption, dropdown } from '@mage-ui/styled-system/recipes';\n// import type { FloatingPosition, PopoverWidth } from '@mantine/core';\nimport { Button } from '@/components/buttons';\n\nimport { DropdownBase, type DropdownBaseProps } from './DropdownBase';\n\nexport type MenuProps = Omit<\n DropdownBaseProps,\n 'setSelectedOption' | 'target' | 'opened'\n> & {\n label?: React.ReactNode;\n a11yLabel?: string;\n classNames?: {\n option?: string;\n dropdown?: string;\n };\n buttonClassNames?: {\n root?: string;\n inner?: string;\n label?: string;\n section?: string;\n };\n children?: React.ReactNode;\n endSlot?: React.ReactNode;\n startSlot?: React.ReactNode;\n};\n\nexport const Menu = ({\n label,\n a11yLabel,\n classNames,\n buttonClassNames,\n children,\n endSlot,\n startSlot,\n ...props\n}: MenuProps) => {\n const options = Children.toArray(children).filter(\n (child): child is React.ReactElement<MenuOptionProps> =>\n isValidElement(child) && child.type === Menu.Option,\n );\n\n const handleOptionSelect = (value?: string) => {\n const selected = options.find((child) => child.props.value === value);\n if (selected) selected.props.onClick();\n };\n\n return (\n <DropdownBase\n setSelectedOption={handleOptionSelect}\n target={\n <Button\n classNames={buttonClassNames}\n {...(a11yLabel && { 'aria-label': a11yLabel })}\n >\n {label}\n </Button>\n }\n classNames={{\n dropdown: classNames?.dropdown ?? dropdown(),\n }}\n startSlot={startSlot}\n endSlot={endSlot}\n {...props}\n >\n {options.map((child) => {\n const { id, value, children } = child.props;\n\n return (\n <DropdownBase.Option\n key={id}\n value={value}\n classNames={{ option: classNames?.option ?? comboboxOption() }}\n >\n {children}\n </DropdownBase.Option>\n );\n })}\n </DropdownBase>\n );\n};\n\ntype MenuOptionProps = {\n id: string | number;\n value: string;\n onClick: () => void;\n children?: React.ReactNode;\n};\n\nconst Option = ({ children }: MenuOptionProps) => {\n return children;\n};\n\nOption.displayName = 'Menu.Option';\nMenu.Option = Option;\n"],"mappings":"oRA6BA,MAAa,GAAQ,CACnB,QACA,YACA,aACA,mBACA,WACA,UACA,YACA,GAAG,KACY,CACf,IAAM,EAAU,EAAS,QAAQ,EAAS,CAAC,OACxC,GACC,EAAe,EAAM,EAAI,EAAM,OAAS,EAAK,OAChD,CAOD,OACE,EAAC,EAAA,CACC,kBAPwB,GAAmB,CAC7C,IAAM,EAAW,EAAQ,KAAM,GAAU,EAAM,MAAM,QAAU,EAAM,CACjE,GAAU,EAAS,MAAM,SAAS,EAMpC,OACE,EAAC,EAAA,CACC,WAAY,EACZ,GAAK,GAAa,CAAE,aAAc,EAAW,UAE5C,GACM,CAEX,WAAY,CACV,SAAU,GAAY,UAAY,GAAU,CAC7C,CACU,YACF,UACT,GAAI,WAEH,EAAQ,IAAK,GAAU,CACtB,GAAM,CAAE,KAAI,QAAO,SAAA,GAAa,EAAM,MAEtC,OACE,EAAC,EAAa,OAAA,CAEL,QACP,WAAY,CAAE,OAAQ,GAAY,QAAU,GAAgB,CAAE,UAE7DA,GAJI,EAKe,EAExB,EACW,EAWb,GAAU,CAAE,cACT,EAGT,EAAO,YAAc,cACrB,EAAK,OAAS"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DropdownBaseProps } from "./DropdownBase.js";
|
|
2
2
|
import { InputTextProps } from "../input-text/InputText.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime10 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/components/controls/dropdown/Select.d.ts
|
|
6
6
|
type SelectProps = Omit<DropdownBaseProps, 'children' | 'onClick' | 'setQuery' | 'target'> & InputTextProps & {
|
|
@@ -23,9 +23,7 @@ declare const Select: ({
|
|
|
23
23
|
options,
|
|
24
24
|
classNames,
|
|
25
25
|
...props
|
|
26
|
-
}: SelectProps) =>
|
|
27
|
-
//# sourceMappingURL=Select.d.ts.map
|
|
28
|
-
|
|
26
|
+
}: SelectProps) => react_jsx_runtime10.JSX.Element;
|
|
29
27
|
//#endregion
|
|
30
28
|
export { Select, SelectProps };
|
|
31
29
|
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","names":[],"sources":["../../../../src/components/controls/dropdown/Select.tsx"],"sourcesContent":[],"mappings":";;;;;KAgBY,WAAA,GAAc,KACxB,qEAGA;;;IAJU,KAAA,EAAA,MAAW;EAAA,CAAA,GAAA,SAAA,EAAA,GAAA,IAAA;
|
|
1
|
+
{"version":3,"file":"Select.d.ts","names":[],"sources":["../../../../src/components/controls/dropdown/Select.tsx"],"sourcesContent":[],"mappings":";;;;;KAgBY,WAAA,GAAc,KACxB,qEAGA;;;IAJU,KAAA,EAAA,MAAW;EAAA,CAAA,GAAA,SAAA,EAAA,GAAA,IAAA;SACrB,EAAA;IADwB,EAAA,EAAA,MAAA,GAAA,MAAA;IAIxB,KAAA,EAAA,MAAA;EAAc,CAAA,EAAA;EAUH,UAkDZ,CAAA,EAAA;IAAA,MAAA,CAAA,EAAA,MAAA;;;AAlDsB,cAAV,MAAU,EAAA,CAAA;EAAA,aAAA;EAAA,iBAAA;EAAA,cAAA;EAAA,OAAA;EAAA,UAAA;EAAA,GAAA;AAAA,CAAA,EAOpB,WAPoB,EAAA,GAOT,mBAAA,CAAA,GAAA,CAAA,OAPS"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","names":[
|
|
1
|
+
{"version":3,"file":"Select.js","names":[],"sources":["../../../../src/components/controls/dropdown/Select.tsx"],"sourcesContent":["import { useState } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n comboboxOption,\n input,\n inputLabel,\n inputRoot,\n inputSection,\n selectButton,\n selectSection,\n} from '@mage-ui/styled-system/recipes';\nimport { InputText, type InputTextProps } from '@/components/controls';\n\nimport { DropdownBase, type DropdownBaseProps } from './DropdownBase';\n\nexport type SelectProps = Omit<\n DropdownBaseProps,\n 'children' | 'onClick' | 'setQuery' | 'target'\n> &\n InputTextProps & {\n setSelectedOption: (\n option: { id: string | number; value: string } | undefined,\n ) => void;\n options: { id: string | number; value: string }[];\n classNames?: {\n option?: string;\n };\n };\n\nexport const Select = ({\n defaultOpened = false,\n setSelectedOption,\n selectedOption,\n options,\n classNames,\n ...props\n}: SelectProps) => {\n const [query, setQuery] = useState(selectedOption?.value ?? '');\n\n const dropdownOptions = options.map((option) => (\n <DropdownBase.Option\n value={option.value}\n key={option.id}\n active={selectedOption?.id === option.id}\n classNames={{ option: classNames?.option ?? comboboxOption() }}\n >\n {option.value}\n </DropdownBase.Option>\n ));\n\n const onChange = (value: string | undefined) => {\n const selected = options.find((item) => item.value === value);\n setSelectedOption(selected);\n };\n\n return (\n <DropdownBase\n readOnly={true}\n target={\n <InputText\n readOnly\n classNames={{\n root: classNames?.root ?? inputRoot(),\n label: classNames?.label ?? inputLabel(),\n input: classNames?.input ?? cx(input(), selectButton()),\n section: classNames?.section ?? cx(inputSection(), selectSection()),\n }}\n value={query}\n {...props}\n />\n }\n selectedOption={selectedOption}\n setQuery={setQuery}\n setSelectedOption={(option) => onChange(option)}\n {...props}\n >\n {dropdownOptions}\n </DropdownBase>\n );\n};\n"],"mappings":"kYA8BA,MAAa,GAAU,CACrB,gBAAgB,GAChB,oBACA,iBACA,UACA,aACA,GAAG,KACc,CACjB,GAAM,CAAC,EAAO,GAAY,EAAS,GAAgB,OAAS,GAAG,CAEzD,EAAkB,EAAQ,IAAK,GACnC,EAAC,EAAa,OAAA,CACZ,MAAO,EAAO,MAEd,OAAQ,GAAgB,KAAO,EAAO,GACtC,WAAY,CAAE,OAAQ,GAAY,QAAU,GAAgB,CAAE,UAE7D,EAAO,OAJH,EAAO,GAKQ,CACtB,CAEI,EAAY,GAA8B,CAC9C,IAAM,EAAW,EAAQ,KAAM,GAAS,EAAK,QAAU,EAAM,CAC7D,EAAkB,EAAS,EAG7B,OACE,EAAC,EAAA,CACC,SAAU,GACV,OACE,EAAC,EAAA,CACC,SAAA,GACA,WAAY,CACV,KAAM,GAAY,MAAQ,GAAW,CACrC,MAAO,GAAY,OAAS,GAAY,CACxC,MAAO,GAAY,OAAS,EAAG,GAAO,CAAE,GAAc,CAAC,CACvD,QAAS,GAAY,SAAW,EAAG,GAAc,CAAE,GAAe,CAAC,CACpE,CACD,MAAO,EACP,GAAI,GACJ,CAEY,iBACN,WACV,kBAAoB,GAAW,EAAS,EAAO,CAC/C,GAAI,WAEH,GACY"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime11 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/controls/input-file/InputFile.d.ts
|
|
4
4
|
type InputFileProps = {
|
|
@@ -26,8 +26,7 @@ declare const InputFile: ({
|
|
|
26
26
|
multiple,
|
|
27
27
|
badgeClassName,
|
|
28
28
|
...props
|
|
29
|
-
}: InputFileProps) =>
|
|
30
|
-
//# sourceMappingURL=InputFile.d.ts.map
|
|
29
|
+
}: InputFileProps) => react_jsx_runtime11.JSX.Element;
|
|
31
30
|
//#endregion
|
|
32
31
|
export { InputFile, InputFileProps };
|
|
33
32
|
//# sourceMappingURL=InputFile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputFile.d.ts","names":[],"sources":["../../../../src/components/controls/input-file/InputFile.tsx"],"sourcesContent":[],"mappings":";;;KAmBY,cAAA;;;IAAA,KAAA,CAAA,EAAA,MAAc;IAAA,WAAA,CAAA,EAAA,MAAA;IAiBhB,KAAA,CAAA,EAAA,MAAA;IAAO,OAAA,CAAA,EAAA,MAAA;IACI,KAAA,CAAA,EAAA,MAAA;IAAO,OAAA,CAAA,EAAA,MAAA;IAAI,WAAA,CAAA,EAAA,MAAA;IA4CnB,WAkCZ,CAAA,EAAA,MAAA;EAAA,CAAA;
|
|
1
|
+
{"version":3,"file":"InputFile.d.ts","names":[],"sources":["../../../../src/components/controls/input-file/InputFile.tsx"],"sourcesContent":[],"mappings":";;;KAmBY,cAAA;;;IAAA,KAAA,CAAA,EAAA,MAAc;IAAA,WAAA,CAAA,EAAA,MAAA;IAiBhB,KAAA,CAAA,EAAA,MAAA;IAAO,OAAA,CAAA,EAAA,MAAA;IACI,KAAA,CAAA,EAAA,MAAA;IAAO,OAAA,CAAA,EAAA,MAAA;IAAI,WAAA,CAAA,EAAA,MAAA;IA4CnB,WAkCZ,CAAA,EAAA,MAAA;EAAA,CAAA;gBAlCyB,CAAA,EAAA,MAAA;OAAA,CAAA,EAAA,MAAA;aAAA,CAAA,EAAA,MAAA;aAKvB,CAAA,EAAA,MAAA;UAAc,CAAA,EAAA,OAAA;EA6BhB,KAAA,CAAA,EA/ES,IA+ET,GA/EgB,IA+EhB,EAAA,GAAA,IAAA;qBA9EoB,OAAO;;cA4Cf;;;;;GAKV,mBAAc,mBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputFile.js","names":["props"],"sources":["../../../../src/components/controls/input-file/InputFile.tsx"],"sourcesContent":["import { cx } from '@mage-ui/styled-system/css';\nimport {\n badge,\n icon,\n input,\n inputButton,\n inputDescription,\n inputError,\n inputFileGroup,\n inputFileInput,\n inputFilePlaceholder,\n inputFileSection,\n inputLabel,\n inputRoot,\n inputWrapper,\n} from '@mage-ui/styled-system/recipes';\nimport { Badge, FileInput, Group } from '@mantine/core';\nimport { Icon } from '@/components/data-display';\n\nexport type InputFileProps = {\n classNames?: {\n root?: string;\n label?: string;\n description?: string;\n error?: string;\n wrapper?: string;\n input?: string;\n section?: string;\n placeholder?: string;\n clearButton?: string;\n };\n badgeClassName?: string;\n label?: string;\n description?: string;\n placeholder?: string;\n multiple?: boolean;\n value?: File | File[] | null;\n onChange?: (files: File | File[] | null) => void;\n};\n\nconst ValueComponent = ({\n value,\n badgeClassName,\n}: {\n value: File | File[] | null;\n badgeClassName?: string;\n}) => {\n if (value === null) {\n return null;\n }\n\n if (Array.isArray(value)) {\n return (\n <Group\n classNames={{\n root: cx('group', inputFileGroup()),\n }}\n >\n {value.map((file) => (\n <Badge\n classNames={{\n root: cx(badge({ status: 'neutral' }), badgeClassName),\n }}\n key={file.name}\n >\n {file.name}\n </Badge>\n ))}\n </Group>\n );\n }\n\n return (\n <Badge\n classNames={{ root: cx(badge({ status: 'neutral' }), badgeClassName) }}\n >\n {value.name}\n </Badge>\n );\n};\n\nexport const InputFile = ({\n classNames,\n multiple,\n badgeClassName,\n ...props\n}: InputFileProps) => {\n return (\n <FileInput\n classNames={{\n root: cx(classNames?.root ?? inputRoot(), 'group'),\n label: classNames?.label ?? inputLabel(),\n required: classNames?.label ?? inputLabel(),\n description: classNames?.description ?? inputDescription(),\n error: classNames?.error ?? inputError(),\n wrapper: classNames?.wrapper ?? inputWrapper(),\n input: classNames?.input ?? cx(input(), inputFileInput()),\n section: classNames?.section ?? inputFileSection(),\n placeholder: classNames?.placeholder ?? inputFilePlaceholder(),\n }}\n leftSection={<Icon name='upload-02' classNames={icon({ size: 'm' })} />}\n multiple={multiple}\n valueComponent={(props) => (\n <ValueComponent {...props} badgeClassName={badgeClassName ?? ''} />\n )}\n clearable\n clearButtonProps={{\n className:\n classNames?.clearButton ??\n inputButton({ variant: 'ghost', size: 's', color: 'danger' }),\n children: <Icon name='trash-01' classNames={icon({ size: 's' })} />,\n }}\n {...props}\n />\n );\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"InputFile.js","names":["props"],"sources":["../../../../src/components/controls/input-file/InputFile.tsx"],"sourcesContent":["import { cx } from '@mage-ui/styled-system/css';\nimport {\n badge,\n icon,\n input,\n inputButton,\n inputDescription,\n inputError,\n inputFileGroup,\n inputFileInput,\n inputFilePlaceholder,\n inputFileSection,\n inputLabel,\n inputRoot,\n inputWrapper,\n} from '@mage-ui/styled-system/recipes';\nimport { Badge, FileInput, Group } from '@mantine/core';\nimport { Icon } from '@/components/data-display';\n\nexport type InputFileProps = {\n classNames?: {\n root?: string;\n label?: string;\n description?: string;\n error?: string;\n wrapper?: string;\n input?: string;\n section?: string;\n placeholder?: string;\n clearButton?: string;\n };\n badgeClassName?: string;\n label?: string;\n description?: string;\n placeholder?: string;\n multiple?: boolean;\n value?: File | File[] | null;\n onChange?: (files: File | File[] | null) => void;\n};\n\nconst ValueComponent = ({\n value,\n badgeClassName,\n}: {\n value: File | File[] | null;\n badgeClassName?: string;\n}) => {\n if (value === null) {\n return null;\n }\n\n if (Array.isArray(value)) {\n return (\n <Group\n classNames={{\n root: cx('group', inputFileGroup()),\n }}\n >\n {value.map((file) => (\n <Badge\n classNames={{\n root: cx(badge({ status: 'neutral' }), badgeClassName),\n }}\n key={file.name}\n >\n {file.name}\n </Badge>\n ))}\n </Group>\n );\n }\n\n return (\n <Badge\n classNames={{ root: cx(badge({ status: 'neutral' }), badgeClassName) }}\n >\n {value.name}\n </Badge>\n );\n};\n\nexport const InputFile = ({\n classNames,\n multiple,\n badgeClassName,\n ...props\n}: InputFileProps) => {\n return (\n <FileInput\n classNames={{\n root: cx(classNames?.root ?? inputRoot(), 'group'),\n label: classNames?.label ?? inputLabel(),\n required: classNames?.label ?? inputLabel(),\n description: classNames?.description ?? inputDescription(),\n error: classNames?.error ?? inputError(),\n wrapper: classNames?.wrapper ?? inputWrapper(),\n input: classNames?.input ?? cx(input(), inputFileInput()),\n section: classNames?.section ?? inputFileSection(),\n placeholder: classNames?.placeholder ?? inputFilePlaceholder(),\n }}\n leftSection={<Icon name='upload-02' classNames={icon({ size: 'm' })} />}\n multiple={multiple}\n valueComponent={(props) => (\n <ValueComponent {...props} badgeClassName={badgeClassName ?? ''} />\n )}\n clearable\n clearButtonProps={{\n className:\n classNames?.clearButton ??\n inputButton({ variant: 'ghost', size: 's', color: 'danger' }),\n children: <Icon name='trash-01' classNames={icon({ size: 's' })} />,\n }}\n {...props}\n />\n );\n};\n"],"mappings":"ieAwCA,MAAM,GAAkB,CACtB,QACA,oBAKI,IAAU,KACL,KAGL,MAAM,QAAQ,EAAM,CAEpB,EAAC,EAAA,CACC,WAAY,CACV,KAAM,EAAG,QAAS,GAAgB,CAAC,CACpC,UAEA,EAAM,IAAK,GACV,EAAC,EAAA,CACC,WAAY,CACV,KAAM,EAAG,EAAM,CAAE,OAAQ,UAAW,CAAC,CAAE,EAAe,CACvD,UAGA,EAAK,MAFD,EAAK,KAGJ,CACR,EACI,CAKV,EAAC,EAAA,CACC,WAAY,CAAE,KAAM,EAAG,EAAM,CAAE,OAAQ,UAAW,CAAC,CAAE,EAAe,CAAE,UAErE,EAAM,MACD,CAIC,GAAa,CACxB,aACA,WACA,iBACA,GAAG,KAGD,EAAC,EAAA,CACC,WAAY,CACV,KAAM,EAAG,GAAY,MAAQ,GAAW,CAAE,QAAQ,CAClD,MAAO,GAAY,OAAS,GAAY,CACxC,SAAU,GAAY,OAAS,GAAY,CAC3C,YAAa,GAAY,aAAe,GAAkB,CAC1D,MAAO,GAAY,OAAS,GAAY,CACxC,QAAS,GAAY,SAAW,GAAc,CAC9C,MAAO,GAAY,OAAS,EAAG,GAAO,CAAE,GAAgB,CAAC,CACzD,QAAS,GAAY,SAAW,GAAkB,CAClD,YAAa,GAAY,aAAe,GAAsB,CAC/D,CACD,YAAa,EAAC,EAAA,CAAK,KAAK,YAAY,WAAY,EAAK,CAAE,KAAM,IAAK,CAAC,EAAI,CAC7D,WACV,eAAiB,GACf,EAAC,EAAA,CAAe,GAAIA,EAAO,eAAgB,GAAkB,IAAM,CAErE,UAAA,GACA,iBAAkB,CAChB,UACE,GAAY,aACZ,EAAY,CAAE,QAAS,QAAS,KAAM,IAAK,MAAO,SAAU,CAAC,CAC/D,SAAU,EAAC,EAAA,CAAK,KAAK,WAAW,WAAY,EAAK,CAAE,KAAM,IAAK,CAAC,EAAI,CACpE,CACD,GAAI,GACJ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
2
2
|
import { ComponentProps, ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/controls/input-password/InputPassword.d.ts
|
|
@@ -26,8 +26,7 @@ declare const InputPassword: ({
|
|
|
26
26
|
startSlot,
|
|
27
27
|
endSlot,
|
|
28
28
|
...props
|
|
29
|
-
}: InputPasswordProps) =>
|
|
30
|
-
//# sourceMappingURL=InputPassword.d.ts.map
|
|
29
|
+
}: InputPasswordProps) => react_jsx_runtime12.JSX.Element;
|
|
31
30
|
//#endregion
|
|
32
31
|
export { InputPassword, InputPasswordProps };
|
|
33
32
|
//# sourceMappingURL=InputPassword.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputPassword.d.ts","names":[],"sources":["../../../../src/components/controls/input-password/InputPassword.tsx"],"sourcesContent":[],"mappings":";;;;KAiBY,kBAAA,GAAqB,KAAK;;;EAA1B,WAAA,CAAA,EAAA,MAAA;EAAkB,KAAA,CAAA,EAAA,MAAA;
|
|
1
|
+
{"version":3,"file":"InputPassword.d.ts","names":[],"sources":["../../../../src/components/controls/input-password/InputPassword.tsx"],"sourcesContent":[],"mappings":";;;;KAiBY,kBAAA,GAAqB,KAAK;;;EAA1B,WAAA,CAAA,EAAA,MAAA;EAAkB,KAAA,CAAA,EAAA,MAAA;YAAQ,CAAA,EAAA;IAAL,IAAA,CAAA,EAAA,MAAA;IAenB,KAAA,CAAA,EAAA,MAAA;IACF,WAAA,CAAA,EAAA,MAAA;IAAS,KAAA,CAAA,EAAA,MAAA;IAIR,OAAA,CAAA,EAAA,MAkCZ;IAAA,KAAA,CAAA,EAAA,MAAA;IAlC6B,OAAA,CAAA,EAAA,MAAA;IAAA,WAAA,CAAA,EAAA,MAAA;;WAK3B,CAAA,EAVW,SAUX;SAAkB,CAAA,EATT,SASS;EA6BpB,KAAA,CAAA,EAAA,MAAA,GAAA,MAAA;;cAlCY;;;;;GAKV,uBAAkB,mBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputPassword.js","names":["props"],"sources":["../../../../src/components/controls/input-password/InputPassword.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n input,\n inputButton,\n inputDescription,\n inputError,\n inputLabel,\n inputRoot,\n inputSection,\n inputWrapper,\n} from '@mage-ui/styled-system/recipes';\nimport { PasswordInput } from '@mantine/core';\nimport { useDisclosure } from '@mantine/hooks';\nimport { Icon } from '@/components/data-display';\n\nexport type InputPasswordProps = Omit<ComponentProps<'input'>, 'size'> & {\n name?: string;\n label?: string;\n description?: string;\n error?: string;\n classNames?: {\n root?: string;\n label?: string;\n description?: string;\n error?: string;\n wrapper?: string;\n input?: string;\n section?: string;\n inputButton?: string;\n };\n startSlot?: ReactNode;\n endSlot?: ReactNode;\n value?: string | number;\n};\n\nexport const InputPassword = ({\n classNames,\n startSlot,\n endSlot,\n ...props\n}: InputPasswordProps) => {\n const [visible, { toggle }] = useDisclosure(false);\n\n return (\n <PasswordInput\n classNames={{\n root: cx(classNames?.root ?? inputRoot(), 'group'),\n label: classNames?.label ?? inputLabel(),\n required: classNames?.label ?? inputLabel(),\n description: classNames?.description ?? inputDescription(),\n error: classNames?.error ?? inputError(),\n wrapper: classNames?.wrapper ?? inputWrapper(),\n innerInput: cx(classNames?.input ?? input(), 'peer'),\n section: classNames?.section ?? inputSection(),\n }}\n visible={visible}\n onVisibilityChange={toggle}\n visibilityToggleIcon={(props) => (\n <Icon name={visible ? 'eye' : 'eye-off'} {...props} />\n )}\n rightSection={endSlot}\n visibilityToggleButtonProps={{\n className:\n classNames?.inputButton ??\n inputButton({ variant: 'ghost', size: 's' }),\n }}\n {...props}\n />\n );\n};\n"],"mappings":"maAqCA,MAAa,
|
|
1
|
+
{"version":3,"file":"InputPassword.js","names":["props"],"sources":["../../../../src/components/controls/input-password/InputPassword.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n input,\n inputButton,\n inputDescription,\n inputError,\n inputLabel,\n inputRoot,\n inputSection,\n inputWrapper,\n} from '@mage-ui/styled-system/recipes';\nimport { PasswordInput } from '@mantine/core';\nimport { useDisclosure } from '@mantine/hooks';\nimport { Icon } from '@/components/data-display';\n\nexport type InputPasswordProps = Omit<ComponentProps<'input'>, 'size'> & {\n name?: string;\n label?: string;\n description?: string;\n error?: string;\n classNames?: {\n root?: string;\n label?: string;\n description?: string;\n error?: string;\n wrapper?: string;\n input?: string;\n section?: string;\n inputButton?: string;\n };\n startSlot?: ReactNode;\n endSlot?: ReactNode;\n value?: string | number;\n};\n\nexport const InputPassword = ({\n classNames,\n startSlot,\n endSlot,\n ...props\n}: InputPasswordProps) => {\n const [visible, { toggle }] = useDisclosure(false);\n\n return (\n <PasswordInput\n classNames={{\n root: cx(classNames?.root ?? inputRoot(), 'group'),\n label: classNames?.label ?? inputLabel(),\n required: classNames?.label ?? inputLabel(),\n description: classNames?.description ?? inputDescription(),\n error: classNames?.error ?? inputError(),\n wrapper: classNames?.wrapper ?? inputWrapper(),\n innerInput: cx(classNames?.input ?? input(), 'peer'),\n section: classNames?.section ?? inputSection(),\n }}\n visible={visible}\n onVisibilityChange={toggle}\n visibilityToggleIcon={(props) => (\n <Icon name={visible ? 'eye' : 'eye-off'} {...props} />\n )}\n rightSection={endSlot}\n visibilityToggleButtonProps={{\n className:\n classNames?.inputButton ??\n inputButton({ variant: 'ghost', size: 's' }),\n }}\n {...props}\n />\n );\n};\n"],"mappings":"maAqCA,MAAa,GAAiB,CAC5B,aACA,YACA,UACA,GAAG,KACqB,CACxB,GAAM,CAAC,EAAS,CAAE,WAAY,EAAc,GAAM,CAElD,OACE,EAAC,EAAA,CACC,WAAY,CACV,KAAM,EAAG,GAAY,MAAQ,GAAW,CAAE,QAAQ,CAClD,MAAO,GAAY,OAAS,GAAY,CACxC,SAAU,GAAY,OAAS,GAAY,CAC3C,YAAa,GAAY,aAAe,GAAkB,CAC1D,MAAO,GAAY,OAAS,GAAY,CACxC,QAAS,GAAY,SAAW,GAAc,CAC9C,WAAY,EAAG,GAAY,OAAS,GAAO,CAAE,OAAO,CACpD,QAAS,GAAY,SAAW,GAAc,CAC/C,CACQ,UACT,mBAAoB,EACpB,qBAAuB,GACrB,EAAC,EAAA,CAAK,KAAM,EAAU,MAAQ,UAAW,GAAIA,GAAS,CAExD,aAAc,EACd,4BAA6B,CAC3B,UACE,GAAY,aACZ,EAAY,CAAE,QAAS,QAAS,KAAM,IAAK,CAAC,CAC/C,CACD,GAAI,GACJ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime13 from "react/jsx-runtime";
|
|
2
2
|
import { ComponentProps, ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/controls/input-text/InputText.d.ts
|
|
@@ -25,8 +25,7 @@ declare const InputText: ({
|
|
|
25
25
|
startSlot,
|
|
26
26
|
endSlot,
|
|
27
27
|
...props
|
|
28
|
-
}: InputTextProps) =>
|
|
29
|
-
//# sourceMappingURL=InputText.d.ts.map
|
|
28
|
+
}: InputTextProps) => react_jsx_runtime13.JSX.Element;
|
|
30
29
|
//#endregion
|
|
31
30
|
export { InputText, InputTextProps };
|
|
32
31
|
//# sourceMappingURL=InputText.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputText.d.ts","names":[],"sources":["../../../../src/components/controls/input-text/InputText.tsx"],"sourcesContent":[],"mappings":";;;;KAcY,cAAA,GAAiB,KAAK;;;EAAtB,WAAA,CAAA,EAAA,MAAc;EAAA,KAAA,CAAA,EAAA,MAAA;
|
|
1
|
+
{"version":3,"file":"InputText.d.ts","names":[],"sources":["../../../../src/components/controls/input-text/InputText.tsx"],"sourcesContent":[],"mappings":";;;;KAcY,cAAA,GAAiB,KAAK;;;EAAtB,WAAA,CAAA,EAAA,MAAc;EAAA,KAAA,CAAA,EAAA,MAAA;YAAQ,CAAA,EAAA;IAAL,IAAA,CAAA,EAAA,MAAA;IAcf,KAAA,CAAA,EAAA,MAAA;IACF,WAAA,CAAA,EAAA,MAAA;IAAS,KAAA,CAAA,EAAA,MAAA;IAIR,OAAA,CAuBZ,EAAA,MAAA;IAAA,KAAA,CAAA,EAAA,MAAA;IAvByB,OAAA,CAAA,EAAA,MAAA;;WAAA,CAAA,EALZ,SAKY;SAKvB,CAAA,EATS,SAST;OAAc,CAAA,EAAA,MAAA,GAAA,MAAA;CAkBhB;cAvBY;;;;;GAKV,mBAAc,mBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputText.js","names":[],"sources":["../../../../src/components/controls/input-text/InputText.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n input,\n inputDescription,\n inputError,\n inputLabel,\n inputRoot,\n inputSection,\n inputWrapper,\n} from '@mage-ui/styled-system/recipes';\nimport { TextInput } from '@mantine/core';\n\nexport type InputTextProps = Omit<ComponentProps<'input'>, 'size'> & {\n name?: string;\n label?: string;\n description?: string;\n error?: string;\n classNames?: {\n root?: string;\n label?: string;\n description?: string;\n error?: string;\n wrapper?: string;\n input?: string;\n section?: string;\n };\n startSlot?: ReactNode;\n endSlot?: ReactNode;\n value?: string | number;\n};\n\nexport const InputText = ({\n classNames,\n startSlot,\n endSlot,\n ...props\n}: InputTextProps) => {\n return (\n <TextInput\n classNames={{\n root: cx(classNames?.root ?? inputRoot(), 'group'),\n label: classNames?.label ?? inputLabel(),\n required: classNames?.label ?? inputLabel(),\n description: classNames?.description ?? inputDescription(),\n error: classNames?.error ?? inputError(),\n wrapper: classNames?.wrapper ?? inputWrapper(),\n input: cx(classNames?.input ?? input(), 'peer'),\n section: classNames?.section ?? inputSection(),\n }}\n leftSection={startSlot}\n rightSection={endSlot}\n {...props}\n />\n );\n};\n"],"mappings":"kSAiCA,MAAa,
|
|
1
|
+
{"version":3,"file":"InputText.js","names":[],"sources":["../../../../src/components/controls/input-text/InputText.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n input,\n inputDescription,\n inputError,\n inputLabel,\n inputRoot,\n inputSection,\n inputWrapper,\n} from '@mage-ui/styled-system/recipes';\nimport { TextInput } from '@mantine/core';\n\nexport type InputTextProps = Omit<ComponentProps<'input'>, 'size'> & {\n name?: string;\n label?: string;\n description?: string;\n error?: string;\n classNames?: {\n root?: string;\n label?: string;\n description?: string;\n error?: string;\n wrapper?: string;\n input?: string;\n section?: string;\n };\n startSlot?: ReactNode;\n endSlot?: ReactNode;\n value?: string | number;\n};\n\nexport const InputText = ({\n classNames,\n startSlot,\n endSlot,\n ...props\n}: InputTextProps) => {\n return (\n <TextInput\n classNames={{\n root: cx(classNames?.root ?? inputRoot(), 'group'),\n label: classNames?.label ?? inputLabel(),\n required: classNames?.label ?? inputLabel(),\n description: classNames?.description ?? inputDescription(),\n error: classNames?.error ?? inputError(),\n wrapper: classNames?.wrapper ?? inputWrapper(),\n input: cx(classNames?.input ?? input(), 'peer'),\n section: classNames?.section ?? inputSection(),\n }}\n leftSection={startSlot}\n rightSection={endSlot}\n {...props}\n />\n );\n};\n"],"mappings":"kSAiCA,MAAa,GAAa,CACxB,aACA,YACA,UACA,GAAG,KAGD,EAAC,EAAA,CACC,WAAY,CACV,KAAM,EAAG,GAAY,MAAQ,GAAW,CAAE,QAAQ,CAClD,MAAO,GAAY,OAAS,GAAY,CACxC,SAAU,GAAY,OAAS,GAAY,CAC3C,YAAa,GAAY,aAAe,GAAkB,CAC1D,MAAO,GAAY,OAAS,GAAY,CACxC,QAAS,GAAY,SAAW,GAAc,CAC9C,MAAO,EAAG,GAAY,OAAS,GAAO,CAAE,OAAO,CAC/C,QAAS,GAAY,SAAW,GAAc,CAC/C,CACD,YAAa,EACb,aAAc,EACd,GAAI,GACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiSwitch.d.ts","names":[],"sources":["../../../../src/components/controls/multi-switch/MultiSwitch.tsx"],"sourcesContent":[],"mappings":";;;KAYY,gBAAA;UACF;EADE,QAAA,CAAA,EAEC,SAFe;EAAA,KAAA,CAAA,EAAA,MAAA;
|
|
1
|
+
{"version":3,"file":"MultiSwitch.d.ts","names":[],"sources":["../../../../src/components/controls/multi-switch/MultiSwitch.tsx"],"sourcesContent":[],"mappings":";;;KAYY,gBAAA;UACF;EADE,QAAA,CAAA,EAEC,SAFe;EAAA,KAAA,CAAA,EAAA,MAAA;MAClB,CAAA,EAAA,MAAA;UACG,CAAA,EAAA,CAAA,KAAA,EAAA,MAAA,EAAA,GAAA,IAAA;EAAS,UAAA,CAAA,EAAA;IAkBT,IAAA,CAAA,EAAA,MAiBZ;IAAA,KAAA,CAAA,EAAA,MAAA;;;IAbE,IAAA,CAAA,EAAA,MAAA;IAAmB,YAAA,CAAA,EAAA,MAAA;IAAS,KAAA,CAAA,EAAA,MAAA;;;;;;cAJlB;;;;;KAIV,mBAAmB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiSwitch.js","names":[],"sources":["../../../../src/components/controls/multi-switch/MultiSwitch.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n multiSwitchGroupRoot,\n multiSwitchLabel,\n multiSwitchRoot,\n multiSwitchSettings,\n} from '@mage-ui/styled-system/recipes';\n\nimport { RadioGroup } from '../radio/RadioGroup';\n\nexport type MultiSwitchProps = {\n label?: ReactNode;\n children?: ReactNode;\n value?: string;\n name?: string;\n onChange?: (value: string) => void;\n classNames?: {\n root?: string;\n radio?: string;\n icon?: string;\n inner?: string;\n body?: string;\n labelWrapper?: string;\n label?: string;\n description?: string;\n error?: string;\n groupRoot?: string;\n };\n};\n\nexport const MultiSwitch = ({\n classNames,\n children,\n ...props\n}: MultiSwitchProps): ReactNode => {\n return (\n <RadioGroup\n classNames={{\n root: cx(classNames?.root ?? multiSwitchSettings(), multiSwitchRoot()),\n label: classNames?.label ?? multiSwitchLabel(),\n groupRoot: classNames?.groupRoot ?? multiSwitchGroupRoot(),\n }}\n {...props}\n >\n {children}\n </RadioGroup>\n );\n};\n\nMultiSwitch.displayName = 'MultiSwitch';\n"],"mappings":"sRAgCA,MAAa,
|
|
1
|
+
{"version":3,"file":"MultiSwitch.js","names":[],"sources":["../../../../src/components/controls/multi-switch/MultiSwitch.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n multiSwitchGroupRoot,\n multiSwitchLabel,\n multiSwitchRoot,\n multiSwitchSettings,\n} from '@mage-ui/styled-system/recipes';\n\nimport { RadioGroup } from '../radio/RadioGroup';\n\nexport type MultiSwitchProps = {\n label?: ReactNode;\n children?: ReactNode;\n value?: string;\n name?: string;\n onChange?: (value: string) => void;\n classNames?: {\n root?: string;\n radio?: string;\n icon?: string;\n inner?: string;\n body?: string;\n labelWrapper?: string;\n label?: string;\n description?: string;\n error?: string;\n groupRoot?: string;\n };\n};\n\nexport const MultiSwitch = ({\n classNames,\n children,\n ...props\n}: MultiSwitchProps): ReactNode => {\n return (\n <RadioGroup\n classNames={{\n root: cx(classNames?.root ?? multiSwitchSettings(), multiSwitchRoot()),\n label: classNames?.label ?? multiSwitchLabel(),\n groupRoot: classNames?.groupRoot ?? multiSwitchGroupRoot(),\n }}\n {...props}\n >\n {children}\n </RadioGroup>\n );\n};\n\nMultiSwitch.displayName = 'MultiSwitch';\n"],"mappings":"sRAgCA,MAAa,GAAe,CAC1B,aACA,WACA,GAAG,KAGD,EAAC,EAAA,CACC,WAAY,CACV,KAAM,EAAG,GAAY,MAAQ,GAAqB,CAAE,GAAiB,CAAC,CACtE,MAAO,GAAY,OAAS,GAAkB,CAC9C,UAAW,GAAY,WAAa,GAAsB,CAC3D,CACD,GAAI,EAEH,YACU,CAIjB,EAAY,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.d.ts","names":[],"sources":["../../../../src/components/controls/radio/Radio.tsx"],"sourcesContent":[],"mappings":";;;KAgBY,UAAA;UACF;EADE,KAAA,CAAA,EAEF,SAFY;EAAA,WAAA,CAAA,EAGN,SAHM;
|
|
1
|
+
{"version":3,"file":"Radio.d.ts","names":[],"sources":["../../../../src/components/controls/radio/Radio.tsx"],"sourcesContent":[],"mappings":";;;KAgBY,UAAA;UACF;EADE,KAAA,CAAA,EAEF,SAFY;EAAA,WAAA,CAAA,EAGN,SAHM;OACZ,CAAA,EAAA,MAAA;MACA,CAAA,EAAA,MAAA;SACM,CAAA,EAAA,OAAA;EAAS,QAAA,CAAA,EAAA,OAAA;EAkBZ,UAiBZ,CAAA,EAAA;IAAA,IAAA,CAAA,EAAA,MAAA;;IAjB+C,IAAA,CAAA,EAAA,MAAA;IAAa,KAAA,CAAA,EAAA,MAAA;IAAS,IAAA,CAAA,EAAA,MAAA;;;;;;;cAAzD;;;;KAAmC,aAAa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.js","names":["Radio","RadioMantine"],"sources":["../../../../src/components/controls/radio/Radio.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n radio,\n radioBody,\n radioDescription,\n radioError,\n radioIcon,\n radioInner,\n radioLabel,\n radioLabelWrapper,\n radioRoot,\n} from '@mage-ui/styled-system/recipes';\nimport { Radio as RadioMantine } from '@mantine/core';\n\nexport type RadioProps = {\n label?: ReactNode;\n error?: ReactNode;\n description?: ReactNode;\n value?: string;\n name?: string;\n checked?: boolean;\n disabled?: boolean;\n classNames?: {\n root?: string;\n radio?: string;\n icon?: string;\n inner?: string;\n body?: string;\n labelWrapper?: string;\n label?: string;\n description?: string;\n error?: string;\n };\n};\n\nexport const Radio = ({ classNames, ...props }: RadioProps): ReactNode => {\n return (\n <RadioMantine\n classNames={{\n root: classNames?.root ?? radioRoot(),\n radio: cx(classNames?.radio ?? radio(), 'peer'),\n icon: classNames?.icon ?? radioIcon(),\n inner: classNames?.inner ?? radioInner(),\n body: classNames?.body ?? radioBody(),\n labelWrapper: classNames?.labelWrapper ?? radioLabelWrapper(),\n label: classNames?.label ?? radioLabel(),\n description: classNames?.description ?? radioDescription(),\n error: classNames?.error ?? radioError(),\n }}\n {...props}\n />\n );\n};\n\nRadio.displayName = 'Radio';\n"],"mappings":"+TAqCA,MAAaA,
|
|
1
|
+
{"version":3,"file":"Radio.js","names":["Radio","RadioMantine"],"sources":["../../../../src/components/controls/radio/Radio.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n radio,\n radioBody,\n radioDescription,\n radioError,\n radioIcon,\n radioInner,\n radioLabel,\n radioLabelWrapper,\n radioRoot,\n} from '@mage-ui/styled-system/recipes';\nimport { Radio as RadioMantine } from '@mantine/core';\n\nexport type RadioProps = {\n label?: ReactNode;\n error?: ReactNode;\n description?: ReactNode;\n value?: string;\n name?: string;\n checked?: boolean;\n disabled?: boolean;\n classNames?: {\n root?: string;\n radio?: string;\n icon?: string;\n inner?: string;\n body?: string;\n labelWrapper?: string;\n label?: string;\n description?: string;\n error?: string;\n };\n};\n\nexport const Radio = ({ classNames, ...props }: RadioProps): ReactNode => {\n return (\n <RadioMantine\n classNames={{\n root: classNames?.root ?? radioRoot(),\n radio: cx(classNames?.radio ?? radio(), 'peer'),\n icon: classNames?.icon ?? radioIcon(),\n inner: classNames?.inner ?? radioInner(),\n body: classNames?.body ?? radioBody(),\n labelWrapper: classNames?.labelWrapper ?? radioLabelWrapper(),\n label: classNames?.label ?? radioLabel(),\n description: classNames?.description ?? radioDescription(),\n error: classNames?.error ?? radioError(),\n }}\n {...props}\n />\n );\n};\n\nRadio.displayName = 'Radio';\n"],"mappings":"+TAqCA,MAAaA,GAAS,CAAE,aAAY,GAAG,KAEnC,EAACC,EAAAA,CACC,WAAY,CACV,KAAM,GAAY,MAAQ,GAAW,CACrC,MAAO,EAAG,GAAY,OAAS,GAAO,CAAE,OAAO,CAC/C,KAAM,GAAY,MAAQ,GAAW,CACrC,MAAO,GAAY,OAAS,GAAY,CACxC,KAAM,GAAY,MAAQ,GAAW,CACrC,aAAc,GAAY,cAAgB,GAAmB,CAC7D,MAAO,GAAY,OAAS,GAAY,CACxC,YAAa,GAAY,aAAe,GAAkB,CAC1D,MAAO,GAAY,OAAS,GAAY,CACzC,CACD,GAAI,GACJ,CAIN,EAAM,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.d.ts","names":[],"sources":["../../../../src/components/controls/radio/RadioGroup.tsx"],"sourcesContent":[],"mappings":";;;KAWY,eAAA;UACF;EADE,KAAA,CAAA,EAEF,SAFE;EAAe,WAAA,CAAA,EAGX,SAHW;
|
|
1
|
+
{"version":3,"file":"RadioGroup.d.ts","names":[],"sources":["../../../../src/components/controls/radio/RadioGroup.tsx"],"sourcesContent":[],"mappings":";;;KAWY,eAAA;UACF;EADE,KAAA,CAAA,EAEF,SAFE;EAAe,WAAA,CAAA,EAGX,SAHW;UACjB,CAAA,EAGG,SAHH;OACA,CAAA,EAAA,MAAA;MACM,CAAA,EAAA,MAAA;UACH,CAAA,EAAA,CAAA,KAAA,EAAA,MAAA,EAAA,GAAA,IAAA;EAAS,UAAA,CAAA,EAAA"}
|