@liner-fe/prism 1.11.0 → 1.12.0
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/Button/index.d.ts +2 -5
- package/lib/components/Textfield/index.d.ts +24 -0
- package/lib/components/Typography/Paragraph.d.ts +7 -2
- package/lib/index.css +139 -0
- package/lib/index.css.map +3 -3
- package/lib/index.d.ts +1 -0
- package/lib/index.mjs +254 -0
- package/lib/index.mjs.map +4 -4
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -3742,6 +3742,26 @@ var ICHome = /* @__PURE__ */ __name((props) => {
|
|
|
3742
3742
|
import { jsx as jsx79, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
3743
3743
|
var ICVisibility = /* @__PURE__ */ __name((props) => {
|
|
3744
3744
|
const { thick = false, fill = false, size = 32, color = "#1E1E1F" } = props;
|
|
3745
|
+
if (fill && thick) {
|
|
3746
|
+
return /* @__PURE__ */ jsxs57("svg", { ...props, width: size, height: size, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", fill: "none", children: [
|
|
3747
|
+
/* @__PURE__ */ jsx79(
|
|
3748
|
+
"path",
|
|
3749
|
+
{
|
|
3750
|
+
d: "M30 24C30 27.3137 27.3137 30 24 30C20.6863 30 18 27.3137 18 24C18 20.6863 20.6863 18 24 18C27.3137 18 30 20.6863 30 24Z",
|
|
3751
|
+
fill: color
|
|
3752
|
+
}
|
|
3753
|
+
),
|
|
3754
|
+
/* @__PURE__ */ jsx79(
|
|
3755
|
+
"path",
|
|
3756
|
+
{
|
|
3757
|
+
"fill-rule": "evenodd",
|
|
3758
|
+
"clip-rule": "evenodd",
|
|
3759
|
+
d: "M24 38C36.1503 38 46 26 46 24C46 22 36.1503 10 24 10C11.8497 10 2 22 2 24C2 26 11.8497 38 24 38ZM33 24C33 28.9706 28.9706 33 24 33C19.0294 33 15 28.9706 15 24C15 19.0294 19.0294 15 24 15C28.9706 15 33 19.0294 33 24Z",
|
|
3760
|
+
fill: color
|
|
3761
|
+
}
|
|
3762
|
+
)
|
|
3763
|
+
] });
|
|
3764
|
+
}
|
|
3745
3765
|
if (thick) {
|
|
3746
3766
|
return /* @__PURE__ */ jsxs57("svg", { ...props, width: size, height: size, viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
3747
3767
|
/* @__PURE__ */ jsx79(
|
|
@@ -3764,6 +3784,26 @@ var ICVisibility = /* @__PURE__ */ __name((props) => {
|
|
|
3764
3784
|
)
|
|
3765
3785
|
] });
|
|
3766
3786
|
}
|
|
3787
|
+
if (fill) {
|
|
3788
|
+
return /* @__PURE__ */ jsxs57("svg", { ...props, width: size, height: size, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", fill: "none", children: [
|
|
3789
|
+
/* @__PURE__ */ jsx79(
|
|
3790
|
+
"path",
|
|
3791
|
+
{
|
|
3792
|
+
d: "M29 24C29 26.7614 26.7614 29 24 29C21.2386 29 19 26.7614 19 24C19 21.2386 21.2386 19 24 19C26.7614 19 29 21.2386 29 24Z",
|
|
3793
|
+
fill: color
|
|
3794
|
+
}
|
|
3795
|
+
),
|
|
3796
|
+
/* @__PURE__ */ jsx79(
|
|
3797
|
+
"path",
|
|
3798
|
+
{
|
|
3799
|
+
"fill-rule": "evenodd",
|
|
3800
|
+
"clip-rule": "evenodd",
|
|
3801
|
+
d: "M24 38C36.1503 38 46 26 46 24C46 22 36.1503 10 24 10C11.8497 10 2 22 2 24C2 26 11.8497 38 24 38ZM33 24C33 28.9706 28.9706 33 24 33C19.0294 33 15 28.9706 15 24C15 19.0294 19.0294 15 24 15C28.9706 15 33 19.0294 33 24Z",
|
|
3802
|
+
fill: color
|
|
3803
|
+
}
|
|
3804
|
+
)
|
|
3805
|
+
] });
|
|
3806
|
+
}
|
|
3767
3807
|
return /* @__PURE__ */ jsxs57("svg", { ...props, width: size, height: size, viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
3768
3808
|
/* @__PURE__ */ jsx79(
|
|
3769
3809
|
"path",
|
|
@@ -3790,6 +3830,60 @@ var ICVisibility = /* @__PURE__ */ __name((props) => {
|
|
|
3790
3830
|
import { jsx as jsx80, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
3791
3831
|
var ICVisibilityOff = /* @__PURE__ */ __name((props) => {
|
|
3792
3832
|
const { thick = false, fill = false, size = 32, color = "#1E1E1F" } = props;
|
|
3833
|
+
if (fill && thick) {
|
|
3834
|
+
return /* @__PURE__ */ jsxs58("svg", { ...props, width: size, height: size, viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
3835
|
+
/* @__PURE__ */ jsx80("path", { d: "M11.2725 8.44336L8.44409 11.2718L36.7284 39.5561L39.5568 36.7276L11.2725 8.44336Z", fill: color }),
|
|
3836
|
+
/* @__PURE__ */ jsx80(
|
|
3837
|
+
"path",
|
|
3838
|
+
{
|
|
3839
|
+
d: "M38.3491 32.6915C43.0339 29.2067 46 25.0978 46 24.0003C46 22.0003 36.1503 10.0003 24 10.0003C21.5361 10.0003 19.1667 10.4938 16.9549 11.2973L21.1264 15.4688C22.0288 15.165 22.9952 15.0003 24 15.0003C28.9706 15.0003 33 19.0297 33 24.0003C33 25.0051 32.8353 25.9715 32.5315 26.8739L38.3491 32.6915Z",
|
|
3840
|
+
fill: color
|
|
3841
|
+
}
|
|
3842
|
+
),
|
|
3843
|
+
/* @__PURE__ */ jsx80("path", { d: "M24.7076 19.05C26.9028 19.361 28.6393 21.0975 28.9503 23.2927L24.7076 19.05Z", fill: color }),
|
|
3844
|
+
/* @__PURE__ */ jsx80(
|
|
3845
|
+
"path",
|
|
3846
|
+
{
|
|
3847
|
+
d: "M9.65214 15.3082L15.469 21.1251C15.1649 22.028 15 22.9949 15 24.0003C15 28.9709 19.0294 33.0003 24 33.0003C25.0054 33.0003 25.9723 32.8354 26.8752 32.5313L31.0467 36.7027C28.8344 37.5066 26.4645 38.0003 24 38.0003C11.8497 38.0003 2 26.0003 2 24.0003C2 22.9027 4.96667 18.7931 9.65214 15.3082Z",
|
|
3848
|
+
fill: color
|
|
3849
|
+
}
|
|
3850
|
+
),
|
|
3851
|
+
/* @__PURE__ */ jsx80("path", { d: "M23.2949 28.951L19.0493 24.7054C19.3594 26.9026 21.0977 28.6409 23.2949 28.951Z", fill: color })
|
|
3852
|
+
] });
|
|
3853
|
+
}
|
|
3854
|
+
if (fill) {
|
|
3855
|
+
return /* @__PURE__ */ jsxs58("svg", { ...props, width: size, height: size, viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
3856
|
+
/* @__PURE__ */ jsx80("path", { d: "M11.2725 8.44336L8.44409 11.2718L36.7284 39.5561L39.5568 36.7276L11.2725 8.44336Z", fill: color }),
|
|
3857
|
+
/* @__PURE__ */ jsx80(
|
|
3858
|
+
"path",
|
|
3859
|
+
{
|
|
3860
|
+
d: "M37.9408 32.9904C42.8609 29.4455 46 25.1294 46 24.0003C46 22.0003 36.1503 10.0003 24 10.0003C21.3442 10.0003 18.7982 10.5736 16.441 11.4906L20.6108 15.6603C21.6568 15.2347 22.801 15.0003 24 15.0003C28.9706 15.0003 33 19.0297 33 24.0003C33 25.1993 32.7656 26.3435 32.34 27.3895L37.9408 32.9904Z",
|
|
3861
|
+
fill: color
|
|
3862
|
+
}
|
|
3863
|
+
),
|
|
3864
|
+
/* @__PURE__ */ jsx80(
|
|
3865
|
+
"path",
|
|
3866
|
+
{
|
|
3867
|
+
d: "M18.0785 23.0275L24.9728 29.9218C24.6562 29.9735 24.3312 30.0003 24 30.0003C20.6863 30.0003 18 27.314 18 24.0003C18 23.6691 18.0268 23.3441 18.0785 23.0275Z",
|
|
3868
|
+
fill: color
|
|
3869
|
+
}
|
|
3870
|
+
),
|
|
3871
|
+
/* @__PURE__ */ jsx80(
|
|
3872
|
+
"path",
|
|
3873
|
+
{
|
|
3874
|
+
d: "M15 24.0003C15 22.8008 15.2347 21.6561 15.6606 20.6096L10.0603 15.0094C5.13964 18.5544 2 22.8711 2 24.0003C2 26.0003 11.8497 38.0003 24 38.0003C26.6564 38.0003 29.2028 37.4267 31.5604 36.5095L27.3907 32.3397C26.3442 32.7656 25.1995 33.0003 24 33.0003C19.0294 33.0003 15 28.9709 15 24.0003Z",
|
|
3875
|
+
fill: color
|
|
3876
|
+
}
|
|
3877
|
+
),
|
|
3878
|
+
/* @__PURE__ */ jsx80(
|
|
3879
|
+
"path",
|
|
3880
|
+
{
|
|
3881
|
+
d: "M29.9218 24.9714L23.0289 18.0785C23.345 18.027 23.6694 18.0003 24 18.0003C27.3137 18.0003 30 20.6866 30 24.0003C30 24.3309 29.9733 24.6553 29.9218 24.9714Z",
|
|
3882
|
+
fill: color
|
|
3883
|
+
}
|
|
3884
|
+
)
|
|
3885
|
+
] });
|
|
3886
|
+
}
|
|
3793
3887
|
if (thick) {
|
|
3794
3888
|
return /* @__PURE__ */ jsxs58("svg", { ...props, width: size, height: size, viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
3795
3889
|
/* @__PURE__ */ jsx80("path", { d: "M39.5568 36.7276L36.7284 39.5561L8.44409 11.2718L11.2725 8.44336L39.5568 36.7276Z", fill: color }),
|
|
@@ -6897,6 +6991,165 @@ var RadioItem = forwardRef7(
|
|
|
6897
6991
|
var Radio = Object.assign(RadioRoot, {
|
|
6898
6992
|
Item: RadioItem
|
|
6899
6993
|
});
|
|
6994
|
+
|
|
6995
|
+
// src/components/Textfield/index.tsx
|
|
6996
|
+
import {
|
|
6997
|
+
forwardRef as forwardRef8,
|
|
6998
|
+
useId,
|
|
6999
|
+
useImperativeHandle,
|
|
7000
|
+
useRef as useRef2,
|
|
7001
|
+
useState as useState2
|
|
7002
|
+
} from "react";
|
|
7003
|
+
|
|
7004
|
+
// src/components/Textfield/style.module.scss
|
|
7005
|
+
var style_module_default11 = {
|
|
7006
|
+
"textfield-container": "_textfield-container_117bb_1",
|
|
7007
|
+
"textfield": "_textfield_117bb_1",
|
|
7008
|
+
"label": "_label_117bb_29",
|
|
7009
|
+
"label-out-textfield": "_label-out-textfield_117bb_33",
|
|
7010
|
+
"label-in": "_label-in_117bb_46",
|
|
7011
|
+
"label-out": "_label-out_117bb_33",
|
|
7012
|
+
"input-wrapper": "_input-wrapper_117bb_56",
|
|
7013
|
+
"input": "_input_117bb_56",
|
|
7014
|
+
"label-out-input": "_label-out-input_117bb_93",
|
|
7015
|
+
"input-action-buttons": "_input-action-buttons_117bb_97",
|
|
7016
|
+
"action-button": "_action-button_117bb_103",
|
|
7017
|
+
"error": "_error_117bb_107",
|
|
7018
|
+
"error-message": "_error-message_117bb_123",
|
|
7019
|
+
"error-wrapper": "_error-wrapper_117bb_127",
|
|
7020
|
+
"error-icon": "_error-icon_117bb_136",
|
|
7021
|
+
"footer": "_footer_117bb_140",
|
|
7022
|
+
"character": "_character_117bb_148"
|
|
7023
|
+
};
|
|
7024
|
+
|
|
7025
|
+
// src/components/Textfield/index.tsx
|
|
7026
|
+
import { cva as cva8 } from "class-variance-authority";
|
|
7027
|
+
import clsx14 from "clsx";
|
|
7028
|
+
import { Fragment as Fragment5, jsx as jsx142, jsxs as jsxs96 } from "react/jsx-runtime";
|
|
7029
|
+
var defaultTextfieldVariants = cva8(style_module_default11.textfield);
|
|
7030
|
+
var Textfield = forwardRef8((props, ref) => {
|
|
7031
|
+
const {
|
|
7032
|
+
id = useId(),
|
|
7033
|
+
type,
|
|
7034
|
+
label,
|
|
7035
|
+
value: controlledValue,
|
|
7036
|
+
maxCharacter,
|
|
7037
|
+
placeholder = "",
|
|
7038
|
+
error,
|
|
7039
|
+
disabled,
|
|
7040
|
+
button,
|
|
7041
|
+
onChange,
|
|
7042
|
+
onClear,
|
|
7043
|
+
...rest
|
|
7044
|
+
} = props;
|
|
7045
|
+
const inputRef = useRef2(null);
|
|
7046
|
+
const [value, setValue] = useState2("");
|
|
7047
|
+
const [deidentifiy, setDeidentifiy] = useState2(false);
|
|
7048
|
+
const isControlled = controlledValue !== void 0;
|
|
7049
|
+
const isPassword = type === "password";
|
|
7050
|
+
const isDeidentified = isPassword && deidentifiy;
|
|
7051
|
+
const { text: labelText, type: labelType = "in" } = label;
|
|
7052
|
+
const handleTextfieldClick = /* @__PURE__ */ __name(() => {
|
|
7053
|
+
inputRef.current?.focus();
|
|
7054
|
+
}, "handleTextfieldClick");
|
|
7055
|
+
const handleChange = /* @__PURE__ */ __name((e) => {
|
|
7056
|
+
const { value: value2 } = e.target;
|
|
7057
|
+
if (maxCharacter && value2.length > maxCharacter) {
|
|
7058
|
+
return;
|
|
7059
|
+
}
|
|
7060
|
+
if (!isControlled) {
|
|
7061
|
+
setValue(value2);
|
|
7062
|
+
}
|
|
7063
|
+
onChange?.(e);
|
|
7064
|
+
}, "handleChange");
|
|
7065
|
+
const handleClear = /* @__PURE__ */ __name((e) => {
|
|
7066
|
+
e.stopPropagation();
|
|
7067
|
+
onClear?.();
|
|
7068
|
+
setValue("");
|
|
7069
|
+
}, "handleClear");
|
|
7070
|
+
const handleDeidentify = /* @__PURE__ */ __name((e) => {
|
|
7071
|
+
e.stopPropagation();
|
|
7072
|
+
setDeidentifiy((prev) => !prev);
|
|
7073
|
+
}, "handleDeidentify");
|
|
7074
|
+
useImperativeHandle(ref, () => inputRef.current);
|
|
7075
|
+
return /* @__PURE__ */ jsxs96("div", { className: style_module_default11["textfield-container"], children: [
|
|
7076
|
+
/* @__PURE__ */ jsx142(
|
|
7077
|
+
"div",
|
|
7078
|
+
{
|
|
7079
|
+
className: clsx14(defaultTextfieldVariants(), {
|
|
7080
|
+
[style_module_default11.error]: !!error,
|
|
7081
|
+
[style_module_default11["label-out-textfield"]]: labelType === "out"
|
|
7082
|
+
}),
|
|
7083
|
+
onClick: handleTextfieldClick,
|
|
7084
|
+
children: /* @__PURE__ */ jsxs96("div", { className: style_module_default11["input-wrapper"], children: [
|
|
7085
|
+
/* @__PURE__ */ jsx142(
|
|
7086
|
+
"input",
|
|
7087
|
+
{
|
|
7088
|
+
className: clsx14(style_module_default11.input, {
|
|
7089
|
+
[style_module_default11["label-out-input"]]: labelType === "out"
|
|
7090
|
+
}),
|
|
7091
|
+
type: isDeidentified ? "password" : "text",
|
|
7092
|
+
placeholder,
|
|
7093
|
+
ref: inputRef,
|
|
7094
|
+
disabled,
|
|
7095
|
+
value: isControlled ? controlledValue : value,
|
|
7096
|
+
onChange: handleChange,
|
|
7097
|
+
...rest
|
|
7098
|
+
}
|
|
7099
|
+
),
|
|
7100
|
+
/* @__PURE__ */ jsx142(
|
|
7101
|
+
Label,
|
|
7102
|
+
{
|
|
7103
|
+
className: clsx14(style_module_default11.label, {
|
|
7104
|
+
[style_module_default11["label-in"]]: labelType === "in",
|
|
7105
|
+
[style_module_default11["label-out"]]: labelType === "out"
|
|
7106
|
+
}),
|
|
7107
|
+
size: label.type === "out" ? "s" : void 0,
|
|
7108
|
+
htmlFor: id,
|
|
7109
|
+
children: labelText
|
|
7110
|
+
}
|
|
7111
|
+
),
|
|
7112
|
+
/* @__PURE__ */ jsxs96("div", { className: style_module_default11["input-action-buttons"], children: [
|
|
7113
|
+
value && /* @__PURE__ */ jsx142(
|
|
7114
|
+
IconButton,
|
|
7115
|
+
{
|
|
7116
|
+
className: style_module_default11["action-button"],
|
|
7117
|
+
name: "close-fill",
|
|
7118
|
+
size: "xs",
|
|
7119
|
+
level: "tertiary",
|
|
7120
|
+
thick: true,
|
|
7121
|
+
onClick: handleClear
|
|
7122
|
+
}
|
|
7123
|
+
),
|
|
7124
|
+
isPassword && /* @__PURE__ */ jsx142(
|
|
7125
|
+
IconButton,
|
|
7126
|
+
{
|
|
7127
|
+
className: style_module_default11["action-button"],
|
|
7128
|
+
name: deidentifiy ? "visibility-off" : "visibility",
|
|
7129
|
+
size: "xs",
|
|
7130
|
+
level: "tertiary",
|
|
7131
|
+
fill: true,
|
|
7132
|
+
onClick: handleDeidentify
|
|
7133
|
+
}
|
|
7134
|
+
),
|
|
7135
|
+
button && /* @__PURE__ */ jsx142(Button, { size: "m", onClick: button.onClick, children: button.text })
|
|
7136
|
+
] })
|
|
7137
|
+
] })
|
|
7138
|
+
}
|
|
7139
|
+
),
|
|
7140
|
+
/* @__PURE__ */ jsxs96("div", { className: style_module_default11.footer, children: [
|
|
7141
|
+
/* @__PURE__ */ jsx142("div", { className: style_module_default11["error-wrapper"], children: error && /* @__PURE__ */ jsxs96(Fragment5, { children: [
|
|
7142
|
+
/* @__PURE__ */ jsx142(Icon, { className: style_module_default11["error-icon"], name: "exclamationmark-fill", fill: true, thick: true, size: "xs" }),
|
|
7143
|
+
/* @__PURE__ */ jsx142(Caption, { size: 3, type: "normal", weight: "regular", className: style_module_default11["error-message"], children: error })
|
|
7144
|
+
] }) }),
|
|
7145
|
+
maxCharacter && /* @__PURE__ */ jsxs96(Caption, { className: style_module_default11.character, size: 3, type: "normal", weight: "regular", children: [
|
|
7146
|
+
isControlled ? controlledValue.length : value.length,
|
|
7147
|
+
"/",
|
|
7148
|
+
maxCharacter
|
|
7149
|
+
] })
|
|
7150
|
+
] })
|
|
7151
|
+
] });
|
|
7152
|
+
});
|
|
6900
7153
|
export {
|
|
6901
7154
|
Button,
|
|
6902
7155
|
Caption,
|
|
@@ -6910,6 +7163,7 @@ export {
|
|
|
6910
7163
|
Popover,
|
|
6911
7164
|
Radio,
|
|
6912
7165
|
TextButton,
|
|
7166
|
+
Textfield,
|
|
6913
7167
|
Title2 as Title,
|
|
6914
7168
|
Toaster,
|
|
6915
7169
|
Tooltip,
|