@hopper-ui/components 1.1.0 → 1.2.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/README.md +1 -1
- package/dist/Avatar/src/AnonymousAvatar.css +10 -10
- package/dist/Avatar/src/AnonymousAvatar.js +2 -2
- package/dist/Avatar/src/Avatar.css +37 -37
- package/dist/Avatar/src/Avatar.js +3 -3
- package/dist/Avatar/src/AvatarContext.d.ts +1 -1
- package/dist/Avatar/src/DeletedAvatar.css +10 -10
- package/dist/Avatar/src/DeletedAvatar.js +2 -2
- package/dist/Avatar/src/RichIconAvatarImage.css +10 -10
- package/dist/Avatar/src/RichIconAvatarImage.js +1 -1
- package/dist/Avatar/src/index.css +37 -37
- package/dist/Avatar/src/index.js +5 -5
- package/dist/Badge/src/Badge.css +10 -10
- package/dist/Badge/src/Badge.js +2 -2
- package/dist/Badge/src/index.css +10 -10
- package/dist/Badge/src/index.js +2 -2
- package/dist/Divider/src/Divider.css +2 -2
- package/dist/Divider/src/Divider.js +1 -1
- package/dist/Divider/src/index.css +2 -2
- package/dist/Divider/src/index.js +1 -1
- package/dist/ErrorMessage/src/ErrorMessage.css +11 -11
- package/dist/ErrorMessage/src/ErrorMessage.js +2 -2
- package/dist/ErrorMessage/src/index.css +11 -11
- package/dist/ErrorMessage/src/index.js +2 -2
- package/dist/Form/src/Form.css +4111 -0
- package/dist/Form/src/Form.d.ts +28 -0
- package/dist/Form/src/Form.js +114 -0
- package/dist/Form/src/FormContext.d.ts +8 -0
- package/dist/Form/src/FormContext.js +2 -0
- package/dist/Form/src/index.css +4111 -0
- package/dist/Form/src/index.d.ts +5 -0
- package/dist/Form/src/index.js +114 -0
- package/dist/HelperMessage/src/HelperMessage.css +11 -11
- package/dist/HelperMessage/src/HelperMessage.js +2 -2
- package/dist/HelperMessage/src/index.css +11 -11
- package/dist/HelperMessage/src/index.js +2 -2
- package/dist/IconList/src/IconList.css +1 -1
- package/dist/IconList/src/IconList.js +1 -1
- package/dist/IconList/src/index.css +1 -1
- package/dist/IconList/src/index.js +1 -1
- package/dist/Link/src/Link.css +31 -31
- package/dist/Link/src/Link.js +3 -3
- package/dist/Link/src/index.css +31 -31
- package/dist/Link/src/index.js +3 -3
- package/dist/ListBox/src/ListBox.css +369 -169
- package/dist/ListBox/src/ListBox.js +12 -11
- package/dist/ListBox/src/ListBoxItem.css +425 -225
- package/dist/ListBox/src/ListBoxItem.js +10 -9
- package/dist/ListBox/src/ListBoxItemSkeleton.css +7 -7
- package/dist/ListBox/src/ListBoxItemSkeleton.js +1 -1
- package/dist/ListBox/src/index.css +369 -169
- package/dist/ListBox/src/index.js +12 -11
- package/dist/Spinner/src/Spinner.css +19 -19
- package/dist/Spinner/src/Spinner.js +2 -2
- package/dist/Spinner/src/index.css +19 -19
- package/dist/Spinner/src/index.js +2 -2
- package/dist/buttons/src/Button.css +94 -94
- package/dist/buttons/src/Button.js +6 -6
- package/dist/buttons/src/ButtonGroup.css +11 -11
- package/dist/buttons/src/ButtonGroup.js +1 -1
- package/dist/buttons/src/ClearButton.css +375 -28
- package/dist/buttons/src/ClearButton.js +3 -3
- package/dist/buttons/src/EmbeddedButton.css +375 -28
- package/dist/buttons/src/EmbeddedButton.d.ts +9 -0
- package/dist/buttons/src/EmbeddedButton.js +1 -1
- package/dist/buttons/src/index.css +480 -133
- package/dist/buttons/src/index.js +9 -9
- package/dist/checkbox/src/Checkbox.css +31 -31
- package/dist/checkbox/src/Checkbox.js +3 -3
- package/dist/checkbox/src/CheckboxField.css +15 -15
- package/dist/checkbox/src/CheckboxField.js +1 -1
- package/dist/checkbox/src/CheckboxGroup.css +62 -59
- package/dist/checkbox/src/CheckboxGroup.js +1 -1
- package/dist/checkbox/src/index.css +62 -59
- package/dist/checkbox/src/index.js +6 -6
- package/dist/{chunk-SR3GAXY5.js → chunk-2XO5CZBO.js} +2 -2
- package/dist/{chunk-VFYGHX3N.js → chunk-354H4FNA.js} +1 -1
- package/dist/{chunk-TGXZJJJA.js → chunk-5IB23E3O.js} +6 -2
- package/dist/{chunk-UMD6RDUS.js → chunk-BKCMCC7V.js} +1 -1
- package/dist/{chunk-YE7RARJB.js → chunk-CEUQHDEQ.js} +1 -1
- package/dist/{chunk-WAUGFWZA.js → chunk-CKKLDA5J.js} +2 -2
- package/dist/{chunk-PQV24MM4.js → chunk-COIGQP33.js} +3 -3
- package/dist/{chunk-VVY3ONWS.js → chunk-EJUIYBAC.js} +1 -1
- package/dist/chunk-EURJK4ZT.js +7 -0
- package/dist/{chunk-YEYNRBMQ.js → chunk-F4H76S4H.js} +6 -2
- package/dist/{chunk-A7HLXFSP.js → chunk-FA4IXLWZ.js} +9 -7
- package/dist/chunk-FOD7XUSJ.js +150 -0
- package/dist/{chunk-ZNGSZW7M.js → chunk-FOKTHCFK.js} +3 -3
- package/dist/{chunk-XGI4LDIF.js → chunk-HCRWIU7V.js} +4 -4
- package/dist/{chunk-BGRKDTCG.js → chunk-IUOLKHYQ.js} +1 -1
- package/dist/{chunk-FQO2QRSC.js → chunk-IXWYHDGU.js} +1 -1
- package/dist/{chunk-TMWNNF4J.js → chunk-J44DIB5J.js} +3 -3
- package/dist/{chunk-TVV4RMFR.js → chunk-JJ4EFTES.js} +1 -1
- package/dist/{chunk-P7UUQGGF.js → chunk-L5KI4ZCL.js} +2 -2
- package/dist/{chunk-6PH4IIEW.js → chunk-M3K4IYX6.js} +1 -1
- package/dist/{chunk-TKB5Q2WX.js → chunk-MJHMFANK.js} +1 -1
- package/dist/{chunk-BLQ72S4U.js → chunk-PFABSIDM.js} +1 -1
- package/dist/{chunk-GXFFLWNF.js → chunk-PQXVL3YJ.js} +1 -1
- package/dist/{chunk-YRUBXLBX.js → chunk-Q63YLWI6.js} +6 -3
- package/dist/{chunk-BQZQTNI6.js → chunk-RQKU3XDG.js} +1 -1
- package/dist/chunk-RWAVMW7T.js +70 -0
- package/dist/{chunk-6K6W32Q7.js → chunk-S5CK32KM.js} +6 -4
- package/dist/{chunk-I6OII2RA.js → chunk-SZSQZ4C7.js} +3 -3
- package/dist/{chunk-Q52NUBN7.js → chunk-T6MAOVLH.js} +2 -2
- package/dist/{chunk-BXPZ6HPC.js → chunk-TCOZUCPD.js} +142 -159
- package/dist/{chunk-GCJT5PQ4.js → chunk-TG623HPA.js} +7 -5
- package/dist/{chunk-6CDXS774.js → chunk-U56LEEEA.js} +6 -6
- package/dist/{chunk-AT7ZY6GA.js → chunk-UT4CSUUM.js} +1 -1
- package/dist/{chunk-CXCOSGTO.js → chunk-V5Q245NH.js} +4 -2
- package/dist/chunk-VISBUD2K.js +172 -0
- package/dist/{chunk-KA6KVIVV.js → chunk-VYKPDMP3.js} +3 -3
- package/dist/{chunk-XHZ4R2MB.js → chunk-W2BQZEW6.js} +4 -4
- package/dist/{chunk-RD6VCI72.js → chunk-W474WFOP.js} +20 -8
- package/dist/{chunk-QY6U3R3W.js → chunk-X253QCYD.js} +3 -2
- package/dist/{chunk-6MSRPPI6.js → chunk-XT2MZWEV.js} +1 -1
- package/dist/{chunk-ICDMJUNE.js → chunk-XUJNQNB3.js} +1 -1
- package/dist/i18n/src/index.js +1 -1
- package/dist/i18n/src/useLocalizedString.js +1 -1
- package/dist/index.css +1521 -694
- package/dist/index.d.ts +5 -3
- package/dist/index.js +46 -44
- package/dist/inputs/src/InputGroup.css +14 -14
- package/dist/inputs/src/InputGroup.d.ts +2 -1
- package/dist/inputs/src/InputGroup.js +1 -1
- package/dist/inputs/src/NumberField.css +65 -62
- package/dist/inputs/src/NumberField.d.ts +1 -0
- package/dist/inputs/src/NumberField.js +18 -173
- package/dist/inputs/src/PasswordField.css +524 -174
- package/dist/inputs/src/PasswordField.d.ts +1 -0
- package/dist/inputs/src/PasswordField.js +9 -9
- package/dist/inputs/src/SearchField.css +530 -180
- package/dist/inputs/src/SearchField.d.ts +1 -0
- package/dist/inputs/src/SearchField.js +10 -10
- package/dist/inputs/src/TextArea.css +59 -56
- package/dist/inputs/src/TextArea.js +8 -8
- package/dist/inputs/src/TextField.css +525 -175
- package/dist/inputs/src/TextField.d.ts +2 -0
- package/dist/inputs/src/TextField.js +11 -11
- package/dist/inputs/src/index.css +694 -205
- package/dist/inputs/src/index.d.ts +2 -0
- package/dist/inputs/src/index.js +17 -14
- package/dist/overlays/Popover/src/Popover.css +1521 -694
- package/dist/overlays/Popover/src/Popover.js +46 -44
- package/dist/overlays/Popover/src/index.css +1521 -694
- package/dist/overlays/Popover/src/index.js +46 -44
- package/dist/radio/src/Radio.css +31 -31
- package/dist/radio/src/Radio.js +3 -3
- package/dist/radio/src/RadioField.css +15 -15
- package/dist/radio/src/RadioField.js +1 -1
- package/dist/radio/src/RadioGroup.css +62 -59
- package/dist/radio/src/RadioGroup.js +1 -1
- package/dist/radio/src/index.css +62 -59
- package/dist/radio/src/index.js +6 -6
- package/dist/switch/src/Switch.css +25 -25
- package/dist/switch/src/Switch.js +3 -3
- package/dist/switch/src/SwitchField.css +15 -15
- package/dist/switch/src/SwitchField.js +1 -1
- package/dist/switch/src/index.css +31 -31
- package/dist/switch/src/index.js +4 -4
- package/dist/tag/src/Tag.css +1041 -2332
- package/dist/tag/src/Tag.d.ts +6 -1
- package/dist/tag/src/Tag.js +7 -99
- package/dist/tag/src/TagGroup.css +24 -21
- package/dist/tag/src/TagGroup.d.ts +7 -2
- package/dist/tag/src/TagGroup.js +1 -1
- package/dist/tag/src/index.css +1104 -2296
- package/dist/tag/src/index.js +9 -94
- package/dist/typography/Heading/src/Heading.css +9 -9
- package/dist/typography/Heading/src/Heading.js +1 -1
- package/dist/typography/Heading/src/index.css +9 -9
- package/dist/typography/Heading/src/index.js +1 -1
- package/dist/typography/Label/src/Label.css +5 -2
- package/dist/typography/Label/src/Label.d.ts +8 -0
- package/dist/typography/Label/src/Label.js +2 -1
- package/dist/typography/Label/src/index.css +5 -2
- package/dist/typography/Label/src/index.js +2 -1
- package/dist/typography/OverlineText/src/OverlineText.css +6 -6
- package/dist/typography/OverlineText/src/OverlineText.js +1 -1
- package/dist/typography/OverlineText/src/index.css +6 -6
- package/dist/typography/OverlineText/src/index.js +1 -1
- package/dist/typography/Text/src/Text.css +9 -9
- package/dist/typography/Text/src/Text.js +1 -1
- package/dist/typography/Text/src/index.css +9 -9
- package/dist/typography/Text/src/index.js +1 -1
- package/dist/utils/src/index.js +1 -1
- package/package.json +3 -3
- package/dist/Chip/src/Chip.css +0 -261
- package/dist/Chip/src/Chip.d.ts +0 -27
- package/dist/Chip/src/Chip.js +0 -10
- package/dist/Chip/src/ChipContext.d.ts +0 -10
- package/dist/Chip/src/ChipContext.js +0 -2
- package/dist/Chip/src/index.css +0 -261
- package/dist/Chip/src/index.d.ts +0 -7
- package/dist/Chip/src/index.js +0 -10
- package/dist/chunk-632B5YBQ.js +0 -7
- package/dist/chunk-7VS566A2.js +0 -43
- package/dist/chunk-OETAIO6N.js +0 -105
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* css-module:/home/runner/work/wl-hopper/wl-hopper/packages/components/src/typography/Text/src/Text.module.css/#css-module-data */
|
|
2
|
-
.Text-module__hop-
|
|
2
|
+
.Text-module__hop-Text___7s-NC {
|
|
3
3
|
--hop-Text-xs-font-size: var(--hop-body-xs-font-size);
|
|
4
4
|
--hop-Text-xs-font-family: var(--hop-body-xs-font-family);
|
|
5
5
|
--hop-Text-xs-font-weight: var(--hop-body-xs-font-weight);
|
|
@@ -29,49 +29,49 @@
|
|
|
29
29
|
--hop-Text-inherit-size-font-weight: inherit;
|
|
30
30
|
--hop-Text-inherit-size-line-height: inherit;
|
|
31
31
|
}
|
|
32
|
-
:where(.Text-module__hop-
|
|
32
|
+
:where(.Text-module__hop-Text___7s-NC) {
|
|
33
33
|
font-family: var(--font-family);
|
|
34
34
|
font-size: var(--font-size);
|
|
35
35
|
font-weight: var(--font-weight);
|
|
36
36
|
line-height: var(--line-height);
|
|
37
37
|
}
|
|
38
|
-
:where(.Text-module__hop-Text--
|
|
38
|
+
:where(.Text-module__hop-Text--xs___uRZNm) {
|
|
39
39
|
--font-size: var(--hop-Text-xs-font-size);
|
|
40
40
|
--font-family: var(--hop-Text-xs-font-family);
|
|
41
41
|
--font-weight: var(--hop-Text-xs-font-weight);
|
|
42
42
|
--line-height: var(--hop-Text-xs-line-height);
|
|
43
43
|
}
|
|
44
|
-
:where(.Text-module__hop-Text--
|
|
44
|
+
:where(.Text-module__hop-Text--sm___LfDaA) {
|
|
45
45
|
--font-size: var(--hop-Text-sm-font-size);
|
|
46
46
|
--font-family: var(--hop-Text-sm-font-family);
|
|
47
47
|
--font-weight: var(--hop-Text-sm-font-weight);
|
|
48
48
|
--line-height: var(--hop-Text-sm-line-height);
|
|
49
49
|
}
|
|
50
|
-
:where(.Text-module__hop-Text--
|
|
50
|
+
:where(.Text-module__hop-Text--md___aGVbv) {
|
|
51
51
|
--font-size: var(--hop-Text-md-font-size);
|
|
52
52
|
--font-family: var(--hop-Text-md-font-family);
|
|
53
53
|
--font-weight: var(--hop-Text-md-font-weight);
|
|
54
54
|
--line-height: var(--hop-Text-md-line-height);
|
|
55
55
|
}
|
|
56
|
-
:where(.Text-module__hop-Text--
|
|
56
|
+
:where(.Text-module__hop-Text--lg___TgsRg) {
|
|
57
57
|
--font-size: var(--hop-Text-lg-font-size);
|
|
58
58
|
--font-family: var(--hop-Text-lg-font-family);
|
|
59
59
|
--font-weight: var(--hop-Text-lg-font-weight);
|
|
60
60
|
--line-height: var(--hop-Text-lg-line-height);
|
|
61
61
|
}
|
|
62
|
-
:where(.Text-module__hop-Text--
|
|
62
|
+
:where(.Text-module__hop-Text--xl___gAcxP) {
|
|
63
63
|
--font-size: var(--hop-Text-xl-font-size);
|
|
64
64
|
--font-family: var(--hop-Text-xl-font-family);
|
|
65
65
|
--font-weight: var(--hop-Text-xl-font-weight);
|
|
66
66
|
--line-height: var(--hop-Text-xl-line-height);
|
|
67
67
|
}
|
|
68
|
-
:where(.Text-module__hop-Text--
|
|
68
|
+
:where(.Text-module__hop-Text--2xl___n-9B9) {
|
|
69
69
|
--font-size: var(--hop-Text-2xl-font-size);
|
|
70
70
|
--font-family: var(--hop-Text-2xl-font-family);
|
|
71
71
|
--font-weight: var(--hop-Text-2xl-font-weight);
|
|
72
72
|
--line-height: var(--hop-Text-2xl-line-height);
|
|
73
73
|
}
|
|
74
|
-
:where(.Text-module__hop-Text--
|
|
74
|
+
:where(.Text-module__hop-Text--inherit___SEa0P) {
|
|
75
75
|
--font-size: var(--hop-Text-inherit-size-font-size);
|
|
76
76
|
--font-family: var(--hop-Text-inherit-size-font-family);
|
|
77
77
|
--font-weight: var(--hop-Text-inherit-size-font-weight);
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
/* css-module:/home/runner/work/wl-hopper/wl-hopper/packages/components/src/ErrorMessage/src/ErrorMessage.module.css/#css-module-data */
|
|
82
|
-
.ErrorMessage-module__hop-
|
|
82
|
+
.ErrorMessage-module__hop-ErrorMessage___6qmlS {
|
|
83
83
|
--hop-ErrorMessage-color: var(--hop-danger-text-weak);
|
|
84
84
|
--hop-ErrorMessage-font-family: var(--hop-body-xs-font-family);
|
|
85
85
|
--hop-ErrorMessage-font-size: var(--hop-body-xs-font-size);
|
|
@@ -96,13 +96,13 @@
|
|
|
96
96
|
line-height: var(--hop-ErrorMessage-line-height);
|
|
97
97
|
color: var(--hop-ErrorMessage-color);
|
|
98
98
|
}
|
|
99
|
-
.ErrorMessage-module__hop-
|
|
99
|
+
.ErrorMessage-module__hop-ErrorMessage__icon___m4Mae {
|
|
100
100
|
flex: 0 0 auto;
|
|
101
101
|
align-self: flex-start;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
/* css-module:/home/runner/work/wl-hopper/wl-hopper/packages/components/src/HelperMessage/src/HelperMessage.module.css/#css-module-data */
|
|
105
|
-
.HelperMessage-module__hop-
|
|
105
|
+
.HelperMessage-module__hop-HelperMessage___KQaJ4 {
|
|
106
106
|
--hop-HelperMessage-color: var(--hop-neutral-text-weak);
|
|
107
107
|
--hop-HelperMessage-column-gap: var(--hop-space-inline-xs);
|
|
108
108
|
display: flex;
|
|
@@ -111,13 +111,13 @@
|
|
|
111
111
|
box-sizing: border-box;
|
|
112
112
|
color: var(--hop-HelperMessage-color);
|
|
113
113
|
}
|
|
114
|
-
.HelperMessage-module__hop-
|
|
114
|
+
.HelperMessage-module__hop-HelperMessage__icon___1a1jj {
|
|
115
115
|
flex: 0 0 auto;
|
|
116
116
|
align-self: flex-start;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
/* css-module:/home/runner/work/wl-hopper/wl-hopper/packages/components/src/typography/Heading/src/Heading.module.css/#css-module-data */
|
|
120
|
-
.Heading-module__hop-
|
|
120
|
+
.Heading-module__hop-Heading___FVhfN {
|
|
121
121
|
--hop-Heading-xs-font-size: var(--hop-heading-xs-font-size);
|
|
122
122
|
--hop-Heading-xs-font-family: var(--hop-heading-xs-font-family);
|
|
123
123
|
--hop-Heading-xs-font-weight: var(--hop-heading-xs-font-weight);
|
|
@@ -151,50 +151,50 @@
|
|
|
151
151
|
--hop-Heading-inherit-size-font-weight: inherit;
|
|
152
152
|
--hop-Heading-inherit-size-line-height: inherit;
|
|
153
153
|
}
|
|
154
|
-
:where(.Heading-module__hop-
|
|
154
|
+
:where(.Heading-module__hop-Heading___FVhfN) {
|
|
155
155
|
margin: 0;
|
|
156
156
|
font-family: var(--font-family);
|
|
157
157
|
font-size: var(--font-size);
|
|
158
158
|
font-weight: var(--font-weight);
|
|
159
159
|
line-height: var(--line-height);
|
|
160
160
|
}
|
|
161
|
-
:where(.Heading-module__hop-Heading--
|
|
161
|
+
:where(.Heading-module__hop-Heading--xs___t30s-) {
|
|
162
162
|
--font-size: var(--hop-Heading-xs-font-size);
|
|
163
163
|
--font-family: var(--hop-Heading-xs-font-family);
|
|
164
164
|
--font-weight: var(--hop-Heading-xs-font-weight);
|
|
165
165
|
--line-height: var(--hop-Heading-xs-line-height);
|
|
166
166
|
}
|
|
167
|
-
:where(.Heading-module__hop-Heading--
|
|
167
|
+
:where(.Heading-module__hop-Heading--sm___R6y6i) {
|
|
168
168
|
--font-size: var(--hop-Heading-sm-font-size);
|
|
169
169
|
--font-family: var(--hop-Heading-sm-font-family);
|
|
170
170
|
--font-weight: var(--hop-Heading-sm-font-weight);
|
|
171
171
|
--line-height: var(--hop-Heading-sm-line-height);
|
|
172
172
|
}
|
|
173
|
-
:where(.Heading-module__hop-Heading--
|
|
173
|
+
:where(.Heading-module__hop-Heading--md___d6d9m) {
|
|
174
174
|
--font-size: var(--hop-Heading-md-font-size);
|
|
175
175
|
--font-family: var(--hop-Heading-md-font-family);
|
|
176
176
|
--font-weight: var(--hop-Heading-md-font-weight);
|
|
177
177
|
--line-height: var(--hop-Heading-md-line-height);
|
|
178
178
|
}
|
|
179
|
-
:where(.Heading-module__hop-Heading--
|
|
179
|
+
:where(.Heading-module__hop-Heading--lg___yqjzy) {
|
|
180
180
|
--font-size: var(--hop-Heading-lg-font-size);
|
|
181
181
|
--font-family: var(--hop-Heading-lg-font-family);
|
|
182
182
|
--font-weight: var(--hop-Heading-lg-font-weight);
|
|
183
183
|
--line-height: var(--hop-Heading-lg-line-height);
|
|
184
184
|
}
|
|
185
|
-
:where(.Heading-module__hop-Heading--
|
|
185
|
+
:where(.Heading-module__hop-Heading--xl___U0Gfz) {
|
|
186
186
|
--font-size: var(--hop-Heading-xl-font-size);
|
|
187
187
|
--font-family: var(--hop-Heading-xl-font-family);
|
|
188
188
|
--font-weight: var(--hop-Heading-xl-font-weight);
|
|
189
189
|
--line-height: var(--hop-Heading-xl-line-height);
|
|
190
190
|
}
|
|
191
|
-
:where(.Heading-module__hop-Heading--
|
|
191
|
+
:where(.Heading-module__hop-Heading--2xl___B7lym) {
|
|
192
192
|
--font-size: var(--hop-Heading-2xl-font-size);
|
|
193
193
|
--font-family: var(--hop-Heading-2xl-font-family);
|
|
194
194
|
--font-weight: var(--hop-Heading-2xl-font-weight);
|
|
195
195
|
--line-height: var(--hop-Heading-2xl-line-height);
|
|
196
196
|
}
|
|
197
|
-
:where(.Heading-module__hop-Heading--
|
|
197
|
+
:where(.Heading-module__hop-Heading--3xl___P65x-) {
|
|
198
198
|
--font-size: var(--hop-Heading-3xl-font-size);
|
|
199
199
|
--font-family: var(--hop-Heading-3xl-font-family);
|
|
200
200
|
--font-weight: var(--hop-Heading-3xl-font-weight);
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
/* css-module:/home/runner/work/wl-hopper/wl-hopper/packages/components/src/typography/OverlineText/src/OverlineText.module.css/#css-module-data */
|
|
205
|
-
:where(.OverlineText-module__hop-
|
|
205
|
+
:where(.OverlineText-module__hop-OverlineText___kurkU) {
|
|
206
206
|
--hop-OverlineText-font-family: var(--hop-overline-font-family);
|
|
207
207
|
--hop-OverlineText-font-size: var(--hop-overline-font-size);
|
|
208
208
|
--hop-OverlineText-font-weight: var(--hop-overline-font-weight);
|
|
@@ -226,42 +226,45 @@
|
|
|
226
226
|
text-transform: uppercase;
|
|
227
227
|
letter-spacing: var(--letter-spacing);
|
|
228
228
|
}
|
|
229
|
-
.OverlineText-module__hop-
|
|
229
|
+
.OverlineText-module__hop-OverlineText__text___7uNsa {
|
|
230
230
|
box-sizing: border-box;
|
|
231
231
|
}
|
|
232
|
-
.OverlineText-module__hop-
|
|
233
|
-
.OverlineText-module__hop-
|
|
232
|
+
.OverlineText-module__hop-OverlineText__text___7uNsa::before,
|
|
233
|
+
.OverlineText-module__hop-OverlineText__text___7uNsa::after {
|
|
234
234
|
content: "";
|
|
235
235
|
display: block;
|
|
236
236
|
box-sizing: border-box;
|
|
237
237
|
inline-size: 0;
|
|
238
238
|
block-size: 0;
|
|
239
239
|
}
|
|
240
|
-
.OverlineText-module__hop-
|
|
240
|
+
.OverlineText-module__hop-OverlineText__text___7uNsa::before {
|
|
241
241
|
margin-block-end: var(--bottom-offset);
|
|
242
242
|
}
|
|
243
|
-
.OverlineText-module__hop-
|
|
243
|
+
.OverlineText-module__hop-OverlineText__text___7uNsa::after {
|
|
244
244
|
margin-block-start: var(--top-offset);
|
|
245
245
|
}
|
|
246
246
|
|
|
247
247
|
/* css-module:/home/runner/work/wl-hopper/wl-hopper/packages/components/src/typography/Label/src/Label.module.css/#css-module-data */
|
|
248
|
-
.Label-module__hop-
|
|
248
|
+
.Label-module__hop-Label___L4zrw {
|
|
249
249
|
--hop-Label-font-size: var(--hop-heading-xs-font-size);
|
|
250
250
|
--hop-Label-font-family: var(--hop-heading-xs-font-family);
|
|
251
251
|
--hop-Label-font-weight: var(--hop-heading-xs-font-weight);
|
|
252
252
|
--hop-Label-line-height: var(--hop-heading-xs-line-height);
|
|
253
253
|
--hop-Label-color: var(--hop-neutral-text-weak);
|
|
254
254
|
}
|
|
255
|
-
:where(.Label-module__hop-
|
|
255
|
+
:where(.Label-module__hop-Label___L4zrw) {
|
|
256
256
|
font-family: var(--hop-Label-font-family);
|
|
257
257
|
font-size: var(--hop-Label-font-size);
|
|
258
258
|
font-weight: var(--hop-Label-font-weight);
|
|
259
259
|
line-height: var(--hop-Label-line-height);
|
|
260
260
|
color: var(--hop-Label-color);
|
|
261
261
|
}
|
|
262
|
+
:where(.Label-module__hop-Label__indicator___mWy1n) {
|
|
263
|
+
padding-inline-start: var(--hop-space-20);
|
|
264
|
+
}
|
|
262
265
|
|
|
263
266
|
/* css-module:/home/runner/work/wl-hopper/wl-hopper/packages/components/src/inputs/src/InputGroup.module.css/#css-module-data */
|
|
264
|
-
.InputGroup-module__hop-
|
|
267
|
+
.InputGroup-module__hop-InputGroup___PiLz0 {
|
|
265
268
|
--hop-InputGroup-background: var(--hop-neutral-surface);
|
|
266
269
|
--hop-InputGroup-border-color: var(--hop-neutral-border);
|
|
267
270
|
--hop-InputGroup-border-width: 0.0625rem;
|
|
@@ -342,11 +345,11 @@
|
|
|
342
345
|
border: var(--border);
|
|
343
346
|
border-radius: var(--hop-InputGroup-border-radius);
|
|
344
347
|
}
|
|
345
|
-
.InputGroup-module__hop-InputGroup--
|
|
348
|
+
.InputGroup-module__hop-InputGroup--fluid___Cp15- {
|
|
346
349
|
--inline-size: 100%;
|
|
347
350
|
--input-inline-size: 100%;
|
|
348
351
|
}
|
|
349
|
-
.InputGroup-module__hop-InputGroup--
|
|
352
|
+
.InputGroup-module__hop-InputGroup--sm___ZeMr9 {
|
|
350
353
|
--block-size: var(--hop-InputGroup-sm-block-size);
|
|
351
354
|
--input-font-family: var(--hop-InputGroup-input-sm-font-family);
|
|
352
355
|
--input-font-size: var(--hop-InputGroup-input-sm-font-size);
|
|
@@ -354,7 +357,7 @@
|
|
|
354
357
|
--input-line-height: var(--hop-InputGroup-input-sm-line-height);
|
|
355
358
|
--input-block-size: var(--hop-InputGroup-input-sm-block-size);
|
|
356
359
|
}
|
|
357
|
-
.InputGroup-module__hop-
|
|
360
|
+
.InputGroup-module__hop-InputGroup___PiLz0[data-input-type=textarea] {
|
|
358
361
|
--gap: var(--hop-InputGroup-gap-textarea);
|
|
359
362
|
--flex-direction: var(--hop-InputGroup-flex-direction-textarea);
|
|
360
363
|
--align-items: var(--hop-InputGroup-align-items-textarea);
|
|
@@ -362,29 +365,29 @@
|
|
|
362
365
|
--padding-inline: var(--hop-InputGroup-padding-inline-textarea);
|
|
363
366
|
--padding-block: var(--hop-InputGroup-padding-block-textarea);
|
|
364
367
|
}
|
|
365
|
-
.InputGroup-module__hop-
|
|
368
|
+
.InputGroup-module__hop-InputGroup___PiLz0[data-input-type=number] {
|
|
366
369
|
--display: var(--hop-InputGroup-display-number);
|
|
367
370
|
--gap: var(--hop-InputGroup-gap-number);
|
|
368
371
|
--inline-size: var(--hop-InputGroup-inline-size-number);
|
|
369
372
|
}
|
|
370
|
-
.InputGroup-module__hop-
|
|
373
|
+
.InputGroup-module__hop-InputGroup___PiLz0[data-hovered] {
|
|
371
374
|
--background: var(--hop-InputGroup-background-hover);
|
|
372
375
|
--border: var(--hop-InputGroup-border-width) solid var(--hop-InputGroup-border-color-hover) ;
|
|
373
376
|
}
|
|
374
|
-
.InputGroup-module__hop-
|
|
377
|
+
.InputGroup-module__hop-InputGroup___PiLz0[data-focus-within] {
|
|
375
378
|
--border: var(--hop-InputGroup-border-width) solid var(--hop-InputGroup-border-color-focus) ;
|
|
376
379
|
}
|
|
377
|
-
.InputGroup-module__hop-
|
|
380
|
+
.InputGroup-module__hop-InputGroup___PiLz0[data-invalid] {
|
|
378
381
|
--border: var(--hop-InputGroup-border-width) solid var(--hop-InputGroup-border-color-invalid) ;
|
|
379
382
|
}
|
|
380
|
-
.InputGroup-module__hop-
|
|
383
|
+
.InputGroup-module__hop-InputGroup___PiLz0[data-disabled] {
|
|
381
384
|
--background: var(--hop-InputGroup-background-disabled);
|
|
382
385
|
--border: 0.0625rem solid var(--hop-InputGroup-border-color-disabled);
|
|
383
386
|
--input-color: var(--hop-InputGroup-input-color-disabled);
|
|
384
387
|
--input-placeholder-color: var(--hop-InputGroup-placeholder-color-disabled);
|
|
385
388
|
}
|
|
386
|
-
.InputGroup-module__hop-
|
|
387
|
-
.InputGroup-module__hop-
|
|
389
|
+
.InputGroup-module__hop-InputGroup__input___xLgn9,
|
|
390
|
+
.InputGroup-module__hop-InputGroup__textarea___6Go7N {
|
|
388
391
|
flex: 1 1 auto;
|
|
389
392
|
box-sizing: border-box;
|
|
390
393
|
inline-size: var(--input-inline-size);
|
|
@@ -398,14 +401,14 @@
|
|
|
398
401
|
border: none;
|
|
399
402
|
outline: none;
|
|
400
403
|
}
|
|
401
|
-
.InputGroup-module__hop-
|
|
404
|
+
.InputGroup-module__hop-InputGroup__input___xLgn9 {
|
|
402
405
|
block-size: var(--input-block-size);
|
|
403
406
|
padding: var(--hop-InputGroup-input-padding);
|
|
404
407
|
}
|
|
405
|
-
.InputGroup-module__hop-
|
|
408
|
+
.InputGroup-module__hop-InputGroup__textarea___6Go7N {
|
|
406
409
|
padding: var(--hop-InputGroup-textarea-padding);
|
|
407
410
|
}
|
|
408
|
-
.InputGroup-module__hop-
|
|
411
|
+
.InputGroup-module__hop-InputGroup__input___xLgn9::placeholder {
|
|
409
412
|
font-family: var(--hop-InputGroup-placeholder-font-family);
|
|
410
413
|
font-size: var(--hop-InputGroup-placeholder-font-size);
|
|
411
414
|
font-weight: var(--hop-InputGroup-placeholder-font-weight);
|
|
@@ -414,7 +417,7 @@
|
|
|
414
417
|
}
|
|
415
418
|
|
|
416
419
|
/* css-module:/home/runner/work/wl-hopper/wl-hopper/packages/components/src/inputs/src/NumberField.module.css/#css-module-data */
|
|
417
|
-
.NumberField-module__hop-
|
|
420
|
+
.NumberField-module__hop-NumberField___IQHRz {
|
|
418
421
|
--hop-NumberField-gap: var(--hop-space-stack-xs);
|
|
419
422
|
--hop-NumberField-inline-size: 20rem;
|
|
420
423
|
--hop-NumberField-inline-size-fluid: 100%;
|
|
@@ -462,30 +465,30 @@
|
|
|
462
465
|
gap: var(--hop-NumberField-gap);
|
|
463
466
|
inline-size: var(--inline-size);
|
|
464
467
|
}
|
|
465
|
-
.NumberField-module__hop-NumberField--
|
|
468
|
+
.NumberField-module__hop-NumberField--fluid___cBL6Z {
|
|
466
469
|
--inline-size: var(--hop-NumberField-inline-size-fluid);
|
|
467
470
|
}
|
|
468
|
-
.NumberField-module__hop-NumberField--
|
|
471
|
+
.NumberField-module__hop-NumberField--mobile___83Tka {
|
|
469
472
|
--input-group-template: var(--hop-NumberField-input-group-template-mobile);
|
|
470
473
|
--stepper-height: var(--hop-NumberField-stepper-height-mobile);
|
|
471
474
|
}
|
|
472
|
-
.NumberField-module__hop-
|
|
475
|
+
.NumberField-module__hop-NumberField__Label___QqEtX {
|
|
473
476
|
order: 0;
|
|
474
477
|
}
|
|
475
|
-
.NumberField-module__hop-
|
|
478
|
+
.NumberField-module__hop-NumberField__prefix___zfJ4v {
|
|
476
479
|
grid-area: prefix;
|
|
477
480
|
margin-inline-end: var(--hop-NumberField-prefix-margin-inline-end);
|
|
478
481
|
color: var(--hop-NumberField-prefix-color);
|
|
479
482
|
}
|
|
480
|
-
.NumberField-module__hop-
|
|
483
|
+
.NumberField-module__hop-NumberField__InputGroup___rpkuJ {
|
|
481
484
|
grid-template: var(--input-group-template);
|
|
482
485
|
order: 1;
|
|
483
486
|
}
|
|
484
|
-
.NumberField-module__hop-
|
|
485
|
-
.NumberField-module__hop-
|
|
487
|
+
.NumberField-module__hop-NumberField__ErrorMessage___isGtg,
|
|
488
|
+
.NumberField-module__hop-NumberField__HelperMessage___7p6WZ {
|
|
486
489
|
order: 3;
|
|
487
490
|
}
|
|
488
|
-
.NumberField-module__hop-NumberField__stepper-
|
|
491
|
+
.NumberField-module__hop-NumberField__stepper-button___ofNwv {
|
|
489
492
|
cursor: pointer;
|
|
490
493
|
display: flex;
|
|
491
494
|
grid-area: var(--grid-area, unset);
|
|
@@ -505,49 +508,49 @@
|
|
|
505
508
|
border-radius: var(--stepper-border-radius, 0);
|
|
506
509
|
outline: none;
|
|
507
510
|
}
|
|
508
|
-
.NumberField-module__hop-NumberField__stepper-button--
|
|
511
|
+
.NumberField-module__hop-NumberField__stepper-button--increment___BXGLT {
|
|
509
512
|
--stepper-border-radius: var(--hop-NumberField-stepper-border-radius-increment);
|
|
510
513
|
--stepper-border-width: var(--hop-NumberField-stepper-border-width) var(--hop-NumberField-stepper-border-width) 0 var(--hop-NumberField-stepper-border-width);
|
|
511
514
|
--stepper-align-self: var(--hop-NumberField-stepper-align-self-increment);
|
|
512
515
|
--stepper-margin-inline: var(--hop-NumberField-stepper-margin-inline-increment);
|
|
513
516
|
--grid-area: stepup;
|
|
514
517
|
}
|
|
515
|
-
.NumberField-module__hop-NumberField__stepper-button--
|
|
518
|
+
.NumberField-module__hop-NumberField__stepper-button--decrement___vWXrK {
|
|
516
519
|
--stepper-border-radius: var(--hop-NumberField-stepper-border-radius-decrement);
|
|
517
520
|
--stepper-border-width: 0 var(--hop-NumberField-stepper-border-width) var(--hop-NumberField-stepper-border-width) var(--hop-NumberField-stepper-border-width);
|
|
518
521
|
--stepper-align-self: var(--hop-NumberField-stepper-align-self-decrement);
|
|
519
522
|
--stepper-margin-inline: var(--hop-NumberField-stepper-margin-inline-decrement);
|
|
520
523
|
--grid-area: stepdown;
|
|
521
524
|
}
|
|
522
|
-
.NumberField-module__hop-NumberField__stepper-button--
|
|
525
|
+
.NumberField-module__hop-NumberField__stepper-button--mobile___lZj4N.NumberField-module__hop-NumberField__stepper-button--increment___BXGLT {
|
|
523
526
|
--stepper-border-width: 0 0 0 var(--hop-NumberField-stepper-border-width);
|
|
524
527
|
--stepper-align-self: var(--hop-NumberField-stepper-align-self-increment-mobile);
|
|
525
528
|
--stepper-margin-inline: var(--hop-NumberField-stepper-margin-inline-increment-mobile);
|
|
526
529
|
--stepper-border-radius: var(--hop-NumberField-stepper-border-radius-mobile-increment);
|
|
527
530
|
}
|
|
528
|
-
.NumberField-module__hop-NumberField__stepper-button--
|
|
531
|
+
.NumberField-module__hop-NumberField__stepper-button--mobile___lZj4N.NumberField-module__hop-NumberField__stepper-button--decrement___vWXrK {
|
|
529
532
|
--stepper-border-width: 0 var(--hop-NumberField-stepper-border-width) 0 0;
|
|
530
533
|
--stepper-align-self: var(--hop-NumberField-stepper-align-self-decrement-mobile);
|
|
531
534
|
--stepper-margin-inline: var(--hop-NumberField-stepper-margin-inline-decrement-mobile);
|
|
532
535
|
--stepper-border-radius: var(--hop-NumberField-stepper-border-radius-mobile-decrement);
|
|
533
536
|
}
|
|
534
|
-
.NumberField-module__hop-NumberField__stepper-
|
|
537
|
+
.NumberField-module__hop-NumberField__stepper-button___ofNwv[data-hovered] {
|
|
535
538
|
color: var(--hop-NumberField-stepper-color-hovered);
|
|
536
539
|
background-color: var(--hop-NumberField-stepper-background-color-hovered);
|
|
537
540
|
}
|
|
538
|
-
.NumberField-module__hop-NumberField__stepper-
|
|
541
|
+
.NumberField-module__hop-NumberField__stepper-button___ofNwv[data-pressed] {
|
|
539
542
|
color: var(--hop-NumberField-stepper-color-pressed);
|
|
540
543
|
background-color: var(--hop-NumberField-stepper-background-color-pressed);
|
|
541
544
|
}
|
|
542
|
-
.NumberField-module__hop-NumberField__stepper-
|
|
545
|
+
.NumberField-module__hop-NumberField__stepper-button___ofNwv[data-disabled] {
|
|
543
546
|
cursor: not-allowed;
|
|
544
547
|
color: var(--hop-NumberField-stepper-color-disabled);
|
|
545
548
|
background-color: var(--hop-NumberField-stepper-background-color-disabled);
|
|
546
549
|
}
|
|
547
|
-
.NumberField-module__hop-NumberField__stepper-
|
|
550
|
+
.NumberField-module__hop-NumberField__stepper-button__icon___-KSsu {
|
|
548
551
|
display: block;
|
|
549
552
|
max-block-size: 100%;
|
|
550
553
|
}
|
|
551
|
-
.NumberField-module__hop-
|
|
554
|
+
.NumberField-module__hop-NumberField__input___lQVE0 {
|
|
552
555
|
grid-area: input;
|
|
553
556
|
}
|
|
@@ -1,178 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
export { GlobalNumberFieldCssSelector, _NumberField as NumberField } from '../../chunk-VISBUD2K.js';
|
|
2
|
+
import '../../chunk-MTDFS4CZ.js';
|
|
3
|
+
import '../../chunk-ZQ3AWYRR.js';
|
|
3
4
|
import '../../chunk-LJXTJRSB.js';
|
|
4
|
-
import '../../chunk-
|
|
5
|
+
import '../../chunk-PQXVL3YJ.js';
|
|
5
6
|
import '../../chunk-TXZ6BMFR.js';
|
|
6
|
-
import '../../chunk-
|
|
7
|
-
import
|
|
7
|
+
import '../../chunk-RWAVMW7T.js';
|
|
8
|
+
import '../../chunk-Q63YLWI6.js';
|
|
8
9
|
import '../../chunk-6BFSSZCY.js';
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import '../../chunk-
|
|
10
|
+
import '../../chunk-QCA3ZR56.js';
|
|
11
|
+
import '../../chunk-F4H76S4H.js';
|
|
12
|
+
import '../../chunk-ZWU6DRRZ.js';
|
|
13
|
+
import '../../chunk-65JPI4FL.js';
|
|
14
|
+
import '../../chunk-HZKFQ33E.js';
|
|
15
|
+
import '../../chunk-CEUQHDEQ.js';
|
|
15
16
|
import '../../chunk-WPNVVGFW.js';
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
17
|
+
import '../../chunk-FAE27DLF.js';
|
|
18
|
+
import '../../chunk-XT2MZWEV.js';
|
|
19
|
+
import '../../chunk-X6SER3TZ.js';
|
|
20
|
+
import '../../chunk-HXI3MEEK.js';
|
|
21
|
+
import '../../chunk-M36KANKC.js';
|
|
22
|
+
import '../../chunk-KVDXQMWI.js';
|
|
21
23
|
import '../../chunk-JSBRDJBE.js';
|
|
22
|
-
import { IconContext, AngleUpIcon, AngleDownIcon } from '@hopper-ui/icons';
|
|
23
|
-
import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
|
|
24
|
-
import { mergeRefs } from '@react-aria/utils';
|
|
25
|
-
import { useControlledState } from '@react-stately/utils';
|
|
26
|
-
import { forwardRef, useCallback } from 'react';
|
|
27
|
-
import { useObjectRef } from 'react-aria';
|
|
28
|
-
import { useContextProps, composeRenderProps, Input, NumberField as NumberField$1, Button } from 'react-aria-components';
|
|
29
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
30
|
-
|
|
31
|
-
// css-module:./NumberField.module.css#css-module
|
|
32
|
-
var NumberField_module_default = { "hop-NumberField": "NumberField-module__hop-NumberField___QkYy2", "hop-NumberField--fluid": "NumberField-module__hop-NumberField--fluid___l-pQO", "hop-NumberField--mobile": "NumberField-module__hop-NumberField--mobile___-JBUi", "hop-NumberField__Label": "NumberField-module__hop-NumberField__Label___wu-3u", "hop-NumberField__prefix": "NumberField-module__hop-NumberField__prefix___oT9-m", "hop-NumberField__InputGroup": "NumberField-module__hop-NumberField__InputGroup___fGoU4", "hop-NumberField__ErrorMessage": "NumberField-module__hop-NumberField__ErrorMessage___pD3jk", "hop-NumberField__HelperMessage": "NumberField-module__hop-NumberField__HelperMessage___8S2xj", "hop-NumberField__stepper-button": "NumberField-module__hop-NumberField__stepper-button___UFMVt", "hop-NumberField__stepper-button--increment": "NumberField-module__hop-NumberField__stepper-button--increment___VIPtD", "hop-NumberField__stepper-button--decrement": "NumberField-module__hop-NumberField__stepper-button--decrement___I0w-s", "hop-NumberField__stepper-button--mobile": "NumberField-module__hop-NumberField__stepper-button--mobile___p4XLo", "hop-NumberField__stepper-button__icon": "NumberField-module__hop-NumberField__stepper-button__icon___jOma2", "hop-NumberField__input": "NumberField-module__hop-NumberField__input___6qPB8" };
|
|
33
|
-
var GlobalNumberFieldCssSelector = "hop-NumberField";
|
|
34
|
-
var StepperButton = ({ direction }) => {
|
|
35
|
-
const scale = useScale();
|
|
36
|
-
const isMobile = scale === "large";
|
|
37
|
-
const StepperIcon = direction === "increment" ? AngleUpIcon : AngleDownIcon;
|
|
38
|
-
const stepperClasses = cssModule(
|
|
39
|
-
NumberField_module_default,
|
|
40
|
-
"hop-NumberField__stepper-button",
|
|
41
|
-
direction,
|
|
42
|
-
isMobile && "mobile"
|
|
43
|
-
);
|
|
44
|
-
return /* @__PURE__ */ jsx(
|
|
45
|
-
Button,
|
|
46
|
-
{
|
|
47
|
-
className: stepperClasses,
|
|
48
|
-
slot: direction,
|
|
49
|
-
children: /* @__PURE__ */ jsx(
|
|
50
|
-
StepperIcon,
|
|
51
|
-
{
|
|
52
|
-
className: NumberField_module_default["hop-NumberField__stepper-button__icon"],
|
|
53
|
-
size: {
|
|
54
|
-
base: "md",
|
|
55
|
-
xs: "sm"
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
)
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
};
|
|
62
|
-
function NumberField(props, ref) {
|
|
63
|
-
var _a;
|
|
64
|
-
const {
|
|
65
|
-
inputRef: userProvidedInputRef = null,
|
|
66
|
-
...propsWithoutRef
|
|
67
|
-
} = props;
|
|
68
|
-
[props, ref] = useContextProps(propsWithoutRef, ref, NumberFieldContext);
|
|
69
|
-
const { stylingProps, ...ownProps } = useStyledSystem(props);
|
|
70
|
-
const {
|
|
71
|
-
className,
|
|
72
|
-
style: styleProp,
|
|
73
|
-
size,
|
|
74
|
-
prefix,
|
|
75
|
-
placeholder,
|
|
76
|
-
onChange: onChangeProp,
|
|
77
|
-
children,
|
|
78
|
-
defaultValue,
|
|
79
|
-
value: valueProp,
|
|
80
|
-
isFluid: isFluidProp,
|
|
81
|
-
isDisabled,
|
|
82
|
-
isInvalid,
|
|
83
|
-
...otherProps
|
|
84
|
-
} = ownProps;
|
|
85
|
-
const inputRef = useObjectRef(mergeRefs(userProvidedInputRef, props.inputRef !== void 0 ? props.inputRef : null));
|
|
86
|
-
const isFluid = (_a = useResponsiveValue(isFluidProp)) != null ? _a : false;
|
|
87
|
-
const scale = useScale();
|
|
88
|
-
const isMobile = scale === "large";
|
|
89
|
-
const classNames = composeClassnameRenderProps(
|
|
90
|
-
className,
|
|
91
|
-
GlobalNumberFieldCssSelector,
|
|
92
|
-
cssModule(
|
|
93
|
-
NumberField_module_default,
|
|
94
|
-
"hop-NumberField",
|
|
95
|
-
isFluid && "fluid",
|
|
96
|
-
isMobile && "mobile"
|
|
97
|
-
),
|
|
98
|
-
stylingProps.className
|
|
99
|
-
);
|
|
100
|
-
const style = composeRenderProps(styleProp, (prev) => {
|
|
101
|
-
return {
|
|
102
|
-
...stylingProps.style,
|
|
103
|
-
...prev
|
|
104
|
-
};
|
|
105
|
-
});
|
|
106
|
-
const handleTextChanged = useCallback((value2) => {
|
|
107
|
-
onChangeProp == null ? void 0 : onChangeProp(value2);
|
|
108
|
-
}, [onChangeProp]);
|
|
109
|
-
const [value, onChange] = useControlledState(valueProp, defaultValue || 0, handleTextChanged);
|
|
110
|
-
const prefixMarkup = prefix ? /* @__PURE__ */ jsx(
|
|
111
|
-
SlotProvider,
|
|
112
|
-
{
|
|
113
|
-
values: [
|
|
114
|
-
[TextContext, { size, className: NumberField_module_default["hop-NumberField__prefix"] }],
|
|
115
|
-
[IconContext, { size, className: NumberField_module_default["hop-NumberField__prefix"] }]
|
|
116
|
-
],
|
|
117
|
-
children: isTextOnlyChildren(prefix) ? /* @__PURE__ */ jsx(_Text, { children: prefix }) : prefix
|
|
118
|
-
}
|
|
119
|
-
) : null;
|
|
120
|
-
const inputMarkup = /* @__PURE__ */ jsx(ClearContainerSlots, { children: /* @__PURE__ */ jsxs(
|
|
121
|
-
_InputGroup,
|
|
122
|
-
{
|
|
123
|
-
isFluid,
|
|
124
|
-
size,
|
|
125
|
-
className: NumberField_module_default["hop-NumberField__InputGroup"],
|
|
126
|
-
isDisabled,
|
|
127
|
-
isInvalid,
|
|
128
|
-
inputClassName: NumberField_module_default["hop-NumberField__input"],
|
|
129
|
-
inputType: "number",
|
|
130
|
-
children: [
|
|
131
|
-
prefixMarkup,
|
|
132
|
-
/* @__PURE__ */ jsx(
|
|
133
|
-
Input,
|
|
134
|
-
{
|
|
135
|
-
ref: inputRef,
|
|
136
|
-
placeholder
|
|
137
|
-
}
|
|
138
|
-
),
|
|
139
|
-
/* @__PURE__ */ jsx(StepperButton, { direction: "increment" }),
|
|
140
|
-
/* @__PURE__ */ jsx(StepperButton, { direction: "decrement" })
|
|
141
|
-
]
|
|
142
|
-
}
|
|
143
|
-
) });
|
|
144
|
-
const childrenMarkup = composeRenderProps(children, (prev) => {
|
|
145
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
146
|
-
/* @__PURE__ */ jsx(
|
|
147
|
-
SlotProvider,
|
|
148
|
-
{
|
|
149
|
-
values: [
|
|
150
|
-
[LabelContext, { className: NumberField_module_default["hop-NumberField__Label"] }],
|
|
151
|
-
[HelperMessageContext, { className: NumberField_module_default["hop-NumberField__HelperMessage"] }],
|
|
152
|
-
[ErrorMessageContext, { className: NumberField_module_default["hop-NumberField__ErrorMessage"] }]
|
|
153
|
-
],
|
|
154
|
-
children: prev
|
|
155
|
-
}
|
|
156
|
-
),
|
|
157
|
-
inputMarkup
|
|
158
|
-
] });
|
|
159
|
-
});
|
|
160
|
-
return /* @__PURE__ */ jsx(
|
|
161
|
-
NumberField$1,
|
|
162
|
-
{
|
|
163
|
-
ref,
|
|
164
|
-
value,
|
|
165
|
-
style,
|
|
166
|
-
className: classNames,
|
|
167
|
-
onChange,
|
|
168
|
-
isDisabled,
|
|
169
|
-
isInvalid,
|
|
170
|
-
...otherProps,
|
|
171
|
-
children: childrenMarkup
|
|
172
|
-
}
|
|
173
|
-
);
|
|
174
|
-
}
|
|
175
|
-
var _NumberField = forwardRef(NumberField);
|
|
176
|
-
_NumberField.displayName = "NumberField";
|
|
177
|
-
|
|
178
|
-
export { GlobalNumberFieldCssSelector, _NumberField as NumberField };
|