opus-toolkit-components 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/main.js +31 -28
- package/lib/main.js.map +1 -1
- package/package.json +1 -1
package/lib/main.js
CHANGED
|
@@ -1413,34 +1413,37 @@ function DatePicker(_ref) {
|
|
|
1413
1413
|
className: "ml-1 text-[--color-util-red]",
|
|
1414
1414
|
children: "*"
|
|
1415
1415
|
})]
|
|
1416
|
-
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1416
|
+
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div", {
|
|
1417
|
+
className: "relative",
|
|
1418
|
+
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("input", {
|
|
1419
|
+
type: "date",
|
|
1420
|
+
id: name,
|
|
1421
|
+
name: name,
|
|
1422
|
+
ref: inputRef,
|
|
1423
|
+
value: selectedDate,
|
|
1424
|
+
min: normalizedMinDate,
|
|
1425
|
+
max: normalizedMaxDate,
|
|
1426
|
+
title: title,
|
|
1427
|
+
onChange: handleDateChange,
|
|
1428
|
+
required: required,
|
|
1429
|
+
disabled: disabled,
|
|
1430
|
+
"data-cy": (0,_utils_getDataCy__WEBPACK_IMPORTED_MODULE_3__.getDataCy)({
|
|
1431
|
+
name,
|
|
1432
|
+
dataCy
|
|
1433
|
+
}),
|
|
1434
|
+
"aria-invalid": !isValid,
|
|
1435
|
+
"aria-describedby": !isValid ? `${name}-error` : undefined,
|
|
1436
|
+
className: `w-full rounded-md border bg-[--color-input-bg] px-3 py-2 pr-10 ${isValid ? "border-[--color-stroke]" : "border-[--color-util-red]"} text-md font-normal text-[--color-text-strong] ${disabled ? "cursor-not-allowed opacity-50" : ""} ${className}`
|
|
1437
|
+
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("button", {
|
|
1438
|
+
type: "button",
|
|
1439
|
+
onClick: handleIconClick,
|
|
1440
|
+
className: "datepicker-icon-button absolute right-3 top-1/2 -translate-y-1/2",
|
|
1441
|
+
"aria-label": "Open date picker",
|
|
1442
|
+
disabled: disabled,
|
|
1443
|
+
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_heroicons_react_24_outline__WEBPACK_IMPORTED_MODULE_2__.CalendarIcon, {
|
|
1444
|
+
className: `h-5 w-5 ${disabled ? "text-[--color-text-disabled]" : "text-[--color-text-weak] hover:text-[--color-primary-btn-hover]"} transition`
|
|
1445
|
+
})
|
|
1446
|
+
})]
|
|
1444
1447
|
}), !isValid && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_Text_Text__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
|
1445
1448
|
as: "span",
|
|
1446
1449
|
id: `${name}-error`,
|