@liner-fe/prism 2.1.9 → 2.1.10
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 +32 -13
- package/lib/index.cjs.map +2 -2
- package/lib/index.css +39 -15
- package/lib/index.css.map +2 -2
- package/lib/index.d.ts +1 -0
- package/lib/index.mjs +32 -13
- 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) {
|
|
@@ -9040,7 +9059,7 @@ var iconButtonVariants = (0, import_class_variance_authority8.cva)([style_module
|
|
|
9040
9059
|
var IconButton = (0, import_react12.forwardRef)(
|
|
9041
9060
|
({ asChild, level = "primary", size = "m", fill = true, className, icon, isLoading = false, ...rest }, ref) => {
|
|
9042
9061
|
const Comp = asChild ? import_react_slot.Slot : "button";
|
|
9043
|
-
return /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(Comp, { ...rest, className: (0, import_clsx11.default)(iconButtonVariants({ level, size, fill }), className), ref, children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(ButtonLoading, { size: iconButtonLoadingSizeMap[size] }) : /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
|
|
9062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(Comp, { ...rest, className: (0, import_clsx11.default)(iconButtonVariants({ level, size, fill }), className), ref, children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(ButtonLoading, { size: iconButtonLoadingSizeMap[size], level }) : /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
|
|
9044
9063
|
Icon,
|
|
9045
9064
|
{
|
|
9046
9065
|
size: iconButtonSizeIconSizeMap[size],
|