@caspeco/casper-ui-library 9.6.0 → 9.6.1
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/form-control/form-control.d.ts +1 -1
- package/dist/components/form-control/form-control.d.ts.map +1 -1
- package/dist/components/modal/modal.d.ts +2 -2
- package/dist/components/modal/modal.d.ts.map +1 -1
- package/dist/components/modal/modal.js +16 -14
- package/dist/components/textarea/textarea.d.ts +2 -2
- package/dist/components/textarea/textarea.d.ts.map +1 -1
- package/dist/components/textarea/textarea.js +9 -8
- package/dist/components/tooltip/tooltip.d.ts +1 -1
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip.js +9 -9
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ThemeStyleProps } from '../../theme/index.js';
|
|
2
2
|
import { Field as ChakraField } from '@chakra-ui/react';
|
|
3
|
-
type ChakraFormControlProperties = Pick<ChakraField.RootProps, "
|
|
3
|
+
type ChakraFormControlProperties = Pick<ChakraField.RootProps, "children"> & Partial<Pick<ChakraField.RootProps, "id">>;
|
|
4
4
|
type CustomProps = {
|
|
5
5
|
isDisabled?: boolean;
|
|
6
6
|
isReadOnly?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-control.d.ts","sourceRoot":"","sources":["../../../lib/components/form-control/form-control.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAExD,KAAK,2BAA2B,GAAG,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"form-control.d.ts","sourceRoot":"","sources":["../../../lib/components/form-control/form-control.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAExD,KAAK,2BAA2B,GAAG,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,UAAU,CAAC,GACzE,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC;AAE5C,KAAK,WAAW,GAAG;IAElB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,2BAA2B,GAAG,eAAe,CAAC;AAE3F;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAC3B,QAAQ,EACR,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,GAAG,KAAK,EACR,EAAE,gBAAgB,2CAYlB"}
|
|
@@ -11,8 +11,8 @@ type CustomModalProperties = {
|
|
|
11
11
|
returnFocusOnClose?: boolean;
|
|
12
12
|
onCloseComplete?: () => void;
|
|
13
13
|
};
|
|
14
|
-
type ChakraDialogProperties = Pick<ChakraDialog.RootProps, "children" | "
|
|
14
|
+
type ChakraDialogProperties = Pick<ChakraDialog.RootProps, "children" | "scrollBehavior"> & Partial<Pick<ChakraDialog.RootProps, "id" | "lazyMount">>;
|
|
15
15
|
export type ModalProps = CustomModalProperties & ChakraDialogProperties;
|
|
16
|
-
export declare function Modal({ children, isOpen, onClose, closeOnOverlayClick, closeOnEsc, onCloseComplete, returnFocusOnClose, size, scrollBehavior, isCentered, ...props }: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function Modal({ children, isOpen, onClose, closeOnOverlayClick, closeOnEsc, onCloseComplete, returnFocusOnClose, size, scrollBehavior, isCentered, lazyMount, ...props }: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
export {};
|
|
18
18
|
//# sourceMappingURL=modal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../lib/components/modal/modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,MAAM,IAAI,YAAY,EAItB,MAAM,kBAAkB,CAAC;AAI1B,KAAK,qBAAqB,GAAG;IAC5B;2EACuE;IACvE,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;IAG1C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AAEF,KAAK,sBAAsB,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../lib/components/modal/modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,MAAM,IAAI,YAAY,EAItB,MAAM,kBAAkB,CAAC;AAI1B,KAAK,qBAAqB,GAAG;IAC5B;2EACuE;IACvE,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;IAG1C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AAEF,KAAK,sBAAsB,GAAG,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,UAAU,GAAG,gBAAgB,CAAC,GACxF,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC;AAE3D,MAAM,MAAM,UAAU,GAAG,qBAAqB,GAAG,sBAAsB,CAAC;AAExE,wBAAgB,KAAK,CAAC,EACrB,QAAQ,EACR,MAAM,EACN,OAAO,EACP,mBAAmB,EACnB,UAAU,EACV,eAAe,EACf,kBAAyB,EACzB,IAAW,EACX,cAAyB,EACzB,UAAiB,EACjB,SAAiB,EACjB,GAAG,KAAK,EACR,EAAE,UAAU,2CAqCZ"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { useBreakpointValue as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { ModalBodyContext as
|
|
5
|
-
function
|
|
1
|
+
import { jsx as e, jsxs as O } from "react/jsx-runtime";
|
|
2
|
+
import { useBreakpointValue as b, Dialog as o, Portal as B } from "@chakra-ui/react";
|
|
3
|
+
import { useState as E } from "react";
|
|
4
|
+
import { ModalBodyContext as P } from "./modal-body-context.js";
|
|
5
|
+
function M({
|
|
6
6
|
children: n,
|
|
7
7
|
isOpen: r,
|
|
8
8
|
onClose: i,
|
|
@@ -13,13 +13,14 @@ function k({
|
|
|
13
13
|
size: m = "sm",
|
|
14
14
|
scrollBehavior: c = "inside",
|
|
15
15
|
isCentered: p = !0,
|
|
16
|
-
|
|
16
|
+
lazyMount: u = !1,
|
|
17
|
+
...f
|
|
17
18
|
}) {
|
|
18
|
-
const [h,
|
|
19
|
-
function
|
|
20
|
-
|
|
19
|
+
const [h, v] = E(null), t = b({ base: "bottomSheet", md: void 0 });
|
|
20
|
+
function x(C) {
|
|
21
|
+
C.open || i?.();
|
|
21
22
|
}
|
|
22
|
-
return /* @__PURE__ */ e(
|
|
23
|
+
return /* @__PURE__ */ e(P.Provider, { value: { bodyElement: h, setBodyElement: v }, children: /* @__PURE__ */ e(
|
|
23
24
|
o.Root,
|
|
24
25
|
{
|
|
25
26
|
variant: t,
|
|
@@ -30,11 +31,12 @@ function k({
|
|
|
30
31
|
closeOnInteractOutside: a,
|
|
31
32
|
closeOnEscape: l,
|
|
32
33
|
open: r,
|
|
33
|
-
onOpenChange:
|
|
34
|
+
onOpenChange: x,
|
|
34
35
|
restoreFocus: d,
|
|
35
36
|
onExitComplete: s,
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
lazyMount: u,
|
|
38
|
+
...f,
|
|
39
|
+
children: /* @__PURE__ */ O(B, { children: [
|
|
38
40
|
/* @__PURE__ */ e(o.Backdrop, { "data-variant": t }),
|
|
39
41
|
/* @__PURE__ */ e(o.Positioner, { children: /* @__PURE__ */ e(o.Content, { children: n }) })
|
|
40
42
|
] })
|
|
@@ -42,5 +44,5 @@ function k({
|
|
|
42
44
|
) });
|
|
43
45
|
}
|
|
44
46
|
export {
|
|
45
|
-
|
|
47
|
+
M as Modal
|
|
46
48
|
};
|
|
@@ -8,8 +8,8 @@ type CustomProperties = {
|
|
|
8
8
|
isRequired?: boolean;
|
|
9
9
|
};
|
|
10
10
|
type CustomStyleProps = CustomChakraBoxProps & LayoutProps & MarginProps & PaddingProps & CustomProperties;
|
|
11
|
-
type ChakraTextareaProperties = Pick<ChakraTextareaProps, "id" | "name" | "placeholder" | "rows" | "value" | "defaultValue" | "onChange" | "onBlur" | "onFocus" | "onKeyDown" | "resize"
|
|
11
|
+
type ChakraTextareaProperties = Pick<ChakraTextareaProps, "id" | "name" | "placeholder" | "rows" | "value" | "defaultValue" | "onChange" | "onBlur" | "onFocus" | "onKeyDown" | "resize"> & Partial<Pick<ChakraTextareaProps, "autoresize">>;
|
|
12
12
|
export type TextareaProps = ChakraTextareaProperties & CustomStyleProps;
|
|
13
|
-
export declare const Textarea: React.ForwardRefExoticComponent<
|
|
13
|
+
export declare const Textarea: React.ForwardRefExoticComponent<Pick<ChakraTextareaProps, "resize" | "id" | "name" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "defaultValue" | "value" | "placeholder" | "rows"> & Partial<Pick<ChakraTextareaProps, "autoresize">> & CustomChakraBoxProps & LayoutProps & MarginProps & PaddingProps & CustomProperties & React.RefAttributes<HTMLTextAreaElement>>;
|
|
14
14
|
export {};
|
|
15
15
|
//# sourceMappingURL=textarea.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../lib/components/textarea/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5F,OAAO,EAA8B,KAAK,aAAa,IAAI,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACzG,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,KAAK,gBAAgB,GAAG;IACvB,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IAG/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,KAAK,gBAAgB,GAAG,oBAAoB,GAAG,WAAW,GAAG,WAAW,GAAG,YAAY,GAAG,gBAAgB,CAAC;AAE3G,KAAK,wBAAwB,GAAG,IAAI,CACnC,mBAAmB,EACjB,IAAI,GACJ,MAAM,GACN,aAAa,GACb,MAAM,GACN,OAAO,GACP,cAAc,GACd,UAAU,GACV,QAAQ,GACR,SAAS,GACT,WAAW,GACX,QAAQ,
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../lib/components/textarea/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5F,OAAO,EAA8B,KAAK,aAAa,IAAI,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACzG,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,KAAK,gBAAgB,GAAG;IACvB,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IAG/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,KAAK,gBAAgB,GAAG,oBAAoB,GAAG,WAAW,GAAG,WAAW,GAAG,YAAY,GAAG,gBAAgB,CAAC;AAE3G,KAAK,wBAAwB,GAAG,IAAI,CACnC,mBAAmB,EACjB,IAAI,GACJ,MAAM,GACN,aAAa,GACb,MAAM,GACN,OAAO,GACP,cAAc,GACd,UAAU,GACV,QAAQ,GACR,SAAS,GACT,WAAW,GACX,QAAQ,CACV,GACA,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,YAAY,CAAC,CAAC,CAAC;AAElD,MAAM,MAAM,aAAa,GAAG,wBAAwB,GAAG,gBAAgB,CAAC;AAExE,eAAO,MAAM,QAAQ,+WAcnB,CAAC"}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Textarea as
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { Textarea as l } from "@chakra-ui/react";
|
|
3
3
|
import m from "react";
|
|
4
4
|
const p = m.forwardRef((e, r) => {
|
|
5
|
-
const { isDisabled: a, isReadOnly: t, isRequired:
|
|
6
|
-
return /* @__PURE__ */
|
|
7
|
-
|
|
5
|
+
const { isDisabled: a, isReadOnly: t, isRequired: s, resize: i, autoresize: o = !1, ...d } = e;
|
|
6
|
+
return /* @__PURE__ */ f(
|
|
7
|
+
l,
|
|
8
8
|
{
|
|
9
|
-
resize:
|
|
9
|
+
resize: i,
|
|
10
|
+
autoresize: o,
|
|
10
11
|
ref: r,
|
|
11
12
|
disabled: a,
|
|
12
13
|
readOnly: t,
|
|
13
|
-
required:
|
|
14
|
-
...
|
|
14
|
+
required: s,
|
|
15
|
+
...d
|
|
15
16
|
}
|
|
16
17
|
);
|
|
17
18
|
});
|
|
@@ -2,7 +2,7 @@ import { CustomChakraBoxProps, LayoutProps, MarginProps, PaddingProps, Typograph
|
|
|
2
2
|
import { Tooltip as ChakraTooltip, GridProps } from '@chakra-ui/react';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
type Positioning = NonNullable<ChakraTooltip.RootProps["positioning"]>;
|
|
5
|
-
export type TooltipProps = Pick<ChakraTooltip.RootProps, "children"
|
|
5
|
+
export type TooltipProps = Pick<ChakraTooltip.RootProps, "children"> & Partial<Pick<ChakraTooltip.RootProps, "disabled">> & CustomChakraBoxProps & PaddingProps & MarginProps & LayoutProps & GridProps & TypographyProps & {
|
|
6
6
|
placement?: Positioning["placement"];
|
|
7
7
|
label?: ReactNode;
|
|
8
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../lib/components/tooltip/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAMN,KAAK,oBAAoB,EACzB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,IAAI,aAAa,EAAU,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,KAAK,WAAW,GAAG,WAAW,CAAC,aAAa,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC;AAEvE,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../lib/components/tooltip/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAMN,KAAK,oBAAoB,EACzB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,IAAI,aAAa,EAAU,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,KAAK,WAAW,GAAG,WAAW,CAAC,aAAa,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC;AAEvE,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,UAAU,CAAC,GACnE,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,GAClD,oBAAoB,GACpB,YAAY,GACZ,WAAW,GACX,WAAW,GACX,SAAS,GACT,eAAe,GAAG;IAEjB,SAAS,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IACrC,KAAK,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AAEH;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,gHAwC1C"}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { jsx as e, Fragment as b, jsxs as i } from "react/jsx-runtime";
|
|
2
|
-
import { Tooltip as r, Portal as
|
|
3
|
-
import { ThemeSpaceVariable as l, ThemeFontSizeVariable as
|
|
4
|
-
function w(
|
|
2
|
+
import { Tooltip as r, Portal as f } from "@chakra-ui/react";
|
|
3
|
+
import { ThemeSpaceVariable as l, ThemeFontSizeVariable as T, ThemeFontVariable as u, ThemeColorVariable as a, ThemeRadiusVariable as S } from "../../theme/theme-types.js";
|
|
4
|
+
function w(t) {
|
|
5
5
|
const {
|
|
6
6
|
children: o,
|
|
7
7
|
label: n,
|
|
8
8
|
placement: m = "bottom",
|
|
9
9
|
p: s = l.Small,
|
|
10
|
-
fontSize: c =
|
|
10
|
+
fontSize: c = T.Small,
|
|
11
11
|
fontFamily: d = u.Body,
|
|
12
|
-
disabled: h,
|
|
12
|
+
disabled: h = !1,
|
|
13
13
|
...p
|
|
14
|
-
} =
|
|
14
|
+
} = t;
|
|
15
15
|
return h ? o : /* @__PURE__ */ e(b, { children: /* @__PURE__ */ i(r.Root, { positioning: { placement: m }, ...p, children: [
|
|
16
16
|
/* @__PURE__ */ e(r.Trigger, { asChild: !0, children: /* @__PURE__ */ e("span", { children: o }) }),
|
|
17
|
-
/* @__PURE__ */ e(
|
|
17
|
+
/* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(r.Positioner, { children: /* @__PURE__ */ i(
|
|
18
18
|
r.Content,
|
|
19
19
|
{
|
|
20
20
|
p: s,
|
|
21
21
|
borderRadius: S.Medium,
|
|
22
22
|
fontSize: c,
|
|
23
23
|
fontFamily: d,
|
|
24
|
-
css: { "--tooltip-bg":
|
|
25
|
-
color:
|
|
24
|
+
css: { "--tooltip-bg": a.OnSurface },
|
|
25
|
+
color: a.Surface,
|
|
26
26
|
children: [
|
|
27
27
|
/* @__PURE__ */ e(r.Arrow, { css: { "--arrow-size": l.Small }, children: /* @__PURE__ */ e(r.ArrowTip, {}) }),
|
|
28
28
|
n
|