@mage-ui/components 0.0.44 → 0.0.46
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 -2
- package/dist/components/buttons/button-icon/ButtonIcon.d.ts +2 -2
- package/dist/components/buttons/button-icon/ButtonIcon.d.ts.map +1 -1
- package/dist/components/controls/dropdown/Combobox.d.ts +2 -2
- package/dist/components/controls/dropdown/DropdownBase.d.ts +3 -0
- package/dist/components/controls/dropdown/DropdownBase.js +1 -1
- package/dist/components/controls/dropdown/DropdownBase.js.map +1 -1
- package/dist/components/controls/dropdown/{DropdownButton.d.ts → Menu.d.ts} +11 -10
- package/dist/components/controls/dropdown/Menu.d.ts.map +1 -0
- package/dist/components/controls/dropdown/{DropdownButton.js → Menu.js} +2 -2
- package/dist/components/controls/dropdown/Menu.js.map +1 -0
- package/dist/components/controls/dropdown/Select.d.ts +2 -2
- package/dist/components/controls/input-file/InputFile.d.ts +2 -2
- package/dist/components/controls/input-password/InputPassword.d.ts +2 -2
- package/dist/components/controls/input-text/InputText.d.ts +2 -2
- package/dist/components/controls/textarea/Textarea.d.ts +2 -2
- 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/forms/form/Form.d.ts.map +1 -1
- package/dist/components/misc/visually-hidden/VisuallyHidden.d.ts +2 -2
- package/dist/components/misc/visually-hidden/VisuallyHidden.d.ts.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/tabs/Tabs.d.ts +5 -5
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/panda.json +12 -3
- package/package.json +4 -4
- package/dist/components/controls/dropdown/DropdownButton.d.ts.map +0 -1
- package/dist/components/controls/dropdown/DropdownButton.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime35 from "react/jsx-runtime";
|
|
2
2
|
import { ComponentProps, ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/buttons/button/Button.d.ts
|
|
@@ -19,7 +19,7 @@ declare const Button: ({
|
|
|
19
19
|
endSlot,
|
|
20
20
|
children,
|
|
21
21
|
...props
|
|
22
|
-
}: ButtonProps) =>
|
|
22
|
+
}: ButtonProps) => react_jsx_runtime35.JSX.Element;
|
|
23
23
|
//# sourceMappingURL=Button.d.ts.map
|
|
24
24
|
|
|
25
25
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ButtonProps } from "../button/Button.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime8 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_runtime8.JSX.Element;
|
|
19
19
|
//# sourceMappingURL=ButtonIcon.d.ts.map
|
|
20
20
|
|
|
21
21
|
//#endregion
|
|
@@ -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;EAAA,CAAA;CAlB0B;AAAA,cAAd,UAAc,EAAA,CAAA;EAAA,KAAA;EAAA,IAAA;EAAA,UAAA;EAAA,GAAA;AAAA,CAAA,EAKxB,eALwB,EAAA,GAKT,
|
|
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;EAAA,CAAA;CAlB0B;AAAA,cAAd,UAAc,EAAA,CAAA;EAAA,KAAA;EAAA,IAAA;EAAA,UAAA;EAAA,GAAA;AAAA,CAAA,EAKxB,eALwB,EAAA,GAKT,kBAAA,CAAA,GAAA,CAAA,OALS"}
|
|
@@ -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_runtime38 from "react/jsx-runtime";
|
|
4
4
|
import React from "react";
|
|
5
5
|
|
|
6
6
|
//#region src/components/controls/dropdown/Combobox.d.ts
|
|
@@ -34,7 +34,7 @@ declare const Combobox: ({
|
|
|
34
34
|
create,
|
|
35
35
|
empty,
|
|
36
36
|
...props
|
|
37
|
-
}: ComboboxProps) =>
|
|
37
|
+
}: ComboboxProps) => react_jsx_runtime38.JSX.Element;
|
|
38
38
|
//# sourceMappingURL=Combobox.d.ts.map
|
|
39
39
|
|
|
40
40
|
//#endregion
|
|
@@ -19,6 +19,9 @@ type DropdownBaseProps = {
|
|
|
19
19
|
endSlot?: React.ReactNode;
|
|
20
20
|
startSlot?: React.ReactNode;
|
|
21
21
|
children: React.ReactNode;
|
|
22
|
+
portal?: boolean;
|
|
23
|
+
position?: 'bottom' | 'bottom-start' | 'bottom-end' | 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end';
|
|
24
|
+
width?: number | string;
|
|
22
25
|
};
|
|
23
26
|
//#endregion
|
|
24
27
|
export { DropdownBaseProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{comboboxOptions as e,dropdown as t}from"@mage-ui/styled-system/recipes";import{Combobox as n,useCombobox as r}from"@mantine/core";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{cloneElement as o}from"react";const s=({defaultOpened:s,readOnly:c,setQuery:l,setSelectedOption:u,selectedOption:d,target:f,classNames:p,children:m,endSlot:h,startSlot:g,...
|
|
1
|
+
import{comboboxOptions as e,dropdown as t}from"@mage-ui/styled-system/recipes";import{Combobox as n,useCombobox as r}from"@mantine/core";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{cloneElement as o}from"react";const s=({defaultOpened:s,readOnly:c,setQuery:l,setSelectedOption:u,selectedOption:d,target:f,classNames:p,children:m,endSlot:h,startSlot:g,position:_,portal:v,width:y,...b})=>{let x=r({defaultOpened:s??!1,scrollBehavior:`smooth`,onDropdownClose:()=>{x.resetSelectedOption()}}),S=o(f,{...f?.props??{},onChange:({currentTarget:e})=>{l?.(e.value),x.openDropdown(),x.updateSelectedOptionIndex()},onBlur:()=>{l?.(d?.value??``)},onClick:()=>{c?x.toggleDropdown():x.openDropdown()},startSlot:g,endSlot:h});return a(n,{readOnly:c??!1,onOptionSubmit:e=>{u(e),l?.(e),x.closeDropdown()},store:x,withinPortal:v||!0,position:_||`bottom-start`,width:y||`auto`,...b,children:[i(n.Target,{children:S}),i(n.Dropdown,{classNames:{dropdown:p?.dropdown??t()},children:i(n.Options,{classNames:{options:p?.options??e()},children:m})})]})};s.Option=n.Option,s.Option.displayName=`DropdownBase.Option`,s.Empty=n.Empty,s.Empty.displayName=`DropdownBase.Empty`;export{s as DropdownBase};
|
|
2
2
|
//# sourceMappingURL=DropdownBase.js.map
|
|
@@ -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};\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 ...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 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={true}\n position='bottom-start'\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":"
|
|
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,EAAe,CAAC,CAC3B,gBACA,WACA,WACA,oBACA,iBACA,SACA,aACA,WACA,UACA,YACA,WACA,SACA,QACA,GAAG,EACe,GAAK,CASvB,IARM,EAAW,EAAY,CAC3B,cAAe,IAAiB,EAChC,eAAgB,SAChB,gBAAiB,IAAM,CACrB,EAAS,qBAAqB,AAC/B,CACF,EAAC,CAEI,EAAkB,EAAa,EAAQ,CAC3C,GAAI,GAAQ,OAAS,CAAE,EACvB,SAAU,CAAC,CACT,gBACkD,GAAK,CAGvD,AAFA,IAAW,EAAc,MAAM,CAC/B,EAAS,cAAc,CACvB,EAAS,2BAA2B,AACrC,EACD,OAAQ,IAAM,CACZ,IAAW,GAAgB,OAAS,GAAG,AACxC,EACD,QAAS,IAAM,CACb,AAAI,EACF,EAAS,gBAAgB,CAEzB,EAAS,cAAc,AAE1B,EAEU,YACF,SACV,EAA0D,CAE3D,MACE,GAACA,EAAAA,CACC,SAAU,IAAY,EACtB,eAAgB,AAAC,GAAW,CAG1B,AAFA,EAAkB,EAAO,CACzB,IAAW,EAAO,CAClB,EAAS,eAAe,AACzB,EACD,MAAO,EACP,aAAc,IAAU,EACxB,SAAU,GAAY,eACtB,MAAO,GAAS,OAChB,GAAI,YAEJ,EAACA,EAAgB,OAAA,CAAA,SAAQ,CAAA,EAAyC,CAClE,EAACA,EAAgB,SAAA,CACf,WAAY,CACV,SAAU,GAAY,UAAY,GAAU,AAC7C,WAED,EAACA,EAAgB,QAAA,CACf,WAAY,CACV,QAAS,GAAY,SAAW,GAAiB,AAClD,EAEA,YACuB,EACD,GACX,AAErB,EAKD,AAHA,EAAa,OAASA,EAAgB,OACtC,EAAa,OAAO,YAAc,sBAClC,EAAa,MAAQA,EAAgB,MACrC,EAAa,MAAM,YAAc"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as
|
|
1
|
+
import { DropdownBaseProps } from "./DropdownBase.js";
|
|
2
|
+
import * as react_jsx_runtime39 from "react/jsx-runtime";
|
|
3
|
+
import * as react40 from "react";
|
|
3
4
|
|
|
4
|
-
//#region src/components/controls/dropdown/
|
|
5
|
-
type
|
|
5
|
+
//#region src/components/controls/dropdown/Menu.d.ts
|
|
6
|
+
type MenuProps = Omit<DropdownBaseProps, 'setSelectedOption' | 'target' | 'opened'> & {
|
|
6
7
|
label?: React.ReactNode;
|
|
7
8
|
a11yLabel?: string;
|
|
8
9
|
classNames?: {
|
|
@@ -19,7 +20,7 @@ type DropdownButtonProps = {
|
|
|
19
20
|
endSlot?: React.ReactNode;
|
|
20
21
|
startSlot?: React.ReactNode;
|
|
21
22
|
};
|
|
22
|
-
declare const
|
|
23
|
+
declare const Menu: {
|
|
23
24
|
({
|
|
24
25
|
label,
|
|
25
26
|
a11yLabel,
|
|
@@ -29,20 +30,20 @@ declare const DropdownButton: {
|
|
|
29
30
|
endSlot,
|
|
30
31
|
startSlot,
|
|
31
32
|
...props
|
|
32
|
-
}:
|
|
33
|
+
}: MenuProps): react_jsx_runtime39.JSX.Element;
|
|
33
34
|
Option: {
|
|
34
35
|
({
|
|
35
36
|
children
|
|
36
|
-
}:
|
|
37
|
+
}: MenuOptionProps): react40.ReactNode;
|
|
37
38
|
displayName: string;
|
|
38
39
|
};
|
|
39
40
|
};
|
|
40
|
-
type
|
|
41
|
+
type MenuOptionProps = {
|
|
41
42
|
id: string | number;
|
|
42
43
|
value: string;
|
|
43
44
|
onClick: () => void;
|
|
44
45
|
children?: React.ReactNode;
|
|
45
46
|
};
|
|
46
47
|
//#endregion
|
|
47
|
-
export {
|
|
48
|
-
//# sourceMappingURL=
|
|
48
|
+
export { Menu, MenuProps };
|
|
49
|
+
//# sourceMappingURL=Menu.d.ts.map
|
|
@@ -0,0 +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;EAAA,CAAA;EACF,gBADK,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;EAAA,SAAA,CAAA,EAxDa,KAAA,CAAM,SAwDnB;;cArDY;;;;;;;;;;KASV,YAAS,mBAAA,CAAA,GAAA,CAAA;;;;OAqDkB,kBAAe,OAAA,CAAA;;;CArDjC;KA8CP,eAAA,GA9CO;MAqDkB,MAAA,GAAA,MAAA;EAAe,KAAA,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),_=e=>{let t=g.find(t=>t.props.value===e);t&&t.props.onClick()};return i(t,{setSelectedOption:_,target:i(e,{classNames:d,...l&&{"aria-label":l},children:c}),classNames:{dropdown:u?.dropdown??r(
|
|
2
|
-
//# sourceMappingURL=
|
|
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),_=e=>{let t=g.find(t=>t.props.value===e);t&&t.props.onClick()};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{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
|
+
//# sourceMappingURL=Menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Menu.js","names":["value?: string","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":"oRA2FA,MA9Da,EAAO,CAAC,CACnB,QACA,YACA,aACA,mBACA,WACA,UACA,YACA,GAAG,EACO,GAAK,CAMf,IALM,EAAU,EAAS,QAAQ,EAAS,CAAC,OACzC,AAAC,GACC,EAAe,EAAM,EAAI,EAAM,OAAS,EAAK,OAChD,CAEK,EAAqB,AAACA,GAAmB,CAC7C,IAAM,EAAW,EAAQ,KAAK,AAAC,GAAU,EAAM,MAAM,QAAU,EAAM,CACrE,AAAI,GAAU,EAAS,MAAM,SAAS,AACvC,EAED,MACE,GAAC,EAAA,CACC,kBAAmB,EACnB,OACE,EAAC,EAAA,CACC,WAAY,EACZ,GAAK,GAAa,CAAE,aAAc,CAAW,WAE5C,GACM,CAEX,WAAY,CACV,SAAU,GAAY,UAAY,GAAU,AAC7C,EACU,YACF,UACT,GAAI,WAEH,EAAQ,IAAI,AAAC,GAAU,CACtB,GAAM,CAAE,KAAI,QAAO,SAAA,EAAU,CAAG,EAAM,MAEtC,MACE,GAAC,EAAa,OAAA,CAEL,QACP,WAAY,CAAE,OAAQ,GAAY,QAAU,GAAgB,AAAE,WAE7DC,GAJI,EAKe,AAEzB,EAAC,EACW,AAElB,EASK,EAAS,CAAC,CAAE,WAA2B,GACpC,EAIT,AADA,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_runtime41 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,7 +23,7 @@ declare const Select: ({
|
|
|
23
23
|
options,
|
|
24
24
|
classNames,
|
|
25
25
|
...props
|
|
26
|
-
}: SelectProps) =>
|
|
26
|
+
}: SelectProps) => react_jsx_runtime41.JSX.Element;
|
|
27
27
|
//# sourceMappingURL=Select.d.ts.map
|
|
28
28
|
|
|
29
29
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime42 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/controls/input-file/InputFile.d.ts
|
|
4
4
|
type InputFileProps = {
|
|
@@ -26,7 +26,7 @@ declare const InputFile: ({
|
|
|
26
26
|
multiple,
|
|
27
27
|
badgeClassName,
|
|
28
28
|
...props
|
|
29
|
-
}: InputFileProps) =>
|
|
29
|
+
}: InputFileProps) => react_jsx_runtime42.JSX.Element;
|
|
30
30
|
//# sourceMappingURL=InputFile.d.ts.map
|
|
31
31
|
//#endregion
|
|
32
32
|
export { InputFile, InputFileProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime43 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,7 +26,7 @@ declare const InputPassword: ({
|
|
|
26
26
|
startSlot,
|
|
27
27
|
endSlot,
|
|
28
28
|
...props
|
|
29
|
-
}: InputPasswordProps) =>
|
|
29
|
+
}: InputPasswordProps) => react_jsx_runtime43.JSX.Element;
|
|
30
30
|
//# sourceMappingURL=InputPassword.d.ts.map
|
|
31
31
|
//#endregion
|
|
32
32
|
export { InputPassword, InputPasswordProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime44 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,7 +25,7 @@ declare const InputText: ({
|
|
|
25
25
|
startSlot,
|
|
26
26
|
endSlot,
|
|
27
27
|
...props
|
|
28
|
-
}: InputTextProps) =>
|
|
28
|
+
}: InputTextProps) => react_jsx_runtime44.JSX.Element;
|
|
29
29
|
//# sourceMappingURL=InputText.d.ts.map
|
|
30
30
|
//#endregion
|
|
31
31
|
export { InputText, InputTextProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime37 from "react/jsx-runtime";
|
|
2
2
|
import { ComponentProps, ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/controls/textarea/Textarea.d.ts
|
|
@@ -27,7 +27,7 @@ declare const Textarea: ({
|
|
|
27
27
|
autosize,
|
|
28
28
|
onChange,
|
|
29
29
|
...props
|
|
30
|
-
}: TextareaProps) =>
|
|
30
|
+
}: TextareaProps) => react_jsx_runtime37.JSX.Element;
|
|
31
31
|
//# sourceMappingURL=Textarea.d.ts.map
|
|
32
32
|
|
|
33
33
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime45 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_runtime45.JSX.Element;
|
|
17
17
|
//# sourceMappingURL=Avatar.d.ts.map
|
|
18
18
|
|
|
19
19
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime46 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_runtime46.JSX.Element;
|
|
21
21
|
//# sourceMappingURL=Badge.d.ts.map
|
|
22
22
|
|
|
23
23
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime47 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_runtime47.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_runtime9 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_runtime9.JSX.Element;
|
|
33
33
|
InputText: {
|
|
34
34
|
({
|
|
35
35
|
...props
|
|
36
|
-
}: FormInputTextProps):
|
|
36
|
+
}: FormInputTextProps): react_jsx_runtime9.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_runtime9.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_runtime9.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_runtime9.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_runtime9.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_runtime9.JSX.Element;
|
|
115
115
|
displayName: string;
|
|
116
116
|
};
|
|
117
117
|
Textarea: {
|
|
118
118
|
({
|
|
119
119
|
...props
|
|
120
|
-
}: FormTextareaProps):
|
|
120
|
+
}: FormTextareaProps): react_jsx_runtime9.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_runtime9.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_runtime9.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_runtime9.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_runtime9.JSX.Element;
|
|
181
181
|
displayName: string;
|
|
182
182
|
rules: {
|
|
183
183
|
required: (message?: string) => z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.d.ts","names":[],"sources":["../../../../src/components/forms/form/Form.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;KAwBY,SAAA;;UAEF,UAAU,eAAe,WAAW,UAAU;;YAE5C,KAAA,CAAM;;cAGL;;;;;;;KAMV,YAAS,
|
|
1
|
+
{"version":3,"file":"Form.d.ts","names":[],"sources":["../../../../src/components/forms/form/Form.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;KAwBY,SAAA;;UAEF,UAAU,eAAe,WAAW,UAAU;;YAE5C,KAAA,CAAM;;cAGL;;;;;;;KAMV,YAAS,kBAAA,CAAA,GAAA,CAAA;;;;OAAA;;;;;;;IAbA,CAAA;MAAA,IAAA;MAAS,OAAA;MAAA,GAAA;IAAA,CAAA,mBAAA,CAAA,gCAAA;IAAA,WAAA,EAAA,MAAA;IAED,KAAA,EAAA;MAAV,QAAA,EAAA,CAAA,OAAA,CAAA,EAAA,MAAA,EAAA,aAAA,aAAA,EAAA,OAAA,EAAA,OAAA,CAAA;IAA8C,CAAA;EAAW,CAAA;EAAZ,aAApB,EAAA;IAEvB,CAAA;MAAA,IAAM;MAAA,OAAA;MAAA,QAAA;MAAA,GAAA;IAAA,CAAA,wBAAA,CAAA,gCAAA;IAAS,WAAA,EAAA,MAAA;IAGd,KA8BZ,EAAA;MAAA,QAAA,EAAA,CAAA,OAAA,CAAA,EAAA,MAAA,EAAA,aAAA,YAAA,EAAA,MAAA,CAAA;IAAA,CAAA;;;;;;;IAxBE,CAAA;EAAS,CAAA;EAAA,QAAA,EAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime36 from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/misc/visually-hidden/VisuallyHidden.d.ts
|
|
@@ -7,7 +7,7 @@ type VisuallyHiddenProps = {
|
|
|
7
7
|
};
|
|
8
8
|
declare const VisuallyHidden: ({
|
|
9
9
|
children
|
|
10
|
-
}: VisuallyHiddenProps) =>
|
|
10
|
+
}: VisuallyHiddenProps) => react_jsx_runtime36.JSX.Element;
|
|
11
11
|
//# sourceMappingURL=VisuallyHidden.d.ts.map
|
|
12
12
|
|
|
13
13
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisuallyHidden.d.ts","names":[],"sources":["../../../../src/components/misc/visually-hidden/VisuallyHidden.tsx"],"sourcesContent":[],"mappings":";;;;KAKY,mBAAA;YACA,KAAA,CAAM;;AADN,cAIC,cAJkB,EACnB,CAAA;EAAA;AAAe,CAAT,EAG2B,mBAHlB,EAAA,GAGqC,
|
|
1
|
+
{"version":3,"file":"VisuallyHidden.d.ts","names":[],"sources":["../../../../src/components/misc/visually-hidden/VisuallyHidden.tsx"],"sourcesContent":[],"mappings":";;;;KAKY,mBAAA;YACA,KAAA,CAAM;;AADN,cAIC,cAJkB,EACnB,CAAA;EAAA;AAAe,CAAT,EAG2B,mBAHlB,EAAA,GAGqC,mBAAA,CAAA,GAAA,CAAA,OAHrC;AAG3B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime34 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_runtime34.JSX.Element;
|
|
21
21
|
Item: {
|
|
22
22
|
({
|
|
23
23
|
children
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.d.ts","names":[],"sources":["../../../../src/components/navigation/breadcrumbs/Breadcrumbs.tsx"],"sourcesContent":[],"mappings":";;;;KAgBY,gBAAA;cACE;;IADF,IAAA,CAAA,EAAA,MAAA;IAAgB,IAAA,CAAA,EAAA,MAAA;IACd,IAAA,CAAA,EAAA,MAAA;IAOD,SAAA,CAAA,EAAA,MAAA;EAAS,CAAA;EAGT,QAAA,CAAA,EAHA,SA6CZ;CAAA;AAAA,cA1CY,WA0CZ,EAAA;;;;;KAtCE,mBAAgB,
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.d.ts","names":[],"sources":["../../../../src/components/navigation/breadcrumbs/Breadcrumbs.tsx"],"sourcesContent":[],"mappings":";;;;KAgBY,gBAAA;cACE;;IADF,IAAA,CAAA,EAAA,MAAA;IAAgB,IAAA,CAAA,EAAA,MAAA;IACd,IAAA,CAAA,EAAA,MAAA;IAOD,SAAA,CAAA,EAAA,MAAA;EAAS,CAAA;EAGT,QAAA,CAAA,EAHA,SA6CZ;CAAA;AAAA,cA1CY,WA0CZ,EAAA;;;;;KAtCE,mBAAgB,mBAAA,CAAA,GAAA,CAAA;;IAAhB,CAAA;MAAA;IAAA,CAAA,EAyDyB,SAzDzB,CAAA,EAyDkC,SAzDlC;IAAgB,WAAA,EAAA,MAAA;EAAA,CAAA;;KAqDd,SAAA,GAIgC;EAAA,QAAA,EAHzB,SAGyB;AAnBnC,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TabsListProps } from "./TabsList.js";
|
|
2
2
|
import { TabsTabProps } from "./TabsTab.js";
|
|
3
3
|
import { TabsPanelProps } from "./TabsPanel.js";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
5
5
|
import React from "react";
|
|
6
6
|
|
|
7
7
|
//#region src/components/navigation/tabs/Tabs.d.ts
|
|
@@ -18,14 +18,14 @@ declare const Tabs: {
|
|
|
18
18
|
classNames,
|
|
19
19
|
children,
|
|
20
20
|
...props
|
|
21
|
-
}: TabsProps):
|
|
21
|
+
}: TabsProps): react_jsx_runtime1.JSX.Element;
|
|
22
22
|
displayName: string;
|
|
23
23
|
List: {
|
|
24
24
|
({
|
|
25
25
|
classNames,
|
|
26
26
|
children,
|
|
27
27
|
...props
|
|
28
|
-
}: TabsListProps):
|
|
28
|
+
}: TabsListProps): react_jsx_runtime1.JSX.Element;
|
|
29
29
|
displayName: string;
|
|
30
30
|
};
|
|
31
31
|
Tab: {
|
|
@@ -35,7 +35,7 @@ declare const Tabs: {
|
|
|
35
35
|
endSlot,
|
|
36
36
|
children,
|
|
37
37
|
...props
|
|
38
|
-
}: TabsTabProps):
|
|
38
|
+
}: TabsTabProps): react_jsx_runtime1.JSX.Element;
|
|
39
39
|
displayName: string;
|
|
40
40
|
};
|
|
41
41
|
Panel: {
|
|
@@ -43,7 +43,7 @@ declare const Tabs: {
|
|
|
43
43
|
classNames,
|
|
44
44
|
children,
|
|
45
45
|
...props
|
|
46
|
-
}: TabsPanelProps):
|
|
46
|
+
}: TabsPanelProps): react_jsx_runtime1.JSX.Element;
|
|
47
47
|
displayName: string;
|
|
48
48
|
};
|
|
49
49
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ButtonIcon, ButtonIconProps } from "./components/buttons/button-icon/Bu
|
|
|
3
3
|
import { Checkbox, CheckboxProps } from "./components/controls/checkbox/Checkbox.js";
|
|
4
4
|
import { DatePicker, DatePickerProps } from "./components/controls/date-picker/DatePicker.js";
|
|
5
5
|
import { Combobox, ComboboxProps } from "./components/controls/dropdown/Combobox.js";
|
|
6
|
-
import {
|
|
6
|
+
import { Menu, MenuProps } from "./components/controls/dropdown/Menu.js";
|
|
7
7
|
import { Select, SelectProps } from "./components/controls/dropdown/Select.js";
|
|
8
8
|
import { InputFile, InputFileProps } from "./components/controls/input-file/InputFile.js";
|
|
9
9
|
import { InputPassword, InputPasswordProps } from "./components/controls/input-password/InputPassword.js";
|
|
@@ -24,4 +24,4 @@ import { VisuallyHidden, VisuallyHiddenProps } from "./components/misc/visually-
|
|
|
24
24
|
import { Breadcrumbs, BreadcrumbsProps } from "./components/navigation/breadcrumbs/Breadcrumbs.js";
|
|
25
25
|
import { Tabs, TabsProps } from "./components/navigation/tabs/Tabs.js";
|
|
26
26
|
import { MageUiProvider, MageUiProviderProps } from "./providers/MageUiProvider.js";
|
|
27
|
-
export { Avatar, AvatarProps, Badge, BadgeProps, Breadcrumbs, BreadcrumbsProps, Button, ButtonIcon, ButtonIconProps, ButtonProps, Carousel, CarouselProps, Checkbox, CheckboxProps, Combobox, ComboboxProps, DatePicker, DatePickerProps,
|
|
27
|
+
export { Avatar, AvatarProps, Badge, BadgeProps, Breadcrumbs, BreadcrumbsProps, Button, ButtonIcon, ButtonIconProps, ButtonProps, Carousel, CarouselProps, Checkbox, CheckboxProps, Combobox, ComboboxProps, DatePicker, DatePickerProps, Form, FormProps, Icon, IconProps, IconRaw, IconRawProps, IconTheme, IconThemeProps, InputFile, InputFileProps, InputPassword, InputPasswordProps, InputText, InputTextProps, MageUiProvider, MageUiProviderProps, Menu, MenuProps, MultiSwitch, MultiSwitchProps, Radio, RadioIcon, RadioIconProps, RadioProps, Select, SelectProps, Table, Tabs, TabsProps, Textarea, TextareaProps, VisuallyHidden, VisuallyHiddenProps };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Button as e}from"./components/buttons/button/Button.js";import{Avatar as t}from"./components/data-display/avatar/Avatar.js";import{Badge as n}from"./components/data-display/badge/Badge.js";import{VisuallyHidden as r}from"./components/misc/visually-hidden/VisuallyHidden.js";import{Carousel as i}from"./components/data-display/carousel/Carousel.js";import{Icon as a}from"./components/data-display/icons/icon/Icon.js";import{IconRaw as o}from"./components/data-display/icons/icon-raw/IconRaw.js";import{IconTheme as s}from"./components/data-display/icons/icon-theme/IconTheme.js";import{Table as c}from"./components/data-display/tables/table/Table.js";import{ButtonIcon as l}from"./components/buttons/button-icon/ButtonIcon.js";import{Checkbox as u}from"./components/controls/checkbox/Checkbox.js";import{DatePicker as d}from"./components/controls/date-picker/DatePicker.js";import{Combobox as f}from"./components/controls/dropdown/Combobox.js";import{
|
|
1
|
+
import{Button as e}from"./components/buttons/button/Button.js";import{Avatar as t}from"./components/data-display/avatar/Avatar.js";import{Badge as n}from"./components/data-display/badge/Badge.js";import{VisuallyHidden as r}from"./components/misc/visually-hidden/VisuallyHidden.js";import{Carousel as i}from"./components/data-display/carousel/Carousel.js";import{Icon as a}from"./components/data-display/icons/icon/Icon.js";import{IconRaw as o}from"./components/data-display/icons/icon-raw/IconRaw.js";import{IconTheme as s}from"./components/data-display/icons/icon-theme/IconTheme.js";import{Table as c}from"./components/data-display/tables/table/Table.js";import{ButtonIcon as l}from"./components/buttons/button-icon/ButtonIcon.js";import{Checkbox as u}from"./components/controls/checkbox/Checkbox.js";import{DatePicker as d}from"./components/controls/date-picker/DatePicker.js";import{Combobox as f}from"./components/controls/dropdown/Combobox.js";import{Menu as p}from"./components/controls/dropdown/Menu.js";import{Select as m}from"./components/controls/dropdown/Select.js";import{InputFile as h}from"./components/controls/input-file/InputFile.js";import{InputPassword as g}from"./components/controls/input-password/InputPassword.js";import{InputText as _}from"./components/controls/input-text/InputText.js";import{MultiSwitch as v}from"./components/controls/multi-switch/MultiSwitch.js";import{Radio as y}from"./components/controls/radio/Radio.js";import{RadioIcon as b}from"./components/controls/radio/RadioIcon.js";import{Textarea as x}from"./components/controls/textarea/Textarea.js";import{Form as S}from"./components/forms/form/Form.js";import{Breadcrumbs as C}from"./components/navigation/breadcrumbs/Breadcrumbs.js";import{Tabs as w}from"./components/navigation/tabs/Tabs.js";import{MageUiProvider as T}from"./providers/MageUiProvider.js";export{t as Avatar,n as Badge,C as Breadcrumbs,e as Button,l as ButtonIcon,i as Carousel,u as Checkbox,f as Combobox,d as DatePicker,S as Form,a as Icon,o as IconRaw,s as IconTheme,h as InputFile,g as InputPassword,_ as InputText,T as MageUiProvider,p as Menu,v as MultiSwitch,y as Radio,b as RadioIcon,m as Select,c as Table,w as Tabs,x as Textarea,r as VisuallyHidden};
|
package/dist/panda.json
CHANGED
|
@@ -6,12 +6,15 @@
|
|
|
6
6
|
"backgroundColor]___[value:primary.background.2.enabled",
|
|
7
7
|
"backgroundColor]___[value:primary.background.2.hovered]___[cond:_hover",
|
|
8
8
|
"backgroundColor]___[value:primary.background.2.actived]___[cond:_active",
|
|
9
|
+
"backgroundColor]___[value:primary.background.2.hovered]___[cond:_expanded",
|
|
9
10
|
"backgroundColor]___[value:neutral.background.6.enabled",
|
|
10
11
|
"backgroundColor]___[value:neutral.background.6.hovered]___[cond:_hover",
|
|
11
12
|
"backgroundColor]___[value:neutral.background.6.actived]___[cond:_active",
|
|
13
|
+
"backgroundColor]___[value:neutral.background.6.hovered]___[cond:_expanded",
|
|
12
14
|
"backgroundColor]___[value:danger.background.1.enabled",
|
|
13
15
|
"backgroundColor]___[value:danger.background.1.hovered]___[cond:_hover",
|
|
14
16
|
"backgroundColor]___[value:danger.background.1.actived]___[cond:_active",
|
|
17
|
+
"backgroundColor]___[value:danger.background.1.hovered]___[cond:_expanded",
|
|
15
18
|
"color]___[value:primary.foreground.2.enabled",
|
|
16
19
|
"borderColor]___[value:primary.stroke.3.enabled",
|
|
17
20
|
"color]___[value:primary.foreground.2.hovered]___[cond:_hover",
|
|
@@ -20,20 +23,28 @@
|
|
|
20
23
|
"color]___[value:primary.foreground.2.actived]___[cond:_active",
|
|
21
24
|
"backgroundColor]___[value:neutral.background.2.actived]___[cond:_active",
|
|
22
25
|
"borderColor]___[value:primary.stroke.3.actived]___[cond:_active",
|
|
26
|
+
"color]___[value:primary.foreground.2.hovered]___[cond:_expanded",
|
|
27
|
+
"backgroundColor]___[value:neutral.background.2.hovered]___[cond:_expanded",
|
|
28
|
+
"borderColor]___[value:primary.stroke.3.hovered]___[cond:_expanded",
|
|
23
29
|
"color]___[value:neutral.foreground.2.enabled",
|
|
24
30
|
"borderColor]___[value:neutral.stroke.7.enabled",
|
|
25
31
|
"color]___[value:neutral.foreground.2.hovered]___[cond:_hover",
|
|
26
32
|
"borderColor]___[value:neutral.stroke.7.hovered]___[cond:_hover",
|
|
27
33
|
"color]___[value:neutral.foreground.2.actived]___[cond:_active",
|
|
28
34
|
"borderColor]___[value:neutral.stroke.7.actived]___[cond:_active",
|
|
35
|
+
"color]___[value:neutral.foreground.2.hovered]___[cond:_expanded",
|
|
36
|
+
"borderColor]___[value:neutral.stroke.7.hovered]___[cond:_expanded",
|
|
29
37
|
"color]___[value:danger.foreground.1.enabled",
|
|
30
38
|
"borderColor]___[value:danger.stroke.1.enabled",
|
|
31
39
|
"color]___[value:danger.foreground.1.hovered]___[cond:_hover",
|
|
32
40
|
"borderColor]___[value:danger.stroke.1.hovered]___[cond:_hover",
|
|
33
41
|
"color]___[value:danger.foreground.1.actived]___[cond:_active",
|
|
34
42
|
"borderColor]___[value:danger.stroke.1.actived]___[cond:_active",
|
|
43
|
+
"color]___[value:danger.foreground.1.hovered]___[cond:_expanded",
|
|
44
|
+
"borderColor]___[value:danger.stroke.1.hovered]___[cond:_expanded",
|
|
35
45
|
"srOnly]___[value:true",
|
|
36
46
|
"position]___[value:bottom-start",
|
|
47
|
+
"width]___[value:auto",
|
|
37
48
|
"color]___[value:neutral.foreground.2.onBrand.enabled",
|
|
38
49
|
"backgroundColor]___[value:neutral.background.2.enabled",
|
|
39
50
|
"color]___[value:primary.foreground.1.enabled",
|
|
@@ -137,9 +148,7 @@
|
|
|
137
148
|
],
|
|
138
149
|
"comboboxEmpty": [],
|
|
139
150
|
"selectSection": [],
|
|
140
|
-
"dropdown": [
|
|
141
|
-
"size]___[value:m]___[recipe:dropdown"
|
|
142
|
-
],
|
|
151
|
+
"dropdown": [],
|
|
143
152
|
"comboboxOptions": [],
|
|
144
153
|
"selectButton": [],
|
|
145
154
|
"inputFileGroup": [],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mage-ui/components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.46",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [],
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@types/react-dom": "^19.1.2",
|
|
26
26
|
"rimraf": "^6.0.1",
|
|
27
27
|
"tsdown": "^0.12.7",
|
|
28
|
-
"typescript": "^5.
|
|
28
|
+
"typescript": "^5.9.3"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"@hookform/resolvers": "^5.0.1",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"react-dom": "^19.1.0",
|
|
43
43
|
"react-hook-form": "^7.56.4",
|
|
44
44
|
"zod": "^3.25.42",
|
|
45
|
-
"@mage-ui/
|
|
46
|
-
"@mage-ui/
|
|
45
|
+
"@mage-ui/styled-system": "0.0.46",
|
|
46
|
+
"@mage-ui/preset": "0.0.46"
|
|
47
47
|
},
|
|
48
48
|
"engines": {
|
|
49
49
|
"node": ">=22.14.0"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownButton.d.ts","names":[],"sources":["../../../../src/components/controls/dropdown/DropdownButton.tsx"],"sourcesContent":[],"mappings":";;;;KAOY,mBAAA;UACF,KAAA,CAAM;;;IADJ,MAAA,CAAA,EAAA,MAAA;IAAmB,QAAA,CAAA,EAAA,MAAA;EAAA,CAAA;EACN,gBAYN,CAAA,EAAA;IACP,IAAA,CAAM,EAAA,MAAA;IACJ,KAAM,CAAA,EAAA,MAAA;IAAS,KAAA,CAAA,EAAA,MAAA;IAGhB,OAAA,CAAA,EAAA,MAqDZ;EAAA,CAAA;EAAA,QAAA,CAAA,EA1DY,KAAA,CAAM,SA0DlB;YAzDW,KAAA,CAAM;cACJ,KAAA,CAAM;;cAGP;;;;;;;;;;KASV,sBAAmB,mBAAA,CAAA,GAAA,CAAA;;IAAnB,CAAA;MAAA;IAAA,CAAA,EAqD2B,yBArD3B,CAAA,EAqDoD,OAAA,CAAA,SArDpD;IAAmB,WAAA,EAAA,MAAA;EAAA,CAAA;;KA8CjB,yBAAA,GAOkD;EAAA,EAAA,EAAA,MAAA,GAAA,MAAA;EAPlD,KAAA,EAAA,MAAA;;aAIQ,KAAA,CAAM"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownButton.js","names":["value?: string","children"],"sources":["../../../../src/components/controls/dropdown/DropdownButton.tsx"],"sourcesContent":["import { Children, isValidElement } from 'react';\n\nimport { comboboxOption, dropdown } from '@mage-ui/styled-system/recipes';\nimport { Button } from '@/components/buttons';\n\nimport { DropdownBase } from './DropdownBase';\n\nexport type DropdownButtonProps = {\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 DropdownButton = ({\n label,\n a11yLabel,\n classNames,\n buttonClassNames,\n children,\n endSlot,\n startSlot,\n ...props\n}: DropdownButtonProps) => {\n const options = Children.toArray(children).filter(\n (child): child is React.ReactElement<DropdownButtonOptionProps> =>\n isValidElement(child) && child.type === DropdownButton.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({ size: 'm' }),\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 DropdownButtonOptionProps = {\n id: string | number;\n value: string;\n onClick: () => void;\n children?: React.ReactNode;\n};\n\nconst Option = ({ children }: DropdownButtonOptionProps) => {\n return children;\n};\n\nOption.displayName = 'DropdownButton.Option';\nDropdownButton.Option = Option;\n"],"mappings":"oRAuFA,MA9Da,EAAiB,CAAC,CAC7B,QACA,YACA,aACA,mBACA,WACA,UACA,YACA,GAAG,EACiB,GAAK,CAMzB,IALM,EAAU,EAAS,QAAQ,EAAS,CAAC,OACzC,AAAC,GACC,EAAe,EAAM,EAAI,EAAM,OAAS,EAAe,OAC1D,CAEK,EAAqB,AAACA,GAAmB,CAC7C,IAAM,EAAW,EAAQ,KAAK,AAAC,GAAU,EAAM,MAAM,QAAU,EAAM,CACrE,AAAI,GAAU,EAAS,MAAM,SAAS,AACvC,EAED,MACE,GAAC,EAAA,CACC,kBAAmB,EACnB,OACE,EAAC,EAAA,CACC,WAAY,EACZ,GAAK,GAAa,CAAE,aAAc,CAAW,WAE5C,GACM,CAEX,WAAY,CACV,SAAU,GAAY,UAAY,EAAS,CAAE,KAAM,GAAK,EAAC,AAC1D,EACU,YACF,UACT,GAAI,WAEH,EAAQ,IAAI,AAAC,GAAU,CACtB,GAAM,CAAE,KAAI,QAAO,SAAA,EAAU,CAAG,EAAM,MAEtC,MACE,GAAC,EAAa,OAAA,CAEL,QACP,WAAY,CAAE,OAAQ,GAAY,QAAU,GAAgB,AAAE,WAE7DC,GAJI,EAKe,AAEzB,EAAC,EACW,AAElB,EASK,EAAS,CAAC,CAAE,WAAqC,GAC9C,EAIT,AADA,EAAO,YAAc,wBACrB,EAAe,OAAS"}
|