@hopper-ui/components 0.1.0 → 1.0.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 +117 -0
- package/dist/HopperProvider/src/HopperProvider.d.ts +33 -1
- package/dist/HopperProvider/src/HopperProvider.js +2 -1
- package/dist/HopperProvider/src/index.d.ts +1 -0
- package/dist/HopperProvider/src/index.js +2 -1
- package/dist/IconList/src/IconList.css +6 -6
- package/dist/IconList/src/IconList.js +2 -1
- package/dist/IconList/src/IconListContext.js +1 -0
- package/dist/IconList/src/index.css +6 -6
- package/dist/IconList/src/index.js +2 -1
- package/dist/Label/src/Label.css +70 -70
- package/dist/Label/src/Label.js +3 -2
- package/dist/Label/src/LabelContext.js +1 -0
- package/dist/Label/src/index.css +70 -70
- package/dist/Label/src/index.js +3 -2
- package/dist/Link/src/Link.css +165 -0
- package/dist/Link/src/Link.d.ts +33 -0
- package/dist/Link/src/Link.js +11 -0
- package/dist/Link/src/LinkContext.d.ts +8 -0
- package/dist/Link/src/LinkContext.js +2 -0
- package/dist/Link/src/index.css +165 -0
- package/dist/Link/src/index.d.ts +5 -0
- package/dist/Link/src/index.js +11 -0
- package/dist/Spinner/src/Spinner.css +124 -124
- package/dist/Spinner/src/Spinner.d.ts +1 -0
- package/dist/Spinner/src/Spinner.js +5 -4
- package/dist/Spinner/src/SpinnerContext.js +1 -0
- package/dist/Spinner/src/index.css +124 -124
- package/dist/Spinner/src/index.js +5 -4
- package/dist/Text/src/Text.css +67 -67
- package/dist/Text/src/Text.d.ts +2 -3
- package/dist/Text/src/Text.js +5 -2
- package/dist/Text/src/TextContext.js +1 -0
- package/dist/Text/src/index.css +67 -67
- package/dist/Text/src/index.d.ts +1 -1
- package/dist/Text/src/index.js +5 -2
- package/dist/buttons/src/Button.css +634 -435
- package/dist/buttons/src/Button.d.ts +15 -10
- package/dist/buttons/src/Button.js +13 -9
- package/dist/buttons/src/ButtonContext.d.ts +6 -2
- package/dist/buttons/src/ButtonContext.js +1 -0
- package/dist/buttons/src/ButtonGroup.css +38 -0
- package/dist/buttons/src/ButtonGroup.d.ts +40 -0
- package/dist/buttons/src/ButtonGroup.js +83 -0
- package/dist/buttons/src/ButtonGroupContext.d.ts +9 -0
- package/dist/buttons/src/ButtonGroupContext.js +2 -0
- package/dist/buttons/src/index.css +634 -435
- package/dist/buttons/src/index.d.ts +2 -1
- package/dist/buttons/src/index.js +13 -9
- package/dist/checkbox/src/Checkbox.css +292 -0
- package/dist/checkbox/src/Checkbox.d.ts +20 -0
- package/dist/checkbox/src/Checkbox.js +11 -0
- package/dist/checkbox/src/CheckboxContext.d.ts +8 -0
- package/dist/checkbox/src/CheckboxContext.js +2 -0
- package/dist/checkbox/src/CheckboxField.css +119 -0
- package/dist/checkbox/src/CheckboxField.d.ts +26 -0
- package/dist/checkbox/src/CheckboxField.js +7 -0
- package/dist/checkbox/src/CheckboxFieldContext.d.ts +10 -0
- package/dist/checkbox/src/CheckboxFieldContext.js +2 -0
- package/dist/checkbox/src/CheckboxGroup.css +568 -0
- package/dist/checkbox/src/CheckboxGroup.d.ts +30 -0
- package/dist/checkbox/src/CheckboxGroup.js +12 -0
- package/dist/checkbox/src/CheckboxGroupContext.d.ts +8 -0
- package/dist/checkbox/src/CheckboxGroupContext.js +2 -0
- package/dist/checkbox/src/CheckboxList.d.ts +17 -0
- package/dist/checkbox/src/CheckboxList.js +3 -0
- package/dist/checkbox/src/CheckboxListContext.d.ts +10 -0
- package/dist/checkbox/src/CheckboxListContext.js +2 -0
- package/dist/checkbox/src/index.css +568 -0
- package/dist/checkbox/src/index.d.ts +13 -0
- package/dist/checkbox/src/index.js +20 -0
- package/dist/chip/src/Chip.css +261 -0
- package/dist/chip/src/Chip.d.ts +27 -0
- package/dist/chip/src/Chip.js +10 -0
- package/dist/chip/src/ChipContext.d.ts +10 -0
- package/dist/chip/src/ChipContext.js +2 -0
- package/dist/chip/src/index.css +261 -0
- package/dist/chip/src/index.d.ts +7 -0
- package/dist/chip/src/index.js +10 -0
- package/dist/chunk-2EAZPH3M.js +7 -0
- package/dist/chunk-3LRBUQC2.js +43 -0
- package/dist/chunk-4AARNXWE.js +101 -0
- package/dist/chunk-4VVNSXIB.js +7 -0
- package/dist/chunk-5KJ5IKUE.js +69 -0
- package/dist/chunk-5MBJWRZD.js +7 -0
- package/dist/{chunk-SEU4CGZD.js → chunk-65JPI4FL.js} +1 -1
- package/dist/chunk-7ELZ57E5.js +93 -0
- package/dist/chunk-A7TZHALP.js +7 -0
- package/dist/chunk-ACVMW6YD.js +7 -0
- package/dist/{chunk-YLDA2M2E.js → chunk-ANVMQBBG.js} +2 -1
- package/dist/chunk-B7WS4DBA.js +83 -0
- package/dist/chunk-BPM4ETTB.js +35 -0
- package/dist/{chunk-QIOYM2XJ.js → chunk-DFUQTSEV.js} +13 -13
- package/dist/chunk-DGLAGYBD.js +7 -0
- package/dist/chunk-ESVVLTEN.js +7 -0
- package/dist/chunk-FU5CCPLP.js +7 -0
- package/dist/chunk-GXKSX5N5.js +104 -0
- package/dist/chunk-H5YTU3U7.js +20 -0
- package/dist/chunk-H7VJS4MX.js +7 -0
- package/dist/chunk-HVRSS5RT.js +186 -0
- package/dist/chunk-HXI3MEEK.js +27 -0
- package/dist/chunk-I7AMDVGG.js +124 -0
- package/dist/{chunk-XCKF6EU7.js → chunk-IYITZANI.js} +9 -9
- package/dist/chunk-JHY3TXL4.js +101 -0
- package/dist/{chunk-6BEVZRUL.js → chunk-KVDXQMWI.js} +1 -1
- package/dist/chunk-M6UHXS6K.js +58 -0
- package/dist/chunk-MD6IFXLG.js +57 -0
- package/dist/chunk-ME3RBGOT.js +91 -0
- package/dist/chunk-N7YDPVZL.js +7 -0
- package/dist/chunk-NH3IVMXB.js +43 -0
- package/dist/chunk-NKHMUPAP.js +43 -0
- package/dist/chunk-OHPGEHL3.js +83 -0
- package/dist/chunk-VIHBOZVN.js +92 -0
- package/dist/chunk-VJQ7M2BK.js +7 -0
- package/dist/chunk-WDUQUPTE.js +7 -0
- package/dist/chunk-WTKIUAHI.js +7 -0
- package/dist/chunk-YHBJAXUY.js +7 -0
- package/dist/chunk-YSQDPG26.js +27 -0
- package/dist/chunk-YWUIJ6ZQ.js +83 -0
- package/dist/chunk-ZGNK4GWA.js +7 -0
- package/dist/{chunk-XQ3GUEBN.js → chunk-ZQEB3Y3X.js} +8 -9
- package/dist/{chunk-7QUHQYCR.js → chunk-ZWU6DRRZ.js} +1 -1
- package/dist/errorMessage/src/ErrorMessage.css +102 -0
- package/dist/errorMessage/src/ErrorMessage.d.ts +20 -0
- package/dist/errorMessage/src/ErrorMessage.js +9 -0
- package/dist/errorMessage/src/ErrorMessageContext.d.ts +9 -0
- package/dist/errorMessage/src/ErrorMessageContext.js +2 -0
- package/dist/errorMessage/src/index.css +102 -0
- package/dist/errorMessage/src/index.d.ts +6 -0
- package/dist/errorMessage/src/index.js +9 -0
- package/dist/helperMessage/src/HelperMessage.css +94 -0
- package/dist/helperMessage/src/HelperMessage.d.ts +20 -0
- package/dist/helperMessage/src/HelperMessage.js +8 -0
- package/dist/helperMessage/src/HelperMessageContext.d.ts +9 -0
- package/dist/helperMessage/src/HelperMessageContext.js +2 -0
- package/dist/helperMessage/src/index.css +94 -0
- package/dist/helperMessage/src/index.d.ts +6 -0
- package/dist/helperMessage/src/index.js +8 -0
- package/dist/{intl → i18n}/src/index.d.ts +1 -0
- package/dist/i18n/src/index.js +2 -0
- package/dist/i18n/src/useLocalizedString.d.ts +9 -0
- package/dist/i18n/src/useLocalizedString.js +2 -0
- package/dist/layout/src/Flex.js +1 -0
- package/dist/layout/src/Grid.js +1 -1
- package/dist/layout/src/Inline.js +1 -0
- package/dist/layout/src/Stack.js +1 -0
- package/dist/radio/src/Radio.css +293 -0
- package/dist/radio/src/Radio.d.ts +20 -0
- package/dist/radio/src/Radio.js +11 -0
- package/dist/radio/src/RadioContext.d.ts +8 -0
- package/dist/radio/src/RadioContext.js +2 -0
- package/dist/radio/src/RadioField.css +119 -0
- package/dist/radio/src/RadioField.d.ts +26 -0
- package/dist/radio/src/RadioField.js +7 -0
- package/dist/radio/src/RadioFieldContext.d.ts +10 -0
- package/dist/radio/src/RadioFieldContext.js +2 -0
- package/dist/radio/src/RadioGroup.css +570 -0
- package/dist/radio/src/RadioGroup.d.ts +30 -0
- package/dist/radio/src/RadioGroup.js +12 -0
- package/dist/radio/src/RadioGroupContext.d.ts +8 -0
- package/dist/radio/src/RadioGroupContext.js +2 -0
- package/dist/radio/src/RadioList.d.ts +17 -0
- package/dist/radio/src/RadioList.js +3 -0
- package/dist/radio/src/RadioListContext.d.ts +10 -0
- package/dist/radio/src/RadioListContext.js +2 -0
- package/dist/radio/src/index.css +570 -0
- package/dist/radio/src/index.d.ts +13 -0
- package/dist/radio/src/index.js +20 -0
- package/dist/switch/src/Switch.css +236 -0
- package/dist/switch/src/Switch.d.ts +20 -0
- package/dist/switch/src/Switch.js +11 -0
- package/dist/switch/src/SwitchContext.d.ts +8 -0
- package/dist/switch/src/SwitchContext.js +2 -0
- package/dist/switch/src/SwitchField.css +119 -0
- package/dist/switch/src/SwitchField.d.ts +26 -0
- package/dist/switch/src/SwitchField.js +7 -0
- package/dist/switch/src/SwitchFieldContext.d.ts +10 -0
- package/dist/switch/src/SwitchFieldContext.js +2 -0
- package/dist/switch/src/index.css +276 -0
- package/dist/switch/src/index.d.ts +9 -0
- package/dist/switch/src/index.js +13 -0
- package/dist/utils/src/ClearSlots.d.ts +28 -0
- package/dist/utils/src/ClearSlots.js +2 -0
- package/dist/utils/src/SlotProvider.js +1 -0
- package/dist/utils/src/composeClassnameRenderProps.js +2 -0
- package/dist/utils/src/cssModule.js +2 -0
- package/dist/utils/src/index.d.ts +11 -6
- package/dist/utils/src/index.js +8 -4
- package/dist/utils/src/isTextOnlyChildren.js +2 -0
- package/dist/utils/src/{size-adapter.d.ts → sizeAdapter.d.ts} +1 -1
- package/dist/utils/src/sizeAdapter.js +1 -0
- package/dist/utils/src/types.d.ts +17 -5
- package/dist/utils/src/useRenderProps.d.ts +843 -0
- package/dist/utils/src/useRenderProps.js +2 -0
- package/dist/utils/src/useSlot.d.ts +8 -0
- package/dist/utils/src/useSlot.js +2 -0
- package/package.json +32 -27
- package/dist/chunk-GXUPEV64.js +0 -24
- package/dist/chunk-WROQHGG5.js +0 -141
- package/dist/chunk-WRWNRVTG.js +0 -47
- package/dist/intl/src/index.js +0 -1
- package/dist/intl/src/useLocalizedString.d.ts +0 -26
- package/dist/intl/src/useLocalizedString.js +0 -1
- package/dist/utils/src/compose-classname-render-props.js +0 -1
- package/dist/utils/src/css-module.js +0 -1
- package/dist/utils/src/is-text-only-children.js +0 -1
- package/dist/utils/src/size-adapter.js +0 -1
- /package/dist/{chunk-D57ZIX5W.js → chunk-LQICWONC.js} +0 -0
- /package/dist/utils/src/{compose-classname-render-props.d.ts → composeClassnameRenderProps.d.ts} +0 -0
- /package/dist/utils/src/{css-module.d.ts → cssModule.d.ts} +0 -0
- /package/dist/utils/src/{is-text-only-children.d.ts → isTextOnlyChildren.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hopper-ui/components",
|
|
3
3
|
"author": "Workleap",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"description": "The components package.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|
|
@@ -32,43 +32,48 @@
|
|
|
32
32
|
"README.md"
|
|
33
33
|
],
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"
|
|
36
|
-
"react
|
|
37
|
-
"
|
|
35
|
+
"@hopper-ui/styled-system": "^2.0.0",
|
|
36
|
+
"react": "^18",
|
|
37
|
+
"react-aria": "^3.32",
|
|
38
38
|
"react-aria-components": "^1.1.0",
|
|
39
|
-
"react-
|
|
39
|
+
"react-dom": "^18"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"
|
|
43
|
-
"@
|
|
42
|
+
"@react-aria/utils": "^3.24.0",
|
|
43
|
+
"@react-types/shared": "^3.23.0",
|
|
44
|
+
"clsx": "^2.1.1",
|
|
45
|
+
"@hopper-ui/icons": "2.0.0"
|
|
44
46
|
},
|
|
45
47
|
"devDependencies": {
|
|
46
|
-
"@swc/core": "1.3
|
|
47
|
-
"@swc/helpers": "0.5.
|
|
48
|
-
"@swc/jest": "0.2.
|
|
49
|
-
"@testing-library/jest-dom": "6.
|
|
50
|
-
"@testing-library/react": "
|
|
48
|
+
"@swc/core": "1.5.3",
|
|
49
|
+
"@swc/helpers": "0.5.11",
|
|
50
|
+
"@swc/jest": "0.2.36",
|
|
51
|
+
"@testing-library/jest-dom": "6.4.5",
|
|
52
|
+
"@testing-library/react": "15.0.7",
|
|
51
53
|
"@testing-library/user-event": "14.5.2",
|
|
52
|
-
"@types/jest": "29.5.
|
|
53
|
-
"@types/react": "18.
|
|
54
|
-
"@types/react-dom": "18.
|
|
55
|
-
"@types/react-test-renderer": "18.0
|
|
56
|
-
"@workleap/eslint-plugin": "3.
|
|
57
|
-
"@workleap/swc-configs": "2.
|
|
58
|
-
"@workleap/tsup-configs": "3.0.
|
|
54
|
+
"@types/jest": "29.5.12",
|
|
55
|
+
"@types/react": "18.3.1",
|
|
56
|
+
"@types/react-dom": "18.3.0",
|
|
57
|
+
"@types/react-test-renderer": "18.3.0",
|
|
58
|
+
"@workleap/eslint-plugin": "3.2.2",
|
|
59
|
+
"@workleap/swc-configs": "2.2.3",
|
|
60
|
+
"@workleap/tsup-configs": "3.0.6",
|
|
59
61
|
"@workleap/typescript-configs": "3.0.2",
|
|
62
|
+
"eslint": "8.57.0",
|
|
60
63
|
"identity-obj-proxy": "3.0.0",
|
|
61
64
|
"jest": "29.7.0",
|
|
62
65
|
"jest-environment-jsdom": "29.7.0",
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"react
|
|
66
|
-
"react-
|
|
67
|
-
"react-
|
|
66
|
+
"jest-fail-on-console": "3.2.0",
|
|
67
|
+
"jest-fetch-mock": "3.0.3",
|
|
68
|
+
"react": "18.3.1",
|
|
69
|
+
"react-aria": "3.33.0",
|
|
70
|
+
"react-aria-components": "1.2.0",
|
|
71
|
+
"react-dom": "18.3.1",
|
|
72
|
+
"react-test-renderer": "18.3.1",
|
|
68
73
|
"ts-jest": "29.1.2",
|
|
69
|
-
"tsup": "8.0.
|
|
70
|
-
"typescript": "5.
|
|
71
|
-
"@hopper-ui/styled-system": "
|
|
74
|
+
"tsup": "8.0.2",
|
|
75
|
+
"typescript": "5.4.5",
|
|
76
|
+
"@hopper-ui/styled-system": "2.0.0"
|
|
72
77
|
},
|
|
73
78
|
"scripts": {
|
|
74
79
|
"dev": "tsup --config ./tsup.dev.ts",
|
package/dist/chunk-GXUPEV64.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
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 };
|
package/dist/chunk-WROQHGG5.js
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import { isTextOnlyChildren } from './chunk-7QUHQYCR.js';
|
|
2
|
-
import { useLocalizedString } from './chunk-GXUPEV64.js';
|
|
3
|
-
import { _Spinner } from './chunk-QIOYM2XJ.js';
|
|
4
|
-
import { composeClassnameRenderProps } from './chunk-SEU4CGZD.js';
|
|
5
|
-
import { _Text } from './chunk-WRWNRVTG.js';
|
|
6
|
-
import { TextContext } from './chunk-OE5BLFZI.js';
|
|
7
|
-
import { ButtonContext } from './chunk-WMTWFKKP.js';
|
|
8
|
-
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
9
|
-
import { IconListContext } from './chunk-DHVVYSLB.js';
|
|
10
|
-
import { cssModule } from './chunk-6BEVZRUL.js';
|
|
11
|
-
import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
|
|
12
|
-
import { forwardRef } from 'react';
|
|
13
|
-
import { useContextProps, composeRenderProps, Button as Button$1 } from 'react-aria-components';
|
|
14
|
-
import { useId } from 'react-aria';
|
|
15
|
-
import { IconContext } from '@hopper-ui/icons';
|
|
16
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
17
|
-
|
|
18
|
-
// src/buttons/src/Button.module.css
|
|
19
|
-
var Button_default = {};
|
|
20
|
-
var GlobalButtonCssSelector = "hop-Button";
|
|
21
|
-
var DefaultButtonSlot = "button";
|
|
22
|
-
var Button = (props, ref) => {
|
|
23
|
-
[props, ref] = useContextProps({ ...props, slot: props.slot || DefaultButtonSlot }, ref, ButtonContext);
|
|
24
|
-
const { stylingProps, ...ownProps } = useStyledSystem(props);
|
|
25
|
-
const stringFormatter = useLocalizedString();
|
|
26
|
-
const {
|
|
27
|
-
className,
|
|
28
|
-
children: childrenProp,
|
|
29
|
-
size: sizeProp = "md",
|
|
30
|
-
fluid: fluidProp,
|
|
31
|
-
variant = "primary",
|
|
32
|
-
onClick,
|
|
33
|
-
onPress: onPressProp,
|
|
34
|
-
isDisabled,
|
|
35
|
-
isLoading,
|
|
36
|
-
style: styleProp,
|
|
37
|
-
...otherProps
|
|
38
|
-
} = ownProps;
|
|
39
|
-
if (onPressProp && onClick) {
|
|
40
|
-
console.warn("[Hopper] The onClick prop is an alias for onPress and should not be used in conjunction with it. Use one or the other.");
|
|
41
|
-
}
|
|
42
|
-
const onPress = onPressProp != null ? onPressProp : onClick;
|
|
43
|
-
const isInteractionDisabled = isDisabled || isLoading;
|
|
44
|
-
const size = useResponsiveValue(sizeProp);
|
|
45
|
-
const fluid = useResponsiveValue(fluidProp);
|
|
46
|
-
const classNames = composeClassnameRenderProps(
|
|
47
|
-
className,
|
|
48
|
-
GlobalButtonCssSelector,
|
|
49
|
-
cssModule(
|
|
50
|
-
Button_default,
|
|
51
|
-
"hop-button",
|
|
52
|
-
variant,
|
|
53
|
-
size,
|
|
54
|
-
fluid && "fluid",
|
|
55
|
-
isLoading && "loading"
|
|
56
|
-
),
|
|
57
|
-
stylingProps.className
|
|
58
|
-
);
|
|
59
|
-
const children = composeRenderProps(childrenProp, (prev) => {
|
|
60
|
-
if (isTextOnlyChildren(prev)) {
|
|
61
|
-
return /* @__PURE__ */ jsx(_Text, { children: prev });
|
|
62
|
-
}
|
|
63
|
-
return prev;
|
|
64
|
-
});
|
|
65
|
-
const style = composeRenderProps(styleProp, (prev) => {
|
|
66
|
-
return {
|
|
67
|
-
...stylingProps.style,
|
|
68
|
-
...prev
|
|
69
|
-
};
|
|
70
|
-
});
|
|
71
|
-
const spinnerId = useId();
|
|
72
|
-
const hasAriaLabel = !!props["aria-label"] || !!props["aria-labelledby"];
|
|
73
|
-
const isLoadingAriaLiveLabel = `${hasAriaLabel ? props["aria-label"] : ""} ${stringFormatter.format("button.pending")}`.trim();
|
|
74
|
-
return /* @__PURE__ */ jsx(
|
|
75
|
-
SlotProvider,
|
|
76
|
-
{
|
|
77
|
-
values: [
|
|
78
|
-
[IconListContext, {
|
|
79
|
-
slots: {
|
|
80
|
-
icon: {
|
|
81
|
-
className: Button_default["hop-button__icon-list"]
|
|
82
|
-
},
|
|
83
|
-
"end-icon": {
|
|
84
|
-
className: Button_default["hop-button__end-icon-list"]
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}],
|
|
88
|
-
[IconContext, {
|
|
89
|
-
slots: {
|
|
90
|
-
icon: {
|
|
91
|
-
className: Button_default["hop-button__icon"],
|
|
92
|
-
size: "md"
|
|
93
|
-
},
|
|
94
|
-
"end-icon": {
|
|
95
|
-
className: Button_default["hop-button__end-icon"],
|
|
96
|
-
size: "md"
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}],
|
|
100
|
-
[TextContext, {
|
|
101
|
-
slots: {
|
|
102
|
-
text: {
|
|
103
|
-
className: Button_default["hop-button__text"],
|
|
104
|
-
size
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}]
|
|
108
|
-
],
|
|
109
|
-
children: /* @__PURE__ */ jsx(
|
|
110
|
-
Button$1,
|
|
111
|
-
{
|
|
112
|
-
ref,
|
|
113
|
-
className: classNames,
|
|
114
|
-
style,
|
|
115
|
-
"data-loading": isLoading,
|
|
116
|
-
onPress,
|
|
117
|
-
isDisabled: isInteractionDisabled,
|
|
118
|
-
...otherProps,
|
|
119
|
-
children: (buttonProps) => {
|
|
120
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
121
|
-
children(buttonProps),
|
|
122
|
-
isLoading && /* @__PURE__ */ jsx(
|
|
123
|
-
_Spinner,
|
|
124
|
-
{
|
|
125
|
-
id: spinnerId,
|
|
126
|
-
size: "lg",
|
|
127
|
-
"aria-label": isLoadingAriaLiveLabel,
|
|
128
|
-
className: Button_default["hop-button__Spinner"]
|
|
129
|
-
}
|
|
130
|
-
)
|
|
131
|
-
] });
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
)
|
|
135
|
-
}
|
|
136
|
-
);
|
|
137
|
-
};
|
|
138
|
-
var _Button = forwardRef(Button);
|
|
139
|
-
_Button.displayName = "Button";
|
|
140
|
-
|
|
141
|
-
export { GlobalButtonCssSelector, _Button };
|
package/dist/chunk-WRWNRVTG.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { TextContext } from './chunk-OE5BLFZI.js';
|
|
2
|
-
import { cssModule } from './chunk-6BEVZRUL.js';
|
|
3
|
-
import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
|
|
4
|
-
import { forwardRef } from 'react';
|
|
5
|
-
import { useContextProps, Text as Text$1 } from 'react-aria-components';
|
|
6
|
-
import clsx from 'clsx';
|
|
7
|
-
import { jsx } from 'react/jsx-runtime';
|
|
8
|
-
|
|
9
|
-
// src/Text/src/Text.module.css
|
|
10
|
-
var Text_default = {};
|
|
11
|
-
var GlobalTextCssSelector = "hop-Text";
|
|
12
|
-
var DefaultTextSlot = "text";
|
|
13
|
-
function Text(props, ref) {
|
|
14
|
-
[props, ref] = useContextProps({ ...props, slot: props.slot || DefaultTextSlot }, ref, TextContext);
|
|
15
|
-
const { stylingProps, ...ownProps } = useStyledSystem(props);
|
|
16
|
-
const { className, size: sizeProp, children, style, ...otherProps } = ownProps;
|
|
17
|
-
const size = useResponsiveValue(sizeProp != null ? sizeProp : "md");
|
|
18
|
-
const classNames = clsx(
|
|
19
|
-
GlobalTextCssSelector,
|
|
20
|
-
cssModule(
|
|
21
|
-
Text_default,
|
|
22
|
-
"hop-text",
|
|
23
|
-
size
|
|
24
|
-
),
|
|
25
|
-
stylingProps.className,
|
|
26
|
-
className
|
|
27
|
-
);
|
|
28
|
-
const mergedStyles = {
|
|
29
|
-
...stylingProps.style,
|
|
30
|
-
...style
|
|
31
|
-
};
|
|
32
|
-
return /* @__PURE__ */ jsx(
|
|
33
|
-
Text$1,
|
|
34
|
-
{
|
|
35
|
-
...otherProps,
|
|
36
|
-
ref,
|
|
37
|
-
elementType: "span",
|
|
38
|
-
className: classNames,
|
|
39
|
-
style: mergedStyles,
|
|
40
|
-
children
|
|
41
|
-
}
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
var _Text = forwardRef(Text);
|
|
45
|
-
_Text.displayName = "Text";
|
|
46
|
-
|
|
47
|
-
export { GlobalTextCssSelector, _Text };
|
package/dist/intl/src/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { useLocalizedString } from '../../chunk-GXUPEV64.js';
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
declare const Resources: {
|
|
2
|
-
"en-US": {
|
|
3
|
-
"button.pending": string;
|
|
4
|
-
};
|
|
5
|
-
"fr-CA": {
|
|
6
|
-
"button.pending": string;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
declare function useLocalizedString(): LocalizedStringFormatter;
|
|
10
|
-
/**
|
|
11
|
-
* LocalizedStringFormatter is not exported from react-aria, so we have to define it here.
|
|
12
|
-
* Without this, the build will fail with the following error:
|
|
13
|
-
* packages/components build:
|
|
14
|
-
* src/intl/src/useLocalizedString.tsx(11,17): error TS2742:
|
|
15
|
-
* The inferred type of 'useLocalizedString' cannot be named without a reference to
|
|
16
|
-
* .pnpm/@internationalized+string@3.2.1/node_modules/@internationalized/string'.
|
|
17
|
-
* This is likely not portable. A type annotation is necessary.
|
|
18
|
-
*
|
|
19
|
-
* I proposed a PR to export LocalizedStringFormatter from react-aria.
|
|
20
|
-
* https://github.com/adobe/react-spectrum/pull/6014
|
|
21
|
-
*/
|
|
22
|
-
interface LocalizedStringFormatter {
|
|
23
|
-
format: (key: keyof typeof Resources[keyof typeof Resources], variables?: Record<string, string | number | boolean>) => string;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export { useLocalizedString };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { useLocalizedString } from '../../chunk-GXUPEV64.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { composeClassnameRenderProps } from '../../chunk-SEU4CGZD.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { cssModule } from '../../chunk-6BEVZRUL.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { isTextOnlyChildren } from '../../chunk-7QUHQYCR.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '../../chunk-D57ZIX5W.js';
|
|
File without changes
|
/package/dist/utils/src/{compose-classname-render-props.d.ts → composeClassnameRenderProps.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|