@hopper-ui/styled-system 2.5.13 → 3.0.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 (61) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/StyledSystemProvider.css +35 -35
  3. package/dist/StyledSystemProvider.d.ts +6 -6
  4. package/dist/StyledSystemProvider.js +15 -17
  5. package/dist/{chunk-54RO57YA.js → chunk-3PUBJ5LJ.js} +25 -13
  6. package/dist/chunk-6ZFFJVAW.js +17 -0
  7. package/dist/{chunk-V7X6ANEM.js → chunk-7PR2BAOL.js} +0 -1
  8. package/dist/{chunk-MSH55T2T.js → chunk-A54ZRFEM.js} +31 -2
  9. package/dist/{chunk-ILG53YIO.js → chunk-FGXNB7F6.js} +34 -9
  10. package/dist/{chunk-7TNCJ3OQ.js → chunk-JJKYIWIT.js} +13 -3
  11. package/dist/{chunk-A54ZF3UN.js → chunk-QZ7W6U3E.js} +2 -2
  12. package/dist/{chunk-GQ3J3RTR.js → chunk-SVHEHWY4.js} +3 -3
  13. package/dist/chunk-TKWJ3X2I.js +13 -0
  14. package/dist/{chunk-JVNXXRWE.js → chunk-VIIWNAIQ.js} +1 -1
  15. package/dist/{chunk-X5OXC6DN.js → chunk-XG7R6QGE.js} +1 -1
  16. package/dist/chunk-YQ665QH5.js +6 -0
  17. package/dist/color-scheme/ColorSchemeContext.js +1 -1
  18. package/dist/color-scheme/useColorSchemeValue.js +2 -2
  19. package/dist/global-styles/BodyStyleProvider.js +5 -5
  20. package/dist/html-wrappers/html.css +35 -35
  21. package/dist/html-wrappers/html.js +8 -7
  22. package/dist/html-wrappers/htmlElement.css +35 -35
  23. package/dist/html-wrappers/htmlElement.js +7 -6
  24. package/dist/index.css +35 -35
  25. package/dist/index.d.ts +4 -6
  26. package/dist/index.js +16 -18
  27. package/dist/responsive/useResponsiveValue.js +2 -2
  28. package/dist/styledSystemProps.d.ts +21 -5
  29. package/dist/styledSystemRootCssClass.d.ts +2 -4
  30. package/dist/styledSystemRootCssClass.js +2 -1
  31. package/dist/theme/ThemeContext.d.ts +11 -0
  32. package/dist/theme/ThemeContext.js +2 -0
  33. package/dist/theme/generated/sharegate/dark.css +742 -0
  34. package/dist/theme/generated/sharegate/light.css +1182 -0
  35. package/dist/theme/generated/sharegate.css +4 -0
  36. package/dist/theme/generated/workleap/dark.css +742 -0
  37. package/dist/theme/generated/workleap/light.css +1182 -0
  38. package/dist/theme/generated/workleap.css +4 -0
  39. package/dist/tokens/generated/styledSystemConstants.d.ts +6 -0
  40. package/dist/tokens/generated/styledSystemConstants.js +2 -0
  41. package/dist/tokens/generated/styledSystemToTokenMappings.d.ts +1182 -1151
  42. package/dist/tokens/generated/styledSystemToTokenMappings.js +1 -1
  43. package/dist/tokens/tokenMappings.d.ts +540 -37
  44. package/dist/tokens/tokenMappings.js +5 -4
  45. package/dist/useStyledSystem.css +32 -32
  46. package/dist/useStyledSystem.js +6 -5
  47. package/package.json +13 -9
  48. package/dist/chunk-43MQD25Q.js +0 -17
  49. package/dist/chunk-K5JIMNDM.js +0 -1182
  50. package/dist/chunk-P6FMQKUS.js +0 -546
  51. package/dist/chunk-RAWVBWQ4.js +0 -11
  52. package/dist/chunk-S3G5NPHF.js +0 -32
  53. package/dist/tokens/TokenProvider.d.ts +0 -20
  54. package/dist/tokens/TokenProvider.js +0 -9
  55. package/dist/tokens/generated/darkSemanticTokens.d.ts +0 -548
  56. package/dist/tokens/generated/darkSemanticTokens.js +0 -2
  57. package/dist/tokens/generated/lightSemanticTokens.d.ts +0 -1184
  58. package/dist/tokens/generated/lightSemanticTokens.js +0 -2
  59. package/dist/tokens/tokens.d.ts +0 -1731
  60. package/dist/tokens/tokens.js +0 -4
  61. package/dist/{chunk-SFOVKOPG.js → chunk-FTYK7Z7Q.js} +1 -1
@@ -1,7 +1,7 @@
1
1
  import { Property } from 'csstype';
2
2
  import { JSX, JSXElementConstructor, ComponentProps } from 'react';
3
3
  import { ResponsiveProp } from './responsive/useResponsiveValue.js';
4
- import { UNSAFE_BackgroundColorValue, UNSAFE_BorderValue, UNSAFE_BorderRadiusValue, UNSAFE_BoxShadowValue, UNSAFE_ColorValue, UNSAFE_GapValue, UNSAFE_FillValue, UNSAFE_FontFamilyValue, UNSAFE_FontSizeValue, UNSAFE_FontWeightValue, UNSAFE_GridAutoColumnsValue, UNSAFE_GridAutoRowsValue, GridColumSpanValue, GridRowSpanValue, UNSAFE_GridTemplateColumnsValue, UNSAFE_GridTemplateRowsValue, UNSAFE_HeightValue, UNSAFE_LineHeightValue, UNSAFE_ComplexMarginValue, UNSAFE_SimpleMarginValue, UNSAFE_WidthValue, UNSAFE_ComplexPaddingValue, UNSAFE_SimplePaddingValue, UNSAFE_RowGapValue, UNSAFE_StrokeValue, BackgroundColorValue, BorderValue, BorderRadiusValue, BoxShadowValue, ColorValue, ColumnGapValue, FillValue, FontFamilyValue, FontSizeValue, FontWeightValue, GapValue, GridAutoColumnsValue, GridAutoRowsValue, GridTemplateAreasValue, GridTemplateColumnsValue, GridTemplateRowsValue, HeightValue, LineHeightValue, ComplexMarginValue, SimpleMarginValue, WidthValue, ComplexPaddingValue, SimplePaddingValue, RowGapValue, StrokeValue } from './tokens/tokenMappings.js';
4
+ import { UNSAFE_BackgroundColorValue, UNSAFE_BorderValue, UNSAFE_BorderRadiusValue, UNSAFE_BoxShadowValue, UNSAFE_ColorValue, UNSAFE_GapValue, UNSAFE_FillValue, UNSAFE_FontFamilyValue, UNSAFE_FontSizeValue, UNSAFE_FontWeightValue, UNSAFE_GridAutoColumnsValue, UNSAFE_GridAutoRowsValue, GridColumSpanValue, GridRowSpanValue, UNSAFE_GridTemplateColumnsValue, UNSAFE_GridTemplateRowsValue, UNSAFE_HeightValue, UNSAFE_LineHeightValue, UNSAFE_ComplexMarginValue, UNSAFE_SimpleMarginValue, UNSAFE_WidthValue, UNSAFE_OutlineValue, UNSAFE_ComplexPaddingValue, UNSAFE_SimplePaddingValue, UNSAFE_RowGapValue, UNSAFE_StrokeValue, BackgroundColorValue, BorderValue, BorderRadiusValue, BoxShadowValue, ColorValue, ColumnGapValue, FillValue, FontFamilyValue, FontSizeValue, FontWeightValue, GapValue, GridAutoColumnsValue, GridAutoRowsValue, GridTemplateAreasValue, GridTemplateColumnsValue, GridTemplateRowsValue, HeightValue, LineHeightValue, ComplexMarginValue, SimpleMarginValue, WidthValue, OutlineValue, ComplexPaddingValue, SimplePaddingValue, RowGapValue, StrokeValue } from './tokens/tokenMappings.js';
5
5
  import './responsive/Breakpoints.js';
6
6
 
7
7
  declare const UnsafePrefix = "UNSAFE_";
@@ -558,14 +558,14 @@ interface StyledSystemProps extends UnsafeStyledSystemProps {
558
558
  order?: ResponsiveProp<Property.Order>;
559
559
  /**
560
560
  * Sets the `outline` property.
561
- * @see {@link https://developer.mozilla.org/docs/Web/CSS/outline}
561
+ * This property only accept **token values** from the **SCALE**. To specify any other values, use the **`UNSAFE_outline`** property
562
562
  */
563
- outline?: ResponsiveProp<Property.Outline>;
563
+ outline?: ResponsiveProp<OutlineValue>;
564
564
  /**
565
565
  * Sets the `outline` property when focused.
566
- * @see {@link https://developer.mozilla.org/docs/Web/CSS/outline}
566
+ * This property only accept **token values** from the **SCALE**. To specify any other values, use the **`UNSAFE_outlineFocus`** property
567
567
  */
568
- outlineFocus?: ResponsiveProp<Property.Outline>;
568
+ outlineFocus?: ResponsiveProp<OutlineValue>;
569
569
  /**
570
570
  * Sets the `overflow` property.
571
571
  * @see {@link https://developer.mozilla.org/docs/Web/CSS/overflow}
@@ -1240,6 +1240,22 @@ interface UnsafeStyledSystemProps {
1240
1240
  * This property is marked as **UNSAFE** because you're opting out of the intended values of the design system.
1241
1241
  */
1242
1242
  UNSAFE_minWidth?: ResponsiveProp<UNSAFE_WidthValue>;
1243
+ /**
1244
+ * Sets the `outline` property.
1245
+ *
1246
+ * If you want to use a **token value** from the **SCALE**, use the **`outline`** property instead.
1247
+ *
1248
+ * This property is marked as **UNSAFE** because you're opting out of the intended values of the design system.
1249
+ */
1250
+ UNSAFE_outline?: ResponsiveProp<UNSAFE_OutlineValue>;
1251
+ /**
1252
+ * Sets the `outline` property when focused.
1253
+ *
1254
+ * If you want to use a **token value** from the **SCALE**, use the **`outlineHover`** property instead.
1255
+ *
1256
+ * This property is marked as **UNSAFE** because you're opting out of the intended values of the design system.
1257
+ */
1258
+ UNSAFE_outlineFocus?: ResponsiveProp<UNSAFE_OutlineValue>;
1243
1259
  /**
1244
1260
  * Sets the `padding` property.
1245
1261
  *
@@ -1,12 +1,10 @@
1
1
  import { ColorScheme } from './color-scheme/ColorSchemeContext.js';
2
2
  import 'react';
3
3
 
4
- declare const HopperRootCssClass = "hop";
5
- declare const StyledSystemRootCssClass: string;
6
4
  /**
7
5
  * The CSS Variables that are used by the Styled System are injected targeting those classes.
8
6
  * Therefore, any portaled component or any Hopper Provider must have one of these classes on the root element.
9
7
  */
10
- declare function getRootCSSClasses(colorScheme: ColorScheme): string;
8
+ declare function getRootCSSClasses(colorScheme: ColorScheme, theme: string): string;
11
9
 
12
- export { HopperRootCssClass, StyledSystemRootCssClass, getRootCSSClasses };
10
+ export { getRootCSSClasses };
@@ -1,2 +1,3 @@
1
- export { HopperRootCssClass, StyledSystemRootCssClass, getRootCSSClasses } from './chunk-43MQD25Q.js';
1
+ export { getRootCSSClasses } from './chunk-6ZFFJVAW.js';
2
+ import './chunk-YQ665QH5.js';
2
3
  import './chunk-AQ5VUG5P.js';
@@ -0,0 +1,11 @@
1
+ import * as react from 'react';
2
+ import { Theme } from '../tokens/generated/styledSystemConstants.js';
3
+
4
+ interface ThemeContextType {
5
+ theme: Theme;
6
+ setTheme: (newTheme: Theme) => void;
7
+ }
8
+ declare const ThemeContext: react.Context<ThemeContextType>;
9
+ declare function useThemeContext(): ThemeContextType;
10
+
11
+ export { ThemeContext, type ThemeContextType, useThemeContext };
@@ -0,0 +1,2 @@
1
+ export { ThemeContext, useThemeContext } from '../chunk-TKWJ3X2I.js';
2
+ import '../chunk-AQ5VUG5P.js';