@mage-ui/components 0.0.67 → 0.0.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/controls/dropdown/Menu.d.ts +0 -3
- package/dist/components/controls/dropdown/Menu.d.ts.map +1 -1
- package/dist/components/controls/dropdown/Menu.js.map +1 -1
- package/dist/components/data-display/tooltip/Tooltip.d.ts +2 -1
- package/dist/components/data-display/tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/data-display/tooltip/Tooltip.js.map +1 -1
- package/package.json +3 -3
|
@@ -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,EAwD2B,eAxD3B,CAAA,EAwD0C,SAxD1C;IAAS,WAAA,EAAA,MAAA;;SAwDkB,EAAA;IAAe,EAAA,EAAA,IAAA;IAAA,WAAA,EAAA,MAAA;EALxC,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
|
|
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,CASb,GAAU,CAAE,cACT,EAEH,MAAgB,KAEtB,EAAO,YAAc,cACrB,EAAK,OAAS,EAEd,EAAQ,YAAc,eACtB,EAAK,QAAU"}
|
|
@@ -3,7 +3,7 @@ import { ReactNode } from "react";
|
|
|
3
3
|
|
|
4
4
|
//#region src/components/data-display/tooltip/Tooltip.d.ts
|
|
5
5
|
type TooltipProps = {
|
|
6
|
-
children
|
|
6
|
+
children?: ReactNode;
|
|
7
7
|
label: ReactNode;
|
|
8
8
|
offset?: number;
|
|
9
9
|
id?: string;
|
|
@@ -11,6 +11,7 @@ type TooltipProps = {
|
|
|
11
11
|
inline?: boolean;
|
|
12
12
|
multiline?: boolean;
|
|
13
13
|
disabled?: boolean;
|
|
14
|
+
target?: string;
|
|
14
15
|
classNames?: {
|
|
15
16
|
tooltip?: string;
|
|
16
17
|
arrow?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","names":[],"sources":["../../../../src/components/data-display/tooltip/Tooltip.tsx"],"sourcesContent":[],"mappings":";;;;KAUY,YAAA;
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","names":[],"sources":["../../../../src/components/data-display/tooltip/Tooltip.tsx"],"sourcesContent":[],"mappings":";;;;KAUY,YAAA;aACC;SACJ;EAFG,MAAA,CAAA,EAAA,MAAY;EAAA,EAAA,CAAA,EAAA,MAAA;UACX,CAAA,EAAA,QAAA,GAAA,cAAA,GAAA,YAAA,GAAA,KAAA,GAAA,WAAA,GAAA,SAAA,GAAA,OAAA,GAAA,aAAA,GAAA,WAAA,GAAA,MAAA,GAAA,YAAA,GAAA,UAAA;QACJ,CAAA,EAAA,OAAA;EAAS,SAAA,CAAA,EAAA,OAAA;EA0BL,QAAA,CAAA,EAYZ,OAAA;EAAA,MAAA,CAAA,EAAA,MAAA;YAZuB,CAAA,EAAA;IAAA,OAAA,CAAA,EAAA,MAAA;IAAoC,KAAA,CAAA,EAAA,MAAA;;CAY3D;cAZY;;;;GAA+C,iBAAY,mBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","names":["Tooltip","MantineTooltip"],"sources":["../../../../src/components/data-display/tooltip/Tooltip.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n tooltip,\n tooltipArrow,\n tooltipRoot,\n} from '@mage-ui/styled-system/recipes';\nimport { Tooltip as MantineTooltip } from '@mantine/core';\n\nexport type TooltipProps = {\n children
|
|
1
|
+
{"version":3,"file":"Tooltip.js","names":["Tooltip","MantineTooltip"],"sources":["../../../../src/components/data-display/tooltip/Tooltip.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n tooltip,\n tooltipArrow,\n tooltipRoot,\n} from '@mage-ui/styled-system/recipes';\nimport { Tooltip as MantineTooltip } from '@mantine/core';\n\nexport type TooltipProps = {\n children?: ReactNode;\n label: ReactNode;\n offset?: number;\n id?: string;\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 inline?: boolean;\n multiline?: boolean;\n disabled?: boolean;\n target?: string;\n classNames?: {\n tooltip?: string;\n arrow?: string;\n };\n};\n\nexport const Tooltip = ({ children, classNames, ...props }: TooltipProps) => {\n return (\n <MantineTooltip\n classNames={{\n tooltip: cx(tooltip(), tooltipRoot()),\n arrow: tooltipArrow(),\n }}\n {...props}\n >\n {children}\n </MantineTooltip>\n );\n};\n"],"mappings":"4NAsCA,MAAaA,GAAW,CAAE,WAAU,aAAY,GAAG,KAE/C,EAACC,EAAAA,CACC,WAAY,CACV,QAAS,EAAG,GAAS,CAAE,GAAa,CAAC,CACrC,MAAO,GAAc,CACtB,CACD,GAAI,EAEH,YACc"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mage-ui/components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.69",
|
|
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.69",
|
|
30
|
+
"@mage-ui/styled-system": "0.0.69"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@hookform/resolvers": "^5.2.2",
|