@persona/design-system 0.10.11 → 0.10.13
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 +52 -0
- package/dist/{Action-sLO73eKq.d.mts → Action-CHWYwpYR.d.mts} +2 -2
- package/dist/Action.d.mts +1 -1
- package/dist/AdvancedFilterRuleRow.d.mts +3 -0
- package/dist/AdvancedFilterRulesPopover.d.mts +4 -0
- package/dist/Attribute.d.mts +2 -2
- package/dist/{Badge-DZq6ByIU.mjs → Badge-B2AJMf3d.mjs} +2 -2
- package/dist/{Badge-DZq6ByIU.mjs.map → Badge-B2AJMf3d.mjs.map} +1 -1
- package/dist/{Breadcrumbs-DpsNZWF9.mjs → Breadcrumbs-DRs9eo1o.mjs} +8 -8
- package/dist/{Breadcrumbs-DpsNZWF9.mjs.map → Breadcrumbs-DRs9eo1o.mjs.map} +1 -1
- package/dist/{Button-C4a4BTjL.d.mts → Button-DjD8QxcY.d.mts} +2 -2
- package/dist/Button.d.mts +1 -1
- package/dist/CalendarBase.d.mts +1 -1
- package/dist/{Card-CPV4_mHk.d.mts → Card-DiUHtYg_.d.mts} +4 -4
- package/dist/Card.d.mts +1 -1
- package/dist/Card2.d.mts +1 -1
- package/dist/CardGrouping.d.mts +1 -1
- package/dist/{CardV2-DCoDfEvr.mjs → CardV2-DO-8COfu.mjs} +12 -12
- package/dist/{CardV2-DCoDfEvr.mjs.map → CardV2-DO-8COfu.mjs.map} +1 -1
- package/dist/{Checkbox-C3z7UUSC.mjs → Checkbox-BAh-wF_F.mjs} +5 -5
- package/dist/{Checkbox-C3z7UUSC.mjs.map → Checkbox-BAh-wF_F.mjs.map} +1 -1
- package/dist/{CheckboxGroupField-BT87OVOF.d.mts → CheckboxGroupField-BW_BcW3L.d.mts} +2 -2
- package/dist/CheckboxGroupField.d.mts +1 -1
- package/dist/{Combobox-aOJDTjzC.d.mts → Combobox-DgYwerwd.d.mts} +3 -3
- package/dist/{Combobox-BkK_tosd.mjs → Combobox-DmFQ5cAy.mjs} +92 -89
- package/dist/Combobox-DmFQ5cAy.mjs.map +1 -0
- package/dist/Combobox.d.mts +2 -2
- package/dist/{ComboboxBase-Brgv5nxk.d.mts → ComboboxBase-DoKiRjgS.d.mts} +6 -6
- package/dist/ComboboxBase.d.mts +1 -1
- package/dist/{ComboboxMultiSelect-DJyAv0Eg.d.mts → ComboboxMultiSelect-DsoIMJiZ.d.mts} +2 -2
- package/dist/ComboboxMultiSelect.d.mts +1 -1
- package/dist/{ComboboxSingleSelect-CP8-HLKl.d.mts → ComboboxSingleSelect-CKsqOAGB.d.mts} +3 -3
- package/dist/ComboboxSingleSelect.d.mts +1 -1
- package/dist/{CompactBar-B0LhjrYV.d.mts → CompactBar-tNtY2EhN.d.mts} +3 -3
- package/dist/CompactBar.d.mts +1 -1
- package/dist/{ConfigFormGroup-DAUqAhJW.mjs → ConfigFormGroup-BCTWCws5.mjs} +2 -2
- package/dist/{ConfigFormGroup-DAUqAhJW.mjs.map → ConfigFormGroup-BCTWCws5.mjs.map} +1 -1
- package/dist/{ControlBar-B3Jn8G0k.d.mts → ControlBar-CDb6b1_6.d.mts} +5 -3
- package/dist/ControlBar.d.mts +1 -1
- package/dist/{DataTable-DiwzhNMt.mjs → DataTable-DZ0B2Zm9.mjs} +159 -90
- package/dist/DataTable-DZ0B2Zm9.mjs.map +1 -0
- package/dist/{DataTable-CSl5Jn3E.d.mts → DataTable-on3vGhyi.d.mts} +32 -8
- package/dist/DataTable.d.mts +1 -1
- package/dist/{DatePicker-BK7ioKBm.mjs → DatePicker-CHVYVKB-.mjs} +375 -375
- package/dist/DatePicker-CHVYVKB-.mjs.map +1 -0
- package/dist/{DropdownButton-Dp-MZ5tA.mjs → DropdownButton-BxZ5hn0X.mjs} +3 -3
- package/dist/{DropdownButton-Dp-MZ5tA.mjs.map → DropdownButton-BxZ5hn0X.mjs.map} +1 -1
- package/dist/DropdownButton.d.mts +2 -2
- package/dist/{DropdownMenu-jJSHQaih.mjs → DropdownMenu-Ip75l4Th.mjs} +21 -4
- package/dist/DropdownMenu-Ip75l4Th.mjs.map +1 -0
- package/dist/{DropdownMenu-BnHPeHOm.d.mts → DropdownMenu-eVY-Yjpq.d.mts} +3 -3
- package/dist/DropdownMenu.d.mts +1 -1
- package/dist/{FilterBar-DDyk14sx.d.mts → FilterBar-CA4mDAXK.d.mts} +10 -2
- package/dist/FilterBar.d.mts +1 -1
- package/dist/{FloatingActionBar-BUgSKimy.d.mts → FloatingActionBar-CfgjHs81.d.mts} +5 -1
- package/dist/FloatingActionBar.d.mts +1 -1
- package/dist/{FloatingToolbar-rfKurDs8.mjs → FloatingToolbar-BA8Fqmrz.mjs} +4 -4
- package/dist/{FloatingToolbar-rfKurDs8.mjs.map → FloatingToolbar-BA8Fqmrz.mjs.map} +1 -1
- package/dist/{FormControl-DPYbLcBK.d.mts → FormControl-BQe3GRhi.d.mts} +2 -2
- package/dist/{FormControl--pbTH3bY.mjs → FormControl-BoKGiWdQ.mjs} +3 -3
- package/dist/{FormControl--pbTH3bY.mjs.map → FormControl-BoKGiWdQ.mjs.map} +1 -1
- package/dist/FormControl.d.mts +1 -1
- package/dist/FormControlLabel.d.mts +2 -2
- package/dist/{FormField-CYNGm2bJ.d.mts → FormField-BW5uMzId.d.mts} +2 -2
- package/dist/{FormField-DMxjftFw.mjs → FormField-BfVrDOY0.mjs} +13 -13
- package/dist/{FormField-DMxjftFw.mjs.map → FormField-BfVrDOY0.mjs.map} +1 -1
- package/dist/FormField.d.mts +1 -1
- package/dist/{Grid-DVC0SSEZ.mjs → Grid-CYpOqTUu.mjs} +2 -2
- package/dist/{Grid-DVC0SSEZ.mjs.map → Grid-CYpOqTUu.mjs.map} +1 -1
- package/dist/{Header-DaaUprCL.d.mts → Header-CV0Lcf0C.d.mts} +2 -2
- package/dist/Header.d.mts +1 -1
- package/dist/{HelperTooltip-C5BDdJSI.d.mts → HelperTooltip-BNM3pTM-.d.mts} +2 -2
- package/dist/HelperTooltip.d.mts +1 -1
- package/dist/HighlightedText.d.mts +1 -1
- package/dist/{HoverCopyableField-B2-xlwUt.mjs → HoverCopyableField-CJ_p3llp.mjs} +5 -5
- package/dist/{HoverCopyableField-B2-xlwUt.mjs.map → HoverCopyableField-CJ_p3llp.mjs.map} +1 -1
- package/dist/{IconButton-kSjnfhWt.mjs → IconButton-Bj1fry_K.mjs} +8 -8
- package/dist/{IconButton-kSjnfhWt.mjs.map → IconButton-Bj1fry_K.mjs.map} +1 -1
- package/dist/{IconButton-7k-wjvH3.d.mts → IconButton-C_ReZm8v.d.mts} +2 -2
- package/dist/IconButton.d.mts +1 -1
- package/dist/ImageTile.d.mts +1 -1
- package/dist/IndexTableLayout.d.mts +12 -4
- package/dist/InlineCombobox.d.mts +1 -1
- package/dist/InlineInput.d.mts +1 -1
- package/dist/{Input-CwvrBsiS.d.mts → Input-DH-5dKor.d.mts} +3 -3
- package/dist/{Input-TRmTBEav.mjs → Input-DcbzPaax.mjs} +5 -5
- package/dist/{Input-TRmTBEav.mjs.map → Input-DcbzPaax.mjs.map} +1 -1
- package/dist/Input.d.mts +1 -1
- package/dist/{Link-XvzUN8sY.mjs → Link-Df3zJrj2.mjs} +4 -4
- package/dist/{Link-XvzUN8sY.mjs.map → Link-Df3zJrj2.mjs.map} +1 -1
- package/dist/{ListBox-DahM1PgU.mjs → ListBox-BRgjgUSp.mjs} +12 -12
- package/dist/{ListBox-DahM1PgU.mjs.map → ListBox-BRgjgUSp.mjs.map} +1 -1
- package/dist/{ListBox-BePQBYR7.d.mts → ListBox-Bgug8YZF.d.mts} +3 -3
- package/dist/ListBox.d.mts +1 -1
- package/dist/{ListBoxField-lj7JN1BX.d.mts → ListBoxField-Cc1sX2bo.d.mts} +4 -4
- package/dist/ListBoxField.d.mts +1 -1
- package/dist/{LoadingShimmer-CpfKTSUs.mjs → LoadingShimmer-BVVdBeN-.mjs} +18 -21
- package/dist/LoadingShimmer-BVVdBeN-.mjs.map +1 -0
- package/dist/LoadingShimmer.d.mts +1 -1
- package/dist/{LogicRow-Do7t7Suf.d.mts → LogicRow-B1_35ZJT.d.mts} +2 -2
- package/dist/LogicRow.d.mts +1 -1
- package/dist/MaskedInput.d.mts +2 -2
- package/dist/MatchHighlight.d.mts +1 -1
- package/dist/{Menu-BvMzSH2I.mjs → Menu-BVn1jh46.mjs} +5 -5
- package/dist/{Menu-BvMzSH2I.mjs.map → Menu-BVn1jh46.mjs.map} +1 -1
- package/dist/{Menu-Ca5ftvo6.d.mts → Menu-keVl-eKm.d.mts} +4 -4
- package/dist/Menu.d.mts +1 -1
- package/dist/{MiddleTruncatedText--jzGTD00.mjs → MiddleTruncatedText-DicQsLDG.mjs} +2 -2
- package/dist/{MiddleTruncatedText--jzGTD00.mjs.map → MiddleTruncatedText-DicQsLDG.mjs.map} +1 -1
- package/dist/{Modal-BPfFyzkw.d.mts → Modal-CujB7DuB.d.mts} +3 -3
- package/dist/{Modal-B6X5AgWj.mjs → Modal-SnCo7ecm.mjs} +8 -7
- package/dist/Modal-SnCo7ecm.mjs.map +1 -0
- package/dist/Modal.d.mts +1 -1
- package/dist/{PageHeader-bhQTjuZF.mjs → PageHeader-6KvtGED-.mjs} +2 -2
- package/dist/{PageHeader-bhQTjuZF.mjs.map → PageHeader-6KvtGED-.mjs.map} +1 -1
- package/dist/{PageHeader-BeBmYmUX.d.mts → PageHeader-UPiqJpIF.d.mts} +2 -2
- package/dist/PageHeader.d.mts +1 -1
- package/dist/{PageLayout-BXM_pyrU.d.mts → PageLayout-BdVM37bV.d.mts} +2 -2
- package/dist/{PageLayout-DgEGcZgB.mjs → PageLayout-CPiVnS_r.mjs} +5 -3
- package/dist/PageLayout-CPiVnS_r.mjs.map +1 -0
- package/dist/PageLayout.d.mts +1 -1
- package/dist/{PageSelector-C14ABZVL.d.mts → PageSelector-B5CcAzss.d.mts} +2 -2
- package/dist/PageSelector.d.mts +1 -1
- package/dist/{Pagination-DE8wT55m.mjs → Pagination-CqFvnlXc.mjs} +5 -5
- package/dist/{Pagination-DE8wT55m.mjs.map → Pagination-CqFvnlXc.mjs.map} +1 -1
- package/dist/{Pii-C42ZY88Y.mjs → Pii-BYPkrBuT.mjs} +2 -2
- package/dist/{Pii-C42ZY88Y.mjs.map → Pii-BYPkrBuT.mjs.map} +1 -1
- package/dist/{Popover-DuFjaSoq.mjs → Popover-DP9DXReH.mjs} +48 -20
- package/dist/Popover-DP9DXReH.mjs.map +1 -0
- package/dist/Popover.d.mts +1 -1
- package/dist/ProgressBar.d.mts +1 -1
- package/dist/{ProgressIndicator-hy1P-RG1.mjs → ProgressIndicator-zt3ndT9U.mjs} +3 -3
- package/dist/{ProgressIndicator-hy1P-RG1.mjs.map → ProgressIndicator-zt3ndT9U.mjs.map} +1 -1
- package/dist/{Radio-B4TBAho6.mjs → Radio-B1H_S-Qj.mjs} +4 -4
- package/dist/{Radio-B4TBAho6.mjs.map → Radio-B1H_S-Qj.mjs.map} +1 -1
- package/dist/{RadioGroup-Bf24GKOb.mjs → RadioGroup-7hdcVhsp.mjs} +3 -3
- package/dist/{RadioGroup-Bf24GKOb.mjs.map → RadioGroup-7hdcVhsp.mjs.map} +1 -1
- package/dist/RichTextEditor.d.mts +1 -1
- package/dist/SectionHeading.d.mts +1 -1
- package/dist/{SegmentedControl-BpR7sUWO.mjs → SegmentedControl-BNOJ1FYQ.mjs} +3 -3
- package/dist/{SegmentedControl-BpR7sUWO.mjs.map → SegmentedControl-BNOJ1FYQ.mjs.map} +1 -1
- package/dist/{Select-DYdn73Nh.d.mts → Select-CiofH5-f.d.mts} +2 -2
- package/dist/{Select-RdTT2KoH.mjs → Select-DbWEgH5c.mjs} +9 -9
- package/dist/{Select-RdTT2KoH.mjs.map → Select-DbWEgH5c.mjs.map} +1 -1
- package/dist/Select.d.mts +1 -1
- package/dist/SmartTextInput.d.mts +1 -1
- package/dist/SmartTextInputField.d.mts +2 -2
- package/dist/SmartTextInputFunctionDialog.d.mts +1 -1
- package/dist/SmartTextInputListbox.d.mts +8 -3
- package/dist/SmartTextInputPopover.d.mts +1 -1
- package/dist/{Spinner-vcApnJzv.mjs → Spinner-k9ZiOdTr.mjs} +2 -2
- package/dist/{Spinner-vcApnJzv.mjs.map → Spinner-k9ZiOdTr.mjs.map} +1 -1
- package/dist/{Stack-B6MrjJeW.d.mts → Stack-CODxfzhl.d.mts} +2 -2
- package/dist/Stack.d.mts +1 -1
- package/dist/{StatusIndicator-lwt35J6B.mjs → StatusIndicator-CzRaEFSz.mjs} +3 -3
- package/dist/{StatusIndicator-lwt35J6B.mjs.map → StatusIndicator-CzRaEFSz.mjs.map} +1 -1
- package/dist/{Sticker-jfOM4Yi6.mjs → Sticker-4VdGEFAu.mjs} +5 -5
- package/dist/{Sticker-jfOM4Yi6.mjs.map → Sticker-4VdGEFAu.mjs.map} +1 -1
- package/dist/{Sticker-C7Wv3Obx.d.mts → Sticker-CLvRB8V5.d.mts} +4 -4
- package/dist/Sticker.d.mts +1 -1
- package/dist/Tab.d.mts +2 -2
- package/dist/{TabBar-DwHgbIQ6.mjs → TabBar-d4sdknti.mjs} +6 -6
- package/dist/{TabBar-DwHgbIQ6.mjs.map → TabBar-d4sdknti.mjs.map} +1 -1
- package/dist/{Table-SMJAWqoe.mjs → Table-9mNn8Q-d.mjs} +10 -10
- package/dist/{Table-SMJAWqoe.mjs.map → Table-9mNn8Q-d.mjs.map} +1 -1
- package/dist/{TableBox-DS8mpN3-.mjs → TableBox-RxpwflEb.mjs} +14 -14
- package/dist/{TableBox-DS8mpN3-.mjs.map → TableBox-RxpwflEb.mjs.map} +1 -1
- package/dist/TableBox.d.mts +1 -1
- package/dist/{TableBoxCell-Bo5xYEmR.d.mts → TableBoxCell-C65YFYqj.d.mts} +6 -6
- package/dist/TableBoxCell.d.mts +1 -1
- package/dist/{TableBoxField-CdgjSGLK.d.mts → TableBoxField-CHpClgsE.d.mts} +5 -5
- package/dist/TableBoxField.d.mts +1 -1
- package/dist/{TableBoxRow-DuWS2iRC.d.mts → TableBoxRow-CK-b79uD.d.mts} +2 -2
- package/dist/TableBoxRow.d.mts +1 -1
- package/dist/{TableBoxRowActions-zW74DkXt.d.mts → TableBoxRowActions-CRaabjaY.d.mts} +2 -2
- package/dist/TableBoxRowActions.d.mts +1 -1
- package/dist/{TableCell-uv_jqT5e.d.mts → TableCell-CQsF7t4e.d.mts} +2 -2
- package/dist/TableCell.d.mts +1 -1
- package/dist/{TableControls-CX7BvgD2.mjs → TableControls-DM4RddQ_.mjs} +77 -36
- package/dist/TableControls-DM4RddQ_.mjs.map +1 -0
- package/dist/{TableControls-9vz-HfDu.d.mts → TableControls-v1NmlFTW.d.mts} +5 -5
- package/dist/TableControls.d.mts +1 -1
- package/dist/{TableControlsContext-D0Hn3rwL.d.mts → TableControlsContext-DHYICXxy.d.mts} +2 -2
- package/dist/TableControlsContext.d.mts +1 -1
- package/dist/{TableViewConfigurationDropdown-CZcLH8uR.d.mts → TableViewConfigurationDropdown-1nT8wneI.d.mts} +2 -2
- package/dist/TableViewConfigurationDropdown.d.mts +1 -1
- package/dist/{TechnicalSticker-DrN45Vut.mjs → TechnicalSticker-DtV7Gawf.mjs} +7 -7
- package/dist/{TechnicalSticker-DrN45Vut.mjs.map → TechnicalSticker-DtV7Gawf.mjs.map} +1 -1
- package/dist/{Text-CdHeSHCc.d.mts → Text-CvaqognH.d.mts} +2 -2
- package/dist/Text.d.mts +1 -1
- package/dist/{TextUnderlineTooltip-By1VVsSs.d.mts → TextUnderlineTooltip-Bd5e8KH3.d.mts} +3 -3
- package/dist/TextUnderlineTooltip.d.mts +1 -1
- package/dist/Tile.d.mts +1 -1
- package/dist/{Toggle-DjmkjJlw.mjs → Toggle-CzHoIR-n.mjs} +6 -6
- package/dist/{Toggle-DjmkjJlw.mjs.map → Toggle-CzHoIR-n.mjs.map} +1 -1
- package/dist/{Tooltip-C2VB8I6y.mjs → Tooltip-CVBxc1yf.mjs} +4 -4
- package/dist/{Tooltip-C2VB8I6y.mjs.map → Tooltip-CVBxc1yf.mjs.map} +1 -1
- package/dist/{Tooltip-OxVvOfn8.d.mts → Tooltip-Ddy2Jq0K.d.mts} +3 -3
- package/dist/Tooltip.d.mts +1 -1
- package/dist/{TruncatedText-Dqj94BFK.d.mts → TruncatedText-sr9Fhm3N.d.mts} +2 -2
- package/dist/WizardModal.d.mts +1 -1
- package/dist/{clientFilterUtils-CMLuN8kK.d.mts → clientFilterUtils-CaF2QZBy.d.mts} +2 -2
- package/dist/clientFilterUtils.d.mts +1 -1
- package/dist/components/Accordion/index.mjs +5 -5
- package/dist/components/Attribute/index.mjs +6 -6
- package/dist/components/Badge/index.mjs +1 -1
- package/dist/components/Banner/index.mjs +3 -3
- package/dist/components/BottomPanel/index.mjs +7 -7
- package/dist/components/Breadcrumbs/index.mjs +1 -1
- package/dist/components/Button/index.d.mts +2 -2
- package/dist/components/Button/index.mjs +1 -1
- package/dist/components/ButtonGroup/index.mjs +2 -2
- package/dist/components/Card/index.d.mts +2 -2
- package/dist/components/CardV2/index.d.mts +1 -1
- package/dist/components/CardV2/index.mjs +1 -1
- package/dist/components/Checkbox/index.mjs +1 -1
- package/dist/components/CodeHighlight/index.mjs +4 -4
- package/dist/components/Combobox/index.d.mts +4 -4
- package/dist/components/Combobox/index.mjs +1 -1
- package/dist/components/ConfigFormGroup/index.mjs +1 -1
- package/dist/components/DataTable/TableControls/index.d.mts +9 -9
- package/dist/components/DataTable/TableControls/index.mjs +1 -1
- package/dist/components/DataTable/index.d.mts +6 -6
- package/dist/components/DataTable/index.mjs +1 -1
- package/dist/components/DataTable/types.d.mts +1 -1
- package/dist/components/DatePicker/index.mjs +1 -1
- package/dist/components/DropdownButton/index.mjs +1 -1
- package/dist/components/DropdownMenu/index.d.mts +1 -1
- package/dist/components/DropdownMenu/index.mjs +1 -1
- package/dist/components/FloatingPanel/index.mjs +8 -8
- package/dist/components/FloatingToolbar/index.mjs +1 -1
- package/dist/components/FormControl/index.d.mts +1 -1
- package/dist/components/FormControl/index.mjs +1 -1
- package/dist/components/FormField/index.d.mts +5 -5
- package/dist/components/FormField/index.mjs +1 -1
- package/dist/components/Grid/index.mjs +1 -1
- package/dist/components/HoverCopyableField/index.mjs +1 -1
- package/dist/components/ImageTile/index.mjs +8 -8
- package/dist/components/Input/index.d.mts +1 -1
- package/dist/components/Input/index.mjs +1 -1
- package/dist/components/Link/index.mjs +1 -1
- package/dist/components/ListBox/index.d.mts +3 -3
- package/dist/components/ListBox/index.mjs +1 -1
- package/dist/components/LoadingShimmer/index.mjs +1 -1
- package/dist/components/MaskedInput/index.mjs +1 -1
- package/dist/components/Menu/index.d.mts +1 -1
- package/dist/components/Menu/index.mjs +1 -1
- package/dist/components/Modal/index.d.mts +1 -1
- package/dist/components/Modal/index.mjs +1 -1
- package/dist/components/PageHeader/index.d.mts +1 -1
- package/dist/components/PageHeader/index.mjs +1 -1
- package/dist/components/Pagination/index.d.mts +1 -1
- package/dist/components/Pagination/index.mjs +1 -1
- package/dist/components/Pii/index.mjs +1 -1
- package/dist/components/Popover/index.mjs +1 -1
- package/dist/components/ProgressBar/index.mjs +2 -2
- package/dist/components/ProgressIndicator/index.mjs +1 -1
- package/dist/components/Radio/index.mjs +1 -1
- package/dist/components/RadioGroup/index.mjs +1 -1
- package/dist/components/RichTextEditor/index.mjs +9 -9
- package/dist/components/RightPanel/index.mjs +4 -4
- package/dist/components/SegmentedControl/index.mjs +1 -1
- package/dist/components/Select/index.d.mts +1 -1
- package/dist/components/Select/index.mjs +1 -1
- package/dist/components/SelectionCard/index.mjs +5 -5
- package/dist/components/Slider/index.mjs +4 -4
- package/dist/components/SmartTextInput/index.mjs +112 -118
- package/dist/components/SmartTextInput/index.mjs.map +1 -1
- package/dist/{safe-parse.d.mts → components/SmartTextInput/parser/safe-parse.d.mts} +1 -1
- package/dist/components/SmartTextInput/parser/safe-parse.mjs +30 -0
- package/dist/components/SmartTextInput/parser/safe-parse.mjs.map +1 -0
- package/dist/{tree.d.mts → components/SmartTextInput/parser/tree.d.mts} +1 -1
- package/dist/components/SmartTextInput/parser/tree.mjs +42 -0
- package/dist/components/SmartTextInput/parser/tree.mjs.map +1 -0
- package/dist/components/Spinner/index.mjs +1 -1
- package/dist/components/Stack/index.d.mts +1 -1
- package/dist/components/StatusIndicator/index.mjs +1 -1
- package/dist/components/Sticker/index.d.mts +1 -1
- package/dist/components/Sticker/index.mjs +1 -1
- package/dist/components/SwatchPicker/index.mjs +1 -1
- package/dist/components/TabBar/index.mjs +1 -1
- package/dist/components/Table/index.d.mts +1 -1
- package/dist/components/Table/index.mjs +1 -1
- package/dist/components/TableBox/index.d.mts +1 -1
- package/dist/components/TableBox/index.mjs +1 -1
- package/dist/components/TechnicalSticker/index.mjs +1 -1
- package/dist/components/Text/index.d.mts +1 -1
- package/dist/components/Tile/index.mjs +2 -2
- package/dist/components/Toast/index.mjs +4 -4
- package/dist/components/Toggle/index.mjs +1 -1
- package/dist/components/Tooltip/index.d.mts +3 -3
- package/dist/components/Tooltip/index.mjs +1 -1
- package/dist/components/VersionHistory/index.mjs +7 -7
- package/dist/fieldPickerOptions.d.mts +1 -1
- package/dist/{filters-By_TYKAZ.d.mts → filters-CShP0Jag.d.mts} +3 -3
- package/dist/filters.d.mts +1 -1
- package/dist/{helpers-BIHsqdyX.d.mts → helpers-Bbi1LyMW.d.mts} +5 -3
- package/dist/helpers.d.mts +1 -1
- package/dist/{index-CZJp4Af6.d.mts → index-3-eDlpcj.d.mts} +3 -3
- package/dist/{index-BozzRwby.d.mts → index-DTM_t7OG.d.mts} +2 -2
- package/dist/index2.d.mts +1 -1
- package/dist/index4.d.mts +2 -2
- package/dist/index6.d.mts +2 -2
- package/dist/{inputFields-BqO2H-Kj.d.mts → inputFields-Dobwb4kT.d.mts} +6 -6
- package/dist/inputFields.d.mts +1 -1
- package/dist/lib/MiddleTruncatedText.mjs +1 -1
- package/dist/lib/PDSProvider.d.mts +2 -1
- package/dist/lib/PDSProvider.mjs +8 -3
- package/dist/lib/PDSProvider.mjs.map +1 -1
- package/dist/lib/TruncatedText.d.mts +1 -1
- package/dist/lib/TruncatedTextWithTooltip.d.mts +1 -1
- package/dist/lib/TruncatedTextWithTooltip.mjs +1 -1
- package/dist/lib/colorMode.d.mts +19 -8
- package/dist/lib/colorMode.mjs +47 -13
- package/dist/lib/colorMode.mjs.map +1 -1
- package/dist/lib/schemaOptions.mjs +1 -1
- package/dist/lib/schemaOptions.mjs.map +1 -1
- package/dist/lib/useChain.d.mts +1 -1
- package/dist/lib/useCloseFocus.d.mts +45 -0
- package/dist/lib/useCloseFocus.mjs +123 -0
- package/dist/lib/useCloseFocus.mjs.map +1 -0
- package/dist/mixins/focus.mjs +1 -1
- package/dist/mixins/hoverable.mjs +1 -1
- package/dist/mixins/input.mjs +2 -2
- package/dist/mixins/motion.d.mts +6 -2
- package/dist/mixins/motion.mjs +25 -3
- package/dist/mixins/motion.mjs.map +1 -1
- package/dist/patterns/CardGrouping/index.mjs +8 -8
- package/dist/patterns/IndexTableLayout/index.mjs +23 -16
- package/dist/patterns/IndexTableLayout/index.mjs.map +1 -1
- package/dist/patterns/LayoutLoadingShimmer/index.mjs +4 -4
- package/dist/patterns/LayoutLoadingSpinner/index.mjs +1 -1
- package/dist/patterns/PageLayout/index.d.mts +1 -1
- package/dist/patterns/PageLayout/index.mjs +1 -1
- package/dist/patterns/WizardModal/index.mjs +4 -4
- package/dist/tone.d.mts +1 -1
- package/dist/{types-C_CncajO.d.mts → types-BTaKBrxG.d.mts} +2 -2
- package/dist/{types-D5txFacG.d.mts → types-CUnL8JJj.d.mts} +7 -5
- package/dist/types5.d.mts +1 -1
- package/dist/{useChain-x9fd9Fyq.d.mts → useChain-B--KAtdN.d.mts} +2 -2
- package/dist/useChainAtCursor.d.mts +1 -1
- package/dist/useColumnConfiguration.d.mts +2 -2
- package/dist/useComboboxFooterAction.d.mts +1 -1
- package/dist/{useTableColumns-BEKJNrb1.d.mts → useTableColumns-BuxN7Usm.d.mts} +17 -2
- package/dist/useTableColumns.d.mts +1 -1
- package/dist/useTruncation.d.mts +1 -1
- package/dist/utils4.d.mts +1 -1
- package/dist/value-labels.d.mts +12 -0
- package/dist/withDisabledReason.d.mts +19 -0
- package/llms.txt +5 -4
- package/package.json +10 -12
- package/skills/ui-authoring/COMPONENTS.md +1 -2
- package/skills/ui-authoring/PATTERNS.md +6 -66
- package/skills/ui-authoring/STANDARD.md +11 -1
- package/skills/ui-authoring/TOKENS.md +14 -25
- package/dist/ChartFrame.d.mts +0 -61
- package/dist/ChartLegend.d.mts +0 -60
- package/dist/ChartPopover.d.mts +0 -155
- package/dist/Combobox-BkK_tosd.mjs.map +0 -1
- package/dist/DataTable-DiwzhNMt.mjs.map +0 -1
- package/dist/DatePicker-BK7ioKBm.mjs.map +0 -1
- package/dist/DropdownMenu-jJSHQaih.mjs.map +0 -1
- package/dist/LoadingShimmer-CpfKTSUs.mjs.map +0 -1
- package/dist/Modal-B6X5AgWj.mjs.map +0 -1
- package/dist/PageLayout-DgEGcZgB.mjs.map +0 -1
- package/dist/Popover-DuFjaSoq.mjs.map +0 -1
- package/dist/TableControls-CX7BvgD2.mjs.map +0 -1
- package/dist/chartColors.d.mts +0 -92
- package/dist/chartFrameLayout.d.mts +0 -46
- package/dist/components/Chart/index.d.mts +0 -9
- package/dist/components/Chart/index.mjs +0 -680
- package/dist/components/Chart/index.mjs.map +0 -1
- package/dist/useChartColors.d.mts +0 -30
- package/dist/useChartSeriesVisibility.d.mts +0 -22
- package/dist/useChartStyles.d.mts +0 -108
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { a as styled, r as css } from "../../styledComponentsInterop-Cs5CCPRy.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import "../../variables/effect.mjs";
|
|
4
|
-
import { rotate } from "../../variables/keyframes.mjs";
|
|
2
|
+
import { semanticColor } from "../../lib/semanticColor.mjs";
|
|
5
3
|
import { i as Paragraph } from "../../Text-D0vEReED.mjs";
|
|
4
|
+
import { rotate } from "../../variables/keyframes.mjs";
|
|
6
5
|
import { JsonSchemaStringifiableTypes, getNonNullableRefSchema, getNonNullableType, isFunctionSchema, isJsonSchemaArray, isSchemaTypeAllowed } from "../../lib/jsonSchema.mjs";
|
|
7
6
|
import { isCreatableReceiverSchema, isNoArgCodeChainFunction } from "../../lib/customFunctionSchema.mjs";
|
|
8
7
|
import { isASTCustomFunctionNode, isAnyASTFunctionNode, isRealASTFunctionParamType } from "./parser/method-chain/types.mjs";
|
|
@@ -11,61 +10,26 @@ import { normalizeChain, normalizeFunctionParam } from "../../lib/methodChainNor
|
|
|
11
10
|
import { UNTYPED_ADDITIONAL_PROPERTY_SCHEMA, getFunctionSchemaForNode, getSchemaForFieldPath } from "../../lib/schemaOptions.mjs";
|
|
12
11
|
import { n as useChain, r as useChainSchema } from "../../useChain-D1aNsdvn.mjs";
|
|
13
12
|
import { Z_INDICES } from "../../lib/zindex.mjs";
|
|
13
|
+
import { focusStyle } from "../../mixins/focus.mjs";
|
|
14
|
+
import "../../variables/effect.mjs";
|
|
14
15
|
import { n as Stack, t as HStack } from "../../Stack-Bzom2BTR.mjs";
|
|
15
|
-
import { n as Button } from "../../IconButton-
|
|
16
|
+
import { n as Button } from "../../IconButton-Bj1fry_K.mjs";
|
|
16
17
|
import { n as useFormField } from "../../useFormField-pOVkb5BK.mjs";
|
|
17
18
|
import Input_default from "../Input/index.mjs";
|
|
18
|
-
import { n as ErrorText } from "../../FormControl
|
|
19
|
-
import { m as FormField, n as TableBoxField, p as splitOutFormFieldProps } from "../../FormField-
|
|
19
|
+
import { n as ErrorText } from "../../FormControl-BoKGiWdQ.mjs";
|
|
20
|
+
import { m as FormField, n as TableBoxField, p as splitOutFormFieldProps } from "../../FormField-BfVrDOY0.mjs";
|
|
20
21
|
import PillType from "./PillType.mjs";
|
|
21
22
|
import { ErrorMessageByKind, NodeType, isASTChainNode, isASTContainerNode, isMethodChainNode } from "./parser/smart-text/types.mjs";
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
23
|
+
import { enclosingExpr, findAll, resolve } from "./parser/tree.mjs";
|
|
24
|
+
import { safeParse } from "./parser/safe-parse.mjs";
|
|
24
25
|
import { forwardRef, useCallback, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
26
|
+
import { BorderRadius, Color, Spacing, Typography } from "@persona/design-tokens";
|
|
25
27
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
26
28
|
import { LoaderIcon } from "@persona/icons";
|
|
27
29
|
import { ArrowLeftIcon as ArrowLeftIcon$1 } from "@persona/icons/12px";
|
|
28
30
|
import { FocusScope, mergeProps, useComboBox, useDialog, useFocusManager, useInteractOutside, useListBox, useOption, usePopover } from "react-aria";
|
|
29
31
|
import { Item, useComboBoxState } from "react-stately";
|
|
30
32
|
import { createPortal } from "react-dom";
|
|
31
|
-
//#region src/components/SmartTextInput/parser/tree.ts
|
|
32
|
-
function getChildren(node) {
|
|
33
|
-
return node.children ?? [];
|
|
34
|
-
}
|
|
35
|
-
function findAll(node, type, acc = []) {
|
|
36
|
-
if (node.type === type) acc.push(node);
|
|
37
|
-
getChildren(node).forEach((c) => findAll(c, type, acc));
|
|
38
|
-
return acc;
|
|
39
|
-
}
|
|
40
|
-
function resolve(node, charIdx) {
|
|
41
|
-
if (charIdx < node.start || charIdx >= Math.max(node.end, node.start + 1)) return null;
|
|
42
|
-
const children = getChildren(node);
|
|
43
|
-
for (let i = 0; i < children.length; i++) {
|
|
44
|
-
const hit = resolve(children[i], charIdx);
|
|
45
|
-
if (hit) return hit;
|
|
46
|
-
}
|
|
47
|
-
return node;
|
|
48
|
-
}
|
|
49
|
-
function findAncestor(root, target, pred) {
|
|
50
|
-
function walk(n, ancestors) {
|
|
51
|
-
if (n === target) {
|
|
52
|
-
for (let i = ancestors.length - 1; i >= 0; i--) if (pred(ancestors[i])) return [true, ancestors[i]];
|
|
53
|
-
return [true, null];
|
|
54
|
-
}
|
|
55
|
-
const children = getChildren(n);
|
|
56
|
-
for (let j = 0; j < children.length; j++) {
|
|
57
|
-
const [found, result] = walk(children[j], ancestors.concat([n]));
|
|
58
|
-
if (found) return [true, result];
|
|
59
|
-
}
|
|
60
|
-
return [false, null];
|
|
61
|
-
}
|
|
62
|
-
const [, result] = walk(root, []);
|
|
63
|
-
return result;
|
|
64
|
-
}
|
|
65
|
-
function enclosingExpr(root, node) {
|
|
66
|
-
return findAncestor(root, node, (a) => a.type === NodeType.Handlebars || a.type === NodeType.Code);
|
|
67
|
-
}
|
|
68
|
-
//#endregion
|
|
69
33
|
//#region src/components/SmartTextInput/HighlightedText.tsx
|
|
70
34
|
const LoadingIndicator = styled(LoaderIcon)`
|
|
71
35
|
color: ${Color.BorderIconSecondary};
|
|
@@ -118,7 +82,7 @@ const Overlay = styled.div`
|
|
|
118
82
|
overflow: hidden;
|
|
119
83
|
|
|
120
84
|
${({ $size }) => $size === "sm" && css`
|
|
121
|
-
font-size:
|
|
85
|
+
font-size: ${Typography.TextSmall.fontSize};
|
|
122
86
|
margin: 0 9px;
|
|
123
87
|
`};
|
|
124
88
|
${({ $variant }) => $variant === "table-cell" && css`
|
|
@@ -152,7 +116,7 @@ const MonoSpan = styled.span`
|
|
|
152
116
|
content: '';
|
|
153
117
|
position: absolute;
|
|
154
118
|
inset: -2px;
|
|
155
|
-
background-color: ${Color.CoreRed600};
|
|
119
|
+
background-color: ${({ theme }) => semanticColor(theme, "FeedbackDanger3", Color.CoreRed600)};
|
|
156
120
|
opacity: 0.1;
|
|
157
121
|
pointer-events: none;
|
|
158
122
|
}
|
|
@@ -170,7 +134,7 @@ const MonoSpan = styled.span`
|
|
|
170
134
|
content: '';
|
|
171
135
|
position: absolute;
|
|
172
136
|
inset: -2px;
|
|
173
|
-
background-color: ${Color.CoreBlue600};
|
|
137
|
+
background-color: ${({ theme }) => semanticColor(theme, "FeedbackInfo3", Color.CoreBlue600)};
|
|
174
138
|
opacity: 0.1;
|
|
175
139
|
pointer-events: none;
|
|
176
140
|
}
|
|
@@ -311,6 +275,7 @@ const HighlightedTextOverlay = forwardRef(function HighlightedTextOverlay({ chil
|
|
|
311
275
|
const HighlightedText = ({ value, tree, focused, interactive, schemaValidator, onLinkMouseDown, dontHighlightErrors = false, cursorIdx }) => {
|
|
312
276
|
const runs = buildHighlights(tree, value, focused, schemaValidator);
|
|
313
277
|
const linkMap = /* @__PURE__ */ new Map();
|
|
278
|
+
const paramEntries = /* @__PURE__ */ new Map();
|
|
314
279
|
findAll(tree, NodeType.Chain).forEach((chainNode) => {
|
|
315
280
|
if (!isASTChainNode(chainNode)) return;
|
|
316
281
|
chainNode.children.forEach((link) => {
|
|
@@ -321,7 +286,7 @@ const HighlightedText = ({ value, tree, focused, interactive, schemaValidator, o
|
|
|
321
286
|
});
|
|
322
287
|
if (link.type === NodeType.Function || link.type === NodeType.CustomFunction) {
|
|
323
288
|
if (link.children.some((child) => child.type === NodeType.ParenClose)) {
|
|
324
|
-
for (const child of link.children) if (child.type !== NodeType.Error && child.type !== NodeType.ParenOpen && child.type !== NodeType.ParenClose)
|
|
289
|
+
for (const child of link.children) if (child.type !== NodeType.Error && child.type !== NodeType.ParenOpen && child.type !== NodeType.ParenClose) paramEntries.set(child.start, {
|
|
325
290
|
start: child.start,
|
|
326
291
|
end: child.start
|
|
327
292
|
});
|
|
@@ -330,6 +295,7 @@ const HighlightedText = ({ value, tree, focused, interactive, schemaValidator, o
|
|
|
330
295
|
}
|
|
331
296
|
});
|
|
332
297
|
});
|
|
298
|
+
paramEntries.forEach((entry, start) => linkMap.set(start, entry));
|
|
333
299
|
let pos = 0;
|
|
334
300
|
return /* @__PURE__ */ jsx(Fragment$1, { children: runs.map((r) => {
|
|
335
301
|
const start = pos;
|
|
@@ -374,31 +340,6 @@ let ValueType = /* @__PURE__ */ function(ValueType) {
|
|
|
374
340
|
return ValueType;
|
|
375
341
|
}({});
|
|
376
342
|
//#endregion
|
|
377
|
-
//#region src/components/SmartTextInput/parser/safe-parse.ts
|
|
378
|
-
/**
|
|
379
|
-
* Parses the input string into an ASTNode tree.
|
|
380
|
-
*/
|
|
381
|
-
function safeParse(input, options) {
|
|
382
|
-
try {
|
|
383
|
-
return peg$parse(input, {
|
|
384
|
-
startRule: "Root",
|
|
385
|
-
strict: false,
|
|
386
|
-
...options
|
|
387
|
-
});
|
|
388
|
-
} catch {
|
|
389
|
-
return {
|
|
390
|
-
type: NodeType.Root,
|
|
391
|
-
start: 0,
|
|
392
|
-
end: input.length,
|
|
393
|
-
children: [{
|
|
394
|
-
type: NodeType.Error,
|
|
395
|
-
start: 0,
|
|
396
|
-
end: input.length
|
|
397
|
-
}]
|
|
398
|
-
};
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
//#endregion
|
|
402
343
|
//#region src/components/SmartTextInput/utils.ts
|
|
403
344
|
const safeCursorIdx = (cursorIdx, ast) => {
|
|
404
345
|
const idx = cursorIdx ?? ast.end;
|
|
@@ -464,8 +405,9 @@ const scrollInputToCursor = (inputRef, cursorIdx) => {
|
|
|
464
405
|
* accepted chain roots.
|
|
465
406
|
*/
|
|
466
407
|
const isChainWithValidRoot = (value, chainRoots, { onlyAllowSingleLink = false } = {}) => {
|
|
467
|
-
const
|
|
468
|
-
|
|
408
|
+
const tree = safeParse(value, { startRule: "ChainRoot" });
|
|
409
|
+
const firstChild = (tree.children ?? [])[0];
|
|
410
|
+
return !findAll(tree, NodeType.Error).some((e) => !e.wip) && firstChild != null && firstChild.type === NodeType.Chain && isASTChainNode(firstChild) && chainRoots.some((r) => {
|
|
469
411
|
const firstLink = firstChild.children[0];
|
|
470
412
|
return firstLink != null && isMethodChainNode(firstLink) && r.label === firstLink.name;
|
|
471
413
|
}) && (!onlyAllowSingleLink || firstChild.children.length === 1);
|
|
@@ -524,7 +466,7 @@ const replaceChainAtCursor = (value, valueType, cursorIdx, tree, newChainString)
|
|
|
524
466
|
newCursorIdx: cursorIdx ?? value.length
|
|
525
467
|
};
|
|
526
468
|
const before = value.slice(0, openNode.end);
|
|
527
|
-
const after =
|
|
469
|
+
const after = value.slice(closeNode ? closeNode.start : expr.end);
|
|
528
470
|
return {
|
|
529
471
|
newValue: before + newChainString + after,
|
|
530
472
|
newCursorIdx: before.length + newChainString.length
|
|
@@ -644,7 +586,8 @@ const getConfirmLinkCursorPos = (tree, valueType, currentChain, chain, schema, c
|
|
|
644
586
|
*
|
|
645
587
|
* TODO: Add more sophistication here (e.g. fuzzy matching, etc.)
|
|
646
588
|
*/
|
|
647
|
-
const isQueryMatch = (
|
|
589
|
+
const isQueryMatch = (rawQuery, chain) => {
|
|
590
|
+
const query = rawQuery.toLowerCase();
|
|
648
591
|
const prop = chain.property.toLowerCase();
|
|
649
592
|
if (query.startsWith("@")) return prop.startsWith(query);
|
|
650
593
|
return (prop.startsWith("@") ? prop.slice(1) : prop).startsWith(query);
|
|
@@ -923,6 +866,7 @@ const SmartTextInputPopover = ({ id, children, comboboxState, inputRef, popoverR
|
|
|
923
866
|
$isDialog: isDialog,
|
|
924
867
|
id,
|
|
925
868
|
style: {
|
|
869
|
+
...popoverProps.style,
|
|
926
870
|
zIndex: Z_INDICES.modalDropdown,
|
|
927
871
|
width: popoverWidth
|
|
928
872
|
},
|
|
@@ -1013,6 +957,7 @@ const buildTextModeHeading = (nodes) => {
|
|
|
1013
957
|
parts.push("String");
|
|
1014
958
|
return parts.join(", ");
|
|
1015
959
|
};
|
|
960
|
+
const isListboxEmptyState = (collection, mode, isLoading) => [...collection].length === 0 || mode !== "text" && !!isLoading;
|
|
1016
961
|
const ListboxOption = ({ item, state }) => {
|
|
1017
962
|
const ref = useRef(null);
|
|
1018
963
|
const { optionProps, isFocused } = useOption({ key: item.id }, state, ref);
|
|
@@ -1064,44 +1009,59 @@ const ListboxOption = ({ item, state }) => {
|
|
|
1064
1009
|
});
|
|
1065
1010
|
}
|
|
1066
1011
|
};
|
|
1067
|
-
const SmartTextInputListbox = ({ comboboxState, listBoxRef, listBoxProps, mode, isLoading, openCodeChainFunctionPanel }) => {
|
|
1012
|
+
const SmartTextInputListbox = ({ comboboxState, listBoxRef, listBoxProps, mode, isLoading, openCodeChainFunctionPanel, footerButtonId, isFooterHighlighted = false }) => {
|
|
1068
1013
|
const listBox = useListBox({
|
|
1069
1014
|
...listBoxProps,
|
|
1070
1015
|
"aria-label": mode === "text" ? "Context menu" : "Data path options"
|
|
1071
1016
|
}, comboboxState, listBoxRef);
|
|
1072
1017
|
const nodes = [...comboboxState.collection];
|
|
1073
|
-
|
|
1018
|
+
const showEmptyState = isListboxEmptyState(comboboxState.collection, mode, isLoading);
|
|
1019
|
+
const footerButtonRef = useRef(null);
|
|
1020
|
+
useEffect(() => {
|
|
1021
|
+
if (isFooterHighlighted) footerButtonRef.current?.scrollIntoView?.({ block: "nearest" });
|
|
1022
|
+
}, [isFooterHighlighted]);
|
|
1023
|
+
const headings = /* @__PURE__ */ jsxs(Fragment$1, { children: [mode === "method-chain" && nodes[0]?.value?.id !== "exitMethodChainValueType" && /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(StyledListboxOption, {
|
|
1024
|
+
$bottomBorder: true,
|
|
1025
|
+
children: /* @__PURE__ */ jsx(OptionLabel, {
|
|
1026
|
+
$heading: true,
|
|
1027
|
+
children: "Data path"
|
|
1028
|
+
})
|
|
1029
|
+
}) }), mode === "text" && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(StyledListboxOption, {
|
|
1030
|
+
$bottomBorder: true,
|
|
1031
|
+
children: /* @__PURE__ */ jsx(OptionLabel, {
|
|
1032
|
+
$heading: true,
|
|
1033
|
+
children: buildTextModeHeading(nodes)
|
|
1034
|
+
})
|
|
1035
|
+
}), /* @__PURE__ */ jsx(StyledListboxOption, { children: /* @__PURE__ */ jsx(OptionLabel, {
|
|
1036
|
+
$heading: true,
|
|
1037
|
+
children: "Modes"
|
|
1038
|
+
}) })] })] });
|
|
1039
|
+
const footer = showEmptyState && openCodeChainFunctionPanel ? /* @__PURE__ */ jsx(FooterContainer, { children: /* @__PURE__ */ jsx(Button, {
|
|
1040
|
+
ref: footerButtonRef,
|
|
1041
|
+
id: footerButtonId,
|
|
1042
|
+
role: "option",
|
|
1043
|
+
"aria-selected": isFooterHighlighted,
|
|
1044
|
+
type: "button",
|
|
1045
|
+
tabIndex: -1,
|
|
1046
|
+
variant: "basic",
|
|
1047
|
+
size: "sm",
|
|
1048
|
+
active: isFooterHighlighted,
|
|
1049
|
+
onClick: openCodeChainFunctionPanel,
|
|
1050
|
+
children: "Create custom chain"
|
|
1051
|
+
}) }) : null;
|
|
1052
|
+
const listBoxElement = showEmptyState ? /* @__PURE__ */ jsx(StyledListBox, {
|
|
1074
1053
|
ref: listBoxRef,
|
|
1075
1054
|
...listBox.listBoxProps,
|
|
1076
|
-
children:
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
mode === "text" && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(StyledListboxOption, {
|
|
1085
|
-
$bottomBorder: true,
|
|
1086
|
-
children: /* @__PURE__ */ jsx(OptionLabel, {
|
|
1087
|
-
$heading: true,
|
|
1088
|
-
children: buildTextModeHeading(nodes)
|
|
1089
|
-
})
|
|
1090
|
-
}), /* @__PURE__ */ jsx(StyledListboxOption, { children: /* @__PURE__ */ jsx(OptionLabel, {
|
|
1091
|
-
$heading: true,
|
|
1092
|
-
children: "Modes"
|
|
1093
|
-
}) })] }),
|
|
1094
|
-
nodes.length === 0 || mode !== "text" && isLoading ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(EmptyOptionList, { children: "No options available" }), openCodeChainFunctionPanel && /* @__PURE__ */ jsx(FooterContainer, { children: /* @__PURE__ */ jsx(Button, {
|
|
1095
|
-
variant: "basic",
|
|
1096
|
-
size: "sm",
|
|
1097
|
-
onClick: openCodeChainFunctionPanel,
|
|
1098
|
-
children: "Create custom chain"
|
|
1099
|
-
}) })] }) : nodes.map((node) => node.value ? /* @__PURE__ */ jsx(ListboxOption, {
|
|
1100
|
-
item: node.value,
|
|
1101
|
-
state: comboboxState
|
|
1102
|
-
}, node.key) : null)
|
|
1103
|
-
]
|
|
1055
|
+
children: footer
|
|
1056
|
+
}) : /* @__PURE__ */ jsxs(StyledListBox, {
|
|
1057
|
+
ref: listBoxRef,
|
|
1058
|
+
...listBox.listBoxProps,
|
|
1059
|
+
children: [headings, nodes.map((node) => node.value ? /* @__PURE__ */ jsx(ListboxOption, {
|
|
1060
|
+
item: node.value,
|
|
1061
|
+
state: comboboxState
|
|
1062
|
+
}, node.key) : null)]
|
|
1104
1063
|
});
|
|
1064
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [showEmptyState && /* @__PURE__ */ jsxs(Fragment$1, { children: [headings, /* @__PURE__ */ jsx(EmptyOptionList, { children: "No options available" })] }), listBoxElement] });
|
|
1105
1065
|
};
|
|
1106
1066
|
//#endregion
|
|
1107
1067
|
//#region src/components/SmartTextInput/useChainAtCursor.ts
|
|
@@ -1153,7 +1113,10 @@ function extractChainContextAtCursor(tree, cursorIdx, valueType, assumeOnNextLin
|
|
|
1153
1113
|
}
|
|
1154
1114
|
if (!shouldInclude) {
|
|
1155
1115
|
cutoffIdx = i;
|
|
1156
|
-
if (!assumeOnNextLink && link.start < idx)
|
|
1116
|
+
if (!assumeOnNextLink && link.start < idx) {
|
|
1117
|
+
const linkText = link.type === NodeType.CustomFunction ? `@${link.name}` : link.name;
|
|
1118
|
+
partialQuery = linkText.slice(0, Math.min(idx - link.start, linkText.length));
|
|
1119
|
+
}
|
|
1157
1120
|
break;
|
|
1158
1121
|
}
|
|
1159
1122
|
}
|
|
@@ -1434,12 +1397,12 @@ const StyledInput = styled(Input_default)`
|
|
|
1434
1397
|
overflow: hidden;
|
|
1435
1398
|
|
|
1436
1399
|
${({ size }) => size === "sm" && css`
|
|
1437
|
-
font-size:
|
|
1400
|
+
font-size: ${Typography.TextSmall.fontSize};
|
|
1438
1401
|
`}
|
|
1439
1402
|
${({ $variant }) => $variant === "table-cell" && css`
|
|
1440
1403
|
border: none;
|
|
1441
1404
|
padding: 0;
|
|
1442
|
-
height:
|
|
1405
|
+
height: ${Typography.TextSmall.lineHeight};
|
|
1443
1406
|
border-radius: 0;
|
|
1444
1407
|
`}
|
|
1445
1408
|
`;
|
|
@@ -1791,6 +1754,19 @@ const SmartTextInput = ({ value: passedValue, onChange, valueType: allowedValueT
|
|
|
1791
1754
|
});
|
|
1792
1755
|
const showFunctionDialog = popupMode === "function-dialog" && comboboxState.isOpen;
|
|
1793
1756
|
const showCodeDialog = popupMode === "code-dialog" && comboboxState.isOpen;
|
|
1757
|
+
const openCustomChainPanel = openCcfPanel ? () => openCcfPanel({
|
|
1758
|
+
initialName: query,
|
|
1759
|
+
inputSchema: currentSchema
|
|
1760
|
+
}) : void 0;
|
|
1761
|
+
const customChainButtonId = `${id}__create-custom-chain`;
|
|
1762
|
+
const showCustomChainFooter = openCustomChainPanel != null && comboboxState.isOpen && !showFunctionDialog && !showCodeDialog && isListboxEmptyState(comboboxState.collection, mode, isLoading);
|
|
1763
|
+
const [isCustomChainHighlighted, setIsCustomChainHighlighted] = useState(false);
|
|
1764
|
+
useEffect(() => {
|
|
1765
|
+
if (!showCustomChainFooter) setIsCustomChainHighlighted(false);
|
|
1766
|
+
}, [showCustomChainFooter]);
|
|
1767
|
+
useEffect(() => {
|
|
1768
|
+
setIsCustomChainHighlighted(false);
|
|
1769
|
+
}, [value]);
|
|
1794
1770
|
const popoverFooterRendered = useMemo(() => {
|
|
1795
1771
|
return popoverFooter == null ? void 0 : popoverFooter({ closePopover() {
|
|
1796
1772
|
comboboxState.setOpen(false);
|
|
@@ -1829,6 +1805,26 @@ const SmartTextInput = ({ value: passedValue, onChange, valueType: allowedValueT
|
|
|
1829
1805
|
dialogFocusRef.current?.focusFirst();
|
|
1830
1806
|
return;
|
|
1831
1807
|
}
|
|
1808
|
+
if (showCustomChainFooter) {
|
|
1809
|
+
if (e.key === "ArrowDown") {
|
|
1810
|
+
e.preventDefault();
|
|
1811
|
+
e.stopPropagation();
|
|
1812
|
+
setIsCustomChainHighlighted(true);
|
|
1813
|
+
return;
|
|
1814
|
+
}
|
|
1815
|
+
if (e.key === "ArrowUp") {
|
|
1816
|
+
e.preventDefault();
|
|
1817
|
+
e.stopPropagation();
|
|
1818
|
+
setIsCustomChainHighlighted(false);
|
|
1819
|
+
return;
|
|
1820
|
+
}
|
|
1821
|
+
if (e.key === "Enter" && isCustomChainHighlighted) {
|
|
1822
|
+
e.preventDefault();
|
|
1823
|
+
e.stopPropagation();
|
|
1824
|
+
openCustomChainPanel?.();
|
|
1825
|
+
return;
|
|
1826
|
+
}
|
|
1827
|
+
}
|
|
1832
1828
|
inputProps.onKeyDown?.(e);
|
|
1833
1829
|
}
|
|
1834
1830
|
}, {
|
|
@@ -1942,6 +1938,7 @@ const SmartTextInput = ({ value: passedValue, onChange, valueType: allowedValueT
|
|
|
1942
1938
|
disabled,
|
|
1943
1939
|
size,
|
|
1944
1940
|
$variant: variant,
|
|
1941
|
+
"aria-activedescendant": isCustomChainHighlighted ? customChainButtonId : inputProps["aria-activedescendant"],
|
|
1945
1942
|
"aria-haspopup": popupMode === "function-dialog" || popupMode === "code-dialog" ? "dialog" : inputProps["aria-haspopup"],
|
|
1946
1943
|
...suppressPopover ? { "aria-expanded": false } : {}
|
|
1947
1944
|
})
|
|
@@ -1978,12 +1975,9 @@ const SmartTextInput = ({ value: passedValue, onChange, valueType: allowedValueT
|
|
|
1978
1975
|
listBoxProps: combobox.listBoxProps,
|
|
1979
1976
|
mode,
|
|
1980
1977
|
isLoading,
|
|
1981
|
-
openCodeChainFunctionPanel:
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
inputSchema: currentSchema
|
|
1985
|
-
});
|
|
1986
|
-
} : void 0
|
|
1978
|
+
openCodeChainFunctionPanel: openCustomChainPanel,
|
|
1979
|
+
footerButtonId: customChainButtonId,
|
|
1980
|
+
isFooterHighlighted: isCustomChainHighlighted
|
|
1987
1981
|
})
|
|
1988
1982
|
})]
|
|
1989
1983
|
}), renderCcfPanel()] });
|