@liner-fe/prism 2.1.25 → 2.1.26
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/Typography/index.d.ts +2 -0
- package/lib/index.cjs +234 -140
- package/lib/index.cjs.map +4 -4
- package/lib/index.mjs +174 -80
- package/lib/index.mjs.map +4 -4
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -8750,6 +8750,96 @@ var Display = forwardRef6(
|
|
|
8750
8750
|
}
|
|
8751
8751
|
);
|
|
8752
8752
|
|
|
8753
|
+
// src/components/Typography/Responsive/lib.ts
|
|
8754
|
+
import { createMedia } from "@artsy/fresnel";
|
|
8755
|
+
import { breakpointOrigin } from "@liner-fe/design-token";
|
|
8756
|
+
|
|
8757
|
+
// src/components/Typography/Responsive/constant.ts
|
|
8758
|
+
var breakPointKeyArray = ["xs", "s", "m", "l", "xl", "xxl", "xxxl"];
|
|
8759
|
+
|
|
8760
|
+
// src/components/Typography/Responsive/lib.ts
|
|
8761
|
+
var removePx = /* @__PURE__ */ __name((breakPoint) => {
|
|
8762
|
+
return +breakPoint.replace("px", "");
|
|
8763
|
+
}, "removePx");
|
|
8764
|
+
var AppMedia = createMedia({
|
|
8765
|
+
breakpoints: breakPointKeyArray.reduce((acc, key) => {
|
|
8766
|
+
acc[key] = removePx(breakpointOrigin[key]);
|
|
8767
|
+
return acc;
|
|
8768
|
+
}, {})
|
|
8769
|
+
});
|
|
8770
|
+
var rootMediaStyle = AppMedia.createMediaStyle();
|
|
8771
|
+
var { MediaContextProvider, Media } = AppMedia;
|
|
8772
|
+
|
|
8773
|
+
// src/components/Typography/Responsive/index.tsx
|
|
8774
|
+
import { Fragment as Fragment4, jsx as jsx171 } from "react/jsx-runtime";
|
|
8775
|
+
import { createElement as createElement2 } from "react";
|
|
8776
|
+
var TypographyImpl = /* @__PURE__ */ __name(({ level, text, ...rest }) => {
|
|
8777
|
+
const commonProps = {
|
|
8778
|
+
...rest,
|
|
8779
|
+
children: text
|
|
8780
|
+
};
|
|
8781
|
+
switch (level) {
|
|
8782
|
+
case "caption":
|
|
8783
|
+
return /* @__PURE__ */ jsx171(Caption, { ...commonProps });
|
|
8784
|
+
case "display":
|
|
8785
|
+
return /* @__PURE__ */ jsx171(Display, { ...commonProps });
|
|
8786
|
+
case "heading":
|
|
8787
|
+
return /* @__PURE__ */ jsx171(Heading, { ...commonProps });
|
|
8788
|
+
case "paragraph":
|
|
8789
|
+
return /* @__PURE__ */ jsx171(Paragraph, { ...commonProps });
|
|
8790
|
+
case "title":
|
|
8791
|
+
return /* @__PURE__ */ jsx171(Title2, { ...commonProps });
|
|
8792
|
+
default:
|
|
8793
|
+
return null;
|
|
8794
|
+
}
|
|
8795
|
+
}, "TypographyImpl");
|
|
8796
|
+
var Typography = /* @__PURE__ */ __name((props) => {
|
|
8797
|
+
const { children } = props;
|
|
8798
|
+
const createMediaProps = /* @__PURE__ */ __name((current) => {
|
|
8799
|
+
let returnValue = {};
|
|
8800
|
+
breakPointKeyArray.forEach((breakPointKey, idx, originArray) => {
|
|
8801
|
+
const isFoundCurrentBreakPointKey = current === breakPointKey;
|
|
8802
|
+
if (isFoundCurrentBreakPointKey) {
|
|
8803
|
+
const lagerCurrentBreakPointKeyArray = originArray.slice(idx + 1);
|
|
8804
|
+
const isEmptyLagerCurrentBreakPointKeyArray = lagerCurrentBreakPointKeyArray.length === 0;
|
|
8805
|
+
if (isEmptyLagerCurrentBreakPointKeyArray) {
|
|
8806
|
+
returnValue = { greaterThanOrEqual: current };
|
|
8807
|
+
} else {
|
|
8808
|
+
lagerCurrentBreakPointKeyArray.forEach((lagerCurrentBreakPointKey, idx2, originArray2) => {
|
|
8809
|
+
const isExistReturnValue = !isEmptyObject(returnValue);
|
|
8810
|
+
const isEarlyReturn = isExistReturnValue;
|
|
8811
|
+
if (isEarlyReturn) {
|
|
8812
|
+
return;
|
|
8813
|
+
}
|
|
8814
|
+
const isExistLagerCurrentBreakPoint = !!props[lagerCurrentBreakPointKey];
|
|
8815
|
+
if (isExistLagerCurrentBreakPoint) {
|
|
8816
|
+
returnValue = { between: [current, lagerCurrentBreakPointKey] };
|
|
8817
|
+
return;
|
|
8818
|
+
}
|
|
8819
|
+
const isLast = idx2 === originArray2.length - 1;
|
|
8820
|
+
if (isLast) {
|
|
8821
|
+
returnValue = { greaterThanOrEqual: current };
|
|
8822
|
+
return;
|
|
8823
|
+
}
|
|
8824
|
+
});
|
|
8825
|
+
}
|
|
8826
|
+
}
|
|
8827
|
+
});
|
|
8828
|
+
return returnValue;
|
|
8829
|
+
}, "createMediaProps");
|
|
8830
|
+
return (
|
|
8831
|
+
// Fragment없이도 원래 동작해야하는데 liner-web에서 JSX.Element가 배열로 오면 에러 띄워서 임시로 Fragment로 래핑합니다.
|
|
8832
|
+
/* @__PURE__ */ jsx171(Fragment4, { children: breakPointKeyArray.map((breakPointKey) => {
|
|
8833
|
+
const variable = props[breakPointKey];
|
|
8834
|
+
const isExistVariable = !!variable;
|
|
8835
|
+
if (isExistVariable) {
|
|
8836
|
+
return /* @__PURE__ */ createElement2(Media, { ...createMediaProps(breakPointKey), key: breakPointKey }, /* @__PURE__ */ jsx171(TypographyImpl, { ...variable, text: variable.text || children }));
|
|
8837
|
+
}
|
|
8838
|
+
return null;
|
|
8839
|
+
}) })
|
|
8840
|
+
);
|
|
8841
|
+
}, "Typography");
|
|
8842
|
+
|
|
8753
8843
|
// src/components/Popover/index.tsx
|
|
8754
8844
|
import * as React3 from "react";
|
|
8755
8845
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
@@ -8797,7 +8887,7 @@ var style_module_default7 = {
|
|
|
8797
8887
|
// src/components/TextButton/index.tsx
|
|
8798
8888
|
import { Children as Children2, cloneElement as cloneElement2, forwardRef as forwardRef7 } from "react";
|
|
8799
8889
|
import clsx8 from "clsx";
|
|
8800
|
-
import { jsx as
|
|
8890
|
+
import { jsx as jsx172, jsxs as jsxs116 } from "react/jsx-runtime";
|
|
8801
8891
|
var textButtonLevelIconTypeMap = {
|
|
8802
8892
|
primary: "brand-label-primary",
|
|
8803
8893
|
secondary: "neutral-label-primary",
|
|
@@ -8855,9 +8945,9 @@ var TextButton = forwardRef7(
|
|
|
8855
8945
|
...icon
|
|
8856
8946
|
}), "getIconProps");
|
|
8857
8947
|
const renderContent = /* @__PURE__ */ __name((children2) => /* @__PURE__ */ jsxs116("span", { className: style_module_default7["text-children"], children: [
|
|
8858
|
-
leftIcon && /* @__PURE__ */
|
|
8859
|
-
/* @__PURE__ */
|
|
8860
|
-
rightIcon && /* @__PURE__ */
|
|
8948
|
+
leftIcon && /* @__PURE__ */ jsx172(Icon, { ...getIconProps(leftIcon) }),
|
|
8949
|
+
/* @__PURE__ */ jsx172("p", { children: children2 }),
|
|
8950
|
+
rightIcon && /* @__PURE__ */ jsx172(Icon, { ...getIconProps(rightIcon) })
|
|
8861
8951
|
] }), "renderContent");
|
|
8862
8952
|
if (asChild) {
|
|
8863
8953
|
const parent = Children2.only(children);
|
|
@@ -8871,12 +8961,12 @@ var TextButton = forwardRef7(
|
|
|
8871
8961
|
renderContent(parent.props.children)
|
|
8872
8962
|
);
|
|
8873
8963
|
}
|
|
8874
|
-
return /* @__PURE__ */
|
|
8964
|
+
return /* @__PURE__ */ jsx172("button", { className: clsx8(textButtonVariants({ level, thick, underline, size }), className), ref, ...rest, children: renderContent(children) });
|
|
8875
8965
|
}
|
|
8876
8966
|
);
|
|
8877
8967
|
|
|
8878
8968
|
// src/components/Popover/index.tsx
|
|
8879
|
-
import { Fragment as
|
|
8969
|
+
import { Fragment as Fragment5, jsx as jsx173, jsxs as jsxs117 } from "react/jsx-runtime";
|
|
8880
8970
|
var DEFAULT_OFFSET = -6;
|
|
8881
8971
|
var popoverVariants = cva6({
|
|
8882
8972
|
base: style_module_default6.content,
|
|
@@ -8900,9 +8990,9 @@ var popoverTagVariants = cva6({ base: [style_module_default6.tag, "lp-sys-typo-c
|
|
|
8900
8990
|
var popoverTitleVariants = cva6({ base: [style_module_default6.title, "lp-sys-typo-paragraph3-normal-bold"] });
|
|
8901
8991
|
var popoverDescriptionVariants = cva6({ base: [style_module_default6.description, "lp-sys-typo-caption1-normal-regular"] });
|
|
8902
8992
|
var popoverFooterVariants = cva6({ base: [style_module_default6.footer, "lp-sys-typo-caption1-normal-medium"] });
|
|
8903
|
-
var PopoverRoot = /* @__PURE__ */ __name(({ isOpen, children, onChange }) => /* @__PURE__ */
|
|
8904
|
-
var PopoverTrigger = /* @__PURE__ */ __name(({ by }) => /* @__PURE__ */
|
|
8905
|
-
var PopoverAnchor = /* @__PURE__ */ __name(({ className }) => /* @__PURE__ */
|
|
8993
|
+
var PopoverRoot = /* @__PURE__ */ __name(({ isOpen, children, onChange }) => /* @__PURE__ */ jsx173(PopoverPrimitive.Root, { open: isOpen, onOpenChange: onChange, children }), "PopoverRoot");
|
|
8994
|
+
var PopoverTrigger = /* @__PURE__ */ __name(({ by }) => /* @__PURE__ */ jsx173(PopoverPrimitive.Trigger, { asChild: true, children: by }), "PopoverTrigger");
|
|
8995
|
+
var PopoverAnchor = /* @__PURE__ */ __name(({ className }) => /* @__PURE__ */ jsx173("svg", { className, xmlns: "http://www.w3.org/2000/svg", width: "30", height: "10", viewBox: "0 0 30 10", fill: "none", children: /* @__PURE__ */ jsx173(
|
|
8906
8996
|
"path",
|
|
8907
8997
|
{
|
|
8908
8998
|
fillRule: "evenodd",
|
|
@@ -8929,7 +9019,7 @@ var PopoverContent = React3.forwardRef(
|
|
|
8929
9019
|
children,
|
|
8930
9020
|
container,
|
|
8931
9021
|
...props
|
|
8932
|
-
}, ref) => /* @__PURE__ */
|
|
9022
|
+
}, ref) => /* @__PURE__ */ jsx173(PopoverPrimitive.Portal, { container, children: /* @__PURE__ */ jsxs117(Fragment5, { children: [
|
|
8933
9023
|
/* @__PURE__ */ jsxs117(
|
|
8934
9024
|
PopoverPrimitive.Content,
|
|
8935
9025
|
{
|
|
@@ -8943,22 +9033,22 @@ var PopoverContent = React3.forwardRef(
|
|
|
8943
9033
|
children: [
|
|
8944
9034
|
/* @__PURE__ */ jsxs117("div", { className: style_module_default6.contentContainer, children: [
|
|
8945
9035
|
(tag || icon || onClose) && /* @__PURE__ */ jsxs117("div", { className: style_module_default6.heading, children: [
|
|
8946
|
-
tag && /* @__PURE__ */
|
|
8947
|
-
icon && /* @__PURE__ */
|
|
8948
|
-
/* @__PURE__ */
|
|
8949
|
-
onClose && /* @__PURE__ */
|
|
9036
|
+
tag && /* @__PURE__ */ jsx173("span", { className: popoverTagVariants(), children: tag }),
|
|
9037
|
+
icon && /* @__PURE__ */ jsx173(Icon, { name: icon.name, size: "xs", thick: icon.thick, fill: icon.fill }),
|
|
9038
|
+
/* @__PURE__ */ jsx173("p", { className: popoverTitleVariants(), children: title }),
|
|
9039
|
+
onClose && /* @__PURE__ */ jsx173(
|
|
8950
9040
|
PopoverPrimitive.PopoverClose,
|
|
8951
9041
|
{
|
|
8952
9042
|
className: style_module_default6.closeButton,
|
|
8953
9043
|
onClick: () => {
|
|
8954
9044
|
onClose();
|
|
8955
9045
|
},
|
|
8956
|
-
children: /* @__PURE__ */
|
|
9046
|
+
children: /* @__PURE__ */ jsx173(Icon, { name: "close-fill", size: "s", fill: true, thick: true, type: "neutral-label-static-primary" })
|
|
8957
9047
|
}
|
|
8958
9048
|
)
|
|
8959
9049
|
] }),
|
|
8960
|
-
description && /* @__PURE__ */
|
|
8961
|
-
onConfirm && /* @__PURE__ */
|
|
9050
|
+
description && /* @__PURE__ */ jsx173("p", { className: popoverDescriptionVariants(), children: description }),
|
|
9051
|
+
onConfirm && /* @__PURE__ */ jsx173("div", { className: popoverFooterVariants(), children: /* @__PURE__ */ jsx173(
|
|
8962
9052
|
TextButton,
|
|
8963
9053
|
{
|
|
8964
9054
|
level: "inverse-static",
|
|
@@ -8970,11 +9060,11 @@ var PopoverContent = React3.forwardRef(
|
|
|
8970
9060
|
) }),
|
|
8971
9061
|
children
|
|
8972
9062
|
] }),
|
|
8973
|
-
/* @__PURE__ */
|
|
9063
|
+
/* @__PURE__ */ jsx173(PopoverPrimitive.Arrow, { asChild: true, children: /* @__PURE__ */ jsx173(PopoverAnchor, { className: clsx9(popoverAnchorVariants({ level })) }) })
|
|
8974
9064
|
]
|
|
8975
9065
|
}
|
|
8976
9066
|
),
|
|
8977
|
-
isOverlay && /* @__PURE__ */
|
|
9067
|
+
isOverlay && /* @__PURE__ */ jsx173("div", { "data-radix-popper-overlay": true, className: style_module_default6.overlay })
|
|
8978
9068
|
] }) })
|
|
8979
9069
|
);
|
|
8980
9070
|
var Popover = Object.assign(PopoverRoot, {
|
|
@@ -8997,14 +9087,14 @@ var style_module_default8 = {
|
|
|
8997
9087
|
// src/components/Tooltip/index.tsx
|
|
8998
9088
|
import { cva as cva7 } from "cva";
|
|
8999
9089
|
import clsx10 from "clsx";
|
|
9000
|
-
import { jsx as
|
|
9090
|
+
import { jsx as jsx174 } from "react/jsx-runtime";
|
|
9001
9091
|
var DEFAULT_OFFSET2 = "medium";
|
|
9002
9092
|
var tooltipVariants = cva7({ base: [style_module_default8.tooltip, "lp-sys-typo-caption1-normal-medium"] });
|
|
9003
9093
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
9004
|
-
var TooltipRoot = /* @__PURE__ */ __name(({ children, ...props }) => /* @__PURE__ */
|
|
9005
|
-
var TooltipTrigger = /* @__PURE__ */ __name(({ by }) => /* @__PURE__ */
|
|
9094
|
+
var TooltipRoot = /* @__PURE__ */ __name(({ children, ...props }) => /* @__PURE__ */ jsx174(TooltipPrimitive.Root, { delayDuration: 0, ...props, children }), "TooltipRoot");
|
|
9095
|
+
var TooltipTrigger = /* @__PURE__ */ __name(({ by }) => /* @__PURE__ */ jsx174(TooltipPrimitive.Trigger, { asChild: true, children: by }), "TooltipTrigger");
|
|
9006
9096
|
var TooltipContent = forwardRef9(
|
|
9007
|
-
({ description, position = "top", className, offset = DEFAULT_OFFSET2, collisionPadding, ...props }, ref) => /* @__PURE__ */
|
|
9097
|
+
({ description, position = "top", className, offset = DEFAULT_OFFSET2, collisionPadding, ...props }, ref) => /* @__PURE__ */ jsx174(
|
|
9008
9098
|
TooltipPrimitive.Content,
|
|
9009
9099
|
{
|
|
9010
9100
|
ref,
|
|
@@ -9013,7 +9103,7 @@ var TooltipContent = forwardRef9(
|
|
|
9013
9103
|
collisionPadding,
|
|
9014
9104
|
className: clsx10(tooltipVariants(), className),
|
|
9015
9105
|
...props,
|
|
9016
|
-
children: /* @__PURE__ */
|
|
9106
|
+
children: /* @__PURE__ */ jsx174("p", { className: style_module_default8.tooltipContent, children: description })
|
|
9017
9107
|
}
|
|
9018
9108
|
)
|
|
9019
9109
|
);
|
|
@@ -9048,7 +9138,7 @@ var style_module_default9 = {
|
|
|
9048
9138
|
|
|
9049
9139
|
// src/components/IconButton/index.tsx
|
|
9050
9140
|
import { Slot } from "@radix-ui/react-slot";
|
|
9051
|
-
import { jsx as
|
|
9141
|
+
import { jsx as jsx175 } from "react/jsx-runtime";
|
|
9052
9142
|
var iconButtonSizeIconSizeMap = {
|
|
9053
9143
|
l: "m",
|
|
9054
9144
|
m: "s",
|
|
@@ -9122,14 +9212,14 @@ var IconButton = forwardRef10(
|
|
|
9122
9212
|
...rest
|
|
9123
9213
|
}, ref) => {
|
|
9124
9214
|
const Comp = asChild ? Slot : "button";
|
|
9125
|
-
return /* @__PURE__ */
|
|
9215
|
+
return /* @__PURE__ */ jsx175(
|
|
9126
9216
|
Comp,
|
|
9127
9217
|
{
|
|
9128
9218
|
...rest,
|
|
9129
9219
|
className: clsx11(iconButtonVariants({ level, size, fill }), className),
|
|
9130
9220
|
ref,
|
|
9131
9221
|
disabled: disabled && !isLoading,
|
|
9132
|
-
children: isLoading ? /* @__PURE__ */
|
|
9222
|
+
children: isLoading ? /* @__PURE__ */ jsx175(ButtonLoading, { size: iconButtonLoadingSizeMap[size], level }) : /* @__PURE__ */ jsx175(
|
|
9133
9223
|
Icon,
|
|
9134
9224
|
{
|
|
9135
9225
|
size: iconButtonSizeIconSizeMap[size],
|
|
@@ -9181,7 +9271,7 @@ var style_module_default11 = {
|
|
|
9181
9271
|
|
|
9182
9272
|
// src/components/Label/index.tsx
|
|
9183
9273
|
import { cva as cva9 } from "cva";
|
|
9184
|
-
import { jsx as
|
|
9274
|
+
import { jsx as jsx176 } from "react/jsx-runtime";
|
|
9185
9275
|
var defaultLabelVariants = cva9({
|
|
9186
9276
|
base: ["lp-sys-typo-paragraph2-normal-medium", style_module_default11.label],
|
|
9187
9277
|
variants: {
|
|
@@ -9222,7 +9312,7 @@ var Label = forwardRef11(
|
|
|
9222
9312
|
error = false,
|
|
9223
9313
|
...props
|
|
9224
9314
|
}, ref) => {
|
|
9225
|
-
return /* @__PURE__ */
|
|
9315
|
+
return /* @__PURE__ */ jsx176(
|
|
9226
9316
|
LabelPrimitive.Root,
|
|
9227
9317
|
{
|
|
9228
9318
|
ref,
|
|
@@ -9234,17 +9324,17 @@ var Label = forwardRef11(
|
|
|
9234
9324
|
);
|
|
9235
9325
|
|
|
9236
9326
|
// src/components/CheckBox/index.tsx
|
|
9237
|
-
import { Fragment as
|
|
9327
|
+
import { Fragment as Fragment6, jsx as jsx177, jsxs as jsxs118 } from "react/jsx-runtime";
|
|
9238
9328
|
var Checkbox = forwardRef12(
|
|
9239
9329
|
({ className, label, description, ...props }, ref) => {
|
|
9240
9330
|
const CheckboxWrapper = /* @__PURE__ */ __name(({ children }) => label ? /* @__PURE__ */ jsxs118(Label, { position: "right", htmlFor: props.id, children: [
|
|
9241
9331
|
/* @__PURE__ */ jsxs118("div", { className: style_module_default10["label-wrapper"], children: [
|
|
9242
9332
|
label,
|
|
9243
|
-
/* @__PURE__ */
|
|
9333
|
+
/* @__PURE__ */ jsx177(Paragraph, { className: style_module_default10.description, size: 3, type: "normal", weight: "regular", children: description })
|
|
9244
9334
|
] }),
|
|
9245
9335
|
children
|
|
9246
|
-
] }) : /* @__PURE__ */
|
|
9247
|
-
return /* @__PURE__ */
|
|
9336
|
+
] }) : /* @__PURE__ */ jsx177(Fragment6, { children }), "CheckboxWrapper");
|
|
9337
|
+
return /* @__PURE__ */ jsx177(CheckboxWrapper, { children: /* @__PURE__ */ jsx177(CheckboxPrimitive.Root, { className: clsx13(style_module_default10.checkbox, className), ref, ...props, children: /* @__PURE__ */ jsx177(CheckboxPrimitive.Indicator, { className: style_module_default10["checkbox-indicator"], children: /* @__PURE__ */ jsx177(Icon, { name: "check-mark", thick: true, size: "xs", type: "inverse-label-primary" }) }) }) });
|
|
9248
9338
|
}
|
|
9249
9339
|
);
|
|
9250
9340
|
|
|
@@ -9263,19 +9353,19 @@ var style_module_default12 = {
|
|
|
9263
9353
|
};
|
|
9264
9354
|
|
|
9265
9355
|
// src/components/Radio/index.tsx
|
|
9266
|
-
import { Fragment as
|
|
9267
|
-
var RadioIndicator = /* @__PURE__ */ __name(() => /* @__PURE__ */
|
|
9268
|
-
var RadioRoot = forwardRef13(({ className, ...props }, ref) => /* @__PURE__ */
|
|
9356
|
+
import { Fragment as Fragment7, jsx as jsx178, jsxs as jsxs119 } from "react/jsx-runtime";
|
|
9357
|
+
var RadioIndicator = /* @__PURE__ */ __name(() => /* @__PURE__ */ jsx178("svg", { xmlns: "http://www.w3.org/2000/svg", width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", children: /* @__PURE__ */ jsx178("circle", { cx: "5", cy: "5", r: "5", fill: "#313133" }) }), "RadioIndicator");
|
|
9358
|
+
var RadioRoot = forwardRef13(({ className, ...props }, ref) => /* @__PURE__ */ jsx178(RadioGroupPrimitive.Root, { className: clsx14(style_module_default12.radio, className), ...props }));
|
|
9269
9359
|
var RadioItem = forwardRef13(
|
|
9270
9360
|
({ className, label, description, ...props }, ref) => {
|
|
9271
9361
|
const RadioItemWrapper = /* @__PURE__ */ __name(({ children }) => label ? /* @__PURE__ */ jsxs119(Label, { position: "right", htmlFor: props.id, children: [
|
|
9272
9362
|
/* @__PURE__ */ jsxs119("div", { className: style_module_default12["label-wrapper"], children: [
|
|
9273
9363
|
label,
|
|
9274
|
-
/* @__PURE__ */
|
|
9364
|
+
/* @__PURE__ */ jsx178(Paragraph, { className: style_module_default12.description, size: 3, type: "normal", weight: "regular", children: description })
|
|
9275
9365
|
] }),
|
|
9276
9366
|
children
|
|
9277
|
-
] }) : /* @__PURE__ */
|
|
9278
|
-
return /* @__PURE__ */
|
|
9367
|
+
] }) : /* @__PURE__ */ jsx178(Fragment7, { children }), "RadioItemWrapper");
|
|
9368
|
+
return /* @__PURE__ */ jsx178(RadioItemWrapper, { children: /* @__PURE__ */ jsx178(RadioGroupPrimitive.Item, { ref, className: clsx14(style_module_default12["radio-item"], className), ...props, children: /* @__PURE__ */ jsx178(RadioGroupPrimitive.Indicator, { className: style_module_default12.indicator, children: /* @__PURE__ */ jsx178(RadioIndicator, {}) }) }) });
|
|
9279
9369
|
}
|
|
9280
9370
|
);
|
|
9281
9371
|
var Radio = Object.assign(RadioRoot, {
|
|
@@ -9317,7 +9407,7 @@ var style_module_default13 = {
|
|
|
9317
9407
|
import { cva as cva10 } from "cva";
|
|
9318
9408
|
import clsx15 from "clsx";
|
|
9319
9409
|
import { flushSync } from "react-dom";
|
|
9320
|
-
import { Fragment as
|
|
9410
|
+
import { Fragment as Fragment8, jsx as jsx179, jsxs as jsxs120 } from "react/jsx-runtime";
|
|
9321
9411
|
var defaultTextfieldVariants = cva10({
|
|
9322
9412
|
base: style_module_default13.textfield,
|
|
9323
9413
|
variants: {
|
|
@@ -9387,7 +9477,7 @@ var Textfield = forwardRef14((props, ref) => {
|
|
|
9387
9477
|
}, "handleDeidentify");
|
|
9388
9478
|
useImperativeHandle(ref, () => inputRef.current);
|
|
9389
9479
|
return /* @__PURE__ */ jsxs120("div", { className: style_module_default13["textfield-container"], children: [
|
|
9390
|
-
/* @__PURE__ */
|
|
9480
|
+
/* @__PURE__ */ jsx179(
|
|
9391
9481
|
"div",
|
|
9392
9482
|
{
|
|
9393
9483
|
className: clsx15(defaultTextfieldVariants({ color }), {
|
|
@@ -9396,7 +9486,7 @@ var Textfield = forwardRef14((props, ref) => {
|
|
|
9396
9486
|
}),
|
|
9397
9487
|
onClick: handleTextfieldClick,
|
|
9398
9488
|
children: /* @__PURE__ */ jsxs120("div", { className: style_module_default13["input-wrapper"], children: [
|
|
9399
|
-
/* @__PURE__ */
|
|
9489
|
+
/* @__PURE__ */ jsx179(
|
|
9400
9490
|
"input",
|
|
9401
9491
|
{
|
|
9402
9492
|
className: clsx15(style_module_default13.input, {
|
|
@@ -9411,7 +9501,7 @@ var Textfield = forwardRef14((props, ref) => {
|
|
|
9411
9501
|
...rest
|
|
9412
9502
|
}
|
|
9413
9503
|
),
|
|
9414
|
-
/* @__PURE__ */
|
|
9504
|
+
/* @__PURE__ */ jsx179(
|
|
9415
9505
|
Label,
|
|
9416
9506
|
{
|
|
9417
9507
|
className: clsx15(style_module_default13.label, {
|
|
@@ -9424,7 +9514,7 @@ var Textfield = forwardRef14((props, ref) => {
|
|
|
9424
9514
|
}
|
|
9425
9515
|
),
|
|
9426
9516
|
/* @__PURE__ */ jsxs120("div", { className: style_module_default13["input-action-buttons"], children: [
|
|
9427
|
-
textfieldValue && !disabled && /* @__PURE__ */
|
|
9517
|
+
textfieldValue && !disabled && /* @__PURE__ */ jsx179(
|
|
9428
9518
|
IconButton,
|
|
9429
9519
|
{
|
|
9430
9520
|
tabIndex: -1,
|
|
@@ -9442,7 +9532,7 @@ var Textfield = forwardRef14((props, ref) => {
|
|
|
9442
9532
|
}
|
|
9443
9533
|
}
|
|
9444
9534
|
),
|
|
9445
|
-
isPassword && !disabled && /* @__PURE__ */
|
|
9535
|
+
isPassword && !disabled && /* @__PURE__ */ jsx179(
|
|
9446
9536
|
IconButton,
|
|
9447
9537
|
{
|
|
9448
9538
|
tabIndex: -1,
|
|
@@ -9460,15 +9550,15 @@ var Textfield = forwardRef14((props, ref) => {
|
|
|
9460
9550
|
}
|
|
9461
9551
|
}
|
|
9462
9552
|
),
|
|
9463
|
-
buttonProps && /* @__PURE__ */
|
|
9553
|
+
buttonProps && /* @__PURE__ */ jsx179(Button, { ...buttonProps, size: "m", type: "button" })
|
|
9464
9554
|
] })
|
|
9465
9555
|
] })
|
|
9466
9556
|
}
|
|
9467
9557
|
),
|
|
9468
9558
|
displayFooter && /* @__PURE__ */ jsxs120("div", { className: style_module_default13.footer, children: [
|
|
9469
|
-
/* @__PURE__ */
|
|
9470
|
-
/* @__PURE__ */
|
|
9471
|
-
/* @__PURE__ */
|
|
9559
|
+
/* @__PURE__ */ jsx179("div", { className: style_module_default13["error-wrapper"], children: error && /* @__PURE__ */ jsxs120(Fragment8, { children: [
|
|
9560
|
+
/* @__PURE__ */ jsx179(Icon, { name: "exclamationmark-fill", fill: true, thick: true, size: "xs", type: "function-label-negative" }),
|
|
9561
|
+
/* @__PURE__ */ jsx179(Caption, { size: 3, type: "normal", weight: "regular", className: style_module_default13["error-message"], children: error })
|
|
9472
9562
|
] }) }),
|
|
9473
9563
|
maxCharacter && /* @__PURE__ */ jsxs120(Caption, { className: style_module_default13.character, size: 3, type: "normal", weight: "regular", children: [
|
|
9474
9564
|
isControlled ? controlledValue.length : value.length,
|
|
@@ -9497,29 +9587,29 @@ var style_module_default14 = {
|
|
|
9497
9587
|
|
|
9498
9588
|
// src/components/Slider/index.tsx
|
|
9499
9589
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
9500
|
-
import { Fragment as
|
|
9590
|
+
import { Fragment as Fragment9, jsx as jsx180, jsxs as jsxs121 } from "react/jsx-runtime";
|
|
9501
9591
|
var SliderRoot = forwardRef15((props, ref) => {
|
|
9502
9592
|
const { label, tooltip, rangeLeft, rangeRight, min, max, step = 50, ...rest } = props;
|
|
9503
|
-
return /* @__PURE__ */
|
|
9504
|
-
/* @__PURE__ */
|
|
9593
|
+
return /* @__PURE__ */ jsx180(Fragment9, { children: /* @__PURE__ */ jsxs121(Tooltip.Provider, { children: [
|
|
9594
|
+
/* @__PURE__ */ jsx180(Label, { level: "secondary", size: "m", offset: "high", className: style_module_default14.label, children: label }),
|
|
9505
9595
|
/* @__PURE__ */ jsxs121("div", { className: style_module_default14["slider-wrapper"], children: [
|
|
9506
9596
|
/* @__PURE__ */ jsxs121("div", { className: style_module_default14["slider-option-wrapper"], children: [
|
|
9507
|
-
/* @__PURE__ */
|
|
9508
|
-
/* @__PURE__ */
|
|
9597
|
+
/* @__PURE__ */ jsx180(Icon, { name: rangeLeft.icon, size: "xs" }),
|
|
9598
|
+
/* @__PURE__ */ jsx180(Caption, { size: 1, type: "normal", weight: "medium", className: style_module_default14.optionText, children: rangeLeft.text })
|
|
9509
9599
|
] }),
|
|
9510
9600
|
/* @__PURE__ */ jsxs121(SliderPrimitive.Root, { ...rest, step, className: style_module_default14["slider-root"], ref, children: [
|
|
9511
9601
|
/* @__PURE__ */ jsxs121(SliderPrimitive.Track, { className: style_module_default14["slider-track"], children: [
|
|
9512
|
-
Array.from({ length: 100 / step + 1 }).map((_, index) => /* @__PURE__ */
|
|
9513
|
-
/* @__PURE__ */
|
|
9602
|
+
Array.from({ length: 100 / step + 1 }).map((_, index) => /* @__PURE__ */ jsx180("span", { className: style_module_default14["slider-step"] }, index)),
|
|
9603
|
+
/* @__PURE__ */ jsx180(SliderPrimitive.Range, { className: style_module_default14["slider-range"] })
|
|
9514
9604
|
] }),
|
|
9515
9605
|
/* @__PURE__ */ jsxs121(Tooltip, { children: [
|
|
9516
|
-
/* @__PURE__ */
|
|
9517
|
-
/* @__PURE__ */
|
|
9606
|
+
/* @__PURE__ */ jsx180(Tooltip.Trigger, { by: /* @__PURE__ */ jsx180(SliderPrimitive.Thumb, { className: style_module_default14["slider-thumb"] }) }),
|
|
9607
|
+
/* @__PURE__ */ jsx180(Tooltip.Content, { description: tooltip })
|
|
9518
9608
|
] })
|
|
9519
9609
|
] }),
|
|
9520
9610
|
/* @__PURE__ */ jsxs121("div", { className: style_module_default14["slider-option-wrapper"], children: [
|
|
9521
|
-
/* @__PURE__ */
|
|
9522
|
-
/* @__PURE__ */
|
|
9611
|
+
/* @__PURE__ */ jsx180(Icon, { name: rangeRight.icon, size: "xs" }),
|
|
9612
|
+
/* @__PURE__ */ jsx180(Caption, { size: 1, type: "normal", weight: "medium", className: style_module_default14.optionText, children: rangeRight.text })
|
|
9523
9613
|
] })
|
|
9524
9614
|
] })
|
|
9525
9615
|
] }) });
|
|
@@ -9563,11 +9653,11 @@ import {
|
|
|
9563
9653
|
useState as useState4
|
|
9564
9654
|
} from "react";
|
|
9565
9655
|
import clsx16 from "clsx";
|
|
9566
|
-
import { jsx as
|
|
9567
|
-
var Badge = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */
|
|
9656
|
+
import { jsx as jsx181, jsxs as jsxs122 } from "react/jsx-runtime";
|
|
9657
|
+
var Badge = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */ jsx181("div", { className: style_module_default15.badgeContainer, children: /* @__PURE__ */ jsx181(Caption, { className: style_module_default15.badge, size: 2, type: "normal", weight: "medium", children }) }), "Badge");
|
|
9568
9658
|
var SelectContent = forwardRef16((props, ref) => {
|
|
9569
9659
|
const { id, isResponsive, popSide, sideOffset, listLabel, children, container } = props;
|
|
9570
|
-
return /* @__PURE__ */
|
|
9660
|
+
return /* @__PURE__ */ jsx181(SelectPrimitive.Portal, { container, children: /* @__PURE__ */ jsx181(
|
|
9571
9661
|
SelectPrimitive.Content,
|
|
9572
9662
|
{
|
|
9573
9663
|
id: `select-content-${id}`,
|
|
@@ -9590,11 +9680,11 @@ var SelectContent = forwardRef16((props, ref) => {
|
|
|
9590
9680
|
sideOffset,
|
|
9591
9681
|
avoidCollisions: false,
|
|
9592
9682
|
children: /* @__PURE__ */ jsxs122(ScrollArea.Root, { className: style_module_default15.scrollAreaRoot, type: "always", children: [
|
|
9593
|
-
/* @__PURE__ */
|
|
9594
|
-
listLabel && /* @__PURE__ */
|
|
9683
|
+
/* @__PURE__ */ jsx181(SelectPrimitive.Viewport, { asChild: true, children: /* @__PURE__ */ jsx181(ScrollArea.Viewport, { className: style_module_default15.scrollAreaViewport, style: { maxHeight: "268px", overflowY: "auto" }, children: /* @__PURE__ */ jsxs122(SelectPrimitive.Group, { children: [
|
|
9684
|
+
listLabel && /* @__PURE__ */ jsx181(SelectPrimitive.Label, { asChild: true, children: /* @__PURE__ */ jsx181(Label, { className: style_module_default15["desktop-label"], level: "secondary", size: "m", offset: "low", children: listLabel }) }),
|
|
9595
9685
|
children
|
|
9596
9686
|
] }) }) }),
|
|
9597
|
-
/* @__PURE__ */
|
|
9687
|
+
/* @__PURE__ */ jsx181(ScrollArea.Scrollbar, { className: style_module_default15.scrollAreaScrollbar, orientation: "vertical", children: /* @__PURE__ */ jsx181(ScrollArea.Thumb, { className: style_module_default15.scrollAreaThumb }) })
|
|
9598
9688
|
] })
|
|
9599
9689
|
}
|
|
9600
9690
|
) });
|
|
@@ -9624,8 +9714,8 @@ var SelectRoot = forwardRef16((props, ref) => {
|
|
|
9624
9714
|
}, [open]);
|
|
9625
9715
|
return /* @__PURE__ */ jsxs122("div", { children: [
|
|
9626
9716
|
/* @__PURE__ */ jsxs122("div", { className: style_module_default15["label-container"], children: [
|
|
9627
|
-
/* @__PURE__ */
|
|
9628
|
-
badge && /* @__PURE__ */
|
|
9717
|
+
/* @__PURE__ */ jsx181(Label, { className: style_module_default15["select-label"], level: "secondary", size: "m", offset: "low", htmlFor: id, children: label }),
|
|
9718
|
+
badge && /* @__PURE__ */ jsx181(Badge, { children: badge })
|
|
9629
9719
|
] }),
|
|
9630
9720
|
/* @__PURE__ */ jsxs122(
|
|
9631
9721
|
SelectPrimitive.Root,
|
|
@@ -9638,10 +9728,10 @@ var SelectRoot = forwardRef16((props, ref) => {
|
|
|
9638
9728
|
},
|
|
9639
9729
|
children: [
|
|
9640
9730
|
/* @__PURE__ */ jsxs122(SelectPrimitive.Trigger, { className: style_module_default15.trigger, ref, id, children: [
|
|
9641
|
-
/* @__PURE__ */
|
|
9642
|
-
/* @__PURE__ */
|
|
9731
|
+
/* @__PURE__ */ jsx181(SelectPrimitive.Value, { className: style_module_default15.placeholder, placeholder }),
|
|
9732
|
+
/* @__PURE__ */ jsx181(SelectPrimitive.Icon, { className: style_module_default15.openIcon, children: /* @__PURE__ */ jsx181(Icon, { name: "arrow-drop-down", fill: true, thick: true, size: "xs" }) })
|
|
9643
9733
|
] }),
|
|
9644
|
-
/* @__PURE__ */
|
|
9734
|
+
/* @__PURE__ */ jsx181(SelectContent, { ...contentProps })
|
|
9645
9735
|
]
|
|
9646
9736
|
}
|
|
9647
9737
|
)
|
|
@@ -9658,9 +9748,9 @@ var SelectItem = /* @__PURE__ */ __name(({ value, text, disabled, icon, onClick
|
|
|
9658
9748
|
onClick?.();
|
|
9659
9749
|
},
|
|
9660
9750
|
children: [
|
|
9661
|
-
/* @__PURE__ */
|
|
9662
|
-
icon && /* @__PURE__ */
|
|
9663
|
-
/* @__PURE__ */
|
|
9751
|
+
/* @__PURE__ */ jsx181(SelectPrimitive.ItemText, { children: /* @__PURE__ */ jsx181(Paragraph, { size: 3, type: "normal", weight: "medium", children: text ?? value }) }),
|
|
9752
|
+
icon && /* @__PURE__ */ jsx181(SelectPrimitive.Icon, { className: style_module_default15.icon, children: /* @__PURE__ */ jsx181(Icon, { size: "xs", ...icon }) }),
|
|
9753
|
+
/* @__PURE__ */ jsx181(SelectPrimitive.ItemIndicator, { className: style_module_default15.itemIndicator, children: /* @__PURE__ */ jsx181(Icon, { fill: false, thick: true, size: "xs", name: "check-mark", type: "brand-label-primary" }) })
|
|
9664
9754
|
]
|
|
9665
9755
|
}
|
|
9666
9756
|
), "SelectItem");
|
|
@@ -9680,11 +9770,11 @@ import { useState as useState5 } from "react";
|
|
|
9680
9770
|
|
|
9681
9771
|
// src/hooks/collection.tsx
|
|
9682
9772
|
import { createContext, useContext, useMemo } from "react";
|
|
9683
|
-
import { jsx as
|
|
9773
|
+
import { jsx as jsx182 } from "react/jsx-runtime";
|
|
9684
9774
|
var CollectionContext = createContext(void 0);
|
|
9685
9775
|
var CollectionProvider = /* @__PURE__ */ __name(({ value, onChangeValue, children }) => {
|
|
9686
9776
|
const contextValue = useMemo(() => ({ value, onChangeValue }), [value, onChangeValue]);
|
|
9687
|
-
return /* @__PURE__ */
|
|
9777
|
+
return /* @__PURE__ */ jsx182(CollectionContext.Provider, { value: contextValue, children });
|
|
9688
9778
|
}, "CollectionProvider");
|
|
9689
9779
|
var useCollectionContext = /* @__PURE__ */ __name(() => {
|
|
9690
9780
|
const context = useContext(CollectionContext);
|
|
@@ -9696,9 +9786,9 @@ var useCollectionContext = /* @__PURE__ */ __name(() => {
|
|
|
9696
9786
|
|
|
9697
9787
|
// src/components/List/index.tsx
|
|
9698
9788
|
import clsx17 from "clsx";
|
|
9699
|
-
import { jsx as
|
|
9789
|
+
import { jsx as jsx183, jsxs as jsxs123 } from "react/jsx-runtime";
|
|
9700
9790
|
var ListRoot = /* @__PURE__ */ __name(({ children, className, ...props }) => {
|
|
9701
|
-
return /* @__PURE__ */
|
|
9791
|
+
return /* @__PURE__ */ jsx183(CollectionProvider, { ...props, children: /* @__PURE__ */ jsx183("ul", { className: clsx17(style_module_default16.list, className), children }) });
|
|
9702
9792
|
}, "ListRoot");
|
|
9703
9793
|
var Item3 = /* @__PURE__ */ __name(({ value, text, disabled, icon, onClick }) => {
|
|
9704
9794
|
const [isFocused, setIsFocused] = useState5(false);
|
|
@@ -9723,8 +9813,8 @@ var Item3 = /* @__PURE__ */ __name(({ value, text, disabled, icon, onClick }) =>
|
|
|
9723
9813
|
onChangeValue?.(value);
|
|
9724
9814
|
},
|
|
9725
9815
|
children: [
|
|
9726
|
-
/* @__PURE__ */
|
|
9727
|
-
(icon || isSelected) && /* @__PURE__ */
|
|
9816
|
+
/* @__PURE__ */ jsx183(Paragraph, { size: 3, type: "normal", weight: "medium", children: text }),
|
|
9817
|
+
(icon || isSelected) && /* @__PURE__ */ jsx183(Icon, { className: style_module_default16.icon, size: "xs", ...iconProps })
|
|
9728
9818
|
]
|
|
9729
9819
|
}
|
|
9730
9820
|
);
|
|
@@ -9741,6 +9831,8 @@ export {
|
|
|
9741
9831
|
IconButton,
|
|
9742
9832
|
Label,
|
|
9743
9833
|
List,
|
|
9834
|
+
Media,
|
|
9835
|
+
MediaContextProvider,
|
|
9744
9836
|
Paragraph,
|
|
9745
9837
|
Popover,
|
|
9746
9838
|
Radio,
|
|
@@ -9751,6 +9843,7 @@ export {
|
|
|
9751
9843
|
Title2 as Title,
|
|
9752
9844
|
Toaster,
|
|
9753
9845
|
Tooltip,
|
|
9846
|
+
Typography,
|
|
9754
9847
|
arrayToStyleObject,
|
|
9755
9848
|
colorKeys,
|
|
9756
9849
|
getIconComponent,
|
|
@@ -9758,6 +9851,7 @@ export {
|
|
|
9758
9851
|
iconMap,
|
|
9759
9852
|
isEmptyObject,
|
|
9760
9853
|
objectToArray,
|
|
9854
|
+
rootMediaStyle,
|
|
9761
9855
|
useToast
|
|
9762
9856
|
};
|
|
9763
9857
|
//# sourceMappingURL=index.mjs.map
|