@vygruppen/spor-react 12.4.7 → 12.4.9
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/.turbo/turbo-build.log +12 -12
- package/.turbo/turbo-postinstall.log +1 -1
- package/CHANGELOG.md +13 -0
- package/dist/index.d.mts +33 -22
- package/dist/index.d.ts +33 -22
- package/dist/index.js +42 -36
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +39 -37
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/accordion/Accordion.tsx +12 -5
- package/src/accordion/types.ts +1 -0
- package/src/input/SearchInput.tsx +1 -1
- package/src/logo/VyLogo.tsx +3 -3
- package/src/logo/VyLogoPride.tsx +2 -3
- package/src/table/Table.tsx +10 -22
- package/src/table/index.tsx +1 -0
- package/src/theme/recipes/input.ts +1 -0
- package/src/theme/slot-recipes/table.ts +31 -22
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vygruppen/spor-react",
|
3
|
-
"version": "12.4.
|
3
|
+
"version": "12.4.9",
|
4
4
|
"exports": {
|
5
5
|
".": {
|
6
6
|
"types": "./dist/index.d.ts",
|
@@ -45,9 +45,9 @@
|
|
45
45
|
"react-stately": "^3.31.1",
|
46
46
|
"react-swipeable": "^7.0.1",
|
47
47
|
"usehooks-ts": "^3.1.0",
|
48
|
-
"@vygruppen/spor-
|
48
|
+
"@vygruppen/spor-loader": "0.6.0",
|
49
49
|
"@vygruppen/spor-icon-react": "4.1.0",
|
50
|
-
"@vygruppen/spor-
|
50
|
+
"@vygruppen/spor-design-tokens": "4.0.7"
|
51
51
|
},
|
52
52
|
"devDependencies": {
|
53
53
|
"@react-types/datepicker": "^3.10.0",
|
@@ -75,7 +75,13 @@ export const AccordionItemTrigger = forwardRef<
|
|
75
75
|
HTMLButtonElement,
|
76
76
|
AccordionItemTriggerProps
|
77
77
|
>(function AccordionItemTrigger(props, ref) {
|
78
|
-
const {
|
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
|
-
|
91
|
-
|
92
|
-
|
95
|
+
{showChevron && (
|
96
|
+
<ChakraAccordion.ItemIndicator>
|
97
|
+
<DropdownDownFill24Icon />
|
98
|
+
</ChakraAccordion.ItemIndicator>
|
99
|
+
)}
|
93
100
|
</ChakraAccordion.ItemTrigger>
|
94
101
|
</Box>
|
95
102
|
);
|
package/src/accordion/types.ts
CHANGED
@@ -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
|
package/src/logo/VyLogo.tsx
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
import
|
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 =
|
30
|
+
type VyLogoProps = ComponentProps<typeof SvgBox>;
|
31
31
|
|
32
32
|
export const VyLogo = forwardRef<SVGSVGElement, VyLogoProps>((props, ref) => {
|
33
33
|
const id = useId();
|
package/src/logo/VyLogoPride.tsx
CHANGED
@@ -1,9 +1,8 @@
|
|
1
|
-
import {
|
2
|
-
import { forwardRef, useId } from "react";
|
1
|
+
import { ComponentProps, forwardRef, useId } from "react";
|
3
2
|
|
4
3
|
import { SvgBox } from "./VyLogo";
|
5
4
|
|
6
|
-
|
5
|
+
type VyLogoPrideProps = ComponentProps<typeof SvgBox>;
|
7
6
|
|
8
7
|
export const VyLogoPride = forwardRef<SVGSVGElement, VyLogoPrideProps>(
|
9
8
|
(props, ref) => {
|
package/src/table/Table.tsx
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
"use client";
|
2
2
|
import {
|
3
|
-
Box,
|
4
3
|
RecipeVariantProps,
|
5
4
|
Table as ChakraTable,
|
6
5
|
TableRootProps as ChakraTableProps,
|
@@ -39,27 +38,16 @@ export const Table = forwardRef<HTMLTableElement, TableProps>((props, ref) => {
|
|
39
38
|
const recipe = useSlotRecipe({ recipe: tableSlotRecipe });
|
40
39
|
const styles = recipe({ variant, size });
|
41
40
|
return (
|
42
|
-
<
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
</Box>
|
41
|
+
<ChakraTable.Root
|
42
|
+
variant={variant}
|
43
|
+
size={size}
|
44
|
+
colorPalette={colorPalette}
|
45
|
+
css={styles}
|
46
|
+
ref={ref}
|
47
|
+
{...props}
|
48
|
+
>
|
49
|
+
{children}
|
50
|
+
</ChakraTable.Root>
|
53
51
|
);
|
54
52
|
});
|
55
53
|
Table.displayName = "Table";
|
56
|
-
|
57
|
-
function getStyleProps(props: TableProps) {
|
58
|
-
return props.variant === "core"
|
59
|
-
? {
|
60
|
-
borderRadius: "sm",
|
61
|
-
border: "sm",
|
62
|
-
borderColor: "outline.disabled",
|
63
|
-
}
|
64
|
-
: {};
|
65
|
-
}
|
package/src/table/index.tsx
CHANGED
@@ -22,15 +22,12 @@ export const tableSlotRecipe = defineSlotRecipe({
|
|
22
22
|
columnHeader: {
|
23
23
|
fontWeight: "bold",
|
24
24
|
textAlign: "start",
|
25
|
-
|
26
|
-
borderColor: "outline.disabled",
|
25
|
+
|
27
26
|
...numericStyles,
|
28
27
|
paddingX: 1.5,
|
29
28
|
paddingY: 1,
|
30
29
|
},
|
31
30
|
row: {
|
32
|
-
borderBottom: "sm",
|
33
|
-
borderColor: "outline.disabled",
|
34
31
|
...numericStyles,
|
35
32
|
},
|
36
33
|
cell: {
|
@@ -85,7 +82,6 @@ export const tableSlotRecipe = defineSlotRecipe({
|
|
85
82
|
backgroundColor: "none",
|
86
83
|
},
|
87
84
|
columnHeader: {
|
88
|
-
borderLeft: "none",
|
89
85
|
borderBottom: "sm",
|
90
86
|
borderColor: "outline.disabled",
|
91
87
|
backgroundColor: "none",
|
@@ -93,46 +89,59 @@ export const tableSlotRecipe = defineSlotRecipe({
|
|
93
89
|
},
|
94
90
|
|
95
91
|
cell: {
|
92
|
+
...numericStyles,
|
93
|
+
},
|
94
|
+
row: {
|
96
95
|
borderBottom: "sm",
|
97
96
|
borderColor: "outline.disabled",
|
98
97
|
...numericStyles,
|
99
|
-
_first: {
|
100
|
-
borderLeft: "none",
|
101
|
-
},
|
102
98
|
},
|
103
99
|
},
|
104
100
|
|
105
101
|
core: {
|
102
|
+
root: {
|
103
|
+
boxShadow: "0 0 0 1px var(--shadow-color)",
|
104
|
+
shadowColor: "outline.disabled",
|
105
|
+
borderRadius: "sm",
|
106
|
+
},
|
107
|
+
|
106
108
|
table: {
|
107
|
-
borderRadius: "md",
|
108
109
|
overflow: "hidden",
|
109
|
-
border: "sm",
|
110
|
-
borderColor: "outline.disabled",
|
111
110
|
},
|
112
111
|
cell: {
|
113
|
-
borderLeft: "sm",
|
114
|
-
borderColor: "outline.disabled",
|
115
112
|
...numericStyles,
|
116
|
-
|
117
|
-
|
113
|
+
|
114
|
+
borderRight: "sm",
|
115
|
+
borderColor: "outline.disabled",
|
116
|
+
|
117
|
+
_last: {
|
118
|
+
borderRight: "none",
|
118
119
|
},
|
119
120
|
},
|
120
|
-
|
121
|
-
border: "none",
|
122
|
-
},
|
121
|
+
|
123
122
|
columnHeader: {
|
124
|
-
borderBottom: "sm",
|
125
|
-
borderLeft: "sm",
|
126
|
-
borderLeftColor: "outline.disabled",
|
127
123
|
...numericStyles,
|
124
|
+
|
125
|
+
borderRight: "sm",
|
126
|
+
borderColor: "outline.disabled",
|
127
|
+
|
128
128
|
_first: {
|
129
|
-
|
129
|
+
borderTopLeftRadius: "sm",
|
130
|
+
},
|
131
|
+
_last: {
|
132
|
+
borderTopRightRadius: "sm",
|
133
|
+
borderRight: "none",
|
130
134
|
},
|
131
135
|
},
|
136
|
+
header: {
|
137
|
+
borderBottom: "sm",
|
138
|
+
borderColor: "outline.disabled",
|
139
|
+
},
|
132
140
|
row: {
|
133
141
|
...numericStyles,
|
134
142
|
borderBottom: "sm",
|
135
143
|
borderColor: "outline.disabled",
|
144
|
+
|
136
145
|
_last: {
|
137
146
|
borderBottom: "none",
|
138
147
|
},
|