@react-hive/honey-layout 16.0.0 → 16.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.
- package/dist/components/HoneyBox/HoneyBox.d.ts +5 -5
- package/dist/components/HoneyFlex/HoneyFlex.d.ts +2 -2
- package/dist/components/HoneyGrid/HoneyGridStyled.d.ts +2 -2
- package/dist/components/HoneyGridColumn/HoneyGridColumnStyled.d.ts +2 -2
- package/dist/components/HoneyList/HoneyListStyled.d.ts +2 -2
- package/dist/components/HoneyPopup/HoneyPopupStyled.d.ts +2 -2
- package/dist/effects.d.ts +2 -2
- package/dist/helpers/helpers.d.ts +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.dev.cjs +12 -13
- package/dist/index.dev.cjs.map +1 -1
- package/dist/index.mjs +10 -10
- package/dist/index.mjs.map +1 -1
- package/dist/types/css.types.d.ts +11 -11
- package/package.json +2 -2
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
* The types for handling CSS properties and values, focusing on dimensions, colors, media queries, and other essential CSS concepts.
|
|
3
3
|
*/
|
|
4
4
|
import * as CSS from 'csstype';
|
|
5
|
-
import type { HoneyBreakpointName,
|
|
5
|
+
import type { HoneyBreakpointName, HoneyColor, HoneyCssColorProperty, HoneyCssShorthandSpacingProperty, HoneyCssSpacingProperty, HoneyCssSpacingValue, HoneyRawCssSpacingValue, HoneyStyledContext } from '@react-hive/honey-style';
|
|
6
6
|
/**
|
|
7
7
|
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/easing-function/steps#step-position
|
|
8
8
|
*/
|
|
9
|
-
type
|
|
9
|
+
type HoneyCssStepFunctionPosition = 'jump-start' | 'jump-end' | 'jump-none' | 'jump-both' | 'start' | 'end';
|
|
10
10
|
/**
|
|
11
11
|
* Defining the allowed timing functions for the transition
|
|
12
12
|
*/
|
|
13
|
-
export type
|
|
13
|
+
export type HoneyCssTimingFunction = 'ease' | 'linear' | `linear(${string})` | `cubic-bezier(${number}, ${number}, ${number}, ${number})` | 'ease-in' | 'ease-out' | 'ease-in-out' | 'step-start' | 'step-end' | `steps(${number})` | `steps(${number}, ${HoneyCssStepFunctionPosition})`;
|
|
14
14
|
/**
|
|
15
15
|
* A type representing a function that returns a value for a specific CSS property based on the provided theme.
|
|
16
16
|
*
|
|
17
17
|
* @template CSSProperty - The CSS property this function will generate a value for.
|
|
18
18
|
*/
|
|
19
|
-
type
|
|
19
|
+
type HoneyCssPropertyValueFn<CSSProperty extends keyof CSS.Properties> = (context: HoneyStyledContext<object>) => CSS.Properties[CSSProperty];
|
|
20
20
|
/**
|
|
21
21
|
* Represents a non-responsive (raw) CSS property value for a specific CSS property.
|
|
22
22
|
*
|
|
@@ -29,7 +29,7 @@ type HoneyCSSPropertyValueFn<CSSProperty extends keyof CSS.Properties> = (contex
|
|
|
29
29
|
*
|
|
30
30
|
* @template CSSProperty - The name of the CSS property.
|
|
31
31
|
*/
|
|
32
|
-
type
|
|
32
|
+
type HoneyRawCssPropertyValue<CSSProperty extends keyof CSS.Properties> = CSSProperty extends HoneyCssColorProperty ? HoneyColor : CSSProperty extends HoneyCssShorthandSpacingProperty ? HoneyCssSpacingValue : CSSProperty extends HoneyCssSpacingProperty ? HoneyRawCssSpacingValue : CSS.Properties[CSSProperty];
|
|
33
33
|
/**
|
|
34
34
|
* Represents a responsive CSS property value for a specific CSS property.
|
|
35
35
|
*
|
|
@@ -41,8 +41,8 @@ type HoneyRawCSSPropertyValue<CSSProperty extends keyof CSS.Properties> = CSSPro
|
|
|
41
41
|
*
|
|
42
42
|
* @template CSSProperty - The key of a CSS property for which values are defined.
|
|
43
43
|
*/
|
|
44
|
-
type
|
|
45
|
-
[K in HoneyBreakpointName]?:
|
|
44
|
+
type HoneyResponsiveCssPropertyValue<CSSProperty extends keyof CSS.Properties> = {
|
|
45
|
+
[K in HoneyBreakpointName]?: HoneyRawCssPropertyValue<CSSProperty> | HoneyCssPropertyValueFn<CSSProperty>;
|
|
46
46
|
};
|
|
47
47
|
/**
|
|
48
48
|
* Represents a CSS property value that can be either a single value or a responsive value.
|
|
@@ -55,13 +55,13 @@ type HoneyResponsiveCSSPropertyValue<CSSProperty extends keyof CSS.Properties> =
|
|
|
55
55
|
*
|
|
56
56
|
* @template CSSProperty - The key of a CSS property to check.
|
|
57
57
|
*/
|
|
58
|
-
export type
|
|
58
|
+
export type HoneyCssPropertyValue<CSSProperty extends keyof CSS.Properties> = HoneyRawCssPropertyValue<CSSProperty> | HoneyCssPropertyValueFn<CSSProperty> | HoneyResponsiveCssPropertyValue<CSSProperty>;
|
|
59
59
|
/**
|
|
60
60
|
* A utility type to add a `$` prefix to a given CSS property name.
|
|
61
61
|
*
|
|
62
62
|
* @template CSSProperty - The string type representing a CSS property name.
|
|
63
63
|
*/
|
|
64
|
-
export type Honey$
|
|
64
|
+
export type Honey$PrefixedCssProperty<CSSProperty extends keyof CSS.Properties = keyof CSS.Properties> = `$${CSSProperty}`;
|
|
65
65
|
/**
|
|
66
66
|
* Represents an object where each key is a prefixed CSS property (with a `$` prefix).
|
|
67
67
|
*
|
|
@@ -73,7 +73,7 @@ export type Honey$PrefixedCSSProperty<CSSProperty extends keyof CSS.Properties =
|
|
|
73
73
|
* };
|
|
74
74
|
* ```
|
|
75
75
|
*/
|
|
76
|
-
export type Honey$
|
|
77
|
-
[CSSProperty in keyof CSS.Properties as Honey$
|
|
76
|
+
export type Honey$PrefixedCssProperties = {
|
|
77
|
+
[CSSProperty in keyof CSS.Properties as Honey$PrefixedCssProperty<CSSProperty>]?: HoneyCssPropertyValue<CSSProperty>;
|
|
78
78
|
};
|
|
79
79
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-hive/honey-layout",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.1.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"!dist/**/jest*"
|
|
34
34
|
],
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@react-hive/honey-style": "^
|
|
36
|
+
"@react-hive/honey-style": "^5.0.0",
|
|
37
37
|
"react": "^19.0.0",
|
|
38
38
|
"react-dom": "^19.0.0"
|
|
39
39
|
},
|