@mage-ui/components 0.0.66 → 0.0.67
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 +3 -0
- package/dist/components/controls/dropdown/Menu.d.ts.map +1 -1
- package/dist/components/controls/dropdown/Menu.js.map +1 -1
- 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_runtime4 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_runtime4.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":";;;;;KAaY,SAAA,GAAY,KACtB;UAGQ,KAAA,CAAM;;EAJJ,UAAA,CAAA,EAAS;IAAA,MAAA,CAAA,EAAA,MAAA;IACnB,QAAA,CAAA,EAAA,MAAA;IADsB,OAAA,CAAA,EAAA,MAAA;;kBAiBL,CAAA,EAAA;IACP,IAAA,CAAM,EAAA,MAAA;IACJ,KAAM,CAAA,EAAA,MAAA;IAAS,KAAA,CAAA,EAAA,MAAA;IAGhB,OA0DZ,CAAA,EAAA,MAAA;EAAA,CAAA;aA/DY,KAAA,CAAM;YACP,KAAA,CAAM;cACJ,KAAA,CAAM;;cAGP;;;;;;;;;;KASV,YAAS,kBAAA,CAAA,GAAA,CAAA;;IAAT,CAAA;MAAA;IAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"Menu.d.ts","names":[],"sources":["../../../../src/components/controls/dropdown/Menu.tsx"],"sourcesContent":[],"mappings":";;;;;KAaY,SAAA,GAAY,KACtB;UAGQ,KAAA,CAAM;;EAJJ,UAAA,CAAA,EAAS;IAAA,MAAA,CAAA,EAAA,MAAA;IACnB,QAAA,CAAA,EAAA,MAAA;IADsB,OAAA,CAAA,EAAA,MAAA;;kBAiBL,CAAA,EAAA;IACP,IAAA,CAAM,EAAA,MAAA;IACJ,KAAM,CAAA,EAAA,MAAA;IAAS,KAAA,CAAA,EAAA,MAAA;IAGhB,OA0DZ,CAAA,EAAA,MAAA;EAAA,CAAA;aA/DY,KAAA,CAAM;YACP,KAAA,CAAM;cACJ,KAAA,CAAM;;cAGP;;;;;;;;;;KASV,YAAS,kBAAA,CAAA,GAAA,CAAA;;IAAT,CAAA;MAAA;IAAA,CAAA,EA2D2B,eA3D3B,CAAA,EA2D0C,SA3D1C;IAAS,WAAA,EAAA,MAAA;;SA2DkB,EAAA;IAAe,EAAA,EAAA,IAAA;IAAA,WAAA,EAAA,MAAA;EARxC,CAAA;;KAAA,eAAA;;YAEO,KAAA,CAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.js","names":["children"],"sources":["../../../../src/components/controls/dropdown/Menu.tsx"],"sourcesContent":["import { Children, isValidElement, type ReactNode } from 'react';\n\nimport {\n comboboxDivider,\n comboboxOption,\n comboboxOptions,\n dropdown,\n} 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 divider?: 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 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 options: classNames?.options ?? comboboxOptions(),\n }}\n startSlot={startSlot}\n endSlot={endSlot}\n {...props}\n >\n {Children.map(children, (child: ReactNode, index: number) => {\n if (!isValidElement(child)) return null;\n\n const typeName = (child.type as { displayName?: string }).displayName;\n\n if (typeName === Menu.Option.displayName) {\n const { value, children } = child.props as MenuOptionProps;\n return (\n <DropdownBase.Option\n key={value}\n value={value}\n classNames={{ option: classNames?.option ?? comboboxOption() }}\n >\n {children}\n </DropdownBase.Option>\n );\n }\n\n if (typeName === Menu.Divider.displayName) {\n return (\n <DropdownBase.Divider\n key={`${child.type}-${index}`}\n classNames={{ divider: classNames?.divider ?? comboboxDivider() }}\n />\n );\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};\nconst Divider = () => null;\n\nOption.displayName = 'Menu.Option';\nMenu.Option = Option;\n\nDivider.displayName = 'Menu.Divider';\nMenu.Divider = Divider;\n"],"mappings":"8TAmCA,MAAa,GAAQ,CACnB,QACA,YACA,aACA,mBACA,WACA,UACA,YACA,GAAG,KAGD,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,CAC5C,QAAS,GAAY,SAAW,GAAiB,CAClD,CACU,YACF,UACT,GAAI,WAEH,EAAS,IAAI,GAAW,EAAkB,IAAkB,CAC3D,GAAI,CAAC,EAAe,EAAM,CAAE,OAAO,KAEnC,IAAM,EAAY,EAAM,KAAkC,YAE1D,GAAI,IAAa,EAAK,OAAO,YAAa,CACxC,GAAM,CAAE,QAAO,SAAA,GAAa,EAAM,MAClC,OACE,EAAC,EAAa,OAAA,CAEL,QACP,WAAY,CAAE,OAAQ,GAAY,QAAU,GAAgB,CAAE,UAE7DA,GAJI,EAKe,CAI1B,GAAI,IAAa,EAAK,QAAQ,YAC5B,OACE,EAAC,EAAa,QAAA,CAEZ,WAAY,CAAE,QAAS,GAAY,SAAW,GAAiB,CAAE,CAAA,CAD5D,GAAG,EAAM,KAAK,GAAG,IAEtB,EAGN,EACW,
|
|
1
|
+
{"version":3,"file":"Menu.js","names":["children"],"sources":["../../../../src/components/controls/dropdown/Menu.tsx"],"sourcesContent":["import { Children, isValidElement, type ReactNode } from 'react';\n\nimport {\n comboboxDivider,\n comboboxOption,\n comboboxOptions,\n dropdown,\n} 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 divider?: 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 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 options: classNames?.options ?? comboboxOptions(),\n }}\n startSlot={startSlot}\n endSlot={endSlot}\n {...props}\n >\n {Children.map(children, (child: ReactNode, index: number) => {\n if (!isValidElement(child)) return null;\n\n const typeName = (child.type as { displayName?: string }).displayName;\n\n if (typeName === Menu.Option.displayName) {\n const { value, children } = child.props as MenuOptionProps;\n return (\n <DropdownBase.Option\n key={value}\n value={value}\n classNames={{ option: classNames?.option ?? comboboxOption() }}\n >\n {children}\n </DropdownBase.Option>\n );\n }\n\n if (typeName === Menu.Divider.displayName) {\n return (\n <DropdownBase.Divider\n key={`${child.type}-${index}`}\n classNames={{ divider: classNames?.divider ?? comboboxDivider() }}\n />\n );\n }\n })}\n </DropdownBase>\n );\n};\n\ntype MenuOptionProps = {\n value: string;\n children: React.ReactNode;\n classNames?: {\n option: string;\n };\n};\n\nconst Option = ({ children }: MenuOptionProps) => {\n return children;\n};\nconst Divider = () => null;\n\nOption.displayName = 'Menu.Option';\nMenu.Option = Option;\n\nDivider.displayName = 'Menu.Divider';\nMenu.Divider = Divider;\n"],"mappings":"8TAmCA,MAAa,GAAQ,CACnB,QACA,YACA,aACA,mBACA,WACA,UACA,YACA,GAAG,KAGD,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,CAC5C,QAAS,GAAY,SAAW,GAAiB,CAClD,CACU,YACF,UACT,GAAI,WAEH,EAAS,IAAI,GAAW,EAAkB,IAAkB,CAC3D,GAAI,CAAC,EAAe,EAAM,CAAE,OAAO,KAEnC,IAAM,EAAY,EAAM,KAAkC,YAE1D,GAAI,IAAa,EAAK,OAAO,YAAa,CACxC,GAAM,CAAE,QAAO,SAAA,GAAa,EAAM,MAClC,OACE,EAAC,EAAa,OAAA,CAEL,QACP,WAAY,CAAE,OAAQ,GAAY,QAAU,GAAgB,CAAE,UAE7DA,GAJI,EAKe,CAI1B,GAAI,IAAa,EAAK,QAAQ,YAC5B,OACE,EAAC,EAAa,QAAA,CAEZ,WAAY,CAAE,QAAS,GAAY,SAAW,GAAiB,CAAE,CAAA,CAD5D,GAAG,EAAM,KAAK,GAAG,IAEtB,EAGN,EACW,CAYb,GAAU,CAAE,cACT,EAEH,MAAgB,KAEtB,EAAO,YAAc,cACrB,EAAK,OAAS,EAEd,EAAQ,YAAc,eACtB,EAAK,QAAU"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime5 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_runtime5.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.67",
|
|
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.67",
|
|
30
|
+
"@mage-ui/styled-system": "0.0.67"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@hookform/resolvers": "^5.2.2",
|