anton-bakker-feedback 0.3.3 → 0.4.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/dist/react.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import React__default, { createContext, lazy, useMemo, useReducer, useEffect, useCallback, Suspense, useContext, useState, useRef } from "react";
3
- import { v as validateConfig, r as resolveConfig, d as detectLocale, t } from "./chunks/i18n-Du-or3T4.js";
3
+ import { v as validateConfig, r as resolveConfig, d as detectLocale, t } from "./chunks/i18n-Cba0xHU-.js";
4
4
  import { c } from "./chunks/submitResolver-DsfkrUHY.js";
5
5
  const FeedbackContext = createContext(null);
6
6
  FeedbackContext.displayName = "FeedbackContext";
@@ -975,9 +975,9 @@ function FeedbackConfirm({ className }) {
975
975
  "aria-label": "Submit feedback",
976
976
  noValidate: true,
977
977
  children: [
978
- /* @__PURE__ */ jsx("h2", { id: "feedback-confirm-title", className: "feedback-confirm__title", children: "Review your feedback" }),
978
+ /* @__PURE__ */ jsx("h2", { id: "feedback-confirm-title", className: "feedback-confirm__title", children: t("feedback.confirm.heading", locale, customTranslations) }),
979
979
  duplicates.length > 0 && /* @__PURE__ */ jsxs("div", { className: "feedback-confirm__duplicate-warning", role: "alert", children: [
980
- /* @__PURE__ */ jsx("strong", { children: "Similar feedback already exists:" }),
980
+ /* @__PURE__ */ jsx("strong", { children: t("feedback.confirm.duplicateWarning", locale, customTranslations) }),
981
981
  /* @__PURE__ */ jsx("ul", { children: duplicates.map((d) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("a", { href: `#${d.id}`, className: "feedback-confirm__duplicate-link", children: [
982
982
  d.title,
983
983
  " (",
@@ -987,7 +987,7 @@ function FeedbackConfirm({ className }) {
987
987
  ] }),
988
988
  /* @__PURE__ */ jsxs("div", { className: "feedback-confirm__field", children: [
989
989
  /* @__PURE__ */ jsxs("label", { htmlFor: "feedback-confirm-title-input", className: "feedback-confirm__label", children: [
990
- t("feedback.confirm.titleLabel", locale, customTranslations) || "Title",
990
+ t("feedback.confirm.titleLabel", locale, customTranslations),
991
991
  " ",
992
992
  /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "feedback-confirm__required", children: "*" }),
993
993
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: "(required)" })
@@ -1016,7 +1016,7 @@ function FeedbackConfirm({ className }) {
1016
1016
  )
1017
1017
  ] }),
1018
1018
  /* @__PURE__ */ jsxs("div", { className: "feedback-confirm__field", children: [
1019
- /* @__PURE__ */ jsx("label", { htmlFor: "feedback-confirm-description", className: "feedback-confirm__label", children: t("feedback.confirm.descriptionLabel", locale, customTranslations) || "Description" }),
1019
+ /* @__PURE__ */ jsx("label", { htmlFor: "feedback-confirm-description", className: "feedback-confirm__label", children: t("feedback.confirm.descriptionLabel", locale, customTranslations) }),
1020
1020
  /* @__PURE__ */ jsx(
1021
1021
  "textarea",
1022
1022
  {
@@ -1030,7 +1030,7 @@ function FeedbackConfirm({ className }) {
1030
1030
  ] }),
1031
1031
  /* @__PURE__ */ jsxs("div", { className: "feedback-confirm__field", children: [
1032
1032
  /* @__PURE__ */ jsxs("label", { htmlFor: "feedback-confirm-type", className: "feedback-confirm__label", children: [
1033
- t("feedback.confirm.typeLabel", locale, customTranslations) || "Type",
1033
+ t("feedback.confirm.typeLabel", locale, customTranslations),
1034
1034
  " ",
1035
1035
  /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "feedback-confirm__required", children: "*" }),
1036
1036
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: "(required)" })
@@ -1065,7 +1065,7 @@ function FeedbackConfirm({ className }) {
1065
1065
  )
1066
1066
  ] }),
1067
1067
  /* @__PURE__ */ jsxs("div", { className: "feedback-confirm__field", children: [
1068
- /* @__PURE__ */ jsx("label", { htmlFor: "feedback-confirm-scope", className: "feedback-confirm__label", children: t("feedback.confirm.scopeLabel", locale, customTranslations) || "Scope" }),
1068
+ /* @__PURE__ */ jsx("label", { htmlFor: "feedback-confirm-scope", className: "feedback-confirm__label", children: t("feedback.confirm.scopeLabel", locale, customTranslations) }),
1069
1069
  /* @__PURE__ */ jsxs(
1070
1070
  "select",
1071
1071
  {
@@ -1074,16 +1074,16 @@ function FeedbackConfirm({ className }) {
1074
1074
  value: values.scope,
1075
1075
  onChange: (e) => handleChange("scope", e.target.value),
1076
1076
  children: [
1077
- /* @__PURE__ */ jsx("option", { value: "", children: "Select scope (optional)" }),
1078
- /* @__PURE__ */ jsx("option", { value: "isolated", children: "Isolated" }),
1079
- /* @__PURE__ */ jsx("option", { value: "cross-cutting", children: "Cross-cutting" }),
1080
- /* @__PURE__ */ jsx("option", { value: "systemic", children: "Systemic" })
1077
+ /* @__PURE__ */ jsx("option", { value: "", children: t("feedback.confirm.scopePlaceholder", locale, customTranslations) }),
1078
+ /* @__PURE__ */ jsx("option", { value: "isolated", children: t("feedback.confirm.scope.isolated", locale, customTranslations) }),
1079
+ /* @__PURE__ */ jsx("option", { value: "cross-cutting", children: t("feedback.confirm.scope.crossCutting", locale, customTranslations) }),
1080
+ /* @__PURE__ */ jsx("option", { value: "systemic", children: t("feedback.confirm.scope.systemic", locale, customTranslations) })
1081
1081
  ]
1082
1082
  }
1083
1083
  )
1084
1084
  ] }),
1085
1085
  /* @__PURE__ */ jsxs("div", { className: "feedback-confirm__field", children: [
1086
- /* @__PURE__ */ jsx("label", { htmlFor: "feedback-confirm-size", className: "feedback-confirm__label", children: t("feedback.confirm.sizeLabel", locale, customTranslations) || "Size" }),
1086
+ /* @__PURE__ */ jsx("label", { htmlFor: "feedback-confirm-size", className: "feedback-confirm__label", children: t("feedback.confirm.sizeLabel", locale, customTranslations) }),
1087
1087
  /* @__PURE__ */ jsxs(
1088
1088
  "select",
1089
1089
  {
@@ -1092,11 +1092,11 @@ function FeedbackConfirm({ className }) {
1092
1092
  value: values.size,
1093
1093
  onChange: (e) => handleChange("size", e.target.value),
1094
1094
  children: [
1095
- /* @__PURE__ */ jsx("option", { value: "", children: "Select size (optional)" }),
1096
- /* @__PURE__ */ jsx("option", { value: "trivial", children: "Trivial" }),
1097
- /* @__PURE__ */ jsx("option", { value: "small", children: "Small" }),
1098
- /* @__PURE__ */ jsx("option", { value: "medium", children: "Medium" }),
1099
- /* @__PURE__ */ jsx("option", { value: "large", children: "Large" })
1095
+ /* @__PURE__ */ jsx("option", { value: "", children: t("feedback.confirm.sizePlaceholder", locale, customTranslations) }),
1096
+ /* @__PURE__ */ jsx("option", { value: "trivial", children: t("feedback.confirm.size.trivial", locale, customTranslations) }),
1097
+ /* @__PURE__ */ jsx("option", { value: "small", children: t("feedback.confirm.size.small", locale, customTranslations) }),
1098
+ /* @__PURE__ */ jsx("option", { value: "medium", children: t("feedback.confirm.size.medium", locale, customTranslations) }),
1099
+ /* @__PURE__ */ jsx("option", { value: "large", children: t("feedback.confirm.size.large", locale, customTranslations) })
1100
1100
  ]
1101
1101
  }
1102
1102
  )