@liner-fe/prism 2.1.23 → 2.1.25
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 +13 -7
- package/lib/components/Icon/index.d.ts +10 -4
- package/lib/components/IconButton/index.d.ts +11 -5
- package/lib/components/Label/index.d.ts +14 -8
- package/lib/components/TextButton/index.d.ts +12 -6
- package/lib/components/Textfield/index.d.ts +9 -3
- package/lib/components/Typography/index.d.ts +0 -2
- package/lib/components/Typography/utils.d.ts +8 -2
- package/lib/index.cjs +182 -265
- package/lib/index.cjs.map +4 -4
- package/lib/index.css +21 -13
- package/lib/index.css.map +2 -2
- package/lib/index.mjs +122 -205
- package/lib/index.mjs.map +4 -4
- package/package.json +2 -2
package/lib/index.cjs
CHANGED
|
@@ -41,8 +41,6 @@ __export(index_exports, {
|
|
|
41
41
|
IconButton: () => IconButton,
|
|
42
42
|
Label: () => Label,
|
|
43
43
|
List: () => List,
|
|
44
|
-
Media: () => Media,
|
|
45
|
-
MediaContextProvider: () => MediaContextProvider,
|
|
46
44
|
Paragraph: () => Paragraph,
|
|
47
45
|
Popover: () => Popover,
|
|
48
46
|
Radio: () => Radio,
|
|
@@ -53,7 +51,6 @@ __export(index_exports, {
|
|
|
53
51
|
Title: () => Title2,
|
|
54
52
|
Toaster: () => Toaster,
|
|
55
53
|
Tooltip: () => Tooltip,
|
|
56
|
-
Typography: () => Typography,
|
|
57
54
|
arrayToStyleObject: () => arrayToStyleObject,
|
|
58
55
|
colorKeys: () => colorKeys,
|
|
59
56
|
getIconComponent: () => getIconComponent,
|
|
@@ -61,7 +58,6 @@ __export(index_exports, {
|
|
|
61
58
|
iconMap: () => iconMap,
|
|
62
59
|
isEmptyObject: () => isEmptyObject,
|
|
63
60
|
objectToArray: () => objectToArray,
|
|
64
|
-
rootMediaStyle: () => rootMediaStyle,
|
|
65
61
|
useToast: () => useToast
|
|
66
62
|
});
|
|
67
63
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -7729,11 +7725,11 @@ var style_module_default = {
|
|
|
7729
7725
|
};
|
|
7730
7726
|
|
|
7731
7727
|
// src/components/Button/index.tsx
|
|
7732
|
-
var
|
|
7728
|
+
var import_cva3 = require("cva");
|
|
7733
7729
|
var import_clsx2 = __toESM(require("clsx"));
|
|
7734
7730
|
|
|
7735
7731
|
// src/components/Icon/index.tsx
|
|
7736
|
-
var
|
|
7732
|
+
var import_cva = require("cva");
|
|
7737
7733
|
var import_clsx = __toESM(require("clsx"));
|
|
7738
7734
|
|
|
7739
7735
|
// src/components/Icon/style.module.scss
|
|
@@ -7819,7 +7815,8 @@ var colorKeys = [
|
|
|
7819
7815
|
"accent-purple",
|
|
7820
7816
|
"accent-pink"
|
|
7821
7817
|
];
|
|
7822
|
-
var iconVariants = (0,
|
|
7818
|
+
var iconVariants = (0, import_cva.cva)({
|
|
7819
|
+
base: style_module_default2.icon,
|
|
7823
7820
|
variants: {
|
|
7824
7821
|
type: arrayToStyleObject(colorKeys, style_module_default2),
|
|
7825
7822
|
fillType: arrayToStyleObject(colorKeys, style_module_default2, "fill")
|
|
@@ -7870,9 +7867,10 @@ var style_module_default3 = {
|
|
|
7870
7867
|
};
|
|
7871
7868
|
|
|
7872
7869
|
// src/components/_ButtonLoading/index.tsx
|
|
7873
|
-
var
|
|
7870
|
+
var import_cva2 = require("cva");
|
|
7874
7871
|
var import_jsx_runtime163 = require("react/jsx-runtime");
|
|
7875
|
-
var loadingVariants = (0,
|
|
7872
|
+
var loadingVariants = (0, import_cva2.cva)({
|
|
7873
|
+
base: [style_module_default3["loading-dot"]],
|
|
7876
7874
|
variants: {
|
|
7877
7875
|
size: {
|
|
7878
7876
|
m: style_module_default3["m"],
|
|
@@ -7959,7 +7957,8 @@ var buttonFillLevelIconFillTypeMap = {
|
|
|
7959
7957
|
"inverse-static": void 0
|
|
7960
7958
|
}
|
|
7961
7959
|
};
|
|
7962
|
-
var defaultButtonVariants = (0,
|
|
7960
|
+
var defaultButtonVariants = (0, import_cva3.cva)({
|
|
7961
|
+
base: [style_module_default.button, style_module_default.default],
|
|
7963
7962
|
variants: {
|
|
7964
7963
|
level: {
|
|
7965
7964
|
primary: style_module_default.primary,
|
|
@@ -7990,7 +7989,8 @@ var defaultButtonVariants = (0, import_class_variance_authority3.cva)([style_mod
|
|
|
7990
7989
|
}
|
|
7991
7990
|
}
|
|
7992
7991
|
});
|
|
7993
|
-
var defaultButtonChildrenVariants = (0,
|
|
7992
|
+
var defaultButtonChildrenVariants = (0, import_cva3.cva)({
|
|
7993
|
+
base: style_module_default.children,
|
|
7994
7994
|
variants: {
|
|
7995
7995
|
size: {
|
|
7996
7996
|
cta: style_module_default["cta-children"],
|
|
@@ -8112,7 +8112,7 @@ var import_clsx3 = __toESM(require("clsx"));
|
|
|
8112
8112
|
var import_react2 = require("react");
|
|
8113
8113
|
|
|
8114
8114
|
// src/components/Typography/utils.ts
|
|
8115
|
-
var
|
|
8115
|
+
var import_cva4 = require("cva");
|
|
8116
8116
|
|
|
8117
8117
|
// src/components/Typography/Set/style.module.scss
|
|
8118
8118
|
var style_module_default5 = {
|
|
@@ -8143,7 +8143,8 @@ var style_module_default5 = {
|
|
|
8143
8143
|
};
|
|
8144
8144
|
|
|
8145
8145
|
// src/components/Typography/utils.ts
|
|
8146
|
-
var colorVariants = (0,
|
|
8146
|
+
var colorVariants = (0, import_cva4.cva)({
|
|
8147
|
+
base: style_module_default5.typography,
|
|
8147
8148
|
variants: {
|
|
8148
8149
|
type: arrayToStyleObject(colorKeys, style_module_default5)
|
|
8149
8150
|
}
|
|
@@ -8810,96 +8811,6 @@ var Display = (0, import_react8.forwardRef)(
|
|
|
8810
8811
|
}
|
|
8811
8812
|
);
|
|
8812
8813
|
|
|
8813
|
-
// src/components/Typography/Responsive/lib.ts
|
|
8814
|
-
var import_fresnel = require("@artsy/fresnel");
|
|
8815
|
-
var import_design_token = require("@liner-fe/design-token");
|
|
8816
|
-
|
|
8817
|
-
// src/components/Typography/Responsive/constant.ts
|
|
8818
|
-
var breakPointKeyArray = ["xs", "s", "m", "l", "xl", "xxl", "xxxl"];
|
|
8819
|
-
|
|
8820
|
-
// src/components/Typography/Responsive/lib.ts
|
|
8821
|
-
var removePx = /* @__PURE__ */ __name((breakPoint) => {
|
|
8822
|
-
return +breakPoint.replace("px", "");
|
|
8823
|
-
}, "removePx");
|
|
8824
|
-
var AppMedia = (0, import_fresnel.createMedia)({
|
|
8825
|
-
breakpoints: breakPointKeyArray.reduce((acc, key) => {
|
|
8826
|
-
acc[key] = removePx(import_design_token.breakpointOrigin[key]);
|
|
8827
|
-
return acc;
|
|
8828
|
-
}, {})
|
|
8829
|
-
});
|
|
8830
|
-
var rootMediaStyle = AppMedia.createMediaStyle();
|
|
8831
|
-
var { MediaContextProvider, Media } = AppMedia;
|
|
8832
|
-
|
|
8833
|
-
// src/components/Typography/Responsive/index.tsx
|
|
8834
|
-
var import_jsx_runtime171 = require("react/jsx-runtime");
|
|
8835
|
-
var import_react9 = require("react");
|
|
8836
|
-
var TypographyImpl = /* @__PURE__ */ __name(({ level, text, ...rest }) => {
|
|
8837
|
-
const commonProps = {
|
|
8838
|
-
...rest,
|
|
8839
|
-
children: text
|
|
8840
|
-
};
|
|
8841
|
-
switch (level) {
|
|
8842
|
-
case "caption":
|
|
8843
|
-
return /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(Caption, { ...commonProps });
|
|
8844
|
-
case "display":
|
|
8845
|
-
return /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(Display, { ...commonProps });
|
|
8846
|
-
case "heading":
|
|
8847
|
-
return /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(Heading, { ...commonProps });
|
|
8848
|
-
case "paragraph":
|
|
8849
|
-
return /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(Paragraph, { ...commonProps });
|
|
8850
|
-
case "title":
|
|
8851
|
-
return /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(Title2, { ...commonProps });
|
|
8852
|
-
default:
|
|
8853
|
-
return null;
|
|
8854
|
-
}
|
|
8855
|
-
}, "TypographyImpl");
|
|
8856
|
-
var Typography = /* @__PURE__ */ __name((props) => {
|
|
8857
|
-
const { children } = props;
|
|
8858
|
-
const createMediaProps = /* @__PURE__ */ __name((current) => {
|
|
8859
|
-
let returnValue = {};
|
|
8860
|
-
breakPointKeyArray.forEach((breakPointKey, idx, originArray) => {
|
|
8861
|
-
const isFoundCurrentBreakPointKey = current === breakPointKey;
|
|
8862
|
-
if (isFoundCurrentBreakPointKey) {
|
|
8863
|
-
const lagerCurrentBreakPointKeyArray = originArray.slice(idx + 1);
|
|
8864
|
-
const isEmptyLagerCurrentBreakPointKeyArray = lagerCurrentBreakPointKeyArray.length === 0;
|
|
8865
|
-
if (isEmptyLagerCurrentBreakPointKeyArray) {
|
|
8866
|
-
returnValue = { greaterThanOrEqual: current };
|
|
8867
|
-
} else {
|
|
8868
|
-
lagerCurrentBreakPointKeyArray.forEach((lagerCurrentBreakPointKey, idx2, originArray2) => {
|
|
8869
|
-
const isExistReturnValue = !isEmptyObject(returnValue);
|
|
8870
|
-
const isEarlyReturn = isExistReturnValue;
|
|
8871
|
-
if (isEarlyReturn) {
|
|
8872
|
-
return;
|
|
8873
|
-
}
|
|
8874
|
-
const isExistLagerCurrentBreakPoint = !!props[lagerCurrentBreakPointKey];
|
|
8875
|
-
if (isExistLagerCurrentBreakPoint) {
|
|
8876
|
-
returnValue = { between: [current, lagerCurrentBreakPointKey] };
|
|
8877
|
-
return;
|
|
8878
|
-
}
|
|
8879
|
-
const isLast = idx2 === originArray2.length - 1;
|
|
8880
|
-
if (isLast) {
|
|
8881
|
-
returnValue = { greaterThanOrEqual: current };
|
|
8882
|
-
return;
|
|
8883
|
-
}
|
|
8884
|
-
});
|
|
8885
|
-
}
|
|
8886
|
-
}
|
|
8887
|
-
});
|
|
8888
|
-
return returnValue;
|
|
8889
|
-
}, "createMediaProps");
|
|
8890
|
-
return (
|
|
8891
|
-
// Fragment없이도 원래 동작해야하는데 liner-web에서 JSX.Element가 배열로 오면 에러 띄워서 임시로 Fragment로 래핑합니다.
|
|
8892
|
-
/* @__PURE__ */ (0, import_jsx_runtime171.jsx)(import_jsx_runtime171.Fragment, { children: breakPointKeyArray.map((breakPointKey) => {
|
|
8893
|
-
const variable = props[breakPointKey];
|
|
8894
|
-
const isExistVariable = !!variable;
|
|
8895
|
-
if (isExistVariable) {
|
|
8896
|
-
return /* @__PURE__ */ (0, import_react9.createElement)(Media, { ...createMediaProps(breakPointKey), key: breakPointKey }, /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(TypographyImpl, { ...variable, text: variable.text || children }));
|
|
8897
|
-
}
|
|
8898
|
-
return null;
|
|
8899
|
-
}) })
|
|
8900
|
-
);
|
|
8901
|
-
}, "Typography");
|
|
8902
|
-
|
|
8903
8814
|
// src/components/Popover/index.tsx
|
|
8904
8815
|
var React3 = __toESM(require("react"));
|
|
8905
8816
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
|
@@ -8922,11 +8833,11 @@ var style_module_default6 = {
|
|
|
8922
8833
|
};
|
|
8923
8834
|
|
|
8924
8835
|
// src/components/Popover/index.tsx
|
|
8925
|
-
var
|
|
8836
|
+
var import_cva6 = require("cva");
|
|
8926
8837
|
var import_clsx9 = require("clsx");
|
|
8927
8838
|
|
|
8928
8839
|
// src/components/TextButton/index.tsx
|
|
8929
|
-
var
|
|
8840
|
+
var import_cva5 = require("cva");
|
|
8930
8841
|
|
|
8931
8842
|
// src/components/TextButton/style.module.scss
|
|
8932
8843
|
var style_module_default7 = {
|
|
@@ -8945,9 +8856,9 @@ var style_module_default7 = {
|
|
|
8945
8856
|
};
|
|
8946
8857
|
|
|
8947
8858
|
// src/components/TextButton/index.tsx
|
|
8948
|
-
var
|
|
8859
|
+
var import_react9 = require("react");
|
|
8949
8860
|
var import_clsx8 = __toESM(require("clsx"));
|
|
8950
|
-
var
|
|
8861
|
+
var import_jsx_runtime171 = require("react/jsx-runtime");
|
|
8951
8862
|
var textButtonLevelIconTypeMap = {
|
|
8952
8863
|
primary: "brand-label-primary",
|
|
8953
8864
|
secondary: "neutral-label-primary",
|
|
@@ -8962,7 +8873,8 @@ var textButtonLevelIconFillTypeMap = {
|
|
|
8962
8873
|
inverse: "neutral-label-primary",
|
|
8963
8874
|
"inverse-static": "neutral-label-static-primary"
|
|
8964
8875
|
};
|
|
8965
|
-
var textButtonVariants = (0,
|
|
8876
|
+
var textButtonVariants = (0, import_cva5.cva)({
|
|
8877
|
+
base: [style_module_default7.button, style_module_default7.text],
|
|
8966
8878
|
variants: {
|
|
8967
8879
|
level: {
|
|
8968
8880
|
primary: [style_module_default7["primary"], "lp-sys-typo-caption1-normal-medium"],
|
|
@@ -8983,7 +8895,7 @@ var textButtonVariants = (0, import_class_variance_authority5.cva)([style_module
|
|
|
8983
8895
|
}
|
|
8984
8896
|
}
|
|
8985
8897
|
});
|
|
8986
|
-
var TextButton = (0,
|
|
8898
|
+
var TextButton = (0, import_react9.forwardRef)(
|
|
8987
8899
|
({
|
|
8988
8900
|
level = "primary",
|
|
8989
8901
|
thick = false,
|
|
@@ -9003,14 +8915,14 @@ var TextButton = (0, import_react10.forwardRef)(
|
|
|
9003
8915
|
fillType: textButtonLevelIconFillTypeMap[level],
|
|
9004
8916
|
...icon
|
|
9005
8917
|
}), "getIconProps");
|
|
9006
|
-
const renderContent = /* @__PURE__ */ __name((children2) => /* @__PURE__ */ (0,
|
|
9007
|
-
leftIcon && /* @__PURE__ */ (0,
|
|
9008
|
-
/* @__PURE__ */ (0,
|
|
9009
|
-
rightIcon && /* @__PURE__ */ (0,
|
|
8918
|
+
const renderContent = /* @__PURE__ */ __name((children2) => /* @__PURE__ */ (0, import_jsx_runtime171.jsxs)("span", { className: style_module_default7["text-children"], children: [
|
|
8919
|
+
leftIcon && /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(Icon, { ...getIconProps(leftIcon) }),
|
|
8920
|
+
/* @__PURE__ */ (0, import_jsx_runtime171.jsx)("p", { children: children2 }),
|
|
8921
|
+
rightIcon && /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(Icon, { ...getIconProps(rightIcon) })
|
|
9010
8922
|
] }), "renderContent");
|
|
9011
8923
|
if (asChild) {
|
|
9012
|
-
const parent =
|
|
9013
|
-
return (0,
|
|
8924
|
+
const parent = import_react9.Children.only(children);
|
|
8925
|
+
return (0, import_react9.cloneElement)(
|
|
9014
8926
|
parent,
|
|
9015
8927
|
{
|
|
9016
8928
|
...rest,
|
|
@@ -9020,14 +8932,15 @@ var TextButton = (0, import_react10.forwardRef)(
|
|
|
9020
8932
|
renderContent(parent.props.children)
|
|
9021
8933
|
);
|
|
9022
8934
|
}
|
|
9023
|
-
return /* @__PURE__ */ (0,
|
|
8935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime171.jsx)("button", { className: (0, import_clsx8.default)(textButtonVariants({ level, thick, underline, size }), className), ref, ...rest, children: renderContent(children) });
|
|
9024
8936
|
}
|
|
9025
8937
|
);
|
|
9026
8938
|
|
|
9027
8939
|
// src/components/Popover/index.tsx
|
|
9028
|
-
var
|
|
8940
|
+
var import_jsx_runtime172 = require("react/jsx-runtime");
|
|
9029
8941
|
var DEFAULT_OFFSET = -6;
|
|
9030
|
-
var popoverVariants = (0,
|
|
8942
|
+
var popoverVariants = (0, import_cva6.cva)({
|
|
8943
|
+
base: style_module_default6.content,
|
|
9031
8944
|
variants: {
|
|
9032
8945
|
level: {
|
|
9033
8946
|
primary: style_module_default6.primary,
|
|
@@ -9035,7 +8948,8 @@ var popoverVariants = (0, import_class_variance_authority6.cva)(style_module_def
|
|
|
9035
8948
|
}
|
|
9036
8949
|
}
|
|
9037
8950
|
});
|
|
9038
|
-
var popoverAnchorVariants = (0,
|
|
8951
|
+
var popoverAnchorVariants = (0, import_cva6.cva)({
|
|
8952
|
+
base: style_module_default6.anchor,
|
|
9039
8953
|
variants: {
|
|
9040
8954
|
level: {
|
|
9041
8955
|
primary: style_module_default6.primary,
|
|
@@ -9043,13 +8957,13 @@ var popoverAnchorVariants = (0, import_class_variance_authority6.cva)(style_modu
|
|
|
9043
8957
|
}
|
|
9044
8958
|
}
|
|
9045
8959
|
});
|
|
9046
|
-
var popoverTagVariants = (0,
|
|
9047
|
-
var popoverTitleVariants = (0,
|
|
9048
|
-
var popoverDescriptionVariants = (0,
|
|
9049
|
-
var popoverFooterVariants = (0,
|
|
9050
|
-
var PopoverRoot = /* @__PURE__ */ __name(({ isOpen, children, onChange }) => /* @__PURE__ */ (0,
|
|
9051
|
-
var PopoverTrigger = /* @__PURE__ */ __name(({ by }) => /* @__PURE__ */ (0,
|
|
9052
|
-
var PopoverAnchor = /* @__PURE__ */ __name(({ className }) => /* @__PURE__ */ (0,
|
|
8960
|
+
var popoverTagVariants = (0, import_cva6.cva)({ base: [style_module_default6.tag, "lp-sys-typo-caption3-normal-bold"] });
|
|
8961
|
+
var popoverTitleVariants = (0, import_cva6.cva)({ base: [style_module_default6.title, "lp-sys-typo-paragraph3-normal-bold"] });
|
|
8962
|
+
var popoverDescriptionVariants = (0, import_cva6.cva)({ base: [style_module_default6.description, "lp-sys-typo-caption1-normal-regular"] });
|
|
8963
|
+
var popoverFooterVariants = (0, import_cva6.cva)({ base: [style_module_default6.footer, "lp-sys-typo-caption1-normal-medium"] });
|
|
8964
|
+
var PopoverRoot = /* @__PURE__ */ __name(({ isOpen, children, onChange }) => /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(PopoverPrimitive.Root, { open: isOpen, onOpenChange: onChange, children }), "PopoverRoot");
|
|
8965
|
+
var PopoverTrigger = /* @__PURE__ */ __name(({ by }) => /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(PopoverPrimitive.Trigger, { asChild: true, children: by }), "PopoverTrigger");
|
|
8966
|
+
var PopoverAnchor = /* @__PURE__ */ __name(({ className }) => /* @__PURE__ */ (0, import_jsx_runtime172.jsx)("svg", { className, xmlns: "http://www.w3.org/2000/svg", width: "30", height: "10", viewBox: "0 0 30 10", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
|
|
9053
8967
|
"path",
|
|
9054
8968
|
{
|
|
9055
8969
|
fillRule: "evenodd",
|
|
@@ -9076,8 +8990,8 @@ var PopoverContent = React3.forwardRef(
|
|
|
9076
8990
|
children,
|
|
9077
8991
|
container,
|
|
9078
8992
|
...props
|
|
9079
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
9080
|
-
/* @__PURE__ */ (0,
|
|
8993
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(PopoverPrimitive.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime172.jsxs)(import_jsx_runtime172.Fragment, { children: [
|
|
8994
|
+
/* @__PURE__ */ (0, import_jsx_runtime172.jsxs)(
|
|
9081
8995
|
PopoverPrimitive.Content,
|
|
9082
8996
|
{
|
|
9083
8997
|
ref,
|
|
@@ -9088,24 +9002,24 @@ var PopoverContent = React3.forwardRef(
|
|
|
9088
9002
|
className: (0, import_clsx9.clsx)(popoverVariants({ level }), className),
|
|
9089
9003
|
...props,
|
|
9090
9004
|
children: [
|
|
9091
|
-
/* @__PURE__ */ (0,
|
|
9092
|
-
(tag || icon || onClose) && /* @__PURE__ */ (0,
|
|
9093
|
-
tag && /* @__PURE__ */ (0,
|
|
9094
|
-
icon && /* @__PURE__ */ (0,
|
|
9095
|
-
/* @__PURE__ */ (0,
|
|
9096
|
-
onClose && /* @__PURE__ */ (0,
|
|
9005
|
+
/* @__PURE__ */ (0, import_jsx_runtime172.jsxs)("div", { className: style_module_default6.contentContainer, children: [
|
|
9006
|
+
(tag || icon || onClose) && /* @__PURE__ */ (0, import_jsx_runtime172.jsxs)("div", { className: style_module_default6.heading, children: [
|
|
9007
|
+
tag && /* @__PURE__ */ (0, import_jsx_runtime172.jsx)("span", { className: popoverTagVariants(), children: tag }),
|
|
9008
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(Icon, { name: icon.name, size: "xs", thick: icon.thick, fill: icon.fill }),
|
|
9009
|
+
/* @__PURE__ */ (0, import_jsx_runtime172.jsx)("p", { className: popoverTitleVariants(), children: title }),
|
|
9010
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
|
|
9097
9011
|
PopoverPrimitive.PopoverClose,
|
|
9098
9012
|
{
|
|
9099
9013
|
className: style_module_default6.closeButton,
|
|
9100
9014
|
onClick: () => {
|
|
9101
9015
|
onClose();
|
|
9102
9016
|
},
|
|
9103
|
-
children: /* @__PURE__ */ (0,
|
|
9017
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(Icon, { name: "close-fill", size: "s", fill: true, thick: true, type: "neutral-label-static-primary" })
|
|
9104
9018
|
}
|
|
9105
9019
|
)
|
|
9106
9020
|
] }),
|
|
9107
|
-
description && /* @__PURE__ */ (0,
|
|
9108
|
-
onConfirm && /* @__PURE__ */ (0,
|
|
9021
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime172.jsx)("p", { className: popoverDescriptionVariants(), children: description }),
|
|
9022
|
+
onConfirm && /* @__PURE__ */ (0, import_jsx_runtime172.jsx)("div", { className: popoverFooterVariants(), children: /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
|
|
9109
9023
|
TextButton,
|
|
9110
9024
|
{
|
|
9111
9025
|
level: "inverse-static",
|
|
@@ -9117,11 +9031,11 @@ var PopoverContent = React3.forwardRef(
|
|
|
9117
9031
|
) }),
|
|
9118
9032
|
children
|
|
9119
9033
|
] }),
|
|
9120
|
-
/* @__PURE__ */ (0,
|
|
9034
|
+
/* @__PURE__ */ (0, import_jsx_runtime172.jsx)(PopoverPrimitive.Arrow, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(PopoverAnchor, { className: (0, import_clsx9.clsx)(popoverAnchorVariants({ level })) }) })
|
|
9121
9035
|
]
|
|
9122
9036
|
}
|
|
9123
9037
|
),
|
|
9124
|
-
isOverlay && /* @__PURE__ */ (0,
|
|
9038
|
+
isOverlay && /* @__PURE__ */ (0, import_jsx_runtime172.jsx)("div", { "data-radix-popper-overlay": true, className: style_module_default6.overlay })
|
|
9125
9039
|
] }) })
|
|
9126
9040
|
);
|
|
9127
9041
|
var Popover = Object.assign(PopoverRoot, {
|
|
@@ -9133,7 +9047,7 @@ var Popover = Object.assign(PopoverRoot, {
|
|
|
9133
9047
|
|
|
9134
9048
|
// src/components/Tooltip/index.tsx
|
|
9135
9049
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
|
9136
|
-
var
|
|
9050
|
+
var import_react10 = require("react");
|
|
9137
9051
|
|
|
9138
9052
|
// src/components/Tooltip/style.module.scss
|
|
9139
9053
|
var style_module_default8 = {
|
|
@@ -9142,16 +9056,16 @@ var style_module_default8 = {
|
|
|
9142
9056
|
};
|
|
9143
9057
|
|
|
9144
9058
|
// src/components/Tooltip/index.tsx
|
|
9145
|
-
var
|
|
9059
|
+
var import_cva7 = require("cva");
|
|
9146
9060
|
var import_clsx10 = __toESM(require("clsx"));
|
|
9147
|
-
var
|
|
9061
|
+
var import_jsx_runtime173 = require("react/jsx-runtime");
|
|
9148
9062
|
var DEFAULT_OFFSET2 = "medium";
|
|
9149
|
-
var tooltipVariants = (0,
|
|
9063
|
+
var tooltipVariants = (0, import_cva7.cva)({ base: [style_module_default8.tooltip, "lp-sys-typo-caption1-normal-medium"] });
|
|
9150
9064
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
9151
|
-
var TooltipRoot = /* @__PURE__ */ __name(({ children, ...props }) => /* @__PURE__ */ (0,
|
|
9152
|
-
var TooltipTrigger = /* @__PURE__ */ __name(({ by }) => /* @__PURE__ */ (0,
|
|
9153
|
-
var TooltipContent = (0,
|
|
9154
|
-
({ description, position = "top", className, offset = DEFAULT_OFFSET2, collisionPadding, ...props }, ref) => /* @__PURE__ */ (0,
|
|
9065
|
+
var TooltipRoot = /* @__PURE__ */ __name(({ children, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(TooltipPrimitive.Root, { delayDuration: 0, ...props, children }), "TooltipRoot");
|
|
9066
|
+
var TooltipTrigger = /* @__PURE__ */ __name(({ by }) => /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(TooltipPrimitive.Trigger, { asChild: true, children: by }), "TooltipTrigger");
|
|
9067
|
+
var TooltipContent = (0, import_react10.forwardRef)(
|
|
9068
|
+
({ description, position = "top", className, offset = DEFAULT_OFFSET2, collisionPadding, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
|
|
9155
9069
|
TooltipPrimitive.Content,
|
|
9156
9070
|
{
|
|
9157
9071
|
ref,
|
|
@@ -9160,7 +9074,7 @@ var TooltipContent = (0, import_react11.forwardRef)(
|
|
|
9160
9074
|
collisionPadding,
|
|
9161
9075
|
className: (0, import_clsx10.default)(tooltipVariants(), className),
|
|
9162
9076
|
...props,
|
|
9163
|
-
children: /* @__PURE__ */ (0,
|
|
9077
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime173.jsx)("p", { className: style_module_default8.tooltipContent, children: description })
|
|
9164
9078
|
}
|
|
9165
9079
|
)
|
|
9166
9080
|
);
|
|
@@ -9171,8 +9085,8 @@ var Tooltip = Object.assign(TooltipRoot, {
|
|
|
9171
9085
|
});
|
|
9172
9086
|
|
|
9173
9087
|
// src/components/IconButton/index.tsx
|
|
9174
|
-
var
|
|
9175
|
-
var
|
|
9088
|
+
var import_cva8 = require("cva");
|
|
9089
|
+
var import_react11 = require("react");
|
|
9176
9090
|
var import_clsx11 = __toESM(require("clsx"));
|
|
9177
9091
|
|
|
9178
9092
|
// src/components/IconButton/style.module.scss
|
|
@@ -9195,7 +9109,7 @@ var style_module_default9 = {
|
|
|
9195
9109
|
|
|
9196
9110
|
// src/components/IconButton/index.tsx
|
|
9197
9111
|
var import_react_slot = require("@radix-ui/react-slot");
|
|
9198
|
-
var
|
|
9112
|
+
var import_jsx_runtime174 = require("react/jsx-runtime");
|
|
9199
9113
|
var iconButtonSizeIconSizeMap = {
|
|
9200
9114
|
l: "m",
|
|
9201
9115
|
m: "s",
|
|
@@ -9231,7 +9145,8 @@ var iconButtonLevelIconTypeMap = {
|
|
|
9231
9145
|
"inverse-static": "inverse-label-static-primary"
|
|
9232
9146
|
}
|
|
9233
9147
|
};
|
|
9234
|
-
var iconButtonVariants = (0,
|
|
9148
|
+
var iconButtonVariants = (0, import_cva8.cva)({
|
|
9149
|
+
base: [style_module_default9.iconButton],
|
|
9235
9150
|
variants: {
|
|
9236
9151
|
level: {
|
|
9237
9152
|
primary: style_module_default9.primary,
|
|
@@ -9255,7 +9170,7 @@ var iconButtonVariants = (0, import_class_variance_authority8.cva)([style_module
|
|
|
9255
9170
|
}
|
|
9256
9171
|
}
|
|
9257
9172
|
});
|
|
9258
|
-
var IconButton = (0,
|
|
9173
|
+
var IconButton = (0, import_react11.forwardRef)(
|
|
9259
9174
|
({
|
|
9260
9175
|
asChild,
|
|
9261
9176
|
level = "primary",
|
|
@@ -9268,14 +9183,14 @@ var IconButton = (0, import_react12.forwardRef)(
|
|
|
9268
9183
|
...rest
|
|
9269
9184
|
}, ref) => {
|
|
9270
9185
|
const Comp = asChild ? import_react_slot.Slot : "button";
|
|
9271
|
-
return /* @__PURE__ */ (0,
|
|
9186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
|
|
9272
9187
|
Comp,
|
|
9273
9188
|
{
|
|
9274
9189
|
...rest,
|
|
9275
9190
|
className: (0, import_clsx11.default)(iconButtonVariants({ level, size, fill }), className),
|
|
9276
9191
|
ref,
|
|
9277
9192
|
disabled: disabled && !isLoading,
|
|
9278
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
9193
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(ButtonLoading, { size: iconButtonLoadingSizeMap[size], level }) : /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
|
|
9279
9194
|
Icon,
|
|
9280
9195
|
{
|
|
9281
9196
|
size: iconButtonSizeIconSizeMap[size],
|
|
@@ -9300,11 +9215,11 @@ var style_module_default10 = {
|
|
|
9300
9215
|
};
|
|
9301
9216
|
|
|
9302
9217
|
// src/components/CheckBox/index.tsx
|
|
9303
|
-
var
|
|
9218
|
+
var import_react13 = require("react");
|
|
9304
9219
|
var import_clsx13 = __toESM(require("clsx"));
|
|
9305
9220
|
|
|
9306
9221
|
// src/components/Label/index.tsx
|
|
9307
|
-
var
|
|
9222
|
+
var import_react12 = require("react");
|
|
9308
9223
|
var LabelPrimitive = __toESM(require("@radix-ui/react-label"));
|
|
9309
9224
|
var import_clsx12 = __toESM(require("clsx"));
|
|
9310
9225
|
|
|
@@ -9326,9 +9241,10 @@ var style_module_default11 = {
|
|
|
9326
9241
|
};
|
|
9327
9242
|
|
|
9328
9243
|
// src/components/Label/index.tsx
|
|
9329
|
-
var
|
|
9330
|
-
var
|
|
9331
|
-
var defaultLabelVariants = (0,
|
|
9244
|
+
var import_cva9 = require("cva");
|
|
9245
|
+
var import_jsx_runtime175 = require("react/jsx-runtime");
|
|
9246
|
+
var defaultLabelVariants = (0, import_cva9.cva)({
|
|
9247
|
+
base: ["lp-sys-typo-paragraph2-normal-medium", style_module_default11.label],
|
|
9332
9248
|
variants: {
|
|
9333
9249
|
level: {
|
|
9334
9250
|
primary: style_module_default11.primary,
|
|
@@ -9356,7 +9272,7 @@ var defaultLabelVariants = (0, import_class_variance_authority9.cva)(["lp-sys-ty
|
|
|
9356
9272
|
}
|
|
9357
9273
|
}
|
|
9358
9274
|
});
|
|
9359
|
-
var Label = (0,
|
|
9275
|
+
var Label = (0, import_react12.forwardRef)(
|
|
9360
9276
|
({
|
|
9361
9277
|
className,
|
|
9362
9278
|
level = "primary",
|
|
@@ -9367,7 +9283,7 @@ var Label = (0, import_react13.forwardRef)(
|
|
|
9367
9283
|
error = false,
|
|
9368
9284
|
...props
|
|
9369
9285
|
}, ref) => {
|
|
9370
|
-
return /* @__PURE__ */ (0,
|
|
9286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
|
|
9371
9287
|
LabelPrimitive.Root,
|
|
9372
9288
|
{
|
|
9373
9289
|
ref,
|
|
@@ -9379,48 +9295,48 @@ var Label = (0, import_react13.forwardRef)(
|
|
|
9379
9295
|
);
|
|
9380
9296
|
|
|
9381
9297
|
// src/components/CheckBox/index.tsx
|
|
9382
|
-
var
|
|
9383
|
-
var Checkbox = (0,
|
|
9298
|
+
var import_jsx_runtime176 = require("react/jsx-runtime");
|
|
9299
|
+
var Checkbox = (0, import_react13.forwardRef)(
|
|
9384
9300
|
({ className, label, description, ...props }, ref) => {
|
|
9385
|
-
const CheckboxWrapper = /* @__PURE__ */ __name(({ children }) => label ? /* @__PURE__ */ (0,
|
|
9386
|
-
/* @__PURE__ */ (0,
|
|
9301
|
+
const CheckboxWrapper = /* @__PURE__ */ __name(({ children }) => label ? /* @__PURE__ */ (0, import_jsx_runtime176.jsxs)(Label, { position: "right", htmlFor: props.id, children: [
|
|
9302
|
+
/* @__PURE__ */ (0, import_jsx_runtime176.jsxs)("div", { className: style_module_default10["label-wrapper"], children: [
|
|
9387
9303
|
label,
|
|
9388
|
-
/* @__PURE__ */ (0,
|
|
9304
|
+
/* @__PURE__ */ (0, import_jsx_runtime176.jsx)(Paragraph, { className: style_module_default10.description, size: 3, type: "normal", weight: "regular", children: description })
|
|
9389
9305
|
] }),
|
|
9390
9306
|
children
|
|
9391
|
-
] }) : /* @__PURE__ */ (0,
|
|
9392
|
-
return /* @__PURE__ */ (0,
|
|
9307
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(import_jsx_runtime176.Fragment, { children }), "CheckboxWrapper");
|
|
9308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(CheckboxWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(CheckboxPrimitive.Root, { className: (0, import_clsx13.default)(style_module_default10.checkbox, className), ref, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(CheckboxPrimitive.Indicator, { className: style_module_default10["checkbox-indicator"], children: /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(Icon, { name: "check-mark", thick: true, size: "xs", type: "inverse-label-primary" }) }) }) });
|
|
9393
9309
|
}
|
|
9394
9310
|
);
|
|
9395
9311
|
|
|
9396
9312
|
// src/components/Radio/index.tsx
|
|
9397
9313
|
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"));
|
|
9398
9314
|
var import_clsx14 = __toESM(require("clsx"));
|
|
9399
|
-
var
|
|
9315
|
+
var import_react14 = require("react");
|
|
9400
9316
|
|
|
9401
9317
|
// src/components/Radio/style.module.scss
|
|
9402
9318
|
var style_module_default12 = {
|
|
9403
|
-
"radio": "
|
|
9404
|
-
"radio-item": "_radio-
|
|
9405
|
-
"indicator": "
|
|
9406
|
-
"label-wrapper": "_label-
|
|
9407
|
-
"description": "
|
|
9319
|
+
"radio": "_radio_igep6_1",
|
|
9320
|
+
"radio-item": "_radio-item_igep6_5",
|
|
9321
|
+
"indicator": "_indicator_igep6_45",
|
|
9322
|
+
"label-wrapper": "_label-wrapper_igep6_51",
|
|
9323
|
+
"description": "_description_igep6_61"
|
|
9408
9324
|
};
|
|
9409
9325
|
|
|
9410
9326
|
// src/components/Radio/index.tsx
|
|
9411
|
-
var
|
|
9412
|
-
var RadioIndicator = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0,
|
|
9413
|
-
var RadioRoot = (0,
|
|
9414
|
-
var RadioItem = (0,
|
|
9327
|
+
var import_jsx_runtime177 = require("react/jsx-runtime");
|
|
9328
|
+
var RadioIndicator = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0, import_jsx_runtime177.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime177.jsx)("circle", { cx: "5", cy: "5", r: "5", fill: "#313133" }) }), "RadioIndicator");
|
|
9329
|
+
var RadioRoot = (0, import_react14.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(RadioGroupPrimitive.Root, { className: (0, import_clsx14.default)(style_module_default12.radio, className), ...props }));
|
|
9330
|
+
var RadioItem = (0, import_react14.forwardRef)(
|
|
9415
9331
|
({ className, label, description, ...props }, ref) => {
|
|
9416
|
-
const RadioItemWrapper = /* @__PURE__ */ __name(({ children }) => label ? /* @__PURE__ */ (0,
|
|
9417
|
-
/* @__PURE__ */ (0,
|
|
9332
|
+
const RadioItemWrapper = /* @__PURE__ */ __name(({ children }) => label ? /* @__PURE__ */ (0, import_jsx_runtime177.jsxs)(Label, { position: "right", htmlFor: props.id, children: [
|
|
9333
|
+
/* @__PURE__ */ (0, import_jsx_runtime177.jsxs)("div", { className: style_module_default12["label-wrapper"], children: [
|
|
9418
9334
|
label,
|
|
9419
|
-
/* @__PURE__ */ (0,
|
|
9335
|
+
/* @__PURE__ */ (0, import_jsx_runtime177.jsx)(Paragraph, { className: style_module_default12.description, size: 3, type: "normal", weight: "regular", children: description })
|
|
9420
9336
|
] }),
|
|
9421
9337
|
children
|
|
9422
|
-
] }) : /* @__PURE__ */ (0,
|
|
9423
|
-
return /* @__PURE__ */ (0,
|
|
9338
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(import_jsx_runtime177.Fragment, { children }), "RadioItemWrapper");
|
|
9339
|
+
return /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(RadioItemWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(RadioGroupPrimitive.Item, { ref, className: (0, import_clsx14.default)(style_module_default12["radio-item"], className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(RadioGroupPrimitive.Indicator, { className: style_module_default12.indicator, children: /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(RadioIndicator, {}) }) }) });
|
|
9424
9340
|
}
|
|
9425
9341
|
);
|
|
9426
9342
|
var Radio = Object.assign(RadioRoot, {
|
|
@@ -9428,7 +9344,7 @@ var Radio = Object.assign(RadioRoot, {
|
|
|
9428
9344
|
});
|
|
9429
9345
|
|
|
9430
9346
|
// src/components/Textfield/index.tsx
|
|
9431
|
-
var
|
|
9347
|
+
var import_react15 = require("react");
|
|
9432
9348
|
|
|
9433
9349
|
// src/components/Textfield/style.module.scss
|
|
9434
9350
|
var style_module_default13 = {
|
|
@@ -9453,11 +9369,12 @@ var style_module_default13 = {
|
|
|
9453
9369
|
};
|
|
9454
9370
|
|
|
9455
9371
|
// src/components/Textfield/index.tsx
|
|
9456
|
-
var
|
|
9372
|
+
var import_cva10 = require("cva");
|
|
9457
9373
|
var import_clsx15 = __toESM(require("clsx"));
|
|
9458
9374
|
var import_react_dom = require("react-dom");
|
|
9459
|
-
var
|
|
9460
|
-
var defaultTextfieldVariants = (0,
|
|
9375
|
+
var import_jsx_runtime178 = require("react/jsx-runtime");
|
|
9376
|
+
var defaultTextfieldVariants = (0, import_cva10.cva)({
|
|
9377
|
+
base: style_module_default13.textfield,
|
|
9461
9378
|
variants: {
|
|
9462
9379
|
color: {
|
|
9463
9380
|
"neutral-container-mid": style_module_default13.gray,
|
|
@@ -9465,9 +9382,9 @@ var defaultTextfieldVariants = (0, import_class_variance_authority10.cva)(style_
|
|
|
9465
9382
|
}
|
|
9466
9383
|
}
|
|
9467
9384
|
});
|
|
9468
|
-
var Textfield = (0,
|
|
9385
|
+
var Textfield = (0, import_react15.forwardRef)((props, ref) => {
|
|
9469
9386
|
const {
|
|
9470
|
-
id = (0,
|
|
9387
|
+
id = (0, import_react15.useId)(),
|
|
9471
9388
|
type,
|
|
9472
9389
|
label,
|
|
9473
9390
|
value: controlledValue,
|
|
@@ -9481,9 +9398,9 @@ var Textfield = (0, import_react16.forwardRef)((props, ref) => {
|
|
|
9481
9398
|
onClear,
|
|
9482
9399
|
...rest
|
|
9483
9400
|
} = props;
|
|
9484
|
-
const inputRef = (0,
|
|
9485
|
-
const [value, setValue] = (0,
|
|
9486
|
-
const [deidentifiy, setDeidentifiy] = (0,
|
|
9401
|
+
const inputRef = (0, import_react15.useRef)(null);
|
|
9402
|
+
const [value, setValue] = (0, import_react15.useState)("");
|
|
9403
|
+
const [deidentifiy, setDeidentifiy] = (0, import_react15.useState)(true);
|
|
9487
9404
|
const isControlled = controlledValue !== void 0;
|
|
9488
9405
|
const isPassword = type === "password";
|
|
9489
9406
|
const isDeidentified = isPassword && deidentifiy;
|
|
@@ -9523,9 +9440,9 @@ var Textfield = (0, import_react16.forwardRef)((props, ref) => {
|
|
|
9523
9440
|
inputRef.current.setSelectionRange(length, length);
|
|
9524
9441
|
}
|
|
9525
9442
|
}, "handleDeidentify");
|
|
9526
|
-
(0,
|
|
9527
|
-
return /* @__PURE__ */ (0,
|
|
9528
|
-
/* @__PURE__ */ (0,
|
|
9443
|
+
(0, import_react15.useImperativeHandle)(ref, () => inputRef.current);
|
|
9444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime178.jsxs)("div", { className: style_module_default13["textfield-container"], children: [
|
|
9445
|
+
/* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
|
|
9529
9446
|
"div",
|
|
9530
9447
|
{
|
|
9531
9448
|
className: (0, import_clsx15.default)(defaultTextfieldVariants({ color }), {
|
|
@@ -9533,8 +9450,8 @@ var Textfield = (0, import_react16.forwardRef)((props, ref) => {
|
|
|
9533
9450
|
[style_module_default13["label-out-textfield"]]: !label || labelType === "out"
|
|
9534
9451
|
}),
|
|
9535
9452
|
onClick: handleTextfieldClick,
|
|
9536
|
-
children: /* @__PURE__ */ (0,
|
|
9537
|
-
/* @__PURE__ */ (0,
|
|
9453
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime178.jsxs)("div", { className: style_module_default13["input-wrapper"], children: [
|
|
9454
|
+
/* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
|
|
9538
9455
|
"input",
|
|
9539
9456
|
{
|
|
9540
9457
|
className: (0, import_clsx15.default)(style_module_default13.input, {
|
|
@@ -9549,7 +9466,7 @@ var Textfield = (0, import_react16.forwardRef)((props, ref) => {
|
|
|
9549
9466
|
...rest
|
|
9550
9467
|
}
|
|
9551
9468
|
),
|
|
9552
|
-
/* @__PURE__ */ (0,
|
|
9469
|
+
/* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
|
|
9553
9470
|
Label,
|
|
9554
9471
|
{
|
|
9555
9472
|
className: (0, import_clsx15.default)(style_module_default13.label, {
|
|
@@ -9561,8 +9478,8 @@ var Textfield = (0, import_react16.forwardRef)((props, ref) => {
|
|
|
9561
9478
|
children: labelText
|
|
9562
9479
|
}
|
|
9563
9480
|
),
|
|
9564
|
-
/* @__PURE__ */ (0,
|
|
9565
|
-
textfieldValue && !disabled && /* @__PURE__ */ (0,
|
|
9481
|
+
/* @__PURE__ */ (0, import_jsx_runtime178.jsxs)("div", { className: style_module_default13["input-action-buttons"], children: [
|
|
9482
|
+
textfieldValue && !disabled && /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
|
|
9566
9483
|
IconButton,
|
|
9567
9484
|
{
|
|
9568
9485
|
tabIndex: -1,
|
|
@@ -9580,7 +9497,7 @@ var Textfield = (0, import_react16.forwardRef)((props, ref) => {
|
|
|
9580
9497
|
}
|
|
9581
9498
|
}
|
|
9582
9499
|
),
|
|
9583
|
-
isPassword && !disabled && /* @__PURE__ */ (0,
|
|
9500
|
+
isPassword && !disabled && /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
|
|
9584
9501
|
IconButton,
|
|
9585
9502
|
{
|
|
9586
9503
|
tabIndex: -1,
|
|
@@ -9598,17 +9515,17 @@ var Textfield = (0, import_react16.forwardRef)((props, ref) => {
|
|
|
9598
9515
|
}
|
|
9599
9516
|
}
|
|
9600
9517
|
),
|
|
9601
|
-
buttonProps && /* @__PURE__ */ (0,
|
|
9518
|
+
buttonProps && /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(Button, { ...buttonProps, size: "m", type: "button" })
|
|
9602
9519
|
] })
|
|
9603
9520
|
] })
|
|
9604
9521
|
}
|
|
9605
9522
|
),
|
|
9606
|
-
displayFooter && /* @__PURE__ */ (0,
|
|
9607
|
-
/* @__PURE__ */ (0,
|
|
9608
|
-
/* @__PURE__ */ (0,
|
|
9609
|
-
/* @__PURE__ */ (0,
|
|
9523
|
+
displayFooter && /* @__PURE__ */ (0, import_jsx_runtime178.jsxs)("div", { className: style_module_default13.footer, children: [
|
|
9524
|
+
/* @__PURE__ */ (0, import_jsx_runtime178.jsx)("div", { className: style_module_default13["error-wrapper"], children: error && /* @__PURE__ */ (0, import_jsx_runtime178.jsxs)(import_jsx_runtime178.Fragment, { children: [
|
|
9525
|
+
/* @__PURE__ */ (0, import_jsx_runtime178.jsx)(Icon, { name: "exclamationmark-fill", fill: true, thick: true, size: "xs", type: "function-label-negative" }),
|
|
9526
|
+
/* @__PURE__ */ (0, import_jsx_runtime178.jsx)(Caption, { size: 3, type: "normal", weight: "regular", className: style_module_default13["error-message"], children: error })
|
|
9610
9527
|
] }) }),
|
|
9611
|
-
maxCharacter && /* @__PURE__ */ (0,
|
|
9528
|
+
maxCharacter && /* @__PURE__ */ (0, import_jsx_runtime178.jsxs)(Caption, { className: style_module_default13.character, size: 3, type: "normal", weight: "regular", children: [
|
|
9612
9529
|
isControlled ? controlledValue.length : value.length,
|
|
9613
9530
|
"/",
|
|
9614
9531
|
maxCharacter
|
|
@@ -9618,7 +9535,7 @@ var Textfield = (0, import_react16.forwardRef)((props, ref) => {
|
|
|
9618
9535
|
});
|
|
9619
9536
|
|
|
9620
9537
|
// src/components/Slider/index.tsx
|
|
9621
|
-
var
|
|
9538
|
+
var import_react16 = require("react");
|
|
9622
9539
|
|
|
9623
9540
|
// src/components/Slider/style.module.scss
|
|
9624
9541
|
var style_module_default14 = {
|
|
@@ -9635,29 +9552,29 @@ var style_module_default14 = {
|
|
|
9635
9552
|
|
|
9636
9553
|
// src/components/Slider/index.tsx
|
|
9637
9554
|
var SliderPrimitive = __toESM(require("@radix-ui/react-slider"));
|
|
9638
|
-
var
|
|
9639
|
-
var SliderRoot = (0,
|
|
9555
|
+
var import_jsx_runtime179 = require("react/jsx-runtime");
|
|
9556
|
+
var SliderRoot = (0, import_react16.forwardRef)((props, ref) => {
|
|
9640
9557
|
const { label, tooltip, rangeLeft, rangeRight, min, max, step = 50, ...rest } = props;
|
|
9641
|
-
return /* @__PURE__ */ (0,
|
|
9642
|
-
/* @__PURE__ */ (0,
|
|
9643
|
-
/* @__PURE__ */ (0,
|
|
9644
|
-
/* @__PURE__ */ (0,
|
|
9645
|
-
/* @__PURE__ */ (0,
|
|
9646
|
-
/* @__PURE__ */ (0,
|
|
9558
|
+
return /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(import_jsx_runtime179.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime179.jsxs)(Tooltip.Provider, { children: [
|
|
9559
|
+
/* @__PURE__ */ (0, import_jsx_runtime179.jsx)(Label, { level: "secondary", size: "m", offset: "high", className: style_module_default14.label, children: label }),
|
|
9560
|
+
/* @__PURE__ */ (0, import_jsx_runtime179.jsxs)("div", { className: style_module_default14["slider-wrapper"], children: [
|
|
9561
|
+
/* @__PURE__ */ (0, import_jsx_runtime179.jsxs)("div", { className: style_module_default14["slider-option-wrapper"], children: [
|
|
9562
|
+
/* @__PURE__ */ (0, import_jsx_runtime179.jsx)(Icon, { name: rangeLeft.icon, size: "xs" }),
|
|
9563
|
+
/* @__PURE__ */ (0, import_jsx_runtime179.jsx)(Caption, { size: 1, type: "normal", weight: "medium", className: style_module_default14.optionText, children: rangeLeft.text })
|
|
9647
9564
|
] }),
|
|
9648
|
-
/* @__PURE__ */ (0,
|
|
9649
|
-
/* @__PURE__ */ (0,
|
|
9650
|
-
Array.from({ length: 100 / step + 1 }).map((_, index) => /* @__PURE__ */ (0,
|
|
9651
|
-
/* @__PURE__ */ (0,
|
|
9565
|
+
/* @__PURE__ */ (0, import_jsx_runtime179.jsxs)(SliderPrimitive.Root, { ...rest, step, className: style_module_default14["slider-root"], ref, children: [
|
|
9566
|
+
/* @__PURE__ */ (0, import_jsx_runtime179.jsxs)(SliderPrimitive.Track, { className: style_module_default14["slider-track"], children: [
|
|
9567
|
+
Array.from({ length: 100 / step + 1 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime179.jsx)("span", { className: style_module_default14["slider-step"] }, index)),
|
|
9568
|
+
/* @__PURE__ */ (0, import_jsx_runtime179.jsx)(SliderPrimitive.Range, { className: style_module_default14["slider-range"] })
|
|
9652
9569
|
] }),
|
|
9653
|
-
/* @__PURE__ */ (0,
|
|
9654
|
-
/* @__PURE__ */ (0,
|
|
9655
|
-
/* @__PURE__ */ (0,
|
|
9570
|
+
/* @__PURE__ */ (0, import_jsx_runtime179.jsxs)(Tooltip, { children: [
|
|
9571
|
+
/* @__PURE__ */ (0, import_jsx_runtime179.jsx)(Tooltip.Trigger, { by: /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(SliderPrimitive.Thumb, { className: style_module_default14["slider-thumb"] }) }),
|
|
9572
|
+
/* @__PURE__ */ (0, import_jsx_runtime179.jsx)(Tooltip.Content, { description: tooltip })
|
|
9656
9573
|
] })
|
|
9657
9574
|
] }),
|
|
9658
|
-
/* @__PURE__ */ (0,
|
|
9659
|
-
/* @__PURE__ */ (0,
|
|
9660
|
-
/* @__PURE__ */ (0,
|
|
9575
|
+
/* @__PURE__ */ (0, import_jsx_runtime179.jsxs)("div", { className: style_module_default14["slider-option-wrapper"], children: [
|
|
9576
|
+
/* @__PURE__ */ (0, import_jsx_runtime179.jsx)(Icon, { name: rangeRight.icon, size: "xs" }),
|
|
9577
|
+
/* @__PURE__ */ (0, import_jsx_runtime179.jsx)(Caption, { size: 1, type: "normal", weight: "medium", className: style_module_default14.optionText, children: rangeRight.text })
|
|
9661
9578
|
] })
|
|
9662
9579
|
] })
|
|
9663
9580
|
] }) });
|
|
@@ -9695,13 +9612,13 @@ var style_module_default15 = {
|
|
|
9695
9612
|
};
|
|
9696
9613
|
|
|
9697
9614
|
// src/components/Select/index.tsx
|
|
9698
|
-
var
|
|
9615
|
+
var import_react17 = require("react");
|
|
9699
9616
|
var import_clsx16 = __toESM(require("clsx"));
|
|
9700
|
-
var
|
|
9701
|
-
var Badge = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */ (0,
|
|
9702
|
-
var SelectContent = (0,
|
|
9617
|
+
var import_jsx_runtime180 = require("react/jsx-runtime");
|
|
9618
|
+
var Badge = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */ (0, import_jsx_runtime180.jsx)("div", { className: style_module_default15.badgeContainer, children: /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(Caption, { className: style_module_default15.badge, size: 2, type: "normal", weight: "medium", children }) }), "Badge");
|
|
9619
|
+
var SelectContent = (0, import_react17.forwardRef)((props, ref) => {
|
|
9703
9620
|
const { id, isResponsive, popSide, sideOffset, listLabel, children, container } = props;
|
|
9704
|
-
return /* @__PURE__ */ (0,
|
|
9621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(SelectPrimitive.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
|
|
9705
9622
|
SelectPrimitive.Content,
|
|
9706
9623
|
{
|
|
9707
9624
|
id: `select-content-${id}`,
|
|
@@ -9723,17 +9640,17 @@ var SelectContent = (0, import_react18.forwardRef)((props, ref) => {
|
|
|
9723
9640
|
side: popSide,
|
|
9724
9641
|
sideOffset,
|
|
9725
9642
|
avoidCollisions: false,
|
|
9726
|
-
children: /* @__PURE__ */ (0,
|
|
9727
|
-
/* @__PURE__ */ (0,
|
|
9728
|
-
listLabel && /* @__PURE__ */ (0,
|
|
9643
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime180.jsxs)(ScrollArea.Root, { className: style_module_default15.scrollAreaRoot, type: "always", children: [
|
|
9644
|
+
/* @__PURE__ */ (0, import_jsx_runtime180.jsx)(SelectPrimitive.Viewport, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(ScrollArea.Viewport, { className: style_module_default15.scrollAreaViewport, style: { maxHeight: "268px", overflowY: "auto" }, children: /* @__PURE__ */ (0, import_jsx_runtime180.jsxs)(SelectPrimitive.Group, { children: [
|
|
9645
|
+
listLabel && /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(SelectPrimitive.Label, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(Label, { className: style_module_default15["desktop-label"], level: "secondary", size: "m", offset: "low", children: listLabel }) }),
|
|
9729
9646
|
children
|
|
9730
9647
|
] }) }) }),
|
|
9731
|
-
/* @__PURE__ */ (0,
|
|
9648
|
+
/* @__PURE__ */ (0, import_jsx_runtime180.jsx)(ScrollArea.Scrollbar, { className: style_module_default15.scrollAreaScrollbar, orientation: "vertical", children: /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(ScrollArea.Thumb, { className: style_module_default15.scrollAreaThumb }) })
|
|
9732
9649
|
] })
|
|
9733
9650
|
}
|
|
9734
9651
|
) });
|
|
9735
9652
|
});
|
|
9736
|
-
var SelectRoot = (0,
|
|
9653
|
+
var SelectRoot = (0, import_react17.forwardRef)((props, ref) => {
|
|
9737
9654
|
const {
|
|
9738
9655
|
id,
|
|
9739
9656
|
placeholder,
|
|
@@ -9752,16 +9669,16 @@ var SelectRoot = (0, import_react18.forwardRef)((props, ref) => {
|
|
|
9752
9669
|
...rest
|
|
9753
9670
|
} = props;
|
|
9754
9671
|
const contentProps = { id, isResponsive, popSide, sideOffset, listLabel, children, container };
|
|
9755
|
-
const [isOpen, setIsOpen] = (0,
|
|
9756
|
-
(0,
|
|
9672
|
+
const [isOpen, setIsOpen] = (0, import_react17.useState)(false);
|
|
9673
|
+
(0, import_react17.useEffect)(() => {
|
|
9757
9674
|
setIsOpen(open);
|
|
9758
9675
|
}, [open]);
|
|
9759
|
-
return /* @__PURE__ */ (0,
|
|
9760
|
-
/* @__PURE__ */ (0,
|
|
9761
|
-
/* @__PURE__ */ (0,
|
|
9762
|
-
badge && /* @__PURE__ */ (0,
|
|
9676
|
+
return /* @__PURE__ */ (0, import_jsx_runtime180.jsxs)("div", { children: [
|
|
9677
|
+
/* @__PURE__ */ (0, import_jsx_runtime180.jsxs)("div", { className: style_module_default15["label-container"], children: [
|
|
9678
|
+
/* @__PURE__ */ (0, import_jsx_runtime180.jsx)(Label, { className: style_module_default15["select-label"], level: "secondary", size: "m", offset: "low", htmlFor: id, children: label }),
|
|
9679
|
+
badge && /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(Badge, { children: badge })
|
|
9763
9680
|
] }),
|
|
9764
|
-
/* @__PURE__ */ (0,
|
|
9681
|
+
/* @__PURE__ */ (0, import_jsx_runtime180.jsxs)(
|
|
9765
9682
|
SelectPrimitive.Root,
|
|
9766
9683
|
{
|
|
9767
9684
|
...rest,
|
|
@@ -9771,17 +9688,17 @@ var SelectRoot = (0, import_react18.forwardRef)((props, ref) => {
|
|
|
9771
9688
|
setIsOpen(open2);
|
|
9772
9689
|
},
|
|
9773
9690
|
children: [
|
|
9774
|
-
/* @__PURE__ */ (0,
|
|
9775
|
-
/* @__PURE__ */ (0,
|
|
9776
|
-
/* @__PURE__ */ (0,
|
|
9691
|
+
/* @__PURE__ */ (0, import_jsx_runtime180.jsxs)(SelectPrimitive.Trigger, { className: style_module_default15.trigger, ref, id, children: [
|
|
9692
|
+
/* @__PURE__ */ (0, import_jsx_runtime180.jsx)(SelectPrimitive.Value, { className: style_module_default15.placeholder, placeholder }),
|
|
9693
|
+
/* @__PURE__ */ (0, import_jsx_runtime180.jsx)(SelectPrimitive.Icon, { className: style_module_default15.openIcon, children: /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(Icon, { name: "arrow-drop-down", fill: true, thick: true, size: "xs" }) })
|
|
9777
9694
|
] }),
|
|
9778
|
-
/* @__PURE__ */ (0,
|
|
9695
|
+
/* @__PURE__ */ (0, import_jsx_runtime180.jsx)(SelectContent, { ...contentProps })
|
|
9779
9696
|
]
|
|
9780
9697
|
}
|
|
9781
9698
|
)
|
|
9782
9699
|
] });
|
|
9783
9700
|
});
|
|
9784
|
-
var SelectItem = /* @__PURE__ */ __name(({ value, text, disabled, icon, onClick }) => /* @__PURE__ */ (0,
|
|
9701
|
+
var SelectItem = /* @__PURE__ */ __name(({ value, text, disabled, icon, onClick }) => /* @__PURE__ */ (0, import_jsx_runtime180.jsxs)(
|
|
9785
9702
|
SelectPrimitive.Item,
|
|
9786
9703
|
{
|
|
9787
9704
|
className: style_module_default15.item,
|
|
@@ -9792,9 +9709,9 @@ var SelectItem = /* @__PURE__ */ __name(({ value, text, disabled, icon, onClick
|
|
|
9792
9709
|
onClick?.();
|
|
9793
9710
|
},
|
|
9794
9711
|
children: [
|
|
9795
|
-
/* @__PURE__ */ (0,
|
|
9796
|
-
icon && /* @__PURE__ */ (0,
|
|
9797
|
-
/* @__PURE__ */ (0,
|
|
9712
|
+
/* @__PURE__ */ (0, import_jsx_runtime180.jsx)(SelectPrimitive.ItemText, { children: /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(Paragraph, { size: 3, type: "normal", weight: "medium", children: text ?? value }) }),
|
|
9713
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(SelectPrimitive.Icon, { className: style_module_default15.icon, children: /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(Icon, { size: "xs", ...icon }) }),
|
|
9714
|
+
/* @__PURE__ */ (0, import_jsx_runtime180.jsx)(SelectPrimitive.ItemIndicator, { className: style_module_default15.itemIndicator, children: /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(Icon, { fill: false, thick: true, size: "xs", name: "check-mark", type: "brand-label-primary" }) })
|
|
9798
9715
|
]
|
|
9799
9716
|
}
|
|
9800
9717
|
), "SelectItem");
|
|
@@ -9810,18 +9727,18 @@ var style_module_default16 = {
|
|
|
9810
9727
|
};
|
|
9811
9728
|
|
|
9812
9729
|
// src/components/List/index.tsx
|
|
9813
|
-
var
|
|
9730
|
+
var import_react19 = require("react");
|
|
9814
9731
|
|
|
9815
9732
|
// src/hooks/collection.tsx
|
|
9816
|
-
var
|
|
9817
|
-
var
|
|
9818
|
-
var CollectionContext = (0,
|
|
9733
|
+
var import_react18 = require("react");
|
|
9734
|
+
var import_jsx_runtime181 = require("react/jsx-runtime");
|
|
9735
|
+
var CollectionContext = (0, import_react18.createContext)(void 0);
|
|
9819
9736
|
var CollectionProvider = /* @__PURE__ */ __name(({ value, onChangeValue, children }) => {
|
|
9820
|
-
const contextValue = (0,
|
|
9821
|
-
return /* @__PURE__ */ (0,
|
|
9737
|
+
const contextValue = (0, import_react18.useMemo)(() => ({ value, onChangeValue }), [value, onChangeValue]);
|
|
9738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(CollectionContext.Provider, { value: contextValue, children });
|
|
9822
9739
|
}, "CollectionProvider");
|
|
9823
9740
|
var useCollectionContext = /* @__PURE__ */ __name(() => {
|
|
9824
|
-
const context = (0,
|
|
9741
|
+
const context = (0, import_react18.useContext)(CollectionContext);
|
|
9825
9742
|
if (!context) {
|
|
9826
9743
|
throw new Error("useCollectionContext must be used within a CollectionProvider");
|
|
9827
9744
|
}
|
|
@@ -9830,16 +9747,16 @@ var useCollectionContext = /* @__PURE__ */ __name(() => {
|
|
|
9830
9747
|
|
|
9831
9748
|
// src/components/List/index.tsx
|
|
9832
9749
|
var import_clsx17 = __toESM(require("clsx"));
|
|
9833
|
-
var
|
|
9750
|
+
var import_jsx_runtime182 = require("react/jsx-runtime");
|
|
9834
9751
|
var ListRoot = /* @__PURE__ */ __name(({ children, className, ...props }) => {
|
|
9835
|
-
return /* @__PURE__ */ (0,
|
|
9752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(CollectionProvider, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime182.jsx)("ul", { className: (0, import_clsx17.default)(style_module_default16.list, className), children }) });
|
|
9836
9753
|
}, "ListRoot");
|
|
9837
9754
|
var Item3 = /* @__PURE__ */ __name(({ value, text, disabled, icon, onClick }) => {
|
|
9838
|
-
const [isFocused, setIsFocused] = (0,
|
|
9755
|
+
const [isFocused, setIsFocused] = (0, import_react19.useState)(false);
|
|
9839
9756
|
const { value: contextValue, onChangeValue } = useCollectionContext();
|
|
9840
9757
|
const isSelected = contextValue === value;
|
|
9841
9758
|
const iconProps = isSelected ? { name: "check-mark", type: "brand-label-primary", thick: true } : icon ? icon : {};
|
|
9842
|
-
return /* @__PURE__ */ (0,
|
|
9759
|
+
return /* @__PURE__ */ (0, import_jsx_runtime182.jsxs)(
|
|
9843
9760
|
"li",
|
|
9844
9761
|
{
|
|
9845
9762
|
className: style_module_default16.item,
|
|
@@ -9857,8 +9774,8 @@ var Item3 = /* @__PURE__ */ __name(({ value, text, disabled, icon, onClick }) =>
|
|
|
9857
9774
|
onChangeValue?.(value);
|
|
9858
9775
|
},
|
|
9859
9776
|
children: [
|
|
9860
|
-
/* @__PURE__ */ (0,
|
|
9861
|
-
(icon || isSelected) && /* @__PURE__ */ (0,
|
|
9777
|
+
/* @__PURE__ */ (0, import_jsx_runtime182.jsx)(Paragraph, { size: 3, type: "normal", weight: "medium", children: text }),
|
|
9778
|
+
(icon || isSelected) && /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(Icon, { className: style_module_default16.icon, size: "xs", ...iconProps })
|
|
9862
9779
|
]
|
|
9863
9780
|
}
|
|
9864
9781
|
);
|