@okta/odyssey-react-mui 0.14.1 → 0.14.2
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/CHANGELOG.md +13 -0
- package/babel.config.cjs +2 -2
- package/dist/components/Link/Link.d.ts +2 -2
- package/dist/components/Link/Link.d.ts.map +1 -1
- package/dist/components/Link/Link.js +21 -14
- package/dist/components/Link/Link.js.map +1 -1
- package/dist/components/PasswordInput/PasswordInput.d.ts +1 -2
- package/dist/components/PasswordInput/PasswordInput.d.ts.map +1 -1
- package/dist/components/PasswordInput/PasswordInput.js +29 -23
- package/dist/components/PasswordInput/PasswordInput.js.map +1 -1
- package/dist/themes/odyssey/components.d.ts.map +1 -1
- package/dist/themes/odyssey/components.js +308 -120
- package/dist/themes/odyssey/components.js.map +1 -1
- package/dist/themes/odyssey/components.types.d.ts +37 -28
- package/dist/themes/odyssey/components.types.d.ts.map +1 -1
- package/dist/themes/odyssey/components.types.js.map +1 -1
- package/dist/themes/odyssey/palette.d.ts.map +1 -1
- package/dist/themes/odyssey/palette.js +36 -30
- package/dist/themes/odyssey/palette.js.map +1 -1
- package/dist/themes/odyssey/palette.types.d.ts +21 -0
- package/dist/themes/odyssey/palette.types.d.ts.map +1 -0
- package/dist/themes/odyssey/palette.types.js +13 -0
- package/dist/themes/odyssey/palette.types.js.map +1 -0
- package/dist/themes/odyssey/theme.d.ts +1 -0
- package/dist/themes/odyssey/theme.d.ts.map +1 -1
- package/dist/themes/odyssey/theme.js +1 -0
- package/dist/themes/odyssey/theme.js.map +1 -1
- package/dist/themes/odyssey/typography.d.ts.map +1 -1
- package/dist/themes/odyssey/typography.js +9 -15
- package/dist/themes/odyssey/typography.js.map +1 -1
- package/package.json +5 -5
- package/src/components/Link/Link.tsx +1 -1
- package/src/components/PasswordInput/PasswordInput.test.tsx +0 -1
- package/src/components/PasswordInput/PasswordInput.tsx +1 -1
- package/src/themes/odyssey/components.ts +315 -128
- package/src/themes/odyssey/components.types.ts +41 -28
- package/src/themes/odyssey/palette.ts +36 -32
- package/src/themes/odyssey/palette.types.ts +22 -0
- package/src/themes/odyssey/theme.ts +1 -0
- package/src/themes/odyssey/typography.ts +8 -14
- package/tsconfig.json +4 -1
- package/tsconfig.production.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
### [0.14.2](https://github.com/okta/odyssey/compare/v0.14.1...v0.14.2) (2022-06-30)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **odyssey-react-mui:** add Infobox theme for Alert ([d92c896](https://github.com/okta/odyssey/commit/d92c89623451fb947cb0786367aeec9c02966cbc))
|
|
11
|
+
- **odyssey-react-mui:** add theme for Checkbox, Radio, Labels, Hints ([a7ed02a](https://github.com/okta/odyssey/commit/a7ed02a79340c32920da92da4947a068ac44c2fd))
|
|
12
|
+
- **odyssey-react-mui:** utilize color tokens for Palette, add lighter ([639549c](https://github.com/okta/odyssey/commit/639549c92f0b2644d347004f4ec801684cba13bf))
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
- **odyssey-react-mui:** button danger disabled style ([dd2d344](https://github.com/okta/odyssey/commit/dd2d344e724d79fbc9e915390c7406cafee7279a))
|
|
17
|
+
- **odyssey-react-mui:** button prop serialization ([8092a2c](https://github.com/okta/odyssey/commit/8092a2c5c044b98613555805dd9e89581f7174bd))
|
|
18
|
+
|
|
6
19
|
### [0.14.1](https://github.com/okta/odyssey/compare/v0.14.0...v0.14.1) (2022-06-21)
|
|
7
20
|
|
|
8
21
|
### Features
|
package/babel.config.cjs
CHANGED
|
@@ -17,7 +17,7 @@ module.exports = {
|
|
|
17
17
|
{
|
|
18
18
|
odyssey: false,
|
|
19
19
|
react: {
|
|
20
|
-
runtime: "
|
|
20
|
+
runtime: "automatic",
|
|
21
21
|
},
|
|
22
22
|
},
|
|
23
23
|
],
|
|
@@ -76,7 +76,7 @@ module.exports = {
|
|
|
76
76
|
modules: false,
|
|
77
77
|
},
|
|
78
78
|
react: {
|
|
79
|
-
runtime: "
|
|
79
|
+
runtime: "automatic",
|
|
80
80
|
},
|
|
81
81
|
},
|
|
82
82
|
],
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
import
|
|
12
|
+
import { ReactElement } from "react";
|
|
13
13
|
import type { LinkProps as MuiLinkProps } from "@mui/material";
|
|
14
14
|
export interface LinkProps extends MuiLinkProps {
|
|
15
15
|
icon?: ReactElement;
|
|
16
16
|
}
|
|
17
|
-
export declare const Link:
|
|
17
|
+
export declare const Link: import("react").ForwardRefExoticComponent<Pick<LinkProps, "type" | "defaultValue" | "classes" | "children" | "onChange" | "onKeyUp" | "onKeyDown" | "onBlur" | "onFocus" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "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" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "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" | "margin" | "sx" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform" | "key" | "media" | "target" | "href" | "download" | "hrefLang" | "ping" | "rel" | "referrerPolicy" | "align" | "noWrap" | "variant" | "gutterBottom" | "paragraph" | "variantMapping" | "TypographyClasses" | "underline" | "icon"> & import("react").RefAttributes<HTMLAnchorElement | HTMLLinkElement>>;
|
|
18
18
|
//# sourceMappingURL=Link.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../src/components/Link/Link.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../src/components/Link/Link.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAc,YAAY,EAAE,MAAM,OAAO,CAAC;AAGjD,OAAO,KAAK,EAAE,SAAS,IAAI,YAAY,EAAE,MAAM,eAAe,CAAC;AAE/D,MAAM,WAAW,SAAU,SAAQ,YAAY;IAC7C,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AAED,eAAO,MAAM,IAAI,qhMAsBhB,CAAC"}
|
|
@@ -12,25 +12,32 @@ import _SvgIcon from "@mui/material/SvgIcon";
|
|
|
12
12
|
*
|
|
13
13
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
14
14
|
*/
|
|
15
|
-
import
|
|
15
|
+
import { forwardRef } from "react";
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
18
|
export const Link = forwardRef(props => {
|
|
17
19
|
const {
|
|
18
20
|
icon,
|
|
19
21
|
children,
|
|
20
22
|
target
|
|
21
23
|
} = props;
|
|
22
|
-
return
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
return _jsxs(_Link, { ...props,
|
|
25
|
+
children: [_jsx("span", {
|
|
26
|
+
className: "Link-icon",
|
|
27
|
+
children: icon
|
|
28
|
+
}), children, target === "_blank" && _jsx("span", {
|
|
29
|
+
className: "Link-indicator",
|
|
30
|
+
role: "presentation",
|
|
31
|
+
children: _jsx(_SvgIcon, {
|
|
32
|
+
viewBox: "0 0 16 16",
|
|
33
|
+
children: _jsx("path", {
|
|
34
|
+
fillRule: "evenodd",
|
|
35
|
+
clipRule: "evenodd",
|
|
36
|
+
d: "M13.2929 2H7.99998V1H14.5C14.7761 1 15 1.22386 15 1.5V8H14V2.70711L6.35353 10.3536L5.64642 9.64645L13.2929 2ZM1.5 4H1V4.5V14.5V15H1.5H11.5H12V14.5V8H11V14H2V5H8V4H1.5Z",
|
|
37
|
+
fill: "currentColor"
|
|
38
|
+
})
|
|
39
|
+
})
|
|
40
|
+
})]
|
|
41
|
+
});
|
|
35
42
|
});
|
|
36
43
|
//# sourceMappingURL=Link.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Link/Link.tsx"],"names":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Link/Link.tsx"],"names":["forwardRef","Link","props","icon","children","target"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAASA,UAAT,QAAyC,OAAzC;;;AASA,OAAO,MAAMC,IAAI,GAAGD,UAAU,CAC3BE,KAAD,IAAW;AACT,QAAM;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,QAAR;AAAkBC,IAAAA;AAAlB,MAA6BH,KAAnC;AACA,SACE,kBAAaA,KAAb;AAAA,eACE;AAAM,MAAA,SAAS,EAAC,WAAhB;AAAA,gBAA6BC;AAA7B,MADF,EAEGC,QAFH,EAGGC,MAAM,KAAK,QAAX,IACC;AAAM,MAAA,SAAS,EAAC,gBAAhB;AAAiC,MAAA,IAAI,EAAC,cAAtC;AAAA,gBACE;AAAS,QAAA,OAAO,EAAC,WAAjB;AAAA,kBACE;AACE,UAAA,QAAQ,EAAC,SADX;AAEE,UAAA,QAAQ,EAAC,SAFX;AAGE,UAAA,CAAC,EAAC,yKAHJ;AAIE,UAAA,IAAI,EAAC;AAJP;AADF;AADF,MAJJ;AAAA,IADF;AAkBD,CArB2B,CAAvB","sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { forwardRef, ReactElement } from \"react\";\n\nimport { Link as MuiLink, SvgIcon } from \"@mui/material\";\nimport type { LinkProps as MuiLinkProps } from \"@mui/material\";\n\nexport interface LinkProps extends MuiLinkProps {\n icon?: ReactElement;\n}\n\nexport const Link = forwardRef<HTMLLinkElement | HTMLAnchorElement, LinkProps>(\n (props) => {\n const { icon, children, target } = props;\n return (\n <MuiLink {...props}>\n <span className=\"Link-icon\">{icon}</span>\n {children}\n {target === \"_blank\" && (\n <span className=\"Link-indicator\" role=\"presentation\">\n <SvgIcon viewBox=\"0 0 16 16\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M13.2929 2H7.99998V1H14.5C14.7761 1 15 1.22386 15 1.5V8H14V2.70711L6.35353 10.3536L5.64642 9.64645L13.2929 2ZM1.5 4H1V4.5V14.5V15H1.5H11.5H12V14.5V8H11V14H2V5H8V4H1.5Z\"\n fill=\"currentColor\"\n />\n </SvgIcon>\n </span>\n )}\n </MuiLink>\n );\n }\n);\n"],"file":"Link.js"}
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
import React from "react";
|
|
13
12
|
import type { Ref } from "react";
|
|
14
13
|
import type { OutlinedInputProps, TooltipProps } from "@mui/material";
|
|
15
14
|
export interface PasswordInputProps extends Omit<OutlinedInputProps, "type" | "label" | "defaultValue" | "ref"> {
|
|
@@ -18,5 +17,5 @@ export interface PasswordInputProps extends Omit<OutlinedInputProps, "type" | "l
|
|
|
18
17
|
label: string;
|
|
19
18
|
tooltipLabel?: TooltipProps["title"] | ((isHidden: boolean) => TooltipProps["title"]);
|
|
20
19
|
}
|
|
21
|
-
export declare const PasswordInput:
|
|
20
|
+
export declare const PasswordInput: import("react").ForwardRefExoticComponent<Pick<PasswordInputProps, "label" | "defaultValue" | "classes" | "onChange" | "onKeyUp" | "onKeyDown" | "onBlur" | "onFocus" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "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" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "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" | "autoComplete" | "autoFocus" | "components" | "componentsProps" | "disabled" | "disableInjectingGlobalStyles" | "endAdornment" | "error" | "fullWidth" | "inputComponent" | "inputProps" | "inputRef" | "margin" | "multiline" | "name" | "readOnly" | "required" | "renderSuffix" | "rows" | "maxRows" | "minRows" | "size" | "startAdornment" | "sx" | "value" | "notched" | "tooltipLabel"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
22
21
|
//# sourceMappingURL=PasswordInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordInput.d.ts","sourceRoot":"","sources":["../../../src/components/PasswordInput/PasswordInput.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"PasswordInput.d.ts","sourceRoot":"","sources":["../../../src/components/PasswordInput/PasswordInput.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,GAAG,EAA2B,MAAM,OAAO,CAAC;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAiBtE,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,kBAAkB,EAAE,MAAM,GAAG,OAAO,GAAG,cAAc,GAAG,KAAK,CAAC;IAC3E,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EACT,YAAY,CAAC,OAAO,CAAC,GACrB,CAAC,CAAC,QAAQ,EAAE,OAAO,KAAK,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;CACpD;AAED,eAAO,MAAM,aAAa,8+JAqEzB,CAAC"}
|
|
@@ -7,8 +7,6 @@ import _Visibility from "@mui/icons-material/Visibility";
|
|
|
7
7
|
import _VisibilityOff from "@mui/icons-material/VisibilityOff";
|
|
8
8
|
import _InputLabel from "@mui/material/InputLabel";
|
|
9
9
|
|
|
10
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
11
|
-
|
|
12
10
|
/*!
|
|
13
11
|
* Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
14
12
|
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
@@ -20,8 +18,10 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
20
18
|
*
|
|
21
19
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
22
20
|
*/
|
|
23
|
-
import
|
|
21
|
+
import { forwardRef, useState, useMemo } from "react";
|
|
24
22
|
import { useOid } from "../../utils/index.js";
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
25
|
export const PasswordInput = forwardRef((props, ref) => {
|
|
26
26
|
const {
|
|
27
27
|
tooltipLabel,
|
|
@@ -59,25 +59,31 @@ export const PasswordInput = forwardRef((props, ref) => {
|
|
|
59
59
|
return typeof tooltipLabel === "function" ? tooltipLabel(values.showPassword === false) : tooltipLabel;
|
|
60
60
|
}, [values, tooltipLabel]);
|
|
61
61
|
const oid = useOid(id);
|
|
62
|
-
return
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
62
|
+
return _jsxs(_Box, {
|
|
63
|
+
children: [_jsx(_InputLabel, {
|
|
64
|
+
htmlFor: oid,
|
|
65
|
+
children: label
|
|
66
|
+
}), _jsx(_OutlinedInput, { ...rest,
|
|
67
|
+
id: oid,
|
|
68
|
+
inputProps: inputProps,
|
|
69
|
+
inputRef: ref,
|
|
70
|
+
onChange: handlePasswordChange,
|
|
71
|
+
type: values.showPassword ? "text" : "password",
|
|
72
|
+
value: values.password,
|
|
73
|
+
endAdornment: _jsx(_InputAdornment, {
|
|
74
|
+
position: "end",
|
|
75
|
+
children: _jsx(_Tooltip, {
|
|
76
|
+
title: tooltipTitle,
|
|
77
|
+
children: _jsx(_IconButton, {
|
|
78
|
+
"aria-label": "toggle password visibility",
|
|
79
|
+
onClick: handleClickShowPassword,
|
|
80
|
+
onMouseDown: handleMouseDownPassword,
|
|
81
|
+
edge: "end",
|
|
82
|
+
children: values.showPassword ? _jsx(_VisibilityOff, {}) : _jsx(_Visibility, {})
|
|
83
|
+
})
|
|
84
|
+
})
|
|
85
|
+
})
|
|
86
|
+
})]
|
|
87
|
+
});
|
|
82
88
|
});
|
|
83
89
|
//# sourceMappingURL=PasswordInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/PasswordInput/PasswordInput.tsx"],"names":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/PasswordInput/PasswordInput.tsx"],"names":["forwardRef","useState","useMemo","useOid","PasswordInput","props","ref","tooltipLabel","id","label","defaultValue","password","inputProps","rest","values","setValues","showPassword","handlePasswordChange","event","target","value","onChange","handleClickShowPassword","handleMouseDownPassword","preventDefault","tooltipTitle","oid"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAASA,UAAT,EAAqBC,QAArB,EAA+BC,OAA/B,QAA8C,OAA9C;SAYSC,M;;;AAiBT,OAAO,MAAMC,aAAa,GAAGJ,UAAU,CACrC,CAACK,KAAD,EAAQC,GAAR,KAAgB;AACd,QAAM;AACJC,IAAAA,YADI;AAEJC,IAAAA,EAFI;AAGJC,IAAAA,KAHI;AAIJC,IAAAA,YAAY,EAAEC,QAAQ,GAAG,EAJrB;AAKJC,IAAAA,UALI;AAMJ,OAAGC;AANC,MAOFR,KAPJ;AASA,QAAM,CAACS,MAAD,EAASC,SAAT,IAAsBd,QAAQ,CAAQ;AAC1CU,IAAAA,QAD0C;AAE1CK,IAAAA,YAAY,EAAE;AAF4B,GAAR,CAApC;;AAKA,QAAMC,oBAAoB,GAAIC,KAAD,IAA0C;AAAA;;AACrEH,IAAAA,SAAS,CAAC,EAAE,GAAGD,MAAL;AAAaH,MAAAA,QAAQ,EAAEO,KAAK,CAACC,MAAN,CAAaC;AAApC,KAAD,CAAT;AACA,uBAAAf,KAAK,CAACgB,QAAN,yEAAAhB,KAAK,EAAYa,KAAZ,CAAL;AACD,GAHD;;AAKA,QAAMI,uBAAuB,GAAG,MAAM;AACpCP,IAAAA,SAAS,CAAC,EACR,GAAGD,MADK;AAERE,MAAAA,YAAY,EAAE,CAACF,MAAM,CAACE;AAFd,KAAD,CAAT;AAID,GALD;;AAOA,QAAMO,uBAAuB,GAAIL,KAAD,IAA0C;AACxEA,IAAAA,KAAK,CAACM,cAAN;AACD,GAFD;;AAIA,QAAMC,YAAY,GAAGvB,OAAO,CAAC,MAAM;AACjC,WAAO,OAAOK,YAAP,KAAwB,UAAxB,GACHA,YAAY,CAACO,MAAM,CAACE,YAAP,KAAwB,KAAzB,CADT,GAEHT,YAFJ;AAGD,GAJ2B,EAIzB,CAACO,MAAD,EAASP,YAAT,CAJyB,CAA5B;AAMA,QAAMmB,GAAG,GAAGvB,MAAM,CAACK,EAAD,CAAlB;AAEA,SACE;AAAA,eACE;AAAY,MAAA,OAAO,EAAEkB,GAArB;AAAA,gBAA2BjB;AAA3B,MADF,EAEE,0BACMI,IADN;AAEE,MAAA,EAAE,EAAEa,GAFN;AAGE,MAAA,UAAU,EAAEd,UAHd;AAIE,MAAA,QAAQ,EAAEN,GAJZ;AAKE,MAAA,QAAQ,EAAEW,oBALZ;AAME,MAAA,IAAI,EAAEH,MAAM,CAACE,YAAP,GAAsB,MAAtB,GAA+B,UANvC;AAOE,MAAA,KAAK,EAAEF,MAAM,CAACH,QAPhB;AAQE,MAAA,YAAY,EACV;AAAgB,QAAA,QAAQ,EAAC,KAAzB;AAAA,kBACE;AAAS,UAAA,KAAK,EAAEc,YAAhB;AAAA,oBACE;AACE,0BAAW,4BADb;AAEE,YAAA,OAAO,EAAEH,uBAFX;AAGE,YAAA,WAAW,EAAEC,uBAHf;AAIE,YAAA,IAAI,EAAC,KAJP;AAAA,sBAMGT,MAAM,CAACE,YAAP,GAAsB,wBAAtB,GAA0C;AAN7C;AADF;AADF;AATJ,MAFF;AAAA,IADF;AA4BD,CApEoC,CAAhC","sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { forwardRef, useState, useMemo } from \"react\";\nimport type { Ref, ChangeEvent, MouseEvent } from \"react\";\nimport type { OutlinedInputProps, TooltipProps } from \"@mui/material\";\nimport {\n Tooltip,\n IconButton,\n Box,\n InputLabel,\n OutlinedInput,\n InputAdornment,\n} from \"@mui/material\";\nimport { Visibility, VisibilityOff } from \"@mui/icons-material\";\nimport { useOid } from \"../../utils\";\n\ninterface State {\n password: string;\n showPassword: boolean;\n}\n\nexport interface PasswordInputProps\n extends Omit<OutlinedInputProps, \"type\" | \"label\" | \"defaultValue\" | \"ref\"> {\n ref?: Ref<HTMLInputElement>;\n defaultValue?: string;\n label: string;\n tooltipLabel?:\n | TooltipProps[\"title\"]\n | ((isHidden: boolean) => TooltipProps[\"title\"]);\n}\n\nexport const PasswordInput = forwardRef<HTMLInputElement, PasswordInputProps>(\n (props, ref) => {\n const {\n tooltipLabel,\n id,\n label,\n defaultValue: password = \"\",\n inputProps,\n ...rest\n } = props;\n\n const [values, setValues] = useState<State>({\n password,\n showPassword: false,\n });\n\n const handlePasswordChange = (event: ChangeEvent<HTMLInputElement>) => {\n setValues({ ...values, password: event.target.value });\n props.onChange?.(event);\n };\n\n const handleClickShowPassword = () => {\n setValues({\n ...values,\n showPassword: !values.showPassword,\n });\n };\n\n const handleMouseDownPassword = (event: MouseEvent<HTMLButtonElement>) => {\n event.preventDefault();\n };\n\n const tooltipTitle = useMemo(() => {\n return typeof tooltipLabel === \"function\"\n ? tooltipLabel(values.showPassword === false)\n : tooltipLabel;\n }, [values, tooltipLabel]);\n\n const oid = useOid(id);\n\n return (\n <Box>\n <InputLabel htmlFor={oid}>{label}</InputLabel>\n <OutlinedInput\n {...rest}\n id={oid}\n inputProps={inputProps}\n inputRef={ref}\n onChange={handlePasswordChange}\n type={values.showPassword ? \"text\" : \"password\"}\n value={values.password}\n endAdornment={\n <InputAdornment position=\"end\">\n <Tooltip title={tooltipTitle}>\n <IconButton\n aria-label=\"toggle password visibility\"\n onClick={handleClickShowPassword}\n onMouseDown={handleMouseDownPassword}\n edge=\"end\"\n >\n {values.showPassword ? <VisibilityOff /> : <Visibility />}\n </IconButton>\n </Tooltip>\n </InputAdornment>\n }\n />\n </Box>\n );\n }\n);\n"],"file":"PasswordInput.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/themes/odyssey/components.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/themes/odyssey/components.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAGlD,eAAO,MAAM,UAAU,EAAE,YAAY,CAAC,YAAY,CA4ejD,CAAC"}
|