@innspel/react-native 0.5.0 → 0.5.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/index.cjs CHANGED
@@ -718,229 +718,240 @@ function Felt({
718
718
  return verdi2 && !fjernedeFelter.includes(felt) ? { felt, etikett, verdi: verdi2 } : null;
719
719
  }).filter((x) => x !== null);
720
720
  }, [kontekst, fjernedeFelter]);
721
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native3.View, { style: { flex: 1, gap: tema.space.md }, children: [
722
- lenketTil ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
723
- import_react_native3.View,
721
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native3.View, { testID: "skjema", style: { flexGrow: 1, flexShrink: 1, gap: tema.space.md }, children: [
722
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
723
+ import_react_native3.ScrollView,
724
724
  {
725
- style: {
726
- flexDirection: "row",
727
- alignItems: "center",
728
- gap: tema.space.sm,
729
- minHeight: tema.touch,
730
- borderWidth: tema.hairline,
731
- borderColor: tema.color.borderInteractive,
732
- borderRadius: tema.radius.pill,
733
- paddingLeft: tema.space.md,
734
- paddingRight: tema.space.xs
735
- },
725
+ testID: "skjema-kropp",
726
+ style: { flexGrow: 0, flexShrink: 1 },
727
+ contentContainerStyle: { gap: tema.space.md },
728
+ keyboardShouldPersistTaps: "handled",
736
729
  children: [
737
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.Text, { style: { flex: 1, color: tema.color.textPrimary, fontSize: tema.font.small }, children: tekst.lenketTil(lenketTil.title) }),
738
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
739
- import_react_native3.Pressable,
730
+ lenketTil ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
731
+ import_react_native3.View,
740
732
  {
741
- testID: "fjern-lenke",
742
- accessibilityRole: "button",
743
- accessibilityLabel: tekst.fjernLenke,
744
- onPress: onFjernLenke,
745
- style: { minWidth: tema.touch, minHeight: tema.touch, alignItems: "center", justifyContent: "center" },
746
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.Text, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: "\u2715" })
733
+ style: {
734
+ flexDirection: "row",
735
+ alignItems: "center",
736
+ gap: tema.space.sm,
737
+ minHeight: tema.touch,
738
+ borderWidth: tema.hairline,
739
+ borderColor: tema.color.borderInteractive,
740
+ borderRadius: tema.radius.pill,
741
+ paddingLeft: tema.space.md,
742
+ paddingRight: tema.space.xs
743
+ },
744
+ children: [
745
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.Text, { style: { flex: 1, color: tema.color.textPrimary, fontSize: tema.font.small }, children: tekst.lenketTil(lenketTil.title) }),
746
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
747
+ import_react_native3.Pressable,
748
+ {
749
+ testID: "fjern-lenke",
750
+ accessibilityRole: "button",
751
+ accessibilityLabel: tekst.fjernLenke,
752
+ onPress: onFjernLenke,
753
+ style: { minWidth: tema.touch, minHeight: tema.touch, alignItems: "center", justifyContent: "center" },
754
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.Text, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: "\u2715" })
755
+ }
756
+ )
757
+ ]
747
758
  }
748
- )
749
- ]
750
- }
751
- ) : null,
752
- uavklart ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
753
- import_react_native3.View,
754
- {
755
- style: {
756
- gap: tema.space.sm,
757
- backgroundColor: tema.color.warningBg,
758
- borderRadius: tema.radius.md,
759
- padding: tema.space.md
760
- },
761
- children: [
759
+ ) : null,
760
+ uavklart ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
761
+ import_react_native3.View,
762
+ {
763
+ style: {
764
+ gap: tema.space.sm,
765
+ backgroundColor: tema.color.warningBg,
766
+ borderRadius: tema.radius.md,
767
+ padding: tema.space.md
768
+ },
769
+ children: [
770
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
771
+ import_react_native3.Text,
772
+ {
773
+ accessibilityRole: "alert",
774
+ accessibilityLiveRegion: "polite",
775
+ style: {
776
+ color: tema.color.warning,
777
+ fontSize: tema.font.small,
778
+ lineHeight: tema.lineHeight.small,
779
+ fontWeight: tema.weight.medium
780
+ },
781
+ children: tekst.monsterSpm[uavklart.kind]
782
+ }
783
+ ),
784
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native3.View, { style: { flexDirection: "row", gap: tema.space.sm }, children: [
785
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
786
+ Btn,
787
+ {
788
+ grow: true,
789
+ variant: "secondary",
790
+ testID: "monster-fjern",
791
+ label: tekst.monsterFjern,
792
+ onPress: () => onEndre(verdi.slice(0, uavklart.start) + verdi.slice(uavklart.end))
793
+ }
794
+ ),
795
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
796
+ Btn,
797
+ {
798
+ grow: true,
799
+ variant: "ghost",
800
+ testID: "monster-behold",
801
+ label: tekst.monsterBehold,
802
+ onPress: () => setBeholdt((b) => [...b, uavklart.match])
803
+ }
804
+ )
805
+ ] }),
806
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Hint, { children: tekst.monsterForklaring })
807
+ ]
808
+ }
809
+ ) : null,
810
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(H, { children: spor === "onske" ? tekst.feltLabelOnske : tekst.feltLabelFeil }),
762
811
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
812
+ import_react_native3.TextInput,
813
+ {
814
+ testID: "innspill-tekst",
815
+ accessibilityLabel: spor === "onske" ? tekst.feltLabelOnske : tekst.feltLabelFeil,
816
+ value: verdi,
817
+ onChangeText: onEndre,
818
+ maxLength: textMaxLength,
819
+ multiline: true,
820
+ numberOfLines: 4,
821
+ placeholder: spor === "onske" ? tekst.placeholderOnske : tekst.placeholderFeil,
822
+ placeholderTextColor: tema.color.textMuted,
823
+ style: {
824
+ backgroundColor: tema.color.surfaceRaised,
825
+ borderWidth: tema.hairline,
826
+ borderColor: full ? tema.color.warning : tema.color.borderStrong,
827
+ borderRadius: tema.radius.md,
828
+ padding: tema.space.md,
829
+ color: tema.color.textPrimary,
830
+ fontSize: tema.font.body,
831
+ lineHeight: tema.lineHeight.body,
832
+ minHeight: tema.touch * 2,
833
+ textAlignVertical: "top"
834
+ }
835
+ }
836
+ ),
837
+ visTeller ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
763
838
  import_react_native3.Text,
764
839
  {
765
- accessibilityRole: "alert",
766
- accessibilityLiveRegion: "polite",
840
+ testID: "teller",
841
+ accessibilityLiveRegion: full ? "assertive" : "polite",
767
842
  style: {
768
- color: tema.color.warning,
769
- fontSize: tema.font.small,
770
- lineHeight: tema.lineHeight.small,
771
- fontWeight: tema.weight.medium
843
+ alignSelf: "flex-end",
844
+ color: full ? tema.color.warning : tema.color.textMuted,
845
+ fontSize: tema.font.small
772
846
  },
773
- children: tekst.monsterSpm[uavklart.kind]
847
+ children: [
848
+ brukt,
849
+ " / ",
850
+ textMaxLength,
851
+ full ? tekst.tellerFull : ""
852
+ ]
774
853
  }
775
- ),
776
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native3.View, { style: { flexDirection: "row", gap: tema.space.sm }, children: [
854
+ ) : null,
855
+ harVedlegg ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
856
+ import_react_native3.View,
857
+ {
858
+ testID: "vedlegg-chip",
859
+ style: {
860
+ flexDirection: "row",
861
+ alignItems: "center",
862
+ gap: tema.space.sm,
863
+ minHeight: tema.touch,
864
+ borderWidth: tema.hairline,
865
+ borderColor: tema.color.borderInteractive,
866
+ borderRadius: tema.radius.pill,
867
+ paddingLeft: tema.space.md,
868
+ paddingRight: tema.space.xs
869
+ },
870
+ children: [
871
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.Text, { accessibilityElementsHidden: true, importantForAccessibility: "no", style: { fontSize: tema.font.small }, children: "\u{1F4F7}" }),
872
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.Text, { style: { flex: 1, color: tema.color.textPrimary, fontSize: tema.font.small }, children: tekst.skjermbildeLagtVed }),
873
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
874
+ import_react_native3.Pressable,
875
+ {
876
+ testID: "fjern-vedlegg",
877
+ accessibilityRole: "button",
878
+ accessibilityLabel: tekst.fjernSkjermbilde,
879
+ onPress: onFjernVedlegg,
880
+ style: { minWidth: tema.touch, minHeight: tema.touch, alignItems: "center", justifyContent: "center" },
881
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.Text, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: "\u2715" })
882
+ }
883
+ )
884
+ ]
885
+ }
886
+ ) : onSkjermbilde ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
887
+ Btn,
888
+ {
889
+ variant: "secondary",
890
+ testID: "legg-ved-skjermbilde",
891
+ ikon: "\u{1F4F7}",
892
+ label: tekst.leggVedSkjermbilde,
893
+ hint: tekst.leggVedHint,
894
+ onPress: onSkjermbilde
895
+ }
896
+ ) : null,
897
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native3.View, { style: { borderTopWidth: tema.hairline, borderTopColor: tema.color.border, paddingTop: tema.space.sm }, children: [
777
898
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
778
- Btn,
899
+ import_react_native3.Pressable,
779
900
  {
780
- grow: true,
781
- variant: "secondary",
782
- testID: "monster-fjern",
783
- label: tekst.monsterFjern,
784
- onPress: () => onEndre(verdi.slice(0, uavklart.start) + verdi.slice(uavklart.end))
901
+ testID: "kontekst-bryter",
902
+ accessibilityRole: "button",
903
+ accessibilityState: { expanded: apen },
904
+ accessibilityLabel: `${tekst.kontekstLinje}${apen ? "" : tekst.kontekstVis}`,
905
+ onPress: () => setApen((a) => !a),
906
+ style: { minHeight: tema.touch, justifyContent: "center" },
907
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native3.Text, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: [
908
+ apen ? "\u25B4" : "\u25BE",
909
+ " ",
910
+ tekst.kontekstLinje,
911
+ apen ? "" : tekst.kontekstVis
912
+ ] })
785
913
  }
786
914
  ),
787
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
788
- Btn,
789
- {
790
- grow: true,
791
- variant: "ghost",
792
- testID: "monster-behold",
793
- label: tekst.monsterBehold,
794
- onPress: () => setBeholdt((b) => [...b, uavklart.match])
795
- }
796
- )
797
- ] }),
798
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Hint, { children: tekst.monsterForklaring })
915
+ apen ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native3.View, { children: [
916
+ linjer.map((l) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
917
+ import_react_native3.View,
918
+ {
919
+ style: {
920
+ flexDirection: "row",
921
+ alignItems: "center",
922
+ gap: tema.space.sm,
923
+ minHeight: tema.touch,
924
+ borderBottomWidth: tema.hairline,
925
+ borderBottomColor: tema.color.border
926
+ },
927
+ children: [
928
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.Text, { style: { color: tema.color.textMuted, fontSize: tema.font.small, minWidth: tema.touch * 2 }, children: l.etikett }),
929
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.Text, { style: { flex: 1, color: tema.color.textPrimary, fontSize: tema.font.small }, children: l.verdi }),
930
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
931
+ import_react_native3.Pressable,
932
+ {
933
+ testID: `fjern-${l.felt}`,
934
+ accessibilityRole: "button",
935
+ accessibilityLabel: `${tekst.kontekstFjern} ${l.etikett.toLowerCase()} fra innsendingen`,
936
+ onPress: () => onFjernKontekst(l.felt),
937
+ style: { minWidth: tema.touch, minHeight: tema.touch, alignItems: "center", justifyContent: "center" },
938
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native3.Text, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: [
939
+ "\u2715 ",
940
+ tekst.kontekstFjern
941
+ ] })
942
+ }
943
+ )
944
+ ]
945
+ },
946
+ l.felt
947
+ )),
948
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.View, { style: { paddingTop: tema.space.sm }, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Hint, { children: tekst.kontekstAldri }) })
949
+ ] }) : null
950
+ ] })
799
951
  ]
800
952
  }
801
- ) : null,
802
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(H, { children: spor === "onske" ? tekst.feltLabelOnske : tekst.feltLabelFeil }),
803
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
804
- import_react_native3.TextInput,
805
- {
806
- testID: "innspill-tekst",
807
- accessibilityLabel: spor === "onske" ? tekst.feltLabelOnske : tekst.feltLabelFeil,
808
- value: verdi,
809
- onChangeText: onEndre,
810
- maxLength: textMaxLength,
811
- multiline: true,
812
- numberOfLines: 4,
813
- placeholder: spor === "onske" ? tekst.placeholderOnske : tekst.placeholderFeil,
814
- placeholderTextColor: tema.color.textMuted,
815
- style: {
816
- backgroundColor: tema.color.surfaceRaised,
817
- borderWidth: tema.hairline,
818
- borderColor: full ? tema.color.warning : tema.color.borderStrong,
819
- borderRadius: tema.radius.md,
820
- padding: tema.space.md,
821
- color: tema.color.textPrimary,
822
- fontSize: tema.font.body,
823
- lineHeight: tema.lineHeight.body,
824
- minHeight: tema.touch * 2,
825
- textAlignVertical: "top"
826
- }
827
- }
828
953
  ),
829
- visTeller ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
830
- import_react_native3.Text,
831
- {
832
- testID: "teller",
833
- accessibilityLiveRegion: full ? "assertive" : "polite",
834
- style: {
835
- alignSelf: "flex-end",
836
- color: full ? tema.color.warning : tema.color.textMuted,
837
- fontSize: tema.font.small
838
- },
839
- children: [
840
- brukt,
841
- " / ",
842
- textMaxLength,
843
- full ? tekst.tellerFull : ""
844
- ]
845
- }
846
- ) : null,
847
- harVedlegg ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
848
- import_react_native3.View,
849
- {
850
- testID: "vedlegg-chip",
851
- style: {
852
- flexDirection: "row",
853
- alignItems: "center",
854
- gap: tema.space.sm,
855
- minHeight: tema.touch,
856
- borderWidth: tema.hairline,
857
- borderColor: tema.color.borderInteractive,
858
- borderRadius: tema.radius.pill,
859
- paddingLeft: tema.space.md,
860
- paddingRight: tema.space.xs
861
- },
862
- children: [
863
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.Text, { accessibilityElementsHidden: true, importantForAccessibility: "no", style: { fontSize: tema.font.small }, children: "\u{1F4F7}" }),
864
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.Text, { style: { flex: 1, color: tema.color.textPrimary, fontSize: tema.font.small }, children: tekst.skjermbildeLagtVed }),
865
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
866
- import_react_native3.Pressable,
867
- {
868
- testID: "fjern-vedlegg",
869
- accessibilityRole: "button",
870
- accessibilityLabel: tekst.fjernSkjermbilde,
871
- onPress: onFjernVedlegg,
872
- style: { minWidth: tema.touch, minHeight: tema.touch, alignItems: "center", justifyContent: "center" },
873
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.Text, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: "\u2715" })
874
- }
875
- )
876
- ]
877
- }
878
- ) : onSkjermbilde ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
879
- Btn,
880
- {
881
- variant: "secondary",
882
- testID: "legg-ved-skjermbilde",
883
- ikon: "\u{1F4F7}",
884
- label: tekst.leggVedSkjermbilde,
885
- hint: tekst.leggVedHint,
886
- onPress: onSkjermbilde
887
- }
888
- ) : null,
889
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native3.View, { style: { borderTopWidth: tema.hairline, borderTopColor: tema.color.border, paddingTop: tema.space.sm }, children: [
890
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
891
- import_react_native3.Pressable,
892
- {
893
- testID: "kontekst-bryter",
894
- accessibilityRole: "button",
895
- accessibilityState: { expanded: apen },
896
- accessibilityLabel: `${tekst.kontekstLinje}${apen ? "" : tekst.kontekstVis}`,
897
- onPress: () => setApen((a) => !a),
898
- style: { minHeight: tema.touch, justifyContent: "center" },
899
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native3.Text, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: [
900
- apen ? "\u25B4" : "\u25BE",
901
- " ",
902
- tekst.kontekstLinje,
903
- apen ? "" : tekst.kontekstVis
904
- ] })
905
- }
906
- ),
907
- apen ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native3.View, { children: [
908
- linjer.map((l) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
909
- import_react_native3.View,
910
- {
911
- style: {
912
- flexDirection: "row",
913
- alignItems: "center",
914
- gap: tema.space.sm,
915
- minHeight: tema.touch,
916
- borderBottomWidth: tema.hairline,
917
- borderBottomColor: tema.color.border
918
- },
919
- children: [
920
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.Text, { style: { color: tema.color.textMuted, fontSize: tema.font.small, minWidth: tema.touch * 2 }, children: l.etikett }),
921
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.Text, { style: { flex: 1, color: tema.color.textPrimary, fontSize: tema.font.small }, children: l.verdi }),
922
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
923
- import_react_native3.Pressable,
924
- {
925
- testID: `fjern-${l.felt}`,
926
- accessibilityRole: "button",
927
- accessibilityLabel: `${tekst.kontekstFjern} ${l.etikett.toLowerCase()} fra innsendingen`,
928
- onPress: () => onFjernKontekst(l.felt),
929
- style: { minWidth: tema.touch, minHeight: tema.touch, alignItems: "center", justifyContent: "center" },
930
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native3.Text, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: [
931
- "\u2715 ",
932
- tekst.kontekstFjern
933
- ] })
934
- }
935
- )
936
- ]
937
- },
938
- l.felt
939
- )),
940
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.View, { style: { paddingTop: tema.space.sm }, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Hint, { children: tekst.kontekstAldri }) })
941
- ] }) : null
942
- ] }),
943
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.View, { style: { flex: 1, justifyContent: "flex-end" }, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
954
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.View, { testID: "skjema-fot", style: { flexGrow: 1, flexShrink: 0, justifyContent: "flex-end" }, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
944
955
  Btn,
945
956
  {
946
957
  testID: "send",
@@ -1024,73 +1035,82 @@ function KjenteFeil({
1024
1035
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native5.ActivityIndicator, { accessibilityLabel: "Sjekker kjente feil", color: tema.color.textSecondary })
1025
1036
  ] });
1026
1037
  }
1027
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native5.View, { style: { flex: 1, gap: tema.space.md }, children: [
1038
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native5.View, { testID: "kjente-feil", style: { flexGrow: 1, flexShrink: 1, gap: tema.space.md }, children: [
1028
1039
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(H, { sub: spor === "onske" ? tekst.kjenteFeilUnderOnske : tekst.kjenteFeilUnderFeil, children: spor === "onske" ? tekst.kjenteFeilTittelOnske : tekst.kjenteFeilTittelFeil }),
1029
- kort.map((k) => {
1030
- const versjon = k.fixedIn ? k.status === "fikset" ? tekst.rettetI(k.fixedIn) : tekst.rettesI(k.fixedIn) : void 0;
1031
- const kontekst = versjon ? `${k.title}. ${versjon}` : k.title;
1032
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Card, { children: [
1033
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1034
- import_react_native5.Text,
1035
- {
1036
- style: {
1037
- color: tema.color.textPrimary,
1038
- fontSize: tema.font.body,
1039
- lineHeight: tema.lineHeight.body,
1040
- fontWeight: tema.weight.medium
1041
- },
1042
- children: k.title
1043
- }
1044
- ),
1045
- k.workaround ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1046
- import_react_native5.Text,
1047
- {
1048
- style: {
1049
- color: tema.color.textSecondary,
1050
- fontSize: tema.font.small,
1051
- lineHeight: tema.lineHeight.small
1052
- },
1053
- children: [
1054
- tekst.omvei,
1055
- " ",
1056
- k.workaround
1057
- ]
1058
- }
1059
- ) : null,
1060
- versjon ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1061
- StatusPill,
1062
- {
1063
- ikon: k.status === "fikset" ? "\u2713" : "\u{1F527}",
1064
- etikett: versjon,
1065
- farge: k.status === "fikset" ? "success" : "info"
1066
- }
1067
- ) : null,
1068
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native5.View, { style: { flexDirection: "row", gap: tema.space.sm }, children: [
1069
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1070
- Btn,
1071
- {
1072
- grow: true,
1073
- testID: `ja-ogsa-${k.id}`,
1074
- label: tekst.svarJa,
1075
- accessibilityLabel: `${tekst.svarJa}. ${kontekst}`,
1076
- onPress: () => onJaOgsa(k)
1077
- }
1078
- ),
1079
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1080
- Btn,
1081
- {
1082
- grow: true,
1083
- variant: "secondary",
1084
- testID: `ligner-${k.id}`,
1085
- label: tekst.svarLigner,
1086
- accessibilityLabel: `${tekst.svarLigner}. ${kontekst}`,
1087
- onPress: () => onLigner(k)
1088
- }
1089
- )
1090
- ] })
1091
- ] }, k.id);
1092
- }),
1093
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Btn, { variant: "secondary", testID: "nei-noe-annet", label: tekst.svarNei, onPress: onNei })
1040
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1041
+ import_react_native5.ScrollView,
1042
+ {
1043
+ testID: "kjente-feil-liste",
1044
+ style: { flexGrow: 0, flexShrink: 1 },
1045
+ contentContainerStyle: { gap: tema.space.md },
1046
+ keyboardShouldPersistTaps: "handled",
1047
+ children: kort.map((k) => {
1048
+ const versjon = k.fixedIn ? k.status === "fikset" ? tekst.rettetI(k.fixedIn) : tekst.rettesI(k.fixedIn) : void 0;
1049
+ const kontekst = versjon ? `${k.title}. ${versjon}` : k.title;
1050
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Card, { children: [
1051
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1052
+ import_react_native5.Text,
1053
+ {
1054
+ style: {
1055
+ color: tema.color.textPrimary,
1056
+ fontSize: tema.font.body,
1057
+ lineHeight: tema.lineHeight.body,
1058
+ fontWeight: tema.weight.medium
1059
+ },
1060
+ children: k.title
1061
+ }
1062
+ ),
1063
+ k.workaround ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1064
+ import_react_native5.Text,
1065
+ {
1066
+ style: {
1067
+ color: tema.color.textSecondary,
1068
+ fontSize: tema.font.small,
1069
+ lineHeight: tema.lineHeight.small
1070
+ },
1071
+ children: [
1072
+ tekst.omvei,
1073
+ " ",
1074
+ k.workaround
1075
+ ]
1076
+ }
1077
+ ) : null,
1078
+ versjon ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1079
+ StatusPill,
1080
+ {
1081
+ ikon: k.status === "fikset" ? "\u2713" : "\u{1F527}",
1082
+ etikett: versjon,
1083
+ farge: k.status === "fikset" ? "success" : "info"
1084
+ }
1085
+ ) : null,
1086
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native5.View, { style: { flexDirection: "row", gap: tema.space.sm }, children: [
1087
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1088
+ Btn,
1089
+ {
1090
+ grow: true,
1091
+ testID: `ja-ogsa-${k.id}`,
1092
+ label: tekst.svarJa,
1093
+ accessibilityLabel: `${tekst.svarJa}. ${kontekst}`,
1094
+ onPress: () => onJaOgsa(k)
1095
+ }
1096
+ ),
1097
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1098
+ Btn,
1099
+ {
1100
+ grow: true,
1101
+ variant: "secondary",
1102
+ testID: `ligner-${k.id}`,
1103
+ label: tekst.svarLigner,
1104
+ accessibilityLabel: `${tekst.svarLigner}. ${kontekst}`,
1105
+ onPress: () => onLigner(k)
1106
+ }
1107
+ )
1108
+ ] })
1109
+ ] }, k.id);
1110
+ })
1111
+ }
1112
+ ),
1113
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native5.View, { testID: "kjente-feil-fot", style: { flexShrink: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Btn, { variant: "secondary", testID: "nei-noe-annet", label: tekst.svarNei, onPress: onNei }) })
1094
1114
  ] });
1095
1115
  }
1096
1116