@liner-fe/prism 2.1.40 → 2.1.41
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/index.cjs +432 -297
- package/lib/index.cjs.map +4 -4
- package/lib/index.css +163 -73
- package/lib/index.css.map +3 -3
- package/lib/index.d.ts +1 -0
- package/lib/index.mjs +419 -284
- package/lib/index.mjs.map +4 -4
- package/package.json +1 -1
package/lib/index.cjs
CHANGED
|
@@ -45,6 +45,7 @@ __export(index_exports, {
|
|
|
45
45
|
Media: () => Media,
|
|
46
46
|
MediaContextProvider: () => MediaContextProvider,
|
|
47
47
|
Paragraph: () => Paragraph,
|
|
48
|
+
Popover: () => Popover,
|
|
48
49
|
Radio: () => Radio,
|
|
49
50
|
Select: () => Select,
|
|
50
51
|
Slider: () => Slider,
|
|
@@ -8555,36 +8556,279 @@ var Typography = /* @__PURE__ */ __name((props) => {
|
|
|
8555
8556
|
);
|
|
8556
8557
|
}, "Typography");
|
|
8557
8558
|
|
|
8559
|
+
// src/components/Popover/index.tsx
|
|
8560
|
+
var React3 = __toESM(require("react"));
|
|
8561
|
+
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
|
8562
|
+
|
|
8563
|
+
// src/components/Popover/style.module.scss
|
|
8564
|
+
var style_module_default6 = {
|
|
8565
|
+
"content": "_content_1pzw3_1",
|
|
8566
|
+
"anchor": "_anchor_1pzw3_7",
|
|
8567
|
+
"primary": "_primary_1pzw3_10",
|
|
8568
|
+
"secondary": "_secondary_1pzw3_16",
|
|
8569
|
+
"contentContainer": "_contentContainer_1pzw3_31",
|
|
8570
|
+
"heading": "_heading_1pzw3_39",
|
|
8571
|
+
"tag": "_tag_1pzw3_45",
|
|
8572
|
+
"title": "_title_1pzw3_56",
|
|
8573
|
+
"description": "_description_1pzw3_61",
|
|
8574
|
+
"footer": "_footer_1pzw3_67",
|
|
8575
|
+
"arrow": "_arrow_1pzw3_73",
|
|
8576
|
+
"closeButton": "_closeButton_1pzw3_77",
|
|
8577
|
+
"overlay": "_overlay_1pzw3_89"
|
|
8578
|
+
};
|
|
8579
|
+
|
|
8580
|
+
// src/components/Popover/index.tsx
|
|
8581
|
+
var import_cva6 = require("cva");
|
|
8582
|
+
var import_clsx9 = require("clsx");
|
|
8583
|
+
|
|
8584
|
+
// src/components/TextButton/index.tsx
|
|
8585
|
+
var import_cva5 = require("cva");
|
|
8586
|
+
|
|
8587
|
+
// src/components/TextButton/style.module.scss
|
|
8588
|
+
var style_module_default7 = {
|
|
8589
|
+
"button": "_button_geax8_1",
|
|
8590
|
+
"text": "_text_geax8_27",
|
|
8591
|
+
"size-m": "_size-m_geax8_34",
|
|
8592
|
+
"size-s": "_size-s_geax8_37",
|
|
8593
|
+
"primary": "_primary_geax8_40",
|
|
8594
|
+
"secondary": "_secondary_geax8_44",
|
|
8595
|
+
"tertiary": "_tertiary_geax8_48",
|
|
8596
|
+
"inverse": "_inverse_geax8_52",
|
|
8597
|
+
"inverse-static": "_inverse-static_geax8_56",
|
|
8598
|
+
"thick": "_thick_geax8_61",
|
|
8599
|
+
"underline": "_underline_geax8_65",
|
|
8600
|
+
"text-children": "_text-children_geax8_70"
|
|
8601
|
+
};
|
|
8602
|
+
|
|
8603
|
+
// src/components/TextButton/index.tsx
|
|
8604
|
+
var import_react10 = require("react");
|
|
8605
|
+
var import_clsx8 = __toESM(require("clsx"));
|
|
8606
|
+
var import_jsx_runtime165 = require("react/jsx-runtime");
|
|
8607
|
+
var textButtonLevelIconTypeMap = {
|
|
8608
|
+
primary: "brand-label-primary",
|
|
8609
|
+
secondary: "neutral-label-primary",
|
|
8610
|
+
tertiary: "neutral-label-secondary",
|
|
8611
|
+
inverse: "inverse-label-primary",
|
|
8612
|
+
"inverse-static": "inverse-label-static-primary"
|
|
8613
|
+
};
|
|
8614
|
+
var textButtonLevelIconFillTypeMap = {
|
|
8615
|
+
primary: "inverse-label-static-primary",
|
|
8616
|
+
secondary: "inverse-label-secondary",
|
|
8617
|
+
tertiary: "inverse-label-secondary",
|
|
8618
|
+
inverse: "neutral-label-primary",
|
|
8619
|
+
"inverse-static": "neutral-label-static-primary"
|
|
8620
|
+
};
|
|
8621
|
+
var textButtonVariants = (0, import_cva5.cva)({
|
|
8622
|
+
base: [style_module_default7.button, style_module_default7.text],
|
|
8623
|
+
variants: {
|
|
8624
|
+
level: {
|
|
8625
|
+
primary: [style_module_default7["primary"], "lp-sys-typo-caption1-normal-medium"],
|
|
8626
|
+
secondary: [style_module_default7["secondary"], "lp-sys-typo-caption1-normal-medium"],
|
|
8627
|
+
tertiary: [style_module_default7["tertiary"], "lp-sys-typo-caption1-normal-medium"],
|
|
8628
|
+
inverse: [style_module_default7["inverse"], "lp-sys-typo-caption1-normal-medium"],
|
|
8629
|
+
"inverse-static": [style_module_default7["inverse-static"], "lp-sys-typo-caption1-normal-medium"]
|
|
8630
|
+
},
|
|
8631
|
+
size: {
|
|
8632
|
+
m: style_module_default7["size-m"],
|
|
8633
|
+
s: style_module_default7["size-s"]
|
|
8634
|
+
},
|
|
8635
|
+
thick: {
|
|
8636
|
+
true: style_module_default7.thick
|
|
8637
|
+
},
|
|
8638
|
+
underline: {
|
|
8639
|
+
true: style_module_default7.underline
|
|
8640
|
+
}
|
|
8641
|
+
}
|
|
8642
|
+
});
|
|
8643
|
+
var TextButton = (0, import_react10.forwardRef)(
|
|
8644
|
+
({
|
|
8645
|
+
level = "primary",
|
|
8646
|
+
thick = false,
|
|
8647
|
+
underline = false,
|
|
8648
|
+
size = "m",
|
|
8649
|
+
asChild = false,
|
|
8650
|
+
leftIcon,
|
|
8651
|
+
rightIcon,
|
|
8652
|
+
className,
|
|
8653
|
+
children,
|
|
8654
|
+
...rest
|
|
8655
|
+
}, ref) => {
|
|
8656
|
+
const getIconProps = /* @__PURE__ */ __name((icon) => ({
|
|
8657
|
+
size: size === "m" ? "s" : "xs",
|
|
8658
|
+
thick: true,
|
|
8659
|
+
type: textButtonLevelIconTypeMap[level],
|
|
8660
|
+
fillType: textButtonLevelIconFillTypeMap[level],
|
|
8661
|
+
...icon
|
|
8662
|
+
}), "getIconProps");
|
|
8663
|
+
const renderContent = /* @__PURE__ */ __name((children2) => /* @__PURE__ */ (0, import_jsx_runtime165.jsxs)("span", { className: style_module_default7["text-children"], children: [
|
|
8664
|
+
leftIcon && /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(Icon, { ...getIconProps(leftIcon) }),
|
|
8665
|
+
/* @__PURE__ */ (0, import_jsx_runtime165.jsx)("p", { children: children2 }),
|
|
8666
|
+
rightIcon && /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(Icon, { ...getIconProps(rightIcon) })
|
|
8667
|
+
] }), "renderContent");
|
|
8668
|
+
if (asChild) {
|
|
8669
|
+
const parent = import_react10.Children.only(children);
|
|
8670
|
+
return (0, import_react10.cloneElement)(
|
|
8671
|
+
parent,
|
|
8672
|
+
{
|
|
8673
|
+
...rest,
|
|
8674
|
+
className: (0, import_clsx8.default)(textButtonVariants({ level, thick, underline, size }), className),
|
|
8675
|
+
ref
|
|
8676
|
+
},
|
|
8677
|
+
renderContent(parent.props.children)
|
|
8678
|
+
);
|
|
8679
|
+
}
|
|
8680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(
|
|
8681
|
+
"button",
|
|
8682
|
+
{
|
|
8683
|
+
className: (0, import_clsx8.default)(textButtonVariants({ level, thick, underline, size }), className),
|
|
8684
|
+
ref,
|
|
8685
|
+
...rest,
|
|
8686
|
+
children: renderContent(children)
|
|
8687
|
+
}
|
|
8688
|
+
);
|
|
8689
|
+
}
|
|
8690
|
+
);
|
|
8691
|
+
TextButton.displayName = "TextButton";
|
|
8692
|
+
|
|
8693
|
+
// src/components/Popover/index.tsx
|
|
8694
|
+
var import_jsx_runtime166 = require("react/jsx-runtime");
|
|
8695
|
+
var DEFAULT_OFFSET = -6;
|
|
8696
|
+
var popoverVariants = (0, import_cva6.cva)({
|
|
8697
|
+
base: style_module_default6.content,
|
|
8698
|
+
variants: {
|
|
8699
|
+
level: {
|
|
8700
|
+
primary: style_module_default6.primary,
|
|
8701
|
+
secondary: style_module_default6.secondary
|
|
8702
|
+
}
|
|
8703
|
+
}
|
|
8704
|
+
});
|
|
8705
|
+
var popoverAnchorVariants = (0, import_cva6.cva)({
|
|
8706
|
+
base: style_module_default6.anchor,
|
|
8707
|
+
variants: {
|
|
8708
|
+
level: {
|
|
8709
|
+
primary: style_module_default6.primary,
|
|
8710
|
+
secondary: style_module_default6.secondary
|
|
8711
|
+
}
|
|
8712
|
+
}
|
|
8713
|
+
});
|
|
8714
|
+
var popoverTagVariants = (0, import_cva6.cva)({ base: [style_module_default6.tag, "lp-sys-typo-caption3-normal-bold"] });
|
|
8715
|
+
var popoverTitleVariants = (0, import_cva6.cva)({ base: [style_module_default6.title, "lp-sys-typo-paragraph3-normal-bold"] });
|
|
8716
|
+
var popoverDescriptionVariants = (0, import_cva6.cva)({ base: [style_module_default6.description, "lp-sys-typo-caption1-normal-regular"] });
|
|
8717
|
+
var popoverFooterVariants = (0, import_cva6.cva)({ base: [style_module_default6.footer, "lp-sys-typo-caption1-normal-medium"] });
|
|
8718
|
+
var PopoverRoot = /* @__PURE__ */ __name(({ isOpen, children, onChange }) => /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(PopoverPrimitive.Root, { open: isOpen, onOpenChange: onChange, children }), "PopoverRoot");
|
|
8719
|
+
var PopoverTrigger = /* @__PURE__ */ __name(({ by }) => /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(PopoverPrimitive.Trigger, { asChild: true, children: by }), "PopoverTrigger");
|
|
8720
|
+
var PopoverAnchor = /* @__PURE__ */ __name(({ className }) => /* @__PURE__ */ (0, import_jsx_runtime166.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_runtime166.jsx)(
|
|
8721
|
+
"path",
|
|
8722
|
+
{
|
|
8723
|
+
fillRule: "evenodd",
|
|
8724
|
+
clipRule: "evenodd",
|
|
8725
|
+
d: "M0 9.9985C1.09308 9.9985 2.18584 10.005 3.27892 9.99081C4.32509 9.97696 5.49602 9.95734 6.51412 9.49459C7.6139 8.99453 8.34198 8.1202 9.07453 7.09123C9.60193 6.35114 10.6379 4.77211 11.1423 4.00971C11.5552 3.38463 12.3633 2.1491 12.8046 1.55134C13.3601 0.799326 14.0467 0 15.0003 0C15.954 0 16.6403 0.799326 17.1954 1.55057C17.6367 2.14795 18.4448 3.38425 18.858 4.00894C19.3618 4.77134 20.3978 6.35037 20.9255 7.09046C21.6593 8.11943 22.3861 8.99377 23.4856 9.49382C24.504 9.95542 25.6752 9.97619 26.7208 9.99004C27.8142 10.0043 28.9069 9.99773 30 9.99773",
|
|
8726
|
+
fill: "none"
|
|
8727
|
+
}
|
|
8728
|
+
) }), "PopoverAnchor");
|
|
8729
|
+
var PopoverContent = React3.forwardRef(
|
|
8730
|
+
({
|
|
8731
|
+
level = "primary",
|
|
8732
|
+
position = "top",
|
|
8733
|
+
align = "center",
|
|
8734
|
+
tag,
|
|
8735
|
+
icon,
|
|
8736
|
+
title,
|
|
8737
|
+
description,
|
|
8738
|
+
confirmText,
|
|
8739
|
+
isOverlay = false,
|
|
8740
|
+
onConfirm,
|
|
8741
|
+
onClose,
|
|
8742
|
+
onPointerDownOutside,
|
|
8743
|
+
className,
|
|
8744
|
+
children,
|
|
8745
|
+
container,
|
|
8746
|
+
...props
|
|
8747
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(PopoverPrimitive.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime166.jsxs)(import_jsx_runtime166.Fragment, { children: [
|
|
8748
|
+
/* @__PURE__ */ (0, import_jsx_runtime166.jsxs)(
|
|
8749
|
+
PopoverPrimitive.Content,
|
|
8750
|
+
{
|
|
8751
|
+
ref,
|
|
8752
|
+
align,
|
|
8753
|
+
side: position,
|
|
8754
|
+
sideOffset: DEFAULT_OFFSET,
|
|
8755
|
+
onPointerDownOutside,
|
|
8756
|
+
className: (0, import_clsx9.clsx)(popoverVariants({ level }), className),
|
|
8757
|
+
...props,
|
|
8758
|
+
children: [
|
|
8759
|
+
/* @__PURE__ */ (0, import_jsx_runtime166.jsxs)("div", { className: style_module_default6.contentContainer, children: [
|
|
8760
|
+
(tag || icon || onClose) && /* @__PURE__ */ (0, import_jsx_runtime166.jsxs)("div", { className: style_module_default6.heading, children: [
|
|
8761
|
+
tag && /* @__PURE__ */ (0, import_jsx_runtime166.jsx)("span", { className: popoverTagVariants(), children: tag }),
|
|
8762
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(Icon, { name: icon.name, size: "xs", thick: icon.thick, fill: icon.fill }),
|
|
8763
|
+
/* @__PURE__ */ (0, import_jsx_runtime166.jsx)("p", { className: popoverTitleVariants(), children: title }),
|
|
8764
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
|
|
8765
|
+
PopoverPrimitive.PopoverClose,
|
|
8766
|
+
{
|
|
8767
|
+
className: style_module_default6.closeButton,
|
|
8768
|
+
onClick: () => {
|
|
8769
|
+
onClose();
|
|
8770
|
+
},
|
|
8771
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(Icon, { name: "close-fill", size: "s", fill: true, thick: true, type: "neutral-label-static-primary" })
|
|
8772
|
+
}
|
|
8773
|
+
)
|
|
8774
|
+
] }),
|
|
8775
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime166.jsx)("p", { className: popoverDescriptionVariants(), children: description }),
|
|
8776
|
+
onConfirm && /* @__PURE__ */ (0, import_jsx_runtime166.jsx)("div", { className: popoverFooterVariants(), children: /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
|
|
8777
|
+
TextButton,
|
|
8778
|
+
{
|
|
8779
|
+
level: "inverse-static",
|
|
8780
|
+
onClick: () => {
|
|
8781
|
+
onConfirm?.();
|
|
8782
|
+
},
|
|
8783
|
+
children: confirmText
|
|
8784
|
+
}
|
|
8785
|
+
) }),
|
|
8786
|
+
children
|
|
8787
|
+
] }),
|
|
8788
|
+
/* @__PURE__ */ (0, import_jsx_runtime166.jsx)(PopoverPrimitive.Arrow, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(PopoverAnchor, { className: (0, import_clsx9.clsx)(popoverAnchorVariants({ level })) }) })
|
|
8789
|
+
]
|
|
8790
|
+
}
|
|
8791
|
+
),
|
|
8792
|
+
isOverlay && /* @__PURE__ */ (0, import_jsx_runtime166.jsx)("div", { "data-radix-popper-overlay": true, className: style_module_default6.overlay })
|
|
8793
|
+
] }) })
|
|
8794
|
+
);
|
|
8795
|
+
var Popover = Object.assign(PopoverRoot, {
|
|
8796
|
+
Trigger: PopoverTrigger,
|
|
8797
|
+
Content: PopoverContent,
|
|
8798
|
+
Arrow: PopoverPrimitive.Arrow,
|
|
8799
|
+
Close: PopoverPrimitive.Close
|
|
8800
|
+
});
|
|
8801
|
+
|
|
8558
8802
|
// src/components/Tooltip/index.tsx
|
|
8559
8803
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
|
8560
|
-
var
|
|
8804
|
+
var import_react11 = require("react");
|
|
8561
8805
|
|
|
8562
8806
|
// src/components/Tooltip/style.module.scss
|
|
8563
|
-
var
|
|
8807
|
+
var style_module_default8 = {
|
|
8564
8808
|
"tooltip": "_tooltip_1v61q_1",
|
|
8565
8809
|
"tooltipContent": "_tooltipContent_1v61q_10"
|
|
8566
8810
|
};
|
|
8567
8811
|
|
|
8568
8812
|
// src/components/Tooltip/index.tsx
|
|
8569
|
-
var
|
|
8570
|
-
var
|
|
8571
|
-
var
|
|
8572
|
-
var
|
|
8573
|
-
var tooltipVariants = (0,
|
|
8813
|
+
var import_cva7 = require("cva");
|
|
8814
|
+
var import_clsx10 = __toESM(require("clsx"));
|
|
8815
|
+
var import_jsx_runtime167 = require("react/jsx-runtime");
|
|
8816
|
+
var DEFAULT_OFFSET2 = "medium";
|
|
8817
|
+
var tooltipVariants = (0, import_cva7.cva)({ base: [style_module_default8.tooltip, "lp-sys-typo-caption1-normal-medium"] });
|
|
8574
8818
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
8575
|
-
var TooltipRoot = /* @__PURE__ */ __name(({ children, ...props }) => /* @__PURE__ */ (0,
|
|
8576
|
-
var TooltipTrigger = /* @__PURE__ */ __name(({ by }) => /* @__PURE__ */ (0,
|
|
8577
|
-
var TooltipContent = (0,
|
|
8578
|
-
({ description, position = "top", className, offset =
|
|
8819
|
+
var TooltipRoot = /* @__PURE__ */ __name(({ children, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(TooltipPrimitive.Root, { delayDuration: 0, ...props, children }), "TooltipRoot");
|
|
8820
|
+
var TooltipTrigger = /* @__PURE__ */ __name(({ by }) => /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(TooltipPrimitive.Trigger, { asChild: true, children: by }), "TooltipTrigger");
|
|
8821
|
+
var TooltipContent = (0, import_react11.forwardRef)(
|
|
8822
|
+
({ description, position = "top", className, offset = DEFAULT_OFFSET2, collisionPadding, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
|
|
8579
8823
|
TooltipPrimitive.Content,
|
|
8580
8824
|
{
|
|
8581
8825
|
ref,
|
|
8582
8826
|
side: position,
|
|
8583
8827
|
sideOffset: offset === "medium" ? 4 : 8,
|
|
8584
8828
|
collisionPadding,
|
|
8585
|
-
className: (0,
|
|
8829
|
+
className: (0, import_clsx10.default)(tooltipVariants(), className),
|
|
8586
8830
|
...props,
|
|
8587
|
-
children: /* @__PURE__ */ (0,
|
|
8831
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime167.jsx)("p", { className: style_module_default8.tooltipContent, children: description })
|
|
8588
8832
|
}
|
|
8589
8833
|
)
|
|
8590
8834
|
);
|
|
@@ -8595,12 +8839,12 @@ var Tooltip = Object.assign(TooltipRoot, {
|
|
|
8595
8839
|
});
|
|
8596
8840
|
|
|
8597
8841
|
// src/components/IconButton/index.tsx
|
|
8598
|
-
var
|
|
8599
|
-
var
|
|
8600
|
-
var
|
|
8842
|
+
var import_cva8 = require("cva");
|
|
8843
|
+
var import_react12 = require("react");
|
|
8844
|
+
var import_clsx11 = __toESM(require("clsx"));
|
|
8601
8845
|
|
|
8602
8846
|
// src/components/IconButton/style.module.scss
|
|
8603
|
-
var
|
|
8847
|
+
var style_module_default9 = {
|
|
8604
8848
|
"iconButton": "_iconButton_6ezo4_1",
|
|
8605
8849
|
"primary": "_primary_6ezo4_14",
|
|
8606
8850
|
"secondary": "_secondary_6ezo4_27",
|
|
@@ -8619,7 +8863,7 @@ var style_module_default7 = {
|
|
|
8619
8863
|
|
|
8620
8864
|
// src/components/IconButton/index.tsx
|
|
8621
8865
|
var import_react_slot = require("@radix-ui/react-slot");
|
|
8622
|
-
var
|
|
8866
|
+
var import_jsx_runtime168 = require("react/jsx-runtime");
|
|
8623
8867
|
var iconButtonSizeIconSizeMap = {
|
|
8624
8868
|
l: "m",
|
|
8625
8869
|
m: "s",
|
|
@@ -8665,32 +8909,32 @@ var iconButtonLevelIconTypeMap = {
|
|
|
8665
8909
|
"inverse-static": "inverse-label-static-primary"
|
|
8666
8910
|
}
|
|
8667
8911
|
};
|
|
8668
|
-
var iconButtonVariants = (0,
|
|
8669
|
-
base: [
|
|
8912
|
+
var iconButtonVariants = (0, import_cva8.cva)({
|
|
8913
|
+
base: [style_module_default9.iconButton],
|
|
8670
8914
|
variants: {
|
|
8671
8915
|
level: {
|
|
8672
|
-
primary:
|
|
8673
|
-
secondary:
|
|
8674
|
-
tertiary:
|
|
8675
|
-
quaternary:
|
|
8676
|
-
negative:
|
|
8677
|
-
static:
|
|
8678
|
-
inverse:
|
|
8679
|
-
"inverse-static":
|
|
8916
|
+
primary: style_module_default9.primary,
|
|
8917
|
+
secondary: style_module_default9.secondary,
|
|
8918
|
+
tertiary: style_module_default9.tertiary,
|
|
8919
|
+
quaternary: style_module_default9.quaternary,
|
|
8920
|
+
negative: style_module_default9.negative,
|
|
8921
|
+
static: style_module_default9.static,
|
|
8922
|
+
inverse: style_module_default9.inverse,
|
|
8923
|
+
"inverse-static": style_module_default9["inverse-static"]
|
|
8680
8924
|
},
|
|
8681
8925
|
size: {
|
|
8682
|
-
l:
|
|
8683
|
-
m:
|
|
8684
|
-
s:
|
|
8685
|
-
xs:
|
|
8926
|
+
l: style_module_default9.l,
|
|
8927
|
+
m: style_module_default9.m,
|
|
8928
|
+
s: style_module_default9.s,
|
|
8929
|
+
xs: style_module_default9.xs
|
|
8686
8930
|
},
|
|
8687
8931
|
fill: {
|
|
8688
8932
|
true: void 0,
|
|
8689
|
-
false:
|
|
8933
|
+
false: style_module_default9.ghost
|
|
8690
8934
|
}
|
|
8691
8935
|
}
|
|
8692
8936
|
});
|
|
8693
|
-
var IconButton = (0,
|
|
8937
|
+
var IconButton = (0, import_react12.forwardRef)(
|
|
8694
8938
|
({
|
|
8695
8939
|
asChild,
|
|
8696
8940
|
level = "primary",
|
|
@@ -8703,16 +8947,16 @@ var IconButton = (0, import_react11.forwardRef)(
|
|
|
8703
8947
|
...rest
|
|
8704
8948
|
}, ref) => {
|
|
8705
8949
|
const Comp = asChild ? import_react_slot.Slot : "button";
|
|
8706
|
-
return /* @__PURE__ */ (0,
|
|
8950
|
+
return /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
|
|
8707
8951
|
Comp,
|
|
8708
8952
|
{
|
|
8709
8953
|
...rest,
|
|
8710
|
-
className: (0,
|
|
8954
|
+
className: (0, import_clsx11.default)(iconButtonVariants({ level, size, fill }), className),
|
|
8711
8955
|
ref,
|
|
8712
8956
|
disabled: disabled && !isLoading,
|
|
8713
8957
|
"aria-label": icon.name,
|
|
8714
8958
|
role: "button",
|
|
8715
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
8959
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(Loading, { size: iconButtonLoadingSizeMap[size], level: iconButtonLoadingLevelMap[level] }) : /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
|
|
8716
8960
|
Icon,
|
|
8717
8961
|
{
|
|
8718
8962
|
size: iconButtonSizeIconSizeMap[size],
|
|
@@ -8730,7 +8974,7 @@ IconButton.displayName = "IconButton";
|
|
|
8730
8974
|
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
|
|
8731
8975
|
|
|
8732
8976
|
// src/components/CheckBox/style.module.scss
|
|
8733
|
-
var
|
|
8977
|
+
var style_module_default10 = {
|
|
8734
8978
|
"checkbox": "_checkbox_24vda_1",
|
|
8735
8979
|
"checkbox-indicator": "_checkbox-indicator_24vda_39",
|
|
8736
8980
|
"label-wrapper": "_label-wrapper_24vda_47",
|
|
@@ -8738,16 +8982,16 @@ var style_module_default8 = {
|
|
|
8738
8982
|
};
|
|
8739
8983
|
|
|
8740
8984
|
// src/components/CheckBox/index.tsx
|
|
8741
|
-
var
|
|
8742
|
-
var
|
|
8985
|
+
var import_react14 = require("react");
|
|
8986
|
+
var import_clsx13 = __toESM(require("clsx"));
|
|
8743
8987
|
|
|
8744
8988
|
// src/components/Label/index.tsx
|
|
8745
|
-
var
|
|
8989
|
+
var import_react13 = require("react");
|
|
8746
8990
|
var LabelPrimitive = __toESM(require("@radix-ui/react-label"));
|
|
8747
|
-
var
|
|
8991
|
+
var import_clsx12 = __toESM(require("clsx"));
|
|
8748
8992
|
|
|
8749
8993
|
// src/components/Label/style.module.scss
|
|
8750
|
-
var
|
|
8994
|
+
var style_module_default11 = {
|
|
8751
8995
|
"label": "_label_18fu8_1",
|
|
8752
8996
|
"error": "_error_18fu8_15",
|
|
8753
8997
|
"primary": "_primary_18fu8_19",
|
|
@@ -8764,38 +9008,38 @@ var style_module_default9 = {
|
|
|
8764
9008
|
};
|
|
8765
9009
|
|
|
8766
9010
|
// src/components/Label/index.tsx
|
|
8767
|
-
var
|
|
8768
|
-
var
|
|
8769
|
-
var defaultLabelVariants = (0,
|
|
8770
|
-
base: ["lp-sys-typo-paragraph2-normal-medium",
|
|
9011
|
+
var import_cva9 = require("cva");
|
|
9012
|
+
var import_jsx_runtime169 = require("react/jsx-runtime");
|
|
9013
|
+
var defaultLabelVariants = (0, import_cva9.cva)({
|
|
9014
|
+
base: ["lp-sys-typo-paragraph2-normal-medium", style_module_default11.label],
|
|
8771
9015
|
variants: {
|
|
8772
9016
|
level: {
|
|
8773
|
-
primary:
|
|
8774
|
-
secondary:
|
|
9017
|
+
primary: style_module_default11.primary,
|
|
9018
|
+
secondary: style_module_default11.secondary
|
|
8775
9019
|
},
|
|
8776
9020
|
position: {
|
|
8777
|
-
top:
|
|
8778
|
-
right:
|
|
9021
|
+
top: style_module_default11.top,
|
|
9022
|
+
right: style_module_default11.right
|
|
8779
9023
|
},
|
|
8780
9024
|
size: {
|
|
8781
|
-
l: ["lp-sys-typo-paragraph3-normal-bold",
|
|
8782
|
-
m: ["lp-sys-typo-caption1-normal-medium",
|
|
8783
|
-
s: ["lp-sys-typo-caption2-normal-medium",
|
|
9025
|
+
l: ["lp-sys-typo-paragraph3-normal-bold", style_module_default11.l],
|
|
9026
|
+
m: ["lp-sys-typo-caption1-normal-medium", style_module_default11.m],
|
|
9027
|
+
s: ["lp-sys-typo-caption2-normal-medium", style_module_default11.s]
|
|
8784
9028
|
},
|
|
8785
9029
|
offset: {
|
|
8786
|
-
high:
|
|
8787
|
-
medium:
|
|
8788
|
-
low:
|
|
9030
|
+
high: style_module_default11["offset-high"],
|
|
9031
|
+
medium: style_module_default11["offset-medium"],
|
|
9032
|
+
low: style_module_default11["offset-low"]
|
|
8789
9033
|
},
|
|
8790
9034
|
disabled: {
|
|
8791
|
-
true:
|
|
9035
|
+
true: style_module_default11.disabled
|
|
8792
9036
|
},
|
|
8793
9037
|
error: {
|
|
8794
|
-
true:
|
|
9038
|
+
true: style_module_default11.error
|
|
8795
9039
|
}
|
|
8796
9040
|
}
|
|
8797
9041
|
});
|
|
8798
|
-
var Label = (0,
|
|
9042
|
+
var Label = (0, import_react13.forwardRef)(
|
|
8799
9043
|
({
|
|
8800
9044
|
className,
|
|
8801
9045
|
level = "primary",
|
|
@@ -8806,11 +9050,11 @@ var Label = (0, import_react12.forwardRef)(
|
|
|
8806
9050
|
error = false,
|
|
8807
9051
|
...props
|
|
8808
9052
|
}, ref) => {
|
|
8809
|
-
return /* @__PURE__ */ (0,
|
|
9053
|
+
return /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
|
|
8810
9054
|
LabelPrimitive.Root,
|
|
8811
9055
|
{
|
|
8812
9056
|
ref,
|
|
8813
|
-
className: (0,
|
|
9057
|
+
className: (0, import_clsx12.default)(
|
|
8814
9058
|
defaultLabelVariants({ level, position, size, offset, disabled, error }),
|
|
8815
9059
|
className
|
|
8816
9060
|
),
|
|
@@ -8822,27 +9066,27 @@ var Label = (0, import_react12.forwardRef)(
|
|
|
8822
9066
|
Label.displayName = "Label";
|
|
8823
9067
|
|
|
8824
9068
|
// src/components/CheckBox/index.tsx
|
|
8825
|
-
var
|
|
8826
|
-
var Checkbox = (0,
|
|
9069
|
+
var import_jsx_runtime170 = require("react/jsx-runtime");
|
|
9070
|
+
var Checkbox = (0, import_react14.forwardRef)(
|
|
8827
9071
|
({ className, label, description, ...props }, ref) => {
|
|
8828
|
-
const CheckboxWrapper = /* @__PURE__ */ __name(({ children }) => label ? /* @__PURE__ */ (0,
|
|
8829
|
-
/* @__PURE__ */ (0,
|
|
9072
|
+
const CheckboxWrapper = /* @__PURE__ */ __name(({ children }) => label ? /* @__PURE__ */ (0, import_jsx_runtime170.jsxs)(Label, { position: "right", htmlFor: props.id, children: [
|
|
9073
|
+
/* @__PURE__ */ (0, import_jsx_runtime170.jsxs)("div", { className: style_module_default10["label-wrapper"], children: [
|
|
8830
9074
|
label,
|
|
8831
|
-
/* @__PURE__ */ (0,
|
|
9075
|
+
/* @__PURE__ */ (0, import_jsx_runtime170.jsx)(Paragraph, { className: style_module_default10.description, size: 3, type: "normal", weight: "regular", children: description })
|
|
8832
9076
|
] }),
|
|
8833
9077
|
children
|
|
8834
|
-
] }) : /* @__PURE__ */ (0,
|
|
8835
|
-
return /* @__PURE__ */ (0,
|
|
9078
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(import_jsx_runtime170.Fragment, { children }), "CheckboxWrapper");
|
|
9079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(CheckboxWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(CheckboxPrimitive.Root, { className: (0, import_clsx13.default)(style_module_default10.checkbox, className), ref, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(CheckboxPrimitive.Indicator, { className: style_module_default10["checkbox-indicator"], children: /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(Icon, { name: "check-mark", thick: true, size: "xs", type: "inverse-label-primary" }) }) }) });
|
|
8836
9080
|
}
|
|
8837
9081
|
);
|
|
8838
9082
|
|
|
8839
9083
|
// src/components/Radio/index.tsx
|
|
8840
9084
|
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"));
|
|
8841
|
-
var
|
|
8842
|
-
var
|
|
9085
|
+
var import_clsx14 = __toESM(require("clsx"));
|
|
9086
|
+
var import_react15 = require("react");
|
|
8843
9087
|
|
|
8844
9088
|
// src/components/Radio/style.module.scss
|
|
8845
|
-
var
|
|
9089
|
+
var style_module_default12 = {
|
|
8846
9090
|
"radio-item": "_radio-item_184np_1",
|
|
8847
9091
|
"indicator": "_indicator_184np_44",
|
|
8848
9092
|
"label-wrapper": "_label-wrapper_184np_50",
|
|
@@ -8850,27 +9094,27 @@ var style_module_default10 = {
|
|
|
8850
9094
|
};
|
|
8851
9095
|
|
|
8852
9096
|
// src/components/Radio/index.tsx
|
|
8853
|
-
var
|
|
8854
|
-
var RadioIndicator = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0,
|
|
8855
|
-
var RadioRoot = (0,
|
|
9097
|
+
var import_jsx_runtime171 = require("react/jsx-runtime");
|
|
9098
|
+
var RadioIndicator = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0, import_jsx_runtime171.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_runtime171.jsx)("circle", { cx: "5", cy: "5", r: "5", fill: "#313133" }) }), "RadioIndicator");
|
|
9099
|
+
var RadioRoot = (0, import_react15.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(RadioGroupPrimitive.Root, { ref, className, ...props }));
|
|
8856
9100
|
RadioRoot.displayName = "RadioRoot";
|
|
8857
|
-
var RadioItem = (0,
|
|
9101
|
+
var RadioItem = (0, import_react15.forwardRef)(
|
|
8858
9102
|
({ className, label, description, ...props }, ref) => {
|
|
8859
|
-
const RadioItemWrapper = /* @__PURE__ */ __name(({ children }) => label ? /* @__PURE__ */ (0,
|
|
8860
|
-
/* @__PURE__ */ (0,
|
|
9103
|
+
const RadioItemWrapper = /* @__PURE__ */ __name(({ children }) => label ? /* @__PURE__ */ (0, import_jsx_runtime171.jsxs)(Label, { position: "right", children: [
|
|
9104
|
+
/* @__PURE__ */ (0, import_jsx_runtime171.jsxs)("div", { className: style_module_default12["label-wrapper"], children: [
|
|
8861
9105
|
label,
|
|
8862
|
-
description && /* @__PURE__ */ (0,
|
|
9106
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(Paragraph, { className: style_module_default12.description, size: 3, type: "normal", weight: "regular", children: description })
|
|
8863
9107
|
] }),
|
|
8864
9108
|
children
|
|
8865
|
-
] }) : /* @__PURE__ */ (0,
|
|
8866
|
-
return /* @__PURE__ */ (0,
|
|
9109
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(import_jsx_runtime171.Fragment, { children }), "RadioItemWrapper");
|
|
9110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(RadioItemWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
|
|
8867
9111
|
RadioGroupPrimitive.Item,
|
|
8868
9112
|
{
|
|
8869
9113
|
ref,
|
|
8870
|
-
className: (0,
|
|
9114
|
+
className: (0, import_clsx14.default)(style_module_default12["radio-item"], className),
|
|
8871
9115
|
...props,
|
|
8872
9116
|
"aria-label": label,
|
|
8873
|
-
children: /* @__PURE__ */ (0,
|
|
9117
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(RadioGroupPrimitive.Indicator, { className: style_module_default12.indicator, children: /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(RadioIndicator, {}) })
|
|
8874
9118
|
}
|
|
8875
9119
|
) });
|
|
8876
9120
|
}
|
|
@@ -8881,10 +9125,10 @@ var Radio = Object.assign(RadioRoot, {
|
|
|
8881
9125
|
});
|
|
8882
9126
|
|
|
8883
9127
|
// src/components/Textfield/index.tsx
|
|
8884
|
-
var
|
|
9128
|
+
var import_react16 = require("react");
|
|
8885
9129
|
|
|
8886
9130
|
// src/components/Textfield/style.module.scss
|
|
8887
|
-
var
|
|
9131
|
+
var style_module_default13 = {
|
|
8888
9132
|
"textfield-container": "_textfield-container_mmkqk_1",
|
|
8889
9133
|
"textfield": "_textfield_mmkqk_1",
|
|
8890
9134
|
"label": "_label_mmkqk_35",
|
|
@@ -8906,22 +9150,22 @@ var style_module_default11 = {
|
|
|
8906
9150
|
};
|
|
8907
9151
|
|
|
8908
9152
|
// src/components/Textfield/index.tsx
|
|
8909
|
-
var
|
|
8910
|
-
var
|
|
9153
|
+
var import_cva10 = require("cva");
|
|
9154
|
+
var import_clsx15 = __toESM(require("clsx"));
|
|
8911
9155
|
var import_react_dom = require("react-dom");
|
|
8912
|
-
var
|
|
8913
|
-
var defaultTextfieldVariants = (0,
|
|
8914
|
-
base:
|
|
9156
|
+
var import_jsx_runtime172 = require("react/jsx-runtime");
|
|
9157
|
+
var defaultTextfieldVariants = (0, import_cva10.cva)({
|
|
9158
|
+
base: style_module_default13.textfield,
|
|
8915
9159
|
variants: {
|
|
8916
9160
|
color: {
|
|
8917
|
-
"neutral-container-mid":
|
|
8918
|
-
"neutral-container-lowest":
|
|
9161
|
+
"neutral-container-mid": style_module_default13.gray,
|
|
9162
|
+
"neutral-container-lowest": style_module_default13.white
|
|
8919
9163
|
}
|
|
8920
9164
|
}
|
|
8921
9165
|
});
|
|
8922
|
-
var Textfield = (0,
|
|
9166
|
+
var Textfield = (0, import_react16.forwardRef)((props, ref) => {
|
|
8923
9167
|
const {
|
|
8924
|
-
id = (0,
|
|
9168
|
+
id = (0, import_react16.useId)(),
|
|
8925
9169
|
type,
|
|
8926
9170
|
label,
|
|
8927
9171
|
value: controlledValue,
|
|
@@ -8935,9 +9179,9 @@ var Textfield = (0, import_react15.forwardRef)((props, ref) => {
|
|
|
8935
9179
|
onClear,
|
|
8936
9180
|
...rest
|
|
8937
9181
|
} = props;
|
|
8938
|
-
const inputRef = (0,
|
|
8939
|
-
const [value, setValue] = (0,
|
|
8940
|
-
const [deidentifiy, setDeidentifiy] = (0,
|
|
9182
|
+
const inputRef = (0, import_react16.useRef)(null);
|
|
9183
|
+
const [value, setValue] = (0, import_react16.useState)("");
|
|
9184
|
+
const [deidentifiy, setDeidentifiy] = (0, import_react16.useState)(true);
|
|
8941
9185
|
const isControlled = controlledValue !== void 0;
|
|
8942
9186
|
const isPassword = type === "password";
|
|
8943
9187
|
const isDeidentified = isPassword && deidentifiy;
|
|
@@ -8977,22 +9221,22 @@ var Textfield = (0, import_react15.forwardRef)((props, ref) => {
|
|
|
8977
9221
|
inputRef.current.setSelectionRange(length, length);
|
|
8978
9222
|
}
|
|
8979
9223
|
}, "handleDeidentify");
|
|
8980
|
-
(0,
|
|
8981
|
-
return /* @__PURE__ */ (0,
|
|
8982
|
-
/* @__PURE__ */ (0,
|
|
9224
|
+
(0, import_react16.useImperativeHandle)(ref, () => inputRef.current);
|
|
9225
|
+
return /* @__PURE__ */ (0, import_jsx_runtime172.jsxs)("div", { className: style_module_default13["textfield-container"], children: [
|
|
9226
|
+
/* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
|
|
8983
9227
|
"div",
|
|
8984
9228
|
{
|
|
8985
|
-
className: (0,
|
|
8986
|
-
[
|
|
8987
|
-
[
|
|
9229
|
+
className: (0, import_clsx15.default)(defaultTextfieldVariants({ color }), {
|
|
9230
|
+
[style_module_default13.error]: !!error,
|
|
9231
|
+
[style_module_default13["label-out-textfield"]]: !label || labelType === "out"
|
|
8988
9232
|
}),
|
|
8989
9233
|
onClick: handleTextfieldClick,
|
|
8990
|
-
children: /* @__PURE__ */ (0,
|
|
8991
|
-
/* @__PURE__ */ (0,
|
|
9234
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime172.jsxs)("div", { className: style_module_default13["input-wrapper"], children: [
|
|
9235
|
+
/* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
|
|
8992
9236
|
"input",
|
|
8993
9237
|
{
|
|
8994
|
-
className: (0,
|
|
8995
|
-
[
|
|
9238
|
+
className: (0, import_clsx15.default)(style_module_default13.input, {
|
|
9239
|
+
[style_module_default13["label-out-input"]]: !label || labelType === "out"
|
|
8996
9240
|
}),
|
|
8997
9241
|
type: isDeidentified ? "password" : "text",
|
|
8998
9242
|
placeholder,
|
|
@@ -9003,24 +9247,24 @@ var Textfield = (0, import_react15.forwardRef)((props, ref) => {
|
|
|
9003
9247
|
...rest
|
|
9004
9248
|
}
|
|
9005
9249
|
),
|
|
9006
|
-
/* @__PURE__ */ (0,
|
|
9250
|
+
/* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
|
|
9007
9251
|
Label,
|
|
9008
9252
|
{
|
|
9009
|
-
className: (0,
|
|
9010
|
-
[
|
|
9011
|
-
[
|
|
9253
|
+
className: (0, import_clsx15.default)(style_module_default13.label, {
|
|
9254
|
+
[style_module_default13["label-in"]]: labelType === "in",
|
|
9255
|
+
[style_module_default13["label-out"]]: !label || labelType === "out"
|
|
9012
9256
|
}),
|
|
9013
9257
|
size: label?.type === "out" ? "s" : void 0,
|
|
9014
9258
|
htmlFor: id,
|
|
9015
9259
|
children: labelText
|
|
9016
9260
|
}
|
|
9017
9261
|
),
|
|
9018
|
-
/* @__PURE__ */ (0,
|
|
9019
|
-
textfieldValue && !disabled && /* @__PURE__ */ (0,
|
|
9262
|
+
/* @__PURE__ */ (0, import_jsx_runtime172.jsxs)("div", { className: style_module_default13["input-action-buttons"], children: [
|
|
9263
|
+
textfieldValue && !disabled && /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
|
|
9020
9264
|
IconButton,
|
|
9021
9265
|
{
|
|
9022
9266
|
tabIndex: -1,
|
|
9023
|
-
className:
|
|
9267
|
+
className: style_module_default13["action-button"],
|
|
9024
9268
|
level: "secondary",
|
|
9025
9269
|
fill: false,
|
|
9026
9270
|
icon: {
|
|
@@ -9034,11 +9278,11 @@ var Textfield = (0, import_react15.forwardRef)((props, ref) => {
|
|
|
9034
9278
|
}
|
|
9035
9279
|
}
|
|
9036
9280
|
),
|
|
9037
|
-
isPassword && !disabled && /* @__PURE__ */ (0,
|
|
9281
|
+
isPassword && !disabled && /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
|
|
9038
9282
|
IconButton,
|
|
9039
9283
|
{
|
|
9040
9284
|
tabIndex: -1,
|
|
9041
|
-
className:
|
|
9285
|
+
className: style_module_default13["action-button"],
|
|
9042
9286
|
level: "secondary",
|
|
9043
9287
|
fill: false,
|
|
9044
9288
|
icon: {
|
|
@@ -9052,14 +9296,14 @@ var Textfield = (0, import_react15.forwardRef)((props, ref) => {
|
|
|
9052
9296
|
}
|
|
9053
9297
|
}
|
|
9054
9298
|
),
|
|
9055
|
-
buttonProps && /* @__PURE__ */ (0,
|
|
9299
|
+
buttonProps && /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(Button, { ...buttonProps, size: "m", type: "button" })
|
|
9056
9300
|
] })
|
|
9057
9301
|
] })
|
|
9058
9302
|
}
|
|
9059
9303
|
),
|
|
9060
|
-
displayFooter && /* @__PURE__ */ (0,
|
|
9061
|
-
/* @__PURE__ */ (0,
|
|
9062
|
-
/* @__PURE__ */ (0,
|
|
9304
|
+
displayFooter && /* @__PURE__ */ (0, import_jsx_runtime172.jsxs)("div", { className: style_module_default13.footer, children: [
|
|
9305
|
+
/* @__PURE__ */ (0, import_jsx_runtime172.jsx)("div", { className: style_module_default13["error-wrapper"], children: error && /* @__PURE__ */ (0, import_jsx_runtime172.jsxs)(import_jsx_runtime172.Fragment, { children: [
|
|
9306
|
+
/* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
|
|
9063
9307
|
Icon,
|
|
9064
9308
|
{
|
|
9065
9309
|
name: "exclamationmark-fill",
|
|
@@ -9069,9 +9313,9 @@ var Textfield = (0, import_react15.forwardRef)((props, ref) => {
|
|
|
9069
9313
|
type: "function-label-negative"
|
|
9070
9314
|
}
|
|
9071
9315
|
),
|
|
9072
|
-
/* @__PURE__ */ (0,
|
|
9316
|
+
/* @__PURE__ */ (0, import_jsx_runtime172.jsx)(Caption, { size: 3, type: "normal", weight: "regular", className: style_module_default13["error-message"], children: error })
|
|
9073
9317
|
] }) }),
|
|
9074
|
-
maxCharacter && /* @__PURE__ */ (0,
|
|
9318
|
+
maxCharacter && /* @__PURE__ */ (0, import_jsx_runtime172.jsxs)(Caption, { className: style_module_default13.character, size: 3, type: "normal", weight: "regular", children: [
|
|
9075
9319
|
isControlled ? controlledValue.length : value.length,
|
|
9076
9320
|
"/",
|
|
9077
9321
|
maxCharacter
|
|
@@ -9082,10 +9326,10 @@ var Textfield = (0, import_react15.forwardRef)((props, ref) => {
|
|
|
9082
9326
|
Textfield.displayName = "Textfield";
|
|
9083
9327
|
|
|
9084
9328
|
// src/components/Slider/index.tsx
|
|
9085
|
-
var
|
|
9329
|
+
var import_react17 = require("react");
|
|
9086
9330
|
|
|
9087
9331
|
// src/components/Slider/style.module.scss
|
|
9088
|
-
var
|
|
9332
|
+
var style_module_default14 = {
|
|
9089
9333
|
"label": "_label_85fpg_1",
|
|
9090
9334
|
"optionText": "_optionText_85fpg_6",
|
|
9091
9335
|
"slider-wrapper": "_slider-wrapper_85fpg_10",
|
|
@@ -9099,29 +9343,29 @@ var style_module_default12 = {
|
|
|
9099
9343
|
|
|
9100
9344
|
// src/components/Slider/index.tsx
|
|
9101
9345
|
var SliderPrimitive = __toESM(require("@radix-ui/react-slider"));
|
|
9102
|
-
var
|
|
9103
|
-
var SliderRoot = (0,
|
|
9346
|
+
var import_jsx_runtime173 = require("react/jsx-runtime");
|
|
9347
|
+
var SliderRoot = (0, import_react17.forwardRef)((props, ref) => {
|
|
9104
9348
|
const { label, tooltip, rangeLeft, rangeRight, min, max, step = 50, ...rest } = props;
|
|
9105
|
-
return /* @__PURE__ */ (0,
|
|
9106
|
-
/* @__PURE__ */ (0,
|
|
9107
|
-
/* @__PURE__ */ (0,
|
|
9108
|
-
/* @__PURE__ */ (0,
|
|
9109
|
-
/* @__PURE__ */ (0,
|
|
9110
|
-
/* @__PURE__ */ (0,
|
|
9349
|
+
return /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(import_jsx_runtime173.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime173.jsxs)(Tooltip.Provider, { children: [
|
|
9350
|
+
/* @__PURE__ */ (0, import_jsx_runtime173.jsx)(Label, { level: "secondary", size: "m", offset: "high", className: style_module_default14.label, children: label }),
|
|
9351
|
+
/* @__PURE__ */ (0, import_jsx_runtime173.jsxs)("div", { className: style_module_default14["slider-wrapper"], children: [
|
|
9352
|
+
/* @__PURE__ */ (0, import_jsx_runtime173.jsxs)("div", { className: style_module_default14["slider-option-wrapper"], children: [
|
|
9353
|
+
/* @__PURE__ */ (0, import_jsx_runtime173.jsx)(Icon, { name: rangeLeft.icon, size: "xs" }),
|
|
9354
|
+
/* @__PURE__ */ (0, import_jsx_runtime173.jsx)(Caption, { size: 1, type: "normal", weight: "medium", className: style_module_default14.optionText, children: rangeLeft.text })
|
|
9111
9355
|
] }),
|
|
9112
|
-
/* @__PURE__ */ (0,
|
|
9113
|
-
/* @__PURE__ */ (0,
|
|
9114
|
-
Array.from({ length: 100 / step + 1 }).map((_, index) => /* @__PURE__ */ (0,
|
|
9115
|
-
/* @__PURE__ */ (0,
|
|
9356
|
+
/* @__PURE__ */ (0, import_jsx_runtime173.jsxs)(SliderPrimitive.Root, { ...rest, step, className: style_module_default14["slider-root"], ref, children: [
|
|
9357
|
+
/* @__PURE__ */ (0, import_jsx_runtime173.jsxs)(SliderPrimitive.Track, { className: style_module_default14["slider-track"], children: [
|
|
9358
|
+
Array.from({ length: 100 / step + 1 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime173.jsx)("span", { className: style_module_default14["slider-step"] }, index)),
|
|
9359
|
+
/* @__PURE__ */ (0, import_jsx_runtime173.jsx)(SliderPrimitive.Range, { className: style_module_default14["slider-range"] })
|
|
9116
9360
|
] }),
|
|
9117
|
-
/* @__PURE__ */ (0,
|
|
9118
|
-
/* @__PURE__ */ (0,
|
|
9119
|
-
/* @__PURE__ */ (0,
|
|
9361
|
+
/* @__PURE__ */ (0, import_jsx_runtime173.jsxs)(Tooltip, { children: [
|
|
9362
|
+
/* @__PURE__ */ (0, import_jsx_runtime173.jsx)(Tooltip.Trigger, { by: /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(SliderPrimitive.Thumb, { className: style_module_default14["slider-thumb"] }) }),
|
|
9363
|
+
/* @__PURE__ */ (0, import_jsx_runtime173.jsx)(Tooltip.Content, { description: tooltip })
|
|
9120
9364
|
] })
|
|
9121
9365
|
] }),
|
|
9122
|
-
/* @__PURE__ */ (0,
|
|
9123
|
-
/* @__PURE__ */ (0,
|
|
9124
|
-
/* @__PURE__ */ (0,
|
|
9366
|
+
/* @__PURE__ */ (0, import_jsx_runtime173.jsxs)("div", { className: style_module_default14["slider-option-wrapper"], children: [
|
|
9367
|
+
/* @__PURE__ */ (0, import_jsx_runtime173.jsx)(Icon, { name: rangeRight.icon, size: "xs" }),
|
|
9368
|
+
/* @__PURE__ */ (0, import_jsx_runtime173.jsx)(Caption, { size: 1, type: "normal", weight: "medium", className: style_module_default14.optionText, children: rangeRight.text })
|
|
9125
9369
|
] })
|
|
9126
9370
|
] })
|
|
9127
9371
|
] }) });
|
|
@@ -9133,7 +9377,7 @@ var SelectPrimitive = __toESM(require("@radix-ui/react-select"));
|
|
|
9133
9377
|
var ScrollArea = __toESM(require("@radix-ui/react-scroll-area"));
|
|
9134
9378
|
|
|
9135
9379
|
// src/components/Select/style.module.scss
|
|
9136
|
-
var
|
|
9380
|
+
var style_module_default15 = {
|
|
9137
9381
|
"label-container": "_label-container_rtt11_101",
|
|
9138
9382
|
"select-label": "_select-label_rtt11_107",
|
|
9139
9383
|
"trigger": "_trigger_rtt11_112",
|
|
@@ -9159,13 +9403,13 @@ var style_module_default13 = {
|
|
|
9159
9403
|
};
|
|
9160
9404
|
|
|
9161
9405
|
// src/components/Select/index.tsx
|
|
9162
|
-
var
|
|
9163
|
-
var
|
|
9164
|
-
var
|
|
9165
|
-
var Badge = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */ (0,
|
|
9166
|
-
var SelectContent = (0,
|
|
9406
|
+
var import_react18 = require("react");
|
|
9407
|
+
var import_clsx16 = __toESM(require("clsx"));
|
|
9408
|
+
var import_jsx_runtime174 = require("react/jsx-runtime");
|
|
9409
|
+
var Badge = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("div", { className: style_module_default15.badgeContainer, children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(Caption, { className: style_module_default15.badge, size: 2, type: "normal", weight: "medium", children }) }), "Badge");
|
|
9410
|
+
var SelectContent = (0, import_react18.forwardRef)((props, ref) => {
|
|
9167
9411
|
const { id, isResponsive, popSide, sideOffset, listLabel, children, container } = props;
|
|
9168
|
-
return /* @__PURE__ */ (0,
|
|
9412
|
+
return /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(SelectPrimitive.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
|
|
9169
9413
|
SelectPrimitive.Content,
|
|
9170
9414
|
{
|
|
9171
9415
|
id: `select-content-${id}`,
|
|
@@ -9180,24 +9424,24 @@ var SelectContent = (0, import_react17.forwardRef)((props, ref) => {
|
|
|
9180
9424
|
e.stopPropagation();
|
|
9181
9425
|
};
|
|
9182
9426
|
},
|
|
9183
|
-
className: (0,
|
|
9184
|
-
[
|
|
9427
|
+
className: (0, import_clsx16.default)(style_module_default15["desktop-content"], {
|
|
9428
|
+
[style_module_default15["responsive"]]: isResponsive
|
|
9185
9429
|
}),
|
|
9186
9430
|
position: "popper",
|
|
9187
9431
|
side: popSide,
|
|
9188
9432
|
sideOffset,
|
|
9189
9433
|
avoidCollisions: false,
|
|
9190
|
-
children: /* @__PURE__ */ (0,
|
|
9191
|
-
/* @__PURE__ */ (0,
|
|
9192
|
-
listLabel && /* @__PURE__ */ (0,
|
|
9434
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(ScrollArea.Root, { className: style_module_default15.scrollAreaRoot, type: "always", children: [
|
|
9435
|
+
/* @__PURE__ */ (0, import_jsx_runtime174.jsx)(SelectPrimitive.Viewport, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(ScrollArea.Viewport, { className: style_module_default15.scrollAreaViewport, style: { maxHeight: "268px", overflowY: "auto" }, children: /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(SelectPrimitive.Group, { children: [
|
|
9436
|
+
listLabel && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(SelectPrimitive.Label, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(Label, { className: style_module_default15["desktop-label"], level: "secondary", size: "m", offset: "low", children: listLabel }) }),
|
|
9193
9437
|
children
|
|
9194
9438
|
] }) }) }),
|
|
9195
|
-
/* @__PURE__ */ (0,
|
|
9439
|
+
/* @__PURE__ */ (0, import_jsx_runtime174.jsx)(ScrollArea.Scrollbar, { className: style_module_default15.scrollAreaScrollbar, orientation: "vertical", children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(ScrollArea.Thumb, { className: style_module_default15.scrollAreaThumb }) })
|
|
9196
9440
|
] })
|
|
9197
9441
|
}
|
|
9198
9442
|
) });
|
|
9199
9443
|
});
|
|
9200
|
-
var SelectRoot = (0,
|
|
9444
|
+
var SelectRoot = (0, import_react18.forwardRef)((props, ref) => {
|
|
9201
9445
|
const {
|
|
9202
9446
|
id,
|
|
9203
9447
|
placeholder,
|
|
@@ -9216,16 +9460,16 @@ var SelectRoot = (0, import_react17.forwardRef)((props, ref) => {
|
|
|
9216
9460
|
...rest
|
|
9217
9461
|
} = props;
|
|
9218
9462
|
const contentProps = { id, isResponsive, popSide, sideOffset, listLabel, children, container };
|
|
9219
|
-
const [isOpen, setIsOpen] = (0,
|
|
9220
|
-
(0,
|
|
9463
|
+
const [isOpen, setIsOpen] = (0, import_react18.useState)(false);
|
|
9464
|
+
(0, import_react18.useEffect)(() => {
|
|
9221
9465
|
setIsOpen(open);
|
|
9222
9466
|
}, [open]);
|
|
9223
|
-
return /* @__PURE__ */ (0,
|
|
9224
|
-
/* @__PURE__ */ (0,
|
|
9225
|
-
/* @__PURE__ */ (0,
|
|
9226
|
-
badge && /* @__PURE__ */ (0,
|
|
9467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)("div", { children: [
|
|
9468
|
+
/* @__PURE__ */ (0, import_jsx_runtime174.jsxs)("div", { className: style_module_default15["label-container"], children: [
|
|
9469
|
+
/* @__PURE__ */ (0, import_jsx_runtime174.jsx)(Label, { className: style_module_default15["select-label"], level: "secondary", size: "m", offset: "low", htmlFor: id, children: label }),
|
|
9470
|
+
badge && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(Badge, { children: badge })
|
|
9227
9471
|
] }),
|
|
9228
|
-
/* @__PURE__ */ (0,
|
|
9472
|
+
/* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(
|
|
9229
9473
|
SelectPrimitive.Root,
|
|
9230
9474
|
{
|
|
9231
9475
|
...rest,
|
|
@@ -9235,20 +9479,20 @@ var SelectRoot = (0, import_react17.forwardRef)((props, ref) => {
|
|
|
9235
9479
|
setIsOpen(open2);
|
|
9236
9480
|
},
|
|
9237
9481
|
children: [
|
|
9238
|
-
/* @__PURE__ */ (0,
|
|
9239
|
-
/* @__PURE__ */ (0,
|
|
9240
|
-
/* @__PURE__ */ (0,
|
|
9482
|
+
/* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(SelectPrimitive.Trigger, { className: style_module_default15.trigger, ref, id, children: [
|
|
9483
|
+
/* @__PURE__ */ (0, import_jsx_runtime174.jsx)(SelectPrimitive.Value, { className: style_module_default15.placeholder, placeholder }),
|
|
9484
|
+
/* @__PURE__ */ (0, import_jsx_runtime174.jsx)(SelectPrimitive.Icon, { className: style_module_default15.openIcon, children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(Icon, { name: "arrow-drop-down", fill: true, thick: true, size: "xs" }) })
|
|
9241
9485
|
] }),
|
|
9242
|
-
/* @__PURE__ */ (0,
|
|
9486
|
+
/* @__PURE__ */ (0, import_jsx_runtime174.jsx)(SelectContent, { ...contentProps })
|
|
9243
9487
|
]
|
|
9244
9488
|
}
|
|
9245
9489
|
)
|
|
9246
9490
|
] });
|
|
9247
9491
|
});
|
|
9248
|
-
var SelectItem = /* @__PURE__ */ __name(({ value, text, disabled, icon, onClick }) => /* @__PURE__ */ (0,
|
|
9492
|
+
var SelectItem = /* @__PURE__ */ __name(({ value, text, disabled, icon, onClick }) => /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(
|
|
9249
9493
|
SelectPrimitive.Item,
|
|
9250
9494
|
{
|
|
9251
|
-
className:
|
|
9495
|
+
className: style_module_default15.item,
|
|
9252
9496
|
value,
|
|
9253
9497
|
disabled,
|
|
9254
9498
|
onClick: (e) => {
|
|
@@ -9256,9 +9500,9 @@ var SelectItem = /* @__PURE__ */ __name(({ value, text, disabled, icon, onClick
|
|
|
9256
9500
|
onClick?.();
|
|
9257
9501
|
},
|
|
9258
9502
|
children: [
|
|
9259
|
-
/* @__PURE__ */ (0,
|
|
9260
|
-
icon && /* @__PURE__ */ (0,
|
|
9261
|
-
/* @__PURE__ */ (0,
|
|
9503
|
+
/* @__PURE__ */ (0, import_jsx_runtime174.jsx)(SelectPrimitive.ItemText, { children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(Paragraph, { size: 3, type: "normal", weight: "medium", children: text ?? value }) }),
|
|
9504
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(SelectPrimitive.Icon, { className: style_module_default15.icon, children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(Icon, { size: "xs", ...icon }) }),
|
|
9505
|
+
/* @__PURE__ */ (0, import_jsx_runtime174.jsx)(SelectPrimitive.ItemIndicator, { className: style_module_default15.itemIndicator, children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(Icon, { fill: false, thick: true, size: "xs", name: "check-mark", type: "brand-label-primary" }) })
|
|
9262
9506
|
]
|
|
9263
9507
|
}
|
|
9264
9508
|
), "SelectItem");
|
|
@@ -9267,25 +9511,25 @@ var Select = Object.assign(SelectRoot, {
|
|
|
9267
9511
|
});
|
|
9268
9512
|
|
|
9269
9513
|
// src/components/List/style.module.scss
|
|
9270
|
-
var
|
|
9514
|
+
var style_module_default16 = {
|
|
9271
9515
|
"list": "_list_uav5y_1",
|
|
9272
9516
|
"item": "_item_uav5y_8",
|
|
9273
9517
|
"icon": "_icon_uav5y_42"
|
|
9274
9518
|
};
|
|
9275
9519
|
|
|
9276
9520
|
// src/components/List/index.tsx
|
|
9277
|
-
var
|
|
9521
|
+
var import_react20 = require("react");
|
|
9278
9522
|
|
|
9279
9523
|
// src/hooks/collection.tsx
|
|
9280
|
-
var
|
|
9281
|
-
var
|
|
9282
|
-
var CollectionContext = (0,
|
|
9524
|
+
var import_react19 = require("react");
|
|
9525
|
+
var import_jsx_runtime175 = require("react/jsx-runtime");
|
|
9526
|
+
var CollectionContext = (0, import_react19.createContext)(void 0);
|
|
9283
9527
|
var CollectionProvider = /* @__PURE__ */ __name(({ value, onChangeValue, children }) => {
|
|
9284
|
-
const contextValue = (0,
|
|
9285
|
-
return /* @__PURE__ */ (0,
|
|
9528
|
+
const contextValue = (0, import_react19.useMemo)(() => ({ value, onChangeValue }), [value, onChangeValue]);
|
|
9529
|
+
return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(CollectionContext.Provider, { value: contextValue, children });
|
|
9286
9530
|
}, "CollectionProvider");
|
|
9287
9531
|
var useCollectionContext = /* @__PURE__ */ __name(() => {
|
|
9288
|
-
const context = (0,
|
|
9532
|
+
const context = (0, import_react19.useContext)(CollectionContext);
|
|
9289
9533
|
if (!context) {
|
|
9290
9534
|
throw new Error("useCollectionContext must be used within a CollectionProvider");
|
|
9291
9535
|
}
|
|
@@ -9293,20 +9537,20 @@ var useCollectionContext = /* @__PURE__ */ __name(() => {
|
|
|
9293
9537
|
}, "useCollectionContext");
|
|
9294
9538
|
|
|
9295
9539
|
// src/components/List/index.tsx
|
|
9296
|
-
var
|
|
9297
|
-
var
|
|
9540
|
+
var import_clsx17 = __toESM(require("clsx"));
|
|
9541
|
+
var import_jsx_runtime176 = require("react/jsx-runtime");
|
|
9298
9542
|
var ListRoot = /* @__PURE__ */ __name(({ children, className, ...props }) => {
|
|
9299
|
-
return /* @__PURE__ */ (0,
|
|
9543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(CollectionProvider, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime176.jsx)("ul", { className: (0, import_clsx17.default)(style_module_default16.list, className), children }) });
|
|
9300
9544
|
}, "ListRoot");
|
|
9301
9545
|
var Item3 = /* @__PURE__ */ __name(({ value, text, disabled, icon, onClick }) => {
|
|
9302
|
-
const [isFocused, setIsFocused] = (0,
|
|
9546
|
+
const [isFocused, setIsFocused] = (0, import_react20.useState)(false);
|
|
9303
9547
|
const { value: contextValue, onChangeValue } = useCollectionContext();
|
|
9304
9548
|
const isSelected = contextValue === value;
|
|
9305
9549
|
const iconProps = isSelected ? { name: "check-mark", type: "brand-label-primary", thick: true } : icon ? icon : {};
|
|
9306
|
-
return /* @__PURE__ */ (0,
|
|
9550
|
+
return /* @__PURE__ */ (0, import_jsx_runtime176.jsxs)(
|
|
9307
9551
|
"li",
|
|
9308
9552
|
{
|
|
9309
|
-
className:
|
|
9553
|
+
className: style_module_default16.item,
|
|
9310
9554
|
value,
|
|
9311
9555
|
"aria-disabled": disabled || void 0,
|
|
9312
9556
|
"data-disabled": disabled ? "" : void 0,
|
|
@@ -9321,120 +9565,11 @@ var Item3 = /* @__PURE__ */ __name(({ value, text, disabled, icon, onClick }) =>
|
|
|
9321
9565
|
onChangeValue?.(value);
|
|
9322
9566
|
},
|
|
9323
9567
|
children: [
|
|
9324
|
-
/* @__PURE__ */ (0,
|
|
9325
|
-
(icon || isSelected) && /* @__PURE__ */ (0,
|
|
9568
|
+
/* @__PURE__ */ (0, import_jsx_runtime176.jsx)(Paragraph, { size: 3, type: "normal", weight: "medium", children: text }),
|
|
9569
|
+
(icon || isSelected) && /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(Icon, { className: style_module_default16.icon, size: "xs", ...iconProps })
|
|
9326
9570
|
]
|
|
9327
9571
|
}
|
|
9328
9572
|
);
|
|
9329
9573
|
}, "Item");
|
|
9330
9574
|
var List = Object.assign(ListRoot, { Item: Item3 });
|
|
9331
|
-
|
|
9332
|
-
// src/components/TextButton/index.tsx
|
|
9333
|
-
var import_cva9 = require("cva");
|
|
9334
|
-
|
|
9335
|
-
// src/components/TextButton/style.module.scss
|
|
9336
|
-
var style_module_default15 = {
|
|
9337
|
-
"button": "_button_geax8_1",
|
|
9338
|
-
"text": "_text_geax8_27",
|
|
9339
|
-
"size-m": "_size-m_geax8_34",
|
|
9340
|
-
"size-s": "_size-s_geax8_37",
|
|
9341
|
-
"primary": "_primary_geax8_40",
|
|
9342
|
-
"secondary": "_secondary_geax8_44",
|
|
9343
|
-
"tertiary": "_tertiary_geax8_48",
|
|
9344
|
-
"inverse": "_inverse_geax8_52",
|
|
9345
|
-
"inverse-static": "_inverse-static_geax8_56",
|
|
9346
|
-
"thick": "_thick_geax8_61",
|
|
9347
|
-
"underline": "_underline_geax8_65",
|
|
9348
|
-
"text-children": "_text-children_geax8_70"
|
|
9349
|
-
};
|
|
9350
|
-
|
|
9351
|
-
// src/components/TextButton/index.tsx
|
|
9352
|
-
var import_react20 = require("react");
|
|
9353
|
-
var import_clsx16 = __toESM(require("clsx"));
|
|
9354
|
-
var import_jsx_runtime175 = require("react/jsx-runtime");
|
|
9355
|
-
var textButtonLevelIconTypeMap = {
|
|
9356
|
-
primary: "brand-label-primary",
|
|
9357
|
-
secondary: "neutral-label-primary",
|
|
9358
|
-
tertiary: "neutral-label-secondary",
|
|
9359
|
-
inverse: "inverse-label-primary",
|
|
9360
|
-
"inverse-static": "inverse-label-static-primary"
|
|
9361
|
-
};
|
|
9362
|
-
var textButtonLevelIconFillTypeMap = {
|
|
9363
|
-
primary: "inverse-label-static-primary",
|
|
9364
|
-
secondary: "inverse-label-secondary",
|
|
9365
|
-
tertiary: "inverse-label-secondary",
|
|
9366
|
-
inverse: "neutral-label-primary",
|
|
9367
|
-
"inverse-static": "neutral-label-static-primary"
|
|
9368
|
-
};
|
|
9369
|
-
var textButtonVariants = (0, import_cva9.cva)({
|
|
9370
|
-
base: [style_module_default15.button, style_module_default15.text],
|
|
9371
|
-
variants: {
|
|
9372
|
-
level: {
|
|
9373
|
-
primary: [style_module_default15["primary"], "lp-sys-typo-caption1-normal-medium"],
|
|
9374
|
-
secondary: [style_module_default15["secondary"], "lp-sys-typo-caption1-normal-medium"],
|
|
9375
|
-
tertiary: [style_module_default15["tertiary"], "lp-sys-typo-caption1-normal-medium"],
|
|
9376
|
-
inverse: [style_module_default15["inverse"], "lp-sys-typo-caption1-normal-medium"],
|
|
9377
|
-
"inverse-static": [style_module_default15["inverse-static"], "lp-sys-typo-caption1-normal-medium"]
|
|
9378
|
-
},
|
|
9379
|
-
size: {
|
|
9380
|
-
m: style_module_default15["size-m"],
|
|
9381
|
-
s: style_module_default15["size-s"]
|
|
9382
|
-
},
|
|
9383
|
-
thick: {
|
|
9384
|
-
true: style_module_default15.thick
|
|
9385
|
-
},
|
|
9386
|
-
underline: {
|
|
9387
|
-
true: style_module_default15.underline
|
|
9388
|
-
}
|
|
9389
|
-
}
|
|
9390
|
-
});
|
|
9391
|
-
var TextButton = (0, import_react20.forwardRef)(
|
|
9392
|
-
({
|
|
9393
|
-
level = "primary",
|
|
9394
|
-
thick = false,
|
|
9395
|
-
underline = false,
|
|
9396
|
-
size = "m",
|
|
9397
|
-
asChild = false,
|
|
9398
|
-
leftIcon,
|
|
9399
|
-
rightIcon,
|
|
9400
|
-
className,
|
|
9401
|
-
children,
|
|
9402
|
-
...rest
|
|
9403
|
-
}, ref) => {
|
|
9404
|
-
const getIconProps = /* @__PURE__ */ __name((icon) => ({
|
|
9405
|
-
size: size === "m" ? "s" : "xs",
|
|
9406
|
-
thick: true,
|
|
9407
|
-
type: textButtonLevelIconTypeMap[level],
|
|
9408
|
-
fillType: textButtonLevelIconFillTypeMap[level],
|
|
9409
|
-
...icon
|
|
9410
|
-
}), "getIconProps");
|
|
9411
|
-
const renderContent = /* @__PURE__ */ __name((children2) => /* @__PURE__ */ (0, import_jsx_runtime175.jsxs)("span", { className: style_module_default15["text-children"], children: [
|
|
9412
|
-
leftIcon && /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(Icon, { ...getIconProps(leftIcon) }),
|
|
9413
|
-
/* @__PURE__ */ (0, import_jsx_runtime175.jsx)("p", { children: children2 }),
|
|
9414
|
-
rightIcon && /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(Icon, { ...getIconProps(rightIcon) })
|
|
9415
|
-
] }), "renderContent");
|
|
9416
|
-
if (asChild) {
|
|
9417
|
-
const parent = import_react20.Children.only(children);
|
|
9418
|
-
return (0, import_react20.cloneElement)(
|
|
9419
|
-
parent,
|
|
9420
|
-
{
|
|
9421
|
-
...rest,
|
|
9422
|
-
className: (0, import_clsx16.default)(textButtonVariants({ level, thick, underline, size }), className),
|
|
9423
|
-
ref
|
|
9424
|
-
},
|
|
9425
|
-
renderContent(parent.props.children)
|
|
9426
|
-
);
|
|
9427
|
-
}
|
|
9428
|
-
return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
|
|
9429
|
-
"button",
|
|
9430
|
-
{
|
|
9431
|
-
className: (0, import_clsx16.default)(textButtonVariants({ level, thick, underline, size }), className),
|
|
9432
|
-
ref,
|
|
9433
|
-
...rest,
|
|
9434
|
-
children: renderContent(children)
|
|
9435
|
-
}
|
|
9436
|
-
);
|
|
9437
|
-
}
|
|
9438
|
-
);
|
|
9439
|
-
TextButton.displayName = "TextButton";
|
|
9440
9575
|
//# sourceMappingURL=index.cjs.map
|