@mage-ui/components 0.0.50 → 0.0.51
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-icon/ButtonIcon.d.ts +2 -2
- package/dist/components/controls/dropdown/Menu.d.ts +1 -3
- 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/data-display/avatar/Avatar.d.ts +2 -2
- package/dist/components/data-display/badge/Badge.d.ts +2 -2
- package/dist/components/data-display/carousel/Carousel.d.ts +2 -2
- package/dist/components/forms/form/Form.d.ts +13 -13
- package/dist/components/navigation/breadcrumbs/Breadcrumbs.d.ts +2 -2
- package/package.json +3 -3
|
@@ -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,7 +15,7 @@ declare const ButtonIcon: ({
|
|
|
15
15
|
icon,
|
|
16
16
|
classNames,
|
|
17
17
|
...props
|
|
18
|
-
}: ButtonIconProps) =>
|
|
18
|
+
}: ButtonIconProps) => react_jsx_runtime5.JSX.Element;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { ButtonIcon, ButtonIconProps };
|
|
21
21
|
//# sourceMappingURL=ButtonIcon.d.ts.map
|
|
@@ -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;;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,
|
|
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,QA+CZ,CAAA,EApDY,KAAA,CAAM,SAoDlB;EAAA,OAAA,CAAA,EAnDW,KAAA,CAAM,SAmDjB;cAlDa,KAAA,CAAM;;cAGP;;;;;;;;;;KASV,YAAS,kBAAA,CAAA,GAAA,CAAA;;;;OA6CkB,kBAAe,MAAA,CAAA;;;;KALxC,eAAA;OAKyB,EAAA,MAAA;UAAe,EAHjC,KAAA,CAAM,SAG2B;CAAA"}
|
|
@@ -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);return i(t,{setSelectedOption:
|
|
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:()=>{},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{value:r,children:a}=e.props;return i(t.Option,{value:r,classNames:{option:u?.option??n()},children:a})})})},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":["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
|
|
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 return (\n <DropdownBase\n setSelectedOption={() => {}}\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 { value, children } = child.props;\n\n return (\n <DropdownBase.Option\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 value: string;\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,CAED,OACE,EAAC,EAAA,CACC,sBAAyB,GACzB,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,QAAO,SAAA,GAAa,EAAM,MAElC,OACE,EAAC,EAAa,OAAA,CACL,QACP,WAAY,CAAE,OAAQ,GAAY,QAAU,GAAgB,CAAE,UAE7DA,GACmB,EAExB,EACW,EASb,GAAU,CAAE,cACT,EAGT,EAAO,YAAc,cACrB,EAAK,OAAS"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime14 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/data-display/avatar/Avatar.d.ts
|
|
4
4
|
type AvatarProps = {
|
|
@@ -13,7 +13,7 @@ type AvatarProps = {
|
|
|
13
13
|
declare const Avatar: ({
|
|
14
14
|
classNames,
|
|
15
15
|
...props
|
|
16
|
-
}: AvatarProps) =>
|
|
16
|
+
}: AvatarProps) => react_jsx_runtime14.JSX.Element;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { Avatar, AvatarProps };
|
|
19
19
|
//# sourceMappingURL=Avatar.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime15 from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/data-display/badge/Badge.d.ts
|
|
@@ -17,7 +17,7 @@ declare const Badge: ({
|
|
|
17
17
|
startSlot,
|
|
18
18
|
classNames,
|
|
19
19
|
...props
|
|
20
|
-
}: BadgeProps) =>
|
|
20
|
+
}: BadgeProps) => react_jsx_runtime15.JSX.Element;
|
|
21
21
|
//#endregion
|
|
22
22
|
export { Badge, BadgeProps };
|
|
23
23
|
//# sourceMappingURL=Badge.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime16 from "react/jsx-runtime";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/data-display/carousel/Carousel.d.ts
|
|
@@ -40,7 +40,7 @@ declare const Carousel: {
|
|
|
40
40
|
({
|
|
41
41
|
classNames,
|
|
42
42
|
...props
|
|
43
|
-
}: CarouselProps):
|
|
43
|
+
}: CarouselProps): react_jsx_runtime16.JSX.Element;
|
|
44
44
|
Slide: {
|
|
45
45
|
({
|
|
46
46
|
children
|
|
@@ -11,7 +11,7 @@ import { FormDatePickerProps } from "./controls/FormDatePicker.js";
|
|
|
11
11
|
import { FormInputFileProps } from "./controls/FormInputFile.js";
|
|
12
12
|
import { FormInputPasswordProps } from "./controls/FormInputPassword.js";
|
|
13
13
|
import { FormIfFieldProps } from "./controls/FormIfField.js";
|
|
14
|
-
import * as
|
|
14
|
+
import * as react_jsx_runtime17 from "react/jsx-runtime";
|
|
15
15
|
import { ReactNode } from "react";
|
|
16
16
|
import { ZodEffects, ZodObject, ZodRawShape, z } from "zod";
|
|
17
17
|
|
|
@@ -29,11 +29,11 @@ declare const Form: {
|
|
|
29
29
|
onSubmit,
|
|
30
30
|
children,
|
|
31
31
|
...props
|
|
32
|
-
}: FormProps):
|
|
32
|
+
}: FormProps): react_jsx_runtime17.JSX.Element;
|
|
33
33
|
InputText: {
|
|
34
34
|
({
|
|
35
35
|
...props
|
|
36
|
-
}: FormInputTextProps):
|
|
36
|
+
}: FormInputTextProps): react_jsx_runtime17.JSX.Element;
|
|
37
37
|
displayName: string;
|
|
38
38
|
rules: {
|
|
39
39
|
required: (message?: string, min?: number) => z.ZodString;
|
|
@@ -44,7 +44,7 @@ declare const Form: {
|
|
|
44
44
|
name,
|
|
45
45
|
control,
|
|
46
46
|
...props
|
|
47
|
-
}: FormCheckboxProps):
|
|
47
|
+
}: FormCheckboxProps): react_jsx_runtime17.JSX.Element;
|
|
48
48
|
displayName: string;
|
|
49
49
|
rules: {
|
|
50
50
|
required: (message?: string) => ZodEffects<z.ZodBoolean, boolean, boolean>;
|
|
@@ -56,7 +56,7 @@ declare const Form: {
|
|
|
56
56
|
control,
|
|
57
57
|
children,
|
|
58
58
|
...props
|
|
59
|
-
}: FormCheckboxGroupProps):
|
|
59
|
+
}: FormCheckboxGroupProps): react_jsx_runtime17.JSX.Element;
|
|
60
60
|
displayName: string;
|
|
61
61
|
rules: {
|
|
62
62
|
required: (message?: string) => z.ZodArray<z.ZodString, "many">;
|
|
@@ -74,7 +74,7 @@ declare const Form: {
|
|
|
74
74
|
name,
|
|
75
75
|
control,
|
|
76
76
|
...props
|
|
77
|
-
}: FormComboboxProps):
|
|
77
|
+
}: FormComboboxProps): react_jsx_runtime17.JSX.Element;
|
|
78
78
|
displayName: string;
|
|
79
79
|
rules: {
|
|
80
80
|
required: (message?: string, defaultValue?: {
|
|
@@ -104,20 +104,20 @@ declare const Form: {
|
|
|
104
104
|
control,
|
|
105
105
|
children,
|
|
106
106
|
...props
|
|
107
|
-
}: FormRadioGroupProps):
|
|
107
|
+
}: FormRadioGroupProps): react_jsx_runtime17.JSX.Element;
|
|
108
108
|
displayName: string;
|
|
109
109
|
rules: {
|
|
110
110
|
required: (message?: string) => ZodEffects<z.ZodAny, any, any>;
|
|
111
111
|
};
|
|
112
112
|
};
|
|
113
113
|
Radio: {
|
|
114
|
-
(props: RadioProps):
|
|
114
|
+
(props: RadioProps): react_jsx_runtime17.JSX.Element;
|
|
115
115
|
displayName: string;
|
|
116
116
|
};
|
|
117
117
|
Textarea: {
|
|
118
118
|
({
|
|
119
119
|
...props
|
|
120
|
-
}: FormTextareaProps):
|
|
120
|
+
}: FormTextareaProps): react_jsx_runtime17.JSX.Element;
|
|
121
121
|
displayName: string;
|
|
122
122
|
rules: {
|
|
123
123
|
required: (message?: string, min?: number) => z.ZodString;
|
|
@@ -128,7 +128,7 @@ declare const Form: {
|
|
|
128
128
|
name,
|
|
129
129
|
control,
|
|
130
130
|
...props
|
|
131
|
-
}: FormSelectProps):
|
|
131
|
+
}: FormSelectProps): react_jsx_runtime17.JSX.Element;
|
|
132
132
|
displayName: string;
|
|
133
133
|
rules: {
|
|
134
134
|
required: (message?: string, defaultValue?: {
|
|
@@ -157,7 +157,7 @@ declare const Form: {
|
|
|
157
157
|
name,
|
|
158
158
|
control,
|
|
159
159
|
...props
|
|
160
|
-
}: FormDatePickerProps):
|
|
160
|
+
}: FormDatePickerProps): react_jsx_runtime17.JSX.Element;
|
|
161
161
|
displayName: string;
|
|
162
162
|
rules: {
|
|
163
163
|
required: (message?: string) => ZodEffects<z.ZodUnion<[z.ZodType<Date, z.ZodTypeDef, Date>, ZodEffects<z.ZodString, string, string>]>, string | Date, string | Date>;
|
|
@@ -168,7 +168,7 @@ declare const Form: {
|
|
|
168
168
|
control,
|
|
169
169
|
name,
|
|
170
170
|
...props
|
|
171
|
-
}: FormInputFileProps):
|
|
171
|
+
}: FormInputFileProps): react_jsx_runtime17.JSX.Element;
|
|
172
172
|
displayName: string;
|
|
173
173
|
rules: {
|
|
174
174
|
required: (message?: string, min?: number) => ZodEffects<z.ZodAny, any, any>;
|
|
@@ -177,7 +177,7 @@ declare const Form: {
|
|
|
177
177
|
InputPassword: {
|
|
178
178
|
({
|
|
179
179
|
...props
|
|
180
|
-
}: FormInputPasswordProps):
|
|
180
|
+
}: FormInputPasswordProps): react_jsx_runtime17.JSX.Element;
|
|
181
181
|
displayName: string;
|
|
182
182
|
rules: {
|
|
183
183
|
required: (message?: string) => z.ZodString;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/navigation/breadcrumbs/Breadcrumbs.d.ts
|
|
@@ -17,7 +17,7 @@ declare const Breadcrumbs: {
|
|
|
17
17
|
separator,
|
|
18
18
|
children,
|
|
19
19
|
classNames
|
|
20
|
-
}: BreadcrumbsProps):
|
|
20
|
+
}: BreadcrumbsProps): react_jsx_runtime4.JSX.Element;
|
|
21
21
|
Item: {
|
|
22
22
|
({
|
|
23
23
|
children
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mage-ui/components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.51",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [],
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"rimraf": "^6.0.1",
|
|
27
27
|
"tsdown": "^0.15.6",
|
|
28
28
|
"typescript": "^5.9.3",
|
|
29
|
-
"@mage-ui/preset": "0.0.
|
|
30
|
-
"@mage-ui/styled-system": "0.0.
|
|
29
|
+
"@mage-ui/preset": "0.0.51",
|
|
30
|
+
"@mage-ui/styled-system": "0.0.51"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@hookform/resolvers": "^5.2.2",
|