@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
|
@@ -0,0 +1,468 @@
|
|
|
1
|
+
/* src/buttons/src/Button.module.css */
|
|
2
|
+
.hop-button {
|
|
3
|
+
--hop-button-component-padding: 0 var(--hop-space-inset-md);
|
|
4
|
+
--hop-button-component-border-radius: var(--hop-shape-rounded-md);
|
|
5
|
+
--hop-button-component-focus-ring-color: var(--hop-primary-surface-hover);
|
|
6
|
+
--hop-button-component-sm-height: 2rem;
|
|
7
|
+
--hop-button-component-md-height: 2.5rem;
|
|
8
|
+
--hop-button-component-primary-color: var(--hop-primary-text-strong);
|
|
9
|
+
--hop-button-component-primary-color-hover: var(--hop-primary-text-strong-hover);
|
|
10
|
+
--hop-button-component-primary-color-pressed: var(--hop-primary-text-active);
|
|
11
|
+
--hop-button-component-primary-color-disabled: var(--hop-neutral-text-disabled);
|
|
12
|
+
--hop-button-component-primary-background-color: var(--hop-primary-surface-strong);
|
|
13
|
+
--hop-button-component-primary-background-color-hover: var(--hop-primary-surface-hover);
|
|
14
|
+
--hop-button-component-primary-background-color-pressed: var(--hop-primary-surface-active);
|
|
15
|
+
--hop-button-component-primary-background-color-disabled: var(--hop-neutral-surface-disabled);
|
|
16
|
+
--hop-button-component-primary-border: 0;
|
|
17
|
+
--hop-button-component-primary-border-hover: 0;
|
|
18
|
+
--hop-button-component-primary-border-pressed: 0;
|
|
19
|
+
--hop-button-component-primary-border-disabled: 0;
|
|
20
|
+
--hop-button-component-secondary-color: var(--hop-neutral-text);
|
|
21
|
+
--hop-button-component-secondary-color-hover: var(--hop-neutral-text-hover);
|
|
22
|
+
--hop-button-component-secondary-color-pressed: var(--hop-neutral-text-active);
|
|
23
|
+
--hop-button-component-secondary-color-disabled: var(--hop-neutral-text-disabled);
|
|
24
|
+
--hop-button-component-secondary-background-color: var(--hop-neutral-surface);
|
|
25
|
+
--hop-button-component-secondary-background-color-hover: var(--hop-neutral-surface-hover);
|
|
26
|
+
--hop-button-component-secondary-background-color-pressed: var(--hop-neutral-surface-active);
|
|
27
|
+
--hop-button-component-secondary-background-color-disabled: var(--hop-neutral-surface-disabled);
|
|
28
|
+
--hop-button-component-secondary-border: 0.0625rem solid var(--hop-neutral-border-strong);
|
|
29
|
+
--hop-button-component-secondary-border-hover: 0.0625rem solid var(--hop-neutral-border-strong);
|
|
30
|
+
--hop-button-component-secondary-border-pressed: 0.0625rem solid var(--hop-neutral-border-active);
|
|
31
|
+
--hop-button-component-secondary-border-disabled: 0;
|
|
32
|
+
--hop-button-component-tertiary-color: var(--hop-neutral-text);
|
|
33
|
+
--hop-button-component-tertiary-color-hover: var(--hop-neutral-text-hover);
|
|
34
|
+
--hop-button-component-tertiary-color-pressed: var(--hop-neutral-text);
|
|
35
|
+
--hop-button-component-tertiary-color-disabled: var(--hop-neutral-text-disabled);
|
|
36
|
+
--hop-button-component-tertiary-background-color: var(--hop-neutral-surface);
|
|
37
|
+
--hop-button-component-tertiary-background-color-hover: var(--hop-neutral-surface-hover);
|
|
38
|
+
--hop-button-component-tertiary-background-color-pressed: var(--hop-neutral-surface-weak-active);
|
|
39
|
+
--hop-button-component-tertiary-background-color-disabled: var(--hop-neutral-surface);
|
|
40
|
+
--hop-button-component-tertiary-border: 0;
|
|
41
|
+
--hop-button-component-tertiary-border-hover: 0;
|
|
42
|
+
--hop-button-component-tertiary-border-pressed: 0;
|
|
43
|
+
--hop-button-component-tertiary-border-disabled: 0;
|
|
44
|
+
--hop-button-component-upsell-color: var(--hop-upsell-text);
|
|
45
|
+
--hop-button-component-upsell-color-hover: var(--hop-upsell-text-hover);
|
|
46
|
+
--hop-button-component-upsell-color-pressed: var(--hop-upsell-text-active);
|
|
47
|
+
--hop-button-component-upsell-color-disabled: var(--hop-neutral-text-disabled);
|
|
48
|
+
--hop-button-component-upsell-background-color: var(--hop-upsell-surface);
|
|
49
|
+
--hop-button-component-upsell-background-color-hover: var(--hop-upsell-surface-hover);
|
|
50
|
+
--hop-button-component-upsell-background-color-pressed: var(--hop-upsell-surface-active);
|
|
51
|
+
--hop-button-component-upsell-background-color-disabled: var(--hop-neutral-surface-disabled);
|
|
52
|
+
--hop-button-component-upsell-border: 0.0625rem solid var(--hop-upsell-surface);
|
|
53
|
+
--hop-button-component-upsell-border-hover: 0.0625rem solid var(--hop-upsell-surface-hover);
|
|
54
|
+
--hop-button-component-upsell-border-pressed: 0.0625rem solid var(--hop-upsell-border-active);
|
|
55
|
+
--hop-button-component-upsell-border-disabled: 0;
|
|
56
|
+
--hop-button-component-negative-color: var(--hop-danger-text-strong);
|
|
57
|
+
--hop-button-component-negative-color-hover: var(--hop-danger-text-strong-hover);
|
|
58
|
+
--hop-button-component-negative-color-pressed: var(--hop-danger-text-active);
|
|
59
|
+
--hop-button-component-negative-color-disabled: var(--hop-neutral-text-disabled);
|
|
60
|
+
--hop-button-component-negative-background-color: var(--hop-danger-surface-strong);
|
|
61
|
+
--hop-button-component-negative-background-color-hover: var(--hop-danger-surface-hover);
|
|
62
|
+
--hop-button-component-negative-background-color-pressed: var(--hop-danger-surface-active);
|
|
63
|
+
--hop-button-component-negative-background-color-disabled: var(--hop-neutral-surface-disabled);
|
|
64
|
+
--hop-button-component-negative-border: 0.0625rem solid var(--hop-danger-surface-strong);
|
|
65
|
+
--hop-button-component-negative-border-hover: 0.0625rem solid var(--hop-danger-surface-hover);
|
|
66
|
+
--hop-button-component-negative-border-pressed: 0.0625rem solid var(--hop-danger-border-active);
|
|
67
|
+
--hop-button-component-negative-border-disabled: 0;
|
|
68
|
+
--inline-size: max-content;
|
|
69
|
+
--block-size: var(--hop-button-component-md-height);
|
|
70
|
+
--background-color: var(--hop-primary-surface-strong);
|
|
71
|
+
--color: var(--hop-primary-text-strong);
|
|
72
|
+
--border: 0;
|
|
73
|
+
cursor: pointer;
|
|
74
|
+
display: grid;
|
|
75
|
+
grid-template-areas: "start-icon content end-icon";
|
|
76
|
+
grid-template-columns: auto min-content auto;
|
|
77
|
+
column-gap: var(--hop-space-inline-xs);
|
|
78
|
+
box-sizing: border-box;
|
|
79
|
+
position: relative;
|
|
80
|
+
padding: var(--hop-button-component-padding);
|
|
81
|
+
border-radius: var(--hop-button-component-border-radius);
|
|
82
|
+
outline: none;
|
|
83
|
+
outline-offset: 0.125rem;
|
|
84
|
+
transition:
|
|
85
|
+
color 0.2s cubic-bezier(0.22, 0.61, 0.36, 1),
|
|
86
|
+
background-color 0.2s cubic-bezier(0.22, 0.61, 0.36, 1),
|
|
87
|
+
border 0.2s cubic-bezier(0.22, 0.61, 0.36, 1);
|
|
88
|
+
inline-size: var(--inline-size);
|
|
89
|
+
block-size: var(--block-size);
|
|
90
|
+
background-color: var(--background-color);
|
|
91
|
+
color: var(--color);
|
|
92
|
+
border: var(--border);
|
|
93
|
+
align-items: center;
|
|
94
|
+
}
|
|
95
|
+
.hop-button[data-disabled] {
|
|
96
|
+
cursor: not-allowed;
|
|
97
|
+
}
|
|
98
|
+
.hop-button[data-focus-visible] {
|
|
99
|
+
outline: 0.125rem solid var(--hop-button-component-focus-ring-color);
|
|
100
|
+
}
|
|
101
|
+
.hop-button--fluid {
|
|
102
|
+
--inline-size: 100%;
|
|
103
|
+
}
|
|
104
|
+
.hop-button--sm {
|
|
105
|
+
--block-size: var(--hop-button-component-sm-height);
|
|
106
|
+
}
|
|
107
|
+
.hop-button--primary {
|
|
108
|
+
--background-color: var(--hop-button-component-primary-background-color);
|
|
109
|
+
--color: var(--hop-button-component-primary-color);
|
|
110
|
+
--border: var(--hop-button-component-primary-border);
|
|
111
|
+
}
|
|
112
|
+
.hop-button--primary[data-disabled]:not([data-loading]) {
|
|
113
|
+
--background-color: var(--hop-button-component-primary-background-color-disabled);
|
|
114
|
+
--color: var(--hop-button-component-primary-color-disabled);
|
|
115
|
+
--border: var(--hop-button-component-primary-border-disabled);
|
|
116
|
+
}
|
|
117
|
+
.hop-button--primary[data-hovered] {
|
|
118
|
+
--background-color: var(--hop-button-component-primary-background-color-hover);
|
|
119
|
+
--color: var(--hop-button-component-primary-color-hover);
|
|
120
|
+
--border: var(--hop-button-component-primary-border-hover);
|
|
121
|
+
}
|
|
122
|
+
.hop-button--primary[data-pressed] {
|
|
123
|
+
--background-color: var(--hop-button-component-primary-background-color-pressed);
|
|
124
|
+
--color: var(--hop-button-component-primary-color-pressed);
|
|
125
|
+
--border: var(--hop-button-component-primary-border-pressed);
|
|
126
|
+
}
|
|
127
|
+
.hop-button--secondary {
|
|
128
|
+
--background-color: var(--hop-button-component-secondary-background-color);
|
|
129
|
+
--color: var(--hop-button-component-secondary-color);
|
|
130
|
+
--border: var(--hop-button-component-secondary-border);
|
|
131
|
+
}
|
|
132
|
+
.hop-button--secondary[data-disabled]:not([data-loading]) {
|
|
133
|
+
--background-color: var(--hop-button-component-secondary-background-color-disabled);
|
|
134
|
+
--color: var(--hop-button-component-secondary-color-disabled);
|
|
135
|
+
--border: var(--hop-button-component-secondary-border-disabled);
|
|
136
|
+
}
|
|
137
|
+
.hop-button--secondary[data-hovered] {
|
|
138
|
+
--background-color: var(--hop-button-component-secondary-background-color-hover);
|
|
139
|
+
--color: var(--hop-button-component-secondary-color-hover);
|
|
140
|
+
--border: var(--hop-button-component-secondary-border-hover);
|
|
141
|
+
}
|
|
142
|
+
.hop-button--secondary[data-pressed] {
|
|
143
|
+
--background-color: var(--hop-button-component-secondary-background-color-pressed);
|
|
144
|
+
--color: var(--hop-button-component-secondary-color-pressed);
|
|
145
|
+
--border: var(--hop-button-component-secondary-border-pressed);
|
|
146
|
+
}
|
|
147
|
+
.hop-button--tertiary {
|
|
148
|
+
--background-color: var(--hop-button-component-tertiary-background-color);
|
|
149
|
+
--color: var(--hop-button-component-tertiary-color);
|
|
150
|
+
--border: var(--hop-button-component-tertiary-border);
|
|
151
|
+
}
|
|
152
|
+
.hop-button--tertiary[data-disabled]:not([data-loading]) {
|
|
153
|
+
--background-color: var(--hop-button-component-tertiary-background-color-disabled);
|
|
154
|
+
--color: var(--hop-button-component-tertiary-color-disabled);
|
|
155
|
+
--border: var(--hop-button-component-tertiary-border-disabled);
|
|
156
|
+
}
|
|
157
|
+
.hop-button--tertiary[data-hovered] {
|
|
158
|
+
--background-color: var(--hop-button-component-tertiary-background-color-hover);
|
|
159
|
+
--color: var(--hop-button-component-tertiary-color-hover);
|
|
160
|
+
--border: var(--hop-button-component-tertiary-border-hover);
|
|
161
|
+
}
|
|
162
|
+
.hop-button--tertiary[data-pressed] {
|
|
163
|
+
--background-color: var(--hop-button-component-tertiary-background-color-pressed);
|
|
164
|
+
--color: var(--hop-button-component-tertiary-color-pressed);
|
|
165
|
+
--border: var(--hop-button-component-tertiary-border-pressed);
|
|
166
|
+
}
|
|
167
|
+
.hop-button--upsell {
|
|
168
|
+
--background-color: var(--hop-button-component-upsell-background-color);
|
|
169
|
+
--color: var(--hop-button-component-upsell-color);
|
|
170
|
+
--border: var(--hop-button-component-upsell-border);
|
|
171
|
+
}
|
|
172
|
+
.hop-button--upsell[data-disabled]:not([data-loading]) {
|
|
173
|
+
--background-color: var(--hop-button-component-upsell-background-color-disabled);
|
|
174
|
+
--color: var(--hop-button-component-upsell-color-disabled);
|
|
175
|
+
--border: var(--hop-button-component-upsell-border-disabled);
|
|
176
|
+
}
|
|
177
|
+
.hop-button--upsell[data-hovered] {
|
|
178
|
+
--background-color: var(--hop-button-component-upsell-background-color-hover);
|
|
179
|
+
--color: var(--hop-button-component-upsell-color-hover);
|
|
180
|
+
--border: var(--hop-button-component-upsell-border-hover);
|
|
181
|
+
}
|
|
182
|
+
.hop-button--upsell[data-pressed] {
|
|
183
|
+
--background-color: var(--hop-button-component-upsell-background-color-pressed);
|
|
184
|
+
--color: var(--hop-button-component-upsell-color-pressed);
|
|
185
|
+
--border: var(--hop-button-component-upsell-border-pressed);
|
|
186
|
+
}
|
|
187
|
+
.hop-button--negative {
|
|
188
|
+
--background-color: var(--hop-button-component-negative-background-color);
|
|
189
|
+
--color: var(--hop-button-component-negative-color);
|
|
190
|
+
--border: var(--hop-button-component-negative-border);
|
|
191
|
+
}
|
|
192
|
+
.hop-button--negative[data-disabled]:not([data-loading]) {
|
|
193
|
+
--background-color: var(--hop-button-component-negative-background-color-disabled);
|
|
194
|
+
--color: var(--hop-button-component-negative-color-disabled);
|
|
195
|
+
--border: var(--hop-button-component-negative-border-disabled);
|
|
196
|
+
}
|
|
197
|
+
.hop-button--negative[data-hovered] {
|
|
198
|
+
--background-color: var(--hop-button-component-negative-background-color-hover);
|
|
199
|
+
--color: var(--hop-button-component-negative-color-hover);
|
|
200
|
+
--border: var(--hop-button-component-negative-border-hover);
|
|
201
|
+
}
|
|
202
|
+
.hop-button--negative[data-pressed] {
|
|
203
|
+
--background-color: var(--hop-button-component-negative-background-color-pressed);
|
|
204
|
+
--color: var(--hop-button-component-negative-color-pressed);
|
|
205
|
+
--border: var(--hop-button-component-negative-border-pressed);
|
|
206
|
+
}
|
|
207
|
+
.hop-button__Spinner {
|
|
208
|
+
position: absolute;
|
|
209
|
+
justify-self: center;
|
|
210
|
+
color: var(--color);
|
|
211
|
+
}
|
|
212
|
+
.hop-button__icon,
|
|
213
|
+
.hop-button__icon-list {
|
|
214
|
+
grid-area: start-icon;
|
|
215
|
+
justify-self: end;
|
|
216
|
+
}
|
|
217
|
+
.hop-button__text {
|
|
218
|
+
grid-area: content;
|
|
219
|
+
font-weight: var(--hop-font-weight-505);
|
|
220
|
+
overflow: visible;
|
|
221
|
+
text-wrap: nowrap;
|
|
222
|
+
user-select: none;
|
|
223
|
+
}
|
|
224
|
+
.hop-button__end-icon,
|
|
225
|
+
.hop-button__end-icon-list {
|
|
226
|
+
grid-area: end-icon;
|
|
227
|
+
}
|
|
228
|
+
.hop-button[data-loading] > *:not(.hop-button__Spinner) {
|
|
229
|
+
opacity: 0;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/* src/Text/src/Text.module.css */
|
|
233
|
+
.hop-text {
|
|
234
|
+
--hop-text-component-xs-font-size: var(--hop-body-xs-font-size);
|
|
235
|
+
--hop-text-component-xs-font-family: var(--hop-body-xs-font-family);
|
|
236
|
+
--hop-text-component-xs-font-weight: var(--hop-body-xs-font-weight);
|
|
237
|
+
--hop-text-component-xs-line-height: var(--hop-body-xs-line-height);
|
|
238
|
+
--hop-text-component-sm-font-size: var(--hop-body-sm-font-size);
|
|
239
|
+
--hop-text-component-sm-font-family: var(--hop-body-sm-font-family);
|
|
240
|
+
--hop-text-component-sm-font-weight: var(--hop-body-sm-font-weight);
|
|
241
|
+
--hop-text-component-sm-line-height: var(--hop-body-sm-line-height);
|
|
242
|
+
--hop-text-component-md-font-size: var(--hop-body-md-font-size);
|
|
243
|
+
--hop-text-component-md-font-family: var(--hop-body-md-font-family);
|
|
244
|
+
--hop-text-component-md-font-weight: var(--hop-body-md-font-weight);
|
|
245
|
+
--hop-text-component-md-line-height: var(--hop-body-md-line-height);
|
|
246
|
+
--hop-text-component-lg-font-size: var(--hop-body-lg-font-size);
|
|
247
|
+
--hop-text-component-lg-font-family: var(--hop-body-lg-font-family);
|
|
248
|
+
--hop-text-component-lg-font-weight: var(--hop-body-lg-font-weight);
|
|
249
|
+
--hop-text-component-lg-line-height: var(--hop-body-lg-line-height);
|
|
250
|
+
--hop-text-component-xl-font-size: var(--hop-body-xl-font-size);
|
|
251
|
+
--hop-text-component-xl-font-family: var(--hop-body-xl-font-family);
|
|
252
|
+
--hop-text-component-xl-font-weight: var(--hop-body-xl-font-weight);
|
|
253
|
+
--hop-text-component-xl-line-height: var(--hop-body-xl-line-height);
|
|
254
|
+
--hop-text-component-2xl-font-size: var(--hop-body-2xl-font-size);
|
|
255
|
+
--hop-text-component-2xl-font-family: var(--hop-body-2xl-font-family);
|
|
256
|
+
--hop-text-component-2xl-font-weight: var(--hop-body-2xl-font-weight);
|
|
257
|
+
--hop-text-component-2xl-line-height: var(--hop-body-2xl-line-height);
|
|
258
|
+
--hop-text-component-inherit-size-font-size: inherit;
|
|
259
|
+
--hop-text-component-inherit-size-font-family: inherit;
|
|
260
|
+
--hop-text-component-inherit-size-font-weight: inherit;
|
|
261
|
+
--hop-text-component-inherit-size-line-height: inherit;
|
|
262
|
+
}
|
|
263
|
+
:where(.hop-text) {
|
|
264
|
+
font-size: var(--font-size);
|
|
265
|
+
font-family: var(--font-family);
|
|
266
|
+
font-weight: var(--font-weight);
|
|
267
|
+
line-height: var(--line-height);
|
|
268
|
+
}
|
|
269
|
+
:where(.hop-text--xs) {
|
|
270
|
+
--font-size: var(--hop-text-component-xs-font-size);
|
|
271
|
+
--font-family: var(--hop-text-component-xs-font-family);
|
|
272
|
+
--font-weight: var(--hop-text-component-xs-font-weight);
|
|
273
|
+
--line-height: var(--hop-text-component-xs-line-height);
|
|
274
|
+
}
|
|
275
|
+
:where(.hop-text--sm) {
|
|
276
|
+
--font-size: var(--hop-text-component-sm-font-size);
|
|
277
|
+
--font-family: var(--hop-text-component-sm-font-family);
|
|
278
|
+
--font-weight: var(--hop-text-component-sm-font-weight);
|
|
279
|
+
--line-height: var(--hop-text-component-sm-line-height);
|
|
280
|
+
}
|
|
281
|
+
:where(.hop-text--md) {
|
|
282
|
+
--font-size: var(--hop-text-component-md-font-size);
|
|
283
|
+
--font-family: var(--hop-text-component-md-font-family);
|
|
284
|
+
--font-weight: var(--hop-text-component-md-font-weight);
|
|
285
|
+
--line-height: var(--hop-text-component-md-line-height);
|
|
286
|
+
}
|
|
287
|
+
:where(.hop-text--lg) {
|
|
288
|
+
--font-size: var(--hop-text-component-lg-font-size);
|
|
289
|
+
--font-family: var(--hop-text-component-lg-font-family);
|
|
290
|
+
--font-weight: var(--hop-text-component-lg-font-weight);
|
|
291
|
+
--line-height: var(--hop-text-component-lg-line-height);
|
|
292
|
+
}
|
|
293
|
+
:where(.hop-text--xl) {
|
|
294
|
+
--font-size: var(--hop-text-component-xl-font-size);
|
|
295
|
+
--font-family: var(--hop-text-component-xl-font-family);
|
|
296
|
+
--font-weight: var(--hop-text-component-xl-font-weight);
|
|
297
|
+
--line-height: var(--hop-text-component-xl-line-height);
|
|
298
|
+
}
|
|
299
|
+
:where(.hop-text--2xl) {
|
|
300
|
+
--font-size: var(--hop-text-component-2xl-font-size);
|
|
301
|
+
--font-family: var(--hop-text-component-2xl-font-family);
|
|
302
|
+
--font-weight: var(--hop-text-component-2xl-font-weight);
|
|
303
|
+
--line-height: var(--hop-text-component-2xl-line-height);
|
|
304
|
+
}
|
|
305
|
+
:where(.hop-text--inherit) {
|
|
306
|
+
--font-size: var(--hop-text-component-inherit-size-font-size);
|
|
307
|
+
--font-family: var(--hop-text-component-inherit-size-font-family);
|
|
308
|
+
--font-weight: var(--hop-text-component-inherit-size-font-weight);
|
|
309
|
+
--line-height: var(--hop-text-component-inherit-size-line-height);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/* src/IconList/src/IconList.module.css */
|
|
313
|
+
.hop-iconList {
|
|
314
|
+
--hop-icon-list-component-gap: var(--hop-space-inline-xs);
|
|
315
|
+
box-sizing: border-box;
|
|
316
|
+
display: flex;
|
|
317
|
+
flex-flow: wrap;
|
|
318
|
+
gap: var(--hop-icon-list-component-gap);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/* src/Spinner/src/Spinner.module.css */
|
|
322
|
+
@keyframes spin {
|
|
323
|
+
0% {
|
|
324
|
+
transform: rotate(0deg);
|
|
325
|
+
}
|
|
326
|
+
100% {
|
|
327
|
+
transform: rotate(360deg);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
.hop-spinner {
|
|
331
|
+
--hop-spinner-component-border-radius: var(--hop-shape-circle);
|
|
332
|
+
--hop-spinner-component-sm-wheel-size: 1rem;
|
|
333
|
+
--hop-spinner-component-md-wheel-size: 1.25rem;
|
|
334
|
+
--hop-spinner-component-lg-wheel-size: 1.5rem;
|
|
335
|
+
--hop-spinner-component-track-width: 0.125rem;
|
|
336
|
+
--hop-spinner-component-track-opacity: 0.2;
|
|
337
|
+
--hop-spinner-component-track-border: var(--hop-spinner-component-track-width) solid currentcolor;
|
|
338
|
+
--hop-spinner-component-fill-animation: spin .8s infinite linear;
|
|
339
|
+
--hop-spinner-component-fill-animation-reduced-motion-duration: 2s;
|
|
340
|
+
--hop-spinner-component-fill-border: var(--hop-spinner-component-track-width) solid transparent;
|
|
341
|
+
--hop-spinner-component-fill-border-inline-start: var(--hop-spinner-component-track-width) solid currentcolor;
|
|
342
|
+
--hop-spinner-component-label-margin-inline-start: var(--hop-space-inline-sm);
|
|
343
|
+
box-sizing: border-box;
|
|
344
|
+
display: grid;
|
|
345
|
+
grid-template-areas: "spinner label";
|
|
346
|
+
grid-template-columns: min-content auto;
|
|
347
|
+
align-items: center;
|
|
348
|
+
}
|
|
349
|
+
.hop-spinner--sm {
|
|
350
|
+
--width: var(--hop-spinner-component-sm-wheel-size);
|
|
351
|
+
--height: var(--hop-spinner-component-sm-wheel-size);
|
|
352
|
+
}
|
|
353
|
+
.hop-spinner--md {
|
|
354
|
+
--width: var(--hop-spinner-component-md-wheel-size);
|
|
355
|
+
--height: var(--hop-spinner-component-md-wheel-size);
|
|
356
|
+
}
|
|
357
|
+
.hop-spinner--lg {
|
|
358
|
+
--width: var(--hop-spinner-component-lg-wheel-size);
|
|
359
|
+
--height: var(--hop-spinner-component-lg-wheel-size);
|
|
360
|
+
}
|
|
361
|
+
.hop-spinner__track {
|
|
362
|
+
box-sizing: border-box;
|
|
363
|
+
inline-size: var(--width, --hop-spinner-component-md-wheel-size);
|
|
364
|
+
block-size: var(--height, --hop-spinner-component-md-wheel-size);
|
|
365
|
+
border-radius: var(--hop-spinner-component-border-radius);
|
|
366
|
+
border: var(--hop-spinner-component-track-border);
|
|
367
|
+
opacity: var(--hop-spinner-component-track-opacity);
|
|
368
|
+
grid-area: spinner;
|
|
369
|
+
}
|
|
370
|
+
.hop-spinner__fill {
|
|
371
|
+
box-sizing: border-box;
|
|
372
|
+
inline-size: var(--width, --hop-spinner-component-md-wheel-size);
|
|
373
|
+
block-size: var(--height, --hop-spinner-component-md-wheel-size);
|
|
374
|
+
border-radius: var(--hop-spinner-component-border-radius);
|
|
375
|
+
border: var( --hop-spinner-component-fill-border);
|
|
376
|
+
border-inline-start: var(--hop-spinner-component-fill-border-inline-start);
|
|
377
|
+
grid-area: spinner;
|
|
378
|
+
animation: var(--hop-spinner-component-fill-animation);
|
|
379
|
+
}
|
|
380
|
+
@media (prefers-reduced-motion: reduce) {
|
|
381
|
+
.hop-spinner__fill {
|
|
382
|
+
animation-duration: var(--hop-spinner-component-fill-animation-reduced-motion-duration);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
.hop-spinner__label {
|
|
386
|
+
grid-area: label;
|
|
387
|
+
margin-inline-start: var(--hop-spinner-component-label-margin-inline-start);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
/* src/Label/src/Label.module.css */
|
|
391
|
+
.hop-label {
|
|
392
|
+
--hop-label-component-xs-font-size: var(--hop-body-xs-font-size);
|
|
393
|
+
--hop-label-component-xs-font-family: var(--hop-body-xs-font-family);
|
|
394
|
+
--hop-label-component-xs-font-weight: var(--hop-body-xs-font-weight);
|
|
395
|
+
--hop-label-component-xs-line-height: var(--hop-body-xs-line-height);
|
|
396
|
+
--hop-label-component-sm-font-size: var(--hop-body-sm-font-size);
|
|
397
|
+
--hop-label-component-sm-font-family: var(--hop-body-sm-font-family);
|
|
398
|
+
--hop-label-component-sm-font-weight: var(--hop-body-sm-font-weight);
|
|
399
|
+
--hop-label-component-sm-line-height: var(--hop-body-sm-line-height);
|
|
400
|
+
--hop-label-component-md-font-size: var(--hop-body-md-font-size);
|
|
401
|
+
--hop-label-component-md-font-family: var(--hop-body-md-font-family);
|
|
402
|
+
--hop-label-component-md-font-weight: var(--hop-body-md-font-weight);
|
|
403
|
+
--hop-label-component-md-line-height: var(--hop-body-md-line-height);
|
|
404
|
+
--hop-label-component-lg-font-size: var(--hop-body-lg-font-size);
|
|
405
|
+
--hop-label-component-lg-font-family: var(--hop-body-lg-font-family);
|
|
406
|
+
--hop-label-component-lg-font-weight: var(--hop-body-lg-font-weight);
|
|
407
|
+
--hop-label-component-lg-line-height: var(--hop-body-lg-line-height);
|
|
408
|
+
--hop-label-component-xl-font-size: var(--hop-body-xl-font-size);
|
|
409
|
+
--hop-label-component-xl-font-family: var(--hop-body-xl-font-family);
|
|
410
|
+
--hop-label-component-xl-font-weight: var(--hop-body-xl-font-weight);
|
|
411
|
+
--hop-label-component-xl-line-height: var(--hop-body-xl-line-height);
|
|
412
|
+
--hop-label-component-2xl-font-size: var(--hop-body-2xl-font-size);
|
|
413
|
+
--hop-label-component-2xl-font-family: var(--hop-body-2xl-font-family);
|
|
414
|
+
--hop-label-component-2xl-font-weight: var(--hop-body-2xl-font-weight);
|
|
415
|
+
--hop-label-component-2xl-line-height: var(--hop-body-2xl-line-height);
|
|
416
|
+
--hop-label-component-inherit-size-font-size: inherit;
|
|
417
|
+
--hop-label-component-inherit-size-font-family: inherit;
|
|
418
|
+
--hop-label-component-inherit-size-font-weight: inherit;
|
|
419
|
+
--hop-label-component-inherit-size-line-height: inherit;
|
|
420
|
+
}
|
|
421
|
+
:where(.hop-label) {
|
|
422
|
+
font-size: var(--font-size, --hop-label-component-md-font-size);
|
|
423
|
+
font-family: var(--font-family, --hop-label-component-md-font-family);
|
|
424
|
+
font-weight: var(--font-weight, --hop-label-component-md-font-weight);
|
|
425
|
+
line-height: var(--line-height, --hop-label-component-md-line-height);
|
|
426
|
+
}
|
|
427
|
+
:where(.hop-label--xs) {
|
|
428
|
+
--font-size: var(--hop-label-component-xs-font-size);
|
|
429
|
+
--font-family: var(--hop-label-component-xs-font-family);
|
|
430
|
+
--font-weight: var(--hop-label-component-xs-font-weight);
|
|
431
|
+
--line-height: var(--hop-label-component-xs-line-height);
|
|
432
|
+
}
|
|
433
|
+
:where(.hop-label--sm) {
|
|
434
|
+
--font-size: var(--hop-label-component-sm-font-size);
|
|
435
|
+
--font-family: var(--hop-label-component-sm-font-family);
|
|
436
|
+
--font-weight: var(--hop-label-component-sm-font-weight);
|
|
437
|
+
--line-height: var(--hop-label-component-sm-line-height);
|
|
438
|
+
}
|
|
439
|
+
:where(.hop-label--md) {
|
|
440
|
+
--font-size: var(--hop-label-component-md-font-size);
|
|
441
|
+
--font-family: var(--hop-label-component-md-font-family);
|
|
442
|
+
--font-weight: var(--hop-label-component-md-font-weight);
|
|
443
|
+
--line-height: var(--hop-label-component-md-line-height);
|
|
444
|
+
}
|
|
445
|
+
:where(.hop-label--lg) {
|
|
446
|
+
--font-size: var(--hop-label-component-lg-font-size);
|
|
447
|
+
--font-family: var(--hop-label-component-lg-font-family);
|
|
448
|
+
--font-weight: var(--hop-label-component-lg-font-weight);
|
|
449
|
+
--line-height: var(--hop-label-component-lg-line-height);
|
|
450
|
+
}
|
|
451
|
+
:where(.hop-label--xl) {
|
|
452
|
+
--font-size: var(--hop-label-component-xl-font-size);
|
|
453
|
+
--font-family: var(--hop-label-component-xl-font-family);
|
|
454
|
+
--font-weight: var(--hop-label-component-xl-font-weight);
|
|
455
|
+
--line-height: var(--hop-label-component-xl-line-height);
|
|
456
|
+
}
|
|
457
|
+
:where(.hop-label--2xl) {
|
|
458
|
+
--font-size: var(--hop-label-component-2xl-font-size);
|
|
459
|
+
--font-family: var(--hop-label-component-2xl-font-family);
|
|
460
|
+
--font-weight: var(--hop-label-component-2xl-font-weight);
|
|
461
|
+
--line-height: var(--hop-label-component-2xl-line-height);
|
|
462
|
+
}
|
|
463
|
+
:where(.hop-label--inherit) {
|
|
464
|
+
--font-size: var(--hop-label-component-inherit-size-font-size);
|
|
465
|
+
--font-family: var(--hop-label-component-inherit-size-font-family);
|
|
466
|
+
--font-weight: var(--hop-label-component-inherit-size-font-weight);
|
|
467
|
+
--line-height: var(--hop-label-component-inherit-size-line-height);
|
|
468
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { _Button as Button, GlobalButtonCssSelector } from '../../chunk-WROQHGG5.js';
|
|
2
|
+
import '../../chunk-7QUHQYCR.js';
|
|
3
|
+
import '../../chunk-GXUPEV64.js';
|
|
4
|
+
import '../../chunk-QIOYM2XJ.js';
|
|
5
|
+
import '../../chunk-SEU4CGZD.js';
|
|
6
|
+
import '../../chunk-4ZYV2XLW.js';
|
|
7
|
+
import '../../chunk-WRWNRVTG.js';
|
|
8
|
+
import '../../chunk-OE5BLFZI.js';
|
|
9
|
+
export { ButtonContext } from '../../chunk-WMTWFKKP.js';
|
|
10
|
+
import '../../chunk-M36KANKC.js';
|
|
11
|
+
import '../../chunk-DHVVYSLB.js';
|
|
12
|
+
import '../../chunk-XCKF6EU7.js';
|
|
13
|
+
import '../../chunk-6BEVZRUL.js';
|
|
14
|
+
import '../../chunk-HVKOIMMW.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import clsx from 'clsx';
|
|
2
|
+
|
|
3
|
+
// src/utils/src/css-module.ts
|
|
4
|
+
function cssModule(cssModules, componentName, ...modifiers) {
|
|
5
|
+
const classes = clsx(modifiers).split(" ").filter((x) => x && x !== "");
|
|
6
|
+
return classes.reduce((acc, className) => {
|
|
7
|
+
const mergedClassName = `${componentName}--${className}`;
|
|
8
|
+
if (cssModules[mergedClassName]) {
|
|
9
|
+
acc.push(cssModules[mergedClassName]);
|
|
10
|
+
}
|
|
11
|
+
return acc;
|
|
12
|
+
}, [cssModules[componentName]]).join(" ");
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { cssModule };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Children, isValidElement, Fragment } from 'react';
|
|
2
|
+
|
|
3
|
+
// src/utils/src/is-text-only-children.ts
|
|
4
|
+
function isTextOnlyChildren(children) {
|
|
5
|
+
const resolvedChildren = resolveChildren(children);
|
|
6
|
+
return typeof resolvedChildren === "string" || Children.toArray(resolvedChildren).every((c) => !isValidElement(c));
|
|
7
|
+
}
|
|
8
|
+
function resolveChildren(children) {
|
|
9
|
+
if (isValidElement(children) && children.type === Fragment) {
|
|
10
|
+
return resolveChildren(children.props.children);
|
|
11
|
+
}
|
|
12
|
+
return children;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { isTextOnlyChildren };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useLocalizedStringFormatter } from 'react-aria';
|
|
2
|
+
|
|
3
|
+
// src/intl/src/useLocalizedString.tsx
|
|
4
|
+
|
|
5
|
+
// src/intl/intl/en-US.json
|
|
6
|
+
var en_US_default = {
|
|
7
|
+
"button.pending": "pending"
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
// src/intl/intl/fr-CA.json
|
|
11
|
+
var fr_CA_default = {
|
|
12
|
+
"button.pending": "en attente"
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
// src/intl/src/useLocalizedString.tsx
|
|
16
|
+
var Resources = {
|
|
17
|
+
"en-US": en_US_default,
|
|
18
|
+
"fr-CA": fr_CA_default
|
|
19
|
+
};
|
|
20
|
+
function useLocalizedString() {
|
|
21
|
+
return useLocalizedStringFormatter(Resources, "@hopper-ui/components");
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { useLocalizedString };
|