@vygruppen/spor-react 12.4.8 → 12.4.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vygruppen/spor-react",
3
- "version": "12.4.8",
3
+ "version": "12.4.10",
4
4
  "exports": {
5
5
  ".": {
6
6
  "types": "./dist/index.d.ts",
@@ -75,7 +75,13 @@ export const AccordionItemTrigger = forwardRef<
75
75
  HTMLButtonElement,
76
76
  AccordionItemTriggerProps
77
77
  >(function AccordionItemTrigger(props, ref) {
78
- const { startElement, children, headingLevel, ...rest } = props;
78
+ const {
79
+ startElement,
80
+ children,
81
+ headingLevel,
82
+ showChevron = true,
83
+ ...rest
84
+ } = props;
79
85
  warnAboutMismatchingIcon({ icon: startElement });
80
86
  const recipe = useSlotRecipe({ key: "accordion" });
81
87
  const styles = recipe();
@@ -86,10 +92,11 @@ export const AccordionItemTrigger = forwardRef<
86
92
  {startElement && startElement}
87
93
  {children}
88
94
  </HStack>
89
-
90
- <ChakraAccordion.ItemIndicator>
91
- <DropdownDownFill24Icon />
92
- </ChakraAccordion.ItemIndicator>
95
+ {showChevron && (
96
+ <ChakraAccordion.ItemIndicator>
97
+ <DropdownDownFill24Icon />
98
+ </ChakraAccordion.ItemIndicator>
99
+ )}
93
100
  </ChakraAccordion.ItemTrigger>
94
101
  </Box>
95
102
  );
@@ -41,6 +41,7 @@ export type AccordionItemTriggerProps = Omit<
41
41
  HeadingLevel & {
42
42
  /** Icon to be displayed on the left of the trigger button. Use 24px outline. */
43
43
  startElement?: React.ReactNode;
44
+ showChevron?: boolean;
44
45
  };
45
46
 
46
47
  export type AccordionItemContentProps = ChakraAccordion.ItemContentProps & {
@@ -31,7 +31,7 @@ export const SearchInput = forwardRef<HTMLInputElement, SearchInputProps>(
31
31
  type="search"
32
32
  variant={variant}
33
33
  {...props}
34
- startElement={<SearchOutline24Icon />}
34
+ startElement={<SearchOutline24Icon color="icon" />}
35
35
  endElement={
36
36
  clearButton && (
37
37
  <IconButton
@@ -1,5 +1,5 @@
1
- import { BoxProps, chakra } from "@chakra-ui/react";
2
- import React, { forwardRef, useId } from "react";
1
+ import { chakra } from "@chakra-ui/react";
2
+ import { ComponentProps, forwardRef, useId } from "react";
3
3
 
4
4
  export const SvgBox = chakra("svg");
5
5
 
@@ -27,7 +27,7 @@ const Path = chakra("path", fillRecipe);
27
27
 
28
28
  const SVGGroup = chakra("g", fillRecipe);
29
29
 
30
- type VyLogoProps = BoxProps & React.SVGProps<SVGSVGElement>;
30
+ type VyLogoProps = ComponentProps<typeof SvgBox>;
31
31
 
32
32
  export const VyLogo = forwardRef<SVGSVGElement, VyLogoProps>((props, ref) => {
33
33
  const id = useId();
@@ -1,9 +1,8 @@
1
- import { BoxProps } from "@chakra-ui/react";
2
- import { forwardRef, useId } from "react";
1
+ import { ComponentProps, forwardRef, useId } from "react";
3
2
 
4
3
  import { SvgBox } from "./VyLogo";
5
4
 
6
- export type VyLogoPrideProps = BoxProps;
5
+ type VyLogoPrideProps = ComponentProps<typeof SvgBox>;
7
6
 
8
7
  export const VyLogoPride = forwardRef<SVGSVGElement, VyLogoPrideProps>(
9
8
  (props, ref) => {
@@ -11,6 +11,7 @@ export const inputRecipe = defineRecipe({
11
11
  borderRadius: "sm",
12
12
  transitionProperty: "common",
13
13
  transitionDuration: "fast",
14
+ color: "text",
14
15
  position: "relative",
15
16
  paddingX: 3,
16
17
  paddingTop: 3,
@@ -1,7 +1,6 @@
1
1
  import tokens from "@vygruppen/spor-design-tokens";
2
2
 
3
3
  export const breakpoints = {
4
- base: "0px",
5
4
  sm: tokens.size.breakpoint.sm,
6
5
  md: tokens.size.breakpoint.md,
7
6
  lg: tokens.size.breakpoint.lg,