@vygruppen/spor-react 9.13.1 → 9.13.3

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
@@ -88,13 +88,19 @@ declare const Stack: _chakra_ui_system_dist_system_types.ComponentWithAs<"div",
88
88
  * @see Docs https://spor.vy.no/components/radiocard
89
89
  */
90
90
  type RadioCardProps = BoxProps & {
91
+ /** The value that will be passed to the `RadioCardGroup`'s `onChange` function if this `RadioCard` is selected.. */
91
92
  value: string;
93
+ /** The content of the RadioCard. */
92
94
  children: React.ReactNode;
95
+ /** Determines if the RadioCard is disabled. */
93
96
  isDisabled?: boolean;
94
97
  };
95
98
  declare const RadioCard: _chakra_ui_system_dist_system_types.ComponentWithAs<_chakra_ui_system_dist_system_types.As, BoxProps & {
99
+ /** The value that will be passed to the `RadioCardGroup`'s `onChange` function if this `RadioCard` is selected.. */
96
100
  value: string;
101
+ /** The content of the RadioCard. */
97
102
  children: React.ReactNode;
103
+ /** Determines if the RadioCard is disabled. */
98
104
  isDisabled?: boolean | undefined;
99
105
  }>;
100
106
 
@@ -109,15 +115,23 @@ type RadioGroupContextProps = {
109
115
  onChange: (value: string) => void;
110
116
  variant?: "base" | "floating";
111
117
  defaultValue?: string;
118
+ value?: string;
112
119
  };
113
120
  declare const RadioCardGroupContext: React.Context<RadioGroupContextProps | null>;
114
121
  type RadioCardGroupProps = BoxProps & {
122
+ /** A string that will be assigned as the name attribute to all RadioCard components within the group. */
115
123
  name: string;
124
+ /** The RadioCard components that make up the group. */
116
125
  children: React.ReactNode;
126
+ /** Optional. Determines the style of the RadioCard. Can be either "base" or "floating". */
117
127
  variant?: "base" | "floating";
128
+ /** Optional. Determines the direction of the group. Can be either "row" or "column". */
118
129
  direction?: "row" | "column";
130
+ /** Optional. A label for the group. */
119
131
  groupLabel?: string;
132
+ /** Optional. The default value of the RadioCard group. */
120
133
  defaultValue?: string;
134
+ /** Optional. A function that will be called when the selected value changes. The function receives the value of the selected RadioCard. */
121
135
  onChange?: (value: string) => void;
122
136
  };
123
137
  declare const RadioCardGroup: React.FC<RadioCardGroupProps>;
@@ -1966,31 +1980,17 @@ type DrawerProps = DrawerProps$1;
1966
1980
  declare const Drawer: (props: DrawerProps) => React.JSX.Element;
1967
1981
  declare const DrawerContent: _chakra_ui_system_dist_system_types.ComponentWithAs<any, DrawerContentProps>;
1968
1982
 
1969
- type DrawerPlacement = "top" | "right" | "bottom" | "left";
1970
- type FullScreenDrawerProps = {
1971
- /** The content inside the drawer */
1972
- children: React.ReactNode;
1973
- /** The title in the middle of the top menu */
1974
- title?: String;
1975
- /** Determines which side the drawer slides from */
1976
- placement?: DrawerPlacement;
1977
- /** A React component that will be placed to the left in the modal header */
1978
- leftButton?: React.ReactNode;
1979
- /** A React component that will be placed to the right in the modal header */
1980
- rightButton?: React.ReactNode;
1981
- /** Determines if the drawer is open or closed */
1982
- isOpen: boolean;
1983
- /** Function that will be called when the drawer closes */
1984
- onClose: () => void;
1983
+ type DrawerBodyProps = {
1984
+ id?: string;
1985
1985
  };
1986
- declare const FullScreenDrawer: ({ children, title, placement, leftButton, rightButton, isOpen, onClose, }: FullScreenDrawerProps) => React.JSX.Element;
1987
-
1988
1986
  type SimpleDrawerProps = {
1989
1987
  children: React.ReactNode;
1990
1988
  title?: React.ReactNode;
1991
1989
  placement: "top" | "right" | "bottom" | "left";
1992
1990
  isOpen: boolean;
1993
1991
  onClose: () => void;
1992
+ /** Props for drawer body */
1993
+ body?: DrawerBodyProps;
1994
1994
  };
1995
1995
  /** A very basic drawer component that's easy to use
1996
1996
  *
@@ -2002,7 +2002,28 @@ type SimpleDrawerProps = {
2002
2002
  *
2003
2003
  * For more advanced use cases, see the [Drawer](./Drawer.tsx) component.
2004
2004
  */
2005
- declare const SimpleDrawer: ({ placement, children, title, ...props }: SimpleDrawerProps) => React.JSX.Element;
2005
+ declare const SimpleDrawer: ({ placement, children, title, body, ...props }: SimpleDrawerProps) => React.JSX.Element;
2006
+
2007
+ type DrawerPlacement = "top" | "right" | "bottom" | "left";
2008
+ type FullScreenDrawerProps = {
2009
+ /** The content inside the drawer */
2010
+ children: React.ReactNode;
2011
+ /** The title in the middle of the top menu */
2012
+ title?: String;
2013
+ /** Determines which side the drawer slides from */
2014
+ placement?: DrawerPlacement;
2015
+ /** A React component that will be placed to the left in the modal header */
2016
+ leftButton?: React.ReactNode;
2017
+ /** A React component that will be placed to the right in the modal header */
2018
+ rightButton?: React.ReactNode;
2019
+ /** Determines if the drawer is open or closed */
2020
+ isOpen: boolean;
2021
+ /** Function that will be called when the drawer closes */
2022
+ onClose: () => void;
2023
+ /** Props for drawer body */
2024
+ body?: DrawerBodyProps;
2025
+ };
2026
+ declare const FullScreenDrawer: ({ children, title, placement, leftButton, rightButton, isOpen, onClose, body, }: FullScreenDrawerProps) => React.JSX.Element;
2006
2027
 
2007
2028
  type TooltipProps = PopoverProps & {
2008
2029
  /**
@@ -5908,6 +5929,11 @@ declare const theme: {
5908
5929
  RadioCard: {
5909
5930
  baseStyle?: ((props: any) => {
5910
5931
  container: {
5932
+ overflow: string;
5933
+ fontSize: string;
5934
+ display: string;
5935
+ cursor: string;
5936
+ borderRadius: string;
5911
5937
  transitionProperty: string;
5912
5938
  transitionDuration: string;
5913
5939
  _disabled: {
@@ -5925,18 +5951,6 @@ declare const theme: {
5925
5951
  backgroundColor: string;
5926
5952
  pointerEvents: string;
5927
5953
  };
5928
- _focusVisible: {
5929
- outlineWidth: string;
5930
- outlineColor: string;
5931
- outlineStyle: string;
5932
- outlineOffset: string;
5933
- };
5934
- border: string;
5935
- overflow: string;
5936
- fontSize: string;
5937
- display: string;
5938
- cursor: string;
5939
- borderRadius: string;
5940
5954
  };
5941
5955
  checked: {
5942
5956
  backgroundColor: string;
@@ -5952,7 +5966,7 @@ declare const theme: {
5952
5966
  }) | undefined;
5953
5967
  sizes?: {
5954
5968
  [key: string]: _chakra_ui_styled_system.PartsStyleInterpolation<{
5955
- keys: ("container" | "checked" | "radioInput")[];
5969
+ keys: ("container" | "checked" | "radioInput" | "focused" | "focusedChecked")[];
5956
5970
  }>;
5957
5971
  } | undefined;
5958
5972
  variants?: {
@@ -5980,9 +5994,6 @@ declare const theme: {
5980
5994
  outlineColor: string;
5981
5995
  backgroundColor: string;
5982
5996
  };
5983
- _focus: {
5984
- outlineColor: string;
5985
- };
5986
5997
  outlineWidth: string;
5987
5998
  outlineColor: string;
5988
5999
  outlineStyle: string;
@@ -6012,9 +6023,6 @@ declare const theme: {
6012
6023
  outlineColor: string;
6013
6024
  backgroundColor: string;
6014
6025
  };
6015
- _focus: {
6016
- outlineColor: string;
6017
- };
6018
6026
  outline: string;
6019
6027
  outlineColor: string;
6020
6028
  backgroundColor: string;
@@ -6041,12 +6049,30 @@ declare const theme: {
6041
6049
  outlineColor: string;
6042
6050
  backgroundColor: string;
6043
6051
  };
6044
- _focus: {
6052
+ };
6053
+ focusedChecked: {
6054
+ outlineOffset: string;
6055
+ outlineColor: string;
6056
+ outline: string;
6057
+ outlineStyle: string;
6058
+ };
6059
+ focused: {
6060
+ outlineOffset: string;
6061
+ boxShadow: string;
6062
+ _hover: {
6063
+ boxShadow: string;
6045
6064
  outlineOffset: string;
6065
+ outlineWidth: string;
6046
6066
  outlineColor: string;
6047
- outline: string;
6048
6067
  outlineStyle: string;
6068
+ } | {
6069
+ boxShadow: string;
6070
+ outlineOffset: string;
6071
+ outline: string;
6072
+ outlineColor: string;
6049
6073
  };
6074
+ outlineColor: string;
6075
+ outline: string;
6050
6076
  };
6051
6077
  };
6052
6078
  floating: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
@@ -6063,9 +6089,6 @@ declare const theme: {
6063
6089
  outlineColor: string;
6064
6090
  backgroundColor: string;
6065
6091
  };
6066
- _focus: {
6067
- outlineColor: string;
6068
- };
6069
6092
  outline: string;
6070
6093
  outlineColor: string;
6071
6094
  backgroundColor: string;
@@ -6081,12 +6104,24 @@ declare const theme: {
6081
6104
  outlineColor: string;
6082
6105
  backgroundColor: string;
6083
6106
  };
6084
- _focus: {
6107
+ };
6108
+ focusedChecked: {
6109
+ outlineOffset: string;
6110
+ outlineColor: string;
6111
+ outline: string;
6112
+ outlineStyle: string;
6113
+ };
6114
+ focused: {
6115
+ outlineOffset: string;
6116
+ boxShadow: string;
6117
+ _hover: {
6118
+ boxShadow: string;
6085
6119
  outlineOffset: string;
6086
- outlineColor: string;
6087
6120
  outline: string;
6088
- outlineStyle: string;
6121
+ outlineColor: string;
6089
6122
  };
6123
+ outlineColor: string;
6124
+ outline: string;
6090
6125
  };
6091
6126
  };
6092
6127
  } | undefined;
@@ -6095,7 +6130,7 @@ declare const theme: {
6095
6130
  variant?: "base" | "floating" | undefined;
6096
6131
  colorScheme?: string | undefined;
6097
6132
  } | undefined;
6098
- parts: ("container" | "checked" | "radioInput")[];
6133
+ parts: ("container" | "checked" | "radioInput" | "focused" | "focusedChecked")[];
6099
6134
  };
6100
6135
  Radio: {
6101
6136
  baseStyle?: ((props: _chakra_ui_styled_system.StyleFunctionProps) => {
@@ -9550,4 +9585,4 @@ declare const Text: _chakra_ui_system_dist_system_types.ComponentWithAs<"p", Tex
9550
9585
  **/
9551
9586
  declare function slugify(text: string | string[], maxLength?: number): string;
9552
9587
 
9553
- 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, FullScreenDrawer, 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, Nudge, NudgeProps, NumericStepper, Pagination, PasswordInput, PasswordInputProps, PhoneNumberInput, PlayPauseButton, PressableCard, PrideProvider, ProgressBar, ProgressIndicator, ProgressLoader, Radio, RadioCard, RadioCardGroup, RadioCardGroupContext, RadioCardProps, RadioGroup, RadioGroupProps, RadioProps, SearchInput, SearchInputProps, SimpleDrawer, SimpleDrawerProps, Skeleton, SkeletonCircle, SkeletonCircleProps, SkeletonProps, SkeletonText, SkeletonTextProps, SkipButton, SpinnerProps, SporProvider, Stack, StackProps, StaticAlert, StaticCard, StaticCardProps, Stepper, StepperStep, Switch, SwitchProps, Table, TableProps, Tabs, TabsProps, Text, TextLink, TextProps, Textarea, TextareaProps, TimePicker, ToastOptions, TogglePride, Tooltip, TooltipProps, Translations, TravelTag, TravelTagProps, VyLogo, VyLogoDefault, VyLogoDefaultProps, VyLogoPride, VyLogoPrideProps, VyLogoProps, WizardNudge, WizardNudgeProps, brandTheme, createTexts, fontFaces, slugify, theme, usePride, useToast, useTranslation };
9588
+ 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, DrawerBodyProps, DrawerContent, ModalHeader as DrawerHeader, Expandable, ExpandableAlert, ExpandableItem, ExpandableItemProps, FloatingActionButton, FormControl, FormControlProps, FormErrorMessage, FormErrorMessageProps, FormLabel, FormLabelProps, FullScreenDrawer, 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, Nudge, NudgeProps, NumericStepper, Pagination, PasswordInput, PasswordInputProps, PhoneNumberInput, PlayPauseButton, PressableCard, PrideProvider, ProgressBar, ProgressIndicator, ProgressLoader, Radio, RadioCard, RadioCardGroup, RadioCardGroupContext, RadioCardProps, RadioGroup, RadioGroupProps, RadioProps, SearchInput, SearchInputProps, SimpleDrawer, SimpleDrawerProps, Skeleton, SkeletonCircle, SkeletonCircleProps, SkeletonProps, SkeletonText, SkeletonTextProps, SkipButton, SpinnerProps, SporProvider, Stack, StackProps, StaticAlert, StaticCard, StaticCardProps, Stepper, StepperStep, Switch, SwitchProps, Table, TableProps, Tabs, TabsProps, Text, TextLink, TextProps, Textarea, TextareaProps, TimePicker, ToastOptions, TogglePride, Tooltip, TooltipProps, Translations, TravelTag, TravelTagProps, VyLogo, VyLogoDefault, VyLogoDefaultProps, VyLogoPride, VyLogoPrideProps, VyLogoProps, WizardNudge, WizardNudgeProps, brandTheme, createTexts, fontFaces, slugify, theme, usePride, useToast, useTranslation };
package/dist/index.js CHANGED
@@ -2191,19 +2191,7 @@ var init_RadioCardGroup = __esm({
2191
2191
  defaultValue: defaultValue || ""
2192
2192
  }
2193
2193
  },
2194
- /* @__PURE__ */ React88__namespace.default.createElement(
2195
- react.Stack,
2196
- {
2197
- as: "fieldset",
2198
- direction: direction2,
2199
- "aria-labelledby": groupLabel || name,
2200
- role: "radiogroup",
2201
- tabIndex: 0,
2202
- ...props
2203
- },
2204
- groupLabel && /* @__PURE__ */ React88__namespace.default.createElement(exports.FormLabel, { as: "legend", id: groupLabel }, groupLabel),
2205
- children
2206
- )
2194
+ /* @__PURE__ */ React88__namespace.default.createElement(react.Stack, { as: "fieldset", direction: direction2, ...props }, groupLabel && /* @__PURE__ */ React88__namespace.default.createElement(exports.FormLabel, { as: "legend", id: groupLabel }, groupLabel), children)
2207
2195
  );
2208
2196
  };
2209
2197
  }
@@ -2213,7 +2201,7 @@ var init_RadioCard = __esm({
2213
2201
  "src/layout/RadioCard.tsx"() {
2214
2202
  init_RadioCardGroup();
2215
2203
  exports.RadioCard = react.forwardRef(
2216
- ({ children, value = "base", isDisabled, ...props }, ref) => {
2204
+ ({ children, value, isDisabled, ...props }, ref) => {
2217
2205
  const context = React88.useContext(exports.RadioCardGroupContext);
2218
2206
  if (!context) {
2219
2207
  throw new Error(
@@ -2222,52 +2210,72 @@ var init_RadioCard = __esm({
2222
2210
  }
2223
2211
  const { name, selectedValue, onChange, variant } = context;
2224
2212
  const styles3 = react.useMultiStyleConfig("RadioCard", { variant });
2213
+ const [isKeyboardUser, setKeyboardUser] = React88.useState(false);
2214
+ const [isFocused, setFocus] = React88.useState(false);
2225
2215
  const isChecked = selectedValue === value;
2226
- const radioCardId = `radio-card-${React88.useId()}`;
2227
2216
  React88.useEffect(() => {
2228
- if (isChecked && typeof ref !== "function" && (ref == null ? void 0 : ref.current)) {
2229
- ref.current.focus();
2230
- }
2231
- }, [isChecked]);
2232
- const handleKeyDown = (event) => {
2233
- if (event.key === "Enter" || event.key === " ") {
2234
- onChange(value);
2235
- }
2236
- if (event.key === "ArrowRight" || event.key === "ArrowDown" || event.key === "ArrowLeft" || event.key === "ArrowUp") {
2237
- const nextRadioCard = event.currentTarget.nextElementSibling;
2238
- if (nextRadioCard) {
2239
- nextRadioCard.focus();
2217
+ const handleMouseDown = () => setKeyboardUser(false);
2218
+ const handleKeyDown = (event) => {
2219
+ if (event.key === " ") {
2220
+ setFocus(false);
2221
+ } else {
2222
+ setKeyboardUser(true);
2240
2223
  }
2224
+ };
2225
+ window.addEventListener("mousedown", handleMouseDown);
2226
+ window.addEventListener("keydown", handleKeyDown);
2227
+ return () => {
2228
+ window.removeEventListener("mousedown", handleMouseDown);
2229
+ window.removeEventListener("keydown", handleKeyDown);
2230
+ };
2231
+ }, []);
2232
+ React88.useEffect(() => {
2233
+ if (isKeyboardUser && isChecked) {
2234
+ setFocus(true);
2235
+ } else {
2236
+ setFocus(false);
2241
2237
  }
2242
- };
2243
- return /* @__PURE__ */ React88__namespace.default.createElement(react.Box, { as: "label", "aria-label": String(children), onKeyDown: handleKeyDown }, /* @__PURE__ */ React88__namespace.default.createElement(
2244
- react.chakra.input,
2245
- {
2246
- type: "radio",
2247
- id: radioCardId,
2248
- ref,
2249
- value,
2250
- name,
2251
- checked: isChecked,
2252
- onChange: () => onChange(value),
2253
- disabled: isDisabled,
2254
- __css: styles3.radioInput
2255
- }
2256
- ), /* @__PURE__ */ React88__namespace.default.createElement(
2238
+ }, [isKeyboardUser, isChecked]);
2239
+ const inputId = `radio-card-${React88.useId()}`;
2240
+ return /* @__PURE__ */ React88__namespace.default.createElement(
2257
2241
  react.Box,
2258
2242
  {
2259
- ...props,
2260
- tabIndex: 0,
2261
- ref,
2262
- role: "radio",
2263
- "aria-checked": isChecked,
2264
- "aria-labelledby": radioCardId,
2265
- __css: { ...styles3.container, ...isChecked && styles3.checked },
2266
- "data-checked": isChecked,
2267
- "data-disabled": isDisabled
2243
+ onFocus: () => isKeyboardUser && setFocus(true),
2244
+ onBlur: () => setFocus(false)
2268
2245
  },
2269
- children
2270
- ));
2246
+ /* @__PURE__ */ React88__namespace.default.createElement(
2247
+ react.chakra.input,
2248
+ {
2249
+ type: "radio",
2250
+ id: inputId,
2251
+ name,
2252
+ ref,
2253
+ checked: isChecked,
2254
+ onChange: () => onChange(value),
2255
+ disabled: isDisabled,
2256
+ __css: styles3.radioInput
2257
+ }
2258
+ ),
2259
+ /* @__PURE__ */ React88__namespace.default.createElement(
2260
+ react.Box,
2261
+ {
2262
+ as: "label",
2263
+ name,
2264
+ htmlFor: inputId,
2265
+ "aria-checked": isChecked,
2266
+ "data-checked": isChecked,
2267
+ "data-disabled": isDisabled,
2268
+ ...props,
2269
+ __css: {
2270
+ ...styles3.container,
2271
+ ...isChecked && styles3.checked,
2272
+ ...isFocused && !isChecked && styles3.focused,
2273
+ ...isChecked && isFocused && styles3.focusedChecked
2274
+ }
2275
+ },
2276
+ children
2277
+ )
2278
+ );
2271
2279
  }
2272
2280
  );
2273
2281
  }
@@ -3009,7 +3017,8 @@ var init_Button = __esm({
3009
3017
  "aria-label": ariaLabel,
3010
3018
  "aria-busy": isLoading,
3011
3019
  disabled: isDisabled || isLoading,
3012
- position: "relative"
3020
+ position: "relative",
3021
+ fontFamily: "Vy Sans"
3013
3022
  },
3014
3023
  isLoading && /* @__PURE__ */ React88__namespace.default.createElement(react.Center, { position: "absolute", right: 0, left: 0, top: 1, bottom: 0 }, /* @__PURE__ */ React88__namespace.default.createElement(
3015
3024
  exports.ColorInlineLoader,
@@ -5196,7 +5205,8 @@ var init_FullScreenDrawer = __esm({
5196
5205
  leftButton = null,
5197
5206
  rightButton = /* @__PURE__ */ React88__namespace.default.createElement(DrawerCloseButton2, null),
5198
5207
  isOpen,
5199
- onClose
5208
+ onClose,
5209
+ body
5200
5210
  }) => {
5201
5211
  const [isContentBoxScrolled, setContentBoxScrolled] = React88.useState(false);
5202
5212
  const onContentScroll = (e) => {
@@ -5227,7 +5237,7 @@ var init_FullScreenDrawer = __esm({
5227
5237
  rightButton
5228
5238
  }
5229
5239
  ),
5230
- /* @__PURE__ */ React88__namespace.default.createElement(react.DrawerBody, { overflow: "auto", onScroll: onContentScroll }, children)
5240
+ /* @__PURE__ */ React88__namespace.default.createElement(react.DrawerBody, { overflow: "auto", onScroll: onContentScroll, ...body }, children)
5231
5241
  ));
5232
5242
  };
5233
5243
  DrawerTopMenu = ({
@@ -5322,9 +5332,10 @@ var init_SimpleDrawer = __esm({
5322
5332
  placement,
5323
5333
  children,
5324
5334
  title,
5335
+ body,
5325
5336
  ...props
5326
5337
  }) => {
5327
- return /* @__PURE__ */ React88__namespace.default.createElement(exports.Drawer, { placement, ...props }, /* @__PURE__ */ React88__namespace.default.createElement(react.DrawerOverlay, null), /* @__PURE__ */ React88__namespace.default.createElement(exports.DrawerContent, null, /* @__PURE__ */ React88__namespace.default.createElement(react.DrawerCloseButton, null), title && /* @__PURE__ */ React88__namespace.default.createElement(exports.ModalHeader, null, title), /* @__PURE__ */ React88__namespace.default.createElement(react.DrawerBody, null, children)));
5338
+ return /* @__PURE__ */ React88__namespace.default.createElement(exports.Drawer, { placement, ...props }, /* @__PURE__ */ React88__namespace.default.createElement(react.DrawerOverlay, null), /* @__PURE__ */ React88__namespace.default.createElement(exports.DrawerContent, null, /* @__PURE__ */ React88__namespace.default.createElement(react.DrawerCloseButton, null), title && /* @__PURE__ */ React88__namespace.default.createElement(exports.ModalHeader, null, title), /* @__PURE__ */ React88__namespace.default.createElement(react.DrawerBody, { ...body }, children)));
5328
5339
  };
5329
5340
  }
5330
5341
  });
@@ -15038,20 +15049,23 @@ var init_radio_card = __esm({
15038
15049
  "src/theme/components/radio-card.ts"() {
15039
15050
  init_base_utils();
15040
15051
  init_floating_utils();
15041
- init_focus_utils();
15042
15052
  init_outline_utils();
15043
- parts17 = themeTools.anatomy("radio-card").parts("container", "checked", "radioInput");
15053
+ parts17 = themeTools.anatomy("radio-card").parts(
15054
+ "container",
15055
+ "checked",
15056
+ "radioInput",
15057
+ "focused",
15058
+ "focusedChecked"
15059
+ );
15044
15060
  helpers24 = react.createMultiStyleConfigHelpers(parts17.keys);
15045
15061
  config33 = helpers24.defineMultiStyleConfig({
15046
15062
  baseStyle: (props) => ({
15047
15063
  container: {
15048
- border: "none",
15049
15064
  overflow: "hidden",
15050
15065
  fontSize: "inherit",
15051
15066
  display: "block",
15052
15067
  cursor: "pointer",
15053
15068
  borderRadius: "sm",
15054
- ...focusVisibleStyles(props),
15055
15069
  transitionProperty: "common",
15056
15070
  transitionDuration: "fast",
15057
15071
  _disabled: {
@@ -15086,9 +15100,6 @@ var init_radio_card = __esm({
15086
15100
  _active: {
15087
15101
  ...baseBackground("active", props),
15088
15102
  ...baseBorder("active", props)
15089
- },
15090
- _focus: {
15091
- ...outlineBorder("focus", props)
15092
15103
  }
15093
15104
  },
15094
15105
  checked: {
@@ -15098,12 +15109,23 @@ var init_radio_card = __esm({
15098
15109
  _active: {
15099
15110
  ...baseBackground("active", props),
15100
15111
  ...baseBorder("active", props)
15101
- },
15102
- _focus: {
15103
- outline: "4px solid",
15104
- outlineStyle: "double",
15105
- ...outlineBorder("focus", props),
15106
- outlineOffset: "-1px"
15112
+ }
15113
+ },
15114
+ focusedChecked: {
15115
+ outline: "4px solid",
15116
+ outlineStyle: "double",
15117
+ ...outlineBorder("focus", props),
15118
+ outlineOffset: "-1px"
15119
+ },
15120
+ focused: {
15121
+ outline: "2px solid",
15122
+ ...outlineBorder("focus", props),
15123
+ outlineOffset: "1px",
15124
+ boxShadow: `inset 0 0 0 1px rgba(0, 0, 0, 0.40)`,
15125
+ _hover: {
15126
+ ...baseBorder("hover", props),
15127
+ boxShadow: "none",
15128
+ outlineOffset: "0px"
15107
15129
  }
15108
15130
  }
15109
15131
  }),
@@ -15120,9 +15142,6 @@ var init_radio_card = __esm({
15120
15142
  _active: {
15121
15143
  ...floatingBackground("active", props),
15122
15144
  ...floatingBorder("active", props)
15123
- },
15124
- _focus: {
15125
- ...outlineBorder("focus", props)
15126
15145
  }
15127
15146
  },
15128
15147
  checked: {
@@ -15133,12 +15152,23 @@ var init_radio_card = __esm({
15133
15152
  _active: {
15134
15153
  ...floatingBackground("active", props),
15135
15154
  ...floatingBorder("active", props)
15136
- },
15137
- _focus: {
15138
- outline: "4px solid",
15139
- outlineStyle: "double",
15140
- ...outlineBorder("focus", props),
15141
- outlineOffset: "-1px"
15155
+ }
15156
+ },
15157
+ focusedChecked: {
15158
+ outline: "4px solid",
15159
+ outlineStyle: "double",
15160
+ ...outlineBorder("focus", props),
15161
+ outlineOffset: "-1px"
15162
+ },
15163
+ focused: {
15164
+ outline: "2px solid",
15165
+ ...outlineBorder("focus", props),
15166
+ outlineOffset: "1px",
15167
+ boxShadow: `inset 0 0 0 1px rgba(0, 0, 0, 0.10)`,
15168
+ _hover: {
15169
+ ...floatingBorder("hover", props),
15170
+ boxShadow: "md",
15171
+ outlineOffset: "0px"
15142
15172
  }
15143
15173
  }
15144
15174
  })
@@ -16168,6 +16198,9 @@ var init_font_faces = __esm({
16168
16198
  font-weight: 400;
16169
16199
  font-display: swap
16170
16200
  }
16201
+ body {
16202
+ font-family: "Vy Sans", sans-serif;
16203
+ }
16171
16204
  `;
16172
16205
  }
16173
16206
  });
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- export { Accordion, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, AttachedInputs, Badge, Box, Brand, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button, ButtonGroup, Card, CardSelect, Center, Checkbox, CheckboxGroup, ChoiceChip, ClosableAlert, CloseButton, Code, Collapse, ColorInlineLoader, ColorSpinner, Combobox, Container, ContentLoader, DarkFullScreenLoader, DarkInlineLoader, DarkMode, DarkSpinner, DatePicker, DateRangePicker, Divider, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerFooter, ModalHeader as DrawerHeader, DrawerOverlay, Expandable, ExpandableAlert, ExpandableItem, Fade, Flex, FloatingActionButton, FormControl, FormErrorMessage, FormHelperText, FormLabel, FullScreenDrawer, Grid, GridItem, HStack, Heading, IconButton, Image, Img, InfoSelect, InfoTag, Input, InputGroup, InputLeftElement, InputRightElement, Item, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, LightMode, LightSpinner, LineIcon, ListBox, ListItem, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalOverlay, NativeSelect, Nudge, NumericStepper, OrderedList, Pagination, PasswordInput, PhoneNumberInput, PlayPauseButton, Portal, PressableCard, PrideProvider, ProgressBar, ProgressIndicator, ProgressLoader, Radio, RadioCard, RadioCardGroup, RadioCardGroupContext, RadioGroup, ScaleFade, SearchInput, Section, SimpleDrawer, SimpleGrid, Skeleton, SkeletonCircle, SkeletonText, SkipButton, Slide, SlideFade, Spacer, SporProvider, Stack, StaticAlert, StaticCard, Stepper, StepperStep, Switch, Tab, TabList, TabPanel, TabPanels, Table, TableCaption, Tabs, Tbody, Td, Text, TextLink, Textarea, Tfoot, Th, Thead, Time, TimePicker, TogglePride, Tooltip, Tr, TravelTag, UnorderedList, VStack, VyLogo, VyLogoDefault, VyLogoPride, WizardNudge, Wrap, WrapItem, brandTheme, createTexts, defineStyleConfig, extendTheme, fontFaces, slugify, theme, tokens, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, usePride, useSize, useTheme, useToast, useToken, useTranslation } from './chunk-NMEIV2NI.mjs';
1
+ export { Accordion, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, AttachedInputs, Badge, Box, Brand, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button, ButtonGroup, Card, CardSelect, Center, Checkbox, CheckboxGroup, ChoiceChip, ClosableAlert, CloseButton, Code, Collapse, ColorInlineLoader, ColorSpinner, Combobox, Container, ContentLoader, DarkFullScreenLoader, DarkInlineLoader, DarkMode, DarkSpinner, DatePicker, DateRangePicker, Divider, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerFooter, ModalHeader as DrawerHeader, DrawerOverlay, Expandable, ExpandableAlert, ExpandableItem, Fade, Flex, FloatingActionButton, FormControl, FormErrorMessage, FormHelperText, FormLabel, FullScreenDrawer, Grid, GridItem, HStack, Heading, IconButton, Image, Img, InfoSelect, InfoTag, Input, InputGroup, InputLeftElement, InputRightElement, Item, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, LightMode, LightSpinner, LineIcon, ListBox, ListItem, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalOverlay, NativeSelect, Nudge, NumericStepper, OrderedList, Pagination, PasswordInput, PhoneNumberInput, PlayPauseButton, Portal, PressableCard, PrideProvider, ProgressBar, ProgressIndicator, ProgressLoader, Radio, RadioCard, RadioCardGroup, RadioCardGroupContext, RadioGroup, ScaleFade, SearchInput, Section, SimpleDrawer, SimpleGrid, Skeleton, SkeletonCircle, SkeletonText, SkipButton, Slide, SlideFade, Spacer, SporProvider, Stack, StaticAlert, StaticCard, Stepper, StepperStep, Switch, Tab, TabList, TabPanel, TabPanels, Table, TableCaption, Tabs, Tbody, Td, Text, TextLink, Textarea, Tfoot, Th, Thead, Time, TimePicker, TogglePride, Tooltip, Tr, TravelTag, UnorderedList, VStack, VyLogo, VyLogoDefault, VyLogoPride, WizardNudge, Wrap, WrapItem, brandTheme, createTexts, defineStyleConfig, extendTheme, fontFaces, slugify, theme, tokens, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, usePride, useSize, useTheme, useToast, useToken, useTranslation } from './chunk-Y56HXMZC.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vygruppen/spor-react",
3
- "version": "9.13.1",
3
+ "version": "9.13.3",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -105,6 +105,7 @@ export const Button = forwardRef<ButtonProps, "button">((props, ref) => {
105
105
  aria-busy={isLoading}
106
106
  disabled={isDisabled || isLoading}
107
107
  position="relative"
108
+ fontFamily={"Vy Sans"}
108
109
  >
109
110
  {isLoading && (
110
111
  <Center position="absolute" right={0} left={0} top={1} bottom={0}>