optimized-react-component-library-xyz123 0.1.8 → 0.1.9
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.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +10 -5
- package/dist/index.mjs +10 -5
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -240,8 +240,13 @@ var PrevieMultipleCheckboxes = ({
|
|
|
240
240
|
// src/NewInputComponentStandard/TextAreaStandard/TextAreaStandard.tsx
|
|
241
241
|
var import_dompurify = __toESM(require("dompurify"));
|
|
242
242
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
243
|
-
var InputTextarea = ({
|
|
244
|
-
|
|
243
|
+
var InputTextarea = ({
|
|
244
|
+
question,
|
|
245
|
+
isTouched,
|
|
246
|
+
showPreview = false,
|
|
247
|
+
activatedLanguage
|
|
248
|
+
}) => {
|
|
249
|
+
var _a, _b, _c, _d, _e;
|
|
245
250
|
const questionId = `question-${question.id}`;
|
|
246
251
|
const inputId = `textarea-${question.id}`;
|
|
247
252
|
const aboutId = `about-${question.id}`;
|
|
@@ -287,15 +292,15 @@ var InputTextarea = ({ question, isTouched, showPreview = false, activatedLangua
|
|
|
287
292
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { "aria-label": "Felmeddelande.", className: "errorDot", children: "!" }),
|
|
288
293
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "errorText", children: question.validationDefaultMessesege })
|
|
289
294
|
] }),
|
|
290
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
295
|
+
!((_b = question.questionExtraAttribute) == null ? void 0 : _b.hideTextCounter) && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
291
296
|
"div",
|
|
292
297
|
{
|
|
293
|
-
className: `pts-character-counter ${question.answer && (((
|
|
298
|
+
className: `pts-character-counter ${question.answer && (((_c = question.questionExtraAttribute) == null ? void 0 : _c.answerMaxLength) || defaultMaxLength) && question.answer.length > (((_d = question.questionExtraAttribute) == null ? void 0 : _d.answerMaxLength) || defaultMaxLength) ? "error" : ""}`,
|
|
294
299
|
children: [
|
|
295
300
|
question.answer ? question.answer.length : 0,
|
|
296
301
|
" av",
|
|
297
302
|
" ",
|
|
298
|
-
((
|
|
303
|
+
((_e = question.questionExtraAttribute) == null ? void 0 : _e.answerMaxLength) || defaultMaxLength,
|
|
299
304
|
" tecken"
|
|
300
305
|
]
|
|
301
306
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -177,8 +177,13 @@ var PrevieMultipleCheckboxes = ({
|
|
|
177
177
|
// src/NewInputComponentStandard/TextAreaStandard/TextAreaStandard.tsx
|
|
178
178
|
import DOMPurify from "dompurify";
|
|
179
179
|
import { Fragment as Fragment3, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
180
|
-
var InputTextarea = ({
|
|
181
|
-
|
|
180
|
+
var InputTextarea = ({
|
|
181
|
+
question,
|
|
182
|
+
isTouched,
|
|
183
|
+
showPreview = false,
|
|
184
|
+
activatedLanguage
|
|
185
|
+
}) => {
|
|
186
|
+
var _a, _b, _c, _d, _e;
|
|
182
187
|
const questionId = `question-${question.id}`;
|
|
183
188
|
const inputId = `textarea-${question.id}`;
|
|
184
189
|
const aboutId = `about-${question.id}`;
|
|
@@ -224,15 +229,15 @@ var InputTextarea = ({ question, isTouched, showPreview = false, activatedLangua
|
|
|
224
229
|
/* @__PURE__ */ jsx3("span", { "aria-label": "Felmeddelande.", className: "errorDot", children: "!" }),
|
|
225
230
|
/* @__PURE__ */ jsx3("span", { className: "errorText", children: question.validationDefaultMessesege })
|
|
226
231
|
] }),
|
|
227
|
-
/* @__PURE__ */ jsxs3(
|
|
232
|
+
!((_b = question.questionExtraAttribute) == null ? void 0 : _b.hideTextCounter) && /* @__PURE__ */ jsxs3(
|
|
228
233
|
"div",
|
|
229
234
|
{
|
|
230
|
-
className: `pts-character-counter ${question.answer && (((
|
|
235
|
+
className: `pts-character-counter ${question.answer && (((_c = question.questionExtraAttribute) == null ? void 0 : _c.answerMaxLength) || defaultMaxLength) && question.answer.length > (((_d = question.questionExtraAttribute) == null ? void 0 : _d.answerMaxLength) || defaultMaxLength) ? "error" : ""}`,
|
|
231
236
|
children: [
|
|
232
237
|
question.answer ? question.answer.length : 0,
|
|
233
238
|
" av",
|
|
234
239
|
" ",
|
|
235
|
-
((
|
|
240
|
+
((_e = question.questionExtraAttribute) == null ? void 0 : _e.answerMaxLength) || defaultMaxLength,
|
|
236
241
|
" tecken"
|
|
237
242
|
]
|
|
238
243
|
}
|