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 CHANGED
@@ -86,6 +86,7 @@ interface IQuestionExtraAttribute {
86
86
  inputType?: string;
87
87
  showTextAreaCounter?: boolean;
88
88
  hideValidationMessage?: boolean;
89
+ hideTextCounter?: boolean;
89
90
  }
90
91
  interface IStepQuestionData {
91
92
  step: number;
package/dist/index.d.ts CHANGED
@@ -86,6 +86,7 @@ interface IQuestionExtraAttribute {
86
86
  inputType?: string;
87
87
  showTextAreaCounter?: boolean;
88
88
  hideValidationMessage?: boolean;
89
+ hideTextCounter?: boolean;
89
90
  }
90
91
  interface IStepQuestionData {
91
92
  step: number;
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 = ({ question, isTouched, showPreview = false, activatedLanguage }) => {
244
- var _a, _b, _c, _d;
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 && (((_b = question.questionExtraAttribute) == null ? void 0 : _b.answerMaxLength) || defaultMaxLength) && question.answer.length > (((_c = question.questionExtraAttribute) == null ? void 0 : _c.answerMaxLength) || defaultMaxLength) ? "error" : ""}`,
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
- ((_d = question.questionExtraAttribute) == null ? void 0 : _d.answerMaxLength) || defaultMaxLength,
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 = ({ question, isTouched, showPreview = false, activatedLanguage }) => {
181
- var _a, _b, _c, _d;
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 && (((_b = question.questionExtraAttribute) == null ? void 0 : _b.answerMaxLength) || defaultMaxLength) && question.answer.length > (((_c = question.questionExtraAttribute) == null ? void 0 : _c.answerMaxLength) || defaultMaxLength) ? "error" : ""}`,
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
- ((_d = question.questionExtraAttribute) == null ? void 0 : _d.answerMaxLength) || defaultMaxLength,
240
+ ((_e = question.questionExtraAttribute) == null ? void 0 : _e.answerMaxLength) || defaultMaxLength,
236
241
  " tecken"
237
242
  ]
238
243
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "optimized-react-component-library-xyz123",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "A modern React component library using TypeScript.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",