@geneui/components 2.11.1
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/ActionableList.js +1761 -0
- package/AdvancedSearch.js +872 -0
- package/Alert.js +98 -0
- package/Avatar.js +77 -0
- package/Badge.js +76 -0
- package/Breadcrumb.js +128 -0
- package/BusyLoader.js +69 -0
- package/Button.js +130 -0
- package/CHANGELOG.md +424 -0
- package/Card.js +513 -0
- package/CardList.js +705 -0
- package/CellMeasurerCache-c11cec83.js +229 -0
- package/Charts.js +99 -0
- package/Checkbox.js +232 -0
- package/CheckboxGroup.js +206 -0
- package/CheckboxGroupWithSearch.js +279 -0
- package/Collapse.js +196 -0
- package/ColorPicker.js +210 -0
- package/ComboBox.js +99 -0
- package/Counter.js +99 -0
- package/DateFilter.js +179 -0
- package/DatePicker.js +1231 -0
- package/DatePickerInput.js +30 -0
- package/Divider.js +56 -0
- package/Drawer.js +264 -0
- package/Dropdown.js +99 -0
- package/Editor.js +22965 -0
- package/Empty.js +132 -0
- package/ExtendedInput.js +578 -0
- package/Form.js +116 -0
- package/FormContainer.js +189 -0
- package/FormableCheckbox.js +27 -0
- package/FormableDatePicker.js +39 -0
- package/FormableDropdown.js +105 -0
- package/FormableEditor.js +24 -0
- package/FormableHOC-21051057.js +83 -0
- package/FormableMultiSelectDropdown.js +105 -0
- package/FormableNumberInput.js +31 -0
- package/FormableRadio.js +23 -0
- package/FormableSwitcher.js +23 -0
- package/FormableTextInput.js +31 -0
- package/FormableUploader.js +40 -0
- package/GeneUIProvider.js +256 -0
- package/Grid.js +166 -0
- package/Holder.js +99 -0
- package/Icon.js +63 -0
- package/Image.js +130 -0
- package/ImagePreview.js +99 -0
- package/KeyValue.js +63 -0
- package/Label.js +58 -0
- package/LinkButton.js +104 -0
- package/Menu.js +277 -0
- package/MobileNavigation.js +95 -0
- package/MobilePopup.js +180 -0
- package/Modal.js +251 -0
- package/ModuleTitle.js +99 -0
- package/NavigationMenu.js +212 -0
- package/Notification.js +120 -0
- package/Option.js +186 -0
- package/Overlay.js +99 -0
- package/Overspread.js +343 -0
- package/Pagination.js +258 -0
- package/Paper.js +97 -0
- package/Popover-f4d1cac0.js +411 -0
- package/Popover.js +20 -0
- package/PopoverV2.js +19 -0
- package/Portal.js +58 -0
- package/Products.js +115 -0
- package/Profile.js +99 -0
- package/Progress.js +200 -0
- package/QRCode.js +816 -0
- package/README.md +90 -0
- package/Radio.js +152 -0
- package/RadioGroup.js +105 -0
- package/Range.js +14 -0
- package/RichEditor-b7928765.js +228 -0
- package/RichEditor.js +13 -0
- package/Scrollbar.js +1587 -0
- package/Search.js +72 -0
- package/SearchWithDropdown.js +195 -0
- package/Section.js +62 -0
- package/SkeletonLoader.js +82 -0
- package/Slider.js +256 -0
- package/Status.js +104 -0
- package/Steps.js +312 -0
- package/SuggestionList.js +15 -0
- package/Switcher.js +194 -0
- package/Table.js +102 -0
- package/TableCompositions.js +17028 -0
- package/Tabs.js +236 -0
- package/Tag.js +103 -0
- package/TextLink.js +22 -0
- package/Textarea.js +239 -0
- package/Time.js +63 -0
- package/TimePicker.js +99 -0
- package/Timeline.js +114 -0
- package/Title.js +66 -0
- package/Toaster.js +116 -0
- package/Tooltip.js +157 -0
- package/TransferList.js +502 -0
- package/Uploader.js +32 -0
- package/ValidatableCheckbox.js +126 -0
- package/ValidatableDatePicker.js +312 -0
- package/ValidatableDropdown.js +99 -0
- package/ValidatableElements.js +99 -0
- package/ValidatableMultiSelectDropdown.js +99 -0
- package/ValidatableNumberInput.js +194 -0
- package/ValidatableRadio.js +117 -0
- package/ValidatableSwitcher.js +94 -0
- package/ValidatableTextInput.js +164 -0
- package/ValidatableTimeInput.js +171 -0
- package/ValidatableUploader.js +94 -0
- package/Widget.js +99 -0
- package/_commonjsHelpers-24198af3.js +35 -0
- package/_rollupPluginBabelHelpers-e8fb2e5c.js +16 -0
- package/checkTimeValidation-e56771be.js +16 -0
- package/checkboxRadioSwitcher-5b69d7bd.js +4 -0
- package/clsx.m-2bb6df4b.js +3 -0
- package/configs-91c86664.js +96 -0
- package/configs.js +131 -0
- package/dateValidation-67caec66.js +225 -0
- package/debounce-4419bc2f.js +17 -0
- package/globalStyling-9c60a159.js +4 -0
- package/guid-8ddf77b3.js +16 -0
- package/index-00fe8887.js +193 -0
- package/index-0cf65939.js +30991 -0
- package/index-122432cd.js +270 -0
- package/index-262edd7a.js +77 -0
- package/index-5cea9a7d.js +407 -0
- package/index-5e722d91.js +867 -0
- package/index-67f4d4d1.js +6568 -0
- package/index-6ff23041.js +66 -0
- package/index-702bf24a.js +1938 -0
- package/index-a4635754.js +329 -0
- package/index-a59530cd.js +4 -0
- package/index-ac59cb10.js +169 -0
- package/index-b7a33c58.js +11 -0
- package/index-d9e8a888.js +987 -0
- package/index-e0af0caf.js +1182 -0
- package/index-e8776f3d.js +807 -0
- package/index.js +128 -0
- package/localization-4ba17032.js +46 -0
- package/objectWithoutPropertiesLoose-299691d8.js +78 -0
- package/package.json +190 -0
- package/rangeAndSlider-20599da4.js +8839 -0
- package/react-beautiful-dnd.esm-38c37304.js +10117 -0
- package/style-inject.es-746bb8ed.js +28 -0
- package/useClickOutside-5183e396.js +25 -0
- package/useDeviceType-dd51db38.js +15 -0
- package/useEllipsisDetection-ef536015.js +23 -0
- package/useKeyDown-38102ae7.js +21 -0
- package/useMount-6fef51a5.js +9 -0
- package/useWidth-9f4647f8.js +15 -0
- package/useWindowSize-80369d76.js +33 -0
package/Icon.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { _ as _extends } from './_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { c as classnames } from './index-6ff23041.js';
|
|
4
|
+
import { p as propTypesExports } from './index-e0af0caf.js';
|
|
5
|
+
import './globalStyling-9c60a159.js';
|
|
6
|
+
import { s as styleInject } from './style-inject.es-746bb8ed.js';
|
|
7
|
+
|
|
8
|
+
var css_248z = "[data-gene-ui-version=\"2.11.0\"] .icon{display:block;font-size:2.4rem}[data-gene-ui-version=\"2.11.0\"] .icon.disabled{opacity:.5;pointer-events:none}[data-gene-ui-version=\"2.11.0\"] .icon.bc-icon-loader{overflow:hidden}[data-gene-ui-version=\"2.11.0\"] .icon.bc-icon-loader:before{animation:loader-icon .3s linear infinite;display:block}@keyframes loader-icon{to{transform:rotate(1turn)}}[data-gene-ui-version=\"2.11.0\"] [dir=rtl] .bc-icon-arrow-right-nav:before{content:\"\\e906\"}[data-gene-ui-version=\"2.11.0\"] [dir=rtl] .bc-icon-arrow-left-nav:before{content:\"\\e90a\"}[data-gene-ui-version=\"2.11.0\"] [dir=rtl] .bc-icon-arrow-right:before{content:\"\\e907\"}[data-gene-ui-version=\"2.11.0\"] [dir=rtl] .bc-icon-arrow-left:before{content:\"\\e90b\"}[data-gene-ui-version=\"2.11.0\"] [dir=rtl] .bc-icon-arrow-forward:before{content:\"\\e901\"}[data-gene-ui-version=\"2.11.0\"] [dir=rtl] .bc-icon-left-outline:before{content:\"\\e959\"}[data-gene-ui-version=\"2.11.0\"] [dir=rtl] .bc-icon-right-outline:before{content:\"\\e955\"}[data-gene-ui-version=\"2.11.0\"] [dir=rtl] .bc-icon-forwards:before{content:\"\\e95b\"}[data-gene-ui-version=\"2.11.0\"] [dir=rtl] .bc-icon-backwards:before{content:\"\\e95a\"}";
|
|
9
|
+
styleInject(css_248z);
|
|
10
|
+
|
|
11
|
+
// This this because in production we need to replace 'nonames.com' with host
|
|
12
|
+
// but in development mode we need to put 'nonames.com'
|
|
13
|
+
function getMainHost() {
|
|
14
|
+
const parts = window.location.host.split('.');
|
|
15
|
+
if (parts.length < 2) return 'nonamens.com';
|
|
16
|
+
return "".concat(parts[parts.length - 2], ".").concat(parts[parts.length - 1]);
|
|
17
|
+
}
|
|
18
|
+
const host = process.env.REACT_APP_ICON_URL || process.env.REACT_APP_NODE === 'production' ? getMainHost() : 'nonamens.com';
|
|
19
|
+
if (process.env.REACT_APP_CUSTOM_ICON_URL) {
|
|
20
|
+
document.head.appendChild(document.createElement('style')).textContent = "@import url('".concat(window.location.protocol, "//").concat(window.location.host, "/core-icons/import.css?v=").concat(Math.floor(Math.random() * 666) + 1);
|
|
21
|
+
} else {
|
|
22
|
+
document.head.appendChild(document.createElement('style')).textContent = "@import url('https://sharedassets.".concat(host, "/core-icons/import.css?v=").concat(Math.floor(Math.random() * 666) + 1);
|
|
23
|
+
}
|
|
24
|
+
function Icon(_ref) {
|
|
25
|
+
let {
|
|
26
|
+
type,
|
|
27
|
+
disabled,
|
|
28
|
+
className,
|
|
29
|
+
isFilled,
|
|
30
|
+
...restProps
|
|
31
|
+
} = _ref;
|
|
32
|
+
return /*#__PURE__*/React__default.createElement("i", _extends({}, restProps, {
|
|
33
|
+
className: classnames('icon', className, {
|
|
34
|
+
[type]: !!type,
|
|
35
|
+
disabled
|
|
36
|
+
})
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
|
+
Icon.propTypes = {
|
|
40
|
+
/**
|
|
41
|
+
* Type is the exact icon. You can find valid "type" values in the documentation example
|
|
42
|
+
*/
|
|
43
|
+
type: propTypesExports.string,
|
|
44
|
+
/**
|
|
45
|
+
* Additional className
|
|
46
|
+
*/
|
|
47
|
+
className: propTypesExports.string,
|
|
48
|
+
/**
|
|
49
|
+
* Icon disabled state
|
|
50
|
+
*/
|
|
51
|
+
disabled: propTypesExports.bool,
|
|
52
|
+
/**
|
|
53
|
+
* Will fill the icon when set to "true"
|
|
54
|
+
*/
|
|
55
|
+
isFilled: propTypesExports.bool
|
|
56
|
+
};
|
|
57
|
+
Icon.defaultProps = {
|
|
58
|
+
disabled: false,
|
|
59
|
+
isFilled: false,
|
|
60
|
+
type: ''
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export { Icon as default };
|
package/Image.js
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { _ as _extends } from './_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
2
|
+
import React__default, { useMemo } from 'react';
|
|
3
|
+
import { p as propTypesExports } from './index-e0af0caf.js';
|
|
4
|
+
import { c as classnames } from './index-6ff23041.js';
|
|
5
|
+
import Empty from './Empty.js';
|
|
6
|
+
import Tooltip from './Tooltip.js';
|
|
7
|
+
import Checkbox from './Checkbox.js';
|
|
8
|
+
import './globalStyling-9c60a159.js';
|
|
9
|
+
import { s as styleInject } from './style-inject.es-746bb8ed.js';
|
|
10
|
+
import './Popover-f4d1cac0.js';
|
|
11
|
+
import './_commonjsHelpers-24198af3.js';
|
|
12
|
+
import 'react-dom';
|
|
13
|
+
import './configs-91c86664.js';
|
|
14
|
+
import './index-ac59cb10.js';
|
|
15
|
+
import './dateValidation-67caec66.js';
|
|
16
|
+
import './useDeviceType-dd51db38.js';
|
|
17
|
+
import './useWindowSize-80369d76.js';
|
|
18
|
+
import './GeneUIProvider.js';
|
|
19
|
+
import './checkboxRadioSwitcher-5b69d7bd.js';
|
|
20
|
+
import './guid-8ddf77b3.js';
|
|
21
|
+
|
|
22
|
+
var css_248z = "[data-gene-ui-version=\"2.11.0\"] .image-holder{--image-border-radius:1rem;padding:100% 0 0;position:relative;transition:box-shadow .4s;-webkit-user-select:none;user-select:none;width:100%}[data-gene-ui-version=\"2.11.0\"] .image-holder.with-border{--distance:0.8rem;--image-border-radius:0.6rem;border-radius:1rem;box-shadow:inset 0 0 0 1px rgba(var(--background-sc-rgb),.2)}[data-gene-ui-version=\"2.11.0\"] .image-holder.with-border:hover{box-shadow:inset 0 0 0 1px rgba(var(--background-sc-rgb),.5)}[data-gene-ui-version=\"2.11.0\"] .image-holder.with-border.error{box-shadow:inset 0 0 0 1px rgba(var(--danger-rgb),.5)}[data-gene-ui-version=\"2.11.0\"] .image-holder.with-border.error:hover{box-shadow:inset 0 0 0 1px var(--danger)}[data-gene-ui-version=\"2.11.0\"] .image-content{bottom:var(--distance,0);left:var(--distance,0);position:absolute;right:var(--distance,0);top:var(--distance,0)}[data-gene-ui-version=\"2.11.0\"] .image-content img{border-radius:var(--image-border-radius);display:block;height:100%;object-fit:cover;width:100%}[data-gene-ui-version=\"2.11.0\"] .image-label-holder{background:#0003;border-radius:var(--image-border-radius);cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%}[data-gene-ui-version=\"2.11.0\"] .image-heading{align-items:center;display:flex;left:0;padding:0 .7rem;position:absolute;top:1.2rem;width:100%}[data-gene-ui-version=\"2.11.0\"] .image-heading>li{margin:0 .5rem}[data-gene-ui-version=\"2.11.0\"] .image-heading>li.image-cra{background:#fff;border-radius:.3rem;flex-shrink:0}[data-gene-ui-version=\"2.11.0\"] .image-heading>li.image-title{color:#fff;flex:auto;font:700 1.2rem/2rem var(--font-family)}[data-gene-ui-version=\"2.11.0\"] .image-actions-holder{align-items:center;background:#0009;border-radius:var(--image-border-radius);display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;transition:opacity .4s,visibility .4s;width:100%}[data-gene-ui-version=\"2.11.0\"] .image-holder:not(:hover) .image-actions-holder{opacity:0;visibility:hidden}[data-gene-ui-version=\"2.11.0\"] .image-actions{align-items:center;display:flex}[data-gene-ui-version=\"2.11.0\"] .image-actions>*{box-shadow:inset 0 0 0 5rem #ffffffe6}html:not([dir=rtl]) .image-actions>*+*{margin-left:.5rem}html[dir=rtl] .image-actions>*+*{margin-right:.5rem}[data-gene-ui-version=\"2.11.0\"] .image-empty-state-holder{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}";
|
|
23
|
+
styleInject(css_248z);
|
|
24
|
+
|
|
25
|
+
function Image(_ref) {
|
|
26
|
+
let {
|
|
27
|
+
src,
|
|
28
|
+
withBorder,
|
|
29
|
+
selectMode,
|
|
30
|
+
actions,
|
|
31
|
+
title,
|
|
32
|
+
imageProps,
|
|
33
|
+
checkboxProps,
|
|
34
|
+
className,
|
|
35
|
+
isValid,
|
|
36
|
+
tooltipTitle,
|
|
37
|
+
emptyText,
|
|
38
|
+
...restProps
|
|
39
|
+
} = _ref;
|
|
40
|
+
const isValidSource = useMemo(() => typeof src === 'string' && src !== '', [src]);
|
|
41
|
+
return /*#__PURE__*/React__default.createElement(Tooltip, {
|
|
42
|
+
title: tooltipTitle
|
|
43
|
+
}, /*#__PURE__*/React__default.createElement("div", _extends({
|
|
44
|
+
className: classnames('image-holder', className, {
|
|
45
|
+
'with-border': withBorder,
|
|
46
|
+
error: !isValid
|
|
47
|
+
})
|
|
48
|
+
}, restProps), isValidSource ? /*#__PURE__*/React__default.createElement("div", {
|
|
49
|
+
className: "image-content"
|
|
50
|
+
}, /*#__PURE__*/React__default.createElement("img", _extends({
|
|
51
|
+
src: src,
|
|
52
|
+
alt: title
|
|
53
|
+
}, imageProps)), selectMode && /*#__PURE__*/React__default.createElement("label", {
|
|
54
|
+
className: "image-label-holder"
|
|
55
|
+
}, /*#__PURE__*/React__default.createElement("ul", {
|
|
56
|
+
className: "image-heading"
|
|
57
|
+
}, /*#__PURE__*/React__default.createElement("li", {
|
|
58
|
+
className: "image-cra"
|
|
59
|
+
}, /*#__PURE__*/React__default.createElement(Checkbox, _extends({
|
|
60
|
+
size: "big"
|
|
61
|
+
}, checkboxProps))), title && /*#__PURE__*/React__default.createElement("li", {
|
|
62
|
+
className: "image-title ellipsis-text"
|
|
63
|
+
}, title))), actions && !selectMode && /*#__PURE__*/React__default.createElement("div", {
|
|
64
|
+
className: "image-actions-holder"
|
|
65
|
+
}, title && /*#__PURE__*/React__default.createElement("ul", {
|
|
66
|
+
className: "image-heading"
|
|
67
|
+
}, /*#__PURE__*/React__default.createElement("li", {
|
|
68
|
+
className: "image-title ellipsis-text"
|
|
69
|
+
}, title)), /*#__PURE__*/React__default.createElement("div", {
|
|
70
|
+
className: "image-actions"
|
|
71
|
+
}, actions))) : /*#__PURE__*/React__default.createElement(Empty, {
|
|
72
|
+
type: "data",
|
|
73
|
+
title: emptyText,
|
|
74
|
+
className: "image-empty-state-holder"
|
|
75
|
+
})));
|
|
76
|
+
}
|
|
77
|
+
Image.propTypes = {
|
|
78
|
+
/**
|
|
79
|
+
* Image path to display
|
|
80
|
+
*/
|
|
81
|
+
src: propTypesExports.string.isRequired,
|
|
82
|
+
/**
|
|
83
|
+
* Will add a border when set to "true"
|
|
84
|
+
*/
|
|
85
|
+
withBorder: propTypesExports.bool,
|
|
86
|
+
/**
|
|
87
|
+
* The property will add a checkbox and an overlay over the image.
|
|
88
|
+
*/
|
|
89
|
+
selectMode: propTypesExports.bool,
|
|
90
|
+
/**
|
|
91
|
+
* Customize checkbox(will be rendered only when "selectMode" is set to "true").
|
|
92
|
+
*/
|
|
93
|
+
checkboxProps: propTypesExports.object,
|
|
94
|
+
/**
|
|
95
|
+
* Customize image tag with this property.
|
|
96
|
+
*/
|
|
97
|
+
imageProps: propTypesExports.object,
|
|
98
|
+
/**
|
|
99
|
+
* The property will render "actions" when "selectMode" is not setted to "true". Any valid React node
|
|
100
|
+
*/
|
|
101
|
+
actions: propTypesExports.node,
|
|
102
|
+
/**
|
|
103
|
+
* Will add a title to the top of Image atom. Any valid React node
|
|
104
|
+
*/
|
|
105
|
+
title: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.node]),
|
|
106
|
+
/**
|
|
107
|
+
* Title for 'Tooltip'.
|
|
108
|
+
*/
|
|
109
|
+
tooltipTitle: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.node]),
|
|
110
|
+
/**
|
|
111
|
+
* Addional className
|
|
112
|
+
*/
|
|
113
|
+
className: propTypesExports.string,
|
|
114
|
+
/**
|
|
115
|
+
* Image atom also can be included in "Form" organism. It can be validated as other "Form" elements
|
|
116
|
+
*/
|
|
117
|
+
isValid: propTypesExports.bool,
|
|
118
|
+
/**
|
|
119
|
+
* Empty state text for component
|
|
120
|
+
*/
|
|
121
|
+
emptyText: propTypesExports.string
|
|
122
|
+
};
|
|
123
|
+
Image.defaultProps = {
|
|
124
|
+
withBorder: false,
|
|
125
|
+
selectMode: false,
|
|
126
|
+
isValid: true,
|
|
127
|
+
emptyText: 'No image to display'
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
export { Image as default };
|
package/ImagePreview.js
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import './_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import './index-e0af0caf.js';
|
|
4
|
+
export { I as default } from './index-0cf65939.js';
|
|
5
|
+
import './Portal.js';
|
|
6
|
+
import './index-b7a33c58.js';
|
|
7
|
+
import './Editor.js';
|
|
8
|
+
import './_commonjsHelpers-24198af3.js';
|
|
9
|
+
import 'react-dom';
|
|
10
|
+
import './index-6ff23041.js';
|
|
11
|
+
import './index-ac59cb10.js';
|
|
12
|
+
import './dateValidation-67caec66.js';
|
|
13
|
+
import './useMount-6fef51a5.js';
|
|
14
|
+
import './useDeviceType-dd51db38.js';
|
|
15
|
+
import './configs-91c86664.js';
|
|
16
|
+
import './useWindowSize-80369d76.js';
|
|
17
|
+
import './Button.js';
|
|
18
|
+
import './Icon.js';
|
|
19
|
+
import './globalStyling-9c60a159.js';
|
|
20
|
+
import './style-inject.es-746bb8ed.js';
|
|
21
|
+
import './ValidatableUploader.js';
|
|
22
|
+
import './index-d9e8a888.js';
|
|
23
|
+
import './Grid.js';
|
|
24
|
+
import './useWidth-9f4647f8.js';
|
|
25
|
+
import './useKeyDown-38102ae7.js';
|
|
26
|
+
import './BusyLoader.js';
|
|
27
|
+
import './Image.js';
|
|
28
|
+
import './Empty.js';
|
|
29
|
+
import './Tooltip.js';
|
|
30
|
+
import './Popover-f4d1cac0.js';
|
|
31
|
+
import './GeneUIProvider.js';
|
|
32
|
+
import './Checkbox.js';
|
|
33
|
+
import './checkboxRadioSwitcher-5b69d7bd.js';
|
|
34
|
+
import './guid-8ddf77b3.js';
|
|
35
|
+
import './ExtendedInput.js';
|
|
36
|
+
import './index-5cea9a7d.js';
|
|
37
|
+
import './useClickOutside-5183e396.js';
|
|
38
|
+
import './Scrollbar.js';
|
|
39
|
+
import './ValidatableRadio.js';
|
|
40
|
+
import './RadioGroup.js';
|
|
41
|
+
import './Radio.js';
|
|
42
|
+
import './ValidatableCheckbox.js';
|
|
43
|
+
import './ValidatableSwitcher.js';
|
|
44
|
+
import './Switcher.js';
|
|
45
|
+
import './ValidatableNumberInput.js';
|
|
46
|
+
import './ValidatableTextInput.js';
|
|
47
|
+
import './ValidatableDatePicker.js';
|
|
48
|
+
import './index-5e722d91.js';
|
|
49
|
+
import './index-702bf24a.js';
|
|
50
|
+
import './index-122432cd.js';
|
|
51
|
+
import './debounce-4419bc2f.js';
|
|
52
|
+
import './DatePicker.js';
|
|
53
|
+
import './localization-4ba17032.js';
|
|
54
|
+
import './checkTimeValidation-e56771be.js';
|
|
55
|
+
import './useEllipsisDetection-ef536015.js';
|
|
56
|
+
import './Tabs.js';
|
|
57
|
+
import './Steps.js';
|
|
58
|
+
import './index-a4635754.js';
|
|
59
|
+
import './Timeline.js';
|
|
60
|
+
import './Card.js';
|
|
61
|
+
import './MobilePopup.js';
|
|
62
|
+
import './Menu.js';
|
|
63
|
+
import './Option.js';
|
|
64
|
+
import './SkeletonLoader.js';
|
|
65
|
+
import './KeyValue.js';
|
|
66
|
+
import './configs.js';
|
|
67
|
+
import './Tag.js';
|
|
68
|
+
import './Alert.js';
|
|
69
|
+
import './index-00fe8887.js';
|
|
70
|
+
import './rangeAndSlider-20599da4.js';
|
|
71
|
+
import './Slider.js';
|
|
72
|
+
import './Pagination.js';
|
|
73
|
+
import './Divider.js';
|
|
74
|
+
import './objectWithoutPropertiesLoose-299691d8.js';
|
|
75
|
+
import './clsx.m-2bb6df4b.js';
|
|
76
|
+
import './index-a59530cd.js';
|
|
77
|
+
import './Notification.js';
|
|
78
|
+
import './Modal.js';
|
|
79
|
+
import './Collapse.js';
|
|
80
|
+
import './Status.js';
|
|
81
|
+
import './Avatar.js';
|
|
82
|
+
import './Search.js';
|
|
83
|
+
import './TextLink.js';
|
|
84
|
+
import './Label.js';
|
|
85
|
+
import './Paper.js';
|
|
86
|
+
import './Badge.js';
|
|
87
|
+
import './Time.js';
|
|
88
|
+
import './Title.js';
|
|
89
|
+
import './QRCode.js';
|
|
90
|
+
import './Progress.js';
|
|
91
|
+
import './MobileNavigation.js';
|
|
92
|
+
import './Products.js';
|
|
93
|
+
import './Breadcrumb.js';
|
|
94
|
+
import './Section.js';
|
|
95
|
+
import './ColorPicker.js';
|
|
96
|
+
import './NavigationMenu.js';
|
|
97
|
+
import './Textarea.js';
|
|
98
|
+
import './AdvancedSearch.js';
|
|
99
|
+
import './LinkButton.js';
|
package/KeyValue.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { _ as _extends } from './_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { p as propTypesExports } from './index-e0af0caf.js';
|
|
4
|
+
import { c as classnames } from './index-6ff23041.js';
|
|
5
|
+
import Icon from './Icon.js';
|
|
6
|
+
import { keyValueConfig } from './configs.js';
|
|
7
|
+
import './globalStyling-9c60a159.js';
|
|
8
|
+
import { s as styleInject } from './style-inject.es-746bb8ed.js';
|
|
9
|
+
|
|
10
|
+
var css_248z = "[data-gene-ui-version=\"2.11.0\"] .geneKeyValue{align-items:flex-start;display:flex;flex-wrap:wrap;width:100%}[data-gene-ui-version=\"2.11.0\"] .geneKeyValue--horizontal{align-items:center;flex-wrap:nowrap}[data-gene-ui-version=\"2.11.0\"] .geneKeyValue__icon{padding:0 0 0 8px}[data-gene-ui-version=\"2.11.0\"] .geneKeyValue__label{color:#3c4043b3;flex:1 1;font-size:12px;font-weight:600;line-height:24px;margin:0 0 1rem 1rem;max-width:100%;width:100%}[data-gene-ui-version=\"2.11.0\"] .geneKeyValue__label--horizontal{flex:none;margin:0 0 0 1rem;max-width:50%;width:auto}[data-gene-ui-version=\"2.11.0\"] .geneKeyValue__value{font-size:14px;font-weight:600;line-height:24px;margin:0 1rem;max-width:100%;width:100%}[data-gene-ui-version=\"2.11.0\"] .geneKeyValue__value--horizontal{margin:0 1rem;max-width:50%}[data-gene-ui-version=\"2.11.0\"] .geneKeyValue__iconWrapper+p+p:not(.geneKeyValue__value--horizontal){margin:0 3.2rem 0 4.2rem}[data-gene-ui-version=\"2.11.0\"] [dir=rtl] .geneKeyValue__iconWrapper+p+p:not(.geneKeyValue__value--horizontal){margin:0 3.2rem 0 0}[data-gene-ui-version=\"2.11.0\"] [dir=rtl] .geneKeyValue__label{direction:ltr;margin:0 1rem 1rem 0}[data-gene-ui-version=\"2.11.0\"] [dir=rtl] .geneKeyValue__label--horizontal{margin:0 0 0 1rem}[data-gene-ui-version=\"2.11.0\"] [dir=rtl] .geneKeyValue__value{direction:ltr}[data-gene-ui-version=\"2.11.0\"] [dir=rtl] .geneKeyValue__iconWrapper+p:not(.geneKeyValue__label--horizontal){margin:0 0 1rem}";
|
|
11
|
+
styleInject(css_248z);
|
|
12
|
+
|
|
13
|
+
// TODO need to refine where is using restProps
|
|
14
|
+
function KeyValue(_ref) {
|
|
15
|
+
var _keyValueConfig$appea, _keyValueConfig$appea2, _keyValueConfig$appea3, _keyValueConfig$appea4;
|
|
16
|
+
let {
|
|
17
|
+
label,
|
|
18
|
+
value,
|
|
19
|
+
className,
|
|
20
|
+
icon,
|
|
21
|
+
appearance,
|
|
22
|
+
...restProps
|
|
23
|
+
} = _ref;
|
|
24
|
+
return /*#__PURE__*/React__default.createElement("div", _extends({}, restProps, {
|
|
25
|
+
className: classnames("geneKeyValue ".concat(className), (_keyValueConfig$appea = keyValueConfig.appearance[appearance]) === null || _keyValueConfig$appea === void 0 ? void 0 : _keyValueConfig$appea.parentItemClassName)
|
|
26
|
+
}), icon && /*#__PURE__*/React__default.createElement("div", {
|
|
27
|
+
className: "geneKeyValue__iconWrapper"
|
|
28
|
+
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
29
|
+
type: icon,
|
|
30
|
+
className: classnames('geneKeyValue__icon', (_keyValueConfig$appea2 = keyValueConfig.appearance[appearance]) === null || _keyValueConfig$appea2 === void 0 ? void 0 : _keyValueConfig$appea2.iconClassName)
|
|
31
|
+
})), /*#__PURE__*/React__default.createElement("p", {
|
|
32
|
+
role: "heading",
|
|
33
|
+
"aria-level": "1",
|
|
34
|
+
className: classnames('geneKeyValue__label ellipsis-text', (_keyValueConfig$appea3 = keyValueConfig.appearance[appearance]) === null || _keyValueConfig$appea3 === void 0 ? void 0 : _keyValueConfig$appea3.labelClassName)
|
|
35
|
+
}, label), /*#__PURE__*/React__default.createElement("p", {
|
|
36
|
+
className: classnames('geneKeyValue__value ellipsis-text', (_keyValueConfig$appea4 = keyValueConfig.appearance[appearance]) === null || _keyValueConfig$appea4 === void 0 ? void 0 : _keyValueConfig$appea4.valueClassName)
|
|
37
|
+
}, value));
|
|
38
|
+
}
|
|
39
|
+
KeyValue.propTypes = {
|
|
40
|
+
/**
|
|
41
|
+
* Label for 'KeyValue'.
|
|
42
|
+
*/
|
|
43
|
+
label: propTypesExports.node.isRequired,
|
|
44
|
+
/**
|
|
45
|
+
* Value for 'KeyValue'.
|
|
46
|
+
*/
|
|
47
|
+
value: propTypesExports.node,
|
|
48
|
+
/**
|
|
49
|
+
* External/Additional className that can be added to 'KeyValue' component.
|
|
50
|
+
*/
|
|
51
|
+
className: propTypesExports.string,
|
|
52
|
+
/**
|
|
53
|
+
* The way how the KeyValue should be displayed.
|
|
54
|
+
*/
|
|
55
|
+
appearance: propTypesExports.oneOf(Object.keys(keyValueConfig.appearance))
|
|
56
|
+
};
|
|
57
|
+
KeyValue.defaultProps = {
|
|
58
|
+
value: '',
|
|
59
|
+
className: '',
|
|
60
|
+
appearance: keyValueConfig.appearance.horizontal._key
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export { KeyValue as default };
|
package/Label.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { p as propTypesExports } from './index-e0af0caf.js';
|
|
3
|
+
import { c as classnames } from './index-6ff23041.js';
|
|
4
|
+
import './globalStyling-9c60a159.js';
|
|
5
|
+
import { s as styleInject } from './style-inject.es-746bb8ed.js';
|
|
6
|
+
|
|
7
|
+
var css_248z = "[data-gene-ui-version=\"2.11.0\"] .label{display:inline-block;font-weight:400;max-width:100%;overflow:hidden;text-overflow:ellipsis;vertical-align:top;white-space:nowrap}[data-gene-ui-version=\"2.11.0\"] .label.bold{font-weight:bolder}[data-gene-ui-version=\"2.11.0\"] .label.semiBold{font-weight:700}";
|
|
8
|
+
styleInject(css_248z);
|
|
9
|
+
|
|
10
|
+
const labels = {
|
|
11
|
+
headingExtraLarge: 'h1',
|
|
12
|
+
headingLarge: 'h1',
|
|
13
|
+
headingBig: 'h2',
|
|
14
|
+
heading: 'h3',
|
|
15
|
+
bodyBig: 'h4',
|
|
16
|
+
body: 'h5',
|
|
17
|
+
bodySmall: 'h6',
|
|
18
|
+
content: 'p'
|
|
19
|
+
};
|
|
20
|
+
function Label(_ref) {
|
|
21
|
+
let {
|
|
22
|
+
children,
|
|
23
|
+
className,
|
|
24
|
+
size,
|
|
25
|
+
font,
|
|
26
|
+
...restProps
|
|
27
|
+
} = _ref;
|
|
28
|
+
return /*#__PURE__*/React__default.createElement(labels[size], {
|
|
29
|
+
className: classnames('label', className, font, {
|
|
30
|
+
large: size === 'headingExtraLarge'
|
|
31
|
+
}),
|
|
32
|
+
...restProps
|
|
33
|
+
}, children);
|
|
34
|
+
}
|
|
35
|
+
Label.propTypes = {
|
|
36
|
+
/**
|
|
37
|
+
* Any valid React node.
|
|
38
|
+
*/
|
|
39
|
+
children: propTypesExports.string.isRequired,
|
|
40
|
+
/**
|
|
41
|
+
* Label sizing
|
|
42
|
+
*/
|
|
43
|
+
size: propTypesExports.oneOf(['headingExtraLarge', 'headingLarge', 'headingBig', 'heading', 'bodyBig', 'body', 'bodySmall', 'content']),
|
|
44
|
+
/**
|
|
45
|
+
* Label font to be used
|
|
46
|
+
*/
|
|
47
|
+
font: propTypesExports.oneOf(['regular', 'semiBold', 'bold']),
|
|
48
|
+
/**
|
|
49
|
+
* Addional className
|
|
50
|
+
*/
|
|
51
|
+
className: propTypesExports.string
|
|
52
|
+
};
|
|
53
|
+
Label.defaultProps = {
|
|
54
|
+
size: 'content',
|
|
55
|
+
font: 'regular'
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export { Label as default };
|
package/LinkButton.js
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { _ as _extends } from './_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
2
|
+
import React__default, { useCallback, useMemo } from 'react';
|
|
3
|
+
import { p as propTypesExports } from './index-e0af0caf.js';
|
|
4
|
+
import { c as classnames } from './index-6ff23041.js';
|
|
5
|
+
import { s as styleInject } from './style-inject.es-746bb8ed.js';
|
|
6
|
+
import Icon from './Icon.js';
|
|
7
|
+
import { n as noop } from './index-b7a33c58.js';
|
|
8
|
+
import './globalStyling-9c60a159.js';
|
|
9
|
+
import './dateValidation-67caec66.js';
|
|
10
|
+
import './_commonjsHelpers-24198af3.js';
|
|
11
|
+
import 'react-dom';
|
|
12
|
+
|
|
13
|
+
var css_248z = "[data-gene-ui-version=\"2.11.0\"] .linkButton{align-items:center;color:var(--hero);cursor:pointer;display:flex;max-width:-webkit-fit-content;max-width:-moz-fit-content;max-width:fit-content;padding:0 .8rem}[data-gene-ui-version=\"2.11.0\"] .linkButton:focus-visible{border-radius:.4rem;outline:.2rem var(--hero) solid}[data-gene-ui-version=\"2.11.0\"] .linkButton__icon{display:inline-block}[data-gene-ui-version=\"2.11.0\"] .linkButton-disable{opacity:.3;pointer-events:none}";
|
|
14
|
+
styleInject(css_248z);
|
|
15
|
+
|
|
16
|
+
function LinkButton(_ref) {
|
|
17
|
+
let {
|
|
18
|
+
href,
|
|
19
|
+
onClick,
|
|
20
|
+
children,
|
|
21
|
+
iconAfter,
|
|
22
|
+
className,
|
|
23
|
+
iconBefore,
|
|
24
|
+
isDisabled,
|
|
25
|
+
onMouseDown,
|
|
26
|
+
ariaLabel,
|
|
27
|
+
...restProps
|
|
28
|
+
} = _ref;
|
|
29
|
+
const onClickHandler = useCallback(e => onClick(e), [href]);
|
|
30
|
+
const onMouseDownHandler = useCallback(e => onMouseDown(e), [href]);
|
|
31
|
+
const attributes = useMemo(() => ({
|
|
32
|
+
className: classnames('linkButton', {
|
|
33
|
+
'linkButton-disable': isDisabled
|
|
34
|
+
}, className),
|
|
35
|
+
onMouseDown: onMouseDownHandler,
|
|
36
|
+
onClick: onClickHandler,
|
|
37
|
+
...(ariaLabel ? {
|
|
38
|
+
'aria-label': ariaLabel
|
|
39
|
+
} : {}),
|
|
40
|
+
...restProps
|
|
41
|
+
}), [isDisabled, className, onMouseDownHandler, onClickHandler, restProps]);
|
|
42
|
+
const content = useMemo(() => /*#__PURE__*/React__default.createElement(React__default.Fragment, null, iconBefore && /*#__PURE__*/React__default.createElement(Icon, {
|
|
43
|
+
type: iconBefore,
|
|
44
|
+
className: "linkButton__icon"
|
|
45
|
+
}), children, iconAfter && /*#__PURE__*/React__default.createElement(Icon, {
|
|
46
|
+
type: iconAfter,
|
|
47
|
+
className: "linkButton__icon"
|
|
48
|
+
})), [iconBefore, children, iconAfter]);
|
|
49
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, href ? /*#__PURE__*/React__default.createElement("a", _extends({}, attributes, {
|
|
50
|
+
href: href
|
|
51
|
+
}), content) : /*#__PURE__*/React__default.createElement("button", _extends({}, attributes, {
|
|
52
|
+
type: "button"
|
|
53
|
+
}), content));
|
|
54
|
+
}
|
|
55
|
+
LinkButton.propTypes = {
|
|
56
|
+
/**
|
|
57
|
+
* Href for <code>\<a\></code> tag if you don't pass instead of <code>\<a\></code> tag will be <code>\<button\></code> tag .
|
|
58
|
+
*/
|
|
59
|
+
href: propTypesExports.string,
|
|
60
|
+
/**
|
|
61
|
+
* Fires event when user click on LinkButton.
|
|
62
|
+
* <br>
|
|
63
|
+
* <code>(event: Event) => void </code>
|
|
64
|
+
*/
|
|
65
|
+
onClick: propTypesExports.func,
|
|
66
|
+
/**
|
|
67
|
+
* Fires event when the element has been pressed.
|
|
68
|
+
* <br>
|
|
69
|
+
* <code>(event: Event) => void</code>
|
|
70
|
+
*/
|
|
71
|
+
onMouseDown: propTypesExports.func,
|
|
72
|
+
/**
|
|
73
|
+
* The LinkButton additional className.
|
|
74
|
+
*/
|
|
75
|
+
className: propTypesExports.string,
|
|
76
|
+
/**
|
|
77
|
+
* Any valid React node.
|
|
78
|
+
*/
|
|
79
|
+
children: propTypesExports.node,
|
|
80
|
+
/**
|
|
81
|
+
* Icon to render before the LinkButton. Should be an icon component's type.
|
|
82
|
+
*/
|
|
83
|
+
iconBefore: propTypesExports.string,
|
|
84
|
+
/**
|
|
85
|
+
* Icon to render after the LinkButton. Should be an icon component's type.
|
|
86
|
+
*/
|
|
87
|
+
iconAfter: propTypesExports.string,
|
|
88
|
+
/**
|
|
89
|
+
* Makes the LinkButton disabled.
|
|
90
|
+
*/
|
|
91
|
+
isDisabled: propTypesExports.bool,
|
|
92
|
+
/**
|
|
93
|
+
* aria-label for button or LinkButton.
|
|
94
|
+
*/
|
|
95
|
+
ariaLabel: propTypesExports.string
|
|
96
|
+
};
|
|
97
|
+
LinkButton.defaultProps = {
|
|
98
|
+
children: 'LinkButton example',
|
|
99
|
+
isDisabled: false,
|
|
100
|
+
onMouseDown: noop
|
|
101
|
+
};
|
|
102
|
+
LinkButton.displayName = 'LinkButton';
|
|
103
|
+
|
|
104
|
+
export { LinkButton as default };
|