@liner-fe/prism 2.1.9 → 2.1.11
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/IconButton/index.d.ts +1 -1
- package/lib/components/TextButton/index.d.ts +1 -1
- package/lib/components/_ButtonLoading/index.d.ts +4 -2
- package/lib/index.cjs +73 -34
- package/lib/index.cjs.map +2 -2
- package/lib/index.css +100 -73
- package/lib/index.css.map +2 -2
- package/lib/index.d.ts +1 -0
- package/lib/index.mjs +73 -34
- package/lib/index.mjs.map +2 -2
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
2
2
|
import { ButtonHTMLAttributes } from 'react';
|
|
3
3
|
import { IconProps } from '../Icon';
|
|
4
4
|
declare const iconButtonVariants: (props?: ({
|
|
5
|
-
level?: "primary" | "secondary" | "tertiary" | "quaternary" | "negative" | "static" | "inverse
|
|
5
|
+
level?: "primary" | "secondary" | "tertiary" | "quaternary" | "negative" | "static" | "inverse" | "inverse-static" | null | undefined;
|
|
6
6
|
size?: "m" | "s" | "xs" | "l" | null | undefined;
|
|
7
7
|
fill?: boolean | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ButtonIconProps, ButtonSizeType, CommonButtonProps } from '../../index';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const textButtonVariants: (props?: ({
|
|
4
|
-
level?: "primary" | "secondary" | "tertiary" | "inverse
|
|
4
|
+
level?: "primary" | "secondary" | "tertiary" | "inverse" | "inverse-static" | null | undefined;
|
|
5
5
|
size?: "m" | "s" | null | undefined;
|
|
6
6
|
thick?: boolean | null | undefined;
|
|
7
7
|
underline?: boolean | null | undefined;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
type ButtonLoadingSizeType = 'm' | 's' | 'xs';
|
|
2
|
+
type ButtonLoadingLevelType = 'primary' | 'secondary' | 'tertiary' | 'quaternary' | 'negative' | 'static' | 'inverse' | 'inverse-static';
|
|
2
3
|
interface ButtonLoadingProps {
|
|
3
|
-
size
|
|
4
|
+
size?: ButtonLoadingSizeType;
|
|
5
|
+
level?: ButtonLoadingLevelType;
|
|
4
6
|
}
|
|
5
|
-
export declare const ButtonLoading: ({ size }: ButtonLoadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const ButtonLoading: ({ size, level }: ButtonLoadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
8
|
export {};
|
package/lib/index.cjs
CHANGED
|
@@ -48,6 +48,7 @@ __export(index_exports, {
|
|
|
48
48
|
Radio: () => Radio,
|
|
49
49
|
Select: () => Select,
|
|
50
50
|
Slider: () => Slider,
|
|
51
|
+
TextButton: () => TextButton,
|
|
51
52
|
Textfield: () => Textfield,
|
|
52
53
|
Title: () => Title2,
|
|
53
54
|
Toaster: () => Toaster,
|
|
@@ -7653,12 +7654,20 @@ var Icon = /* @__PURE__ */ __name((props) => {
|
|
|
7653
7654
|
|
|
7654
7655
|
// src/components/_ButtonLoading/style.module.scss
|
|
7655
7656
|
var style_module_default3 = {
|
|
7656
|
-
"loading": "
|
|
7657
|
-
"loading-dot": "_loading-
|
|
7658
|
-
"loadingFade": "
|
|
7659
|
-
"m": "
|
|
7660
|
-
"s": "
|
|
7661
|
-
"xs": "
|
|
7657
|
+
"loading": "_loading_16nlw_1",
|
|
7658
|
+
"loading-dot": "_loading-dot_16nlw_5",
|
|
7659
|
+
"loadingFade": "_loadingFade_16nlw_1",
|
|
7660
|
+
"m": "_m_16nlw_13",
|
|
7661
|
+
"s": "_s_16nlw_19",
|
|
7662
|
+
"xs": "_xs_16nlw_25",
|
|
7663
|
+
"primary": "_primary_16nlw_31",
|
|
7664
|
+
"secondary": "_secondary_16nlw_34",
|
|
7665
|
+
"tertiary": "_tertiary_16nlw_37",
|
|
7666
|
+
"quaternary": "_quaternary_16nlw_40",
|
|
7667
|
+
"negative": "_negative_16nlw_43",
|
|
7668
|
+
"static": "_static_16nlw_46",
|
|
7669
|
+
"inverse": "_inverse_16nlw_49",
|
|
7670
|
+
"inverse-static": "_inverse-static_16nlw_52"
|
|
7662
7671
|
};
|
|
7663
7672
|
|
|
7664
7673
|
// src/components/_ButtonLoading/index.tsx
|
|
@@ -7670,14 +7679,24 @@ var loadingVariants = (0, import_class_variance_authority2.cva)([style_module_de
|
|
|
7670
7679
|
m: style_module_default3["m"],
|
|
7671
7680
|
s: style_module_default3["s"],
|
|
7672
7681
|
xs: style_module_default3["xs"]
|
|
7682
|
+
},
|
|
7683
|
+
level: {
|
|
7684
|
+
primary: style_module_default3["primary"],
|
|
7685
|
+
secondary: style_module_default3["secondary"],
|
|
7686
|
+
tertiary: style_module_default3["tertiary"],
|
|
7687
|
+
quaternary: style_module_default3["quaternary"],
|
|
7688
|
+
negative: style_module_default3["negative"],
|
|
7689
|
+
static: style_module_default3["static"],
|
|
7690
|
+
inverse: style_module_default3["inverse"],
|
|
7691
|
+
"inverse-static": style_module_default3["inverse-static"]
|
|
7673
7692
|
}
|
|
7674
7693
|
}
|
|
7675
7694
|
});
|
|
7676
|
-
var ButtonLoading = /* @__PURE__ */ __name(({ size }) => {
|
|
7695
|
+
var ButtonLoading = /* @__PURE__ */ __name(({ size = "m", level = "primary" }) => {
|
|
7677
7696
|
return /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)("div", { className: style_module_default3.loading, children: [
|
|
7678
|
-
/* @__PURE__ */ (0, import_jsx_runtime159.jsx)("div", { className: loadingVariants({ size }) }),
|
|
7679
|
-
/* @__PURE__ */ (0, import_jsx_runtime159.jsx)("div", { className: loadingVariants({ size }) }),
|
|
7680
|
-
/* @__PURE__ */ (0, import_jsx_runtime159.jsx)("div", { className: loadingVariants({ size }) })
|
|
7697
|
+
/* @__PURE__ */ (0, import_jsx_runtime159.jsx)("div", { className: loadingVariants({ size, level }) }),
|
|
7698
|
+
/* @__PURE__ */ (0, import_jsx_runtime159.jsx)("div", { className: loadingVariants({ size, level }) }),
|
|
7699
|
+
/* @__PURE__ */ (0, import_jsx_runtime159.jsx)("div", { className: loadingVariants({ size, level }) })
|
|
7681
7700
|
] });
|
|
7682
7701
|
}, "ButtonLoading");
|
|
7683
7702
|
|
|
@@ -7806,9 +7825,9 @@ var DefaultButton = (0, import_react.forwardRef)(
|
|
|
7806
7825
|
const renderContent = /* @__PURE__ */ __name((children2) => /* @__PURE__ */ (0, import_jsx_runtime160.jsxs)("span", { className: (0, import_clsx2.default)(defaultButtonChildrenVariants({ size })), children: [
|
|
7807
7826
|
!!leftIcon && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(Icon, { ...iconProps, ...leftIcon }),
|
|
7808
7827
|
isLoading ? !!leftIcon || !!rightIcon ? /* @__PURE__ */ (0, import_jsx_runtime160.jsxs)(import_jsx_runtime160.Fragment, { children: [
|
|
7809
|
-
/* @__PURE__ */ (0, import_jsx_runtime160.jsx)(ButtonLoading, { size: buttonLoadingSizeMap[size] }),
|
|
7828
|
+
/* @__PURE__ */ (0, import_jsx_runtime160.jsx)(ButtonLoading, { size: buttonLoadingSizeMap[size], level }),
|
|
7810
7829
|
/* @__PURE__ */ (0, import_jsx_runtime160.jsx)("p", { className: style_module_default.content, children: children2 })
|
|
7811
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(ButtonLoading, { size: buttonLoadingSizeMap[size] }) : /* @__PURE__ */ (0, import_jsx_runtime160.jsx)("p", { className: style_module_default.content, children: children2 }),
|
|
7830
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(ButtonLoading, { size: buttonLoadingSizeMap[size], level }) : /* @__PURE__ */ (0, import_jsx_runtime160.jsx)("p", { className: style_module_default.content, children: children2 }),
|
|
7812
7831
|
!!rightIcon && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(Icon, { ...iconProps, ...rightIcon })
|
|
7813
7832
|
] }), "renderContent");
|
|
7814
7833
|
if (asChild) {
|
|
@@ -8959,20 +8978,20 @@ var import_clsx11 = __toESM(require("clsx"));
|
|
|
8959
8978
|
|
|
8960
8979
|
// src/components/IconButton/style.module.scss
|
|
8961
8980
|
var style_module_default9 = {
|
|
8962
|
-
"iconButton": "
|
|
8963
|
-
"primary": "
|
|
8964
|
-
"secondary": "
|
|
8965
|
-
"tertiary": "
|
|
8966
|
-
"quaternary": "
|
|
8967
|
-
"negative": "
|
|
8968
|
-
"static": "
|
|
8969
|
-
"inverse": "
|
|
8970
|
-
"inverse-static": "_inverse-
|
|
8971
|
-
"ghost": "
|
|
8972
|
-
"l": "
|
|
8973
|
-
"m": "
|
|
8974
|
-
"s": "
|
|
8975
|
-
"xs": "
|
|
8981
|
+
"iconButton": "_iconButton_6ezo4_1",
|
|
8982
|
+
"primary": "_primary_6ezo4_14",
|
|
8983
|
+
"secondary": "_secondary_6ezo4_27",
|
|
8984
|
+
"tertiary": "_tertiary_6ezo4_40",
|
|
8985
|
+
"quaternary": "_quaternary_6ezo4_53",
|
|
8986
|
+
"negative": "_negative_6ezo4_67",
|
|
8987
|
+
"static": "_static_6ezo4_80",
|
|
8988
|
+
"inverse": "_inverse_6ezo4_93",
|
|
8989
|
+
"inverse-static": "_inverse-static_6ezo4_106",
|
|
8990
|
+
"ghost": "_ghost_6ezo4_119",
|
|
8991
|
+
"l": "_l_6ezo4_183",
|
|
8992
|
+
"m": "_m_6ezo4_189",
|
|
8993
|
+
"s": "_s_6ezo4_27",
|
|
8994
|
+
"xs": "_xs_6ezo4_201"
|
|
8976
8995
|
};
|
|
8977
8996
|
|
|
8978
8997
|
// src/components/IconButton/index.tsx
|
|
@@ -9038,16 +9057,35 @@ var iconButtonVariants = (0, import_class_variance_authority8.cva)([style_module
|
|
|
9038
9057
|
}
|
|
9039
9058
|
});
|
|
9040
9059
|
var IconButton = (0, import_react12.forwardRef)(
|
|
9041
|
-
({
|
|
9060
|
+
({
|
|
9061
|
+
asChild,
|
|
9062
|
+
level = "primary",
|
|
9063
|
+
size = "m",
|
|
9064
|
+
fill = true,
|
|
9065
|
+
className,
|
|
9066
|
+
icon,
|
|
9067
|
+
isLoading = false,
|
|
9068
|
+
disabled = false,
|
|
9069
|
+
...rest
|
|
9070
|
+
}, ref) => {
|
|
9042
9071
|
const Comp = asChild ? import_react_slot.Slot : "button";
|
|
9043
|
-
return /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
|
|
9044
|
-
|
|
9072
|
+
return /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
|
|
9073
|
+
Comp,
|
|
9045
9074
|
{
|
|
9046
|
-
|
|
9047
|
-
|
|
9048
|
-
|
|
9075
|
+
...rest,
|
|
9076
|
+
className: (0, import_clsx11.default)(iconButtonVariants({ level, size, fill }), className),
|
|
9077
|
+
ref,
|
|
9078
|
+
disabled: disabled && !isLoading,
|
|
9079
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(ButtonLoading, { size: iconButtonLoadingSizeMap[size], level }) : /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
|
|
9080
|
+
Icon,
|
|
9081
|
+
{
|
|
9082
|
+
size: iconButtonSizeIconSizeMap[size],
|
|
9083
|
+
type: iconButtonLevelIconTypeMap[fill ? "fill" : "ghost"][level],
|
|
9084
|
+
...icon
|
|
9085
|
+
}
|
|
9086
|
+
)
|
|
9049
9087
|
}
|
|
9050
|
-
)
|
|
9088
|
+
);
|
|
9051
9089
|
}
|
|
9052
9090
|
);
|
|
9053
9091
|
|
|
@@ -9330,7 +9368,8 @@ var Textfield = (0, import_react16.forwardRef)((props, ref) => {
|
|
|
9330
9368
|
{
|
|
9331
9369
|
tabIndex: -1,
|
|
9332
9370
|
className: style_module_default13["action-button"],
|
|
9333
|
-
level: "
|
|
9371
|
+
level: "secondary",
|
|
9372
|
+
fill: false,
|
|
9334
9373
|
icon: {
|
|
9335
9374
|
name: "close-fill",
|
|
9336
9375
|
size: "s",
|