@fuf-stack/pixels 0.1.1 → 0.1.2
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/Button/index.js +5 -3
- package/dist/Button/index.js.map +1 -1
- package/dist/Menu/Menu.cjs +12 -92
- package/dist/Menu/Menu.cjs.map +1 -1
- package/dist/Menu/Menu.js +1 -4
- package/dist/Menu/index.cjs +12 -92
- package/dist/Menu/index.cjs.map +1 -1
- package/dist/Menu/index.js +1 -4
- package/dist/Menu/index.js.map +1 -1
- package/dist/{chunk-K3QI56MF.js → chunk-Y35GJHOR.js} +6 -6
- package/dist/chunk-Y35GJHOR.js.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-K3QI56MF.js.map +0 -1
- package/dist/chunk-NFWS2SSN.js +0 -11
- package/dist/chunk-NFWS2SSN.js.map +0 -1
package/dist/Button/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Button_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-6QVKZ4AT.js";
|
|
3
|
+
} from "../chunk-6QVKZ4AT.js";
|
|
5
4
|
import "../chunk-ZFEVTQWW.js";
|
|
5
|
+
|
|
6
|
+
// src/Button/index.ts
|
|
7
|
+
var Button_default2 = Button_default;
|
|
6
8
|
export {
|
|
7
|
-
|
|
9
|
+
Button_default2 as default
|
|
8
10
|
};
|
|
9
11
|
//# sourceMappingURL=index.js.map
|
package/dist/Button/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/Button/index.ts"],"sourcesContent":["import type { ButtonProps } from './Button';\n\nimport Button from './Button';\n\nexport default Button;\n\nexport type { ButtonProps };\n"],"mappings":";;;;;;AAIA,IAAOA,kBAAQ;","names":["Button_default"]}
|
package/dist/Menu/Menu.cjs
CHANGED
|
@@ -34,101 +34,18 @@ __export(Menu_exports, {
|
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(Menu_exports);
|
|
36
36
|
var import_fa6 = require("react-icons/fa6");
|
|
37
|
-
var import_dropdown = require("@nextui-org/dropdown");
|
|
38
|
-
var import_classnames2 = __toESM(require("classnames"), 1);
|
|
39
|
-
var import_debug = __toESM(require("debug"), 1);
|
|
40
|
-
|
|
41
|
-
// src/Button/Button.tsx
|
|
42
37
|
var import_button = require("@nextui-org/button");
|
|
38
|
+
var import_dropdown = require("@nextui-org/dropdown");
|
|
43
39
|
var import_classnames = __toESM(require("classnames"), 1);
|
|
44
|
-
|
|
45
|
-
// src/Button/subcomponents/LoadingSpinner.tsx
|
|
40
|
+
var import_debug = __toESM(require("debug"), 1);
|
|
46
41
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
47
|
-
var LoadingSpinner_default = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
48
|
-
"svg",
|
|
49
|
-
{
|
|
50
|
-
className: "animate-spin h-5 w-5 text-current",
|
|
51
|
-
fill: "none",
|
|
52
|
-
viewBox: "0 0 24 24",
|
|
53
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
54
|
-
children: [
|
|
55
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
56
|
-
"circle",
|
|
57
|
-
{
|
|
58
|
-
className: "opacity-25",
|
|
59
|
-
cx: "12",
|
|
60
|
-
cy: "12",
|
|
61
|
-
r: "10",
|
|
62
|
-
stroke: "currentColor",
|
|
63
|
-
strokeWidth: "4"
|
|
64
|
-
}
|
|
65
|
-
),
|
|
66
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
67
|
-
"path",
|
|
68
|
-
{
|
|
69
|
-
className: "opacity-75",
|
|
70
|
-
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z",
|
|
71
|
-
fill: "currentColor"
|
|
72
|
-
}
|
|
73
|
-
)
|
|
74
|
-
]
|
|
75
|
-
}
|
|
76
|
-
);
|
|
77
|
-
|
|
78
|
-
// src/Button/Button.tsx
|
|
79
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
80
|
-
var Button = ({
|
|
81
|
-
ariaLabel = void 0,
|
|
82
|
-
children = void 0,
|
|
83
|
-
className = void 0,
|
|
84
|
-
color = "default",
|
|
85
|
-
disabled = false,
|
|
86
|
-
icon = void 0,
|
|
87
|
-
loading = false,
|
|
88
|
-
onClick = void 0,
|
|
89
|
-
size = void 0,
|
|
90
|
-
testId = void 0,
|
|
91
|
-
type = void 0,
|
|
92
|
-
variant = "solid",
|
|
93
|
-
...passthrouhProps
|
|
94
|
-
}) => {
|
|
95
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
96
|
-
import_button.Button,
|
|
97
|
-
{
|
|
98
|
-
"aria-label": ariaLabel,
|
|
99
|
-
className: (0, import_classnames.default)(className),
|
|
100
|
-
color,
|
|
101
|
-
"data-testid": testId,
|
|
102
|
-
isDisabled: disabled,
|
|
103
|
-
isIconOnly: !!(icon && !children),
|
|
104
|
-
isLoading: loading,
|
|
105
|
-
onPress: onClick,
|
|
106
|
-
size,
|
|
107
|
-
spinner: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(LoadingSpinner_default, {}),
|
|
108
|
-
type,
|
|
109
|
-
variant,
|
|
110
|
-
...passthrouhProps,
|
|
111
|
-
children: [
|
|
112
|
-
icon,
|
|
113
|
-
children
|
|
114
|
-
]
|
|
115
|
-
}
|
|
116
|
-
);
|
|
117
|
-
};
|
|
118
|
-
var Button_default = Button;
|
|
119
|
-
|
|
120
|
-
// src/Button/index.ts
|
|
121
|
-
var Button_default2 = Button_default;
|
|
122
|
-
|
|
123
|
-
// src/Menu/Menu.tsx
|
|
124
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
125
42
|
var debug = (0, import_debug.default)("component:Menu");
|
|
126
43
|
var getDisabledKeys = (items) => {
|
|
127
44
|
return items.map((item) => typeof item?.items === "undefined" ? item : item.items).flat().filter((item) => {
|
|
128
45
|
return Object.hasOwn(item, "disabled") && item.disabled === true;
|
|
129
46
|
}).map((item) => item.key);
|
|
130
47
|
};
|
|
131
|
-
var renderMenuItem = (item) => /* @__PURE__ */ (0,
|
|
48
|
+
var renderMenuItem = (item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
132
49
|
import_dropdown.DropdownItem,
|
|
133
50
|
{
|
|
134
51
|
className: item.className,
|
|
@@ -149,12 +66,15 @@ var Menu = ({
|
|
|
149
66
|
items
|
|
150
67
|
}) => {
|
|
151
68
|
debug("Menu", { items });
|
|
152
|
-
return /* @__PURE__ */ (0,
|
|
153
|
-
/* @__PURE__ */ (0,
|
|
69
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dropdown.Dropdown, { isDisabled, children: [
|
|
70
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown.DropdownTrigger, { className: (0, import_classnames.default)(className), "data-testid": testId, children: children ? (
|
|
154
71
|
// eslint-disable-next-line react/button-has-type
|
|
155
|
-
/* @__PURE__ */ (0,
|
|
156
|
-
) :
|
|
157
|
-
|
|
72
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { children })
|
|
73
|
+
) : (
|
|
74
|
+
// INFO: we use next button here so that ref passing works
|
|
75
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { size: "sm", variant: "flat", className: "min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fa6.FaEllipsisVertical, {}) })
|
|
76
|
+
) }),
|
|
77
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
158
78
|
import_dropdown.DropdownMenu,
|
|
159
79
|
{
|
|
160
80
|
items,
|
|
@@ -162,7 +82,7 @@ var Menu = ({
|
|
|
162
82
|
onAction,
|
|
163
83
|
children: (item) => {
|
|
164
84
|
if ("items" in item) {
|
|
165
|
-
return /* @__PURE__ */ (0,
|
|
85
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
166
86
|
import_dropdown.DropdownSection,
|
|
167
87
|
{
|
|
168
88
|
items: item.items,
|
package/dist/Menu/Menu.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Menu/Menu.tsx"
|
|
1
|
+
{"version":3,"sources":["../../src/Menu/Menu.tsx"],"sourcesContent":["import type { DropdownSectionProps } from '@nextui-org/dropdown';\nimport type { Key, MouseEventHandler, ReactNode } from 'react';\n\nimport { FaEllipsisVertical } from 'react-icons/fa6';\n\nimport { Button } from '@nextui-org/button';\nimport {\n Dropdown as NextDropdown,\n DropdownItem as NextDropdownItem,\n DropdownMenu as NextDropdownMenu,\n DropdownSection as NextDropdownSection,\n DropdownTrigger as NextDropdownTrigger,\n} from '@nextui-org/dropdown';\nimport cn from 'classnames';\nimport createDebug from 'debug';\n\nconst debug = createDebug('component:Menu');\n\n/**\n * Menu item type\n */\nexport interface MenuItem {\n /** unique identifier */\n key: string;\n /** CSS class name */\n className?: string;\n /** additional description shown under the label */\n description?: string;\n /** disables the menu item */\n disabled?: boolean;\n /** menu item icon */\n icon?: ReactNode;\n /** menu item name */\n label: ReactNode;\n /** click event handler */\n onClick?: MouseEventHandler<HTMLLIElement>;\n /** e2e test identifier */\n testId?: string;\n}\n\n/**\n * Menu section type\n */\nexport interface MenuSection {\n /** unique identifier */\n key: string;\n /** section label */\n label: ReactNode;\n /** section items (array of MenuItem) */\n items: MenuItem[];\n}\n\nexport interface MenuProps {\n /** child components */\n children?: ReactNode;\n /** CSS class name */\n className?: string | string[];\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** menu item structure */\n items: (MenuSection | MenuItem)[];\n /** disable menu trigger */\n isDisabled?: boolean;\n /** called if item is selected */\n onAction?: (key: Key) => void;\n}\n\n/** returns String[] of disabled items/keys */\nconst getDisabledKeys = (items: (MenuSection | MenuItem)[]) => {\n return (\n items\n // @ts-expect-error typing issue with MenuSection | MenuItem\n .map((item) => (typeof item?.items === 'undefined' ? item : item.items))\n .flat<MenuItem[]>()\n .filter((item) => {\n return Object.hasOwn(item, 'disabled') && item.disabled === true;\n })\n .map((item) => item.key)\n );\n};\n\nconst renderMenuItem = (item: MenuItem) => (\n <NextDropdownItem\n className={item.className}\n data-testid={item.testId || item.key}\n description={item.description}\n key={item.key}\n onClick={item.onClick}\n startContent={item.icon}\n >\n {item.label}\n </NextDropdownItem>\n);\n\n/**\n * Dropdown menu component based on [NextUI Dropdown](https://nextui.org/docs/components/dropdown)\n */\nconst Menu = ({\n children = null,\n className = undefined,\n onAction = undefined,\n testId = undefined,\n isDisabled = false,\n items,\n}: MenuProps) => {\n debug('Menu', { items });\n\n return (\n <NextDropdown isDisabled={isDisabled}>\n <NextDropdownTrigger className={cn(className)} data-testid={testId}>\n {children ? (\n // eslint-disable-next-line react/button-has-type\n <button>{children}</button>\n ) : (\n // INFO: we use next button here so that ref passing works\n <Button size=\"sm\" variant=\"flat\" className=\"min-w-0\">\n <FaEllipsisVertical />\n </Button>\n )}\n </NextDropdownTrigger>\n <NextDropdownMenu\n // aria-label=\"Dynamic Actions\"\n items={items}\n disabledKeys={getDisabledKeys(items)}\n onAction={onAction}\n >\n {(item) => {\n if ('items' in item) {\n return (\n <NextDropdownSection\n items={item.items as MenuSection['items']}\n title={item.label as DropdownSectionProps['title']}\n key={item.key}\n >\n {/* @ts-expect-error ts problem here with render fn */}\n {(sectionItem) => {\n return renderMenuItem(sectionItem);\n }}\n </NextDropdownSection>\n );\n }\n return renderMenuItem(item);\n }}\n </NextDropdownMenu>\n </NextDropdown>\n );\n};\n\nexport default Menu;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,iBAAmC;AAEnC,oBAAuB;AACvB,sBAMO;AACP,wBAAe;AACf,mBAAwB;AAoEtB;AAlEF,IAAM,YAAQ,aAAAA,SAAY,gBAAgB;AAoD1C,IAAM,kBAAkB,CAAC,UAAsC;AAC7D,SACE,MAEG,IAAI,CAAC,SAAU,OAAO,MAAM,UAAU,cAAc,OAAO,KAAK,KAAM,EACtE,KAAiB,EACjB,OAAO,CAAC,SAAS;AAChB,WAAO,OAAO,OAAO,MAAM,UAAU,KAAK,KAAK,aAAa;AAAA,EAC9D,CAAC,EACA,IAAI,CAAC,SAAS,KAAK,GAAG;AAE7B;AAEA,IAAM,iBAAiB,CAAC,SACtB;AAAA,EAAC,gBAAAC;AAAA,EAAA;AAAA,IACC,WAAW,KAAK;AAAA,IAChB,eAAa,KAAK,UAAU,KAAK;AAAA,IACjC,aAAa,KAAK;AAAA,IAElB,SAAS,KAAK;AAAA,IACd,cAAc,KAAK;AAAA,IAElB,eAAK;AAAA;AAAA,EAJD,KAAK;AAKZ;AAMF,IAAM,OAAO,CAAC;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,SAAS;AAAA,EACT,aAAa;AAAA,EACb;AACF,MAAiB;AACf,QAAM,QAAQ,EAAE,MAAM,CAAC;AAEvB,SACE,6CAAC,gBAAAC,UAAA,EAAa,YACZ;AAAA,gDAAC,gBAAAC,iBAAA,EAAoB,eAAW,kBAAAC,SAAG,SAAS,GAAG,eAAa,QACzD;AAAA;AAAA,MAEC,4CAAC,YAAQ,UAAS;AAAA;AAAA;AAAA,MAGlB,4CAAC,wBAAO,MAAK,MAAK,SAAQ,QAAO,WAAU,WACzC,sDAAC,iCAAmB,GACtB;AAAA,OAEJ;AAAA,IACA;AAAA,MAAC,gBAAAC;AAAA,MAAA;AAAA,QAEC;AAAA,QACA,cAAc,gBAAgB,KAAK;AAAA,QACnC;AAAA,QAEC,WAAC,SAAS;AACT,cAAI,WAAW,MAAM;AACnB,mBACE;AAAA,cAAC,gBAAAC;AAAA,cAAA;AAAA,gBACC,OAAO,KAAK;AAAA,gBACZ,OAAO,KAAK;AAAA,gBAIX,WAAC,gBAAgB;AAChB,yBAAO,eAAe,WAAW;AAAA,gBACnC;AAAA;AAAA,cALK,KAAK;AAAA,YAMZ;AAAA,UAEJ;AACA,iBAAO,eAAe,IAAI;AAAA,QAC5B;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;AAEA,IAAO,eAAQ;","names":["createDebug","NextDropdownItem","NextDropdown","NextDropdownTrigger","cn","NextDropdownMenu","NextDropdownSection"]}
|
package/dist/Menu/Menu.js
CHANGED
package/dist/Menu/index.cjs
CHANGED
|
@@ -36,101 +36,18 @@ module.exports = __toCommonJS(Menu_exports);
|
|
|
36
36
|
|
|
37
37
|
// src/Menu/Menu.tsx
|
|
38
38
|
var import_fa6 = require("react-icons/fa6");
|
|
39
|
-
var import_dropdown = require("@nextui-org/dropdown");
|
|
40
|
-
var import_classnames2 = __toESM(require("classnames"), 1);
|
|
41
|
-
var import_debug = __toESM(require("debug"), 1);
|
|
42
|
-
|
|
43
|
-
// src/Button/Button.tsx
|
|
44
39
|
var import_button = require("@nextui-org/button");
|
|
40
|
+
var import_dropdown = require("@nextui-org/dropdown");
|
|
45
41
|
var import_classnames = __toESM(require("classnames"), 1);
|
|
46
|
-
|
|
47
|
-
// src/Button/subcomponents/LoadingSpinner.tsx
|
|
42
|
+
var import_debug = __toESM(require("debug"), 1);
|
|
48
43
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
49
|
-
var LoadingSpinner_default = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
50
|
-
"svg",
|
|
51
|
-
{
|
|
52
|
-
className: "animate-spin h-5 w-5 text-current",
|
|
53
|
-
fill: "none",
|
|
54
|
-
viewBox: "0 0 24 24",
|
|
55
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
56
|
-
children: [
|
|
57
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
58
|
-
"circle",
|
|
59
|
-
{
|
|
60
|
-
className: "opacity-25",
|
|
61
|
-
cx: "12",
|
|
62
|
-
cy: "12",
|
|
63
|
-
r: "10",
|
|
64
|
-
stroke: "currentColor",
|
|
65
|
-
strokeWidth: "4"
|
|
66
|
-
}
|
|
67
|
-
),
|
|
68
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
69
|
-
"path",
|
|
70
|
-
{
|
|
71
|
-
className: "opacity-75",
|
|
72
|
-
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z",
|
|
73
|
-
fill: "currentColor"
|
|
74
|
-
}
|
|
75
|
-
)
|
|
76
|
-
]
|
|
77
|
-
}
|
|
78
|
-
);
|
|
79
|
-
|
|
80
|
-
// src/Button/Button.tsx
|
|
81
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
82
|
-
var Button = ({
|
|
83
|
-
ariaLabel = void 0,
|
|
84
|
-
children = void 0,
|
|
85
|
-
className = void 0,
|
|
86
|
-
color = "default",
|
|
87
|
-
disabled = false,
|
|
88
|
-
icon = void 0,
|
|
89
|
-
loading = false,
|
|
90
|
-
onClick = void 0,
|
|
91
|
-
size = void 0,
|
|
92
|
-
testId = void 0,
|
|
93
|
-
type = void 0,
|
|
94
|
-
variant = "solid",
|
|
95
|
-
...passthrouhProps
|
|
96
|
-
}) => {
|
|
97
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
98
|
-
import_button.Button,
|
|
99
|
-
{
|
|
100
|
-
"aria-label": ariaLabel,
|
|
101
|
-
className: (0, import_classnames.default)(className),
|
|
102
|
-
color,
|
|
103
|
-
"data-testid": testId,
|
|
104
|
-
isDisabled: disabled,
|
|
105
|
-
isIconOnly: !!(icon && !children),
|
|
106
|
-
isLoading: loading,
|
|
107
|
-
onPress: onClick,
|
|
108
|
-
size,
|
|
109
|
-
spinner: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(LoadingSpinner_default, {}),
|
|
110
|
-
type,
|
|
111
|
-
variant,
|
|
112
|
-
...passthrouhProps,
|
|
113
|
-
children: [
|
|
114
|
-
icon,
|
|
115
|
-
children
|
|
116
|
-
]
|
|
117
|
-
}
|
|
118
|
-
);
|
|
119
|
-
};
|
|
120
|
-
var Button_default = Button;
|
|
121
|
-
|
|
122
|
-
// src/Button/index.ts
|
|
123
|
-
var Button_default2 = Button_default;
|
|
124
|
-
|
|
125
|
-
// src/Menu/Menu.tsx
|
|
126
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
127
44
|
var debug = (0, import_debug.default)("component:Menu");
|
|
128
45
|
var getDisabledKeys = (items) => {
|
|
129
46
|
return items.map((item) => typeof item?.items === "undefined" ? item : item.items).flat().filter((item) => {
|
|
130
47
|
return Object.hasOwn(item, "disabled") && item.disabled === true;
|
|
131
48
|
}).map((item) => item.key);
|
|
132
49
|
};
|
|
133
|
-
var renderMenuItem = (item) => /* @__PURE__ */ (0,
|
|
50
|
+
var renderMenuItem = (item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
134
51
|
import_dropdown.DropdownItem,
|
|
135
52
|
{
|
|
136
53
|
className: item.className,
|
|
@@ -151,12 +68,15 @@ var Menu = ({
|
|
|
151
68
|
items
|
|
152
69
|
}) => {
|
|
153
70
|
debug("Menu", { items });
|
|
154
|
-
return /* @__PURE__ */ (0,
|
|
155
|
-
/* @__PURE__ */ (0,
|
|
71
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dropdown.Dropdown, { isDisabled, children: [
|
|
72
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown.DropdownTrigger, { className: (0, import_classnames.default)(className), "data-testid": testId, children: children ? (
|
|
156
73
|
// eslint-disable-next-line react/button-has-type
|
|
157
|
-
/* @__PURE__ */ (0,
|
|
158
|
-
) :
|
|
159
|
-
|
|
74
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { children })
|
|
75
|
+
) : (
|
|
76
|
+
// INFO: we use next button here so that ref passing works
|
|
77
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { size: "sm", variant: "flat", className: "min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fa6.FaEllipsisVertical, {}) })
|
|
78
|
+
) }),
|
|
79
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
160
80
|
import_dropdown.DropdownMenu,
|
|
161
81
|
{
|
|
162
82
|
items,
|
|
@@ -164,7 +84,7 @@ var Menu = ({
|
|
|
164
84
|
onAction,
|
|
165
85
|
children: (item) => {
|
|
166
86
|
if ("items" in item) {
|
|
167
|
-
return /* @__PURE__ */ (0,
|
|
87
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
168
88
|
import_dropdown.DropdownSection,
|
|
169
89
|
{
|
|
170
90
|
items: item.items,
|
package/dist/Menu/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Menu/index.ts","../../src/Menu/Menu.tsx"
|
|
1
|
+
{"version":3,"sources":["../../src/Menu/index.ts","../../src/Menu/Menu.tsx"],"sourcesContent":["import Menu from './Menu';\n\nexport default Menu;\n","import type { DropdownSectionProps } from '@nextui-org/dropdown';\nimport type { Key, MouseEventHandler, ReactNode } from 'react';\n\nimport { FaEllipsisVertical } from 'react-icons/fa6';\n\nimport { Button } from '@nextui-org/button';\nimport {\n Dropdown as NextDropdown,\n DropdownItem as NextDropdownItem,\n DropdownMenu as NextDropdownMenu,\n DropdownSection as NextDropdownSection,\n DropdownTrigger as NextDropdownTrigger,\n} from '@nextui-org/dropdown';\nimport cn from 'classnames';\nimport createDebug from 'debug';\n\nconst debug = createDebug('component:Menu');\n\n/**\n * Menu item type\n */\nexport interface MenuItem {\n /** unique identifier */\n key: string;\n /** CSS class name */\n className?: string;\n /** additional description shown under the label */\n description?: string;\n /** disables the menu item */\n disabled?: boolean;\n /** menu item icon */\n icon?: ReactNode;\n /** menu item name */\n label: ReactNode;\n /** click event handler */\n onClick?: MouseEventHandler<HTMLLIElement>;\n /** e2e test identifier */\n testId?: string;\n}\n\n/**\n * Menu section type\n */\nexport interface MenuSection {\n /** unique identifier */\n key: string;\n /** section label */\n label: ReactNode;\n /** section items (array of MenuItem) */\n items: MenuItem[];\n}\n\nexport interface MenuProps {\n /** child components */\n children?: ReactNode;\n /** CSS class name */\n className?: string | string[];\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** menu item structure */\n items: (MenuSection | MenuItem)[];\n /** disable menu trigger */\n isDisabled?: boolean;\n /** called if item is selected */\n onAction?: (key: Key) => void;\n}\n\n/** returns String[] of disabled items/keys */\nconst getDisabledKeys = (items: (MenuSection | MenuItem)[]) => {\n return (\n items\n // @ts-expect-error typing issue with MenuSection | MenuItem\n .map((item) => (typeof item?.items === 'undefined' ? item : item.items))\n .flat<MenuItem[]>()\n .filter((item) => {\n return Object.hasOwn(item, 'disabled') && item.disabled === true;\n })\n .map((item) => item.key)\n );\n};\n\nconst renderMenuItem = (item: MenuItem) => (\n <NextDropdownItem\n className={item.className}\n data-testid={item.testId || item.key}\n description={item.description}\n key={item.key}\n onClick={item.onClick}\n startContent={item.icon}\n >\n {item.label}\n </NextDropdownItem>\n);\n\n/**\n * Dropdown menu component based on [NextUI Dropdown](https://nextui.org/docs/components/dropdown)\n */\nconst Menu = ({\n children = null,\n className = undefined,\n onAction = undefined,\n testId = undefined,\n isDisabled = false,\n items,\n}: MenuProps) => {\n debug('Menu', { items });\n\n return (\n <NextDropdown isDisabled={isDisabled}>\n <NextDropdownTrigger className={cn(className)} data-testid={testId}>\n {children ? (\n // eslint-disable-next-line react/button-has-type\n <button>{children}</button>\n ) : (\n // INFO: we use next button here so that ref passing works\n <Button size=\"sm\" variant=\"flat\" className=\"min-w-0\">\n <FaEllipsisVertical />\n </Button>\n )}\n </NextDropdownTrigger>\n <NextDropdownMenu\n // aria-label=\"Dynamic Actions\"\n items={items}\n disabledKeys={getDisabledKeys(items)}\n onAction={onAction}\n >\n {(item) => {\n if ('items' in item) {\n return (\n <NextDropdownSection\n items={item.items as MenuSection['items']}\n title={item.label as DropdownSectionProps['title']}\n key={item.key}\n >\n {/* @ts-expect-error ts problem here with render fn */}\n {(sectionItem) => {\n return renderMenuItem(sectionItem);\n }}\n </NextDropdownSection>\n );\n }\n return renderMenuItem(item);\n }}\n </NextDropdownMenu>\n </NextDropdown>\n );\n};\n\nexport default Menu;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,iBAAAA;AAAA;AAAA;;;ACGA,iBAAmC;AAEnC,oBAAuB;AACvB,sBAMO;AACP,wBAAe;AACf,mBAAwB;AAoEtB;AAlEF,IAAM,YAAQ,aAAAC,SAAY,gBAAgB;AAoD1C,IAAM,kBAAkB,CAAC,UAAsC;AAC7D,SACE,MAEG,IAAI,CAAC,SAAU,OAAO,MAAM,UAAU,cAAc,OAAO,KAAK,KAAM,EACtE,KAAiB,EACjB,OAAO,CAAC,SAAS;AAChB,WAAO,OAAO,OAAO,MAAM,UAAU,KAAK,KAAK,aAAa;AAAA,EAC9D,CAAC,EACA,IAAI,CAAC,SAAS,KAAK,GAAG;AAE7B;AAEA,IAAM,iBAAiB,CAAC,SACtB;AAAA,EAAC,gBAAAC;AAAA,EAAA;AAAA,IACC,WAAW,KAAK;AAAA,IAChB,eAAa,KAAK,UAAU,KAAK;AAAA,IACjC,aAAa,KAAK;AAAA,IAElB,SAAS,KAAK;AAAA,IACd,cAAc,KAAK;AAAA,IAElB,eAAK;AAAA;AAAA,EAJD,KAAK;AAKZ;AAMF,IAAM,OAAO,CAAC;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,SAAS;AAAA,EACT,aAAa;AAAA,EACb;AACF,MAAiB;AACf,QAAM,QAAQ,EAAE,MAAM,CAAC;AAEvB,SACE,6CAAC,gBAAAC,UAAA,EAAa,YACZ;AAAA,gDAAC,gBAAAC,iBAAA,EAAoB,eAAW,kBAAAC,SAAG,SAAS,GAAG,eAAa,QACzD;AAAA;AAAA,MAEC,4CAAC,YAAQ,UAAS;AAAA;AAAA;AAAA,MAGlB,4CAAC,wBAAO,MAAK,MAAK,SAAQ,QAAO,WAAU,WACzC,sDAAC,iCAAmB,GACtB;AAAA,OAEJ;AAAA,IACA;AAAA,MAAC,gBAAAC;AAAA,MAAA;AAAA,QAEC;AAAA,QACA,cAAc,gBAAgB,KAAK;AAAA,QACnC;AAAA,QAEC,WAAC,SAAS;AACT,cAAI,WAAW,MAAM;AACnB,mBACE;AAAA,cAAC,gBAAAC;AAAA,cAAA;AAAA,gBACC,OAAO,KAAK;AAAA,gBACZ,OAAO,KAAK;AAAA,gBAIX,WAAC,gBAAgB;AAChB,yBAAO,eAAe,WAAW;AAAA,gBACnC;AAAA;AAAA,cALK,KAAK;AAAA,YAMZ;AAAA,UAEJ;AACA,iBAAO,eAAe,IAAI;AAAA,QAC5B;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;AAEA,IAAO,eAAQ;;;ADlJf,IAAOC,gBAAQ;","names":["Menu_default","createDebug","NextDropdownItem","NextDropdown","NextDropdownTrigger","cn","NextDropdownMenu","NextDropdownSection","Menu_default"]}
|
package/dist/Menu/index.js
CHANGED
package/dist/Menu/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Menu/index.ts"],"sourcesContent":["import Menu from './Menu';\n\nexport default Menu;\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/Menu/index.ts"],"sourcesContent":["import Menu from './Menu';\n\nexport default Menu;\n"],"mappings":";;;;;AAEA,IAAOA,gBAAQ;","names":["Menu_default"]}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Button_default
|
|
3
|
-
} from "./chunk-NFWS2SSN.js";
|
|
4
|
-
|
|
5
1
|
// src/Menu/Menu.tsx
|
|
6
2
|
import { FaEllipsisVertical } from "react-icons/fa6";
|
|
3
|
+
import { Button } from "@nextui-org/button";
|
|
7
4
|
import {
|
|
8
5
|
Dropdown as NextDropdown,
|
|
9
6
|
DropdownItem as NextDropdownItem,
|
|
@@ -45,7 +42,10 @@ var Menu = ({
|
|
|
45
42
|
/* @__PURE__ */ jsx(NextDropdownTrigger, { className: cn(className), "data-testid": testId, children: children ? (
|
|
46
43
|
// eslint-disable-next-line react/button-has-type
|
|
47
44
|
/* @__PURE__ */ jsx("button", { children })
|
|
48
|
-
) :
|
|
45
|
+
) : (
|
|
46
|
+
// INFO: we use next button here so that ref passing works
|
|
47
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", variant: "flat", className: "min-w-0", children: /* @__PURE__ */ jsx(FaEllipsisVertical, {}) })
|
|
48
|
+
) }),
|
|
49
49
|
/* @__PURE__ */ jsx(
|
|
50
50
|
NextDropdownMenu,
|
|
51
51
|
{
|
|
@@ -77,4 +77,4 @@ var Menu_default = Menu;
|
|
|
77
77
|
export {
|
|
78
78
|
Menu_default
|
|
79
79
|
};
|
|
80
|
-
//# sourceMappingURL=chunk-
|
|
80
|
+
//# sourceMappingURL=chunk-Y35GJHOR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/Menu/Menu.tsx"],"sourcesContent":["import type { DropdownSectionProps } from '@nextui-org/dropdown';\nimport type { Key, MouseEventHandler, ReactNode } from 'react';\n\nimport { FaEllipsisVertical } from 'react-icons/fa6';\n\nimport { Button } from '@nextui-org/button';\nimport {\n Dropdown as NextDropdown,\n DropdownItem as NextDropdownItem,\n DropdownMenu as NextDropdownMenu,\n DropdownSection as NextDropdownSection,\n DropdownTrigger as NextDropdownTrigger,\n} from '@nextui-org/dropdown';\nimport cn from 'classnames';\nimport createDebug from 'debug';\n\nconst debug = createDebug('component:Menu');\n\n/**\n * Menu item type\n */\nexport interface MenuItem {\n /** unique identifier */\n key: string;\n /** CSS class name */\n className?: string;\n /** additional description shown under the label */\n description?: string;\n /** disables the menu item */\n disabled?: boolean;\n /** menu item icon */\n icon?: ReactNode;\n /** menu item name */\n label: ReactNode;\n /** click event handler */\n onClick?: MouseEventHandler<HTMLLIElement>;\n /** e2e test identifier */\n testId?: string;\n}\n\n/**\n * Menu section type\n */\nexport interface MenuSection {\n /** unique identifier */\n key: string;\n /** section label */\n label: ReactNode;\n /** section items (array of MenuItem) */\n items: MenuItem[];\n}\n\nexport interface MenuProps {\n /** child components */\n children?: ReactNode;\n /** CSS class name */\n className?: string | string[];\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** menu item structure */\n items: (MenuSection | MenuItem)[];\n /** disable menu trigger */\n isDisabled?: boolean;\n /** called if item is selected */\n onAction?: (key: Key) => void;\n}\n\n/** returns String[] of disabled items/keys */\nconst getDisabledKeys = (items: (MenuSection | MenuItem)[]) => {\n return (\n items\n // @ts-expect-error typing issue with MenuSection | MenuItem\n .map((item) => (typeof item?.items === 'undefined' ? item : item.items))\n .flat<MenuItem[]>()\n .filter((item) => {\n return Object.hasOwn(item, 'disabled') && item.disabled === true;\n })\n .map((item) => item.key)\n );\n};\n\nconst renderMenuItem = (item: MenuItem) => (\n <NextDropdownItem\n className={item.className}\n data-testid={item.testId || item.key}\n description={item.description}\n key={item.key}\n onClick={item.onClick}\n startContent={item.icon}\n >\n {item.label}\n </NextDropdownItem>\n);\n\n/**\n * Dropdown menu component based on [NextUI Dropdown](https://nextui.org/docs/components/dropdown)\n */\nconst Menu = ({\n children = null,\n className = undefined,\n onAction = undefined,\n testId = undefined,\n isDisabled = false,\n items,\n}: MenuProps) => {\n debug('Menu', { items });\n\n return (\n <NextDropdown isDisabled={isDisabled}>\n <NextDropdownTrigger className={cn(className)} data-testid={testId}>\n {children ? (\n // eslint-disable-next-line react/button-has-type\n <button>{children}</button>\n ) : (\n // INFO: we use next button here so that ref passing works\n <Button size=\"sm\" variant=\"flat\" className=\"min-w-0\">\n <FaEllipsisVertical />\n </Button>\n )}\n </NextDropdownTrigger>\n <NextDropdownMenu\n // aria-label=\"Dynamic Actions\"\n items={items}\n disabledKeys={getDisabledKeys(items)}\n onAction={onAction}\n >\n {(item) => {\n if ('items' in item) {\n return (\n <NextDropdownSection\n items={item.items as MenuSection['items']}\n title={item.label as DropdownSectionProps['title']}\n key={item.key}\n >\n {/* @ts-expect-error ts problem here with render fn */}\n {(sectionItem) => {\n return renderMenuItem(sectionItem);\n }}\n </NextDropdownSection>\n );\n }\n return renderMenuItem(item);\n }}\n </NextDropdownMenu>\n </NextDropdown>\n );\n};\n\nexport default Menu;\n"],"mappings":";AAGA,SAAS,0BAA0B;AAEnC,SAAS,cAAc;AACvB;AAAA,EACE,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,OACd;AACP,OAAO,QAAQ;AACf,OAAO,iBAAiB;AAoEtB,cA0BE,YA1BF;AAlEF,IAAM,QAAQ,YAAY,gBAAgB;AAoD1C,IAAM,kBAAkB,CAAC,UAAsC;AAC7D,SACE,MAEG,IAAI,CAAC,SAAU,OAAO,MAAM,UAAU,cAAc,OAAO,KAAK,KAAM,EACtE,KAAiB,EACjB,OAAO,CAAC,SAAS;AAChB,WAAO,OAAO,OAAO,MAAM,UAAU,KAAK,KAAK,aAAa;AAAA,EAC9D,CAAC,EACA,IAAI,CAAC,SAAS,KAAK,GAAG;AAE7B;AAEA,IAAM,iBAAiB,CAAC,SACtB;AAAA,EAAC;AAAA;AAAA,IACC,WAAW,KAAK;AAAA,IAChB,eAAa,KAAK,UAAU,KAAK;AAAA,IACjC,aAAa,KAAK;AAAA,IAElB,SAAS,KAAK;AAAA,IACd,cAAc,KAAK;AAAA,IAElB,eAAK;AAAA;AAAA,EAJD,KAAK;AAKZ;AAMF,IAAM,OAAO,CAAC;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,SAAS;AAAA,EACT,aAAa;AAAA,EACb;AACF,MAAiB;AACf,QAAM,QAAQ,EAAE,MAAM,CAAC;AAEvB,SACE,qBAAC,gBAAa,YACZ;AAAA,wBAAC,uBAAoB,WAAW,GAAG,SAAS,GAAG,eAAa,QACzD;AAAA;AAAA,MAEC,oBAAC,YAAQ,UAAS;AAAA;AAAA;AAAA,MAGlB,oBAAC,UAAO,MAAK,MAAK,SAAQ,QAAO,WAAU,WACzC,8BAAC,sBAAmB,GACtB;AAAA,OAEJ;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QAEC;AAAA,QACA,cAAc,gBAAgB,KAAK;AAAA,QACnC;AAAA,QAEC,WAAC,SAAS;AACT,cAAI,WAAW,MAAM;AACnB,mBACE;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO,KAAK;AAAA,gBACZ,OAAO,KAAK;AAAA,gBAIX,WAAC,gBAAgB;AAChB,yBAAO,eAAe,WAAW;AAAA,gBACnC;AAAA;AAAA,cALK,KAAK;AAAA,YAMZ;AAAA,UAEJ;AACA,iBAAO,eAAe,IAAI;AAAA,QAC5B;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;AAEA,IAAO,eAAQ;","names":[]}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Menu/Menu.tsx"],"sourcesContent":["import type { DropdownSectionProps } from '@nextui-org/dropdown';\nimport type { Key, MouseEventHandler, ReactNode } from 'react';\n\nimport { FaEllipsisVertical } from 'react-icons/fa6';\n\nimport {\n Dropdown as NextDropdown,\n DropdownItem as NextDropdownItem,\n DropdownMenu as NextDropdownMenu,\n DropdownSection as NextDropdownSection,\n DropdownTrigger as NextDropdownTrigger,\n} from '@nextui-org/dropdown';\nimport cn from 'classnames';\nimport createDebug from 'debug';\n\nimport Button from '../Button';\n\nconst debug = createDebug('component:Menu');\n\n/**\n * Menu item type\n */\nexport interface MenuItem {\n /** unique identifier */\n key: string;\n /** CSS class name */\n className?: string;\n /** additional description shown under the label */\n description?: string;\n /** disables the menu item */\n disabled?: boolean;\n /** menu item icon */\n icon?: ReactNode;\n /** menu item name */\n label: ReactNode;\n /** click event handler */\n onClick?: MouseEventHandler<HTMLLIElement>;\n /** e2e test identifier */\n testId?: string;\n}\n\n/**\n * Menu section type\n */\nexport interface MenuSection {\n /** unique identifier */\n key: string;\n /** section label */\n label: ReactNode;\n /** section items (array of MenuItem) */\n items: MenuItem[];\n}\n\nexport interface MenuProps {\n /** child components */\n children?: ReactNode;\n /** CSS class name */\n className?: string | string[];\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** menu item structure */\n items: (MenuSection | MenuItem)[];\n /** disable menu trigger */\n isDisabled?: boolean;\n /** called if item is selected */\n onAction?: (key: Key) => void;\n}\n\n/** returns String[] of disabled items/keys */\nconst getDisabledKeys = (items: (MenuSection | MenuItem)[]) => {\n return (\n items\n // @ts-expect-error typing issue with MenuSection | MenuItem\n .map((item) => (typeof item?.items === 'undefined' ? item : item.items))\n .flat<MenuItem[]>()\n .filter((item) => {\n return Object.hasOwn(item, 'disabled') && item.disabled === true;\n })\n .map((item) => item.key)\n );\n};\n\nconst renderMenuItem = (item: MenuItem) => (\n <NextDropdownItem\n className={item.className}\n data-testid={item.testId || item.key}\n description={item.description}\n key={item.key}\n onClick={item.onClick}\n startContent={item.icon}\n >\n {item.label}\n </NextDropdownItem>\n);\n\n/**\n * Dropdown menu component based on [NextUI Dropdown](https://nextui.org/docs/components/dropdown)\n */\nconst Menu = ({\n children = null,\n className = undefined,\n onAction = undefined,\n testId = undefined,\n isDisabled = false,\n items,\n}: MenuProps) => {\n debug('Menu', { items });\n\n return (\n <NextDropdown isDisabled={isDisabled}>\n <NextDropdownTrigger className={cn(className)} data-testid={testId}>\n {children ? (\n // eslint-disable-next-line react/button-has-type\n <button>{children}</button>\n ) : (\n <Button size=\"sm\" variant=\"bordered\" className=\"min-w-0\">\n <FaEllipsisVertical />\n </Button>\n )}\n </NextDropdownTrigger>\n <NextDropdownMenu\n // aria-label=\"Dynamic Actions\"\n items={items}\n disabledKeys={getDisabledKeys(items)}\n onAction={onAction}\n >\n {(item) => {\n if ('items' in item) {\n return (\n <NextDropdownSection\n items={item.items as MenuSection['items']}\n title={item.label as DropdownSectionProps['title']}\n key={item.key}\n >\n {/* @ts-expect-error ts problem here with render fn */}\n {(sectionItem) => {\n return renderMenuItem(sectionItem);\n }}\n </NextDropdownSection>\n );\n }\n return renderMenuItem(item);\n }}\n </NextDropdownMenu>\n </NextDropdown>\n );\n};\n\nexport default Menu;\n"],"mappings":";;;;;AAGA,SAAS,0BAA0B;AAEnC;AAAA,EACE,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,OACd;AACP,OAAO,QAAQ;AACf,OAAO,iBAAiB;AAsEtB,cA0BE,YA1BF;AAlEF,IAAM,QAAQ,YAAY,gBAAgB;AAoD1C,IAAM,kBAAkB,CAAC,UAAsC;AAC7D,SACE,MAEG,IAAI,CAAC,SAAU,OAAO,MAAM,UAAU,cAAc,OAAO,KAAK,KAAM,EACtE,KAAiB,EACjB,OAAO,CAAC,SAAS;AAChB,WAAO,OAAO,OAAO,MAAM,UAAU,KAAK,KAAK,aAAa;AAAA,EAC9D,CAAC,EACA,IAAI,CAAC,SAAS,KAAK,GAAG;AAE7B;AAEA,IAAM,iBAAiB,CAAC,SACtB;AAAA,EAAC;AAAA;AAAA,IACC,WAAW,KAAK;AAAA,IAChB,eAAa,KAAK,UAAU,KAAK;AAAA,IACjC,aAAa,KAAK;AAAA,IAElB,SAAS,KAAK;AAAA,IACd,cAAc,KAAK;AAAA,IAElB,eAAK;AAAA;AAAA,EAJD,KAAK;AAKZ;AAMF,IAAM,OAAO,CAAC;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,SAAS;AAAA,EACT,aAAa;AAAA,EACb;AACF,MAAiB;AACf,QAAM,QAAQ,EAAE,MAAM,CAAC;AAEvB,SACE,qBAAC,gBAAa,YACZ;AAAA,wBAAC,uBAAoB,WAAW,GAAG,SAAS,GAAG,eAAa,QACzD;AAAA;AAAA,MAEC,oBAAC,YAAQ,UAAS;AAAA,QAElB,oBAAC,kBAAO,MAAK,MAAK,SAAQ,YAAW,WAAU,WAC7C,8BAAC,sBAAmB,GACtB,GAEJ;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QAEC;AAAA,QACA,cAAc,gBAAgB,KAAK;AAAA,QACnC;AAAA,QAEC,WAAC,SAAS;AACT,cAAI,WAAW,MAAM;AACnB,mBACE;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO,KAAK;AAAA,gBACZ,OAAO,KAAK;AAAA,gBAIX,WAAC,gBAAgB;AAChB,yBAAO,eAAe,WAAW;AAAA,gBACnC;AAAA;AAAA,cALK,KAAK;AAAA,YAMZ;AAAA,UAEJ;AACA,iBAAO,eAAe,IAAI;AAAA,QAC5B;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;AAEA,IAAO,eAAQ;","names":[]}
|
package/dist/chunk-NFWS2SSN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Button/index.ts"],"sourcesContent":["import type { ButtonProps } from './Button';\n\nimport Button from './Button';\n\nexport default Button;\n\nexport type { ButtonProps };\n"],"mappings":";;;;;AAIA,IAAOA,kBAAQ;","names":["Button_default"]}
|