@okta/odyssey-react-mui 1.6.20 → 1.7.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 +8 -0
- package/dist/Button.js +2 -2
- package/dist/Button.js.map +1 -1
- package/dist/MenuButton.js +16 -2
- package/dist/MenuButton.js.map +1 -1
- package/dist/MenuContext.js +2 -1
- package/dist/MenuContext.js.map +1 -1
- package/dist/MenuItem.js +6 -3
- package/dist/MenuItem.js.map +1 -1
- package/dist/SearchField.js.map +1 -1
- package/dist/icons.generated/ArrowBottom.js +33 -0
- package/dist/icons.generated/ArrowBottom.js.map +1 -0
- package/dist/icons.generated/ArrowTop.js +33 -0
- package/dist/icons.generated/ArrowTop.js.map +1 -0
- package/dist/icons.generated/index.js +2 -0
- package/dist/icons.generated/index.js.map +1 -1
- package/dist/labs/DataFilters.js +366 -0
- package/dist/labs/DataFilters.js.map +1 -0
- package/dist/labs/DataTable.js +366 -0
- package/dist/labs/DataTable.js.map +1 -0
- package/dist/labs/DataTablePagination.js +74 -0
- package/dist/labs/DataTablePagination.js.map +1 -0
- package/dist/labs/PaginatedTable.js +9 -6
- package/dist/labs/PaginatedTable.js.map +1 -1
- package/dist/labs/StaticTable.js +8 -5
- package/dist/labs/StaticTable.js.map +1 -1
- package/dist/labs/index.js +4 -1
- package/dist/labs/index.js.map +1 -1
- package/dist/labs/materialReactTableTypes.js.map +1 -1
- package/dist/src/MenuButton.d.ts +12 -2
- package/dist/src/MenuButton.d.ts.map +1 -1
- package/dist/src/MenuContext.d.ts +1 -0
- package/dist/src/MenuContext.d.ts.map +1 -1
- package/dist/src/MenuItem.d.ts.map +1 -1
- package/dist/src/SearchField.d.ts +16 -0
- package/dist/src/SearchField.d.ts.map +1 -1
- package/dist/src/icons.generated/ArrowBottom.d.ts +16 -0
- package/dist/src/icons.generated/ArrowBottom.d.ts.map +1 -0
- package/dist/src/icons.generated/ArrowTop.d.ts +16 -0
- package/dist/src/icons.generated/ArrowTop.d.ts.map +1 -0
- package/dist/src/icons.generated/index.d.ts +2 -0
- package/dist/src/icons.generated/index.d.ts.map +1 -1
- package/dist/src/labs/DataFilters.d.ts +85 -0
- package/dist/src/labs/DataFilters.d.ts.map +1 -0
- package/dist/src/labs/DataTable.d.ts +193 -0
- package/dist/src/labs/DataTable.d.ts.map +1 -0
- package/dist/src/labs/DataTablePagination.d.ts +25 -0
- package/dist/src/labs/DataTablePagination.d.ts.map +1 -0
- package/dist/src/labs/PaginatedTable.d.ts.map +1 -1
- package/dist/src/labs/StaticTable.d.ts.map +1 -1
- package/dist/src/labs/index.d.ts +4 -2
- package/dist/src/labs/index.d.ts.map +1 -1
- package/dist/src/labs/materialReactTableTypes.d.ts +1 -1
- package/dist/src/labs/materialReactTableTypes.d.ts.map +1 -1
- package/dist/src/theme/components.d.ts.map +1 -1
- package/dist/theme/components.js +140 -65
- package/dist/theme/components.js.map +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/Button.tsx +2 -2
- package/src/MenuButton.tsx +50 -8
- package/src/MenuContext.ts +2 -0
- package/src/MenuItem.tsx +5 -3
- package/src/SearchField.tsx +8 -0
- package/src/icons.generated/ArrowBottom.tsx +43 -0
- package/src/icons.generated/ArrowTop.tsx +43 -0
- package/src/icons.generated/index.ts +2 -0
- package/src/labs/DataFilters.tsx +601 -0
- package/src/labs/DataTable.tsx +683 -0
- package/src/labs/DataTablePagination.tsx +88 -0
- package/src/labs/PaginatedTable.tsx +35 -33
- package/src/labs/StaticTable.tsx +26 -29
- package/src/labs/index.ts +6 -3
- package/src/labs/{materialReactTableTypes.ts → materialReactTableTypes.tsx} +1 -1
- package/src/theme/components.tsx +157 -63
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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
|
+
## [1.7.0](https://github.com/okta/odyssey/compare/v1.6.21...v1.7.0) (2023-12-01)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @okta/odyssey-react-mui
|
|
9
|
+
|
|
10
|
+
## [1.6.21](https://github.com/okta/odyssey/compare/v1.6.20...v1.6.21) (2023-11-28)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @okta/odyssey-react-mui
|
|
13
|
+
|
|
6
14
|
## [1.6.20](https://github.com/okta/odyssey/compare/v1.6.19...v1.6.20) (2023-11-28)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @okta/odyssey-react-mui
|
package/dist/Button.js
CHANGED
|
@@ -56,14 +56,14 @@ const Button = _ref => {
|
|
|
56
56
|
children: label
|
|
57
57
|
}), [ariaDescribedBy, ariaLabel, ariaLabelledBy, endIcon, id, isDisabled, isFullWidth, label, onClick, size, startIcon, testId, type, variant]);
|
|
58
58
|
return _jsxs(_Fragment, {
|
|
59
|
-
children: [tooltipText && _jsx(Tooltip, {
|
|
59
|
+
children: [tooltipText && !isDisabled && _jsx(Tooltip, {
|
|
60
60
|
ariaType: "description",
|
|
61
61
|
placement: "top",
|
|
62
62
|
text: tooltipText,
|
|
63
63
|
children: _jsx(MuiPropsContext.Consumer, {
|
|
64
64
|
children: renderButton
|
|
65
65
|
})
|
|
66
|
-
}), !tooltipText && renderButton(muiProps)]
|
|
66
|
+
}), (isDisabled || !tooltipText) && renderButton(muiProps)]
|
|
67
67
|
});
|
|
68
68
|
};
|
|
69
69
|
const MemoizedButton = memo(Button);
|
package/dist/Button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","names":["memo","useCallback","MuiPropsContext","useMuiProps","Tooltip","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","buttonSizeValues","buttonTypeValues","buttonVariantValues","Button","_ref","ariaDescribedBy","ariaLabel","ariaLabelledBy","endIcon","id","isDisabled","isFullWidth","label","onClick","size","startIcon","testId","tooltipText","type","variant","muiProps","renderButton","_Button","disabled","fullWidth","children","ariaType","placement","text","Consumer","MemoizedButton","displayName"],"sources":["../src/Button.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 { Button as MuiButton } from \"@mui/material\";\nimport type { ButtonProps as MuiButtonProps } from \"@mui/material\";\nimport { memo, ReactElement, useCallback } from \"react\";\n\nimport { MuiPropsContext, useMuiProps } from \"./MuiPropsContext\";\nimport { Tooltip } from \"./Tooltip\";\nimport type { SeleniumProps } from \"./SeleniumProps\";\n\nexport const buttonSizeValues = [\"small\", \"medium\", \"large\"] as const;\nexport const buttonTypeValues = [\"button\", \"submit\", \"reset\"] as const;\nexport const buttonVariantValues = [\n \"primary\",\n \"secondary\",\n \"tertiary\",\n \"danger\",\n \"floating\",\n] as const;\n\nexport type ButtonProps = {\n /**\n * The ARIA label for the Button\n */\n ariaLabel?: string;\n /**\n * The ID of the element that labels the Button\n */\n ariaLabelledBy?: string;\n /**\n * The ID of the element that describes the Button\n */\n ariaDescribedBy?: string;\n /**\n * The icon element to display at the end of the Button\n */\n endIcon?: ReactElement;\n /**\n * The ID of the Button\n */\n id?: string;\n /**\n * Determines whether the Button is disabled\n */\n isDisabled?: boolean;\n /**\n * Determines whether the Button should take up the full available width\n */\n isFullWidth?: boolean;\n /**\n * The text content of the Button\n */\n label?: string;\n /**\n * The click event handler for the Button\n */\n onClick?: MuiButtonProps[\"onClick\"];\n /**\n * The size of the button\n */\n size?: (typeof buttonSizeValues)[number];\n /**\n * The icon element to display at the start of the Button\n */\n startIcon?: ReactElement;\n /**\n * The tooltip text for the Button if it's icon-only\n */\n tooltipText?: string;\n /**\n * The type of the HTML button element\n */\n type?: (typeof buttonTypeValues)[number];\n /**\n * The variant of the Button\n */\n variant: (typeof buttonVariantValues)[number];\n} & (\n | {\n endIcon?: ReactElement;\n label: string;\n startIcon?: ReactElement;\n }\n | {\n endIcon?: ReactElement;\n label?: \"\" | undefined;\n startIcon: ReactElement;\n }\n | {\n endIcon: ReactElement;\n label?: \"\" | undefined;\n startIcon?: ReactElement;\n }\n) &\n SeleniumProps;\n\nconst Button = ({\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n endIcon,\n id,\n isDisabled,\n isFullWidth,\n label = \"\",\n onClick,\n size = \"medium\",\n startIcon,\n testId,\n tooltipText,\n type = \"button\",\n variant,\n}: ButtonProps) => {\n const muiProps = useMuiProps();\n\n const renderButton = useCallback(\n (muiProps) => (\n <MuiButton\n {...muiProps}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-describedby={ariaDescribedBy}\n data-se={testId}\n disabled={isDisabled}\n endIcon={endIcon}\n fullWidth={isFullWidth}\n id={id}\n onClick={onClick}\n size={size}\n startIcon={startIcon}\n type={type}\n variant={variant}\n >\n {label}\n </MuiButton>\n ),\n [\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n endIcon,\n id,\n isDisabled,\n isFullWidth,\n label,\n onClick,\n size,\n startIcon,\n testId,\n type,\n variant,\n ]\n );\n\n return (\n <>\n {tooltipText && (\n <Tooltip ariaType=\"description\" placement=\"top\" text={tooltipText}>\n <MuiPropsContext.Consumer>{renderButton}</MuiPropsContext.Consumer>\n </Tooltip>\n )}\n\n {!tooltipText && renderButton(muiProps)}\n </>\n );\n};\n\nconst MemoizedButton = memo(Button);\nMemoizedButton.displayName = \"Button\";\n\nexport { MemoizedButton as Button };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA,SAASA,IAAI,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ACD,CACEP,eAAe,EACfC,SAAS,EACTC,cAAc,EACdC,OAAO,EACPC,EAAE,EACFC,UAAU,EACVC,WAAW,EACXC,KAAK,EACLC,OAAO,EACPC,IAAI,EACJC,SAAS,EACTC,MAAM,EACNE,IAAI,EACJC,OAAO,CAEX,CAAC;EAED,OACEpB,KAAA,CAAAF,SAAA;IAAA4B,QAAA,GACGR,WAAW,
|
|
1
|
+
{"version":3,"file":"Button.js","names":["memo","useCallback","MuiPropsContext","useMuiProps","Tooltip","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","buttonSizeValues","buttonTypeValues","buttonVariantValues","Button","_ref","ariaDescribedBy","ariaLabel","ariaLabelledBy","endIcon","id","isDisabled","isFullWidth","label","onClick","size","startIcon","testId","tooltipText","type","variant","muiProps","renderButton","_Button","disabled","fullWidth","children","ariaType","placement","text","Consumer","MemoizedButton","displayName"],"sources":["../src/Button.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 { Button as MuiButton } from \"@mui/material\";\nimport type { ButtonProps as MuiButtonProps } from \"@mui/material\";\nimport { memo, ReactElement, useCallback } from \"react\";\n\nimport { MuiPropsContext, useMuiProps } from \"./MuiPropsContext\";\nimport { Tooltip } from \"./Tooltip\";\nimport type { SeleniumProps } from \"./SeleniumProps\";\n\nexport const buttonSizeValues = [\"small\", \"medium\", \"large\"] as const;\nexport const buttonTypeValues = [\"button\", \"submit\", \"reset\"] as const;\nexport const buttonVariantValues = [\n \"primary\",\n \"secondary\",\n \"tertiary\",\n \"danger\",\n \"floating\",\n] as const;\n\nexport type ButtonProps = {\n /**\n * The ARIA label for the Button\n */\n ariaLabel?: string;\n /**\n * The ID of the element that labels the Button\n */\n ariaLabelledBy?: string;\n /**\n * The ID of the element that describes the Button\n */\n ariaDescribedBy?: string;\n /**\n * The icon element to display at the end of the Button\n */\n endIcon?: ReactElement;\n /**\n * The ID of the Button\n */\n id?: string;\n /**\n * Determines whether the Button is disabled\n */\n isDisabled?: boolean;\n /**\n * Determines whether the Button should take up the full available width\n */\n isFullWidth?: boolean;\n /**\n * The text content of the Button\n */\n label?: string;\n /**\n * The click event handler for the Button\n */\n onClick?: MuiButtonProps[\"onClick\"];\n /**\n * The size of the button\n */\n size?: (typeof buttonSizeValues)[number];\n /**\n * The icon element to display at the start of the Button\n */\n startIcon?: ReactElement;\n /**\n * The tooltip text for the Button if it's icon-only\n */\n tooltipText?: string;\n /**\n * The type of the HTML button element\n */\n type?: (typeof buttonTypeValues)[number];\n /**\n * The variant of the Button\n */\n variant: (typeof buttonVariantValues)[number];\n} & (\n | {\n endIcon?: ReactElement;\n label: string;\n startIcon?: ReactElement;\n }\n | {\n endIcon?: ReactElement;\n label?: \"\" | undefined;\n startIcon: ReactElement;\n }\n | {\n endIcon: ReactElement;\n label?: \"\" | undefined;\n startIcon?: ReactElement;\n }\n) &\n SeleniumProps;\n\nconst Button = ({\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n endIcon,\n id,\n isDisabled,\n isFullWidth,\n label = \"\",\n onClick,\n size = \"medium\",\n startIcon,\n testId,\n tooltipText,\n type = \"button\",\n variant,\n}: ButtonProps) => {\n const muiProps = useMuiProps();\n\n const renderButton = useCallback(\n (muiProps) => (\n <MuiButton\n {...muiProps}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-describedby={ariaDescribedBy}\n data-se={testId}\n disabled={isDisabled}\n endIcon={endIcon}\n fullWidth={isFullWidth}\n id={id}\n onClick={onClick}\n size={size}\n startIcon={startIcon}\n type={type}\n variant={variant}\n >\n {label}\n </MuiButton>\n ),\n [\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n endIcon,\n id,\n isDisabled,\n isFullWidth,\n label,\n onClick,\n size,\n startIcon,\n testId,\n type,\n variant,\n ]\n );\n\n return (\n <>\n {tooltipText && !isDisabled && (\n <Tooltip ariaType=\"description\" placement=\"top\" text={tooltipText}>\n <MuiPropsContext.Consumer>{renderButton}</MuiPropsContext.Consumer>\n </Tooltip>\n )}\n\n {(isDisabled || !tooltipText) && renderButton(muiProps)}\n </>\n );\n};\n\nconst MemoizedButton = memo(Button);\nMemoizedButton.displayName = \"Button\";\n\nexport { MemoizedButton as Button };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA,SAASA,IAAI,EAAgBC,WAAW,QAAQ,OAAO;AAAC,SAE/CC,eAAe,EAAEC,WAAW;AAAA,SAC5BC,OAAO;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAGhB,OAAO,MAAMC,gBAAgB,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAU;AACrE,OAAO,MAAMC,gBAAgB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAU;AACtE,OAAO,MAAMC,mBAAmB,GAAG,CACjC,SAAS,EACT,WAAW,EACX,UAAU,EACV,QAAQ,EACR,UAAU,CACF;AA8EV,MAAMC,MAAM,GAAGC,IAAA,IAgBI;EAAA,IAhBH;IACdC,eAAe;IACfC,SAAS;IACTC,cAAc;IACdC,OAAO;IACPC,EAAE;IACFC,UAAU;IACVC,WAAW;IACXC,KAAK,GAAG,EAAE;IACVC,OAAO;IACPC,IAAI,GAAG,QAAQ;IACfC,SAAS;IACTC,MAAM;IACNC,WAAW;IACXC,IAAI,GAAG,QAAQ;IACfC;EACW,CAAC,GAAAf,IAAA;EACZ,MAAMgB,Q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 @@ import { memo, useCallback, useMemo, useState } from "react";
|
|
|
16
16
|
import { MenuContext } from "./MenuContext.js";
|
|
17
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
18
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
|
+
export const menuAlignmentValues = ["left", "right"];
|
|
19
20
|
const MenuButton = _ref => {
|
|
20
21
|
let {
|
|
21
22
|
ariaLabel,
|
|
@@ -24,9 +25,11 @@ const MenuButton = _ref => {
|
|
|
24
25
|
buttonLabel = "",
|
|
25
26
|
buttonVariant = "secondary",
|
|
26
27
|
children,
|
|
28
|
+
shouldCloseOnSelect = true,
|
|
27
29
|
endIcon: endIconProp,
|
|
28
30
|
id: idOverride,
|
|
29
31
|
isOverflow,
|
|
32
|
+
menuAlignment = "left",
|
|
30
33
|
size,
|
|
31
34
|
testId,
|
|
32
35
|
tooltipText
|
|
@@ -45,9 +48,18 @@ const MenuButton = _ref => {
|
|
|
45
48
|
}), [uniqueId]);
|
|
46
49
|
const providerValue = useMemo(() => ({
|
|
47
50
|
closeMenu,
|
|
48
|
-
openMenu
|
|
49
|
-
|
|
51
|
+
openMenu,
|
|
52
|
+
shouldCloseOnSelect
|
|
53
|
+
}), [closeMenu, openMenu, shouldCloseOnSelect]);
|
|
50
54
|
const endIcon = endIconProp ? endIconProp : isOverflow ? _jsx(MoreIcon, {}) : _jsx(ChevronDownIcon, {});
|
|
55
|
+
const anchorOrigin = useMemo(() => ({
|
|
56
|
+
horizontal: menuAlignment,
|
|
57
|
+
vertical: "bottom"
|
|
58
|
+
}), [menuAlignment]);
|
|
59
|
+
const transformOrigin = useMemo(() => ({
|
|
60
|
+
horizontal: menuAlignment,
|
|
61
|
+
vertical: "top"
|
|
62
|
+
}), [menuAlignment]);
|
|
51
63
|
return _jsxs("div", {
|
|
52
64
|
children: [_jsx(Button, {
|
|
53
65
|
"aria-controls": isOpen ? `${uniqueId}-menu` : undefined,
|
|
@@ -65,6 +77,8 @@ const MenuButton = _ref => {
|
|
|
65
77
|
tooltipText: tooltipText,
|
|
66
78
|
variant: buttonVariant
|
|
67
79
|
}), _jsx(_Menu, {
|
|
80
|
+
anchorOrigin: anchorOrigin,
|
|
81
|
+
transformOrigin: transformOrigin,
|
|
68
82
|
anchorEl: anchorEl,
|
|
69
83
|
id: `${uniqueId}-menu`,
|
|
70
84
|
MenuListProps: menuListProps,
|
package/dist/MenuButton.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuButton.js","names":["Button","useUniqueId","ChevronDownIcon","MoreIcon","memo","useCallback","useMemo","useState","MenuContext","jsx","_jsx","jsxs","_jsxs","MenuButton","_ref","ariaLabel","ariaLabelledBy","ariaDescribedBy","buttonLabel","buttonVariant","children","endIcon","endIconProp","id","idOverride","isOverflow","size","testId","tooltipText","anchorEl","setAnchorEl","isOpen","Boolean","closeMenu","openMenu","event","currentTarget","uniqueId","menuListProps","providerValue","undefined","label","onClick","variant","_Menu","MenuListProps","onClose","open","Provider","value","MemoizedMenuButton","displayName"],"sources":["../src/MenuButton.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 Button,\n buttonSizeValues,\n buttonVariantValues,\n MenuItem,\n useUniqueId,\n} from \"./\";\nimport {
|
|
1
|
+
{"version":3,"file":"MenuButton.js","names":["Button","useUniqueId","ChevronDownIcon","MoreIcon","memo","useCallback","useMemo","useState","MenuContext","jsx","_jsx","jsxs","_jsxs","menuAlignmentValues","MenuButton","_ref","ariaLabel","ariaLabelledBy","ariaDescribedBy","buttonLabel","buttonVariant","children","shouldCloseOnSelect","endIcon","endIconProp","id","idOverride","isOverflow","menuAlignment","size","testId","tooltipText","anchorEl","setAnchorEl","isOpen","Boolean","closeMenu","openMenu","event","currentTarget","uniqueId","menuListProps","providerValue","anchorOrigin","horizontal","vertical","transformOrigin","undefined","label","onClick","variant","_Menu","MenuListProps","onClose","open","Provider","value","MemoizedMenuButton","displayName"],"sources":["../src/MenuButton.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 Button,\n buttonSizeValues,\n buttonVariantValues,\n MenuItem,\n useUniqueId,\n} from \"./\";\nimport {\n Divider,\n ListSubheader,\n Menu as MuiMenu,\n PopoverOrigin,\n} from \"@mui/material\";\nimport { ChevronDownIcon, MoreIcon } from \"./icons.generated\";\nimport { memo, type ReactElement, useCallback, useMemo, useState } from \"react\";\n\nimport { MenuContext, MenuContextType } from \"./MenuContext\";\nimport { NullElement } from \"./NullElement\";\nimport type { SeleniumProps } from \"./SeleniumProps\";\n\nexport const menuAlignmentValues = [\"left\", \"right\"] as const;\n\nexport type MenuButtonProps = {\n /**\n * The ARIA label for the Button\n */\n ariaLabel?: string;\n /**\n * The ID of the element that labels the Button\n */\n ariaLabelledBy?: string;\n /**\n * The ID of the element that describes the Button\n */\n ariaDescribedBy?: string;\n /**\n * The label on the triggering Button\n */\n buttonLabel?: string;\n /**\n * The variant of the triggering Button\n */\n buttonVariant?: (typeof buttonVariantValues)[number];\n /**\n * The <MenuItem> components within the Menu.\n */\n children:\n | ReactElement<typeof MenuItem | typeof Divider | typeof ListSubheader>\n | Array<\n | ReactElement<typeof MenuItem | typeof Divider | typeof ListSubheader>\n | NullElement\n >\n | NullElement;\n /**\n * The end Icon on the trigggering Button\n */\n endIcon?: ReactElement;\n /**\n * The id of the Button\n */\n id?: string;\n /**\n * If the MenuButton is an overflow menu or standard menu.\n */\n isOverflow?: boolean;\n /**\n * The horizontal alignment of the menu.\n */\n menuAlignment?: (typeof menuAlignmentValues)[number];\n /**\n * If true (the default), the menu will close when a child MenuItem is clicked.\n * Otherwise, it will remain open.\n */\n shouldCloseOnSelect?: boolean;\n /**\n * The size of the button\n */\n size?: (typeof buttonSizeValues)[number];\n /**\n * The tooltip text for the Button if it's icon-only\n */\n tooltipText?: string;\n} & (\n | {\n ariaLabel?: string;\n ariaLabelledBy?: string;\n buttonLabel: string;\n }\n | {\n ariaLabel: string;\n ariaLabelledBy?: string;\n buttonLabel?: undefined | \"\";\n }\n | {\n ariaLabel?: string;\n ariaLabelledBy: string;\n buttonLabel?: undefined | \"\";\n }\n) &\n SeleniumProps;\n\nconst MenuButton = ({\n ariaLabel,\n ariaLabelledBy,\n ariaDescribedBy,\n buttonLabel = \"\",\n buttonVariant = \"secondary\",\n children,\n shouldCloseOnSelect = true,\n endIcon: endIconProp,\n id: idOverride,\n isOverflow,\n menuAlignment = \"left\",\n size,\n testId,\n tooltipText,\n}: MenuButtonProps) => {\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n\n const isOpen = Boolean(anchorEl);\n\n const closeMenu = useCallback(() => {\n setAnchorEl(null);\n }, []);\n\n const openMenu = useCallback<MenuContextType[\"openMenu\"]>((event) => {\n setAnchorEl(event.currentTarget);\n }, []);\n\n const uniqueId = useUniqueId(idOverride);\n\n const menuListProps = useMemo(\n () => ({ \"aria-labelledby\": `${uniqueId}-button` }),\n [uniqueId]\n );\n\n const providerValue = useMemo<MenuContextType>(\n () => ({\n closeMenu,\n openMenu,\n shouldCloseOnSelect,\n }),\n [closeMenu, openMenu, shouldCloseOnSelect]\n );\n\n const endIcon = endIconProp ? (\n endIconProp\n ) : isOverflow ? (\n <MoreIcon />\n ) : (\n <ChevronDownIcon />\n );\n\n const anchorOrigin = useMemo(\n () =>\n ({\n horizontal: menuAlignment,\n vertical: \"bottom\",\n } as PopoverOrigin),\n [menuAlignment]\n );\n\n const transformOrigin = useMemo(\n () =>\n ({\n horizontal: menuAlignment,\n vertical: \"top\",\n } as PopoverOrigin),\n [menuAlignment]\n );\n\n return (\n <div>\n <Button\n aria-controls={isOpen ? `${uniqueId}-menu` : undefined}\n aria-expanded={isOpen ? \"true\" : undefined}\n aria-haspopup=\"true\"\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n data-se={testId}\n endIcon={endIcon}\n id={`${uniqueId}-button`}\n label={buttonLabel}\n onClick={openMenu}\n size={size}\n tooltipText={tooltipText}\n variant={buttonVariant}\n />\n\n <MuiMenu\n anchorOrigin={anchorOrigin}\n transformOrigin={transformOrigin}\n anchorEl={anchorEl}\n id={`${uniqueId}-menu`}\n MenuListProps={menuListProps}\n onClose={closeMenu}\n open={isOpen}\n >\n <MenuContext.Provider value={providerValue}>\n {children}\n </MenuContext.Provider>\n </MuiMenu>\n </div>\n );\n};\n\nconst MemoizedMenuButton = memo(MenuButton);\nMemoizedMenuButton.displayName = \"MenuButton\";\n\nexport { MemoizedMenuButton as MenuButton };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,SAaEA,MAAM,EAINC,WAAW;AAAA,SAQJC,eAAe,EAAEC,QAAQ;AAClC,SAASC,IAAI,EAAqBC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAAC,SAEvEC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAIpB,OAAO,MAAMC,mBAAmB,GAAG,CAAC,MAAM,EAAE,OAAO,CAAU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AkB,IAAI3C,UAAU"}
|
package/dist/MenuContext.js
CHANGED
package/dist/MenuContext.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuContext.js","names":["createContext","MenuContext","closeMenu","openMenu"],"sources":["../src/MenuContext.ts"],"sourcesContent":["/*!\n * Copyright (c) 2023-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, MouseEventHandler } from \"react\";\n\nexport type MenuContextType = {\n closeMenu: () => void;\n openMenu: MouseEventHandler<HTMLElement>;\n};\n\nexport const MenuContext = createContext<MenuContextType>({\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n closeMenu: () => {},\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n openMenu: () => {},\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,QAA2B,OAAO;
|
|
1
|
+
{"version":3,"file":"MenuContext.js","names":["createContext","MenuContext","closeMenu","openMenu","shouldCloseOnSelect"],"sources":["../src/MenuContext.ts"],"sourcesContent":["/*!\n * Copyright (c) 2023-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, MouseEventHandler } from \"react\";\n\nexport type MenuContextType = {\n closeMenu: () => void;\n openMenu: MouseEventHandler<HTMLElement>;\n shouldCloseOnSelect: boolean;\n};\n\nexport const MenuContext = createContext<MenuContextType>({\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n closeMenu: () => {},\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n openMenu: () => {},\n shouldCloseOnSelect: true,\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,QAA2B,OAAO;AAQxD,OAAO,MAAMC,WAAW,GAAGD,aAAa,CAAkB;EAExDE,SAAS,EAAEA,CAAA,KAAM,CAAC,CAAC;EAEnBC,QAAQ,EAAEA,CAAA,KAAM,CAAC,CAAC;EAClBC,mBAAmB,EAAE;AACvB,CAAC,CAAC"}
|
package/dist/MenuItem.js
CHANGED
|
@@ -26,12 +26,15 @@ const MenuItem = _ref => {
|
|
|
26
26
|
variant = "default"
|
|
27
27
|
} = _ref;
|
|
28
28
|
const {
|
|
29
|
-
closeMenu
|
|
29
|
+
closeMenu,
|
|
30
|
+
shouldCloseOnSelect
|
|
30
31
|
} = useContext(MenuContext);
|
|
31
32
|
const onClick = useCallback(event => {
|
|
32
33
|
onClickProp?.(event);
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
if (shouldCloseOnSelect) {
|
|
35
|
+
closeMenu();
|
|
36
|
+
}
|
|
37
|
+
}, [onClickProp, closeMenu, shouldCloseOnSelect]);
|
|
35
38
|
return _jsx(_MenuItem, {
|
|
36
39
|
autoFocus: hasInitialFocus,
|
|
37
40
|
className: variant === "destructive" ? `${menuItemClasses.root}-destructive` : undefined,
|
package/dist/MenuItem.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItem.js","names":["menuItemClasses","memo","useCallback","useContext","MenuContext","jsx","_jsx","MenuItem","_ref","children","hasInitialFocus","isSelected","isDisabled","onClick","onClickProp","testId","value","variant","closeMenu","event","_MenuItem","autoFocus","className","root","undefined","disabled","selected","MemoizedMenuItem","displayName"],"sources":["../src/MenuItem.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 MenuItem as MuiMenuItem,\n MenuItemProps as MuiMenuItemProps,\n} from \"@mui/material\";\nimport { menuItemClasses } from \"@mui/material/MenuItem\";\nimport { memo, useCallback, useContext, type ReactNode } from \"react\";\n\nimport { MenuContext } from \"./MenuContext\";\nimport type { SeleniumProps } from \"./SeleniumProps\";\n\nexport type MenuItemProps = {\n /**\n * The content of the menu item.\n */\n children: ReactNode;\n /**\n * If `true`, the menu item will receive focus automatically.\n */\n hasInitialFocus?: boolean;\n /**\n * If `true`, the menu item will be visually marked as selected.\n */\n isSelected?: boolean;\n /**\n * If `true`, the menu item will be visually marked as disabled.\n */\n isDisabled?: boolean;\n /**\n * Callback fired when the menu item is clicked.\n */\n onClick?: MuiMenuItemProps[\"onClick\"];\n /**\n * The value associated with the menu item.\n */\n value?: string;\n /**\n * The variant of the menu item.\n * - \"default\": The default variant.\n * - \"destructive\": A variant indicating a destructive action.\n */\n variant?: \"default\" | \"destructive\";\n} & SeleniumProps;\n\nconst MenuItem = ({\n children,\n hasInitialFocus,\n isSelected,\n isDisabled,\n onClick: onClickProp,\n testId,\n value,\n variant = \"default\",\n}: MenuItemProps) => {\n const { closeMenu } = useContext(MenuContext);\n\n const onClick = useCallback<NonNullable<MuiMenuItemProps[\"onClick\"]>>(\n (event) => {\n onClickProp?.(event);\n closeMenu();\n },\n [onClickProp, closeMenu]\n );\n\n return (\n <MuiMenuItem\n /* eslint-disable-next-line jsx-a11y/no-autofocus */\n autoFocus={hasInitialFocus}\n className={\n variant === \"destructive\"\n ? `${menuItemClasses.root}-destructive`\n : undefined\n }\n data-se={testId}\n disabled={isDisabled}\n onClick={onClick}\n selected={isSelected}\n value={value}\n >\n {children}\n </MuiMenuItem>\n );\n};\n\nconst MemoizedMenuItem = memo(MenuItem);\nMemoizedMenuItem.displayName = \"MenuItem\";\n\nexport { MemoizedMenuItem as MenuItem };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA,SAASA,eAAe,QAAQ,wBAAwB;AACxD,SAASC,IAAI,EAAEC,WAAW,EAAEC,UAAU,QAAwB,OAAO;AAAC,SAE7DC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAoCpB,MAAMC,QAAQ,GAAGC,IAAA,IASI;EAAA,IATH;IAChBC,QAAQ;IACRC,eAAe;IACfC,UAAU;IACVC,UAAU;IACVC,OAAO,EAAEC,WAAW;IACpBC,MAAM;IACNC,KAAK;IACLC,OAAO,GAAG;EACG,CAAC,GAAAT,IAAA;EACd,MAAM;IAAEU;
|
|
1
|
+
{"version":3,"file":"MenuItem.js","names":["menuItemClasses","memo","useCallback","useContext","MenuContext","jsx","_jsx","MenuItem","_ref","children","hasInitialFocus","isSelected","isDisabled","onClick","onClickProp","testId","value","variant","closeMenu","shouldCloseOnSelect","event","_MenuItem","autoFocus","className","root","undefined","disabled","selected","MemoizedMenuItem","displayName"],"sources":["../src/MenuItem.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 MenuItem as MuiMenuItem,\n MenuItemProps as MuiMenuItemProps,\n} from \"@mui/material\";\nimport { menuItemClasses } from \"@mui/material/MenuItem\";\nimport { memo, useCallback, useContext, type ReactNode } from \"react\";\n\nimport { MenuContext } from \"./MenuContext\";\nimport type { SeleniumProps } from \"./SeleniumProps\";\n\nexport type MenuItemProps = {\n /**\n * The content of the menu item.\n */\n children: ReactNode;\n /**\n * If `true`, the menu item will receive focus automatically.\n */\n hasInitialFocus?: boolean;\n /**\n * If `true`, the menu item will be visually marked as selected.\n */\n isSelected?: boolean;\n /**\n * If `true`, the menu item will be visually marked as disabled.\n */\n isDisabled?: boolean;\n /**\n * Callback fired when the menu item is clicked.\n */\n onClick?: MuiMenuItemProps[\"onClick\"];\n /**\n * The value associated with the menu item.\n */\n value?: string;\n /**\n * The variant of the menu item.\n * - \"default\": The default variant.\n * - \"destructive\": A variant indicating a destructive action.\n */\n variant?: \"default\" | \"destructive\";\n} & SeleniumProps;\n\nconst MenuItem = ({\n children,\n hasInitialFocus,\n isSelected,\n isDisabled,\n onClick: onClickProp,\n testId,\n value,\n variant = \"default\",\n}: MenuItemProps) => {\n const { closeMenu, shouldCloseOnSelect } = useContext(MenuContext);\n\n const onClick = useCallback<NonNullable<MuiMenuItemProps[\"onClick\"]>>(\n (event) => {\n onClickProp?.(event);\n if (shouldCloseOnSelect) {\n closeMenu();\n }\n },\n [onClickProp, closeMenu, shouldCloseOnSelect]\n );\n\n return (\n <MuiMenuItem\n /* eslint-disable-next-line jsx-a11y/no-autofocus */\n autoFocus={hasInitialFocus}\n className={\n variant === \"destructive\"\n ? `${menuItemClasses.root}-destructive`\n : undefined\n }\n data-se={testId}\n disabled={isDisabled}\n onClick={onClick}\n selected={isSelected}\n value={value}\n >\n {children}\n </MuiMenuItem>\n );\n};\n\nconst MemoizedMenuItem = memo(MenuItem);\nMemoizedMenuItem.displayName = \"MenuItem\";\n\nexport { MemoizedMenuItem as MenuItem };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA,SAASA,eAAe,QAAQ,wBAAwB;AACxD,SAASC,IAAI,EAAEC,WAAW,EAAEC,UAAU,QAAwB,OAAO;AAAC,SAE7DC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAoCpB,MAAMC,QAAQ,GAAGC,IAAA,IASI;EAAA,IATH;IAChBC,QAAQ;IACRC,eAAe;IACfC,UAAU;IACVC,UAAU;IACVC,OAAO,EAAEC,WAAW;IACpBC,MAAM;IACNC,KAAK;IACLC,OAAO,GAAG;EACG,CAAC,GAAAT,IAAA;EACd,MAAM;IAAEU,SAAS;IAAEC;EAAoB,CAAC,GAAGhB,UAAU,CAACC,WAAW,CAAC;EAElE,MAAMS,OAAO,GAAGX,WAAW,CACxBkB,KAAK,IAAK;IACTN,WAAW,GAAGM,KAAK,CAAC;IACpB,IAAID,mBAAmB,EAAE;MACvBD,SAAS,CAAC,CAAC;IACb;EACF,CAAC,EACD,CAACJ,WAAW,EAAEI,SAAS,EAAEC,mBAAmB,CAC9C,CAAC;EAED,OACEb,IAAA,CAAAe,SAAA;IAEEC,SAAS,EAAEZ,eAAgB;IAC3Ba,SAAS,EACPN,OAAO,KAAK,aAAa,GACpB,GAAEjB,eAAe,CAACwB,IAAK,cAAa,GACrCC,SACL;IACD,WAASV,MAAO;IAChBW,QAAQ,EAAEd,UAAW;IACrBC,OAAO,EAAEA,OAAQ;IACjBc,QAAQ,EAAEhB,UAAW;IACrBK,KAAK,EAAEA,KAAM;IAAAP,QAAA,EAEZA;EAAQ,CACE,CAAC;AAElB,CAAC;AAED,MAAMmB,gBAAgB,GAAG3B,IAAI,CAACM,QAAQ,CAAC;AACvCqB,gBAAgB,CAACC,WAAW,GAAG,UAAU;AAEzC,SAASD,gBAAgB,IAAIrB,QAAQ"}
|
package/dist/SearchField.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchField.js","names":["useState","useEffect","forwardRef","memo","useCallback","CloseCircleFilledIcon","SearchIcon","Field","jsx","_jsx","SearchField","_ref","ref","autoCompleteType","hasInitialFocus","id","idOverride","isDisabled","label","name","nameOverride","onChange","onChangeProp","onFocus","onBlur","onClear","onClearProp","placeholder","testId","value","controlledValue","uncontrolledValue","setUncontrolledValue","event","currentTarget","undefined","renderFieldComponent","_ref2","ariaDescribedBy","_InputBase","autoComplete","autoFocus","endAdornment","_InputAdornment","position","children","_IconButton","disabled","onClick","size","startAdornment","type","fieldType","hasVisibleLabel","isOptional","MemoizedSearchField","displayName"],"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 { useState, useEffect } from \"react\";\nimport { InputAdornment, InputBase, IconButton } from \"@mui/material\";\nimport {\n ChangeEventHandler,\n FocusEventHandler,\n forwardRef,\n InputHTMLAttributes,\n memo,\n useCallback,\n} from \"react\";\n\nimport { CloseCircleFilledIcon, SearchIcon } from \"./icons.generated\";\nimport { Field } from \"./Field\";\nimport { FieldComponentProps } from \"./FieldComponentProps\";\nimport type { SeleniumProps } from \"./SeleniumProps\";\n\nexport type SearchFieldProps = {\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 * If `true`, the component will receive focus automatically.\n */\n hasInitialFocus?: 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 clear button is pressed.\n */\n onClear?: () => void;\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} & Pick<FieldComponentProps, \"id\" | \"isDisabled\" | \"name\"> &\n SeleniumProps;\n\nconst SearchField = forwardRef<HTMLInputElement, SearchFieldProps>(\n (\n {\n autoCompleteType,\n hasInitialFocus,\n id: idOverride,\n isDisabled = false,\n label,\n name: nameOverride,\n onChange: onChangeProp,\n onFocus,\n onBlur,\n onClear: onClearProp,\n placeholder,\n testId,\n value: controlledValue,\n },\n ref\n ) => {\n const [uncontrolledValue, setUncontrolledValue] = useState(\"\");\n\n const onChange: ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement> =\n useCallback(\n (event) => {\n setUncontrolledValue(event.currentTarget.value);\n onChangeProp?.(event);\n },\n [onChangeProp]\n );\n\n const onClear = useCallback(() => {\n setUncontrolledValue(\"\");\n onClearProp?.();\n }, [onClearProp]);\n\n useEffect(() => {\n if (controlledValue !== undefined) {\n setUncontrolledValue(controlledValue);\n }\n }, [controlledValue]);\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={hasInitialFocus}\n data-se={testId}\n endAdornment={\n uncontrolledValue && (\n <InputAdornment position=\"end\">\n <IconButton\n aria-label=\"Clear\"\n disabled={isDisabled}\n onClick={onClear}\n size=\"small\"\n >\n <CloseCircleFilledIcon />\n </IconButton>\n </InputAdornment>\n )\n }\n id={id}\n name={nameOverride ?? id}\n onBlur={onBlur}\n onChange={onChange}\n onFocus={onFocus}\n placeholder={placeholder}\n ref={ref}\n startAdornment={\n <InputAdornment position=\"start\">\n <SearchIcon />\n </InputAdornment>\n }\n type=\"search\"\n value={\n controlledValue === undefined ? uncontrolledValue : controlledValue\n }\n />\n ),\n [\n autoCompleteType,\n controlledValue,\n hasInitialFocus,\n isDisabled,\n nameOverride,\n onBlur,\n onChange,\n onClear,\n onFocus,\n placeholder,\n ref,\n testId,\n uncontrolledValue,\n ]\n );\n\n return (\n <Field\n fieldType=\"single\"\n hasVisibleLabel={false}\n id={idOverride}\n isDisabled={isDisabled}\n isOptional={true}\n label={label}\n renderFieldComponent={renderFieldComponent}\n />\n );\n }\n);\n\nconst MemoizedSearchField = memo(SearchField);\nMemoizedSearchField.displayName = \"SearchField\";\n\nexport { MemoizedSearchField as SearchField };\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,EAAEC,SAAS,QAAQ,OAAO;AAE3C,SAGEC,UAAU,EAEVC,IAAI,EACJC,WAAW,QACN,OAAO;AAAC,SAENC,qBAAqB,EAAEC,UAAU;AAAA,SACjCC,KAAK;AAAA,SAAAC,GAAA,IAAAC,IAAA;
|
|
1
|
+
{"version":3,"file":"SearchField.js","names":["useState","useEffect","forwardRef","memo","useCallback","CloseCircleFilledIcon","SearchIcon","Field","jsx","_jsx","SearchField","_ref","ref","autoCompleteType","hasInitialFocus","id","idOverride","isDisabled","label","name","nameOverride","onChange","onChangeProp","onFocus","onBlur","onClear","onClearProp","placeholder","testId","value","controlledValue","uncontrolledValue","setUncontrolledValue","event","currentTarget","undefined","renderFieldComponent","_ref2","ariaDescribedBy","_InputBase","autoComplete","autoFocus","endAdornment","_InputAdornment","position","children","_IconButton","disabled","onClick","size","startAdornment","type","fieldType","hasVisibleLabel","isOptional","MemoizedSearchField","displayName"],"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 { useState, useEffect } from \"react\";\nimport { InputAdornment, InputBase, IconButton } from \"@mui/material\";\nimport {\n ChangeEventHandler,\n FocusEventHandler,\n forwardRef,\n InputHTMLAttributes,\n memo,\n useCallback,\n} from \"react\";\n\nimport { CloseCircleFilledIcon, SearchIcon } from \"./icons.generated\";\nimport { Field } from \"./Field\";\nimport { FieldComponentProps } from \"./FieldComponentProps\";\nimport type { SeleniumProps } from \"./SeleniumProps\";\n\nexport type SearchFieldProps = {\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 * If `true`, the component will receive focus automatically.\n */\n hasInitialFocus?: boolean;\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 clear button is pressed.\n */\n onClear?: () => void;\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} & Pick<FieldComponentProps, \"id\" | \"isDisabled\" | \"name\"> &\n SeleniumProps;\n\nconst SearchField = forwardRef<HTMLInputElement, SearchFieldProps>(\n (\n {\n autoCompleteType,\n hasInitialFocus,\n id: idOverride,\n isDisabled = false,\n label,\n name: nameOverride,\n onChange: onChangeProp,\n onFocus,\n onBlur,\n onClear: onClearProp,\n placeholder,\n testId,\n value: controlledValue,\n },\n ref\n ) => {\n const [uncontrolledValue, setUncontrolledValue] = useState(\"\");\n\n const onChange: ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement> =\n useCallback(\n (event) => {\n setUncontrolledValue(event.currentTarget.value);\n onChangeProp?.(event);\n },\n [onChangeProp]\n );\n\n const onClear = useCallback(() => {\n setUncontrolledValue(\"\");\n onClearProp?.();\n }, [onClearProp]);\n\n useEffect(() => {\n if (controlledValue !== undefined) {\n setUncontrolledValue(controlledValue);\n }\n }, [controlledValue]);\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={hasInitialFocus}\n data-se={testId}\n endAdornment={\n uncontrolledValue && (\n <InputAdornment position=\"end\">\n <IconButton\n aria-label=\"Clear\"\n disabled={isDisabled}\n onClick={onClear}\n size=\"small\"\n >\n <CloseCircleFilledIcon />\n </IconButton>\n </InputAdornment>\n )\n }\n id={id}\n name={nameOverride ?? id}\n onBlur={onBlur}\n onChange={onChange}\n onFocus={onFocus}\n placeholder={placeholder}\n ref={ref}\n startAdornment={\n <InputAdornment position=\"start\">\n <SearchIcon />\n </InputAdornment>\n }\n type=\"search\"\n value={\n controlledValue === undefined ? uncontrolledValue : controlledValue\n }\n />\n ),\n [\n autoCompleteType,\n controlledValue,\n hasInitialFocus,\n isDisabled,\n nameOverride,\n onBlur,\n onChange,\n onClear,\n onFocus,\n placeholder,\n ref,\n testId,\n uncontrolledValue,\n ]\n );\n\n return (\n <Field\n fieldType=\"single\"\n hasVisibleLabel={false}\n id={idOverride}\n isDisabled={isDisabled}\n isOptional={true}\n label={label}\n renderFieldComponent={renderFieldComponent}\n />\n );\n }\n);\n\nconst MemoizedSearchField = memo(SearchField);\nMemoizedSearchField.displayName = \"SearchField\";\n\nexport { MemoizedSearchField as SearchField };\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,EAAEC,SAAS,QAAQ,OAAO;AAE3C,SAGEC,UAAU,EAEVC,IAAI,EACJC,WAAW,QACN,OAAO;AAAC,SAENC,qBAAqB,EAAEC,UAAU;AAAA,SACjCC,KAAK;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAsDd,MAAMC,WAAW,GAAGR,UAAU,CAC5B,CAAAS,IAAA,EAgBEC,GAAG,KACA;EAAA,IAhBH;IACEC,gBAAgB;IAChBC,eAAe;IACfC,EAAE,EAAEC,UAAU;IACdC,UAAU,GAAG,KAAK;IAClBC,KAAK;IACLC,IAAI,EAAEC,YAAY;IAClBC,QAAQ,EAAEC,YAAY;IACtBC,OAAO;IACPC,MAAM;IACNC,OAAO,EAAEC,WAAW;IACpBC,WAAW;IACXC,MAAM;IACNC,KAAK,EAAEC;EACT,CAAC,GAAAnB,IAAA;EAGD,MAAM,CAACoB,iBAAiB,EAAEC,oBAAoB,CAAC,GAAGhC,QAAQ,CAAC,EAAE,CAAC;EAE9D,MAAMqB,QAAoE,GACxEjB,WAAW,CACR6B,KAAK,IAAK;IACTD,oBAAoB,CAACC,KAAK,CAACC,aAAa,CAACL,KAAK,CAAC;IAC/CP,YAAY,GAAGW,KA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6C,IAAI,EAAC,QAAQ;MACbtB,KAAK,EACHC,eAAe,KAAKK,SAAS,GAAGJ,iBAAiB,GAAGD;IACrD,CACF,CAAC;EAAA,CACH,EACD,CACEjB,gBAAgB,EAChBiB,eAAe,EACfhB,eAAe,EACfG,UAAU,EACVG,YAAY,EACZI,MAAM,EACNH,QAAQ,EACRI,OAAO,EACPF,OAAO,EACPI,WAAW,EACXf,GAAG,EACHgB,MAAM,EACNG,iBAAiB,CAErB,CAAC;EAED,OACEtB,IAAA,CAACF,KAAK;IACJ6C,SAAS,EAAC,QAAQ;IAClBC,eAAe,EAAE,KAAM;IACvBtC,EAAE,EAAEC,UAAW;IACfC,UAAU,EAAEA,UAAW;IACvBqC,UAAU,EAAE,IAAK;IACjBpC,KAAK,EAAEA,KAAM;IACbkB,oBAAoB,EAAEA;EAAqB,CAC5C,CAAC;AAEN,CACF,CAAC;AAED,MAAMmB,mBAAmB,GAAGpD,IAAI,CAACO,WAAW,CAAC;AAC7C6C,mBAAmB,CAACC,WAAW,GAAG,aAAa;AAE/C,SAASD,mBAAmB,IAAI7C,WAAW"}
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
*/import { forwardRef } from "react";
|
|
12
|
+
import { SvgIcon } from "../SvgIcon.js";
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
15
|
+
export const ArrowBottomIcon = forwardRef((props, ref) => {
|
|
16
|
+
return _jsx(SvgIcon, {
|
|
17
|
+
viewBox: "0 0 24 24",
|
|
18
|
+
fill: "none",
|
|
19
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
20
|
+
ref: ref,
|
|
21
|
+
...props,
|
|
22
|
+
children: _jsx(_Fragment, {
|
|
23
|
+
children: _jsx("path", {
|
|
24
|
+
fillRule: "evenodd",
|
|
25
|
+
clipRule: "evenodd",
|
|
26
|
+
d: "M18 20.0008L6 20.0008L6 22.0008L18 22.0008L18 20.0008ZM17.7071 13.7079L13.0607 18.3544C12.4749 18.9402 11.5251 18.9402 10.9393 18.3544L6.2929 13.7079L7.70711 12.2937L11 15.5866L11 5.0008L13 5.0008L13 15.5866L16.2929 12.2937L17.7071 13.7079Z",
|
|
27
|
+
fill: "currentColor"
|
|
28
|
+
})
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
ArrowBottomIcon.displayName = "ArrowBottomIcon";
|
|
33
|
+
//# sourceMappingURL=ArrowBottom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArrowBottom.js","names":["forwardRef","SvgIcon","jsx","_jsx","Fragment","_Fragment","ArrowBottomIcon","props","ref","viewBox","fill","xmlns","children","fillRule","clipRule","d","displayName"],"sources":["../../src/icons.generated/ArrowBottom.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-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\n// Code automatically generated by svgr; DO NOT EDIT.\n\nimport { forwardRef } from \"react\";\nimport { SvgIcon, type SvgIconNoChildrenProps } from \"../SvgIcon\";\n\nexport type ArrowBottomIconProps = SvgIconNoChildrenProps;\n\nexport const ArrowBottomIcon = forwardRef<SVGSVGElement, ArrowBottomIconProps>(\n (props, ref) => {\n return (\n <SvgIcon\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n ref={ref}\n {...props}\n >\n <>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M18 20.0008L6 20.0008L6 22.0008L18 22.0008L18 20.0008ZM17.7071 13.7079L13.0607 18.3544C12.4749 18.9402 11.5251 18.9402 10.9393 18.3544L6.2929 13.7079L7.70711 12.2937L11 15.5866L11 5.0008L13 5.0008L13 15.5866L16.2929 12.2937L17.7071 13.7079Z\"\n fill=\"currentColor\"\n />\n </>\n </SvgIcon>\n );\n }\n);\n\nArrowBottomIcon.displayName = \"ArrowBottomIcon\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAIA,SAASA,UAAU,QAAQ,OAAO;AAAC,SAC1BC,OAAO;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAIhB,OAAO,MAAMC,eAAe,GAAGN,UAAU,CACvC,CAACO,KAAK,EAAEC,GAAG,KAAK;EACd,OACEL,IAAA,CAACF,OAAO;IACNQ,OAAO,EAAC,WAAW;IACnBC,IAAI,EAAC,MAAM;IACXC,KAAK,EAAC,4BAA4B;IAClCH,GAAG,EAAEA,GAAI;IAAA,GACLD,KAAK;IAAAK,QAAA,EAETT,IAAA,CAAAE,SAAA;MAAAO,QAAA,EACET,IAAA;QACEU,QAAQ,EAAC,SAAS;QAClBC,QAAQ,EAAC,SAAS;QAClBC,CAAC,EAAC,kPAAkP;QACpPL,IAAI,EAAC;MAAc,CACpB;IAAC,CACF;EAAC,CACI,CAAC;AAEd,CACF,CAAC;AAEDJ,eAAe,CAACU,WAAW,GAAG,iBAAiB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
*/import { forwardRef } from "react";
|
|
12
|
+
import { SvgIcon } from "../SvgIcon.js";
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
15
|
+
export const ArrowTopIcon = forwardRef((props, ref) => {
|
|
16
|
+
return _jsx(SvgIcon, {
|
|
17
|
+
viewBox: "0 0 24 24",
|
|
18
|
+
fill: "none",
|
|
19
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
20
|
+
ref: ref,
|
|
21
|
+
...props,
|
|
22
|
+
children: _jsx(_Fragment, {
|
|
23
|
+
children: _jsx("path", {
|
|
24
|
+
fillRule: "evenodd",
|
|
25
|
+
clipRule: "evenodd",
|
|
26
|
+
d: "M6 4.00073H18V2.00073H6V4.00073ZM6.29289 10.2936L10.9393 5.64713C11.5251 5.06135 12.4749 5.06135 13.0607 5.64713L17.7071 10.2936L16.2929 11.7078L13 8.4149V19.0007H11V8.4149L7.7071 11.7078L6.29289 10.2936Z",
|
|
27
|
+
fill: "currentColor"
|
|
28
|
+
})
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
ArrowTopIcon.displayName = "ArrowTopIcon";
|
|
33
|
+
//# sourceMappingURL=ArrowTop.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArrowTop.js","names":["forwardRef","SvgIcon","jsx","_jsx","Fragment","_Fragment","ArrowTopIcon","props","ref","viewBox","fill","xmlns","children","fillRule","clipRule","d","displayName"],"sources":["../../src/icons.generated/ArrowTop.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-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\n// Code automatically generated by svgr; DO NOT EDIT.\n\nimport { forwardRef } from \"react\";\nimport { SvgIcon, type SvgIconNoChildrenProps } from \"../SvgIcon\";\n\nexport type ArrowTopIconProps = SvgIconNoChildrenProps;\n\nexport const ArrowTopIcon = forwardRef<SVGSVGElement, ArrowTopIconProps>(\n (props, ref) => {\n return (\n <SvgIcon\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n ref={ref}\n {...props}\n >\n <>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M6 4.00073H18V2.00073H6V4.00073ZM6.29289 10.2936L10.9393 5.64713C11.5251 5.06135 12.4749 5.06135 13.0607 5.64713L17.7071 10.2936L16.2929 11.7078L13 8.4149V19.0007H11V8.4149L7.7071 11.7078L6.29289 10.2936Z\"\n fill=\"currentColor\"\n />\n </>\n </SvgIcon>\n );\n }\n);\n\nArrowTopIcon.displayName = \"ArrowTopIcon\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAIA,SAASA,UAAU,QAAQ,OAAO;AAAC,SAC1BC,OAAO;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAIhB,OAAO,MAAMC,YAAY,GAAGN,UAAU,CACpC,CAACO,KAAK,EAAEC,GAAG,KAAK;EACd,OACEL,IAAA,CAACF,OAAO;IACNQ,OAAO,EAAC,WAAW;IACnBC,IAAI,EAAC,MAAM;IACXC,KAAK,EAAC,4BAA4B;IAClCH,GAAG,EAAEA,GAAI;IAAA,GACLD,KAAK;IAAAK,QAAA,EAETT,IAAA,CAAAE,SAAA;MAAAO,QAAA,EACET,IAAA;QACEU,QAAQ,EAAC,SAAS;QAClBC,QAAQ,EAAC,SAAS;QAClBC,CAAC,EAAC,8MAA8M;QAChNL,IAAI,EAAC;MAAc,CACpB;IAAC,CACF;EAAC,CACI,CAAC;AAEd,CACF,CAAC;AAEDJ,YAAY,CAACU,WAAW,GAAG,cAAc"}
|
|
@@ -12,11 +12,13 @@
|
|
|
12
12
|
export * from "./Add.js";
|
|
13
13
|
export * from "./AddCircle.js";
|
|
14
14
|
export * from "./Apps.js";
|
|
15
|
+
export * from "./ArrowBottom.js";
|
|
15
16
|
export * from "./ArrowDown.js";
|
|
16
17
|
export * from "./ArrowLeft.js";
|
|
17
18
|
export * from "./ArrowLowerLeft.js";
|
|
18
19
|
export * from "./ArrowLowerRight.js";
|
|
19
20
|
export * from "./ArrowRight.js";
|
|
21
|
+
export * from "./ArrowTop.js";
|
|
20
22
|
export * from "./ArrowUnsorted.js";
|
|
21
23
|
export * from "./ArrowUp.js";
|
|
22
24
|
export * from "./ArrowUpperLeft.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/icons.generated/index.ts"],"sourcesContent":["/*!\n * Copyright (c) 2023-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\n// Code automatically generated by svgr; DO NOT EDIT.\n\nexport * from \"./Add\";\nexport * from \"./AddCircle\";\nexport * from \"./Apps\";\nexport * from \"./ArrowDown\";\nexport * from \"./ArrowLeft\";\nexport * from \"./ArrowLowerLeft\";\nexport * from \"./ArrowLowerRight\";\nexport * from \"./ArrowRight\";\nexport * from \"./ArrowUnsorted\";\nexport * from \"./ArrowUp\";\nexport * from \"./ArrowUpperLeft\";\nexport * from \"./ArrowUpperRight\";\nexport * from \"./Bug\";\nexport * from \"./Calendar\";\nexport * from \"./Call\";\nexport * from \"./Chat\";\nexport * from \"./Check\";\nexport * from \"./CheckCircleFilled\";\nexport * from \"./ChevronDown\";\nexport * from \"./ChevronLeft\";\nexport * from \"./ChevronRight\";\nexport * from \"./ChevronUp\";\nexport * from \"./Clock\";\nexport * from \"./Close\";\nexport * from \"./CloseCircleFilled\";\nexport * from \"./CollapseLeft\";\nexport * from \"./CollapseRight\";\nexport * from \"./Copy\";\nexport * from \"./DangerDiamond\";\nexport * from \"./DangerDiamondFilled\";\nexport * from \"./Delete\";\nexport * from \"./Deny\";\nexport * from \"./Devices\";\nexport * from \"./Directory\";\nexport * from \"./Documentation\";\nexport * from \"./Download\";\nexport * from \"./DragIndicator\";\nexport * from \"./Edit\";\nexport * from \"./ExpandLeft\";\nexport * from \"./ExpandRight\";\nexport * from \"./ExternalLink\";\nexport * from \"./Filter\";\nexport * from \"./Folder\";\nexport * from \"./Globe\";\nexport * from \"./Grid\";\nexport * from \"./Group\";\nexport * from \"./Hide\";\nexport * from \"./Home\";\nexport * from \"./InformationCircle\";\nexport * from \"./InformationCircleFilled\";\nexport * from \"./Link\";\nexport * from \"./List\";\nexport * from \"./Lock\";\nexport * from \"./More\";\nexport * from \"./Notification\";\nexport * from \"./Pause\";\nexport * from \"./QuestionCircle\";\nexport * from \"./QuestionCircleFilled\";\nexport * from \"./Refresh\";\nexport * from \"./Reset\";\nexport * from \"./Resume\";\nexport * from \"./Search\";\nexport * from \"./Server\";\nexport * from \"./Settings\";\nexport * from \"./Show\";\nexport * from \"./Subtract\";\nexport * from \"./Sync\";\nexport * from \"./Unlock\";\nexport * from \"./Upload\";\nexport * from \"./User\";\nexport * from \"./Video\";\nexport * from \"./Warning\";\nexport * from \"./WarningFilled\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/icons.generated/index.ts"],"sourcesContent":["/*!\n * Copyright (c) 2023-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\n// Code automatically generated by svgr; DO NOT EDIT.\n\nexport * from \"./Add\";\nexport * from \"./AddCircle\";\nexport * from \"./Apps\";\nexport * from \"./ArrowBottom\";\nexport * from \"./ArrowDown\";\nexport * from \"./ArrowLeft\";\nexport * from \"./ArrowLowerLeft\";\nexport * from \"./ArrowLowerRight\";\nexport * from \"./ArrowRight\";\nexport * from \"./ArrowTop\";\nexport * from \"./ArrowUnsorted\";\nexport * from \"./ArrowUp\";\nexport * from \"./ArrowUpperLeft\";\nexport * from \"./ArrowUpperRight\";\nexport * from \"./Bug\";\nexport * from \"./Calendar\";\nexport * from \"./Call\";\nexport * from \"./Chat\";\nexport * from \"./Check\";\nexport * from \"./CheckCircleFilled\";\nexport * from \"./ChevronDown\";\nexport * from \"./ChevronLeft\";\nexport * from \"./ChevronRight\";\nexport * from \"./ChevronUp\";\nexport * from \"./Clock\";\nexport * from \"./Close\";\nexport * from \"./CloseCircleFilled\";\nexport * from \"./CollapseLeft\";\nexport * from \"./CollapseRight\";\nexport * from \"./Copy\";\nexport * from \"./DangerDiamond\";\nexport * from \"./DangerDiamondFilled\";\nexport * from \"./Delete\";\nexport * from \"./Deny\";\nexport * from \"./Devices\";\nexport * from \"./Directory\";\nexport * from \"./Documentation\";\nexport * from \"./Download\";\nexport * from \"./DragIndicator\";\nexport * from \"./Edit\";\nexport * from \"./ExpandLeft\";\nexport * from \"./ExpandRight\";\nexport * from \"./ExternalLink\";\nexport * from \"./Filter\";\nexport * from \"./Folder\";\nexport * from \"./Globe\";\nexport * from \"./Grid\";\nexport * from \"./Group\";\nexport * from \"./Hide\";\nexport * from \"./Home\";\nexport * from \"./InformationCircle\";\nexport * from \"./InformationCircleFilled\";\nexport * from \"./Link\";\nexport * from \"./List\";\nexport * from \"./Lock\";\nexport * from \"./More\";\nexport * from \"./Notification\";\nexport * from \"./Pause\";\nexport * from \"./QuestionCircle\";\nexport * from \"./QuestionCircleFilled\";\nexport * from \"./Refresh\";\nexport * from \"./Reset\";\nexport * from \"./Resume\";\nexport * from \"./Search\";\nexport * from \"./Server\";\nexport * from \"./Settings\";\nexport * from \"./Show\";\nexport * from \"./Subtract\";\nexport * from \"./Sync\";\nexport * from \"./Unlock\";\nexport * from \"./Upload\";\nexport * from \"./User\";\nexport * from \"./Video\";\nexport * from \"./Warning\";\nexport * from \"./WarningFilled\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA"}
|