@geneui/components 3.0.0-next-06dadf3-29102024 → 3.0.0-next-48d0ef7-31102024
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/Avatar.js +63 -0
- package/Divider.js +23 -0
- package/{GeneUIProvider/index.js → GeneUIProvider.js} +51 -64
- package/HelperText.js +69 -0
- package/Info.js +64 -0
- package/Label.js +38 -0
- package/Loader.js +21 -0
- package/Pill.js +64 -0
- package/TextLink.js +20 -0
- package/{index-c7646e48.js → Tooltip.js} +101 -79
- package/{lib → components}/atoms/Avatar/Avatar.d.ts +7 -6
- package/components/atoms/Avatar/index.d.ts +1 -0
- package/{lib → components}/atoms/Divider/Divider.d.ts +5 -5
- package/components/atoms/Divider/index.d.ts +1 -0
- package/{lib → components}/atoms/HelperText/HelperText.d.ts +6 -5
- package/components/atoms/HelperText/index.d.ts +1 -0
- package/{lib → components}/atoms/Info/Info.d.ts +5 -5
- package/components/atoms/Info/index.d.ts +1 -0
- package/{lib → components}/atoms/Label/Label.d.ts +3 -3
- package/components/atoms/Label/index.d.ts +1 -0
- package/{lib → components}/atoms/Loader/Loader.d.ts +5 -5
- package/components/atoms/Loader/index.d.ts +1 -0
- package/{lib → components}/atoms/Pill/Pill.d.ts +7 -6
- package/components/atoms/Pill/index.d.ts +1 -0
- package/{lib → components}/atoms/TextLink/TextLink.d.ts +5 -5
- package/components/atoms/TextLink/index.d.ts +1 -0
- package/{lib → components}/molecules/Tooltip/Tooltip.d.ts +26 -21
- package/components/molecules/Tooltip/index.d.ts +1 -0
- package/components/providers/GeneUIProvider/GeneUIProvider.d.ts +30 -0
- package/components/providers/GeneUIProvider/index.d.ts +1 -0
- package/hooks/index.d.ts +2 -20
- package/hooks/useDebounceCallback/index.d.ts +1 -0
- package/hooks/useDebounceCallback/useDebounceCallback.d.ts +2 -0
- package/hooks/useEllipsisDetection/index.d.ts +1 -1
- package/hooks/useEllipsisDetection/useEllipsisDetection.d.ts +2 -2
- package/{index-031ff73c.js → index-ce02421b.js} +4 -4
- package/index.d.ts +11 -121
- package/index.js +12 -159
- package/package.json +24 -43
- package/tokens-0abb4e1b.js +6 -0
- package/types/index.d.ts +0 -3
- package/useEllipsisDetection-46d712b6.js +34 -0
- package/ActionableList/index.js +0 -1694
- package/AdvancedSearch/index.js +0 -892
- package/Alert/index.js +0 -98
- package/Avatar/index.js +0 -58
- package/Badge/index.js +0 -29
- package/Breadcrumb/index.js +0 -130
- package/BusyLoader/index.js +0 -31
- package/Button/index.js +0 -30
- package/Card/index.js +0 -502
- package/CardList/index.js +0 -662
- package/CellMeasurerCache-26f3693c.js +0 -229
- package/Charts/index.js +0 -17662
- package/Checkbox/index.js +0 -229
- package/CheckboxGroup/index.js +0 -203
- package/CheckboxGroupWithSearch/index.js +0 -280
- package/Collapse/index.js +0 -195
- package/ColorPicker/index.js +0 -210
- package/ComboBox/index.js +0 -524
- package/Copy/index.js +0 -56
- package/Counter/index.js +0 -312
- package/DateFilter/index.js +0 -183
- package/DatePicker/index.js +0 -1229
- package/DatePickerInput/index.js +0 -883
- package/Divider/index.js +0 -23
- package/Drawer/index.js +0 -261
- package/Dropdown/index.js +0 -43
- package/Editor/index.js +0 -22975
- package/Empty/index.js +0 -76
- package/ExtendedInput/index.js +0 -590
- package/Form/index.js +0 -85
- package/FormContainer/index.js +0 -189
- package/FormableCheckbox/index.js +0 -24
- package/FormableDatePicker/index.js +0 -43
- package/FormableDropdown/index.js +0 -50
- package/FormableEditor/index.js +0 -26
- package/FormableHOC-85f89a81.js +0 -83
- package/FormableMultiSelectDropdown/index.js +0 -50
- package/FormableNumberInput/index.js +0 -34
- package/FormableRadio/index.js +0 -22
- package/FormableSwitcher/index.js +0 -22
- package/FormableTextInput/index.js +0 -34
- package/FormableUploader/index.js +0 -44
- package/Grid/index.js +0 -167
- package/HelperText/index.js +0 -86
- package/Holder/index.js +0 -261
- package/Icon/index.js +0 -62
- package/Image/index.js +0 -45
- package/ImagePreview/index.js +0 -217
- package/Info/index.js +0 -41
- package/InfoOutline-dd2e89d9.js +0 -29
- package/InteractiveWidget/index.js +0 -78
- package/KeyValue/index.js +0 -22
- package/Label/index.js +0 -48
- package/LinkButton/index.js +0 -34
- package/Loader/index.js +0 -23
- package/Menu/index.js +0 -281
- package/MobileNavigation/index.js +0 -94
- package/MobilePopup/index.js +0 -182
- package/Modal/index.js +0 -251
- package/ModuleTitle/index.js +0 -141
- package/NavigationMenu/index.js +0 -222
- package/Notification/index.js +0 -120
- package/Option/index.js +0 -184
- package/Overlay/index.js +0 -187
- package/Overspread/index.js +0 -291
- package/Pagination/index.js +0 -261
- package/Paper/index.js +0 -96
- package/Pill/index.js +0 -67
- package/Popover/index.js +0 -725
- package/PopoverV2/index.js +0 -19
- package/Portal/index.js +0 -58
- package/Products/index.js +0 -115
- package/Profile/index.js +0 -589
- package/Progress/index.js +0 -200
- package/QRCode/index.js +0 -814
- package/Radio/index.js +0 -151
- package/RadioGroup/index.js +0 -104
- package/Range/index.js +0 -191
- package/Rating/index.js +0 -174
- package/RichEditor/index.js +0 -13
- package/RichEditor-6ca8346f.js +0 -228
- package/Scrollbar/index.js +0 -1585
- package/Search/index.js +0 -75
- package/SearchWithDropdown/index.js +0 -140
- package/Section/index.js +0 -61
- package/SkeletonLoader/index.js +0 -81
- package/Slider/index.js +0 -261
- package/Status/index.js +0 -97
- package/Steps/index.js +0 -314
- package/SuggestionList/index.js +0 -385
- package/Switcher/index.js +0 -193
- package/Table/index.js +0 -57
- package/TableCompositions/index.js +0 -16995
- package/Tabs/index.js +0 -235
- package/Tag/index.js +0 -102
- package/TextLink/index.js +0 -20
- package/Textarea/index.js +0 -242
- package/Time/index.js +0 -62
- package/TimePicker/index.js +0 -575
- package/Timeline/index.js +0 -113
- package/Title/index.js +0 -65
- package/Toaster/index.js +0 -116
- package/Tooltip/index.js +0 -6
- package/TransferList/index.js +0 -493
- package/Uploader/index.js +0 -992
- package/ValidatableCheckbox/index.js +0 -123
- package/ValidatableDatePicker/index.js +0 -316
- package/ValidatableDropdown/index.js +0 -141
- package/ValidatableElements/index.js +0 -67
- package/ValidatableMultiSelectDropdown/index.js +0 -152
- package/ValidatableNumberInput/index.js +0 -204
- package/ValidatableRadio/index.js +0 -116
- package/ValidatableSwitcher/index.js +0 -93
- package/ValidatableTextInput/index.js +0 -167
- package/ValidatableTimeInput/index.js +0 -174
- package/ValidatableUploader/index.js +0 -98
- package/Widget/index.js +0 -225
- package/_commonjsHelpers-24198af3.js +0 -35
- package/_rollupPluginBabelHelpers-a83240e1.js +0 -11
- package/callAfterDelay-7272faca.js +0 -12
- package/checkTimeValidation-e56771be.js +0 -16
- package/checkboxRadioSwitcher-5b69d7bd.js +0 -4
- package/clsx.m-2bb6df4b.js +0 -3
- package/config-1053d64d.js +0 -20
- package/configs-00612ce0.js +0 -103
- package/configs.js +0 -111
- package/dateValidation-67caec66.js +0 -225
- package/debounce-4419bc2f.js +0 -17
- package/guid-8ddf77b3.js +0 -16
- package/hooks/useBodyScroll.js +0 -16
- package/hooks/useClick.js +0 -18
- package/hooks/useClickOutside.js +0 -25
- package/hooks/useDebounce.js +0 -28
- package/hooks/useDeviceType.js +0 -17
- package/hooks/useDidMount.js +0 -15
- package/hooks/useForceUpdate.js +0 -8
- package/hooks/useHover.js +0 -20
- package/hooks/useImgDownload.js +0 -18
- package/hooks/useKeyDown.js +0 -21
- package/hooks/useMount.js +0 -13
- package/hooks/useMutationObserver.js +0 -21
- package/hooks/usePrevious.js +0 -10
- package/hooks/useThrottle.js +0 -16
- package/hooks/useToggle.js +0 -11
- package/hooks/useUpdatableRef.js +0 -14
- package/hooks/useUpdate.js +0 -10
- package/hooks/useWidth.js +0 -16
- package/hooks/useWindowSize.js +0 -40
- package/index-122432cd.js +0 -270
- package/index-262edd7a.js +0 -77
- package/index-3188e46e.js +0 -1940
- package/index-45eafea6.js +0 -90
- package/index-5f37f281.js +0 -168
- package/index-ce12e4a9.js +0 -10032
- package/index-d0ecb950.js +0 -6483
- package/index-fcbae78d.js +0 -4
- package/index.mobile.d.ts +0 -14
- package/lib/atoms/Avatar/index.d.ts +0 -1
- package/lib/atoms/Badge/Badge.d.ts +0 -36
- package/lib/atoms/Badge/index.d.ts +0 -1
- package/lib/atoms/BusyLoader/BusyLoader.d.ts +0 -32
- package/lib/atoms/BusyLoader/BusyLoaderHolderHOC.d.ts +0 -8
- package/lib/atoms/BusyLoader/index.d.ts +0 -1
- package/lib/atoms/Button/Button.d.ts +0 -70
- package/lib/atoms/Button/index.d.ts +0 -1
- package/lib/atoms/Divider/index.d.ts +0 -1
- package/lib/atoms/Empty/Empty.d.ts +0 -39
- package/lib/atoms/Empty/index.d.ts +0 -1
- package/lib/atoms/Empty/utils.d.ts +0 -9
- package/lib/atoms/HelperText/index.d.ts +0 -1
- package/lib/atoms/Image/Image.d.ts +0 -51
- package/lib/atoms/Image/index.d.ts +0 -1
- package/lib/atoms/ImagePreview/ImagePreview.d.ts +0 -56
- package/lib/atoms/ImagePreview/ImagePreviewHOC.d.ts +0 -4
- package/lib/atoms/ImagePreview/Magnifier.d.ts +0 -40
- package/lib/atoms/ImagePreview/index.d.ts +0 -1
- package/lib/atoms/Info/index.d.ts +0 -1
- package/lib/atoms/KeyValue/KeyValue.d.ts +0 -29
- package/lib/atoms/KeyValue/index.d.ts +0 -1
- package/lib/atoms/Label/index.d.ts +0 -1
- package/lib/atoms/LinkButton/LinkButton.d.ts +0 -46
- package/lib/atoms/LinkButton/index.d.ts +0 -1
- package/lib/atoms/Loader/index.d.ts +0 -1
- package/lib/atoms/Pill/index.d.ts +0 -1
- package/lib/atoms/Rating/DefaultSvg.d.ts +0 -3
- package/lib/atoms/Rating/Rating.d.ts +0 -49
- package/lib/atoms/Rating/index.d.ts +0 -1
- package/lib/atoms/TextLink/index.d.ts +0 -1
- package/lib/molecules/Copy/Copy.d.ts +0 -38
- package/lib/molecules/Copy/index.d.ts +0 -1
- package/lib/molecules/InteractiveWidget/InteractiveWidget.d.ts +0 -70
- package/lib/molecules/InteractiveWidget/InteractiveWidgetIcon.d.ts +0 -8
- package/lib/molecules/InteractiveWidget/index.d.ts +0 -1
- package/lib/molecules/Tooltip/index.d.ts +0 -1
- package/lib/providers/GeneUIProvider/GeneUIProvider.d.ts +0 -30
- package/lib/providers/GeneUIProvider/index.d.ts +0 -1
- package/localization-4ba17032.js +0 -46
- package/objectWithoutPropertiesLoose-e1596bdb.js +0 -62
- package/rangeAndSlider-740a236c.js +0 -8676
- package/react-beautiful-dnd.esm-8c7b5a83.js +0 -10116
- package/react-lifecycles-compat.es-6e1f3768.js +0 -158
- package/redux-e591c1b8.js +0 -536
- package/tokens-8ab1179c.js +0 -6
- package/tslib.es6-f211516f.js +0 -35
- package/useEllipsisDetection-c1c9ad94.js +0 -38
package/Pill.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React__default, { useState, useRef, useEffect } from 'react';
|
|
2
|
+
import { _ as _objectWithoutProperties, a as _extends } from './ArrowLeft-b88e2ba8.js';
|
|
3
|
+
import { c as classNames } from './index-ce02421b.js';
|
|
4
|
+
import Tooltip from './Tooltip.js';
|
|
5
|
+
import { a as useEllipsisDetection } from './useEllipsisDetection-46d712b6.js';
|
|
6
|
+
import { s as styleInject } from './style-inject.es-746bb8ed.js';
|
|
7
|
+
import 'react-dom';
|
|
8
|
+
import './GeneUIProvider.js';
|
|
9
|
+
|
|
10
|
+
var _excluded = ["size", "color"];
|
|
11
|
+
var SvgDot = function SvgDot(_ref) {
|
|
12
|
+
var _ref$size = _ref.size,
|
|
13
|
+
size = _ref$size === void 0 ? 24 : _ref$size,
|
|
14
|
+
_ref$color = _ref.color,
|
|
15
|
+
color = _ref$color === void 0 ? "currentColor" : _ref$color,
|
|
16
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
+
return /*#__PURE__*/React__default.createElement("svg", _extends({
|
|
18
|
+
width: size,
|
|
19
|
+
height: size,
|
|
20
|
+
viewBox: "0 0 24 24",
|
|
21
|
+
fill: color,
|
|
22
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
23
|
+
}, props), /*#__PURE__*/React__default.createElement("path", {
|
|
24
|
+
d: "M12 17a5 5 0 1 0 0-10 5 5 0 0 0 0 10Z",
|
|
25
|
+
fill: color
|
|
26
|
+
}));
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
var css_248z = ".pill{align-items:center;display:inline-flex;max-width:100%;vertical-align:top}.pill_icon_after{flex-direction:row-reverse}.pill_size_medium:not(.pill_icon_only){gap:var(--guit-ref-spacing-xsmall);padding-bottom:var(--guit-ref-spacing-2xsmall);padding-top:var(--guit-ref-spacing-2xsmall)}.pill_size_medium:not(.pill_icon_before,.pill_size_medium.pill_icon_after,.pill_size_medium.pill_icon_only){min-width:var(--guit-sem-dimension-width-large);padding-inline-end:var(--guit-ref-spacing-medium);padding-inline-start:var(--guit-ref-spacing-medium)}.pill_size_medium.pill_icon_after,.pill_size_medium.pill_icon_before{min-width:var(--guit-sem-dimension-width-3xlarge)}.pill_size_medium.pill_icon_before{padding-inline-end:var(--guit-ref-spacing-medium);padding-inline-start:var(--guit-ref-spacing-xsmall)}.pill_size_medium.pill_icon_after{padding-inline-end:var(--guit-ref-spacing-xsmall);padding-inline-start:var(--guit-ref-spacing-medium)}.pill_size_medium.pill_icon_only{min-width:var(--guit-sem-dimension-width-medium);padding:var(--guit-ref-spacing-2xsmall)}.pill_size_small:not(.pill_icon_only){gap:var(--guit-ref-spacing-2xsmall);padding-bottom:var(--guit-ref-spacing-4xsmall);padding-top:var(--guit-ref-spacing-4xsmall)}.pill_size_small:not(.pill_icon_before,.pill_size_small.pill_icon_after,.pill_size_small.pill_icon_only){min-width:var(--guit-sem-dimension-width-large);padding-inline-end:var(--guit-ref-spacing-medium);padding-inline-start:var(--guit-ref-spacing-medium)}.pill_size_small.pill_icon_after,.pill_size_small.pill_icon_before{min-width:var(--guit-sem-dimension-width-3xlarge)}.pill_size_small.pill_icon_before{padding-inline-end:var(--guit-ref-spacing-medium);padding-inline-start:var(--guit-ref-spacing-xsmall)}.pill_size_small.pill_icon_after{padding-inline-end:var(--guit-ref-spacing-xsmall);padding-inline-start:var(--guit-ref-spacing-medium)}.pill_size_small.pill_icon_only{min-width:var(--guit-sem-dimension-width-small);padding:var(--guit-ref-spacing-4xsmall)}.pill_size_medium:not(.pill_icon_only),.pill_size_small:not(.pill_icon_only){font-family:var(--guit-sem-font-label-medium-default-semibold-font-family);font-size:var(--guit-sem-font-label-medium-default-semibold-font-size);font-weight:var(--guit-sem-font-label-medium-default-medium-font-weight);line-height:var(--guit-sem-font-label-medium-default-semibold-line-height)}.pill_size_smallNudge{gap:var(--guit-ref-spacing-3xsmall);padding-bottom:var(--guit-ref-spacing-4xsmall);padding-top:var(--guit-ref-spacing-4xsmall)}.pill_size_smallNudge:not(.pill_icon_only){font-family:var(--guit-sem-font-label-small-default-medium-font-family);font-size:var(--guit-sem-font-label-small-default-medium-font-size);font-weight:var(--guit-sem-font-label-small-default-medium-font-weight);line-height:var(--guit-sem-font-label-small-default-medium-line-height)}.pill_size_smallNudge:not(.pill_icon_before,.pill_size_smallNudge.pill_icon_after,.pill_size_smallNudge.pill_icon_only){min-width:var(--guit-sem-dimension-width-medium);padding-inline-end:var(--guit-ref-spacing-xsmall);padding-inline-start:var(--guit-ref-spacing-xsmall)}.pill_size_smallNudge.pill_icon_after,.pill_size_smallNudge.pill_icon_before{min-width:var(--guit-sem-dimension-width-large)}.pill_size_smallNudge.pill_icon_before{padding-inline-end:var(--guit-ref-spacing-xsmall);padding-inline-start:var(--guit-ref-spacing-3xsmall)}.pill_size_smallNudge.pill_icon_after{padding-inline-end:var(--guit-ref-spacing-3xsmall);padding-inline-start:var(--guit-ref-spacing-xsmall)}.pill_size_smallNudge.pill_icon_only{min-width:var(--guit-sem-dimension-width-small-nudge);padding:var(--guit-ref-spacing-4xsmall)}.pill_fill.pill_size_medium,.pill_fill.pill_size_small{border-radius:var(--guit-ref-radius-3xsmall)}.pill_fill.pill_size_smallNudge{border-radius:var(--guit-ref-radius-4xsmall)}.pill_fill.pill_color_informative{background-color:var(--guit-sem-color-background-informative)}.pill_fill.pill_color_neutral{background-color:var(--guit-sem-color-background-neutral-3)}.pill_fill.pill_color_error{background-color:var(--guit-sem-color-background-error-1)}.pill_fill.pill_color_success{background-color:var(--guit-sem-color-background-success-1)}.pill_fill.pill_color_warning{background-color:var(--guit-sem-color-background-warning-1)}.pill_fill.pill_color_purple{background-color:var(--guit-sem-color-background-accent-purple-1)}.pill_fill.pill_color_lagoon{background-color:var(--guit-sem-color-background-accent-lagoon-1)}.pill_fill.pill_color_magenta{background-color:var(--guit-sem-color-background-accent-magenta-1)}.pill_fill.pill_color_slate{background-color:var(--guit-sem-color-background-accent-slate-1)}.pill_fill.pill_color_inverse{background-color:var(--guit-sem-color-background-inverse);color:var(--guit-sem-color-foreground-neutral-2)}.pill_color_informative{color:var(--guit-sem-color-foreground-informative)}.pill_color_neutral{color:var(--guit-sem-color-foreground-neutral-2)}.pill_color_error{color:var(--guit-sem-color-foreground-error)}.pill_color_success{color:var(--guit-sem-color-foreground-success)}.pill_color_warning{color:var(--guit-sem-color-foreground-warning)}.pill_color_purple{color:var(--guit-sem-color-foreground-accent-purple)}.pill_color_lagoon{color:var(--guit-sem-color-foreground-accent-lagoon)}.pill_color_magenta{color:var(--guit-sem-color-foreground-accent-magenta)}.pill_color_slate{color:var(--guit-sem-color-foreground-accent-slate)}.pill:not(.pill_fill).pill_color_inverse{color:var(--guit-sem-color-foreground-inverse)}.pill__text{color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit}.pill__icon{flex:0 0 auto}";
|
|
30
|
+
styleInject(css_248z);
|
|
31
|
+
|
|
32
|
+
const iconSizes = {
|
|
33
|
+
smallNudge: 16,
|
|
34
|
+
small: 20,
|
|
35
|
+
medium: 20
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* A Pill component used to display concise information or categorize content. Often used for labels or status indicators, Pill components are visually distinct and can convey different meanings through text and color coding.
|
|
39
|
+
*/
|
|
40
|
+
const Pill = ({ color = "informative", size = "medium", text, iconAlignment = "before", isFill, withDot = true, Icon, className }) => {
|
|
41
|
+
const [isWithDot, setIsWithDot] = useState(withDot);
|
|
42
|
+
const textRef = useRef(null);
|
|
43
|
+
const isTruncated = useEllipsisDetection(textRef, [text]);
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
setIsWithDot(!Icon && withDot);
|
|
46
|
+
}, [Icon, withDot]);
|
|
47
|
+
let iconContent = null;
|
|
48
|
+
if (Icon) {
|
|
49
|
+
iconContent = React__default.createElement(Icon, { size: iconSizes[size], className: "pill__icon" });
|
|
50
|
+
}
|
|
51
|
+
else if (isWithDot) {
|
|
52
|
+
iconContent = React__default.createElement(SvgDot, { size: iconSizes[size], className: "pill__icon" });
|
|
53
|
+
}
|
|
54
|
+
return (React__default.createElement("div", { className: classNames(`pill pill_size_${size} pill_color_${color}`, className, {
|
|
55
|
+
[`pill_icon_${isWithDot ? "before" : iconAlignment}`]: text && iconContent,
|
|
56
|
+
pill_icon_only: !text,
|
|
57
|
+
pill_fill: isFill
|
|
58
|
+
}) },
|
|
59
|
+
iconContent,
|
|
60
|
+
text && (React__default.createElement(Tooltip, { text: text, isVisible: isTruncated, appearance: color === "inverse" ? "inverse" : "default" },
|
|
61
|
+
React__default.createElement("span", { ref: textRef, className: "pill__text ellipsis-text" }, text)))));
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export { Pill as default };
|
package/TextLink.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { c as classNames } from './index-ce02421b.js';
|
|
3
|
+
import { s as styleInject } from './style-inject.es-746bb8ed.js';
|
|
4
|
+
|
|
5
|
+
var css_248z = ".textLink{border-radius:var(--guit-ref-radius-4xsmall);cursor:pointer;display:inline-flex;word-break:break-word}.textLink_underline .textLink__text{font-family:var(--guit-sem-font-body-medium-underline-medium-font-family);font-size:var(--guit-sem-font-body-medium-underline-medium-font-size);font-weight:var(--guit-sem-font-body-medium-underline-medium-font-weight);line-height:var(--guit-sem-font-body-medium-underline-medium-line-height);-webkit-text-decoration:var(--guit-sem-font-body-medium-underline-medium-text-decoration);text-decoration:var(--guit-sem-font-body-medium-underline-medium-text-decoration)}.textLink:not(.textLink_underline) .textLink__text{font-family:var(--guit-sem-font-body-medium-default-medium-font-family);font-size:var(--guit-sem-font-body-medium-default-medium-font-size);font-weight:var(--guit-sem-font-body-medium-default-medium-font-weight);line-height:var(--guit-sem-font-body-medium-default-medium-line-height)}.textLink_color_primary{color:var(--guit-sem-color-foreground-brand)}.textLink_color_primary:hover{color:var(--guit-sem-color-foreground-brand-hover)}.textLink_color_primary:active{color:var(--guit-sem-color-foreground-brand-pressed)}.textLink_color_secondary{color:var(--guit-sem-color-foreground-neutral-2)}.textLink_color_secondary:hover{color:var(--guit-sem-color-foreground-neutral-2-hover)}.textLink_color_secondary:active{color:var(--guit-sem-color-foreground-neutral-2-pressed)}.textLink_color_inverse{color:var(--guit-sem-color-foreground-inverse)}.textLink_color_inverse:hover{color:var(--guit-sem-color-foreground-inverse-hover)}.textLink_color_inverse:active{color:var(--guit-sem-color-foreground-inverse-pressed)}.textLink_disabled{pointer-events:none}.textLink_disabled:not(.textLink_color_inverse){color:var(--guit-sem-color-foreground-disabled)}.textLink_disabled.textLink_color_inverse{color:var(--guit-sem-color-foreground-inverse-disabled)}.textLink__text{color:inherit}.textLink__icon{flex:0 0 auto;vertical-align:middle}.textLink__icon_before{margin-inline-end:var(--guit-ref-spacing-3xsmall)}.textLink__icon_after{margin-inline-start:var(--guit-ref-spacing-3xsmall)}";
|
|
6
|
+
styleInject(css_248z);
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* A link is styled text that navigates users to another location, either within the current experience or to a different app or website.
|
|
10
|
+
*/
|
|
11
|
+
const TextLink = ({ text, href, iconBefore, rel, target = "self", underline, appearance = "primary", disabled, onClick, isLoading, Icon, className }) => isLoading ? (React__default.createElement("span", null, "skeleton")) : (React__default.createElement("a", Object.assign({ target: `_${target}`, rel: rel, className: classNames(`textLink textLink_color_${appearance}`, className, {
|
|
12
|
+
textLink_underline: underline,
|
|
13
|
+
textLink_disabled: disabled
|
|
14
|
+
}), href: href, onClick: onClick }, (disabled && { tabIndex: -1 })),
|
|
15
|
+
React__default.createElement("span", { className: "textLink__text" },
|
|
16
|
+
Icon && iconBefore && React__default.createElement(Icon, { className: "textLink__icon textLink__icon_before", size: 20 }),
|
|
17
|
+
text,
|
|
18
|
+
Icon && !iconBefore && React__default.createElement(Icon, { className: "textLink__icon textLink__icon_after", size: 20 }))));
|
|
19
|
+
|
|
20
|
+
export { TextLink as default };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { _ as __rest } from './tslib.es6-f211516f.js';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import React__default, { useLayoutEffect, useEffect, useRef, useContext, useState, Children, cloneElement, Fragment } from 'react';
|
|
4
3
|
import * as ReactDOM from 'react-dom';
|
|
5
|
-
import { GeneUIDesignSystemContext } from './GeneUIProvider
|
|
4
|
+
import { GeneUIDesignSystemContext } from './GeneUIProvider.js';
|
|
6
5
|
import { s as styleInject } from './style-inject.es-746bb8ed.js';
|
|
7
6
|
|
|
8
7
|
/**
|
|
@@ -474,10 +473,12 @@ const flip = function (options) {
|
|
|
474
473
|
return {};
|
|
475
474
|
}
|
|
476
475
|
const side = getSide(placement);
|
|
476
|
+
const initialSideAxis = getSideAxis(initialPlacement);
|
|
477
477
|
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
478
478
|
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
479
479
|
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
480
|
-
|
|
480
|
+
const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
|
|
481
|
+
if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
|
|
481
482
|
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
482
483
|
}
|
|
483
484
|
const placements = [initialPlacement, ...fallbackPlacements];
|
|
@@ -523,8 +524,17 @@ const flip = function (options) {
|
|
|
523
524
|
switch (fallbackStrategy) {
|
|
524
525
|
case 'bestFit':
|
|
525
526
|
{
|
|
526
|
-
var _overflowsData$
|
|
527
|
-
const placement = (_overflowsData$
|
|
527
|
+
var _overflowsData$filter2;
|
|
528
|
+
const placement = (_overflowsData$filter2 = overflowsData.filter(d => {
|
|
529
|
+
if (hasFallbackAxisSideDirection) {
|
|
530
|
+
const currentSideAxis = getSideAxis(d.placement);
|
|
531
|
+
return currentSideAxis === initialSideAxis ||
|
|
532
|
+
// Create a bias to the `y` side axis due to horizontal
|
|
533
|
+
// reading directions favoring greater width.
|
|
534
|
+
currentSideAxis === 'y';
|
|
535
|
+
}
|
|
536
|
+
return true;
|
|
537
|
+
}).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
|
|
528
538
|
if (placement) {
|
|
529
539
|
resetPlacement = placement;
|
|
530
540
|
}
|
|
@@ -575,10 +585,9 @@ async function convertValueToCoords(state, options) {
|
|
|
575
585
|
crossAxis: 0,
|
|
576
586
|
alignmentAxis: null
|
|
577
587
|
} : {
|
|
578
|
-
mainAxis: 0,
|
|
579
|
-
crossAxis: 0,
|
|
580
|
-
alignmentAxis:
|
|
581
|
-
...rawValue
|
|
588
|
+
mainAxis: rawValue.mainAxis || 0,
|
|
589
|
+
crossAxis: rawValue.crossAxis || 0,
|
|
590
|
+
alignmentAxis: rawValue.alignmentAxis
|
|
582
591
|
};
|
|
583
592
|
if (alignment && typeof alignmentAxis === 'number') {
|
|
584
593
|
crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
|
|
@@ -700,7 +709,11 @@ const shift = function (options) {
|
|
|
700
709
|
...limitedCoords,
|
|
701
710
|
data: {
|
|
702
711
|
x: limitedCoords.x - x,
|
|
703
|
-
y: limitedCoords.y - y
|
|
712
|
+
y: limitedCoords.y - y,
|
|
713
|
+
enabled: {
|
|
714
|
+
[mainAxis]: checkMainAxis,
|
|
715
|
+
[crossAxis]: checkCrossAxis
|
|
716
|
+
}
|
|
704
717
|
}
|
|
705
718
|
};
|
|
706
719
|
}
|
|
@@ -3577,61 +3590,77 @@ function requireReactIs_development () {
|
|
|
3577
3590
|
}
|
|
3578
3591
|
} (reactIs));
|
|
3579
3592
|
|
|
3580
|
-
var css_248z = "
|
|
3593
|
+
var css_248z = ".tooltip{align-items:flex-start;border-radius:var(--guit-ref-radius-3xsmall);box-shadow:var(--guit-sem-shadow-floating-2-position-x-1) var(--guit-sem-shadow-floating-2-position-y-1) var(--guit-sem-shadow-floating-2-blur-1) var(--guit-sem-shadow-floating-2-spread-1) var(--guit-sem-color-floating-2-rgba-1),var(--guit-sem-shadow-floating-2-position-x-2) var(--guit-sem-shadow-floating-2-position-y-2) var(--guit-sem-shadow-floating-2-blur-2) var(--guit-sem-shadow-floating-2-spread-2) var(--guit-sem-color-floating-2-rgba-2);display:flex;gap:var(--guit-ref-spacing-3xsmall);justify-content:space-between;max-width:24rem;min-width:var(--guit-sem-dimension-width-3xlarge);padding:var(--guit-ref-spacing-xsmall) var(--guit-ref-spacing-medium)}.tooltip_position_top .tooltip__arrow{transform:rotate(0deg)}.tooltip_position_bottom .tooltip__arrow{transform:rotate(180deg)}.tooltip_position_left .tooltip__arrow{transform:rotate(-90deg)}.tooltip_position_right .tooltip__arrow{transform:rotate(90deg)}.tooltip_color_default{background-color:var(--guit-sem-color-background-neutral-4)}.tooltip_color_default .tooltip__arrowPath{fill:var(--guit-sem-color-background-neutral-4)}.tooltip_color_default .tooltip__icon,.tooltip_color_default .tooltip__text{color:var(--guit-sem-color-foreground-inverse-notheme)}.tooltip_color_inverse{background-color:var(--guit-sem-color-background-neutral-1-nudge)}.tooltip_color_inverse .tooltip__arrowPath{fill:var(--guit-sem-color-background-neutral-1-nudge)}.tooltip_color_inverse .tooltip__icon,.tooltip_color_inverse .tooltip__text{color:var(--guit-sem-color-foreground-neutral-2)}.tooltip__arrow{position:absolute}.tooltip__textWrapper{display:flex;flex-direction:column;gap:var(--guit-sem-font-caption-large-medium-paragraph-spacing)}.tooltip__text{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;font-family:var(--guit-sem-font-caption-large-medium-font-family);font-size:var(--guit-sem-font-caption-large-medium-font-size);font-weight:var(--guit-sem-font-caption-large-medium-font-weight);letter-spacing:var(--guit-sem-font-caption-large-medium-letter-spacing);line-height:var(--guit-sem-font-caption-large-medium-llne-height);overflow:hidden;word-break:break-word}.tooltip__icon{flex:0 0 auto}";
|
|
3581
3594
|
styleInject(css_248z);
|
|
3582
3595
|
|
|
3583
3596
|
const positions = [
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3597
|
+
"top",
|
|
3598
|
+
"right",
|
|
3599
|
+
"bottom",
|
|
3600
|
+
"left",
|
|
3601
|
+
"top-start",
|
|
3602
|
+
"top-end",
|
|
3603
|
+
"right-start",
|
|
3604
|
+
"right-end",
|
|
3605
|
+
"bottom-start",
|
|
3606
|
+
"bottom-end",
|
|
3607
|
+
"left-start",
|
|
3608
|
+
"left-end"
|
|
3596
3609
|
];
|
|
3597
3610
|
const correctPosition = {
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3611
|
+
"bottom-center": "bottom",
|
|
3612
|
+
"bottom-left": "bottom-start",
|
|
3613
|
+
"bottom-right": "bottom-end",
|
|
3614
|
+
"left-bottom": "left-end",
|
|
3615
|
+
"left-center": "left",
|
|
3616
|
+
"left-top": "left-start",
|
|
3617
|
+
"right-bottom": "right-end",
|
|
3618
|
+
"right-center": "right",
|
|
3619
|
+
"right-top": "right-start",
|
|
3620
|
+
"top-center": "top",
|
|
3621
|
+
"top-left": "top-start",
|
|
3622
|
+
"top-right": "top-end"
|
|
3623
|
+
};
|
|
3624
|
+
const arrowPositions = {
|
|
3625
|
+
"top-start": "left",
|
|
3626
|
+
"top-end": "right",
|
|
3627
|
+
"bottom-end": "right",
|
|
3628
|
+
"bottom-start": "left"
|
|
3610
3629
|
};
|
|
3611
|
-
const
|
|
3630
|
+
const staticSides = {
|
|
3631
|
+
top: "bottom",
|
|
3632
|
+
right: "left",
|
|
3633
|
+
bottom: "top",
|
|
3634
|
+
left: "right"
|
|
3635
|
+
};
|
|
3636
|
+
const FindAndSetRef = (children, childProps, componentRef, checked, Tooltip) => {
|
|
3637
|
+
let isChecked = checked;
|
|
3612
3638
|
return Children.map(children, (node, i) => {
|
|
3613
3639
|
const el = node;
|
|
3614
3640
|
let newProps = Object.assign({}, childProps);
|
|
3615
3641
|
if (!React__default.isValidElement(el))
|
|
3616
3642
|
return null;
|
|
3617
|
-
if (
|
|
3618
|
-
|
|
3619
|
-
|
|
3643
|
+
if (el.type === Tooltip) {
|
|
3644
|
+
return null;
|
|
3645
|
+
}
|
|
3646
|
+
if (typeof (el === null || el === void 0 ? void 0 : el.type) === "string") {
|
|
3647
|
+
if (!el.ref && i === 0 && !isChecked) {
|
|
3648
|
+
isChecked = true;
|
|
3620
3649
|
newProps = Object.assign(Object.assign({}, newProps), { ref: componentRef });
|
|
3621
3650
|
}
|
|
3622
3651
|
return cloneElement(el, newProps);
|
|
3623
3652
|
}
|
|
3624
|
-
if (typeof (el === null || el === void 0 ? void 0 : el.type) ===
|
|
3653
|
+
if (typeof (el === null || el === void 0 ? void 0 : el.type) === "function") {
|
|
3625
3654
|
if (!el.ref) {
|
|
3626
3655
|
newProps = Object.assign(Object.assign({}, newProps), { ref: componentRef });
|
|
3627
3656
|
}
|
|
3628
|
-
return cloneElement(el.type(el.props), newProps);
|
|
3657
|
+
return FindAndSetRef(cloneElement(el.type(el.props), newProps), newProps, componentRef, isChecked, Tooltip);
|
|
3629
3658
|
}
|
|
3630
3659
|
if ((el === null || el === void 0 ? void 0 : el.type) === Fragment && el.props.children) {
|
|
3631
|
-
return FindAndSetRef(el.props.children, newProps, componentRef,
|
|
3660
|
+
return FindAndSetRef(el.props.children, newProps, componentRef, isChecked, Tooltip);
|
|
3632
3661
|
}
|
|
3633
3662
|
if (reactIsExports.isForwardRef(el)) {
|
|
3634
|
-
return FindAndSetRef(el.type.render(el.props, el.ref), newProps, componentRef,
|
|
3663
|
+
return FindAndSetRef(el.type.render(el.props, el.ref), newProps, componentRef, isChecked, Tooltip);
|
|
3635
3664
|
}
|
|
3636
3665
|
return el && cloneElement(el, newProps);
|
|
3637
3666
|
});
|
|
@@ -3640,9 +3669,7 @@ const FindAndSetRef = (children, childProps, componentRef, checked = false) => {
|
|
|
3640
3669
|
A tooltip is a small, elevated surface that appears to provide contextual information when a user hovers over or focuses on a UI element.
|
|
3641
3670
|
Tooltips should be used to offer helpful plaintext information, not to communicate system feedback. Use a popover instead if you need to deliver structured information or enable interactions.
|
|
3642
3671
|
*/
|
|
3643
|
-
const Tooltip = (
|
|
3644
|
-
var _b;
|
|
3645
|
-
var { children, position = 'top', text, customPosition, alwaysShow, padding = 10, isVisible = true, appearance = 'default', Icon } = _a, props = __rest(_a, ["children", "position", "text", "customPosition", "alwaysShow", "padding", "isVisible", "appearance", "Icon"]);
|
|
3672
|
+
const Tooltip = ({ children, position = "top-right", text, customPosition, alwaysShow, padding = 10, isVisible = true, appearance = "default", Icon }) => {
|
|
3646
3673
|
const { geneUIProviderRef } = useContext(GeneUIDesignSystemContext);
|
|
3647
3674
|
const [isPopoverOpen, setIsPopoverOpen] = useState(false);
|
|
3648
3675
|
const arrowRef = useRef(null);
|
|
@@ -3654,14 +3681,14 @@ const Tooltip = (_a) => {
|
|
|
3654
3681
|
middleware: [
|
|
3655
3682
|
offset(padding),
|
|
3656
3683
|
flip({
|
|
3657
|
-
fallbackAxisSideDirection:
|
|
3684
|
+
fallbackAxisSideDirection: "none",
|
|
3658
3685
|
fallbackPlacements: positions,
|
|
3659
3686
|
mainAxis: true
|
|
3660
3687
|
}),
|
|
3661
3688
|
arrow({ element: arrowRef }),
|
|
3662
3689
|
shift(),
|
|
3663
3690
|
{
|
|
3664
|
-
name:
|
|
3691
|
+
name: "getCustomPosition",
|
|
3665
3692
|
fn: () => customPosition
|
|
3666
3693
|
? {
|
|
3667
3694
|
x: customPosition === null || customPosition === void 0 ? void 0 : customPosition.left,
|
|
@@ -3674,49 +3701,44 @@ const Tooltip = (_a) => {
|
|
|
3674
3701
|
});
|
|
3675
3702
|
const hover = useHover(context);
|
|
3676
3703
|
const { getReferenceProps, getFloatingProps } = useInteractions([hover]);
|
|
3677
|
-
const
|
|
3678
|
-
const component = FindAndSetRef(children, childProps, refs.setReference, false);
|
|
3704
|
+
const component = FindAndSetRef(children, getReferenceProps(), refs.setReference, false, Tooltip);
|
|
3679
3705
|
useEffect(() => {
|
|
3680
3706
|
var _a;
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3707
|
+
if (component.length) {
|
|
3708
|
+
for (let i = 0; i < component.length; i++) {
|
|
3709
|
+
const node = component[i];
|
|
3710
|
+
if (typeof node.ref === "function" && node.ref === refs.setReference) {
|
|
3711
|
+
break;
|
|
3712
|
+
}
|
|
3713
|
+
if ((_a = node === null || node === void 0 ? void 0 : node.ref) === null || _a === void 0 ? void 0 : _a.current) {
|
|
3714
|
+
refs.setReference(node.ref.current);
|
|
3715
|
+
break;
|
|
3716
|
+
}
|
|
3689
3717
|
}
|
|
3690
3718
|
}
|
|
3691
3719
|
}, [component]);
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
left: 'right'
|
|
3698
|
-
}[currentDirection];
|
|
3720
|
+
if (!component.length) {
|
|
3721
|
+
return children;
|
|
3722
|
+
}
|
|
3723
|
+
const [currentDirection] = placement.split("-");
|
|
3724
|
+
const staticSide = staticSides[currentDirection];
|
|
3699
3725
|
const middlewareArrowData = middlewareData.arrow;
|
|
3700
3726
|
const offsetFromEdge = 8;
|
|
3701
|
-
const
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
'bottom-start': 'left'
|
|
3706
|
-
}[placement];
|
|
3707
|
-
const getCorrectPosition = arrowPositions
|
|
3708
|
-
? { [arrowPositions]: offsetFromEdge }
|
|
3709
|
-
: { 'inset-inline-start': (middlewareArrowData === null || middlewareArrowData === void 0 ? void 0 : middlewareArrowData.x) || undefined };
|
|
3727
|
+
const arrowPosition = arrowPositions[placement];
|
|
3728
|
+
const getCorrectPosition = arrowPosition
|
|
3729
|
+
? { [arrowPosition]: offsetFromEdge }
|
|
3730
|
+
: { insetInlineStart: middlewareArrowData === null || middlewareArrowData === void 0 ? void 0 : middlewareArrowData.x };
|
|
3710
3731
|
return (React__default.createElement(React__default.Fragment, null,
|
|
3711
3732
|
component,
|
|
3712
3733
|
isVisible && (alwaysShow || isPopoverOpen) && (React__default.createElement(FloatingPortal, { root: geneUIProviderRef.current },
|
|
3713
|
-
React__default.createElement("div", Object.assign({ className: `tooltip tooltip_color_${appearance} tooltip_position_${currentDirection}`, ref: refs.setFloating, style: floatingStyles },
|
|
3714
|
-
React__default.createElement("div", { className: "tooltip__arrow", ref: arrowRef, style: Object.assign(Object.assign({}, getCorrectPosition), { top:
|
|
3734
|
+
React__default.createElement("div", Object.assign({ className: `tooltip tooltip_color_${appearance} tooltip_position_${currentDirection}`, ref: refs.setFloating, style: floatingStyles }, getFloatingProps()),
|
|
3735
|
+
React__default.createElement("div", { className: "tooltip__arrow", ref: arrowRef, style: Object.assign(Object.assign({}, getCorrectPosition), { top: middlewareArrowData === null || middlewareArrowData === void 0 ? void 0 : middlewareArrowData.y, [staticSide]: arrowRef.current ? `${-arrowRef.current.offsetWidth + 6}px` : 0 }) },
|
|
3715
3736
|
React__default.createElement("svg", { width: "12", height: "4", viewBox: "0 0 12 4", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
3716
|
-
React__default.createElement("path", { className: "tooltip__arrowPath", d: "M6 4L0 0L12 0L6 4Z"
|
|
3737
|
+
React__default.createElement("path", { className: "tooltip__arrowPath", d: "M6 4L0 0L12 0L6 4Z" }))),
|
|
3717
3738
|
React__default.createElement("div", { className: "tooltip__textWrapper" },
|
|
3718
3739
|
React__default.createElement("p", { className: "tooltip__text" }, text)),
|
|
3719
|
-
Icon && React__default.createElement("div", { className: "tooltip__icon" },
|
|
3740
|
+
Icon && (React__default.createElement("div", { className: "tooltip__icon" },
|
|
3741
|
+
React__default.createElement(Icon, { size: 16 }))))))));
|
|
3720
3742
|
};
|
|
3721
3743
|
|
|
3722
|
-
export { Tooltip as
|
|
3744
|
+
export { Tooltip as default };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { FC, PointerEvent
|
|
2
|
-
import
|
|
1
|
+
import React, { FC, PointerEvent } from "react";
|
|
2
|
+
import { IconProps } from "@geneui/icons";
|
|
3
|
+
import "./Avatar.scss";
|
|
3
4
|
interface IAvatarProps {
|
|
4
5
|
/**
|
|
5
6
|
* Avatar background image source.
|
|
@@ -13,19 +14,19 @@ interface IAvatarProps {
|
|
|
13
14
|
* Avatar icon <br/>
|
|
14
15
|
* The `Icon` prop accepts a JSX element that will be displayed as an avatar.
|
|
15
16
|
*/
|
|
16
|
-
Icon?:
|
|
17
|
+
Icon?: React.FC<IconProps>;
|
|
17
18
|
/**
|
|
18
19
|
* This prop defines the width and height for the component <br/>
|
|
19
20
|
* Possible values: `6Xlarge | large | medium | small`
|
|
20
21
|
*/
|
|
21
|
-
size?:
|
|
22
|
+
size?: "6Xlarge" | "large" | "medium" | "small";
|
|
22
23
|
/**
|
|
23
24
|
* Avatar background color. This prop also has an effect on the `fullName` prop color <br/>
|
|
24
25
|
* Possible values: `neutral | blue | red | green | purple | orange | lagoon | magenta | slate `
|
|
25
26
|
*/
|
|
26
|
-
color?:
|
|
27
|
+
color?: "neutral" | "blue" | "red" | "green" | "purple" | "orange" | "lagoon" | "magenta" | "slate";
|
|
27
28
|
/**
|
|
28
|
-
* A callback function is called when the `avatar` is clicked. It receives an argument containing the event object, a mouse or keyboard event.
|
|
29
|
+
* A callback function is called when the `avatar` is clicked. It receives an argument containing the event object, a mouse or keyboard event. If onClick is not passed, the Avatar component becomes a non-interactable element.
|
|
29
30
|
*/
|
|
30
31
|
onClick?: (e: PointerEvent<HTMLButtonElement>) => void;
|
|
31
32
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { IAvatarProps, default } from "./Avatar";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { FC, JSX } from
|
|
2
|
-
import { IconProps } from
|
|
3
|
-
import
|
|
1
|
+
import { FC, JSX } from "react";
|
|
2
|
+
import { IconProps } from "@geneui/icons";
|
|
3
|
+
import "./Divider.scss";
|
|
4
4
|
interface IDividerProps {
|
|
5
5
|
/**
|
|
6
6
|
* Divider visual style <br/>
|
|
7
7
|
* Possible values: `default | strong | brand | inverse`
|
|
8
8
|
*/
|
|
9
|
-
appearance?:
|
|
9
|
+
appearance?: "default" | "strong" | "brand" | "inverse";
|
|
10
10
|
/**
|
|
11
11
|
* Divider content <br/>
|
|
12
12
|
* The `alignContent` prop accepts a JSX element that will be displayed alongside the divider
|
|
@@ -30,7 +30,7 @@ interface IDividerProps {
|
|
|
30
30
|
* Divider `label` position <br/>
|
|
31
31
|
* Possible values: `before | after | center`
|
|
32
32
|
*/
|
|
33
|
-
labelPosition?:
|
|
33
|
+
labelPosition?: "before" | "after" | "center";
|
|
34
34
|
/**
|
|
35
35
|
* provides space between the edge and the divider
|
|
36
36
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { IDividerProps, default } from "./Divider";
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { FC
|
|
2
|
-
import
|
|
1
|
+
import React, { FC } from "react";
|
|
2
|
+
import { IconProps } from "@geneui/icons";
|
|
3
|
+
import "./HelperText.scss";
|
|
3
4
|
interface IHelperTextProps {
|
|
4
5
|
/**
|
|
5
6
|
* Defines the size of the helper text.<br>
|
|
6
7
|
* Possible values: `medium | small`.
|
|
7
8
|
*/
|
|
8
|
-
size?:
|
|
9
|
+
size?: "medium" | "small";
|
|
9
10
|
/**
|
|
10
11
|
* Specifies the type of the helper text. <br>
|
|
11
12
|
* Possible values: `rest | danger | warning`.
|
|
12
13
|
* `rest` for default information, `danger` for error messages, or `warning` for cautions.
|
|
13
14
|
*/
|
|
14
|
-
type?:
|
|
15
|
+
type?: "rest" | "danger" | "warning";
|
|
15
16
|
/**
|
|
16
17
|
* The actual text content to be displayed as helper text.
|
|
17
18
|
* This provides guidance or additional information related to the input field.
|
|
@@ -23,7 +24,7 @@ interface IHelperTextProps {
|
|
|
23
24
|
* If `type` is `rest`, the provided `Icon` will be used (if supplied), otherwise no icon will be displayed.
|
|
24
25
|
* The size of the icon will automatically adjust based on the `size` prop (`small` or `medium`).
|
|
25
26
|
*/
|
|
26
|
-
Icon?:
|
|
27
|
+
Icon?: React.FC<IconProps>;
|
|
27
28
|
/**
|
|
28
29
|
* Determines whether the helper text is disabled.
|
|
29
30
|
* If `true`, the helper text will appear dimmed and non-interactive.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { IHelperTextProps, default } from "./HelperText";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FC } from
|
|
2
|
-
import { IconProps } from
|
|
3
|
-
import
|
|
4
|
-
declare const iconSizes: Record<
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { IconProps } from "@geneui/icons";
|
|
3
|
+
import "./Info.scss";
|
|
4
|
+
declare const iconSizes: Record<"small" | "smallNudge" | "XSmall", IconProps["size"]>;
|
|
5
5
|
interface IInfoProps {
|
|
6
6
|
/**
|
|
7
7
|
* The text that will be displayed inside the tooltip when the user interacts with the info icon.
|
|
@@ -21,7 +21,7 @@ interface IInfoProps {
|
|
|
21
21
|
* Determines the visual appearance of the info icon.<br>
|
|
22
22
|
* Possible values: `default | brand | inverse`
|
|
23
23
|
*/
|
|
24
|
-
appearance?:
|
|
24
|
+
appearance?: "default" | "brand" | "inverse";
|
|
25
25
|
/**
|
|
26
26
|
* Additional class for the parent element.<br>
|
|
27
27
|
* This prop should be used to set placement properties for the element relative to its parent using BEM conventions.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { IInfoProps, default } from "./Info";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { FC, JSX } from
|
|
2
|
-
import
|
|
1
|
+
import { FC, JSX } from "react";
|
|
2
|
+
import "./Label.scss";
|
|
3
3
|
interface ILabelProps {
|
|
4
4
|
/**
|
|
5
5
|
* Label size.<br/>
|
|
6
6
|
* Possible values: `medium | small`
|
|
7
7
|
*/
|
|
8
|
-
size?:
|
|
8
|
+
size?: "medium" | "small";
|
|
9
9
|
/**
|
|
10
10
|
* The text content of the `label`.
|
|
11
11
|
* This is the main text displayed within the `label`.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ILabelProps, default } from "./Label";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FC, ReactNode } from
|
|
2
|
-
import
|
|
1
|
+
import { FC, ReactNode } from "react";
|
|
2
|
+
import "./Loader.scss";
|
|
3
3
|
interface ILoaderProps {
|
|
4
4
|
/**
|
|
5
5
|
* Any valid React node. Renders when "isLoading" is set to false
|
|
@@ -17,17 +17,17 @@ interface ILoaderProps {
|
|
|
17
17
|
* Loader visual style. <br/>
|
|
18
18
|
* Possible values: `brand | neutral | inverse`
|
|
19
19
|
*/
|
|
20
|
-
appearance?:
|
|
20
|
+
appearance?: "brand" | "neutral" | "inverse";
|
|
21
21
|
/**
|
|
22
22
|
* Loader size <br/>
|
|
23
23
|
* Possible values: `2xLarge | xLarge | large | medium | small | smallNudge`
|
|
24
24
|
*/
|
|
25
|
-
size?:
|
|
25
|
+
size?: "2xLarge" | "xLarge" | "large" | "medium" | "small" | "smallNudge";
|
|
26
26
|
/**
|
|
27
27
|
* Loader text position. <br/>.
|
|
28
28
|
* Possible values: `below | after`
|
|
29
29
|
*/
|
|
30
|
-
textPosition?:
|
|
30
|
+
textPosition?: "below" | "after";
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
33
|
*Loading spinner is a visual indicator that informs users an operation is in progress. Typically displayed as a rotating icon or circular animation, it signals that the system is working on a task, such as loading data or processing a request, and that the user should wait until the process is complete.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ILoaderProps, default } from "./Loader";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { FC
|
|
2
|
-
import
|
|
1
|
+
import React, { FC } from "react";
|
|
2
|
+
import { IconProps } from "@geneui/icons";
|
|
3
|
+
import "./Pill.scss";
|
|
3
4
|
interface IPillProps {
|
|
4
5
|
/**
|
|
5
6
|
* The actual text content to be displayed as pill text.
|
|
@@ -10,7 +11,7 @@ interface IPillProps {
|
|
|
10
11
|
* **Note:** If `withDot` is `true` and no custom `Icon` is provided, the dot icon will always be displayed before the text, regardless of the `iconAlignment` value.<br/>
|
|
11
12
|
* Possible values: `before` or `after`.
|
|
12
13
|
*/
|
|
13
|
-
iconAlignment?:
|
|
14
|
+
iconAlignment?: "before" | "after";
|
|
14
15
|
/**
|
|
15
16
|
* Pill visual appearance
|
|
16
17
|
* When `isFill` prop set to `true`, the `pill` will have a solid fill, providing a more prominent visual appearance. If `false`, the `pill` will be displayed with an outlined style.
|
|
@@ -20,12 +21,12 @@ interface IPillProps {
|
|
|
20
21
|
* Pill size
|
|
21
22
|
* Possible values: `smallNudge | small | medium`
|
|
22
23
|
*/
|
|
23
|
-
size?:
|
|
24
|
+
size?: "smallNudge" | "small" | "medium";
|
|
24
25
|
/**
|
|
25
26
|
* Pill icon <br/>
|
|
26
27
|
* The `Icon` prop accepts a JSX element that will be displayed alongside the `text`
|
|
27
28
|
*/
|
|
28
|
-
Icon?:
|
|
29
|
+
Icon?: React.FC<IconProps>;
|
|
29
30
|
/**
|
|
30
31
|
* Displays a dot `Icon` when no custom `Icon` is provided. <br/>
|
|
31
32
|
* If `true`, a dot icon will be shown unless a custom `Icon` is specified. <br/>
|
|
@@ -36,7 +37,7 @@ interface IPillProps {
|
|
|
36
37
|
* Pill color <br/>
|
|
37
38
|
* Possible values: `informative | neutral | error | success | warning | purple | lagoon | magenta | slate | inverse`
|
|
38
39
|
*/
|
|
39
|
-
color?:
|
|
40
|
+
color?: "informative" | "neutral" | "error" | "success" | "warning" | "purple" | "lagoon" | "magenta" | "slate" | "inverse";
|
|
40
41
|
/**
|
|
41
42
|
* Additional class for the parent element.
|
|
42
43
|
* This prop should be used to set placement properties for the element relative to its parent using BEM conventions.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { IPillProps, default } from "./Pill";
|