@okta/odyssey-react-mui 1.14.8 → 1.15.9
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 +54 -0
- package/README.md +4 -0
- package/dist/Autocomplete.js +84 -2
- package/dist/Autocomplete.js.map +1 -1
- package/dist/Breadcrumbs.js +10 -1
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/Button.js +2 -2
- package/dist/Button.js.map +1 -1
- package/dist/Callout.js.map +1 -1
- package/dist/Checkbox.js +8 -4
- package/dist/Checkbox.js.map +1 -1
- package/dist/CheckboxGroup.js.map +1 -1
- package/dist/DataTable/DataTable.js +39 -10
- package/dist/DataTable/DataTable.js.map +1 -1
- package/dist/DataTable/index.js.map +1 -1
- package/dist/MenuButton.js.map +1 -1
- package/dist/RadioGroup.js.map +1 -1
- package/dist/Select.js +34 -45
- package/dist/Select.js.map +1 -1
- package/dist/Tabs.js +21 -0
- package/dist/Tabs.js.map +1 -1
- package/dist/Tile.js +14 -18
- package/dist/Tile.js.map +1 -1
- package/dist/labs/DataFilters.js +98 -97
- package/dist/labs/DataFilters.js.map +1 -1
- package/dist/labs/index.js +0 -1
- package/dist/labs/index.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_cs.js +31 -3
- package/dist/properties/ts/odyssey-react-mui_cs.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_da.js +31 -3
- package/dist/properties/ts/odyssey-react-mui_da.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_de.js +31 -3
- package/dist/properties/ts/odyssey-react-mui_de.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_el.js +31 -3
- package/dist/properties/ts/odyssey-react-mui_el.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_es.js +31 -3
- package/dist/properties/ts/odyssey-react-mui_es.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_fi.js +31 -3
- package/dist/properties/ts/odyssey-react-mui_fi.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_fr.js +31 -3
- package/dist/properties/ts/odyssey-react-mui_fr.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_hu.js +31 -3
- package/dist/properties/ts/odyssey-react-mui_hu.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_id.js +31 -3
- package/dist/properties/ts/odyssey-react-mui_id.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_it.js +31 -3
- package/dist/properties/ts/odyssey-react-mui_it.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ja.js +31 -3
- package/dist/properties/ts/odyssey-react-mui_ja.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ko.js +31 -3
- package/dist/properties/ts/odyssey-react-mui_ko.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ms.js +31 -3
- package/dist/properties/ts/odyssey-react-mui_ms.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_nb.js +31 -3
- package/dist/properties/ts/odyssey-react-mui_nb.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_nl_NL.js +31 -3
- package/dist/properties/ts/odyssey-react-mui_nl_NL.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ok_PL.js +34 -3
- package/dist/properties/ts/odyssey-react-mui_ok_PL.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ok_SK.js +34 -3
- package/dist/properties/ts/odyssey-react-mui_ok_SK.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_pl.js +31 -3
- package/dist/properties/ts/odyssey-react-mui_pl.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_pt_BR.js +31 -3
- package/dist/properties/ts/odyssey-react-mui_pt_BR.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ro.js +31 -3
- package/dist/properties/ts/odyssey-react-mui_ro.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ru.js +31 -3
- package/dist/properties/ts/odyssey-react-mui_ru.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_sv.js +31 -3
- package/dist/properties/ts/odyssey-react-mui_sv.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_th.js +31 -3
- package/dist/properties/ts/odyssey-react-mui_th.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_tr.js +31 -3
- package/dist/properties/ts/odyssey-react-mui_tr.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_uk.js +31 -3
- package/dist/properties/ts/odyssey-react-mui_uk.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_vi.js +31 -3
- package/dist/properties/ts/odyssey-react-mui_vi.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_zh_CN.js +31 -3
- package/dist/properties/ts/odyssey-react-mui_zh_CN.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_zh_TW.js +31 -3
- package/dist/properties/ts/odyssey-react-mui_zh_TW.js.map +1 -1
- package/dist/src/Autocomplete.d.ts +7 -1
- package/dist/src/Autocomplete.d.ts.map +1 -1
- package/dist/src/Breadcrumbs.d.ts.map +1 -1
- package/dist/src/Button.d.ts +31 -15
- package/dist/src/Button.d.ts.map +1 -1
- package/dist/src/Callout.d.ts +1 -1
- package/dist/src/Checkbox.d.ts.map +1 -1
- package/dist/src/CheckboxGroup.d.ts +2 -3
- package/dist/src/CheckboxGroup.d.ts.map +1 -1
- package/dist/src/DataTable/DataTable.d.ts +13 -6
- package/dist/src/DataTable/DataTable.d.ts.map +1 -1
- package/dist/src/DataTable/index.d.ts +2 -2
- package/dist/src/DataTable/index.d.ts.map +1 -1
- package/dist/src/MenuButton.d.ts +3 -4
- package/dist/src/MenuButton.d.ts.map +1 -1
- package/dist/src/RadioGroup.d.ts +3 -3
- package/dist/src/RadioGroup.d.ts.map +1 -1
- package/dist/src/Select.d.ts.map +1 -1
- package/dist/src/Tabs.d.ts.map +1 -1
- package/dist/src/Tile.d.ts.map +1 -1
- package/dist/src/labs/DataFilters.d.ts +9 -1
- package/dist/src/labs/DataFilters.d.ts.map +1 -1
- package/dist/src/labs/index.d.ts +0 -1
- package/dist/src/labs/index.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_cs.d.ts +30 -2
- package/dist/src/properties/ts/odyssey-react-mui_cs.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_da.d.ts +30 -2
- package/dist/src/properties/ts/odyssey-react-mui_da.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_de.d.ts +30 -2
- package/dist/src/properties/ts/odyssey-react-mui_de.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_el.d.ts +30 -2
- package/dist/src/properties/ts/odyssey-react-mui_el.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_es.d.ts +30 -2
- package/dist/src/properties/ts/odyssey-react-mui_es.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_fi.d.ts +30 -2
- package/dist/src/properties/ts/odyssey-react-mui_fi.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_fr.d.ts +30 -2
- package/dist/src/properties/ts/odyssey-react-mui_fr.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_hu.d.ts +30 -2
- package/dist/src/properties/ts/odyssey-react-mui_hu.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_id.d.ts +30 -2
- package/dist/src/properties/ts/odyssey-react-mui_id.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_it.d.ts +30 -2
- package/dist/src/properties/ts/odyssey-react-mui_it.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ja.d.ts +30 -2
- package/dist/src/properties/ts/odyssey-react-mui_ja.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ko.d.ts +30 -2
- package/dist/src/properties/ts/odyssey-react-mui_ko.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ms.d.ts +30 -2
- package/dist/src/properties/ts/odyssey-react-mui_ms.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_nb.d.ts +30 -2
- package/dist/src/properties/ts/odyssey-react-mui_nb.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_nl_NL.d.ts +30 -2
- package/dist/src/properties/ts/odyssey-react-mui_nl_NL.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ok_PL.d.ts +33 -2
- package/dist/src/properties/ts/odyssey-react-mui_ok_PL.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ok_SK.d.ts +33 -2
- package/dist/src/properties/ts/odyssey-react-mui_ok_SK.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_pl.d.ts +30 -2
- package/dist/src/properties/ts/odyssey-react-mui_pl.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_pt_BR.d.ts +30 -2
- package/dist/src/properties/ts/odyssey-react-mui_pt_BR.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ro.d.ts +30 -2
- package/dist/src/properties/ts/odyssey-react-mui_ro.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ru.d.ts +30 -2
- package/dist/src/properties/ts/odyssey-react-mui_ru.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_sv.d.ts +30 -2
- package/dist/src/properties/ts/odyssey-react-mui_sv.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_th.d.ts +30 -2
- package/dist/src/properties/ts/odyssey-react-mui_th.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_tr.d.ts +30 -2
- package/dist/src/properties/ts/odyssey-react-mui_tr.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_uk.d.ts +30 -2
- package/dist/src/properties/ts/odyssey-react-mui_uk.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_vi.d.ts +30 -2
- package/dist/src/properties/ts/odyssey-react-mui_vi.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_zh_CN.d.ts +30 -2
- package/dist/src/properties/ts/odyssey-react-mui_zh_CN.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_zh_TW.d.ts +30 -2
- package/dist/src/properties/ts/odyssey-react-mui_zh_TW.d.ts.map +1 -1
- package/dist/src/theme/components.d.ts.map +1 -1
- package/dist/theme/components.js +25 -8
- package/dist/theme/components.js.map +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/package.json +9 -7
- package/src/Autocomplete.tsx +124 -1
- package/src/Breadcrumbs.tsx +9 -1
- package/src/Button.tsx +32 -16
- package/src/Callout.tsx +1 -1
- package/src/Checkbox.tsx +4 -3
- package/src/CheckboxGroup.tsx +2 -5
- package/src/DataTable/DataTable.tsx +106 -26
- package/src/DataTable/index.tsx +1 -1
- package/src/MenuButton.tsx +11 -21
- package/src/RadioGroup.tsx +3 -3
- package/src/Select.tsx +84 -91
- package/src/Tabs.tsx +40 -1
- package/src/Tile.tsx +12 -14
- package/src/labs/DataFilters.tsx +211 -177
- package/src/labs/index.ts +0 -1
- package/src/properties/translations/odyssey-react-mui_cs.properties +36 -3
- package/src/properties/translations/odyssey-react-mui_da.properties +36 -3
- package/src/properties/translations/odyssey-react-mui_de.properties +36 -3
- package/src/properties/translations/odyssey-react-mui_el.properties +36 -3
- package/src/properties/translations/odyssey-react-mui_es.properties +36 -3
- package/src/properties/translations/odyssey-react-mui_fi.properties +36 -3
- package/src/properties/translations/odyssey-react-mui_fr.properties +36 -3
- package/src/properties/translations/odyssey-react-mui_hu.properties +36 -3
- package/src/properties/translations/odyssey-react-mui_id.properties +36 -3
- package/src/properties/translations/odyssey-react-mui_it.properties +36 -3
- package/src/properties/translations/odyssey-react-mui_ja.properties +36 -3
- package/src/properties/translations/odyssey-react-mui_ko.properties +36 -3
- package/src/properties/translations/odyssey-react-mui_ms.properties +36 -3
- package/src/properties/translations/odyssey-react-mui_nb.properties +36 -3
- package/src/properties/translations/odyssey-react-mui_nl_NL.properties +36 -3
- package/src/properties/translations/odyssey-react-mui_ok_PL.properties +33 -2
- package/src/properties/translations/odyssey-react-mui_ok_SK.properties +33 -2
- package/src/properties/translations/odyssey-react-mui_pl.properties +36 -3
- package/src/properties/translations/odyssey-react-mui_pt_BR.properties +36 -3
- package/src/properties/translations/odyssey-react-mui_ro.properties +36 -3
- package/src/properties/translations/odyssey-react-mui_ru.properties +36 -3
- package/src/properties/translations/odyssey-react-mui_sv.properties +36 -3
- package/src/properties/translations/odyssey-react-mui_th.properties +36 -3
- package/src/properties/translations/odyssey-react-mui_tr.properties +36 -3
- package/src/properties/translations/odyssey-react-mui_uk.properties +36 -3
- package/src/properties/translations/odyssey-react-mui_vi.properties +36 -3
- package/src/properties/translations/odyssey-react-mui_zh_CN.properties +36 -3
- package/src/properties/translations/odyssey-react-mui_zh_TW.properties +36 -3
- package/src/properties/ts/odyssey-react-mui_cs.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_da.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_de.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_el.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_es.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_fi.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_fr.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_hu.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_id.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_it.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ja.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ko.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ms.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_nb.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_nl_NL.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ok_PL.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ok_SK.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_pl.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_pt_BR.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ro.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ru.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_sv.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_th.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_tr.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_uk.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_vi.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_zh_CN.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_zh_TW.ts +1 -1
- package/src/theme/components.tsx +28 -7
- package/dist/labs/VirtualizedAutocomplete.js +0 -134
- package/dist/labs/VirtualizedAutocomplete.js.map +0 -1
- package/dist/src/labs/VirtualizedAutocomplete.d.ts +0 -90
- package/dist/src/labs/VirtualizedAutocomplete.d.ts.map +0 -1
- package/src/labs/VirtualizedAutocomplete.tsx +0 -365
|
@@ -1 +1 @@
|
|
|
1
|
-
export const translation = {"breadcrumbs.home.text":"首頁","breadcrumbs.label.text":"軌跡","close.text":"關閉","fielderror.screenreader.text":"錯誤","fieldlabel.optional.text":"選擇性","fieldlabel.required.text":"必要","
|
|
1
|
+
export const translation = {"breadcrumbs.home.text":"首頁","breadcrumbs.label.text":"軌跡","close.text":"關閉","fielderror.screenreader.text":"錯誤","fieldlabel.optional.text":"選擇性","fieldlabel.required.text":"必要","filters.clear.label":"清除篩選條件","filters.filter.any":"任何","filters.filter.clear":"清除篩選條件","filters.filters.arialabel":"篩選條件","filters.menuitem.any":"任何 {{label}}","filters.menuitem.selected":"已選取 {{selected}}","filters.search.label":"搜尋","fileupload.button.text":"新增檔案","fileupload.prompt.text":"將檔案拖放到此處或按一下以新增檔案","fileupload.removefile.text":"移除檔案","passwordfield.icon.label.hide":"隱藏密碼","passwordfield.icon.label.show":"顯示密碼","severity.error":"錯誤","severity.info":"資訊","severity.success":"成功","severity.warning":"警告","switch.active":"作用中","switch.inactive":"非作用中","table.actions":"動作","table.columnvisibility.arialabel":"顯示/隱藏欄","table.density.arialabel":"表格密度","table.draghandle.arialabel":"拖曳列以重新排序。或者按下空白鍵或 Enter 鍵以開始和停止重新排序,按下 Esc 鍵可取消。","table.draghandle.tooltip":"拖曳列或按下空白鍵/Enter 鍵即可開始和停止重新排序","table.error":"載入資料時發生錯誤。","table.fetchedrows.text":"已擷取 {{totalRows}} 列","table.fetchedrows.text_plural":"已擷取總共 {{totalRows}} 列","table.moreactions.arialabel":"更多動作","table.noresults.heading":"沒有結果。","table.noresults.text":"請嘗試不同的查詢。","table.pagination.loadmore":"顯示更多","table.pagination.next":"下一頁","table.pagination.previous":"上一頁","table.pagination.page":"頁面","table.pagination.rowsperpage":"每頁列數","table.pagination.rowswithtotal":"第 {{firstRow}}-{{lastRow}} 列,總共 {{totalRows}} 列","table.pagination.rowswithouttotal":"第 {{firstRow}}-{{lastRow}} 列","table.reorder.backward":"往後傳送","table.reorder.forward":"往前帶","table.reorder.toback":"向後傳送","table.reorder.tofront":"向前帶","table.rows.text":"{{totalRows}} 列","table.rows.text_plural":"{{totalRows}} 列"};
|
package/src/theme/components.tsx
CHANGED
|
@@ -388,6 +388,7 @@ export const components = ({
|
|
|
388
388
|
alignItems: "center",
|
|
389
389
|
whiteSpace: "nowrap",
|
|
390
390
|
color: odysseyTokens.TypographyColorSubordinate,
|
|
391
|
+
transform: "none",
|
|
391
392
|
|
|
392
393
|
...(ownerState.disabled === true && {
|
|
393
394
|
display: "none",
|
|
@@ -432,10 +433,20 @@ export const components = ({
|
|
|
432
433
|
},
|
|
433
434
|
},
|
|
434
435
|
},
|
|
436
|
+
"& > ul": {
|
|
437
|
+
position: "relative",
|
|
438
|
+
paddingInlineStart: 0,
|
|
439
|
+
marginBlockStart: 0,
|
|
440
|
+
marginBlockEnd: 0,
|
|
441
|
+
},
|
|
435
442
|
},
|
|
436
443
|
loading: {
|
|
437
444
|
paddingBlock: odysseyTokens.Spacing3,
|
|
438
445
|
paddingInline: odysseyTokens.Spacing4,
|
|
446
|
+
borderWidth: odysseyTokens.BorderWidthMain,
|
|
447
|
+
borderStyle: odysseyTokens.BorderStyleMain,
|
|
448
|
+
borderColor: odysseyTokens.HueNeutral200,
|
|
449
|
+
borderRadius: odysseyTokens.BorderRadiusMain,
|
|
439
450
|
},
|
|
440
451
|
popupIndicator: {
|
|
441
452
|
padding: odysseyTokens.Spacing1,
|
|
@@ -444,7 +455,18 @@ export const components = ({
|
|
|
444
455
|
popper: {
|
|
445
456
|
background: "transparent",
|
|
446
457
|
paddingBlockStart: odysseyTokens.Spacing1,
|
|
458
|
+
height: "100%",
|
|
447
459
|
},
|
|
460
|
+
paper: ({ ownerState }) => ({
|
|
461
|
+
/**
|
|
462
|
+
* ListboxComponent is used when `isVirtualized` prop is true.
|
|
463
|
+
* This style is needed to render the virtualized window. It renders out a parent div
|
|
464
|
+
* that needs a height to be set, otherwise the height is 0 and nothing appears.
|
|
465
|
+
*/
|
|
466
|
+
...(ownerState.ListboxComponent !== undefined && {
|
|
467
|
+
height: "100%",
|
|
468
|
+
}),
|
|
469
|
+
}),
|
|
448
470
|
inputRoot: ({ ownerState }) => ({
|
|
449
471
|
...(ownerState.readOnly === true && {
|
|
450
472
|
backgroundColor: odysseyTokens.HueNeutral50,
|
|
@@ -1613,9 +1635,6 @@ export const components = ({
|
|
|
1613
1635
|
[`:has(> .${radioClasses.root})`]: {
|
|
1614
1636
|
alignItems: "flex-start",
|
|
1615
1637
|
},
|
|
1616
|
-
[`& .${checkboxClasses.root}`]: {
|
|
1617
|
-
marginBlockStart: 0,
|
|
1618
|
-
},
|
|
1619
1638
|
[`&:hover .${radioClasses.root}, &:hover .${checkboxClasses.root}`]: {
|
|
1620
1639
|
color: odysseyTokens.TypographyColorBody,
|
|
1621
1640
|
},
|
|
@@ -1828,9 +1847,9 @@ export const components = ({
|
|
|
1828
1847
|
},
|
|
1829
1848
|
}),
|
|
1830
1849
|
input: {
|
|
1831
|
-
|
|
1832
|
-
height
|
|
1833
|
-
paddingBlock: odysseyTokens.Spacing3
|
|
1850
|
+
height: "auto",
|
|
1851
|
+
// We're subtracting a pixel so the total height, including borders, is 40px
|
|
1852
|
+
paddingBlock: `calc(${odysseyTokens.Spacing3} - ${odysseyTokens.BorderWidthMain})`,
|
|
1834
1853
|
paddingInline: odysseyTokens.Spacing3,
|
|
1835
1854
|
boxShadow: "none",
|
|
1836
1855
|
|
|
@@ -2275,7 +2294,9 @@ export const components = ({
|
|
|
2275
2294
|
},
|
|
2276
2295
|
styleOverrides: {
|
|
2277
2296
|
select: {
|
|
2278
|
-
|
|
2297
|
+
height: "auto",
|
|
2298
|
+
// We're subtracting a pixel so the total height, including borders, is 40px
|
|
2299
|
+
paddingBlock: `calc(${odysseyTokens.Spacing3} - ${odysseyTokens.BorderWidthMain})`,
|
|
2279
2300
|
paddingInline: odysseyTokens.Spacing3,
|
|
2280
2301
|
minHeight: 0,
|
|
2281
2302
|
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import _Autocomplete from "@mui/material/Autocomplete";
|
|
2
|
-
import _InputBase from "@mui/material/InputBase";
|
|
3
|
-
/*!
|
|
4
|
-
* Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
5
|
-
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
6
|
-
*
|
|
7
|
-
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
8
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
10
|
-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
-
*
|
|
12
|
-
* See the License for the specific language governing permissions and limitations under the License.
|
|
13
|
-
*/
|
|
14
|
-
import { memo, useCallback, useMemo, useRef } from "react";
|
|
15
|
-
import { Field } from "../Field.js";
|
|
16
|
-
import { ComponentControlledState, getControlState, useInputValues } from "../inputUtils.js";
|
|
17
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
-
const VirtualizedAutocomplete = ({
|
|
19
|
-
ariaDescribedBy,
|
|
20
|
-
defaultValue,
|
|
21
|
-
errorMessage,
|
|
22
|
-
errorMessageList,
|
|
23
|
-
hasMultipleChoices,
|
|
24
|
-
id: idOverride,
|
|
25
|
-
inputValue,
|
|
26
|
-
isCustomValueAllowed,
|
|
27
|
-
isDisabled,
|
|
28
|
-
isLoading,
|
|
29
|
-
isOptional = false,
|
|
30
|
-
isReadOnly,
|
|
31
|
-
hint,
|
|
32
|
-
label,
|
|
33
|
-
ListboxComponent,
|
|
34
|
-
name: nameOverride,
|
|
35
|
-
onBlur,
|
|
36
|
-
onChange: onChangeProp,
|
|
37
|
-
onInputChange: onInputChangeProp,
|
|
38
|
-
onFocus,
|
|
39
|
-
options,
|
|
40
|
-
value,
|
|
41
|
-
getIsOptionEqualToValue,
|
|
42
|
-
testId,
|
|
43
|
-
translate
|
|
44
|
-
}) => {
|
|
45
|
-
const controlledStateRef = useRef(getControlState({
|
|
46
|
-
controlledValue: value,
|
|
47
|
-
uncontrolledValue: defaultValue
|
|
48
|
-
}));
|
|
49
|
-
const defaultValueProp = useMemo(() => {
|
|
50
|
-
if (hasMultipleChoices) {
|
|
51
|
-
return defaultValue === undefined ? [] : defaultValue;
|
|
52
|
-
}
|
|
53
|
-
return defaultValue ?? undefined;
|
|
54
|
-
}, [defaultValue, hasMultipleChoices]);
|
|
55
|
-
const valueProps = useInputValues({
|
|
56
|
-
defaultValue: defaultValueProp,
|
|
57
|
-
value: value,
|
|
58
|
-
controlState: controlledStateRef.current
|
|
59
|
-
});
|
|
60
|
-
const inputValueProp = useMemo(() => {
|
|
61
|
-
if (controlledStateRef.current === ComponentControlledState.CONTROLLED) {
|
|
62
|
-
return {
|
|
63
|
-
inputValue
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
return undefined;
|
|
67
|
-
}, [inputValue]);
|
|
68
|
-
const renderInput = useCallback(({
|
|
69
|
-
InputLabelProps,
|
|
70
|
-
InputProps,
|
|
71
|
-
...params
|
|
72
|
-
}) => _jsx(Field, {
|
|
73
|
-
ariaDescribedBy: ariaDescribedBy,
|
|
74
|
-
errorMessage: errorMessage,
|
|
75
|
-
errorMessageList: errorMessageList,
|
|
76
|
-
fieldType: "single",
|
|
77
|
-
hasVisibleLabel: true,
|
|
78
|
-
id: InputLabelProps.htmlFor,
|
|
79
|
-
hint: hint,
|
|
80
|
-
label: label,
|
|
81
|
-
isOptional: isOptional,
|
|
82
|
-
renderFieldComponent: ({
|
|
83
|
-
ariaDescribedBy,
|
|
84
|
-
id,
|
|
85
|
-
errorMessageElementId,
|
|
86
|
-
labelElementId
|
|
87
|
-
}) => _jsx(_InputBase, {
|
|
88
|
-
...params,
|
|
89
|
-
...InputProps,
|
|
90
|
-
inputProps: {
|
|
91
|
-
...params.inputProps,
|
|
92
|
-
"aria-errormessage": errorMessageElementId,
|
|
93
|
-
"aria-labelledby": labelElementId,
|
|
94
|
-
"data-se": testId
|
|
95
|
-
},
|
|
96
|
-
"aria-describedby": ariaDescribedBy,
|
|
97
|
-
id: id,
|
|
98
|
-
name: nameOverride ?? id,
|
|
99
|
-
required: !isOptional
|
|
100
|
-
})
|
|
101
|
-
}), [ariaDescribedBy, errorMessage, errorMessageList, hint, isOptional, label, nameOverride, testId]);
|
|
102
|
-
const onChange = useCallback((event, value, reason, details) => {
|
|
103
|
-
onChangeProp?.(event, value, reason, details);
|
|
104
|
-
}, [onChangeProp]);
|
|
105
|
-
const onInputChange = useCallback((event, value, reason) => {
|
|
106
|
-
onInputChangeProp?.(event, value, reason);
|
|
107
|
-
}, [onInputChangeProp]);
|
|
108
|
-
return _jsx(_Autocomplete, {
|
|
109
|
-
...valueProps,
|
|
110
|
-
...inputValueProp,
|
|
111
|
-
"aria-disabled": isDisabled,
|
|
112
|
-
disableCloseOnSelect: hasMultipleChoices,
|
|
113
|
-
disabled: isDisabled,
|
|
114
|
-
freeSolo: isCustomValueAllowed,
|
|
115
|
-
filterSelectedOptions: true,
|
|
116
|
-
id: idOverride,
|
|
117
|
-
ListboxComponent: ListboxComponent,
|
|
118
|
-
loading: isLoading,
|
|
119
|
-
multiple: hasMultipleChoices,
|
|
120
|
-
onBlur: onBlur,
|
|
121
|
-
onChange: onChange,
|
|
122
|
-
onInputChange: onInputChange,
|
|
123
|
-
onFocus: onFocus,
|
|
124
|
-
options: options,
|
|
125
|
-
readOnly: isReadOnly,
|
|
126
|
-
renderInput: renderInput,
|
|
127
|
-
isOptionEqualToValue: getIsOptionEqualToValue,
|
|
128
|
-
translate: translate
|
|
129
|
-
});
|
|
130
|
-
};
|
|
131
|
-
const MemoizedAutocomplete = memo(VirtualizedAutocomplete);
|
|
132
|
-
MemoizedAutocomplete.displayName = "Autocomplete";
|
|
133
|
-
export { MemoizedAutocomplete as VirtualizedAutocomplete };
|
|
134
|
-
//# sourceMappingURL=VirtualizedAutocomplete.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualizedAutocomplete.js","names":["memo","useCallback","useMemo","useRef","Field","ComponentControlledState","getControlState","useInputValues","jsx","_jsx","VirtualizedAutocomplete","ariaDescribedBy","defaultValue","errorMessage","errorMessageList","hasMultipleChoices","id","idOverride","inputValue","isCustomValueAllowed","isDisabled","isLoading","isOptional","isReadOnly","hint","label","ListboxComponent","name","nameOverride","onBlur","onChange","onChangeProp","onInputChange","onInputChangeProp","onFocus","options","value","getIsOptionEqualToValue","testId","translate","controlledStateRef","controlledValue","uncontrolledValue","defaultValueProp","undefined","valueProps","controlState","current","inputValueProp","CONTROLLED","renderInput","InputLabelProps","InputProps","params","fieldType","hasVisibleLabel","htmlFor","renderFieldComponent","errorMessageElementId","labelElementId","_InputBase","inputProps","required","event","reason","details","_Autocomplete","disableCloseOnSelect","disabled","freeSolo","filterSelectedOptions","loading","multiple","readOnly","isOptionEqualToValue","MemoizedAutocomplete","displayName"],"sources":["../../src/labs/VirtualizedAutocomplete.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 Autocomplete as MuiAutocomplete,\n AutocompleteProps as MuiAutocompleteProps,\n InputBase,\n UseAutocompleteProps,\n AutocompleteValue,\n AutocompleteRenderInputParams,\n} from \"@mui/material\";\nimport { memo, useCallback, useMemo, useRef } from \"react\";\n\nimport { Field } from \"../Field\";\nimport { FieldComponentProps } from \"../FieldComponentProps\";\nimport type { HtmlProps } from \"../HtmlProps\";\nimport {\n ComponentControlledState,\n getControlState,\n useInputValues,\n} from \"../inputUtils\";\n\nexport type AutocompleteProps<\n OptionType,\n HasMultipleChoices extends boolean | undefined,\n IsCustomValueAllowed extends boolean | undefined,\n> = {\n /**\n * The default value. Use when the component is not controlled.\n * @default props.multiple ? [] : null\n */\n defaultValue?: UseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"defaultValue\"];\n /**\n * Enables multiple choice selection\n */\n hasMultipleChoices?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"multiple\"];\n /**\n * The value for the input\n */\n inputValue?: UseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"inputValue\"];\n /**\n * Allows the input of custom values\n */\n isCustomValueAllowed?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"freeSolo\"];\n /**\n * Disables the Autocomplete input\n */\n isDisabled?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"disabled\"];\n /**\n * Displays a loading indicator\n */\n isLoading?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"loading\"];\n /**\n * Makes the Autocomplete input read-only\n */\n isReadOnly?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"readOnly\"];\n /**\n * The label text for the autocomplete input\n */\n label: string;\n /**\n * The component used to render the listbox.\n */\n ListboxComponent?: React.JSXElementConstructor<\n React.HTMLAttributes<HTMLElement>\n >;\n /**\n * Callback fired when the autocomplete loses focus.\n */\n onBlur?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onBlur\"];\n /**\n * Callback fired when a selection is made.\n */\n onChange?: UseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onChange\"];\n /**\n * Callback fired when the textbox receives typed characters.\n */\n onInputChange?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onInputChange\"];\n /**\n * Callback fired when the autocomplete gains focus.\n */\n onFocus?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onFocus\"];\n /**\n * The options for the Autocomplete input\n */\n options: ReadonlyArray<OptionType>;\n /**\n * The value of the Autocomplete input\n */\n value?: UseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"value\"];\n\n /**\n * Used to determine if the option represents the given value. Uses strict equality by default if none provided.\n * Both arguments need to be handled, an option can only match with one value.\n * option: the option to test\n * value: the value to test against\n *\n * You will need to implement this function if your `option` items are objects.\n */\n getIsOptionEqualToValue?: (option: OptionType, value: OptionType) => boolean;\n} & Pick<\n FieldComponentProps,\n \"errorMessage\" | \"errorMessageList\" | \"hint\" | \"id\" | \"isOptional\" | \"name\"\n> &\n Pick<HtmlProps, \"ariaDescribedBy\" | \"testId\" | \"translate\">;\n\nconst VirtualizedAutocomplete = <\n OptionType,\n HasMultipleChoices extends boolean | undefined,\n IsCustomValueAllowed extends boolean | undefined,\n>({\n ariaDescribedBy,\n defaultValue,\n errorMessage,\n errorMessageList,\n hasMultipleChoices,\n id: idOverride,\n inputValue,\n isCustomValueAllowed,\n isDisabled,\n isLoading,\n isOptional = false,\n isReadOnly,\n hint,\n label,\n ListboxComponent,\n name: nameOverride,\n onBlur,\n onChange: onChangeProp,\n onInputChange: onInputChangeProp,\n onFocus,\n options,\n value,\n getIsOptionEqualToValue,\n testId,\n translate,\n}: AutocompleteProps<OptionType, HasMultipleChoices, IsCustomValueAllowed>) => {\n const controlledStateRef = useRef(\n getControlState({\n controlledValue: value,\n uncontrolledValue: defaultValue,\n }),\n );\n const defaultValueProp = useMemo<\n | AutocompleteValue<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >\n | undefined\n >(() => {\n if (hasMultipleChoices) {\n return defaultValue === undefined\n ? ([] as AutocompleteValue<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >)\n : defaultValue;\n }\n return defaultValue ?? undefined;\n }, [defaultValue, hasMultipleChoices]);\n\n const valueProps = useInputValues({\n defaultValue: defaultValueProp,\n value: value,\n controlState: controlledStateRef.current,\n });\n\n const inputValueProp = useMemo(() => {\n if (controlledStateRef.current === ComponentControlledState.CONTROLLED) {\n return { inputValue };\n }\n return undefined;\n }, [inputValue]);\n\n const renderInput = useCallback(\n ({\n InputLabelProps,\n InputProps,\n ...params\n }: AutocompleteRenderInputParams) => (\n <Field\n ariaDescribedBy={ariaDescribedBy}\n errorMessage={errorMessage}\n errorMessageList={errorMessageList}\n fieldType=\"single\"\n hasVisibleLabel\n //@ts-expect-error htmlFor is not available on the typed params for this callback\n id={InputLabelProps.htmlFor}\n hint={hint}\n label={label}\n isOptional={isOptional}\n renderFieldComponent={({\n ariaDescribedBy,\n id,\n errorMessageElementId,\n labelElementId,\n }) => (\n <InputBase\n {...params}\n {...InputProps}\n inputProps={{\n ...params.inputProps,\n \"aria-errormessage\": errorMessageElementId,\n \"aria-labelledby\": labelElementId,\n \"data-se\": testId,\n }}\n aria-describedby={ariaDescribedBy}\n id={id}\n name={nameOverride ?? id}\n required={!isOptional}\n />\n )}\n />\n ),\n [\n ariaDescribedBy,\n errorMessage,\n errorMessageList,\n hint,\n isOptional,\n label,\n nameOverride,\n testId,\n ],\n );\n const onChange = useCallback<\n NonNullable<\n UseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onChange\"]\n >\n >(\n (event, value, reason, details) => {\n onChangeProp?.(event, value, reason, details);\n },\n [onChangeProp],\n );\n\n const onInputChange = useCallback<\n NonNullable<\n UseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onInputChange\"]\n >\n >(\n (event, value, reason) => {\n onInputChangeProp?.(event, value, reason);\n },\n [onInputChangeProp],\n );\n\n return (\n <MuiAutocomplete\n {...valueProps}\n {...inputValueProp}\n // AutoComplete is wrapped in a div within MUI which does not get the disabled attr. So this aria-disabled gets set in the div\n aria-disabled={isDisabled}\n disableCloseOnSelect={hasMultipleChoices}\n disabled={isDisabled}\n freeSolo={isCustomValueAllowed}\n filterSelectedOptions={true}\n id={idOverride}\n ListboxComponent={ListboxComponent}\n loading={isLoading}\n multiple={hasMultipleChoices}\n onBlur={onBlur}\n onChange={onChange}\n onInputChange={onInputChange}\n onFocus={onFocus}\n options={options}\n readOnly={isReadOnly}\n renderInput={renderInput}\n isOptionEqualToValue={getIsOptionEqualToValue}\n translate={translate}\n />\n );\n};\n\n// Need the `typeof Autocomplete` because generics don't get passed through\nconst MemoizedAutocomplete = memo(\n VirtualizedAutocomplete,\n) as typeof VirtualizedAutocomplete;\n// @ts-expect-error displayName is expected to not be on `typeof Autocomplete`\nMemoizedAutocomplete.displayName = \"Autocomplete\";\n\nexport { MemoizedAutocomplete as VirtualizedAutocomplete };\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAUA,SAASA,IAAI,EAAEC,WAAW,EAAEC,OAAO,EAAEC,MAAM,QAAQ,OAAO;AAAC,SAElDC,KAAK;AAAA,SAIZC,wBAAwB,EACxBC,eAAe,EACfC,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAmJhB,MAAMC,uBAAuB,GAAGA,CAI9B;EACAC,eAAe;EACfC,YAAY;EACZC,YAAY;EACZC,gBAAgB;EAChBC,kBAAkB;EAClBC,EAAE,EAAEC,UAAU;EACdC,UAAU;EACVC,oBAAoB;EACpBC,UAAU;EACVC,SAAS;EACTC,UAAU,GAAG,KAAK;EAClBC,UAAU;EACVC,IAAI;EACJC,KAAK;EACLC,gBAAgB;EAChBC,IAAI,EAAEC,YAAY;EAClBC,MAAM;EACNC,QAAQ,EAAEC,YAAY;EACtBC,aAAa,EAAEC,iBAAiB;EAChCC,OAAO;EACPC,OAAO;EACPC,KAAK;EACLC,uBAAuB;EACvBC,MAAM;EACNC;AACuE,CAAC,KAAK;EAC7E,MAAMC,kBAAkB,GAAGrC,MAAM,CAC/BG,eAAe,CAAC;IACdmC,eAAe,EAAEL,KAAK;IACtBM,iBAAiB,EAAE9B;EACrB,CAAC,CACH,CAAC;EACD,MAAM+B,gBAAgB,GAAGzC,OAAO,CAQ9B,MAAM;IACN,IAAIa,kBAAkB,EAAE;MACtB,OAAOH,YAAY,KAAKgC,SAAS,GAC5B,EAAE,GAMHhC,YAAY;IAClB;IACA,OAAOA,YAAY,IAAIgC,SAAS;EAClC,CAAC,EAAE,CAAChC,YAAY,EAAEG,kBAAkB,CAAC,CAAC;EAEtC,MAAM8B,UAAU,GAAGtC,cAAc,CAAC;IAChCK,YAAY,EAAE+B,gBAAgB;IAC9BP,KAAK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, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
-
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
-
*
|
|
5
|
-
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
-
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
-
*
|
|
10
|
-
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
/// <reference types="react" />
|
|
13
|
-
import { AutocompleteProps as MuiAutocompleteProps, UseAutocompleteProps } from "@mui/material";
|
|
14
|
-
import { FieldComponentProps } from "../FieldComponentProps";
|
|
15
|
-
import type { HtmlProps } from "../HtmlProps";
|
|
16
|
-
export type AutocompleteProps<OptionType, HasMultipleChoices extends boolean | undefined, IsCustomValueAllowed extends boolean | undefined> = {
|
|
17
|
-
/**
|
|
18
|
-
* The default value. Use when the component is not controlled.
|
|
19
|
-
* @default props.multiple ? [] : null
|
|
20
|
-
*/
|
|
21
|
-
defaultValue?: UseAutocompleteProps<OptionType, HasMultipleChoices, undefined, IsCustomValueAllowed>["defaultValue"];
|
|
22
|
-
/**
|
|
23
|
-
* Enables multiple choice selection
|
|
24
|
-
*/
|
|
25
|
-
hasMultipleChoices?: MuiAutocompleteProps<OptionType, HasMultipleChoices, undefined, IsCustomValueAllowed>["multiple"];
|
|
26
|
-
/**
|
|
27
|
-
* The value for the input
|
|
28
|
-
*/
|
|
29
|
-
inputValue?: UseAutocompleteProps<OptionType, HasMultipleChoices, undefined, IsCustomValueAllowed>["inputValue"];
|
|
30
|
-
/**
|
|
31
|
-
* Allows the input of custom values
|
|
32
|
-
*/
|
|
33
|
-
isCustomValueAllowed?: MuiAutocompleteProps<OptionType, HasMultipleChoices, undefined, IsCustomValueAllowed>["freeSolo"];
|
|
34
|
-
/**
|
|
35
|
-
* Disables the Autocomplete input
|
|
36
|
-
*/
|
|
37
|
-
isDisabled?: MuiAutocompleteProps<OptionType, HasMultipleChoices, undefined, IsCustomValueAllowed>["disabled"];
|
|
38
|
-
/**
|
|
39
|
-
* Displays a loading indicator
|
|
40
|
-
*/
|
|
41
|
-
isLoading?: MuiAutocompleteProps<OptionType, HasMultipleChoices, undefined, IsCustomValueAllowed>["loading"];
|
|
42
|
-
/**
|
|
43
|
-
* Makes the Autocomplete input read-only
|
|
44
|
-
*/
|
|
45
|
-
isReadOnly?: MuiAutocompleteProps<OptionType, HasMultipleChoices, undefined, IsCustomValueAllowed>["readOnly"];
|
|
46
|
-
/**
|
|
47
|
-
* The label text for the autocomplete input
|
|
48
|
-
*/
|
|
49
|
-
label: string;
|
|
50
|
-
/**
|
|
51
|
-
* The component used to render the listbox.
|
|
52
|
-
*/
|
|
53
|
-
ListboxComponent?: React.JSXElementConstructor<React.HTMLAttributes<HTMLElement>>;
|
|
54
|
-
/**
|
|
55
|
-
* Callback fired when the autocomplete loses focus.
|
|
56
|
-
*/
|
|
57
|
-
onBlur?: MuiAutocompleteProps<OptionType, HasMultipleChoices, undefined, IsCustomValueAllowed>["onBlur"];
|
|
58
|
-
/**
|
|
59
|
-
* Callback fired when a selection is made.
|
|
60
|
-
*/
|
|
61
|
-
onChange?: UseAutocompleteProps<OptionType, HasMultipleChoices, undefined, IsCustomValueAllowed>["onChange"];
|
|
62
|
-
/**
|
|
63
|
-
* Callback fired when the textbox receives typed characters.
|
|
64
|
-
*/
|
|
65
|
-
onInputChange?: MuiAutocompleteProps<OptionType, HasMultipleChoices, undefined, IsCustomValueAllowed>["onInputChange"];
|
|
66
|
-
/**
|
|
67
|
-
* Callback fired when the autocomplete gains focus.
|
|
68
|
-
*/
|
|
69
|
-
onFocus?: MuiAutocompleteProps<OptionType, HasMultipleChoices, undefined, IsCustomValueAllowed>["onFocus"];
|
|
70
|
-
/**
|
|
71
|
-
* The options for the Autocomplete input
|
|
72
|
-
*/
|
|
73
|
-
options: ReadonlyArray<OptionType>;
|
|
74
|
-
/**
|
|
75
|
-
* The value of the Autocomplete input
|
|
76
|
-
*/
|
|
77
|
-
value?: UseAutocompleteProps<OptionType, HasMultipleChoices, undefined, IsCustomValueAllowed>["value"];
|
|
78
|
-
/**
|
|
79
|
-
* Used to determine if the option represents the given value. Uses strict equality by default if none provided.
|
|
80
|
-
* Both arguments need to be handled, an option can only match with one value.
|
|
81
|
-
* option: the option to test
|
|
82
|
-
* value: the value to test against
|
|
83
|
-
*
|
|
84
|
-
* You will need to implement this function if your `option` items are objects.
|
|
85
|
-
*/
|
|
86
|
-
getIsOptionEqualToValue?: (option: OptionType, value: OptionType) => boolean;
|
|
87
|
-
} & Pick<FieldComponentProps, "errorMessage" | "errorMessageList" | "hint" | "id" | "isOptional" | "name"> & Pick<HtmlProps, "ariaDescribedBy" | "testId" | "translate">;
|
|
88
|
-
declare const MemoizedAutocomplete: <OptionType, HasMultipleChoices extends boolean | undefined, IsCustomValueAllowed extends boolean | undefined>({ ariaDescribedBy, defaultValue, errorMessage, errorMessageList, hasMultipleChoices, id: idOverride, inputValue, isCustomValueAllowed, isDisabled, isLoading, isOptional, isReadOnly, hint, label, ListboxComponent, name: nameOverride, onBlur, onChange: onChangeProp, onInputChange: onInputChangeProp, onFocus, options, value, getIsOptionEqualToValue, testId, translate, }: AutocompleteProps<OptionType, HasMultipleChoices, IsCustomValueAllowed>) => import("react/jsx-runtime").JSX.Element;
|
|
89
|
-
export { MemoizedAutocomplete as VirtualizedAutocomplete };
|
|
90
|
-
//# sourceMappingURL=VirtualizedAutocomplete.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualizedAutocomplete.d.ts","sourceRoot":"","sources":["../../../src/labs/VirtualizedAutocomplete.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;;AAEH,OAAO,EAEL,iBAAiB,IAAI,oBAAoB,EAEzC,oBAAoB,EAGrB,M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