@okta/odyssey-react-mui 0.21.3 → 0.22.0
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 +24 -0
- package/dist/Autocomplete.js +58 -0
- package/dist/Autocomplete.js.map +1 -0
- package/dist/Banner.js +2 -3
- package/dist/Banner.js.map +1 -1
- package/dist/Button.js +46 -0
- package/dist/Button.js.map +1 -0
- package/dist/CheckboxGroup.js +2 -3
- package/dist/CheckboxGroup.js.map +1 -1
- package/dist/CircularProgress.js +12 -0
- package/dist/CircularProgress.js.map +1 -0
- package/dist/Field.js +59 -0
- package/dist/Field.js.map +1 -0
- package/dist/FieldError.js +34 -0
- package/dist/FieldError.js.map +1 -0
- package/dist/FieldHint.js +29 -0
- package/dist/FieldHint.js.map +1 -0
- package/dist/FieldLabel.js +32 -0
- package/dist/FieldLabel.js.map +1 -0
- package/dist/Infobox.js +2 -3
- package/dist/Infobox.js.map +1 -1
- package/dist/MenuButton.js +2 -2
- package/dist/MenuButton.js.map +1 -1
- package/dist/MenuItem.js +0 -1
- package/dist/MenuItem.js.map +1 -1
- package/dist/PasswordField.js +68 -0
- package/dist/PasswordField.js.map +1 -0
- package/dist/RadioGroup.js +2 -3
- package/dist/RadioGroup.js.map +1 -1
- package/dist/ScreenReaderText.js +30 -0
- package/dist/ScreenReaderText.js.map +1 -0
- package/dist/SearchField.js +54 -0
- package/dist/SearchField.js.map +1 -0
- package/dist/Tag.js +28 -0
- package/dist/Tag.js.map +1 -0
- package/dist/TagList.js +26 -0
- package/dist/TagList.js.map +1 -0
- package/dist/TagListContext.js +16 -0
- package/dist/TagListContext.js.map +1 -0
- package/dist/TextField.js +26 -62
- package/dist/TextField.js.map +1 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/dist/src/Autocomplete.d.ts +27 -0
- package/dist/src/Autocomplete.d.ts.map +1 -0
- package/dist/src/Button.d.ts +31 -0
- package/dist/src/Button.d.ts.map +1 -0
- package/dist/src/CircularProgress.d.ts +16 -0
- package/dist/src/CircularProgress.d.ts.map +1 -0
- package/dist/src/Field.d.ts +54 -0
- package/dist/src/Field.d.ts.map +1 -0
- package/dist/src/FieldError.d.ts +19 -0
- package/dist/src/FieldError.d.ts.map +1 -0
- package/dist/src/FieldHint.d.ts +19 -0
- package/dist/src/FieldHint.d.ts.map +1 -0
- package/dist/src/FieldLabel.d.ts +23 -0
- package/dist/src/FieldLabel.d.ts.map +1 -0
- package/dist/src/Icon.d.ts +1 -1
- package/dist/src/Link.d.ts +1 -1
- package/dist/src/MenuButton.d.ts.map +1 -1
- package/dist/src/MenuItem.d.ts +1 -1
- package/dist/src/MenuItem.d.ts.map +1 -1
- package/dist/src/PasswordField.d.ts +75 -0
- package/dist/src/PasswordField.d.ts.map +1 -0
- package/dist/src/RadioGroup.d.ts.map +1 -1
- package/dist/src/ScreenReaderText.d.ts +21 -0
- package/dist/src/ScreenReaderText.d.ts.map +1 -0
- package/dist/src/SearchField.d.ts +59 -0
- package/dist/src/SearchField.d.ts.map +1 -0
- package/dist/src/Tag.d.ts +22 -0
- package/dist/src/Tag.d.ts.map +1 -0
- package/dist/src/TagList.d.ts +19 -0
- package/dist/src/TagList.d.ts.map +1 -0
- package/dist/src/TagListContext.d.ts +18 -0
- package/dist/src/TagListContext.d.ts.map +1 -0
- package/dist/src/TextField.d.ts +3 -8
- package/dist/src/TextField.d.ts.map +1 -1
- package/dist/src/iconDictionary/Add.d.ts +1 -1
- package/dist/src/iconDictionary/AddCircle.d.ts +1 -1
- package/dist/src/iconDictionary/AlertCircle.d.ts +1 -1
- package/dist/src/iconDictionary/AlertCircleFilled.d.ts +1 -1
- package/dist/src/iconDictionary/AlertTriangleFilled.d.ts +1 -1
- package/dist/src/iconDictionary/Anchor.d.ts +1 -1
- package/dist/src/iconDictionary/ArrowDown.d.ts +1 -1
- package/dist/src/iconDictionary/ArrowLeft.d.ts +1 -1
- package/dist/src/iconDictionary/ArrowRight.d.ts +1 -1
- package/dist/src/iconDictionary/ArrowUp.d.ts +1 -1
- package/dist/src/iconDictionary/ArrowUpDown.d.ts +1 -1
- package/dist/src/iconDictionary/Calendar.d.ts +1 -1
- package/dist/src/iconDictionary/Check.d.ts +1 -1
- package/dist/src/iconDictionary/CheckCircleFilled.d.ts +1 -1
- package/dist/src/iconDictionary/ChevronDown.d.ts +1 -1
- package/dist/src/iconDictionary/ChevronUp.d.ts +1 -1
- package/dist/src/iconDictionary/Close.d.ts +1 -1
- package/dist/src/iconDictionary/CloseCircleFilled.d.ts +1 -1
- package/dist/src/iconDictionary/Copy.d.ts +1 -1
- package/dist/src/iconDictionary/Delete.d.ts +1 -1
- package/dist/src/iconDictionary/Download.d.ts +1 -1
- package/dist/src/iconDictionary/DragHandle.d.ts +1 -1
- package/dist/src/iconDictionary/Edit.d.ts +1 -1
- package/dist/src/iconDictionary/ExternalLink.d.ts +1 -1
- package/dist/src/iconDictionary/Eye.d.ts +1 -1
- package/dist/src/iconDictionary/EyeOff.d.ts +1 -1
- package/dist/src/iconDictionary/Filter.d.ts +1 -1
- package/dist/src/iconDictionary/Globe.d.ts +1 -1
- package/dist/src/iconDictionary/Home.d.ts +1 -1
- package/dist/src/iconDictionary/InformationCircle.d.ts +1 -1
- package/dist/src/iconDictionary/InformationCircleFilled.d.ts +1 -1
- package/dist/src/iconDictionary/Notification.d.ts +1 -1
- package/dist/src/iconDictionary/OverflowVertical.d.ts +1 -1
- package/dist/src/iconDictionary/QuestionCircle.d.ts +1 -1
- package/dist/src/iconDictionary/QuestionCircleFilled.d.ts +1 -1
- package/dist/src/iconDictionary/Search.d.ts +1 -1
- package/dist/src/iconDictionary/Settings.d.ts +1 -1
- package/dist/src/iconDictionary/Subtract.d.ts +1 -1
- package/dist/src/iconDictionary/User.d.ts +1 -1
- package/dist/src/iconDictionary/UserGroup.d.ts +1 -1
- package/dist/src/iconDictionary/index.d.ts +40 -40
- package/dist/src/index.d.ts +13 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/theme/components.d.ts.map +1 -1
- package/dist/src/theme/components.types.d.ts +0 -8
- package/dist/src/theme/components.types.d.ts.map +1 -1
- package/dist/theme/components.js +217 -124
- package/dist/theme/components.js.map +1 -1
- package/dist/theme/components.types.js.map +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/Autocomplete.tsx +132 -0
- package/src/Banner.tsx +2 -2
- package/src/Button.tsx +75 -0
- package/src/CheckboxGroup.tsx +2 -2
- package/src/CircularProgress.tsx +24 -0
- package/src/Field.tsx +112 -0
- package/src/FieldError.tsx +34 -0
- package/src/FieldHint.tsx +28 -0
- package/src/FieldLabel.tsx +57 -0
- package/src/Infobox.tsx +2 -2
- package/src/MenuButton.tsx +2 -3
- package/src/MenuItem.tsx +0 -1
- package/src/OdysseyCacheProvider.test.tsx +1 -1
- package/src/PasswordField.tsx +174 -0
- package/src/RadioGroup.tsx +2 -2
- package/src/ScreenReaderText.tsx +36 -0
- package/src/SearchField.tsx +136 -0
- package/src/Tag.tsx +41 -0
- package/src/TagList.tsx +43 -0
- package/src/TagListContext.tsx +23 -0
- package/src/TextField.tsx +43 -101
- package/src/index.ts +11 -5
- package/src/theme/components.tsx +87 -18
- package/src/theme/components.types.ts +0 -8
- package/dist/PasswordInput.js +0 -87
- package/dist/PasswordInput.js.map +0 -1
- package/dist/src/PasswordInput.d.ts +0 -21
- package/dist/src/PasswordInput.d.ts.map +0 -1
- package/src/PasswordInput.test.tsx +0 -51
- package/src/PasswordInput.tsx +0 -111
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PasswordField.js","names":["forwardRef","memo","useCallback","useState","EyeIcon","EyeOffIcon","IconButton","Field","PasswordField","ref","autoCompleteType","autoFocus","errorMessage","hint","id","idOverride","isDisabled","isReadOnly","label","onChange","onFocus","onBlur","placeholder","value","inputType","setInputType","togglePasswordVisibility","renderFieldComponent","ariaDescribedBy","MemoizedPasswordField"],"sources":["../src/PasswordField.tsx"],"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 { InputAdornment, InputBase } from \"@mui/material\";\nimport {\n ChangeEventHandler,\n FocusEventHandler,\n forwardRef,\n memo,\n useCallback,\n useState,\n} from \"react\";\n\nimport { EyeIcon, EyeOffIcon, IconButton } from \"./\";\nimport { Field } from \"./Field\";\n\nexport type PasswordFieldProps = {\n /**\n * If `true`, the component will receive focus automatically.\n */\n autoFocus?: boolean;\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoCompleteType?: \"current-password\" | \"new-password\";\n /**\n * If `error` is not undefined, the `input` will indicate an error.\n */\n errorMessage?: string;\n /**\n * The helper text content.\n */\n hint?: string;\n /**\n * The id of the `input` element.\n */\n id?: string;\n /**\n * If `true`, the component is disabled.\n */\n isDisabled?: boolean;\n /**\n * It prevents the user from changing the value of the field\n */\n isReadOnly?: boolean;\n /**\n * If `true`, the `input` element is required.\n */\n isRequired?: boolean;\n /**\n * The label for the `input` element.\n */\n label: string;\n /**\n * Callback fired when the `input` element loses focus.\n */\n onBlur?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n /**\n * Callback fired when the value is changed.\n */\n onChange?: ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement>;\n /**\n * Callback fired when the `input` element get focus.\n */\n onFocus?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder?: string;\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value?: string;\n};\n\nconst PasswordField = forwardRef<HTMLInputElement, PasswordFieldProps>(\n (\n {\n autoCompleteType,\n autoFocus,\n errorMessage,\n hint,\n id: idOverride,\n isDisabled = false,\n isReadOnly,\n label,\n onChange,\n onFocus,\n onBlur,\n placeholder,\n value,\n },\n ref\n ) => {\n const [inputType, setInputType] = useState(\"password\");\n\n const togglePasswordVisibility = useCallback(() => {\n setInputType((inputType) =>\n inputType === \"password\" ? \"text\" : \"password\"\n );\n }, []);\n\n const renderFieldComponent = useCallback(\n ({ ariaDescribedBy, id }) => (\n <InputBase\n aria-describedby={ariaDescribedBy}\n autoComplete={autoCompleteType}\n /* eslint-disable-next-line jsx-a11y/no-autofocus */\n autoFocus={autoFocus}\n endAdornment={\n <InputAdornment position=\"end\">\n <IconButton\n aria-label=\"toggle password visibility\"\n edge=\"end\"\n onClick={togglePasswordVisibility}\n >\n {inputType === \"password\" ? <EyeIcon /> : <EyeOffIcon />}\n </IconButton>\n </InputAdornment>\n }\n id={id}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={onBlur}\n placeholder={placeholder}\n readOnly={isReadOnly}\n ref={ref}\n type={inputType}\n value={value}\n />\n ),\n [\n autoCompleteType,\n autoFocus,\n togglePasswordVisibility,\n inputType,\n onChange,\n onFocus,\n onBlur,\n placeholder,\n isReadOnly,\n ref,\n value,\n ]\n );\n\n return (\n <Field\n errorMessage={errorMessage}\n hasVisibleLabel\n hint={hint}\n id={idOverride}\n isDisabled={isDisabled}\n label={label}\n renderFieldComponent={renderFieldComponent}\n />\n );\n }\n);\n\nconst MemoizedPasswordField = memo(PasswordField);\n\nexport { MemoizedPasswordField as PasswordField };\n"],"mappings":";;AAaA,SAGEA,UAHF,EAIEC,IAJF,EAKEC,WALF,EAMEC,QANF,QAOO,OAPP;SASSC,O,EAASC,U,EAAYC,U;SACrBC,K;;AA+DT,MAAMC,aAAa,GAAGR,UAAU,CAC9B,OAgBES,GAhBF,KAiBK;EAAA,IAhBH;IACEC,gBADF;IAEEC,SAFF;IAGEC,YAHF;IAIEC,IAJF;IAKEC,EAAE,EAAEC,UALN;IAMEC,UAAU,GAAG,KANf;IAOEC,UAPF;IAQEC,KARF;IASEC,QATF;IAUEC,OAVF;IAWEC,MAXF;IAYEC,WAZF;IAaEC;EAbF,CAgBG;EACH,MAAM,CAACC,SAAD,EAAYC,YAAZ,IAA4BtB,QAAQ,CAAC,UAAD,CAA1C;EAEA,MAAMuB,wBAAwB,GAAGxB,WAAW,CAAC,MAAM;IACjDuB,YAAY,CAAED,SAAD,IACXA,SAAS,KAAK,UAAd,GAA2B,MAA3B,GAAoC,UAD1B,CAAZ;EAGD,CAJ2C,EAIzC,EAJyC,CAA5C;EAMA,MAAMG,oBAAoB,GAAGzB,WAAW,CACtC;IAAA,IAAC;MAAE0B,eAAF;MAAmBd;IAAnB,CAAD;IAAA,OACE;MACE,oBAAkBc,eADpB;MAEE,YAAY,EAAElB,gBAFhB;MAIE,SAAS,EAAEC,SAJb;MAKE,YAAY,EACV;QAAgB,QAAQ,EAAC,KAAzB;QAAA,UACE,KAAC,UAAD;UACE,cAAW,4BADb;UAEE,IAAI,EAAC,KAFP;UAGE,OAAO,EAAEe,wBAHX;UAAA,UAKGF,SAAS,KAAK,UAAd,GAA2B,KAAC,OAAD,KAA3B,GAAyC,KAAC,UAAD;QAL5C;MADF,EANJ;MAgBE,EAAE,EAAEV,EAhBN;MAiBE,QAAQ,EAAEK,QAjBZ;MAkBE,OAAO,EAAEC,OAlBX;MAmBE,MAAM,EAAEC,MAnBV;MAoBE,WAAW,EAAEC,WApBf;MAqBE,QAAQ,EAAEL,UArBZ;MAsBE,GAAG,EAAER,GAtBP;MAuBE,IAAI,EAAEe,SAvBR;MAwBE,KAAK,EAAED;IAxBT,EADF;EAAA,CADsC,EA6BtC,CACEb,gBADF,EAEEC,SAFF,EAGEe,wBAHF,EAIEF,SAJF,EAKEL,QALF,EAMEC,OANF,EAOEC,MAPF,EAQEC,WARF,EASEL,UATF,EAUER,GAVF,EAWEc,KAXF,CA7BsC,CAAxC;EA4CA,OACE,KAAC,KAAD;IACE,YAAY,EAAEX,YADhB;IAEE,eAAe,MAFjB;IAGE,IAAI,EAAEC,IAHR;IAIE,EAAE,EAAEE,UAJN;IAKE,UAAU,EAAEC,UALd;IAME,KAAK,EAAEE,KANT;IAOE,oBAAoB,EAAES;EAPxB,EADF;AAWD,CAlF6B,CAAhC;AAqFA,MAAME,qBAAqB,GAAG5B,IAAI,CAACO,aAAD,CAAlC;AAEA,SAASqB,qBAAqB,IAAIrB,aAAlC"}
|
package/dist/RadioGroup.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _RadioGroup from "@mui/material/RadioGroup";
|
|
2
2
|
import { memo, useMemo } from "react";
|
|
3
|
-
import { FormControl, FormLabel, FormHelperText,
|
|
3
|
+
import { FormControl, FormLabel, FormHelperText, ScreenReaderText, useUniqueId } from "./index.js";
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
6
|
|
|
@@ -36,8 +36,7 @@ const RadioGroup = _ref => {
|
|
|
36
36
|
}), errorMessage && _jsxs(FormHelperText, {
|
|
37
37
|
id: `${uniqueName}-error`,
|
|
38
38
|
error: true,
|
|
39
|
-
children: [_jsx(
|
|
40
|
-
style: visuallyHidden,
|
|
39
|
+
children: [_jsx(ScreenReaderText, {
|
|
41
40
|
children: "Error:"
|
|
42
41
|
}), " ", errorMessage]
|
|
43
42
|
})]
|
package/dist/RadioGroup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.js","names":["memo","useMemo","FormControl","FormLabel","FormHelperText","
|
|
1
|
+
{"version":3,"file":"RadioGroup.js","names":["memo","useMemo","FormControl","FormLabel","FormHelperText","ScreenReaderText","useUniqueId","RadioGroup","children","defaultValue","errorMessage","hint","isDisabled","label","name","onChange","ariaDescribedBy","filter","Boolean","join","undefined","uniqueName","MemoizedRadioGroup"],"sources":["../src/RadioGroup.tsx"],"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 { RadioGroup as MuiRadioGroup } from \"@mui/material\";\nimport { ChangeEventHandler, memo, ReactElement, useMemo } from \"react\";\n\nimport {\n FormControl,\n FormLabel,\n FormHelperText,\n Radio,\n ScreenReaderText,\n useUniqueId,\n RadioProps,\n} from \".\";\n\nexport interface RadioGroupProps {\n /**\n * The <Radio> components within the group. Must include two or more.\n */\n children: Array<ReactElement<typeof Radio>>;\n /**\n * The text value of the radio that should be selected by default\n */\n defaultValue?: string;\n /**\n * The error text for an invalid group\n */\n errorMessage?: string;\n /**\n * Optional hint text\n */\n hint?: string;\n /**\n * Disables the whole radio group\n */\n isDisabled?: boolean;\n /**\n * The text label for the radio group\n */\n label: string;\n /**\n * The name of the radio group, which only needs to be changed if there are multiple radio groups on the same screen\n */\n name?: string;\n /**\n * Listen for changes in the browser that change `value`.\n */\n onChange?: ChangeEventHandler<EventTarget>;\n /**\n * The `value` on the selected radio button.\n */\n value?: RadioProps[\"value\"];\n}\n\nconst RadioGroup = ({\n children,\n defaultValue,\n errorMessage,\n hint,\n isDisabled,\n label,\n name,\n onChange,\n}: RadioGroupProps) => {\n const ariaDescribedBy = useMemo(\n () =>\n errorMessage || hint\n ? [hint && `${name}-hint`, errorMessage && `${name}-error`]\n .filter(Boolean)\n .join(\" \")\n : undefined,\n [errorMessage, hint, name]\n );\n\n const uniqueName = useUniqueId(name);\n\n return (\n <FormControl\n component=\"fieldset\"\n disabled={isDisabled}\n error={Boolean(errorMessage)}\n >\n <FormLabel component=\"legend\">{label}</FormLabel>\n {hint && (\n <FormHelperText id={`${uniqueName}-hint`}>{hint}</FormHelperText>\n )}\n <MuiRadioGroup\n aria-describedby={ariaDescribedBy}\n defaultValue={defaultValue}\n name={uniqueName}\n onChange={onChange}\n >\n {children}\n </MuiRadioGroup>\n {errorMessage && (\n <FormHelperText id={`${uniqueName}-error`} error>\n <ScreenReaderText>Error:</ScreenReaderText> {errorMessage}\n </FormHelperText>\n )}\n </FormControl>\n );\n};\n\nconst MemoizedRadioGroup = memo(RadioGroup);\n\nexport { MemoizedRadioGroup as RadioGroup };\n"],"mappings":";AAaA,SAA6BA,IAA7B,EAAiDC,OAAjD,QAAgE,OAAhE;SAGEC,W,EACAC,S,EACAC,c,EAEAC,gB,EACAC,W;;;;AA2CF,MAAMC,UAAU,GAAG,QASI;EAAA,IATH;IAClBC,QADkB;IAElBC,YAFkB;IAGlBC,YAHkB;IAIlBC,IAJkB;IAKlBC,UALkB;IAMlBC,KANkB;IAOlBC,IAPkB;IAQlBC;EARkB,CASG;EACrB,MAAMC,eAAe,GAAGf,OAAO,CAC7B,MACES,YAAY,IAAIC,IAAhB,GACI,CAACA,IAAI,IAAK,GAAEG,IAAK,OAAjB,EAAyBJ,YAAY,IAAK,GAAEI,IAAK,QAAjD,EACGG,MADH,CACUC,OADV,EAEGC,IAFH,CAEQ,GAFR,CADJ,GAIIC,SANuB,EAO7B,CAACV,YAAD,EAAeC,IAAf,EAAqBG,IAArB,CAP6B,CAA/B;EAUA,MAAMO,UAAU,GAAGf,WAAW,CAACQ,IAAD,CAA9B;EAEA,OACE,MAAC,WAAD;IACE,SAAS,EAAC,UADZ;IAEE,QAAQ,EAAEF,UAFZ;IAGE,KAAK,EAAEM,OAAO,CAACR,YAAD,CAHhB;IAAA,WAKE,KAAC,SAAD;MAAW,SAAS,EAAC,QAArB;MAAA,UAA+BG;IAA/B,EALF,EAMGF,IAAI,IACH,KAAC,cAAD;MAAgB,EAAE,EAAG,GAAEU,UAAW,OAAlC;MAAA,UAA2CV;IAA3C,EAPJ,EASE;MACE,oBAAkBK,eADpB;MAEE,YAAY,EAAEP,YAFhB;MAGE,IAAI,EAAEY,UAHR;MAIE,QAAQ,EAAEN,QAJZ;MAAA,UAMGP;IANH,EATF,EAiBGE,YAAY,IACX,MAAC,cAAD;MAAgB,EAAE,EAAG,GAAEW,UAAW,QAAlC;MAA2C,KAAK,MAAhD;MAAA,WACE,KAAC,gBAAD;QAAA;MAAA,EADF,OAC+CX,YAD/C;IAAA,EAlBJ;EAAA,EADF;AAyBD,CA/CD;;AAiDA,MAAMY,kBAAkB,GAAGtB,IAAI,CAACO,UAAD,CAA/B;AAEA,SAASe,kBAAkB,IAAIf,UAA/B"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
+
*
|
|
5
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
+
*
|
|
10
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
import { memo } from "react";
|
|
13
|
+
import { Box, visuallyHidden } from "./index.js";
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
const style = { ...visuallyHidden
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const ScreenReaderText = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
children
|
|
21
|
+
} = _ref;
|
|
22
|
+
return _jsx(Box, {
|
|
23
|
+
sx: style,
|
|
24
|
+
children: children
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const MemoizedScreenReaderText = memo(ScreenReaderText);
|
|
29
|
+
export { MemoizedScreenReaderText as ScreenReaderText };
|
|
30
|
+
//# sourceMappingURL=ScreenReaderText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScreenReaderText.js","names":["memo","Box","visuallyHidden","style","ScreenReaderText","children","MemoizedScreenReaderText"],"sources":["../src/ScreenReaderText.tsx"],"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 { memo, ReactNode } from \"react\";\nimport { Box, visuallyHidden } from \"./\";\n\nexport type ScreenReaderTextProps = {\n /**\n * The visually-hidden text.\n */\n children: ReactNode;\n};\n\n/**\n * MUI sx expects you pass in a CSS object, not an object with CSS.\n * They seem identical, but only if you create a new object like this will MUI be happy with the type of visuallyHidden.\n * It's otherwise a regular object with CSS properties.\n */\nconst style = { ...visuallyHidden };\n\nconst ScreenReaderText = ({ children }: ScreenReaderTextProps) => (\n <Box sx={style}>{children}</Box>\n);\n\nconst MemoizedScreenReaderText = memo(ScreenReaderText);\n\nexport { MemoizedScreenReaderText as ScreenReaderText };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAASA,IAAT,QAAgC,OAAhC;SACSC,G,EAAKC,c;;AAcd,MAAMC,KAAK,GAAG,EAAE,GAAGD;AAAL,CAAd;;AAEA,MAAME,gBAAgB,GAAG;EAAA,IAAC;IAAEC;EAAF,CAAD;EAAA,OACvB,KAAC,GAAD;IAAK,EAAE,EAAEF,KAAT;IAAA,UAAiBE;EAAjB,EADuB;AAAA,CAAzB;;AAIA,MAAMC,wBAAwB,GAAGN,IAAI,CAACI,gBAAD,CAArC;AAEA,SAASE,wBAAwB,IAAIF,gBAArC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import _InputBase from "@mui/material/InputBase";
|
|
2
|
+
import _InputAdornment from "@mui/material/InputAdornment";
|
|
3
|
+
import { forwardRef, memo, useCallback } from "react";
|
|
4
|
+
import { SearchIcon } from "./index.js";
|
|
5
|
+
import { Field } from "./Field.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
const SearchField = forwardRef((_ref, ref) => {
|
|
8
|
+
let {
|
|
9
|
+
autoCompleteType,
|
|
10
|
+
autoFocus,
|
|
11
|
+
id: idOverride,
|
|
12
|
+
isDisabled = false,
|
|
13
|
+
label,
|
|
14
|
+
onChange,
|
|
15
|
+
onFocus,
|
|
16
|
+
onBlur,
|
|
17
|
+
placeholder,
|
|
18
|
+
value
|
|
19
|
+
} = _ref;
|
|
20
|
+
const renderFieldComponent = useCallback(_ref2 => {
|
|
21
|
+
let {
|
|
22
|
+
ariaDescribedBy,
|
|
23
|
+
id
|
|
24
|
+
} = _ref2;
|
|
25
|
+
return _jsx(_InputBase, {
|
|
26
|
+
"aria-describedby": ariaDescribedBy,
|
|
27
|
+
autoComplete: autoCompleteType,
|
|
28
|
+
autoFocus: autoFocus,
|
|
29
|
+
id: id,
|
|
30
|
+
onChange: onChange,
|
|
31
|
+
onFocus: onFocus,
|
|
32
|
+
onBlur: onBlur,
|
|
33
|
+
placeholder: placeholder,
|
|
34
|
+
ref: ref,
|
|
35
|
+
startAdornment: _jsx(_InputAdornment, {
|
|
36
|
+
position: "start",
|
|
37
|
+
children: _jsx(SearchIcon, {})
|
|
38
|
+
}),
|
|
39
|
+
type: "search",
|
|
40
|
+
value: value
|
|
41
|
+
});
|
|
42
|
+
}, [autoCompleteType, autoFocus, onChange, onFocus, onBlur, placeholder, ref, value]);
|
|
43
|
+
return _jsx(Field, {
|
|
44
|
+
hasVisibleLabel: false,
|
|
45
|
+
id: idOverride,
|
|
46
|
+
isDisabled: isDisabled,
|
|
47
|
+
isRequired: false,
|
|
48
|
+
label: label,
|
|
49
|
+
renderFieldComponent: renderFieldComponent
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
const MemoizedSearchField = memo(SearchField);
|
|
53
|
+
export { MemoizedSearchField as SearchField };
|
|
54
|
+
//# sourceMappingURL=SearchField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchField.js","names":["forwardRef","memo","useCallback","SearchIcon","Field","SearchField","ref","autoCompleteType","autoFocus","id","idOverride","isDisabled","label","onChange","onFocus","onBlur","placeholder","value","renderFieldComponent","ariaDescribedBy","MemoizedSearchField"],"sources":["../src/SearchField.tsx"],"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 { InputAdornment, InputBase } from \"@mui/material\";\nimport {\n ChangeEventHandler,\n FocusEventHandler,\n forwardRef,\n InputHTMLAttributes,\n memo,\n useCallback,\n} from \"react\";\n\nimport { SearchIcon } from \"./\";\nimport { Field } from \"./Field\";\n\nexport type SearchFieldProps = {\n /**\n * If `true`, the component will receive focus automatically.\n */\n autoFocus?: boolean;\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoCompleteType?: InputHTMLAttributes<HTMLInputElement>[\"autoComplete\"];\n /**\n * The id of the `input` element.\n */\n id?: string;\n /**\n * If `true`, the component is disabled.\n */\n isDisabled?: boolean;\n /**\n * This label won't show up visually, but it's required for accessibility.\n */\n label: string;\n /**\n * Callback fired when the `input` element loses focus.\n */\n onBlur?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n /**\n * Callback fired when the value is changed.\n */\n onChange?: ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement>;\n /**\n * Callback fired when the `input` element get focus.\n */\n onFocus?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder?: string;\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value?: string;\n};\n\nconst SearchField = forwardRef<HTMLInputElement, SearchFieldProps>(\n (\n {\n autoCompleteType,\n autoFocus,\n id: idOverride,\n isDisabled = false,\n label,\n onChange,\n onFocus,\n onBlur,\n placeholder,\n value,\n },\n ref\n ) => {\n const renderFieldComponent = useCallback(\n ({ ariaDescribedBy, id }) => (\n <InputBase\n aria-describedby={ariaDescribedBy}\n autoComplete={autoCompleteType}\n /* eslint-disable-next-line jsx-a11y/no-autofocus */\n autoFocus={autoFocus}\n id={id}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={onBlur}\n placeholder={placeholder}\n ref={ref}\n startAdornment={\n <InputAdornment position=\"start\">\n <SearchIcon />\n </InputAdornment>\n }\n type=\"search\"\n value={value}\n />\n ),\n [\n autoCompleteType,\n autoFocus,\n onChange,\n onFocus,\n onBlur,\n placeholder,\n ref,\n value,\n ]\n );\n\n return (\n <Field\n hasVisibleLabel={false}\n id={idOverride}\n isDisabled={isDisabled}\n isRequired={false}\n label={label}\n renderFieldComponent={renderFieldComponent}\n />\n );\n }\n);\n\nconst MemoizedSearchField = memo(SearchField);\n\nexport { MemoizedSearchField as SearchField };\n"],"mappings":";;AAaA,SAGEA,UAHF,EAKEC,IALF,EAMEC,WANF,QAOO,OAPP;SASSC,U;SACAC,K;;AA+CT,MAAMC,WAAW,GAAGL,UAAU,CAC5B,OAaEM,GAbF,KAcK;EAAA,IAbH;IACEC,gBADF;IAEEC,SAFF;IAGEC,EAAE,EAAEC,UAHN;IAIEC,UAAU,GAAG,KAJf;IAKEC,KALF;IAMEC,QANF;IAOEC,OAPF;IAQEC,MARF;IASEC,WATF;IAUEC;EAVF,CAaG;EACH,MAAMC,oBAAoB,GAAGhB,WAAW,CACtC;IAAA,IAAC;MAAEiB,eAAF;MAAmBV;IAAnB,CAAD;IAAA,OACE;MACE,oBAAkBU,eADpB;MAEE,YAAY,EAAEZ,gBAFhB;MAIE,SAAS,EAAEC,SAJb;MAKE,EAAE,EAAEC,EALN;MAME,QAAQ,EAAEI,QANZ;MAOE,OAAO,EAAEC,OAPX;MAQE,MAAM,EAAEC,MARV;MASE,WAAW,EAAEC,WATf;MAUE,GAAG,EAAEV,GAVP;MAWE,cAAc,EACZ;QAAgB,QAAQ,EAAC,OAAzB;QAAA,UACE,KAAC,UAAD;MADF,EAZJ;MAgBE,IAAI,EAAC,QAhBP;MAiBE,KAAK,EAAEW;IAjBT,EADF;EAAA,CADsC,EAsBtC,CACEV,gBADF,EAEEC,SAFF,EAGEK,QAHF,EAIEC,OAJF,EAKEC,MALF,EAMEC,WANF,EAOEV,GAPF,EAQEW,KARF,CAtBsC,CAAxC;EAkCA,OACE,KAAC,KAAD;IACE,eAAe,EAAE,KADnB;IAEE,EAAE,EAAEP,UAFN;IAGE,UAAU,EAAEC,UAHd;IAIE,UAAU,EAAE,KAJd;IAKE,KAAK,EAAEC,KALT;IAME,oBAAoB,EAAEM;EANxB,EADF;AAUD,CA5D2B,CAA9B;AA+DA,MAAME,mBAAmB,GAAGnB,IAAI,CAACI,WAAD,CAAhC;AAEA,SAASe,mBAAmB,IAAIf,WAAhC"}
|
package/dist/Tag.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import _Chip from "@mui/material/Chip";
|
|
2
|
+
import { memo, useContext } from "react";
|
|
3
|
+
import { TagListContext } from "./TagListContext.js";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
const Tag = _ref => {
|
|
7
|
+
let {
|
|
8
|
+
isDisabled,
|
|
9
|
+
label,
|
|
10
|
+
onClick,
|
|
11
|
+
onRemove
|
|
12
|
+
} = _ref;
|
|
13
|
+
const {
|
|
14
|
+
chipElementType
|
|
15
|
+
} = useContext(TagListContext);
|
|
16
|
+
return _jsx(_Chip, {
|
|
17
|
+
label: label,
|
|
18
|
+
clickable: onClick ? true : false,
|
|
19
|
+
component: chipElementType,
|
|
20
|
+
disabled: isDisabled,
|
|
21
|
+
onClick: onClick,
|
|
22
|
+
onDelete: onRemove
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const MemoizedTag = memo(Tag);
|
|
27
|
+
export { MemoizedTag as Tag };
|
|
28
|
+
//# sourceMappingURL=Tag.js.map
|
package/dist/Tag.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.js","names":["memo","useContext","TagListContext","Tag","isDisabled","label","onClick","onRemove","chipElementType","MemoizedTag"],"sources":["../src/Tag.tsx"],"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 { Chip, ChipProps } from \"@mui/material\";\nimport { memo, useContext } from \"react\";\nimport { TagListContext } from \"./TagListContext\";\n\nexport type TagProps = {\n isDisabled?: boolean;\n label: string;\n onClick?: ChipProps[\"onClick\"];\n onRemove?: ChipProps[\"onDelete\"];\n};\n\nconst Tag = ({ isDisabled, label, onClick, onRemove }: TagProps) => {\n const { chipElementType } = useContext(TagListContext);\n\n return (\n <Chip\n label={label}\n clickable={onClick ? true : false}\n component={chipElementType}\n disabled={isDisabled}\n onClick={onClick}\n onDelete={onRemove}\n />\n );\n};\n\nconst MemoizedTag = memo(Tag);\n\nexport { MemoizedTag as Tag };\n"],"mappings":";AAaA,SAASA,IAAT,EAAeC,UAAf,QAAiC,OAAjC;SACSC,c;;;AAST,MAAMC,GAAG,GAAG,QAAwD;EAAA,IAAvD;IAAEC,UAAF;IAAcC,KAAd;IAAqBC,OAArB;IAA8BC;EAA9B,CAAuD;EAClE,MAAM;IAAEC;EAAF,IAAsBP,UAAU,CAACC,cAAD,CAAtC;EAEA,OACE;IACE,KAAK,EAAEG,KADT;IAEE,SAAS,EAAEC,OAAO,GAAG,IAAH,GAAU,KAF9B;IAGE,SAAS,EAAEE,eAHb;IAIE,QAAQ,EAAEJ,UAJZ;IAKE,OAAO,EAAEE,OALX;IAME,QAAQ,EAAEC;EANZ,EADF;AAUD,CAbD;;AAeA,MAAME,WAAW,GAAGT,IAAI,CAACG,GAAD,CAAxB;AAEA,SAASM,WAAW,IAAIN,GAAxB"}
|
package/dist/TagList.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import _Stack from "@mui/material/Stack";
|
|
2
|
+
import { memo, useMemo } from "react";
|
|
3
|
+
import { TagListContext } from "./TagListContext.js";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
const TagList = _ref => {
|
|
7
|
+
let {
|
|
8
|
+
children
|
|
9
|
+
} = _ref;
|
|
10
|
+
const providerValue = useMemo(() => ({
|
|
11
|
+
chipElementType: "li"
|
|
12
|
+
}), []);
|
|
13
|
+
return _jsx(_Stack, {
|
|
14
|
+
component: "ul",
|
|
15
|
+
direction: "row",
|
|
16
|
+
spacing: 2,
|
|
17
|
+
children: _jsx(TagListContext.Provider, {
|
|
18
|
+
value: providerValue,
|
|
19
|
+
children: children
|
|
20
|
+
})
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const MemoizedTagList = memo(TagList);
|
|
25
|
+
export { MemoizedTagList as TagList };
|
|
26
|
+
//# sourceMappingURL=TagList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TagList.js","names":["memo","useMemo","TagListContext","TagList","children","providerValue","chipElementType","MemoizedTagList"],"sources":["../src/TagList.tsx"],"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 { Tag } from \"./\";\nimport { Stack } from \"@mui/material\";\nimport { memo, ReactElement, useMemo } from \"react\";\nimport { ChipElementType, TagListContext } from \"./TagListContext\";\n\nexport type TagListProps = {\n children: ReactElement<typeof Tag> | Array<ReactElement<typeof Tag>>;\n};\n\nconst TagList = ({ children }: TagListProps) => {\n const providerValue = useMemo<{\n chipElementType: ChipElementType;\n }>(\n () => ({\n chipElementType: \"li\",\n }),\n []\n );\n\n return (\n <Stack component=\"ul\" direction=\"row\" spacing={2}>\n <TagListContext.Provider value={providerValue}>\n {children}\n </TagListContext.Provider>\n </Stack>\n );\n};\n\nconst MemoizedTagList = memo(TagList);\n\nexport { MemoizedTagList as TagList };\n"],"mappings":";AAcA,SAASA,IAAT,EAA6BC,OAA7B,QAA4C,OAA5C;SAC0BC,c;;;AAM1B,MAAMC,OAAO,GAAG,QAAgC;EAAA,IAA/B;IAAEC;EAAF,CAA+B;EAC9C,MAAMC,aAAa,GAAGJ,OAAO,CAG3B,OAAO;IACLK,eAAe,EAAE;EADZ,CAAP,CAH2B,EAM3B,EAN2B,CAA7B;EASA,OACE;IAAO,SAAS,EAAC,IAAjB;IAAsB,SAAS,EAAC,KAAhC;IAAsC,OAAO,EAAE,CAA/C;IAAA,UACE,KAAC,cAAD,CAAgB,QAAhB;MAAyB,KAAK,EAAED,aAAhC;MAAA,UACGD;IADH;EADF,EADF;AAOD,CAjBD;;AAmBA,MAAMG,eAAe,GAAGP,IAAI,CAACG,OAAD,CAA5B;AAEA,SAASI,eAAe,IAAIJ,OAA5B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
+
*
|
|
5
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
+
*
|
|
10
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
import { createContext } from "react";
|
|
13
|
+
export const TagListContext = createContext({
|
|
14
|
+
chipElementType: "div"
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=TagListContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TagListContext.js","names":["createContext","TagListContext","chipElementType"],"sources":["../src/TagListContext.tsx"],"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 { createContext } from \"react\";\n\nexport type ChipElementType = \"li\" | \"div\";\n\nexport type TagListContextType = {\n chipElementType: ChipElementType;\n};\n\nexport const TagListContext = createContext<TagListContextType>({\n chipElementType: \"div\",\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAASA,aAAT,QAA8B,OAA9B;AAQA,OAAO,MAAMC,cAAc,GAAGD,aAAa,CAAqB;EAC9DE,eAAe,EAAE;AAD6C,CAArB,CAApC"}
|
package/dist/TextField.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import _InputBase from "@mui/material/InputBase";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { forwardRef, memo, useCallback, useEffect, useMemo, useState } from "react";
|
|
5
|
-
import { EyeIcon, EyeOffIcon, FormControl, FormHelperText, IconButton, SearchIcon, Typography, useUniqueId, visuallyHidden } from "./index.js";
|
|
2
|
+
import { forwardRef, memo, useCallback } from "react";
|
|
3
|
+
import { Field } from "./Field.js";
|
|
6
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
5
|
const TextField = forwardRef((_ref, ref) => {
|
|
9
6
|
let {
|
|
10
7
|
autoCompleteType,
|
|
@@ -13,86 +10,53 @@ const TextField = forwardRef((_ref, ref) => {
|
|
|
13
10
|
errorMessage,
|
|
14
11
|
hint,
|
|
15
12
|
id: idOverride,
|
|
16
|
-
inputProps = {},
|
|
17
13
|
isDisabled = false,
|
|
18
14
|
isMultiline = false,
|
|
19
15
|
isReadOnly,
|
|
20
16
|
isRequired = true,
|
|
21
17
|
label,
|
|
18
|
+
onBlur,
|
|
22
19
|
onChange,
|
|
23
20
|
onFocus,
|
|
24
|
-
onBlur,
|
|
25
21
|
optionalLabel,
|
|
26
22
|
placeholder,
|
|
27
23
|
startAdornment,
|
|
28
24
|
type = "text",
|
|
29
25
|
value
|
|
30
26
|
} = _ref;
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const id = useUniqueId(idOverride);
|
|
39
|
-
const hintId = hint ? `${id}-hint` : undefined;
|
|
40
|
-
const errorId = errorMessage ? `${id}-error` : undefined;
|
|
41
|
-
const labelId = label ? `${id}-label` : undefined;
|
|
42
|
-
const localInputProps = useMemo(() => {
|
|
43
|
-
const ariaDescribedBy = errorId && hintId ? `${hintId} ${errorId}` : errorId || hintId;
|
|
44
|
-
return { ...inputProps,
|
|
45
|
-
"aria-describedby": inputProps["aria-describedby"]?.concat(` ${ariaDescribedBy}`) ?? ariaDescribedBy
|
|
46
|
-
};
|
|
47
|
-
}, [errorId, hintId, inputProps]);
|
|
48
|
-
return _jsxs(FormControl, {
|
|
49
|
-
disabled: isDisabled,
|
|
50
|
-
error: Boolean(errorMessage),
|
|
51
|
-
children: [_jsxs(_InputLabel, {
|
|
52
|
-
htmlFor: id,
|
|
53
|
-
id: labelId,
|
|
54
|
-
children: [label, !isRequired && _jsx(Typography, {
|
|
55
|
-
variant: "subtitle1",
|
|
56
|
-
children: optionalLabel
|
|
57
|
-
})]
|
|
58
|
-
}), hint && _jsx(FormHelperText, {
|
|
59
|
-
id: hintId,
|
|
60
|
-
children: hint
|
|
61
|
-
}), _jsx(_InputBase, {
|
|
27
|
+
const renderFieldComponent = useCallback(_ref2 => {
|
|
28
|
+
let {
|
|
29
|
+
ariaDescribedBy,
|
|
30
|
+
id
|
|
31
|
+
} = _ref2;
|
|
32
|
+
return _jsx(_InputBase, {
|
|
33
|
+
"aria-describedby": ariaDescribedBy,
|
|
62
34
|
autoComplete: autoCompleteType,
|
|
63
35
|
autoFocus: autoFocus,
|
|
64
|
-
endAdornment:
|
|
65
|
-
position: "end",
|
|
66
|
-
children: _jsx(IconButton, {
|
|
67
|
-
"aria-label": "toggle password visibility",
|
|
68
|
-
edge: "end",
|
|
69
|
-
onClick: togglePasswordVisibility,
|
|
70
|
-
children: inputType === "password" ? _jsx(EyeIcon, {}) : _jsx(EyeOffIcon, {})
|
|
71
|
-
})
|
|
72
|
-
}) : endAdornment,
|
|
36
|
+
endAdornment: endAdornment,
|
|
73
37
|
id: id,
|
|
74
|
-
inputProps: localInputProps,
|
|
75
38
|
multiline: isMultiline,
|
|
39
|
+
onBlur: onBlur,
|
|
76
40
|
onChange: onChange,
|
|
77
41
|
onFocus: onFocus,
|
|
78
|
-
onBlur: onBlur,
|
|
79
42
|
placeholder: placeholder,
|
|
80
43
|
readOnly: isReadOnly,
|
|
81
44
|
ref: ref,
|
|
82
|
-
startAdornment:
|
|
83
|
-
|
|
84
|
-
children: _jsx(SearchIcon, {})
|
|
85
|
-
}) : startAdornment,
|
|
86
|
-
type: inputType,
|
|
45
|
+
startAdornment: startAdornment,
|
|
46
|
+
type: type,
|
|
87
47
|
value: value
|
|
88
|
-
})
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
48
|
+
});
|
|
49
|
+
}, [autoCompleteType, autoFocus, endAdornment, isMultiline, onChange, onFocus, onBlur, placeholder, isReadOnly, ref, startAdornment, type, value]);
|
|
50
|
+
return _jsx(Field, {
|
|
51
|
+
errorMessage: errorMessage,
|
|
52
|
+
hasVisibleLabel: true,
|
|
53
|
+
hint: hint,
|
|
54
|
+
id: idOverride,
|
|
55
|
+
isDisabled: isDisabled,
|
|
56
|
+
isRequired: isRequired,
|
|
57
|
+
label: label,
|
|
58
|
+
optionalLabel: optionalLabel,
|
|
59
|
+
renderFieldComponent: renderFieldComponent
|
|
96
60
|
});
|
|
97
61
|
});
|
|
98
62
|
const MemoizedTextField = memo(TextField);
|
package/dist/TextField.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.js","names":["forwardRef","memo","useCallback","useEffect","useMemo","useState","EyeIcon","EyeOffIcon","FormControl","FormHelperText","IconButton","SearchIcon","Typography","useUniqueId","visuallyHidden","TextField","ref","autoCompleteType","autoFocus","endAdornment","errorMessage","hint","id","idOverride","inputProps","isDisabled","isMultiline","isReadOnly","isRequired","label","onChange","onFocus","onBlur","optionalLabel","placeholder","startAdornment","type","value","inputType","setInputType","togglePasswordVisibility","currentType","hintId","undefined","errorId","labelId","localInputProps","ariaDescribedBy","concat","Boolean","MemoizedTextField"],"sources":["../src/TextField.tsx"],"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 {\n InputAdornment,\n InputBase,\n InputBaseProps,\n InputLabel,\n} from \"@mui/material\";\nimport {\n ChangeEventHandler,\n FocusEventHandler,\n forwardRef,\n InputHTMLAttributes,\n memo,\n ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from \"react\";\n\nimport {\n EyeIcon,\n EyeOffIcon,\n FormControl,\n FormHelperText,\n IconButton,\n SearchIcon,\n Typography,\n useUniqueId,\n visuallyHidden,\n} from \"./\";\n\nexport type TextFieldProps = {\n /**\n * If `true`, the component will receive focus automatically.\n */\n autoFocus?: boolean;\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoCompleteType?: InputHTMLAttributes<HTMLInputElement>[\"autoComplete\"];\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment?: ReactNode;\n /**\n * If `error` is not undefined, the `input` will indicate an error.\n */\n errorMessage?: string;\n /**\n * The helper text content.\n */\n hint?: string;\n /**\n * The id of the `input` element.\n */\n id?: string;\n /**\n * Props that go onto the HTML `input` element.\n */\n inputProps?: InputBaseProps[\"inputProps\"];\n /**\n * If `true`, the component is disabled.\n */\n isDisabled?: boolean;\n /**\n * If `true`, a [TextareaAutosize](/material-ui/react-textarea-autosize/) element is rendered.\n */\n isMultiline?: boolean;\n /**\n * It prevents the user from changing the value of the field\n */\n isReadOnly?: boolean;\n /**\n * If `true`, the `input` element is required.\n */\n isRequired?: boolean;\n /**\n * The label for the `input` element.\n */\n label?: string;\n /**\n * Callback fired when the `input` element loses focus.\n */\n onBlur?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n /**\n * Callback fired when the value is changed.\n */\n onChange?: ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement>;\n /**\n * Callback fired when the `input` element get focus.\n */\n onFocus?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n /**\n * The label for the `input` element if the it's not optional\n */\n optionalLabel?: string;\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder?: string;\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment?: ReactNode;\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n */\n type?: string;\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value?: unknown;\n};\n\nconst TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n autoCompleteType,\n autoFocus,\n endAdornment,\n errorMessage,\n hint,\n id: idOverride,\n inputProps = {},\n isDisabled = false,\n isMultiline = false,\n isReadOnly,\n isRequired = true,\n label,\n onChange,\n onFocus,\n onBlur,\n optionalLabel,\n placeholder,\n startAdornment,\n type = \"text\",\n value,\n },\n ref\n ) => {\n const [inputType, setInputType] = useState(type);\n\n useEffect(() => {\n setInputType(type);\n }, [type]);\n\n const togglePasswordVisibility = useCallback(() => {\n setInputType((currentType) =>\n currentType === \"password\" ? \"text\" : \"password\"\n );\n }, []);\n\n const id = useUniqueId(idOverride);\n const hintId = hint ? `${id}-hint` : undefined;\n const errorId = errorMessage ? `${id}-error` : undefined;\n const labelId = label ? `${id}-label` : undefined;\n\n const localInputProps = useMemo(() => {\n const ariaDescribedBy =\n errorId && hintId ? `${hintId} ${errorId}` : errorId || hintId;\n\n return {\n ...inputProps,\n \"aria-describedby\":\n inputProps[\"aria-describedby\"]?.concat(` ${ariaDescribedBy}`) ??\n ariaDescribedBy,\n };\n }, [errorId, hintId, inputProps]);\n\n return (\n <FormControl disabled={isDisabled} error={Boolean(errorMessage)}>\n <InputLabel htmlFor={id} id={labelId}>\n {label}\n {!isRequired && (\n <Typography variant=\"subtitle1\">{optionalLabel}</Typography>\n )}\n </InputLabel>\n {hint && <FormHelperText id={hintId}>{hint}</FormHelperText>}\n <InputBase\n autoComplete={autoCompleteType}\n /* eslint-disable-next-line jsx-a11y/no-autofocus */\n autoFocus={autoFocus}\n endAdornment={\n type === \"password\" ? (\n <InputAdornment position=\"end\">\n <IconButton\n aria-label=\"toggle password visibility\"\n edge=\"end\"\n onClick={togglePasswordVisibility}\n >\n {inputType === \"password\" ? <EyeIcon /> : <EyeOffIcon />}\n </IconButton>\n </InputAdornment>\n ) : (\n endAdornment\n )\n }\n id={id}\n inputProps={localInputProps}\n multiline={isMultiline}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={onBlur}\n placeholder={placeholder}\n readOnly={isReadOnly}\n ref={ref}\n startAdornment={\n inputType === \"search\" ? (\n <InputAdornment position=\"start\">\n <SearchIcon />\n </InputAdornment>\n ) : (\n startAdornment\n )\n }\n type={inputType}\n value={value}\n />\n {errorMessage && (\n <FormHelperText error id={errorId}>\n <span style={visuallyHidden}>Error:</span>\n {errorMessage}\n </FormHelperText>\n )}\n </FormControl>\n );\n }\n);\n\nconst MemoizedTextField = memo(TextField);\n\nexport { MemoizedTextField as TextField };\n"],"mappings":";;;AAkBA,SAGEA,UAHF,EAKEC,IALF,EAOEC,WAPF,EAQEC,SARF,EASEC,OATF,EAUEC,QAVF,QAWO,OAXP;SAcEC,O,EACAC,U,EACAC,W,EACAC,c,EACAC,U,EACAC,U,EACAC,U,EACAC,W,EACAC,c;;;AAwFF,MAAMC,SAAS,GAAGf,UAAU,CAC1B,OAuBEgB,GAvBF,KAwBK;EAAA,IAvBH;IACEC,gBADF;IAEEC,SAFF;IAGEC,YAHF;IAIEC,YAJF;IAKEC,IALF;IAMEC,EAAE,EAAEC,UANN;IAOEC,UAAU,GAAG,EAPf;IAQEC,UAAU,GAAG,KARf;IASEC,WAAW,GAAG,KAThB;IAUEC,UAVF;IAWEC,UAAU,GAAG,IAXf;IAYEC,KAZF;IAaEC,QAbF;IAcEC,OAdF;IAeEC,MAfF;IAgBEC,aAhBF;IAiBEC,WAjBF;IAkBEC,cAlBF;IAmBEC,IAAI,GAAG,MAnBT;IAoBEC;EApBF,CAuBG;EACH,MAAM,CAACC,SAAD,EAAYC,YAAZ,IAA4BlC,QAAQ,CAAC+B,IAAD,CAA1C;EAEAjC,SAAS,CAAC,MAAM;IACdoC,YAAY,CAACH,IAAD,CAAZ;EACD,CAFQ,EAEN,CAACA,IAAD,CAFM,CAAT;EAIA,MAAMI,wBAAwB,GAAGtC,WAAW,CAAC,MAAM;IACjDqC,YAAY,CAAEE,WAAD,IACXA,WAAW,KAAK,UAAhB,GAA6B,MAA7B,GAAsC,UAD5B,CAAZ;EAGD,CAJ2C,EAIzC,EAJyC,CAA5C;EAMA,MAAMnB,EAAE,GAAGT,WAAW,CAACU,UAAD,CAAtB;EACA,MAAMmB,MAAM,GAAGrB,IAAI,GAAI,GAAEC,EAAG,OAAT,GAAkBqB,SAArC;EACA,MAAMC,OAAO,GAAGxB,YAAY,GAAI,GAAEE,EAAG,QAAT,GAAmBqB,SAA/C;EACA,MAAME,OAAO,GAAGhB,KAAK,GAAI,GAAEP,EAAG,QAAT,GAAmBqB,SAAxC;EAEA,MAAMG,eAAe,GAAG1C,OAAO,CAAC,MAAM;IACpC,MAAM2C,eAAe,GACnBH,OAAO,IAAIF,MAAX,GAAqB,GAAEA,MAAO,IAAGE,OAAQ,EAAzC,GAA6CA,OAAO,IAAIF,MAD1D;IAGA,OAAO,EACL,GAAGlB,UADE;MAEL,oBACEA,UAAU,CAAC,kBAAD,CAAV,EAAgCwB,MAAhC,CAAwC,IAAGD,eAAgB,EAA3D,KACAA;IAJG,CAAP;EAMD,CAV8B,EAU5B,CAACH,OAAD,EAAUF,MAAV,EAAkBlB,UAAlB,CAV4B,CAA/B;EAYA,OACE,MAAC,WAAD;IAAa,QAAQ,EAAEC,UAAvB;IAAmC,KAAK,EAAEwB,OAAO,CAAC7B,YAAD,CAAjD;IAAA,WACE;MAAY,OAAO,EAAEE,EAArB;MAAyB,EAAE,EAAEuB,OAA7B;MAAA,WACGhB,KADH,EAEG,CAACD,UAAD,IACC,KAAC,UAAD;QAAY,OAAO,EAAC,WAApB;QAAA,UAAiCK;MAAjC,EAHJ;IAAA,EADF,EAOGZ,IAAI,IAAI,KAAC,cAAD;MAAgB,EAAE,EAAEqB,MAApB;MAAA,UAA6BrB;IAA7B,EAPX,EAQE;MACE,YAAY,EAAEJ,gBADhB;MAGE,SAAS,EAAEC,SAHb;MAIE,YAAY,EACVkB,IAAI,KAAK,UAAT,GACE;QAAgB,QAAQ,EAAC,KAAzB;QAAA,UACE,KAAC,UAAD;UACE,cAAW,4BADb;UAEE,IAAI,EAAC,KAFP;UAGE,OAAO,EAAEI,wBAHX;UAAA,UAKGF,SAAS,KAAK,UAAd,GAA2B,KAAC,OAAD,KAA3B,GAAyC,KAAC,UAAD;QAL5C;MADF,EADF,GAWEnB,YAhBN;MAmBE,EAAE,EAAEG,EAnBN;MAoBE,UAAU,EAAEwB,eApBd;MAqBE,SAAS,EAAEpB,WArBb;MAsBE,QAAQ,EAAEI,QAtBZ;MAuBE,OAAO,EAAEC,OAvBX;MAwBE,MAAM,EAAEC,MAxBV;MAyBE,WAAW,EAAEE,WAzBf;MA0BE,QAAQ,EAAEP,UA1BZ;MA2BE,GAAG,EAAEX,GA3BP;MA4BE,cAAc,EACZsB,SAAS,KAAK,QAAd,GACE;QAAgB,QAAQ,EAAC,OAAzB;QAAA,UACE,KAAC,UAAD;MADF,EADF,GAKEH,cAlCN;MAqCE,IAAI,EAAEG,SArCR;MAsCE,KAAK,EAAED;IAtCT,EARF,EAgDGjB,YAAY,IACX,MAAC,cAAD;MAAgB,KAAK,MAArB;MAAsB,EAAE,EAAEwB,OAA1B;MAAA,WACE;QAAM,KAAK,EAAE9B,cAAb;QAAA;MAAA,EADF,EAEGM,YAFH;IAAA,EAjDJ;EAAA,EADF;AAyDD,CAhHyB,CAA5B;AAmHA,MAAM8B,iBAAiB,GAAGjD,IAAI,CAACc,SAAD,CAA9B;AAEA,SAASmC,iBAAiB,IAAInC,SAA9B"}
|
|
1
|
+
{"version":3,"file":"TextField.js","names":["forwardRef","memo","useCallback","Field","TextField","ref","autoCompleteType","autoFocus","endAdornment","errorMessage","hint","id","idOverride","isDisabled","isMultiline","isReadOnly","isRequired","label","onBlur","onChange","onFocus","optionalLabel","placeholder","startAdornment","type","value","renderFieldComponent","ariaDescribedBy","MemoizedTextField"],"sources":["../src/TextField.tsx"],"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 { InputBase } from \"@mui/material\";\nimport {\n ChangeEventHandler,\n FocusEventHandler,\n forwardRef,\n InputHTMLAttributes,\n memo,\n ReactNode,\n useCallback,\n} from \"react\";\n\nimport { Field } from \"./Field\";\n\nexport type TextFieldProps = {\n /**\n * If `true`, the component will receive focus automatically.\n */\n autoFocus?: boolean;\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoCompleteType?: InputHTMLAttributes<HTMLInputElement>[\"autoComplete\"];\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment?: ReactNode;\n /**\n * If `error` is not undefined, the `input` will indicate an error.\n */\n errorMessage?: string;\n /**\n * The helper text content.\n */\n hint?: string;\n /**\n * The id of the `input` element.\n */\n id?: string;\n /**\n * If `true`, the component is disabled.\n */\n isDisabled?: boolean;\n /**\n * If `true`, a [TextareaAutosize](/material-ui/react-textarea-autosize/) element is rendered.\n */\n isMultiline?: boolean;\n /**\n * It prevents the user from changing the value of the field\n */\n isReadOnly?: boolean;\n /**\n * If `true`, the `input` element is required.\n */\n isRequired?: boolean;\n /**\n * The label for the `input` element.\n */\n label: string;\n /**\n * Callback fired when the `input` element loses focus.\n */\n onBlur?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n /**\n * Callback fired when the value is changed.\n */\n onChange?: ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement>;\n /**\n * Callback fired when the `input` element get focus.\n */\n onFocus?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n /**\n * The label for the `input` element if the it's not optional\n */\n optionalLabel?: string;\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder?: string;\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment?: ReactNode;\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n */\n type?: \"email\" | \"number\" | \"tel\" | \"text\" | \"url\";\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value?: string;\n};\n\nconst TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n autoCompleteType,\n autoFocus,\n endAdornment,\n errorMessage,\n hint,\n id: idOverride,\n isDisabled = false,\n isMultiline = false,\n isReadOnly,\n isRequired = true,\n label,\n onBlur,\n onChange,\n onFocus,\n optionalLabel,\n placeholder,\n startAdornment,\n type = \"text\",\n value,\n },\n ref\n ) => {\n const renderFieldComponent = useCallback(\n ({ ariaDescribedBy, id }) => (\n <InputBase\n aria-describedby={ariaDescribedBy}\n autoComplete={autoCompleteType}\n /* eslint-disable-next-line jsx-a11y/no-autofocus */\n autoFocus={autoFocus}\n endAdornment={endAdornment}\n id={id}\n multiline={isMultiline}\n onBlur={onBlur}\n onChange={onChange}\n onFocus={onFocus}\n placeholder={placeholder}\n readOnly={isReadOnly}\n ref={ref}\n startAdornment={startAdornment}\n type={type}\n value={value}\n />\n ),\n [\n autoCompleteType,\n autoFocus,\n endAdornment,\n isMultiline,\n onChange,\n onFocus,\n onBlur,\n placeholder,\n isReadOnly,\n ref,\n startAdornment,\n type,\n value,\n ]\n );\n\n return (\n <Field\n errorMessage={errorMessage}\n hasVisibleLabel\n hint={hint}\n id={idOverride}\n isDisabled={isDisabled}\n isRequired={isRequired}\n label={label}\n optionalLabel={optionalLabel}\n renderFieldComponent={renderFieldComponent}\n />\n );\n }\n);\n\nconst MemoizedTextField = memo(TextField);\n\nexport { MemoizedTextField as TextField };\n"],"mappings":";AAaA,SAGEA,UAHF,EAKEC,IALF,EAOEC,WAPF,QAQO,OARP;SAUSC,K;;AAmFT,MAAMC,SAAS,GAAGJ,UAAU,CAC1B,OAsBEK,GAtBF,KAuBK;EAAA,IAtBH;IACEC,gBADF;IAEEC,SAFF;IAGEC,YAHF;IAIEC,YAJF;IAKEC,IALF;IAMEC,EAAE,EAAEC,UANN;IAOEC,UAAU,GAAG,KAPf;IAQEC,WAAW,GAAG,KARhB;IASEC,UATF;IAUEC,UAAU,GAAG,IAVf;IAWEC,KAXF;IAYEC,MAZF;IAaEC,QAbF;IAcEC,OAdF;IAeEC,aAfF;IAgBEC,WAhBF;IAiBEC,cAjBF;IAkBEC,IAAI,GAAG,MAlBT;IAmBEC;EAnBF,CAsBG;EACH,MAAMC,oBAAoB,GAAGxB,WAAW,CACtC;IAAA,IAAC;MAAEyB,eAAF;MAAmBhB;IAAnB,CAAD;IAAA,OACE;MACE,oBAAkBgB,eADpB;MAEE,YAAY,EAAErB,gBAFhB;MAIE,SAAS,EAAEC,SAJb;MAKE,YAAY,EAAEC,YALhB;MAME,EAAE,EAAEG,EANN;MAOE,SAAS,EAAEG,WAPb;MAQE,MAAM,EAAEI,MARV;MASE,QAAQ,EAAEC,QATZ;MAUE,OAAO,EAAEC,OAVX;MAWE,WAAW,EAAEE,WAXf;MAYE,QAAQ,EAAEP,UAZZ;MAaE,GAAG,EAAEV,GAbP;MAcE,cAAc,EAAEkB,cAdlB;MAeE,IAAI,EAAEC,IAfR;MAgBE,KAAK,EAAEC;IAhBT,EADF;EAAA,CADsC,EAqBtC,CACEnB,gBADF,EAEEC,SAFF,EAGEC,YAHF,EAIEM,WAJF,EAKEK,QALF,EAMEC,OANF,EAOEF,MAPF,EAQEI,WARF,EASEP,UATF,EAUEV,GAVF,EAWEkB,cAXF,EAYEC,IAZF,EAaEC,KAbF,CArBsC,CAAxC;EAsCA,OACE,KAAC,KAAD;IACE,YAAY,EAAEhB,YADhB;IAEE,eAAe,MAFjB;IAGE,IAAI,EAAEC,IAHR;IAIE,EAAE,EAAEE,UAJN;IAKE,UAAU,EAAEC,UALd;IAME,UAAU,EAAEG,UANd;IAOE,KAAK,EAAEC,KAPT;IAQE,aAAa,EAAEI,aARjB;IASE,oBAAoB,EAAEK;EATxB,EADF;AAaD,CA5EyB,CAA5B;AA+EA,MAAME,iBAAiB,GAAG3B,IAAI,CAACG,SAAD,CAA9B;AAEA,SAASwB,iBAAiB,IAAIxB,SAA9B"}
|
package/dist/index.js
CHANGED
|
@@ -9,14 +9,20 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
export { Alert, AlertTitle, Box,
|
|
12
|
+
export { Alert, AlertTitle, Box, Chip, createTheme, CssBaseline, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Divider, FormControl, FormControlLabel, FormGroup, FormHelperText, FormLabel, IconButton, InputAdornment, InputBase, InputLabel, List, ListItem, ListItemIcon, ListItemText, ListSubheader, Menu, MenuList, Paper, ScopedCssBaseline, Select, Snackbar, Stack, SvgIcon, Tab, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, TableSortLabel, ThemeProvider as MuiThemeProvider, Tooltip, Typography } from "@mui/material";
|
|
13
13
|
export { TabContext, TabList, TabPanel } from "@mui/lab";
|
|
14
14
|
export { default as FavoriteIcon } from "@mui/icons-material/Favorite";
|
|
15
15
|
export { deepmerge, visuallyHidden } from "@mui/utils";
|
|
16
|
+
export * from "./Autocomplete.js";
|
|
16
17
|
export * from "./Banner.js";
|
|
18
|
+
export * from "./Button.js";
|
|
17
19
|
export * from "./Checkbox.js";
|
|
18
20
|
export * from "./CheckboxGroup.js";
|
|
21
|
+
export * from "./CircularProgress.js";
|
|
19
22
|
export * from "./createUniqueId.js";
|
|
23
|
+
export * from "./FieldError.js";
|
|
24
|
+
export * from "./FieldHint.js";
|
|
25
|
+
export * from "./FieldLabel.js";
|
|
20
26
|
export * from "./Icon.js";
|
|
21
27
|
export * from "./iconDictionary/index.js";
|
|
22
28
|
export * from "./Infobox.js";
|
|
@@ -25,10 +31,14 @@ export * from "./MenuButton.js";
|
|
|
25
31
|
export * from "./MenuItem.js";
|
|
26
32
|
export * from "./OdysseyCacheProvider.js";
|
|
27
33
|
export * from "./OdysseyThemeProvider.js";
|
|
28
|
-
export * from "./
|
|
34
|
+
export * from "./PasswordField.js";
|
|
29
35
|
export * from "./Radio.js";
|
|
30
36
|
export * from "./RadioGroup.js";
|
|
37
|
+
export * from "./ScreenReaderText.js";
|
|
38
|
+
export * from "./SearchField.js";
|
|
31
39
|
export * from "./Status.js";
|
|
40
|
+
export * from "./Tag.js";
|
|
41
|
+
export * from "./TagList.js";
|
|
32
42
|
export * from "./TextField.js";
|
|
33
43
|
export * from "./theme/index.js";
|
|
34
44
|
export * from "./ThemeProvider.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Alert","AlertTitle","Box","
|
|
1
|
+
{"version":3,"file":"index.js","names":["Alert","AlertTitle","Box","Chip","createTheme","CssBaseline","Dialog","DialogActions","DialogContent","DialogContentText","DialogTitle","Divider","FormControl","FormControlLabel","FormGroup","FormHelperText","FormLabel","IconButton","InputAdornment","InputBase","InputLabel","List","ListItem","ListItemIcon","ListItemText","ListSubheader","Menu","MenuList","Paper","ScopedCssBaseline","Select","Snackbar","Stack","SvgIcon","Tab","Table","TableBody","TableCell","TableContainer","TableHead","TableRow","TableSortLabel","ThemeProvider","MuiThemeProvider","Tooltip","Typography","TabContext","TabList","TabPanel","default","FavoriteIcon","deepmerge","visuallyHidden"],"sources":["../src/index.ts"],"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\nexport {\n Alert,\n AlertTitle,\n Box,\n Chip,\n createTheme,\n CssBaseline,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n Divider,\n FormControl,\n FormControlLabel,\n FormGroup,\n FormHelperText,\n FormLabel,\n IconButton,\n /** @deprecated Will be removed in a future Odyssey version. Please switch to `TextField`. */\n InputAdornment,\n /** @deprecated Will be removed in a future Odyssey version. Please switch to `TextField`. */\n InputBase,\n /** @deprecated Will be removed in a future Odyssey version. Please switch to `TextField`. */\n InputLabel,\n List,\n ListItem,\n ListItemIcon,\n ListItemText,\n ListSubheader,\n Menu,\n MenuList,\n Paper,\n ScopedCssBaseline,\n Select,\n Snackbar,\n Stack,\n SvgIcon,\n Tab,\n Table,\n TableBody,\n TableCell,\n TableContainer,\n TableHead,\n TableRow,\n TableSortLabel,\n ThemeProvider as MuiThemeProvider,\n Tooltip,\n Typography,\n} from \"@mui/material\";\n\nexport type {\n AlertProps,\n AlertTitleProps,\n BoxProps,\n ChipProps,\n CssBaselineProps,\n DialogProps,\n DialogActionsProps,\n DialogContentProps,\n DialogContentTextProps,\n DialogTitleProps,\n DividerProps,\n FormControlLabelProps,\n FormControlProps,\n FormGroupProps,\n FormHelperTextProps,\n FormLabelProps,\n IconButtonProps,\n /** @deprecated Will be removed in a future Odyssey version. Please switch to `TextFieldProps`. */\n InputAdornmentProps,\n /** @deprecated Will be removed in a future Odyssey version. Please switch to `TextFieldProps`. */\n InputBaseProps,\n /** @deprecated Will be removed in a future Odyssey version. Please switch to `TextFieldProps`. */\n InputLabelProps,\n ListProps,\n ListItemProps,\n ListItemIconProps,\n ListItemTextProps,\n ListSubheaderProps,\n MenuProps,\n MenuListProps,\n PaperProps,\n ScopedCssBaselineProps,\n SelectChangeEvent,\n SelectProps,\n SnackbarProps,\n StackProps,\n SvgIconProps,\n TabProps,\n TableBodyProps,\n TableCellProps,\n TableContainerProps,\n TableHeadProps,\n TableProps,\n TableRowProps,\n TableSortLabelProps,\n ThemeOptions,\n TooltipProps,\n TypographyProps,\n} from \"@mui/material\";\n\nexport { TabContext, TabList, TabPanel } from \"@mui/lab\";\n\nexport type { TabContextProps, TabListProps, TabPanelProps } from \"@mui/lab\";\n\nexport { default as FavoriteIcon } from \"@mui/icons-material/Favorite\";\n\nexport { deepmerge, visuallyHidden } from \"@mui/utils\";\n\nexport * from \"./Autocomplete\";\nexport * from \"./Banner\";\nexport * from \"./Button\";\nexport * from \"./Checkbox\";\nexport * from \"./CheckboxGroup\";\nexport * from \"./CircularProgress\";\nexport * from \"./createUniqueId\";\nexport * from \"./FieldError\";\nexport * from \"./FieldHint\";\nexport * from \"./FieldLabel\";\nexport * from \"./Icon\";\nexport * from \"./iconDictionary\";\nexport * from \"./Infobox\";\nexport * from \"./Link\";\nexport * from \"./MenuButton\";\nexport * from \"./MenuItem\";\nexport * from \"./OdysseyCacheProvider\";\nexport * from \"./OdysseyThemeProvider\";\nexport * from \"./PasswordField\";\nexport * from \"./Radio\";\nexport * from \"./RadioGroup\";\nexport * from \"./ScreenReaderText\";\nexport * from \"./SearchField\";\nexport * from \"./Status\";\nexport * from \"./Tag\";\nexport * from \"./TagList\";\nexport * from \"./TextField\";\nexport * from \"./theme\";\nexport * from \"./ThemeProvider\";\nexport * from \"./useUniqueId\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SACEA,KADF,EAEEC,UAFF,EAGEC,GAHF,EAIEC,IAJF,EAKEC,WALF,EAMEC,WANF,EAOEC,MAPF,EAQEC,aARF,EASEC,aATF,EAUEC,iBAVF,EAWEC,WAXF,EAYEC,OAZF,EAaEC,WAbF,EAcEC,gBAdF,EAeEC,SAfF,EAgBEC,cAhBF,EAiBEC,SAjBF,EAkBEC,UAlBF,EAoBEC,cApBF,EAsBEC,SAtBF,EAwBEC,UAxBF,EAyBEC,IAzBF,EA0BEC,QA1BF,EA2BEC,YA3BF,EA4BEC,YA5BF,EA6BEC,aA7BF,EA8BEC,IA9BF,EA+BEC,QA/BF,EAgCEC,KAhCF,EAiCEC,iBAjCF,EAkCEC,MAlCF,EAmCEC,QAnCF,EAoCEC,KApCF,EAqCEC,OArCF,EAsCEC,GAtCF,EAuCEC,KAvCF,EAwCEC,SAxCF,EAyCEC,SAzCF,EA0CEC,cA1CF,EA2CEC,SA3CF,EA4CEC,QA5CF,EA6CEC,cA7CF,EA8CEC,aAAa,IAAIC,gBA9CnB,EA+CEC,OA/CF,EAgDEC,UAhDF,QAiDO,eAjDP;AAsGA,SAASC,UAAT,EAAqBC,OAArB,EAA8BC,QAA9B,QAA8C,UAA9C;AAIA,SAASC,OAAO,IAAIC,YAApB,QAAwC,8BAAxC;AAEA,SAASC,SAAT,EAAoBC,cAApB,QAA0C,YAA1C"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
+
*
|
|
5
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
+
*
|
|
10
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
import { AutocompleteProps as MuiAutocompleteProps } from "@mui/material";
|
|
13
|
+
export type AutocompleteProps<OptionType, HasMultipleChoices extends boolean | undefined, IsCustomValueAllowed extends boolean | undefined> = {
|
|
14
|
+
hasMultipleChoices?: MuiAutocompleteProps<OptionType, HasMultipleChoices, undefined, IsCustomValueAllowed>["multiple"];
|
|
15
|
+
hint?: string;
|
|
16
|
+
isCustomValueAllowed?: MuiAutocompleteProps<OptionType, HasMultipleChoices, undefined, IsCustomValueAllowed>["freeSolo"];
|
|
17
|
+
isDisabled?: MuiAutocompleteProps<OptionType, HasMultipleChoices, undefined, IsCustomValueAllowed>["disabled"];
|
|
18
|
+
isLoading?: MuiAutocompleteProps<OptionType, HasMultipleChoices, undefined, IsCustomValueAllowed>["loading"];
|
|
19
|
+
isReadOnly?: MuiAutocompleteProps<OptionType, HasMultipleChoices, undefined, IsCustomValueAllowed>["readOnly"];
|
|
20
|
+
label: string;
|
|
21
|
+
onChange?: MuiAutocompleteProps<OptionType, HasMultipleChoices, undefined, IsCustomValueAllowed>["onChange"];
|
|
22
|
+
options: MuiAutocompleteProps<OptionType, HasMultipleChoices, undefined, IsCustomValueAllowed>["options"];
|
|
23
|
+
value?: MuiAutocompleteProps<OptionType, HasMultipleChoices, undefined, IsCustomValueAllowed>["value"];
|
|
24
|
+
};
|
|
25
|
+
declare const MemoizedAutocomplete: <OptionType, HasMultipleChoices extends boolean | undefined, IsCustomValueAllowed extends boolean | undefined>({ isCustomValueAllowed, hasMultipleChoices, isDisabled, isLoading, isReadOnly, hint, label, onChange, options, value, }: AutocompleteProps<OptionType, HasMultipleChoices, IsCustomValueAllowed>) => JSX.Element;
|
|
26
|
+
export { MemoizedAutocomplete as Autocomplete };
|
|
27
|
+
//# sourceMappingURL=Autocomplete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../src/Autocomplete.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAEL,iBAAiB,IAAI,oBAAoB,EAE1C,MAAM,eAAe,CAAC;AAKvB,MAAM,MAAM,iBAAiB,CAC3B,UAAU,EACV,kBAAkB,SAAS,OAAO,GAAG,SAAS,EAC9C,oBAAoB,SAAS,OAAO,GAAG,SAAS,IAC9C;IACF,kBAAkB,CAAC,EAAE,oBAAoB,CACvC,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,oBAAoB,CACrB,CAAC,UAAU,CAAC,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oBAAoB,CAAC,EAAE,oBAAoB,CACzC,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,oBAAoB,CACrB,CAAC,UAAU,CAAC,CAAC;IACd,UAAU,CAAC,EAAE,oBAAoB,CAC/B,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,oBAAoB,CACrB,CAAC,UAAU,CAAC,CAAC;IACd,SAAS,CAAC,EAAE,oBAAoB,CAC9B,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,oBAAoB,CACrB,CAAC,SAAS,CAAC,CAAC;IACb,UAAU,CAAC,EAAE,oBAAoB,CAC/B,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,oBAAoB,CACrB,CAAC,UAAU,CAAC,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,oBAAoB,CAC7B,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,oBAAoB,CACrB,CAAC,UAAU,CAAC,CAAC;IACd,OAAO,EAAE,oBAAoB,CAC3B,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,oBAAoB,CACrB,CAAC,SAAS,CAAC,CAAC;IACb,KAAK,CAAC,EAAE,oBAAoB,CAC1B,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,oBAAoB,CACrB,CAAC,OAAO,CAAC,CAAC;CACZ,CAAC;AAqDF,QAAA,MAAM,oBAAoB,iUAA4C,CAAC;AAEvE,OAAO,EAAE,oBAAoB,IAAI,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
+
*
|
|
5
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
+
*
|
|
10
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
/// <reference types="react" />
|
|
13
|
+
import type { ButtonProps as MuiButtonProps } from "@mui/material";
|
|
14
|
+
export type ButtonProps = {
|
|
15
|
+
endIcon?: React.ReactNode;
|
|
16
|
+
id?: string;
|
|
17
|
+
isDisabled?: boolean;
|
|
18
|
+
isFullWidth?: boolean;
|
|
19
|
+
onClick?: MuiButtonProps["onClick"];
|
|
20
|
+
size?: MuiButtonProps["size"];
|
|
21
|
+
startIcon?: React.ReactNode;
|
|
22
|
+
text?: string;
|
|
23
|
+
/**
|
|
24
|
+
* `tooltipText` determines the text of the tooltip that wraps the button if it's icon-only.
|
|
25
|
+
*/
|
|
26
|
+
tooltipText?: string;
|
|
27
|
+
variant?: "primary" | "secondary" | "danger" | "floating";
|
|
28
|
+
};
|
|
29
|
+
declare const MemoizedButton: import("react").MemoExoticComponent<({ endIcon, id, isDisabled, isFullWidth, onClick, size, startIcon, text, tooltipText, variant, }: ButtonProps) => JSX.Element>;
|
|
30
|
+
export { MemoizedButton as Button };
|
|
31
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Button.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;;AAGH,OAAO,KAAK,EAAE,WAAW,IAAI,cAAc,EAAE,MAAM,eAAe,CAAC;AAInE,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IACpC,IAAI,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IAC9B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,UAAU,CAAC;CAC3D,CAAC;AAyCF,QAAA,MAAM,cAAc,wIA5BjB,WAAW,iBA4BqB,CAAC;AAEpC,OAAO,EAAE,cAAc,IAAI,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
+
*
|
|
5
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
+
*
|
|
10
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
export type CircularProgressProps = {
|
|
13
|
+
value?: number;
|
|
14
|
+
};
|
|
15
|
+
export declare const CircularProgress: ({ value }: CircularProgressProps) => JSX.Element;
|
|
16
|
+
//# sourceMappingURL=CircularProgress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CircularProgress.d.ts","sourceRoot":"","sources":["../../src/CircularProgress.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,gBAAgB,cAAe,qBAAqB,gBAKhE,CAAC"}
|