@trackunit/react-form-components 1.3.67 → 1.3.71
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/index.cjs.js
CHANGED
|
@@ -204,7 +204,7 @@ const cvaInputBase = cssClassVarianceUtilities.cvaMerge([
|
|
|
204
204
|
]);
|
|
205
205
|
const cvaInputBaseDisabled = cssClassVarianceUtilities.cvaMerge(["bg-slate-100", "hover:bg-slate-100", "hover:border-slate-300"]);
|
|
206
206
|
const cvaInputBaseInvalid = cssClassVarianceUtilities.cvaMerge(["border-danger-600"]);
|
|
207
|
-
const cvaInput = cssClassVarianceUtilities.cvaMerge([
|
|
207
|
+
const cvaInput$1 = cssClassVarianceUtilities.cvaMerge([
|
|
208
208
|
"overflow-hidden",
|
|
209
209
|
"grid",
|
|
210
210
|
// ! The layout of the grid is critical to the functioning of the cvaInputItemPlacementManager 👇
|
|
@@ -449,7 +449,7 @@ const BaseInput = ({ className, isInvalid, dataTestId, prefix, suffix, addonBefo
|
|
|
449
449
|
// Keep a reference to the input element
|
|
450
450
|
const innerRef = React.useRef(null);
|
|
451
451
|
React.useImperativeHandle(ref, () => innerRef.current, []);
|
|
452
|
-
return (jsxRuntime.jsxs("div", { className: cvaInput({
|
|
452
|
+
return (jsxRuntime.jsxs("div", { className: cvaInput$1({
|
|
453
453
|
disabled: renderAsDisabled,
|
|
454
454
|
invalid: isInvalid,
|
|
455
455
|
isWarning,
|
|
@@ -845,7 +845,7 @@ const ColorField = React.forwardRef(({ label, id, tip, helpText, errorMessage, h
|
|
|
845
845
|
setRenderAsInvalid(!!errorType);
|
|
846
846
|
onBlur?.(event);
|
|
847
847
|
}, [errorType, onBlur]);
|
|
848
|
-
return (jsxRuntime.jsx(FormGroup, { dataTestId: dataTestId ? `${dataTestId}-FormGroup` : undefined, helpAddon: helpAddon, helpText: (renderAsInvalid && error) || helpText, htmlFor: htmlForId, isInvalid: renderAsInvalid, label: label, required: rest.required ? !(renderAsDisabled || renderAsReadonly) : false, tip: tip, children: jsxRuntime.jsxs("div", { className: cvaInput({
|
|
848
|
+
return (jsxRuntime.jsx(FormGroup, { dataTestId: dataTestId ? `${dataTestId}-FormGroup` : undefined, helpAddon: helpAddon, helpText: (renderAsInvalid && error) || helpText, htmlFor: htmlForId, isInvalid: renderAsInvalid, label: label, required: rest.required ? !(renderAsDisabled || renderAsReadonly) : false, tip: tip, children: jsxRuntime.jsxs("div", { className: cvaInput$1({
|
|
849
849
|
size: fieldSize,
|
|
850
850
|
disabled: renderAsDisabled,
|
|
851
851
|
invalid: renderAsInvalid,
|
|
@@ -1206,39 +1206,72 @@ const NumberField = ({ label, id, tip, helpText, errorMessage, helpAddon, isInva
|
|
|
1206
1206
|
NumberField.displayName = "NumberField";
|
|
1207
1207
|
|
|
1208
1208
|
const cvaOptionCardLabel = cssClassVarianceUtilities.cvaMerge([
|
|
1209
|
-
|
|
1210
|
-
"
|
|
1211
|
-
"
|
|
1212
|
-
"
|
|
1209
|
+
"group",
|
|
1210
|
+
"transition",
|
|
1211
|
+
"bg-white",
|
|
1212
|
+
"outline",
|
|
1213
|
+
"outline-2",
|
|
1214
|
+
"outline-slate-300",
|
|
1215
|
+
"hover:bg-slate-100",
|
|
1216
|
+
"focus:bg-slate-200",
|
|
1217
|
+
"active:bg-slate-200",
|
|
1218
|
+
"disabled:bg-slate-200",
|
|
1219
|
+
"peer-checked:bg-primary-50",
|
|
1220
|
+
"peer-checked:outline-primary-600",
|
|
1221
|
+
"peer-checked:outline-2",
|
|
1213
1222
|
"flex",
|
|
1214
|
-
"flex-col",
|
|
1215
1223
|
"gap-2",
|
|
1216
1224
|
"justify-center",
|
|
1217
1225
|
"items-center",
|
|
1218
|
-
"
|
|
1219
|
-
"
|
|
1220
|
-
"peer-checked:bg-primary-50",
|
|
1221
|
-
"peer-checked:border-primary-600",
|
|
1222
|
-
"peer-checked:border-2",
|
|
1226
|
+
"text-center",
|
|
1227
|
+
"rounded-md",
|
|
1223
1228
|
], {
|
|
1224
1229
|
variants: {
|
|
1225
1230
|
disabled: {
|
|
1226
|
-
true: [
|
|
1231
|
+
true: ["cursor-not-allowed"],
|
|
1227
1232
|
false: ["cursor-pointer"],
|
|
1228
1233
|
},
|
|
1234
|
+
layout: {
|
|
1235
|
+
default: [
|
|
1236
|
+
"flex-col",
|
|
1237
|
+
"p-responsive-space",
|
|
1238
|
+
"w-full",
|
|
1239
|
+
"aspect-square",
|
|
1240
|
+
],
|
|
1241
|
+
compact: [
|
|
1242
|
+
"px-3",
|
|
1243
|
+
"py-1.5",
|
|
1244
|
+
"h-8",
|
|
1245
|
+
"min-h-[calc(var(--line-height-sm)+var(--spacing-3))]",
|
|
1246
|
+
"flex-row",
|
|
1247
|
+
"w-fit",
|
|
1248
|
+
],
|
|
1249
|
+
},
|
|
1229
1250
|
},
|
|
1230
1251
|
});
|
|
1231
1252
|
const cvaOptionCardContent = cssClassVarianceUtilities.cvaMerge(["flex", "flex-col", "items-center"]);
|
|
1232
1253
|
const cvaOptionCardContainer = cssClassVarianceUtilities.cvaMerge(["contents"]);
|
|
1254
|
+
const cvaCompactOptionCardText = cssClassVarianceUtilities.cvaMerge([
|
|
1255
|
+
"hover:text-slate-700",
|
|
1256
|
+
"focus:text-slate-800",
|
|
1257
|
+
"active:text-slate-800",
|
|
1258
|
+
"disabled:text-slate-400",
|
|
1259
|
+
"text-sm",
|
|
1260
|
+
"text-slate-600",
|
|
1261
|
+
"whitespace-nowrap",
|
|
1262
|
+
]);
|
|
1263
|
+
const cvaInput = cssClassVarianceUtilities.cvaMerge(["peer", "absolute", "h-0", "w-0", "opacity-0"]);
|
|
1264
|
+
const cvaCustomImage = cssClassVarianceUtilities.cvaMerge(["text-secondary-400"]);
|
|
1233
1265
|
|
|
1234
1266
|
/**
|
|
1235
1267
|
* A card version of a radio button that includes an icon, headings and a description.
|
|
1236
1268
|
*/
|
|
1237
|
-
const OptionCard = ({ icon, heading, subheading, description, disabled, id, value, className, contentClassName, dataTestId, customImage, ref, ...rest }) => {
|
|
1269
|
+
const OptionCard = ({ icon, heading, subheading, description, disabled, id, value, className, contentClassName, dataTestId, customImage, layout = "default", ref, ...rest }) => {
|
|
1238
1270
|
const htmlForId = id ?? "option-card-" + sharedUtils.uuidv4();
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1271
|
+
const subContent = React.useMemo(() => (jsxRuntime.jsxs("div", { className: cvaOptionCardContent({ className: contentClassName }), children: [subheading ? (jsxRuntime.jsx(reactComponents.Text, { align: "center", subtle: disabled, type: "span", weight: "thick", children: subheading })) : null, description ? (jsxRuntime.jsx(reactComponents.Text, { align: "center", subtle: disabled, type: "span", children: description })) : null] })), [subheading, description, contentClassName, disabled]);
|
|
1272
|
+
return (jsxRuntime.jsx(reactComponents.Tooltip, { className: "w-fit", disabled: layout !== "compact" || (!subheading && !description), label: subContent, mode: "light", placement: "top", children: jsxRuntime.jsxs("div", { className: cvaOptionCardContainer(), "data-testid": dataTestId, children: [jsxRuntime.jsx("input", { className: cvaInput(), "data-testid": `${dataTestId}-option-card`, disabled: disabled, id: htmlForId, ref: ref, type: "radio", value: value, ...rest }), jsxRuntime.jsxs("label", { className: cvaOptionCardLabel({ className, disabled, layout }), "data-testid": `${dataTestId}-option-card-label`, htmlFor: htmlForId, children: [disabled && icon && !customImage
|
|
1273
|
+
? React.cloneElement(icon, { className: cvaCustomImage({ className: icon.props.className }) })
|
|
1274
|
+
: null, disabled && customImage ? jsxRuntime.jsx("img", { alt: "logo", className: customImage.className, src: customImage.src }) : null, !disabled && !customImage && icon, !disabled && customImage ? jsxRuntime.jsx("img", { alt: "logo", className: customImage.className, src: customImage.src }) : null, heading ? (layout === "default" ? (jsxRuntime.jsx(reactComponents.Heading, { subtle: disabled, variant: "secondary", children: heading })) : (jsxRuntime.jsx(reactComponents.Text, { align: "center", className: cvaCompactOptionCardText(), subtle: disabled, type: "span", weight: "thick", children: heading }))) : null, layout === "default" && (subheading || description) ? subContent : null] })] }) }));
|
|
1242
1275
|
};
|
|
1243
1276
|
OptionCard.displayName = "OptionCard";
|
|
1244
1277
|
|
|
@@ -3097,7 +3130,7 @@ exports.countryCodeToFlagEmoji = countryCodeToFlagEmoji;
|
|
|
3097
3130
|
exports.cvaAccessoriesContainer = cvaAccessoriesContainer;
|
|
3098
3131
|
exports.cvaActionButton = cvaActionButton;
|
|
3099
3132
|
exports.cvaActionContainer = cvaActionContainer;
|
|
3100
|
-
exports.cvaInput = cvaInput;
|
|
3133
|
+
exports.cvaInput = cvaInput$1;
|
|
3101
3134
|
exports.cvaInputAddon = cvaInputAddon;
|
|
3102
3135
|
exports.cvaInputBase = cvaInputBase;
|
|
3103
3136
|
exports.cvaInputBaseDisabled = cvaInputBaseDisabled;
|
package/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { useNamespaceTranslation, registerTranslations, NamespaceTrans } from '@trackunit/i18n-library-translation';
|
|
3
|
-
import { IconButton, Icon, Tooltip, useGeometry, useIsTextTruncated,
|
|
3
|
+
import { IconButton, Icon, Tooltip, useGeometry, useIsTextTruncated, Text, Heading, Spinner, MenuItem, Tag, useResize, useDebounce, useIsFirstRender } from '@trackunit/react-components';
|
|
4
4
|
import { useCopyToClipboard } from 'usehooks-ts';
|
|
5
5
|
import { cvaMerge } from '@trackunit/css-class-variance-utilities';
|
|
6
6
|
import { themeSpacing } from '@trackunit/ui-design-tokens';
|
|
@@ -185,7 +185,7 @@ const cvaInputBase = cvaMerge([
|
|
|
185
185
|
]);
|
|
186
186
|
const cvaInputBaseDisabled = cvaMerge(["bg-slate-100", "hover:bg-slate-100", "hover:border-slate-300"]);
|
|
187
187
|
const cvaInputBaseInvalid = cvaMerge(["border-danger-600"]);
|
|
188
|
-
const cvaInput = cvaMerge([
|
|
188
|
+
const cvaInput$1 = cvaMerge([
|
|
189
189
|
"overflow-hidden",
|
|
190
190
|
"grid",
|
|
191
191
|
// ! The layout of the grid is critical to the functioning of the cvaInputItemPlacementManager 👇
|
|
@@ -430,7 +430,7 @@ const BaseInput = ({ className, isInvalid, dataTestId, prefix, suffix, addonBefo
|
|
|
430
430
|
// Keep a reference to the input element
|
|
431
431
|
const innerRef = useRef(null);
|
|
432
432
|
useImperativeHandle(ref, () => innerRef.current, []);
|
|
433
|
-
return (jsxs("div", { className: cvaInput({
|
|
433
|
+
return (jsxs("div", { className: cvaInput$1({
|
|
434
434
|
disabled: renderAsDisabled,
|
|
435
435
|
invalid: isInvalid,
|
|
436
436
|
isWarning,
|
|
@@ -826,7 +826,7 @@ const ColorField = forwardRef(({ label, id, tip, helpText, errorMessage, helpAdd
|
|
|
826
826
|
setRenderAsInvalid(!!errorType);
|
|
827
827
|
onBlur?.(event);
|
|
828
828
|
}, [errorType, onBlur]);
|
|
829
|
-
return (jsx(FormGroup, { dataTestId: dataTestId ? `${dataTestId}-FormGroup` : undefined, helpAddon: helpAddon, helpText: (renderAsInvalid && error) || helpText, htmlFor: htmlForId, isInvalid: renderAsInvalid, label: label, required: rest.required ? !(renderAsDisabled || renderAsReadonly) : false, tip: tip, children: jsxs("div", { className: cvaInput({
|
|
829
|
+
return (jsx(FormGroup, { dataTestId: dataTestId ? `${dataTestId}-FormGroup` : undefined, helpAddon: helpAddon, helpText: (renderAsInvalid && error) || helpText, htmlFor: htmlForId, isInvalid: renderAsInvalid, label: label, required: rest.required ? !(renderAsDisabled || renderAsReadonly) : false, tip: tip, children: jsxs("div", { className: cvaInput$1({
|
|
830
830
|
size: fieldSize,
|
|
831
831
|
disabled: renderAsDisabled,
|
|
832
832
|
invalid: renderAsInvalid,
|
|
@@ -1187,39 +1187,72 @@ const NumberField = ({ label, id, tip, helpText, errorMessage, helpAddon, isInva
|
|
|
1187
1187
|
NumberField.displayName = "NumberField";
|
|
1188
1188
|
|
|
1189
1189
|
const cvaOptionCardLabel = cvaMerge([
|
|
1190
|
-
|
|
1191
|
-
"
|
|
1192
|
-
"
|
|
1193
|
-
"
|
|
1190
|
+
"group",
|
|
1191
|
+
"transition",
|
|
1192
|
+
"bg-white",
|
|
1193
|
+
"outline",
|
|
1194
|
+
"outline-2",
|
|
1195
|
+
"outline-slate-300",
|
|
1196
|
+
"hover:bg-slate-100",
|
|
1197
|
+
"focus:bg-slate-200",
|
|
1198
|
+
"active:bg-slate-200",
|
|
1199
|
+
"disabled:bg-slate-200",
|
|
1200
|
+
"peer-checked:bg-primary-50",
|
|
1201
|
+
"peer-checked:outline-primary-600",
|
|
1202
|
+
"peer-checked:outline-2",
|
|
1194
1203
|
"flex",
|
|
1195
|
-
"flex-col",
|
|
1196
1204
|
"gap-2",
|
|
1197
1205
|
"justify-center",
|
|
1198
1206
|
"items-center",
|
|
1199
|
-
"
|
|
1200
|
-
"
|
|
1201
|
-
"peer-checked:bg-primary-50",
|
|
1202
|
-
"peer-checked:border-primary-600",
|
|
1203
|
-
"peer-checked:border-2",
|
|
1207
|
+
"text-center",
|
|
1208
|
+
"rounded-md",
|
|
1204
1209
|
], {
|
|
1205
1210
|
variants: {
|
|
1206
1211
|
disabled: {
|
|
1207
|
-
true: [
|
|
1212
|
+
true: ["cursor-not-allowed"],
|
|
1208
1213
|
false: ["cursor-pointer"],
|
|
1209
1214
|
},
|
|
1215
|
+
layout: {
|
|
1216
|
+
default: [
|
|
1217
|
+
"flex-col",
|
|
1218
|
+
"p-responsive-space",
|
|
1219
|
+
"w-full",
|
|
1220
|
+
"aspect-square",
|
|
1221
|
+
],
|
|
1222
|
+
compact: [
|
|
1223
|
+
"px-3",
|
|
1224
|
+
"py-1.5",
|
|
1225
|
+
"h-8",
|
|
1226
|
+
"min-h-[calc(var(--line-height-sm)+var(--spacing-3))]",
|
|
1227
|
+
"flex-row",
|
|
1228
|
+
"w-fit",
|
|
1229
|
+
],
|
|
1230
|
+
},
|
|
1210
1231
|
},
|
|
1211
1232
|
});
|
|
1212
1233
|
const cvaOptionCardContent = cvaMerge(["flex", "flex-col", "items-center"]);
|
|
1213
1234
|
const cvaOptionCardContainer = cvaMerge(["contents"]);
|
|
1235
|
+
const cvaCompactOptionCardText = cvaMerge([
|
|
1236
|
+
"hover:text-slate-700",
|
|
1237
|
+
"focus:text-slate-800",
|
|
1238
|
+
"active:text-slate-800",
|
|
1239
|
+
"disabled:text-slate-400",
|
|
1240
|
+
"text-sm",
|
|
1241
|
+
"text-slate-600",
|
|
1242
|
+
"whitespace-nowrap",
|
|
1243
|
+
]);
|
|
1244
|
+
const cvaInput = cvaMerge(["peer", "absolute", "h-0", "w-0", "opacity-0"]);
|
|
1245
|
+
const cvaCustomImage = cvaMerge(["text-secondary-400"]);
|
|
1214
1246
|
|
|
1215
1247
|
/**
|
|
1216
1248
|
* A card version of a radio button that includes an icon, headings and a description.
|
|
1217
1249
|
*/
|
|
1218
|
-
const OptionCard = ({ icon, heading, subheading, description, disabled, id, value, className, contentClassName, dataTestId, customImage, ref, ...rest }) => {
|
|
1250
|
+
const OptionCard = ({ icon, heading, subheading, description, disabled, id, value, className, contentClassName, dataTestId, customImage, layout = "default", ref, ...rest }) => {
|
|
1219
1251
|
const htmlForId = id ?? "option-card-" + uuidv4();
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1252
|
+
const subContent = useMemo(() => (jsxs("div", { className: cvaOptionCardContent({ className: contentClassName }), children: [subheading ? (jsx(Text, { align: "center", subtle: disabled, type: "span", weight: "thick", children: subheading })) : null, description ? (jsx(Text, { align: "center", subtle: disabled, type: "span", children: description })) : null] })), [subheading, description, contentClassName, disabled]);
|
|
1253
|
+
return (jsx(Tooltip, { className: "w-fit", disabled: layout !== "compact" || (!subheading && !description), label: subContent, mode: "light", placement: "top", children: jsxs("div", { className: cvaOptionCardContainer(), "data-testid": dataTestId, children: [jsx("input", { className: cvaInput(), "data-testid": `${dataTestId}-option-card`, disabled: disabled, id: htmlForId, ref: ref, type: "radio", value: value, ...rest }), jsxs("label", { className: cvaOptionCardLabel({ className, disabled, layout }), "data-testid": `${dataTestId}-option-card-label`, htmlFor: htmlForId, children: [disabled && icon && !customImage
|
|
1254
|
+
? cloneElement(icon, { className: cvaCustomImage({ className: icon.props.className }) })
|
|
1255
|
+
: null, disabled && customImage ? jsx("img", { alt: "logo", className: customImage.className, src: customImage.src }) : null, !disabled && !customImage && icon, !disabled && customImage ? jsx("img", { alt: "logo", className: customImage.className, src: customImage.src }) : null, heading ? (layout === "default" ? (jsx(Heading, { subtle: disabled, variant: "secondary", children: heading })) : (jsx(Text, { align: "center", className: cvaCompactOptionCardText(), subtle: disabled, type: "span", weight: "thick", children: heading }))) : null, layout === "default" && (subheading || description) ? subContent : null] })] }) }));
|
|
1223
1256
|
};
|
|
1224
1257
|
OptionCard.displayName = "OptionCard";
|
|
1225
1258
|
|
|
@@ -3026,4 +3059,4 @@ const useZodValidators = () => {
|
|
|
3026
3059
|
*/
|
|
3027
3060
|
setupLibraryTranslations();
|
|
3028
3061
|
|
|
3029
|
-
export { ActionButton, BaseInput, Checkbox, CheckboxField, ColorField, CreatableSelect, CreatableSelectField, DEFAULT_TIME, DateField, DateInput, DropZone, DropZoneDefaultLabel, EMAIL_REGEX, EmailField, EmailInput, FormFieldSelectAdapter, FormGroup, Label, MultiSelectMenuItem, NumberField, NumberInput, OptionCard, PasswordField, PasswordInput, PhoneField, PhoneFieldWithController, PhoneInput, RadioGroup, RadioItem, Schedule, ScheduleVariant, Search, Select, SelectField, SingleSelectMenuItem, TextArea, TextAreaField, TextField, TextInput, TimeRange, TimeRangeField, ToggleSwitch, ToggleSwitchOption, UploadField, UploadInput, UrlField, UrlInput, checkIfPhoneNumberHasPlus, countryCodeToFlagEmoji, cvaAccessoriesContainer, cvaActionButton, cvaActionContainer, cvaInput, cvaInputAddon, cvaInputBase, cvaInputBaseDisabled, cvaInputBaseInvalid, cvaInputField, cvaInputItemPlacementManager, cvaInputPrefix, cvaInputSuffix, cvaLabel, cvaSelect, cvaSelectControl, cvaSelectCounter, cvaSelectDynamicTagContainer, cvaSelectIcon, cvaSelectMenu, cvaSelectMenuList, cvaSelectPrefixSuffix, cvaSelectXIcon, getCountryAbbreviation, getPhoneNumberWithPlus, isInvalidCountryCode, isInvalidPhoneNumber, isValidHEXColor, parseSchedule, phoneErrorMessage, serializeSchedule, useCustomComponents, useGetPhoneValidationRules, usePhoneInput, useZodValidators, validateEmailAddress, validatePhoneNumber, weekDay };
|
|
3062
|
+
export { ActionButton, BaseInput, Checkbox, CheckboxField, ColorField, CreatableSelect, CreatableSelectField, DEFAULT_TIME, DateField, DateInput, DropZone, DropZoneDefaultLabel, EMAIL_REGEX, EmailField, EmailInput, FormFieldSelectAdapter, FormGroup, Label, MultiSelectMenuItem, NumberField, NumberInput, OptionCard, PasswordField, PasswordInput, PhoneField, PhoneFieldWithController, PhoneInput, RadioGroup, RadioItem, Schedule, ScheduleVariant, Search, Select, SelectField, SingleSelectMenuItem, TextArea, TextAreaField, TextField, TextInput, TimeRange, TimeRangeField, ToggleSwitch, ToggleSwitchOption, UploadField, UploadInput, UrlField, UrlInput, checkIfPhoneNumberHasPlus, countryCodeToFlagEmoji, cvaAccessoriesContainer, cvaActionButton, cvaActionContainer, cvaInput$1 as cvaInput, cvaInputAddon, cvaInputBase, cvaInputBaseDisabled, cvaInputBaseInvalid, cvaInputField, cvaInputItemPlacementManager, cvaInputPrefix, cvaInputSuffix, cvaLabel, cvaSelect, cvaSelectControl, cvaSelectCounter, cvaSelectDynamicTagContainer, cvaSelectIcon, cvaSelectMenu, cvaSelectMenuList, cvaSelectPrefixSuffix, cvaSelectXIcon, getCountryAbbreviation, getPhoneNumberWithPlus, isInvalidCountryCode, isInvalidPhoneNumber, isValidHEXColor, parseSchedule, phoneErrorMessage, serializeSchedule, useCustomComponents, useGetPhoneValidationRules, usePhoneInput, useZodValidators, validateEmailAddress, validatePhoneNumber, weekDay };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-form-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.71",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"zod": "3.22.4",
|
|
18
18
|
"react-hook-form": "7.53.1",
|
|
19
19
|
"tailwind-merge": "^2.0.0",
|
|
20
|
-
"@trackunit/css-class-variance-utilities": "1.3.
|
|
21
|
-
"@trackunit/react-components": "1.4.
|
|
22
|
-
"@trackunit/ui-icons": "1.3.
|
|
23
|
-
"@trackunit/shared-utils": "1.5.
|
|
24
|
-
"@trackunit/ui-design-tokens": "1.3.
|
|
25
|
-
"@trackunit/i18n-library-translation": "1.3.
|
|
20
|
+
"@trackunit/css-class-variance-utilities": "1.3.49",
|
|
21
|
+
"@trackunit/react-components": "1.4.61",
|
|
22
|
+
"@trackunit/ui-icons": "1.3.49",
|
|
23
|
+
"@trackunit/shared-utils": "1.5.49",
|
|
24
|
+
"@trackunit/ui-design-tokens": "1.3.49",
|
|
25
|
+
"@trackunit/i18n-library-translation": "1.3.54",
|
|
26
26
|
"string-ts": "^2.0.0"
|
|
27
27
|
},
|
|
28
28
|
"module": "./index.esm.js",
|
|
@@ -29,6 +29,10 @@ export interface OptionCardProps extends InputHTMLAttributes<HTMLInputElement>,
|
|
|
29
29
|
* A ref for the component
|
|
30
30
|
*/
|
|
31
31
|
ref?: Ref<HTMLInputElement>;
|
|
32
|
+
/**
|
|
33
|
+
* The layout of the component.
|
|
34
|
+
*/
|
|
35
|
+
layout?: "compact" | "default";
|
|
32
36
|
}
|
|
33
37
|
interface CustomImage {
|
|
34
38
|
src: string;
|
|
@@ -38,7 +42,7 @@ interface CustomImage {
|
|
|
38
42
|
* A card version of a radio button that includes an icon, headings and a description.
|
|
39
43
|
*/
|
|
40
44
|
export declare const OptionCard: {
|
|
41
|
-
({ icon, heading, subheading, description, disabled, id, value, className, contentClassName, dataTestId, customImage, ref, ...rest }: OptionCardProps): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
({ icon, heading, subheading, description, disabled, id, value, className, contentClassName, dataTestId, customImage, layout, ref, ...rest }: OptionCardProps): import("react/jsx-runtime").JSX.Element;
|
|
42
46
|
displayName: string;
|
|
43
47
|
};
|
|
44
48
|
export {};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export declare const cvaOptionCardLabel: (props?: ({
|
|
2
2
|
disabled?: boolean | null | undefined;
|
|
3
|
+
layout?: "default" | "compact" | null | undefined;
|
|
3
4
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
4
5
|
export declare const cvaOptionCardContent: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
5
6
|
export declare const cvaOptionCardContainer: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
7
|
+
export declare const cvaCompactOptionCardText: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
8
|
+
export declare const cvaInput: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
9
|
+
export declare const cvaCustomImage: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|