@khipu/design-system 0.1.0-alpha.55 → 0.2.0-alpha.2
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/dist/beercss/khipu-beercss.css +198 -32
- package/dist/beercss/khipu-beercss.js +19 -1
- package/dist/beercss/khipu-beercss.min.css +1 -1
- package/dist/beercss/khipu-beercss.min.js +1 -1
- package/dist/beercss/metadata.json +4 -4
- package/dist/index.d.mts +549 -607
- package/dist/index.d.ts +549 -607
- package/dist/index.js +980 -1959
- package/dist/index.mjs +888 -1862
- package/package.json +6 -5
package/dist/index.js
CHANGED
|
@@ -30,74 +30,65 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
|
-
Box: () => import_Box5.default,
|
|
34
|
-
CheckCircleIcon: () => import_CheckCircle.default,
|
|
35
|
-
CheckIcon: () => import_Check.default,
|
|
36
|
-
ChevronLeftIcon: () => import_ChevronLeft2.default,
|
|
37
|
-
ChevronRightIcon: () => import_ChevronRight.default,
|
|
38
|
-
CloseIcon: () => import_Close4.default,
|
|
39
|
-
Container: () => import_Container.default,
|
|
40
|
-
ContentCopyIcon: () => import_ContentCopy.default,
|
|
41
|
-
Divider: () => import_Divider.default,
|
|
42
|
-
ErrorIcon: () => import_Error.default,
|
|
43
|
-
ExpandLessIcon: () => import_ExpandLess.default,
|
|
44
|
-
ExpandMoreIcon: () => import_ExpandMore2.default,
|
|
45
|
-
Grid: () => import_Grid.default,
|
|
46
|
-
IconButton: () => import_IconButton4.default,
|
|
47
|
-
InfoIcon: () => import_Info.default,
|
|
48
|
-
InputAdornment: () => import_InputAdornment2.default,
|
|
49
33
|
KdsAccordion: () => KdsAccordion,
|
|
50
34
|
KdsAccordionDetails: () => KdsAccordionDetails,
|
|
51
35
|
KdsAccordionSummary: () => KdsAccordionSummary,
|
|
52
36
|
KdsAlert: () => KdsAlert,
|
|
37
|
+
KdsBankList: () => KdsBankList,
|
|
38
|
+
KdsBankModal: () => KdsBankModal,
|
|
39
|
+
KdsBankRow: () => KdsBankRow,
|
|
40
|
+
KdsBottomSheet: () => KdsBottomSheet,
|
|
53
41
|
KdsButton: () => KdsButton,
|
|
54
42
|
KdsCard: () => KdsCard,
|
|
55
|
-
|
|
56
|
-
|
|
43
|
+
KdsCardBody: () => KdsCardBody,
|
|
44
|
+
KdsCardFooter: () => KdsCardFooter,
|
|
57
45
|
KdsCardHeader: () => KdsCardHeader,
|
|
46
|
+
KdsCardPlan: () => KdsCardPlan,
|
|
47
|
+
KdsCardSelector: () => KdsCardSelector,
|
|
58
48
|
KdsCheckbox: () => KdsCheckbox,
|
|
59
49
|
KdsChip: () => KdsChip,
|
|
50
|
+
KdsCopyRow: () => KdsCopyRow,
|
|
51
|
+
KdsCopyableTable: () => KdsCopyableTable,
|
|
52
|
+
KdsCountdown: () => KdsCountdown,
|
|
53
|
+
KdsDivider: () => KdsDivider,
|
|
54
|
+
KdsExpandPanel: () => KdsExpandPanel,
|
|
55
|
+
KdsInvoiceSticky: () => KdsInvoiceSticky,
|
|
60
56
|
KdsLinearProgress: () => KdsLinearProgress,
|
|
61
57
|
KdsLogoHeader: () => KdsLogoHeader,
|
|
62
58
|
KdsLogoHeaderCloseButton: () => KdsLogoHeaderCloseButton,
|
|
63
59
|
KdsLogoHeaderCode: () => KdsLogoHeaderCode,
|
|
64
60
|
KdsLogoHeaderLogo: () => KdsLogoHeaderLogo,
|
|
65
61
|
KdsLogoHeaderSeparator: () => KdsLogoHeaderSeparator,
|
|
66
|
-
KdsMenuItem: () => KdsMenuItem,
|
|
67
62
|
KdsModal: () => KdsModal,
|
|
68
|
-
|
|
63
|
+
KdsQrRow: () => KdsQrRow,
|
|
69
64
|
KdsRadioGroup: () => KdsRadioGroup,
|
|
65
|
+
KdsRecapList: () => KdsRecapList,
|
|
66
|
+
KdsSectionNote: () => KdsSectionNote,
|
|
67
|
+
KdsSecureFooter: () => KdsSecureFooter,
|
|
68
|
+
KdsSegmentedTabs: () => KdsSegmentedTabs,
|
|
70
69
|
KdsSelect: () => KdsSelect,
|
|
71
70
|
KdsSnackbar: () => KdsSnackbar,
|
|
72
71
|
KdsSpinner: () => KdsSpinner,
|
|
72
|
+
KdsStatusBlock: () => KdsStatusBlock,
|
|
73
|
+
KdsStepper: () => KdsStepper,
|
|
73
74
|
KdsTab: () => KdsTab,
|
|
74
75
|
KdsTabPanel: () => KdsTabPanel,
|
|
75
76
|
KdsTabs: () => KdsTabs,
|
|
76
77
|
KdsTextField: () => KdsTextField,
|
|
78
|
+
KdsThemeProvider: () => KdsThemeProvider,
|
|
77
79
|
KdsTooltip: () => KdsTooltip,
|
|
78
80
|
KdsTypography: () => KdsTypography,
|
|
79
|
-
KeyboardArrowDownIcon: () => import_KeyboardArrowDown.default,
|
|
80
|
-
KeyboardArrowUpIcon: () => import_KeyboardArrowUp.default,
|
|
81
|
-
KhipuThemeProvider: () => KhipuThemeProvider,
|
|
82
|
-
Link: () => import_Link.default,
|
|
83
|
-
LockIcon: () => import_Lock.default,
|
|
84
|
-
LockOutlinedIcon: () => import_LockOutlined.default,
|
|
85
|
-
MailOutlineIcon: () => import_MailOutline.default,
|
|
86
|
-
PersonIcon: () => import_Person.default,
|
|
87
|
-
SearchIcon: () => import_Search.default,
|
|
88
|
-
Stack: () => import_Stack.default,
|
|
89
|
-
VisibilityIcon: () => import_Visibility.default,
|
|
90
|
-
VisibilityOffIcon: () => import_VisibilityOff.default,
|
|
91
|
-
WarningIcon: () => import_Warning.default,
|
|
92
81
|
borderRadius: () => borderRadius,
|
|
93
82
|
breakpoints: () => breakpoints,
|
|
83
|
+
clsx: () => import_clsx.clsx,
|
|
94
84
|
colors: () => colors,
|
|
95
85
|
colorsByMode: () => colorsByMode,
|
|
96
86
|
fontFamilies: () => fontFamilies,
|
|
97
87
|
fontSizes: () => fontSizes,
|
|
98
88
|
fontWeights: () => fontWeights,
|
|
99
|
-
|
|
89
|
+
getContrastColor: () => getContrastColor,
|
|
100
90
|
letterSpacings: () => letterSpacings,
|
|
91
|
+
lighten: () => lighten,
|
|
101
92
|
lineHeights: () => lineHeights,
|
|
102
93
|
semanticSpacing: () => semanticSpacing,
|
|
103
94
|
shadows: () => shadows,
|
|
@@ -106,12 +97,62 @@ __export(index_exports, {
|
|
|
106
97
|
tokensByMode: () => tokensByMode,
|
|
107
98
|
transitions: () => transitions,
|
|
108
99
|
typography: () => typography,
|
|
100
|
+
useAutoHide: () => useAutoHide,
|
|
101
|
+
useCopyToClipboard: () => useCopyToClipboard,
|
|
102
|
+
useCountdown: () => useCountdown,
|
|
103
|
+
useTabsKeyboard: () => useTabsKeyboard,
|
|
109
104
|
zIndex: () => zIndex
|
|
110
105
|
});
|
|
111
106
|
module.exports = __toCommonJS(index_exports);
|
|
112
107
|
|
|
113
|
-
// src/
|
|
114
|
-
var
|
|
108
|
+
// src/components/core/utils.ts
|
|
109
|
+
var import_clsx = require("clsx");
|
|
110
|
+
function hexToRgb(hex) {
|
|
111
|
+
let h = hex.replace("#", "");
|
|
112
|
+
if (h.length === 3) {
|
|
113
|
+
h = h[0] + h[0] + h[1] + h[1] + h[2] + h[2];
|
|
114
|
+
}
|
|
115
|
+
return [
|
|
116
|
+
parseInt(h.slice(0, 2), 16),
|
|
117
|
+
parseInt(h.slice(2, 4), 16),
|
|
118
|
+
parseInt(h.slice(4, 6), 16)
|
|
119
|
+
];
|
|
120
|
+
}
|
|
121
|
+
function rgbToHex(r, g, b) {
|
|
122
|
+
const clamp = (v) => Math.max(0, Math.min(255, Math.round(v)));
|
|
123
|
+
return `#${[r, g, b].map((v) => clamp(v).toString(16).padStart(2, "0")).join("")}`;
|
|
124
|
+
}
|
|
125
|
+
function relativeLuminance(r, g, b) {
|
|
126
|
+
const [rs, gs, bs] = [r, g, b].map((c) => {
|
|
127
|
+
const s = c / 255;
|
|
128
|
+
return s <= 0.03928 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4);
|
|
129
|
+
});
|
|
130
|
+
return 0.2126 * rs + 0.7152 * gs + 0.0722 * bs;
|
|
131
|
+
}
|
|
132
|
+
function getContrastColor(hex) {
|
|
133
|
+
const [r, g, b] = hexToRgb(hex);
|
|
134
|
+
return relativeLuminance(r, g, b) > 0.179 ? "#1a1a1a" : "#ffffff";
|
|
135
|
+
}
|
|
136
|
+
function lighten(hex, amount) {
|
|
137
|
+
const [r, g, b] = hexToRgb(hex);
|
|
138
|
+
return rgbToHex(
|
|
139
|
+
r + (255 - r) * amount,
|
|
140
|
+
g + (255 - g) * amount,
|
|
141
|
+
b + (255 - b) * amount
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// src/theme/KdsThemeProvider.tsx
|
|
146
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
147
|
+
function KdsThemeProvider({ primaryColor, mode = "light", children }) {
|
|
148
|
+
const style = primaryColor ? {
|
|
149
|
+
"--primary": primaryColor,
|
|
150
|
+
"--on-primary": getContrastColor(primaryColor),
|
|
151
|
+
"--primary-container": lighten(primaryColor, 0.85),
|
|
152
|
+
"--on-primary-container": primaryColor
|
|
153
|
+
} : void 0;
|
|
154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `kds-theme-root ${mode}`, style, children });
|
|
155
|
+
}
|
|
115
156
|
|
|
116
157
|
// src/tokens/index.ts
|
|
117
158
|
var lightModeColors = {
|
|
@@ -876,6 +917,24 @@ var responsiveTypography = {
|
|
|
876
917
|
// 12px
|
|
877
918
|
}
|
|
878
919
|
};
|
|
920
|
+
var responsiveBaseFontSizes = {
|
|
921
|
+
xs: { mobile: "0.6875rem", tablet: "0.75rem", desktop: "0.75rem" },
|
|
922
|
+
// 11px → 12px
|
|
923
|
+
sm: { mobile: "0.8125rem", tablet: "0.875rem", desktop: "0.875rem" },
|
|
924
|
+
// 13px → 14px
|
|
925
|
+
base: { mobile: "0.875rem", tablet: "1rem", desktop: "1rem" },
|
|
926
|
+
// 14px → 16px
|
|
927
|
+
lg: { mobile: "1rem", tablet: "1.125rem", desktop: "1.125rem" },
|
|
928
|
+
// 16px → 18px
|
|
929
|
+
xl: { mobile: "1.125rem", tablet: "1.25rem", desktop: "1.25rem" },
|
|
930
|
+
// 18px → 20px
|
|
931
|
+
"2xl": { mobile: "1.25rem", tablet: "1.5rem", desktop: "1.5rem" },
|
|
932
|
+
// 20px → 24px
|
|
933
|
+
"3xl": { mobile: "1.5rem", tablet: "1.875rem", desktop: "1.875rem" },
|
|
934
|
+
// 24px → 30px
|
|
935
|
+
"4xl": { mobile: "1.875rem", tablet: "2.25rem", desktop: "2.25rem" }
|
|
936
|
+
// 30px → 36px
|
|
937
|
+
};
|
|
879
938
|
var borderRadius = {
|
|
880
939
|
none: "0px",
|
|
881
940
|
sm: "4px",
|
|
@@ -1006,6 +1065,7 @@ var tokensByMode = {
|
|
|
1006
1065
|
semanticSpacing,
|
|
1007
1066
|
responsiveSpacing,
|
|
1008
1067
|
responsiveTypography,
|
|
1068
|
+
responsiveBaseFontSizes,
|
|
1009
1069
|
borderRadius,
|
|
1010
1070
|
borders,
|
|
1011
1071
|
shadows,
|
|
@@ -1025,6 +1085,7 @@ var tokensByMode = {
|
|
|
1025
1085
|
semanticSpacing,
|
|
1026
1086
|
responsiveSpacing,
|
|
1027
1087
|
responsiveTypography,
|
|
1088
|
+
responsiveBaseFontSizes,
|
|
1028
1089
|
borderRadius,
|
|
1029
1090
|
borders,
|
|
1030
1091
|
shadows,
|
|
@@ -1045,6 +1106,7 @@ var tokens = {
|
|
|
1045
1106
|
semanticSpacing,
|
|
1046
1107
|
responsiveSpacing,
|
|
1047
1108
|
responsiveTypography,
|
|
1109
|
+
responsiveBaseFontSizes,
|
|
1048
1110
|
borderRadius,
|
|
1049
1111
|
borders,
|
|
1050
1112
|
shadows,
|
|
@@ -1053,1494 +1115,278 @@ var tokens = {
|
|
|
1053
1115
|
breakpoints
|
|
1054
1116
|
};
|
|
1055
1117
|
|
|
1056
|
-
// src/
|
|
1057
|
-
var
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1118
|
+
// src/components/core/KdsButton/KdsButton.tsx
|
|
1119
|
+
var import_react = require("react");
|
|
1120
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
1121
|
+
var KdsButton = (0, import_react.forwardRef)(
|
|
1122
|
+
({
|
|
1123
|
+
variant = "primary",
|
|
1124
|
+
size,
|
|
1125
|
+
fullWidth = false,
|
|
1126
|
+
loading = false,
|
|
1127
|
+
disabled = false,
|
|
1128
|
+
startIcon,
|
|
1129
|
+
endIcon,
|
|
1130
|
+
children,
|
|
1131
|
+
className,
|
|
1132
|
+
...props
|
|
1133
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1134
|
+
"button",
|
|
1135
|
+
{
|
|
1136
|
+
ref,
|
|
1137
|
+
className: (0, import_clsx.clsx)(
|
|
1138
|
+
"kds-btn",
|
|
1139
|
+
`kds-btn-${variant}`,
|
|
1140
|
+
size && `kds-btn-${size}`,
|
|
1141
|
+
fullWidth && "kds-btn-block",
|
|
1142
|
+
className
|
|
1143
|
+
),
|
|
1144
|
+
disabled: disabled || loading,
|
|
1145
|
+
"aria-busy": loading || void 0,
|
|
1146
|
+
...props,
|
|
1147
|
+
children: [
|
|
1148
|
+
!loading && startIcon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "kds-icon", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("i", { className: "material-symbols-outlined", children: startIcon }) }),
|
|
1149
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
1150
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "loader small" }),
|
|
1151
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children })
|
|
1152
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children }),
|
|
1153
|
+
!loading && endIcon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "kds-icon", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("i", { className: "material-symbols-outlined", children: endIcon }) })
|
|
1154
|
+
]
|
|
1083
1155
|
}
|
|
1156
|
+
)
|
|
1157
|
+
);
|
|
1158
|
+
KdsButton.displayName = "KdsButton";
|
|
1159
|
+
|
|
1160
|
+
// src/components/core/KdsTextField/KdsTextField.tsx
|
|
1161
|
+
var import_react2 = require("react");
|
|
1162
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
1163
|
+
var KdsTextField = (0, import_react2.forwardRef)(
|
|
1164
|
+
({
|
|
1165
|
+
label,
|
|
1166
|
+
helperText,
|
|
1167
|
+
error,
|
|
1168
|
+
fullWidth = true,
|
|
1169
|
+
readOnly,
|
|
1170
|
+
startIcon,
|
|
1171
|
+
endIcon,
|
|
1172
|
+
className,
|
|
1173
|
+
id,
|
|
1174
|
+
...props
|
|
1175
|
+
}, ref) => {
|
|
1176
|
+
const fieldId = id || `kds-field-${label.toLowerCase().replace(/\s+/g, "-")}`;
|
|
1177
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
1178
|
+
"div",
|
|
1179
|
+
{
|
|
1180
|
+
className: (0, import_clsx.clsx)(
|
|
1181
|
+
"field",
|
|
1182
|
+
"label",
|
|
1183
|
+
"border",
|
|
1184
|
+
error && "invalid",
|
|
1185
|
+
readOnly && "locked",
|
|
1186
|
+
fullWidth && "kds-w-full",
|
|
1187
|
+
className
|
|
1188
|
+
),
|
|
1189
|
+
children: [
|
|
1190
|
+
startIcon && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("i", { className: "material-symbols-outlined", children: startIcon }),
|
|
1191
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1192
|
+
"input",
|
|
1193
|
+
{
|
|
1194
|
+
ref,
|
|
1195
|
+
id: fieldId,
|
|
1196
|
+
placeholder: " ",
|
|
1197
|
+
readOnly,
|
|
1198
|
+
...props
|
|
1199
|
+
}
|
|
1200
|
+
),
|
|
1201
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("label", { htmlFor: fieldId, children: label }),
|
|
1202
|
+
readOnly && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("i", { className: "material-symbols-outlined", children: "lock" }),
|
|
1203
|
+
endIcon && !readOnly && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("i", { className: "material-symbols-outlined", children: endIcon }),
|
|
1204
|
+
helperText && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "helper", children: helperText })
|
|
1205
|
+
]
|
|
1206
|
+
}
|
|
1207
|
+
);
|
|
1084
1208
|
}
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
// Not in tokens yet
|
|
1099
|
-
md: "0.875rem",
|
|
1100
|
-
// Not in tokens yet
|
|
1101
|
-
lg: fontSizes.lg,
|
|
1102
|
-
xl: fontSizes.xl
|
|
1103
|
-
}
|
|
1104
|
-
};
|
|
1105
|
-
var palette = {
|
|
1106
|
-
primary: {
|
|
1107
|
-
main: figmaColors.primary.main,
|
|
1108
|
-
light: figmaColors.primary.light,
|
|
1109
|
-
dark: figmaColors.primary.dark,
|
|
1110
|
-
contrastText: figmaColors.primary.contrastText
|
|
1111
|
-
},
|
|
1112
|
-
secondary: {
|
|
1113
|
-
main: "#9C27B0",
|
|
1114
|
-
light: "#BA68C8",
|
|
1115
|
-
dark: "#7B1FA2",
|
|
1116
|
-
contrastText: "#FFFFFF"
|
|
1117
|
-
},
|
|
1118
|
-
success: {
|
|
1119
|
-
main: figmaColors.success.main,
|
|
1120
|
-
light: figmaColors.success.light,
|
|
1121
|
-
dark: figmaColors.success.dark,
|
|
1122
|
-
contrastText: figmaColors.success.contrastText
|
|
1123
|
-
},
|
|
1124
|
-
warning: {
|
|
1125
|
-
main: figmaColors.warning.main,
|
|
1126
|
-
light: figmaColors.warning.light,
|
|
1127
|
-
dark: figmaColors.warning.dark,
|
|
1128
|
-
contrastText: figmaColors.warning.contrastText
|
|
1129
|
-
},
|
|
1130
|
-
error: {
|
|
1131
|
-
main: figmaColors.error.main,
|
|
1132
|
-
light: figmaColors.error.light,
|
|
1133
|
-
dark: figmaColors.error.dark,
|
|
1134
|
-
contrastText: figmaColors.error.contrastText
|
|
1135
|
-
},
|
|
1136
|
-
info: {
|
|
1137
|
-
main: figmaColors.info.main,
|
|
1138
|
-
light: figmaColors.info.light,
|
|
1139
|
-
dark: figmaColors.info.dark,
|
|
1140
|
-
contrastText: figmaColors.info.contrastText
|
|
1141
|
-
},
|
|
1142
|
-
text: {
|
|
1143
|
-
primary: figmaColors.text.primary,
|
|
1144
|
-
secondary: figmaColors.text.secondary,
|
|
1145
|
-
disabled: figmaColors.text.disabled
|
|
1146
|
-
},
|
|
1147
|
-
background: {
|
|
1148
|
-
default: figmaColors.background.default,
|
|
1149
|
-
paper: figmaColors.background.paper
|
|
1150
|
-
},
|
|
1151
|
-
action: {
|
|
1152
|
-
active: figmaColors.action.active,
|
|
1153
|
-
hover: figmaColors.action.hover,
|
|
1154
|
-
selected: figmaColors.action.selected,
|
|
1155
|
-
disabled: figmaColors.action.disabled,
|
|
1156
|
-
disabledBackground: figmaColors.action.disabledBackground,
|
|
1157
|
-
focus: figmaColors.action.focus
|
|
1158
|
-
},
|
|
1159
|
-
divider: figmaColors.divider
|
|
1160
|
-
};
|
|
1161
|
-
var typography2 = {
|
|
1162
|
-
fontFamily: `${figmaTypography.fontFamily.primary}, ${figmaTypography.fontFamily.secondary}, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`,
|
|
1163
|
-
// Headings - Public Sans SemiBold
|
|
1164
|
-
h1: {
|
|
1165
|
-
fontFamily: figmaTypography.fontFamily.primary,
|
|
1166
|
-
fontWeight: figmaTypography.fontWeight.bold,
|
|
1167
|
-
fontSize: "2.5rem",
|
|
1168
|
-
lineHeight: 1.2,
|
|
1169
|
-
letterSpacing: "-0.01562em"
|
|
1170
|
-
},
|
|
1171
|
-
h2: {
|
|
1172
|
-
fontFamily: figmaTypography.fontFamily.primary,
|
|
1173
|
-
fontWeight: figmaTypography.fontWeight.bold,
|
|
1174
|
-
fontSize: "2rem",
|
|
1175
|
-
lineHeight: 1.2,
|
|
1176
|
-
letterSpacing: "-0.00833em"
|
|
1177
|
-
},
|
|
1178
|
-
h3: {
|
|
1179
|
-
fontFamily: figmaTypography.fontFamily.primary,
|
|
1180
|
-
fontWeight: figmaTypography.fontWeight.semiBold,
|
|
1181
|
-
fontSize: "1.75rem",
|
|
1182
|
-
lineHeight: 1.2,
|
|
1183
|
-
letterSpacing: "0em"
|
|
1184
|
-
},
|
|
1185
|
-
h4: {
|
|
1186
|
-
fontFamily: figmaTypography.fontFamily.primary,
|
|
1187
|
-
fontWeight: figmaTypography.fontWeight.semiBold,
|
|
1188
|
-
fontSize: "1.5rem",
|
|
1189
|
-
lineHeight: 1.235,
|
|
1190
|
-
letterSpacing: "0.00735em"
|
|
1191
|
-
},
|
|
1192
|
-
// H5 - Inter Medium 24px (from Figma Light/Typography/H5)
|
|
1193
|
-
h5: {
|
|
1194
|
-
fontFamily: figmaTypography.fontFamily.display,
|
|
1195
|
-
fontWeight: figmaTypography.fontWeight.medium,
|
|
1196
|
-
fontSize: "1.5rem",
|
|
1197
|
-
// 24px
|
|
1198
|
-
lineHeight: 1.334,
|
|
1199
|
-
letterSpacing: "0em"
|
|
1200
|
-
},
|
|
1201
|
-
// H6 - Public Sans SemiBold 20px (from Figma Light/Typography/H6)
|
|
1202
|
-
h6: {
|
|
1203
|
-
fontFamily: figmaTypography.fontFamily.primary,
|
|
1204
|
-
fontWeight: figmaTypography.fontWeight.semiBold,
|
|
1205
|
-
fontSize: "1.25rem",
|
|
1206
|
-
// 20px
|
|
1207
|
-
lineHeight: "32px",
|
|
1208
|
-
letterSpacing: "0.15px"
|
|
1209
|
-
},
|
|
1210
|
-
// Subtitle1 - Roboto Regular 16px
|
|
1211
|
-
subtitle1: {
|
|
1212
|
-
fontFamily: figmaTypography.fontFamily.secondary,
|
|
1213
|
-
fontWeight: figmaTypography.fontWeight.regular,
|
|
1214
|
-
fontSize: "1rem",
|
|
1215
|
-
lineHeight: 1.75,
|
|
1216
|
-
letterSpacing: "0.15px"
|
|
1217
|
-
},
|
|
1218
|
-
// Subtitle2 - Roboto Medium 14px
|
|
1219
|
-
subtitle2: {
|
|
1220
|
-
fontFamily: figmaTypography.fontFamily.secondary,
|
|
1221
|
-
fontWeight: figmaTypography.fontWeight.medium,
|
|
1222
|
-
fontSize: "0.875rem",
|
|
1223
|
-
lineHeight: 1.57,
|
|
1224
|
-
letterSpacing: "0.1px"
|
|
1225
|
-
},
|
|
1226
|
-
// Body1 - From Figma typography/body1: Roboto Regular 16px
|
|
1227
|
-
body1: {
|
|
1228
|
-
fontFamily: figmaTypography.fontFamily.secondary,
|
|
1229
|
-
fontWeight: figmaTypography.fontWeight.regular,
|
|
1230
|
-
fontSize: "1rem",
|
|
1231
|
-
// 16px
|
|
1232
|
-
lineHeight: 1.5,
|
|
1233
|
-
letterSpacing: "0.15px"
|
|
1234
|
-
},
|
|
1235
|
-
// Body2 - Roboto Regular 14px
|
|
1236
|
-
body2: {
|
|
1237
|
-
fontFamily: figmaTypography.fontFamily.secondary,
|
|
1238
|
-
fontWeight: figmaTypography.fontWeight.regular,
|
|
1239
|
-
fontSize: "0.875rem",
|
|
1240
|
-
// 14px
|
|
1241
|
-
lineHeight: 1.43,
|
|
1242
|
-
letterSpacing: "0.17px"
|
|
1243
|
-
},
|
|
1244
|
-
// Button - From Figma button/large: Roboto Medium 15px
|
|
1245
|
-
button: {
|
|
1246
|
-
fontFamily: figmaTypography.fontFamily.secondary,
|
|
1247
|
-
fontWeight: figmaTypography.fontWeight.medium,
|
|
1248
|
-
fontSize: "0.9375rem",
|
|
1249
|
-
// 15px
|
|
1250
|
-
lineHeight: "26px",
|
|
1251
|
-
letterSpacing: "0.46px",
|
|
1252
|
-
textTransform: "uppercase"
|
|
1253
|
-
},
|
|
1254
|
-
// Caption - From Figma typography/caption: Roboto Regular 12px
|
|
1255
|
-
caption: {
|
|
1256
|
-
fontFamily: figmaTypography.fontFamily.secondary,
|
|
1257
|
-
fontWeight: figmaTypography.fontWeight.regular,
|
|
1258
|
-
fontSize: "0.75rem",
|
|
1259
|
-
// 12px
|
|
1260
|
-
lineHeight: 1.66,
|
|
1261
|
-
letterSpacing: "0.4px"
|
|
1262
|
-
},
|
|
1263
|
-
// Overline - From Figma Light/Typography/Overline: Public Sans Regular 12px
|
|
1264
|
-
overline: {
|
|
1265
|
-
fontFamily: figmaTypography.fontFamily.primary,
|
|
1266
|
-
fontWeight: figmaTypography.fontWeight.regular,
|
|
1267
|
-
fontSize: "0.75rem",
|
|
1268
|
-
// 12px
|
|
1269
|
-
lineHeight: "15px",
|
|
1270
|
-
letterSpacing: "1px",
|
|
1271
|
-
textTransform: "uppercase"
|
|
1209
|
+
);
|
|
1210
|
+
KdsTextField.displayName = "KdsTextField";
|
|
1211
|
+
|
|
1212
|
+
// src/components/core/KdsCheckbox/KdsCheckbox.tsx
|
|
1213
|
+
var import_react3 = require("react");
|
|
1214
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
1215
|
+
var KdsCheckbox = (0, import_react3.forwardRef)(
|
|
1216
|
+
({ label, className, id, ...props }, ref) => {
|
|
1217
|
+
const fieldId = id || `kds-cb-${label?.toLowerCase().replace(/\s+/g, "-") || "check"}`;
|
|
1218
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("label", { className: (0, import_clsx.clsx)("field", className), htmlFor: fieldId, children: [
|
|
1219
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("input", { ref, type: "checkbox", id: fieldId, ...props }),
|
|
1220
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { children: label })
|
|
1221
|
+
] });
|
|
1272
1222
|
}
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
var
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
textTransform: "uppercase",
|
|
1298
|
-
borderRadius: 4,
|
|
1299
|
-
minHeight: 50,
|
|
1300
|
-
padding: "8px 22px",
|
|
1301
|
-
// Disabled state from Figma
|
|
1302
|
-
"&.Mui-disabled": {
|
|
1303
|
-
backgroundColor: figmaColors.action.disabledBackground,
|
|
1304
|
-
color: figmaColors.action.disabled
|
|
1305
|
-
}
|
|
1306
|
-
},
|
|
1307
|
-
contained: {
|
|
1308
|
-
// elevation/2 from Figma
|
|
1309
|
-
boxShadow: "0px 3px 1px -2px rgba(0,0,0,0.2), 0px 2px 2px 0px rgba(0,0,0,0.14), 0px 1px 5px 0px rgba(0,0,0,0.12)",
|
|
1310
|
-
"&:hover": {
|
|
1311
|
-
boxShadow: "0px 2px 4px -1px rgba(0,0,0,0.2), 0px 4px 5px 0px rgba(0,0,0,0.14), 0px 1px 10px 0px rgba(0,0,0,0.12)"
|
|
1312
|
-
}
|
|
1313
|
-
},
|
|
1314
|
-
containedPrimary: {
|
|
1315
|
-
backgroundColor: figmaColors.primary.main,
|
|
1316
|
-
color: figmaColors.primary.contrastText,
|
|
1317
|
-
"&:hover": {
|
|
1318
|
-
backgroundColor: figmaColors.primary.dark
|
|
1319
|
-
}
|
|
1320
|
-
},
|
|
1321
|
-
containedSuccess: {
|
|
1322
|
-
// Success button uses success.light (#4CAF50) from Figma
|
|
1323
|
-
backgroundColor: figmaColors.success.light,
|
|
1324
|
-
color: figmaColors.success.contrastText,
|
|
1325
|
-
"&:hover": {
|
|
1326
|
-
backgroundColor: figmaColors.success.main
|
|
1327
|
-
}
|
|
1328
|
-
},
|
|
1329
|
-
containedInfo: {
|
|
1330
|
-
backgroundColor: figmaColors.info.light,
|
|
1331
|
-
color: figmaColors.info.contrastText,
|
|
1332
|
-
"&:hover": {
|
|
1333
|
-
backgroundColor: figmaColors.info.main
|
|
1334
|
-
}
|
|
1335
|
-
},
|
|
1336
|
-
outlined: {
|
|
1337
|
-
borderWidth: 1,
|
|
1338
|
-
"&:hover": {
|
|
1339
|
-
borderWidth: 1
|
|
1340
|
-
}
|
|
1341
|
-
},
|
|
1342
|
-
outlinedPrimary: {
|
|
1343
|
-
borderColor: figmaColors.primary.states.outlinedBorder,
|
|
1344
|
-
color: figmaColors.primary.main,
|
|
1345
|
-
"&:hover": {
|
|
1346
|
-
backgroundColor: figmaColors.primary.states.hover,
|
|
1347
|
-
borderColor: figmaColors.primary.main
|
|
1348
|
-
}
|
|
1349
|
-
},
|
|
1350
|
-
outlinedInfo: {
|
|
1351
|
-
// From Figma: info/_states/outlinedBorder
|
|
1352
|
-
borderColor: figmaColors.info.states.outlinedBorder,
|
|
1353
|
-
color: figmaColors.info.main,
|
|
1354
|
-
"&:hover": {
|
|
1355
|
-
backgroundColor: "rgba(2, 136, 209, 0.04)",
|
|
1356
|
-
borderColor: figmaColors.info.main
|
|
1357
|
-
}
|
|
1358
|
-
},
|
|
1359
|
-
sizeSmall: {
|
|
1360
|
-
padding: "6px 16px",
|
|
1361
|
-
fontSize: "0.8125rem",
|
|
1362
|
-
minHeight: 32
|
|
1363
|
-
},
|
|
1364
|
-
sizeMedium: {
|
|
1365
|
-
padding: "8px 22px",
|
|
1366
|
-
fontSize: "0.9375rem",
|
|
1367
|
-
minHeight: 42
|
|
1223
|
+
);
|
|
1224
|
+
KdsCheckbox.displayName = "KdsCheckbox";
|
|
1225
|
+
|
|
1226
|
+
// src/components/core/KdsModal/KdsModal.tsx
|
|
1227
|
+
var import_react4 = require("react");
|
|
1228
|
+
var Dialog = __toESM(require("@radix-ui/react-dialog"));
|
|
1229
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1230
|
+
var KdsModal = (0, import_react4.forwardRef)(
|
|
1231
|
+
({
|
|
1232
|
+
open,
|
|
1233
|
+
onClose,
|
|
1234
|
+
title,
|
|
1235
|
+
description,
|
|
1236
|
+
footer,
|
|
1237
|
+
children,
|
|
1238
|
+
size = "md",
|
|
1239
|
+
showCloseButton = true,
|
|
1240
|
+
className
|
|
1241
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1242
|
+
Dialog.Root,
|
|
1243
|
+
{
|
|
1244
|
+
open,
|
|
1245
|
+
onOpenChange: (o) => {
|
|
1246
|
+
if (!o) onClose();
|
|
1368
1247
|
},
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
"&:hover fieldset": {
|
|
1397
|
-
borderColor: figmaColors.input.outlined.hoverBorder
|
|
1398
|
-
},
|
|
1399
|
-
"&.Mui-focused fieldset": {
|
|
1400
|
-
borderColor: figmaColors.primary.main,
|
|
1401
|
-
borderWidth: 2
|
|
1402
|
-
}
|
|
1403
|
-
},
|
|
1404
|
-
"& .MuiInputLabel-root": {
|
|
1405
|
-
fontFamily: figmaTypography.fontFamily.secondary,
|
|
1406
|
-
fontSize: "1rem",
|
|
1407
|
-
letterSpacing: "0.15px",
|
|
1408
|
-
color: figmaColors.text.secondary,
|
|
1409
|
-
"&.Mui-focused": {
|
|
1410
|
-
color: figmaColors.primary.main
|
|
1411
|
-
},
|
|
1412
|
-
"&.MuiInputLabel-shrink": {
|
|
1413
|
-
fontSize: "0.75rem",
|
|
1414
|
-
// 12px when shrunk
|
|
1415
|
-
lineHeight: "12px",
|
|
1416
|
-
letterSpacing: "0.15px"
|
|
1417
|
-
}
|
|
1418
|
-
},
|
|
1419
|
-
"& .MuiInputBase-input": {
|
|
1420
|
-
fontFamily: figmaTypography.fontFamily.secondary,
|
|
1421
|
-
fontSize: "1rem",
|
|
1422
|
-
fontWeight: figmaTypography.fontWeight.regular,
|
|
1423
|
-
lineHeight: "24px",
|
|
1424
|
-
letterSpacing: "0.15px",
|
|
1425
|
-
color: figmaColors.text.primary,
|
|
1426
|
-
padding: "16px 12px",
|
|
1427
|
-
"&::placeholder": {
|
|
1428
|
-
color: figmaColors.text.secondary,
|
|
1429
|
-
opacity: 1
|
|
1248
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Dialog.Portal, { children: [
|
|
1249
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Dialog.Overlay, { className: "kds-bottom-sheet-scrim" }),
|
|
1250
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1251
|
+
Dialog.Content,
|
|
1252
|
+
{
|
|
1253
|
+
ref,
|
|
1254
|
+
className: (0, import_clsx.clsx)(
|
|
1255
|
+
"kds-bottom-sheet",
|
|
1256
|
+
`kds-bottom-sheet-${size}`,
|
|
1257
|
+
className
|
|
1258
|
+
),
|
|
1259
|
+
children: [
|
|
1260
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "kds-bottom-sheet-header", children: [
|
|
1261
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Dialog.Title, { className: "kds-bottom-sheet-title", children: title }),
|
|
1262
|
+
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Dialog.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1263
|
+
"button",
|
|
1264
|
+
{
|
|
1265
|
+
className: "kds-bottom-sheet-close",
|
|
1266
|
+
"aria-label": "Cerrar",
|
|
1267
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("i", { className: "material-symbols-outlined", children: "close" })
|
|
1268
|
+
}
|
|
1269
|
+
) })
|
|
1270
|
+
] }),
|
|
1271
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Dialog.Description, { className: "kds-bottom-sheet-description", children: description }),
|
|
1272
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "kds-bottom-sheet-body", children }),
|
|
1273
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "kds-bottom-sheet-actions", children: footer })
|
|
1274
|
+
]
|
|
1430
1275
|
}
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
"& .MuiInputAdornment-root": {
|
|
1434
|
-
color: figmaColors.action.active
|
|
1435
|
-
}
|
|
1436
|
-
}
|
|
1437
|
-
},
|
|
1438
|
-
defaultProps: {
|
|
1439
|
-
variant: "outlined",
|
|
1440
|
-
fullWidth: true
|
|
1441
|
-
}
|
|
1442
|
-
},
|
|
1443
|
-
MuiOutlinedInput: {
|
|
1444
|
-
styleOverrides: {
|
|
1445
|
-
root: {
|
|
1446
|
-
"& .MuiOutlinedInput-notchedOutline": {
|
|
1447
|
-
borderColor: figmaColors.input.outlined.enabledBorder
|
|
1448
|
-
},
|
|
1449
|
-
"&:hover .MuiOutlinedInput-notchedOutline": {
|
|
1450
|
-
borderColor: figmaColors.input.outlined.hoverBorder
|
|
1451
|
-
},
|
|
1452
|
-
"&.Mui-focused .MuiOutlinedInput-notchedOutline": {
|
|
1453
|
-
borderColor: figmaColors.primary.main,
|
|
1454
|
-
borderWidth: 2
|
|
1455
|
-
}
|
|
1456
|
-
},
|
|
1457
|
-
input: {
|
|
1458
|
-
padding: "16px 12px"
|
|
1459
|
-
}
|
|
1276
|
+
)
|
|
1277
|
+
] })
|
|
1460
1278
|
}
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1279
|
+
)
|
|
1280
|
+
);
|
|
1281
|
+
KdsModal.displayName = "KdsModal";
|
|
1282
|
+
|
|
1283
|
+
// src/components/core/KdsCard/KdsCard.tsx
|
|
1284
|
+
var import_react5 = require("react");
|
|
1285
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1286
|
+
var KdsCard = (0, import_react5.forwardRef)(
|
|
1287
|
+
({ variant = "elevated", dimmed, children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1288
|
+
"article",
|
|
1289
|
+
{
|
|
1290
|
+
ref,
|
|
1291
|
+
className: (0, import_clsx.clsx)(
|
|
1292
|
+
variant === "elevated" ? "kds-card-elevated" : "kds-card-outlined",
|
|
1293
|
+
dimmed && "kds-card-dimmed",
|
|
1294
|
+
className
|
|
1295
|
+
),
|
|
1296
|
+
...props,
|
|
1297
|
+
children
|
|
1473
1298
|
}
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1299
|
+
)
|
|
1300
|
+
);
|
|
1301
|
+
KdsCard.displayName = "KdsCard";
|
|
1302
|
+
var KdsCardHeader = (0, import_react5.forwardRef)(
|
|
1303
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-card-header", className), ...props, children })
|
|
1304
|
+
);
|
|
1305
|
+
KdsCardHeader.displayName = "KdsCardHeader";
|
|
1306
|
+
var KdsCardBody = (0, import_react5.forwardRef)(
|
|
1307
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-card-body", className), ...props, children })
|
|
1308
|
+
);
|
|
1309
|
+
KdsCardBody.displayName = "KdsCardBody";
|
|
1310
|
+
var KdsCardFooter = (0, import_react5.forwardRef)(
|
|
1311
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-card-footer", className), ...props, children })
|
|
1312
|
+
);
|
|
1313
|
+
KdsCardFooter.displayName = "KdsCardFooter";
|
|
1314
|
+
|
|
1315
|
+
// src/components/core/KdsSpinner/KdsSpinner.tsx
|
|
1316
|
+
var import_react6 = require("react");
|
|
1317
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1318
|
+
var KdsSpinner = (0, import_react6.forwardRef)(
|
|
1319
|
+
({ size = "medium", label, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { ref, className: (0, import_clsx.clsx)("kds-flex kds-flex-col kds-items-center kds-gap-2", className), role: "status", ...props, children: [
|
|
1320
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: (0, import_clsx.clsx)("loader", size) }),
|
|
1321
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "kds-text-body-small kds-text-muted", children: label }),
|
|
1322
|
+
!label && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "kds-hidden", children: "Cargando" })
|
|
1323
|
+
] })
|
|
1324
|
+
);
|
|
1325
|
+
KdsSpinner.displayName = "KdsSpinner";
|
|
1326
|
+
|
|
1327
|
+
// src/components/core/KdsLinearProgress/KdsLinearProgress.tsx
|
|
1328
|
+
var import_react7 = require("react");
|
|
1329
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1330
|
+
var KdsLinearProgress = (0, import_react7.forwardRef)(
|
|
1331
|
+
({ value, max = 100, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("progress", { ref, className: (0, import_clsx.clsx)("kds-progress", className), value, max, ...props })
|
|
1332
|
+
);
|
|
1333
|
+
KdsLinearProgress.displayName = "KdsLinearProgress";
|
|
1334
|
+
|
|
1335
|
+
// src/components/core/KdsAlert/KdsAlert.tsx
|
|
1336
|
+
var import_react8 = require("react");
|
|
1337
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1338
|
+
var KdsAlert = (0, import_react8.forwardRef)(
|
|
1339
|
+
({ severity, title, icon, inline, onClose, children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1340
|
+
"div",
|
|
1341
|
+
{
|
|
1342
|
+
ref,
|
|
1343
|
+
role: "alert",
|
|
1344
|
+
className: (0, import_clsx.clsx)("kds-alert", `kds-${severity}`, inline && "kds-alert-inline", className),
|
|
1345
|
+
...props,
|
|
1346
|
+
children: [
|
|
1347
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "kds-alert-icon", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("i", { className: "material-symbols-outlined", children: icon }) }),
|
|
1348
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "kds-alert-content", children: [
|
|
1349
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "kds-alert-title", children: title }),
|
|
1350
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "kds-alert-description", children })
|
|
1351
|
+
] }),
|
|
1352
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { className: "kds-btn kds-btn-text kds-btn-sm", onClick: onClose, "aria-label": "Cerrar", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("i", { className: "material-symbols-outlined", children: "close" }) })
|
|
1353
|
+
]
|
|
1501
1354
|
}
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
fontFamily: figmaTypography.fontFamily.secondary,
|
|
1511
|
-
fontSize: "1rem",
|
|
1512
|
-
fontWeight: figmaTypography.fontWeight.regular,
|
|
1513
|
-
lineHeight: 1.5,
|
|
1514
|
-
letterSpacing: "0.15px",
|
|
1515
|
-
color: figmaColors.text.secondary
|
|
1516
|
-
}
|
|
1517
|
-
}
|
|
1518
|
-
},
|
|
1519
|
-
// ==========================================================================
|
|
1520
|
-
// CARD - Figma card specs with 6px border radius and outlined border
|
|
1521
|
-
// ==========================================================================
|
|
1522
|
-
MuiCard: {
|
|
1523
|
-
styleOverrides: {
|
|
1524
|
-
root: {
|
|
1525
|
-
borderRadius: 6
|
|
1526
|
-
}
|
|
1527
|
-
}
|
|
1528
|
-
},
|
|
1529
|
-
MuiCardActionArea: {
|
|
1530
|
-
styleOverrides: {
|
|
1531
|
-
root: {
|
|
1532
|
-
"&:hover": {
|
|
1533
|
-
backgroundColor: figmaColors.action.hover
|
|
1534
|
-
}
|
|
1535
|
-
}
|
|
1536
|
-
}
|
|
1537
|
-
},
|
|
1538
|
-
MuiCardContent: {
|
|
1539
|
-
styleOverrides: {
|
|
1540
|
-
root: {
|
|
1541
|
-
padding: "16px 20px",
|
|
1542
|
-
"&:last-child": {
|
|
1543
|
-
paddingBottom: "16px"
|
|
1544
|
-
}
|
|
1545
|
-
}
|
|
1546
|
-
}
|
|
1547
|
-
},
|
|
1548
|
-
// ==========================================================================
|
|
1549
|
-
// LINEAR PROGRESS - Figma info color (#03A9F4) progress bar
|
|
1550
|
-
// ==========================================================================
|
|
1551
|
-
MuiLinearProgress: {
|
|
1552
|
-
styleOverrides: {
|
|
1553
|
-
root: {
|
|
1554
|
-
height: 4,
|
|
1555
|
-
borderRadius: 0,
|
|
1556
|
-
"&.MuiLinearProgress-colorInfo": {
|
|
1557
|
-
backgroundColor: `rgba(3, 169, 244, 0.4)`,
|
|
1558
|
-
"& .MuiLinearProgress-bar": {
|
|
1559
|
-
backgroundColor: figmaColors.info.light
|
|
1560
|
-
// #03A9F4
|
|
1561
|
-
}
|
|
1562
|
-
},
|
|
1563
|
-
"&.MuiLinearProgress-colorPrimary": {
|
|
1564
|
-
backgroundColor: `rgba(131, 71, 173, 0.4)`,
|
|
1565
|
-
"& .MuiLinearProgress-bar": {
|
|
1566
|
-
backgroundColor: figmaColors.primary.main
|
|
1567
|
-
// #8347AD
|
|
1568
|
-
}
|
|
1569
|
-
}
|
|
1570
|
-
},
|
|
1571
|
-
bar: {
|
|
1572
|
-
borderRadius: 0
|
|
1573
|
-
}
|
|
1574
|
-
},
|
|
1575
|
-
defaultProps: {
|
|
1576
|
-
color: "info"
|
|
1577
|
-
}
|
|
1578
|
-
},
|
|
1579
|
-
// ==========================================================================
|
|
1580
|
-
// CIRCULAR PROGRESS
|
|
1581
|
-
// ==========================================================================
|
|
1582
|
-
MuiCircularProgress: {
|
|
1583
|
-
styleOverrides: {
|
|
1584
|
-
colorPrimary: {
|
|
1585
|
-
color: figmaColors.primary.main
|
|
1586
|
-
}
|
|
1587
|
-
},
|
|
1588
|
-
defaultProps: {
|
|
1589
|
-
color: "primary"
|
|
1590
|
-
}
|
|
1591
|
-
},
|
|
1592
|
-
// ==========================================================================
|
|
1593
|
-
// ALERT - Figma alert backgrounds and colors
|
|
1594
|
-
// ==========================================================================
|
|
1595
|
-
MuiAlert: {
|
|
1596
|
-
styleOverrides: {
|
|
1597
|
-
root: {
|
|
1598
|
-
borderRadius: 4,
|
|
1599
|
-
fontFamily: figmaTypography.fontFamily.secondary,
|
|
1600
|
-
fontSize: "0.875rem",
|
|
1601
|
-
lineHeight: 1.43,
|
|
1602
|
-
letterSpacing: "0.17px",
|
|
1603
|
-
padding: "6px 16px"
|
|
1604
|
-
},
|
|
1605
|
-
standardInfo: {
|
|
1606
|
-
backgroundColor: figmaColors.alert.info.background,
|
|
1607
|
-
// #E5F6FD
|
|
1608
|
-
color: figmaColors.alert.info.color,
|
|
1609
|
-
// #014361
|
|
1610
|
-
"& .MuiAlert-icon": {
|
|
1611
|
-
color: figmaColors.alert.info.color
|
|
1612
|
-
}
|
|
1613
|
-
},
|
|
1614
|
-
standardSuccess: {
|
|
1615
|
-
backgroundColor: figmaColors.alert.success.background,
|
|
1616
|
-
// #EDF7ED
|
|
1617
|
-
color: figmaColors.alert.success.color,
|
|
1618
|
-
// #1E4620
|
|
1619
|
-
"& .MuiAlert-icon": {
|
|
1620
|
-
color: figmaColors.success.main
|
|
1621
|
-
}
|
|
1622
|
-
},
|
|
1623
|
-
standardWarning: {
|
|
1624
|
-
backgroundColor: "#FFF4E5",
|
|
1625
|
-
color: "#663C00",
|
|
1626
|
-
"& .MuiAlert-icon": {
|
|
1627
|
-
color: figmaColors.warning.main
|
|
1628
|
-
}
|
|
1629
|
-
},
|
|
1630
|
-
standardError: {
|
|
1631
|
-
backgroundColor: "#FDEDED",
|
|
1632
|
-
color: "#5F2120",
|
|
1633
|
-
"& .MuiAlert-icon": {
|
|
1634
|
-
color: figmaColors.error.main
|
|
1635
|
-
}
|
|
1636
|
-
},
|
|
1637
|
-
icon: {
|
|
1638
|
-
padding: "7px 0",
|
|
1639
|
-
marginRight: 12
|
|
1640
|
-
}
|
|
1641
|
-
}
|
|
1642
|
-
},
|
|
1643
|
-
MuiAlertTitle: {
|
|
1644
|
-
styleOverrides: {
|
|
1645
|
-
root: {
|
|
1646
|
-
fontFamily: figmaTypography.fontFamily.secondary,
|
|
1647
|
-
fontWeight: figmaTypography.fontWeight.medium,
|
|
1648
|
-
fontSize: "1rem",
|
|
1649
|
-
lineHeight: 1.5,
|
|
1650
|
-
marginBottom: 4
|
|
1651
|
-
}
|
|
1652
|
-
}
|
|
1653
|
-
},
|
|
1654
|
-
// ==========================================================================
|
|
1655
|
-
// DIALOG/MODAL - Figma modal specs
|
|
1656
|
-
// ==========================================================================
|
|
1657
|
-
MuiDialog: {
|
|
1658
|
-
styleOverrides: {
|
|
1659
|
-
paper: {
|
|
1660
|
-
borderRadius: 12,
|
|
1661
|
-
boxShadow: "0px 4px 4px rgba(0, 0, 0, 0.25)"
|
|
1662
|
-
}
|
|
1663
|
-
}
|
|
1664
|
-
},
|
|
1665
|
-
MuiDialogTitle: {
|
|
1666
|
-
styleOverrides: {
|
|
1667
|
-
root: {
|
|
1668
|
-
fontFamily: figmaTypography.fontFamily.primary,
|
|
1669
|
-
fontWeight: figmaTypography.fontWeight.semiBold,
|
|
1670
|
-
fontSize: "1.25rem",
|
|
1671
|
-
lineHeight: "32px",
|
|
1672
|
-
letterSpacing: "0.15px",
|
|
1673
|
-
padding: "16px 24px"
|
|
1674
|
-
}
|
|
1675
|
-
}
|
|
1676
|
-
},
|
|
1677
|
-
MuiDialogContent: {
|
|
1678
|
-
styleOverrides: {
|
|
1679
|
-
root: {
|
|
1680
|
-
padding: "16px 24px"
|
|
1681
|
-
}
|
|
1682
|
-
}
|
|
1683
|
-
},
|
|
1684
|
-
MuiDialogActions: {
|
|
1685
|
-
styleOverrides: {
|
|
1686
|
-
root: {
|
|
1687
|
-
padding: "16px 24px",
|
|
1688
|
-
gap: 8
|
|
1689
|
-
}
|
|
1690
|
-
}
|
|
1691
|
-
},
|
|
1692
|
-
// ==========================================================================
|
|
1693
|
-
// TOOLTIP - Figma tooltip specs
|
|
1694
|
-
// ==========================================================================
|
|
1695
|
-
MuiTooltip: {
|
|
1696
|
-
styleOverrides: {
|
|
1697
|
-
tooltip: {
|
|
1698
|
-
backgroundColor: "rgba(97, 97, 97, 0.9)",
|
|
1699
|
-
fontFamily: figmaTypography.fontFamily.secondary,
|
|
1700
|
-
fontWeight: figmaTypography.fontWeight.medium,
|
|
1701
|
-
fontSize: "0.875rem",
|
|
1702
|
-
lineHeight: "24px",
|
|
1703
|
-
letterSpacing: "0.17px",
|
|
1704
|
-
borderRadius: 4,
|
|
1705
|
-
padding: "4px 8px"
|
|
1706
|
-
}
|
|
1707
|
-
}
|
|
1708
|
-
},
|
|
1709
|
-
// ==========================================================================
|
|
1710
|
-
// TYPOGRAPHY COMPONENT
|
|
1711
|
-
// ==========================================================================
|
|
1712
|
-
MuiTypography: {
|
|
1713
|
-
styleOverrides: {
|
|
1714
|
-
root: {
|
|
1715
|
-
// Default to body text styling
|
|
1716
|
-
}
|
|
1717
|
-
}
|
|
1718
|
-
},
|
|
1719
|
-
// ==========================================================================
|
|
1720
|
-
// DIVIDER
|
|
1721
|
-
// ==========================================================================
|
|
1722
|
-
MuiDivider: {
|
|
1723
|
-
styleOverrides: {
|
|
1724
|
-
root: {
|
|
1725
|
-
borderColor: "#DDDEE0"
|
|
1726
|
-
}
|
|
1727
|
-
}
|
|
1728
|
-
},
|
|
1729
|
-
// ==========================================================================
|
|
1730
|
-
// LINK
|
|
1731
|
-
// ==========================================================================
|
|
1732
|
-
MuiLink: {
|
|
1733
|
-
styleOverrides: {
|
|
1734
|
-
root: {
|
|
1735
|
-
color: figmaColors.info.main,
|
|
1736
|
-
textDecoration: "none",
|
|
1737
|
-
"&:hover": {
|
|
1738
|
-
textDecoration: "underline"
|
|
1739
|
-
}
|
|
1740
|
-
}
|
|
1741
|
-
}
|
|
1742
|
-
},
|
|
1743
|
-
// ==========================================================================
|
|
1744
|
-
// ICON BUTTON
|
|
1745
|
-
// ==========================================================================
|
|
1746
|
-
MuiIconButton: {
|
|
1747
|
-
styleOverrides: {
|
|
1748
|
-
root: {
|
|
1749
|
-
color: figmaColors.text.secondary,
|
|
1750
|
-
"&:hover": {
|
|
1751
|
-
backgroundColor: figmaColors.action.hover
|
|
1752
|
-
}
|
|
1753
|
-
}
|
|
1754
|
-
}
|
|
1755
|
-
}
|
|
1756
|
-
};
|
|
1757
|
-
var shadows2 = [
|
|
1758
|
-
"none",
|
|
1759
|
-
shadows[1],
|
|
1760
|
-
shadows[2],
|
|
1761
|
-
shadows[3],
|
|
1762
|
-
shadows[4],
|
|
1763
|
-
shadows[5],
|
|
1764
|
-
shadows[6],
|
|
1765
|
-
shadows[7],
|
|
1766
|
-
shadows[8],
|
|
1767
|
-
shadows[9],
|
|
1768
|
-
shadows[10],
|
|
1769
|
-
shadows[11],
|
|
1770
|
-
shadows[12],
|
|
1771
|
-
shadows[13],
|
|
1772
|
-
shadows[14],
|
|
1773
|
-
shadows[15],
|
|
1774
|
-
shadows[16],
|
|
1775
|
-
shadows[17],
|
|
1776
|
-
shadows[18],
|
|
1777
|
-
shadows[19],
|
|
1778
|
-
shadows[20],
|
|
1779
|
-
shadows[21],
|
|
1780
|
-
shadows[22],
|
|
1781
|
-
shadows[23],
|
|
1782
|
-
shadows[24]
|
|
1783
|
-
];
|
|
1784
|
-
var khipuTheme = (0, import_styles.createTheme)({
|
|
1785
|
-
palette,
|
|
1786
|
-
typography: typography2,
|
|
1787
|
-
shape,
|
|
1788
|
-
shadows: shadows2,
|
|
1789
|
-
components
|
|
1790
|
-
});
|
|
1791
|
-
|
|
1792
|
-
// src/theme/ThemeProvider.tsx
|
|
1793
|
-
var import_react = require("react");
|
|
1794
|
-
var import_material = require("@mui/material");
|
|
1795
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
1796
|
-
function buildDynamicOverrides(props) {
|
|
1797
|
-
const overrides = {};
|
|
1798
|
-
const paletteOverrides = {};
|
|
1799
|
-
let hasPalette = false;
|
|
1800
|
-
if (props.mode) {
|
|
1801
|
-
paletteOverrides.mode = props.mode;
|
|
1802
|
-
hasPalette = true;
|
|
1803
|
-
}
|
|
1804
|
-
if (props.primaryColor || props.primaryColorVariant || props.buttonFontColor) {
|
|
1805
|
-
paletteOverrides.primary = {
|
|
1806
|
-
...props.primaryColor && { main: props.primaryColor },
|
|
1807
|
-
...props.primaryColorVariant && { light: props.primaryColorVariant },
|
|
1808
|
-
...props.buttonFontColor && { contrastText: props.buttonFontColor }
|
|
1809
|
-
};
|
|
1810
|
-
hasPalette = true;
|
|
1811
|
-
}
|
|
1812
|
-
if (props.textColor || props.disabledFontColor) {
|
|
1813
|
-
paletteOverrides.text = {
|
|
1814
|
-
...props.textColor && { primary: props.textColor },
|
|
1815
|
-
...props.disabledFontColor && { disabled: props.disabledFontColor }
|
|
1816
|
-
};
|
|
1817
|
-
hasPalette = true;
|
|
1818
|
-
}
|
|
1819
|
-
if (props.backgroundColor || props.pageBackgroundColor) {
|
|
1820
|
-
paletteOverrides.background = {
|
|
1821
|
-
...props.backgroundColor && { default: props.backgroundColor },
|
|
1822
|
-
...props.pageBackgroundColor && { paper: props.pageBackgroundColor }
|
|
1823
|
-
};
|
|
1824
|
-
hasPalette = true;
|
|
1825
|
-
}
|
|
1826
|
-
if (props.disabledBackgroundColor || props.disabledFontColor) {
|
|
1827
|
-
paletteOverrides.action = {
|
|
1828
|
-
...props.disabledBackgroundColor && { disabledBackground: props.disabledBackgroundColor },
|
|
1829
|
-
...props.disabledFontColor && { disabled: props.disabledFontColor }
|
|
1830
|
-
};
|
|
1831
|
-
hasPalette = true;
|
|
1832
|
-
}
|
|
1833
|
-
if (hasPalette) {
|
|
1834
|
-
overrides.palette = paletteOverrides;
|
|
1835
|
-
}
|
|
1836
|
-
if (props.fontFamily) {
|
|
1837
|
-
const fontStack = `"${props.fontFamily}", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`;
|
|
1838
|
-
overrides.typography = { fontFamily: fontStack };
|
|
1839
|
-
}
|
|
1840
|
-
return overrides;
|
|
1841
|
-
}
|
|
1842
|
-
function KhipuThemeProvider({
|
|
1843
|
-
children,
|
|
1844
|
-
includeCssBaseline = true,
|
|
1845
|
-
themeOverrides,
|
|
1846
|
-
...dynamicProps
|
|
1847
|
-
}) {
|
|
1848
|
-
const theme = (0, import_react.useMemo)(() => {
|
|
1849
|
-
const dynamicOverrides = buildDynamicOverrides(dynamicProps);
|
|
1850
|
-
const hasDynamicOverrides = Object.keys(dynamicOverrides).length > 0;
|
|
1851
|
-
const hasThemeOverrides = themeOverrides && Object.keys(themeOverrides).length > 0;
|
|
1852
|
-
if (!hasDynamicOverrides && !hasThemeOverrides) {
|
|
1853
|
-
return khipuTheme;
|
|
1854
|
-
}
|
|
1855
|
-
const mergedOverrides = [];
|
|
1856
|
-
if (hasDynamicOverrides) mergedOverrides.push(dynamicOverrides);
|
|
1857
|
-
if (hasThemeOverrides) mergedOverrides.push(themeOverrides);
|
|
1858
|
-
return (0, import_material.createTheme)(khipuTheme, ...mergedOverrides);
|
|
1859
|
-
}, [
|
|
1860
|
-
dynamicProps.primaryColor,
|
|
1861
|
-
dynamicProps.primaryColorVariant,
|
|
1862
|
-
dynamicProps.fontFamily,
|
|
1863
|
-
dynamicProps.textColor,
|
|
1864
|
-
dynamicProps.backgroundColor,
|
|
1865
|
-
dynamicProps.pageBackgroundColor,
|
|
1866
|
-
dynamicProps.mode,
|
|
1867
|
-
dynamicProps.buttonFontColor,
|
|
1868
|
-
dynamicProps.disabledFontColor,
|
|
1869
|
-
dynamicProps.disabledBackgroundColor,
|
|
1870
|
-
dynamicProps.fontSizeMultiplier,
|
|
1871
|
-
themeOverrides
|
|
1872
|
-
]);
|
|
1873
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.ThemeProvider, { theme, children: [
|
|
1874
|
-
includeCssBaseline && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.CssBaseline, {}),
|
|
1875
|
-
children
|
|
1876
|
-
] });
|
|
1877
|
-
}
|
|
1878
|
-
|
|
1879
|
-
// src/components/core/KdsButton/KdsButton.tsx
|
|
1880
|
-
var import_react2 = require("react");
|
|
1881
|
-
var import_Button = __toESM(require("@mui/material/Button"));
|
|
1882
|
-
var import_CircularProgress = __toESM(require("@mui/material/CircularProgress"));
|
|
1883
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
1884
|
-
var KdsButton = (0, import_react2.forwardRef)(
|
|
1885
|
-
({
|
|
1886
|
-
variant = "contained",
|
|
1887
|
-
color = "primary",
|
|
1888
|
-
size = "large",
|
|
1889
|
-
fullWidth = false,
|
|
1890
|
-
loading = false,
|
|
1891
|
-
disabled = false,
|
|
1892
|
-
startIcon,
|
|
1893
|
-
endIcon,
|
|
1894
|
-
children,
|
|
1895
|
-
sx,
|
|
1896
|
-
...props
|
|
1897
|
-
}, ref) => {
|
|
1898
|
-
const isDisabled = disabled || loading;
|
|
1899
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1900
|
-
import_Button.default,
|
|
1901
|
-
{
|
|
1902
|
-
ref,
|
|
1903
|
-
variant,
|
|
1904
|
-
color,
|
|
1905
|
-
size,
|
|
1906
|
-
fullWidth,
|
|
1907
|
-
disabled: isDisabled,
|
|
1908
|
-
startIcon: loading ? void 0 : startIcon,
|
|
1909
|
-
endIcon: loading ? void 0 : endIcon,
|
|
1910
|
-
sx: {
|
|
1911
|
-
// Additional custom styles can be merged here
|
|
1912
|
-
...sx
|
|
1913
|
-
},
|
|
1914
|
-
...props,
|
|
1915
|
-
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
1916
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1917
|
-
import_CircularProgress.default,
|
|
1918
|
-
{
|
|
1919
|
-
size: 20,
|
|
1920
|
-
color: "inherit",
|
|
1921
|
-
sx: { mr: 1 }
|
|
1922
|
-
}
|
|
1923
|
-
),
|
|
1924
|
-
children
|
|
1925
|
-
] }) : children
|
|
1926
|
-
}
|
|
1927
|
-
);
|
|
1928
|
-
}
|
|
1929
|
-
);
|
|
1930
|
-
KdsButton.displayName = "KdsButton";
|
|
1931
|
-
|
|
1932
|
-
// src/components/core/KdsTextField/KdsTextField.tsx
|
|
1933
|
-
var import_react3 = require("react");
|
|
1934
|
-
var import_TextField = __toESM(require("@mui/material/TextField"));
|
|
1935
|
-
var import_InputAdornment = __toESM(require("@mui/material/InputAdornment"));
|
|
1936
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
1937
|
-
var KdsTextField = (0, import_react3.forwardRef)(
|
|
1938
|
-
({
|
|
1939
|
-
variant = "outlined",
|
|
1940
|
-
size = "medium",
|
|
1941
|
-
fullWidth = true,
|
|
1942
|
-
startAdornment,
|
|
1943
|
-
endAdornment,
|
|
1944
|
-
InputProps,
|
|
1945
|
-
...props
|
|
1946
|
-
}, ref) => {
|
|
1947
|
-
const mergedInputProps = {
|
|
1948
|
-
...InputProps,
|
|
1949
|
-
...startAdornment && {
|
|
1950
|
-
startAdornment: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_InputAdornment.default, { position: "start", children: startAdornment })
|
|
1951
|
-
},
|
|
1952
|
-
...endAdornment && {
|
|
1953
|
-
endAdornment: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_InputAdornment.default, { position: "end", children: endAdornment })
|
|
1954
|
-
}
|
|
1955
|
-
};
|
|
1956
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1957
|
-
import_TextField.default,
|
|
1958
|
-
{
|
|
1959
|
-
inputRef: ref,
|
|
1960
|
-
variant,
|
|
1961
|
-
size,
|
|
1962
|
-
fullWidth,
|
|
1963
|
-
InputProps: mergedInputProps,
|
|
1964
|
-
...props
|
|
1965
|
-
}
|
|
1966
|
-
);
|
|
1967
|
-
}
|
|
1968
|
-
);
|
|
1969
|
-
KdsTextField.displayName = "KdsTextField";
|
|
1970
|
-
|
|
1971
|
-
// src/components/core/KdsCheckbox/KdsCheckbox.tsx
|
|
1972
|
-
var import_react4 = require("react");
|
|
1973
|
-
var import_Checkbox = __toESM(require("@mui/material/Checkbox"));
|
|
1974
|
-
var import_FormControlLabel = __toESM(require("@mui/material/FormControlLabel"));
|
|
1975
|
-
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
1976
|
-
var KdsCheckbox = (0, import_react4.forwardRef)(
|
|
1977
|
-
({
|
|
1978
|
-
label,
|
|
1979
|
-
color = "primary",
|
|
1980
|
-
size = "medium",
|
|
1981
|
-
disabled = false,
|
|
1982
|
-
...props
|
|
1983
|
-
}, ref) => {
|
|
1984
|
-
const checkbox = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1985
|
-
import_Checkbox.default,
|
|
1986
|
-
{
|
|
1987
|
-
ref,
|
|
1988
|
-
color,
|
|
1989
|
-
size,
|
|
1990
|
-
disabled,
|
|
1991
|
-
...props
|
|
1992
|
-
}
|
|
1993
|
-
);
|
|
1994
|
-
if (label) {
|
|
1995
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1996
|
-
import_FormControlLabel.default,
|
|
1997
|
-
{
|
|
1998
|
-
control: checkbox,
|
|
1999
|
-
label,
|
|
2000
|
-
disabled
|
|
2001
|
-
}
|
|
2002
|
-
);
|
|
2003
|
-
}
|
|
2004
|
-
return checkbox;
|
|
2005
|
-
}
|
|
2006
|
-
);
|
|
2007
|
-
KdsCheckbox.displayName = "KdsCheckbox";
|
|
2008
|
-
|
|
2009
|
-
// src/components/core/KdsModal/KdsModal.tsx
|
|
2010
|
-
var import_react5 = require("react");
|
|
2011
|
-
var import_Dialog = __toESM(require("@mui/material/Dialog"));
|
|
2012
|
-
var import_DialogTitle = __toESM(require("@mui/material/DialogTitle"));
|
|
2013
|
-
var import_DialogContent = __toESM(require("@mui/material/DialogContent"));
|
|
2014
|
-
var import_DialogActions = __toESM(require("@mui/material/DialogActions"));
|
|
2015
|
-
var import_IconButton = __toESM(require("@mui/material/IconButton"));
|
|
2016
|
-
var import_Close = __toESM(require("@mui/icons-material/Close"));
|
|
2017
|
-
var import_ChevronLeft = __toESM(require("@mui/icons-material/ChevronLeft"));
|
|
2018
|
-
var import_Box = __toESM(require("@mui/material/Box"));
|
|
2019
|
-
var import_AppBar = __toESM(require("@mui/material/AppBar"));
|
|
2020
|
-
var import_Toolbar = __toESM(require("@mui/material/Toolbar"));
|
|
2021
|
-
var import_Typography = __toESM(require("@mui/material/Typography"));
|
|
2022
|
-
var import_Slide = __toESM(require("@mui/material/Slide"));
|
|
2023
|
-
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
2024
|
-
var SlideTransition = (0, import_react5.forwardRef)(function SlideTransition2(props, ref) {
|
|
2025
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Slide.default, { direction: "left", ref, ...props });
|
|
2026
|
-
});
|
|
2027
|
-
var KdsModal = ({
|
|
2028
|
-
open,
|
|
2029
|
-
onClose,
|
|
2030
|
-
title,
|
|
2031
|
-
children,
|
|
2032
|
-
footer,
|
|
2033
|
-
size = "sm",
|
|
2034
|
-
showCloseButton = true,
|
|
2035
|
-
fullScreen = false,
|
|
2036
|
-
...props
|
|
2037
|
-
}) => {
|
|
2038
|
-
if (fullScreen) {
|
|
2039
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
2040
|
-
import_Dialog.default,
|
|
2041
|
-
{
|
|
2042
|
-
open,
|
|
2043
|
-
onClose,
|
|
2044
|
-
fullScreen: true,
|
|
2045
|
-
TransitionComponent: SlideTransition,
|
|
2046
|
-
...props,
|
|
2047
|
-
children: [
|
|
2048
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
2049
|
-
import_AppBar.default,
|
|
2050
|
-
{
|
|
2051
|
-
sx: {
|
|
2052
|
-
position: "relative",
|
|
2053
|
-
backgroundColor: "background.paper",
|
|
2054
|
-
color: "text.primary",
|
|
2055
|
-
boxShadow: 0,
|
|
2056
|
-
py: 1
|
|
2057
|
-
},
|
|
2058
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Toolbar.default, { children: [
|
|
2059
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
2060
|
-
import_IconButton.default,
|
|
2061
|
-
{
|
|
2062
|
-
edge: "start",
|
|
2063
|
-
color: "inherit",
|
|
2064
|
-
onClick: onClose,
|
|
2065
|
-
"aria-label": "Cerrar",
|
|
2066
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_ChevronLeft.default, {})
|
|
2067
|
-
}
|
|
2068
|
-
),
|
|
2069
|
-
title && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Typography.default, { sx: { ml: 1, flex: 1 }, fontWeight: 600, variant: "h6", component: "div", children: title })
|
|
2070
|
-
] })
|
|
2071
|
-
}
|
|
2072
|
-
),
|
|
2073
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_DialogContent.default, { sx: { px: 5, py: 5 }, children }),
|
|
2074
|
-
footer && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_DialogActions.default, { sx: { px: 3, py: 2, gap: 1 }, children: footer })
|
|
2075
|
-
]
|
|
2076
|
-
}
|
|
2077
|
-
);
|
|
2078
|
-
}
|
|
2079
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
2080
|
-
import_Dialog.default,
|
|
2081
|
-
{
|
|
2082
|
-
open,
|
|
2083
|
-
onClose,
|
|
2084
|
-
maxWidth: size,
|
|
2085
|
-
fullWidth: true,
|
|
2086
|
-
PaperProps: {
|
|
2087
|
-
sx: {
|
|
2088
|
-
borderRadius: "12px",
|
|
2089
|
-
boxShadow: "0px 4px 4px rgba(0, 0, 0, 0.25)"
|
|
2090
|
-
}
|
|
2091
|
-
},
|
|
2092
|
-
...props,
|
|
2093
|
-
children: [
|
|
2094
|
-
(title || showCloseButton) && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
2095
|
-
import_DialogTitle.default,
|
|
2096
|
-
{
|
|
2097
|
-
sx: {
|
|
2098
|
-
display: "flex",
|
|
2099
|
-
alignItems: "center",
|
|
2100
|
-
justifyContent: title ? "space-between" : "flex-end",
|
|
2101
|
-
fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
|
|
2102
|
-
fontFeatureSettings: "'liga' off, 'clig' off",
|
|
2103
|
-
fontWeight: 600,
|
|
2104
|
-
fontSize: "1.25rem",
|
|
2105
|
-
lineHeight: "32px",
|
|
2106
|
-
letterSpacing: "0.15px",
|
|
2107
|
-
textAlign: "center",
|
|
2108
|
-
py: 2,
|
|
2109
|
-
px: 3
|
|
2110
|
-
},
|
|
2111
|
-
children: [
|
|
2112
|
-
title && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Box.default, { sx: { flex: 1 }, children: title }),
|
|
2113
|
-
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
2114
|
-
import_IconButton.default,
|
|
2115
|
-
{
|
|
2116
|
-
"aria-label": "Cerrar",
|
|
2117
|
-
onClick: onClose,
|
|
2118
|
-
sx: {
|
|
2119
|
-
color: "text.secondary",
|
|
2120
|
-
ml: "auto"
|
|
2121
|
-
},
|
|
2122
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Close.default, {})
|
|
2123
|
-
}
|
|
2124
|
-
)
|
|
2125
|
-
]
|
|
2126
|
-
}
|
|
2127
|
-
),
|
|
2128
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
2129
|
-
import_DialogContent.default,
|
|
2130
|
-
{
|
|
2131
|
-
sx: {
|
|
2132
|
-
px: 3,
|
|
2133
|
-
py: 2
|
|
2134
|
-
},
|
|
2135
|
-
children
|
|
2136
|
-
}
|
|
2137
|
-
),
|
|
2138
|
-
footer && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
2139
|
-
import_DialogActions.default,
|
|
2140
|
-
{
|
|
2141
|
-
sx: {
|
|
2142
|
-
px: 3,
|
|
2143
|
-
py: 2,
|
|
2144
|
-
gap: 1
|
|
2145
|
-
},
|
|
2146
|
-
children: footer
|
|
2147
|
-
}
|
|
2148
|
-
)
|
|
2149
|
-
]
|
|
2150
|
-
}
|
|
2151
|
-
);
|
|
2152
|
-
};
|
|
2153
|
-
KdsModal.displayName = "KdsModal";
|
|
2154
|
-
|
|
2155
|
-
// src/components/core/KdsCard/KdsCard.tsx
|
|
2156
|
-
var import_react6 = require("react");
|
|
2157
|
-
var import_Card = __toESM(require("@mui/material/Card"));
|
|
2158
|
-
var import_CardHeader = __toESM(require("@mui/material/CardHeader"));
|
|
2159
|
-
var import_CardContent = __toESM(require("@mui/material/CardContent"));
|
|
2160
|
-
var import_CardActions = __toESM(require("@mui/material/CardActions"));
|
|
2161
|
-
var import_CardActionArea = __toESM(require("@mui/material/CardActionArea"));
|
|
2162
|
-
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
2163
|
-
var paddingMap = {
|
|
2164
|
-
none: "0",
|
|
2165
|
-
sm: "8px 16px",
|
|
2166
|
-
// Compact
|
|
2167
|
-
md: "10px 20px",
|
|
2168
|
-
// Figma default (bank selection cards)
|
|
2169
|
-
lg: "16px 20px"
|
|
2170
|
-
// Spacious
|
|
2171
|
-
};
|
|
2172
|
-
var KdsCard = (0, import_react6.forwardRef)(
|
|
2173
|
-
({
|
|
2174
|
-
variant = "elevation",
|
|
2175
|
-
elevation = 1,
|
|
2176
|
-
padding,
|
|
2177
|
-
clickable = false,
|
|
2178
|
-
onCardClick,
|
|
2179
|
-
children,
|
|
2180
|
-
sx,
|
|
2181
|
-
...props
|
|
2182
|
-
}, ref) => {
|
|
2183
|
-
const cardContent = clickable ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_CardActionArea.default, { onClick: onCardClick, children }) : children;
|
|
2184
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
2185
|
-
import_Card.default,
|
|
2186
|
-
{
|
|
2187
|
-
ref,
|
|
2188
|
-
variant,
|
|
2189
|
-
elevation: variant === "elevation" ? elevation : 0,
|
|
2190
|
-
sx: {
|
|
2191
|
-
borderRadius: "6px",
|
|
2192
|
-
...variant === "outlined" && {
|
|
2193
|
-
border: "1px solid rgba(0, 0, 0, 0.42)"
|
|
2194
|
-
},
|
|
2195
|
-
...padding && {
|
|
2196
|
-
padding: paddingMap[padding]
|
|
2197
|
-
},
|
|
2198
|
-
...sx
|
|
2199
|
-
},
|
|
2200
|
-
...props,
|
|
2201
|
-
children: cardContent
|
|
2202
|
-
}
|
|
2203
|
-
);
|
|
2204
|
-
}
|
|
2205
|
-
);
|
|
2206
|
-
KdsCard.displayName = "KdsCard";
|
|
2207
|
-
var KdsCardHeader = (0, import_react6.forwardRef)(
|
|
2208
|
-
(props, ref) => {
|
|
2209
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_CardHeader.default, { ref, ...props });
|
|
2210
|
-
}
|
|
2211
|
-
);
|
|
2212
|
-
KdsCardHeader.displayName = "KdsCardHeader";
|
|
2213
|
-
var KdsCardContent = (0, import_react6.forwardRef)(
|
|
2214
|
-
(props, ref) => {
|
|
2215
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_CardContent.default, { ref, ...props });
|
|
2216
|
-
}
|
|
2217
|
-
);
|
|
2218
|
-
KdsCardContent.displayName = "KdsCardContent";
|
|
2219
|
-
var KdsCardActions = (0, import_react6.forwardRef)(
|
|
2220
|
-
(props, ref) => {
|
|
2221
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_CardActions.default, { ref, ...props });
|
|
2222
|
-
}
|
|
2223
|
-
);
|
|
2224
|
-
KdsCardActions.displayName = "KdsCardActions";
|
|
2225
|
-
|
|
2226
|
-
// src/components/core/KdsSpinner/KdsSpinner.tsx
|
|
2227
|
-
var import_CircularProgress2 = __toESM(require("@mui/material/CircularProgress"));
|
|
2228
|
-
var import_Box2 = __toESM(require("@mui/material/Box"));
|
|
2229
|
-
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
2230
|
-
var sizeMap = {
|
|
2231
|
-
small: 20,
|
|
2232
|
-
medium: 40,
|
|
2233
|
-
large: 60
|
|
2234
|
-
};
|
|
2235
|
-
var KdsSpinner = ({
|
|
2236
|
-
size = "medium",
|
|
2237
|
-
color = "primary",
|
|
2238
|
-
customSize,
|
|
2239
|
-
label = "Cargando...",
|
|
2240
|
-
sx,
|
|
2241
|
-
...props
|
|
2242
|
-
}) => {
|
|
2243
|
-
const spinnerSize = customSize || sizeMap[size];
|
|
2244
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
2245
|
-
import_Box2.default,
|
|
2246
|
-
{
|
|
2247
|
-
sx: {
|
|
2248
|
-
display: "inline-flex",
|
|
2249
|
-
alignItems: "center",
|
|
2250
|
-
justifyContent: "center"
|
|
2251
|
-
},
|
|
2252
|
-
role: "progressbar",
|
|
2253
|
-
"aria-label": label,
|
|
2254
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
2255
|
-
import_CircularProgress2.default,
|
|
2256
|
-
{
|
|
2257
|
-
size: spinnerSize,
|
|
2258
|
-
color,
|
|
2259
|
-
sx,
|
|
2260
|
-
...props
|
|
2261
|
-
}
|
|
2262
|
-
)
|
|
2263
|
-
}
|
|
2264
|
-
);
|
|
2265
|
-
};
|
|
2266
|
-
KdsSpinner.displayName = "KdsSpinner";
|
|
2267
|
-
|
|
2268
|
-
// src/components/core/KdsLinearProgress/KdsLinearProgress.tsx
|
|
2269
|
-
var import_LinearProgress = __toESM(require("@mui/material/LinearProgress"));
|
|
2270
|
-
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
2271
|
-
var KdsLinearProgress = ({
|
|
2272
|
-
color = "info",
|
|
2273
|
-
variant = "indeterminate",
|
|
2274
|
-
value,
|
|
2275
|
-
sx,
|
|
2276
|
-
...props
|
|
2277
|
-
}) => {
|
|
2278
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2279
|
-
import_LinearProgress.default,
|
|
2280
|
-
{
|
|
2281
|
-
color,
|
|
2282
|
-
variant,
|
|
2283
|
-
value,
|
|
2284
|
-
sx: {
|
|
2285
|
-
height: 4,
|
|
2286
|
-
borderRadius: 0,
|
|
2287
|
-
backgroundColor: "rgba(3, 169, 244, 0.4)",
|
|
2288
|
-
"& .MuiLinearProgress-bar": {
|
|
2289
|
-
backgroundColor: "#03A9F4"
|
|
2290
|
-
},
|
|
2291
|
-
...sx
|
|
2292
|
-
},
|
|
2293
|
-
...props
|
|
2294
|
-
}
|
|
2295
|
-
);
|
|
2296
|
-
};
|
|
2297
|
-
KdsLinearProgress.displayName = "KdsLinearProgress";
|
|
2298
|
-
|
|
2299
|
-
// src/components/core/KdsAlert/KdsAlert.tsx
|
|
2300
|
-
var import_Alert = __toESM(require("@mui/material/Alert"));
|
|
2301
|
-
var import_AlertTitle = __toESM(require("@mui/material/AlertTitle"));
|
|
2302
|
-
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
2303
|
-
var KdsAlert = ({
|
|
2304
|
-
severity = "info",
|
|
2305
|
-
variant = "standard",
|
|
2306
|
-
title,
|
|
2307
|
-
children,
|
|
2308
|
-
onClose,
|
|
2309
|
-
sx,
|
|
2310
|
-
...props
|
|
2311
|
-
}) => {
|
|
2312
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
2313
|
-
import_Alert.default,
|
|
2314
|
-
{
|
|
2315
|
-
severity,
|
|
2316
|
-
variant,
|
|
2317
|
-
onClose,
|
|
2318
|
-
sx: {
|
|
2319
|
-
borderRadius: "4px",
|
|
2320
|
-
fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
|
|
2321
|
-
fontFeatureSettings: "'liga' off, 'clig' off",
|
|
2322
|
-
fontSize: "0.875rem",
|
|
2323
|
-
lineHeight: 1.43,
|
|
2324
|
-
letterSpacing: "0.17px",
|
|
2325
|
-
...sx
|
|
2326
|
-
},
|
|
2327
|
-
...props,
|
|
2328
|
-
children: [
|
|
2329
|
-
title && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_AlertTitle.default, { children: title }),
|
|
2330
|
-
children
|
|
2331
|
-
]
|
|
2332
|
-
}
|
|
2333
|
-
);
|
|
2334
|
-
};
|
|
2335
|
-
KdsAlert.displayName = "KdsAlert";
|
|
2336
|
-
|
|
2337
|
-
// src/components/core/KdsTypography/KdsTypography.tsx
|
|
2338
|
-
var import_react7 = require("react");
|
|
2339
|
-
var import_Typography2 = __toESM(require("@mui/material/Typography"));
|
|
2340
|
-
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
2341
|
-
var colorMap = {
|
|
2342
|
-
primary: "#272930",
|
|
2343
|
-
// onSurface
|
|
2344
|
-
secondary: "rgba(0, 0, 0, 0.60)",
|
|
2345
|
-
tertiary: "#81848F",
|
|
2346
|
-
disabled: "#9797A5",
|
|
2347
|
-
error: "#D32F2F",
|
|
2348
|
-
success: "#2E7D32",
|
|
2349
|
-
info: "#0288D1",
|
|
2350
|
-
inherit: "inherit"
|
|
2351
|
-
};
|
|
2352
|
-
var fontFeatureSettings = "'liga' off, 'clig' off";
|
|
2353
|
-
var variantStyles = {
|
|
2354
|
-
// Display variants
|
|
2355
|
-
display1: {
|
|
2356
|
-
fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
|
|
2357
|
-
fontFeatureSettings,
|
|
2358
|
-
fontWeight: 700,
|
|
2359
|
-
fontSize: "2.5rem",
|
|
2360
|
-
// 40px
|
|
2361
|
-
lineHeight: 1.2,
|
|
2362
|
-
letterSpacing: "-0.01562em"
|
|
2363
|
-
},
|
|
2364
|
-
display2: {
|
|
2365
|
-
fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
|
|
2366
|
-
fontFeatureSettings,
|
|
2367
|
-
fontWeight: 700,
|
|
2368
|
-
fontSize: "2rem",
|
|
2369
|
-
// 32px
|
|
2370
|
-
lineHeight: 1.2,
|
|
2371
|
-
letterSpacing: "-0.00833em"
|
|
2372
|
-
},
|
|
2373
|
-
// Heading variants
|
|
2374
|
-
heading1: {
|
|
2375
|
-
fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
|
|
2376
|
-
fontFeatureSettings,
|
|
2377
|
-
fontWeight: 600,
|
|
2378
|
-
fontSize: "1.75rem",
|
|
2379
|
-
// 28px
|
|
2380
|
-
lineHeight: 1.2,
|
|
2381
|
-
letterSpacing: 0
|
|
2382
|
-
},
|
|
2383
|
-
heading2: {
|
|
2384
|
-
fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
|
|
2385
|
-
fontFeatureSettings,
|
|
2386
|
-
fontWeight: 600,
|
|
2387
|
-
fontSize: "1.5rem",
|
|
2388
|
-
// 24px
|
|
2389
|
-
lineHeight: 1.235,
|
|
2390
|
-
letterSpacing: "0.00735em"
|
|
2391
|
-
},
|
|
2392
|
-
heading3: {
|
|
2393
|
-
fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
|
|
2394
|
-
fontFeatureSettings,
|
|
2395
|
-
fontWeight: 600,
|
|
2396
|
-
fontSize: "1.25rem",
|
|
2397
|
-
// 20px
|
|
2398
|
-
lineHeight: "32px",
|
|
2399
|
-
letterSpacing: "0.15px"
|
|
2400
|
-
},
|
|
2401
|
-
// Body variants
|
|
2402
|
-
bodyLarge: {
|
|
2403
|
-
fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
|
|
2404
|
-
fontFeatureSettings,
|
|
2405
|
-
fontWeight: 400,
|
|
2406
|
-
fontSize: "1rem",
|
|
2407
|
-
// 16px
|
|
2408
|
-
lineHeight: 1.5,
|
|
2409
|
-
letterSpacing: "0.15px"
|
|
2410
|
-
},
|
|
2411
|
-
body: {
|
|
2412
|
-
fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
|
|
2413
|
-
fontFeatureSettings,
|
|
2414
|
-
fontWeight: 400,
|
|
2415
|
-
fontSize: "0.875rem",
|
|
2416
|
-
// 14px
|
|
2417
|
-
lineHeight: 1.43,
|
|
2418
|
-
letterSpacing: "0.17px"
|
|
2419
|
-
},
|
|
2420
|
-
bodySmall: {
|
|
2421
|
-
fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
|
|
2422
|
-
fontFeatureSettings,
|
|
2423
|
-
fontWeight: 400,
|
|
2424
|
-
fontSize: "0.75rem",
|
|
2425
|
-
// 12px
|
|
2426
|
-
lineHeight: 1.66,
|
|
2427
|
-
letterSpacing: "0.4px"
|
|
2428
|
-
},
|
|
2429
|
-
// Label variants
|
|
2430
|
-
label: {
|
|
2431
|
-
fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
|
|
2432
|
-
fontFeatureSettings,
|
|
2433
|
-
fontWeight: 400,
|
|
2434
|
-
fontSize: "0.75rem",
|
|
2435
|
-
// 12px
|
|
2436
|
-
lineHeight: "15px",
|
|
2437
|
-
letterSpacing: "1px",
|
|
2438
|
-
textTransform: "uppercase"
|
|
2439
|
-
},
|
|
2440
|
-
labelSmall: {
|
|
2441
|
-
fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
|
|
2442
|
-
fontFeatureSettings,
|
|
2443
|
-
fontWeight: 500,
|
|
2444
|
-
fontSize: "0.625rem",
|
|
2445
|
-
// 10px
|
|
2446
|
-
lineHeight: "14px",
|
|
2447
|
-
letterSpacing: 0
|
|
2448
|
-
},
|
|
2449
|
-
// Card variants
|
|
2450
|
-
cardTitle: {
|
|
2451
|
-
fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
|
|
2452
|
-
fontFeatureSettings,
|
|
2453
|
-
fontWeight: 600,
|
|
2454
|
-
fontSize: "1rem",
|
|
2455
|
-
// 16px
|
|
2456
|
-
lineHeight: "24px",
|
|
2457
|
-
letterSpacing: "0.15px"
|
|
2458
|
-
},
|
|
2459
|
-
cardSubtitle: {
|
|
2460
|
-
fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
|
|
2461
|
-
fontFeatureSettings,
|
|
2462
|
-
fontWeight: 600,
|
|
2463
|
-
fontSize: "0.875rem",
|
|
2464
|
-
// 14px
|
|
2465
|
-
lineHeight: "20px",
|
|
2466
|
-
letterSpacing: "0.15px"
|
|
2467
|
-
},
|
|
2468
|
-
// Semantic variants
|
|
2469
|
-
muted: {
|
|
2470
|
-
fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
|
|
2471
|
-
fontFeatureSettings,
|
|
2472
|
-
fontWeight: 400,
|
|
2473
|
-
fontSize: "0.875rem",
|
|
2474
|
-
// 14px
|
|
2475
|
-
lineHeight: 1.43,
|
|
2476
|
-
letterSpacing: "0.17px",
|
|
2477
|
-
color: "#81848F"
|
|
2478
|
-
},
|
|
2479
|
-
link: {
|
|
2480
|
-
fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
|
|
2481
|
-
fontFeatureSettings,
|
|
2482
|
-
fontWeight: 400,
|
|
2483
|
-
fontSize: "0.875rem",
|
|
2484
|
-
// 14px
|
|
2485
|
-
lineHeight: 1.43,
|
|
2486
|
-
letterSpacing: "0.17px",
|
|
2487
|
-
color: "#0288D1",
|
|
2488
|
-
textDecoration: "none",
|
|
2489
|
-
cursor: "pointer",
|
|
2490
|
-
"&:hover": {
|
|
2491
|
-
textDecoration: "underline"
|
|
2492
|
-
}
|
|
2493
|
-
}
|
|
2494
|
-
};
|
|
2495
|
-
var muiVariantMap = {
|
|
1355
|
+
)
|
|
1356
|
+
);
|
|
1357
|
+
KdsAlert.displayName = "KdsAlert";
|
|
1358
|
+
|
|
1359
|
+
// src/components/core/KdsTypography/KdsTypography.tsx
|
|
1360
|
+
var import_react9 = require("react");
|
|
1361
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1362
|
+
var variantTag = {
|
|
2496
1363
|
display1: "h1",
|
|
2497
1364
|
display2: "h2",
|
|
2498
|
-
heading1: "
|
|
2499
|
-
heading2: "
|
|
2500
|
-
heading3: "
|
|
2501
|
-
|
|
2502
|
-
body: "
|
|
2503
|
-
|
|
2504
|
-
label: "
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
muted: "body2",
|
|
2509
|
-
link: "body2"
|
|
1365
|
+
heading1: "h1",
|
|
1366
|
+
heading2: "h2",
|
|
1367
|
+
heading3: "h3",
|
|
1368
|
+
"body-large": "p",
|
|
1369
|
+
body: "p",
|
|
1370
|
+
"body-small": "p",
|
|
1371
|
+
label: "span",
|
|
1372
|
+
"label-small": "span",
|
|
1373
|
+
muted: "p",
|
|
1374
|
+
link: "span"
|
|
2510
1375
|
};
|
|
2511
|
-
var
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
var KdsTypography = (0, import_react7.forwardRef)(
|
|
2515
|
-
({ variant = "body", color = "primary", truncate, maxLines, sx, ...props }, ref) => {
|
|
2516
|
-
const isCustomVariant = typeof variant === "string" && isKhipuVariant(variant);
|
|
2517
|
-
const combinedSx = [
|
|
2518
|
-
// Apply custom variant styles if it's a Khipu variant
|
|
2519
|
-
isCustomVariant ? variantStyles[variant] : {},
|
|
2520
|
-
// Apply color (unless it's muted or link which have built-in colors)
|
|
2521
|
-
isCustomVariant && variant !== "muted" && variant !== "link" && color ? { color: colorMap[color] || color } : {},
|
|
2522
|
-
// Truncation styles
|
|
2523
|
-
truncate ? {
|
|
2524
|
-
overflow: "hidden",
|
|
2525
|
-
textOverflow: "ellipsis",
|
|
2526
|
-
...maxLines ? {
|
|
2527
|
-
display: "-webkit-box",
|
|
2528
|
-
WebkitLineClamp: maxLines,
|
|
2529
|
-
WebkitBoxOrient: "vertical"
|
|
2530
|
-
} : {
|
|
2531
|
-
whiteSpace: "nowrap"
|
|
2532
|
-
}
|
|
2533
|
-
} : {},
|
|
2534
|
-
// User-provided sx
|
|
2535
|
-
...Array.isArray(sx) ? sx : [sx]
|
|
2536
|
-
];
|
|
1376
|
+
var KdsTypography = (0, import_react9.forwardRef)(
|
|
1377
|
+
({ variant = "body", color, as, children, className, ...props }, ref) => {
|
|
1378
|
+
const Tag = as || variantTag[variant];
|
|
2537
1379
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2538
|
-
|
|
1380
|
+
Tag,
|
|
2539
1381
|
{
|
|
2540
1382
|
ref,
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
1383
|
+
className: (0, import_clsx.clsx)(
|
|
1384
|
+
`kds-text-${variant}`,
|
|
1385
|
+
color && color !== "inherit" && `kds-text-${color}`,
|
|
1386
|
+
className
|
|
1387
|
+
),
|
|
1388
|
+
...props,
|
|
1389
|
+
children
|
|
2544
1390
|
}
|
|
2545
1391
|
);
|
|
2546
1392
|
}
|
|
@@ -2548,117 +1394,98 @@ var KdsTypography = (0, import_react7.forwardRef)(
|
|
|
2548
1394
|
KdsTypography.displayName = "KdsTypography";
|
|
2549
1395
|
|
|
2550
1396
|
// src/components/core/KdsTabs/KdsTabs.tsx
|
|
2551
|
-
var
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
var
|
|
1397
|
+
var import_react11 = __toESM(require("react"));
|
|
1398
|
+
|
|
1399
|
+
// src/components/core/hooks/useTabsKeyboard.ts
|
|
1400
|
+
var import_react10 = require("react");
|
|
1401
|
+
function useTabsKeyboard(tabCount, activeIndex, onChange) {
|
|
1402
|
+
const onKeyDown = (0, import_react10.useCallback)(
|
|
1403
|
+
(e) => {
|
|
1404
|
+
let next = activeIndex;
|
|
1405
|
+
if (e.key === "ArrowRight") next = (activeIndex + 1) % tabCount;
|
|
1406
|
+
else if (e.key === "ArrowLeft") next = (activeIndex - 1 + tabCount) % tabCount;
|
|
1407
|
+
else if (e.key === "Home") next = 0;
|
|
1408
|
+
else if (e.key === "End") next = tabCount - 1;
|
|
1409
|
+
else return;
|
|
1410
|
+
e.preventDefault();
|
|
1411
|
+
onChange(next);
|
|
1412
|
+
const tablist = e.currentTarget;
|
|
1413
|
+
const buttons = tablist.querySelectorAll('[role="tab"]');
|
|
1414
|
+
buttons[next]?.focus();
|
|
1415
|
+
},
|
|
1416
|
+
[tabCount, activeIndex, onChange]
|
|
1417
|
+
);
|
|
1418
|
+
return { onKeyDown };
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
// src/components/core/KdsTabs/KdsTabs.tsx
|
|
2555
1422
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
2556
|
-
var
|
|
2557
|
-
|
|
2558
|
-
|
|
1423
|
+
var KdsTabs = (0, import_react11.forwardRef)(
|
|
1424
|
+
({ activeIndex, onChange, variant = "standard", children, className, style, ...props }, ref) => {
|
|
1425
|
+
const tabCount = import_react11.Children.count(children);
|
|
1426
|
+
const { onKeyDown } = useTabsKeyboard(tabCount, activeIndex, onChange);
|
|
1427
|
+
const mergedStyle = (0, import_react11.useMemo)(() => {
|
|
1428
|
+
if (variant !== "segmented") return style;
|
|
1429
|
+
return {
|
|
1430
|
+
...style,
|
|
1431
|
+
"--_tab-count": tabCount,
|
|
1432
|
+
"--_active-idx": activeIndex
|
|
1433
|
+
};
|
|
1434
|
+
}, [variant, tabCount, activeIndex, style]);
|
|
2559
1435
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2560
|
-
|
|
1436
|
+
"div",
|
|
2561
1437
|
{
|
|
2562
1438
|
ref,
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
padding: "9px 16px",
|
|
2576
|
-
flex: 1,
|
|
2577
|
-
maxWidth: "none",
|
|
2578
|
-
"&.Mui-selected": {
|
|
2579
|
-
color: colors.info.main
|
|
2580
|
-
},
|
|
2581
|
-
"&:not(.Mui-selected)": {
|
|
2582
|
-
color: colors.text.secondary
|
|
2583
|
-
},
|
|
2584
|
-
...sx
|
|
2585
|
-
},
|
|
2586
|
-
...props
|
|
1439
|
+
role: "tablist",
|
|
1440
|
+
className: (0, import_clsx.clsx)(variant === "segmented" ? "kds-segmented-tabs" : "kds-tabs", className),
|
|
1441
|
+
style: mergedStyle,
|
|
1442
|
+
onKeyDown,
|
|
1443
|
+
...props,
|
|
1444
|
+
children: import_react11.Children.map(children, (child, i) => {
|
|
1445
|
+
if (!import_react11.default.isValidElement(child)) return child;
|
|
1446
|
+
return import_react11.default.cloneElement(child, {
|
|
1447
|
+
_active: i === activeIndex,
|
|
1448
|
+
_onClick: () => onChange(i)
|
|
1449
|
+
});
|
|
1450
|
+
})
|
|
2587
1451
|
}
|
|
2588
1452
|
);
|
|
2589
1453
|
}
|
|
2590
1454
|
);
|
|
1455
|
+
KdsTabs.displayName = "KdsTabs";
|
|
1456
|
+
var KdsTab = (0, import_react11.forwardRef)(
|
|
1457
|
+
({ _active, _onClick, children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1458
|
+
"button",
|
|
1459
|
+
{
|
|
1460
|
+
ref,
|
|
1461
|
+
role: "tab",
|
|
1462
|
+
"aria-selected": _active,
|
|
1463
|
+
tabIndex: _active ? 0 : -1,
|
|
1464
|
+
className: (0, import_clsx.clsx)(_active && "active", className),
|
|
1465
|
+
onClick: _onClick,
|
|
1466
|
+
...props,
|
|
1467
|
+
children
|
|
1468
|
+
}
|
|
1469
|
+
)
|
|
1470
|
+
);
|
|
2591
1471
|
KdsTab.displayName = "KdsTab";
|
|
2592
|
-
var KdsTabPanel = (0,
|
|
2593
|
-
({
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
1472
|
+
var KdsTabPanel = (0, import_react11.forwardRef)(
|
|
1473
|
+
({ active, children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1474
|
+
"div",
|
|
1475
|
+
{
|
|
1476
|
+
ref,
|
|
1477
|
+
role: "tabpanel",
|
|
1478
|
+
hidden: !active,
|
|
1479
|
+
className,
|
|
1480
|
+
...props,
|
|
1481
|
+
children
|
|
2597
1482
|
}
|
|
2598
|
-
|
|
2599
|
-
import_Box3.default,
|
|
2600
|
-
{
|
|
2601
|
-
ref,
|
|
2602
|
-
role: "tabpanel",
|
|
2603
|
-
id: `tabpanel-${value}`,
|
|
2604
|
-
"aria-labelledby": `tab-${value}`,
|
|
2605
|
-
sx: {
|
|
2606
|
-
width: "100%",
|
|
2607
|
-
...sx
|
|
2608
|
-
},
|
|
2609
|
-
...props,
|
|
2610
|
-
children
|
|
2611
|
-
}
|
|
2612
|
-
);
|
|
2613
|
-
}
|
|
1483
|
+
)
|
|
2614
1484
|
);
|
|
2615
1485
|
KdsTabPanel.displayName = "KdsTabPanel";
|
|
2616
|
-
var KdsTabs = (0, import_react8.forwardRef)(
|
|
2617
|
-
({
|
|
2618
|
-
value,
|
|
2619
|
-
onChange,
|
|
2620
|
-
color = "info",
|
|
2621
|
-
variant = "fullWidth",
|
|
2622
|
-
children,
|
|
2623
|
-
sx,
|
|
2624
|
-
...props
|
|
2625
|
-
}, ref) => {
|
|
2626
|
-
const indicatorColor = color === "info" ? colors.info.main : color === "primary" ? colors.primary.main : colors.secondary.main;
|
|
2627
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TabsContext.Provider, { value: { value, onChange }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2628
|
-
import_Tabs.default,
|
|
2629
|
-
{
|
|
2630
|
-
ref,
|
|
2631
|
-
value,
|
|
2632
|
-
onChange,
|
|
2633
|
-
variant,
|
|
2634
|
-
textColor: "inherit",
|
|
2635
|
-
TabIndicatorProps: {
|
|
2636
|
-
sx: {
|
|
2637
|
-
backgroundColor: indicatorColor,
|
|
2638
|
-
height: "2px"
|
|
2639
|
-
}
|
|
2640
|
-
},
|
|
2641
|
-
sx: {
|
|
2642
|
-
width: "100%",
|
|
2643
|
-
minHeight: "42px",
|
|
2644
|
-
"& .MuiTabs-flexContainer": {
|
|
2645
|
-
width: "100%"
|
|
2646
|
-
},
|
|
2647
|
-
...sx
|
|
2648
|
-
},
|
|
2649
|
-
...props,
|
|
2650
|
-
children
|
|
2651
|
-
}
|
|
2652
|
-
) });
|
|
2653
|
-
}
|
|
2654
|
-
);
|
|
2655
|
-
KdsTabs.displayName = "KdsTabs";
|
|
2656
1486
|
|
|
2657
1487
|
// src/components/core/KdsLogoHeader/KdsLogoHeader.tsx
|
|
2658
|
-
var
|
|
2659
|
-
var import_Box4 = __toESM(require("@mui/material/Box"));
|
|
2660
|
-
var import_IconButton2 = __toESM(require("@mui/material/IconButton"));
|
|
2661
|
-
var import_Close2 = __toESM(require("@mui/icons-material/Close"));
|
|
1488
|
+
var import_react12 = require("react");
|
|
2662
1489
|
|
|
2663
1490
|
// src/assets/images/khipu-logo-color.svg
|
|
2664
1491
|
var khipu_logo_color_default = "./khipu-logo-color-TV75AKOV.svg";
|
|
@@ -2666,33 +1493,20 @@ var khipu_logo_color_default = "./khipu-logo-color-TV75AKOV.svg";
|
|
|
2666
1493
|
// src/components/core/KdsLogoHeader/KdsLogoHeader.tsx
|
|
2667
1494
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
2668
1495
|
var KhipuLogo = () => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2669
|
-
|
|
1496
|
+
"img",
|
|
2670
1497
|
{
|
|
2671
|
-
component: "img",
|
|
2672
1498
|
src: khipu_logo_color_default,
|
|
2673
1499
|
alt: "Khipu",
|
|
2674
|
-
|
|
2675
|
-
height: "15px",
|
|
2676
|
-
maxHeight: "15px",
|
|
2677
|
-
width: "auto",
|
|
2678
|
-
maxWidth: "50px",
|
|
2679
|
-
objectFit: "contain"
|
|
2680
|
-
}
|
|
1500
|
+
className: "kds-logo-header-logo-img"
|
|
2681
1501
|
}
|
|
2682
1502
|
);
|
|
2683
|
-
var KdsLogoHeaderLogo = (0,
|
|
2684
|
-
({ children,
|
|
1503
|
+
var KdsLogoHeaderLogo = (0, import_react12.forwardRef)(
|
|
1504
|
+
({ children, className, ...props }, ref) => {
|
|
2685
1505
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2686
|
-
|
|
1506
|
+
"div",
|
|
2687
1507
|
{
|
|
2688
1508
|
ref,
|
|
2689
|
-
|
|
2690
|
-
display: "flex",
|
|
2691
|
-
alignItems: "center",
|
|
2692
|
-
height: "15px",
|
|
2693
|
-
overflow: "hidden",
|
|
2694
|
-
...sx
|
|
2695
|
-
},
|
|
1509
|
+
className: (0, import_clsx.clsx)("kds-logo-header-logo", className),
|
|
2696
1510
|
...props,
|
|
2697
1511
|
children: children || /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(KhipuLogo, {})
|
|
2698
1512
|
}
|
|
@@ -2700,21 +1514,13 @@ var KdsLogoHeaderLogo = (0, import_react9.forwardRef)(
|
|
|
2700
1514
|
}
|
|
2701
1515
|
);
|
|
2702
1516
|
KdsLogoHeaderLogo.displayName = "KdsLogoHeaderLogo";
|
|
2703
|
-
var KdsLogoHeaderSeparator = (0,
|
|
2704
|
-
({ children = "|",
|
|
1517
|
+
var KdsLogoHeaderSeparator = (0, import_react12.forwardRef)(
|
|
1518
|
+
({ children = "|", className, ...props }, ref) => {
|
|
2705
1519
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2706
|
-
|
|
1520
|
+
"span",
|
|
2707
1521
|
{
|
|
2708
1522
|
ref,
|
|
2709
|
-
|
|
2710
|
-
sx: {
|
|
2711
|
-
fontFamily: fontFamilies.secondary,
|
|
2712
|
-
fontWeight: fontWeights.medium,
|
|
2713
|
-
fontSize: "10px",
|
|
2714
|
-
lineHeight: "14px",
|
|
2715
|
-
color: "#9797A5",
|
|
2716
|
-
...sx
|
|
2717
|
-
},
|
|
1523
|
+
className: (0, import_clsx.clsx)("kds-logo-header-separator", className),
|
|
2718
1524
|
...props,
|
|
2719
1525
|
children
|
|
2720
1526
|
}
|
|
@@ -2722,22 +1528,13 @@ var KdsLogoHeaderSeparator = (0, import_react9.forwardRef)(
|
|
|
2722
1528
|
}
|
|
2723
1529
|
);
|
|
2724
1530
|
KdsLogoHeaderSeparator.displayName = "KdsLogoHeaderSeparator";
|
|
2725
|
-
var KdsLogoHeaderCode = (0,
|
|
2726
|
-
({ children,
|
|
1531
|
+
var KdsLogoHeaderCode = (0, import_react12.forwardRef)(
|
|
1532
|
+
({ children, className, ...props }, ref) => {
|
|
2727
1533
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2728
|
-
|
|
1534
|
+
"span",
|
|
2729
1535
|
{
|
|
2730
1536
|
ref,
|
|
2731
|
-
|
|
2732
|
-
sx: {
|
|
2733
|
-
fontFamily: fontFamilies.primary,
|
|
2734
|
-
fontWeight: fontWeights.medium,
|
|
2735
|
-
fontSize: "9px",
|
|
2736
|
-
lineHeight: "14px",
|
|
2737
|
-
color: "#9797A5",
|
|
2738
|
-
whiteSpace: "nowrap",
|
|
2739
|
-
...sx
|
|
2740
|
-
},
|
|
1537
|
+
className: (0, import_clsx.clsx)("kds-logo-header-code", className),
|
|
2741
1538
|
...props,
|
|
2742
1539
|
children
|
|
2743
1540
|
}
|
|
@@ -2745,55 +1542,29 @@ var KdsLogoHeaderCode = (0, import_react9.forwardRef)(
|
|
|
2745
1542
|
}
|
|
2746
1543
|
);
|
|
2747
1544
|
KdsLogoHeaderCode.displayName = "KdsLogoHeaderCode";
|
|
2748
|
-
var KdsLogoHeaderCloseButton = (0,
|
|
2749
|
-
({ onClose,
|
|
2750
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2751
|
-
|
|
1545
|
+
var KdsLogoHeaderCloseButton = (0, import_react12.forwardRef)(
|
|
1546
|
+
({ onClose, className, ...props }, ref) => {
|
|
1547
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "kds-logo-header-close-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1548
|
+
"button",
|
|
2752
1549
|
{
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2759
|
-
import_IconButton2.default,
|
|
2760
|
-
{
|
|
2761
|
-
ref,
|
|
2762
|
-
onClick: onClose,
|
|
2763
|
-
size: "small",
|
|
2764
|
-
"aria-label": "close",
|
|
2765
|
-
sx: {
|
|
2766
|
-
color: colors.action.active,
|
|
2767
|
-
padding: 0,
|
|
2768
|
-
"&:hover": {
|
|
2769
|
-
backgroundColor: colors.action.hover
|
|
2770
|
-
},
|
|
2771
|
-
...sx
|
|
2772
|
-
},
|
|
2773
|
-
...props,
|
|
2774
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_Close2.default, { sx: { fontSize: 24 } })
|
|
2775
|
-
}
|
|
2776
|
-
)
|
|
1550
|
+
ref,
|
|
1551
|
+
onClick: onClose,
|
|
1552
|
+
className: (0, import_clsx.clsx)("kds-btn kds-btn-icon", className),
|
|
1553
|
+
"aria-label": "close",
|
|
1554
|
+
...props,
|
|
1555
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("i", { className: "material-symbols-outlined", children: "close" })
|
|
2777
1556
|
}
|
|
2778
|
-
);
|
|
1557
|
+
) });
|
|
2779
1558
|
}
|
|
2780
1559
|
);
|
|
2781
1560
|
KdsLogoHeaderCloseButton.displayName = "KdsLogoHeaderCloseButton";
|
|
2782
|
-
var KdsLogoHeader = (0,
|
|
2783
|
-
({ children,
|
|
1561
|
+
var KdsLogoHeader = (0, import_react12.forwardRef)(
|
|
1562
|
+
({ children, className, ...props }, ref) => {
|
|
2784
1563
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2785
|
-
|
|
1564
|
+
"div",
|
|
2786
1565
|
{
|
|
2787
1566
|
ref,
|
|
2788
|
-
|
|
2789
|
-
display: "flex",
|
|
2790
|
-
alignItems: "center",
|
|
2791
|
-
gap: spacing[2],
|
|
2792
|
-
paddingX: semanticSpacing.card.paddingX,
|
|
2793
|
-
paddingY: semanticSpacing.card.paddingY,
|
|
2794
|
-
backgroundColor: colors.background.default,
|
|
2795
|
-
...sx
|
|
2796
|
-
},
|
|
1567
|
+
className: (0, import_clsx.clsx)("kds-brand-row", className),
|
|
2797
1568
|
...props,
|
|
2798
1569
|
children
|
|
2799
1570
|
}
|
|
@@ -2803,347 +1574,593 @@ var KdsLogoHeader = (0, import_react9.forwardRef)(
|
|
|
2803
1574
|
KdsLogoHeader.displayName = "KdsLogoHeader";
|
|
2804
1575
|
|
|
2805
1576
|
// src/components/core/KdsRadioGroup/KdsRadioGroup.tsx
|
|
2806
|
-
var
|
|
2807
|
-
var import_RadioGroup = __toESM(require("@mui/material/RadioGroup"));
|
|
2808
|
-
var import_Radio = __toESM(require("@mui/material/Radio"));
|
|
2809
|
-
var import_FormControl = __toESM(require("@mui/material/FormControl"));
|
|
2810
|
-
var import_FormControlLabel2 = __toESM(require("@mui/material/FormControlLabel"));
|
|
2811
|
-
var import_FormLabel = __toESM(require("@mui/material/FormLabel"));
|
|
1577
|
+
var import_react13 = require("react");
|
|
2812
1578
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2813
|
-
var
|
|
2814
|
-
({
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
)
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
}
|
|
2831
|
-
const radioGroup = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_RadioGroup.default, { ref, ...props, children: options ? options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2832
|
-
import_FormControlLabel2.default,
|
|
2833
|
-
{
|
|
2834
|
-
value: option.value,
|
|
2835
|
-
disabled: disabled || option.disabled,
|
|
2836
|
-
control: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_Radio.default, { color, size }),
|
|
2837
|
-
label: option.label
|
|
2838
|
-
},
|
|
2839
|
-
option.value
|
|
2840
|
-
)) : children });
|
|
2841
|
-
if (label) {
|
|
2842
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_FormControl.default, { required, disabled, error, children: [
|
|
2843
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_FormLabel.default, { children: label }),
|
|
2844
|
-
radioGroup
|
|
2845
|
-
] });
|
|
2846
|
-
}
|
|
2847
|
-
return radioGroup;
|
|
2848
|
-
}
|
|
1579
|
+
var KdsRadioGroup = (0, import_react13.forwardRef)(
|
|
1580
|
+
({ label, name, options, value, onChange, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("fieldset", { ref, className: (0, import_clsx.clsx)("kds-radio-group", className), ...props, children: [
|
|
1581
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("legend", { children: label }),
|
|
1582
|
+
options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: "field", children: [
|
|
1583
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1584
|
+
"input",
|
|
1585
|
+
{
|
|
1586
|
+
type: "radio",
|
|
1587
|
+
name,
|
|
1588
|
+
value: opt.value,
|
|
1589
|
+
checked: value === opt.value,
|
|
1590
|
+
disabled: opt.disabled,
|
|
1591
|
+
onChange: () => onChange?.(opt.value)
|
|
1592
|
+
}
|
|
1593
|
+
),
|
|
1594
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: opt.label })
|
|
1595
|
+
] }, opt.value))
|
|
1596
|
+
] })
|
|
2849
1597
|
);
|
|
2850
1598
|
KdsRadioGroup.displayName = "KdsRadioGroup";
|
|
2851
1599
|
|
|
2852
1600
|
// src/components/core/KdsSelect/KdsSelect.tsx
|
|
2853
|
-
var
|
|
2854
|
-
var
|
|
2855
|
-
var import_MenuItem = __toESM(require("@mui/material/MenuItem"));
|
|
2856
|
-
var import_FormControl2 = __toESM(require("@mui/material/FormControl"));
|
|
2857
|
-
var import_InputLabel = __toESM(require("@mui/material/InputLabel"));
|
|
2858
|
-
var import_FormHelperText = __toESM(require("@mui/material/FormHelperText"));
|
|
1601
|
+
var import_react14 = require("react");
|
|
1602
|
+
var Select = __toESM(require("@radix-ui/react-select"));
|
|
2859
1603
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2860
|
-
var
|
|
2861
|
-
(props, ref) => {
|
|
2862
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_MenuItem.default, { ref, ...props });
|
|
2863
|
-
}
|
|
2864
|
-
);
|
|
2865
|
-
KdsMenuItem.displayName = "KdsMenuItem";
|
|
2866
|
-
var KdsSelect = (0, import_react11.forwardRef)(
|
|
1604
|
+
var KdsSelectRoot = (0, import_react14.forwardRef)(
|
|
2867
1605
|
({
|
|
2868
|
-
|
|
2869
|
-
|
|
1606
|
+
value,
|
|
1607
|
+
onValueChange,
|
|
1608
|
+
placeholder,
|
|
2870
1609
|
label,
|
|
2871
|
-
options,
|
|
2872
|
-
helperText,
|
|
2873
|
-
fullWidth = true,
|
|
2874
1610
|
error,
|
|
2875
|
-
|
|
1611
|
+
helperText,
|
|
2876
1612
|
disabled,
|
|
1613
|
+
fullWidth = true,
|
|
2877
1614
|
children,
|
|
2878
|
-
|
|
2879
|
-
}, ref) =>
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
fullWidth,
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
children:
|
|
2891
|
-
|
|
2892
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.
|
|
2893
|
-
|
|
2894
|
-
{
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
)) : children
|
|
2910
|
-
}
|
|
2911
|
-
),
|
|
2912
|
-
helperText && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_FormHelperText.default, { children: helperText })
|
|
2913
|
-
]
|
|
2914
|
-
}
|
|
2915
|
-
);
|
|
2916
|
-
}
|
|
1615
|
+
className
|
|
1616
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1617
|
+
"div",
|
|
1618
|
+
{
|
|
1619
|
+
ref,
|
|
1620
|
+
className: (0, import_clsx.clsx)(
|
|
1621
|
+
"kds-select",
|
|
1622
|
+
error && "kds-select-error",
|
|
1623
|
+
fullWidth && "kds-select-full",
|
|
1624
|
+
className
|
|
1625
|
+
),
|
|
1626
|
+
children: [
|
|
1627
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("label", { className: "kds-select-label", children: label }),
|
|
1628
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Select.Root, { value, onValueChange, disabled, children: [
|
|
1629
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Select.Trigger, { className: "kds-select-trigger", children: [
|
|
1630
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Select.Value, { placeholder }),
|
|
1631
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Select.Icon, { className: "kds-select-icon", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("i", { className: "material-symbols-outlined", children: "expand_more" }) })
|
|
1632
|
+
] }),
|
|
1633
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Select.Content, { className: "kds-select-content", position: "popper", sideOffset: 4, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Select.Viewport, { className: "kds-select-viewport", children }) }) })
|
|
1634
|
+
] }),
|
|
1635
|
+
helperText && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: (0, import_clsx.clsx)("kds-select-helper", error && "kds-select-helper-error"), children: helperText })
|
|
1636
|
+
]
|
|
1637
|
+
}
|
|
1638
|
+
)
|
|
1639
|
+
);
|
|
1640
|
+
KdsSelectRoot.displayName = "KdsSelect";
|
|
1641
|
+
var KdsSelectItem = (0, import_react14.forwardRef)(
|
|
1642
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Select.Item, { ref, className: (0, import_clsx.clsx)("kds-select-item", className), ...props, children: [
|
|
1643
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Select.ItemText, { children }),
|
|
1644
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Select.ItemIndicator, { className: "kds-select-item-indicator", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("i", { className: "material-symbols-outlined", children: "check" }) })
|
|
1645
|
+
] })
|
|
2917
1646
|
);
|
|
2918
|
-
|
|
1647
|
+
KdsSelectItem.displayName = "KdsSelect.Item";
|
|
1648
|
+
var KdsSelect = Object.assign(KdsSelectRoot, {
|
|
1649
|
+
Item: KdsSelectItem
|
|
1650
|
+
});
|
|
2919
1651
|
|
|
2920
1652
|
// src/components/core/KdsChip/KdsChip.tsx
|
|
2921
|
-
var
|
|
2922
|
-
var import_Chip = __toESM(require("@mui/material/Chip"));
|
|
1653
|
+
var import_react15 = require("react");
|
|
2923
1654
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2924
|
-
var KdsChip = (0,
|
|
2925
|
-
({
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
...props
|
|
2931
|
-
}, ref) => {
|
|
2932
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2933
|
-
import_Chip.default,
|
|
2934
|
-
{
|
|
2935
|
-
ref,
|
|
2936
|
-
variant,
|
|
2937
|
-
color,
|
|
2938
|
-
size,
|
|
2939
|
-
sx: {
|
|
2940
|
-
borderRadius: "4px",
|
|
2941
|
-
...sx
|
|
2942
|
-
},
|
|
2943
|
-
...props
|
|
2944
|
-
}
|
|
2945
|
-
);
|
|
2946
|
-
}
|
|
1655
|
+
var KdsChip = (0, import_react15.forwardRef)(
|
|
1656
|
+
({ color, icon, onDelete, children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { ref, className: (0, import_clsx.clsx)("kds-badge", color, className), ...props, children: [
|
|
1657
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("i", { className: "material-symbols-outlined", children: icon }),
|
|
1658
|
+
children,
|
|
1659
|
+
onDelete && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { className: "kds-btn kds-btn-text kds-btn-sm", onClick: onDelete, "aria-label": "Eliminar", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("i", { className: "material-symbols-outlined", children: "close" }) })
|
|
1660
|
+
] })
|
|
2947
1661
|
);
|
|
2948
1662
|
KdsChip.displayName = "KdsChip";
|
|
2949
1663
|
|
|
2950
1664
|
// src/components/core/KdsSnackbar/KdsSnackbar.tsx
|
|
2951
|
-
var
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
var
|
|
1665
|
+
var import_react17 = require("react");
|
|
1666
|
+
|
|
1667
|
+
// src/components/core/hooks/useAutoHide.ts
|
|
1668
|
+
var import_react16 = require("react");
|
|
1669
|
+
function useAutoHide(durationMs, onHide) {
|
|
1670
|
+
const [visible, setVisible] = (0, import_react16.useState)(true);
|
|
1671
|
+
const onHideRef = (0, import_react16.useRef)(onHide);
|
|
1672
|
+
onHideRef.current = onHide;
|
|
1673
|
+
(0, import_react16.useEffect)(() => {
|
|
1674
|
+
if (durationMs <= 0) return;
|
|
1675
|
+
const timer = setTimeout(() => {
|
|
1676
|
+
setVisible(false);
|
|
1677
|
+
onHideRef.current?.();
|
|
1678
|
+
}, durationMs);
|
|
1679
|
+
return () => clearTimeout(timer);
|
|
1680
|
+
}, [durationMs]);
|
|
1681
|
+
return { visible, setVisible };
|
|
1682
|
+
}
|
|
1683
|
+
|
|
1684
|
+
// src/components/core/KdsSnackbar/KdsSnackbar.tsx
|
|
2955
1685
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2956
|
-
var KdsSnackbar = (0,
|
|
2957
|
-
({
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
const action = showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2965
|
-
import_IconButton3.default,
|
|
2966
|
-
{
|
|
2967
|
-
size: "small",
|
|
2968
|
-
"aria-label": "Cerrar",
|
|
2969
|
-
color: "inherit",
|
|
2970
|
-
onClick: (e) => onClose?.(e, "escapeKeyDown"),
|
|
2971
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_Close3.default, { fontSize: "small" })
|
|
2972
|
-
}
|
|
2973
|
-
) : void 0;
|
|
2974
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2975
|
-
import_Snackbar.default,
|
|
2976
|
-
{
|
|
2977
|
-
ref,
|
|
2978
|
-
anchorOrigin: { vertical, horizontal },
|
|
2979
|
-
onClose,
|
|
2980
|
-
action: props.action || action,
|
|
2981
|
-
...props
|
|
2982
|
-
}
|
|
2983
|
-
);
|
|
1686
|
+
var KdsSnackbar = (0, import_react17.forwardRef)(
|
|
1687
|
+
({ message, type, duration = 5e3, onClose, open = true, className, ...props }, ref) => {
|
|
1688
|
+
const { visible } = useAutoHide(duration, onClose);
|
|
1689
|
+
if (!open || !visible) return null;
|
|
1690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { ref, role: "status", className: (0, import_clsx.clsx)("snackbar", "active", type, className), ...props, children: [
|
|
1691
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: message }),
|
|
1692
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { onClick: onClose, "aria-label": "Cerrar", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("i", { className: "material-symbols-outlined", children: "close" }) })
|
|
1693
|
+
] });
|
|
2984
1694
|
}
|
|
2985
1695
|
);
|
|
2986
1696
|
KdsSnackbar.displayName = "KdsSnackbar";
|
|
2987
1697
|
|
|
2988
1698
|
// src/components/core/KdsTooltip/KdsTooltip.tsx
|
|
2989
|
-
var
|
|
1699
|
+
var Tooltip = __toESM(require("@radix-ui/react-tooltip"));
|
|
2990
1700
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
1701
|
+
function KdsTooltip({
|
|
1702
|
+
content,
|
|
1703
|
+
children,
|
|
1704
|
+
placement = "top",
|
|
1705
|
+
className,
|
|
1706
|
+
open,
|
|
1707
|
+
defaultOpen,
|
|
1708
|
+
onOpenChange,
|
|
1709
|
+
delayDuration = 300
|
|
1710
|
+
}) {
|
|
1711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Tooltip.Provider, { delayDuration, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Tooltip.Root, { open, defaultOpen, onOpenChange, children: [
|
|
1712
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Tooltip.Trigger, { asChild: true, children }),
|
|
1713
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Tooltip.Content, { className: (0, import_clsx.clsx)("kds-tooltip", className), side: placement, sideOffset: 4, children: [
|
|
1714
|
+
content,
|
|
1715
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Tooltip.Arrow, { className: "kds-tooltip-arrow" })
|
|
1716
|
+
] }) })
|
|
1717
|
+
] }) });
|
|
1718
|
+
}
|
|
2998
1719
|
|
|
2999
1720
|
// src/components/core/KdsAccordion/KdsAccordion.tsx
|
|
3000
|
-
var
|
|
3001
|
-
var import_Accordion = __toESM(require("@mui/material/Accordion"));
|
|
3002
|
-
var import_AccordionSummary = __toESM(require("@mui/material/AccordionSummary"));
|
|
3003
|
-
var import_AccordionDetails = __toESM(require("@mui/material/AccordionDetails"));
|
|
3004
|
-
var import_ExpandMore = __toESM(require("@mui/icons-material/ExpandMore"));
|
|
1721
|
+
var import_react18 = require("react");
|
|
3005
1722
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
3006
|
-
var
|
|
3007
|
-
({
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
1723
|
+
var KdsAccordion = (0, import_react18.forwardRef)(
|
|
1724
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("details", { ref, className: (0, import_clsx.clsx)("kds-accordion", className), ...props, children })
|
|
1725
|
+
);
|
|
1726
|
+
KdsAccordion.displayName = "KdsAccordion";
|
|
1727
|
+
var KdsAccordionSummary = (0, import_react18.forwardRef)(
|
|
1728
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("summary", { ref, className: (0, import_clsx.clsx)("kds-accordion-summary", className), ...props, children: [
|
|
1729
|
+
children,
|
|
1730
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("i", { className: "material-symbols-outlined", children: "expand_more" })
|
|
1731
|
+
] })
|
|
1732
|
+
);
|
|
1733
|
+
KdsAccordionSummary.displayName = "KdsAccordionSummary";
|
|
1734
|
+
var KdsAccordionDetails = (0, import_react18.forwardRef)(
|
|
1735
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-accordion-details", className), ...props, children })
|
|
1736
|
+
);
|
|
1737
|
+
KdsAccordionDetails.displayName = "KdsAccordionDetails";
|
|
1738
|
+
|
|
1739
|
+
// src/components/core/KdsDivider/KdsDivider.tsx
|
|
1740
|
+
var import_react19 = require("react");
|
|
1741
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1742
|
+
var KdsDivider = (0, import_react19.forwardRef)(
|
|
1743
|
+
({ dashed, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("hr", { ref, className: (0, import_clsx.clsx)(dashed ? "kds-hr-dashed" : "kds-hr", className), ...props })
|
|
1744
|
+
);
|
|
1745
|
+
KdsDivider.displayName = "KdsDivider";
|
|
1746
|
+
|
|
1747
|
+
// src/components/core/KdsSectionNote/KdsSectionNote.tsx
|
|
1748
|
+
var import_react20 = require("react");
|
|
1749
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1750
|
+
var KdsSectionNote = (0, import_react20.forwardRef)(
|
|
1751
|
+
({ icon = "info", children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("p", { ref, className: (0, import_clsx.clsx)("kds-section-note", className), ...props, children: [
|
|
1752
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("i", { className: "material-symbols-outlined", children: icon }),
|
|
1753
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children })
|
|
1754
|
+
] })
|
|
1755
|
+
);
|
|
1756
|
+
KdsSectionNote.displayName = "KdsSectionNote";
|
|
1757
|
+
|
|
1758
|
+
// src/components/core/KdsStatusBlock/KdsStatusBlock.tsx
|
|
1759
|
+
var import_react21 = require("react");
|
|
1760
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1761
|
+
var KdsStatusBlock = (0, import_react21.forwardRef)(
|
|
1762
|
+
({ status, icon, title, description, inline, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { ref, className: (0, import_clsx.clsx)("kds-status-block", inline && "inline", className), "data-status": status, ...props, children: [
|
|
1763
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "kds-status-block-icon", children: icon && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("i", { className: "material-symbols-outlined", children: icon }) }),
|
|
1764
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { children: [
|
|
1765
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h2", { className: "kds-status-block-title", children: title }),
|
|
1766
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "kds-status-block-description", children: description })
|
|
1767
|
+
] })
|
|
1768
|
+
] })
|
|
1769
|
+
);
|
|
1770
|
+
KdsStatusBlock.displayName = "KdsStatusBlock";
|
|
1771
|
+
|
|
1772
|
+
// src/components/core/KdsStepper/KdsStepper.tsx
|
|
1773
|
+
var import_react22 = require("react");
|
|
1774
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1775
|
+
var KdsStepper = (0, import_react22.forwardRef)(
|
|
1776
|
+
({ steps, current, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-stepper", className), "data-steps": steps, "data-current": current, ...props, children: Array.from({ length: steps }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: (0, import_clsx.clsx)("kds-step", i < current && "completed", i === current && "current"), children: [
|
|
1777
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "kds-step-indicator", children: i < current ? "\u2713" : i + 1 }),
|
|
1778
|
+
i < steps - 1 && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "kds-step-line" })
|
|
1779
|
+
] }, i)) })
|
|
1780
|
+
);
|
|
1781
|
+
KdsStepper.displayName = "KdsStepper";
|
|
1782
|
+
|
|
1783
|
+
// src/components/core/KdsCopyRow/KdsCopyRow.tsx
|
|
1784
|
+
var import_react24 = require("react");
|
|
1785
|
+
|
|
1786
|
+
// src/components/core/hooks/useCopyToClipboard.ts
|
|
1787
|
+
var import_react23 = require("react");
|
|
1788
|
+
function useCopyToClipboard(resetMs = 1200) {
|
|
1789
|
+
const [copied, setCopied] = (0, import_react23.useState)(false);
|
|
1790
|
+
const copy = (0, import_react23.useCallback)(
|
|
1791
|
+
async (text) => {
|
|
1792
|
+
try {
|
|
1793
|
+
await navigator.clipboard.writeText(text);
|
|
1794
|
+
setCopied(true);
|
|
1795
|
+
setTimeout(() => setCopied(false), resetMs);
|
|
1796
|
+
} catch {
|
|
3014
1797
|
}
|
|
3015
|
-
|
|
1798
|
+
},
|
|
1799
|
+
[resetMs]
|
|
1800
|
+
);
|
|
1801
|
+
return { copied, copy };
|
|
1802
|
+
}
|
|
1803
|
+
|
|
1804
|
+
// src/components/core/KdsCopyRow/KdsCopyRow.tsx
|
|
1805
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1806
|
+
var KdsCopyRow = (0, import_react24.forwardRef)(
|
|
1807
|
+
({ label, value, className, ...props }, ref) => {
|
|
1808
|
+
const { copied, copy } = useCopyToClipboard();
|
|
1809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { ref, className: (0, import_clsx.clsx)("kds-copy-row", copied && "copied", className), ...props, children: [
|
|
1810
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "kds-copy-row-label", children: label }),
|
|
1811
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "kds-copy-row-value", children: value }),
|
|
1812
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("button", { className: "kds-copy-row-btn", onClick: () => copy(value), "aria-label": `Copiar ${label}`, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("i", { className: "material-symbols-outlined", children: copied ? "check" : "content_copy" }) })
|
|
1813
|
+
] });
|
|
3016
1814
|
}
|
|
3017
1815
|
);
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
1816
|
+
KdsCopyRow.displayName = "KdsCopyRow";
|
|
1817
|
+
|
|
1818
|
+
// src/components/core/KdsCopyableTable/KdsCopyableTable.tsx
|
|
1819
|
+
var import_react25 = require("react");
|
|
1820
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1821
|
+
var KdsCopyableTable = (0, import_react25.forwardRef)(
|
|
1822
|
+
({ rows, className, ...props }, ref) => {
|
|
1823
|
+
const { copied, copy } = useCopyToClipboard();
|
|
1824
|
+
const handleCopyAll = () => {
|
|
1825
|
+
const text = rows.map((r) => `${r.label}: ${r.value}`).join("\n");
|
|
1826
|
+
copy(text);
|
|
1827
|
+
};
|
|
1828
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
1829
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-copyable-table", className), ...props, children: rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "kds-copyable-table-row", children: [
|
|
1830
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "kds-copyable-table-label", children: row.label }),
|
|
1831
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "kds-copyable-table-value", children: row.value })
|
|
1832
|
+
] }, row.label)) }),
|
|
1833
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("button", { className: `kds-btn kds-btn-outlined kds-btn-block kds-copy-all-btn${copied ? " copied" : ""}`, onClick: handleCopyAll, "aria-label": "Copiar todo", children: [
|
|
1834
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "kds-icon", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("i", { className: "material-symbols-outlined", children: copied ? "check" : "content_copy" }) }),
|
|
1835
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: copied ? "Copiado" : "Copiar todos los datos" })
|
|
1836
|
+
] })
|
|
1837
|
+
] });
|
|
3022
1838
|
}
|
|
3023
1839
|
);
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
}, ref) => {
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
"
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
1840
|
+
KdsCopyableTable.displayName = "KdsCopyableTable";
|
|
1841
|
+
|
|
1842
|
+
// src/components/core/KdsExpandPanel/KdsExpandPanel.tsx
|
|
1843
|
+
var import_react26 = require("react");
|
|
1844
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1845
|
+
var KdsExpandPanel = (0, import_react26.forwardRef)(
|
|
1846
|
+
({ label, defaultExpanded = false, children, className, ...props }, ref) => {
|
|
1847
|
+
const [expanded, setExpanded] = (0, import_react26.useState)(defaultExpanded);
|
|
1848
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { ref, className, ...props, children: [
|
|
1849
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1850
|
+
"button",
|
|
1851
|
+
{
|
|
1852
|
+
className: "kds-expand-toggle",
|
|
1853
|
+
onClick: () => setExpanded((v) => !v),
|
|
1854
|
+
"aria-expanded": expanded,
|
|
1855
|
+
children: [
|
|
1856
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: label }),
|
|
1857
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("i", { className: "material-symbols-outlined", children: expanded ? "expand_less" : "expand_more" })
|
|
1858
|
+
]
|
|
1859
|
+
}
|
|
1860
|
+
),
|
|
1861
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: (0, import_clsx.clsx)("kds-expand-panel", expanded && "open"), hidden: !expanded, children })
|
|
1862
|
+
] });
|
|
1863
|
+
}
|
|
1864
|
+
);
|
|
1865
|
+
KdsExpandPanel.displayName = "KdsExpandPanel";
|
|
1866
|
+
|
|
1867
|
+
// src/components/core/KdsCountdown/KdsCountdown.tsx
|
|
1868
|
+
var import_react28 = require("react");
|
|
1869
|
+
|
|
1870
|
+
// src/components/core/hooks/useCountdown.ts
|
|
1871
|
+
var import_react27 = require("react");
|
|
1872
|
+
function calcRemaining(deadline) {
|
|
1873
|
+
const diff = Math.max(0, new Date(deadline).getTime() - Date.now());
|
|
1874
|
+
const totalSeconds = Math.floor(diff / 1e3);
|
|
1875
|
+
return {
|
|
1876
|
+
hours: Math.floor(totalSeconds / 3600),
|
|
1877
|
+
minutes: Math.floor(totalSeconds % 3600 / 60),
|
|
1878
|
+
seconds: totalSeconds % 60,
|
|
1879
|
+
expired: diff === 0,
|
|
1880
|
+
urgent: diff > 0 && diff < 5 * 60 * 1e3
|
|
1881
|
+
};
|
|
1882
|
+
}
|
|
1883
|
+
function useCountdown(deadline) {
|
|
1884
|
+
const [state, setState] = (0, import_react27.useState)(() => calcRemaining(deadline));
|
|
1885
|
+
(0, import_react27.useEffect)(() => {
|
|
1886
|
+
const tick = () => setState(calcRemaining(deadline));
|
|
1887
|
+
const id = setInterval(tick, 1e3);
|
|
1888
|
+
return () => clearInterval(id);
|
|
1889
|
+
}, [deadline]);
|
|
1890
|
+
return state;
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
// src/components/core/KdsCountdown/KdsCountdown.tsx
|
|
1894
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1895
|
+
var KdsCountdown = (0, import_react28.forwardRef)(
|
|
1896
|
+
({ deadline, label, onExpire, className, ...props }, ref) => {
|
|
1897
|
+
const { hours, minutes, seconds, expired, urgent } = useCountdown(deadline);
|
|
1898
|
+
const onExpireRef = (0, import_react28.useRef)(onExpire);
|
|
1899
|
+
onExpireRef.current = onExpire;
|
|
1900
|
+
(0, import_react28.useEffect)(() => {
|
|
1901
|
+
if (expired) {
|
|
1902
|
+
onExpireRef.current?.();
|
|
3042
1903
|
}
|
|
3043
|
-
);
|
|
1904
|
+
}, [expired]);
|
|
1905
|
+
if (expired) {
|
|
1906
|
+
return null;
|
|
1907
|
+
}
|
|
1908
|
+
const pad = (n) => String(n).padStart(2, "0");
|
|
1909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { ref, className: (0, import_clsx.clsx)("kds-countdown", urgent && "urgent", className), ...props, children: [
|
|
1910
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "kds-countdown-label", children: label }),
|
|
1911
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { className: "kds-countdown-value", children: [
|
|
1912
|
+
pad(hours),
|
|
1913
|
+
":",
|
|
1914
|
+
pad(minutes),
|
|
1915
|
+
":",
|
|
1916
|
+
pad(seconds)
|
|
1917
|
+
] })
|
|
1918
|
+
] });
|
|
3044
1919
|
}
|
|
3045
1920
|
);
|
|
3046
|
-
|
|
1921
|
+
KdsCountdown.displayName = "KdsCountdown";
|
|
3047
1922
|
|
|
3048
|
-
// src/
|
|
3049
|
-
var
|
|
3050
|
-
var
|
|
3051
|
-
var
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
var
|
|
3058
|
-
var
|
|
3059
|
-
var
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
1923
|
+
// src/components/core/KdsSegmentedTabs/KdsSegmentedTabs.tsx
|
|
1924
|
+
var import_react29 = require("react");
|
|
1925
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1926
|
+
var KdsSegmentedTabs = (0, import_react29.forwardRef)(
|
|
1927
|
+
(props, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(KdsTabs, { ref, variant: "segmented", ...props })
|
|
1928
|
+
);
|
|
1929
|
+
KdsSegmentedTabs.displayName = "KdsSegmentedTabs";
|
|
1930
|
+
|
|
1931
|
+
// src/components/domain/KdsBankRow/KdsBankRow.tsx
|
|
1932
|
+
var import_react30 = require("react");
|
|
1933
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1934
|
+
var KdsBankRow = (0, import_react30.forwardRef)(
|
|
1935
|
+
({ name, logoUrl, selected, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
1936
|
+
"button",
|
|
1937
|
+
{
|
|
1938
|
+
ref,
|
|
1939
|
+
type: "button",
|
|
1940
|
+
className: (0, import_clsx.clsx)("kds-bank-row", selected && "selected", className),
|
|
1941
|
+
...props,
|
|
1942
|
+
children: [
|
|
1943
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "kds-bank-row-logo", children: logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("img", { src: logoUrl, alt: name }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "initials", children: name.charAt(0) }) }),
|
|
1944
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "kds-bank-row-name", children: name }),
|
|
1945
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("i", { className: "material-symbols-outlined", children: selected ? "check_circle" : "chevron_right" })
|
|
1946
|
+
]
|
|
1947
|
+
}
|
|
1948
|
+
)
|
|
1949
|
+
);
|
|
1950
|
+
KdsBankRow.displayName = "KdsBankRow";
|
|
1951
|
+
|
|
1952
|
+
// src/components/domain/KdsBankList/KdsBankList.tsx
|
|
1953
|
+
var import_react31 = require("react");
|
|
1954
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1955
|
+
var KdsBankList = (0, import_react31.forwardRef)(
|
|
1956
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-bank-list", className), role: "list", ...props, children })
|
|
1957
|
+
);
|
|
1958
|
+
KdsBankList.displayName = "KdsBankList";
|
|
1959
|
+
|
|
1960
|
+
// src/components/domain/KdsBankModal/KdsBankModal.tsx
|
|
1961
|
+
var import_react32 = require("react");
|
|
1962
|
+
var Dialog2 = __toESM(require("@radix-ui/react-dialog"));
|
|
1963
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1964
|
+
var KdsBankModal = (0, import_react32.forwardRef)(
|
|
1965
|
+
({ open, onClose, title = "Selecciona tu banco", searchPlaceholder = "Buscar banco...", onSearch, children, className, container }, ref) => {
|
|
1966
|
+
const [query, setQuery] = (0, import_react32.useState)("");
|
|
1967
|
+
const handleSearch = (value) => {
|
|
1968
|
+
setQuery(value);
|
|
1969
|
+
onSearch?.(value);
|
|
1970
|
+
};
|
|
1971
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Dialog2.Root, { open, onOpenChange: (o) => {
|
|
1972
|
+
if (!o) onClose();
|
|
1973
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Dialog2.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Dialog2.Overlay, { className: "kds-bank-modal-scrim open", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Dialog2.Content, { ref, className: (0, import_clsx.clsx)("kds-bank-modal", className), children: [
|
|
1974
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "kds-bank-modal-header", children: [
|
|
1975
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Dialog2.Title, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("h3", { children: title }) }),
|
|
1976
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Dialog2.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("button", { className: "kds-bank-modal-close", "aria-label": "Cerrar", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("i", { className: "material-symbols-outlined", children: "close" }) }) })
|
|
1977
|
+
] }),
|
|
1978
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "kds-bank-modal-search", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1979
|
+
"input",
|
|
1980
|
+
{
|
|
1981
|
+
type: "text",
|
|
1982
|
+
placeholder: searchPlaceholder,
|
|
1983
|
+
value: query,
|
|
1984
|
+
onChange: (e) => handleSearch(e.target.value)
|
|
1985
|
+
}
|
|
1986
|
+
) }),
|
|
1987
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "kds-bank-modal-body", children })
|
|
1988
|
+
] }) }) }) });
|
|
1989
|
+
}
|
|
1990
|
+
);
|
|
1991
|
+
KdsBankModal.displayName = "KdsBankModal";
|
|
1992
|
+
|
|
1993
|
+
// src/components/domain/KdsQrRow/KdsQrRow.tsx
|
|
1994
|
+
var import_react33 = require("react");
|
|
1995
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1996
|
+
var KdsQrRow = (0, import_react33.forwardRef)(
|
|
1997
|
+
({ name, description, badge, icon = "qr_code_2", className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("button", { ref, type: "button", className: (0, import_clsx.clsx)("kds-qr-row", className), ...props, children: [
|
|
1998
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "kds-qr-avatar", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("i", { className: "material-symbols-outlined", children: icon }) }),
|
|
1999
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("span", { className: "kds-qr-text", children: [
|
|
2000
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "title", children: name }),
|
|
2001
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "sub", children: description })
|
|
2002
|
+
] }),
|
|
2003
|
+
badge && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "kds-qr-badge", children: badge }),
|
|
2004
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("i", { className: "material-symbols-outlined", children: "chevron_right" })
|
|
2005
|
+
] })
|
|
2006
|
+
);
|
|
2007
|
+
KdsQrRow.displayName = "KdsQrRow";
|
|
2008
|
+
|
|
2009
|
+
// src/components/domain/KdsCardSelector/KdsCardSelector.tsx
|
|
2010
|
+
var import_react34 = require("react");
|
|
2011
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2012
|
+
var KdsCardSelector = (0, import_react34.forwardRef)(
|
|
2013
|
+
({ icon, title, description, selected, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2014
|
+
"button",
|
|
2015
|
+
{
|
|
2016
|
+
ref,
|
|
2017
|
+
type: "button",
|
|
2018
|
+
className: (0, import_clsx.clsx)("kds-card-selector", selected && "selected", className),
|
|
2019
|
+
...props,
|
|
2020
|
+
children: [
|
|
2021
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "kds-card-selector-icon", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("i", { className: "material-symbols-outlined", children: icon }) }),
|
|
2022
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "kds-card-selector-title", children: title }),
|
|
2023
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "kds-card-selector-description", children: description })
|
|
2024
|
+
]
|
|
2025
|
+
}
|
|
2026
|
+
)
|
|
2027
|
+
);
|
|
2028
|
+
KdsCardSelector.displayName = "KdsCardSelector";
|
|
2029
|
+
|
|
2030
|
+
// src/components/domain/KdsCardPlan/KdsCardPlan.tsx
|
|
2031
|
+
var import_react35 = require("react");
|
|
2032
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2033
|
+
var KdsCardPlan = (0, import_react35.forwardRef)(
|
|
2034
|
+
({ title, price, period, features, recommended, badgeText, action, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2035
|
+
"div",
|
|
2036
|
+
{
|
|
2037
|
+
ref,
|
|
2038
|
+
className: (0, import_clsx.clsx)("kds-card-plan", recommended && "recommended", className),
|
|
2039
|
+
...props,
|
|
2040
|
+
children: [
|
|
2041
|
+
badgeText && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "kds-card-plan-badge", children: badgeText }),
|
|
2042
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "kds-card-plan-header", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("h3", { children: title }) }),
|
|
2043
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "kds-card-plan-price", children: [
|
|
2044
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: price }),
|
|
2045
|
+
period && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { children: [
|
|
2046
|
+
"/",
|
|
2047
|
+
period
|
|
2048
|
+
] })
|
|
2049
|
+
] }),
|
|
2050
|
+
features && features.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("ul", { className: "kds-card-plan-features", children: features.map((f, i) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("li", { children: f }, i)) }),
|
|
2051
|
+
action
|
|
2052
|
+
]
|
|
2053
|
+
}
|
|
2054
|
+
)
|
|
2055
|
+
);
|
|
2056
|
+
KdsCardPlan.displayName = "KdsCardPlan";
|
|
2057
|
+
|
|
2058
|
+
// src/components/domain/KdsInvoiceSticky/KdsInvoiceSticky.tsx
|
|
2059
|
+
var import_react36 = require("react");
|
|
2060
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2061
|
+
var KdsInvoiceSticky = (0, import_react36.forwardRef)(
|
|
2062
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-card-elevated", "kds-invoice-sticky", className), ...props, children })
|
|
2063
|
+
);
|
|
2064
|
+
KdsInvoiceSticky.displayName = "KdsInvoiceSticky";
|
|
2065
|
+
|
|
2066
|
+
// src/components/domain/KdsBottomSheet/KdsBottomSheet.tsx
|
|
2067
|
+
var import_react37 = require("react");
|
|
2068
|
+
var Dialog3 = __toESM(require("@radix-ui/react-dialog"));
|
|
2069
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2070
|
+
var KdsBottomSheet = (0, import_react37.forwardRef)(
|
|
2071
|
+
({ open, onClose, title, children, actions, className, container }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Dialog3.Root, { open, onOpenChange: (o) => {
|
|
2072
|
+
if (!o) onClose();
|
|
2073
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Dialog3.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Dialog3.Overlay, { className: "kds-bottom-sheet-scrim open", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Dialog3.Content, { ref, className: (0, import_clsx.clsx)("kds-bottom-sheet", className), children: [
|
|
2074
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "kds-bottom-sheet-grabber" }),
|
|
2075
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Dialog3.Title, { className: "kds-bottom-sheet-title", children: title }),
|
|
2076
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "kds-bottom-sheet-body", children }),
|
|
2077
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "kds-bottom-sheet-actions", children: actions })
|
|
2078
|
+
] }) }) }) })
|
|
2079
|
+
);
|
|
2080
|
+
KdsBottomSheet.displayName = "KdsBottomSheet";
|
|
2081
|
+
|
|
2082
|
+
// src/components/domain/KdsSecureFooter/KdsSecureFooter.tsx
|
|
2083
|
+
var import_react38 = require("react");
|
|
2084
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2085
|
+
var KdsSecureFooter = (0, import_react38.forwardRef)(
|
|
2086
|
+
({ variant = "default", children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("footer", { ref, className: (0, import_clsx.clsx)("kds-secure-footer", variant === "inside" && "inside", className), ...props, children: [
|
|
2087
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("i", { className: "material-symbols-outlined", children: "lock" }),
|
|
2088
|
+
children || /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: "Pago seguro con Khipu" })
|
|
2089
|
+
] })
|
|
2090
|
+
);
|
|
2091
|
+
KdsSecureFooter.displayName = "KdsSecureFooter";
|
|
2092
|
+
|
|
2093
|
+
// src/components/domain/KdsRecapList/KdsRecapList.tsx
|
|
2094
|
+
var import_react39 = require("react");
|
|
2095
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2096
|
+
var KdsRecapList = (0, import_react39.forwardRef)(
|
|
2097
|
+
({ items, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("ul", { ref, className: (0, import_clsx.clsx)("kds-recap-list", className), ...props, children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("li", { children: [
|
|
2098
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "k", children: item.label }),
|
|
2099
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: (0, import_clsx.clsx)("v", !item.value && item.placeholder && "placeholder"), children: item.value || item.placeholder || "-" })
|
|
2100
|
+
] }, i)) })
|
|
2101
|
+
);
|
|
2102
|
+
KdsRecapList.displayName = "KdsRecapList";
|
|
3077
2103
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3078
2104
|
0 && (module.exports = {
|
|
3079
|
-
Box,
|
|
3080
|
-
CheckCircleIcon,
|
|
3081
|
-
CheckIcon,
|
|
3082
|
-
ChevronLeftIcon,
|
|
3083
|
-
ChevronRightIcon,
|
|
3084
|
-
CloseIcon,
|
|
3085
|
-
Container,
|
|
3086
|
-
ContentCopyIcon,
|
|
3087
|
-
Divider,
|
|
3088
|
-
ErrorIcon,
|
|
3089
|
-
ExpandLessIcon,
|
|
3090
|
-
ExpandMoreIcon,
|
|
3091
|
-
Grid,
|
|
3092
|
-
IconButton,
|
|
3093
|
-
InfoIcon,
|
|
3094
|
-
InputAdornment,
|
|
3095
2105
|
KdsAccordion,
|
|
3096
2106
|
KdsAccordionDetails,
|
|
3097
2107
|
KdsAccordionSummary,
|
|
3098
2108
|
KdsAlert,
|
|
2109
|
+
KdsBankList,
|
|
2110
|
+
KdsBankModal,
|
|
2111
|
+
KdsBankRow,
|
|
2112
|
+
KdsBottomSheet,
|
|
3099
2113
|
KdsButton,
|
|
3100
2114
|
KdsCard,
|
|
3101
|
-
|
|
3102
|
-
|
|
2115
|
+
KdsCardBody,
|
|
2116
|
+
KdsCardFooter,
|
|
3103
2117
|
KdsCardHeader,
|
|
2118
|
+
KdsCardPlan,
|
|
2119
|
+
KdsCardSelector,
|
|
3104
2120
|
KdsCheckbox,
|
|
3105
2121
|
KdsChip,
|
|
2122
|
+
KdsCopyRow,
|
|
2123
|
+
KdsCopyableTable,
|
|
2124
|
+
KdsCountdown,
|
|
2125
|
+
KdsDivider,
|
|
2126
|
+
KdsExpandPanel,
|
|
2127
|
+
KdsInvoiceSticky,
|
|
3106
2128
|
KdsLinearProgress,
|
|
3107
2129
|
KdsLogoHeader,
|
|
3108
2130
|
KdsLogoHeaderCloseButton,
|
|
3109
2131
|
KdsLogoHeaderCode,
|
|
3110
2132
|
KdsLogoHeaderLogo,
|
|
3111
2133
|
KdsLogoHeaderSeparator,
|
|
3112
|
-
KdsMenuItem,
|
|
3113
2134
|
KdsModal,
|
|
3114
|
-
|
|
2135
|
+
KdsQrRow,
|
|
3115
2136
|
KdsRadioGroup,
|
|
2137
|
+
KdsRecapList,
|
|
2138
|
+
KdsSectionNote,
|
|
2139
|
+
KdsSecureFooter,
|
|
2140
|
+
KdsSegmentedTabs,
|
|
3116
2141
|
KdsSelect,
|
|
3117
2142
|
KdsSnackbar,
|
|
3118
2143
|
KdsSpinner,
|
|
2144
|
+
KdsStatusBlock,
|
|
2145
|
+
KdsStepper,
|
|
3119
2146
|
KdsTab,
|
|
3120
2147
|
KdsTabPanel,
|
|
3121
2148
|
KdsTabs,
|
|
3122
2149
|
KdsTextField,
|
|
2150
|
+
KdsThemeProvider,
|
|
3123
2151
|
KdsTooltip,
|
|
3124
2152
|
KdsTypography,
|
|
3125
|
-
KeyboardArrowDownIcon,
|
|
3126
|
-
KeyboardArrowUpIcon,
|
|
3127
|
-
KhipuThemeProvider,
|
|
3128
|
-
Link,
|
|
3129
|
-
LockIcon,
|
|
3130
|
-
LockOutlinedIcon,
|
|
3131
|
-
MailOutlineIcon,
|
|
3132
|
-
PersonIcon,
|
|
3133
|
-
SearchIcon,
|
|
3134
|
-
Stack,
|
|
3135
|
-
VisibilityIcon,
|
|
3136
|
-
VisibilityOffIcon,
|
|
3137
|
-
WarningIcon,
|
|
3138
2153
|
borderRadius,
|
|
3139
2154
|
breakpoints,
|
|
2155
|
+
clsx,
|
|
3140
2156
|
colors,
|
|
3141
2157
|
colorsByMode,
|
|
3142
2158
|
fontFamilies,
|
|
3143
2159
|
fontSizes,
|
|
3144
2160
|
fontWeights,
|
|
3145
|
-
|
|
2161
|
+
getContrastColor,
|
|
3146
2162
|
letterSpacings,
|
|
2163
|
+
lighten,
|
|
3147
2164
|
lineHeights,
|
|
3148
2165
|
semanticSpacing,
|
|
3149
2166
|
shadows,
|
|
@@ -3152,5 +2169,9 @@ var import_KeyboardArrowDown = __toESM(require("@mui/icons-material/KeyboardArro
|
|
|
3152
2169
|
tokensByMode,
|
|
3153
2170
|
transitions,
|
|
3154
2171
|
typography,
|
|
2172
|
+
useAutoHide,
|
|
2173
|
+
useCopyToClipboard,
|
|
2174
|
+
useCountdown,
|
|
2175
|
+
useTabsKeyboard,
|
|
3155
2176
|
zIndex
|
|
3156
2177
|
});
|