@react-hive/honey-style 7.1.0 → 8.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.
@@ -1,4 +1,5 @@
1
- import type { HoneyCssColor, HoneyCssDimensionUnit, HoneyCssDimensionValue, HoneyCssSpacingValue } from '../css';
1
+ import type { HoneyCssDimensionUnit } from '@react-hive/honey-css';
2
+ import type { HoneyCssColor, HoneyCssDimensionValue, HoneyCssSpacingValue } from '../css';
2
3
  import type { Nullable, HoneyTheme, HoneyColorKey, HoneyDimensionName, HoneyFontName, HoneySpacings, HoneyStyledInterpolation } from '../types';
3
4
  import type { HoneyResolveSpacingResult } from '../utils';
4
5
  export interface HoneyStyleContextValue {
@@ -1,3 +1,3 @@
1
- import type { HoneyCssColorProperty, HoneyCssSpacingProperty } from './types';
1
+ import type { HoneyCssColorProperty, HoneyCssSpacingProperty } from '@react-hive/honey-css';
2
2
  export declare const CSS_SPACING_PROPERTIES: readonly HoneyCssSpacingProperty[];
3
3
  export declare const CSS_COLOR_PROPERTIES: readonly HoneyCssColorProperty[];
package/dist/css/css.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as CSS from 'csstype';
2
- import type { HoneyCssColorProperty, HoneyCssSpacingProperty } from './types';
2
+ import type { HoneyCssColorProperty, HoneyCssSpacingProperty } from '@react-hive/honey-css';
3
3
  import type { HoneyStyledInterpolation, HoneyStyledContext } from '../types';
4
4
  /**
5
5
  * Checks whether a CSS property is spacing-related.
@@ -1,42 +1,12 @@
1
1
  import type { HexColor } from '@react-hive/honey-utils';
2
+ import type { HoneyCssDimensionUnit } from '@react-hive/honey-css';
2
3
  import * as CSS from 'csstype';
3
4
  export type HoneyCssClassName = string | undefined;
4
5
  /**
5
6
  * Represents any valid CSS color, either a named color (like `'red'`, `'blue'`)
6
7
  * or a hexadecimal color code (like `'#ff0000'`).
7
8
  */
8
- export type HoneyCssColor = HexColor | CSS.DataType.ColorBase | CSS.Globals;
9
- /**
10
- * Represents absolute CSS dimension units.
11
- *
12
- * These units are fixed in physical measurements.
13
- *
14
- * - `'px'` — pixels
15
- * - `'cm'` — centimeters
16
- * - `'mm'` — millimeters
17
- * - `'in'` — inches
18
- * - `'pt'` — points
19
- * - `'pc'` — picas
20
- */
21
- type HoneyCssAbsoluteDimensionUnit = 'px' | 'cm' | 'mm' | 'in' | 'pt' | 'pc';
22
- /**
23
- * Represents relative CSS dimension units.
24
- *
25
- * These units scale depending on the context.
26
- *
27
- * - `'em'` — relative to the font-size of the element
28
- * - `'rem'` — relative to the font-size of the root element
29
- * - `'%'` — percentage of the parent element
30
- * - `'vh'` — 1% of the viewport height
31
- * - `'vw'` — 1% of the viewport width
32
- * - `'vmin'` — 1% of the smaller dimension of the viewport
33
- * - `'vmax'` — 1% of the larger dimension of the viewport
34
- */
35
- type HoneyCssRelativeDimensionUnit = 'em' | 'rem' | '%' | 'vh' | 'vw' | 'vmin' | 'vmax';
36
- /**
37
- * Represents any valid CSS dimension unit, including both absolute and relative types.
38
- */
39
- export type HoneyCssDimensionUnit = HoneyCssAbsoluteDimensionUnit | HoneyCssRelativeDimensionUnit;
9
+ export type HoneyCssColor = HexColor | CSS.Property.Color;
40
10
  /**
41
11
  * Represents a numeric CSS dimension value with an optional specific unit.
42
12
  *
@@ -105,19 +75,3 @@ export type HoneyCssMultiValue<T> = T | HoneyCssShorthandTuple<T>;
105
75
  */
106
76
  export type HoneyCssSpacingValue = HoneyCssMultiValue<number | HoneyCssDimensionValue>;
107
77
  export type HoneyRawCssSpacingValue = number | HoneyCssDimensionValue | CSS.Globals;
108
- /**
109
- * Represents CSS properties related to spacing and positioning.
110
- */
111
- export type HoneyCssSpacingProperty = keyof Pick<CSS.Properties, 'margin' | 'marginTop' | 'marginRight' | 'marginBottom' | 'marginLeft' | 'padding' | 'paddingTop' | 'paddingRight' | 'paddingBottom' | 'paddingLeft' | 'paddingBlock' | 'paddingBlockStart' | 'paddingBlockEnd' | 'top' | 'right' | 'bottom' | 'left' | 'inset' | 'gap' | 'rowGap' | 'columnGap'>;
112
- /**
113
- * Represents shorthand spacing properties that support multi-value arrays.
114
- *
115
- * These properties accept 2–4 space-separated values
116
- * to control spacing on multiple sides (e.g., top, right, bottom, left).
117
- */
118
- export type HoneyCssShorthandSpacingProperty = keyof Pick<CSS.Properties, 'margin' | 'padding' | 'gap'>;
119
- /**
120
- * Represents a subset of CSS properties that define color-related styles.
121
- */
122
- export type HoneyCssColorProperty = keyof Pick<CSS.Properties, 'color' | 'backgroundColor' | 'borderColor' | 'borderTopColor' | 'borderRightColor' | 'borderBottomColor' | 'borderLeftColor' | 'outlineColor' | 'textDecorationColor' | 'fill' | 'stroke'>;
123
- export {};