@react-hive/honey-layout 5.6.0-beta → 6.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.
Files changed (35) hide show
  1. package/LICENSE +1 -1
  2. package/dist/components/HoneyBox/HoneyBox.d.ts +14 -5
  3. package/dist/components/HoneyContextMenu/HoneyContextMenu.d.ts +3 -2
  4. package/dist/components/HoneyContextMenu/HoneyContextMenuContent.d.ts +3 -2
  5. package/dist/components/HoneyFlexBox.d.ts +11 -1
  6. package/dist/components/HoneyGrid/HoneyGridContext.d.ts +1 -1
  7. package/dist/components/HoneyGrid/HoneyGridStyled.d.ts +13 -2
  8. package/dist/components/HoneyGridColumn/HoneyGridColumn.d.ts +2 -1
  9. package/dist/components/HoneyGridColumn/HoneyGridColumn.types.d.ts +2 -1
  10. package/dist/components/HoneyGridColumn/HoneyGridColumnStyled.d.ts +15 -5
  11. package/dist/components/HoneyList/HoneyList.d.ts +2 -1
  12. package/dist/components/HoneyList/HoneyListStyled.d.ts +11 -1
  13. package/dist/components/HoneyOverlay.d.ts +2 -1
  14. package/dist/components/HoneyPopup/HoneyPopup.d.ts +6 -5
  15. package/dist/components/HoneyPopup/HoneyPopupContext.d.ts +0 -1
  16. package/dist/components/HoneyPopup/HoneyPopupStyled.d.ts +11 -1
  17. package/dist/components/HoneyPopup/hooks/use-honey-popup-interactions.d.ts +7 -6
  18. package/dist/components/HoneyPopup/hooks/use-honey-popup.d.ts +28 -9
  19. package/dist/contexts/HoneyLayoutContext.d.ts +4 -4
  20. package/dist/effects.d.ts +1 -1
  21. package/dist/helpers/helpers.d.ts +13 -12
  22. package/dist/helpers/react.helpers.d.ts +0 -2
  23. package/dist/hooks/use-honey-media-query.d.ts +3 -1
  24. package/dist/index.mjs +5959 -0
  25. package/dist/providers/HoneyLayoutProvider.d.ts +3 -6
  26. package/dist/providers/HoneyLayoutThemeOverride.d.ts +2 -2
  27. package/dist/types/css.types.d.ts +23 -67
  28. package/dist/types/data.types.d.ts +2 -2
  29. package/dist/types/index.d.ts +0 -1
  30. package/dist/utils/utils.d.ts +2 -1
  31. package/package.json +21 -16
  32. package/dist/__mocks__/index.d.ts +0 -1
  33. package/dist/__mocks__/theme-mock.d.ts +0 -2
  34. package/dist/index.js +0 -5486
  35. package/dist/types/types.d.ts +0 -189
@@ -1,189 +0,0 @@
1
- import { HoneyCSSColor, HoneyCSSDimensionValue } from './css.types';
2
- /**
3
- * Represents the breakpoints configuration in pixes for a responsive layout.
4
- *
5
- * Notes:
6
- * - `xs`: Extra small devices
7
- * - `sm`: Small devices
8
- * - `md`: Medium devices
9
- * - `lg`: Large devices
10
- * - `xl`: Extra large devices
11
- */
12
- export interface HoneyBreakpoints {
13
- xs: number;
14
- sm: number;
15
- md: number;
16
- lg: number;
17
- xl: number;
18
- }
19
- export type HoneyBreakpointName = keyof HoneyBreakpoints;
20
- export interface HoneyContainer {
21
- /**
22
- * Max container width in any CSS distance value.
23
- */
24
- maxWidth: HoneyCSSDimensionValue;
25
- }
26
- /**
27
- * Represents the theme configuration.
28
- */
29
- export interface BaseHoneyTheme {
30
- /**
31
- * Breakpoints for responsive design, where keys are breakpoint names and values are breakpoint values.
32
- */
33
- breakpoints: Partial<HoneyBreakpoints>;
34
- /**
35
- * Configuration for the container.
36
- */
37
- container: Partial<HoneyContainer>;
38
- /**
39
- * Spacing values used throughout the theme.
40
- */
41
- spacings: HoneySpacings;
42
- /**
43
- * Font settings used throughout the theme.
44
- */
45
- fonts: HoneyFonts;
46
- /**
47
- * Color palette used throughout the theme.
48
- */
49
- colors: HoneyColors;
50
- /**
51
- * Dimension values used throughout the theme.
52
- */
53
- dimensions: HoneyDimensions;
54
- }
55
- export interface HoneyTheme extends BaseHoneyTheme {
56
- }
57
- declare module 'styled-components' {
58
- interface DefaultTheme extends HoneyTheme {
59
- }
60
- }
61
- /**
62
- * Defines different spacing sizes available in the theme.
63
- */
64
- export interface HoneySpacings {
65
- /**
66
- * The base spacing value in pixels.
67
- */
68
- base: number;
69
- small?: number;
70
- medium?: number;
71
- large?: number;
72
- }
73
- /**
74
- * Defines the color palette used in the theme.
75
- */
76
- interface BaseHoneyColors {
77
- /**
78
- * Used for elements that require high visibility and emphasis, such as primary buttons, call-to-action elements,
79
- * and important elements like headers or titles.
80
- */
81
- primary: Record<string, HoneyCSSColor>;
82
- /**
83
- * Used to complement the primary color and add visual interest.
84
- * Often used for secondary buttons, borders, and decorative elements to provide contrast and balance within the design.
85
- * Helps create a cohesive visual hierarchy by providing variation in color tones.
86
- */
87
- secondary: Record<string, HoneyCSSColor>;
88
- /**
89
- * Used to draw attention to specific elements or interactions.
90
- * Often applied to interactive elements like links, icons, or tooltips to indicate their interactive nature.
91
- * Can be used sparingly to highlight important information or to create visual focal points.
92
- */
93
- accent: Record<string, HoneyCSSColor>;
94
- /**
95
- * Used for backgrounds, text, and other elements where a subtle, non-distracting color is desired.
96
- * Provides a versatile palette for elements like backgrounds, borders, text, and icons, allowing other colors to stand
97
- * out more prominently. Helps maintain balance and readability without overwhelming the user with too much color.
98
- */
99
- neutral: Record<string, HoneyCSSColor>;
100
- /**
101
- * Used to indicate successful or positive actions or states.
102
- * Often applied to elements like success messages, notifications, or icons to convey successful completion of tasks or operations.
103
- * Provides visual feedback to users to indicate that their actions were successful.
104
- */
105
- success: Record<string, HoneyCSSColor>;
106
- /**
107
- * Used to indicate cautionary or potentially risky situations.
108
- * Applied to elements like warning messages, alerts, or icons to notify users about potential issues or actions that require attention.
109
- * Helps users recognize and address potential problems or risks before they escalate.
110
- */
111
- warning: Record<string, HoneyCSSColor>;
112
- /**
113
- * Used to indicate errors, critical issues, or potentially destructive actions.
114
- * Applied to elements like error messages, validation indicators, form fields, or delete buttons to alert users about incorrect input,
115
- * system errors, or actions that may have irreversible consequences. Provides visual feedback to prompt users to
116
- * take corrective actions or seek assistance when encountering errors or potentially risky actions.
117
- */
118
- error: Record<string, HoneyCSSColor>;
119
- }
120
- /**
121
- * Example of augmenting the colors interface.
122
- *
123
- * @example
124
- * ```ts
125
- * declare module '@react-hive/honey-layout' {
126
- * export interface HoneyColors {
127
- * neutral: Record<'charcoalDark' | 'charcoalGray' | 'crimsonRed', HoneyCSSColor>;
128
- * }
129
- * }
130
- * ```
131
- */
132
- export interface HoneyColors extends BaseHoneyColors {
133
- }
134
- /**
135
- * Generates a union of all possible color keys by combining each property of `HoneyColors` with its corresponding keys.
136
- *
137
- * This type iterates over each key in the `HoneyColors` interface and creates a string template,
138
- * which combines the color type with each of its keys. The result is a union of all possible color keys.
139
- *
140
- * @example
141
- *
142
- * Given the `HoneyColors` interface:
143
- * ```ts
144
- * interface HoneyColors {
145
- * primary: Record<'blue' | 'green', HoneyCSSColor>;
146
- * neutral: Record<'charcoalDark' | 'charcoalGray' | 'crimsonRed', HoneyCSSColor>;
147
- * }
148
- * ```
149
- *
150
- * The resulting `HoneyColorKey` type will be:
151
- * ```ts
152
- * type HoneyColorKey = 'neutral.charcoalDark' | 'neutral.charcoalGray' | 'neutral.crimsonRed' | 'primary.blue' | 'primary.green';
153
- * ```
154
- */
155
- export type HoneyColorKey = {
156
- [ColorType in keyof HoneyColors]: `${ColorType}.${keyof HoneyColors[ColorType] & string}`;
157
- }[keyof HoneyColors];
158
- export interface HoneyFont {
159
- size: number;
160
- family?: string;
161
- weight?: number;
162
- lineHeight?: number;
163
- letterSpacing?: number;
164
- }
165
- /**
166
- * Example of augmenting the fonts interface.
167
- *
168
- * @example
169
- * ```ts
170
- * declare module '@react-hive/honey-layout' {
171
- * export interface HoneyFonts {
172
- * body: HoneyFont;
173
- * caption: HoneyFont;
174
- * }
175
- * }
176
- * ```
177
- */
178
- export interface HoneyFonts {
179
- [key: string]: HoneyFont;
180
- }
181
- export type HoneyFontName = keyof HoneyFonts;
182
- /**
183
- * Represents a map of dimension names to CSS distance values.
184
- */
185
- export interface HoneyDimensions {
186
- [key: string]: HoneyCSSDimensionValue;
187
- }
188
- export type HoneyDimensionName = keyof HoneyDimensions;
189
- export {};