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 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__.jsx)("input", {
1417
- type: "date",
1418
- id: name,
1419
- name: name,
1420
- ref: inputRef,
1421
- value: selectedDate,
1422
- min: normalizedMinDate,
1423
- max: normalizedMaxDate,
1424
- title: title,
1425
- onChange: handleDateChange,
1426
- required: required,
1427
- disabled: disabled,
1428
- "data-cy": (0,_utils_getDataCy__WEBPACK_IMPORTED_MODULE_3__.getDataCy)({
1429
- name,
1430
- dataCy
1431
- }),
1432
- "aria-invalid": !isValid,
1433
- "aria-describedby": !isValid ? `${name}-error` : undefined,
1434
- 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}`
1435
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("button", {
1436
- type: "button",
1437
- onClick: handleIconClick,
1438
- className: "datepicker-icon-button absolute right-3 top-1/2 mt-1 transform",
1439
- "aria-label": "Open date picker",
1440
- disabled: disabled,
1441
- children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_heroicons_react_24_outline__WEBPACK_IMPORTED_MODULE_2__.CalendarIcon, {
1442
- className: `h-5 w-5 ${disabled ? "text-[--color-text-disabled]" : "text-[--color-text-weak] hover:text-[--color-primary-btn-hover]"} transition`
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`,