@okta/odyssey-react-mui 1.34.0 → 1.35.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.
Files changed (34) hide show
  1. package/dist/cjs/Dialog.cjs +9 -1
  2. package/dist/cjs/Dialog.cjs.map +1 -1
  3. package/dist/cjs/Select.cjs +3 -1
  4. package/dist/cjs/Select.cjs.map +1 -1
  5. package/dist/cjs/Typography.cjs +8 -4
  6. package/dist/cjs/Typography.cjs.map +1 -1
  7. package/dist/cjs/labs/OdysseyPickers/SearchDropdown.cjs +269 -0
  8. package/dist/cjs/labs/OdysseyPickers/SearchDropdown.cjs.map +1 -0
  9. package/dist/cjs/labs/OdysseyPickers/index.cjs +9 -1
  10. package/dist/cjs/labs/OdysseyPickers/index.cjs.map +1 -1
  11. package/dist/esm/Dialog.js +9 -1
  12. package/dist/esm/Dialog.js.map +1 -1
  13. package/dist/esm/Select.js +3 -1
  14. package/dist/esm/Select.js.map +1 -1
  15. package/dist/esm/Typography.js +8 -4
  16. package/dist/esm/Typography.js.map +1 -1
  17. package/dist/esm/labs/OdysseyPickers/SearchDropdown.js +263 -0
  18. package/dist/esm/labs/OdysseyPickers/SearchDropdown.js.map +1 -0
  19. package/dist/esm/labs/OdysseyPickers/index.js +1 -0
  20. package/dist/esm/labs/OdysseyPickers/index.js.map +1 -1
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.mjs +1 -1
  23. package/dist/index.scss +1 -1
  24. package/dist/tsconfig.production.tsbuildinfo +1 -1
  25. package/dist/types/Dialog.d.ts.map +1 -1
  26. package/dist/types/Select.d.ts +1 -0
  27. package/dist/types/Select.d.ts.map +1 -1
  28. package/dist/types/Typography.d.ts +6 -2
  29. package/dist/types/Typography.d.ts.map +1 -1
  30. package/dist/types/labs/OdysseyPickers/SearchDropdown.d.ts +33 -0
  31. package/dist/types/labs/OdysseyPickers/SearchDropdown.d.ts.map +1 -0
  32. package/dist/types/labs/OdysseyPickers/index.d.ts +2 -0
  33. package/dist/types/labs/OdysseyPickers/index.d.ts.map +1 -1
  34. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"Typography.js","names":["memo","useMemo","useRef","useImperativeHandle","jsx","_jsx","typographyVariantMapping","h1","h2","h3","h4","h5","h6","body","legend","overline","subordinate","support","typographyColorValues","Typography","ariaCurrent","ariaDescribedBy","ariaLabel","ariaLabelledBy","children","color","component","componentProp","testId","translate","typographyRef","variant","localTypographyRef","focus","current","_Typography","ref","tabIndex","MemoizedTypography","displayName","Heading1","MemoizedHeading1","Heading2","MemoizedHeading2","Heading3","MemoizedHeading3","Heading4","MemoizedHeading4","Heading5","MemoizedHeading5","Heading6","MemoizedHeading6","Paragraph","MemoizedParagraph","Subordinate","MemoizedSubordinate","Support","MemoizedSupport","Legend","MemoizedLegend","Overline","MemoizedOverline"],"sources":["../../src/Typography.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\nimport {\n ElementType,\n ReactNode,\n memo,\n useMemo,\n useRef,\n useImperativeHandle,\n} from \"react\";\nimport {\n Typography as MuiTypography,\n TypographyProps as MuiTypographyProps,\n} from \"@mui/material\";\n\nimport { HtmlProps } from \"./HtmlProps.js\";\nimport { FocusHandle } from \"./inputUtils.js\";\n\nexport type TypographyVariantValue =\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | \"body\"\n | \"legend\"\n | \"overline\"\n | \"subordinate\"\n | \"support\";\n\nexport const typographyVariantMapping: Record<\n TypographyVariantValue,\n MuiTypographyProps[\"variant\"]\n> = {\n h1: \"h1\",\n h2: \"h2\",\n h3: \"h3\",\n h4: \"h4\",\n h5: \"h5\",\n h6: \"h6\",\n body: \"body1\",\n legend: \"legend\",\n overline: \"overline\",\n subordinate: \"subtitle1\",\n support: \"subtitle2\",\n} as const;\n\nexport const typographyColorValues = [\n \"primary\",\n \"textPrimary\",\n \"secondary\",\n \"textSecondary\",\n \"error\",\n] as const;\n\nexport type TypographyProps = {\n /**\n * The text content of the component.\n */\n children: ReactNode;\n /**\n * The color of the text.\n */\n color?: (typeof typographyColorValues)[number];\n /**\n * The HTML element the component should render, if different from the default.\n */\n component?: ElementType;\n /**\n * The ref forwarded to the Typography\n */\n typographyRef?: React.RefObject<FocusHandle>;\n /**\n * The variant of Typography to render.\n */\n variant?: keyof typeof typographyVariantMapping;\n} & Pick<\n HtmlProps,\n | \"ariaCurrent\"\n | \"ariaDescribedBy\"\n | \"ariaLabel\"\n | \"ariaLabelledBy\"\n | \"testId\"\n | \"translate\"\n>;\n\nconst Typography = ({\n ariaCurrent,\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component: componentProp,\n testId,\n translate,\n typographyRef,\n variant = \"body\",\n}: TypographyProps) => {\n const component = useMemo(() => {\n if (!componentProp) {\n if (\n variant === \"body\" ||\n variant === \"subordinate\" ||\n variant === \"support\" ||\n variant === \"overline\"\n ) {\n return \"p\";\n } else {\n return variant;\n }\n }\n return componentProp;\n }, [componentProp, variant]);\n\n const localTypographyRef = useRef<HTMLElement>(null);\n useImperativeHandle(typographyRef, () => {\n return {\n focus: () => {\n localTypographyRef.current?.focus();\n },\n };\n }, []);\n\n return (\n <MuiTypography\n aria-current={ariaCurrent}\n aria-describedby={ariaDescribedBy}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n data-se={testId}\n ref={localTypographyRef}\n tabIndex={-1}\n translate={translate}\n variant={typographyVariantMapping[variant]}\n />\n );\n};\n\nconst MemoizedTypography = memo(Typography);\nMemoizedTypography.displayName = \"Typography\";\n\nconst Heading1 = ({\n ariaCurrent,\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaCurrent={ariaCurrent}\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n testId={testId}\n translate={translate}\n variant=\"h1\"\n />\n);\n\nconst MemoizedHeading1 = memo(Heading1);\nMemoizedHeading1.displayName = \"Heading1\";\n\nconst Heading2 = ({\n ariaCurrent,\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaCurrent={ariaCurrent}\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n testId={testId}\n translate={translate}\n variant=\"h2\"\n />\n);\n\nconst MemoizedHeading2 = memo(Heading2);\nMemoizedHeading2.displayName = \"Heading2\";\n\nconst Heading3 = ({\n ariaCurrent,\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaCurrent={ariaCurrent}\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n testId={testId}\n translate={translate}\n variant=\"h3\"\n />\n);\n\nconst MemoizedHeading3 = memo(Heading3);\nMemoizedHeading3.displayName = \"Heading3\";\n\nconst Heading4 = ({\n ariaCurrent,\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaCurrent={ariaCurrent}\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n testId={testId}\n translate={translate}\n variant=\"h4\"\n />\n);\n\nconst MemoizedHeading4 = memo(Heading4);\nMemoizedHeading4.displayName = \"Heading4\";\n\nconst Heading5 = ({\n ariaCurrent,\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaCurrent={ariaCurrent}\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n testId={testId}\n translate={translate}\n variant=\"h5\"\n />\n);\n\nconst MemoizedHeading5 = memo(Heading5);\nMemoizedHeading5.displayName = \"Heading5\";\n\nconst Heading6 = ({\n ariaCurrent,\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaCurrent={ariaCurrent}\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n testId={testId}\n translate={translate}\n variant=\"h6\"\n />\n);\n\nconst MemoizedHeading6 = memo(Heading6);\nMemoizedHeading6.displayName = \"Heading6\";\n\nconst Paragraph = ({\n ariaCurrent,\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaCurrent={ariaCurrent}\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n testId={testId}\n translate={translate}\n variant=\"body\"\n />\n);\n\nconst MemoizedParagraph = memo(Paragraph);\nMemoizedParagraph.displayName = \"Paragraph\";\n\nconst Subordinate = ({\n ariaCurrent,\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaCurrent={ariaCurrent}\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n testId={testId}\n translate={translate}\n variant=\"subordinate\"\n />\n);\n\nconst MemoizedSubordinate = memo(Subordinate);\nMemoizedSubordinate.displayName = \"Subordinate\";\n\nconst Support = ({\n ariaCurrent,\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaCurrent={ariaCurrent}\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n testId={testId}\n translate={translate}\n variant=\"support\"\n />\n);\n\nconst MemoizedSupport = memo(Support);\nMemoizedSupport.displayName = \"Support\";\n\nconst Legend = ({\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n testId={testId}\n translate={translate}\n variant=\"legend\"\n />\n);\n\nconst MemoizedLegend = memo(Legend);\nMemoizedLegend.displayName = \"Legend\";\n\nconst Overline = ({\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n testId={testId}\n translate={translate}\n variant=\"overline\"\n />\n);\n\nconst MemoizedOverline = memo(Overline);\nMemoizedOverline.displayName = \"Overline\";\n\nexport {\n MemoizedTypography as Typography,\n MemoizedHeading1 as Heading1,\n MemoizedHeading2 as Heading2,\n MemoizedHeading3 as Heading3,\n MemoizedHeading4 as Heading4,\n MemoizedHeading5 as Heading5,\n MemoizedHeading6 as Heading6,\n MemoizedLegend as Legend,\n MemoizedOverline as Overline,\n MemoizedParagraph as Paragraph,\n MemoizedSubordinate as Subordinate,\n MemoizedSupport as Support,\n};\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAGEA,IAAI,EACJC,OAAO,EACPC,MAAM,EACNC,mBAAmB,QACd,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAsBf,OAAO,MAAMC,wBAGZ,GAAG;EACFC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,IAAI,EAAE,OAAO;EACbC,MAAM,EAAE,QAAQ;EAChBC,QAAQ,EAAE,UAAU;EACpBC,WAAW,EAAE,WAAW;EACxBC,OAAO,EAAE;AACX,CAAU;AAEV,OAAO,MAAMC,qBAAqB,GAAG,CACnC,SAAS,EACT,aAAa,EACb,WAAW,EACX,eAAe,EACf,OAAO,CACC;AAiCV,MAAMC,UAAU,GAAGA,CAAC;EAClBC,WAAW;EACXC,eAAe;EACfC,SAAS;EACTC,cAAc;EACdC,QAAQ;EACRC,KAAK;EACLC,SAAS,EAAEC,aAAa;EACxBC,MAAM;EACNC,SAAS;EACTC,aAAa;EACbC,OAAO,GAAG;AACK,CAAC,KAAK;EACrB,MAAML,SAAS,GAAGzB,OAAO,CAAC,MAAM;IAC9B,IAAI,CAAC0B,aAAa,EAAE;MAClB,IACEI,OAAO,KAAK,MAAM,IAClBA,OAAO,KAAK,aAAa,IACzBA,OAAO,KAAK,SAAS,IACrBA,OAAO,KAAK,UAAU,EACtB;QACA,OAAO,GAAG;MACZ,CAAC,MAAM;QACL,OAAOA,OAAO;MAChB;IACF;IACA,OAAOJ,aAAa;EACt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C,cAAc,CAACpB,WAAW,GAAG,QAAQ;AAErC,MAAMqB,QAAQ,GAAGA,CAAC;EAChBvC,eAAe;EACfC,SAAS;EACTC,cAAc;EACdC,QAAQ;EACRC,KAAK;EACLC,SAAS;EACTE,MAAM;EACNC;AACe,CAAC,KAChBxB,IAAA,CAACc,UAAU;EACTE,eAAe,EAAEA,eAAgB;EACjCC,SAAS,EAAEA,SAAU;EACrBC,cAAc,EAAEA,cAAe;EAC/BC,QAAQ,EAAEA,QAAS;EACnBC,KAAK,EAAEA,KAAM;EACbC,SAAS,EAAEA,SAAU;EACrBE,MAAM,EAAEA,MAAO;EACfC,SAAS,EAAEA,SAAU;EACrBE,OAAO,EAAC;AAAU,CACnB,CACF;AAED,MAAM8B,gBAAgB,GAAG7D,IAAI,CAAC4D,QAAQ,CAAC;AACvCC,gBAAgB,CAACtB,WAAW,GAAG,UAAU;AAEzC,SACED,kBAAkB,IAAInB,UAAU,EAChCsB,gBAAgB,IAAID,QAAQ,EAC5BG,gBAAgB,IAAID,QAAQ,EAC5BG,gBAAgB,IAAID,QAAQ,EAC5BG,gBAAgB,IAAID,QAAQ,EAC5BG,gBAAgB,IAAID,QAAQ,EAC5BG,gBAAgB,IAAID,QAAQ,EAC5BS,cAAc,IAAID,MAAM,EACxBG,gBAAgB,IAAID,QAAQ,EAC5BP,iBAAiB,IAAID,SAAS,EAC9BG,mBAAmB,IAAID,WAAW,EAClCG,eAAe,IAAID,OAAO","ignoreList":[]}
1
+ {"version":3,"file":"Typography.js","names":["memo","useMemo","useRef","useImperativeHandle","jsx","_jsx","typographyVariantMapping","h1","h2","h3","h4","h5","h6","body","legend","overline","subordinate","support","typographyColorValues","Typography","ariaCurrent","ariaDescribedBy","ariaLabel","ariaLabelledBy","children","color","component","componentProp","testId","translate","typographyRef","variant","isPresentational","localTypographyRef","focus","current","_Typography","ref","tabIndex","role","undefined","MemoizedTypography","displayName","Heading1","MemoizedHeading1","Heading2","MemoizedHeading2","Heading3","MemoizedHeading3","Heading4","MemoizedHeading4","Heading5","MemoizedHeading5","Heading6","MemoizedHeading6","Paragraph","MemoizedParagraph","Subordinate","MemoizedSubordinate","Support","MemoizedSupport","Legend","MemoizedLegend","Overline","MemoizedOverline"],"sources":["../../src/Typography.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\nimport {\n ElementType,\n ReactNode,\n memo,\n useMemo,\n useRef,\n useImperativeHandle,\n} from \"react\";\nimport {\n Typography as MuiTypography,\n TypographyProps as MuiTypographyProps,\n} from \"@mui/material\";\n\nimport { HtmlProps } from \"./HtmlProps.js\";\nimport { FocusHandle } from \"./inputUtils.js\";\n\nexport type TypographyVariantValue =\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | \"body\"\n | \"legend\"\n | \"overline\"\n | \"subordinate\"\n | \"support\";\n\nexport const typographyVariantMapping: Record<\n TypographyVariantValue,\n MuiTypographyProps[\"variant\"]\n> = {\n h1: \"h1\",\n h2: \"h2\",\n h3: \"h3\",\n h4: \"h4\",\n h5: \"h5\",\n h6: \"h6\",\n body: \"body1\",\n legend: \"legend\",\n overline: \"overline\",\n subordinate: \"subtitle1\",\n support: \"subtitle2\",\n} as const;\n\nexport const typographyColorValues = [\n \"primary\",\n \"textPrimary\",\n \"secondary\",\n \"textSecondary\",\n \"error\",\n] as const;\n\nexport type TypographyProps = {\n /**\n * The text content of the component.\n */\n children: ReactNode;\n /**\n * The color of the text.\n */\n color?: (typeof typographyColorValues)[number];\n /**\n * The HTML element the component should render, if different from the default.\n */\n component?: ElementType;\n /**\n * The ref forwarded to the Typography\n */\n typographyRef?: React.RefObject<FocusHandle>;\n /**\n * The variant of Typography to render.\n */\n variant?: keyof typeof typographyVariantMapping;\n /**\n * If true, the component is presentational and should be ignored by screen readers.\n */\n isPresentational?: boolean;\n} & Pick<\n HtmlProps,\n | \"ariaCurrent\"\n | \"ariaDescribedBy\"\n | \"ariaLabel\"\n | \"ariaLabelledBy\"\n | \"testId\"\n | \"translate\"\n>;\n\nconst Typography = ({\n ariaCurrent,\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component: componentProp,\n testId,\n translate,\n typographyRef,\n variant = \"body\",\n isPresentational,\n}: TypographyProps) => {\n const component = useMemo(() => {\n if (!componentProp) {\n if (\n variant === \"body\" ||\n variant === \"subordinate\" ||\n variant === \"support\" ||\n variant === \"overline\"\n ) {\n return \"p\";\n } else {\n return variant;\n }\n }\n return componentProp;\n }, [componentProp, variant]);\n\n const localTypographyRef = useRef<HTMLElement>(null);\n useImperativeHandle(typographyRef, () => {\n return {\n focus: () => {\n localTypographyRef.current?.focus();\n },\n };\n }, []);\n\n return (\n <MuiTypography\n aria-current={ariaCurrent}\n aria-describedby={ariaDescribedBy}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n data-se={testId}\n ref={localTypographyRef}\n tabIndex={-1}\n translate={translate}\n variant={typographyVariantMapping[variant]}\n role={isPresentational ? \"presentation\" : undefined}\n />\n );\n};\n\nconst MemoizedTypography = memo(Typography);\nMemoizedTypography.displayName = \"Typography\";\n\nconst Heading1 = ({\n ariaCurrent,\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n isPresentational,\n}: TypographyProps) => (\n <Typography\n ariaCurrent={ariaCurrent}\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n testId={testId}\n translate={translate}\n variant=\"h1\"\n isPresentational={isPresentational}\n />\n);\n\nconst MemoizedHeading1 = memo(Heading1);\nMemoizedHeading1.displayName = \"Heading1\";\n\nconst Heading2 = ({\n ariaCurrent,\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaCurrent={ariaCurrent}\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n testId={testId}\n translate={translate}\n variant=\"h2\"\n />\n);\n\nconst MemoizedHeading2 = memo(Heading2);\nMemoizedHeading2.displayName = \"Heading2\";\n\nconst Heading3 = ({\n ariaCurrent,\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaCurrent={ariaCurrent}\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n testId={testId}\n translate={translate}\n variant=\"h3\"\n />\n);\n\nconst MemoizedHeading3 = memo(Heading3);\nMemoizedHeading3.displayName = \"Heading3\";\n\nconst Heading4 = ({\n ariaCurrent,\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaCurrent={ariaCurrent}\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n testId={testId}\n translate={translate}\n variant=\"h4\"\n />\n);\n\nconst MemoizedHeading4 = memo(Heading4);\nMemoizedHeading4.displayName = \"Heading4\";\n\nconst Heading5 = ({\n ariaCurrent,\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaCurrent={ariaCurrent}\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n testId={testId}\n translate={translate}\n variant=\"h5\"\n />\n);\n\nconst MemoizedHeading5 = memo(Heading5);\nMemoizedHeading5.displayName = \"Heading5\";\n\nconst Heading6 = ({\n ariaCurrent,\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaCurrent={ariaCurrent}\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n testId={testId}\n translate={translate}\n variant=\"h6\"\n />\n);\n\nconst MemoizedHeading6 = memo(Heading6);\nMemoizedHeading6.displayName = \"Heading6\";\n\nconst Paragraph = ({\n ariaCurrent,\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaCurrent={ariaCurrent}\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n testId={testId}\n translate={translate}\n variant=\"body\"\n />\n);\n\nconst MemoizedParagraph = memo(Paragraph);\nMemoizedParagraph.displayName = \"Paragraph\";\n\nconst Subordinate = ({\n ariaCurrent,\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaCurrent={ariaCurrent}\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n testId={testId}\n translate={translate}\n variant=\"subordinate\"\n />\n);\n\nconst MemoizedSubordinate = memo(Subordinate);\nMemoizedSubordinate.displayName = \"Subordinate\";\n\nconst Support = ({\n ariaCurrent,\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaCurrent={ariaCurrent}\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n testId={testId}\n translate={translate}\n variant=\"support\"\n />\n);\n\nconst MemoizedSupport = memo(Support);\nMemoizedSupport.displayName = \"Support\";\n\nconst Legend = ({\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n testId={testId}\n translate={translate}\n variant=\"legend\"\n />\n);\n\nconst MemoizedLegend = memo(Legend);\nMemoizedLegend.displayName = \"Legend\";\n\nconst Overline = ({\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n children,\n color,\n component,\n testId,\n translate,\n}: TypographyProps) => (\n <Typography\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={children}\n color={color}\n component={component}\n testId={testId}\n translate={translate}\n variant=\"overline\"\n />\n);\n\nconst MemoizedOverline = memo(Overline);\nMemoizedOverline.displayName = \"Overline\";\n\nexport {\n MemoizedTypography as Typography,\n MemoizedHeading1 as Heading1,\n MemoizedHeading2 as Heading2,\n MemoizedHeading3 as Heading3,\n MemoizedHeading4 as Heading4,\n MemoizedHeading5 as Heading5,\n MemoizedHeading6 as Heading6,\n MemoizedLegend as Legend,\n MemoizedOverline as Overline,\n MemoizedParagraph as Paragraph,\n MemoizedSubordinate as Subordinate,\n MemoizedSupport as Support,\n};\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAGEA,IAAI,EACJC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M;EACNC;AACe,CAAC,KAChBxB,IAAA,CAACc,UAAU;EACTE,eAAe,EAAEA,eAAgB;EACjCC,SAAS,EAAEA,SAAU;EACrBC,cAAc,EAAEA,cAAe;EAC/BC,QAAQ,EAAEA,QAAS;EACnBC,KAAK,EAAEA,KAAM;EACbC,SAAS,EAAEA,SAAU;EACrBE,MAAM,EAAEA,MAAO;EACfC,SAAS,EAAEA,SAAU;EACrBE,OAAO,EAAC;AAAU,CACnB,CACF;AAED,MAAMiC,gBAAgB,GAAGhE,IAAI,CAAC+D,QAAQ,CAAC;AACvCC,gBAAgB,CAACtB,WAAW,GAAG,UAAU;AAEzC,SACED,kBAAkB,IAAItB,UAAU,EAChCyB,gBAAgB,IAAID,QAAQ,EAC5BG,gBAAgB,IAAID,QAAQ,EAC5BG,gBAAgB,IAAID,QAAQ,EAC5BG,gBAAgB,IAAID,QAAQ,EAC5BG,gBAAgB,IAAID,QAAQ,EAC5BG,gBAAgB,IAAID,QAAQ,EAC5BS,cAAc,IAAID,MAAM,EACxBG,gBAAgB,IAAID,QAAQ,EAC5BP,iBAAiB,IAAID,SAAS,EAC9BG,mBAAmB,IAAID,WAAW,EAClCG,eAAe,IAAID,OAAO","ignoreList":[]}
@@ -0,0 +1,263 @@
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
+
13
+ import { memo, useCallback, useMemo } from "react";
14
+ import styled from "@emotion/styled";
15
+ import { ComposablePicker } from "./ComposablePicker.js";
16
+ import { useOdysseyDesignTokens } from "../../OdysseyDesignTokensContext.js";
17
+ import { Option, OptionDescriptionComponent, OptionLabelContainer, OptionMetadataComponent } from "./Picker.js";
18
+ import { Heading6 } from "../../Typography.js";
19
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
20
+ const OptionAdornmentContainer = styled("div", {
21
+ shouldForwardProp: prop => prop !== "odysseyDesignTokens" && prop !== "adornmentSize" && prop !== "isTagContainer"
22
+ })(({
23
+ adornmentSize = "small",
24
+ isTagContainer = false,
25
+ odysseyDesignTokens,
26
+ position = "left"
27
+ }) => ({
28
+ position: "relative",
29
+ bottom: "1px",
30
+ alignSelf: "flex-start",
31
+ width: odysseyDesignTokens.Spacing5,
32
+ height: odysseyDesignTokens.Spacing5,
33
+ overflow: "hidden",
34
+ ...(position === "left" && {
35
+ marginInlineEnd: odysseyDesignTokens.Spacing3
36
+ }),
37
+ ...(position === "right" && {
38
+ marginInlineStart: odysseyDesignTokens.Spacing3
39
+ }),
40
+ svg: {
41
+ width: "100%",
42
+ height: "auto"
43
+ },
44
+ img: {
45
+ position: "absolute",
46
+ top: "50%",
47
+ left: "50%",
48
+ width: "100%",
49
+ transform: "translate(-50%, -50%)"
50
+ },
51
+ ...(adornmentSize === "large" && !isTagContainer && {
52
+ bottom: 0,
53
+ width: odysseyDesignTokens.Spacing8,
54
+ height: odysseyDesignTokens.Spacing8
55
+ }),
56
+ ...(isTagContainer && {
57
+ bottom: 0,
58
+ alignSelf: "center",
59
+ width: odysseyDesignTokens.Spacing4,
60
+ height: "auto",
61
+ maxHeight: odysseyDesignTokens.Spacing4,
62
+ marginInlineEnd: odysseyDesignTokens.Spacing2,
63
+ svg: {
64
+ display: "flex",
65
+ width: "100%",
66
+ height: "auto"
67
+ }
68
+ })
69
+ }));
70
+ const CustomOptionContainer = styled("div", {
71
+ shouldForwardProp: prop => prop !== "odysseyDesignTokens"
72
+ })(() => ({
73
+ display: "flex",
74
+ justifyContent: "space-between",
75
+ width: "100%"
76
+ }));
77
+ const CustomOptionLeftContainer = styled("div", {
78
+ shouldForwardProp: prop => prop !== "odysseyDesignTokens"
79
+ })(() => ({
80
+ display: "flex"
81
+ }));
82
+ const OptionAdornment = ({
83
+ adornment,
84
+ adornmentSize,
85
+ odysseyDesignTokens
86
+ }) => {
87
+ const isImageAdornment = typeof adornment === "string";
88
+ if (isImageAdornment) {
89
+ return _jsx(OptionAdornmentContainer, {
90
+ adornmentSize: adornmentSize,
91
+ odysseyDesignTokens: odysseyDesignTokens,
92
+ children: _jsx("img", {
93
+ src: adornment,
94
+ alt: "",
95
+ role: "presentation"
96
+ })
97
+ });
98
+ } else {
99
+ return _jsx(OptionAdornmentContainer, {
100
+ adornmentSize: adornmentSize,
101
+ odysseyDesignTokens: odysseyDesignTokens,
102
+ children: adornment
103
+ });
104
+ }
105
+ };
106
+ const Extra = ({
107
+ content,
108
+ size,
109
+ odysseyDesignTokens,
110
+ onClick
111
+ }) => {
112
+ const handleClick = useCallback(event => {
113
+ event.stopPropagation();
114
+ onClick();
115
+ }, [onClick]);
116
+ return _jsx(OptionAdornmentContainer, {
117
+ adornmentSize: size,
118
+ odysseyDesignTokens: odysseyDesignTokens,
119
+ onClick: handleClick,
120
+ children: content
121
+ });
122
+ };
123
+ const CustomOption = ({
124
+ adornmentSize,
125
+ muiProps,
126
+ odysseyDesignTokens,
127
+ option
128
+ }) => {
129
+ const {
130
+ adornment,
131
+ description,
132
+ label,
133
+ metaData,
134
+ extra,
135
+ value,
136
+ onClick,
137
+ isInteractive = true
138
+ } = option;
139
+ const handleOptionClick = useCallback(event => {
140
+ if (!isInteractive) {
141
+ event.preventDefault();
142
+ return;
143
+ }
144
+ event.stopPropagation();
145
+ onClick?.();
146
+ }, [onClick, isInteractive]);
147
+ const extendedMuiProps = useMemo(() => {
148
+ return {
149
+ ...muiProps,
150
+ onClick: isInteractive ? handleOptionClick : undefined,
151
+ "aria-disabled": !isInteractive ? "true" : undefined,
152
+ role: "option"
153
+ };
154
+ }, [muiProps, isInteractive, handleOptionClick]);
155
+ return _jsx(Option, {
156
+ hasAdornment: true,
157
+ muiProps: extendedMuiProps,
158
+ children: _jsxs(CustomOptionContainer, {
159
+ odysseyDesignTokens: odysseyDesignTokens,
160
+ children: [_jsxs(CustomOptionLeftContainer, {
161
+ odysseyDesignTokens: odysseyDesignTokens,
162
+ children: [_jsx(OptionAdornment, {
163
+ adornment: adornment,
164
+ adornmentSize: adornmentSize,
165
+ odysseyDesignTokens: odysseyDesignTokens
166
+ }), _jsxs("div", {
167
+ children: [_jsxs(OptionLabelContainer, {
168
+ odysseyDesignTokens: odysseyDesignTokens,
169
+ children: [_jsx(Heading6, {
170
+ component: "p",
171
+ children: label
172
+ }), _jsx(OptionDescriptionComponent, {
173
+ description: description,
174
+ odysseyDesignTokens: odysseyDesignTokens
175
+ })]
176
+ }), metaData && _jsx(OptionMetadataComponent, {
177
+ metaData: metaData,
178
+ odysseyDesignTokens: odysseyDesignTokens
179
+ })]
180
+ })]
181
+ }), extra && _jsx(Extra, {
182
+ content: extra.content,
183
+ size: extra.size || adornmentSize,
184
+ onClick: extra.onClick,
185
+ odysseyDesignTokens: odysseyDesignTokens
186
+ })]
187
+ })
188
+ }, value);
189
+ };
190
+ const SearchDropdown = ({
191
+ adornmentSize = "small",
192
+ ariaDescribedBy,
193
+ defaultValue,
194
+ errorMessage,
195
+ errorMessageList,
196
+ getIsOptionEqualToValue,
197
+ groupOptionsBy,
198
+ id: idOverride,
199
+ inputValue,
200
+ isCustomValueAllowed,
201
+ isDisabled,
202
+ isFullWidth = false,
203
+ isLoading,
204
+ isOptional = false,
205
+ isReadOnly,
206
+ isVirtualized: isVirtualizedProp = false,
207
+ hint,
208
+ HintLinkComponent,
209
+ label,
210
+ name: nameOverride,
211
+ onBlur,
212
+ onChange: onChangeProp,
213
+ onInputChange: onInputChangeProp,
214
+ onFocus,
215
+ options,
216
+ value,
217
+ testId,
218
+ translate
219
+ }) => {
220
+ const odysseyDesignTokens = useOdysseyDesignTokens();
221
+ const customOptionRender = useCallback((muiProps, option) => {
222
+ return _jsx(CustomOption, {
223
+ adornmentSize: adornmentSize,
224
+ muiProps: muiProps,
225
+ odysseyDesignTokens: odysseyDesignTokens,
226
+ option: option
227
+ });
228
+ }, [adornmentSize, odysseyDesignTokens]);
229
+ return _jsx(ComposablePicker, {
230
+ ariaDescribedBy: ariaDescribedBy,
231
+ defaultValue: defaultValue,
232
+ errorMessage: errorMessage,
233
+ errorMessageList: errorMessageList,
234
+ getIsOptionEqualToValue: getIsOptionEqualToValue,
235
+ groupOptionsBy: groupOptionsBy,
236
+ id: idOverride,
237
+ inputValue: inputValue,
238
+ isCustomValueAllowed: isCustomValueAllowed,
239
+ isDisabled: isDisabled,
240
+ isFullWidth: isFullWidth,
241
+ isLoading: isLoading,
242
+ isOptional: isOptional,
243
+ isReadOnly: isReadOnly,
244
+ isVirtualized: isVirtualizedProp,
245
+ hint: hint,
246
+ HintLinkComponent: HintLinkComponent,
247
+ label: label,
248
+ name: nameOverride,
249
+ onBlur: onBlur,
250
+ onChange: onChangeProp,
251
+ onInputChange: onInputChangeProp,
252
+ onFocus: onFocus,
253
+ options: options,
254
+ renderOption: customOptionRender,
255
+ value: value,
256
+ testId: testId,
257
+ translate: translate
258
+ });
259
+ };
260
+ const MemoizedSearchDropdown = memo(SearchDropdown);
261
+ MemoizedSearchDropdown.displayName = "MemoizedSearchDropdown";
262
+ export { MemoizedSearchDropdown as SearchDropdown };
263
+ //# sourceMappingURL=SearchDropdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchDropdown.js","names":["memo","useCallback","useMemo","styled","ComposablePicker","useOdysseyDesignTokens","Option","OptionDescriptionComponent","OptionLabelContainer","OptionMetadataComponent","Heading6","jsx","_jsx","jsxs","_jsxs","OptionAdornmentContainer","shouldForwardProp","prop","adornmentSize","isTagContainer","odysseyDesignTokens","position","bottom","alignSelf","width","Spacing5","height","overflow","marginInlineEnd","Spacing3","marginInlineStart","svg","img","top","left","transform","Spacing8","Spacing4","maxHeight","Spacing2","display","CustomOptionContainer","justifyContent","CustomOptionLeftContainer","OptionAdornment","adornment","isImageAdornment","children","src","alt","role","Extra","content","size","onClick","handleClick","event","stopPropagation","CustomOption","muiProps","option","description","label","metaData","extra","value","isInteractive","handleOptionClick","preventDefault","extendedMuiProps","undefined","hasAdornment","component","SearchDropdown","ariaDescribedBy","defaultValue","errorMessage","errorMessageList","getIsOptionEqualToValue","groupOptionsBy","id","idOverride","inputValue","isCustomValueAllowed","isDisabled","isFullWidth","isLoading","isOptional","isReadOnly","isVirtualized","isVirtualizedProp","hint","HintLinkComponent","name","nameOverride","onBlur","onChange","onChangeProp","onInputChange","onInputChangeProp","onFocus","options","testId","translate","customOptionRender","renderOption","MemoizedSearchDropdown","displayName"],"sources":["../../../../src/labs/OdysseyPickers/SearchDropdown.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\nimport {\n HTMLAttributes,\n memo,\n ReactElement,\n ReactNode,\n useCallback,\n useMemo,\n} from \"react\";\nimport styled from \"@emotion/styled\";\n\nimport {\n ComposablePicker,\n type AdornmentSize,\n type BasePickerProps,\n type BasePickerType,\n} from \"./ComposablePicker.js\";\nimport {\n useOdysseyDesignTokens,\n DesignTokens,\n} from \"../../OdysseyDesignTokensContext.js\";\nimport {\n type BaseOptionProps,\n type LabelDescription,\n type Metadata,\n Option,\n OptionDescriptionComponent,\n OptionLabelContainer,\n OptionMetadataComponent,\n OptionProps,\n} from \"./Picker.js\";\nimport { Heading6 } from \"../../Typography.js\";\n\ntype Adornment = ReactNode | string;\ntype ExtraType = {\n content: ReactNode | string;\n size?: AdornmentSize;\n onClick: () => void;\n};\n\ntype AdornmentLabelDescription = LabelDescription & {\n adornment: Adornment;\n extra?: ExtraType;\n onClick?: () => void;\n isInteractive?: boolean;\n};\n\nexport type CustomOptionType = AdornmentLabelDescription & Partial<Metadata>;\n\nconst OptionAdornmentContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"adornmentSize\" &&\n prop !== \"isTagContainer\",\n})<{\n adornmentSize?: AdornmentSize;\n isTagContainer?: boolean;\n odysseyDesignTokens: DesignTokens;\n position?: \"left\" | \"right\";\n}>(\n ({\n adornmentSize = \"small\",\n isTagContainer = false,\n\n odysseyDesignTokens,\n position = \"left\",\n }) => ({\n position: \"relative\",\n // push icon up by one px for better visual alignment\n bottom: \"1px\",\n alignSelf: \"flex-start\",\n width: odysseyDesignTokens.Spacing5,\n height: odysseyDesignTokens.Spacing5,\n overflow: \"hidden\",\n\n ...(position === \"left\" && {\n marginInlineEnd: odysseyDesignTokens.Spacing3,\n }),\n ...(position === \"right\" && {\n marginInlineStart: odysseyDesignTokens.Spacing3,\n }),\n\n svg: {\n width: \"100%\",\n height: \"auto\",\n },\n\n img: {\n position: \"absolute\",\n top: \"50%\",\n left: \"50%\",\n width: \"100%\",\n transform: \"translate(-50%, -50%)\",\n },\n\n ...(adornmentSize === \"large\" &&\n !isTagContainer && {\n bottom: 0,\n width: odysseyDesignTokens.Spacing8,\n height: odysseyDesignTokens.Spacing8,\n }),\n\n ...(isTagContainer && {\n bottom: 0,\n alignSelf: \"center\",\n width: odysseyDesignTokens.Spacing4,\n height: \"auto\",\n maxHeight: odysseyDesignTokens.Spacing4,\n marginInlineEnd: odysseyDesignTokens.Spacing2,\n\n svg: {\n display: \"flex\",\n width: \"100%\",\n height: \"auto\",\n },\n }),\n }),\n);\n\ntype OptionAdornmentProps = {\n adornment: Adornment;\n adornmentSize: AdornmentSize;\n odysseyDesignTokens: DesignTokens;\n};\n\ntype ExtraProps = {\n content: Adornment;\n size?: AdornmentSize;\n odysseyDesignTokens: DesignTokens;\n onClick: () => void;\n};\n\nconst CustomOptionContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{ odysseyDesignTokens: DesignTokens }>(() => ({\n display: \"flex\",\n justifyContent: \"space-between\",\n width: \"100%\",\n}));\n\nconst CustomOptionLeftContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{ odysseyDesignTokens: DesignTokens }>(() => ({\n display: \"flex\",\n}));\n\nconst OptionAdornment = ({\n adornment,\n adornmentSize,\n odysseyDesignTokens,\n}: OptionAdornmentProps) => {\n const isImageAdornment = typeof adornment === \"string\";\n\n if (isImageAdornment) {\n return (\n <OptionAdornmentContainer\n adornmentSize={adornmentSize}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n <img src={adornment} alt=\"\" role=\"presentation\" />\n </OptionAdornmentContainer>\n );\n } else {\n return (\n <OptionAdornmentContainer\n adornmentSize={adornmentSize}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n {adornment}\n </OptionAdornmentContainer>\n );\n }\n};\n\nconst Extra = ({ content, size, odysseyDesignTokens, onClick }: ExtraProps) => {\n const handleClick = useCallback(\n (event: React.MouseEvent) => {\n event.stopPropagation();\n onClick();\n },\n [onClick],\n );\n\n return (\n <OptionAdornmentContainer\n adornmentSize={size}\n odysseyDesignTokens={odysseyDesignTokens}\n onClick={handleClick}\n >\n {content}\n </OptionAdornmentContainer>\n );\n};\n\nconst CustomOption = <OptionType extends CustomOptionType>({\n adornmentSize,\n muiProps,\n odysseyDesignTokens,\n option,\n}: BaseOptionProps &\n OptionProps<OptionType> & {\n adornmentSize: AdornmentSize;\n }) => {\n const {\n adornment,\n description,\n label,\n metaData,\n extra,\n value,\n onClick,\n isInteractive = true,\n } = option;\n\n const handleOptionClick = useCallback(\n (event: React.MouseEvent) => {\n if (!isInteractive) {\n event.preventDefault();\n return;\n }\n event.stopPropagation();\n onClick?.();\n },\n [onClick, isInteractive],\n );\n\n const extendedMuiProps = useMemo(() => {\n return {\n ...muiProps,\n onClick: isInteractive ? handleOptionClick : undefined,\n \"aria-disabled\": !isInteractive ? \"true\" : undefined,\n role: \"option\",\n } as HTMLAttributes<HTMLLIElement>;\n }, [muiProps, isInteractive, handleOptionClick]);\n\n return (\n <Option hasAdornment key={value} muiProps={extendedMuiProps}>\n <CustomOptionContainer odysseyDesignTokens={odysseyDesignTokens}>\n <CustomOptionLeftContainer odysseyDesignTokens={odysseyDesignTokens}>\n <OptionAdornment\n adornment={adornment}\n adornmentSize={adornmentSize}\n odysseyDesignTokens={odysseyDesignTokens}\n />\n <div>\n <OptionLabelContainer odysseyDesignTokens={odysseyDesignTokens}>\n <Heading6 component=\"p\">{label}</Heading6>\n <OptionDescriptionComponent\n description={description}\n odysseyDesignTokens={odysseyDesignTokens}\n />\n </OptionLabelContainer>\n {metaData && (\n <OptionMetadataComponent\n metaData={metaData}\n odysseyDesignTokens={odysseyDesignTokens}\n />\n )}\n </div>\n </CustomOptionLeftContainer>\n {extra && (\n <Extra\n content={extra.content}\n size={extra.size || adornmentSize}\n onClick={extra.onClick}\n odysseyDesignTokens={odysseyDesignTokens}\n />\n )}\n </CustomOptionContainer>\n </Option>\n );\n};\n\nexport type SearchDropdownProps<\n OptionType extends CustomOptionType,\n HasMultipleChoices extends boolean | undefined,\n IsCustomValueAllowed extends boolean | undefined,\n> = BasePickerProps<OptionType, HasMultipleChoices, IsCustomValueAllowed> & {\n adornmentSize?: AdornmentSize;\n};\n\ntype PickerWithOptionAdornmentComponentType = {\n <\n OptionType extends CustomOptionType,\n HasMultipleChoices extends boolean | undefined,\n IsCustomValueAllowed extends boolean | undefined,\n >(\n props: SearchDropdownProps<\n OptionType,\n HasMultipleChoices,\n IsCustomValueAllowed\n >,\n ): ReactElement;\n <\n OptionType extends CustomOptionType,\n HasMultipleChoices extends boolean | undefined,\n IsCustomValueAllowed extends boolean | undefined,\n >(\n props: SearchDropdownProps<\n OptionType,\n HasMultipleChoices,\n IsCustomValueAllowed\n >,\n ): ReactElement;\n};\n\nconst SearchDropdown: PickerWithOptionAdornmentComponentType = <\n OptionType extends CustomOptionType,\n HasMultipleChoices extends boolean | undefined,\n IsCustomValueAllowed extends boolean | undefined,\n>({\n adornmentSize = \"small\",\n ariaDescribedBy,\n defaultValue,\n errorMessage,\n errorMessageList,\n getIsOptionEqualToValue,\n groupOptionsBy,\n id: idOverride,\n inputValue,\n isCustomValueAllowed,\n isDisabled,\n isFullWidth = false,\n isLoading,\n isOptional = false,\n isReadOnly,\n isVirtualized: isVirtualizedProp = false,\n hint,\n HintLinkComponent,\n label,\n name: nameOverride,\n onBlur,\n onChange: onChangeProp,\n onInputChange: onInputChangeProp,\n onFocus,\n options,\n value,\n testId,\n translate,\n}: SearchDropdownProps<\n OptionType,\n HasMultipleChoices,\n IsCustomValueAllowed\n>) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n\n const customOptionRender = useCallback<\n (props: HTMLAttributes<HTMLLIElement>, option: OptionType) => ReactNode\n >(\n (muiProps, option) => {\n return (\n <CustomOption\n adornmentSize={adornmentSize}\n muiProps={muiProps}\n odysseyDesignTokens={odysseyDesignTokens}\n option={option}\n />\n );\n },\n [adornmentSize, odysseyDesignTokens],\n );\n\n return (\n <ComposablePicker<OptionType, HasMultipleChoices, IsCustomValueAllowed>\n ariaDescribedBy={ariaDescribedBy}\n defaultValue={defaultValue}\n errorMessage={errorMessage}\n errorMessageList={errorMessageList}\n getIsOptionEqualToValue={getIsOptionEqualToValue}\n groupOptionsBy={groupOptionsBy}\n id={idOverride}\n inputValue={inputValue}\n isCustomValueAllowed={isCustomValueAllowed}\n isDisabled={isDisabled}\n isFullWidth={isFullWidth}\n isLoading={isLoading}\n isOptional={isOptional}\n isReadOnly={isReadOnly}\n isVirtualized={isVirtualizedProp}\n hint={hint}\n HintLinkComponent={HintLinkComponent}\n label={label}\n name={nameOverride}\n onBlur={onBlur}\n onChange={onChangeProp}\n onInputChange={onInputChangeProp}\n onFocus={onFocus}\n options={options}\n renderOption={customOptionRender}\n value={value}\n testId={testId}\n translate={translate}\n />\n );\n};\n\n// Need the `as BasePickerType` because generics don't get passed through\nconst MemoizedSearchDropdown = memo(SearchDropdown) as BasePickerType;\n\nMemoizedSearchDropdown.displayName = \"MemoizedSearchDropdown\";\n\nexport { MemoizedSearchDropdown as SearchDropdown };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAEEA,IAAI,EAGJC,WAAW,EACXC,OAAO,QACF,OAAO;AACd,OAAOC,MAAM,MAAM,iBAAiB;AAEpC,SACEC,gBAAgB,QAIX,uBAAuB;AAC9B,SACEC,sBAAsB,QAEjB,qCAAqC;AAC5C,SAIEC,MAAM,EACNC,0BAA0B,EAC1BC,oBAAoB,EACpBC,uBAAuB,QAElB,aAAa;AACpB,SAASC,QAAQ,QAAQ,qBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAkB/C,MAAMC,wBAAwB,GAAGZ,MAAM,CAAC,KAAK,EAAE;EAC7Ca,iBAAiB,EAAGC,IAAI,IACtBA,IAAI,KAAK,qBAAqB,IAC9BA,IAAI,KAAK,eAAe,IACxBA,IAAI,KAAK;AACb,CAAC,CAAC,CAMA,CAAC;EACCC,aAAa,GAAG,OAAO;EACvBC,cAAc,GAAG,KAAK;EAEtBC,mBAAmB;EACnBC,QAAQ,GAAG;AACb,CAAC,MAAM;EACLA,QAAQ,EAAE,UAAU;EAEpBC,MAAM,EAAE,KAAK;EACbC,SAAS,EAAE,YAAY;EACvBC,KAAK,EAAEJ,mBAAmB,CAACK,QAAQ;EACnCC,MAAM,EAAEN,mBAAmB,CAACK,QAAQ;EACpCE,QAAQ,EAAE,QAAQ;EAElB,IAAIN,QAAQ,KAAK,MAAM,IAAI;IACzBO,eAAe,EAAER,mBAAmB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AEA,QAAS;MACnBvC,mBAAmB,EAAEA,mBAAoB;MACzCwC,MAAM,EAAEA;IAAO,CAChB,CAAC;EAEN,CAAC,EACD,CAAC1C,aAAa,EAAEE,mBAAmB,CACrC,CAAC;EAED,OACER,IAAA,CAACR,gBAAgB;IACfsE,eAAe,EAAEA,eAAgB;IACjCC,YAAY,EAAEA,YAAa;IAC3BC,YAAY,EAAEA,YAAa;IAC3BC,gBAAgB,EAAEA,gBAAiB;IACnCC,uBAAuB,EAAEA,uBAAwB;IACjDC,cAAc,EAAEA,cAAe;IAC/BC,EAAE,EAAEC,UAAW;IACfC,UAAU,EAAEA,UAAW;IACvBC,oBAAoB,EAAEA,oBAAqB;IAC3CC,UAAU,EAAEA,UAAW;IACvBC,WAAW,EAAEA,WAAY;IACzBC,SAAS,EAAEA,SAAU;IACrBC,UAAU,EAAEA,UAAW;IACvBC,UAAU,EAAEA,UAAW;IACvBC,aAAa,EAAEC,iBAAkB;IACjCC,IAAI,EAAEA,IAAK;IACXC,iBAAiB,EAAEA,iBAAkB;IACrC9B,KAAK,EAAEA,KAAM;IACb+B,IAAI,EAAEC,YAAa;IACnBC,MAAM,EAAEA,MAAO;IACfC,QAAQ,EAAEC,YAAa;IACvBC,aAAa,EAAEC,iBAAkB;IACjCC,OAAO,EAAEA,OAAQ;IACjBC,OAAO,EAAEA,OAAQ;IACjBI,YAAY,EAAED,kBAAmB;IACjCvC,KAAK,EAAEA,KAAM;IACbqC,MAAM,EAAEA,MAAO;IACfC,SAAS,EAAEA;EAAU,CACtB,CAAC;AAEN,CAAC;AAGD,MAAMG,sBAAsB,GAAG1G,IAAI,CAACyE,cAAc,CAAmB;AAErEiC,sBAAsB,CAACC,WAAW,GAAG,wBAAwB;AAE7D,SAASD,sBAAsB,IAAIjC,cAAc","ignoreList":[]}
@@ -13,4 +13,5 @@
13
13
  export { adornmentSizeValues } from "./ComposablePicker.js";
14
14
  export * from "./Picker.js";
15
15
  export * from "./PickerWithOptionAdornment.js";
16
+ export { SearchDropdown } from "./SearchDropdown.js";
16
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["adornmentSizeValues"],"sources":["../../../../src/labs/OdysseyPickers/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\nexport { adornmentSizeValues } from \"./ComposablePicker.js\";\nexport * from \"./Picker.js\";\nexport * from \"./PickerWithOptionAdornment.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,mBAAmB,QAAQ,uBAAuB;AAC3D,cAAc,aAAa;AAC3B,cAAc,gCAAgC","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["adornmentSizeValues","SearchDropdown"],"sources":["../../../../src/labs/OdysseyPickers/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\nexport { adornmentSizeValues } from \"./ComposablePicker.js\";\nexport * from \"./Picker.js\";\nexport * from \"./PickerWithOptionAdornment.js\";\nexport { SearchDropdown } from \"./SearchDropdown.js\";\nexport type {\n SearchDropdownProps,\n CustomOptionType,\n} from \"./SearchDropdown.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,mBAAmB,QAAQ,uBAAuB;AAC3D,cAAc,aAAa;AAC3B,cAAc,gCAAgC;AAC9C,SAASC,cAAc,QAAQ,qBAAqB","ignoreList":[]}
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Mon, 17 Mar 2025 20:09:19 GMT
3
+ * Generated on Thu, 27 Mar 2025 19:35:44 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Mon, 17 Mar 2025 20:09:19 GMT
3
+ * Generated on Thu, 27 Mar 2025 19:35:44 GMT
4
4
  */
5
5
 
6
6
  export const BorderColorControl = "#8d8d8d";
package/dist/index.scss CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  /**
3
3
  * Do not edit directly
4
- * Generated on Mon, 17 Mar 2025 20:09:19 GMT
4
+ * Generated on Thu, 27 Mar 2025 19:35:44 GMT
5
5
  */
6
6
 
7
7
  $border-color-control: #8d8d8d !default;