@react-hive/honey-layout 17.1.0 → 17.2.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/dist/components/HoneyBox/HoneyBox.d.ts +7 -5
- package/dist/components/HoneyFlex/HoneyFlex.d.ts +1 -1
- package/dist/components/HoneyGrid/HoneyGridStyled.d.ts +1 -1
- package/dist/components/HoneyGridColumn/HoneyGridColumnStyled.d.ts +1 -1
- package/dist/components/HoneyList/HoneyListStyled.d.ts +1 -1
- package/dist/components/HoneyPopup/HoneyPopupStyled.d.ts +1 -1
- package/dist/constants.d.ts +1 -0
- package/dist/helpers/helpers.d.ts +3 -3
- package/dist/index.cjs +12 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.dev.cjs +22 -33
- package/dist/index.dev.cjs.map +1 -1
- package/dist/index.mjs +22 -22
- package/dist/index.mjs.map +1 -1
- package/dist/types/css.types.d.ts +13 -8
- package/package.json +2 -2
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as CSS from 'csstype';
|
|
5
5
|
import type { HoneyBreakpointName, HoneyColor, HoneyCssColorProperty, HoneyCssShorthandSpacingProperty, HoneyCssSpacingProperty, HoneyCssSpacingValue, HoneyRawCssSpacingValue, HoneyStyledContext } from '@react-hive/honey-style';
|
|
6
|
+
import { HONEY_LAYOUT_CSS_PROPERTY_PREFIX } from '../constants';
|
|
6
7
|
/**
|
|
7
8
|
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/easing-function/steps#step-position
|
|
8
9
|
*/
|
|
@@ -57,23 +58,27 @@ type HoneyResponsiveCssPropertyValue<CSSProperty extends keyof CSS.Properties> =
|
|
|
57
58
|
*/
|
|
58
59
|
export type HoneyCssPropertyValue<CSSProperty extends keyof CSS.Properties> = HoneyRawCssPropertyValue<CSSProperty> | HoneyCssPropertyValueFn<CSSProperty> | HoneyResponsiveCssPropertyValue<CSSProperty>;
|
|
59
60
|
/**
|
|
60
|
-
* A utility type
|
|
61
|
+
* A utility type that adds the configured CSS property prefix to a given CSS property name.
|
|
62
|
+
*
|
|
63
|
+
* The actual prefix is defined by `HONEY_LAYOUT_CSS_PROPERTY_PREFIX`.
|
|
61
64
|
*
|
|
62
65
|
* @template CSSProperty - The string type representing a CSS property name.
|
|
63
66
|
*/
|
|
64
|
-
export type
|
|
67
|
+
export type HoneyPrefixedCssProperty<CSSProperty extends keyof CSS.Properties = keyof CSS.Properties> = `${typeof HONEY_LAYOUT_CSS_PROPERTY_PREFIX}${CSSProperty}`;
|
|
65
68
|
/**
|
|
66
|
-
* Represents an object where each key is a
|
|
69
|
+
* Represents an object where each key is a CSS property name with the configured prefix.
|
|
70
|
+
*
|
|
71
|
+
* The actual prefix is defined by `HONEY_LAYOUT_CSS_PROPERTY_PREFIX`.
|
|
67
72
|
*
|
|
68
73
|
* Example:
|
|
69
|
-
* ```
|
|
70
|
-
* const styles:
|
|
74
|
+
* ```ts
|
|
75
|
+
* const styles: HoneyPrefixedCssProperties = {
|
|
71
76
|
* $color: 'red',
|
|
72
|
-
* $fontSize: '12px'
|
|
77
|
+
* $fontSize: '12px',
|
|
73
78
|
* };
|
|
74
79
|
* ```
|
|
75
80
|
*/
|
|
76
|
-
export type
|
|
77
|
-
[CSSProperty in keyof CSS.Properties as
|
|
81
|
+
export type HoneyPrefixedCssProperties = {
|
|
82
|
+
[CSSProperty in keyof CSS.Properties as HoneyPrefixedCssProperty<CSSProperty>]?: HoneyCssPropertyValue<CSSProperty>;
|
|
78
83
|
};
|
|
79
84
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-hive/honey-layout",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.2.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"!dist/**/__tests__"
|
|
35
35
|
],
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@react-hive/honey-style": "^
|
|
37
|
+
"@react-hive/honey-style": "^7.0.0",
|
|
38
38
|
"react": "^19.0.0",
|
|
39
39
|
"react-dom": "^19.0.0"
|
|
40
40
|
},
|