@clickpalm/react 1.3.4 → 1.3.6
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/index.d.ts +3 -0
- package/dist/index.js +37 -6
- package/dist/index.mjs +37 -6
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3091,6 +3091,7 @@ interface TextInputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
|
3091
3091
|
errorMessage?: string;
|
|
3092
3092
|
maxLength?: number;
|
|
3093
3093
|
showCounter?: boolean;
|
|
3094
|
+
redBorder?: boolean;
|
|
3094
3095
|
}
|
|
3095
3096
|
declare const Input: react__default.ForwardRefExoticComponent<TextInputProps & react__default.RefAttributes<HTMLInputElement>>;
|
|
3096
3097
|
|
|
@@ -3815,6 +3816,7 @@ declare const Paragraph: {
|
|
|
3815
3816
|
|
|
3816
3817
|
declare const StyledHeading: _stitches_react_types_styled_component.StyledComponent<"h2", {
|
|
3817
3818
|
size?: "sm" | "md" | "lg" | "2xl" | "4xl" | "5xl" | "6xl" | "3xl" | undefined;
|
|
3819
|
+
bold?: boolean | "true" | "false" | undefined;
|
|
3818
3820
|
}, {
|
|
3819
3821
|
sm: "(min-width: 375px)";
|
|
3820
3822
|
md: "(min-width: 768px)";
|
|
@@ -4040,6 +4042,7 @@ interface HeadingProps extends ComponentPropsWithoutRef<'h2'>, VariantProps<type
|
|
|
4040
4042
|
css?: CustomCSS$1;
|
|
4041
4043
|
children?: React.ReactNode;
|
|
4042
4044
|
size?: 'sm' | 'md' | 'lg' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl';
|
|
4045
|
+
bold?: boolean;
|
|
4043
4046
|
}
|
|
4044
4047
|
declare const Heading: react.ForwardRefExoticComponent<HeadingProps & react.RefAttributes<HTMLHeadingElement>>;
|
|
4045
4048
|
|
package/dist/index.js
CHANGED
|
@@ -1247,6 +1247,15 @@ var TextInputContainer = styled("div", {
|
|
|
1247
1247
|
true: {
|
|
1248
1248
|
marginBottom: "0px"
|
|
1249
1249
|
}
|
|
1250
|
+
},
|
|
1251
|
+
redBorder: {
|
|
1252
|
+
true: {
|
|
1253
|
+
border: "1px solid $danger_dark",
|
|
1254
|
+
marginBottom: "0px",
|
|
1255
|
+
"&:has(input:focus), &:hover": {
|
|
1256
|
+
border: "1px solid $danger_dark"
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1250
1259
|
}
|
|
1251
1260
|
}
|
|
1252
1261
|
});
|
|
@@ -1323,7 +1332,7 @@ var CharCounter = styled(Span2, {
|
|
|
1323
1332
|
// src/components/Input/index.tsx
|
|
1324
1333
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1325
1334
|
var Input2 = (0, import_react5.forwardRef)(
|
|
1326
|
-
({ prefix, suffix, label, maxLength, showCounter = false, errorMessage, noMargin = false, ...props }, forwardedRef) => {
|
|
1335
|
+
({ prefix, suffix, label, maxLength, showCounter = false, errorMessage, noMargin = false, redBorder, ...props }, forwardedRef) => {
|
|
1327
1336
|
const getDisplayValue = (value) => {
|
|
1328
1337
|
const stringValue = String(value || "");
|
|
1329
1338
|
if (prefix && stringValue.startsWith(prefix)) {
|
|
@@ -1359,6 +1368,7 @@ var Input2 = (0, import_react5.forwardRef)(
|
|
|
1359
1368
|
hasError: !!errorMessage,
|
|
1360
1369
|
hasCounter: showCounter,
|
|
1361
1370
|
onClick: handleContainerClick,
|
|
1371
|
+
redBorder,
|
|
1362
1372
|
children: [
|
|
1363
1373
|
!!prefix && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Prefix, { children: prefix }),
|
|
1364
1374
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
@@ -1738,6 +1748,7 @@ var Datepicker = (0, import_react7.forwardRef)(({ label, placeholder, value, onC
|
|
|
1738
1748
|
setMonth(selected);
|
|
1739
1749
|
}
|
|
1740
1750
|
}, [open, selected]);
|
|
1751
|
+
const isOpenWithError = open && errorMessage ? true : false;
|
|
1741
1752
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { children: [
|
|
1742
1753
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1743
1754
|
Input2,
|
|
@@ -1749,8 +1760,9 @@ var Datepicker = (0, import_react7.forwardRef)(({ label, placeholder, value, onC
|
|
|
1749
1760
|
value: value || "",
|
|
1750
1761
|
readOnly: true,
|
|
1751
1762
|
suffix: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon, { name: "Calendar", size: 16 }),
|
|
1752
|
-
|
|
1753
|
-
|
|
1763
|
+
noMargin: true,
|
|
1764
|
+
errorMessage: open ? "" : errorMessage,
|
|
1765
|
+
redBorder: isOpenWithError
|
|
1754
1766
|
}
|
|
1755
1767
|
),
|
|
1756
1768
|
open && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
@@ -3058,6 +3070,7 @@ var StyledHeading = styled("h2", {
|
|
|
3058
3070
|
lineHeight: "$shorter",
|
|
3059
3071
|
margin: "1px",
|
|
3060
3072
|
color: "$black",
|
|
3073
|
+
fontWeight: "$regular",
|
|
3061
3074
|
variants: {
|
|
3062
3075
|
size: {
|
|
3063
3076
|
sm: { fontSize: "$xl" },
|
|
@@ -3068,15 +3081,25 @@ var StyledHeading = styled("h2", {
|
|
|
3068
3081
|
"4xl": { fontSize: "$7xl" },
|
|
3069
3082
|
"5xl": { fontSize: "$8xl" },
|
|
3070
3083
|
"6xl": { fontSize: "$9xl" }
|
|
3084
|
+
},
|
|
3085
|
+
bold: {
|
|
3086
|
+
true: {
|
|
3087
|
+
fontWeight: "$bold"
|
|
3088
|
+
},
|
|
3089
|
+
false: {
|
|
3090
|
+
fontWeight: "$regular"
|
|
3091
|
+
}
|
|
3071
3092
|
}
|
|
3072
3093
|
},
|
|
3073
3094
|
defaultVariants: {
|
|
3074
3095
|
size: "md"
|
|
3075
3096
|
}
|
|
3076
3097
|
});
|
|
3077
|
-
var Heading = (0, import_react17.forwardRef)(
|
|
3078
|
-
|
|
3079
|
-
});
|
|
3098
|
+
var Heading = (0, import_react17.forwardRef)(
|
|
3099
|
+
function Heading2({ children, bold = false, ...props }, ref) {
|
|
3100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(StyledHeading, { ref, bold, ...props, children });
|
|
3101
|
+
}
|
|
3102
|
+
);
|
|
3080
3103
|
Heading.displayName = "Heading";
|
|
3081
3104
|
|
|
3082
3105
|
// src/components/Select/index.tsx
|
|
@@ -3263,6 +3286,9 @@ var import_react19 = require("react");
|
|
|
3263
3286
|
// src/components/LabelledValue/styles.ts
|
|
3264
3287
|
var Container = styled("div", {
|
|
3265
3288
|
display: "flex",
|
|
3289
|
+
fontWeight: "$regular",
|
|
3290
|
+
fontSize: "$md",
|
|
3291
|
+
fontFamily: "$default",
|
|
3266
3292
|
variants: {
|
|
3267
3293
|
position: {
|
|
3268
3294
|
vertical: {
|
|
@@ -3280,6 +3306,9 @@ var Container = styled("div", {
|
|
|
3280
3306
|
var ItemWrapper = styled("div", {
|
|
3281
3307
|
display: "flex",
|
|
3282
3308
|
alignItems: "center",
|
|
3309
|
+
fontWeight: "$regular",
|
|
3310
|
+
fontSize: "$md",
|
|
3311
|
+
fontFamily: "$default",
|
|
3283
3312
|
variants: {
|
|
3284
3313
|
position: {
|
|
3285
3314
|
vertical: {
|
|
@@ -3305,12 +3334,14 @@ var ItemWrapper = styled("div", {
|
|
|
3305
3334
|
var Label4 = styled("div", {
|
|
3306
3335
|
fontWeight: "$regular",
|
|
3307
3336
|
fontSize: "$md",
|
|
3337
|
+
fontFamily: "$default",
|
|
3308
3338
|
color: "$black",
|
|
3309
3339
|
whiteSpace: "nowrap"
|
|
3310
3340
|
});
|
|
3311
3341
|
var Value2 = styled("div", {
|
|
3312
3342
|
fontWeight: "$bold",
|
|
3313
3343
|
fontSize: "$md",
|
|
3344
|
+
fontFamily: "$default",
|
|
3314
3345
|
color: "$black",
|
|
3315
3346
|
textAlign: "right",
|
|
3316
3347
|
wordBreak: "break-word",
|
package/dist/index.mjs
CHANGED
|
@@ -1177,6 +1177,15 @@ var TextInputContainer = styled("div", {
|
|
|
1177
1177
|
true: {
|
|
1178
1178
|
marginBottom: "0px"
|
|
1179
1179
|
}
|
|
1180
|
+
},
|
|
1181
|
+
redBorder: {
|
|
1182
|
+
true: {
|
|
1183
|
+
border: "1px solid $danger_dark",
|
|
1184
|
+
marginBottom: "0px",
|
|
1185
|
+
"&:has(input:focus), &:hover": {
|
|
1186
|
+
border: "1px solid $danger_dark"
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1180
1189
|
}
|
|
1181
1190
|
}
|
|
1182
1191
|
});
|
|
@@ -1253,7 +1262,7 @@ var CharCounter = styled(Span2, {
|
|
|
1253
1262
|
// src/components/Input/index.tsx
|
|
1254
1263
|
import { jsx as jsx19, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1255
1264
|
var Input2 = forwardRef3(
|
|
1256
|
-
({ prefix, suffix, label, maxLength, showCounter = false, errorMessage, noMargin = false, ...props }, forwardedRef) => {
|
|
1265
|
+
({ prefix, suffix, label, maxLength, showCounter = false, errorMessage, noMargin = false, redBorder, ...props }, forwardedRef) => {
|
|
1257
1266
|
const getDisplayValue = (value) => {
|
|
1258
1267
|
const stringValue = String(value || "");
|
|
1259
1268
|
if (prefix && stringValue.startsWith(prefix)) {
|
|
@@ -1289,6 +1298,7 @@ var Input2 = forwardRef3(
|
|
|
1289
1298
|
hasError: !!errorMessage,
|
|
1290
1299
|
hasCounter: showCounter,
|
|
1291
1300
|
onClick: handleContainerClick,
|
|
1301
|
+
redBorder,
|
|
1292
1302
|
children: [
|
|
1293
1303
|
!!prefix && /* @__PURE__ */ jsx19(Prefix, { children: prefix }),
|
|
1294
1304
|
/* @__PURE__ */ jsx19(
|
|
@@ -1668,6 +1678,7 @@ var Datepicker = forwardRef4(({ label, placeholder, value, onChange, errorMessag
|
|
|
1668
1678
|
setMonth(selected);
|
|
1669
1679
|
}
|
|
1670
1680
|
}, [open, selected]);
|
|
1681
|
+
const isOpenWithError = open && errorMessage ? true : false;
|
|
1671
1682
|
return /* @__PURE__ */ jsxs6("div", { children: [
|
|
1672
1683
|
/* @__PURE__ */ jsx22(
|
|
1673
1684
|
Input2,
|
|
@@ -1679,8 +1690,9 @@ var Datepicker = forwardRef4(({ label, placeholder, value, onChange, errorMessag
|
|
|
1679
1690
|
value: value || "",
|
|
1680
1691
|
readOnly: true,
|
|
1681
1692
|
suffix: /* @__PURE__ */ jsx22(Icon, { name: "Calendar", size: 16 }),
|
|
1682
|
-
|
|
1683
|
-
|
|
1693
|
+
noMargin: true,
|
|
1694
|
+
errorMessage: open ? "" : errorMessage,
|
|
1695
|
+
redBorder: isOpenWithError
|
|
1684
1696
|
}
|
|
1685
1697
|
),
|
|
1686
1698
|
open && /* @__PURE__ */ jsx22(
|
|
@@ -2988,6 +3000,7 @@ var StyledHeading = styled("h2", {
|
|
|
2988
3000
|
lineHeight: "$shorter",
|
|
2989
3001
|
margin: "1px",
|
|
2990
3002
|
color: "$black",
|
|
3003
|
+
fontWeight: "$regular",
|
|
2991
3004
|
variants: {
|
|
2992
3005
|
size: {
|
|
2993
3006
|
sm: { fontSize: "$xl" },
|
|
@@ -2998,15 +3011,25 @@ var StyledHeading = styled("h2", {
|
|
|
2998
3011
|
"4xl": { fontSize: "$7xl" },
|
|
2999
3012
|
"5xl": { fontSize: "$8xl" },
|
|
3000
3013
|
"6xl": { fontSize: "$9xl" }
|
|
3014
|
+
},
|
|
3015
|
+
bold: {
|
|
3016
|
+
true: {
|
|
3017
|
+
fontWeight: "$bold"
|
|
3018
|
+
},
|
|
3019
|
+
false: {
|
|
3020
|
+
fontWeight: "$regular"
|
|
3021
|
+
}
|
|
3001
3022
|
}
|
|
3002
3023
|
},
|
|
3003
3024
|
defaultVariants: {
|
|
3004
3025
|
size: "md"
|
|
3005
3026
|
}
|
|
3006
3027
|
});
|
|
3007
|
-
var Heading = forwardRef10(
|
|
3008
|
-
|
|
3009
|
-
});
|
|
3028
|
+
var Heading = forwardRef10(
|
|
3029
|
+
function Heading2({ children, bold = false, ...props }, ref) {
|
|
3030
|
+
return /* @__PURE__ */ jsx37(StyledHeading, { ref, bold, ...props, children });
|
|
3031
|
+
}
|
|
3032
|
+
);
|
|
3010
3033
|
Heading.displayName = "Heading";
|
|
3011
3034
|
|
|
3012
3035
|
// src/components/Select/index.tsx
|
|
@@ -3197,6 +3220,9 @@ import {
|
|
|
3197
3220
|
// src/components/LabelledValue/styles.ts
|
|
3198
3221
|
var Container = styled("div", {
|
|
3199
3222
|
display: "flex",
|
|
3223
|
+
fontWeight: "$regular",
|
|
3224
|
+
fontSize: "$md",
|
|
3225
|
+
fontFamily: "$default",
|
|
3200
3226
|
variants: {
|
|
3201
3227
|
position: {
|
|
3202
3228
|
vertical: {
|
|
@@ -3214,6 +3240,9 @@ var Container = styled("div", {
|
|
|
3214
3240
|
var ItemWrapper = styled("div", {
|
|
3215
3241
|
display: "flex",
|
|
3216
3242
|
alignItems: "center",
|
|
3243
|
+
fontWeight: "$regular",
|
|
3244
|
+
fontSize: "$md",
|
|
3245
|
+
fontFamily: "$default",
|
|
3217
3246
|
variants: {
|
|
3218
3247
|
position: {
|
|
3219
3248
|
vertical: {
|
|
@@ -3239,12 +3268,14 @@ var ItemWrapper = styled("div", {
|
|
|
3239
3268
|
var Label4 = styled("div", {
|
|
3240
3269
|
fontWeight: "$regular",
|
|
3241
3270
|
fontSize: "$md",
|
|
3271
|
+
fontFamily: "$default",
|
|
3242
3272
|
color: "$black",
|
|
3243
3273
|
whiteSpace: "nowrap"
|
|
3244
3274
|
});
|
|
3245
3275
|
var Value2 = styled("div", {
|
|
3246
3276
|
fontWeight: "$bold",
|
|
3247
3277
|
fontSize: "$md",
|
|
3278
|
+
fontFamily: "$default",
|
|
3248
3279
|
color: "$black",
|
|
3249
3280
|
textAlign: "right",
|
|
3250
3281
|
wordBreak: "break-word",
|
package/package.json
CHANGED