optimized-react-component-library-xyz123 2.5.4 → 2.5.6

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.mjs CHANGED
@@ -3899,8 +3899,7 @@ var StepperButtons = ({
3899
3899
  nextStepButtonHandler,
3900
3900
  onSubmitHandler,
3901
3901
  steps,
3902
- activeStep,
3903
- appUsesApi = true
3902
+ activeStep
3904
3903
  }) => {
3905
3904
  const totalSteps = steps ? steps.length : "";
3906
3905
  return /* @__PURE__ */ jsxs29("div", { className: "pts-stepperButtons-container", children: [
@@ -3920,9 +3919,8 @@ var StepperButtons = ({
3920
3919
  className: "pts-forwardButton",
3921
3920
  onClick: activeStep !== totalSteps ? nextStepButtonHandler : onSubmitHandler,
3922
3921
  children: [
3923
- appUsesApi && activeStep !== totalSteps && globalLanguageState ? globalLanguageState.forwardButton : "",
3924
- appUsesApi && activeStep === totalSteps && globalLanguageState ? globalLanguageState.sendButton : "",
3925
- !appUsesApi && activeStep === totalSteps && globalLanguageState ? globalLanguageState.restartButton : "Starta om"
3922
+ activeStep !== totalSteps && globalLanguageState ? globalLanguageState.forwardButton : "",
3923
+ activeStep === totalSteps && globalLanguageState ? globalLanguageState.sendButton : ""
3926
3924
  ]
3927
3925
  }
3928
3926
  )
@@ -3973,8 +3971,54 @@ var Stepper = ({ arraySteps = [], activeStep = 1 }) => {
3973
3971
  };
3974
3972
  var StepperStandard_default = Stepper;
3975
3973
 
3976
- // src/components/validation-and-status/ValidationErrorSummaryList/ValidationErrorSummaryList.tsx
3974
+ // src/components/stepper/StepperButtonsNoApiStandard/StepperButtonsNoApiStandard.tsx
3977
3975
  import { Fragment as Fragment19, jsx as jsx39, jsxs as jsxs31 } from "react/jsx-runtime";
3976
+ var StepperButtonsNoApi = ({
3977
+ globalLanguageState,
3978
+ changeStepHandler,
3979
+ nextStepButtonHandler,
3980
+ onSubmitHandler,
3981
+ steps,
3982
+ activeStep
3983
+ }) => {
3984
+ const totalSteps = steps ? steps.length : "";
3985
+ return /* @__PURE__ */ jsxs31("div", { className: "pts-StepperButtonsNoApi-container", children: [
3986
+ activeStep === 0 && /* @__PURE__ */ jsx39(Fragment19, { children: /* @__PURE__ */ jsx39(
3987
+ "button",
3988
+ {
3989
+ type: "button",
3990
+ className: "pts-forwardButton",
3991
+ onClick: activeStep !== totalSteps ? nextStepButtonHandler : onSubmitHandler,
3992
+ children: activeStep !== totalSteps && globalLanguageState ? globalLanguageState.forwardButton : ""
3993
+ }
3994
+ ) }),
3995
+ activeStep !== 0 && activeStep !== totalSteps && /* @__PURE__ */ jsxs31(Fragment19, { children: [
3996
+ /* @__PURE__ */ jsx39(
3997
+ "button",
3998
+ {
3999
+ onClick: () => changeStepHandler(activeStep - 1),
4000
+ className: "pts-backButton",
4001
+ type: "button",
4002
+ children: globalLanguageState ? globalLanguageState.backButton : "<<"
4003
+ }
4004
+ ),
4005
+ /* @__PURE__ */ jsx39(
4006
+ "button",
4007
+ {
4008
+ type: "button",
4009
+ className: "pts-forwardButton",
4010
+ onClick: activeStep !== totalSteps ? nextStepButtonHandler : onSubmitHandler,
4011
+ children: activeStep !== totalSteps && globalLanguageState ? globalLanguageState.forwardButton : ""
4012
+ }
4013
+ )
4014
+ ] }),
4015
+ activeStep === totalSteps && /* @__PURE__ */ jsx39("button", { onClick: () => changeStepHandler(0), className: "pts-backButton", type: "button", children: globalLanguageState && globalLanguageState.restartButton ? globalLanguageState.restartButton : "Starta om" })
4016
+ ] });
4017
+ };
4018
+ var StepperButtonsNoApiStandard_default = StepperButtonsNoApi;
4019
+
4020
+ // src/components/validation-and-status/ValidationErrorSummaryList/ValidationErrorSummaryList.tsx
4021
+ import { Fragment as Fragment20, jsx as jsx40, jsxs as jsxs32 } from "react/jsx-runtime";
3978
4022
  var ValidationErrorSummaryList = ({
3979
4023
  validationErrorsList,
3980
4024
  questions,
@@ -4011,7 +4055,7 @@ var ValidationErrorSummaryList = ({
4011
4055
  }, 300);
4012
4056
  }
4013
4057
  }
4014
- if (!validationErrorsList.length) return /* @__PURE__ */ jsx39(Fragment19, {});
4058
+ if (!validationErrorsList.length) return /* @__PURE__ */ jsx40(Fragment20, {});
4015
4059
  const filteredIds = filterIdsByGroupCheck(validationErrorsList, questions);
4016
4060
  const count = filteredIds.length;
4017
4061
  const title = summaryText.replace("{count}", count.toString()).replace(
@@ -4023,11 +4067,11 @@ var ValidationErrorSummaryList = ({
4023
4067
  const found = questions.find((item) => item.id === id);
4024
4068
  return (_a = found == null ? void 0 : found.validationSummaryLabel) != null ? _a : found == null ? void 0 : found.questionLabel;
4025
4069
  }
4026
- return /* @__PURE__ */ jsxs31("div", { className: `pts-errorSummary-container pts-root-error ${validationErrorsList.length === 0 ? "cleanPadding" : ""}`, children: [
4027
- /* @__PURE__ */ jsx39("span", { "aria-hidden": "true", className: "errorDot", children: "!" }),
4028
- /* @__PURE__ */ jsxs31("div", { className: "errorSummary-content", id: "pts-errorSummary-content", children: [
4029
- /* @__PURE__ */ jsx39("h2", { id: "errorSummary-headline", children: title }),
4030
- /* @__PURE__ */ jsx39("ul", { id: "errorSummary-ul", children: filteredIds.map((questionId, i) => /* @__PURE__ */ jsx39("li", { children: /* @__PURE__ */ jsx39(
4070
+ return /* @__PURE__ */ jsxs32("div", { className: `pts-errorSummary-container pts-root-error ${validationErrorsList.length === 0 ? "cleanPadding" : ""}`, children: [
4071
+ /* @__PURE__ */ jsx40("span", { "aria-hidden": "true", className: "errorDot", children: "!" }),
4072
+ /* @__PURE__ */ jsxs32("div", { className: "errorSummary-content", id: "pts-errorSummary-content", children: [
4073
+ /* @__PURE__ */ jsx40("h2", { id: "errorSummary-headline", children: title }),
4074
+ /* @__PURE__ */ jsx40("ul", { id: "errorSummary-ul", children: filteredIds.map((questionId, i) => /* @__PURE__ */ jsx40("li", { children: /* @__PURE__ */ jsx40(
4031
4075
  "a",
4032
4076
  {
4033
4077
  href: "#",
@@ -4045,11 +4089,11 @@ var ValidationErrorSummaryList = ({
4045
4089
  var ValidationErrorSummaryList_default = ValidationErrorSummaryList;
4046
4090
 
4047
4091
  // src/components/validation-and-status/FormStatusMessagesScreenReader/FormStatusMessagesScreenReader.tsx
4048
- import { Fragment as Fragment20, jsx as jsx40, jsxs as jsxs32 } from "react/jsx-runtime";
4092
+ import { Fragment as Fragment21, jsx as jsx41, jsxs as jsxs33 } from "react/jsx-runtime";
4049
4093
  var FormStatusMessagesScreenReader = ({ formStatus, activatedLanguage = "sv" }) => {
4050
- return /* @__PURE__ */ jsxs32(Fragment20, { children: [
4051
- /* @__PURE__ */ jsx40("p", { "aria-live": "assertive", children: formStatus === "failed" && /* @__PURE__ */ jsx40("span", { className: "pts-root-mandatoryAsterisk", children: activatedLanguage === "en" ? "Something went wrong, please try again later or contact us!" : "N\xE5got gick fel, f\xF6rs\xF6k igen senare eller kontakta oss!" }) }),
4052
- /* @__PURE__ */ jsx40("div", { "aria-live": "polite", className: "visually-hidden", children: formStatus === "loading" ? activatedLanguage === "en" ? "Your case is being registered. Please do not refresh or close the page." : "Ditt \xE4rende registreras. Uppdatera eller st\xE4ng inte sidan." : "" })
4094
+ return /* @__PURE__ */ jsxs33(Fragment21, { children: [
4095
+ /* @__PURE__ */ jsx41("p", { "aria-live": "assertive", children: formStatus === "failed" && /* @__PURE__ */ jsx41("span", { className: "pts-root-mandatoryAsterisk", children: activatedLanguage === "en" ? "Something went wrong, please try again later or contact us!" : "N\xE5got gick fel, f\xF6rs\xF6k igen senare eller kontakta oss!" }) }),
4096
+ /* @__PURE__ */ jsx41("div", { "aria-live": "polite", className: "visually-hidden", children: formStatus === "loading" ? activatedLanguage === "en" ? "Your case is being registered. Please do not refresh or close the page." : "Ditt \xE4rende registreras. Uppdatera eller st\xE4ng inte sidan." : "" })
4053
4097
  ] });
4054
4098
  };
4055
4099
  var FormStatusMessagesScreenReader_default = FormStatusMessagesScreenReader;
@@ -4078,6 +4122,7 @@ export {
4078
4122
  SingleCheckboxStandard_default as SingleCheckboxStandard,
4079
4123
  SkipLinkStandard_default as SkipLinkStandard,
4080
4124
  StartApplicationButton_default as StartApplicationButton,
4125
+ StepperButtonsNoApiStandard_default as StepperButtonsNoApiStandard,
4081
4126
  StepperButtonsStandard_default as StepperButtonsStandard,
4082
4127
  StepperStandard_default as StepperStandard,
4083
4128
  TextAreaStandard_default as TextAreaStandard,