@versini/ui-types 1.1.0 → 2.1.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 +25 -24
  2. package/package.json +2 -2
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.
@@ -59,7 +42,7 @@ type CommonButtonProps = {
59
42
  * The rounded style of the Button.
60
43
  */
61
44
  radius?: "small" | "medium" | "large";
62
- } & SpacingTypes.Props;
45
+ };
63
46
 
64
47
  declare namespace ButtonTypes {
65
48
  export type Props = {
@@ -123,7 +106,7 @@ declare namespace ButtonIconTypes {
123
106
  children: React.ReactNode;
124
107
  /**
125
108
  * Cell content alignment.
126
- * @default "center"
109
+ * @default center
127
110
  */
128
111
  align?: "left" | "right" | "center";
129
112
  /**
@@ -152,8 +135,26 @@ declare namespace ButtonSortTypes {
152
135
  * Prop to signal if the Button is active.
153
136
  */
154
137
  active?: boolean;
155
- } & ButtonIconTypes.Props &
156
- React.ButtonHTMLAttributes<HTMLButtonElement>;
138
+ } & ButtonIconTypes.Props;
139
+ }
140
+
141
+ declare namespace ButtonCopyTypes {
142
+ export type Props = {
143
+ /**
144
+ * What kind of text to copy to the clipboard.
145
+ * - If a string is passed, that string will be copied.
146
+ */
147
+ copyToClipboard: string;
148
+ } & Omit<
149
+ ButtonIconTypes.Props,
150
+ | "children"
151
+ | "align"
152
+ | "label"
153
+ | "labelLeft"
154
+ | "labelRight"
155
+ | "fullWidth"
156
+ | "size"
157
+ >;
157
158
  }
158
159
 
159
160
  declare namespace CardTypes {
@@ -204,7 +205,7 @@ declare namespace CardTypes {
204
205
  * @default false
205
206
  */
206
207
  noBorder?: boolean;
207
- } & SpacingTypes.Props;
208
+ };
208
209
 
209
210
  export type HeaderProps = {
210
211
  className: string;
@@ -346,7 +347,7 @@ declare namespace SvgIconTypes {
346
347
  * The viewBox to use. If not provided, the default viewBox will be used.
347
348
  */
348
349
  viewBox?: string;
349
- } & SpacingTypes.Props;
350
+ };
350
351
  }
351
352
 
352
- export { ButtonIconTypes, ButtonLinkTypes, ButtonSortTypes, ButtonTypes, CardTypes, LiveRegionTypes, ModalTypes, SpacingTypes, SvgIconTypes };
353
+ export { ButtonCopyTypes, 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.1.0",
3
+ "version": "2.1.0",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -32,5 +32,5 @@
32
32
  "react": "^18.3.1 || ^19.0.0",
33
33
  "react-dom": "^18.3.1 || ^19.0.0"
34
34
  },
35
- "gitHead": "900bc75dfbd7b5635476cfd59ba97711ce7be2fc"
35
+ "gitHead": "1221c66705bd1e8a31981a21a9566c8db647ab5c"
36
36
  }