optimized-react-component-library-xyz123 2.3.1 → 2.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/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;
@@ -139,6 +143,14 @@ interface IAppSettings {
139
143
  appUsesPreview?: boolean;
140
144
  appUsesAsterisk?: boolean;
141
145
  }
146
+ type INavigationItem = {
147
+ label: {
148
+ sv: string;
149
+ en: string;
150
+ };
151
+ href: string;
152
+ children?: INavigationItem[];
153
+ };
142
154
 
143
155
  interface RadioProps {
144
156
  question: IQuestion;
@@ -781,6 +793,46 @@ interface HeaderProps {
781
793
 
782
794
  declare const Header: FC<HeaderProps>;
783
795
 
796
+ interface NavigationHeaderProps {
797
+ SetActivatedLanguage?: (language: string) => void;
798
+ headline?: string;
799
+ homelink?: string;
800
+ activatedLanguage?: string;
801
+ useLanguage?: boolean;
802
+ useNavigationMenu: boolean;
803
+ useSearch?: 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
+ activatedLanguage?: string;
814
+ menuLinks?: INavigationLink[];
815
+ isOpen: boolean;
816
+ openButtonRef: RefObject<HTMLButtonElement | null>;
817
+ linkComponent?: ElementType;
818
+ }
819
+ type Locale = 'sv' | 'en';
820
+ type Label = Record<Locale, string>;
821
+ interface INavigationLink {
822
+ label: Label;
823
+ href: string;
824
+ children?: INavigationLink[];
825
+ openInNewWindow?: boolean;
826
+ }
827
+
828
+ declare const Navigation: FC<NavigationProps>;
829
+
830
+ interface SearchBarProps {
831
+ activatedLanguage: string;
832
+ }
833
+
834
+ declare const SearchBar: FC<SearchBarProps>;
835
+
784
836
  interface ModalProps {
785
837
  showModal: boolean;
786
838
  activatedLanguage?: string;
@@ -793,6 +845,37 @@ type SkipLinkProps = {
793
845
  };
794
846
  declare const SkipLink: FC<SkipLinkProps>;
795
847
 
848
+ interface LinkProps extends IPTSLink {
849
+ customClass?: string;
850
+ openTarget?: string;
851
+ useDownLoad?: boolean;
852
+ linkComponent?: ElementType;
853
+ }
854
+
855
+ declare const LinkStandard: FC<LinkProps>;
856
+
857
+ interface LinkListProps {
858
+ linkArray: IPTSLink[];
859
+ activatedLanguage?: string;
860
+ customCss?: string;
861
+ linkComponent?: ElementType;
862
+ }
863
+
864
+ declare const LinkList: FC<LinkListProps>;
865
+
866
+ interface CollapseProps {
867
+ title: ReactNode;
868
+ children: ReactNode;
869
+ isOpen?: boolean;
870
+ defaultOpen?: boolean;
871
+ onToggle?: (open: boolean) => void;
872
+ id?: string;
873
+ activatedLanguage?: string;
874
+ customClass?: string;
875
+ }
876
+
877
+ declare const Collapse: FC<CollapseProps>;
878
+
796
879
  interface PrincipleOfPublicityProps {
797
880
  activatedLanguage?: string;
798
881
  }
@@ -899,4 +982,4 @@ interface FormStatusMessagesProps {
899
982
  */
900
983
  declare const FormStatusMessagesScreenReader: React$1.FC<FormStatusMessagesProps>;
901
984
 
902
- 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, 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 };
985
+ export { AddFiles as AddFilesStandard, 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;
@@ -139,6 +143,14 @@ interface IAppSettings {
139
143
  appUsesPreview?: boolean;
140
144
  appUsesAsterisk?: boolean;
141
145
  }
146
+ type INavigationItem = {
147
+ label: {
148
+ sv: string;
149
+ en: string;
150
+ };
151
+ href: string;
152
+ children?: INavigationItem[];
153
+ };
142
154
 
143
155
  interface RadioProps {
144
156
  question: IQuestion;
@@ -781,6 +793,46 @@ interface HeaderProps {
781
793
 
782
794
  declare const Header: FC<HeaderProps>;
783
795
 
796
+ interface NavigationHeaderProps {
797
+ SetActivatedLanguage?: (language: string) => void;
798
+ headline?: string;
799
+ homelink?: string;
800
+ activatedLanguage?: string;
801
+ useLanguage?: boolean;
802
+ useNavigationMenu: boolean;
803
+ useSearch?: 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
+ activatedLanguage?: string;
814
+ menuLinks?: INavigationLink[];
815
+ isOpen: boolean;
816
+ openButtonRef: RefObject<HTMLButtonElement | null>;
817
+ linkComponent?: ElementType;
818
+ }
819
+ type Locale = 'sv' | 'en';
820
+ type Label = Record<Locale, string>;
821
+ interface INavigationLink {
822
+ label: Label;
823
+ href: string;
824
+ children?: INavigationLink[];
825
+ openInNewWindow?: boolean;
826
+ }
827
+
828
+ declare const Navigation: FC<NavigationProps>;
829
+
830
+ interface SearchBarProps {
831
+ activatedLanguage: string;
832
+ }
833
+
834
+ declare const SearchBar: FC<SearchBarProps>;
835
+
784
836
  interface ModalProps {
785
837
  showModal: boolean;
786
838
  activatedLanguage?: string;
@@ -793,6 +845,37 @@ type SkipLinkProps = {
793
845
  };
794
846
  declare const SkipLink: FC<SkipLinkProps>;
795
847
 
848
+ interface LinkProps extends IPTSLink {
849
+ customClass?: string;
850
+ openTarget?: string;
851
+ useDownLoad?: boolean;
852
+ linkComponent?: ElementType;
853
+ }
854
+
855
+ declare const LinkStandard: FC<LinkProps>;
856
+
857
+ interface LinkListProps {
858
+ linkArray: IPTSLink[];
859
+ activatedLanguage?: string;
860
+ customCss?: string;
861
+ linkComponent?: ElementType;
862
+ }
863
+
864
+ declare const LinkList: FC<LinkListProps>;
865
+
866
+ interface CollapseProps {
867
+ title: ReactNode;
868
+ children: ReactNode;
869
+ isOpen?: boolean;
870
+ defaultOpen?: boolean;
871
+ onToggle?: (open: boolean) => void;
872
+ id?: string;
873
+ activatedLanguage?: string;
874
+ customClass?: string;
875
+ }
876
+
877
+ declare const Collapse: FC<CollapseProps>;
878
+
796
879
  interface PrincipleOfPublicityProps {
797
880
  activatedLanguage?: string;
798
881
  }
@@ -899,4 +982,4 @@ interface FormStatusMessagesProps {
899
982
  */
900
983
  declare const FormStatusMessagesScreenReader: React$1.FC<FormStatusMessagesProps>;
901
984
 
902
- 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, 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 };
985
+ export { AddFiles as AddFilesStandard, 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 };