@hopper-ui/components 0.0.11 → 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 +11 -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
|
@@ -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,7 @@
|
|
|
1
|
+
export { GlobalSpinnerCssSelector, Spinner, SpinnerProps } from './Spinner.js';
|
|
2
|
+
export { SpinnerContext } from './SpinnerContext.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,6 @@
|
|
|
1
|
+
export { GlobalSpinnerCssSelector, _Spinner as Spinner } from '../../chunk-QIOYM2XJ.js';
|
|
2
|
+
import '../../chunk-SEU4CGZD.js';
|
|
3
|
+
export { SpinnerContext } from '../../chunk-4ZYV2XLW.js';
|
|
4
|
+
import '../../chunk-XCKF6EU7.js';
|
|
5
|
+
import '../../chunk-6BEVZRUL.js';
|
|
6
|
+
import '../../chunk-HVKOIMMW.js';
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/* src/Text/src/Text.module.css */
|
|
2
|
+
.hop-text {
|
|
3
|
+
--hop-text-component-xs-font-size: var(--hop-body-xs-font-size);
|
|
4
|
+
--hop-text-component-xs-font-family: var(--hop-body-xs-font-family);
|
|
5
|
+
--hop-text-component-xs-font-weight: var(--hop-body-xs-font-weight);
|
|
6
|
+
--hop-text-component-xs-line-height: var(--hop-body-xs-line-height);
|
|
7
|
+
--hop-text-component-sm-font-size: var(--hop-body-sm-font-size);
|
|
8
|
+
--hop-text-component-sm-font-family: var(--hop-body-sm-font-family);
|
|
9
|
+
--hop-text-component-sm-font-weight: var(--hop-body-sm-font-weight);
|
|
10
|
+
--hop-text-component-sm-line-height: var(--hop-body-sm-line-height);
|
|
11
|
+
--hop-text-component-md-font-size: var(--hop-body-md-font-size);
|
|
12
|
+
--hop-text-component-md-font-family: var(--hop-body-md-font-family);
|
|
13
|
+
--hop-text-component-md-font-weight: var(--hop-body-md-font-weight);
|
|
14
|
+
--hop-text-component-md-line-height: var(--hop-body-md-line-height);
|
|
15
|
+
--hop-text-component-lg-font-size: var(--hop-body-lg-font-size);
|
|
16
|
+
--hop-text-component-lg-font-family: var(--hop-body-lg-font-family);
|
|
17
|
+
--hop-text-component-lg-font-weight: var(--hop-body-lg-font-weight);
|
|
18
|
+
--hop-text-component-lg-line-height: var(--hop-body-lg-line-height);
|
|
19
|
+
--hop-text-component-xl-font-size: var(--hop-body-xl-font-size);
|
|
20
|
+
--hop-text-component-xl-font-family: var(--hop-body-xl-font-family);
|
|
21
|
+
--hop-text-component-xl-font-weight: var(--hop-body-xl-font-weight);
|
|
22
|
+
--hop-text-component-xl-line-height: var(--hop-body-xl-line-height);
|
|
23
|
+
--hop-text-component-2xl-font-size: var(--hop-body-2xl-font-size);
|
|
24
|
+
--hop-text-component-2xl-font-family: var(--hop-body-2xl-font-family);
|
|
25
|
+
--hop-text-component-2xl-font-weight: var(--hop-body-2xl-font-weight);
|
|
26
|
+
--hop-text-component-2xl-line-height: var(--hop-body-2xl-line-height);
|
|
27
|
+
--hop-text-component-inherit-size-font-size: inherit;
|
|
28
|
+
--hop-text-component-inherit-size-font-family: inherit;
|
|
29
|
+
--hop-text-component-inherit-size-font-weight: inherit;
|
|
30
|
+
--hop-text-component-inherit-size-line-height: inherit;
|
|
31
|
+
}
|
|
32
|
+
:where(.hop-text) {
|
|
33
|
+
font-size: var(--font-size);
|
|
34
|
+
font-family: var(--font-family);
|
|
35
|
+
font-weight: var(--font-weight);
|
|
36
|
+
line-height: var(--line-height);
|
|
37
|
+
}
|
|
38
|
+
:where(.hop-text--xs) {
|
|
39
|
+
--font-size: var(--hop-text-component-xs-font-size);
|
|
40
|
+
--font-family: var(--hop-text-component-xs-font-family);
|
|
41
|
+
--font-weight: var(--hop-text-component-xs-font-weight);
|
|
42
|
+
--line-height: var(--hop-text-component-xs-line-height);
|
|
43
|
+
}
|
|
44
|
+
:where(.hop-text--sm) {
|
|
45
|
+
--font-size: var(--hop-text-component-sm-font-size);
|
|
46
|
+
--font-family: var(--hop-text-component-sm-font-family);
|
|
47
|
+
--font-weight: var(--hop-text-component-sm-font-weight);
|
|
48
|
+
--line-height: var(--hop-text-component-sm-line-height);
|
|
49
|
+
}
|
|
50
|
+
:where(.hop-text--md) {
|
|
51
|
+
--font-size: var(--hop-text-component-md-font-size);
|
|
52
|
+
--font-family: var(--hop-text-component-md-font-family);
|
|
53
|
+
--font-weight: var(--hop-text-component-md-font-weight);
|
|
54
|
+
--line-height: var(--hop-text-component-md-line-height);
|
|
55
|
+
}
|
|
56
|
+
:where(.hop-text--lg) {
|
|
57
|
+
--font-size: var(--hop-text-component-lg-font-size);
|
|
58
|
+
--font-family: var(--hop-text-component-lg-font-family);
|
|
59
|
+
--font-weight: var(--hop-text-component-lg-font-weight);
|
|
60
|
+
--line-height: var(--hop-text-component-lg-line-height);
|
|
61
|
+
}
|
|
62
|
+
:where(.hop-text--xl) {
|
|
63
|
+
--font-size: var(--hop-text-component-xl-font-size);
|
|
64
|
+
--font-family: var(--hop-text-component-xl-font-family);
|
|
65
|
+
--font-weight: var(--hop-text-component-xl-font-weight);
|
|
66
|
+
--line-height: var(--hop-text-component-xl-line-height);
|
|
67
|
+
}
|
|
68
|
+
:where(.hop-text--2xl) {
|
|
69
|
+
--font-size: var(--hop-text-component-2xl-font-size);
|
|
70
|
+
--font-family: var(--hop-text-component-2xl-font-family);
|
|
71
|
+
--font-weight: var(--hop-text-component-2xl-font-weight);
|
|
72
|
+
--line-height: var(--hop-text-component-2xl-line-height);
|
|
73
|
+
}
|
|
74
|
+
:where(.hop-text--inherit) {
|
|
75
|
+
--font-size: var(--hop-text-component-inherit-size-font-size);
|
|
76
|
+
--font-family: var(--hop-text-component-inherit-size-font-family);
|
|
77
|
+
--font-weight: var(--hop-text-component-inherit-size-font-weight);
|
|
78
|
+
--line-height: var(--hop-text-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 { TextProps as TextProps$1 } from 'react-aria-components';
|
|
4
|
+
|
|
5
|
+
declare const GlobalTextCssSelector = "hop-Text";
|
|
6
|
+
type RACTextPropsToOmit = "elementType";
|
|
7
|
+
interface TextProps extends StyledComponentProps<Omit<TextProps$1, RACTextPropsToOmit>> {
|
|
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 text component matching Hopper's typography type scale.
|
|
16
|
+
*
|
|
17
|
+
* [View Documentation](TODO)
|
|
18
|
+
*/
|
|
19
|
+
declare const _Text: react.ForwardRefExoticComponent<TextProps & react.RefAttributes<HTMLSpanElement>>;
|
|
20
|
+
|
|
21
|
+
export { GlobalTextCssSelector, type RACTextPropsToOmit, _Text as Text, type TextProps };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TextProps } from './Text.js';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import { ContextValue } from 'react-aria-components';
|
|
4
|
+
import '@hopper-ui/styled-system';
|
|
5
|
+
|
|
6
|
+
declare const TextContext: react.Context<ContextValue<TextProps, HTMLSpanElement>>;
|
|
7
|
+
|
|
8
|
+
export { TextContext };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TextContext } from '../../chunk-OE5BLFZI.js';
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/* src/Text/src/Text.module.css */
|
|
2
|
+
.hop-text {
|
|
3
|
+
--hop-text-component-xs-font-size: var(--hop-body-xs-font-size);
|
|
4
|
+
--hop-text-component-xs-font-family: var(--hop-body-xs-font-family);
|
|
5
|
+
--hop-text-component-xs-font-weight: var(--hop-body-xs-font-weight);
|
|
6
|
+
--hop-text-component-xs-line-height: var(--hop-body-xs-line-height);
|
|
7
|
+
--hop-text-component-sm-font-size: var(--hop-body-sm-font-size);
|
|
8
|
+
--hop-text-component-sm-font-family: var(--hop-body-sm-font-family);
|
|
9
|
+
--hop-text-component-sm-font-weight: var(--hop-body-sm-font-weight);
|
|
10
|
+
--hop-text-component-sm-line-height: var(--hop-body-sm-line-height);
|
|
11
|
+
--hop-text-component-md-font-size: var(--hop-body-md-font-size);
|
|
12
|
+
--hop-text-component-md-font-family: var(--hop-body-md-font-family);
|
|
13
|
+
--hop-text-component-md-font-weight: var(--hop-body-md-font-weight);
|
|
14
|
+
--hop-text-component-md-line-height: var(--hop-body-md-line-height);
|
|
15
|
+
--hop-text-component-lg-font-size: var(--hop-body-lg-font-size);
|
|
16
|
+
--hop-text-component-lg-font-family: var(--hop-body-lg-font-family);
|
|
17
|
+
--hop-text-component-lg-font-weight: var(--hop-body-lg-font-weight);
|
|
18
|
+
--hop-text-component-lg-line-height: var(--hop-body-lg-line-height);
|
|
19
|
+
--hop-text-component-xl-font-size: var(--hop-body-xl-font-size);
|
|
20
|
+
--hop-text-component-xl-font-family: var(--hop-body-xl-font-family);
|
|
21
|
+
--hop-text-component-xl-font-weight: var(--hop-body-xl-font-weight);
|
|
22
|
+
--hop-text-component-xl-line-height: var(--hop-body-xl-line-height);
|
|
23
|
+
--hop-text-component-2xl-font-size: var(--hop-body-2xl-font-size);
|
|
24
|
+
--hop-text-component-2xl-font-family: var(--hop-body-2xl-font-family);
|
|
25
|
+
--hop-text-component-2xl-font-weight: var(--hop-body-2xl-font-weight);
|
|
26
|
+
--hop-text-component-2xl-line-height: var(--hop-body-2xl-line-height);
|
|
27
|
+
--hop-text-component-inherit-size-font-size: inherit;
|
|
28
|
+
--hop-text-component-inherit-size-font-family: inherit;
|
|
29
|
+
--hop-text-component-inherit-size-font-weight: inherit;
|
|
30
|
+
--hop-text-component-inherit-size-line-height: inherit;
|
|
31
|
+
}
|
|
32
|
+
:where(.hop-text) {
|
|
33
|
+
font-size: var(--font-size);
|
|
34
|
+
font-family: var(--font-family);
|
|
35
|
+
font-weight: var(--font-weight);
|
|
36
|
+
line-height: var(--line-height);
|
|
37
|
+
}
|
|
38
|
+
:where(.hop-text--xs) {
|
|
39
|
+
--font-size: var(--hop-text-component-xs-font-size);
|
|
40
|
+
--font-family: var(--hop-text-component-xs-font-family);
|
|
41
|
+
--font-weight: var(--hop-text-component-xs-font-weight);
|
|
42
|
+
--line-height: var(--hop-text-component-xs-line-height);
|
|
43
|
+
}
|
|
44
|
+
:where(.hop-text--sm) {
|
|
45
|
+
--font-size: var(--hop-text-component-sm-font-size);
|
|
46
|
+
--font-family: var(--hop-text-component-sm-font-family);
|
|
47
|
+
--font-weight: var(--hop-text-component-sm-font-weight);
|
|
48
|
+
--line-height: var(--hop-text-component-sm-line-height);
|
|
49
|
+
}
|
|
50
|
+
:where(.hop-text--md) {
|
|
51
|
+
--font-size: var(--hop-text-component-md-font-size);
|
|
52
|
+
--font-family: var(--hop-text-component-md-font-family);
|
|
53
|
+
--font-weight: var(--hop-text-component-md-font-weight);
|
|
54
|
+
--line-height: var(--hop-text-component-md-line-height);
|
|
55
|
+
}
|
|
56
|
+
:where(.hop-text--lg) {
|
|
57
|
+
--font-size: var(--hop-text-component-lg-font-size);
|
|
58
|
+
--font-family: var(--hop-text-component-lg-font-family);
|
|
59
|
+
--font-weight: var(--hop-text-component-lg-font-weight);
|
|
60
|
+
--line-height: var(--hop-text-component-lg-line-height);
|
|
61
|
+
}
|
|
62
|
+
:where(.hop-text--xl) {
|
|
63
|
+
--font-size: var(--hop-text-component-xl-font-size);
|
|
64
|
+
--font-family: var(--hop-text-component-xl-font-family);
|
|
65
|
+
--font-weight: var(--hop-text-component-xl-font-weight);
|
|
66
|
+
--line-height: var(--hop-text-component-xl-line-height);
|
|
67
|
+
}
|
|
68
|
+
:where(.hop-text--2xl) {
|
|
69
|
+
--font-size: var(--hop-text-component-2xl-font-size);
|
|
70
|
+
--font-family: var(--hop-text-component-2xl-font-family);
|
|
71
|
+
--font-weight: var(--hop-text-component-2xl-font-weight);
|
|
72
|
+
--line-height: var(--hop-text-component-2xl-line-height);
|
|
73
|
+
}
|
|
74
|
+
:where(.hop-text--inherit) {
|
|
75
|
+
--font-size: var(--hop-text-component-inherit-size-font-size);
|
|
76
|
+
--font-family: var(--hop-text-component-inherit-size-font-family);
|
|
77
|
+
--font-weight: var(--hop-text-component-inherit-size-font-weight);
|
|
78
|
+
--line-height: var(--hop-text-component-inherit-size-line-height);
|
|
79
|
+
}
|