@fluentui/react-badge 9.0.0-alpha.83 → 9.0.0-alpha.84
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +53 -8
- package/CHANGELOG.md +22 -8
- package/dist/react-badge.d.ts +57 -111
- package/lib/Badge.js.map +1 -1
- package/lib/CounterBadge.js.map +1 -1
- package/lib/PresenceBadge.js.map +1 -1
- package/lib/common/isConformant.js +2 -0
- package/lib/common/isConformant.js.map +1 -1
- package/lib/components/Badge/Badge.d.ts +1 -1
- package/lib/components/Badge/Badge.js.map +1 -1
- package/lib/components/Badge/Badge.types.d.ts +18 -27
- package/lib/components/Badge/Badge.types.js.map +1 -1
- package/lib/components/Badge/index.js.map +1 -1
- package/lib/components/Badge/renderBadge.js +3 -4
- package/lib/components/Badge/renderBadge.js.map +1 -1
- package/lib/components/Badge/useBadge.d.ts +1 -5
- package/lib/components/Badge/useBadge.js +29 -18
- package/lib/components/Badge/useBadge.js.map +1 -1
- package/lib/components/Badge/useBadgeStyles.js +1 -1
- package/lib/components/Badge/useBadgeStyles.js.map +1 -1
- package/lib/components/CounterBadge/CounterBadge.d.ts +2 -8
- package/lib/components/CounterBadge/CounterBadge.js.map +1 -1
- package/lib/components/CounterBadge/CounterBadge.types.d.ts +23 -37
- package/lib/components/CounterBadge/CounterBadge.types.js.map +1 -1
- package/lib/components/CounterBadge/index.js.map +1 -1
- package/lib/components/CounterBadge/useCounterBadge.d.ts +1 -5
- package/lib/components/CounterBadge/useCounterBadge.js +25 -19
- package/lib/components/CounterBadge/useCounterBadge.js.map +1 -1
- package/lib/components/CounterBadge/useCounterBadgeStyles.js +1 -1
- package/lib/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
- package/lib/components/PresenceBadge/DefaultPresenceBadgeIcons.js.map +1 -1
- package/lib/components/PresenceBadge/PresenceBadge.d.ts +2 -4
- package/lib/components/PresenceBadge/PresenceBadge.js.map +1 -1
- package/lib/components/PresenceBadge/PresenceBadge.types.d.ts +6 -17
- package/lib/components/PresenceBadge/PresenceBadge.types.js.map +1 -1
- package/lib/components/PresenceBadge/index.js.map +1 -1
- package/lib/components/PresenceBadge/usePresenceBadge.d.ts +1 -5
- package/lib/components/PresenceBadge/usePresenceBadge.js +15 -21
- package/lib/components/PresenceBadge/usePresenceBadge.js.map +1 -1
- package/lib/components/PresenceBadge/usePresenceBadgeStyles.js +1 -1
- package/lib/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Badge.js.map +1 -1
- package/lib-commonjs/CounterBadge.js.map +1 -1
- package/lib-commonjs/PresenceBadge.js.map +1 -1
- package/lib-commonjs/common/isConformant.js +2 -0
- package/lib-commonjs/common/isConformant.js.map +1 -1
- package/lib-commonjs/components/Badge/Badge.d.ts +1 -1
- package/lib-commonjs/components/Badge/Badge.js.map +1 -1
- package/lib-commonjs/components/Badge/Badge.types.d.ts +18 -27
- package/lib-commonjs/components/Badge/Badge.types.js.map +1 -1
- package/lib-commonjs/components/Badge/index.js.map +1 -1
- package/lib-commonjs/components/Badge/renderBadge.js +2 -4
- package/lib-commonjs/components/Badge/renderBadge.js.map +1 -1
- package/lib-commonjs/components/Badge/useBadge.d.ts +1 -5
- package/lib-commonjs/components/Badge/useBadge.js +30 -19
- package/lib-commonjs/components/Badge/useBadge.js.map +1 -1
- package/lib-commonjs/components/Badge/useBadgeStyles.js +1 -1
- package/lib-commonjs/components/Badge/useBadgeStyles.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/CounterBadge.d.ts +2 -8
- package/lib-commonjs/components/CounterBadge/CounterBadge.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/CounterBadge.types.d.ts +23 -37
- package/lib-commonjs/components/CounterBadge/CounterBadge.types.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/index.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/useCounterBadge.d.ts +1 -5
- package/lib-commonjs/components/CounterBadge/useCounterBadge.js +27 -21
- package/lib-commonjs/components/CounterBadge/useCounterBadge.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js +1 -1
- package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/DefaultPresenceBadgeIcons.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/PresenceBadge.d.ts +2 -4
- package/lib-commonjs/components/PresenceBadge/PresenceBadge.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.d.ts +6 -17
- package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/index.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/usePresenceBadge.d.ts +1 -5
- package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js +16 -22
- package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js +1 -1
- package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +6 -6
- package/lib-amd/Badge.d.ts +0 -1
- package/lib-amd/Badge.js +0 -6
- package/lib-amd/Badge.js.map +0 -1
- package/lib-amd/CounterBadge.d.ts +0 -1
- package/lib-amd/CounterBadge.js +0 -6
- package/lib-amd/CounterBadge.js.map +0 -1
- package/lib-amd/PresenceBadge.d.ts +0 -1
- package/lib-amd/PresenceBadge.js +0 -6
- package/lib-amd/PresenceBadge.js.map +0 -1
- package/lib-amd/common/isConformant.d.ts +0 -4
- package/lib-amd/common/isConformant.js +0 -15
- package/lib-amd/common/isConformant.js.map +0 -1
- package/lib-amd/components/Badge/Badge.d.ts +0 -6
- package/lib-amd/components/Badge/Badge.js +0 -15
- package/lib-amd/components/Badge/Badge.js.map +0 -1
- package/lib-amd/components/Badge/Badge.types.d.ts +0 -47
- package/lib-amd/components/Badge/Badge.types.js +0 -5
- package/lib-amd/components/Badge/Badge.types.js.map +0 -1
- package/lib-amd/components/Badge/index.d.ts +0 -5
- package/lib-amd/components/Badge/index.js +0 -10
- package/lib-amd/components/Badge/index.js.map +0 -1
- package/lib-amd/components/Badge/renderBadge.d.ts +0 -2
- package/lib-amd/components/Badge/renderBadge.js +0 -14
- package/lib-amd/components/Badge/renderBadge.js.map +0 -1
- package/lib-amd/components/Badge/useBadge.d.ts +0 -10
- package/lib-amd/components/Badge/useBadge.js +0 -25
- package/lib-amd/components/Badge/useBadge.js.map +0 -1
- package/lib-amd/components/Badge/useBadgeStyles.d.ts +0 -5
- package/lib-amd/components/Badge/useBadgeStyles.js +0 -234
- package/lib-amd/components/Badge/useBadgeStyles.js.map +0 -1
- package/lib-amd/components/CounterBadge/CounterBadge.d.ts +0 -12
- package/lib-amd/components/CounterBadge/CounterBadge.js +0 -15
- package/lib-amd/components/CounterBadge/CounterBadge.js.map +0 -1
- package/lib-amd/components/CounterBadge/CounterBadge.types.d.ts +0 -55
- package/lib-amd/components/CounterBadge/CounterBadge.types.js +0 -5
- package/lib-amd/components/CounterBadge/CounterBadge.types.js.map +0 -1
- package/lib-amd/components/CounterBadge/index.d.ts +0 -4
- package/lib-amd/components/CounterBadge/index.js +0 -9
- package/lib-amd/components/CounterBadge/index.js.map +0 -1
- package/lib-amd/components/CounterBadge/useCounterBadge.d.ts +0 -10
- package/lib-amd/components/CounterBadge/useCounterBadge.js +0 -28
- package/lib-amd/components/CounterBadge/useCounterBadge.js.map +0 -1
- package/lib-amd/components/CounterBadge/useCounterBadgeStyles.d.ts +0 -5
- package/lib-amd/components/CounterBadge/useCounterBadgeStyles.js +0 -46
- package/lib-amd/components/CounterBadge/useCounterBadgeStyles.js.map +0 -1
- package/lib-amd/components/PresenceBadge/DefaultPresenceBadgeIcons.d.ts +0 -10
- package/lib-amd/components/PresenceBadge/DefaultPresenceBadgeIcons.js +0 -64
- package/lib-amd/components/PresenceBadge/DefaultPresenceBadgeIcons.js.map +0 -1
- package/lib-amd/components/PresenceBadge/PresenceBadge.d.ts +0 -8
- package/lib-amd/components/PresenceBadge/PresenceBadge.js +0 -15
- package/lib-amd/components/PresenceBadge/PresenceBadge.js.map +0 -1
- package/lib-amd/components/PresenceBadge/PresenceBadge.types.d.ts +0 -28
- package/lib-amd/components/PresenceBadge/PresenceBadge.types.js +0 -5
- package/lib-amd/components/PresenceBadge/PresenceBadge.types.js.map +0 -1
- package/lib-amd/components/PresenceBadge/index.d.ts +0 -4
- package/lib-amd/components/PresenceBadge/index.js +0 -9
- package/lib-amd/components/PresenceBadge/index.js.map +0 -1
- package/lib-amd/components/PresenceBadge/usePresenceBadge.d.ts +0 -10
- package/lib-amd/components/PresenceBadge/usePresenceBadge.js +0 -37
- package/lib-amd/components/PresenceBadge/usePresenceBadge.js.map +0 -1
- package/lib-amd/components/PresenceBadge/usePresenceBadgeStyles.d.ts +0 -5
- package/lib-amd/components/PresenceBadge/usePresenceBadgeStyles.js +0 -58
- package/lib-amd/components/PresenceBadge/usePresenceBadgeStyles.js.map +0 -1
- package/lib-amd/index.d.ts +0 -5
- package/lib-amd/index.js +0 -10
- package/lib-amd/index.js.map +0 -1
@@ -3,35 +3,41 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.useCounterBadge =
|
6
|
+
exports.useCounterBadge = void 0;
|
7
7
|
|
8
|
-
var
|
8
|
+
var tslib_1 = /*#__PURE__*/require("tslib");
|
9
9
|
|
10
10
|
var index_1 = /*#__PURE__*/require("../Badge/index");
|
11
|
-
/**
|
12
|
-
* Consts listing which props are shorthand props.
|
13
|
-
*/
|
14
|
-
|
15
|
-
|
16
|
-
exports.counterBadgeShorthandPropsCompat = ['icon']; // eslint-disable-next-line deprecation/deprecation
|
17
|
-
|
18
|
-
var mergeProps = /*#__PURE__*/react_utilities_1.makeMergePropsCompat({
|
19
|
-
deepMerge: exports.counterBadgeShorthandPropsCompat
|
20
|
-
});
|
21
11
|
/**
|
22
12
|
* Returns the props and state required to render the component
|
23
13
|
*/
|
24
14
|
|
25
|
-
var useCounterBadge = function (props, ref, defaultProps) {
|
26
|
-
var state = index_1.useBadge(props, ref, mergeProps({
|
27
|
-
showZero: false,
|
28
|
-
overflowCount: 99,
|
29
|
-
count: 0,
|
30
|
-
dot: false
|
31
|
-
}, defaultProps));
|
32
15
|
|
33
|
-
|
34
|
-
|
16
|
+
var useCounterBadge = function (props, ref) {
|
17
|
+
var _a = props.shape,
|
18
|
+
shape = _a === void 0 ? 'circular' : _a,
|
19
|
+
_b = props.appearance,
|
20
|
+
appearance = _b === void 0 ? 'filled' : _b,
|
21
|
+
_c = props.showZero,
|
22
|
+
showZero = _c === void 0 ? false : _c,
|
23
|
+
_d = props.overflowCount,
|
24
|
+
overflowCount = _d === void 0 ? 99 : _d,
|
25
|
+
_e = props.count,
|
26
|
+
count = _e === void 0 ? 0 : _e,
|
27
|
+
_f = props.dot,
|
28
|
+
dot = _f === void 0 ? false : _f;
|
29
|
+
|
30
|
+
var state = tslib_1.__assign(tslib_1.__assign({}, index_1.useBadge(props, ref)), {
|
31
|
+
shape: shape,
|
32
|
+
appearance: appearance,
|
33
|
+
showZero: showZero,
|
34
|
+
overflowCount: overflowCount,
|
35
|
+
count: count,
|
36
|
+
dot: dot
|
37
|
+
});
|
38
|
+
|
39
|
+
if (!state.dot && !state.root.children) {
|
40
|
+
state.root.children = state.count > state.overflowCount ? state.overflowCount + "+" : "" + state.count;
|
35
41
|
}
|
36
42
|
|
37
43
|
return state;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/CounterBadge/useCounterBadge.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"sources":["../../../src/components/CounterBadge/useCounterBadge.ts"],"names":[],"mappings":";;;;;;;;;AACA,IAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;AAGA;;AAEG;;;AACI,IAAM,eAAe,GAAG,UAAC,KAAD,EAA2B,GAA3B,EAAsD;AAEjF,MAAA,EAAA,GAME,KAAK,CANW,KAA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AC,KAA/F;AACD;;AAED,SAAO,KAAP;AACD,CAzBM;;AAAM,OAAA,CAAA,eAAA,GAAe,eAAf","sourceRoot":""}
|
@@ -63,7 +63,7 @@ var useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
63
63
|
|
64
64
|
var useCounterBadgeStyles = function (state) {
|
65
65
|
var styles = useStyles();
|
66
|
-
state.className = react_make_styles_1.mergeClasses(styles.root, state.color === 'warning' && styles.warning, state.color === 'important' && styles.important, state.color === 'severe' && styles.severe, state.color === 'informative' && styles.informative, state.dot && styles.dot, !state.showZero && state.count === 0 && !state.dot && styles.hide, state.className);
|
66
|
+
state.root.className = react_make_styles_1.mergeClasses(styles.root, state.color === 'warning' && styles.warning, state.color === 'important' && styles.important, state.color === 'severe' && styles.severe, state.color === 'informative' && styles.informative, state.dot && styles.dot, !state.showZero && state.count === 0 && !state.dot && styles.hide, state.root.className);
|
67
67
|
return useBadgeStyles_1.useBadgeStyles(state);
|
68
68
|
};
|
69
69
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/CounterBadge/useCounterBadgeStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,IAAA,gBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AAGA,IAAM,SAAS,gBAAG,mBAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAgCA;;AAEG;;;AACI,IAAM,qBAAqB,GAAG,UAAC,KAAD,EAAyB;AAC5D,MAAM,MAAM,GAAG,SAAS,EAA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rC,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAK,IAAA,KAAK,EAAC,4BAAX;AAAwC,IAAA,OAAO,EAAC,eAAhD;AAAgE,IAAA,SAAS,EAAE,KAAK,CAAC;AAAjF,GAAA,EACE,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA;AAAM,IAAA,CAAC,EAF4B;AAEnC,GAAA,CADF,CADqC;AAItC,CAJkB,CAAnB;AAQyE,OAAA,CAAA,UAAA,GAAA,UAAA;AAFzE,UAAU,CAAC,WAAX,GAAyB,YAAzB","sourceRoot":""}
|
@@ -1,8 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
+
import type { PresenceBadgeProps } from './PresenceBadge.types';
|
2
3
|
/**
|
3
4
|
* Define a styled Badge, using the `useBadge` hook.
|
4
5
|
*/
|
5
|
-
export declare const PresenceBadge: React.ForwardRefExoticComponent<Pick<
|
6
|
-
status?: "available" | "busy" | "outOfOffice" | "away" | "offline" | "doNotDisturb" | undefined;
|
7
|
-
outOfOffice?: boolean | undefined;
|
8
|
-
} & React.RefAttributes<HTMLElement>>;
|
6
|
+
export declare const PresenceBadge: React.ForwardRefExoticComponent<Pick<PresenceBadgeProps, "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "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" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "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" | "css" | "as" | "icon" | "shape" | "size" | "appearance" | "iconPosition" | "outOfOffice" | "status"> & React.RefAttributes<HTMLElement>>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/PresenceBadge/PresenceBadge.tsx"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,kBAAA,gBAAA,OAAA,CAAA,oBAAA,CAAA;;AACA,IAAA,wBAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;;AACA,IAAA,OAAA,gBAAA,OAAA,CAAA,aAAA,CAAA;AAGA;;AAEG;;;AACU,OAAA,CAAA,aAAA,gBAAgB,KAAK,CAAC,UAAN,CAAkD,UAAC,KAAD,EAAQ,GAAR,EAAW;AACxF,MAAM,KAAK,GAAG,kBAAA,CAAA,gBAAA,CAAiB,KAAjB,EAAwB,GAAxB,CAAd;AACA,EAAA,wBAAA,CAAA,sBAAA,CAAuB,KAAvB;AAEA,SAAO,OAAA,CAAA,WAAA,CAAY,KAAZ,CAAP;AACD,CAL4B,CAAhB;AAOb,OAAA,CAAA,aAAA,CAAc,WAAd,GAA4B,eAA5B","
|
1
|
+
{"version":3,"sources":["../../../src/components/PresenceBadge/PresenceBadge.tsx"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,kBAAA,gBAAA,OAAA,CAAA,oBAAA,CAAA;;AACA,IAAA,wBAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;;AACA,IAAA,OAAA,gBAAA,OAAA,CAAA,aAAA,CAAA;AAGA;;AAEG;;;AACU,OAAA,CAAA,aAAA,gBAAgB,KAAK,CAAC,UAAN,CAAkD,UAAC,KAAD,EAAQ,GAAR,EAAW;AACxF,MAAM,KAAK,GAAG,kBAAA,CAAA,gBAAA,CAAiB,KAAjB,EAAwB,GAAxB,CAAd;AACA,EAAA,wBAAA,CAAA,sBAAA,CAAuB,KAAvB;AAEA,SAAO,OAAA,CAAA,WAAA,CAAY,KAAZ,CAAP;AACD,CAL4B,CAAhB;AAOb,OAAA,CAAA,aAAA,CAAc,WAAd,GAA4B,eAA5B","sourceRoot":""}
|
@@ -1,28 +1,17 @@
|
|
1
1
|
import type { BadgeProps, BadgeState } from '../Badge/index';
|
2
2
|
export declare type PresenceBadgeStatus = 'busy' | 'outOfOffice' | 'away' | 'available' | 'offline' | 'doNotDisturb';
|
3
|
-
export
|
3
|
+
export interface PresenceBadgeCommons {
|
4
4
|
/**
|
5
5
|
* Represents several status
|
6
|
-
* @
|
7
|
-
*/
|
8
|
-
status?: PresenceBadgeStatus;
|
9
|
-
/**
|
10
|
-
* Modifies the display to indicate that the user is out of office.
|
11
|
-
* This can be combined with any status to display an out-of-office version of that status
|
12
|
-
* @defaultvalue false
|
13
|
-
*/
|
14
|
-
outOfOffice?: boolean;
|
15
|
-
};
|
16
|
-
export declare type PresenceBadgeState = Omit<BadgeState, 'shape' | 'appearance'> & {
|
17
|
-
/**
|
18
|
-
* Represents several status
|
19
|
-
* @defaultvalue available
|
6
|
+
* @default available
|
20
7
|
*/
|
21
8
|
status: PresenceBadgeStatus;
|
22
9
|
/**
|
23
10
|
* Modifies the display to indicate that the user is out of office.
|
24
11
|
* This can be combined with any status to display an out-of-office version of that status
|
25
|
-
* @
|
12
|
+
* @default false
|
26
13
|
*/
|
27
14
|
outOfOffice: boolean;
|
28
|
-
}
|
15
|
+
}
|
16
|
+
export declare type PresenceBadgeProps = BadgeProps & Partial<PresenceBadgeCommons>;
|
17
|
+
export declare type PresenceBadgeState = BadgeState & PresenceBadgeCommons;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/PresenceBadge/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,uBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA","
|
1
|
+
{"version":3,"sources":["../../../src/components/PresenceBadge/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,uBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA","sourceRoot":""}
|
@@ -1,10 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import type { PresenceBadgeProps, PresenceBadgeState } from './PresenceBadge.types';
|
3
|
-
/**
|
4
|
-
* Consts listing which props are shorthand props.
|
5
|
-
*/
|
6
|
-
export declare const presenceBadgeShorthandPropsCompat: (keyof PresenceBadgeProps)[];
|
7
3
|
/**
|
8
4
|
* Returns the props and state required to render the component
|
9
5
|
*/
|
10
|
-
export declare const usePresenceBadge: (props: PresenceBadgeProps, ref: React.Ref<HTMLElement
|
6
|
+
export declare const usePresenceBadge: (props: PresenceBadgeProps, ref: React.Ref<HTMLElement>) => PresenceBadgeState;
|
@@ -3,7 +3,9 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.usePresenceBadge =
|
6
|
+
exports.usePresenceBadge = void 0;
|
7
|
+
|
8
|
+
var tslib_1 = /*#__PURE__*/require("tslib");
|
7
9
|
|
8
10
|
var React = /*#__PURE__*/require("react");
|
9
11
|
|
@@ -12,16 +14,6 @@ var react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
12
14
|
var index_1 = /*#__PURE__*/require("../Badge/index");
|
13
15
|
|
14
16
|
var DefaultPresenceBadgeIcons_1 = /*#__PURE__*/require("./DefaultPresenceBadgeIcons");
|
15
|
-
/**
|
16
|
-
* Consts listing which props are shorthand props.
|
17
|
-
*/
|
18
|
-
|
19
|
-
|
20
|
-
exports.presenceBadgeShorthandPropsCompat = ['icon']; // eslint-disable-next-line deprecation/deprecation
|
21
|
-
|
22
|
-
var mergeProps = /*#__PURE__*/react_utilities_1.makeMergePropsCompat({
|
23
|
-
deepMerge: exports.presenceBadgeShorthandPropsCompat
|
24
|
-
});
|
25
17
|
|
26
18
|
var iconMap = function (outOfOffice) {
|
27
19
|
return {
|
@@ -38,19 +30,21 @@ var iconMap = function (outOfOffice) {
|
|
38
30
|
*/
|
39
31
|
|
40
32
|
|
41
|
-
var usePresenceBadge = function (props, ref
|
42
|
-
var _a;
|
33
|
+
var usePresenceBadge = function (props, ref) {
|
34
|
+
var _a, _b, _c;
|
43
35
|
|
44
|
-
var state =
|
45
|
-
size: 'small'
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
36
|
+
var state = tslib_1.__assign(tslib_1.__assign({}, index_1.useBadge(tslib_1.__assign(tslib_1.__assign({
|
37
|
+
size: 'small'
|
38
|
+
}, props), {
|
39
|
+
icon: react_utilities_1.resolveShorthand(props.icon, {
|
40
|
+
required: true
|
41
|
+
})
|
42
|
+
}), ref)), {
|
43
|
+
status: (_a = props.status) !== null && _a !== void 0 ? _a : 'available',
|
44
|
+
outOfOffice: (_b = props.outOfOffice) !== null && _b !== void 0 ? _b : false
|
45
|
+
});
|
52
46
|
|
53
|
-
if (!((
|
47
|
+
if (!((_c = state.icon) === null || _c === void 0 ? void 0 : _c.children)) {
|
54
48
|
state.icon.children = iconMap(state.outOfOffice)[state.status];
|
55
49
|
}
|
56
50
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/PresenceBadge/usePresenceBadge.tsx"],"names":[],"mappings":"
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,IAAI,EAAE;AAFC,GAAA,EAGJ,KAHI,CAAA,EAGC;AACR,IAAA,IAAI,EAAE,iBAAA,CAAA,gBAAA,CAAiB,KAAK,CAAC,IAAvB,EAA6B;AACjC,MAAA,QAAQ,EAAE;AADuB,KAA7B;AADE,GAHD,CAAR,EAQD,GARC,CADM,CAAA,EAUR;AACD,IAAA,MAAM,EAAA,CAAA,EAAA,GAAE,KAAK,CAAC,MAAR,MAAc,IAAd,IAAc,EAAA,KAAA,KAAA,CAAd,GAAc,EAAd,GAAkB,WADvB;AAED,IAAA,WAAW,EAAA,CAAA,EAAA,GAAE,KAAK,CAAC,WAAR,MAAmB,IAAnB,IAAmB,EAAA,KAAA,KAAA,CAAnB,GAAmB,EAAnB,GAAuB;AAFjC,GAVQ,CAAX;;AAeA,MAAI,EAAA,CAAA,EAAA,GAAC,KAAK,CAAC,IAAP,MAAW,IAAX,IAAW,EAAA,KAAA,KAAA,CAAX,GAAW,KAAA,CAAX,GAAW,EAAA,CAAE,QAAb,CAAJ,EAA2B;AACzB,IAAA,KAAK,CAAC,IAAN,CAAY,QAAZ,GAAuB,OAAO,CAAC,KAAK,CAAC,WAAP,CAAP,CAA2B,KAAK,CAAC,MAAjC,CAAvB;AACD;;AAED,SAAO,KAAP;AACD,CArBM;;AAAM,OAAA,CAAA,gBAAA,GAAgB,gBAAhB","sourceRoot":""}
|
@@ -85,7 +85,7 @@ var useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
85
85
|
|
86
86
|
var usePresenceBadgeStyles = function (state) {
|
87
87
|
var styles = useStyles();
|
88
|
-
state.className = react_make_styles_1.mergeClasses(styles.root, (state.status === 'busy' || state.status === 'doNotDisturb') && styles.statusBusy, state.status === 'away' && styles.statusAway, state.status === 'available' && styles.statusAvailable, state.status === 'offline' && styles.statusOffline, state.status === 'outOfOffice' && styles.statusOutOfOffice, state.outOfOffice && styles.outOfOffice, state.outOfOffice && state.status === 'available' && styles.outOfOfficeAvailable, state.outOfOffice && (state.status === 'busy' || state.status === 'doNotDisturb') && styles.outOfOfficeBusy, state.outOfOffice && state.status === 'away' && styles.outOfOfficeAway, (state.size === 'smallest' || state.size === 'smaller') && styles.thinBorder, state.className);
|
88
|
+
state.root.className = react_make_styles_1.mergeClasses(styles.root, (state.status === 'busy' || state.status === 'doNotDisturb') && styles.statusBusy, state.status === 'away' && styles.statusAway, state.status === 'available' && styles.statusAvailable, state.status === 'offline' && styles.statusOffline, state.status === 'outOfOffice' && styles.statusOutOfOffice, state.outOfOffice && styles.outOfOffice, state.outOfOffice && state.status === 'available' && styles.outOfOfficeAvailable, state.outOfOffice && (state.status === 'busy' || state.status === 'doNotDisturb') && styles.outOfOfficeBusy, state.outOfOffice && state.status === 'away' && styles.outOfOfficeAway, (state.size === 'smallest' || state.size === 'smaller') && styles.thinBorder, state.root.className);
|
89
89
|
return Badge_1.useBadgeStyles(state);
|
90
90
|
};
|
91
91
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/PresenceBadge/usePresenceBadgeStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,IAAA,OAAA,gBAAA,OAAA,CAAA,aAAA,CAAA;;AAGA,IAAM,SAAS,gBAAG,mBAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AA4CA;;AAEG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A,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,SAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iCAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,EAAA,OAAA","sourceRoot":""}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-badge",
|
3
|
-
"version": "9.0.0-alpha.
|
3
|
+
"version": "9.0.0-alpha.84",
|
4
4
|
"description": "React components for building web experiences",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -25,11 +25,11 @@
|
|
25
25
|
"storybook": "start-storybook"
|
26
26
|
},
|
27
27
|
"devDependencies": {
|
28
|
-
"@fluentui/babel-make-styles": "9.0.0-alpha.
|
28
|
+
"@fluentui/babel-make-styles": "9.0.0-alpha.52",
|
29
29
|
"@fluentui/eslint-plugin": "*",
|
30
|
-
"@fluentui/jest-serializer-make-styles": "9.0.0-alpha.
|
30
|
+
"@fluentui/jest-serializer-make-styles": "9.0.0-alpha.45",
|
31
31
|
"@fluentui/react-conformance": "*",
|
32
|
-
"@fluentui/react-conformance-make-styles": "9.0.0-alpha.
|
32
|
+
"@fluentui/react-conformance-make-styles": "9.0.0-alpha.14",
|
33
33
|
"@fluentui/scripts": "^1.0.0",
|
34
34
|
"@types/enzyme": "3.10.3",
|
35
35
|
"@types/enzyme-adapter-react-16": "1.0.3",
|
@@ -43,9 +43,9 @@
|
|
43
43
|
"react-test-renderer": "^16.3.0"
|
44
44
|
},
|
45
45
|
"dependencies": {
|
46
|
-
"@fluentui/react-make-styles": "9.0.0-alpha.
|
46
|
+
"@fluentui/react-make-styles": "9.0.0-alpha.70",
|
47
47
|
"@fluentui/react-theme": "9.0.0-alpha.23",
|
48
|
-
"@fluentui/react-utilities": "9.0.0-alpha.
|
48
|
+
"@fluentui/react-utilities": "9.0.0-alpha.50",
|
49
49
|
"tslib": "^2.1.0"
|
50
50
|
},
|
51
51
|
"peerDependencies": {
|
package/lib-amd/Badge.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export * from './components/Badge/index';
|
package/lib-amd/Badge.js
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "./components/Badge/index"], function (require, exports, tslib_1, index_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
tslib_1.__exportStar(index_1, exports);
|
5
|
-
});
|
6
|
-
//# sourceMappingURL=Badge.js.map
|
package/lib-amd/Badge.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Badge.js","sourceRoot":"../src/","sources":["Badge.ts"],"names":[],"mappings":";;;IAAA,uCAAyC","sourcesContent":["export * from './components/Badge/index';\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './components/CounterBadge/index';
|
package/lib-amd/CounterBadge.js
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "./components/CounterBadge/index"], function (require, exports, tslib_1, index_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
tslib_1.__exportStar(index_1, exports);
|
5
|
-
});
|
6
|
-
//# sourceMappingURL=CounterBadge.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"CounterBadge.js","sourceRoot":"../src/","sources":["CounterBadge.ts"],"names":[],"mappings":";;;IAAA,uCAAgD","sourcesContent":["export * from './components/CounterBadge/index';\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './components/PresenceBadge/index';
|
package/lib-amd/PresenceBadge.js
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "./components/PresenceBadge/index"], function (require, exports, tslib_1, index_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
tslib_1.__exportStar(index_1, exports);
|
5
|
-
});
|
6
|
-
//# sourceMappingURL=PresenceBadge.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"PresenceBadge.js","sourceRoot":"../src/","sources":["PresenceBadge.ts"],"names":[],"mappings":";;;IAAA,uCAAiD","sourcesContent":["export * from './components/PresenceBadge/index';\n"]}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
define(["require", "exports", "@fluentui/react-conformance", "@fluentui/react-conformance-make-styles"], function (require, exports, react_conformance_1, react_conformance_make_styles_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.isConformant = void 0;
|
5
|
-
function isConformant(testInfo) {
|
6
|
-
var defaultOptions = {
|
7
|
-
asPropHandlesRef: true,
|
8
|
-
componentPath: module.parent.filename.replace('.test', ''),
|
9
|
-
extraTests: react_conformance_make_styles_1.default,
|
10
|
-
};
|
11
|
-
react_conformance_1.isConformant(defaultOptions, testInfo);
|
12
|
-
}
|
13
|
-
exports.isConformant = isConformant;
|
14
|
-
});
|
15
|
-
//# sourceMappingURL=isConformant.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"isConformant.js","sourceRoot":"../src/","sources":["common/isConformant.ts"],"names":[],"mappings":";;;;IAIA,SAAgB,YAAY,CAC1B,QAAyF;QAEzF,IAAM,cAAc,GAAyC;YAC3D,gBAAgB,EAAE,IAAI;YACtB,aAAa,EAAE,MAAO,CAAC,MAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;YAC5D,UAAU,EAAE,uCAAqC;SAClD,CAAC;QAEF,gCAAgB,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;IAC7C,CAAC;IAVD,oCAUC","sourcesContent":["import { isConformant as baseIsConformant } from '@fluentui/react-conformance';\nimport makeStylesTests from '@fluentui/react-conformance-make-styles';\nimport type { IsConformantOptions, TestObject } from '@fluentui/react-conformance';\n\nexport function isConformant<TProps = {}>(\n testInfo: Omit<IsConformantOptions<TProps>, 'componentPath'> & { componentPath?: string },\n) {\n const defaultOptions: Partial<IsConformantOptions<TProps>> = {\n asPropHandlesRef: true,\n componentPath: module!.parent!.filename.replace('.test', ''),\n extraTests: makeStylesTests as TestObject<TProps>,\n };\n\n baseIsConformant(defaultOptions, testInfo);\n}\n"]}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
define(["require", "exports", "react", "./useBadge", "./useBadgeStyles", "./renderBadge"], function (require, exports, React, useBadge_1, useBadgeStyles_1, renderBadge_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.Badge = void 0;
|
5
|
-
/**
|
6
|
-
* Define a styled Badge, using the `useBadge` hook.
|
7
|
-
*/
|
8
|
-
exports.Badge = React.forwardRef(function (props, ref) {
|
9
|
-
var state = useBadge_1.useBadge(props, ref);
|
10
|
-
useBadgeStyles_1.useBadgeStyles(state);
|
11
|
-
return renderBadge_1.renderBadge(state);
|
12
|
-
});
|
13
|
-
exports.Badge.displayName = 'Badge';
|
14
|
-
});
|
15
|
-
//# sourceMappingURL=Badge.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Badge.js","sourceRoot":"../src/","sources":["components/Badge/Badge.tsx"],"names":[],"mappings":";;;;IAMA;;OAEG;IACU,QAAA,KAAK,GAA2E,KAAK,CAAC,UAAU,CAG3G,UAAC,KAAK,EAAE,GAAG;QACX,IAAM,KAAK,GAAG,mBAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QACnC,+BAAc,CAAC,KAAK,CAAC,CAAC;QAEtB,OAAO,yBAAW,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;IAEH,aAAK,CAAC,WAAW,GAAG,OAAO,CAAC","sourcesContent":["import * as React from 'react';\nimport { useBadge } from './useBadge';\nimport { useBadgeStyles } from './useBadgeStyles';\nimport { renderBadge } from './renderBadge';\nimport type { BadgeProps } from './Badge.types';\n\n/**\n * Define a styled Badge, using the `useBadge` hook.\n */\nexport const Badge: React.FunctionComponent<BadgeProps & React.RefAttributes<HTMLElement>> = React.forwardRef<\n HTMLElement,\n BadgeProps\n>((props, ref) => {\n const state = useBadge(props, ref);\n useBadgeStyles(state);\n\n return renderBadge(state);\n});\n\nBadge.displayName = 'Badge';\n"]}
|
@@ -1,47 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import type { ComponentPropsCompat, ShorthandPropsCompat, ObjectShorthandPropsCompat } from '@fluentui/react-utilities';
|
3
|
-
export declare type BadgeSize = 'smallest' | 'smaller' | 'small' | 'medium' | 'large' | 'larger' | 'largest';
|
4
|
-
export declare type BadgeAppearance = 'filled' | 'outline' | 'ghost' | 'tint';
|
5
|
-
export declare type BadgeShape = 'rounded' | 'square' | 'circular';
|
6
|
-
export declare type BadgeColors = 'brand' | 'danger' | 'severe' | 'warning' | 'success' | 'important' | 'informative' | 'subtle';
|
7
|
-
export declare type BadgeProps = ComponentPropsCompat & React.HTMLAttributes<HTMLElement> & {
|
8
|
-
/**
|
9
|
-
* A Badge can be sized.
|
10
|
-
* @defaultvalue medium
|
11
|
-
*/
|
12
|
-
size?: BadgeSize;
|
13
|
-
/**
|
14
|
-
* A Badge can be square, circular or rounded
|
15
|
-
* @defaultvalue circular
|
16
|
-
*/
|
17
|
-
shape?: BadgeShape;
|
18
|
-
/**
|
19
|
-
* A Badge can be filled, outline, ghost, inverted
|
20
|
-
* @defaultvalue filled
|
21
|
-
*/
|
22
|
-
appearance?: BadgeAppearance;
|
23
|
-
/**
|
24
|
-
* A Badge has a preset of colors
|
25
|
-
* @defaultvalue filled
|
26
|
-
*/
|
27
|
-
color?: BadgeColors;
|
28
|
-
/**
|
29
|
-
* Icon slot
|
30
|
-
*/
|
31
|
-
icon?: ShorthandPropsCompat<React.HTMLAttributes<HTMLElement>>;
|
32
|
-
/**
|
33
|
-
* Position for Icon to be rendered
|
34
|
-
* @defaultvalue before
|
35
|
-
*/
|
36
|
-
iconPosition?: 'before' | 'after';
|
37
|
-
};
|
38
|
-
export declare type BadgeState = BadgeProps & {
|
39
|
-
/**
|
40
|
-
* Ref to the root slot
|
41
|
-
*/
|
42
|
-
ref: React.RefObject<HTMLElement>;
|
43
|
-
/**
|
44
|
-
* Icon slot when processed by internal state
|
45
|
-
*/
|
46
|
-
icon?: ObjectShorthandPropsCompat<React.HTMLAttributes<HTMLSpanElement>>;
|
47
|
-
};
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Badge.types.js","sourceRoot":"../src/","sources":["components/Badge/Badge.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport type { ComponentPropsCompat, ShorthandPropsCompat, ObjectShorthandPropsCompat } from '@fluentui/react-utilities';\n\nexport type BadgeSize = 'smallest' | 'smaller' | 'small' | 'medium' | 'large' | 'larger' | 'largest';\n\nexport type BadgeAppearance = 'filled' | 'outline' | 'ghost' | 'tint';\n\nexport type BadgeShape = 'rounded' | 'square' | 'circular';\n\nexport type BadgeColors =\n | 'brand'\n | 'danger'\n | 'severe'\n | 'warning'\n | 'success'\n | 'important'\n | 'informative'\n | 'subtle';\n\nexport type BadgeProps = ComponentPropsCompat &\n React.HTMLAttributes<HTMLElement> & {\n /**\n * A Badge can be sized.\n * @defaultvalue medium\n */\n size?: BadgeSize;\n\n /**\n * A Badge can be square, circular or rounded\n * @defaultvalue circular\n */\n shape?: BadgeShape;\n\n /**\n * A Badge can be filled, outline, ghost, inverted\n * @defaultvalue filled\n */\n appearance?: BadgeAppearance;\n\n /**\n * A Badge has a preset of colors\n * @defaultvalue filled\n */\n color?: BadgeColors;\n\n /**\n * Icon slot\n */\n icon?: ShorthandPropsCompat<React.HTMLAttributes<HTMLElement>>;\n\n /**\n * Position for Icon to be rendered\n * @defaultvalue before\n */\n iconPosition?: 'before' | 'after';\n };\n\nexport type BadgeState = BadgeProps & {\n /**\n * Ref to the root slot\n */\n ref: React.RefObject<HTMLElement>;\n /**\n * Icon slot when processed by internal state\n */\n icon?: ObjectShorthandPropsCompat<React.HTMLAttributes<HTMLSpanElement>>;\n};\n"]}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "./Badge", "./Badge.types", "./renderBadge", "./useBadge", "./useBadgeStyles"], function (require, exports, tslib_1, Badge_1, Badge_types_1, renderBadge_1, useBadge_1, useBadgeStyles_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
tslib_1.__exportStar(Badge_1, exports);
|
5
|
-
tslib_1.__exportStar(Badge_types_1, exports);
|
6
|
-
tslib_1.__exportStar(renderBadge_1, exports);
|
7
|
-
tslib_1.__exportStar(useBadge_1, exports);
|
8
|
-
tslib_1.__exportStar(useBadgeStyles_1, exports);
|
9
|
-
});
|
10
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/Badge/index.ts"],"names":[],"mappings":";;;IAAA,uCAAwB;IACxB,6CAA8B;IAC9B,6CAA8B;IAC9B,0CAA2B;IAC3B,gDAAiC","sourcesContent":["export * from './Badge';\nexport * from './Badge.types';\nexport * from './renderBadge';\nexport * from './useBadge';\nexport * from './useBadgeStyles';\n"]}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "react", "@fluentui/react-utilities", "./useBadge"], function (require, exports, tslib_1, React, react_utilities_1, useBadge_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.renderBadge = void 0;
|
5
|
-
var renderBadge = function (state) {
|
6
|
-
var _a = react_utilities_1.getSlotsCompat(state, useBadge_1.badgeShorthandPropsCompat), slots = _a.slots, slotProps = _a.slotProps;
|
7
|
-
return (React.createElement(slots.root, tslib_1.__assign({}, slotProps.root),
|
8
|
-
state.iconPosition === 'before' && React.createElement(slots.icon, tslib_1.__assign({}, slotProps.icon)),
|
9
|
-
state.children,
|
10
|
-
state.iconPosition === 'after' && React.createElement(slots.icon, tslib_1.__assign({}, slotProps.icon))));
|
11
|
-
};
|
12
|
-
exports.renderBadge = renderBadge;
|
13
|
-
});
|
14
|
-
//# sourceMappingURL=renderBadge.js.map
|