@liner-fe/prism 2.1.35 → 2.1.37
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/Loading/index.d.ts +8 -0
- package/lib/constants/figma/index.d.ts +3 -3
- package/lib/index.cjs +55 -29
- package/lib/index.cjs.map +3 -3
- package/lib/index.css +22 -31
- package/lib/index.css.map +3 -3
- package/lib/index.d.ts +1 -0
- package/lib/index.mjs +55 -29
- package/lib/index.mjs.map +3 -3
- package/package.json +1 -1
- package/lib/components/_ButtonLoading/index.d.ts +0 -8
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type LoadingSizeType = 'm' | 's' | 'xs';
|
|
2
|
+
type LoadingLevelType = 'brand-label-primary' | 'neutral-label-primary' | 'neutral-label-static-primary' | 'inverse-label-primary' | 'inverse-label-static-primary';
|
|
3
|
+
interface LoadingProps {
|
|
4
|
+
size?: LoadingSizeType;
|
|
5
|
+
level?: LoadingLevelType;
|
|
6
|
+
}
|
|
7
|
+
export declare const Loading: ({ size, level }: LoadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Figma } from './types';
|
|
2
2
|
export declare const FIGMA: {
|
|
3
|
-
Icon: Figma;
|
|
4
3
|
Button: Figma;
|
|
5
|
-
|
|
4
|
+
Icon: Figma;
|
|
6
5
|
IconButton: Figma;
|
|
6
|
+
Label: Figma;
|
|
7
|
+
CheckBox: Figma;
|
|
7
8
|
Typography: Figma;
|
|
8
9
|
Textfield: Figma;
|
|
9
10
|
Toast: Figma;
|
|
10
11
|
PopOver: Figma;
|
|
11
12
|
Tooltip: Figma;
|
|
12
|
-
Label: Figma;
|
|
13
13
|
Radio: Figma;
|
|
14
14
|
Badge: Figma;
|
|
15
15
|
Illust: Figma;
|
package/lib/index.cjs
CHANGED
|
@@ -41,6 +41,7 @@ __export(index_exports, {
|
|
|
41
41
|
IconButton: () => IconButton,
|
|
42
42
|
Label: () => Label,
|
|
43
43
|
List: () => List,
|
|
44
|
+
Loading: () => Loading,
|
|
44
45
|
Media: () => Media,
|
|
45
46
|
MediaContextProvider: () => MediaContextProvider,
|
|
46
47
|
Paragraph: () => Paragraph,
|
|
@@ -7497,25 +7498,22 @@ var Icon = /* @__PURE__ */ __name((props) => {
|
|
|
7497
7498
|
);
|
|
7498
7499
|
}, "Icon");
|
|
7499
7500
|
|
|
7500
|
-
// src/components/
|
|
7501
|
+
// src/components/Loading/style.module.scss
|
|
7501
7502
|
var style_module_default3 = {
|
|
7502
|
-
"loading": "
|
|
7503
|
-
"loading-dot": "_loading-
|
|
7504
|
-
"loadingFade": "
|
|
7505
|
-
"m": "
|
|
7506
|
-
"s": "
|
|
7507
|
-
"xs": "
|
|
7508
|
-
"primary": "
|
|
7509
|
-
"
|
|
7510
|
-
"
|
|
7511
|
-
"
|
|
7512
|
-
"
|
|
7513
|
-
"static": "_static_16nlw_46",
|
|
7514
|
-
"inverse": "_inverse_16nlw_49",
|
|
7515
|
-
"inverse-static": "_inverse-static_16nlw_52"
|
|
7503
|
+
"loading": "_loading_d1es9_1",
|
|
7504
|
+
"loading-dot": "_loading-dot_d1es9_5",
|
|
7505
|
+
"loadingFade": "_loadingFade_d1es9_1",
|
|
7506
|
+
"m": "_m_d1es9_13",
|
|
7507
|
+
"s": "_s_d1es9_19",
|
|
7508
|
+
"xs": "_xs_d1es9_25",
|
|
7509
|
+
"brand-label-primary": "_brand-label-primary_d1es9_31",
|
|
7510
|
+
"neutral-label-primary": "_neutral-label-primary_d1es9_34",
|
|
7511
|
+
"neutral-label-static-primary": "_neutral-label-static-primary_d1es9_37",
|
|
7512
|
+
"inverse-label-primary": "_inverse-label-primary_d1es9_40",
|
|
7513
|
+
"inverse-label-static-primary": "_inverse-label-static-primary_d1es9_43"
|
|
7516
7514
|
};
|
|
7517
7515
|
|
|
7518
|
-
// src/components/
|
|
7516
|
+
// src/components/Loading/index.tsx
|
|
7519
7517
|
var import_cva2 = require("cva");
|
|
7520
7518
|
var import_jsx_runtime156 = require("react/jsx-runtime");
|
|
7521
7519
|
var loadingVariants = (0, import_cva2.cva)({
|
|
@@ -7527,24 +7525,21 @@ var loadingVariants = (0, import_cva2.cva)({
|
|
|
7527
7525
|
xs: style_module_default3["xs"]
|
|
7528
7526
|
},
|
|
7529
7527
|
level: {
|
|
7530
|
-
primary: style_module_default3["primary"],
|
|
7531
|
-
|
|
7532
|
-
|
|
7533
|
-
|
|
7534
|
-
|
|
7535
|
-
static: style_module_default3["static"],
|
|
7536
|
-
inverse: style_module_default3["inverse"],
|
|
7537
|
-
"inverse-static": style_module_default3["inverse-static"]
|
|
7528
|
+
"brand-label-primary": style_module_default3["brand-label-primary"],
|
|
7529
|
+
"neutral-label-primary": style_module_default3["neutral-label-primary"],
|
|
7530
|
+
"neutral-label-static-primary": style_module_default3["neutral-label-static-primary"],
|
|
7531
|
+
"inverse-label-primary": style_module_default3["inverse-label-primary"],
|
|
7532
|
+
"inverse-label-static-primary": style_module_default3["inverse-label-static-primary"]
|
|
7538
7533
|
}
|
|
7539
7534
|
}
|
|
7540
7535
|
});
|
|
7541
|
-
var
|
|
7536
|
+
var Loading = /* @__PURE__ */ __name(({ size = "m", level = "inverse-label-static-primary" }) => {
|
|
7542
7537
|
return /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)("div", { className: style_module_default3.loading, children: [
|
|
7543
7538
|
/* @__PURE__ */ (0, import_jsx_runtime156.jsx)("div", { className: loadingVariants({ size, level }) }),
|
|
7544
7539
|
/* @__PURE__ */ (0, import_jsx_runtime156.jsx)("div", { className: loadingVariants({ size, level }) }),
|
|
7545
7540
|
/* @__PURE__ */ (0, import_jsx_runtime156.jsx)("div", { className: loadingVariants({ size, level }) })
|
|
7546
7541
|
] });
|
|
7547
|
-
}, "
|
|
7542
|
+
}, "Loading");
|
|
7548
7543
|
|
|
7549
7544
|
// src/components/Button/index.tsx
|
|
7550
7545
|
var import_jsx_runtime157 = require("react/jsx-runtime");
|
|
@@ -7566,6 +7561,16 @@ var buttonLoadingSizeMap = {
|
|
|
7566
7561
|
m: "s",
|
|
7567
7562
|
s: "xs"
|
|
7568
7563
|
};
|
|
7564
|
+
var buttonLoadingLevelMap = {
|
|
7565
|
+
primary: "inverse-label-static-primary",
|
|
7566
|
+
secondary: "inverse-label-primary",
|
|
7567
|
+
tertiary: "neutral-label-primary",
|
|
7568
|
+
quaternary: "neutral-label-primary",
|
|
7569
|
+
negative: "inverse-label-static-primary",
|
|
7570
|
+
static: "neutral-label-static-primary",
|
|
7571
|
+
inverse: "inverse-label-primary",
|
|
7572
|
+
"inverse-static": "neutral-label-static-primary"
|
|
7573
|
+
};
|
|
7569
7574
|
var buttonFillLevelIconTypeMap = {
|
|
7570
7575
|
true: {
|
|
7571
7576
|
primary: "inverse-label-static-primary",
|
|
@@ -7673,9 +7678,9 @@ var DefaultButton = (0, import_react.forwardRef)(
|
|
|
7673
7678
|
const renderContent = /* @__PURE__ */ __name((children2) => /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)("span", { className: (0, import_clsx2.default)(defaultButtonChildrenVariants({ size })), children: [
|
|
7674
7679
|
!!leftIcon && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(Icon, { ...iconProps, ...leftIcon }),
|
|
7675
7680
|
isLoading ? !!leftIcon || !!rightIcon ? /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)(import_jsx_runtime157.Fragment, { children: [
|
|
7676
|
-
/* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
|
|
7681
|
+
/* @__PURE__ */ (0, import_jsx_runtime157.jsx)(Loading, { size: buttonLoadingSizeMap[size], level: buttonLoadingLevelMap[level] }),
|
|
7677
7682
|
/* @__PURE__ */ (0, import_jsx_runtime157.jsx)("p", { className: style_module_default.content, children: children2 })
|
|
7678
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
|
|
7683
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(Loading, { size: buttonLoadingSizeMap[size], level: buttonLoadingLevelMap[level] }) : /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("p", { className: style_module_default.content, children: children2 }),
|
|
7679
7684
|
!!rightIcon && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(Icon, { ...iconProps, ...rightIcon })
|
|
7680
7685
|
] }), "renderContent");
|
|
7681
7686
|
if (asChild) {
|
|
@@ -7698,12 +7703,17 @@ var DefaultButton = (0, import_react.forwardRef)(
|
|
|
7698
7703
|
...rest,
|
|
7699
7704
|
className: (0, import_clsx2.default)(defaultButtonVariants({ level, fill, align, size, width }), className),
|
|
7700
7705
|
ref,
|
|
7706
|
+
"aria-label": rest["aria-label"] || "button",
|
|
7707
|
+
role: "button",
|
|
7708
|
+
tabIndex: 0,
|
|
7701
7709
|
children: renderContent(children)
|
|
7702
7710
|
}
|
|
7703
7711
|
);
|
|
7704
7712
|
}
|
|
7705
7713
|
);
|
|
7714
|
+
DefaultButton.displayName = "DefaultButton";
|
|
7706
7715
|
var Button = (0, import_react.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(DefaultButton, { ...props, ref }));
|
|
7716
|
+
Button.displayName = "Button";
|
|
7707
7717
|
|
|
7708
7718
|
// src/hooks/useToast.ts
|
|
7709
7719
|
var import_recoil = require("recoil");
|
|
@@ -8670,6 +8680,7 @@ var TextButton = (0, import_react10.forwardRef)(
|
|
|
8670
8680
|
return /* @__PURE__ */ (0, import_jsx_runtime165.jsx)("button", { className: (0, import_clsx8.default)(textButtonVariants({ level, thick, underline, size }), className), ref, ...rest, children: renderContent(children) });
|
|
8671
8681
|
}
|
|
8672
8682
|
);
|
|
8683
|
+
TextButton.displayName = "TextButton";
|
|
8673
8684
|
|
|
8674
8685
|
// src/components/Popover/index.tsx
|
|
8675
8686
|
var import_jsx_runtime166 = require("react/jsx-runtime");
|
|
@@ -8857,6 +8868,16 @@ var iconButtonLoadingSizeMap = {
|
|
|
8857
8868
|
s: "xs",
|
|
8858
8869
|
xs: "xs"
|
|
8859
8870
|
};
|
|
8871
|
+
var iconButtonLoadingLevelMap = {
|
|
8872
|
+
primary: "inverse-label-static-primary",
|
|
8873
|
+
secondary: "inverse-label-primary",
|
|
8874
|
+
tertiary: "neutral-label-primary",
|
|
8875
|
+
quaternary: "neutral-label-primary",
|
|
8876
|
+
negative: "inverse-label-static-primary",
|
|
8877
|
+
static: "neutral-label-static-primary",
|
|
8878
|
+
inverse: "inverse-label-primary",
|
|
8879
|
+
"inverse-static": "neutral-label-static-primary"
|
|
8880
|
+
};
|
|
8860
8881
|
var iconButtonLevelIconTypeMap = {
|
|
8861
8882
|
fill: {
|
|
8862
8883
|
primary: "inverse-label-static-primary",
|
|
@@ -8925,7 +8946,10 @@ var IconButton = (0, import_react12.forwardRef)(
|
|
|
8925
8946
|
className: (0, import_clsx11.default)(iconButtonVariants({ level, size, fill }), className),
|
|
8926
8947
|
ref,
|
|
8927
8948
|
disabled: disabled && !isLoading,
|
|
8928
|
-
|
|
8949
|
+
"aria-label": icon.name,
|
|
8950
|
+
role: "button",
|
|
8951
|
+
tabIndex: 0,
|
|
8952
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(Loading, { size: iconButtonLoadingSizeMap[size], level: iconButtonLoadingLevelMap[level] }) : /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
|
|
8929
8953
|
Icon,
|
|
8930
8954
|
{
|
|
8931
8955
|
size: iconButtonSizeIconSizeMap[size],
|
|
@@ -8937,6 +8961,7 @@ var IconButton = (0, import_react12.forwardRef)(
|
|
|
8937
8961
|
);
|
|
8938
8962
|
}
|
|
8939
8963
|
);
|
|
8964
|
+
IconButton.displayName = "IconButton";
|
|
8940
8965
|
|
|
8941
8966
|
// src/components/CheckBox/index.tsx
|
|
8942
8967
|
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
|
|
@@ -9028,6 +9053,7 @@ var Label = (0, import_react13.forwardRef)(
|
|
|
9028
9053
|
);
|
|
9029
9054
|
}
|
|
9030
9055
|
);
|
|
9056
|
+
Label.displayName = "Label";
|
|
9031
9057
|
|
|
9032
9058
|
// src/components/CheckBox/index.tsx
|
|
9033
9059
|
var import_jsx_runtime170 = require("react/jsx-runtime");
|