@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.
@@ -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,4 @@
1
+ import { COMPONENT_NAME } from '../component';
2
+ import { Figma } from './types';
3
+ export type FigmaComponentKeys = (typeof COMPONENT_NAME)[keyof typeof COMPONENT_NAME];
4
+ export declare const FIGMA_COMPONENT: Record<FigmaComponentKeys, Figma>;
@@ -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,4 @@
1
+ import { TOKEN_NAME } from '../token';
2
+ import { Figma } from './types';
3
+ export type FigmaTokenKeys = (typeof TOKEN_NAME)[keyof typeof TOKEN_NAME];
4
+ export declare const FIGMA_TOKEN: Record<FigmaTokenKeys, Figma>;
@@ -0,0 +1,7 @@
1
+ export declare enum FigmaType {
2
+ Basic = "figma"
3
+ }
4
+ export interface Figma {
5
+ type: FigmaType;
6
+ url: string;
7
+ }
@@ -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
@@ -16,4 +16,3 @@ export * from './components/List';
16
16
  export * from './components/Label';
17
17
  export * from './types/color';
18
18
  export * from './type/index';
19
- export * from './PrismProvider';
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 as atom2, useSetRecoilState } from "recoil";
7373
- var toastAtom = atom2({
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 as useRecoilValue2, useSetRecoilState as useSetRecoilState2 } from "recoil";
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 } = useRecoilValue2(toastAtom);
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,