@hopper-ui/components 1.0.4 → 1.0.6
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 +13 -0
- package/README.md +3 -0
- package/dist/Avatar/src/AnonymousAvatar.css +69 -0
- package/dist/Avatar/src/AnonymousAvatar.d.ts +29 -0
- package/dist/Avatar/src/AnonymousAvatar.js +7 -0
- package/dist/Avatar/src/Avatar.css +265 -0
- package/dist/Avatar/src/Avatar.d.ts +60 -0
- package/dist/Avatar/src/Avatar.js +11 -0
- package/dist/Avatar/src/AvatarContext.d.ts +12 -0
- package/dist/Avatar/src/AvatarContext.js +2 -0
- package/dist/Avatar/src/DeletedAvatar.css +69 -0
- package/dist/Avatar/src/DeletedAvatar.d.ts +29 -0
- package/dist/Avatar/src/DeletedAvatar.js +7 -0
- package/dist/Avatar/src/RichIconAvatarImage.css +69 -0
- package/dist/Avatar/src/RichIconAvatarImage.d.ts +32 -0
- package/dist/Avatar/src/RichIconAvatarImage.js +5 -0
- package/dist/Avatar/src/RichIconAvatarImageContext.d.ts +14 -0
- package/dist/Avatar/src/RichIconAvatarImageContext.js +2 -0
- package/dist/Avatar/src/index.css +265 -0
- package/dist/Avatar/src/index.d.ts +14 -0
- package/dist/Avatar/src/index.js +13 -0
- package/dist/Avatar/src/useImageFallback.d.ts +34 -0
- package/dist/Avatar/src/useImageFallback.js +2 -0
- package/dist/{badge → Badge}/src/Badge.css +11 -11
- package/dist/{badge → Badge}/src/Badge.d.ts +1 -1
- package/dist/{badge → Badge}/src/Badge.js +4 -3
- package/dist/Badge/src/BadgeContext.js +2 -0
- package/dist/{badge → Badge}/src/index.css +11 -11
- package/dist/{badge → Badge}/src/index.js +4 -3
- package/dist/{chip → Chip}/src/Chip.css +34 -34
- package/dist/{chip → Chip}/src/Chip.js +6 -6
- package/dist/Chip/src/ChipContext.js +2 -0
- package/dist/{chip → Chip}/src/index.css +34 -34
- package/dist/{chip → Chip}/src/index.js +6 -6
- package/dist/Divider/src/Divider.css +32 -0
- package/dist/Divider/src/Divider.d.ts +15 -0
- package/dist/Divider/src/Divider.js +4 -0
- package/dist/Divider/src/DividerContext.d.ts +8 -0
- package/dist/Divider/src/DividerContext.js +2 -0
- package/dist/Divider/src/index.css +32 -0
- package/dist/Divider/src/index.d.ts +5 -0
- package/dist/Divider/src/index.js +4 -0
- package/dist/{errorMessage → ErrorMessage}/src/ErrorMessage.css +12 -12
- package/dist/{errorMessage → ErrorMessage}/src/ErrorMessage.js +5 -5
- package/dist/ErrorMessage/src/ErrorMessageContext.js +2 -0
- package/dist/{errorMessage → ErrorMessage}/src/index.css +12 -12
- package/dist/{errorMessage → ErrorMessage}/src/index.js +5 -5
- package/dist/Header/src/Header.d.ts +17 -0
- package/dist/Header/src/Header.js +3 -0
- package/dist/Header/src/HeaderContext.d.ts +10 -0
- package/dist/Header/src/HeaderContext.js +2 -0
- package/dist/Header/src/index.d.ts +7 -0
- package/dist/Header/src/index.js +3 -0
- package/dist/{helperMessage → HelperMessage}/src/HelperMessage.css +12 -12
- package/dist/{helperMessage → HelperMessage}/src/HelperMessage.js +5 -5
- package/dist/HelperMessage/src/HelperMessageContext.js +2 -0
- package/dist/{helperMessage → HelperMessage}/src/index.css +12 -12
- package/dist/{helperMessage → HelperMessage}/src/index.js +5 -5
- package/dist/HopperProvider/src/HopperProvider.d.ts +1 -1
- package/dist/HopperProvider/src/HopperProvider.js +1 -1
- package/dist/HopperProvider/src/index.js +1 -1
- package/dist/IconList/src/IconList.css +1 -1
- package/dist/IconList/src/IconList.js +2 -2
- package/dist/IconList/src/index.css +1 -1
- package/dist/IconList/src/index.js +2 -2
- package/dist/Link/src/Link.css +31 -31
- package/dist/Link/src/Link.js +7 -7
- package/dist/Link/src/index.css +31 -31
- package/dist/Link/src/index.js +7 -7
- package/dist/ListBox/src/ListBox.css +1434 -0
- package/dist/ListBox/src/ListBox.d.ts +48 -0
- package/dist/ListBox/src/ListBox.js +34 -0
- package/dist/ListBox/src/ListBoxContext.d.ts +10 -0
- package/dist/ListBox/src/ListBoxContext.js +2 -0
- package/dist/ListBox/src/ListBoxItem.css +1297 -0
- package/dist/ListBox/src/ListBoxItem.d.ts +39 -0
- package/dist/ListBox/src/ListBoxItem.js +27 -0
- package/dist/ListBox/src/ListBoxItemContext.d.ts +9 -0
- package/dist/ListBox/src/ListBoxItemContext.js +2 -0
- package/dist/ListBox/src/ListBoxItemSkeleton.css +56 -0
- package/dist/ListBox/src/ListBoxItemSkeleton.d.ts +23 -0
- package/dist/ListBox/src/ListBoxItemSkeleton.js +4 -0
- package/dist/ListBox/src/ListBoxItemSkeletonContext.d.ts +10 -0
- package/dist/ListBox/src/ListBoxItemSkeletonContext.js +2 -0
- package/dist/ListBox/src/index.css +1434 -0
- package/dist/ListBox/src/index.d.ts +8 -0
- package/dist/ListBox/src/index.js +34 -0
- package/dist/ListBox/src/useLoadOnScroll.d.ts +16 -0
- package/dist/ListBox/src/useLoadOnScroll.js +2 -0
- package/dist/Section/src/Section.d.ts +19 -0
- package/dist/Section/src/Section.js +3 -0
- package/dist/Section/src/SectionContext.d.ts +9 -0
- package/dist/Section/src/SectionContext.js +2 -0
- package/dist/Section/src/index.d.ts +6 -0
- package/dist/Section/src/index.js +3 -0
- package/dist/Spinner/src/Spinner.css +19 -19
- package/dist/Spinner/src/Spinner.js +3 -3
- package/dist/Spinner/src/index.css +19 -19
- package/dist/Spinner/src/index.js +3 -3
- package/dist/buttons/src/Button.css +103 -103
- package/dist/buttons/src/Button.d.ts +2 -2
- package/dist/buttons/src/Button.js +12 -12
- package/dist/buttons/src/ButtonGroup.css +11 -11
- package/dist/buttons/src/ButtonGroup.js +3 -3
- package/dist/buttons/src/ClearButton.css +12 -12
- package/dist/buttons/src/ClearButton.js +4 -4
- package/dist/buttons/src/EmbeddedButton.css +12 -12
- package/dist/buttons/src/EmbeddedButton.js +2 -2
- package/dist/buttons/src/index.css +126 -126
- package/dist/buttons/src/index.js +16 -16
- package/dist/checkbox/src/Checkbox.css +81 -96
- package/dist/checkbox/src/Checkbox.d.ts +3 -1
- package/dist/checkbox/src/Checkbox.js +6 -6
- package/dist/checkbox/src/CheckboxContext.d.ts +2 -0
- package/dist/checkbox/src/CheckboxField.css +15 -15
- package/dist/checkbox/src/CheckboxField.js +2 -2
- package/dist/checkbox/src/CheckboxGroup.css +118 -133
- package/dist/checkbox/src/CheckboxGroup.js +4 -4
- package/dist/checkbox/src/index.css +118 -133
- package/dist/checkbox/src/index.js +10 -10
- package/dist/{chunk-BGESEKEN.js → chunk-2XUHTPCX.js} +13 -7
- package/dist/{chunk-FGDSWA7S.js → chunk-37NW34QM.js} +5 -5
- package/dist/{chunk-F7HR3VI4.js → chunk-3A6TTZAA.js} +2 -2
- package/dist/{chunk-LSVXKVG4.js → chunk-3LH2JHUO.js} +4 -4
- package/dist/{chunk-ZAJJD5FY.js → chunk-4JAV3FIH.js} +6 -6
- package/dist/chunk-4TXFHYHL.js +52 -0
- package/dist/{chunk-OMBQ3J4O.js → chunk-53FHDOG7.js} +13 -7
- package/dist/chunk-5H5AZJPQ.js +7 -0
- package/dist/{chunk-WTKIUAHI.js → chunk-632B5YBQ.js} +1 -1
- package/dist/{chunk-XSASR6CK.js → chunk-6QMIRVLY.js} +2 -2
- package/dist/chunk-7JOGKC3W.js +7 -0
- package/dist/chunk-AES7QBQE.js +7 -0
- package/dist/chunk-BC5A7RHI.js +1260 -0
- package/dist/{chunk-HDYG2F3D.js → chunk-BKC74M6Y.js} +3 -3
- package/dist/{chunk-ZSFJVMJN.js → chunk-CQDLZ42T.js} +1 -1
- package/dist/chunk-E4ALW4MZ.js +250 -0
- package/dist/chunk-E4WFKXW4.js +161 -0
- package/dist/{chunk-PEPKE5SW.js → chunk-F2URSFJA.js} +5 -5
- package/dist/{chunk-ACVMW6YD.js → chunk-FAE27DLF.js} +1 -1
- package/dist/chunk-FYIHMKHI.js +7 -0
- package/dist/{chunk-Y7XWWUMU.js → chunk-G242LPQE.js} +2 -2
- package/dist/chunk-GFHBDUJD.js +17 -0
- package/dist/{chunk-2CKDJG6R.js → chunk-HR25MLRP.js} +1 -1
- package/dist/{chunk-ESVVLTEN.js → chunk-HZKFQ33E.js} +1 -1
- package/dist/chunk-I4VPBQI7.js +7 -0
- package/dist/chunk-ITQK6JTD.js +81 -0
- package/dist/chunk-J33IFG4U.js +46 -0
- package/dist/chunk-J53HGLCT.js +49 -0
- package/dist/{chunk-PDYU6DNF.js → chunk-JRDN364E.js} +5 -5
- package/dist/chunk-JTNMFPM4.js +41 -0
- package/dist/chunk-JUMJ6A3K.js +46 -0
- package/dist/chunk-JWW56J7M.js +7 -0
- package/dist/{chunk-BCHUEONM.js → chunk-K4ZGI7DJ.js} +1 -1
- package/dist/chunk-L5A2UTQV.js +43 -0
- package/dist/{chunk-6MSYEF4W.js → chunk-MED2BIDV.js} +2 -2
- package/dist/{chunk-QJBQRYJS.js → chunk-MVRI6GLQ.js} +3 -3
- package/dist/{chunk-Z3ID4UEE.js → chunk-N77LTZ4U.js} +3 -15
- package/dist/{chunk-ANVMQBBG.js → chunk-NMKBUGSO.js} +12 -1
- package/dist/chunk-NS3XVOQ7.js +53 -0
- package/dist/chunk-O5PTD6IN.js +41 -0
- package/dist/{chunk-5GRWAXTT.js → chunk-OHB5QR5P.js} +2 -2
- package/dist/chunk-OKZYR4RF.js +7 -0
- package/dist/{chunk-GBABMUAI.js → chunk-P5CWOV3L.js} +3 -3
- package/dist/{chunk-RCFB4SN4.js → chunk-QBCCF2C2.js} +6 -6
- package/dist/chunk-RA7PM75O.js +142 -0
- package/dist/{chunk-TSXPLL55.js → chunk-RCX5B3S3.js} +4 -4
- package/dist/{chunk-WGDP4ECF.js → chunk-RG4JKE4N.js} +3 -3
- package/dist/{chunk-LRXYIR2A.js → chunk-SOSHKMNI.js} +6 -5
- package/dist/chunk-UIEP5BA5.js +7 -0
- package/dist/{chunk-DZTMUFVC.js → chunk-V5GOY6TV.js} +2 -2
- package/dist/{chunk-Y3L6TPP3.js → chunk-XGKPMLYD.js} +8 -8
- package/dist/{chunk-N745TDH5.js → chunk-XRC7XE6B.js} +2 -2
- package/dist/chunk-Y2POLIXK.js +7 -0
- package/dist/{chunk-H6CDFWVR.js → chunk-ZOTVZM6F.js} +6 -2
- package/dist/i18n/src/index.js +1 -1
- package/dist/i18n/src/useLocalizedString.js +1 -1
- package/dist/inputs/src/InputGroup.css +12 -12
- package/dist/inputs/src/InputGroup.js +2 -2
- package/dist/inputs/src/PasswordField.css +1340 -570
- package/dist/inputs/src/PasswordField.js +80 -164
- package/dist/inputs/src/SearchField.css +1325 -576
- package/dist/inputs/src/SearchField.d.ts +2 -2
- package/dist/inputs/src/SearchField.js +80 -164
- package/dist/inputs/src/TextField.css +1337 -571
- package/dist/inputs/src/TextField.js +79 -56
- package/dist/inputs/src/index.css +1237 -471
- package/dist/inputs/src/index.d.ts +4 -0
- package/dist/inputs/src/index.js +79 -56
- package/dist/layout/src/Grid.d.ts +2 -22
- package/dist/layout/src/Grid.js +1 -1
- package/dist/layout/src/grid-helpers.d.ts +24 -0
- package/dist/layout/src/grid-helpers.js +2 -0
- package/dist/overlays/Popover/src/Popover.css +1480 -639
- package/dist/overlays/Popover/src/Popover.d.ts +5 -6
- package/dist/overlays/Popover/src/Popover.js +80 -54
- package/dist/overlays/Popover/src/PopoverContext.d.ts +1 -2
- package/dist/overlays/Popover/src/PopoverTrigger.d.ts +8 -0
- package/dist/overlays/Popover/src/PopoverTrigger.js +2 -0
- package/dist/overlays/Popover/src/index.css +1480 -639
- package/dist/overlays/Popover/src/index.d.ts +3 -2
- package/dist/overlays/Popover/src/index.js +80 -54
- package/dist/radio/src/Radio.css +69 -81
- package/dist/radio/src/Radio.d.ts +3 -1
- package/dist/radio/src/Radio.js +6 -6
- package/dist/radio/src/RadioContext.d.ts +2 -0
- package/dist/radio/src/RadioField.css +15 -15
- package/dist/radio/src/RadioField.js +4 -4
- package/dist/radio/src/RadioGroup.css +106 -118
- package/dist/radio/src/RadioGroup.js +5 -5
- package/dist/radio/src/index.css +106 -118
- package/dist/radio/src/index.js +11 -11
- package/dist/switch/src/Switch.css +27 -28
- package/dist/switch/src/Switch.js +6 -6
- package/dist/switch/src/SwitchField.css +15 -15
- package/dist/switch/src/SwitchField.js +2 -2
- package/dist/switch/src/index.css +33 -34
- package/dist/switch/src/index.js +7 -7
- package/dist/tag/src/Tag.css +1550 -633
- package/dist/tag/src/Tag.js +80 -52
- package/dist/tag/src/TagGroup.css +30 -30
- package/dist/tag/src/TagGroup.js +5 -5
- package/dist/tag/src/index.css +1550 -633
- package/dist/tag/src/index.js +80 -52
- package/dist/typography/Heading/src/Heading.css +1439 -522
- package/dist/typography/Heading/src/Heading.js +80 -52
- package/dist/typography/Heading/src/index.css +1439 -522
- package/dist/typography/Heading/src/index.js +80 -52
- package/dist/typography/Label/src/Label.css +9 -9
- package/dist/typography/Label/src/Label.js +1 -1
- package/dist/typography/Label/src/index.css +9 -9
- package/dist/typography/Label/src/index.js +1 -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 +3 -3
- package/dist/typography/Text/src/index.css +9 -9
- package/dist/typography/Text/src/index.js +3 -3
- package/dist/utils/src/index.d.ts +1 -1
- package/dist/utils/src/index.js +3 -3
- package/dist/utils/src/types.d.ts +16 -1
- package/package.json +5 -4
- package/dist/badge/src/BadgeContext.js +0 -2
- package/dist/chip/src/ChipContext.js +0 -2
- package/dist/chunk-CPWTHZGJ.js +0 -156
- package/dist/chunk-LJXTJRSB.js +0 -1
- package/dist/chunk-SWMFTL46.js +0 -373
- package/dist/chunk-TR7YX3IZ.js +0 -96
- package/dist/errorMessage/src/ErrorMessageContext.js +0 -2
- package/dist/helperMessage/src/HelperMessageContext.js +0 -2
- /package/dist/{badge → Badge}/src/BadgeContext.d.ts +0 -0
- /package/dist/{badge → Badge}/src/index.d.ts +0 -0
- /package/dist/{chip → Chip}/src/Chip.d.ts +0 -0
- /package/dist/{chip → Chip}/src/ChipContext.d.ts +0 -0
- /package/dist/{chip → Chip}/src/index.d.ts +0 -0
- /package/dist/{errorMessage → ErrorMessage}/src/ErrorMessage.d.ts +0 -0
- /package/dist/{errorMessage → ErrorMessage}/src/ErrorMessageContext.d.ts +0 -0
- /package/dist/{errorMessage → ErrorMessage}/src/index.d.ts +0 -0
- /package/dist/{helperMessage → HelperMessage}/src/HelperMessage.d.ts +0 -0
- /package/dist/{helperMessage → HelperMessage}/src/HelperMessageContext.d.ts +0 -0
- /package/dist/{helperMessage → HelperMessage}/src/index.d.ts +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ButtonGroupContext } from './chunk-VJQ7M2BK.js';
|
|
2
1
|
import { ButtonContext } from './chunk-WMTWFKKP.js';
|
|
3
|
-
import {
|
|
2
|
+
import { ButtonGroupContext } from './chunk-VJQ7M2BK.js';
|
|
4
3
|
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
4
|
+
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
5
5
|
import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
|
|
6
6
|
import { filterDOMProps } from '@react-aria/utils';
|
|
7
7
|
import clsx from 'clsx';
|
|
@@ -10,7 +10,7 @@ import { useContextProps } from 'react-aria-components';
|
|
|
10
10
|
import { jsx } from 'react/jsx-runtime';
|
|
11
11
|
|
|
12
12
|
// css-module:./ButtonGroup.module.css#css-module
|
|
13
|
-
var ButtonGroup_module_default = { "hop-ButtonGroup": "ButtonGroup-module__hop-
|
|
13
|
+
var ButtonGroup_module_default = { "hop-ButtonGroup": "ButtonGroup-module__hop-ButtonGroup___WMOza", "hop-ButtonGroup--horizontal": "ButtonGroup-module__hop-ButtonGroup--horizontal___Ifbuz", "hop-ButtonGroup--vertical": "ButtonGroup-module__hop-ButtonGroup--vertical___FV4jP", "hop-ButtonGroup--start": "ButtonGroup-module__hop-ButtonGroup--start___SCa6l", "hop-ButtonGroup--center": "ButtonGroup-module__hop-ButtonGroup--center___09ey-", "hop-ButtonGroup--end": "ButtonGroup-module__hop-ButtonGroup--end___SudBa", "hop-ButtonGroup--wrap": "ButtonGroup-module__hop-ButtonGroup--wrap___O3fzZ", "hop-ButtonGroup--fluid": "ButtonGroup-module__hop-ButtonGroup--fluid___70I5p" };
|
|
14
14
|
var GlobalButtonGroupCssSelector = "hop-ButtonGroup";
|
|
15
15
|
function ButtonGroup(props, ref) {
|
|
16
16
|
var _a, _b, _c, _d, _e;
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import { _RadioGroup } from './chunk-JRDN364E.js';
|
|
2
|
+
import { _RadioList } from './chunk-NKHMUPAP.js';
|
|
3
|
+
import { _Radio } from './chunk-2XUHTPCX.js';
|
|
4
|
+
import { _Checkbox } from './chunk-53FHDOG7.js';
|
|
5
|
+
import { useLocalizedString } from './chunk-ZOTVZM6F.js';
|
|
6
|
+
import { ListBoxItemContext } from './chunk-Y2POLIXK.js';
|
|
7
|
+
import { _ListBoxItemSkeleton } from './chunk-4TXFHYHL.js';
|
|
8
|
+
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
9
|
+
import { BadgeContext } from './chunk-CQDLZ42T.js';
|
|
10
|
+
import { isTextOnlyChildren } from './chunk-ZWU6DRRZ.js';
|
|
11
|
+
import { IconListContext } from './chunk-DHVVYSLB.js';
|
|
12
|
+
import { _Text } from './chunk-RG4JKE4N.js';
|
|
13
|
+
import { TextContext } from './chunk-X6SER3TZ.js';
|
|
14
|
+
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
15
|
+
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
16
|
+
import { CheckmarkIcon, IconContext } from '@hopper-ui/icons';
|
|
17
|
+
import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
|
|
18
|
+
import { forwardRef, useContext, useState } from 'react';
|
|
19
|
+
import { useContextProps, composeRenderProps, ListBoxItem as ListBoxItem$1, ListStateContext, DEFAULT_SLOT } from 'react-aria-components';
|
|
20
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
21
|
+
|
|
22
|
+
// css-module:./ListBoxItem.module.css#css-module
|
|
23
|
+
var ListBoxItem_module_default = { "hop-ListBoxItem": "ListBoxItem-module__hop-ListBoxItem___Yx1lW", "hop-ListBoxItem--xs": "ListBoxItem-module__hop-ListBoxItem--xs___-dXrA", "hop-ListBoxItem--sm": "ListBoxItem-module__hop-ListBoxItem--sm___PJua2", "hop-ListBoxItem--md": "ListBoxItem-module__hop-ListBoxItem--md___tUXMc", "hop-ListBoxItem--lg": "ListBoxItem-module__hop-ListBoxItem--lg___eGqO4", "hop-ListBoxItem__inner": "ListBoxItem-module__hop-ListBoxItem__inner___QR5j1", "hop-ListBoxItem__checkmark": "ListBoxItem-module__hop-ListBoxItem__checkmark___Ei8-S", "hop-ListBoxItem__description": "ListBoxItem-module__hop-ListBoxItem__description___grvX-", "hop-ListBoxItem__radio-group": "ListBoxItem-module__hop-ListBoxItem__radio-group___7RjtE", "hop-ListBoxItem__checkbox": "ListBoxItem-module__hop-ListBoxItem__checkbox___jfL9v", "hop-ListBoxItem__avatar": "ListBoxItem-module__hop-ListBoxItem__avatar___q2xtk", "hop-ListBoxItem__icon-list": "ListBoxItem-module__hop-ListBoxItem__icon-list___FHexQ", "hop-ListBoxItem__icon": "ListBoxItem-module__hop-ListBoxItem__icon___0KEwI", "hop-ListBoxItem__label": "ListBoxItem-module__hop-ListBoxItem__label___-q2Uo", "hop-ListBoxItem__end-icon-list": "ListBoxItem-module__hop-ListBoxItem__end-icon-list___h93Wc", "hop-ListBoxItem__end-icon": "ListBoxItem-module__hop-ListBoxItem__end-icon___bzOPv", "hop-ListBoxItem__badge": "ListBoxItem-module__hop-ListBoxItem__badge___AONN3" };
|
|
24
|
+
var GlobalListBoxItemCssSelector = "hop-ListBoxItem";
|
|
25
|
+
var ListBoxItemToIconSizeAdapter = {
|
|
26
|
+
xs: "sm",
|
|
27
|
+
sm: "sm",
|
|
28
|
+
md: "md",
|
|
29
|
+
lg: "md"
|
|
30
|
+
};
|
|
31
|
+
var ListBoxItemToTextSizeAdapter = {
|
|
32
|
+
xs: "sm",
|
|
33
|
+
sm: "sm",
|
|
34
|
+
md: "sm",
|
|
35
|
+
lg: "md"
|
|
36
|
+
};
|
|
37
|
+
function ListBoxItemInner(props) {
|
|
38
|
+
const stringFormatter = useLocalizedString();
|
|
39
|
+
const listStateContext = useContext(ListStateContext);
|
|
40
|
+
const {
|
|
41
|
+
selectionMode,
|
|
42
|
+
isDisabled,
|
|
43
|
+
isFocusVisible,
|
|
44
|
+
isPressed,
|
|
45
|
+
isHovered,
|
|
46
|
+
isSelected,
|
|
47
|
+
selectionIndicator,
|
|
48
|
+
isInvalid,
|
|
49
|
+
size,
|
|
50
|
+
children
|
|
51
|
+
} = props;
|
|
52
|
+
const isRadio = selectionIndicator === "input" && selectionMode === "single";
|
|
53
|
+
const isCheckbox = selectionIndicator === "input" && selectionMode === "multiple";
|
|
54
|
+
const isCheck = selectionIndicator === "check" && selectionMode !== "none";
|
|
55
|
+
const isListHasSelection = listStateContext.selectionManager.selectedKeys.size > 0;
|
|
56
|
+
const [isListHasSelectionEnd, setIsListHasSelectionEnd] = useState(isListHasSelection);
|
|
57
|
+
const handleTransitionEnd = (event) => {
|
|
58
|
+
if (event.propertyName === "grid-template-columns") {
|
|
59
|
+
setIsListHasSelectionEnd((prev) => isListHasSelection && !prev);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
return /* @__PURE__ */ jsxs(
|
|
63
|
+
"div",
|
|
64
|
+
{
|
|
65
|
+
className: ListBoxItem_module_default["hop-ListBoxItem__inner"],
|
|
66
|
+
"data-list-has-selection": isListHasSelection || void 0,
|
|
67
|
+
"data-list-has-selection-end": isListHasSelectionEnd || void 0,
|
|
68
|
+
onTransitionEnd: handleTransitionEnd,
|
|
69
|
+
children: [
|
|
70
|
+
isRadio && /* @__PURE__ */ jsx(
|
|
71
|
+
_RadioGroup,
|
|
72
|
+
{
|
|
73
|
+
size: "sm",
|
|
74
|
+
"aria-hidden": "true",
|
|
75
|
+
"aria-label": stringFormatter.format("ListBoxItem.indicatorAriaLabel"),
|
|
76
|
+
value: isSelected ? "radio" : null,
|
|
77
|
+
className: ListBoxItem_module_default["hop-ListBoxItem__radio-group"],
|
|
78
|
+
isInvalid,
|
|
79
|
+
children: /* @__PURE__ */ jsx(_RadioList, { children: /* @__PURE__ */ jsx(
|
|
80
|
+
_Radio,
|
|
81
|
+
{
|
|
82
|
+
className: ListBoxItem_module_default["hop-ListBoxItem__radio"],
|
|
83
|
+
value: "radio",
|
|
84
|
+
isDisabled,
|
|
85
|
+
isFocused: isFocusVisible,
|
|
86
|
+
isHovered,
|
|
87
|
+
isPressed
|
|
88
|
+
}
|
|
89
|
+
) })
|
|
90
|
+
}
|
|
91
|
+
),
|
|
92
|
+
isCheckbox && /* @__PURE__ */ jsx(
|
|
93
|
+
_Checkbox,
|
|
94
|
+
{
|
|
95
|
+
size: "sm",
|
|
96
|
+
value: "checkbox",
|
|
97
|
+
"aria-hidden": "true",
|
|
98
|
+
className: ListBoxItem_module_default["hop-ListBoxItem__checkbox"],
|
|
99
|
+
isDisabled,
|
|
100
|
+
isFocused: isFocusVisible,
|
|
101
|
+
isHovered,
|
|
102
|
+
isPressed,
|
|
103
|
+
isSelected,
|
|
104
|
+
isInvalid
|
|
105
|
+
}
|
|
106
|
+
),
|
|
107
|
+
isCheck && /* @__PURE__ */ jsx(CheckmarkIcon, { className: ListBoxItem_module_default["hop-ListBoxItem__checkmark"], size: "sm" }),
|
|
108
|
+
/* @__PURE__ */ jsx(
|
|
109
|
+
SlotProvider,
|
|
110
|
+
{
|
|
111
|
+
values: [
|
|
112
|
+
[TextContext, {
|
|
113
|
+
slots: {
|
|
114
|
+
[DEFAULT_SLOT]: {
|
|
115
|
+
slot: "label",
|
|
116
|
+
className: ListBoxItem_module_default["hop-ListBoxItem__label"],
|
|
117
|
+
size: ListBoxItemToTextSizeAdapter[size]
|
|
118
|
+
},
|
|
119
|
+
label: {
|
|
120
|
+
className: ListBoxItem_module_default["hop-ListBoxItem__label"],
|
|
121
|
+
size: ListBoxItemToTextSizeAdapter[size]
|
|
122
|
+
},
|
|
123
|
+
description: {
|
|
124
|
+
className: ListBoxItem_module_default["hop-ListBoxItem__description"],
|
|
125
|
+
size: "xs"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}],
|
|
129
|
+
[IconListContext, {
|
|
130
|
+
slots: {
|
|
131
|
+
[DEFAULT_SLOT]: {
|
|
132
|
+
className: ListBoxItem_module_default["hop-ListBoxItem__icon-list"],
|
|
133
|
+
size: ListBoxItemToIconSizeAdapter[size]
|
|
134
|
+
},
|
|
135
|
+
"end-icon": {
|
|
136
|
+
className: ListBoxItem_module_default["hop-ListBoxItem__end-icon-list"],
|
|
137
|
+
size: ListBoxItemToIconSizeAdapter[size]
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}],
|
|
141
|
+
[IconContext, {
|
|
142
|
+
slots: {
|
|
143
|
+
[DEFAULT_SLOT]: {
|
|
144
|
+
className: ListBoxItem_module_default["hop-ListBoxItem__icon"],
|
|
145
|
+
size: ListBoxItemToIconSizeAdapter[size]
|
|
146
|
+
},
|
|
147
|
+
"end-icon": {
|
|
148
|
+
className: ListBoxItem_module_default["hop-ListBoxItem__end-icon"],
|
|
149
|
+
size: ListBoxItemToIconSizeAdapter[size]
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}],
|
|
153
|
+
[BadgeContext, {
|
|
154
|
+
className: ListBoxItem_module_default["hop-ListBoxItem__badge"],
|
|
155
|
+
isDisabled
|
|
156
|
+
}]
|
|
157
|
+
],
|
|
158
|
+
children
|
|
159
|
+
}
|
|
160
|
+
)
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
function ListBoxItem(props, ref) {
|
|
166
|
+
var _a;
|
|
167
|
+
[props, ref] = useContextProps(props, ref, ListBoxItemContext);
|
|
168
|
+
const { stylingProps, ...ownProps } = useStyledSystem(props);
|
|
169
|
+
const {
|
|
170
|
+
className,
|
|
171
|
+
children: childrenProp,
|
|
172
|
+
isDisabled,
|
|
173
|
+
isInvalid,
|
|
174
|
+
isLoading,
|
|
175
|
+
size: sizeProp,
|
|
176
|
+
style: styleProp,
|
|
177
|
+
textValue: textValueProp,
|
|
178
|
+
selectionIndicator,
|
|
179
|
+
...otherProps
|
|
180
|
+
} = ownProps;
|
|
181
|
+
const size = (_a = useResponsiveValue(sizeProp)) != null ? _a : "sm";
|
|
182
|
+
const textValue = textValueProp != null ? textValueProp : typeof childrenProp === "string" ? childrenProp : void 0;
|
|
183
|
+
const classNames = composeClassnameRenderProps(
|
|
184
|
+
className,
|
|
185
|
+
GlobalListBoxItemCssSelector,
|
|
186
|
+
cssModule(
|
|
187
|
+
ListBoxItem_module_default,
|
|
188
|
+
"hop-ListBoxItem",
|
|
189
|
+
size,
|
|
190
|
+
selectionIndicator
|
|
191
|
+
),
|
|
192
|
+
stylingProps.className
|
|
193
|
+
);
|
|
194
|
+
const style = composeRenderProps(styleProp, (prev) => {
|
|
195
|
+
return {
|
|
196
|
+
...stylingProps.style,
|
|
197
|
+
...prev
|
|
198
|
+
};
|
|
199
|
+
});
|
|
200
|
+
const children = composeRenderProps(childrenProp, (prev) => {
|
|
201
|
+
if (prev && isTextOnlyChildren(prev)) {
|
|
202
|
+
return /* @__PURE__ */ jsx(_Text, { slot: "label", children: prev });
|
|
203
|
+
}
|
|
204
|
+
return prev;
|
|
205
|
+
});
|
|
206
|
+
return /* @__PURE__ */ jsx(
|
|
207
|
+
ListBoxItem$1,
|
|
208
|
+
{
|
|
209
|
+
...otherProps,
|
|
210
|
+
ref,
|
|
211
|
+
className: classNames,
|
|
212
|
+
style,
|
|
213
|
+
textValue,
|
|
214
|
+
isDisabled: isLoading || isDisabled,
|
|
215
|
+
"data-invalid": isInvalid || void 0,
|
|
216
|
+
"data-loading": isLoading || void 0,
|
|
217
|
+
children: (listBoxItemProps) => {
|
|
218
|
+
if (isLoading) {
|
|
219
|
+
return /* @__PURE__ */ jsx(
|
|
220
|
+
"div",
|
|
221
|
+
{
|
|
222
|
+
className: ListBoxItem_module_default["hop-ListBoxItem__inner"],
|
|
223
|
+
children: /* @__PURE__ */ jsx(
|
|
224
|
+
_ListBoxItemSkeleton,
|
|
225
|
+
{
|
|
226
|
+
size,
|
|
227
|
+
slot: "label"
|
|
228
|
+
}
|
|
229
|
+
)
|
|
230
|
+
}
|
|
231
|
+
);
|
|
232
|
+
}
|
|
233
|
+
return /* @__PURE__ */ jsx(
|
|
234
|
+
ListBoxItemInner,
|
|
235
|
+
{
|
|
236
|
+
...listBoxItemProps,
|
|
237
|
+
selectionIndicator,
|
|
238
|
+
isInvalid,
|
|
239
|
+
size,
|
|
240
|
+
children: children(listBoxItemProps)
|
|
241
|
+
}
|
|
242
|
+
);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
var _ListBoxItem = forwardRef(ListBoxItem);
|
|
248
|
+
_ListBoxItem.displayName = "ListBoxItem";
|
|
249
|
+
|
|
250
|
+
export { GlobalListBoxItemCssSelector, _ListBoxItem };
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { _Text } from './chunk-RG4JKE4N.js';
|
|
2
|
+
import { AvatarContext } from './chunk-AES7QBQE.js';
|
|
3
|
+
import { _RichIconAvatarImage } from './chunk-ITQK6JTD.js';
|
|
4
|
+
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
5
|
+
import { useImageFallback } from './chunk-NS3XVOQ7.js';
|
|
6
|
+
import { BrokenImageRichIcon } from '@hopper-ui/icons';
|
|
7
|
+
import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
|
|
8
|
+
import { filterDOMProps } from '@react-aria/utils';
|
|
9
|
+
import clsx from 'clsx';
|
|
10
|
+
import { forwardRef, useMemo } from 'react';
|
|
11
|
+
import { useContextProps } from 'react-aria-components';
|
|
12
|
+
import { jsx } from 'react/jsx-runtime';
|
|
13
|
+
|
|
14
|
+
// css-module:./Avatar.module.css#css-module
|
|
15
|
+
var Avatar_module_default = { "hop-Avatar": "Avatar-module__hop-Avatar___8RZO3", "hop-Avatar--xs": "Avatar-module__hop-Avatar--xs___ynFuF", "hop-Avatar--sm": "Avatar-module__hop-Avatar--sm___3oY2t", "hop-Avatar--md": "Avatar-module__hop-Avatar--md___6Gv9Q", "hop-Avatar--lg": "Avatar-module__hop-Avatar--lg___S6Ehu", "hop-Avatar--xl": "Avatar-module__hop-Avatar--xl___1CYyi", "hop-Avatar--2xl": "Avatar-module__hop-Avatar--2xl___u7E0y", "hop-Avatar--decorative-option1": "Avatar-module__hop-Avatar--decorative-option1___ULBn2", "hop-Avatar--decorative-option2": "Avatar-module__hop-Avatar--decorative-option2___J4qwW", "hop-Avatar--decorative-option3": "Avatar-module__hop-Avatar--decorative-option3___yKw7L", "hop-Avatar--decorative-option4": "Avatar-module__hop-Avatar--decorative-option4___KS3Oe", "hop-Avatar--decorative-option5": "Avatar-module__hop-Avatar--decorative-option5___lTcxY", "hop-Avatar--decorative-option6": "Avatar-module__hop-Avatar--decorative-option6___vuJcI", "hop-Avatar--decorative-option7": "Avatar-module__hop-Avatar--decorative-option7___SBK4z", "hop-Avatar--decorative-option8": "Avatar-module__hop-Avatar--decorative-option8___smE79", "hop-Avatar--decorative-option9": "Avatar-module__hop-Avatar--decorative-option9___vvtuE", "hop-Avatar__image": "Avatar-module__hop-Avatar__image___M4hSZ" };
|
|
16
|
+
var GlobalAvatarCssSelector = "hop-Avatar";
|
|
17
|
+
var AvatarToTextSizeAdapter = {
|
|
18
|
+
xs: "xs",
|
|
19
|
+
sm: "xs",
|
|
20
|
+
md: "md",
|
|
21
|
+
lg: "lg",
|
|
22
|
+
xl: "xl",
|
|
23
|
+
"2xl": "xl"
|
|
24
|
+
};
|
|
25
|
+
function getColorIndex(name, maxNumberOfColor) {
|
|
26
|
+
let hashCode = 0;
|
|
27
|
+
for (let i = name.length - 1; i >= 0; i--) {
|
|
28
|
+
const character = name.charCodeAt(i);
|
|
29
|
+
const shift = i % 8;
|
|
30
|
+
hashCode ^= (character << shift) + (character >> 8 - shift);
|
|
31
|
+
}
|
|
32
|
+
return hashCode % maxNumberOfColor;
|
|
33
|
+
}
|
|
34
|
+
function getColorName(name) {
|
|
35
|
+
const variantToUse = `option${getColorIndex(name, 8) + 1}`;
|
|
36
|
+
return `decorative-${variantToUse}`;
|
|
37
|
+
}
|
|
38
|
+
function AvatarInitials(props) {
|
|
39
|
+
var _a;
|
|
40
|
+
const {
|
|
41
|
+
name,
|
|
42
|
+
size: sizeValue
|
|
43
|
+
} = props;
|
|
44
|
+
const size = (_a = useResponsiveValue(sizeValue)) != null ? _a : "md";
|
|
45
|
+
const initials = useMemo(() => {
|
|
46
|
+
const cleanName = name.replace(/\s+/g, " ").trim();
|
|
47
|
+
const [firstName, lastName] = cleanName.split(" ");
|
|
48
|
+
const letters = firstName && lastName ? `${firstName.charAt(0)}${lastName.charAt(0)}` : firstName.charAt(0);
|
|
49
|
+
return size === "xs" && letters.length > 1 ? letters.charAt(0) : letters;
|
|
50
|
+
}, [name, size]);
|
|
51
|
+
return /* @__PURE__ */ jsx(
|
|
52
|
+
_Text,
|
|
53
|
+
{
|
|
54
|
+
size: AvatarToTextSizeAdapter[size],
|
|
55
|
+
className: Avatar_module_default["hop-Avatar__initials"],
|
|
56
|
+
children: initials
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
function Avatar(props, ref) {
|
|
61
|
+
var _a;
|
|
62
|
+
[props, ref] = useContextProps(props, ref, AvatarContext);
|
|
63
|
+
const { stylingProps, ...ownProps } = useStyledSystem(props);
|
|
64
|
+
const {
|
|
65
|
+
"aria-label": ariaLabel,
|
|
66
|
+
className,
|
|
67
|
+
fallbackSrc,
|
|
68
|
+
imageProps,
|
|
69
|
+
isDisabled,
|
|
70
|
+
name,
|
|
71
|
+
size: sizeValue,
|
|
72
|
+
slot,
|
|
73
|
+
src,
|
|
74
|
+
style,
|
|
75
|
+
...otherProps
|
|
76
|
+
} = ownProps;
|
|
77
|
+
const domProps = filterDOMProps(otherProps);
|
|
78
|
+
const { onError, onLoad, ...otherImageProps } = imageProps != null ? imageProps : {};
|
|
79
|
+
const { imageUrl, status } = useImageFallback({ src, fallbackSrc, onError, onLoad });
|
|
80
|
+
const imageLoaded = status === "loaded";
|
|
81
|
+
const imageFailed = status === "failed";
|
|
82
|
+
const size = (_a = useResponsiveValue(sizeValue)) != null ? _a : "md";
|
|
83
|
+
const isBrokenImage = src && imageFailed && fallbackSrc !== null;
|
|
84
|
+
const isImage = src && !imageFailed;
|
|
85
|
+
const isInitials = !src || src && imageFailed && fallbackSrc === null;
|
|
86
|
+
const classNames = clsx(
|
|
87
|
+
className,
|
|
88
|
+
GlobalAvatarCssSelector,
|
|
89
|
+
cssModule(
|
|
90
|
+
Avatar_module_default,
|
|
91
|
+
"hop-Avatar",
|
|
92
|
+
size,
|
|
93
|
+
isBrokenImage && "broken-image",
|
|
94
|
+
isImage && "image",
|
|
95
|
+
isInitials && getColorName(name)
|
|
96
|
+
),
|
|
97
|
+
stylingProps.className
|
|
98
|
+
);
|
|
99
|
+
const mergedStyles = {
|
|
100
|
+
...stylingProps.style,
|
|
101
|
+
...style
|
|
102
|
+
};
|
|
103
|
+
if (imageFailed && fallbackSrc !== null) {
|
|
104
|
+
return /* @__PURE__ */ jsx(
|
|
105
|
+
_RichIconAvatarImage,
|
|
106
|
+
{
|
|
107
|
+
...domProps,
|
|
108
|
+
"aria-label": ariaLabel != null ? ariaLabel : name,
|
|
109
|
+
className: classNames,
|
|
110
|
+
isDisabled,
|
|
111
|
+
ref,
|
|
112
|
+
size,
|
|
113
|
+
slot,
|
|
114
|
+
style: mergedStyles,
|
|
115
|
+
children: /* @__PURE__ */ jsx(BrokenImageRichIcon, {})
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
let content = null;
|
|
120
|
+
if (isInitials || imageLoaded) {
|
|
121
|
+
content = /* @__PURE__ */ jsx(
|
|
122
|
+
AvatarInitials,
|
|
123
|
+
{
|
|
124
|
+
...otherProps,
|
|
125
|
+
name,
|
|
126
|
+
size
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
if (imageLoaded) {
|
|
131
|
+
content = /* @__PURE__ */ jsx(
|
|
132
|
+
"img",
|
|
133
|
+
{
|
|
134
|
+
...filterDOMProps(otherImageProps),
|
|
135
|
+
alt: "",
|
|
136
|
+
"aria-hidden": true,
|
|
137
|
+
className: Avatar_module_default["hop-Avatar__image"],
|
|
138
|
+
onError,
|
|
139
|
+
src: imageUrl
|
|
140
|
+
}
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
return /* @__PURE__ */ jsx(
|
|
144
|
+
"div",
|
|
145
|
+
{
|
|
146
|
+
...domProps,
|
|
147
|
+
"aria-label": ariaLabel != null ? ariaLabel : name,
|
|
148
|
+
className: classNames,
|
|
149
|
+
"data-disabled": isDisabled || void 0,
|
|
150
|
+
role: "img",
|
|
151
|
+
slot: slot != null ? slot : void 0,
|
|
152
|
+
ref,
|
|
153
|
+
style: mergedStyles,
|
|
154
|
+
children: content
|
|
155
|
+
}
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
var _Avatar = forwardRef(Avatar);
|
|
159
|
+
_Avatar.displayName = "Avatar";
|
|
160
|
+
|
|
161
|
+
export { AvatarToTextSizeAdapter, GlobalAvatarCssSelector, _Avatar };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ChipContext } from './chunk-WTKIUAHI.js';
|
|
2
1
|
import { isTextOnlyChildren } from './chunk-ZWU6DRRZ.js';
|
|
3
|
-
import {
|
|
2
|
+
import { IconListContext } from './chunk-DHVVYSLB.js';
|
|
3
|
+
import { ChipContext } from './chunk-632B5YBQ.js';
|
|
4
|
+
import { _Text } from './chunk-RG4JKE4N.js';
|
|
4
5
|
import { TextContext } from './chunk-X6SER3TZ.js';
|
|
5
|
-
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
6
6
|
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
7
|
-
import {
|
|
7
|
+
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
8
8
|
import { IconContext } from '@hopper-ui/icons';
|
|
9
9
|
import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
|
|
10
10
|
import clsx from 'clsx';
|
|
@@ -13,7 +13,7 @@ import { useContextProps, DEFAULT_SLOT } from 'react-aria-components';
|
|
|
13
13
|
import { jsx } from 'react/jsx-runtime';
|
|
14
14
|
|
|
15
15
|
// css-module:./Chip.module.css#css-module
|
|
16
|
-
var Chip_module_default = { "hop-Chip": "Chip-module__hop-
|
|
16
|
+
var Chip_module_default = { "hop-Chip": "Chip-module__hop-Chip___s008o", "hop-Chip--xs": "Chip-module__hop-Chip--xs___b5iix", "hop-Chip--sm": "Chip-module__hop-Chip--sm___C8xGE", "hop-Chip--md": "Chip-module__hop-Chip--md___taZzL", "hop-Chip--lg": "Chip-module__hop-Chip--lg___7MJ0a", "hop-Chip--neutral": "Chip-module__hop-Chip--neutral___WiQy4", "hop-Chip--progress": "Chip-module__hop-Chip--progress___D-NIl", "hop-Chip--positive": "Chip-module__hop-Chip--positive___x7VFX", "hop-Chip--caution": "Chip-module__hop-Chip--caution___4ZjhL", "hop-Chip--negative": "Chip-module__hop-Chip--negative___D02Dr", "hop-Chip--option1": "Chip-module__hop-Chip--option1___eYOWy", "hop-Chip--option2": "Chip-module__hop-Chip--option2___2gGTf", "hop-Chip--option3": "Chip-module__hop-Chip--option3___1ZcdZ", "hop-Chip--option4": "Chip-module__hop-Chip--option4___5KV7u", "hop-Chip--option5": "Chip-module__hop-Chip--option5___dcyfm", "hop-Chip--option6": "Chip-module__hop-Chip--option6___PO6T4", "hop-Chip--inactive": "Chip-module__hop-Chip--inactive___ASMuf", "hop-Chip--disabled": "Chip-module__hop-Chip--disabled___-uqxh", "hop-Chip__icon": "Chip-module__hop-Chip__icon___mqVpj", "hop-Chip__icon-list": "Chip-module__hop-Chip__icon-list___PV91l", "hop-Chip__text": "Chip-module__hop-Chip__text___KOlG8", "hop-Chip__end-icon": "Chip-module__hop-Chip__end-icon___yJdUP", "hop-Chip__end-icon-list": "Chip-module__hop-Chip__end-icon-list___BmX3z" };
|
|
17
17
|
var GlobalChipCssSelector = "hop-Chip";
|
|
18
18
|
var ChipToTextSizeAdapter = {
|
|
19
19
|
xs: "xs",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _Label } from './chunk-
|
|
1
|
+
import { _Label } from './chunk-HR25MLRP.js';
|
|
2
2
|
import { SpinnerContext } from './chunk-4ZYV2XLW.js';
|
|
3
3
|
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
4
4
|
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
@@ -8,7 +8,7 @@ import { useContextProps, ProgressBar } from 'react-aria-components';
|
|
|
8
8
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
9
|
|
|
10
10
|
// css-module:./Spinner.module.css#css-module
|
|
11
|
-
var Spinner_module_default = { "hop-Spinner": "Spinner-module__hop-
|
|
11
|
+
var Spinner_module_default = { "hop-Spinner": "Spinner-module__hop-Spinner___LbEMh", "spin": "Spinner-module__spin___Z5UnU", "hop-Spinner--sm": "Spinner-module__hop-Spinner--sm___peiQV", "hop-Spinner--md": "Spinner-module__hop-Spinner--md___8fE20", "hop-Spinner--lg": "Spinner-module__hop-Spinner--lg___3UVCZ", "hop-Spinner__track": "Spinner-module__hop-Spinner__track___tZuJb", "hop-Spinner__fill": "Spinner-module__hop-Spinner__fill___EVNJP", "hop-Spinner__label": "Spinner-module__hop-Spinner__label___nM4Dw" };
|
|
12
12
|
var GlobalSpinnerCssSelector = "hop-Spinner";
|
|
13
13
|
var SpinnerToLabelSizeAdapter = {
|
|
14
14
|
sm: "xs",
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { getSizingValue } from '@hopper-ui/styled-system';
|
|
2
|
+
|
|
3
|
+
// src/layout/src/grid-helpers.ts
|
|
4
|
+
function repeat(count, repetition) {
|
|
5
|
+
return `repeat(${count}, ${Array.isArray(repetition) ? interpolateGridTemplateArray(repetition) : getSizingValue(repetition)})`;
|
|
6
|
+
}
|
|
7
|
+
function minmax(min, max) {
|
|
8
|
+
return `minmax(${getSizingValue(min)}, ${getSizingValue(max)})`;
|
|
9
|
+
}
|
|
10
|
+
function fitContent(dimension) {
|
|
11
|
+
return `fit-content(${getSizingValue(dimension)})`;
|
|
12
|
+
}
|
|
13
|
+
function interpolateGridTemplateArray(values) {
|
|
14
|
+
return values.map((x) => getSizingValue(x)).join(" ");
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { fitContent, minmax, repeat };
|
|
@@ -7,7 +7,7 @@ import { useContextProps, Label as Label$1 } from 'react-aria-components';
|
|
|
7
7
|
import { jsx } from 'react/jsx-runtime';
|
|
8
8
|
|
|
9
9
|
// css-module:./Label.module.css#css-module
|
|
10
|
-
var Label_module_default = { "hop-Label": "Label-module__hop-
|
|
10
|
+
var Label_module_default = { "hop-Label": "Label-module__hop-Label___mLBaa", "hop-Label--xs": "Label-module__hop-Label--xs___SooLf", "hop-Label--sm": "Label-module__hop-Label--sm___0IFHf", "hop-Label--md": "Label-module__hop-Label--md___OwSmD", "hop-Label--lg": "Label-module__hop-Label--lg___NtQQ0", "hop-Label--xl": "Label-module__hop-Label--xl___-Hdm9", "hop-Label--2xl": "Label-module__hop-Label--2xl___Ulb-V", "hop-Label--inherit": "Label-module__hop-Label--inherit___K1Xcp" };
|
|
11
11
|
var GlobalLabelCssSelector = "hop-Label";
|
|
12
12
|
function Label(props, ref) {
|
|
13
13
|
var _a;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DialogTrigger } from 'react-aria-components';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
// src/overlays/Popover/src/PopoverTrigger.tsx
|
|
5
|
+
var PopoverTrigger = (props) => /* @__PURE__ */ jsx(DialogTrigger, { ...props, children: props.children });
|
|
6
|
+
|
|
7
|
+
export { PopoverTrigger };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
2
|
+
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
3
|
+
import { RichIconAvatarImageContext } from './chunk-JWW56J7M.js';
|
|
4
|
+
import { RichIconContext } from '@hopper-ui/icons';
|
|
5
|
+
import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
|
|
6
|
+
import clsx from 'clsx';
|
|
7
|
+
import { forwardRef } from 'react';
|
|
8
|
+
import { useContextProps } from 'react-aria-components';
|
|
9
|
+
import { jsx } from 'react/jsx-runtime';
|
|
10
|
+
|
|
11
|
+
// css-module:./RichIconAvatarImage.module.css#css-module
|
|
12
|
+
var RichIconAvatarImage_module_default = { "hop-RichIconAvatarImage": "RichIconAvatarImage-module__hop-RichIconAvatarImage___R2v-y", "hop-RichIconAvatarImage--xs": "RichIconAvatarImage-module__hop-RichIconAvatarImage--xs___r7PMb", "hop-RichIconAvatarImage--sm": "RichIconAvatarImage-module__hop-RichIconAvatarImage--sm___nZFlr", "hop-RichIconAvatarImage--md": "RichIconAvatarImage-module__hop-RichIconAvatarImage--md___mkcIx", "hop-RichIconAvatarImage--lg": "RichIconAvatarImage-module__hop-RichIconAvatarImage--lg___TifOU", "hop-RichIconAvatarImage--xl": "RichIconAvatarImage-module__hop-RichIconAvatarImage--xl___xs3Zv", "hop-RichIconAvatarImage--2xl": "RichIconAvatarImage-module__hop-RichIconAvatarImage--2xl___l0TTX", "hop-RichIconAvatarImage__icon": "RichIconAvatarImage-module__hop-RichIconAvatarImage__icon___6FWkl" };
|
|
13
|
+
var GlobalRichIconAvatarImageCssSelector = "hop-RichIconAvatarImage";
|
|
14
|
+
var AvatarToIconSizeAdapter = {
|
|
15
|
+
xs: "md",
|
|
16
|
+
sm: "md",
|
|
17
|
+
md: "lg",
|
|
18
|
+
lg: "xl",
|
|
19
|
+
xl: "xl",
|
|
20
|
+
"2xl": "xl"
|
|
21
|
+
};
|
|
22
|
+
function RichIconAvatarImage(props, ref) {
|
|
23
|
+
var _a;
|
|
24
|
+
[props, ref] = useContextProps(props, ref, RichIconAvatarImageContext);
|
|
25
|
+
const { stylingProps, ...ownProps } = useStyledSystem(props);
|
|
26
|
+
const {
|
|
27
|
+
children,
|
|
28
|
+
className,
|
|
29
|
+
isDisabled,
|
|
30
|
+
style,
|
|
31
|
+
slot,
|
|
32
|
+
size: sizeValue,
|
|
33
|
+
...otherProps
|
|
34
|
+
} = ownProps;
|
|
35
|
+
const size = (_a = useResponsiveValue(sizeValue)) != null ? _a : "md";
|
|
36
|
+
const classNames = clsx(
|
|
37
|
+
className,
|
|
38
|
+
GlobalRichIconAvatarImageCssSelector,
|
|
39
|
+
cssModule(
|
|
40
|
+
RichIconAvatarImage_module_default,
|
|
41
|
+
"hop-RichIconAvatarImage",
|
|
42
|
+
size
|
|
43
|
+
),
|
|
44
|
+
stylingProps.className
|
|
45
|
+
);
|
|
46
|
+
const mergedStyles = {
|
|
47
|
+
...stylingProps.style,
|
|
48
|
+
...style
|
|
49
|
+
};
|
|
50
|
+
if (!props["aria-label"] && !props["aria-labelledby"]) {
|
|
51
|
+
console.warn("An aria-label or aria-labelledby prop is required for accessibility.");
|
|
52
|
+
}
|
|
53
|
+
return /* @__PURE__ */ jsx(
|
|
54
|
+
"div",
|
|
55
|
+
{
|
|
56
|
+
...otherProps,
|
|
57
|
+
ref,
|
|
58
|
+
className: classNames,
|
|
59
|
+
style: mergedStyles,
|
|
60
|
+
slot: slot != null ? slot : void 0,
|
|
61
|
+
role: "img",
|
|
62
|
+
"data-disabled": isDisabled || void 0,
|
|
63
|
+
children: /* @__PURE__ */ jsx(
|
|
64
|
+
SlotProvider,
|
|
65
|
+
{
|
|
66
|
+
values: [
|
|
67
|
+
[RichIconContext, {
|
|
68
|
+
className: RichIconAvatarImage_module_default["hop-RichIconAvatarImage__icon"],
|
|
69
|
+
size: AvatarToIconSizeAdapter[size]
|
|
70
|
+
}]
|
|
71
|
+
],
|
|
72
|
+
children
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
var _RichIconAvatarImage = forwardRef(RichIconAvatarImage);
|
|
79
|
+
_RichIconAvatarImage.displayName = "RichIconAvatarImage";
|
|
80
|
+
|
|
81
|
+
export { AvatarToIconSizeAdapter, GlobalRichIconAvatarImageCssSelector, _RichIconAvatarImage };
|