@fluentui/react-badge 9.0.0-alpha.83 → 9.0.0-alpha.87
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +182 -8
- package/CHANGELOG.md +63 -8
- package/Spec.md +3 -47
- package/dist/react-badge.d.ts +73 -123
- 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 +6 -2
- package/lib/components/Badge/Badge.js.map +1 -1
- package/lib/components/Badge/Badge.types.d.ts +20 -32
- 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 +5 -5
- package/lib/components/Badge/useBadgeStyles.js.map +1 -1
- package/lib/components/CounterBadge/CounterBadge.d.ts +1 -8
- package/lib/components/CounterBadge/CounterBadge.js.map +1 -1
- package/lib/components/CounterBadge/CounterBadge.types.d.ts +24 -38
- 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 +6 -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 +6 -2
- package/lib-commonjs/components/Badge/Badge.js.map +1 -1
- package/lib-commonjs/components/Badge/Badge.types.d.ts +20 -32
- 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 +5 -5
- package/lib-commonjs/components/Badge/useBadgeStyles.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/CounterBadge.d.ts +1 -8
- package/lib-commonjs/components/CounterBadge/CounterBadge.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/CounterBadge.types.d.ts +24 -38
- 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 +6 -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
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"DefaultPresenceBadgeIcons.js","sourceRoot":"../src/","sources":["components/PresenceBadge/DefaultPresenceBadgeIcons.tsx"],"names":[],"mappings":";;;;IAIA,IAAM,SAAS,GAAG,8BAAU,CAAC;QAC3B,IAAI,EAAE;YACJ,OAAO,EAAE,cAAc;YACvB,aAAa,EAAE,QAAQ;YACvB,KAAK,EAAE,MAAM;YACb,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,KAAK;SACd;QACD,GAAG,EAAE;YACH,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,cAAc;YACpB,aAAa,EAAE,KAAK;SACrB;KACF,CAAC,CAAC;IAEH,EAAE;IACF,2EAA2E;IAC3E,gEAAgE;IAChE,EAAE;IAEF,IAAM,YAAY,GAAG,UAAC,KAA4C;;QAChE,IAAM,cA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U,CAAC,UAAA,KAAK,IAAI,OAAA,CACzC,6BAAK,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,eAAe,EAAC,SAAS,EAAE,KAAK,CAAC,UAAU;QACzF,8BAAM,CAAC,EAAC,iLAAiL,GAAG,CACxL,CACP,EAJ0C,CAI1C,CAAC,CAAC;IA4BsB,wCAAc;IA1BvC,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC;IAE9C,IAAM,cAAc,GAAG,kBAAU,CAAC,UAAA,KAAK,IAAI,OAAA,CACzC,6BAAK,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,eAAe,EAAC,SAAS,EAAE,KAAK,CAAC,UAAU;QACzF,8BAAM,CAAC,EAAC,wNAAwN,GAAG,CAC/N,CACP,EAJ0C,CAI1C,CAAC,CAAC;IAoBsC,wCAAc;IAlBvD,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC;IAE9C,IAAM,cAAc,GAAG,kBAAU,CAAC,UAAA,KAAK,IAAI,OAAA,CACzC,6BAAK,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,eAAe,EAAC,SAAS,EAAE,KAAK,CAAC,UAAU;QACzF,8BAAM,CAAC,EAAC,0RAA0R,GAAG,CACjS,CACP,EAJ0C,CAI1C,CAAC,CAAC;IAYsD,wCAAc;IAVvE,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC;IAE9C,IAAM,UAAU,GAAG,kBAAU,CAAC,UAAA,KAAK,IAAI,OAAA,CACrC,6BAAK,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,eAAe,EAAC,SAAS,EAAE,KAAK,CAAC,UAAU;QACzF,8BAAM,CAAC,EAAC,qGAAqG,GAAG,CAC5G,CACP,EAJsC,CAItC,CAAC,CAAC;IAIsE,gCAAU;IAFnF,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import { mergeClasses, makeStyles } from '@fluentui/react-make-styles';\nimport { getNativeProps, htmlElementProperties } from '@fluentui/react-utilities';\nimport * as React from 'react';\n\nconst useStyles = makeStyles({\n root: {\n display: 'inline-block',\n verticalAlign: 'middle',\n speak: 'none',\n width: '1em',\n height: '1em',\n },\n svg: {\n height: '100%',\n fill: 'currentColor',\n verticalAlign: 'top',\n },\n});\n\n//\n// !!! A temporary workaround to avoid dependencies on any icon packages.\n// !!! A usage of converged icon package should be considered.\n//\n\nconst useIconProps = (props: React.HTMLAttributes<HTMLSpanElement>) => {\n const containerProps = props['aria-label']\n ? {}\n : {\n role: 'presentation',\n ['aria-hidden']: true,\n };\n const nativeProps = getNativeProps<React.HTMLAttributes<HTMLElement>>(props, htmlElementProperties);\n const styles = useStyles();\n\n const rootClasses = styles.root;\n const svgClasses = styles.svg;\n\n return { containerProps, nativeProps, rootClasses, svgClasses };\n};\n\nexport const renderIcon = (\n SVGElement: (props: { svgClasses: string }) => JSX.Element,\n): React.FC<React.HTMLAttributes<HTMLSpanElement>> => props => {\n const { containerProps, nativeProps, rootClasses, svgClasses } = useIconProps(props);\n\n return React.createElement(\n 'span',\n {\n ...containerProps,\n ...nativeProps,\n className: mergeClasses(rootClasses, props.className),\n },\n <SVGElement svgClasses={svgClasses} />,\n );\n};\n\nconst SkypeMinusIcon = renderIcon(props => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 2048 2048\" className={props.svgClasses}>\n <path d=\"M1591 823q42 0 78 16t64 43 43 63 16 79q0 42-16 78t-43 64-63 43-79 16H395q-42 0-78-16t-64-43-42-63-16-79q0-42 15-78t43-64 63-43 79-16h1196z\" />\n </svg>\n));\n\nSkypeMinusIcon.displayName = 'SkypeMinusIcon';\n\nconst SkypeClockIcon = renderIcon(props => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 2048 2048\" className={props.svgClasses}>\n <path d=\"M1431 1705q28 28 43 65t15 77q0 42-15 78t-43 64-63 43-79 16q-83 0-142-59l-594-593q-28-28-43-65t-15-77V201q0-42 15-78t43-64 63-43 79-16q42 0 78 16t64 43 43 63 16 79v970l535 534z\" />\n </svg>\n));\n\nSkypeClockIcon.displayName = 'SkypeClockIcon';\n\nconst SkypeCheckIcon = renderIcon(props => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 2048 2048\" className={props.svgClasses}>\n <path d=\"M1570 437q42 0 78 15t64 43 42 63 16 79q0 40-15 77t-43 65l-794 795q-28 28-65 43t-77 16q-40 0-77-15t-65-44l-362-362q-28-28-43-65t-16-77q0-42 16-78t43-64 63-42 79-16q40 0 77 15t65 43l220 220 652-653q28-28 65-43t77-15z\" />\n </svg>\n));\n\nSkypeCheckIcon.displayName = 'SkypeCheckIcon';\n\nconst SkypeArrowIcon = renderIcon(props => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 2048 2048\" className={props.svgClasses}>\n <path d=\"M1980 964q0 41-15 77t-43 63-63 42-77 16H739l281 280q28 27 43 64t15 76q0 41-15 77t-43 63-63 42-77 16q-39 0-75-15t-65-43l-615-616q-33-33-47-68t-14-82q0-39 17-73t44-61l615-616q28-28 65-43t76-15q41 0 77 16t62 43 42 63 16 77q0 39-15 75t-43 64L739 766h1043q41 0 77 15t63 43 42 63 16 77z\" />\n </svg>\n));\n\nSkypeArrowIcon.displayName = 'SkypeArrowIcon';\n\nconst CancelIcon = renderIcon(props => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 2048 2048\" className={props.svgClasses}>\n <path d=\"M1115 1024l690 691-90 90-691-690-691 690-90-90 690-691-690-691 90-90 691 690 691-690 90 90-690 691z\" />\n </svg>\n));\n\nCancelIcon.displayName = 'CancelIcon';\n\nexport { SkypeMinusIcon, SkypeClockIcon, SkypeCheckIcon, SkypeArrowIcon, CancelIcon };\n"]}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
/**
|
3
|
-
* Define a styled Badge, using the `useBadge` hook.
|
4
|
-
*/
|
5
|
-
export declare const PresenceBadge: React.ForwardRefExoticComponent<Pick<import("../Badge/Badge.types").BadgeProps, "children" | "as" | "className" | "icon" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "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" | "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" | "size" | "iconPosition"> & {
|
6
|
-
status?: "available" | "busy" | "outOfOffice" | "away" | "offline" | "doNotDisturb" | undefined;
|
7
|
-
outOfOffice?: boolean | undefined;
|
8
|
-
} & React.RefAttributes<HTMLElement>>;
|
@@ -1,15 +0,0 @@
|
|
1
|
-
define(["require", "exports", "react", "./usePresenceBadge", "./usePresenceBadgeStyles", "../../Badge"], function (require, exports, React, usePresenceBadge_1, usePresenceBadgeStyles_1, Badge_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.PresenceBadge = void 0;
|
5
|
-
/**
|
6
|
-
* Define a styled Badge, using the `useBadge` hook.
|
7
|
-
*/
|
8
|
-
exports.PresenceBadge = React.forwardRef(function (props, ref) {
|
9
|
-
var state = usePresenceBadge_1.usePresenceBadge(props, ref);
|
10
|
-
usePresenceBadgeStyles_1.usePresenceBadgeStyles(state);
|
11
|
-
return Badge_1.renderBadge(state);
|
12
|
-
});
|
13
|
-
exports.PresenceBadge.displayName = 'PresenceBadge';
|
14
|
-
});
|
15
|
-
//# sourceMappingURL=PresenceBadge.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"PresenceBadge.js","sourceRoot":"../src/","sources":["components/PresenceBadge/PresenceBadge.tsx"],"names":[],"mappings":";;;;IAMA;;OAEG;IACU,QAAA,aAAa,GAAG,KAAK,CAAC,UAAU,CAAkC,UAAC,KAAK,EAAE,GAAG;QACxF,IAAM,KAAK,GAAG,mCAAgB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAC3C,+CAAsB,CAAC,KAAK,CAAC,CAAC;QAE9B,OAAO,mBAAW,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;IAEH,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import * as React from 'react';\nimport { usePresenceBadge } from './usePresenceBadge';\nimport { usePresenceBadgeStyles } from './usePresenceBadgeStyles';\nimport { renderBadge } from '../../Badge';\nimport type { PresenceBadgeProps } from './PresenceBadge.types';\n\n/**\n * Define a styled Badge, using the `useBadge` hook.\n */\nexport const PresenceBadge = React.forwardRef<HTMLElement, PresenceBadgeProps>((props, ref) => {\n const state = usePresenceBadge(props, ref);\n usePresenceBadgeStyles(state);\n\n return renderBadge(state);\n});\n\nPresenceBadge.displayName = 'PresenceBadge';\n"]}
|
@@ -1,28 +0,0 @@
|
|
1
|
-
import type { BadgeProps, BadgeState } from '../Badge/index';
|
2
|
-
export declare type PresenceBadgeStatus = 'busy' | 'outOfOffice' | 'away' | 'available' | 'offline' | 'doNotDisturb';
|
3
|
-
export declare type PresenceBadgeProps = Omit<BadgeProps, 'shape' | 'appearance'> & {
|
4
|
-
/**
|
5
|
-
* Represents several status
|
6
|
-
* @defaultvalue available
|
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
|
20
|
-
*/
|
21
|
-
status: PresenceBadgeStatus;
|
22
|
-
/**
|
23
|
-
* Modifies the display to indicate that the user is out of office.
|
24
|
-
* This can be combined with any status to display an out-of-office version of that status
|
25
|
-
* @defaultvalue false
|
26
|
-
*/
|
27
|
-
outOfOffice: boolean;
|
28
|
-
};
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"PresenceBadge.types.js","sourceRoot":"../src/","sources":["components/PresenceBadge/PresenceBadge.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BadgeProps, BadgeState } from '../Badge/index';\n\nexport type PresenceBadgeStatus = 'busy' | 'outOfOffice' | 'away' | 'available' | 'offline' | 'doNotDisturb';\n\nexport type PresenceBadgeProps = Omit<BadgeProps, 'shape' | 'appearance'> & {\n /**\n * Represents several status\n * @defaultvalue available\n */\n status?: PresenceBadgeStatus;\n /**\n * Modifies the display to indicate that the user is out of office.\n * This can be combined with any status to display an out-of-office version of that status\n * @defaultvalue false\n */\n outOfOffice?: boolean;\n};\n\nexport type PresenceBadgeState = Omit<BadgeState, 'shape' | 'appearance'> & {\n /**\n * Represents several status\n * @defaultvalue available\n */\n status: PresenceBadgeStatus;\n /**\n * Modifies the display to indicate that the user is out of office.\n * This can be combined with any status to display an out-of-office version of that status\n * @defaultvalue false\n */\n outOfOffice: boolean;\n};\n"]}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "./PresenceBadge", "./PresenceBadge.types", "./usePresenceBadge", "./usePresenceBadgeStyles"], function (require, exports, tslib_1, PresenceBadge_1, PresenceBadge_types_1, usePresenceBadge_1, usePresenceBadgeStyles_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
tslib_1.__exportStar(PresenceBadge_1, exports);
|
5
|
-
tslib_1.__exportStar(PresenceBadge_types_1, exports);
|
6
|
-
tslib_1.__exportStar(usePresenceBadge_1, exports);
|
7
|
-
tslib_1.__exportStar(usePresenceBadgeStyles_1, exports);
|
8
|
-
});
|
9
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/PresenceBadge/index.ts"],"names":[],"mappings":";;;IAAA,+CAAgC;IAChC,qDAAsC;IACtC,kDAAmC;IACnC,wDAAyC","sourcesContent":["export * from './PresenceBadge';\nexport * from './PresenceBadge.types';\nexport * from './usePresenceBadge';\nexport * from './usePresenceBadgeStyles';\n"]}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
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
|
-
/**
|
8
|
-
* Returns the props and state required to render the component
|
9
|
-
*/
|
10
|
-
export declare const usePresenceBadge: (props: PresenceBadgeProps, ref: React.Ref<HTMLElement>, defaultProps?: PresenceBadgeProps | undefined) => PresenceBadgeState;
|
@@ -1,37 +0,0 @@
|
|
1
|
-
define(["require", "exports", "react", "@fluentui/react-utilities", "../Badge/index", "./DefaultPresenceBadgeIcons"], function (require, exports, React, react_utilities_1, index_1, DefaultPresenceBadgeIcons_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.usePresenceBadge = exports.presenceBadgeShorthandPropsCompat = void 0;
|
5
|
-
/**
|
6
|
-
* Consts listing which props are shorthand props.
|
7
|
-
*/
|
8
|
-
exports.presenceBadgeShorthandPropsCompat = ['icon'];
|
9
|
-
// eslint-disable-next-line deprecation/deprecation
|
10
|
-
var mergeProps = react_utilities_1.makeMergePropsCompat({ deepMerge: exports.presenceBadgeShorthandPropsCompat });
|
11
|
-
var iconMap = function (outOfOffice) { return ({
|
12
|
-
busy: null,
|
13
|
-
available: outOfOffice ? React.createElement(DefaultPresenceBadgeIcons_1.SkypeArrowIcon, null) : React.createElement(DefaultPresenceBadgeIcons_1.SkypeCheckIcon, null),
|
14
|
-
away: outOfOffice ? React.createElement(DefaultPresenceBadgeIcons_1.SkypeArrowIcon, null) : React.createElement(DefaultPresenceBadgeIcons_1.SkypeClockIcon, null),
|
15
|
-
offline: React.createElement(DefaultPresenceBadgeIcons_1.CancelIcon, null),
|
16
|
-
outOfOffice: React.createElement(DefaultPresenceBadgeIcons_1.SkypeArrowIcon, null),
|
17
|
-
doNotDisturb: React.createElement(DefaultPresenceBadgeIcons_1.SkypeMinusIcon, null),
|
18
|
-
}); };
|
19
|
-
/**
|
20
|
-
* Returns the props and state required to render the component
|
21
|
-
*/
|
22
|
-
var usePresenceBadge = function (props, ref, defaultProps) {
|
23
|
-
var _a;
|
24
|
-
var state = index_1.useBadge(props, ref, mergeProps({
|
25
|
-
size: 'small',
|
26
|
-
status: 'available',
|
27
|
-
outOfOffice: false,
|
28
|
-
icon: { as: 'span' },
|
29
|
-
}, defaultProps));
|
30
|
-
if (!((_a = state.icon) === null || _a === void 0 ? void 0 : _a.children)) {
|
31
|
-
state.icon.children = iconMap(state.outOfOffice)[state.status];
|
32
|
-
}
|
33
|
-
return state;
|
34
|
-
};
|
35
|
-
exports.usePresenceBadge = usePresenceBadge;
|
36
|
-
});
|
37
|
-
//# sourceMappingURL=usePresenceBadge.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"usePresenceBadge.js","sourceRoot":"../src/","sources":["components/PresenceBadge/usePresenceBadge.tsx"],"names":[],"mappings":";;;;IAaA;;OAEG;IACU,QAAA,iCAAiC,GAAiC,CAAC,MAAM,CAAC,CAAC;IAExF,mDAAmD;IACnD,IAAM,UAAU,GAAG,sCAAoB,CAAqB,EAAE,SAAS,EAAE,yCAAiC,EAAE,CAAC,CAAC;IAE9G,IAAM,OAAO,GAA8E,UAAA,WAAW,IAAI,OAAA,CAAC;QACzG,IAAI,EAAE,IAAI;QACV,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC,oBAAC,0CAAc,OAAG,CAAC,CAAC,CAAC,oBAAC,0CAAc,OAAG;QAChE,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,oBAAC,0CAAc,OAAG,CAAC,CAAC,CAAC,oBAAC,0CAAc,OAAG;QAC3D,OAAO,EAAE,oBAAC,sCAAU,OAAG;QACvB,WAAW,EAAE,oBAAC,0CAAc,OAAG;QAC/B,YAAY,EAAE,oBAAC,0CAAc,OAAG;KACjC,CAAC,EAPwG,CAOxG,CAAC;IAEH;;OAEG;IACI,IAAM,gBAAgB,GAAG,UAC9B,KAAyB,EACzB,GAA2B,EAC3B,YAAiC;;QAEjC,IAAM,KAAK,GAAG,gBAAQ,CACpB,KAAK,EACL,GAAG,EACH,UAAU,CACR;YACE,IAAI,EAAE,OAAO;YACb,MAAM,EAAE,WAAW;YACnB,WAAW,EAAE,KAAK;YAClB,IAAI,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE;SACrB,EACD,YAAY,CACC,CACM,CAAC;QAExB,IAAI,QAAC,KAAK,CAAC,IAAI,0CAAE,QAAQ,CAAA,EAAE;YACzB,KAAK,CAAC,IAAK,CAAC,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;SACjE;QAED,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAxBW,QAAA,gBAAgB,oBAwB3B","sourcesContent":["import * as React from 'react';\nimport { makeMergePropsCompat } from '@fluentui/react-utilities';\nimport { useBadge } from '../Badge/index';\nimport {\n SkypeMinusIcon,\n SkypeClockIcon,\n SkypeArrowIcon,\n SkypeCheckIcon,\n CancelIcon,\n} from './DefaultPresenceBadgeIcons';\nimport type { PresenceBadgeProps, PresenceBadgeState, PresenceBadgeStatus } from './PresenceBadge.types';\nimport type { BadgeProps } from '../Badge/index';\n\n/**\n * Consts listing which props are shorthand props.\n */\nexport const presenceBadgeShorthandPropsCompat: (keyof PresenceBadgeProps)[] = ['icon'];\n\n// eslint-disable-next-line deprecation/deprecation\nconst mergeProps = makeMergePropsCompat<PresenceBadgeState>({ deepMerge: presenceBadgeShorthandPropsCompat });\n\nconst iconMap: (outOfOffice: boolean) => Record<PresenceBadgeStatus, JSX.Element | null> = outOfOffice => ({\n busy: null,\n available: outOfOffice ? <SkypeArrowIcon /> : <SkypeCheckIcon />,\n away: outOfOffice ? <SkypeArrowIcon /> : <SkypeClockIcon />,\n offline: <CancelIcon />,\n outOfOffice: <SkypeArrowIcon />,\n doNotDisturb: <SkypeMinusIcon />,\n});\n\n/**\n * Returns the props and state required to render the component\n */\nexport const usePresenceBadge = (\n props: PresenceBadgeProps,\n ref: React.Ref<HTMLElement>,\n defaultProps?: PresenceBadgeProps,\n): PresenceBadgeState => {\n const state = useBadge(\n props,\n ref,\n mergeProps(\n {\n size: 'small',\n status: 'available',\n outOfOffice: false,\n icon: { as: 'span' },\n },\n defaultProps,\n ) as BadgeProps,\n ) as PresenceBadgeState;\n\n if (!state.icon?.children) {\n state.icon!.children = iconMap(state.outOfOffice)[state.status];\n }\n\n return state;\n};\n"]}
|
@@ -1,58 +0,0 @@
|
|
1
|
-
define(["require", "exports", "@fluentui/react-make-styles", "../../Badge"], function (require, exports, react_make_styles_1, Badge_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.usePresenceBadgeStyles = void 0;
|
5
|
-
var useStyles = react_make_styles_1.makeStyles({
|
6
|
-
root: function (theme) { return ({
|
7
|
-
padding: 0,
|
8
|
-
borderWidth: theme.global.strokeWidth.thick,
|
9
|
-
}); },
|
10
|
-
thinBorder: function (theme) { return ({
|
11
|
-
borderWidth: theme.global.strokeWidth.thin,
|
12
|
-
}); },
|
13
|
-
statusBusy: function (theme) { return ({
|
14
|
-
backgroundColor: theme.alias.color.red.background3,
|
15
|
-
borderColor: theme.alias.color.red.background3,
|
16
|
-
}); },
|
17
|
-
statusAway: function (theme) { return ({
|
18
|
-
backgroundColor: theme.alias.color.marigold.background3,
|
19
|
-
borderColor: theme.alias.color.marigold.background3,
|
20
|
-
}); },
|
21
|
-
statusAvailable: function (theme) { return ({
|
22
|
-
backgroundColor: theme.alias.color.lightGreen.foreground3,
|
23
|
-
borderColor: theme.alias.color.lightGreen.foreground3,
|
24
|
-
}); },
|
25
|
-
statusOffline: function (theme) { return ({
|
26
|
-
backgroundColor: theme.alias.color.neutral.neutralBackground1,
|
27
|
-
color: theme.alias.color.neutral.neutralForeground3,
|
28
|
-
borderColor: theme.alias.color.neutral.neutralForeground3,
|
29
|
-
}); },
|
30
|
-
statusOutOfOffice: function (theme) { return ({
|
31
|
-
backgroundColor: theme.alias.color.neutral.neutralBackground1,
|
32
|
-
color: theme.alias.color.berry.foreground3,
|
33
|
-
borderColor: theme.alias.color.berry.foreground3,
|
34
|
-
}); },
|
35
|
-
outOfOffice: function (theme) { return ({
|
36
|
-
backgroundColor: theme.alias.color.neutral.neutralBackground1,
|
37
|
-
}); },
|
38
|
-
outOfOfficeAvailable: function (theme) { return ({
|
39
|
-
color: theme.alias.color.lightGreen.foreground3,
|
40
|
-
}); },
|
41
|
-
outOfOfficeBusy: function (theme) { return ({
|
42
|
-
color: theme.alias.color.red.background3,
|
43
|
-
}); },
|
44
|
-
outOfOfficeAway: function (theme) { return ({
|
45
|
-
color: theme.alias.color.marigold.background3,
|
46
|
-
}); },
|
47
|
-
});
|
48
|
-
/**
|
49
|
-
* Applies style classnames to slots
|
50
|
-
*/
|
51
|
-
var usePresenceBadgeStyles = function (state) {
|
52
|
-
var styles = useStyles();
|
53
|
-
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);
|
54
|
-
return Badge_1.useBadgeStyles(state);
|
55
|
-
};
|
56
|
-
exports.usePresenceBadgeStyles = usePresenceBadgeStyles;
|
57
|
-
});
|
58
|
-
//# sourceMappingURL=usePresenceBadgeStyles.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"usePresenceBadgeStyles.js","sourceRoot":"../src/","sources":["components/PresenceBadge/usePresenceBadgeStyles.ts"],"names":[],"mappings":";;;;IAIA,IAAM,SAAS,GAAG,8BAAU,CAAC;QAC3B,IAAI,EAAE,UAAA,KAAK,IAAI,OAAA,CAAC;YACd,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK;SAC5C,CAAC,EAHa,CAGb;QACF,UAAU,EAAE,UAAA,KAAK,IAAI,OAAA,CAAC;YACpB,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI;SAC3C,CAAC,EAFmB,CAEnB;QACF,UAAU,EAAE,UAAA,KAAK,IAAI,OAAA,CAAC;YACpB,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,WAAW;YAClD,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,WAAW;SAC/C,CAAC,EAHmB,CAGnB;QACF,UAAU,EAAE,UAAA,KAAK,IAAI,OAAA,CAAC;YACpB,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAW;YACvD,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAW;SACpD,CAAC,EAHmB,CAGnB;QACF,eAAe,EAAE,UAAA,KAAK,I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IAlBW,QAAA,sBAAsB,0BAkBjC","sourcesContent":["import { mergeClasses, makeStyles } from '@fluentui/react-make-styles';\nimport { useBadgeStyles } from '../../Badge';\nimport type { PresenceBadgeState } from './PresenceBadge.types';\n\nconst useStyles = makeStyles({\n root: theme => ({\n padding: 0,\n borderWidth: theme.global.strokeWidth.thick,\n }),\n thinBorder: theme => ({\n borderWidth: theme.global.strokeWidth.thin,\n }),\n statusBusy: theme => ({\n backgroundColor: theme.alias.color.red.background3,\n borderColor: theme.alias.color.red.background3,\n }),\n statusAway: theme => ({\n backgroundColor: theme.alias.color.marigold.background3,\n borderColor: theme.alias.color.marigold.background3,\n }),\n statusAvailable: theme => ({\n backgroundColor: theme.alias.color.lightGreen.foreground3,\n borderColor: theme.alias.color.lightGreen.foreground3,\n }),\n statusOffline: theme => ({\n backgroundColor: theme.alias.color.neutral.neutralBackground1,\n color: theme.alias.color.neutral.neutralForeground3,\n borderColor: theme.alias.color.neutral.neutralForeground3,\n }),\n statusOutOfOffice: theme => ({\n backgroundColor: theme.alias.color.neutral.neutralBackground1,\n color: theme.alias.color.berry.foreground3,\n borderColor: theme.alias.color.berry.foreground3,\n }),\n outOfOffice: theme => ({\n backgroundColor: theme.alias.color.neutral.neutralBackground1,\n }),\n outOfOfficeAvailable: theme => ({\n color: theme.alias.color.lightGreen.foreground3,\n }),\n outOfOfficeBusy: theme => ({\n color: theme.alias.color.red.background3,\n }),\n outOfOfficeAway: theme => ({\n color: theme.alias.color.marigold.background3,\n }),\n});\n\n/**\n * Applies style classnames to slots\n */\nexport const usePresenceBadgeStyles = (state: PresenceBadgeState): PresenceBadgeState => {\n const styles = useStyles();\n state.className = mergeClasses(\n styles.root,\n (state.status === 'busy' || state.status === 'doNotDisturb') && styles.statusBusy,\n state.status === 'away' && styles.statusAway,\n state.status === 'available' && styles.statusAvailable,\n state.status === 'offline' && styles.statusOffline,\n state.status === 'outOfOffice' && styles.statusOutOfOffice,\n state.outOfOffice && styles.outOfOffice,\n state.outOfOffice && state.status === 'available' && styles.outOfOfficeAvailable,\n state.outOfOffice && (state.status === 'busy' || state.status === 'doNotDisturb') && styles.outOfOfficeBusy,\n state.outOfOffice && state.status === 'away' && styles.outOfOfficeAway,\n (state.size === 'smallest' || state.size === 'smaller') && styles.thinBorder,\n state.className,\n );\n\n return useBadgeStyles(state) as PresenceBadgeState;\n};\n"]}
|
package/lib-amd/index.d.ts
DELETED
package/lib-amd/index.js
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "./components/Badge/index", "./Badge", "./PresenceBadge", "./components/CounterBadge/index", "./CounterBadge"], function (require, exports, tslib_1, index_1, Badge_1, PresenceBadge_1, index_2, CounterBadge_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
tslib_1.__exportStar(index_1, exports);
|
5
|
-
tslib_1.__exportStar(Badge_1, exports);
|
6
|
-
tslib_1.__exportStar(PresenceBadge_1, exports);
|
7
|
-
tslib_1.__exportStar(index_2, exports);
|
8
|
-
tslib_1.__exportStar(CounterBadge_1, exports);
|
9
|
-
});
|
10
|
-
//# sourceMappingURL=index.js.map
|
package/lib-amd/index.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":";;;IAAA,uCAAyC;IACzC,uCAAwB;IACxB,+CAAgC;IAChC,uCAAgD;IAChD,8CAA+B","sourcesContent":["export * from './components/Badge/index';\nexport * from './Badge';\nexport * from './PresenceBadge';\nexport * from './components/CounterBadge/index';\nexport * from './CounterBadge';\n"]}
|