@neo4j-ndl/react 0.1.0 → 0.1.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/lib/alert/Alert.d.ts +9 -4
- package/lib/alert/Alert.js +13 -6
- package/lib/alert/Alert.js.map +1 -1
- package/lib/button/Button.d.ts +2 -2
- package/lib/button/Button.js +21 -19
- package/lib/button/Button.js.map +1 -1
- package/lib/checkbox/Checkbox.js +3 -0
- package/lib/checkbox/Checkbox.js.map +1 -1
- package/lib/context-menu/ContextMenu.d.ts +3 -3
- package/lib/context-menu/ContextMenu.js +24 -22
- package/lib/context-menu/ContextMenu.js.map +1 -1
- package/lib/helpers/testing.d.ts +28 -0
- package/lib/helpers/testing.js +81 -0
- package/lib/helpers/testing.js.map +1 -0
- package/lib/helpers/types.d.ts +1 -1
- package/lib/icons/Custom.d.ts +2 -2
- package/lib/icons/Custom.js +3 -4
- package/lib/icons/Custom.js.map +1 -1
- package/lib/icons/Hero.d.ts +2 -2
- package/lib/icons/Hero.js +3 -4
- package/lib/icons/Hero.js.map +1 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/lib/input/Input.js +2 -2
- package/lib/input/Input.js.map +1 -1
- package/lib/label/Label.d.ts +1 -1
- package/lib/label/Label.js +28 -6
- package/lib/label/Label.js.map +1 -1
- package/lib/loading-spinner/LoadingSpinner.d.ts +2 -2
- package/lib/loading-spinner/LoadingSpinner.js +27 -8
- package/lib/loading-spinner/LoadingSpinner.js.map +1 -1
- package/lib/popover/Popover.js +4 -3
- package/lib/popover/Popover.js.map +1 -1
- package/lib/progress-bar/ProgressBar.d.ts +2 -1
- package/lib/progress-bar/ProgressBar.js +29 -5
- package/lib/progress-bar/ProgressBar.js.map +1 -1
- package/lib/radio/Radio.d.ts +2 -2
- package/lib/radio/Radio.js +3 -3
- package/lib/radio/Radio.js.map +1 -1
- package/lib/switch/Switch.js +1 -2
- package/lib/switch/Switch.js.map +1 -1
- package/lib/tabs/Tabs.d.ts +3 -3
- package/lib/tabs/Tabs.js +26 -17
- package/lib/tabs/Tabs.js.map +1 -1
- package/lib/tag/Tag.d.ts +1 -1
- package/lib/tag/Tag.js +29 -9
- package/lib/tag/Tag.js.map +1 -1
- package/lib/tooltip/Tooltip.d.ts +1 -1
- package/lib/tooltip/Tooltip.js +5 -3
- package/lib/tooltip/Tooltip.js.map +1 -1
- package/lib/view-selector/ViewSelector.d.ts +3 -10
- package/lib/view-selector/ViewSelector.js +31 -14
- package/lib/view-selector/ViewSelector.js.map +1 -1
- package/package.json +5 -3
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
23
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
24
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
25
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
26
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
27
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
28
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
32
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
33
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
34
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
35
|
+
function step(op) {
|
|
36
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
37
|
+
while (_) try {
|
|
38
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
39
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
40
|
+
switch (op[0]) {
|
|
41
|
+
case 0: case 1: t = op; break;
|
|
42
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
43
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
44
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
45
|
+
default:
|
|
46
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
47
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
48
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
49
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
50
|
+
if (t[2]) _.ops.pop();
|
|
51
|
+
_.trys.pop(); continue;
|
|
52
|
+
}
|
|
53
|
+
op = body.call(thisArg, _);
|
|
54
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
55
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
exports.__esModule = true;
|
|
59
|
+
exports.a11yValidation = void 0;
|
|
60
|
+
var jest_axe_1 = require("jest-axe");
|
|
61
|
+
/**
|
|
62
|
+
* A11y testing with Axe
|
|
63
|
+
* Jest helper to the container for HTML
|
|
64
|
+
* inaccessibilities
|
|
65
|
+
*
|
|
66
|
+
* More: https://github.com/nickcolley/jest-axe
|
|
67
|
+
*/
|
|
68
|
+
var a11yValidation = function (container) { return __awaiter(void 0, void 0, void 0, function () {
|
|
69
|
+
var results;
|
|
70
|
+
return __generator(this, function (_a) {
|
|
71
|
+
switch (_a.label) {
|
|
72
|
+
case 0: return [4 /*yield*/, (0, jest_axe_1.axe)(container)];
|
|
73
|
+
case 1:
|
|
74
|
+
results = _a.sent();
|
|
75
|
+
expect(results).toHaveNoViolations();
|
|
76
|
+
return [2 /*return*/];
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}); };
|
|
80
|
+
exports.a11yValidation = a11yValidation;
|
|
81
|
+
//# sourceMappingURL=testing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing.js","sourceRoot":"","sources":["../../src/helpers/testing.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,qCAA+B;AAE/B;;;;;;GAMG;AACI,IAAM,cAAc,GAAG,UAAO,SAAsB;;;;oBACzC,qBAAM,IAAA,cAAG,EAAC,SAAS,CAAC,EAAA;;gBAA9B,OAAO,GAAG,SAAoB;gBACpC,MAAM,CAAC,OAAO,CAAC,CAAC,kBAAkB,EAAE,CAAC;;;;KACtC,CAAC;AAHW,QAAA,cAAc,kBAGzB"}
|
package/lib/helpers/types.d.ts
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
/// <reference types="react" />
|
|
22
|
-
export declare type ElementBase<T = HTMLElement> = Omit<React.HTMLProps<T>, 'as' | 'selected' | 'size' | 'onChange'> & {
|
|
22
|
+
export declare type ElementBase<T = HTMLElement> = Omit<React.HTMLProps<T>, 'as' | 'selected' | 'size' | 'onChange' | 'ref'> & {
|
|
23
23
|
/** Override the root element rendered for the component */
|
|
24
24
|
as?: string | React.ComponentType<any>;
|
|
25
25
|
};
|
package/lib/icons/Custom.d.ts
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
import React from 'react';
|
|
22
22
|
import * as CustomIcons from './custom/index';
|
|
23
23
|
declare type CustomIconNames = keyof typeof CustomIcons;
|
|
24
|
-
export declare const CustomIcon:
|
|
24
|
+
export declare const CustomIcon: React.ForwardRefExoticComponent<Pick<{
|
|
25
25
|
iconName: CustomIconNames;
|
|
26
|
-
} & React.SVGProps<SVGSVGElement>
|
|
26
|
+
} & React.SVGProps<SVGSVGElement>, "string" | "className" | "style" | "clipPath" | "filter" | "mask" | "path" | "children" | "role" | "onChange" | "crossOrigin" | "height" | "href" | "max" | "media" | "method" | "min" | "name" | "target" | "type" | "width" | "id" | "lang" | "tabIndex" | "color" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "fill" | "iconName" | "accentHeight" | "accumulate" | "additive" | "alignmentBaseline" | "allowReorder" | "alphabetic" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "azimuth" | "baseFrequency" | "baselineShift" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clip" | "clipPathUnits" | "clipRule" | "colorInterpolation" | "colorInterpolationFilters" | "colorProfile" | "colorRendering" | "contentScriptType" | "contentStyleType" | "cursor" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "direction" | "display" | "divisor" | "dominantBaseline" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "end" | "exponent" | "externalResourcesRequired" | "fillOpacity" | "fillRule" | "filterRes" | "filterUnits" | "floodColor" | "floodOpacity" | "focusable" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphOrientationVertical" | "glyphRef" | "gradientTransform" | "gradientUnits" | "hanging" | "horizAdvX" | "horizOriginX" | "ideographic" | "imageRendering" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "letterSpacing" | "lightingColor" | "limitingConeAngle" | "local" | "markerEnd" | "markerHeight" | "markerMid" | "markerStart" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mathematical" | "mode" | "numOctaves" | "offset" | "opacity" | "operator" | "order" | "orient" | "orientation" | "origin" | "overflow" | "overlinePosition" | "overlineThickness" | "paintOrder" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "pointerEvents" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rotate" | "rx" | "ry" | "scale" | "seed" | "shapeRendering" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "stopColor" | "stopOpacity" | "strikethroughPosition" | "strikethroughThickness" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textAnchor" | "textDecoration" | "textLength" | "textRendering" | "to" | "transform" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeBidi" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "values" | "vectorEffect" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "visibility" | "vMathematical" | "widths" | "wordSpacing" | "writingMode" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "y" | "yChannelSelector" | "z" | "zoomAndPan"> & React.RefAttributes<SVGSVGElement>>;
|
|
27
27
|
export default CustomIcon;
|
package/lib/icons/Custom.js
CHANGED
|
@@ -67,11 +67,10 @@ exports.__esModule = true;
|
|
|
67
67
|
exports.CustomIcon = void 0;
|
|
68
68
|
var react_1 = __importDefault(require("react"));
|
|
69
69
|
var CustomIcons = __importStar(require("./custom/index"));
|
|
70
|
-
|
|
70
|
+
exports.CustomIcon = react_1["default"].forwardRef(function CustomIcon(_a, ref) {
|
|
71
71
|
var _b = _a.iconName, iconName = _b === void 0 ? 'Drag' : _b, props = __rest(_a, ["iconName"]);
|
|
72
72
|
var IconComponent = CustomIcons[iconName];
|
|
73
|
-
return react_1["default"].createElement(IconComponent, __assign({}, props));
|
|
74
|
-
};
|
|
75
|
-
exports.CustomIcon = CustomIcon;
|
|
73
|
+
return react_1["default"].createElement(IconComponent, __assign({}, props, { ref: ref }));
|
|
74
|
+
});
|
|
76
75
|
exports["default"] = exports.CustomIcon;
|
|
77
76
|
//# sourceMappingURL=Custom.js.map
|
package/lib/icons/Custom.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Custom.js","sourceRoot":"","sources":["../../src/icons/Custom.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,gDAA0B;AAC1B,0DAA8C;
|
|
1
|
+
{"version":3,"file":"Custom.js","sourceRoot":"","sources":["../../src/icons/Custom.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,gDAA0B;AAC1B,0DAA8C;AAIjC,QAAA,UAAU,GAAG,kBAAK,CAAC,UAAU,CAAC,SAAS,UAAU,CAC5D,EAK+B,EAC/B,GAAsC;IALpC,IAAA,gBAAiB,EAAjB,QAAQ,mBAAG,MAAM,KAAA,EACd,KAAK,cAFV,YAGC,CADS;IAMV,IAAM,aAAa,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IAE5C,OAAO,iCAAC,aAAa,eAAK,KAAK,IAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAChD,CAAC,CAAC,CAAC;AAEH,qBAAe,kBAAU,CAAC"}
|
package/lib/icons/Hero.d.ts
CHANGED
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
import React from 'react';
|
|
22
22
|
import * as SolidIcons from '@heroicons/react/solid';
|
|
23
23
|
declare type HeroIconNames = keyof typeof SolidIcons;
|
|
24
|
-
export declare const HeroIcon:
|
|
24
|
+
export declare const HeroIcon: React.ForwardRefExoticComponent<Pick<{
|
|
25
25
|
iconName: HeroIconNames;
|
|
26
26
|
type?: "solid" | "outline" | undefined;
|
|
27
|
-
} & React.SVGProps<SVGSVGElement>
|
|
27
|
+
} & React.SVGProps<SVGSVGElement>, "string" | "className" | "style" | "clipPath" | "filter" | "mask" | "path" | "children" | "role" | "onChange" | "crossOrigin" | "height" | "href" | "max" | "media" | "method" | "min" | "name" | "target" | "type" | "width" | "id" | "lang" | "tabIndex" | "color" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "fill" | "iconName" | "accentHeight" | "accumulate" | "additive" | "alignmentBaseline" | "allowReorder" | "alphabetic" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "azimuth" | "baseFrequency" | "baselineShift" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clip" | "clipPathUnits" | "clipRule" | "colorInterpolation" | "colorInterpolationFilters" | "colorProfile" | "colorRendering" | "contentScriptType" | "contentStyleType" | "cursor" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "direction" | "display" | "divisor" | "dominantBaseline" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "end" | "exponent" | "externalResourcesRequired" | "fillOpacity" | "fillRule" | "filterRes" | "filterUnits" | "floodColor" | "floodOpacity" | "focusable" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphOrientationVertical" | "glyphRef" | "gradientTransform" | "gradientUnits" | "hanging" | "horizAdvX" | "horizOriginX" | "ideographic" | "imageRendering" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "letterSpacing" | "lightingColor" | "limitingConeAngle" | "local" | "markerEnd" | "markerHeight" | "markerMid" | "markerStart" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mathematical" | "mode" | "numOctaves" | "offset" | "opacity" | "operator" | "order" | "orient" | "orientation" | "origin" | "overflow" | "overlinePosition" | "overlineThickness" | "paintOrder" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "pointerEvents" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rotate" | "rx" | "ry" | "scale" | "seed" | "shapeRendering" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "stopColor" | "stopOpacity" | "strikethroughPosition" | "strikethroughThickness" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textAnchor" | "textDecoration" | "textLength" | "textRendering" | "to" | "transform" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeBidi" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "values" | "vectorEffect" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "visibility" | "vMathematical" | "widths" | "wordSpacing" | "writingMode" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "y" | "yChannelSelector" | "z" | "zoomAndPan"> & React.RefAttributes<SVGSVGElement>>;
|
|
28
28
|
export default HeroIcon;
|
package/lib/icons/Hero.js
CHANGED
|
@@ -68,7 +68,7 @@ exports.HeroIcon = void 0;
|
|
|
68
68
|
var react_1 = __importDefault(require("react"));
|
|
69
69
|
var OutlinedIcons = __importStar(require("@heroicons/react/outline"));
|
|
70
70
|
var SolidIcons = __importStar(require("@heroicons/react/solid"));
|
|
71
|
-
|
|
71
|
+
exports.HeroIcon = react_1["default"].forwardRef(function HeroIcon(_a, ref) {
|
|
72
72
|
var _b = _a.iconName, iconName = _b === void 0 ? 'GlobeAltIcon' : _b, _c = _a.type, type = _c === void 0 ? 'outline' : _c, props = __rest(_a, ["iconName", "type"]);
|
|
73
73
|
var IconComponent;
|
|
74
74
|
switch (type) {
|
|
@@ -82,8 +82,7 @@ var HeroIcon = function (_a) {
|
|
|
82
82
|
IconComponent = SolidIcons[iconName];
|
|
83
83
|
console.error("Type must be 'solid' or 'outline', you provided: ".concat(type));
|
|
84
84
|
}
|
|
85
|
-
return react_1["default"].createElement(IconComponent, __assign({}, props));
|
|
86
|
-
};
|
|
87
|
-
exports.HeroIcon = HeroIcon;
|
|
85
|
+
return react_1["default"].createElement(IconComponent, __assign({}, props, { ref: ref }));
|
|
86
|
+
});
|
|
88
87
|
exports["default"] = exports.HeroIcon;
|
|
89
88
|
//# sourceMappingURL=Hero.js.map
|
package/lib/icons/Hero.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Hero.js","sourceRoot":"","sources":["../../src/icons/Hero.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,gDAA0B;AAC1B,sEAA0D;AAC1D,iEAAqD;
|
|
1
|
+
{"version":3,"file":"Hero.js","sourceRoot":"","sources":["../../src/icons/Hero.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,gDAA0B;AAC1B,sEAA0D;AAC1D,iEAAqD;AAIxC,QAAA,QAAQ,GAAG,kBAAK,CAAC,UAAU,CAAC,SAAS,QAAQ,CACxD,EAO+B,EAC/B,GAAsC;IAPpC,IAAA,gBAAyB,EAAzB,QAAQ,mBAAG,cAAc,KAAA,EACzB,YAAgB,EAAhB,IAAI,mBAAG,SAAS,KAAA,EACb,KAAK,cAHV,oBAIC,CADS;IAOV,IAAI,aAAa,CAAC;IAElB,QAAQ,IAAI,EAAE;QACZ,KAAK,OAAO;YACV,aAAa,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;YACrC,MAAM;QACR,KAAK,SAAS;YACZ,aAAa,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAC;YACxC,MAAM;QACR;YACE,aAAa,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;YACrC,OAAO,CAAC,KAAK,CAAC,2DAAoD,IAAI,CAAE,CAAC,CAAC;KAC7E;IAED,OAAO,iCAAC,aAAa,eAAK,KAAK,IAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAChD,CAAC,CAAC,CAAC;AAEH,qBAAe,gBAAQ,CAAC"}
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -40,4 +40,7 @@ __exportStar(require("./radio"), exports);
|
|
|
40
40
|
__exportStar(require("./context-menu"), exports);
|
|
41
41
|
__exportStar(require("./loading-spinner"), exports);
|
|
42
42
|
__exportStar(require("./tabs"), exports);
|
|
43
|
+
__exportStar(require("./view-selector"), exports);
|
|
44
|
+
__exportStar(require("./popover"), exports);
|
|
45
|
+
__exportStar(require("./icons"), exports);
|
|
43
46
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;AAEH,2CAAyB;AACzB,0CAAwB;AACxB,0CAAwB;AACxB,4CAA0B;AAC1B,6CAA2B;AAC3B,2CAAyB;AACzB,0CAAwB;AACxB,iDAA+B;AAC/B,oDAAkC;AAClC,yCAAuB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;AAEH,2CAAyB;AACzB,0CAAwB;AACxB,0CAAwB;AACxB,4CAA0B;AAC1B,6CAA2B;AAC3B,2CAAyB;AACzB,0CAAwB;AACxB,iDAA+B;AAC/B,oDAAkC;AAClC,yCAAuB;AACvB,kDAAgC;AAChC,4CAA0B;AAC1B,0CAAwB"}
|
package/lib/input/Input.js
CHANGED
|
@@ -75,7 +75,7 @@ var classnames_1 = __importDefault(require("classnames"));
|
|
|
75
75
|
*
|
|
76
76
|
*/
|
|
77
77
|
var Input = function (props, ref) {
|
|
78
|
-
var
|
|
78
|
+
var label = props.label, fluid = props.fluid, labelBefore = props.labelBefore, otherInputProps = __rest(props, ["label", "fluid", "labelBefore"]);
|
|
79
79
|
var containerWrappingClass = (0, classnames_1["default"])('ndl-form-item', {
|
|
80
80
|
disabled: otherInputProps.disabled
|
|
81
81
|
});
|
|
@@ -85,7 +85,7 @@ var Input = function (props, ref) {
|
|
|
85
85
|
});
|
|
86
86
|
return (react_1["default"].createElement("div", { className: containerWrappingClass },
|
|
87
87
|
react_1["default"].createElement("label", { className: labelWrappingClass },
|
|
88
|
-
react_1["default"].createElement("input", __assign({}, otherInputProps, {
|
|
88
|
+
react_1["default"].createElement("input", __assign({}, otherInputProps, { ref: ref })),
|
|
89
89
|
label)));
|
|
90
90
|
};
|
|
91
91
|
exports["default"] = (0, react_1.forwardRef)(Input);
|
package/lib/input/Input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../src/input/Input.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAAwD;AACxD,0DAAoC;AA8BpC,qCAAqC;AAErC;;;;;;GAMG;AAEH,IAAM,KAAK,GAAG,UAAC,KAAiB,EAAE,GAAmC;IAC3D,IAAA,
|
|
1
|
+
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../src/input/Input.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAAwD;AACxD,0DAAoC;AA8BpC,qCAAqC;AAErC;;;;;;GAMG;AAEH,IAAM,KAAK,GAAG,UAAC,KAAiB,EAAE,GAAmC;IAC3D,IAAA,KAAK,GAA6C,KAAK,MAAlD,EAAE,KAAK,GAAsC,KAAK,MAA3C,EAAE,WAAW,GAAyB,KAAK,YAA9B,EAAK,eAAe,UAAK,KAAK,EAAzD,iCAAiD,CAAF,CAAW;IAEhE,IAAM,sBAAsB,GAAG,IAAA,uBAAU,EAAC,eAAe,EAAE;QACzD,QAAQ,EAAE,eAAe,CAAC,QAAQ;KACnC,CAAC,CAAC;IAEH,IAAM,kBAAkB,GAAG,IAAA,uBAAU,EAAC,iBAAiB,EAAE;QACvD,KAAK,OAAA;QACL,cAAc,EAAE,WAAW;KAC5B,CAAC,CAAC;IAEH,OAAO,CACL,0CAAK,SAAS,EAAE,sBAAsB;QAGpC,4CAAO,SAAS,EAAE,kBAAkB;YAClC,uDAAW,eAAe,IAAE,GAAG,EAAE,GAAG,IAAI;YACvC,KAAK,CACA,CACJ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,qBAAe,IAAA,kBAAU,EAAC,KAAK,CAAC,CAAC"}
|
package/lib/label/Label.d.ts
CHANGED
|
@@ -37,5 +37,5 @@ export declare type EventTypeLabelProps = {
|
|
|
37
37
|
/** If label should have an icon */
|
|
38
38
|
withIcon?: boolean;
|
|
39
39
|
};
|
|
40
|
-
export declare const Label:
|
|
40
|
+
export declare const Label: React.ForwardRefExoticComponent<EventTypeLabelProps & React.RefAttributes<HTMLSpanElement>>;
|
|
41
41
|
export default Label;
|
package/lib/label/Label.js
CHANGED
|
@@ -19,6 +19,28 @@
|
|
|
19
19
|
* You should have received a copy of the GNU General Public License
|
|
20
20
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
21
|
*/
|
|
22
|
+
var __assign = (this && this.__assign) || function () {
|
|
23
|
+
__assign = Object.assign || function(t) {
|
|
24
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
25
|
+
s = arguments[i];
|
|
26
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
27
|
+
t[p] = s[p];
|
|
28
|
+
}
|
|
29
|
+
return t;
|
|
30
|
+
};
|
|
31
|
+
return __assign.apply(this, arguments);
|
|
32
|
+
};
|
|
33
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
34
|
+
var t = {};
|
|
35
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
36
|
+
t[p] = s[p];
|
|
37
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
38
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
39
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
40
|
+
t[p[i]] = s[p[i]];
|
|
41
|
+
}
|
|
42
|
+
return t;
|
|
43
|
+
};
|
|
22
44
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
23
45
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
46
|
};
|
|
@@ -27,9 +49,9 @@ exports.Label = void 0;
|
|
|
27
49
|
var react_1 = __importDefault(require("react"));
|
|
28
50
|
var classnames_1 = __importDefault(require("classnames"));
|
|
29
51
|
var index_1 = require("../icons/custom/index");
|
|
30
|
-
|
|
52
|
+
exports.Label = react_1["default"].forwardRef(function Label(_a, ref) {
|
|
31
53
|
var _b, _c;
|
|
32
|
-
var _d = _a.color, color = _d === void 0 ? 'neutral' : _d, children = _a.children,
|
|
54
|
+
var _d = _a.color, color = _d === void 0 ? 'neutral' : _d, children = _a.children, className = _a.className, _e = _a.fill, fill = _e === void 0 ? 'filled' : _e, _f = _a.withIcon, withIcon = _f === void 0 ? false : _f, rest = __rest(_a, ["color", "children", "className", "fill", "withIcon"]);
|
|
33
55
|
var base;
|
|
34
56
|
var icon;
|
|
35
57
|
// Clean Label without icon is not allowed
|
|
@@ -67,15 +89,15 @@ var Label = function (_a) {
|
|
|
67
89
|
base = (0, classnames_1["default"])((_c = {},
|
|
68
90
|
_c["n-bg-neutral-40 n-text-neutral-80"] = fill === 'filled',
|
|
69
91
|
_c["outlined n-text-neutral-70 n-border-neutral-70"] = fill === 'outlined',
|
|
70
|
-
_c["
|
|
92
|
+
_c["semi-filled n-bg-neutral-20 n-text-neutral-70 n-border-neutral-60"] = fill === 'semi-filled',
|
|
71
93
|
_c["n-text-neutral-70"] = fill === 'clean',
|
|
72
94
|
_c));
|
|
73
95
|
}
|
|
74
|
-
|
|
96
|
+
var classes = (0, classnames_1["default"])('ndl-label', base, className);
|
|
97
|
+
return (react_1["default"].createElement("span", __assign({ role: "status", "aria-label": "label", className: classes }, rest, { ref: ref }),
|
|
75
98
|
react_1["default"].createElement("div", { className: "label-content" },
|
|
76
99
|
icon,
|
|
77
100
|
children)));
|
|
78
|
-
};
|
|
79
|
-
exports.Label = Label;
|
|
101
|
+
});
|
|
80
102
|
exports["default"] = exports.Label;
|
|
81
103
|
//# sourceMappingURL=Label.js.map
|
package/lib/label/Label.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.js","sourceRoot":"","sources":["../../src/label/Label.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG
|
|
1
|
+
{"version":3,"file":"Label.js","sourceRoot":"","sources":["../../src/label/Label.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,gDAA0B;AAE1B,0DAAoC;AACpC,+CAAkE;AAwBrD,QAAA,KAAK,GAAG,kBAAK,CAAC,UAAU,CAAC,SAAS,KAAK,CAClD,EA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BACf,GAAC,mCAAmC,IAAG,IAAI,KAAK,QAAQ;gBACxD,GAAC,gDAAgD,IAAG,IAAI,KAAK,UAAU;gBACvE,GAAC,mEAAmE,IAClE,IAAI,KAAK,aAAa;gBACxB,GAAC,mBAAmB,IAAG,IAAI,KAAK,OAAO;oBACvC,CAAC;KACN;IAED,IAAM,OAAO,GAAG,IAAA,uBAAU,EAAC,WAAW,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;IAEzD,OAAO,CACL,oDACE,IAAI,EAAC,QAAQ,gBACF,OAAO,EAClB,SAAS,EAAE,OAAO,IACd,IAAI,IACR,GAAG,EAAE,GAAG;QAER,0CAAK,SAAS,EAAC,eAAe;YAC3B,IAAI;YACJ,QAAQ,CACL,CACD,CACR,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,qBAAe,aAAK,CAAC"}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* You should have received a copy of the GNU General Public License
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
|
-
|
|
21
|
+
import React from 'react';
|
|
22
22
|
/**
|
|
23
23
|
*
|
|
24
24
|
*
|
|
@@ -37,5 +37,5 @@ export declare type LoadingSpinnerProps = {
|
|
|
37
37
|
*
|
|
38
38
|
*
|
|
39
39
|
*/
|
|
40
|
-
declare const LoadingSpinner:
|
|
40
|
+
declare const LoadingSpinner: React.ForwardRefExoticComponent<LoadingSpinnerProps & React.RefAttributes<HTMLDivElement>>;
|
|
41
41
|
export default LoadingSpinner;
|
|
@@ -19,6 +19,28 @@
|
|
|
19
19
|
* You should have received a copy of the GNU General Public License
|
|
20
20
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
21
|
*/
|
|
22
|
+
var __assign = (this && this.__assign) || function () {
|
|
23
|
+
__assign = Object.assign || function(t) {
|
|
24
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
25
|
+
s = arguments[i];
|
|
26
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
27
|
+
t[p] = s[p];
|
|
28
|
+
}
|
|
29
|
+
return t;
|
|
30
|
+
};
|
|
31
|
+
return __assign.apply(this, arguments);
|
|
32
|
+
};
|
|
33
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
34
|
+
var t = {};
|
|
35
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
36
|
+
t[p] = s[p];
|
|
37
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
38
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
39
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
40
|
+
t[p[i]] = s[p[i]];
|
|
41
|
+
}
|
|
42
|
+
return t;
|
|
43
|
+
};
|
|
22
44
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
23
45
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
46
|
};
|
|
@@ -32,14 +54,11 @@ var classnames_1 = __importDefault(require("classnames"));
|
|
|
32
54
|
*
|
|
33
55
|
*
|
|
34
56
|
*/
|
|
35
|
-
var LoadingSpinner = function (props) {
|
|
36
|
-
var _a;
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
_a[size] = size,
|
|
40
|
-
_a));
|
|
41
|
-
return (react_1["default"].createElement("div", { className: classes, role: "status", "aria-label": "loading-spinner" },
|
|
57
|
+
var LoadingSpinner = react_1["default"].forwardRef(function LoadingSpinner(props, ref) {
|
|
58
|
+
var _a = props.size, size = _a === void 0 ? 'small' : _a, className = props.className, rest = __rest(props, ["size", "className"]);
|
|
59
|
+
var classes = (0, classnames_1["default"])('ndl-spin-wrapper', size, className);
|
|
60
|
+
return (react_1["default"].createElement("div", __assign({ className: classes, role: "status", "aria-label": "loading-spinner" }, rest, { ref: ref }),
|
|
42
61
|
react_1["default"].createElement("div", { className: "spin" })));
|
|
43
|
-
};
|
|
62
|
+
});
|
|
44
63
|
exports["default"] = LoadingSpinner;
|
|
45
64
|
//# sourceMappingURL=LoadingSpinner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingSpinner.js","sourceRoot":"","sources":["../../src/loading-spinner/LoadingSpinner.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG
|
|
1
|
+
{"version":3,"file":"LoadingSpinner.js","sourceRoot":"","sources":["../../src/loading-spinner/LoadingSpinner.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,gDAA0B;AAC1B,0DAAoC;AAepC;;;;;;GAMG;AAEH,IAAM,cAAc,GAAG,kBAAK,CAAC,UAAU,CAAC,SAAS,cAAc,CAC7D,KAA0B,EAC1B,GAAuC;IAE/B,IAAA,KAAuC,KAAK,KAA9B,EAAd,IAAI,mBAAG,OAAO,KAAA,EAAE,SAAS,GAAc,KAAK,UAAnB,EAAK,IAAI,UAAK,KAAK,EAA9C,qBAAsC,CAAF,CAAW;IAErD,IAAM,OAAO,GAAG,IAAA,uBAAU,EAAC,kBAAkB,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;IAEhE,OAAO,CACL,mDACE,SAAS,EAAE,OAAO,EAClB,IAAI,EAAC,QAAQ,gBACF,iBAAiB,IACxB,IAAI,IACR,GAAG,EAAE,GAAG;QAER,0CAAK,SAAS,EAAC,MAAM,GAAG,CACpB,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,qBAAe,cAAc,CAAC"}
|
package/lib/popover/Popover.js
CHANGED
|
@@ -92,7 +92,7 @@ var getOffsetLeft = function (rect, horizontal) {
|
|
|
92
92
|
return offset;
|
|
93
93
|
};
|
|
94
94
|
exports.Popover = (0, react_1.forwardRef)(function Popover(_a, ref) {
|
|
95
|
-
var _b = _a.as, as = _b === void 0 ? 'div' : _b, children = _a.children, open = _a.open, anchorEl = _a.anchorEl, onClose = _a.onClose, _c = _a.anchorOrigin, anchorOrigin = _c === void 0 ? { vertical: 'bottom', horizontal: 'left' } : _c, _d = _a.transformOrigin, transformOrigin = _d === void 0 ? { vertical: 'top', horizontal: 'left' } : _d,
|
|
95
|
+
var _b = _a.as, as = _b === void 0 ? 'div' : _b, children = _a.children, open = _a.open, anchorEl = _a.anchorEl, onClose = _a.onClose, _c = _a.anchorOrigin, anchorOrigin = _c === void 0 ? { vertical: 'bottom', horizontal: 'left' } : _c, _d = _a.transformOrigin, transformOrigin = _d === void 0 ? { vertical: 'top', horizontal: 'left' } : _d, className = _a.className, _e = _a.nested, nested = _e === void 0 ? false : _e, rest = __rest(_a, ["as", "children", "open", "anchorEl", "onClose", "anchorOrigin", "transformOrigin", "className", "nested"]);
|
|
96
96
|
var Component = as;
|
|
97
97
|
var popoverRef = (0, react_1.useRef)();
|
|
98
98
|
var bodyPadding = (0, react_1.useRef)(0);
|
|
@@ -104,7 +104,7 @@ exports.Popover = (0, react_1.forwardRef)(function Popover(_a, ref) {
|
|
|
104
104
|
}
|
|
105
105
|
return popover;
|
|
106
106
|
});
|
|
107
|
-
var
|
|
107
|
+
var _f = (0, react_1.useState)(false), enter = _f[0], setEnter = _f[1];
|
|
108
108
|
var base = (0, classnames_1["default"])({
|
|
109
109
|
open: open,
|
|
110
110
|
enter: enter
|
|
@@ -212,9 +212,10 @@ exports.Popover = (0, react_1.forwardRef)(function Popover(_a, ref) {
|
|
|
212
212
|
if (!open) {
|
|
213
213
|
return null;
|
|
214
214
|
}
|
|
215
|
+
var classes = (0, classnames_1["default"])('ndl-popover', base, className);
|
|
215
216
|
return (react_1["default"].createElement(Portal, { container: document.body },
|
|
216
217
|
react_1["default"].createElement("div", { className: "ndl-popover-backdrop", role: "button", tabIndex: 0, onClick: handleBackdropClick, onKeyDown: handleBackdropClick, "data-testid": "popover-backdrop" }),
|
|
217
|
-
react_1["default"].createElement(Component, __assign({ tabIndex: -1 }, rest, { className:
|
|
218
|
+
react_1["default"].createElement(Component, __assign({ tabIndex: -1 }, rest, { className: classes, ref: popoverRef, "data-testid": "popover-content" }), children)));
|
|
218
219
|
});
|
|
219
220
|
var Portal = function (_a) {
|
|
220
221
|
var children = _a.children, container = _a.container;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.js","sourceRoot":"","sources":["../../src/popover/Popover.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAOe;AACf,kDAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"Popover.js","sourceRoot":"","sources":["../../src/popover/Popover.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAOe;AACf,kDAAsC;AACtC,0DAAoC;AACpC,sCAAsC;AAetC,IAAM,gBAAgB,GAAG,UAAC,GAAa;IACrC,iFAAiF;IACjF,IAAM,aAAa,GAAG,GAAG,CAAC,eAAe,CAAC,WAAW,CAAC;IACtD,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,UAAU,GAAG,aAAa,CAAC,CAAC;AACrD,CAAC,CAAC;AAEF,IAAM,eAAe,GAAG,UAAC,OAAgB;IACvC,OAAA,QAAQ,CAAC,MAAM,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,IAAI,CAAC;AAAhE,CAAgE,CAAC;AAEnE,IAAM,YAAY,GAAG,UAAC,IAAa,EAAE,QAAkB;IACrD,IAAI,MAAM,GAAG,CAAC,CAAC;IAEf,IAAI,QAAQ,KAAK,QAAQ,EAAE;QACzB,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;KACtB;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,IAAM,aAAa,GAAG,UAA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QACxB,KAAK,CAAC,cAAc,EAAE,CAAC;QAEvB,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC,CAAC;IAEF,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,IAAI,CAAC;KACb;IAED,IAAM,OAAO,GAAG,IAAA,uBAAU,EAAC,aAAa,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;IAE3D,OAAO,CACL,iCAAC,MAAM,IAAC,SAAS,EAAE,QAAQ,CAAC,IAAI;QAE9B,0CACE,SAAS,EAAC,sBAAsB,EAChC,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,mBAAmB,EAC5B,SAAS,EAAE,mBAAmB,iBAClB,kBAAkB,GAC9B;QACF,iCAAC,SAAS,aACR,QAAQ,EAAE,CAAC,CAAC,IACR,IAAI,IACR,SAAS,EAAE,OAAO,EAClB,GAAG,EAAE,UAAU,iBACH,iBAAiB,KAE5B,QAAQ,CACC,CACL,CACV,CAAC;AACJ,CAAC,CAAC,CAAC;AAMH,IAAM,MAAM,GAAG,UAAC,EAAoC;QAAlC,QAAQ,cAAA,EAAE,SAAS,eAAA;IACnC,OAAO,QAAQ,CAAC,YAAY,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;AACpD,CAAC,CAAC"}
|
|
@@ -24,6 +24,7 @@ export interface ProgressBarProps extends React.HTMLProps<HTMLDivElement> {
|
|
|
24
24
|
estimatedTime?: string;
|
|
25
25
|
value: number;
|
|
26
26
|
barSize: 'small' | 'large';
|
|
27
|
+
className?: string;
|
|
27
28
|
}
|
|
28
|
-
declare const ProgressBar:
|
|
29
|
+
declare const ProgressBar: React.ForwardRefExoticComponent<Pick<ProgressBarProps, "size" | "className" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "heading" | "list" | "children" | "role" | "as" | "selected" | "onChange" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "estimatedTime" | "barSize"> & React.RefAttributes<HTMLDivElement>>;
|
|
29
30
|
export default ProgressBar;
|
|
@@ -19,22 +19,46 @@
|
|
|
19
19
|
* You should have received a copy of the GNU General Public License
|
|
20
20
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
21
|
*/
|
|
22
|
+
var __assign = (this && this.__assign) || function () {
|
|
23
|
+
__assign = Object.assign || function(t) {
|
|
24
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
25
|
+
s = arguments[i];
|
|
26
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
27
|
+
t[p] = s[p];
|
|
28
|
+
}
|
|
29
|
+
return t;
|
|
30
|
+
};
|
|
31
|
+
return __assign.apply(this, arguments);
|
|
32
|
+
};
|
|
33
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
34
|
+
var t = {};
|
|
35
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
36
|
+
t[p] = s[p];
|
|
37
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
38
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
39
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
40
|
+
t[p[i]] = s[p[i]];
|
|
41
|
+
}
|
|
42
|
+
return t;
|
|
43
|
+
};
|
|
22
44
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
23
45
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
46
|
};
|
|
25
47
|
exports.__esModule = true;
|
|
26
48
|
var react_1 = __importDefault(require("react"));
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
|
|
49
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
50
|
+
var ProgressBar = react_1["default"].forwardRef(function ProgressBar(_a, ref) {
|
|
51
|
+
var heading = _a.heading, estimatedTime = _a.estimatedTime, value = _a.value, _b = _a.barSize, barSize = _b === void 0 ? 'small' : _b, className = _a.className, rest = __rest(_a, ["heading", "estimatedTime", "value", "barSize", "className"]);
|
|
52
|
+
var classes = (0, classnames_1["default"])('ndl-progress-bar-wrapper', barSize, className);
|
|
53
|
+
return (react_1["default"].createElement("div", __assign({}, rest, { className: classes, ref: ref }),
|
|
30
54
|
react_1["default"].createElement("div", { className: "header" },
|
|
31
55
|
react_1["default"].createElement("span", { className: "heading" }, heading),
|
|
32
56
|
react_1["default"].createElement("span", { className: "progress-number" }, value + '%')),
|
|
33
|
-
react_1["default"].createElement("div", { className: "progress-bar-container", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": value },
|
|
57
|
+
react_1["default"].createElement("div", { className: "progress-bar-container", role: "progressbar", title: "progress bar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": value },
|
|
34
58
|
react_1["default"].createElement("div", { className: "progress-bar", style: { width: value + '%' } })),
|
|
35
59
|
estimatedTime && (react_1["default"].createElement("div", { className: "details" },
|
|
36
60
|
react_1["default"].createElement("span", { className: "estimated-time-heading" }, "Estimated time:"),
|
|
37
61
|
react_1["default"].createElement("span", { className: "estimated-time" }, estimatedTime)))));
|
|
38
|
-
};
|
|
62
|
+
});
|
|
39
63
|
exports["default"] = ProgressBar;
|
|
40
64
|
//# sourceMappingURL=ProgressBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","sourceRoot":"","sources":["../../src/progress-bar/ProgressBar.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","sourceRoot":"","sources":["../../src/progress-bar/ProgressBar.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,gDAA0B;AAC1B,0DAAoC;AAUpC,IAAM,WAAW,GAAG,kBAAK,CAAC,UAAU,CAAC,SAAS,WAAW,CACvD,EAOmB,EACnB,GAAuC;IAPrC,IAAA,OAAO,aAAA,EACP,aAAa,mBAAA,EACb,KAAK,WAAA,EACL,eAAiB,EAAjB,OAAO,mBAAG,OAAO,KAAA,EACjB,SAAS,eAAA,EACN,IAAI,cANT,6DAOC,CADQ;IAIT,IAAM,OAAO,GAAG,IAAA,uBAAU,EAAC,0BAA0B,EAAE,OAAO,EAA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