@versini/ui-types 1.0.0 → 2.0.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +9 -22
  2. package/package.json +12 -3
package/dist/index.d.ts CHANGED
@@ -1,22 +1,5 @@
1
1
  import React$1 from 'react';
2
2
 
3
- declare namespace SpacingTypes {
4
- export type Types =
5
- | undefined
6
- | string
7
- | number
8
- | {
9
- b?: number;
10
- l?: number;
11
- r?: number;
12
- t?: number;
13
- };
14
-
15
- export type Props = {
16
- spacing?: Types;
17
- };
18
- }
19
-
20
3
  type CommonButtonProps = {
21
4
  /**
22
5
  * CSS class(es) to add to the main component wrapper.
@@ -55,7 +38,11 @@ type CommonButtonProps = {
55
38
  * The size of the Button.
56
39
  */
57
40
  size?: "small" | "medium" | "large";
58
- } & SpacingTypes.Props;
41
+ /**
42
+ * The rounded style of the Button.
43
+ */
44
+ radius?: "small" | "medium" | "large";
45
+ };
59
46
 
60
47
  declare namespace ButtonTypes {
61
48
  export type Props = {
@@ -83,7 +70,7 @@ declare namespace ButtonTypes {
83
70
  /**
84
71
  * The variant style of the Button.
85
72
  */
86
- variant?: "primary" | "secondary" | "danger";
73
+ variant?: "primary" | "secondary" | "danger" | "selected";
87
74
  } & CommonButtonProps &
88
75
  React.ButtonHTMLAttributes<HTMLButtonElement>;
89
76
  }
@@ -200,7 +187,7 @@ declare namespace CardTypes {
200
187
  * @default false
201
188
  */
202
189
  noBorder?: boolean;
203
- } & SpacingTypes.Props;
190
+ };
204
191
 
205
192
  export type HeaderProps = {
206
193
  className: string;
@@ -342,7 +329,7 @@ declare namespace SvgIconTypes {
342
329
  * The viewBox to use. If not provided, the default viewBox will be used.
343
330
  */
344
331
  viewBox?: string;
345
- } & SpacingTypes.Props;
332
+ };
346
333
  }
347
334
 
348
- export { ButtonIconTypes, ButtonLinkTypes, ButtonSortTypes, ButtonTypes, CardTypes, LiveRegionTypes, ModalTypes, SpacingTypes, SvgIconTypes };
335
+ export { ButtonIconTypes, ButtonLinkTypes, ButtonSortTypes, ButtonTypes, CardTypes, LiveRegionTypes, ModalTypes, SvgIconTypes };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/ui-types",
3
- "version": "1.0.0",
3
+ "version": "2.0.0",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -21,7 +21,16 @@
21
21
  "build:check": "tsc",
22
22
  "build:types": "tsup",
23
23
  "build": "npm-run-all --serial clean build:check build:types",
24
- "clean": "rimraf dist tmp"
24
+ "clean": "rimraf dist tmp",
25
+ "dev:types": "tsup --watch src",
26
+ "dev": "npm-run-all clean --parallel dev:types",
27
+ "test:coverage": "vitest run --coverage",
28
+ "test:watch": "vitest",
29
+ "test": "vitest run"
25
30
  },
26
- "gitHead": "abbb7b1770a9130157721d514fe20267fd15f35e"
31
+ "peerDependencies": {
32
+ "react": "^18.3.1 || ^19.0.0",
33
+ "react-dom": "^18.3.1 || ^19.0.0"
34
+ },
35
+ "gitHead": "1ac4ef9fd8d68f6e247711f623af2f6bec72df23"
27
36
  }