@pibit.ai/cure-design-system 0.6.54 → 0.6.55
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.
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
|
+
export type AddActionIconSize = "size-4" | "size-5" | "size-6";
|
|
2
3
|
/**
|
|
3
4
|
* Link-style add action ("Add Filter", "Add Filter Group") on the DS Button, kept visually
|
|
4
5
|
* identical to the raw button it replaces: medium weight, 1.5 gap, caller-driven colour and
|
|
5
6
|
* font size (the caller's classes land last, so they win over the link variant's defaults).
|
|
6
7
|
* Like the raw button: the icon takes the label's colour (`currentColor`) rather than the link
|
|
7
|
-
* variant's lighter icon shade,
|
|
8
|
+
* variant's lighter icon shade, the icon is `iconSize` (not the Button's 20px), and the label is
|
|
9
|
+
* not underlined on hover.
|
|
8
10
|
*/
|
|
9
11
|
export declare const AddActionButton: ({ icon: Icon, fontSize, iconSize, className, onClick, children, }: {
|
|
10
12
|
icon: FC<{
|
|
11
13
|
className?: string;
|
|
12
14
|
}>;
|
|
13
15
|
fontSize: string;
|
|
14
|
-
iconSize:
|
|
16
|
+
iconSize: AddActionIconSize;
|
|
15
17
|
className?: string;
|
|
16
18
|
onClick: () => void;
|
|
17
19
|
children: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-action-button.d.ts","sourceRoot":"","sources":["../../../src/patterns/condition-builder/add-action-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI3C
|
|
1
|
+
{"version":3,"file":"add-action-button.d.ts","sourceRoot":"","sources":["../../../src/patterns/condition-builder/add-action-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI3C,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAY/D;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAAI,mEAO7B;IACC,IAAI,EAAE,EAAE,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;CACvB,4CAiBA,CAAC"}
|
|
@@ -1,30 +1,35 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { cx as c } from "../../utils/cn.js";
|
|
3
|
-
import { Button as
|
|
4
|
-
const
|
|
5
|
-
icon:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
import { Button as s } from "../../primitives/button/button.js";
|
|
4
|
+
const d = {
|
|
5
|
+
"size-4": "*:data-icon:size-4",
|
|
6
|
+
"size-5": "*:data-icon:size-5",
|
|
7
|
+
"size-6": "*:data-icon:size-6"
|
|
8
|
+
}, u = ({
|
|
9
|
+
icon: o,
|
|
10
|
+
fontSize: a,
|
|
11
|
+
iconSize: t,
|
|
12
|
+
className: e,
|
|
13
|
+
onClick: i,
|
|
14
|
+
children: n
|
|
15
|
+
}) => /* @__PURE__ */ r(
|
|
16
|
+
s,
|
|
13
17
|
{
|
|
14
18
|
type: "button",
|
|
15
19
|
color: "link-color",
|
|
16
20
|
size: "sm",
|
|
17
|
-
iconLeading:
|
|
18
|
-
leadingClassName:
|
|
21
|
+
iconLeading: o,
|
|
22
|
+
leadingClassName: t,
|
|
19
23
|
className: c(
|
|
20
24
|
"gap-1.5 font-medium *:data-icon:text-current hover:*:data-icon:text-current hover:*:data-text:decoration-transparent",
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
d[t],
|
|
26
|
+
a,
|
|
27
|
+
e
|
|
23
28
|
),
|
|
24
|
-
onClick:
|
|
25
|
-
children:
|
|
29
|
+
onClick: i,
|
|
30
|
+
children: n
|
|
26
31
|
}
|
|
27
32
|
);
|
|
28
33
|
export {
|
|
29
|
-
|
|
34
|
+
u as AddActionButton
|
|
30
35
|
};
|