@mirohq/design-system-types 0.4.1 → 0.6.0-use-press.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/CHANGELOG.md +12 -0
- package/package.json +1 -1
- package/src/global.d.ts +7 -0
- package/src/react.d.ts +15 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @mirohq-internal/design-system-types
|
|
2
2
|
|
|
3
|
+
## 0.6.0-use-press.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#212](https://github.com/miroapp-dev/design-system/pull/212) [`af64a21f`](https://github.com/miroapp-dev/design-system/commit/af64a21f20d03be51d0aba2786cdb015aa136889) Thanks [@ivanbanov](https://github.com/ivanbanov)! - Added DOMEvenAttributes type
|
|
8
|
+
|
|
9
|
+
## 0.5.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#170](https://github.com/miroapp-dev/design-system/pull/170) [`8c6c5c23`](https://github.com/miroapp-dev/design-system/commit/8c6c5c23e7f57617e610eeaa77d708cb8c029a5e) Thanks [@skarensmoll](https://github.com/skarensmoll)! - Included ExtractValidKeys type
|
|
14
|
+
|
|
3
15
|
## 0.4.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/package.json
CHANGED
package/src/global.d.ts
CHANGED
|
@@ -3,3 +3,10 @@ export type Nullable<T> = T | null | undefined
|
|
|
3
3
|
export type Numeric = number | `${number}`
|
|
4
4
|
|
|
5
5
|
export type Booleanish = boolean | `${boolean}`
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Extracts valid key properties from object.
|
|
9
|
+
*/
|
|
10
|
+
export type ExtractValidKeys<T> = T extends string | number | boolean | symbol
|
|
11
|
+
? T
|
|
12
|
+
: never
|
package/src/react.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
HTMLProps,
|
|
3
|
+
ComponentProps,
|
|
4
|
+
ElementType,
|
|
5
|
+
DOMAttributes,
|
|
6
|
+
} from 'react'
|
|
2
7
|
|
|
3
8
|
/**
|
|
4
9
|
* Automatically infers the type of the HTML element based on the component props
|
|
@@ -16,3 +21,12 @@ export type OnlyHTMLAttributes<T extends ElementType> = Pick<
|
|
|
16
21
|
ComponentProps<T>,
|
|
17
22
|
keyof HTMLProps<InferHTMLElement<T>>
|
|
18
23
|
>
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Only `on` DOMAttributes
|
|
27
|
+
*/
|
|
28
|
+
export type DOMEventAttributes<T> = {
|
|
29
|
+
[K in keyof DOMAttributes<T> as K extends `on${string}`
|
|
30
|
+
? K
|
|
31
|
+
: never]: DOMAttributes<T>
|
|
32
|
+
}
|