@liner-fe/prism 1.13.32 → 1.13.33
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/lib/components/Popover/index.d.ts +1 -0
- package/lib/constants/component.d.ts +15 -0
- package/lib/constants/figma/component.d.ts +4 -0
- package/lib/constants/figma/index.d.ts +24 -0
- package/lib/constants/figma/token.d.ts +4 -0
- package/lib/constants/figma/types.d.ts +7 -0
- package/lib/constants/token.d.ts +11 -0
- package/lib/index.d.ts +0 -1
- package/lib/index.mjs +8 -46
- package/lib/index.mjs.map +4 -4
- package/lib/token/BreakPoint/index.d.ts +1 -0
- package/lib/token/Gap/index.d.ts +1 -0
- package/lib/token/Padding/index.d.ts +1 -0
- package/lib/token/Shadow/index.d.ts +1 -0
- package/lib/utils/path.d.ts +1 -0
- package/package.json +2 -1
- package/lib/PrismProvider.d.ts +0 -1
- /package/lib/token/{border-radius → BorderRadius}/index.d.ts +0 -0
|
@@ -29,6 +29,7 @@ export interface PopoverContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
29
29
|
align?: 'start' | 'center' | 'end';
|
|
30
30
|
confirmText?: string;
|
|
31
31
|
isOverlay?: boolean;
|
|
32
|
+
container?: HTMLElement;
|
|
32
33
|
onConfirm?: () => void;
|
|
33
34
|
onClose?: () => void;
|
|
34
35
|
onPointerDownOutside?: () => void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const COMPONENT_NAME: {
|
|
2
|
+
readonly BUTTON: "Button";
|
|
3
|
+
readonly CHECKBOX: "CheckBox";
|
|
4
|
+
readonly ICON: "Icon";
|
|
5
|
+
readonly ICON_BUTTON: "IconButton";
|
|
6
|
+
readonly CHECK_BOX: "CheckBox";
|
|
7
|
+
readonly TYPOGRAPHY: "Typography";
|
|
8
|
+
readonly TEXT_FIELD: "Textfield";
|
|
9
|
+
readonly TOAST: "Toast";
|
|
10
|
+
readonly POP_OVER: "PopOver";
|
|
11
|
+
readonly TOOL_TIP: "Tooltip";
|
|
12
|
+
readonly LABEL: "Label";
|
|
13
|
+
readonly RADIO: "Radio";
|
|
14
|
+
readonly BADGE: "Badge";
|
|
15
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Figma } from './types';
|
|
2
|
+
export declare const FIGMA: {
|
|
3
|
+
Icon: Figma;
|
|
4
|
+
Button: Figma;
|
|
5
|
+
CheckBox: Figma;
|
|
6
|
+
IconButton: Figma;
|
|
7
|
+
Typography: Figma;
|
|
8
|
+
Textfield: Figma;
|
|
9
|
+
Toast: Figma;
|
|
10
|
+
PopOver: Figma;
|
|
11
|
+
Tooltip: Figma;
|
|
12
|
+
Label: Figma;
|
|
13
|
+
Radio: Figma;
|
|
14
|
+
Badge: Figma;
|
|
15
|
+
Shadow: Figma;
|
|
16
|
+
Padding: Figma;
|
|
17
|
+
Opacity: Figma;
|
|
18
|
+
Size: Figma;
|
|
19
|
+
Gap: Figma;
|
|
20
|
+
Color: Figma;
|
|
21
|
+
BreakPoint: Figma;
|
|
22
|
+
BorderRadius: Figma;
|
|
23
|
+
};
|
|
24
|
+
export declare const DESIGN = "design";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const TOKEN = "token";
|
|
2
|
+
export declare const TOKEN_NAME: {
|
|
3
|
+
readonly SHADOW: "Shadow";
|
|
4
|
+
readonly PADDING: "Padding";
|
|
5
|
+
readonly OPACITY: "Opacity";
|
|
6
|
+
readonly SIZE: "Size";
|
|
7
|
+
readonly GAP: "Gap";
|
|
8
|
+
readonly COLOR: "Color";
|
|
9
|
+
readonly BREAK_POINT: "BreakPoint";
|
|
10
|
+
readonly RADIUS: "BorderRadius";
|
|
11
|
+
};
|
package/lib/index.d.ts
CHANGED
package/lib/index.mjs
CHANGED
|
@@ -7202,16 +7202,6 @@ var Icon = /* @__PURE__ */ __name((props) => {
|
|
|
7202
7202
|
);
|
|
7203
7203
|
}, "Icon");
|
|
7204
7204
|
|
|
7205
|
-
// src/components/Button/index.tsx
|
|
7206
|
-
import { useRecoilValue } from "recoil";
|
|
7207
|
-
|
|
7208
|
-
// src/PrismProvider.tsx
|
|
7209
|
-
import { atom } from "recoil";
|
|
7210
|
-
var ampLogEventFunc = atom({
|
|
7211
|
-
key: "ampLogEventFunc",
|
|
7212
|
-
default: null
|
|
7213
|
-
});
|
|
7214
|
-
|
|
7215
7205
|
// src/components/Button/index.tsx
|
|
7216
7206
|
import { jsx as jsx150, jsxs as jsxs107 } from "react/jsx-runtime";
|
|
7217
7207
|
var buttonIconSizeMap = {
|
|
@@ -7330,47 +7320,19 @@ var TextButton = forwardRef(
|
|
|
7330
7320
|
}
|
|
7331
7321
|
);
|
|
7332
7322
|
var Button = forwardRef((props, ref) => {
|
|
7333
|
-
const ampLogEvent = useRecoilValue(ampLogEventFunc);
|
|
7334
7323
|
const { elementName, ...rest } = props;
|
|
7335
7324
|
switch (rest.as) {
|
|
7336
7325
|
case "default":
|
|
7337
7326
|
case void 0:
|
|
7338
|
-
return /* @__PURE__ */ jsx150(
|
|
7339
|
-
DefaultButton,
|
|
7340
|
-
{
|
|
7341
|
-
...rest,
|
|
7342
|
-
onClick: (e) => {
|
|
7343
|
-
if (ampLogEvent) {
|
|
7344
|
-
ampLogEvent(`click_${elementName}_button`, {
|
|
7345
|
-
button_text: rest.children?.toString(),
|
|
7346
|
-
...rest.leftIcon?.name || rest.rightIcon?.name ? { button_icon: rest.leftIcon?.name || rest.rightIcon?.name } : {}
|
|
7347
|
-
});
|
|
7348
|
-
}
|
|
7349
|
-
props.onClick?.(e);
|
|
7350
|
-
},
|
|
7351
|
-
ref
|
|
7352
|
-
}
|
|
7353
|
-
);
|
|
7327
|
+
return /* @__PURE__ */ jsx150(DefaultButton, { ...rest, ref });
|
|
7354
7328
|
case "text":
|
|
7355
|
-
return /* @__PURE__ */ jsx150(
|
|
7356
|
-
TextButton,
|
|
7357
|
-
{
|
|
7358
|
-
...rest,
|
|
7359
|
-
onClick: (e) => {
|
|
7360
|
-
if (ampLogEvent) {
|
|
7361
|
-
ampLogEvent(`click_${elementName}_button`, { button_text: rest.children?.toString() });
|
|
7362
|
-
}
|
|
7363
|
-
props.onClick?.(e);
|
|
7364
|
-
},
|
|
7365
|
-
ref
|
|
7366
|
-
}
|
|
7367
|
-
);
|
|
7329
|
+
return /* @__PURE__ */ jsx150(TextButton, { ...rest, ref });
|
|
7368
7330
|
}
|
|
7369
7331
|
});
|
|
7370
7332
|
|
|
7371
7333
|
// src/components/Toast/hooks/useToast.ts
|
|
7372
|
-
import { atom
|
|
7373
|
-
var toastAtom =
|
|
7334
|
+
import { atom, useSetRecoilState } from "recoil";
|
|
7335
|
+
var toastAtom = atom({
|
|
7374
7336
|
default: { list: [] },
|
|
7375
7337
|
key: "toastAtoms"
|
|
7376
7338
|
});
|
|
@@ -7478,7 +7440,7 @@ var Paragraph = forwardRef2(
|
|
|
7478
7440
|
);
|
|
7479
7441
|
|
|
7480
7442
|
// src/components/Toast/index.tsx
|
|
7481
|
-
import { useRecoilValue
|
|
7443
|
+
import { useRecoilValue, useSetRecoilState as useSetRecoilState2 } from "recoil";
|
|
7482
7444
|
import Lottie from "lottie-web";
|
|
7483
7445
|
|
|
7484
7446
|
// src/lottie/loading.json
|
|
@@ -7958,7 +7920,7 @@ var loading_default = {
|
|
|
7958
7920
|
import { jsx as jsx152, jsxs as jsxs108 } from "react/jsx-runtime";
|
|
7959
7921
|
import { createElement } from "react";
|
|
7960
7922
|
var Toaster = /* @__PURE__ */ __name(() => {
|
|
7961
|
-
const { list } =
|
|
7923
|
+
const { list } = useRecoilValue(toastAtom);
|
|
7962
7924
|
return /* @__PURE__ */ jsxs108(Provider, { children: [
|
|
7963
7925
|
list.map((props) => /* @__PURE__ */ createElement(SingleToast, { ...props, key: props.toastId })),
|
|
7964
7926
|
/* @__PURE__ */ jsx152(Viewport, { className: style_module_default3.ToastViewport })
|
|
@@ -8285,8 +8247,9 @@ var PopoverContent = React3.forwardRef(
|
|
|
8285
8247
|
onPointerDownOutside,
|
|
8286
8248
|
className,
|
|
8287
8249
|
children,
|
|
8250
|
+
container,
|
|
8288
8251
|
...props
|
|
8289
|
-
}, ref) => /* @__PURE__ */ jsx158(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsxs109(Fragment4, { children: [
|
|
8252
|
+
}, ref) => /* @__PURE__ */ jsx158(PopoverPrimitive.Portal, { container, children: /* @__PURE__ */ jsxs109(Fragment4, { children: [
|
|
8290
8253
|
/* @__PURE__ */ jsxs109(
|
|
8291
8254
|
PopoverPrimitive.Content,
|
|
8292
8255
|
{
|
|
@@ -9055,7 +9018,6 @@ export {
|
|
|
9055
9018
|
Toaster,
|
|
9056
9019
|
Tooltip,
|
|
9057
9020
|
Typography,
|
|
9058
|
-
ampLogEventFunc,
|
|
9059
9021
|
arrayToStyleObject,
|
|
9060
9022
|
colorKeys,
|
|
9061
9023
|
getIconComponent,
|