@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.
- package/CHANGELOG.md +18 -0
- package/dist/HopperProvider/src/HopperProvider.d.ts +26 -0
- package/dist/HopperProvider/src/HopperProvider.js +1 -0
- package/dist/HopperProvider/src/index.d.ts +3 -0
- package/dist/HopperProvider/src/index.js +1 -0
- package/dist/IconList/src/IconList.css +8 -0
- package/dist/IconList/src/IconList.d.ts +21 -0
- package/dist/IconList/src/IconList.js +3 -0
- package/dist/IconList/src/IconListContext.d.ts +10 -0
- package/dist/IconList/src/IconListContext.js +1 -0
- package/dist/IconList/src/index.css +8 -0
- package/dist/IconList/src/index.d.ts +7 -0
- package/dist/IconList/src/index.js +3 -0
- package/dist/Label/src/Label.css +79 -0
- package/dist/Label/src/Label.d.ts +21 -0
- package/dist/Label/src/Label.js +3 -0
- package/dist/Label/src/LabelContext.d.ts +8 -0
- package/dist/Label/src/LabelContext.js +1 -0
- package/dist/Label/src/index.css +79 -0
- package/dist/Label/src/index.d.ts +5 -0
- package/dist/Label/src/index.js +3 -0
- package/dist/Spinner/src/Spinner.css +148 -0
- package/dist/Spinner/src/Spinner.d.ts +21 -0
- package/dist/Spinner/src/Spinner.js +6 -0
- package/dist/Spinner/src/SpinnerContext.d.ts +10 -0
- package/dist/Spinner/src/SpinnerContext.js +1 -0
- package/dist/Spinner/src/index.css +148 -0
- package/dist/Spinner/src/index.d.ts +7 -0
- package/dist/Spinner/src/index.js +6 -0
- package/dist/Text/src/Text.css +79 -0
- package/dist/Text/src/Text.d.ts +21 -0
- package/dist/Text/src/Text.js +3 -0
- package/dist/Text/src/TextContext.d.ts +8 -0
- package/dist/Text/src/TextContext.js +1 -0
- package/dist/Text/src/index.css +79 -0
- package/dist/Text/src/index.d.ts +5 -0
- package/dist/Text/src/index.js +3 -0
- package/dist/buttons/src/Button.css +468 -0
- package/dist/buttons/src/Button.d.ts +35 -0
- package/dist/buttons/src/Button.js +14 -0
- package/dist/buttons/src/ButtonContext.d.ts +8 -0
- package/dist/buttons/src/ButtonContext.js +1 -0
- package/dist/buttons/src/index.css +468 -0
- package/dist/buttons/src/index.d.ts +5 -0
- package/dist/buttons/src/index.js +14 -0
- package/dist/chunk-4ZYV2XLW.js +7 -0
- package/dist/chunk-6BEVZRUL.js +15 -0
- package/dist/chunk-7QUHQYCR.js +15 -0
- package/dist/chunk-D57ZIX5W.js +1 -0
- package/dist/chunk-DHVVYSLB.js +7 -0
- package/dist/chunk-GXUPEV64.js +24 -0
- package/dist/chunk-HVKOIMMW.js +7 -0
- package/dist/chunk-M36KANKC.js +7 -0
- package/dist/chunk-OE5BLFZI.js +7 -0
- package/dist/chunk-QIOYM2XJ.js +90 -0
- package/dist/chunk-SEU4CGZD.js +14 -0
- package/dist/chunk-SNIF7MEM.js +1 -0
- package/dist/chunk-TVFC2MJ4.js +58 -0
- package/dist/chunk-WMTWFKKP.js +7 -0
- package/dist/chunk-WROQHGG5.js +141 -0
- package/dist/chunk-WRWNRVTG.js +47 -0
- package/dist/chunk-XCKF6EU7.js +46 -0
- package/dist/chunk-XQ3GUEBN.js +53 -0
- package/dist/chunk-YLDA2M2E.js +33 -0
- package/dist/intl/src/index.d.ts +1 -0
- package/dist/intl/src/index.js +1 -0
- package/dist/intl/src/useLocalizedString.d.ts +26 -0
- package/dist/intl/src/useLocalizedString.js +1 -0
- package/dist/layout/src/Flex.d.ts +37 -0
- package/dist/layout/src/Flex.js +1 -0
- package/dist/layout/src/Grid.d.ts +77 -0
- package/dist/layout/src/Grid.js +55 -0
- package/dist/layout/src/Inline.d.ts +26 -0
- package/dist/layout/src/Inline.js +30 -0
- package/dist/layout/src/Stack.d.ts +26 -0
- package/dist/layout/src/Stack.js +28 -0
- package/dist/utils/src/SlotProvider.d.ts +14 -0
- package/dist/utils/src/SlotProvider.js +1 -0
- package/dist/utils/src/compose-classname-render-props.d.ts +9 -0
- package/dist/utils/src/compose-classname-render-props.js +1 -0
- package/dist/utils/src/css-module.d.ts +15 -0
- package/dist/utils/src/css-module.js +1 -0
- package/dist/utils/src/index.d.ts +11 -0
- package/dist/utils/src/index.js +6 -0
- package/dist/utils/src/is-text-only-children.d.ts +9 -0
- package/dist/utils/src/is-text-only-children.js +1 -0
- package/dist/utils/src/size-adapter.d.ts +20 -0
- package/dist/utils/src/size-adapter.js +1 -0
- package/dist/utils/src/types.d.ts +31 -0
- package/dist/utils/src/types.js +1 -0
- package/package.json +13 -4
- package/dist/HopperProvider.d.ts +0 -13
- package/dist/HopperProvider.js +0 -1
- package/dist/chunk-LBJUDVVS.js +0 -9
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @hopper-ui/components
|
|
2
2
|
|
|
3
|
+
## 0.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 93a1a16: Added Button, Grid, Inline, Flex, Stack, Label, Text, IconList, Spinner and localization
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [93a1a16]
|
|
12
|
+
- @hopper-ui/icons@1.5.0
|
|
13
|
+
|
|
14
|
+
## 0.0.11
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [aa5d10b]
|
|
19
|
+
- @hopper-ui/styled-system@0.3.0
|
|
20
|
+
|
|
3
21
|
## 0.0.10
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { StyledSystemProviderProps } from '@hopper-ui/styled-system';
|
|
3
|
+
|
|
4
|
+
declare const GlobalHopperProviderCssSelector = "hop-HopperProvider";
|
|
5
|
+
interface HopperProviderProps extends StyledSystemProviderProps {
|
|
6
|
+
/**
|
|
7
|
+
* The The BCP47 language code for the locale.
|
|
8
|
+
* @example "en-US"
|
|
9
|
+
*/
|
|
10
|
+
locale?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Set this up once in the root of your app, and any Hopper component with the href prop will automatically navigate using your router.
|
|
13
|
+
*/
|
|
14
|
+
navigate?: (path: string) => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* HopperProvider is required to be rendered at the root of your application. It is responsible for:
|
|
18
|
+
* - Adding CSS variables to the document
|
|
19
|
+
* - Managing color scheme (light, dark, auto)
|
|
20
|
+
* - Optionally adding body styles to the document
|
|
21
|
+
*
|
|
22
|
+
* [View Documentation](TODO)
|
|
23
|
+
*/
|
|
24
|
+
declare const _HopperProvider: react.ForwardRefExoticComponent<Omit<HopperProviderProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
|
|
26
|
+
export { GlobalHopperProviderCssSelector, _HopperProvider as HopperProvider, type HopperProviderProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GlobalHopperProviderCssSelector, _HopperProvider as HopperProvider } from '../../chunk-YLDA2M2E.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GlobalHopperProviderCssSelector, _HopperProvider as HopperProvider } from '../../chunk-YLDA2M2E.js';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { StyledSystemProps, ResponsiveProp } from '@hopper-ui/styled-system';
|
|
3
|
+
import { BaseComponentProps } from '../../utils/src/types.js';
|
|
4
|
+
import '@react-types/shared';
|
|
5
|
+
import 'react-aria-components';
|
|
6
|
+
|
|
7
|
+
declare const GlobalIconListCssSelector = "hop-IconList";
|
|
8
|
+
interface IconListProps extends StyledSystemProps, BaseComponentProps {
|
|
9
|
+
/**
|
|
10
|
+
* The size of the icon.
|
|
11
|
+
*/
|
|
12
|
+
size?: ResponsiveProp<"sm" | "md" | "lg">;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A component that allows you to render a list of icons
|
|
16
|
+
*
|
|
17
|
+
* [View Documentation](TODO)
|
|
18
|
+
*/
|
|
19
|
+
declare const _IconList: react.ForwardRefExoticComponent<IconListProps & react.RefAttributes<HTMLSpanElement>>;
|
|
20
|
+
|
|
21
|
+
export { GlobalIconListCssSelector, _IconList as IconList, type IconListProps };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IconListProps } from './IconList.js';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import { ContextValue } from 'react-aria-components';
|
|
4
|
+
import '@hopper-ui/styled-system';
|
|
5
|
+
import '../../utils/src/types.js';
|
|
6
|
+
import '@react-types/shared';
|
|
7
|
+
|
|
8
|
+
declare const IconListContext: react.Context<ContextValue<IconListProps, HTMLSpanElement>>;
|
|
9
|
+
|
|
10
|
+
export { IconListContext };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { IconListContext } from '../../chunk-DHVVYSLB.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { GlobalIconListCssSelector, IconList, IconListProps } from './IconList.js';
|
|
2
|
+
export { IconListContext } from './IconListContext.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import '@hopper-ui/styled-system';
|
|
5
|
+
import '../../utils/src/types.js';
|
|
6
|
+
import '@react-types/shared';
|
|
7
|
+
import 'react-aria-components';
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/* src/Label/src/Label.module.css */
|
|
2
|
+
.hop-label {
|
|
3
|
+
--hop-label-component-xs-font-size: var(--hop-body-xs-font-size);
|
|
4
|
+
--hop-label-component-xs-font-family: var(--hop-body-xs-font-family);
|
|
5
|
+
--hop-label-component-xs-font-weight: var(--hop-body-xs-font-weight);
|
|
6
|
+
--hop-label-component-xs-line-height: var(--hop-body-xs-line-height);
|
|
7
|
+
--hop-label-component-sm-font-size: var(--hop-body-sm-font-size);
|
|
8
|
+
--hop-label-component-sm-font-family: var(--hop-body-sm-font-family);
|
|
9
|
+
--hop-label-component-sm-font-weight: var(--hop-body-sm-font-weight);
|
|
10
|
+
--hop-label-component-sm-line-height: var(--hop-body-sm-line-height);
|
|
11
|
+
--hop-label-component-md-font-size: var(--hop-body-md-font-size);
|
|
12
|
+
--hop-label-component-md-font-family: var(--hop-body-md-font-family);
|
|
13
|
+
--hop-label-component-md-font-weight: var(--hop-body-md-font-weight);
|
|
14
|
+
--hop-label-component-md-line-height: var(--hop-body-md-line-height);
|
|
15
|
+
--hop-label-component-lg-font-size: var(--hop-body-lg-font-size);
|
|
16
|
+
--hop-label-component-lg-font-family: var(--hop-body-lg-font-family);
|
|
17
|
+
--hop-label-component-lg-font-weight: var(--hop-body-lg-font-weight);
|
|
18
|
+
--hop-label-component-lg-line-height: var(--hop-body-lg-line-height);
|
|
19
|
+
--hop-label-component-xl-font-size: var(--hop-body-xl-font-size);
|
|
20
|
+
--hop-label-component-xl-font-family: var(--hop-body-xl-font-family);
|
|
21
|
+
--hop-label-component-xl-font-weight: var(--hop-body-xl-font-weight);
|
|
22
|
+
--hop-label-component-xl-line-height: var(--hop-body-xl-line-height);
|
|
23
|
+
--hop-label-component-2xl-font-size: var(--hop-body-2xl-font-size);
|
|
24
|
+
--hop-label-component-2xl-font-family: var(--hop-body-2xl-font-family);
|
|
25
|
+
--hop-label-component-2xl-font-weight: var(--hop-body-2xl-font-weight);
|
|
26
|
+
--hop-label-component-2xl-line-height: var(--hop-body-2xl-line-height);
|
|
27
|
+
--hop-label-component-inherit-size-font-size: inherit;
|
|
28
|
+
--hop-label-component-inherit-size-font-family: inherit;
|
|
29
|
+
--hop-label-component-inherit-size-font-weight: inherit;
|
|
30
|
+
--hop-label-component-inherit-size-line-height: inherit;
|
|
31
|
+
}
|
|
32
|
+
:where(.hop-label) {
|
|
33
|
+
font-size: var(--font-size, --hop-label-component-md-font-size);
|
|
34
|
+
font-family: var(--font-family, --hop-label-component-md-font-family);
|
|
35
|
+
font-weight: var(--font-weight, --hop-label-component-md-font-weight);
|
|
36
|
+
line-height: var(--line-height, --hop-label-component-md-line-height);
|
|
37
|
+
}
|
|
38
|
+
:where(.hop-label--xs) {
|
|
39
|
+
--font-size: var(--hop-label-component-xs-font-size);
|
|
40
|
+
--font-family: var(--hop-label-component-xs-font-family);
|
|
41
|
+
--font-weight: var(--hop-label-component-xs-font-weight);
|
|
42
|
+
--line-height: var(--hop-label-component-xs-line-height);
|
|
43
|
+
}
|
|
44
|
+
:where(.hop-label--sm) {
|
|
45
|
+
--font-size: var(--hop-label-component-sm-font-size);
|
|
46
|
+
--font-family: var(--hop-label-component-sm-font-family);
|
|
47
|
+
--font-weight: var(--hop-label-component-sm-font-weight);
|
|
48
|
+
--line-height: var(--hop-label-component-sm-line-height);
|
|
49
|
+
}
|
|
50
|
+
:where(.hop-label--md) {
|
|
51
|
+
--font-size: var(--hop-label-component-md-font-size);
|
|
52
|
+
--font-family: var(--hop-label-component-md-font-family);
|
|
53
|
+
--font-weight: var(--hop-label-component-md-font-weight);
|
|
54
|
+
--line-height: var(--hop-label-component-md-line-height);
|
|
55
|
+
}
|
|
56
|
+
:where(.hop-label--lg) {
|
|
57
|
+
--font-size: var(--hop-label-component-lg-font-size);
|
|
58
|
+
--font-family: var(--hop-label-component-lg-font-family);
|
|
59
|
+
--font-weight: var(--hop-label-component-lg-font-weight);
|
|
60
|
+
--line-height: var(--hop-label-component-lg-line-height);
|
|
61
|
+
}
|
|
62
|
+
:where(.hop-label--xl) {
|
|
63
|
+
--font-size: var(--hop-label-component-xl-font-size);
|
|
64
|
+
--font-family: var(--hop-label-component-xl-font-family);
|
|
65
|
+
--font-weight: var(--hop-label-component-xl-font-weight);
|
|
66
|
+
--line-height: var(--hop-label-component-xl-line-height);
|
|
67
|
+
}
|
|
68
|
+
:where(.hop-label--2xl) {
|
|
69
|
+
--font-size: var(--hop-label-component-2xl-font-size);
|
|
70
|
+
--font-family: var(--hop-label-component-2xl-font-family);
|
|
71
|
+
--font-weight: var(--hop-label-component-2xl-font-weight);
|
|
72
|
+
--line-height: var(--hop-label-component-2xl-line-height);
|
|
73
|
+
}
|
|
74
|
+
:where(.hop-label--inherit) {
|
|
75
|
+
--font-size: var(--hop-label-component-inherit-size-font-size);
|
|
76
|
+
--font-family: var(--hop-label-component-inherit-size-font-family);
|
|
77
|
+
--font-weight: var(--hop-label-component-inherit-size-font-weight);
|
|
78
|
+
--line-height: var(--hop-label-component-inherit-size-line-height);
|
|
79
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { StyledComponentProps, ResponsiveProp } from '@hopper-ui/styled-system';
|
|
3
|
+
import { LabelProps as LabelProps$1 } from 'react-aria-components';
|
|
4
|
+
|
|
5
|
+
declare const GlobalLabelCssSelector = "hop-Label";
|
|
6
|
+
type RACLabelPropsToOmit = "elementType";
|
|
7
|
+
interface LabelProps extends StyledComponentProps<Omit<LabelProps$1, RACLabelPropsToOmit>> {
|
|
8
|
+
/**
|
|
9
|
+
* The Typography Type Scale to use.
|
|
10
|
+
* @default "md"
|
|
11
|
+
*/
|
|
12
|
+
size?: ResponsiveProp<"inherit" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl">;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A primitive label component matching Hopper's typography type scale.
|
|
16
|
+
*
|
|
17
|
+
* [View Documentation](TODO)
|
|
18
|
+
*/
|
|
19
|
+
declare const _Label: react.ForwardRefExoticComponent<LabelProps & react.RefAttributes<HTMLLabelElement>>;
|
|
20
|
+
|
|
21
|
+
export { GlobalLabelCssSelector, _Label as Label, type LabelProps, type RACLabelPropsToOmit };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LabelProps } from './Label.js';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import { ContextValue } from 'react-aria-components';
|
|
4
|
+
import '@hopper-ui/styled-system';
|
|
5
|
+
|
|
6
|
+
declare const LabelContext: react.Context<ContextValue<LabelProps, HTMLLabelElement>>;
|
|
7
|
+
|
|
8
|
+
export { LabelContext };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LabelContext } from '../../chunk-HVKOIMMW.js';
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/* src/Label/src/Label.module.css */
|
|
2
|
+
.hop-label {
|
|
3
|
+
--hop-label-component-xs-font-size: var(--hop-body-xs-font-size);
|
|
4
|
+
--hop-label-component-xs-font-family: var(--hop-body-xs-font-family);
|
|
5
|
+
--hop-label-component-xs-font-weight: var(--hop-body-xs-font-weight);
|
|
6
|
+
--hop-label-component-xs-line-height: var(--hop-body-xs-line-height);
|
|
7
|
+
--hop-label-component-sm-font-size: var(--hop-body-sm-font-size);
|
|
8
|
+
--hop-label-component-sm-font-family: var(--hop-body-sm-font-family);
|
|
9
|
+
--hop-label-component-sm-font-weight: var(--hop-body-sm-font-weight);
|
|
10
|
+
--hop-label-component-sm-line-height: var(--hop-body-sm-line-height);
|
|
11
|
+
--hop-label-component-md-font-size: var(--hop-body-md-font-size);
|
|
12
|
+
--hop-label-component-md-font-family: var(--hop-body-md-font-family);
|
|
13
|
+
--hop-label-component-md-font-weight: var(--hop-body-md-font-weight);
|
|
14
|
+
--hop-label-component-md-line-height: var(--hop-body-md-line-height);
|
|
15
|
+
--hop-label-component-lg-font-size: var(--hop-body-lg-font-size);
|
|
16
|
+
--hop-label-component-lg-font-family: var(--hop-body-lg-font-family);
|
|
17
|
+
--hop-label-component-lg-font-weight: var(--hop-body-lg-font-weight);
|
|
18
|
+
--hop-label-component-lg-line-height: var(--hop-body-lg-line-height);
|
|
19
|
+
--hop-label-component-xl-font-size: var(--hop-body-xl-font-size);
|
|
20
|
+
--hop-label-component-xl-font-family: var(--hop-body-xl-font-family);
|
|
21
|
+
--hop-label-component-xl-font-weight: var(--hop-body-xl-font-weight);
|
|
22
|
+
--hop-label-component-xl-line-height: var(--hop-body-xl-line-height);
|
|
23
|
+
--hop-label-component-2xl-font-size: var(--hop-body-2xl-font-size);
|
|
24
|
+
--hop-label-component-2xl-font-family: var(--hop-body-2xl-font-family);
|
|
25
|
+
--hop-label-component-2xl-font-weight: var(--hop-body-2xl-font-weight);
|
|
26
|
+
--hop-label-component-2xl-line-height: var(--hop-body-2xl-line-height);
|
|
27
|
+
--hop-label-component-inherit-size-font-size: inherit;
|
|
28
|
+
--hop-label-component-inherit-size-font-family: inherit;
|
|
29
|
+
--hop-label-component-inherit-size-font-weight: inherit;
|
|
30
|
+
--hop-label-component-inherit-size-line-height: inherit;
|
|
31
|
+
}
|
|
32
|
+
:where(.hop-label) {
|
|
33
|
+
font-size: var(--font-size, --hop-label-component-md-font-size);
|
|
34
|
+
font-family: var(--font-family, --hop-label-component-md-font-family);
|
|
35
|
+
font-weight: var(--font-weight, --hop-label-component-md-font-weight);
|
|
36
|
+
line-height: var(--line-height, --hop-label-component-md-line-height);
|
|
37
|
+
}
|
|
38
|
+
:where(.hop-label--xs) {
|
|
39
|
+
--font-size: var(--hop-label-component-xs-font-size);
|
|
40
|
+
--font-family: var(--hop-label-component-xs-font-family);
|
|
41
|
+
--font-weight: var(--hop-label-component-xs-font-weight);
|
|
42
|
+
--line-height: var(--hop-label-component-xs-line-height);
|
|
43
|
+
}
|
|
44
|
+
:where(.hop-label--sm) {
|
|
45
|
+
--font-size: var(--hop-label-component-sm-font-size);
|
|
46
|
+
--font-family: var(--hop-label-component-sm-font-family);
|
|
47
|
+
--font-weight: var(--hop-label-component-sm-font-weight);
|
|
48
|
+
--line-height: var(--hop-label-component-sm-line-height);
|
|
49
|
+
}
|
|
50
|
+
:where(.hop-label--md) {
|
|
51
|
+
--font-size: var(--hop-label-component-md-font-size);
|
|
52
|
+
--font-family: var(--hop-label-component-md-font-family);
|
|
53
|
+
--font-weight: var(--hop-label-component-md-font-weight);
|
|
54
|
+
--line-height: var(--hop-label-component-md-line-height);
|
|
55
|
+
}
|
|
56
|
+
:where(.hop-label--lg) {
|
|
57
|
+
--font-size: var(--hop-label-component-lg-font-size);
|
|
58
|
+
--font-family: var(--hop-label-component-lg-font-family);
|
|
59
|
+
--font-weight: var(--hop-label-component-lg-font-weight);
|
|
60
|
+
--line-height: var(--hop-label-component-lg-line-height);
|
|
61
|
+
}
|
|
62
|
+
:where(.hop-label--xl) {
|
|
63
|
+
--font-size: var(--hop-label-component-xl-font-size);
|
|
64
|
+
--font-family: var(--hop-label-component-xl-font-family);
|
|
65
|
+
--font-weight: var(--hop-label-component-xl-font-weight);
|
|
66
|
+
--line-height: var(--hop-label-component-xl-line-height);
|
|
67
|
+
}
|
|
68
|
+
:where(.hop-label--2xl) {
|
|
69
|
+
--font-size: var(--hop-label-component-2xl-font-size);
|
|
70
|
+
--font-family: var(--hop-label-component-2xl-font-family);
|
|
71
|
+
--font-weight: var(--hop-label-component-2xl-font-weight);
|
|
72
|
+
--line-height: var(--hop-label-component-2xl-line-height);
|
|
73
|
+
}
|
|
74
|
+
:where(.hop-label--inherit) {
|
|
75
|
+
--font-size: var(--hop-label-component-inherit-size-font-size);
|
|
76
|
+
--font-family: var(--hop-label-component-inherit-size-font-family);
|
|
77
|
+
--font-weight: var(--hop-label-component-inherit-size-font-weight);
|
|
78
|
+
--line-height: var(--hop-label-component-inherit-size-line-height);
|
|
79
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/* src/Spinner/src/Spinner.module.css */
|
|
2
|
+
@keyframes spin {
|
|
3
|
+
0% {
|
|
4
|
+
transform: rotate(0deg);
|
|
5
|
+
}
|
|
6
|
+
100% {
|
|
7
|
+
transform: rotate(360deg);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
.hop-spinner {
|
|
11
|
+
--hop-spinner-component-border-radius: var(--hop-shape-circle);
|
|
12
|
+
--hop-spinner-component-sm-wheel-size: 1rem;
|
|
13
|
+
--hop-spinner-component-md-wheel-size: 1.25rem;
|
|
14
|
+
--hop-spinner-component-lg-wheel-size: 1.5rem;
|
|
15
|
+
--hop-spinner-component-track-width: 0.125rem;
|
|
16
|
+
--hop-spinner-component-track-opacity: 0.2;
|
|
17
|
+
--hop-spinner-component-track-border: var(--hop-spinner-component-track-width) solid currentcolor;
|
|
18
|
+
--hop-spinner-component-fill-animation: spin .8s infinite linear;
|
|
19
|
+
--hop-spinner-component-fill-animation-reduced-motion-duration: 2s;
|
|
20
|
+
--hop-spinner-component-fill-border: var(--hop-spinner-component-track-width) solid transparent;
|
|
21
|
+
--hop-spinner-component-fill-border-inline-start: var(--hop-spinner-component-track-width) solid currentcolor;
|
|
22
|
+
--hop-spinner-component-label-margin-inline-start: var(--hop-space-inline-sm);
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
display: grid;
|
|
25
|
+
grid-template-areas: "spinner label";
|
|
26
|
+
grid-template-columns: min-content auto;
|
|
27
|
+
align-items: center;
|
|
28
|
+
}
|
|
29
|
+
.hop-spinner--sm {
|
|
30
|
+
--width: var(--hop-spinner-component-sm-wheel-size);
|
|
31
|
+
--height: var(--hop-spinner-component-sm-wheel-size);
|
|
32
|
+
}
|
|
33
|
+
.hop-spinner--md {
|
|
34
|
+
--width: var(--hop-spinner-component-md-wheel-size);
|
|
35
|
+
--height: var(--hop-spinner-component-md-wheel-size);
|
|
36
|
+
}
|
|
37
|
+
.hop-spinner--lg {
|
|
38
|
+
--width: var(--hop-spinner-component-lg-wheel-size);
|
|
39
|
+
--height: var(--hop-spinner-component-lg-wheel-size);
|
|
40
|
+
}
|
|
41
|
+
.hop-spinner__track {
|
|
42
|
+
box-sizing: border-box;
|
|
43
|
+
inline-size: var(--width, --hop-spinner-component-md-wheel-size);
|
|
44
|
+
block-size: var(--height, --hop-spinner-component-md-wheel-size);
|
|
45
|
+
border-radius: var(--hop-spinner-component-border-radius);
|
|
46
|
+
border: var(--hop-spinner-component-track-border);
|
|
47
|
+
opacity: var(--hop-spinner-component-track-opacity);
|
|
48
|
+
grid-area: spinner;
|
|
49
|
+
}
|
|
50
|
+
.hop-spinner__fill {
|
|
51
|
+
box-sizing: border-box;
|
|
52
|
+
inline-size: var(--width, --hop-spinner-component-md-wheel-size);
|
|
53
|
+
block-size: var(--height, --hop-spinner-component-md-wheel-size);
|
|
54
|
+
border-radius: var(--hop-spinner-component-border-radius);
|
|
55
|
+
border: var( --hop-spinner-component-fill-border);
|
|
56
|
+
border-inline-start: var(--hop-spinner-component-fill-border-inline-start);
|
|
57
|
+
grid-area: spinner;
|
|
58
|
+
animation: var(--hop-spinner-component-fill-animation);
|
|
59
|
+
}
|
|
60
|
+
@media (prefers-reduced-motion: reduce) {
|
|
61
|
+
.hop-spinner__fill {
|
|
62
|
+
animation-duration: var(--hop-spinner-component-fill-animation-reduced-motion-duration);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
.hop-spinner__label {
|
|
66
|
+
grid-area: label;
|
|
67
|
+
margin-inline-start: var(--hop-spinner-component-label-margin-inline-start);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* src/Label/src/Label.module.css */
|
|
71
|
+
.hop-label {
|
|
72
|
+
--hop-label-component-xs-font-size: var(--hop-body-xs-font-size);
|
|
73
|
+
--hop-label-component-xs-font-family: var(--hop-body-xs-font-family);
|
|
74
|
+
--hop-label-component-xs-font-weight: var(--hop-body-xs-font-weight);
|
|
75
|
+
--hop-label-component-xs-line-height: var(--hop-body-xs-line-height);
|
|
76
|
+
--hop-label-component-sm-font-size: var(--hop-body-sm-font-size);
|
|
77
|
+
--hop-label-component-sm-font-family: var(--hop-body-sm-font-family);
|
|
78
|
+
--hop-label-component-sm-font-weight: var(--hop-body-sm-font-weight);
|
|
79
|
+
--hop-label-component-sm-line-height: var(--hop-body-sm-line-height);
|
|
80
|
+
--hop-label-component-md-font-size: var(--hop-body-md-font-size);
|
|
81
|
+
--hop-label-component-md-font-family: var(--hop-body-md-font-family);
|
|
82
|
+
--hop-label-component-md-font-weight: var(--hop-body-md-font-weight);
|
|
83
|
+
--hop-label-component-md-line-height: var(--hop-body-md-line-height);
|
|
84
|
+
--hop-label-component-lg-font-size: var(--hop-body-lg-font-size);
|
|
85
|
+
--hop-label-component-lg-font-family: var(--hop-body-lg-font-family);
|
|
86
|
+
--hop-label-component-lg-font-weight: var(--hop-body-lg-font-weight);
|
|
87
|
+
--hop-label-component-lg-line-height: var(--hop-body-lg-line-height);
|
|
88
|
+
--hop-label-component-xl-font-size: var(--hop-body-xl-font-size);
|
|
89
|
+
--hop-label-component-xl-font-family: var(--hop-body-xl-font-family);
|
|
90
|
+
--hop-label-component-xl-font-weight: var(--hop-body-xl-font-weight);
|
|
91
|
+
--hop-label-component-xl-line-height: var(--hop-body-xl-line-height);
|
|
92
|
+
--hop-label-component-2xl-font-size: var(--hop-body-2xl-font-size);
|
|
93
|
+
--hop-label-component-2xl-font-family: var(--hop-body-2xl-font-family);
|
|
94
|
+
--hop-label-component-2xl-font-weight: var(--hop-body-2xl-font-weight);
|
|
95
|
+
--hop-label-component-2xl-line-height: var(--hop-body-2xl-line-height);
|
|
96
|
+
--hop-label-component-inherit-size-font-size: inherit;
|
|
97
|
+
--hop-label-component-inherit-size-font-family: inherit;
|
|
98
|
+
--hop-label-component-inherit-size-font-weight: inherit;
|
|
99
|
+
--hop-label-component-inherit-size-line-height: inherit;
|
|
100
|
+
}
|
|
101
|
+
:where(.hop-label) {
|
|
102
|
+
font-size: var(--font-size, --hop-label-component-md-font-size);
|
|
103
|
+
font-family: var(--font-family, --hop-label-component-md-font-family);
|
|
104
|
+
font-weight: var(--font-weight, --hop-label-component-md-font-weight);
|
|
105
|
+
line-height: var(--line-height, --hop-label-component-md-line-height);
|
|
106
|
+
}
|
|
107
|
+
:where(.hop-label--xs) {
|
|
108
|
+
--font-size: var(--hop-label-component-xs-font-size);
|
|
109
|
+
--font-family: var(--hop-label-component-xs-font-family);
|
|
110
|
+
--font-weight: var(--hop-label-component-xs-font-weight);
|
|
111
|
+
--line-height: var(--hop-label-component-xs-line-height);
|
|
112
|
+
}
|
|
113
|
+
:where(.hop-label--sm) {
|
|
114
|
+
--font-size: var(--hop-label-component-sm-font-size);
|
|
115
|
+
--font-family: var(--hop-label-component-sm-font-family);
|
|
116
|
+
--font-weight: var(--hop-label-component-sm-font-weight);
|
|
117
|
+
--line-height: var(--hop-label-component-sm-line-height);
|
|
118
|
+
}
|
|
119
|
+
:where(.hop-label--md) {
|
|
120
|
+
--font-size: var(--hop-label-component-md-font-size);
|
|
121
|
+
--font-family: var(--hop-label-component-md-font-family);
|
|
122
|
+
--font-weight: var(--hop-label-component-md-font-weight);
|
|
123
|
+
--line-height: var(--hop-label-component-md-line-height);
|
|
124
|
+
}
|
|
125
|
+
:where(.hop-label--lg) {
|
|
126
|
+
--font-size: var(--hop-label-component-lg-font-size);
|
|
127
|
+
--font-family: var(--hop-label-component-lg-font-family);
|
|
128
|
+
--font-weight: var(--hop-label-component-lg-font-weight);
|
|
129
|
+
--line-height: var(--hop-label-component-lg-line-height);
|
|
130
|
+
}
|
|
131
|
+
:where(.hop-label--xl) {
|
|
132
|
+
--font-size: var(--hop-label-component-xl-font-size);
|
|
133
|
+
--font-family: var(--hop-label-component-xl-font-family);
|
|
134
|
+
--font-weight: var(--hop-label-component-xl-font-weight);
|
|
135
|
+
--line-height: var(--hop-label-component-xl-line-height);
|
|
136
|
+
}
|
|
137
|
+
:where(.hop-label--2xl) {
|
|
138
|
+
--font-size: var(--hop-label-component-2xl-font-size);
|
|
139
|
+
--font-family: var(--hop-label-component-2xl-font-family);
|
|
140
|
+
--font-weight: var(--hop-label-component-2xl-font-weight);
|
|
141
|
+
--line-height: var(--hop-label-component-2xl-line-height);
|
|
142
|
+
}
|
|
143
|
+
:where(.hop-label--inherit) {
|
|
144
|
+
--font-size: var(--hop-label-component-inherit-size-font-size);
|
|
145
|
+
--font-family: var(--hop-label-component-inherit-size-font-family);
|
|
146
|
+
--font-weight: var(--hop-label-component-inherit-size-font-weight);
|
|
147
|
+
--line-height: var(--hop-label-component-inherit-size-line-height);
|
|
148
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { StyledSystemProps, ResponsiveProp } from '@hopper-ui/styled-system';
|
|
3
|
+
import { BaseComponentProps } from '../../utils/src/types.js';
|
|
4
|
+
import '@react-types/shared';
|
|
5
|
+
import 'react-aria-components';
|
|
6
|
+
|
|
7
|
+
declare const GlobalSpinnerCssSelector = "hop-Spinner";
|
|
8
|
+
interface SpinnerProps extends StyledSystemProps, BaseComponentProps {
|
|
9
|
+
/**
|
|
10
|
+
* What the Spinner's diameter should be.
|
|
11
|
+
*/
|
|
12
|
+
size?: ResponsiveProp<"sm" | "md" | "lg">;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A spinner indicates that a part of the product is currently performing a task, and the duration of this process is unknown.
|
|
16
|
+
*
|
|
17
|
+
* [View Documentation](TODO)
|
|
18
|
+
*/
|
|
19
|
+
declare const _Spinner: react.ForwardRefExoticComponent<SpinnerProps & react.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
|
|
21
|
+
export { GlobalSpinnerCssSelector, _Spinner as Spinner, type SpinnerProps };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SpinnerProps } from './Spinner.js';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import { ContextValue } from 'react-aria-components';
|
|
4
|
+
import '@hopper-ui/styled-system';
|
|
5
|
+
import '../../utils/src/types.js';
|
|
6
|
+
import '@react-types/shared';
|
|
7
|
+
|
|
8
|
+
declare const SpinnerContext: react.Context<ContextValue<SpinnerProps, HTMLDivElement>>;
|
|
9
|
+
|
|
10
|
+
export { SpinnerContext };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SpinnerContext } from '../../chunk-4ZYV2XLW.js';
|