@vygruppen/spor-react 5.2.0 → 5.4.0

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.ts CHANGED
@@ -474,7 +474,7 @@ type DateRangePickerProps = Omit<AriaDateRangePickerProps<DateValue>, "onChange"
474
474
  onChange?: (dates: {
475
475
  start: DateValue | null;
476
476
  end: DateValue | null;
477
- }) => void;
477
+ } | null) => void;
478
478
  };
479
479
  /**
480
480
  * A date range picker component.
@@ -686,6 +686,7 @@ type CardSelectProps = BoxProps & {
686
686
  * ```
687
687
  *
688
688
  * @see https://spor.vy.no/components/card-select
689
+ *
689
690
  */
690
691
  declare const CardSelect: _chakra_ui_system_dist_system_types.ComponentWithAs<"button", CardSelectProps>;
691
692
 
@@ -944,6 +945,7 @@ type InfoSelectProps<T extends object> = {
944
945
  disabledKeys?: string[];
945
946
  /** Whether or not the input is invalid */
946
947
  "aria-invalid"?: boolean;
948
+ variant?: "base" | "floating";
947
949
  };
948
950
  /**
949
951
  * A styled select component.
@@ -980,7 +982,7 @@ type InfoSelectProps<T extends object> = {
980
982
  *
981
983
  * @see https://spor.vy.no/components/info-select
982
984
  */
983
- declare function InfoSelect<T extends object>({ placeholder, width, height, onChange, value, isLabelSrOnly, defaultValue, ...props }: InfoSelectProps<T>): React__default.JSX.Element;
985
+ declare function InfoSelect<T extends object>({ placeholder, width, height, onChange, value, isLabelSrOnly, defaultValue, variant, ...props }: InfoSelectProps<T>): React__default.JSX.Element;
984
986
 
985
987
  type InputProps = Omit<InputProps$1, "variant" | "size"> & {
986
988
  /** The input's label */
@@ -1823,8 +1825,28 @@ type WizardPopoverProps = PopoverProps & {
1823
1825
  */
1824
1826
  declare const WizardPopover: ({ children, triggerElement, withCloseButton, }: WizardPopoverProps) => React.JSX.Element;
1825
1827
 
1828
+ type ProgressIndicatorProps = {
1829
+ numberOfSteps: number;
1830
+ activeStep: number;
1831
+ };
1832
+ /**
1833
+ * A progress indicator is used to show which step of a process a user is currently in
1834
+ * to give them a sense of progress.
1835
+ *
1836
+ * You specify the active step, which starts at 1 (not 0)
1837
+ *
1838
+ * ```tsx
1839
+ * <ProgressIndicator
1840
+ * numberOfSteps={3}
1841
+ * activeStep={2}
1842
+ * />
1843
+ * ```
1844
+ */
1845
+ declare const ProgressIndicator: ({ numberOfSteps, activeStep, }: ProgressIndicatorProps) => React__default.JSX.Element;
1846
+
1826
1847
  type SporProviderProps = ChakraProviderProps & {
1827
1848
  language?: Language;
1849
+ brand?: Brand;
1828
1850
  };
1829
1851
  /**
1830
1852
  * This component is used to provide the specified theme of colors and other
@@ -1862,7 +1884,7 @@ type SporProviderProps = ChakraProviderProps & {
1862
1884
  * );
1863
1885
  * ```
1864
1886
  */
1865
- declare const SporProvider: ({ theme, language, children, ...props }: SporProviderProps) => React__default.JSX.Element;
1887
+ declare const SporProvider: ({ theme, language, brand, children, ...props }: SporProviderProps) => React__default.JSX.Element;
1866
1888
 
1867
1889
  type StepperProps = {
1868
1890
  onClick: (clickedStep: number) => void;
@@ -1972,6 +1994,10 @@ declare const textStyles: {
1972
1994
  /** A string of CSS that should be injected in the global CSS space */
1973
1995
  declare const fontFaces: string;
1974
1996
 
1997
+ declare enum Brand {
1998
+ VyDigital = "VyDigital",
1999
+ VyUtvikling = "VyUtvikling"
2000
+ }
1975
2001
  declare const theme: {
1976
2002
  components: {
1977
2003
  Accordion: {
@@ -2513,14 +2539,12 @@ declare const theme: {
2513
2539
  appearance: string;
2514
2540
  display: string;
2515
2541
  alignItems: string;
2516
- _expanded: {
2517
- backgroundColor: string;
2518
- };
2519
2542
  };
2520
2543
  card: {
2521
2544
  borderRadius: string;
2522
2545
  boxShadow: string;
2523
2546
  padding: number;
2547
+ color: string;
2524
2548
  };
2525
2549
  }) | undefined;
2526
2550
  sizes?: {
@@ -2553,34 +2577,25 @@ declare const theme: {
2553
2577
  };
2554
2578
  } | undefined;
2555
2579
  variants?: {
2556
- ghost: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
2557
- trigger: {
2558
- _hover: {
2559
- backgroundColor: string;
2560
- };
2561
- _active: {
2562
- backgroundColor: string;
2563
- };
2564
- };
2565
- };
2566
- outline: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
2580
+ base: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
2567
2581
  trigger: {
2568
2582
  _hover: {
2569
2583
  boxShadow: string;
2570
2584
  };
2571
2585
  _active: {
2572
- backgroundColor: string;
2573
2586
  boxShadow: string;
2587
+ backgroundColor: string;
2574
2588
  };
2575
2589
  _expanded: {
2576
2590
  _hover: {
2577
- backgroundColor: string;
2578
2591
  boxShadow: string;
2592
+ backgroundColor: string;
2579
2593
  };
2580
2594
  _active: {
2581
- backgroundColor: string;
2582
2595
  boxShadow: string;
2596
+ backgroundColor: string;
2583
2597
  };
2598
+ backgroundColor: string;
2584
2599
  };
2585
2600
  _focus: _chakra_ui_styled_system.SystemStyleObject;
2586
2601
  _focusVisible: _chakra_ui_styled_system.SystemStyleObject;
@@ -2588,34 +2603,48 @@ declare const theme: {
2588
2603
  boxShadow: string;
2589
2604
  };
2590
2605
  };
2591
- card: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
2606
+ ghost: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
2607
+ trigger: {
2608
+ _hover: {
2609
+ backgroundColor: string;
2610
+ };
2611
+ _active: {
2612
+ backgroundColor: string;
2613
+ };
2614
+ _expanded: {
2615
+ backgroundColor: string;
2616
+ };
2617
+ };
2618
+ };
2619
+ floating: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
2592
2620
  trigger: {
2593
- backgroundColor: string;
2594
2621
  boxShadow: string;
2595
2622
  transition: string;
2596
2623
  _hover: {
2597
- backgroundColor: string;
2598
2624
  boxShadow: string;
2625
+ backgroundColor: string;
2599
2626
  };
2600
2627
  _active: {
2601
- backgroundColor: string;
2602
2628
  boxShadow: string;
2629
+ backgroundColor: string;
2603
2630
  };
2604
2631
  _expanded: {
2605
2632
  _hover: {
2606
2633
  boxShadow: string;
2607
2634
  };
2608
2635
  _active: {
2609
- backgroundColor: string;
2610
2636
  boxShadow: string;
2637
+ backgroundColor: string;
2611
2638
  };
2639
+ backgroundColor: string;
2612
2640
  };
2641
+ backgroundColor: string;
2613
2642
  };
2614
2643
  };
2615
2644
  } | undefined;
2616
2645
  defaultProps?: {
2617
2646
  size?: "sm" | "md" | "lg" | undefined;
2618
- variant?: "outline" | "card" | "ghost" | undefined;
2647
+ variant?: "base" | "ghost" | "floating" | undefined;
2619
2648
  colorScheme?: string | undefined;
2620
2649
  } | undefined;
2621
2650
  parts: ("card" | "trigger")[];
@@ -3534,29 +3563,13 @@ declare const theme: {
3534
3563
  };
3535
3564
  backgroundColor: string;
3536
3565
  color: string;
3537
- } | {
3538
- _hover: {
3539
- boxShadow: string;
3540
- };
3541
- _focus: {
3542
- boxShadow: string;
3543
- };
3544
- backgroundColor?: undefined;
3545
- color: string;
3546
3566
  };
3547
3567
  _active: {
3548
3568
  boxShadow: string;
3549
3569
  backgroundColor: string;
3550
- } | {
3551
- boxShadow: string;
3552
- backgroundColor?: undefined;
3553
3570
  };
3554
3571
  _expanded: {
3555
3572
  boxShadow: string;
3556
- backgroundColor: string;
3557
- } | {
3558
- boxShadow: string;
3559
- backgroundColor?: undefined;
3560
3573
  };
3561
3574
  _invalid: {
3562
3575
  _focus: _chakra_ui_styled_system.SystemStyleObject;
@@ -3592,13 +3605,28 @@ declare const theme: {
3592
3605
  }>;
3593
3606
  } | undefined;
3594
3607
  variants?: {
3595
- [key: string]: _chakra_ui_styled_system.PartsStyleInterpolation<{
3596
- keys: ("button" | "label" | "container" | "arrowIcon")[];
3597
- }>;
3608
+ base: (props: _chakra_ui_styled_system.StyleFunctionProps) => {};
3609
+ floating: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
3610
+ button: {
3611
+ _active: {
3612
+ backgroundColor: string;
3613
+ boxShadow: string;
3614
+ };
3615
+ _focus: _chakra_ui_styled_system.SystemStyleObject;
3616
+ _focusVisible: _chakra_ui_styled_system.SystemStyleObject;
3617
+ "&[data-focus]:not([data-focus-visible])": _chakra_ui_styled_system.SystemStyleObject;
3618
+ _hover: {
3619
+ backgroundColor: string;
3620
+ boxShadow: string;
3621
+ };
3622
+ boxShadow: string;
3623
+ backgroundColor: string;
3624
+ };
3625
+ };
3598
3626
  } | undefined;
3599
3627
  defaultProps?: {
3600
3628
  size?: string | number | undefined;
3601
- variant?: string | number | undefined;
3629
+ variant?: "base" | "floating" | undefined;
3602
3630
  colorScheme?: string | undefined;
3603
3631
  } | undefined;
3604
3632
  parts: ("button" | "label" | "container" | "arrowIcon")[];
@@ -4053,24 +4081,18 @@ declare const theme: {
4053
4081
  borderRadius: string;
4054
4082
  color: string;
4055
4083
  cursor: string;
4056
- _hover: {
4057
- backgroundColor: string;
4058
- outline: string;
4059
- };
4084
+ outline: string;
4060
4085
  _active: {
4061
4086
  backgroundColor: string;
4062
- outline: string;
4063
4087
  };
4064
4088
  _focus: {
4065
- outline: string;
4089
+ backgroundColor: string;
4090
+ };
4091
+ _hover: {
4066
4092
  backgroundColor: string;
4067
4093
  };
4068
4094
  _selected: {
4069
- color: string;
4070
4095
  backgroundColor: string;
4071
- } | {
4072
- color: string;
4073
- backgroundColor?: undefined;
4074
4096
  };
4075
4097
  };
4076
4098
  label: {};
@@ -4334,6 +4356,45 @@ declare const theme: {
4334
4356
  } | undefined;
4335
4357
  parts: ("body" | "footer" | "header" | "content" | "closeButton" | "arrow" | "popper")[];
4336
4358
  };
4359
+ ProgressIndicator: {
4360
+ baseStyle?: ((props: _chakra_ui_styled_system.StyleFunctionProps) => {
4361
+ root: {
4362
+ width: string;
4363
+ };
4364
+ container: {
4365
+ display: string;
4366
+ alignItems: string;
4367
+ gap: number;
4368
+ justifyContent: ("center" | "space-between")[];
4369
+ };
4370
+ progressDot: {
4371
+ height: number;
4372
+ width: number;
4373
+ "&[aria-current='step']": {
4374
+ circle: {
4375
+ fill: string;
4376
+ };
4377
+ };
4378
+ circle: {
4379
+ fill: string;
4380
+ };
4381
+ };
4382
+ }) | undefined;
4383
+ sizes?: {
4384
+ [key: string]: _chakra_ui_styled_system.PartsStyleInterpolation<{
4385
+ keys: ("container" | "root" | "progressDot")[];
4386
+ }>;
4387
+ } | undefined;
4388
+ variants?: {
4389
+ base: (props: _chakra_ui_styled_system.StyleFunctionProps) => {};
4390
+ } | undefined;
4391
+ defaultProps?: {
4392
+ size?: string | number | undefined;
4393
+ variant?: "base" | undefined;
4394
+ colorScheme?: string | undefined;
4395
+ } | undefined;
4396
+ parts: ("container" | "root" | "progressDot")[];
4397
+ };
4337
4398
  Radio: {
4338
4399
  baseStyle?: {
4339
4400
  container: {
@@ -7165,6 +7226,18 @@ declare const theme: {
7165
7226
  };
7166
7227
  direction: "ltr";
7167
7228
  };
7229
+ declare const brandTheme: {
7230
+ VyDigital: {
7231
+ colors: {
7232
+ accent: string;
7233
+ };
7234
+ };
7235
+ VyUtvikling: {
7236
+ colors: {
7237
+ accent: string;
7238
+ };
7239
+ };
7240
+ };
7168
7241
 
7169
7242
  type BaseToastProps = {
7170
7243
  children: React__default.ReactNode;
@@ -7302,4 +7375,4 @@ type TextProps = Omit<TextProps$1, "textStyle"> & {
7302
7375
  */
7303
7376
  declare const Text: _chakra_ui_system_dist_system_types.ComponentWithAs<"p", TextProps>;
7304
7377
 
7305
- export { Accordion, AccordionProps, AttachedInputs, Badge, BadgeProps, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button, ButtonGroup, ButtonGroupProps, ButtonProps, Card, CardProps, CardSelect, Checkbox, CheckboxGroup, CheckboxGroupProps, CheckboxProps, ChoiceChip, ChoiceChipProps, ClosableAlert, CloseButton, CloseButtonProps, Code, CodeProps, ColorInlineLoader, ColorInlineLoaderProps, ColorSpinner, ColorSpinnerProps, Combobox, ComboboxProps, ContentLoader, ContentLoaderProps, DarkFullScreenLoader, DarkInlineLoader, DarkInlineLoaderProps, DarkSpinner, DarkSpinnerProps, DatePicker, DateRangePicker, Divider, DividerProps, Drawer, DrawerContent, ModalHeader as DrawerHeader, Expandable, ExpandableAlert, ExpandableItem, ExpandableItemProps, FloatingActionButton, FormControl, FormControlProps, FormErrorMessage, FormErrorMessageProps, FormLabel, FormLabelProps, Heading, HeadingProps, IconButton, IconButtonProps, InfoSelect, InfoTag, InfoTagProps, Input, InputElementProps, InputLeftElement, InputProps, InputRightElement, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, LightInlineLoaderProps, LightSpinner, LightSpinnerProps, LineIcon, LineIconProps, ListBox, ModalHeader, ModalHeaderProps, NativeSelect, NativeSelectProps, NumericStepper, PasswordInput, PasswordInputProps, PhoneNumberInput, PlayPauseButton, PopoverWizardBody, PopoverWizardProps, ProgressBar, ProgressLoader, Radio, RadioGroup, RadioGroupProps, RadioProps, SearchInput, SearchInputProps, SimpleDrawer, SimpleDrawerProps, SimplePopover, Skeleton, SkeletonCircle, SkeletonCircleProps, SkeletonProps, SkeletonText, SkeletonTextProps, SkipButton, SpinnerProps, SporProvider, Stack, StackProps, StaticAlert, Stepper, StepperStep, Switch, SwitchProps, Table, TableProps, Tabs, TabsProps, Text, TextLink, TextProps, Textarea, TextareaProps, TimePicker, ToastOptions, Translations, TravelTag, TravelTagProps, VyLogo, VyLogoProps, WizardPopover, WizardPopoverProps, createTexts, fontFaces, theme, useToast, useTranslation };
7378
+ export { Accordion, AccordionProps, AttachedInputs, Badge, BadgeProps, Brand, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button, ButtonGroup, ButtonGroupProps, ButtonProps, Card, CardProps, CardSelect, Checkbox, CheckboxGroup, CheckboxGroupProps, CheckboxProps, ChoiceChip, ChoiceChipProps, ClosableAlert, CloseButton, CloseButtonProps, Code, CodeProps, ColorInlineLoader, ColorInlineLoaderProps, ColorSpinner, ColorSpinnerProps, Combobox, ComboboxProps, ContentLoader, ContentLoaderProps, DarkFullScreenLoader, DarkInlineLoader, DarkInlineLoaderProps, DarkSpinner, DarkSpinnerProps, DatePicker, DateRangePicker, Divider, DividerProps, Drawer, DrawerContent, ModalHeader as DrawerHeader, Expandable, ExpandableAlert, ExpandableItem, ExpandableItemProps, FloatingActionButton, FormControl, FormControlProps, FormErrorMessage, FormErrorMessageProps, FormLabel, FormLabelProps, Heading, HeadingProps, IconButton, IconButtonProps, InfoSelect, InfoTag, InfoTagProps, Input, InputElementProps, InputLeftElement, InputProps, InputRightElement, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, LightInlineLoaderProps, LightSpinner, LightSpinnerProps, LineIcon, LineIconProps, ListBox, ModalHeader, ModalHeaderProps, NativeSelect, NativeSelectProps, NumericStepper, PasswordInput, PasswordInputProps, PhoneNumberInput, PlayPauseButton, PopoverWizardBody, PopoverWizardProps, ProgressBar, ProgressIndicator, ProgressLoader, Radio, RadioGroup, RadioGroupProps, RadioProps, SearchInput, SearchInputProps, SimpleDrawer, SimpleDrawerProps, SimplePopover, Skeleton, SkeletonCircle, SkeletonCircleProps, SkeletonProps, SkeletonText, SkeletonTextProps, SkipButton, SpinnerProps, SporProvider, Stack, StackProps, StaticAlert, Stepper, StepperStep, Switch, SwitchProps, Table, TableProps, Tabs, TabsProps, Text, TextLink, TextProps, Textarea, TextareaProps, TimePicker, ToastOptions, Translations, TravelTag, TravelTagProps, VyLogo, VyLogoProps, WizardPopover, WizardPopoverProps, brandTheme, createTexts, fontFaces, theme, useToast, useTranslation };