optimized-react-component-library-xyz123 1.1.24 → 1.1.26

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
@@ -1,4 +1,4 @@
1
- import React$1, { FC } from 'react';
1
+ import React$1, { ComponentType, SVGProps, FC, ElementType, RefObject, ReactNode } from 'react';
2
2
  import * as reselect from 'reselect';
3
3
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
4
4
  import { PayloadAction, ActionReducerMapBuilder } from '@reduxjs/toolkit';
@@ -46,7 +46,11 @@ interface IOption {
46
46
  interface IPTSLink {
47
47
  title: string;
48
48
  url: string;
49
- ariaLabel: string;
49
+ ariaLabel?: string;
50
+ activatedLanguage?: string;
51
+ openTarget?: string;
52
+ icon?: ComponentType<SVGProps<SVGSVGElement>>;
53
+ iconType?: string;
50
54
  }
51
55
  interface IStepObject {
52
56
  step: number;
@@ -137,6 +141,14 @@ interface IAppSettings {
137
141
  appUsesNavigation: boolean;
138
142
  appCookies?: IAppSettingsCookies;
139
143
  }
144
+ type INavigationItem = {
145
+ label: {
146
+ sv: string;
147
+ en: string;
148
+ };
149
+ href: string;
150
+ children?: INavigationItem[];
151
+ };
140
152
 
141
153
  interface RadioProps {
142
154
  question: IQuestion;
@@ -205,15 +217,6 @@ interface SingleCheckboxProps {
205
217
 
206
218
  declare const SingleCheckbox: FC<SingleCheckboxProps>;
207
219
 
208
- interface InfoOnlyProps {
209
- question: IQuestion;
210
- handleQuestionInputChange: any;
211
- showPreview?: boolean;
212
- activatedLanguage?: string;
213
- }
214
-
215
- declare const InputInfoOnly: FC<InfoOnlyProps>;
216
-
217
220
  /**
218
221
  * Kontrollerar om en fråga har ett valideringsfel baserat på dess egenskaper och valideringstyper.
219
222
  *
@@ -788,6 +791,56 @@ interface HeaderProps {
788
791
 
789
792
  declare const Header: FC<HeaderProps>;
790
793
 
794
+ interface NavigationHeaderProps {
795
+ SetActivatedLanguage?: (language: string) => void;
796
+ headline?: string;
797
+ homelink?: string;
798
+ activatedLanguage?: string;
799
+ useLanguage?: boolean;
800
+ useNavigationMenu: boolean;
801
+ useSearch?: boolean;
802
+ useBreadCrumbs?: boolean;
803
+ showNavigationCloseButton?: boolean;
804
+ menuLinks: INavigationItem[];
805
+ linkComponent?: ElementType;
806
+ noLogoLink?: boolean;
807
+ }
808
+
809
+ declare const NavigationHeader: FC<NavigationHeaderProps>;
810
+
811
+ interface NavigationProps {
812
+ setIsMenyOpen?: (open: boolean) => void;
813
+ showCloseButton?: boolean;
814
+ activatedLanguage?: string;
815
+ menuLinks?: INavigationLink[];
816
+ isOpen: boolean;
817
+ openButtonRef: RefObject<HTMLButtonElement | null>;
818
+ linkComponent?: ElementType;
819
+ }
820
+ type Locale = 'sv' | 'en';
821
+ type Label = Record<Locale, string>;
822
+ interface INavigationLink {
823
+ label: Label;
824
+ href: string;
825
+ children?: INavigationLink[];
826
+ openInNewWindow?: boolean;
827
+ }
828
+
829
+ declare const Navigation: FC<NavigationProps>;
830
+
831
+ interface BreadCrumbsProps {
832
+ activatedLanguage: string;
833
+ onLinkClick?: (e: React.MouseEvent) => void;
834
+ }
835
+
836
+ declare const BreadCrumbs: FC<BreadCrumbsProps>;
837
+
838
+ interface SearchBarProps {
839
+ activatedLanguage: string;
840
+ }
841
+
842
+ declare const SearchBar: FC<SearchBarProps>;
843
+
791
844
  interface ModalProps {
792
845
  showModal: boolean;
793
846
  activatedLanguage?: string;
@@ -800,6 +853,36 @@ type SkipLinkProps = {
800
853
  };
801
854
  declare const SkipLink: FC<SkipLinkProps>;
802
855
 
856
+ interface LinkProps extends IPTSLink {
857
+ customClass?: string;
858
+ openTarget?: string;
859
+ useDownLoad?: boolean;
860
+ linkComponent?: ElementType;
861
+ }
862
+
863
+ declare const LinkStandard: FC<LinkProps>;
864
+
865
+ interface LinkListProps {
866
+ linkArray: IPTSLink[];
867
+ activatedLanguage?: string;
868
+ customCss?: string;
869
+ linkComponent?: ElementType;
870
+ }
871
+
872
+ declare const LinkList: FC<LinkListProps>;
873
+
874
+ interface CollapseProps {
875
+ title: ReactNode;
876
+ children: ReactNode;
877
+ isOpen?: boolean;
878
+ defaultOpen?: boolean;
879
+ onToggle?: (open: boolean) => void;
880
+ id?: string;
881
+ activatedLanguage?: string;
882
+ }
883
+
884
+ declare const Collapse: FC<CollapseProps>;
885
+
803
886
  interface PrincipleOfPublicityProps {
804
887
  activatedLanguage?: string;
805
888
  }
@@ -906,4 +989,4 @@ interface FormStatusMessagesProps {
906
989
  */
907
990
  declare const FormStatusMessagesScreenReader: React$1.FC<FormStatusMessagesProps>;
908
991
 
909
- export { AddFiles as AddFilesStandard, CheckboxGroup as CheckboxGroupStandard, CookieBanner, type CookieConsentConfig, EditPreviewLink as EditPreviewLinkStandard, Footer as FooterStandard, FormStatusMessagesScreenReader, Header as HeaderStandard, type IAppSettings, type IAppSettingsCookies, type IApplicationContent, type IFormState, type IOption, type IPTSLink, type IQuestion, type IQuestionExtraAttribute, type IStepObject, type IStepQuestionData, type ITextBlock, InputInfoOnly as InfoOnlyStandard, type LanguageSupportConfig, Modal as ModalStandard, MultipleCheckboxes as MultipleCheckboxesStandard, PrincipleOfPublicity as PrincipleOfPublicityStandard, QuestionGroup, QuestionRenderer, InputRadio as RadioMultipleStandard, SingleCheckbox as SingleCheckboxStandard, SkipLink as SkipLinkStandard, StartApplicationButton, StepperButtons as StepperButtonsStandard, Stepper as StepperStandard, InputTextarea as TextAreaStandard, TextBody, TextFieldStandard, ValidationErrorSummaryList, buildStepCategoryGroupQuestionStructure, createApiDataObject, createCookieConsent, createFormSlice, createGlobalLanguageSlice, createGlobalLanguageSlice as createLanguageSlice, createFormSlice as createQuestionsSlice, findVisibleQuestionsWithValidationErrors, focusElement, getGroupCheckIds, hasQuestionValidationError, isQuestionDependencySatisfied, isScriptLoaded, makeFormSelectors, makeglobalLanguageSelectors as makeLanguageSelectors, makeFormSelectors as makeQuestionsSelectors, makeglobalLanguageSelectors, preparePreviewData, removeScriptById, toggleScriptByConsent, updateQuestionsAndCategoriesVisibilityAndErrors, useCookieConsent, useFormStatusModal, useInputMethodDetection, usePTSPageTitle };
992
+ export { AddFiles as AddFilesStandard, BreadCrumbs, BreadCrumbs as BreadcrumbsAdaptive, CheckboxGroup as CheckboxGroupStandard, Collapse, CookieBanner, type CookieConsentConfig, EditPreviewLink as EditPreviewLinkStandard, Footer as FooterStandard, FormStatusMessagesScreenReader, Header as HeaderStandard, type IAppSettings, type IAppSettingsCookies, type IApplicationContent, type IFormState, type IOption, type IPTSLink, type IQuestion, type IQuestionExtraAttribute, type IStepObject, type IStepQuestionData, type ITextBlock, type LanguageSupportConfig, LinkList as LinkListStandard, LinkStandard, Modal as ModalStandard, MultipleCheckboxes as MultipleCheckboxesStandard, Navigation, NavigationHeader, PrincipleOfPublicity as PrincipleOfPublicityStandard, QuestionGroup, QuestionRenderer, InputRadio as RadioMultipleStandard, SearchBar, SingleCheckbox as SingleCheckboxStandard, SkipLink as SkipLinkStandard, StartApplicationButton, StepperButtons as StepperButtonsStandard, Stepper as StepperStandard, InputTextarea as TextAreaStandard, TextBody, TextFieldStandard, ValidationErrorSummaryList, buildStepCategoryGroupQuestionStructure, createApiDataObject, createCookieConsent, createFormSlice, createGlobalLanguageSlice, createGlobalLanguageSlice as createLanguageSlice, createFormSlice as createQuestionsSlice, findVisibleQuestionsWithValidationErrors, focusElement, getGroupCheckIds, hasQuestionValidationError, isQuestionDependencySatisfied, isScriptLoaded, makeFormSelectors, makeglobalLanguageSelectors as makeLanguageSelectors, makeFormSelectors as makeQuestionsSelectors, makeglobalLanguageSelectors, preparePreviewData, removeScriptById, toggleScriptByConsent, updateQuestionsAndCategoriesVisibilityAndErrors, useCookieConsent, useFormStatusModal, useInputMethodDetection, usePTSPageTitle };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React$1, { FC } from 'react';
1
+ import React$1, { ComponentType, SVGProps, FC, ElementType, RefObject, ReactNode } from 'react';
2
2
  import * as reselect from 'reselect';
3
3
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
4
4
  import { PayloadAction, ActionReducerMapBuilder } from '@reduxjs/toolkit';
@@ -46,7 +46,11 @@ interface IOption {
46
46
  interface IPTSLink {
47
47
  title: string;
48
48
  url: string;
49
- ariaLabel: string;
49
+ ariaLabel?: string;
50
+ activatedLanguage?: string;
51
+ openTarget?: string;
52
+ icon?: ComponentType<SVGProps<SVGSVGElement>>;
53
+ iconType?: string;
50
54
  }
51
55
  interface IStepObject {
52
56
  step: number;
@@ -137,6 +141,14 @@ interface IAppSettings {
137
141
  appUsesNavigation: boolean;
138
142
  appCookies?: IAppSettingsCookies;
139
143
  }
144
+ type INavigationItem = {
145
+ label: {
146
+ sv: string;
147
+ en: string;
148
+ };
149
+ href: string;
150
+ children?: INavigationItem[];
151
+ };
140
152
 
141
153
  interface RadioProps {
142
154
  question: IQuestion;
@@ -205,15 +217,6 @@ interface SingleCheckboxProps {
205
217
 
206
218
  declare const SingleCheckbox: FC<SingleCheckboxProps>;
207
219
 
208
- interface InfoOnlyProps {
209
- question: IQuestion;
210
- handleQuestionInputChange: any;
211
- showPreview?: boolean;
212
- activatedLanguage?: string;
213
- }
214
-
215
- declare const InputInfoOnly: FC<InfoOnlyProps>;
216
-
217
220
  /**
218
221
  * Kontrollerar om en fråga har ett valideringsfel baserat på dess egenskaper och valideringstyper.
219
222
  *
@@ -788,6 +791,56 @@ interface HeaderProps {
788
791
 
789
792
  declare const Header: FC<HeaderProps>;
790
793
 
794
+ interface NavigationHeaderProps {
795
+ SetActivatedLanguage?: (language: string) => void;
796
+ headline?: string;
797
+ homelink?: string;
798
+ activatedLanguage?: string;
799
+ useLanguage?: boolean;
800
+ useNavigationMenu: boolean;
801
+ useSearch?: boolean;
802
+ useBreadCrumbs?: boolean;
803
+ showNavigationCloseButton?: boolean;
804
+ menuLinks: INavigationItem[];
805
+ linkComponent?: ElementType;
806
+ noLogoLink?: boolean;
807
+ }
808
+
809
+ declare const NavigationHeader: FC<NavigationHeaderProps>;
810
+
811
+ interface NavigationProps {
812
+ setIsMenyOpen?: (open: boolean) => void;
813
+ showCloseButton?: boolean;
814
+ activatedLanguage?: string;
815
+ menuLinks?: INavigationLink[];
816
+ isOpen: boolean;
817
+ openButtonRef: RefObject<HTMLButtonElement | null>;
818
+ linkComponent?: ElementType;
819
+ }
820
+ type Locale = 'sv' | 'en';
821
+ type Label = Record<Locale, string>;
822
+ interface INavigationLink {
823
+ label: Label;
824
+ href: string;
825
+ children?: INavigationLink[];
826
+ openInNewWindow?: boolean;
827
+ }
828
+
829
+ declare const Navigation: FC<NavigationProps>;
830
+
831
+ interface BreadCrumbsProps {
832
+ activatedLanguage: string;
833
+ onLinkClick?: (e: React.MouseEvent) => void;
834
+ }
835
+
836
+ declare const BreadCrumbs: FC<BreadCrumbsProps>;
837
+
838
+ interface SearchBarProps {
839
+ activatedLanguage: string;
840
+ }
841
+
842
+ declare const SearchBar: FC<SearchBarProps>;
843
+
791
844
  interface ModalProps {
792
845
  showModal: boolean;
793
846
  activatedLanguage?: string;
@@ -800,6 +853,36 @@ type SkipLinkProps = {
800
853
  };
801
854
  declare const SkipLink: FC<SkipLinkProps>;
802
855
 
856
+ interface LinkProps extends IPTSLink {
857
+ customClass?: string;
858
+ openTarget?: string;
859
+ useDownLoad?: boolean;
860
+ linkComponent?: ElementType;
861
+ }
862
+
863
+ declare const LinkStandard: FC<LinkProps>;
864
+
865
+ interface LinkListProps {
866
+ linkArray: IPTSLink[];
867
+ activatedLanguage?: string;
868
+ customCss?: string;
869
+ linkComponent?: ElementType;
870
+ }
871
+
872
+ declare const LinkList: FC<LinkListProps>;
873
+
874
+ interface CollapseProps {
875
+ title: ReactNode;
876
+ children: ReactNode;
877
+ isOpen?: boolean;
878
+ defaultOpen?: boolean;
879
+ onToggle?: (open: boolean) => void;
880
+ id?: string;
881
+ activatedLanguage?: string;
882
+ }
883
+
884
+ declare const Collapse: FC<CollapseProps>;
885
+
803
886
  interface PrincipleOfPublicityProps {
804
887
  activatedLanguage?: string;
805
888
  }
@@ -906,4 +989,4 @@ interface FormStatusMessagesProps {
906
989
  */
907
990
  declare const FormStatusMessagesScreenReader: React$1.FC<FormStatusMessagesProps>;
908
991
 
909
- export { AddFiles as AddFilesStandard, CheckboxGroup as CheckboxGroupStandard, CookieBanner, type CookieConsentConfig, EditPreviewLink as EditPreviewLinkStandard, Footer as FooterStandard, FormStatusMessagesScreenReader, Header as HeaderStandard, type IAppSettings, type IAppSettingsCookies, type IApplicationContent, type IFormState, type IOption, type IPTSLink, type IQuestion, type IQuestionExtraAttribute, type IStepObject, type IStepQuestionData, type ITextBlock, InputInfoOnly as InfoOnlyStandard, type LanguageSupportConfig, Modal as ModalStandard, MultipleCheckboxes as MultipleCheckboxesStandard, PrincipleOfPublicity as PrincipleOfPublicityStandard, QuestionGroup, QuestionRenderer, InputRadio as RadioMultipleStandard, SingleCheckbox as SingleCheckboxStandard, SkipLink as SkipLinkStandard, StartApplicationButton, StepperButtons as StepperButtonsStandard, Stepper as StepperStandard, InputTextarea as TextAreaStandard, TextBody, TextFieldStandard, ValidationErrorSummaryList, buildStepCategoryGroupQuestionStructure, createApiDataObject, createCookieConsent, createFormSlice, createGlobalLanguageSlice, createGlobalLanguageSlice as createLanguageSlice, createFormSlice as createQuestionsSlice, findVisibleQuestionsWithValidationErrors, focusElement, getGroupCheckIds, hasQuestionValidationError, isQuestionDependencySatisfied, isScriptLoaded, makeFormSelectors, makeglobalLanguageSelectors as makeLanguageSelectors, makeFormSelectors as makeQuestionsSelectors, makeglobalLanguageSelectors, preparePreviewData, removeScriptById, toggleScriptByConsent, updateQuestionsAndCategoriesVisibilityAndErrors, useCookieConsent, useFormStatusModal, useInputMethodDetection, usePTSPageTitle };
992
+ export { AddFiles as AddFilesStandard, BreadCrumbs, BreadCrumbs as BreadcrumbsAdaptive, CheckboxGroup as CheckboxGroupStandard, Collapse, CookieBanner, type CookieConsentConfig, EditPreviewLink as EditPreviewLinkStandard, Footer as FooterStandard, FormStatusMessagesScreenReader, Header as HeaderStandard, type IAppSettings, type IAppSettingsCookies, type IApplicationContent, type IFormState, type IOption, type IPTSLink, type IQuestion, type IQuestionExtraAttribute, type IStepObject, type IStepQuestionData, type ITextBlock, type LanguageSupportConfig, LinkList as LinkListStandard, LinkStandard, Modal as ModalStandard, MultipleCheckboxes as MultipleCheckboxesStandard, Navigation, NavigationHeader, PrincipleOfPublicity as PrincipleOfPublicityStandard, QuestionGroup, QuestionRenderer, InputRadio as RadioMultipleStandard, SearchBar, SingleCheckbox as SingleCheckboxStandard, SkipLink as SkipLinkStandard, StartApplicationButton, StepperButtons as StepperButtonsStandard, Stepper as StepperStandard, InputTextarea as TextAreaStandard, TextBody, TextFieldStandard, ValidationErrorSummaryList, buildStepCategoryGroupQuestionStructure, createApiDataObject, createCookieConsent, createFormSlice, createGlobalLanguageSlice, createGlobalLanguageSlice as createLanguageSlice, createFormSlice as createQuestionsSlice, findVisibleQuestionsWithValidationErrors, focusElement, getGroupCheckIds, hasQuestionValidationError, isQuestionDependencySatisfied, isScriptLoaded, makeFormSelectors, makeglobalLanguageSelectors as makeLanguageSelectors, makeFormSelectors as makeQuestionsSelectors, makeglobalLanguageSelectors, preparePreviewData, removeScriptById, toggleScriptByConsent, updateQuestionsAndCategoriesVisibilityAndErrors, useCookieConsent, useFormStatusModal, useInputMethodDetection, usePTSPageTitle };