@hopper-ui/components 0.0.10 → 0.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.
Files changed (96) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/HopperProvider/src/HopperProvider.d.ts +26 -0
  3. package/dist/HopperProvider/src/HopperProvider.js +1 -0
  4. package/dist/HopperProvider/src/index.d.ts +3 -0
  5. package/dist/HopperProvider/src/index.js +1 -0
  6. package/dist/IconList/src/IconList.css +8 -0
  7. package/dist/IconList/src/IconList.d.ts +21 -0
  8. package/dist/IconList/src/IconList.js +3 -0
  9. package/dist/IconList/src/IconListContext.d.ts +10 -0
  10. package/dist/IconList/src/IconListContext.js +1 -0
  11. package/dist/IconList/src/index.css +8 -0
  12. package/dist/IconList/src/index.d.ts +7 -0
  13. package/dist/IconList/src/index.js +3 -0
  14. package/dist/Label/src/Label.css +79 -0
  15. package/dist/Label/src/Label.d.ts +21 -0
  16. package/dist/Label/src/Label.js +3 -0
  17. package/dist/Label/src/LabelContext.d.ts +8 -0
  18. package/dist/Label/src/LabelContext.js +1 -0
  19. package/dist/Label/src/index.css +79 -0
  20. package/dist/Label/src/index.d.ts +5 -0
  21. package/dist/Label/src/index.js +3 -0
  22. package/dist/Spinner/src/Spinner.css +148 -0
  23. package/dist/Spinner/src/Spinner.d.ts +21 -0
  24. package/dist/Spinner/src/Spinner.js +6 -0
  25. package/dist/Spinner/src/SpinnerContext.d.ts +10 -0
  26. package/dist/Spinner/src/SpinnerContext.js +1 -0
  27. package/dist/Spinner/src/index.css +148 -0
  28. package/dist/Spinner/src/index.d.ts +7 -0
  29. package/dist/Spinner/src/index.js +6 -0
  30. package/dist/Text/src/Text.css +79 -0
  31. package/dist/Text/src/Text.d.ts +21 -0
  32. package/dist/Text/src/Text.js +3 -0
  33. package/dist/Text/src/TextContext.d.ts +8 -0
  34. package/dist/Text/src/TextContext.js +1 -0
  35. package/dist/Text/src/index.css +79 -0
  36. package/dist/Text/src/index.d.ts +5 -0
  37. package/dist/Text/src/index.js +3 -0
  38. package/dist/buttons/src/Button.css +468 -0
  39. package/dist/buttons/src/Button.d.ts +35 -0
  40. package/dist/buttons/src/Button.js +14 -0
  41. package/dist/buttons/src/ButtonContext.d.ts +8 -0
  42. package/dist/buttons/src/ButtonContext.js +1 -0
  43. package/dist/buttons/src/index.css +468 -0
  44. package/dist/buttons/src/index.d.ts +5 -0
  45. package/dist/buttons/src/index.js +14 -0
  46. package/dist/chunk-4ZYV2XLW.js +7 -0
  47. package/dist/chunk-6BEVZRUL.js +15 -0
  48. package/dist/chunk-7QUHQYCR.js +15 -0
  49. package/dist/chunk-D57ZIX5W.js +1 -0
  50. package/dist/chunk-DHVVYSLB.js +7 -0
  51. package/dist/chunk-GXUPEV64.js +24 -0
  52. package/dist/chunk-HVKOIMMW.js +7 -0
  53. package/dist/chunk-M36KANKC.js +7 -0
  54. package/dist/chunk-OE5BLFZI.js +7 -0
  55. package/dist/chunk-QIOYM2XJ.js +90 -0
  56. package/dist/chunk-SEU4CGZD.js +14 -0
  57. package/dist/chunk-SNIF7MEM.js +1 -0
  58. package/dist/chunk-TVFC2MJ4.js +58 -0
  59. package/dist/chunk-WMTWFKKP.js +7 -0
  60. package/dist/chunk-WROQHGG5.js +141 -0
  61. package/dist/chunk-WRWNRVTG.js +47 -0
  62. package/dist/chunk-XCKF6EU7.js +46 -0
  63. package/dist/chunk-XQ3GUEBN.js +53 -0
  64. package/dist/chunk-YLDA2M2E.js +33 -0
  65. package/dist/intl/src/index.d.ts +1 -0
  66. package/dist/intl/src/index.js +1 -0
  67. package/dist/intl/src/useLocalizedString.d.ts +26 -0
  68. package/dist/intl/src/useLocalizedString.js +1 -0
  69. package/dist/layout/src/Flex.d.ts +37 -0
  70. package/dist/layout/src/Flex.js +1 -0
  71. package/dist/layout/src/Grid.d.ts +77 -0
  72. package/dist/layout/src/Grid.js +55 -0
  73. package/dist/layout/src/Inline.d.ts +26 -0
  74. package/dist/layout/src/Inline.js +30 -0
  75. package/dist/layout/src/Stack.d.ts +26 -0
  76. package/dist/layout/src/Stack.js +28 -0
  77. package/dist/utils/src/SlotProvider.d.ts +14 -0
  78. package/dist/utils/src/SlotProvider.js +1 -0
  79. package/dist/utils/src/compose-classname-render-props.d.ts +9 -0
  80. package/dist/utils/src/compose-classname-render-props.js +1 -0
  81. package/dist/utils/src/css-module.d.ts +15 -0
  82. package/dist/utils/src/css-module.js +1 -0
  83. package/dist/utils/src/index.d.ts +11 -0
  84. package/dist/utils/src/index.js +6 -0
  85. package/dist/utils/src/is-text-only-children.d.ts +9 -0
  86. package/dist/utils/src/is-text-only-children.js +1 -0
  87. package/dist/utils/src/size-adapter.d.ts +20 -0
  88. package/dist/utils/src/size-adapter.js +1 -0
  89. package/dist/utils/src/types.d.ts +31 -0
  90. package/dist/utils/src/types.js +1 -0
  91. package/package.json +13 -4
  92. package/dist/HopperProvider.d.ts +0 -13
  93. package/dist/HopperProvider.js +0 -1
  94. package/dist/chunk-LBJUDVVS.js +0 -9
  95. package/dist/index.d.ts +0 -3
  96. package/dist/index.js +0 -1
@@ -0,0 +1,90 @@
1
+ import { composeClassnameRenderProps } from './chunk-SEU4CGZD.js';
2
+ import { SpinnerContext } from './chunk-4ZYV2XLW.js';
3
+ import { _Label } from './chunk-XCKF6EU7.js';
4
+ import { cssModule } from './chunk-6BEVZRUL.js';
5
+ import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
6
+ import { forwardRef } from 'react';
7
+ import { useContextProps, ProgressBar } from 'react-aria-components';
8
+ import { jsx, jsxs } from 'react/jsx-runtime';
9
+
10
+ // src/Spinner/src/Spinner.module.css
11
+ var Spinner_default = {};
12
+ var GlobalSpinnerCssSelector = "hop-Spinner";
13
+ var SpinnerToLabelSizeAdapter = {
14
+ sm: "xs",
15
+ md: "sm",
16
+ lg: "md"
17
+ };
18
+ var Spinner = (props, ref) => {
19
+ var _a;
20
+ [props, ref] = useContextProps(props, ref, SpinnerContext);
21
+ const { stylingProps, ...ownProps } = useStyledSystem(props);
22
+ const {
23
+ className,
24
+ style,
25
+ size: sizeProp,
26
+ children,
27
+ ...otherProps
28
+ } = ownProps;
29
+ const size = (_a = useResponsiveValue(sizeProp)) != null ? _a : "md";
30
+ const classNames = composeClassnameRenderProps(
31
+ className,
32
+ GlobalSpinnerCssSelector,
33
+ cssModule(
34
+ Spinner_default,
35
+ "hop-spinner",
36
+ size
37
+ ),
38
+ stylingProps.className
39
+ );
40
+ const mergedStyles = {
41
+ ...stylingProps.style,
42
+ ...style
43
+ };
44
+ const labelMarkup = children && /* @__PURE__ */ jsx(
45
+ _Label,
46
+ {
47
+ className: cssModule(
48
+ Spinner_default,
49
+ "hop-spinner__label"
50
+ ),
51
+ size: SpinnerToLabelSizeAdapter[size],
52
+ children
53
+ }
54
+ );
55
+ return /* @__PURE__ */ jsxs(
56
+ ProgressBar,
57
+ {
58
+ ref,
59
+ isIndeterminate: true,
60
+ className: classNames,
61
+ style: mergedStyles,
62
+ ...otherProps,
63
+ children: [
64
+ /* @__PURE__ */ jsx(
65
+ "div",
66
+ {
67
+ className: cssModule(
68
+ Spinner_default,
69
+ "hop-spinner__track"
70
+ )
71
+ }
72
+ ),
73
+ /* @__PURE__ */ jsx(
74
+ "div",
75
+ {
76
+ className: cssModule(
77
+ Spinner_default,
78
+ "hop-spinner__fill"
79
+ )
80
+ }
81
+ ),
82
+ labelMarkup
83
+ ]
84
+ }
85
+ );
86
+ };
87
+ var _Spinner = forwardRef(Spinner);
88
+ _Spinner.displayName = "Spinner";
89
+
90
+ export { GlobalSpinnerCssSelector, _Spinner };
@@ -0,0 +1,14 @@
1
+ import clsx from 'clsx';
2
+ import { composeRenderProps } from 'react-aria-components';
3
+
4
+ // src/utils/src/compose-classname-render-props.ts
5
+ function composeClassnameRenderProps(className, ...classes) {
6
+ return composeRenderProps(className, (prev) => {
7
+ return clsx(
8
+ prev,
9
+ ...classes
10
+ );
11
+ });
12
+ }
13
+
14
+ export { composeClassnameRenderProps };
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,58 @@
1
+ import { useResponsiveValue, Div } from '@hopper-ui/styled-system';
2
+ import { forwardRef } from 'react';
3
+ import { jsx } from 'react/jsx-runtime';
4
+
5
+ // src/layout/src/Flex.tsx
6
+ function Flex(props, ref) {
7
+ const {
8
+ direction,
9
+ inline,
10
+ basis,
11
+ grow,
12
+ shrink,
13
+ wrap: wrapProp,
14
+ alignItems: alignItemsProp,
15
+ justifyContent: justifyContentProp,
16
+ alignContent: alignContentProp,
17
+ ...otherProps
18
+ } = props;
19
+ const wrap = useResponsiveValue(wrapProp);
20
+ const alignItems = useResponsiveValue(alignItemsProp);
21
+ const justifyContent = useResponsiveValue(justifyContentProp);
22
+ const alignContent = useResponsiveValue(alignContentProp);
23
+ return /* @__PURE__ */ jsx(
24
+ Div,
25
+ {
26
+ ref,
27
+ display: inline ? "inline-flex" : "flex",
28
+ flexDirection: direction,
29
+ flexBasis: basis,
30
+ flexGrow: grow,
31
+ flexShrink: shrink,
32
+ flexWrap: flexWrapValue(wrap),
33
+ alignItems: flexAlignValue(alignItems),
34
+ justifyContent: flexAlignValue(justifyContent),
35
+ alignContent: flexAlignValue(alignContent),
36
+ ...otherProps
37
+ }
38
+ );
39
+ }
40
+ function flexAlignValue(value) {
41
+ if (value === "start") {
42
+ return "flex-start";
43
+ }
44
+ if (value === "end") {
45
+ return "flex-end";
46
+ }
47
+ return value;
48
+ }
49
+ function flexWrapValue(value) {
50
+ if (typeof value === "boolean") {
51
+ return value ? "wrap" : "nowrap";
52
+ }
53
+ return value;
54
+ }
55
+ var _Flex = forwardRef(Flex);
56
+ _Flex.displayName = "Flex";
57
+
58
+ export { _Flex };
@@ -0,0 +1,7 @@
1
+ import { createContext } from 'react';
2
+
3
+ // src/buttons/src/ButtonContext.ts
4
+ var ButtonContext = createContext({});
5
+ ButtonContext.displayName = "ButtonContext";
6
+
7
+ export { ButtonContext };
@@ -0,0 +1,141 @@
1
+ import { isTextOnlyChildren } from './chunk-7QUHQYCR.js';
2
+ import { useLocalizedString } from './chunk-GXUPEV64.js';
3
+ import { _Spinner } from './chunk-QIOYM2XJ.js';
4
+ import { composeClassnameRenderProps } from './chunk-SEU4CGZD.js';
5
+ import { _Text } from './chunk-WRWNRVTG.js';
6
+ import { TextContext } from './chunk-OE5BLFZI.js';
7
+ import { ButtonContext } from './chunk-WMTWFKKP.js';
8
+ import { SlotProvider } from './chunk-M36KANKC.js';
9
+ import { IconListContext } from './chunk-DHVVYSLB.js';
10
+ import { cssModule } from './chunk-6BEVZRUL.js';
11
+ import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
12
+ import { forwardRef } from 'react';
13
+ import { useContextProps, composeRenderProps, Button as Button$1 } from 'react-aria-components';
14
+ import { useId } from 'react-aria';
15
+ import { IconContext } from '@hopper-ui/icons';
16
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
17
+
18
+ // src/buttons/src/Button.module.css
19
+ var Button_default = {};
20
+ var GlobalButtonCssSelector = "hop-Button";
21
+ var DefaultButtonSlot = "button";
22
+ var Button = (props, ref) => {
23
+ [props, ref] = useContextProps({ ...props, slot: props.slot || DefaultButtonSlot }, ref, ButtonContext);
24
+ const { stylingProps, ...ownProps } = useStyledSystem(props);
25
+ const stringFormatter = useLocalizedString();
26
+ const {
27
+ className,
28
+ children: childrenProp,
29
+ size: sizeProp = "md",
30
+ fluid: fluidProp,
31
+ variant = "primary",
32
+ onClick,
33
+ onPress: onPressProp,
34
+ isDisabled,
35
+ isLoading,
36
+ style: styleProp,
37
+ ...otherProps
38
+ } = ownProps;
39
+ if (onPressProp && onClick) {
40
+ console.warn("[Hopper] The onClick prop is an alias for onPress and should not be used in conjunction with it. Use one or the other.");
41
+ }
42
+ const onPress = onPressProp != null ? onPressProp : onClick;
43
+ const isInteractionDisabled = isDisabled || isLoading;
44
+ const size = useResponsiveValue(sizeProp);
45
+ const fluid = useResponsiveValue(fluidProp);
46
+ const classNames = composeClassnameRenderProps(
47
+ className,
48
+ GlobalButtonCssSelector,
49
+ cssModule(
50
+ Button_default,
51
+ "hop-button",
52
+ variant,
53
+ size,
54
+ fluid && "fluid",
55
+ isLoading && "loading"
56
+ ),
57
+ stylingProps.className
58
+ );
59
+ const children = composeRenderProps(childrenProp, (prev) => {
60
+ if (isTextOnlyChildren(prev)) {
61
+ return /* @__PURE__ */ jsx(_Text, { children: prev });
62
+ }
63
+ return prev;
64
+ });
65
+ const style = composeRenderProps(styleProp, (prev) => {
66
+ return {
67
+ ...stylingProps.style,
68
+ ...prev
69
+ };
70
+ });
71
+ const spinnerId = useId();
72
+ const hasAriaLabel = !!props["aria-label"] || !!props["aria-labelledby"];
73
+ const isLoadingAriaLiveLabel = `${hasAriaLabel ? props["aria-label"] : ""} ${stringFormatter.format("button.pending")}`.trim();
74
+ return /* @__PURE__ */ jsx(
75
+ SlotProvider,
76
+ {
77
+ values: [
78
+ [IconListContext, {
79
+ slots: {
80
+ icon: {
81
+ className: Button_default["hop-button__icon-list"]
82
+ },
83
+ "end-icon": {
84
+ className: Button_default["hop-button__end-icon-list"]
85
+ }
86
+ }
87
+ }],
88
+ [IconContext, {
89
+ slots: {
90
+ icon: {
91
+ className: Button_default["hop-button__icon"],
92
+ size: "md"
93
+ },
94
+ "end-icon": {
95
+ className: Button_default["hop-button__end-icon"],
96
+ size: "md"
97
+ }
98
+ }
99
+ }],
100
+ [TextContext, {
101
+ slots: {
102
+ text: {
103
+ className: Button_default["hop-button__text"],
104
+ size
105
+ }
106
+ }
107
+ }]
108
+ ],
109
+ children: /* @__PURE__ */ jsx(
110
+ Button$1,
111
+ {
112
+ ref,
113
+ className: classNames,
114
+ style,
115
+ "data-loading": isLoading,
116
+ onPress,
117
+ isDisabled: isInteractionDisabled,
118
+ ...otherProps,
119
+ children: (buttonProps) => {
120
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
121
+ children(buttonProps),
122
+ isLoading && /* @__PURE__ */ jsx(
123
+ _Spinner,
124
+ {
125
+ id: spinnerId,
126
+ size: "lg",
127
+ "aria-label": isLoadingAriaLiveLabel,
128
+ className: Button_default["hop-button__Spinner"]
129
+ }
130
+ )
131
+ ] });
132
+ }
133
+ }
134
+ )
135
+ }
136
+ );
137
+ };
138
+ var _Button = forwardRef(Button);
139
+ _Button.displayName = "Button";
140
+
141
+ export { GlobalButtonCssSelector, _Button };
@@ -0,0 +1,47 @@
1
+ import { TextContext } from './chunk-OE5BLFZI.js';
2
+ import { cssModule } from './chunk-6BEVZRUL.js';
3
+ import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
4
+ import { forwardRef } from 'react';
5
+ import { useContextProps, Text as Text$1 } from 'react-aria-components';
6
+ import clsx from 'clsx';
7
+ import { jsx } from 'react/jsx-runtime';
8
+
9
+ // src/Text/src/Text.module.css
10
+ var Text_default = {};
11
+ var GlobalTextCssSelector = "hop-Text";
12
+ var DefaultTextSlot = "text";
13
+ function Text(props, ref) {
14
+ [props, ref] = useContextProps({ ...props, slot: props.slot || DefaultTextSlot }, ref, TextContext);
15
+ const { stylingProps, ...ownProps } = useStyledSystem(props);
16
+ const { className, size: sizeProp, children, style, ...otherProps } = ownProps;
17
+ const size = useResponsiveValue(sizeProp != null ? sizeProp : "md");
18
+ const classNames = clsx(
19
+ GlobalTextCssSelector,
20
+ cssModule(
21
+ Text_default,
22
+ "hop-text",
23
+ size
24
+ ),
25
+ stylingProps.className,
26
+ className
27
+ );
28
+ const mergedStyles = {
29
+ ...stylingProps.style,
30
+ ...style
31
+ };
32
+ return /* @__PURE__ */ jsx(
33
+ Text$1,
34
+ {
35
+ ...otherProps,
36
+ ref,
37
+ elementType: "span",
38
+ className: classNames,
39
+ style: mergedStyles,
40
+ children
41
+ }
42
+ );
43
+ }
44
+ var _Text = forwardRef(Text);
45
+ _Text.displayName = "Text";
46
+
47
+ export { GlobalTextCssSelector, _Text };
@@ -0,0 +1,46 @@
1
+ import { cssModule } from './chunk-6BEVZRUL.js';
2
+ import { LabelContext } from './chunk-HVKOIMMW.js';
3
+ import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
4
+ import { forwardRef } from 'react';
5
+ import { useContextProps, Label as Label$1 } from 'react-aria-components';
6
+ import clsx from 'clsx';
7
+ import { jsx } from 'react/jsx-runtime';
8
+
9
+ // src/Label/src/Label.module.css
10
+ var Label_default = {};
11
+ var GlobalLabelCssSelector = "hop-Label";
12
+ var DefaultLabelSlot = "label";
13
+ function Label(props, ref) {
14
+ [props, ref] = useContextProps({ ...props, slot: props.slot || DefaultLabelSlot }, ref, LabelContext);
15
+ const { stylingProps, ...ownProps } = useStyledSystem(props);
16
+ const { className, size: sizeProp, children, style, ...otherProps } = ownProps;
17
+ const size = useResponsiveValue(sizeProp != null ? sizeProp : "md");
18
+ const classNames = clsx(
19
+ className,
20
+ GlobalLabelCssSelector,
21
+ cssModule(
22
+ Label_default,
23
+ "hop-label",
24
+ size
25
+ ),
26
+ stylingProps.className
27
+ );
28
+ const mergedStyles = {
29
+ ...stylingProps.style,
30
+ ...style
31
+ };
32
+ return /* @__PURE__ */ jsx(
33
+ Label$1,
34
+ {
35
+ ...otherProps,
36
+ ref,
37
+ className: classNames,
38
+ style: mergedStyles,
39
+ children
40
+ }
41
+ );
42
+ }
43
+ var _Label = forwardRef(Label);
44
+ _Label.displayName = "Label";
45
+
46
+ export { GlobalLabelCssSelector, _Label };
@@ -0,0 +1,53 @@
1
+ import { SlotProvider } from './chunk-M36KANKC.js';
2
+ import { IconListContext } from './chunk-DHVVYSLB.js';
3
+ import { useContextProps } from 'react-aria-components';
4
+ import { forwardRef } from 'react';
5
+ import clsx from 'clsx';
6
+ import { useStyledSystem } from '@hopper-ui/styled-system';
7
+ import { IconContext } from '@hopper-ui/icons';
8
+ import { jsx } from 'react/jsx-runtime';
9
+
10
+ // src/IconList/src/IconList.module.css
11
+ var IconList_default = {};
12
+ var GlobalIconListCssSelector = "hop-IconList";
13
+ var DefaultIconListSlot = "icon";
14
+ function IconList(props, ref) {
15
+ [props, ref] = useContextProps({ ...props, slot: props.slot || DefaultIconListSlot }, ref, IconListContext);
16
+ const { stylingProps, ...ownProps } = useStyledSystem(props);
17
+ const { children, style, className, slot, size, ...otherProps } = ownProps;
18
+ const classNames = clsx(
19
+ className,
20
+ GlobalIconListCssSelector,
21
+ IconList_default["hop-iconList"],
22
+ stylingProps.className
23
+ );
24
+ const mergedStyles = {
25
+ ...stylingProps.style,
26
+ ...style
27
+ };
28
+ return /* @__PURE__ */ jsx(
29
+ "span",
30
+ {
31
+ ...otherProps,
32
+ ref,
33
+ className: classNames,
34
+ style: mergedStyles,
35
+ slot: slot != null ? slot : void 0,
36
+ children: /* @__PURE__ */ jsx(
37
+ SlotProvider,
38
+ {
39
+ values: [
40
+ [IconContext, {
41
+ size
42
+ }]
43
+ ],
44
+ children
45
+ }
46
+ )
47
+ }
48
+ );
49
+ }
50
+ var _IconList = forwardRef(IconList);
51
+ _IconList.displayName = "IconList";
52
+
53
+ export { GlobalIconListCssSelector, _IconList };
@@ -0,0 +1,33 @@
1
+ import { StyledSystemProvider } from '@hopper-ui/styled-system';
2
+ import clsx from 'clsx';
3
+ import { forwardRef } from 'react';
4
+ import { I18nProvider, RouterProvider } from 'react-aria-components';
5
+ import { jsx } from 'react/jsx-runtime';
6
+
7
+ // src/HopperProvider/src/HopperProvider.tsx
8
+ var GlobalHopperProviderCssSelector = "hop-HopperProvider";
9
+ var HopperProvider = (props, ref) => {
10
+ const {
11
+ children,
12
+ locale,
13
+ withBodyStyle = false,
14
+ colorScheme = "light",
15
+ withCssVariables = true,
16
+ className,
17
+ navigate,
18
+ ...rest
19
+ } = props;
20
+ const classNames = clsx(
21
+ GlobalHopperProviderCssSelector,
22
+ className
23
+ );
24
+ let content = children;
25
+ if (navigate) {
26
+ content = /* @__PURE__ */ jsx(RouterProvider, { navigate, children });
27
+ }
28
+ return /* @__PURE__ */ jsx(StyledSystemProvider, { ref, withBodyStyle, colorScheme, withCssVariables, className: classNames, ...rest, children: /* @__PURE__ */ jsx(I18nProvider, { locale, children: content }) });
29
+ };
30
+ var _HopperProvider = forwardRef(HopperProvider);
31
+ _HopperProvider.displayName = "HopperProvider";
32
+
33
+ export { GlobalHopperProviderCssSelector, _HopperProvider };
@@ -0,0 +1 @@
1
+ export { useLocalizedString } from './useLocalizedString.js';
@@ -0,0 +1 @@
1
+ export { useLocalizedString } from '../../chunk-GXUPEV64.js';
@@ -0,0 +1,26 @@
1
+ declare const Resources: {
2
+ "en-US": {
3
+ "button.pending": string;
4
+ };
5
+ "fr-CA": {
6
+ "button.pending": string;
7
+ };
8
+ };
9
+ declare function useLocalizedString(): LocalizedStringFormatter;
10
+ /**
11
+ * LocalizedStringFormatter is not exported from react-aria, so we have to define it here.
12
+ * Without this, the build will fail with the following error:
13
+ * packages/components build:
14
+ * src/intl/src/useLocalizedString.tsx(11,17): error TS2742:
15
+ * The inferred type of 'useLocalizedString' cannot be named without a reference to
16
+ * .pnpm/@internationalized+string@3.2.1/node_modules/@internationalized/string'.
17
+ * This is likely not portable. A type annotation is necessary.
18
+ *
19
+ * I proposed a PR to export LocalizedStringFormatter from react-aria.
20
+ * https://github.com/adobe/react-spectrum/pull/6014
21
+ */
22
+ interface LocalizedStringFormatter {
23
+ format: (key: keyof typeof Resources[keyof typeof Resources], variables?: Record<string, string | number | boolean>) => string;
24
+ }
25
+
26
+ export { useLocalizedString };
@@ -0,0 +1 @@
1
+ export { useLocalizedString } from '../../chunk-GXUPEV64.js';
@@ -0,0 +1,37 @@
1
+ import * as react from 'react';
2
+ import { DivProps, ResponsiveProp } from '@hopper-ui/styled-system';
3
+
4
+ interface FlexProps extends Omit<DivProps, "display" | "flexDirection" | "flexWrap" | "flexBasis" | "flexGrow" | "flexShrink"> {
5
+ /**
6
+ * The flex direction of the container. Can be row, column, row-reverse or column-reverse.
7
+ */
8
+ direction?: DivProps["flexDirection"];
9
+ /**
10
+ * Whether to wrap the flex items. The value can also be a boolean.
11
+ */
12
+ wrap?: DivProps["flexWrap"] | ResponsiveProp<boolean>;
13
+ /**
14
+ * An alias for the css flex-basis property.
15
+ */
16
+ basis?: DivProps["flexBasis"];
17
+ /**
18
+ * An alias for the css flex-grow property.
19
+ */
20
+ grow?: DivProps["flexGrow"];
21
+ /**
22
+ * An alias for the css flex-shrink property.
23
+ */
24
+ shrink?: DivProps["flexShrink"];
25
+ /**
26
+ * Whether to display the flex container as an inline element.
27
+ */
28
+ inline?: boolean;
29
+ }
30
+ /**
31
+ * The Flex component is used to create a flex container and provides some shortcuts for the flex properties.
32
+ *
33
+ * [View Documentation](TODO)
34
+ */
35
+ declare const _Flex: react.ForwardRefExoticComponent<Omit<FlexProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
36
+
37
+ export { _Flex as Flex, type FlexProps };
@@ -0,0 +1 @@
1
+ export { _Flex as Flex } from '../../chunk-TVFC2MJ4.js';
@@ -0,0 +1,77 @@
1
+ import * as react from 'react';
2
+ import { DivProps, UNSAFE_SizingValue, CssGrid } from '@hopper-ui/styled-system';
3
+
4
+ interface GridProps extends Omit<DivProps, "display" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "gridAutoColumns" | "gridAutoFlow" | "UNSAFE_gridAutoRows" | "UNSAFE_gridTemplateColumns" | "UNSAFE_gridTemplateRows" | "UNSAFE_gridAutoColumns"> {
5
+ /**
6
+ * Whether or not the element generate line breaks before or after himself.
7
+ */
8
+ inline?: boolean;
9
+ /**
10
+ * An alias for the css grid-auto-rows property.
11
+ */
12
+ autoRows?: DivProps["gridAutoRows"];
13
+ /**
14
+ * An alias for the css grid-template-areas property.
15
+ */
16
+ areas?: DivProps["gridTemplateAreas"];
17
+ /**
18
+ * An alias for the css grid-template-columns property.
19
+ */
20
+ templateColumns?: DivProps["gridTemplateColumns"];
21
+ /**
22
+ * An alias for the css grid-template-rows property.
23
+ */
24
+ templateRows?: DivProps["gridTemplateRows"];
25
+ /**
26
+ * An alias for the css grid-auto-columns property.
27
+ */
28
+ autoColumns?: DivProps["gridAutoColumns"];
29
+ /**
30
+ * An alias for the css grid-auto-flow property.
31
+ */
32
+ autoFlow?: DivProps["gridAutoFlow"];
33
+ /**
34
+ * An alias for the css grid-auto-rows property.
35
+ */
36
+ UNSAFE_autoRows?: DivProps["UNSAFE_gridAutoRows"];
37
+ /**
38
+ * An alias for the css grid-template-columns property.
39
+ */
40
+ UNSAFE_templateColumns?: DivProps["UNSAFE_gridTemplateColumns"];
41
+ /**
42
+ * An alias for the css grid-template-rows property.
43
+ */
44
+ UNSAFE_templateRows?: DivProps["UNSAFE_gridTemplateRows"];
45
+ /**
46
+ * An alias for the css grid-auto-columns property.
47
+ */
48
+ UNSAFE_autoColumns?: DivProps["UNSAFE_gridAutoColumns"];
49
+ }
50
+ /**
51
+ * Can be used to make a repeating fragment of the columns or rows list.
52
+ * See [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/repeat).
53
+ * @param count - The number of times to repeat the fragment.
54
+ * @param repeat - The fragment to repeat.
55
+ */
56
+ declare function repeat(count: number | "auto-fill" | "auto-fit", repetition: UNSAFE_SizingValue | UNSAFE_SizingValue[]): CssGrid;
57
+ /**
58
+ * Defines a size range greater than or equal to min and less than or equal to max.
59
+ * See [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/minmax).
60
+ * @param min - The minimum size.
61
+ * @param max - The maximum size.
62
+ */
63
+ declare function minmax(min: UNSAFE_SizingValue, max: UNSAFE_SizingValue): CssGrid;
64
+ /**
65
+ * Clamps a given size to an available size.
66
+ * See [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/fit-content).
67
+ * @param dimension - The size to clamp.
68
+ */
69
+ declare function fitContent(dimension: UNSAFE_SizingValue): CssGrid;
70
+ /**
71
+ * The Grid component is used to create a grid container and provides some shortcuts for the grid properties.
72
+ *
73
+ * [View Documentation](TODO)
74
+ */
75
+ declare const _Grid: react.ForwardRefExoticComponent<Omit<GridProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
76
+
77
+ export { _Grid as Grid, type GridProps, fitContent, minmax, repeat };