@liner-fe/prism 2.12.13 → 3.0.7

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/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { SystemKeys, TypographyCaptionPrefix, TypographyParagraphPrefix, TypographyHeadingPrefix, TypographyTitlePrefix, TypographyDisplayPrefix, BasicColorType } from '@liner-fe/design-token-primitive';
2
2
  import * as react from 'react';
3
- import react__default, { ButtonHTMLAttributes, RefAttributes, HTMLAttributes, ReactNode, ComponentPropsWithoutRef, InputHTMLAttributes, ComponentProps, LiHTMLAttributes, MouseEventHandler } from 'react';
3
+ import react__default, { ButtonHTMLAttributes, RefAttributes, HTMLAttributes, JSX, ReactNode, ComponentPropsWithoutRef, InputHTMLAttributes, ComponentProps, LiHTMLAttributes, MouseEventHandler } from 'react';
4
4
  import * as cva from 'cva';
5
5
  import { VariantProps } from 'cva';
6
6
  import { IconProps, IconComponentType } from '@liner-fe/icon';
@@ -398,7 +398,7 @@ interface SelectItemProps {
398
398
  } & Pick<IconProps, 'fill' | 'thick' | 'type' | 'fillType' | 'size'>;
399
399
  onClick?: () => void;
400
400
  }
401
- declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<never>> & {
401
+ declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLButtonElement>> & {
402
402
  Item: ({ value, text, disabled, icon, onClick }: SelectItemProps) => react_jsx_runtime.JSX.Element;
403
403
  };
404
404
 
package/lib/index.js CHANGED
@@ -199,7 +199,7 @@ var defaultButtonVariants = cva2({
199
199
  size: {
200
200
  cta: [style_module_default.cta, "lp-sys-typo-paragraph2-normal-medium"],
201
201
  l: [style_module_default.l, "lp-sys-typo-paragraph3-normal-medium"],
202
- m: [style_module_default.m, "lp-sys-typo-paragraph4-normal-medium"],
202
+ m: [style_module_default.m, "lp-sys-typo-caption1-normal-regular"],
203
203
  s: [style_module_default.s, "lp-sys-typo-caption2-normal-regular"]
204
204
  },
205
205
  width: {
@@ -286,21 +286,18 @@ var DefaultButton = forwardRef(
286
286
  if (asChild) {
287
287
  const parent = Children.only(children);
288
288
  const newChildren = parent.props.children;
289
- const ParentClone = cloneElement(
290
- parent,
291
- {
292
- ...rest,
293
- className: clsx(
294
- defaultButtonVariants({ level, size, width }),
295
- style_module_default["align-center"],
296
- isLoadingWithDisabled && style_module_default["loading-with-disabled"],
297
- isLoading && style_module_default["loading"],
298
- className
299
- ),
300
- ref
301
- },
302
- renderContent(newChildren)
303
- );
289
+ const ParentClone = cloneElement(parent, {
290
+ ...rest,
291
+ className: clsx(
292
+ defaultButtonVariants({ level, size, width }),
293
+ style_module_default["align-center"],
294
+ isLoadingWithDisabled && style_module_default["loading-with-disabled"],
295
+ isLoading && style_module_default["loading"],
296
+ className
297
+ ),
298
+ ref,
299
+ children: renderContent(newChildren)
300
+ });
304
301
  return ParentClone;
305
302
  }
306
303
  return /* @__PURE__ */ jsx2(
@@ -906,7 +903,7 @@ var Toaster = /* @__PURE__ */ __name(() => {
906
903
  }, "Toaster");
907
904
  var SingleToast = /* @__PURE__ */ __name((props) => {
908
905
  const setToast = useSetAtom2(toastAtom);
909
- const timerRef = useRef();
906
+ const timerRef = useRef(void 0);
910
907
  const { message, icon, button, timer, toastId, isLoading } = props;
911
908
  const [isOpen, setIsOpen] = useState(true);
912
909
  const lottieRef = useRef(null);
@@ -2020,66 +2017,64 @@ var SelectContent = forwardRef14(
2020
2017
  ) });
2021
2018
  }
2022
2019
  );
2023
- var SelectRoot = forwardRef14(
2024
- (props, ref) => {
2025
- const {
2026
- id,
2027
- placeholder,
2028
- label,
2029
- chip,
2030
- listLabel,
2031
- popSide = "top",
2032
- sideOffset = 6,
2033
- children,
2034
- open = false,
2035
- onOpenChange,
2036
- isResponsive = false,
2037
- openDirection = "slide-right",
2038
- badge,
2039
- container,
2040
- ...rest
2041
- } = props;
2042
- const contentProps = { id, isResponsive, popSide, sideOffset, listLabel, children, container };
2043
- const [isOpen, setIsOpen] = useState3(false);
2044
- useEffect2(() => {
2045
- setIsOpen(open);
2046
- }, [open]);
2047
- return /* @__PURE__ */ jsxs8("div", { children: [
2048
- /* @__PURE__ */ jsxs8("div", { className: style_module_default12["label-container"], children: [
2049
- /* @__PURE__ */ jsx17(
2050
- Label,
2051
- {
2052
- className: style_module_default12["select-label"],
2053
- level: "secondary",
2054
- size: "m",
2055
- offset: "low",
2056
- htmlFor: id,
2057
- children: label
2058
- }
2059
- ),
2060
- badge && /* @__PURE__ */ jsx17(Badge, { children: badge })
2061
- ] }),
2062
- /* @__PURE__ */ jsxs8(
2063
- SelectPrimitive.Root,
2020
+ var SelectRoot = forwardRef14((props, ref) => {
2021
+ const {
2022
+ id,
2023
+ placeholder,
2024
+ label,
2025
+ chip,
2026
+ listLabel,
2027
+ popSide = "top",
2028
+ sideOffset = 6,
2029
+ children,
2030
+ open = false,
2031
+ onOpenChange,
2032
+ isResponsive = false,
2033
+ openDirection = "slide-right",
2034
+ badge,
2035
+ container,
2036
+ ...rest
2037
+ } = props;
2038
+ const contentProps = { id, isResponsive, popSide, sideOffset, listLabel, children, container };
2039
+ const [isOpen, setIsOpen] = useState3(false);
2040
+ useEffect2(() => {
2041
+ setIsOpen(open);
2042
+ }, [open]);
2043
+ return /* @__PURE__ */ jsxs8("div", { children: [
2044
+ /* @__PURE__ */ jsxs8("div", { className: style_module_default12["label-container"], children: [
2045
+ /* @__PURE__ */ jsx17(
2046
+ Label,
2064
2047
  {
2065
- ...rest,
2066
- open: isOpen,
2067
- onOpenChange: (open2) => {
2068
- onOpenChange?.(open2);
2069
- setIsOpen(open2);
2070
- },
2071
- children: [
2072
- /* @__PURE__ */ jsxs8(SelectPrimitive.Trigger, { className: style_module_default12.trigger, ref, id, children: [
2073
- /* @__PURE__ */ jsx17(SelectPrimitive.Value, { className: style_module_default12.placeholder, placeholder }),
2074
- /* @__PURE__ */ jsx17(SelectPrimitive.Icon, { className: style_module_default12.openIcon, children: /* @__PURE__ */ jsx17(IconDropDown, { fill: true, thick: true, size: "xs" }) })
2075
- ] }),
2076
- /* @__PURE__ */ jsx17(SelectContent, { ...contentProps })
2077
- ]
2048
+ className: style_module_default12["select-label"],
2049
+ level: "secondary",
2050
+ size: "m",
2051
+ offset: "low",
2052
+ htmlFor: id,
2053
+ children: label
2078
2054
  }
2079
- )
2080
- ] });
2081
- }
2082
- );
2055
+ ),
2056
+ badge && /* @__PURE__ */ jsx17(Badge, { children: badge })
2057
+ ] }),
2058
+ /* @__PURE__ */ jsxs8(
2059
+ SelectPrimitive.Root,
2060
+ {
2061
+ ...rest,
2062
+ open: isOpen,
2063
+ onOpenChange: (open2) => {
2064
+ onOpenChange?.(open2);
2065
+ setIsOpen(open2);
2066
+ },
2067
+ children: [
2068
+ /* @__PURE__ */ jsxs8(SelectPrimitive.Trigger, { className: style_module_default12.trigger, ref, id, children: [
2069
+ /* @__PURE__ */ jsx17(SelectPrimitive.Value, { className: style_module_default12.placeholder, placeholder }),
2070
+ /* @__PURE__ */ jsx17(SelectPrimitive.Icon, { className: style_module_default12.openIcon, children: /* @__PURE__ */ jsx17(IconDropDown, { fill: true, thick: true, size: "xs" }) })
2071
+ ] }),
2072
+ /* @__PURE__ */ jsx17(SelectContent, { ...contentProps })
2073
+ ]
2074
+ }
2075
+ )
2076
+ ] });
2077
+ });
2083
2078
  var SelectItem = /* @__PURE__ */ __name(({ value, text, disabled, icon, onClick }) => /* @__PURE__ */ jsxs8(
2084
2079
  SelectPrimitive.Item,
2085
2080
  {
@@ -2332,15 +2327,12 @@ var TextButton = forwardRef15(
2332
2327
  ] }), "renderContent");
2333
2328
  if (asChild) {
2334
2329
  const parent = Children2.only(children);
2335
- return cloneElement2(
2336
- parent,
2337
- {
2338
- ...rest,
2339
- className: clsx16(textButtonVariants({ level, underline, size }), className),
2340
- ref
2341
- },
2342
- renderContent(parent.props.children)
2343
- );
2330
+ return cloneElement2(parent, {
2331
+ ...rest,
2332
+ className: clsx16(textButtonVariants({ level, underline, size }), className),
2333
+ ref,
2334
+ children: renderContent(parent.props.children)
2335
+ });
2344
2336
  }
2345
2337
  return /* @__PURE__ */ jsx23(
2346
2338
  "button",
@@ -2432,7 +2424,7 @@ var Snackbar = /* @__PURE__ */ __name(() => {
2432
2424
  }, "Snackbar");
2433
2425
  var SingleSnackbar = /* @__PURE__ */ __name((props) => {
2434
2426
  const setSnackbar = useSetAtom4(snackbarAtom);
2435
- const timerRef = useRef3();
2427
+ const timerRef = useRef3(void 0);
2436
2428
  const { snackbarId, description, title, timer } = props;
2437
2429
  const [isOpen, setIsOpen] = useState5(true);
2438
2430
  const onCloseSnackbar = useCallback(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liner-fe/prism",
3
- "version": "2.12.13",
3
+ "version": "3.0.7",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "dependencies": {
@@ -13,13 +13,13 @@
13
13
  "date-fns": "^4.1.0",
14
14
  "lottie-web": "^5.9.4",
15
15
  "radix-ui": "^1.4.3",
16
- "react": "18.2.0",
17
- "react-dom": "18.2.0",
16
+ "react": "^19.1.0",
17
+ "react-dom": "^19.1.0",
18
18
  "jotai": "^2.11.0",
19
- "@liner-fe/design-token": "^2.5.50",
19
+ "@liner-fe/design-token": "^3.0.0",
20
20
  "@liner-fe/design-token-primitive": "^0.2.46",
21
- "@liner-fe/icon": "^0.2.77",
22
- "@liner-fe/illust": "^0.2.12"
21
+ "@liner-fe/icon": "^1.0.1",
22
+ "@liner-fe/illust": "^1.0.0"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@chromatic-com/storybook": "^1.5.0",
@@ -36,8 +36,8 @@
36
36
  "@storybook/react-vite": "^8.6.0",
37
37
  "@storybook/test": "^8.6.15",
38
38
  "@types/node": "^20.3.1",
39
- "@types/react": "18.2.23",
40
- "@types/react-dom": "18.2.23",
39
+ "@types/react": "^19.1.0",
40
+ "@types/react-dom": "^19.1.0",
41
41
  "autoprefixer": "^10.4.14",
42
42
  "chromatic": "^11.5.3",
43
43
  "esbuild-node-externals": "1.18.0",