@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 +2 -2
- package/lib/index.js +77 -85
- package/package.json +8 -8
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<
|
|
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-
|
|
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
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
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
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
/* @__PURE__ */
|
|
2049
|
-
|
|
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
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
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
|
-
|
|
2337
|
-
{
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
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": "
|
|
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": "
|
|
17
|
-
"react-dom": "
|
|
16
|
+
"react": "^19.1.0",
|
|
17
|
+
"react-dom": "^19.1.0",
|
|
18
18
|
"jotai": "^2.11.0",
|
|
19
|
-
"@liner-fe/design-token": "^
|
|
19
|
+
"@liner-fe/design-token": "^3.0.0",
|
|
20
20
|
"@liner-fe/design-token-primitive": "^0.2.46",
|
|
21
|
-
"@liner-fe/icon": "^0.
|
|
22
|
-
"@liner-fe/illust": "^0.
|
|
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": "
|
|
40
|
-
"@types/react-dom": "
|
|
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",
|