@vygruppen/spor-react 12.6.3 → 12.7.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/package.json CHANGED
@@ -1,16 +1,17 @@
1
1
  {
2
2
  "name": "@vygruppen/spor-react",
3
- "version": "12.6.3",
3
+ "type": "module",
4
+ "version": "12.7.0",
4
5
  "exports": {
5
6
  ".": {
6
7
  "types": "./dist/index.d.ts",
7
8
  "import": "./dist/index.mjs",
8
- "require": "./dist/index.js"
9
+ "require": "./dist/index.cjs"
9
10
  },
10
11
  "./icons": {
11
12
  "types": "./dist/icons/index.d.ts",
12
13
  "import": "./dist/icons/index.mjs",
13
- "require": "./dist/icons/index.js"
14
+ "require": "./dist/icons/index.cjs"
14
15
  }
15
16
  },
16
17
  "license": "MIT",
@@ -18,7 +19,7 @@
18
19
  "homepage": "https://github.com/nsbno/spor/tree/main/packages/spor-react",
19
20
  "repository": {
20
21
  "type": "git",
21
- "url": "https://github.com/nsbno/spor.git",
22
+ "url": "git+https://github.com/nsbno/spor.git",
22
23
  "directory": "packages/spor-react"
23
24
  },
24
25
  "dependencies": {
@@ -47,7 +48,7 @@
47
48
  "usehooks-ts": "^3.1.0",
48
49
  "@vygruppen/spor-design-tokens": "4.0.7",
49
50
  "@vygruppen/spor-icon-react": "4.2.1",
50
- "@vygruppen/spor-loader": "0.6.0"
51
+ "@vygruppen/spor-loader": "0.7.0"
51
52
  },
52
53
  "devDependencies": {
53
54
  "@react-types/datepicker": "^3.10.0",
@@ -66,8 +67,8 @@
66
67
  "vitest": "^0.26.3",
67
68
  "vitest-axe": "^0.1.0",
68
69
  "vitest-canvas-mock": "^0.2.2",
69
- "@vygruppen/tsconfig": "0.1.0",
70
- "@vygruppen/eslint-config": "1.1.1"
70
+ "@vygruppen/eslint-config": "1.1.1",
71
+ "@vygruppen/tsconfig": "0.1.1"
71
72
  },
72
73
  "peerDependencies": {
73
74
  "react": ">=18.0.0 <19.0.0",
@@ -9,8 +9,8 @@ import {
9
9
  useFieldContext,
10
10
  useSlotRecipe,
11
11
  } from "@chakra-ui/react";
12
- import { DateValue } from "@internationalized/date";
13
12
  import { PropsWithChildren, useRef } from "react";
13
+ import { DateValue } from "react-aria";
14
14
  import {
15
15
  AriaDateRangePickerProps,
16
16
  I18nProvider,
@@ -15,8 +15,6 @@ export const buttonRecipe = defineRecipe({
15
15
  cursor: "pointer",
16
16
  textWrap: "wrap",
17
17
  width: "fit-content",
18
- paddingX: 3,
19
- paddingY: 1,
20
18
  _disabled: {
21
19
  cursor: "not-allowed",
22
20
  pointerEvents: "none",
@@ -98,27 +96,30 @@ export const buttonRecipe = defineRecipe({
98
96
  xs: {
99
97
  minHeight: 5,
100
98
  minWidth: 5,
101
- paddingY: 0.5,
102
- fontSize: "xs",
99
+ paddingX: 1.5,
100
+ fontSize: "mobile.xs",
103
101
  fontWeight: "normal",
104
102
  },
105
103
  sm: {
106
104
  minHeight: 6,
107
105
  minWidth: 6,
108
- fontSize: "xs",
106
+ paddingX: 2,
107
+ fontSize: "mobile.sm",
109
108
  fontWeight: "normal",
110
109
  },
111
110
  md: {
112
111
  minHeight: 7,
113
112
  minWidth: 7,
114
- fontSize: "sm",
113
+ fontSize: "mobile.md",
115
114
  fontWeight: "bold",
115
+ paddingX: 3,
116
116
  },
117
117
  lg: {
118
118
  minHeight: 8,
119
119
  minWidth: 8,
120
- fontSize: "sm",
120
+ fontSize: "mobile.md",
121
121
  fontWeight: "bold",
122
+ paddingX: 3,
122
123
  },
123
124
  },
124
125
  },
@@ -38,15 +38,13 @@ export const fieldSlotRecipe = defineSlotRecipe({
38
38
  _after: {
39
39
  content: "''",
40
40
  position: "absolute",
41
- marginTop: "-0.45em",
41
+ top: 0,
42
42
  left: "1em",
43
- width: 0,
44
- height: 0,
45
- transform: "rotate(45deg)",
46
- borderLeft: "0.5em solid transparent",
47
- borderRight: "0.5em solid transparent",
48
- borderBottom: "0.5em solid",
49
- borderColor: "lightRed",
43
+ width: "0.5rem",
44
+ height: "0.5rem",
45
+ backgroundColor: "lightRed",
46
+ transform: "translateY(-50%) rotate(45deg)",
47
+ pointerEvents: "none",
50
48
  },
51
49
  },
52
50
  },
package/tsup.config.ts CHANGED
@@ -1,9 +1,15 @@
1
1
  import { defineConfig } from "tsup";
2
2
 
3
- export default defineConfig({
3
+ export default defineConfig(({ watch }) => ({
4
4
  entry: ["src/index.tsx", "src/icons/index.tsx"],
5
- format: ["cjs", "esm"],
5
+ format: ["esm", "cjs"],
6
6
  dts: true,
7
7
  treeshake: true,
8
8
  sourcemap: true,
9
- });
9
+ splitting: false,
10
+ clean: !watch, // avoid deleting ./dist when dev/watch starts
11
+ outDir: "dist",
12
+ outExtension: ({ format }) => ({
13
+ js: format === "esm" ? ".mjs" : ".cjs",
14
+ }),
15
+ }));